{
  "version": 3,
  "sources": ["../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/global-this.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/fails.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/descriptors.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/function-bind-native.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/function-call.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/object-property-is-enumerable.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/create-property-descriptor.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/function-uncurry-this.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/classof-raw.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/indexed-object.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/is-null-or-undefined.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/require-object-coercible.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/to-indexed-object.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/is-callable.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/is-object.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/get-built-in.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/object-is-prototype-of.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/environment-user-agent.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/environment-v8-version.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/symbol-constructor-detection.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/use-symbol-as-uid.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/is-symbol.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/try-to-string.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/a-callable.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/get-method.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/ordinary-to-primitive.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/is-pure.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/define-global-property.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/shared-store.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/shared.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/to-object.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/has-own-property.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/uid.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/well-known-symbol.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/to-primitive.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/to-property-key.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/document-create-element.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/ie8-dom-define.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/object-get-own-property-descriptor.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/v8-prototype-define-bug.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/an-object.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/object-define-property.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/create-non-enumerable-property.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/function-name.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/inspect-source.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/weak-map-basic-detection.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/shared-key.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/hidden-keys.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/internal-state.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/make-built-in.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/define-built-in.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/math-trunc.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/to-integer-or-infinity.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/to-absolute-index.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/to-length.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/length-of-array-like.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/array-includes.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/object-keys-internal.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/enum-bug-keys.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/object-get-own-property-names.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/object-get-own-property-symbols.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/own-keys.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/copy-constructor-properties.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/is-forced.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/export.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/to-string-tag-support.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/classof.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/to-string.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/object-keys.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/object-define-properties.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/html.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/object-create.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/array-slice.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/object-get-own-property-names-external.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/define-built-in-accessor.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/well-known-symbol-wrapped.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/path.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/well-known-symbol-define.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/symbol-define-to-primitive.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/set-to-string-tag.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/function-uncurry-this-clause.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/function-bind-context.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/is-array.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/is-constructor.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/array-species-constructor.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/array-species-create.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/create-property.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/array-iteration.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.symbol.constructor.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/symbol-registry-detection.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.symbol.for.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.symbol.key-for.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/is-raw-json.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/this-number-value.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/parse-json-string.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/native-raw-json.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.json.stringify.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.object.get-own-property-symbols.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.symbol.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.symbol.description.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.symbol.async-dispose.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.symbol.async-iterator.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.symbol.dispose.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.symbol.has-instance.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.symbol.is-concat-spreadable.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.symbol.iterator.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.symbol.match.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.symbol.match-all.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.symbol.replace.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.symbol.search.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.symbol.species.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.symbol.split.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.symbol.to-primitive.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.symbol.to-string-tag.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.symbol.unscopables.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/function-apply.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/function-uncurry-this-accessor.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/is-possible-prototype.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/a-possible-prototype.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/object-set-prototype-of.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/proxy-accessor.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/inherit-if-required.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/normalize-string-argument.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/install-error-cause.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/error-stack-clear.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/error-stack-installable.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/error-stack-install.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/wrap-error-constructor-with-cause.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.error.cause.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.error.is-error.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/error-to-string.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.error.to-string.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/correct-prototype-getter.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/object-get-prototype-of.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/iterators.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/is-array-iterator-method.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/get-iterator-method-internal.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/get-iterator-internal.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/iterator-close.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/iterate.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.aggregate-error.constructor.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.aggregate-error.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.aggregate-error.cause.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.suppressed-error.constructor.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/add-to-unscopables.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.array.at.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/does-not-exceed-safe-integer.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/array-set-length.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/array-method-has-species-support.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.array.concat.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/delete-property-or-throw.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/array-copy-within.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.array.copy-within.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/array-method-is-strict.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.array.every.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/array-fill.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.array.fill.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.array.filter.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.array.find.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.array.find-index.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/array-iteration-from-last.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.array.find-last.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.array.find-last-index.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/flatten-into-array.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.array.flat.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.array.flat-map.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/array-for-each.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.array.for-each.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/call-with-safe-iteration-closing.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/array-from.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/check-correctness-of-iteration.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.array.from.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.array.includes.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.array.index-of.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.array.is-array.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/iterators-core.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/iterator-create-constructor.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/iterator-define.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/create-iter-result-object.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.array.iterator.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.array.join.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/array-last-index-of.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.array.last-index-of.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.array.map.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.array.of.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.array.push.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/array-reduce.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/environment.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/environment-is-node.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.array.reduce.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.array.reduce-right.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.array.reverse.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.array.slice.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.array.some.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/array-sort.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/environment-ff-version.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/environment-is-ie-or-edge.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/environment-webkit-version.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.array.sort.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/set-species.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.array.species.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.array.splice.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.array.to-reversed.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/array-from-constructor-and-list.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/get-built-in-prototype-method.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.array.to-sorted.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.array.to-spliced.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.array.unscopables.flat.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.array.unscopables.flat-map.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.array.unshift.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.array.with.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/array-buffer-basic-detection.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/define-built-ins.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/an-instance.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/to-index.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/math-sign.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/math-round-ties-to-even.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/math-float-round.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/math-fround.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/ieee754.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/array-buffer.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.array-buffer.constructor.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/array-buffer-view-core.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.array-buffer.is-view.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.array-buffer.slice.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.data-view.constructor.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.data-view.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.data-view.get-float16.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/a-data-view.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/math-log2.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.data-view.set-float16.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/array-buffer-byte-length.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/array-buffer-is-detached.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.array-buffer.detached.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/array-buffer-not-detached.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/get-built-in-node-module.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/structured-clone-proper-transfer.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/detach-transferable.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/array-buffer-transfer.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.array-buffer.transfer.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.array-buffer.transfer-to-fixed-length.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.date.get-year.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.date.now.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.date.set-year.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.date.to-gmt-string.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/string-repeat.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/string-pad.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/date-to-iso-string.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.date.to-iso-string.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.date.to-json.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/date-to-primitive.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.date.to-primitive.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.date.to-string.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/add-disposable-resource.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.disposable-stack.constructor.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.escape.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/function-bind.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.function.bind.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.function.has-instance.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.function.name.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.global-this.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.iterator.constructor.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/iterator-close-all.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/iterator-cleanup-state.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/iterator-create-proxy.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.iterator.concat.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.iterator.dispose.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/get-iterator-direct.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/not-a-nan.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/to-positive-integer.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/iterator-helper-throws-on-invalid-iterator.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/iterator-helper-without-closing-on-early-error.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.iterator.drop.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.iterator.every.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.iterator.filter.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.iterator.find.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/get-iterator-flattenable.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.iterator.flat-map.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.iterator.for-each.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.iterator.from.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.iterator.map.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.iterator.reduce.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.iterator.some.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.iterator.take.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.iterator.to-array.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/an-object-or-undefined.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/get-iterator-record.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/get-mode-option.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/iterator-zip.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.iterator.zip.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.iterator.zip-keyed.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.json.is-raw-json.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.json.parse.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/freezing.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.json.raw-json.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.json.to-string-tag.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/array-buffer-non-extensible.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/object-is-extensible.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/internal-metadata.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/collection.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/collection-strong.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.map.constructor.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.map.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/map-helpers.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.map.group-by.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.map.get-or-insert.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.map.get-or-insert-computed.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/math-log1p.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.math.acosh.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.math.asinh.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.math.atanh.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.math.cbrt.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.math.clz32.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/math-expm1.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.math.cosh.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.math.expm1.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.math.fround.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.math.f16round.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.math.hypot.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.math.imul.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/math-log10.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.math.log10.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.math.log1p.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.math.log2.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.math.sign.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.math.sinh.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.math.sum-precise.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.math.tanh.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.math.to-string-tag.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.math.trunc.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/whitespaces.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/string-trim.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.number.constructor.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.number.epsilon.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/number-is-finite.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.number.is-finite.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/is-integral-number.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.number.is-integer.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.number.is-nan.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.number.is-safe-integer.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.number.max-safe-integer.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.number.min-safe-integer.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/number-parse-float.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.number.parse-float.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/number-parse-int.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.number.parse-int.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.number.to-exponential.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.number.to-fixed.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.number.to-precision.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/object-assign.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.object.assign.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.object.create.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/object-prototype-accessors-forced.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.object.define-getter.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.object.define-properties.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.object.define-property.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.object.define-setter.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/object-to-array.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.object.entries.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.object.freeze.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.object.from-entries.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.object.get-own-property-descriptor.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.object.get-own-property-descriptors.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.object.get-own-property-names.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.object.get-prototype-of.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.object.group-by.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.object.has-own.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/same-value.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.object.is.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.object.is-extensible.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.object.is-frozen.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.object.is-sealed.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.object.keys.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.object.lookup-getter.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.object.lookup-setter.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.object.prevent-extensions.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.object.proto.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.object.seal.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.object.set-prototype-of.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/object-to-string.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.object.to-string.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.object.values.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.parse-float.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.parse-int.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/a-constructor.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/species-constructor.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/validate-arguments-length.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/environment-is-ios.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/task.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/safe-get-built-in.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/queue.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/environment-is-ios-pebble.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/environment-is-webos-webkit.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/microtask.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/host-report-errors.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/perform.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/promise-native-constructor.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/promise-constructor-detection.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/new-promise-capability.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.promise.constructor.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/promise-statics-incorrect-iteration.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.promise.all.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.promise.catch.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.promise.race.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.promise.reject.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/promise-resolve.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.promise.resolve.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.promise.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.promise.all-settled.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.promise.any.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.promise.finally.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.promise.try.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.promise.with-resolvers.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/async-iterator-prototype.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/async-from-sync-iterator.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/get-async-iterator.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/async-iterator-close.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/async-iterator-iteration.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/array-from-async.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.array.from-async.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.async-disposable-stack.constructor.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.async-iterator.async-dispose.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.reflect.apply.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.reflect.construct.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.reflect.define-property.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.reflect.delete-property.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/is-data-descriptor.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.reflect.get.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.reflect.get-own-property-descriptor.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.reflect.get-prototype-of.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.reflect.has.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.reflect.is-extensible.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.reflect.own-keys.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.reflect.prevent-extensions.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.reflect.set.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.reflect.set-prototype-of.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.reflect.to-string-tag.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/is-regexp.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/regexp-flags-detection.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/regexp-flags.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/regexp-get-flags.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/regexp-sticky-helpers.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/regexp-unsupported-dot-all.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/regexp-unsupported-ncg.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.regexp.constructor.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/a-string.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.regexp.escape.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.regexp.dot-all.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/regexp-exec.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.regexp.exec.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.regexp.flags.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.regexp.sticky.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.regexp.test.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.regexp.to-string.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.set.constructor.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.set.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/set-helpers.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/a-set.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/iterate-simple.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/set-iterate.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/set-clone.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/set-size.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/get-set-record.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/set-difference.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/set-method-accept-set-like.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.set.difference.v2.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/set-intersection.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.set.intersection.v2.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/set-is-disjoint-from.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.set.is-disjoint-from.v2.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/set-is-subset-of.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.set.is-subset-of.v2.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/set-is-superset-of.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.set.is-superset-of.v2.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/set-symmetric-difference.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/set-method-get-keys-before-cloning-detection.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.set.symmetric-difference.v2.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/set-union.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.set.union.v2.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.string.at-alternative.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/string-multibyte.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.string.code-point-at.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/not-a-regexp.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/correct-is-regexp-logic.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.string.ends-with.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.string.from-code-point.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.string.includes.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.string.is-well-formed.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.string.iterator.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/fix-regexp-well-known-symbol-logic.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/advance-string-index.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/regexp-exec-abstract.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.string.match.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.string.match-all.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/string-pad-webkit-bug.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.string.pad-end.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.string.pad-start.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.string.raw.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.string.repeat.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/get-substitution.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.string.replace.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.string.replace-all.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.string.search.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.string.split.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.string.starts-with.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.string.substr.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.string.to-well-formed.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/string-trim-forced.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.string.trim.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/string-trim-end.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.string.trim-right.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.string.trim-end.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/string-trim-start.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.string.trim-left.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.string.trim-start.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/create-html.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/string-html-forced.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.string.anchor.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.string.big.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.string.blink.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.string.bold.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.string.fixed.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.string.fontcolor.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.string.fontsize.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.string.italics.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.string.link.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.string.small.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.string.strike.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.string.sub.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.string.sup.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/typed-array-constructors-require-wrappers.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/to-offset.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/to-uint8-clamped.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/is-big-int-array.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/to-big-int.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/typed-array-from.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/typed-array-constructor.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.typed-array.float32-array.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.typed-array.float64-array.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.typed-array.int8-array.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.typed-array.int16-array.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.typed-array.int32-array.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.typed-array.uint8-array.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.typed-array.uint8-clamped-array.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.typed-array.uint16-array.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.typed-array.uint32-array.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.typed-array.at.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.typed-array.copy-within.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.typed-array.every.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.typed-array.fill.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/typed-array-from-same-type-and-list.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.typed-array.filter.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.typed-array.find.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.typed-array.find-index.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.typed-array.find-last.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.typed-array.find-last-index.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.typed-array.for-each.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.typed-array.from.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.typed-array.includes.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.typed-array.index-of.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.typed-array.iterator.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.typed-array.join.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.typed-array.last-index-of.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.typed-array.map.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.typed-array.of.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.typed-array.reduce.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.typed-array.reduce-right.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.typed-array.reverse.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.typed-array.set.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.typed-array.slice.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.typed-array.some.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.typed-array.sort.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.typed-array.subarray.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.typed-array.to-locale-string.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.typed-array.to-reversed.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.typed-array.to-sorted.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.typed-array.to-string.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.typed-array.with.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/base64-map.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/get-alphabet-option.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/uint8-from-base64.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.uint8-array.from-base64.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/uint8-from-hex.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.uint8-array.from-hex.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/an-uint8-array.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.uint8-array.set-from-base64.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.uint8-array.set-from-hex.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.uint8-array.to-base64.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.uint8-array.to-hex.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.unescape.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/collection-weak.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.weak-map.constructor.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.weak-map.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/weak-map-helpers.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.weak-map.get-or-insert.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/a-weak-map.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/a-weak-key.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.weak-map.get-or-insert-computed.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.weak-set.constructor.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/es.weak-set.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/web.atob.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/web.btoa.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/dom-iterables.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/dom-token-list-prototype.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/web.dom-collections.for-each.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/web.dom-collections.iterator.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/dom-exception-constants.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/web.dom-exception.constructor.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/web.dom-exception.stack.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/web.dom-exception.to-string-tag.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/web.clear-immediate.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/schedulers-fix.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/web.set-immediate.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/web.immediate.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/web.queue-microtask.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/web.self.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/web.structured-clone.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/web.set-interval.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/web.set-timeout.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/web.timers.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/url-constructor-detection.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/string-punycode-to-ascii.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/internals/url-percent-coding.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/web.url-search-params.constructor.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/web.url.constructor.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/web.url.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/web.url.can-parse.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/web.url.parse.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/web.url.to-json.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/web.url-search-params.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/web.url-search-params.delete.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/web.url-search-params.has.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/modules/web.url-search-params.size.js", "../../../node_modules/.pnpm/core-js@3.50.0/node_modules/core-js/stable/index.js", "../../../node_modules/.pnpm/regenerator-runtime@0.14.1/node_modules/regenerator-runtime/runtime.js", "../../../node_modules/.pnpm/smoothscroll-polyfill@0.4.4/node_modules/smoothscroll-polyfill/dist/smoothscroll.js", "../../../node_modules/.pnpm/react@19.2.8/node_modules/react/cjs/react.development.js", "../../../node_modules/.pnpm/react@19.2.8/node_modules/react/index.js", "../../../node_modules/.pnpm/react-dom@19.2.8_react@19.2.8/node_modules/react-dom/cjs/react-dom.development.js", "../../../node_modules/.pnpm/react-dom@19.2.8_react@19.2.8/node_modules/react-dom/index.js", "../../../node_modules/.pnpm/react-dom@19.2.8_react@19.2.8/node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js", "../../../node_modules/.pnpm/react-dom@19.2.8_react@19.2.8/node_modules/react-dom/cjs/react-dom-server.browser.development.js", "../../../node_modules/.pnpm/react-dom@19.2.8_react@19.2.8/node_modules/react-dom/server.browser.js", "../../../node_modules/.pnpm/@rails+actioncable@8.1.301/node_modules/@rails/actioncable/src/adapters.js", "../../../node_modules/.pnpm/@rails+actioncable@8.1.301/node_modules/@rails/actioncable/src/logger.js", "../../../node_modules/.pnpm/@rails+actioncable@8.1.301/node_modules/@rails/actioncable/src/connection_monitor.js", "../../../node_modules/.pnpm/@rails+actioncable@8.1.301/node_modules/@rails/actioncable/src/internal.js", "../../../node_modules/.pnpm/@rails+actioncable@8.1.301/node_modules/@rails/actioncable/src/connection.js", "../../../node_modules/.pnpm/@rails+actioncable@8.1.301/node_modules/@rails/actioncable/src/subscription.js", "../../../node_modules/.pnpm/@rails+actioncable@8.1.301/node_modules/@rails/actioncable/src/subscription_guarantor.js", "../../../node_modules/.pnpm/@rails+actioncable@8.1.301/node_modules/@rails/actioncable/src/subscriptions.js", "../../../node_modules/.pnpm/@rails+actioncable@8.1.301/node_modules/@rails/actioncable/src/consumer.js", "../../../node_modules/.pnpm/@rails+actioncable@8.1.301/node_modules/@rails/actioncable/src/index.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/isObject.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_freeGlobal.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_root.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/now.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_trimmedEndIndex.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseTrim.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_Symbol.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_getRawTag.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_objectToString.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseGetTag.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/isObjectLike.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/isSymbol.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/toNumber.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/debounce.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/throttle.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseExtremum.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseGt.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_listCacheClear.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/eq.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_assocIndexOf.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_listCacheDelete.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_listCacheGet.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_listCacheHas.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_listCacheSet.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_ListCache.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_stackClear.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_stackDelete.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_stackGet.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_stackHas.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/isFunction.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_coreJsData.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_isMasked.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_toSource.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseIsNative.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_getValue.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_getNative.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_Map.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_nativeCreate.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_hashClear.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_hashDelete.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_hashGet.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_hashHas.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_hashSet.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_Hash.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_mapCacheClear.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_isKeyable.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_getMapData.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_mapCacheDelete.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_mapCacheGet.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_mapCacheHas.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_mapCacheSet.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_MapCache.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_stackSet.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_Stack.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_setCacheAdd.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_setCacheHas.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_SetCache.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_arraySome.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_cacheHas.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_equalArrays.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_Uint8Array.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_mapToArray.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_setToArray.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_equalByTag.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_arrayPush.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/isArray.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseGetAllKeys.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_arrayFilter.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/stubArray.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_getSymbols.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseTimes.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseIsArguments.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/isArguments.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/stubFalse.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/isBuffer.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_isIndex.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/isLength.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseIsTypedArray.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseUnary.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_nodeUtil.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/isTypedArray.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_arrayLikeKeys.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_isPrototype.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_overArg.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_nativeKeys.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseKeys.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/isArrayLike.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/keys.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_getAllKeys.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_equalObjects.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_DataView.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_Promise.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_Set.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_WeakMap.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_getTag.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseIsEqualDeep.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseIsEqual.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseIsMatch.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_isStrictComparable.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_getMatchData.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_matchesStrictComparable.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseMatches.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_isKey.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/memoize.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_memoizeCapped.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_stringToPath.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_arrayMap.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseToString.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/toString.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_castPath.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_toKey.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseGet.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/get.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseHasIn.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_hasPath.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/hasIn.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseMatchesProperty.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/identity.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseProperty.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_basePropertyDeep.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/property.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseIteratee.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/maxBy.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/lodash.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/operation/buffer/BufferParameters.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/java/lang/Exception.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/java/lang/IllegalArgumentException.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/geom/GeometryComponentFilter.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/java/lang/Comparable.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/java/lang/Cloneable.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/java/io/Serializable.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/java/lang/Double.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/util/NumberUtil.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/java/lang/Long.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/java/util/Comparator.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/java/lang/RuntimeException.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/util/AssertionFailedException.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/util/Assert.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/geom/Coordinate.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/geom/Envelope.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/geom/Geometry.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/geom/Location.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/java/util/Collection.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/java/util/NoSuchElementException.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/java/lang/UnsupportedOperationException.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/java/util/Set.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/java/util/HashSet.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/geomgraph/Position.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/java/util/EmptyStackException.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/java/lang/IndexOutOfBoundsException.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/java/util/List.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/java/util/Stack.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/hasInterface.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/java/lang/StringBuffer.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/java/lang/Integer.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/java/lang/Character.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/math/DD.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/algorithm/CGAlgorithmsDD.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/geom/CoordinateSequence.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/algorithm/Orientation.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/operation/buffer/RightmostEdgeFinder.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/geom/TopologyException.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/java/util/LinkedList.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/java/util/ArrayList.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/operation/buffer/BufferSubgraph.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/algorithm/Intersection.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/java/lang/System.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/math/MathUtil.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/algorithm/Distance.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/geom/CoordinateSequenceFactory.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/geom/CoordinateFilter.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/algorithm/Length.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/geom/Lineal.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/geom/CoordinateSequences.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/geom/Dimension.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/geom/GeometryFilter.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/geom/CoordinateSequenceFilter.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/geom/LineString.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/geom/Puntal.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/geom/Point.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/algorithm/Area.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/java/util/Arrays.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/geom/Polygonal.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/geom/Polygon.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/java/util/SortedSet.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/java/util/TreeSet.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/geom/GeometryCollection.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/geom/MultiPoint.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/geom/LinearRing.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/geom/CoordinateXY.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/geom/CoordinateXYM.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/geom/CoordinateXYZM.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/geom/Coordinates.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/geom/CoordinateList.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/geom/CoordinateArrays.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/java/lang/StringBuilder.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/geom/impl/CoordinateArraySequence.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/geom/impl/CoordinateArraySequenceFactory.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/geom/MultiPolygon.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/java/util/Map.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/java/util/HashMap.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/geom/PrecisionModel.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/geom/MultiLineString.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/geom/GeometryFactory.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/io/WKTParser.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/io/WKTWriter.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/algorithm/LineIntersector.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/algorithm/RobustLineIntersector.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/algorithm/RayCrossingCounter.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/algorithm/PointLocation.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/geomgraph/TopologyLocation.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/geomgraph/Label.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/geomgraph/EdgeRing.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/operation/overlay/MinimalEdgeRing.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/operation/overlay/MaximalEdgeRing.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/geomgraph/GraphComponent.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/geomgraph/Node.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/java/util/SortedMap.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/java/util/TreeMap.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/geomgraph/NodeMap.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/geomgraph/Quadrant.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/geomgraph/EdgeEnd.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/geomgraph/DirectedEdge.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/geomgraph/NodeFactory.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/geomgraph/PlanarGraph.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/operation/overlay/PolygonBuilder.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/index/strtree/Boundable.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/index/strtree/ItemBoundable.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/util/PriorityQueue.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/index/SpatialIndex.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/index/strtree/AbstractNode.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/java/util/Collections.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/index/strtree/EnvelopeDistance.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/index/strtree/BoundablePair.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/index/ItemVisitor.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/index/strtree/AbstractSTRtree.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/index/strtree/ItemDistance.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/index/strtree/STRtree.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/noding/SegmentPointComparator.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/noding/SegmentNode.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/java/util/Iterator.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/noding/SegmentNodeList.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/noding/Octant.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/noding/SegmentString.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/noding/NodableSegmentString.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/noding/NodedSegmentString.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/geom/LineSegment.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/index/chain/MonotoneChainOverlapAction.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/index/chain/MonotoneChain.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/index/chain/MonotoneChainBuilder.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/noding/Noder.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/noding/SinglePassNoder.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/noding/MCIndexNoder.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/operation/buffer/BufferInputLineSimplifier.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/operation/buffer/OffsetSegmentString.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/algorithm/Angle.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/operation/buffer/OffsetSegmentGenerator.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/operation/buffer/OffsetCurveBuilder.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/operation/buffer/SubgraphDepthLocater.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/algorithm/NotRepresentableException.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/algorithm/HCoordinate.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/geom/Triangle.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/operation/buffer/OffsetCurveSetBuilder.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/algorithm/locate/PointOnGeometryLocator.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/geom/GeometryCollectionIterator.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/algorithm/locate/SimplePointInAreaLocator.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/geomgraph/EdgeEndStar.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/geomgraph/DirectedEdgeStar.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/operation/overlay/OverlayNodeFactory.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/noding/OrientedCoordinateArray.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/geomgraph/EdgeList.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/noding/SegmentIntersector.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/noding/IntersectionAdder.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/geomgraph/EdgeIntersection.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/geomgraph/EdgeIntersectionList.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/geom/IntersectionMatrix.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/util/IntArrayList.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/geomgraph/index/MonotoneChainIndexer.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/geomgraph/index/MonotoneChainEdge.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/geomgraph/Depth.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/geomgraph/Edge.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/operation/buffer/BufferBuilder.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/noding/ScaledNoder.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/noding/NodingValidator.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/noding/snapround/HotPixel.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/index/chain/MonotoneChainSelectAction.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/noding/snapround/MCIndexPointSnapper.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/noding/InteriorIntersectionFinderAdder.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/noding/snapround/MCIndexSnapRounder.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/operation/buffer/BufferOp.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/io/GeoJSONParser.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/src/index.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/io/GeoJSONReader.js", "../../../node_modules/.pnpm/@turf+jsts@2.7.2/node_modules/@turf/jsts/node_modules/jsts/org/locationtech/jts/io/GeoJSONWriter.js", "../../../node_modules/.pnpm/clipper-lib@6.4.2/node_modules/clipper-lib/clipper.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseSum.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/sumBy.js", "../../../node_modules/.pnpm/siema@1.5.1/node_modules/siema/dist/siema.min.js", "../../../node_modules/.pnpm/scheduler@0.27.0/node_modules/scheduler/cjs/scheduler.development.js", "../../../node_modules/.pnpm/scheduler@0.27.0/node_modules/scheduler/index.js", "../../../node_modules/.pnpm/react-dom@19.2.8_react@19.2.8/node_modules/react-dom/cjs/react-dom-client.development.js", "../../../node_modules/.pnpm/react-dom@19.2.8_react@19.2.8/node_modules/react-dom/client.js", "../../../node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.development.js", "../../../node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.js", "../../../node_modules/.pnpm/object-assign@4.1.1/node_modules/object-assign/index.js", "../../../node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/lib/ReactPropTypesSecret.js", "../../../node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/lib/has.js", "../../../node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/checkPropTypes.js", "../../../node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/factoryWithTypeCheckers.js", "../../../node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js", "../../../node_modules/.pnpm/moment@2.30.1/node_modules/moment/moment.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_apply.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_overRest.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/constant.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_defineProperty.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseSetToString.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_shortOut.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_setToString.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseRest.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/isArrayLikeObject.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/unzip.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/zip.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseSlice.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_isIterateeCall.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/toFinite.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/toInteger.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/chunk.js", "../../javascript/helpers/zones-and-module-positions.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_isFlattenable.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseFlatten.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_createBaseFor.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseFor.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseForOwn.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_createBaseEach.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseEach.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseMap.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseSortBy.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_compareAscending.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_compareMultiple.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseOrderBy.js", "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/sortBy.js", "../../../node_modules/.pnpm/rbush@3.0.1/node_modules/rbush/rbush.min.js", "../../../node_modules/.pnpm/tinyqueue@2.0.3/node_modules/tinyqueue/tinyqueue.js", "../../../node_modules/.pnpm/point-in-polygon@1.1.0/node_modules/point-in-polygon/flat.js", "../../../node_modules/.pnpm/point-in-polygon@1.1.0/node_modules/point-in-polygon/nested.js", "../../../node_modules/.pnpm/point-in-polygon@1.1.0/node_modules/point-in-polygon/index.js", "../../../node_modules/.pnpm/robust-predicates@2.0.4/node_modules/robust-predicates/umd/orient2d.min.js", "../../../node_modules/.pnpm/concaveman@1.2.1/node_modules/concaveman/index.js", "../../../node_modules/.pnpm/property-expr@2.0.6/node_modules/property-expr/index.js", "../../../node_modules/.pnpm/tiny-case@1.0.3/node_modules/tiny-case/index.js", "../../../node_modules/.pnpm/toposort@2.0.2/node_modules/toposort/index.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/config/attachments.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/config/block_attributes.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/config/browser.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/config/dompurify.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/config/lang.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/config/file_size_formatting.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/constants.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/core/helpers/extend.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/core/helpers/dom.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/config/input.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/config/key_names.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/config/parser.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/config/text_attributes.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/config/toolbar.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/config/undo.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/config/css.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/core/basic_object.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/core/utilities/utf16_string.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/core/object.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/core/helpers/arrays.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/core/helpers/bidi.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/core/helpers/config.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/core/helpers/custom_elements.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/core/helpers/events.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/core/helpers/functions.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/core/helpers/objects.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/core/helpers/ranges.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/observers/selection_change_observer.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/core/helpers/strings.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/core/collections/hash.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/core/collections/object_group.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/core/collections/object_map.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/core/collections/element_store.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/core/utilities/operation.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/views/object_view.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/node_modules/dompurify/dist/purify.es.mjs", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/models/html_sanitizer.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/views/attachment_view.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/views/previewable_attachment_view.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/views/piece_view.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/views/text_view.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/views/block_view.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/views/document_view.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/models/piece.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/operations/image_preload_operation.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/models/attachment.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/models/attachment_piece.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/models/string_piece.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/models/splittable_list.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/models/text.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/models/block.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/models/document.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/models/html_parser.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/core/serialization.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/models/managed_attachment.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/models/attachment_manager.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/models/line_break_insertion.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/models/composition.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/models/undo_manager.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/filters/filter.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/filters/attachment_gallery_filter.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/models/editor.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/models/location_mapper.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/models/point_mapper.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/models/selection_manager.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/controllers/attachment_editor_controller.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/controllers/composition_controller.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/controllers/controller.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/observers/mutation_observer.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/operations/file_verification_operation.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/models/flaky_android_keyboard_detector.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/controllers/input_controller.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/controllers/level_0_input_controller.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/controllers/level_2_input_controller.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/controllers/toolbar_controller.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/controllers/editor_controller.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/elements/trix_toolbar_element.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/elements/trix_editor_element.js", "../../../node_modules/.pnpm/trix@2.1.19/node_modules/trix/src/trix/trix.js", "../../javascript/config/suppress-react-devtools-message.js", "../../javascript/application.js", "../../javascript/polyfills/index.js", "../../javascript/polyfills/childnode-after.js", "../../javascript/polyfills/childnode-append.js", "../../javascript/polyfills/childnode-before.js", "../../javascript/polyfills/childnode-remove.js", "../../javascript/polyfills/childnode-replace-with.js", "../../javascript/polyfills/custom-event.js", "../../javascript/polyfills/element-class-list.js", "../../javascript/polyfills/element-closest.js", "../../javascript/polyfills/element-matches.js", "../../javascript/polyfills/element-toggle-attribute.js", "../../javascript/polyfills/nodelist-for-each.js", "../../javascript/polyfills/parent-node-prepend.js", "../../../node_modules/.pnpm/@sentry+browser@10.73.0/node_modules/@sentry/browser/build/npm/esm/prod/index.js", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/debug-build.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/utils/worldwide.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/utils/version.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/carrier.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/utils/debug-logger.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/utils/stacktrace.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/instrument/handlers.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/instrument/globalError.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/instrument/globalUnhandledRejection.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/utils/is.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/utils/object.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/utils/randomSafeContext.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/utils/normalizationHints.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/utils/normalize.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/utils/string.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/utils/misc.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/utils/time.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/session.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/utils/merge.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/utils/propagationContext.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/utils/weakRef.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/utils/spanOnScope.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/scope.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/defaultScopes.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/utils/chain-and-copy-promiselike.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/asyncContext/stackStrategy.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/asyncContext/index.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/attributes.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/currentScopes.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/semanticAttributes.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/tracing/spanstatus.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/tracing/utils.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/utils/baggage.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/utils/dsn.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/utils/parseSampleRate.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/utils/tracing.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/utils/spanUtils.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/tracing/errors.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/utils/hasSpansEnabled.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/utils/should-ignore-span.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/tracing/sentryNonRecordingSpan.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/constants.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/tracing/dynamicSamplingContext.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/tracing/spans/beforeSendSpan.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/utils/envelope.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/envelope.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/tracing/logSpans.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/tracing/measurement.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/tracing/segmentSpanCaptureStrategy.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/tracing/spans/hasSpanStreamingEnabled.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/tracing/sentrySpan.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/utils/handleCallbackErrors.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/tracing/sampling.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/tracing/trace.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/tracing/idleSpan.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/utils/debounce.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/tracing/bindScopeToEmitter.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/utils/scopeData.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/tracing/spans/scopeContextAttributes.ts", "../../../node_modules/.pnpm/@sentry+conventions@0.16.0/node_modules/@sentry/conventions/src/attributes.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/tracing/spans/captureSpan.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/utils/syncpromise.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/eventProcessors.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/utils/debug-ids.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/utils/prepareEvent.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/exports.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/utils/timer.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/api.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/integration.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/utils/timestampSequence.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/utils/trace-info.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/logs/constants.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/utils/env.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/utils/node.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/utils/isBrowser.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/logs/envelope.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/logs/internal.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/metrics/envelope.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/metrics/internal.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/tracing/spans/spanJsonToStreamedSpan.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/tracing/spans/extractGenAiSpans.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/utils/promisebuffer.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/utils/ratelimit.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/transports/base.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/utils/clientreport.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/utils/eventUtils.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/utils/transactionEvent.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/utils/data-collection/filtering-snippets.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/utils/data-collection/defaultPiiToCollectionOptions.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/utils/data-collection/resolveDataCollectionOptions.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/client.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/sdk.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/transports/offline.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/transports/multiplexed.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/utils/data-collection/filterKeyValueData.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/utils/cookie.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/utils/data-collection/filterCookies.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/utils/url.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/utils/isSentryRequestUrl.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/utils/parameterize.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/utils/ipAddress.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/utils/sdkMetadata.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/utils/traceData.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/breadcrumbs.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/integrations/functiontostring.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/integrations/eventFilters.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/utils/aggregate-errors.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/utils/eventbuilder.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/metadata.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/integrations/moduleMetadata.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/instrument/console.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/utils/severity.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/integrations/captureconsole.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/integrations/dedupe.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/integrations/extraerrordata.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/utils/path.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/integrations/rewriteframes.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/integrations/supabase.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/integrations/zoderrors.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/integrations/third-party-errors-filter.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/utils/featureFlags.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/integrations/featureFlags/featureFlagsIntegration.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/integrations/featureFlags/growthbook.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/integrations/conversationId.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/fetch.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/feedback.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/logs/public-api.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/logs/utils.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/logs/console-integration.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/metrics/public-api.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/integrations/consola.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/tracing/ai/gen-ai-attributes.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/tracing/ai/mediaStripping.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/tracing/ai/messageTruncation.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/tracing/ai/utils.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/tracing/openai/constants.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/tracing/openai/utils.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/tracing/openai/streaming.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/tracing/openai/index.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/tracing/anthropic-ai/constants.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/tracing/anthropic-ai/utils.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/tracing/anthropic-ai/streaming.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/tracing/anthropic-ai/index.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/tracing/google-genai/constants.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/tracing/google-genai/streaming.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/tracing/google-genai/utils.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/tracing/google-genai/index.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/tracing/langchain/constants.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/tracing/langchain/utils.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/tracing/langchain/index.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/tracing/langchain/embeddings.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/tracing/langgraph/constants.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/tracing/langgraph/utils.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/tracing/langgraph/index.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/tracing/spans/envelope.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/tracing/spans/estimateSize.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/tracing/spans/spanBuffer.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/utils/breadcrumb-log-level.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/utils/supports.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/instrument/fetch.ts", "../../../node_modules/.pnpm/@sentry+core@10.73.0/node_modules/@sentry/core/src/utils/browser.ts", "../../../node_modules/.pnpm/@sentry+feedback@10.73.0/node_modules/@sentry/feedback/src/constants/index.ts", "../../../node_modules/.pnpm/@sentry+feedback@10.73.0/node_modules/@sentry/feedback/src/util/createFeedbackError.ts", "../../../node_modules/.pnpm/@sentry+feedback@10.73.0/node_modules/@sentry/feedback/src/core/sendFeedback.ts", "../../../node_modules/.pnpm/@sentry+feedback@10.73.0/node_modules/@sentry/feedback/src/util/debug-build.ts", "../../../node_modules/.pnpm/@sentry+feedback@10.73.0/node_modules/@sentry/feedback/src/util/isScreenshotSupported.ts", "../../../node_modules/.pnpm/@sentry+feedback@10.73.0/node_modules/@sentry/feedback/src/util/mergeOptions.ts", "../../../node_modules/.pnpm/@sentry+feedback@10.73.0/node_modules/@sentry/feedback/src/core/components/Actor.css.ts", "../../../node_modules/.pnpm/@sentry+feedback@10.73.0/node_modules/@sentry/feedback/src/util/setAttributesNS.ts", "../../../node_modules/.pnpm/@sentry+feedback@10.73.0/node_modules/@sentry/feedback/src/core/components/FeedbackIcon.ts", "../../../node_modules/.pnpm/@sentry+feedback@10.73.0/node_modules/@sentry/feedback/src/core/components/Actor.ts", "../../../node_modules/.pnpm/@sentry+feedback@10.73.0/node_modules/@sentry/feedback/src/core/createMainStyles.ts", "../../../node_modules/.pnpm/@sentry+feedback@10.73.0/node_modules/@sentry/feedback/src/core/integration.ts", "../../../node_modules/.pnpm/@sentry+feedback@10.73.0/node_modules/@sentry/feedback/src/core/getFeedback.ts", "../../../node_modules/.pnpm/@sentry+feedback@10.73.0/node_modules/node_modules/preact/dist/preact.mjs", "../../../node_modules/.pnpm/@sentry+feedback@10.73.0/node_modules/node_modules/preact/hooks/dist/hooks.mjs", "../../../node_modules/.pnpm/@sentry+feedback@10.73.0/node_modules/@sentry/feedback/src/modal/components/SentryLogo.ts", "../../../node_modules/.pnpm/@sentry+feedback@10.73.0/node_modules/@sentry/feedback/src/modal/components/DialogHeader.tsx", "../../../node_modules/.pnpm/@sentry+feedback@10.73.0/node_modules/@sentry/feedback/src/util/validate.ts", "../../../node_modules/.pnpm/@sentry+feedback@10.73.0/node_modules/@sentry/feedback/src/modal/components/Form.tsx", "../../../node_modules/.pnpm/@sentry+feedback@10.73.0/node_modules/@sentry/feedback/src/modal/components/SuccessIcon.ts", "../../../node_modules/.pnpm/@sentry+feedback@10.73.0/node_modules/@sentry/feedback/src/modal/components/Dialog.tsx", "../../../node_modules/.pnpm/@sentry+feedback@10.73.0/node_modules/@sentry/feedback/src/modal/components/Dialog.css.ts", "../../../node_modules/.pnpm/@sentry+feedback@10.73.0/node_modules/@sentry/feedback/src/modal/integration.tsx", "../../../node_modules/.pnpm/@sentry+feedback@10.73.0/node_modules/@sentry/feedback/src/screenshot/components/IconClose.tsx", "../../../node_modules/.pnpm/@sentry+feedback@10.73.0/node_modules/@sentry/feedback/src/screenshot/components/ScreenshotInput.css.ts", "../../../node_modules/.pnpm/@sentry+feedback@10.73.0/node_modules/@sentry/feedback/src/screenshot/components/Toolbar.tsx", "../../../node_modules/.pnpm/@sentry+feedback@10.73.0/node_modules/@sentry/feedback/src/screenshot/components/useTakeScreenshot.tsx", "../../../node_modules/.pnpm/@sentry+feedback@10.73.0/node_modules/@sentry/feedback/src/screenshot/components/ScreenshotEditor.tsx", "../../../node_modules/.pnpm/@sentry+feedback@10.73.0/node_modules/@sentry/feedback/src/screenshot/integration.ts", "../../../node_modules/.pnpm/@sentry+browser@10.73.0/node_modules/@sentry/browser/src/helpers.ts", "../../../node_modules/.pnpm/@sentry+browser@10.73.0/node_modules/@sentry/browser/src/utils/lazyLoadIntegration.ts", "../../../node_modules/.pnpm/@sentry+browser@10.73.0/node_modules/@sentry/browser/src/feedbackAsync.ts", "../../../node_modules/.pnpm/@sentry+browser@10.73.0/node_modules/@sentry/browser/src/feedbackSync.ts", "../../../node_modules/.pnpm/@sentry+browser@10.73.0/node_modules/@sentry/browser/src/eventbuilder.ts", "../../../node_modules/.pnpm/@sentry+browser@10.73.0/node_modules/@sentry/browser/src/client.ts", "../../../node_modules/.pnpm/@sentry+browser-utils@10.73.0/node_modules/@sentry/browser-utils/src/debug-build.ts", "../../../node_modules/.pnpm/@sentry+browser-utils@10.73.0/node_modules/@sentry/browser-utils/src/types.ts", "../../../node_modules/.pnpm/@sentry+browser-utils@10.73.0/node_modules/@sentry/browser-utils/src/metrics/web-vitals/lib/bindReporter.ts", "../../../node_modules/.pnpm/@sentry+browser-utils@10.73.0/node_modules/@sentry/browser-utils/src/metrics/web-vitals/lib/getNavigationEntry.ts", "../../../node_modules/.pnpm/@sentry+browser-utils@10.73.0/node_modules/@sentry/browser-utils/src/metrics/web-vitals/lib/getActivationStart.ts", "../../../node_modules/.pnpm/@sentry+browser-utils@10.73.0/node_modules/@sentry/browser-utils/src/metrics/web-vitals/lib/globalListeners.ts", "../../../node_modules/.pnpm/@sentry+browser-utils@10.73.0/node_modules/@sentry/browser-utils/src/metrics/web-vitals/lib/getVisibilityWatcher.ts", "../../../node_modules/.pnpm/@sentry+browser-utils@10.73.0/node_modules/@sentry/browser-utils/src/metrics/web-vitals/lib/generateUniqueID.ts", "../../../node_modules/.pnpm/@sentry+browser-utils@10.73.0/node_modules/@sentry/browser-utils/src/metrics/web-vitals/lib/initMetric.ts", "../../../node_modules/.pnpm/@sentry+browser-utils@10.73.0/node_modules/@sentry/browser-utils/src/metrics/web-vitals/lib/initUnique.ts", "../../../node_modules/.pnpm/@sentry+browser-utils@10.73.0/node_modules/@sentry/browser-utils/src/metrics/web-vitals/lib/LayoutShiftManager.ts", "../../../node_modules/.pnpm/@sentry+browser-utils@10.73.0/node_modules/@sentry/browser-utils/src/metrics/web-vitals/lib/observe.ts", "../../../node_modules/.pnpm/@sentry+browser-utils@10.73.0/node_modules/@sentry/browser-utils/src/metrics/web-vitals/lib/runOnce.ts", "../../../node_modules/.pnpm/@sentry+browser-utils@10.73.0/node_modules/@sentry/browser-utils/src/metrics/web-vitals/lib/whenActivated.ts", "../../../node_modules/.pnpm/@sentry+browser-utils@10.73.0/node_modules/@sentry/browser-utils/src/metrics/web-vitals/onFCP.ts", "../../../node_modules/.pnpm/@sentry+browser-utils@10.73.0/node_modules/@sentry/browser-utils/src/metrics/web-vitals/getCLS.ts", "../../../node_modules/.pnpm/@sentry+browser-utils@10.73.0/node_modules/@sentry/browser-utils/src/metrics/web-vitals/lib/polyfills/interactionCountPolyfill.ts", "../../../node_modules/.pnpm/@sentry+browser-utils@10.73.0/node_modules/@sentry/browser-utils/src/metrics/web-vitals/lib/InteractionManager.ts", "../../../node_modules/.pnpm/@sentry+browser-utils@10.73.0/node_modules/@sentry/browser-utils/src/metrics/web-vitals/lib/whenIdleOrHidden.ts", "../../../node_modules/.pnpm/@sentry+browser-utils@10.73.0/node_modules/@sentry/browser-utils/src/metrics/web-vitals/getINP.ts", "../../../node_modules/.pnpm/@sentry+browser-utils@10.73.0/node_modules/@sentry/browser-utils/src/metrics/web-vitals/lib/LCPEntryManager.ts", "../../../node_modules/.pnpm/@sentry+browser-utils@10.73.0/node_modules/@sentry/browser-utils/src/metrics/web-vitals/getLCP.ts", "../../../node_modules/.pnpm/@sentry+browser-utils@10.73.0/node_modules/@sentry/browser-utils/src/metrics/web-vitals/onTTFB.ts", "../../../node_modules/.pnpm/@sentry+browser-utils@10.73.0/node_modules/@sentry/browser-utils/src/metrics/instrument.ts", "../../../node_modules/.pnpm/@sentry+browser-utils@10.73.0/node_modules/@sentry/browser-utils/src/htmlTreeAsString.ts", "../../../node_modules/.pnpm/@sentry+browser-utils@10.73.0/node_modules/@sentry/browser-utils/src/metrics/web-vitals/lib/onHidden.ts", "../../../node_modules/.pnpm/@sentry+browser-utils@10.73.0/node_modules/@sentry/browser-utils/src/metrics/utils.ts", "../../../node_modules/.pnpm/@sentry+browser-utils@10.73.0/node_modules/@sentry/browser-utils/src/metrics/cls.ts", "../../../node_modules/.pnpm/@sentry+browser-utils@10.73.0/node_modules/@sentry/browser-utils/src/metrics/lcp.ts", "../../../node_modules/.pnpm/@sentry+browser-utils@10.73.0/node_modules/@sentry/browser-utils/src/metrics/resourceTiming.ts", "../../../node_modules/.pnpm/@sentry+browser-utils@10.73.0/node_modules/@sentry/browser-utils/src/metrics/browserMetrics.ts", "../../../node_modules/.pnpm/@sentry+browser-utils@10.73.0/node_modules/@sentry/browser-utils/src/metrics/elementTiming.ts", "../../../node_modules/.pnpm/@sentry+browser-utils@10.73.0/node_modules/@sentry/browser-utils/src/metrics/inp.ts", "../../../node_modules/.pnpm/@sentry+browser-utils@10.73.0/node_modules/@sentry/browser-utils/src/metrics/webVitalSpans.ts", "../../../node_modules/.pnpm/@sentry+browser-utils@10.73.0/node_modules/@sentry/browser-utils/src/instrument/dom.ts", "../../../node_modules/.pnpm/@sentry+browser-utils@10.73.0/node_modules/@sentry/browser-utils/src/instrument/history.ts", "../../../node_modules/.pnpm/@sentry+browser-utils@10.73.0/node_modules/@sentry/browser-utils/src/getNativeImplementation.ts", "../../../node_modules/.pnpm/@sentry+browser-utils@10.73.0/node_modules/@sentry/browser-utils/src/instrument/xhr.ts", "../../../node_modules/.pnpm/@sentry+browser-utils@10.73.0/node_modules/@sentry/browser-utils/src/networkUtils.ts", "../../../node_modules/.pnpm/@sentry+browser-utils@10.73.0/node_modules/@sentry/browser-utils/src/is.ts", "../../../node_modules/.pnpm/@sentry+browser-utils@10.73.0/node_modules/@sentry/browser-utils/src/instrument/location.ts", "../../../node_modules/.pnpm/@sentry+browser@10.73.0/node_modules/@sentry/browser/src/transports/fetch.ts", "../../../node_modules/.pnpm/@sentry+browser@10.73.0/node_modules/@sentry/browser/src/debug-build.ts", "../../../node_modules/.pnpm/@sentry+browser@10.73.0/node_modules/@sentry/browser/src/profiling/index.ts", "../../../node_modules/.pnpm/@sentry+browser@10.73.0/node_modules/@sentry/browser/src/stack-parsers.ts", "../../../node_modules/.pnpm/@sentry+browser@10.73.0/node_modules/@sentry/browser/src/userfeedback.ts", "../../../node_modules/.pnpm/@sentry+browser@10.73.0/node_modules/@sentry/browser/src/integrations/breadcrumbs.ts", "../../../node_modules/.pnpm/@sentry+browser@10.73.0/node_modules/@sentry/browser/src/integrations/browserapierrors.ts", "../../../node_modules/.pnpm/@sentry+browser@10.73.0/node_modules/@sentry/browser/src/integrations/browsersession.ts", "../../../node_modules/.pnpm/@sentry+browser@10.73.0/node_modules/@sentry/browser/src/integrations/culturecontext.ts", "../../../node_modules/.pnpm/@sentry+browser@10.73.0/node_modules/@sentry/browser/src/integrations/globalhandlers.ts", "../../../node_modules/.pnpm/@sentry+browser@10.73.0/node_modules/@sentry/browser/src/integrations/httpcontext.ts", "../../../node_modules/.pnpm/@sentry+browser@10.73.0/node_modules/@sentry/browser/src/integrations/linkederrors.ts", "../../../node_modules/.pnpm/@sentry+browser@10.73.0/node_modules/@sentry/browser/src/normalizeStringifyValue.ts", "../../../node_modules/.pnpm/@sentry+browser@10.73.0/node_modules/@sentry/browser/src/utils/detectBrowserExtension.ts", "../../../node_modules/.pnpm/@sentry+browser@10.73.0/node_modules/@sentry/browser/src/sdk.ts", "../../../node_modules/.pnpm/@sentry+browser@10.73.0/node_modules/@sentry/browser/src/report-dialog.ts", "../../../node_modules/.pnpm/@sentry+browser@10.73.0/node_modules/@sentry/browser/src/integrations/reportingobserver.ts", "../../../node_modules/.pnpm/@sentry+browser@10.73.0/node_modules/@sentry/browser/src/integrations/httpclient.ts", "../../../node_modules/.pnpm/@sentry+browser@10.73.0/node_modules/@sentry/browser/src/integrations/contextlines.ts", "../../../node_modules/.pnpm/@sentry+browser@10.73.0/node_modules/@sentry/browser/src/integrations/graphqlClient.ts", "../../../node_modules/.pnpm/@sentry+browser@10.73.0/node_modules/@sentry/browser/src/integrations/view-hierarchy.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay/src/constants.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/node_modules/@sentry/rrweb/dist/canvas-manager-B7mHazUr.js", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/node_modules/@sentry/rrweb/dist/rrweb.js", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay/src/types/rrweb.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay/src/util/timestamp.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay/src/coreHandlers/util/addBreadcrumbEvent.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay/src/coreHandlers/util/domUtils.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay/src/coreHandlers/util/onWindowOpen.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay/src/coreHandlers/handleClick.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay/src/util/createBreadcrumb.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/node_modules/@sentry/rrweb-snapshot/dist/rrweb-snapshot.js", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay/src/coreHandlers/util/getAttributesToRecord.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay/src/coreHandlers/handleDom.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay/src/coreHandlers/handleKeyboardEvent.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay/src/util/createPerformanceEntries.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay/src/coreHandlers/performanceObserver.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay/src/debug-build.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay-worker/build/esm/worker.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay-worker/build/esm/index.js", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay/src/util/logger.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay/src/eventBuffer/error.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay/src/eventBuffer/EventBufferArray.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay/src/eventBuffer/WorkerHandler.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay/src/eventBuffer/EventBufferCompressionWorker.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay/src/eventBuffer/EventBufferProxy.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay/src/eventBuffer/index.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay/src/util/hasSessionStorage.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay/src/session/clearSession.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay/src/util/isSampled.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay/src/session/saveSession.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay/src/session/Session.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay/src/session/createSession.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay/src/session/fetchSession.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay/src/util/isExpired.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay/src/util/isSessionExpired.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay/src/session/shouldRefreshSession.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay/src/session/loadOrCreateSession.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay/src/util/addEvent.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay/src/coreHandlers/util/addSegmentDetailsToContext.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay/src/coreHandlers/handleProcessSegmentSpan.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay/src/util/eventUtils.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay/src/coreHandlers/handleAfterSendEvent.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay/src/coreHandlers/handleBeforeSendEvent.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay/src/coreHandlers/handleBreadcrumbs.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay/src/util/isRrwebError.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay/src/util/resetReplayIdOnDynamicSamplingContext.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay/src/coreHandlers/util/addFeedbackBreadcrumb.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay/src/coreHandlers/util/shouldSampleForBufferEvent.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay/src/coreHandlers/handleGlobalEvent.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay/src/util/createPerformanceSpans.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay/src/coreHandlers/handleHistory.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay/src/util/shouldFilterRequest.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay/src/coreHandlers/util/addNetworkBreadcrumb.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay/src/coreHandlers/util/networkUtils.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay/src/coreHandlers/util/fetchUtils.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay/src/coreHandlers/util/xhrUtils.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay/src/coreHandlers/handleNetworkBreadcrumbs.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay/src/util/addGlobalListeners.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay/src/util/addMemoryEntry.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay/src/util/debounce.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay/src/util/getRecordingSamplingOptions.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay/src/util/handleRecordingEmit.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay/src/util/rrweb.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay/src/util/createReplayEnvelope.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay/src/util/prepareRecordingData.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay/src/util/prepareReplayEvent.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay/src/util/sendReplayRequest.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay/src/util/sendReplay.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay/src/util/throttle.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay/src/replay.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay/src/util/getPrivacyOptions.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay/src/util/maskAttribute.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay/src/integration.ts", "../../../node_modules/.pnpm/@sentry+replay@10.73.0/node_modules/@sentry/replay/src/util/getReplay.ts", "../../../node_modules/.pnpm/@sentry+replay-canvas@10.73.0/node_modules/node_modules/@sentry/rrweb/dist/canvas-manager-B7mHazUr.js", "../../../node_modules/.pnpm/@sentry+replay-canvas@10.73.0/node_modules/node_modules/@sentry/rrweb/dist/rrweb.js", "../../../node_modules/.pnpm/@sentry+replay-canvas@10.73.0/node_modules/@sentry/replay-canvas/src/canvas.ts", "../../../node_modules/.pnpm/@sentry+browser@10.73.0/node_modules/@sentry/browser/src/tracing/utils.ts", "../../../node_modules/.pnpm/@sentry+browser@10.73.0/node_modules/@sentry/browser/src/tracing/request.ts", "../../../node_modules/.pnpm/@sentry+browser@10.73.0/node_modules/@sentry/browser/src/integrations/fetchStreamPerformance.ts", "../../../node_modules/.pnpm/@sentry+browser@10.73.0/node_modules/@sentry/browser/src/integrations/webVitals.ts", "../../../node_modules/.pnpm/@sentry+browser@10.73.0/node_modules/@sentry/browser/src/tracing/backgroundtab.ts", "../../../node_modules/.pnpm/@sentry+browser@10.73.0/node_modules/@sentry/browser/src/tracing/linkedTraces.ts", "../../../node_modules/.pnpm/@sentry+browser@10.73.0/node_modules/@sentry/browser/src/tracing/browserTracingIntegration.ts", "../../../node_modules/.pnpm/@sentry+browser@10.73.0/node_modules/@sentry/browser/src/tracing/reportPageLoaded.ts", "../../../node_modules/.pnpm/@sentry+browser@10.73.0/node_modules/@sentry/browser/src/tracing/setActiveSpan.ts", "../../../node_modules/.pnpm/@sentry+browser@10.73.0/node_modules/@sentry/browser/src/integrations/spanstreaming.ts", "../../../node_modules/.pnpm/@sentry+browser@10.73.0/node_modules/@sentry/browser/src/transports/offline.ts", "../../../node_modules/.pnpm/@sentry+browser@10.73.0/node_modules/@sentry/browser/src/profiling/utils.ts", "../../../node_modules/.pnpm/@sentry+browser@10.73.0/node_modules/@sentry/browser/src/profiling/startProfileForSpan.ts", "../../../node_modules/.pnpm/@sentry+browser@10.73.0/node_modules/@sentry/browser/src/profiling/UIProfiler.ts", "../../../node_modules/.pnpm/@sentry+browser@10.73.0/node_modules/@sentry/browser/src/profiling/integration.ts", "../../../node_modules/.pnpm/@sentry+browser@10.73.0/node_modules/@sentry/browser/src/integrations/spotlight.ts", "../../../node_modules/.pnpm/@sentry+browser@10.73.0/node_modules/@sentry/browser/src/integrations/featureFlags/launchdarkly/integration.ts", "../../../node_modules/.pnpm/@sentry+browser@10.73.0/node_modules/@sentry/browser/src/integrations/featureFlags/openfeature/integration.ts", "../../../node_modules/.pnpm/@sentry+browser@10.73.0/node_modules/@sentry/browser/src/integrations/featureFlags/unleash/integration.ts", "../../../node_modules/.pnpm/@sentry+browser@10.73.0/node_modules/@sentry/browser/src/integrations/featureFlags/growthbook/integration.ts", "../../../node_modules/.pnpm/@sentry+browser@10.73.0/node_modules/@sentry/browser/src/integrations/featureFlags/statsig/integration.ts", "../../../node_modules/.pnpm/@sentry+browser@10.73.0/node_modules/@sentry/browser/src/diagnose-sdk.ts", "../../../node_modules/.pnpm/@sentry+browser@10.73.0/node_modules/@sentry/browser/src/integrations/webWorker.ts", "../../javascript/config/sentry.js", "../../javascript/helpers/app.js", "../../javascript/helpers/logger.js", "../../javascript/helpers/identifier-builder.js", "../../javascript/helpers/local-store.js", "../../../node_modules/.pnpm/animejs@4.5.0/node_modules/animejs/dist/modules/core/consts.js", "../../../node_modules/.pnpm/animejs@4.5.0/node_modules/animejs/dist/modules/core/globals.js", "../../../node_modules/.pnpm/animejs@4.5.0/node_modules/animejs/dist/modules/core/helpers.js", "../../../node_modules/.pnpm/animejs@4.5.0/node_modules/animejs/dist/modules/core/transforms.js", "../../../node_modules/.pnpm/animejs@4.5.0/node_modules/animejs/dist/modules/adapters/registry.js", "../../../node_modules/.pnpm/animejs@4.5.0/node_modules/animejs/dist/modules/core/colors.js", "../../../node_modules/.pnpm/animejs@4.5.0/node_modules/animejs/dist/modules/core/values.js", "../../../node_modules/.pnpm/animejs@4.5.0/node_modules/animejs/dist/modules/core/render.js", "../../../node_modules/.pnpm/animejs@4.5.0/node_modules/animejs/dist/modules/core/styles.js", "../../../node_modules/.pnpm/animejs@4.5.0/node_modules/animejs/dist/modules/core/clock.js", "../../../node_modules/.pnpm/animejs@4.5.0/node_modules/animejs/dist/modules/animation/additive.js", "../../../node_modules/.pnpm/animejs@4.5.0/node_modules/animejs/dist/modules/engine/engine.js", "../../../node_modules/.pnpm/animejs@4.5.0/node_modules/animejs/dist/modules/animation/composition.js", "../../../node_modules/.pnpm/animejs@4.5.0/node_modules/animejs/dist/modules/timer/timer.js", "../../../node_modules/.pnpm/animejs@4.5.0/node_modules/animejs/dist/modules/core/targets.js", "../../../node_modules/.pnpm/animejs@4.5.0/node_modules/animejs/dist/modules/core/units.js", "../../../node_modules/.pnpm/animejs@4.5.0/node_modules/animejs/dist/modules/easings/none.js", "../../../node_modules/.pnpm/animejs@4.5.0/node_modules/animejs/dist/modules/easings/eases/parser.js", "../../../node_modules/.pnpm/animejs@4.5.0/node_modules/animejs/dist/modules/animation/animation.js", "../../../node_modules/.pnpm/uuid@14.0.2/node_modules/uuid/dist/stringify.js", "../../../node_modules/.pnpm/uuid@14.0.2/node_modules/uuid/dist/rng.js", "../../../node_modules/.pnpm/uuid@14.0.2/node_modules/uuid/dist/v4.js", "../../javascript/helpers/animate.js", "../../javascript/controllers/components/ir_dialog/helper.js", "../../javascript/helpers/da-globals.js", "../../../node_modules/.pnpm/@rails+actiontext@8.1.301_trix@2.1.19/node_modules/@rails/actiontext/app/assets/javascripts/actiontext.esm.js", "../../../node_modules/.pnpm/@rails+ujs@7.1.600/node_modules/@rails/ujs/app/assets/javascripts/rails-ujs.esm.js", "../../../node_modules/.pnpm/@hotwired+turbo@8.0.23/node_modules/@hotwired/turbo/dist/turbo.es2017-esm.js", "../../../node_modules/.pnpm/@hotwired+turbo-rails@8.0.23/node_modules/@hotwired/turbo-rails/app/javascript/turbo/cable.js", "../../../node_modules/.pnpm/@hotwired+turbo-rails@8.0.23/node_modules/@hotwired/turbo-rails/app/javascript/turbo/snakeize.js", "../../../node_modules/.pnpm/@hotwired+turbo-rails@8.0.23/node_modules/@hotwired/turbo-rails/app/javascript/turbo/cable_stream_source_element.js", "../../../node_modules/.pnpm/@hotwired+turbo-rails@8.0.23/node_modules/@hotwired/turbo-rails/app/javascript/turbo/fetch_requests.js", "../../../node_modules/.pnpm/@hotwired+turbo-rails@8.0.23/node_modules/@hotwired/turbo-rails/app/javascript/turbo/index.js", "../../javascript/support/turbo-stream-actions.js", "../../../node_modules/.pnpm/@hotwired+stimulus@3.2.2/node_modules/@hotwired/stimulus/dist/stimulus.js", "../../javascript/controllers/application.js", "../../javascript/controllers/admin/introductions_form_controller.js", "../../javascript/helpers/form.js", "../../javascript/controllers/admin/payment_request_form_controller.js", "../../javascript/controllers/aurora/auto_submit_initiation_form_controller.js", "../../../node_modules/.pnpm/@rails+request.js@0.0.13/node_modules/@rails/request.js/src/index.js", "../../../node_modules/.pnpm/@rails+request.js@0.0.13/node_modules/@rails/request.js/src/fetch_response.js", "../../../node_modules/.pnpm/@rails+request.js@0.0.13/node_modules/@rails/request.js/src/request_interceptor.js", "../../../node_modules/.pnpm/@rails+request.js@0.0.13/node_modules/@rails/request.js/src/lib/utils.js", "../../../node_modules/.pnpm/@rails+request.js@0.0.13/node_modules/@rails/request.js/src/fetch_request.js", "../../../node_modules/.pnpm/@rails+request.js@0.0.13/node_modules/@rails/request.js/src/verbs.js", "../../javascript/controllers/auto_complete_checkbox_controller.js", "../../javascript/controllers/auto_form_submit_controller.js", "../../javascript/controllers/auto_search_controller.js", "../../javascript/controllers/bx/block_size_controller.js", "../../javascript/controllers/bx/building_class_controller.js", "../../javascript/controllers/bx/building_height_controller.js", "../../javascript/controllers/bx/excess_loads_controller.js", "../../javascript/controllers/bx/layout_editor/azimuth_management_controller.js", "../../javascript/helpers/geometry.js", "../../javascript/controllers/bx/layout_editor/guide_lines_form_controller.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/console.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/extent/Relationship.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/extent.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/math.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/coordinate.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/proj/Units.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/proj/Projection.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/proj/epsg3857.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/proj/epsg4326.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/proj/projections.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/obj.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/proj/transforms.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/proj/utm.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/sphere.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/proj.js", "../../../node_modules/.pnpm/mobx@7.0.3/node_modules/mobx/src/errors.ts", "../../../node_modules/.pnpm/mobx@7.0.3/node_modules/mobx/src/utils/utils.ts", "../../../node_modules/.pnpm/mobx@7.0.3/node_modules/mobx/src/api/decorators.ts", "../../../node_modules/.pnpm/mobx@7.0.3/node_modules/mobx/src/core/atom.ts", "../../../node_modules/.pnpm/mobx@7.0.3/node_modules/mobx/src/utils/comparer.ts", "../../../node_modules/.pnpm/mobx@7.0.3/node_modules/mobx/src/types/modifiers.ts", "../../../node_modules/.pnpm/mobx@7.0.3/node_modules/mobx/src/types/overrideannotation.ts", "../../../node_modules/.pnpm/mobx@7.0.3/node_modules/mobx/src/types/actionannotation.ts", "../../../node_modules/.pnpm/mobx@7.0.3/node_modules/mobx/src/types/flowannotation.ts", "../../../node_modules/.pnpm/mobx@7.0.3/node_modules/mobx/src/types/computedannotation.ts", "../../../node_modules/.pnpm/mobx@7.0.3/node_modules/mobx/src/types/observableannotation.ts", "../../../node_modules/.pnpm/mobx@7.0.3/node_modules/mobx/src/types/autoannotation.ts", "../../../node_modules/.pnpm/mobx@7.0.3/node_modules/mobx/src/api/decoratorannotation.ts", "../../../node_modules/.pnpm/mobx@7.0.3/node_modules/mobx/src/api/observable.ts", "../../../node_modules/.pnpm/mobx@7.0.3/node_modules/mobx/src/api/computed.ts", "../../../node_modules/.pnpm/mobx@7.0.3/node_modules/mobx/src/core/action.ts", "../../../node_modules/.pnpm/mobx@7.0.3/node_modules/mobx/src/types/observablevalue.ts", "../../../node_modules/.pnpm/mobx@7.0.3/node_modules/mobx/src/core/computedvalue.ts", "../../../node_modules/.pnpm/mobx@7.0.3/node_modules/mobx/src/core/derivation.ts", "../../../node_modules/.pnpm/mobx@7.0.3/node_modules/mobx/src/core/globalstate.ts", "../../../node_modules/.pnpm/mobx@7.0.3/node_modules/mobx/src/core/observable.ts", "../../../node_modules/.pnpm/mobx@7.0.3/node_modules/mobx/src/core/reaction.ts", "../../../node_modules/.pnpm/mobx@7.0.3/node_modules/mobx/src/core/spy.ts", "../../../node_modules/.pnpm/mobx@7.0.3/node_modules/mobx/src/api/action.ts", "../../../node_modules/.pnpm/mobx@7.0.3/node_modules/mobx/src/api/autorun.ts", "../../../node_modules/.pnpm/mobx@7.0.3/node_modules/mobx/src/api/become-observed.ts", "../../../node_modules/.pnpm/mobx@7.0.3/node_modules/mobx/src/api/configure.ts", "../../../node_modules/.pnpm/mobx@7.0.3/node_modules/mobx/src/api/extendobservable.ts", "../../../node_modules/.pnpm/mobx@7.0.3/node_modules/mobx/src/api/extras.ts", "../../../node_modules/.pnpm/mobx@7.0.3/node_modules/mobx/src/api/flow.ts", "../../../node_modules/.pnpm/mobx@7.0.3/node_modules/mobx/src/api/intercept-read.ts", "../../../node_modules/.pnpm/mobx@7.0.3/node_modules/mobx/src/api/intercept.ts", "../../../node_modules/.pnpm/mobx@7.0.3/node_modules/mobx/src/api/iscomputed.ts", "../../../node_modules/.pnpm/mobx@7.0.3/node_modules/mobx/src/api/isobservable.ts", "../../../node_modules/.pnpm/mobx@7.0.3/node_modules/mobx/src/api/object-api.ts", "../../../node_modules/.pnpm/mobx@7.0.3/node_modules/mobx/src/api/observe.ts", "../../../node_modules/.pnpm/mobx@7.0.3/node_modules/mobx/src/api/tojs.ts", "../../../node_modules/.pnpm/mobx@7.0.3/node_modules/mobx/src/api/transaction.ts", "../../../node_modules/.pnpm/mobx@7.0.3/node_modules/mobx/src/api/when.ts", "../../../node_modules/.pnpm/mobx@7.0.3/node_modules/mobx/src/types/dynamicobject.ts", "../../../node_modules/.pnpm/mobx@7.0.3/node_modules/mobx/src/types/intercept-utils.ts", "../../../node_modules/.pnpm/mobx@7.0.3/node_modules/mobx/src/types/listen-utils.ts", "../../../node_modules/.pnpm/mobx@7.0.3/node_modules/mobx/src/api/makeObservable.ts", "../../../node_modules/.pnpm/mobx@7.0.3/node_modules/mobx/src/types/observablearray.ts", "../../../node_modules/.pnpm/mobx@7.0.3/node_modules/mobx/src/types/observablemap.ts", "../../../node_modules/.pnpm/mobx@7.0.3/node_modules/mobx/src/types/observableset.ts", "../../../node_modules/.pnpm/mobx@7.0.3/node_modules/mobx/src/types/observableobject.ts", "../../../node_modules/.pnpm/mobx@7.0.3/node_modules/mobx/src/types/type-utils.ts", "../../../node_modules/.pnpm/mobx@7.0.3/node_modules/mobx/src/utils/eq.ts", "../../../node_modules/.pnpm/mobx@7.0.3/node_modules/mobx/src/utils/iterable.ts", "../../../node_modules/.pnpm/mobx@7.0.3/node_modules/mobx/src/api/annotation.ts", "../../../node_modules/.pnpm/mobx@7.0.3/node_modules/mobx/src/mobx.ts", "../../../node_modules/.pnpm/mobx-state-tree@8.0.0_mobx@7.0.3/node_modules/mobx-state-tree/dist/mobx-state-tree.module.js", "../../javascript/da/layout-editor/helpers/toolbar-btns.js", "../../javascript/da/map/undo-queue.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/array.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/util.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/ObjectEventType.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/events.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/events/EventType.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/Disposable.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/functions.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/events/Event.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/events/Target.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/Observable.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/Object.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/asserts.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/transform.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/geom/flat/transform.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/geom/Geometry.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/geom/SimpleGeometry.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/geom/flat/closest.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/geom/flat/deflate.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/geom/flat/inflate.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/geom/flat/interpolate.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/geom/flat/contains.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/geom/flat/segments.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/geom/flat/intersectsextent.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/geom/flat/length.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/geom/flat/simplify.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/geom/LineString.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/Feature.js", "../../javascript/da/map/data-types.js", "../../javascript/da/map/ol-helpers.js", "../../javascript/da/map/building-images/placement-creator.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/ImageState.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/has.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/dom.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/color.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/Image.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/style/IconImageCache.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/style/IconImage.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/colorlike.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/css.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/render/canvas.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/size.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/style/Image.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/style/RegularShape.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/style/Circle.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/style/Fill.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/style/Stroke.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/style/Style.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/CollectionEventType.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/Collection.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/featureloader.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/loadingstrategy.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/geom/MultiLineString.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/geom/Point.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/geom/MultiPoint.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/geom/flat/area.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/geom/LinearRing.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/geom/flat/interiorpoint.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/geom/flat/reverse.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/geom/flat/orient.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/geom/Polygon.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/geom/flat/center.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/geom/MultiPolygon.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/render/Feature.js", "../../../node_modules/.pnpm/quickselect@3.0.0/node_modules/quickselect/index.js", "../../../node_modules/.pnpm/rbush@4.0.1/node_modules/rbush/index.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/structs/RBush.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/source/Source.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/source/VectorEventType.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/source/Vector.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/ViewHint.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/render/EventType.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/render/VectorContext.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/render/canvas/Instruction.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/render/canvas/Builder.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/render/canvas/ImageBuilder.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/render/canvas/LineStringBuilder.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/render/canvas/PolygonBuilder.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/geom/flat/clip.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/geom/flat/linechunk.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/geom/flat/straightchunk.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/render/canvas/TextBuilder.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/render/canvas/BuilderGroup.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/geom/flat/lineoffset.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/geom/flat/textpath.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/render/canvas/ZIndexContext.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/render/canvas/Executor.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/render/canvas/ExecutorGroup.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/style/Icon.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/render/canvas/Immediate.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/render/canvas/hitdetect.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/renderer/vector.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/render/Event.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/renderer/Layer.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/renderer/canvas/Layer.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/renderer/canvas/VectorLayer.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/expr/expression.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/expr/cpu.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/style/Text.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/render/canvas/style.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/ViewProperty.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/centerconstraint.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/easing.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/resolutionconstraint.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/rotationconstraint.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/tilegrid/common.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/View.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/layer/Property.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/layer/Base.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/layer/Layer.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/layer/BaseVector.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/layer/Vector.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/MapBrowserEventType.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/interaction/Property.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/interaction/Interaction.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/interaction/Pointer.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/MapEvent.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/MapBrowserEvent.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/pointer/EventType.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/MapBrowserEventHandler.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/MapEventType.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/MapProperty.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/TileState.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/structs/PriorityQueue.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/TileQueue.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/control/Control.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/control/Attribution.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/control/Rotate.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/control/Zoom.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/control/defaults.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/Kinetic.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/interaction/DoubleClickZoom.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/events/condition.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/interaction/DragPan.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/interaction/DragRotate.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/render/Box.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/interaction/DragBox.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/interaction/DragZoom.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/events/Key.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/interaction/KeyboardPan.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/interaction/KeyboardZoom.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/interaction/MouseWheelZoom.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/interaction/PinchRotate.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/interaction/PinchZoom.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/interaction/defaults.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/layer/Group.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/renderer/Map.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/renderer/Composite.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/Map.js", "../../../node_modules/.pnpm/ol-ext@4.0.38_ol@10.10.0/node_modules/ol-ext/util/input/Base.js", "../../../node_modules/.pnpm/ol-ext@4.0.38_ol@10.10.0/node_modules/ol-ext/util/input/Checkbox.js", "../../../node_modules/.pnpm/ol-ext@4.0.38_ol@10.10.0/node_modules/ol-ext/util/input/Switch.js", "../../../node_modules/.pnpm/ol-ext@4.0.38_ol@10.10.0/node_modules/ol-ext/util/input/Radio.js", "../../../node_modules/.pnpm/ol-ext@4.0.38_ol@10.10.0/node_modules/ol-ext/util/element.js", "../../../node_modules/.pnpm/ol-ext@4.0.38_ol@10.10.0/node_modules/ol-ext/interaction/Transform.js", "../../javascript/da/map/interaction-managers/transform/building-image-placement.js", "../../javascript/da/layout-editor/helpers/toolbar-constants.js", "../../javascript/da/layout-editor/settings/index.js", "../../javascript/da/layout-editor/settings/change-applier.js", "../../javascript/controllers/da/layout_editor/map_base_controller.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/geom/Circle.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/geom/GeometryCollection.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/interaction/tracing.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/interaction/Draw.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/interaction/Modify.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/interaction/Select.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/events/SnapEvent.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/interaction/Snap.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/interaction/Translate.js", "../../javascript/helpers/api-mobx.js", "../../javascript/bx/models/cell-position-model.js", "../../javascript/da/models/with-dirty-tracking.js", "../../javascript/bx/models/layout-model.js", "../../javascript/da/map/styles/arrays.js", "../../javascript/da/map/styles/obstructions.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/Tile.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/ImageTile.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/TileRange.js", "../../javascript/da/map/styles/helpers.js", "../../javascript/da/map/styles/roof-sections.js", "../../javascript/da/map/styles/roof-planes.js", "../../javascript/da/map/edge-list.js", "../../javascript/da/map/styles/distance-markers.js", "../../javascript/da/map/styles/measures.js", "../../javascript/da/map/styles/visual-markers.js", "../../javascript/da/map/styles/shape-guide-lines.js", "../../javascript/da/map/styles/setbacks.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/format/Feature.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/format/JSONFeature.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/format/GeoJSON.js", "../../../node_modules/.pnpm/@turf+helpers@7.4.0/node_modules/@turf/helpers/index.ts", "../../../node_modules/.pnpm/@turf+meta@7.4.0/node_modules/@turf/meta/index.ts", "../../../node_modules/.pnpm/@turf+bbox@7.4.0/node_modules/@turf/bbox/index.ts", "../../../node_modules/.pnpm/@turf+center@7.4.0/node_modules/@turf/center/index.ts", "../../../node_modules/.pnpm/@turf+buffer@7.4.0/node_modules/@turf/buffer/index.ts", "../../../node_modules/.pnpm/d3-array@2.12.1/node_modules/d3-array/src/fsum.js", "../../../node_modules/.pnpm/d3-array@2.12.1/node_modules/d3-array/src/merge.js", "../../../node_modules/.pnpm/d3-geo@2.0.2/node_modules/d3-geo/src/math.js", "../../../node_modules/.pnpm/d3-geo@2.0.2/node_modules/d3-geo/src/noop.js", "../../../node_modules/.pnpm/d3-geo@2.0.2/node_modules/d3-geo/src/stream.js", "../../../node_modules/.pnpm/d3-geo@2.0.2/node_modules/d3-geo/src/cartesian.js", "../../../node_modules/.pnpm/d3-geo@2.0.2/node_modules/d3-geo/src/compose.js", "../../../node_modules/.pnpm/d3-geo@2.0.2/node_modules/d3-geo/src/rotation.js", "../../../node_modules/.pnpm/d3-geo@2.0.2/node_modules/d3-geo/src/circle.js", "../../../node_modules/.pnpm/d3-geo@2.0.2/node_modules/d3-geo/src/clip/buffer.js", "../../../node_modules/.pnpm/d3-geo@2.0.2/node_modules/d3-geo/src/pointEqual.js", "../../../node_modules/.pnpm/d3-geo@2.0.2/node_modules/d3-geo/src/clip/rejoin.js", "../../../node_modules/.pnpm/d3-geo@2.0.2/node_modules/d3-geo/src/polygonContains.js", "../../../node_modules/.pnpm/d3-geo@2.0.2/node_modules/d3-geo/src/clip/index.js", "../../../node_modules/.pnpm/d3-geo@2.0.2/node_modules/d3-geo/src/clip/antimeridian.js", "../../../node_modules/.pnpm/d3-geo@2.0.2/node_modules/d3-geo/src/clip/circle.js", "../../../node_modules/.pnpm/d3-geo@2.0.2/node_modules/d3-geo/src/clip/line.js", "../../../node_modules/.pnpm/d3-geo@2.0.2/node_modules/d3-geo/src/clip/rectangle.js", "../../../node_modules/.pnpm/d3-geo@2.0.2/node_modules/d3-geo/src/identity.js", "../../../node_modules/.pnpm/d3-geo@2.0.2/node_modules/d3-geo/src/path/bounds.js", "../../../node_modules/.pnpm/d3-geo@2.0.2/node_modules/d3-geo/src/transform.js", "../../../node_modules/.pnpm/d3-geo@2.0.2/node_modules/d3-geo/src/projection/fit.js", "../../../node_modules/.pnpm/d3-geo@2.0.2/node_modules/d3-geo/src/projection/resample.js", "../../../node_modules/.pnpm/d3-geo@2.0.2/node_modules/d3-geo/src/projection/index.js", "../../../node_modules/.pnpm/d3-geo@2.0.2/node_modules/d3-geo/src/projection/azimuthal.js", "../../../node_modules/.pnpm/d3-geo@2.0.2/node_modules/d3-geo/src/projection/azimuthalEquidistant.js", "../../javascript/da/map/buffering/clipper-buffer.js", "../../javascript/da/map/models/simple-lat-lng.js", "../../javascript/da/models/cartesian-model.js", "../../javascript/da/map/ol-geometry.js", "../../javascript/da/map/buffering/buffer-options.mjs", "../../javascript/da/map/buffering/buffer-builder.js", "../../javascript/da/map/modification-helpers/base.js", "../../javascript/helpers/point-in-polygon.js", "../../javascript/da/map/legality-checkers/polygon-helpers.js", "../../javascript/da/map/buffering/feature-expander.js", "../../javascript/da/map/legality-checkers/roof-section.js", "../../javascript/helpers/polygon-coincident.js", "../../javascript/da/map/default-roof-sections-builder.js", "../../javascript/da/map/events.js", "../../javascript/da/map/map-manager.js", "../../javascript/pr/map/styles/helpers.js", "../../javascript/pr/map/styles/guide-lines.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/DataTile.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/reproj.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/reproj/Triangulation.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/reproj/common.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/reproj/Tile.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/structs/LRUCache.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/tilecoord.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/renderer/canvas/TileLayer.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/layer/TileProperty.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/layer/BaseTile.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/layer/Tile.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/tilegrid/TileGrid.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/tilegrid.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/uri.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/tileurlfunction.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/source/Tile.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/source/TileEventType.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/source/UrlTile.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/source/TileImage.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/source/BingMaps.js", "../../../node_modules/.pnpm/ol@10.10.0/node_modules/ol/source/XYZ.js", "../../javascript/da/map/grid-tile-source.js", "../../javascript/da/map/tile-layers-factory.js", "../../javascript/da/models/lat-lng-model.js", "../../javascript/bx/map/panel-grid/bounding-box-builder.js", "../../javascript/bx/map/panel-grid/cell-positioner.js", "../../javascript/bx/map/overlap-checker.js", "../../javascript/bx/map/panel-grid/layout-builder.js", "../../javascript/bx/map/panel-grid/array-builder.js", "../../javascript/bx/map/obstructions/proximity-geometry.mjs", "../../javascript/bx/map/obstructions/proximity-detector.js", "../../javascript/bx/map/ol-helpers.js", "../../javascript/bx/map/modification-helpers/roof-section.js", "../../javascript/bx/map/default-roof-sections-builder.js", "../../javascript/pr/map/legality-checkers/setback.js", "../../javascript/bx/map/map-manager.js", "../../javascript/da/map/styles/building-image-placements.js", "../../javascript/da/map/map-model-synchronizer.js", "../../javascript/bx/map/map-model-synchronizer.js", "../../javascript/da/models/project-model.js", "../../javascript/da/models/project-site-model.js", "../../javascript/da/models/coordinate-model.js", "../../javascript/da/models/with-lat-lng-points.js", "../../javascript/da/models/points-utilities.js", "../../javascript/da/models/building-image-placement-model.js", "../../javascript/da/models/uploaded-building-image-model.js", "../../javascript/da/models/roof-section-model.js", "../../javascript/da/models/with-cartesian-points.js", "../../javascript/bx/models/roof-section-model.js", "../../javascript/da/models/roof-plane-model.js", "../../javascript/da/map/models/guide-line-model.js", "../../javascript/bx/models/roof-plane-model.js", "../../javascript/bx/models/obstruction-buffer-model.js", "../../javascript/bx/models/obstruction-model.js", "../../javascript/bx/models/project-model.js", "../../javascript/controllers/bx/layout_editor/map_base_controller.js", "../../javascript/da/map/styles/select.js", "../../javascript/da/map/interaction-managers/select/measure-select-manager.js", "../../javascript/da/map/interaction-managers/select/base.js", "../../javascript/bx/map/interaction-managers/select/edit-arrays.js", "../../javascript/da/map/interaction-managers/snap/base.js", "../../javascript/bx/map/interaction-managers/snap/edit-arrays.js", "../../javascript/bx/map/edit-array/apply-panel-mode-to-array-feature.js", "../../javascript/bx/map/edit-array/drag-box-interaction-manager.js", "../../javascript/bx/map/edit-array/paint-select-interaction-manager.js", "../../javascript/da/map/interaction-managers/measure/helpers.js", "../../javascript/da/map/interaction-managers/modify/base.js", "../../javascript/bx/map/interaction-managers/modify/edit-arrays.js", "../../javascript/da/map/interaction-managers/translate/base.js", "../../javascript/da/map/interaction-managers/helpers/constraint.js", "../../javascript/da/map/interaction-managers/helpers/angle-lock.js", "../../javascript/da/map/interaction-managers/helpers/line-length-menu.js", "../../javascript/da/map/interaction-managers/measure/base.js", "../../javascript/da/map/interaction-managers/shape-guide-lines/base.js", "../../javascript/bx/map/panel-grid/panel-grid-state.js", "../../javascript/helpers/api-dom-helpers.js", "../../javascript/controllers/bx/api_open_layers_helpers.js", "../../javascript/da/layout-editor/helpers/toolbar-select-group.js", "../../javascript/da/map/marquee-marker.js", "../../javascript/controllers/bx/layout_editor/map_edit_array_controller.js", "../../javascript/controllers/bx/layout_editor/map_roof_planes_and_sections_controller.js", "../../javascript/da/map/styles/draw.js", "../../javascript/da/map/interaction-managers/draw/base.js", "../../javascript/da/map/legality-checkers/simple-polygon.js", "../../javascript/da/map/legality-checkers/obstructions.js", "../../javascript/bx/map/obstructions/buffer-builder.js", "../../javascript/bx/map/obstructions/setback-buffer-builder.js", "../../javascript/bx/map/modification-helpers/obstruction.js", "../../javascript/bx/map/interaction-managers/draw/obstructions.js", "../../javascript/da/map/interaction-managers/draw/shape-base.js", "../../javascript/bx/map/interaction-managers/draw/obstruction-shapes.js", "../../javascript/bx/map/interaction-managers/select/obstructions.js", "../../javascript/bx/map/interaction-managers/snap/obstructions.js", "../../javascript/bx/map/interaction-managers/translate/obstructions.js", "../../javascript/bx/map/interaction-managers/modify/obstructions.js", "../../javascript/bx/map/interaction-managers/transform/obstructions.js", "../../javascript/controllers/bx/layout_editor/map_obstructions_controller.js", "../../javascript/da/map/legality-checkers/roof-plane.js", "../../javascript/bx/map/modification-helpers/roof-plane.js", "../../javascript/bx/map/interaction-managers/draw/roof-planes.js", "../../javascript/bx/map/interaction-managers/draw/roof-plane-shapes.js", "../../javascript/da/map/interaction-managers/select/roof-planes.js", "../../javascript/bx/map/interaction-managers/select/roof-planes.js", "../../javascript/bx/map/interaction-managers/snap/roof-planes.js", "../../javascript/bx/map/interaction-managers/translate/roof-planes.js", "../../javascript/bx/map/interaction-managers/modify/roof-planes.js", "../../javascript/bx/map/interaction-managers/transform/roof-planes.js", "../../javascript/controllers/bx/layout_editor/map_roof_planes_controller.js", "../../javascript/bx/map/interaction-managers/draw/roof-sections.js", "../../javascript/bx/map/interaction-managers/select/roof-sections.js", "../../javascript/bx/map/interaction-managers/snap/roof-sections.js", "../../javascript/bx/map/interaction-managers/translate/roof-sections.js", "../../javascript/pr/map/modification-helpers/roof-section.js", "../../javascript/bx/map/interaction-managers/modify/roof-sections.js", "../../javascript/controllers/bx/layout_editor/map_roof_sections_controller.js", "../../javascript/controllers/bx/layout_editor/map_view_only_controller.js", "../../javascript/controllers/bx/layout_editor/obstruction_heights_form_controller.js", "../../javascript/controllers/bx/layout_editor/restore_roof_section_defaults_controller.js", "../../javascript/controllers/bx/layout_editor/roof_planes_properties_controller.js", "../../javascript/controllers/bx/map_project_report_controller.js", "../../javascript/controllers/bx/power_electronics_controller.js", "../../javascript/controllers/bx/results_controller.js", "../../javascript/controllers/click_submit_controller.js", "../../javascript/controllers/company_join_requests_controller.js", "../../javascript/controllers/company_switched_notice_controller.js", "../../javascript/controllers/components/fire_type_rating_warning_controller.js", "../../javascript/controllers/components/ir_alert_controller.js", "../../javascript/controllers/components/ir_auto_grow_textarea_controller.js", "../../javascript/controllers/components/ir_btn_spinner_controller.js", "../../javascript/controllers/components/ir_carousel_controller.js", "../../javascript/controllers/components/ir_clipboard_controller.js", "../../javascript/controllers/components/ir_convert_and_display_controller.js", "../../javascript/controllers/components/ir_countdown_timer_controller.js", "../../javascript/components/CountdownTimer/CountdownTimer.js", "../../javascript/helpers/time-pieces.js", "../../javascript/controllers/components/ir_dialog/base_controller.js", "../../javascript/helpers/run-script.js", "../../javascript/controllers/components/ir_dialog/confirmation_controller.js", "../../javascript/controllers/components/ir_dialog/modal_overlay_controller.js", "../../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@5.5.0__supports-color@5.5.0/node_modules/axios/lib/helpers/bind.js", "../../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@5.5.0__supports-color@5.5.0/node_modules/axios/lib/utils.js", "../../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@5.5.0__supports-color@5.5.0/node_modules/axios/lib/helpers/parseHeaders.js", "../../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@5.5.0__supports-color@5.5.0/node_modules/axios/lib/helpers/sanitizeHeaderValue.js", "../../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@5.5.0__supports-color@5.5.0/node_modules/axios/lib/core/AxiosHeaders.js", "../../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@5.5.0__supports-color@5.5.0/node_modules/axios/lib/core/AxiosError.js", "../../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@5.5.0__supports-color@5.5.0/node_modules/axios/lib/helpers/null.js", "../../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@5.5.0__supports-color@5.5.0/node_modules/axios/lib/helpers/toFormData.js", "../../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@5.5.0__supports-color@5.5.0/node_modules/axios/lib/helpers/AxiosURLSearchParams.js", "../../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@5.5.0__supports-color@5.5.0/node_modules/axios/lib/helpers/buildURL.js", "../../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@5.5.0__supports-color@5.5.0/node_modules/axios/lib/core/InterceptorManager.js", "../../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@5.5.0__supports-color@5.5.0/node_modules/axios/lib/defaults/transitional.js", "../../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@5.5.0__supports-color@5.5.0/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js", "../../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@5.5.0__supports-color@5.5.0/node_modules/axios/lib/platform/browser/classes/FormData.js", "../../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@5.5.0__supports-color@5.5.0/node_modules/axios/lib/platform/browser/classes/Blob.js", "../../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@5.5.0__supports-color@5.5.0/node_modules/axios/lib/platform/browser/index.js", "../../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@5.5.0__supports-color@5.5.0/node_modules/axios/lib/platform/common/utils.js", "../../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@5.5.0__supports-color@5.5.0/node_modules/axios/lib/platform/index.js", "../../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@5.5.0__supports-color@5.5.0/node_modules/axios/lib/helpers/toURLEncodedForm.js", "../../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@5.5.0__supports-color@5.5.0/node_modules/axios/lib/helpers/formDataToJSON.js", "../../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@5.5.0__supports-color@5.5.0/node_modules/axios/lib/core/methodList.js", "../../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@5.5.0__supports-color@5.5.0/node_modules/axios/lib/defaults/index.js", "../../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@5.5.0__supports-color@5.5.0/node_modules/axios/lib/core/transformData.js", "../../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@5.5.0__supports-color@5.5.0/node_modules/axios/lib/cancel/isCancel.js", "../../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@5.5.0__supports-color@5.5.0/node_modules/axios/lib/cancel/CanceledError.js", "../../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@5.5.0__supports-color@5.5.0/node_modules/axios/lib/core/settle.js", "../../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@5.5.0__supports-color@5.5.0/node_modules/axios/lib/helpers/normalizeURLForProtocolCheck.js", "../../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@5.5.0__supports-color@5.5.0/node_modules/axios/lib/helpers/parseProtocol.js", "../../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@5.5.0__supports-color@5.5.0/node_modules/axios/lib/helpers/speedometer.js", "../../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@5.5.0__supports-color@5.5.0/node_modules/axios/lib/helpers/throttle.js", "../../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@5.5.0__supports-color@5.5.0/node_modules/axios/lib/helpers/progressEventReducer.js", "../../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@5.5.0__supports-color@5.5.0/node_modules/axios/lib/helpers/isURLSameOrigin.js", "../../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@5.5.0__supports-color@5.5.0/node_modules/axios/lib/helpers/cookies.js", "../../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@5.5.0__supports-color@5.5.0/node_modules/axios/lib/helpers/isAbsoluteURL.js", "../../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@5.5.0__supports-color@5.5.0/node_modules/axios/lib/helpers/combineURLs.js", "../../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@5.5.0__supports-color@5.5.0/node_modules/axios/lib/core/buildFullPath.js", "../../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@5.5.0__supports-color@5.5.0/node_modules/axios/lib/core/mergeConfig.js", "../../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@5.5.0__supports-color@5.5.0/node_modules/axios/lib/core/setFormDataHeaders.js", "../../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@5.5.0__supports-color@5.5.0/node_modules/axios/lib/helpers/resolveConfig.js", "../../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@5.5.0__supports-color@5.5.0/node_modules/axios/lib/adapters/xhr.js", "../../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@5.5.0__supports-color@5.5.0/node_modules/axios/lib/helpers/composeSignals.js", "../../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@5.5.0__supports-color@5.5.0/node_modules/axios/lib/helpers/trackStream.js", "../../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@5.5.0__supports-color@5.5.0/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js", "../../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@5.5.0__supports-color@5.5.0/node_modules/axios/lib/env/data.js", "../../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@5.5.0__supports-color@5.5.0/node_modules/axios/lib/adapters/fetch.js", "../../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@5.5.0__supports-color@5.5.0/node_modules/axios/lib/adapters/adapters.js", "../../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@5.5.0__supports-color@5.5.0/node_modules/axios/lib/core/dispatchRequest.js", "../../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@5.5.0__supports-color@5.5.0/node_modules/axios/lib/helpers/validator.js", "../../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@5.5.0__supports-color@5.5.0/node_modules/axios/lib/core/Axios.js", "../../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@5.5.0__supports-color@5.5.0/node_modules/axios/lib/cancel/CancelToken.js", "../../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@5.5.0__supports-color@5.5.0/node_modules/axios/lib/helpers/spread.js", "../../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@5.5.0__supports-color@5.5.0/node_modules/axios/lib/helpers/isAxiosError.js", "../../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@5.5.0__supports-color@5.5.0/node_modules/axios/lib/helpers/HttpStatusCode.js", "../../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@5.5.0__supports-color@5.5.0/node_modules/axios/lib/axios.js", "../../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@5.5.0__supports-color@5.5.0/node_modules/axios/index.js", "../../javascript/helpers/api.js", "../../javascript/controllers/components/ir_dialog/opener_controller.js", "../../javascript/controllers/components/ir_dialog/turbo_frame_details_controller.js", "../../javascript/controllers/components/ir_dirty_tracker_controller.js", "../../javascript/controllers/components/ir_feet_and_inches_field_controller.js", "../../javascript/controllers/components/ir_file_field_controller.js", "../../javascript/controllers/components/ir_flash_controller.js", "../../javascript/controllers/components/ir_json_download_controller.js", "../../javascript/controllers/components/ir_magnifier_controller.js", "../../javascript/controllers/components/ir_multi_select_controller.js", "../../javascript/controllers/components/ir_number_scroll_controller.js", "../../javascript/controllers/components/ir_per_page_switcher_controller.js", "../../javascript/controllers/components/ir_select_all_controller.js", "../../javascript/controllers/components/ir_show_hide_controller.js", "../../javascript/controllers/components/ir_submit_btn_controller.js", "../../javascript/controllers/components/ir_tabs_controller.js", "../../javascript/controllers/components/ir_tags_manager_controller.js", "../../javascript/controllers/components/ir_toggle_controller.js", "../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/enums.js", "../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getNodeName.js", "../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getWindow.js", "../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/instanceOf.js", "../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/modifiers/applyStyles.js", "../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/getBasePlacement.js", "../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/math.js", "../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/userAgent.js", "../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.js", "../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js", "../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js", "../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/contains.js", "../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js", "../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/isTableElement.js", "../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js", "../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getParentNode.js", "../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js", "../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js", "../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/within.js", "../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/getFreshSideObject.js", "../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/mergePaddingObject.js", "../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/expandToHashMap.js", "../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/modifiers/arrow.js", "../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/getVariation.js", "../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/modifiers/computeStyles.js", "../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/modifiers/eventListeners.js", "../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/getOppositePlacement.js", "../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js", "../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js", "../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js", "../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js", "../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js", "../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js", "../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js", "../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js", "../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/rectToClientRect.js", "../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js", "../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/computeOffsets.js", "../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/detectOverflow.js", "../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js", "../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/modifiers/flip.js", "../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/modifiers/hide.js", "../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/modifiers/offset.js", "../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/modifiers/popperOffsets.js", "../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/getAltAxis.js", "../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/modifiers/preventOverflow.js", "../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js", "../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js", "../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js", "../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/orderModifiers.js", "../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/debounce.js", "../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/mergeByName.js", "../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/createPopper.js", "../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/popper.js", "../../../node_modules/.pnpm/tippy.js@6.3.7/node_modules/tippy.js/src/constants.ts", "../../../node_modules/.pnpm/tippy.js@6.3.7/node_modules/tippy.js/src/utils.ts", "../../../node_modules/.pnpm/tippy.js@6.3.7/node_modules/tippy.js/src/dom-utils.ts", "../../../node_modules/.pnpm/tippy.js@6.3.7/node_modules/tippy.js/src/bindGlobalEventListeners.ts", "../../../node_modules/.pnpm/tippy.js@6.3.7/node_modules/tippy.js/src/browser.ts", "../../../node_modules/.pnpm/tippy.js@6.3.7/node_modules/tippy.js/src/validation.ts", "../../../node_modules/.pnpm/tippy.js@6.3.7/node_modules/tippy.js/src/props.ts", "../../../node_modules/.pnpm/tippy.js@6.3.7/node_modules/tippy.js/src/template.ts", "../../../node_modules/.pnpm/tippy.js@6.3.7/node_modules/tippy.js/src/createTippy.ts", "../../../node_modules/.pnpm/tippy.js@6.3.7/node_modules/tippy.js/src/index.ts", "../../../node_modules/.pnpm/tippy.js@6.3.7/node_modules/tippy.js/src/addons/createSingleton.ts", "../../../node_modules/.pnpm/tippy.js@6.3.7/node_modules/tippy.js/src/addons/delegate.ts", "../../../node_modules/.pnpm/tippy.js@6.3.7/node_modules/tippy.js/src/plugins/animateFill.ts", "../../../node_modules/.pnpm/tippy.js@6.3.7/node_modules/tippy.js/src/plugins/followCursor.ts", "../../../node_modules/.pnpm/tippy.js@6.3.7/node_modules/tippy.js/src/plugins/inlinePositioning.ts", "../../../node_modules/.pnpm/tippy.js@6.3.7/node_modules/tippy.js/src/plugins/sticky.ts", "../../../node_modules/.pnpm/tippy.js@6.3.7/node_modules/tippy.js/build/base.js", "../../javascript/controllers/components/ir_tooltip_controller.js", "../../javascript/controllers/components/ir_trix_editor_controller.js", "../../javascript/controllers/components__ir_btn_menu_controller.js", "../../javascript/controllers/da/add_btn_controller.js", "../../javascript/controllers/da/anchor_scroll_adjust_controller.js", "../../javascript/controllers/da/cantilever_fix_controller.js", "../../javascript/controllers/da/checkout_controller.js", "../../javascript/controllers/da/contractor_fields_controller.js", "../../javascript/controllers/da/custom_rail_lengths/dialog_controller.js", "../../javascript/controllers/da/custom_rail_lengths/display_controller.js", "../../javascript/controllers/da/download_progress_controller.js", "../../javascript/controllers/da/end_clamp_controller.js", "../../javascript/controllers/da/fixed_navbar_controller.js", "../../javascript/controllers/da/graphical_layout_tool_controller.js", "../../javascript/components/GraphicalLayoutTool/GraphicalLayoutTool.js", "../../javascript/components/GraphicalLayoutTool/Title.js", "../../javascript/components/InfoPopupLink/InfoPopupLink.js", "../../javascript/components/GraphicalLayoutTool/CompressedSpaceMarkers/CompressedSpaceMarkers.js", "../../javascript/components/GraphicalLayoutTool/CompressedSpaceMarkers/Marker.js", "../../javascript/components/GraphicalLayoutTool/CompressedSpaceMarkers/CompressionGraphic.js", "../../javascript/components/GraphicalLayoutTool/DragAndDrop/DragAndDrop.js", "../../javascript/components/GraphicalLayoutTool/GridCells.js", "../../javascript/components/GraphicalLayoutTool/GridCell/GridCell.js", "../../javascript/components/GraphicalLayoutTool/GridCell/GridRails.js", "../../javascript/helpers/contour.js", "../../javascript/components/GraphicalLayoutTool/helpers/zone-helper.js", "../../javascript/components/GraphicalLayoutTool/helpers/module-position-helper.js", "../../javascript/components/GraphicalLayoutTool/helpers/grid-serializer.js", "../../javascript/components/GraphicalLayoutTool/helpers/marquee-size-and-position-calculator.js", "../../javascript/helpers/graphical-tool-helpers.js", "../../javascript/components/GraphicalLayoutTool/helpers/grid-helper.js", "../../javascript/helpers/critter-guard.js", "../../javascript/components/GraphicalLayoutTool/GridNumbers.js", "../../javascript/components/GraphicalLayoutTool/GridNumber/GridNumber.js", "../../javascript/components/GraphicalLayoutTool/Toolbar/Toolbar.js", "../../javascript/components/GraphicalLayoutTool/Toolbar/GridTools.js", "../../javascript/components/GraphicalLayoutTool/Toolbar/ToolbarBtn.js", "../../javascript/components/GraphicalLayoutTool/Toolbar/SaveWithCropPopup.js", "../../javascript/components/Button/Button.js", "../../javascript/components/GraphicalLayoutTool/Toolbar/ModulePositionTools.js", "../../javascript/components/GraphicalLayoutTool/Toolbar/ZoneTools.js", "../../javascript/components/GraphicalLayoutTool/GridRowsAndColumns/GridRowsAndColumns.js", "../../javascript/components/GraphicalLayoutTool/GridRowsAndColumns/Editable.js", "../../javascript/components/TextField/TextField.js", "../../javascript/components/GraphicalLayoutTool/GridRowsAndColumns/Column.js", "../../javascript/components/GraphicalLayoutTool/GridRowsAndColumns/ViewOnly.js", "../../javascript/components/DisplayField/DisplayField.js", "../../javascript/components/ToggleSwitchWithLabel/ToggleSwitchWithLabel.js", "../../javascript/components/ToggleSwitch/ToggleSwitch.js", "../../javascript/components/GraphicalLayoutTool/DimensionMarkers.js", "../../javascript/components/GraphicalLayoutTool/DimensionMarker/DimensionMarker.js", "../../javascript/components/GraphicalLayoutTool/DimensionMarker/ArrowLineEnd.js", "../../javascript/components/GraphicalLayoutTool/DimensionMarker/CompressedIcon.js", "../../javascript/components/GraphicalLayoutTool/SetbackOutlines/SetbackOutlines.js", "../../javascript/components/GraphicalLayoutTool/SetbackOutlines/Outline.js", "../../javascript/components/GraphicalLayoutTool/ExtensionsOutline/ExtensionsOutline.js", "../../javascript/components/GraphicalLayoutTool/SelectionMarquee/SelectionMarquee.js", "../../javascript/components/GraphicalLayoutTool/SelectionMarquee/CountMarker.js", "../../javascript/components/SelectionMarquee/SelectionMarquee.js", "../../javascript/components/GraphicalLayoutTool/DimensionCrosshairs/DimensionCrosshairs.js", "../../javascript/components/GraphicalLayoutTool/DimensionCrosshairs/Crosshairs.js", "../../javascript/components/GraphicalLayoutTool/DimensionCrosshairs/Vertical.js", "../../javascript/components/GraphicalLayoutTool/DimensionCrosshairs/Marker.js", "../../javascript/components/GraphicalLayoutTool/DimensionCrosshairs/CompressedIcon.js", "../../javascript/components/GraphicalLayoutTool/DimensionCrosshairs/Line.js", "../../javascript/components/GraphicalLayoutTool/DimensionCrosshairs/Horizontal.js", "../../javascript/components/GraphicalLayoutTool/services/grid-compressed-space-thresholds.js", "../../javascript/components/GraphicalLayoutTool/RoofOutline.js", "../../javascript/helpers/with-caching.js", "../../javascript/components/GraphicalLayoutTool/services/grid-real.js", "../../javascript/components/GraphicalLayoutTool/services/grid-cell-positions.js", "../../javascript/components/GraphicalLayoutTool/services/grid-display-scale-factor.js", "../../javascript/components/GraphicalLayoutTool/services/grid-numbers.js", "../../javascript/components/GraphicalLayoutTool/services/grid-setback-outlines.js", "../../javascript/components/GraphicalLayoutTool/services/grid-dimension-markers.js", "../../javascript/components/GraphicalLayoutTool/services/grid-compressed-space-markers.js", "../../javascript/components/GraphicalLayoutTool/services/grid-extensions-outline.js", "../../javascript/components/GraphicalLayoutTool/services/grid-position-snaps.js", "../../javascript/components/GraphicalLayoutTool/services/grid-display.js", "../../javascript/components/GraphicalLayoutTool/services/grid-modifier.js", "../../javascript/components/GraphicalLayoutTool/services/grid-drag-selection.js", "../../javascript/components/SentryErrorHandler/SentryErrorHandler.js", "../../javascript/controllers/da/green_lancer_controller.js", "../../javascript/controllers/da/large_project_dialog_controller.js", "../../javascript/controllers/da/layout_editor/auto_save_controller.js", "../../javascript/controllers/da/layout_editor/btn_flyout_menu_controller.js", "../../javascript/controllers/da/layout_editor/btn_multiselect_group_controller.js", "../../javascript/controllers/da/layout_editor/btn_select_group_controller.js", "../../javascript/controllers/da/layout_editor/building_images_lock_controller.js", "../../javascript/helpers/alert-error-manager.js", "../../javascript/controllers/da/layout_editor/manual_scale_building_image_controller.js", "../../javascript/controllers/da/layout_editor/map_legend_controller.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/utils/methods.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/fails.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/function-bind-native.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/function-uncurry-this.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/object-is-prototype-of.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/global-this.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/function-apply.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/classof-raw.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/function-uncurry-this-clause.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/is-callable.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/descriptors.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/function-call.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/object-property-is-enumerable.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/create-property-descriptor.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/indexed-object.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/is-null-or-undefined.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/require-object-coercible.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/to-indexed-object.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/is-object.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/path.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/get-built-in.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/environment-user-agent.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/environment-v8-version.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/symbol-constructor-detection.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/use-symbol-as-uid.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/is-symbol.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/try-to-string.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/a-callable.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/get-method.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/ordinary-to-primitive.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/is-pure.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/define-global-property.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/shared-store.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/shared.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/to-object.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/has-own-property.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/uid.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/well-known-symbol.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/to-primitive.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/to-property-key.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/document-create-element.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/ie8-dom-define.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/object-get-own-property-descriptor.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/is-forced.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/function-bind-context.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/v8-prototype-define-bug.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/an-object.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/object-define-property.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/create-non-enumerable-property.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/export.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/math-trunc.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/to-integer-or-infinity.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/to-absolute-index.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/to-length.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/length-of-array-like.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/array-includes.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/add-to-unscopables.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/modules/es.array.includes.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/get-built-in-prototype-method.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/es/array/virtual/includes.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/is-regexp.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/not-a-regexp.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/to-string-tag-support.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/classof.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/to-string.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/correct-is-regexp-logic.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/modules/es.string.includes.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/es/string/virtual/includes.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/es/instance/includes.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/stable/instance/includes.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/utils/utils.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/modules/core/namespaces.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/utils/window.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/types/Base.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/utils/adopter.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/modules/optional/arrange.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/modules/core/regex.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/modules/optional/class.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/modules/optional/css.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/modules/optional/data.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/modules/optional/memory.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/types/Color.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/types/Point.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/types/Matrix.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/modules/core/parser.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/types/Box.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/types/List.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/modules/core/references.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/modules/core/selector.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/modules/core/event.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/types/EventTarget.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/modules/core/defaults.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/types/SVGArray.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/types/SVGNumber.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/modules/core/attr.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/elements/Dom.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/elements/Element.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/modules/optional/sugar.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/modules/optional/transform.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/elements/Container.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/elements/Defs.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/elements/Shape.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/modules/core/circled.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/elements/Ellipse.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/elements/Fragment.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/modules/core/gradiented.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/elements/Gradient.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/elements/Pattern.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/elements/Image.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/types/PointArray.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/modules/core/pointed.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/elements/Line.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/elements/Marker.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/animation/Controller.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/utils/pathParser.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/types/PathArray.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/animation/Morphable.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/elements/Path.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/modules/core/poly.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/elements/Polygon.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/elements/Polyline.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/elements/Rect.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/animation/Queue.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/animation/Animator.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/animation/Timeline.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/animation/Runner.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/elements/Svg.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/elements/Symbol.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/modules/core/textable.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/elements/Text.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/elements/Tspan.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/elements/Circle.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/elements/ClipPath.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/elements/ForeignObject.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/modules/core/containerGeometry.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/elements/G.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/elements/A.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/elements/Mask.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/elements/Stop.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/elements/Style.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/elements/TextPath.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/elements/Use.js", "../../../node_modules/.pnpm/@svgdotjs+svg.js@3.2.8/node_modules/@svgdotjs/svg.js/src/main.js", "../../../node_modules/.pnpm/@turf+convex@7.4.0/node_modules/@turf/convex/index.ts", "../../../node_modules/.pnpm/@turf+centroid@7.4.0/node_modules/@turf/centroid/index.ts", "../../../node_modules/.pnpm/@turf+invariant@7.4.0/node_modules/@turf/invariant/index.ts", "../../../node_modules/.pnpm/@turf+center-of-mass@7.4.0/node_modules/@turf/center-of-mass/index.ts", "../../javascript/controllers/da/layout_editor/mini_map_controller.js", "../../javascript/controllers/da/layout_editor/nav_flyout_controller.js", "../../javascript/pr/models/project-model.js", "../../javascript/pr/models/roof-plane-model.js", "../../javascript/pr/models/panel-model.js", "../../javascript/pr/models/thermal-expansion-model.js", "../../javascript/pr/models/adjoinment-model.js", "../../javascript/pr/models/contour-model.js", "../../javascript/pr/models/segment-model.js", "../../javascript/pr/models/roof-section-model.js", "../../javascript/pr/models/detail-model.js", "../../javascript/da/map/styles/scale-line.js", "../../javascript/da/map/map-managers/scale-building-image.js", "../../javascript/da/map/interaction-managers/scale-line/base.js", "../../javascript/da/map/interaction-managers/scale-line/drawn-line.js", "../../javascript/controllers/da/layout_editor/scale_building_image_controller.js", "../../javascript/controllers/da/layout_editor/settings_controller.js", "../../javascript/controllers/da/layout_editor/uploaded_building_image_controller.js", "../../javascript/controllers/da/lynx_controller.js", "../../javascript/controllers/da/membrane_materials_controller.js", "../../javascript/controllers/da/panel_picker_controller.js", "../../javascript/controllers/controller_in_dialog.js", "../../javascript/components/PanelPicker/ChosenPanelDisplay/ChosenPanelDisplay.js", "../../javascript/components/PanelPicker/helper.js", "../../javascript/components/PanelPicker/PanelPicker.js", "../../javascript/components/PanelPicker/ManufacturerSelect/ManufacturerSelect.js", "../../javascript/components/PanelPicker/SearchField/SearchField.js", "../../javascript/components/PanelPicker/NoMatchingRecords.js", "../../javascript/components/PanelPicker/PanelSelect/IronRidgePanelSelect.js", "../../javascript/components/PanelPicker/PanelSelect/PanelSelectBase.js", "../../javascript/components/PanelPicker/Filter.js", "../../javascript/components/PanelPicker/TabNav.js", "../../javascript/components/PanelPicker/PanelSelect/CustomPanelsSelect.js", "../../javascript/controllers/da/payment_request_confirmation_controller.js", "../../javascript/controllers/da/property_search/location.js", "../../javascript/controllers/da/property_search/location_from_values.js", "../../javascript/controllers/da/property_search/country_administrative_mapping.js", "../../javascript/controllers/da/property_search/us_states.js", "../../javascript/controllers/da/property_search/location_from_google_place.js", "../../javascript/controllers/da/property_search/google_maps_facade.js", "../../javascript/controllers/da/property_search/base_controller.js", "../../javascript/controllers/da/property_search/dialog_open_controller.js", "../../javascript/controllers/da/rail_cutting_controller.js", "../../javascript/controllers/da/rail_lengths_controller.js", "../../javascript/controllers/da/rail_platform_controller.js", "../../javascript/controllers/da/report_email_controller.js", "../../javascript/controllers/da/request_quote_controller.js", "../../javascript/controllers/da/risk_categories_controller.js", "../../javascript/controllers/da/roof_information_controller.js", "../../javascript/controllers/da/roof_section_menu_controller.js", "../../javascript/controllers/da/side_menu/anchor_link_controller.js", "../../javascript/controllers/da/side_menu/menu_controller.js", "../../javascript/controllers/da/span_and_forces_controller.js", "../../javascript/controllers/da/spans_editor/span_limits_controller.js", "../../javascript/controllers/da/spans_editor/span_overrides_controller.js", "../../javascript/controllers/da/spares_controller.js", "../../javascript/controllers/da/spares_percentage_controller.js", "../../javascript/controllers/distributors/map_controller.js", "../../../node_modules/.pnpm/yup@1.7.1/node_modules/yup/index.esm.js", "../../javascript/controllers/distributors/quote_form_controller.js", "../../javascript/controllers/distributors/quote_links_controller.js", "../../javascript/controllers/distributors/tabs_controller.js", "../../javascript/controllers/documents_and_resources/cad_dl_controller.js", "../../javascript/controllers/documents_and_resources/cad_dl_old_controller.js", "../../javascript/controllers/documents_and_resources/cert_letter_dl_controller.js", "../../javascript/controllers/documents_and_resources/cut_sheet_dl_controller.js", "../../javascript/controllers/documents_and_resources/cut_sheet_dl_old_controller.js", "../../javascript/controllers/documents_and_resources/file_search_controller.js", "../../javascript/controllers/documents_and_resources/tabs_controller.js", "../../javascript/controllers/domestic_content/bom_controller.js", "../../javascript/controllers/fr/angle_and_spacing_controller.js", "../../javascript/controllers/fr/roof_information_controller.js", "../../javascript/controllers/fr/save_all_segments_controller.js", "../../javascript/controllers/gb/foundation_controller.js", "../../javascript/controllers/gb/sub_array_details_controller.js", "../../javascript/controllers/gb/sub_array_form_controller.js", "../../javascript/controllers/gb/sub_arrays_controller.js", "../../javascript/controllers/google_events_controller.js", "../../javascript/controllers/google_map_full_page_controller.js", "../../javascript/controllers/header_nav_menus_controller.js", "../../javascript/controllers/input_auto_submit_controller.js", "../../javascript/controllers/introductions/helpers.js", "../../javascript/controllers/introductions/auto_show_popup_controller.js", "../../javascript/controllers/introductions/dismissal_controller.js", "../../javascript/controllers/location_form_controller.js", "../../javascript/controllers/my_projects/base_controller.js", "../../javascript/controllers/my_projects/consolidated_bom_controller.js", "../../javascript/controllers/onchange_submit_controller.js", "../../javascript/controllers/panel_details_controller.js", "../../javascript/controllers/panel_share_controller.js", "../../javascript/controllers/pr/corruslide_requirements_dialog_controller.js", "../../javascript/controllers/pr/quick_grip_dialog_controller.js", "../../javascript/controllers/pr/fl_product_approval_controller.js", "../../javascript/controllers/pr/graphical_tool_mode_controller.js", "../../javascript/pr/map/modification-helpers/base.js", "../../javascript/pr/map/ol-helpers.js", "../../javascript/pr/map/modification-helpers/roof-plane.js", "../../javascript/pr/map/modification-helpers/project.js", "../../javascript/pr/models/project-loader.js", "../../../node_modules/.pnpm/ol-ext@4.0.38_ol@10.10.0/node_modules/ol-ext/filter/Base.js", "../../../node_modules/.pnpm/ol-ext@4.0.38_ol@10.10.0/node_modules/ol-ext/filter/Mask.js", "../../../node_modules/.pnpm/ol-ext@4.0.38_ol@10.10.0/node_modules/ol-ext/filter/Crop.js", "../../javascript/pr/map/map-model-synchronizers/helpers.js", "../../javascript/pr/map/modification-helpers/thermal-expansions/helpers.js", "../../javascript/pr/map/modification-helpers/segments/renderer.js", "../../javascript/pr/map/modification-helpers/segments/helpers.js", "../../javascript/pr/map/map-model-synchronizers/segments-rail-group.js", "../../javascript/pr/map/modification-helpers/panels/helpers.js", "../../javascript/pr/map/legality-checkers/segments.js", "../../javascript/pr/map/modification-helpers/segments/proximity-alignments/identifier.js", "../../javascript/pr/map/modification-helpers/segments/proximity-alignments/base-renderer.js", "../../javascript/pr/map/modification-helpers/segments/proximity-alignments/adjoinments-renderer.js", "../../javascript/pr/map/modification-helpers/segments/proximity-alignments/contour-legality-adjoinments-renderer.js", "../../javascript/pr/map/styles/thermal-expansions.js", "../../javascript/pr/map/styles/rafters.js", "../../javascript/pr/map/styles/segments.js", "../../javascript/pr/map/styles/zone-panels.js", "../../javascript/pr/map/styles/adjoinments.js", "../../javascript/pr/map/styles/contour.js", "../../javascript/pr/map/map-managers/base.js", "../../javascript/pr/map/styles/attachments.js", "../../javascript/pr/map/map-managers/attachments.js", "../../javascript/pr/map/map-model-synchronizers/base.js", "../../javascript/pr/map/modification-helpers/rafters-builder.js", "../../javascript/pr/map/modification-helpers/segments/contour/builder.js", "../../javascript/pr/map/modification-helpers/segments/contour/short-runs-remover.js", "../../javascript/pr/map/map-model-synchronizers/attachments.js", "../../javascript/pr/map/interaction-managers/select/base.js", "../../javascript/da/map/ol-extensions/interaction/DragBox.js", "../../javascript/pr/map/interaction-managers/select/attachments.js", "../../javascript/pr/map/interaction-managers/snap/attachments.js", "../../javascript/controllers/pr/image_based/attachments_editor_controller.js", "../../javascript/controllers/pr/image_based/layout_editor/locked_tooltip_controller.js", "../../javascript/controllers/pr/image_based/layout_editor/map_base_controller.js", "../../javascript/pr/map/map-model-synchronizers/arrays.js", "../../javascript/pr/map/legality-checkers/thermal-expansion-gaps.js", "../../javascript/pr/map/map-managers/arrays.js", "../../javascript/pr/map/modification-helpers/panels/deleter.js", "../../javascript/pr/map/modification-helpers/segments/deleter.js", "../../javascript/pr/map/modification-helpers/thermal-expansions/deleter.js", "../../javascript/pr/map/modification-helpers/rail-group-consolidator.js", "../../javascript/pr/map/modification-helpers/thermal-expansions/horizontal-nudger.js", "../../javascript/pr/map/modification-helpers/segments/nudger.js", "../../javascript/pr/map/modification-helpers/segments/aligner.js", "../../javascript/pr/map/modification-helpers/segments/rows-and-columns-adder.js", "../../javascript/pr/map/modification-helpers/panels/nudger/base.js", "../../javascript/pr/map/modification-helpers/panels/nudger/vertical.js", "../../javascript/pr/map/modification-helpers/panels/nudger/horizontal.js", "../../javascript/pr/map/modification-helpers/thermal-expansions/adder.js", "../../javascript/pr/map/modification-helpers/segments/adjoining-aligner.js", "../../javascript/pr/map/modification-helpers/segments/merger.js", "../../javascript/pr/map/interaction-managers/select/arrays.js", "../../javascript/pr/map/interaction-managers/snap/arrays.js", "../../javascript/pr/map/interaction-managers/modify/arrays.js", "../../javascript/pr/map/interaction-managers/translate/arrays.js", "../../javascript/pr/map/interaction-managers/draw/arrays.js", "../../javascript/pr/map/modification-helpers/segments/builder.js", "../../javascript/pr/map/modification-helpers/segments/contour/codes-clearer.js", "../../javascript/controllers/pr/image_based/layout_editor/map_arrays_controller.js", "../../javascript/pr/map/styles/eave-selection.js", "../../javascript/pr/map/interaction-managers/select/eave-selection.js", "../../javascript/pr/map/map-model-synchronizers/eave-selection.js", "../../javascript/pr/map/map-managers/eave-selection.js", "../../javascript/controllers/pr/image_based/layout_editor/map_eave_selection_controller.js", "../../javascript/pr/map/map-model-synchronizers/panel-properties.js", "../../javascript/pr/map/map-managers/panel-properties.js", "../../javascript/pr/map/interaction-managers/select/panel-properties.js", "../../javascript/pr/map/interaction-managers/snap/panel-properties.js", "../../javascript/controllers/pr/image_based/layout_editor/map_panel_properties_controller.js", "../../javascript/pr/map/interaction-managers/draw/roof-planes.js", "../../javascript/pr/map/interaction-managers/draw/roof-plane-shapes.js", "../../javascript/pr/map/interaction-managers/select/roof-planes.js", "../../javascript/pr/map/interaction-managers/snap/roof-planes.js", "../../javascript/pr/map/interaction-managers/translate/roof-planes.js", "../../javascript/pr/map/interaction-managers/modify/roof-planes.js", "../../javascript/pr/map/interaction-managers/transform/roof-planes.js", "../../javascript/pr/map/map-managers/roof-planes.js", "../../javascript/controllers/pr/image_based/layout_editor/map_roof_planes_controller.js", "../../javascript/pr/map/map-model-synchronizers/setbacks.js", "../../javascript/pr/map/map-managers/setbacks.js", "../../javascript/pr/map/interaction-managers/select/setbacks.js", "../../javascript/pr/map/interaction-managers/modify/setbacks.js", "../../javascript/pr/map/interaction-managers/snap/setbacks.js", "../../javascript/pr/map/interaction-managers/translate/setbacks.js", "../../javascript/pr/map/modification-helpers/setbacks.js", "../../javascript/controllers/pr/image_based/layout_editor/map_setbacks_controller.js", "../../javascript/pr/map/map-managers/view-only.js", "../../javascript/controllers/pr/image_based/layout_editor/map_view_only_controller.js", "../../javascript/controllers/pr/image_based/layout_editor/setback_guides_form_controller.js", "../../javascript/controllers/pr/image_based/layout_editor/unlock_confirmation_controller.js", "../../javascript/pr/map/map-managers/project-report.js", "../../javascript/controllers/pr/image_based/map_project_report_controller.js", "../../javascript/controllers/pr/image_based/shared/rafter_offset_form_controller.js", "../../javascript/controllers/pr/jay_box_confirmation_controller.js", "../../javascript/controllers/pr/roof_information_controller.js", "../../javascript/controllers/pr/helper.js", "../../javascript/controllers/pr/roof_plane_form_controller.js", "../../javascript/controllers/pr/roof_plane_select_controller.js", "../../javascript/controllers/pr/roof_planes_controller.js", "../../javascript/controllers/pr/roof_section_form_controller.js", "../../javascript/controllers/pr/save_all_segments_controller.js", "../../javascript/controllers/project_updated_notice_controller.js", "../../javascript/controllers/scroll_to_top_controller.js", "../../javascript/controllers/sk/module_size_confirmation_controller.js", "../../javascript/controllers/sk/module_size_confirmation_dialog_controller.js", "../../javascript/controllers/sk/save_all_segments_controller.js", "../../javascript/controllers/sk/segments_list_controller.js", "../../javascript/controllers/tab_id_controller.js", "../../javascript/controllers/table_row_selection_controller.js", "../../javascript/controllers/terms_of_service_form_controller.js", "../../javascript/controllers/upload_file_form_controller.js", "../../javascript/controllers/url_redirect_controller.js", "../../javascript/controllers/user_single_picker_controller.js", "../../javascript/controllers/user_presets/da_controller.js", "../../javascript/controllers/user_presets/gb_controller.js", "../../javascript/controllers/warranties/activation_link_controller.js", "../../javascript/controllers/warranties_controller.js", "../../javascript/controllers/index.js"],
  "sourcesContent": ["'use strict';\nvar check = function (it) {\n  return it && it.Math === Math && it;\n};\n\n// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nmodule.exports =\n  // eslint-disable-next-line es/no-global-this -- safe\n  check(typeof globalThis == 'object' && globalThis) ||\n  check(typeof window == 'object' && window) ||\n  // eslint-disable-next-line no-restricted-globals -- safe\n  check(typeof self == 'object' && self) ||\n  check(typeof global == 'object' && global) ||\n  check(typeof this == 'object' && this) ||\n  // eslint-disable-next-line no-new-func -- fallback\n  (function () { return this; })() || Function('return this')();\n", "'use strict';\nmodule.exports = function (exec) {\n  try {\n    return !!exec();\n  } catch (error) {\n    return true;\n  }\n};\n", "'use strict';\nvar fails = require('../internals/fails');\n\n// Detect IE8's incomplete defineProperty implementation\nmodule.exports = !fails(function () {\n  // eslint-disable-next-line es/no-object-defineproperty -- required for testing\n  return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;\n});\n", "'use strict';\nvar fails = require('../internals/fails');\n\nmodule.exports = !fails(function () {\n  // eslint-disable-next-line es/no-function-prototype-bind -- safe\n  var test = function () { /* empty */ }.bind();\n  // eslint-disable-next-line no-prototype-builtins -- safe\n  return typeof test != 'function' || test.hasOwnProperty('prototype');\n});\n", "'use strict';\nvar NATIVE_BIND = require('../internals/function-bind-native');\n\nvar call = Function.prototype.call;\n// eslint-disable-next-line es/no-function-prototype-bind -- safe\nmodule.exports = NATIVE_BIND ? call.bind(call) : function () {\n  return call.apply(call, arguments);\n};\n", "'use strict';\nvar $propertyIsEnumerable = {}.propertyIsEnumerable;\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// Nashorn ~ JDK8 bug\nvar NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1);\n\n// `Object.prototype.propertyIsEnumerable` method implementation\n// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable\nexports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {\n  var descriptor = getOwnPropertyDescriptor(this, V);\n  return !!descriptor && descriptor.enumerable;\n} : $propertyIsEnumerable;\n", "'use strict';\nmodule.exports = function (bitmap, value) {\n  return {\n    enumerable: !(bitmap & 1),\n    configurable: !(bitmap & 2),\n    writable: !(bitmap & 4),\n    value: value\n  };\n};\n", "'use strict';\nvar NATIVE_BIND = require('../internals/function-bind-native');\n\nvar FunctionPrototype = Function.prototype;\nvar call = FunctionPrototype.call;\n// eslint-disable-next-line es/no-function-prototype-bind -- safe\nvar uncurryThisWithBind = NATIVE_BIND && FunctionPrototype.bind.bind(call, call);\n\nmodule.exports = NATIVE_BIND ? uncurryThisWithBind : function (fn) {\n  return function () {\n    return call.apply(fn, arguments);\n  };\n};\n", "'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\n\nvar toString = uncurryThis({}.toString);\nvar stringSlice = uncurryThis(''.slice);\n\nmodule.exports = function (it) {\n  return stringSlice(toString(it), 8, -1);\n};\n", "'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar fails = require('../internals/fails');\nvar classof = require('../internals/classof-raw');\n\nvar $Object = Object;\nvar split = uncurryThis(''.split);\n\n// fallback for non-array-like ES3 and non-enumerable old V8 strings\nmodule.exports = fails(function () {\n  // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346\n  // eslint-disable-next-line no-prototype-builtins -- safe\n  return !$Object('z').propertyIsEnumerable(0);\n}) ? function (it) {\n  return classof(it) === 'String' ? split(it, '') : $Object(it);\n} : $Object;\n", "'use strict';\n// we can't use just `it == null` since of `document.all` special case\n// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec\nmodule.exports = function (it) {\n  return it === null || it === undefined;\n};\n", "'use strict';\nvar isNullOrUndefined = require('../internals/is-null-or-undefined');\n\nvar $TypeError = TypeError;\n\n// `RequireObjectCoercible` abstract operation\n// https://tc39.es/ecma262/#sec-requireobjectcoercible\nmodule.exports = function (it) {\n  if (isNullOrUndefined(it)) throw new $TypeError(\"Can't call method on \" + it);\n  return it;\n};\n", "'use strict';\n// toObject with fallback for non-array-like ES3 strings\nvar IndexedObject = require('../internals/indexed-object');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\nmodule.exports = function (it) {\n  return IndexedObject(requireObjectCoercible(it));\n};\n", "'use strict';\n// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot\nvar documentAll = typeof document == 'object' && document.all;\n\n// `IsCallable` abstract operation\n// https://tc39.es/ecma262/#sec-iscallable\n// eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing\nmodule.exports = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {\n  return typeof argument == 'function' || argument === documentAll;\n} : function (argument) {\n  return typeof argument == 'function';\n};\n", "'use strict';\nvar isCallable = require('../internals/is-callable');\n\nmodule.exports = function (it) {\n  return typeof it == 'object' ? it !== null : isCallable(it);\n};\n", "'use strict';\nvar globalThis = require('../internals/global-this');\nvar isCallable = require('../internals/is-callable');\n\nvar aFunction = function (argument) {\n  return isCallable(argument) ? argument : undefined;\n};\n\nmodule.exports = function (namespace, method) {\n  return arguments.length < 2 ? aFunction(globalThis[namespace]) : globalThis[namespace] && globalThis[namespace][method];\n};\n", "'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\n\nmodule.exports = uncurryThis({}.isPrototypeOf);\n", "'use strict';\nvar globalThis = require('../internals/global-this');\n\nvar navigator = globalThis.navigator;\nvar userAgent = navigator && navigator.userAgent;\n\nmodule.exports = userAgent ? String(userAgent) : '';\n", "'use strict';\nvar globalThis = require('../internals/global-this');\nvar userAgent = require('../internals/environment-user-agent');\n\nvar process = globalThis.process;\nvar Deno = globalThis.Deno;\nvar versions = process && process.versions || Deno && Deno.version;\nvar v8 = versions && versions.v8;\nvar match, version;\n\nif (v8) {\n  match = v8.split('.');\n  // in old Chrome, versions of V8 isn't V8 = Chrome / 10\n  // but their correct versions are not interesting for us\n  version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);\n}\n\n// BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`\n// so check `userAgent` even if `.v8` exists, but 0\nif (!version && userAgent) {\n  match = userAgent.match(/Edge\\/(\\d+)/);\n  if (!match || match[1] >= 74) {\n    match = userAgent.match(/Chrome\\/(\\d+)/);\n    if (match) version = +match[1];\n  }\n}\n\nmodule.exports = version;\n", "'use strict';\n/* eslint-disable es/no-symbol -- required for testing */\nvar V8_VERSION = require('../internals/environment-v8-version');\nvar fails = require('../internals/fails');\nvar globalThis = require('../internals/global-this');\n\nvar $String = globalThis.String;\n\n// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing\nmodule.exports = !!Object.getOwnPropertySymbols && !fails(function () {\n  var symbol = Symbol('symbol detection');\n  // Chrome 38 Symbol has incorrect toString conversion\n  // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances\n  // nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will,\n  // of course, fail.\n  return !$String(symbol) || !(Object(symbol) instanceof Symbol) ||\n    // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances\n    !Symbol.sham && V8_VERSION && V8_VERSION < 41;\n});\n", "'use strict';\n/* eslint-disable es/no-symbol -- required for testing */\nvar NATIVE_SYMBOL = require('../internals/symbol-constructor-detection');\n\nmodule.exports = NATIVE_SYMBOL &&\n  !Symbol.sham &&\n  typeof Symbol.iterator == 'symbol';\n", "'use strict';\nvar getBuiltIn = require('../internals/get-built-in');\nvar isCallable = require('../internals/is-callable');\nvar isPrototypeOf = require('../internals/object-is-prototype-of');\nvar USE_SYMBOL_AS_UID = require('../internals/use-symbol-as-uid');\n\nvar $Object = Object;\n\nmodule.exports = USE_SYMBOL_AS_UID ? function (it) {\n  return typeof it == 'symbol';\n} : function (it) {\n  var $Symbol = getBuiltIn('Symbol');\n  return isCallable($Symbol) && isPrototypeOf($Symbol.prototype, $Object(it));\n};\n", "'use strict';\nvar $String = String;\n\nmodule.exports = function (argument) {\n  try {\n    return $String(argument);\n  } catch (error) {\n    return 'Object';\n  }\n};\n", "'use strict';\nvar isCallable = require('../internals/is-callable');\nvar tryToString = require('../internals/try-to-string');\n\nvar $TypeError = TypeError;\n\n// `Assert: IsCallable(argument) is true`\nmodule.exports = function (argument) {\n  if (isCallable(argument)) return argument;\n  throw new $TypeError(tryToString(argument) + ' is not a function');\n};\n", "'use strict';\nvar aCallable = require('../internals/a-callable');\nvar isNullOrUndefined = require('../internals/is-null-or-undefined');\n\n// `GetMethod` abstract operation\n// https://tc39.es/ecma262/#sec-getmethod\nmodule.exports = function (V, P) {\n  var func = V[P];\n  return isNullOrUndefined(func) ? undefined : aCallable(func);\n};\n", "'use strict';\nvar call = require('../internals/function-call');\nvar isCallable = require('../internals/is-callable');\nvar isObject = require('../internals/is-object');\n\nvar $TypeError = TypeError;\n\n// `OrdinaryToPrimitive` abstract operation\n// https://tc39.es/ecma262/#sec-ordinarytoprimitive\nmodule.exports = function (input, pref) {\n  var fn, val;\n  if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;\n  if (isCallable(fn = input.valueOf) && !isObject(val = call(fn, input))) return val;\n  if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;\n  throw new $TypeError(\"Can't convert object to primitive value\");\n};\n", "'use strict';\nmodule.exports = false;\n", "'use strict';\nvar globalThis = require('../internals/global-this');\n\n// eslint-disable-next-line es/no-object-defineproperty -- safe\nvar defineProperty = Object.defineProperty;\n\nmodule.exports = function (key, value) {\n  try {\n    defineProperty(globalThis, key, { value: value, configurable: true, writable: true });\n  } catch (error) {\n    globalThis[key] = value;\n  } return value;\n};\n", "'use strict';\nvar IS_PURE = require('../internals/is-pure');\nvar globalThis = require('../internals/global-this');\nvar defineGlobalProperty = require('../internals/define-global-property');\n\nvar SHARED = '__core-js_shared__';\nvar store = module.exports = globalThis[SHARED] || defineGlobalProperty(SHARED, {});\n\n(store.versions || (store.versions = [])).push({\n  version: '3.50.0',\n  mode: IS_PURE ? 'pure' : 'global',\n  copyright: '\u00A9 2013\u20132025 Denis Pushkarev (zloirock.ru), 2025\u20132026 CoreJS Company (core-js.io). All rights reserved.',\n  license: 'https://github.com/zloirock/core-js/blob/v3.50.0/LICENSE',\n  source: 'https://github.com/zloirock/core-js'\n});\n", "'use strict';\nvar store = require('../internals/shared-store');\n// eslint-disable-next-line es/no-object-create -- safe\nvar create = Object.create || Object;\n\nmodule.exports = function (key, value) {\n  return store[key] || (store[key] = value || create(null));\n};\n", "'use strict';\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\nvar $Object = Object;\n\n// `ToObject` abstract operation\n// https://tc39.es/ecma262/#sec-toobject\nmodule.exports = function (argument) {\n  return $Object(requireObjectCoercible(argument));\n};\n", "'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar toObject = require('../internals/to-object');\n\nvar hasOwnProperty = uncurryThis({}.hasOwnProperty);\n\n// `HasOwnProperty` abstract operation\n// https://tc39.es/ecma262/#sec-hasownproperty\n// eslint-disable-next-line es/no-object-hasown -- safe\nmodule.exports = Object.hasOwn || function hasOwn(it, key) {\n  return hasOwnProperty(toObject(it), key);\n};\n", "'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\n\nvar id = 0;\nvar postfix = Math.random();\nvar toString = uncurryThis(1.1.toString);\n\nmodule.exports = function (key) {\n  return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);\n};\n", "'use strict';\nvar globalThis = require('../internals/global-this');\nvar shared = require('../internals/shared');\nvar hasOwn = require('../internals/has-own-property');\nvar uid = require('../internals/uid');\nvar NATIVE_SYMBOL = require('../internals/symbol-constructor-detection');\nvar USE_SYMBOL_AS_UID = require('../internals/use-symbol-as-uid');\n\nvar Symbol = globalThis.Symbol;\nvar WellKnownSymbolsStore = shared('wks');\nvar createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol['for'] || Symbol : Symbol && Symbol.withoutSetter || uid;\n\nmodule.exports = function (name) {\n  if (!hasOwn(WellKnownSymbolsStore, name)) {\n    WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn(Symbol, name)\n      ? Symbol[name]\n      : createWellKnownSymbol('Symbol.' + name);\n  } return WellKnownSymbolsStore[name];\n};\n", "'use strict';\nvar call = require('../internals/function-call');\nvar isObject = require('../internals/is-object');\nvar isSymbol = require('../internals/is-symbol');\nvar getMethod = require('../internals/get-method');\nvar ordinaryToPrimitive = require('../internals/ordinary-to-primitive');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar $TypeError = TypeError;\nvar TO_PRIMITIVE = wellKnownSymbol('toPrimitive');\n\n// `ToPrimitive` abstract operation\n// https://tc39.es/ecma262/#sec-toprimitive\nmodule.exports = function (input, pref) {\n  if (!isObject(input) || isSymbol(input)) return input;\n  var exoticToPrim = getMethod(input, TO_PRIMITIVE);\n  var result;\n  if (exoticToPrim) {\n    if (pref === undefined) pref = 'default';\n    result = call(exoticToPrim, input, pref);\n    if (!isObject(result) || isSymbol(result)) return result;\n    throw new $TypeError(\"Can't convert object to primitive value\");\n  }\n  if (pref === undefined) pref = 'number';\n  return ordinaryToPrimitive(input, pref);\n};\n", "'use strict';\nvar toPrimitive = require('../internals/to-primitive');\nvar isSymbol = require('../internals/is-symbol');\n\n// `ToPropertyKey` abstract operation\n// https://tc39.es/ecma262/#sec-topropertykey\nmodule.exports = function (argument) {\n  var key = toPrimitive(argument, 'string');\n  return isSymbol(key) ? key : key + '';\n};\n", "'use strict';\nvar globalThis = require('../internals/global-this');\nvar isObject = require('../internals/is-object');\n\nvar document = globalThis.document;\n// typeof document.createElement is 'object' in old IE\nvar EXISTS = isObject(document) && isObject(document.createElement);\n\nmodule.exports = function (it) {\n  return EXISTS ? document.createElement(it) : {};\n};\n", "'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar fails = require('../internals/fails');\nvar createElement = require('../internals/document-create-element');\n\n// Thanks to IE8 for its funny defineProperty\nmodule.exports = !DESCRIPTORS && !fails(function () {\n  // eslint-disable-next-line es/no-object-defineproperty -- required for testing\n  return Object.defineProperty(createElement('div'), 'a', {\n    get: function () { return 7; }\n  }).a !== 7;\n});\n", "'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar call = require('../internals/function-call');\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar toPropertyKey = require('../internals/to-property-key');\nvar hasOwn = require('../internals/has-own-property');\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define');\n\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// `Object.getOwnPropertyDescriptor` method\n// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor\nexports.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {\n  O = toIndexedObject(O);\n  P = toPropertyKey(P);\n  if (IE8_DOM_DEFINE) try {\n    return $getOwnPropertyDescriptor(O, P);\n  } catch (error) { /* empty */ }\n  if (hasOwn(O, P)) return createPropertyDescriptor(!call(propertyIsEnumerableModule.f, O, P), O[P]);\n};\n", "'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar fails = require('../internals/fails');\n\n// V8 ~ Chrome 36-\n// https://bugs.chromium.org/p/v8/issues/detail?id=3334\nmodule.exports = DESCRIPTORS && fails(function () {\n  // eslint-disable-next-line es/no-object-defineproperty -- required for testing\n  return Object.defineProperty(function () { /* empty */ }, 'prototype', {\n    value: 42,\n    writable: false\n  }).prototype !== 42;\n});\n", "'use strict';\nvar isObject = require('../internals/is-object');\n\nvar $String = String;\nvar $TypeError = TypeError;\n\n// `Assert: Type(argument) is Object`\nmodule.exports = function (argument) {\n  if (isObject(argument)) return argument;\n  throw new $TypeError($String(argument) + ' is not an object');\n};\n", "'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define');\nvar V8_PROTOTYPE_DEFINE_BUG = require('../internals/v8-prototype-define-bug');\nvar anObject = require('../internals/an-object');\nvar toPropertyKey = require('../internals/to-property-key');\n\nvar $TypeError = TypeError;\n// eslint-disable-next-line es/no-object-defineproperty -- safe\nvar $defineProperty = Object.defineProperty;\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar ENUMERABLE = 'enumerable';\nvar CONFIGURABLE = 'configurable';\nvar WRITABLE = 'writable';\n\n// `Object.defineProperty` method\n// https://tc39.es/ecma262/#sec-object.defineproperty\nexports.f = DESCRIPTORS ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {\n  anObject(O);\n  P = toPropertyKey(P);\n  anObject(Attributes);\n  if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {\n    var current = $getOwnPropertyDescriptor(O, P);\n    if (current && current[WRITABLE]) {\n      O[P] = Attributes.value;\n      Attributes = {\n        configurable: CONFIGURABLE in Attributes ? Attributes[CONFIGURABLE] : current[CONFIGURABLE],\n        enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],\n        writable: false\n      };\n    }\n  } return $defineProperty(O, P, Attributes);\n} : $defineProperty : function defineProperty(O, P, Attributes) {\n  anObject(O);\n  P = toPropertyKey(P);\n  anObject(Attributes);\n  if (IE8_DOM_DEFINE) try {\n    return $defineProperty(O, P, Attributes);\n  } catch (error) { /* empty */ }\n  if ('get' in Attributes || 'set' in Attributes) throw new $TypeError('Accessors not supported');\n  if ('value' in Attributes) O[P] = Attributes.value;\n  return O;\n};\n", "'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar definePropertyModule = require('../internals/object-define-property');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nmodule.exports = DESCRIPTORS ? function (object, key, value) {\n  return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));\n} : function (object, key, value) {\n  object[key] = value;\n  return object;\n};\n", "'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar hasOwn = require('../internals/has-own-property');\n\nvar FunctionPrototype = Function.prototype;\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar getDescriptor = DESCRIPTORS && Object.getOwnPropertyDescriptor;\n\nvar EXISTS = hasOwn(FunctionPrototype, 'name');\n// additional protection from minified / mangled / dropped function names\nvar PROPER = EXISTS && function something() { /* empty */ }.name === 'something';\nvar CONFIGURABLE = EXISTS && (!DESCRIPTORS || (DESCRIPTORS && getDescriptor(FunctionPrototype, 'name').configurable));\n\nmodule.exports = {\n  EXISTS: EXISTS,\n  PROPER: PROPER,\n  CONFIGURABLE: CONFIGURABLE\n};\n", "'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar isCallable = require('../internals/is-callable');\nvar store = require('../internals/shared-store');\n\nvar functionToString = uncurryThis(Function.toString);\n\n// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper\nif (!isCallable(store.inspectSource)) {\n  store.inspectSource = function (it) {\n    return functionToString(it);\n  };\n}\n\nmodule.exports = store.inspectSource;\n", "'use strict';\nvar globalThis = require('../internals/global-this');\nvar isCallable = require('../internals/is-callable');\n\nvar WeakMap = globalThis.WeakMap;\n\nmodule.exports = isCallable(WeakMap) && /native code/.test(String(WeakMap));\n", "'use strict';\nvar shared = require('../internals/shared');\nvar uid = require('../internals/uid');\n\nvar keys = shared('keys');\n\nmodule.exports = function (key) {\n  return keys[key] || (keys[key] = uid(key));\n};\n", "'use strict';\nmodule.exports = {};\n", "'use strict';\nvar NATIVE_WEAK_MAP = require('../internals/weak-map-basic-detection');\nvar globalThis = require('../internals/global-this');\nvar isObject = require('../internals/is-object');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar hasOwn = require('../internals/has-own-property');\nvar shared = require('../internals/shared-store');\nvar sharedKey = require('../internals/shared-key');\nvar hiddenKeys = require('../internals/hidden-keys');\n\nvar OBJECT_ALREADY_INITIALIZED = 'Object already initialized';\nvar TypeError = globalThis.TypeError;\nvar WeakMap = globalThis.WeakMap;\nvar set, get, has;\n\nvar enforce = function (it) {\n  return has(it) ? get(it) : set(it, {});\n};\n\nvar getterFor = function (TYPE) {\n  return function (it) {\n    var state;\n    if (!isObject(it) || (state = get(it)).type !== TYPE) {\n      throw new TypeError('Incompatible receiver, ' + TYPE + ' required');\n    } return state;\n  };\n};\n\nif (NATIVE_WEAK_MAP || shared.state) {\n  var store = shared.state || (shared.state = new WeakMap());\n  /* eslint-disable no-self-assign -- prototype methods protection */\n  store.get = store.get;\n  store.has = store.has;\n  store.set = store.set;\n  /* eslint-enable no-self-assign -- prototype methods protection */\n  set = function (it, metadata) {\n    if (store.has(it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);\n    metadata.facade = it;\n    store.set(it, metadata);\n    return metadata;\n  };\n  get = function (it) {\n    return store.get(it) || {};\n  };\n  has = function (it) {\n    return store.has(it);\n  };\n} else {\n  var STATE = sharedKey('state');\n  hiddenKeys[STATE] = true;\n  set = function (it, metadata) {\n    if (hasOwn(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);\n    metadata.facade = it;\n    createNonEnumerableProperty(it, STATE, metadata);\n    return metadata;\n  };\n  get = function (it) {\n    return hasOwn(it, STATE) ? it[STATE] : {};\n  };\n  has = function (it) {\n    return hasOwn(it, STATE);\n  };\n}\n\nmodule.exports = {\n  set: set,\n  get: get,\n  has: has,\n  enforce: enforce,\n  getterFor: getterFor\n};\n", "'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar fails = require('../internals/fails');\nvar isCallable = require('../internals/is-callable');\nvar hasOwn = require('../internals/has-own-property');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar CONFIGURABLE_FUNCTION_NAME = require('../internals/function-name').CONFIGURABLE;\nvar inspectSource = require('../internals/inspect-source');\nvar InternalStateModule = require('../internals/internal-state');\n\nvar enforceInternalState = InternalStateModule.enforce;\nvar getInternalState = InternalStateModule.get;\nvar $String = String;\n// eslint-disable-next-line es/no-object-defineproperty -- safe\nvar defineProperty = Object.defineProperty;\nvar stringSlice = uncurryThis(''.slice);\nvar replace = uncurryThis(''.replace);\nvar join = uncurryThis([].join);\n\nvar CONFIGURABLE_LENGTH = DESCRIPTORS && !fails(function () {\n  return defineProperty(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;\n});\n\nvar TEMPLATE = String(String).split('String');\n\nvar makeBuiltIn = module.exports = function (value, name, options) {\n  if (stringSlice($String(name), 0, 7) === 'Symbol(') {\n    name = '[' + replace($String(name), /^Symbol\\(([^)]*)\\).*$/, '$1') + ']';\n  }\n  if (options && options.getter) name = 'get ' + name;\n  if (options && options.setter) name = 'set ' + name;\n  if (!hasOwn(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {\n    if (DESCRIPTORS) defineProperty(value, 'name', { value: name, configurable: true });\n    else value.name = name;\n  }\n  if (CONFIGURABLE_LENGTH && options && hasOwn(options, 'arity') && value.length !== options.arity) {\n    defineProperty(value, 'length', { value: options.arity });\n  }\n  try {\n    if (options && hasOwn(options, 'constructor') && options.constructor) {\n      if (DESCRIPTORS) defineProperty(value, 'prototype', { writable: false });\n    // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable\n    } else if (value.prototype) value.prototype = undefined;\n  } catch (error) { /* empty */ }\n  var state = enforceInternalState(value);\n  if (!hasOwn(state, 'source')) {\n    state.source = join(TEMPLATE, typeof name == 'string' ? name : '');\n  } return value;\n};\n\n// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n// eslint-disable-next-line no-extend-native -- required\nFunction.prototype.toString = makeBuiltIn(function toString() {\n  return isCallable(this) && getInternalState(this).source || inspectSource(this);\n}, 'toString');\n", "'use strict';\nvar isCallable = require('../internals/is-callable');\nvar definePropertyModule = require('../internals/object-define-property');\nvar makeBuiltIn = require('../internals/make-built-in');\nvar defineGlobalProperty = require('../internals/define-global-property');\n\nmodule.exports = function (O, key, value, options) {\n  if (!options) options = {};\n  var simple = options.enumerable;\n  var name = options.name !== undefined ? options.name : key;\n  if (isCallable(value)) makeBuiltIn(value, name, options);\n  if (options.global) {\n    if (simple) O[key] = value;\n    else defineGlobalProperty(key, value);\n  } else {\n    try {\n      if (!options.unsafe) delete O[key];\n      else if (O[key]) simple = true;\n    } catch (error) { /* empty */ }\n    if (simple) O[key] = value;\n    else definePropertyModule.f(O, key, {\n      value: value,\n      enumerable: false,\n      configurable: !options.nonConfigurable,\n      writable: !options.nonWritable\n    });\n  } return O;\n};\n", "'use strict';\nvar ceil = Math.ceil;\nvar floor = Math.floor;\n\n// `Math.trunc` method\n// https://tc39.es/ecma262/#sec-math.trunc\n// eslint-disable-next-line es/no-math-trunc -- safe\nmodule.exports = Math.trunc || function trunc(x) {\n  var n = +x;\n  return (n > 0 ? floor : ceil)(n);\n};\n", "'use strict';\nvar trunc = require('../internals/math-trunc');\n\n// `ToIntegerOrInfinity` abstract operation\n// https://tc39.es/ecma262/#sec-tointegerorinfinity\nmodule.exports = function (argument) {\n  var number = +argument;\n  // eslint-disable-next-line no-self-compare -- NaN check\n  return number !== number || number === 0 ? 0 : trunc(number);\n};\n", "'use strict';\nvar toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\n\nvar max = Math.max;\nvar min = Math.min;\n\n// Helper for a popular repeating case of the spec:\n// Let integer be ? ToInteger(index).\n// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).\nmodule.exports = function (index, length) {\n  var integer = toIntegerOrInfinity(index);\n  return integer < 0 ? max(integer + length, 0) : min(integer, length);\n};\n", "'use strict';\nvar toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\n\nvar min = Math.min;\n\n// `ToLength` abstract operation\n// https://tc39.es/ecma262/#sec-tolength\nmodule.exports = function (argument) {\n  var len = toIntegerOrInfinity(argument);\n  return len > 0 ? min(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991\n};\n", "'use strict';\nvar toLength = require('../internals/to-length');\n\n// `LengthOfArrayLike` abstract operation\n// https://tc39.es/ecma262/#sec-lengthofarraylike\nmodule.exports = function (obj) {\n  return toLength(obj.length);\n};\n", "'use strict';\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\n\n// `Array.prototype.{ indexOf, includes }` methods implementation\nvar createMethod = function (IS_INCLUDES) {\n  return function ($this, el, fromIndex) {\n    var O = toIndexedObject($this);\n    var length = lengthOfArrayLike(O);\n    if (length === 0) return !IS_INCLUDES && -1;\n    var index = toAbsoluteIndex(fromIndex, length);\n    var value;\n    // Array#includes uses SameValueZero equality algorithm\n    // eslint-disable-next-line no-self-compare -- NaN check\n    if (IS_INCLUDES && el !== el) while (length > index) {\n      value = O[index++];\n      // eslint-disable-next-line no-self-compare -- NaN check\n      if (value !== value) return true;\n    // Array#indexOf ignores holes, Array#includes - not\n    } else for (;length > index; index++) {\n      if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;\n    } return !IS_INCLUDES && -1;\n  };\n};\n\nmodule.exports = {\n  // `Array.prototype.includes` method\n  // https://tc39.es/ecma262/#sec-array.prototype.includes\n  includes: createMethod(true),\n  // `Array.prototype.indexOf` method\n  // https://tc39.es/ecma262/#sec-array.prototype.indexof\n  indexOf: createMethod(false)\n};\n", "'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar hasOwn = require('../internals/has-own-property');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar indexOf = require('../internals/array-includes').indexOf;\nvar hiddenKeys = require('../internals/hidden-keys');\n\nvar push = uncurryThis([].push);\n\nmodule.exports = function (object, names) {\n  var O = toIndexedObject(object);\n  var i = 0;\n  var result = [];\n  var key;\n  for (key in O) !hasOwn(hiddenKeys, key) && hasOwn(O, key) && push(result, key);\n  // Don't enum bug & hidden keys\n  while (names.length > i) if (hasOwn(O, key = names[i++])) {\n    ~indexOf(result, key) || push(result, key);\n  }\n  return result;\n};\n", "'use strict';\n// IE8- don't enum bug keys\nmodule.exports = [\n  'constructor',\n  'hasOwnProperty',\n  'isPrototypeOf',\n  'propertyIsEnumerable',\n  'toLocaleString',\n  'toString',\n  'valueOf'\n];\n", "'use strict';\nvar internalObjectKeys = require('../internals/object-keys-internal');\nvar enumBugKeys = require('../internals/enum-bug-keys');\n\nvar hiddenKeys = enumBugKeys.concat('length', 'prototype');\n\n// `Object.getOwnPropertyNames` method\n// https://tc39.es/ecma262/#sec-object.getownpropertynames\n// eslint-disable-next-line es/no-object-getownpropertynames -- safe\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n  return internalObjectKeys(O, hiddenKeys);\n};\n", "'use strict';\n// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe\nexports.f = Object.getOwnPropertySymbols;\n", "'use strict';\nvar getBuiltIn = require('../internals/get-built-in');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar getOwnPropertyNamesModule = require('../internals/object-get-own-property-names');\nvar getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');\nvar anObject = require('../internals/an-object');\n\nvar concat = uncurryThis([].concat);\n\n// all object keys, includes non-enumerable and symbols\nmodule.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {\n  var keys = getOwnPropertyNamesModule.f(anObject(it));\n  var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;\n  return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;\n};\n", "'use strict';\nvar hasOwn = require('../internals/has-own-property');\nvar ownKeys = require('../internals/own-keys');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar definePropertyModule = require('../internals/object-define-property');\n\nmodule.exports = function (target, source, exceptions) {\n  var keys = ownKeys(source);\n  var defineProperty = definePropertyModule.f;\n  var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\n  for (var i = 0; i < keys.length; i++) {\n    var key = keys[i];\n    if (!hasOwn(target, key) && !(exceptions && hasOwn(exceptions, key))) {\n      defineProperty(target, key, getOwnPropertyDescriptor(source, key));\n    }\n  }\n};\n", "'use strict';\nvar fails = require('../internals/fails');\nvar isCallable = require('../internals/is-callable');\n\nvar replacement = /#|\\.prototype\\./;\n\nvar isForced = function (feature, detection) {\n  var value = data[normalize(feature)];\n  return value === POLYFILL ? true\n    : value === NATIVE ? false\n    : isCallable(detection) ? fails(detection)\n    : !!detection;\n};\n\nvar normalize = isForced.normalize = function (string) {\n  return String(string).replace(replacement, '.').toLowerCase();\n};\n\nvar data = isForced.data = {};\nvar NATIVE = isForced.NATIVE = 'N';\nvar POLYFILL = isForced.POLYFILL = 'P';\n\nmodule.exports = isForced;\n", "'use strict';\nvar globalThis = require('../internals/global-this');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar defineBuiltIn = require('../internals/define-built-in');\nvar defineGlobalProperty = require('../internals/define-global-property');\nvar copyConstructorProperties = require('../internals/copy-constructor-properties');\nvar isForced = require('../internals/is-forced');\n\n/*\n  options.target         - name of the target object\n  options.global         - target is the global object\n  options.stat           - export as static methods of target\n  options.proto          - export as prototype methods of target\n  options.real           - real prototype method for the `pure` version\n  options.forced         - export even if the native feature is available\n  options.bind           - bind methods to the target, required for the `pure` version\n  options.wrap           - wrap constructors to preventing global pollution, required for the `pure` version\n  options.unsafe         - use the simple assignment of property instead of delete + defineProperty\n  options.sham           - add a flag to not completely full polyfills\n  options.enumerable     - export as enumerable property\n  options.dontCallGetSet - prevent calling a getter on target\n  options.name           - the .name of the function if it does not match the key\n*/\nmodule.exports = function (options, source) {\n  var TARGET = options.target;\n  var GLOBAL = options.global;\n  var STATIC = options.stat;\n  var FORCED, target, key, targetProperty, sourceProperty, descriptor;\n  if (GLOBAL) {\n    target = globalThis;\n  } else if (STATIC) {\n    target = globalThis[TARGET] || defineGlobalProperty(TARGET, {});\n  } else {\n    target = globalThis[TARGET] && globalThis[TARGET].prototype;\n  }\n  if (target) for (key in source) {\n    sourceProperty = source[key];\n    if (options.dontCallGetSet) {\n      descriptor = getOwnPropertyDescriptor(target, key);\n      targetProperty = descriptor && descriptor.value;\n    } else targetProperty = target[key];\n    FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);\n    // contained in target\n    if (!FORCED && targetProperty !== undefined) {\n      if (typeof sourceProperty == typeof targetProperty) continue;\n      copyConstructorProperties(sourceProperty, targetProperty);\n    }\n    // add a flag to not completely full polyfills\n    if (options.sham || (targetProperty && targetProperty.sham)) {\n      createNonEnumerableProperty(sourceProperty, 'sham', true);\n    }\n    defineBuiltIn(target, key, sourceProperty, options);\n  }\n};\n", "'use strict';\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar test = {};\n// eslint-disable-next-line unicorn/no-immediate-mutation -- ES3 syntax limitation\ntest[TO_STRING_TAG] = 'z';\n\nmodule.exports = String(test) === '[object z]';\n", "'use strict';\nvar TO_STRING_TAG_SUPPORT = require('../internals/to-string-tag-support');\nvar isCallable = require('../internals/is-callable');\nvar classofRaw = require('../internals/classof-raw');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar $Object = Object;\n\n// ES3 wrong here\nvar CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) === 'Arguments';\n\n// fallback for IE11 Script Access Denied error\nvar tryGet = function (it, key) {\n  try {\n    return it[key];\n  } catch (error) { /* empty */ }\n};\n\n// getting tag from ES6+ `Object.prototype.toString`\nmodule.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {\n  var O, tag, result;\n  return it === undefined ? 'Undefined' : it === null ? 'Null'\n    // @@toStringTag case\n    : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag\n    // builtinTag case\n    : CORRECT_ARGUMENTS ? classofRaw(O)\n    // ES3 arguments fallback\n    : (result = classofRaw(O)) === 'Object' && isCallable(O.callee) ? 'Arguments' : result;\n};\n", "'use strict';\nvar classof = require('../internals/classof');\n\nvar $String = String;\n\nmodule.exports = function (argument) {\n  if (classof(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string');\n  return $String(argument);\n};\n", "'use strict';\nvar internalObjectKeys = require('../internals/object-keys-internal');\nvar enumBugKeys = require('../internals/enum-bug-keys');\n\n// `Object.keys` method\n// https://tc39.es/ecma262/#sec-object.keys\n// eslint-disable-next-line es/no-object-keys -- safe\nmodule.exports = Object.keys || function keys(O) {\n  return internalObjectKeys(O, enumBugKeys);\n};\n", "'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar V8_PROTOTYPE_DEFINE_BUG = require('../internals/v8-prototype-define-bug');\nvar definePropertyModule = require('../internals/object-define-property');\nvar anObject = require('../internals/an-object');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar objectKeys = require('../internals/object-keys');\n\n// `Object.defineProperties` method\n// https://tc39.es/ecma262/#sec-object.defineproperties\n// eslint-disable-next-line es/no-object-defineproperties -- safe\nexports.f = DESCRIPTORS && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {\n  anObject(O);\n  var props = toIndexedObject(Properties);\n  var keys = objectKeys(Properties);\n  var length = keys.length;\n  var index = 0;\n  var key;\n  while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);\n  return O;\n};\n", "'use strict';\nvar getBuiltIn = require('../internals/get-built-in');\n\nmodule.exports = getBuiltIn('document', 'documentElement');\n", "'use strict';\n/* global ActiveXObject -- old IE, WSH */\nvar anObject = require('../internals/an-object');\nvar definePropertiesModule = require('../internals/object-define-properties');\nvar enumBugKeys = require('../internals/enum-bug-keys');\nvar hiddenKeys = require('../internals/hidden-keys');\nvar html = require('../internals/html');\nvar documentCreateElement = require('../internals/document-create-element');\nvar sharedKey = require('../internals/shared-key');\n\nvar GT = '>';\nvar LT = '<';\nvar PROTOTYPE = 'prototype';\nvar SCRIPT = 'script';\nvar IE_PROTO = sharedKey('IE_PROTO');\n\nvar EmptyConstructor = function () { /* empty */ };\n\nvar scriptTag = function (content) {\n  return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;\n};\n\n// Create object with fake `null` prototype: use ActiveX Object with cleared prototype\nvar NullProtoObjectViaActiveX = function (activeXDocument) {\n  activeXDocument.write(scriptTag(''));\n  activeXDocument.close();\n  var temp = activeXDocument.parentWindow.Object;\n  // eslint-disable-next-line no-useless-assignment -- avoid memory leak\n  activeXDocument = null;\n  return temp;\n};\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar NullProtoObjectViaIFrame = function () {\n  // Thrash, waste and sodomy: IE GC bug\n  var iframe = documentCreateElement('iframe');\n  var JS = 'java' + SCRIPT + ':';\n  var iframeDocument;\n  iframe.style.display = 'none';\n  html.appendChild(iframe);\n  // https://github.com/zloirock/core-js/issues/475\n  iframe.src = String(JS);\n  iframeDocument = iframe.contentWindow.document;\n  iframeDocument.open();\n  iframeDocument.write(scriptTag('document.F=Object'));\n  iframeDocument.close();\n  return iframeDocument.F;\n};\n\n// Check for document.domain and active x support\n// No need to use active x approach when document.domain is not set\n// see https://github.com/es-shims/es5-shim/issues/150\n// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346\n// avoid IE GC bug\nvar activeXDocument;\nvar NullProtoObject = function () {\n  try {\n    activeXDocument = new ActiveXObject('htmlfile');\n  } catch (error) { /* ignore */ }\n  NullProtoObject = typeof document != 'undefined'\n    ? document.domain && activeXDocument\n      ? NullProtoObjectViaActiveX(activeXDocument) // old IE\n      : NullProtoObjectViaIFrame()\n    : NullProtoObjectViaActiveX(activeXDocument); // WSH\n  var length = enumBugKeys.length;\n  while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];\n  return NullProtoObject();\n};\n\nhiddenKeys[IE_PROTO] = true;\n\n// `Object.create` method\n// https://tc39.es/ecma262/#sec-object.create\n// eslint-disable-next-line es/no-object-create -- safe\nmodule.exports = Object.create || function create(O, Properties) {\n  var result;\n  if (O !== null) {\n    EmptyConstructor[PROTOTYPE] = anObject(O);\n    result = new EmptyConstructor();\n    EmptyConstructor[PROTOTYPE] = null;\n    // add \"__proto__\" for Object.getPrototypeOf polyfill\n    result[IE_PROTO] = O;\n  } else result = NullProtoObject();\n  return Properties === undefined ? result : definePropertiesModule.f(result, Properties);\n};\n", "'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\n\nmodule.exports = uncurryThis([].slice);\n", "'use strict';\n/* eslint-disable es/no-object-getownpropertynames -- safe */\nvar classof = require('../internals/classof-raw');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar $getOwnPropertyNames = require('../internals/object-get-own-property-names').f;\nvar arraySlice = require('../internals/array-slice');\n\nvar windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames\n  ? Object.getOwnPropertyNames(window) : [];\n\nvar getWindowNames = function (it) {\n  try {\n    return $getOwnPropertyNames(it);\n  } catch (error) {\n    return arraySlice(windowNames);\n  }\n};\n\n// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window\nmodule.exports.f = function getOwnPropertyNames(it) {\n  return windowNames && classof(it) === 'Window'\n    ? getWindowNames(it)\n    : $getOwnPropertyNames(toIndexedObject(it));\n};\n", "'use strict';\nvar makeBuiltIn = require('../internals/make-built-in');\nvar defineProperty = require('../internals/object-define-property');\n\nmodule.exports = function (target, name, descriptor) {\n  if (descriptor.get) makeBuiltIn(descriptor.get, name, { getter: true });\n  if (descriptor.set) makeBuiltIn(descriptor.set, name, { setter: true });\n  return defineProperty.f(target, name, descriptor);\n};\n", "'use strict';\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nexports.f = wellKnownSymbol;\n", "'use strict';\nvar globalThis = require('../internals/global-this');\n\nmodule.exports = globalThis;\n", "'use strict';\nvar path = require('../internals/path');\nvar hasOwn = require('../internals/has-own-property');\nvar wrappedWellKnownSymbolModule = require('../internals/well-known-symbol-wrapped');\nvar defineProperty = require('../internals/object-define-property').f;\n\nmodule.exports = function (NAME) {\n  var Symbol = path.Symbol || (path.Symbol = {});\n  if (!hasOwn(Symbol, NAME)) defineProperty(Symbol, NAME, {\n    value: wrappedWellKnownSymbolModule.f(NAME)\n  });\n};\n", "'use strict';\nvar call = require('../internals/function-call');\nvar getBuiltIn = require('../internals/get-built-in');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar defineBuiltIn = require('../internals/define-built-in');\n\nmodule.exports = function () {\n  var Symbol = getBuiltIn('Symbol');\n  var SymbolPrototype = Symbol && Symbol.prototype;\n  var valueOf = SymbolPrototype && SymbolPrototype.valueOf;\n  var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');\n\n  if (SymbolPrototype && !SymbolPrototype[TO_PRIMITIVE]) {\n    // `Symbol.prototype[@@toPrimitive]` method\n    // https://tc39.es/ecma262/#sec-symbol.prototype-@@toprimitive\n    // eslint-disable-next-line no-unused-vars -- required for .length\n    defineBuiltIn(SymbolPrototype, TO_PRIMITIVE, function (hint) {\n      return call(valueOf, this);\n    }, { arity: 1 });\n  }\n};\n", "'use strict';\nvar defineProperty = require('../internals/object-define-property').f;\nvar hasOwn = require('../internals/has-own-property');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\n\nmodule.exports = function (target, TAG, STATIC) {\n  if (target && !STATIC) target = target.prototype;\n  if (target && !hasOwn(target, TO_STRING_TAG)) {\n    defineProperty(target, TO_STRING_TAG, { configurable: true, value: TAG });\n  }\n};\n", "'use strict';\nvar classofRaw = require('../internals/classof-raw');\nvar uncurryThis = require('../internals/function-uncurry-this');\n\nmodule.exports = function (fn) {\n  // Nashorn bug:\n  //   https://github.com/zloirock/core-js/issues/1128\n  //   https://github.com/zloirock/core-js/issues/1130\n  if (classofRaw(fn) === 'Function') return uncurryThis(fn);\n};\n", "'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this-clause');\nvar aCallable = require('../internals/a-callable');\nvar NATIVE_BIND = require('../internals/function-bind-native');\n\nvar bind = uncurryThis(uncurryThis.bind);\n\n// optional / simple context binding\nmodule.exports = function (fn, that) {\n  aCallable(fn);\n  return that === undefined ? fn : NATIVE_BIND ? bind(fn, that) : function (/* ...args */) {\n    return fn.apply(that, arguments);\n  };\n};\n", "'use strict';\nvar classof = require('../internals/classof-raw');\n\n// `IsArray` abstract operation\n// https://tc39.es/ecma262/#sec-isarray\n// eslint-disable-next-line es/no-array-isarray -- safe\nmodule.exports = Array.isArray || function isArray(argument) {\n  return classof(argument) === 'Array';\n};\n", "'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar fails = require('../internals/fails');\nvar isCallable = require('../internals/is-callable');\nvar classof = require('../internals/classof');\nvar getBuiltIn = require('../internals/get-built-in');\nvar inspectSource = require('../internals/inspect-source');\n\nvar noop = function () { /* empty */ };\nvar construct = getBuiltIn('Reflect', 'construct');\nvar constructorRegExp = /^\\s*(?:class|function)\\b/;\nvar exec = uncurryThis(constructorRegExp.exec);\nvar INCORRECT_TO_STRING = !constructorRegExp.test(noop);\n\nvar isConstructorModern = function isConstructor(argument) {\n  if (!isCallable(argument)) return false;\n  try {\n    construct(noop, [], argument);\n    return true;\n  } catch (error) {\n    return false;\n  }\n};\n\nvar isConstructorLegacy = function isConstructor(argument) {\n  if (!isCallable(argument)) return false;\n  switch (classof(argument)) {\n    case 'AsyncFunction':\n    case 'GeneratorFunction':\n    case 'AsyncGeneratorFunction': return false;\n  }\n  try {\n    // we can't check .prototype since constructors produced by .bind haven't it\n    // `Function#toString` throws on some built-it function in some legacy engines\n    // (for example, `DOMQuad` and similar in FF41-)\n    return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument));\n  } catch (error) {\n    return true;\n  }\n};\n\nisConstructorLegacy.sham = true;\n\n// `IsConstructor` abstract operation\n// https://tc39.es/ecma262/#sec-isconstructor\nmodule.exports = !construct || fails(function () {\n  var called;\n  return isConstructorModern(isConstructorModern.call)\n    || !isConstructorModern(Object)\n    || !isConstructorModern(function () { called = true; })\n    || called;\n}) ? isConstructorLegacy : isConstructorModern;\n", "'use strict';\nvar isArray = require('../internals/is-array');\nvar isConstructor = require('../internals/is-constructor');\nvar isObject = require('../internals/is-object');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar SPECIES = wellKnownSymbol('species');\nvar $Array = Array;\n\n// a part of `ArraySpeciesCreate` abstract operation\n// https://tc39.es/ecma262/#sec-arrayspeciescreate\nmodule.exports = function (originalArray) {\n  var C;\n  if (isArray(originalArray)) {\n    C = originalArray.constructor;\n    // cross-realm fallback\n    if (isConstructor(C) && (C === $Array || isArray(C.prototype))) C = undefined;\n    else if (isObject(C)) {\n      C = C[SPECIES];\n      if (C === null) C = undefined;\n    }\n  } return C === undefined ? $Array : C;\n};\n", "'use strict';\nvar arraySpeciesConstructor = require('../internals/array-species-constructor');\n\n// `ArraySpeciesCreate` abstract operation\n// https://tc39.es/ecma262/#sec-arrayspeciescreate\nmodule.exports = function (originalArray, length) {\n  return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);\n};\n", "'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar definePropertyModule = require('../internals/object-define-property');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nmodule.exports = function (object, key, value) {\n  if (DESCRIPTORS) definePropertyModule.f(object, key, createPropertyDescriptor(0, value));\n  else object[key] = value;\n};\n", "'use strict';\nvar bind = require('../internals/function-bind-context');\nvar IndexedObject = require('../internals/indexed-object');\nvar toObject = require('../internals/to-object');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar arraySpeciesCreate = require('../internals/array-species-create');\nvar createProperty = require('../internals/create-property');\n\n// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation\nvar createMethod = function (TYPE) {\n  var IS_MAP = TYPE === 1;\n  var IS_FILTER = TYPE === 2;\n  var IS_SOME = TYPE === 3;\n  var IS_EVERY = TYPE === 4;\n  var IS_FIND_INDEX = TYPE === 6;\n  var IS_FILTER_REJECT = TYPE === 7;\n  var NO_HOLES = TYPE === 5 || IS_FIND_INDEX;\n  return function ($this, callbackfn, that) {\n    var O = toObject($this);\n    var self = IndexedObject(O);\n    var length = lengthOfArrayLike(self);\n    var boundFunction = bind(callbackfn, that);\n    var index = 0;\n    var resIndex = 0;\n    var target = IS_MAP ? arraySpeciesCreate($this, length) : IS_FILTER || IS_FILTER_REJECT ? arraySpeciesCreate($this, 0) : undefined;\n    var value, result;\n    for (;length > index; index++) if (NO_HOLES || index in self) {\n      value = self[index];\n      result = boundFunction(value, index, O);\n      if (TYPE) {\n        if (IS_MAP) createProperty(target, index, result);    // map\n        else if (result) switch (TYPE) {\n          case 3: return true;                                // some\n          case 5: return value;                               // find\n          case 6: return index;                               // findIndex\n          case 2: createProperty(target, resIndex++, value);  // filter\n        } else switch (TYPE) {\n          case 4: return false;                               // every\n          case 7: createProperty(target, resIndex++, value);  // filterReject\n        }\n      }\n    }\n    return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;\n  };\n};\n\nmodule.exports = {\n  // `Array.prototype.forEach` method\n  // https://tc39.es/ecma262/#sec-array.prototype.foreach\n  forEach: createMethod(0),\n  // `Array.prototype.map` method\n  // https://tc39.es/ecma262/#sec-array.prototype.map\n  map: createMethod(1),\n  // `Array.prototype.filter` method\n  // https://tc39.es/ecma262/#sec-array.prototype.filter\n  filter: createMethod(2),\n  // `Array.prototype.some` method\n  // https://tc39.es/ecma262/#sec-array.prototype.some\n  some: createMethod(3),\n  // `Array.prototype.every` method\n  // https://tc39.es/ecma262/#sec-array.prototype.every\n  every: createMethod(4),\n  // `Array.prototype.find` method\n  // https://tc39.es/ecma262/#sec-array.prototype.find\n  find: createMethod(5),\n  // `Array.prototype.findIndex` method\n  // https://tc39.es/ecma262/#sec-array.prototype.findIndex\n  findIndex: createMethod(6),\n  // `Array.prototype.filterReject` method\n  // https://github.com/tc39/proposal-array-filtering\n  filterReject: createMethod(7)\n};\n", "'use strict';\nvar $ = require('../internals/export');\nvar globalThis = require('../internals/global-this');\nvar call = require('../internals/function-call');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar IS_PURE = require('../internals/is-pure');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar NATIVE_SYMBOL = require('../internals/symbol-constructor-detection');\nvar fails = require('../internals/fails');\nvar hasOwn = require('../internals/has-own-property');\nvar isPrototypeOf = require('../internals/object-is-prototype-of');\nvar anObject = require('../internals/an-object');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar toPropertyKey = require('../internals/to-property-key');\nvar $toString = require('../internals/to-string');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar nativeObjectCreate = require('../internals/object-create');\nvar objectKeys = require('../internals/object-keys');\nvar getOwnPropertyNamesModule = require('../internals/object-get-own-property-names');\nvar getOwnPropertyNamesExternal = require('../internals/object-get-own-property-names-external');\nvar getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar definePropertyModule = require('../internals/object-define-property');\nvar definePropertiesModule = require('../internals/object-define-properties');\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\nvar defineBuiltIn = require('../internals/define-built-in');\nvar defineBuiltInAccessor = require('../internals/define-built-in-accessor');\nvar shared = require('../internals/shared');\nvar sharedKey = require('../internals/shared-key');\nvar hiddenKeys = require('../internals/hidden-keys');\nvar uid = require('../internals/uid');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar wrappedWellKnownSymbolModule = require('../internals/well-known-symbol-wrapped');\nvar defineWellKnownSymbol = require('../internals/well-known-symbol-define');\nvar defineSymbolToPrimitive = require('../internals/symbol-define-to-primitive');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar InternalStateModule = require('../internals/internal-state');\nvar $forEach = require('../internals/array-iteration').forEach;\n\nvar HIDDEN = sharedKey('hidden');\nvar SYMBOL = 'Symbol';\nvar PROTOTYPE = 'prototype';\n\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(SYMBOL);\n\nvar ObjectPrototype = Object[PROTOTYPE];\nvar $Symbol = globalThis.Symbol;\nvar SymbolPrototype = $Symbol && $Symbol[PROTOTYPE];\nvar RangeError = globalThis.RangeError;\nvar TypeError = globalThis.TypeError;\nvar QObject = globalThis.QObject;\nvar nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\nvar nativeDefineProperty = definePropertyModule.f;\nvar nativeGetOwnPropertyNames = getOwnPropertyNamesExternal.f;\nvar nativePropertyIsEnumerable = propertyIsEnumerableModule.f;\nvar push = uncurryThis([].push);\n\nvar AllSymbols = shared('symbols');\nvar ObjectPrototypeSymbols = shared('op-symbols');\nvar WellKnownSymbolsStore = shared('wks');\n\n// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173\nvar USE_SETTER = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;\n\n// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687\nvar fallbackDefineProperty = function (O, P, Attributes) {\n  var ObjectPrototypeDescriptor = nativeGetOwnPropertyDescriptor(ObjectPrototype, P);\n  if (ObjectPrototypeDescriptor) delete ObjectPrototype[P];\n  nativeDefineProperty(O, P, Attributes);\n  if (ObjectPrototypeDescriptor && O !== ObjectPrototype) {\n    nativeDefineProperty(ObjectPrototype, P, ObjectPrototypeDescriptor);\n  } return O;\n};\n\nvar setSymbolDescriptor = DESCRIPTORS && fails(function () {\n  return nativeObjectCreate(nativeDefineProperty({}, 'a', {\n    get: function () { return nativeDefineProperty(this, 'a', { value: 7 }).a; }\n  })).a !== 7;\n}) ? fallbackDefineProperty : nativeDefineProperty;\n\nvar wrap = function (tag, description) {\n  var symbol = AllSymbols[tag] = nativeObjectCreate(SymbolPrototype);\n  setInternalState(symbol, {\n    type: SYMBOL,\n    tag: tag,\n    description: description\n  });\n  if (!DESCRIPTORS) symbol.description = description;\n  return symbol;\n};\n\nvar $defineProperty = function defineProperty(O, P, Attributes) {\n  if (O === ObjectPrototype) $defineProperty(ObjectPrototypeSymbols, P, Attributes);\n  anObject(O);\n  var key = toPropertyKey(P);\n  anObject(Attributes);\n  if (hasOwn(AllSymbols, key)) {\n    // first definition - default non-enumerable; redefinition - preserve existing state\n    if (!('enumerable' in Attributes) ? !hasOwn(O, key) || (hasOwn(O, HIDDEN) && O[HIDDEN][key]) : !Attributes.enumerable) {\n      if (!hasOwn(O, HIDDEN)) nativeDefineProperty(O, HIDDEN, createPropertyDescriptor(1, nativeObjectCreate(null)));\n      O[HIDDEN][key] = true;\n    } else {\n      if (hasOwn(O, HIDDEN) && O[HIDDEN][key]) O[HIDDEN][key] = false;\n      Attributes = nativeObjectCreate(Attributes, { enumerable: createPropertyDescriptor(0, false) });\n    } return setSymbolDescriptor(O, key, Attributes);\n  } return nativeDefineProperty(O, key, Attributes);\n};\n\nvar $defineProperties = function defineProperties(O, Properties) {\n  anObject(O);\n  var properties = toIndexedObject(Properties);\n  var keys = objectKeys(properties).concat($getOwnPropertySymbols(properties));\n  $forEach(keys, function (key) {\n    if (!DESCRIPTORS || call($propertyIsEnumerable, properties, key)) $defineProperty(O, key, properties[key]);\n  });\n  return O;\n};\n\nvar $create = function create(O, Properties) {\n  return Properties === undefined ? nativeObjectCreate(O) : $defineProperties(nativeObjectCreate(O), Properties);\n};\n\nvar $propertyIsEnumerable = function propertyIsEnumerable(V) {\n  var P = toPropertyKey(V);\n  var enumerable = call(nativePropertyIsEnumerable, this, P);\n  if (this === ObjectPrototype && hasOwn(AllSymbols, P) && !hasOwn(ObjectPrototypeSymbols, P)) return false;\n  return enumerable || !hasOwn(this, P) || !hasOwn(AllSymbols, P) || hasOwn(this, HIDDEN) && this[HIDDEN][P]\n    ? enumerable : true;\n};\n\nvar $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(O, P) {\n  var it = toIndexedObject(O);\n  var key = toPropertyKey(P);\n  if (it === ObjectPrototype && hasOwn(AllSymbols, key) && !hasOwn(ObjectPrototypeSymbols, key)) return;\n  var descriptor = nativeGetOwnPropertyDescriptor(it, key);\n  if (descriptor && hasOwn(AllSymbols, key) && !(hasOwn(it, HIDDEN) && it[HIDDEN][key])) {\n    descriptor.enumerable = true;\n  }\n  return descriptor;\n};\n\nvar $getOwnPropertyNames = function getOwnPropertyNames(O) {\n  var names = nativeGetOwnPropertyNames(toIndexedObject(O));\n  var result = [];\n  $forEach(names, function (key) {\n    if (!hasOwn(AllSymbols, key) && !hasOwn(hiddenKeys, key)) push(result, key);\n  });\n  return result;\n};\n\nvar $getOwnPropertySymbols = function (O) {\n  var IS_OBJECT_PROTOTYPE = O === ObjectPrototype;\n  var names = nativeGetOwnPropertyNames(IS_OBJECT_PROTOTYPE ? ObjectPrototypeSymbols : toIndexedObject(O));\n  var result = [];\n  $forEach(names, function (key) {\n    if (hasOwn(AllSymbols, key) && (!IS_OBJECT_PROTOTYPE || hasOwn(ObjectPrototype, key))) {\n      push(result, AllSymbols[key]);\n    }\n  });\n  return result;\n};\n\n// `Symbol` constructor\n// https://tc39.es/ecma262/#sec-symbol-constructor\nif (!NATIVE_SYMBOL) {\n  $Symbol = function Symbol() {\n    if (isPrototypeOf(SymbolPrototype, this)) throw new TypeError('Symbol is not a constructor');\n    var description = !arguments.length || arguments[0] === undefined ? undefined : $toString(arguments[0]);\n    var tag = uid(description);\n    var setter = function (value) {\n      var $this = this === undefined ? globalThis : this;\n      if ($this === ObjectPrototype) call(setter, ObjectPrototypeSymbols, value);\n      if (hasOwn($this, HIDDEN) && hasOwn($this[HIDDEN], tag)) $this[HIDDEN][tag] = false;\n      var descriptor = createPropertyDescriptor(1, value);\n      try {\n        setSymbolDescriptor($this, tag, descriptor);\n      } catch (error) {\n        if (!(error instanceof RangeError)) throw error;\n        fallbackDefineProperty($this, tag, descriptor);\n      }\n    };\n    if (DESCRIPTORS && USE_SETTER) setSymbolDescriptor(ObjectPrototype, tag, { configurable: true, set: setter });\n    return wrap(tag, description);\n  };\n\n  SymbolPrototype = $Symbol[PROTOTYPE];\n\n  defineBuiltIn(SymbolPrototype, 'toString', function toString() {\n    return getInternalState(this).tag;\n  });\n\n  defineBuiltIn($Symbol, 'withoutSetter', function (description) {\n    return wrap(uid(description), description);\n  });\n\n  propertyIsEnumerableModule.f = $propertyIsEnumerable;\n  definePropertyModule.f = $defineProperty;\n  definePropertiesModule.f = $defineProperties;\n  getOwnPropertyDescriptorModule.f = $getOwnPropertyDescriptor;\n  getOwnPropertyNamesModule.f = getOwnPropertyNamesExternal.f = $getOwnPropertyNames;\n  getOwnPropertySymbolsModule.f = $getOwnPropertySymbols;\n\n  wrappedWellKnownSymbolModule.f = function (name) {\n    return wrap(wellKnownSymbol(name), name);\n  };\n\n  if (DESCRIPTORS) {\n    // https://tc39.es/ecma262/#sec-symbol.prototype.description\n    defineBuiltInAccessor(SymbolPrototype, 'description', {\n      configurable: true,\n      get: function description() {\n        return getInternalState(this).description;\n      }\n    });\n    if (!IS_PURE) {\n      defineBuiltIn(ObjectPrototype, 'propertyIsEnumerable', $propertyIsEnumerable, { unsafe: true });\n    }\n  }\n}\n\n$({ global: true, constructor: true, wrap: true, forced: !NATIVE_SYMBOL, sham: !NATIVE_SYMBOL }, {\n  Symbol: $Symbol\n});\n\n$forEach(objectKeys(WellKnownSymbolsStore), function (name) {\n  defineWellKnownSymbol(name);\n});\n\n$({ target: SYMBOL, stat: true, forced: !NATIVE_SYMBOL }, {\n  useSetter: function () { USE_SETTER = true; },\n  useSimple: function () { USE_SETTER = false; }\n});\n\n$({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL, sham: !DESCRIPTORS }, {\n  // `Object.create` method\n  // https://tc39.es/ecma262/#sec-object.create\n  create: $create,\n  // `Object.defineProperty` method\n  // https://tc39.es/ecma262/#sec-object.defineproperty\n  defineProperty: $defineProperty,\n  // `Object.defineProperties` method\n  // https://tc39.es/ecma262/#sec-object.defineproperties\n  defineProperties: $defineProperties,\n  // `Object.getOwnPropertyDescriptor` method\n  // https://tc39.es/ecma262/#sec-object.getownpropertydescriptors\n  getOwnPropertyDescriptor: $getOwnPropertyDescriptor\n});\n\n$({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL }, {\n  // `Object.getOwnPropertyNames` method\n  // https://tc39.es/ecma262/#sec-object.getownpropertynames\n  getOwnPropertyNames: $getOwnPropertyNames\n});\n\n// `Symbol.prototype[@@toPrimitive]` method\n// https://tc39.es/ecma262/#sec-symbol.prototype-@@toprimitive\ndefineSymbolToPrimitive();\n\n// `Symbol.prototype[@@toStringTag]` property\n// https://tc39.es/ecma262/#sec-symbol.prototype-@@tostringtag\nsetToStringTag($Symbol, SYMBOL);\n\nhiddenKeys[HIDDEN] = true;\n", "'use strict';\nvar NATIVE_SYMBOL = require('../internals/symbol-constructor-detection');\n\n/* eslint-disable es/no-symbol -- safe */\nmodule.exports = NATIVE_SYMBOL && !!Symbol['for'] && !!Symbol.keyFor;\n", "'use strict';\nvar $ = require('../internals/export');\nvar getBuiltIn = require('../internals/get-built-in');\nvar hasOwn = require('../internals/has-own-property');\nvar toString = require('../internals/to-string');\nvar shared = require('../internals/shared');\nvar NATIVE_SYMBOL_REGISTRY = require('../internals/symbol-registry-detection');\n\nvar StringToSymbolRegistry = shared('string-to-symbol-registry');\nvar SymbolToStringRegistry = shared('symbol-to-string-registry');\n\n// `Symbol.for` method\n// https://tc39.es/ecma262/#sec-symbol.for\n$({ target: 'Symbol', stat: true, forced: !NATIVE_SYMBOL_REGISTRY }, {\n  'for': function (key) {\n    var string = toString(key);\n    if (hasOwn(StringToSymbolRegistry, string)) return StringToSymbolRegistry[string];\n    var symbol = getBuiltIn('Symbol')(string);\n    StringToSymbolRegistry[string] = symbol;\n    SymbolToStringRegistry[symbol] = string;\n    return symbol;\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar hasOwn = require('../internals/has-own-property');\nvar isSymbol = require('../internals/is-symbol');\nvar tryToString = require('../internals/try-to-string');\nvar shared = require('../internals/shared');\nvar NATIVE_SYMBOL_REGISTRY = require('../internals/symbol-registry-detection');\n\nvar SymbolToStringRegistry = shared('symbol-to-string-registry');\n\n// `Symbol.keyFor` method\n// https://tc39.es/ecma262/#sec-symbol.keyfor\n$({ target: 'Symbol', stat: true, forced: !NATIVE_SYMBOL_REGISTRY }, {\n  keyFor: function keyFor(sym) {\n    if (!isSymbol(sym)) throw new TypeError(tryToString(sym) + ' is not a symbol');\n    if (hasOwn(SymbolToStringRegistry, sym)) return SymbolToStringRegistry[sym];\n  }\n});\n", "'use strict';\nvar isObject = require('../internals/is-object');\nvar getInternalState = require('../internals/internal-state').get;\n\nmodule.exports = function isRawJSON(O) {\n  if (!isObject(O)) return false;\n  var state = getInternalState(O);\n  return !!state && state.type === 'RawJSON';\n};\n", "'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\n\n// `thisNumberValue` abstract operation\n// https://tc39.es/ecma262/#sec-thisnumbervalue\nmodule.exports = uncurryThis(1.1.valueOf);\n", "'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar hasOwn = require('../internals/has-own-property');\n\nvar $SyntaxError = SyntaxError;\nvar $parseInt = parseInt;\nvar fromCharCode = String.fromCharCode;\nvar at = uncurryThis(''.charAt);\nvar slice = uncurryThis(''.slice);\nvar exec = uncurryThis(/./.exec);\n\nvar codePoints = {\n  '\\\\\"': '\"',\n  '\\\\\\\\': '\\\\',\n  '\\\\/': '/',\n  '\\\\b': '\\b',\n  '\\\\f': '\\f',\n  '\\\\n': '\\n',\n  '\\\\r': '\\r',\n  '\\\\t': '\\t'\n};\n\nvar IS_4_HEX_DIGITS = /^[\\da-f]{4}$/i;\n// eslint-disable-next-line regexp/no-control-character -- safe\nvar IS_C0_CONTROL_CODE = /^[\\u0000-\\u001F]$/;\n\nmodule.exports = function (source, i) {\n  var unterminated = true;\n  var value = '';\n  while (i < source.length) {\n    var chr = at(source, i);\n    if (chr === '\\\\') {\n      var twoChars = slice(source, i, i + 2);\n      if (hasOwn(codePoints, twoChars)) {\n        value += codePoints[twoChars];\n        i += 2;\n      } else if (twoChars === '\\\\u') {\n        i += 2;\n        var fourHexDigits = slice(source, i, i + 4);\n        if (!exec(IS_4_HEX_DIGITS, fourHexDigits)) throw new $SyntaxError('Bad Unicode escape at: ' + i);\n        value += fromCharCode($parseInt(fourHexDigits, 16));\n        i += 4;\n      } else throw new $SyntaxError('Unknown escape sequence: \"' + twoChars + '\"');\n    } else if (chr === '\"') {\n      unterminated = false;\n      i++;\n      break;\n    } else {\n      if (exec(IS_C0_CONTROL_CODE, chr)) throw new $SyntaxError('Bad control character in string literal at: ' + i);\n      value += chr;\n      i++;\n    }\n  }\n  if (unterminated) throw new $SyntaxError('Unterminated string at: ' + i);\n  return { value: value, end: i };\n};\n", "'use strict';\n/* eslint-disable es/no-json -- safe */\nvar fails = require('../internals/fails');\n\nmodule.exports = !fails(function () {\n  var unsafeInt = '9007199254740993';\n  // eslint-disable-next-line es/no-json-rawjson -- feature detection\n  var raw = JSON.rawJSON(unsafeInt);\n  // eslint-disable-next-line es/no-json-israwjson -- feature detection\n  return !JSON.isRawJSON(raw) || JSON.stringify(raw) !== unsafeInt;\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar getBuiltIn = require('../internals/get-built-in');\nvar call = require('../internals/function-call');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar fails = require('../internals/fails');\nvar isArray = require('../internals/is-array');\nvar isCallable = require('../internals/is-callable');\nvar isObject = require('../internals/is-object');\nvar create = require('../internals/object-create');\nvar isRawJSON = require('../internals/is-raw-json');\nvar isSymbol = require('../internals/is-symbol');\nvar classof = require('../internals/classof-raw');\nvar thisNumberValue = require('../internals/this-number-value');\nvar includes = require('../internals/array-includes').includes;\nvar hasOwn = require('../internals/has-own-property');\nvar toString = require('../internals/to-string');\nvar parseJSONString = require('../internals/parse-json-string');\nvar uid = require('../internals/uid');\nvar NATIVE_SYMBOL = require('../internals/symbol-constructor-detection');\nvar NATIVE_RAW_JSON = require('../internals/native-raw-json');\n\nvar $String = String;\nvar $TypeError = TypeError;\nvar $stringify = getBuiltIn('JSON', 'stringify');\nvar $BigInt = getBuiltIn('BigInt');\nvar stringValueOf = uncurryThis(''.valueOf);\nvar booleanValueOf = uncurryThis(true.valueOf);\nvar bigIntValueOf = $BigInt && uncurryThis($BigInt.prototype.valueOf);\nvar exec = uncurryThis(/./.exec);\nvar charAt = uncurryThis(''.charAt);\nvar charCodeAt = uncurryThis(''.charCodeAt);\nvar replace = uncurryThis(''.replace);\nvar slice = uncurryThis(''.slice);\nvar push = uncurryThis([].push);\nvar pop = uncurryThis([].pop);\nvar numberToString = uncurryThis(1.1.toString);\n\nvar surrogates = /[\\uD800-\\uDFFF]/g;\nvar leadingSurrogates = /^[\\uD800-\\uDBFF]$/;\nvar trailingSurrogates = /^[\\uDC00-\\uDFFF]$/;\nvar digits = /^\\d+$/;\n\n// a placeholder of a raw JSON value\nvar RAW_MARK = uid();\n// a prefix of keys of a reordered object, see `createOrderedObject`\nvar KEY_MARK = uid();\n// the last key of a reordered object, marks the end of its serialization\nvar END_MARK = uid();\nvar RAW_MARK_LENGTH = RAW_MARK.length;\nvar KEY_MARK_LENGTH = KEY_MARK.length;\n\nvar WRONG_SYMBOLS_CONVERSION = !NATIVE_SYMBOL || fails(function () {\n  var symbol = getBuiltIn('Symbol')('stringify detection');\n  // MS Edge converts symbol values to JSON as {}\n  return $stringify([symbol]) !== '[null]'\n    // WebKit converts symbol values to JSON as null\n    || $stringify({ a: symbol }) !== '{}'\n    // V8 throws on boxed symbols\n    || $stringify(Object(symbol)) !== '{}';\n});\n\n// https://github.com/tc39/proposal-well-formed-stringify\nvar ILL_FORMED_UNICODE = fails(function () {\n  return $stringify('\\uDF06\\uD834') !== '\"\\\\udf06\\\\ud834\"'\n    || $stringify('\\uDEAD') !== '\"\\\\udead\"';\n});\n\nvar isRawJSONValue = NATIVE_RAW_JSON ? getBuiltIn('JSON', 'isRawJSON') : isRawJSON;\n\nvar stringifyWithProperSymbolsConversion = WRONG_SYMBOLS_CONVERSION ? function (it, replacer, space) {\n  return $stringify(it, function (key, value) {\n    var replaced = call(replacer, this, key, value);\n    if (!isSymbol(replaced)) return replaced;\n  }, space);\n} : $stringify;\n\nvar fixIllFormedJSON = function (match, offset, string) {\n  var prev = charAt(string, offset - 1);\n  var next = charAt(string, offset + 1);\n  if (\n    (exec(leadingSurrogates, match) && !exec(trailingSurrogates, next)) ||\n    (exec(trailingSurrogates, match) && !exec(leadingSurrogates, prev))\n  ) {\n    return '\\\\u' + numberToString(charCodeAt(match, 0), 16);\n  } return match;\n};\n\n// `PropertyList` of `JSON.stringify`\n// https://tc39.es/ecma262/#sec-json.stringify\nvar getPropertyList = function (replacer) {\n  if (!isArray(replacer)) return;\n  var rawLength = replacer.length;\n  var propertyList = [];\n  // a null prototype object is used as a set of already added keys to keep the deduplication linear\n  var addedKeys = create(null);\n  for (var i = 0; i < rawLength; i++) {\n    var element = replacer[i];\n    var key;\n    if (typeof element == 'string') key = element;\n    else if (typeof element == 'number' || classof(element) === 'Number' || classof(element) === 'String') key = toString(element);\n    else continue;\n    if (!hasOwn(addedKeys, key)) {\n      addedKeys[key] = true;\n      push(propertyList, key);\n    }\n  }\n  return propertyList;\n};\n\n// values with such an internal slot are unwrapped by `SerializeJSONProperty` instead of being serialized as objects\nvar hasInternalSlot = function (valueOf, it) {\n  try {\n    valueOf(it);\n    return true;\n  } catch (error) {\n    return false;\n  }\n};\n\n// the slot check is expensive, so it's performed only for the kind reported by the value itself -\n// a value lying about its kind via `Symbol.toStringTag` is serialized as an ordinary object\nvar isBoxedPrimitive = function (it) {\n  var kind = classof(it);\n  return (kind === 'Number' && hasInternalSlot(thisNumberValue, it))\n    || (kind === 'String' && hasInternalSlot(stringValueOf, it))\n    || (kind === 'Boolean' && hasInternalSlot(booleanValueOf, it))\n    || (!!bigIntValueOf && kind === 'BigInt' && hasInternalSlot(bigIntValueOf, it));\n};\n\n// only objects serialized by `SerializeJSONObject` are affected by the property list\nvar isSerializedAsObject = function (it) {\n  if (!isObject(it) || isCallable(it) || isArray(it)) return false;\n  try {\n    return !isBoxedPrimitive(it);\n  // `classof` reads `Symbol.toStringTag`, so a proxy could throw - it has no internal slots anyway\n  } catch (error) {\n    return true;\n  }\n};\n\n// the engine unwraps it in the same order as it would read the original property,\n// so the property is read lazily and `toJSON` is called once and with the original key\nvar createElementHolder = function (holder, key) {\n  return {\n    toJSON: function () {\n      var element = holder[key];\n      if (isObject(element) || typeof element == 'bigint') {\n        var elementToJSON = element.toJSON;\n        if (isCallable(elementToJSON)) element = call(elementToJSON, element, key);\n      } return element;\n    }\n  };\n};\n\n// own keys of objects are sorted - integer-like keys are moved to the beginning,\n// so such keys should be marked and restored in the serialized string\nvar getKeyPrefix = function (propertyList) {\n  for (var i = 0, length = propertyList.length; i < length; i++) {\n    if (exec(digits, propertyList[i])) return KEY_MARK;\n  } return '';\n};\n\n// `SerializeJSONObject` iterates the property list, so the value is replaced with an object with keys in this order\nvar createOrderedObject = function (value, propertyList, keyPrefix) {\n  // keys are not marked if the property list has no integer-like keys, so `Object.prototype`\n  // with a setter, a non-writable property or `__proto__` should not intercept the assignment\n  var ordered = create(null);\n  for (var i = 0, length = propertyList.length; i < length; i++) {\n    var key = propertyList[i];\n    ordered[keyPrefix + key] = createElementHolder(value, key);\n  }\n  ordered[END_MARK] = null;\n  return ordered;\n};\n\n// `JSON.stringify` method\n// https://tc39.es/ecma262/#sec-json.stringify\n// https://github.com/tc39/proposal-json-parse-with-source\nif ($stringify) $({ target: 'JSON', stat: true, arity: 3, forced: WRONG_SYMBOLS_CONVERSION || ILL_FORMED_UNICODE || !NATIVE_RAW_JSON }, {\n  stringify: function stringify(text, replacer, space) {\n    var replacerFunction = isCallable(replacer) ? replacer : undefined;\n    var propertyList = replacerFunction ? undefined : getPropertyList(replacer);\n    var keyPrefix = propertyList && getKeyPrefix(propertyList);\n    var rawStrings = [];\n    var openObjects = [];\n    var parentOrdered = [];\n    var currentOrdered;\n    var marked = false;\n    var root = true;\n\n    var json = stringifyWithProperSymbolsConversion(text, function (key, value) {\n      // some old implementations (like WebKit) could pass numbers as keys\n      key = $String(key);\n\n      if (propertyList) {\n        if (key === END_MARK) {\n          pop(openObjects);\n          currentOrdered = pop(parentOrdered);\n          return;\n        }\n        if (root) root = false;\n        // the innermost reordered object already contains only keys of the property list and arrays are not\n        // affected by it, the rest of objects (like objects with a fake `Symbol.toStringTag`) are filtered here\n        else if (this !== currentOrdered && !isArray(this) && !includes(propertyList, key)) return;\n      } else if (replacerFunction) value = call(replacerFunction, this, key, value);\n\n      if (isRawJSONValue(value)) {\n        if (NATIVE_RAW_JSON) return value;\n        marked = true;\n        return RAW_MARK + (push(rawStrings, value.rawJSON) - 1);\n      }\n\n      if (propertyList && isSerializedAsObject(value)) {\n        // reordered objects are new each time, so cycles should be detected before the engine does it\n        if (includes(openObjects, value)) throw new $TypeError('Converting circular structure to JSON');\n        var ordered = createOrderedObject(value, propertyList, keyPrefix);\n        push(openObjects, value);\n        push(parentOrdered, currentOrdered);\n        currentOrdered = ordered;\n        if (keyPrefix) marked = true;\n        return ordered;\n      }\n\n      return value;\n    }, space);\n\n    if (typeof json != 'string') return json;\n\n    if (ILL_FORMED_UNICODE) json = replace(json, surrogates, fixIllFormedJSON);\n\n    if (!marked) return json;\n\n    var result = '';\n    var length = json.length;\n\n    for (var i = 0; i < length; i++) {\n      var chr = charAt(json, i);\n      if (chr === '\"') {\n        var end = parseJSONString(json, ++i).end - 1;\n        var string = slice(json, i, end);\n        if (slice(string, 0, RAW_MARK_LENGTH) === RAW_MARK) result += rawStrings[slice(string, RAW_MARK_LENGTH)];\n        else if (slice(string, 0, KEY_MARK_LENGTH) === KEY_MARK) result += '\"' + slice(string, KEY_MARK_LENGTH) + '\"';\n        else result += '\"' + string + '\"';\n        i = end;\n      } else result += chr;\n    }\n\n    return result;\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar NATIVE_SYMBOL = require('../internals/symbol-constructor-detection');\nvar fails = require('../internals/fails');\nvar getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');\nvar toObject = require('../internals/to-object');\n\n// V8 ~ Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives\n// https://bugs.chromium.org/p/v8/issues/detail?id=3443\nvar FORCED = !NATIVE_SYMBOL || fails(function () { getOwnPropertySymbolsModule.f(1); });\n\n// `Object.getOwnPropertySymbols` method\n// https://tc39.es/ecma262/#sec-object.getownpropertysymbols\n$({ target: 'Object', stat: true, forced: FORCED }, {\n  getOwnPropertySymbols: function getOwnPropertySymbols(it) {\n    var $getOwnPropertySymbols = getOwnPropertySymbolsModule.f;\n    return $getOwnPropertySymbols ? $getOwnPropertySymbols(toObject(it)) : [];\n  }\n});\n", "'use strict';\n// TODO: Remove this module from `core-js@4` since it's split to modules listed below\nrequire('../modules/es.symbol.constructor');\nrequire('../modules/es.symbol.for');\nrequire('../modules/es.symbol.key-for');\nrequire('../modules/es.json.stringify');\nrequire('../modules/es.object.get-own-property-symbols');\n", "// `Symbol.prototype.description` getter\n// https://tc39.es/ecma262/#sec-symbol.prototype.description\n'use strict';\nvar $ = require('../internals/export');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar globalThis = require('../internals/global-this');\nvar call = require('../internals/function-call');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar hasOwn = require('../internals/has-own-property');\nvar isCallable = require('../internals/is-callable');\nvar isPrototypeOf = require('../internals/object-is-prototype-of');\nvar toString = require('../internals/to-string');\nvar defineBuiltInAccessor = require('../internals/define-built-in-accessor');\nvar copyConstructorProperties = require('../internals/copy-constructor-properties');\n\nvar NativeSymbol = globalThis.Symbol;\nvar SymbolPrototype = NativeSymbol && NativeSymbol.prototype;\n\nif (DESCRIPTORS && isCallable(NativeSymbol) && (!('description' in SymbolPrototype) ||\n  // Safari 12 bug\n  NativeSymbol().description !== undefined\n)) {\n  var EmptyStringDescriptionStore = {};\n  // wrap Symbol constructor for correct work with undefined description\n  var SymbolWrapper = function Symbol() {\n    var description = arguments.length < 1 || arguments[0] === undefined ? undefined : toString(arguments[0]);\n    var result = isPrototypeOf(SymbolPrototype, this)\n      // eslint-disable-next-line sonarjs/inconsistent-function-call -- ok\n      ? new NativeSymbol(description)\n      // in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)'\n      : description === undefined ? NativeSymbol() : NativeSymbol(description);\n    if (description === '') EmptyStringDescriptionStore[result] = true;\n    return result;\n  };\n\n  copyConstructorProperties(SymbolWrapper, NativeSymbol);\n  // wrap Symbol.for for correct handling of empty string descriptions\n  var nativeFor = SymbolWrapper['for'];\n  SymbolWrapper['for'] = { 'for': function (key) {\n    var stringKey = toString(key);\n    var symbol = call(nativeFor, this, stringKey);\n    if (stringKey === '') EmptyStringDescriptionStore[symbol] = true;\n    return symbol;\n  } }['for'];\n  SymbolWrapper.prototype = SymbolPrototype;\n  SymbolPrototype.constructor = SymbolWrapper;\n\n  var NATIVE_SYMBOL = String(NativeSymbol('description detection')) === 'Symbol(description detection)';\n  var thisSymbolValue = uncurryThis(SymbolPrototype.valueOf);\n  var symbolDescriptiveString = uncurryThis(SymbolPrototype.toString);\n  var regexp = /^Symbol\\((.*)\\)[^)]+$/;\n  var replace = uncurryThis(''.replace);\n  var stringSlice = uncurryThis(''.slice);\n\n  defineBuiltInAccessor(SymbolPrototype, 'description', {\n    configurable: true,\n    get: function description() {\n      var symbol = thisSymbolValue(this);\n      if (hasOwn(EmptyStringDescriptionStore, symbol)) return '';\n      var string = symbolDescriptiveString(symbol);\n      var desc = NATIVE_SYMBOL ? stringSlice(string, 7, -1) : replace(string, regexp, '$1');\n      return desc === '' ? undefined : desc;\n    }\n  });\n\n  $({ global: true, constructor: true, forced: true }, {\n    Symbol: SymbolWrapper\n  });\n}\n", "'use strict';\nvar globalThis = require('../internals/global-this');\nvar defineWellKnownSymbol = require('../internals/well-known-symbol-define');\nvar defineProperty = require('../internals/object-define-property').f;\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\n\nvar Symbol = globalThis.Symbol;\n\n// `Symbol.asyncDispose` well-known symbol\n// https://github.com/tc39/proposal-async-explicit-resource-management\ndefineWellKnownSymbol('asyncDispose');\n\nif (Symbol) {\n  var descriptor = getOwnPropertyDescriptor(Symbol, 'asyncDispose');\n  // workaround of NodeJS 20.4 bug\n  // https://github.com/nodejs/node/issues/48699\n  // and incorrect descriptor from some transpilers and userland helpers\n  if (descriptor.enumerable && descriptor.configurable && descriptor.writable) {\n    defineProperty(Symbol, 'asyncDispose', { value: descriptor.value, enumerable: false, configurable: false, writable: false });\n  }\n}\n", "'use strict';\nvar defineWellKnownSymbol = require('../internals/well-known-symbol-define');\n\n// `Symbol.asyncIterator` well-known symbol\n// https://tc39.es/ecma262/#sec-symbol.asynciterator\ndefineWellKnownSymbol('asyncIterator');\n", "'use strict';\nvar globalThis = require('../internals/global-this');\nvar defineWellKnownSymbol = require('../internals/well-known-symbol-define');\nvar defineProperty = require('../internals/object-define-property').f;\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\n\nvar Symbol = globalThis.Symbol;\n\n// `Symbol.dispose` well-known symbol\n// https://github.com/tc39/proposal-explicit-resource-management\ndefineWellKnownSymbol('dispose');\n\nif (Symbol) {\n  var descriptor = getOwnPropertyDescriptor(Symbol, 'dispose');\n  // workaround of NodeJS 20.4 bug\n  // https://github.com/nodejs/node/issues/48699\n  // and incorrect descriptor from some transpilers and userland helpers\n  if (descriptor.enumerable && descriptor.configurable && descriptor.writable) {\n    defineProperty(Symbol, 'dispose', { value: descriptor.value, enumerable: false, configurable: false, writable: false });\n  }\n}\n", "'use strict';\nvar defineWellKnownSymbol = require('../internals/well-known-symbol-define');\n\n// `Symbol.hasInstance` well-known symbol\n// https://tc39.es/ecma262/#sec-symbol.hasinstance\ndefineWellKnownSymbol('hasInstance');\n", "'use strict';\nvar defineWellKnownSymbol = require('../internals/well-known-symbol-define');\n\n// `Symbol.isConcatSpreadable` well-known symbol\n// https://tc39.es/ecma262/#sec-symbol.isconcatspreadable\ndefineWellKnownSymbol('isConcatSpreadable');\n", "'use strict';\nvar defineWellKnownSymbol = require('../internals/well-known-symbol-define');\n\n// `Symbol.iterator` well-known symbol\n// https://tc39.es/ecma262/#sec-symbol.iterator\ndefineWellKnownSymbol('iterator');\n", "'use strict';\nvar defineWellKnownSymbol = require('../internals/well-known-symbol-define');\n\n// `Symbol.match` well-known symbol\n// https://tc39.es/ecma262/#sec-symbol.match\ndefineWellKnownSymbol('match');\n", "'use strict';\nvar defineWellKnownSymbol = require('../internals/well-known-symbol-define');\n\n// `Symbol.matchAll` well-known symbol\n// https://tc39.es/ecma262/#sec-symbol.matchall\ndefineWellKnownSymbol('matchAll');\n", "'use strict';\nvar defineWellKnownSymbol = require('../internals/well-known-symbol-define');\n\n// `Symbol.replace` well-known symbol\n// https://tc39.es/ecma262/#sec-symbol.replace\ndefineWellKnownSymbol('replace');\n", "'use strict';\nvar defineWellKnownSymbol = require('../internals/well-known-symbol-define');\n\n// `Symbol.search` well-known symbol\n// https://tc39.es/ecma262/#sec-symbol.search\ndefineWellKnownSymbol('search');\n", "'use strict';\nvar defineWellKnownSymbol = require('../internals/well-known-symbol-define');\n\n// `Symbol.species` well-known symbol\n// https://tc39.es/ecma262/#sec-symbol.species\ndefineWellKnownSymbol('species');\n", "'use strict';\nvar defineWellKnownSymbol = require('../internals/well-known-symbol-define');\n\n// `Symbol.split` well-known symbol\n// https://tc39.es/ecma262/#sec-symbol.split\ndefineWellKnownSymbol('split');\n", "'use strict';\nvar defineWellKnownSymbol = require('../internals/well-known-symbol-define');\nvar defineSymbolToPrimitive = require('../internals/symbol-define-to-primitive');\n\n// `Symbol.toPrimitive` well-known symbol\n// https://tc39.es/ecma262/#sec-symbol.toprimitive\ndefineWellKnownSymbol('toPrimitive');\n\n// `Symbol.prototype[@@toPrimitive]` method\n// https://tc39.es/ecma262/#sec-symbol.prototype-@@toprimitive\ndefineSymbolToPrimitive();\n", "'use strict';\nvar getBuiltIn = require('../internals/get-built-in');\nvar defineWellKnownSymbol = require('../internals/well-known-symbol-define');\nvar setToStringTag = require('../internals/set-to-string-tag');\n\n// `Symbol.toStringTag` well-known symbol\n// https://tc39.es/ecma262/#sec-symbol.tostringtag\ndefineWellKnownSymbol('toStringTag');\n\n// `Symbol.prototype[@@toStringTag]` property\n// https://tc39.es/ecma262/#sec-symbol.prototype-@@tostringtag\nsetToStringTag(getBuiltIn('Symbol'), 'Symbol');\n", "'use strict';\nvar defineWellKnownSymbol = require('../internals/well-known-symbol-define');\n\n// `Symbol.unscopables` well-known symbol\n// https://tc39.es/ecma262/#sec-symbol.unscopables\ndefineWellKnownSymbol('unscopables');\n", "'use strict';\nvar NATIVE_BIND = require('../internals/function-bind-native');\n\nvar FunctionPrototype = Function.prototype;\nvar apply = FunctionPrototype.apply;\nvar call = FunctionPrototype.call;\n\n// eslint-disable-next-line es/no-function-prototype-bind, es/no-reflect -- safe\nmodule.exports = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call.bind(apply) : function () {\n  return call.apply(apply, arguments);\n});\n", "'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar aCallable = require('../internals/a-callable');\n\nmodule.exports = function (object, key, method) {\n  try {\n    // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\n    return uncurryThis(aCallable(Object.getOwnPropertyDescriptor(object, key)[method]));\n  } catch (error) { /* empty */ }\n};\n", "'use strict';\nvar isObject = require('../internals/is-object');\n\nmodule.exports = function (argument) {\n  return isObject(argument) || argument === null;\n};\n", "'use strict';\nvar isPossiblePrototype = require('../internals/is-possible-prototype');\n\nvar $String = String;\nvar $TypeError = TypeError;\n\nmodule.exports = function (argument) {\n  if (isPossiblePrototype(argument)) return argument;\n  throw new $TypeError(\"Can't set \" + $String(argument) + ' as a prototype');\n};\n", "'use strict';\n/* eslint-disable no-proto -- safe */\nvar uncurryThisAccessor = require('../internals/function-uncurry-this-accessor');\nvar isObject = require('../internals/is-object');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar aPossiblePrototype = require('../internals/a-possible-prototype');\n\n// `Object.setPrototypeOf` method\n// https://tc39.es/ecma262/#sec-object.setprototypeof\n// Works with __proto__ only. Old v8 can't work with null proto objects.\n// eslint-disable-next-line es/no-object-setprototypeof -- safe\nmodule.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {\n  var CORRECT_SETTER = false;\n  var test = {};\n  var setter;\n  try {\n    setter = uncurryThisAccessor(Object.prototype, '__proto__', 'set');\n    setter(test, []);\n    CORRECT_SETTER = test instanceof Array;\n  } catch (error) { /* empty */ }\n  return function setPrototypeOf(O, proto) {\n    requireObjectCoercible(O);\n    aPossiblePrototype(proto);\n    if (!isObject(O)) return O;\n    if (CORRECT_SETTER) setter(O, proto);\n    else O.__proto__ = proto;\n    return O;\n  };\n}() : undefined);\n", "'use strict';\nvar defineProperty = require('../internals/object-define-property').f;\n\nmodule.exports = function (Target, Source, key) {\n  key in Target || defineProperty(Target, key, {\n    configurable: true,\n    get: function () { return Source[key]; },\n    set: function (it) { Source[key] = it; }\n  });\n};\n", "'use strict';\nvar isCallable = require('../internals/is-callable');\nvar isObject = require('../internals/is-object');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\n\n// makes subclassing work correct for wrapped built-ins\nmodule.exports = function ($this, dummy, Wrapper) {\n  var NewTarget, NewTargetPrototype;\n  if (\n    // it can work only with native `setPrototypeOf`\n    setPrototypeOf &&\n    // we haven't completely correct pre-ES6 way for getting `new.target`, so use this\n    isCallable(NewTarget = dummy.constructor) &&\n    NewTarget !== Wrapper &&\n    isObject(NewTargetPrototype = NewTarget.prototype) &&\n    NewTargetPrototype !== Wrapper.prototype\n  ) setPrototypeOf($this, NewTargetPrototype);\n  return $this;\n};\n", "'use strict';\nvar toString = require('../internals/to-string');\n\nmodule.exports = function (argument, $default) {\n  return argument === undefined ? arguments.length < 2 ? '' : $default : toString(argument);\n};\n", "'use strict';\nvar isObject = require('../internals/is-object');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\n\n// `InstallErrorCause` abstract operation\n// https://tc39.es/ecma262/#sec-installerrorcause\nmodule.exports = function (O, options) {\n  if (isObject(options) && 'cause' in options) {\n    createNonEnumerableProperty(O, 'cause', options.cause);\n  }\n};\n", "'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\n\nvar $Error = Error;\nvar replace = uncurryThis(''.replace);\n\nvar TEST = (function (arg) { return String(new $Error(arg).stack); })('zxcasd');\n// eslint-disable-next-line redos/no-vulnerable -- safe\nvar V8_OR_CHAKRA_STACK_ENTRY = /\\n\\s*at [^:]*:[^\\n]*/;\nvar IS_V8_OR_CHAKRA_STACK = V8_OR_CHAKRA_STACK_ENTRY.test(TEST);\n\nmodule.exports = function (stack, dropEntries) {\n  if (IS_V8_OR_CHAKRA_STACK && typeof stack == 'string' && !$Error.prepareStackTrace) {\n    while (dropEntries--) stack = replace(stack, V8_OR_CHAKRA_STACK_ENTRY, '');\n  } return stack;\n};\n", "'use strict';\nvar fails = require('../internals/fails');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nmodule.exports = !fails(function () {\n  var error = new Error('a');\n  if (!('stack' in error)) return true;\n  // eslint-disable-next-line es/no-object-defineproperty -- safe\n  Object.defineProperty(error, 'stack', createPropertyDescriptor(1, 7));\n  return error.stack !== 7;\n});\n", "'use strict';\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar clearErrorStack = require('../internals/error-stack-clear');\nvar ERROR_STACK_INSTALLABLE = require('../internals/error-stack-installable');\n\n// non-standard V8\n// eslint-disable-next-line es/no-nonstandard-error-properties -- safe\nvar captureStackTrace = Error.captureStackTrace;\n\nmodule.exports = function (error, C, stack, dropEntries) {\n  if (ERROR_STACK_INSTALLABLE) {\n    if (captureStackTrace) captureStackTrace(error, C);\n    else createNonEnumerableProperty(error, 'stack', clearErrorStack(stack, dropEntries));\n  }\n};\n", "'use strict';\nvar getBuiltIn = require('../internals/get-built-in');\nvar hasOwn = require('../internals/has-own-property');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar isPrototypeOf = require('../internals/object-is-prototype-of');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar copyConstructorProperties = require('../internals/copy-constructor-properties');\nvar proxyAccessor = require('../internals/proxy-accessor');\nvar inheritIfRequired = require('../internals/inherit-if-required');\nvar normalizeStringArgument = require('../internals/normalize-string-argument');\nvar installErrorCause = require('../internals/install-error-cause');\nvar installErrorStack = require('../internals/error-stack-install');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar IS_PURE = require('../internals/is-pure');\n\nmodule.exports = function (FULL_NAME, wrapper, FORCED, IS_AGGREGATE_ERROR) {\n  var STACK_TRACE_LIMIT = 'stackTraceLimit';\n  var OPTIONS_POSITION = IS_AGGREGATE_ERROR ? 2 : 1;\n  var path = FULL_NAME.split('.');\n  var ERROR_NAME = path[path.length - 1];\n  var OriginalError = getBuiltIn.apply(null, path);\n\n  if (!OriginalError) return;\n\n  var OriginalErrorPrototype = OriginalError.prototype;\n\n  // V8 9.3- bug https://bugs.chromium.org/p/v8/issues/detail?id=12006\n  if (!IS_PURE && hasOwn(OriginalErrorPrototype, 'cause')) delete OriginalErrorPrototype.cause;\n\n  if (!FORCED) return OriginalError;\n\n  var BaseError = getBuiltIn('Error');\n\n  var WrappedError = wrapper(function (a, b) {\n    var message = normalizeStringArgument(IS_AGGREGATE_ERROR ? b : a, undefined);\n    var result = IS_AGGREGATE_ERROR ? new OriginalError(a) : new OriginalError();\n    if (message !== undefined) createNonEnumerableProperty(result, 'message', message);\n    installErrorStack(result, WrappedError, result.stack, 2);\n    if (this && isPrototypeOf(OriginalErrorPrototype, this)) inheritIfRequired(result, this, WrappedError);\n    if (arguments.length > OPTIONS_POSITION) installErrorCause(result, arguments[OPTIONS_POSITION]);\n    return result;\n  });\n\n  WrappedError.prototype = OriginalErrorPrototype;\n\n  if (ERROR_NAME !== 'Error') {\n    if (setPrototypeOf) setPrototypeOf(WrappedError, BaseError);\n    else copyConstructorProperties(WrappedError, BaseError, { name: true });\n  } else if (DESCRIPTORS && STACK_TRACE_LIMIT in OriginalError) {\n    proxyAccessor(WrappedError, OriginalError, STACK_TRACE_LIMIT);\n    proxyAccessor(WrappedError, OriginalError, 'prepareStackTrace');\n  }\n\n  copyConstructorProperties(WrappedError, OriginalError);\n\n  if (!IS_PURE) try {\n    // Safari 13- bug: WebAssembly errors does not have a proper `.name`\n    if (OriginalErrorPrototype.name !== ERROR_NAME) {\n      createNonEnumerableProperty(OriginalErrorPrototype, 'name', ERROR_NAME);\n    }\n    OriginalErrorPrototype.constructor = WrappedError;\n  } catch (error) { /* empty */ }\n\n  return WrappedError;\n};\n", "'use strict';\n/* eslint-disable no-unused-vars -- required for functions `.length` */\nvar $ = require('../internals/export');\nvar globalThis = require('../internals/global-this');\nvar apply = require('../internals/function-apply');\nvar wrapErrorConstructorWithCause = require('../internals/wrap-error-constructor-with-cause');\n\nvar WEB_ASSEMBLY = 'WebAssembly';\nvar WebAssembly = globalThis[WEB_ASSEMBLY];\n\n// eslint-disable-next-line es/no-error-cause -- feature detection\nvar FORCED = new Error('e', { cause: 7 }).cause !== 7;\n\nvar exportGlobalErrorCauseWrapper = function (ERROR_NAME, wrapper) {\n  var O = {};\n  // eslint-disable-next-line unicorn/no-immediate-mutation -- ES3 syntax limitation\n  O[ERROR_NAME] = wrapErrorConstructorWithCause(ERROR_NAME, wrapper, FORCED);\n  $({ global: true, constructor: true, arity: 1, forced: FORCED }, O);\n};\n\nvar exportWebAssemblyErrorCauseWrapper = function (ERROR_NAME, wrapper) {\n  if (WebAssembly && WebAssembly[ERROR_NAME]) {\n    var O = {};\n    // eslint-disable-next-line unicorn/no-immediate-mutation -- ES3 syntax limitation\n    O[ERROR_NAME] = wrapErrorConstructorWithCause(WEB_ASSEMBLY + '.' + ERROR_NAME, wrapper, FORCED);\n    $({ target: WEB_ASSEMBLY, stat: true, constructor: true, arity: 1, forced: FORCED }, O);\n  }\n};\n\n// https://tc39.es/ecma262/#sec-nativeerror\nexportGlobalErrorCauseWrapper('Error', function (init) {\n  return function Error(message) { return apply(init, this, arguments); };\n});\nexportGlobalErrorCauseWrapper('EvalError', function (init) {\n  return function EvalError(message) { return apply(init, this, arguments); };\n});\nexportGlobalErrorCauseWrapper('RangeError', function (init) {\n  return function RangeError(message) { return apply(init, this, arguments); };\n});\nexportGlobalErrorCauseWrapper('ReferenceError', function (init) {\n  return function ReferenceError(message) { return apply(init, this, arguments); };\n});\nexportGlobalErrorCauseWrapper('SyntaxError', function (init) {\n  return function SyntaxError(message) { return apply(init, this, arguments); };\n});\nexportGlobalErrorCauseWrapper('TypeError', function (init) {\n  return function TypeError(message) { return apply(init, this, arguments); };\n});\nexportGlobalErrorCauseWrapper('URIError', function (init) {\n  return function URIError(message) { return apply(init, this, arguments); };\n});\nexportWebAssemblyErrorCauseWrapper('CompileError', function (init) {\n  return function CompileError(message) { return apply(init, this, arguments); };\n});\nexportWebAssemblyErrorCauseWrapper('LinkError', function (init) {\n  return function LinkError(message) { return apply(init, this, arguments); };\n});\nexportWebAssemblyErrorCauseWrapper('RuntimeError', function (init) {\n  return function RuntimeError(message) { return apply(init, this, arguments); };\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar getBuiltIn = require('../internals/get-built-in');\nvar isObject = require('../internals/is-object');\nvar classof = require('../internals/classof');\nvar fails = require('../internals/fails');\n\nvar ERROR = 'Error';\nvar DOM_EXCEPTION = 'DOMException';\n// eslint-disable-next-line es/no-object-setprototypeof, no-proto -- safe\nvar PROTOTYPE_SETTING_AVAILABLE = Object.setPrototypeOf || {}.__proto__;\n\nvar DOMException = getBuiltIn(DOM_EXCEPTION);\nvar $Error = Error;\n// eslint-disable-next-line es/no-error-iserror -- safe\nvar $isError = $Error.isError;\n\nvar FORCED = !$isError || !PROTOTYPE_SETTING_AVAILABLE || fails(function () {\n  // Bun, isNativeError-based implementations, some buggy structuredClone-based implementations, etc.\n  // https://github.com/oven-sh/bun/issues/15821\n  return (DOMException && !$isError(new DOMException(DOM_EXCEPTION))) ||\n    // structuredClone-based implementations\n    // eslint-disable-next-line es/no-error-cause -- detection\n    !$isError(new $Error(ERROR, { cause: function () { /* empty */ } })) ||\n    // instanceof-based and FF Error#stack-based implementations\n    $isError(getBuiltIn('Object', 'create')($Error.prototype));\n});\n\n// `Error.isError` method\n// https://tc39.es/ecma262/#sec-error.iserror\n$({ target: 'Error', stat: true, sham: true, forced: FORCED }, {\n  isError: function isError(arg) {\n    if (!isObject(arg)) return false;\n    var tag = classof(arg);\n    return tag === ERROR || tag === DOM_EXCEPTION;\n  }\n});\n", "'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar fails = require('../internals/fails');\nvar anObject = require('../internals/an-object');\nvar normalizeStringArgument = require('../internals/normalize-string-argument');\n\nvar nativeErrorToString = Error.prototype.toString;\n\nvar INCORRECT_TO_STRING = fails(function () {\n  if (DESCRIPTORS) {\n    // Chrome 32- incorrectly call accessor\n    // eslint-disable-next-line es/no-object-create, es/no-object-defineproperty -- safe\n    var object = Object.create(Object.defineProperty({}, 'name', { get: function () {\n      return this === object;\n    } }));\n    if (nativeErrorToString.call(object) !== 'true') return true;\n  }\n  // FF10- does not properly handle non-strings\n  return nativeErrorToString.call({ message: 1, name: 2 }) !== '2: 1'\n    // IE8 does not properly handle defaults\n    || nativeErrorToString.call({}) !== 'Error';\n});\n\nmodule.exports = INCORRECT_TO_STRING ? function toString() {\n  var O = anObject(this);\n  var name = normalizeStringArgument(O.name, 'Error');\n  var message = normalizeStringArgument(O.message);\n  return !name ? message : !message ? name : name + ': ' + message;\n} : nativeErrorToString;\n", "'use strict';\nvar defineBuiltIn = require('../internals/define-built-in');\nvar errorToString = require('../internals/error-to-string');\n\nvar ErrorPrototype = Error.prototype;\n\n// `Error.prototype.toString` method fix\n// https://tc39.es/ecma262/#sec-error.prototype.tostring\nif (ErrorPrototype.toString !== errorToString) {\n  defineBuiltIn(ErrorPrototype, 'toString', errorToString);\n}\n", "'use strict';\nvar fails = require('../internals/fails');\n\nmodule.exports = !fails(function () {\n  function F() { /* empty */ }\n  F.prototype.constructor = null;\n  // eslint-disable-next-line es/no-object-getprototypeof -- required for testing\n  return Object.getPrototypeOf(new F()) !== F.prototype;\n});\n", "'use strict';\nvar hasOwn = require('../internals/has-own-property');\nvar isCallable = require('../internals/is-callable');\nvar toObject = require('../internals/to-object');\nvar sharedKey = require('../internals/shared-key');\nvar CORRECT_PROTOTYPE_GETTER = require('../internals/correct-prototype-getter');\n\nvar IE_PROTO = sharedKey('IE_PROTO');\nvar $Object = Object;\nvar ObjectPrototype = $Object.prototype;\n\n// `Object.getPrototypeOf` method\n// https://tc39.es/ecma262/#sec-object.getprototypeof\n// eslint-disable-next-line es/no-object-getprototypeof -- safe\nmodule.exports = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : function (O) {\n  var object = toObject(O);\n  if (hasOwn(object, IE_PROTO)) return object[IE_PROTO];\n  var constructor = object.constructor;\n  if (isCallable(constructor) && object instanceof constructor) {\n    return constructor.prototype;\n  } return object instanceof $Object ? ObjectPrototype : null;\n};\n", "'use strict';\nmodule.exports = Object.create ? Object.create(null) : {};\n", "'use strict';\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar Iterators = require('../internals/iterators');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar ArrayPrototype = Array.prototype;\n\n// check on default Array iterator\nmodule.exports = function (it) {\n  return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);\n};\n", "'use strict';\nvar classof = require('../internals/classof-raw');\nvar isNullOrUndefined = require('../internals/is-null-or-undefined');\nvar getMethod = require('../internals/get-method');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar ArrayPrototype = Array.prototype;\n\nmodule.exports = function (it) {\n  if (!isNullOrUndefined(it)) return getMethod(it, ITERATOR)\n    || getMethod(it, '@@iterator')\n    || (classof(it) === 'Arguments' ? ArrayPrototype[ITERATOR] : undefined);\n};\n", "'use strict';\nvar call = require('../internals/function-call');\nvar isCallable = require('../internals/is-callable');\nvar anObject = require('../internals/an-object');\nvar tryToString = require('../internals/try-to-string');\nvar getIteratorMethod = require('../internals/get-iterator-method-internal');\n\nvar $TypeError = TypeError;\n\nmodule.exports = function (argument, usingIterator) {\n  var iteratorMethod = arguments.length < 2 ? getIteratorMethod(argument) : usingIterator;\n  if (isCallable(iteratorMethod)) return anObject(call(iteratorMethod, argument));\n  throw new $TypeError(tryToString(argument) + ' is not iterable');\n};\n", "'use strict';\nvar call = require('../internals/function-call');\nvar anObject = require('../internals/an-object');\nvar getMethod = require('../internals/get-method');\n\nmodule.exports = function (iterator, kind, value) {\n  var innerResult, innerError;\n  anObject(iterator);\n  try {\n    innerResult = getMethod(iterator, 'return');\n    if (!innerResult) {\n      if (kind === 'throw') throw value;\n      return value;\n    }\n    innerResult = call(innerResult, iterator);\n  } catch (error) {\n    innerError = true;\n    innerResult = error;\n  }\n  if (kind === 'throw') throw value;\n  if (innerError) throw innerResult;\n  anObject(innerResult);\n  return value;\n};\n", "'use strict';\nvar bind = require('../internals/function-bind-context');\nvar call = require('../internals/function-call');\nvar anObject = require('../internals/an-object');\nvar tryToString = require('../internals/try-to-string');\nvar isArrayIteratorMethod = require('../internals/is-array-iterator-method');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar isPrototypeOf = require('../internals/object-is-prototype-of');\nvar getIterator = require('../internals/get-iterator-internal');\nvar getIteratorMethod = require('../internals/get-iterator-method-internal');\nvar iteratorClose = require('../internals/iterator-close');\n\nvar $TypeError = TypeError;\n\nvar Result = function (stopped, result) {\n  this.stopped = stopped;\n  this.result = result;\n};\n\nvar ResultPrototype = Result.prototype;\n\nmodule.exports = function (iterable, unboundFunction, options) {\n  var that = options && options.that;\n  var AS_ENTRIES = !!(options && options.AS_ENTRIES);\n  var IS_RECORD = !!(options && options.IS_RECORD);\n  var IS_ITERATOR = !!(options && options.IS_ITERATOR);\n  var INTERRUPTED = !!(options && options.INTERRUPTED);\n  var fn = bind(unboundFunction, that);\n  var iterator, iterFn, index, length, result, next, step;\n\n  var stop = function (condition) {\n    var $iterator = iterator;\n    iterator = undefined;\n    if ($iterator) iteratorClose($iterator, 'normal');\n    return new Result(true, condition);\n  };\n\n  var callFn = function (value) {\n    if (AS_ENTRIES) {\n      anObject(value);\n      return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);\n    } return INTERRUPTED ? fn(value, stop) : fn(value);\n  };\n\n  if (IS_RECORD) {\n    iterator = iterable.iterator;\n  } else if (IS_ITERATOR) {\n    iterator = iterable;\n  } else {\n    iterFn = getIteratorMethod(iterable);\n    if (!iterFn) throw new $TypeError(tryToString(iterable) + ' is not iterable');\n    // optimisation for array iterators\n    if (isArrayIteratorMethod(iterFn)) {\n      for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {\n        result = callFn(iterable[index]);\n        if (result && isPrototypeOf(ResultPrototype, result)) return result;\n      } return new Result(false);\n    }\n    iterator = getIterator(iterable, iterFn);\n  }\n\n  next = IS_RECORD ? iterable.next : iterator.next;\n  while (!(step = call(next, iterator)).done) {\n    // `IteratorValue` errors should propagate without closing the iterator\n    var value = step.value;\n    try {\n      result = callFn(value);\n    } catch (error) {\n      if (iterator) iteratorClose(iterator, 'throw', error);\n      else throw error;\n    }\n    if (typeof result == 'object' && result && isPrototypeOf(ResultPrototype, result)) return result;\n  } return new Result(false);\n};\n", "'use strict';\nvar $ = require('../internals/export');\nvar isPrototypeOf = require('../internals/object-is-prototype-of');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar copyConstructorProperties = require('../internals/copy-constructor-properties');\nvar create = require('../internals/object-create');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar installErrorCause = require('../internals/install-error-cause');\nvar installErrorStack = require('../internals/error-stack-install');\nvar iterate = require('../internals/iterate');\nvar normalizeStringArgument = require('../internals/normalize-string-argument');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar $Error = Error;\nvar push = [].push;\n\nvar $AggregateError = function AggregateError(errors, message /* , options */) {\n  var isInstance = isPrototypeOf(AggregateErrorPrototype, this);\n  var that;\n  if (setPrototypeOf) {\n    that = setPrototypeOf(new $Error(), isInstance ? getPrototypeOf(this) : AggregateErrorPrototype);\n  } else {\n    that = isInstance ? this : create(AggregateErrorPrototype);\n    createNonEnumerableProperty(that, TO_STRING_TAG, 'Error');\n  }\n  if (message !== undefined) createNonEnumerableProperty(that, 'message', normalizeStringArgument(message));\n  installErrorStack(that, $AggregateError, that.stack, 1);\n  if (arguments.length > 2) installErrorCause(that, arguments[2]);\n  var errorsArray = [];\n  iterate(errors, push, { that: errorsArray });\n  createNonEnumerableProperty(that, 'errors', errorsArray);\n  return that;\n};\n\nif (setPrototypeOf) setPrototypeOf($AggregateError, $Error);\nelse copyConstructorProperties($AggregateError, $Error, { name: true });\n\nvar AggregateErrorPrototype = $AggregateError.prototype = create($Error.prototype, {\n  constructor: createPropertyDescriptor(1, $AggregateError),\n  message: createPropertyDescriptor(1, ''),\n  name: createPropertyDescriptor(1, 'AggregateError')\n});\n\n// `AggregateError` constructor\n// https://tc39.es/ecma262/#sec-aggregate-error-constructor\n$({ global: true, constructor: true, arity: 2 }, {\n  AggregateError: $AggregateError\n});\n", "'use strict';\n// TODO: Remove this module from `core-js@4` since it's replaced to module below\nrequire('../modules/es.aggregate-error.constructor');\n", "'use strict';\nvar $ = require('../internals/export');\nvar getBuiltIn = require('../internals/get-built-in');\nvar apply = require('../internals/function-apply');\nvar fails = require('../internals/fails');\nvar wrapErrorConstructorWithCause = require('../internals/wrap-error-constructor-with-cause');\n\nvar AGGREGATE_ERROR = 'AggregateError';\nvar $AggregateError = getBuiltIn(AGGREGATE_ERROR);\n\nvar FORCED = !fails(function () {\n  return $AggregateError([1]).errors[0] !== 1;\n}) && fails(function () {\n  return $AggregateError([1], AGGREGATE_ERROR, { cause: 7 }).cause !== 7;\n});\n\n// https://tc39.es/ecma262/#sec-aggregate-error\n$({ global: true, constructor: true, arity: 2, forced: FORCED }, {\n  AggregateError: wrapErrorConstructorWithCause(AGGREGATE_ERROR, function (init) {\n    // eslint-disable-next-line no-unused-vars -- required for functions `.length`\n    return function AggregateError(errors, message) { return apply(init, this, arguments); };\n  }, FORCED, true)\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar globalThis = require('../internals/global-this');\nvar isPrototypeOf = require('../internals/object-is-prototype-of');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar copyConstructorProperties = require('../internals/copy-constructor-properties');\nvar create = require('../internals/object-create');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar installErrorStack = require('../internals/error-stack-install');\nvar normalizeStringArgument = require('../internals/normalize-string-argument');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar fails = require('../internals/fails');\nvar IS_PURE = require('../internals/is-pure');\n\nvar NativeSuppressedError = globalThis.SuppressedError;\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar $Error = Error;\n\n// https://github.com/oven-sh/bun/issues/9282\nvar WRONG_ARITY = !!NativeSuppressedError && NativeSuppressedError.length !== 3;\n\n// https://github.com/oven-sh/bun/issues/9283\nvar EXTRA_ARGS_SUPPORT = !!NativeSuppressedError && fails(function () {\n  return new NativeSuppressedError(1, 2, 3, { cause: 4 }).cause === 4;\n});\n\nvar PATCH = WRONG_ARITY || EXTRA_ARGS_SUPPORT;\n\nvar $SuppressedError = function SuppressedError(error, suppressed, message) {\n  var isInstance = isPrototypeOf(SuppressedErrorPrototype, this);\n  var that;\n  if (setPrototypeOf) {\n    that = PATCH && (!isInstance || getPrototypeOf(this) === SuppressedErrorPrototype)\n      ? new NativeSuppressedError()\n      : setPrototypeOf(new $Error(), isInstance ? getPrototypeOf(this) : SuppressedErrorPrototype);\n  } else {\n    that = isInstance ? this : create(SuppressedErrorPrototype);\n    createNonEnumerableProperty(that, TO_STRING_TAG, 'Error');\n  }\n  if (message !== undefined) createNonEnumerableProperty(that, 'message', normalizeStringArgument(message));\n  installErrorStack(that, $SuppressedError, that.stack, 1);\n  createNonEnumerableProperty(that, 'error', error);\n  createNonEnumerableProperty(that, 'suppressed', suppressed);\n  return that;\n};\n\nif (setPrototypeOf) setPrototypeOf($SuppressedError, $Error);\nelse copyConstructorProperties($SuppressedError, $Error, { name: true });\n\nvar SuppressedErrorPrototype = $SuppressedError.prototype = PATCH ? NativeSuppressedError.prototype : create($Error.prototype, {\n  constructor: createPropertyDescriptor(1, $SuppressedError),\n  message: createPropertyDescriptor(1, ''),\n  name: createPropertyDescriptor(1, 'SuppressedError')\n});\n\nif (PATCH && !IS_PURE) SuppressedErrorPrototype.constructor = $SuppressedError;\n\n// `SuppressedError` constructor\n// https://github.com/tc39/proposal-explicit-resource-management\n$({ global: true, constructor: true, arity: 3, forced: PATCH }, {\n  SuppressedError: $SuppressedError\n});\n", "'use strict';\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar create = require('../internals/object-create');\nvar defineProperty = require('../internals/object-define-property').f;\n\nvar UNSCOPABLES = wellKnownSymbol('unscopables');\nvar ArrayPrototype = Array.prototype;\n\n// Array.prototype[@@unscopables]\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\nif (ArrayPrototype[UNSCOPABLES] === undefined) {\n  defineProperty(ArrayPrototype, UNSCOPABLES, {\n    configurable: true,\n    value: create(null)\n  });\n}\n\n// add a key to Array.prototype[@@unscopables]\nmodule.exports = function (key) {\n  ArrayPrototype[UNSCOPABLES][key] = true;\n};\n", "'use strict';\nvar $ = require('../internals/export');\nvar toObject = require('../internals/to-object');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\nvar addToUnscopables = require('../internals/add-to-unscopables');\n\n// `Array.prototype.at` method\n// https://tc39.es/ecma262/#sec-array.prototype.at\n$({ target: 'Array', proto: true }, {\n  at: function at(index) {\n    var O = toObject(this);\n    var len = lengthOfArrayLike(O);\n    var relativeIndex = toIntegerOrInfinity(index);\n    var k = relativeIndex >= 0 ? relativeIndex : len + relativeIndex;\n    return (k < 0 || k >= len) ? undefined : O[k];\n  }\n});\n\naddToUnscopables('at');\n", "'use strict';\nvar $TypeError = TypeError;\nvar MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; // 2 ** 53 - 1 == 9007199254740991\n\nmodule.exports = function (it) {\n  if (it > MAX_SAFE_INTEGER) throw new $TypeError('Maximum allowed index exceeded');\n  return it;\n};\n", "'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar isArray = require('../internals/is-array');\n\nvar $TypeError = TypeError;\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// Safari < 13 does not throw an error in this case\nvar SILENT_ON_NON_WRITABLE_LENGTH_SET = DESCRIPTORS && !function () {\n  // makes no sense without proper strict mode support\n  if (this !== undefined) return true;\n  try {\n    // eslint-disable-next-line es/no-object-defineproperty -- safe\n    Object.defineProperty([], 'length', { writable: false }).length = 1;\n  } catch (error) {\n    return error instanceof TypeError;\n  }\n}();\n\nmodule.exports = SILENT_ON_NON_WRITABLE_LENGTH_SET ? function (O, length) {\n  if (isArray(O) && !getOwnPropertyDescriptor(O, 'length').writable) {\n    throw new $TypeError('Cannot set read only .length');\n  } return O.length = length;\n} : function (O, length) {\n  return O.length = length;\n};\n", "'use strict';\nvar fails = require('../internals/fails');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar V8_VERSION = require('../internals/environment-v8-version');\n\nvar SPECIES = wellKnownSymbol('species');\n\nmodule.exports = function (METHOD_NAME) {\n  // We can't use this feature detection in V8 since it causes\n  // deoptimization and serious performance degradation\n  // https://github.com/zloirock/core-js/issues/677\n  return V8_VERSION >= 51 || !fails(function () {\n    var array = [];\n    var constructor = array.constructor = {};\n    constructor[SPECIES] = function () {\n      return { foo: 1 };\n    };\n    return array[METHOD_NAME](Boolean).foo !== 1;\n  });\n};\n", "'use strict';\nvar $ = require('../internals/export');\nvar fails = require('../internals/fails');\nvar isArray = require('../internals/is-array');\nvar isObject = require('../internals/is-object');\nvar toObject = require('../internals/to-object');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar doesNotExceedSafeInteger = require('../internals/does-not-exceed-safe-integer');\nvar createProperty = require('../internals/create-property');\nvar setArrayLength = require('../internals/array-set-length');\nvar arraySpeciesCreate = require('../internals/array-species-create');\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar V8_VERSION = require('../internals/environment-v8-version');\n\nvar IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');\n\n// We can't use this feature detection in V8 since it causes\n// deoptimization and serious performance degradation\n// https://github.com/zloirock/core-js/issues/679\nvar IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || !fails(function () {\n  var array = [];\n  array[IS_CONCAT_SPREADABLE] = false;\n  return array.concat()[0] !== array;\n});\n\nvar isConcatSpreadable = function (O) {\n  if (!isObject(O)) return false;\n  var spreadable = O[IS_CONCAT_SPREADABLE];\n  return spreadable !== undefined ? !!spreadable : isArray(O);\n};\n\nvar FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !arrayMethodHasSpeciesSupport('concat');\n\n// `Array.prototype.concat` method\n// https://tc39.es/ecma262/#sec-array.prototype.concat\n// with adding support of @@isConcatSpreadable and @@species\n$({ target: 'Array', proto: true, arity: 1, forced: FORCED }, {\n  // eslint-disable-next-line no-unused-vars -- required for `.length`\n  concat: function concat(arg) {\n    var O = toObject(this);\n    var A = arraySpeciesCreate(O, 0);\n    var n = 0;\n    var i, k, length, len, E;\n    for (i = -1, length = arguments.length; i < length; i++) {\n      E = i === -1 ? O : arguments[i];\n      if (isConcatSpreadable(E)) {\n        len = lengthOfArrayLike(E);\n        doesNotExceedSafeInteger(n + len);\n        for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);\n      } else {\n        doesNotExceedSafeInteger(n + 1);\n        createProperty(A, n++, E);\n      }\n    }\n    setArrayLength(A, n);\n    return A;\n  }\n});\n", "'use strict';\nvar tryToString = require('../internals/try-to-string');\n\nvar $TypeError = TypeError;\n\nmodule.exports = function (O, P) {\n  if (!delete O[P]) throw new $TypeError('Cannot delete property ' + tryToString(P) + ' of ' + tryToString(O));\n};\n", "'use strict';\nvar toObject = require('../internals/to-object');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar deletePropertyOrThrow = require('../internals/delete-property-or-throw');\n\nvar min = Math.min;\n\n// `Array.prototype.copyWithin` method implementation\n// https://tc39.es/ecma262/#sec-array.prototype.copywithin\n// eslint-disable-next-line es/no-array-prototype-copywithin -- safe\nmodule.exports = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) {\n  var O = toObject(this);\n  var len = lengthOfArrayLike(O);\n  var to = toAbsoluteIndex(target, len);\n  var from = toAbsoluteIndex(start, len);\n  var end = arguments.length > 2 ? arguments[2] : undefined;\n  var count = min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to);\n  var inc = 1;\n  if (from < to && to < from + count) {\n    inc = -1;\n    from += count - 1;\n    to += count - 1;\n  }\n  while (count-- > 0) {\n    if (from in O) O[to] = O[from];\n    else deletePropertyOrThrow(O, to);\n    to += inc;\n    from += inc;\n  } return O;\n};\n", "'use strict';\nvar $ = require('../internals/export');\nvar copyWithin = require('../internals/array-copy-within');\nvar addToUnscopables = require('../internals/add-to-unscopables');\n\n// `Array.prototype.copyWithin` method\n// https://tc39.es/ecma262/#sec-array.prototype.copywithin\n$({ target: 'Array', proto: true }, {\n  copyWithin: copyWithin\n});\n\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables('copyWithin');\n", "'use strict';\nvar fails = require('../internals/fails');\n\nmodule.exports = function (METHOD_NAME, argument) {\n  var method = [][METHOD_NAME];\n  return !!method && fails(function () {\n    // eslint-disable-next-line no-useless-call -- required for testing\n    method.call(null, argument || function () { return 1; }, 1);\n  });\n};\n", "'use strict';\nvar $ = require('../internals/export');\nvar $every = require('../internals/array-iteration').every;\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\n\nvar STRICT_METHOD = arrayMethodIsStrict('every');\n\n// `Array.prototype.every` method\n// https://tc39.es/ecma262/#sec-array.prototype.every\n$({ target: 'Array', proto: true, forced: !STRICT_METHOD }, {\n  every: function every(callbackfn /* , thisArg */) {\n    return $every(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n  }\n});\n", "'use strict';\nvar toObject = require('../internals/to-object');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\n\n// `Array.prototype.fill` method implementation\n// https://tc39.es/ecma262/#sec-array.prototype.fill\n// eslint-disable-next-line es/no-array-prototype-fill -- fallback included\nmodule.exports = [].fill || function fill(value /* , start = 0, end = @length */) {\n  var O = toObject(this);\n  var length = lengthOfArrayLike(O);\n  var argumentsLength = arguments.length;\n  var index = toAbsoluteIndex(argumentsLength > 1 ? arguments[1] : undefined, length);\n  var end = argumentsLength > 2 ? arguments[2] : undefined;\n  var endPos = end === undefined ? length : toAbsoluteIndex(end, length);\n  while (endPos > index) O[index++] = value;\n  return O;\n};\n", "'use strict';\nvar $ = require('../internals/export');\nvar fill = require('../internals/array-fill');\nvar addToUnscopables = require('../internals/add-to-unscopables');\n\n// `Array.prototype.fill` method\n// https://tc39.es/ecma262/#sec-array.prototype.fill\n$({ target: 'Array', proto: true }, {\n  fill: fill\n});\n\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables('fill');\n", "'use strict';\nvar $ = require('../internals/export');\nvar $filter = require('../internals/array-iteration').filter;\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\n\nvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter');\n\n// `Array.prototype.filter` method\n// https://tc39.es/ecma262/#sec-array.prototype.filter\n// with adding support of @@species\n$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {\n  filter: function filter(callbackfn /* , thisArg */) {\n    return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar $find = require('../internals/array-iteration').find;\nvar addToUnscopables = require('../internals/add-to-unscopables');\n\nvar FIND = 'find';\nvar SKIPS_HOLES = true;\n\n// Shouldn't skip holes\n// eslint-disable-next-line es/no-array-prototype-find -- testing\nif (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });\n\n// `Array.prototype.find` method\n// https://tc39.es/ecma262/#sec-array.prototype.find\n$({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {\n  find: function find(callbackfn /* , that = undefined */) {\n    return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n  }\n});\n\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables(FIND);\n", "'use strict';\nvar $ = require('../internals/export');\nvar $findIndex = require('../internals/array-iteration').findIndex;\nvar addToUnscopables = require('../internals/add-to-unscopables');\n\nvar FIND_INDEX = 'findIndex';\nvar SKIPS_HOLES = true;\n\n// Shouldn't skip holes\n// eslint-disable-next-line es/no-array-prototype-findindex -- testing\nif (FIND_INDEX in []) Array(1)[FIND_INDEX](function () { SKIPS_HOLES = false; });\n\n// `Array.prototype.findIndex` method\n// https://tc39.es/ecma262/#sec-array.prototype.findindex\n$({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {\n  findIndex: function findIndex(callbackfn /* , that = undefined */) {\n    return $findIndex(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n  }\n});\n\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables(FIND_INDEX);\n", "'use strict';\nvar bind = require('../internals/function-bind-context');\nvar IndexedObject = require('../internals/indexed-object');\nvar toObject = require('../internals/to-object');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\n\n// `Array.prototype.{ findLast, findLastIndex }` methods implementation\nvar createMethod = function (TYPE) {\n  var IS_FIND_LAST_INDEX = TYPE === 1;\n  return function ($this, callbackfn, that) {\n    var O = toObject($this);\n    var self = IndexedObject(O);\n    var index = lengthOfArrayLike(self);\n    var boundFunction = bind(callbackfn, that);\n    var value, result;\n    while (index-- > 0) {\n      value = self[index];\n      result = boundFunction(value, index, O);\n      if (result) switch (TYPE) {\n        case 0: return value; // findLast\n        case 1: return index; // findLastIndex\n      }\n    }\n    return IS_FIND_LAST_INDEX ? -1 : undefined;\n  };\n};\n\nmodule.exports = {\n  // `Array.prototype.findLast` method\n  // https://github.com/tc39/proposal-array-find-from-last\n  findLast: createMethod(0),\n  // `Array.prototype.findLastIndex` method\n  // https://github.com/tc39/proposal-array-find-from-last\n  findLastIndex: createMethod(1)\n};\n", "'use strict';\nvar $ = require('../internals/export');\nvar $findLast = require('../internals/array-iteration-from-last').findLast;\nvar addToUnscopables = require('../internals/add-to-unscopables');\n\n// `Array.prototype.findLast` method\n// https://tc39.es/ecma262/#sec-array.prototype.findlast\n$({ target: 'Array', proto: true }, {\n  findLast: function findLast(callbackfn /* , that = undefined */) {\n    return $findLast(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n  }\n});\n\naddToUnscopables('findLast');\n", "'use strict';\nvar $ = require('../internals/export');\nvar $findLastIndex = require('../internals/array-iteration-from-last').findLastIndex;\nvar addToUnscopables = require('../internals/add-to-unscopables');\n\n// `Array.prototype.findLastIndex` method\n// https://tc39.es/ecma262/#sec-array.prototype.findlastindex\n$({ target: 'Array', proto: true }, {\n  findLastIndex: function findLastIndex(callbackfn /* , that = undefined */) {\n    return $findLastIndex(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n  }\n});\n\naddToUnscopables('findLastIndex');\n", "'use strict';\nvar isArray = require('../internals/is-array');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar doesNotExceedSafeInteger = require('../internals/does-not-exceed-safe-integer');\nvar bind = require('../internals/function-bind-context');\nvar createProperty = require('../internals/create-property');\n\n// `FlattenIntoArray` abstract operation\n// https://tc39.es/ecma262/#sec-flattenintoarray\nvar flattenIntoArray = function (target, original, source, sourceLen, start, depth, mapper, thisArg) {\n  var targetIndex = start;\n  var sourceIndex = 0;\n  var mapFn = mapper ? bind(mapper, thisArg) : false;\n  var element, elementLen;\n\n  while (sourceIndex < sourceLen) {\n    if (sourceIndex in source) {\n      element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex];\n\n      if (depth > 0 && isArray(element)) {\n        elementLen = lengthOfArrayLike(element);\n        targetIndex = flattenIntoArray(target, original, element, elementLen, targetIndex, depth - 1) - 1;\n      } else {\n        doesNotExceedSafeInteger(targetIndex + 1);\n        createProperty(target, targetIndex, element);\n      }\n\n      targetIndex++;\n    }\n    sourceIndex++;\n  }\n  return targetIndex;\n};\n\nmodule.exports = flattenIntoArray;\n", "'use strict';\nvar $ = require('../internals/export');\nvar flattenIntoArray = require('../internals/flatten-into-array');\nvar toObject = require('../internals/to-object');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\nvar arraySpeciesCreate = require('../internals/array-species-create');\n\n// `Array.prototype.flat` method\n// https://tc39.es/ecma262/#sec-array.prototype.flat\n$({ target: 'Array', proto: true }, {\n  flat: function flat(/* depthArg = 1 */) {\n    var depthArg = arguments.length ? arguments[0] : undefined;\n    var O = toObject(this);\n    var sourceLen = lengthOfArrayLike(O);\n    var depthNum = depthArg === undefined ? 1 : toIntegerOrInfinity(depthArg);\n    var A = arraySpeciesCreate(O, 0);\n    flattenIntoArray(A, O, O, sourceLen, 0, depthNum);\n    return A;\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar flattenIntoArray = require('../internals/flatten-into-array');\nvar aCallable = require('../internals/a-callable');\nvar toObject = require('../internals/to-object');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar arraySpeciesCreate = require('../internals/array-species-create');\n\n// `Array.prototype.flatMap` method\n// https://tc39.es/ecma262/#sec-array.prototype.flatmap\n$({ target: 'Array', proto: true }, {\n  flatMap: function flatMap(callbackfn /* , thisArg */) {\n    var O = toObject(this);\n    var sourceLen = lengthOfArrayLike(O);\n    var A;\n    aCallable(callbackfn);\n    A = arraySpeciesCreate(O, 0);\n    flattenIntoArray(A, O, O, sourceLen, 0, 1, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n    return A;\n  }\n});\n", "'use strict';\nvar $forEach = require('../internals/array-iteration').forEach;\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\n\nvar STRICT_METHOD = arrayMethodIsStrict('forEach');\n\n// `Array.prototype.forEach` method implementation\n// https://tc39.es/ecma262/#sec-array.prototype.foreach\nmodule.exports = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) {\n  return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n// eslint-disable-next-line es/no-array-prototype-foreach -- safe\n} : [].forEach;\n", "'use strict';\nvar $ = require('../internals/export');\nvar forEach = require('../internals/array-for-each');\n\n// `Array.prototype.forEach` method\n// https://tc39.es/ecma262/#sec-array.prototype.foreach\n// eslint-disable-next-line es/no-array-prototype-foreach -- safe\n$({ target: 'Array', proto: true, forced: [].forEach !== forEach }, {\n  forEach: forEach\n});\n", "'use strict';\nvar anObject = require('../internals/an-object');\nvar iteratorClose = require('../internals/iterator-close');\n\n// call something on iterator step with safe closing on error\nmodule.exports = function (iterator, fn, value, ENTRIES) {\n  try {\n    return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);\n  } catch (error) {\n    iteratorClose(iterator, 'throw', error);\n  }\n};\n", "'use strict';\nvar bind = require('../internals/function-bind-context');\nvar call = require('../internals/function-call');\nvar toObject = require('../internals/to-object');\nvar callWithSafeIterationClosing = require('../internals/call-with-safe-iteration-closing');\nvar isArrayIteratorMethod = require('../internals/is-array-iterator-method');\nvar isConstructor = require('../internals/is-constructor');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar createProperty = require('../internals/create-property');\nvar setArrayLength = require('../internals/array-set-length');\nvar getIterator = require('../internals/get-iterator-internal');\nvar getIteratorMethod = require('../internals/get-iterator-method-internal');\nvar iteratorClose = require('../internals/iterator-close');\nvar doesNotExceedSafeInteger = require('../internals/does-not-exceed-safe-integer');\n\nvar $Array = Array;\n\n// `Array.from` method implementation\n// https://tc39.es/ecma262/#sec-array.from\nmodule.exports = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {\n  var IS_CONSTRUCTOR = isConstructor(this);\n  var argumentsLength = arguments.length;\n  var mapfn = argumentsLength > 1 ? arguments[1] : undefined;\n  var mapping = mapfn !== undefined;\n  if (mapping) mapfn = bind(mapfn, argumentsLength > 2 ? arguments[2] : undefined);\n  var O = toObject(arrayLike);\n  var iteratorMethod = getIteratorMethod(O);\n  var index = 0;\n  var length, result, step, iterator, next, value;\n  // if the target is not iterable or it's an array with the default iterator - use a simple case\n  if (iteratorMethod && !(this === $Array && isArrayIteratorMethod(iteratorMethod))) {\n    result = IS_CONSTRUCTOR ? new this() : [];\n    iterator = getIterator(O, iteratorMethod);\n    next = iterator.next;\n    for (;!(step = call(next, iterator)).done; index++) {\n      try {\n        doesNotExceedSafeInteger(index);\n      } catch (error) {\n        iteratorClose(iterator, 'throw', error);\n      }\n      value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value;\n      try {\n        createProperty(result, index, value);\n      } catch (error) {\n        iteratorClose(iterator, 'throw', error);\n      }\n    }\n  } else {\n    length = lengthOfArrayLike(O);\n    result = IS_CONSTRUCTOR ? new this(length) : $Array(length);\n    for (;length > index; index++) {\n      value = mapping ? mapfn(O[index], index) : O[index];\n      createProperty(result, index, value);\n    }\n  }\n  setArrayLength(result, index);\n  return result;\n};\n", "'use strict';\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar SAFE_CLOSING = false;\n\ntry {\n  var called = 0;\n  var iteratorWithReturn = {\n    next: function () {\n      return { done: !!called++ };\n    },\n    'return': function () {\n      SAFE_CLOSING = true;\n    }\n  };\n  // eslint-disable-next-line unicorn/no-immediate-mutation -- ES3 syntax limitation\n  iteratorWithReturn[ITERATOR] = function () {\n    return this;\n  };\n  // eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing\n  Array.from(iteratorWithReturn, function () { throw 2; });\n} catch (error) { /* empty */ }\n\nmodule.exports = function (exec, SKIP_CLOSING) {\n  try {\n    if (!SKIP_CLOSING && !SAFE_CLOSING) return false;\n  } catch (error) { return false; } // workaround of old WebKit + `eval` bug\n  var ITERATION_SUPPORT = false;\n  try {\n    var object = {};\n    // eslint-disable-next-line unicorn/no-immediate-mutation -- ES3 syntax limitation\n    object[ITERATOR] = function () {\n      return {\n        next: function () {\n          return { done: ITERATION_SUPPORT = true };\n        }\n      };\n    };\n    exec(object);\n  } catch (error) { /* empty */ }\n  return ITERATION_SUPPORT;\n};\n", "'use strict';\nvar $ = require('../internals/export');\nvar from = require('../internals/array-from');\nvar checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration');\n\nvar INCORRECT_ITERATION = !checkCorrectnessOfIteration(function (iterable) {\n  // eslint-disable-next-line es/no-array-from -- required for testing\n  Array.from(iterable);\n});\n\n// `Array.from` method\n// https://tc39.es/ecma262/#sec-array.from\n$({ target: 'Array', stat: true, forced: INCORRECT_ITERATION }, {\n  from: from\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar $includes = require('../internals/array-includes').includes;\nvar fails = require('../internals/fails');\nvar addToUnscopables = require('../internals/add-to-unscopables');\n\n// FF99+ bug\nvar BROKEN_ON_SPARSE = fails(function () {\n  // eslint-disable-next-line es/no-array-prototype-includes -- detection\n  return !Array(1).includes();\n});\n\n// Safari 26.4- bug\nvar BROKEN_ON_SPARSE_WITH_FROM_INDEX = fails(function () {\n  // eslint-disable-next-line no-sparse-arrays, es/no-array-prototype-includes -- detection\n  return [, 1].includes(undefined, 1);\n});\n\n// `Array.prototype.includes` method\n// https://tc39.es/ecma262/#sec-array.prototype.includes\n$({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE || BROKEN_ON_SPARSE_WITH_FROM_INDEX }, {\n  includes: function includes(el /* , fromIndex = 0 */) {\n    return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);\n  }\n});\n\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables('includes');\n", "'use strict';\n/* eslint-disable es/no-array-prototype-indexof -- required for testing */\nvar $ = require('../internals/export');\nvar uncurryThis = require('../internals/function-uncurry-this-clause');\nvar $indexOf = require('../internals/array-includes').indexOf;\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\n\nvar nativeIndexOf = uncurryThis([].indexOf);\n\nvar NEGATIVE_ZERO = !!nativeIndexOf && 1 / nativeIndexOf([1], 1, -0) < 0;\nvar FORCED = NEGATIVE_ZERO || !arrayMethodIsStrict('indexOf');\n\n// `Array.prototype.indexOf` method\n// https://tc39.es/ecma262/#sec-array.prototype.indexof\n$({ target: 'Array', proto: true, forced: FORCED }, {\n  indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {\n    var fromIndex = arguments.length > 1 ? arguments[1] : undefined;\n    return NEGATIVE_ZERO\n      // convert -0 to +0\n      ? nativeIndexOf(this, searchElement, fromIndex) || 0\n      : $indexOf(this, searchElement, fromIndex);\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar isArray = require('../internals/is-array');\n\n// `Array.isArray` method\n// https://tc39.es/ecma262/#sec-array.isarray\n$({ target: 'Array', stat: true }, {\n  isArray: isArray\n});\n", "'use strict';\nvar fails = require('../internals/fails');\nvar isCallable = require('../internals/is-callable');\nvar isObject = require('../internals/is-object');\nvar create = require('../internals/object-create');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar defineBuiltIn = require('../internals/define-built-in');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar IS_PURE = require('../internals/is-pure');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar BUGGY_SAFARI_ITERATORS = false;\n\n// `%IteratorPrototype%` object\n// https://tc39.es/ecma262/#sec-%iteratorprototype%-object\nvar IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;\n\n/* eslint-disable es/no-array-prototype-keys -- safe */\nif ([].keys) {\n  arrayIterator = [].keys();\n  // Safari 8 has buggy iterators w/o `next`\n  if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;\n  else {\n    PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));\n    if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;\n  }\n}\n\nvar NEW_ITERATOR_PROTOTYPE = !isObject(IteratorPrototype) || fails(function () {\n  var test = {};\n  // FF44- legacy iterators case\n  return IteratorPrototype[ITERATOR].call(test) !== test;\n});\n\nif (NEW_ITERATOR_PROTOTYPE) IteratorPrototype = {};\nelse if (IS_PURE) IteratorPrototype = create(IteratorPrototype);\n\n// `%IteratorPrototype%[@@iterator]()` method\n// https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator\nif (!isCallable(IteratorPrototype[ITERATOR])) {\n  defineBuiltIn(IteratorPrototype, ITERATOR, function () {\n    return this;\n  });\n}\n\nmodule.exports = {\n  IteratorPrototype: IteratorPrototype,\n  BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS\n};\n", "'use strict';\nvar IteratorPrototype = require('../internals/iterators-core').IteratorPrototype;\nvar create = require('../internals/object-create');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar Iterators = require('../internals/iterators');\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {\n  var TO_STRING_TAG = NAME + ' Iterator';\n  IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) });\n  setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);\n  Iterators[TO_STRING_TAG] = returnThis;\n  return IteratorConstructor;\n};\n", "'use strict';\nvar $ = require('../internals/export');\nvar call = require('../internals/function-call');\nvar IS_PURE = require('../internals/is-pure');\nvar FunctionName = require('../internals/function-name');\nvar isCallable = require('../internals/is-callable');\nvar createIteratorConstructor = require('../internals/iterator-create-constructor');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar defineBuiltIn = require('../internals/define-built-in');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar Iterators = require('../internals/iterators');\nvar IteratorsCore = require('../internals/iterators-core');\n\nvar PROPER_FUNCTION_NAME = FunctionName.PROPER;\nvar CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;\nvar IteratorPrototype = IteratorsCore.IteratorPrototype;\nvar BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;\nvar ITERATOR = wellKnownSymbol('iterator');\nvar KEYS = 'keys';\nvar VALUES = 'values';\nvar ENTRIES = 'entries';\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {\n  createIteratorConstructor(IteratorConstructor, NAME, next);\n\n  var getIterationMethod = function (KIND) {\n    if (KIND === DEFAULT && defaultIterator) return defaultIterator;\n    if (!BUGGY_SAFARI_ITERATORS && KIND && KIND in IterablePrototype) return IterablePrototype[KIND];\n\n    switch (KIND) {\n      case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };\n      case VALUES: return function values() { return new IteratorConstructor(this, KIND); };\n      case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };\n    }\n\n    return function () { return new IteratorConstructor(this); };\n  };\n\n  var TO_STRING_TAG = NAME + ' Iterator';\n  var INCORRECT_VALUES_NAME = false;\n  var IterablePrototype = Iterable.prototype;\n  var nativeIterator = IterablePrototype[ITERATOR]\n    || IterablePrototype['@@iterator']\n    || DEFAULT && IterablePrototype[DEFAULT];\n  var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);\n  var anyNativeIterator = NAME === 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;\n  var CurrentIteratorPrototype, methods, KEY;\n\n  // fix native\n  if (anyNativeIterator) {\n    CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));\n    if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {\n      if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {\n        if (setPrototypeOf) {\n          setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);\n        } else if (!isCallable(CurrentIteratorPrototype[ITERATOR])) {\n          defineBuiltIn(CurrentIteratorPrototype, ITERATOR, returnThis);\n        }\n      }\n      // Set @@toStringTag to native iterators\n      setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);\n      if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis;\n    }\n  }\n\n  // fix Array.prototype.{ values, @@iterator }.name in V8 / FF\n  if (PROPER_FUNCTION_NAME && DEFAULT === VALUES && nativeIterator && nativeIterator.name !== VALUES) {\n    if (!IS_PURE && CONFIGURABLE_FUNCTION_NAME) {\n      createNonEnumerableProperty(IterablePrototype, 'name', VALUES);\n    } else {\n      INCORRECT_VALUES_NAME = true;\n      defaultIterator = function values() { return call(nativeIterator, this); };\n    }\n  }\n\n  // export additional methods\n  if (DEFAULT) {\n    methods = {\n      values: getIterationMethod(VALUES),\n      keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),\n      entries: getIterationMethod(ENTRIES)\n    };\n    if (FORCED) for (KEY in methods) {\n      if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {\n        defineBuiltIn(IterablePrototype, KEY, methods[KEY]);\n      }\n    } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);\n  }\n\n  // define iterator\n  if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) {\n    defineBuiltIn(IterablePrototype, ITERATOR, defaultIterator, { name: DEFAULT });\n  }\n  Iterators[NAME] = defaultIterator;\n\n  return methods;\n};\n", "'use strict';\n// `CreateIterResultObject` abstract operation\n// https://tc39.es/ecma262/#sec-createiterresultobject\nmodule.exports = function (value, done) {\n  return { value: value, done: done };\n};\n", "'use strict';\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar addToUnscopables = require('../internals/add-to-unscopables');\nvar Iterators = require('../internals/iterators');\nvar InternalStateModule = require('../internals/internal-state');\nvar defineProperty = require('../internals/object-define-property').f;\nvar defineIterator = require('../internals/iterator-define');\nvar createIterResultObject = require('../internals/create-iter-result-object');\nvar IS_PURE = require('../internals/is-pure');\nvar DESCRIPTORS = require('../internals/descriptors');\n\nvar ARRAY_ITERATOR = 'Array Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);\n\n// `Array.prototype.entries` method\n// https://tc39.es/ecma262/#sec-array.prototype.entries\n// `Array.prototype.keys` method\n// https://tc39.es/ecma262/#sec-array.prototype.keys\n// `Array.prototype.values` method\n// https://tc39.es/ecma262/#sec-array.prototype.values\n// `Array.prototype[@@iterator]` method\n// https://tc39.es/ecma262/#sec-array.prototype-@@iterator\n// `CreateArrayIterator` internal method\n// https://tc39.es/ecma262/#sec-createarrayiterator\nmodule.exports = defineIterator(Array, 'Array', function (iterated, kind) {\n  setInternalState(this, {\n    type: ARRAY_ITERATOR,\n    target: toIndexedObject(iterated), // target\n    index: 0,                          // next index\n    kind: kind                         // kind\n  });\n// `%ArrayIteratorPrototype%.next` method\n// https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next\n}, function () {\n  var state = getInternalState(this);\n  var target = state.target;\n  var index = state.index++;\n  if (!target || index >= target.length) {\n    state.target = null;\n    return createIterResultObject(undefined, true);\n  }\n  switch (state.kind) {\n    case 'keys': return createIterResultObject(index, false);\n    case 'values': return createIterResultObject(target[index], false);\n  } return createIterResultObject([index, target[index]], false);\n}, 'values');\n\n// argumentsList[@@iterator] is %ArrayProto_values%\n// https://tc39.es/ecma262/#sec-createunmappedargumentsobject\n// https://tc39.es/ecma262/#sec-createmappedargumentsobject\nvar values = Iterators.Arguments = Iterators.Array;\n\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables('keys');\naddToUnscopables('values');\naddToUnscopables('entries');\n\n// V8 ~ Chrome 45- bug\nif (!IS_PURE && DESCRIPTORS && values.name !== 'values') try {\n  defineProperty(values, 'name', { value: 'values' });\n} catch (error) { /* empty */ }\n", "'use strict';\nvar $ = require('../internals/export');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar IndexedObject = require('../internals/indexed-object');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\n\nvar nativeJoin = uncurryThis([].join);\n\nvar ES3_STRINGS = IndexedObject !== Object;\nvar FORCED = ES3_STRINGS || !arrayMethodIsStrict('join', ',');\n\n// `Array.prototype.join` method\n// https://tc39.es/ecma262/#sec-array.prototype.join\n$({ target: 'Array', proto: true, forced: FORCED }, {\n  join: function join(separator) {\n    return nativeJoin(toIndexedObject(this), separator === undefined ? ',' : separator);\n  }\n});\n", "'use strict';\n/* eslint-disable es/no-array-prototype-lastindexof -- safe */\nvar apply = require('../internals/function-apply');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\n\nvar min = Math.min;\nvar $lastIndexOf = [].lastIndexOf;\nvar NEGATIVE_ZERO = !!$lastIndexOf && 1 / [1].lastIndexOf(1, -0) < 0;\nvar STRICT_METHOD = arrayMethodIsStrict('lastIndexOf');\nvar FORCED = NEGATIVE_ZERO || !STRICT_METHOD;\n\n// `Array.prototype.lastIndexOf` method implementation\n// https://tc39.es/ecma262/#sec-array.prototype.lastindexof\nmodule.exports = FORCED ? function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) {\n  // convert -0 to +0\n  if (NEGATIVE_ZERO) return apply($lastIndexOf, this, arguments) || 0;\n  var O = toIndexedObject(this);\n  var length = lengthOfArrayLike(O);\n  if (length === 0) return -1;\n  var index = length - 1;\n  if (arguments.length > 1) index = min(index, toIntegerOrInfinity(arguments[1]));\n  if (index < 0) index = length + index;\n  for (;index >= 0; index--) if (index in O && O[index] === searchElement) return index || 0;\n  return -1;\n} : $lastIndexOf;\n", "'use strict';\nvar $ = require('../internals/export');\nvar lastIndexOf = require('../internals/array-last-index-of');\n\n// `Array.prototype.lastIndexOf` method\n// https://tc39.es/ecma262/#sec-array.prototype.lastindexof\n// eslint-disable-next-line es/no-array-prototype-lastindexof -- required for testing\n$({ target: 'Array', proto: true, forced: lastIndexOf !== [].lastIndexOf }, {\n  lastIndexOf: lastIndexOf\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar $map = require('../internals/array-iteration').map;\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\n\nvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('map');\n\n// `Array.prototype.map` method\n// https://tc39.es/ecma262/#sec-array.prototype.map\n// with adding support of @@species\n$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {\n  map: function map(callbackfn /* , thisArg */) {\n    return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar fails = require('../internals/fails');\nvar isConstructor = require('../internals/is-constructor');\nvar createProperty = require('../internals/create-property');\nvar setArrayLength = require('../internals/array-set-length');\n\nvar $Array = Array;\n\nvar ISNT_GENERIC = fails(function () {\n  function F() { /* empty */ }\n  // eslint-disable-next-line es/no-array-of -- safe\n  return !($Array.of.call(F) instanceof F);\n});\n\n// `Array.of` method\n// https://tc39.es/ecma262/#sec-array.of\n// WebKit Array.of isn't generic\n$({ target: 'Array', stat: true, forced: ISNT_GENERIC }, {\n  of: function of(/* ...args */) {\n    var index = 0;\n    var argumentsLength = arguments.length;\n    var result = new (isConstructor(this) ? this : $Array)(argumentsLength);\n    while (argumentsLength > index) createProperty(result, index, arguments[index++]);\n    setArrayLength(result, argumentsLength);\n    return result;\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar toObject = require('../internals/to-object');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar setArrayLength = require('../internals/array-set-length');\nvar doesNotExceedSafeInteger = require('../internals/does-not-exceed-safe-integer');\nvar fails = require('../internals/fails');\n\nvar INCORRECT_TO_LENGTH = fails(function () {\n  return [].push.call({ length: 0x100000000 }, 1) !== 4294967297;\n});\n\n// V8 <= 121 and Safari <= 15.4; FF < 23 throws InternalError\n// https://bugs.chromium.org/p/v8/issues/detail?id=12681\nvar properErrorOnNonWritableLength = function () {\n  try {\n    // eslint-disable-next-line es/no-object-defineproperty -- safe\n    Object.defineProperty([], 'length', { writable: false }).push();\n  } catch (error) {\n    return error instanceof TypeError;\n  }\n};\n\nvar FORCED = INCORRECT_TO_LENGTH || !properErrorOnNonWritableLength();\n\n// `Array.prototype.push` method\n// https://tc39.es/ecma262/#sec-array.prototype.push\n$({ target: 'Array', proto: true, arity: 1, forced: FORCED }, {\n  // eslint-disable-next-line no-unused-vars -- required for `.length`\n  push: function push(item) {\n    var O = toObject(this);\n    var len = lengthOfArrayLike(O);\n    var argCount = arguments.length;\n    doesNotExceedSafeInteger(len + argCount);\n    for (var i = 0; i < argCount; i++) {\n      O[len] = arguments[i];\n      len++;\n    }\n    setArrayLength(O, len);\n    return len;\n  }\n});\n", "'use strict';\nvar aCallable = require('../internals/a-callable');\nvar toObject = require('../internals/to-object');\nvar IndexedObject = require('../internals/indexed-object');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\n\nvar $TypeError = TypeError;\n\nvar REDUCE_EMPTY = 'Reduce of empty array with no initial value';\n\n// `Array.prototype.{ reduce, reduceRight }` methods implementation\nvar createMethod = function (IS_RIGHT) {\n  return function (that, callbackfn, argumentsLength, memo) {\n    var O = toObject(that);\n    var self = IndexedObject(O);\n    var length = lengthOfArrayLike(O);\n    aCallable(callbackfn);\n    if (length === 0 && argumentsLength < 2) throw new $TypeError(REDUCE_EMPTY);\n    var index = IS_RIGHT ? length - 1 : 0;\n    var i = IS_RIGHT ? -1 : 1;\n    if (argumentsLength < 2) while (true) {\n      if (index in self) {\n        memo = self[index];\n        index += i;\n        break;\n      }\n      index += i;\n      if (IS_RIGHT ? index < 0 : length <= index) {\n        throw new $TypeError(REDUCE_EMPTY);\n      }\n    }\n    for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {\n      memo = callbackfn(memo, self[index], index, O);\n    }\n    return memo;\n  };\n};\n\nmodule.exports = {\n  // `Array.prototype.reduce` method\n  // https://tc39.es/ecma262/#sec-array.prototype.reduce\n  left: createMethod(false),\n  // `Array.prototype.reduceRight` method\n  // https://tc39.es/ecma262/#sec-array.prototype.reduceright\n  right: createMethod(true)\n};\n", "'use strict';\n/* global Bun, Deno -- detection */\nvar globalThis = require('../internals/global-this');\nvar userAgent = require('../internals/environment-user-agent');\nvar classof = require('../internals/classof-raw');\n\nvar userAgentStartsWith = function (string) {\n  return userAgent.slice(0, string.length) === string;\n};\n\nmodule.exports = (function () {\n  if (userAgentStartsWith('Bun/')) return 'BUN';\n  if (userAgentStartsWith('Cloudflare-Workers')) return 'CLOUDFLARE';\n  if (userAgentStartsWith('Deno/')) return 'DENO';\n  if (userAgentStartsWith('Node.js/')) return 'NODE';\n  if (globalThis.Bun && typeof Bun.version == 'string') return 'BUN';\n  if (globalThis.Deno && typeof Deno.version == 'object') return 'DENO';\n  if (classof(globalThis.process) === 'process') return 'NODE';\n  if (globalThis.window && globalThis.document) return 'BROWSER';\n  return 'REST';\n})();\n", "'use strict';\nvar ENVIRONMENT = require('../internals/environment');\n\nmodule.exports = ENVIRONMENT === 'NODE';\n", "'use strict';\nvar $ = require('../internals/export');\nvar $reduce = require('../internals/array-reduce').left;\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\nvar CHROME_VERSION = require('../internals/environment-v8-version');\nvar IS_NODE = require('../internals/environment-is-node');\n\n// Chrome 80-82 has a critical bug\n// https://bugs.chromium.org/p/chromium/issues/detail?id=1049982\nvar CHROME_BUG = !IS_NODE && CHROME_VERSION > 79 && CHROME_VERSION < 83;\nvar FORCED = CHROME_BUG || !arrayMethodIsStrict('reduce');\n\n// `Array.prototype.reduce` method\n// https://tc39.es/ecma262/#sec-array.prototype.reduce\n$({ target: 'Array', proto: true, forced: FORCED }, {\n  reduce: function reduce(callbackfn /* , initialValue */) {\n    var length = arguments.length;\n    return $reduce(this, callbackfn, length, length > 1 ? arguments[1] : undefined);\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar $reduceRight = require('../internals/array-reduce').right;\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\nvar CHROME_VERSION = require('../internals/environment-v8-version');\nvar IS_NODE = require('../internals/environment-is-node');\n\n// Chrome 80-82 has a critical bug\n// https://bugs.chromium.org/p/chromium/issues/detail?id=1049982\nvar CHROME_BUG = !IS_NODE && CHROME_VERSION > 79 && CHROME_VERSION < 83;\nvar FORCED = CHROME_BUG || !arrayMethodIsStrict('reduceRight');\n\n// `Array.prototype.reduceRight` method\n// https://tc39.es/ecma262/#sec-array.prototype.reduceright\n$({ target: 'Array', proto: true, forced: FORCED }, {\n  reduceRight: function reduceRight(callbackfn /* , initialValue */) {\n    return $reduceRight(this, callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar isArray = require('../internals/is-array');\n\nvar nativeReverse = uncurryThis([].reverse);\nvar test = [1, 2];\n\n// `Array.prototype.reverse` method\n// https://tc39.es/ecma262/#sec-array.prototype.reverse\n// fix for Safari 12.0 bug\n// https://bugs.webkit.org/show_bug.cgi?id=188794\n$({ target: 'Array', proto: true, forced: String(test) === String(test.reverse()) }, {\n  reverse: function reverse() {\n    // eslint-disable-next-line no-self-assign -- dirty hack\n    if (isArray(this)) this.length = this.length;\n    return nativeReverse(this);\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar isArray = require('../internals/is-array');\nvar isConstructor = require('../internals/is-constructor');\nvar isObject = require('../internals/is-object');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar createProperty = require('../internals/create-property');\nvar setArrayLength = require('../internals/array-set-length');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\nvar nativeSlice = require('../internals/array-slice');\n\nvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('slice');\n\nvar SPECIES = wellKnownSymbol('species');\nvar $Array = Array;\nvar max = Math.max;\n\n// `Array.prototype.slice` method\n// https://tc39.es/ecma262/#sec-array.prototype.slice\n// fallback for not array-like ES3 strings and DOM objects\n$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {\n  slice: function slice(start, end) {\n    var O = toIndexedObject(this);\n    var length = lengthOfArrayLike(O);\n    var k = toAbsoluteIndex(start, length);\n    var fin = toAbsoluteIndex(end === undefined ? length : end, length);\n    // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible\n    var Constructor, result, n;\n    if (isArray(O)) {\n      Constructor = O.constructor;\n      // cross-realm fallback\n      if (isConstructor(Constructor) && (Constructor === $Array || isArray(Constructor.prototype))) {\n        Constructor = undefined;\n      } else if (isObject(Constructor)) {\n        Constructor = Constructor[SPECIES];\n        if (Constructor === null) Constructor = undefined;\n      }\n      if (Constructor === $Array || Constructor === undefined) {\n        return nativeSlice(O, k, fin);\n      }\n    }\n    result = new (Constructor === undefined ? $Array : Constructor)(max(fin - k, 0));\n    for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);\n    setArrayLength(result, n);\n    return result;\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar $some = require('../internals/array-iteration').some;\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\n\nvar STRICT_METHOD = arrayMethodIsStrict('some');\n\n// `Array.prototype.some` method\n// https://tc39.es/ecma262/#sec-array.prototype.some\n$({ target: 'Array', proto: true, forced: !STRICT_METHOD }, {\n  some: function some(callbackfn /* , thisArg */) {\n    return $some(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n  }\n});\n", "'use strict';\nvar arraySlice = require('../internals/array-slice');\n\nvar floor = Math.floor;\n\nvar sort = function (array, comparefn) {\n  var length = array.length;\n\n  if (length < 8) {\n    // insertion sort\n    var i = 1;\n    var element, j;\n\n    while (i < length) {\n      j = i;\n      element = array[i];\n      while (j && comparefn(array[j - 1], element) > 0) {\n        array[j] = array[--j];\n      }\n      if (j !== i++) array[j] = element;\n    }\n  } else {\n    // merge sort\n    var middle = floor(length / 2);\n    var left = sort(arraySlice(array, 0, middle), comparefn);\n    var right = sort(arraySlice(array, middle), comparefn);\n    var llength = left.length;\n    var rlength = right.length;\n    var lindex = 0;\n    var rindex = 0;\n\n    while (lindex < llength || rindex < rlength) {\n      array[lindex + rindex] = (lindex < llength && rindex < rlength)\n        ? comparefn(left[lindex], right[rindex]) <= 0 ? left[lindex++] : right[rindex++]\n        : lindex < llength ? left[lindex++] : right[rindex++];\n    }\n  }\n\n  return array;\n};\n\nmodule.exports = sort;\n", "'use strict';\nvar userAgent = require('../internals/environment-user-agent');\n\nvar firefox = userAgent.match(/firefox\\/(\\d+)/i);\n\nmodule.exports = !!firefox && +firefox[1];\n", "'use strict';\nvar UA = require('../internals/environment-user-agent');\n\nmodule.exports = /MSIE|Trident/.test(UA);\n", "'use strict';\nvar userAgent = require('../internals/environment-user-agent');\n\nvar webkit = userAgent.match(/AppleWebKit\\/(\\d+)\\./);\n\nmodule.exports = !!webkit && +webkit[1];\n", "'use strict';\nvar $ = require('../internals/export');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar aCallable = require('../internals/a-callable');\nvar toObject = require('../internals/to-object');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar deletePropertyOrThrow = require('../internals/delete-property-or-throw');\nvar toString = require('../internals/to-string');\nvar fails = require('../internals/fails');\nvar internalSort = require('../internals/array-sort');\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\nvar FF = require('../internals/environment-ff-version');\nvar IE_OR_EDGE = require('../internals/environment-is-ie-or-edge');\nvar V8 = require('../internals/environment-v8-version');\nvar WEBKIT = require('../internals/environment-webkit-version');\n\nvar test = [];\nvar nativeSort = uncurryThis(test.sort);\nvar push = uncurryThis(test.push);\n\n// IE8-\nvar FAILS_ON_UNDEFINED = fails(function () {\n  test.sort(undefined);\n});\n// V8 bug\nvar FAILS_ON_NULL = fails(function () {\n  test.sort(null);\n});\n// Old WebKit\nvar STRICT_METHOD = arrayMethodIsStrict('sort');\n\nvar STABLE_SORT = !fails(function () {\n  // feature detection can be too slow, so check engines versions\n  if (V8) return V8 < 70;\n  if (FF && FF > 3) return;\n  if (IE_OR_EDGE) return true;\n  if (WEBKIT) return WEBKIT < 603;\n\n  var result = '';\n  var code, chr, value, index;\n\n  // generate an array with more 512 elements (Chakra and old V8 fails only in this case)\n  for (code = 65; code < 76; code++) {\n    chr = String.fromCharCode(code);\n\n    switch (code) {\n      case 66: case 69: case 70: case 72: value = 3; break;\n      case 68: case 71: value = 4; break;\n      default: value = 2;\n    }\n\n    for (index = 0; index < 47; index++) {\n      test.push({ k: chr + index, v: value });\n    }\n  }\n\n  test.sort(function (a, b) { return b.v - a.v; });\n\n  for (index = 0; index < test.length; index++) {\n    chr = test[index].k.charAt(0);\n    if (result.charAt(result.length - 1) !== chr) result += chr;\n  }\n\n  return result !== 'DGBEFHACIJK';\n});\n\nvar FORCED = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD || !STABLE_SORT;\n\nvar getSortCompare = function (comparefn) {\n  return function (x, y) {\n    if (y === undefined) return -1;\n    if (x === undefined) return 1;\n    if (comparefn !== undefined) return +comparefn(x, y) || 0;\n    var xString = toString(x);\n    var yString = toString(y);\n    return xString === yString ? 0 : xString > yString ? 1 : -1;\n  };\n};\n\n// `Array.prototype.sort` method\n// https://tc39.es/ecma262/#sec-array.prototype.sort\n$({ target: 'Array', proto: true, forced: FORCED }, {\n  sort: function sort(comparefn) {\n    if (comparefn !== undefined) aCallable(comparefn);\n\n    var array = toObject(this);\n\n    if (STABLE_SORT) return comparefn === undefined ? nativeSort(array) : nativeSort(array, comparefn);\n\n    var items = [];\n    var arrayLength = lengthOfArrayLike(array);\n    var itemsLength, index;\n\n    for (index = 0; index < arrayLength; index++) {\n      if (index in array) push(items, array[index]);\n    }\n\n    internalSort(items, getSortCompare(comparefn));\n\n    itemsLength = lengthOfArrayLike(items);\n    index = 0;\n\n    while (index < itemsLength) array[index] = items[index++];\n    while (index < arrayLength) deletePropertyOrThrow(array, index++);\n\n    return array;\n  }\n});\n", "'use strict';\nvar getBuiltIn = require('../internals/get-built-in');\nvar defineBuiltInAccessor = require('../internals/define-built-in-accessor');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar DESCRIPTORS = require('../internals/descriptors');\n\nvar SPECIES = wellKnownSymbol('species');\n\nmodule.exports = function (CONSTRUCTOR_NAME) {\n  var Constructor = getBuiltIn(CONSTRUCTOR_NAME);\n\n  if (DESCRIPTORS && Constructor && !Constructor[SPECIES]) {\n    defineBuiltInAccessor(Constructor, SPECIES, {\n      configurable: true,\n      get: function () { return this; }\n    });\n  }\n};\n", "'use strict';\nvar setSpecies = require('../internals/set-species');\n\n// `Array[@@species]` getter\n// https://tc39.es/ecma262/#sec-get-array-@@species\nsetSpecies('Array');\n", "'use strict';\nvar $ = require('../internals/export');\nvar toObject = require('../internals/to-object');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar setArrayLength = require('../internals/array-set-length');\nvar doesNotExceedSafeInteger = require('../internals/does-not-exceed-safe-integer');\nvar arraySpeciesCreate = require('../internals/array-species-create');\nvar createProperty = require('../internals/create-property');\nvar deletePropertyOrThrow = require('../internals/delete-property-or-throw');\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\n\nvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('splice');\n\nvar max = Math.max;\nvar min = Math.min;\n\n// `Array.prototype.splice` method\n// https://tc39.es/ecma262/#sec-array.prototype.splice\n// with adding support of @@species\n$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {\n  splice: function splice(start, deleteCount /* , ...items */) {\n    var O = toObject(this);\n    var len = lengthOfArrayLike(O);\n    var actualStart = toAbsoluteIndex(start, len);\n    var argumentsLength = arguments.length;\n    var insertCount, actualDeleteCount, A, k, from, to;\n    if (argumentsLength === 0) {\n      insertCount = actualDeleteCount = 0;\n    } else if (argumentsLength === 1) {\n      insertCount = 0;\n      actualDeleteCount = len - actualStart;\n    } else {\n      insertCount = argumentsLength - 2;\n      actualDeleteCount = min(max(toIntegerOrInfinity(deleteCount), 0), len - actualStart);\n    }\n    doesNotExceedSafeInteger(len + insertCount - actualDeleteCount);\n    A = arraySpeciesCreate(O, actualDeleteCount);\n    for (k = 0; k < actualDeleteCount; k++) {\n      from = actualStart + k;\n      if (from in O) createProperty(A, k, O[from]);\n    }\n    setArrayLength(A, actualDeleteCount);\n    if (insertCount < actualDeleteCount) {\n      for (k = actualStart; k < len - actualDeleteCount; k++) {\n        from = k + actualDeleteCount;\n        to = k + insertCount;\n        if (from in O) O[to] = O[from];\n        else deletePropertyOrThrow(O, to);\n      }\n      for (k = len; k > len - actualDeleteCount + insertCount; k--) deletePropertyOrThrow(O, k - 1);\n    } else if (insertCount > actualDeleteCount) {\n      for (k = len - actualDeleteCount; k > actualStart; k--) {\n        from = k + actualDeleteCount - 1;\n        to = k + insertCount - 1;\n        if (from in O) O[to] = O[from];\n        else deletePropertyOrThrow(O, to);\n      }\n    }\n    for (k = 0; k < insertCount; k++) {\n      O[k + actualStart] = arguments[k + 2];\n    }\n    setArrayLength(O, len - actualDeleteCount + insertCount);\n    return A;\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar createProperty = require('../internals/create-property');\nvar addToUnscopables = require('../internals/add-to-unscopables');\n\nvar $Array = Array;\n\n// `Array.prototype.toReversed` method\n// https://tc39.es/ecma262/#sec-array.prototype.toreversed\n$({ target: 'Array', proto: true }, {\n  toReversed: function toReversed() {\n    var O = toIndexedObject(this);\n    var len = lengthOfArrayLike(O);\n    var A = new $Array(len);\n    var k = 0;\n    for (; k < len; k++) createProperty(A, k, O[len - k - 1]);\n    return A;\n  }\n});\n\naddToUnscopables('toReversed');\n", "'use strict';\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\n\nmodule.exports = function (Constructor, list, $length) {\n  var index = 0;\n  var length = arguments.length > 2 ? $length : lengthOfArrayLike(list);\n  var result = new Constructor(length);\n  while (length > index) result[index] = list[index++];\n  return result;\n};\n", "'use strict';\nvar globalThis = require('../internals/global-this');\n\nmodule.exports = function (CONSTRUCTOR, METHOD) {\n  var Constructor = globalThis[CONSTRUCTOR];\n  var Prototype = Constructor && Constructor.prototype;\n  return Prototype && Prototype[METHOD];\n};\n", "'use strict';\nvar $ = require('../internals/export');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar aCallable = require('../internals/a-callable');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar arrayFromConstructorAndList = require('../internals/array-from-constructor-and-list');\nvar getBuiltInPrototypeMethod = require('../internals/get-built-in-prototype-method');\nvar addToUnscopables = require('../internals/add-to-unscopables');\n\nvar $Array = Array;\nvar sort = uncurryThis(getBuiltInPrototypeMethod('Array', 'sort'));\n\n// `Array.prototype.toSorted` method\n// https://tc39.es/ecma262/#sec-array.prototype.tosorted\n$({ target: 'Array', proto: true }, {\n  toSorted: function toSorted(compareFn) {\n    if (compareFn !== undefined) aCallable(compareFn);\n    var O = toIndexedObject(this);\n    var A = arrayFromConstructorAndList($Array, O);\n    return sort(A, compareFn);\n  }\n});\n\naddToUnscopables('toSorted');\n", "'use strict';\nvar $ = require('../internals/export');\nvar addToUnscopables = require('../internals/add-to-unscopables');\nvar doesNotExceedSafeInteger = require('../internals/does-not-exceed-safe-integer');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\nvar createProperty = require('../internals/create-property');\n\nvar $Array = Array;\nvar max = Math.max;\nvar min = Math.min;\n\n// `Array.prototype.toSpliced` method\n// https://tc39.es/ecma262/#sec-array.prototype.tospliced\n$({ target: 'Array', proto: true }, {\n  toSpliced: function toSpliced(start, deleteCount /* , ...items */) {\n    var O = toIndexedObject(this);\n    var len = lengthOfArrayLike(O);\n    var actualStart = toAbsoluteIndex(start, len);\n    var argumentsLength = arguments.length;\n    var k = 0;\n    var insertCount, actualDeleteCount, newLen, A;\n    if (argumentsLength === 0) {\n      insertCount = actualDeleteCount = 0;\n    } else if (argumentsLength === 1) {\n      insertCount = 0;\n      actualDeleteCount = len - actualStart;\n    } else {\n      insertCount = argumentsLength - 2;\n      actualDeleteCount = min(max(toIntegerOrInfinity(deleteCount), 0), len - actualStart);\n    }\n    newLen = doesNotExceedSafeInteger(len + insertCount - actualDeleteCount);\n    A = $Array(newLen);\n\n    for (; k < actualStart; k++) createProperty(A, k, O[k]);\n    for (; k < actualStart + insertCount; k++) createProperty(A, k, arguments[k - actualStart + 2]);\n    for (; k < newLen; k++) createProperty(A, k, O[k + actualDeleteCount - insertCount]);\n\n    return A;\n  }\n});\n\naddToUnscopables('toSpliced');\n", "'use strict';\n// this method was added to unscopables after implementation\n// in popular engines, so it's moved to a separate module\nvar addToUnscopables = require('../internals/add-to-unscopables');\n\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables('flat');\n", "'use strict';\n// this method was added to unscopables after implementation\n// in popular engines, so it's moved to a separate module\nvar addToUnscopables = require('../internals/add-to-unscopables');\n\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables('flatMap');\n", "'use strict';\nvar $ = require('../internals/export');\nvar toObject = require('../internals/to-object');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar setArrayLength = require('../internals/array-set-length');\nvar deletePropertyOrThrow = require('../internals/delete-property-or-throw');\nvar doesNotExceedSafeInteger = require('../internals/does-not-exceed-safe-integer');\n\n// IE8-\nvar INCORRECT_RESULT = [].unshift(0) !== 1;\n\n// V8 ~ Chrome < 71 and Safari <= 15.4, FF < 23 throws InternalError\nvar properErrorOnNonWritableLength = function () {\n  try {\n    // eslint-disable-next-line es/no-object-defineproperty -- safe\n    Object.defineProperty([], 'length', { writable: false }).unshift();\n  } catch (error) {\n    return error instanceof TypeError;\n  }\n};\n\nvar FORCED = INCORRECT_RESULT || !properErrorOnNonWritableLength();\n\n// `Array.prototype.unshift` method\n// https://tc39.es/ecma262/#sec-array.prototype.unshift\n$({ target: 'Array', proto: true, arity: 1, forced: FORCED }, {\n  // eslint-disable-next-line no-unused-vars -- required for `.length`\n  unshift: function unshift(item) {\n    var O = toObject(this);\n    var len = lengthOfArrayLike(O);\n    var argCount = arguments.length;\n    if (argCount) {\n      doesNotExceedSafeInteger(len + argCount);\n      var k = len;\n      while (k--) {\n        var to = k + argCount;\n        if (k in O) O[to] = O[k];\n        else deletePropertyOrThrow(O, to);\n      }\n      for (var j = 0; j < argCount; j++) {\n        O[j] = arguments[j];\n      }\n    } return setArrayLength(O, len + argCount);\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar createProperty = require('../internals/create-property');\n\nvar $Array = Array;\nvar $RangeError = RangeError;\n\n// Firefox bug\nvar INCORRECT_EXCEPTION_ON_COERCION_FAIL = (function () {\n  try {\n    // eslint-disable-next-line es/no-array-prototype-with, no-throw-literal -- needed for testing\n    []['with']({ valueOf: function () { throw 4; } }, null);\n  } catch (error) {\n    return error !== 4;\n  }\n})();\n\n// `Array.prototype.with` method\n// https://tc39.es/ecma262/#sec-array.prototype.with\n$({ target: 'Array', proto: true, forced: INCORRECT_EXCEPTION_ON_COERCION_FAIL }, {\n  'with': function (index, value) {\n    var O = toIndexedObject(this);\n    var len = lengthOfArrayLike(O);\n    var relativeIndex = toIntegerOrInfinity(index);\n    var actualIndex = relativeIndex < 0 ? len + relativeIndex : relativeIndex;\n    if (actualIndex >= len || actualIndex < 0) throw new $RangeError('Incorrect index');\n    var A = new $Array(len);\n    var k = 0;\n    for (; k < len; k++) createProperty(A, k, k === actualIndex ? value : O[k]);\n    return A;\n  }\n});\n", "'use strict';\n// eslint-disable-next-line es/no-typed-arrays -- safe\nmodule.exports = typeof ArrayBuffer != 'undefined' && typeof DataView != 'undefined';\n", "'use strict';\nvar defineBuiltIn = require('../internals/define-built-in');\n\nmodule.exports = function (target, src, options) {\n  for (var key in src) defineBuiltIn(target, key, src[key], options);\n  return target;\n};\n", "'use strict';\nvar isPrototypeOf = require('../internals/object-is-prototype-of');\n\nvar $TypeError = TypeError;\n\nmodule.exports = function (it, Prototype) {\n  if (isPrototypeOf(Prototype, it)) return it;\n  throw new $TypeError('Incorrect invocation');\n};\n", "'use strict';\nvar toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\nvar toLength = require('../internals/to-length');\n\nvar $RangeError = RangeError;\n\n// `ToIndex` abstract operation\n// https://tc39.es/ecma262/#sec-toindex\nmodule.exports = function (it) {\n  if (it === undefined) return 0;\n  var number = toIntegerOrInfinity(it);\n  var length = toLength(number);\n  if (number !== length) throw new $RangeError('Wrong length or index');\n  return length;\n};\n", "'use strict';\n// `Math.sign` method implementation\n// https://tc39.es/ecma262/#sec-math.sign\n// eslint-disable-next-line es/no-math-sign -- safe\nmodule.exports = Math.sign || function sign(x) {\n  var n = +x;\n  // eslint-disable-next-line no-self-compare -- NaN check\n  return n === 0 || n !== n ? n : n < 0 ? -1 : 1;\n};\n", "'use strict';\nvar EPSILON = 2.220446049250313e-16; // Number.EPSILON\nvar INVERSE_EPSILON = 1 / EPSILON;\n\nmodule.exports = function (n) {\n  return n + INVERSE_EPSILON - INVERSE_EPSILON;\n};\n", "'use strict';\nvar sign = require('../internals/math-sign');\nvar roundTiesToEven = require('../internals/math-round-ties-to-even');\n\nvar abs = Math.abs;\n\nvar EPSILON = 2.220446049250313e-16; // Number.EPSILON\n\nmodule.exports = function (x, FLOAT_EPSILON, FLOAT_MAX_VALUE, FLOAT_MIN_VALUE) {\n  var n = +x;\n  var absolute = abs(n);\n  var s = sign(n);\n  if (absolute < FLOAT_MIN_VALUE) return s * roundTiesToEven(absolute / FLOAT_MIN_VALUE / FLOAT_EPSILON) * FLOAT_MIN_VALUE * FLOAT_EPSILON;\n  var a = (1 + FLOAT_EPSILON / EPSILON) * absolute;\n  var result = a - (a - absolute);\n  // eslint-disable-next-line no-self-compare -- NaN check\n  if (result > FLOAT_MAX_VALUE || result !== result) return s * Infinity;\n  return s * result;\n};\n", "'use strict';\nvar floatRound = require('../internals/math-float-round');\n\nvar FLOAT32_EPSILON = 1.1920928955078125e-7; // 2 ** -23;\nvar FLOAT32_MAX_VALUE = 3.4028234663852886e+38; // 2 ** 128 - 2 ** 104\nvar FLOAT32_MIN_VALUE = 1.1754943508222875e-38; // 2 ** -126;\n\n// `Math.fround` method implementation\n// https://tc39.es/ecma262/#sec-math.fround\n// eslint-disable-next-line es/no-math-fround -- safe\nmodule.exports = Math.fround || function fround(x) {\n  return floatRound(x, FLOAT32_EPSILON, FLOAT32_MAX_VALUE, FLOAT32_MIN_VALUE);\n};\n", "'use strict';\n// IEEE754 conversions based on https://github.com/feross/ieee754\nvar $Array = Array;\nvar abs = Math.abs;\nvar pow = Math.pow;\nvar floor = Math.floor;\nvar log = Math.log;\nvar LN2 = Math.LN2;\n\nvar pack = function (number, mantissaLength, bytes) {\n  var buffer = $Array(bytes);\n  var exponentLength = bytes * 8 - mantissaLength - 1;\n  var eMax = (1 << exponentLength) - 1;\n  var eBias = eMax >> 1;\n  var rt = mantissaLength === 23 ? pow(2, -24) - pow(2, -77) : 0;\n  var sign = number < 0 || number === 0 && 1 / number < 0 ? 1 : 0;\n  var index = 0;\n  var exponent, mantissa, c;\n  number = abs(number);\n  // eslint-disable-next-line no-self-compare -- NaN check\n  if (number !== number || number === Infinity) {\n    // eslint-disable-next-line no-self-compare -- NaN check\n    mantissa = number !== number ? 1 : 0;\n    exponent = eMax;\n  } else {\n    exponent = floor(log(number) / LN2);\n    c = pow(2, -exponent);\n    if (number * c < 1) {\n      exponent--;\n      c *= 2;\n    }\n    if (exponent + eBias >= 1) {\n      number += rt / c;\n    } else {\n      number += rt * pow(2, 1 - eBias);\n    }\n    if (number * c >= 2) {\n      exponent++;\n      c /= 2;\n    }\n    if (exponent + eBias >= eMax) {\n      mantissa = 0;\n      exponent = eMax;\n    } else if (exponent + eBias >= 1) {\n      mantissa = (number * c - 1) * pow(2, mantissaLength);\n      exponent += eBias;\n    } else {\n      mantissa = number * pow(2, eBias - 1) * pow(2, mantissaLength);\n      exponent = 0;\n    }\n  }\n  while (mantissaLength >= 8) {\n    buffer[index++] = mantissa & 255;\n    mantissa /= 256;\n    mantissaLength -= 8;\n  }\n  exponent = exponent << mantissaLength | mantissa;\n  exponentLength += mantissaLength;\n  while (exponentLength > 0) {\n    buffer[index++] = exponent & 255;\n    exponent /= 256;\n    exponentLength -= 8;\n  }\n  buffer[index - 1] |= sign * 128;\n  return buffer;\n};\n\nvar unpack = function (buffer, mantissaLength) {\n  var bytes = buffer.length;\n  var exponentLength = bytes * 8 - mantissaLength - 1;\n  var eMax = (1 << exponentLength) - 1;\n  var eBias = eMax >> 1;\n  var nBits = exponentLength - 7;\n  var index = bytes - 1;\n  var sign = buffer[index--];\n  var exponent = sign & 127;\n  var mantissa;\n  sign >>= 7;\n  while (nBits > 0) {\n    exponent = exponent * 256 + buffer[index--];\n    nBits -= 8;\n  }\n  mantissa = exponent & (1 << -nBits) - 1;\n  exponent >>= -nBits;\n  nBits += mantissaLength;\n  while (nBits > 0) {\n    mantissa = mantissa * 256 + buffer[index--];\n    nBits -= 8;\n  }\n  if (exponent === 0) {\n    exponent = 1 - eBias;\n  } else if (exponent === eMax) {\n    return mantissa ? NaN : sign ? -Infinity : Infinity;\n  } else {\n    mantissa += pow(2, mantissaLength);\n    exponent -= eBias;\n  } return (sign ? -1 : 1) * mantissa * pow(2, exponent - mantissaLength);\n};\n\nmodule.exports = {\n  pack: pack,\n  unpack: unpack\n};\n", "'use strict';\nvar globalThis = require('../internals/global-this');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar NATIVE_ARRAY_BUFFER = require('../internals/array-buffer-basic-detection');\nvar FunctionName = require('../internals/function-name');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar defineBuiltInAccessor = require('../internals/define-built-in-accessor');\nvar defineBuiltIns = require('../internals/define-built-ins');\nvar fails = require('../internals/fails');\nvar anInstance = require('../internals/an-instance');\nvar toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\nvar toIndex = require('../internals/to-index');\nvar fround = require('../internals/math-fround');\nvar IEEE754 = require('../internals/ieee754');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar arrayFill = require('../internals/array-fill');\nvar arraySlice = require('../internals/array-slice');\nvar inheritIfRequired = require('../internals/inherit-if-required');\nvar copyConstructorProperties = require('../internals/copy-constructor-properties');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar InternalStateModule = require('../internals/internal-state');\n\nvar PROPER_FUNCTION_NAME = FunctionName.PROPER;\nvar CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;\nvar ARRAY_BUFFER = 'ArrayBuffer';\nvar DATA_VIEW = 'DataView';\nvar PROTOTYPE = 'prototype';\nvar WRONG_LENGTH = 'Wrong length';\nvar WRONG_INDEX = 'Wrong index';\nvar getInternalArrayBufferState = InternalStateModule.getterFor(ARRAY_BUFFER);\nvar getInternalDataViewState = InternalStateModule.getterFor(DATA_VIEW);\nvar setInternalState = InternalStateModule.set;\nvar NativeArrayBuffer = globalThis[ARRAY_BUFFER];\nvar $ArrayBuffer = NativeArrayBuffer;\nvar ArrayBufferPrototype = $ArrayBuffer && $ArrayBuffer[PROTOTYPE];\nvar $DataView = globalThis[DATA_VIEW];\nvar DataViewPrototype = $DataView && $DataView[PROTOTYPE];\nvar ObjectPrototype = Object.prototype;\nvar Array = globalThis.Array;\nvar RangeError = globalThis.RangeError;\nvar fill = uncurryThis(arrayFill);\nvar reverse = uncurryThis([].reverse);\n\nvar packIEEE754 = IEEE754.pack;\nvar unpackIEEE754 = IEEE754.unpack;\n\nvar packInt8 = function (number) {\n  return [number & 0xFF];\n};\n\nvar packInt16 = function (number) {\n  return [number & 0xFF, number >> 8 & 0xFF];\n};\n\nvar packInt32 = function (number) {\n  return [number & 0xFF, number >> 8 & 0xFF, number >> 16 & 0xFF, number >> 24 & 0xFF];\n};\n\nvar unpackInt32 = function (buffer) {\n  return buffer[3] << 24 | buffer[2] << 16 | buffer[1] << 8 | buffer[0];\n};\n\nvar packFloat32 = function (number) {\n  return packIEEE754(fround(number), 23, 4);\n};\n\nvar packFloat64 = function (number) {\n  return packIEEE754(number, 52, 8);\n};\n\nvar addGetter = function (Constructor, key, getInternalState) {\n  defineBuiltInAccessor(Constructor[PROTOTYPE], key, {\n    configurable: true,\n    get: function () {\n      return getInternalState(this)[key];\n    }\n  });\n};\n\nvar get = function (view, count, index, isLittleEndian) {\n  var store = getInternalDataViewState(view);\n  var intIndex = toIndex(index);\n  var boolIsLittleEndian = !!isLittleEndian;\n  if (intIndex + count > store.byteLength) throw new RangeError(WRONG_INDEX);\n  var bytes = store.bytes;\n  var start = intIndex + store.byteOffset;\n  var pack = arraySlice(bytes, start, start + count);\n  return boolIsLittleEndian ? pack : reverse(pack);\n};\n\nvar set = function (view, count, index, conversion, value, isLittleEndian) {\n  var store = getInternalDataViewState(view);\n  var intIndex = toIndex(index);\n  var pack = conversion(+value);\n  var boolIsLittleEndian = !!isLittleEndian;\n  if (intIndex + count > store.byteLength) throw new RangeError(WRONG_INDEX);\n  var bytes = store.bytes;\n  var start = intIndex + store.byteOffset;\n  for (var i = 0; i < count; i++) bytes[start + i] = pack[boolIsLittleEndian ? i : count - i - 1];\n};\n\nif (!NATIVE_ARRAY_BUFFER) {\n  $ArrayBuffer = function ArrayBuffer(length) {\n    anInstance(this, ArrayBufferPrototype);\n    var byteLength = toIndex(length);\n    setInternalState(this, {\n      type: ARRAY_BUFFER,\n      bytes: fill(Array(byteLength), 0),\n      byteLength: byteLength\n    });\n    if (!DESCRIPTORS) {\n      this.byteLength = byteLength;\n      this.detached = false;\n    }\n  };\n\n  ArrayBufferPrototype = $ArrayBuffer[PROTOTYPE];\n\n  $DataView = function DataView(buffer, byteOffset, byteLength) {\n    anInstance(this, DataViewPrototype);\n    anInstance(buffer, ArrayBufferPrototype);\n    var bufferState = getInternalArrayBufferState(buffer);\n    var bufferLength = bufferState.byteLength;\n    var offset = toIntegerOrInfinity(byteOffset);\n    if (offset < 0 || offset > bufferLength) throw new RangeError('Wrong offset');\n    byteLength = byteLength === undefined ? bufferLength - offset : toIndex(byteLength);\n    if (offset + byteLength > bufferLength) throw new RangeError(WRONG_LENGTH);\n    setInternalState(this, {\n      type: DATA_VIEW,\n      buffer: buffer,\n      byteLength: byteLength,\n      byteOffset: offset,\n      bytes: bufferState.bytes\n    });\n    if (!DESCRIPTORS) {\n      this.buffer = buffer;\n      this.byteLength = byteLength;\n      this.byteOffset = offset;\n    }\n  };\n\n  DataViewPrototype = $DataView[PROTOTYPE];\n\n  if (DESCRIPTORS) {\n    addGetter($ArrayBuffer, 'byteLength', getInternalArrayBufferState);\n    addGetter($DataView, 'buffer', getInternalDataViewState);\n    addGetter($DataView, 'byteLength', getInternalDataViewState);\n    addGetter($DataView, 'byteOffset', getInternalDataViewState);\n  }\n\n  defineBuiltIns(DataViewPrototype, {\n    getInt8: function getInt8(byteOffset) {\n      return get(this, 1, byteOffset)[0] << 24 >> 24;\n    },\n    getUint8: function getUint8(byteOffset) {\n      return get(this, 1, byteOffset)[0];\n    },\n    getInt16: function getInt16(byteOffset /* , littleEndian */) {\n      var bytes = get(this, 2, byteOffset, arguments.length > 1 ? arguments[1] : false);\n      return (bytes[1] << 8 | bytes[0]) << 16 >> 16;\n    },\n    getUint16: function getUint16(byteOffset /* , littleEndian */) {\n      var bytes = get(this, 2, byteOffset, arguments.length > 1 ? arguments[1] : false);\n      return bytes[1] << 8 | bytes[0];\n    },\n    getInt32: function getInt32(byteOffset /* , littleEndian */) {\n      return unpackInt32(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : false));\n    },\n    getUint32: function getUint32(byteOffset /* , littleEndian */) {\n      return unpackInt32(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : false)) >>> 0;\n    },\n    getFloat32: function getFloat32(byteOffset /* , littleEndian */) {\n      return unpackIEEE754(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : false), 23);\n    },\n    getFloat64: function getFloat64(byteOffset /* , littleEndian */) {\n      return unpackIEEE754(get(this, 8, byteOffset, arguments.length > 1 ? arguments[1] : false), 52);\n    },\n    setInt8: function setInt8(byteOffset, value) {\n      set(this, 1, byteOffset, packInt8, value);\n    },\n    setUint8: function setUint8(byteOffset, value) {\n      set(this, 1, byteOffset, packInt8, value);\n    },\n    setInt16: function setInt16(byteOffset, value /* , littleEndian */) {\n      set(this, 2, byteOffset, packInt16, value, arguments.length > 2 ? arguments[2] : false);\n    },\n    setUint16: function setUint16(byteOffset, value /* , littleEndian */) {\n      set(this, 2, byteOffset, packInt16, value, arguments.length > 2 ? arguments[2] : false);\n    },\n    setInt32: function setInt32(byteOffset, value /* , littleEndian */) {\n      set(this, 4, byteOffset, packInt32, value, arguments.length > 2 ? arguments[2] : false);\n    },\n    setUint32: function setUint32(byteOffset, value /* , littleEndian */) {\n      set(this, 4, byteOffset, packInt32, value, arguments.length > 2 ? arguments[2] : false);\n    },\n    setFloat32: function setFloat32(byteOffset, value /* , littleEndian */) {\n      set(this, 4, byteOffset, packFloat32, value, arguments.length > 2 ? arguments[2] : false);\n    },\n    setFloat64: function setFloat64(byteOffset, value /* , littleEndian */) {\n      set(this, 8, byteOffset, packFloat64, value, arguments.length > 2 ? arguments[2] : false);\n    }\n  });\n} else {\n  var INCORRECT_ARRAY_BUFFER_NAME = PROPER_FUNCTION_NAME && NativeArrayBuffer.name !== ARRAY_BUFFER;\n  /* eslint-disable no-new, sonarjs/inconsistent-function-call -- required for testing */\n  if (!fails(function () {\n    NativeArrayBuffer(1);\n  }) || !fails(function () {\n    new NativeArrayBuffer(-1);\n  }) || fails(function () {\n    new NativeArrayBuffer();\n    new NativeArrayBuffer(1.5);\n    new NativeArrayBuffer(NaN);\n    return NativeArrayBuffer.length !== 1 || INCORRECT_ARRAY_BUFFER_NAME && !CONFIGURABLE_FUNCTION_NAME;\n  })) {\n    /* eslint-enable no-new, sonarjs/inconsistent-function-call -- required for testing */\n    $ArrayBuffer = function ArrayBuffer(length) {\n      anInstance(this, ArrayBufferPrototype);\n      return inheritIfRequired(new NativeArrayBuffer(toIndex(length)), this, $ArrayBuffer);\n    };\n\n    $ArrayBuffer[PROTOTYPE] = ArrayBufferPrototype;\n\n    ArrayBufferPrototype.constructor = $ArrayBuffer;\n\n    copyConstructorProperties($ArrayBuffer, NativeArrayBuffer);\n  } else if (INCORRECT_ARRAY_BUFFER_NAME && CONFIGURABLE_FUNCTION_NAME) {\n    createNonEnumerableProperty(NativeArrayBuffer, 'name', ARRAY_BUFFER);\n  }\n\n  // WebKit bug - the same parent prototype for typed arrays and data view\n  if (setPrototypeOf && getPrototypeOf(DataViewPrototype) !== ObjectPrototype) {\n    setPrototypeOf(DataViewPrototype, ObjectPrototype);\n  }\n\n  // iOS Safari 7.x bug\n  var testView = new $DataView(new $ArrayBuffer(2));\n  var $setInt8 = uncurryThis(DataViewPrototype.setInt8);\n  testView.setInt8(0, 2147483648);\n  testView.setInt8(1, 2147483649);\n  if (testView.getInt8(0) || !testView.getInt8(1)) defineBuiltIns(DataViewPrototype, {\n    setInt8: function setInt8(byteOffset, value) {\n      $setInt8(this, byteOffset, value << 24 >> 24);\n    },\n    setUint8: function setUint8(byteOffset, value) {\n      $setInt8(this, byteOffset, value << 24 >> 24);\n    }\n  }, { unsafe: true });\n}\n\nsetToStringTag($ArrayBuffer, ARRAY_BUFFER);\nsetToStringTag($DataView, DATA_VIEW);\n\nmodule.exports = {\n  ArrayBuffer: $ArrayBuffer,\n  DataView: $DataView\n};\n", "'use strict';\nvar $ = require('../internals/export');\nvar globalThis = require('../internals/global-this');\nvar arrayBufferModule = require('../internals/array-buffer');\nvar setSpecies = require('../internals/set-species');\n\nvar ARRAY_BUFFER = 'ArrayBuffer';\nvar ArrayBuffer = arrayBufferModule[ARRAY_BUFFER];\nvar NativeArrayBuffer = globalThis[ARRAY_BUFFER];\n\n// `ArrayBuffer` constructor\n// https://tc39.es/ecma262/#sec-arraybuffer-constructor\n$({ global: true, constructor: true, forced: NativeArrayBuffer !== ArrayBuffer }, {\n  ArrayBuffer: ArrayBuffer\n});\n\nsetSpecies(ARRAY_BUFFER);\n", "'use strict';\nvar NATIVE_ARRAY_BUFFER = require('../internals/array-buffer-basic-detection');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar globalThis = require('../internals/global-this');\nvar isCallable = require('../internals/is-callable');\nvar isObject = require('../internals/is-object');\nvar hasOwn = require('../internals/has-own-property');\nvar classof = require('../internals/classof');\nvar tryToString = require('../internals/try-to-string');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar defineBuiltIn = require('../internals/define-built-in');\nvar defineBuiltInAccessor = require('../internals/define-built-in-accessor');\nvar isPrototypeOf = require('../internals/object-is-prototype-of');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar uid = require('../internals/uid');\nvar InternalStateModule = require('../internals/internal-state');\n\nvar enforceInternalState = InternalStateModule.enforce;\nvar getInternalState = InternalStateModule.get;\nvar Int8Array = globalThis.Int8Array;\nvar Int8ArrayPrototype = Int8Array && Int8Array.prototype;\nvar Uint8ClampedArray = globalThis.Uint8ClampedArray;\nvar Uint8ClampedArrayPrototype = Uint8ClampedArray && Uint8ClampedArray.prototype;\nvar TypedArray = Int8Array && getPrototypeOf(Int8Array);\nvar TypedArrayPrototype = Int8ArrayPrototype && getPrototypeOf(Int8ArrayPrototype);\nvar ObjectPrototype = Object.prototype;\nvar TypeError = globalThis.TypeError;\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar TYPED_ARRAY_TAG = uid('TYPED_ARRAY_TAG');\nvar TYPED_ARRAY_CONSTRUCTOR = 'TypedArrayConstructor';\n// Fixing native typed arrays in Opera Presto crashes the browser, see #595\nvar NATIVE_ARRAY_BUFFER_VIEWS = NATIVE_ARRAY_BUFFER && !!setPrototypeOf && classof(globalThis.opera) !== 'Opera';\nvar TYPED_ARRAY_TAG_REQUIRED = false;\nvar NAME, Constructor, Prototype;\n\nvar TypedArrayConstructorsList = {\n  Int8Array: 1,\n  Uint8Array: 1,\n  Uint8ClampedArray: 1,\n  Int16Array: 2,\n  Uint16Array: 2,\n  Int32Array: 4,\n  Uint32Array: 4,\n  Float32Array: 4,\n  Float64Array: 8\n};\n\nvar BigIntArrayConstructorsList = {\n  BigInt64Array: 8,\n  BigUint64Array: 8\n};\n\nvar isView = function isView(it) {\n  if (!isObject(it)) return false;\n  var klass = classof(it);\n  return klass === 'DataView'\n    || hasOwn(TypedArrayConstructorsList, klass)\n    || hasOwn(BigIntArrayConstructorsList, klass);\n};\n\nvar getTypedArrayConstructor = function (it) {\n  var proto = getPrototypeOf(it);\n  if (!isObject(proto)) return;\n  var state = getInternalState(proto);\n  return (state && hasOwn(state, TYPED_ARRAY_CONSTRUCTOR)) ? state[TYPED_ARRAY_CONSTRUCTOR] : getTypedArrayConstructor(proto);\n};\n\nvar isTypedArray = function (it) {\n  if (!isObject(it)) return false;\n  var klass = classof(it);\n  return hasOwn(TypedArrayConstructorsList, klass)\n    || hasOwn(BigIntArrayConstructorsList, klass);\n};\n\nvar aTypedArray = function (it) {\n  if (isTypedArray(it)) return it;\n  throw new TypeError('Target is not a typed array');\n};\n\nvar aTypedArrayConstructor = function (C) {\n  if (isCallable(C) && (!setPrototypeOf || isPrototypeOf(TypedArray, C))) return C;\n  throw new TypeError(tryToString(C) + ' is not a typed array constructor');\n};\n\nvar exportTypedArrayMethod = function (KEY, property, forced, options) {\n  if (!DESCRIPTORS) return;\n  if (forced) for (var ARRAY in TypedArrayConstructorsList) {\n    var TypedArrayConstructor = globalThis[ARRAY];\n    if (TypedArrayConstructor && hasOwn(TypedArrayConstructor.prototype, KEY)) try {\n      delete TypedArrayConstructor.prototype[KEY];\n    } catch (error) {\n      // old WebKit bug - some methods are non-configurable\n      try {\n        TypedArrayConstructor.prototype[KEY] = property;\n      } catch (error2) { /* empty */ }\n    }\n  }\n  if (!TypedArrayPrototype[KEY] || forced) {\n    defineBuiltIn(TypedArrayPrototype, KEY, forced ? property\n      : NATIVE_ARRAY_BUFFER_VIEWS && Int8ArrayPrototype[KEY] || property, options);\n  }\n};\n\nvar exportTypedArrayStaticMethod = function (KEY, property, forced) {\n  var ARRAY, TypedArrayConstructor;\n  if (!DESCRIPTORS) return;\n  if (setPrototypeOf) {\n    if (forced) for (ARRAY in TypedArrayConstructorsList) {\n      TypedArrayConstructor = globalThis[ARRAY];\n      if (TypedArrayConstructor && hasOwn(TypedArrayConstructor, KEY)) try {\n        delete TypedArrayConstructor[KEY];\n      } catch (error) { /* empty */ }\n    }\n    if (!TypedArray[KEY] || forced) {\n      // V8 ~ Chrome 49-50 `%TypedArray%` methods are non-writable non-configurable\n      try {\n        return defineBuiltIn(TypedArray, KEY, forced ? property : NATIVE_ARRAY_BUFFER_VIEWS && TypedArray[KEY] || property);\n      } catch (error) { /* empty */ }\n    } else return;\n  }\n  for (ARRAY in TypedArrayConstructorsList) {\n    TypedArrayConstructor = globalThis[ARRAY];\n    if (TypedArrayConstructor && (!TypedArrayConstructor[KEY] || forced)) {\n      defineBuiltIn(TypedArrayConstructor, KEY, property);\n    }\n  }\n};\n\nfor (NAME in TypedArrayConstructorsList) {\n  Constructor = globalThis[NAME];\n  Prototype = Constructor && Constructor.prototype;\n  if (Prototype) enforceInternalState(Prototype)[TYPED_ARRAY_CONSTRUCTOR] = Constructor;\n  else NATIVE_ARRAY_BUFFER_VIEWS = false;\n}\n\nfor (NAME in BigIntArrayConstructorsList) {\n  Constructor = globalThis[NAME];\n  Prototype = Constructor && Constructor.prototype;\n  if (Prototype) enforceInternalState(Prototype)[TYPED_ARRAY_CONSTRUCTOR] = Constructor;\n}\n\n// WebKit bug - typed arrays constructors prototype is Object.prototype\nif (!NATIVE_ARRAY_BUFFER_VIEWS || !isCallable(TypedArray) || TypedArray === Function.prototype) {\n  // eslint-disable-next-line no-shadow -- safe\n  TypedArray = function TypedArray() {\n    throw new TypeError('Incorrect invocation');\n  };\n  if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {\n    if (globalThis[NAME]) setPrototypeOf(globalThis[NAME], TypedArray);\n  }\n}\n\nif (!NATIVE_ARRAY_BUFFER_VIEWS || !TypedArrayPrototype || TypedArrayPrototype === ObjectPrototype) {\n  TypedArrayPrototype = TypedArray.prototype;\n  if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {\n    if (globalThis[NAME]) setPrototypeOf(globalThis[NAME].prototype, TypedArrayPrototype);\n  }\n}\n\n// WebKit bug - one more object in Uint8ClampedArray prototype chain\nif (NATIVE_ARRAY_BUFFER_VIEWS && getPrototypeOf(Uint8ClampedArrayPrototype) !== TypedArrayPrototype) {\n  setPrototypeOf(Uint8ClampedArrayPrototype, TypedArrayPrototype);\n}\n\nif (DESCRIPTORS && !hasOwn(TypedArrayPrototype, TO_STRING_TAG)) {\n  TYPED_ARRAY_TAG_REQUIRED = true;\n  defineBuiltInAccessor(TypedArrayPrototype, TO_STRING_TAG, {\n    configurable: true,\n    get: function () {\n      return isObject(this) ? this[TYPED_ARRAY_TAG] : undefined;\n    }\n  });\n  for (NAME in TypedArrayConstructorsList) if (globalThis[NAME]) {\n    createNonEnumerableProperty(globalThis[NAME].prototype, TYPED_ARRAY_TAG, NAME);\n  }\n}\n\nmodule.exports = {\n  NATIVE_ARRAY_BUFFER_VIEWS: NATIVE_ARRAY_BUFFER_VIEWS,\n  TYPED_ARRAY_TAG: TYPED_ARRAY_TAG_REQUIRED && TYPED_ARRAY_TAG,\n  aTypedArray: aTypedArray,\n  aTypedArrayConstructor: aTypedArrayConstructor,\n  exportTypedArrayMethod: exportTypedArrayMethod,\n  exportTypedArrayStaticMethod: exportTypedArrayStaticMethod,\n  getTypedArrayConstructor: getTypedArrayConstructor,\n  isView: isView,\n  isTypedArray: isTypedArray,\n  TypedArray: TypedArray,\n  TypedArrayPrototype: TypedArrayPrototype\n};\n", "'use strict';\nvar $ = require('../internals/export');\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\n\nvar NATIVE_ARRAY_BUFFER_VIEWS = ArrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS;\n\n// `ArrayBuffer.isView` method\n// https://tc39.es/ecma262/#sec-arraybuffer.isview\n$({ target: 'ArrayBuffer', stat: true, forced: !NATIVE_ARRAY_BUFFER_VIEWS }, {\n  isView: ArrayBufferViewCore.isView\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar uncurryThis = require('../internals/function-uncurry-this-clause');\nvar fails = require('../internals/fails');\nvar ArrayBufferModule = require('../internals/array-buffer');\nvar anObject = require('../internals/an-object');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar toLength = require('../internals/to-length');\n\nvar ArrayBuffer = ArrayBufferModule.ArrayBuffer;\nvar DataView = ArrayBufferModule.DataView;\nvar DataViewPrototype = DataView.prototype;\nvar nativeArrayBufferSlice = uncurryThis(ArrayBuffer.prototype.slice);\nvar getUint8 = uncurryThis(DataViewPrototype.getUint8);\nvar setUint8 = uncurryThis(DataViewPrototype.setUint8);\n\nvar INCORRECT_SLICE = fails(function () {\n  return !new ArrayBuffer(2).slice(1, undefined).byteLength;\n});\n\n// `ArrayBuffer.prototype.slice` method\n// https://tc39.es/ecma262/#sec-arraybuffer.prototype.slice\n$({ target: 'ArrayBuffer', proto: true, unsafe: true, forced: INCORRECT_SLICE }, {\n  slice: function slice(start, end) {\n    if (nativeArrayBufferSlice && end === undefined) {\n      return nativeArrayBufferSlice(anObject(this), start); // FF fix\n    }\n    var length = anObject(this).byteLength;\n    var first = toAbsoluteIndex(start, length);\n    var fin = toAbsoluteIndex(end === undefined ? length : end, length);\n    var result = new ArrayBuffer(toLength(fin - first));\n    var viewSource = new DataView(this);\n    var viewTarget = new DataView(result);\n    var index = 0;\n    while (first < fin) {\n      setUint8(viewTarget, index++, getUint8(viewSource, first++));\n    } return result;\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar ArrayBufferModule = require('../internals/array-buffer');\nvar NATIVE_ARRAY_BUFFER = require('../internals/array-buffer-basic-detection');\n\n// `DataView` constructor\n// https://tc39.es/ecma262/#sec-dataview-constructor\n$({ global: true, constructor: true, forced: !NATIVE_ARRAY_BUFFER }, {\n  DataView: ArrayBufferModule.DataView\n});\n", "'use strict';\n// TODO: Remove this module from `core-js@4` since it's replaced to module below\nrequire('../modules/es.data-view.constructor');\n", "'use strict';\nvar $ = require('../internals/export');\nvar uncurryThis = require('../internals/function-uncurry-this');\n\nvar pow = Math.pow;\n\nvar EXP_MASK16 = 31; // 2 ** 5 - 1\nvar SIGNIFICAND_MASK16 = 1023; // 2 ** 10 - 1\nvar MIN_SUBNORMAL16 = pow(2, -24); // 2 ** -10 * 2 ** -14\nvar SIGNIFICAND_DENOM16 = 0.0009765625; // 2 ** -10\n\nvar unpackFloat16 = function (bytes) {\n  var sign = bytes >>> 15;\n  var exponent = bytes >>> 10 & EXP_MASK16;\n  var significand = bytes & SIGNIFICAND_MASK16;\n  if (exponent === EXP_MASK16) return significand === 0 ? sign === 0 ? Infinity : -Infinity : NaN;\n  if (exponent === 0) return significand * (sign === 0 ? MIN_SUBNORMAL16 : -MIN_SUBNORMAL16);\n  return pow(2, exponent - 15) * (sign === 0 ? 1 + significand * SIGNIFICAND_DENOM16 : -1 - significand * SIGNIFICAND_DENOM16);\n};\n\n// eslint-disable-next-line es/no-typed-arrays -- safe\nvar getUint16 = uncurryThis(DataView.prototype.getUint16);\n\n// `DataView.prototype.getFloat16` method\n// https://tc39.es/ecma262/#sec-dataview.prototype.getfloat16\n$({ target: 'DataView', proto: true }, {\n  getFloat16: function getFloat16(byteOffset /* , littleEndian */) {\n    return unpackFloat16(getUint16(this, byteOffset, arguments.length > 1 ? arguments[1] : false));\n  }\n});\n", "'use strict';\nvar classof = require('../internals/classof');\n\nvar $TypeError = TypeError;\n\nmodule.exports = function (argument) {\n  if (classof(argument) === 'DataView') return argument;\n  throw new $TypeError('Argument is not a DataView');\n};\n", "'use strict';\nvar log = Math.log;\nvar LN2 = Math.LN2;\n\n// `Math.log2` method\n// https://tc39.es/ecma262/#sec-math.log2\n// eslint-disable-next-line es/no-math-log2 -- safe\nmodule.exports = Math.log2 || function log2(x) {\n  return log(x) / LN2;\n};\n", "'use strict';\nvar $ = require('../internals/export');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar aDataView = require('../internals/a-data-view');\nvar toIndex = require('../internals/to-index');\n// TODO: Replace with module dependency in `core-js@4`\nvar log2 = require('../internals/math-log2');\nvar roundTiesToEven = require('../internals/math-round-ties-to-even');\n\nvar floor = Math.floor;\nvar pow = Math.pow;\n\nvar MIN_INFINITY16 = 65520; // (2 - 2 ** -11) * 2 ** 15\nvar MIN_NORMAL16 = 0.000061005353927612305; // (1 - 2 ** -11) * 2 ** -14\nvar REC_MIN_SUBNORMAL16 = 16777216; // 2 ** 10 * 2 ** 14\nvar REC_SIGNIFICAND_DENOM16 = 1024; // 2 ** 10;\n\nvar packFloat16 = function (value) {\n  // eslint-disable-next-line no-self-compare -- NaN check\n  if (value !== value) return 0x7E00; // NaN\n  if (value === 0) return (1 / value === -Infinity) << 15; // +0 or -0\n\n  var neg = value < 0;\n  if (neg) value = -value;\n  if (value >= MIN_INFINITY16) return neg << 15 | 0x7C00; // Infinity\n  if (value < MIN_NORMAL16) return neg << 15 | roundTiesToEven(value * REC_MIN_SUBNORMAL16); // subnormal\n\n  // normal\n  var exponent = floor(log2(value));\n  if (exponent === -15) {\n    // we round from a value between 2 ** -15 * (1 + 1022/1024) (the largest subnormal) and 2 ** -14 * (1 + 0/1024) (the smallest normal)\n    // to the latter (former impossible because of the subnormal check above)\n    return neg << 15 | REC_SIGNIFICAND_DENOM16;\n  }\n  var significand = roundTiesToEven((value * pow(2, -exponent) - 1) * REC_SIGNIFICAND_DENOM16);\n  if (significand === REC_SIGNIFICAND_DENOM16) {\n    // we round from a value between 2 ** n * (1 + 1023/1024) and 2 ** (n + 1) * (1 + 0/1024) to the latter\n    return neg << 15 | exponent + 16 << 10;\n  }\n  return neg << 15 | exponent + 15 << 10 | significand;\n};\n\n// eslint-disable-next-line es/no-typed-arrays -- safe\nvar setUint16 = uncurryThis(DataView.prototype.setUint16);\n\n// `DataView.prototype.setFloat16` method\n// https://tc39.es/ecma262/#sec-dataview.prototype.setfloat16\n$({ target: 'DataView', proto: true }, {\n  setFloat16: function setFloat16(byteOffset, value /* , littleEndian */) {\n    setUint16(\n      aDataView(this),\n      toIndex(byteOffset),\n      packFloat16(+value),\n      arguments.length > 2 ? arguments[2] : false\n    );\n  }\n});\n", "'use strict';\nvar globalThis = require('../internals/global-this');\nvar uncurryThisAccessor = require('../internals/function-uncurry-this-accessor');\nvar classof = require('../internals/classof-raw');\n\nvar ArrayBuffer = globalThis.ArrayBuffer;\nvar TypeError = globalThis.TypeError;\n\n// Includes\n// - Perform ? RequireInternalSlot(O, [[ArrayBufferData]]).\n// - If IsSharedArrayBuffer(O) is true, throw a TypeError exception.\nmodule.exports = ArrayBuffer && uncurryThisAccessor(ArrayBuffer.prototype, 'byteLength', 'get') || function (O) {\n  if (classof(O) !== 'ArrayBuffer') throw new TypeError('ArrayBuffer expected');\n  return O.byteLength;\n};\n", "'use strict';\nvar globalThis = require('../internals/global-this');\nvar NATIVE_ARRAY_BUFFER = require('../internals/array-buffer-basic-detection');\nvar arrayBufferByteLength = require('../internals/array-buffer-byte-length');\n\nvar DataView = globalThis.DataView;\n\nmodule.exports = function (O) {\n  if (!NATIVE_ARRAY_BUFFER || arrayBufferByteLength(O) !== 0) return false;\n  try {\n    // eslint-disable-next-line no-new -- thrower\n    new DataView(O);\n    return false;\n  } catch (error) {\n    return true;\n  }\n};\n", "'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar defineBuiltInAccessor = require('../internals/define-built-in-accessor');\nvar isDetached = require('../internals/array-buffer-is-detached');\n\nvar ArrayBufferPrototype = ArrayBuffer.prototype;\n\n// `ArrayBuffer.prototype.detached` getter\n// https://tc39.es/ecma262/#sec-get-arraybuffer.prototype.detached\nif (DESCRIPTORS && !('detached' in ArrayBufferPrototype)) {\n  defineBuiltInAccessor(ArrayBufferPrototype, 'detached', {\n    configurable: true,\n    get: function detached() {\n      return isDetached(this);\n    }\n  });\n}\n", "'use strict';\nvar isDetached = require('../internals/array-buffer-is-detached');\n\nvar $TypeError = TypeError;\n\nmodule.exports = function (it) {\n  if (isDetached(it)) throw new $TypeError('ArrayBuffer is detached');\n  return it;\n};\n", "'use strict';\nvar globalThis = require('../internals/global-this');\nvar IS_NODE = require('../internals/environment-is-node');\n\nmodule.exports = function (name) {\n  if (IS_NODE) {\n    try {\n      return globalThis.process.getBuiltinModule(name);\n    } catch (error) { /* empty */ }\n    try {\n      // eslint-disable-next-line no-new-func -- safe\n      return Function('return require(\"' + name + '\")')();\n    } catch (error) { /* empty */ }\n  }\n};\n", "'use strict';\nvar globalThis = require('../internals/global-this');\nvar fails = require('../internals/fails');\nvar V8 = require('../internals/environment-v8-version');\nvar ENVIRONMENT = require('../internals/environment');\n\nvar structuredClone = globalThis.structuredClone;\n\nmodule.exports = !!structuredClone && !fails(function () {\n  // prevent V8 ArrayBufferDetaching protector cell invalidation and performance degradation\n  // https://github.com/zloirock/core-js/issues/679\n  if ((ENVIRONMENT === 'DENO' && V8 > 92) || (ENVIRONMENT === 'NODE' && V8 > 94) || (ENVIRONMENT === 'BROWSER' && V8 > 97)) return false;\n  var buffer = new ArrayBuffer(8);\n  var clone = structuredClone(buffer, { transfer: [buffer] });\n  return buffer.byteLength !== 0 || clone.byteLength !== 8;\n});\n", "'use strict';\nvar globalThis = require('../internals/global-this');\nvar getBuiltInNodeModule = require('../internals/get-built-in-node-module');\nvar PROPER_STRUCTURED_CLONE_TRANSFER = require('../internals/structured-clone-proper-transfer');\n\nvar structuredClone = globalThis.structuredClone;\nvar $ArrayBuffer = globalThis.ArrayBuffer;\nvar $MessageChannel = globalThis.MessageChannel;\nvar detach = false;\nvar WorkerThreads, channel, buffer, $detach;\n\nif (PROPER_STRUCTURED_CLONE_TRANSFER) {\n  detach = function (transferable) {\n    structuredClone(transferable, { transfer: [transferable] });\n  };\n} else if ($ArrayBuffer) try {\n  if (!$MessageChannel) {\n    WorkerThreads = getBuiltInNodeModule('worker_threads');\n    if (WorkerThreads) $MessageChannel = WorkerThreads.MessageChannel;\n  }\n\n  if ($MessageChannel) {\n    channel = new $MessageChannel();\n    buffer = new $ArrayBuffer(2);\n\n    $detach = function (transferable) {\n      channel.port1.postMessage(null, [transferable]);\n    };\n\n    if (buffer.byteLength === 2) {\n      $detach(buffer);\n      if (buffer.byteLength === 0) detach = $detach;\n    }\n  }\n} catch (error) { /* empty */ }\n\nmodule.exports = detach;\n", "'use strict';\nvar globalThis = require('../internals/global-this');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar uncurryThisAccessor = require('../internals/function-uncurry-this-accessor');\nvar toIndex = require('../internals/to-index');\nvar notDetached = require('../internals/array-buffer-not-detached');\nvar arrayBufferByteLength = require('../internals/array-buffer-byte-length');\nvar detachTransferable = require('../internals/detach-transferable');\nvar PROPER_STRUCTURED_CLONE_TRANSFER = require('../internals/structured-clone-proper-transfer');\n\nvar structuredClone = globalThis.structuredClone;\nvar ArrayBuffer = globalThis.ArrayBuffer;\nvar DataView = globalThis.DataView;\nvar max = Math.max;\nvar min = Math.min;\nvar ArrayBufferPrototype = ArrayBuffer.prototype;\nvar DataViewPrototype = DataView.prototype;\nvar slice = uncurryThis(ArrayBufferPrototype.slice);\nvar isResizable = uncurryThisAccessor(ArrayBufferPrototype, 'resizable', 'get');\nvar maxByteLength = uncurryThisAccessor(ArrayBufferPrototype, 'maxByteLength', 'get');\nvar getInt8 = uncurryThis(DataViewPrototype.getInt8);\nvar setInt8 = uncurryThis(DataViewPrototype.setInt8);\n\nmodule.exports = (PROPER_STRUCTURED_CLONE_TRANSFER || detachTransferable) && function (arrayBuffer, newLength, preserveResizability) {\n  var byteLength = arrayBufferByteLength(arrayBuffer);\n  var newByteLength = newLength === undefined ? byteLength : toIndex(newLength);\n  var fixedLength = !isResizable || !isResizable(arrayBuffer);\n  var newBuffer;\n  notDetached(arrayBuffer);\n  if (PROPER_STRUCTURED_CLONE_TRANSFER) {\n    arrayBuffer = structuredClone(arrayBuffer, { transfer: [arrayBuffer] });\n    if (byteLength === newByteLength && (preserveResizability || fixedLength)) return arrayBuffer;\n  }\n  if (byteLength >= newByteLength && (!preserveResizability || fixedLength)) {\n    newBuffer = slice(arrayBuffer, 0, newByteLength);\n  } else {\n    var options = preserveResizability && !fixedLength && maxByteLength\n      ? { maxByteLength: max(newByteLength, maxByteLength(arrayBuffer)) }\n      : undefined;\n    newBuffer = new ArrayBuffer(newByteLength, options);\n    var a = new DataView(arrayBuffer);\n    var b = new DataView(newBuffer);\n    var copyLength = min(newByteLength, byteLength);\n    for (var i = 0; i < copyLength; i++) setInt8(b, i, getInt8(a, i));\n  }\n  if (!PROPER_STRUCTURED_CLONE_TRANSFER) detachTransferable(arrayBuffer);\n  return newBuffer;\n};\n", "'use strict';\nvar $ = require('../internals/export');\nvar $transfer = require('../internals/array-buffer-transfer');\n\n// `ArrayBuffer.prototype.transfer` method\n// https://tc39.es/ecma262/#sec-arraybuffer.prototype.transfer\nif ($transfer) $({ target: 'ArrayBuffer', proto: true }, {\n  transfer: function transfer() {\n    return $transfer(this, arguments.length ? arguments[0] : undefined, true);\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar $transfer = require('../internals/array-buffer-transfer');\n\n// `ArrayBuffer.prototype.transferToFixedLength` method\n// https://tc39.es/ecma262/#sec-arraybuffer.prototype.transfertofixedlength\nif ($transfer) $({ target: 'ArrayBuffer', proto: true }, {\n  transferToFixedLength: function transferToFixedLength() {\n    return $transfer(this, arguments.length ? arguments[0] : undefined, false);\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar fails = require('../internals/fails');\n\n// IE8- non-standard case\nvar FORCED = fails(function () {\n  // eslint-disable-next-line es/no-date-prototype-getyear-setyear -- detection\n  return new Date(16e11).getYear() !== 120;\n});\n\nvar getFullYear = uncurryThis(Date.prototype.getFullYear);\n\n// `Date.prototype.getYear` method\n// https://tc39.es/ecma262/#sec-date.prototype.getyear\n$({ target: 'Date', proto: true, forced: FORCED }, {\n  getYear: function getYear() {\n    return getFullYear(this) - 1900;\n  }\n});\n", "'use strict';\n// TODO: Remove from `core-js@4`\nvar $ = require('../internals/export');\nvar uncurryThis = require('../internals/function-uncurry-this');\n\nvar $Date = Date;\nvar thisTimeValue = uncurryThis($Date.prototype.getTime);\n\n// `Date.now` method\n// https://tc39.es/ecma262/#sec-date.now\n$({ target: 'Date', stat: true }, {\n  now: function now() {\n    return thisTimeValue(new $Date());\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\n\nvar DatePrototype = Date.prototype;\nvar thisTimeValue = uncurryThis(DatePrototype.getTime);\nvar setFullYear = uncurryThis(DatePrototype.setFullYear);\n\n// `Date.prototype.setYear` method\n// https://tc39.es/ecma262/#sec-date.prototype.setyear\n$({ target: 'Date', proto: true }, {\n  setYear: function setYear(year) {\n    // validate\n    thisTimeValue(this);\n    var y = +year;\n    // eslint-disable-next-line no-self-compare -- NaN check\n    if (y !== y) return setFullYear(this, y);\n    var yi = toIntegerOrInfinity(y);\n    var yyyy = yi >= 0 && yi <= 99 ? yi + 1900 : yi;\n    return setFullYear(this, yyyy);\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\n\n// `Date.prototype.toGMTString` method\n// https://tc39.es/ecma262/#sec-date.prototype.togmtstring\n$({ target: 'Date', proto: true }, {\n  toGMTString: Date.prototype.toUTCString\n});\n", "'use strict';\nvar toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\nvar toString = require('../internals/to-string');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\nvar $RangeError = RangeError;\nvar floor = Math.floor;\n\n// `String.prototype.repeat` method implementation\n// https://tc39.es/ecma262/#sec-string.prototype.repeat\nmodule.exports = function repeat(count) {\n  var str = toString(requireObjectCoercible(this));\n  var result = '';\n  var n = toIntegerOrInfinity(count);\n  if (n < 0 || n === Infinity) throw new $RangeError('Wrong number of repetitions');\n  for (;n > 0; (n = floor(n / 2)) && (str += str)) if (n % 2) result += str;\n  return result;\n};\n", "'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar toLength = require('../internals/to-length');\nvar toString = require('../internals/to-string');\nvar $repeat = require('../internals/string-repeat');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\nvar repeat = uncurryThis($repeat);\nvar stringSlice = uncurryThis(''.slice);\nvar ceil = Math.ceil;\n\n// `String.prototype.{ padStart, padEnd }` methods implementation\nvar createMethod = function (IS_END) {\n  return function ($this, maxLength, fillString) {\n    var S = toString(requireObjectCoercible($this));\n    var intMaxLength = toLength(maxLength);\n    var stringLength = S.length;\n    if (intMaxLength <= stringLength) return S;\n    var fillStr = fillString === undefined ? ' ' : toString(fillString);\n    var fillLen, stringFiller;\n    if (fillStr === '') return S;\n    fillLen = intMaxLength - stringLength;\n    stringFiller = repeat(fillStr, ceil(fillLen / fillStr.length));\n    if (stringFiller.length > fillLen) stringFiller = stringSlice(stringFiller, 0, fillLen);\n    return IS_END ? S + stringFiller : stringFiller + S;\n  };\n};\n\nmodule.exports = {\n  // `String.prototype.padStart` method\n  // https://tc39.es/ecma262/#sec-string.prototype.padstart\n  start: createMethod(false),\n  // `String.prototype.padEnd` method\n  // https://tc39.es/ecma262/#sec-string.prototype.padend\n  end: createMethod(true)\n};\n", "'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar fails = require('../internals/fails');\nvar padStart = require('../internals/string-pad').start;\n\nvar $RangeError = RangeError;\nvar $isFinite = isFinite;\nvar abs = Math.abs;\nvar DatePrototype = Date.prototype;\nvar nativeDateToISOString = DatePrototype.toISOString;\nvar thisTimeValue = uncurryThis(DatePrototype.getTime);\nvar getUTCDate = uncurryThis(DatePrototype.getUTCDate);\nvar getUTCFullYear = uncurryThis(DatePrototype.getUTCFullYear);\nvar getUTCHours = uncurryThis(DatePrototype.getUTCHours);\nvar getUTCMilliseconds = uncurryThis(DatePrototype.getUTCMilliseconds);\nvar getUTCMinutes = uncurryThis(DatePrototype.getUTCMinutes);\nvar getUTCMonth = uncurryThis(DatePrototype.getUTCMonth);\nvar getUTCSeconds = uncurryThis(DatePrototype.getUTCSeconds);\n\n// `Date.prototype.toISOString` method implementation\n// https://tc39.es/ecma262/#sec-date.prototype.toisostring\n// PhantomJS / old WebKit fails here:\nmodule.exports = (fails(function () {\n  return nativeDateToISOString.call(new Date(-5e13 - 1)) !== '0385-07-25T07:06:39.999Z';\n}) || !fails(function () {\n  nativeDateToISOString.call(new Date(NaN));\n})) ? function toISOString() {\n  if (!$isFinite(thisTimeValue(this))) throw new $RangeError('Invalid time value');\n  var date = this;\n  var year = getUTCFullYear(date);\n  var milliseconds = getUTCMilliseconds(date);\n  var sign = year < 0 ? '-' : year > 9999 ? '+' : '';\n  return sign + padStart(abs(year), sign ? 6 : 4, 0) +\n    '-' + padStart(getUTCMonth(date) + 1, 2, 0) +\n    '-' + padStart(getUTCDate(date), 2, 0) +\n    'T' + padStart(getUTCHours(date), 2, 0) +\n    ':' + padStart(getUTCMinutes(date), 2, 0) +\n    ':' + padStart(getUTCSeconds(date), 2, 0) +\n    '.' + padStart(milliseconds, 3, 0) +\n    'Z';\n} : nativeDateToISOString;\n", "'use strict';\nvar $ = require('../internals/export');\nvar toISOString = require('../internals/date-to-iso-string');\n\n// `Date.prototype.toISOString` method\n// https://tc39.es/ecma262/#sec-date.prototype.toisostring\n// PhantomJS / old WebKit has a broken implementations\n$({ target: 'Date', proto: true, forced: Date.prototype.toISOString !== toISOString }, {\n  toISOString: toISOString\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar fails = require('../internals/fails');\nvar toObject = require('../internals/to-object');\nvar toPrimitive = require('../internals/to-primitive');\n\nvar FORCED = fails(function () {\n  return new Date(NaN).toJSON() !== null\n    || Date.prototype.toJSON.call({ toISOString: function () { return 1; } }) !== 1;\n});\n\n// `Date.prototype.toJSON` method\n// https://tc39.es/ecma262/#sec-date.prototype.tojson\n$({ target: 'Date', proto: true, forced: FORCED }, {\n  // eslint-disable-next-line no-unused-vars -- required for `.length`\n  toJSON: function toJSON(key) {\n    var O = toObject(this);\n    var pv = toPrimitive(O, 'number');\n    return typeof pv == 'number' && !isFinite(pv) ? null : O.toISOString();\n  }\n});\n", "'use strict';\nvar anObject = require('../internals/an-object');\nvar ordinaryToPrimitive = require('../internals/ordinary-to-primitive');\n\nvar $TypeError = TypeError;\n\n// `Date.prototype[@@toPrimitive](hint)` method implementation\n// https://tc39.es/ecma262/#sec-date.prototype-@@toprimitive\nmodule.exports = function (hint) {\n  anObject(this);\n  if (hint === 'string' || hint === 'default') hint = 'string';\n  else if (hint !== 'number') throw new $TypeError('Incorrect hint');\n  return ordinaryToPrimitive(this, hint);\n};\n", "'use strict';\nvar hasOwn = require('../internals/has-own-property');\nvar defineBuiltIn = require('../internals/define-built-in');\nvar dateToPrimitive = require('../internals/date-to-primitive');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_PRIMITIVE = wellKnownSymbol('toPrimitive');\nvar DatePrototype = Date.prototype;\n\n// `Date.prototype[@@toPrimitive]` method\n// https://tc39.es/ecma262/#sec-date.prototype-@@toprimitive\nif (!hasOwn(DatePrototype, TO_PRIMITIVE)) {\n  defineBuiltIn(DatePrototype, TO_PRIMITIVE, dateToPrimitive);\n}\n", "'use strict';\n// TODO: Remove from `core-js@4`\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar defineBuiltIn = require('../internals/define-built-in');\n\nvar DatePrototype = Date.prototype;\nvar INVALID_DATE = 'Invalid Date';\nvar TO_STRING = 'toString';\nvar nativeDateToString = uncurryThis(DatePrototype[TO_STRING]);\nvar thisTimeValue = uncurryThis(DatePrototype.getTime);\n\n// `Date.prototype.toString` method\n// https://tc39.es/ecma262/#sec-date.prototype.tostring\nif (String(new Date(NaN)) !== INVALID_DATE) {\n  defineBuiltIn(DatePrototype, TO_STRING, function toString() {\n    var value = thisTimeValue(this);\n    // eslint-disable-next-line no-self-compare -- NaN check\n    return value === value ? nativeDateToString(this) : INVALID_DATE;\n  });\n}\n", "'use strict';\nvar getBuiltIn = require('../internals/get-built-in');\nvar call = require('../internals/function-call');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar bind = require('../internals/function-bind-context');\nvar anObject = require('../internals/an-object');\nvar aCallable = require('../internals/a-callable');\nvar isNullOrUndefined = require('../internals/is-null-or-undefined');\nvar getMethod = require('../internals/get-method');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ASYNC_DISPOSE = wellKnownSymbol('asyncDispose');\nvar DISPOSE = wellKnownSymbol('dispose');\n\nvar push = uncurryThis([].push);\n\n// `GetDisposeMethod` abstract operation\n// https://tc39.es/proposal-explicit-resource-management/#sec-getdisposemethod\nvar getDisposeMethod = function (V, hint) {\n  if (hint === 'async-dispose') {\n    var method = getMethod(V, ASYNC_DISPOSE);\n    if (method !== undefined) return method;\n    method = getMethod(V, DISPOSE);\n    if (method === undefined) return method;\n    return function () {\n      var O = this;\n      var Promise = getBuiltIn('Promise');\n      return new Promise(function (resolve) {\n        call(method, O);\n        resolve(undefined);\n      });\n    };\n  } return getMethod(V, DISPOSE);\n};\n\n// `CreateDisposableResource` abstract operation\n// https://tc39.es/proposal-explicit-resource-management/#sec-createdisposableresource\nvar createDisposableResource = function (V, hint, method) {\n  if (arguments.length < 3 && !isNullOrUndefined(V)) {\n    method = aCallable(getDisposeMethod(anObject(V), hint));\n  }\n\n  return method === undefined ? function () {\n    return undefined;\n  } : bind(method, V);\n};\n\n// `AddDisposableResource` abstract operation\n// https://tc39.es/proposal-explicit-resource-management/#sec-adddisposableresource\nmodule.exports = function (disposable, V, hint, method) {\n  var resource;\n  if (arguments.length < 4) {\n    // When `V` is either `null` or `undefined` and hint is `async-dispose`,\n    // we record that the resource was evaluated to ensure we will still perform an `Await` when resources are later disposed.\n    if (isNullOrUndefined(V) && hint === 'sync-dispose') return;\n    resource = createDisposableResource(V, hint);\n  } else {\n    resource = createDisposableResource(undefined, hint, method);\n  }\n\n  push(disposable.stack, resource);\n};\n", "'use strict';\n// https://github.com/tc39/proposal-explicit-resource-management\nvar $ = require('../internals/export');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar getBuiltIn = require('../internals/get-built-in');\nvar aCallable = require('../internals/a-callable');\nvar anInstance = require('../internals/an-instance');\nvar defineBuiltIn = require('../internals/define-built-in');\nvar defineBuiltIns = require('../internals/define-built-ins');\nvar defineBuiltInAccessor = require('../internals/define-built-in-accessor');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar InternalStateModule = require('../internals/internal-state');\nvar addDisposableResource = require('../internals/add-disposable-resource');\n\nvar SuppressedError = getBuiltIn('SuppressedError');\nvar $ReferenceError = ReferenceError;\n\nvar DISPOSE = wellKnownSymbol('dispose');\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\n\nvar DISPOSABLE_STACK = 'DisposableStack';\nvar setInternalState = InternalStateModule.set;\nvar getDisposableStackInternalState = InternalStateModule.getterFor(DISPOSABLE_STACK);\n\nvar HINT = 'sync-dispose';\nvar DISPOSED = 'disposed';\nvar PENDING = 'pending';\n\nvar getPendingDisposableStackInternalState = function (stack) {\n  var internalState = getDisposableStackInternalState(stack);\n  if (internalState.state === DISPOSED) throw new $ReferenceError(DISPOSABLE_STACK + ' already disposed');\n  return internalState;\n};\n\nvar $DisposableStack = function DisposableStack() {\n  setInternalState(anInstance(this, DisposableStackPrototype), {\n    type: DISPOSABLE_STACK,\n    state: PENDING,\n    stack: []\n  });\n\n  if (!DESCRIPTORS) this.disposed = false;\n};\n\nvar DisposableStackPrototype = $DisposableStack.prototype;\n\ndefineBuiltIns(DisposableStackPrototype, {\n  dispose: function dispose() {\n    var internalState = getDisposableStackInternalState(this);\n    if (internalState.state === DISPOSED) return;\n    internalState.state = DISPOSED;\n    if (!DESCRIPTORS) this.disposed = true;\n    var stack = internalState.stack;\n    var i = stack.length;\n    var thrown = false;\n    var suppressed;\n    while (i) {\n      var disposeMethod = stack[--i];\n      stack[i] = null;\n      try {\n        disposeMethod();\n      } catch (errorResult) {\n        if (thrown) {\n          suppressed = new SuppressedError(errorResult, suppressed);\n        } else {\n          thrown = true;\n          suppressed = errorResult;\n        }\n      }\n    }\n    internalState.stack = null;\n    if (thrown) throw suppressed;\n  },\n  use: function use(value) {\n    addDisposableResource(getPendingDisposableStackInternalState(this), value, HINT);\n    return value;\n  },\n  adopt: function adopt(value, onDispose) {\n    var internalState = getPendingDisposableStackInternalState(this);\n    aCallable(onDispose);\n    addDisposableResource(internalState, undefined, HINT, function () {\n      onDispose(value);\n    });\n    return value;\n  },\n  defer: function defer(onDispose) {\n    var internalState = getPendingDisposableStackInternalState(this);\n    aCallable(onDispose);\n    addDisposableResource(internalState, undefined, HINT, onDispose);\n  },\n  move: function move() {\n    var internalState = getPendingDisposableStackInternalState(this);\n    var newDisposableStack = new $DisposableStack();\n    getDisposableStackInternalState(newDisposableStack).stack = internalState.stack;\n    internalState.stack = [];\n    internalState.state = DISPOSED;\n    if (!DESCRIPTORS) this.disposed = true;\n    return newDisposableStack;\n  }\n});\n\nif (DESCRIPTORS) defineBuiltInAccessor(DisposableStackPrototype, 'disposed', {\n  configurable: true,\n  get: function disposed() {\n    return getDisposableStackInternalState(this).state === DISPOSED;\n  }\n});\n\ndefineBuiltIn(DisposableStackPrototype, DISPOSE, DisposableStackPrototype.dispose, { name: 'dispose' });\ndefineBuiltIn(DisposableStackPrototype, TO_STRING_TAG, DISPOSABLE_STACK, { nonWritable: true });\n\n$({ global: true, constructor: true }, {\n  DisposableStack: $DisposableStack\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar toString = require('../internals/to-string');\n\nvar charAt = uncurryThis(''.charAt);\nvar charCodeAt = uncurryThis(''.charCodeAt);\nvar exec = uncurryThis(/./.exec);\nvar numberToString = uncurryThis(1.1.toString);\nvar toUpperCase = uncurryThis(''.toUpperCase);\nvar join = uncurryThis([].join);\nvar $Array = Array;\n\nvar raw = /[\\w*+\\-./@]/;\n\nvar hex = function (code, length) {\n  var result = numberToString(code, 16);\n  while (result.length < length) result = '0' + result;\n  return result;\n};\n\n// `escape` method\n// https://tc39.es/ecma262/#sec-escape-string\n$({ global: true }, {\n  escape: function escape(string) {\n    var str = toString(string);\n    var length = str.length;\n    var result = $Array(length);\n    var index;\n    var chr, code;\n    for (index = 0; index < length; index++) {\n      chr = charAt(str, index);\n      if (exec(raw, chr)) {\n        result[index] = chr;\n      } else {\n        code = charCodeAt(chr, 0);\n        if (code < 256) {\n          result[index] = '%' + toUpperCase(hex(code, 2));\n        } else {\n          result[index] = '%u' + toUpperCase(hex(code, 4));\n        }\n      }\n    } return join(result, '');\n  }\n});\n", "'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar aCallable = require('../internals/a-callable');\nvar isObject = require('../internals/is-object');\nvar hasOwn = require('../internals/has-own-property');\nvar arraySlice = require('../internals/array-slice');\nvar NATIVE_BIND = require('../internals/function-bind-native');\n\nvar $Function = Function;\nvar concat = uncurryThis([].concat);\nvar join = uncurryThis([].join);\nvar factories = {};\n\nvar construct = function (C, argsLength, args) {\n  if (!hasOwn(factories, argsLength)) {\n    var list = [];\n    var i = 0;\n    for (; i < argsLength; i++) list[i] = 'a[' + i + ']';\n    factories[argsLength] = $Function('C,a', 'return new C(' + join(list, ',') + ')');\n  } return factories[argsLength](C, args);\n};\n\n// `Function.prototype.bind` method implementation\n// https://tc39.es/ecma262/#sec-function.prototype.bind\n// eslint-disable-next-line es/no-function-prototype-bind -- detection\nmodule.exports = NATIVE_BIND ? $Function.bind : function bind(that /* , ...args */) {\n  var F = aCallable(this);\n  var Prototype = F.prototype;\n  var partArgs = arraySlice(arguments, 1);\n  var boundFunction = function bound(/* args... */) {\n    var args = concat(partArgs, arraySlice(arguments));\n    return this instanceof boundFunction ? construct(F, args.length, args) : F.apply(that, args);\n  };\n  if (isObject(Prototype)) boundFunction.prototype = Prototype;\n  return boundFunction;\n};\n", "'use strict';\n// TODO: Remove from `core-js@4`\nvar $ = require('../internals/export');\nvar bind = require('../internals/function-bind');\n\n// `Function.prototype.bind` method\n// https://tc39.es/ecma262/#sec-function.prototype.bind\n// eslint-disable-next-line es/no-function-prototype-bind -- detection\n$({ target: 'Function', proto: true, forced: Function.bind !== bind }, {\n  bind: bind\n});\n", "'use strict';\nvar isCallable = require('../internals/is-callable');\nvar isObject = require('../internals/is-object');\nvar definePropertyModule = require('../internals/object-define-property');\nvar isPrototypeOf = require('../internals/object-is-prototype-of');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar makeBuiltIn = require('../internals/make-built-in');\n\nvar HAS_INSTANCE = wellKnownSymbol('hasInstance');\nvar FunctionPrototype = Function.prototype;\n\n// `Function.prototype[@@hasInstance]` method\n// https://tc39.es/ecma262/#sec-function.prototype-@@hasinstance\nif (!(HAS_INSTANCE in FunctionPrototype)) {\n  definePropertyModule.f(FunctionPrototype, HAS_INSTANCE, { value: makeBuiltIn(function (O) {\n    if (!isCallable(this) || !isObject(O)) return false;\n    var P = this.prototype;\n    return isObject(P) ? isPrototypeOf(P, O) : O instanceof this;\n  }, HAS_INSTANCE) });\n}\n", "'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar FUNCTION_NAME_EXISTS = require('../internals/function-name').EXISTS;\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar defineBuiltInAccessor = require('../internals/define-built-in-accessor');\n\nvar FunctionPrototype = Function.prototype;\nvar functionToString = uncurryThis(FunctionPrototype.toString);\nvar nameRE = /function\\b(?:\\s|\\/\\*[\\S\\s]*?\\*\\/|\\/\\/[^\\n\\r]*[\\n\\r]+)*([^\\s(/]*)/;\nvar regExpExec = uncurryThis(nameRE.exec);\nvar NAME = 'name';\n\n// Function instances `.name` property\n// https://tc39.es/ecma262/#sec-function-instances-name\nif (DESCRIPTORS && !FUNCTION_NAME_EXISTS) {\n  defineBuiltInAccessor(FunctionPrototype, NAME, {\n    configurable: true,\n    get: function () {\n      try {\n        return regExpExec(nameRE, functionToString(this))[1];\n      } catch (error) {\n        return '';\n      }\n    }\n  });\n}\n", "'use strict';\nvar $ = require('../internals/export');\nvar globalThis = require('../internals/global-this');\n\n// `globalThis` object\n// https://tc39.es/ecma262/#sec-globalthis\n$({ global: true, forced: globalThis.globalThis !== globalThis }, {\n  globalThis: globalThis\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar globalThis = require('../internals/global-this');\nvar anInstance = require('../internals/an-instance');\nvar anObject = require('../internals/an-object');\nvar isCallable = require('../internals/is-callable');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar defineBuiltInAccessor = require('../internals/define-built-in-accessor');\nvar createProperty = require('../internals/create-property');\nvar fails = require('../internals/fails');\nvar hasOwn = require('../internals/has-own-property');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar IteratorPrototype = require('../internals/iterators-core').IteratorPrototype;\nvar DESCRIPTORS = require('../internals/descriptors');\nvar IS_PURE = require('../internals/is-pure');\n\nvar CONSTRUCTOR = 'constructor';\nvar ITERATOR = 'Iterator';\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\n\nvar $TypeError = TypeError;\nvar NativeIterator = globalThis[ITERATOR];\n\n// FF56- have non-standard global helper `Iterator`\nvar FORCED = IS_PURE\n  || !isCallable(NativeIterator)\n  || NativeIterator.prototype !== IteratorPrototype\n  // FF44- non-standard `Iterator` passes previous tests\n  || !fails(function () { NativeIterator({}); });\n\nvar IteratorConstructor = function Iterator() {\n  anInstance(this, IteratorPrototype);\n  if (getPrototypeOf(this) === IteratorPrototype) throw new $TypeError('Abstract class Iterator not directly constructable');\n};\n\nvar defineIteratorPrototypeAccessor = function (key, value) {\n  if (DESCRIPTORS) {\n    defineBuiltInAccessor(IteratorPrototype, key, {\n      configurable: true,\n      get: function () {\n        return value;\n      },\n      set: function (replacement) {\n        anObject(this);\n        if (this === IteratorPrototype) throw new $TypeError(\"You can't redefine this property\");\n        if (hasOwn(this, key)) this[key] = replacement;\n        else createProperty(this, key, replacement);\n      }\n    });\n  } else IteratorPrototype[key] = value;\n};\n\nif (!hasOwn(IteratorPrototype, TO_STRING_TAG)) defineIteratorPrototypeAccessor(TO_STRING_TAG, ITERATOR);\n\nif (FORCED || !hasOwn(IteratorPrototype, CONSTRUCTOR) || IteratorPrototype[CONSTRUCTOR] === Object) {\n  defineIteratorPrototypeAccessor(CONSTRUCTOR, IteratorConstructor);\n}\n\nIteratorConstructor.prototype = IteratorPrototype;\n\n// `Iterator` constructor\n// https://tc39.es/ecma262/#sec-iterator\n$({ global: true, constructor: true, forced: FORCED }, {\n  Iterator: IteratorConstructor\n});\n", "'use strict';\nvar iteratorClose = require('../internals/iterator-close');\n\nmodule.exports = function (iters, kind, value) {\n  for (var i = iters.length - 1; i >= 0; i--) {\n    if (iters[i] === undefined) continue;\n    try {\n      value = iteratorClose(iters[i].iterator, kind, value);\n    } catch (error) {\n      kind = 'throw';\n      value = error;\n    }\n  }\n  if (kind === 'throw') throw value;\n  return value;\n};\n", "'use strict';\n// release references held by exhausted / closed iterator helpers to allow GC of the source chain\nmodule.exports = function (state) {\n  state.iterator = state.next = state.nextHandler = state.mapper = state.predicate = state.inner =\n    state.iterables = state.iters = state.openIters = state.padding = state.finishResults = state.buffer = null;\n};\n", "'use strict';\nvar call = require('../internals/function-call');\nvar create = require('../internals/object-create');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar defineBuiltIns = require('../internals/define-built-ins');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar InternalStateModule = require('../internals/internal-state');\nvar getMethod = require('../internals/get-method');\nvar IteratorPrototype = require('../internals/iterators-core').IteratorPrototype;\nvar createIterResultObject = require('../internals/create-iter-result-object');\nvar iteratorClose = require('../internals/iterator-close');\nvar iteratorCloseAll = require('../internals/iterator-close-all');\nvar cleanupState = require('../internals/iterator-cleanup-state');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar ITERATOR_HELPER = 'IteratorHelper';\nvar WRAP_FOR_VALID_ITERATOR = 'WrapForValidIterator';\nvar NORMAL = 'normal';\nvar THROW = 'throw';\nvar setInternalState = InternalStateModule.set;\n\nvar createIteratorProxyPrototype = function (IS_ITERATOR) {\n  var getInternalState = InternalStateModule.getterFor(IS_ITERATOR ? WRAP_FOR_VALID_ITERATOR : ITERATOR_HELPER);\n\n  return defineBuiltIns(create(IteratorPrototype), {\n    next: function next() {\n      var state = getInternalState(this);\n      // for simplification:\n      //   for `%WrapForValidIteratorPrototype%.next` or with `state.returnHandlerResult` our `nextHandler` returns `IterResultObject`\n      //   for `%IteratorHelperPrototype%.next` - just a value\n      if (IS_ITERATOR) return state.nextHandler();\n      if (state.done) return createIterResultObject(undefined, true);\n      try {\n        var result = state.nextHandler();\n        if (state.done) cleanupState(state);\n        return state.returnHandlerResult ? result : createIterResultObject(result, state.done);\n      } catch (error) {\n        state.done = true;\n        cleanupState(state);\n        throw error;\n      }\n    },\n    'return': function () {\n      var state = getInternalState(this);\n      var iterator = state.iterator;\n      var inner = state.inner;\n      var openIters = state.openIters;\n      var done = state.done;\n      state.done = true;\n      if (IS_ITERATOR) {\n        var returnMethod = getMethod(iterator, 'return');\n        return returnMethod ? call(returnMethod, iterator) : createIterResultObject(undefined, true);\n      }\n      cleanupState(state);\n      if (done) return createIterResultObject(undefined, true);\n      if (inner) try {\n        iteratorClose(inner.iterator, NORMAL);\n      } catch (error) {\n        return iteratorClose(iterator, THROW, error);\n      }\n      if (openIters) try {\n        iteratorCloseAll(openIters, NORMAL);\n      } catch (error) {\n        if (iterator) return iteratorClose(iterator, THROW, error);\n        throw error;\n      }\n      if (iterator) iteratorClose(iterator, NORMAL);\n      return createIterResultObject(undefined, true);\n    }\n  });\n};\n\nvar WrapForValidIteratorPrototype = createIteratorProxyPrototype(true);\nvar IteratorHelperPrototype = createIteratorProxyPrototype(false);\n\ncreateNonEnumerableProperty(IteratorHelperPrototype, TO_STRING_TAG, 'Iterator Helper');\n\nmodule.exports = function (nextHandler, IS_ITERATOR, RETURN_HANDLER_RESULT) {\n  var IteratorProxy = function Iterator(record, state) {\n    if (state) {\n      state.iterator = record.iterator;\n      state.next = record.next;\n    } else state = record;\n    state.type = IS_ITERATOR ? WRAP_FOR_VALID_ITERATOR : ITERATOR_HELPER;\n    state.returnHandlerResult = !!RETURN_HANDLER_RESULT;\n    state.nextHandler = nextHandler;\n    state.counter = 0;\n    state.done = false;\n    setInternalState(this, state);\n  };\n\n  IteratorProxy.prototype = IS_ITERATOR ? WrapForValidIteratorPrototype : IteratorHelperPrototype;\n\n  return IteratorProxy;\n};\n", "'use strict';\nvar $ = require('../internals/export');\nvar call = require('../internals/function-call');\nvar aCallable = require('../internals/a-callable');\nvar anObject = require('../internals/an-object');\nvar getIteratorMethod = require('../internals/get-iterator-method-internal');\nvar createIteratorProxy = require('../internals/iterator-create-proxy');\nvar IS_PURE = require('../internals/is-pure');\n\nvar $Array = Array;\n\nvar IteratorProxy = createIteratorProxy(function () {\n  while (true) {\n    var iterator = this.iterator;\n    if (!iterator) {\n      var iterableIndex = this.nextIterableIndex++;\n      var iterables = this.iterables;\n      if (iterableIndex >= iterables.length) {\n        this.done = true;\n        return;\n      }\n      var entry = iterables[iterableIndex];\n      this.iterables[iterableIndex] = null;\n      iterator = this.iterator = anObject(call(entry.method, entry.iterable));\n      this.next = iterator.next;\n    }\n    var result = anObject(call(this.next, iterator));\n    if (result.done) {\n      this.iterator = null;\n      this.next = null;\n      continue;\n    }\n    return result.value;\n  }\n});\n\n// `Iterator.concat` method\n// https://tc39.es/ecma262/#sec-iterator.concat\n$({ target: 'Iterator', stat: true, forced: IS_PURE }, {\n  concat: function concat() {\n    var length = arguments.length;\n    var iterables = $Array(length);\n    for (var index = 0; index < length; index++) {\n      var item = anObject(arguments[index]);\n      iterables[index] = {\n        iterable: item,\n        method: aCallable(getIteratorMethod(item))\n      };\n    }\n    return new IteratorProxy({\n      iterables: iterables,\n      nextIterableIndex: 0,\n      iterator: null,\n      next: null\n    });\n  }\n});\n", "'use strict';\n// https://github.com/tc39/proposal-explicit-resource-management\nvar call = require('../internals/function-call');\nvar defineBuiltIn = require('../internals/define-built-in');\nvar getMethod = require('../internals/get-method');\nvar hasOwn = require('../internals/has-own-property');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar IteratorPrototype = require('../internals/iterators-core').IteratorPrototype;\n\nvar DISPOSE = wellKnownSymbol('dispose');\n\nif (!hasOwn(IteratorPrototype, DISPOSE)) {\n  defineBuiltIn(IteratorPrototype, DISPOSE, function () {\n    var $return = getMethod(this, 'return');\n    if ($return) call($return, this);\n  });\n}\n", "'use strict';\n// `GetIteratorDirect(obj)` abstract operation\n// https://tc39.es/ecma262/#sec-getiteratordirect\nmodule.exports = function (obj) {\n  return {\n    iterator: obj,\n    next: obj.next,\n    done: false\n  };\n};\n", "'use strict';\nvar $RangeError = RangeError;\n\nmodule.exports = function (it) {\n  // eslint-disable-next-line no-self-compare -- NaN check\n  if (it === it) return it;\n  throw new $RangeError('NaN is not allowed');\n};\n", "'use strict';\nvar toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\n\nvar $RangeError = RangeError;\n\nmodule.exports = function (it) {\n  var result = toIntegerOrInfinity(it);\n  if (result < 0) throw new $RangeError(\"The argument can't be less than 0\");\n  return result;\n};\n", "'use strict';\n// Should throw an error on invalid iterator\n// https://issues.chromium.org/issues/336839115\nmodule.exports = function (methodName, argument) {\n  // eslint-disable-next-line es/no-iterator -- required for testing\n  var method = typeof Iterator == 'function' && Iterator.prototype[methodName];\n  if (method) try {\n    method.call({ next: null }, argument).next();\n  } catch (error) {\n    return true;\n  }\n};\n", "'use strict';\nvar globalThis = require('../internals/global-this');\n\n// https://github.com/tc39/ecma262/pull/3467\nmodule.exports = function (METHOD_NAME, ExpectedError) {\n  var Iterator = globalThis.Iterator;\n  var IteratorPrototype = Iterator && Iterator.prototype;\n  var method = IteratorPrototype && IteratorPrototype[METHOD_NAME];\n\n  var CLOSED = false;\n\n  if (method) try {\n    method.call({\n      next: function () { return { done: true }; },\n      'return': function () { CLOSED = true; }\n    }, -1);\n  } catch (error) {\n    // https://bugs.webkit.org/show_bug.cgi?id=291195\n    if (!(error instanceof ExpectedError)) CLOSED = false;\n  }\n\n  if (!CLOSED) return method;\n};\n", "'use strict';\nvar $ = require('../internals/export');\nvar call = require('../internals/function-call');\nvar anObject = require('../internals/an-object');\nvar getIteratorDirect = require('../internals/get-iterator-direct');\nvar notANaN = require('../internals/not-a-nan');\nvar toPositiveInteger = require('../internals/to-positive-integer');\nvar iteratorClose = require('../internals/iterator-close');\nvar createIteratorProxy = require('../internals/iterator-create-proxy');\nvar iteratorHelperThrowsOnInvalidIterator = require('../internals/iterator-helper-throws-on-invalid-iterator');\nvar iteratorHelperWithoutClosingOnEarlyError = require('../internals/iterator-helper-without-closing-on-early-error');\nvar IS_PURE = require('../internals/is-pure');\n\nvar $RangeError = RangeError;\nvar $Infinity = Infinity;\n\nvar DROP_WITHOUT_THROWING_ON_INVALID_ITERATOR = !IS_PURE && !iteratorHelperThrowsOnInvalidIterator('drop', 0);\nvar dropWithoutClosingOnEarlyError = !IS_PURE && !DROP_WITHOUT_THROWING_ON_INVALID_ITERATOR\n  && iteratorHelperWithoutClosingOnEarlyError('drop', RangeError);\n\nvar FORCED = IS_PURE || DROP_WITHOUT_THROWING_ON_INVALID_ITERATOR || dropWithoutClosingOnEarlyError || !function () {\n  try {\n    // eslint-disable-next-line es/no-iterator, es/no-iterator-prototype-drop -- detection\n    Iterator.prototype.drop.call({\n      next: function () { return { done: true }; }\n    }, 0x20000000000000);\n  } catch (error) {\n    return error instanceof $RangeError;\n  }\n}();\n\nvar IteratorProxy = createIteratorProxy(function () {\n  var iterator = this.iterator;\n  var next = this.next;\n  var result, done;\n  while (this.remaining) {\n    this.remaining--;\n    result = anObject(call(next, iterator));\n    done = this.done = !!result.done;\n    if (done) return;\n  }\n  result = anObject(call(next, iterator));\n  done = this.done = !!result.done;\n  if (!done) return result.value;\n});\n\n// `Iterator.prototype.drop` method\n// https://tc39.es/ecma262/#sec-iterator.prototype.drop\n$({ target: 'Iterator', proto: true, real: true, forced: FORCED }, {\n  drop: function drop(limit) {\n    anObject(this);\n    var remaining;\n    try {\n      remaining = toPositiveInteger(notANaN(+limit));\n      if (remaining > 0x1FFFFFFFFFFFFF && remaining !== $Infinity) {\n        throw new $RangeError('The argument should be a safe integer');\n      }\n    } catch (error) {\n      iteratorClose(this, 'throw', error);\n    }\n\n    if (dropWithoutClosingOnEarlyError) return call(dropWithoutClosingOnEarlyError, this, remaining);\n\n    return new IteratorProxy(getIteratorDirect(this), {\n      remaining: remaining\n    });\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar call = require('../internals/function-call');\nvar iterate = require('../internals/iterate');\nvar aCallable = require('../internals/a-callable');\nvar anObject = require('../internals/an-object');\nvar getIteratorDirect = require('../internals/get-iterator-direct');\nvar iteratorClose = require('../internals/iterator-close');\nvar iteratorHelperWithoutClosingOnEarlyError = require('../internals/iterator-helper-without-closing-on-early-error');\n\nvar everyWithoutClosingOnEarlyError = iteratorHelperWithoutClosingOnEarlyError('every', TypeError);\n\n// `Iterator.prototype.every` method\n// https://tc39.es/ecma262/#sec-iterator.prototype.every\n$({ target: 'Iterator', proto: true, real: true, forced: everyWithoutClosingOnEarlyError }, {\n  every: function every(predicate) {\n    anObject(this);\n    try {\n      aCallable(predicate);\n    } catch (error) {\n      iteratorClose(this, 'throw', error);\n    }\n\n    if (everyWithoutClosingOnEarlyError) return call(everyWithoutClosingOnEarlyError, this, predicate);\n\n    var record = getIteratorDirect(this);\n    var counter = 0;\n    return !iterate(record, function (value, stop) {\n      if (!predicate(value, counter++)) return stop();\n    }, { IS_RECORD: true, INTERRUPTED: true }).stopped;\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar call = require('../internals/function-call');\nvar aCallable = require('../internals/a-callable');\nvar anObject = require('../internals/an-object');\nvar getIteratorDirect = require('../internals/get-iterator-direct');\nvar createIteratorProxy = require('../internals/iterator-create-proxy');\nvar callWithSafeIterationClosing = require('../internals/call-with-safe-iteration-closing');\nvar IS_PURE = require('../internals/is-pure');\nvar iteratorClose = require('../internals/iterator-close');\nvar iteratorHelperThrowsOnInvalidIterator = require('../internals/iterator-helper-throws-on-invalid-iterator');\nvar iteratorHelperWithoutClosingOnEarlyError = require('../internals/iterator-helper-without-closing-on-early-error');\n\nvar FILTER_WITHOUT_THROWING_ON_INVALID_ITERATOR = !IS_PURE && !iteratorHelperThrowsOnInvalidIterator('filter', function () { /* empty */ });\nvar filterWithoutClosingOnEarlyError = !IS_PURE && !FILTER_WITHOUT_THROWING_ON_INVALID_ITERATOR\n  && iteratorHelperWithoutClosingOnEarlyError('filter', TypeError);\n\nvar FORCED = IS_PURE || FILTER_WITHOUT_THROWING_ON_INVALID_ITERATOR || filterWithoutClosingOnEarlyError;\n\nvar IteratorProxy = createIteratorProxy(function () {\n  var iterator = this.iterator;\n  var predicate = this.predicate;\n  var next = this.next;\n  var result, done, value;\n  while (true) {\n    result = anObject(call(next, iterator));\n    done = this.done = !!result.done;\n    if (done) return;\n    value = result.value;\n    if (callWithSafeIterationClosing(iterator, predicate, [value, this.counter++], true)) return value;\n  }\n});\n\n// `Iterator.prototype.filter` method\n// https://tc39.es/ecma262/#sec-iterator.prototype.filter\n$({ target: 'Iterator', proto: true, real: true, forced: FORCED }, {\n  filter: function filter(predicate) {\n    anObject(this);\n    try {\n      aCallable(predicate);\n    } catch (error) {\n      iteratorClose(this, 'throw', error);\n    }\n\n    if (filterWithoutClosingOnEarlyError) return call(filterWithoutClosingOnEarlyError, this, predicate);\n\n    return new IteratorProxy(getIteratorDirect(this), {\n      predicate: predicate\n    });\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar call = require('../internals/function-call');\nvar iterate = require('../internals/iterate');\nvar aCallable = require('../internals/a-callable');\nvar anObject = require('../internals/an-object');\nvar getIteratorDirect = require('../internals/get-iterator-direct');\nvar iteratorClose = require('../internals/iterator-close');\nvar iteratorHelperWithoutClosingOnEarlyError = require('../internals/iterator-helper-without-closing-on-early-error');\n\nvar findWithoutClosingOnEarlyError = iteratorHelperWithoutClosingOnEarlyError('find', TypeError);\n\n// `Iterator.prototype.find` method\n// https://tc39.es/ecma262/#sec-iterator.prototype.find\n$({ target: 'Iterator', proto: true, real: true, forced: findWithoutClosingOnEarlyError }, {\n  find: function find(predicate) {\n    anObject(this);\n    try {\n      aCallable(predicate);\n    } catch (error) {\n      iteratorClose(this, 'throw', error);\n    }\n\n    if (findWithoutClosingOnEarlyError) return call(findWithoutClosingOnEarlyError, this, predicate);\n\n    var record = getIteratorDirect(this);\n    var counter = 0;\n    return iterate(record, function (value, stop) {\n      if (predicate(value, counter++)) return stop(value);\n    }, { IS_RECORD: true, INTERRUPTED: true }).result;\n  }\n});\n", "'use strict';\nvar call = require('../internals/function-call');\nvar anObject = require('../internals/an-object');\nvar getIteratorDirect = require('../internals/get-iterator-direct');\nvar getIteratorMethod = require('../internals/get-iterator-method-internal');\n\nmodule.exports = function (obj, stringHandling) {\n  if (!stringHandling || typeof obj !== 'string') anObject(obj);\n  var method = getIteratorMethod(obj);\n  return getIteratorDirect(anObject(method !== undefined ? call(method, obj) : obj));\n};\n", "'use strict';\nvar $ = require('../internals/export');\nvar call = require('../internals/function-call');\nvar aCallable = require('../internals/a-callable');\nvar anObject = require('../internals/an-object');\nvar getIteratorDirect = require('../internals/get-iterator-direct');\nvar getIteratorFlattenable = require('../internals/get-iterator-flattenable');\nvar createIteratorProxy = require('../internals/iterator-create-proxy');\nvar iteratorClose = require('../internals/iterator-close');\nvar fails = require('../internals/fails');\nvar IS_PURE = require('../internals/is-pure');\nvar iteratorHelperThrowsOnInvalidIterator = require('../internals/iterator-helper-throws-on-invalid-iterator');\nvar iteratorHelperWithoutClosingOnEarlyError = require('../internals/iterator-helper-without-closing-on-early-error');\n\n// Should not throw an error for an iterator without `return` method. Fixed in Safari 26.2\n// https://bugs.webkit.org/show_bug.cgi?id=297532\nvar THROWS_ON_ITERATOR_WITHOUT_RETURN = !IS_PURE && fails(function () {\n  // eslint-disable-next-line es/no-array-prototype-values, es/no-iterator-prototype-flatmap, es/no-iterator-prototype-find -- testing\n  return [1].values()\n    .flatMap(function () { return [1]; })\n    .find(function () { return true; }) !== 1;\n});\n\nvar FLAT_MAP_WITHOUT_THROWING_ON_INVALID_ITERATOR = !IS_PURE && !THROWS_ON_ITERATOR_WITHOUT_RETURN\n  && !iteratorHelperThrowsOnInvalidIterator('flatMap', function () { /* empty */ });\n\nvar flatMapWithoutClosingOnEarlyError = !IS_PURE && !THROWS_ON_ITERATOR_WITHOUT_RETURN && !FLAT_MAP_WITHOUT_THROWING_ON_INVALID_ITERATOR\n  && iteratorHelperWithoutClosingOnEarlyError('flatMap', TypeError);\n\nvar FORCED = IS_PURE || THROWS_ON_ITERATOR_WITHOUT_RETURN || FLAT_MAP_WITHOUT_THROWING_ON_INVALID_ITERATOR\n  || flatMapWithoutClosingOnEarlyError;\n\nvar IteratorProxy = createIteratorProxy(function () {\n  var iterator = this.iterator;\n  var mapper = this.mapper;\n  var result, inner;\n\n  while (true) {\n    if (inner = this.inner) try {\n      result = anObject(call(inner.next, inner.iterator));\n      if (!result.done) return result.value;\n      this.inner = null;\n    } catch (error) { iteratorClose(iterator, 'throw', error); }\n\n    result = anObject(call(this.next, iterator));\n\n    if (this.done = !!result.done) return;\n\n    try {\n      this.inner = getIteratorFlattenable(mapper(result.value, this.counter++), false);\n    } catch (error) { iteratorClose(iterator, 'throw', error); }\n  }\n});\n\n// `Iterator.prototype.flatMap` method\n// https://tc39.es/ecma262/#sec-iterator.prototype.flatmap\n$({ target: 'Iterator', proto: true, real: true, forced: FORCED }, {\n  flatMap: function flatMap(mapper) {\n    anObject(this);\n    try {\n      aCallable(mapper);\n    } catch (error) {\n      iteratorClose(this, 'throw', error);\n    }\n\n    if (flatMapWithoutClosingOnEarlyError) return call(flatMapWithoutClosingOnEarlyError, this, mapper);\n\n    return new IteratorProxy(getIteratorDirect(this), {\n      mapper: mapper,\n      inner: null\n    });\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar call = require('../internals/function-call');\nvar iterate = require('../internals/iterate');\nvar aCallable = require('../internals/a-callable');\nvar anObject = require('../internals/an-object');\nvar getIteratorDirect = require('../internals/get-iterator-direct');\nvar iteratorClose = require('../internals/iterator-close');\nvar iteratorHelperWithoutClosingOnEarlyError = require('../internals/iterator-helper-without-closing-on-early-error');\n\nvar forEachWithoutClosingOnEarlyError = iteratorHelperWithoutClosingOnEarlyError('forEach', TypeError);\n\n// `Iterator.prototype.forEach` method\n// https://tc39.es/ecma262/#sec-iterator.prototype.foreach\n$({ target: 'Iterator', proto: true, real: true, forced: forEachWithoutClosingOnEarlyError }, {\n  forEach: function forEach(fn) {\n    anObject(this);\n    try {\n      aCallable(fn);\n    } catch (error) {\n      iteratorClose(this, 'throw', error);\n    }\n\n    if (forEachWithoutClosingOnEarlyError) return call(forEachWithoutClosingOnEarlyError, this, fn);\n\n    var record = getIteratorDirect(this);\n    var counter = 0;\n    iterate(record, function (value) {\n      fn(value, counter++);\n    }, { IS_RECORD: true });\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar call = require('../internals/function-call');\nvar toObject = require('../internals/to-object');\nvar isPrototypeOf = require('../internals/object-is-prototype-of');\nvar IteratorPrototype = require('../internals/iterators-core').IteratorPrototype;\nvar createIteratorProxy = require('../internals/iterator-create-proxy');\nvar getIteratorFlattenable = require('../internals/get-iterator-flattenable');\nvar IS_PURE = require('../internals/is-pure');\n\nvar FORCED = IS_PURE || function () {\n  // Should not throw when an underlying iterator's `return` method is null\n  // https://bugs.webkit.org/show_bug.cgi?id=288714\n  try {\n    // eslint-disable-next-line es/no-iterator -- required for testing\n    Iterator.from({ 'return': null })['return']();\n  } catch (error) {\n    return true;\n  }\n}();\n\nvar IteratorProxy = createIteratorProxy(function () {\n  return call(this.next, this.iterator);\n}, true);\n\n// `Iterator.from` method\n// https://tc39.es/ecma262/#sec-iterator.from\n$({ target: 'Iterator', stat: true, forced: FORCED }, {\n  from: function from(O) {\n    var iteratorRecord = getIteratorFlattenable(typeof O == 'string' ? toObject(O) : O, true);\n    return isPrototypeOf(IteratorPrototype, iteratorRecord.iterator)\n      ? iteratorRecord.iterator\n      : new IteratorProxy(iteratorRecord);\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar call = require('../internals/function-call');\nvar aCallable = require('../internals/a-callable');\nvar anObject = require('../internals/an-object');\nvar getIteratorDirect = require('../internals/get-iterator-direct');\nvar createIteratorProxy = require('../internals/iterator-create-proxy');\nvar callWithSafeIterationClosing = require('../internals/call-with-safe-iteration-closing');\nvar iteratorClose = require('../internals/iterator-close');\nvar iteratorHelperThrowsOnInvalidIterator = require('../internals/iterator-helper-throws-on-invalid-iterator');\nvar iteratorHelperWithoutClosingOnEarlyError = require('../internals/iterator-helper-without-closing-on-early-error');\nvar IS_PURE = require('../internals/is-pure');\n\nvar MAP_WITHOUT_THROWING_ON_INVALID_ITERATOR = !IS_PURE && !iteratorHelperThrowsOnInvalidIterator('map', function () { /* empty */ });\nvar mapWithoutClosingOnEarlyError = !IS_PURE && !MAP_WITHOUT_THROWING_ON_INVALID_ITERATOR\n  && iteratorHelperWithoutClosingOnEarlyError('map', TypeError);\n\nvar FORCED = IS_PURE || MAP_WITHOUT_THROWING_ON_INVALID_ITERATOR || mapWithoutClosingOnEarlyError;\n\nvar IteratorProxy = createIteratorProxy(function () {\n  var iterator = this.iterator;\n  var result = anObject(call(this.next, iterator));\n  var done = this.done = !!result.done;\n  if (!done) return callWithSafeIterationClosing(iterator, this.mapper, [result.value, this.counter++], true);\n});\n\n// `Iterator.prototype.map` method\n// https://tc39.es/ecma262/#sec-iterator.prototype.map\n$({ target: 'Iterator', proto: true, real: true, forced: FORCED }, {\n  map: function map(mapper) {\n    anObject(this);\n    try {\n      aCallable(mapper);\n    } catch (error) {\n      iteratorClose(this, 'throw', error);\n    }\n\n    if (mapWithoutClosingOnEarlyError) return call(mapWithoutClosingOnEarlyError, this, mapper);\n\n    return new IteratorProxy(getIteratorDirect(this), {\n      mapper: mapper\n    });\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar iterate = require('../internals/iterate');\nvar aCallable = require('../internals/a-callable');\nvar anObject = require('../internals/an-object');\nvar getIteratorDirect = require('../internals/get-iterator-direct');\nvar iteratorClose = require('../internals/iterator-close');\nvar iteratorHelperWithoutClosingOnEarlyError = require('../internals/iterator-helper-without-closing-on-early-error');\nvar apply = require('../internals/function-apply');\nvar fails = require('../internals/fails');\n\nvar $TypeError = TypeError;\n\n// https://bugs.webkit.org/show_bug.cgi?id=291651\nvar FAILS_ON_INITIAL_UNDEFINED = fails(function () {\n  // eslint-disable-next-line es/no-iterator-prototype-reduce, es/no-array-prototype-keys, array-callback-return -- required for testing\n  [].keys().reduce(function () { /* empty */ }, undefined);\n});\n\nvar reduceWithoutClosingOnEarlyError = !FAILS_ON_INITIAL_UNDEFINED && iteratorHelperWithoutClosingOnEarlyError('reduce', $TypeError);\n\n// `Iterator.prototype.reduce` method\n// https://tc39.es/ecma262/#sec-iterator.prototype.reduce\n$({ target: 'Iterator', proto: true, real: true, forced: FAILS_ON_INITIAL_UNDEFINED || reduceWithoutClosingOnEarlyError }, {\n  reduce: function reduce(reducer /* , initialValue */) {\n    anObject(this);\n    try {\n      aCallable(reducer);\n    } catch (error) {\n      iteratorClose(this, 'throw', error);\n    }\n\n    var noInitial = arguments.length < 2;\n    var accumulator = noInitial ? undefined : arguments[1];\n    if (reduceWithoutClosingOnEarlyError) {\n      return apply(reduceWithoutClosingOnEarlyError, this, noInitial ? [reducer] : [reducer, accumulator]);\n    }\n    var record = getIteratorDirect(this);\n    var counter = 0;\n    iterate(record, function (value) {\n      if (noInitial) {\n        noInitial = false;\n        accumulator = value;\n      } else {\n        accumulator = reducer(accumulator, value, counter);\n      }\n      counter++;\n    }, { IS_RECORD: true });\n    if (noInitial) throw new $TypeError('Reduce of empty iterator with no initial value');\n    return accumulator;\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar call = require('../internals/function-call');\nvar iterate = require('../internals/iterate');\nvar aCallable = require('../internals/a-callable');\nvar anObject = require('../internals/an-object');\nvar getIteratorDirect = require('../internals/get-iterator-direct');\nvar iteratorClose = require('../internals/iterator-close');\nvar iteratorHelperWithoutClosingOnEarlyError = require('../internals/iterator-helper-without-closing-on-early-error');\n\nvar someWithoutClosingOnEarlyError = iteratorHelperWithoutClosingOnEarlyError('some', TypeError);\n\n// `Iterator.prototype.some` method\n// https://tc39.es/ecma262/#sec-iterator.prototype.some\n$({ target: 'Iterator', proto: true, real: true, forced: someWithoutClosingOnEarlyError }, {\n  some: function some(predicate) {\n    anObject(this);\n    try {\n      aCallable(predicate);\n    } catch (error) {\n      iteratorClose(this, 'throw', error);\n    }\n\n    if (someWithoutClosingOnEarlyError) return call(someWithoutClosingOnEarlyError, this, predicate);\n\n    var record = getIteratorDirect(this);\n    var counter = 0;\n    return iterate(record, function (value, stop) {\n      if (predicate(value, counter++)) return stop();\n    }, { IS_RECORD: true, INTERRUPTED: true }).stopped;\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar call = require('../internals/function-call');\nvar anObject = require('../internals/an-object');\nvar getIteratorDirect = require('../internals/get-iterator-direct');\nvar notANaN = require('../internals/not-a-nan');\nvar toPositiveInteger = require('../internals/to-positive-integer');\nvar createIteratorProxy = require('../internals/iterator-create-proxy');\nvar iteratorClose = require('../internals/iterator-close');\nvar iteratorHelperThrowsOnInvalidIterator = require('../internals/iterator-helper-throws-on-invalid-iterator');\nvar iteratorHelperWithoutClosingOnEarlyError = require('../internals/iterator-helper-without-closing-on-early-error');\nvar IS_PURE = require('../internals/is-pure');\n\nvar $RangeError = RangeError;\nvar $Infinity = Infinity;\n\nvar TAKE_WITHOUT_THROWING_ON_INVALID_ITERATOR = !IS_PURE && !iteratorHelperThrowsOnInvalidIterator('take', 1);\nvar takeWithoutClosingOnEarlyError = !IS_PURE && !TAKE_WITHOUT_THROWING_ON_INVALID_ITERATOR\n  && iteratorHelperWithoutClosingOnEarlyError('take', RangeError);\n\nvar FORCED = IS_PURE || TAKE_WITHOUT_THROWING_ON_INVALID_ITERATOR || takeWithoutClosingOnEarlyError || !function () {\n  try {\n    // eslint-disable-next-line es/no-iterator, es/no-iterator-prototype-take -- detection\n    Iterator.prototype.take.call({\n      next: function () { return { done: true }; }\n    }, 0x20000000000000);\n  } catch (error) {\n    return error instanceof $RangeError;\n  }\n}();\n\nvar IteratorProxy = createIteratorProxy(function () {\n  var iterator = this.iterator;\n  if (!this.remaining--) {\n    this.done = true;\n    return iteratorClose(iterator, 'normal', undefined);\n  }\n  var result = anObject(call(this.next, iterator));\n  var done = this.done = !!result.done;\n  if (!done) return result.value;\n});\n\n// `Iterator.prototype.take` method\n// https://tc39.es/ecma262/#sec-iterator.prototype.take\n$({ target: 'Iterator', proto: true, real: true, forced: FORCED }, {\n  take: function take(limit) {\n    anObject(this);\n    var remaining;\n    try {\n      remaining = toPositiveInteger(notANaN(+limit));\n      if (remaining > 0x1FFFFFFFFFFFFF && remaining !== $Infinity) {\n        throw new $RangeError('The argument should be a safe integer');\n      }\n    } catch (error) {\n      iteratorClose(this, 'throw', error);\n    }\n\n    if (takeWithoutClosingOnEarlyError) return call(takeWithoutClosingOnEarlyError, this, remaining);\n\n    return new IteratorProxy(getIteratorDirect(this), {\n      remaining: remaining\n    });\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar anObject = require('../internals/an-object');\nvar createProperty = require('../internals/create-property');\nvar iterate = require('../internals/iterate');\nvar getIteratorDirect = require('../internals/get-iterator-direct');\n\n// `Iterator.prototype.toArray` method\n// https://tc39.es/ecma262/#sec-iterator.prototype.toarray\n$({ target: 'Iterator', proto: true, real: true }, {\n  toArray: function toArray() {\n    var result = [];\n    var index = 0;\n    iterate(getIteratorDirect(anObject(this)), function (element) {\n      createProperty(result, index++, element);\n    }, { IS_RECORD: true });\n    return result;\n  }\n});\n", "'use strict';\nvar isObject = require('../internals/is-object');\n\nvar $String = String;\nvar $TypeError = TypeError;\n\nmodule.exports = function (argument) {\n  if (argument === undefined || isObject(argument)) return argument;\n  throw new $TypeError($String(argument) + ' is not an object or undefined');\n};\n", "'use strict';\nvar getIterator = require('../internals/get-iterator-internal');\nvar getIteratorDirect = require('../internals/get-iterator-direct');\n\nmodule.exports = function (argument) {\n  return getIteratorDirect(getIterator(argument));\n};\n", "'use strict';\nvar $TypeError = TypeError;\n\nmodule.exports = function (options) {\n  var mode = options && options.mode;\n  if (mode === undefined || mode === 'shortest' || mode === 'longest' || mode === 'strict') return mode || 'shortest';\n  throw new $TypeError('Incorrect `mode` option');\n};\n", "'use strict';\nvar call = require('../internals/function-call');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar anObject = require('../internals/an-object');\nvar createIteratorProxy = require('../internals/iterator-create-proxy');\nvar iteratorCloseAll = require('../internals/iterator-close-all');\n\nvar $TypeError = TypeError;\nvar slice = uncurryThis([].slice);\nvar push = uncurryThis([].push);\nvar ITERATOR_IS_EXHAUSTED = 'Iterator is exhausted';\nvar THROW = 'throw';\n\n// eslint-disable-next-line max-statements -- specification case\nvar IteratorProxy = createIteratorProxy(function () {\n  var iterCount = this.iterCount;\n  if (!iterCount) {\n    this.done = true;\n    return;\n  }\n  var openIters = this.openIters;\n  var iters = this.iters;\n  var padding = this.padding;\n  var mode = this.mode;\n  var finishResults = this.finishResults;\n\n  var results = [];\n  var result, done;\n  for (var i = 0; i < iterCount; i++) {\n    var iter = iters[i];\n    if (iter === null) {\n      result = padding[i];\n    } else {\n      try {\n        result = anObject(call(iter.next, iter.iterator));\n        done = result.done;\n        result = result.value;\n      } catch (error) {\n        openIters[i] = undefined;\n        return iteratorCloseAll(openIters, THROW, error);\n      }\n      if (done) {\n        openIters[i] = undefined;\n        this.openItersCount--;\n        if (mode === 'shortest') {\n          this.done = true;\n          return iteratorCloseAll(openIters, 'normal', undefined);\n        }\n        if (mode === 'strict') {\n          if (i) {\n            return iteratorCloseAll(openIters, THROW, new $TypeError(ITERATOR_IS_EXHAUSTED));\n          }\n\n          var open, openDone;\n          for (var k = 1; k < iterCount; k++) {\n            // eslint-disable-next-line max-depth -- specification case\n            try {\n              open = anObject(call(iters[k].next, iters[k].iterator));\n              openDone = open.done;\n              open = open.value;\n            } catch (error) {\n              openIters[k] = undefined;\n              return iteratorCloseAll(openIters, THROW, error);\n            }\n            // eslint-disable-next-line max-depth -- specification case\n            if (openDone) {\n              openIters[k] = undefined;\n              this.openItersCount--;\n            } else {\n              return iteratorCloseAll(openIters, THROW, new $TypeError(ITERATOR_IS_EXHAUSTED));\n            }\n          }\n          this.done = true;\n          return;\n        }\n        if (!this.openItersCount) {\n          this.done = true;\n          return;\n        }\n        iters[i] = null;\n        result = padding[i];\n      }\n    }\n    push(results, result);\n  }\n\n  return finishResults ? finishResults(results) : results;\n});\n\nmodule.exports = function (iters, mode, padding, finishResults) {\n  var iterCount = iters.length;\n  return new IteratorProxy({\n    iters: iters,\n    iterCount: iterCount,\n    openIters: slice(iters, 0),\n    openItersCount: iterCount,\n    mode: mode,\n    padding: padding,\n    finishResults: finishResults\n  });\n};\n", "'use strict';\nvar $ = require('../internals/export');\nvar anObject = require('../internals/an-object');\nvar anObjectOrUndefined = require('../internals/an-object-or-undefined');\nvar call = require('../internals/function-call');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar getIteratorRecord = require('../internals/get-iterator-record');\nvar getIteratorFlattenable = require('../internals/get-iterator-flattenable');\nvar getModeOption = require('../internals/get-mode-option');\nvar iteratorClose = require('../internals/iterator-close');\nvar iteratorCloseAll = require('../internals/iterator-close-all');\nvar iteratorZip = require('../internals/iterator-zip');\nvar IS_PURE = require('../internals/is-pure');\n\nvar concat = uncurryThis([].concat);\nvar push = uncurryThis([].push);\nvar THROW = 'throw';\n\n// `Iterator.zip` method\n// https://github.com/tc39/proposal-joint-iteration\n$({ target: 'Iterator', stat: true, forced: IS_PURE }, {\n  zip: function zip(iterables /* , options */) {\n    anObject(iterables);\n    var options = arguments.length > 1 ? anObjectOrUndefined(arguments[1]) : undefined;\n    var mode = getModeOption(options);\n    var paddingOption = mode === 'longest' ? anObjectOrUndefined(options && options.padding) : undefined;\n\n    var iters = [];\n    var padding = [];\n    var inputIter = getIteratorRecord(iterables);\n    var iter, done, next;\n    while (!done) {\n      try {\n        next = anObject(call(inputIter.next, inputIter.iterator));\n        done = next.done;\n      } catch (error) {\n        return iteratorCloseAll(iters, THROW, error);\n      }\n      if (!done) {\n        try {\n          iter = getIteratorFlattenable(next.value, false);\n        } catch (error) {\n          return iteratorCloseAll(concat([inputIter], iters), THROW, error);\n        }\n        push(iters, iter);\n      }\n    }\n\n    var iterCount = iters.length;\n    var i, paddingDone, paddingIter;\n    if (mode === 'longest') {\n      if (paddingOption === undefined) {\n        for (i = 0; i < iterCount; i++) push(padding, undefined);\n      } else {\n        try {\n          paddingIter = getIteratorRecord(paddingOption);\n        } catch (error) {\n          return iteratorCloseAll(iters, THROW, error);\n        }\n        var usingIterator = true;\n        for (i = 0; i < iterCount; i++) {\n          if (usingIterator) {\n            try {\n              next = anObject(call(paddingIter.next, paddingIter.iterator));\n              paddingDone = next.done;\n              next = next.value;\n            } catch (error) {\n              return iteratorCloseAll(iters, THROW, error);\n            }\n            if (paddingDone) {\n              usingIterator = false;\n            } else {\n              push(padding, next);\n            }\n          } else {\n            push(padding, undefined);\n          }\n        }\n\n        if (usingIterator) {\n          try {\n            iteratorClose(paddingIter.iterator, 'normal');\n          } catch (error) {\n            return iteratorCloseAll(iters, THROW, error);\n          }\n        }\n      }\n    }\n\n    return iteratorZip(iters, mode, padding);\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar anObject = require('../internals/an-object');\nvar anObjectOrUndefined = require('../internals/an-object-or-undefined');\nvar createProperty = require('../internals/create-property');\nvar call = require('../internals/function-call');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar getBuiltIn = require('../internals/get-built-in');\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\nvar getIteratorFlattenable = require('../internals/get-iterator-flattenable');\nvar getModeOption = require('../internals/get-mode-option');\nvar iteratorCloseAll = require('../internals/iterator-close-all');\nvar iteratorZip = require('../internals/iterator-zip');\nvar IS_PURE = require('../internals/is-pure');\n\nvar push = uncurryThis([].push);\nvar THROW = 'throw';\n\n// `Iterator.zipKeyed` method\n// https://github.com/tc39/proposal-joint-iteration\n$({ target: 'Iterator', stat: true, forced: IS_PURE }, {\n  zipKeyed: function zipKeyed(iterables /* , options */) {\n    anObject(iterables);\n    var options = arguments.length > 1 ? anObjectOrUndefined(arguments[1]) : undefined;\n    var mode = getModeOption(options);\n    var paddingOption = mode === 'longest' ? anObjectOrUndefined(options && options.padding) : undefined;\n\n    var iters = [];\n    var padding = [];\n    var allKeys = getBuiltIn('Reflect', 'ownKeys')(iterables);\n    var keys = [];\n    var propertyIsEnumerable = propertyIsEnumerableModule.f;\n    var i, key, value;\n    for (i = 0; i < allKeys.length; i++) try {\n      key = allKeys[i];\n      if (!call(propertyIsEnumerable, iterables, key)) continue;\n      value = iterables[key];\n      if (value !== undefined) {\n        push(keys, key);\n        push(iters, getIteratorFlattenable(value, false));\n      }\n    } catch (error) {\n      return iteratorCloseAll(iters, THROW, error);\n    }\n\n    var iterCount = iters.length;\n    if (mode === 'longest') {\n      if (paddingOption === undefined) {\n        for (i = 0; i < iterCount; i++) push(padding, undefined);\n      } else {\n        for (i = 0; i < keys.length; i++) {\n          try {\n            value = paddingOption[keys[i]];\n          } catch (error) {\n            return iteratorCloseAll(iters, THROW, error);\n          }\n          push(padding, value);\n        }\n      }\n    }\n\n    return iteratorZip(iters, mode, padding, function (results) {\n      var obj = getBuiltIn('Object', 'create')(null);\n      for (var j = 0; j < iterCount; j++) {\n        createProperty(obj, keys[j], results[j]);\n      }\n      return obj;\n    });\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar NATIVE_RAW_JSON = require('../internals/native-raw-json');\nvar isRawJSON = require('../internals/is-raw-json');\n\n// `JSON.isRawJSON` method\n// https://tc39.es/proposal-json-parse-with-source/#sec-json.israwjson\n// https://github.com/tc39/proposal-json-parse-with-source\n$({ target: 'JSON', stat: true, forced: !NATIVE_RAW_JSON }, {\n  isRawJSON: isRawJSON\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar globalThis = require('../internals/global-this');\nvar getBuiltIn = require('../internals/get-built-in');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar call = require('../internals/function-call');\nvar isCallable = require('../internals/is-callable');\nvar isObject = require('../internals/is-object');\nvar isArray = require('../internals/is-array');\nvar hasOwn = require('../internals/has-own-property');\nvar toString = require('../internals/to-string');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar createProperty = require('../internals/create-property');\nvar fails = require('../internals/fails');\nvar parseJSONString = require('../internals/parse-json-string');\nvar NATIVE_SYMBOL = require('../internals/symbol-constructor-detection');\n\nvar JSON = globalThis.JSON;\nvar Number = globalThis.Number;\nvar SyntaxError = globalThis.SyntaxError;\nvar nativeParse = JSON && JSON.parse;\nvar enumerableOwnProperties = getBuiltIn('Object', 'keys');\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar at = uncurryThis(''.charAt);\nvar slice = uncurryThis(''.slice);\nvar exec = uncurryThis(/./.exec);\nvar push = uncurryThis([].push);\n\nvar IS_DIGIT = /^\\d$/;\nvar IS_NON_ZERO_DIGIT = /^[1-9]$/;\nvar IS_NUMBER_START = /^[\\d-]$/;\nvar IS_WHITESPACE = /^[\\t\\n\\r ]$/;\n\nvar PRIMITIVE = 0;\nvar OBJECT = 1;\n\nvar $parse = function (source, reviver) {\n  source = toString(source);\n  var context = new Context(source, 0);\n  var root = context.parse();\n  var value = root.value;\n  var endIndex = context.skip(IS_WHITESPACE, root.end);\n  if (endIndex < source.length) {\n    throw new SyntaxError('Unexpected extra character: \"' + at(source, endIndex) + '\" after the parsed data at: ' + endIndex);\n  }\n  return isCallable(reviver) ? internalize({ '': value }, '', reviver, root) : value;\n};\n\nvar internalize = function (holder, name, reviver, node) {\n  var val = holder[name];\n  var unmodified = node && val === node.value;\n  var context = unmodified && typeof node.source == 'string' ? { source: node.source } : {};\n  var elementRecordsLen, keys, len, i, P;\n  if (isObject(val)) {\n    var nodeIsArray = isArray(val);\n    var nodes = unmodified ? node.nodes : nodeIsArray ? [] : {};\n    if (nodeIsArray) {\n      elementRecordsLen = nodes.length;\n      len = lengthOfArrayLike(val);\n      for (i = 0; i < len; i++) {\n        internalizeProperty(val, i, internalize(val, '' + i, reviver, i < elementRecordsLen ? nodes[i] : undefined));\n      }\n    } else {\n      keys = enumerableOwnProperties(val);\n      len = lengthOfArrayLike(keys);\n      for (i = 0; i < len; i++) {\n        P = keys[i];\n        internalizeProperty(val, P, internalize(val, P, reviver, hasOwn(nodes, P) ? nodes[P] : undefined));\n      }\n    }\n  }\n  return call(reviver, holder, name, val, context);\n};\n\nvar internalizeProperty = function (object, key, value) {\n  if (DESCRIPTORS) {\n    var descriptor = getOwnPropertyDescriptor(object, key);\n    if (descriptor && !descriptor.configurable) return;\n  }\n  if (value === undefined) delete object[key];\n  else createProperty(object, key, value);\n};\n\nvar Node = function (value, end, source, nodes) {\n  this.value = value;\n  this.end = end;\n  this.source = source;\n  this.nodes = nodes;\n};\n\nvar Context = function (source, index) {\n  this.source = source;\n  this.index = index;\n};\n\n// https://www.json.org/json-en.html\nContext.prototype = {\n  fork: function (nextIndex) {\n    return new Context(this.source, nextIndex);\n  },\n  parse: function () {\n    var source = this.source;\n    var i = this.skip(IS_WHITESPACE, this.index);\n    var fork = this.fork(i);\n    var chr = at(source, i);\n    if (exec(IS_NUMBER_START, chr)) return fork.number();\n    switch (chr) {\n      case '{':\n        return fork.object();\n      case '[':\n        return fork.array();\n      case '\"':\n        return fork.string();\n      case 't':\n        return fork.keyword(true);\n      case 'f':\n        return fork.keyword(false);\n      case 'n':\n        return fork.keyword(null);\n    } throw new SyntaxError('Unexpected character: \"' + chr + '\" at: ' + i);\n  },\n  node: function (type, value, start, end, nodes) {\n    return new Node(value, end, type ? null : slice(this.source, start, end), nodes);\n  },\n  object: function () {\n    var source = this.source;\n    var i = this.index + 1;\n    var expectKeypair = false;\n    var object = {};\n    var nodes = {};\n    var closed = false;\n    while (i < source.length) {\n      i = this.until(['\"', '}'], i);\n      if (at(source, i) === '}' && !expectKeypair) {\n        i++;\n        closed = true;\n        break;\n      }\n      // Parsing the key\n      var result = this.fork(i).string();\n      var key = result.value;\n      i = result.end;\n      i = this.until([':'], i) + 1;\n      // Parsing value\n      i = this.skip(IS_WHITESPACE, i);\n      result = this.fork(i).parse();\n      createProperty(nodes, key, result);\n      createProperty(object, key, result.value);\n      i = this.until([',', '}'], result.end);\n      var chr = at(source, i);\n      if (chr === ',') {\n        expectKeypair = true;\n        i++;\n      } else if (chr === '}') {\n        i++;\n        closed = true;\n        break;\n      }\n    }\n    if (!closed) throw new SyntaxError('Unterminated object at: ' + i);\n    return this.node(OBJECT, object, this.index, i, nodes);\n  },\n  array: function () {\n    var source = this.source;\n    var i = this.index + 1;\n    var expectElement = false;\n    var array = [];\n    var nodes = [];\n    var closed = false;\n    while (i < source.length) {\n      i = this.skip(IS_WHITESPACE, i);\n      if (at(source, i) === ']' && !expectElement) {\n        i++;\n        closed = true;\n        break;\n      }\n      var result = this.fork(i).parse();\n      push(nodes, result);\n      push(array, result.value);\n      i = this.until([',', ']'], result.end);\n      if (at(source, i) === ',') {\n        expectElement = true;\n        i++;\n      } else if (at(source, i) === ']') {\n        i++;\n        closed = true;\n        break;\n      }\n    }\n    if (!closed) throw new SyntaxError('Unterminated array at: ' + i);\n    return this.node(OBJECT, array, this.index, i, nodes);\n  },\n  string: function () {\n    var index = this.index;\n    var parsed = parseJSONString(this.source, this.index + 1);\n    return this.node(PRIMITIVE, parsed.value, index, parsed.end);\n  },\n  number: function () {\n    var source = this.source;\n    var startIndex = this.index;\n    var i = startIndex;\n    if (at(source, i) === '-') i++;\n    if (at(source, i) === '0') i++;\n    else if (exec(IS_NON_ZERO_DIGIT, at(source, i))) i = this.skip(IS_DIGIT, i + 1);\n    else throw new SyntaxError('Failed to parse number at: ' + i);\n    if (at(source, i) === '.') {\n      var fractionStartIndex = i + 1;\n      i = this.skip(IS_DIGIT, fractionStartIndex);\n      if (fractionStartIndex === i) throw new SyntaxError(\"Failed to parse number's fraction at: \" + i);\n    }\n    if (at(source, i) === 'e' || at(source, i) === 'E') {\n      i++;\n      if (at(source, i) === '+' || at(source, i) === '-') i++;\n      var exponentStartIndex = i;\n      i = this.skip(IS_DIGIT, i);\n      if (exponentStartIndex === i) throw new SyntaxError(\"Failed to parse number's exponent value at: \" + i);\n    }\n    return this.node(PRIMITIVE, Number(slice(source, startIndex, i)), startIndex, i);\n  },\n  keyword: function (value) {\n    var keyword = '' + value;\n    var index = this.index;\n    var endIndex = index + keyword.length;\n    if (slice(this.source, index, endIndex) !== keyword) throw new SyntaxError('Failed to parse value at: ' + index);\n    return this.node(PRIMITIVE, value, index, endIndex);\n  },\n  skip: function (regex, i) {\n    var source = this.source;\n    for (; i < source.length; i++) if (!exec(regex, at(source, i))) break;\n    return i;\n  },\n  until: function (array, i) {\n    i = this.skip(IS_WHITESPACE, i);\n    var chr = at(this.source, i);\n    for (var j = 0; j < array.length; j++) if (array[j] === chr) return i;\n    throw new SyntaxError('Unexpected character: \"' + chr + '\" at: ' + i);\n  }\n};\n\nvar NO_SOURCE_SUPPORT = fails(function () {\n  var unsafeInt = '9007199254740993';\n  var source;\n  nativeParse(unsafeInt, function (key, value, context) {\n    source = context.source;\n  });\n  return source !== unsafeInt;\n});\n\nvar PROPER_BASE_PARSE = NATIVE_SYMBOL && !fails(function () {\n  // Safari 9 bug\n  return 1 / nativeParse('-0 \\t') !== -Infinity;\n});\n\n// `JSON.parse` method\n// https://tc39.es/ecma262/#sec-json.parse\n// https://github.com/tc39/proposal-json-parse-with-source\n$({ target: 'JSON', stat: true, forced: NO_SOURCE_SUPPORT }, {\n  parse: function parse(text, reviver) {\n    return PROPER_BASE_PARSE && !isCallable(reviver) ? nativeParse(text) : $parse(text, reviver);\n  }\n});\n", "'use strict';\nvar fails = require('../internals/fails');\n\nmodule.exports = !fails(function () {\n  // eslint-disable-next-line es/no-object-isextensible, es/no-object-preventextensions -- required for testing\n  return Object.isExtensible(Object.preventExtensions({}));\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar FREEZING = require('../internals/freezing');\nvar NATIVE_RAW_JSON = require('../internals/native-raw-json');\nvar getBuiltIn = require('../internals/get-built-in');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar toString = require('../internals/to-string');\nvar createProperty = require('../internals/create-property');\nvar setInternalState = require('../internals/internal-state').set;\n\nvar $SyntaxError = SyntaxError;\nvar parse = getBuiltIn('JSON', 'parse');\nvar create = getBuiltIn('Object', 'create');\nvar freeze = getBuiltIn('Object', 'freeze');\nvar at = uncurryThis(''.charAt);\n\nvar ERROR_MESSAGE = 'Unacceptable as raw JSON';\n\nvar isWhitespace = function (it) {\n  return it === ' ' || it === '\\t' || it === '\\n' || it === '\\r';\n};\n\n// `JSON.rawJSON` method\n// https://tc39.es/proposal-json-parse-with-source/#sec-json.rawjson\n// https://github.com/tc39/proposal-json-parse-with-source\n$({ target: 'JSON', stat: true, forced: !NATIVE_RAW_JSON }, {\n  rawJSON: function rawJSON(text) {\n    var jsonString = toString(text);\n    if (jsonString === '' || isWhitespace(at(jsonString, 0)) || isWhitespace(at(jsonString, jsonString.length - 1))) {\n      throw new $SyntaxError(ERROR_MESSAGE);\n    }\n    var parsed = parse(jsonString);\n    if (typeof parsed == 'object' && parsed !== null) throw new $SyntaxError(ERROR_MESSAGE);\n    var obj = create(null);\n    setInternalState(obj, { type: 'RawJSON' });\n    createProperty(obj, 'rawJSON', jsonString);\n    return FREEZING ? freeze(obj) : obj;\n  }\n});\n", "'use strict';\nvar globalThis = require('../internals/global-this');\nvar setToStringTag = require('../internals/set-to-string-tag');\n\n// JSON[@@toStringTag] property\n// https://tc39.es/ecma262/#sec-json-@@tostringtag\nsetToStringTag(globalThis.JSON, 'JSON', true);\n", "'use strict';\n// FF26- bug: ArrayBuffers are non-extensible, but Object.isExtensible does not report it\nvar fails = require('../internals/fails');\n\nmodule.exports = fails(function () {\n  if (typeof ArrayBuffer == 'function') {\n    var buffer = new ArrayBuffer(8);\n    // eslint-disable-next-line es/no-object-isextensible, es/no-object-defineproperty -- safe\n    if (Object.isExtensible(buffer)) Object.defineProperty(buffer, 'a', { value: 8 });\n  }\n});\n", "'use strict';\nvar fails = require('../internals/fails');\nvar isObject = require('../internals/is-object');\nvar classof = require('../internals/classof-raw');\nvar ARRAY_BUFFER_NON_EXTENSIBLE = require('../internals/array-buffer-non-extensible');\n\n// eslint-disable-next-line es/no-object-isextensible -- safe\nvar $isExtensible = Object.isExtensible;\nvar FAILS_ON_PRIMITIVES = fails(function () { $isExtensible(1); });\n\n// `Object.isExtensible` method\n// https://tc39.es/ecma262/#sec-object.isextensible\nmodule.exports = (FAILS_ON_PRIMITIVES || ARRAY_BUFFER_NON_EXTENSIBLE) ? function isExtensible(it) {\n  if (!isObject(it)) return false;\n  if (ARRAY_BUFFER_NON_EXTENSIBLE && classof(it) === 'ArrayBuffer') return false;\n  return $isExtensible ? $isExtensible(it) : true;\n} : $isExtensible;\n", "'use strict';\nvar $ = require('../internals/export');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar hiddenKeys = require('../internals/hidden-keys');\nvar isObject = require('../internals/is-object');\nvar hasOwn = require('../internals/has-own-property');\nvar defineProperty = require('../internals/object-define-property').f;\nvar getOwnPropertyNamesModule = require('../internals/object-get-own-property-names');\nvar getOwnPropertyNamesExternalModule = require('../internals/object-get-own-property-names-external');\nvar isExtensible = require('../internals/object-is-extensible');\nvar uid = require('../internals/uid');\nvar FREEZING = require('../internals/freezing');\n\nvar REQUIRED = false;\nvar METADATA = uid('meta');\nvar id = 0;\n\nvar setMetadata = function (it) {\n  defineProperty(it, METADATA, { value: {\n    objectID: 'O' + id++, // object ID\n    weakData: {}          // weak collections IDs\n  } });\n};\n\nvar fastKey = function (it, create) {\n  // return a primitive with prefix\n  if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;\n  if (!hasOwn(it, METADATA)) {\n    // can't set metadata to uncaught frozen object\n    if (!isExtensible(it)) return 'F';\n    // not necessary to add metadata\n    if (!create) return 'E';\n    // add missing metadata\n    setMetadata(it);\n  // return object ID\n  } return it[METADATA].objectID;\n};\n\nvar getWeakData = function (it, create) {\n  if (!hasOwn(it, METADATA)) {\n    // can't set metadata to uncaught frozen object\n    if (!isExtensible(it)) return true;\n    // not necessary to add metadata\n    if (!create) return false;\n    // add missing metadata\n    setMetadata(it);\n  // return the store of weak collections IDs\n  } return it[METADATA].weakData;\n};\n\n// add metadata on freeze-family methods calling\nvar onFreeze = function (it) {\n  if (FREEZING && REQUIRED && isExtensible(it) && !hasOwn(it, METADATA)) setMetadata(it);\n  return it;\n};\n\nvar enable = function () {\n  meta.enable = function () { /* empty */ };\n  REQUIRED = true;\n  var getOwnPropertyNames = getOwnPropertyNamesModule.f;\n  var splice = uncurryThis([].splice);\n  var test = {};\n  // eslint-disable-next-line unicorn/no-immediate-mutation -- ES3 syntax limitation\n  test[METADATA] = 1;\n\n  // prevent exposing of metadata key\n  if (getOwnPropertyNames(test).length) {\n    getOwnPropertyNamesModule.f = function (it) {\n      var result = getOwnPropertyNames(it);\n      for (var i = 0, length = result.length; i < length; i++) {\n        if (result[i] === METADATA) {\n          splice(result, i, 1);\n          break;\n        }\n      } return result;\n    };\n\n    $({ target: 'Object', stat: true, forced: true }, {\n      getOwnPropertyNames: getOwnPropertyNamesExternalModule.f\n    });\n  }\n};\n\nvar meta = module.exports = {\n  enable: enable,\n  fastKey: fastKey,\n  getWeakData: getWeakData,\n  onFreeze: onFreeze\n};\n\nhiddenKeys[METADATA] = true;\n", "'use strict';\nvar $ = require('../internals/export');\nvar globalThis = require('../internals/global-this');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar isForced = require('../internals/is-forced');\nvar defineBuiltIn = require('../internals/define-built-in');\nvar InternalMetadataModule = require('../internals/internal-metadata');\nvar iterate = require('../internals/iterate');\nvar anInstance = require('../internals/an-instance');\nvar isCallable = require('../internals/is-callable');\nvar isNullOrUndefined = require('../internals/is-null-or-undefined');\nvar isObject = require('../internals/is-object');\nvar fails = require('../internals/fails');\nvar checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar inheritIfRequired = require('../internals/inherit-if-required');\n\nmodule.exports = function (CONSTRUCTOR_NAME, wrapper, common) {\n  var IS_MAP = CONSTRUCTOR_NAME.indexOf('Map') !== -1;\n  var IS_WEAK = CONSTRUCTOR_NAME.indexOf('Weak') !== -1;\n  var ADDER = IS_MAP ? 'set' : 'add';\n  var NativeConstructor = globalThis[CONSTRUCTOR_NAME];\n  var NativePrototype = NativeConstructor && NativeConstructor.prototype;\n  var Constructor = NativeConstructor;\n  var exported = {};\n\n  var fixMethod = function (KEY) {\n    var uncurriedNativeMethod = uncurryThis(NativePrototype[KEY]);\n    defineBuiltIn(NativePrototype, KEY,\n      KEY === 'add' ? function add(value) {\n        uncurriedNativeMethod(this, value === 0 ? 0 : value);\n        return this;\n      } : KEY === 'delete' ? function (key) {\n        return IS_WEAK && !isObject(key) ? false : uncurriedNativeMethod(this, key === 0 ? 0 : key);\n      } : KEY === 'get' ? function get(key) {\n        return IS_WEAK && !isObject(key) ? undefined : uncurriedNativeMethod(this, key === 0 ? 0 : key);\n      } : KEY === 'has' ? function has(key) {\n        return IS_WEAK && !isObject(key) ? false : uncurriedNativeMethod(this, key === 0 ? 0 : key);\n      } : function set(key, value) {\n        uncurriedNativeMethod(this, key === 0 ? 0 : key, value);\n        return this;\n      }\n    );\n  };\n\n  var REPLACE = isForced(\n    CONSTRUCTOR_NAME,\n    !isCallable(NativeConstructor) || !(IS_WEAK || NativePrototype.forEach && !fails(function () {\n      new NativeConstructor().entries().next();\n    }))\n  );\n\n  if (REPLACE) {\n    // create collection constructor\n    Constructor = common.getConstructor(wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER);\n    InternalMetadataModule.enable();\n  } else if (isForced(CONSTRUCTOR_NAME, true)) {\n    var instance = new Constructor();\n    // early implementations not supports chaining\n    var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) !== instance;\n    // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false\n    var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); });\n    // most early implementations doesn't supports iterables, most modern - not close it correctly\n    // eslint-disable-next-line no-new -- required for testing\n    var ACCEPT_ITERABLES = checkCorrectnessOfIteration(function (iterable) { new NativeConstructor(iterable); });\n    // for early implementations -0 and +0 not the same\n    var BUGGY_ZERO = !IS_WEAK && fails(function () {\n      // V8 ~ Chromium 42- fails only with 5+ elements\n      var $instance = new NativeConstructor();\n      var index = 5;\n      while (index--) $instance[ADDER](index, index);\n      return !$instance.has(-0);\n    });\n\n    if (!ACCEPT_ITERABLES) {\n      Constructor = wrapper(function (dummy, iterable) {\n        anInstance(dummy, NativePrototype);\n        var that = inheritIfRequired(new NativeConstructor(), dummy, Constructor);\n        if (!isNullOrUndefined(iterable)) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });\n        return that;\n      });\n      Constructor.prototype = NativePrototype;\n      NativePrototype.constructor = Constructor;\n    }\n\n    if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) {\n      fixMethod('delete');\n      fixMethod('has');\n      IS_MAP && fixMethod('get');\n    }\n\n    if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER);\n\n    // weak collections should not contains .clear method\n    if (IS_WEAK && NativePrototype.clear) delete NativePrototype.clear;\n  }\n\n  exported[CONSTRUCTOR_NAME] = Constructor;\n  $({ global: true, constructor: true, forced: Constructor !== NativeConstructor }, exported);\n\n  setToStringTag(Constructor, CONSTRUCTOR_NAME);\n\n  if (!IS_WEAK) common.setStrong(Constructor, CONSTRUCTOR_NAME, IS_MAP);\n\n  return Constructor;\n};\n", "'use strict';\nvar create = require('../internals/object-create');\nvar defineBuiltInAccessor = require('../internals/define-built-in-accessor');\nvar defineBuiltIns = require('../internals/define-built-ins');\nvar bind = require('../internals/function-bind-context');\nvar anInstance = require('../internals/an-instance');\nvar isNullOrUndefined = require('../internals/is-null-or-undefined');\nvar iterate = require('../internals/iterate');\nvar defineIterator = require('../internals/iterator-define');\nvar createIterResultObject = require('../internals/create-iter-result-object');\nvar setSpecies = require('../internals/set-species');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar fastKey = require('../internals/internal-metadata').fastKey;\nvar InternalStateModule = require('../internals/internal-state');\n\nvar setInternalState = InternalStateModule.set;\nvar internalStateGetterFor = InternalStateModule.getterFor;\n\nmodule.exports = {\n  getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) {\n    var Constructor = wrapper(function (that, iterable) {\n      anInstance(that, Prototype);\n      setInternalState(that, {\n        type: CONSTRUCTOR_NAME,\n        index: create(null),\n        first: null,\n        last: null,\n        size: 0\n      });\n      if (!DESCRIPTORS) that.size = 0;\n      if (!isNullOrUndefined(iterable)) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });\n    });\n\n    var Prototype = Constructor.prototype;\n\n    var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);\n\n    var define = function (that, key, value) {\n      var state = getInternalState(that);\n      var entry = getEntry(that, key);\n      var previous, index;\n      // change existing entry\n      if (entry) {\n        entry.value = value;\n      // create new entry\n      } else {\n        state.last = entry = {\n          index: index = fastKey(key, true),\n          key: key,\n          value: value,\n          previous: previous = state.last,\n          next: null,\n          removed: false\n        };\n        if (!state.first) state.first = entry;\n        if (previous) previous.next = entry;\n        if (DESCRIPTORS) state.size++;\n        else that.size++;\n        // add to index\n        if (index !== 'F') state.index[index] = entry;\n      } return that;\n    };\n\n    var getEntry = function (that, key) {\n      var state = getInternalState(that);\n      // fast case\n      var index = fastKey(key);\n      var entry;\n      if (index !== 'F') return state.index[index];\n      // frozen object case\n      for (entry = state.first; entry; entry = entry.next) {\n        if (entry.key === key) return entry;\n      }\n    };\n\n    defineBuiltIns(Prototype, {\n      // `{ Map, Set }.prototype.clear()` methods\n      // https://tc39.es/ecma262/#sec-map.prototype.clear\n      // https://tc39.es/ecma262/#sec-set.prototype.clear\n      clear: function clear() {\n        var that = this;\n        var state = getInternalState(that);\n        var entry = state.first;\n        while (entry) {\n          entry.removed = true;\n          if (entry.previous) entry.previous = entry.previous.next = null;\n          entry = entry.next;\n        }\n        state.first = state.last = null;\n        state.index = create(null);\n        if (DESCRIPTORS) state.size = 0;\n        else that.size = 0;\n      },\n      // `{ Map, Set }.prototype.delete(key)` methods\n      // https://tc39.es/ecma262/#sec-map.prototype.delete\n      // https://tc39.es/ecma262/#sec-set.prototype.delete\n      'delete': function (key) {\n        var that = this;\n        var state = getInternalState(that);\n        var entry = getEntry(that, key);\n        if (entry) {\n          var next = entry.next;\n          var prev = entry.previous;\n          delete state.index[entry.index];\n          entry.removed = true;\n          if (prev) prev.next = next;\n          if (next) next.previous = prev;\n          if (state.first === entry) state.first = next;\n          if (state.last === entry) state.last = prev;\n          if (DESCRIPTORS) state.size--;\n          else that.size--;\n        } return !!entry;\n      },\n      // `{ Map, Set }.prototype.forEach(callbackfn, thisArg = undefined)` methods\n      // https://tc39.es/ecma262/#sec-map.prototype.foreach\n      // https://tc39.es/ecma262/#sec-set.prototype.foreach\n      forEach: function forEach(callbackfn /* , that = undefined */) {\n        var state = getInternalState(this);\n        var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n        var entry;\n        while (entry = entry ? entry.next : state.first) {\n          boundFunction(entry.value, entry.key, this);\n          // revert to the last existing entry\n          while (entry && entry.removed) entry = entry.previous;\n        }\n      },\n      // `{ Map, Set}.prototype.has(key)` methods\n      // https://tc39.es/ecma262/#sec-map.prototype.has\n      // https://tc39.es/ecma262/#sec-set.prototype.has\n      has: function has(key) {\n        return !!getEntry(this, key);\n      }\n    });\n\n    defineBuiltIns(Prototype, IS_MAP ? {\n      // `Map.prototype.get(key)` method\n      // https://tc39.es/ecma262/#sec-map.prototype.get\n      get: function get(key) {\n        var entry = getEntry(this, key);\n        return entry && entry.value;\n      },\n      // `Map.prototype.set(key, value)` method\n      // https://tc39.es/ecma262/#sec-map.prototype.set\n      set: function set(key, value) {\n        return define(this, key === 0 ? 0 : key, value);\n      }\n    } : {\n      // `Set.prototype.add(value)` method\n      // https://tc39.es/ecma262/#sec-set.prototype.add\n      add: function add(value) {\n        return define(this, value = value === 0 ? 0 : value, value);\n      }\n    });\n    if (DESCRIPTORS) defineBuiltInAccessor(Prototype, 'size', {\n      configurable: true,\n      get: function () {\n        return getInternalState(this).size;\n      }\n    });\n    return Constructor;\n  },\n  setStrong: function (Constructor, CONSTRUCTOR_NAME, IS_MAP) {\n    var ITERATOR_NAME = CONSTRUCTOR_NAME + ' Iterator';\n    var getInternalCollectionState = internalStateGetterFor(CONSTRUCTOR_NAME);\n    var getInternalIteratorState = internalStateGetterFor(ITERATOR_NAME);\n    // `{ Map, Set }.prototype.{ keys, values, entries, @@iterator }()` methods\n    // https://tc39.es/ecma262/#sec-map.prototype.entries\n    // https://tc39.es/ecma262/#sec-map.prototype.keys\n    // https://tc39.es/ecma262/#sec-map.prototype.values\n    // https://tc39.es/ecma262/#sec-map.prototype-@@iterator\n    // https://tc39.es/ecma262/#sec-set.prototype.entries\n    // https://tc39.es/ecma262/#sec-set.prototype.keys\n    // https://tc39.es/ecma262/#sec-set.prototype.values\n    // https://tc39.es/ecma262/#sec-set.prototype-@@iterator\n    defineIterator(Constructor, CONSTRUCTOR_NAME, function (iterated, kind) {\n      setInternalState(this, {\n        type: ITERATOR_NAME,\n        target: iterated,\n        state: getInternalCollectionState(iterated),\n        kind: kind,\n        last: null\n      });\n    }, function () {\n      var state = getInternalIteratorState(this);\n      var kind = state.kind;\n      var entry = state.last;\n      // revert to the last existing entry\n      while (entry && entry.removed) entry = entry.previous;\n      // get next entry\n      if (!state.target || !(state.last = entry = entry ? entry.next : state.state.first)) {\n        // or finish the iteration\n        state.target = null;\n        return createIterResultObject(undefined, true);\n      }\n      // return step by kind\n      if (kind === 'keys') return createIterResultObject(entry.key, false);\n      if (kind === 'values') return createIterResultObject(entry.value, false);\n      return createIterResultObject([entry.key, entry.value], false);\n    }, IS_MAP ? 'entries' : 'values', !IS_MAP, true);\n\n    // `{ Map, Set }.prototype[@@species]` accessors\n    // https://tc39.es/ecma262/#sec-get-map-@@species\n    // https://tc39.es/ecma262/#sec-get-set-@@species\n    setSpecies(CONSTRUCTOR_NAME);\n  }\n};\n", "'use strict';\nvar collection = require('../internals/collection');\nvar collectionStrong = require('../internals/collection-strong');\n\n// `Map` constructor\n// https://tc39.es/ecma262/#sec-map-objects\ncollection('Map', function (init) {\n  return function Map() { return init(this, arguments.length ? arguments[0] : undefined); };\n}, collectionStrong);\n", "'use strict';\n// TODO: Remove this module from `core-js@4` since it's replaced to module below\nrequire('../modules/es.map.constructor');\n", "'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\n\n// eslint-disable-next-line es/no-map -- safe\nvar MapPrototype = Map.prototype;\n\nmodule.exports = {\n  // eslint-disable-next-line es/no-map -- safe\n  Map: Map,\n  set: uncurryThis(MapPrototype.set),\n  get: uncurryThis(MapPrototype.get),\n  has: uncurryThis(MapPrototype.has),\n  remove: uncurryThis(MapPrototype['delete']),\n  proto: MapPrototype\n};\n", "'use strict';\nvar $ = require('../internals/export');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar aCallable = require('../internals/a-callable');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar iterate = require('../internals/iterate');\nvar doesNotExceedSafeInteger = require('../internals/does-not-exceed-safe-integer');\nvar MapHelpers = require('../internals/map-helpers');\nvar IS_PURE = require('../internals/is-pure');\nvar fails = require('../internals/fails');\n\nvar Map = MapHelpers.Map;\nvar has = MapHelpers.has;\nvar get = MapHelpers.get;\nvar set = MapHelpers.set;\nvar push = uncurryThis([].push);\n\n// https://bugs.webkit.org/show_bug.cgi?id=271524\nvar DOES_NOT_WORK_WITH_PRIMITIVES = IS_PURE || fails(function () {\n  return Map.groupBy('ab', function (it) {\n    return it;\n  }).get('a').length !== 1;\n});\n\n// `Map.groupBy` method\n// https://tc39.es/ecma262/#sec-map.groupby\n$({ target: 'Map', stat: true, forced: IS_PURE || DOES_NOT_WORK_WITH_PRIMITIVES }, {\n  groupBy: function groupBy(items, callbackfn) {\n    requireObjectCoercible(items);\n    aCallable(callbackfn);\n    var map = new Map();\n    var k = 0;\n    iterate(items, function (value) {\n      doesNotExceedSafeInteger(k);\n      var key = callbackfn(value, k++);\n      if (!has(map, key)) set(map, key, [value]);\n      else push(get(map, key), value);\n    });\n    return map;\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar MapHelpers = require('../internals/map-helpers');\nvar IS_PURE = require('../internals/is-pure');\n\nvar get = MapHelpers.get;\nvar has = MapHelpers.has;\nvar set = MapHelpers.set;\n\n// `Map.prototype.getOrInsert` method\n// https://tc39.es/ecma262/#sec-map.prototype.getorinsert\n$({ target: 'Map', proto: true, real: true, forced: IS_PURE }, {\n  getOrInsert: function getOrInsert(key, value) {\n    if (has(this, key)) return get(this, key);\n    set(this, key, value);\n    return value;\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar aCallable = require('../internals/a-callable');\nvar MapHelpers = require('../internals/map-helpers');\nvar IS_PURE = require('../internals/is-pure');\n\nvar get = MapHelpers.get;\nvar has = MapHelpers.has;\nvar set = MapHelpers.set;\n\n// `Map.prototype.getOrInsertComputed` method\n// https://tc39.es/ecma262/#sec-map.prototype.getorinsertcomputed\n$({ target: 'Map', proto: true, real: true, forced: IS_PURE }, {\n  getOrInsertComputed: function getOrInsertComputed(key, callbackfn) {\n    var hasKey = has(this, key);\n    aCallable(callbackfn);\n    if (hasKey) return get(this, key);\n    // CanonicalizeKeyedCollectionKey\n    if (key === 0 && 1 / key === -Infinity) key = 0;\n    var value = callbackfn(key);\n    set(this, key, value);\n    return value;\n  }\n});\n", "'use strict';\nvar log = Math.log;\n\n// `Math.log1p` method implementation\n// https://tc39.es/ecma262/#sec-math.log1p\n// eslint-disable-next-line es/no-math-log1p -- safe\nmodule.exports = Math.log1p || function log1p(x) {\n  var n = +x;\n  if (n > -1e-8 && n < 1e-8) return n - n * n / 2;\n  var u = 1 + n;\n  return u === 1 ? n : n === u - 1 ? log(u) : n * log(u) / (u - 1);\n};\n", "'use strict';\nvar $ = require('../internals/export');\nvar log1p = require('../internals/math-log1p');\n\n// eslint-disable-next-line es/no-math-acosh -- required for testing\nvar $acosh = Math.acosh;\nvar log = Math.log;\nvar sqrt = Math.sqrt;\nvar LN2 = Math.LN2;\n\nvar FORCED = !$acosh\n  // V8 bug: https://code.google.com/p/v8/issues/detail?id=3509\n  || Math.floor($acosh(Number.MAX_VALUE)) !== 710\n  // Tor Browser bug: Math.acosh(Infinity) -> NaN\n  || $acosh(Infinity) !== Infinity;\n\n// `Math.acosh` method\n// https://tc39.es/ecma262/#sec-math.acosh\n$({ target: 'Math', stat: true, forced: FORCED }, {\n  acosh: function acosh(x) {\n    var n = +x;\n    return n < 1 ? NaN : n > 94906265.62425156\n      ? log(n) + LN2\n      : log1p(n - 1 + sqrt(n - 1) * sqrt(n + 1));\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar log1p = require('../internals/math-log1p');\n\n// eslint-disable-next-line es/no-math-asinh -- required for testing\nvar $asinh = Math.asinh;\nvar log = Math.log;\nvar sqrt = Math.sqrt;\nvar LN2 = Math.LN2;\n// sqrt(2 ** 53) - prevent n * n overflow\nvar SQRT_2_POW_53 = 94906265.62425156;\n\nfunction asinh(x) {\n  var n = +x;\n  return !isFinite(n) || n === 0 ? n : n < 0 ? -asinh(-n) : n > SQRT_2_POW_53 ? log(n) + LN2\n    : n < 1e-8 ? n : log1p(n + n * n / (1 + sqrt(n * n + 1)));\n}\n\nvar FORCED = !($asinh && 1 / $asinh(0) > 0);\n\n// `Math.asinh` method\n// https://tc39.es/ecma262/#sec-math.asinh\n// Tor Browser bug: Math.asinh(0) -> -0\n$({ target: 'Math', stat: true, forced: FORCED }, {\n  asinh: asinh\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar log1p = require('../internals/math-log1p');\n\n// eslint-disable-next-line es/no-math-atanh -- required for testing\nvar $atanh = Math.atanh;\n\nvar FORCED = !($atanh && 1 / $atanh(-0) < 0);\n\n// `Math.atanh` method\n// https://tc39.es/ecma262/#sec-math.atanh\n// Tor Browser bug: Math.atanh(-0) -> 0\n$({ target: 'Math', stat: true, forced: FORCED }, {\n  atanh: function atanh(x) {\n    var n = +x;\n    return n === 0 ? n : log1p(2 * n / (1 - n)) / 2;\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar sign = require('../internals/math-sign');\n\nvar abs = Math.abs;\nvar pow = Math.pow;\n\n// `Math.cbrt` method\n// https://tc39.es/ecma262/#sec-math.cbrt\n$({ target: 'Math', stat: true }, {\n  cbrt: function cbrt(x) {\n    var n = +x;\n    var y = sign(n) * pow(abs(n), 1 / 3);\n    // Newton-Raphson refinement for better precision\n    return n !== 0 && isFinite(n) ? (2 * y + n / (y * y)) / 3 : y;\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\n\nvar floor = Math.floor;\nvar log = Math.log;\nvar LOG2E = Math.LOG2E;\n\n// `Math.clz32` method\n// https://tc39.es/ecma262/#sec-math.clz32\n$({ target: 'Math', stat: true }, {\n  clz32: function clz32(x) {\n    var n = x >>> 0;\n    return n ? 31 - floor(log(n + 0.5) * LOG2E) : 32;\n  }\n});\n", "'use strict';\n// eslint-disable-next-line es/no-math-expm1 -- safe\nvar $expm1 = Math.expm1;\nvar exp = Math.exp;\n\n// `Math.expm1` method implementation\n// https://tc39.es/ecma262/#sec-math.expm1\nmodule.exports = (!$expm1\n  // Old FF bug\n  // eslint-disable-next-line no-loss-of-precision -- required for old engines\n  || $expm1(10) > 22025.465794806719 || $expm1(10) < 22025.4657948067165168\n  // Tor Browser bug\n  || $expm1(-2e-17) !== -2e-17\n) ? function expm1(x) {\n  var n = +x;\n  return n === 0 ? n : n > -1e-6 && n < 1e-6 ? n + n * n / 2 : exp(n) - 1;\n} : $expm1;\n", "'use strict';\nvar $ = require('../internals/export');\nvar expm1 = require('../internals/math-expm1');\n\n// eslint-disable-next-line es/no-math-cosh -- required for testing\nvar $cosh = Math.cosh;\nvar abs = Math.abs;\nvar E = Math.E;\n\nvar FORCED = !$cosh || $cosh(710) === Infinity;\n\n// `Math.cosh` method\n// https://tc39.es/ecma262/#sec-math.cosh\n$({ target: 'Math', stat: true, forced: FORCED }, {\n  cosh: function cosh(x) {\n    var t = expm1(abs(x) - 1) + 1;\n    return (t + 1 / (t * E * E)) * (E / 2);\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar expm1 = require('../internals/math-expm1');\n\n// `Math.expm1` method\n// https://tc39.es/ecma262/#sec-math.expm1\n// eslint-disable-next-line es/no-math-expm1 -- required for testing\n$({ target: 'Math', stat: true, forced: expm1 !== Math.expm1 }, { expm1: expm1 });\n", "'use strict';\nvar $ = require('../internals/export');\nvar fround = require('../internals/math-fround');\n\n// `Math.fround` method\n// https://tc39.es/ecma262/#sec-math.fround\n$({ target: 'Math', stat: true }, { fround: fround });\n", "'use strict';\nvar $ = require('../internals/export');\nvar floatRound = require('../internals/math-float-round');\n\nvar FLOAT16_EPSILON = 0.0009765625;\nvar FLOAT16_MAX_VALUE = 65504;\nvar FLOAT16_MIN_VALUE = 6.103515625e-05;\n\n// `Math.f16round` method\n// https://tc39.es/ecma262/#sec-math.f16round\n$({ target: 'Math', stat: true }, {\n  f16round: function f16round(x) {\n    return floatRound(x, FLOAT16_EPSILON, FLOAT16_MAX_VALUE, FLOAT16_MIN_VALUE);\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\n\n// eslint-disable-next-line es/no-math-hypot -- required for testing\nvar $hypot = Math.hypot;\nvar abs = Math.abs;\nvar sqrt = Math.sqrt;\n\n// Chrome 77 bug\n// https://bugs.chromium.org/p/v8/issues/detail?id=9546\nvar FORCED = !!$hypot && $hypot(Infinity, NaN) !== Infinity;\n\n// `Math.hypot` method\n// https://tc39.es/ecma262/#sec-math.hypot\n$({ target: 'Math', stat: true, arity: 2, forced: FORCED }, {\n  // eslint-disable-next-line no-unused-vars -- required for `.length`\n  hypot: function hypot(value1, value2) {\n    var sum = 0;\n    var i = 0;\n    var aLen = arguments.length;\n    var larg = 0;\n    var arg, div;\n    while (i < aLen) {\n      arg = abs(arguments[i++]);\n      if (larg < arg) {\n        div = larg / arg;\n        sum = sum * div * div + 1;\n        larg = arg;\n      } else if (arg > 0) {\n        div = arg / larg;\n        sum += div * div;\n      } else sum += arg;\n    }\n    return larg === Infinity ? Infinity : larg * sqrt(sum);\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar fails = require('../internals/fails');\n\n// eslint-disable-next-line es/no-math-imul -- required for testing\nvar $imul = Math.imul;\n\nvar FORCED = fails(function () {\n  return $imul(0xFFFFFFFF, 5) !== -5 || $imul.length !== 2;\n});\n\n// `Math.imul` method\n// https://tc39.es/ecma262/#sec-math.imul\n// some WebKit versions fails with big numbers, some has wrong arity\n$({ target: 'Math', stat: true, forced: FORCED }, {\n  imul: function imul(x, y) {\n    var UINT16 = 0xFFFF;\n    var xn = +x;\n    var yn = +y;\n    var xl = UINT16 & xn;\n    var yl = UINT16 & yn;\n    return 0 | xl * yl + ((UINT16 & xn >>> 16) * yl + xl * (UINT16 & yn >>> 16) << 16 >>> 0);\n  }\n});\n", "'use strict';\nvar log = Math.log;\nvar LOG10E = Math.LOG10E;\n\n// eslint-disable-next-line es/no-math-log10 -- safe\nmodule.exports = Math.log10 || function log10(x) {\n  return log(x) * LOG10E;\n};\n", "'use strict';\nvar $ = require('../internals/export');\nvar log10 = require('../internals/math-log10');\n\n// `Math.log10` method\n// https://tc39.es/ecma262/#sec-math.log10\n$({ target: 'Math', stat: true }, {\n  log10: log10\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar log1p = require('../internals/math-log1p');\n\n// `Math.log1p` method\n// https://tc39.es/ecma262/#sec-math.log1p\n$({ target: 'Math', stat: true }, { log1p: log1p });\n", "'use strict';\nvar $ = require('../internals/export');\nvar log2 = require('../internals/math-log2');\n\n// `Math.log2` method\n// https://tc39.es/ecma262/#sec-math.log2\n$({ target: 'Math', stat: true }, {\n  log2: log2\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar sign = require('../internals/math-sign');\n\n// `Math.sign` method\n// https://tc39.es/ecma262/#sec-math.sign\n$({ target: 'Math', stat: true }, {\n  sign: sign\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar fails = require('../internals/fails');\nvar expm1 = require('../internals/math-expm1');\n\nvar abs = Math.abs;\nvar exp = Math.exp;\nvar E = Math.E;\n\nvar FORCED = fails(function () {\n  // eslint-disable-next-line es/no-math-sinh -- required for testing\n  return Math.sinh(-2e-17) !== -2e-17;\n});\n\n// `Math.sinh` method\n// https://tc39.es/ecma262/#sec-math.sinh\n// V8 near Chromium 38 has a problem with very small numbers\n$({ target: 'Math', stat: true, forced: FORCED }, {\n  sinh: function sinh(x) {\n    var n = +x;\n    return abs(n) < 1 ? (expm1(n) - expm1(-n)) / 2 : (exp(n - 1) - exp(-n - 1)) * (E / 2);\n  }\n});\n", "'use strict';\n// based on Shewchuk's algorithm for exactly floating point addition\n// adapted from https://github.com/tc39/proposal-math-sum/blob/3513d58323a1ae25560e8700aa5294500c6c9287/polyfill/polyfill.mjs\nvar $ = require('../internals/export');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar iterate = require('../internals/iterate');\n\nvar $RangeError = RangeError;\nvar $TypeError = TypeError;\nvar $Infinity = Infinity;\nvar $NaN = NaN;\nvar abs = Math.abs;\nvar pow = Math.pow;\nvar push = uncurryThis([].push);\n\nvar POW_2_1023 = pow(2, 1023);\nvar MAX_SAFE_INTEGER = pow(2, 53) - 1; // 2 ** 53 - 1 === 9007199254740991\nvar MAX_DOUBLE = Number.MAX_VALUE; // 2 ** 1024 - 2 ** (1023 - 52) === 1.79769313486231570815e+308\nvar MAX_ULP = pow(2, 971); // 2 ** (1023 - 52) === 1.99584030953471981166e+292\n\nvar NOT_A_NUMBER = {};\nvar MINUS_INFINITY = {};\nvar PLUS_INFINITY = {};\nvar MINUS_ZERO = {};\nvar FINITE = {};\n\n// prerequisite: abs(x) >= abs(y)\nvar twosum = function (x, y) {\n  var hi = x + y;\n  var lo = y - (hi - x);\n  return { hi: hi, lo: lo };\n};\n\n// `Math.sumPrecise` method\n// https://tc39.es/ecma262/#sec-math.sumprecise\n$({ target: 'Math', stat: true }, {\n  // eslint-disable-next-line max-statements -- ok\n  sumPrecise: function sumPrecise(items) {\n    var numbers = [];\n    var count = 0;\n    var state = MINUS_ZERO;\n\n    iterate(items, function (n) {\n      if (++count > MAX_SAFE_INTEGER) throw new $RangeError('Maximum allowed index exceeded');\n      if (typeof n != 'number') throw new $TypeError('Value is not a number');\n      if (state !== NOT_A_NUMBER) {\n        // eslint-disable-next-line no-self-compare -- NaN check\n        if (n !== n) state = NOT_A_NUMBER;\n        else if (n === $Infinity) state = state === MINUS_INFINITY ? NOT_A_NUMBER : PLUS_INFINITY;\n        else if (n === -$Infinity) state = state === PLUS_INFINITY ? NOT_A_NUMBER : MINUS_INFINITY;\n        else if ((n !== 0 || (1 / n) === $Infinity) && (state === MINUS_ZERO || state === FINITE)) {\n          state = FINITE;\n          push(numbers, n);\n        }\n      }\n    });\n\n    switch (state) {\n      case NOT_A_NUMBER: return $NaN;\n      case MINUS_INFINITY: return -$Infinity;\n      case PLUS_INFINITY: return $Infinity;\n      case MINUS_ZERO: return -0;\n    }\n\n    var partials = [];\n    var overflow = 0; // conceptually 2 ** 1024 times this value; the final partial is biased by this amount\n    var x, y, sum, hi, lo, tmp;\n\n    for (var i = 0; i < numbers.length; i++) {\n      x = numbers[i];\n      var actuallyUsedPartials = 0;\n      for (var j = 0; j < partials.length; j++) {\n        y = partials[j];\n        if (abs(x) < abs(y)) {\n          tmp = x;\n          x = y;\n          y = tmp;\n        }\n        sum = twosum(x, y);\n        hi = sum.hi;\n        lo = sum.lo;\n        if (abs(hi) === $Infinity) {\n          var sign = hi === $Infinity ? 1 : -1;\n          overflow += sign;\n\n          x = (x - (sign * POW_2_1023)) - (sign * POW_2_1023);\n          if (abs(x) < abs(y)) {\n            tmp = x;\n            x = y;\n            y = tmp;\n          }\n          sum = twosum(x, y);\n          hi = sum.hi;\n          lo = sum.lo;\n        }\n        if (lo !== 0) partials[actuallyUsedPartials++] = lo;\n        x = hi;\n      }\n      partials.length = actuallyUsedPartials;\n      if (x !== 0) push(partials, x);\n    }\n\n    // compute the exact sum of partials, stopping once we lose precision\n    var n = partials.length - 1;\n    hi = 0;\n    lo = 0;\n\n    if (overflow !== 0) {\n      var next = n >= 0 ? partials[n] : 0;\n      n--;\n      if (abs(overflow) > 1 || (overflow > 0 && next > 0) || (overflow < 0 && next < 0)) {\n        return overflow > 0 ? $Infinity : -$Infinity;\n      }\n      // here we actually have to do the arithmetic\n      // drop a factor of 2 so we can do it without overflow\n      // assert(abs(overflow) === 1)\n      sum = twosum(overflow * POW_2_1023, next / 2);\n      hi = sum.hi;\n      lo = sum.lo;\n      lo *= 2;\n      if (abs(2 * hi) === $Infinity) {\n        // rounding to the maximum value\n        if (hi > 0) {\n          return (hi === POW_2_1023 && lo === -(MAX_ULP / 2) && n >= 0 && partials[n] < 0) ? MAX_DOUBLE : $Infinity;\n        } return (hi === -POW_2_1023 && lo === (MAX_ULP / 2) && n >= 0 && partials[n] > 0) ? -MAX_DOUBLE : -$Infinity;\n      }\n\n      if (lo !== 0) {\n        partials[++n] = lo;\n        lo = 0;\n      }\n\n      hi *= 2;\n    }\n\n    while (n >= 0) {\n      sum = twosum(hi, partials[n--]);\n      hi = sum.hi;\n      lo = sum.lo;\n      if (lo !== 0) break;\n    }\n\n    if (n >= 0 && ((lo < 0 && partials[n] < 0) || (lo > 0 && partials[n] > 0))) {\n      y = lo * 2;\n      x = hi + y;\n      if (y === x - hi) hi = x;\n    }\n\n    return hi;\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar expm1 = require('../internals/math-expm1');\n\nvar exp = Math.exp;\n\n// `Math.tanh` method\n// https://tc39.es/ecma262/#sec-math.tanh\n$({ target: 'Math', stat: true }, {\n  tanh: function tanh(x) {\n    var n = +x;\n    var a = expm1(n);\n    var b = expm1(-n);\n    return a === Infinity ? 1 : b === Infinity ? -1 : (a - b) / (exp(n) + exp(-n));\n  }\n});\n", "'use strict';\nvar setToStringTag = require('../internals/set-to-string-tag');\n\n// Math[@@toStringTag] property\n// https://tc39.es/ecma262/#sec-math-@@tostringtag\nsetToStringTag(Math, 'Math', true);\n", "'use strict';\nvar $ = require('../internals/export');\nvar trunc = require('../internals/math-trunc');\n\n// `Math.trunc` method\n// https://tc39.es/ecma262/#sec-math.trunc\n$({ target: 'Math', stat: true }, {\n  trunc: trunc\n});\n", "'use strict';\n// a string of all valid unicode whitespaces\nmodule.exports = '\\u0009\\u000A\\u000B\\u000C\\u000D\\u0020\\u00A0\\u1680\\u2000\\u2001\\u2002' +\n  '\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF';\n", "'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar toString = require('../internals/to-string');\nvar whitespaces = require('../internals/whitespaces');\n\nvar replace = uncurryThis(''.replace);\nvar ltrim = RegExp('^[' + whitespaces + ']+');\nvar rtrim = RegExp('(^|[^' + whitespaces + '])[' + whitespaces + ']+$');\n\n// `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation\nvar createMethod = function (TYPE) {\n  return function ($this) {\n    var string = toString(requireObjectCoercible($this));\n    if (TYPE & 1) string = replace(string, ltrim, '');\n    if (TYPE & 2) string = replace(string, rtrim, '$1');\n    return string;\n  };\n};\n\nmodule.exports = {\n  // `String.prototype.{ trimLeft, trimStart }` methods\n  // https://tc39.es/ecma262/#sec-string.prototype.trimstart\n  start: createMethod(1),\n  // `String.prototype.{ trimRight, trimEnd }` methods\n  // https://tc39.es/ecma262/#sec-string.prototype.trimend\n  end: createMethod(2),\n  // `String.prototype.trim` method\n  // https://tc39.es/ecma262/#sec-string.prototype.trim\n  trim: createMethod(3)\n};\n", "'use strict';\nvar $ = require('../internals/export');\nvar IS_PURE = require('../internals/is-pure');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar globalThis = require('../internals/global-this');\nvar path = require('../internals/path');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar isForced = require('../internals/is-forced');\nvar hasOwn = require('../internals/has-own-property');\nvar inheritIfRequired = require('../internals/inherit-if-required');\nvar isPrototypeOf = require('../internals/object-is-prototype-of');\nvar isSymbol = require('../internals/is-symbol');\nvar toPrimitive = require('../internals/to-primitive');\nvar fails = require('../internals/fails');\nvar getOwnPropertyNames = require('../internals/object-get-own-property-names').f;\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar defineProperty = require('../internals/object-define-property').f;\nvar thisNumberValue = require('../internals/this-number-value');\nvar trim = require('../internals/string-trim').trim;\n\nvar NUMBER = 'Number';\nvar NativeNumber = globalThis[NUMBER];\nvar PureNumberNamespace = path[NUMBER];\nvar NumberPrototype = NativeNumber.prototype;\nvar TypeError = globalThis.TypeError;\nvar stringSlice = uncurryThis(''.slice);\nvar charCodeAt = uncurryThis(''.charCodeAt);\n\n// `ToNumeric` abstract operation\n// https://tc39.es/ecma262/#sec-tonumeric\nvar toNumeric = function (value) {\n  var primValue = toPrimitive(value, 'number');\n  return typeof primValue == 'bigint' ? primValue : toNumber(primValue);\n};\n\n// `ToNumber` abstract operation\n// https://tc39.es/ecma262/#sec-tonumber\nvar toNumber = function (argument) {\n  var it = toPrimitive(argument, 'number');\n  var first, third, radix, maxCode, digits, length, index, code;\n  if (isSymbol(it)) throw new TypeError('Cannot convert a Symbol value to a number');\n  if (typeof it == 'string' && it.length > 2) {\n    it = trim(it);\n    first = charCodeAt(it, 0);\n    if (first === 43 || first === 45) {\n      third = charCodeAt(it, 2);\n      if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix\n    } else if (first === 48) {\n      switch (charCodeAt(it, 1)) {\n        // fast equal of /^0b[01]+$/i\n        case 66:\n        case 98:\n          radix = 2;\n          maxCode = 49;\n          break;\n        // fast equal of /^0o[0-7]+$/i\n        case 79:\n        case 111:\n          radix = 8;\n          maxCode = 55;\n          break;\n        default:\n          return +it;\n      }\n      digits = stringSlice(it, 2);\n      length = digits.length;\n      for (index = 0; index < length; index++) {\n        code = charCodeAt(digits, index);\n        // parseInt parses a string to a first unavailable symbol\n        // but ToNumber should return NaN if a string contains unavailable symbols\n        if (code < 48 || code > maxCode) return NaN;\n      } return parseInt(digits, radix);\n    }\n  } return +it;\n};\n\nvar FORCED = isForced(NUMBER, !NativeNumber(' 0o1') || !NativeNumber('0b1') || NativeNumber('+0x1'));\n\nvar calledWithNew = function (dummy) {\n  // includes check on 1..constructor(foo) case\n  return isPrototypeOf(NumberPrototype, dummy) && fails(function () { thisNumberValue(dummy); });\n};\n\n// `Number` constructor\n// https://tc39.es/ecma262/#sec-number-constructor\nvar NumberWrapper = function Number(value) {\n  var n = arguments.length < 1 ? 0 : NativeNumber(toNumeric(value));\n  return calledWithNew(this) ? inheritIfRequired(Object(n), this, NumberWrapper) : n;\n};\n\nNumberWrapper.prototype = NumberPrototype;\nif (FORCED && !IS_PURE) NumberPrototype.constructor = NumberWrapper;\n\n$({ global: true, constructor: true, wrap: true, forced: FORCED }, {\n  Number: NumberWrapper\n});\n\n// Use `internal/copy-constructor-properties` helper in `core-js@4`\nvar copyConstructorProperties = function (target, source) {\n  for (var keys = DESCRIPTORS ? getOwnPropertyNames(source) : (\n    // ES3:\n    'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +\n    // ES2015 (in case, if modules with ES2015 Number statics required before):\n    'EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,' +\n    // ESNext\n    'fromString,range'\n  ).split(','), j = 0, key; keys.length > j; j++) {\n    if (hasOwn(source, key = keys[j]) && !hasOwn(target, key)) {\n      defineProperty(target, key, getOwnPropertyDescriptor(source, key));\n    }\n  }\n};\n\nif (IS_PURE && PureNumberNamespace) copyConstructorProperties(path[NUMBER], PureNumberNamespace);\nif (FORCED || IS_PURE) copyConstructorProperties(path[NUMBER], NativeNumber);\n", "'use strict';\nvar $ = require('../internals/export');\n\n// `Number.EPSILON` constant\n// https://tc39.es/ecma262/#sec-number.epsilon\n$({ target: 'Number', stat: true, nonConfigurable: true, nonWritable: true }, {\n  EPSILON: Math.pow(2, -52)\n});\n", "'use strict';\nvar globalThis = require('../internals/global-this');\n\nvar globalIsFinite = globalThis.isFinite;\n\n// `Number.isFinite` method\n// https://tc39.es/ecma262/#sec-number.isfinite\n// eslint-disable-next-line es/no-number-isfinite -- safe\nmodule.exports = Number.isFinite || function isFinite(it) {\n  return typeof it == 'number' && globalIsFinite(it);\n};\n", "'use strict';\nvar $ = require('../internals/export');\nvar numberIsFinite = require('../internals/number-is-finite');\n\n// `Number.isFinite` method\n// https://tc39.es/ecma262/#sec-number.isfinite\n$({ target: 'Number', stat: true }, { isFinite: numberIsFinite });\n", "'use strict';\nvar isObject = require('../internals/is-object');\n\nvar floor = Math.floor;\n\n// `IsIntegralNumber` abstract operation\n// https://tc39.es/ecma262/#sec-isintegralnumber\n// eslint-disable-next-line es/no-number-isinteger -- safe\nmodule.exports = Number.isInteger || function isInteger(it) {\n  return !isObject(it) && isFinite(it) && floor(it) === it;\n};\n", "'use strict';\nvar $ = require('../internals/export');\nvar isIntegralNumber = require('../internals/is-integral-number');\n\n// `Number.isInteger` method\n// https://tc39.es/ecma262/#sec-number.isinteger\n$({ target: 'Number', stat: true }, {\n  isInteger: isIntegralNumber\n});\n", "'use strict';\nvar $ = require('../internals/export');\n\n// `Number.isNaN` method\n// https://tc39.es/ecma262/#sec-number.isnan\n$({ target: 'Number', stat: true }, {\n  isNaN: function isNaN(number) {\n    // eslint-disable-next-line no-self-compare -- NaN check\n    return number !== number;\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar isIntegralNumber = require('../internals/is-integral-number');\n\nvar abs = Math.abs;\n\n// `Number.isSafeInteger` method\n// https://tc39.es/ecma262/#sec-number.issafeinteger\n$({ target: 'Number', stat: true }, {\n  isSafeInteger: function isSafeInteger(number) {\n    return isIntegralNumber(number) && abs(number) <= 0x1FFFFFFFFFFFFF;\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\n\n// `Number.MAX_SAFE_INTEGER` constant\n// https://tc39.es/ecma262/#sec-number.max_safe_integer\n$({ target: 'Number', stat: true, nonConfigurable: true, nonWritable: true }, {\n  MAX_SAFE_INTEGER: 0x1FFFFFFFFFFFFF\n});\n", "'use strict';\nvar $ = require('../internals/export');\n\n// `Number.MIN_SAFE_INTEGER` constant\n// https://tc39.es/ecma262/#sec-number.min_safe_integer\n$({ target: 'Number', stat: true, nonConfigurable: true, nonWritable: true }, {\n  MIN_SAFE_INTEGER: -0x1FFFFFFFFFFFFF\n});\n", "'use strict';\nvar globalThis = require('../internals/global-this');\nvar fails = require('../internals/fails');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar toString = require('../internals/to-string');\nvar trim = require('../internals/string-trim').trim;\nvar whitespaces = require('../internals/whitespaces');\n\nvar charAt = uncurryThis(''.charAt);\nvar $parseFloat = globalThis.parseFloat;\nvar Symbol = globalThis.Symbol;\nvar ITERATOR = Symbol && Symbol.iterator;\nvar FORCED = 1 / $parseFloat(whitespaces + '-0') !== -Infinity\n  // MS Edge 18- broken with boxed symbols\n  || (ITERATOR && !fails(function () { $parseFloat(Object(ITERATOR)); }));\n\n// `parseFloat` method\n// https://tc39.es/ecma262/#sec-parsefloat-string\nmodule.exports = FORCED ? function parseFloat(string) {\n  var trimmedString = trim(toString(string));\n  var result = $parseFloat(trimmedString);\n  return result === 0 && charAt(trimmedString, 0) === '-' ? -0 : result;\n} : $parseFloat;\n", "'use strict';\nvar $ = require('../internals/export');\nvar parseFloat = require('../internals/number-parse-float');\n\n// `Number.parseFloat` method\n// https://tc39.es/ecma262/#sec-number.parseFloat\n// eslint-disable-next-line es/no-number-parsefloat -- required for testing\n$({ target: 'Number', stat: true, forced: Number.parseFloat !== parseFloat }, {\n  parseFloat: parseFloat\n});\n", "'use strict';\nvar globalThis = require('../internals/global-this');\nvar fails = require('../internals/fails');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar toString = require('../internals/to-string');\nvar trim = require('../internals/string-trim').trim;\nvar whitespaces = require('../internals/whitespaces');\n\nvar $parseInt = globalThis.parseInt;\nvar Symbol = globalThis.Symbol;\nvar ITERATOR = Symbol && Symbol.iterator;\nvar hex = /^[+-]?0x/i;\nvar exec = uncurryThis(hex.exec);\nvar FORCED = $parseInt(whitespaces + '08') !== 8 || $parseInt(whitespaces + '0x16') !== 22\n  // MS Edge 18- broken with boxed symbols\n  || (ITERATOR && !fails(function () { $parseInt(Object(ITERATOR)); }));\n\n// `parseInt` method\n// https://tc39.es/ecma262/#sec-parseint-string-radix\nmodule.exports = FORCED ? function parseInt(string, radix) {\n  var S = trim(toString(string));\n  return $parseInt(S, (radix >>> 0) || (exec(hex, S) ? 16 : 10));\n} : $parseInt;\n", "'use strict';\nvar $ = require('../internals/export');\nvar parseInt = require('../internals/number-parse-int');\n\n// `Number.parseInt` method\n// https://tc39.es/ecma262/#sec-number.parseint\n// eslint-disable-next-line es/no-number-parseint -- required for testing\n$({ target: 'Number', stat: true, forced: Number.parseInt !== parseInt }, {\n  parseInt: parseInt\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\nvar thisNumberValue = require('../internals/this-number-value');\nvar $repeat = require('../internals/string-repeat');\nvar log10 = require('../internals/math-log10');\nvar fails = require('../internals/fails');\n\nvar $RangeError = RangeError;\nvar $String = String;\nvar $isFinite = isFinite;\nvar abs = Math.abs;\nvar floor = Math.floor;\nvar pow = Math.pow;\nvar round = Math.round;\nvar nativeToExponential = uncurryThis(1.1.toExponential);\nvar repeat = uncurryThis($repeat);\nvar stringSlice = uncurryThis(''.slice);\n\nvar POW_10_308 = pow(10, 308);\n\n// Edge 17-\nvar ROUNDS_PROPERLY = nativeToExponential(-6.9e-11, 4) === '-6.9000e-11'\n  // IE11- && Edge 14-\n  && nativeToExponential(1.255, 2) === '1.25e+0'\n  // FF86-, V8 ~ Chrome 49-50\n  && nativeToExponential(12345, 3) === '1.235e+4'\n  // FF86-, V8 ~ Chrome 49-50\n  && nativeToExponential(25, 0) === '3e+1';\n\n// IE8-\nvar throwsOnInfinityFraction = function () {\n  return fails(function () {\n    nativeToExponential(1, Infinity);\n  }) && fails(function () {\n    nativeToExponential(1, -Infinity);\n  });\n};\n\n// Safari <11 && FF <50\nvar properNonFiniteThisCheck = function () {\n  return !fails(function () {\n    nativeToExponential(Infinity, Infinity);\n    nativeToExponential(NaN, Infinity);\n  });\n};\n\nvar FORCED = !ROUNDS_PROPERLY || !throwsOnInfinityFraction() || !properNonFiniteThisCheck();\n\n// `Number.prototype.toExponential` method\n// https://tc39.es/ecma262/#sec-number.prototype.toexponential\n$({ target: 'Number', proto: true, forced: FORCED }, {\n  toExponential: function toExponential(fractionDigits) {\n    var x = thisNumberValue(this);\n    if (fractionDigits === undefined) return nativeToExponential(x);\n    var f = toIntegerOrInfinity(fractionDigits);\n    if (!$isFinite(x)) return String(x);\n    // TODO: ES2018 increased the maximum number of fraction digits to 100, need to improve the implementation\n    if (f < 0 || f > 20) throw new $RangeError('Incorrect fraction digits');\n    if (ROUNDS_PROPERLY) return nativeToExponential(x, f);\n    var s = '';\n    var m, e, c, d, l, n, xScaled;\n    if (x < 0) {\n      s = '-';\n      x = -x;\n    }\n    if (x === 0) {\n      e = 0;\n      m = repeat('0', f + 1);\n    } else {\n      // TODO: improve accuracy with big fraction digits\n      l = log10(x);\n      e = floor(l);\n      // compute x / pow(10, e - f) and round, avoiding underflow/overflow\n      if (f - e >= 308) {\n        // pow(10, e - f) would underflow to a subnormal or zero; split computation\n        xScaled = x * POW_10_308 * pow(10, f - e - 308);\n      } else {\n        xScaled = x / pow(10, e - f);\n      }\n      n = round(xScaled);\n      // correct tie-breaking: round half up\n      // avoids `2 * x` overflow for values near MAX_VALUE\n      if (xScaled - n >= 0.5) {\n        n += 1;\n      }\n      if (n >= pow(10, f + 1)) {\n        n /= 10;\n        e += 1;\n      }\n      m = $String(n);\n    }\n    if (f !== 0) {\n      m = stringSlice(m, 0, 1) + '.' + stringSlice(m, 1);\n    }\n    if (e === 0) {\n      c = '+';\n      d = '0';\n    } else {\n      c = e > 0 ? '+' : '-';\n      d = $String(abs(e));\n    }\n    m += 'e' + c + d;\n    return s + m;\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\nvar thisNumberValue = require('../internals/this-number-value');\nvar $repeat = require('../internals/string-repeat');\nvar fails = require('../internals/fails');\n\nvar $RangeError = RangeError;\nvar $String = String;\nvar floor = Math.floor;\nvar repeat = uncurryThis($repeat);\nvar stringSlice = uncurryThis(''.slice);\nvar nativeToFixed = uncurryThis(1.1.toFixed);\n\nvar pow = function (x, n, acc) {\n  return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc);\n};\n\nvar log = function (x) {\n  var n = 0;\n  var x2 = x;\n  while (x2 >= 4096) {\n    n += 12;\n    x2 /= 4096;\n  }\n  while (x2 >= 2) {\n    n += 1;\n    x2 /= 2;\n  } return n;\n};\n\nvar multiply = function (data, n, c) {\n  var index = -1;\n  var c2 = c;\n  while (++index < 6) {\n    c2 += n * data[index];\n    data[index] = c2 % 1e7;\n    c2 = floor(c2 / 1e7);\n  }\n};\n\nvar divide = function (data, n) {\n  var index = 6;\n  var c = 0;\n  while (--index >= 0) {\n    c += data[index];\n    data[index] = floor(c / n);\n    c = (c % n) * 1e7;\n  }\n};\n\nvar dataToString = function (data) {\n  var index = 6;\n  var s = '';\n  while (--index >= 0) {\n    if (s !== '' || index === 0 || data[index] !== 0) {\n      var t = $String(data[index]);\n      s = s === '' ? t : s + repeat('0', 7 - t.length) + t;\n    }\n  } return s;\n};\n\nvar FORCED = fails(function () {\n  return nativeToFixed(0.00008, 3) !== '0.000' ||\n    nativeToFixed(0.9, 0) !== '1' ||\n    nativeToFixed(1.255, 2) !== '1.25' ||\n    nativeToFixed(1000000000000000128.0, 0) !== '1000000000000000128';\n}) || !fails(function () {\n  // V8 ~ Android 4.3-\n  nativeToFixed({});\n});\n\n// `Number.prototype.toFixed` method\n// https://tc39.es/ecma262/#sec-number.prototype.tofixed\n$({ target: 'Number', proto: true, forced: FORCED }, {\n  toFixed: function toFixed(fractionDigits) {\n    var number = thisNumberValue(this);\n    var fractDigits = toIntegerOrInfinity(fractionDigits);\n    var data = [0, 0, 0, 0, 0, 0];\n    var sign = '';\n    var result = '0';\n    var e, z, j, k;\n\n    // TODO: ES2018 increased the maximum number of fraction digits to 100, need to improve the implementation\n    if (fractDigits < 0 || fractDigits > 20) throw new $RangeError('Incorrect fraction digits');\n    // eslint-disable-next-line no-self-compare -- NaN check\n    if (number !== number) return 'NaN';\n    if (number <= -1e21 || number >= 1e21) return $String(number);\n    if (number < 0) {\n      sign = '-';\n      number = -number;\n    }\n    if (number > 1e-21) {\n      e = log(number * pow(2, 69, 1)) - 69;\n      z = e < 0 ? number * pow(2, -e, 1) : number / pow(2, e, 1);\n      z *= 0x10000000000000;\n      e = 52 - e;\n      if (e > 0) {\n        multiply(data, 0, z);\n        j = fractDigits;\n        while (j >= 7) {\n          multiply(data, 1e7, 0);\n          j -= 7;\n        }\n        multiply(data, pow(10, j, 1), 0);\n        j = e - 1;\n        while (j >= 23) {\n          divide(data, 1 << 23);\n          j -= 23;\n        }\n        divide(data, 1 << j);\n        multiply(data, 1, 1);\n        divide(data, 2);\n        result = dataToString(data);\n      } else {\n        multiply(data, 0, z);\n        multiply(data, 1 << -e, 0);\n        result = dataToString(data) + repeat('0', fractDigits);\n      }\n    }\n    if (fractDigits > 0) {\n      k = result.length;\n      result = sign + (k <= fractDigits\n        ? '0.' + repeat('0', fractDigits - k) + result\n        : stringSlice(result, 0, k - fractDigits) + '.' + stringSlice(result, k - fractDigits));\n    } else {\n      result = sign + result;\n    } return result;\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar fails = require('../internals/fails');\nvar thisNumberValue = require('../internals/this-number-value');\n\nvar nativeToPrecision = uncurryThis(1.1.toPrecision);\n\nvar FORCED = fails(function () {\n  // IE7-\n  return nativeToPrecision(1, undefined) !== '1';\n}) || !fails(function () {\n  // V8 ~ Android 4.3-\n  nativeToPrecision({});\n});\n\n// `Number.prototype.toPrecision` method\n// https://tc39.es/ecma262/#sec-number.prototype.toprecision\n$({ target: 'Number', proto: true, forced: FORCED }, {\n  toPrecision: function toPrecision(precision) {\n    return precision === undefined\n      ? nativeToPrecision(thisNumberValue(this))\n      : nativeToPrecision(thisNumberValue(this), precision);\n  }\n});\n", "'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar call = require('../internals/function-call');\nvar fails = require('../internals/fails');\nvar objectKeys = require('../internals/object-keys');\nvar getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\nvar toObject = require('../internals/to-object');\nvar IndexedObject = require('../internals/indexed-object');\n\n// eslint-disable-next-line es/no-object-assign -- safe\nvar $assign = Object.assign;\n// eslint-disable-next-line es/no-object-defineproperty -- required for testing\nvar defineProperty = Object.defineProperty;\nvar concat = uncurryThis([].concat);\n\n// `Object.assign` method\n// https://tc39.es/ecma262/#sec-object.assign\nmodule.exports = !$assign || fails(function () {\n  // should have correct order of operations (Edge bug)\n  if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {\n    enumerable: true,\n    get: function () {\n      defineProperty(this, 'b', {\n        value: 3,\n        enumerable: false\n      });\n    }\n  }), { b: 2 })).b !== 1) return true;\n  // should work with symbols and should have deterministic property order (V8 bug)\n  var A = {};\n  var B = {};\n  // eslint-disable-next-line es/no-symbol -- safe\n  var symbol = Symbol('assign detection');\n  var alphabet = 'abcdefghijklmnopqrst';\n  A[symbol] = 7;\n  // eslint-disable-next-line es/no-array-prototype-foreach -- safe\n  alphabet.split('').forEach(function (chr) { B[chr] = chr; });\n  return $assign({}, A)[symbol] !== 7 || objectKeys($assign({}, B)).join('') !== alphabet;\n}) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`\n  var T = toObject(target);\n  var argumentsLength = arguments.length;\n  var index = 1;\n  var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;\n  var propertyIsEnumerable = propertyIsEnumerableModule.f;\n  while (argumentsLength > index) {\n    var S = IndexedObject(arguments[index++]);\n    var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);\n    var length = keys.length;\n    var j = 0;\n    var key;\n    while (length > j) {\n      key = keys[j++];\n      if (!DESCRIPTORS || call(propertyIsEnumerable, S, key)) T[key] = S[key];\n    }\n  } return T;\n} : $assign;\n", "'use strict';\nvar $ = require('../internals/export');\nvar assign = require('../internals/object-assign');\n\n// `Object.assign` method\n// https://tc39.es/ecma262/#sec-object.assign\n// eslint-disable-next-line es/no-object-assign -- required for testing\n$({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {\n  assign: assign\n});\n", "'use strict';\n// TODO: Remove from `core-js@4`\nvar $ = require('../internals/export');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar create = require('../internals/object-create');\n\n// `Object.create` method\n// https://tc39.es/ecma262/#sec-object.create\n$({ target: 'Object', stat: true, sham: !DESCRIPTORS }, {\n  create: create\n});\n", "'use strict';\n/* eslint-disable no-undef, no-useless-call, sonarjs/no-reference-error -- required for testing */\n/* eslint-disable es/no-legacy-object-prototype-accessor-methods -- required for testing */\nvar IS_PURE = require('../internals/is-pure');\nvar globalThis = require('../internals/global-this');\nvar fails = require('../internals/fails');\nvar WEBKIT = require('../internals/environment-webkit-version');\n\n// Forced replacement object prototype accessors methods\nmodule.exports = IS_PURE || !fails(function () {\n  // This feature detection crashes old WebKit\n  // https://github.com/zloirock/core-js/issues/232\n  if (WEBKIT && WEBKIT < 535) return;\n  var key = Math.random();\n  // In FF throws only define methods\n  __defineSetter__.call(null, key, function () { /* empty */ });\n  delete globalThis[key];\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar FORCED = require('../internals/object-prototype-accessors-forced');\nvar aCallable = require('../internals/a-callable');\nvar toObject = require('../internals/to-object');\nvar definePropertyModule = require('../internals/object-define-property');\n\n// `Object.prototype.__defineGetter__` method\n// https://tc39.es/ecma262/#sec-object.prototype.__defineGetter__\nif (DESCRIPTORS) {\n  $({ target: 'Object', proto: true, forced: FORCED }, {\n    __defineGetter__: function __defineGetter__(P, getter) {\n      definePropertyModule.f(toObject(this), P, { get: aCallable(getter), enumerable: true, configurable: true });\n    }\n  });\n}\n", "'use strict';\nvar $ = require('../internals/export');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar defineProperties = require('../internals/object-define-properties').f;\n\n// `Object.defineProperties` method\n// https://tc39.es/ecma262/#sec-object.defineproperties\n// eslint-disable-next-line es/no-object-defineproperties -- safe\n$({ target: 'Object', stat: true, forced: Object.defineProperties !== defineProperties, sham: !DESCRIPTORS }, {\n  defineProperties: defineProperties\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar defineProperty = require('../internals/object-define-property').f;\n\n// `Object.defineProperty` method\n// https://tc39.es/ecma262/#sec-object.defineproperty\n// eslint-disable-next-line es/no-object-defineproperty -- safe\n$({ target: 'Object', stat: true, forced: Object.defineProperty !== defineProperty, sham: !DESCRIPTORS }, {\n  defineProperty: defineProperty\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar FORCED = require('../internals/object-prototype-accessors-forced');\nvar aCallable = require('../internals/a-callable');\nvar toObject = require('../internals/to-object');\nvar definePropertyModule = require('../internals/object-define-property');\n\n// `Object.prototype.__defineSetter__` method\n// https://tc39.es/ecma262/#sec-object.prototype.__defineSetter__\nif (DESCRIPTORS) {\n  $({ target: 'Object', proto: true, forced: FORCED }, {\n    __defineSetter__: function __defineSetter__(P, setter) {\n      definePropertyModule.f(toObject(this), P, { set: aCallable(setter), enumerable: true, configurable: true });\n    }\n  });\n}\n", "'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar fails = require('../internals/fails');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar objectGetPrototypeOf = require('../internals/object-get-prototype-of');\nvar objectKeys = require('../internals/object-keys');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar $propertyIsEnumerable = require('../internals/object-property-is-enumerable').f;\n\nvar propertyIsEnumerable = uncurryThis($propertyIsEnumerable);\nvar push = uncurryThis([].push);\n\n// in some IE versions, `propertyIsEnumerable` returns incorrect result on integer keys\n// of `null` prototype objects\nvar IE_BUG = DESCRIPTORS && fails(function () {\n  // eslint-disable-next-line es/no-object-create -- safe\n  var O = Object.create(null);\n  O[2] = 2;\n  return !propertyIsEnumerable(O, 2);\n});\n\n// `Object.{ entries, values }` methods implementation\nvar createMethod = function (TO_ENTRIES) {\n  return function (it) {\n    var O = toIndexedObject(it);\n    var keys = objectKeys(O);\n    var IE_WORKAROUND = IE_BUG && objectGetPrototypeOf(O) === null;\n    var length = keys.length;\n    var i = 0;\n    var result = [];\n    var key;\n    while (length > i) {\n      key = keys[i++];\n      if (!DESCRIPTORS || (IE_WORKAROUND ? key in O : propertyIsEnumerable(O, key))) {\n        push(result, TO_ENTRIES ? [key, O[key]] : O[key]);\n      }\n    }\n    return result;\n  };\n};\n\nmodule.exports = {\n  // `Object.entries` method\n  // https://tc39.es/ecma262/#sec-object.entries\n  entries: createMethod(true),\n  // `Object.values` method\n  // https://tc39.es/ecma262/#sec-object.values\n  values: createMethod(false)\n};\n", "'use strict';\nvar $ = require('../internals/export');\nvar $entries = require('../internals/object-to-array').entries;\n\n// `Object.entries` method\n// https://tc39.es/ecma262/#sec-object.entries\n$({ target: 'Object', stat: true }, {\n  entries: function entries(O) {\n    return $entries(O);\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar FREEZING = require('../internals/freezing');\nvar fails = require('../internals/fails');\nvar isObject = require('../internals/is-object');\nvar onFreeze = require('../internals/internal-metadata').onFreeze;\n\n// eslint-disable-next-line es/no-object-freeze -- safe\nvar $freeze = Object.freeze;\nvar FAILS_ON_PRIMITIVES = fails(function () { $freeze(1); });\n\n// `Object.freeze` method\n// https://tc39.es/ecma262/#sec-object.freeze\n$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !FREEZING }, {\n  freeze: function freeze(it) {\n    return $freeze && isObject(it) ? $freeze(onFreeze(it)) : it;\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar iterate = require('../internals/iterate');\nvar createProperty = require('../internals/create-property');\n\n// `Object.fromEntries` method\n// https://tc39.es/ecma262/#sec-object.fromentries\n$({ target: 'Object', stat: true }, {\n  fromEntries: function fromEntries(iterable) {\n    var obj = {};\n    iterate(iterable, function (k, v) {\n      createProperty(obj, k, v);\n    }, { AS_ENTRIES: true });\n    return obj;\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar fails = require('../internals/fails');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar nativeGetOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar DESCRIPTORS = require('../internals/descriptors');\n\nvar FORCED = !DESCRIPTORS || fails(function () { nativeGetOwnPropertyDescriptor(1); });\n\n// `Object.getOwnPropertyDescriptor` method\n// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor\n$({ target: 'Object', stat: true, forced: FORCED, sham: !DESCRIPTORS }, {\n  getOwnPropertyDescriptor: function getOwnPropertyDescriptor(it, key) {\n    return nativeGetOwnPropertyDescriptor(toIndexedObject(it), key);\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar ownKeys = require('../internals/own-keys');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar createProperty = require('../internals/create-property');\n\n// `Object.getOwnPropertyDescriptors` method\n// https://tc39.es/ecma262/#sec-object.getownpropertydescriptors\n$({ target: 'Object', stat: true, sham: !DESCRIPTORS }, {\n  getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) {\n    var O = toIndexedObject(object);\n    var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\n    var keys = ownKeys(O);\n    var result = {};\n    var index = 0;\n    var key, descriptor;\n    while (keys.length > index) {\n      descriptor = getOwnPropertyDescriptor(O, key = keys[index++]);\n      if (descriptor !== undefined) createProperty(result, key, descriptor);\n    }\n    return result;\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar fails = require('../internals/fails');\nvar getOwnPropertyNames = require('../internals/object-get-own-property-names-external').f;\n\n// eslint-disable-next-line es/no-object-getownpropertynames -- required for testing\nvar FAILS_ON_PRIMITIVES = fails(function () { return !Object.getOwnPropertyNames(1); });\n\n// `Object.getOwnPropertyNames` method\n// https://tc39.es/ecma262/#sec-object.getownpropertynames\n$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {\n  getOwnPropertyNames: getOwnPropertyNames\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar fails = require('../internals/fails');\nvar toObject = require('../internals/to-object');\nvar nativeGetPrototypeOf = require('../internals/object-get-prototype-of');\nvar CORRECT_PROTOTYPE_GETTER = require('../internals/correct-prototype-getter');\n\nvar FAILS_ON_PRIMITIVES = fails(function () { nativeGetPrototypeOf(1); });\n\n// `Object.getPrototypeOf` method\n// https://tc39.es/ecma262/#sec-object.getprototypeof\n$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !CORRECT_PROTOTYPE_GETTER }, {\n  getPrototypeOf: function getPrototypeOf(it) {\n    return nativeGetPrototypeOf(toObject(it));\n  }\n});\n\n", "'use strict';\nvar $ = require('../internals/export');\nvar createProperty = require('../internals/create-property');\nvar getBuiltIn = require('../internals/get-built-in');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar aCallable = require('../internals/a-callable');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar toPropertyKey = require('../internals/to-property-key');\nvar iterate = require('../internals/iterate');\nvar doesNotExceedSafeInteger = require('../internals/does-not-exceed-safe-integer');\nvar fails = require('../internals/fails');\n\n// eslint-disable-next-line es/no-object-groupby -- testing\nvar nativeGroupBy = Object.groupBy;\nvar create = getBuiltIn('Object', 'create');\nvar push = uncurryThis([].push);\n\n// https://bugs.webkit.org/show_bug.cgi?id=271524\nvar DOES_NOT_WORK_WITH_PRIMITIVES = !nativeGroupBy || fails(function () {\n  return nativeGroupBy('ab', function (it) {\n    return it;\n  }).a.length !== 1;\n});\n\n// `Object.groupBy` method\n// https://tc39.es/ecma262/#sec-object.groupby\n$({ target: 'Object', stat: true, forced: DOES_NOT_WORK_WITH_PRIMITIVES }, {\n  groupBy: function groupBy(items, callbackfn) {\n    requireObjectCoercible(items);\n    aCallable(callbackfn);\n    var obj = create(null);\n    var k = 0;\n    iterate(items, function (value) {\n      doesNotExceedSafeInteger(k);\n      var key = toPropertyKey(callbackfn(value, k++));\n      // in some IE versions, `hasOwnProperty` returns incorrect result on integer keys\n      // but since it's a `null` prototype object, we can safely use `in`\n      if (key in obj) push(obj[key], value);\n      else createProperty(obj, key, [value]);\n    });\n    return obj;\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar hasOwn = require('../internals/has-own-property');\n\n// `Object.hasOwn` method\n// https://tc39.es/ecma262/#sec-object.hasown\n$({ target: 'Object', stat: true }, {\n  hasOwn: hasOwn\n});\n", "'use strict';\n// `SameValue` abstract operation\n// https://tc39.es/ecma262/#sec-samevalue\n// eslint-disable-next-line es/no-object-is -- safe\nmodule.exports = Object.is || function is(x, y) {\n  // eslint-disable-next-line no-self-compare -- NaN check\n  return x === y ? x !== 0 || 1 / x === 1 / y : x !== x && y !== y;\n};\n", "'use strict';\nvar $ = require('../internals/export');\nvar is = require('../internals/same-value');\n\n// `Object.is` method\n// https://tc39.es/ecma262/#sec-object.is\n$({ target: 'Object', stat: true }, {\n  is: is\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar $isExtensible = require('../internals/object-is-extensible');\n\n// `Object.isExtensible` method\n// https://tc39.es/ecma262/#sec-object.isextensible\n// eslint-disable-next-line es/no-object-isextensible -- safe\n$({ target: 'Object', stat: true, forced: Object.isExtensible !== $isExtensible }, {\n  isExtensible: $isExtensible\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar fails = require('../internals/fails');\nvar isObject = require('../internals/is-object');\nvar classof = require('../internals/classof-raw');\nvar ARRAY_BUFFER_NON_EXTENSIBLE = require('../internals/array-buffer-non-extensible');\n\n// eslint-disable-next-line es/no-object-isfrozen -- safe\nvar $isFrozen = Object.isFrozen;\n\nvar FORCED = ARRAY_BUFFER_NON_EXTENSIBLE || fails(function () { $isFrozen(1); });\n\n// `Object.isFrozen` method\n// https://tc39.es/ecma262/#sec-object.isfrozen\n$({ target: 'Object', stat: true, forced: FORCED }, {\n  isFrozen: function isFrozen(it) {\n    if (!isObject(it)) return true;\n    if (ARRAY_BUFFER_NON_EXTENSIBLE && classof(it) === 'ArrayBuffer') return true;\n    return $isFrozen ? $isFrozen(it) : false;\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar fails = require('../internals/fails');\nvar isObject = require('../internals/is-object');\nvar classof = require('../internals/classof-raw');\nvar ARRAY_BUFFER_NON_EXTENSIBLE = require('../internals/array-buffer-non-extensible');\n\n// eslint-disable-next-line es/no-object-issealed -- safe\nvar $isSealed = Object.isSealed;\n\nvar FORCED = ARRAY_BUFFER_NON_EXTENSIBLE || fails(function () { $isSealed(1); });\n\n// `Object.isSealed` method\n// https://tc39.es/ecma262/#sec-object.issealed\n$({ target: 'Object', stat: true, forced: FORCED }, {\n  isSealed: function isSealed(it) {\n    if (!isObject(it)) return true;\n    if (ARRAY_BUFFER_NON_EXTENSIBLE && classof(it) === 'ArrayBuffer') return true;\n    return $isSealed ? $isSealed(it) : false;\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar toObject = require('../internals/to-object');\nvar nativeKeys = require('../internals/object-keys');\nvar fails = require('../internals/fails');\n\nvar FAILS_ON_PRIMITIVES = fails(function () { nativeKeys(1); });\n\n// `Object.keys` method\n// https://tc39.es/ecma262/#sec-object.keys\n$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {\n  keys: function keys(it) {\n    return nativeKeys(toObject(it));\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar FORCED = require('../internals/object-prototype-accessors-forced');\nvar toObject = require('../internals/to-object');\nvar toPropertyKey = require('../internals/to-property-key');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\n\n// `Object.prototype.__lookupGetter__` method\n// https://tc39.es/ecma262/#sec-object.prototype.__lookupGetter__\nif (DESCRIPTORS) {\n  $({ target: 'Object', proto: true, forced: FORCED }, {\n    __lookupGetter__: function __lookupGetter__(P) {\n      var O = toObject(this);\n      var key = toPropertyKey(P);\n      var desc;\n      do {\n        if (desc = getOwnPropertyDescriptor(O, key)) return desc.get;\n      } while (O = getPrototypeOf(O));\n    }\n  });\n}\n", "'use strict';\nvar $ = require('../internals/export');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar FORCED = require('../internals/object-prototype-accessors-forced');\nvar toObject = require('../internals/to-object');\nvar toPropertyKey = require('../internals/to-property-key');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\n\n// `Object.prototype.__lookupSetter__` method\n// https://tc39.es/ecma262/#sec-object.prototype.__lookupSetter__\nif (DESCRIPTORS) {\n  $({ target: 'Object', proto: true, forced: FORCED }, {\n    __lookupSetter__: function __lookupSetter__(P) {\n      var O = toObject(this);\n      var key = toPropertyKey(P);\n      var desc;\n      do {\n        if (desc = getOwnPropertyDescriptor(O, key)) return desc.set;\n      } while (O = getPrototypeOf(O));\n    }\n  });\n}\n", "'use strict';\nvar $ = require('../internals/export');\nvar isObject = require('../internals/is-object');\nvar onFreeze = require('../internals/internal-metadata').onFreeze;\nvar FREEZING = require('../internals/freezing');\nvar fails = require('../internals/fails');\n\n// eslint-disable-next-line es/no-object-preventextensions -- safe\nvar $preventExtensions = Object.preventExtensions;\nvar FAILS_ON_PRIMITIVES = fails(function () { $preventExtensions(1); });\n\n// `Object.preventExtensions` method\n// https://tc39.es/ecma262/#sec-object.preventextensions\n$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !FREEZING }, {\n  preventExtensions: function preventExtensions(it) {\n    return $preventExtensions && isObject(it) ? $preventExtensions(onFreeze(it)) : it;\n  }\n});\n", "'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar defineBuiltInAccessor = require('../internals/define-built-in-accessor');\nvar isObject = require('../internals/is-object');\nvar isPossiblePrototype = require('../internals/is-possible-prototype');\nvar toObject = require('../internals/to-object');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\n// eslint-disable-next-line es/no-object-getprototypeof -- safe\nvar getPrototypeOf = Object.getPrototypeOf;\n// eslint-disable-next-line es/no-object-setprototypeof -- safe\nvar setPrototypeOf = Object.setPrototypeOf;\nvar ObjectPrototype = Object.prototype;\nvar PROTO = '__proto__';\n\n// `Object.prototype.__proto__` accessor\n// https://tc39.es/ecma262/#sec-object.prototype.__proto__\n// Deno 2.9+ patch this accessor, so we can't use `in` for feature detection\nif (DESCRIPTORS && getPrototypeOf && setPrototypeOf && ({}[PROTO] !== ObjectPrototype)) try {\n  defineBuiltInAccessor(ObjectPrototype, PROTO, {\n    configurable: true,\n    get: function __proto__() {\n      return getPrototypeOf(toObject(this));\n    },\n    set: function __proto__(proto) {\n      var O = requireObjectCoercible(this);\n      if (isPossiblePrototype(proto) && isObject(O)) {\n        setPrototypeOf(O, proto);\n      }\n    }\n  });\n} catch (error) { /* empty */ }\n", "'use strict';\nvar $ = require('../internals/export');\nvar isObject = require('../internals/is-object');\nvar onFreeze = require('../internals/internal-metadata').onFreeze;\nvar FREEZING = require('../internals/freezing');\nvar fails = require('../internals/fails');\n\n// eslint-disable-next-line es/no-object-seal -- safe\nvar $seal = Object.seal;\nvar FAILS_ON_PRIMITIVES = fails(function () { $seal(1); });\n\n// `Object.seal` method\n// https://tc39.es/ecma262/#sec-object.seal\n$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !FREEZING }, {\n  seal: function seal(it) {\n    return $seal && isObject(it) ? $seal(onFreeze(it)) : it;\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\n\n// `Object.setPrototypeOf` method\n// https://tc39.es/ecma262/#sec-object.setprototypeof\n$({ target: 'Object', stat: true }, {\n  setPrototypeOf: setPrototypeOf\n});\n", "'use strict';\nvar TO_STRING_TAG_SUPPORT = require('../internals/to-string-tag-support');\nvar classof = require('../internals/classof');\n\n// `Object.prototype.toString` method implementation\n// https://tc39.es/ecma262/#sec-object.prototype.tostring\nmodule.exports = TO_STRING_TAG_SUPPORT ? {}.toString : function toString() {\n  return '[object ' + classof(this) + ']';\n};\n", "'use strict';\nvar TO_STRING_TAG_SUPPORT = require('../internals/to-string-tag-support');\nvar defineBuiltIn = require('../internals/define-built-in');\nvar toString = require('../internals/object-to-string');\n\n// `Object.prototype.toString` method\n// https://tc39.es/ecma262/#sec-object.prototype.tostring\nif (!TO_STRING_TAG_SUPPORT) {\n  defineBuiltIn(Object.prototype, 'toString', toString, { unsafe: true });\n}\n", "'use strict';\nvar $ = require('../internals/export');\nvar $values = require('../internals/object-to-array').values;\n\n// `Object.values` method\n// https://tc39.es/ecma262/#sec-object.values\n$({ target: 'Object', stat: true }, {\n  values: function values(O) {\n    return $values(O);\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar $parseFloat = require('../internals/number-parse-float');\n\n// `parseFloat` method\n// https://tc39.es/ecma262/#sec-parsefloat-string\n$({ global: true, forced: parseFloat !== $parseFloat }, {\n  parseFloat: $parseFloat\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar $parseInt = require('../internals/number-parse-int');\n\n// `parseInt` method\n// https://tc39.es/ecma262/#sec-parseint-string-radix\n$({ global: true, forced: parseInt !== $parseInt }, {\n  parseInt: $parseInt\n});\n", "'use strict';\nvar isConstructor = require('../internals/is-constructor');\nvar tryToString = require('../internals/try-to-string');\n\nvar $TypeError = TypeError;\n\n// `Assert: IsConstructor(argument) is true`\nmodule.exports = function (argument) {\n  if (isConstructor(argument)) return argument;\n  throw new $TypeError(tryToString(argument) + ' is not a constructor');\n};\n", "'use strict';\nvar anObject = require('../internals/an-object');\nvar aConstructor = require('../internals/a-constructor');\nvar isNullOrUndefined = require('../internals/is-null-or-undefined');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar SPECIES = wellKnownSymbol('species');\n\n// `SpeciesConstructor` abstract operation\n// https://tc39.es/ecma262/#sec-speciesconstructor\nmodule.exports = function (O, defaultConstructor) {\n  var C = anObject(O).constructor;\n  var S;\n  return C === undefined || isNullOrUndefined(S = anObject(C)[SPECIES]) ? defaultConstructor : aConstructor(S);\n};\n", "'use strict';\nvar $TypeError = TypeError;\n\nmodule.exports = function (passed, required) {\n  if (passed < required) throw new $TypeError('Not enough arguments');\n  return passed;\n};\n", "'use strict';\nvar userAgent = require('../internals/environment-user-agent');\n\nmodule.exports = /ipad|iphone|ipod/i.test(userAgent) && /applewebkit/i.test(userAgent);\n", "'use strict';\nvar globalThis = require('../internals/global-this');\nvar apply = require('../internals/function-apply');\nvar bind = require('../internals/function-bind-context');\nvar isCallable = require('../internals/is-callable');\nvar hasOwn = require('../internals/has-own-property');\nvar fails = require('../internals/fails');\nvar html = require('../internals/html');\nvar arraySlice = require('../internals/array-slice');\nvar createElement = require('../internals/document-create-element');\nvar validateArgumentsLength = require('../internals/validate-arguments-length');\nvar IS_IOS = require('../internals/environment-is-ios');\nvar IS_NODE = require('../internals/environment-is-node');\n\nvar set = globalThis.setImmediate;\nvar clear = globalThis.clearImmediate;\nvar process = globalThis.process;\nvar Dispatch = globalThis.Dispatch;\nvar Function = globalThis.Function;\nvar MessageChannel = globalThis.MessageChannel;\nvar String = globalThis.String;\nvar counter = 0;\nvar queue = {};\nvar ONREADYSTATECHANGE = 'onreadystatechange';\nvar $location, defer, channel, port;\n\nfails(function () {\n  // Deno throws a ReferenceError on `location` access without `--location` flag\n  $location = globalThis.location;\n});\n\nvar run = function (id) {\n  if (hasOwn(queue, id)) {\n    var fn = queue[id];\n    delete queue[id];\n    fn();\n  }\n};\n\nvar runner = function (id) {\n  return function () {\n    run(id);\n  };\n};\n\nvar eventListener = function (event) {\n  run(event.data);\n};\n\nvar globalPostMessageDefer = function (id) {\n  // old engines have not location.origin\n  globalThis.postMessage(String(id), $location.protocol + '//' + $location.host);\n};\n\n// Node.js 0.9+ & IE10+ has setImmediate, otherwise:\nif (!set || !clear) {\n  set = function setImmediate(handler) {\n    validateArgumentsLength(arguments.length, 1);\n    var fn = isCallable(handler) ? handler : Function(handler);\n    var args = arraySlice(arguments, 1);\n    queue[++counter] = function () {\n      apply(fn, undefined, args);\n    };\n    defer(counter);\n    return counter;\n  };\n  clear = function clearImmediate(id) {\n    delete queue[id];\n  };\n  // Node.js 0.8-\n  if (IS_NODE) {\n    defer = function (id) {\n      process.nextTick(runner(id));\n    };\n  // Sphere (JS game engine) Dispatch API\n  } else if (Dispatch && Dispatch.now) {\n    defer = function (id) {\n      Dispatch.now(runner(id));\n    };\n  // Browsers with MessageChannel, includes WebWorkers\n  // except iOS - https://github.com/zloirock/core-js/issues/624\n  } else if (MessageChannel && !IS_IOS) {\n    channel = new MessageChannel();\n    port = channel.port2;\n    channel.port1.onmessage = eventListener;\n    defer = bind(port.postMessage, port);\n  // Browsers with postMessage, skip WebWorkers\n  // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'\n  } else if (\n    globalThis.addEventListener &&\n    isCallable(globalThis.postMessage) &&\n    !globalThis.importScripts &&\n    $location && $location.protocol !== 'file:' &&\n    !fails(globalPostMessageDefer)\n  ) {\n    defer = globalPostMessageDefer;\n    globalThis.addEventListener('message', eventListener, false);\n  // IE8-\n  } else if (ONREADYSTATECHANGE in createElement('script')) {\n    defer = function (id) {\n      html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {\n        html.removeChild(this);\n        run(id);\n      };\n    };\n  // Rest old browsers\n  } else {\n    defer = function (id) {\n      setTimeout(runner(id), 0);\n    };\n  }\n}\n\nmodule.exports = {\n  set: set,\n  clear: clear\n};\n", "'use strict';\nvar globalThis = require('../internals/global-this');\nvar DESCRIPTORS = require('../internals/descriptors');\n\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// Avoid NodeJS experimental warning\nmodule.exports = function (name) {\n  if (!DESCRIPTORS) return globalThis[name];\n  var descriptor = getOwnPropertyDescriptor(globalThis, name);\n  return descriptor && descriptor.value;\n};\n", "'use strict';\nvar Queue = function () {\n  this.head = null;\n  this.tail = null;\n};\n\nQueue.prototype = {\n  add: function (item) {\n    var entry = { item: item, next: null };\n    var tail = this.tail;\n    if (tail) tail.next = entry;\n    else this.head = entry;\n    this.tail = entry;\n  },\n  get: function () {\n    var entry = this.head;\n    if (entry) {\n      var next = this.head = entry.next;\n      if (next === null) this.tail = null;\n      return entry.item;\n    }\n  }\n};\n\nmodule.exports = Queue;\n", "'use strict';\nvar userAgent = require('../internals/environment-user-agent');\n\nmodule.exports = /ipad|iphone|ipod/i.test(userAgent) && typeof Pebble != 'undefined';\n", "'use strict';\nvar userAgent = require('../internals/environment-user-agent');\n\nmodule.exports = /web0s(?!.*chrome)/i.test(userAgent);\n", "'use strict';\nvar globalThis = require('../internals/global-this');\nvar safeGetBuiltIn = require('../internals/safe-get-built-in');\nvar bind = require('../internals/function-bind-context');\nvar macrotask = require('../internals/task').set;\nvar Queue = require('../internals/queue');\nvar IS_IOS = require('../internals/environment-is-ios');\nvar IS_IOS_PEBBLE = require('../internals/environment-is-ios-pebble');\nvar IS_WEBOS_WEBKIT = require('../internals/environment-is-webos-webkit');\nvar IS_NODE = require('../internals/environment-is-node');\n\nvar MutationObserver = globalThis.MutationObserver || globalThis.WebKitMutationObserver;\nvar document = globalThis.document;\nvar process = globalThis.process;\nvar Promise = globalThis.Promise;\nvar microtask = safeGetBuiltIn('queueMicrotask');\nvar notify, toggle, node, promise, then;\n\n// modern engines have queueMicrotask method\nif (!microtask) {\n  var queue = new Queue();\n\n  var flush = function () {\n    var parent, fn;\n    if (IS_NODE && (parent = process.domain)) parent.exit();\n    while (fn = queue.get()) try {\n      fn();\n    } catch (error) {\n      if (queue.head) notify();\n      throw error;\n    }\n    if (parent) parent.enter();\n  };\n\n  // browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339\n  // also except WebOS Webkit https://github.com/zloirock/core-js/issues/898\n  if (!IS_IOS && !IS_NODE && !IS_WEBOS_WEBKIT && MutationObserver && document) {\n    toggle = true;\n    node = document.createTextNode('');\n    new MutationObserver(flush).observe(node, { characterData: true });\n    notify = function () {\n      node.data = toggle = !toggle;\n    };\n  // environments with maybe non-completely correct, but existent Promise\n  } else if (!IS_IOS_PEBBLE && Promise && Promise.resolve) {\n    // Promise.resolve without an argument throws an error in LG WebOS 2\n    promise = Promise.resolve(undefined);\n    // workaround of WebKit ~ iOS Safari 10.1 bug\n    promise.constructor = Promise;\n    then = bind(promise.then, promise);\n    notify = function () {\n      then(flush);\n    };\n  // Node.js without promises\n  } else if (IS_NODE) {\n    notify = function () {\n      process.nextTick(flush);\n    };\n  // for other environments - macrotask based on:\n  // - setImmediate\n  // - MessageChannel\n  // - window.postMessage\n  // - onreadystatechange\n  // - setTimeout\n  } else {\n    // `webpack` dev server bug on IE global methods - use bind(fn, global)\n    macrotask = bind(macrotask, globalThis);\n    notify = function () {\n      macrotask(flush);\n    };\n  }\n\n  microtask = function (fn) {\n    if (!queue.head) notify();\n    queue.add(fn);\n  };\n}\n\nmodule.exports = microtask;\n", "'use strict';\nmodule.exports = function (a, b) {\n  try {\n    // eslint-disable-next-line no-console -- safe\n    arguments.length === 1 ? console.error(a) : console.error(a, b);\n  } catch (error) { /* empty */ }\n};\n", "'use strict';\nmodule.exports = function (exec) {\n  try {\n    return { error: false, value: exec() };\n  } catch (error) {\n    return { error: true, value: error };\n  }\n};\n", "'use strict';\nvar globalThis = require('../internals/global-this');\n\nmodule.exports = globalThis.Promise;\n", "'use strict';\nvar globalThis = require('../internals/global-this');\nvar NativePromiseConstructor = require('../internals/promise-native-constructor');\nvar isCallable = require('../internals/is-callable');\nvar isForced = require('../internals/is-forced');\nvar inspectSource = require('../internals/inspect-source');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar ENVIRONMENT = require('../internals/environment');\nvar IS_PURE = require('../internals/is-pure');\nvar V8_VERSION = require('../internals/environment-v8-version');\n\nvar NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;\nvar SPECIES = wellKnownSymbol('species');\nvar SUBCLASSING = false;\nvar NATIVE_PROMISE_REJECTION_EVENT = isCallable(globalThis.PromiseRejectionEvent);\n\nvar FORCED_PROMISE_CONSTRUCTOR = isForced('Promise', function () {\n  var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(NativePromiseConstructor);\n  var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(NativePromiseConstructor);\n  // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables\n  // https://bugs.chromium.org/p/chromium/issues/detail?id=830565\n  // We can't detect it synchronously, so just check versions\n  if (!GLOBAL_CORE_JS_PROMISE && V8_VERSION === 66) return true;\n  // We need Promise#{ catch, finally } in the pure version for preventing prototype pollution\n  if (IS_PURE && !(NativePromisePrototype['catch'] && NativePromisePrototype['finally'])) return true;\n  // We can't use @@species feature detection in V8 since it causes\n  // deoptimization and performance degradation\n  // https://github.com/zloirock/core-js/issues/679\n  if (!V8_VERSION || V8_VERSION < 51 || !/native code/.test(PROMISE_CONSTRUCTOR_SOURCE)) {\n    // Detect correctness of subclassing with @@species support\n    var promise = new NativePromiseConstructor(function (resolve) { resolve(1); });\n    var FakePromise = function (exec) {\n      exec(function () { /* empty */ }, function () { /* empty */ });\n    };\n    var constructor = promise.constructor = {};\n    constructor[SPECIES] = FakePromise;\n    SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;\n    if (!SUBCLASSING) return true;\n  // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test\n  } return !GLOBAL_CORE_JS_PROMISE && (ENVIRONMENT === 'BROWSER' || ENVIRONMENT === 'DENO') && !NATIVE_PROMISE_REJECTION_EVENT;\n});\n\nmodule.exports = {\n  CONSTRUCTOR: FORCED_PROMISE_CONSTRUCTOR,\n  REJECTION_EVENT: NATIVE_PROMISE_REJECTION_EVENT,\n  SUBCLASSING: SUBCLASSING\n};\n", "'use strict';\nvar aCallable = require('../internals/a-callable');\n\nvar $TypeError = TypeError;\n\nvar PromiseCapability = function (C) {\n  var resolve, reject;\n  this.promise = new C(function ($$resolve, $$reject) {\n    if (resolve !== undefined || reject !== undefined) throw new $TypeError('Bad Promise constructor');\n    resolve = $$resolve;\n    reject = $$reject;\n  });\n  this.resolve = aCallable(resolve);\n  this.reject = aCallable(reject);\n};\n\n// `NewPromiseCapability` abstract operation\n// https://tc39.es/ecma262/#sec-newpromisecapability\nmodule.exports.f = function (C) {\n  return new PromiseCapability(C);\n};\n", "'use strict';\nvar $ = require('../internals/export');\nvar IS_PURE = require('../internals/is-pure');\nvar IS_NODE = require('../internals/environment-is-node');\nvar globalThis = require('../internals/global-this');\nvar path = require('../internals/path');\nvar call = require('../internals/function-call');\nvar defineBuiltIn = require('../internals/define-built-in');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar setSpecies = require('../internals/set-species');\nvar aCallable = require('../internals/a-callable');\nvar isCallable = require('../internals/is-callable');\nvar isObject = require('../internals/is-object');\nvar anInstance = require('../internals/an-instance');\nvar speciesConstructor = require('../internals/species-constructor');\nvar task = require('../internals/task').set;\nvar microtask = require('../internals/microtask');\nvar hostReportErrors = require('../internals/host-report-errors');\nvar perform = require('../internals/perform');\nvar Queue = require('../internals/queue');\nvar InternalStateModule = require('../internals/internal-state');\nvar NativePromiseConstructor = require('../internals/promise-native-constructor');\nvar PromiseConstructorDetection = require('../internals/promise-constructor-detection');\nvar newPromiseCapabilityModule = require('../internals/new-promise-capability');\n\nvar PROMISE = 'Promise';\nvar FORCED_PROMISE_CONSTRUCTOR = PromiseConstructorDetection.CONSTRUCTOR;\nvar NATIVE_PROMISE_REJECTION_EVENT = PromiseConstructorDetection.REJECTION_EVENT;\nvar NATIVE_PROMISE_SUBCLASSING = PromiseConstructorDetection.SUBCLASSING;\nvar getInternalPromiseState = InternalStateModule.getterFor(PROMISE);\nvar setInternalState = InternalStateModule.set;\nvar NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;\nvar PromiseConstructor = NativePromiseConstructor;\nvar PromisePrototype = NativePromisePrototype;\nvar TypeError = globalThis.TypeError;\nvar document = globalThis.document;\nvar process = globalThis.process;\nvar newPromiseCapability = newPromiseCapabilityModule.f;\nvar newGenericPromiseCapability = newPromiseCapability;\n\nvar DISPATCH_EVENT = !!(document && document.createEvent && globalThis.dispatchEvent);\nvar UNHANDLED_REJECTION = 'unhandledrejection';\nvar REJECTION_HANDLED = 'rejectionhandled';\nvar PENDING = 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\nvar HANDLED = 1;\nvar UNHANDLED = 2;\n\nvar Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;\n\n// helpers\nvar isThenable = function (it) {\n  var then;\n  return isObject(it) && isCallable(then = it.then) ? then : false;\n};\n\nvar callReaction = function (reaction, state) {\n  var value = state.value;\n  var ok = state.state === FULFILLED;\n  var handler = ok ? reaction.ok : reaction.fail;\n  var resolve = reaction.resolve;\n  var reject = reaction.reject;\n  var domain = reaction.domain;\n  var result, then, exited;\n  try {\n    if (handler) {\n      if (!ok) {\n        if (state.rejection === UNHANDLED) onHandleUnhandled(state);\n        state.rejection = HANDLED;\n      }\n      if (handler === true) result = value;\n      else {\n        if (domain) domain.enter();\n        result = handler(value); // can throw\n        if (domain) {\n          domain.exit();\n          exited = true;\n        }\n      }\n      if (result === reaction.promise) {\n        reject(new TypeError('Promise-chain cycle'));\n      } else if (then = isThenable(result)) {\n        call(then, result, resolve, reject);\n      } else resolve(result);\n    } else reject(value);\n  } catch (error) {\n    if (domain && !exited) domain.exit();\n    reject(error);\n  }\n};\n\nvar notify = function (state, isReject) {\n  if (state.notified) return;\n  state.notified = true;\n  microtask(function () {\n    var reactions = state.reactions;\n    var reaction;\n    while (reaction = reactions.get()) {\n      callReaction(reaction, state);\n    }\n    state.notified = false;\n    if (isReject && !state.rejection) onUnhandled(state);\n  });\n};\n\nvar dispatchEvent = function (name, promise, reason) {\n  var event, handler;\n  if (DISPATCH_EVENT) {\n    event = document.createEvent('Event');\n    event.promise = promise;\n    event.reason = reason;\n    event.initEvent(name, false, true);\n    globalThis.dispatchEvent(event);\n  } else event = { promise: promise, reason: reason };\n  if (!NATIVE_PROMISE_REJECTION_EVENT && (handler = globalThis['on' + name])) handler(event);\n  else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);\n};\n\nvar onUnhandled = function (state) {\n  call(task, globalThis, function () {\n    var promise = state.facade;\n    var value = state.value;\n    var IS_UNHANDLED = isUnhandled(state);\n    var result;\n    if (IS_UNHANDLED) {\n      result = perform(function () {\n        if (IS_NODE) {\n          process.emit('unhandledRejection', value, promise);\n        } else dispatchEvent(UNHANDLED_REJECTION, promise, value);\n      });\n      // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should\n      state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED;\n      if (result.error) throw result.value;\n    }\n  });\n};\n\nvar isUnhandled = function (state) {\n  return state.rejection !== HANDLED && !state.parent;\n};\n\nvar onHandleUnhandled = function (state) {\n  call(task, globalThis, function () {\n    var promise = state.facade;\n    if (IS_NODE) {\n      process.emit('rejectionHandled', promise);\n    } else dispatchEvent(REJECTION_HANDLED, promise, state.value);\n  });\n};\n\nvar bind = function (fn, state, unwrap) {\n  return function (value) {\n    fn(state, value, unwrap);\n  };\n};\n\nvar internalReject = function (state, value, unwrap) {\n  if (state.done) return;\n  state.done = true;\n  if (unwrap) state = unwrap;\n  state.value = value;\n  state.state = REJECTED;\n  notify(state, true);\n};\n\nvar internalResolve = function (state, value, unwrap) {\n  if (state.done) return;\n  state.done = true;\n  if (unwrap) state = unwrap;\n  try {\n    if (state.facade === value) throw new TypeError(\"Promise can't be resolved itself\");\n    var then = isThenable(value);\n    if (then) {\n      microtask(function () {\n        var wrapper = { done: false };\n        try {\n          call(then, value,\n            bind(internalResolve, wrapper, state),\n            bind(internalReject, wrapper, state)\n          );\n        } catch (error) {\n          internalReject(wrapper, error, state);\n        }\n      });\n    } else {\n      state.value = value;\n      state.state = FULFILLED;\n      notify(state, false);\n    }\n  } catch (error) {\n    internalReject({ done: false }, error, state);\n  }\n};\n\n// constructor polyfill\nif (FORCED_PROMISE_CONSTRUCTOR) {\n  // 25.4.3.1 Promise(executor)\n  PromiseConstructor = function Promise(executor) {\n    anInstance(this, PromisePrototype);\n    aCallable(executor);\n    call(Internal, this);\n    var state = getInternalPromiseState(this);\n    try {\n      executor(bind(internalResolve, state), bind(internalReject, state));\n    } catch (error) {\n      internalReject(state, error);\n    }\n  };\n\n  PromisePrototype = PromiseConstructor.prototype;\n\n  // eslint-disable-next-line no-unused-vars -- required for `.length`\n  Internal = function Promise(executor) {\n    setInternalState(this, {\n      type: PROMISE,\n      done: false,\n      notified: false,\n      parent: false,\n      reactions: new Queue(),\n      rejection: false,\n      state: PENDING,\n      value: null\n    });\n  };\n\n  // `Promise.prototype.then` method\n  // https://tc39.es/ecma262/#sec-promise.prototype.then\n  Internal.prototype = defineBuiltIn(PromisePrototype, 'then', function then(onFulfilled, onRejected) {\n    var state = getInternalPromiseState(this);\n    var reaction = newPromiseCapability(speciesConstructor(this, PromiseConstructor));\n    state.parent = true;\n    reaction.ok = isCallable(onFulfilled) ? onFulfilled : true;\n    reaction.fail = isCallable(onRejected) && onRejected;\n    reaction.domain = IS_NODE ? process.domain : undefined;\n    if (state.state === PENDING) state.reactions.add(reaction);\n    else microtask(function () {\n      callReaction(reaction, state);\n    });\n    return reaction.promise;\n  });\n\n  OwnPromiseCapability = function () {\n    var promise = new Internal();\n    var state = getInternalPromiseState(promise);\n    this.promise = promise;\n    this.resolve = bind(internalResolve, state);\n    this.reject = bind(internalReject, state);\n  };\n\n  newPromiseCapabilityModule.f = newPromiseCapability = function (C) {\n    return C === PromiseConstructor || C === PromiseWrapper\n      ? new OwnPromiseCapability(C)\n      : newGenericPromiseCapability(C);\n  };\n\n  if (!IS_PURE && isCallable(NativePromiseConstructor) && NativePromisePrototype !== Object.prototype) {\n    nativeThen = NativePromisePrototype.then;\n\n    if (!NATIVE_PROMISE_SUBCLASSING) {\n      // make `Promise#then` return a polyfilled `Promise` for native promise-based APIs\n      defineBuiltIn(NativePromisePrototype, 'then', function then(onFulfilled, onRejected) {\n        var that = this;\n        return new PromiseConstructor(function (resolve, reject) {\n          call(nativeThen, that, resolve, reject);\n        }).then(onFulfilled, onRejected);\n      // https://github.com/zloirock/core-js/issues/640\n      }, { unsafe: true });\n    }\n\n    // make `.constructor === Promise` work for native promise-based APIs\n    try {\n      delete NativePromisePrototype.constructor;\n    } catch (error) { /* empty */ }\n\n    // make `instanceof Promise` work for native promise-based APIs\n    if (setPrototypeOf) {\n      setPrototypeOf(NativePromisePrototype, PromisePrototype);\n    }\n  }\n}\n\n// `Promise` constructor\n// https://tc39.es/ecma262/#sec-promise-executor\n$({ global: true, constructor: true, wrap: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {\n  Promise: PromiseConstructor\n});\n\nPromiseWrapper = path.Promise;\n\nsetToStringTag(PromiseConstructor, PROMISE, false, true);\nsetSpecies(PROMISE);\n", "'use strict';\nvar NativePromiseConstructor = require('../internals/promise-native-constructor');\nvar checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration');\nvar FORCED_PROMISE_CONSTRUCTOR = require('../internals/promise-constructor-detection').CONSTRUCTOR;\n\nmodule.exports = FORCED_PROMISE_CONSTRUCTOR || !checkCorrectnessOfIteration(function (iterable) {\n  NativePromiseConstructor.all(iterable).then(undefined, function () { /* empty */ });\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar call = require('../internals/function-call');\nvar aCallable = require('../internals/a-callable');\nvar newPromiseCapabilityModule = require('../internals/new-promise-capability');\nvar perform = require('../internals/perform');\nvar iterate = require('../internals/iterate');\nvar PROMISE_STATICS_INCORRECT_ITERATION = require('../internals/promise-statics-incorrect-iteration');\n\n// `Promise.all` method\n// https://tc39.es/ecma262/#sec-promise.all\n$({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, {\n  all: function all(iterable) {\n    var C = this;\n    var capability = newPromiseCapabilityModule.f(C);\n    var resolve = capability.resolve;\n    var reject = capability.reject;\n    var result = perform(function () {\n      var $promiseResolve = aCallable(C.resolve);\n      var values = [];\n      var counter = 0;\n      var remaining = 1;\n      iterate(iterable, function (promise) {\n        var index = counter++;\n        var alreadyCalled = false;\n        remaining++;\n        call($promiseResolve, C, promise).then(function (value) {\n          if (alreadyCalled) return;\n          alreadyCalled = true;\n          values[index] = value;\n          --remaining || resolve(values);\n        }, reject);\n      });\n      --remaining || resolve(values);\n    });\n    if (result.error) reject(result.value);\n    return capability.promise;\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar IS_PURE = require('../internals/is-pure');\nvar FORCED_PROMISE_CONSTRUCTOR = require('../internals/promise-constructor-detection').CONSTRUCTOR;\nvar NativePromiseConstructor = require('../internals/promise-native-constructor');\nvar getBuiltIn = require('../internals/get-built-in');\nvar isCallable = require('../internals/is-callable');\nvar defineBuiltIn = require('../internals/define-built-in');\n\nvar NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;\n\n// `Promise.prototype.catch` method\n// https://tc39.es/ecma262/#sec-promise.prototype.catch\n$({ target: 'Promise', proto: true, forced: FORCED_PROMISE_CONSTRUCTOR, real: true }, {\n  'catch': function (onRejected) {\n    return this.then(undefined, onRejected);\n  }\n});\n\n// makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`\nif (!IS_PURE && isCallable(NativePromiseConstructor)) {\n  var method = getBuiltIn('Promise').prototype['catch'];\n  if (NativePromisePrototype['catch'] !== method) {\n    defineBuiltIn(NativePromisePrototype, 'catch', method, { unsafe: true });\n  }\n}\n", "'use strict';\nvar $ = require('../internals/export');\nvar call = require('../internals/function-call');\nvar aCallable = require('../internals/a-callable');\nvar newPromiseCapabilityModule = require('../internals/new-promise-capability');\nvar perform = require('../internals/perform');\nvar iterate = require('../internals/iterate');\nvar PROMISE_STATICS_INCORRECT_ITERATION = require('../internals/promise-statics-incorrect-iteration');\n\n// `Promise.race` method\n// https://tc39.es/ecma262/#sec-promise.race\n$({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, {\n  race: function race(iterable) {\n    var C = this;\n    var capability = newPromiseCapabilityModule.f(C);\n    var reject = capability.reject;\n    var result = perform(function () {\n      var $promiseResolve = aCallable(C.resolve);\n      iterate(iterable, function (promise) {\n        call($promiseResolve, C, promise).then(capability.resolve, reject);\n      });\n    });\n    if (result.error) reject(result.value);\n    return capability.promise;\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar newPromiseCapabilityModule = require('../internals/new-promise-capability');\nvar FORCED_PROMISE_CONSTRUCTOR = require('../internals/promise-constructor-detection').CONSTRUCTOR;\n\n// `Promise.reject` method\n// https://tc39.es/ecma262/#sec-promise.reject\n$({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {\n  reject: function reject(r) {\n    var capability = newPromiseCapabilityModule.f(this);\n    var capabilityReject = capability.reject;\n    capabilityReject(r);\n    return capability.promise;\n  }\n});\n", "'use strict';\nvar anObject = require('../internals/an-object');\nvar isObject = require('../internals/is-object');\nvar newPromiseCapability = require('../internals/new-promise-capability');\n\nmodule.exports = function (C, x) {\n  anObject(C);\n  if (isObject(x) && x.constructor === C) return x;\n  var promiseCapability = newPromiseCapability.f(C);\n  var resolve = promiseCapability.resolve;\n  resolve(x);\n  return promiseCapability.promise;\n};\n", "'use strict';\nvar $ = require('../internals/export');\nvar getBuiltIn = require('../internals/get-built-in');\nvar IS_PURE = require('../internals/is-pure');\nvar NativePromiseConstructor = require('../internals/promise-native-constructor');\nvar FORCED_PROMISE_CONSTRUCTOR = require('../internals/promise-constructor-detection').CONSTRUCTOR;\nvar promiseResolve = require('../internals/promise-resolve');\n\nvar PromiseConstructorWrapper = getBuiltIn('Promise');\nvar CHECK_WRAPPER = IS_PURE && !FORCED_PROMISE_CONSTRUCTOR;\n\n// `Promise.resolve` method\n// https://tc39.es/ecma262/#sec-promise.resolve\n$({ target: 'Promise', stat: true, forced: IS_PURE || FORCED_PROMISE_CONSTRUCTOR }, {\n  resolve: function resolve(x) {\n    return promiseResolve(CHECK_WRAPPER && this === PromiseConstructorWrapper ? NativePromiseConstructor : this, x);\n  }\n});\n", "'use strict';\n// TODO: Remove this module from `core-js@4` since it's split to modules listed below\nrequire('../modules/es.promise.constructor');\nrequire('../modules/es.promise.all');\nrequire('../modules/es.promise.catch');\nrequire('../modules/es.promise.race');\nrequire('../modules/es.promise.reject');\nrequire('../modules/es.promise.resolve');\n", "'use strict';\nvar $ = require('../internals/export');\nvar call = require('../internals/function-call');\nvar aCallable = require('../internals/a-callable');\nvar newPromiseCapabilityModule = require('../internals/new-promise-capability');\nvar perform = require('../internals/perform');\nvar iterate = require('../internals/iterate');\nvar PROMISE_STATICS_INCORRECT_ITERATION = require('../internals/promise-statics-incorrect-iteration');\n\n// `Promise.allSettled` method\n// https://tc39.es/ecma262/#sec-promise.allsettled\n$({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, {\n  allSettled: function allSettled(iterable) {\n    var C = this;\n    var capability = newPromiseCapabilityModule.f(C);\n    var resolve = capability.resolve;\n    var reject = capability.reject;\n    var result = perform(function () {\n      var promiseResolve = aCallable(C.resolve);\n      var values = [];\n      var counter = 0;\n      var remaining = 1;\n      iterate(iterable, function (promise) {\n        var index = counter++;\n        var alreadyCalled = false;\n        remaining++;\n        call(promiseResolve, C, promise).then(function (value) {\n          if (alreadyCalled) return;\n          alreadyCalled = true;\n          values[index] = { status: 'fulfilled', value: value };\n          --remaining || resolve(values);\n        }, function (error) {\n          if (alreadyCalled) return;\n          alreadyCalled = true;\n          values[index] = { status: 'rejected', reason: error };\n          --remaining || resolve(values);\n        });\n      });\n      --remaining || resolve(values);\n    });\n    if (result.error) reject(result.value);\n    return capability.promise;\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar call = require('../internals/function-call');\nvar aCallable = require('../internals/a-callable');\nvar getBuiltIn = require('../internals/get-built-in');\nvar newPromiseCapabilityModule = require('../internals/new-promise-capability');\nvar perform = require('../internals/perform');\nvar iterate = require('../internals/iterate');\nvar PROMISE_STATICS_INCORRECT_ITERATION = require('../internals/promise-statics-incorrect-iteration');\n\nvar PROMISE_ANY_ERROR = 'No one promise resolved';\n\n// `Promise.any` method\n// https://tc39.es/ecma262/#sec-promise.any\n$({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, {\n  any: function any(iterable) {\n    var C = this;\n    var AggregateError = getBuiltIn('AggregateError');\n    var capability = newPromiseCapabilityModule.f(C);\n    var resolve = capability.resolve;\n    var reject = capability.reject;\n    var result = perform(function () {\n      var promiseResolve = aCallable(C.resolve);\n      var errors = [];\n      var counter = 0;\n      var remaining = 1;\n      var alreadyResolved = false;\n      iterate(iterable, function (promise) {\n        var index = counter++;\n        var alreadyRejected = false;\n        remaining++;\n        call(promiseResolve, C, promise).then(function (value) {\n          if (alreadyRejected || alreadyResolved) return;\n          alreadyResolved = true;\n          resolve(value);\n        }, function (error) {\n          if (alreadyRejected || alreadyResolved) return;\n          alreadyRejected = true;\n          errors[index] = error;\n          --remaining || reject(new AggregateError(errors, PROMISE_ANY_ERROR));\n        });\n      });\n      --remaining || reject(new AggregateError(errors, PROMISE_ANY_ERROR));\n    });\n    if (result.error) reject(result.value);\n    return capability.promise;\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar IS_PURE = require('../internals/is-pure');\nvar NativePromiseConstructor = require('../internals/promise-native-constructor');\nvar fails = require('../internals/fails');\nvar getBuiltIn = require('../internals/get-built-in');\nvar isCallable = require('../internals/is-callable');\nvar speciesConstructor = require('../internals/species-constructor');\nvar promiseResolve = require('../internals/promise-resolve');\nvar defineBuiltIn = require('../internals/define-built-in');\n\nvar NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;\n\n// Safari bug https://bugs.webkit.org/show_bug.cgi?id=200829\nvar NON_GENERIC = !!NativePromiseConstructor && fails(function () {\n  // eslint-disable-next-line unicorn/no-thenable -- required for testing\n  NativePromisePrototype['finally'].call({ then: function () { /* empty */ } }, function () { /* empty */ });\n});\n\n// `Promise.prototype.finally` method\n// https://tc39.es/ecma262/#sec-promise.prototype.finally\n$({ target: 'Promise', proto: true, real: true, forced: NON_GENERIC }, {\n  'finally': function (onFinally) {\n    var C = speciesConstructor(this, getBuiltIn('Promise'));\n    var isFunction = isCallable(onFinally);\n    return this.then(\n      isFunction ? function (x) {\n        return promiseResolve(C, onFinally()).then(function () { return x; });\n      } : onFinally,\n      isFunction ? function (e) {\n        return promiseResolve(C, onFinally()).then(function () { throw e; });\n      } : onFinally\n    );\n  }\n});\n\n// makes sure that native promise-based APIs `Promise#finally` properly works with patched `Promise#then`\nif (!IS_PURE && isCallable(NativePromiseConstructor)) {\n  var method = getBuiltIn('Promise').prototype['finally'];\n  if (NativePromisePrototype['finally'] !== method) {\n    defineBuiltIn(NativePromisePrototype, 'finally', method, { unsafe: true });\n  }\n}\n", "'use strict';\nvar $ = require('../internals/export');\nvar globalThis = require('../internals/global-this');\nvar apply = require('../internals/function-apply');\nvar slice = require('../internals/array-slice');\nvar promiseResolve = require('../internals/promise-resolve');\nvar newPromiseCapabilityModule = require('../internals/new-promise-capability');\nvar aCallable = require('../internals/a-callable');\nvar perform = require('../internals/perform');\nvar fails = require('../internals/fails');\n\nvar Promise = globalThis.Promise;\n\nvar ACCEPT_ARGUMENTS = false;\nvar FORCED = !Promise || !Promise['try'] || fails(function () {\n  var p = Promise.resolve();\n  return Promise['try'](function (argument) {\n    // avoiding the use of polyfills of the previous iteration of this proposal\n    // that does not accept arguments of the callback\n    ACCEPT_ARGUMENTS = argument === 8;\n    return p;\n  // it should use `PromiseResolve`\n  // https://github.com/tc39/ecma262/pull/3883\n  }, 8) !== p;\n}) || !ACCEPT_ARGUMENTS;\n\n// `Promise.try` method\n// https://tc39.es/ecma262/#sec-promise.try\n$({ target: 'Promise', stat: true, forced: FORCED }, {\n  'try': function (callbackfn /* , ...args */) {\n    var args = arguments.length > 1 ? slice(arguments, 1) : [];\n    var result = perform(function () {\n      return apply(aCallable(callbackfn), undefined, args);\n    });\n    if (!result.error) return promiseResolve(this, result.value);\n    var promiseCapability = newPromiseCapabilityModule.f(this);\n    var reject = promiseCapability.reject;\n    reject(result.value);\n    return promiseCapability.promise;\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar newPromiseCapabilityModule = require('../internals/new-promise-capability');\n\n// `Promise.withResolvers` method\n// https://tc39.es/ecma262/#sec-promise.withResolvers\n$({ target: 'Promise', stat: true }, {\n  withResolvers: function withResolvers() {\n    var promiseCapability = newPromiseCapabilityModule.f(this);\n    return {\n      promise: promiseCapability.promise,\n      resolve: promiseCapability.resolve,\n      reject: promiseCapability.reject\n    };\n  }\n});\n", "'use strict';\nvar globalThis = require('../internals/global-this');\nvar shared = require('../internals/shared-store');\nvar isCallable = require('../internals/is-callable');\nvar create = require('../internals/object-create');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar defineBuiltIn = require('../internals/define-built-in');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar IS_PURE = require('../internals/is-pure');\n\nvar USE_FUNCTION_CONSTRUCTOR = 'USE_FUNCTION_CONSTRUCTOR';\nvar ASYNC_ITERATOR = wellKnownSymbol('asyncIterator');\nvar AsyncIterator = globalThis.AsyncIterator;\nvar PassedAsyncIteratorPrototype = shared.AsyncIteratorPrototype;\nvar AsyncIteratorPrototype, prototype;\n\nif (PassedAsyncIteratorPrototype) {\n  AsyncIteratorPrototype = PassedAsyncIteratorPrototype;\n} else if (isCallable(AsyncIterator)) {\n  AsyncIteratorPrototype = AsyncIterator.prototype;\n} else if (shared[USE_FUNCTION_CONSTRUCTOR] || globalThis[USE_FUNCTION_CONSTRUCTOR]) {\n  try {\n    // eslint-disable-next-line no-new-func -- we have no alternatives without usage of modern syntax\n    prototype = getPrototypeOf(getPrototypeOf(getPrototypeOf(Function('return async function*(){}()')())));\n    if (getPrototypeOf(prototype) === Object.prototype) AsyncIteratorPrototype = prototype;\n  } catch (error) { /* empty */ }\n}\n\nif (!AsyncIteratorPrototype) AsyncIteratorPrototype = {};\nelse if (IS_PURE) AsyncIteratorPrototype = create(AsyncIteratorPrototype);\n\nif (!isCallable(AsyncIteratorPrototype[ASYNC_ITERATOR])) {\n  defineBuiltIn(AsyncIteratorPrototype, ASYNC_ITERATOR, function () {\n    return this;\n  });\n}\n\nmodule.exports = AsyncIteratorPrototype;\n", "'use strict';\nvar call = require('../internals/function-call');\nvar anObject = require('../internals/an-object');\nvar create = require('../internals/object-create');\nvar getMethod = require('../internals/get-method');\nvar defineBuiltIns = require('../internals/define-built-ins');\nvar InternalStateModule = require('../internals/internal-state');\nvar iteratorClose = require('../internals/iterator-close');\nvar getBuiltIn = require('../internals/get-built-in');\nvar AsyncIteratorPrototype = require('../internals/async-iterator-prototype');\nvar createIterResultObject = require('../internals/create-iter-result-object');\n\nvar Promise = getBuiltIn('Promise');\n\nvar ASYNC_FROM_SYNC_ITERATOR = 'AsyncFromSyncIterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(ASYNC_FROM_SYNC_ITERATOR);\n\nvar asyncFromSyncIteratorContinuation = function (result, resolve, reject, syncIterator, closeOnRejection) {\n  var done = result.done;\n  Promise.resolve(result.value).then(function (value) {\n    resolve(createIterResultObject(value, done));\n  }, function (error) {\n    if (!done && closeOnRejection) {\n      try {\n        iteratorClose(syncIterator, 'throw', error);\n      } catch (error2) {\n        error = error2;\n      }\n    }\n\n    reject(error);\n  });\n};\n\nvar AsyncFromSyncIterator = function AsyncIterator(iteratorRecord) {\n  iteratorRecord.type = ASYNC_FROM_SYNC_ITERATOR;\n  setInternalState(this, iteratorRecord);\n};\n\nAsyncFromSyncIterator.prototype = defineBuiltIns(create(AsyncIteratorPrototype), {\n  next: function next() {\n    var state = getInternalState(this);\n    var hasValue = arguments.length > 0;\n    var value = hasValue ? arguments[0] : undefined;\n    return new Promise(function (resolve, reject) {\n      var result = anObject(hasValue ? call(state.next, state.iterator, value) : call(state.next, state.iterator));\n      asyncFromSyncIteratorContinuation(result, resolve, reject, state.iterator, true);\n    });\n  },\n  'return': function () {\n    var state = getInternalState(this);\n    var iterator = state.iterator;\n    var hasValue = arguments.length > 0;\n    var value = hasValue ? arguments[0] : undefined;\n    return new Promise(function (resolve, reject) {\n      var $return = getMethod(iterator, 'return');\n      if ($return === undefined) return resolve(createIterResultObject(value, true));\n      var result = anObject(hasValue ? call($return, iterator, value) : call($return, iterator));\n      asyncFromSyncIteratorContinuation(result, resolve, reject, iterator);\n    });\n  },\n  'throw': function () {\n    var state = getInternalState(this);\n    var iterator = state.iterator;\n    var hasValue = arguments.length > 0;\n    var value = hasValue ? arguments[0] : undefined;\n    return new Promise(function (resolve, reject) {\n      var $throw = getMethod(iterator, 'throw');\n      if ($throw === undefined) {\n        try {\n          iteratorClose(iterator, 'normal');\n        } catch (error) {\n          return reject(error);\n        }\n        return reject(new TypeError('The iterator does not provide a throw method'));\n      }\n      var result = anObject(hasValue ? call($throw, iterator, value) : call($throw, iterator));\n      asyncFromSyncIteratorContinuation(result, resolve, reject, iterator, true);\n    });\n  }\n});\n\nmodule.exports = AsyncFromSyncIterator;\n", "'use strict';\nvar call = require('../internals/function-call');\nvar AsyncFromSyncIterator = require('../internals/async-from-sync-iterator');\nvar anObject = require('../internals/an-object');\nvar getIterator = require('../internals/get-iterator-internal');\nvar getIteratorDirect = require('../internals/get-iterator-direct');\nvar getMethod = require('../internals/get-method');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ASYNC_ITERATOR = wellKnownSymbol('asyncIterator');\n\nmodule.exports = function (it, usingIterator) {\n  var method = arguments.length < 2 ? getMethod(it, ASYNC_ITERATOR) : usingIterator;\n  return method ? anObject(call(method, it)) : new AsyncFromSyncIterator(getIteratorDirect(getIterator(it)));\n};\n", "'use strict';\nvar call = require('../internals/function-call');\nvar anObject = require('../internals/an-object');\nvar getBuiltIn = require('../internals/get-built-in');\nvar getMethod = require('../internals/get-method');\n\nmodule.exports = function (iterator, method, argument, reject) {\n  try {\n    var returnMethod = getMethod(iterator, 'return');\n    if (returnMethod) {\n      return getBuiltIn('Promise').resolve(call(returnMethod, iterator)).then(function (result) {\n        try {\n          if (method !== reject) anObject(result);\n        } catch (error3) {\n          reject(error3);\n          return;\n        }\n        method(argument);\n      }, function (error) {\n        method === reject ? method(argument) : reject(error);\n      });\n    }\n  } catch (error2) {\n    // the original error (`argument`) takes priority over `return()` errors\n    return method === reject ? reject(argument) : reject(error2);\n  } method(argument);\n};\n", "'use strict';\n// https://github.com/tc39/proposal-async-iterator-helpers\n// https://github.com/tc39/proposal-array-from-async\nvar call = require('../internals/function-call');\nvar aCallable = require('../internals/a-callable');\nvar anObject = require('../internals/an-object');\nvar isObject = require('../internals/is-object');\nvar doesNotExceedSafeInteger = require('../internals/does-not-exceed-safe-integer');\nvar getBuiltIn = require('../internals/get-built-in');\nvar createProperty = require('../internals/create-property');\nvar setArrayLength = require('../internals/array-set-length');\nvar getIteratorDirect = require('../internals/get-iterator-direct');\nvar closeAsyncIteration = require('../internals/async-iterator-close');\n\nvar createMethod = function (TYPE) {\n  var IS_TO_ARRAY = TYPE === 0;\n  var IS_FOR_EACH = TYPE === 1;\n  var IS_EVERY = TYPE === 2;\n  var IS_SOME = TYPE === 3;\n  return function (object, fn, target) {\n    anObject(object);\n    var MAPPING = fn !== undefined;\n    if (MAPPING || !IS_TO_ARRAY) aCallable(fn);\n    var record = getIteratorDirect(object);\n    var Promise = getBuiltIn('Promise');\n    var iterator = record.iterator;\n    var next = record.next;\n    var counter = 0;\n\n    return new Promise(function (resolve, reject) {\n      var ifAbruptCloseAsyncIterator = function (error) {\n        closeAsyncIteration(iterator, reject, error, reject);\n      };\n\n      var loop = function () {\n        try {\n          try {\n            doesNotExceedSafeInteger(counter);\n          } catch (error5) {\n            return ifAbruptCloseAsyncIterator(error5);\n          }\n          Promise.resolve(anObject(call(next, iterator))).then(function (step) {\n            try {\n              if (anObject(step).done) {\n                if (IS_TO_ARRAY) {\n                  setArrayLength(target, counter);\n                  resolve(target);\n                } else resolve(IS_SOME ? false : IS_EVERY || undefined);\n              } else {\n                var value = step.value;\n                try {\n                  if (MAPPING) {\n                    var index = counter++;\n                    var result = fn(value, index);\n\n                    var handler = function ($result) {\n                      if (IS_FOR_EACH) {\n                        loop();\n                      } else if (IS_EVERY) {\n                        $result ? loop() : closeAsyncIteration(iterator, resolve, false, reject);\n                      } else if (IS_TO_ARRAY) {\n                        try {\n                          createProperty(target, index, $result);\n                          loop();\n                        } catch (error4) { ifAbruptCloseAsyncIterator(error4); }\n                      } else {\n                        $result ? closeAsyncIteration(iterator, resolve, IS_SOME || value, reject) : loop();\n                      }\n                    };\n\n                    if (isObject(result)) Promise.resolve(result).then(handler, ifAbruptCloseAsyncIterator);\n                    else handler(result);\n                  } else {\n                    createProperty(target, counter++, value);\n                    loop();\n                  }\n                } catch (error3) { ifAbruptCloseAsyncIterator(error3); }\n              }\n            } catch (error2) { reject(error2); }\n          }, reject);\n        } catch (error) { reject(error); }\n      };\n\n      loop();\n    });\n  };\n};\n\nmodule.exports = {\n  // `AsyncIterator.prototype.toArray` / `Array.fromAsync` methods\n  toArray: createMethod(0),\n  // `AsyncIterator.prototype.forEach` method\n  forEach: createMethod(1),\n  // `AsyncIterator.prototype.every` method\n  every: createMethod(2),\n  // `AsyncIterator.prototype.some` method\n  some: createMethod(3),\n  // `AsyncIterator.prototype.find` method\n  find: createMethod(4)\n};\n", "'use strict';\nvar bind = require('../internals/function-bind-context');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar isConstructor = require('../internals/is-constructor');\nvar getAsyncIterator = require('../internals/get-async-iterator');\nvar getIterator = require('../internals/get-iterator-internal');\nvar getIteratorDirect = require('../internals/get-iterator-direct');\nvar getIteratorMethod = require('../internals/get-iterator-method-internal');\nvar getMethod = require('../internals/get-method');\nvar getBuiltIn = require('../internals/get-built-in');\nvar getBuiltInPrototypeMethod = require('../internals/get-built-in-prototype-method');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar AsyncFromSyncIterator = require('../internals/async-from-sync-iterator');\nvar toArray = require('../internals/async-iterator-iteration').toArray;\n\nvar ASYNC_ITERATOR = wellKnownSymbol('asyncIterator');\nvar arrayIterator = uncurryThis(getBuiltInPrototypeMethod('Array', 'values'));\nvar arrayIteratorNext = uncurryThis(arrayIterator([]).next);\n\nvar safeArrayIterator = function () {\n  return new SafeArrayIterator(this);\n};\n\nvar SafeArrayIterator = function (O) {\n  this.iterator = arrayIterator(O);\n};\n\nSafeArrayIterator.prototype.next = function () {\n  return arrayIteratorNext(this.iterator);\n};\n\n// `Array.fromAsync` method implementation\n// https://github.com/tc39/proposal-array-from-async\nmodule.exports = function fromAsync(items /* , mapfn = undefined, thisArg = undefined */) {\n  var C = this;\n  var argumentsLength = arguments.length;\n  var mapfn = argumentsLength > 1 ? arguments[1] : undefined;\n  var thisArg = argumentsLength > 2 ? arguments[2] : undefined;\n  return new (getBuiltIn('Promise'))(function (resolve) {\n    if (mapfn !== undefined) mapfn = bind(mapfn, thisArg);\n    var usingAsyncIterator = getMethod(items, ASYNC_ITERATOR);\n    var usingSyncIterator = usingAsyncIterator ? undefined : getIteratorMethod(items) || safeArrayIterator;\n    var A = isConstructor(C) ? new C() : [];\n    var iterator = usingAsyncIterator\n      ? getAsyncIterator(items, usingAsyncIterator)\n      : new AsyncFromSyncIterator(getIteratorDirect(getIterator(items, usingSyncIterator)));\n    resolve(toArray(iterator, mapfn, A));\n  });\n};\n", "'use strict';\nvar $ = require('../internals/export');\nvar fromAsync = require('../internals/array-from-async');\nvar fails = require('../internals/fails');\n\n// eslint-disable-next-line es/no-array-fromasync -- safe\nvar nativeFromAsync = Array.fromAsync;\n// https://bugs.webkit.org/show_bug.cgi?id=271703\nvar INCORRECT_CONSTRUCTURING = !nativeFromAsync || fails(function () {\n  var counter = 0;\n  nativeFromAsync.call(function () {\n    counter++;\n    return [];\n  }, { length: 0 });\n  return counter !== 1;\n});\n\n// `Array.fromAsync` method\n// https://tc39.es/ecma262/#sec-array.fromasync\n$({ target: 'Array', stat: true, forced: INCORRECT_CONSTRUCTURING }, {\n  fromAsync: fromAsync\n});\n", "'use strict';\n// https://github.com/tc39/proposal-async-explicit-resource-management\nvar $ = require('../internals/export');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar getBuiltIn = require('../internals/get-built-in');\nvar aCallable = require('../internals/a-callable');\nvar anInstance = require('../internals/an-instance');\nvar defineBuiltIn = require('../internals/define-built-in');\nvar defineBuiltIns = require('../internals/define-built-ins');\nvar defineBuiltInAccessor = require('../internals/define-built-in-accessor');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar InternalStateModule = require('../internals/internal-state');\nvar addDisposableResource = require('../internals/add-disposable-resource');\nvar V8_VERSION = require('../internals/environment-v8-version');\n\nvar Promise = getBuiltIn('Promise');\nvar SuppressedError = getBuiltIn('SuppressedError');\nvar $ReferenceError = ReferenceError;\n\nvar ASYNC_DISPOSE = wellKnownSymbol('asyncDispose');\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\n\nvar ASYNC_DISPOSABLE_STACK = 'AsyncDisposableStack';\nvar setInternalState = InternalStateModule.set;\nvar getAsyncDisposableStackInternalState = InternalStateModule.getterFor(ASYNC_DISPOSABLE_STACK);\n\nvar HINT = 'async-dispose';\nvar DISPOSED = 'disposed';\nvar PENDING = 'pending';\n\nvar getPendingAsyncDisposableStackInternalState = function (stack) {\n  var internalState = getAsyncDisposableStackInternalState(stack);\n  if (internalState.state === DISPOSED) throw new $ReferenceError(ASYNC_DISPOSABLE_STACK + ' already disposed');\n  return internalState;\n};\n\nvar $AsyncDisposableStack = function AsyncDisposableStack() {\n  setInternalState(anInstance(this, AsyncDisposableStackPrototype), {\n    type: ASYNC_DISPOSABLE_STACK,\n    state: PENDING,\n    stack: []\n  });\n\n  if (!DESCRIPTORS) this.disposed = false;\n};\n\nvar AsyncDisposableStackPrototype = $AsyncDisposableStack.prototype;\n\ndefineBuiltIns(AsyncDisposableStackPrototype, {\n  disposeAsync: function disposeAsync() {\n    var asyncDisposableStack = this;\n    return new Promise(function (resolve, reject) {\n      var internalState = getAsyncDisposableStackInternalState(asyncDisposableStack);\n      if (internalState.state === DISPOSED) return resolve(undefined);\n      internalState.state = DISPOSED;\n      if (!DESCRIPTORS) asyncDisposableStack.disposed = true;\n      var stack = internalState.stack;\n      var i = stack.length;\n      var thrown = false;\n      var suppressed;\n\n      var handleError = function (result) {\n        if (thrown) {\n          suppressed = new SuppressedError(result, suppressed);\n        } else {\n          thrown = true;\n          suppressed = result;\n        }\n\n        loop();\n      };\n\n      var loop = function () {\n        if (i) {\n          var disposeMethod = stack[--i];\n          stack[i] = null;\n          try {\n            Promise.resolve(disposeMethod()).then(loop, handleError);\n          } catch (error) {\n            handleError(error);\n          }\n        } else {\n          internalState.stack = null;\n          thrown ? reject(suppressed) : resolve(undefined);\n        }\n      };\n\n      loop();\n    });\n  },\n  use: function use(value) {\n    addDisposableResource(getPendingAsyncDisposableStackInternalState(this), value, HINT);\n    return value;\n  },\n  adopt: function adopt(value, onDispose) {\n    var internalState = getPendingAsyncDisposableStackInternalState(this);\n    aCallable(onDispose);\n    addDisposableResource(internalState, undefined, HINT, function () {\n      return onDispose(value);\n    });\n    return value;\n  },\n  defer: function defer(onDispose) {\n    var internalState = getPendingAsyncDisposableStackInternalState(this);\n    aCallable(onDispose);\n    addDisposableResource(internalState, undefined, HINT, onDispose);\n  },\n  move: function move() {\n    var internalState = getPendingAsyncDisposableStackInternalState(this);\n    var newAsyncDisposableStack = new $AsyncDisposableStack();\n    getAsyncDisposableStackInternalState(newAsyncDisposableStack).stack = internalState.stack;\n    internalState.stack = [];\n    internalState.state = DISPOSED;\n    if (!DESCRIPTORS) this.disposed = true;\n    return newAsyncDisposableStack;\n  }\n});\n\nif (DESCRIPTORS) defineBuiltInAccessor(AsyncDisposableStackPrototype, 'disposed', {\n  configurable: true,\n  get: function disposed() {\n    return getAsyncDisposableStackInternalState(this).state === DISPOSED;\n  }\n});\n\ndefineBuiltIn(AsyncDisposableStackPrototype, ASYNC_DISPOSE, AsyncDisposableStackPrototype.disposeAsync, { name: 'disposeAsync' });\ndefineBuiltIn(AsyncDisposableStackPrototype, TO_STRING_TAG, ASYNC_DISPOSABLE_STACK, { nonWritable: true });\n\n// https://github.com/tc39/proposal-explicit-resource-management/issues/256\n// can't be detected synchronously\nvar SYNC_DISPOSE_RETURNING_PROMISE_RESOLUTION_BUG = V8_VERSION && V8_VERSION < 136;\n\n$({ global: true, constructor: true, forced: SYNC_DISPOSE_RETURNING_PROMISE_RESOLUTION_BUG }, {\n  AsyncDisposableStack: $AsyncDisposableStack\n});\n", "'use strict';\n// https://github.com/tc39/proposal-async-explicit-resource-management\nvar call = require('../internals/function-call');\nvar defineBuiltIn = require('../internals/define-built-in');\nvar getBuiltIn = require('../internals/get-built-in');\nvar getMethod = require('../internals/get-method');\nvar hasOwn = require('../internals/has-own-property');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar AsyncIteratorPrototype = require('../internals/async-iterator-prototype');\n\nvar ASYNC_DISPOSE = wellKnownSymbol('asyncDispose');\nvar Promise = getBuiltIn('Promise');\n\nif (!hasOwn(AsyncIteratorPrototype, ASYNC_DISPOSE)) {\n  defineBuiltIn(AsyncIteratorPrototype, ASYNC_DISPOSE, function () {\n    var O = this;\n    return new Promise(function (resolve, reject) {\n      var $return = getMethod(O, 'return');\n      if ($return) {\n        Promise.resolve(call($return, O)).then(function () {\n          resolve(undefined);\n        }, reject);\n      } else resolve(undefined);\n    });\n  });\n}\n", "'use strict';\nvar $ = require('../internals/export');\nvar functionApply = require('../internals/function-apply');\nvar aCallable = require('../internals/a-callable');\nvar anObject = require('../internals/an-object');\nvar fails = require('../internals/fails');\n\n// MS Edge argumentsList argument is optional\nvar OPTIONAL_ARGUMENTS_LIST = !fails(function () {\n  // eslint-disable-next-line es/no-reflect -- required for testing\n  Reflect.apply(function () { /* empty */ });\n});\n\n// `Reflect.apply` method\n// https://tc39.es/ecma262/#sec-reflect.apply\n$({ target: 'Reflect', stat: true, forced: OPTIONAL_ARGUMENTS_LIST }, {\n  apply: function apply(target, thisArgument, argumentsList) {\n    return functionApply(aCallable(target), thisArgument, anObject(argumentsList));\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar getBuiltIn = require('../internals/get-built-in');\nvar apply = require('../internals/function-apply');\nvar bind = require('../internals/function-bind');\nvar aConstructor = require('../internals/a-constructor');\nvar anObject = require('../internals/an-object');\nvar isObject = require('../internals/is-object');\nvar create = require('../internals/object-create');\nvar fails = require('../internals/fails');\n\nvar nativeConstruct = getBuiltIn('Reflect', 'construct');\nvar ObjectPrototype = Object.prototype;\nvar push = [].push;\n\n// `Reflect.construct` method\n// https://tc39.es/ecma262/#sec-reflect.construct\n// MS Edge supports only 2 arguments and argumentsList argument is optional\n// FF Nightly sets third argument as `new.target`, but does not create `this` from it\nvar NEW_TARGET_BUG = fails(function () {\n  function F() { /* empty */ }\n  return !(nativeConstruct(function () { /* empty */ }, [], F) instanceof F);\n});\n\nvar ARGS_BUG = !fails(function () {\n  nativeConstruct(function () { /* empty */ });\n});\n\nvar FORCED = NEW_TARGET_BUG || ARGS_BUG;\n\n$({ target: 'Reflect', stat: true, forced: FORCED, sham: FORCED }, {\n  construct: function construct(Target, args /* , newTarget */) {\n    aConstructor(Target);\n    var newTarget = arguments.length < 3 ? Target : aConstructor(arguments[2]);\n    anObject(args);\n    if (ARGS_BUG && !NEW_TARGET_BUG) return nativeConstruct(Target, args, newTarget);\n    if (Target === newTarget) {\n      // w/o altered newTarget, optimization for 0-4 arguments\n      switch (args.length) {\n        case 0: return new Target();\n        case 1: return new Target(args[0]);\n        case 2: return new Target(args[0], args[1]);\n        case 3: return new Target(args[0], args[1], args[2]);\n        case 4: return new Target(args[0], args[1], args[2], args[3]);\n      }\n      // w/o altered newTarget, lot of arguments case\n      var $args = [null];\n      apply(push, $args, args);\n      return new (apply(bind, Target, $args))();\n    }\n    // with altered newTarget, not support built-in constructors\n    var proto = newTarget.prototype;\n    var instance = create(isObject(proto) ? proto : ObjectPrototype);\n    var result = apply(Target, instance, args);\n    return isObject(result) ? result : instance;\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar anObject = require('../internals/an-object');\nvar toPropertyKey = require('../internals/to-property-key');\nvar definePropertyModule = require('../internals/object-define-property');\nvar isCallable = require('../internals/is-callable');\nvar fails = require('../internals/fails');\n\nvar $TypeError = TypeError;\n\n// MS Edge has broken Reflect.defineProperty - throwing instead of returning false\nvar ERROR_INSTEAD_OF_FALSE = fails(function () {\n  // eslint-disable-next-line es/no-reflect -- required for testing\n  Reflect.defineProperty(definePropertyModule.f({}, 1, { value: 1 }), 1, { value: 2 });\n});\n\n// `Reflect.defineProperty` method\n// https://tc39.es/ecma262/#sec-reflect.defineproperty\n$({ target: 'Reflect', stat: true, forced: ERROR_INSTEAD_OF_FALSE, sham: !DESCRIPTORS }, {\n  defineProperty: function defineProperty(target, propertyKey, attributes) {\n    anObject(target);\n    var key = toPropertyKey(propertyKey);\n    var get, set;\n    anObject(attributes);\n    // propagate `ToPropertyDescriptor` errors instead of catching them\n    if (('get' in attributes || 'set' in attributes) && (\n      ('get' in attributes && !isCallable(get = attributes.get) && get !== undefined) ||\n      ('set' in attributes && !isCallable(set = attributes.set) && set !== undefined) ||\n      ('value' in attributes || 'writable' in attributes)\n    )) throw new $TypeError('Invalid property descriptor');\n    try {\n      definePropertyModule.f(target, key, attributes);\n      return true;\n    } catch (error) {\n      return false;\n    }\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar anObject = require('../internals/an-object');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar toPropertyKey = require('../internals/to-property-key');\n\n// `Reflect.deleteProperty` method\n// https://tc39.es/ecma262/#sec-reflect.deleteproperty\n$({ target: 'Reflect', stat: true }, {\n  deleteProperty: function deleteProperty(target, propertyKey) {\n    anObject(target);\n    var key = toPropertyKey(propertyKey);\n    var descriptor = getOwnPropertyDescriptor(target, key);\n    return descriptor && !descriptor.configurable ? false : delete target[key];\n  }\n});\n", "'use strict';\nvar hasOwn = require('../internals/has-own-property');\n\nmodule.exports = function (descriptor) {\n  return descriptor !== undefined && (hasOwn(descriptor, 'value') || hasOwn(descriptor, 'writable'));\n};\n", "'use strict';\nvar $ = require('../internals/export');\nvar call = require('../internals/function-call');\nvar isObject = require('../internals/is-object');\nvar anObject = require('../internals/an-object');\nvar isDataDescriptor = require('../internals/is-data-descriptor');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar toPropertyKey = require('../internals/to-property-key');\n\n// `Reflect.get` method\n// https://tc39.es/ecma262/#sec-reflect.get\nvar $get = function (target, propertyKey, receiver) {\n  if (anObject(target) === receiver) return target[propertyKey];\n  var descriptor = getOwnPropertyDescriptorModule.f(target, propertyKey);\n  if (descriptor) return isDataDescriptor(descriptor)\n    ? descriptor.value\n    : descriptor.get === undefined ? undefined : call(descriptor.get, receiver);\n  var prototype = getPrototypeOf(target);\n  if (isObject(prototype)) return $get(prototype, propertyKey, receiver);\n};\n\n$({ target: 'Reflect', stat: true }, {\n  get: function get(target, propertyKey /* , receiver */) {\n    return $get(anObject(target), toPropertyKey(propertyKey), arguments.length < 3 ? target : arguments[2]);\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar anObject = require('../internals/an-object');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\n\n// `Reflect.getOwnPropertyDescriptor` method\n// https://tc39.es/ecma262/#sec-reflect.getownpropertydescriptor\n$({ target: 'Reflect', stat: true, sham: !DESCRIPTORS }, {\n  getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey) {\n    return getOwnPropertyDescriptorModule.f(anObject(target), propertyKey);\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar anObject = require('../internals/an-object');\nvar objectGetPrototypeOf = require('../internals/object-get-prototype-of');\nvar CORRECT_PROTOTYPE_GETTER = require('../internals/correct-prototype-getter');\n\n// `Reflect.getPrototypeOf` method\n// https://tc39.es/ecma262/#sec-reflect.getprototypeof\n$({ target: 'Reflect', stat: true, sham: !CORRECT_PROTOTYPE_GETTER }, {\n  getPrototypeOf: function getPrototypeOf(target) {\n    return objectGetPrototypeOf(anObject(target));\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\n\n// `Reflect.has` method\n// https://tc39.es/ecma262/#sec-reflect.has\n$({ target: 'Reflect', stat: true }, {\n  has: function has(target, propertyKey) {\n    return propertyKey in target;\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar anObject = require('../internals/an-object');\nvar $isExtensible = require('../internals/object-is-extensible');\n\n// `Reflect.isExtensible` method\n// https://tc39.es/ecma262/#sec-reflect.isextensible\n$({ target: 'Reflect', stat: true }, {\n  isExtensible: function isExtensible(target) {\n    anObject(target);\n    return $isExtensible(target);\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar ownKeys = require('../internals/own-keys');\n\n// `Reflect.ownKeys` method\n// https://tc39.es/ecma262/#sec-reflect.ownkeys\n$({ target: 'Reflect', stat: true }, {\n  ownKeys: ownKeys\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar getBuiltIn = require('../internals/get-built-in');\nvar anObject = require('../internals/an-object');\nvar FREEZING = require('../internals/freezing');\n\n// `Reflect.preventExtensions` method\n// https://tc39.es/ecma262/#sec-reflect.preventextensions\n$({ target: 'Reflect', stat: true, sham: !FREEZING }, {\n  preventExtensions: function preventExtensions(target) {\n    anObject(target);\n    try {\n      var objectPreventExtensions = getBuiltIn('Object', 'preventExtensions');\n      if (objectPreventExtensions) objectPreventExtensions(target);\n      return true;\n    } catch (error) {\n      return false;\n    }\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar call = require('../internals/function-call');\nvar anObject = require('../internals/an-object');\nvar isObject = require('../internals/is-object');\nvar isDataDescriptor = require('../internals/is-data-descriptor');\nvar fails = require('../internals/fails');\nvar definePropertyModule = require('../internals/object-define-property');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar toPropertyKey = require('../internals/to-property-key');\n\n// `Reflect.set` method\n// https://tc39.es/ecma262/#sec-reflect.set\nvar $set = function (target, propertyKey, V, receiver) {\n  var ownDescriptor = getOwnPropertyDescriptorModule.f(anObject(target), propertyKey);\n  var existingDescriptor, prototype, setter;\n  if (!ownDescriptor) {\n    if (isObject(prototype = getPrototypeOf(target))) {\n      return $set(prototype, propertyKey, V, receiver);\n    }\n    ownDescriptor = createPropertyDescriptor(0);\n  }\n  if (isDataDescriptor(ownDescriptor)) {\n    if (ownDescriptor.writable === false || !isObject(receiver)) return false;\n    if (existingDescriptor = getOwnPropertyDescriptorModule.f(receiver, propertyKey)) {\n      if (!isDataDescriptor(existingDescriptor) || existingDescriptor.writable === false) return false;\n      definePropertyModule.f(receiver, propertyKey, { value: V });\n    } else try {\n      definePropertyModule.f(receiver, propertyKey, createPropertyDescriptor(0, V));\n    } catch (error) {\n      return false;\n    }\n  } else {\n    setter = ownDescriptor.set;\n    if (setter === undefined) return false;\n    call(setter, receiver, V);\n  } return true;\n};\n\n// MS Edge 17-18 Reflect.set allows setting the property to object\n// with non-writable property on the prototype\nvar MS_EDGE_BUG = fails(function () {\n  var Constructor = function () { /* empty */ };\n  var object = definePropertyModule.f(new Constructor(), 'a', { configurable: true });\n  // eslint-disable-next-line es/no-reflect -- required for testing\n  return Reflect.set(Constructor.prototype, 'a', 1, object) !== false;\n});\n\n$({ target: 'Reflect', stat: true, forced: MS_EDGE_BUG }, {\n  set: function set(target, propertyKey, V /* , receiver */) {\n    return $set(anObject(target), toPropertyKey(propertyKey), V, arguments.length < 4 ? target : arguments[3]);\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar anObject = require('../internals/an-object');\nvar aPossiblePrototype = require('../internals/a-possible-prototype');\nvar objectSetPrototypeOf = require('../internals/object-set-prototype-of');\n\n// `Reflect.setPrototypeOf` method\n// https://tc39.es/ecma262/#sec-reflect.setprototypeof\nif (objectSetPrototypeOf) $({ target: 'Reflect', stat: true }, {\n  setPrototypeOf: function setPrototypeOf(target, proto) {\n    anObject(target);\n    aPossiblePrototype(proto);\n    try {\n      objectSetPrototypeOf(target, proto);\n      return true;\n    } catch (error) {\n      return false;\n    }\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar globalThis = require('../internals/global-this');\nvar setToStringTag = require('../internals/set-to-string-tag');\n\n$({ global: true }, { Reflect: {} });\n\n// Reflect[@@toStringTag] property\n// https://tc39.es/ecma262/#sec-reflect-@@tostringtag\nsetToStringTag(globalThis.Reflect, 'Reflect', true);\n", "'use strict';\nvar isObject = require('../internals/is-object');\nvar classof = require('../internals/classof-raw');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar MATCH = wellKnownSymbol('match');\n\n// `IsRegExp` abstract operation\n// https://tc39.es/ecma262/#sec-isregexp\nmodule.exports = function (it) {\n  var isRegExp;\n  return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classof(it) === 'RegExp');\n};\n", "'use strict';\nvar globalThis = require('../internals/global-this');\nvar fails = require('../internals/fails');\n\n// babel-minify and Closure Compiler transpiles RegExp('.', 'd') -> /./d and it causes SyntaxError\nvar RegExp = globalThis.RegExp;\n\nvar FLAGS_GETTER_IS_CORRECT = !fails(function () {\n  var INDICES_SUPPORT = true;\n  try {\n    RegExp('.', 'd');\n  } catch (error) {\n    INDICES_SUPPORT = false;\n  }\n\n  var O = {};\n  // modern V8 bug\n  var calls = '';\n  var expected = INDICES_SUPPORT ? 'dgimsy' : 'gimsy';\n\n  var addGetter = function (key, chr) {\n    // eslint-disable-next-line es/no-object-defineproperty -- safe\n    Object.defineProperty(O, key, { get: function () {\n      calls += chr;\n      return true;\n    } });\n  };\n\n  var pairs = {\n    dotAll: 's',\n    global: 'g',\n    ignoreCase: 'i',\n    multiline: 'm',\n    sticky: 'y'\n  };\n\n  if (INDICES_SUPPORT) pairs.hasIndices = 'd';\n\n  for (var key in pairs) addGetter(key, pairs[key]);\n\n  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\n  var result = Object.getOwnPropertyDescriptor(RegExp.prototype, 'flags').get.call(O);\n\n  return result !== expected || calls !== expected;\n});\n\nmodule.exports = { correct: FLAGS_GETTER_IS_CORRECT };\n", "'use strict';\nvar anObject = require('../internals/an-object');\n\n// `RegExp.prototype.flags` getter implementation\n// https://tc39.es/ecma262/#sec-get-regexp.prototype.flags\nmodule.exports = function () {\n  var that = anObject(this);\n  var result = '';\n  if (that.hasIndices) result += 'd';\n  if (that.global) result += 'g';\n  if (that.ignoreCase) result += 'i';\n  if (that.multiline) result += 'm';\n  if (that.dotAll) result += 's';\n  if (that.unicode) result += 'u';\n  if (that.unicodeSets) result += 'v';\n  if (that.sticky) result += 'y';\n  return result;\n};\n", "'use strict';\nvar call = require('../internals/function-call');\nvar hasOwn = require('../internals/has-own-property');\nvar isPrototypeOf = require('../internals/object-is-prototype-of');\nvar regExpFlagsDetection = require('../internals/regexp-flags-detection');\nvar regExpFlagsGetterImplementation = require('../internals/regexp-flags');\n\nvar RegExpPrototype = RegExp.prototype;\n\nmodule.exports = regExpFlagsDetection.correct ? function (it) {\n  return it.flags;\n} : function (it) {\n  return (!regExpFlagsDetection.correct && isPrototypeOf(RegExpPrototype, it) && !hasOwn(it, 'flags'))\n    ? call(regExpFlagsGetterImplementation, it)\n    : it.flags;\n};\n", "'use strict';\nvar fails = require('../internals/fails');\nvar globalThis = require('../internals/global-this');\n\n// babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError\nvar $RegExp = globalThis.RegExp;\n\nvar UNSUPPORTED_Y = fails(function () {\n  var re = $RegExp('a', 'y');\n  re.lastIndex = 2;\n  return re.exec('abcd') !== null;\n});\n\n// UC Browser bug\n// https://github.com/zloirock/core-js/issues/1008\nvar MISSED_STICKY = UNSUPPORTED_Y || fails(function () {\n  return !$RegExp('a', 'y').sticky;\n});\n\nvar BROKEN_CARET = UNSUPPORTED_Y || fails(function () {\n  // https://bugzilla.mozilla.org/show_bug.cgi?id=773687\n  var re = $RegExp('^r', 'gy');\n  re.lastIndex = 2;\n  return re.exec('str') !== null;\n});\n\nmodule.exports = {\n  BROKEN_CARET: BROKEN_CARET,\n  MISSED_STICKY: MISSED_STICKY,\n  UNSUPPORTED_Y: UNSUPPORTED_Y\n};\n", "'use strict';\nvar fails = require('../internals/fails');\nvar globalThis = require('../internals/global-this');\n\n// babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError\nvar $RegExp = globalThis.RegExp;\n\nmodule.exports = fails(function () {\n  var re = $RegExp('.', 's');\n  return !(re.dotAll && re.test('\\n') && re.flags === 's');\n});\n", "'use strict';\nvar fails = require('../internals/fails');\nvar globalThis = require('../internals/global-this');\n\n// babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError\nvar $RegExp = globalThis.RegExp;\n\nmodule.exports = fails(function () {\n  var re = $RegExp('(?<a>b)', 'g');\n  return re.exec('b').groups.a !== 'b' ||\n    'b'.replace(re, '$<a>c') !== 'bc';\n});\n", "'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar globalThis = require('../internals/global-this');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar isForced = require('../internals/is-forced');\nvar inheritIfRequired = require('../internals/inherit-if-required');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar create = require('../internals/object-create');\nvar getOwnPropertyNames = require('../internals/object-get-own-property-names').f;\nvar isPrototypeOf = require('../internals/object-is-prototype-of');\nvar isRegExp = require('../internals/is-regexp');\nvar toString = require('../internals/to-string');\nvar getRegExpFlags = require('../internals/regexp-get-flags');\nvar stickyHelpers = require('../internals/regexp-sticky-helpers');\nvar proxyAccessor = require('../internals/proxy-accessor');\nvar defineBuiltIn = require('../internals/define-built-in');\nvar fails = require('../internals/fails');\nvar hasOwn = require('../internals/has-own-property');\nvar enforceInternalState = require('../internals/internal-state').enforce;\nvar setSpecies = require('../internals/set-species');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar UNSUPPORTED_DOT_ALL = require('../internals/regexp-unsupported-dot-all');\nvar UNSUPPORTED_NCG = require('../internals/regexp-unsupported-ncg');\n\nvar MATCH = wellKnownSymbol('match');\nvar NativeRegExp = globalThis.RegExp;\nvar RegExpPrototype = NativeRegExp.prototype;\nvar SyntaxError = globalThis.SyntaxError;\nvar exec = uncurryThis(RegExpPrototype.exec);\nvar charAt = uncurryThis(''.charAt);\nvar replace = uncurryThis(''.replace);\nvar stringIndexOf = uncurryThis(''.indexOf);\nvar stringSlice = uncurryThis(''.slice);\n// TODO: Use only proper RegExpIdentifierName\nvar IS_NCG = /^\\?<[^\\s\\d!#%&*+<=>@^][^\\s!#%&*+<=>@^]*>/;\nvar re1 = /a/g;\nvar re2 = /a/g;\n\n// \"new\" should create a new object, old webkit bug\nvar CORRECT_NEW = new NativeRegExp(re1) !== re1;\n\nvar MISSED_STICKY = stickyHelpers.MISSED_STICKY;\nvar UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y;\n\nvar BASE_FORCED = DESCRIPTORS &&\n  (!CORRECT_NEW || MISSED_STICKY || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG || fails(function () {\n    re2[MATCH] = false;\n    // RegExp constructor can alter flags and IsRegExp works correct with @@match\n    // eslint-disable-next-line sonarjs/inconsistent-function-call -- required for testing\n    return NativeRegExp(re1) !== re1 || NativeRegExp(re2) === re2 || String(NativeRegExp(re1, 'i')) !== '/a/i';\n  }));\n\nvar handleDotAll = function (string) {\n  var length = string.length;\n  var index = 0;\n  var result = '';\n  var brackets = false;\n  var chr;\n  for (; index < length; index++) {\n    chr = charAt(string, index);\n    if (chr === '\\\\') {\n      result += chr + charAt(string, ++index);\n      continue;\n    }\n    if (!brackets && chr === '.') {\n      result += '[\\\\s\\\\S]';\n    } else {\n      if (chr === '[') {\n        brackets = true;\n      } else if (chr === ']') {\n        brackets = false;\n      } result += chr;\n    }\n  } return result;\n};\n\nvar handleNCG = function (string) {\n  var length = string.length;\n  var index = 0;\n  var result = '';\n  var named = [];\n  var names = create(null);\n  var brackets = false;\n  var ncg = false;\n  var groupid = 0;\n  var groupname = '';\n  var chr;\n  for (; index < length; index++) {\n    chr = charAt(string, index);\n    if (chr === '\\\\') {\n      chr += charAt(string, ++index);\n      // use `\\x5c` for escaped backslash to avoid corruption by `\\k<name>` to `\\N` replacement below\n      if (!ncg && charAt(chr, 1) === '\\\\') {\n        result += '\\\\x5c';\n        continue;\n      }\n    } else if (chr === ']') {\n      brackets = false;\n    } else if (!brackets) switch (true) {\n      case chr === '[':\n        brackets = true;\n        break;\n      case chr === '(':\n        result += chr;\n        if (exec(IS_NCG, stringSlice(string, index + 1))) {\n          index += 2;\n          ncg = true;\n          groupid++;\n        } else if (charAt(string, index + 1) !== '?') {\n          groupid++;\n        }\n        continue;\n      case chr === '>' && ncg:\n        if (groupname === '' || hasOwn(names, groupname)) {\n          throw new SyntaxError('Invalid capture group name');\n        }\n        names[groupname] = true;\n        named[named.length] = [groupname, groupid];\n        ncg = false;\n        groupname = '';\n        continue;\n    }\n    if (ncg) groupname += chr;\n    else result += chr;\n  }\n  // convert `\\k<name>` backreferences to numbered backreferences\n  for (var ni = 0; ni < named.length; ni++) {\n    var backref = '\\\\k<' + named[ni][0] + '>';\n    var numRef = '\\\\' + named[ni][1];\n    while (stringIndexOf(result, backref) > -1) {\n      result = replace(result, backref, numRef);\n    }\n  } return [result, named];\n};\n\n// `RegExp` constructor\n// https://tc39.es/ecma262/#sec-regexp-constructor\nif (isForced('RegExp', BASE_FORCED)) {\n  var RegExpWrapper = function RegExp(pattern, flags) {\n    var thisIsRegExp = isPrototypeOf(RegExpPrototype, this);\n    var patternIsRegExp = isRegExp(pattern);\n    var flagsAreUndefined = flags === undefined;\n    var groups = [];\n    var rawPattern = pattern;\n    var rawFlags, dotAll, sticky, handled, result, state;\n\n    if (!thisIsRegExp && patternIsRegExp && flagsAreUndefined && pattern.constructor === RegExpWrapper) {\n      return pattern;\n    }\n\n    if (patternIsRegExp || isPrototypeOf(RegExpPrototype, pattern)) {\n      pattern = pattern.source;\n      if (flagsAreUndefined) flags = getRegExpFlags(rawPattern);\n    }\n\n    pattern = pattern === undefined ? '' : toString(pattern);\n    flags = flags === undefined ? '' : toString(flags);\n    rawPattern = pattern;\n\n    if (UNSUPPORTED_DOT_ALL && 'dotAll' in re1) {\n      dotAll = !!flags && stringIndexOf(flags, 's') > -1;\n      if (dotAll) flags = replace(flags, /s/g, '');\n    }\n\n    rawFlags = flags;\n\n    if (MISSED_STICKY && 'sticky' in re1) {\n      sticky = !!flags && stringIndexOf(flags, 'y') > -1;\n      if (sticky && UNSUPPORTED_Y) flags = replace(flags, /y/g, '');\n    }\n\n    if (UNSUPPORTED_NCG) {\n      handled = handleNCG(pattern);\n      pattern = handled[0];\n      groups = handled[1];\n    }\n\n    result = inheritIfRequired(NativeRegExp(pattern, flags), thisIsRegExp ? this : RegExpPrototype, RegExpWrapper);\n\n    if (dotAll || sticky || groups.length) {\n      state = enforceInternalState(result);\n      if (dotAll) {\n        state.dotAll = true;\n        state.raw = RegExpWrapper(handleDotAll(pattern), rawFlags);\n      }\n      if (sticky) state.sticky = true;\n      if (groups.length) state.groups = groups;\n    }\n\n    if (pattern !== rawPattern) try {\n      // fails in old engines, but we have no alternatives for unsupported regex syntax\n      createNonEnumerableProperty(result, 'source', rawPattern === '' ? '(?:)' : rawPattern);\n    } catch (error) { /* empty */ }\n\n    return result;\n  };\n\n  for (var keys = getOwnPropertyNames(NativeRegExp), index = 0; keys.length > index;) {\n    proxyAccessor(RegExpWrapper, NativeRegExp, keys[index++]);\n  }\n\n  RegExpPrototype.constructor = RegExpWrapper;\n  RegExpWrapper.prototype = RegExpPrototype;\n  defineBuiltIn(globalThis, 'RegExp', RegExpWrapper, { constructor: true });\n}\n\n// https://tc39.es/ecma262/#sec-get-regexp-@@species\nsetSpecies('RegExp');\n", "'use strict';\nvar $TypeError = TypeError;\n\nmodule.exports = function (argument) {\n  if (typeof argument == 'string') return argument;\n  throw new $TypeError('Argument is not a string');\n};\n", "'use strict';\nvar $ = require('../internals/export');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar aString = require('../internals/a-string');\nvar hasOwn = require('../internals/has-own-property');\nvar padStart = require('../internals/string-pad').start;\nvar WHITESPACES = require('../internals/whitespaces');\n\nvar $Array = Array;\nvar $escape = RegExp.escape;\nvar charAt = uncurryThis(''.charAt);\nvar charCodeAt = uncurryThis(''.charCodeAt);\nvar numberToString = uncurryThis(1.1.toString);\nvar join = uncurryThis([].join);\nvar FIRST_DIGIT_OR_ASCII = /^[0-9a-z]/i;\nvar SYNTAX_SOLIDUS = /^[$()*+./?[\\\\\\]^{|}]/;\nvar OTHER_PUNCTUATORS_AND_WHITESPACES = RegExp('^[!\"#%&\\',\\\\-:;<=>@`~' + WHITESPACES + ']');\nvar exec = uncurryThis(FIRST_DIGIT_OR_ASCII.exec);\n\nvar ControlEscape = {\n  '\\u0009': 't',\n  '\\u000A': 'n',\n  '\\u000B': 'v',\n  '\\u000C': 'f',\n  '\\u000D': 'r'\n};\n\nvar escapeChar = function (chr) {\n  var hex = numberToString(charCodeAt(chr, 0), 16);\n  return hex.length < 3 ? '\\\\x' + padStart(hex, 2, '0') : '\\\\u' + padStart(hex, 4, '0');\n};\n\n// Avoiding the use of polyfills of the previous iteration of this proposal\nvar FORCED = !$escape || $escape('ab') !== '\\\\x61b';\n\n// `RegExp.escape` method\n// https://tc39.es/ecma262/#sec-regexp.escape\n$({ target: 'RegExp', stat: true, forced: FORCED }, {\n  escape: function escape(S) {\n    aString(S);\n    var length = S.length;\n    var result = $Array(length);\n\n    for (var i = 0; i < length; i++) {\n      var chr = charAt(S, i);\n      if (i === 0 && exec(FIRST_DIGIT_OR_ASCII, chr)) {\n        result[i] = escapeChar(chr);\n      } else if (hasOwn(ControlEscape, chr)) {\n        result[i] = '\\\\' + ControlEscape[chr];\n      } else if (exec(SYNTAX_SOLIDUS, chr)) {\n        result[i] = '\\\\' + chr;\n      } else if (exec(OTHER_PUNCTUATORS_AND_WHITESPACES, chr)) {\n        result[i] = escapeChar(chr);\n      } else {\n        var charCode = charCodeAt(chr, 0);\n        // single UTF-16 code unit\n        if ((charCode & 0xF800) !== 0xD800) result[i] = chr;\n        // unpaired surrogate\n        else if (charCode >= 0xDC00 || i + 1 >= length || (charCodeAt(S, i + 1) & 0xFC00) !== 0xDC00) result[i] = escapeChar(chr);\n        // surrogate pair\n        else {\n          result[i] = chr;\n          result[++i] = charAt(S, i);\n        }\n      }\n    }\n\n    return join(result, '');\n  }\n});\n", "'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar UNSUPPORTED_DOT_ALL = require('../internals/regexp-unsupported-dot-all');\nvar classof = require('../internals/classof-raw');\nvar defineBuiltInAccessor = require('../internals/define-built-in-accessor');\nvar getInternalState = require('../internals/internal-state').get;\n\nvar RegExpPrototype = RegExp.prototype;\nvar $TypeError = TypeError;\n\n// `RegExp.prototype.dotAll` getter\n// https://tc39.es/ecma262/#sec-get-regexp.prototype.dotall\nif (DESCRIPTORS && UNSUPPORTED_DOT_ALL) {\n  defineBuiltInAccessor(RegExpPrototype, 'dotAll', {\n    configurable: true,\n    get: function dotAll() {\n      if (this === RegExpPrototype) return;\n      // We can't use InternalStateModule.getterFor because\n      // we don't add metadata for regexps created by a literal.\n      if (classof(this) === 'RegExp') {\n        return !!getInternalState(this).dotAll;\n      }\n      throw new $TypeError('Incompatible receiver, RegExp required');\n    }\n  });\n}\n", "'use strict';\n/* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */\n/* eslint-disable regexp/no-useless-quantifier -- testing */\nvar call = require('../internals/function-call');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar toString = require('../internals/to-string');\nvar regexpFlags = require('../internals/regexp-flags');\nvar stickyHelpers = require('../internals/regexp-sticky-helpers');\nvar shared = require('../internals/shared');\nvar create = require('../internals/object-create');\nvar getInternalState = require('../internals/internal-state').get;\nvar UNSUPPORTED_DOT_ALL = require('../internals/regexp-unsupported-dot-all');\nvar UNSUPPORTED_NCG = require('../internals/regexp-unsupported-ncg');\n\nvar nativeReplace = shared('native-string-replace', String.prototype.replace);\nvar nativeExec = RegExp.prototype.exec;\nvar patchedExec = nativeExec;\nvar charAt = uncurryThis(''.charAt);\nvar indexOf = uncurryThis(''.indexOf);\nvar replace = uncurryThis(''.replace);\nvar stringSlice = uncurryThis(''.slice);\n\nvar UPDATES_LAST_INDEX_WRONG = (function () {\n  var re1 = /a/;\n  var re2 = /b*/g;\n  call(nativeExec, re1, 'a');\n  call(nativeExec, re2, 'a');\n  return re1.lastIndex !== 0 || re2.lastIndex !== 0;\n})();\n\nvar UNSUPPORTED_Y = stickyHelpers.BROKEN_CARET;\n\n// nonparticipating capturing group, copied from es5-shim's String#split patch.\nvar NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;\n\nvar PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG;\n\nvar setGroups = function (re, groups) {\n  var object = re.groups = create(null);\n  for (var i = 0; i < groups.length; i++) {\n    var group = groups[i];\n    object[group[0]] = re[group[1]];\n  }\n};\n\nif (PATCH) {\n  patchedExec = function exec(string) {\n    var re = this;\n    var state = getInternalState(re);\n    var str = toString(string);\n    var raw = state.raw;\n    var result, reCopy, lastIndex;\n\n    if (raw) {\n      raw.lastIndex = re.lastIndex;\n      result = call(patchedExec, raw, str);\n      re.lastIndex = raw.lastIndex;\n\n      if (result && state.groups) setGroups(result, state.groups);\n\n      return result;\n    }\n\n    var groups = state.groups;\n    var sticky = UNSUPPORTED_Y && re.sticky;\n    var flags = call(regexpFlags, re);\n    var source = re.source;\n    var charsAdded = 0;\n    var strCopy = str;\n\n    if (sticky) {\n      flags = replace(flags, 'y', '');\n      if (indexOf(flags, 'g') === -1) {\n        flags += 'g';\n      }\n\n      strCopy = stringSlice(str, re.lastIndex);\n      // Support anchored sticky behavior.\n      var prevChar = re.lastIndex > 0 && charAt(str, re.lastIndex - 1);\n      if (re.lastIndex > 0 &&\n        (!re.multiline || re.multiline && prevChar !== '\\n' && prevChar !== '\\r' && prevChar !== '\\u2028' && prevChar !== '\\u2029')) {\n        source = '(?: (?:' + source + '))';\n        strCopy = ' ' + strCopy;\n        charsAdded++;\n      }\n      // ^(? + rx + ) is needed, in combination with some str slicing, to\n      // simulate the 'y' flag.\n      reCopy = new RegExp('^(?:' + source + ')', flags);\n    }\n\n    if (NPCG_INCLUDED) {\n      reCopy = new RegExp('^' + source + '$(?!\\\\s)', flags);\n    }\n    if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;\n\n    var match = call(nativeExec, sticky ? reCopy : re, strCopy);\n\n    if (sticky) {\n      if (match) {\n        match.input = str;\n        match[0] = stringSlice(match[0], charsAdded);\n        match.index = re.lastIndex;\n        re.lastIndex += match[0].length;\n      } else re.lastIndex = 0;\n    } else if (UPDATES_LAST_INDEX_WRONG && match) {\n      re.lastIndex = re.global ? match.index + match[0].length : lastIndex;\n    }\n    if (NPCG_INCLUDED && match && match.length > 1) {\n      // Fix browsers whose `exec` methods don't consistently return `undefined`\n      // for NPCG, like IE8. NOTE: This doesn't work for /(.?)?/\n      call(nativeReplace, match[0], reCopy, function () {\n        for (var i = 1; i < arguments.length - 2; i++) {\n          if (arguments[i] === undefined) match[i] = undefined;\n        }\n      });\n    }\n\n    if (match && groups) setGroups(match, groups);\n\n    return match;\n  };\n}\n\nmodule.exports = patchedExec;\n", "'use strict';\nvar $ = require('../internals/export');\nvar exec = require('../internals/regexp-exec');\n\n// `RegExp.prototype.exec` method\n// https://tc39.es/ecma262/#sec-regexp.prototype.exec\n$({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {\n  exec: exec\n});\n", "'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar defineBuiltInAccessor = require('../internals/define-built-in-accessor');\nvar regExpFlagsDetection = require('../internals/regexp-flags-detection');\nvar regExpFlagsGetterImplementation = require('../internals/regexp-flags');\n\n// `RegExp.prototype.flags` getter\n// https://tc39.es/ecma262/#sec-get-regexp.prototype.flags\nif (DESCRIPTORS && !regExpFlagsDetection.correct) {\n  defineBuiltInAccessor(RegExp.prototype, 'flags', {\n    configurable: true,\n    get: regExpFlagsGetterImplementation\n  });\n\n  regExpFlagsDetection.correct = true;\n}\n", "'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar MISSED_STICKY = require('../internals/regexp-sticky-helpers').MISSED_STICKY;\nvar classof = require('../internals/classof-raw');\nvar defineBuiltInAccessor = require('../internals/define-built-in-accessor');\nvar getInternalState = require('../internals/internal-state').get;\n\nvar RegExpPrototype = RegExp.prototype;\nvar $TypeError = TypeError;\n\n// `RegExp.prototype.sticky` getter\n// https://tc39.es/ecma262/#sec-get-regexp.prototype.sticky\nif (DESCRIPTORS && MISSED_STICKY) {\n  defineBuiltInAccessor(RegExpPrototype, 'sticky', {\n    configurable: true,\n    get: function sticky() {\n      if (this === RegExpPrototype) return;\n      // We can't use InternalStateModule.getterFor because\n      // we don't add metadata for regexps created by a literal.\n      if (classof(this) === 'RegExp') {\n        return !!getInternalState(this).sticky;\n      }\n      throw new $TypeError('Incompatible receiver, RegExp required');\n    }\n  });\n}\n", "'use strict';\n// TODO: Remove from `core-js@4` since it's moved to entry points\nrequire('../modules/es.regexp.exec');\nvar $ = require('../internals/export');\nvar call = require('../internals/function-call');\nvar isCallable = require('../internals/is-callable');\nvar anObject = require('../internals/an-object');\nvar toString = require('../internals/to-string');\n\nvar DELEGATES_TO_EXEC = function () {\n  var execCalled = false;\n  var re = /[ac]/;\n  re.exec = function () {\n    execCalled = true;\n    return /./.exec.apply(this, arguments);\n  };\n  return re.test('abc') === true && execCalled;\n}();\n\nvar nativeTest = /./.test;\n\n// `RegExp.prototype.test` method\n// https://tc39.es/ecma262/#sec-regexp.prototype.test\n$({ target: 'RegExp', proto: true, forced: !DELEGATES_TO_EXEC }, {\n  test: function (S) {\n    var R = anObject(this);\n    var string = toString(S);\n    var exec = R.exec;\n    if (!isCallable(exec)) return call(nativeTest, R, string);\n    var result = call(exec, R, string);\n    if (result === null) return false;\n    anObject(result);\n    return true;\n  }\n});\n", "'use strict';\nvar PROPER_FUNCTION_NAME = require('../internals/function-name').PROPER;\nvar defineBuiltIn = require('../internals/define-built-in');\nvar anObject = require('../internals/an-object');\nvar $toString = require('../internals/to-string');\nvar fails = require('../internals/fails');\nvar getRegExpFlags = require('../internals/regexp-get-flags');\n\nvar TO_STRING = 'toString';\nvar RegExpPrototype = RegExp.prototype;\nvar nativeToString = RegExpPrototype[TO_STRING];\n\nvar NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) !== '/a/b'; });\n// FF44- RegExp#toString has a wrong name\nvar INCORRECT_NAME = PROPER_FUNCTION_NAME && nativeToString.name !== TO_STRING;\n\n// `RegExp.prototype.toString` method\n// https://tc39.es/ecma262/#sec-regexp.prototype.tostring\nif (NOT_GENERIC || INCORRECT_NAME) {\n  defineBuiltIn(RegExpPrototype, TO_STRING, function toString() {\n    var R = anObject(this);\n    var pattern = $toString(R.source);\n    var flags = $toString(getRegExpFlags(R));\n    return '/' + pattern + '/' + flags;\n  }, { unsafe: true });\n}\n", "'use strict';\nvar collection = require('../internals/collection');\nvar collectionStrong = require('../internals/collection-strong');\n\n// `Set` constructor\n// https://tc39.es/ecma262/#sec-set-objects\ncollection('Set', function (init) {\n  return function Set() { return init(this, arguments.length ? arguments[0] : undefined); };\n}, collectionStrong);\n", "'use strict';\n// TODO: Remove this module from `core-js@4` since it's replaced to module below\nrequire('../modules/es.set.constructor');\n", "'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\n\n// eslint-disable-next-line es/no-set -- safe\nvar SetPrototype = Set.prototype;\n\nmodule.exports = {\n  // eslint-disable-next-line es/no-set -- safe\n  Set: Set,\n  add: uncurryThis(SetPrototype.add),\n  has: uncurryThis(SetPrototype.has),\n  remove: uncurryThis(SetPrototype['delete']),\n  proto: SetPrototype\n};\n", "'use strict';\nvar has = require('../internals/set-helpers').has;\n\n// Perform ? RequireInternalSlot(M, [[SetData]])\nmodule.exports = function (it) {\n  has(it);\n  return it;\n};\n", "'use strict';\nvar call = require('../internals/function-call');\n\nmodule.exports = function (record, fn, ITERATOR_INSTEAD_OF_RECORD) {\n  var iterator = ITERATOR_INSTEAD_OF_RECORD ? record : record.iterator;\n  var next = record.next;\n  var step, result;\n  while (!(step = call(next, iterator)).done) {\n    result = fn(step.value);\n    if (result !== undefined) return result;\n  }\n};\n", "'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar iterateSimple = require('../internals/iterate-simple');\nvar SetHelpers = require('../internals/set-helpers');\n\nvar Set = SetHelpers.Set;\nvar SetPrototype = SetHelpers.proto;\nvar forEach = uncurryThis(SetPrototype.forEach);\nvar keys = uncurryThis(SetPrototype.keys);\nvar next = keys(new Set()).next;\n\nmodule.exports = function (set, fn, interruptible) {\n  return interruptible ? iterateSimple({ iterator: keys(set), next: next }, fn) : forEach(set, fn);\n};\n", "'use strict';\nvar SetHelpers = require('../internals/set-helpers');\nvar iterate = require('../internals/set-iterate');\n\nvar Set = SetHelpers.Set;\nvar add = SetHelpers.add;\n\nmodule.exports = function (set) {\n  var result = new Set();\n  iterate(set, function (it) {\n    add(result, it);\n  });\n  return result;\n};\n", "'use strict';\nvar uncurryThisAccessor = require('../internals/function-uncurry-this-accessor');\nvar SetHelpers = require('../internals/set-helpers');\n\nmodule.exports = uncurryThisAccessor(SetHelpers.proto, 'size', 'get') || function (set) {\n  return set.size;\n};\n", "'use strict';\nvar aCallable = require('../internals/a-callable');\nvar anObject = require('../internals/an-object');\nvar call = require('../internals/function-call');\nvar toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\nvar getIteratorDirect = require('../internals/get-iterator-direct');\n\nvar INVALID_SIZE = 'Invalid size';\nvar $RangeError = RangeError;\nvar $TypeError = TypeError;\nvar max = Math.max;\n\nvar SetRecord = function (set, intSize) {\n  this.set = set;\n  this.size = max(intSize, 0);\n  this.has = aCallable(set.has);\n  this.keys = aCallable(set.keys);\n};\n\nSetRecord.prototype = {\n  getIterator: function () {\n    return getIteratorDirect(anObject(call(this.keys, this.set)));\n  },\n  includes: function (it) {\n    return call(this.has, this.set, it);\n  }\n};\n\n// `GetSetRecord` abstract operation\n// https://tc39.es/proposal-set-methods/#sec-getsetrecord\nmodule.exports = function (obj) {\n  anObject(obj);\n  var numSize = +obj.size;\n  // NOTE: If size is undefined, then numSize will be NaN\n  // eslint-disable-next-line no-self-compare -- NaN check\n  if (numSize !== numSize) throw new $TypeError(INVALID_SIZE);\n  var intSize = toIntegerOrInfinity(numSize);\n  if (intSize < 0) throw new $RangeError(INVALID_SIZE);\n  return new SetRecord(obj, intSize);\n};\n", "'use strict';\nvar aSet = require('../internals/a-set');\nvar SetHelpers = require('../internals/set-helpers');\nvar clone = require('../internals/set-clone');\nvar size = require('../internals/set-size');\nvar getSetRecord = require('../internals/get-set-record');\nvar iterateSet = require('../internals/set-iterate');\nvar iterateSimple = require('../internals/iterate-simple');\n\nvar has = SetHelpers.has;\nvar remove = SetHelpers.remove;\n\n// `Set.prototype.difference` method\n// https://tc39.es/ecma262/#sec-set.prototype.difference\nmodule.exports = function difference(other) {\n  var O = aSet(this);\n  var otherRec = getSetRecord(other);\n  var result = clone(O);\n  if (size(result) <= otherRec.size) iterateSet(result, function (e) {\n    if (otherRec.includes(e)) remove(result, e);\n  });\n  else iterateSimple(otherRec.getIterator(), function (e) {\n    if (has(result, e)) remove(result, e);\n  });\n  return result;\n};\n", "'use strict';\nvar getBuiltIn = require('../internals/get-built-in');\n\nvar createSetLike = function (size) {\n  return {\n    size: size,\n    has: function () {\n      return false;\n    },\n    keys: function () {\n      return {\n        next: function () {\n          return { done: true };\n        }\n      };\n    }\n  };\n};\n\nvar createSetLikeWithInfinitySize = function (size) {\n  return {\n    size: size,\n    has: function () {\n      return true;\n    },\n    keys: function () {\n      throw new Error('e');\n    }\n  };\n};\n\nmodule.exports = function (name, callback) {\n  var Set = getBuiltIn('Set');\n  try {\n    new Set()[name](createSetLike(0));\n    try {\n      // late spec change, early WebKit ~ Safari 17 implementation does not pass it\n      // https://github.com/tc39/proposal-set-methods/pull/88\n      // also covered engines with\n      // https://bugs.webkit.org/show_bug.cgi?id=272679\n      new Set()[name](createSetLike(-1));\n      return false;\n    } catch (error2) {\n      if (!callback) return true;\n      // early V8 implementation bug\n      // https://issues.chromium.org/issues/351332634\n      try {\n        new Set()[name](createSetLikeWithInfinitySize(-Infinity));\n        return false;\n      } catch (error) {\n        var set = new Set([1, 2]);\n        return callback(set[name](createSetLikeWithInfinitySize(Infinity)));\n      }\n    }\n  } catch (error) {\n    return false;\n  }\n};\n", "'use strict';\nvar $ = require('../internals/export');\nvar difference = require('../internals/set-difference');\nvar fails = require('../internals/fails');\nvar setMethodAcceptSetLike = require('../internals/set-method-accept-set-like');\n\nvar SET_LIKE_INCORRECT_BEHAVIOR = !setMethodAcceptSetLike('difference', function (result) {\n  return result.size === 0;\n});\n\nvar FORCED = SET_LIKE_INCORRECT_BEHAVIOR || fails(function () {\n  // https://bugs.webkit.org/show_bug.cgi?id=288595\n  var setLike = {\n    size: 1,\n    has: function () { return true; },\n    keys: function () {\n      var index = 0;\n      return {\n        next: function () {\n          var done = index++ > 1;\n          if (baseSet.has(1)) baseSet.clear();\n          return { done: done, value: 2 };\n        }\n      };\n    }\n  };\n  // eslint-disable-next-line es/no-set -- testing\n  var baseSet = new Set([1, 2, 3, 4]);\n  // eslint-disable-next-line es/no-set-prototype-difference -- testing\n  return baseSet.difference(setLike).size !== 3;\n});\n\n// `Set.prototype.difference` method\n// https://tc39.es/ecma262/#sec-set.prototype.difference\n$({ target: 'Set', proto: true, real: true, forced: FORCED }, {\n  difference: difference\n});\n", "'use strict';\nvar aSet = require('../internals/a-set');\nvar SetHelpers = require('../internals/set-helpers');\nvar size = require('../internals/set-size');\nvar getSetRecord = require('../internals/get-set-record');\nvar iterateSet = require('../internals/set-iterate');\nvar iterateSimple = require('../internals/iterate-simple');\n\nvar Set = SetHelpers.Set;\nvar add = SetHelpers.add;\nvar has = SetHelpers.has;\n\n// `Set.prototype.intersection` method\n// https://tc39.es/ecma262/#sec-set.prototype.intersection\nmodule.exports = function intersection(other) {\n  var O = aSet(this);\n  var otherRec = getSetRecord(other);\n  var result = new Set();\n\n  if (size(O) > otherRec.size) {\n    iterateSimple(otherRec.getIterator(), function (e) {\n      if (has(O, e)) add(result, e);\n    });\n  } else {\n    iterateSet(O, function (e) {\n      if (otherRec.includes(e)) add(result, e);\n    });\n  }\n\n  return result;\n};\n", "'use strict';\nvar $ = require('../internals/export');\nvar fails = require('../internals/fails');\nvar intersection = require('../internals/set-intersection');\nvar setMethodAcceptSetLike = require('../internals/set-method-accept-set-like');\n\nvar INCORRECT = !setMethodAcceptSetLike('intersection', function (result) {\n  return result.size === 2 && result.has(1) && result.has(2);\n}) || fails(function () {\n  // eslint-disable-next-line es/no-array-from, es/no-set, es/no-set-prototype-intersection -- testing\n  return String(Array.from(new Set([1, 2, 3]).intersection(new Set([3, 2])))) !== '3,2';\n});\n\n// `Set.prototype.intersection` method\n// https://tc39.es/ecma262/#sec-set.prototype.intersection\n$({ target: 'Set', proto: true, real: true, forced: INCORRECT }, {\n  intersection: intersection\n});\n", "'use strict';\nvar aSet = require('../internals/a-set');\nvar has = require('../internals/set-helpers').has;\nvar size = require('../internals/set-size');\nvar getSetRecord = require('../internals/get-set-record');\nvar iterateSet = require('../internals/set-iterate');\nvar iterateSimple = require('../internals/iterate-simple');\nvar iteratorClose = require('../internals/iterator-close');\n\n// `Set.prototype.isDisjointFrom` method\n// https://tc39.es/ecma262/#sec-set.prototype.isdisjointfrom\nmodule.exports = function isDisjointFrom(other) {\n  var O = aSet(this);\n  var otherRec = getSetRecord(other);\n  if (size(O) <= otherRec.size) return iterateSet(O, function (e) {\n    if (otherRec.includes(e)) return false;\n  }, true) !== false;\n  var iterator = otherRec.getIterator();\n  return iterateSimple(iterator, function (e) {\n    if (has(O, e)) return iteratorClose(iterator.iterator, 'normal', false);\n  }) !== false;\n};\n", "'use strict';\nvar $ = require('../internals/export');\nvar isDisjointFrom = require('../internals/set-is-disjoint-from');\nvar setMethodAcceptSetLike = require('../internals/set-method-accept-set-like');\n\nvar INCORRECT = !setMethodAcceptSetLike('isDisjointFrom', function (result) {\n  return !result;\n});\n\n// `Set.prototype.isDisjointFrom` method\n// https://tc39.es/ecma262/#sec-set.prototype.isdisjointfrom\n$({ target: 'Set', proto: true, real: true, forced: INCORRECT }, {\n  isDisjointFrom: isDisjointFrom\n});\n", "'use strict';\nvar aSet = require('../internals/a-set');\nvar size = require('../internals/set-size');\nvar iterate = require('../internals/set-iterate');\nvar getSetRecord = require('../internals/get-set-record');\n\n// `Set.prototype.isSubsetOf` method\n// https://tc39.es/ecma262/#sec-set.prototype.issubsetof\nmodule.exports = function isSubsetOf(other) {\n  var O = aSet(this);\n  var otherRec = getSetRecord(other);\n  if (size(O) > otherRec.size) return false;\n  return iterate(O, function (e) {\n    if (!otherRec.includes(e)) return false;\n  }, true) !== false;\n};\n", "'use strict';\nvar $ = require('../internals/export');\nvar isSubsetOf = require('../internals/set-is-subset-of');\nvar setMethodAcceptSetLike = require('../internals/set-method-accept-set-like');\n\nvar INCORRECT = !setMethodAcceptSetLike('isSubsetOf', function (result) {\n  return result;\n});\n\n// `Set.prototype.isSubsetOf` method\n// https://tc39.es/ecma262/#sec-set.prototype.issubsetof\n$({ target: 'Set', proto: true, real: true, forced: INCORRECT }, {\n  isSubsetOf: isSubsetOf\n});\n", "'use strict';\nvar aSet = require('../internals/a-set');\nvar has = require('../internals/set-helpers').has;\nvar size = require('../internals/set-size');\nvar getSetRecord = require('../internals/get-set-record');\nvar iterateSimple = require('../internals/iterate-simple');\nvar iteratorClose = require('../internals/iterator-close');\n\n// `Set.prototype.isSupersetOf` method\n// https://tc39.es/ecma262/#sec-set.prototype.issupersetof\nmodule.exports = function isSupersetOf(other) {\n  var O = aSet(this);\n  var otherRec = getSetRecord(other);\n  if (size(O) < otherRec.size) return false;\n  var iterator = otherRec.getIterator();\n  return iterateSimple(iterator, function (e) {\n    if (!has(O, e)) return iteratorClose(iterator.iterator, 'normal', false);\n  }) !== false;\n};\n", "'use strict';\nvar $ = require('../internals/export');\nvar isSupersetOf = require('../internals/set-is-superset-of');\nvar setMethodAcceptSetLike = require('../internals/set-method-accept-set-like');\n\nvar INCORRECT = !setMethodAcceptSetLike('isSupersetOf', function (result) {\n  return !result;\n});\n\n// `Set.prototype.isSupersetOf` method\n// https://tc39.es/ecma262/#sec-set.prototype.issupersetof\n$({ target: 'Set', proto: true, real: true, forced: INCORRECT }, {\n  isSupersetOf: isSupersetOf\n});\n", "'use strict';\nvar aSet = require('../internals/a-set');\nvar SetHelpers = require('../internals/set-helpers');\nvar clone = require('../internals/set-clone');\nvar getSetRecord = require('../internals/get-set-record');\nvar iterateSimple = require('../internals/iterate-simple');\n\nvar add = SetHelpers.add;\nvar has = SetHelpers.has;\nvar remove = SetHelpers.remove;\n\n// `Set.prototype.symmetricDifference` method\n// https://tc39.es/ecma262/#sec-set.prototype.symmetricdifference\nmodule.exports = function symmetricDifference(other) {\n  var O = aSet(this);\n  var keysIter = getSetRecord(other).getIterator();\n  var result = clone(O);\n  iterateSimple(keysIter, function (e) {\n    if (has(O, e)) remove(result, e);\n    else add(result, e);\n  });\n  return result;\n};\n", "'use strict';\n// Should get iterator record of a set-like object before cloning this\n// https://bugs.webkit.org/show_bug.cgi?id=289430\nmodule.exports = function (METHOD_NAME) {\n  try {\n    // eslint-disable-next-line es/no-set -- needed for test\n    var baseSet = new Set();\n    var setLike = {\n      size: 0,\n      has: function () { return true; },\n      keys: function () {\n        // eslint-disable-next-line es/no-object-defineproperty -- needed for test\n        return Object.defineProperty({}, 'next', {\n          get: function () {\n            baseSet.clear();\n            baseSet.add(4);\n            return function () {\n              return { done: true };\n            };\n          }\n        });\n      }\n    };\n    var result = baseSet[METHOD_NAME](setLike);\n\n    return result.size === 1 && result.values().next().value === 4;\n  } catch (error) {\n    return false;\n  }\n};\n", "'use strict';\nvar $ = require('../internals/export');\nvar symmetricDifference = require('../internals/set-symmetric-difference');\nvar setMethodGetKeysBeforeCloning = require('../internals/set-method-get-keys-before-cloning-detection');\nvar setMethodAcceptSetLike = require('../internals/set-method-accept-set-like');\n\nvar FORCED = !setMethodAcceptSetLike('symmetricDifference') || !setMethodGetKeysBeforeCloning('symmetricDifference');\n\n// `Set.prototype.symmetricDifference` method\n// https://tc39.es/ecma262/#sec-set.prototype.symmetricdifference\n$({ target: 'Set', proto: true, real: true, forced: FORCED }, {\n  symmetricDifference: symmetricDifference\n});\n", "'use strict';\nvar aSet = require('../internals/a-set');\nvar add = require('../internals/set-helpers').add;\nvar clone = require('../internals/set-clone');\nvar getSetRecord = require('../internals/get-set-record');\nvar iterateSimple = require('../internals/iterate-simple');\n\n// `Set.prototype.union` method\n// https://tc39.es/ecma262/#sec-set.prototype.union\nmodule.exports = function union(other) {\n  var O = aSet(this);\n  var keysIter = getSetRecord(other).getIterator();\n  var result = clone(O);\n  iterateSimple(keysIter, function (it) {\n    add(result, it);\n  });\n  return result;\n};\n", "'use strict';\nvar $ = require('../internals/export');\nvar union = require('../internals/set-union');\nvar setMethodGetKeysBeforeCloning = require('../internals/set-method-get-keys-before-cloning-detection');\nvar setMethodAcceptSetLike = require('../internals/set-method-accept-set-like');\n\nvar FORCED = !setMethodAcceptSetLike('union') || !setMethodGetKeysBeforeCloning('union');\n\n// `Set.prototype.union` method\n// https://tc39.es/ecma262/#sec-set.prototype.union\n$({ target: 'Set', proto: true, real: true, forced: FORCED }, {\n  union: union\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\nvar toString = require('../internals/to-string');\nvar fails = require('../internals/fails');\n\nvar charAt = uncurryThis(''.charAt);\n\nvar FORCED = fails(function () {\n  // eslint-disable-next-line es/no-string-prototype-at -- safe\n  return '\uD842\uDFB7'.at(-2) !== '\\uD842';\n});\n\n// `String.prototype.at` method\n// https://tc39.es/ecma262/#sec-string.prototype.at\n$({ target: 'String', proto: true, forced: FORCED }, {\n  at: function at(index) {\n    var S = toString(requireObjectCoercible(this));\n    var len = S.length;\n    var relativeIndex = toIntegerOrInfinity(index);\n    var k = relativeIndex >= 0 ? relativeIndex : len + relativeIndex;\n    return (k < 0 || k >= len) ? undefined : charAt(S, k);\n  }\n});\n", "'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\nvar toString = require('../internals/to-string');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\nvar charAt = uncurryThis(''.charAt);\nvar charCodeAt = uncurryThis(''.charCodeAt);\nvar stringSlice = uncurryThis(''.slice);\n\nvar createMethod = function (CONVERT_TO_STRING) {\n  return function ($this, pos) {\n    var S = toString(requireObjectCoercible($this));\n    var position = toIntegerOrInfinity(pos);\n    var size = S.length;\n    var first, second;\n    if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;\n    first = charCodeAt(S, position);\n    return first < 0xD800 || first > 0xDBFF || position + 1 === size\n      || (second = charCodeAt(S, position + 1)) < 0xDC00 || second > 0xDFFF\n        ? CONVERT_TO_STRING\n          ? charAt(S, position)\n          : first\n        : CONVERT_TO_STRING\n          ? stringSlice(S, position, position + 2)\n          : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;\n  };\n};\n\nmodule.exports = {\n  // `String.prototype.codePointAt` method\n  // https://tc39.es/ecma262/#sec-string.prototype.codepointat\n  codeAt: createMethod(false),\n  // `String.prototype.at` method\n  // https://github.com/mathiasbynens/String.prototype.at\n  charAt: createMethod(true)\n};\n", "'use strict';\nvar $ = require('../internals/export');\nvar codeAt = require('../internals/string-multibyte').codeAt;\n\n// `String.prototype.codePointAt` method\n// https://tc39.es/ecma262/#sec-string.prototype.codepointat\n$({ target: 'String', proto: true }, {\n  codePointAt: function codePointAt(pos) {\n    return codeAt(this, pos);\n  }\n});\n", "'use strict';\nvar isRegExp = require('../internals/is-regexp');\n\nvar $TypeError = TypeError;\n\nmodule.exports = function (it) {\n  if (isRegExp(it)) {\n    throw new $TypeError(\"The method doesn't accept regular expressions\");\n  } return it;\n};\n", "'use strict';\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar MATCH = wellKnownSymbol('match');\n\nmodule.exports = function (METHOD_NAME) {\n  var regexp = /./;\n  try {\n    '/./'[METHOD_NAME](regexp);\n  } catch (error1) {\n    try {\n      regexp[MATCH] = false;\n      return '/./'[METHOD_NAME](regexp);\n    } catch (error2) { /* empty */ }\n  } return false;\n};\n", "'use strict';\nvar $ = require('../internals/export');\nvar uncurryThis = require('../internals/function-uncurry-this-clause');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar toLength = require('../internals/to-length');\nvar toString = require('../internals/to-string');\nvar notARegExp = require('../internals/not-a-regexp');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar correctIsRegExpLogic = require('../internals/correct-is-regexp-logic');\nvar IS_PURE = require('../internals/is-pure');\n\nvar slice = uncurryThis(''.slice);\nvar min = Math.min;\n\nvar CORRECT_IS_REGEXP_LOGIC = correctIsRegExpLogic('endsWith');\n// https://github.com/zloirock/core-js/pull/702\nvar MDN_POLYFILL_BUG = !IS_PURE && !CORRECT_IS_REGEXP_LOGIC && !!function () {\n  var descriptor = getOwnPropertyDescriptor(String.prototype, 'endsWith');\n  return descriptor && !descriptor.writable;\n}();\n\n// `String.prototype.endsWith` method\n// https://tc39.es/ecma262/#sec-string.prototype.endswith\n$({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, {\n  endsWith: function endsWith(searchString /* , endPosition = @length */) {\n    var that = toString(requireObjectCoercible(this));\n    notARegExp(searchString);\n    var search = toString(searchString);\n    var endPosition = arguments.length > 1 ? arguments[1] : undefined;\n    var len = that.length;\n    var end = endPosition === undefined ? len : min(toLength(endPosition), len);\n    return slice(that, end - search.length, end) === search;\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\n\nvar $RangeError = RangeError;\nvar fromCharCode = String.fromCharCode;\n// eslint-disable-next-line es/no-string-fromcodepoint -- required for testing\nvar $fromCodePoint = String.fromCodePoint;\nvar join = uncurryThis([].join);\n\n// length should be 1, old FF problem\nvar INCORRECT_LENGTH = !!$fromCodePoint && $fromCodePoint.length !== 1;\n\n// `String.fromCodePoint` method\n// https://tc39.es/ecma262/#sec-string.fromcodepoint\n$({ target: 'String', stat: true, arity: 1, forced: INCORRECT_LENGTH }, {\n  // eslint-disable-next-line no-unused-vars -- required for `.length`\n  fromCodePoint: function fromCodePoint(x) {\n    var elements = [];\n    var length = arguments.length;\n    var i = 0;\n    var code;\n    while (length > i) {\n      code = +arguments[i];\n      if (toAbsoluteIndex(code, 0x10FFFF) !== code) throw new $RangeError(code + ' is not a valid code point');\n      elements[i++] = code < 0x10000\n        ? fromCharCode(code)\n        : fromCharCode(((code -= 0x10000) >> 10) + 0xD800, code % 0x400 + 0xDC00);\n    } return join(elements, '');\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar notARegExp = require('../internals/not-a-regexp');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar toString = require('../internals/to-string');\nvar correctIsRegExpLogic = require('../internals/correct-is-regexp-logic');\n\nvar stringIndexOf = uncurryThis(''.indexOf);\n\n// `String.prototype.includes` method\n// https://tc39.es/ecma262/#sec-string.prototype.includes\n$({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {\n  includes: function includes(searchString /* , position = 0 */) {\n    return !!~stringIndexOf(\n      toString(requireObjectCoercible(this)),\n      toString(notARegExp(searchString)),\n      arguments.length > 1 ? arguments[1] : undefined\n    );\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar toString = require('../internals/to-string');\n\nvar charCodeAt = uncurryThis(''.charCodeAt);\n\n// `String.prototype.isWellFormed` method\n// https://tc39.es/ecma262/#sec-string.prototype.iswellformed\n$({ target: 'String', proto: true }, {\n  isWellFormed: function isWellFormed() {\n    var S = toString(requireObjectCoercible(this));\n    var length = S.length;\n    for (var i = 0; i < length; i++) {\n      var charCode = charCodeAt(S, i);\n      // single UTF-16 code unit\n      if ((charCode & 0xF800) !== 0xD800) continue;\n      // unpaired surrogate\n      if (charCode >= 0xDC00 || ++i >= length || (charCodeAt(S, i) & 0xFC00) !== 0xDC00) return false;\n    } return true;\n  }\n});\n", "'use strict';\nvar charAt = require('../internals/string-multibyte').charAt;\nvar toString = require('../internals/to-string');\nvar InternalStateModule = require('../internals/internal-state');\nvar defineIterator = require('../internals/iterator-define');\nvar createIterResultObject = require('../internals/create-iter-result-object');\n\nvar STRING_ITERATOR = 'String Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(STRING_ITERATOR);\n\n// `String.prototype[@@iterator]` method\n// https://tc39.es/ecma262/#sec-string.prototype-@@iterator\ndefineIterator(String, 'String', function (iterated) {\n  setInternalState(this, {\n    type: STRING_ITERATOR,\n    string: toString(iterated),\n    index: 0\n  });\n// `%StringIteratorPrototype%.next` method\n// https://tc39.es/ecma262/#sec-%stringiteratorprototype%.next\n}, function next() {\n  var state = getInternalState(this);\n  var string = state.string;\n  var index = state.index;\n  var point;\n  if (index >= string.length) return createIterResultObject(undefined, true);\n  point = charAt(string, index);\n  state.index += point.length;\n  return createIterResultObject(point, false);\n});\n", "'use strict';\n// TODO: Remove from `core-js@4` since it's moved to entry points\nrequire('../modules/es.regexp.exec');\nvar call = require('../internals/function-call');\nvar defineBuiltIn = require('../internals/define-built-in');\nvar regexpExec = require('../internals/regexp-exec');\nvar fails = require('../internals/fails');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\n\nvar SPECIES = wellKnownSymbol('species');\nvar RegExpPrototype = RegExp.prototype;\n\nmodule.exports = function (KEY, exec, FORCED, SHAM) {\n  var SYMBOL = wellKnownSymbol(KEY);\n\n  var DELEGATES_TO_SYMBOL = !fails(function () {\n    // String methods call symbol-named RegExp methods\n    var O = {};\n    // eslint-disable-next-line unicorn/no-immediate-mutation -- ES3 syntax limitation\n    O[SYMBOL] = function () { return 7; };\n    return ''[KEY](O) !== 7;\n  });\n\n  var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {\n    // Symbol-named RegExp methods call .exec\n    var execCalled = false;\n    var re = /a/;\n\n    if (KEY === 'split') {\n      // We can't use real regex here since it causes deoptimization\n      // and serious performance degradation in V8\n      // https://github.com/zloirock/core-js/issues/306\n      // RegExp[@@split] doesn't call the regex's exec method, but first creates\n      // a new one. We need to return the patched regex when creating the new one.\n      var constructor = {};\n      // eslint-disable-next-line unicorn/no-immediate-mutation -- ES3 syntax limitation\n      constructor[SPECIES] = function () { return re; };\n      re = { constructor: constructor, flags: '' };\n      // eslint-disable-next-line unicorn/no-immediate-mutation -- ES3 syntax limitation\n      re[SYMBOL] = /./[SYMBOL];\n    }\n\n    re.exec = function () {\n      execCalled = true;\n      return null;\n    };\n\n    re[SYMBOL]('');\n    return !execCalled;\n  });\n\n  if (\n    !DELEGATES_TO_SYMBOL ||\n    !DELEGATES_TO_EXEC ||\n    FORCED\n  ) {\n    var nativeRegExpMethod = /./[SYMBOL];\n    var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {\n      var $exec = regexp.exec;\n      if ($exec === regexpExec || $exec === RegExpPrototype.exec) {\n        if (DELEGATES_TO_SYMBOL && !forceStringMethod) {\n          // The native String method already delegates to @@method (this\n          // polyfilled function), leasing to infinite recursion.\n          // We avoid it by directly calling the native @@method method.\n          return { done: true, value: call(nativeRegExpMethod, regexp, str, arg2) };\n        }\n        return { done: true, value: call(nativeMethod, str, regexp, arg2) };\n      }\n      return { done: false };\n    });\n\n    defineBuiltIn(String.prototype, KEY, methods[0]);\n    defineBuiltIn(RegExpPrototype, SYMBOL, methods[1]);\n  }\n\n  if (SHAM) createNonEnumerableProperty(RegExpPrototype[SYMBOL], 'sham', true);\n};\n", "'use strict';\nvar charAt = require('../internals/string-multibyte').charAt;\n\n// `AdvanceStringIndex` abstract operation\n// https://tc39.es/ecma262/#sec-advancestringindex\nmodule.exports = function (S, index, unicode) {\n  return index + (unicode ? charAt(S, index).length || 1 : 1);\n};\n", "'use strict';\nvar call = require('../internals/function-call');\nvar anObject = require('../internals/an-object');\nvar isCallable = require('../internals/is-callable');\nvar classof = require('../internals/classof-raw');\nvar regexpExec = require('../internals/regexp-exec');\n\nvar $TypeError = TypeError;\n\n// `RegExpExec` abstract operation\n// https://tc39.es/ecma262/#sec-regexpexec\nmodule.exports = function (R, S) {\n  var exec = R.exec;\n  if (isCallable(exec)) {\n    var result = call(exec, R, S);\n    if (result !== null) anObject(result);\n    return result;\n  }\n  if (classof(R) === 'RegExp') return call(regexpExec, R, S);\n  throw new $TypeError('RegExp#exec called on incompatible receiver');\n};\n", "'use strict';\nvar call = require('../internals/function-call');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic');\nvar anObject = require('../internals/an-object');\nvar isObject = require('../internals/is-object');\nvar toLength = require('../internals/to-length');\nvar toString = require('../internals/to-string');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar getMethod = require('../internals/get-method');\nvar advanceStringIndex = require('../internals/advance-string-index');\nvar getRegExpFlags = require('../internals/regexp-get-flags');\nvar regExpExec = require('../internals/regexp-exec-abstract');\n\nvar stringIndexOf = uncurryThis(''.indexOf);\n\n// @@match logic\nfixRegExpWellKnownSymbolLogic('match', function (MATCH, nativeMatch, maybeCallNative) {\n  return [\n    // `String.prototype.match` method\n    // https://tc39.es/ecma262/#sec-string.prototype.match\n    function match(regexp) {\n      var O = requireObjectCoercible(this);\n      var matcher = isObject(regexp) ? getMethod(regexp, MATCH) : undefined;\n      if (matcher) return call(matcher, regexp, O);\n      var S = toString(O);\n      return new RegExp(regexp)[MATCH](S);\n    },\n    // `RegExp.prototype[@@match]` method\n    // https://tc39.es/ecma262/#sec-regexp.prototype-@@match\n    function (string) {\n      var rx = anObject(this);\n      var S = toString(string);\n      var res = maybeCallNative(nativeMatch, rx, S);\n\n      if (res.done) return res.value;\n\n      var flags = toString(getRegExpFlags(rx));\n\n      if (!~stringIndexOf(flags, 'g')) return regExpExec(rx, S);\n\n      var fullUnicode = !!~stringIndexOf(flags, 'u') || !!~stringIndexOf(flags, 'v');\n      rx.lastIndex = 0;\n      var A = [];\n      var n = 0;\n      var result;\n      while ((result = regExpExec(rx, S)) !== null) {\n        var matchStr = toString(result[0]);\n        A[n] = matchStr;\n        if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);\n        n++;\n      }\n      return n === 0 ? null : A;\n    }\n  ];\n});\n", "'use strict';\n/* eslint-disable es/no-string-prototype-matchall -- safe */\nvar $ = require('../internals/export');\nvar call = require('../internals/function-call');\nvar uncurryThis = require('../internals/function-uncurry-this-clause');\nvar createIteratorConstructor = require('../internals/iterator-create-constructor');\nvar createIterResultObject = require('../internals/create-iter-result-object');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar toLength = require('../internals/to-length');\nvar toString = require('../internals/to-string');\nvar anObject = require('../internals/an-object');\nvar isObject = require('../internals/is-object');\nvar classof = require('../internals/classof-raw');\nvar isRegExp = require('../internals/is-regexp');\nvar getRegExpFlags = require('../internals/regexp-get-flags');\nvar getMethod = require('../internals/get-method');\nvar defineBuiltIn = require('../internals/define-built-in');\nvar fails = require('../internals/fails');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar speciesConstructor = require('../internals/species-constructor');\nvar advanceStringIndex = require('../internals/advance-string-index');\nvar regExpExec = require('../internals/regexp-exec-abstract');\nvar InternalStateModule = require('../internals/internal-state');\nvar IS_PURE = require('../internals/is-pure');\n\nvar MATCH_ALL = wellKnownSymbol('matchAll');\nvar REGEXP_STRING = 'RegExp String';\nvar REGEXP_STRING_ITERATOR = REGEXP_STRING + ' Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(REGEXP_STRING_ITERATOR);\nvar RegExpPrototype = RegExp.prototype;\nvar $TypeError = TypeError;\nvar stringIndexOf = uncurryThis(''.indexOf);\nvar nativeMatchAll = uncurryThis(''.matchAll);\n\nvar WORKS_WITH_NON_GLOBAL_REGEX = !!nativeMatchAll && !fails(function () {\n  nativeMatchAll('a', /./);\n});\n\nvar $RegExpStringIterator = createIteratorConstructor(function RegExpStringIterator(regexp, string, $global, fullUnicode) {\n  setInternalState(this, {\n    type: REGEXP_STRING_ITERATOR,\n    regexp: regexp,\n    string: string,\n    global: $global,\n    unicode: fullUnicode,\n    done: false\n  });\n}, REGEXP_STRING, function next() {\n  var state = getInternalState(this);\n  if (state.done) return createIterResultObject(undefined, true);\n  var R = state.regexp;\n  var S = state.string;\n  var match = regExpExec(R, S);\n  if (match === null) {\n    state.done = true;\n    return createIterResultObject(undefined, true);\n  }\n  if (state.global) {\n    if (toString(match[0]) === '') R.lastIndex = advanceStringIndex(S, toLength(R.lastIndex), state.unicode);\n    return createIterResultObject(match, false);\n  }\n  state.done = true;\n  return createIterResultObject(match, false);\n});\n\nvar $matchAll = function (string) {\n  var R = anObject(this);\n  var S = toString(string);\n  var C = speciesConstructor(R, RegExp);\n  var flags = toString(getRegExpFlags(R));\n  var matcher, $global, fullUnicode;\n  matcher = new C(C === RegExp ? R.source : R, flags);\n  $global = !!~stringIndexOf(flags, 'g');\n  fullUnicode = !!~stringIndexOf(flags, 'u') || !!~stringIndexOf(flags, 'v');\n  matcher.lastIndex = toLength(R.lastIndex);\n  return new $RegExpStringIterator(matcher, S, $global, fullUnicode);\n};\n\n// `String.prototype.matchAll` method\n// https://tc39.es/ecma262/#sec-string.prototype.matchall\n$({ target: 'String', proto: true, forced: WORKS_WITH_NON_GLOBAL_REGEX }, {\n  matchAll: function matchAll(regexp) {\n    var O = requireObjectCoercible(this);\n    var flags, S, matcher, rx;\n    if (isObject(regexp)) {\n      if (isRegExp(regexp)) {\n        flags = toString(requireObjectCoercible(getRegExpFlags(regexp)));\n        if (!~stringIndexOf(flags, 'g')) throw new $TypeError('`.matchAll` does not allow non-global regexes');\n      }\n      if (WORKS_WITH_NON_GLOBAL_REGEX) return nativeMatchAll(O, regexp);\n      matcher = getMethod(regexp, MATCH_ALL);\n      if (matcher === undefined && IS_PURE && classof(regexp) === 'RegExp') matcher = $matchAll;\n      if (matcher) return call(matcher, regexp, O);\n    } else if (WORKS_WITH_NON_GLOBAL_REGEX) return nativeMatchAll(O, regexp);\n    S = toString(O);\n    rx = new RegExp(regexp, 'g');\n    return IS_PURE ? call($matchAll, rx, S) : rx[MATCH_ALL](S);\n  }\n});\n\nIS_PURE || MATCH_ALL in RegExpPrototype || defineBuiltIn(RegExpPrototype, MATCH_ALL, $matchAll);\n", "'use strict';\n// https://github.com/zloirock/core-js/issues/280\nvar userAgent = require('../internals/environment-user-agent');\n\nmodule.exports = /Version\\/10(?:\\.\\d+){1,2}(?: [\\w./]+)?(?: Mobile\\/\\w+)? Safari\\//.test(userAgent);\n", "'use strict';\nvar $ = require('../internals/export');\nvar $padEnd = require('../internals/string-pad').end;\nvar WEBKIT_BUG = require('../internals/string-pad-webkit-bug');\n\n// `String.prototype.padEnd` method\n// https://tc39.es/ecma262/#sec-string.prototype.padend\n$({ target: 'String', proto: true, forced: WEBKIT_BUG }, {\n  padEnd: function padEnd(maxLength /* , fillString = ' ' */) {\n    return $padEnd(this, maxLength, arguments.length > 1 ? arguments[1] : undefined);\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar $padStart = require('../internals/string-pad').start;\nvar WEBKIT_BUG = require('../internals/string-pad-webkit-bug');\n\n// `String.prototype.padStart` method\n// https://tc39.es/ecma262/#sec-string.prototype.padstart\n$({ target: 'String', proto: true, forced: WEBKIT_BUG }, {\n  padStart: function padStart(maxLength /* , fillString = ' ' */) {\n    return $padStart(this, maxLength, arguments.length > 1 ? arguments[1] : undefined);\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar toObject = require('../internals/to-object');\nvar toString = require('../internals/to-string');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\n\nvar push = uncurryThis([].push);\nvar join = uncurryThis([].join);\n\n// `String.raw` method\n// https://tc39.es/ecma262/#sec-string.raw\n$({ target: 'String', stat: true }, {\n  raw: function raw(template) {\n    var rawTemplate = toIndexedObject(toObject(template).raw);\n    var literalSegments = lengthOfArrayLike(rawTemplate);\n    if (!literalSegments) return '';\n    var argumentsLength = arguments.length;\n    var elements = [];\n    var i = 0;\n    while (true) {\n      push(elements, toString(rawTemplate[i++]));\n      if (i === literalSegments) return join(elements, '');\n      if (i < argumentsLength) push(elements, toString(arguments[i]));\n    }\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar repeat = require('../internals/string-repeat');\n\n// `String.prototype.repeat` method\n// https://tc39.es/ecma262/#sec-string.prototype.repeat\n$({ target: 'String', proto: true }, {\n  repeat: repeat\n});\n", "'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar toObject = require('../internals/to-object');\n\nvar floor = Math.floor;\nvar charAt = uncurryThis(''.charAt);\nvar replace = uncurryThis(''.replace);\nvar stringSlice = uncurryThis(''.slice);\n// eslint-disable-next-line redos/no-vulnerable -- safe\nvar SUBSTITUTION_SYMBOLS = /\\$([$&'`]|\\d{1,2}|<[^>]*>)/g;\nvar SUBSTITUTION_SYMBOLS_NO_NAMED = /\\$([$&'`]|\\d{1,2})/g;\n\n// `GetSubstitution` abstract operation\n// https://tc39.es/ecma262/#sec-getsubstitution\nmodule.exports = function (matched, str, position, captures, namedCaptures, replacement) {\n  var tailPos = position + matched.length;\n  var m = captures.length;\n  var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;\n  if (namedCaptures !== undefined) {\n    namedCaptures = toObject(namedCaptures);\n    symbols = SUBSTITUTION_SYMBOLS;\n  }\n  return replace(replacement, symbols, function (match, ch) {\n    var capture;\n    switch (charAt(ch, 0)) {\n      case '$': return '$';\n      case '&': return matched;\n      case '`': return stringSlice(str, 0, position);\n      case \"'\": return stringSlice(str, tailPos);\n      case '<':\n        capture = namedCaptures[stringSlice(ch, 1, -1)];\n        break;\n      default: // \\d\\d?\n        var n = +ch;\n        if (n === 0) return match;\n        if (n > m) {\n          var f = floor(n / 10);\n          if (f === 0) return match;\n          if (f <= m) return captures[f - 1] === undefined ? charAt(ch, 1) : captures[f - 1] + charAt(ch, 1);\n          return match;\n        }\n        capture = captures[n - 1];\n    }\n    return capture === undefined ? '' : capture;\n  });\n};\n", "'use strict';\nvar apply = require('../internals/function-apply');\nvar call = require('../internals/function-call');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic');\nvar fails = require('../internals/fails');\nvar anObject = require('../internals/an-object');\nvar isCallable = require('../internals/is-callable');\nvar isObject = require('../internals/is-object');\nvar toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\nvar toLength = require('../internals/to-length');\nvar toString = require('../internals/to-string');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar advanceStringIndex = require('../internals/advance-string-index');\nvar getMethod = require('../internals/get-method');\nvar getSubstitution = require('../internals/get-substitution');\nvar getRegExpFlags = require('../internals/regexp-get-flags');\nvar regExpExec = require('../internals/regexp-exec-abstract');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar REPLACE = wellKnownSymbol('replace');\nvar max = Math.max;\nvar min = Math.min;\nvar concat = uncurryThis([].concat);\nvar push = uncurryThis([].push);\nvar stringIndexOf = uncurryThis(''.indexOf);\nvar stringSlice = uncurryThis(''.slice);\n\nvar maybeToString = function (it) {\n  return it === undefined ? it : String(it);\n};\n\n// IE <= 11 replaces $0 with the whole match, as if it was $&\n// https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0\nvar REPLACE_KEEPS_$0 = (function () {\n  // eslint-disable-next-line regexp/prefer-escape-replacement-dollar-char -- required for testing\n  return 'a'.replace(/./, '$0') === '$0';\n})();\n\n// Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string\nvar REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {\n  if (/./[REPLACE]) {\n    return /./[REPLACE]('a', '$0') === '';\n  }\n  return false;\n})();\n\nvar REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {\n  var re = /./;\n  re.exec = function () {\n    var result = [];\n    result.groups = { a: '7' };\n    return result;\n  };\n  // eslint-disable-next-line regexp/no-useless-dollar-replacements -- false positive\n  return ''.replace(re, '$<a>') !== '7';\n});\n\n// @@replace logic\nfixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNative) {\n  var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';\n\n  return [\n    // `String.prototype.replace` method\n    // https://tc39.es/ecma262/#sec-string.prototype.replace\n    function replace(searchValue, replaceValue) {\n      var O = requireObjectCoercible(this);\n      var replacer = isObject(searchValue) ? getMethod(searchValue, REPLACE) : undefined;\n      return replacer\n        ? call(replacer, searchValue, O, replaceValue)\n        : call(nativeReplace, toString(O), searchValue, replaceValue);\n    },\n    // `RegExp.prototype[@@replace]` method\n    // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace\n    function (string, replaceValue) {\n      var rx = anObject(this);\n      var S = toString(string);\n\n      var functionalReplace = isCallable(replaceValue);\n      if (!functionalReplace) replaceValue = toString(replaceValue);\n      var flags = toString(getRegExpFlags(rx));\n\n      if (\n        typeof replaceValue == 'string' &&\n        !~stringIndexOf(replaceValue, UNSAFE_SUBSTITUTE) &&\n        !~stringIndexOf(replaceValue, '$<') &&\n        !~stringIndexOf(flags, 'y')\n      ) {\n        var res = maybeCallNative(nativeReplace, rx, S, replaceValue);\n        if (res.done) return res.value;\n      }\n\n      var global = !!~stringIndexOf(flags, 'g');\n      var fullUnicode;\n      if (global) {\n        fullUnicode = !!~stringIndexOf(flags, 'u') || !!~stringIndexOf(flags, 'v');\n        rx.lastIndex = 0;\n      }\n\n      var results = [];\n      var result;\n      while (true) {\n        result = regExpExec(rx, S);\n        if (result === null) break;\n\n        push(results, result);\n        if (!global) break;\n\n        var matchStr = toString(result[0]);\n        if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);\n      }\n\n      var accumulatedResult = '';\n      var nextSourcePosition = 0;\n      for (var i = 0; i < results.length; i++) {\n        result = results[i];\n\n        var matched = toString(result[0]);\n        var position = max(min(toIntegerOrInfinity(result.index), S.length), 0);\n        var captures = [];\n        var replacement;\n        // NOTE: This is equivalent to\n        //   captures = result.slice(1).map(maybeToString)\n        // but for some reason `nativeSlice.call(result, 1, result.length)` (called in\n        // the slice polyfill when slicing native arrays) \"doesn't work\" in safari 9 and\n        // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.\n        for (var j = 1; j < result.length; j++) push(captures, maybeToString(result[j]));\n        var namedCaptures = result.groups;\n        if (functionalReplace) {\n          var replacerArgs = concat([matched], captures, position, S);\n          if (namedCaptures !== undefined) push(replacerArgs, namedCaptures);\n          replacement = toString(apply(replaceValue, undefined, replacerArgs));\n        } else {\n          replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);\n        }\n        if (position >= nextSourcePosition) {\n          accumulatedResult += stringSlice(S, nextSourcePosition, position) + replacement;\n          nextSourcePosition = position + matched.length;\n        }\n      }\n\n      return accumulatedResult + stringSlice(S, nextSourcePosition);\n    }\n  ];\n}, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);\n", "'use strict';\nvar $ = require('../internals/export');\nvar call = require('../internals/function-call');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar isCallable = require('../internals/is-callable');\nvar isObject = require('../internals/is-object');\nvar isRegExp = require('../internals/is-regexp');\nvar toString = require('../internals/to-string');\nvar getMethod = require('../internals/get-method');\nvar getRegExpFlags = require('../internals/regexp-get-flags');\nvar getSubstitution = require('../internals/get-substitution');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar IS_PURE = require('../internals/is-pure');\n\nvar REPLACE = wellKnownSymbol('replace');\nvar $TypeError = TypeError;\nvar indexOf = uncurryThis(''.indexOf);\nvar replace = uncurryThis(''.replace);\nvar stringSlice = uncurryThis(''.slice);\nvar max = Math.max;\n\n// `String.prototype.replaceAll` method\n// https://tc39.es/ecma262/#sec-string.prototype.replaceall\n$({ target: 'String', proto: true }, {\n  replaceAll: function replaceAll(searchValue, replaceValue) {\n    var O = requireObjectCoercible(this);\n    var IS_REG_EXP, flags, replacer, string, searchString, functionalReplace, searchLength, advanceBy, position, replacement;\n    var endOfLastMatch = 0;\n    var result = '';\n    if (isObject(searchValue)) {\n      IS_REG_EXP = isRegExp(searchValue);\n      if (IS_REG_EXP) {\n        flags = toString(requireObjectCoercible(getRegExpFlags(searchValue)));\n        if (!~indexOf(flags, 'g')) throw new $TypeError('`.replaceAll` does not allow non-global regexes');\n      }\n      replacer = getMethod(searchValue, REPLACE);\n      if (replacer) return call(replacer, searchValue, O, replaceValue);\n      if (IS_PURE && IS_REG_EXP) return replace(toString(O), searchValue, replaceValue);\n    }\n    string = toString(O);\n    searchString = toString(searchValue);\n    functionalReplace = isCallable(replaceValue);\n    if (!functionalReplace) replaceValue = toString(replaceValue);\n    searchLength = searchString.length;\n    advanceBy = max(1, searchLength);\n    position = indexOf(string, searchString);\n    while (position !== -1) {\n      replacement = functionalReplace\n        ? toString(replaceValue(searchString, position, string))\n        : getSubstitution(searchString, string, position, [], undefined, replaceValue);\n      result += stringSlice(string, endOfLastMatch, position) + replacement;\n      endOfLastMatch = position + searchLength;\n      position = position + advanceBy > string.length ? -1 : indexOf(string, searchString, position + advanceBy);\n    }\n    if (endOfLastMatch < string.length) {\n      result += stringSlice(string, endOfLastMatch);\n    }\n    return result;\n  }\n});\n", "'use strict';\nvar call = require('../internals/function-call');\nvar fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic');\nvar anObject = require('../internals/an-object');\nvar isObject = require('../internals/is-object');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar sameValue = require('../internals/same-value');\nvar toString = require('../internals/to-string');\nvar getMethod = require('../internals/get-method');\nvar regExpExec = require('../internals/regexp-exec-abstract');\n\n// @@search logic\nfixRegExpWellKnownSymbolLogic('search', function (SEARCH, nativeSearch, maybeCallNative) {\n  return [\n    // `String.prototype.search` method\n    // https://tc39.es/ecma262/#sec-string.prototype.search\n    function search(regexp) {\n      var O = requireObjectCoercible(this);\n      var searcher = isObject(regexp) ? getMethod(regexp, SEARCH) : undefined;\n      if (searcher) return call(searcher, regexp, O);\n      var S = toString(O);\n      return new RegExp(regexp)[SEARCH](S);\n    },\n    // `RegExp.prototype[@@search]` method\n    // https://tc39.es/ecma262/#sec-regexp.prototype-@@search\n    function (string) {\n      var rx = anObject(this);\n      var S = toString(string);\n      var res = maybeCallNative(nativeSearch, rx, S);\n\n      if (res.done) return res.value;\n\n      var previousLastIndex = rx.lastIndex;\n      if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0;\n      var result = regExpExec(rx, S);\n      if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex;\n      return result === null ? -1 : result.index;\n    }\n  ];\n});\n", "'use strict';\nvar call = require('../internals/function-call');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic');\nvar anObject = require('../internals/an-object');\nvar isObject = require('../internals/is-object');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar speciesConstructor = require('../internals/species-constructor');\nvar advanceStringIndex = require('../internals/advance-string-index');\nvar toLength = require('../internals/to-length');\nvar toString = require('../internals/to-string');\nvar getMethod = require('../internals/get-method');\nvar getRegExpFlags = require('../internals/regexp-get-flags');\nvar regExpExec = require('../internals/regexp-exec-abstract');\nvar stickyHelpers = require('../internals/regexp-sticky-helpers');\nvar fails = require('../internals/fails');\n\nvar UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y;\nvar MAX_UINT32 = 0xFFFFFFFF;\nvar min = Math.min;\nvar push = uncurryThis([].push);\nvar stringSlice = uncurryThis(''.slice);\nvar stringIndexOf = uncurryThis(''.indexOf);\n\n// Chrome 51 has a buggy \"split\" implementation when RegExp#exec !== nativeExec\n// Weex JS has frozen built-in prototypes, so use try / catch wrapper\nvar SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {\n  // eslint-disable-next-line regexp/no-empty-group -- required for testing\n  var re = /(?:)/;\n  var originalExec = re.exec;\n  re.exec = function () { return originalExec.apply(this, arguments); };\n  var result = 'ab'.split(re);\n  return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';\n});\n\nvar BUGGY = 'abbc'.split(/(b)*/)[1] === 'c' ||\n  // eslint-disable-next-line regexp/no-empty-group -- required for testing\n  'test'.split(/(?:)/, -1).length !== 4 ||\n  'ab'.split(/(?:ab)*/).length !== 2 ||\n  '.'.split(/(.?)(.?)/).length !== 4 ||\n  // eslint-disable-next-line regexp/no-empty-capturing-group, regexp/no-empty-group -- required for testing\n  '.'.split(/()()/).length > 1 ||\n  ''.split(/.?/).length;\n\n// @@split logic\nfixRegExpWellKnownSymbolLogic('split', function (SPLIT, nativeSplit, maybeCallNative) {\n  var internalSplit = '0'.split(undefined, 0).length ? function (separator, limit) {\n    return separator === undefined && limit === 0 ? [] : call(nativeSplit, this, separator, limit);\n  } : nativeSplit;\n\n  return [\n    // `String.prototype.split` method\n    // https://tc39.es/ecma262/#sec-string.prototype.split\n    function split(separator, limit) {\n      var O = requireObjectCoercible(this);\n      var splitter = isObject(separator) ? getMethod(separator, SPLIT) : undefined;\n      return splitter\n        ? call(splitter, separator, O, limit)\n        : call(internalSplit, toString(O), separator, limit);\n    },\n    // `RegExp.prototype[@@split]` method\n    // https://tc39.es/ecma262/#sec-regexp.prototype-@@split\n    //\n    // NOTE: This cannot be properly polyfilled in engines that don't support\n    // the 'y' flag.\n    function (string, limit) {\n      var rx = anObject(this);\n      var S = toString(string);\n\n      if (!BUGGY) {\n        var res = maybeCallNative(internalSplit, rx, S, limit, internalSplit !== nativeSplit);\n        if (res.done) return res.value;\n      }\n\n      var C = speciesConstructor(rx, RegExp);\n      var flags = toString(getRegExpFlags(rx));\n      var unicodeMatching = !!~stringIndexOf(flags, 'u') || !!~stringIndexOf(flags, 'v');\n      if (UNSUPPORTED_Y) {\n        if (!~stringIndexOf(flags, 'g')) flags += 'g';\n      } else if (!~stringIndexOf(flags, 'y')) flags += 'y';\n      // ^(? + rx + ) is needed, in combination with some S slicing, to\n      // simulate the 'y' flag.\n      var splitter = new C(UNSUPPORTED_Y ? '^(?:' + rx.source + ')' : rx, flags);\n      var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;\n      if (lim === 0) return [];\n      if (S.length === 0) return regExpExec(splitter, S) === null ? [S] : [];\n      var p = 0;\n      var q = 0;\n      var A = [];\n      while (q < S.length) {\n        splitter.lastIndex = UNSUPPORTED_Y ? 0 : q;\n        var z = regExpExec(splitter, UNSUPPORTED_Y ? stringSlice(S, q) : S);\n        var e;\n        if (\n          z === null ||\n          (e = min(toLength(splitter.lastIndex + (UNSUPPORTED_Y ? q : 0)), S.length)) === p\n        ) {\n          q = advanceStringIndex(S, q, unicodeMatching);\n        } else {\n          push(A, stringSlice(S, p, q));\n          if (A.length === lim) return A;\n          for (var i = 1; i <= z.length - 1; i++) {\n            push(A, z[i]);\n            if (A.length === lim) return A;\n          }\n          q = p = e;\n        }\n      }\n      push(A, stringSlice(S, p));\n      return A;\n    }\n  ];\n}, BUGGY || !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC, UNSUPPORTED_Y);\n", "'use strict';\nvar $ = require('../internals/export');\nvar uncurryThis = require('../internals/function-uncurry-this-clause');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar toLength = require('../internals/to-length');\nvar toString = require('../internals/to-string');\nvar notARegExp = require('../internals/not-a-regexp');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar correctIsRegExpLogic = require('../internals/correct-is-regexp-logic');\nvar IS_PURE = require('../internals/is-pure');\n\nvar stringSlice = uncurryThis(''.slice);\nvar min = Math.min;\n\nvar CORRECT_IS_REGEXP_LOGIC = correctIsRegExpLogic('startsWith');\n// https://github.com/zloirock/core-js/pull/702\nvar MDN_POLYFILL_BUG = !IS_PURE && !CORRECT_IS_REGEXP_LOGIC && !!function () {\n  var descriptor = getOwnPropertyDescriptor(String.prototype, 'startsWith');\n  return descriptor && !descriptor.writable;\n}();\n\n// `String.prototype.startsWith` method\n// https://tc39.es/ecma262/#sec-string.prototype.startswith\n$({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, {\n  startsWith: function startsWith(searchString /* , position = 0 */) {\n    var that = toString(requireObjectCoercible(this));\n    notARegExp(searchString);\n    var search = toString(searchString);\n    var index = toLength(min(arguments.length > 1 ? arguments[1] : undefined, that.length));\n    return stringSlice(that, index, index + search.length) === search;\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\nvar toString = require('../internals/to-string');\n\nvar stringSlice = uncurryThis(''.slice);\nvar max = Math.max;\nvar min = Math.min;\n\n// eslint-disable-next-line unicorn/prefer-string-slice -- required for testing\nvar FORCED = !''.substr || 'ab'.substr(-1) !== 'b';\n\n// `String.prototype.substr` method\n// https://tc39.es/ecma262/#sec-string.prototype.substr\n$({ target: 'String', proto: true, forced: FORCED }, {\n  substr: function substr(start, length) {\n    var that = toString(requireObjectCoercible(this));\n    var size = that.length;\n    var intStart = toIntegerOrInfinity(start);\n    var finalStart = intStart < 0 ? max(size + intStart, 0) : min(intStart, size);\n    var intLength = length === undefined ? size : toIntegerOrInfinity(length);\n    if (intLength <= 0) return '';\n    var intEnd = min(finalStart + intLength, size);\n    return finalStart >= intEnd ? '' : stringSlice(that, finalStart, intEnd);\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar call = require('../internals/function-call');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar toString = require('../internals/to-string');\nvar fails = require('../internals/fails');\n\nvar $Array = Array;\nvar charAt = uncurryThis(''.charAt);\nvar charCodeAt = uncurryThis(''.charCodeAt);\nvar join = uncurryThis([].join);\n// eslint-disable-next-line es/no-string-prototype-towellformed -- safe\nvar $toWellFormed = ''.toWellFormed;\nvar REPLACEMENT_CHARACTER = '\\uFFFD';\n\n// Safari bug\nvar TO_STRING_CONVERSION_BUG = $toWellFormed && fails(function () {\n  return call($toWellFormed, 1) !== '1';\n});\n\n// `String.prototype.toWellFormed` method\n// https://tc39.es/ecma262/#sec-string.prototype.towellformed\n$({ target: 'String', proto: true, forced: TO_STRING_CONVERSION_BUG }, {\n  toWellFormed: function toWellFormed() {\n    var S = toString(requireObjectCoercible(this));\n    if (TO_STRING_CONVERSION_BUG) return call($toWellFormed, S);\n    var length = S.length;\n    var result = $Array(length);\n    for (var i = 0; i < length; i++) {\n      var charCode = charCodeAt(S, i);\n      // single UTF-16 code unit\n      if ((charCode & 0xF800) !== 0xD800) result[i] = charAt(S, i);\n      // unpaired surrogate\n      else if (charCode >= 0xDC00 || i + 1 >= length || (charCodeAt(S, i + 1) & 0xFC00) !== 0xDC00) result[i] = REPLACEMENT_CHARACTER;\n      // surrogate pair\n      else {\n        result[i] = charAt(S, i);\n        result[++i] = charAt(S, i);\n      }\n    } return join(result, '');\n  }\n});\n", "'use strict';\nvar PROPER_FUNCTION_NAME = require('../internals/function-name').PROPER;\nvar fails = require('../internals/fails');\nvar whitespaces = require('../internals/whitespaces');\n\nvar non = '\\u200B\\u0085\\u180E';\n\n// check that a method works with the correct list\n// of whitespaces and has a correct name\nmodule.exports = function (METHOD_NAME) {\n  return fails(function () {\n    return !!whitespaces[METHOD_NAME]()\n      || non[METHOD_NAME]() !== non\n      || (PROPER_FUNCTION_NAME && whitespaces[METHOD_NAME].name !== METHOD_NAME);\n  });\n};\n", "'use strict';\nvar $ = require('../internals/export');\nvar $trim = require('../internals/string-trim').trim;\nvar forcedStringTrimMethod = require('../internals/string-trim-forced');\n\n// `String.prototype.trim` method\n// https://tc39.es/ecma262/#sec-string.prototype.trim\n$({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {\n  trim: function trim() {\n    return $trim(this);\n  }\n});\n", "'use strict';\nvar $trimEnd = require('../internals/string-trim').end;\nvar forcedStringTrimMethod = require('../internals/string-trim-forced');\n\n// `String.prototype.{ trimEnd, trimRight }` method\n// https://tc39.es/ecma262/#sec-string.prototype.trimend\n// https://tc39.es/ecma262/#String.prototype.trimright\nmodule.exports = forcedStringTrimMethod('trimEnd') ? function trimEnd() {\n  return $trimEnd(this);\n// eslint-disable-next-line es/no-string-prototype-trimstart-trimend -- safe\n} : ''.trimEnd;\n", "'use strict';\nvar $ = require('../internals/export');\nvar trimEnd = require('../internals/string-trim-end');\n\n// `String.prototype.trimRight` method\n// https://tc39.es/ecma262/#sec-string.prototype.trimend\n// eslint-disable-next-line es/no-string-prototype-trimleft-trimright -- safe\n$({ target: 'String', proto: true, name: 'trimEnd', forced: ''.trimRight !== trimEnd }, {\n  trimRight: trimEnd\n});\n", "'use strict';\n// TODO: Remove this line from `core-js@4`\nrequire('../modules/es.string.trim-right');\nvar $ = require('../internals/export');\nvar trimEnd = require('../internals/string-trim-end');\n\n// `String.prototype.trimEnd` method\n// https://tc39.es/ecma262/#sec-string.prototype.trimend\n// eslint-disable-next-line es/no-string-prototype-trimstart-trimend -- safe\n$({ target: 'String', proto: true, name: 'trimEnd', forced: ''.trimEnd !== trimEnd }, {\n  trimEnd: trimEnd\n});\n", "'use strict';\nvar $trimStart = require('../internals/string-trim').start;\nvar forcedStringTrimMethod = require('../internals/string-trim-forced');\n\n// `String.prototype.{ trimStart, trimLeft }` method\n// https://tc39.es/ecma262/#sec-string.prototype.trimstart\n// https://tc39.es/ecma262/#String.prototype.trimleft\nmodule.exports = forcedStringTrimMethod('trimStart') ? function trimStart() {\n  return $trimStart(this);\n// eslint-disable-next-line es/no-string-prototype-trimstart-trimend -- safe\n} : ''.trimStart;\n", "'use strict';\nvar $ = require('../internals/export');\nvar trimStart = require('../internals/string-trim-start');\n\n// `String.prototype.trimLeft` method\n// https://tc39.es/ecma262/#sec-string.prototype.trimleft\n// eslint-disable-next-line es/no-string-prototype-trimleft-trimright -- safe\n$({ target: 'String', proto: true, name: 'trimStart', forced: ''.trimLeft !== trimStart }, {\n  trimLeft: trimStart\n});\n", "'use strict';\n// TODO: Remove this line from `core-js@4`\nrequire('../modules/es.string.trim-left');\nvar $ = require('../internals/export');\nvar trimStart = require('../internals/string-trim-start');\n\n// `String.prototype.trimStart` method\n// https://tc39.es/ecma262/#sec-string.prototype.trimstart\n// eslint-disable-next-line es/no-string-prototype-trimstart-trimend -- safe\n$({ target: 'String', proto: true, name: 'trimStart', forced: ''.trimStart !== trimStart }, {\n  trimStart: trimStart\n});\n", "'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar toString = require('../internals/to-string');\n\nvar quot = /\"/g;\nvar replace = uncurryThis(''.replace);\n\n// `CreateHTML` abstract operation\n// https://tc39.es/ecma262/#sec-createhtml\nmodule.exports = function (string, tag, attribute, value) {\n  var S = toString(requireObjectCoercible(string));\n  var p1 = '<' + tag;\n  if (attribute !== '') p1 += ' ' + attribute + '=\"' + replace(toString(value), quot, '&quot;') + '\"';\n  return p1 + '>' + S + '</' + tag + '>';\n};\n", "'use strict';\nvar fails = require('../internals/fails');\n\n// check the existence of a method, lowercase\n// of a tag and escaping quotes in arguments\nmodule.exports = function (METHOD_NAME) {\n  return fails(function () {\n    var test = ''[METHOD_NAME]('\"');\n    return test !== test.toLowerCase() || test.split('\"').length > 3;\n  });\n};\n", "'use strict';\nvar $ = require('../internals/export');\nvar createHTML = require('../internals/create-html');\nvar forcedStringHTMLMethod = require('../internals/string-html-forced');\n\n// `String.prototype.anchor` method\n// https://tc39.es/ecma262/#sec-string.prototype.anchor\n$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('anchor') }, {\n  anchor: function anchor(name) {\n    return createHTML(this, 'a', 'name', name);\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar createHTML = require('../internals/create-html');\nvar forcedStringHTMLMethod = require('../internals/string-html-forced');\n\n// `String.prototype.big` method\n// https://tc39.es/ecma262/#sec-string.prototype.big\n$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('big') }, {\n  big: function big() {\n    return createHTML(this, 'big', '', '');\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar createHTML = require('../internals/create-html');\nvar forcedStringHTMLMethod = require('../internals/string-html-forced');\n\n// `String.prototype.blink` method\n// https://tc39.es/ecma262/#sec-string.prototype.blink\n$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('blink') }, {\n  blink: function blink() {\n    return createHTML(this, 'blink', '', '');\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar createHTML = require('../internals/create-html');\nvar forcedStringHTMLMethod = require('../internals/string-html-forced');\n\n// `String.prototype.bold` method\n// https://tc39.es/ecma262/#sec-string.prototype.bold\n$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('bold') }, {\n  bold: function bold() {\n    return createHTML(this, 'b', '', '');\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar createHTML = require('../internals/create-html');\nvar forcedStringHTMLMethod = require('../internals/string-html-forced');\n\n// `String.prototype.fixed` method\n// https://tc39.es/ecma262/#sec-string.prototype.fixed\n$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('fixed') }, {\n  fixed: function fixed() {\n    return createHTML(this, 'tt', '', '');\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar createHTML = require('../internals/create-html');\nvar forcedStringHTMLMethod = require('../internals/string-html-forced');\n\n// `String.prototype.fontcolor` method\n// https://tc39.es/ecma262/#sec-string.prototype.fontcolor\n$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('fontcolor') }, {\n  fontcolor: function fontcolor(color) {\n    return createHTML(this, 'font', 'color', color);\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar createHTML = require('../internals/create-html');\nvar forcedStringHTMLMethod = require('../internals/string-html-forced');\n\n// `String.prototype.fontsize` method\n// https://tc39.es/ecma262/#sec-string.prototype.fontsize\n$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('fontsize') }, {\n  fontsize: function fontsize(size) {\n    return createHTML(this, 'font', 'size', size);\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar createHTML = require('../internals/create-html');\nvar forcedStringHTMLMethod = require('../internals/string-html-forced');\n\n// `String.prototype.italics` method\n// https://tc39.es/ecma262/#sec-string.prototype.italics\n$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('italics') }, {\n  italics: function italics() {\n    return createHTML(this, 'i', '', '');\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar createHTML = require('../internals/create-html');\nvar forcedStringHTMLMethod = require('../internals/string-html-forced');\n\n// `String.prototype.link` method\n// https://tc39.es/ecma262/#sec-string.prototype.link\n$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('link') }, {\n  link: function link(url) {\n    return createHTML(this, 'a', 'href', url);\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar createHTML = require('../internals/create-html');\nvar forcedStringHTMLMethod = require('../internals/string-html-forced');\n\n// `String.prototype.small` method\n// https://tc39.es/ecma262/#sec-string.prototype.small\n$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('small') }, {\n  small: function small() {\n    return createHTML(this, 'small', '', '');\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar createHTML = require('../internals/create-html');\nvar forcedStringHTMLMethod = require('../internals/string-html-forced');\n\n// `String.prototype.strike` method\n// https://tc39.es/ecma262/#sec-string.prototype.strike\n$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('strike') }, {\n  strike: function strike() {\n    return createHTML(this, 'strike', '', '');\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar createHTML = require('../internals/create-html');\nvar forcedStringHTMLMethod = require('../internals/string-html-forced');\n\n// `String.prototype.sub` method\n// https://tc39.es/ecma262/#sec-string.prototype.sub\n$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('sub') }, {\n  sub: function sub() {\n    return createHTML(this, 'sub', '', '');\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar createHTML = require('../internals/create-html');\nvar forcedStringHTMLMethod = require('../internals/string-html-forced');\n\n// `String.prototype.sup` method\n// https://tc39.es/ecma262/#sec-string.prototype.sup\n$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('sup') }, {\n  sup: function sup() {\n    return createHTML(this, 'sup', '', '');\n  }\n});\n", "'use strict';\n/* eslint-disable no-new, sonarjs/inconsistent-function-call -- required for testing */\nvar globalThis = require('../internals/global-this');\nvar fails = require('../internals/fails');\nvar checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration');\nvar NATIVE_ARRAY_BUFFER_VIEWS = require('../internals/array-buffer-view-core').NATIVE_ARRAY_BUFFER_VIEWS;\n\nvar ArrayBuffer = globalThis.ArrayBuffer;\nvar Int8Array = globalThis.Int8Array;\n\nmodule.exports = !NATIVE_ARRAY_BUFFER_VIEWS || !fails(function () {\n  Int8Array(1);\n}) || !fails(function () {\n  new Int8Array(-1);\n}) || !checkCorrectnessOfIteration(function (iterable) {\n  new Int8Array();\n  new Int8Array(null);\n  new Int8Array(1.5);\n  new Int8Array(iterable);\n}, true) || fails(function () {\n  // Safari (11+) bug - a reason why even Safari 13 should load a typed array polyfill\n  return new Int8Array(new ArrayBuffer(2), 1, undefined).length !== 1;\n});\n", "'use strict';\nvar toPositiveInteger = require('../internals/to-positive-integer');\n\nvar $RangeError = RangeError;\n\nmodule.exports = function (it, BYTES) {\n  var offset = toPositiveInteger(it);\n  if (offset % BYTES) throw new $RangeError('Wrong offset');\n  return offset;\n};\n", "'use strict';\nvar floor = Math.floor;\n\n// https://tc39.es/ecma262/#sec-touint8clamp\nmodule.exports = function (it) {\n  var number = +it;\n  // eslint-disable-next-line no-self-compare -- NaN check\n  if (number !== number || number <= 0) return 0;\n  if (number >= 0xFF) return 0xFF;\n  var f = floor(number);\n  if (f + 0.5 < number) return f + 1;\n  if (number < f + 0.5) return f;\n  // round-half-to-even (banker's rounding)\n  return f % 2 === 0 ? f : f + 1;\n};\n", "'use strict';\nvar classof = require('../internals/classof');\n\nmodule.exports = function (it) {\n  var klass = classof(it);\n  return klass === 'BigInt64Array' || klass === 'BigUint64Array';\n};\n", "'use strict';\nvar toPrimitive = require('../internals/to-primitive');\n\nvar $TypeError = TypeError;\n\n// `ToBigInt` abstract operation\n// https://tc39.es/ecma262/#sec-tobigint\nmodule.exports = function (argument) {\n  var prim = toPrimitive(argument, 'number');\n  if (typeof prim == 'number') throw new $TypeError(\"Can't convert number to bigint\");\n  // eslint-disable-next-line es/no-bigint -- safe\n  return BigInt(prim);\n};\n", "'use strict';\nvar bind = require('../internals/function-bind-context');\nvar call = require('../internals/function-call');\nvar aCallable = require('../internals/a-callable');\nvar aConstructor = require('../internals/a-constructor');\nvar toObject = require('../internals/to-object');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar getIterator = require('../internals/get-iterator-internal');\nvar getIteratorMethod = require('../internals/get-iterator-method-internal');\nvar isArrayIteratorMethod = require('../internals/is-array-iterator-method');\nvar isBigIntArray = require('../internals/is-big-int-array');\nvar aTypedArrayConstructor = require('../internals/array-buffer-view-core').aTypedArrayConstructor;\nvar toBigInt = require('../internals/to-big-int');\n\nmodule.exports = function from(source /* , mapfn, thisArg */) {\n  var C = aConstructor(this);\n  var argumentsLength = arguments.length;\n  var mapfn = argumentsLength > 1 ? arguments[1] : undefined;\n  var mapping = mapfn !== undefined;\n  if (mapping) aCallable(mapfn);\n  var O = toObject(source);\n  var iteratorMethod = getIteratorMethod(O);\n  var i, length, result, thisIsBigIntArray, value, step, iterator, next;\n  if (iteratorMethod && !isArrayIteratorMethod(iteratorMethod)) {\n    iterator = getIterator(O, iteratorMethod);\n    next = iterator.next;\n    O = [];\n    while (!(step = call(next, iterator)).done) {\n      O.push(step.value);\n    }\n  }\n  if (mapping && argumentsLength > 2) {\n    mapfn = bind(mapfn, arguments[2]);\n  }\n  length = lengthOfArrayLike(O);\n  result = new (aTypedArrayConstructor(C))(length);\n  thisIsBigIntArray = isBigIntArray(result);\n  for (i = 0; length > i; i++) {\n    value = mapping ? mapfn(O[i], i) : O[i];\n    // FF30- typed arrays doesn't properly convert objects to typed array values\n    result[i] = thisIsBigIntArray ? toBigInt(value) : +value;\n  }\n  return result;\n};\n", "'use strict';\nvar $ = require('../internals/export');\nvar globalThis = require('../internals/global-this');\nvar call = require('../internals/function-call');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS = require('../internals/typed-array-constructors-require-wrappers');\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar ArrayBufferModule = require('../internals/array-buffer');\nvar anInstance = require('../internals/an-instance');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar isIntegralNumber = require('../internals/is-integral-number');\nvar toIndex = require('../internals/to-index');\nvar toOffset = require('../internals/to-offset');\nvar toUint8Clamped = require('../internals/to-uint8-clamped');\nvar toPropertyKey = require('../internals/to-property-key');\nvar hasOwn = require('../internals/has-own-property');\nvar classof = require('../internals/classof');\nvar isObject = require('../internals/is-object');\nvar isSymbol = require('../internals/is-symbol');\nvar create = require('../internals/object-create');\nvar isPrototypeOf = require('../internals/object-is-prototype-of');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar getOwnPropertyNames = require('../internals/object-get-own-property-names').f;\nvar typedArrayFrom = require('../internals/typed-array-from');\nvar forEach = require('../internals/array-iteration').forEach;\nvar setSpecies = require('../internals/set-species');\nvar defineBuiltInAccessor = require('../internals/define-built-in-accessor');\nvar definePropertyModule = require('../internals/object-define-property');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar arrayFromConstructorAndList = require('../internals/array-from-constructor-and-list');\nvar InternalStateModule = require('../internals/internal-state');\nvar inheritIfRequired = require('../internals/inherit-if-required');\n\nvar getInternalState = InternalStateModule.get;\nvar setInternalState = InternalStateModule.set;\nvar enforceInternalState = InternalStateModule.enforce;\nvar nativeDefineProperty = definePropertyModule.f;\nvar nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\nvar RangeError = globalThis.RangeError;\nvar ArrayBuffer = ArrayBufferModule.ArrayBuffer;\nvar ArrayBufferPrototype = ArrayBuffer.prototype;\nvar DataView = ArrayBufferModule.DataView;\nvar NATIVE_ARRAY_BUFFER_VIEWS = ArrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS;\nvar TYPED_ARRAY_TAG = ArrayBufferViewCore.TYPED_ARRAY_TAG;\nvar TypedArray = ArrayBufferViewCore.TypedArray;\nvar TypedArrayPrototype = ArrayBufferViewCore.TypedArrayPrototype;\nvar isTypedArray = ArrayBufferViewCore.isTypedArray;\nvar BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT';\nvar WRONG_LENGTH = 'Wrong length';\n\nvar addGetter = function (it, key) {\n  defineBuiltInAccessor(it, key, {\n    configurable: true,\n    get: function () {\n      return getInternalState(this)[key];\n    }\n  });\n};\n\nvar isArrayBuffer = function (it) {\n  var klass;\n  return isPrototypeOf(ArrayBufferPrototype, it) || (klass = classof(it)) === 'ArrayBuffer' || klass === 'SharedArrayBuffer';\n};\n\nvar isTypedArrayIndex = function (target, key) {\n  return isTypedArray(target)\n    && !isSymbol(key)\n    && key in target\n    && isIntegralNumber(+key)\n    && key >= 0;\n};\n\nvar wrappedGetOwnPropertyDescriptor = function getOwnPropertyDescriptor(target, key) {\n  key = toPropertyKey(key);\n  return isTypedArrayIndex(target, key)\n    ? createPropertyDescriptor(2, target[key])\n    : nativeGetOwnPropertyDescriptor(target, key);\n};\n\nvar wrappedDefineProperty = function defineProperty(target, key, descriptor) {\n  key = toPropertyKey(key);\n  if (isTypedArrayIndex(target, key)\n    && isObject(descriptor)\n    && hasOwn(descriptor, 'value')\n    && !hasOwn(descriptor, 'get')\n    && !hasOwn(descriptor, 'set')\n    // TODO: add validation descriptor w/o calling accessors\n    && !descriptor.configurable\n    && (!hasOwn(descriptor, 'writable') || descriptor.writable)\n    && (!hasOwn(descriptor, 'enumerable') || descriptor.enumerable)\n  ) {\n    target[key] = descriptor.value;\n    return target;\n  } return nativeDefineProperty(target, key, descriptor);\n};\n\nif (DESCRIPTORS) {\n  if (!NATIVE_ARRAY_BUFFER_VIEWS) {\n    getOwnPropertyDescriptorModule.f = wrappedGetOwnPropertyDescriptor;\n    definePropertyModule.f = wrappedDefineProperty;\n    addGetter(TypedArrayPrototype, 'buffer');\n    addGetter(TypedArrayPrototype, 'byteOffset');\n    addGetter(TypedArrayPrototype, 'byteLength');\n    addGetter(TypedArrayPrototype, 'length');\n  }\n\n  $({ target: 'Object', stat: true, forced: !NATIVE_ARRAY_BUFFER_VIEWS }, {\n    getOwnPropertyDescriptor: wrappedGetOwnPropertyDescriptor,\n    defineProperty: wrappedDefineProperty\n  });\n\n  module.exports = function (TYPE, wrapper, CLAMPED) {\n    var BYTES = TYPE.match(/\\d+/)[0] / 8;\n    var CONSTRUCTOR_NAME = TYPE + (CLAMPED ? 'Clamped' : '') + 'Array';\n    var GETTER = 'get' + TYPE;\n    var SETTER = 'set' + TYPE;\n    var NativeTypedArrayConstructor = globalThis[CONSTRUCTOR_NAME];\n    var TypedArrayConstructor = NativeTypedArrayConstructor;\n    var TypedArrayConstructorPrototype = TypedArrayConstructor && TypedArrayConstructor.prototype;\n    var exported = {};\n\n    var getter = function (that, index) {\n      var data = getInternalState(that);\n      return data.view[GETTER](index * BYTES + data.byteOffset, true);\n    };\n\n    var setter = function (that, index, value) {\n      var data = getInternalState(that);\n      data.view[SETTER](index * BYTES + data.byteOffset, CLAMPED ? toUint8Clamped(value) : value, true);\n    };\n\n    var addElement = function (that, index) {\n      nativeDefineProperty(that, index, {\n        get: function () {\n          return getter(this, index);\n        },\n        set: function (value) {\n          return setter(this, index, value);\n        },\n        enumerable: true\n      });\n    };\n\n    if (!NATIVE_ARRAY_BUFFER_VIEWS) {\n      TypedArrayConstructor = wrapper(function (that, data, offset, $length) {\n        anInstance(that, TypedArrayConstructorPrototype);\n        var index = 0;\n        var byteOffset = 0;\n        var buffer, byteLength, length;\n        if (!isObject(data)) {\n          length = toIndex(data);\n          byteLength = length * BYTES;\n          buffer = new ArrayBuffer(byteLength);\n        } else if (isArrayBuffer(data)) {\n          buffer = data;\n          byteOffset = toOffset(offset, BYTES);\n          var $len = data.byteLength;\n          if ($length === undefined) {\n            if ($len % BYTES) throw new RangeError(WRONG_LENGTH);\n            byteLength = $len - byteOffset;\n            if (byteLength < 0) throw new RangeError(WRONG_LENGTH);\n          } else {\n            byteLength = toIndex($length) * BYTES;\n            if (byteLength + byteOffset > $len) throw new RangeError(WRONG_LENGTH);\n          }\n          length = byteLength / BYTES;\n        } else if (isTypedArray(data)) {\n          return arrayFromConstructorAndList(TypedArrayConstructor, data);\n        } else {\n          return call(typedArrayFrom, TypedArrayConstructor, data);\n        }\n        setInternalState(that, {\n          buffer: buffer,\n          byteOffset: byteOffset,\n          byteLength: byteLength,\n          length: length,\n          view: new DataView(buffer)\n        });\n        while (index < length) addElement(that, index++);\n      });\n\n      if (setPrototypeOf) setPrototypeOf(TypedArrayConstructor, TypedArray);\n      TypedArrayConstructorPrototype = TypedArrayConstructor.prototype = create(TypedArrayPrototype);\n    } else if (TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS) {\n      TypedArrayConstructor = wrapper(function (dummy, data, typedArrayOffset, $length) {\n        anInstance(dummy, TypedArrayConstructorPrototype);\n        return inheritIfRequired(function () {\n          if (!isObject(data)) return new NativeTypedArrayConstructor(toIndex(data));\n          if (isArrayBuffer(data)) return $length !== undefined\n            ? new NativeTypedArrayConstructor(data, toOffset(typedArrayOffset, BYTES), $length)\n            : typedArrayOffset !== undefined\n              ? new NativeTypedArrayConstructor(data, toOffset(typedArrayOffset, BYTES))\n              : new NativeTypedArrayConstructor(data);\n          if (isTypedArray(data)) return arrayFromConstructorAndList(TypedArrayConstructor, data);\n          return call(typedArrayFrom, TypedArrayConstructor, data);\n        }(), dummy, TypedArrayConstructor);\n      });\n\n      if (setPrototypeOf) setPrototypeOf(TypedArrayConstructor, TypedArray);\n      forEach(getOwnPropertyNames(NativeTypedArrayConstructor), function (key) {\n        if (!(key in TypedArrayConstructor)) {\n          createNonEnumerableProperty(TypedArrayConstructor, key, NativeTypedArrayConstructor[key]);\n        }\n      });\n      TypedArrayConstructor.prototype = TypedArrayConstructorPrototype;\n    }\n\n    if (TypedArrayConstructorPrototype.constructor !== TypedArrayConstructor) {\n      createNonEnumerableProperty(TypedArrayConstructorPrototype, 'constructor', TypedArrayConstructor);\n    }\n\n    enforceInternalState(TypedArrayConstructorPrototype).TypedArrayConstructor = TypedArrayConstructor;\n\n    if (TYPED_ARRAY_TAG) {\n      createNonEnumerableProperty(TypedArrayConstructorPrototype, TYPED_ARRAY_TAG, CONSTRUCTOR_NAME);\n    }\n\n    var FORCED = TypedArrayConstructor !== NativeTypedArrayConstructor;\n\n    exported[CONSTRUCTOR_NAME] = TypedArrayConstructor;\n\n    $({ global: true, constructor: true, forced: FORCED, sham: !NATIVE_ARRAY_BUFFER_VIEWS }, exported);\n\n    if (!(BYTES_PER_ELEMENT in TypedArrayConstructor)) {\n      createNonEnumerableProperty(TypedArrayConstructor, BYTES_PER_ELEMENT, BYTES);\n    }\n\n    if (!(BYTES_PER_ELEMENT in TypedArrayConstructorPrototype)) {\n      createNonEnumerableProperty(TypedArrayConstructorPrototype, BYTES_PER_ELEMENT, BYTES);\n    }\n\n    setSpecies(CONSTRUCTOR_NAME);\n  };\n} else module.exports = function () { /* empty */ };\n", "'use strict';\nvar createTypedArrayConstructor = require('../internals/typed-array-constructor');\n\n// `Float32Array` constructor\n// https://tc39.es/ecma262/#sec-typedarray-objects\ncreateTypedArrayConstructor('Float32', function (init) {\n  return function Float32Array(data, byteOffset, length) {\n    return init(this, data, byteOffset, length);\n  };\n});\n", "'use strict';\nvar createTypedArrayConstructor = require('../internals/typed-array-constructor');\n\n// `Float64Array` constructor\n// https://tc39.es/ecma262/#sec-typedarray-objects\ncreateTypedArrayConstructor('Float64', function (init) {\n  return function Float64Array(data, byteOffset, length) {\n    return init(this, data, byteOffset, length);\n  };\n});\n", "'use strict';\nvar createTypedArrayConstructor = require('../internals/typed-array-constructor');\n\n// `Int8Array` constructor\n// https://tc39.es/ecma262/#sec-typedarray-objects\ncreateTypedArrayConstructor('Int8', function (init) {\n  return function Int8Array(data, byteOffset, length) {\n    return init(this, data, byteOffset, length);\n  };\n});\n", "'use strict';\nvar createTypedArrayConstructor = require('../internals/typed-array-constructor');\n\n// `Int16Array` constructor\n// https://tc39.es/ecma262/#sec-typedarray-objects\ncreateTypedArrayConstructor('Int16', function (init) {\n  return function Int16Array(data, byteOffset, length) {\n    return init(this, data, byteOffset, length);\n  };\n});\n", "'use strict';\nvar createTypedArrayConstructor = require('../internals/typed-array-constructor');\n\n// `Int32Array` constructor\n// https://tc39.es/ecma262/#sec-typedarray-objects\ncreateTypedArrayConstructor('Int32', function (init) {\n  return function Int32Array(data, byteOffset, length) {\n    return init(this, data, byteOffset, length);\n  };\n});\n", "'use strict';\nvar createTypedArrayConstructor = require('../internals/typed-array-constructor');\n\n// `Uint8Array` constructor\n// https://tc39.es/ecma262/#sec-typedarray-objects\ncreateTypedArrayConstructor('Uint8', function (init) {\n  return function Uint8Array(data, byteOffset, length) {\n    return init(this, data, byteOffset, length);\n  };\n});\n", "'use strict';\nvar createTypedArrayConstructor = require('../internals/typed-array-constructor');\n\n// `Uint8ClampedArray` constructor\n// https://tc39.es/ecma262/#sec-typedarray-objects\ncreateTypedArrayConstructor('Uint8', function (init) {\n  return function Uint8ClampedArray(data, byteOffset, length) {\n    return init(this, data, byteOffset, length);\n  };\n}, true);\n", "'use strict';\nvar createTypedArrayConstructor = require('../internals/typed-array-constructor');\n\n// `Uint16Array` constructor\n// https://tc39.es/ecma262/#sec-typedarray-objects\ncreateTypedArrayConstructor('Uint16', function (init) {\n  return function Uint16Array(data, byteOffset, length) {\n    return init(this, data, byteOffset, length);\n  };\n});\n", "'use strict';\nvar createTypedArrayConstructor = require('../internals/typed-array-constructor');\n\n// `Uint32Array` constructor\n// https://tc39.es/ecma262/#sec-typedarray-objects\ncreateTypedArrayConstructor('Uint32', function (init) {\n  return function Uint32Array(data, byteOffset, length) {\n    return init(this, data, byteOffset, length);\n  };\n});\n", "'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.at` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.at\nexportTypedArrayMethod('at', function at(index) {\n  var O = aTypedArray(this);\n  var len = lengthOfArrayLike(O);\n  var relativeIndex = toIntegerOrInfinity(index);\n  var k = relativeIndex >= 0 ? relativeIndex : len + relativeIndex;\n  return (k < 0 || k >= len) ? undefined : O[k];\n});\n", "'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $ArrayCopyWithin = require('../internals/array-copy-within');\n\nvar u$ArrayCopyWithin = uncurryThis($ArrayCopyWithin);\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.copyWithin` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.copywithin\nexportTypedArrayMethod('copyWithin', function copyWithin(target, start /* , end */) {\n  return u$ArrayCopyWithin(aTypedArray(this), target, start, arguments.length > 2 ? arguments[2] : undefined);\n});\n", "'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $every = require('../internals/array-iteration').every;\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.every` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.every\nexportTypedArrayMethod('every', function every(callbackfn /* , thisArg */) {\n  return $every(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n});\n", "'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $fill = require('../internals/array-fill');\nvar toBigInt = require('../internals/to-big-int');\nvar classof = require('../internals/classof');\nvar call = require('../internals/function-call');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar fails = require('../internals/fails');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar slice = uncurryThis(''.slice);\n\n// V8 ~ Chrome < 59, Safari < 14.1, FF < 55, Edge <=18\nvar CONVERSION_BUG = fails(function () {\n  var count = 0;\n  // eslint-disable-next-line es/no-typed-arrays -- safe\n  new Int8Array(2).fill({ valueOf: function () { return count++; } });\n  return count !== 1;\n});\n\n// `%TypedArray%.prototype.fill` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.fill\nexportTypedArrayMethod('fill', function fill(value /* , start, end */) {\n  var length = arguments.length;\n  aTypedArray(this);\n  var actualValue = slice(classof(this), 0, 3) === 'Big' ? toBigInt(value) : +value;\n  return call($fill, this, actualValue, length > 1 ? arguments[1] : undefined, length > 2 ? arguments[2] : undefined);\n}, CONVERSION_BUG);\n", "'use strict';\nvar arrayFromConstructorAndList = require('../internals/array-from-constructor-and-list');\nvar getTypedArrayConstructor = require('../internals/array-buffer-view-core').getTypedArrayConstructor;\n\nmodule.exports = function (instance, list) {\n  return arrayFromConstructorAndList(getTypedArrayConstructor(instance), list);\n};\n", "'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $filter = require('../internals/array-iteration').filter;\nvar fromSameTypeAndList = require('../internals/typed-array-from-same-type-and-list');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.filter` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.filter\nexportTypedArrayMethod('filter', function filter(callbackfn /* , thisArg */) {\n  var list = $filter(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n  return fromSameTypeAndList(this, list);\n});\n", "'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $find = require('../internals/array-iteration').find;\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.find` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.find\nexportTypedArrayMethod('find', function find(predicate /* , thisArg */) {\n  return $find(aTypedArray(this), predicate, arguments.length > 1 ? arguments[1] : undefined);\n});\n", "'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $findIndex = require('../internals/array-iteration').findIndex;\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.findIndex` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.findindex\nexportTypedArrayMethod('findIndex', function findIndex(predicate /* , thisArg */) {\n  return $findIndex(aTypedArray(this), predicate, arguments.length > 1 ? arguments[1] : undefined);\n});\n", "'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $findLast = require('../internals/array-iteration-from-last').findLast;\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.findLast` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.findlast\nexportTypedArrayMethod('findLast', function findLast(predicate /* , thisArg */) {\n  return $findLast(aTypedArray(this), predicate, arguments.length > 1 ? arguments[1] : undefined);\n});\n", "'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $findLastIndex = require('../internals/array-iteration-from-last').findLastIndex;\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.findLastIndex` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.findlastindex\nexportTypedArrayMethod('findLastIndex', function findLastIndex(predicate /* , thisArg */) {\n  return $findLastIndex(aTypedArray(this), predicate, arguments.length > 1 ? arguments[1] : undefined);\n});\n", "'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $forEach = require('../internals/array-iteration').forEach;\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.forEach` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.foreach\nexportTypedArrayMethod('forEach', function forEach(callbackfn /* , thisArg */) {\n  $forEach(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n});\n", "'use strict';\nvar TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS = require('../internals/typed-array-constructors-require-wrappers');\nvar exportTypedArrayStaticMethod = require('../internals/array-buffer-view-core').exportTypedArrayStaticMethod;\nvar typedArrayFrom = require('../internals/typed-array-from');\n\n// `%TypedArray%.from` method\n// https://tc39.es/ecma262/#sec-%typedarray%.from\nexportTypedArrayStaticMethod('from', typedArrayFrom, TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS);\n", "'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $includes = require('../internals/array-includes').includes;\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.includes` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.includes\nexportTypedArrayMethod('includes', function includes(searchElement /* , fromIndex */) {\n  return $includes(aTypedArray(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);\n});\n", "'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $indexOf = require('../internals/array-includes').indexOf;\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.indexOf` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.indexof\nexportTypedArrayMethod('indexOf', function indexOf(searchElement /* , fromIndex */) {\n  return $indexOf(aTypedArray(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);\n});\n", "'use strict';\nvar globalThis = require('../internals/global-this');\nvar fails = require('../internals/fails');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar ArrayIterators = require('../modules/es.array.iterator');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar Uint8Array = globalThis.Uint8Array;\nvar arrayValues = uncurryThis(ArrayIterators.values);\nvar arrayKeys = uncurryThis(ArrayIterators.keys);\nvar arrayEntries = uncurryThis(ArrayIterators.entries);\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar TypedArrayPrototype = Uint8Array && Uint8Array.prototype;\n\nvar GENERIC = !fails(function () {\n  TypedArrayPrototype[ITERATOR].call([1]);\n});\n\nvar ITERATOR_IS_VALUES = !!TypedArrayPrototype\n  && TypedArrayPrototype.values\n  && TypedArrayPrototype[ITERATOR] === TypedArrayPrototype.values\n  && TypedArrayPrototype.values.name === 'values';\n\nvar typedArrayValues = function values() {\n  return arrayValues(aTypedArray(this));\n};\n\n// `%TypedArray%.prototype.entries` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.entries\nexportTypedArrayMethod('entries', function entries() {\n  return arrayEntries(aTypedArray(this));\n}, GENERIC);\n// `%TypedArray%.prototype.keys` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.keys\nexportTypedArrayMethod('keys', function keys() {\n  return arrayKeys(aTypedArray(this));\n}, GENERIC);\n// `%TypedArray%.prototype.values` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.values\nexportTypedArrayMethod('values', typedArrayValues, GENERIC || !ITERATOR_IS_VALUES, { name: 'values' });\n// `%TypedArray%.prototype[@@iterator]` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype-@@iterator\nexportTypedArrayMethod(ITERATOR, typedArrayValues, GENERIC || !ITERATOR_IS_VALUES, { name: 'values' });\n", "'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar uncurryThis = require('../internals/function-uncurry-this');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar $join = uncurryThis([].join);\n\n// `%TypedArray%.prototype.join` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.join\nexportTypedArrayMethod('join', function join(separator) {\n  return $join(aTypedArray(this), separator);\n});\n", "'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar apply = require('../internals/function-apply');\nvar $lastIndexOf = require('../internals/array-last-index-of');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.lastIndexOf` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.lastindexof\nexportTypedArrayMethod('lastIndexOf', function lastIndexOf(searchElement /* , fromIndex */) {\n  var length = arguments.length;\n  return apply($lastIndexOf, aTypedArray(this), length > 1 ? [searchElement, arguments[1]] : [searchElement]);\n});\n", "'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $map = require('../internals/array-iteration').map;\nvar fromSameTypeAndList = require('../internals/typed-array-from-same-type-and-list');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.map` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.map\nexportTypedArrayMethod('map', function map(mapfn /* , thisArg */) {\n  var list = $map(aTypedArray(this), mapfn, arguments.length > 1 ? arguments[1] : undefined);\n  return fromSameTypeAndList(this, list);\n});\n", "'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS = require('../internals/typed-array-constructors-require-wrappers');\n\nvar aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor;\nvar exportTypedArrayStaticMethod = ArrayBufferViewCore.exportTypedArrayStaticMethod;\n\n// `%TypedArray%.of` method\n// https://tc39.es/ecma262/#sec-%typedarray%.of\nexportTypedArrayStaticMethod('of', function of(/* ...items */) {\n  var index = 0;\n  var length = arguments.length;\n  var result = new (aTypedArrayConstructor(this))(length);\n  while (length > index) result[index] = arguments[index++];\n  return result;\n}, TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS);\n", "'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $reduce = require('../internals/array-reduce').left;\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.reduce` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.reduce\nexportTypedArrayMethod('reduce', function reduce(callbackfn /* , initialValue */) {\n  var length = arguments.length;\n  return $reduce(aTypedArray(this), callbackfn, length, length > 1 ? arguments[1] : undefined);\n});\n", "'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $reduceRight = require('../internals/array-reduce').right;\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.reduceRight` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.reduceright\nexportTypedArrayMethod('reduceRight', function reduceRight(callbackfn /* , initialValue */) {\n  var length = arguments.length;\n  return $reduceRight(aTypedArray(this), callbackfn, length, length > 1 ? arguments[1] : undefined);\n});\n", "'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar floor = Math.floor;\n\n// `%TypedArray%.prototype.reverse` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.reverse\nexportTypedArrayMethod('reverse', function reverse() {\n  var that = this;\n  var length = aTypedArray(that).length;\n  var middle = floor(length / 2);\n  var index = 0;\n  var value;\n  while (index < middle) {\n    value = that[index];\n    that[index++] = that[--length];\n    that[length] = value;\n  } return that;\n});\n", "'use strict';\nvar globalThis = require('../internals/global-this');\nvar call = require('../internals/function-call');\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar toOffset = require('../internals/to-offset');\nvar toIndexedObject = require('../internals/to-object');\nvar fails = require('../internals/fails');\n\nvar RangeError = globalThis.RangeError;\nvar Int8Array = globalThis.Int8Array;\nvar Int8ArrayPrototype = Int8Array && Int8Array.prototype;\nvar $set = Int8ArrayPrototype && Int8ArrayPrototype.set;\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\nvar WORKS_WITH_OBJECTS_AND_GENERIC_ON_TYPED_ARRAYS = !fails(function () {\n  // eslint-disable-next-line es/no-typed-arrays -- required for testing\n  var array = new Uint8ClampedArray(2);\n  call($set, array, { length: 1, 0: 3 }, 1);\n  return array[1] !== 3;\n});\n\n// https://bugs.chromium.org/p/v8/issues/detail?id=11294 and other\nvar TO_OBJECT_BUG = WORKS_WITH_OBJECTS_AND_GENERIC_ON_TYPED_ARRAYS && ArrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS && fails(function () {\n  var array = new Int8Array(2);\n  array.set(1);\n  array.set('2', 1);\n  return array[0] !== 0 || array[1] !== 2;\n});\n\n// `%TypedArray%.prototype.set` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.set\nexportTypedArrayMethod('set', function set(arrayLike /* , offset */) {\n  aTypedArray(this);\n  var offset = toOffset(arguments.length > 1 ? arguments[1] : undefined, 1);\n  var src = toIndexedObject(arrayLike);\n  if (WORKS_WITH_OBJECTS_AND_GENERIC_ON_TYPED_ARRAYS) return call($set, this, src, offset);\n  var length = this.length;\n  var len = lengthOfArrayLike(src);\n  var index = 0;\n  if (len + offset > length) throw new RangeError('Wrong length');\n  while (index < len) this[offset + index] = src[index++];\n}, !WORKS_WITH_OBJECTS_AND_GENERIC_ON_TYPED_ARRAYS || TO_OBJECT_BUG);\n", "'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar fails = require('../internals/fails');\nvar arraySlice = require('../internals/array-slice');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar getTypedArrayConstructor = ArrayBufferViewCore.getTypedArrayConstructor;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\nvar FORCED = fails(function () {\n  // eslint-disable-next-line es/no-typed-arrays -- required for testing\n  new Int8Array(1).slice();\n});\n\n// `%TypedArray%.prototype.slice` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.slice\nexportTypedArrayMethod('slice', function slice(start, end) {\n  var list = arraySlice(aTypedArray(this), start, end);\n  var C = getTypedArrayConstructor(this);\n  var index = 0;\n  var length = list.length;\n  var result = new C(length);\n  while (length > index) result[index] = list[index++];\n  return result;\n}, FORCED);\n", "'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $some = require('../internals/array-iteration').some;\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.some` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.some\nexportTypedArrayMethod('some', function some(callbackfn /* , thisArg */) {\n  return $some(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n});\n", "'use strict';\nvar globalThis = require('../internals/global-this');\nvar uncurryThis = require('../internals/function-uncurry-this-clause');\nvar fails = require('../internals/fails');\nvar aCallable = require('../internals/a-callable');\nvar internalSort = require('../internals/array-sort');\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar FF = require('../internals/environment-ff-version');\nvar IE_OR_EDGE = require('../internals/environment-is-ie-or-edge');\nvar V8 = require('../internals/environment-v8-version');\nvar WEBKIT = require('../internals/environment-webkit-version');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar Uint16Array = globalThis.Uint16Array;\nvar nativeSort = Uint16Array && uncurryThis(Uint16Array.prototype.sort);\n\n// WebKit\nvar ACCEPT_INCORRECT_ARGUMENTS = !!nativeSort && !(fails(function () {\n  nativeSort(new Uint16Array(2), null);\n}) && fails(function () {\n  nativeSort(new Uint16Array(2), {});\n}));\n\nvar STABLE_SORT = !!nativeSort && !fails(function () {\n  // feature detection can be too slow, so check engines versions\n  if (V8) return V8 < 74;\n  if (FF) return FF < 67;\n  if (IE_OR_EDGE) return true;\n  if (WEBKIT) return WEBKIT < 602;\n\n  var array = new Uint16Array(516);\n  var expected = Array(516);\n  var index, mod;\n\n  for (index = 0; index < 516; index++) {\n    mod = index % 4;\n    array[index] = 515 - index;\n    expected[index] = index - 2 * mod + 3;\n  }\n\n  nativeSort(array, function (a, b) {\n    return (a / 4 | 0) - (b / 4 | 0);\n  });\n\n  for (index = 0; index < 516; index++) {\n    if (array[index] !== expected[index]) return true;\n  }\n});\n\nvar getSortCompare = function (comparefn) {\n  return function (x, y) {\n    if (comparefn !== undefined) return +comparefn(x, y) || 0;\n    // eslint-disable-next-line no-self-compare -- NaN check\n    if (y !== y) return x !== x ? 0 : -1;\n    // eslint-disable-next-line no-self-compare -- NaN check\n    if (x !== x) return 1;\n    if (x === 0 && y === 0) return 1 / x > 0 ? (1 / y > 0 ? 0 : 1) : (1 / y > 0 ? -1 : 0);\n    return x > y ? 1 : x < y ? -1 : 0;\n  };\n};\n\n// `%TypedArray%.prototype.sort` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.sort\nexportTypedArrayMethod('sort', function sort(comparefn) {\n  if (comparefn !== undefined) aCallable(comparefn);\n  if (STABLE_SORT) return nativeSort(this, comparefn);\n\n  return internalSort(aTypedArray(this), getSortCompare(comparefn));\n}, !STABLE_SORT || ACCEPT_INCORRECT_ARGUMENTS);\n", "'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar toLength = require('../internals/to-length');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar getTypedArrayConstructor = ArrayBufferViewCore.getTypedArrayConstructor;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.subarray` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.subarray\nexportTypedArrayMethod('subarray', function subarray(begin, end) {\n  var O = aTypedArray(this);\n  var length = O.length;\n  var beginIndex = toAbsoluteIndex(begin, length);\n  var C = getTypedArrayConstructor(O);\n  return new C(\n    O.buffer,\n    O.byteOffset + beginIndex * O.BYTES_PER_ELEMENT,\n    toLength((end === undefined ? length : toAbsoluteIndex(end, length)) - beginIndex)\n  );\n});\n", "'use strict';\nvar globalThis = require('../internals/global-this');\nvar apply = require('../internals/function-apply');\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar fails = require('../internals/fails');\nvar arraySlice = require('../internals/array-slice');\n\nvar Int8Array = globalThis.Int8Array;\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar $toLocaleString = [].toLocaleString;\n\n// iOS Safari 6.x fails here\nvar TO_LOCALE_STRING_BUG = !!Int8Array && fails(function () {\n  $toLocaleString.call(new Int8Array(1));\n});\n\nvar FORCED = fails(function () {\n  return [1, 2].toLocaleString() !== new Int8Array([1, 2]).toLocaleString();\n}) || !fails(function () {\n  Int8Array.prototype.toLocaleString.call([1, 2]);\n});\n\n// `%TypedArray%.prototype.toLocaleString` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.tolocalestring\nexportTypedArrayMethod('toLocaleString', function toLocaleString() {\n  return apply(\n    $toLocaleString,\n    TO_LOCALE_STRING_BUG ? arraySlice(aTypedArray(this)) : aTypedArray(this),\n    arraySlice(arguments)\n  );\n}, FORCED);\n", "'use strict';\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar getTypedArrayConstructor = ArrayBufferViewCore.getTypedArrayConstructor;\n\n// `%TypedArray%.prototype.toReversed` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.toreversed\nexportTypedArrayMethod('toReversed', function toReversed() {\n  var O = aTypedArray(this);\n  var len = lengthOfArrayLike(O);\n  var A = new (getTypedArrayConstructor(O))(len);\n  var k = 0;\n  for (; k < len; k++) A[k] = O[len - k - 1];\n  return A;\n});\n", "'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar aCallable = require('../internals/a-callable');\nvar arrayFromConstructorAndList = require('../internals/array-from-constructor-and-list');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar getTypedArrayConstructor = ArrayBufferViewCore.getTypedArrayConstructor;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar sort = uncurryThis(ArrayBufferViewCore.TypedArrayPrototype.sort);\n\n// `%TypedArray%.prototype.toSorted` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.tosorted\nexportTypedArrayMethod('toSorted', function toSorted(compareFn) {\n  if (compareFn !== undefined) aCallable(compareFn);\n  var O = aTypedArray(this);\n  var A = arrayFromConstructorAndList(getTypedArrayConstructor(O), O);\n  return sort(A, compareFn);\n});\n", "'use strict';\nvar exportTypedArrayMethod = require('../internals/array-buffer-view-core').exportTypedArrayMethod;\nvar fails = require('../internals/fails');\nvar globalThis = require('../internals/global-this');\nvar uncurryThis = require('../internals/function-uncurry-this');\n\nvar Uint8Array = globalThis.Uint8Array;\nvar Uint8ArrayPrototype = Uint8Array && Uint8Array.prototype || {};\nvar arrayToString = [].toString;\nvar join = uncurryThis([].join);\n\nif (fails(function () { arrayToString.call({}); })) {\n  arrayToString = function toString() {\n    return join(this);\n  };\n}\n\nvar IS_NOT_ARRAY_METHOD = Uint8ArrayPrototype.toString !== arrayToString;\n\n// `%TypedArray%.prototype.toString` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.tostring\nexportTypedArrayMethod('toString', arrayToString, IS_NOT_ARRAY_METHOD);\n", "'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar isBigIntArray = require('../internals/is-big-int-array');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\nvar toBigInt = require('../internals/to-big-int');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar getTypedArrayConstructor = ArrayBufferViewCore.getTypedArrayConstructor;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\nvar $RangeError = RangeError;\n\nvar PROPER_ORDER = function () {\n  try {\n    // eslint-disable-next-line no-throw-literal, es/no-typed-arrays, es/no-array-prototype-with -- required for testing\n    new Int8Array(1)['with'](2, { valueOf: function () { throw 8; } });\n  } catch (error) {\n    // some early implementations, like WebKit, does not follow the final semantic\n    // https://github.com/tc39/proposal-change-array-by-copy/pull/86\n    return error === 8;\n  }\n}();\n\n// Bug in WebKit. It should truncate a negative fractional index to zero, but instead throws an error\nvar THROW_ON_NEGATIVE_FRACTIONAL_INDEX = PROPER_ORDER && function () {\n  try {\n    // eslint-disable-next-line es/no-typed-arrays, es/no-array-prototype-with -- required for testing\n    new Int8Array(1)['with'](-0.5, 1);\n  } catch (error) {\n    return true;\n  }\n}();\n\n// `%TypedArray%.prototype.with` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.with\nexportTypedArrayMethod('with', { 'with': function (index, value) {\n  var O = aTypedArray(this);\n  var len = lengthOfArrayLike(O);\n  var relativeIndex = toIntegerOrInfinity(index);\n  var actualIndex = relativeIndex < 0 ? len + relativeIndex : relativeIndex;\n  var numericValue = isBigIntArray(O) ? toBigInt(value) : +value;\n  if (actualIndex >= len || actualIndex < 0) throw new $RangeError('Incorrect index');\n  var A = new (getTypedArrayConstructor(O))(len);\n  var k = 0;\n  for (; k < len; k++) A[k] = k === actualIndex ? numericValue : O[k];\n  return A;\n} }['with'], !PROPER_ORDER || THROW_ON_NEGATIVE_FRACTIONAL_INDEX);\n", "'use strict';\nvar commonAlphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\nvar base64Alphabet = commonAlphabet + '+/';\nvar base64UrlAlphabet = commonAlphabet + '-_';\n\nvar inverse = function (characters) {\n  // TODO: use `Object.create(null)` in `core-js@4`\n  var result = {};\n  var index = 0;\n  for (; index < 64; index++) result[characters.charAt(index)] = index;\n  return result;\n};\n\nmodule.exports = {\n  i2c: base64Alphabet,\n  c2i: inverse(base64Alphabet),\n  i2cUrl: base64UrlAlphabet,\n  c2iUrl: inverse(base64UrlAlphabet)\n};\n", "'use strict';\nvar $TypeError = TypeError;\n\nmodule.exports = function (options) {\n  var alphabet = options && options.alphabet;\n  if (alphabet === undefined || alphabet === 'base64' || alphabet === 'base64url') return alphabet || 'base64';\n  throw new $TypeError('Incorrect `alphabet` option');\n};\n", "'use strict';\nvar globalThis = require('../internals/global-this');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar anObjectOrUndefined = require('../internals/an-object-or-undefined');\nvar aString = require('../internals/a-string');\nvar hasOwn = require('../internals/has-own-property');\nvar base64Map = require('../internals/base64-map');\nvar getAlphabetOption = require('../internals/get-alphabet-option');\nvar notDetached = require('../internals/array-buffer-not-detached');\n\nvar base64Alphabet = base64Map.c2i;\nvar base64UrlAlphabet = base64Map.c2iUrl;\n\nvar SyntaxError = globalThis.SyntaxError;\nvar TypeError = globalThis.TypeError;\nvar $Array = globalThis.Array;\nvar at = uncurryThis(''.charAt);\nvar floor = Math.floor;\n\nvar skipAsciiWhitespace = function (string, index) {\n  var length = string.length;\n  for (;index < length; index++) {\n    var chr = at(string, index);\n    if (chr !== ' ' && chr !== '\\t' && chr !== '\\n' && chr !== '\\f' && chr !== '\\r') break;\n  } return index;\n};\n\nvar decodeBase64Chunk = function (chunk, alphabet, throwOnExtraBits) {\n  var chunkLength = chunk.length;\n\n  if (chunkLength < 4) {\n    chunk += chunkLength === 2 ? 'AA' : 'A';\n  }\n\n  var triplet = (alphabet[at(chunk, 0)] << 18)\n    + (alphabet[at(chunk, 1)] << 12)\n    + (alphabet[at(chunk, 2)] << 6)\n    + alphabet[at(chunk, 3)];\n\n  var chunkBytes = [\n    (triplet >> 16) & 255,\n    (triplet >> 8) & 255,\n    triplet & 255\n  ];\n\n  if (chunkLength === 2) {\n    if (throwOnExtraBits && chunkBytes[1] !== 0) {\n      throw new SyntaxError('Extra bits');\n    }\n    return [chunkBytes[0]];\n  }\n\n  if (chunkLength === 3) {\n    if (throwOnExtraBits && chunkBytes[2] !== 0) {\n      throw new SyntaxError('Extra bits');\n    }\n    return [chunkBytes[0], chunkBytes[1]];\n  }\n\n  return chunkBytes;\n};\n\nvar writeBytes = function (bytes, elements, written) {\n  var elementsLength = elements.length;\n  for (var index = 0; index < elementsLength; index++) {\n    bytes[written + index] = elements[index];\n  }\n  return written + elementsLength;\n};\n\n/* eslint-disable max-statements, max-depth -- TODO */\nmodule.exports = function (string, options, into, maxLength) {\n  aString(string);\n  anObjectOrUndefined(options);\n  var alphabet = getAlphabetOption(options) === 'base64' ? base64Alphabet : base64UrlAlphabet;\n  var lastChunkHandling = options ? options.lastChunkHandling : undefined;\n\n  if (lastChunkHandling === undefined) lastChunkHandling = 'loose';\n\n  if (lastChunkHandling !== 'loose' && lastChunkHandling !== 'strict' && lastChunkHandling !== 'stop-before-partial') {\n    throw new TypeError('Incorrect `lastChunkHandling` option');\n  }\n\n  if (into) notDetached(into.buffer);\n\n  var stringLength = string.length;\n  var bytes = into || $Array(floor(stringLength * 3 / 4));\n  var written = 0;\n  var read = 0;\n  var chunk = '';\n  var index = 0;\n\n  if (maxLength) while (true) {\n    index = skipAsciiWhitespace(string, index);\n    if (index === stringLength) {\n      if (chunk.length > 0) {\n        if (lastChunkHandling === 'stop-before-partial') {\n          break;\n        }\n        if (lastChunkHandling === 'loose') {\n          if (chunk.length === 1) {\n            throw new SyntaxError('Malformed padding: exactly one additional character');\n          }\n          written = writeBytes(bytes, decodeBase64Chunk(chunk, alphabet, false), written);\n        } else {\n          throw new SyntaxError('Missing padding');\n        }\n      }\n      read = stringLength;\n      break;\n    }\n    var chr = at(string, index);\n    ++index;\n    if (chr === '=') {\n      if (chunk.length < 2) {\n        throw new SyntaxError('Padding is too early');\n      }\n      index = skipAsciiWhitespace(string, index);\n      if (chunk.length === 2) {\n        if (index === stringLength) {\n          if (lastChunkHandling === 'stop-before-partial') {\n            break;\n          }\n          throw new SyntaxError('Malformed padding: only one =');\n        }\n        if (at(string, index) === '=') {\n          ++index;\n          index = skipAsciiWhitespace(string, index);\n        }\n      }\n      if (index < stringLength) {\n        throw new SyntaxError('Unexpected character after padding');\n      }\n      written = writeBytes(bytes, decodeBase64Chunk(chunk, alphabet, lastChunkHandling === 'strict'), written);\n      read = stringLength;\n      break;\n    }\n    if (!hasOwn(alphabet, chr)) {\n      throw new SyntaxError('Unexpected character');\n    }\n    var remainingBytes = maxLength - written;\n    if (remainingBytes === 1 && chunk.length === 2 || remainingBytes === 2 && chunk.length === 3) {\n      // special case: we can fit exactly the number of bytes currently represented by chunk, so we were just checking for `=`\n      break;\n    }\n\n    chunk += chr;\n    if (chunk.length === 4) {\n      written = writeBytes(bytes, decodeBase64Chunk(chunk, alphabet, false), written);\n      chunk = '';\n      read = index;\n      if (written === maxLength) {\n        break;\n      }\n    }\n  }\n  if (!into) bytes.length = written;\n  return { bytes: bytes, read: read, written: written };\n};\n", "'use strict';\nvar $ = require('../internals/export');\nvar globalThis = require('../internals/global-this');\nvar arrayFromConstructorAndList = require('../internals/array-from-constructor-and-list');\nvar $fromBase64 = require('../internals/uint8-from-base64');\n\nvar Uint8Array = globalThis.Uint8Array;\n\nvar INCORRECT_BEHAVIOR_OR_DOESNT_EXISTS = !Uint8Array || !Uint8Array.fromBase64 || !function () {\n  // Webkit not throw an error on odd length string\n  try {\n    Uint8Array.fromBase64('a');\n    return;\n  } catch (error) { /* empty */ }\n  try {\n    Uint8Array.fromBase64('', null);\n  } catch (error) {\n    return true;\n  }\n}();\n\n// `Uint8Array.fromBase64` method\n// https://tc39.es/ecma262/#sec-uint8array.frombase64\nif (Uint8Array) $({ target: 'Uint8Array', stat: true, forced: INCORRECT_BEHAVIOR_OR_DOESNT_EXISTS }, {\n  fromBase64: function fromBase64(string /* , options */) {\n    var result = $fromBase64(string, arguments.length > 1 ? arguments[1] : undefined, null, 0x1FFFFFFFFFFFFF);\n    return arrayFromConstructorAndList(Uint8Array, result.bytes);\n  }\n});\n", "'use strict';\nvar globalThis = require('../internals/global-this');\nvar uncurryThis = require('../internals/function-uncurry-this');\n\nvar Uint8Array = globalThis.Uint8Array;\nvar SyntaxError = globalThis.SyntaxError;\nvar min = Math.min;\nvar stringMatch = uncurryThis(''.match);\n\nmodule.exports = function (string, into) {\n  var stringLength = string.length;\n  if (stringLength % 2 !== 0) throw new SyntaxError('String should be an even number of characters');\n  var maxLength = into ? min(into.length, stringLength / 2) : stringLength / 2;\n  var bytes = into || new Uint8Array(maxLength);\n  var segments = stringMatch(string, /[\\S\\s]{2}/g);\n  var written = 0;\n  for (; written < maxLength; written++) {\n    var result = +('0x' + segments[written] + '0');\n    // eslint-disable-next-line no-self-compare -- NaN check\n    if (result !== result) {\n      throw new SyntaxError('String should only contain hex characters');\n    }\n    bytes[written] = result >> 4;\n  }\n  return { bytes: bytes, read: written << 1 };\n};\n", "'use strict';\nvar $ = require('../internals/export');\nvar globalThis = require('../internals/global-this');\nvar aString = require('../internals/a-string');\nvar $fromHex = require('../internals/uint8-from-hex');\n\n// `Uint8Array.fromHex` method\n// https://tc39.es/ecma262/#sec-uint8array.fromhex\nif (globalThis.Uint8Array) $({ target: 'Uint8Array', stat: true }, {\n  fromHex: function fromHex(string) {\n    return $fromHex(aString(string)).bytes;\n  }\n});\n", "'use strict';\nvar classof = require('../internals/classof');\n\nvar $TypeError = TypeError;\n\n// Perform ? RequireInternalSlot(argument, [[TypedArrayName]])\n// If argument.[[TypedArrayName]] is not \"Uint8Array\", throw a TypeError exception\nmodule.exports = function (argument) {\n  if (classof(argument) === 'Uint8Array') return argument;\n  throw new $TypeError('Argument is not an Uint8Array');\n};\n", "'use strict';\nvar $ = require('../internals/export');\nvar globalThis = require('../internals/global-this');\nvar $fromBase64 = require('../internals/uint8-from-base64');\nvar anUint8Array = require('../internals/an-uint8-array');\n\nvar Uint8Array = globalThis.Uint8Array;\n\nvar INCORRECT_BEHAVIOR_OR_DOESNT_EXISTS = !Uint8Array || !Uint8Array.prototype.setFromBase64 || !function () {\n  var target = new Uint8Array([255, 255, 255, 255, 255]);\n  try {\n    target.setFromBase64('', null);\n    return;\n  } catch (error) { /* empty */ }\n  // Webkit not throw an error on odd length string\n  try {\n    target.setFromBase64('a');\n    return;\n  } catch (error) { /* empty */ }\n  try {\n    target.setFromBase64('MjYyZg===');\n  } catch (error) {\n    return target[0] === 50 && target[1] === 54 && target[2] === 50 && target[3] === 255 && target[4] === 255;\n  }\n}();\n\n// `Uint8Array.prototype.setFromBase64` method\n// https://tc39.es/ecma262/#sec-uint8array.prototype.setfrombase64\nif (Uint8Array) $({ target: 'Uint8Array', proto: true, forced: INCORRECT_BEHAVIOR_OR_DOESNT_EXISTS }, {\n  setFromBase64: function setFromBase64(string /* , options */) {\n    anUint8Array(this);\n\n    var result = $fromBase64(string, arguments.length > 1 ? arguments[1] : undefined, this, this.length);\n\n    return { read: result.read, written: result.written };\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar globalThis = require('../internals/global-this');\nvar aString = require('../internals/a-string');\nvar anUint8Array = require('../internals/an-uint8-array');\nvar notDetached = require('../internals/array-buffer-not-detached');\nvar $fromHex = require('../internals/uint8-from-hex');\n\n// Should not throw an error on length-tracking views over ResizableArrayBuffer\n// https://issues.chromium.org/issues/454630441\nfunction throwsOnLengthTrackingView() {\n  try {\n    // eslint-disable-next-line es/no-resizable-and-growable-arraybuffers -- required for testing\n    var rab = new ArrayBuffer(16, { maxByteLength: 1024 });\n    // eslint-disable-next-line es/no-uint8array-prototype-setfromhex, es/no-typed-arrays -- required for testing\n    new Uint8Array(rab).setFromHex('cafed00d');\n  } catch (error) {\n    return true;\n  }\n}\n\n// `Uint8Array.prototype.setFromHex` method\n// https://tc39.es/ecma262/#sec-uint8array.prototype.setfromhex\nif (globalThis.Uint8Array) $({ target: 'Uint8Array', proto: true, forced: throwsOnLengthTrackingView() }, {\n  setFromHex: function setFromHex(string) {\n    anUint8Array(this);\n    aString(string);\n    notDetached(this.buffer);\n    var read = $fromHex(string, this).read;\n    return { read: read, written: read / 2 };\n  }\n});\n", "'use strict';\n/* eslint-disable no-useless-assignment -- false positive for [index++] syntax */\nvar $ = require('../internals/export');\nvar globalThis = require('../internals/global-this');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar anObjectOrUndefined = require('../internals/an-object-or-undefined');\nvar anUint8Array = require('../internals/an-uint8-array');\nvar notDetached = require('../internals/array-buffer-not-detached');\nvar base64Map = require('../internals/base64-map');\nvar getAlphabetOption = require('../internals/get-alphabet-option');\n\nvar base64Alphabet = base64Map.i2c;\nvar base64UrlAlphabet = base64Map.i2cUrl;\nvar $floor = Math.floor;\nvar $ceil = Math.ceil;\n\nvar charAt = uncurryThis(''.charAt);\n\nvar Uint8Array = globalThis.Uint8Array;\nvar $Array = globalThis.Array;\nvar join = uncurryThis([].join);\n\nvar INCORRECT_BEHAVIOR_OR_DOESNT_EXISTS = !Uint8Array || !Uint8Array.prototype.toBase64 || !function () {\n  try {\n    var target = new Uint8Array();\n    target.toBase64(null);\n  } catch (error) {\n    return true;\n  }\n}();\n\n// `Uint8Array.prototype.toBase64` method\n// https://tc39.es/ecma262/#sec-uint8array.prototype.tobase64\nif (Uint8Array) $({ target: 'Uint8Array', proto: true, forced: INCORRECT_BEHAVIOR_OR_DOESNT_EXISTS }, {\n  toBase64: function toBase64(/* options */) {\n    var array = anUint8Array(this);\n    var options = arguments.length ? anObjectOrUndefined(arguments[0]) : undefined;\n    var alphabet = getAlphabetOption(options) === 'base64' ? base64Alphabet : base64UrlAlphabet;\n    var omitPadding = !!options && !!options.omitPadding;\n    notDetached(this.buffer);\n\n    var i = 0;\n    var length = array.length;\n    var result = $Array(omitPadding ? $floor(length / 3) * 4 + (length % 3 ? length % 3 + 1 : 0) : $ceil(length / 3) * 4);\n    var written = 0;\n    var triplet;\n\n    var at = function (shift) {\n      return charAt(alphabet, (triplet >> (6 * shift)) & 63);\n    };\n\n    for (; i + 2 < length; i += 3) {\n      triplet = (array[i] << 16) + (array[i + 1] << 8) + array[i + 2];\n      result[written++] = at(3);\n      result[written++] = at(2);\n      result[written++] = at(1);\n      result[written++] = at(0);\n    }\n    if (i + 2 === length) {\n      triplet = (array[i] << 16) + (array[i + 1] << 8);\n      result[written++] = at(3);\n      result[written++] = at(2);\n      result[written++] = at(1);\n      if (!omitPadding) result[written++] = '=';\n    } else if (i + 1 === length) {\n      triplet = array[i] << 16;\n      result[written++] = at(3);\n      result[written++] = at(2);\n      if (!omitPadding) {\n        result[written++] = '=';\n        result[written++] = '=';\n      }\n    }\n\n    return join(result, '');\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar globalThis = require('../internals/global-this');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar anUint8Array = require('../internals/an-uint8-array');\nvar notDetached = require('../internals/array-buffer-not-detached');\n\nvar numberToString = uncurryThis(1.1.toString);\nvar join = uncurryThis([].join);\nvar $Array = Array;\n\nvar Uint8Array = globalThis.Uint8Array;\n\nvar INCORRECT_BEHAVIOR_OR_DOESNT_EXISTS = !Uint8Array || !Uint8Array.prototype.toHex || !(function () {\n  try {\n    var target = new Uint8Array([255, 255, 255, 255, 255, 255, 255, 255]);\n    return target.toHex() === 'ffffffffffffffff';\n  } catch (error) {\n    return false;\n  }\n})();\n\n// `Uint8Array.prototype.toHex` method\n// https://tc39.es/ecma262/#sec-uint8array.prototype.tohex\nif (Uint8Array) $({ target: 'Uint8Array', proto: true, forced: INCORRECT_BEHAVIOR_OR_DOESNT_EXISTS }, {\n  toHex: function toHex() {\n    anUint8Array(this);\n    notDetached(this.buffer);\n    var result = $Array(this.length);\n    for (var i = 0, length = this.length; i < length; i++) {\n      var hex = numberToString(this[i], 16);\n      result[i] = hex.length === 1 ? '0' + hex : hex;\n    }\n    return join(result, '');\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar toString = require('../internals/to-string');\n\nvar fromCharCode = String.fromCharCode;\nvar charAt = uncurryThis(''.charAt);\nvar exec = uncurryThis(/./.exec);\nvar stringSlice = uncurryThis(''.slice);\n\nvar hex2 = /^[\\da-f]{2}$/i;\nvar hex4 = /^[\\da-f]{4}$/i;\n\n// `unescape` method\n// https://tc39.es/ecma262/#sec-unescape-string\n$({ global: true }, {\n  unescape: function unescape(string) {\n    var str = toString(string);\n    var result = '';\n    var length = str.length;\n    var index = 0;\n    var chr, part;\n    while (index < length) {\n      chr = charAt(str, index++);\n      if (chr === '%') {\n        if (charAt(str, index) === 'u') {\n          part = stringSlice(str, index + 1, index + 5);\n          if (exec(hex4, part)) {\n            result += fromCharCode(parseInt(part, 16));\n            index += 5;\n            continue;\n          }\n        } else {\n          part = stringSlice(str, index, index + 2);\n          if (exec(hex2, part)) {\n            result += fromCharCode(parseInt(part, 16));\n            index += 2;\n            continue;\n          }\n        }\n      }\n      result += chr;\n    } return result;\n  }\n});\n", "'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar defineBuiltIns = require('../internals/define-built-ins');\nvar getWeakData = require('../internals/internal-metadata').getWeakData;\nvar anInstance = require('../internals/an-instance');\nvar anObject = require('../internals/an-object');\nvar isNullOrUndefined = require('../internals/is-null-or-undefined');\nvar isObject = require('../internals/is-object');\nvar iterate = require('../internals/iterate');\nvar ArrayIterationModule = require('../internals/array-iteration');\nvar hasOwn = require('../internals/has-own-property');\nvar InternalStateModule = require('../internals/internal-state');\n\nvar setInternalState = InternalStateModule.set;\nvar internalStateGetterFor = InternalStateModule.getterFor;\nvar find = ArrayIterationModule.find;\nvar findIndex = ArrayIterationModule.findIndex;\nvar splice = uncurryThis([].splice);\nvar id = 0;\n\n// fallback for uncaught frozen keys\nvar uncaughtFrozenStore = function (state) {\n  return state.frozen || (state.frozen = new UncaughtFrozenStore());\n};\n\nvar UncaughtFrozenStore = function () {\n  this.entries = [];\n};\n\nvar findUncaughtFrozen = function (store, key) {\n  return find(store.entries, function (it) {\n    return it[0] === key;\n  });\n};\n\nUncaughtFrozenStore.prototype = {\n  get: function (key) {\n    var entry = findUncaughtFrozen(this, key);\n    if (entry) return entry[1];\n  },\n  has: function (key) {\n    return !!findUncaughtFrozen(this, key);\n  },\n  set: function (key, value) {\n    var entry = findUncaughtFrozen(this, key);\n    if (entry) entry[1] = value;\n    else this.entries.push([key, value]);\n  },\n  'delete': function (key) {\n    var index = findIndex(this.entries, function (it) {\n      return it[0] === key;\n    });\n    if (~index) splice(this.entries, index, 1);\n    return !!~index;\n  }\n};\n\nmodule.exports = {\n  getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) {\n    var Constructor = wrapper(function (that, iterable) {\n      anInstance(that, Prototype);\n      setInternalState(that, {\n        type: CONSTRUCTOR_NAME,\n        id: id++,\n        frozen: null\n      });\n      if (!isNullOrUndefined(iterable)) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });\n    });\n\n    var Prototype = Constructor.prototype;\n\n    var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);\n\n    var define = function (that, key, value) {\n      var state = getInternalState(that);\n      var data = getWeakData(anObject(key), true);\n      if (data === true) uncaughtFrozenStore(state).set(key, value);\n      else data[state.id] = value;\n      return that;\n    };\n\n    defineBuiltIns(Prototype, {\n      // `{ WeakMap, WeakSet }.prototype.delete(key)` methods\n      // https://tc39.es/ecma262/#sec-weakmap.prototype.delete\n      // https://tc39.es/ecma262/#sec-weakset.prototype.delete\n      'delete': function (key) {\n        var state = getInternalState(this);\n        if (!isObject(key)) return false;\n        var data = getWeakData(key);\n        if (data === true) return uncaughtFrozenStore(state)['delete'](key);\n        return data && hasOwn(data, state.id) && delete data[state.id];\n      },\n      // `{ WeakMap, WeakSet }.prototype.has(key)` methods\n      // https://tc39.es/ecma262/#sec-weakmap.prototype.has\n      // https://tc39.es/ecma262/#sec-weakset.prototype.has\n      has: function has(key) {\n        var state = getInternalState(this);\n        if (!isObject(key)) return false;\n        var data = getWeakData(key);\n        if (data === true) return uncaughtFrozenStore(state).has(key);\n        return data && hasOwn(data, state.id);\n      }\n    });\n\n    defineBuiltIns(Prototype, IS_MAP ? {\n      // `WeakMap.prototype.get(key)` method\n      // https://tc39.es/ecma262/#sec-weakmap.prototype.get\n      get: function get(key) {\n        var state = getInternalState(this);\n        if (isObject(key)) {\n          var data = getWeakData(key);\n          if (data === true) return uncaughtFrozenStore(state).get(key);\n          if (data) return data[state.id];\n        }\n      },\n      // `WeakMap.prototype.set(key, value)` method\n      // https://tc39.es/ecma262/#sec-weakmap.prototype.set\n      set: function set(key, value) {\n        return define(this, key, value);\n      }\n    } : {\n      // `WeakSet.prototype.add(value)` method\n      // https://tc39.es/ecma262/#sec-weakset.prototype.add\n      add: function add(value) {\n        return define(this, value, true);\n      }\n    });\n\n    return Constructor;\n  }\n};\n", "'use strict';\nvar FREEZING = require('../internals/freezing');\nvar globalThis = require('../internals/global-this');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar defineBuiltIns = require('../internals/define-built-ins');\nvar InternalMetadataModule = require('../internals/internal-metadata');\nvar collection = require('../internals/collection');\nvar collectionWeak = require('../internals/collection-weak');\nvar isObject = require('../internals/is-object');\nvar enforceInternalState = require('../internals/internal-state').enforce;\nvar fails = require('../internals/fails');\nvar NATIVE_WEAK_MAP = require('../internals/weak-map-basic-detection');\n\nvar $Object = Object;\n// eslint-disable-next-line es/no-array-isarray -- safe\nvar isArray = Array.isArray;\n// eslint-disable-next-line es/no-object-isextensible -- safe\nvar isExtensible = $Object.isExtensible;\n// eslint-disable-next-line es/no-object-isfrozen -- safe\nvar isFrozen = $Object.isFrozen;\n// eslint-disable-next-line es/no-object-issealed -- safe\nvar isSealed = $Object.isSealed;\n// eslint-disable-next-line es/no-object-freeze -- safe\nvar freeze = $Object.freeze;\n// eslint-disable-next-line es/no-object-seal -- safe\nvar seal = $Object.seal;\n\nvar IS_IE11 = !globalThis.ActiveXObject && 'ActiveXObject' in globalThis;\nvar InternalWeakMap;\n\nvar wrapper = function (init) {\n  return function WeakMap() {\n    return init(this, arguments.length ? arguments[0] : undefined);\n  };\n};\n\n// `WeakMap` constructor\n// https://tc39.es/ecma262/#sec-weakmap-constructor\nvar $WeakMap = collection('WeakMap', wrapper, collectionWeak);\nvar WeakMapPrototype = $WeakMap.prototype;\nvar nativeSet = uncurryThis(WeakMapPrototype.set);\n\n// Chakra Edge bug: adding frozen arrays to WeakMap unfreeze them\nvar hasMSEdgeFreezingBug = function () {\n  return FREEZING && fails(function () {\n    var frozenArray = freeze([]);\n    nativeSet(new $WeakMap(), frozenArray, 1);\n    return !isFrozen(frozenArray);\n  });\n};\n\n// IE11 WeakMap frozen keys fix\n// We can't use feature detection because it crash some old IE builds\n// https://github.com/zloirock/core-js/issues/485\nif (NATIVE_WEAK_MAP) if (IS_IE11) {\n  InternalWeakMap = collectionWeak.getConstructor(wrapper, 'WeakMap', true);\n  InternalMetadataModule.enable();\n  var nativeDelete = uncurryThis(WeakMapPrototype['delete']);\n  var nativeHas = uncurryThis(WeakMapPrototype.has);\n  var nativeGet = uncurryThis(WeakMapPrototype.get);\n  defineBuiltIns(WeakMapPrototype, {\n    'delete': function (key) {\n      if (isObject(key) && !isExtensible(key)) {\n        var state = enforceInternalState(this);\n        if (!state.frozen) state.frozen = new InternalWeakMap();\n        return nativeDelete(this, key) || state.frozen['delete'](key);\n      } return nativeDelete(this, key);\n    },\n    has: function has(key) {\n      if (isObject(key) && !isExtensible(key)) {\n        var state = enforceInternalState(this);\n        if (!state.frozen) state.frozen = new InternalWeakMap();\n        return nativeHas(this, key) || state.frozen.has(key);\n      } return nativeHas(this, key);\n    },\n    get: function get(key) {\n      if (isObject(key) && !isExtensible(key)) {\n        var state = enforceInternalState(this);\n        if (!state.frozen) state.frozen = new InternalWeakMap();\n        return nativeHas(this, key) ? nativeGet(this, key) : state.frozen.get(key);\n      } return nativeGet(this, key);\n    },\n    set: function set(key, value) {\n      if (isObject(key) && !isExtensible(key)) {\n        var state = enforceInternalState(this);\n        if (!state.frozen) state.frozen = new InternalWeakMap();\n        nativeHas(this, key) ? nativeSet(this, key, value) : state.frozen.set(key, value);\n      } else nativeSet(this, key, value);\n      return this;\n    }\n  });\n// Chakra Edge frozen keys fix\n} else if (hasMSEdgeFreezingBug()) {\n  defineBuiltIns(WeakMapPrototype, {\n    set: function set(key, value) {\n      var arrayIntegrityLevel;\n      if (isArray(key)) {\n        if (isFrozen(key)) arrayIntegrityLevel = freeze;\n        else if (isSealed(key)) arrayIntegrityLevel = seal;\n      }\n      nativeSet(this, key, value);\n      if (arrayIntegrityLevel) arrayIntegrityLevel(key);\n      return this;\n    }\n  });\n}\n", "'use strict';\n// TODO: Remove this module from `core-js@4` since it's replaced to module below\nrequire('../modules/es.weak-map.constructor');\n", "'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\n\n// eslint-disable-next-line es/no-weak-map -- safe\nvar WeakMapPrototype = WeakMap.prototype;\n\nmodule.exports = {\n  // eslint-disable-next-line es/no-weak-map -- safe\n  WeakMap: WeakMap,\n  set: uncurryThis(WeakMapPrototype.set),\n  get: uncurryThis(WeakMapPrototype.get),\n  has: uncurryThis(WeakMapPrototype.has),\n  remove: uncurryThis(WeakMapPrototype['delete'])\n};\n", "'use strict';\nvar $ = require('../internals/export');\nvar WeakMapHelpers = require('../internals/weak-map-helpers');\nvar IS_PURE = require('../internals/is-pure');\n\nvar get = WeakMapHelpers.get;\nvar has = WeakMapHelpers.has;\nvar set = WeakMapHelpers.set;\n\n// `WeakMap.prototype.getOrInsert` method\n// https://tc39.es/ecma262/#sec-weakmap.prototype.getorinsert\n$({ target: 'WeakMap', proto: true, real: true, forced: IS_PURE }, {\n  getOrInsert: function getOrInsert(key, value) {\n    if (has(this, key)) return get(this, key);\n    set(this, key, value);\n    return value;\n  }\n});\n", "'use strict';\nvar has = require('../internals/weak-map-helpers').has;\n\n// Perform ? RequireInternalSlot(M, [[WeakMapData]])\nmodule.exports = function (it) {\n  has(it);\n  return it;\n};\n", "'use strict';\nvar WeakMapHelpers = require('../internals/weak-map-helpers');\n\nvar weakmap = new WeakMapHelpers.WeakMap();\nvar set = WeakMapHelpers.set;\nvar remove = WeakMapHelpers.remove;\n\nmodule.exports = function (key) {\n  set(weakmap, key, 1);\n  remove(weakmap, key);\n  return key;\n};\n", "'use strict';\nvar $ = require('../internals/export');\nvar aCallable = require('../internals/a-callable');\nvar aWeakMap = require('../internals/a-weak-map');\nvar aWeakKey = require('../internals/a-weak-key');\nvar WeakMapHelpers = require('../internals/weak-map-helpers');\nvar IS_PURE = require('../internals/is-pure');\n\nvar get = WeakMapHelpers.get;\nvar has = WeakMapHelpers.has;\nvar set = WeakMapHelpers.set;\n\nvar FORCED = IS_PURE || !function () {\n  try {\n    // eslint-disable-next-line es/no-weak-map, no-throw-literal -- testing\n    if (WeakMap.prototype.getOrInsertComputed) new WeakMap().getOrInsertComputed(1, function () { throw 1; });\n  } catch (error) {\n    // FF144 Nightly - Beta 3 bug\n    // https://bugzilla.mozilla.org/show_bug.cgi?id=1988369\n    return error instanceof TypeError;\n  }\n}();\n\n// `WeakMap.prototype.getOrInsertComputed` method\n// https://tc39.es/ecma262/#sec-weakmap.prototype.getorinsertcomputed\n$({ target: 'WeakMap', proto: true, real: true, forced: FORCED }, {\n  getOrInsertComputed: function getOrInsertComputed(key, callbackfn) {\n    if (!IS_PURE) aWeakMap(this);\n    aWeakKey(key);\n    aCallable(callbackfn);\n    if (has(this, key)) return get(this, key);\n    var value = callbackfn(key);\n    set(this, key, value);\n    return value;\n  }\n});\n", "'use strict';\nvar collection = require('../internals/collection');\nvar collectionWeak = require('../internals/collection-weak');\n\n// `WeakSet` constructor\n// https://tc39.es/ecma262/#sec-weakset-constructor\ncollection('WeakSet', function (init) {\n  return function WeakSet() { return init(this, arguments.length ? arguments[0] : undefined); };\n}, collectionWeak);\n", "'use strict';\n// TODO: Remove this module from `core-js@4` since it's replaced to module below\nrequire('../modules/es.weak-set.constructor');\n", "'use strict';\nvar $ = require('../internals/export');\nvar globalThis = require('../internals/global-this');\nvar getBuiltIn = require('../internals/get-built-in');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar call = require('../internals/function-call');\nvar fails = require('../internals/fails');\nvar toString = require('../internals/to-string');\nvar validateArgumentsLength = require('../internals/validate-arguments-length');\nvar c2i = require('../internals/base64-map').c2i;\n\nvar disallowed = /[^\\d+/a-z]/i;\nvar whitespaces = /[\\t\\n\\f\\r ]+/g;\nvar finalEq = /[=]{1,2}$/;\n\nvar $atob = getBuiltIn('atob');\nvar $Array = Array;\nvar fromCharCode = String.fromCharCode;\nvar charAt = uncurryThis(''.charAt);\nvar replace = uncurryThis(''.replace);\nvar join = uncurryThis([].join);\nvar exec = uncurryThis(disallowed.exec);\n\nvar BASIC = !!$atob && !fails(function () {\n  return $atob('aGk=') !== 'hi';\n});\n\nvar NO_SPACES_IGNORE = BASIC && fails(function () {\n  return $atob(' ') !== '';\n});\n\nvar NO_ENCODING_CHECK = BASIC && !fails(function () {\n  $atob('a');\n});\n\nvar NO_ARG_RECEIVING_CHECK = BASIC && !fails(function () {\n  $atob();\n});\n\nvar WRONG_ARITY = BASIC && $atob.length !== 1;\n\nvar FORCED = !BASIC || NO_SPACES_IGNORE || NO_ENCODING_CHECK || NO_ARG_RECEIVING_CHECK || WRONG_ARITY;\n\n// `atob` method\n// https://html.spec.whatwg.org/multipage/webappapis.html#dom-atob\n$({ global: true, bind: true, enumerable: true, forced: FORCED }, {\n  atob: function atob(data) {\n    validateArgumentsLength(arguments.length, 1);\n    // `webpack` dev server bug on IE global methods - use call(fn, global, ...)\n    if (BASIC && !NO_SPACES_IGNORE && !NO_ENCODING_CHECK) return call($atob, globalThis, data);\n    var string = replace(toString(data), whitespaces, '');\n    var position = 0;\n    var bc = 0;\n    var length, chr, bs;\n    if (!(string.length & 3)) {\n      string = replace(string, finalEq, '');\n    }\n    length = string.length;\n    var lenmod = length & 3;\n    if (lenmod === 1 || exec(disallowed, string)) {\n      throw new (getBuiltIn('DOMException'))('The string is not correctly encoded', 'InvalidCharacterError');\n    }\n    // (length >> 2) is equivalent for length / 4 floored; * 3 then multiplies the\n    // number of bytes for full quanta\n    // lenmod is length % 4; if there's 2 or 3 bytes it's 1 or 2 bytes of extra output\n    // respectively, so -1, however use a ternary to ensure 0 does not get -1 onto length\n    var output = new $Array((length >> 2) * 3 + (lenmod ? lenmod - 1 : 0));\n    var outputIndex = 0;\n    while (position < length) {\n      chr = charAt(string, position++);\n      bs = bc & 3 ? (bs << 6) + c2i[chr] : c2i[chr];\n      if (bc++ & 3) output[outputIndex++] = fromCharCode(255 & bs >> (-2 * bc & 6));\n    }\n    return join(output, '');\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar globalThis = require('../internals/global-this');\nvar getBuiltIn = require('../internals/get-built-in');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar call = require('../internals/function-call');\nvar fails = require('../internals/fails');\nvar toString = require('../internals/to-string');\nvar validateArgumentsLength = require('../internals/validate-arguments-length');\nvar i2c = require('../internals/base64-map').i2c;\n\nvar $btoa = getBuiltIn('btoa');\nvar $Array = Array;\nvar join = uncurryThis([].join);\nvar charAt = uncurryThis(''.charAt);\nvar charCodeAt = uncurryThis(''.charCodeAt);\n\nvar BASIC = !!$btoa && !fails(function () {\n  return $btoa('hi') !== 'aGk=';\n});\n\nvar NO_ARG_RECEIVING_CHECK = BASIC && !fails(function () {\n  $btoa();\n});\n\nvar WRONG_ARG_CONVERSION = BASIC && fails(function () {\n  return $btoa(null) !== 'bnVsbA==';\n});\n\nvar WRONG_ARITY = BASIC && $btoa.length !== 1;\n\n// `btoa` method\n// https://html.spec.whatwg.org/multipage/webappapis.html#dom-btoa\n$({ global: true, bind: true, enumerable: true, forced: !BASIC || NO_ARG_RECEIVING_CHECK || WRONG_ARG_CONVERSION || WRONG_ARITY }, {\n  btoa: function btoa(data) {\n    validateArgumentsLength(arguments.length, 1);\n    // `webpack` dev server bug on IE global methods - use call(fn, global, ...)\n    if (BASIC) return call($btoa, globalThis, toString(data));\n    var string = toString(data);\n    // (string.length + 2) / 3) and then truncating to integer\n    // does the ceil automatically.  << 2 will truncate the integer\n    // while also doing *4.  ceil(length / 3) quanta, 4 bytes output\n    // per quanta for base64.\n    var output = new $Array((string.length + 2) / 3 << 2);\n    var outputIndex = 0;\n    var position = 0;\n    var map = i2c;\n    var block, charCode;\n    while (charAt(string, position) || (map = '=', position % 1)) {\n      charCode = charCodeAt(string, position += 3 / 4);\n      if (charCode > 0xFF) {\n        throw new (getBuiltIn('DOMException'))('The string contains characters outside of the Latin1 range', 'InvalidCharacterError');\n      }\n      block = block << 8 | charCode;\n      output[outputIndex++] = charAt(map, 63 & block >> 8 - position % 1 * 8);\n    } return join(output, '');\n  }\n});\n", "'use strict';\n// iterable DOM collections\n// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods\nmodule.exports = {\n  CSSRuleList: 0,\n  CSSStyleDeclaration: 0,\n  CSSValueList: 0,\n  ClientRectList: 0,\n  DOMRectList: 0,\n  DOMStringList: 0,\n  DOMTokenList: 1,\n  DataTransferItemList: 0,\n  FileList: 0,\n  HTMLAllCollection: 0,\n  HTMLCollection: 0,\n  HTMLFormElement: 0,\n  HTMLSelectElement: 0,\n  MediaList: 0,\n  MimeTypeArray: 0,\n  NamedNodeMap: 0,\n  NodeList: 1,\n  PaintRequestList: 0,\n  Plugin: 0,\n  PluginArray: 0,\n  SVGLengthList: 0,\n  SVGNumberList: 0,\n  SVGPathSegList: 0,\n  SVGPointList: 0,\n  SVGStringList: 0,\n  SVGTransformList: 0,\n  SourceBufferList: 0,\n  StyleSheetList: 0,\n  TextTrackCueList: 0,\n  TextTrackList: 0,\n  TouchList: 0\n};\n", "'use strict';\n// in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`\nvar documentCreateElement = require('../internals/document-create-element');\n\nvar classList = documentCreateElement('span').classList;\nvar DOMTokenListPrototype = classList && classList.constructor && classList.constructor.prototype;\n\nmodule.exports = DOMTokenListPrototype === Object.prototype ? undefined : DOMTokenListPrototype;\n", "'use strict';\nvar globalThis = require('../internals/global-this');\nvar DOMIterables = require('../internals/dom-iterables');\nvar DOMTokenListPrototype = require('../internals/dom-token-list-prototype');\nvar forEach = require('../internals/array-for-each');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\n\nvar handlePrototype = function (CollectionPrototype) {\n  // some Chrome versions have non-configurable methods on DOMTokenList\n  if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try {\n    createNonEnumerableProperty(CollectionPrototype, 'forEach', forEach);\n  } catch (error) {\n    CollectionPrototype.forEach = forEach;\n  }\n};\n\nfor (var COLLECTION_NAME in DOMIterables) {\n  if (DOMIterables[COLLECTION_NAME]) {\n    handlePrototype(globalThis[COLLECTION_NAME] && globalThis[COLLECTION_NAME].prototype);\n  }\n}\n\nhandlePrototype(DOMTokenListPrototype);\n", "'use strict';\nvar globalThis = require('../internals/global-this');\nvar DOMIterables = require('../internals/dom-iterables');\nvar DOMTokenListPrototype = require('../internals/dom-token-list-prototype');\nvar ArrayIteratorMethods = require('../modules/es.array.iterator');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar ArrayValues = ArrayIteratorMethods.values;\n\nvar handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {\n  if (CollectionPrototype) {\n    // some Chrome versions have non-configurable methods on DOMTokenList\n    if (CollectionPrototype[ITERATOR] !== ArrayValues) try {\n      createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues);\n    } catch (error) {\n      CollectionPrototype[ITERATOR] = ArrayValues;\n    }\n    setToStringTag(CollectionPrototype, COLLECTION_NAME, true);\n    if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {\n      // some Chrome versions have non-configurable methods on DOMTokenList\n      if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {\n        createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);\n      } catch (error) {\n        CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];\n      }\n    }\n  }\n};\n\nfor (var COLLECTION_NAME in DOMIterables) {\n  handlePrototype(globalThis[COLLECTION_NAME] && globalThis[COLLECTION_NAME].prototype, COLLECTION_NAME);\n}\n\nhandlePrototype(DOMTokenListPrototype, 'DOMTokenList');\n", "'use strict';\nmodule.exports = {\n  IndexSizeError: { s: 'INDEX_SIZE_ERR', c: 1, m: 1 },\n  DOMStringSizeError: { s: 'DOMSTRING_SIZE_ERR', c: 2, m: 0 },\n  HierarchyRequestError: { s: 'HIERARCHY_REQUEST_ERR', c: 3, m: 1 },\n  WrongDocumentError: { s: 'WRONG_DOCUMENT_ERR', c: 4, m: 1 },\n  InvalidCharacterError: { s: 'INVALID_CHARACTER_ERR', c: 5, m: 1 },\n  NoDataAllowedError: { s: 'NO_DATA_ALLOWED_ERR', c: 6, m: 0 },\n  NoModificationAllowedError: { s: 'NO_MODIFICATION_ALLOWED_ERR', c: 7, m: 1 },\n  NotFoundError: { s: 'NOT_FOUND_ERR', c: 8, m: 1 },\n  NotSupportedError: { s: 'NOT_SUPPORTED_ERR', c: 9, m: 1 },\n  InUseAttributeError: { s: 'INUSE_ATTRIBUTE_ERR', c: 10, m: 1 },\n  InvalidStateError: { s: 'INVALID_STATE_ERR', c: 11, m: 1 },\n  SyntaxError: { s: 'SYNTAX_ERR', c: 12, m: 1 },\n  InvalidModificationError: { s: 'INVALID_MODIFICATION_ERR', c: 13, m: 1 },\n  NamespaceError: { s: 'NAMESPACE_ERR', c: 14, m: 1 },\n  InvalidAccessError: { s: 'INVALID_ACCESS_ERR', c: 15, m: 1 },\n  ValidationError: { s: 'VALIDATION_ERR', c: 16, m: 0 },\n  TypeMismatchError: { s: 'TYPE_MISMATCH_ERR', c: 17, m: 1 },\n  SecurityError: { s: 'SECURITY_ERR', c: 18, m: 1 },\n  NetworkError: { s: 'NETWORK_ERR', c: 19, m: 1 },\n  AbortError: { s: 'ABORT_ERR', c: 20, m: 1 },\n  URLMismatchError: { s: 'URL_MISMATCH_ERR', c: 21, m: 1 },\n  QuotaExceededError: { s: 'QUOTA_EXCEEDED_ERR', c: 22, m: 1 },\n  TimeoutError: { s: 'TIMEOUT_ERR', c: 23, m: 1 },\n  InvalidNodeTypeError: { s: 'INVALID_NODE_TYPE_ERR', c: 24, m: 1 },\n  DataCloneError: { s: 'DATA_CLONE_ERR', c: 25, m: 1 }\n};\n", "'use strict';\nvar $ = require('../internals/export');\nvar getBuiltIn = require('../internals/get-built-in');\nvar getBuiltInNodeModule = require('../internals/get-built-in-node-module');\nvar fails = require('../internals/fails');\nvar create = require('../internals/object-create');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar defineProperty = require('../internals/object-define-property').f;\nvar defineBuiltIn = require('../internals/define-built-in');\nvar defineBuiltInAccessor = require('../internals/define-built-in-accessor');\nvar hasOwn = require('../internals/has-own-property');\nvar anInstance = require('../internals/an-instance');\nvar anObject = require('../internals/an-object');\nvar errorToString = require('../internals/error-to-string');\nvar normalizeStringArgument = require('../internals/normalize-string-argument');\nvar DOMExceptionConstants = require('../internals/dom-exception-constants');\nvar clearErrorStack = require('../internals/error-stack-clear');\nvar InternalStateModule = require('../internals/internal-state');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar IS_PURE = require('../internals/is-pure');\n\nvar DOM_EXCEPTION = 'DOMException';\nvar DATA_CLONE_ERR = 'DATA_CLONE_ERR';\nvar Error = getBuiltIn('Error');\n// NodeJS < 17.0 does not expose `DOMException` to global\nvar NativeDOMException = getBuiltIn(DOM_EXCEPTION) || (function () {\n  try {\n    // NodeJS < 15.0 does not expose `MessageChannel` to global\n    var MessageChannel = getBuiltIn('MessageChannel') || getBuiltInNodeModule('worker_threads').MessageChannel;\n    // eslint-disable-next-line es/no-weak-map, unicorn/require-post-message-target-origin -- safe\n    new MessageChannel().port1.postMessage(new WeakMap());\n  } catch (error) {\n    if (error.name === DATA_CLONE_ERR && error.code === 25) return error.constructor;\n  }\n})();\nvar NativeDOMExceptionPrototype = NativeDOMException && NativeDOMException.prototype;\nvar ErrorPrototype = Error.prototype;\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(DOM_EXCEPTION);\nvar HAS_STACK = 'stack' in new Error(DOM_EXCEPTION);\n\nvar codeFor = function (name) {\n  return hasOwn(DOMExceptionConstants, name) && DOMExceptionConstants[name].m ? DOMExceptionConstants[name].c : 0;\n};\n\nvar $DOMException = function DOMException() {\n  anInstance(this, DOMExceptionPrototype);\n  var argumentsLength = arguments.length;\n  var message = normalizeStringArgument(argumentsLength < 1 ? undefined : arguments[0]);\n  var name = normalizeStringArgument(argumentsLength < 2 ? undefined : arguments[1], 'Error');\n  var code = codeFor(name);\n  setInternalState(this, {\n    type: DOM_EXCEPTION,\n    name: name,\n    message: message,\n    code: code\n  });\n  if (!DESCRIPTORS) {\n    this.name = name;\n    this.message = message;\n    this.code = code;\n  }\n  if (HAS_STACK) {\n    var error = new Error(message);\n    error.name = DOM_EXCEPTION;\n    defineProperty(this, 'stack', createPropertyDescriptor(1, clearErrorStack(error.stack, 1)));\n  }\n};\n\nvar DOMExceptionPrototype = $DOMException.prototype = create(ErrorPrototype);\n\nvar createGetterDescriptor = function (get) {\n  return { enumerable: true, configurable: true, get: get };\n};\n\nvar getterFor = function (key) {\n  return createGetterDescriptor(function () {\n    return getInternalState(this)[key];\n  });\n};\n\nif (DESCRIPTORS) {\n  // `DOMException.prototype.code` getter\n  defineBuiltInAccessor(DOMExceptionPrototype, 'code', getterFor('code'));\n  // `DOMException.prototype.message` getter\n  defineBuiltInAccessor(DOMExceptionPrototype, 'message', getterFor('message'));\n  // `DOMException.prototype.name` getter\n  defineBuiltInAccessor(DOMExceptionPrototype, 'name', getterFor('name'));\n}\n\ndefineProperty(DOMExceptionPrototype, 'constructor', createPropertyDescriptor(1, $DOMException));\n\n// FF36- DOMException is a function, but can't be constructed\nvar INCORRECT_CONSTRUCTOR = fails(function () {\n  return !(new NativeDOMException() instanceof Error);\n});\n\n// Safari 10.1 / Chrome 32- / IE8- DOMException.prototype.toString bugs\nvar INCORRECT_TO_STRING = INCORRECT_CONSTRUCTOR || fails(function () {\n  return ErrorPrototype.toString !== errorToString || String(new NativeDOMException(1, 2)) !== '2: 1';\n});\n\n// Deno 1.6.3- DOMException.prototype.code just missed\nvar INCORRECT_CODE = INCORRECT_CONSTRUCTOR || fails(function () {\n  return new NativeDOMException(1, 'DataCloneError').code !== 25;\n});\n\n// Deno 1.6.3- DOMException constants just missed\nvar MISSED_CONSTANTS = INCORRECT_CONSTRUCTOR\n  || NativeDOMException[DATA_CLONE_ERR] !== 25\n  || NativeDOMExceptionPrototype[DATA_CLONE_ERR] !== 25;\n\nvar FORCED_CONSTRUCTOR = IS_PURE ? INCORRECT_TO_STRING || INCORRECT_CODE || MISSED_CONSTANTS : INCORRECT_CONSTRUCTOR;\n\n// `DOMException` constructor\n// https://webidl.spec.whatwg.org/#idl-DOMException\n$({ global: true, constructor: true, forced: FORCED_CONSTRUCTOR }, {\n  DOMException: FORCED_CONSTRUCTOR ? $DOMException : NativeDOMException\n});\n\nvar PolyfilledDOMException = getBuiltIn(DOM_EXCEPTION);\nvar PolyfilledDOMExceptionPrototype = PolyfilledDOMException.prototype;\n\nif (INCORRECT_TO_STRING && (IS_PURE || NativeDOMException === PolyfilledDOMException)) {\n  defineBuiltIn(PolyfilledDOMExceptionPrototype, 'toString', errorToString);\n}\n\nif (INCORRECT_CODE && DESCRIPTORS && NativeDOMException === PolyfilledDOMException) {\n  defineBuiltInAccessor(PolyfilledDOMExceptionPrototype, 'code', createGetterDescriptor(function () {\n    return codeFor(anObject(this).name);\n  }));\n}\n\n// `DOMException` constants\nfor (var key in DOMExceptionConstants) if (hasOwn(DOMExceptionConstants, key)) {\n  var constant = DOMExceptionConstants[key];\n  var constantName = constant.s;\n  var descriptor = createPropertyDescriptor(6, constant.c);\n  if (!hasOwn(PolyfilledDOMException, constantName)) {\n    defineProperty(PolyfilledDOMException, constantName, descriptor);\n  }\n  if (!hasOwn(PolyfilledDOMExceptionPrototype, constantName)) {\n    defineProperty(PolyfilledDOMExceptionPrototype, constantName, descriptor);\n  }\n}\n", "'use strict';\nvar $ = require('../internals/export');\nvar globalThis = require('../internals/global-this');\nvar getBuiltIn = require('../internals/get-built-in');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar defineProperty = require('../internals/object-define-property').f;\nvar hasOwn = require('../internals/has-own-property');\nvar anInstance = require('../internals/an-instance');\nvar inheritIfRequired = require('../internals/inherit-if-required');\nvar normalizeStringArgument = require('../internals/normalize-string-argument');\nvar DOMExceptionConstants = require('../internals/dom-exception-constants');\nvar clearErrorStack = require('../internals/error-stack-clear');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar IS_PURE = require('../internals/is-pure');\n\nvar DOM_EXCEPTION = 'DOMException';\nvar Error = getBuiltIn('Error');\nvar NativeDOMException = getBuiltIn(DOM_EXCEPTION);\n\nvar $DOMException = function DOMException() {\n  anInstance(this, DOMExceptionPrototype);\n  var argumentsLength = arguments.length;\n  var message = normalizeStringArgument(argumentsLength < 1 ? undefined : arguments[0]);\n  var name = normalizeStringArgument(argumentsLength < 2 ? undefined : arguments[1], 'Error');\n  var that = new NativeDOMException(message, name);\n  var error = new Error(message);\n  error.name = DOM_EXCEPTION;\n  defineProperty(that, 'stack', createPropertyDescriptor(1, clearErrorStack(error.stack, 1)));\n  inheritIfRequired(that, this, $DOMException);\n  return that;\n};\n\nvar DOMExceptionPrototype = $DOMException.prototype = NativeDOMException.prototype;\n\nvar ERROR_HAS_STACK = 'stack' in new Error(DOM_EXCEPTION);\nvar DOM_EXCEPTION_HAS_STACK = 'stack' in new NativeDOMException(1, 2);\n\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar descriptor = NativeDOMException && DESCRIPTORS && Object.getOwnPropertyDescriptor(globalThis, DOM_EXCEPTION);\n\n// Bun ~ 0.1.1 DOMException have incorrect descriptor and we can't redefine it\n// https://github.com/Jarred-Sumner/bun/issues/399\nvar BUGGY_DESCRIPTOR = !!descriptor && !(descriptor.writable && descriptor.configurable);\n\nvar FORCED_CONSTRUCTOR = ERROR_HAS_STACK && !BUGGY_DESCRIPTOR && !DOM_EXCEPTION_HAS_STACK;\n\n// `DOMException` constructor patch for `.stack` where it's required\n// https://webidl.spec.whatwg.org/#es-DOMException-specialness\n$({ global: true, constructor: true, forced: IS_PURE || FORCED_CONSTRUCTOR }, { // TODO: fix export logic\n  DOMException: FORCED_CONSTRUCTOR ? $DOMException : NativeDOMException\n});\n\nvar PolyfilledDOMException = getBuiltIn(DOM_EXCEPTION);\nvar PolyfilledDOMExceptionPrototype = PolyfilledDOMException.prototype;\n\nif (PolyfilledDOMExceptionPrototype.constructor !== PolyfilledDOMException) {\n  if (!IS_PURE) {\n    defineProperty(PolyfilledDOMExceptionPrototype, 'constructor', createPropertyDescriptor(1, PolyfilledDOMException));\n  }\n\n  for (var key in DOMExceptionConstants) if (hasOwn(DOMExceptionConstants, key)) {\n    var constant = DOMExceptionConstants[key];\n    var constantName = constant.s;\n    if (!hasOwn(PolyfilledDOMException, constantName)) {\n      defineProperty(PolyfilledDOMException, constantName, createPropertyDescriptor(6, constant.c));\n    }\n  }\n}\n", "'use strict';\nvar getBuiltIn = require('../internals/get-built-in');\nvar setToStringTag = require('../internals/set-to-string-tag');\n\nvar DOM_EXCEPTION = 'DOMException';\n\n// `DOMException.prototype[@@toStringTag]` property\nsetToStringTag(getBuiltIn(DOM_EXCEPTION), DOM_EXCEPTION);\n", "'use strict';\nvar $ = require('../internals/export');\nvar globalThis = require('../internals/global-this');\nvar clearImmediate = require('../internals/task').clear;\n\n// `clearImmediate` method\n// http://w3c.github.io/setImmediate/#si-clearImmediate\n$({ global: true, bind: true, enumerable: true, forced: globalThis.clearImmediate !== clearImmediate }, {\n  clearImmediate: clearImmediate\n});\n", "'use strict';\nvar globalThis = require('../internals/global-this');\nvar apply = require('../internals/function-apply');\nvar isCallable = require('../internals/is-callable');\nvar ENVIRONMENT = require('../internals/environment');\nvar USER_AGENT = require('../internals/environment-user-agent');\nvar arraySlice = require('../internals/array-slice');\nvar validateArgumentsLength = require('../internals/validate-arguments-length');\n\nvar Function = globalThis.Function;\n// dirty IE9- and Bun 0.3.0- checks\nvar WRAP = /MSIE .\\./.test(USER_AGENT) || ENVIRONMENT === 'BUN' && (function () {\n  var version = globalThis.Bun.version.split('.');\n  return version.length < 3 || version[0] === '0' && (version[1] < 3 || version[1] === '3' && version[2] === '0');\n})();\n\n// IE9- / Bun 0.3.0- setTimeout / setInterval / setImmediate additional parameters fix\n// https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#timers\n// https://github.com/oven-sh/bun/issues/1633\nmodule.exports = function (scheduler, hasTimeArg) {\n  var firstParamIndex = hasTimeArg ? 2 : 1;\n  return WRAP ? function (handler, timeout /* , ...arguments */) {\n    var boundArgs = validateArgumentsLength(arguments.length, 1) > firstParamIndex;\n    var fn = isCallable(handler) ? handler : Function(handler);\n    var params = boundArgs ? arraySlice(arguments, firstParamIndex) : [];\n    var callback = boundArgs ? function () {\n      apply(fn, this, params);\n    } : fn;\n    return hasTimeArg ? scheduler(callback, timeout) : scheduler(callback);\n  } : scheduler;\n};\n", "'use strict';\nvar $ = require('../internals/export');\nvar globalThis = require('../internals/global-this');\nvar setTask = require('../internals/task').set;\nvar schedulersFix = require('../internals/schedulers-fix');\n\n// https://github.com/oven-sh/bun/issues/1633\nvar setImmediate = globalThis.setImmediate ? schedulersFix(setTask, false) : setTask;\n\n// `setImmediate` method\n// http://w3c.github.io/setImmediate/#si-setImmediate\n$({ global: true, bind: true, enumerable: true, forced: globalThis.setImmediate !== setImmediate }, {\n  setImmediate: setImmediate\n});\n", "'use strict';\n// TODO: Remove this module from `core-js@4` since it's split to modules listed below\nrequire('../modules/web.clear-immediate');\nrequire('../modules/web.set-immediate');\n", "'use strict';\nvar $ = require('../internals/export');\nvar globalThis = require('../internals/global-this');\nvar microtask = require('../internals/microtask');\nvar aCallable = require('../internals/a-callable');\nvar validateArgumentsLength = require('../internals/validate-arguments-length');\nvar fails = require('../internals/fails');\nvar DESCRIPTORS = require('../internals/descriptors');\n\n// Bun ~ 1.0.30 bug\n// https://github.com/oven-sh/bun/issues/9249\nvar WRONG_ARITY = fails(function () {\n  // getOwnPropertyDescriptor for prevent experimental warning in Node 11\n  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\n  return DESCRIPTORS && Object.getOwnPropertyDescriptor(globalThis, 'queueMicrotask').value.length !== 1;\n});\n\n// `queueMicrotask` method\n// https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#dom-queuemicrotask\n$({ global: true, enumerable: true, dontCallGetSet: true, forced: WRONG_ARITY }, {\n  queueMicrotask: function queueMicrotask(fn) {\n    validateArgumentsLength(arguments.length, 1);\n    microtask(aCallable(fn));\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar globalThis = require('../internals/global-this');\nvar defineBuiltInAccessor = require('../internals/define-built-in-accessor');\nvar DESCRIPTORS = require('../internals/descriptors');\n\nvar $TypeError = TypeError;\n// eslint-disable-next-line es/no-object-defineproperty -- safe\nvar defineProperty = Object.defineProperty;\nvar INCORRECT_VALUE = globalThis.self !== globalThis;\n\n// `self` getter\n// https://html.spec.whatwg.org/multipage/window-object.html#dom-self\ntry {\n  if (DESCRIPTORS) {\n    // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\n    var descriptor = Object.getOwnPropertyDescriptor(globalThis, 'self');\n    // some engines have `self`, but with incorrect descriptor\n    // https://github.com/denoland/deno/issues/15765\n    if (INCORRECT_VALUE || !descriptor || !descriptor.get || !descriptor.enumerable) {\n      defineBuiltInAccessor(globalThis, 'self', {\n        get: function self() {\n          return globalThis;\n        },\n        set: function self(value) {\n          if (this !== globalThis) throw new $TypeError('Illegal invocation');\n          defineProperty(globalThis, 'self', {\n            value: value,\n            writable: true,\n            configurable: true,\n            enumerable: true\n          });\n        },\n        configurable: true,\n        enumerable: true\n      });\n    }\n  } else $({ global: true, simple: true, forced: INCORRECT_VALUE }, {\n    self: globalThis\n  });\n} catch (error) { /* empty */ }\n", "'use strict';\nvar IS_PURE = require('../internals/is-pure');\nvar $ = require('../internals/export');\nvar globalThis = require('../internals/global-this');\nvar getBuiltIn = require('../internals/get-built-in');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar fails = require('../internals/fails');\nvar uid = require('../internals/uid');\nvar isCallable = require('../internals/is-callable');\nvar isConstructor = require('../internals/is-constructor');\nvar isNullOrUndefined = require('../internals/is-null-or-undefined');\nvar isObject = require('../internals/is-object');\nvar isSymbol = require('../internals/is-symbol');\nvar iterate = require('../internals/iterate');\nvar anObject = require('../internals/an-object');\nvar classof = require('../internals/classof');\nvar hasOwn = require('../internals/has-own-property');\nvar createProperty = require('../internals/create-property');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar validateArgumentsLength = require('../internals/validate-arguments-length');\nvar getRegExpFlags = require('../internals/regexp-get-flags');\nvar MapHelpers = require('../internals/map-helpers');\nvar SetHelpers = require('../internals/set-helpers');\nvar setIterate = require('../internals/set-iterate');\nvar detachTransferable = require('../internals/detach-transferable');\nvar ERROR_STACK_INSTALLABLE = require('../internals/error-stack-installable');\nvar PROPER_STRUCTURED_CLONE_TRANSFER = require('../internals/structured-clone-proper-transfer');\n\nvar Object = globalThis.Object;\nvar Array = globalThis.Array;\nvar Date = globalThis.Date;\nvar Error = globalThis.Error;\nvar TypeError = globalThis.TypeError;\nvar PerformanceMark = globalThis.PerformanceMark;\nvar DOMException = getBuiltIn('DOMException');\nvar Map = MapHelpers.Map;\nvar mapHas = MapHelpers.has;\nvar mapGet = MapHelpers.get;\nvar mapSet = MapHelpers.set;\nvar Set = SetHelpers.Set;\nvar setAdd = SetHelpers.add;\nvar setHas = SetHelpers.has;\nvar objectKeys = getBuiltIn('Object', 'keys');\nvar push = uncurryThis([].push);\nvar thisBooleanValue = uncurryThis(true.valueOf);\nvar thisNumberValue = uncurryThis(1.1.valueOf);\nvar thisStringValue = uncurryThis(''.valueOf);\nvar thisTimeValue = uncurryThis(Date.prototype.getTime);\nvar PERFORMANCE_MARK = uid('structuredClone');\nvar DATA_CLONE_ERROR = 'DataCloneError';\nvar TRANSFERRING = 'Transferring';\n\nvar checkBasicSemantic = function (structuredCloneImplementation) {\n  return !fails(function () {\n    var set1 = new globalThis.Set([7]);\n    var set2 = structuredCloneImplementation(set1);\n    var number = structuredCloneImplementation(Object(7));\n    return set2 === set1 || !set2.has(7) || !isObject(number) || +number !== 7;\n  }) && structuredCloneImplementation;\n};\n\nvar checkErrorsCloning = function (structuredCloneImplementation, $Error) {\n  return !fails(function () {\n    var error = new $Error();\n    var test = structuredCloneImplementation({ a: error, b: error });\n    return !(test && test.a === test.b && test.a instanceof $Error && test.a.stack === error.stack);\n  });\n};\n\n// https://github.com/whatwg/html/pull/5749\nvar checkNewErrorsCloningSemantic = function (structuredCloneImplementation) {\n  return !fails(function () {\n    var test = structuredCloneImplementation(new globalThis.AggregateError([1], PERFORMANCE_MARK, { cause: 3 }));\n    return test.name !== 'AggregateError' || test.errors[0] !== 1 || test.message !== PERFORMANCE_MARK || test.cause !== 3;\n  });\n};\n\n// FF94+, Safari 15.4+, Chrome 98+, NodeJS 17.0+, Deno 1.13+\n// FF<103 and Safari implementations can't clone errors\n// https://bugzilla.mozilla.org/show_bug.cgi?id=1556604\n// FF103 can clone errors, but `.stack` of clone is an empty string\n// https://bugzilla.mozilla.org/show_bug.cgi?id=1778762\n// FF104+ fixed it on usual errors, but not on DOMExceptions\n// https://bugzilla.mozilla.org/show_bug.cgi?id=1777321\n// Chrome <102 returns `null` if cloned object contains multiple references to one error\n// https://bugs.chromium.org/p/v8/issues/detail?id=12542\n// NodeJS implementation can't clone DOMExceptions\n// https://github.com/nodejs/node/issues/41038\n// only FF103+ supports new (html/5749) error cloning semantic\nvar nativeStructuredClone = globalThis.structuredClone;\n\nvar FORCED_REPLACEMENT = IS_PURE\n  || !checkErrorsCloning(nativeStructuredClone, Error)\n  || !checkErrorsCloning(nativeStructuredClone, DOMException)\n  || !checkNewErrorsCloningSemantic(nativeStructuredClone);\n\n// Chrome 82+, Safari 14.1+, Deno 1.11+\n// Chrome 78-81 implementation swaps `.name` and `.message` of cloned `DOMException`\n// Chrome returns `null` if cloned object contains multiple references to one error\n// Safari 14.1 implementation doesn't clone some `RegExp` flags, so requires a workaround\n// Safari implementation can't clone errors\n// Deno 1.2-1.10 implementations too naive\n// NodeJS 16.0+ does not have `PerformanceMark` constructor\n// NodeJS <17.2 structured cloning implementation from `performance.mark` is too naive\n// and can't clone, for example, `RegExp` or some boxed primitives\n// https://github.com/nodejs/node/issues/40840\n// no one of those implementations supports new (html/5749) error cloning semantic\nvar structuredCloneFromMark = !nativeStructuredClone && checkBasicSemantic(function (value) {\n  return new PerformanceMark(PERFORMANCE_MARK, { detail: value }).detail;\n});\n\nvar nativeRestrictedStructuredClone = checkBasicSemantic(nativeStructuredClone) || structuredCloneFromMark;\n\nvar throwUncloneable = function (type) {\n  throw new DOMException('Uncloneable type: ' + type, DATA_CLONE_ERROR);\n};\n\nvar throwUnpolyfillable = function (type, action) {\n  throw new DOMException((action || 'Cloning') + ' of ' + type + ' cannot be properly polyfilled in this engine', DATA_CLONE_ERROR);\n};\n\nvar tryNativeRestrictedStructuredClone = function (value, type) {\n  if (!nativeRestrictedStructuredClone) throwUnpolyfillable(type);\n  return nativeRestrictedStructuredClone(value);\n};\n\nvar createDataTransfer = function () {\n  var dataTransfer;\n  try {\n    dataTransfer = new globalThis.DataTransfer();\n  } catch (error) {\n    try {\n      dataTransfer = new globalThis.ClipboardEvent('').clipboardData;\n    } catch (error2) { /* empty */ }\n  }\n  return dataTransfer && dataTransfer.items && dataTransfer.files ? dataTransfer : null;\n};\n\nvar cloneBuffer = function (value, map, $type) {\n  if (mapHas(map, value)) return mapGet(map, value);\n\n  var type = $type || classof(value);\n  var clone, length, options, source, target, i;\n\n  if (type === 'SharedArrayBuffer') {\n    if (nativeRestrictedStructuredClone) clone = nativeRestrictedStructuredClone(value);\n    // SharedArrayBuffer should use shared memory, we can't polyfill it, so return the original\n    else clone = value;\n  } else {\n    var DataView = globalThis.DataView;\n\n    // `ArrayBuffer#slice` is not available in IE10\n    // `ArrayBuffer#slice` and `DataView` are not available in old FF\n    if (!DataView && !isCallable(value.slice)) throwUnpolyfillable('ArrayBuffer');\n    // detached buffers throws in `DataView` and `.slice`\n    try {\n      if (isCallable(value.slice) && !value.resizable) {\n        clone = value.slice(0);\n      } else {\n        length = value.byteLength;\n        options = 'maxByteLength' in value ? { maxByteLength: value.maxByteLength } : undefined;\n        // eslint-disable-next-line es/no-resizable-and-growable-arraybuffers -- safe\n        clone = new ArrayBuffer(length, options);\n        source = new DataView(value);\n        target = new DataView(clone);\n        for (i = 0; i < length; i++) {\n          target.setUint8(i, source.getUint8(i));\n        }\n      }\n    } catch (error) {\n      throw new DOMException('ArrayBuffer is detached', DATA_CLONE_ERROR);\n    }\n  }\n\n  mapSet(map, value, clone);\n\n  return clone;\n};\n\nvar cloneView = function (value, type, offset, length, map) {\n  var C = globalThis[type];\n  // in some old engines like Safari 9, typeof C is 'object'\n  // on Uint8ClampedArray or some other constructors\n  if (!isObject(C)) throwUnpolyfillable(type);\n  return new C(cloneBuffer(value.buffer, map), offset, length);\n};\n\nvar structuredCloneInternal = function (value, map) {\n  if (isSymbol(value)) throwUncloneable('Symbol');\n  if (!isObject(value)) return value;\n  // effectively preserves circular references\n  if (map) {\n    if (mapHas(map, value)) return mapGet(map, value);\n  } else map = new Map();\n\n  var type = classof(value);\n  var C, name, cloned, dataTransfer, i, length, keys, key;\n\n  switch (type) {\n    case 'Array':\n      cloned = Array(lengthOfArrayLike(value));\n      break;\n    case 'Object':\n      cloned = {};\n      break;\n    case 'Map':\n      cloned = new Map();\n      break;\n    case 'Set':\n      cloned = new Set();\n      break;\n    case 'RegExp':\n      // in this block because of a Safari 14.1 bug\n      // old FF does not clone regexes passed to the constructor, so get the source and flags directly\n      cloned = new RegExp(value.source, getRegExpFlags(value));\n      break;\n    case 'Error':\n      name = value.name;\n      switch (name) {\n        case 'AggregateError':\n          cloned = new (getBuiltIn(name))([]);\n          break;\n        case 'EvalError':\n        case 'RangeError':\n        case 'ReferenceError':\n        case 'SuppressedError':\n        case 'SyntaxError':\n        case 'TypeError':\n        case 'URIError':\n          cloned = new (getBuiltIn(name))();\n          break;\n        case 'CompileError':\n        case 'LinkError':\n        case 'RuntimeError':\n          cloned = new (getBuiltIn('WebAssembly', name))();\n          break;\n        default:\n          cloned = new Error();\n      }\n      break;\n    case 'DOMException':\n      cloned = new DOMException(value.message, value.name);\n      break;\n    case 'ArrayBuffer':\n    case 'SharedArrayBuffer':\n      cloned = cloneBuffer(value, map, type);\n      break;\n    case 'DataView':\n    case 'Int8Array':\n    case 'Uint8Array':\n    case 'Uint8ClampedArray':\n    case 'Int16Array':\n    case 'Uint16Array':\n    case 'Int32Array':\n    case 'Uint32Array':\n    case 'Float16Array':\n    case 'Float32Array':\n    case 'Float64Array':\n    case 'BigInt64Array':\n    case 'BigUint64Array':\n      length = type === 'DataView' ? value.byteLength : value.length;\n      cloned = cloneView(value, type, value.byteOffset, length, map);\n      break;\n    case 'DOMQuad':\n      try {\n        cloned = new DOMQuad(\n          structuredCloneInternal(value.p1, map),\n          structuredCloneInternal(value.p2, map),\n          structuredCloneInternal(value.p3, map),\n          structuredCloneInternal(value.p4, map)\n        );\n      } catch (error) {\n        cloned = tryNativeRestrictedStructuredClone(value, type);\n      }\n      break;\n    case 'File':\n      if (nativeRestrictedStructuredClone) try {\n        cloned = nativeRestrictedStructuredClone(value);\n        // NodeJS 20.0.0 bug, https://github.com/nodejs/node/issues/47612\n        if (classof(cloned) !== type) cloned = undefined;\n      } catch (error) { /* empty */ }\n      if (!cloned) try {\n        cloned = new File([value], value.name, value);\n      } catch (error) { /* empty */ }\n      if (!cloned) throwUnpolyfillable(type);\n      break;\n    case 'FileList':\n      dataTransfer = createDataTransfer();\n      if (dataTransfer) {\n        for (i = 0, length = lengthOfArrayLike(value); i < length; i++) {\n          dataTransfer.items.add(structuredCloneInternal(value[i], map));\n        }\n        cloned = dataTransfer.files;\n      } else cloned = tryNativeRestrictedStructuredClone(value, type);\n      break;\n    case 'ImageData':\n      // Safari 9 ImageData is a constructor, but typeof ImageData is 'object'\n      try {\n        cloned = new ImageData(\n          structuredCloneInternal(value.data, map),\n          value.width,\n          value.height,\n          { colorSpace: value.colorSpace }\n        );\n      } catch (error) {\n        cloned = tryNativeRestrictedStructuredClone(value, type);\n      } break;\n    default:\n      if (nativeRestrictedStructuredClone) {\n        cloned = nativeRestrictedStructuredClone(value);\n      } else switch (type) {\n        case 'BigInt':\n          // can be a 3rd party polyfill\n          cloned = Object(value.valueOf());\n          break;\n        case 'Boolean':\n          cloned = Object(thisBooleanValue(value));\n          break;\n        case 'Number':\n          cloned = Object(thisNumberValue(value));\n          break;\n        case 'String':\n          cloned = Object(thisStringValue(value));\n          break;\n        case 'Date':\n          cloned = new Date(thisTimeValue(value));\n          break;\n        case 'Blob':\n          try {\n            cloned = value.slice(0, value.size, value.type);\n          } catch (error) {\n            throwUnpolyfillable(type);\n          } break;\n        case 'DOMPoint':\n        case 'DOMPointReadOnly':\n          C = globalThis[type];\n          try {\n            cloned = C.fromPoint\n              ? C.fromPoint(value)\n              : new C(value.x, value.y, value.z, value.w);\n          } catch (error) {\n            throwUnpolyfillable(type);\n          } break;\n        case 'DOMRect':\n        case 'DOMRectReadOnly':\n          C = globalThis[type];\n          try {\n            cloned = C.fromRect\n              ? C.fromRect(value)\n              : new C(value.x, value.y, value.width, value.height);\n          } catch (error) {\n            throwUnpolyfillable(type);\n          } break;\n        case 'DOMMatrix':\n        case 'DOMMatrixReadOnly':\n          C = globalThis[type];\n          try {\n            cloned = C.fromMatrix\n              ? C.fromMatrix(value)\n              : new C(value);\n          } catch (error) {\n            throwUnpolyfillable(type);\n          } break;\n        case 'AudioData':\n        case 'VideoFrame':\n          if (!isCallable(value.clone)) throwUnpolyfillable(type);\n          try {\n            cloned = value.clone();\n          } catch (error) {\n            throwUncloneable(type);\n          } break;\n        case 'CropTarget':\n        case 'CryptoKey':\n        case 'FileSystemDirectoryHandle':\n        case 'FileSystemFileHandle':\n        case 'FileSystemHandle':\n        case 'GPUCompilationInfo':\n        case 'GPUCompilationMessage':\n        case 'ImageBitmap':\n        case 'RTCCertificate':\n        case 'WebAssembly.Module':\n          throwUnpolyfillable(type);\n          // break omitted\n        default:\n          throwUncloneable(type);\n      }\n  }\n\n  mapSet(map, value, cloned);\n\n  switch (type) {\n    case 'Array':\n    case 'Object':\n      keys = objectKeys(value);\n      for (i = 0, length = lengthOfArrayLike(keys); i < length; i++) {\n        key = keys[i];\n        createProperty(cloned, key, structuredCloneInternal(value[key], map));\n      } break;\n    case 'Map':\n      value.forEach(function (v, k) {\n        mapSet(cloned, structuredCloneInternal(k, map), structuredCloneInternal(v, map));\n      });\n      break;\n    case 'Set':\n      value.forEach(function (v) {\n        setAdd(cloned, structuredCloneInternal(v, map));\n      });\n      break;\n    case 'Error':\n      createNonEnumerableProperty(cloned, 'message', structuredCloneInternal(value.message, map));\n      if (hasOwn(value, 'cause')) {\n        createNonEnumerableProperty(cloned, 'cause', structuredCloneInternal(value.cause, map));\n      }\n      if (name === 'AggregateError') {\n        cloned.errors = structuredCloneInternal(value.errors, map);\n      } else if (name === 'SuppressedError') {\n        cloned.error = structuredCloneInternal(value.error, map);\n        cloned.suppressed = structuredCloneInternal(value.suppressed, map);\n      } // break omitted\n    case 'DOMException':\n      if (ERROR_STACK_INSTALLABLE) {\n        createNonEnumerableProperty(cloned, 'stack', structuredCloneInternal(value.stack, map));\n      }\n  }\n\n  return cloned;\n};\n\nvar tryToTransfer = function (rawTransfer, map) {\n  if (!isObject(rawTransfer)) throw new TypeError('Transfer option cannot be converted to a sequence');\n\n  var transfer = [];\n\n  iterate(rawTransfer, function (value) {\n    push(transfer, anObject(value));\n  });\n\n  var i = 0;\n  var length = lengthOfArrayLike(transfer);\n  var buffers = new Set();\n  var value, type, C, transferred, canvas, context;\n\n  while (i < length) {\n    value = transfer[i++];\n    type = classof(value);\n    transferred = undefined;\n\n    if (type === 'ArrayBuffer' ? setHas(buffers, value) : mapHas(map, value)) {\n      throw new DOMException('Duplicate transferable', DATA_CLONE_ERROR);\n    }\n\n    if (type === 'ArrayBuffer') {\n      setAdd(buffers, value);\n      continue;\n    }\n\n    if (PROPER_STRUCTURED_CLONE_TRANSFER) {\n      transferred = nativeStructuredClone(value, { transfer: [value] });\n    } else switch (type) {\n      case 'ImageBitmap':\n        C = globalThis.OffscreenCanvas;\n        if (!isConstructor(C)) throwUnpolyfillable(type, TRANSFERRING);\n        try {\n          canvas = new C(value.width, value.height);\n          context = canvas.getContext('bitmaprenderer');\n          context.transferFromImageBitmap(value);\n          transferred = canvas.transferToImageBitmap();\n        } catch (error) { /* empty */ }\n        break;\n      case 'AudioData':\n      case 'VideoFrame':\n        if (!isCallable(value.clone) || !isCallable(value.close)) throwUnpolyfillable(type, TRANSFERRING);\n        try {\n          transferred = value.clone();\n          value.close();\n        } catch (error) { /* empty */ }\n        break;\n      case 'MediaSourceHandle':\n      case 'MessagePort':\n      case 'MIDIAccess':\n      case 'OffscreenCanvas':\n      case 'ReadableStream':\n      case 'RTCDataChannel':\n      case 'TransformStream':\n      case 'WebTransportReceiveStream':\n      case 'WebTransportSendStream':\n      case 'WritableStream':\n        throwUnpolyfillable(type, TRANSFERRING);\n    }\n\n    if (transferred === undefined) throw new DOMException('This object cannot be transferred: ' + type, DATA_CLONE_ERROR);\n\n    mapSet(map, value, transferred);\n  }\n\n  return buffers;\n};\n\nvar detachBuffers = function (buffers) {\n  setIterate(buffers, function (buffer) {\n    if (PROPER_STRUCTURED_CLONE_TRANSFER) {\n      nativeStructuredClone(buffer, { transfer: [buffer] });\n    } else if (isCallable(buffer.transfer)) {\n      buffer.transfer();\n    } else if (detachTransferable) {\n      detachTransferable(buffer);\n    } else {\n      throwUnpolyfillable('ArrayBuffer', TRANSFERRING);\n    }\n  });\n};\n\n// `structuredClone` method\n// https://html.spec.whatwg.org/multipage/structured-data.html#dom-structuredclone\n$({ global: true, enumerable: true, sham: !PROPER_STRUCTURED_CLONE_TRANSFER, forced: FORCED_REPLACEMENT }, {\n  structuredClone: function structuredClone(value /* , { transfer } */) {\n    var options = validateArgumentsLength(arguments.length, 1) > 1 && !isNullOrUndefined(arguments[1]) ? anObject(arguments[1]) : undefined;\n    var transfer = options ? options.transfer : undefined;\n    var map, buffers;\n\n    if (transfer !== undefined) {\n      map = new Map();\n      buffers = tryToTransfer(transfer, map);\n    }\n\n    var clone = structuredCloneInternal(value, map);\n\n    // since of an issue with cloning views of transferred buffers, we a forced to detach them later\n    // https://github.com/zloirock/core-js/issues/1265\n    if (buffers) detachBuffers(buffers);\n\n    return clone;\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar globalThis = require('../internals/global-this');\nvar schedulersFix = require('../internals/schedulers-fix');\n\nvar setInterval = schedulersFix(globalThis.setInterval, true);\n\n// Bun / IE9- setInterval additional parameters fix\n// https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#dom-setinterval\n$({ global: true, bind: true, forced: globalThis.setInterval !== setInterval }, {\n  setInterval: setInterval\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar globalThis = require('../internals/global-this');\nvar schedulersFix = require('../internals/schedulers-fix');\n\nvar setTimeout = schedulersFix(globalThis.setTimeout, true);\n\n// Bun / IE9- setTimeout additional parameters fix\n// https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#dom-settimeout\n$({ global: true, bind: true, forced: globalThis.setTimeout !== setTimeout }, {\n  setTimeout: setTimeout\n});\n", "'use strict';\n// TODO: Remove this module from `core-js@4` since it's split to modules listed below\nrequire('../modules/web.set-interval');\nrequire('../modules/web.set-timeout');\n", "'use strict';\nvar fails = require('../internals/fails');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar IS_PURE = require('../internals/is-pure');\n\nvar ITERATOR = wellKnownSymbol('iterator');\n\nmodule.exports = !fails(function () {\n  // eslint-disable-next-line unicorn/relative-url-style -- required for testing\n  var url = new URL('b?a=1&b=2&c=3', 'https://a');\n  var params = url.searchParams;\n  var params2 = new URLSearchParams('a=1&a=2&b=3');\n  var result = '';\n  url.pathname = 'c%20d';\n  params.forEach(function (value, key) {\n    params['delete']('b');\n    result += key + value;\n  });\n  params2['delete']('a', 2);\n  // `undefined` case is a Chromium 117 bug\n  // https://bugs.chromium.org/p/v8/issues/detail?id=14222\n  params2['delete']('b', undefined);\n  return (IS_PURE && (!url.toJSON || !params2.has('a', 1) || params2.has('a', 2) || !params2.has('a', undefined) || params2.has('b')))\n    || (!params.size && (IS_PURE || !DESCRIPTORS))\n    || !params.sort\n    || url.href !== 'https://a/c%20d?a=1&c=3'\n    || params.get('c') !== '3'\n    || String(new URLSearchParams('?a=1')) !== 'a=1'\n    || !params[ITERATOR]\n    // throws in Edge\n    || new URL('https://a@b').username !== 'a'\n    || new URLSearchParams(new URLSearchParams('a=b')).get('a') !== 'b'\n    // not punycoded in Edge\n    || new URL('https://\u0442\u0435\u0441\u0442').host !== 'xn--e1aybc'\n    // not escaped in Chrome 62-\n    || new URL('https://a#\u0431').hash !== '#%D0%B1'\n    // fails in Chrome 66-\n    || result !== 'a1c3'\n    // throws in Safari\n    || new URL('https://x', undefined).host !== 'x';\n});\n", "'use strict';\n// based on https://github.com/bestiejs/punycode.js/blob/master/punycode.js\nvar uncurryThis = require('../internals/function-uncurry-this');\n\nvar maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1\nvar base = 36;\nvar tMin = 1;\nvar tMax = 26;\nvar skew = 38;\nvar damp = 700;\nvar initialBias = 72;\nvar initialN = 128; // 0x80\nvar delimiter = '-'; // '\\x2D'\nvar regexNonASCII = /[^\\0-\\u007E]/; // non-ASCII chars\nvar regexSeparators = /[.\\u3002\\uFF0E\\uFF61]/g; // RFC 3490 separators\nvar OVERFLOW_ERROR = 'Overflow: input needs wider integers to process';\nvar baseMinusTMin = base - tMin;\n\nvar $RangeError = RangeError;\nvar exec = uncurryThis(regexSeparators.exec);\nvar floor = Math.floor;\nvar fromCharCode = String.fromCharCode;\nvar charCodeAt = uncurryThis(''.charCodeAt);\nvar join = uncurryThis([].join);\nvar push = uncurryThis([].push);\nvar replace = uncurryThis(''.replace);\nvar split = uncurryThis(''.split);\nvar toLowerCase = uncurryThis(''.toLowerCase);\n\n/**\n * Creates an array containing the numeric code points of each Unicode\n * character in the string. While JavaScript uses UCS-2 internally,\n * this function will convert a pair of surrogate halves (each of which\n * UCS-2 exposes as separate characters) into a single code point,\n * matching UTF-16.\n */\nvar ucs2decode = function (string) {\n  var output = [];\n  var counter = 0;\n  var length = string.length;\n  while (counter < length) {\n    var value = charCodeAt(string, counter++);\n    if (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n      // It's a high surrogate, and there is a next character.\n      var extra = charCodeAt(string, counter++);\n      if ((extra & 0xFC00) === 0xDC00) { // Low surrogate.\n        push(output, ((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n      } else {\n        // It's an unmatched surrogate; only append this code unit, in case the\n        // next code unit is the high surrogate of a surrogate pair.\n        push(output, value);\n        counter--;\n      }\n    } else {\n      push(output, value);\n    }\n  }\n  return output;\n};\n\n/**\n * Converts a digit/integer into a basic code point.\n */\nvar digitToBasic = function (digit) {\n  //  0..25 map to ASCII a..z or A..Z\n  // 26..35 map to ASCII 0..9\n  return digit + 22 + 75 * (digit < 26);\n};\n\n/**\n * Bias adaptation function as per section 3.4 of RFC 3492.\n * https://tools.ietf.org/html/rfc3492#section-3.4\n */\nvar adapt = function (delta, numPoints, firstTime) {\n  var k = 0;\n  delta = firstTime ? floor(delta / damp) : delta >> 1;\n  delta += floor(delta / numPoints);\n  while (delta > baseMinusTMin * tMax >> 1) {\n    delta = floor(delta / baseMinusTMin);\n    k += base;\n  }\n  return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n};\n\n/**\n * Converts a string of Unicode symbols (e.g. a domain name label) to a\n * Punycode string of ASCII-only symbols.\n */\nvar encode = function (input) {\n  var output = [];\n\n  // Convert the input in UCS-2 to an array of Unicode code points.\n  input = ucs2decode(input);\n\n  // Cache the length.\n  var inputLength = input.length;\n\n  // Initialize the state.\n  var n = initialN;\n  var delta = 0;\n  var bias = initialBias;\n  var i, currentValue;\n\n  // Handle the basic code points.\n  for (i = 0; i < input.length; i++) {\n    currentValue = input[i];\n    if (currentValue < 0x80) {\n      push(output, fromCharCode(currentValue));\n    }\n  }\n\n  var basicLength = output.length; // number of basic code points.\n  var handledCPCount = basicLength; // number of code points that have been handled;\n\n  // Finish the basic string with a delimiter unless it's empty.\n  if (basicLength) {\n    push(output, delimiter);\n  }\n\n  // Main encoding loop:\n  while (handledCPCount < inputLength) {\n    // All non-basic code points < n have been handled already. Find the next larger one:\n    var m = maxInt;\n    for (i = 0; i < input.length; i++) {\n      currentValue = input[i];\n      if (currentValue >= n && currentValue < m) {\n        m = currentValue;\n      }\n    }\n\n    // Increase `delta` enough to advance the decoder's <n,i> state to <m,0>, but guard against overflow.\n    var handledCPCountPlusOne = handledCPCount + 1;\n    if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n      throw new $RangeError(OVERFLOW_ERROR);\n    }\n\n    delta += (m - n) * handledCPCountPlusOne;\n    n = m;\n\n    for (i = 0; i < input.length; i++) {\n      currentValue = input[i];\n      if (currentValue < n && ++delta > maxInt) {\n        throw new $RangeError(OVERFLOW_ERROR);\n      }\n      if (currentValue === n) {\n        // Represent delta as a generalized variable-length integer.\n        var q = delta;\n        var k = base;\n        while (true) {\n          var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;\n          if (q < t) break;\n          var qMinusT = q - t;\n          var baseMinusT = base - t;\n          push(output, fromCharCode(digitToBasic(t + qMinusT % baseMinusT)));\n          q = floor(qMinusT / baseMinusT);\n          k += base;\n        }\n\n        push(output, fromCharCode(digitToBasic(q)));\n        bias = adapt(delta, handledCPCountPlusOne, handledCPCount === basicLength);\n        delta = 0;\n        handledCPCount++;\n      }\n    }\n\n    delta++;\n    n++;\n  }\n  return join(output, '');\n};\n\nmodule.exports = function (input) {\n  var encoded = [];\n  var labels = split(replace(toLowerCase(input), regexSeparators, '\\u002E'), '.');\n  var i, label;\n  for (i = 0; i < labels.length; i++) {\n    label = labels[i];\n    push(encoded, exec(regexNonASCII, label) ? 'xn--' + encode(label) : label);\n  }\n  return join(encoded, '.');\n};\n", "'use strict';\n// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`\nrequire('../modules/es.string.from-code-point');\nvar getBuiltIn = require('../internals/get-built-in');\nvar uncurryThis = require('../internals/function-uncurry-this');\n\nvar fromCharCode = String.fromCharCode;\nvar fromCodePoint = getBuiltIn('String', 'fromCodePoint');\nvar $encodeURIComponent = encodeURIComponent;\nvar $parseInt = parseInt;\nvar charAt = uncurryThis(''.charAt);\nvar push = uncurryThis([].push);\nvar replace = uncurryThis(''.replace);\nvar stringSlice = uncurryThis(''.slice);\nvar exec = uncurryThis(/./.exec);\n\nvar FALLBACK_REPLACER = '\\uFFFD';\nvar VALID_HEX = /^[0-9a-f]+$/i;\n// a surrogate pair is matched first, so a one-unit match is always a lone surrogate\nvar SURROGATE = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDFFF]/g;\n\nvar parseHexOctet = function (string, start) {\n  var substr = stringSlice(string, start, start + 2);\n  if (!exec(VALID_HEX, substr)) return NaN;\n\n  return $parseInt(substr, 16);\n};\n\nvar getLeadingOnes = function (octet) {\n  var count = 0;\n  for (var mask = 0x80; mask > 0 && (octet & mask) !== 0; mask >>= 1) {\n    count++;\n  }\n  return count;\n};\n\nvar utf8Decode = function (octets) {\n  var codePoint = null;\n  var length = octets.length;\n\n  switch (length) {\n    case 1:\n      codePoint = octets[0];\n      break;\n    case 2:\n      codePoint = (octets[0] & 0x1F) << 6 | (octets[1] & 0x3F);\n      break;\n    case 3:\n      codePoint = (octets[0] & 0x0F) << 12 | (octets[1] & 0x3F) << 6 | (octets[2] & 0x3F);\n      break;\n    case 4:\n      codePoint = (octets[0] & 0x07) << 18 | (octets[1] & 0x3F) << 12 | (octets[2] & 0x3F) << 6 | (octets[3] & 0x3F);\n      break;\n  }\n\n  // reject surrogates, overlong encodings, and out-of-range codepoints\n  if (codePoint === null\n    || codePoint > 0x10FFFF\n    || (codePoint >= 0xD800 && codePoint <= 0xDFFF)\n    || codePoint < (length > 3 ? 0x10000 : length > 2 ? 0x800 : length > 1 ? 0x80 : 0)\n  ) return null;\n\n  return codePoint;\n};\n\nvar replaceLoneSurrogate = function (chunk) {\n  return chunk.length === 2 ? chunk : FALLBACK_REPLACER;\n};\n\n// https://url.spec.whatwg.org/#percent-decode\n/* eslint-disable max-depth -- ok */\nvar decode = function (input) {\n  var length = input.length;\n  var result = '';\n  var i = 0;\n\n  while (i < length) {\n    var decodedChar = charAt(input, i);\n\n    if (decodedChar === '%') {\n      if (charAt(input, i + 1) === '%' || i + 3 > length) {\n        result += '%';\n        i++;\n        continue;\n      }\n\n      var octet = parseHexOctet(input, i + 1);\n\n      // eslint-disable-next-line no-self-compare -- NaN check\n      if (octet !== octet) {\n        result += decodedChar;\n        i++;\n        continue;\n      }\n\n      i += 2;\n      var byteSequenceLength = getLeadingOnes(octet);\n\n      if (byteSequenceLength === 0) {\n        decodedChar = fromCharCode(octet);\n      } else {\n        if (byteSequenceLength === 1 || byteSequenceLength > 4) {\n          result += FALLBACK_REPLACER;\n          i++;\n          continue;\n        }\n\n        var octets = [octet];\n        var sequenceIndex = 1;\n\n        while (sequenceIndex < byteSequenceLength) {\n          i++;\n          if (i + 3 > length || charAt(input, i) !== '%') break;\n\n          var nextByte = parseHexOctet(input, i + 1);\n\n          // eslint-disable-next-line no-self-compare -- NaN check\n          if (nextByte !== nextByte || nextByte > 191 || nextByte < 128) break;\n\n          // https://encoding.spec.whatwg.org/#utf-8-decoder - position-specific byte ranges\n          if (sequenceIndex === 1) {\n            if (octet === 0xE0 && nextByte < 0xA0) break;\n            if (octet === 0xED && nextByte > 0x9F) break;\n            if (octet === 0xF0 && nextByte < 0x90) break;\n            if (octet === 0xF4 && nextByte > 0x8F) break;\n          }\n\n          push(octets, nextByte);\n          i += 2;\n          sequenceIndex++;\n        }\n\n        if (octets.length !== byteSequenceLength) {\n          result += FALLBACK_REPLACER;\n          continue;\n        }\n\n        var codePoint = utf8Decode(octets);\n        if (codePoint === null) {\n          for (var replacement = 0; replacement < byteSequenceLength; replacement++) result += FALLBACK_REPLACER;\n          i++;\n          continue;\n        } else {\n          decodedChar = fromCodePoint(codePoint);\n        }\n      }\n    }\n\n    result += decodedChar;\n    i++;\n  }\n\n  return result;\n};\n/* eslint-enable max-depth -- ok */\n\n// https://url.spec.whatwg.org/#string-percent-encode-after-encoding\n// a lone surrogate is the only input `encodeURIComponent` throws on, and the UTF-8\n// encoder replaces it - so the throw selects the slow path instead of a per-call scan\nvar encode = function (input) {\n  try {\n    return $encodeURIComponent(input);\n  } catch (error) {\n    return $encodeURIComponent(replace(input, SURROGATE, replaceLoneSurrogate));\n  }\n};\n\nmodule.exports = {\n  decode: decode,\n  encode: encode\n};\n", "'use strict';\n// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`\nrequire('../modules/es.array.iterator');\nvar $ = require('../internals/export');\nvar globalThis = require('../internals/global-this');\nvar safeGetBuiltIn = require('../internals/safe-get-built-in');\nvar call = require('../internals/function-call');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar USE_NATIVE_URL = require('../internals/url-constructor-detection');\nvar percentCoding = require('../internals/url-percent-coding');\nvar defineBuiltIn = require('../internals/define-built-in');\nvar defineBuiltInAccessor = require('../internals/define-built-in-accessor');\nvar defineBuiltIns = require('../internals/define-built-ins');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar createIteratorConstructor = require('../internals/iterator-create-constructor');\nvar InternalStateModule = require('../internals/internal-state');\nvar anInstance = require('../internals/an-instance');\nvar isCallable = require('../internals/is-callable');\nvar hasOwn = require('../internals/has-own-property');\nvar bind = require('../internals/function-bind-context');\nvar classof = require('../internals/classof');\nvar anObject = require('../internals/an-object');\nvar isObject = require('../internals/is-object');\nvar $toString = require('../internals/to-string');\nvar create = require('../internals/object-create');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar getIterator = require('../internals/get-iterator-internal');\nvar getIteratorMethod = require('../internals/get-iterator-method-internal');\nvar createIterResultObject = require('../internals/create-iter-result-object');\nvar validateArgumentsLength = require('../internals/validate-arguments-length');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar arraySort = require('../internals/array-sort');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar URL_SEARCH_PARAMS = 'URLSearchParams';\nvar URL_SEARCH_PARAMS_ITERATOR = URL_SEARCH_PARAMS + 'Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalParamsState = InternalStateModule.getterFor(URL_SEARCH_PARAMS);\nvar getInternalIteratorState = InternalStateModule.getterFor(URL_SEARCH_PARAMS_ITERATOR);\nvar percentDecode = percentCoding.decode;\nvar percentEncode = percentCoding.encode;\n\nvar nativeFetch = safeGetBuiltIn('fetch');\nvar NativeRequest = safeGetBuiltIn('Request');\nvar Headers = safeGetBuiltIn('Headers');\nvar RequestPrototype = NativeRequest && NativeRequest.prototype;\nvar HeadersPrototype = Headers && Headers.prototype;\nvar TypeError = globalThis.TypeError;\nvar charAt = uncurryThis(''.charAt);\nvar join = uncurryThis([].join);\nvar push = uncurryThis([].push);\nvar replace = uncurryThis(''.replace);\nvar shift = uncurryThis([].shift);\nvar splice = uncurryThis([].splice);\nvar split = uncurryThis(''.split);\nvar stringSlice = uncurryThis(''.slice);\n\nvar plus = /\\+/g;\n\n// https://url.spec.whatwg.org/#urlencoded-parsing - `+` decodes to a space\nvar decodeQueryComponent = function (input) {\n  return percentDecode(replace(input, plus, ' '));\n};\n\nvar find = /[!'()~]|%20/g;\n\nvar replacements = {\n  '!': '%21',\n  \"'\": '%27',\n  '(': '%28',\n  ')': '%29',\n  '~': '%7E',\n  '%20': '+'\n};\n\nvar replacer = function (match) {\n  return replacements[match];\n};\n\nvar serialize = function (it) {\n  return replace(percentEncode(it), find, replacer);\n};\n\nvar URLSearchParamsIterator = createIteratorConstructor(function Iterator(params, kind) {\n  setInternalState(this, {\n    type: URL_SEARCH_PARAMS_ITERATOR,\n    target: getInternalParamsState(params).entries,\n    index: 0,\n    kind: kind\n  });\n}, URL_SEARCH_PARAMS, function next() {\n  var state = getInternalIteratorState(this);\n  var target = state.target;\n  var index = state.index++;\n  if (!target || index >= target.length) {\n    state.target = null;\n    return createIterResultObject(undefined, true);\n  }\n  var entry = target[index];\n  switch (state.kind) {\n    case 'keys': return createIterResultObject(entry.key, false);\n    case 'values': return createIterResultObject(entry.value, false);\n  } return createIterResultObject([entry.key, entry.value], false);\n}, true);\n\nvar URLSearchParamsState = function (init) {\n  this.entries = [];\n  this.url = null;\n\n  if (init !== undefined) {\n    if (isObject(init)) this.parseObject(init);\n    else this.parseQuery(typeof init == 'string' ? charAt(init, 0) === '?' ? stringSlice(init, 1) : init : $toString(init));\n  }\n};\n\nURLSearchParamsState.prototype = {\n  type: URL_SEARCH_PARAMS,\n  bindURL: function (url) {\n    this.url = url;\n    this.update();\n  },\n  parseObject: function (object) {\n    var entries = this.entries;\n    var iteratorMethod = getIteratorMethod(object);\n    var iterator, next, step, entryIterator, entryNext, first, second;\n\n    if (iteratorMethod) {\n      iterator = getIterator(object, iteratorMethod);\n      next = iterator.next;\n      while (!(step = call(next, iterator)).done) {\n        entryIterator = getIterator(anObject(step.value));\n        entryNext = entryIterator.next;\n        if (\n          (first = call(entryNext, entryIterator)).done ||\n          (second = call(entryNext, entryIterator)).done ||\n          !call(entryNext, entryIterator).done\n        ) throw new TypeError('Expected sequence with length 2');\n        push(entries, { key: $toString(first.value), value: $toString(second.value) });\n      }\n    } else for (var key in object) if (hasOwn(object, key)) {\n      push(entries, { key: key, value: $toString(object[key]) });\n    }\n  },\n  parseQuery: function (query) {\n    if (query) {\n      var entries = this.entries;\n      var attributes = split(query, '&');\n      var index = 0;\n      var attribute, entry;\n      while (index < attributes.length) {\n        attribute = attributes[index++];\n        if (attribute.length) {\n          entry = split(attribute, '=');\n          push(entries, {\n            key: decodeQueryComponent(shift(entry)),\n            value: decodeQueryComponent(join(entry, '='))\n          });\n        }\n      }\n    }\n  },\n  serialize: function () {\n    var entries = this.entries;\n    var result = [];\n    var index = 0;\n    var entry;\n    while (index < entries.length) {\n      entry = entries[index++];\n      push(result, serialize(entry.key) + '=' + serialize(entry.value));\n    } return join(result, '&');\n  },\n  update: function () {\n    this.entries.length = 0;\n    this.parseQuery(this.url.query);\n  },\n  updateURL: function () {\n    if (this.url) this.url.update();\n  }\n};\n\n// `URLSearchParams` constructor\n// https://url.spec.whatwg.org/#interface-urlsearchparams\nvar URLSearchParamsConstructor = function URLSearchParams(/* init */) {\n  anInstance(this, URLSearchParamsPrototype);\n  var init = arguments.length > 0 ? arguments[0] : undefined;\n  var state = setInternalState(this, new URLSearchParamsState(init));\n  if (!DESCRIPTORS) this.size = state.entries.length;\n};\n\nvar URLSearchParamsPrototype = URLSearchParamsConstructor.prototype;\n\ndefineBuiltIns(URLSearchParamsPrototype, {\n  // `URLSearchParams.prototype.append` method\n  // https://url.spec.whatwg.org/#dom-urlsearchparams-append\n  append: function append(name, value) {\n    var state = getInternalParamsState(this);\n    validateArgumentsLength(arguments.length, 2);\n    push(state.entries, { key: $toString(name), value: $toString(value) });\n    if (!DESCRIPTORS) this.size++;\n    state.updateURL();\n  },\n  // `URLSearchParams.prototype.delete` method\n  // https://url.spec.whatwg.org/#dom-urlsearchparams-delete\n  'delete': function (name /* , value */) {\n    var state = getInternalParamsState(this);\n    var length = validateArgumentsLength(arguments.length, 1);\n    var entries = state.entries;\n    var key = $toString(name);\n    var $value = length < 2 ? undefined : arguments[1];\n    var value = $value === undefined ? $value : $toString($value);\n    var index = 0;\n    while (index < entries.length) {\n      var entry = entries[index];\n      if (entry.key === key && (value === undefined || entry.value === value)) {\n        splice(entries, index, 1);\n      } else index++;\n    }\n    if (!DESCRIPTORS) this.size = entries.length;\n    state.updateURL();\n  },\n  // `URLSearchParams.prototype.get` method\n  // https://url.spec.whatwg.org/#dom-urlsearchparams-get\n  get: function get(name) {\n    var entries = getInternalParamsState(this).entries;\n    validateArgumentsLength(arguments.length, 1);\n    var key = $toString(name);\n    var index = 0;\n    for (; index < entries.length; index++) {\n      if (entries[index].key === key) return entries[index].value;\n    }\n    return null;\n  },\n  // `URLSearchParams.prototype.getAll` method\n  // https://url.spec.whatwg.org/#dom-urlsearchparams-getall\n  getAll: function getAll(name) {\n    var entries = getInternalParamsState(this).entries;\n    validateArgumentsLength(arguments.length, 1);\n    var key = $toString(name);\n    var result = [];\n    var index = 0;\n    for (; index < entries.length; index++) {\n      if (entries[index].key === key) push(result, entries[index].value);\n    }\n    return result;\n  },\n  // `URLSearchParams.prototype.has` method\n  // https://url.spec.whatwg.org/#dom-urlsearchparams-has\n  has: function has(name /* , value */) {\n    var entries = getInternalParamsState(this).entries;\n    var length = validateArgumentsLength(arguments.length, 1);\n    var key = $toString(name);\n    var $value = length < 2 ? undefined : arguments[1];\n    var value = $value === undefined ? $value : $toString($value);\n    var index = 0;\n    while (index < entries.length) {\n      var entry = entries[index++];\n      if (entry.key === key && (value === undefined || entry.value === value)) return true;\n    }\n    return false;\n  },\n  // `URLSearchParams.prototype.set` method\n  // https://url.spec.whatwg.org/#dom-urlsearchparams-set\n  set: function set(name, value) {\n    var state = getInternalParamsState(this);\n    validateArgumentsLength(arguments.length, 2);\n    var entries = state.entries;\n    var found = false;\n    var key = $toString(name);\n    var val = $toString(value);\n    var index = 0;\n    var entry;\n    for (; index < entries.length; index++) {\n      entry = entries[index];\n      if (entry.key === key) {\n        if (found) splice(entries, index--, 1);\n        else {\n          found = true;\n          entry.value = val;\n        }\n      }\n    }\n    if (!found) push(entries, { key: key, value: val });\n    if (!DESCRIPTORS) this.size = entries.length;\n    state.updateURL();\n  },\n  // `URLSearchParams.prototype.sort` method\n  // https://url.spec.whatwg.org/#dom-urlsearchparams-sort\n  sort: function sort() {\n    var state = getInternalParamsState(this);\n    arraySort(state.entries, function (a, b) {\n      return a.key > b.key ? 1 : -1;\n    });\n    state.updateURL();\n  },\n  // `URLSearchParams.prototype.forEach` method\n  forEach: function forEach(callback /* , thisArg */) {\n    var entries = getInternalParamsState(this).entries;\n    var boundFunction = bind(callback, arguments.length > 1 ? arguments[1] : undefined);\n    var index = 0;\n    var entry;\n    while (index < entries.length) {\n      entry = entries[index++];\n      boundFunction(entry.value, entry.key, this);\n    }\n  },\n  // `URLSearchParams.prototype.keys` method\n  keys: function keys() {\n    return new URLSearchParamsIterator(this, 'keys');\n  },\n  // `URLSearchParams.prototype.values` method\n  values: function values() {\n    return new URLSearchParamsIterator(this, 'values');\n  },\n  // `URLSearchParams.prototype.entries` method\n  entries: function entries() {\n    return new URLSearchParamsIterator(this, 'entries');\n  }\n}, { enumerable: true });\n\n// `URLSearchParams.prototype[@@iterator]` method\ndefineBuiltIn(URLSearchParamsPrototype, ITERATOR, URLSearchParamsPrototype.entries, { name: 'entries' });\n\n// `URLSearchParams.prototype.toString` method\n// https://url.spec.whatwg.org/#urlsearchparams-stringification-behavior\ndefineBuiltIn(URLSearchParamsPrototype, 'toString', function toString() {\n  return getInternalParamsState(this).serialize();\n}, { enumerable: true });\n\n// `URLSearchParams.prototype.size` getter\n// https://url.spec.whatwg.org/#dom-urlsearchparams-size\nif (DESCRIPTORS) defineBuiltInAccessor(URLSearchParamsPrototype, 'size', {\n  get: function size() {\n    return getInternalParamsState(this).entries.length;\n  },\n  configurable: true,\n  enumerable: true\n});\n\nsetToStringTag(URLSearchParamsConstructor, URL_SEARCH_PARAMS);\n\n$({ global: true, constructor: true, forced: !USE_NATIVE_URL }, {\n  URLSearchParams: URLSearchParamsConstructor\n});\n\n// Wrap `fetch` and `Request` for correct work with polyfilled `URLSearchParams`\nif (!USE_NATIVE_URL && isCallable(Headers)) {\n  var headersHas = uncurryThis(HeadersPrototype.has);\n  var headersSet = uncurryThis(HeadersPrototype.set);\n\n  var wrapRequestOptions = function (init) {\n    if (isObject(init)) {\n      var body = init.body;\n      var headers;\n      if (classof(body) === URL_SEARCH_PARAMS) {\n        headers = init.headers ? new Headers(init.headers) : new Headers();\n        if (!headersHas(headers, 'content-type')) {\n          headersSet(headers, 'content-type', 'application/x-www-form-urlencoded;charset=UTF-8');\n        }\n        return create(init, {\n          body: createPropertyDescriptor(0, $toString(body)),\n          headers: createPropertyDescriptor(0, headers)\n        });\n      }\n    } return init;\n  };\n\n  if (isCallable(nativeFetch)) {\n    $({ global: true, enumerable: true, dontCallGetSet: true, forced: true }, {\n      fetch: function fetch(input /* , init */) {\n        return nativeFetch(input, arguments.length > 1 ? wrapRequestOptions(arguments[1]) : {});\n      }\n    });\n  }\n\n  if (isCallable(NativeRequest)) {\n    var RequestConstructor = function Request(input /* , init */) {\n      anInstance(this, RequestPrototype);\n      return new NativeRequest(input, arguments.length > 1 ? wrapRequestOptions(arguments[1]) : {});\n    };\n\n    RequestPrototype.constructor = RequestConstructor;\n    RequestConstructor.prototype = RequestPrototype;\n\n    $({ global: true, constructor: true, dontCallGetSet: true, forced: true }, {\n      Request: RequestConstructor\n    });\n  }\n}\n\nmodule.exports = {\n  URLSearchParams: URLSearchParamsConstructor,\n  getState: getInternalParamsState\n};\n", "'use strict';\n// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`\nrequire('../modules/es.string.iterator');\nvar $ = require('../internals/export');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar USE_NATIVE_URL = require('../internals/url-constructor-detection');\nvar globalThis = require('../internals/global-this');\nvar bind = require('../internals/function-bind-context');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar defineBuiltIn = require('../internals/define-built-in');\nvar defineBuiltInAccessor = require('../internals/define-built-in-accessor');\nvar anInstance = require('../internals/an-instance');\nvar hasOwn = require('../internals/has-own-property');\nvar assign = require('../internals/object-assign');\nvar arrayFrom = require('../internals/array-from');\nvar arraySlice = require('../internals/array-slice');\nvar codeAt = require('../internals/string-multibyte').codeAt;\nvar toASCII = require('../internals/string-punycode-to-ascii');\nvar percentCoding = require('../internals/url-percent-coding');\nvar $toString = require('../internals/to-string');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar validateArgumentsLength = require('../internals/validate-arguments-length');\nvar URLSearchParamsModule = require('../modules/web.url-search-params.constructor');\nvar InternalStateModule = require('../internals/internal-state');\n\nvar setInternalState = InternalStateModule.set;\nvar getInternalURLState = InternalStateModule.getterFor('URL');\nvar URLSearchParams = URLSearchParamsModule.URLSearchParams;\nvar getInternalSearchParamsState = URLSearchParamsModule.getState;\nvar percentDecode = percentCoding.decode;\nvar percentEncode = percentCoding.encode;\n\nvar NativeURL = globalThis.URL;\nvar TypeError = globalThis.TypeError;\nvar parseInt = globalThis.parseInt;\nvar floor = Math.floor;\nvar pow = Math.pow;\nvar fromCharCode = String.fromCharCode;\nvar charAt = uncurryThis(''.charAt);\nvar exec = uncurryThis(/./.exec);\nvar join = uncurryThis([].join);\nvar numberToString = uncurryThis(1.1.toString);\nvar pop = uncurryThis([].pop);\nvar push = uncurryThis([].push);\nvar replace = uncurryThis(''.replace);\nvar shift = uncurryThis([].shift);\nvar split = uncurryThis(''.split);\nvar stringIndexOf = uncurryThis(''.indexOf);\nvar stringSlice = uncurryThis(''.slice);\nvar toLowerCase = uncurryThis(''.toLowerCase);\nvar unshift = uncurryThis([].unshift);\n\nvar INVALID_AUTHORITY = 'Invalid authority';\nvar INVALID_SCHEME = 'Invalid scheme';\nvar INVALID_HOST = 'Invalid host';\nvar INVALID_PORT = 'Invalid port';\n\nvar ALPHA = /[a-z]/i;\nvar ALPHANUMERIC_PLUS_MINUS_DOT = /[\\d+\\-.a-z]/i;\nvar DIGIT = /\\d/;\nvar HEX_START = /^0x/i;\nvar OCT = /^[0-7]+$/;\nvar DEC = /^\\d+$/;\nvar HEX = /^[\\da-f]+$/i;\n/* eslint-disable regexp/no-control-character -- safe */\n// https://url.spec.whatwg.org/#forbidden-domain-code-point\nvar FORBIDDEN_DOMAIN_CODE_POINT = /[\\u0000-\\u0020#%/:<>?@[\\\\\\]^|\\u007F]/;\n// https://url.spec.whatwg.org/#forbidden-host-code-point\nvar FORBIDDEN_HOST_CODE_POINT = /[\\0\\t\\n\\r #/:<>?@[\\\\\\]^|]/;\nvar LEADING_C0_CONTROL_OR_SPACE = /^[\\u0000-\\u0020]+/;\nvar TRAILING_C0_CONTROL_OR_SPACE = /(^|[^\\u0000-\\u0020])[\\u0000-\\u0020]+$/;\nvar TAB_AND_NEW_LINE = /[\\t\\n\\r]/g;\nvar NON_ASCII = /[^\\u0000-\\u007F]/;\n/* eslint-enable regexp/no-control-character -- safe */\n// UTS#46 maps these onto a string containing a forbidden domain code point, so a domain\n// holding one is rejected - listing them is far smaller than shipping the mapping table\nvar MAPPED_ONTO_FORBIDDEN = '\\u00A8\\u00AF\\u00B4\\u00B8\\u02D8\\u02D9\\u02DA\\u02DB\\u02DC\\u02DD\\u037A\\u0384\\u0385\\u1FBD\\u1FBF\\u1FC0'\n  + '\\u1FC1\\u1FCD\\u1FCE\\u1FCF\\u1FDD\\u1FDE\\u1FDF\\u1FED\\u1FEE\\u1FFD\\u1FFE\\u2017\\u203E\\u2047\\u2048\\u2049'\n  + '\\u2100\\u2101\\u2105\\u2106\\u2A74\\u309B\\u309C\\uFC5E\\uFC5F\\uFC60\\uFC61\\uFC62\\uFC63\\uFDFA\\uFDFB\\uFE13'\n  + '\\uFE16\\uFE47\\uFE48\\uFE49\\uFE4A\\uFE4B\\uFE4C\\uFE55\\uFE56\\uFE5F\\uFE64\\uFE65\\uFE68\\uFE6A\\uFE6B\\uFE70'\n  + '\\uFE72\\uFE74\\uFE76\\uFE78\\uFE7A\\uFE7C\\uFE7E\\uFFE3';\n// eslint-disable-next-line no-unassigned-vars -- expected `undefined` value\nvar EOF;\n\n// https://www.unicode.org/reports/tr46/#IDNA_Mapping_Table\nvar isIgnoredCodePoint = function (code) {\n  return code === 0xAD || code === 0x34F || code === 0x200B || code === 0x3164\n    || code === 0xFEFF || code === 0xFFA0\n    || (code >= 0x115F && code <= 0x1160)\n    || (code >= 0x17B4 && code <= 0x17B5)\n    || (code >= 0x180B && code <= 0x180F)\n    || (code >= 0x2060 && code <= 0x2064) || (code >= 0x206A && code <= 0x206F)\n    || (code >= 0xFE00 && code <= 0xFE0F)\n    || (code >= 0xE0100 && code <= 0xE01EF);\n};\n\nvar isDisallowedCodePoint = function (code) {\n  return code === 0xFFFD\n    // lone surrogate - a matched pair is a single code point and never lands here\n    || (code >= 0xD800 && code <= 0xDFFF)\n    // C1 controls\n    || (code >= 0x80 && code <= 0x9F)\n    // line and paragraph separators, bidirectional formatting characters\n    || (code >= 0x200E && code <= 0x200F) || (code >= 0x2028 && code <= 0x2029)\n    || (code >= 0x202A && code <= 0x202E) || (code >= 0x2065 && code <= 0x2069)\n    // noncharacters\n    || (code >= 0xFDD0 && code <= 0xFDEF) || (code & 0xFFFE) === 0xFFFE\n    // private use\n    || (code >= 0xE000 && code <= 0xF8FF) || (code >= 0xF0000 && code <= 0x10FFFD);\n};\n\nvar mapCodePoint = function (code) {\n  // full-width forms\n  if (code >= 0xFF01 && code <= 0xFF5E) return code - 0xFEE0;\n  // spaces and the listed code points collapse onto a forbidden domain code point; a space\n  // stands in for the real mapping since either way the domain is rejected\n  if (code === 0xA0 || code === 0x1680 || code === 0x202F || code === 0x205F || code === 0x3000) return 0x20;\n  if (code >= 0x2000 && code <= 0x200A) return 0x20;\n  // the list holds no supplementary code point, and `fromCharCode` would truncate one\n  if (code <= 0xFFFF && stringIndexOf(MAPPED_ONTO_FORBIDDEN, fromCharCode(code)) > -1) return 0x20;\n  return code;\n};\n\n// https://url.spec.whatwg.org/#concept-domain-to-ascii\n// A subset of UTS#46 processing - the full mapping table is too large to ship. Covered are the\n// entries cheap to express: the ignored and disallowed code points, full-width forms, and the\n// code points mapping onto a forbidden domain code point. Not covered, so such domains are\n// punycoded rather than mapped or rejected: unassigned code points, half-width forms,\n// compatibility decompositions, NFC, CheckJoiners, CheckBidi, and labels that already arrive\n// punycoded - those are not decoded back for validation.\nvar domainToASCII = function (domain) {\n  // every mapped, ignored and disallowed code point is non-ASCII, so an ASCII domain\n  // needs the punycode step only - this keeps the common case off the slow path\n  if (!exec(NON_ASCII, domain)) return domain === '' ? null : toASCII(domain);\n  var codePoints = arrayFrom(domain);\n  var result = '';\n  var index, code, mapped;\n  for (index = 0; index < codePoints.length; index++) {\n    code = codeAt(codePoints[index], 0);\n    if (isDisallowedCodePoint(code)) return null;\n    if (isIgnoredCodePoint(code)) continue;\n    mapped = mapCodePoint(code);\n    result += mapped === code ? codePoints[index] : fromCharCode(mapped);\n  }\n  return result === '' ? null : toASCII(result);\n};\n\n// https://url.spec.whatwg.org/#ends-in-a-number-checker\nvar endsInNumber = function (input) {\n  var parts = split(input, '.');\n  var last, hexPart;\n  if (parts[parts.length - 1] === '') {\n    if (parts.length === 1) return false;\n    parts.length--;\n  }\n  last = parts[parts.length - 1];\n  if (exec(DEC, last)) return true;\n  if (exec(HEX_START, last)) {\n    hexPart = stringSlice(last, 2);\n    return hexPart === '' || !!exec(HEX, hexPart);\n  }\n  return false;\n};\n\n// https://url.spec.whatwg.org/#concept-ipv4-parser\nvar parseIPv4 = function (input) {\n  var parts = split(input, '.');\n  var partsLength, numbers, index, part, radix, number, ipv4;\n  if (parts.length && parts[parts.length - 1] === '') {\n    parts.length--;\n  }\n  partsLength = parts.length;\n  if (partsLength > 4) return null;\n  numbers = [];\n  for (index = 0; index < partsLength; index++) {\n    part = parts[index];\n    if (part === '') return null;\n    radix = 10;\n    if (part.length > 1 && charAt(part, 0) === '0') {\n      radix = exec(HEX_START, part) ? 16 : 8;\n      part = stringSlice(part, radix === 8 ? 1 : 2);\n    }\n    if (part === '') {\n      number = 0;\n    } else {\n      if (!exec(radix === 10 ? DEC : radix === 8 ? OCT : HEX, part)) return null;\n      number = parseInt(part, radix);\n    }\n    push(numbers, number);\n  }\n  for (index = 0; index < partsLength; index++) {\n    number = numbers[index];\n    if (index === partsLength - 1) {\n      if (number >= pow(256, 5 - partsLength)) return null;\n    } else if (number > 255) return null;\n  }\n  ipv4 = pop(numbers);\n  for (index = 0; index < numbers.length; index++) {\n    ipv4 += numbers[index] * pow(256, 3 - index);\n  }\n  return ipv4;\n};\n\n// https://url.spec.whatwg.org/#concept-ipv6-parser\n// eslint-disable-next-line max-statements -- TODO\nvar parseIPv6 = function (input) {\n  var address = [0, 0, 0, 0, 0, 0, 0, 0];\n  var pieceIndex = 0;\n  var compress = null;\n  var pointer = 0;\n  var value, length, numbersSeen, ipv4Piece, number, swaps, swap;\n\n  var chr = function () {\n    return charAt(input, pointer);\n  };\n\n  if (chr() === ':') {\n    if (charAt(input, 1) !== ':') return;\n    pointer += 2;\n    pieceIndex++;\n    compress = pieceIndex;\n  }\n  while (chr()) {\n    if (pieceIndex === 8) return;\n    if (chr() === ':') {\n      if (compress !== null) return;\n      pointer++;\n      pieceIndex++;\n      compress = pieceIndex;\n      continue;\n    }\n    value = length = 0;\n    while (length < 4 && exec(HEX, chr())) {\n      value = value * 16 + parseInt(chr(), 16);\n      pointer++;\n      length++;\n    }\n    if (chr() === '.') {\n      if (length === 0) return;\n      pointer -= length;\n      if (pieceIndex > 6) return;\n      numbersSeen = 0;\n      while (chr()) {\n        ipv4Piece = null;\n        if (numbersSeen > 0) {\n          if (chr() === '.' && numbersSeen < 4) pointer++;\n          else return;\n        }\n        if (!exec(DIGIT, chr())) return;\n        while (exec(DIGIT, chr())) {\n          number = parseInt(chr(), 10);\n          if (ipv4Piece === null) ipv4Piece = number;\n          else if (ipv4Piece === 0) return;\n          else ipv4Piece = ipv4Piece * 10 + number;\n          if (ipv4Piece > 255) return;\n          pointer++;\n        }\n        address[pieceIndex] = address[pieceIndex] * 256 + ipv4Piece;\n        numbersSeen++;\n        if (numbersSeen === 2 || numbersSeen === 4) pieceIndex++;\n      }\n      if (numbersSeen !== 4) return;\n      break;\n    } else if (chr() === ':') {\n      pointer++;\n      if (!chr()) return;\n    } else if (chr()) return;\n    address[pieceIndex++] = value;\n  }\n  if (compress !== null) {\n    swaps = pieceIndex - compress;\n    pieceIndex = 7;\n    while (pieceIndex !== 0 && swaps > 0) {\n      swap = address[pieceIndex];\n      address[pieceIndex--] = address[compress + swaps - 1];\n      address[compress + --swaps] = swap;\n    }\n  } else if (pieceIndex !== 8) return;\n  return address;\n};\n\nvar findLongestZeroSequence = function (ipv6) {\n  var maxIndex = null;\n  var maxLength = 1;\n  var currStart = null;\n  var currLength = 0;\n  var index = 0;\n  for (; index < 8; index++) {\n    if (ipv6[index] !== 0) {\n      if (currLength > maxLength) {\n        maxIndex = currStart;\n        maxLength = currLength;\n      }\n      currStart = null;\n      currLength = 0;\n    } else {\n      if (currStart === null) currStart = index;\n      ++currLength;\n    }\n  }\n  return currLength > maxLength ? currStart : maxIndex;\n};\n\n// https://url.spec.whatwg.org/#host-serializing\nvar serializeHost = function (host) {\n  var result, index, compress, ignore0;\n\n  // ipv4\n  if (typeof host == 'number') {\n    result = [];\n    for (index = 0; index < 4; index++) {\n      unshift(result, host % 256);\n      host = floor(host / 256);\n    }\n    return join(result, '.');\n  }\n\n  // ipv6\n  if (typeof host == 'object') {\n    result = '';\n    compress = findLongestZeroSequence(host);\n    for (index = 0; index < 8; index++) {\n      if (ignore0 && host[index] === 0) continue;\n      if (ignore0) ignore0 = false;\n      if (compress === index) {\n        result += index ? ':' : '::';\n        ignore0 = true;\n      } else {\n        result += numberToString(host[index], 16);\n        if (index < 7) result += ':';\n      }\n    }\n    return '[' + result + ']';\n  }\n\n  return host;\n};\n\n// https://url.spec.whatwg.org/#c0-control-percent-encode-set\n// empty because the set is the code points outside U+0020..U+007E, which the range\n// check below already covers; the sets extending it only add code points inside it\nvar C0ControlPercentEncodeSet = {};\nvar queryPercentEncodeSet = assign({}, C0ControlPercentEncodeSet, {\n  ' ': 1, '\"': 1, '#': 1, '<': 1, '>': 1\n});\nvar specialQueryPercentEncodeSet = assign({}, queryPercentEncodeSet, {\n  \"'\": 1\n});\nvar fragmentPercentEncodeSet = assign({}, C0ControlPercentEncodeSet, {\n  ' ': 1, '\"': 1, '<': 1, '>': 1, '`': 1\n});\nvar pathPercentEncodeSet = assign({}, fragmentPercentEncodeSet, {\n  '#': 1, '?': 1, '{': 1, '}': 1, '^': 1\n});\nvar userinfoPercentEncodeSet = assign({}, pathPercentEncodeSet, {\n  '/': 1, ':': 1, ';': 1, '=': 1, '@': 1, '[': 1, '\\\\': 1, ']': 1, '^': 1, '|': 1\n});\n\n// https://url.spec.whatwg.org/#string-utf-8-percent-encode\nvar utf8PercentEncode = function (chr, set) {\n  var code = codeAt(chr, 0);\n  // percent-encoding leaves ' alone, but it belongs to the special-query percent-encode set\n  return code >= 0x20 && code < 0x7F && !hasOwn(set, chr) ? chr : chr === \"'\" && hasOwn(set, chr) ? '%27' : percentEncode(chr);\n};\n\n// https://url.spec.whatwg.org/#special-scheme\nvar specialSchemes = {\n  ftp: 21,\n  file: null,\n  http: 80,\n  https: 443,\n  ws: 80,\n  wss: 443\n};\n\n// https://url.spec.whatwg.org/#windows-drive-letter\nvar isWindowsDriveLetter = function (string, normalized) {\n  var second;\n  return string.length === 2 && exec(ALPHA, charAt(string, 0))\n    && ((second = charAt(string, 1)) === ':' || (!normalized && second === '|'));\n};\n\n// https://url.spec.whatwg.org/#start-with-a-windows-drive-letter\nvar startsWithWindowsDriveLetter = function (string) {\n  var third;\n  return string.length > 1 && isWindowsDriveLetter(stringSlice(string, 0, 2)) && (\n    string.length === 2 ||\n    ((third = charAt(string, 2)) === '/' || third === '\\\\' || third === '?' || third === '#')\n  );\n};\n\n// https://url.spec.whatwg.org/#single-dot-path-segment\nvar isSingleDot = function (segment) {\n  return segment === '.' || toLowerCase(segment) === '%2e';\n};\n\n// https://url.spec.whatwg.org/#double-dot-path-segment\nvar isDoubleDot = function (segment) {\n  segment = toLowerCase(segment);\n  return segment === '..' || segment === '%2e.' || segment === '.%2e' || segment === '%2e%2e';\n};\n\n// States:\nvar SCHEME_START = {};\nvar SCHEME = {};\nvar NO_SCHEME = {};\nvar SPECIAL_RELATIVE_OR_AUTHORITY = {};\nvar PATH_OR_AUTHORITY = {};\nvar RELATIVE = {};\nvar RELATIVE_SLASH = {};\nvar SPECIAL_AUTHORITY_SLASHES = {};\nvar SPECIAL_AUTHORITY_IGNORE_SLASHES = {};\nvar AUTHORITY = {};\nvar HOST = {};\nvar HOSTNAME = {};\nvar PORT = {};\nvar FILE = {};\nvar FILE_SLASH = {};\nvar FILE_HOST = {};\nvar PATH_START = {};\nvar PATH = {};\nvar CANNOT_BE_A_BASE_URL_PATH = {};\nvar QUERY = {};\nvar FRAGMENT = {};\n\nvar URLState = function (url, isBase, base) {\n  var urlString = $toString(url);\n  var baseState, failure, searchParams;\n  if (isBase) {\n    failure = this.parse(urlString);\n    if (failure) throw new TypeError(failure);\n    this.searchParams = null;\n  } else {\n    if (base !== undefined) baseState = new URLState(base, true);\n    failure = this.parse(urlString, null, baseState);\n    if (failure) throw new TypeError(failure);\n    searchParams = getInternalSearchParamsState(new URLSearchParams());\n    searchParams.bindURL(this);\n    this.searchParams = searchParams;\n  }\n};\n\nURLState.prototype = {\n  type: 'URL',\n  // https://url.spec.whatwg.org/#url-parsing\n  // eslint-disable-next-line max-statements -- TODO\n  parse: function (input, stateOverride, base) {\n    var url = this;\n    var state = stateOverride || SCHEME_START;\n    var pointer = 0;\n    var buffer = '';\n    var seenAt = false;\n    var seenBracket = false;\n    var seenPasswordToken = false;\n    var codePoints, chr, bufferCodePoints, failure;\n\n    input = $toString(input);\n\n    if (!stateOverride) {\n      url.scheme = '';\n      url.username = '';\n      url.password = '';\n      url.host = null;\n      url.port = null;\n      url.path = [];\n      url.query = null;\n      url.fragment = null;\n      url.cannotBeABaseURL = false;\n      input = replace(input, LEADING_C0_CONTROL_OR_SPACE, '');\n      input = replace(input, TRAILING_C0_CONTROL_OR_SPACE, '$1');\n    }\n\n    input = replace(input, TAB_AND_NEW_LINE, '');\n\n    codePoints = arrayFrom(input);\n\n    while (pointer <= codePoints.length) {\n      chr = codePoints[pointer];\n      switch (state) {\n        case SCHEME_START:\n          if (chr && exec(ALPHA, chr)) {\n            buffer += toLowerCase(chr);\n            state = SCHEME;\n          } else if (!stateOverride) {\n            state = NO_SCHEME;\n            continue;\n          } else return INVALID_SCHEME;\n          break;\n\n        case SCHEME:\n          if (chr && exec(ALPHANUMERIC_PLUS_MINUS_DOT, chr)) {\n            buffer += toLowerCase(chr);\n          } else if (chr === ':') {\n            if (stateOverride && (\n              (url.isSpecial() !== hasOwn(specialSchemes, buffer)) ||\n              (buffer === 'file' && (url.includesCredentials() || url.port !== null)) ||\n              (url.scheme === 'file' && url.host === '')\n            )) return;\n            url.scheme = buffer;\n            if (stateOverride) {\n              if (url.isSpecial() && specialSchemes[url.scheme] === url.port) url.port = null;\n              return;\n            }\n            buffer = '';\n            if (url.scheme === 'file') {\n              state = FILE;\n            } else if (url.isSpecial() && base && base.scheme === url.scheme) {\n              state = SPECIAL_RELATIVE_OR_AUTHORITY;\n            } else if (url.isSpecial()) {\n              state = SPECIAL_AUTHORITY_SLASHES;\n            } else if (codePoints[pointer + 1] === '/') {\n              state = PATH_OR_AUTHORITY;\n              pointer++;\n            } else {\n              url.cannotBeABaseURL = true;\n              push(url.path, '');\n              state = CANNOT_BE_A_BASE_URL_PATH;\n            }\n          } else if (!stateOverride) {\n            buffer = '';\n            state = NO_SCHEME;\n            pointer = 0;\n            continue;\n          } else return INVALID_SCHEME;\n          break;\n\n        case NO_SCHEME:\n          if (!base || (base.cannotBeABaseURL && chr !== '#')) return INVALID_SCHEME;\n          if (base.cannotBeABaseURL && chr === '#') {\n            url.scheme = base.scheme;\n            url.path = arraySlice(base.path);\n            url.query = base.query;\n            url.fragment = '';\n            url.cannotBeABaseURL = true;\n            state = FRAGMENT;\n            break;\n          }\n          state = base.scheme === 'file' ? FILE : RELATIVE;\n          continue;\n\n        case SPECIAL_RELATIVE_OR_AUTHORITY:\n          if (chr === '/' && codePoints[pointer + 1] === '/') {\n            state = SPECIAL_AUTHORITY_IGNORE_SLASHES;\n            pointer++;\n          } else {\n            state = RELATIVE;\n            continue;\n          } break;\n\n        case PATH_OR_AUTHORITY:\n          if (chr === '/') {\n            state = AUTHORITY;\n            break;\n          } else {\n            state = PATH;\n            continue;\n          }\n\n        case RELATIVE:\n          url.scheme = base.scheme;\n          if (chr === EOF) {\n            url.username = base.username;\n            url.password = base.password;\n            url.host = base.host;\n            url.port = base.port;\n            url.path = arraySlice(base.path);\n            url.query = base.query;\n          } else if (chr === '/' || (chr === '\\\\' && url.isSpecial())) {\n            state = RELATIVE_SLASH;\n          } else if (chr === '?') {\n            url.username = base.username;\n            url.password = base.password;\n            url.host = base.host;\n            url.port = base.port;\n            url.path = arraySlice(base.path);\n            url.query = '';\n            state = QUERY;\n          } else if (chr === '#') {\n            url.username = base.username;\n            url.password = base.password;\n            url.host = base.host;\n            url.port = base.port;\n            url.path = arraySlice(base.path);\n            url.query = base.query;\n            url.fragment = '';\n            state = FRAGMENT;\n          } else {\n            url.username = base.username;\n            url.password = base.password;\n            url.host = base.host;\n            url.port = base.port;\n            url.path = arraySlice(base.path);\n            if (url.path.length) url.path.length--;\n            state = PATH;\n            continue;\n          } break;\n\n        case RELATIVE_SLASH:\n          if (url.isSpecial() && (chr === '/' || chr === '\\\\')) {\n            state = SPECIAL_AUTHORITY_IGNORE_SLASHES;\n          } else if (chr === '/') {\n            state = AUTHORITY;\n          } else {\n            url.username = base.username;\n            url.password = base.password;\n            url.host = base.host;\n            url.port = base.port;\n            state = PATH;\n            continue;\n          } break;\n\n        case SPECIAL_AUTHORITY_SLASHES:\n          state = SPECIAL_AUTHORITY_IGNORE_SLASHES;\n          if (chr !== '/' || codePoints[pointer + 1] !== '/') continue;\n          pointer++;\n          break;\n\n        case SPECIAL_AUTHORITY_IGNORE_SLASHES:\n          if (chr !== '/' && chr !== '\\\\') {\n            state = AUTHORITY;\n            continue;\n          } break;\n\n        case AUTHORITY:\n          if (chr === '@') {\n            if (seenAt) buffer = '%40' + buffer;\n            seenAt = true;\n            bufferCodePoints = arrayFrom(buffer);\n            for (var i = 0; i < bufferCodePoints.length; i++) {\n              var codePoint = bufferCodePoints[i];\n              if (codePoint === ':' && !seenPasswordToken) {\n                seenPasswordToken = true;\n                continue;\n              }\n              var encodedCodePoints = utf8PercentEncode(codePoint, userinfoPercentEncodeSet);\n              if (seenPasswordToken) url.password += encodedCodePoints;\n              else url.username += encodedCodePoints;\n            }\n            buffer = '';\n          } else if (\n            chr === EOF || chr === '/' || chr === '?' || chr === '#' ||\n            (chr === '\\\\' && url.isSpecial())\n          ) {\n            if (seenAt && buffer === '') return INVALID_AUTHORITY;\n            pointer -= arrayFrom(buffer).length + 1;\n            buffer = '';\n            state = HOST;\n          } else buffer += chr;\n          break;\n\n        case HOST:\n        case HOSTNAME:\n          if (stateOverride && url.scheme === 'file') {\n            state = FILE_HOST;\n            continue;\n          } else if (chr === ':' && !seenBracket) {\n            if (buffer === '') return INVALID_HOST;\n            if (stateOverride === HOSTNAME) return;\n            failure = url.parseHost(buffer);\n            if (failure) return failure;\n            buffer = '';\n            state = PORT;\n          } else if (\n            chr === EOF || chr === '/' || chr === '?' || chr === '#' ||\n            (chr === '\\\\' && url.isSpecial())\n          ) {\n            if (url.isSpecial() && buffer === '') return INVALID_HOST;\n            if (stateOverride && buffer === '' && (url.includesCredentials() || url.port !== null)) return;\n            failure = url.parseHost(buffer);\n            if (failure) return failure;\n            buffer = '';\n            state = PATH_START;\n            if (stateOverride) return;\n            continue;\n          } else {\n            if (chr === '[') seenBracket = true;\n            else if (chr === ']') seenBracket = false;\n            buffer += chr;\n          } break;\n\n        case PORT:\n          if (exec(DIGIT, chr)) {\n            buffer += chr;\n          } else if (\n            chr === EOF || chr === '/' || chr === '?' || chr === '#' ||\n            (chr === '\\\\' && url.isSpecial()) ||\n            stateOverride\n          ) {\n            if (buffer !== '') {\n              var port = parseInt(buffer, 10);\n              if (port > 0xFFFF) return INVALID_PORT;\n              url.port = (url.isSpecial() && port === specialSchemes[url.scheme]) ? null : port;\n              buffer = '';\n            }\n            if (stateOverride) return;\n            state = PATH_START;\n            continue;\n          } else return INVALID_PORT;\n          break;\n\n        case FILE:\n          url.scheme = 'file';\n          url.host = '';\n          if (chr === '/' || chr === '\\\\') state = FILE_SLASH;\n          else if (base && base.scheme === 'file') {\n            switch (chr) {\n              case EOF:\n                url.host = base.host;\n                url.path = arraySlice(base.path);\n                url.query = base.query;\n                break;\n              case '?':\n                url.host = base.host;\n                url.path = arraySlice(base.path);\n                url.query = '';\n                state = QUERY;\n                break;\n              case '#':\n                url.host = base.host;\n                url.path = arraySlice(base.path);\n                url.query = base.query;\n                url.fragment = '';\n                state = FRAGMENT;\n                break;\n              default:\n                url.host = base.host;\n                if (!startsWithWindowsDriveLetter(join(arraySlice(codePoints, pointer), ''))) {\n                  url.path = arraySlice(base.path);\n                  url.shortenPath();\n                }\n                state = PATH;\n                continue;\n            }\n          } else {\n            state = PATH;\n            continue;\n          } break;\n\n        case FILE_SLASH:\n          if (chr === '/' || chr === '\\\\') {\n            state = FILE_HOST;\n            break;\n          }\n          if (base && base.scheme === 'file') {\n            url.host = base.host;\n            if (!startsWithWindowsDriveLetter(join(arraySlice(codePoints, pointer), ''))\n              && isWindowsDriveLetter(base.path[0], true)) push(url.path, base.path[0]);\n          }\n          state = PATH;\n          continue;\n\n        case FILE_HOST:\n          if (chr === EOF || chr === '/' || chr === '\\\\' || chr === '?' || chr === '#') {\n            if (!stateOverride && isWindowsDriveLetter(buffer)) {\n              state = PATH;\n            } else if (buffer === '') {\n              url.host = '';\n              if (stateOverride) return;\n              state = PATH_START;\n            } else {\n              failure = url.parseHost(buffer);\n              if (failure) return failure;\n              if (url.host === 'localhost') url.host = '';\n              if (stateOverride) return;\n              buffer = '';\n              state = PATH_START;\n            } continue;\n          } else buffer += chr;\n          break;\n\n        case PATH_START:\n          if (url.isSpecial()) {\n            state = PATH;\n            if (chr !== '/' && chr !== '\\\\') continue;\n          } else if (!stateOverride && chr === '?') {\n            url.query = '';\n            state = QUERY;\n          } else if (!stateOverride && chr === '#') {\n            url.fragment = '';\n            state = FRAGMENT;\n          } else if (chr !== EOF) {\n            state = PATH;\n            if (chr !== '/') continue;\n          } break;\n\n        case PATH:\n          if (\n            chr === EOF || chr === '/' ||\n            (chr === '\\\\' && url.isSpecial()) ||\n            (!stateOverride && (chr === '?' || chr === '#'))\n          ) {\n            if (isDoubleDot(buffer)) {\n              url.shortenPath();\n              if (chr !== '/' && !(chr === '\\\\' && url.isSpecial())) {\n                push(url.path, '');\n              }\n            } else if (isSingleDot(buffer)) {\n              if (chr !== '/' && !(chr === '\\\\' && url.isSpecial())) {\n                push(url.path, '');\n              }\n            } else {\n              if (url.scheme === 'file' && !url.path.length && isWindowsDriveLetter(buffer)) {\n                // eslint-disable-next-line max-depth -- ok\n                if (url.host !== null && url.host !== '') url.host = '';\n                buffer = charAt(buffer, 0) + ':'; // normalize windows drive letter\n              }\n              push(url.path, buffer);\n            }\n            buffer = '';\n            if (url.scheme === 'file' && (chr === EOF || chr === '?' || chr === '#')) {\n              while (url.path.length > 1 && url.path[0] === '') {\n                shift(url.path);\n              }\n            }\n            if (chr === '?') {\n              url.query = '';\n              state = QUERY;\n            } else if (chr === '#') {\n              url.fragment = '';\n              state = FRAGMENT;\n            }\n          } else {\n            buffer += utf8PercentEncode(chr, pathPercentEncodeSet);\n          } break;\n\n        case CANNOT_BE_A_BASE_URL_PATH:\n          if (chr === '?') {\n            url.query = '';\n            state = QUERY;\n          } else if (chr === '#') {\n            url.fragment = '';\n            state = FRAGMENT;\n          } else if (chr !== EOF) {\n            if (chr === ' ') {\n              url.path[0] += codePoints[pointer + 1] === '?' || codePoints[pointer + 1] === '#' ? '%20' : ' ';\n            } else {\n              url.path[0] += utf8PercentEncode(chr, C0ControlPercentEncodeSet);\n            }\n          } break;\n\n        case QUERY:\n          if (!stateOverride && chr === '#') {\n            url.fragment = '';\n            state = FRAGMENT;\n          } else if (chr !== EOF) {\n            url.query += utf8PercentEncode(chr, url.isSpecial() ? specialQueryPercentEncodeSet : queryPercentEncodeSet);\n          } break;\n\n        case FRAGMENT:\n          if (chr !== EOF) url.fragment += utf8PercentEncode(chr, fragmentPercentEncodeSet);\n          break;\n      }\n\n      pointer++;\n    }\n  },\n  // https://url.spec.whatwg.org/#host-parsing\n  parseHost: function (input) {\n    var result, codePoints, index;\n    if (charAt(input, 0) === '[') {\n      if (charAt(input, input.length - 1) !== ']') return INVALID_HOST;\n      result = parseIPv6(stringSlice(input, 1, -1));\n      if (!result) return INVALID_HOST;\n      this.host = result;\n    // opaque host\n    } else if (!this.isSpecial()) {\n      if (exec(FORBIDDEN_HOST_CODE_POINT, input)) return INVALID_HOST;\n      result = '';\n      codePoints = arrayFrom(input);\n      for (index = 0; index < codePoints.length; index++) {\n        result += utf8PercentEncode(codePoints[index], C0ControlPercentEncodeSet);\n      }\n      this.host = result;\n    } else {\n      input = domainToASCII(percentDecode(input));\n      if (input === null || exec(FORBIDDEN_DOMAIN_CODE_POINT, input)) return INVALID_HOST;\n      if (endsInNumber(input)) {\n        result = parseIPv4(input);\n        if (result === null) return INVALID_HOST;\n        this.host = result;\n      } else {\n        this.host = input;\n      }\n    }\n  },\n  // https://url.spec.whatwg.org/#cannot-have-a-username-password-port\n  cannotHaveUsernamePasswordPort: function () {\n    return this.host === null || this.host === '' || this.cannotBeABaseURL || this.scheme === 'file';\n  },\n  // https://url.spec.whatwg.org/#include-credentials\n  includesCredentials: function () {\n    return this.username !== '' || this.password !== '';\n  },\n  // https://url.spec.whatwg.org/#is-special\n  isSpecial: function () {\n    return hasOwn(specialSchemes, this.scheme);\n  },\n  // https://url.spec.whatwg.org/#shorten-a-urls-path\n  shortenPath: function () {\n    var path = this.path;\n    var pathSize = path.length;\n    if (pathSize && (this.scheme !== 'file' || pathSize !== 1 || !isWindowsDriveLetter(path[0], true))) {\n      path.length--;\n    }\n  },\n  // https://url.spec.whatwg.org/#concept-url-serializer\n  serialize: function () {\n    var url = this;\n    var scheme = url.scheme;\n    var username = url.username;\n    var password = url.password;\n    var host = url.host;\n    var port = url.port;\n    var path = url.path;\n    var query = url.query;\n    var fragment = url.fragment;\n    var output = scheme + ':';\n    if (host !== null) {\n      output += '//';\n      if (url.includesCredentials()) {\n        output += username + (password ? ':' + password : '') + '@';\n      }\n      output += serializeHost(host);\n      if (port !== null) output += ':' + port;\n    } else if (scheme === 'file') output += '//';\n    if (host === null && !url.cannotBeABaseURL && path.length > 1 && path[0] === '') output += '/.';\n    output += url.cannotBeABaseURL ? path[0] : path.length ? '/' + join(path, '/') : '';\n    if (query !== null) output += '?' + query;\n    if (fragment !== null) output += '#' + fragment;\n    return output;\n  },\n  // https://url.spec.whatwg.org/#dom-url-href\n  setHref: function (href) {\n    var failure = this.parse(href);\n    if (failure) throw new TypeError(failure);\n    this.searchParams.update();\n  },\n  // https://url.spec.whatwg.org/#dom-url-origin\n  getOrigin: function () {\n    var scheme = this.scheme;\n    var port = this.port;\n    if (scheme === 'blob') try {\n      return new URLConstructor(this.path[0]).origin;\n    } catch (error) {\n      return 'null';\n    }\n    if (scheme === 'file' || !this.isSpecial()) return 'null';\n    return scheme + '://' + serializeHost(this.host) + (port !== null ? ':' + port : '');\n  },\n  // https://url.spec.whatwg.org/#dom-url-protocol\n  getProtocol: function () {\n    return this.scheme + ':';\n  },\n  setProtocol: function (protocol) {\n    this.parse($toString(protocol) + ':', SCHEME_START);\n  },\n  // https://url.spec.whatwg.org/#dom-url-username\n  getUsername: function () {\n    return this.username;\n  },\n  setUsername: function (username) {\n    var codePoints = arrayFrom($toString(username));\n    if (this.cannotHaveUsernamePasswordPort()) return;\n    this.username = '';\n    for (var i = 0; i < codePoints.length; i++) {\n      this.username += utf8PercentEncode(codePoints[i], userinfoPercentEncodeSet);\n    }\n  },\n  // https://url.spec.whatwg.org/#dom-url-password\n  getPassword: function () {\n    return this.password;\n  },\n  setPassword: function (password) {\n    var codePoints = arrayFrom($toString(password));\n    if (this.cannotHaveUsernamePasswordPort()) return;\n    this.password = '';\n    for (var i = 0; i < codePoints.length; i++) {\n      this.password += utf8PercentEncode(codePoints[i], userinfoPercentEncodeSet);\n    }\n  },\n  // https://url.spec.whatwg.org/#dom-url-host\n  getHost: function () {\n    var host = this.host;\n    var port = this.port;\n    return host === null ? ''\n      : port === null ? serializeHost(host)\n      : serializeHost(host) + ':' + port;\n  },\n  setHost: function (host) {\n    if (this.cannotBeABaseURL) return;\n    this.parse(host, HOST);\n  },\n  // https://url.spec.whatwg.org/#dom-url-hostname\n  getHostname: function () {\n    var host = this.host;\n    return host === null ? '' : serializeHost(host);\n  },\n  setHostname: function (hostname) {\n    if (this.cannotBeABaseURL) return;\n    this.parse(hostname, HOSTNAME);\n  },\n  // https://url.spec.whatwg.org/#dom-url-port\n  getPort: function () {\n    var port = this.port;\n    return port === null ? '' : $toString(port);\n  },\n  setPort: function (port) {\n    if (this.cannotHaveUsernamePasswordPort()) return;\n    port = $toString(port);\n    if (port === '') this.port = null;\n    else this.parse(port, PORT);\n  },\n  // https://url.spec.whatwg.org/#dom-url-pathname\n  getPathname: function () {\n    var path = this.path;\n    return this.cannotBeABaseURL ? path[0] : path.length ? '/' + join(path, '/') : '';\n  },\n  setPathname: function (pathname) {\n    if (this.cannotBeABaseURL) return;\n    this.path = [];\n    this.parse(pathname, PATH_START);\n  },\n  // https://url.spec.whatwg.org/#dom-url-search\n  getSearch: function () {\n    var query = this.query;\n    return query ? '?' + query : '';\n  },\n  setSearch: function (search) {\n    search = $toString(search);\n    if (search === '') {\n      this.query = null;\n    } else {\n      if (charAt(search, 0) === '?') search = stringSlice(search, 1);\n      this.query = '';\n      this.parse(search, QUERY);\n    }\n    this.searchParams.update();\n  },\n  // https://url.spec.whatwg.org/#dom-url-searchparams\n  getSearchParams: function () {\n    return this.searchParams.facade;\n  },\n  // https://url.spec.whatwg.org/#dom-url-hash\n  getHash: function () {\n    var fragment = this.fragment;\n    return fragment ? '#' + fragment : '';\n  },\n  setHash: function (hash) {\n    hash = $toString(hash);\n    if (hash === '') {\n      this.fragment = null;\n      return;\n    }\n    if (charAt(hash, 0) === '#') hash = stringSlice(hash, 1);\n    this.fragment = '';\n    this.parse(hash, FRAGMENT);\n  },\n  update: function () {\n    this.query = this.searchParams.serialize() || null;\n  }\n};\n\n// `URL` constructor\n// https://url.spec.whatwg.org/#url-class\nvar URLConstructor = function URL(url /* , base */) {\n  var that = anInstance(this, URLPrototype);\n  var base = validateArgumentsLength(arguments.length, 1) > 1 ? arguments[1] : undefined;\n  var state = setInternalState(that, new URLState(url, false, base));\n  if (!DESCRIPTORS) {\n    that.href = state.serialize();\n    that.origin = state.getOrigin();\n    that.protocol = state.getProtocol();\n    that.username = state.getUsername();\n    that.password = state.getPassword();\n    that.host = state.getHost();\n    that.hostname = state.getHostname();\n    that.port = state.getPort();\n    that.pathname = state.getPathname();\n    that.search = state.getSearch();\n    that.searchParams = state.getSearchParams();\n    that.hash = state.getHash();\n  }\n};\n\nvar URLPrototype = URLConstructor.prototype;\n\nvar accessorDescriptor = function (getter, setter) {\n  return {\n    get: function () {\n      return getInternalURLState(this)[getter]();\n    },\n    set: setter && function (value) {\n      return getInternalURLState(this)[setter](value);\n    },\n    configurable: true,\n    enumerable: true\n  };\n};\n\nif (DESCRIPTORS) {\n  // `URL.prototype.href` accessors pair\n  // https://url.spec.whatwg.org/#dom-url-href\n  defineBuiltInAccessor(URLPrototype, 'href', accessorDescriptor('serialize', 'setHref'));\n  // `URL.prototype.origin` getter\n  // https://url.spec.whatwg.org/#dom-url-origin\n  defineBuiltInAccessor(URLPrototype, 'origin', accessorDescriptor('getOrigin'));\n  // `URL.prototype.protocol` accessors pair\n  // https://url.spec.whatwg.org/#dom-url-protocol\n  defineBuiltInAccessor(URLPrototype, 'protocol', accessorDescriptor('getProtocol', 'setProtocol'));\n  // `URL.prototype.username` accessors pair\n  // https://url.spec.whatwg.org/#dom-url-username\n  defineBuiltInAccessor(URLPrototype, 'username', accessorDescriptor('getUsername', 'setUsername'));\n  // `URL.prototype.password` accessors pair\n  // https://url.spec.whatwg.org/#dom-url-password\n  defineBuiltInAccessor(URLPrototype, 'password', accessorDescriptor('getPassword', 'setPassword'));\n  // `URL.prototype.host` accessors pair\n  // https://url.spec.whatwg.org/#dom-url-host\n  defineBuiltInAccessor(URLPrototype, 'host', accessorDescriptor('getHost', 'setHost'));\n  // `URL.prototype.hostname` accessors pair\n  // https://url.spec.whatwg.org/#dom-url-hostname\n  defineBuiltInAccessor(URLPrototype, 'hostname', accessorDescriptor('getHostname', 'setHostname'));\n  // `URL.prototype.port` accessors pair\n  // https://url.spec.whatwg.org/#dom-url-port\n  defineBuiltInAccessor(URLPrototype, 'port', accessorDescriptor('getPort', 'setPort'));\n  // `URL.prototype.pathname` accessors pair\n  // https://url.spec.whatwg.org/#dom-url-pathname\n  defineBuiltInAccessor(URLPrototype, 'pathname', accessorDescriptor('getPathname', 'setPathname'));\n  // `URL.prototype.search` accessors pair\n  // https://url.spec.whatwg.org/#dom-url-search\n  defineBuiltInAccessor(URLPrototype, 'search', accessorDescriptor('getSearch', 'setSearch'));\n  // `URL.prototype.searchParams` getter\n  // https://url.spec.whatwg.org/#dom-url-searchparams\n  defineBuiltInAccessor(URLPrototype, 'searchParams', accessorDescriptor('getSearchParams'));\n  // `URL.prototype.hash` accessors pair\n  // https://url.spec.whatwg.org/#dom-url-hash\n  defineBuiltInAccessor(URLPrototype, 'hash', accessorDescriptor('getHash', 'setHash'));\n}\n\n// `URL.prototype.toJSON` method\n// https://url.spec.whatwg.org/#dom-url-tojson\ndefineBuiltIn(URLPrototype, 'toJSON', function toJSON() {\n  return getInternalURLState(this).serialize();\n}, { enumerable: true });\n\n// `URL.prototype.toString` method\n// https://url.spec.whatwg.org/#URL-stringification-behavior\ndefineBuiltIn(URLPrototype, 'toString', function toString() {\n  return getInternalURLState(this).serialize();\n}, { enumerable: true });\n\nif (NativeURL) {\n  var nativeCreateObjectURL = NativeURL.createObjectURL;\n  var nativeRevokeObjectURL = NativeURL.revokeObjectURL;\n  // `URL.createObjectURL` method\n  // https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL\n  if (nativeCreateObjectURL) defineBuiltIn(URLConstructor, 'createObjectURL', bind(nativeCreateObjectURL, NativeURL));\n  // `URL.revokeObjectURL` method\n  // https://developer.mozilla.org/en-US/docs/Web/API/URL/revokeObjectURL\n  if (nativeRevokeObjectURL) defineBuiltIn(URLConstructor, 'revokeObjectURL', bind(nativeRevokeObjectURL, NativeURL));\n}\n\nsetToStringTag(URLConstructor, 'URL');\n\n$({ global: true, constructor: true, forced: !USE_NATIVE_URL, sham: !DESCRIPTORS }, {\n  URL: URLConstructor\n});\n", "'use strict';\n// TODO: Remove this module from `core-js@4` since it's replaced to module below\nrequire('../modules/web.url.constructor');\n", "'use strict';\nvar $ = require('../internals/export');\nvar getBuiltIn = require('../internals/get-built-in');\nvar fails = require('../internals/fails');\nvar validateArgumentsLength = require('../internals/validate-arguments-length');\nvar toString = require('../internals/to-string');\nvar USE_NATIVE_URL = require('../internals/url-constructor-detection');\n\nvar URL = getBuiltIn('URL');\n\n// https://github.com/nodejs/node/issues/47505\n// https://github.com/denoland/deno/issues/18893\nvar THROWS_WITHOUT_ARGUMENTS = USE_NATIVE_URL && fails(function () {\n  URL.canParse();\n});\n\n// Bun ~ 1.0.30 bug\n// https://github.com/oven-sh/bun/issues/9250\nvar WRONG_ARITY = fails(function () {\n  return URL.canParse.length !== 1;\n});\n\n// `URL.canParse` method\n// https://url.spec.whatwg.org/#dom-url-canparse\n$({ target: 'URL', stat: true, forced: !THROWS_WITHOUT_ARGUMENTS || WRONG_ARITY }, {\n  canParse: function canParse(url) {\n    var length = validateArgumentsLength(arguments.length, 1);\n    var urlString = toString(url);\n    var base = length < 2 || arguments[1] === undefined ? undefined : toString(arguments[1]);\n    try {\n      return !!new URL(urlString, base);\n    } catch (error) {\n      return false;\n    }\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar getBuiltIn = require('../internals/get-built-in');\nvar validateArgumentsLength = require('../internals/validate-arguments-length');\nvar toString = require('../internals/to-string');\nvar USE_NATIVE_URL = require('../internals/url-constructor-detection');\n\nvar URL = getBuiltIn('URL');\n\n// `URL.parse` method\n// https://url.spec.whatwg.org/#dom-url-parse\n$({ target: 'URL', stat: true, forced: !USE_NATIVE_URL }, {\n  parse: function parse(url) {\n    var length = validateArgumentsLength(arguments.length, 1);\n    var urlString = toString(url);\n    var base = length < 2 || arguments[1] === undefined ? undefined : toString(arguments[1]);\n    try {\n      return new URL(urlString, base);\n    } catch (error) {\n      return null;\n    }\n  }\n});\n", "'use strict';\nvar $ = require('../internals/export');\nvar call = require('../internals/function-call');\nvar getBuiltInPrototypeMethod = require('../internals/get-built-in-prototype-method');\n\nvar toString = getBuiltInPrototypeMethod('URL', 'toString');\n\n// `URL.prototype.toJSON` method\n// https://url.spec.whatwg.org/#dom-url-tojson\n$({ target: 'URL', proto: true, enumerable: true }, {\n  toJSON: function toJSON() {\n    return call(toString, this);\n  }\n});\n", "'use strict';\n// TODO: Remove this module from `core-js@4` since it's replaced to module below\nrequire('../modules/web.url-search-params.constructor');\n", "'use strict';\nvar defineBuiltIn = require('../internals/define-built-in');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar toString = require('../internals/to-string');\nvar validateArgumentsLength = require('../internals/validate-arguments-length');\n\nvar $URLSearchParams = URLSearchParams;\nvar URLSearchParamsPrototype = $URLSearchParams.prototype;\nvar append = uncurryThis(URLSearchParamsPrototype.append);\nvar $delete = uncurryThis(URLSearchParamsPrototype['delete']);\nvar forEach = uncurryThis(URLSearchParamsPrototype.forEach);\nvar push = uncurryThis([].push);\nvar params = new $URLSearchParams('a=1&a=2&b=3');\n\nparams['delete']('a', 1);\n// `undefined` case is a Chromium 117 bug\n// https://bugs.chromium.org/p/v8/issues/detail?id=14222\nparams['delete']('b', undefined);\n\nif (params + '' !== 'a=2') {\n  defineBuiltIn(URLSearchParamsPrototype, 'delete', function (name /* , value */) {\n    var length = arguments.length;\n    var $value = length < 2 ? undefined : arguments[1];\n    if (length && $value === undefined) return $delete(this, name);\n    var entries = [];\n    forEach(this, function (v, k) { // also validates `this`\n      push(entries, { key: k, value: v });\n    });\n    validateArgumentsLength(length, 1);\n    var key = toString(name);\n    var value = toString($value);\n    var index = 0;\n    var entriesLength = entries.length;\n    var entry;\n    while (index < entriesLength) {\n      entry = entries[index];\n      $delete(this, entry.key);\n      index++;\n    }\n    index = 0;\n    while (index < entriesLength) {\n      entry = entries[index++];\n      if (!(entry.key === key && entry.value === value)) append(this, entry.key, entry.value);\n    }\n  }, { enumerable: true, unsafe: true });\n}\n", "'use strict';\nvar defineBuiltIn = require('../internals/define-built-in');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar toString = require('../internals/to-string');\nvar validateArgumentsLength = require('../internals/validate-arguments-length');\n\nvar $URLSearchParams = URLSearchParams;\nvar URLSearchParamsPrototype = $URLSearchParams.prototype;\nvar getAll = uncurryThis(URLSearchParamsPrototype.getAll);\nvar $has = uncurryThis(URLSearchParamsPrototype.has);\nvar params = new $URLSearchParams('a=1');\n\n// `undefined` case is a Chromium 117 bug\n// https://bugs.chromium.org/p/v8/issues/detail?id=14222\nif (params.has('a', 2) || !params.has('a', undefined)) {\n  defineBuiltIn(URLSearchParamsPrototype, 'has', function has(name /* , value */) {\n    var length = arguments.length;\n    var $value = length < 2 ? undefined : arguments[1];\n    if (length && $value === undefined) return $has(this, name);\n    var values = getAll(this, name); // also validates `this`\n    validateArgumentsLength(length, 1);\n    var value = toString($value);\n    var index = 0;\n    while (index < values.length) {\n      if (values[index++] === value) return true;\n    } return false;\n  }, { enumerable: true, unsafe: true });\n}\n", "'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar defineBuiltInAccessor = require('../internals/define-built-in-accessor');\n\nvar URLSearchParamsPrototype = URLSearchParams.prototype;\nvar forEach = uncurryThis(URLSearchParamsPrototype.forEach);\n\n// `URLSearchParams.prototype.size` getter\n// https://github.com/whatwg/url/pull/734\nif (DESCRIPTORS && !('size' in URLSearchParamsPrototype)) {\n  defineBuiltInAccessor(URLSearchParamsPrototype, 'size', {\n    get: function size() {\n      var count = 0;\n      forEach(this, function () { count++; });\n      return count;\n    },\n    configurable: true,\n    enumerable: true\n  });\n}\n", "'use strict';\nrequire('../modules/es.symbol');\nrequire('../modules/es.symbol.description');\nrequire('../modules/es.symbol.async-dispose');\nrequire('../modules/es.symbol.async-iterator');\nrequire('../modules/es.symbol.dispose');\nrequire('../modules/es.symbol.has-instance');\nrequire('../modules/es.symbol.is-concat-spreadable');\nrequire('../modules/es.symbol.iterator');\nrequire('../modules/es.symbol.match');\nrequire('../modules/es.symbol.match-all');\nrequire('../modules/es.symbol.replace');\nrequire('../modules/es.symbol.search');\nrequire('../modules/es.symbol.species');\nrequire('../modules/es.symbol.split');\nrequire('../modules/es.symbol.to-primitive');\nrequire('../modules/es.symbol.to-string-tag');\nrequire('../modules/es.symbol.unscopables');\nrequire('../modules/es.error.cause');\nrequire('../modules/es.error.is-error');\nrequire('../modules/es.error.to-string');\nrequire('../modules/es.aggregate-error');\nrequire('../modules/es.aggregate-error.cause');\nrequire('../modules/es.suppressed-error.constructor');\nrequire('../modules/es.array.at');\nrequire('../modules/es.array.concat');\nrequire('../modules/es.array.copy-within');\nrequire('../modules/es.array.every');\nrequire('../modules/es.array.fill');\nrequire('../modules/es.array.filter');\nrequire('../modules/es.array.find');\nrequire('../modules/es.array.find-index');\nrequire('../modules/es.array.find-last');\nrequire('../modules/es.array.find-last-index');\nrequire('../modules/es.array.flat');\nrequire('../modules/es.array.flat-map');\nrequire('../modules/es.array.for-each');\nrequire('../modules/es.array.from');\nrequire('../modules/es.array.includes');\nrequire('../modules/es.array.index-of');\nrequire('../modules/es.array.is-array');\nrequire('../modules/es.array.iterator');\nrequire('../modules/es.array.join');\nrequire('../modules/es.array.last-index-of');\nrequire('../modules/es.array.map');\nrequire('../modules/es.array.of');\nrequire('../modules/es.array.push');\nrequire('../modules/es.array.reduce');\nrequire('../modules/es.array.reduce-right');\nrequire('../modules/es.array.reverse');\nrequire('../modules/es.array.slice');\nrequire('../modules/es.array.some');\nrequire('../modules/es.array.sort');\nrequire('../modules/es.array.species');\nrequire('../modules/es.array.splice');\nrequire('../modules/es.array.to-reversed');\nrequire('../modules/es.array.to-sorted');\nrequire('../modules/es.array.to-spliced');\nrequire('../modules/es.array.unscopables.flat');\nrequire('../modules/es.array.unscopables.flat-map');\nrequire('../modules/es.array.unshift');\nrequire('../modules/es.array.with');\nrequire('../modules/es.array-buffer.constructor');\nrequire('../modules/es.array-buffer.is-view');\nrequire('../modules/es.array-buffer.slice');\nrequire('../modules/es.data-view');\nrequire('../modules/es.data-view.get-float16');\nrequire('../modules/es.data-view.set-float16');\nrequire('../modules/es.array-buffer.detached');\nrequire('../modules/es.array-buffer.transfer');\nrequire('../modules/es.array-buffer.transfer-to-fixed-length');\nrequire('../modules/es.date.get-year');\nrequire('../modules/es.date.now');\nrequire('../modules/es.date.set-year');\nrequire('../modules/es.date.to-gmt-string');\nrequire('../modules/es.date.to-iso-string');\nrequire('../modules/es.date.to-json');\nrequire('../modules/es.date.to-primitive');\nrequire('../modules/es.date.to-string');\nrequire('../modules/es.disposable-stack.constructor');\nrequire('../modules/es.escape');\nrequire('../modules/es.function.bind');\nrequire('../modules/es.function.has-instance');\nrequire('../modules/es.function.name');\nrequire('../modules/es.global-this');\nrequire('../modules/es.iterator.constructor');\nrequire('../modules/es.iterator.concat');\nrequire('../modules/es.iterator.dispose');\nrequire('../modules/es.iterator.drop');\nrequire('../modules/es.iterator.every');\nrequire('../modules/es.iterator.filter');\nrequire('../modules/es.iterator.find');\nrequire('../modules/es.iterator.flat-map');\nrequire('../modules/es.iterator.for-each');\nrequire('../modules/es.iterator.from');\nrequire('../modules/es.iterator.map');\nrequire('../modules/es.iterator.reduce');\nrequire('../modules/es.iterator.some');\nrequire('../modules/es.iterator.take');\nrequire('../modules/es.iterator.to-array');\nrequire('../modules/es.iterator.zip');\nrequire('../modules/es.iterator.zip-keyed');\nrequire('../modules/es.json.is-raw-json');\nrequire('../modules/es.json.parse');\nrequire('../modules/es.json.raw-json');\nrequire('../modules/es.json.stringify');\nrequire('../modules/es.json.to-string-tag');\nrequire('../modules/es.map');\nrequire('../modules/es.map.group-by');\nrequire('../modules/es.map.get-or-insert');\nrequire('../modules/es.map.get-or-insert-computed');\nrequire('../modules/es.math.acosh');\nrequire('../modules/es.math.asinh');\nrequire('../modules/es.math.atanh');\nrequire('../modules/es.math.cbrt');\nrequire('../modules/es.math.clz32');\nrequire('../modules/es.math.cosh');\nrequire('../modules/es.math.expm1');\nrequire('../modules/es.math.fround');\nrequire('../modules/es.math.f16round');\nrequire('../modules/es.math.hypot');\nrequire('../modules/es.math.imul');\nrequire('../modules/es.math.log10');\nrequire('../modules/es.math.log1p');\nrequire('../modules/es.math.log2');\nrequire('../modules/es.math.sign');\nrequire('../modules/es.math.sinh');\nrequire('../modules/es.math.sum-precise');\nrequire('../modules/es.math.tanh');\nrequire('../modules/es.math.to-string-tag');\nrequire('../modules/es.math.trunc');\nrequire('../modules/es.number.constructor');\nrequire('../modules/es.number.epsilon');\nrequire('../modules/es.number.is-finite');\nrequire('../modules/es.number.is-integer');\nrequire('../modules/es.number.is-nan');\nrequire('../modules/es.number.is-safe-integer');\nrequire('../modules/es.number.max-safe-integer');\nrequire('../modules/es.number.min-safe-integer');\nrequire('../modules/es.number.parse-float');\nrequire('../modules/es.number.parse-int');\nrequire('../modules/es.number.to-exponential');\nrequire('../modules/es.number.to-fixed');\nrequire('../modules/es.number.to-precision');\nrequire('../modules/es.object.assign');\nrequire('../modules/es.object.create');\nrequire('../modules/es.object.define-getter');\nrequire('../modules/es.object.define-properties');\nrequire('../modules/es.object.define-property');\nrequire('../modules/es.object.define-setter');\nrequire('../modules/es.object.entries');\nrequire('../modules/es.object.freeze');\nrequire('../modules/es.object.from-entries');\nrequire('../modules/es.object.get-own-property-descriptor');\nrequire('../modules/es.object.get-own-property-descriptors');\nrequire('../modules/es.object.get-own-property-names');\nrequire('../modules/es.object.get-prototype-of');\nrequire('../modules/es.object.group-by');\nrequire('../modules/es.object.has-own');\nrequire('../modules/es.object.is');\nrequire('../modules/es.object.is-extensible');\nrequire('../modules/es.object.is-frozen');\nrequire('../modules/es.object.is-sealed');\nrequire('../modules/es.object.keys');\nrequire('../modules/es.object.lookup-getter');\nrequire('../modules/es.object.lookup-setter');\nrequire('../modules/es.object.prevent-extensions');\nrequire('../modules/es.object.proto');\nrequire('../modules/es.object.seal');\nrequire('../modules/es.object.set-prototype-of');\nrequire('../modules/es.object.to-string');\nrequire('../modules/es.object.values');\nrequire('../modules/es.parse-float');\nrequire('../modules/es.parse-int');\nrequire('../modules/es.promise');\nrequire('../modules/es.promise.all-settled');\nrequire('../modules/es.promise.any');\nrequire('../modules/es.promise.finally');\nrequire('../modules/es.promise.try');\nrequire('../modules/es.promise.with-resolvers');\nrequire('../modules/es.array.from-async');\nrequire('../modules/es.async-disposable-stack.constructor');\nrequire('../modules/es.async-iterator.async-dispose');\nrequire('../modules/es.reflect.apply');\nrequire('../modules/es.reflect.construct');\nrequire('../modules/es.reflect.define-property');\nrequire('../modules/es.reflect.delete-property');\nrequire('../modules/es.reflect.get');\nrequire('../modules/es.reflect.get-own-property-descriptor');\nrequire('../modules/es.reflect.get-prototype-of');\nrequire('../modules/es.reflect.has');\nrequire('../modules/es.reflect.is-extensible');\nrequire('../modules/es.reflect.own-keys');\nrequire('../modules/es.reflect.prevent-extensions');\nrequire('../modules/es.reflect.set');\nrequire('../modules/es.reflect.set-prototype-of');\nrequire('../modules/es.reflect.to-string-tag');\nrequire('../modules/es.regexp.constructor');\nrequire('../modules/es.regexp.escape');\nrequire('../modules/es.regexp.dot-all');\nrequire('../modules/es.regexp.exec');\nrequire('../modules/es.regexp.flags');\nrequire('../modules/es.regexp.sticky');\nrequire('../modules/es.regexp.test');\nrequire('../modules/es.regexp.to-string');\nrequire('../modules/es.set');\nrequire('../modules/es.set.difference.v2');\nrequire('../modules/es.set.intersection.v2');\nrequire('../modules/es.set.is-disjoint-from.v2');\nrequire('../modules/es.set.is-subset-of.v2');\nrequire('../modules/es.set.is-superset-of.v2');\nrequire('../modules/es.set.symmetric-difference.v2');\nrequire('../modules/es.set.union.v2');\nrequire('../modules/es.string.at-alternative');\nrequire('../modules/es.string.code-point-at');\nrequire('../modules/es.string.ends-with');\nrequire('../modules/es.string.from-code-point');\nrequire('../modules/es.string.includes');\nrequire('../modules/es.string.is-well-formed');\nrequire('../modules/es.string.iterator');\nrequire('../modules/es.string.match');\nrequire('../modules/es.string.match-all');\nrequire('../modules/es.string.pad-end');\nrequire('../modules/es.string.pad-start');\nrequire('../modules/es.string.raw');\nrequire('../modules/es.string.repeat');\nrequire('../modules/es.string.replace');\nrequire('../modules/es.string.replace-all');\nrequire('../modules/es.string.search');\nrequire('../modules/es.string.split');\nrequire('../modules/es.string.starts-with');\nrequire('../modules/es.string.substr');\nrequire('../modules/es.string.to-well-formed');\nrequire('../modules/es.string.trim');\nrequire('../modules/es.string.trim-end');\nrequire('../modules/es.string.trim-start');\nrequire('../modules/es.string.anchor');\nrequire('../modules/es.string.big');\nrequire('../modules/es.string.blink');\nrequire('../modules/es.string.bold');\nrequire('../modules/es.string.fixed');\nrequire('../modules/es.string.fontcolor');\nrequire('../modules/es.string.fontsize');\nrequire('../modules/es.string.italics');\nrequire('../modules/es.string.link');\nrequire('../modules/es.string.small');\nrequire('../modules/es.string.strike');\nrequire('../modules/es.string.sub');\nrequire('../modules/es.string.sup');\nrequire('../modules/es.typed-array.float32-array');\nrequire('../modules/es.typed-array.float64-array');\nrequire('../modules/es.typed-array.int8-array');\nrequire('../modules/es.typed-array.int16-array');\nrequire('../modules/es.typed-array.int32-array');\nrequire('../modules/es.typed-array.uint8-array');\nrequire('../modules/es.typed-array.uint8-clamped-array');\nrequire('../modules/es.typed-array.uint16-array');\nrequire('../modules/es.typed-array.uint32-array');\nrequire('../modules/es.typed-array.at');\nrequire('../modules/es.typed-array.copy-within');\nrequire('../modules/es.typed-array.every');\nrequire('../modules/es.typed-array.fill');\nrequire('../modules/es.typed-array.filter');\nrequire('../modules/es.typed-array.find');\nrequire('../modules/es.typed-array.find-index');\nrequire('../modules/es.typed-array.find-last');\nrequire('../modules/es.typed-array.find-last-index');\nrequire('../modules/es.typed-array.for-each');\nrequire('../modules/es.typed-array.from');\nrequire('../modules/es.typed-array.includes');\nrequire('../modules/es.typed-array.index-of');\nrequire('../modules/es.typed-array.iterator');\nrequire('../modules/es.typed-array.join');\nrequire('../modules/es.typed-array.last-index-of');\nrequire('../modules/es.typed-array.map');\nrequire('../modules/es.typed-array.of');\nrequire('../modules/es.typed-array.reduce');\nrequire('../modules/es.typed-array.reduce-right');\nrequire('../modules/es.typed-array.reverse');\nrequire('../modules/es.typed-array.set');\nrequire('../modules/es.typed-array.slice');\nrequire('../modules/es.typed-array.some');\nrequire('../modules/es.typed-array.sort');\nrequire('../modules/es.typed-array.subarray');\nrequire('../modules/es.typed-array.to-locale-string');\nrequire('../modules/es.typed-array.to-reversed');\nrequire('../modules/es.typed-array.to-sorted');\nrequire('../modules/es.typed-array.to-string');\nrequire('../modules/es.typed-array.with');\nrequire('../modules/es.uint8-array.from-base64');\nrequire('../modules/es.uint8-array.from-hex');\nrequire('../modules/es.uint8-array.set-from-base64');\nrequire('../modules/es.uint8-array.set-from-hex');\nrequire('../modules/es.uint8-array.to-base64');\nrequire('../modules/es.uint8-array.to-hex');\nrequire('../modules/es.unescape');\nrequire('../modules/es.weak-map');\nrequire('../modules/es.weak-map.get-or-insert');\nrequire('../modules/es.weak-map.get-or-insert-computed');\nrequire('../modules/es.weak-set');\nrequire('../modules/web.atob');\nrequire('../modules/web.btoa');\nrequire('../modules/web.dom-collections.for-each');\nrequire('../modules/web.dom-collections.iterator');\nrequire('../modules/web.dom-exception.constructor');\nrequire('../modules/web.dom-exception.stack');\nrequire('../modules/web.dom-exception.to-string-tag');\nrequire('../modules/web.immediate');\nrequire('../modules/web.queue-microtask');\nrequire('../modules/web.self');\nrequire('../modules/web.structured-clone');\nrequire('../modules/web.timers');\nrequire('../modules/web.url');\nrequire('../modules/web.url.can-parse');\nrequire('../modules/web.url.parse');\nrequire('../modules/web.url.to-json');\nrequire('../modules/web.url-search-params');\nrequire('../modules/web.url-search-params.delete');\nrequire('../modules/web.url-search-params.has');\nrequire('../modules/web.url-search-params.size');\n\nmodule.exports = require('../internals/path');\n", "/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n  \"use strict\";\n\n  var Op = Object.prototype;\n  var hasOwn = Op.hasOwnProperty;\n  var defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; };\n  var undefined; // More compressible than void 0.\n  var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n  var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n  var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n  var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n  function define(obj, key, value) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n    return obj[key];\n  }\n  try {\n    // IE 8 has a broken Object.defineProperty that only works on DOM objects.\n    define({}, \"\");\n  } catch (err) {\n    define = function(obj, key, value) {\n      return obj[key] = value;\n    };\n  }\n\n  function wrap(innerFn, outerFn, self, tryLocsList) {\n    // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n    var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n    var generator = Object.create(protoGenerator.prototype);\n    var context = new Context(tryLocsList || []);\n\n    // The ._invoke method unifies the implementations of the .next,\n    // .throw, and .return methods.\n    defineProperty(generator, \"_invoke\", { value: makeInvokeMethod(innerFn, self, context) });\n\n    return generator;\n  }\n  exports.wrap = wrap;\n\n  // Try/catch helper to minimize deoptimizations. Returns a completion\n  // record like context.tryEntries[i].completion. This interface could\n  // have been (and was previously) designed to take a closure to be\n  // invoked without arguments, but in all the cases we care about we\n  // already have an existing method we want to call, so there's no need\n  // to create a new function object. We can even get away with assuming\n  // the method takes exactly one argument, since that happens to be true\n  // in every case, so we don't have to touch the arguments object. The\n  // only additional allocation required is the completion record, which\n  // has a stable shape and so hopefully should be cheap to allocate.\n  function tryCatch(fn, obj, arg) {\n    try {\n      return { type: \"normal\", arg: fn.call(obj, arg) };\n    } catch (err) {\n      return { type: \"throw\", arg: err };\n    }\n  }\n\n  var GenStateSuspendedStart = \"suspendedStart\";\n  var GenStateSuspendedYield = \"suspendedYield\";\n  var GenStateExecuting = \"executing\";\n  var GenStateCompleted = \"completed\";\n\n  // Returning this object from the innerFn has the same effect as\n  // breaking out of the dispatch switch statement.\n  var ContinueSentinel = {};\n\n  // Dummy constructor functions that we use as the .constructor and\n  // .constructor.prototype properties for functions that return Generator\n  // objects. For full spec compliance, you may wish to configure your\n  // minifier not to mangle the names of these two functions.\n  function Generator() {}\n  function GeneratorFunction() {}\n  function GeneratorFunctionPrototype() {}\n\n  // This is a polyfill for %IteratorPrototype% for environments that\n  // don't natively support it.\n  var IteratorPrototype = {};\n  define(IteratorPrototype, iteratorSymbol, function () {\n    return this;\n  });\n\n  var getProto = Object.getPrototypeOf;\n  var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n  if (NativeIteratorPrototype &&\n      NativeIteratorPrototype !== Op &&\n      hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n    // This environment has a native %IteratorPrototype%; use it instead\n    // of the polyfill.\n    IteratorPrototype = NativeIteratorPrototype;\n  }\n\n  var Gp = GeneratorFunctionPrototype.prototype =\n    Generator.prototype = Object.create(IteratorPrototype);\n  GeneratorFunction.prototype = GeneratorFunctionPrototype;\n  defineProperty(Gp, \"constructor\", { value: GeneratorFunctionPrototype, configurable: true });\n  defineProperty(\n    GeneratorFunctionPrototype,\n    \"constructor\",\n    { value: GeneratorFunction, configurable: true }\n  );\n  GeneratorFunction.displayName = define(\n    GeneratorFunctionPrototype,\n    toStringTagSymbol,\n    \"GeneratorFunction\"\n  );\n\n  // Helper for defining the .next, .throw, and .return methods of the\n  // Iterator interface in terms of a single ._invoke method.\n  function defineIteratorMethods(prototype) {\n    [\"next\", \"throw\", \"return\"].forEach(function(method) {\n      define(prototype, method, function(arg) {\n        return this._invoke(method, arg);\n      });\n    });\n  }\n\n  exports.isGeneratorFunction = function(genFun) {\n    var ctor = typeof genFun === \"function\" && genFun.constructor;\n    return ctor\n      ? ctor === GeneratorFunction ||\n        // For the native GeneratorFunction constructor, the best we can\n        // do is to check its .name property.\n        (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n      : false;\n  };\n\n  exports.mark = function(genFun) {\n    if (Object.setPrototypeOf) {\n      Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n    } else {\n      genFun.__proto__ = GeneratorFunctionPrototype;\n      define(genFun, toStringTagSymbol, \"GeneratorFunction\");\n    }\n    genFun.prototype = Object.create(Gp);\n    return genFun;\n  };\n\n  // Within the body of any async function, `await x` is transformed to\n  // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n  // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n  // meant to be awaited.\n  exports.awrap = function(arg) {\n    return { __await: arg };\n  };\n\n  function AsyncIterator(generator, PromiseImpl) {\n    function invoke(method, arg, resolve, reject) {\n      var record = tryCatch(generator[method], generator, arg);\n      if (record.type === \"throw\") {\n        reject(record.arg);\n      } else {\n        var result = record.arg;\n        var value = result.value;\n        if (value &&\n            typeof value === \"object\" &&\n            hasOwn.call(value, \"__await\")) {\n          return PromiseImpl.resolve(value.__await).then(function(value) {\n            invoke(\"next\", value, resolve, reject);\n          }, function(err) {\n            invoke(\"throw\", err, resolve, reject);\n          });\n        }\n\n        return PromiseImpl.resolve(value).then(function(unwrapped) {\n          // When a yielded Promise is resolved, its final value becomes\n          // the .value of the Promise<{value,done}> result for the\n          // current iteration.\n          result.value = unwrapped;\n          resolve(result);\n        }, function(error) {\n          // If a rejected Promise was yielded, throw the rejection back\n          // into the async generator function so it can be handled there.\n          return invoke(\"throw\", error, resolve, reject);\n        });\n      }\n    }\n\n    var previousPromise;\n\n    function enqueue(method, arg) {\n      function callInvokeWithMethodAndArg() {\n        return new PromiseImpl(function(resolve, reject) {\n          invoke(method, arg, resolve, reject);\n        });\n      }\n\n      return previousPromise =\n        // If enqueue has been called before, then we want to wait until\n        // all previous Promises have been resolved before calling invoke,\n        // so that results are always delivered in the correct order. If\n        // enqueue has not been called before, then it is important to\n        // call invoke immediately, without waiting on a callback to fire,\n        // so that the async generator function has the opportunity to do\n        // any necessary setup in a predictable way. This predictability\n        // is why the Promise constructor synchronously invokes its\n        // executor callback, and why async functions synchronously\n        // execute code before the first await. Since we implement simple\n        // async functions in terms of async generators, it is especially\n        // important to get this right, even though it requires care.\n        previousPromise ? previousPromise.then(\n          callInvokeWithMethodAndArg,\n          // Avoid propagating failures to Promises returned by later\n          // invocations of the iterator.\n          callInvokeWithMethodAndArg\n        ) : callInvokeWithMethodAndArg();\n    }\n\n    // Define the unified helper method that is used to implement .next,\n    // .throw, and .return (see defineIteratorMethods).\n    defineProperty(this, \"_invoke\", { value: enqueue });\n  }\n\n  defineIteratorMethods(AsyncIterator.prototype);\n  define(AsyncIterator.prototype, asyncIteratorSymbol, function () {\n    return this;\n  });\n  exports.AsyncIterator = AsyncIterator;\n\n  // Note that simple async functions are implemented on top of\n  // AsyncIterator objects; they just return a Promise for the value of\n  // the final result produced by the iterator.\n  exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n    if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n    var iter = new AsyncIterator(\n      wrap(innerFn, outerFn, self, tryLocsList),\n      PromiseImpl\n    );\n\n    return exports.isGeneratorFunction(outerFn)\n      ? iter // If outerFn is a generator, return the full iterator.\n      : iter.next().then(function(result) {\n          return result.done ? result.value : iter.next();\n        });\n  };\n\n  function makeInvokeMethod(innerFn, self, context) {\n    var state = GenStateSuspendedStart;\n\n    return function invoke(method, arg) {\n      if (state === GenStateExecuting) {\n        throw new Error(\"Generator is already running\");\n      }\n\n      if (state === GenStateCompleted) {\n        if (method === \"throw\") {\n          throw arg;\n        }\n\n        // Be forgiving, per GeneratorResume behavior specified since ES2015:\n        // ES2015 spec, step 3: https://262.ecma-international.org/6.0/#sec-generatorresume\n        // Latest spec, step 2: https://tc39.es/ecma262/#sec-generatorresume\n        return doneResult();\n      }\n\n      context.method = method;\n      context.arg = arg;\n\n      while (true) {\n        var delegate = context.delegate;\n        if (delegate) {\n          var delegateResult = maybeInvokeDelegate(delegate, context);\n          if (delegateResult) {\n            if (delegateResult === ContinueSentinel) continue;\n            return delegateResult;\n          }\n        }\n\n        if (context.method === \"next\") {\n          // Setting context._sent for legacy support of Babel's\n          // function.sent implementation.\n          context.sent = context._sent = context.arg;\n\n        } else if (context.method === \"throw\") {\n          if (state === GenStateSuspendedStart) {\n            state = GenStateCompleted;\n            throw context.arg;\n          }\n\n          context.dispatchException(context.arg);\n\n        } else if (context.method === \"return\") {\n          context.abrupt(\"return\", context.arg);\n        }\n\n        state = GenStateExecuting;\n\n        var record = tryCatch(innerFn, self, context);\n        if (record.type === \"normal\") {\n          // If an exception is thrown from innerFn, we leave state ===\n          // GenStateExecuting and loop back for another invocation.\n          state = context.done\n            ? GenStateCompleted\n            : GenStateSuspendedYield;\n\n          if (record.arg === ContinueSentinel) {\n            continue;\n          }\n\n          return {\n            value: record.arg,\n            done: context.done\n          };\n\n        } else if (record.type === \"throw\") {\n          state = GenStateCompleted;\n          // Dispatch the exception by looping back around to the\n          // context.dispatchException(context.arg) call above.\n          context.method = \"throw\";\n          context.arg = record.arg;\n        }\n      }\n    };\n  }\n\n  // Call delegate.iterator[context.method](context.arg) and handle the\n  // result, either by returning a { value, done } result from the\n  // delegate iterator, or by modifying context.method and context.arg,\n  // setting context.delegate to null, and returning the ContinueSentinel.\n  function maybeInvokeDelegate(delegate, context) {\n    var methodName = context.method;\n    var method = delegate.iterator[methodName];\n    if (method === undefined) {\n      // A .throw or .return when the delegate iterator has no .throw\n      // method, or a missing .next method, always terminate the\n      // yield* loop.\n      context.delegate = null;\n\n      // Note: [\"return\"] must be used for ES3 parsing compatibility.\n      if (methodName === \"throw\" && delegate.iterator[\"return\"]) {\n        // If the delegate iterator has a return method, give it a\n        // chance to clean up.\n        context.method = \"return\";\n        context.arg = undefined;\n        maybeInvokeDelegate(delegate, context);\n\n        if (context.method === \"throw\") {\n          // If maybeInvokeDelegate(context) changed context.method from\n          // \"return\" to \"throw\", let that override the TypeError below.\n          return ContinueSentinel;\n        }\n      }\n      if (methodName !== \"return\") {\n        context.method = \"throw\";\n        context.arg = new TypeError(\n          \"The iterator does not provide a '\" + methodName + \"' method\");\n      }\n\n      return ContinueSentinel;\n    }\n\n    var record = tryCatch(method, delegate.iterator, context.arg);\n\n    if (record.type === \"throw\") {\n      context.method = \"throw\";\n      context.arg = record.arg;\n      context.delegate = null;\n      return ContinueSentinel;\n    }\n\n    var info = record.arg;\n\n    if (! info) {\n      context.method = \"throw\";\n      context.arg = new TypeError(\"iterator result is not an object\");\n      context.delegate = null;\n      return ContinueSentinel;\n    }\n\n    if (info.done) {\n      // Assign the result of the finished delegate to the temporary\n      // variable specified by delegate.resultName (see delegateYield).\n      context[delegate.resultName] = info.value;\n\n      // Resume execution at the desired location (see delegateYield).\n      context.next = delegate.nextLoc;\n\n      // If context.method was \"throw\" but the delegate handled the\n      // exception, let the outer generator proceed normally. If\n      // context.method was \"next\", forget context.arg since it has been\n      // \"consumed\" by the delegate iterator. If context.method was\n      // \"return\", allow the original .return call to continue in the\n      // outer generator.\n      if (context.method !== \"return\") {\n        context.method = \"next\";\n        context.arg = undefined;\n      }\n\n    } else {\n      // Re-yield the result returned by the delegate method.\n      return info;\n    }\n\n    // The delegate iterator is finished, so forget it and continue with\n    // the outer generator.\n    context.delegate = null;\n    return ContinueSentinel;\n  }\n\n  // Define Generator.prototype.{next,throw,return} in terms of the\n  // unified ._invoke helper method.\n  defineIteratorMethods(Gp);\n\n  define(Gp, toStringTagSymbol, \"Generator\");\n\n  // A Generator should always return itself as the iterator object when the\n  // @@iterator function is called on it. Some browsers' implementations of the\n  // iterator prototype chain incorrectly implement this, causing the Generator\n  // object to not be returned from this call. This ensures that doesn't happen.\n  // See https://github.com/facebook/regenerator/issues/274 for more details.\n  define(Gp, iteratorSymbol, function() {\n    return this;\n  });\n\n  define(Gp, \"toString\", function() {\n    return \"[object Generator]\";\n  });\n\n  function pushTryEntry(locs) {\n    var entry = { tryLoc: locs[0] };\n\n    if (1 in locs) {\n      entry.catchLoc = locs[1];\n    }\n\n    if (2 in locs) {\n      entry.finallyLoc = locs[2];\n      entry.afterLoc = locs[3];\n    }\n\n    this.tryEntries.push(entry);\n  }\n\n  function resetTryEntry(entry) {\n    var record = entry.completion || {};\n    record.type = \"normal\";\n    delete record.arg;\n    entry.completion = record;\n  }\n\n  function Context(tryLocsList) {\n    // The root entry object (effectively a try statement without a catch\n    // or a finally block) gives us a place to store values thrown from\n    // locations where there is no enclosing try statement.\n    this.tryEntries = [{ tryLoc: \"root\" }];\n    tryLocsList.forEach(pushTryEntry, this);\n    this.reset(true);\n  }\n\n  exports.keys = function(val) {\n    var object = Object(val);\n    var keys = [];\n    for (var key in object) {\n      keys.push(key);\n    }\n    keys.reverse();\n\n    // Rather than returning an object with a next method, we keep\n    // things simple and return the next function itself.\n    return function next() {\n      while (keys.length) {\n        var key = keys.pop();\n        if (key in object) {\n          next.value = key;\n          next.done = false;\n          return next;\n        }\n      }\n\n      // To avoid creating an additional object, we just hang the .value\n      // and .done properties off the next function object itself. This\n      // also ensures that the minifier will not anonymize the function.\n      next.done = true;\n      return next;\n    };\n  };\n\n  function values(iterable) {\n    if (iterable != null) {\n      var iteratorMethod = iterable[iteratorSymbol];\n      if (iteratorMethod) {\n        return iteratorMethod.call(iterable);\n      }\n\n      if (typeof iterable.next === \"function\") {\n        return iterable;\n      }\n\n      if (!isNaN(iterable.length)) {\n        var i = -1, next = function next() {\n          while (++i < iterable.length) {\n            if (hasOwn.call(iterable, i)) {\n              next.value = iterable[i];\n              next.done = false;\n              return next;\n            }\n          }\n\n          next.value = undefined;\n          next.done = true;\n\n          return next;\n        };\n\n        return next.next = next;\n      }\n    }\n\n    throw new TypeError(typeof iterable + \" is not iterable\");\n  }\n  exports.values = values;\n\n  function doneResult() {\n    return { value: undefined, done: true };\n  }\n\n  Context.prototype = {\n    constructor: Context,\n\n    reset: function(skipTempReset) {\n      this.prev = 0;\n      this.next = 0;\n      // Resetting context._sent for legacy support of Babel's\n      // function.sent implementation.\n      this.sent = this._sent = undefined;\n      this.done = false;\n      this.delegate = null;\n\n      this.method = \"next\";\n      this.arg = undefined;\n\n      this.tryEntries.forEach(resetTryEntry);\n\n      if (!skipTempReset) {\n        for (var name in this) {\n          // Not sure about the optimal order of these conditions:\n          if (name.charAt(0) === \"t\" &&\n              hasOwn.call(this, name) &&\n              !isNaN(+name.slice(1))) {\n            this[name] = undefined;\n          }\n        }\n      }\n    },\n\n    stop: function() {\n      this.done = true;\n\n      var rootEntry = this.tryEntries[0];\n      var rootRecord = rootEntry.completion;\n      if (rootRecord.type === \"throw\") {\n        throw rootRecord.arg;\n      }\n\n      return this.rval;\n    },\n\n    dispatchException: function(exception) {\n      if (this.done) {\n        throw exception;\n      }\n\n      var context = this;\n      function handle(loc, caught) {\n        record.type = \"throw\";\n        record.arg = exception;\n        context.next = loc;\n\n        if (caught) {\n          // If the dispatched exception was caught by a catch block,\n          // then let that catch block handle the exception normally.\n          context.method = \"next\";\n          context.arg = undefined;\n        }\n\n        return !! caught;\n      }\n\n      for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n        var entry = this.tryEntries[i];\n        var record = entry.completion;\n\n        if (entry.tryLoc === \"root\") {\n          // Exception thrown outside of any try block that could handle\n          // it, so set the completion value of the entire function to\n          // throw the exception.\n          return handle(\"end\");\n        }\n\n        if (entry.tryLoc <= this.prev) {\n          var hasCatch = hasOwn.call(entry, \"catchLoc\");\n          var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n          if (hasCatch && hasFinally) {\n            if (this.prev < entry.catchLoc) {\n              return handle(entry.catchLoc, true);\n            } else if (this.prev < entry.finallyLoc) {\n              return handle(entry.finallyLoc);\n            }\n\n          } else if (hasCatch) {\n            if (this.prev < entry.catchLoc) {\n              return handle(entry.catchLoc, true);\n            }\n\n          } else if (hasFinally) {\n            if (this.prev < entry.finallyLoc) {\n              return handle(entry.finallyLoc);\n            }\n\n          } else {\n            throw new Error(\"try statement without catch or finally\");\n          }\n        }\n      }\n    },\n\n    abrupt: function(type, arg) {\n      for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n        var entry = this.tryEntries[i];\n        if (entry.tryLoc <= this.prev &&\n            hasOwn.call(entry, \"finallyLoc\") &&\n            this.prev < entry.finallyLoc) {\n          var finallyEntry = entry;\n          break;\n        }\n      }\n\n      if (finallyEntry &&\n          (type === \"break\" ||\n           type === \"continue\") &&\n          finallyEntry.tryLoc <= arg &&\n          arg <= finallyEntry.finallyLoc) {\n        // Ignore the finally entry if control is not jumping to a\n        // location outside the try/catch block.\n        finallyEntry = null;\n      }\n\n      var record = finallyEntry ? finallyEntry.completion : {};\n      record.type = type;\n      record.arg = arg;\n\n      if (finallyEntry) {\n        this.method = \"next\";\n        this.next = finallyEntry.finallyLoc;\n        return ContinueSentinel;\n      }\n\n      return this.complete(record);\n    },\n\n    complete: function(record, afterLoc) {\n      if (record.type === \"throw\") {\n        throw record.arg;\n      }\n\n      if (record.type === \"break\" ||\n          record.type === \"continue\") {\n        this.next = record.arg;\n      } else if (record.type === \"return\") {\n        this.rval = this.arg = record.arg;\n        this.method = \"return\";\n        this.next = \"end\";\n      } else if (record.type === \"normal\" && afterLoc) {\n        this.next = afterLoc;\n      }\n\n      return ContinueSentinel;\n    },\n\n    finish: function(finallyLoc) {\n      for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n        var entry = this.tryEntries[i];\n        if (entry.finallyLoc === finallyLoc) {\n          this.complete(entry.completion, entry.afterLoc);\n          resetTryEntry(entry);\n          return ContinueSentinel;\n        }\n      }\n    },\n\n    \"catch\": function(tryLoc) {\n      for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n        var entry = this.tryEntries[i];\n        if (entry.tryLoc === tryLoc) {\n          var record = entry.completion;\n          if (record.type === \"throw\") {\n            var thrown = record.arg;\n            resetTryEntry(entry);\n          }\n          return thrown;\n        }\n      }\n\n      // The context.catch method must only be called with a location\n      // argument that corresponds to a known catch block.\n      throw new Error(\"illegal catch attempt\");\n    },\n\n    delegateYield: function(iterable, resultName, nextLoc) {\n      this.delegate = {\n        iterator: values(iterable),\n        resultName: resultName,\n        nextLoc: nextLoc\n      };\n\n      if (this.method === \"next\") {\n        // Deliberately forget the last sent value so that we don't\n        // accidentally pass it on to the delegate.\n        this.arg = undefined;\n      }\n\n      return ContinueSentinel;\n    }\n  };\n\n  // Regardless of whether this script is executing as a CommonJS module\n  // or not, return the runtime object so that we can declare the variable\n  // regeneratorRuntime in the outer scope, which allows this module to be\n  // injected easily by `bin/regenerator --include-runtime script.js`.\n  return exports;\n\n}(\n  // If this script is executing as a CommonJS module, use module.exports\n  // as the regeneratorRuntime namespace. Otherwise create a new empty\n  // object. Either way, the resulting object will be used to initialize\n  // the regeneratorRuntime variable at the top of this file.\n  typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n  regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n  // This module should not be running in strict mode, so the above\n  // assignment should always work unless something is misconfigured. Just\n  // in case runtime.js accidentally runs in strict mode, in modern engines\n  // we can explicitly access globalThis. In older engines we can escape\n  // strict mode using a global Function call. This could conceivably fail\n  // if a Content Security Policy forbids using Function, but in that case\n  // the proper solution is to fix the accidental strict mode problem. If\n  // you've misconfigured your bundler to force strict mode and applied a\n  // CSP to forbid Function, and you're not willing to fix either of those\n  // problems, please detail your unique predicament in a GitHub issue.\n  if (typeof globalThis === \"object\") {\n    globalThis.regeneratorRuntime = runtime;\n  } else {\n    Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n  }\n}\n", "/* smoothscroll v0.4.4 - 2019 - Dustan Kasten, Jeremias Menichelli - MIT License */\n(function () {\n  'use strict';\n\n  // polyfill\n  function polyfill() {\n    // aliases\n    var w = window;\n    var d = document;\n\n    // return if scroll behavior is supported and polyfill is not forced\n    if (\n      'scrollBehavior' in d.documentElement.style &&\n      w.__forceSmoothScrollPolyfill__ !== true\n    ) {\n      return;\n    }\n\n    // globals\n    var Element = w.HTMLElement || w.Element;\n    var SCROLL_TIME = 468;\n\n    // object gathering original scroll methods\n    var original = {\n      scroll: w.scroll || w.scrollTo,\n      scrollBy: w.scrollBy,\n      elementScroll: Element.prototype.scroll || scrollElement,\n      scrollIntoView: Element.prototype.scrollIntoView\n    };\n\n    // define timing method\n    var now =\n      w.performance && w.performance.now\n        ? w.performance.now.bind(w.performance)\n        : Date.now;\n\n    /**\n     * indicates if a the current browser is made by Microsoft\n     * @method isMicrosoftBrowser\n     * @param {String} userAgent\n     * @returns {Boolean}\n     */\n    function isMicrosoftBrowser(userAgent) {\n      var userAgentPatterns = ['MSIE ', 'Trident/', 'Edge/'];\n\n      return new RegExp(userAgentPatterns.join('|')).test(userAgent);\n    }\n\n    /*\n     * IE has rounding bug rounding down clientHeight and clientWidth and\n     * rounding up scrollHeight and scrollWidth causing false positives\n     * on hasScrollableSpace\n     */\n    var ROUNDING_TOLERANCE = isMicrosoftBrowser(w.navigator.userAgent) ? 1 : 0;\n\n    /**\n     * changes scroll position inside an element\n     * @method scrollElement\n     * @param {Number} x\n     * @param {Number} y\n     * @returns {undefined}\n     */\n    function scrollElement(x, y) {\n      this.scrollLeft = x;\n      this.scrollTop = y;\n    }\n\n    /**\n     * returns result of applying ease math function to a number\n     * @method ease\n     * @param {Number} k\n     * @returns {Number}\n     */\n    function ease(k) {\n      return 0.5 * (1 - Math.cos(Math.PI * k));\n    }\n\n    /**\n     * indicates if a smooth behavior should be applied\n     * @method shouldBailOut\n     * @param {Number|Object} firstArg\n     * @returns {Boolean}\n     */\n    function shouldBailOut(firstArg) {\n      if (\n        firstArg === null ||\n        typeof firstArg !== 'object' ||\n        firstArg.behavior === undefined ||\n        firstArg.behavior === 'auto' ||\n        firstArg.behavior === 'instant'\n      ) {\n        // first argument is not an object/null\n        // or behavior is auto, instant or undefined\n        return true;\n      }\n\n      if (typeof firstArg === 'object' && firstArg.behavior === 'smooth') {\n        // first argument is an object and behavior is smooth\n        return false;\n      }\n\n      // throw error when behavior is not supported\n      throw new TypeError(\n        'behavior member of ScrollOptions ' +\n          firstArg.behavior +\n          ' is not a valid value for enumeration ScrollBehavior.'\n      );\n    }\n\n    /**\n     * indicates if an element has scrollable space in the provided axis\n     * @method hasScrollableSpace\n     * @param {Node} el\n     * @param {String} axis\n     * @returns {Boolean}\n     */\n    function hasScrollableSpace(el, axis) {\n      if (axis === 'Y') {\n        return el.clientHeight + ROUNDING_TOLERANCE < el.scrollHeight;\n      }\n\n      if (axis === 'X') {\n        return el.clientWidth + ROUNDING_TOLERANCE < el.scrollWidth;\n      }\n    }\n\n    /**\n     * indicates if an element has a scrollable overflow property in the axis\n     * @method canOverflow\n     * @param {Node} el\n     * @param {String} axis\n     * @returns {Boolean}\n     */\n    function canOverflow(el, axis) {\n      var overflowValue = w.getComputedStyle(el, null)['overflow' + axis];\n\n      return overflowValue === 'auto' || overflowValue === 'scroll';\n    }\n\n    /**\n     * indicates if an element can be scrolled in either axis\n     * @method isScrollable\n     * @param {Node} el\n     * @param {String} axis\n     * @returns {Boolean}\n     */\n    function isScrollable(el) {\n      var isScrollableY = hasScrollableSpace(el, 'Y') && canOverflow(el, 'Y');\n      var isScrollableX = hasScrollableSpace(el, 'X') && canOverflow(el, 'X');\n\n      return isScrollableY || isScrollableX;\n    }\n\n    /**\n     * finds scrollable parent of an element\n     * @method findScrollableParent\n     * @param {Node} el\n     * @returns {Node} el\n     */\n    function findScrollableParent(el) {\n      while (el !== d.body && isScrollable(el) === false) {\n        el = el.parentNode || el.host;\n      }\n\n      return el;\n    }\n\n    /**\n     * self invoked function that, given a context, steps through scrolling\n     * @method step\n     * @param {Object} context\n     * @returns {undefined}\n     */\n    function step(context) {\n      var time = now();\n      var value;\n      var currentX;\n      var currentY;\n      var elapsed = (time - context.startTime) / SCROLL_TIME;\n\n      // avoid elapsed times higher than one\n      elapsed = elapsed > 1 ? 1 : elapsed;\n\n      // apply easing to elapsed time\n      value = ease(elapsed);\n\n      currentX = context.startX + (context.x - context.startX) * value;\n      currentY = context.startY + (context.y - context.startY) * value;\n\n      context.method.call(context.scrollable, currentX, currentY);\n\n      // scroll more if we have not reached our destination\n      if (currentX !== context.x || currentY !== context.y) {\n        w.requestAnimationFrame(step.bind(w, context));\n      }\n    }\n\n    /**\n     * scrolls window or element with a smooth behavior\n     * @method smoothScroll\n     * @param {Object|Node} el\n     * @param {Number} x\n     * @param {Number} y\n     * @returns {undefined}\n     */\n    function smoothScroll(el, x, y) {\n      var scrollable;\n      var startX;\n      var startY;\n      var method;\n      var startTime = now();\n\n      // define scroll context\n      if (el === d.body) {\n        scrollable = w;\n        startX = w.scrollX || w.pageXOffset;\n        startY = w.scrollY || w.pageYOffset;\n        method = original.scroll;\n      } else {\n        scrollable = el;\n        startX = el.scrollLeft;\n        startY = el.scrollTop;\n        method = scrollElement;\n      }\n\n      // scroll looping over a frame\n      step({\n        scrollable: scrollable,\n        method: method,\n        startTime: startTime,\n        startX: startX,\n        startY: startY,\n        x: x,\n        y: y\n      });\n    }\n\n    // ORIGINAL METHODS OVERRIDES\n    // w.scroll and w.scrollTo\n    w.scroll = w.scrollTo = function() {\n      // avoid action when no arguments are passed\n      if (arguments[0] === undefined) {\n        return;\n      }\n\n      // avoid smooth behavior if not required\n      if (shouldBailOut(arguments[0]) === true) {\n        original.scroll.call(\n          w,\n          arguments[0].left !== undefined\n            ? arguments[0].left\n            : typeof arguments[0] !== 'object'\n              ? arguments[0]\n              : w.scrollX || w.pageXOffset,\n          // use top prop, second argument if present or fallback to scrollY\n          arguments[0].top !== undefined\n            ? arguments[0].top\n            : arguments[1] !== undefined\n              ? arguments[1]\n              : w.scrollY || w.pageYOffset\n        );\n\n        return;\n      }\n\n      // LET THE SMOOTHNESS BEGIN!\n      smoothScroll.call(\n        w,\n        d.body,\n        arguments[0].left !== undefined\n          ? ~~arguments[0].left\n          : w.scrollX || w.pageXOffset,\n        arguments[0].top !== undefined\n          ? ~~arguments[0].top\n          : w.scrollY || w.pageYOffset\n      );\n    };\n\n    // w.scrollBy\n    w.scrollBy = function() {\n      // avoid action when no arguments are passed\n      if (arguments[0] === undefined) {\n        return;\n      }\n\n      // avoid smooth behavior if not required\n      if (shouldBailOut(arguments[0])) {\n        original.scrollBy.call(\n          w,\n          arguments[0].left !== undefined\n            ? arguments[0].left\n            : typeof arguments[0] !== 'object' ? arguments[0] : 0,\n          arguments[0].top !== undefined\n            ? arguments[0].top\n            : arguments[1] !== undefined ? arguments[1] : 0\n        );\n\n        return;\n      }\n\n      // LET THE SMOOTHNESS BEGIN!\n      smoothScroll.call(\n        w,\n        d.body,\n        ~~arguments[0].left + (w.scrollX || w.pageXOffset),\n        ~~arguments[0].top + (w.scrollY || w.pageYOffset)\n      );\n    };\n\n    // Element.prototype.scroll and Element.prototype.scrollTo\n    Element.prototype.scroll = Element.prototype.scrollTo = function() {\n      // avoid action when no arguments are passed\n      if (arguments[0] === undefined) {\n        return;\n      }\n\n      // avoid smooth behavior if not required\n      if (shouldBailOut(arguments[0]) === true) {\n        // if one number is passed, throw error to match Firefox implementation\n        if (typeof arguments[0] === 'number' && arguments[1] === undefined) {\n          throw new SyntaxError('Value could not be converted');\n        }\n\n        original.elementScroll.call(\n          this,\n          // use left prop, first number argument or fallback to scrollLeft\n          arguments[0].left !== undefined\n            ? ~~arguments[0].left\n            : typeof arguments[0] !== 'object' ? ~~arguments[0] : this.scrollLeft,\n          // use top prop, second argument or fallback to scrollTop\n          arguments[0].top !== undefined\n            ? ~~arguments[0].top\n            : arguments[1] !== undefined ? ~~arguments[1] : this.scrollTop\n        );\n\n        return;\n      }\n\n      var left = arguments[0].left;\n      var top = arguments[0].top;\n\n      // LET THE SMOOTHNESS BEGIN!\n      smoothScroll.call(\n        this,\n        this,\n        typeof left === 'undefined' ? this.scrollLeft : ~~left,\n        typeof top === 'undefined' ? this.scrollTop : ~~top\n      );\n    };\n\n    // Element.prototype.scrollBy\n    Element.prototype.scrollBy = function() {\n      // avoid action when no arguments are passed\n      if (arguments[0] === undefined) {\n        return;\n      }\n\n      // avoid smooth behavior if not required\n      if (shouldBailOut(arguments[0]) === true) {\n        original.elementScroll.call(\n          this,\n          arguments[0].left !== undefined\n            ? ~~arguments[0].left + this.scrollLeft\n            : ~~arguments[0] + this.scrollLeft,\n          arguments[0].top !== undefined\n            ? ~~arguments[0].top + this.scrollTop\n            : ~~arguments[1] + this.scrollTop\n        );\n\n        return;\n      }\n\n      this.scroll({\n        left: ~~arguments[0].left + this.scrollLeft,\n        top: ~~arguments[0].top + this.scrollTop,\n        behavior: arguments[0].behavior\n      });\n    };\n\n    // Element.prototype.scrollIntoView\n    Element.prototype.scrollIntoView = function() {\n      // avoid smooth behavior if not required\n      if (shouldBailOut(arguments[0]) === true) {\n        original.scrollIntoView.call(\n          this,\n          arguments[0] === undefined ? true : arguments[0]\n        );\n\n        return;\n      }\n\n      // LET THE SMOOTHNESS BEGIN!\n      var scrollableParent = findScrollableParent(this);\n      var parentRects = scrollableParent.getBoundingClientRect();\n      var clientRects = this.getBoundingClientRect();\n\n      if (scrollableParent !== d.body) {\n        // reveal element inside parent\n        smoothScroll.call(\n          this,\n          scrollableParent,\n          scrollableParent.scrollLeft + clientRects.left - parentRects.left,\n          scrollableParent.scrollTop + clientRects.top - parentRects.top\n        );\n\n        // reveal parent in viewport unless is fixed\n        if (w.getComputedStyle(scrollableParent).position !== 'fixed') {\n          w.scrollBy({\n            left: parentRects.left,\n            top: parentRects.top,\n            behavior: 'smooth'\n          });\n        }\n      } else {\n        // reveal element in viewport\n        w.scrollBy({\n          left: clientRects.left,\n          top: clientRects.top,\n          behavior: 'smooth'\n        });\n      }\n    };\n  }\n\n  if (typeof exports === 'object' && typeof module !== 'undefined') {\n    // commonjs\n    module.exports = { polyfill: polyfill };\n  } else {\n    // global\n    polyfill();\n  }\n\n}());\n", "/**\n * @license React\n * react.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n  (function () {\n    function defineDeprecationWarning(methodName, info) {\n      Object.defineProperty(Component.prototype, methodName, {\n        get: function () {\n          console.warn(\n            \"%s(...) is deprecated in plain JavaScript React classes. %s\",\n            info[0],\n            info[1]\n          );\n        }\n      });\n    }\n    function getIteratorFn(maybeIterable) {\n      if (null === maybeIterable || \"object\" !== typeof maybeIterable)\n        return null;\n      maybeIterable =\n        (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||\n        maybeIterable[\"@@iterator\"];\n      return \"function\" === typeof maybeIterable ? maybeIterable : null;\n    }\n    function warnNoop(publicInstance, callerName) {\n      publicInstance =\n        ((publicInstance = publicInstance.constructor) &&\n          (publicInstance.displayName || publicInstance.name)) ||\n        \"ReactClass\";\n      var warningKey = publicInstance + \".\" + callerName;\n      didWarnStateUpdateForUnmountedComponent[warningKey] ||\n        (console.error(\n          \"Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.\",\n          callerName,\n          publicInstance\n        ),\n        (didWarnStateUpdateForUnmountedComponent[warningKey] = !0));\n    }\n    function Component(props, context, updater) {\n      this.props = props;\n      this.context = context;\n      this.refs = emptyObject;\n      this.updater = updater || ReactNoopUpdateQueue;\n    }\n    function ComponentDummy() {}\n    function PureComponent(props, context, updater) {\n      this.props = props;\n      this.context = context;\n      this.refs = emptyObject;\n      this.updater = updater || ReactNoopUpdateQueue;\n    }\n    function noop() {}\n    function testStringCoercion(value) {\n      return \"\" + value;\n    }\n    function checkKeyStringCoercion(value) {\n      try {\n        testStringCoercion(value);\n        var JSCompiler_inline_result = !1;\n      } catch (e) {\n        JSCompiler_inline_result = !0;\n      }\n      if (JSCompiler_inline_result) {\n        JSCompiler_inline_result = console;\n        var JSCompiler_temp_const = JSCompiler_inline_result.error;\n        var JSCompiler_inline_result$jscomp$0 =\n          (\"function\" === typeof Symbol &&\n            Symbol.toStringTag &&\n            value[Symbol.toStringTag]) ||\n          value.constructor.name ||\n          \"Object\";\n        JSCompiler_temp_const.call(\n          JSCompiler_inline_result,\n          \"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.\",\n          JSCompiler_inline_result$jscomp$0\n        );\n        return testStringCoercion(value);\n      }\n    }\n    function getComponentNameFromType(type) {\n      if (null == type) return null;\n      if (\"function\" === typeof type)\n        return type.$$typeof === REACT_CLIENT_REFERENCE\n          ? null\n          : type.displayName || type.name || null;\n      if (\"string\" === typeof type) return type;\n      switch (type) {\n        case REACT_FRAGMENT_TYPE:\n          return \"Fragment\";\n        case REACT_PROFILER_TYPE:\n          return \"Profiler\";\n        case REACT_STRICT_MODE_TYPE:\n          return \"StrictMode\";\n        case REACT_SUSPENSE_TYPE:\n          return \"Suspense\";\n        case REACT_SUSPENSE_LIST_TYPE:\n          return \"SuspenseList\";\n        case REACT_ACTIVITY_TYPE:\n          return \"Activity\";\n      }\n      if (\"object\" === typeof type)\n        switch (\n          (\"number\" === typeof type.tag &&\n            console.error(\n              \"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"\n            ),\n          type.$$typeof)\n        ) {\n          case REACT_PORTAL_TYPE:\n            return \"Portal\";\n          case REACT_CONTEXT_TYPE:\n            return type.displayName || \"Context\";\n          case REACT_CONSUMER_TYPE:\n            return (type._context.displayName || \"Context\") + \".Consumer\";\n          case REACT_FORWARD_REF_TYPE:\n            var innerType = type.render;\n            type = type.displayName;\n            type ||\n              ((type = innerType.displayName || innerType.name || \"\"),\n              (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n            return type;\n          case REACT_MEMO_TYPE:\n            return (\n              (innerType = type.displayName || null),\n              null !== innerType\n                ? innerType\n                : getComponentNameFromType(type.type) || \"Memo\"\n            );\n          case REACT_LAZY_TYPE:\n            innerType = type._payload;\n            type = type._init;\n            try {\n              return getComponentNameFromType(type(innerType));\n            } catch (x) {}\n        }\n      return null;\n    }\n    function getTaskName(type) {\n      if (type === REACT_FRAGMENT_TYPE) return \"<>\";\n      if (\n        \"object\" === typeof type &&\n        null !== type &&\n        type.$$typeof === REACT_LAZY_TYPE\n      )\n        return \"<...>\";\n      try {\n        var name = getComponentNameFromType(type);\n        return name ? \"<\" + name + \">\" : \"<...>\";\n      } catch (x) {\n        return \"<...>\";\n      }\n    }\n    function getOwner() {\n      var dispatcher = ReactSharedInternals.A;\n      return null === dispatcher ? null : dispatcher.getOwner();\n    }\n    function UnknownOwner() {\n      return Error(\"react-stack-top-frame\");\n    }\n    function hasValidKey(config) {\n      if (hasOwnProperty.call(config, \"key\")) {\n        var getter = Object.getOwnPropertyDescriptor(config, \"key\").get;\n        if (getter && getter.isReactWarning) return !1;\n      }\n      return void 0 !== config.key;\n    }\n    function defineKeyPropWarningGetter(props, displayName) {\n      function warnAboutAccessingKey() {\n        specialPropKeyWarningShown ||\n          ((specialPropKeyWarningShown = !0),\n          console.error(\n            \"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)\",\n            displayName\n          ));\n      }\n      warnAboutAccessingKey.isReactWarning = !0;\n      Object.defineProperty(props, \"key\", {\n        get: warnAboutAccessingKey,\n        configurable: !0\n      });\n    }\n    function elementRefGetterWithDeprecationWarning() {\n      var componentName = getComponentNameFromType(this.type);\n      didWarnAboutElementRef[componentName] ||\n        ((didWarnAboutElementRef[componentName] = !0),\n        console.error(\n          \"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.\"\n        ));\n      componentName = this.props.ref;\n      return void 0 !== componentName ? componentName : null;\n    }\n    function ReactElement(type, key, props, owner, debugStack, debugTask) {\n      var refProp = props.ref;\n      type = {\n        $$typeof: REACT_ELEMENT_TYPE,\n        type: type,\n        key: key,\n        props: props,\n        _owner: owner\n      };\n      null !== (void 0 !== refProp ? refProp : null)\n        ? Object.defineProperty(type, \"ref\", {\n            enumerable: !1,\n            get: elementRefGetterWithDeprecationWarning\n          })\n        : Object.defineProperty(type, \"ref\", { enumerable: !1, value: null });\n      type._store = {};\n      Object.defineProperty(type._store, \"validated\", {\n        configurable: !1,\n        enumerable: !1,\n        writable: !0,\n        value: 0\n      });\n      Object.defineProperty(type, \"_debugInfo\", {\n        configurable: !1,\n        enumerable: !1,\n        writable: !0,\n        value: null\n      });\n      Object.defineProperty(type, \"_debugStack\", {\n        configurable: !1,\n        enumerable: !1,\n        writable: !0,\n        value: debugStack\n      });\n      Object.defineProperty(type, \"_debugTask\", {\n        configurable: !1,\n        enumerable: !1,\n        writable: !0,\n        value: debugTask\n      });\n      Object.freeze && (Object.freeze(type.props), Object.freeze(type));\n      return type;\n    }\n    function cloneAndReplaceKey(oldElement, newKey) {\n      newKey = ReactElement(\n        oldElement.type,\n        newKey,\n        oldElement.props,\n        oldElement._owner,\n        oldElement._debugStack,\n        oldElement._debugTask\n      );\n      oldElement._store &&\n        (newKey._store.validated = oldElement._store.validated);\n      return newKey;\n    }\n    function validateChildKeys(node) {\n      isValidElement(node)\n        ? node._store && (node._store.validated = 1)\n        : \"object\" === typeof node &&\n          null !== node &&\n          node.$$typeof === REACT_LAZY_TYPE &&\n          (\"fulfilled\" === node._payload.status\n            ? isValidElement(node._payload.value) &&\n              node._payload.value._store &&\n              (node._payload.value._store.validated = 1)\n            : node._store && (node._store.validated = 1));\n    }\n    function isValidElement(object) {\n      return (\n        \"object\" === typeof object &&\n        null !== object &&\n        object.$$typeof === REACT_ELEMENT_TYPE\n      );\n    }\n    function escape(key) {\n      var escaperLookup = { \"=\": \"=0\", \":\": \"=2\" };\n      return (\n        \"$\" +\n        key.replace(/[=:]/g, function (match) {\n          return escaperLookup[match];\n        })\n      );\n    }\n    function getElementKey(element, index) {\n      return \"object\" === typeof element &&\n        null !== element &&\n        null != element.key\n        ? (checkKeyStringCoercion(element.key), escape(\"\" + element.key))\n        : index.toString(36);\n    }\n    function resolveThenable(thenable) {\n      switch (thenable.status) {\n        case \"fulfilled\":\n          return thenable.value;\n        case \"rejected\":\n          throw thenable.reason;\n        default:\n          switch (\n            (\"string\" === typeof thenable.status\n              ? thenable.then(noop, noop)\n              : ((thenable.status = \"pending\"),\n                thenable.then(\n                  function (fulfilledValue) {\n                    \"pending\" === thenable.status &&\n                      ((thenable.status = \"fulfilled\"),\n                      (thenable.value = fulfilledValue));\n                  },\n                  function (error) {\n                    \"pending\" === thenable.status &&\n                      ((thenable.status = \"rejected\"),\n                      (thenable.reason = error));\n                  }\n                )),\n            thenable.status)\n          ) {\n            case \"fulfilled\":\n              return thenable.value;\n            case \"rejected\":\n              throw thenable.reason;\n          }\n      }\n      throw thenable;\n    }\n    function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {\n      var type = typeof children;\n      if (\"undefined\" === type || \"boolean\" === type) children = null;\n      var invokeCallback = !1;\n      if (null === children) invokeCallback = !0;\n      else\n        switch (type) {\n          case \"bigint\":\n          case \"string\":\n          case \"number\":\n            invokeCallback = !0;\n            break;\n          case \"object\":\n            switch (children.$$typeof) {\n              case REACT_ELEMENT_TYPE:\n              case REACT_PORTAL_TYPE:\n                invokeCallback = !0;\n                break;\n              case REACT_LAZY_TYPE:\n                return (\n                  (invokeCallback = children._init),\n                  mapIntoArray(\n                    invokeCallback(children._payload),\n                    array,\n                    escapedPrefix,\n                    nameSoFar,\n                    callback\n                  )\n                );\n            }\n        }\n      if (invokeCallback) {\n        invokeCallback = children;\n        callback = callback(invokeCallback);\n        var childKey =\n          \"\" === nameSoFar ? \".\" + getElementKey(invokeCallback, 0) : nameSoFar;\n        isArrayImpl(callback)\n          ? ((escapedPrefix = \"\"),\n            null != childKey &&\n              (escapedPrefix =\n                childKey.replace(userProvidedKeyEscapeRegex, \"$&/\") + \"/\"),\n            mapIntoArray(callback, array, escapedPrefix, \"\", function (c) {\n              return c;\n            }))\n          : null != callback &&\n            (isValidElement(callback) &&\n              (null != callback.key &&\n                ((invokeCallback && invokeCallback.key === callback.key) ||\n                  checkKeyStringCoercion(callback.key)),\n              (escapedPrefix = cloneAndReplaceKey(\n                callback,\n                escapedPrefix +\n                  (null == callback.key ||\n                  (invokeCallback && invokeCallback.key === callback.key)\n                    ? \"\"\n                    : (\"\" + callback.key).replace(\n                        userProvidedKeyEscapeRegex,\n                        \"$&/\"\n                      ) + \"/\") +\n                  childKey\n              )),\n              \"\" !== nameSoFar &&\n                null != invokeCallback &&\n                isValidElement(invokeCallback) &&\n                null == invokeCallback.key &&\n                invokeCallback._store &&\n                !invokeCallback._store.validated &&\n                (escapedPrefix._store.validated = 2),\n              (callback = escapedPrefix)),\n            array.push(callback));\n        return 1;\n      }\n      invokeCallback = 0;\n      childKey = \"\" === nameSoFar ? \".\" : nameSoFar + \":\";\n      if (isArrayImpl(children))\n        for (var i = 0; i < children.length; i++)\n          (nameSoFar = children[i]),\n            (type = childKey + getElementKey(nameSoFar, i)),\n            (invokeCallback += mapIntoArray(\n              nameSoFar,\n              array,\n              escapedPrefix,\n              type,\n              callback\n            ));\n      else if (((i = getIteratorFn(children)), \"function\" === typeof i))\n        for (\n          i === children.entries &&\n            (didWarnAboutMaps ||\n              console.warn(\n                \"Using Maps as children is not supported. Use an array of keyed ReactElements instead.\"\n              ),\n            (didWarnAboutMaps = !0)),\n            children = i.call(children),\n            i = 0;\n          !(nameSoFar = children.next()).done;\n\n        )\n          (nameSoFar = nameSoFar.value),\n            (type = childKey + getElementKey(nameSoFar, i++)),\n            (invokeCallback += mapIntoArray(\n              nameSoFar,\n              array,\n              escapedPrefix,\n              type,\n              callback\n            ));\n      else if (\"object\" === type) {\n        if (\"function\" === typeof children.then)\n          return mapIntoArray(\n            resolveThenable(children),\n            array,\n            escapedPrefix,\n            nameSoFar,\n            callback\n          );\n        array = String(children);\n        throw Error(\n          \"Objects are not valid as a React child (found: \" +\n            (\"[object Object]\" === array\n              ? \"object with keys {\" + Object.keys(children).join(\", \") + \"}\"\n              : array) +\n            \"). If you meant to render a collection of children, use an array instead.\"\n        );\n      }\n      return invokeCallback;\n    }\n    function mapChildren(children, func, context) {\n      if (null == children) return children;\n      var result = [],\n        count = 0;\n      mapIntoArray(children, result, \"\", \"\", function (child) {\n        return func.call(context, child, count++);\n      });\n      return result;\n    }\n    function lazyInitializer(payload) {\n      if (-1 === payload._status) {\n        var ioInfo = payload._ioInfo;\n        null != ioInfo && (ioInfo.start = ioInfo.end = performance.now());\n        ioInfo = payload._result;\n        var thenable = ioInfo();\n        thenable.then(\n          function (moduleObject) {\n            if (0 === payload._status || -1 === payload._status) {\n              payload._status = 1;\n              payload._result = moduleObject;\n              var _ioInfo = payload._ioInfo;\n              null != _ioInfo && (_ioInfo.end = performance.now());\n              void 0 === thenable.status &&\n                ((thenable.status = \"fulfilled\"),\n                (thenable.value = moduleObject));\n            }\n          },\n          function (error) {\n            if (0 === payload._status || -1 === payload._status) {\n              payload._status = 2;\n              payload._result = error;\n              var _ioInfo2 = payload._ioInfo;\n              null != _ioInfo2 && (_ioInfo2.end = performance.now());\n              void 0 === thenable.status &&\n                ((thenable.status = \"rejected\"), (thenable.reason = error));\n            }\n          }\n        );\n        ioInfo = payload._ioInfo;\n        if (null != ioInfo) {\n          ioInfo.value = thenable;\n          var displayName = thenable.displayName;\n          \"string\" === typeof displayName && (ioInfo.name = displayName);\n        }\n        -1 === payload._status &&\n          ((payload._status = 0), (payload._result = thenable));\n      }\n      if (1 === payload._status)\n        return (\n          (ioInfo = payload._result),\n          void 0 === ioInfo &&\n            console.error(\n              \"lazy: Expected the result of a dynamic import() call. Instead received: %s\\n\\nYour code should look like: \\n  const MyComponent = lazy(() => import('./MyComponent'))\\n\\nDid you accidentally put curly braces around the import?\",\n              ioInfo\n            ),\n          \"default\" in ioInfo ||\n            console.error(\n              \"lazy: Expected the result of a dynamic import() call. Instead received: %s\\n\\nYour code should look like: \\n  const MyComponent = lazy(() => import('./MyComponent'))\",\n              ioInfo\n            ),\n          ioInfo.default\n        );\n      throw payload._result;\n    }\n    function resolveDispatcher() {\n      var dispatcher = ReactSharedInternals.H;\n      null === dispatcher &&\n        console.error(\n          \"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\\n1. You might have mismatching versions of React and the renderer (such as React DOM)\\n2. You might be breaking the Rules of Hooks\\n3. You might have more than one copy of React in the same app\\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.\"\n        );\n      return dispatcher;\n    }\n    function releaseAsyncTransition() {\n      ReactSharedInternals.asyncTransitions--;\n    }\n    function enqueueTask(task) {\n      if (null === enqueueTaskImpl)\n        try {\n          var requireString = (\"require\" + Math.random()).slice(0, 7);\n          enqueueTaskImpl = (module && module[requireString]).call(\n            module,\n            \"timers\"\n          ).setImmediate;\n        } catch (_err) {\n          enqueueTaskImpl = function (callback) {\n            !1 === didWarnAboutMessageChannel &&\n              ((didWarnAboutMessageChannel = !0),\n              \"undefined\" === typeof MessageChannel &&\n                console.error(\n                  \"This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning.\"\n                ));\n            var channel = new MessageChannel();\n            channel.port1.onmessage = callback;\n            channel.port2.postMessage(void 0);\n          };\n        }\n      return enqueueTaskImpl(task);\n    }\n    function aggregateErrors(errors) {\n      return 1 < errors.length && \"function\" === typeof AggregateError\n        ? new AggregateError(errors)\n        : errors[0];\n    }\n    function popActScope(prevActQueue, prevActScopeDepth) {\n      prevActScopeDepth !== actScopeDepth - 1 &&\n        console.error(\n          \"You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. \"\n        );\n      actScopeDepth = prevActScopeDepth;\n    }\n    function recursivelyFlushAsyncActWork(returnValue, resolve, reject) {\n      var queue = ReactSharedInternals.actQueue;\n      if (null !== queue)\n        if (0 !== queue.length)\n          try {\n            flushActQueue(queue);\n            enqueueTask(function () {\n              return recursivelyFlushAsyncActWork(returnValue, resolve, reject);\n            });\n            return;\n          } catch (error) {\n            ReactSharedInternals.thrownErrors.push(error);\n          }\n        else ReactSharedInternals.actQueue = null;\n      0 < ReactSharedInternals.thrownErrors.length\n        ? ((queue = aggregateErrors(ReactSharedInternals.thrownErrors)),\n          (ReactSharedInternals.thrownErrors.length = 0),\n          reject(queue))\n        : resolve(returnValue);\n    }\n    function flushActQueue(queue) {\n      if (!isFlushing) {\n        isFlushing = !0;\n        var i = 0;\n        try {\n          for (; i < queue.length; i++) {\n            var callback = queue[i];\n            do {\n              ReactSharedInternals.didUsePromise = !1;\n              var continuation = callback(!1);\n              if (null !== continuation) {\n                if (ReactSharedInternals.didUsePromise) {\n                  queue[i] = callback;\n                  queue.splice(0, i);\n                  return;\n                }\n                callback = continuation;\n              } else break;\n            } while (1);\n          }\n          queue.length = 0;\n        } catch (error) {\n          queue.splice(0, i + 1), ReactSharedInternals.thrownErrors.push(error);\n        } finally {\n          isFlushing = !1;\n        }\n      }\n    }\n    \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n      \"function\" ===\n        typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&\n      __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());\n    var REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n      REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n      REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n      REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n      REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n      REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n      REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n      REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n      REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n      REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n      REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n      REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n      REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n      MAYBE_ITERATOR_SYMBOL = Symbol.iterator,\n      didWarnStateUpdateForUnmountedComponent = {},\n      ReactNoopUpdateQueue = {\n        isMounted: function () {\n          return !1;\n        },\n        enqueueForceUpdate: function (publicInstance) {\n          warnNoop(publicInstance, \"forceUpdate\");\n        },\n        enqueueReplaceState: function (publicInstance) {\n          warnNoop(publicInstance, \"replaceState\");\n        },\n        enqueueSetState: function (publicInstance) {\n          warnNoop(publicInstance, \"setState\");\n        }\n      },\n      assign = Object.assign,\n      emptyObject = {};\n    Object.freeze(emptyObject);\n    Component.prototype.isReactComponent = {};\n    Component.prototype.setState = function (partialState, callback) {\n      if (\n        \"object\" !== typeof partialState &&\n        \"function\" !== typeof partialState &&\n        null != partialState\n      )\n        throw Error(\n          \"takes an object of state variables to update or a function which returns an object of state variables.\"\n        );\n      this.updater.enqueueSetState(this, partialState, callback, \"setState\");\n    };\n    Component.prototype.forceUpdate = function (callback) {\n      this.updater.enqueueForceUpdate(this, callback, \"forceUpdate\");\n    };\n    var deprecatedAPIs = {\n      isMounted: [\n        \"isMounted\",\n        \"Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks.\"\n      ],\n      replaceState: [\n        \"replaceState\",\n        \"Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236).\"\n      ]\n    };\n    for (fnName in deprecatedAPIs)\n      deprecatedAPIs.hasOwnProperty(fnName) &&\n        defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);\n    ComponentDummy.prototype = Component.prototype;\n    deprecatedAPIs = PureComponent.prototype = new ComponentDummy();\n    deprecatedAPIs.constructor = PureComponent;\n    assign(deprecatedAPIs, Component.prototype);\n    deprecatedAPIs.isPureReactComponent = !0;\n    var isArrayImpl = Array.isArray,\n      REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\"),\n      ReactSharedInternals = {\n        H: null,\n        A: null,\n        T: null,\n        S: null,\n        actQueue: null,\n        asyncTransitions: 0,\n        isBatchingLegacy: !1,\n        didScheduleLegacyUpdate: !1,\n        didUsePromise: !1,\n        thrownErrors: [],\n        getCurrentStack: null,\n        recentlyCreatedOwnerStacks: 0\n      },\n      hasOwnProperty = Object.prototype.hasOwnProperty,\n      createTask = console.createTask\n        ? console.createTask\n        : function () {\n            return null;\n          };\n    deprecatedAPIs = {\n      react_stack_bottom_frame: function (callStackForError) {\n        return callStackForError();\n      }\n    };\n    var specialPropKeyWarningShown, didWarnAboutOldJSXRuntime;\n    var didWarnAboutElementRef = {};\n    var unknownOwnerDebugStack = deprecatedAPIs.react_stack_bottom_frame.bind(\n      deprecatedAPIs,\n      UnknownOwner\n    )();\n    var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));\n    var didWarnAboutMaps = !1,\n      userProvidedKeyEscapeRegex = /\\/+/g,\n      reportGlobalError =\n        \"function\" === typeof reportError\n          ? reportError\n          : function (error) {\n              if (\n                \"object\" === typeof window &&\n                \"function\" === typeof window.ErrorEvent\n              ) {\n                var event = new window.ErrorEvent(\"error\", {\n                  bubbles: !0,\n                  cancelable: !0,\n                  message:\n                    \"object\" === typeof error &&\n                    null !== error &&\n                    \"string\" === typeof error.message\n                      ? String(error.message)\n                      : String(error),\n                  error: error\n                });\n                if (!window.dispatchEvent(event)) return;\n              } else if (\n                \"object\" === typeof process &&\n                \"function\" === typeof process.emit\n              ) {\n                process.emit(\"uncaughtException\", error);\n                return;\n              }\n              console.error(error);\n            },\n      didWarnAboutMessageChannel = !1,\n      enqueueTaskImpl = null,\n      actScopeDepth = 0,\n      didWarnNoAwaitAct = !1,\n      isFlushing = !1,\n      queueSeveralMicrotasks =\n        \"function\" === typeof queueMicrotask\n          ? function (callback) {\n              queueMicrotask(function () {\n                return queueMicrotask(callback);\n              });\n            }\n          : enqueueTask;\n    deprecatedAPIs = Object.freeze({\n      __proto__: null,\n      c: function (size) {\n        return resolveDispatcher().useMemoCache(size);\n      }\n    });\n    var fnName = {\n      map: mapChildren,\n      forEach: function (children, forEachFunc, forEachContext) {\n        mapChildren(\n          children,\n          function () {\n            forEachFunc.apply(this, arguments);\n          },\n          forEachContext\n        );\n      },\n      count: function (children) {\n        var n = 0;\n        mapChildren(children, function () {\n          n++;\n        });\n        return n;\n      },\n      toArray: function (children) {\n        return (\n          mapChildren(children, function (child) {\n            return child;\n          }) || []\n        );\n      },\n      only: function (children) {\n        if (!isValidElement(children))\n          throw Error(\n            \"React.Children.only expected to receive a single React element child.\"\n          );\n        return children;\n      }\n    };\n    exports.Activity = REACT_ACTIVITY_TYPE;\n    exports.Children = fnName;\n    exports.Component = Component;\n    exports.Fragment = REACT_FRAGMENT_TYPE;\n    exports.Profiler = REACT_PROFILER_TYPE;\n    exports.PureComponent = PureComponent;\n    exports.StrictMode = REACT_STRICT_MODE_TYPE;\n    exports.Suspense = REACT_SUSPENSE_TYPE;\n    exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =\n      ReactSharedInternals;\n    exports.__COMPILER_RUNTIME = deprecatedAPIs;\n    exports.act = function (callback) {\n      var prevActQueue = ReactSharedInternals.actQueue,\n        prevActScopeDepth = actScopeDepth;\n      actScopeDepth++;\n      var queue = (ReactSharedInternals.actQueue =\n          null !== prevActQueue ? prevActQueue : []),\n        didAwaitActCall = !1;\n      try {\n        var result = callback();\n      } catch (error) {\n        ReactSharedInternals.thrownErrors.push(error);\n      }\n      if (0 < ReactSharedInternals.thrownErrors.length)\n        throw (\n          (popActScope(prevActQueue, prevActScopeDepth),\n          (callback = aggregateErrors(ReactSharedInternals.thrownErrors)),\n          (ReactSharedInternals.thrownErrors.length = 0),\n          callback)\n        );\n      if (\n        null !== result &&\n        \"object\" === typeof result &&\n        \"function\" === typeof result.then\n      ) {\n        var thenable = result;\n        queueSeveralMicrotasks(function () {\n          didAwaitActCall ||\n            didWarnNoAwaitAct ||\n            ((didWarnNoAwaitAct = !0),\n            console.error(\n              \"You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);\"\n            ));\n        });\n        return {\n          then: function (resolve, reject) {\n            didAwaitActCall = !0;\n            thenable.then(\n              function (returnValue) {\n                popActScope(prevActQueue, prevActScopeDepth);\n                if (0 === prevActScopeDepth) {\n                  try {\n                    flushActQueue(queue),\n                      enqueueTask(function () {\n                        return recursivelyFlushAsyncActWork(\n                          returnValue,\n                          resolve,\n                          reject\n                        );\n                      });\n                  } catch (error$0) {\n                    ReactSharedInternals.thrownErrors.push(error$0);\n                  }\n                  if (0 < ReactSharedInternals.thrownErrors.length) {\n                    var _thrownError = aggregateErrors(\n                      ReactSharedInternals.thrownErrors\n                    );\n                    ReactSharedInternals.thrownErrors.length = 0;\n                    reject(_thrownError);\n                  }\n                } else resolve(returnValue);\n              },\n              function (error) {\n                popActScope(prevActQueue, prevActScopeDepth);\n                0 < ReactSharedInternals.thrownErrors.length\n                  ? ((error = aggregateErrors(\n                      ReactSharedInternals.thrownErrors\n                    )),\n                    (ReactSharedInternals.thrownErrors.length = 0),\n                    reject(error))\n                  : reject(error);\n              }\n            );\n          }\n        };\n      }\n      var returnValue$jscomp$0 = result;\n      popActScope(prevActQueue, prevActScopeDepth);\n      0 === prevActScopeDepth &&\n        (flushActQueue(queue),\n        0 !== queue.length &&\n          queueSeveralMicrotasks(function () {\n            didAwaitActCall ||\n              didWarnNoAwaitAct ||\n              ((didWarnNoAwaitAct = !0),\n              console.error(\n                \"A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\\n\\nawait act(() => ...)\"\n              ));\n          }),\n        (ReactSharedInternals.actQueue = null));\n      if (0 < ReactSharedInternals.thrownErrors.length)\n        throw (\n          ((callback = aggregateErrors(ReactSharedInternals.thrownErrors)),\n          (ReactSharedInternals.thrownErrors.length = 0),\n          callback)\n        );\n      return {\n        then: function (resolve, reject) {\n          didAwaitActCall = !0;\n          0 === prevActScopeDepth\n            ? ((ReactSharedInternals.actQueue = queue),\n              enqueueTask(function () {\n                return recursivelyFlushAsyncActWork(\n                  returnValue$jscomp$0,\n                  resolve,\n                  reject\n                );\n              }))\n            : resolve(returnValue$jscomp$0);\n        }\n      };\n    };\n    exports.cache = function (fn) {\n      return function () {\n        return fn.apply(null, arguments);\n      };\n    };\n    exports.cacheSignal = function () {\n      return null;\n    };\n    exports.captureOwnerStack = function () {\n      var getCurrentStack = ReactSharedInternals.getCurrentStack;\n      return null === getCurrentStack ? null : getCurrentStack();\n    };\n    exports.cloneElement = function (element, config, children) {\n      if (null === element || void 0 === element)\n        throw Error(\n          \"The argument must be a React element, but you passed \" +\n            element +\n            \".\"\n        );\n      var props = assign({}, element.props),\n        key = element.key,\n        owner = element._owner;\n      if (null != config) {\n        var JSCompiler_inline_result;\n        a: {\n          if (\n            hasOwnProperty.call(config, \"ref\") &&\n            (JSCompiler_inline_result = Object.getOwnPropertyDescriptor(\n              config,\n              \"ref\"\n            ).get) &&\n            JSCompiler_inline_result.isReactWarning\n          ) {\n            JSCompiler_inline_result = !1;\n            break a;\n          }\n          JSCompiler_inline_result = void 0 !== config.ref;\n        }\n        JSCompiler_inline_result && (owner = getOwner());\n        hasValidKey(config) &&\n          (checkKeyStringCoercion(config.key), (key = \"\" + config.key));\n        for (propName in config)\n          !hasOwnProperty.call(config, propName) ||\n            \"key\" === propName ||\n            \"__self\" === propName ||\n            \"__source\" === propName ||\n            (\"ref\" === propName && void 0 === config.ref) ||\n            (props[propName] = config[propName]);\n      }\n      var propName = arguments.length - 2;\n      if (1 === propName) props.children = children;\n      else if (1 < propName) {\n        JSCompiler_inline_result = Array(propName);\n        for (var i = 0; i < propName; i++)\n          JSCompiler_inline_result[i] = arguments[i + 2];\n        props.children = JSCompiler_inline_result;\n      }\n      props = ReactElement(\n        element.type,\n        key,\n        props,\n        owner,\n        element._debugStack,\n        element._debugTask\n      );\n      for (key = 2; key < arguments.length; key++)\n        validateChildKeys(arguments[key]);\n      return props;\n    };\n    exports.createContext = function (defaultValue) {\n      defaultValue = {\n        $$typeof: REACT_CONTEXT_TYPE,\n        _currentValue: defaultValue,\n        _currentValue2: defaultValue,\n        _threadCount: 0,\n        Provider: null,\n        Consumer: null\n      };\n      defaultValue.Provider = defaultValue;\n      defaultValue.Consumer = {\n        $$typeof: REACT_CONSUMER_TYPE,\n        _context: defaultValue\n      };\n      defaultValue._currentRenderer = null;\n      defaultValue._currentRenderer2 = null;\n      return defaultValue;\n    };\n    exports.createElement = function (type, config, children) {\n      for (var i = 2; i < arguments.length; i++)\n        validateChildKeys(arguments[i]);\n      i = {};\n      var key = null;\n      if (null != config)\n        for (propName in (didWarnAboutOldJSXRuntime ||\n          !(\"__self\" in config) ||\n          \"key\" in config ||\n          ((didWarnAboutOldJSXRuntime = !0),\n          console.warn(\n            \"Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform\"\n          )),\n        hasValidKey(config) &&\n          (checkKeyStringCoercion(config.key), (key = \"\" + config.key)),\n        config))\n          hasOwnProperty.call(config, propName) &&\n            \"key\" !== propName &&\n            \"__self\" !== propName &&\n            \"__source\" !== propName &&\n            (i[propName] = config[propName]);\n      var childrenLength = arguments.length - 2;\n      if (1 === childrenLength) i.children = children;\n      else if (1 < childrenLength) {\n        for (\n          var childArray = Array(childrenLength), _i = 0;\n          _i < childrenLength;\n          _i++\n        )\n          childArray[_i] = arguments[_i + 2];\n        Object.freeze && Object.freeze(childArray);\n        i.children = childArray;\n      }\n      if (type && type.defaultProps)\n        for (propName in ((childrenLength = type.defaultProps), childrenLength))\n          void 0 === i[propName] && (i[propName] = childrenLength[propName]);\n      key &&\n        defineKeyPropWarningGetter(\n          i,\n          \"function\" === typeof type\n            ? type.displayName || type.name || \"Unknown\"\n            : type\n        );\n      var propName = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n      return ReactElement(\n        type,\n        key,\n        i,\n        getOwner(),\n        propName ? Error(\"react-stack-top-frame\") : unknownOwnerDebugStack,\n        propName ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n      );\n    };\n    exports.createRef = function () {\n      var refObject = { current: null };\n      Object.seal(refObject);\n      return refObject;\n    };\n    exports.forwardRef = function (render) {\n      null != render && render.$$typeof === REACT_MEMO_TYPE\n        ? console.error(\n            \"forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...)).\"\n          )\n        : \"function\" !== typeof render\n          ? console.error(\n              \"forwardRef requires a render function but was given %s.\",\n              null === render ? \"null\" : typeof render\n            )\n          : 0 !== render.length &&\n            2 !== render.length &&\n            console.error(\n              \"forwardRef render functions accept exactly two parameters: props and ref. %s\",\n              1 === render.length\n                ? \"Did you forget to use the ref parameter?\"\n                : \"Any additional parameter will be undefined.\"\n            );\n      null != render &&\n        null != render.defaultProps &&\n        console.error(\n          \"forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?\"\n        );\n      var elementType = { $$typeof: REACT_FORWARD_REF_TYPE, render: render },\n        ownName;\n      Object.defineProperty(elementType, \"displayName\", {\n        enumerable: !1,\n        configurable: !0,\n        get: function () {\n          return ownName;\n        },\n        set: function (name) {\n          ownName = name;\n          render.name ||\n            render.displayName ||\n            (Object.defineProperty(render, \"name\", { value: name }),\n            (render.displayName = name));\n        }\n      });\n      return elementType;\n    };\n    exports.isValidElement = isValidElement;\n    exports.lazy = function (ctor) {\n      ctor = { _status: -1, _result: ctor };\n      var lazyType = {\n          $$typeof: REACT_LAZY_TYPE,\n          _payload: ctor,\n          _init: lazyInitializer\n        },\n        ioInfo = {\n          name: \"lazy\",\n          start: -1,\n          end: -1,\n          value: null,\n          owner: null,\n          debugStack: Error(\"react-stack-top-frame\"),\n          debugTask: console.createTask ? console.createTask(\"lazy()\") : null\n        };\n      ctor._ioInfo = ioInfo;\n      lazyType._debugInfo = [{ awaited: ioInfo }];\n      return lazyType;\n    };\n    exports.memo = function (type, compare) {\n      null == type &&\n        console.error(\n          \"memo: The first argument must be a component. Instead received: %s\",\n          null === type ? \"null\" : typeof type\n        );\n      compare = {\n        $$typeof: REACT_MEMO_TYPE,\n        type: type,\n        compare: void 0 === compare ? null : compare\n      };\n      var ownName;\n      Object.defineProperty(compare, \"displayName\", {\n        enumerable: !1,\n        configurable: !0,\n        get: function () {\n          return ownName;\n        },\n        set: function (name) {\n          ownName = name;\n          type.name ||\n            type.displayName ||\n            (Object.defineProperty(type, \"name\", { value: name }),\n            (type.displayName = name));\n        }\n      });\n      return compare;\n    };\n    exports.startTransition = function (scope) {\n      var prevTransition = ReactSharedInternals.T,\n        currentTransition = {};\n      currentTransition._updatedFibers = new Set();\n      ReactSharedInternals.T = currentTransition;\n      try {\n        var returnValue = scope(),\n          onStartTransitionFinish = ReactSharedInternals.S;\n        null !== onStartTransitionFinish &&\n          onStartTransitionFinish(currentTransition, returnValue);\n        \"object\" === typeof returnValue &&\n          null !== returnValue &&\n          \"function\" === typeof returnValue.then &&\n          (ReactSharedInternals.asyncTransitions++,\n          returnValue.then(releaseAsyncTransition, releaseAsyncTransition),\n          returnValue.then(noop, reportGlobalError));\n      } catch (error) {\n        reportGlobalError(error);\n      } finally {\n        null === prevTransition &&\n          currentTransition._updatedFibers &&\n          ((scope = currentTransition._updatedFibers.size),\n          currentTransition._updatedFibers.clear(),\n          10 < scope &&\n            console.warn(\n              \"Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.\"\n            )),\n          null !== prevTransition &&\n            null !== currentTransition.types &&\n            (null !== prevTransition.types &&\n              prevTransition.types !== currentTransition.types &&\n              console.error(\n                \"We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React.\"\n              ),\n            (prevTransition.types = currentTransition.types)),\n          (ReactSharedInternals.T = prevTransition);\n      }\n    };\n    exports.unstable_useCacheRefresh = function () {\n      return resolveDispatcher().useCacheRefresh();\n    };\n    exports.use = function (usable) {\n      return resolveDispatcher().use(usable);\n    };\n    exports.useActionState = function (action, initialState, permalink) {\n      return resolveDispatcher().useActionState(\n        action,\n        initialState,\n        permalink\n      );\n    };\n    exports.useCallback = function (callback, deps) {\n      return resolveDispatcher().useCallback(callback, deps);\n    };\n    exports.useContext = function (Context) {\n      var dispatcher = resolveDispatcher();\n      Context.$$typeof === REACT_CONSUMER_TYPE &&\n        console.error(\n          \"Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?\"\n        );\n      return dispatcher.useContext(Context);\n    };\n    exports.useDebugValue = function (value, formatterFn) {\n      return resolveDispatcher().useDebugValue(value, formatterFn);\n    };\n    exports.useDeferredValue = function (value, initialValue) {\n      return resolveDispatcher().useDeferredValue(value, initialValue);\n    };\n    exports.useEffect = function (create, deps) {\n      null == create &&\n        console.warn(\n          \"React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?\"\n        );\n      return resolveDispatcher().useEffect(create, deps);\n    };\n    exports.useEffectEvent = function (callback) {\n      return resolveDispatcher().useEffectEvent(callback);\n    };\n    exports.useId = function () {\n      return resolveDispatcher().useId();\n    };\n    exports.useImperativeHandle = function (ref, create, deps) {\n      return resolveDispatcher().useImperativeHandle(ref, create, deps);\n    };\n    exports.useInsertionEffect = function (create, deps) {\n      null == create &&\n        console.warn(\n          \"React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?\"\n        );\n      return resolveDispatcher().useInsertionEffect(create, deps);\n    };\n    exports.useLayoutEffect = function (create, deps) {\n      null == create &&\n        console.warn(\n          \"React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?\"\n        );\n      return resolveDispatcher().useLayoutEffect(create, deps);\n    };\n    exports.useMemo = function (create, deps) {\n      return resolveDispatcher().useMemo(create, deps);\n    };\n    exports.useOptimistic = function (passthrough, reducer) {\n      return resolveDispatcher().useOptimistic(passthrough, reducer);\n    };\n    exports.useReducer = function (reducer, initialArg, init) {\n      return resolveDispatcher().useReducer(reducer, initialArg, init);\n    };\n    exports.useRef = function (initialValue) {\n      return resolveDispatcher().useRef(initialValue);\n    };\n    exports.useState = function (initialState) {\n      return resolveDispatcher().useState(initialState);\n    };\n    exports.useSyncExternalStore = function (\n      subscribe,\n      getSnapshot,\n      getServerSnapshot\n    ) {\n      return resolveDispatcher().useSyncExternalStore(\n        subscribe,\n        getSnapshot,\n        getServerSnapshot\n      );\n    };\n    exports.useTransition = function () {\n      return resolveDispatcher().useTransition();\n    };\n    exports.version = \"19.2.8\";\n    \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n      \"function\" ===\n        typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&\n      __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());\n  })();\n", "'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n  module.exports = require('./cjs/react.production.js');\n} else {\n  module.exports = require('./cjs/react.development.js');\n}\n", "/**\n * @license React\n * react-dom.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n  (function () {\n    function noop() {}\n    function testStringCoercion(value) {\n      return \"\" + value;\n    }\n    function createPortal$1(children, containerInfo, implementation) {\n      var key =\n        3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null;\n      try {\n        testStringCoercion(key);\n        var JSCompiler_inline_result = !1;\n      } catch (e) {\n        JSCompiler_inline_result = !0;\n      }\n      JSCompiler_inline_result &&\n        (console.error(\n          \"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.\",\n          (\"function\" === typeof Symbol &&\n            Symbol.toStringTag &&\n            key[Symbol.toStringTag]) ||\n            key.constructor.name ||\n            \"Object\"\n        ),\n        testStringCoercion(key));\n      return {\n        $$typeof: REACT_PORTAL_TYPE,\n        key: null == key ? null : \"\" + key,\n        children: children,\n        containerInfo: containerInfo,\n        implementation: implementation\n      };\n    }\n    function getCrossOriginStringAs(as, input) {\n      if (\"font\" === as) return \"\";\n      if (\"string\" === typeof input)\n        return \"use-credentials\" === input ? input : \"\";\n    }\n    function getValueDescriptorExpectingObjectForWarning(thing) {\n      return null === thing\n        ? \"`null`\"\n        : void 0 === thing\n          ? \"`undefined`\"\n          : \"\" === thing\n            ? \"an empty string\"\n            : 'something with type \"' + typeof thing + '\"';\n    }\n    function getValueDescriptorExpectingEnumForWarning(thing) {\n      return null === thing\n        ? \"`null`\"\n        : void 0 === thing\n          ? \"`undefined`\"\n          : \"\" === thing\n            ? \"an empty string\"\n            : \"string\" === typeof thing\n              ? JSON.stringify(thing)\n              : \"number\" === typeof thing\n                ? \"`\" + thing + \"`\"\n                : 'something with type \"' + typeof thing + '\"';\n    }\n    function resolveDispatcher() {\n      var dispatcher = ReactSharedInternals.H;\n      null === dispatcher &&\n        console.error(\n          \"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\\n1. You might have mismatching versions of React and the renderer (such as React DOM)\\n2. You might be breaking the Rules of Hooks\\n3. You might have more than one copy of React in the same app\\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.\"\n        );\n      return dispatcher;\n    }\n    \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n      \"function\" ===\n        typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&\n      __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());\n    var React = require(\"react\"),\n      Internals = {\n        d: {\n          f: noop,\n          r: function () {\n            throw Error(\n              \"Invalid form element. requestFormReset must be passed a form that was rendered by React.\"\n            );\n          },\n          D: noop,\n          C: noop,\n          L: noop,\n          m: noop,\n          X: noop,\n          S: noop,\n          M: noop\n        },\n        p: 0,\n        findDOMNode: null\n      },\n      REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n      ReactSharedInternals =\n        React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;\n    (\"function\" === typeof Map &&\n      null != Map.prototype &&\n      \"function\" === typeof Map.prototype.forEach &&\n      \"function\" === typeof Set &&\n      null != Set.prototype &&\n      \"function\" === typeof Set.prototype.clear &&\n      \"function\" === typeof Set.prototype.forEach) ||\n      console.error(\n        \"React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills\"\n      );\n    exports.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =\n      Internals;\n    exports.createPortal = function (children, container) {\n      var key =\n        2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null;\n      if (\n        !container ||\n        (1 !== container.nodeType &&\n          9 !== container.nodeType &&\n          11 !== container.nodeType)\n      )\n        throw Error(\"Target container is not a DOM element.\");\n      return createPortal$1(children, container, null, key);\n    };\n    exports.flushSync = function (fn) {\n      var previousTransition = ReactSharedInternals.T,\n        previousUpdatePriority = Internals.p;\n      try {\n        if (((ReactSharedInternals.T = null), (Internals.p = 2), fn))\n          return fn();\n      } finally {\n        (ReactSharedInternals.T = previousTransition),\n          (Internals.p = previousUpdatePriority),\n          Internals.d.f() &&\n            console.error(\n              \"flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task.\"\n            );\n      }\n    };\n    exports.preconnect = function (href, options) {\n      \"string\" === typeof href && href\n        ? null != options && \"object\" !== typeof options\n          ? console.error(\n              \"ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.\",\n              getValueDescriptorExpectingEnumForWarning(options)\n            )\n          : null != options &&\n            \"string\" !== typeof options.crossOrigin &&\n            console.error(\n              \"ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.\",\n              getValueDescriptorExpectingObjectForWarning(options.crossOrigin)\n            )\n        : console.error(\n            \"ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.\",\n            getValueDescriptorExpectingObjectForWarning(href)\n          );\n      \"string\" === typeof href &&\n        (options\n          ? ((options = options.crossOrigin),\n            (options =\n              \"string\" === typeof options\n                ? \"use-credentials\" === options\n                  ? options\n                  : \"\"\n                : void 0))\n          : (options = null),\n        Internals.d.C(href, options));\n    };\n    exports.prefetchDNS = function (href) {\n      if (\"string\" !== typeof href || !href)\n        console.error(\n          \"ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.\",\n          getValueDescriptorExpectingObjectForWarning(href)\n        );\n      else if (1 < arguments.length) {\n        var options = arguments[1];\n        \"object\" === typeof options && options.hasOwnProperty(\"crossOrigin\")\n          ? console.error(\n              \"ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.\",\n              getValueDescriptorExpectingEnumForWarning(options)\n            )\n          : console.error(\n              \"ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.\",\n              getValueDescriptorExpectingEnumForWarning(options)\n            );\n      }\n      \"string\" === typeof href && Internals.d.D(href);\n    };\n    exports.preinit = function (href, options) {\n      \"string\" === typeof href && href\n        ? null == options || \"object\" !== typeof options\n          ? console.error(\n              \"ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.\",\n              getValueDescriptorExpectingEnumForWarning(options)\n            )\n          : \"style\" !== options.as &&\n            \"script\" !== options.as &&\n            console.error(\n              'ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are \"style\" and \"script\".',\n              getValueDescriptorExpectingEnumForWarning(options.as)\n            )\n        : console.error(\n            \"ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.\",\n            getValueDescriptorExpectingObjectForWarning(href)\n          );\n      if (\n        \"string\" === typeof href &&\n        options &&\n        \"string\" === typeof options.as\n      ) {\n        var as = options.as,\n          crossOrigin = getCrossOriginStringAs(as, options.crossOrigin),\n          integrity =\n            \"string\" === typeof options.integrity ? options.integrity : void 0,\n          fetchPriority =\n            \"string\" === typeof options.fetchPriority\n              ? options.fetchPriority\n              : void 0;\n        \"style\" === as\n          ? Internals.d.S(\n              href,\n              \"string\" === typeof options.precedence\n                ? options.precedence\n                : void 0,\n              {\n                crossOrigin: crossOrigin,\n                integrity: integrity,\n                fetchPriority: fetchPriority\n              }\n            )\n          : \"script\" === as &&\n            Internals.d.X(href, {\n              crossOrigin: crossOrigin,\n              integrity: integrity,\n              fetchPriority: fetchPriority,\n              nonce: \"string\" === typeof options.nonce ? options.nonce : void 0\n            });\n      }\n    };\n    exports.preinitModule = function (href, options) {\n      var encountered = \"\";\n      (\"string\" === typeof href && href) ||\n        (encountered +=\n          \" The `href` argument encountered was \" +\n          getValueDescriptorExpectingObjectForWarning(href) +\n          \".\");\n      void 0 !== options && \"object\" !== typeof options\n        ? (encountered +=\n            \" The `options` argument encountered was \" +\n            getValueDescriptorExpectingObjectForWarning(options) +\n            \".\")\n        : options &&\n          \"as\" in options &&\n          \"script\" !== options.as &&\n          (encountered +=\n            \" The `as` option encountered was \" +\n            getValueDescriptorExpectingEnumForWarning(options.as) +\n            \".\");\n      if (encountered)\n        console.error(\n          \"ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s\",\n          encountered\n        );\n      else\n        switch (\n          ((encountered =\n            options && \"string\" === typeof options.as ? options.as : \"script\"),\n          encountered)\n        ) {\n          case \"script\":\n            break;\n          default:\n            (encountered =\n              getValueDescriptorExpectingEnumForWarning(encountered)),\n              console.error(\n                'ReactDOM.preinitModule(): Currently the only supported \"as\" type for this function is \"script\" but received \"%s\" instead. This warning was generated for `href` \"%s\". In the future other module types will be supported, aligning with the import-attributes proposal. Learn more here: (https://github.com/tc39/proposal-import-attributes)',\n                encountered,\n                href\n              );\n        }\n      if (\"string\" === typeof href)\n        if (\"object\" === typeof options && null !== options) {\n          if (null == options.as || \"script\" === options.as)\n            (encountered = getCrossOriginStringAs(\n              options.as,\n              options.crossOrigin\n            )),\n              Internals.d.M(href, {\n                crossOrigin: encountered,\n                integrity:\n                  \"string\" === typeof options.integrity\n                    ? options.integrity\n                    : void 0,\n                nonce:\n                  \"string\" === typeof options.nonce ? options.nonce : void 0\n              });\n        } else null == options && Internals.d.M(href);\n    };\n    exports.preload = function (href, options) {\n      var encountered = \"\";\n      (\"string\" === typeof href && href) ||\n        (encountered +=\n          \" The `href` argument encountered was \" +\n          getValueDescriptorExpectingObjectForWarning(href) +\n          \".\");\n      null == options || \"object\" !== typeof options\n        ? (encountered +=\n            \" The `options` argument encountered was \" +\n            getValueDescriptorExpectingObjectForWarning(options) +\n            \".\")\n        : (\"string\" === typeof options.as && options.as) ||\n          (encountered +=\n            \" The `as` option encountered was \" +\n            getValueDescriptorExpectingObjectForWarning(options.as) +\n            \".\");\n      encountered &&\n        console.error(\n          'ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `<link rel=\"preload\" as=\"...\" />` tag.%s',\n          encountered\n        );\n      if (\n        \"string\" === typeof href &&\n        \"object\" === typeof options &&\n        null !== options &&\n        \"string\" === typeof options.as\n      ) {\n        encountered = options.as;\n        var crossOrigin = getCrossOriginStringAs(\n          encountered,\n          options.crossOrigin\n        );\n        Internals.d.L(href, encountered, {\n          crossOrigin: crossOrigin,\n          integrity:\n            \"string\" === typeof options.integrity ? options.integrity : void 0,\n          nonce: \"string\" === typeof options.nonce ? options.nonce : void 0,\n          type: \"string\" === typeof options.type ? options.type : void 0,\n          fetchPriority:\n            \"string\" === typeof options.fetchPriority\n              ? options.fetchPriority\n              : void 0,\n          referrerPolicy:\n            \"string\" === typeof options.referrerPolicy\n              ? options.referrerPolicy\n              : void 0,\n          imageSrcSet:\n            \"string\" === typeof options.imageSrcSet\n              ? options.imageSrcSet\n              : void 0,\n          imageSizes:\n            \"string\" === typeof options.imageSizes\n              ? options.imageSizes\n              : void 0,\n          media: \"string\" === typeof options.media ? options.media : void 0\n        });\n      }\n    };\n    exports.preloadModule = function (href, options) {\n      var encountered = \"\";\n      (\"string\" === typeof href && href) ||\n        (encountered +=\n          \" The `href` argument encountered was \" +\n          getValueDescriptorExpectingObjectForWarning(href) +\n          \".\");\n      void 0 !== options && \"object\" !== typeof options\n        ? (encountered +=\n            \" The `options` argument encountered was \" +\n            getValueDescriptorExpectingObjectForWarning(options) +\n            \".\")\n        : options &&\n          \"as\" in options &&\n          \"string\" !== typeof options.as &&\n          (encountered +=\n            \" The `as` option encountered was \" +\n            getValueDescriptorExpectingObjectForWarning(options.as) +\n            \".\");\n      encountered &&\n        console.error(\n          'ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `<link rel=\"modulepreload\" as=\"...\" />` tag.%s',\n          encountered\n        );\n      \"string\" === typeof href &&\n        (options\n          ? ((encountered = getCrossOriginStringAs(\n              options.as,\n              options.crossOrigin\n            )),\n            Internals.d.m(href, {\n              as:\n                \"string\" === typeof options.as && \"script\" !== options.as\n                  ? options.as\n                  : void 0,\n              crossOrigin: encountered,\n              integrity:\n                \"string\" === typeof options.integrity\n                  ? options.integrity\n                  : void 0\n            }))\n          : Internals.d.m(href));\n    };\n    exports.requestFormReset = function (form) {\n      Internals.d.r(form);\n    };\n    exports.unstable_batchedUpdates = function (fn, a) {\n      return fn(a);\n    };\n    exports.useFormState = function (action, initialState, permalink) {\n      return resolveDispatcher().useFormState(action, initialState, permalink);\n    };\n    exports.useFormStatus = function () {\n      return resolveDispatcher().useHostTransitionStatus();\n    };\n    exports.version = \"19.2.8\";\n    \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n      \"function\" ===\n        typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&\n      __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());\n  })();\n", "'use strict';\n\nfunction checkDCE() {\n  /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\n  if (\n    typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' ||\n    typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function'\n  ) {\n    return;\n  }\n  if (process.env.NODE_ENV !== 'production') {\n    // This branch is unreachable because this function is only called\n    // in production, but the condition is true only in development.\n    // Therefore if the branch is still here, dead code elimination wasn't\n    // properly applied.\n    // Don't change the message. React DevTools relies on it. Also make sure\n    // this message doesn't occur elsewhere in this function, or it will cause\n    // a false positive.\n    throw new Error('^_^');\n  }\n  try {\n    // Verify that the code above has been dead code eliminated (DCE'd).\n    __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);\n  } catch (err) {\n    // DevTools shouldn't crash React, no matter what.\n    // We should still report in case we break this code.\n    console.error(err);\n  }\n}\n\nif (process.env.NODE_ENV === 'production') {\n  // DCE check should happen before ReactDOM bundle executes so that\n  // DevTools can report bad minification during injection.\n  checkDCE();\n  module.exports = require('./cjs/react-dom.production.js');\n} else {\n  module.exports = require('./cjs/react-dom.development.js');\n}\n", "/**\n * @license React\n * react-dom-server-legacy.browser.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n/*\n\n\n JS Implementation of MurmurHash3 (r136) (as of May 20, 2011)\n\n Copyright (c) 2011 Gary Court\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in\n all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n*/\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n  (function () {\n    function styleReplacer(match, prefix, s, suffix) {\n      return \"\" + prefix + (\"s\" === s ? \"\\\\73 \" : \"\\\\53 \") + suffix;\n    }\n    function scriptReplacer(match, prefix, s, suffix) {\n      return \"\" + prefix + (\"s\" === s ? \"\\\\u0073\" : \"\\\\u0053\") + suffix;\n    }\n    function getIteratorFn(maybeIterable) {\n      if (null === maybeIterable || \"object\" !== typeof maybeIterable)\n        return null;\n      maybeIterable =\n        (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||\n        maybeIterable[\"@@iterator\"];\n      return \"function\" === typeof maybeIterable ? maybeIterable : null;\n    }\n    function objectName(object) {\n      object = Object.prototype.toString.call(object);\n      return object.slice(8, object.length - 1);\n    }\n    function describeKeyForErrorMessage(key) {\n      var encodedKey = JSON.stringify(key);\n      return '\"' + key + '\"' === encodedKey ? key : encodedKey;\n    }\n    function describeValueForErrorMessage(value) {\n      switch (typeof value) {\n        case \"string\":\n          return JSON.stringify(\n            10 >= value.length ? value : value.slice(0, 10) + \"...\"\n          );\n        case \"object\":\n          if (isArrayImpl(value)) return \"[...]\";\n          if (null !== value && value.$$typeof === CLIENT_REFERENCE_TAG)\n            return \"client\";\n          value = objectName(value);\n          return \"Object\" === value ? \"{...}\" : value;\n        case \"function\":\n          return value.$$typeof === CLIENT_REFERENCE_TAG\n            ? \"client\"\n            : (value = value.displayName || value.name)\n              ? \"function \" + value\n              : \"function\";\n        default:\n          return String(value);\n      }\n    }\n    function describeElementType(type) {\n      if (\"string\" === typeof type) return type;\n      switch (type) {\n        case REACT_SUSPENSE_TYPE:\n          return \"Suspense\";\n        case REACT_SUSPENSE_LIST_TYPE:\n          return \"SuspenseList\";\n      }\n      if (\"object\" === typeof type)\n        switch (type.$$typeof) {\n          case REACT_FORWARD_REF_TYPE:\n            return describeElementType(type.render);\n          case REACT_MEMO_TYPE:\n            return describeElementType(type.type);\n          case REACT_LAZY_TYPE:\n            var payload = type._payload;\n            type = type._init;\n            try {\n              return describeElementType(type(payload));\n            } catch (x) {}\n        }\n      return \"\";\n    }\n    function describeObjectForErrorMessage(objectOrArray, expandedName) {\n      var objKind = objectName(objectOrArray);\n      if (\"Object\" !== objKind && \"Array\" !== objKind) return objKind;\n      var start = -1,\n        length = 0;\n      if (isArrayImpl(objectOrArray))\n        if (jsxChildrenParents.has(objectOrArray)) {\n          var type = jsxChildrenParents.get(objectOrArray);\n          objKind = \"<\" + describeElementType(type) + \">\";\n          for (var i = 0; i < objectOrArray.length; i++) {\n            var value = objectOrArray[i];\n            value =\n              \"string\" === typeof value\n                ? value\n                : \"object\" === typeof value && null !== value\n                  ? \"{\" + describeObjectForErrorMessage(value) + \"}\"\n                  : \"{\" + describeValueForErrorMessage(value) + \"}\";\n            \"\" + i === expandedName\n              ? ((start = objKind.length),\n                (length = value.length),\n                (objKind += value))\n              : (objKind =\n                  15 > value.length && 40 > objKind.length + value.length\n                    ? objKind + value\n                    : objKind + \"{...}\");\n          }\n          objKind += \"</\" + describeElementType(type) + \">\";\n        } else {\n          objKind = \"[\";\n          for (type = 0; type < objectOrArray.length; type++)\n            0 < type && (objKind += \", \"),\n              (i = objectOrArray[type]),\n              (i =\n                \"object\" === typeof i && null !== i\n                  ? describeObjectForErrorMessage(i)\n                  : describeValueForErrorMessage(i)),\n              \"\" + type === expandedName\n                ? ((start = objKind.length),\n                  (length = i.length),\n                  (objKind += i))\n                : (objKind =\n                    10 > i.length && 40 > objKind.length + i.length\n                      ? objKind + i\n                      : objKind + \"...\");\n          objKind += \"]\";\n        }\n      else if (objectOrArray.$$typeof === REACT_ELEMENT_TYPE)\n        objKind = \"<\" + describeElementType(objectOrArray.type) + \"/>\";\n      else {\n        if (objectOrArray.$$typeof === CLIENT_REFERENCE_TAG) return \"client\";\n        if (jsxPropsParents.has(objectOrArray)) {\n          objKind = jsxPropsParents.get(objectOrArray);\n          objKind = \"<\" + (describeElementType(objKind) || \"...\");\n          type = Object.keys(objectOrArray);\n          for (i = 0; i < type.length; i++) {\n            objKind += \" \";\n            value = type[i];\n            objKind += describeKeyForErrorMessage(value) + \"=\";\n            var _value2 = objectOrArray[value];\n            var _substr2 =\n              value === expandedName &&\n              \"object\" === typeof _value2 &&\n              null !== _value2\n                ? describeObjectForErrorMessage(_value2)\n                : describeValueForErrorMessage(_value2);\n            \"string\" !== typeof _value2 && (_substr2 = \"{\" + _substr2 + \"}\");\n            value === expandedName\n              ? ((start = objKind.length),\n                (length = _substr2.length),\n                (objKind += _substr2))\n              : (objKind =\n                  10 > _substr2.length && 40 > objKind.length + _substr2.length\n                    ? objKind + _substr2\n                    : objKind + \"...\");\n          }\n          objKind += \">\";\n        } else {\n          objKind = \"{\";\n          type = Object.keys(objectOrArray);\n          for (i = 0; i < type.length; i++)\n            0 < i && (objKind += \", \"),\n              (value = type[i]),\n              (objKind += describeKeyForErrorMessage(value) + \": \"),\n              (_value2 = objectOrArray[value]),\n              (_value2 =\n                \"object\" === typeof _value2 && null !== _value2\n                  ? describeObjectForErrorMessage(_value2)\n                  : describeValueForErrorMessage(_value2)),\n              value === expandedName\n                ? ((start = objKind.length),\n                  (length = _value2.length),\n                  (objKind += _value2))\n                : (objKind =\n                    10 > _value2.length && 40 > objKind.length + _value2.length\n                      ? objKind + _value2\n                      : objKind + \"...\");\n          objKind += \"}\";\n        }\n      }\n      return void 0 === expandedName\n        ? objKind\n        : -1 < start && 0 < length\n          ? ((objectOrArray = \" \".repeat(start) + \"^\".repeat(length)),\n            \"\\n  \" + objKind + \"\\n  \" + objectOrArray)\n          : \"\\n  \" + objKind;\n    }\n    function murmurhash3_32_gc(key, seed) {\n      var remainder = key.length & 3;\n      var bytes = key.length - remainder;\n      var h1 = seed;\n      for (seed = 0; seed < bytes; ) {\n        var k1 =\n          (key.charCodeAt(seed) & 255) |\n          ((key.charCodeAt(++seed) & 255) << 8) |\n          ((key.charCodeAt(++seed) & 255) << 16) |\n          ((key.charCodeAt(++seed) & 255) << 24);\n        ++seed;\n        k1 =\n          (3432918353 * (k1 & 65535) +\n            (((3432918353 * (k1 >>> 16)) & 65535) << 16)) &\n          4294967295;\n        k1 = (k1 << 15) | (k1 >>> 17);\n        k1 =\n          (461845907 * (k1 & 65535) +\n            (((461845907 * (k1 >>> 16)) & 65535) << 16)) &\n          4294967295;\n        h1 ^= k1;\n        h1 = (h1 << 13) | (h1 >>> 19);\n        h1 =\n          (5 * (h1 & 65535) + (((5 * (h1 >>> 16)) & 65535) << 16)) & 4294967295;\n        h1 = (h1 & 65535) + 27492 + ((((h1 >>> 16) + 58964) & 65535) << 16);\n      }\n      k1 = 0;\n      switch (remainder) {\n        case 3:\n          k1 ^= (key.charCodeAt(seed + 2) & 255) << 16;\n        case 2:\n          k1 ^= (key.charCodeAt(seed + 1) & 255) << 8;\n        case 1:\n          (k1 ^= key.charCodeAt(seed) & 255),\n            (k1 =\n              (3432918353 * (k1 & 65535) +\n                (((3432918353 * (k1 >>> 16)) & 65535) << 16)) &\n              4294967295),\n            (k1 = (k1 << 15) | (k1 >>> 17)),\n            (h1 ^=\n              (461845907 * (k1 & 65535) +\n                (((461845907 * (k1 >>> 16)) & 65535) << 16)) &\n              4294967295);\n      }\n      h1 ^= key.length;\n      h1 ^= h1 >>> 16;\n      h1 =\n        (2246822507 * (h1 & 65535) +\n          (((2246822507 * (h1 >>> 16)) & 65535) << 16)) &\n        4294967295;\n      h1 ^= h1 >>> 13;\n      h1 =\n        (3266489909 * (h1 & 65535) +\n          (((3266489909 * (h1 >>> 16)) & 65535) << 16)) &\n        4294967295;\n      return (h1 ^ (h1 >>> 16)) >>> 0;\n    }\n    function typeName(value) {\n      return (\n        (\"function\" === typeof Symbol &&\n          Symbol.toStringTag &&\n          value[Symbol.toStringTag]) ||\n        value.constructor.name ||\n        \"Object\"\n      );\n    }\n    function willCoercionThrow(value) {\n      try {\n        return testStringCoercion(value), !1;\n      } catch (e) {\n        return !0;\n      }\n    }\n    function testStringCoercion(value) {\n      return \"\" + value;\n    }\n    function checkAttributeStringCoercion(value, attributeName) {\n      if (willCoercionThrow(value))\n        return (\n          console.error(\n            \"The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before using it here.\",\n            attributeName,\n            typeName(value)\n          ),\n          testStringCoercion(value)\n        );\n    }\n    function checkCSSPropertyStringCoercion(value, propName) {\n      if (willCoercionThrow(value))\n        return (\n          console.error(\n            \"The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before using it here.\",\n            propName,\n            typeName(value)\n          ),\n          testStringCoercion(value)\n        );\n    }\n    function checkHtmlStringCoercion(value) {\n      if (willCoercionThrow(value))\n        return (\n          console.error(\n            \"The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before using it here.\",\n            typeName(value)\n          ),\n          testStringCoercion(value)\n        );\n    }\n    function isAttributeNameSafe(attributeName) {\n      if (hasOwnProperty.call(validatedAttributeNameCache, attributeName))\n        return !0;\n      if (hasOwnProperty.call(illegalAttributeNameCache, attributeName))\n        return !1;\n      if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName))\n        return (validatedAttributeNameCache[attributeName] = !0);\n      illegalAttributeNameCache[attributeName] = !0;\n      console.error(\"Invalid attribute name: `%s`\", attributeName);\n      return !1;\n    }\n    function checkControlledValueProps(tagName, props) {\n      hasReadOnlyValue[props.type] ||\n        props.onChange ||\n        props.onInput ||\n        props.readOnly ||\n        props.disabled ||\n        null == props.value ||\n        (\"select\" === tagName\n          ? console.error(\n              \"You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set `onChange`.\"\n            )\n          : console.error(\n              \"You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.\"\n            ));\n      props.onChange ||\n        props.readOnly ||\n        props.disabled ||\n        null == props.checked ||\n        console.error(\n          \"You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.\"\n        );\n    }\n    function validateProperty$1(tagName, name) {\n      if (\n        hasOwnProperty.call(warnedProperties$1, name) &&\n        warnedProperties$1[name]\n      )\n        return !0;\n      if (rARIACamel$1.test(name)) {\n        tagName = \"aria-\" + name.slice(4).toLowerCase();\n        tagName = ariaProperties.hasOwnProperty(tagName) ? tagName : null;\n        if (null == tagName)\n          return (\n            console.error(\n              \"Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.\",\n              name\n            ),\n            (warnedProperties$1[name] = !0)\n          );\n        if (name !== tagName)\n          return (\n            console.error(\n              \"Invalid ARIA attribute `%s`. Did you mean `%s`?\",\n              name,\n              tagName\n            ),\n            (warnedProperties$1[name] = !0)\n          );\n      }\n      if (rARIA$1.test(name)) {\n        tagName = name.toLowerCase();\n        tagName = ariaProperties.hasOwnProperty(tagName) ? tagName : null;\n        if (null == tagName) return (warnedProperties$1[name] = !0), !1;\n        name !== tagName &&\n          (console.error(\n            \"Unknown ARIA attribute `%s`. Did you mean `%s`?\",\n            name,\n            tagName\n          ),\n          (warnedProperties$1[name] = !0));\n      }\n      return !0;\n    }\n    function validateProperties$2(type, props) {\n      var invalidProps = [],\n        key;\n      for (key in props)\n        validateProperty$1(type, key) || invalidProps.push(key);\n      props = invalidProps\n        .map(function (prop) {\n          return \"`\" + prop + \"`\";\n        })\n        .join(\", \");\n      1 === invalidProps.length\n        ? console.error(\n            \"Invalid aria prop %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props\",\n            props,\n            type\n          )\n        : 1 < invalidProps.length &&\n          console.error(\n            \"Invalid aria props %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props\",\n            props,\n            type\n          );\n    }\n    function validateProperty(tagName, name, value, eventRegistry) {\n      if (hasOwnProperty.call(warnedProperties, name) && warnedProperties[name])\n        return !0;\n      var lowerCasedName = name.toLowerCase();\n      if (\"onfocusin\" === lowerCasedName || \"onfocusout\" === lowerCasedName)\n        return (\n          console.error(\n            \"React uses onFocus and onBlur instead of onFocusIn and onFocusOut. All React events are normalized to bubble, so onFocusIn and onFocusOut are not needed/supported by React.\"\n          ),\n          (warnedProperties[name] = !0)\n        );\n      if (\n        \"function\" === typeof value &&\n        ((\"form\" === tagName && \"action\" === name) ||\n          (\"input\" === tagName && \"formAction\" === name) ||\n          (\"button\" === tagName && \"formAction\" === name))\n      )\n        return !0;\n      if (null != eventRegistry) {\n        tagName = eventRegistry.possibleRegistrationNames;\n        if (eventRegistry.registrationNameDependencies.hasOwnProperty(name))\n          return !0;\n        eventRegistry = tagName.hasOwnProperty(lowerCasedName)\n          ? tagName[lowerCasedName]\n          : null;\n        if (null != eventRegistry)\n          return (\n            console.error(\n              \"Invalid event handler property `%s`. Did you mean `%s`?\",\n              name,\n              eventRegistry\n            ),\n            (warnedProperties[name] = !0)\n          );\n        if (EVENT_NAME_REGEX.test(name))\n          return (\n            console.error(\n              \"Unknown event handler property `%s`. It will be ignored.\",\n              name\n            ),\n            (warnedProperties[name] = !0)\n          );\n      } else if (EVENT_NAME_REGEX.test(name))\n        return (\n          INVALID_EVENT_NAME_REGEX.test(name) &&\n            console.error(\n              \"Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.\",\n              name\n            ),\n          (warnedProperties[name] = !0)\n        );\n      if (rARIA.test(name) || rARIACamel.test(name)) return !0;\n      if (\"innerhtml\" === lowerCasedName)\n        return (\n          console.error(\n            \"Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`.\"\n          ),\n          (warnedProperties[name] = !0)\n        );\n      if (\"aria\" === lowerCasedName)\n        return (\n          console.error(\n            \"The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead.\"\n          ),\n          (warnedProperties[name] = !0)\n        );\n      if (\n        \"is\" === lowerCasedName &&\n        null !== value &&\n        void 0 !== value &&\n        \"string\" !== typeof value\n      )\n        return (\n          console.error(\n            \"Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.\",\n            typeof value\n          ),\n          (warnedProperties[name] = !0)\n        );\n      if (\"number\" === typeof value && isNaN(value))\n        return (\n          console.error(\n            \"Received NaN for the `%s` attribute. If this is expected, cast the value to a string.\",\n            name\n          ),\n          (warnedProperties[name] = !0)\n        );\n      if (possibleStandardNames.hasOwnProperty(lowerCasedName)) {\n        if (\n          ((lowerCasedName = possibleStandardNames[lowerCasedName]),\n          lowerCasedName !== name)\n        )\n          return (\n            console.error(\n              \"Invalid DOM property `%s`. Did you mean `%s`?\",\n              name,\n              lowerCasedName\n            ),\n            (warnedProperties[name] = !0)\n          );\n      } else if (name !== lowerCasedName)\n        return (\n          console.error(\n            \"React does not recognize the `%s` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `%s` instead. If you accidentally passed it from a parent component, remove it from the DOM element.\",\n            name,\n            lowerCasedName\n          ),\n          (warnedProperties[name] = !0)\n        );\n      switch (name) {\n        case \"dangerouslySetInnerHTML\":\n        case \"children\":\n        case \"style\":\n        case \"suppressContentEditableWarning\":\n        case \"suppressHydrationWarning\":\n        case \"defaultValue\":\n        case \"defaultChecked\":\n        case \"innerHTML\":\n        case \"ref\":\n          return !0;\n        case \"innerText\":\n        case \"textContent\":\n          return !0;\n      }\n      switch (typeof value) {\n        case \"boolean\":\n          switch (name) {\n            case \"autoFocus\":\n            case \"checked\":\n            case \"multiple\":\n            case \"muted\":\n            case \"selected\":\n            case \"contentEditable\":\n            case \"spellCheck\":\n            case \"draggable\":\n            case \"value\":\n            case \"autoReverse\":\n            case \"externalResourcesRequired\":\n            case \"focusable\":\n            case \"preserveAlpha\":\n            case \"allowFullScreen\":\n            case \"async\":\n            case \"autoPlay\":\n            case \"controls\":\n            case \"default\":\n            case \"defer\":\n            case \"disabled\":\n            case \"disablePictureInPicture\":\n            case \"disableRemotePlayback\":\n            case \"formNoValidate\":\n            case \"hidden\":\n            case \"loop\":\n            case \"noModule\":\n            case \"noValidate\":\n            case \"open\":\n            case \"playsInline\":\n            case \"readOnly\":\n            case \"required\":\n            case \"reversed\":\n            case \"scoped\":\n            case \"seamless\":\n            case \"itemScope\":\n            case \"capture\":\n            case \"download\":\n            case \"inert\":\n              return !0;\n            default:\n              lowerCasedName = name.toLowerCase().slice(0, 5);\n              if (\"data-\" === lowerCasedName || \"aria-\" === lowerCasedName)\n                return !0;\n              value\n                ? console.error(\n                    'Received `%s` for a non-boolean attribute `%s`.\\n\\nIf you want to write it to the DOM, pass a string instead: %s=\"%s\" or %s={value.toString()}.',\n                    value,\n                    name,\n                    name,\n                    value,\n                    name\n                  )\n                : console.error(\n                    'Received `%s` for a non-boolean attribute `%s`.\\n\\nIf you want to write it to the DOM, pass a string instead: %s=\"%s\" or %s={value.toString()}.\\n\\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.',\n                    value,\n                    name,\n                    name,\n                    value,\n                    name,\n                    name,\n                    name\n                  );\n              return (warnedProperties[name] = !0);\n          }\n        case \"function\":\n        case \"symbol\":\n          return (warnedProperties[name] = !0), !1;\n        case \"string\":\n          if (\"false\" === value || \"true\" === value) {\n            switch (name) {\n              case \"checked\":\n              case \"selected\":\n              case \"multiple\":\n              case \"muted\":\n              case \"allowFullScreen\":\n              case \"async\":\n              case \"autoPlay\":\n              case \"controls\":\n              case \"default\":\n              case \"defer\":\n              case \"disabled\":\n              case \"disablePictureInPicture\":\n              case \"disableRemotePlayback\":\n              case \"formNoValidate\":\n              case \"hidden\":\n              case \"loop\":\n              case \"noModule\":\n              case \"noValidate\":\n              case \"open\":\n              case \"playsInline\":\n              case \"readOnly\":\n              case \"required\":\n              case \"reversed\":\n              case \"scoped\":\n              case \"seamless\":\n              case \"itemScope\":\n              case \"inert\":\n                break;\n              default:\n                return !0;\n            }\n            console.error(\n              \"Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?\",\n              value,\n              name,\n              \"false\" === value\n                ? \"The browser will interpret it as a truthy value.\"\n                : 'Although this works, it will not work as expected if you pass the string \"false\".',\n              name,\n              value\n            );\n            warnedProperties[name] = !0;\n          }\n      }\n      return !0;\n    }\n    function warnUnknownProperties(type, props, eventRegistry) {\n      var unknownProps = [],\n        key;\n      for (key in props)\n        validateProperty(type, key, props[key], eventRegistry) ||\n          unknownProps.push(key);\n      props = unknownProps\n        .map(function (prop) {\n          return \"`\" + prop + \"`\";\n        })\n        .join(\", \");\n      1 === unknownProps.length\n        ? console.error(\n            \"Invalid value for prop %s on <%s> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://react.dev/link/attribute-behavior \",\n            props,\n            type\n          )\n        : 1 < unknownProps.length &&\n          console.error(\n            \"Invalid values for props %s on <%s> tag. Either remove them from the element, or pass a string or number value to keep them in the DOM. For details, see https://react.dev/link/attribute-behavior \",\n            props,\n            type\n          );\n    }\n    function camelize(string) {\n      return string.replace(hyphenPattern, function (_, character) {\n        return character.toUpperCase();\n      });\n    }\n    function escapeTextForBrowser(text) {\n      if (\n        \"boolean\" === typeof text ||\n        \"number\" === typeof text ||\n        \"bigint\" === typeof text\n      )\n        return \"\" + text;\n      checkHtmlStringCoercion(text);\n      text = \"\" + text;\n      var match = matchHtmlRegExp.exec(text);\n      if (match) {\n        var html = \"\",\n          index,\n          lastIndex = 0;\n        for (index = match.index; index < text.length; index++) {\n          switch (text.charCodeAt(index)) {\n            case 34:\n              match = \"&quot;\";\n              break;\n            case 38:\n              match = \"&amp;\";\n              break;\n            case 39:\n              match = \"&#x27;\";\n              break;\n            case 60:\n              match = \"&lt;\";\n              break;\n            case 62:\n              match = \"&gt;\";\n              break;\n            default:\n              continue;\n          }\n          lastIndex !== index && (html += text.slice(lastIndex, index));\n          lastIndex = index + 1;\n          html += match;\n        }\n        text = lastIndex !== index ? html + text.slice(lastIndex, index) : html;\n      }\n      return text;\n    }\n    function sanitizeURL(url) {\n      return isJavaScriptProtocol.test(\"\" + url)\n        ? \"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')\"\n        : url;\n    }\n    function escapeEntireInlineScriptContent(scriptText) {\n      checkHtmlStringCoercion(scriptText);\n      return (\"\" + scriptText).replace(scriptRegex, scriptReplacer);\n    }\n    function createResumableState(\n      identifierPrefix,\n      externalRuntimeConfig,\n      bootstrapScriptContent,\n      bootstrapScripts,\n      bootstrapModules\n    ) {\n      return {\n        idPrefix: void 0 === identifierPrefix ? \"\" : identifierPrefix,\n        nextFormID: 0,\n        streamingFormat: 0,\n        bootstrapScriptContent: bootstrapScriptContent,\n        bootstrapScripts: bootstrapScripts,\n        bootstrapModules: bootstrapModules,\n        instructions: NothingSent,\n        hasBody: !1,\n        hasHtml: !1,\n        unknownResources: {},\n        dnsResources: {},\n        connectResources: { default: {}, anonymous: {}, credentials: {} },\n        imageResources: {},\n        styleResources: {},\n        scriptResources: {},\n        moduleUnknownResources: {},\n        moduleScriptResources: {}\n      };\n    }\n    function createFormatContext(\n      insertionMode,\n      selectedValue,\n      tagScope,\n      viewTransition\n    ) {\n      return {\n        insertionMode: insertionMode,\n        selectedValue: selectedValue,\n        tagScope: tagScope,\n        viewTransition: viewTransition\n      };\n    }\n    function getChildFormatContext(parentContext, type, props) {\n      var subtreeScope = parentContext.tagScope & -25;\n      switch (type) {\n        case \"noscript\":\n          return createFormatContext(HTML_MODE, null, subtreeScope | 1, null);\n        case \"select\":\n          return createFormatContext(\n            HTML_MODE,\n            null != props.value ? props.value : props.defaultValue,\n            subtreeScope,\n            null\n          );\n        case \"svg\":\n          return createFormatContext(SVG_MODE, null, subtreeScope, null);\n        case \"picture\":\n          return createFormatContext(HTML_MODE, null, subtreeScope | 2, null);\n        case \"math\":\n          return createFormatContext(MATHML_MODE, null, subtreeScope, null);\n        case \"foreignObject\":\n          return createFormatContext(HTML_MODE, null, subtreeScope, null);\n        case \"table\":\n          return createFormatContext(HTML_TABLE_MODE, null, subtreeScope, null);\n        case \"thead\":\n        case \"tbody\":\n        case \"tfoot\":\n          return createFormatContext(\n            HTML_TABLE_BODY_MODE,\n            null,\n            subtreeScope,\n            null\n          );\n        case \"colgroup\":\n          return createFormatContext(\n            HTML_COLGROUP_MODE,\n            null,\n            subtreeScope,\n            null\n          );\n        case \"tr\":\n          return createFormatContext(\n            HTML_TABLE_ROW_MODE,\n            null,\n            subtreeScope,\n            null\n          );\n        case \"head\":\n          if (parentContext.insertionMode < HTML_MODE)\n            return createFormatContext(\n              HTML_HEAD_MODE,\n              null,\n              subtreeScope,\n              null\n            );\n          break;\n        case \"html\":\n          if (parentContext.insertionMode === ROOT_HTML_MODE)\n            return createFormatContext(\n              HTML_HTML_MODE,\n              null,\n              subtreeScope,\n              null\n            );\n      }\n      return parentContext.insertionMode >= HTML_TABLE_MODE ||\n        parentContext.insertionMode < HTML_MODE\n        ? createFormatContext(HTML_MODE, null, subtreeScope, null)\n        : parentContext.tagScope !== subtreeScope\n          ? createFormatContext(\n              parentContext.insertionMode,\n              parentContext.selectedValue,\n              subtreeScope,\n              null\n            )\n          : parentContext;\n    }\n    function getSuspenseViewTransition(parentViewTransition) {\n      return null === parentViewTransition\n        ? null\n        : {\n            update: parentViewTransition.update,\n            enter: \"none\",\n            exit: \"none\",\n            share: parentViewTransition.update,\n            name: parentViewTransition.autoName,\n            autoName: parentViewTransition.autoName,\n            nameIdx: 0\n          };\n    }\n    function getSuspenseFallbackFormatContext(resumableState, parentContext) {\n      parentContext.tagScope & 32 && (resumableState.instructions |= 128);\n      return createFormatContext(\n        parentContext.insertionMode,\n        parentContext.selectedValue,\n        parentContext.tagScope | 12,\n        getSuspenseViewTransition(parentContext.viewTransition)\n      );\n    }\n    function getSuspenseContentFormatContext(resumableState, parentContext) {\n      resumableState = getSuspenseViewTransition(parentContext.viewTransition);\n      var subtreeScope = parentContext.tagScope | 16;\n      null !== resumableState &&\n        \"none\" !== resumableState.share &&\n        (subtreeScope |= 64);\n      return createFormatContext(\n        parentContext.insertionMode,\n        parentContext.selectedValue,\n        subtreeScope,\n        resumableState\n      );\n    }\n    function pushStyleAttribute(target, style) {\n      if (\"object\" !== typeof style)\n        throw Error(\n          \"The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.\"\n        );\n      var isFirst = !0,\n        styleName;\n      for (styleName in style)\n        if (hasOwnProperty.call(style, styleName)) {\n          var styleValue = style[styleName];\n          if (\n            null != styleValue &&\n            \"boolean\" !== typeof styleValue &&\n            \"\" !== styleValue\n          ) {\n            if (0 === styleName.indexOf(\"--\")) {\n              var nameChunk = escapeTextForBrowser(styleName);\n              checkCSSPropertyStringCoercion(styleValue, styleName);\n              styleValue = escapeTextForBrowser((\"\" + styleValue).trim());\n            } else {\n              nameChunk = styleName;\n              var value = styleValue;\n              if (-1 < nameChunk.indexOf(\"-\")) {\n                var name = nameChunk;\n                (warnedStyleNames.hasOwnProperty(name) &&\n                  warnedStyleNames[name]) ||\n                  ((warnedStyleNames[name] = !0),\n                  console.error(\n                    \"Unsupported style property %s. Did you mean %s?\",\n                    name,\n                    camelize(name.replace(msPattern$1, \"ms-\"))\n                  ));\n              } else if (badVendoredStyleNamePattern.test(nameChunk))\n                (name = nameChunk),\n                  (warnedStyleNames.hasOwnProperty(name) &&\n                    warnedStyleNames[name]) ||\n                    ((warnedStyleNames[name] = !0),\n                    console.error(\n                      \"Unsupported vendor-prefixed style property %s. Did you mean %s?\",\n                      name,\n                      name.charAt(0).toUpperCase() + name.slice(1)\n                    ));\n              else if (badStyleValueWithSemicolonPattern.test(value)) {\n                name = nameChunk;\n                var value$jscomp$0 = value;\n                (warnedStyleValues.hasOwnProperty(value$jscomp$0) &&\n                  warnedStyleValues[value$jscomp$0]) ||\n                  ((warnedStyleValues[value$jscomp$0] = !0),\n                  console.error(\n                    'Style property values shouldn\\'t contain a semicolon. Try \"%s: %s\" instead.',\n                    name,\n                    value$jscomp$0.replace(\n                      badStyleValueWithSemicolonPattern,\n                      \"\"\n                    )\n                  ));\n              }\n              \"number\" === typeof value &&\n                (isNaN(value)\n                  ? warnedForNaNValue ||\n                    ((warnedForNaNValue = !0),\n                    console.error(\n                      \"`NaN` is an invalid value for the `%s` css style property.\",\n                      nameChunk\n                    ))\n                  : isFinite(value) ||\n                    warnedForInfinityValue ||\n                    ((warnedForInfinityValue = !0),\n                    console.error(\n                      \"`Infinity` is an invalid value for the `%s` css style property.\",\n                      nameChunk\n                    )));\n              nameChunk = styleName;\n              value = styleNameCache.get(nameChunk);\n              void 0 !== value\n                ? (nameChunk = value)\n                : ((value = escapeTextForBrowser(\n                    nameChunk\n                      .replace(uppercasePattern, \"-$1\")\n                      .toLowerCase()\n                      .replace(msPattern, \"-ms-\")\n                  )),\n                  styleNameCache.set(nameChunk, value),\n                  (nameChunk = value));\n              \"number\" === typeof styleValue\n                ? (styleValue =\n                    0 === styleValue || unitlessNumbers.has(styleName)\n                      ? \"\" + styleValue\n                      : styleValue + \"px\")\n                : (checkCSSPropertyStringCoercion(styleValue, styleName),\n                  (styleValue = escapeTextForBrowser(\n                    (\"\" + styleValue).trim()\n                  )));\n            }\n            isFirst\n              ? ((isFirst = !1),\n                target.push(\n                  styleAttributeStart,\n                  nameChunk,\n                  styleAssign,\n                  styleValue\n                ))\n              : target.push(styleSeparator, nameChunk, styleAssign, styleValue);\n          }\n        }\n      isFirst || target.push(attributeEnd);\n    }\n    function pushBooleanAttribute(target, name, value) {\n      value &&\n        \"function\" !== typeof value &&\n        \"symbol\" !== typeof value &&\n        target.push(attributeSeparator, name, attributeEmptyString);\n    }\n    function pushStringAttribute(target, name, value) {\n      \"function\" !== typeof value &&\n        \"symbol\" !== typeof value &&\n        \"boolean\" !== typeof value &&\n        target.push(\n          attributeSeparator,\n          name,\n          attributeAssign,\n          escapeTextForBrowser(value),\n          attributeEnd\n        );\n    }\n    function pushAdditionalFormField(value, key) {\n      this.push('<input type=\"hidden\"');\n      validateAdditionalFormField(value);\n      pushStringAttribute(this, \"name\", key);\n      pushStringAttribute(this, \"value\", value);\n      this.push(endOfStartTagSelfClosing);\n    }\n    function validateAdditionalFormField(value) {\n      if (\"string\" !== typeof value)\n        throw Error(\n          \"File/Blob fields are not yet supported in progressive forms. Will fallback to client hydration.\"\n        );\n    }\n    function getCustomFormFields(resumableState, formAction) {\n      if (\"function\" === typeof formAction.$$FORM_ACTION) {\n        var id = resumableState.nextFormID++;\n        resumableState = resumableState.idPrefix + id;\n        try {\n          var customFields = formAction.$$FORM_ACTION(resumableState);\n          if (customFields) {\n            var formData = customFields.data;\n            null != formData && formData.forEach(validateAdditionalFormField);\n          }\n          return customFields;\n        } catch (x) {\n          if (\n            \"object\" === typeof x &&\n            null !== x &&\n            \"function\" === typeof x.then\n          )\n            throw x;\n          console.error(\n            \"Failed to serialize an action for progressive enhancement:\\n%s\",\n            x\n          );\n        }\n      }\n      return null;\n    }\n    function pushFormActionAttribute(\n      target,\n      resumableState,\n      renderState,\n      formAction,\n      formEncType,\n      formMethod,\n      formTarget,\n      name\n    ) {\n      var formData = null;\n      if (\"function\" === typeof formAction) {\n        null === name ||\n          didWarnFormActionName ||\n          ((didWarnFormActionName = !0),\n          console.error(\n            'Cannot specify a \"name\" prop for a button that specifies a function as a formAction. React needs it to encode which action should be invoked. It will get overridden.'\n          ));\n        (null === formEncType && null === formMethod) ||\n          didWarnFormActionMethod ||\n          ((didWarnFormActionMethod = !0),\n          console.error(\n            \"Cannot specify a formEncType or formMethod for a button that specifies a function as a formAction. React provides those automatically. They will get overridden.\"\n          ));\n        null === formTarget ||\n          didWarnFormActionTarget ||\n          ((didWarnFormActionTarget = !0),\n          console.error(\n            \"Cannot specify a formTarget for a button that specifies a function as a formAction. The function will always be executed in the same window.\"\n          ));\n        var customFields = getCustomFormFields(resumableState, formAction);\n        null !== customFields\n          ? ((name = customFields.name),\n            (formAction = customFields.action || \"\"),\n            (formEncType = customFields.encType),\n            (formMethod = customFields.method),\n            (formTarget = customFields.target),\n            (formData = customFields.data))\n          : (target.push(\n              attributeSeparator,\n              \"formAction\",\n              attributeAssign,\n              actionJavaScriptURL,\n              attributeEnd\n            ),\n            (formTarget = formMethod = formEncType = formAction = name = null),\n            injectFormReplayingRuntime(resumableState, renderState));\n      }\n      null != name && pushAttribute(target, \"name\", name);\n      null != formAction && pushAttribute(target, \"formAction\", formAction);\n      null != formEncType && pushAttribute(target, \"formEncType\", formEncType);\n      null != formMethod && pushAttribute(target, \"formMethod\", formMethod);\n      null != formTarget && pushAttribute(target, \"formTarget\", formTarget);\n      return formData;\n    }\n    function pushAttribute(target, name, value) {\n      switch (name) {\n        case \"className\":\n          pushStringAttribute(target, \"class\", value);\n          break;\n        case \"tabIndex\":\n          pushStringAttribute(target, \"tabindex\", value);\n          break;\n        case \"dir\":\n        case \"role\":\n        case \"viewBox\":\n        case \"width\":\n        case \"height\":\n          pushStringAttribute(target, name, value);\n          break;\n        case \"style\":\n          pushStyleAttribute(target, value);\n          break;\n        case \"src\":\n        case \"href\":\n          if (\"\" === value) {\n            \"src\" === name\n              ? console.error(\n                  'An empty string (\"\") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',\n                  name,\n                  name\n                )\n              : console.error(\n                  'An empty string (\"\") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',\n                  name,\n                  name\n                );\n            break;\n          }\n        case \"action\":\n        case \"formAction\":\n          if (\n            null == value ||\n            \"function\" === typeof value ||\n            \"symbol\" === typeof value ||\n            \"boolean\" === typeof value\n          )\n            break;\n          checkAttributeStringCoercion(value, name);\n          value = sanitizeURL(\"\" + value);\n          target.push(\n            attributeSeparator,\n            name,\n            attributeAssign,\n            escapeTextForBrowser(value),\n            attributeEnd\n          );\n          break;\n        case \"defaultValue\":\n        case \"defaultChecked\":\n        case \"innerHTML\":\n        case \"suppressContentEditableWarning\":\n        case \"suppressHydrationWarning\":\n        case \"ref\":\n          break;\n        case \"autoFocus\":\n        case \"multiple\":\n        case \"muted\":\n          pushBooleanAttribute(target, name.toLowerCase(), value);\n          break;\n        case \"xlinkHref\":\n          if (\n            \"function\" === typeof value ||\n            \"symbol\" === typeof value ||\n            \"boolean\" === typeof value\n          )\n            break;\n          checkAttributeStringCoercion(value, name);\n          value = sanitizeURL(\"\" + value);\n          target.push(\n            attributeSeparator,\n            \"xlink:href\",\n            attributeAssign,\n            escapeTextForBrowser(value),\n            attributeEnd\n          );\n          break;\n        case \"contentEditable\":\n        case \"spellCheck\":\n        case \"draggable\":\n        case \"value\":\n        case \"autoReverse\":\n        case \"externalResourcesRequired\":\n        case \"focusable\":\n        case \"preserveAlpha\":\n          \"function\" !== typeof value &&\n            \"symbol\" !== typeof value &&\n            target.push(\n              attributeSeparator,\n              name,\n              attributeAssign,\n              escapeTextForBrowser(value),\n              attributeEnd\n            );\n          break;\n        case \"inert\":\n          \"\" !== value ||\n            didWarnForNewBooleanPropsWithEmptyValue[name] ||\n            ((didWarnForNewBooleanPropsWithEmptyValue[name] = !0),\n            console.error(\n              \"Received an empty string for a boolean attribute `%s`. This will treat the attribute as if it were false. Either pass `false` to silence this warning, or pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.\",\n              name\n            ));\n        case \"allowFullScreen\":\n        case \"async\":\n        case \"autoPlay\":\n        case \"controls\":\n        case \"default\":\n        case \"defer\":\n        case \"disabled\":\n        case \"disablePictureInPicture\":\n        case \"disableRemotePlayback\":\n        case \"formNoValidate\":\n        case \"hidden\":\n        case \"loop\":\n        case \"noModule\":\n        case \"noValidate\":\n        case \"open\":\n        case \"playsInline\":\n        case \"readOnly\":\n        case \"required\":\n        case \"reversed\":\n        case \"scoped\":\n        case \"seamless\":\n        case \"itemScope\":\n          value &&\n            \"function\" !== typeof value &&\n            \"symbol\" !== typeof value &&\n            target.push(attributeSeparator, name, attributeEmptyString);\n          break;\n        case \"capture\":\n        case \"download\":\n          !0 === value\n            ? target.push(attributeSeparator, name, attributeEmptyString)\n            : !1 !== value &&\n              \"function\" !== typeof value &&\n              \"symbol\" !== typeof value &&\n              target.push(\n                attributeSeparator,\n                name,\n                attributeAssign,\n                escapeTextForBrowser(value),\n                attributeEnd\n              );\n          break;\n        case \"cols\":\n        case \"rows\":\n        case \"size\":\n        case \"span\":\n          \"function\" !== typeof value &&\n            \"symbol\" !== typeof value &&\n            !isNaN(value) &&\n            1 <= value &&\n            target.push(\n              attributeSeparator,\n              name,\n              attributeAssign,\n              escapeTextForBrowser(value),\n              attributeEnd\n            );\n          break;\n        case \"rowSpan\":\n        case \"start\":\n          \"function\" === typeof value ||\n            \"symbol\" === typeof value ||\n            isNaN(value) ||\n            target.push(\n              attributeSeparator,\n              name,\n              attributeAssign,\n              escapeTextForBrowser(value),\n              attributeEnd\n            );\n          break;\n        case \"xlinkActuate\":\n          pushStringAttribute(target, \"xlink:actuate\", value);\n          break;\n        case \"xlinkArcrole\":\n          pushStringAttribute(target, \"xlink:arcrole\", value);\n          break;\n        case \"xlinkRole\":\n          pushStringAttribute(target, \"xlink:role\", value);\n          break;\n        case \"xlinkShow\":\n          pushStringAttribute(target, \"xlink:show\", value);\n          break;\n        case \"xlinkTitle\":\n          pushStringAttribute(target, \"xlink:title\", value);\n          break;\n        case \"xlinkType\":\n          pushStringAttribute(target, \"xlink:type\", value);\n          break;\n        case \"xmlBase\":\n          pushStringAttribute(target, \"xml:base\", value);\n          break;\n        case \"xmlLang\":\n          pushStringAttribute(target, \"xml:lang\", value);\n          break;\n        case \"xmlSpace\":\n          pushStringAttribute(target, \"xml:space\", value);\n          break;\n        default:\n          if (\n            !(2 < name.length) ||\n            (\"o\" !== name[0] && \"O\" !== name[0]) ||\n            (\"n\" !== name[1] && \"N\" !== name[1])\n          )\n            if (\n              ((name = aliases.get(name) || name), isAttributeNameSafe(name))\n            ) {\n              switch (typeof value) {\n                case \"function\":\n                case \"symbol\":\n                  return;\n                case \"boolean\":\n                  var prefix = name.toLowerCase().slice(0, 5);\n                  if (\"data-\" !== prefix && \"aria-\" !== prefix) return;\n              }\n              target.push(\n                attributeSeparator,\n                name,\n                attributeAssign,\n                escapeTextForBrowser(value),\n                attributeEnd\n              );\n            }\n      }\n    }\n    function pushInnerHTML(target, innerHTML, children) {\n      if (null != innerHTML) {\n        if (null != children)\n          throw Error(\n            \"Can only set one of `children` or `props.dangerouslySetInnerHTML`.\"\n          );\n        if (\"object\" !== typeof innerHTML || !(\"__html\" in innerHTML))\n          throw Error(\n            \"`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.\"\n          );\n        innerHTML = innerHTML.__html;\n        null !== innerHTML &&\n          void 0 !== innerHTML &&\n          (checkHtmlStringCoercion(innerHTML), target.push(\"\" + innerHTML));\n      }\n    }\n    function checkSelectProp(props, propName) {\n      var value = props[propName];\n      null != value &&\n        ((value = isArrayImpl(value)),\n        props.multiple && !value\n          ? console.error(\n              \"The `%s` prop supplied to <select> must be an array if `multiple` is true.\",\n              propName\n            )\n          : !props.multiple &&\n            value &&\n            console.error(\n              \"The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.\",\n              propName\n            ));\n    }\n    function flattenOptionChildren(children) {\n      var content = \"\";\n      React.Children.forEach(children, function (child) {\n        null != child &&\n          ((content += child),\n          didWarnInvalidOptionChildren ||\n            \"string\" === typeof child ||\n            \"number\" === typeof child ||\n            \"bigint\" === typeof child ||\n            ((didWarnInvalidOptionChildren = !0),\n            console.error(\n              \"Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>.\"\n            )));\n      });\n      return content;\n    }\n    function injectFormReplayingRuntime(resumableState, renderState) {\n      if ((resumableState.instructions & 16) === NothingSent) {\n        resumableState.instructions |= 16;\n        var preamble = renderState.preamble,\n          bootstrapChunks = renderState.bootstrapChunks;\n        (preamble.htmlChunks || preamble.headChunks) &&\n        0 === bootstrapChunks.length\n          ? (bootstrapChunks.push(renderState.startInlineScript),\n            pushCompletedShellIdAttribute(bootstrapChunks, resumableState),\n            bootstrapChunks.push(\n              endOfStartTag,\n              formReplayingRuntimeScript,\n              endInlineScript\n            ))\n          : bootstrapChunks.unshift(\n              renderState.startInlineScript,\n              endOfStartTag,\n              formReplayingRuntimeScript,\n              endInlineScript\n            );\n      }\n    }\n    function pushLinkImpl(target, props) {\n      target.push(startChunkForTag(\"link\"));\n      for (var propKey in props)\n        if (hasOwnProperty.call(props, propKey)) {\n          var propValue = props[propKey];\n          if (null != propValue)\n            switch (propKey) {\n              case \"children\":\n              case \"dangerouslySetInnerHTML\":\n                throw Error(\n                  \"link is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`.\"\n                );\n              default:\n                pushAttribute(target, propKey, propValue);\n            }\n        }\n      target.push(endOfStartTagSelfClosing);\n      return null;\n    }\n    function escapeStyleTextContent(styleText) {\n      checkHtmlStringCoercion(styleText);\n      return (\"\" + styleText).replace(styleRegex, styleReplacer);\n    }\n    function pushSelfClosing(target, props, tag) {\n      target.push(startChunkForTag(tag));\n      for (var propKey in props)\n        if (hasOwnProperty.call(props, propKey)) {\n          var propValue = props[propKey];\n          if (null != propValue)\n            switch (propKey) {\n              case \"children\":\n              case \"dangerouslySetInnerHTML\":\n                throw Error(\n                  tag +\n                    \" is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`.\"\n                );\n              default:\n                pushAttribute(target, propKey, propValue);\n            }\n        }\n      target.push(endOfStartTagSelfClosing);\n      return null;\n    }\n    function pushTitleImpl(target, props) {\n      target.push(startChunkForTag(\"title\"));\n      var children = null,\n        innerHTML = null,\n        propKey;\n      for (propKey in props)\n        if (hasOwnProperty.call(props, propKey)) {\n          var propValue = props[propKey];\n          if (null != propValue)\n            switch (propKey) {\n              case \"children\":\n                children = propValue;\n                break;\n              case \"dangerouslySetInnerHTML\":\n                innerHTML = propValue;\n                break;\n              default:\n                pushAttribute(target, propKey, propValue);\n            }\n        }\n      target.push(endOfStartTag);\n      props = Array.isArray(children)\n        ? 2 > children.length\n          ? children[0]\n          : null\n        : children;\n      \"function\" !== typeof props &&\n        \"symbol\" !== typeof props &&\n        null !== props &&\n        void 0 !== props &&\n        target.push(escapeTextForBrowser(\"\" + props));\n      pushInnerHTML(target, innerHTML, children);\n      target.push(endChunkForTag(\"title\"));\n      return null;\n    }\n    function pushScriptImpl(target, props) {\n      target.push(startChunkForTag(\"script\"));\n      var children = null,\n        innerHTML = null,\n        propKey;\n      for (propKey in props)\n        if (hasOwnProperty.call(props, propKey)) {\n          var propValue = props[propKey];\n          if (null != propValue)\n            switch (propKey) {\n              case \"children\":\n                children = propValue;\n                break;\n              case \"dangerouslySetInnerHTML\":\n                innerHTML = propValue;\n                break;\n              default:\n                pushAttribute(target, propKey, propValue);\n            }\n        }\n      target.push(endOfStartTag);\n      null != children &&\n        \"string\" !== typeof children &&\n        ((props =\n          \"number\" === typeof children\n            ? \"a number for children\"\n            : Array.isArray(children)\n              ? \"an array for children\"\n              : \"something unexpected for children\"),\n        console.error(\n          \"A script element was rendered with %s. If script element has children it must be a single string. Consider using dangerouslySetInnerHTML or passing a plain string as children.\",\n          props\n        ));\n      pushInnerHTML(target, innerHTML, children);\n      \"string\" === typeof children &&\n        target.push(escapeEntireInlineScriptContent(children));\n      target.push(endChunkForTag(\"script\"));\n      return null;\n    }\n    function pushStartSingletonElement(target, props, tag) {\n      target.push(startChunkForTag(tag));\n      var innerHTML = (tag = null),\n        propKey;\n      for (propKey in props)\n        if (hasOwnProperty.call(props, propKey)) {\n          var propValue = props[propKey];\n          if (null != propValue)\n            switch (propKey) {\n              case \"children\":\n                tag = propValue;\n                break;\n              case \"dangerouslySetInnerHTML\":\n                innerHTML = propValue;\n                break;\n              default:\n                pushAttribute(target, propKey, propValue);\n            }\n        }\n      target.push(endOfStartTag);\n      pushInnerHTML(target, innerHTML, tag);\n      return tag;\n    }\n    function pushStartGenericElement(target, props, tag) {\n      target.push(startChunkForTag(tag));\n      var innerHTML = (tag = null),\n        propKey;\n      for (propKey in props)\n        if (hasOwnProperty.call(props, propKey)) {\n          var propValue = props[propKey];\n          if (null != propValue)\n            switch (propKey) {\n              case \"children\":\n                tag = propValue;\n                break;\n              case \"dangerouslySetInnerHTML\":\n                innerHTML = propValue;\n                break;\n              default:\n                pushAttribute(target, propKey, propValue);\n            }\n        }\n      target.push(endOfStartTag);\n      pushInnerHTML(target, innerHTML, tag);\n      return \"string\" === typeof tag\n        ? (target.push(escapeTextForBrowser(tag)), null)\n        : tag;\n    }\n    function startChunkForTag(tag) {\n      var tagStartChunk = validatedTagCache.get(tag);\n      if (void 0 === tagStartChunk) {\n        if (!VALID_TAG_REGEX.test(tag)) throw Error(\"Invalid tag: \" + tag);\n        tagStartChunk = \"<\" + tag;\n        validatedTagCache.set(tag, tagStartChunk);\n      }\n      return tagStartChunk;\n    }\n    function pushStartInstance(\n      target$jscomp$0,\n      type,\n      props,\n      resumableState,\n      renderState,\n      preambleState,\n      hoistableState,\n      formatContext,\n      textEmbedded\n    ) {\n      validateProperties$2(type, props);\n      (\"input\" !== type && \"textarea\" !== type && \"select\" !== type) ||\n        null == props ||\n        null !== props.value ||\n        didWarnValueNull ||\n        ((didWarnValueNull = !0),\n        \"select\" === type && props.multiple\n          ? console.error(\n              \"`value` prop on `%s` should not be null. Consider using an empty array when `multiple` is set to `true` to clear the component or `undefined` for uncontrolled components.\",\n              type\n            )\n          : console.error(\n              \"`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.\",\n              type\n            ));\n      b: if (-1 === type.indexOf(\"-\")) var JSCompiler_inline_result = !1;\n      else\n        switch (type) {\n          case \"annotation-xml\":\n          case \"color-profile\":\n          case \"font-face\":\n          case \"font-face-src\":\n          case \"font-face-uri\":\n          case \"font-face-format\":\n          case \"font-face-name\":\n          case \"missing-glyph\":\n            JSCompiler_inline_result = !1;\n            break b;\n          default:\n            JSCompiler_inline_result = !0;\n        }\n      JSCompiler_inline_result ||\n        \"string\" === typeof props.is ||\n        warnUnknownProperties(type, props, null);\n      !props.suppressContentEditableWarning &&\n        props.contentEditable &&\n        null != props.children &&\n        console.error(\n          \"A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional.\"\n        );\n      formatContext.insertionMode !== SVG_MODE &&\n        formatContext.insertionMode !== MATHML_MODE &&\n        -1 === type.indexOf(\"-\") &&\n        type.toLowerCase() !== type &&\n        console.error(\n          \"<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.\",\n          type\n        );\n      switch (type) {\n        case \"div\":\n        case \"span\":\n        case \"svg\":\n        case \"path\":\n          break;\n        case \"a\":\n          target$jscomp$0.push(startChunkForTag(\"a\"));\n          var children = null,\n            innerHTML = null,\n            propKey;\n          for (propKey in props)\n            if (hasOwnProperty.call(props, propKey)) {\n              var propValue = props[propKey];\n              if (null != propValue)\n                switch (propKey) {\n                  case \"children\":\n                    children = propValue;\n                    break;\n                  case \"dangerouslySetInnerHTML\":\n                    innerHTML = propValue;\n                    break;\n                  case \"href\":\n                    \"\" === propValue\n                      ? pushStringAttribute(target$jscomp$0, \"href\", \"\")\n                      : pushAttribute(target$jscomp$0, propKey, propValue);\n                    break;\n                  default:\n                    pushAttribute(target$jscomp$0, propKey, propValue);\n                }\n            }\n          target$jscomp$0.push(endOfStartTag);\n          pushInnerHTML(target$jscomp$0, innerHTML, children);\n          if (\"string\" === typeof children) {\n            target$jscomp$0.push(escapeTextForBrowser(children));\n            var JSCompiler_inline_result$jscomp$0 = null;\n          } else JSCompiler_inline_result$jscomp$0 = children;\n          return JSCompiler_inline_result$jscomp$0;\n        case \"g\":\n        case \"p\":\n        case \"li\":\n          break;\n        case \"select\":\n          checkControlledValueProps(\"select\", props);\n          checkSelectProp(props, \"value\");\n          checkSelectProp(props, \"defaultValue\");\n          void 0 === props.value ||\n            void 0 === props.defaultValue ||\n            didWarnDefaultSelectValue ||\n            (console.error(\n              \"Select elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled select element and remove one of these props. More info: https://react.dev/link/controlled-components\"\n            ),\n            (didWarnDefaultSelectValue = !0));\n          target$jscomp$0.push(startChunkForTag(\"select\"));\n          var children$jscomp$0 = null,\n            innerHTML$jscomp$0 = null,\n            propKey$jscomp$0;\n          for (propKey$jscomp$0 in props)\n            if (hasOwnProperty.call(props, propKey$jscomp$0)) {\n              var propValue$jscomp$0 = props[propKey$jscomp$0];\n              if (null != propValue$jscomp$0)\n                switch (propKey$jscomp$0) {\n                  case \"children\":\n                    children$jscomp$0 = propValue$jscomp$0;\n                    break;\n                  case \"dangerouslySetInnerHTML\":\n                    innerHTML$jscomp$0 = propValue$jscomp$0;\n                    break;\n                  case \"defaultValue\":\n                  case \"value\":\n                    break;\n                  default:\n                    pushAttribute(\n                      target$jscomp$0,\n                      propKey$jscomp$0,\n                      propValue$jscomp$0\n                    );\n                }\n            }\n          target$jscomp$0.push(endOfStartTag);\n          pushInnerHTML(target$jscomp$0, innerHTML$jscomp$0, children$jscomp$0);\n          return children$jscomp$0;\n        case \"option\":\n          var selectedValue = formatContext.selectedValue;\n          target$jscomp$0.push(startChunkForTag(\"option\"));\n          var children$jscomp$1 = null,\n            value = null,\n            selected = null,\n            innerHTML$jscomp$1 = null,\n            propKey$jscomp$1;\n          for (propKey$jscomp$1 in props)\n            if (hasOwnProperty.call(props, propKey$jscomp$1)) {\n              var propValue$jscomp$1 = props[propKey$jscomp$1];\n              if (null != propValue$jscomp$1)\n                switch (propKey$jscomp$1) {\n                  case \"children\":\n                    children$jscomp$1 = propValue$jscomp$1;\n                    break;\n                  case \"selected\":\n                    selected = propValue$jscomp$1;\n                    didWarnSelectedSetOnOption ||\n                      (console.error(\n                        \"Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>.\"\n                      ),\n                      (didWarnSelectedSetOnOption = !0));\n                    break;\n                  case \"dangerouslySetInnerHTML\":\n                    innerHTML$jscomp$1 = propValue$jscomp$1;\n                    break;\n                  case \"value\":\n                    value = propValue$jscomp$1;\n                  default:\n                    pushAttribute(\n                      target$jscomp$0,\n                      propKey$jscomp$1,\n                      propValue$jscomp$1\n                    );\n                }\n            }\n          if (null != selectedValue) {\n            if (null !== value) {\n              checkAttributeStringCoercion(value, \"value\");\n              var stringValue = \"\" + value;\n            } else\n              null === innerHTML$jscomp$1 ||\n                didWarnInvalidOptionInnerHTML ||\n                ((didWarnInvalidOptionInnerHTML = !0),\n                console.error(\n                  \"Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected.\"\n                )),\n                (stringValue = flattenOptionChildren(children$jscomp$1));\n            if (isArrayImpl(selectedValue))\n              for (var i = 0; i < selectedValue.length; i++) {\n                if (\n                  (checkAttributeStringCoercion(selectedValue[i], \"value\"),\n                  \"\" + selectedValue[i] === stringValue)\n                ) {\n                  target$jscomp$0.push(' selected=\"\"');\n                  break;\n                }\n              }\n            else\n              checkAttributeStringCoercion(selectedValue, \"select.value\"),\n                \"\" + selectedValue === stringValue &&\n                  target$jscomp$0.push(' selected=\"\"');\n          } else selected && target$jscomp$0.push(' selected=\"\"');\n          target$jscomp$0.push(endOfStartTag);\n          pushInnerHTML(target$jscomp$0, innerHTML$jscomp$1, children$jscomp$1);\n          return children$jscomp$1;\n        case \"textarea\":\n          checkControlledValueProps(\"textarea\", props);\n          void 0 === props.value ||\n            void 0 === props.defaultValue ||\n            didWarnDefaultTextareaValue ||\n            (console.error(\n              \"Textarea elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled textarea and remove one of these props. More info: https://react.dev/link/controlled-components\"\n            ),\n            (didWarnDefaultTextareaValue = !0));\n          target$jscomp$0.push(startChunkForTag(\"textarea\"));\n          var value$jscomp$0 = null,\n            defaultValue = null,\n            children$jscomp$2 = null,\n            propKey$jscomp$2;\n          for (propKey$jscomp$2 in props)\n            if (hasOwnProperty.call(props, propKey$jscomp$2)) {\n              var propValue$jscomp$2 = props[propKey$jscomp$2];\n              if (null != propValue$jscomp$2)\n                switch (propKey$jscomp$2) {\n                  case \"children\":\n                    children$jscomp$2 = propValue$jscomp$2;\n                    break;\n                  case \"value\":\n                    value$jscomp$0 = propValue$jscomp$2;\n                    break;\n                  case \"defaultValue\":\n                    defaultValue = propValue$jscomp$2;\n                    break;\n                  case \"dangerouslySetInnerHTML\":\n                    throw Error(\n                      \"`dangerouslySetInnerHTML` does not make sense on <textarea>.\"\n                    );\n                  default:\n                    pushAttribute(\n                      target$jscomp$0,\n                      propKey$jscomp$2,\n                      propValue$jscomp$2\n                    );\n                }\n            }\n          null === value$jscomp$0 &&\n            null !== defaultValue &&\n            (value$jscomp$0 = defaultValue);\n          target$jscomp$0.push(endOfStartTag);\n          if (null != children$jscomp$2) {\n            console.error(\n              \"Use the `defaultValue` or `value` props instead of setting children on <textarea>.\"\n            );\n            if (null != value$jscomp$0)\n              throw Error(\n                \"If you supply `defaultValue` on a <textarea>, do not pass children.\"\n              );\n            if (isArrayImpl(children$jscomp$2)) {\n              if (1 < children$jscomp$2.length)\n                throw Error(\"<textarea> can only have at most one child.\");\n              checkHtmlStringCoercion(children$jscomp$2[0]);\n              value$jscomp$0 = \"\" + children$jscomp$2[0];\n            }\n            checkHtmlStringCoercion(children$jscomp$2);\n            value$jscomp$0 = \"\" + children$jscomp$2;\n          }\n          \"string\" === typeof value$jscomp$0 &&\n            \"\\n\" === value$jscomp$0[0] &&\n            target$jscomp$0.push(leadingNewline);\n          null !== value$jscomp$0 &&\n            (checkAttributeStringCoercion(value$jscomp$0, \"value\"),\n            target$jscomp$0.push(escapeTextForBrowser(\"\" + value$jscomp$0)));\n          return null;\n        case \"input\":\n          checkControlledValueProps(\"input\", props);\n          target$jscomp$0.push(startChunkForTag(\"input\"));\n          var name = null,\n            formAction = null,\n            formEncType = null,\n            formMethod = null,\n            formTarget = null,\n            value$jscomp$1 = null,\n            defaultValue$jscomp$0 = null,\n            checked = null,\n            defaultChecked = null,\n            propKey$jscomp$3;\n          for (propKey$jscomp$3 in props)\n            if (hasOwnProperty.call(props, propKey$jscomp$3)) {\n              var propValue$jscomp$3 = props[propKey$jscomp$3];\n              if (null != propValue$jscomp$3)\n                switch (propKey$jscomp$3) {\n                  case \"children\":\n                  case \"dangerouslySetInnerHTML\":\n                    throw Error(\n                      \"input is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`.\"\n                    );\n                  case \"name\":\n                    name = propValue$jscomp$3;\n                    break;\n                  case \"formAction\":\n                    formAction = propValue$jscomp$3;\n                    break;\n                  case \"formEncType\":\n                    formEncType = propValue$jscomp$3;\n                    break;\n                  case \"formMethod\":\n                    formMethod = propValue$jscomp$3;\n                    break;\n                  case \"formTarget\":\n                    formTarget = propValue$jscomp$3;\n                    break;\n                  case \"defaultChecked\":\n                    defaultChecked = propValue$jscomp$3;\n                    break;\n                  case \"defaultValue\":\n                    defaultValue$jscomp$0 = propValue$jscomp$3;\n                    break;\n                  case \"checked\":\n                    checked = propValue$jscomp$3;\n                    break;\n                  case \"value\":\n                    value$jscomp$1 = propValue$jscomp$3;\n                    break;\n                  default:\n                    pushAttribute(\n                      target$jscomp$0,\n                      propKey$jscomp$3,\n                      propValue$jscomp$3\n                    );\n                }\n            }\n          null === formAction ||\n            \"image\" === props.type ||\n            \"submit\" === props.type ||\n            didWarnFormActionType ||\n            ((didWarnFormActionType = !0),\n            console.error(\n              'An input can only specify a formAction along with type=\"submit\" or type=\"image\".'\n            ));\n          var formData = pushFormActionAttribute(\n            target$jscomp$0,\n            resumableState,\n            renderState,\n            formAction,\n            formEncType,\n            formMethod,\n            formTarget,\n            name\n          );\n          null === checked ||\n            null === defaultChecked ||\n            didWarnDefaultChecked ||\n            (console.error(\n              \"%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components\",\n              \"A component\",\n              props.type\n            ),\n            (didWarnDefaultChecked = !0));\n          null === value$jscomp$1 ||\n            null === defaultValue$jscomp$0 ||\n            didWarnDefaultInputValue ||\n            (console.error(\n              \"%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components\",\n              \"A component\",\n              props.type\n            ),\n            (didWarnDefaultInputValue = !0));\n          null !== checked\n            ? pushBooleanAttribute(target$jscomp$0, \"checked\", checked)\n            : null !== defaultChecked &&\n              pushBooleanAttribute(target$jscomp$0, \"checked\", defaultChecked);\n          null !== value$jscomp$1\n            ? pushAttribute(target$jscomp$0, \"value\", value$jscomp$1)\n            : null !== defaultValue$jscomp$0 &&\n              pushAttribute(target$jscomp$0, \"value\", defaultValue$jscomp$0);\n          target$jscomp$0.push(endOfStartTagSelfClosing);\n          null != formData &&\n            formData.forEach(pushAdditionalFormField, target$jscomp$0);\n          return null;\n        case \"button\":\n          target$jscomp$0.push(startChunkForTag(\"button\"));\n          var children$jscomp$3 = null,\n            innerHTML$jscomp$2 = null,\n            name$jscomp$0 = null,\n            formAction$jscomp$0 = null,\n            formEncType$jscomp$0 = null,\n            formMethod$jscomp$0 = null,\n            formTarget$jscomp$0 = null,\n            propKey$jscomp$4;\n          for (propKey$jscomp$4 in props)\n            if (hasOwnProperty.call(props, propKey$jscomp$4)) {\n              var propValue$jscomp$4 = props[propKey$jscomp$4];\n              if (null != propValue$jscomp$4)\n                switch (propKey$jscomp$4) {\n                  case \"children\":\n                    children$jscomp$3 = propValue$jscomp$4;\n                    break;\n                  case \"dangerouslySetInnerHTML\":\n                    innerHTML$jscomp$2 = propValue$jscomp$4;\n                    break;\n                  case \"name\":\n                    name$jscomp$0 = propValue$jscomp$4;\n                    break;\n                  case \"formAction\":\n                    formAction$jscomp$0 = propValue$jscomp$4;\n                    break;\n                  case \"formEncType\":\n                    formEncType$jscomp$0 = propValue$jscomp$4;\n                    break;\n                  case \"formMethod\":\n                    formMethod$jscomp$0 = propValue$jscomp$4;\n                    break;\n                  case \"formTarget\":\n                    formTarget$jscomp$0 = propValue$jscomp$4;\n                    break;\n                  default:\n                    pushAttribute(\n                      target$jscomp$0,\n                      propKey$jscomp$4,\n                      propValue$jscomp$4\n                    );\n                }\n            }\n          null === formAction$jscomp$0 ||\n            null == props.type ||\n            \"submit\" === props.type ||\n            didWarnFormActionType ||\n            ((didWarnFormActionType = !0),\n            console.error(\n              'A button can only specify a formAction along with type=\"submit\" or no type.'\n            ));\n          var formData$jscomp$0 = pushFormActionAttribute(\n            target$jscomp$0,\n            resumableState,\n            renderState,\n            formAction$jscomp$0,\n            formEncType$jscomp$0,\n            formMethod$jscomp$0,\n            formTarget$jscomp$0,\n            name$jscomp$0\n          );\n          target$jscomp$0.push(endOfStartTag);\n          null != formData$jscomp$0 &&\n            formData$jscomp$0.forEach(pushAdditionalFormField, target$jscomp$0);\n          pushInnerHTML(target$jscomp$0, innerHTML$jscomp$2, children$jscomp$3);\n          if (\"string\" === typeof children$jscomp$3) {\n            target$jscomp$0.push(escapeTextForBrowser(children$jscomp$3));\n            var JSCompiler_inline_result$jscomp$1 = null;\n          } else JSCompiler_inline_result$jscomp$1 = children$jscomp$3;\n          return JSCompiler_inline_result$jscomp$1;\n        case \"form\":\n          target$jscomp$0.push(startChunkForTag(\"form\"));\n          var children$jscomp$4 = null,\n            innerHTML$jscomp$3 = null,\n            formAction$jscomp$1 = null,\n            formEncType$jscomp$1 = null,\n            formMethod$jscomp$1 = null,\n            formTarget$jscomp$1 = null,\n            propKey$jscomp$5;\n          for (propKey$jscomp$5 in props)\n            if (hasOwnProperty.call(props, propKey$jscomp$5)) {\n              var propValue$jscomp$5 = props[propKey$jscomp$5];\n              if (null != propValue$jscomp$5)\n                switch (propKey$jscomp$5) {\n                  case \"children\":\n                    children$jscomp$4 = propValue$jscomp$5;\n                    break;\n                  case \"dangerouslySetInnerHTML\":\n                    innerHTML$jscomp$3 = propValue$jscomp$5;\n                    break;\n                  case \"action\":\n                    formAction$jscomp$1 = propValue$jscomp$5;\n                    break;\n                  case \"encType\":\n                    formEncType$jscomp$1 = propValue$jscomp$5;\n                    break;\n                  case \"method\":\n                    formMethod$jscomp$1 = propValue$jscomp$5;\n                    break;\n                  case \"target\":\n                    formTarget$jscomp$1 = propValue$jscomp$5;\n                    break;\n                  default:\n                    pushAttribute(\n                      target$jscomp$0,\n                      propKey$jscomp$5,\n                      propValue$jscomp$5\n                    );\n                }\n            }\n          var formData$jscomp$1 = null,\n            formActionName = null;\n          if (\"function\" === typeof formAction$jscomp$1) {\n            (null === formEncType$jscomp$1 && null === formMethod$jscomp$1) ||\n              didWarnFormActionMethod ||\n              ((didWarnFormActionMethod = !0),\n              console.error(\n                \"Cannot specify a encType or method for a form that specifies a function as the action. React provides those automatically. They will get overridden.\"\n              ));\n            null === formTarget$jscomp$1 ||\n              didWarnFormActionTarget ||\n              ((didWarnFormActionTarget = !0),\n              console.error(\n                \"Cannot specify a target for a form that specifies a function as the action. The function will always be executed in the same window.\"\n              ));\n            var customFields = getCustomFormFields(\n              resumableState,\n              formAction$jscomp$1\n            );\n            null !== customFields\n              ? ((formAction$jscomp$1 = customFields.action || \"\"),\n                (formEncType$jscomp$1 = customFields.encType),\n                (formMethod$jscomp$1 = customFields.method),\n                (formTarget$jscomp$1 = customFields.target),\n                (formData$jscomp$1 = customFields.data),\n                (formActionName = customFields.name))\n              : (target$jscomp$0.push(\n                  attributeSeparator,\n                  \"action\",\n                  attributeAssign,\n                  actionJavaScriptURL,\n                  attributeEnd\n                ),\n                (formTarget$jscomp$1 =\n                  formMethod$jscomp$1 =\n                  formEncType$jscomp$1 =\n                  formAction$jscomp$1 =\n                    null),\n                injectFormReplayingRuntime(resumableState, renderState));\n          }\n          null != formAction$jscomp$1 &&\n            pushAttribute(target$jscomp$0, \"action\", formAction$jscomp$1);\n          null != formEncType$jscomp$1 &&\n            pushAttribute(target$jscomp$0, \"encType\", formEncType$jscomp$1);\n          null != formMethod$jscomp$1 &&\n            pushAttribute(target$jscomp$0, \"method\", formMethod$jscomp$1);\n          null != formTarget$jscomp$1 &&\n            pushAttribute(target$jscomp$0, \"target\", formTarget$jscomp$1);\n          target$jscomp$0.push(endOfStartTag);\n          null !== formActionName &&\n            (target$jscomp$0.push('<input type=\"hidden\"'),\n            pushStringAttribute(target$jscomp$0, \"name\", formActionName),\n            target$jscomp$0.push(endOfStartTagSelfClosing),\n            null != formData$jscomp$1 &&\n              formData$jscomp$1.forEach(\n                pushAdditionalFormField,\n                target$jscomp$0\n              ));\n          pushInnerHTML(target$jscomp$0, innerHTML$jscomp$3, children$jscomp$4);\n          if (\"string\" === typeof children$jscomp$4) {\n            target$jscomp$0.push(escapeTextForBrowser(children$jscomp$4));\n            var JSCompiler_inline_result$jscomp$2 = null;\n          } else JSCompiler_inline_result$jscomp$2 = children$jscomp$4;\n          return JSCompiler_inline_result$jscomp$2;\n        case \"menuitem\":\n          target$jscomp$0.push(startChunkForTag(\"menuitem\"));\n          for (var propKey$jscomp$6 in props)\n            if (hasOwnProperty.call(props, propKey$jscomp$6)) {\n              var propValue$jscomp$6 = props[propKey$jscomp$6];\n              if (null != propValue$jscomp$6)\n                switch (propKey$jscomp$6) {\n                  case \"children\":\n                  case \"dangerouslySetInnerHTML\":\n                    throw Error(\n                      \"menuitems cannot have `children` nor `dangerouslySetInnerHTML`.\"\n                    );\n                  default:\n                    pushAttribute(\n                      target$jscomp$0,\n                      propKey$jscomp$6,\n                      propValue$jscomp$6\n                    );\n                }\n            }\n          target$jscomp$0.push(endOfStartTag);\n          return null;\n        case \"object\":\n          target$jscomp$0.push(startChunkForTag(\"object\"));\n          var children$jscomp$5 = null,\n            innerHTML$jscomp$4 = null,\n            propKey$jscomp$7;\n          for (propKey$jscomp$7 in props)\n            if (hasOwnProperty.call(props, propKey$jscomp$7)) {\n              var propValue$jscomp$7 = props[propKey$jscomp$7];\n              if (null != propValue$jscomp$7)\n                switch (propKey$jscomp$7) {\n                  case \"children\":\n                    children$jscomp$5 = propValue$jscomp$7;\n                    break;\n                  case \"dangerouslySetInnerHTML\":\n                    innerHTML$jscomp$4 = propValue$jscomp$7;\n                    break;\n                  case \"data\":\n                    checkAttributeStringCoercion(propValue$jscomp$7, \"data\");\n                    var sanitizedValue = sanitizeURL(\"\" + propValue$jscomp$7);\n                    if (\"\" === sanitizedValue) {\n                      console.error(\n                        'An empty string (\"\") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',\n                        propKey$jscomp$7,\n                        propKey$jscomp$7\n                      );\n                      break;\n                    }\n                    target$jscomp$0.push(\n                      attributeSeparator,\n                      \"data\",\n                      attributeAssign,\n                      escapeTextForBrowser(sanitizedValue),\n                      attributeEnd\n                    );\n                    break;\n                  default:\n                    pushAttribute(\n                      target$jscomp$0,\n                      propKey$jscomp$7,\n                      propValue$jscomp$7\n                    );\n                }\n            }\n          target$jscomp$0.push(endOfStartTag);\n          pushInnerHTML(target$jscomp$0, innerHTML$jscomp$4, children$jscomp$5);\n          if (\"string\" === typeof children$jscomp$5) {\n            target$jscomp$0.push(escapeTextForBrowser(children$jscomp$5));\n            var JSCompiler_inline_result$jscomp$3 = null;\n          } else JSCompiler_inline_result$jscomp$3 = children$jscomp$5;\n          return JSCompiler_inline_result$jscomp$3;\n        case \"title\":\n          var noscriptTagInScope = formatContext.tagScope & 1,\n            isFallback = formatContext.tagScope & 4;\n          if (hasOwnProperty.call(props, \"children\")) {\n            var children$jscomp$6 = props.children,\n              child = Array.isArray(children$jscomp$6)\n                ? 2 > children$jscomp$6.length\n                  ? children$jscomp$6[0]\n                  : null\n                : children$jscomp$6;\n            Array.isArray(children$jscomp$6) && 1 < children$jscomp$6.length\n              ? console.error(\n                  \"React expects the `children` prop of <title> tags to be a string, number, bigint, or object with a novel `toString` method but found an Array with length %s instead. Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert `children` of <title> tags to a single string value which is why Arrays of length greater than 1 are not supported. When using JSX it can be common to combine text nodes and value nodes. For example: <title>hello {nameOfUser}</title>. While not immediately apparent, `children` in this case is an Array with length 2. If your `children` prop is using this form try rewriting it using a template string: <title>{`hello ${nameOfUser}`}</title>.\",\n                  children$jscomp$6.length\n                )\n              : \"function\" === typeof child || \"symbol\" === typeof child\n                ? console.error(\n                    \"React expect children of <title> tags to be a string, number, bigint, or object with a novel `toString` method but found %s instead. Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert children of <title> tags to a single string value.\",\n                    \"function\" === typeof child ? \"a Function\" : \"a Sybmol\"\n                  )\n                : child &&\n                  child.toString === {}.toString &&\n                  (null != child.$$typeof\n                    ? console.error(\n                        \"React expects the `children` prop of <title> tags to be a string, number, bigint, or object with a novel `toString` method but found an object that appears to be a React element which never implements a suitable `toString` method. Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert children of <title> tags to a single string value which is why rendering React elements is not supported. If the `children` of <title> is a React Component try moving the <title> tag into that component. If the `children` of <title> is some HTML markup change it to be Text only to be valid HTML.\"\n                      )\n                    : console.error(\n                        \"React expects the `children` prop of <title> tags to be a string, number, bigint, or object with a novel `toString` method but found an object that does not implement a suitable `toString` method. Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert children of <title> tags to a single string value. Using the default `toString` method available on every object is almost certainly an error. Consider whether the `children` of this <title> is an object in error and change it to a string or number value if so. Otherwise implement a `toString` method that React can use to produce a valid <title>.\"\n                      ));\n          }\n          if (\n            formatContext.insertionMode === SVG_MODE ||\n            noscriptTagInScope ||\n            null != props.itemProp\n          )\n            var JSCompiler_inline_result$jscomp$4 = pushTitleImpl(\n              target$jscomp$0,\n              props\n            );\n          else\n            isFallback\n              ? (JSCompiler_inline_result$jscomp$4 = null)\n              : (pushTitleImpl(renderState.hoistableChunks, props),\n                (JSCompiler_inline_result$jscomp$4 = void 0));\n          return JSCompiler_inline_result$jscomp$4;\n        case \"link\":\n          var noscriptTagInScope$jscomp$0 = formatContext.tagScope & 1,\n            isFallback$jscomp$0 = formatContext.tagScope & 4,\n            rel = props.rel,\n            href = props.href,\n            precedence = props.precedence;\n          if (\n            formatContext.insertionMode === SVG_MODE ||\n            noscriptTagInScope$jscomp$0 ||\n            null != props.itemProp ||\n            \"string\" !== typeof rel ||\n            \"string\" !== typeof href ||\n            \"\" === href\n          ) {\n            \"stylesheet\" === rel &&\n              \"string\" === typeof props.precedence &&\n              ((\"string\" === typeof href && href) ||\n                console.error(\n                  'React encountered a `<link rel=\"stylesheet\" .../>` with a `precedence` prop and expected the `href` prop to be a non-empty string but ecountered %s instead. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop ensure there is a non-empty string `href` prop as well, otherwise remove the `precedence` prop.',\n                  null === href\n                    ? \"`null`\"\n                    : void 0 === href\n                      ? \"`undefined`\"\n                      : \"\" === href\n                        ? \"an empty string\"\n                        : 'something with type \"' + typeof href + '\"'\n                ));\n            pushLinkImpl(target$jscomp$0, props);\n            var JSCompiler_inline_result$jscomp$5 = null;\n          } else if (\"stylesheet\" === props.rel)\n            if (\n              \"string\" !== typeof precedence ||\n              null != props.disabled ||\n              props.onLoad ||\n              props.onError\n            ) {\n              if (\"string\" === typeof precedence)\n                if (null != props.disabled)\n                  console.error(\n                    'React encountered a `<link rel=\"stylesheet\" .../>` with a `precedence` prop and a `disabled` prop. The presence of the `disabled` prop indicates an intent to manage the stylesheet active state from your from your Component code and React will not hoist or deduplicate this stylesheet. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop remove the `disabled` prop, otherwise remove the `precedence` prop.'\n                  );\n                else if (props.onLoad || props.onError) {\n                  var propDescription =\n                    props.onLoad && props.onError\n                      ? \"`onLoad` and `onError` props\"\n                      : props.onLoad\n                        ? \"`onLoad` prop\"\n                        : \"`onError` prop\";\n                  console.error(\n                    'React encountered a `<link rel=\"stylesheet\" .../>` with a `precedence` prop and %s. The presence of loading and error handlers indicates an intent to manage the stylesheet loading state from your from your Component code and React will not hoist or deduplicate this stylesheet. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop remove the %s, otherwise remove the `precedence` prop.',\n                    propDescription,\n                    propDescription\n                  );\n                }\n              JSCompiler_inline_result$jscomp$5 = pushLinkImpl(\n                target$jscomp$0,\n                props\n              );\n            } else {\n              var styleQueue = renderState.styles.get(precedence),\n                resourceState = resumableState.styleResources.hasOwnProperty(\n                  href\n                )\n                  ? resumableState.styleResources[href]\n                  : void 0;\n              if (resourceState !== EXISTS) {\n                resumableState.styleResources[href] = EXISTS;\n                styleQueue ||\n                  ((styleQueue = {\n                    precedence: escapeTextForBrowser(precedence),\n                    rules: [],\n                    hrefs: [],\n                    sheets: new Map()\n                  }),\n                  renderState.styles.set(precedence, styleQueue));\n                var resource = {\n                  state: PENDING$1,\n                  props: assign({}, props, {\n                    \"data-precedence\": props.precedence,\n                    precedence: null\n                  })\n                };\n                if (resourceState) {\n                  2 === resourceState.length &&\n                    adoptPreloadCredentials(resource.props, resourceState);\n                  var preloadResource =\n                    renderState.preloads.stylesheets.get(href);\n                  preloadResource && 0 < preloadResource.length\n                    ? (preloadResource.length = 0)\n                    : (resource.state = PRELOADED);\n                }\n                styleQueue.sheets.set(href, resource);\n                hoistableState && hoistableState.stylesheets.add(resource);\n              } else if (styleQueue) {\n                var _resource = styleQueue.sheets.get(href);\n                _resource &&\n                  hoistableState &&\n                  hoistableState.stylesheets.add(_resource);\n              }\n              textEmbedded && target$jscomp$0.push(\"\\x3c!-- --\\x3e\");\n              JSCompiler_inline_result$jscomp$5 = null;\n            }\n          else\n            props.onLoad || props.onError\n              ? (JSCompiler_inline_result$jscomp$5 = pushLinkImpl(\n                  target$jscomp$0,\n                  props\n                ))\n              : (textEmbedded && target$jscomp$0.push(\"\\x3c!-- --\\x3e\"),\n                (JSCompiler_inline_result$jscomp$5 = isFallback$jscomp$0\n                  ? null\n                  : pushLinkImpl(renderState.hoistableChunks, props)));\n          return JSCompiler_inline_result$jscomp$5;\n        case \"script\":\n          var noscriptTagInScope$jscomp$1 = formatContext.tagScope & 1,\n            asyncProp = props.async;\n          if (\n            \"string\" !== typeof props.src ||\n            !props.src ||\n            !asyncProp ||\n            \"function\" === typeof asyncProp ||\n            \"symbol\" === typeof asyncProp ||\n            props.onLoad ||\n            props.onError ||\n            formatContext.insertionMode === SVG_MODE ||\n            noscriptTagInScope$jscomp$1 ||\n            null != props.itemProp\n          )\n            var JSCompiler_inline_result$jscomp$6 = pushScriptImpl(\n              target$jscomp$0,\n              props\n            );\n          else {\n            var key = props.src;\n            if (\"module\" === props.type) {\n              var resources = resumableState.moduleScriptResources;\n              var preloads = renderState.preloads.moduleScripts;\n            } else\n              (resources = resumableState.scriptResources),\n                (preloads = renderState.preloads.scripts);\n            var resourceState$jscomp$0 = resources.hasOwnProperty(key)\n              ? resources[key]\n              : void 0;\n            if (resourceState$jscomp$0 !== EXISTS) {\n              resources[key] = EXISTS;\n              var scriptProps = props;\n              if (resourceState$jscomp$0) {\n                2 === resourceState$jscomp$0.length &&\n                  ((scriptProps = assign({}, props)),\n                  adoptPreloadCredentials(scriptProps, resourceState$jscomp$0));\n                var preloadResource$jscomp$0 = preloads.get(key);\n                preloadResource$jscomp$0 &&\n                  (preloadResource$jscomp$0.length = 0);\n              }\n              var resource$jscomp$0 = [];\n              renderState.scripts.add(resource$jscomp$0);\n              pushScriptImpl(resource$jscomp$0, scriptProps);\n            }\n            textEmbedded && target$jscomp$0.push(\"\\x3c!-- --\\x3e\");\n            JSCompiler_inline_result$jscomp$6 = null;\n          }\n          return JSCompiler_inline_result$jscomp$6;\n        case \"style\":\n          var noscriptTagInScope$jscomp$2 = formatContext.tagScope & 1;\n          if (hasOwnProperty.call(props, \"children\")) {\n            var children$jscomp$7 = props.children,\n              child$jscomp$0 = Array.isArray(children$jscomp$7)\n                ? 2 > children$jscomp$7.length\n                  ? children$jscomp$7[0]\n                  : null\n                : children$jscomp$7;\n            (\"function\" === typeof child$jscomp$0 ||\n              \"symbol\" === typeof child$jscomp$0 ||\n              Array.isArray(child$jscomp$0)) &&\n              console.error(\n                \"React expect children of <style> tags to be a string, number, or object with a `toString` method but found %s instead. In browsers style Elements can only have `Text` Nodes as children.\",\n                \"function\" === typeof child$jscomp$0\n                  ? \"a Function\"\n                  : \"symbol\" === typeof child$jscomp$0\n                    ? \"a Sybmol\"\n                    : \"an Array\"\n              );\n          }\n          var precedence$jscomp$0 = props.precedence,\n            href$jscomp$0 = props.href,\n            nonce = props.nonce;\n          if (\n            formatContext.insertionMode === SVG_MODE ||\n            noscriptTagInScope$jscomp$2 ||\n            null != props.itemProp ||\n            \"string\" !== typeof precedence$jscomp$0 ||\n            \"string\" !== typeof href$jscomp$0 ||\n            \"\" === href$jscomp$0\n          ) {\n            target$jscomp$0.push(startChunkForTag(\"style\"));\n            var children$jscomp$8 = null,\n              innerHTML$jscomp$5 = null,\n              propKey$jscomp$8;\n            for (propKey$jscomp$8 in props)\n              if (hasOwnProperty.call(props, propKey$jscomp$8)) {\n                var propValue$jscomp$8 = props[propKey$jscomp$8];\n                if (null != propValue$jscomp$8)\n                  switch (propKey$jscomp$8) {\n                    case \"children\":\n                      children$jscomp$8 = propValue$jscomp$8;\n                      break;\n                    case \"dangerouslySetInnerHTML\":\n                      innerHTML$jscomp$5 = propValue$jscomp$8;\n                      break;\n                    default:\n                      pushAttribute(\n                        target$jscomp$0,\n                        propKey$jscomp$8,\n                        propValue$jscomp$8\n                      );\n                  }\n              }\n            target$jscomp$0.push(endOfStartTag);\n            var child$jscomp$1 = Array.isArray(children$jscomp$8)\n              ? 2 > children$jscomp$8.length\n                ? children$jscomp$8[0]\n                : null\n              : children$jscomp$8;\n            \"function\" !== typeof child$jscomp$1 &&\n              \"symbol\" !== typeof child$jscomp$1 &&\n              null !== child$jscomp$1 &&\n              void 0 !== child$jscomp$1 &&\n              target$jscomp$0.push(escapeStyleTextContent(child$jscomp$1));\n            pushInnerHTML(\n              target$jscomp$0,\n              innerHTML$jscomp$5,\n              children$jscomp$8\n            );\n            target$jscomp$0.push(endChunkForTag(\"style\"));\n            var JSCompiler_inline_result$jscomp$7 = null;\n          } else {\n            href$jscomp$0.includes(\" \") &&\n              console.error(\n                'React expected the `href` prop for a <style> tag opting into hoisting semantics using the `precedence` prop to not have any spaces but ecountered spaces instead. using spaces in this prop will cause hydration of this style to fail on the client. The href for the <style> where this ocurred is \"%s\".',\n                href$jscomp$0\n              );\n            var styleQueue$jscomp$0 =\n                renderState.styles.get(precedence$jscomp$0),\n              resourceState$jscomp$1 =\n                resumableState.styleResources.hasOwnProperty(href$jscomp$0)\n                  ? resumableState.styleResources[href$jscomp$0]\n                  : void 0;\n            if (resourceState$jscomp$1 !== EXISTS) {\n              resumableState.styleResources[href$jscomp$0] = EXISTS;\n              resourceState$jscomp$1 &&\n                console.error(\n                  'React encountered a hoistable style tag for the same href as a preload: \"%s\". When using a style tag to inline styles you should not also preload it as a stylsheet.',\n                  href$jscomp$0\n                );\n              styleQueue$jscomp$0 ||\n                ((styleQueue$jscomp$0 = {\n                  precedence: escapeTextForBrowser(precedence$jscomp$0),\n                  rules: [],\n                  hrefs: [],\n                  sheets: new Map()\n                }),\n                renderState.styles.set(\n                  precedence$jscomp$0,\n                  styleQueue$jscomp$0\n                ));\n              var nonceStyle = renderState.nonce.style;\n              if (nonceStyle && nonceStyle !== nonce)\n                console.error(\n                  'React encountered a style tag with `precedence` \"%s\" and `nonce` \"%s\". When React manages style rules using `precedence` it will only include rules if the nonce matches the style nonce \"%s\" that was included with this render.',\n                  precedence$jscomp$0,\n                  nonce,\n                  nonceStyle\n                );\n              else {\n                !nonceStyle &&\n                  nonce &&\n                  console.error(\n                    'React encountered a style tag with `precedence` \"%s\" and `nonce` \"%s\". When React manages style rules using `precedence` it will only include a nonce attributes if you also provide the same style nonce value as a render option.',\n                    precedence$jscomp$0,\n                    nonce\n                  );\n                styleQueue$jscomp$0.hrefs.push(\n                  escapeTextForBrowser(href$jscomp$0)\n                );\n                var target = styleQueue$jscomp$0.rules,\n                  children$jscomp$9 = null,\n                  innerHTML$jscomp$6 = null,\n                  propKey$jscomp$9;\n                for (propKey$jscomp$9 in props)\n                  if (hasOwnProperty.call(props, propKey$jscomp$9)) {\n                    var propValue$jscomp$9 = props[propKey$jscomp$9];\n                    if (null != propValue$jscomp$9)\n                      switch (propKey$jscomp$9) {\n                        case \"children\":\n                          children$jscomp$9 = propValue$jscomp$9;\n                          break;\n                        case \"dangerouslySetInnerHTML\":\n                          innerHTML$jscomp$6 = propValue$jscomp$9;\n                      }\n                  }\n                var child$jscomp$2 = Array.isArray(children$jscomp$9)\n                  ? 2 > children$jscomp$9.length\n                    ? children$jscomp$9[0]\n                    : null\n                  : children$jscomp$9;\n                \"function\" !== typeof child$jscomp$2 &&\n                  \"symbol\" !== typeof child$jscomp$2 &&\n                  null !== child$jscomp$2 &&\n                  void 0 !== child$jscomp$2 &&\n                  target.push(escapeStyleTextContent(child$jscomp$2));\n                pushInnerHTML(target, innerHTML$jscomp$6, children$jscomp$9);\n              }\n            }\n            styleQueue$jscomp$0 &&\n              hoistableState &&\n              hoistableState.styles.add(styleQueue$jscomp$0);\n            textEmbedded && target$jscomp$0.push(\"\\x3c!-- --\\x3e\");\n            JSCompiler_inline_result$jscomp$7 = void 0;\n          }\n          return JSCompiler_inline_result$jscomp$7;\n        case \"meta\":\n          var noscriptTagInScope$jscomp$3 = formatContext.tagScope & 1,\n            isFallback$jscomp$1 = formatContext.tagScope & 4;\n          if (\n            formatContext.insertionMode === SVG_MODE ||\n            noscriptTagInScope$jscomp$3 ||\n            null != props.itemProp\n          )\n            var JSCompiler_inline_result$jscomp$8 = pushSelfClosing(\n              target$jscomp$0,\n              props,\n              \"meta\"\n            );\n          else\n            textEmbedded && target$jscomp$0.push(\"\\x3c!-- --\\x3e\"),\n              (JSCompiler_inline_result$jscomp$8 = isFallback$jscomp$1\n                ? null\n                : \"string\" === typeof props.charSet\n                  ? pushSelfClosing(renderState.charsetChunks, props, \"meta\")\n                  : \"viewport\" === props.name\n                    ? pushSelfClosing(renderState.viewportChunks, props, \"meta\")\n                    : pushSelfClosing(\n                        renderState.hoistableChunks,\n                        props,\n                        \"meta\"\n                      ));\n          return JSCompiler_inline_result$jscomp$8;\n        case \"listing\":\n        case \"pre\":\n          target$jscomp$0.push(startChunkForTag(type));\n          var children$jscomp$10 = null,\n            innerHTML$jscomp$7 = null,\n            propKey$jscomp$10;\n          for (propKey$jscomp$10 in props)\n            if (hasOwnProperty.call(props, propKey$jscomp$10)) {\n              var propValue$jscomp$10 = props[propKey$jscomp$10];\n              if (null != propValue$jscomp$10)\n                switch (propKey$jscomp$10) {\n                  case \"children\":\n                    children$jscomp$10 = propValue$jscomp$10;\n                    break;\n                  case \"dangerouslySetInnerHTML\":\n                    innerHTML$jscomp$7 = propValue$jscomp$10;\n                    break;\n                  default:\n                    pushAttribute(\n                      target$jscomp$0,\n                      propKey$jscomp$10,\n                      propValue$jscomp$10\n                    );\n                }\n            }\n          target$jscomp$0.push(endOfStartTag);\n          if (null != innerHTML$jscomp$7) {\n            if (null != children$jscomp$10)\n              throw Error(\n                \"Can only set one of `children` or `props.dangerouslySetInnerHTML`.\"\n              );\n            if (\n              \"object\" !== typeof innerHTML$jscomp$7 ||\n              !(\"__html\" in innerHTML$jscomp$7)\n            )\n              throw Error(\n                \"`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.\"\n              );\n            var html = innerHTML$jscomp$7.__html;\n            null !== html &&\n              void 0 !== html &&\n              (\"string\" === typeof html && 0 < html.length && \"\\n\" === html[0]\n                ? target$jscomp$0.push(leadingNewline, html)\n                : (checkHtmlStringCoercion(html),\n                  target$jscomp$0.push(\"\" + html)));\n          }\n          \"string\" === typeof children$jscomp$10 &&\n            \"\\n\" === children$jscomp$10[0] &&\n            target$jscomp$0.push(leadingNewline);\n          return children$jscomp$10;\n        case \"img\":\n          var pictureOrNoScriptTagInScope = formatContext.tagScope & 3,\n            src = props.src,\n            srcSet = props.srcSet;\n          if (\n            !(\n              \"lazy\" === props.loading ||\n              (!src && !srcSet) ||\n              (\"string\" !== typeof src && null != src) ||\n              (\"string\" !== typeof srcSet && null != srcSet) ||\n              \"low\" === props.fetchPriority ||\n              pictureOrNoScriptTagInScope\n            ) &&\n            (\"string\" !== typeof src ||\n              \":\" !== src[4] ||\n              (\"d\" !== src[0] && \"D\" !== src[0]) ||\n              (\"a\" !== src[1] && \"A\" !== src[1]) ||\n              (\"t\" !== src[2] && \"T\" !== src[2]) ||\n              (\"a\" !== src[3] && \"A\" !== src[3])) &&\n            (\"string\" !== typeof srcSet ||\n              \":\" !== srcSet[4] ||\n              (\"d\" !== srcSet[0] && \"D\" !== srcSet[0]) ||\n              (\"a\" !== srcSet[1] && \"A\" !== srcSet[1]) ||\n              (\"t\" !== srcSet[2] && \"T\" !== srcSet[2]) ||\n              (\"a\" !== srcSet[3] && \"A\" !== srcSet[3]))\n          ) {\n            null !== hoistableState &&\n              formatContext.tagScope & 64 &&\n              (hoistableState.suspenseyImages = !0);\n            var sizes = \"string\" === typeof props.sizes ? props.sizes : void 0,\n              key$jscomp$0 = srcSet ? srcSet + \"\\n\" + (sizes || \"\") : src,\n              promotablePreloads = renderState.preloads.images,\n              resource$jscomp$1 = promotablePreloads.get(key$jscomp$0);\n            if (resource$jscomp$1) {\n              if (\n                \"high\" === props.fetchPriority ||\n                10 > renderState.highImagePreloads.size\n              )\n                promotablePreloads.delete(key$jscomp$0),\n                  renderState.highImagePreloads.add(resource$jscomp$1);\n            } else if (\n              !resumableState.imageResources.hasOwnProperty(key$jscomp$0)\n            ) {\n              resumableState.imageResources[key$jscomp$0] = PRELOAD_NO_CREDS;\n              var input = props.crossOrigin;\n              var crossOrigin =\n                \"string\" === typeof input\n                  ? \"use-credentials\" === input\n                    ? input\n                    : \"\"\n                  : void 0;\n              var headers = renderState.headers,\n                header;\n              headers &&\n              0 < headers.remainingCapacity &&\n              \"string\" !== typeof props.srcSet &&\n              (\"high\" === props.fetchPriority ||\n                500 > headers.highImagePreloads.length) &&\n              ((header = getPreloadAsHeader(src, \"image\", {\n                imageSrcSet: props.srcSet,\n                imageSizes: props.sizes,\n                crossOrigin: crossOrigin,\n                integrity: props.integrity,\n                nonce: props.nonce,\n                type: props.type,\n                fetchPriority: props.fetchPriority,\n                referrerPolicy: props.refererPolicy\n              })),\n              0 <= (headers.remainingCapacity -= header.length + 2))\n                ? ((renderState.resets.image[key$jscomp$0] = PRELOAD_NO_CREDS),\n                  headers.highImagePreloads &&\n                    (headers.highImagePreloads += \", \"),\n                  (headers.highImagePreloads += header))\n                : ((resource$jscomp$1 = []),\n                  pushLinkImpl(resource$jscomp$1, {\n                    rel: \"preload\",\n                    as: \"image\",\n                    href: srcSet ? void 0 : src,\n                    imageSrcSet: srcSet,\n                    imageSizes: sizes,\n                    crossOrigin: crossOrigin,\n                    integrity: props.integrity,\n                    type: props.type,\n                    fetchPriority: props.fetchPriority,\n                    referrerPolicy: props.referrerPolicy\n                  }),\n                  \"high\" === props.fetchPriority ||\n                  10 > renderState.highImagePreloads.size\n                    ? renderState.highImagePreloads.add(resource$jscomp$1)\n                    : (renderState.bulkPreloads.add(resource$jscomp$1),\n                      promotablePreloads.set(key$jscomp$0, resource$jscomp$1)));\n            }\n          }\n          return pushSelfClosing(target$jscomp$0, props, \"img\");\n        case \"base\":\n        case \"area\":\n        case \"br\":\n        case \"col\":\n        case \"embed\":\n        case \"hr\":\n        case \"keygen\":\n        case \"param\":\n        case \"source\":\n        case \"track\":\n        case \"wbr\":\n          return pushSelfClosing(target$jscomp$0, props, type);\n        case \"annotation-xml\":\n        case \"color-profile\":\n        case \"font-face\":\n        case \"font-face-src\":\n        case \"font-face-uri\":\n        case \"font-face-format\":\n        case \"font-face-name\":\n        case \"missing-glyph\":\n          break;\n        case \"head\":\n          if (formatContext.insertionMode < HTML_MODE) {\n            var preamble = preambleState || renderState.preamble;\n            if (preamble.headChunks)\n              throw Error(\"The `<head>` tag may only be rendered once.\");\n            null !== preambleState && target$jscomp$0.push(\"\\x3c!--head--\\x3e\");\n            preamble.headChunks = [];\n            var JSCompiler_inline_result$jscomp$9 = pushStartSingletonElement(\n              preamble.headChunks,\n              props,\n              \"head\"\n            );\n          } else\n            JSCompiler_inline_result$jscomp$9 = pushStartGenericElement(\n              target$jscomp$0,\n              props,\n              \"head\"\n            );\n          return JSCompiler_inline_result$jscomp$9;\n        case \"body\":\n          if (formatContext.insertionMode < HTML_MODE) {\n            var preamble$jscomp$0 = preambleState || renderState.preamble;\n            if (preamble$jscomp$0.bodyChunks)\n              throw Error(\"The `<body>` tag may only be rendered once.\");\n            null !== preambleState && target$jscomp$0.push(\"\\x3c!--body--\\x3e\");\n            preamble$jscomp$0.bodyChunks = [];\n            var JSCompiler_inline_result$jscomp$10 = pushStartSingletonElement(\n              preamble$jscomp$0.bodyChunks,\n              props,\n              \"body\"\n            );\n          } else\n            JSCompiler_inline_result$jscomp$10 = pushStartGenericElement(\n              target$jscomp$0,\n              props,\n              \"body\"\n            );\n          return JSCompiler_inline_result$jscomp$10;\n        case \"html\":\n          if (formatContext.insertionMode === ROOT_HTML_MODE) {\n            var preamble$jscomp$1 = preambleState || renderState.preamble;\n            if (preamble$jscomp$1.htmlChunks)\n              throw Error(\"The `<html>` tag may only be rendered once.\");\n            null !== preambleState && target$jscomp$0.push(\"\\x3c!--html--\\x3e\");\n            preamble$jscomp$1.htmlChunks = [doctypeChunk];\n            var JSCompiler_inline_result$jscomp$11 = pushStartSingletonElement(\n              preamble$jscomp$1.htmlChunks,\n              props,\n              \"html\"\n            );\n          } else\n            JSCompiler_inline_result$jscomp$11 = pushStartGenericElement(\n              target$jscomp$0,\n              props,\n              \"html\"\n            );\n          return JSCompiler_inline_result$jscomp$11;\n        default:\n          if (-1 !== type.indexOf(\"-\")) {\n            target$jscomp$0.push(startChunkForTag(type));\n            var children$jscomp$11 = null,\n              innerHTML$jscomp$8 = null,\n              propKey$jscomp$11;\n            for (propKey$jscomp$11 in props)\n              if (hasOwnProperty.call(props, propKey$jscomp$11)) {\n                var propValue$jscomp$11 = props[propKey$jscomp$11];\n                if (null != propValue$jscomp$11) {\n                  var attributeName = propKey$jscomp$11;\n                  switch (propKey$jscomp$11) {\n                    case \"children\":\n                      children$jscomp$11 = propValue$jscomp$11;\n                      break;\n                    case \"dangerouslySetInnerHTML\":\n                      innerHTML$jscomp$8 = propValue$jscomp$11;\n                      break;\n                    case \"style\":\n                      pushStyleAttribute(target$jscomp$0, propValue$jscomp$11);\n                      break;\n                    case \"suppressContentEditableWarning\":\n                    case \"suppressHydrationWarning\":\n                    case \"ref\":\n                      break;\n                    case \"className\":\n                      attributeName = \"class\";\n                    default:\n                      if (\n                        isAttributeNameSafe(propKey$jscomp$11) &&\n                        \"function\" !== typeof propValue$jscomp$11 &&\n                        \"symbol\" !== typeof propValue$jscomp$11 &&\n                        !1 !== propValue$jscomp$11\n                      ) {\n                        if (!0 === propValue$jscomp$11)\n                          propValue$jscomp$11 = \"\";\n                        else if (\"object\" === typeof propValue$jscomp$11)\n                          continue;\n                        target$jscomp$0.push(\n                          attributeSeparator,\n                          attributeName,\n                          attributeAssign,\n                          escapeTextForBrowser(propValue$jscomp$11),\n                          attributeEnd\n                        );\n                      }\n                  }\n                }\n              }\n            target$jscomp$0.push(endOfStartTag);\n            pushInnerHTML(\n              target$jscomp$0,\n              innerHTML$jscomp$8,\n              children$jscomp$11\n            );\n            return children$jscomp$11;\n          }\n      }\n      return pushStartGenericElement(target$jscomp$0, props, type);\n    }\n    function endChunkForTag(tag) {\n      var chunk = endTagCache.get(tag);\n      void 0 === chunk &&\n        ((chunk = \"</\" + tag + \">\"), endTagCache.set(tag, chunk));\n      return chunk;\n    }\n    function hoistPreambleState(renderState, preambleState) {\n      renderState = renderState.preamble;\n      null === renderState.htmlChunks &&\n        preambleState.htmlChunks &&\n        (renderState.htmlChunks = preambleState.htmlChunks);\n      null === renderState.headChunks &&\n        preambleState.headChunks &&\n        (renderState.headChunks = preambleState.headChunks);\n      null === renderState.bodyChunks &&\n        preambleState.bodyChunks &&\n        (renderState.bodyChunks = preambleState.bodyChunks);\n    }\n    function writeBootstrap(destination, renderState) {\n      renderState = renderState.bootstrapChunks;\n      for (var i = 0; i < renderState.length - 1; i++)\n        destination.push(renderState[i]);\n      return i < renderState.length\n        ? ((i = renderState[i]), (renderState.length = 0), destination.push(i))\n        : !0;\n    }\n    function writeStartPendingSuspenseBoundary(destination, renderState, id) {\n      destination.push(startPendingSuspenseBoundary1);\n      if (null === id)\n        throw Error(\n          \"An ID must have been assigned before we can complete the boundary.\"\n        );\n      destination.push(renderState.boundaryPrefix);\n      renderState = id.toString(16);\n      destination.push(renderState);\n      return destination.push(startPendingSuspenseBoundary2);\n    }\n    function writeStartSegment(destination, renderState, formatContext, id) {\n      switch (formatContext.insertionMode) {\n        case ROOT_HTML_MODE:\n        case HTML_HTML_MODE:\n        case HTML_HEAD_MODE:\n        case HTML_MODE:\n          return (\n            destination.push(startSegmentHTML),\n            destination.push(renderState.segmentPrefix),\n            (renderState = id.toString(16)),\n            destination.push(renderState),\n            destination.push(startSegmentHTML2)\n          );\n        case SVG_MODE:\n          return (\n            destination.push(startSegmentSVG),\n            destination.push(renderState.segmentPrefix),\n            (renderState = id.toString(16)),\n            destination.push(renderState),\n            destination.push(startSegmentSVG2)\n          );\n        case MATHML_MODE:\n          return (\n            destination.push(startSegmentMathML),\n            destination.push(renderState.segmentPrefix),\n            (renderState = id.toString(16)),\n            destination.push(renderState),\n            destination.push(startSegmentMathML2)\n          );\n        case HTML_TABLE_MODE:\n          return (\n            destination.push(startSegmentTable),\n            destination.push(renderState.segmentPrefix),\n            (renderState = id.toString(16)),\n            destination.push(renderState),\n            destination.push(startSegmentTable2)\n          );\n        case HTML_TABLE_BODY_MODE:\n          return (\n            destination.push(startSegmentTableBody),\n            destination.push(renderState.segmentPrefix),\n            (renderState = id.toString(16)),\n            destination.push(renderState),\n            destination.push(startSegmentTableBody2)\n          );\n        case HTML_TABLE_ROW_MODE:\n          return (\n            destination.push(startSegmentTableRow),\n            destination.push(renderState.segmentPrefix),\n            (renderState = id.toString(16)),\n            destination.push(renderState),\n            destination.push(startSegmentTableRow2)\n          );\n        case HTML_COLGROUP_MODE:\n          return (\n            destination.push(startSegmentColGroup),\n            destination.push(renderState.segmentPrefix),\n            (renderState = id.toString(16)),\n            destination.push(renderState),\n            destination.push(startSegmentColGroup2)\n          );\n        default:\n          throw Error(\"Unknown insertion mode. This is a bug in React.\");\n      }\n    }\n    function writeEndSegment(destination, formatContext) {\n      switch (formatContext.insertionMode) {\n        case ROOT_HTML_MODE:\n        case HTML_HTML_MODE:\n        case HTML_HEAD_MODE:\n        case HTML_MODE:\n          return destination.push(endSegmentHTML);\n        case SVG_MODE:\n          return destination.push(endSegmentSVG);\n        case MATHML_MODE:\n          return destination.push(endSegmentMathML);\n        case HTML_TABLE_MODE:\n          return destination.push(endSegmentTable);\n        case HTML_TABLE_BODY_MODE:\n          return destination.push(endSegmentTableBody);\n        case HTML_TABLE_ROW_MODE:\n          return destination.push(endSegmentTableRow);\n        case HTML_COLGROUP_MODE:\n          return destination.push(endSegmentColGroup);\n        default:\n          throw Error(\"Unknown insertion mode. This is a bug in React.\");\n      }\n    }\n    function escapeJSStringsForInstructionScripts(input) {\n      return JSON.stringify(input).replace(\n        regexForJSStringsInInstructionScripts,\n        function (match) {\n          switch (match) {\n            case \"<\":\n              return \"\\\\u003c\";\n            case \"\\u2028\":\n              return \"\\\\u2028\";\n            case \"\\u2029\":\n              return \"\\\\u2029\";\n            default:\n              throw Error(\n                \"escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React\"\n              );\n          }\n        }\n      );\n    }\n    function escapeJSObjectForInstructionScripts(input) {\n      return JSON.stringify(input).replace(\n        regexForJSStringsInScripts,\n        function (match) {\n          switch (match) {\n            case \"&\":\n              return \"\\\\u0026\";\n            case \">\":\n              return \"\\\\u003e\";\n            case \"<\":\n              return \"\\\\u003c\";\n            case \"\\u2028\":\n              return \"\\\\u2028\";\n            case \"\\u2029\":\n              return \"\\\\u2029\";\n            default:\n              throw Error(\n                \"escapeJSObjectForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React\"\n              );\n          }\n        }\n      );\n    }\n    function flushStyleTagsLateForBoundary(styleQueue) {\n      var rules = styleQueue.rules,\n        hrefs = styleQueue.hrefs;\n      0 < rules.length &&\n        0 === hrefs.length &&\n        console.error(\n          \"React expected to have at least one href for an a hoistable style but found none. This is a bug in React.\"\n        );\n      var i = 0;\n      if (hrefs.length) {\n        this.push(currentlyFlushingRenderState.startInlineStyle);\n        this.push(lateStyleTagResourceOpen1);\n        this.push(styleQueue.precedence);\n        for (this.push(lateStyleTagResourceOpen2); i < hrefs.length - 1; i++)\n          this.push(hrefs[i]), this.push(spaceSeparator);\n        this.push(hrefs[i]);\n        this.push(lateStyleTagResourceOpen3);\n        for (i = 0; i < rules.length; i++) this.push(rules[i]);\n        destinationHasCapacity = this.push(lateStyleTagTemplateClose);\n        currentlyRenderingBoundaryHasStylesToHoist = !0;\n        rules.length = 0;\n        hrefs.length = 0;\n      }\n    }\n    function hasStylesToHoist(stylesheet) {\n      return stylesheet.state !== PREAMBLE\n        ? (currentlyRenderingBoundaryHasStylesToHoist = !0)\n        : !1;\n    }\n    function writeHoistablesForBoundary(\n      destination,\n      hoistableState,\n      renderState\n    ) {\n      currentlyRenderingBoundaryHasStylesToHoist = !1;\n      destinationHasCapacity = !0;\n      currentlyFlushingRenderState = renderState;\n      hoistableState.styles.forEach(flushStyleTagsLateForBoundary, destination);\n      currentlyFlushingRenderState = null;\n      hoistableState.stylesheets.forEach(hasStylesToHoist);\n      currentlyRenderingBoundaryHasStylesToHoist &&\n        (renderState.stylesToHoist = !0);\n      return destinationHasCapacity;\n    }\n    function flushResource(resource) {\n      for (var i = 0; i < resource.length; i++) this.push(resource[i]);\n      resource.length = 0;\n    }\n    function flushStyleInPreamble(stylesheet) {\n      pushLinkImpl(stylesheetFlushingQueue, stylesheet.props);\n      for (var i = 0; i < stylesheetFlushingQueue.length; i++)\n        this.push(stylesheetFlushingQueue[i]);\n      stylesheetFlushingQueue.length = 0;\n      stylesheet.state = PREAMBLE;\n    }\n    function flushStylesInPreamble(styleQueue) {\n      var hasStylesheets = 0 < styleQueue.sheets.size;\n      styleQueue.sheets.forEach(flushStyleInPreamble, this);\n      styleQueue.sheets.clear();\n      var rules = styleQueue.rules,\n        hrefs = styleQueue.hrefs;\n      if (!hasStylesheets || hrefs.length) {\n        this.push(currentlyFlushingRenderState.startInlineStyle);\n        this.push(styleTagResourceOpen1);\n        this.push(styleQueue.precedence);\n        styleQueue = 0;\n        if (hrefs.length) {\n          for (\n            this.push(styleTagResourceOpen2);\n            styleQueue < hrefs.length - 1;\n            styleQueue++\n          )\n            this.push(hrefs[styleQueue]), this.push(spaceSeparator);\n          this.push(hrefs[styleQueue]);\n        }\n        this.push(styleTagResourceOpen3);\n        for (styleQueue = 0; styleQueue < rules.length; styleQueue++)\n          this.push(rules[styleQueue]);\n        this.push(styleTagResourceClose);\n        rules.length = 0;\n        hrefs.length = 0;\n      }\n    }\n    function preloadLateStyle(stylesheet) {\n      if (stylesheet.state === PENDING$1) {\n        stylesheet.state = PRELOADED;\n        var props = stylesheet.props;\n        pushLinkImpl(stylesheetFlushingQueue, {\n          rel: \"preload\",\n          as: \"style\",\n          href: stylesheet.props.href,\n          crossOrigin: props.crossOrigin,\n          fetchPriority: props.fetchPriority,\n          integrity: props.integrity,\n          media: props.media,\n          hrefLang: props.hrefLang,\n          referrerPolicy: props.referrerPolicy\n        });\n        for (\n          stylesheet = 0;\n          stylesheet < stylesheetFlushingQueue.length;\n          stylesheet++\n        )\n          this.push(stylesheetFlushingQueue[stylesheet]);\n        stylesheetFlushingQueue.length = 0;\n      }\n    }\n    function preloadLateStyles(styleQueue) {\n      styleQueue.sheets.forEach(preloadLateStyle, this);\n      styleQueue.sheets.clear();\n    }\n    function pushCompletedShellIdAttribute(target, resumableState) {\n      (resumableState.instructions & SentCompletedShellId) === NothingSent &&\n        ((resumableState.instructions |= SentCompletedShellId),\n        target.push(\n          completedShellIdAttributeStart,\n          escapeTextForBrowser(\"_\" + resumableState.idPrefix + \"R_\"),\n          attributeEnd\n        ));\n    }\n    function writeStyleResourceDependenciesInJS(destination, hoistableState) {\n      destination.push(arrayFirstOpenBracket);\n      var nextArrayOpenBrackChunk = arrayFirstOpenBracket;\n      hoistableState.stylesheets.forEach(function (resource) {\n        if (resource.state !== PREAMBLE)\n          if (resource.state === LATE)\n            destination.push(nextArrayOpenBrackChunk),\n              (resource = resource.props.href),\n              checkAttributeStringCoercion(resource, \"href\"),\n              (resource = escapeJSObjectForInstructionScripts(\"\" + resource)),\n              destination.push(resource),\n              destination.push(arrayCloseBracket),\n              (nextArrayOpenBrackChunk = arraySubsequentOpenBracket);\n          else {\n            destination.push(nextArrayOpenBrackChunk);\n            var precedence = resource.props[\"data-precedence\"],\n              props = resource.props,\n              coercedHref = sanitizeURL(\"\" + resource.props.href);\n            coercedHref = escapeJSObjectForInstructionScripts(coercedHref);\n            destination.push(coercedHref);\n            checkAttributeStringCoercion(precedence, \"precedence\");\n            precedence = \"\" + precedence;\n            destination.push(arrayInterstitial);\n            precedence = escapeJSObjectForInstructionScripts(precedence);\n            destination.push(precedence);\n            for (var propKey in props)\n              if (\n                hasOwnProperty.call(props, propKey) &&\n                ((precedence = props[propKey]), null != precedence)\n              )\n                switch (propKey) {\n                  case \"href\":\n                  case \"rel\":\n                  case \"precedence\":\n                  case \"data-precedence\":\n                    break;\n                  case \"children\":\n                  case \"dangerouslySetInnerHTML\":\n                    throw Error(\n                      \"link is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`.\"\n                    );\n                  default:\n                    writeStyleResourceAttributeInJS(\n                      destination,\n                      propKey,\n                      precedence\n                    );\n                }\n            destination.push(arrayCloseBracket);\n            nextArrayOpenBrackChunk = arraySubsequentOpenBracket;\n            resource.state = LATE;\n          }\n      });\n      destination.push(arrayCloseBracket);\n    }\n    function writeStyleResourceAttributeInJS(destination, name, value) {\n      var attributeName = name.toLowerCase();\n      switch (typeof value) {\n        case \"function\":\n        case \"symbol\":\n          return;\n      }\n      switch (name) {\n        case \"innerHTML\":\n        case \"dangerouslySetInnerHTML\":\n        case \"suppressContentEditableWarning\":\n        case \"suppressHydrationWarning\":\n        case \"style\":\n        case \"ref\":\n          return;\n        case \"className\":\n          attributeName = \"class\";\n          checkAttributeStringCoercion(value, attributeName);\n          name = \"\" + value;\n          break;\n        case \"hidden\":\n          if (!1 === value) return;\n          name = \"\";\n          break;\n        case \"src\":\n        case \"href\":\n          value = sanitizeURL(value);\n          checkAttributeStringCoercion(value, attributeName);\n          name = \"\" + value;\n          break;\n        default:\n          if (\n            (2 < name.length &&\n              (\"o\" === name[0] || \"O\" === name[0]) &&\n              (\"n\" === name[1] || \"N\" === name[1])) ||\n            !isAttributeNameSafe(name)\n          )\n            return;\n          checkAttributeStringCoercion(value, attributeName);\n          name = \"\" + value;\n      }\n      destination.push(arrayInterstitial);\n      attributeName = escapeJSObjectForInstructionScripts(attributeName);\n      destination.push(attributeName);\n      destination.push(arrayInterstitial);\n      attributeName = escapeJSObjectForInstructionScripts(name);\n      destination.push(attributeName);\n    }\n    function createHoistableState() {\n      return { styles: new Set(), stylesheets: new Set(), suspenseyImages: !1 };\n    }\n    function preloadBootstrapScriptOrModule(\n      resumableState,\n      renderState,\n      href,\n      props\n    ) {\n      (resumableState.scriptResources.hasOwnProperty(href) ||\n        resumableState.moduleScriptResources.hasOwnProperty(href)) &&\n        console.error(\n          'Internal React Error: React expected bootstrap script or module with src \"%s\" to not have been preloaded already. please file an issue',\n          href\n        );\n      resumableState.scriptResources[href] = EXISTS;\n      resumableState.moduleScriptResources[href] = EXISTS;\n      resumableState = [];\n      pushLinkImpl(resumableState, props);\n      renderState.bootstrapScripts.add(resumableState);\n    }\n    function adoptPreloadCredentials(target, preloadState) {\n      null == target.crossOrigin && (target.crossOrigin = preloadState[0]);\n      null == target.integrity && (target.integrity = preloadState[1]);\n    }\n    function getPreloadAsHeader(href, as, params) {\n      href = escapeHrefForLinkHeaderURLContext(href);\n      as = escapeStringForLinkHeaderQuotedParamValueContext(as, \"as\");\n      as = \"<\" + href + '>; rel=preload; as=\"' + as + '\"';\n      for (var paramName in params)\n        hasOwnProperty.call(params, paramName) &&\n          ((href = params[paramName]),\n          \"string\" === typeof href &&\n            (as +=\n              \"; \" +\n              paramName.toLowerCase() +\n              '=\"' +\n              escapeStringForLinkHeaderQuotedParamValueContext(\n                href,\n                paramName\n              ) +\n              '\"'));\n      return as;\n    }\n    function escapeHrefForLinkHeaderURLContext(hrefInput) {\n      checkAttributeStringCoercion(hrefInput, \"href\");\n      return (\"\" + hrefInput).replace(\n        regexForHrefInLinkHeaderURLContext,\n        escapeHrefForLinkHeaderURLContextReplacer\n      );\n    }\n    function escapeHrefForLinkHeaderURLContextReplacer(match) {\n      switch (match) {\n        case \"<\":\n          return \"%3C\";\n        case \">\":\n          return \"%3E\";\n        case \"\\n\":\n          return \"%0A\";\n        case \"\\r\":\n          return \"%0D\";\n        default:\n          throw Error(\n            \"escapeLinkHrefForHeaderContextReplacer encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React\"\n          );\n      }\n    }\n    function escapeStringForLinkHeaderQuotedParamValueContext(value, name) {\n      willCoercionThrow(value) &&\n        (console.error(\n          \"The provided `%s` option is an unsupported type %s. This value must be coerced to a string before using it here.\",\n          name,\n          typeName(value)\n        ),\n        testStringCoercion(value));\n      return (\"\" + value).replace(\n        regexForLinkHeaderQuotedParamValueContext,\n        escapeStringForLinkHeaderQuotedParamValueContextReplacer\n      );\n    }\n    function escapeStringForLinkHeaderQuotedParamValueContextReplacer(match) {\n      switch (match) {\n        case '\"':\n          return \"%22\";\n        case \"'\":\n          return \"%27\";\n        case \";\":\n          return \"%3B\";\n        case \",\":\n          return \"%2C\";\n        case \"\\n\":\n          return \"%0A\";\n        case \"\\r\":\n          return \"%0D\";\n        default:\n          throw Error(\n            \"escapeStringForLinkHeaderQuotedParamValueContextReplacer encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React\"\n          );\n      }\n    }\n    function hoistStyleQueueDependency(styleQueue) {\n      this.styles.add(styleQueue);\n    }\n    function hoistStylesheetDependency(stylesheet) {\n      this.stylesheets.add(stylesheet);\n    }\n    function hoistHoistables(parentState, childState) {\n      childState.styles.forEach(hoistStyleQueueDependency, parentState);\n      childState.stylesheets.forEach(hoistStylesheetDependency, parentState);\n      childState.suspenseyImages && (parentState.suspenseyImages = !0);\n    }\n    function createRenderState(resumableState, generateStaticMarkup) {\n      var idPrefix = resumableState.idPrefix,\n        bootstrapChunks = [],\n        bootstrapScriptContent = resumableState.bootstrapScriptContent,\n        bootstrapScripts = resumableState.bootstrapScripts,\n        bootstrapModules = resumableState.bootstrapModules;\n      void 0 !== bootstrapScriptContent &&\n        (bootstrapChunks.push(\"<script\"),\n        pushCompletedShellIdAttribute(bootstrapChunks, resumableState),\n        bootstrapChunks.push(\n          endOfStartTag,\n          escapeEntireInlineScriptContent(bootstrapScriptContent),\n          endInlineScript\n        ));\n      idPrefix = {\n        placeholderPrefix: idPrefix + \"P:\",\n        segmentPrefix: idPrefix + \"S:\",\n        boundaryPrefix: idPrefix + \"B:\",\n        startInlineScript: \"<script\",\n        startInlineStyle: \"<style\",\n        preamble: { htmlChunks: null, headChunks: null, bodyChunks: null },\n        externalRuntimeScript: null,\n        bootstrapChunks: bootstrapChunks,\n        importMapChunks: [],\n        onHeaders: void 0,\n        headers: null,\n        resets: {\n          font: {},\n          dns: {},\n          connect: { default: {}, anonymous: {}, credentials: {} },\n          image: {},\n          style: {}\n        },\n        charsetChunks: [],\n        viewportChunks: [],\n        hoistableChunks: [],\n        preconnects: new Set(),\n        fontPreloads: new Set(),\n        highImagePreloads: new Set(),\n        styles: new Map(),\n        bootstrapScripts: new Set(),\n        scripts: new Set(),\n        bulkPreloads: new Set(),\n        preloads: {\n          images: new Map(),\n          stylesheets: new Map(),\n          scripts: new Map(),\n          moduleScripts: new Map()\n        },\n        nonce: { script: void 0, style: void 0 },\n        hoistableState: null,\n        stylesToHoist: !1\n      };\n      if (void 0 !== bootstrapScripts)\n        for (\n          bootstrapScriptContent = 0;\n          bootstrapScriptContent < bootstrapScripts.length;\n          bootstrapScriptContent++\n        ) {\n          var scriptConfig = bootstrapScripts[bootstrapScriptContent],\n            src,\n            crossOrigin = void 0,\n            integrity = void 0,\n            props = {\n              rel: \"preload\",\n              as: \"script\",\n              fetchPriority: \"low\",\n              nonce: void 0\n            };\n          \"string\" === typeof scriptConfig\n            ? (props.href = src = scriptConfig)\n            : ((props.href = src = scriptConfig.src),\n              (props.integrity = integrity =\n                \"string\" === typeof scriptConfig.integrity\n                  ? scriptConfig.integrity\n                  : void 0),\n              (props.crossOrigin = crossOrigin =\n                \"string\" === typeof scriptConfig ||\n                null == scriptConfig.crossOrigin\n                  ? void 0\n                  : \"use-credentials\" === scriptConfig.crossOrigin\n                    ? \"use-credentials\"\n                    : \"\"));\n          preloadBootstrapScriptOrModule(resumableState, idPrefix, src, props);\n          bootstrapChunks.push(\n            '<script src=\"',\n            escapeTextForBrowser(src),\n            attributeEnd\n          );\n          \"string\" === typeof integrity &&\n            bootstrapChunks.push(\n              ' integrity=\"',\n              escapeTextForBrowser(integrity),\n              attributeEnd\n            );\n          \"string\" === typeof crossOrigin &&\n            bootstrapChunks.push(\n              ' crossorigin=\"',\n              escapeTextForBrowser(crossOrigin),\n              attributeEnd\n            );\n          pushCompletedShellIdAttribute(bootstrapChunks, resumableState);\n          bootstrapChunks.push(' async=\"\">\\x3c/script>');\n        }\n      if (void 0 !== bootstrapModules)\n        for (\n          bootstrapScripts = 0;\n          bootstrapScripts < bootstrapModules.length;\n          bootstrapScripts++\n        )\n          (bootstrapScriptContent = bootstrapModules[bootstrapScripts]),\n            (crossOrigin = src = void 0),\n            (integrity = {\n              rel: \"modulepreload\",\n              fetchPriority: \"low\",\n              nonce: void 0\n            }),\n            \"string\" === typeof bootstrapScriptContent\n              ? (integrity.href = scriptConfig = bootstrapScriptContent)\n              : ((integrity.href = scriptConfig = bootstrapScriptContent.src),\n                (integrity.integrity = crossOrigin =\n                  \"string\" === typeof bootstrapScriptContent.integrity\n                    ? bootstrapScriptContent.integrity\n                    : void 0),\n                (integrity.crossOrigin = src =\n                  \"string\" === typeof bootstrapScriptContent ||\n                  null == bootstrapScriptContent.crossOrigin\n                    ? void 0\n                    : \"use-credentials\" === bootstrapScriptContent.crossOrigin\n                      ? \"use-credentials\"\n                      : \"\")),\n            preloadBootstrapScriptOrModule(\n              resumableState,\n              idPrefix,\n              scriptConfig,\n              integrity\n            ),\n            bootstrapChunks.push(\n              '<script type=\"module\" src=\"',\n              escapeTextForBrowser(scriptConfig),\n              attributeEnd\n            ),\n            \"string\" === typeof crossOrigin &&\n              bootstrapChunks.push(\n                ' integrity=\"',\n                escapeTextForBrowser(crossOrigin),\n                attributeEnd\n              ),\n            \"string\" === typeof src &&\n              bootstrapChunks.push(\n                ' crossorigin=\"',\n                escapeTextForBrowser(src),\n                attributeEnd\n              ),\n            pushCompletedShellIdAttribute(bootstrapChunks, resumableState),\n            bootstrapChunks.push(' async=\"\">\\x3c/script>');\n      return {\n        placeholderPrefix: idPrefix.placeholderPrefix,\n        segmentPrefix: idPrefix.segmentPrefix,\n        boundaryPrefix: idPrefix.boundaryPrefix,\n        startInlineScript: idPrefix.startInlineScript,\n        startInlineStyle: idPrefix.startInlineStyle,\n        preamble: idPrefix.preamble,\n        externalRuntimeScript: idPrefix.externalRuntimeScript,\n        bootstrapChunks: idPrefix.bootstrapChunks,\n        importMapChunks: idPrefix.importMapChunks,\n        onHeaders: idPrefix.onHeaders,\n        headers: idPrefix.headers,\n        resets: idPrefix.resets,\n        charsetChunks: idPrefix.charsetChunks,\n        viewportChunks: idPrefix.viewportChunks,\n        hoistableChunks: idPrefix.hoistableChunks,\n        preconnects: idPrefix.preconnects,\n        fontPreloads: idPrefix.fontPreloads,\n        highImagePreloads: idPrefix.highImagePreloads,\n        styles: idPrefix.styles,\n        bootstrapScripts: idPrefix.bootstrapScripts,\n        scripts: idPrefix.scripts,\n        bulkPreloads: idPrefix.bulkPreloads,\n        preloads: idPrefix.preloads,\n        nonce: idPrefix.nonce,\n        stylesToHoist: idPrefix.stylesToHoist,\n        generateStaticMarkup: generateStaticMarkup\n      };\n    }\n    function pushTextInstance(target, text, renderState, textEmbedded) {\n      if (renderState.generateStaticMarkup)\n        return target.push(escapeTextForBrowser(text)), !1;\n      \"\" === text\n        ? (target = textEmbedded)\n        : (textEmbedded && target.push(\"\\x3c!-- --\\x3e\"),\n          target.push(escapeTextForBrowser(text)),\n          (target = !0));\n      return target;\n    }\n    function pushSegmentFinale(\n      target,\n      renderState,\n      lastPushedText,\n      textEmbedded\n    ) {\n      renderState.generateStaticMarkup ||\n        (lastPushedText && textEmbedded && target.push(\"\\x3c!-- --\\x3e\"));\n    }\n    function getComponentNameFromType(type) {\n      if (null == type) return null;\n      if (\"function\" === typeof type)\n        return type.$$typeof === REACT_CLIENT_REFERENCE\n          ? null\n          : type.displayName || type.name || null;\n      if (\"string\" === typeof type) return type;\n      switch (type) {\n        case REACT_FRAGMENT_TYPE:\n          return \"Fragment\";\n        case REACT_PROFILER_TYPE:\n          return \"Profiler\";\n        case REACT_STRICT_MODE_TYPE:\n          return \"StrictMode\";\n        case REACT_SUSPENSE_TYPE:\n          return \"Suspense\";\n        case REACT_SUSPENSE_LIST_TYPE:\n          return \"SuspenseList\";\n        case REACT_ACTIVITY_TYPE:\n          return \"Activity\";\n      }\n      if (\"object\" === typeof type)\n        switch (\n          (\"number\" === typeof type.tag &&\n            console.error(\n              \"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"\n            ),\n          type.$$typeof)\n        ) {\n          case REACT_PORTAL_TYPE:\n            return \"Portal\";\n          case REACT_CONTEXT_TYPE:\n            return type.displayName || \"Context\";\n          case REACT_CONSUMER_TYPE:\n            return (type._context.displayName || \"Context\") + \".Consumer\";\n          case REACT_FORWARD_REF_TYPE:\n            var innerType = type.render;\n            type = type.displayName;\n            type ||\n              ((type = innerType.displayName || innerType.name || \"\"),\n              (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n            return type;\n          case REACT_MEMO_TYPE:\n            return (\n              (innerType = type.displayName || null),\n              null !== innerType\n                ? innerType\n                : getComponentNameFromType(type.type) || \"Memo\"\n            );\n          case REACT_LAZY_TYPE:\n            innerType = type._payload;\n            type = type._init;\n            try {\n              return getComponentNameFromType(type(innerType));\n            } catch (x) {}\n        }\n      return null;\n    }\n    function popToNearestCommonAncestor(prev, next) {\n      if (prev !== next) {\n        prev.context._currentValue2 = prev.parentValue;\n        prev = prev.parent;\n        var parentNext = next.parent;\n        if (null === prev) {\n          if (null !== parentNext)\n            throw Error(\n              \"The stacks must reach the root at the same time. This is a bug in React.\"\n            );\n        } else {\n          if (null === parentNext)\n            throw Error(\n              \"The stacks must reach the root at the same time. This is a bug in React.\"\n            );\n          popToNearestCommonAncestor(prev, parentNext);\n        }\n        next.context._currentValue2 = next.value;\n      }\n    }\n    function popAllPrevious(prev) {\n      prev.context._currentValue2 = prev.parentValue;\n      prev = prev.parent;\n      null !== prev && popAllPrevious(prev);\n    }\n    function pushAllNext(next) {\n      var parentNext = next.parent;\n      null !== parentNext && pushAllNext(parentNext);\n      next.context._currentValue2 = next.value;\n    }\n    function popPreviousToCommonLevel(prev, next) {\n      prev.context._currentValue2 = prev.parentValue;\n      prev = prev.parent;\n      if (null === prev)\n        throw Error(\n          \"The depth must equal at least at zero before reaching the root. This is a bug in React.\"\n        );\n      prev.depth === next.depth\n        ? popToNearestCommonAncestor(prev, next)\n        : popPreviousToCommonLevel(prev, next);\n    }\n    function popNextToCommonLevel(prev, next) {\n      var parentNext = next.parent;\n      if (null === parentNext)\n        throw Error(\n          \"The depth must equal at least at zero before reaching the root. This is a bug in React.\"\n        );\n      prev.depth === parentNext.depth\n        ? popToNearestCommonAncestor(prev, parentNext)\n        : popNextToCommonLevel(prev, parentNext);\n      next.context._currentValue2 = next.value;\n    }\n    function switchContext(newSnapshot) {\n      var prev = currentActiveSnapshot;\n      prev !== newSnapshot &&\n        (null === prev\n          ? pushAllNext(newSnapshot)\n          : null === newSnapshot\n            ? popAllPrevious(prev)\n            : prev.depth === newSnapshot.depth\n              ? popToNearestCommonAncestor(prev, newSnapshot)\n              : prev.depth > newSnapshot.depth\n                ? popPreviousToCommonLevel(prev, newSnapshot)\n                : popNextToCommonLevel(prev, newSnapshot),\n        (currentActiveSnapshot = newSnapshot));\n    }\n    function warnOnInvalidCallback(callback) {\n      if (null !== callback && \"function\" !== typeof callback) {\n        var key = String(callback);\n        didWarnOnInvalidCallback.has(key) ||\n          (didWarnOnInvalidCallback.add(key),\n          console.error(\n            \"Expected the last optional `callback` argument to be a function. Instead received: %s.\",\n            callback\n          ));\n      }\n    }\n    function warnNoop(publicInstance, callerName) {\n      publicInstance =\n        ((publicInstance = publicInstance.constructor) &&\n          getComponentNameFromType(publicInstance)) ||\n        \"ReactClass\";\n      var warningKey = publicInstance + \".\" + callerName;\n      didWarnAboutNoopUpdateForComponent[warningKey] ||\n        (console.error(\n          \"Can only update a mounting component. This usually means you called %s() outside componentWillMount() on the server. This is a no-op.\\n\\nPlease check the code for the %s component.\",\n          callerName,\n          publicInstance\n        ),\n        (didWarnAboutNoopUpdateForComponent[warningKey] = !0));\n    }\n    function pushTreeContext(baseContext, totalChildren, index) {\n      var baseIdWithLeadingBit = baseContext.id;\n      baseContext = baseContext.overflow;\n      var baseLength = 32 - clz32(baseIdWithLeadingBit) - 1;\n      baseIdWithLeadingBit &= ~(1 << baseLength);\n      index += 1;\n      var length = 32 - clz32(totalChildren) + baseLength;\n      if (30 < length) {\n        var numberOfOverflowBits = baseLength - (baseLength % 5);\n        length = (\n          baseIdWithLeadingBit &\n          ((1 << numberOfOverflowBits) - 1)\n        ).toString(32);\n        baseIdWithLeadingBit >>= numberOfOverflowBits;\n        baseLength -= numberOfOverflowBits;\n        return {\n          id:\n            (1 << (32 - clz32(totalChildren) + baseLength)) |\n            (index << baseLength) |\n            baseIdWithLeadingBit,\n          overflow: length + baseContext\n        };\n      }\n      return {\n        id: (1 << length) | (index << baseLength) | baseIdWithLeadingBit,\n        overflow: baseContext\n      };\n    }\n    function clz32Fallback(x) {\n      x >>>= 0;\n      return 0 === x ? 32 : (31 - ((log(x) / LN2) | 0)) | 0;\n    }\n    function noop() {}\n    function trackUsedThenable(thenableState, thenable, index) {\n      index = thenableState[index];\n      void 0 === index\n        ? thenableState.push(thenable)\n        : index !== thenable && (thenable.then(noop, noop), (thenable = index));\n      switch (thenable.status) {\n        case \"fulfilled\":\n          return thenable.value;\n        case \"rejected\":\n          throw thenable.reason;\n        default:\n          \"string\" === typeof thenable.status\n            ? thenable.then(noop, noop)\n            : ((thenableState = thenable),\n              (thenableState.status = \"pending\"),\n              thenableState.then(\n                function (fulfilledValue) {\n                  if (\"pending\" === thenable.status) {\n                    var fulfilledThenable = thenable;\n                    fulfilledThenable.status = \"fulfilled\";\n                    fulfilledThenable.value = fulfilledValue;\n                  }\n                },\n                function (error) {\n                  if (\"pending\" === thenable.status) {\n                    var rejectedThenable = thenable;\n                    rejectedThenable.status = \"rejected\";\n                    rejectedThenable.reason = error;\n                  }\n                }\n              ));\n          switch (thenable.status) {\n            case \"fulfilled\":\n              return thenable.value;\n            case \"rejected\":\n              throw thenable.reason;\n          }\n          suspendedThenable = thenable;\n          throw SuspenseException;\n      }\n    }\n    function getSuspendedThenable() {\n      if (null === suspendedThenable)\n        throw Error(\n          \"Expected a suspended thenable. This is a bug in React. Please file an issue.\"\n        );\n      var thenable = suspendedThenable;\n      suspendedThenable = null;\n      return thenable;\n    }\n    function is(x, y) {\n      return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n    }\n    function resolveCurrentlyRenderingComponent() {\n      if (null === currentlyRenderingComponent)\n        throw Error(\n          \"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\\n1. You might have mismatching versions of React and the renderer (such as React DOM)\\n2. You might be breaking the Rules of Hooks\\n3. You might have more than one copy of React in the same app\\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.\"\n        );\n      isInHookUserCodeInDev &&\n        console.error(\n          \"Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://react.dev/link/rules-of-hooks\"\n        );\n      return currentlyRenderingComponent;\n    }\n    function createHook() {\n      if (0 < numberOfReRenders)\n        throw Error(\"Rendered more hooks than during the previous render\");\n      return { memoizedState: null, queue: null, next: null };\n    }\n    function createWorkInProgressHook() {\n      null === workInProgressHook\n        ? null === firstWorkInProgressHook\n          ? ((isReRender = !1),\n            (firstWorkInProgressHook = workInProgressHook = createHook()))\n          : ((isReRender = !0), (workInProgressHook = firstWorkInProgressHook))\n        : null === workInProgressHook.next\n          ? ((isReRender = !1),\n            (workInProgressHook = workInProgressHook.next = createHook()))\n          : ((isReRender = !0), (workInProgressHook = workInProgressHook.next));\n      return workInProgressHook;\n    }\n    function getThenableStateAfterSuspending() {\n      var state = thenableState;\n      thenableState = null;\n      return state;\n    }\n    function resetHooksState() {\n      isInHookUserCodeInDev = !1;\n      currentlyRenderingKeyPath =\n        currentlyRenderingRequest =\n        currentlyRenderingTask =\n        currentlyRenderingComponent =\n          null;\n      didScheduleRenderPhaseUpdate = !1;\n      firstWorkInProgressHook = null;\n      numberOfReRenders = 0;\n      workInProgressHook = renderPhaseUpdates = null;\n    }\n    function readContext(context) {\n      isInHookUserCodeInDev &&\n        console.error(\n          \"Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().\"\n        );\n      return context._currentValue2;\n    }\n    function basicStateReducer(state, action) {\n      return \"function\" === typeof action ? action(state) : action;\n    }\n    function useReducer(reducer, initialArg, init) {\n      reducer !== basicStateReducer && (currentHookNameInDev = \"useReducer\");\n      currentlyRenderingComponent = resolveCurrentlyRenderingComponent();\n      workInProgressHook = createWorkInProgressHook();\n      if (isReRender) {\n        init = workInProgressHook.queue;\n        initialArg = init.dispatch;\n        if (null !== renderPhaseUpdates) {\n          var firstRenderPhaseUpdate = renderPhaseUpdates.get(init);\n          if (void 0 !== firstRenderPhaseUpdate) {\n            renderPhaseUpdates.delete(init);\n            init = workInProgressHook.memoizedState;\n            do {\n              var action = firstRenderPhaseUpdate.action;\n              isInHookUserCodeInDev = !0;\n              init = reducer(init, action);\n              isInHookUserCodeInDev = !1;\n              firstRenderPhaseUpdate = firstRenderPhaseUpdate.next;\n            } while (null !== firstRenderPhaseUpdate);\n            workInProgressHook.memoizedState = init;\n            return [init, initialArg];\n          }\n        }\n        return [workInProgressHook.memoizedState, initialArg];\n      }\n      isInHookUserCodeInDev = !0;\n      reducer =\n        reducer === basicStateReducer\n          ? \"function\" === typeof initialArg\n            ? initialArg()\n            : initialArg\n          : void 0 !== init\n            ? init(initialArg)\n            : initialArg;\n      isInHookUserCodeInDev = !1;\n      workInProgressHook.memoizedState = reducer;\n      reducer = workInProgressHook.queue = { last: null, dispatch: null };\n      reducer = reducer.dispatch = dispatchAction.bind(\n        null,\n        currentlyRenderingComponent,\n        reducer\n      );\n      return [workInProgressHook.memoizedState, reducer];\n    }\n    function useMemo(nextCreate, deps) {\n      currentlyRenderingComponent = resolveCurrentlyRenderingComponent();\n      workInProgressHook = createWorkInProgressHook();\n      deps = void 0 === deps ? null : deps;\n      if (null !== workInProgressHook) {\n        var prevState = workInProgressHook.memoizedState;\n        if (null !== prevState && null !== deps) {\n          a: {\n            var JSCompiler_inline_result = prevState[1];\n            if (null === JSCompiler_inline_result)\n              console.error(\n                \"%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.\",\n                currentHookNameInDev\n              ),\n                (JSCompiler_inline_result = !1);\n            else {\n              deps.length !== JSCompiler_inline_result.length &&\n                console.error(\n                  \"The final argument passed to %s changed size between renders. The order and size of this array must remain constant.\\n\\nPrevious: %s\\nIncoming: %s\",\n                  currentHookNameInDev,\n                  \"[\" + deps.join(\", \") + \"]\",\n                  \"[\" + JSCompiler_inline_result.join(\", \") + \"]\"\n                );\n              for (\n                var i = 0;\n                i < JSCompiler_inline_result.length && i < deps.length;\n                i++\n              )\n                if (!objectIs(deps[i], JSCompiler_inline_result[i])) {\n                  JSCompiler_inline_result = !1;\n                  break a;\n                }\n              JSCompiler_inline_result = !0;\n            }\n          }\n          if (JSCompiler_inline_result) return prevState[0];\n        }\n      }\n      isInHookUserCodeInDev = !0;\n      nextCreate = nextCreate();\n      isInHookUserCodeInDev = !1;\n      workInProgressHook.memoizedState = [nextCreate, deps];\n      return nextCreate;\n    }\n    function dispatchAction(componentIdentity, queue, action) {\n      if (25 <= numberOfReRenders)\n        throw Error(\n          \"Too many re-renders. React limits the number of renders to prevent an infinite loop.\"\n        );\n      if (componentIdentity === currentlyRenderingComponent)\n        if (\n          ((didScheduleRenderPhaseUpdate = !0),\n          (componentIdentity = { action: action, next: null }),\n          null === renderPhaseUpdates && (renderPhaseUpdates = new Map()),\n          (action = renderPhaseUpdates.get(queue)),\n          void 0 === action)\n        )\n          renderPhaseUpdates.set(queue, componentIdentity);\n        else {\n          for (queue = action; null !== queue.next; ) queue = queue.next;\n          queue.next = componentIdentity;\n        }\n    }\n    function throwOnUseEffectEventCall() {\n      throw Error(\n        \"A function wrapped in useEffectEvent can't be called during rendering.\"\n      );\n    }\n    function unsupportedStartTransition() {\n      throw Error(\"startTransition cannot be called during server rendering.\");\n    }\n    function unsupportedSetOptimisticState() {\n      throw Error(\"Cannot update optimistic state while rendering.\");\n    }\n    function useActionState(action, initialState, permalink) {\n      resolveCurrentlyRenderingComponent();\n      var actionStateHookIndex = actionStateCounter++,\n        request = currentlyRenderingRequest;\n      if (\"function\" === typeof action.$$FORM_ACTION) {\n        var nextPostbackStateKey = null,\n          componentKeyPath = currentlyRenderingKeyPath;\n        request = request.formState;\n        var isSignatureEqual = action.$$IS_SIGNATURE_EQUAL;\n        if (null !== request && \"function\" === typeof isSignatureEqual) {\n          var postbackKey = request[1];\n          isSignatureEqual.call(action, request[2], request[3]) &&\n            ((nextPostbackStateKey =\n              void 0 !== permalink\n                ? \"p\" + permalink\n                : \"k\" +\n                  murmurhash3_32_gc(\n                    JSON.stringify([\n                      componentKeyPath,\n                      null,\n                      actionStateHookIndex\n                    ]),\n                    0\n                  )),\n            postbackKey === nextPostbackStateKey &&\n              ((actionStateMatchingIndex = actionStateHookIndex),\n              (initialState = request[0])));\n        }\n        var boundAction = action.bind(null, initialState);\n        action = function (payload) {\n          boundAction(payload);\n        };\n        \"function\" === typeof boundAction.$$FORM_ACTION &&\n          (action.$$FORM_ACTION = function (prefix) {\n            prefix = boundAction.$$FORM_ACTION(prefix);\n            void 0 !== permalink &&\n              (checkAttributeStringCoercion(permalink, \"target\"),\n              (permalink += \"\"),\n              (prefix.action = permalink));\n            var formData = prefix.data;\n            formData &&\n              (null === nextPostbackStateKey &&\n                (nextPostbackStateKey =\n                  void 0 !== permalink\n                    ? \"p\" + permalink\n                    : \"k\" +\n                      murmurhash3_32_gc(\n                        JSON.stringify([\n                          componentKeyPath,\n                          null,\n                          actionStateHookIndex\n                        ]),\n                        0\n                      )),\n              formData.append(\"$ACTION_KEY\", nextPostbackStateKey));\n            return prefix;\n          });\n        return [initialState, action, !1];\n      }\n      var _boundAction = action.bind(null, initialState);\n      return [\n        initialState,\n        function (payload) {\n          _boundAction(payload);\n        },\n        !1\n      ];\n    }\n    function unwrapThenable(thenable) {\n      var index = thenableIndexCounter;\n      thenableIndexCounter += 1;\n      null === thenableState && (thenableState = []);\n      return trackUsedThenable(thenableState, thenable, index);\n    }\n    function unsupportedRefresh() {\n      throw Error(\"Cache cannot be refreshed during server rendering.\");\n    }\n    function disabledLog() {}\n    function disableLogs() {\n      if (0 === disabledDepth) {\n        prevLog = console.log;\n        prevInfo = console.info;\n        prevWarn = console.warn;\n        prevError = console.error;\n        prevGroup = console.group;\n        prevGroupCollapsed = console.groupCollapsed;\n        prevGroupEnd = console.groupEnd;\n        var props = {\n          configurable: !0,\n          enumerable: !0,\n          value: disabledLog,\n          writable: !0\n        };\n        Object.defineProperties(console, {\n          info: props,\n          log: props,\n          warn: props,\n          error: props,\n          group: props,\n          groupCollapsed: props,\n          groupEnd: props\n        });\n      }\n      disabledDepth++;\n    }\n    function reenableLogs() {\n      disabledDepth--;\n      if (0 === disabledDepth) {\n        var props = { configurable: !0, enumerable: !0, writable: !0 };\n        Object.defineProperties(console, {\n          log: assign({}, props, { value: prevLog }),\n          info: assign({}, props, { value: prevInfo }),\n          warn: assign({}, props, { value: prevWarn }),\n          error: assign({}, props, { value: prevError }),\n          group: assign({}, props, { value: prevGroup }),\n          groupCollapsed: assign({}, props, { value: prevGroupCollapsed }),\n          groupEnd: assign({}, props, { value: prevGroupEnd })\n        });\n      }\n      0 > disabledDepth &&\n        console.error(\n          \"disabledDepth fell below zero. This is a bug in React. Please file an issue.\"\n        );\n    }\n    function formatOwnerStack(error) {\n      var prevPrepareStackTrace = Error.prepareStackTrace;\n      Error.prepareStackTrace = void 0;\n      error = error.stack;\n      Error.prepareStackTrace = prevPrepareStackTrace;\n      error.startsWith(\"Error: react-stack-top-frame\\n\") &&\n        (error = error.slice(29));\n      prevPrepareStackTrace = error.indexOf(\"\\n\");\n      -1 !== prevPrepareStackTrace &&\n        (error = error.slice(prevPrepareStackTrace + 1));\n      prevPrepareStackTrace = error.indexOf(\"react_stack_bottom_frame\");\n      -1 !== prevPrepareStackTrace &&\n        (prevPrepareStackTrace = error.lastIndexOf(\n          \"\\n\",\n          prevPrepareStackTrace\n        ));\n      if (-1 !== prevPrepareStackTrace)\n        error = error.slice(0, prevPrepareStackTrace);\n      else return \"\";\n      return error;\n    }\n    function describeBuiltInComponentFrame(name) {\n      if (void 0 === prefix)\n        try {\n          throw Error();\n        } catch (x) {\n          var match = x.stack.trim().match(/\\n( *(at )?)/);\n          prefix = (match && match[1]) || \"\";\n          suffix =\n            -1 < x.stack.indexOf(\"\\n    at\")\n              ? \" (<anonymous>)\"\n              : -1 < x.stack.indexOf(\"@\")\n                ? \"@unknown:0:0\"\n                : \"\";\n        }\n      return \"\\n\" + prefix + name + suffix;\n    }\n    function describeNativeComponentFrame(fn, construct) {\n      if (!fn || reentry) return \"\";\n      var frame = componentFrameCache.get(fn);\n      if (void 0 !== frame) return frame;\n      reentry = !0;\n      frame = Error.prepareStackTrace;\n      Error.prepareStackTrace = void 0;\n      var previousDispatcher = null;\n      previousDispatcher = ReactSharedInternals.H;\n      ReactSharedInternals.H = null;\n      disableLogs();\n      try {\n        var RunInRootFrame = {\n          DetermineComponentFrameRoot: function () {\n            try {\n              if (construct) {\n                var Fake = function () {\n                  throw Error();\n                };\n                Object.defineProperty(Fake.prototype, \"props\", {\n                  set: function () {\n                    throw Error();\n                  }\n                });\n                if (\"object\" === typeof Reflect && Reflect.construct) {\n                  try {\n                    Reflect.construct(Fake, []);\n                  } catch (x) {\n                    var control = x;\n                  }\n                  Reflect.construct(fn, [], Fake);\n                } else {\n                  try {\n                    Fake.call();\n                  } catch (x$0) {\n                    control = x$0;\n                  }\n                  fn.call(Fake.prototype);\n                }\n              } else {\n                try {\n                  throw Error();\n                } catch (x$1) {\n                  control = x$1;\n                }\n                (Fake = fn()) &&\n                  \"function\" === typeof Fake.catch &&\n                  Fake.catch(function () {});\n              }\n            } catch (sample) {\n              if (sample && control && \"string\" === typeof sample.stack)\n                return [sample.stack, control.stack];\n            }\n            return [null, null];\n          }\n        };\n        RunInRootFrame.DetermineComponentFrameRoot.displayName =\n          \"DetermineComponentFrameRoot\";\n        var namePropDescriptor = Object.getOwnPropertyDescriptor(\n          RunInRootFrame.DetermineComponentFrameRoot,\n          \"name\"\n        );\n        namePropDescriptor &&\n          namePropDescriptor.configurable &&\n          Object.defineProperty(\n            RunInRootFrame.DetermineComponentFrameRoot,\n            \"name\",\n            { value: \"DetermineComponentFrameRoot\" }\n          );\n        var _RunInRootFrame$Deter =\n            RunInRootFrame.DetermineComponentFrameRoot(),\n          sampleStack = _RunInRootFrame$Deter[0],\n          controlStack = _RunInRootFrame$Deter[1];\n        if (sampleStack && controlStack) {\n          var sampleLines = sampleStack.split(\"\\n\"),\n            controlLines = controlStack.split(\"\\n\");\n          for (\n            _RunInRootFrame$Deter = namePropDescriptor = 0;\n            namePropDescriptor < sampleLines.length &&\n            !sampleLines[namePropDescriptor].includes(\n              \"DetermineComponentFrameRoot\"\n            );\n\n          )\n            namePropDescriptor++;\n          for (\n            ;\n            _RunInRootFrame$Deter < controlLines.length &&\n            !controlLines[_RunInRootFrame$Deter].includes(\n              \"DetermineComponentFrameRoot\"\n            );\n\n          )\n            _RunInRootFrame$Deter++;\n          if (\n            namePropDescriptor === sampleLines.length ||\n            _RunInRootFrame$Deter === controlLines.length\n          )\n            for (\n              namePropDescriptor = sampleLines.length - 1,\n                _RunInRootFrame$Deter = controlLines.length - 1;\n              1 <= namePropDescriptor &&\n              0 <= _RunInRootFrame$Deter &&\n              sampleLines[namePropDescriptor] !==\n                controlLines[_RunInRootFrame$Deter];\n\n            )\n              _RunInRootFrame$Deter--;\n          for (\n            ;\n            1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter;\n            namePropDescriptor--, _RunInRootFrame$Deter--\n          )\n            if (\n              sampleLines[namePropDescriptor] !==\n              controlLines[_RunInRootFrame$Deter]\n            ) {\n              if (1 !== namePropDescriptor || 1 !== _RunInRootFrame$Deter) {\n                do\n                  if (\n                    (namePropDescriptor--,\n                    _RunInRootFrame$Deter--,\n                    0 > _RunInRootFrame$Deter ||\n                      sampleLines[namePropDescriptor] !==\n                        controlLines[_RunInRootFrame$Deter])\n                  ) {\n                    var _frame =\n                      \"\\n\" +\n                      sampleLines[namePropDescriptor].replace(\n                        \" at new \",\n                        \" at \"\n                      );\n                    fn.displayName &&\n                      _frame.includes(\"<anonymous>\") &&\n                      (_frame = _frame.replace(\"<anonymous>\", fn.displayName));\n                    \"function\" === typeof fn &&\n                      componentFrameCache.set(fn, _frame);\n                    return _frame;\n                  }\n                while (1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter);\n              }\n              break;\n            }\n        }\n      } finally {\n        (reentry = !1),\n          (ReactSharedInternals.H = previousDispatcher),\n          reenableLogs(),\n          (Error.prepareStackTrace = frame);\n      }\n      sampleLines = (sampleLines = fn ? fn.displayName || fn.name : \"\")\n        ? describeBuiltInComponentFrame(sampleLines)\n        : \"\";\n      \"function\" === typeof fn && componentFrameCache.set(fn, sampleLines);\n      return sampleLines;\n    }\n    function describeComponentStackByType(type) {\n      if (\"string\" === typeof type) return describeBuiltInComponentFrame(type);\n      if (\"function\" === typeof type)\n        return type.prototype && type.prototype.isReactComponent\n          ? describeNativeComponentFrame(type, !0)\n          : describeNativeComponentFrame(type, !1);\n      if (\"object\" === typeof type && null !== type) {\n        switch (type.$$typeof) {\n          case REACT_FORWARD_REF_TYPE:\n            return describeNativeComponentFrame(type.render, !1);\n          case REACT_MEMO_TYPE:\n            return describeNativeComponentFrame(type.type, !1);\n          case REACT_LAZY_TYPE:\n            var lazyComponent = type,\n              payload = lazyComponent._payload;\n            lazyComponent = lazyComponent._init;\n            try {\n              type = lazyComponent(payload);\n            } catch (x) {\n              return describeBuiltInComponentFrame(\"Lazy\");\n            }\n            return describeComponentStackByType(type);\n        }\n        if (\"string\" === typeof type.name) {\n          a: {\n            payload = type.name;\n            lazyComponent = type.env;\n            type = type.debugLocation;\n            if (null != type) {\n              type = formatOwnerStack(type);\n              var idx = type.lastIndexOf(\"\\n\");\n              type = -1 === idx ? type : type.slice(idx + 1);\n              if (-1 !== type.indexOf(payload)) {\n                payload = \"\\n\" + type;\n                break a;\n              }\n            }\n            payload = describeBuiltInComponentFrame(\n              payload + (lazyComponent ? \" [\" + lazyComponent + \"]\" : \"\")\n            );\n          }\n          return payload;\n        }\n      }\n      switch (type) {\n        case REACT_SUSPENSE_LIST_TYPE:\n          return describeBuiltInComponentFrame(\"SuspenseList\");\n        case REACT_SUSPENSE_TYPE:\n          return describeBuiltInComponentFrame(\"Suspense\");\n      }\n      return \"\";\n    }\n    function isEligibleForOutlining(request, boundary) {\n      return (\n        (500 < boundary.byteSize || !1) && null === boundary.contentPreamble\n      );\n    }\n    function defaultErrorHandler(error) {\n      if (\n        \"object\" === typeof error &&\n        null !== error &&\n        \"string\" === typeof error.environmentName\n      ) {\n        var JSCompiler_inline_result = error.environmentName;\n        error = [error].slice(0);\n        \"string\" === typeof error[0]\n          ? error.splice(\n              0,\n              1,\n              \"[%s] \" + error[0],\n              \" \" + JSCompiler_inline_result + \" \"\n            )\n          : error.splice(0, 0, \"[%s]\", \" \" + JSCompiler_inline_result + \" \");\n        error.unshift(console);\n        JSCompiler_inline_result = bind.apply(console.error, error);\n        JSCompiler_inline_result();\n      } else console.error(error);\n      return null;\n    }\n    function RequestInstance(\n      resumableState,\n      renderState,\n      rootFormatContext,\n      progressiveChunkSize,\n      onError,\n      onAllReady,\n      onShellReady,\n      onShellError,\n      onFatalError,\n      onPostpone,\n      formState\n    ) {\n      var abortSet = new Set();\n      this.destination = null;\n      this.flushScheduled = !1;\n      this.resumableState = resumableState;\n      this.renderState = renderState;\n      this.rootFormatContext = rootFormatContext;\n      this.progressiveChunkSize =\n        void 0 === progressiveChunkSize ? 12800 : progressiveChunkSize;\n      this.status = 10;\n      this.fatalError = null;\n      this.pendingRootTasks = this.allPendingTasks = this.nextSegmentId = 0;\n      this.completedPreambleSegments = this.completedRootSegment = null;\n      this.byteSize = 0;\n      this.abortableTasks = abortSet;\n      this.pingedTasks = [];\n      this.clientRenderedBoundaries = [];\n      this.completedBoundaries = [];\n      this.partialBoundaries = [];\n      this.trackedPostpones = null;\n      this.onError = void 0 === onError ? defaultErrorHandler : onError;\n      this.onPostpone = void 0 === onPostpone ? noop : onPostpone;\n      this.onAllReady = void 0 === onAllReady ? noop : onAllReady;\n      this.onShellReady = void 0 === onShellReady ? noop : onShellReady;\n      this.onShellError = void 0 === onShellError ? noop : onShellError;\n      this.onFatalError = void 0 === onFatalError ? noop : onFatalError;\n      this.formState = void 0 === formState ? null : formState;\n      this.didWarnForKey = null;\n    }\n    function createRequest(\n      children,\n      resumableState,\n      renderState,\n      rootFormatContext,\n      progressiveChunkSize,\n      onError,\n      onAllReady,\n      onShellReady,\n      onShellError,\n      onFatalError,\n      onPostpone,\n      formState\n    ) {\n      var now = getCurrentTime();\n      1e3 < now - lastResetTime &&\n        ((ReactSharedInternals.recentlyCreatedOwnerStacks = 0),\n        (lastResetTime = now));\n      resumableState = new RequestInstance(\n        resumableState,\n        renderState,\n        rootFormatContext,\n        progressiveChunkSize,\n        onError,\n        onAllReady,\n        onShellReady,\n        onShellError,\n        onFatalError,\n        onPostpone,\n        formState\n      );\n      renderState = createPendingSegment(\n        resumableState,\n        0,\n        null,\n        rootFormatContext,\n        !1,\n        !1\n      );\n      renderState.parentFlushed = !0;\n      children = createRenderTask(\n        resumableState,\n        null,\n        children,\n        -1,\n        null,\n        renderState,\n        null,\n        null,\n        resumableState.abortableTasks,\n        null,\n        rootFormatContext,\n        null,\n        emptyTreeContext,\n        null,\n        null,\n        emptyContextObject,\n        null\n      );\n      pushComponentStack(children);\n      resumableState.pingedTasks.push(children);\n      return resumableState;\n    }\n    function pingTask(request, task) {\n      request.pingedTasks.push(task);\n      1 === request.pingedTasks.length &&\n        ((request.flushScheduled = null !== request.destination),\n        performWork(request));\n    }\n    function createSuspenseBoundary(\n      request,\n      row,\n      fallbackAbortableTasks,\n      contentPreamble,\n      fallbackPreamble\n    ) {\n      fallbackAbortableTasks = {\n        status: PENDING,\n        rootSegmentID: -1,\n        parentFlushed: !1,\n        pendingTasks: 0,\n        row: row,\n        completedSegments: [],\n        byteSize: 0,\n        fallbackAbortableTasks: fallbackAbortableTasks,\n        errorDigest: null,\n        contentState: createHoistableState(),\n        fallbackState: createHoistableState(),\n        contentPreamble: contentPreamble,\n        fallbackPreamble: fallbackPreamble,\n        trackedContentKeyPath: null,\n        trackedFallbackNode: null,\n        errorMessage: null,\n        errorStack: null,\n        errorComponentStack: null\n      };\n      null !== row &&\n        (row.pendingTasks++,\n        (contentPreamble = row.boundaries),\n        null !== contentPreamble &&\n          (request.allPendingTasks++,\n          fallbackAbortableTasks.pendingTasks++,\n          contentPreamble.push(fallbackAbortableTasks)),\n        (request = row.inheritedHoistables),\n        null !== request &&\n          hoistHoistables(fallbackAbortableTasks.contentState, request));\n      return fallbackAbortableTasks;\n    }\n    function createRenderTask(\n      request,\n      thenableState,\n      node,\n      childIndex,\n      blockedBoundary,\n      blockedSegment,\n      blockedPreamble,\n      hoistableState,\n      abortSet,\n      keyPath,\n      formatContext,\n      context,\n      treeContext,\n      row,\n      componentStack,\n      legacyContext,\n      debugTask\n    ) {\n      request.allPendingTasks++;\n      null === blockedBoundary\n        ? request.pendingRootTasks++\n        : blockedBoundary.pendingTasks++;\n      null !== row && row.pendingTasks++;\n      var task = {\n        replay: null,\n        node: node,\n        childIndex: childIndex,\n        ping: function () {\n          return pingTask(request, task);\n        },\n        blockedBoundary: blockedBoundary,\n        blockedSegment: blockedSegment,\n        blockedPreamble: blockedPreamble,\n        hoistableState: hoistableState,\n        abortSet: abortSet,\n        keyPath: keyPath,\n        formatContext: formatContext,\n        context: context,\n        treeContext: treeContext,\n        row: row,\n        componentStack: componentStack,\n        thenableState: thenableState\n      };\n      task.debugTask = debugTask;\n      abortSet.add(task);\n      return task;\n    }\n    function createReplayTask(\n      request,\n      thenableState,\n      replay,\n      node,\n      childIndex,\n      blockedBoundary,\n      hoistableState,\n      abortSet,\n      keyPath,\n      formatContext,\n      context,\n      treeContext,\n      row,\n      componentStack,\n      legacyContext,\n      debugTask\n    ) {\n      request.allPendingTasks++;\n      null === blockedBoundary\n        ? request.pendingRootTasks++\n        : blockedBoundary.pendingTasks++;\n      null !== row && row.pendingTasks++;\n      replay.pendingTasks++;\n      var task = {\n        replay: replay,\n        node: node,\n        childIndex: childIndex,\n        ping: function () {\n          return pingTask(request, task);\n        },\n        blockedBoundary: blockedBoundary,\n        blockedSegment: null,\n        blockedPreamble: null,\n        hoistableState: hoistableState,\n        abortSet: abortSet,\n        keyPath: keyPath,\n        formatContext: formatContext,\n        context: context,\n        treeContext: treeContext,\n        row: row,\n        componentStack: componentStack,\n        thenableState: thenableState\n      };\n      task.debugTask = debugTask;\n      abortSet.add(task);\n      return task;\n    }\n    function createPendingSegment(\n      request,\n      index,\n      boundary,\n      parentFormatContext,\n      lastPushedText,\n      textEmbedded\n    ) {\n      return {\n        status: PENDING,\n        parentFlushed: !1,\n        id: -1,\n        index: index,\n        chunks: [],\n        children: [],\n        preambleChildren: [],\n        parentFormatContext: parentFormatContext,\n        boundary: boundary,\n        lastPushedText: lastPushedText,\n        textEmbedded: textEmbedded\n      };\n    }\n    function getCurrentStackInDEV() {\n      if (null === currentTaskInDEV || null === currentTaskInDEV.componentStack)\n        return \"\";\n      var componentStack = currentTaskInDEV.componentStack;\n      try {\n        var info = \"\";\n        if (\"string\" === typeof componentStack.type)\n          info += describeBuiltInComponentFrame(componentStack.type);\n        else if (\"function\" === typeof componentStack.type) {\n          if (!componentStack.owner) {\n            var JSCompiler_temp_const = info,\n              fn = componentStack.type,\n              name = fn ? fn.displayName || fn.name : \"\";\n            var JSCompiler_inline_result = name\n              ? describeBuiltInComponentFrame(name)\n              : \"\";\n            info = JSCompiler_temp_const + JSCompiler_inline_result;\n          }\n        } else\n          componentStack.owner ||\n            (info += describeComponentStackByType(componentStack.type));\n        for (; componentStack; )\n          (JSCompiler_temp_const = null),\n            null != componentStack.debugStack\n              ? (JSCompiler_temp_const = formatOwnerStack(\n                  componentStack.debugStack\n                ))\n              : ((JSCompiler_inline_result = componentStack),\n                null != JSCompiler_inline_result.stack &&\n                  (JSCompiler_temp_const =\n                    \"string\" !== typeof JSCompiler_inline_result.stack\n                      ? (JSCompiler_inline_result.stack = formatOwnerStack(\n                          JSCompiler_inline_result.stack\n                        ))\n                      : JSCompiler_inline_result.stack)),\n            (componentStack = componentStack.owner) &&\n              JSCompiler_temp_const &&\n              (info += \"\\n\" + JSCompiler_temp_const);\n        var JSCompiler_inline_result$jscomp$0 = info;\n      } catch (x) {\n        JSCompiler_inline_result$jscomp$0 =\n          \"\\nError generating stack: \" + x.message + \"\\n\" + x.stack;\n      }\n      return JSCompiler_inline_result$jscomp$0;\n    }\n    function pushHaltedAwaitOnComponentStack(task, debugInfo) {\n      if (null != debugInfo)\n        for (var i = debugInfo.length - 1; 0 <= i; i--) {\n          var info = debugInfo[i];\n          if (\"string\" === typeof info.name) break;\n          if (\"number\" === typeof info.time) break;\n          if (null != info.awaited) {\n            var bestStack = null == info.debugStack ? info.awaited : info;\n            if (void 0 !== bestStack.debugStack) {\n              task.componentStack = {\n                parent: task.componentStack,\n                type: info,\n                owner: bestStack.owner,\n                stack: bestStack.debugStack\n              };\n              task.debugTask = bestStack.debugTask;\n              break;\n            }\n          }\n        }\n    }\n    function pushServerComponentStack(task, debugInfo) {\n      if (null != debugInfo)\n        for (var i = 0; i < debugInfo.length; i++) {\n          var componentInfo = debugInfo[i];\n          \"string\" === typeof componentInfo.name &&\n            void 0 !== componentInfo.debugStack &&\n            ((task.componentStack = {\n              parent: task.componentStack,\n              type: componentInfo,\n              owner: componentInfo.owner,\n              stack: componentInfo.debugStack\n            }),\n            (task.debugTask = componentInfo.debugTask));\n        }\n    }\n    function pushComponentStack(task) {\n      var node = task.node;\n      if (\"object\" === typeof node && null !== node)\n        switch (node.$$typeof) {\n          case REACT_ELEMENT_TYPE:\n            var type = node.type,\n              owner = node._owner,\n              stack = node._debugStack;\n            pushServerComponentStack(task, node._debugInfo);\n            task.debugTask = node._debugTask;\n            task.componentStack = {\n              parent: task.componentStack,\n              type: type,\n              owner: owner,\n              stack: stack\n            };\n            break;\n          case REACT_LAZY_TYPE:\n            pushServerComponentStack(task, node._debugInfo);\n            break;\n          default:\n            \"function\" === typeof node.then &&\n              pushServerComponentStack(task, node._debugInfo);\n        }\n    }\n    function replaceSuspenseComponentStackWithSuspenseFallbackStack(\n      componentStack\n    ) {\n      return null === componentStack\n        ? null\n        : {\n            parent: componentStack.parent,\n            type: \"Suspense Fallback\",\n            owner: componentStack.owner,\n            stack: componentStack.stack\n          };\n    }\n    function getThrownInfo(node$jscomp$0) {\n      var errorInfo = {};\n      node$jscomp$0 &&\n        Object.defineProperty(errorInfo, \"componentStack\", {\n          configurable: !0,\n          enumerable: !0,\n          get: function () {\n            try {\n              var info = \"\",\n                node = node$jscomp$0;\n              do\n                (info += describeComponentStackByType(node.type)),\n                  (node = node.parent);\n              while (node);\n              var stack = info;\n            } catch (x) {\n              stack = \"\\nError generating stack: \" + x.message + \"\\n\" + x.stack;\n            }\n            Object.defineProperty(errorInfo, \"componentStack\", {\n              value: stack\n            });\n            return stack;\n          }\n        });\n      return errorInfo;\n    }\n    function encodeErrorForBoundary(\n      boundary,\n      digest,\n      error,\n      thrownInfo,\n      wasAborted\n    ) {\n      boundary.errorDigest = digest;\n      error instanceof Error\n        ? ((digest = String(error.message)), (error = String(error.stack)))\n        : ((digest =\n            \"object\" === typeof error && null !== error\n              ? describeObjectForErrorMessage(error)\n              : String(error)),\n          (error = null));\n      wasAborted = wasAborted\n        ? \"Switched to client rendering because the server rendering aborted due to:\\n\\n\"\n        : \"Switched to client rendering because the server rendering errored:\\n\\n\";\n      boundary.errorMessage = wasAborted + digest;\n      boundary.errorStack = null !== error ? wasAborted + error : null;\n      boundary.errorComponentStack = thrownInfo.componentStack;\n    }\n    function logRecoverableError(request, error, errorInfo, debugTask) {\n      request = request.onError;\n      error = debugTask\n        ? debugTask.run(request.bind(null, error, errorInfo))\n        : request(error, errorInfo);\n      if (null != error && \"string\" !== typeof error)\n        console.error(\n          'onError returned something with a type other than \"string\". onError should return a string and may return null or undefined but must not return anything else. It received something of type \"%s\" instead',\n          typeof error\n        );\n      else return error;\n    }\n    function fatalError(request, error, errorInfo, debugTask) {\n      errorInfo = request.onShellError;\n      var onFatalError = request.onFatalError;\n      debugTask\n        ? (debugTask.run(errorInfo.bind(null, error)),\n          debugTask.run(onFatalError.bind(null, error)))\n        : (errorInfo(error), onFatalError(error));\n      null !== request.destination\n        ? ((request.status = CLOSED), request.destination.destroy(error))\n        : ((request.status = 13), (request.fatalError = error));\n    }\n    function finishSuspenseListRow(request, row) {\n      unblockSuspenseListRow(request, row.next, row.hoistables);\n    }\n    function unblockSuspenseListRow(\n      request,\n      unblockedRow,\n      inheritedHoistables\n    ) {\n      for (; null !== unblockedRow; ) {\n        null !== inheritedHoistables &&\n          (hoistHoistables(unblockedRow.hoistables, inheritedHoistables),\n          (unblockedRow.inheritedHoistables = inheritedHoistables));\n        var unblockedBoundaries = unblockedRow.boundaries;\n        if (null !== unblockedBoundaries) {\n          unblockedRow.boundaries = null;\n          for (var i = 0; i < unblockedBoundaries.length; i++) {\n            var unblockedBoundary = unblockedBoundaries[i];\n            null !== inheritedHoistables &&\n              hoistHoistables(\n                unblockedBoundary.contentState,\n                inheritedHoistables\n              );\n            finishedTask(request, unblockedBoundary, null, null);\n          }\n        }\n        unblockedRow.pendingTasks--;\n        if (0 < unblockedRow.pendingTasks) break;\n        inheritedHoistables = unblockedRow.hoistables;\n        unblockedRow = unblockedRow.next;\n      }\n    }\n    function tryToResolveTogetherRow(request, togetherRow) {\n      var boundaries = togetherRow.boundaries;\n      if (\n        null !== boundaries &&\n        togetherRow.pendingTasks === boundaries.length\n      ) {\n        for (\n          var allCompleteAndInlinable = !0, i = 0;\n          i < boundaries.length;\n          i++\n        ) {\n          var rowBoundary = boundaries[i];\n          if (\n            1 !== rowBoundary.pendingTasks ||\n            rowBoundary.parentFlushed ||\n            isEligibleForOutlining(request, rowBoundary)\n          ) {\n            allCompleteAndInlinable = !1;\n            break;\n          }\n        }\n        allCompleteAndInlinable &&\n          unblockSuspenseListRow(request, togetherRow, togetherRow.hoistables);\n      }\n    }\n    function createSuspenseListRow(previousRow) {\n      var newRow = {\n        pendingTasks: 1,\n        boundaries: null,\n        hoistables: createHoistableState(),\n        inheritedHoistables: null,\n        together: !1,\n        next: null\n      };\n      null !== previousRow &&\n        0 < previousRow.pendingTasks &&\n        (newRow.pendingTasks++,\n        (newRow.boundaries = []),\n        (previousRow.next = newRow));\n      return newRow;\n    }\n    function renderSuspenseListRows(request, task, keyPath, rows, revealOrder) {\n      var prevKeyPath = task.keyPath,\n        prevTreeContext = task.treeContext,\n        prevRow = task.row,\n        previousComponentStack = task.componentStack;\n      var previousDebugTask = task.debugTask;\n      pushServerComponentStack(task, task.node.props.children._debugInfo);\n      task.keyPath = keyPath;\n      keyPath = rows.length;\n      var previousSuspenseListRow = null;\n      if (null !== task.replay) {\n        var resumeSlots = task.replay.slots;\n        if (null !== resumeSlots && \"object\" === typeof resumeSlots)\n          for (var n = 0; n < keyPath; n++) {\n            var i =\n                \"backwards\" !== revealOrder &&\n                \"unstable_legacy-backwards\" !== revealOrder\n                  ? n\n                  : keyPath - 1 - n,\n              node = rows[i];\n            task.row = previousSuspenseListRow = createSuspenseListRow(\n              previousSuspenseListRow\n            );\n            task.treeContext = pushTreeContext(prevTreeContext, keyPath, i);\n            var resumeSegmentID = resumeSlots[i];\n            \"number\" === typeof resumeSegmentID\n              ? (resumeNode(request, task, resumeSegmentID, node, i),\n                delete resumeSlots[i])\n              : renderNode(request, task, node, i);\n            0 === --previousSuspenseListRow.pendingTasks &&\n              finishSuspenseListRow(request, previousSuspenseListRow);\n          }\n        else\n          for (resumeSlots = 0; resumeSlots < keyPath; resumeSlots++)\n            (n =\n              \"backwards\" !== revealOrder &&\n              \"unstable_legacy-backwards\" !== revealOrder\n                ? resumeSlots\n                : keyPath - 1 - resumeSlots),\n              (i = rows[n]),\n              warnForMissingKey(request, task, i),\n              (task.row = previousSuspenseListRow =\n                createSuspenseListRow(previousSuspenseListRow)),\n              (task.treeContext = pushTreeContext(prevTreeContext, keyPath, n)),\n              renderNode(request, task, i, n),\n              0 === --previousSuspenseListRow.pendingTasks &&\n                finishSuspenseListRow(request, previousSuspenseListRow);\n      } else if (\n        \"backwards\" !== revealOrder &&\n        \"unstable_legacy-backwards\" !== revealOrder\n      )\n        for (revealOrder = 0; revealOrder < keyPath; revealOrder++)\n          (resumeSlots = rows[revealOrder]),\n            warnForMissingKey(request, task, resumeSlots),\n            (task.row = previousSuspenseListRow =\n              createSuspenseListRow(previousSuspenseListRow)),\n            (task.treeContext = pushTreeContext(\n              prevTreeContext,\n              keyPath,\n              revealOrder\n            )),\n            renderNode(request, task, resumeSlots, revealOrder),\n            0 === --previousSuspenseListRow.pendingTasks &&\n              finishSuspenseListRow(request, previousSuspenseListRow);\n      else {\n        revealOrder = task.blockedSegment;\n        resumeSlots = revealOrder.children.length;\n        n = revealOrder.chunks.length;\n        for (i = keyPath - 1; 0 <= i; i--) {\n          node = rows[i];\n          task.row = previousSuspenseListRow = createSuspenseListRow(\n            previousSuspenseListRow\n          );\n          task.treeContext = pushTreeContext(prevTreeContext, keyPath, i);\n          resumeSegmentID = createPendingSegment(\n            request,\n            n,\n            null,\n            task.formatContext,\n            0 === i ? revealOrder.lastPushedText : !0,\n            !0\n          );\n          revealOrder.children.splice(resumeSlots, 0, resumeSegmentID);\n          task.blockedSegment = resumeSegmentID;\n          warnForMissingKey(request, task, node);\n          try {\n            renderNode(request, task, node, i),\n              pushSegmentFinale(\n                resumeSegmentID.chunks,\n                request.renderState,\n                resumeSegmentID.lastPushedText,\n                resumeSegmentID.textEmbedded\n              ),\n              (resumeSegmentID.status = COMPLETED),\n              0 === --previousSuspenseListRow.pendingTasks &&\n                finishSuspenseListRow(request, previousSuspenseListRow);\n          } catch (thrownValue) {\n            throw (\n              ((resumeSegmentID.status =\n                12 === request.status ? ABORTED : ERRORED),\n              thrownValue)\n            );\n          }\n        }\n        task.blockedSegment = revealOrder;\n        revealOrder.lastPushedText = !1;\n      }\n      null !== prevRow &&\n        null !== previousSuspenseListRow &&\n        0 < previousSuspenseListRow.pendingTasks &&\n        (prevRow.pendingTasks++, (previousSuspenseListRow.next = prevRow));\n      task.treeContext = prevTreeContext;\n      task.row = prevRow;\n      task.keyPath = prevKeyPath;\n      task.componentStack = previousComponentStack;\n      task.debugTask = previousDebugTask;\n    }\n    function renderWithHooks(\n      request,\n      task,\n      keyPath,\n      Component,\n      props,\n      secondArg\n    ) {\n      var prevThenableState = task.thenableState;\n      task.thenableState = null;\n      currentlyRenderingComponent = {};\n      currentlyRenderingTask = task;\n      currentlyRenderingRequest = request;\n      currentlyRenderingKeyPath = keyPath;\n      isInHookUserCodeInDev = !1;\n      actionStateCounter = localIdCounter = 0;\n      actionStateMatchingIndex = -1;\n      thenableIndexCounter = 0;\n      thenableState = prevThenableState;\n      for (\n        request = callComponentInDEV(Component, props, secondArg);\n        didScheduleRenderPhaseUpdate;\n\n      )\n        (didScheduleRenderPhaseUpdate = !1),\n          (actionStateCounter = localIdCounter = 0),\n          (actionStateMatchingIndex = -1),\n          (thenableIndexCounter = 0),\n          (numberOfReRenders += 1),\n          (workInProgressHook = null),\n          (request = Component(props, secondArg));\n      resetHooksState();\n      return request;\n    }\n    function finishFunctionComponent(\n      request,\n      task,\n      keyPath,\n      children,\n      hasId,\n      actionStateCount,\n      actionStateMatchingIndex\n    ) {\n      var didEmitActionStateMarkers = !1;\n      if (0 !== actionStateCount && null !== request.formState) {\n        var segment = task.blockedSegment;\n        if (null !== segment) {\n          didEmitActionStateMarkers = !0;\n          segment = segment.chunks;\n          for (var i = 0; i < actionStateCount; i++)\n            i === actionStateMatchingIndex\n              ? segment.push(\"\\x3c!--F!--\\x3e\")\n              : segment.push(\"\\x3c!--F--\\x3e\");\n        }\n      }\n      actionStateCount = task.keyPath;\n      task.keyPath = keyPath;\n      hasId\n        ? ((keyPath = task.treeContext),\n          (task.treeContext = pushTreeContext(keyPath, 1, 0)),\n          renderNode(request, task, children, -1),\n          (task.treeContext = keyPath))\n        : didEmitActionStateMarkers\n          ? renderNode(request, task, children, -1)\n          : renderNodeDestructive(request, task, children, -1);\n      task.keyPath = actionStateCount;\n    }\n    function renderElement(request, task, keyPath, type, props, ref) {\n      if (\"function\" === typeof type)\n        if (type.prototype && type.prototype.isReactComponent) {\n          var newProps = props;\n          if (\"ref\" in props) {\n            newProps = {};\n            for (var propName in props)\n              \"ref\" !== propName && (newProps[propName] = props[propName]);\n          }\n          var defaultProps = type.defaultProps;\n          if (defaultProps) {\n            newProps === props && (newProps = assign({}, newProps, props));\n            for (var _propName in defaultProps)\n              void 0 === newProps[_propName] &&\n                (newProps[_propName] = defaultProps[_propName]);\n          }\n          var resolvedProps = newProps;\n          var context = emptyContextObject,\n            contextType = type.contextType;\n          if (\n            \"contextType\" in type &&\n            null !== contextType &&\n            (void 0 === contextType ||\n              contextType.$$typeof !== REACT_CONTEXT_TYPE) &&\n            !didWarnAboutInvalidateContextType.has(type)\n          ) {\n            didWarnAboutInvalidateContextType.add(type);\n            var addendum =\n              void 0 === contextType\n                ? \" However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file.\"\n                : \"object\" !== typeof contextType\n                  ? \" However, it is set to a \" + typeof contextType + \".\"\n                  : contextType.$$typeof === REACT_CONSUMER_TYPE\n                    ? \" Did you accidentally pass the Context.Consumer instead?\"\n                    : \" However, it is set to an object with keys {\" +\n                      Object.keys(contextType).join(\", \") +\n                      \"}.\";\n            console.error(\n              \"%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s\",\n              getComponentNameFromType(type) || \"Component\",\n              addendum\n            );\n          }\n          \"object\" === typeof contextType &&\n            null !== contextType &&\n            (context = contextType._currentValue2);\n          var instance = new type(resolvedProps, context);\n          if (\n            \"function\" === typeof type.getDerivedStateFromProps &&\n            (null === instance.state || void 0 === instance.state)\n          ) {\n            var componentName = getComponentNameFromType(type) || \"Component\";\n            didWarnAboutUninitializedState.has(componentName) ||\n              (didWarnAboutUninitializedState.add(componentName),\n              console.error(\n                \"`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.\",\n                componentName,\n                null === instance.state ? \"null\" : \"undefined\",\n                componentName\n              ));\n          }\n          if (\n            \"function\" === typeof type.getDerivedStateFromProps ||\n            \"function\" === typeof instance.getSnapshotBeforeUpdate\n          ) {\n            var foundWillMountName = null,\n              foundWillReceivePropsName = null,\n              foundWillUpdateName = null;\n            \"function\" === typeof instance.componentWillMount &&\n            !0 !== instance.componentWillMount.__suppressDeprecationWarning\n              ? (foundWillMountName = \"componentWillMount\")\n              : \"function\" === typeof instance.UNSAFE_componentWillMount &&\n                (foundWillMountName = \"UNSAFE_componentWillMount\");\n            \"function\" === typeof instance.componentWillReceiveProps &&\n            !0 !==\n              instance.componentWillReceiveProps.__suppressDeprecationWarning\n              ? (foundWillReceivePropsName = \"componentWillReceiveProps\")\n              : \"function\" ===\n                  typeof instance.UNSAFE_componentWillReceiveProps &&\n                (foundWillReceivePropsName =\n                  \"UNSAFE_componentWillReceiveProps\");\n            \"function\" === typeof instance.componentWillUpdate &&\n            !0 !== instance.componentWillUpdate.__suppressDeprecationWarning\n              ? (foundWillUpdateName = \"componentWillUpdate\")\n              : \"function\" === typeof instance.UNSAFE_componentWillUpdate &&\n                (foundWillUpdateName = \"UNSAFE_componentWillUpdate\");\n            if (\n              null !== foundWillMountName ||\n              null !== foundWillReceivePropsName ||\n              null !== foundWillUpdateName\n            ) {\n              var _componentName =\n                  getComponentNameFromType(type) || \"Component\",\n                newApiName =\n                  \"function\" === typeof type.getDerivedStateFromProps\n                    ? \"getDerivedStateFromProps()\"\n                    : \"getSnapshotBeforeUpdate()\";\n              didWarnAboutLegacyLifecyclesAndDerivedState.has(_componentName) ||\n                (didWarnAboutLegacyLifecyclesAndDerivedState.add(\n                  _componentName\n                ),\n                console.error(\n                  \"Unsafe legacy lifecycles will not be called for components using new component APIs.\\n\\n%s uses %s but also contains the following legacy lifecycles:%s%s%s\\n\\nThe above lifecycles should be removed. Learn more about this warning here:\\nhttps://react.dev/link/unsafe-component-lifecycles\",\n                  _componentName,\n                  newApiName,\n                  null !== foundWillMountName\n                    ? \"\\n  \" + foundWillMountName\n                    : \"\",\n                  null !== foundWillReceivePropsName\n                    ? \"\\n  \" + foundWillReceivePropsName\n                    : \"\",\n                  null !== foundWillUpdateName\n                    ? \"\\n  \" + foundWillUpdateName\n                    : \"\"\n                ));\n            }\n          }\n          var name = getComponentNameFromType(type) || \"Component\";\n          instance.render ||\n            (type.prototype && \"function\" === typeof type.prototype.render\n              ? console.error(\n                  \"No `render` method found on the %s instance: did you accidentally return an object from the constructor?\",\n                  name\n                )\n              : console.error(\n                  \"No `render` method found on the %s instance: you may have forgotten to define `render`.\",\n                  name\n                ));\n          !instance.getInitialState ||\n            instance.getInitialState.isReactClassApproved ||\n            instance.state ||\n            console.error(\n              \"getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?\",\n              name\n            );\n          instance.getDefaultProps &&\n            !instance.getDefaultProps.isReactClassApproved &&\n            console.error(\n              \"getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.\",\n              name\n            );\n          instance.contextType &&\n            console.error(\n              \"contextType was defined as an instance property on %s. Use a static property to define contextType instead.\",\n              name\n            );\n          type.childContextTypes &&\n            !didWarnAboutChildContextTypes.has(type) &&\n            (didWarnAboutChildContextTypes.add(type),\n            console.error(\n              \"%s uses the legacy childContextTypes API which was removed in React 19. Use React.createContext() instead. (https://react.dev/link/legacy-context)\",\n              name\n            ));\n          type.contextTypes &&\n            !didWarnAboutContextTypes$1.has(type) &&\n            (didWarnAboutContextTypes$1.add(type),\n            console.error(\n              \"%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with static contextType instead. (https://react.dev/link/legacy-context)\",\n              name\n            ));\n          \"function\" === typeof instance.componentShouldUpdate &&\n            console.error(\n              \"%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.\",\n              name\n            );\n          type.prototype &&\n            type.prototype.isPureReactComponent &&\n            \"undefined\" !== typeof instance.shouldComponentUpdate &&\n            console.error(\n              \"%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.\",\n              getComponentNameFromType(type) || \"A pure component\"\n            );\n          \"function\" === typeof instance.componentDidUnmount &&\n            console.error(\n              \"%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?\",\n              name\n            );\n          \"function\" === typeof instance.componentDidReceiveProps &&\n            console.error(\n              \"%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().\",\n              name\n            );\n          \"function\" === typeof instance.componentWillRecieveProps &&\n            console.error(\n              \"%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?\",\n              name\n            );\n          \"function\" === typeof instance.UNSAFE_componentWillRecieveProps &&\n            console.error(\n              \"%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?\",\n              name\n            );\n          var hasMutatedProps = instance.props !== resolvedProps;\n          void 0 !== instance.props &&\n            hasMutatedProps &&\n            console.error(\n              \"When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.\",\n              name\n            );\n          instance.defaultProps &&\n            console.error(\n              \"Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.\",\n              name,\n              name\n            );\n          \"function\" !== typeof instance.getSnapshotBeforeUpdate ||\n            \"function\" === typeof instance.componentDidUpdate ||\n            didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(type) ||\n            (didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(type),\n            console.error(\n              \"%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.\",\n              getComponentNameFromType(type)\n            ));\n          \"function\" === typeof instance.getDerivedStateFromProps &&\n            console.error(\n              \"%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.\",\n              name\n            );\n          \"function\" === typeof instance.getDerivedStateFromError &&\n            console.error(\n              \"%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.\",\n              name\n            );\n          \"function\" === typeof type.getSnapshotBeforeUpdate &&\n            console.error(\n              \"%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.\",\n              name\n            );\n          var state = instance.state;\n          state &&\n            (\"object\" !== typeof state || isArrayImpl(state)) &&\n            console.error(\"%s.state: must be set to an object or null\", name);\n          \"function\" === typeof instance.getChildContext &&\n            \"object\" !== typeof type.childContextTypes &&\n            console.error(\n              \"%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().\",\n              name\n            );\n          var initialState = void 0 !== instance.state ? instance.state : null;\n          instance.updater = classComponentUpdater;\n          instance.props = resolvedProps;\n          instance.state = initialState;\n          var internalInstance = { queue: [], replace: !1 };\n          instance._reactInternals = internalInstance;\n          var contextType$jscomp$0 = type.contextType;\n          instance.context =\n            \"object\" === typeof contextType$jscomp$0 &&\n            null !== contextType$jscomp$0\n              ? contextType$jscomp$0._currentValue2\n              : emptyContextObject;\n          if (instance.state === resolvedProps) {\n            var componentName$jscomp$0 =\n              getComponentNameFromType(type) || \"Component\";\n            didWarnAboutDirectlyAssigningPropsToState.has(\n              componentName$jscomp$0\n            ) ||\n              (didWarnAboutDirectlyAssigningPropsToState.add(\n                componentName$jscomp$0\n              ),\n              console.error(\n                \"%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.\",\n                componentName$jscomp$0\n              ));\n          }\n          var getDerivedStateFromProps = type.getDerivedStateFromProps;\n          if (\"function\" === typeof getDerivedStateFromProps) {\n            var partialState = getDerivedStateFromProps(\n              resolvedProps,\n              initialState\n            );\n            if (void 0 === partialState) {\n              var componentName$jscomp$1 =\n                getComponentNameFromType(type) || \"Component\";\n              didWarnAboutUndefinedDerivedState.has(componentName$jscomp$1) ||\n                (didWarnAboutUndefinedDerivedState.add(componentName$jscomp$1),\n                console.error(\n                  \"%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.\",\n                  componentName$jscomp$1\n                ));\n            }\n            var JSCompiler_inline_result =\n              null === partialState || void 0 === partialState\n                ? initialState\n                : assign({}, initialState, partialState);\n            instance.state = JSCompiler_inline_result;\n          }\n          if (\n            \"function\" !== typeof type.getDerivedStateFromProps &&\n            \"function\" !== typeof instance.getSnapshotBeforeUpdate &&\n            (\"function\" === typeof instance.UNSAFE_componentWillMount ||\n              \"function\" === typeof instance.componentWillMount)\n          ) {\n            var oldState = instance.state;\n            if (\"function\" === typeof instance.componentWillMount) {\n              if (\n                !0 !== instance.componentWillMount.__suppressDeprecationWarning\n              ) {\n                var componentName$jscomp$2 =\n                  getComponentNameFromType(type) || \"Unknown\";\n                didWarnAboutDeprecatedWillMount[componentName$jscomp$2] ||\n                  (console.warn(\n                    \"componentWillMount has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.\\n\\n* Move code from componentWillMount to componentDidMount (preferred in most cases) or the constructor.\\n\\nPlease update the following components: %s\",\n                    componentName$jscomp$2\n                  ),\n                  (didWarnAboutDeprecatedWillMount[componentName$jscomp$2] =\n                    !0));\n              }\n              instance.componentWillMount();\n            }\n            \"function\" === typeof instance.UNSAFE_componentWillMount &&\n              instance.UNSAFE_componentWillMount();\n            oldState !== instance.state &&\n              (console.error(\n                \"%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.\",\n                getComponentNameFromType(type) || \"Component\"\n              ),\n              classComponentUpdater.enqueueReplaceState(\n                instance,\n                instance.state,\n                null\n              ));\n            if (\n              null !== internalInstance.queue &&\n              0 < internalInstance.queue.length\n            ) {\n              var oldQueue = internalInstance.queue,\n                oldReplace = internalInstance.replace;\n              internalInstance.queue = null;\n              internalInstance.replace = !1;\n              if (oldReplace && 1 === oldQueue.length)\n                instance.state = oldQueue[0];\n              else {\n                for (\n                  var nextState = oldReplace ? oldQueue[0] : instance.state,\n                    dontMutate = !0,\n                    i = oldReplace ? 1 : 0;\n                  i < oldQueue.length;\n                  i++\n                ) {\n                  var partial = oldQueue[i],\n                    partialState$jscomp$0 =\n                      \"function\" === typeof partial\n                        ? partial.call(\n                            instance,\n                            nextState,\n                            resolvedProps,\n                            void 0\n                          )\n                        : partial;\n                  null != partialState$jscomp$0 &&\n                    (dontMutate\n                      ? ((dontMutate = !1),\n                        (nextState = assign(\n                          {},\n                          nextState,\n                          partialState$jscomp$0\n                        )))\n                      : assign(nextState, partialState$jscomp$0));\n                }\n                instance.state = nextState;\n              }\n            } else internalInstance.queue = null;\n          }\n          var nextChildren = callRenderInDEV(instance);\n          if (12 === request.status) throw null;\n          instance.props !== resolvedProps &&\n            (didWarnAboutReassigningProps ||\n              console.error(\n                \"It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.\",\n                getComponentNameFromType(type) || \"a component\"\n              ),\n            (didWarnAboutReassigningProps = !0));\n          var prevKeyPath = task.keyPath;\n          task.keyPath = keyPath;\n          renderNodeDestructive(request, task, nextChildren, -1);\n          task.keyPath = prevKeyPath;\n        } else {\n          if (type.prototype && \"function\" === typeof type.prototype.render) {\n            var componentName$jscomp$3 =\n              getComponentNameFromType(type) || \"Unknown\";\n            didWarnAboutBadClass[componentName$jscomp$3] ||\n              (console.error(\n                \"The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.\",\n                componentName$jscomp$3,\n                componentName$jscomp$3\n              ),\n              (didWarnAboutBadClass[componentName$jscomp$3] = !0));\n          }\n          var value = renderWithHooks(\n            request,\n            task,\n            keyPath,\n            type,\n            props,\n            void 0\n          );\n          if (12 === request.status) throw null;\n          var hasId = 0 !== localIdCounter,\n            actionStateCount = actionStateCounter,\n            actionStateMatchingIndex$jscomp$0 = actionStateMatchingIndex;\n          if (type.contextTypes) {\n            var _componentName$jscomp$0 =\n              getComponentNameFromType(type) || \"Unknown\";\n            didWarnAboutContextTypes[_componentName$jscomp$0] ||\n              ((didWarnAboutContextTypes[_componentName$jscomp$0] = !0),\n              console.error(\n                \"%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with React.useContext() instead. (https://react.dev/link/legacy-context)\",\n                _componentName$jscomp$0\n              ));\n          }\n          type &&\n            type.childContextTypes &&\n            console.error(\n              \"childContextTypes cannot be defined on a function component.\\n  %s.childContextTypes = ...\",\n              type.displayName || type.name || \"Component\"\n            );\n          if (\"function\" === typeof type.getDerivedStateFromProps) {\n            var componentName$jscomp$4 =\n              getComponentNameFromType(type) || \"Unknown\";\n            didWarnAboutGetDerivedStateOnFunctionComponent[\n              componentName$jscomp$4\n            ] ||\n              (console.error(\n                \"%s: Function components do not support getDerivedStateFromProps.\",\n                componentName$jscomp$4\n              ),\n              (didWarnAboutGetDerivedStateOnFunctionComponent[\n                componentName$jscomp$4\n              ] = !0));\n          }\n          if (\n            \"object\" === typeof type.contextType &&\n            null !== type.contextType\n          ) {\n            var _componentName2 = getComponentNameFromType(type) || \"Unknown\";\n            didWarnAboutContextTypeOnFunctionComponent[_componentName2] ||\n              (console.error(\n                \"%s: Function components do not support contextType.\",\n                _componentName2\n              ),\n              (didWarnAboutContextTypeOnFunctionComponent[_componentName2] =\n                !0));\n          }\n          finishFunctionComponent(\n            request,\n            task,\n            keyPath,\n            value,\n            hasId,\n            actionStateCount,\n            actionStateMatchingIndex$jscomp$0\n          );\n        }\n      else if (\"string\" === typeof type) {\n        var segment = task.blockedSegment;\n        if (null === segment) {\n          var children = props.children,\n            prevContext = task.formatContext,\n            prevKeyPath$jscomp$0 = task.keyPath;\n          task.formatContext = getChildFormatContext(prevContext, type, props);\n          task.keyPath = keyPath;\n          renderNode(request, task, children, -1);\n          task.formatContext = prevContext;\n          task.keyPath = prevKeyPath$jscomp$0;\n        } else {\n          var _children = pushStartInstance(\n            segment.chunks,\n            type,\n            props,\n            request.resumableState,\n            request.renderState,\n            task.blockedPreamble,\n            task.hoistableState,\n            task.formatContext,\n            segment.lastPushedText\n          );\n          segment.lastPushedText = !1;\n          var _prevContext2 = task.formatContext,\n            _prevKeyPath3 = task.keyPath;\n          task.keyPath = keyPath;\n          if (\n            (task.formatContext = getChildFormatContext(\n              _prevContext2,\n              type,\n              props\n            )).insertionMode === HTML_HEAD_MODE\n          ) {\n            var preambleSegment = createPendingSegment(\n              request,\n              0,\n              null,\n              task.formatContext,\n              !1,\n              !1\n            );\n            segment.preambleChildren.push(preambleSegment);\n            task.blockedSegment = preambleSegment;\n            try {\n              (preambleSegment.status = 6),\n                renderNode(request, task, _children, -1),\n                pushSegmentFinale(\n                  preambleSegment.chunks,\n                  request.renderState,\n                  preambleSegment.lastPushedText,\n                  preambleSegment.textEmbedded\n                ),\n                (preambleSegment.status = COMPLETED);\n            } finally {\n              task.blockedSegment = segment;\n            }\n          } else renderNode(request, task, _children, -1);\n          task.formatContext = _prevContext2;\n          task.keyPath = _prevKeyPath3;\n          a: {\n            var target = segment.chunks,\n              resumableState = request.resumableState;\n            switch (type) {\n              case \"title\":\n              case \"style\":\n              case \"script\":\n              case \"area\":\n              case \"base\":\n              case \"br\":\n              case \"col\":\n              case \"embed\":\n              case \"hr\":\n              case \"img\":\n              case \"input\":\n              case \"keygen\":\n              case \"link\":\n              case \"meta\":\n              case \"param\":\n              case \"source\":\n              case \"track\":\n              case \"wbr\":\n                break a;\n              case \"body\":\n                if (_prevContext2.insertionMode <= HTML_HTML_MODE) {\n                  resumableState.hasBody = !0;\n                  break a;\n                }\n                break;\n              case \"html\":\n                if (_prevContext2.insertionMode === ROOT_HTML_MODE) {\n                  resumableState.hasHtml = !0;\n                  break a;\n                }\n                break;\n              case \"head\":\n                if (_prevContext2.insertionMode <= HTML_HTML_MODE) break a;\n            }\n            target.push(endChunkForTag(type));\n          }\n          segment.lastPushedText = !1;\n        }\n      } else {\n        switch (type) {\n          case REACT_LEGACY_HIDDEN_TYPE:\n          case REACT_STRICT_MODE_TYPE:\n          case REACT_PROFILER_TYPE:\n          case REACT_FRAGMENT_TYPE:\n            var prevKeyPath$jscomp$1 = task.keyPath;\n            task.keyPath = keyPath;\n            renderNodeDestructive(request, task, props.children, -1);\n            task.keyPath = prevKeyPath$jscomp$1;\n            return;\n          case REACT_ACTIVITY_TYPE:\n            var segment$jscomp$0 = task.blockedSegment;\n            if (null === segment$jscomp$0) {\n              if (\"hidden\" !== props.mode) {\n                var prevKeyPath$jscomp$2 = task.keyPath;\n                task.keyPath = keyPath;\n                renderNode(request, task, props.children, -1);\n                task.keyPath = prevKeyPath$jscomp$2;\n              }\n            } else if (\"hidden\" !== props.mode) {\n              request.renderState.generateStaticMarkup ||\n                segment$jscomp$0.chunks.push(\"\\x3c!--&--\\x3e\");\n              segment$jscomp$0.lastPushedText = !1;\n              var _prevKeyPath4 = task.keyPath;\n              task.keyPath = keyPath;\n              renderNode(request, task, props.children, -1);\n              task.keyPath = _prevKeyPath4;\n              request.renderState.generateStaticMarkup ||\n                segment$jscomp$0.chunks.push(\"\\x3c!--/&--\\x3e\");\n              segment$jscomp$0.lastPushedText = !1;\n            }\n            return;\n          case REACT_SUSPENSE_LIST_TYPE:\n            a: {\n              var children$jscomp$0 = props.children,\n                revealOrder = props.revealOrder;\n              if (\n                \"forwards\" === revealOrder ||\n                \"backwards\" === revealOrder ||\n                \"unstable_legacy-backwards\" === revealOrder\n              ) {\n                if (isArrayImpl(children$jscomp$0)) {\n                  renderSuspenseListRows(\n                    request,\n                    task,\n                    keyPath,\n                    children$jscomp$0,\n                    revealOrder\n                  );\n                  break a;\n                }\n                var iteratorFn = getIteratorFn(children$jscomp$0);\n                if (iteratorFn) {\n                  var iterator = iteratorFn.call(children$jscomp$0);\n                  if (iterator) {\n                    validateIterable(\n                      task,\n                      children$jscomp$0,\n                      -1,\n                      iterator,\n                      iteratorFn\n                    );\n                    var step = iterator.next();\n                    if (!step.done) {\n                      var rows = [];\n                      do rows.push(step.value), (step = iterator.next());\n                      while (!step.done);\n                      renderSuspenseListRows(\n                        request,\n                        task,\n                        keyPath,\n                        children$jscomp$0,\n                        revealOrder\n                      );\n                    }\n                    break a;\n                  }\n                }\n              }\n              if (\"together\" === revealOrder) {\n                var _prevKeyPath2 = task.keyPath,\n                  prevRow = task.row,\n                  newRow = (task.row = createSuspenseListRow(null));\n                newRow.boundaries = [];\n                newRow.together = !0;\n                task.keyPath = keyPath;\n                renderNodeDestructive(request, task, children$jscomp$0, -1);\n                0 === --newRow.pendingTasks &&\n                  finishSuspenseListRow(request, newRow);\n                task.keyPath = _prevKeyPath2;\n                task.row = prevRow;\n                null !== prevRow &&\n                  0 < newRow.pendingTasks &&\n                  (prevRow.pendingTasks++, (newRow.next = prevRow));\n              } else {\n                var prevKeyPath$jscomp$3 = task.keyPath;\n                task.keyPath = keyPath;\n                renderNodeDestructive(request, task, children$jscomp$0, -1);\n                task.keyPath = prevKeyPath$jscomp$3;\n              }\n            }\n            return;\n          case REACT_VIEW_TRANSITION_TYPE:\n          case REACT_SCOPE_TYPE:\n            throw Error(\n              \"ReactDOMServer does not yet support scope components.\"\n            );\n          case REACT_SUSPENSE_TYPE:\n            a: if (null !== task.replay) {\n              var _prevKeyPath = task.keyPath,\n                _prevContext = task.formatContext,\n                _prevRow = task.row;\n              task.keyPath = keyPath;\n              task.formatContext = getSuspenseContentFormatContext(\n                request.resumableState,\n                _prevContext\n              );\n              task.row = null;\n              var _content = props.children;\n              try {\n                renderNode(request, task, _content, -1);\n              } finally {\n                (task.keyPath = _prevKeyPath),\n                  (task.formatContext = _prevContext),\n                  (task.row = _prevRow);\n              }\n            } else {\n              var prevKeyPath$jscomp$4 = task.keyPath,\n                prevContext$jscomp$0 = task.formatContext,\n                prevRow$jscomp$0 = task.row,\n                parentBoundary = task.blockedBoundary,\n                parentPreamble = task.blockedPreamble,\n                parentHoistableState = task.hoistableState,\n                parentSegment = task.blockedSegment,\n                fallback = props.fallback,\n                content = props.children,\n                fallbackAbortSet = new Set();\n              var newBoundary = createSuspenseBoundary(\n                request,\n                task.row,\n                fallbackAbortSet,\n                null,\n                null\n              );\n              null !== request.trackedPostpones &&\n                (newBoundary.trackedContentKeyPath = keyPath);\n              var boundarySegment = createPendingSegment(\n                request,\n                parentSegment.chunks.length,\n                newBoundary,\n                task.formatContext,\n                !1,\n                !1\n              );\n              parentSegment.children.push(boundarySegment);\n              parentSegment.lastPushedText = !1;\n              var contentRootSegment = createPendingSegment(\n                request,\n                0,\n                null,\n                task.formatContext,\n                !1,\n                !1\n              );\n              contentRootSegment.parentFlushed = !0;\n              if (null !== request.trackedPostpones) {\n                var suspenseComponentStack = task.componentStack,\n                  fallbackKeyPath = [\n                    keyPath[0],\n                    \"Suspense Fallback\",\n                    keyPath[2]\n                  ],\n                  fallbackReplayNode = [\n                    fallbackKeyPath[1],\n                    fallbackKeyPath[2],\n                    [],\n                    null\n                  ];\n                request.trackedPostpones.workingMap.set(\n                  fallbackKeyPath,\n                  fallbackReplayNode\n                );\n                newBoundary.trackedFallbackNode = fallbackReplayNode;\n                task.blockedSegment = boundarySegment;\n                task.blockedPreamble = newBoundary.fallbackPreamble;\n                task.keyPath = fallbackKeyPath;\n                task.formatContext = getSuspenseFallbackFormatContext(\n                  request.resumableState,\n                  prevContext$jscomp$0\n                );\n                task.componentStack =\n                  replaceSuspenseComponentStackWithSuspenseFallbackStack(\n                    suspenseComponentStack\n                  );\n                boundarySegment.status = 6;\n                try {\n                  renderNode(request, task, fallback, -1),\n                    pushSegmentFinale(\n                      boundarySegment.chunks,\n                      request.renderState,\n                      boundarySegment.lastPushedText,\n                      boundarySegment.textEmbedded\n                    ),\n                    (boundarySegment.status = COMPLETED);\n                } catch (thrownValue) {\n                  throw (\n                    ((boundarySegment.status =\n                      12 === request.status ? ABORTED : ERRORED),\n                    thrownValue)\n                  );\n                } finally {\n                  (task.blockedSegment = parentSegment),\n                    (task.blockedPreamble = parentPreamble),\n                    (task.keyPath = prevKeyPath$jscomp$4),\n                    (task.formatContext = prevContext$jscomp$0);\n                }\n                var suspendedPrimaryTask = createRenderTask(\n                  request,\n                  null,\n                  content,\n                  -1,\n                  newBoundary,\n                  contentRootSegment,\n                  newBoundary.contentPreamble,\n                  newBoundary.contentState,\n                  task.abortSet,\n                  keyPath,\n                  getSuspenseContentFormatContext(\n                    request.resumableState,\n                    task.formatContext\n                  ),\n                  task.context,\n                  task.treeContext,\n                  null,\n                  suspenseComponentStack,\n                  emptyContextObject,\n                  task.debugTask\n                );\n                pushComponentStack(suspendedPrimaryTask);\n                request.pingedTasks.push(suspendedPrimaryTask);\n              } else {\n                task.blockedBoundary = newBoundary;\n                task.blockedPreamble = newBoundary.contentPreamble;\n                task.hoistableState = newBoundary.contentState;\n                task.blockedSegment = contentRootSegment;\n                task.keyPath = keyPath;\n                task.formatContext = getSuspenseContentFormatContext(\n                  request.resumableState,\n                  prevContext$jscomp$0\n                );\n                task.row = null;\n                contentRootSegment.status = 6;\n                try {\n                  if (\n                    (renderNode(request, task, content, -1),\n                    pushSegmentFinale(\n                      contentRootSegment.chunks,\n                      request.renderState,\n                      contentRootSegment.lastPushedText,\n                      contentRootSegment.textEmbedded\n                    ),\n                    (contentRootSegment.status = COMPLETED),\n                    queueCompletedSegment(newBoundary, contentRootSegment),\n                    0 === newBoundary.pendingTasks &&\n                      newBoundary.status === PENDING)\n                  ) {\n                    if (\n                      ((newBoundary.status = COMPLETED),\n                      !isEligibleForOutlining(request, newBoundary))\n                    ) {\n                      null !== prevRow$jscomp$0 &&\n                        0 === --prevRow$jscomp$0.pendingTasks &&\n                        finishSuspenseListRow(request, prevRow$jscomp$0);\n                      0 === request.pendingRootTasks &&\n                        task.blockedPreamble &&\n                        preparePreamble(request);\n                      break a;\n                    }\n                  } else\n                    null !== prevRow$jscomp$0 &&\n                      prevRow$jscomp$0.together &&\n                      tryToResolveTogetherRow(request, prevRow$jscomp$0);\n                } catch (thrownValue$2) {\n                  newBoundary.status = CLIENT_RENDERED;\n                  if (12 === request.status) {\n                    contentRootSegment.status = ABORTED;\n                    var error = request.fatalError;\n                  } else\n                    (contentRootSegment.status = ERRORED),\n                      (error = thrownValue$2);\n                  var thrownInfo = getThrownInfo(task.componentStack);\n                  var errorDigest = logRecoverableError(\n                    request,\n                    error,\n                    thrownInfo,\n                    task.debugTask\n                  );\n                  encodeErrorForBoundary(\n                    newBoundary,\n                    errorDigest,\n                    error,\n                    thrownInfo,\n                    !1\n                  );\n                  untrackBoundary(request, newBoundary);\n                } finally {\n                  (task.blockedBoundary = parentBoundary),\n                    (task.blockedPreamble = parentPreamble),\n                    (task.hoistableState = parentHoistableState),\n                    (task.blockedSegment = parentSegment),\n                    (task.keyPath = prevKeyPath$jscomp$4),\n                    (task.formatContext = prevContext$jscomp$0),\n                    (task.row = prevRow$jscomp$0);\n                }\n                var suspendedFallbackTask = createRenderTask(\n                  request,\n                  null,\n                  fallback,\n                  -1,\n                  parentBoundary,\n                  boundarySegment,\n                  newBoundary.fallbackPreamble,\n                  newBoundary.fallbackState,\n                  fallbackAbortSet,\n                  [keyPath[0], \"Suspense Fallback\", keyPath[2]],\n                  getSuspenseFallbackFormatContext(\n                    request.resumableState,\n                    task.formatContext\n                  ),\n                  task.context,\n                  task.treeContext,\n                  task.row,\n                  replaceSuspenseComponentStackWithSuspenseFallbackStack(\n                    task.componentStack\n                  ),\n                  emptyContextObject,\n                  task.debugTask\n                );\n                pushComponentStack(suspendedFallbackTask);\n                request.pingedTasks.push(suspendedFallbackTask);\n              }\n            }\n            return;\n        }\n        if (\"object\" === typeof type && null !== type)\n          switch (type.$$typeof) {\n            case REACT_FORWARD_REF_TYPE:\n              if (\"ref\" in props) {\n                var propsWithoutRef = {};\n                for (var key in props)\n                  \"ref\" !== key && (propsWithoutRef[key] = props[key]);\n              } else propsWithoutRef = props;\n              var children$jscomp$1 = renderWithHooks(\n                request,\n                task,\n                keyPath,\n                type.render,\n                propsWithoutRef,\n                ref\n              );\n              finishFunctionComponent(\n                request,\n                task,\n                keyPath,\n                children$jscomp$1,\n                0 !== localIdCounter,\n                actionStateCounter,\n                actionStateMatchingIndex\n              );\n              return;\n            case REACT_MEMO_TYPE:\n              renderElement(request, task, keyPath, type.type, props, ref);\n              return;\n            case REACT_CONTEXT_TYPE:\n              var value$jscomp$0 = props.value,\n                children$jscomp$2 = props.children;\n              var prevSnapshot = task.context;\n              var prevKeyPath$jscomp$5 = task.keyPath;\n              var prevValue = type._currentValue2;\n              type._currentValue2 = value$jscomp$0;\n              void 0 !== type._currentRenderer2 &&\n                null !== type._currentRenderer2 &&\n                type._currentRenderer2 !== rendererSigil &&\n                console.error(\n                  \"Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported.\"\n                );\n              type._currentRenderer2 = rendererSigil;\n              var prevNode = currentActiveSnapshot,\n                newNode = {\n                  parent: prevNode,\n                  depth: null === prevNode ? 0 : prevNode.depth + 1,\n                  context: type,\n                  parentValue: prevValue,\n                  value: value$jscomp$0\n                };\n              currentActiveSnapshot = newNode;\n              task.context = newNode;\n              task.keyPath = keyPath;\n              renderNodeDestructive(request, task, children$jscomp$2, -1);\n              var prevSnapshot$jscomp$0 = currentActiveSnapshot;\n              if (null === prevSnapshot$jscomp$0)\n                throw Error(\n                  \"Tried to pop a Context at the root of the app. This is a bug in React.\"\n                );\n              prevSnapshot$jscomp$0.context !== type &&\n                console.error(\n                  \"The parent context is not the expected context. This is probably a bug in React.\"\n                );\n              prevSnapshot$jscomp$0.context._currentValue2 =\n                prevSnapshot$jscomp$0.parentValue;\n              void 0 !== type._currentRenderer2 &&\n                null !== type._currentRenderer2 &&\n                type._currentRenderer2 !== rendererSigil &&\n                console.error(\n                  \"Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported.\"\n                );\n              type._currentRenderer2 = rendererSigil;\n              var JSCompiler_inline_result$jscomp$0 = (currentActiveSnapshot =\n                prevSnapshot$jscomp$0.parent);\n              task.context = JSCompiler_inline_result$jscomp$0;\n              task.keyPath = prevKeyPath$jscomp$5;\n              prevSnapshot !== task.context &&\n                console.error(\n                  \"Popping the context provider did not return back to the original snapshot. This is a bug in React.\"\n                );\n              return;\n            case REACT_CONSUMER_TYPE:\n              var context$jscomp$0 = type._context,\n                render = props.children;\n              \"function\" !== typeof render &&\n                console.error(\n                  \"A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it.\"\n                );\n              var newChildren = render(context$jscomp$0._currentValue2),\n                prevKeyPath$jscomp$6 = task.keyPath;\n              task.keyPath = keyPath;\n              renderNodeDestructive(request, task, newChildren, -1);\n              task.keyPath = prevKeyPath$jscomp$6;\n              return;\n            case REACT_LAZY_TYPE:\n              var Component = callLazyInitInDEV(type);\n              if (12 === request.status) throw null;\n              renderElement(request, task, keyPath, Component, props, ref);\n              return;\n          }\n        var info = \"\";\n        if (\n          void 0 === type ||\n          (\"object\" === typeof type &&\n            null !== type &&\n            0 === Object.keys(type).length)\n        )\n          info +=\n            \" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.\";\n        throw Error(\n          \"Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: \" +\n            ((null == type ? type : typeof type) + \".\" + info)\n        );\n      }\n    }\n    function resumeNode(request, task, segmentId, node, childIndex) {\n      var prevReplay = task.replay,\n        blockedBoundary = task.blockedBoundary,\n        resumedSegment = createPendingSegment(\n          request,\n          0,\n          null,\n          task.formatContext,\n          !1,\n          !1\n        );\n      resumedSegment.id = segmentId;\n      resumedSegment.parentFlushed = !0;\n      try {\n        (task.replay = null),\n          (task.blockedSegment = resumedSegment),\n          renderNode(request, task, node, childIndex),\n          (resumedSegment.status = COMPLETED),\n          null === blockedBoundary\n            ? (request.completedRootSegment = resumedSegment)\n            : (queueCompletedSegment(blockedBoundary, resumedSegment),\n              blockedBoundary.parentFlushed &&\n                request.partialBoundaries.push(blockedBoundary));\n      } finally {\n        (task.replay = prevReplay), (task.blockedSegment = null);\n      }\n    }\n    function replayElement(\n      request,\n      task,\n      keyPath,\n      name,\n      keyOrIndex,\n      childIndex,\n      type,\n      props,\n      ref,\n      replay\n    ) {\n      childIndex = replay.nodes;\n      for (var i = 0; i < childIndex.length; i++) {\n        var node = childIndex[i];\n        if (keyOrIndex === node[1]) {\n          if (4 === node.length) {\n            if (null !== name && name !== node[0])\n              throw Error(\n                \"Expected the resume to render <\" +\n                  node[0] +\n                  \"> in this slot but instead it rendered <\" +\n                  name +\n                  \">. The tree doesn't match so React will fallback to client rendering.\"\n              );\n            var childNodes = node[2];\n            name = node[3];\n            keyOrIndex = task.node;\n            task.replay = { nodes: childNodes, slots: name, pendingTasks: 1 };\n            try {\n              renderElement(request, task, keyPath, type, props, ref);\n              if (\n                1 === task.replay.pendingTasks &&\n                0 < task.replay.nodes.length\n              )\n                throw Error(\n                  \"Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering.\"\n                );\n              task.replay.pendingTasks--;\n            } catch (x) {\n              if (\n                \"object\" === typeof x &&\n                null !== x &&\n                (x === SuspenseException || \"function\" === typeof x.then)\n              )\n                throw (\n                  (task.node === keyOrIndex\n                    ? (task.replay = replay)\n                    : childIndex.splice(i, 1),\n                  x)\n                );\n              task.replay.pendingTasks--;\n              type = getThrownInfo(task.componentStack);\n              props = request;\n              request = task.blockedBoundary;\n              keyPath = x;\n              ref = name;\n              name = logRecoverableError(props, keyPath, type, task.debugTask);\n              abortRemainingReplayNodes(\n                props,\n                request,\n                childNodes,\n                ref,\n                keyPath,\n                name,\n                type,\n                !1\n              );\n            }\n            task.replay = replay;\n          } else {\n            if (type !== REACT_SUSPENSE_TYPE)\n              throw Error(\n                \"Expected the resume to render <Suspense> in this slot but instead it rendered <\" +\n                  (getComponentNameFromType(type) || \"Unknown\") +\n                  \">. The tree doesn't match so React will fallback to client rendering.\"\n              );\n            a: {\n              replay = void 0;\n              name = node[5];\n              type = node[2];\n              ref = node[3];\n              keyOrIndex = null === node[4] ? [] : node[4][2];\n              node = null === node[4] ? null : node[4][3];\n              var prevKeyPath = task.keyPath,\n                prevContext = task.formatContext,\n                prevRow = task.row,\n                previousReplaySet = task.replay,\n                parentBoundary = task.blockedBoundary,\n                parentHoistableState = task.hoistableState,\n                content = props.children,\n                fallback = props.fallback,\n                fallbackAbortSet = new Set();\n              props = createSuspenseBoundary(\n                request,\n                task.row,\n                fallbackAbortSet,\n                null,\n                null\n              );\n              props.parentFlushed = !0;\n              props.rootSegmentID = name;\n              task.blockedBoundary = props;\n              task.hoistableState = props.contentState;\n              task.keyPath = keyPath;\n              task.formatContext = getSuspenseContentFormatContext(\n                request.resumableState,\n                prevContext\n              );\n              task.row = null;\n              task.replay = { nodes: type, slots: ref, pendingTasks: 1 };\n              try {\n                renderNode(request, task, content, -1);\n                if (\n                  1 === task.replay.pendingTasks &&\n                  0 < task.replay.nodes.length\n                )\n                  throw Error(\n                    \"Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering.\"\n                  );\n                task.replay.pendingTasks--;\n                if (0 === props.pendingTasks && props.status === PENDING) {\n                  props.status = COMPLETED;\n                  request.completedBoundaries.push(props);\n                  break a;\n                }\n              } catch (error) {\n                (props.status = CLIENT_RENDERED),\n                  (childNodes = getThrownInfo(task.componentStack)),\n                  (replay = logRecoverableError(\n                    request,\n                    error,\n                    childNodes,\n                    task.debugTask\n                  )),\n                  encodeErrorForBoundary(props, replay, error, childNodes, !1),\n                  task.replay.pendingTasks--,\n                  request.clientRenderedBoundaries.push(props);\n              } finally {\n                (task.blockedBoundary = parentBoundary),\n                  (task.hoistableState = parentHoistableState),\n                  (task.replay = previousReplaySet),\n                  (task.keyPath = prevKeyPath),\n                  (task.formatContext = prevContext),\n                  (task.row = prevRow);\n              }\n              props = createReplayTask(\n                request,\n                null,\n                { nodes: keyOrIndex, slots: node, pendingTasks: 0 },\n                fallback,\n                -1,\n                parentBoundary,\n                props.fallbackState,\n                fallbackAbortSet,\n                [keyPath[0], \"Suspense Fallback\", keyPath[2]],\n                getSuspenseFallbackFormatContext(\n                  request.resumableState,\n                  task.formatContext\n                ),\n                task.context,\n                task.treeContext,\n                task.row,\n                replaceSuspenseComponentStackWithSuspenseFallbackStack(\n                  task.componentStack\n                ),\n                emptyContextObject,\n                task.debugTask\n              );\n              pushComponentStack(props);\n              request.pingedTasks.push(props);\n            }\n          }\n          childIndex.splice(i, 1);\n          break;\n        }\n      }\n    }\n    function validateIterable(\n      task,\n      iterable,\n      childIndex,\n      iterator,\n      iteratorFn\n    ) {\n      if (iterator === iterable) {\n        if (\n          -1 !== childIndex ||\n          null === task.componentStack ||\n          \"function\" !== typeof task.componentStack.type ||\n          \"[object GeneratorFunction]\" !==\n            Object.prototype.toString.call(task.componentStack.type) ||\n          \"[object Generator]\" !== Object.prototype.toString.call(iterator)\n        )\n          didWarnAboutGenerators ||\n            console.error(\n              \"Using Iterators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. You can also use an Iterable that can iterate multiple times over the same items.\"\n            ),\n            (didWarnAboutGenerators = !0);\n      } else\n        iterable.entries !== iteratorFn ||\n          didWarnAboutMaps ||\n          (console.error(\n            \"Using Maps as children is not supported. Use an array of keyed ReactElements instead.\"\n          ),\n          (didWarnAboutMaps = !0));\n    }\n    function renderNodeDestructive(request, task, node, childIndex) {\n      null !== task.replay && \"number\" === typeof task.replay.slots\n        ? resumeNode(request, task, task.replay.slots, node, childIndex)\n        : ((task.node = node),\n          (task.childIndex = childIndex),\n          (node = task.componentStack),\n          (childIndex = task.debugTask),\n          pushComponentStack(task),\n          retryNode(request, task),\n          (task.componentStack = node),\n          (task.debugTask = childIndex));\n    }\n    function retryNode(request, task) {\n      var node = task.node,\n        childIndex = task.childIndex;\n      if (null !== node) {\n        if (\"object\" === typeof node) {\n          switch (node.$$typeof) {\n            case REACT_ELEMENT_TYPE:\n              var type = node.type,\n                key = node.key;\n              node = node.props;\n              var refProp = node.ref;\n              refProp = void 0 !== refProp ? refProp : null;\n              var debugTask = task.debugTask,\n                name = getComponentNameFromType(type);\n              key = null == key ? (-1 === childIndex ? 0 : childIndex) : key;\n              var keyPath = [task.keyPath, name, key];\n              null !== task.replay\n                ? debugTask\n                  ? debugTask.run(\n                      replayElement.bind(\n                        null,\n                        request,\n                        task,\n                        keyPath,\n                        name,\n                        key,\n                        childIndex,\n                        type,\n                        node,\n                        refProp,\n                        task.replay\n                      )\n                    )\n                  : replayElement(\n                      request,\n                      task,\n                      keyPath,\n                      name,\n                      key,\n                      childIndex,\n                      type,\n                      node,\n                      refProp,\n                      task.replay\n                    )\n                : debugTask\n                  ? debugTask.run(\n                      renderElement.bind(\n                        null,\n                        request,\n                        task,\n                        keyPath,\n                        type,\n                        node,\n                        refProp\n                      )\n                    )\n                  : renderElement(request, task, keyPath, type, node, refProp);\n              return;\n            case REACT_PORTAL_TYPE:\n              throw Error(\n                \"Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render.\"\n              );\n            case REACT_LAZY_TYPE:\n              type = callLazyInitInDEV(node);\n              if (12 === request.status) throw null;\n              renderNodeDestructive(request, task, type, childIndex);\n              return;\n          }\n          if (isArrayImpl(node)) {\n            renderChildrenArray(request, task, node, childIndex);\n            return;\n          }\n          if ((key = getIteratorFn(node)))\n            if ((type = key.call(node))) {\n              validateIterable(task, node, childIndex, type, key);\n              node = type.next();\n              if (!node.done) {\n                key = [];\n                do key.push(node.value), (node = type.next());\n                while (!node.done);\n                renderChildrenArray(request, task, key, childIndex);\n              }\n              return;\n            }\n          if (\"function\" === typeof node.then)\n            return (\n              (task.thenableState = null),\n              renderNodeDestructive(\n                request,\n                task,\n                unwrapThenable(node),\n                childIndex\n              )\n            );\n          if (node.$$typeof === REACT_CONTEXT_TYPE)\n            return renderNodeDestructive(\n              request,\n              task,\n              node._currentValue2,\n              childIndex\n            );\n          request = Object.prototype.toString.call(node);\n          throw Error(\n            \"Objects are not valid as a React child (found: \" +\n              (\"[object Object]\" === request\n                ? \"object with keys {\" + Object.keys(node).join(\", \") + \"}\"\n                : request) +\n              \"). If you meant to render a collection of children, use an array instead.\"\n          );\n        }\n        \"string\" === typeof node\n          ? ((task = task.blockedSegment),\n            null !== task &&\n              (task.lastPushedText = pushTextInstance(\n                task.chunks,\n                node,\n                request.renderState,\n                task.lastPushedText\n              )))\n          : \"number\" === typeof node || \"bigint\" === typeof node\n            ? ((task = task.blockedSegment),\n              null !== task &&\n                (task.lastPushedText = pushTextInstance(\n                  task.chunks,\n                  \"\" + node,\n                  request.renderState,\n                  task.lastPushedText\n                )))\n            : (\"function\" === typeof node &&\n                ((request = node.displayName || node.name || \"Component\"),\n                console.error(\n                  \"Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.\",\n                  request,\n                  request\n                )),\n              \"symbol\" === typeof node &&\n                console.error(\n                  \"Symbols are not valid as a React child.\\n  %s\",\n                  String(node)\n                ));\n      }\n    }\n    function warnForMissingKey(request, task, child) {\n      if (\n        null !== child &&\n        \"object\" === typeof child &&\n        (child.$$typeof === REACT_ELEMENT_TYPE ||\n          child.$$typeof === REACT_PORTAL_TYPE) &&\n        child._store &&\n        ((!child._store.validated && null == child.key) ||\n          2 === child._store.validated)\n      ) {\n        if (\"object\" !== typeof child._store)\n          throw Error(\n            \"React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.\"\n          );\n        child._store.validated = 1;\n        var didWarnForKey = request.didWarnForKey;\n        null == didWarnForKey &&\n          (didWarnForKey = request.didWarnForKey = new WeakSet());\n        request = task.componentStack;\n        if (null !== request && !didWarnForKey.has(request)) {\n          didWarnForKey.add(request);\n          var componentName = getComponentNameFromType(child.type);\n          didWarnForKey = child._owner;\n          var parentOwner = request.owner;\n          request = \"\";\n          if (parentOwner && \"undefined\" !== typeof parentOwner.type) {\n            var name = getComponentNameFromType(parentOwner.type);\n            name &&\n              (request = \"\\n\\nCheck the render method of `\" + name + \"`.\");\n          }\n          request ||\n            (componentName &&\n              (request =\n                \"\\n\\nCheck the top-level render call using <\" +\n                componentName +\n                \">.\"));\n          componentName = \"\";\n          null != didWarnForKey &&\n            parentOwner !== didWarnForKey &&\n            ((parentOwner = null),\n            \"undefined\" !== typeof didWarnForKey.type\n              ? (parentOwner = getComponentNameFromType(didWarnForKey.type))\n              : \"string\" === typeof didWarnForKey.name &&\n                (parentOwner = didWarnForKey.name),\n            parentOwner &&\n              (componentName =\n                \" It was passed a child from \" + parentOwner + \".\"));\n          didWarnForKey = task.componentStack;\n          task.componentStack = {\n            parent: task.componentStack,\n            type: child.type,\n            owner: child._owner,\n            stack: child._debugStack\n          };\n          console.error(\n            'Each child in a list should have a unique \"key\" prop.%s%s See https://react.dev/link/warning-keys for more information.',\n            request,\n            componentName\n          );\n          task.componentStack = didWarnForKey;\n        }\n      }\n    }\n    function renderChildrenArray(request, task, children, childIndex) {\n      var prevKeyPath = task.keyPath,\n        previousComponentStack = task.componentStack;\n      var previousDebugTask = task.debugTask;\n      pushServerComponentStack(task, task.node._debugInfo);\n      if (\n        -1 !== childIndex &&\n        ((task.keyPath = [task.keyPath, \"Fragment\", childIndex]),\n        null !== task.replay)\n      ) {\n        for (\n          var replay = task.replay, replayNodes = replay.nodes, j = 0;\n          j < replayNodes.length;\n          j++\n        ) {\n          var node = replayNodes[j];\n          if (node[1] === childIndex) {\n            childIndex = node[2];\n            node = node[3];\n            task.replay = { nodes: childIndex, slots: node, pendingTasks: 1 };\n            try {\n              renderChildrenArray(request, task, children, -1);\n              if (\n                1 === task.replay.pendingTasks &&\n                0 < task.replay.nodes.length\n              )\n                throw Error(\n                  \"Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering.\"\n                );\n              task.replay.pendingTasks--;\n            } catch (x) {\n              if (\n                \"object\" === typeof x &&\n                null !== x &&\n                (x === SuspenseException || \"function\" === typeof x.then)\n              )\n                throw x;\n              task.replay.pendingTasks--;\n              var thrownInfo = getThrownInfo(task.componentStack);\n              children = task.blockedBoundary;\n              var error = x,\n                resumeSlots = node;\n              node = logRecoverableError(\n                request,\n                error,\n                thrownInfo,\n                task.debugTask\n              );\n              abortRemainingReplayNodes(\n                request,\n                children,\n                childIndex,\n                resumeSlots,\n                error,\n                node,\n                thrownInfo,\n                !1\n              );\n            }\n            task.replay = replay;\n            replayNodes.splice(j, 1);\n            break;\n          }\n        }\n        task.keyPath = prevKeyPath;\n        task.componentStack = previousComponentStack;\n        task.debugTask = previousDebugTask;\n        return;\n      }\n      replay = task.treeContext;\n      replayNodes = children.length;\n      if (\n        null !== task.replay &&\n        ((j = task.replay.slots), null !== j && \"object\" === typeof j)\n      ) {\n        for (childIndex = 0; childIndex < replayNodes; childIndex++)\n          (node = children[childIndex]),\n            (task.treeContext = pushTreeContext(\n              replay,\n              replayNodes,\n              childIndex\n            )),\n            (error = j[childIndex]),\n            \"number\" === typeof error\n              ? (resumeNode(request, task, error, node, childIndex),\n                delete j[childIndex])\n              : renderNode(request, task, node, childIndex);\n        task.treeContext = replay;\n        task.keyPath = prevKeyPath;\n        task.componentStack = previousComponentStack;\n        task.debugTask = previousDebugTask;\n        return;\n      }\n      for (j = 0; j < replayNodes; j++)\n        (childIndex = children[j]),\n          warnForMissingKey(request, task, childIndex),\n          (task.treeContext = pushTreeContext(replay, replayNodes, j)),\n          renderNode(request, task, childIndex, j);\n      task.treeContext = replay;\n      task.keyPath = prevKeyPath;\n      task.componentStack = previousComponentStack;\n      task.debugTask = previousDebugTask;\n    }\n    function trackPostponedBoundary(request, trackedPostpones, boundary) {\n      boundary.status = POSTPONED;\n      boundary.rootSegmentID = request.nextSegmentId++;\n      request = boundary.trackedContentKeyPath;\n      if (null === request)\n        throw Error(\n          \"It should not be possible to postpone at the root. This is a bug in React.\"\n        );\n      var fallbackReplayNode = boundary.trackedFallbackNode,\n        children = [],\n        boundaryNode = trackedPostpones.workingMap.get(request);\n      if (void 0 === boundaryNode)\n        return (\n          (boundary = [\n            request[1],\n            request[2],\n            children,\n            null,\n            fallbackReplayNode,\n            boundary.rootSegmentID\n          ]),\n          trackedPostpones.workingMap.set(request, boundary),\n          addToReplayParent(boundary, request[0], trackedPostpones),\n          boundary\n        );\n      boundaryNode[4] = fallbackReplayNode;\n      boundaryNode[5] = boundary.rootSegmentID;\n      return boundaryNode;\n    }\n    function trackPostpone(request, trackedPostpones, task, segment) {\n      segment.status = POSTPONED;\n      var keyPath = task.keyPath,\n        boundary = task.blockedBoundary;\n      if (null === boundary)\n        (segment.id = request.nextSegmentId++),\n          (trackedPostpones.rootSlots = segment.id),\n          null !== request.completedRootSegment &&\n            (request.completedRootSegment.status = POSTPONED);\n      else {\n        if (null !== boundary && boundary.status === PENDING) {\n          var boundaryNode = trackPostponedBoundary(\n            request,\n            trackedPostpones,\n            boundary\n          );\n          if (\n            boundary.trackedContentKeyPath === keyPath &&\n            -1 === task.childIndex\n          ) {\n            -1 === segment.id &&\n              (segment.id = segment.parentFlushed\n                ? boundary.rootSegmentID\n                : request.nextSegmentId++);\n            boundaryNode[3] = segment.id;\n            return;\n          }\n        }\n        -1 === segment.id &&\n          (segment.id =\n            segment.parentFlushed && null !== boundary\n              ? boundary.rootSegmentID\n              : request.nextSegmentId++);\n        if (-1 === task.childIndex)\n          null === keyPath\n            ? (trackedPostpones.rootSlots = segment.id)\n            : ((task = trackedPostpones.workingMap.get(keyPath)),\n              void 0 === task\n                ? ((task = [keyPath[1], keyPath[2], [], segment.id]),\n                  addToReplayParent(task, keyPath[0], trackedPostpones))\n                : (task[3] = segment.id));\n        else {\n          if (null === keyPath)\n            if (((request = trackedPostpones.rootSlots), null === request))\n              request = trackedPostpones.rootSlots = {};\n            else {\n              if (\"number\" === typeof request)\n                throw Error(\n                  \"It should not be possible to postpone both at the root of an element as well as a slot below. This is a bug in React.\"\n                );\n            }\n          else if (\n            ((boundary = trackedPostpones.workingMap),\n            (boundaryNode = boundary.get(keyPath)),\n            void 0 === boundaryNode)\n          )\n            (request = {}),\n              (boundaryNode = [keyPath[1], keyPath[2], [], request]),\n              boundary.set(keyPath, boundaryNode),\n              addToReplayParent(boundaryNode, keyPath[0], trackedPostpones);\n          else if (((request = boundaryNode[3]), null === request))\n            request = boundaryNode[3] = {};\n          else if (\"number\" === typeof request)\n            throw Error(\n              \"It should not be possible to postpone both at the root of an element as well as a slot below. This is a bug in React.\"\n            );\n          request[task.childIndex] = segment.id;\n        }\n      }\n    }\n    function untrackBoundary(request, boundary) {\n      request = request.trackedPostpones;\n      null !== request &&\n        ((boundary = boundary.trackedContentKeyPath),\n        null !== boundary &&\n          ((boundary = request.workingMap.get(boundary)),\n          void 0 !== boundary &&\n            ((boundary.length = 4), (boundary[2] = []), (boundary[3] = null))));\n    }\n    function spawnNewSuspendedReplayTask(request, task, thenableState) {\n      return createReplayTask(\n        request,\n        thenableState,\n        task.replay,\n        task.node,\n        task.childIndex,\n        task.blockedBoundary,\n        task.hoistableState,\n        task.abortSet,\n        task.keyPath,\n        task.formatContext,\n        task.context,\n        task.treeContext,\n        task.row,\n        task.componentStack,\n        emptyContextObject,\n        task.debugTask\n      );\n    }\n    function spawnNewSuspendedRenderTask(request, task, thenableState) {\n      var segment = task.blockedSegment,\n        newSegment = createPendingSegment(\n          request,\n          segment.chunks.length,\n          null,\n          task.formatContext,\n          segment.lastPushedText,\n          !0\n        );\n      segment.children.push(newSegment);\n      segment.lastPushedText = !1;\n      return createRenderTask(\n        request,\n        thenableState,\n        task.node,\n        task.childIndex,\n        task.blockedBoundary,\n        newSegment,\n        task.blockedPreamble,\n        task.hoistableState,\n        task.abortSet,\n        task.keyPath,\n        task.formatContext,\n        task.context,\n        task.treeContext,\n        task.row,\n        task.componentStack,\n        emptyContextObject,\n        task.debugTask\n      );\n    }\n    function renderNode(request, task, node, childIndex) {\n      var previousFormatContext = task.formatContext,\n        previousContext = task.context,\n        previousKeyPath = task.keyPath,\n        previousTreeContext = task.treeContext,\n        previousComponentStack = task.componentStack,\n        previousDebugTask = task.debugTask,\n        segment = task.blockedSegment;\n      if (null === segment) {\n        segment = task.replay;\n        try {\n          return renderNodeDestructive(request, task, node, childIndex);\n        } catch (thrownValue) {\n          if (\n            (resetHooksState(),\n            (node =\n              thrownValue === SuspenseException\n                ? getSuspendedThenable()\n                : thrownValue),\n            12 !== request.status && \"object\" === typeof node && null !== node)\n          ) {\n            if (\"function\" === typeof node.then) {\n              childIndex =\n                thrownValue === SuspenseException\n                  ? getThenableStateAfterSuspending()\n                  : null;\n              request = spawnNewSuspendedReplayTask(\n                request,\n                task,\n                childIndex\n              ).ping;\n              node.then(request, request);\n              task.formatContext = previousFormatContext;\n              task.context = previousContext;\n              task.keyPath = previousKeyPath;\n              task.treeContext = previousTreeContext;\n              task.componentStack = previousComponentStack;\n              task.replay = segment;\n              task.debugTask = previousDebugTask;\n              switchContext(previousContext);\n              return;\n            }\n            if (\"Maximum call stack size exceeded\" === node.message) {\n              node =\n                thrownValue === SuspenseException\n                  ? getThenableStateAfterSuspending()\n                  : null;\n              node = spawnNewSuspendedReplayTask(request, task, node);\n              request.pingedTasks.push(node);\n              task.formatContext = previousFormatContext;\n              task.context = previousContext;\n              task.keyPath = previousKeyPath;\n              task.treeContext = previousTreeContext;\n              task.componentStack = previousComponentStack;\n              task.replay = segment;\n              task.debugTask = previousDebugTask;\n              switchContext(previousContext);\n              return;\n            }\n          }\n        }\n      } else {\n        var childrenLength = segment.children.length,\n          chunkLength = segment.chunks.length;\n        try {\n          return renderNodeDestructive(request, task, node, childIndex);\n        } catch (thrownValue$3) {\n          if (\n            (resetHooksState(),\n            (segment.children.length = childrenLength),\n            (segment.chunks.length = chunkLength),\n            (node =\n              thrownValue$3 === SuspenseException\n                ? getSuspendedThenable()\n                : thrownValue$3),\n            12 !== request.status && \"object\" === typeof node && null !== node)\n          ) {\n            if (\"function\" === typeof node.then) {\n              segment = node;\n              node =\n                thrownValue$3 === SuspenseException\n                  ? getThenableStateAfterSuspending()\n                  : null;\n              request = spawnNewSuspendedRenderTask(request, task, node).ping;\n              segment.then(request, request);\n              task.formatContext = previousFormatContext;\n              task.context = previousContext;\n              task.keyPath = previousKeyPath;\n              task.treeContext = previousTreeContext;\n              task.componentStack = previousComponentStack;\n              task.debugTask = previousDebugTask;\n              switchContext(previousContext);\n              return;\n            }\n            if (\"Maximum call stack size exceeded\" === node.message) {\n              segment =\n                thrownValue$3 === SuspenseException\n                  ? getThenableStateAfterSuspending()\n                  : null;\n              segment = spawnNewSuspendedRenderTask(request, task, segment);\n              request.pingedTasks.push(segment);\n              task.formatContext = previousFormatContext;\n              task.context = previousContext;\n              task.keyPath = previousKeyPath;\n              task.treeContext = previousTreeContext;\n              task.componentStack = previousComponentStack;\n              task.debugTask = previousDebugTask;\n              switchContext(previousContext);\n              return;\n            }\n          }\n        }\n      }\n      task.formatContext = previousFormatContext;\n      task.context = previousContext;\n      task.keyPath = previousKeyPath;\n      task.treeContext = previousTreeContext;\n      switchContext(previousContext);\n      throw node;\n    }\n    function abortTaskSoft(task) {\n      var boundary = task.blockedBoundary,\n        segment = task.blockedSegment;\n      null !== segment &&\n        ((segment.status = ABORTED),\n        finishedTask(this, boundary, task.row, segment));\n    }\n    function abortRemainingReplayNodes(\n      request$jscomp$0,\n      boundary,\n      nodes,\n      slots,\n      error$jscomp$0,\n      errorDigest$jscomp$0,\n      errorInfo$jscomp$0,\n      aborted\n    ) {\n      for (var i = 0; i < nodes.length; i++) {\n        var node = nodes[i];\n        if (4 === node.length)\n          abortRemainingReplayNodes(\n            request$jscomp$0,\n            boundary,\n            node[2],\n            node[3],\n            error$jscomp$0,\n            errorDigest$jscomp$0,\n            errorInfo$jscomp$0,\n            aborted\n          );\n        else {\n          var request = request$jscomp$0;\n          node = node[5];\n          var error = error$jscomp$0,\n            errorDigest = errorDigest$jscomp$0,\n            errorInfo = errorInfo$jscomp$0,\n            wasAborted = aborted,\n            resumedBoundary = createSuspenseBoundary(\n              request,\n              null,\n              new Set(),\n              null,\n              null\n            );\n          resumedBoundary.parentFlushed = !0;\n          resumedBoundary.rootSegmentID = node;\n          resumedBoundary.status = CLIENT_RENDERED;\n          encodeErrorForBoundary(\n            resumedBoundary,\n            errorDigest,\n            error,\n            errorInfo,\n            wasAborted\n          );\n          resumedBoundary.parentFlushed &&\n            request.clientRenderedBoundaries.push(resumedBoundary);\n        }\n      }\n      nodes.length = 0;\n      if (null !== slots) {\n        if (null === boundary)\n          throw Error(\n            \"We should not have any resumable nodes in the shell. This is a bug in React.\"\n          );\n        boundary.status !== CLIENT_RENDERED &&\n          ((boundary.status = CLIENT_RENDERED),\n          encodeErrorForBoundary(\n            boundary,\n            errorDigest$jscomp$0,\n            error$jscomp$0,\n            errorInfo$jscomp$0,\n            aborted\n          ),\n          boundary.parentFlushed &&\n            request$jscomp$0.clientRenderedBoundaries.push(boundary));\n        if (\"object\" === typeof slots)\n          for (var index in slots) delete slots[index];\n      }\n    }\n    function abortTask(task, request, error) {\n      var boundary = task.blockedBoundary,\n        segment = task.blockedSegment;\n      if (null !== segment) {\n        if (6 === segment.status) return;\n        segment.status = ABORTED;\n      }\n      var errorInfo = getThrownInfo(task.componentStack),\n        node = task.node;\n      null !== node &&\n        \"object\" === typeof node &&\n        pushHaltedAwaitOnComponentStack(task, node._debugInfo);\n      if (null === boundary) {\n        if (13 !== request.status && request.status !== CLOSED) {\n          boundary = task.replay;\n          if (null === boundary) {\n            null !== request.trackedPostpones && null !== segment\n              ? ((boundary = request.trackedPostpones),\n                logRecoverableError(request, error, errorInfo, task.debugTask),\n                trackPostpone(request, boundary, task, segment),\n                finishedTask(request, null, task.row, segment))\n              : (logRecoverableError(request, error, errorInfo, task.debugTask),\n                fatalError(request, error, errorInfo, task.debugTask));\n            return;\n          }\n          boundary.pendingTasks--;\n          0 === boundary.pendingTasks &&\n            0 < boundary.nodes.length &&\n            ((segment = logRecoverableError(request, error, errorInfo, null)),\n            abortRemainingReplayNodes(\n              request,\n              null,\n              boundary.nodes,\n              boundary.slots,\n              error,\n              segment,\n              errorInfo,\n              !0\n            ));\n          request.pendingRootTasks--;\n          0 === request.pendingRootTasks && completeShell(request);\n        }\n      } else {\n        node = request.trackedPostpones;\n        if (boundary.status !== CLIENT_RENDERED) {\n          if (null !== node && null !== segment)\n            return (\n              logRecoverableError(request, error, errorInfo, task.debugTask),\n              trackPostpone(request, node, task, segment),\n              boundary.fallbackAbortableTasks.forEach(function (fallbackTask) {\n                return abortTask(fallbackTask, request, error);\n              }),\n              boundary.fallbackAbortableTasks.clear(),\n              finishedTask(request, boundary, task.row, segment)\n            );\n          boundary.status = CLIENT_RENDERED;\n          segment = logRecoverableError(\n            request,\n            error,\n            errorInfo,\n            task.debugTask\n          );\n          boundary.status = CLIENT_RENDERED;\n          encodeErrorForBoundary(boundary, segment, error, errorInfo, !0);\n          untrackBoundary(request, boundary);\n          boundary.parentFlushed &&\n            request.clientRenderedBoundaries.push(boundary);\n        }\n        boundary.pendingTasks--;\n        errorInfo = boundary.row;\n        null !== errorInfo &&\n          0 === --errorInfo.pendingTasks &&\n          finishSuspenseListRow(request, errorInfo);\n        boundary.fallbackAbortableTasks.forEach(function (fallbackTask) {\n          return abortTask(fallbackTask, request, error);\n        });\n        boundary.fallbackAbortableTasks.clear();\n      }\n      task = task.row;\n      null !== task &&\n        0 === --task.pendingTasks &&\n        finishSuspenseListRow(request, task);\n      request.allPendingTasks--;\n      0 === request.allPendingTasks && completeAll(request);\n    }\n    function safelyEmitEarlyPreloads(request, shellComplete) {\n      try {\n        var renderState = request.renderState,\n          onHeaders = renderState.onHeaders;\n        if (onHeaders) {\n          var headers = renderState.headers;\n          if (headers) {\n            renderState.headers = null;\n            var linkHeader = headers.preconnects;\n            headers.fontPreloads &&\n              (linkHeader && (linkHeader += \", \"),\n              (linkHeader += headers.fontPreloads));\n            headers.highImagePreloads &&\n              (linkHeader && (linkHeader += \", \"),\n              (linkHeader += headers.highImagePreloads));\n            if (!shellComplete) {\n              var queueIter = renderState.styles.values(),\n                queueStep = queueIter.next();\n              b: for (\n                ;\n                0 < headers.remainingCapacity && !queueStep.done;\n                queueStep = queueIter.next()\n              )\n                for (\n                  var sheetIter = queueStep.value.sheets.values(),\n                    sheetStep = sheetIter.next();\n                  0 < headers.remainingCapacity && !sheetStep.done;\n                  sheetStep = sheetIter.next()\n                ) {\n                  var sheet = sheetStep.value,\n                    props = sheet.props,\n                    key = props.href,\n                    props$jscomp$0 = sheet.props;\n                  var header = getPreloadAsHeader(\n                    props$jscomp$0.href,\n                    \"style\",\n                    {\n                      crossOrigin: props$jscomp$0.crossOrigin,\n                      integrity: props$jscomp$0.integrity,\n                      nonce: props$jscomp$0.nonce,\n                      type: props$jscomp$0.type,\n                      fetchPriority: props$jscomp$0.fetchPriority,\n                      referrerPolicy: props$jscomp$0.referrerPolicy,\n                      media: props$jscomp$0.media\n                    }\n                  );\n                  if (0 <= (headers.remainingCapacity -= header.length + 2))\n                    (renderState.resets.style[key] = PRELOAD_NO_CREDS),\n                      linkHeader && (linkHeader += \", \"),\n                      (linkHeader += header),\n                      (renderState.resets.style[key] =\n                        \"string\" === typeof props.crossOrigin ||\n                        \"string\" === typeof props.integrity\n                          ? [props.crossOrigin, props.integrity]\n                          : PRELOAD_NO_CREDS);\n                  else break b;\n                }\n            }\n            linkHeader ? onHeaders({ Link: linkHeader }) : onHeaders({});\n          }\n        }\n      } catch (error) {\n        logRecoverableError(request, error, {}, null);\n      }\n    }\n    function completeShell(request) {\n      null === request.trackedPostpones && safelyEmitEarlyPreloads(request, !0);\n      null === request.trackedPostpones && preparePreamble(request);\n      request.onShellError = noop;\n      request = request.onShellReady;\n      request();\n    }\n    function completeAll(request) {\n      safelyEmitEarlyPreloads(\n        request,\n        null === request.trackedPostpones\n          ? !0\n          : null === request.completedRootSegment ||\n              request.completedRootSegment.status !== POSTPONED\n      );\n      preparePreamble(request);\n      request = request.onAllReady;\n      request();\n    }\n    function queueCompletedSegment(boundary, segment) {\n      if (\n        0 === segment.chunks.length &&\n        1 === segment.children.length &&\n        null === segment.children[0].boundary &&\n        -1 === segment.children[0].id\n      ) {\n        var childSegment = segment.children[0];\n        childSegment.id = segment.id;\n        childSegment.parentFlushed = !0;\n        (childSegment.status !== COMPLETED &&\n          childSegment.status !== ABORTED &&\n          childSegment.status !== ERRORED) ||\n          queueCompletedSegment(boundary, childSegment);\n      } else boundary.completedSegments.push(segment);\n    }\n    function finishedTask(request, boundary, row, segment) {\n      null !== row &&\n        (0 === --row.pendingTasks\n          ? finishSuspenseListRow(request, row)\n          : row.together && tryToResolveTogetherRow(request, row));\n      request.allPendingTasks--;\n      if (null === boundary) {\n        if (null !== segment && segment.parentFlushed) {\n          if (null !== request.completedRootSegment)\n            throw Error(\n              \"There can only be one root segment. This is a bug in React.\"\n            );\n          request.completedRootSegment = segment;\n        }\n        request.pendingRootTasks--;\n        0 === request.pendingRootTasks && completeShell(request);\n      } else if ((boundary.pendingTasks--, boundary.status !== CLIENT_RENDERED))\n        if (0 === boundary.pendingTasks)\n          if (\n            (boundary.status === PENDING && (boundary.status = COMPLETED),\n            null !== segment &&\n              segment.parentFlushed &&\n              (segment.status === COMPLETED || segment.status === ABORTED) &&\n              queueCompletedSegment(boundary, segment),\n            boundary.parentFlushed &&\n              request.completedBoundaries.push(boundary),\n            boundary.status === COMPLETED)\n          )\n            (row = boundary.row),\n              null !== row &&\n                hoistHoistables(row.hoistables, boundary.contentState),\n              isEligibleForOutlining(request, boundary) ||\n                (boundary.fallbackAbortableTasks.forEach(\n                  abortTaskSoft,\n                  request\n                ),\n                boundary.fallbackAbortableTasks.clear(),\n                null !== row &&\n                  0 === --row.pendingTasks &&\n                  finishSuspenseListRow(request, row)),\n              0 === request.pendingRootTasks &&\n                null === request.trackedPostpones &&\n                null !== boundary.contentPreamble &&\n                preparePreamble(request);\n          else {\n            if (\n              boundary.status === POSTPONED &&\n              ((boundary = boundary.row), null !== boundary)\n            ) {\n              if (null !== request.trackedPostpones) {\n                row = request.trackedPostpones;\n                var postponedRow = boundary.next;\n                if (\n                  null !== postponedRow &&\n                  ((segment = postponedRow.boundaries), null !== segment)\n                )\n                  for (\n                    postponedRow.boundaries = null, postponedRow = 0;\n                    postponedRow < segment.length;\n                    postponedRow++\n                  ) {\n                    var postponedBoundary = segment[postponedRow];\n                    trackPostponedBoundary(request, row, postponedBoundary);\n                    finishedTask(request, postponedBoundary, null, null);\n                  }\n              }\n              0 === --boundary.pendingTasks &&\n                finishSuspenseListRow(request, boundary);\n            }\n          }\n        else\n          null === segment ||\n            !segment.parentFlushed ||\n            (segment.status !== COMPLETED && segment.status !== ABORTED) ||\n            (queueCompletedSegment(boundary, segment),\n            1 === boundary.completedSegments.length &&\n              boundary.parentFlushed &&\n              request.partialBoundaries.push(boundary)),\n            (boundary = boundary.row),\n            null !== boundary &&\n              boundary.together &&\n              tryToResolveTogetherRow(request, boundary);\n      0 === request.allPendingTasks && completeAll(request);\n    }\n    function performWork(request$jscomp$2) {\n      if (\n        request$jscomp$2.status !== CLOSED &&\n        13 !== request$jscomp$2.status\n      ) {\n        var prevContext = currentActiveSnapshot,\n          prevDispatcher = ReactSharedInternals.H;\n        ReactSharedInternals.H = HooksDispatcher;\n        var prevAsyncDispatcher = ReactSharedInternals.A;\n        ReactSharedInternals.A = DefaultAsyncDispatcher;\n        var prevRequest = currentRequest;\n        currentRequest = request$jscomp$2;\n        var prevGetCurrentStackImpl = ReactSharedInternals.getCurrentStack;\n        ReactSharedInternals.getCurrentStack = getCurrentStackInDEV;\n        var prevResumableState = currentResumableState;\n        currentResumableState = request$jscomp$2.resumableState;\n        try {\n          var pingedTasks = request$jscomp$2.pingedTasks,\n            i;\n          for (i = 0; i < pingedTasks.length; i++) {\n            var request = request$jscomp$2,\n              task = pingedTasks[i],\n              segment = task.blockedSegment;\n            if (null === segment) {\n              var prevTaskInDEV = void 0,\n                request$jscomp$0 = request;\n              request = task;\n              if (0 !== request.replay.pendingTasks) {\n                switchContext(request.context);\n                prevTaskInDEV = currentTaskInDEV;\n                currentTaskInDEV = request;\n                try {\n                  \"number\" === typeof request.replay.slots\n                    ? resumeNode(\n                        request$jscomp$0,\n                        request,\n                        request.replay.slots,\n                        request.node,\n                        request.childIndex\n                      )\n                    : retryNode(request$jscomp$0, request);\n                  if (\n                    1 === request.replay.pendingTasks &&\n                    0 < request.replay.nodes.length\n                  )\n                    throw Error(\n                      \"Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering.\"\n                    );\n                  request.replay.pendingTasks--;\n                  request.abortSet.delete(request);\n                  finishedTask(\n                    request$jscomp$0,\n                    request.blockedBoundary,\n                    request.row,\n                    null\n                  );\n                } catch (thrownValue) {\n                  resetHooksState();\n                  var x =\n                    thrownValue === SuspenseException\n                      ? getSuspendedThenable()\n                      : thrownValue;\n                  if (\n                    \"object\" === typeof x &&\n                    null !== x &&\n                    \"function\" === typeof x.then\n                  ) {\n                    var ping = request.ping;\n                    x.then(ping, ping);\n                    request.thenableState =\n                      thrownValue === SuspenseException\n                        ? getThenableStateAfterSuspending()\n                        : null;\n                  } else {\n                    request.replay.pendingTasks--;\n                    request.abortSet.delete(request);\n                    var errorInfo = getThrownInfo(request.componentStack),\n                      errorDigest = void 0,\n                      request$jscomp$1 = request$jscomp$0,\n                      boundary = request.blockedBoundary,\n                      error$jscomp$0 =\n                        12 === request$jscomp$0.status\n                          ? request$jscomp$0.fatalError\n                          : x,\n                      errorInfo$jscomp$0 = errorInfo,\n                      replayNodes = request.replay.nodes,\n                      resumeSlots = request.replay.slots;\n                    errorDigest = logRecoverableError(\n                      request$jscomp$1,\n                      error$jscomp$0,\n                      errorInfo$jscomp$0,\n                      request.debugTask\n                    );\n                    abortRemainingReplayNodes(\n                      request$jscomp$1,\n                      boundary,\n                      replayNodes,\n                      resumeSlots,\n                      error$jscomp$0,\n                      errorDigest,\n                      errorInfo$jscomp$0,\n                      !1\n                    );\n                    request$jscomp$0.pendingRootTasks--;\n                    0 === request$jscomp$0.pendingRootTasks &&\n                      completeShell(request$jscomp$0);\n                    request$jscomp$0.allPendingTasks--;\n                    0 === request$jscomp$0.allPendingTasks &&\n                      completeAll(request$jscomp$0);\n                  }\n                } finally {\n                  currentTaskInDEV = prevTaskInDEV;\n                }\n              }\n            } else if (\n              ((request$jscomp$0 = prevTaskInDEV = void 0),\n              (errorDigest = task),\n              (request$jscomp$1 = segment),\n              request$jscomp$1.status === PENDING)\n            ) {\n              request$jscomp$1.status = 6;\n              switchContext(errorDigest.context);\n              request$jscomp$0 = currentTaskInDEV;\n              currentTaskInDEV = errorDigest;\n              var childrenLength = request$jscomp$1.children.length,\n                chunkLength = request$jscomp$1.chunks.length;\n              try {\n                retryNode(request, errorDigest),\n                  pushSegmentFinale(\n                    request$jscomp$1.chunks,\n                    request.renderState,\n                    request$jscomp$1.lastPushedText,\n                    request$jscomp$1.textEmbedded\n                  ),\n                  errorDigest.abortSet.delete(errorDigest),\n                  (request$jscomp$1.status = COMPLETED),\n                  finishedTask(\n                    request,\n                    errorDigest.blockedBoundary,\n                    errorDigest.row,\n                    request$jscomp$1\n                  );\n              } catch (thrownValue) {\n                resetHooksState();\n                request$jscomp$1.children.length = childrenLength;\n                request$jscomp$1.chunks.length = chunkLength;\n                var x$jscomp$0 =\n                  thrownValue === SuspenseException\n                    ? getSuspendedThenable()\n                    : 12 === request.status\n                      ? request.fatalError\n                      : thrownValue;\n                if (\n                  12 === request.status &&\n                  null !== request.trackedPostpones\n                ) {\n                  var trackedPostpones = request.trackedPostpones,\n                    thrownInfo = getThrownInfo(errorDigest.componentStack);\n                  errorDigest.abortSet.delete(errorDigest);\n                  logRecoverableError(\n                    request,\n                    x$jscomp$0,\n                    thrownInfo,\n                    errorDigest.debugTask\n                  );\n                  trackPostpone(\n                    request,\n                    trackedPostpones,\n                    errorDigest,\n                    request$jscomp$1\n                  );\n                  finishedTask(\n                    request,\n                    errorDigest.blockedBoundary,\n                    errorDigest.row,\n                    request$jscomp$1\n                  );\n                } else if (\n                  \"object\" === typeof x$jscomp$0 &&\n                  null !== x$jscomp$0 &&\n                  \"function\" === typeof x$jscomp$0.then\n                ) {\n                  request$jscomp$1.status = PENDING;\n                  errorDigest.thenableState =\n                    thrownValue === SuspenseException\n                      ? getThenableStateAfterSuspending()\n                      : null;\n                  var ping$jscomp$0 = errorDigest.ping;\n                  x$jscomp$0.then(ping$jscomp$0, ping$jscomp$0);\n                } else {\n                  var errorInfo$jscomp$1 = getThrownInfo(\n                    errorDigest.componentStack\n                  );\n                  errorDigest.abortSet.delete(errorDigest);\n                  request$jscomp$1.status = ERRORED;\n                  var boundary$jscomp$0 = errorDigest.blockedBoundary,\n                    row = errorDigest.row,\n                    debugTask = errorDigest.debugTask;\n                  null !== row &&\n                    0 === --row.pendingTasks &&\n                    finishSuspenseListRow(request, row);\n                  request.allPendingTasks--;\n                  prevTaskInDEV = logRecoverableError(\n                    request,\n                    x$jscomp$0,\n                    errorInfo$jscomp$1,\n                    debugTask\n                  );\n                  if (null === boundary$jscomp$0)\n                    fatalError(\n                      request,\n                      x$jscomp$0,\n                      errorInfo$jscomp$1,\n                      debugTask\n                    );\n                  else if (\n                    (boundary$jscomp$0.pendingTasks--,\n                    boundary$jscomp$0.status !== CLIENT_RENDERED)\n                  ) {\n                    boundary$jscomp$0.status = CLIENT_RENDERED;\n                    encodeErrorForBoundary(\n                      boundary$jscomp$0,\n                      prevTaskInDEV,\n                      x$jscomp$0,\n                      errorInfo$jscomp$1,\n                      !1\n                    );\n                    untrackBoundary(request, boundary$jscomp$0);\n                    var boundaryRow = boundary$jscomp$0.row;\n                    null !== boundaryRow &&\n                      0 === --boundaryRow.pendingTasks &&\n                      finishSuspenseListRow(request, boundaryRow);\n                    boundary$jscomp$0.parentFlushed &&\n                      request.clientRenderedBoundaries.push(boundary$jscomp$0);\n                    0 === request.pendingRootTasks &&\n                      null === request.trackedPostpones &&\n                      null !== boundary$jscomp$0.contentPreamble &&\n                      preparePreamble(request);\n                  }\n                  0 === request.allPendingTasks && completeAll(request);\n                }\n              } finally {\n                currentTaskInDEV = request$jscomp$0;\n              }\n            }\n          }\n          pingedTasks.splice(0, i);\n          null !== request$jscomp$2.destination &&\n            flushCompletedQueues(\n              request$jscomp$2,\n              request$jscomp$2.destination\n            );\n        } catch (error) {\n          (pingedTasks = {}),\n            logRecoverableError(request$jscomp$2, error, pingedTasks, null),\n            fatalError(request$jscomp$2, error, pingedTasks, null);\n        } finally {\n          (currentResumableState = prevResumableState),\n            (ReactSharedInternals.H = prevDispatcher),\n            (ReactSharedInternals.A = prevAsyncDispatcher),\n            (ReactSharedInternals.getCurrentStack = prevGetCurrentStackImpl),\n            prevDispatcher === HooksDispatcher && switchContext(prevContext),\n            (currentRequest = prevRequest);\n        }\n      }\n    }\n    function preparePreambleFromSubtree(\n      request,\n      segment,\n      collectedPreambleSegments\n    ) {\n      segment.preambleChildren.length &&\n        collectedPreambleSegments.push(segment.preambleChildren);\n      for (var pendingPreambles = !1, i = 0; i < segment.children.length; i++)\n        pendingPreambles =\n          preparePreambleFromSegment(\n            request,\n            segment.children[i],\n            collectedPreambleSegments\n          ) || pendingPreambles;\n      return pendingPreambles;\n    }\n    function preparePreambleFromSegment(\n      request,\n      segment,\n      collectedPreambleSegments\n    ) {\n      var boundary = segment.boundary;\n      if (null === boundary)\n        return preparePreambleFromSubtree(\n          request,\n          segment,\n          collectedPreambleSegments\n        );\n      var preamble = boundary.contentPreamble,\n        fallbackPreamble = boundary.fallbackPreamble;\n      if (null === preamble || null === fallbackPreamble) return !1;\n      switch (boundary.status) {\n        case COMPLETED:\n          hoistPreambleState(request.renderState, preamble);\n          request.byteSize += boundary.byteSize;\n          segment = boundary.completedSegments[0];\n          if (!segment)\n            throw Error(\n              \"A previously unvisited boundary must have exactly one root segment. This is a bug in React.\"\n            );\n          return preparePreambleFromSubtree(\n            request,\n            segment,\n            collectedPreambleSegments\n          );\n        case POSTPONED:\n          if (null !== request.trackedPostpones) return !0;\n        case CLIENT_RENDERED:\n          if (segment.status === COMPLETED)\n            return (\n              hoistPreambleState(request.renderState, fallbackPreamble),\n              preparePreambleFromSubtree(\n                request,\n                segment,\n                collectedPreambleSegments\n              )\n            );\n        default:\n          return !0;\n      }\n    }\n    function preparePreamble(request) {\n      if (\n        request.completedRootSegment &&\n        null === request.completedPreambleSegments\n      ) {\n        var collectedPreambleSegments = [],\n          originalRequestByteSize = request.byteSize,\n          hasPendingPreambles = preparePreambleFromSegment(\n            request,\n            request.completedRootSegment,\n            collectedPreambleSegments\n          ),\n          preamble = request.renderState.preamble;\n        !1 === hasPendingPreambles ||\n        (preamble.headChunks && preamble.bodyChunks)\n          ? (request.completedPreambleSegments = collectedPreambleSegments)\n          : (request.byteSize = originalRequestByteSize);\n      }\n    }\n    function flushSubtree(request, destination, segment, hoistableState) {\n      segment.parentFlushed = !0;\n      switch (segment.status) {\n        case PENDING:\n          segment.id = request.nextSegmentId++;\n        case POSTPONED:\n          return (\n            (hoistableState = segment.id),\n            (segment.lastPushedText = !1),\n            (segment.textEmbedded = !1),\n            (request = request.renderState),\n            destination.push(placeholder1),\n            destination.push(request.placeholderPrefix),\n            (request = hoistableState.toString(16)),\n            destination.push(request),\n            destination.push(placeholder2)\n          );\n        case COMPLETED:\n          segment.status = FLUSHED;\n          var r = !0,\n            chunks = segment.chunks,\n            chunkIdx = 0;\n          segment = segment.children;\n          for (var childIdx = 0; childIdx < segment.length; childIdx++) {\n            for (r = segment[childIdx]; chunkIdx < r.index; chunkIdx++)\n              destination.push(chunks[chunkIdx]);\n            r = flushSegment(request, destination, r, hoistableState);\n          }\n          for (; chunkIdx < chunks.length - 1; chunkIdx++)\n            destination.push(chunks[chunkIdx]);\n          chunkIdx < chunks.length && (r = destination.push(chunks[chunkIdx]));\n          return r;\n        case ABORTED:\n          return !0;\n        default:\n          throw Error(\n            \"Aborted, errored or already flushed boundaries should not be flushed again. This is a bug in React.\"\n          );\n      }\n    }\n    function flushSegment(request, destination, segment, hoistableState) {\n      var boundary = segment.boundary;\n      if (null === boundary)\n        return flushSubtree(request, destination, segment, hoistableState);\n      boundary.parentFlushed = !0;\n      if (boundary.status === CLIENT_RENDERED) {\n        var row = boundary.row;\n        null !== row &&\n          0 === --row.pendingTasks &&\n          finishSuspenseListRow(request, row);\n        if (!request.renderState.generateStaticMarkup) {\n          var errorDigest = boundary.errorDigest,\n            errorMessage = boundary.errorMessage;\n          row = boundary.errorStack;\n          boundary = boundary.errorComponentStack;\n          destination.push(startClientRenderedSuspenseBoundary);\n          destination.push(clientRenderedSuspenseBoundaryError1);\n          errorDigest &&\n            (destination.push(clientRenderedSuspenseBoundaryError1A),\n            (errorDigest = escapeTextForBrowser(errorDigest)),\n            destination.push(errorDigest),\n            destination.push(\n              clientRenderedSuspenseBoundaryErrorAttrInterstitial\n            ));\n          errorMessage &&\n            (destination.push(clientRenderedSuspenseBoundaryError1B),\n            (errorMessage = escapeTextForBrowser(errorMessage)),\n            destination.push(errorMessage),\n            destination.push(\n              clientRenderedSuspenseBoundaryErrorAttrInterstitial\n            ));\n          row &&\n            (destination.push(clientRenderedSuspenseBoundaryError1C),\n            (row = escapeTextForBrowser(row)),\n            destination.push(row),\n            destination.push(\n              clientRenderedSuspenseBoundaryErrorAttrInterstitial\n            ));\n          boundary &&\n            (destination.push(clientRenderedSuspenseBoundaryError1D),\n            (row = escapeTextForBrowser(boundary)),\n            destination.push(row),\n            destination.push(\n              clientRenderedSuspenseBoundaryErrorAttrInterstitial\n            ));\n          destination.push(clientRenderedSuspenseBoundaryError2);\n        }\n        flushSubtree(request, destination, segment, hoistableState);\n        request = request.renderState.generateStaticMarkup\n          ? !0\n          : destination.push(endSuspenseBoundary);\n        return request;\n      }\n      if (boundary.status !== COMPLETED)\n        return (\n          boundary.status === PENDING &&\n            (boundary.rootSegmentID = request.nextSegmentId++),\n          0 < boundary.completedSegments.length &&\n            request.partialBoundaries.push(boundary),\n          writeStartPendingSuspenseBoundary(\n            destination,\n            request.renderState,\n            boundary.rootSegmentID\n          ),\n          hoistableState &&\n            hoistHoistables(hoistableState, boundary.fallbackState),\n          flushSubtree(request, destination, segment, hoistableState),\n          destination.push(endSuspenseBoundary)\n        );\n      if (\n        !flushingPartialBoundaries &&\n        isEligibleForOutlining(request, boundary) &&\n        flushedByteSize + boundary.byteSize > request.progressiveChunkSize\n      )\n        return (\n          (boundary.rootSegmentID = request.nextSegmentId++),\n          request.completedBoundaries.push(boundary),\n          writeStartPendingSuspenseBoundary(\n            destination,\n            request.renderState,\n            boundary.rootSegmentID\n          ),\n          flushSubtree(request, destination, segment, hoistableState),\n          destination.push(endSuspenseBoundary)\n        );\n      flushedByteSize += boundary.byteSize;\n      hoistableState && hoistHoistables(hoistableState, boundary.contentState);\n      segment = boundary.row;\n      null !== segment &&\n        isEligibleForOutlining(request, boundary) &&\n        0 === --segment.pendingTasks &&\n        finishSuspenseListRow(request, segment);\n      request.renderState.generateStaticMarkup ||\n        destination.push(startCompletedSuspenseBoundary);\n      segment = boundary.completedSegments;\n      if (1 !== segment.length)\n        throw Error(\n          \"A previously unvisited boundary must have exactly one root segment. This is a bug in React.\"\n        );\n      flushSegment(request, destination, segment[0], hoistableState);\n      request = request.renderState.generateStaticMarkup\n        ? !0\n        : destination.push(endSuspenseBoundary);\n      return request;\n    }\n    function flushSegmentContainer(\n      request,\n      destination,\n      segment,\n      hoistableState\n    ) {\n      writeStartSegment(\n        destination,\n        request.renderState,\n        segment.parentFormatContext,\n        segment.id\n      );\n      flushSegment(request, destination, segment, hoistableState);\n      return writeEndSegment(destination, segment.parentFormatContext);\n    }\n    function flushCompletedBoundary(request, destination, boundary) {\n      flushedByteSize = boundary.byteSize;\n      for (\n        var completedSegments = boundary.completedSegments, i = 0;\n        i < completedSegments.length;\n        i++\n      )\n        flushPartiallyCompletedSegment(\n          request,\n          destination,\n          boundary,\n          completedSegments[i]\n        );\n      completedSegments.length = 0;\n      completedSegments = boundary.row;\n      null !== completedSegments &&\n        isEligibleForOutlining(request, boundary) &&\n        0 === --completedSegments.pendingTasks &&\n        finishSuspenseListRow(request, completedSegments);\n      writeHoistablesForBoundary(\n        destination,\n        boundary.contentState,\n        request.renderState\n      );\n      completedSegments = request.resumableState;\n      request = request.renderState;\n      i = boundary.rootSegmentID;\n      boundary = boundary.contentState;\n      var requiresStyleInsertion = request.stylesToHoist;\n      request.stylesToHoist = !1;\n      destination.push(request.startInlineScript);\n      destination.push(endOfStartTag);\n      requiresStyleInsertion\n        ? ((completedSegments.instructions & SentClientRenderFunction) ===\n            NothingSent &&\n            ((completedSegments.instructions |= SentClientRenderFunction),\n            destination.push(clientRenderScriptFunctionOnly)),\n          (completedSegments.instructions & SentCompleteBoundaryFunction) ===\n            NothingSent &&\n            ((completedSegments.instructions |= SentCompleteBoundaryFunction),\n            destination.push(completeBoundaryScriptFunctionOnly)),\n          (completedSegments.instructions & SentStyleInsertionFunction) ===\n          NothingSent\n            ? ((completedSegments.instructions |= SentStyleInsertionFunction),\n              destination.push(completeBoundaryWithStylesScript1FullPartial))\n            : destination.push(completeBoundaryWithStylesScript1Partial))\n        : ((completedSegments.instructions & SentCompleteBoundaryFunction) ===\n            NothingSent &&\n            ((completedSegments.instructions |= SentCompleteBoundaryFunction),\n            destination.push(completeBoundaryScriptFunctionOnly)),\n          destination.push(completeBoundaryScript1Partial));\n      completedSegments = i.toString(16);\n      destination.push(request.boundaryPrefix);\n      destination.push(completedSegments);\n      destination.push(completeBoundaryScript2);\n      destination.push(request.segmentPrefix);\n      destination.push(completedSegments);\n      requiresStyleInsertion\n        ? (destination.push(completeBoundaryScript3a),\n          writeStyleResourceDependenciesInJS(destination, boundary))\n        : destination.push(completeBoundaryScript3b);\n      boundary = destination.push(completeBoundaryScriptEnd);\n      return writeBootstrap(destination, request) && boundary;\n    }\n    function flushPartiallyCompletedSegment(\n      request,\n      destination,\n      boundary,\n      segment\n    ) {\n      if (segment.status === FLUSHED) return !0;\n      var hoistableState = boundary.contentState,\n        segmentID = segment.id;\n      if (-1 === segmentID) {\n        if (-1 === (segment.id = boundary.rootSegmentID))\n          throw Error(\n            \"A root segment ID must have been assigned by now. This is a bug in React.\"\n          );\n        return flushSegmentContainer(\n          request,\n          destination,\n          segment,\n          hoistableState\n        );\n      }\n      if (segmentID === boundary.rootSegmentID)\n        return flushSegmentContainer(\n          request,\n          destination,\n          segment,\n          hoistableState\n        );\n      flushSegmentContainer(request, destination, segment, hoistableState);\n      boundary = request.resumableState;\n      request = request.renderState;\n      destination.push(request.startInlineScript);\n      destination.push(endOfStartTag);\n      (boundary.instructions & SentCompleteSegmentFunction) === NothingSent\n        ? ((boundary.instructions |= SentCompleteSegmentFunction),\n          destination.push(completeSegmentScript1Full))\n        : destination.push(completeSegmentScript1Partial);\n      destination.push(request.segmentPrefix);\n      segmentID = segmentID.toString(16);\n      destination.push(segmentID);\n      destination.push(completeSegmentScript2);\n      destination.push(request.placeholderPrefix);\n      destination.push(segmentID);\n      destination = destination.push(completeSegmentScriptEnd);\n      return destination;\n    }\n    function flushCompletedQueues(request, destination) {\n      try {\n        if (!(0 < request.pendingRootTasks)) {\n          var i,\n            completedRootSegment = request.completedRootSegment;\n          if (null !== completedRootSegment) {\n            if (completedRootSegment.status === POSTPONED) return;\n            var completedPreambleSegments = request.completedPreambleSegments;\n            if (null === completedPreambleSegments) return;\n            flushedByteSize = request.byteSize;\n            var resumableState = request.resumableState,\n              renderState = request.renderState,\n              preamble = renderState.preamble,\n              htmlChunks = preamble.htmlChunks,\n              headChunks = preamble.headChunks,\n              i$jscomp$0;\n            if (htmlChunks) {\n              for (i$jscomp$0 = 0; i$jscomp$0 < htmlChunks.length; i$jscomp$0++)\n                destination.push(htmlChunks[i$jscomp$0]);\n              if (headChunks)\n                for (\n                  i$jscomp$0 = 0;\n                  i$jscomp$0 < headChunks.length;\n                  i$jscomp$0++\n                )\n                  destination.push(headChunks[i$jscomp$0]);\n              else {\n                var chunk = startChunkForTag(\"head\");\n                destination.push(chunk);\n                destination.push(endOfStartTag);\n              }\n            } else if (headChunks)\n              for (i$jscomp$0 = 0; i$jscomp$0 < headChunks.length; i$jscomp$0++)\n                destination.push(headChunks[i$jscomp$0]);\n            var charsetChunks = renderState.charsetChunks;\n            for (\n              i$jscomp$0 = 0;\n              i$jscomp$0 < charsetChunks.length;\n              i$jscomp$0++\n            )\n              destination.push(charsetChunks[i$jscomp$0]);\n            charsetChunks.length = 0;\n            renderState.preconnects.forEach(flushResource, destination);\n            renderState.preconnects.clear();\n            var viewportChunks = renderState.viewportChunks;\n            for (\n              i$jscomp$0 = 0;\n              i$jscomp$0 < viewportChunks.length;\n              i$jscomp$0++\n            )\n              destination.push(viewportChunks[i$jscomp$0]);\n            viewportChunks.length = 0;\n            renderState.fontPreloads.forEach(flushResource, destination);\n            renderState.fontPreloads.clear();\n            renderState.highImagePreloads.forEach(flushResource, destination);\n            renderState.highImagePreloads.clear();\n            currentlyFlushingRenderState = renderState;\n            renderState.styles.forEach(flushStylesInPreamble, destination);\n            currentlyFlushingRenderState = null;\n            var importMapChunks = renderState.importMapChunks;\n            for (\n              i$jscomp$0 = 0;\n              i$jscomp$0 < importMapChunks.length;\n              i$jscomp$0++\n            )\n              destination.push(importMapChunks[i$jscomp$0]);\n            importMapChunks.length = 0;\n            renderState.bootstrapScripts.forEach(flushResource, destination);\n            renderState.scripts.forEach(flushResource, destination);\n            renderState.scripts.clear();\n            renderState.bulkPreloads.forEach(flushResource, destination);\n            renderState.bulkPreloads.clear();\n            resumableState.instructions |= SentCompletedShellId;\n            var hoistableChunks = renderState.hoistableChunks;\n            for (\n              i$jscomp$0 = 0;\n              i$jscomp$0 < hoistableChunks.length;\n              i$jscomp$0++\n            )\n              destination.push(hoistableChunks[i$jscomp$0]);\n            for (\n              resumableState = hoistableChunks.length = 0;\n              resumableState < completedPreambleSegments.length;\n              resumableState++\n            ) {\n              var segments = completedPreambleSegments[resumableState];\n              for (\n                renderState = 0;\n                renderState < segments.length;\n                renderState++\n              )\n                flushSegment(request, destination, segments[renderState], null);\n            }\n            var preamble$jscomp$0 = request.renderState.preamble,\n              headChunks$jscomp$0 = preamble$jscomp$0.headChunks;\n            if (preamble$jscomp$0.htmlChunks || headChunks$jscomp$0) {\n              var chunk$jscomp$0 = endChunkForTag(\"head\");\n              destination.push(chunk$jscomp$0);\n            }\n            var bodyChunks = preamble$jscomp$0.bodyChunks;\n            if (bodyChunks)\n              for (\n                completedPreambleSegments = 0;\n                completedPreambleSegments < bodyChunks.length;\n                completedPreambleSegments++\n              )\n                destination.push(bodyChunks[completedPreambleSegments]);\n            flushSegment(request, destination, completedRootSegment, null);\n            request.completedRootSegment = null;\n            var renderState$jscomp$0 = request.renderState;\n            if (\n              0 !== request.allPendingTasks ||\n              0 !== request.clientRenderedBoundaries.length ||\n              0 !== request.completedBoundaries.length ||\n              (null !== request.trackedPostpones &&\n                (0 !== request.trackedPostpones.rootNodes.length ||\n                  null !== request.trackedPostpones.rootSlots))\n            ) {\n              var resumableState$jscomp$0 = request.resumableState;\n              if (\n                (resumableState$jscomp$0.instructions & SentMarkShellTime) ===\n                NothingSent\n              ) {\n                resumableState$jscomp$0.instructions |= SentMarkShellTime;\n                destination.push(renderState$jscomp$0.startInlineScript);\n                if (\n                  (resumableState$jscomp$0.instructions &\n                    SentCompletedShellId) ===\n                  NothingSent\n                ) {\n                  resumableState$jscomp$0.instructions |= SentCompletedShellId;\n                  var shellId = \"_\" + resumableState$jscomp$0.idPrefix + \"R_\";\n                  destination.push(completedShellIdAttributeStart);\n                  var chunk$jscomp$1 = escapeTextForBrowser(shellId);\n                  destination.push(chunk$jscomp$1);\n                  destination.push(attributeEnd);\n                }\n                destination.push(endOfStartTag);\n                destination.push(shellTimeRuntimeScript);\n                destination.push(endInlineScript);\n              }\n            }\n            writeBootstrap(destination, renderState$jscomp$0);\n          }\n          var renderState$jscomp$1 = request.renderState;\n          completedRootSegment = 0;\n          var viewportChunks$jscomp$0 = renderState$jscomp$1.viewportChunks;\n          for (\n            completedRootSegment = 0;\n            completedRootSegment < viewportChunks$jscomp$0.length;\n            completedRootSegment++\n          )\n            destination.push(viewportChunks$jscomp$0[completedRootSegment]);\n          viewportChunks$jscomp$0.length = 0;\n          renderState$jscomp$1.preconnects.forEach(flushResource, destination);\n          renderState$jscomp$1.preconnects.clear();\n          renderState$jscomp$1.fontPreloads.forEach(flushResource, destination);\n          renderState$jscomp$1.fontPreloads.clear();\n          renderState$jscomp$1.highImagePreloads.forEach(\n            flushResource,\n            destination\n          );\n          renderState$jscomp$1.highImagePreloads.clear();\n          renderState$jscomp$1.styles.forEach(preloadLateStyles, destination);\n          renderState$jscomp$1.scripts.forEach(flushResource, destination);\n          renderState$jscomp$1.scripts.clear();\n          renderState$jscomp$1.bulkPreloads.forEach(flushResource, destination);\n          renderState$jscomp$1.bulkPreloads.clear();\n          var hoistableChunks$jscomp$0 = renderState$jscomp$1.hoistableChunks;\n          for (\n            completedRootSegment = 0;\n            completedRootSegment < hoistableChunks$jscomp$0.length;\n            completedRootSegment++\n          )\n            destination.push(hoistableChunks$jscomp$0[completedRootSegment]);\n          hoistableChunks$jscomp$0.length = 0;\n          var clientRenderedBoundaries = request.clientRenderedBoundaries;\n          for (i = 0; i < clientRenderedBoundaries.length; i++) {\n            var boundary = clientRenderedBoundaries[i];\n            renderState$jscomp$1 = destination;\n            var resumableState$jscomp$1 = request.resumableState,\n              renderState$jscomp$2 = request.renderState,\n              id = boundary.rootSegmentID,\n              errorDigest = boundary.errorDigest,\n              errorMessage = boundary.errorMessage,\n              errorStack = boundary.errorStack,\n              errorComponentStack = boundary.errorComponentStack;\n            renderState$jscomp$1.push(renderState$jscomp$2.startInlineScript);\n            renderState$jscomp$1.push(endOfStartTag);\n            (resumableState$jscomp$1.instructions &\n              SentClientRenderFunction) ===\n            NothingSent\n              ? ((resumableState$jscomp$1.instructions |=\n                  SentClientRenderFunction),\n                renderState$jscomp$1.push(clientRenderScript1Full))\n              : renderState$jscomp$1.push(clientRenderScript1Partial);\n            renderState$jscomp$1.push(renderState$jscomp$2.boundaryPrefix);\n            var chunk$jscomp$2 = id.toString(16);\n            renderState$jscomp$1.push(chunk$jscomp$2);\n            renderState$jscomp$1.push(clientRenderScript1A);\n            if (\n              errorDigest ||\n              errorMessage ||\n              errorStack ||\n              errorComponentStack\n            ) {\n              renderState$jscomp$1.push(clientRenderErrorScriptArgInterstitial);\n              var chunk$jscomp$3 = escapeJSStringsForInstructionScripts(\n                errorDigest || \"\"\n              );\n              renderState$jscomp$1.push(chunk$jscomp$3);\n            }\n            if (errorMessage || errorStack || errorComponentStack) {\n              renderState$jscomp$1.push(clientRenderErrorScriptArgInterstitial);\n              var chunk$jscomp$4 = escapeJSStringsForInstructionScripts(\n                errorMessage || \"\"\n              );\n              renderState$jscomp$1.push(chunk$jscomp$4);\n            }\n            if (errorStack || errorComponentStack) {\n              renderState$jscomp$1.push(clientRenderErrorScriptArgInterstitial);\n              var chunk$jscomp$5 = escapeJSStringsForInstructionScripts(\n                errorStack || \"\"\n              );\n              renderState$jscomp$1.push(chunk$jscomp$5);\n            }\n            if (errorComponentStack) {\n              renderState$jscomp$1.push(clientRenderErrorScriptArgInterstitial);\n              var chunk$jscomp$6 =\n                escapeJSStringsForInstructionScripts(errorComponentStack);\n              renderState$jscomp$1.push(chunk$jscomp$6);\n            }\n            var JSCompiler_inline_result = renderState$jscomp$1.push(\n              clientRenderScriptEnd\n            );\n            if (!JSCompiler_inline_result) {\n              request.destination = null;\n              i++;\n              clientRenderedBoundaries.splice(0, i);\n              return;\n            }\n          }\n          clientRenderedBoundaries.splice(0, i);\n          var completedBoundaries = request.completedBoundaries;\n          for (i = 0; i < completedBoundaries.length; i++)\n            if (\n              !flushCompletedBoundary(\n                request,\n                destination,\n                completedBoundaries[i]\n              )\n            ) {\n              request.destination = null;\n              i++;\n              completedBoundaries.splice(0, i);\n              return;\n            }\n          completedBoundaries.splice(0, i);\n          flushingPartialBoundaries = !0;\n          var partialBoundaries = request.partialBoundaries;\n          for (i = 0; i < partialBoundaries.length; i++) {\n            a: {\n              clientRenderedBoundaries = request;\n              boundary = destination;\n              var boundary$jscomp$0 = partialBoundaries[i];\n              flushedByteSize = boundary$jscomp$0.byteSize;\n              var completedSegments = boundary$jscomp$0.completedSegments;\n              for (\n                JSCompiler_inline_result = 0;\n                JSCompiler_inline_result < completedSegments.length;\n                JSCompiler_inline_result++\n              )\n                if (\n                  !flushPartiallyCompletedSegment(\n                    clientRenderedBoundaries,\n                    boundary,\n                    boundary$jscomp$0,\n                    completedSegments[JSCompiler_inline_result]\n                  )\n                ) {\n                  JSCompiler_inline_result++;\n                  completedSegments.splice(0, JSCompiler_inline_result);\n                  var JSCompiler_inline_result$jscomp$0 = !1;\n                  break a;\n                }\n              completedSegments.splice(0, JSCompiler_inline_result);\n              var row = boundary$jscomp$0.row;\n              null !== row &&\n                row.together &&\n                1 === boundary$jscomp$0.pendingTasks &&\n                (1 === row.pendingTasks\n                  ? unblockSuspenseListRow(\n                      clientRenderedBoundaries,\n                      row,\n                      row.hoistables\n                    )\n                  : row.pendingTasks--);\n              JSCompiler_inline_result$jscomp$0 = writeHoistablesForBoundary(\n                boundary,\n                boundary$jscomp$0.contentState,\n                clientRenderedBoundaries.renderState\n              );\n            }\n            if (!JSCompiler_inline_result$jscomp$0) {\n              request.destination = null;\n              i++;\n              partialBoundaries.splice(0, i);\n              return;\n            }\n          }\n          partialBoundaries.splice(0, i);\n          flushingPartialBoundaries = !1;\n          var largeBoundaries = request.completedBoundaries;\n          for (i = 0; i < largeBoundaries.length; i++)\n            if (\n              !flushCompletedBoundary(request, destination, largeBoundaries[i])\n            ) {\n              request.destination = null;\n              i++;\n              largeBoundaries.splice(0, i);\n              return;\n            }\n          largeBoundaries.splice(0, i);\n        }\n      } finally {\n        (flushingPartialBoundaries = !1),\n          0 === request.allPendingTasks &&\n            0 === request.clientRenderedBoundaries.length &&\n            0 === request.completedBoundaries.length &&\n            ((request.flushScheduled = !1),\n            (i = request.resumableState),\n            i.hasBody &&\n              ((partialBoundaries = endChunkForTag(\"body\")),\n              destination.push(partialBoundaries)),\n            i.hasHtml && ((i = endChunkForTag(\"html\")), destination.push(i)),\n            0 !== request.abortableTasks.size &&\n              console.error(\n                \"There was still abortable task at the root when we closed. This is a bug in React.\"\n              ),\n            (request.status = CLOSED),\n            destination.push(null),\n            (request.destination = null));\n      }\n    }\n    function startWork(request) {\n      request.flushScheduled = null !== request.destination;\n      performWork(request);\n      10 === request.status && (request.status = 11);\n      null === request.trackedPostpones &&\n        safelyEmitEarlyPreloads(request, 0 === request.pendingRootTasks);\n    }\n    function enqueueFlush(request) {\n      if (\n        !1 === request.flushScheduled &&\n        0 === request.pingedTasks.length &&\n        null !== request.destination\n      ) {\n        request.flushScheduled = !0;\n        var destination = request.destination;\n        destination\n          ? flushCompletedQueues(request, destination)\n          : (request.flushScheduled = !1);\n      }\n    }\n    function startFlowing(request, destination) {\n      if (13 === request.status)\n        (request.status = CLOSED), destination.destroy(request.fatalError);\n      else if (request.status !== CLOSED && null === request.destination) {\n        request.destination = destination;\n        try {\n          flushCompletedQueues(request, destination);\n        } catch (error) {\n          (destination = {}),\n            logRecoverableError(request, error, destination, null),\n            fatalError(request, error, destination, null);\n        }\n      }\n    }\n    function abort(request, reason) {\n      if (11 === request.status || 10 === request.status) request.status = 12;\n      try {\n        var abortableTasks = request.abortableTasks;\n        if (0 < abortableTasks.size) {\n          var error =\n            void 0 === reason\n              ? Error(\"The render was aborted by the server without a reason.\")\n              : \"object\" === typeof reason &&\n                  null !== reason &&\n                  \"function\" === typeof reason.then\n                ? Error(\"The render was aborted by the server with a promise.\")\n                : reason;\n          request.fatalError = error;\n          abortableTasks.forEach(function (task) {\n            var prevTaskInDEV = currentTaskInDEV,\n              prevGetCurrentStackImpl = ReactSharedInternals.getCurrentStack;\n            currentTaskInDEV = task;\n            ReactSharedInternals.getCurrentStack = getCurrentStackInDEV;\n            try {\n              abortTask(task, request, error);\n            } finally {\n              (currentTaskInDEV = prevTaskInDEV),\n                (ReactSharedInternals.getCurrentStack =\n                  prevGetCurrentStackImpl);\n            }\n          });\n          abortableTasks.clear();\n        }\n        null !== request.destination &&\n          flushCompletedQueues(request, request.destination);\n      } catch (error$4) {\n        (reason = {}),\n          logRecoverableError(request, error$4, reason, null),\n          fatalError(request, error$4, reason, null);\n      }\n    }\n    function addToReplayParent(node, parentKeyPath, trackedPostpones) {\n      if (null === parentKeyPath) trackedPostpones.rootNodes.push(node);\n      else {\n        var workingMap = trackedPostpones.workingMap,\n          parentNode = workingMap.get(parentKeyPath);\n        void 0 === parentNode &&\n          ((parentNode = [parentKeyPath[1], parentKeyPath[2], [], null]),\n          workingMap.set(parentKeyPath, parentNode),\n          addToReplayParent(parentNode, parentKeyPath[0], trackedPostpones));\n        parentNode[2].push(node);\n      }\n    }\n    function onError() {}\n    function renderToStringImpl(\n      children,\n      options,\n      generateStaticMarkup,\n      abortReason\n    ) {\n      var didFatal = !1,\n        fatalError = null,\n        result = \"\",\n        readyToStream = !1;\n      options = createResumableState(\n        options ? options.identifierPrefix : void 0\n      );\n      children = createRequest(\n        children,\n        options,\n        createRenderState(options, generateStaticMarkup),\n        createFormatContext(ROOT_HTML_MODE, null, 0, null),\n        Infinity,\n        onError,\n        void 0,\n        function () {\n          readyToStream = !0;\n        },\n        void 0,\n        void 0,\n        void 0\n      );\n      startWork(children);\n      abort(children, abortReason);\n      startFlowing(children, {\n        push: function (chunk) {\n          null !== chunk && (result += chunk);\n          return !0;\n        },\n        destroy: function (error) {\n          didFatal = !0;\n          fatalError = error;\n        }\n      });\n      if (didFatal && fatalError !== abortReason) throw fatalError;\n      if (!readyToStream)\n        throw Error(\n          \"A component suspended while responding to synchronous input. This will cause the UI to be replaced with a loading indicator. To fix, updates that suspend should be wrapped with startTransition.\"\n        );\n      return result;\n    }\n    var React = require(\"react\"),\n      ReactDOM = require(\"react-dom\"),\n      REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n      REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n      REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n      REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n      REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n      REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n      REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n      REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n      REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n      REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n      REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n      REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n      REACT_SCOPE_TYPE = Symbol.for(\"react.scope\"),\n      REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n      REACT_LEGACY_HIDDEN_TYPE = Symbol.for(\"react.legacy_hidden\"),\n      REACT_MEMO_CACHE_SENTINEL = Symbol.for(\"react.memo_cache_sentinel\"),\n      REACT_VIEW_TRANSITION_TYPE = Symbol.for(\"react.view_transition\"),\n      MAYBE_ITERATOR_SYMBOL = Symbol.iterator,\n      isArrayImpl = Array.isArray,\n      jsxPropsParents = new WeakMap(),\n      jsxChildrenParents = new WeakMap(),\n      CLIENT_REFERENCE_TAG = Symbol.for(\"react.client.reference\"),\n      assign = Object.assign,\n      hasOwnProperty = Object.prototype.hasOwnProperty,\n      VALID_ATTRIBUTE_NAME_REGEX = RegExp(\n        \"^[:A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD][:A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040]*$\"\n      ),\n      illegalAttributeNameCache = {},\n      validatedAttributeNameCache = {},\n      unitlessNumbers = new Set(\n        \"animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp\".split(\n          \" \"\n        )\n      ),\n      aliases = new Map([\n        [\"acceptCharset\", \"accept-charset\"],\n        [\"htmlFor\", \"for\"],\n        [\"httpEquiv\", \"http-equiv\"],\n        [\"crossOrigin\", \"crossorigin\"],\n        [\"accentHeight\", \"accent-height\"],\n        [\"alignmentBaseline\", \"alignment-baseline\"],\n        [\"arabicForm\", \"arabic-form\"],\n        [\"baselineShift\", \"baseline-shift\"],\n        [\"capHeight\", \"cap-height\"],\n        [\"clipPath\", \"clip-path\"],\n        [\"clipRule\", \"clip-rule\"],\n        [\"colorInterpolation\", \"color-interpolation\"],\n        [\"colorInterpolationFilters\", \"color-interpolation-filters\"],\n        [\"colorProfile\", \"color-profile\"],\n        [\"colorRendering\", \"color-rendering\"],\n        [\"dominantBaseline\", \"dominant-baseline\"],\n        [\"enableBackground\", \"enable-background\"],\n        [\"fillOpacity\", \"fill-opacity\"],\n        [\"fillRule\", \"fill-rule\"],\n        [\"floodColor\", \"flood-color\"],\n        [\"floodOpacity\", \"flood-opacity\"],\n        [\"fontFamily\", \"font-family\"],\n        [\"fontSize\", \"font-size\"],\n        [\"fontSizeAdjust\", \"font-size-adjust\"],\n        [\"fontStretch\", \"font-stretch\"],\n        [\"fontStyle\", \"font-style\"],\n        [\"fontVariant\", \"font-variant\"],\n        [\"fontWeight\", \"font-weight\"],\n        [\"glyphName\", \"glyph-name\"],\n        [\"glyphOrientationHorizontal\", \"glyph-orientation-horizontal\"],\n        [\"glyphOrientationVertical\", \"glyph-orientation-vertical\"],\n        [\"horizAdvX\", \"horiz-adv-x\"],\n        [\"horizOriginX\", \"horiz-origin-x\"],\n        [\"imageRendering\", \"image-rendering\"],\n        [\"letterSpacing\", \"letter-spacing\"],\n        [\"lightingColor\", \"lighting-color\"],\n        [\"markerEnd\", \"marker-end\"],\n        [\"markerMid\", \"marker-mid\"],\n        [\"markerStart\", \"marker-start\"],\n        [\"overlinePosition\", \"overline-position\"],\n        [\"overlineThickness\", \"overline-thickness\"],\n        [\"paintOrder\", \"paint-order\"],\n        [\"panose-1\", \"panose-1\"],\n        [\"pointerEvents\", \"pointer-events\"],\n        [\"renderingIntent\", \"rendering-intent\"],\n        [\"shapeRendering\", \"shape-rendering\"],\n        [\"stopColor\", \"stop-color\"],\n        [\"stopOpacity\", \"stop-opacity\"],\n        [\"strikethroughPosition\", \"strikethrough-position\"],\n        [\"strikethroughThickness\", \"strikethrough-thickness\"],\n        [\"strokeDasharray\", \"stroke-dasharray\"],\n        [\"strokeDashoffset\", \"stroke-dashoffset\"],\n        [\"strokeLinecap\", \"stroke-linecap\"],\n        [\"strokeLinejoin\", \"stroke-linejoin\"],\n        [\"strokeMiterlimit\", \"stroke-miterlimit\"],\n        [\"strokeOpacity\", \"stroke-opacity\"],\n        [\"strokeWidth\", \"stroke-width\"],\n        [\"textAnchor\", \"text-anchor\"],\n        [\"textDecoration\", \"text-decoration\"],\n        [\"textRendering\", \"text-rendering\"],\n        [\"transformOrigin\", \"transform-origin\"],\n        [\"underlinePosition\", \"underline-position\"],\n        [\"underlineThickness\", \"underline-thickness\"],\n        [\"unicodeBidi\", \"unicode-bidi\"],\n        [\"unicodeRange\", \"unicode-range\"],\n        [\"unitsPerEm\", \"units-per-em\"],\n        [\"vAlphabetic\", \"v-alphabetic\"],\n        [\"vHanging\", \"v-hanging\"],\n        [\"vIdeographic\", \"v-ideographic\"],\n        [\"vMathematical\", \"v-mathematical\"],\n        [\"vectorEffect\", \"vector-effect\"],\n        [\"vertAdvY\", \"vert-adv-y\"],\n        [\"vertOriginX\", \"vert-origin-x\"],\n        [\"vertOriginY\", \"vert-origin-y\"],\n        [\"wordSpacing\", \"word-spacing\"],\n        [\"writingMode\", \"writing-mode\"],\n        [\"xmlnsXlink\", \"xmlns:xlink\"],\n        [\"xHeight\", \"x-height\"]\n      ]),\n      hasReadOnlyValue = {\n        button: !0,\n        checkbox: !0,\n        image: !0,\n        hidden: !0,\n        radio: !0,\n        reset: !0,\n        submit: !0\n      },\n      ariaProperties = {\n        \"aria-current\": 0,\n        \"aria-description\": 0,\n        \"aria-details\": 0,\n        \"aria-disabled\": 0,\n        \"aria-hidden\": 0,\n        \"aria-invalid\": 0,\n        \"aria-keyshortcuts\": 0,\n        \"aria-label\": 0,\n        \"aria-roledescription\": 0,\n        \"aria-autocomplete\": 0,\n        \"aria-checked\": 0,\n        \"aria-expanded\": 0,\n        \"aria-haspopup\": 0,\n        \"aria-level\": 0,\n        \"aria-modal\": 0,\n        \"aria-multiline\": 0,\n        \"aria-multiselectable\": 0,\n        \"aria-orientation\": 0,\n        \"aria-placeholder\": 0,\n        \"aria-pressed\": 0,\n        \"aria-readonly\": 0,\n        \"aria-required\": 0,\n        \"aria-selected\": 0,\n        \"aria-sort\": 0,\n        \"aria-valuemax\": 0,\n        \"aria-valuemin\": 0,\n        \"aria-valuenow\": 0,\n        \"aria-valuetext\": 0,\n        \"aria-atomic\": 0,\n        \"aria-busy\": 0,\n        \"aria-live\": 0,\n        \"aria-relevant\": 0,\n        \"aria-dropeffect\": 0,\n        \"aria-grabbed\": 0,\n        \"aria-activedescendant\": 0,\n        \"aria-colcount\": 0,\n        \"aria-colindex\": 0,\n        \"aria-colspan\": 0,\n        \"aria-controls\": 0,\n        \"aria-describedby\": 0,\n        \"aria-errormessage\": 0,\n        \"aria-flowto\": 0,\n        \"aria-labelledby\": 0,\n        \"aria-owns\": 0,\n        \"aria-posinset\": 0,\n        \"aria-rowcount\": 0,\n        \"aria-rowindex\": 0,\n        \"aria-rowspan\": 0,\n        \"aria-setsize\": 0,\n        \"aria-braillelabel\": 0,\n        \"aria-brailleroledescription\": 0,\n        \"aria-colindextext\": 0,\n        \"aria-rowindextext\": 0\n      },\n      warnedProperties$1 = {},\n      rARIA$1 = RegExp(\n        \"^(aria)-[:A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040]*$\"\n      ),\n      rARIACamel$1 = RegExp(\n        \"^(aria)[A-Z][:A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040]*$\"\n      ),\n      didWarnValueNull = !1,\n      possibleStandardNames = {\n        accept: \"accept\",\n        acceptcharset: \"acceptCharset\",\n        \"accept-charset\": \"acceptCharset\",\n        accesskey: \"accessKey\",\n        action: \"action\",\n        allowfullscreen: \"allowFullScreen\",\n        alt: \"alt\",\n        as: \"as\",\n        async: \"async\",\n        autocapitalize: \"autoCapitalize\",\n        autocomplete: \"autoComplete\",\n        autocorrect: \"autoCorrect\",\n        autofocus: \"autoFocus\",\n        autoplay: \"autoPlay\",\n        autosave: \"autoSave\",\n        capture: \"capture\",\n        cellpadding: \"cellPadding\",\n        cellspacing: \"cellSpacing\",\n        challenge: \"challenge\",\n        charset: \"charSet\",\n        checked: \"checked\",\n        children: \"children\",\n        cite: \"cite\",\n        class: \"className\",\n        classid: \"classID\",\n        classname: \"className\",\n        cols: \"cols\",\n        colspan: \"colSpan\",\n        content: \"content\",\n        contenteditable: \"contentEditable\",\n        contextmenu: \"contextMenu\",\n        controls: \"controls\",\n        controlslist: \"controlsList\",\n        coords: \"coords\",\n        crossorigin: \"crossOrigin\",\n        dangerouslysetinnerhtml: \"dangerouslySetInnerHTML\",\n        data: \"data\",\n        datetime: \"dateTime\",\n        default: \"default\",\n        defaultchecked: \"defaultChecked\",\n        defaultvalue: \"defaultValue\",\n        defer: \"defer\",\n        dir: \"dir\",\n        disabled: \"disabled\",\n        disablepictureinpicture: \"disablePictureInPicture\",\n        disableremoteplayback: \"disableRemotePlayback\",\n        download: \"download\",\n        draggable: \"draggable\",\n        enctype: \"encType\",\n        enterkeyhint: \"enterKeyHint\",\n        fetchpriority: \"fetchPriority\",\n        for: \"htmlFor\",\n        form: \"form\",\n        formmethod: \"formMethod\",\n        formaction: \"formAction\",\n        formenctype: \"formEncType\",\n        formnovalidate: \"formNoValidate\",\n        formtarget: \"formTarget\",\n        frameborder: \"frameBorder\",\n        headers: \"headers\",\n        height: \"height\",\n        hidden: \"hidden\",\n        high: \"high\",\n        href: \"href\",\n        hreflang: \"hrefLang\",\n        htmlfor: \"htmlFor\",\n        httpequiv: \"httpEquiv\",\n        \"http-equiv\": \"httpEquiv\",\n        icon: \"icon\",\n        id: \"id\",\n        imagesizes: \"imageSizes\",\n        imagesrcset: \"imageSrcSet\",\n        inert: \"inert\",\n        innerhtml: \"innerHTML\",\n        inputmode: \"inputMode\",\n        integrity: \"integrity\",\n        is: \"is\",\n        itemid: \"itemID\",\n        itemprop: \"itemProp\",\n        itemref: \"itemRef\",\n        itemscope: \"itemScope\",\n        itemtype: \"itemType\",\n        keyparams: \"keyParams\",\n        keytype: \"keyType\",\n        kind: \"kind\",\n        label: \"label\",\n        lang: \"lang\",\n        list: \"list\",\n        loop: \"loop\",\n        low: \"low\",\n        manifest: \"manifest\",\n        marginwidth: \"marginWidth\",\n        marginheight: \"marginHeight\",\n        max: \"max\",\n        maxlength: \"maxLength\",\n        media: \"media\",\n        mediagroup: \"mediaGroup\",\n        method: \"method\",\n        min: \"min\",\n        minlength: \"minLength\",\n        multiple: \"multiple\",\n        muted: \"muted\",\n        name: \"name\",\n        nomodule: \"noModule\",\n        nonce: \"nonce\",\n        novalidate: \"noValidate\",\n        open: \"open\",\n        optimum: \"optimum\",\n        pattern: \"pattern\",\n        placeholder: \"placeholder\",\n        playsinline: \"playsInline\",\n        poster: \"poster\",\n        preload: \"preload\",\n        profile: \"profile\",\n        radiogroup: \"radioGroup\",\n        readonly: \"readOnly\",\n        referrerpolicy: \"referrerPolicy\",\n        rel: \"rel\",\n        required: \"required\",\n        reversed: \"reversed\",\n        role: \"role\",\n        rows: \"rows\",\n        rowspan: \"rowSpan\",\n        sandbox: \"sandbox\",\n        scope: \"scope\",\n        scoped: \"scoped\",\n        scrolling: \"scrolling\",\n        seamless: \"seamless\",\n        selected: \"selected\",\n        shape: \"shape\",\n        size: \"size\",\n        sizes: \"sizes\",\n        span: \"span\",\n        spellcheck: \"spellCheck\",\n        src: \"src\",\n        srcdoc: \"srcDoc\",\n        srclang: \"srcLang\",\n        srcset: \"srcSet\",\n        start: \"start\",\n        step: \"step\",\n        style: \"style\",\n        summary: \"summary\",\n        tabindex: \"tabIndex\",\n        target: \"target\",\n        title: \"title\",\n        type: \"type\",\n        usemap: \"useMap\",\n        value: \"value\",\n        width: \"width\",\n        wmode: \"wmode\",\n        wrap: \"wrap\",\n        about: \"about\",\n        accentheight: \"accentHeight\",\n        \"accent-height\": \"accentHeight\",\n        accumulate: \"accumulate\",\n        additive: \"additive\",\n        alignmentbaseline: \"alignmentBaseline\",\n        \"alignment-baseline\": \"alignmentBaseline\",\n        allowreorder: \"allowReorder\",\n        alphabetic: \"alphabetic\",\n        amplitude: \"amplitude\",\n        arabicform: \"arabicForm\",\n        \"arabic-form\": \"arabicForm\",\n        ascent: \"ascent\",\n        attributename: \"attributeName\",\n        attributetype: \"attributeType\",\n        autoreverse: \"autoReverse\",\n        azimuth: \"azimuth\",\n        basefrequency: \"baseFrequency\",\n        baselineshift: \"baselineShift\",\n        \"baseline-shift\": \"baselineShift\",\n        baseprofile: \"baseProfile\",\n        bbox: \"bbox\",\n        begin: \"begin\",\n        bias: \"bias\",\n        by: \"by\",\n        calcmode: \"calcMode\",\n        capheight: \"capHeight\",\n        \"cap-height\": \"capHeight\",\n        clip: \"clip\",\n        clippath: \"clipPath\",\n        \"clip-path\": \"clipPath\",\n        clippathunits: \"clipPathUnits\",\n        cliprule: \"clipRule\",\n        \"clip-rule\": \"clipRule\",\n        color: \"color\",\n        colorinterpolation: \"colorInterpolation\",\n        \"color-interpolation\": \"colorInterpolation\",\n        colorinterpolationfilters: \"colorInterpolationFilters\",\n        \"color-interpolation-filters\": \"colorInterpolationFilters\",\n        colorprofile: \"colorProfile\",\n        \"color-profile\": \"colorProfile\",\n        colorrendering: \"colorRendering\",\n        \"color-rendering\": \"colorRendering\",\n        contentscripttype: \"contentScriptType\",\n        contentstyletype: \"contentStyleType\",\n        cursor: \"cursor\",\n        cx: \"cx\",\n        cy: \"cy\",\n        d: \"d\",\n        datatype: \"datatype\",\n        decelerate: \"decelerate\",\n        descent: \"descent\",\n        diffuseconstant: \"diffuseConstant\",\n        direction: \"direction\",\n        display: \"display\",\n        divisor: \"divisor\",\n        dominantbaseline: \"dominantBaseline\",\n        \"dominant-baseline\": \"dominantBaseline\",\n        dur: \"dur\",\n        dx: \"dx\",\n        dy: \"dy\",\n        edgemode: \"edgeMode\",\n        elevation: \"elevation\",\n        enablebackground: \"enableBackground\",\n        \"enable-background\": \"enableBackground\",\n        end: \"end\",\n        exponent: \"exponent\",\n        externalresourcesrequired: \"externalResourcesRequired\",\n        fill: \"fill\",\n        fillopacity: \"fillOpacity\",\n        \"fill-opacity\": \"fillOpacity\",\n        fillrule: \"fillRule\",\n        \"fill-rule\": \"fillRule\",\n        filter: \"filter\",\n        filterres: \"filterRes\",\n        filterunits: \"filterUnits\",\n        floodopacity: \"floodOpacity\",\n        \"flood-opacity\": \"floodOpacity\",\n        floodcolor: \"floodColor\",\n        \"flood-color\": \"floodColor\",\n        focusable: \"focusable\",\n        fontfamily: \"fontFamily\",\n        \"font-family\": \"fontFamily\",\n        fontsize: \"fontSize\",\n        \"font-size\": \"fontSize\",\n        fontsizeadjust: \"fontSizeAdjust\",\n        \"font-size-adjust\": \"fontSizeAdjust\",\n        fontstretch: \"fontStretch\",\n        \"font-stretch\": \"fontStretch\",\n        fontstyle: \"fontStyle\",\n        \"font-style\": \"fontStyle\",\n        fontvariant: \"fontVariant\",\n        \"font-variant\": \"fontVariant\",\n        fontweight: \"fontWeight\",\n        \"font-weight\": \"fontWeight\",\n        format: \"format\",\n        from: \"from\",\n        fx: \"fx\",\n        fy: \"fy\",\n        g1: \"g1\",\n        g2: \"g2\",\n        glyphname: \"glyphName\",\n        \"glyph-name\": \"glyphName\",\n        glyphorientationhorizontal: \"glyphOrientationHorizontal\",\n        \"glyph-orientation-horizontal\": \"glyphOrientationHorizontal\",\n        glyphorientationvertical: \"glyphOrientationVertical\",\n        \"glyph-orientation-vertical\": \"glyphOrientationVertical\",\n        glyphref: \"glyphRef\",\n        gradienttransform: \"gradientTransform\",\n        gradientunits: \"gradientUnits\",\n        hanging: \"hanging\",\n        horizadvx: \"horizAdvX\",\n        \"horiz-adv-x\": \"horizAdvX\",\n        horizoriginx: \"horizOriginX\",\n        \"horiz-origin-x\": \"horizOriginX\",\n        ideographic: \"ideographic\",\n        imagerendering: \"imageRendering\",\n        \"image-rendering\": \"imageRendering\",\n        in2: \"in2\",\n        in: \"in\",\n        inlist: \"inlist\",\n        intercept: \"intercept\",\n        k1: \"k1\",\n        k2: \"k2\",\n        k3: \"k3\",\n        k4: \"k4\",\n        k: \"k\",\n        kernelmatrix: \"kernelMatrix\",\n        kernelunitlength: \"kernelUnitLength\",\n        kerning: \"kerning\",\n        keypoints: \"keyPoints\",\n        keysplines: \"keySplines\",\n        keytimes: \"keyTimes\",\n        lengthadjust: \"lengthAdjust\",\n        letterspacing: \"letterSpacing\",\n        \"letter-spacing\": \"letterSpacing\",\n        lightingcolor: \"lightingColor\",\n        \"lighting-color\": \"lightingColor\",\n        limitingconeangle: \"limitingConeAngle\",\n        local: \"local\",\n        markerend: \"markerEnd\",\n        \"marker-end\": \"markerEnd\",\n        markerheight: \"markerHeight\",\n        markermid: \"markerMid\",\n        \"marker-mid\": \"markerMid\",\n        markerstart: \"markerStart\",\n        \"marker-start\": \"markerStart\",\n        markerunits: \"markerUnits\",\n        markerwidth: \"markerWidth\",\n        mask: \"mask\",\n        maskcontentunits: \"maskContentUnits\",\n        maskunits: \"maskUnits\",\n        mathematical: \"mathematical\",\n        mode: \"mode\",\n        numoctaves: \"numOctaves\",\n        offset: \"offset\",\n        opacity: \"opacity\",\n        operator: \"operator\",\n        order: \"order\",\n        orient: \"orient\",\n        orientation: \"orientation\",\n        origin: \"origin\",\n        overflow: \"overflow\",\n        overlineposition: \"overlinePosition\",\n        \"overline-position\": \"overlinePosition\",\n        overlinethickness: \"overlineThickness\",\n        \"overline-thickness\": \"overlineThickness\",\n        paintorder: \"paintOrder\",\n        \"paint-order\": \"paintOrder\",\n        panose1: \"panose1\",\n        \"panose-1\": \"panose1\",\n        pathlength: \"pathLength\",\n        patterncontentunits: \"patternContentUnits\",\n        patterntransform: \"patternTransform\",\n        patternunits: \"patternUnits\",\n        pointerevents: \"pointerEvents\",\n        \"pointer-events\": \"pointerEvents\",\n        points: \"points\",\n        pointsatx: \"pointsAtX\",\n        pointsaty: \"pointsAtY\",\n        pointsatz: \"pointsAtZ\",\n        popover: \"popover\",\n        popovertarget: \"popoverTarget\",\n        popovertargetaction: \"popoverTargetAction\",\n        prefix: \"prefix\",\n        preservealpha: \"preserveAlpha\",\n        preserveaspectratio: \"preserveAspectRatio\",\n        primitiveunits: \"primitiveUnits\",\n        property: \"property\",\n        r: \"r\",\n        radius: \"radius\",\n        refx: \"refX\",\n        refy: \"refY\",\n        renderingintent: \"renderingIntent\",\n        \"rendering-intent\": \"renderingIntent\",\n        repeatcount: \"repeatCount\",\n        repeatdur: \"repeatDur\",\n        requiredextensions: \"requiredExtensions\",\n        requiredfeatures: \"requiredFeatures\",\n        resource: \"resource\",\n        restart: \"restart\",\n        result: \"result\",\n        results: \"results\",\n        rotate: \"rotate\",\n        rx: \"rx\",\n        ry: \"ry\",\n        scale: \"scale\",\n        security: \"security\",\n        seed: \"seed\",\n        shaperendering: \"shapeRendering\",\n        \"shape-rendering\": \"shapeRendering\",\n        slope: \"slope\",\n        spacing: \"spacing\",\n        specularconstant: \"specularConstant\",\n        specularexponent: \"specularExponent\",\n        speed: \"speed\",\n        spreadmethod: \"spreadMethod\",\n        startoffset: \"startOffset\",\n        stddeviation: \"stdDeviation\",\n        stemh: \"stemh\",\n        stemv: \"stemv\",\n        stitchtiles: \"stitchTiles\",\n        stopcolor: \"stopColor\",\n        \"stop-color\": \"stopColor\",\n        stopopacity: \"stopOpacity\",\n        \"stop-opacity\": \"stopOpacity\",\n        strikethroughposition: \"strikethroughPosition\",\n        \"strikethrough-position\": \"strikethroughPosition\",\n        strikethroughthickness: \"strikethroughThickness\",\n        \"strikethrough-thickness\": \"strikethroughThickness\",\n        string: \"string\",\n        stroke: \"stroke\",\n        strokedasharray: \"strokeDasharray\",\n        \"stroke-dasharray\": \"strokeDasharray\",\n        strokedashoffset: \"strokeDashoffset\",\n        \"stroke-dashoffset\": \"strokeDashoffset\",\n        strokelinecap: \"strokeLinecap\",\n        \"stroke-linecap\": \"strokeLinecap\",\n        strokelinejoin: \"strokeLinejoin\",\n        \"stroke-linejoin\": \"strokeLinejoin\",\n        strokemiterlimit: \"strokeMiterlimit\",\n        \"stroke-miterlimit\": \"strokeMiterlimit\",\n        strokewidth: \"strokeWidth\",\n        \"stroke-width\": \"strokeWidth\",\n        strokeopacity: \"strokeOpacity\",\n        \"stroke-opacity\": \"strokeOpacity\",\n        suppresscontenteditablewarning: \"suppressContentEditableWarning\",\n        suppresshydrationwarning: \"suppressHydrationWarning\",\n        surfacescale: \"surfaceScale\",\n        systemlanguage: \"systemLanguage\",\n        tablevalues: \"tableValues\",\n        targetx: \"targetX\",\n        targety: \"targetY\",\n        textanchor: \"textAnchor\",\n        \"text-anchor\": \"textAnchor\",\n        textdecoration: \"textDecoration\",\n        \"text-decoration\": \"textDecoration\",\n        textlength: \"textLength\",\n        textrendering: \"textRendering\",\n        \"text-rendering\": \"textRendering\",\n        to: \"to\",\n        transform: \"transform\",\n        transformorigin: \"transformOrigin\",\n        \"transform-origin\": \"transformOrigin\",\n        typeof: \"typeof\",\n        u1: \"u1\",\n        u2: \"u2\",\n        underlineposition: \"underlinePosition\",\n        \"underline-position\": \"underlinePosition\",\n        underlinethickness: \"underlineThickness\",\n        \"underline-thickness\": \"underlineThickness\",\n        unicode: \"unicode\",\n        unicodebidi: \"unicodeBidi\",\n        \"unicode-bidi\": \"unicodeBidi\",\n        unicoderange: \"unicodeRange\",\n        \"unicode-range\": \"unicodeRange\",\n        unitsperem: \"unitsPerEm\",\n        \"units-per-em\": \"unitsPerEm\",\n        unselectable: \"unselectable\",\n        valphabetic: \"vAlphabetic\",\n        \"v-alphabetic\": \"vAlphabetic\",\n        values: \"values\",\n        vectoreffect: \"vectorEffect\",\n        \"vector-effect\": \"vectorEffect\",\n        version: \"version\",\n        vertadvy: \"vertAdvY\",\n        \"vert-adv-y\": \"vertAdvY\",\n        vertoriginx: \"vertOriginX\",\n        \"vert-origin-x\": \"vertOriginX\",\n        vertoriginy: \"vertOriginY\",\n        \"vert-origin-y\": \"vertOriginY\",\n        vhanging: \"vHanging\",\n        \"v-hanging\": \"vHanging\",\n        videographic: \"vIdeographic\",\n        \"v-ideographic\": \"vIdeographic\",\n        viewbox: \"viewBox\",\n        viewtarget: \"viewTarget\",\n        visibility: \"visibility\",\n        vmathematical: \"vMathematical\",\n        \"v-mathematical\": \"vMathematical\",\n        vocab: \"vocab\",\n        widths: \"widths\",\n        wordspacing: \"wordSpacing\",\n        \"word-spacing\": \"wordSpacing\",\n        writingmode: \"writingMode\",\n        \"writing-mode\": \"writingMode\",\n        x1: \"x1\",\n        x2: \"x2\",\n        x: \"x\",\n        xchannelselector: \"xChannelSelector\",\n        xheight: \"xHeight\",\n        \"x-height\": \"xHeight\",\n        xlinkactuate: \"xlinkActuate\",\n        \"xlink:actuate\": \"xlinkActuate\",\n        xlinkarcrole: \"xlinkArcrole\",\n        \"xlink:arcrole\": \"xlinkArcrole\",\n        xlinkhref: \"xlinkHref\",\n        \"xlink:href\": \"xlinkHref\",\n        xlinkrole: \"xlinkRole\",\n        \"xlink:role\": \"xlinkRole\",\n        xlinkshow: \"xlinkShow\",\n        \"xlink:show\": \"xlinkShow\",\n        xlinktitle: \"xlinkTitle\",\n        \"xlink:title\": \"xlinkTitle\",\n        xlinktype: \"xlinkType\",\n        \"xlink:type\": \"xlinkType\",\n        xmlbase: \"xmlBase\",\n        \"xml:base\": \"xmlBase\",\n        xmllang: \"xmlLang\",\n        \"xml:lang\": \"xmlLang\",\n        xmlns: \"xmlns\",\n        \"xml:space\": \"xmlSpace\",\n        xmlnsxlink: \"xmlnsXlink\",\n        \"xmlns:xlink\": \"xmlnsXlink\",\n        xmlspace: \"xmlSpace\",\n        y1: \"y1\",\n        y2: \"y2\",\n        y: \"y\",\n        ychannelselector: \"yChannelSelector\",\n        z: \"z\",\n        zoomandpan: \"zoomAndPan\"\n      },\n      warnedProperties = {},\n      EVENT_NAME_REGEX = /^on./,\n      INVALID_EVENT_NAME_REGEX = /^on[^A-Z]/,\n      rARIA = RegExp(\n        \"^(aria)-[:A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040]*$\"\n      ),\n      rARIACamel = RegExp(\n        \"^(aria)[A-Z][:A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040]*$\"\n      ),\n      badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/,\n      msPattern$1 = /^-ms-/,\n      hyphenPattern = /-(.)/g,\n      badStyleValueWithSemicolonPattern = /;\\s*$/,\n      warnedStyleNames = {},\n      warnedStyleValues = {},\n      warnedForNaNValue = !1,\n      warnedForInfinityValue = !1,\n      matchHtmlRegExp = /[\"'&<>]/,\n      uppercasePattern = /([A-Z])/g,\n      msPattern = /^ms-/,\n      isJavaScriptProtocol =\n        /^[\\u0000-\\u001F ]*j[\\r\\n\\t]*a[\\r\\n\\t]*v[\\r\\n\\t]*a[\\r\\n\\t]*s[\\r\\n\\t]*c[\\r\\n\\t]*r[\\r\\n\\t]*i[\\r\\n\\t]*p[\\r\\n\\t]*t[\\r\\n\\t]*:/i,\n      ReactSharedInternals =\n        React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,\n      ReactDOMSharedInternals =\n        ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,\n      NotPending = Object.freeze({\n        pending: !1,\n        data: null,\n        method: null,\n        action: null\n      }),\n      previousDispatcher = ReactDOMSharedInternals.d;\n    ReactDOMSharedInternals.d = {\n      f: previousDispatcher.f,\n      r: previousDispatcher.r,\n      D: function (href) {\n        var request = currentRequest ? currentRequest : null;\n        if (request) {\n          var resumableState = request.resumableState,\n            renderState = request.renderState;\n          if (\"string\" === typeof href && href) {\n            if (!resumableState.dnsResources.hasOwnProperty(href)) {\n              resumableState.dnsResources[href] = EXISTS;\n              resumableState = renderState.headers;\n              var header, JSCompiler_temp;\n              if (\n                (JSCompiler_temp =\n                  resumableState && 0 < resumableState.remainingCapacity)\n              )\n                JSCompiler_temp =\n                  ((header =\n                    \"<\" +\n                    escapeHrefForLinkHeaderURLContext(href) +\n                    \">; rel=dns-prefetch\"),\n                  0 <= (resumableState.remainingCapacity -= header.length + 2));\n              JSCompiler_temp\n                ? ((renderState.resets.dns[href] = EXISTS),\n                  resumableState.preconnects &&\n                    (resumableState.preconnects += \", \"),\n                  (resumableState.preconnects += header))\n                : ((header = []),\n                  pushLinkImpl(header, { href: href, rel: \"dns-prefetch\" }),\n                  renderState.preconnects.add(header));\n            }\n            enqueueFlush(request);\n          }\n        } else previousDispatcher.D(href);\n      },\n      C: function (href, crossOrigin) {\n        var request = currentRequest ? currentRequest : null;\n        if (request) {\n          var resumableState = request.resumableState,\n            renderState = request.renderState;\n          if (\"string\" === typeof href && href) {\n            var bucket =\n              \"use-credentials\" === crossOrigin\n                ? \"credentials\"\n                : \"string\" === typeof crossOrigin\n                  ? \"anonymous\"\n                  : \"default\";\n            if (!resumableState.connectResources[bucket].hasOwnProperty(href)) {\n              resumableState.connectResources[bucket][href] = EXISTS;\n              resumableState = renderState.headers;\n              var header, JSCompiler_temp;\n              if (\n                (JSCompiler_temp =\n                  resumableState && 0 < resumableState.remainingCapacity)\n              ) {\n                JSCompiler_temp =\n                  \"<\" +\n                  escapeHrefForLinkHeaderURLContext(href) +\n                  \">; rel=preconnect\";\n                if (\"string\" === typeof crossOrigin) {\n                  var escapedCrossOrigin =\n                    escapeStringForLinkHeaderQuotedParamValueContext(\n                      crossOrigin,\n                      \"crossOrigin\"\n                    );\n                  JSCompiler_temp +=\n                    '; crossorigin=\"' + escapedCrossOrigin + '\"';\n                }\n                JSCompiler_temp =\n                  ((header = JSCompiler_temp),\n                  0 <= (resumableState.remainingCapacity -= header.length + 2));\n              }\n              JSCompiler_temp\n                ? ((renderState.resets.connect[bucket][href] = EXISTS),\n                  resumableState.preconnects &&\n                    (resumableState.preconnects += \", \"),\n                  (resumableState.preconnects += header))\n                : ((bucket = []),\n                  pushLinkImpl(bucket, {\n                    rel: \"preconnect\",\n                    href: href,\n                    crossOrigin: crossOrigin\n                  }),\n                  renderState.preconnects.add(bucket));\n            }\n            enqueueFlush(request);\n          }\n        } else previousDispatcher.C(href, crossOrigin);\n      },\n      L: function (href, as, options) {\n        var request = currentRequest ? currentRequest : null;\n        if (request) {\n          var resumableState = request.resumableState,\n            renderState = request.renderState;\n          if (as && href) {\n            switch (as) {\n              case \"image\":\n                if (options) {\n                  var imageSrcSet = options.imageSrcSet;\n                  var imageSizes = options.imageSizes;\n                  var fetchPriority = options.fetchPriority;\n                }\n                var key = imageSrcSet\n                  ? imageSrcSet + \"\\n\" + (imageSizes || \"\")\n                  : href;\n                if (resumableState.imageResources.hasOwnProperty(key)) return;\n                resumableState.imageResources[key] = PRELOAD_NO_CREDS;\n                resumableState = renderState.headers;\n                var header;\n                resumableState &&\n                0 < resumableState.remainingCapacity &&\n                \"string\" !== typeof imageSrcSet &&\n                \"high\" === fetchPriority &&\n                ((header = getPreloadAsHeader(href, as, options)),\n                0 <= (resumableState.remainingCapacity -= header.length + 2))\n                  ? ((renderState.resets.image[key] = PRELOAD_NO_CREDS),\n                    resumableState.highImagePreloads &&\n                      (resumableState.highImagePreloads += \", \"),\n                    (resumableState.highImagePreloads += header))\n                  : ((resumableState = []),\n                    pushLinkImpl(\n                      resumableState,\n                      assign(\n                        {\n                          rel: \"preload\",\n                          href: imageSrcSet ? void 0 : href,\n                          as: as\n                        },\n                        options\n                      )\n                    ),\n                    \"high\" === fetchPriority\n                      ? renderState.highImagePreloads.add(resumableState)\n                      : (renderState.bulkPreloads.add(resumableState),\n                        renderState.preloads.images.set(key, resumableState)));\n                break;\n              case \"style\":\n                if (resumableState.styleResources.hasOwnProperty(href)) return;\n                imageSrcSet = [];\n                pushLinkImpl(\n                  imageSrcSet,\n                  assign({ rel: \"preload\", href: href, as: as }, options)\n                );\n                resumableState.styleResources[href] =\n                  !options ||\n                  (\"string\" !== typeof options.crossOrigin &&\n                    \"string\" !== typeof options.integrity)\n                    ? PRELOAD_NO_CREDS\n                    : [options.crossOrigin, options.integrity];\n                renderState.preloads.stylesheets.set(href, imageSrcSet);\n                renderState.bulkPreloads.add(imageSrcSet);\n                break;\n              case \"script\":\n                if (resumableState.scriptResources.hasOwnProperty(href)) return;\n                imageSrcSet = [];\n                renderState.preloads.scripts.set(href, imageSrcSet);\n                renderState.bulkPreloads.add(imageSrcSet);\n                pushLinkImpl(\n                  imageSrcSet,\n                  assign({ rel: \"preload\", href: href, as: as }, options)\n                );\n                resumableState.scriptResources[href] =\n                  !options ||\n                  (\"string\" !== typeof options.crossOrigin &&\n                    \"string\" !== typeof options.integrity)\n                    ? PRELOAD_NO_CREDS\n                    : [options.crossOrigin, options.integrity];\n                break;\n              default:\n                if (resumableState.unknownResources.hasOwnProperty(as)) {\n                  if (\n                    ((imageSrcSet = resumableState.unknownResources[as]),\n                    imageSrcSet.hasOwnProperty(href))\n                  )\n                    return;\n                } else\n                  (imageSrcSet = {}),\n                    (resumableState.unknownResources[as] = imageSrcSet);\n                imageSrcSet[href] = PRELOAD_NO_CREDS;\n                if (\n                  (resumableState = renderState.headers) &&\n                  0 < resumableState.remainingCapacity &&\n                  \"font\" === as &&\n                  ((key = getPreloadAsHeader(href, as, options)),\n                  0 <= (resumableState.remainingCapacity -= key.length + 2))\n                )\n                  (renderState.resets.font[href] = PRELOAD_NO_CREDS),\n                    resumableState.fontPreloads &&\n                      (resumableState.fontPreloads += \", \"),\n                    (resumableState.fontPreloads += key);\n                else\n                  switch (\n                    ((resumableState = []),\n                    (href = assign(\n                      { rel: \"preload\", href: href, as: as },\n                      options\n                    )),\n                    pushLinkImpl(resumableState, href),\n                    as)\n                  ) {\n                    case \"font\":\n                      renderState.fontPreloads.add(resumableState);\n                      break;\n                    default:\n                      renderState.bulkPreloads.add(resumableState);\n                  }\n            }\n            enqueueFlush(request);\n          }\n        } else previousDispatcher.L(href, as, options);\n      },\n      m: function (href, options) {\n        var request = currentRequest ? currentRequest : null;\n        if (request) {\n          var resumableState = request.resumableState,\n            renderState = request.renderState;\n          if (href) {\n            var as =\n              options && \"string\" === typeof options.as ? options.as : \"script\";\n            switch (as) {\n              case \"script\":\n                if (resumableState.moduleScriptResources.hasOwnProperty(href))\n                  return;\n                as = [];\n                resumableState.moduleScriptResources[href] =\n                  !options ||\n                  (\"string\" !== typeof options.crossOrigin &&\n                    \"string\" !== typeof options.integrity)\n                    ? PRELOAD_NO_CREDS\n                    : [options.crossOrigin, options.integrity];\n                renderState.preloads.moduleScripts.set(href, as);\n                break;\n              default:\n                if (resumableState.moduleUnknownResources.hasOwnProperty(as)) {\n                  var resources = resumableState.unknownResources[as];\n                  if (resources.hasOwnProperty(href)) return;\n                } else\n                  (resources = {}),\n                    (resumableState.moduleUnknownResources[as] = resources);\n                as = [];\n                resources[href] = PRELOAD_NO_CREDS;\n            }\n            pushLinkImpl(\n              as,\n              assign({ rel: \"modulepreload\", href: href }, options)\n            );\n            renderState.bulkPreloads.add(as);\n            enqueueFlush(request);\n          }\n        } else previousDispatcher.m(href, options);\n      },\n      X: function (src, options) {\n        var request = currentRequest ? currentRequest : null;\n        if (request) {\n          var resumableState = request.resumableState,\n            renderState = request.renderState;\n          if (src) {\n            var resourceState = resumableState.scriptResources.hasOwnProperty(\n              src\n            )\n              ? resumableState.scriptResources[src]\n              : void 0;\n            resourceState !== EXISTS &&\n              ((resumableState.scriptResources[src] = EXISTS),\n              (options = assign({ src: src, async: !0 }, options)),\n              resourceState &&\n                (2 === resourceState.length &&\n                  adoptPreloadCredentials(options, resourceState),\n                (src = renderState.preloads.scripts.get(src))) &&\n                (src.length = 0),\n              (src = []),\n              renderState.scripts.add(src),\n              pushScriptImpl(src, options),\n              enqueueFlush(request));\n          }\n        } else previousDispatcher.X(src, options);\n      },\n      S: function (href, precedence, options) {\n        var request = currentRequest ? currentRequest : null;\n        if (request) {\n          var resumableState = request.resumableState,\n            renderState = request.renderState;\n          if (href) {\n            precedence = precedence || \"default\";\n            var styleQueue = renderState.styles.get(precedence),\n              resourceState = resumableState.styleResources.hasOwnProperty(href)\n                ? resumableState.styleResources[href]\n                : void 0;\n            resourceState !== EXISTS &&\n              ((resumableState.styleResources[href] = EXISTS),\n              styleQueue ||\n                ((styleQueue = {\n                  precedence: escapeTextForBrowser(precedence),\n                  rules: [],\n                  hrefs: [],\n                  sheets: new Map()\n                }),\n                renderState.styles.set(precedence, styleQueue)),\n              (precedence = {\n                state: PENDING$1,\n                props: assign(\n                  {\n                    rel: \"stylesheet\",\n                    href: href,\n                    \"data-precedence\": precedence\n                  },\n                  options\n                )\n              }),\n              resourceState &&\n                (2 === resourceState.length &&\n                  adoptPreloadCredentials(precedence.props, resourceState),\n                (renderState = renderState.preloads.stylesheets.get(href)) &&\n                0 < renderState.length\n                  ? (renderState.length = 0)\n                  : (precedence.state = PRELOADED)),\n              styleQueue.sheets.set(href, precedence),\n              enqueueFlush(request));\n          }\n        } else previousDispatcher.S(href, precedence, options);\n      },\n      M: function (src, options) {\n        var request = currentRequest ? currentRequest : null;\n        if (request) {\n          var resumableState = request.resumableState,\n            renderState = request.renderState;\n          if (src) {\n            var resourceState =\n              resumableState.moduleScriptResources.hasOwnProperty(src)\n                ? resumableState.moduleScriptResources[src]\n                : void 0;\n            resourceState !== EXISTS &&\n              ((resumableState.moduleScriptResources[src] = EXISTS),\n              (options = assign(\n                { src: src, type: \"module\", async: !0 },\n                options\n              )),\n              resourceState &&\n                (2 === resourceState.length &&\n                  adoptPreloadCredentials(options, resourceState),\n                (src = renderState.preloads.moduleScripts.get(src))) &&\n                (src.length = 0),\n              (src = []),\n              renderState.scripts.add(src),\n              pushScriptImpl(src, options),\n              enqueueFlush(request));\n          }\n        } else previousDispatcher.M(src, options);\n      }\n    };\n    var NothingSent = 0,\n      SentCompleteSegmentFunction = 1,\n      SentCompleteBoundaryFunction = 2,\n      SentClientRenderFunction = 4,\n      SentStyleInsertionFunction = 8,\n      SentCompletedShellId = 32,\n      SentMarkShellTime = 64,\n      EXISTS = null,\n      PRELOAD_NO_CREDS = [];\n    Object.freeze(PRELOAD_NO_CREDS);\n    var currentlyFlushingRenderState = null,\n      endInlineScript = \"\\x3c/script>\",\n      scriptRegex = /(<\\/|<)(s)(cript)/gi;\n    var didWarnForNewBooleanPropsWithEmptyValue = {};\n    var ROOT_HTML_MODE = 0,\n      HTML_HTML_MODE = 1,\n      HTML_MODE = 2,\n      HTML_HEAD_MODE = 3,\n      SVG_MODE = 4,\n      MATHML_MODE = 5,\n      HTML_TABLE_MODE = 6,\n      HTML_TABLE_BODY_MODE = 7,\n      HTML_TABLE_ROW_MODE = 8,\n      HTML_COLGROUP_MODE = 9,\n      styleNameCache = new Map(),\n      styleAttributeStart = ' style=\"',\n      styleAssign = \":\",\n      styleSeparator = \";\",\n      attributeSeparator = \" \",\n      attributeAssign = '=\"',\n      attributeEnd = '\"',\n      attributeEmptyString = '=\"\"',\n      actionJavaScriptURL = escapeTextForBrowser(\n        \"javascript:throw new Error('React form unexpectedly submitted.')\"\n      ),\n      endOfStartTag = \">\",\n      endOfStartTagSelfClosing = \"/>\",\n      didWarnDefaultInputValue = !1,\n      didWarnDefaultChecked = !1,\n      didWarnDefaultSelectValue = !1,\n      didWarnDefaultTextareaValue = !1,\n      didWarnInvalidOptionChildren = !1,\n      didWarnInvalidOptionInnerHTML = !1,\n      didWarnSelectedSetOnOption = !1,\n      didWarnFormActionType = !1,\n      didWarnFormActionName = !1,\n      didWarnFormActionTarget = !1,\n      didWarnFormActionMethod = !1,\n      formReplayingRuntimeScript =\n        'addEventListener(\"submit\",function(a){if(!a.defaultPrevented){var c=a.target,d=a.submitter,e=c.action,b=d;if(d){var f=d.getAttribute(\"formAction\");null!=f&&(e=f,b=null)}\"javascript:throw new Error(\\'React form unexpectedly submitted.\\')\"===e&&(a.preventDefault(),b?(a=document.createElement(\"input\"),a.name=b.name,a.value=b.value,b.parentNode.insertBefore(a,b),b=new FormData(c),a.parentNode.removeChild(a)):b=new FormData(c),a=c.ownerDocument||c,(a.$$reactFormReplay=a.$$reactFormReplay||[]).push(c,d,b))}});',\n      styleRegex = /(<\\/|<)(s)(tyle)/gi,\n      leadingNewline = \"\\n\",\n      VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\\.\\-\\d]*$/,\n      validatedTagCache = new Map(),\n      endTagCache = new Map(),\n      shellTimeRuntimeScript =\n        \"requestAnimationFrame(function(){$RT=performance.now()});\",\n      placeholder1 = '<template id=\"',\n      placeholder2 = '\"></template>',\n      startCompletedSuspenseBoundary = \"\\x3c!--$--\\x3e\",\n      startPendingSuspenseBoundary1 = '\\x3c!--$?--\\x3e<template id=\"',\n      startPendingSuspenseBoundary2 = '\"></template>',\n      startClientRenderedSuspenseBoundary = \"\\x3c!--$!--\\x3e\",\n      endSuspenseBoundary = \"\\x3c!--/$--\\x3e\",\n      clientRenderedSuspenseBoundaryError1 = \"<template\",\n      clientRenderedSuspenseBoundaryErrorAttrInterstitial = '\"',\n      clientRenderedSuspenseBoundaryError1A = ' data-dgst=\"',\n      clientRenderedSuspenseBoundaryError1B = ' data-msg=\"',\n      clientRenderedSuspenseBoundaryError1C = ' data-stck=\"',\n      clientRenderedSuspenseBoundaryError1D = ' data-cstck=\"',\n      clientRenderedSuspenseBoundaryError2 = \"></template>\",\n      startSegmentHTML = '<div hidden id=\"',\n      startSegmentHTML2 = '\">',\n      endSegmentHTML = \"</div>\",\n      startSegmentSVG = '<svg aria-hidden=\"true\" style=\"display:none\" id=\"',\n      startSegmentSVG2 = '\">',\n      endSegmentSVG = \"</svg>\",\n      startSegmentMathML = '<math aria-hidden=\"true\" style=\"display:none\" id=\"',\n      startSegmentMathML2 = '\">',\n      endSegmentMathML = \"</math>\",\n      startSegmentTable = '<table hidden id=\"',\n      startSegmentTable2 = '\">',\n      endSegmentTable = \"</table>\",\n      startSegmentTableBody = '<table hidden><tbody id=\"',\n      startSegmentTableBody2 = '\">',\n      endSegmentTableBody = \"</tbody></table>\",\n      startSegmentTableRow = '<table hidden><tr id=\"',\n      startSegmentTableRow2 = '\">',\n      endSegmentTableRow = \"</tr></table>\",\n      startSegmentColGroup = '<table hidden><colgroup id=\"',\n      startSegmentColGroup2 = '\">',\n      endSegmentColGroup = \"</colgroup></table>\",\n      completeSegmentScript1Full =\n        '$RS=function(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS(\"',\n      completeSegmentScript1Partial = '$RS(\"',\n      completeSegmentScript2 = '\",\"',\n      completeSegmentScriptEnd = '\")\\x3c/script>',\n      completeBoundaryScriptFunctionOnly =\n        '$RB=[];$RV=function(a){$RT=performance.now();for(var b=0;b<a.length;b+=2){var c=a[b],e=a[b+1];null!==e.parentNode&&e.parentNode.removeChild(e);var f=c.parentNode;if(f){var g=c.previousSibling,h=0;do{if(c&&8===c.nodeType){var d=c.data;if(\"/$\"===d||\"/&\"===d)if(0===h)break;else h--;else\"$\"!==d&&\"$?\"!==d&&\"$~\"!==d&&\"$!\"!==d&&\"&\"!==d||h++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;e.firstChild;)f.insertBefore(e.firstChild,c);g.data=\"$\";g._reactRetry&&requestAnimationFrame(g._reactRetry)}}a.length=0};\\n$RC=function(a,b){if(b=document.getElementById(b))(a=document.getElementById(a))?(a.previousSibling.data=\"$~\",$RB.push(a,b),2===$RB.length&&(\"number\"!==typeof $RT?requestAnimationFrame($RV.bind(null,$RB)):(a=performance.now(),setTimeout($RV.bind(null,$RB),2300>a&&2E3<a?2300-a:$RT+300-a)))):b.parentNode.removeChild(b)};',\n      completeBoundaryScript1Partial = '$RC(\"',\n      completeBoundaryWithStylesScript1FullPartial =\n        '$RM=new Map;$RR=function(n,w,p){function u(q){this._p=null;q()}for(var r=new Map,t=document,h,b,e=t.querySelectorAll(\"link[data-precedence],style[data-precedence]\"),v=[],k=0;b=e[k++];)\"not all\"===b.getAttribute(\"media\")?v.push(b):(\"LINK\"===b.tagName&&$RM.set(b.getAttribute(\"href\"),b),r.set(b.dataset.precedence,h=b));e=0;b=[];var l,a;for(k=!0;;){if(k){var f=p[e++];if(!f){k=!1;e=0;continue}var c=!1,m=0;var d=f[m++];if(a=$RM.get(d)){var g=a._p;c=!0}else{a=t.createElement(\"link\");a.href=d;a.rel=\\n\"stylesheet\";for(a.dataset.precedence=l=f[m++];g=f[m++];)a.setAttribute(g,f[m++]);g=a._p=new Promise(function(q,x){a.onload=u.bind(a,q);a.onerror=u.bind(a,x)});$RM.set(d,a)}d=a.getAttribute(\"media\");!g||d&&!matchMedia(d).matches||b.push(g);if(c)continue}else{a=v[e++];if(!a)break;l=a.getAttribute(\"data-precedence\");a.removeAttribute(\"media\")}c=r.get(l)||h;c===h&&(h=a);r.set(l,a);c?c.parentNode.insertBefore(a,c.nextSibling):(c=t.head,c.insertBefore(a,c.firstChild))}if(p=document.getElementById(n))p.previousSibling.data=\\n\"$~\";Promise.all(b).then($RC.bind(null,n,w),$RX.bind(null,n,\"CSS failed to load\"))};$RR(\"',\n      completeBoundaryWithStylesScript1Partial = '$RR(\"',\n      completeBoundaryScript2 = '\",\"',\n      completeBoundaryScript3a = '\",',\n      completeBoundaryScript3b = '\"',\n      completeBoundaryScriptEnd = \")\\x3c/script>\",\n      clientRenderScriptFunctionOnly =\n        '$RX=function(b,c,d,e,f){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data=\"$!\",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),f&&(a.cstck=f),b._reactRetry&&b._reactRetry())};',\n      clientRenderScript1Full =\n        '$RX=function(b,c,d,e,f){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data=\"$!\",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),f&&(a.cstck=f),b._reactRetry&&b._reactRetry())};;$RX(\"',\n      clientRenderScript1Partial = '$RX(\"',\n      clientRenderScript1A = '\"',\n      clientRenderErrorScriptArgInterstitial = \",\",\n      clientRenderScriptEnd = \")\\x3c/script>\",\n      regexForJSStringsInInstructionScripts = /[<\\u2028\\u2029]/g,\n      regexForJSStringsInScripts = /[&><\\u2028\\u2029]/g,\n      lateStyleTagResourceOpen1 = ' media=\"not all\" data-precedence=\"',\n      lateStyleTagResourceOpen2 = '\" data-href=\"',\n      lateStyleTagResourceOpen3 = '\">',\n      lateStyleTagTemplateClose = \"</style>\",\n      currentlyRenderingBoundaryHasStylesToHoist = !1,\n      destinationHasCapacity = !0,\n      stylesheetFlushingQueue = [],\n      styleTagResourceOpen1 = ' data-precedence=\"',\n      styleTagResourceOpen2 = '\" data-href=\"',\n      spaceSeparator = \" \",\n      styleTagResourceOpen3 = '\">',\n      styleTagResourceClose = \"</style>\",\n      completedShellIdAttributeStart = ' id=\"',\n      arrayFirstOpenBracket = \"[\",\n      arraySubsequentOpenBracket = \",[\",\n      arrayInterstitial = \",\",\n      arrayCloseBracket = \"]\",\n      PENDING$1 = 0,\n      PRELOADED = 1,\n      PREAMBLE = 2,\n      LATE = 3,\n      regexForHrefInLinkHeaderURLContext = /[<>\\r\\n]/g,\n      regexForLinkHeaderQuotedParamValueContext = /[\"';,\\r\\n]/g,\n      doctypeChunk = \"\",\n      bind = Function.prototype.bind,\n      REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\"),\n      emptyContextObject = {};\n    Object.freeze(emptyContextObject);\n    var rendererSigil = {};\n    var currentActiveSnapshot = null,\n      didWarnAboutNoopUpdateForComponent = {},\n      didWarnAboutDeprecatedWillMount = {};\n    var didWarnAboutUninitializedState = new Set();\n    var didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate = new Set();\n    var didWarnAboutLegacyLifecyclesAndDerivedState = new Set();\n    var didWarnAboutDirectlyAssigningPropsToState = new Set();\n    var didWarnAboutUndefinedDerivedState = new Set();\n    var didWarnAboutContextTypes$1 = new Set();\n    var didWarnAboutChildContextTypes = new Set();\n    var didWarnAboutInvalidateContextType = new Set();\n    var didWarnOnInvalidCallback = new Set();\n    var classComponentUpdater = {\n        enqueueSetState: function (inst, payload, callback) {\n          var internals = inst._reactInternals;\n          null === internals.queue\n            ? warnNoop(inst, \"setState\")\n            : (internals.queue.push(payload),\n              void 0 !== callback &&\n                null !== callback &&\n                warnOnInvalidCallback(callback));\n        },\n        enqueueReplaceState: function (inst, payload, callback) {\n          inst = inst._reactInternals;\n          inst.replace = !0;\n          inst.queue = [payload];\n          void 0 !== callback &&\n            null !== callback &&\n            warnOnInvalidCallback(callback);\n        },\n        enqueueForceUpdate: function (inst, callback) {\n          null === inst._reactInternals.queue\n            ? warnNoop(inst, \"forceUpdate\")\n            : void 0 !== callback &&\n              null !== callback &&\n              warnOnInvalidCallback(callback);\n        }\n      },\n      emptyTreeContext = { id: 1, overflow: \"\" },\n      clz32 = Math.clz32 ? Math.clz32 : clz32Fallback,\n      log = Math.log,\n      LN2 = Math.LN2,\n      SuspenseException = Error(\n        \"Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\\n\\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`.\"\n      ),\n      suspendedThenable = null,\n      objectIs = \"function\" === typeof Object.is ? Object.is : is,\n      currentlyRenderingComponent = null,\n      currentlyRenderingTask = null,\n      currentlyRenderingRequest = null,\n      currentlyRenderingKeyPath = null,\n      firstWorkInProgressHook = null,\n      workInProgressHook = null,\n      isReRender = !1,\n      didScheduleRenderPhaseUpdate = !1,\n      localIdCounter = 0,\n      actionStateCounter = 0,\n      actionStateMatchingIndex = -1,\n      thenableIndexCounter = 0,\n      thenableState = null,\n      renderPhaseUpdates = null,\n      numberOfReRenders = 0,\n      isInHookUserCodeInDev = !1,\n      currentHookNameInDev,\n      HooksDispatcher = {\n        readContext: readContext,\n        use: function (usable) {\n          if (null !== usable && \"object\" === typeof usable) {\n            if (\"function\" === typeof usable.then)\n              return unwrapThenable(usable);\n            if (usable.$$typeof === REACT_CONTEXT_TYPE)\n              return readContext(usable);\n          }\n          throw Error(\n            \"An unsupported type was passed to use(): \" + String(usable)\n          );\n        },\n        useContext: function (context) {\n          currentHookNameInDev = \"useContext\";\n          resolveCurrentlyRenderingComponent();\n          return context._currentValue2;\n        },\n        useMemo: useMemo,\n        useReducer: useReducer,\n        useRef: function (initialValue) {\n          currentlyRenderingComponent = resolveCurrentlyRenderingComponent();\n          workInProgressHook = createWorkInProgressHook();\n          var previousRef = workInProgressHook.memoizedState;\n          return null === previousRef\n            ? ((initialValue = { current: initialValue }),\n              Object.seal(initialValue),\n              (workInProgressHook.memoizedState = initialValue))\n            : previousRef;\n        },\n        useState: function (initialState) {\n          currentHookNameInDev = \"useState\";\n          return useReducer(basicStateReducer, initialState);\n        },\n        useInsertionEffect: noop,\n        useLayoutEffect: noop,\n        useCallback: function (callback, deps) {\n          return useMemo(function () {\n            return callback;\n          }, deps);\n        },\n        useImperativeHandle: noop,\n        useEffect: noop,\n        useDebugValue: noop,\n        useDeferredValue: function (value, initialValue) {\n          resolveCurrentlyRenderingComponent();\n          return void 0 !== initialValue ? initialValue : value;\n        },\n        useTransition: function () {\n          resolveCurrentlyRenderingComponent();\n          return [!1, unsupportedStartTransition];\n        },\n        useId: function () {\n          var treeId = currentlyRenderingTask.treeContext;\n          var overflow = treeId.overflow;\n          treeId = treeId.id;\n          treeId =\n            (treeId & ~(1 << (32 - clz32(treeId) - 1))).toString(32) + overflow;\n          var resumableState = currentResumableState;\n          if (null === resumableState)\n            throw Error(\n              \"Invalid hook call. Hooks can only be called inside of the body of a function component.\"\n            );\n          overflow = localIdCounter++;\n          treeId = \"_\" + resumableState.idPrefix + \"R_\" + treeId;\n          0 < overflow && (treeId += \"H\" + overflow.toString(32));\n          return treeId + \"_\";\n        },\n        useSyncExternalStore: function (\n          subscribe,\n          getSnapshot,\n          getServerSnapshot\n        ) {\n          if (void 0 === getServerSnapshot)\n            throw Error(\n              \"Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.\"\n            );\n          return getServerSnapshot();\n        },\n        useOptimistic: function (passthrough) {\n          resolveCurrentlyRenderingComponent();\n          return [passthrough, unsupportedSetOptimisticState];\n        },\n        useActionState: useActionState,\n        useFormState: useActionState,\n        useHostTransitionStatus: function () {\n          resolveCurrentlyRenderingComponent();\n          return NotPending;\n        },\n        useMemoCache: function (size) {\n          for (var data = Array(size), i = 0; i < size; i++)\n            data[i] = REACT_MEMO_CACHE_SENTINEL;\n          return data;\n        },\n        useCacheRefresh: function () {\n          return unsupportedRefresh;\n        },\n        useEffectEvent: function () {\n          return throwOnUseEffectEventCall;\n        }\n      },\n      currentResumableState = null,\n      currentTaskInDEV = null,\n      DefaultAsyncDispatcher = {\n        getCacheForType: function () {\n          throw Error(\"Not implemented.\");\n        },\n        cacheSignal: function () {\n          throw Error(\"Not implemented.\");\n        },\n        getOwner: function () {\n          return null === currentTaskInDEV\n            ? null\n            : currentTaskInDEV.componentStack;\n        }\n      },\n      disabledDepth = 0,\n      prevLog,\n      prevInfo,\n      prevWarn,\n      prevError,\n      prevGroup,\n      prevGroupCollapsed,\n      prevGroupEnd;\n    disabledLog.__reactDisabledLog = !0;\n    var prefix,\n      suffix,\n      reentry = !1;\n    var componentFrameCache = new (\n      \"function\" === typeof WeakMap ? WeakMap : Map\n    )();\n    var callComponent = {\n        react_stack_bottom_frame: function (Component, props, secondArg) {\n          return Component(props, secondArg);\n        }\n      },\n      callComponentInDEV =\n        callComponent.react_stack_bottom_frame.bind(callComponent),\n      callRender = {\n        react_stack_bottom_frame: function (instance) {\n          return instance.render();\n        }\n      },\n      callRenderInDEV = callRender.react_stack_bottom_frame.bind(callRender),\n      callLazyInit = {\n        react_stack_bottom_frame: function (lazy) {\n          var init = lazy._init;\n          return init(lazy._payload);\n        }\n      },\n      callLazyInitInDEV =\n        callLazyInit.react_stack_bottom_frame.bind(callLazyInit),\n      lastResetTime = 0;\n    if (\n      \"object\" === typeof performance &&\n      \"function\" === typeof performance.now\n    ) {\n      var localPerformance = performance;\n      var getCurrentTime = function () {\n        return localPerformance.now();\n      };\n    } else {\n      var localDate = Date;\n      getCurrentTime = function () {\n        return localDate.now();\n      };\n    }\n    var CLIENT_RENDERED = 4,\n      PENDING = 0,\n      COMPLETED = 1,\n      FLUSHED = 2,\n      ABORTED = 3,\n      ERRORED = 4,\n      POSTPONED = 5,\n      CLOSED = 14,\n      currentRequest = null,\n      didWarnAboutBadClass = {},\n      didWarnAboutContextTypes = {},\n      didWarnAboutContextTypeOnFunctionComponent = {},\n      didWarnAboutGetDerivedStateOnFunctionComponent = {},\n      didWarnAboutReassigningProps = !1,\n      didWarnAboutGenerators = !1,\n      didWarnAboutMaps = !1,\n      flushedByteSize = 0,\n      flushingPartialBoundaries = !1;\n    exports.renderToStaticMarkup = function (children, options) {\n      return renderToStringImpl(\n        children,\n        options,\n        !0,\n        'The server used \"renderToStaticMarkup\" which does not support Suspense. If you intended to have the server wait for the suspended component please switch to \"renderToReadableStream\" which supports Suspense on the server'\n      );\n    };\n    exports.renderToString = function (children, options) {\n      return renderToStringImpl(\n        children,\n        options,\n        !1,\n        'The server used \"renderToString\" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to \"renderToReadableStream\" which supports Suspense on the server'\n      );\n    };\n    exports.version = \"19.2.8\";\n  })();\n", "/**\n * @license React\n * react-dom-server.browser.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n/*\n\n\n JS Implementation of MurmurHash3 (r136) (as of May 20, 2011)\n\n Copyright (c) 2011 Gary Court\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in\n all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n*/\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n  (function () {\n    function styleReplacer(match, prefix, s, suffix) {\n      return \"\" + prefix + (\"s\" === s ? \"\\\\73 \" : \"\\\\53 \") + suffix;\n    }\n    function scriptReplacer(match, prefix, s, suffix) {\n      return \"\" + prefix + (\"s\" === s ? \"\\\\u0073\" : \"\\\\u0053\") + suffix;\n    }\n    function getIteratorFn(maybeIterable) {\n      if (null === maybeIterable || \"object\" !== typeof maybeIterable)\n        return null;\n      maybeIterable =\n        (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||\n        maybeIterable[\"@@iterator\"];\n      return \"function\" === typeof maybeIterable ? maybeIterable : null;\n    }\n    function objectName(object) {\n      object = Object.prototype.toString.call(object);\n      return object.slice(8, object.length - 1);\n    }\n    function describeKeyForErrorMessage(key) {\n      var encodedKey = JSON.stringify(key);\n      return '\"' + key + '\"' === encodedKey ? key : encodedKey;\n    }\n    function describeValueForErrorMessage(value) {\n      switch (typeof value) {\n        case \"string\":\n          return JSON.stringify(\n            10 >= value.length ? value : value.slice(0, 10) + \"...\"\n          );\n        case \"object\":\n          if (isArrayImpl(value)) return \"[...]\";\n          if (null !== value && value.$$typeof === CLIENT_REFERENCE_TAG)\n            return \"client\";\n          value = objectName(value);\n          return \"Object\" === value ? \"{...}\" : value;\n        case \"function\":\n          return value.$$typeof === CLIENT_REFERENCE_TAG\n            ? \"client\"\n            : (value = value.displayName || value.name)\n              ? \"function \" + value\n              : \"function\";\n        default:\n          return String(value);\n      }\n    }\n    function describeElementType(type) {\n      if (\"string\" === typeof type) return type;\n      switch (type) {\n        case REACT_SUSPENSE_TYPE:\n          return \"Suspense\";\n        case REACT_SUSPENSE_LIST_TYPE:\n          return \"SuspenseList\";\n      }\n      if (\"object\" === typeof type)\n        switch (type.$$typeof) {\n          case REACT_FORWARD_REF_TYPE:\n            return describeElementType(type.render);\n          case REACT_MEMO_TYPE:\n            return describeElementType(type.type);\n          case REACT_LAZY_TYPE:\n            var payload = type._payload;\n            type = type._init;\n            try {\n              return describeElementType(type(payload));\n            } catch (x) {}\n        }\n      return \"\";\n    }\n    function describeObjectForErrorMessage(objectOrArray, expandedName) {\n      var objKind = objectName(objectOrArray);\n      if (\"Object\" !== objKind && \"Array\" !== objKind) return objKind;\n      var start = -1,\n        length = 0;\n      if (isArrayImpl(objectOrArray))\n        if (jsxChildrenParents.has(objectOrArray)) {\n          var type = jsxChildrenParents.get(objectOrArray);\n          objKind = \"<\" + describeElementType(type) + \">\";\n          for (var i = 0; i < objectOrArray.length; i++) {\n            var value = objectOrArray[i];\n            value =\n              \"string\" === typeof value\n                ? value\n                : \"object\" === typeof value && null !== value\n                  ? \"{\" + describeObjectForErrorMessage(value) + \"}\"\n                  : \"{\" + describeValueForErrorMessage(value) + \"}\";\n            \"\" + i === expandedName\n              ? ((start = objKind.length),\n                (length = value.length),\n                (objKind += value))\n              : (objKind =\n                  15 > value.length && 40 > objKind.length + value.length\n                    ? objKind + value\n                    : objKind + \"{...}\");\n          }\n          objKind += \"</\" + describeElementType(type) + \">\";\n        } else {\n          objKind = \"[\";\n          for (type = 0; type < objectOrArray.length; type++)\n            0 < type && (objKind += \", \"),\n              (i = objectOrArray[type]),\n              (i =\n                \"object\" === typeof i && null !== i\n                  ? describeObjectForErrorMessage(i)\n                  : describeValueForErrorMessage(i)),\n              \"\" + type === expandedName\n                ? ((start = objKind.length),\n                  (length = i.length),\n                  (objKind += i))\n                : (objKind =\n                    10 > i.length && 40 > objKind.length + i.length\n                      ? objKind + i\n                      : objKind + \"...\");\n          objKind += \"]\";\n        }\n      else if (objectOrArray.$$typeof === REACT_ELEMENT_TYPE)\n        objKind = \"<\" + describeElementType(objectOrArray.type) + \"/>\";\n      else {\n        if (objectOrArray.$$typeof === CLIENT_REFERENCE_TAG) return \"client\";\n        if (jsxPropsParents.has(objectOrArray)) {\n          objKind = jsxPropsParents.get(objectOrArray);\n          objKind = \"<\" + (describeElementType(objKind) || \"...\");\n          type = Object.keys(objectOrArray);\n          for (i = 0; i < type.length; i++) {\n            objKind += \" \";\n            value = type[i];\n            objKind += describeKeyForErrorMessage(value) + \"=\";\n            var _value2 = objectOrArray[value];\n            var _substr2 =\n              value === expandedName &&\n              \"object\" === typeof _value2 &&\n              null !== _value2\n                ? describeObjectForErrorMessage(_value2)\n                : describeValueForErrorMessage(_value2);\n            \"string\" !== typeof _value2 && (_substr2 = \"{\" + _substr2 + \"}\");\n            value === expandedName\n              ? ((start = objKind.length),\n                (length = _substr2.length),\n                (objKind += _substr2))\n              : (objKind =\n                  10 > _substr2.length && 40 > objKind.length + _substr2.length\n                    ? objKind + _substr2\n                    : objKind + \"...\");\n          }\n          objKind += \">\";\n        } else {\n          objKind = \"{\";\n          type = Object.keys(objectOrArray);\n          for (i = 0; i < type.length; i++)\n            0 < i && (objKind += \", \"),\n              (value = type[i]),\n              (objKind += describeKeyForErrorMessage(value) + \": \"),\n              (_value2 = objectOrArray[value]),\n              (_value2 =\n                \"object\" === typeof _value2 && null !== _value2\n                  ? describeObjectForErrorMessage(_value2)\n                  : describeValueForErrorMessage(_value2)),\n              value === expandedName\n                ? ((start = objKind.length),\n                  (length = _value2.length),\n                  (objKind += _value2))\n                : (objKind =\n                    10 > _value2.length && 40 > objKind.length + _value2.length\n                      ? objKind + _value2\n                      : objKind + \"...\");\n          objKind += \"}\";\n        }\n      }\n      return void 0 === expandedName\n        ? objKind\n        : -1 < start && 0 < length\n          ? ((objectOrArray = \" \".repeat(start) + \"^\".repeat(length)),\n            \"\\n  \" + objKind + \"\\n  \" + objectOrArray)\n          : \"\\n  \" + objKind;\n    }\n    function murmurhash3_32_gc(key, seed) {\n      var remainder = key.length & 3;\n      var bytes = key.length - remainder;\n      var h1 = seed;\n      for (seed = 0; seed < bytes; ) {\n        var k1 =\n          (key.charCodeAt(seed) & 255) |\n          ((key.charCodeAt(++seed) & 255) << 8) |\n          ((key.charCodeAt(++seed) & 255) << 16) |\n          ((key.charCodeAt(++seed) & 255) << 24);\n        ++seed;\n        k1 =\n          (3432918353 * (k1 & 65535) +\n            (((3432918353 * (k1 >>> 16)) & 65535) << 16)) &\n          4294967295;\n        k1 = (k1 << 15) | (k1 >>> 17);\n        k1 =\n          (461845907 * (k1 & 65535) +\n            (((461845907 * (k1 >>> 16)) & 65535) << 16)) &\n          4294967295;\n        h1 ^= k1;\n        h1 = (h1 << 13) | (h1 >>> 19);\n        h1 =\n          (5 * (h1 & 65535) + (((5 * (h1 >>> 16)) & 65535) << 16)) & 4294967295;\n        h1 = (h1 & 65535) + 27492 + ((((h1 >>> 16) + 58964) & 65535) << 16);\n      }\n      k1 = 0;\n      switch (remainder) {\n        case 3:\n          k1 ^= (key.charCodeAt(seed + 2) & 255) << 16;\n        case 2:\n          k1 ^= (key.charCodeAt(seed + 1) & 255) << 8;\n        case 1:\n          (k1 ^= key.charCodeAt(seed) & 255),\n            (k1 =\n              (3432918353 * (k1 & 65535) +\n                (((3432918353 * (k1 >>> 16)) & 65535) << 16)) &\n              4294967295),\n            (k1 = (k1 << 15) | (k1 >>> 17)),\n            (h1 ^=\n              (461845907 * (k1 & 65535) +\n                (((461845907 * (k1 >>> 16)) & 65535) << 16)) &\n              4294967295);\n      }\n      h1 ^= key.length;\n      h1 ^= h1 >>> 16;\n      h1 =\n        (2246822507 * (h1 & 65535) +\n          (((2246822507 * (h1 >>> 16)) & 65535) << 16)) &\n        4294967295;\n      h1 ^= h1 >>> 13;\n      h1 =\n        (3266489909 * (h1 & 65535) +\n          (((3266489909 * (h1 >>> 16)) & 65535) << 16)) &\n        4294967295;\n      return (h1 ^ (h1 >>> 16)) >>> 0;\n    }\n    function scheduleWork(callback) {\n      taskQueue.push(callback);\n      channel.port2.postMessage(null);\n    }\n    function handleErrorInNextTick(error) {\n      setTimeout(function () {\n        throw error;\n      });\n    }\n    function writeChunk(destination, chunk) {\n      if (0 !== chunk.byteLength)\n        if (2048 < chunk.byteLength)\n          0 < writtenBytes &&\n            (destination.enqueue(\n              new Uint8Array(currentView.buffer, 0, writtenBytes)\n            ),\n            (currentView = new Uint8Array(2048)),\n            (writtenBytes = 0)),\n            destination.enqueue(chunk);\n        else {\n          var allowableBytes = currentView.length - writtenBytes;\n          allowableBytes < chunk.byteLength &&\n            (0 === allowableBytes\n              ? destination.enqueue(currentView)\n              : (currentView.set(\n                  chunk.subarray(0, allowableBytes),\n                  writtenBytes\n                ),\n                destination.enqueue(currentView),\n                (chunk = chunk.subarray(allowableBytes))),\n            (currentView = new Uint8Array(2048)),\n            (writtenBytes = 0));\n          currentView.set(chunk, writtenBytes);\n          writtenBytes += chunk.byteLength;\n        }\n    }\n    function writeChunkAndReturn(destination, chunk) {\n      writeChunk(destination, chunk);\n      return !0;\n    }\n    function completeWriting(destination) {\n      currentView &&\n        0 < writtenBytes &&\n        (destination.enqueue(\n          new Uint8Array(currentView.buffer, 0, writtenBytes)\n        ),\n        (currentView = null),\n        (writtenBytes = 0));\n    }\n    function stringToChunk(content) {\n      return textEncoder.encode(content);\n    }\n    function stringToPrecomputedChunk(content) {\n      content = textEncoder.encode(content);\n      2048 < content.byteLength &&\n        console.error(\n          \"precomputed chunks must be smaller than the view size configured for this host. This is a bug in React.\"\n        );\n      return content;\n    }\n    function byteLengthOfChunk(chunk) {\n      return chunk.byteLength;\n    }\n    function closeWithError(destination, error) {\n      \"function\" === typeof destination.error\n        ? destination.error(error)\n        : destination.close();\n    }\n    function typeName(value) {\n      return (\n        (\"function\" === typeof Symbol &&\n          Symbol.toStringTag &&\n          value[Symbol.toStringTag]) ||\n        value.constructor.name ||\n        \"Object\"\n      );\n    }\n    function willCoercionThrow(value) {\n      try {\n        return testStringCoercion(value), !1;\n      } catch (e) {\n        return !0;\n      }\n    }\n    function testStringCoercion(value) {\n      return \"\" + value;\n    }\n    function checkAttributeStringCoercion(value, attributeName) {\n      if (willCoercionThrow(value))\n        return (\n          console.error(\n            \"The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before using it here.\",\n            attributeName,\n            typeName(value)\n          ),\n          testStringCoercion(value)\n        );\n    }\n    function checkCSSPropertyStringCoercion(value, propName) {\n      if (willCoercionThrow(value))\n        return (\n          console.error(\n            \"The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before using it here.\",\n            propName,\n            typeName(value)\n          ),\n          testStringCoercion(value)\n        );\n    }\n    function checkHtmlStringCoercion(value) {\n      if (willCoercionThrow(value))\n        return (\n          console.error(\n            \"The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before using it here.\",\n            typeName(value)\n          ),\n          testStringCoercion(value)\n        );\n    }\n    function isAttributeNameSafe(attributeName) {\n      if (hasOwnProperty.call(validatedAttributeNameCache, attributeName))\n        return !0;\n      if (hasOwnProperty.call(illegalAttributeNameCache, attributeName))\n        return !1;\n      if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName))\n        return (validatedAttributeNameCache[attributeName] = !0);\n      illegalAttributeNameCache[attributeName] = !0;\n      console.error(\"Invalid attribute name: `%s`\", attributeName);\n      return !1;\n    }\n    function checkControlledValueProps(tagName, props) {\n      hasReadOnlyValue[props.type] ||\n        props.onChange ||\n        props.onInput ||\n        props.readOnly ||\n        props.disabled ||\n        null == props.value ||\n        (\"select\" === tagName\n          ? console.error(\n              \"You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set `onChange`.\"\n            )\n          : console.error(\n              \"You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.\"\n            ));\n      props.onChange ||\n        props.readOnly ||\n        props.disabled ||\n        null == props.checked ||\n        console.error(\n          \"You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.\"\n        );\n    }\n    function validateProperty$1(tagName, name) {\n      if (\n        hasOwnProperty.call(warnedProperties$1, name) &&\n        warnedProperties$1[name]\n      )\n        return !0;\n      if (rARIACamel$1.test(name)) {\n        tagName = \"aria-\" + name.slice(4).toLowerCase();\n        tagName = ariaProperties.hasOwnProperty(tagName) ? tagName : null;\n        if (null == tagName)\n          return (\n            console.error(\n              \"Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.\",\n              name\n            ),\n            (warnedProperties$1[name] = !0)\n          );\n        if (name !== tagName)\n          return (\n            console.error(\n              \"Invalid ARIA attribute `%s`. Did you mean `%s`?\",\n              name,\n              tagName\n            ),\n            (warnedProperties$1[name] = !0)\n          );\n      }\n      if (rARIA$1.test(name)) {\n        tagName = name.toLowerCase();\n        tagName = ariaProperties.hasOwnProperty(tagName) ? tagName : null;\n        if (null == tagName) return (warnedProperties$1[name] = !0), !1;\n        name !== tagName &&\n          (console.error(\n            \"Unknown ARIA attribute `%s`. Did you mean `%s`?\",\n            name,\n            tagName\n          ),\n          (warnedProperties$1[name] = !0));\n      }\n      return !0;\n    }\n    function validateProperties$2(type, props) {\n      var invalidProps = [],\n        key;\n      for (key in props)\n        validateProperty$1(type, key) || invalidProps.push(key);\n      props = invalidProps\n        .map(function (prop) {\n          return \"`\" + prop + \"`\";\n        })\n        .join(\", \");\n      1 === invalidProps.length\n        ? console.error(\n            \"Invalid aria prop %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props\",\n            props,\n            type\n          )\n        : 1 < invalidProps.length &&\n          console.error(\n            \"Invalid aria props %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props\",\n            props,\n            type\n          );\n    }\n    function validateProperty(tagName, name, value, eventRegistry) {\n      if (hasOwnProperty.call(warnedProperties, name) && warnedProperties[name])\n        return !0;\n      var lowerCasedName = name.toLowerCase();\n      if (\"onfocusin\" === lowerCasedName || \"onfocusout\" === lowerCasedName)\n        return (\n          console.error(\n            \"React uses onFocus and onBlur instead of onFocusIn and onFocusOut. All React events are normalized to bubble, so onFocusIn and onFocusOut are not needed/supported by React.\"\n          ),\n          (warnedProperties[name] = !0)\n        );\n      if (\n        \"function\" === typeof value &&\n        ((\"form\" === tagName && \"action\" === name) ||\n          (\"input\" === tagName && \"formAction\" === name) ||\n          (\"button\" === tagName && \"formAction\" === name))\n      )\n        return !0;\n      if (null != eventRegistry) {\n        tagName = eventRegistry.possibleRegistrationNames;\n        if (eventRegistry.registrationNameDependencies.hasOwnProperty(name))\n          return !0;\n        eventRegistry = tagName.hasOwnProperty(lowerCasedName)\n          ? tagName[lowerCasedName]\n          : null;\n        if (null != eventRegistry)\n          return (\n            console.error(\n              \"Invalid event handler property `%s`. Did you mean `%s`?\",\n              name,\n              eventRegistry\n            ),\n            (warnedProperties[name] = !0)\n          );\n        if (EVENT_NAME_REGEX.test(name))\n          return (\n            console.error(\n              \"Unknown event handler property `%s`. It will be ignored.\",\n              name\n            ),\n            (warnedProperties[name] = !0)\n          );\n      } else if (EVENT_NAME_REGEX.test(name))\n        return (\n          INVALID_EVENT_NAME_REGEX.test(name) &&\n            console.error(\n              \"Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.\",\n              name\n            ),\n          (warnedProperties[name] = !0)\n        );\n      if (rARIA.test(name) || rARIACamel.test(name)) return !0;\n      if (\"innerhtml\" === lowerCasedName)\n        return (\n          console.error(\n            \"Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`.\"\n          ),\n          (warnedProperties[name] = !0)\n        );\n      if (\"aria\" === lowerCasedName)\n        return (\n          console.error(\n            \"The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead.\"\n          ),\n          (warnedProperties[name] = !0)\n        );\n      if (\n        \"is\" === lowerCasedName &&\n        null !== value &&\n        void 0 !== value &&\n        \"string\" !== typeof value\n      )\n        return (\n          console.error(\n            \"Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.\",\n            typeof value\n          ),\n          (warnedProperties[name] = !0)\n        );\n      if (\"number\" === typeof value && isNaN(value))\n        return (\n          console.error(\n            \"Received NaN for the `%s` attribute. If this is expected, cast the value to a string.\",\n            name\n          ),\n          (warnedProperties[name] = !0)\n        );\n      if (possibleStandardNames.hasOwnProperty(lowerCasedName)) {\n        if (\n          ((lowerCasedName = possibleStandardNames[lowerCasedName]),\n          lowerCasedName !== name)\n        )\n          return (\n            console.error(\n              \"Invalid DOM property `%s`. Did you mean `%s`?\",\n              name,\n              lowerCasedName\n            ),\n            (warnedProperties[name] = !0)\n          );\n      } else if (name !== lowerCasedName)\n        return (\n          console.error(\n            \"React does not recognize the `%s` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `%s` instead. If you accidentally passed it from a parent component, remove it from the DOM element.\",\n            name,\n            lowerCasedName\n          ),\n          (warnedProperties[name] = !0)\n        );\n      switch (name) {\n        case \"dangerouslySetInnerHTML\":\n        case \"children\":\n        case \"style\":\n        case \"suppressContentEditableWarning\":\n        case \"suppressHydrationWarning\":\n        case \"defaultValue\":\n        case \"defaultChecked\":\n        case \"innerHTML\":\n        case \"ref\":\n          return !0;\n        case \"innerText\":\n        case \"textContent\":\n          return !0;\n      }\n      switch (typeof value) {\n        case \"boolean\":\n          switch (name) {\n            case \"autoFocus\":\n            case \"checked\":\n            case \"multiple\":\n            case \"muted\":\n            case \"selected\":\n            case \"contentEditable\":\n            case \"spellCheck\":\n            case \"draggable\":\n            case \"value\":\n            case \"autoReverse\":\n            case \"externalResourcesRequired\":\n            case \"focusable\":\n            case \"preserveAlpha\":\n            case \"allowFullScreen\":\n            case \"async\":\n            case \"autoPlay\":\n            case \"controls\":\n            case \"default\":\n            case \"defer\":\n            case \"disabled\":\n            case \"disablePictureInPicture\":\n            case \"disableRemotePlayback\":\n            case \"formNoValidate\":\n            case \"hidden\":\n            case \"loop\":\n            case \"noModule\":\n            case \"noValidate\":\n            case \"open\":\n            case \"playsInline\":\n            case \"readOnly\":\n            case \"required\":\n            case \"reversed\":\n            case \"scoped\":\n            case \"seamless\":\n            case \"itemScope\":\n            case \"capture\":\n            case \"download\":\n            case \"inert\":\n              return !0;\n            default:\n              lowerCasedName = name.toLowerCase().slice(0, 5);\n              if (\"data-\" === lowerCasedName || \"aria-\" === lowerCasedName)\n                return !0;\n              value\n                ? console.error(\n                    'Received `%s` for a non-boolean attribute `%s`.\\n\\nIf you want to write it to the DOM, pass a string instead: %s=\"%s\" or %s={value.toString()}.',\n                    value,\n                    name,\n                    name,\n                    value,\n                    name\n                  )\n                : console.error(\n                    'Received `%s` for a non-boolean attribute `%s`.\\n\\nIf you want to write it to the DOM, pass a string instead: %s=\"%s\" or %s={value.toString()}.\\n\\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.',\n                    value,\n                    name,\n                    name,\n                    value,\n                    name,\n                    name,\n                    name\n                  );\n              return (warnedProperties[name] = !0);\n          }\n        case \"function\":\n        case \"symbol\":\n          return (warnedProperties[name] = !0), !1;\n        case \"string\":\n          if (\"false\" === value || \"true\" === value) {\n            switch (name) {\n              case \"checked\":\n              case \"selected\":\n              case \"multiple\":\n              case \"muted\":\n              case \"allowFullScreen\":\n              case \"async\":\n              case \"autoPlay\":\n              case \"controls\":\n              case \"default\":\n              case \"defer\":\n              case \"disabled\":\n              case \"disablePictureInPicture\":\n              case \"disableRemotePlayback\":\n              case \"formNoValidate\":\n              case \"hidden\":\n              case \"loop\":\n              case \"noModule\":\n              case \"noValidate\":\n              case \"open\":\n              case \"playsInline\":\n              case \"readOnly\":\n              case \"required\":\n              case \"reversed\":\n              case \"scoped\":\n              case \"seamless\":\n              case \"itemScope\":\n              case \"inert\":\n                break;\n              default:\n                return !0;\n            }\n            console.error(\n              \"Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?\",\n              value,\n              name,\n              \"false\" === value\n                ? \"The browser will interpret it as a truthy value.\"\n                : 'Although this works, it will not work as expected if you pass the string \"false\".',\n              name,\n              value\n            );\n            warnedProperties[name] = !0;\n          }\n      }\n      return !0;\n    }\n    function warnUnknownProperties(type, props, eventRegistry) {\n      var unknownProps = [],\n        key;\n      for (key in props)\n        validateProperty(type, key, props[key], eventRegistry) ||\n          unknownProps.push(key);\n      props = unknownProps\n        .map(function (prop) {\n          return \"`\" + prop + \"`\";\n        })\n        .join(\", \");\n      1 === unknownProps.length\n        ? console.error(\n            \"Invalid value for prop %s on <%s> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://react.dev/link/attribute-behavior \",\n            props,\n            type\n          )\n        : 1 < unknownProps.length &&\n          console.error(\n            \"Invalid values for props %s on <%s> tag. Either remove them from the element, or pass a string or number value to keep them in the DOM. For details, see https://react.dev/link/attribute-behavior \",\n            props,\n            type\n          );\n    }\n    function camelize(string) {\n      return string.replace(hyphenPattern, function (_, character) {\n        return character.toUpperCase();\n      });\n    }\n    function escapeTextForBrowser(text) {\n      if (\n        \"boolean\" === typeof text ||\n        \"number\" === typeof text ||\n        \"bigint\" === typeof text\n      )\n        return \"\" + text;\n      checkHtmlStringCoercion(text);\n      text = \"\" + text;\n      var match = matchHtmlRegExp.exec(text);\n      if (match) {\n        var html = \"\",\n          index,\n          lastIndex = 0;\n        for (index = match.index; index < text.length; index++) {\n          switch (text.charCodeAt(index)) {\n            case 34:\n              match = \"&quot;\";\n              break;\n            case 38:\n              match = \"&amp;\";\n              break;\n            case 39:\n              match = \"&#x27;\";\n              break;\n            case 60:\n              match = \"&lt;\";\n              break;\n            case 62:\n              match = \"&gt;\";\n              break;\n            default:\n              continue;\n          }\n          lastIndex !== index && (html += text.slice(lastIndex, index));\n          lastIndex = index + 1;\n          html += match;\n        }\n        text = lastIndex !== index ? html + text.slice(lastIndex, index) : html;\n      }\n      return text;\n    }\n    function sanitizeURL(url) {\n      return isJavaScriptProtocol.test(\"\" + url)\n        ? \"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')\"\n        : url;\n    }\n    function escapeEntireInlineScriptContent(scriptText) {\n      checkHtmlStringCoercion(scriptText);\n      return (\"\" + scriptText).replace(scriptRegex, scriptReplacer);\n    }\n    function createRenderState(\n      resumableState,\n      nonce,\n      externalRuntimeConfig,\n      importMap,\n      onHeaders,\n      maxHeadersLength\n    ) {\n      externalRuntimeConfig =\n        \"string\" === typeof nonce ? nonce : nonce && nonce.script;\n      var inlineScriptWithNonce =\n          void 0 === externalRuntimeConfig\n            ? startInlineScript\n            : stringToPrecomputedChunk(\n                '<script nonce=\"' +\n                  escapeTextForBrowser(externalRuntimeConfig) +\n                  '\"'\n              ),\n        nonceStyle = \"string\" === typeof nonce ? void 0 : nonce && nonce.style,\n        inlineStyleWithNonce =\n          void 0 === nonceStyle\n            ? startInlineStyle\n            : stringToPrecomputedChunk(\n                '<style nonce=\"' + escapeTextForBrowser(nonceStyle) + '\"'\n              ),\n        idPrefix = resumableState.idPrefix,\n        bootstrapChunks = [],\n        bootstrapScriptContent = resumableState.bootstrapScriptContent,\n        bootstrapScripts = resumableState.bootstrapScripts,\n        bootstrapModules = resumableState.bootstrapModules;\n      void 0 !== bootstrapScriptContent &&\n        (bootstrapChunks.push(inlineScriptWithNonce),\n        pushCompletedShellIdAttribute(bootstrapChunks, resumableState),\n        bootstrapChunks.push(\n          endOfStartTag,\n          stringToChunk(\n            escapeEntireInlineScriptContent(bootstrapScriptContent)\n          ),\n          endInlineScript\n        ));\n      bootstrapScriptContent = [];\n      void 0 !== importMap &&\n        (bootstrapScriptContent.push(importMapScriptStart),\n        bootstrapScriptContent.push(\n          stringToChunk(\n            escapeEntireInlineScriptContent(JSON.stringify(importMap))\n          )\n        ),\n        bootstrapScriptContent.push(importMapScriptEnd));\n      onHeaders &&\n        \"number\" === typeof maxHeadersLength &&\n        0 >= maxHeadersLength &&\n        console.error(\n          \"React expected a positive non-zero `maxHeadersLength` option but found %s instead. When using the `onHeaders` option you may supply an optional `maxHeadersLength` option as well however, when setting this value to zero or less no headers will be captured.\",\n          0 === maxHeadersLength ? \"zero\" : maxHeadersLength\n        );\n      importMap = onHeaders\n        ? {\n            preconnects: \"\",\n            fontPreloads: \"\",\n            highImagePreloads: \"\",\n            remainingCapacity:\n              2 +\n              (\"number\" === typeof maxHeadersLength ? maxHeadersLength : 2e3)\n          }\n        : null;\n      onHeaders = {\n        placeholderPrefix: stringToPrecomputedChunk(idPrefix + \"P:\"),\n        segmentPrefix: stringToPrecomputedChunk(idPrefix + \"S:\"),\n        boundaryPrefix: stringToPrecomputedChunk(idPrefix + \"B:\"),\n        startInlineScript: inlineScriptWithNonce,\n        startInlineStyle: inlineStyleWithNonce,\n        preamble: createPreambleState(),\n        externalRuntimeScript: null,\n        bootstrapChunks: bootstrapChunks,\n        importMapChunks: bootstrapScriptContent,\n        onHeaders: onHeaders,\n        headers: importMap,\n        resets: {\n          font: {},\n          dns: {},\n          connect: { default: {}, anonymous: {}, credentials: {} },\n          image: {},\n          style: {}\n        },\n        charsetChunks: [],\n        viewportChunks: [],\n        hoistableChunks: [],\n        preconnects: new Set(),\n        fontPreloads: new Set(),\n        highImagePreloads: new Set(),\n        styles: new Map(),\n        bootstrapScripts: new Set(),\n        scripts: new Set(),\n        bulkPreloads: new Set(),\n        preloads: {\n          images: new Map(),\n          stylesheets: new Map(),\n          scripts: new Map(),\n          moduleScripts: new Map()\n        },\n        nonce: { script: externalRuntimeConfig, style: nonceStyle },\n        hoistableState: null,\n        stylesToHoist: !1\n      };\n      if (void 0 !== bootstrapScripts)\n        for (importMap = 0; importMap < bootstrapScripts.length; importMap++)\n          (maxHeadersLength = bootstrapScripts[importMap]),\n            (inlineStyleWithNonce = nonceStyle = void 0),\n            (idPrefix = {\n              rel: \"preload\",\n              as: \"script\",\n              fetchPriority: \"low\",\n              nonce: nonce\n            }),\n            \"string\" === typeof maxHeadersLength\n              ? (idPrefix.href = inlineScriptWithNonce = maxHeadersLength)\n              : ((idPrefix.href = inlineScriptWithNonce = maxHeadersLength.src),\n                (idPrefix.integrity = inlineStyleWithNonce =\n                  \"string\" === typeof maxHeadersLength.integrity\n                    ? maxHeadersLength.integrity\n                    : void 0),\n                (idPrefix.crossOrigin = nonceStyle =\n                  \"string\" === typeof maxHeadersLength ||\n                  null == maxHeadersLength.crossOrigin\n                    ? void 0\n                    : \"use-credentials\" === maxHeadersLength.crossOrigin\n                      ? \"use-credentials\"\n                      : \"\")),\n            preloadBootstrapScriptOrModule(\n              resumableState,\n              onHeaders,\n              inlineScriptWithNonce,\n              idPrefix\n            ),\n            bootstrapChunks.push(\n              startScriptSrc,\n              stringToChunk(escapeTextForBrowser(inlineScriptWithNonce)),\n              attributeEnd\n            ),\n            externalRuntimeConfig &&\n              bootstrapChunks.push(\n                scriptNonce,\n                stringToChunk(escapeTextForBrowser(externalRuntimeConfig)),\n                attributeEnd\n              ),\n            \"string\" === typeof inlineStyleWithNonce &&\n              bootstrapChunks.push(\n                scriptIntegirty,\n                stringToChunk(escapeTextForBrowser(inlineStyleWithNonce)),\n                attributeEnd\n              ),\n            \"string\" === typeof nonceStyle &&\n              bootstrapChunks.push(\n                scriptCrossOrigin,\n                stringToChunk(escapeTextForBrowser(nonceStyle)),\n                attributeEnd\n              ),\n            pushCompletedShellIdAttribute(bootstrapChunks, resumableState),\n            bootstrapChunks.push(endAsyncScript);\n      if (void 0 !== bootstrapModules)\n        for (nonce = 0; nonce < bootstrapModules.length; nonce++)\n          (bootstrapScripts = bootstrapModules[nonce]),\n            (inlineScriptWithNonce = maxHeadersLength = void 0),\n            (nonceStyle = {\n              rel: \"modulepreload\",\n              fetchPriority: \"low\",\n              nonce: externalRuntimeConfig\n            }),\n            \"string\" === typeof bootstrapScripts\n              ? (nonceStyle.href = importMap = bootstrapScripts)\n              : ((nonceStyle.href = importMap = bootstrapScripts.src),\n                (nonceStyle.integrity = inlineScriptWithNonce =\n                  \"string\" === typeof bootstrapScripts.integrity\n                    ? bootstrapScripts.integrity\n                    : void 0),\n                (nonceStyle.crossOrigin = maxHeadersLength =\n                  \"string\" === typeof bootstrapScripts ||\n                  null == bootstrapScripts.crossOrigin\n                    ? void 0\n                    : \"use-credentials\" === bootstrapScripts.crossOrigin\n                      ? \"use-credentials\"\n                      : \"\")),\n            preloadBootstrapScriptOrModule(\n              resumableState,\n              onHeaders,\n              importMap,\n              nonceStyle\n            ),\n            bootstrapChunks.push(\n              startModuleSrc,\n              stringToChunk(escapeTextForBrowser(importMap)),\n              attributeEnd\n            ),\n            externalRuntimeConfig &&\n              bootstrapChunks.push(\n                scriptNonce,\n                stringToChunk(escapeTextForBrowser(externalRuntimeConfig)),\n                attributeEnd\n              ),\n            \"string\" === typeof inlineScriptWithNonce &&\n              bootstrapChunks.push(\n                scriptIntegirty,\n                stringToChunk(escapeTextForBrowser(inlineScriptWithNonce)),\n                attributeEnd\n              ),\n            \"string\" === typeof maxHeadersLength &&\n              bootstrapChunks.push(\n                scriptCrossOrigin,\n                stringToChunk(escapeTextForBrowser(maxHeadersLength)),\n                attributeEnd\n              ),\n            pushCompletedShellIdAttribute(bootstrapChunks, resumableState),\n            bootstrapChunks.push(endAsyncScript);\n      return onHeaders;\n    }\n    function createResumableState(\n      identifierPrefix,\n      externalRuntimeConfig,\n      bootstrapScriptContent,\n      bootstrapScripts,\n      bootstrapModules\n    ) {\n      return {\n        idPrefix: void 0 === identifierPrefix ? \"\" : identifierPrefix,\n        nextFormID: 0,\n        streamingFormat: 0,\n        bootstrapScriptContent: bootstrapScriptContent,\n        bootstrapScripts: bootstrapScripts,\n        bootstrapModules: bootstrapModules,\n        instructions: NothingSent,\n        hasBody: !1,\n        hasHtml: !1,\n        unknownResources: {},\n        dnsResources: {},\n        connectResources: { default: {}, anonymous: {}, credentials: {} },\n        imageResources: {},\n        styleResources: {},\n        scriptResources: {},\n        moduleUnknownResources: {},\n        moduleScriptResources: {}\n      };\n    }\n    function createPreambleState() {\n      return { htmlChunks: null, headChunks: null, bodyChunks: null };\n    }\n    function createFormatContext(\n      insertionMode,\n      selectedValue,\n      tagScope,\n      viewTransition\n    ) {\n      return {\n        insertionMode: insertionMode,\n        selectedValue: selectedValue,\n        tagScope: tagScope,\n        viewTransition: viewTransition\n      };\n    }\n    function createRootFormatContext(namespaceURI) {\n      return createFormatContext(\n        \"http://www.w3.org/2000/svg\" === namespaceURI\n          ? SVG_MODE\n          : \"http://www.w3.org/1998/Math/MathML\" === namespaceURI\n            ? MATHML_MODE\n            : ROOT_HTML_MODE,\n        null,\n        0,\n        null\n      );\n    }\n    function getChildFormatContext(parentContext, type, props) {\n      var subtreeScope = parentContext.tagScope & -25;\n      switch (type) {\n        case \"noscript\":\n          return createFormatContext(HTML_MODE, null, subtreeScope | 1, null);\n        case \"select\":\n          return createFormatContext(\n            HTML_MODE,\n            null != props.value ? props.value : props.defaultValue,\n            subtreeScope,\n            null\n          );\n        case \"svg\":\n          return createFormatContext(SVG_MODE, null, subtreeScope, null);\n        case \"picture\":\n          return createFormatContext(HTML_MODE, null, subtreeScope | 2, null);\n        case \"math\":\n          return createFormatContext(MATHML_MODE, null, subtreeScope, null);\n        case \"foreignObject\":\n          return createFormatContext(HTML_MODE, null, subtreeScope, null);\n        case \"table\":\n          return createFormatContext(HTML_TABLE_MODE, null, subtreeScope, null);\n        case \"thead\":\n        case \"tbody\":\n        case \"tfoot\":\n          return createFormatContext(\n            HTML_TABLE_BODY_MODE,\n            null,\n            subtreeScope,\n            null\n          );\n        case \"colgroup\":\n          return createFormatContext(\n            HTML_COLGROUP_MODE,\n            null,\n            subtreeScope,\n            null\n          );\n        case \"tr\":\n          return createFormatContext(\n            HTML_TABLE_ROW_MODE,\n            null,\n            subtreeScope,\n            null\n          );\n        case \"head\":\n          if (parentContext.insertionMode < HTML_MODE)\n            return createFormatContext(\n              HTML_HEAD_MODE,\n              null,\n              subtreeScope,\n              null\n            );\n          break;\n        case \"html\":\n          if (parentContext.insertionMode === ROOT_HTML_MODE)\n            return createFormatContext(\n              HTML_HTML_MODE,\n              null,\n              subtreeScope,\n              null\n            );\n      }\n      return parentContext.insertionMode >= HTML_TABLE_MODE ||\n        parentContext.insertionMode < HTML_MODE\n        ? createFormatContext(HTML_MODE, null, subtreeScope, null)\n        : parentContext.tagScope !== subtreeScope\n          ? createFormatContext(\n              parentContext.insertionMode,\n              parentContext.selectedValue,\n              subtreeScope,\n              null\n            )\n          : parentContext;\n    }\n    function getSuspenseViewTransition(parentViewTransition) {\n      return null === parentViewTransition\n        ? null\n        : {\n            update: parentViewTransition.update,\n            enter: \"none\",\n            exit: \"none\",\n            share: parentViewTransition.update,\n            name: parentViewTransition.autoName,\n            autoName: parentViewTransition.autoName,\n            nameIdx: 0\n          };\n    }\n    function getSuspenseFallbackFormatContext(resumableState, parentContext) {\n      parentContext.tagScope & 32 && (resumableState.instructions |= 128);\n      return createFormatContext(\n        parentContext.insertionMode,\n        parentContext.selectedValue,\n        parentContext.tagScope | 12,\n        getSuspenseViewTransition(parentContext.viewTransition)\n      );\n    }\n    function getSuspenseContentFormatContext(resumableState, parentContext) {\n      resumableState = getSuspenseViewTransition(parentContext.viewTransition);\n      var subtreeScope = parentContext.tagScope | 16;\n      null !== resumableState &&\n        \"none\" !== resumableState.share &&\n        (subtreeScope |= 64);\n      return createFormatContext(\n        parentContext.insertionMode,\n        parentContext.selectedValue,\n        subtreeScope,\n        resumableState\n      );\n    }\n    function pushTextInstance(target, text, renderState, textEmbedded) {\n      if (\"\" === text) return textEmbedded;\n      textEmbedded && target.push(textSeparator);\n      target.push(stringToChunk(escapeTextForBrowser(text)));\n      return !0;\n    }\n    function pushStyleAttribute(target, style) {\n      if (\"object\" !== typeof style)\n        throw Error(\n          \"The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.\"\n        );\n      var isFirst = !0,\n        styleName;\n      for (styleName in style)\n        if (hasOwnProperty.call(style, styleName)) {\n          var styleValue = style[styleName];\n          if (\n            null != styleValue &&\n            \"boolean\" !== typeof styleValue &&\n            \"\" !== styleValue\n          ) {\n            if (0 === styleName.indexOf(\"--\")) {\n              var nameChunk = stringToChunk(escapeTextForBrowser(styleName));\n              checkCSSPropertyStringCoercion(styleValue, styleName);\n              styleValue = stringToChunk(\n                escapeTextForBrowser((\"\" + styleValue).trim())\n              );\n            } else {\n              nameChunk = styleName;\n              var value = styleValue;\n              if (-1 < nameChunk.indexOf(\"-\")) {\n                var name = nameChunk;\n                (warnedStyleNames.hasOwnProperty(name) &&\n                  warnedStyleNames[name]) ||\n                  ((warnedStyleNames[name] = !0),\n                  console.error(\n                    \"Unsupported style property %s. Did you mean %s?\",\n                    name,\n                    camelize(name.replace(msPattern$1, \"ms-\"))\n                  ));\n              } else if (badVendoredStyleNamePattern.test(nameChunk))\n                (name = nameChunk),\n                  (warnedStyleNames.hasOwnProperty(name) &&\n                    warnedStyleNames[name]) ||\n                    ((warnedStyleNames[name] = !0),\n                    console.error(\n                      \"Unsupported vendor-prefixed style property %s. Did you mean %s?\",\n                      name,\n                      name.charAt(0).toUpperCase() + name.slice(1)\n                    ));\n              else if (badStyleValueWithSemicolonPattern.test(value)) {\n                name = nameChunk;\n                var value$jscomp$0 = value;\n                (warnedStyleValues.hasOwnProperty(value$jscomp$0) &&\n                  warnedStyleValues[value$jscomp$0]) ||\n                  ((warnedStyleValues[value$jscomp$0] = !0),\n                  console.error(\n                    'Style property values shouldn\\'t contain a semicolon. Try \"%s: %s\" instead.',\n                    name,\n                    value$jscomp$0.replace(\n                      badStyleValueWithSemicolonPattern,\n                      \"\"\n                    )\n                  ));\n              }\n              \"number\" === typeof value &&\n                (isNaN(value)\n                  ? warnedForNaNValue ||\n                    ((warnedForNaNValue = !0),\n                    console.error(\n                      \"`NaN` is an invalid value for the `%s` css style property.\",\n                      nameChunk\n                    ))\n                  : isFinite(value) ||\n                    warnedForInfinityValue ||\n                    ((warnedForInfinityValue = !0),\n                    console.error(\n                      \"`Infinity` is an invalid value for the `%s` css style property.\",\n                      nameChunk\n                    )));\n              nameChunk = styleName;\n              value = styleNameCache.get(nameChunk);\n              void 0 !== value\n                ? (nameChunk = value)\n                : ((value = stringToPrecomputedChunk(\n                    escapeTextForBrowser(\n                      nameChunk\n                        .replace(uppercasePattern, \"-$1\")\n                        .toLowerCase()\n                        .replace(msPattern, \"-ms-\")\n                    )\n                  )),\n                  styleNameCache.set(nameChunk, value),\n                  (nameChunk = value));\n              \"number\" === typeof styleValue\n                ? (styleValue =\n                    0 === styleValue || unitlessNumbers.has(styleName)\n                      ? stringToChunk(\"\" + styleValue)\n                      : stringToChunk(styleValue + \"px\"))\n                : (checkCSSPropertyStringCoercion(styleValue, styleName),\n                  (styleValue = stringToChunk(\n                    escapeTextForBrowser((\"\" + styleValue).trim())\n                  )));\n            }\n            isFirst\n              ? ((isFirst = !1),\n                target.push(\n                  styleAttributeStart,\n                  nameChunk,\n                  styleAssign,\n                  styleValue\n                ))\n              : target.push(styleSeparator, nameChunk, styleAssign, styleValue);\n          }\n        }\n      isFirst || target.push(attributeEnd);\n    }\n    function pushBooleanAttribute(target, name, value) {\n      value &&\n        \"function\" !== typeof value &&\n        \"symbol\" !== typeof value &&\n        target.push(\n          attributeSeparator,\n          stringToChunk(name),\n          attributeEmptyString\n        );\n    }\n    function pushStringAttribute(target, name, value) {\n      \"function\" !== typeof value &&\n        \"symbol\" !== typeof value &&\n        \"boolean\" !== typeof value &&\n        target.push(\n          attributeSeparator,\n          stringToChunk(name),\n          attributeAssign,\n          stringToChunk(escapeTextForBrowser(value)),\n          attributeEnd\n        );\n    }\n    function pushAdditionalFormField(value, key) {\n      this.push(startHiddenInputChunk);\n      validateAdditionalFormField(value);\n      pushStringAttribute(this, \"name\", key);\n      pushStringAttribute(this, \"value\", value);\n      this.push(endOfStartTagSelfClosing);\n    }\n    function validateAdditionalFormField(value) {\n      if (\"string\" !== typeof value)\n        throw Error(\n          \"File/Blob fields are not yet supported in progressive forms. Will fallback to client hydration.\"\n        );\n    }\n    function getCustomFormFields(resumableState, formAction) {\n      if (\"function\" === typeof formAction.$$FORM_ACTION) {\n        var id = resumableState.nextFormID++;\n        resumableState = resumableState.idPrefix + id;\n        try {\n          var customFields = formAction.$$FORM_ACTION(resumableState);\n          if (customFields) {\n            var formData = customFields.data;\n            null != formData && formData.forEach(validateAdditionalFormField);\n          }\n          return customFields;\n        } catch (x) {\n          if (\n            \"object\" === typeof x &&\n            null !== x &&\n            \"function\" === typeof x.then\n          )\n            throw x;\n          console.error(\n            \"Failed to serialize an action for progressive enhancement:\\n%s\",\n            x\n          );\n        }\n      }\n      return null;\n    }\n    function pushFormActionAttribute(\n      target,\n      resumableState,\n      renderState,\n      formAction,\n      formEncType,\n      formMethod,\n      formTarget,\n      name\n    ) {\n      var formData = null;\n      if (\"function\" === typeof formAction) {\n        null === name ||\n          didWarnFormActionName ||\n          ((didWarnFormActionName = !0),\n          console.error(\n            'Cannot specify a \"name\" prop for a button that specifies a function as a formAction. React needs it to encode which action should be invoked. It will get overridden.'\n          ));\n        (null === formEncType && null === formMethod) ||\n          didWarnFormActionMethod ||\n          ((didWarnFormActionMethod = !0),\n          console.error(\n            \"Cannot specify a formEncType or formMethod for a button that specifies a function as a formAction. React provides those automatically. They will get overridden.\"\n          ));\n        null === formTarget ||\n          didWarnFormActionTarget ||\n          ((didWarnFormActionTarget = !0),\n          console.error(\n            \"Cannot specify a formTarget for a button that specifies a function as a formAction. The function will always be executed in the same window.\"\n          ));\n        var customFields = getCustomFormFields(resumableState, formAction);\n        null !== customFields\n          ? ((name = customFields.name),\n            (formAction = customFields.action || \"\"),\n            (formEncType = customFields.encType),\n            (formMethod = customFields.method),\n            (formTarget = customFields.target),\n            (formData = customFields.data))\n          : (target.push(\n              attributeSeparator,\n              stringToChunk(\"formAction\"),\n              attributeAssign,\n              actionJavaScriptURL,\n              attributeEnd\n            ),\n            (formTarget = formMethod = formEncType = formAction = name = null),\n            injectFormReplayingRuntime(resumableState, renderState));\n      }\n      null != name && pushAttribute(target, \"name\", name);\n      null != formAction && pushAttribute(target, \"formAction\", formAction);\n      null != formEncType && pushAttribute(target, \"formEncType\", formEncType);\n      null != formMethod && pushAttribute(target, \"formMethod\", formMethod);\n      null != formTarget && pushAttribute(target, \"formTarget\", formTarget);\n      return formData;\n    }\n    function pushAttribute(target, name, value) {\n      switch (name) {\n        case \"className\":\n          pushStringAttribute(target, \"class\", value);\n          break;\n        case \"tabIndex\":\n          pushStringAttribute(target, \"tabindex\", value);\n          break;\n        case \"dir\":\n        case \"role\":\n        case \"viewBox\":\n        case \"width\":\n        case \"height\":\n          pushStringAttribute(target, name, value);\n          break;\n        case \"style\":\n          pushStyleAttribute(target, value);\n          break;\n        case \"src\":\n        case \"href\":\n          if (\"\" === value) {\n            \"src\" === name\n              ? console.error(\n                  'An empty string (\"\") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',\n                  name,\n                  name\n                )\n              : console.error(\n                  'An empty string (\"\") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',\n                  name,\n                  name\n                );\n            break;\n          }\n        case \"action\":\n        case \"formAction\":\n          if (\n            null == value ||\n            \"function\" === typeof value ||\n            \"symbol\" === typeof value ||\n            \"boolean\" === typeof value\n          )\n            break;\n          checkAttributeStringCoercion(value, name);\n          value = sanitizeURL(\"\" + value);\n          target.push(\n            attributeSeparator,\n            stringToChunk(name),\n            attributeAssign,\n            stringToChunk(escapeTextForBrowser(value)),\n            attributeEnd\n          );\n          break;\n        case \"defaultValue\":\n        case \"defaultChecked\":\n        case \"innerHTML\":\n        case \"suppressContentEditableWarning\":\n        case \"suppressHydrationWarning\":\n        case \"ref\":\n          break;\n        case \"autoFocus\":\n        case \"multiple\":\n        case \"muted\":\n          pushBooleanAttribute(target, name.toLowerCase(), value);\n          break;\n        case \"xlinkHref\":\n          if (\n            \"function\" === typeof value ||\n            \"symbol\" === typeof value ||\n            \"boolean\" === typeof value\n          )\n            break;\n          checkAttributeStringCoercion(value, name);\n          value = sanitizeURL(\"\" + value);\n          target.push(\n            attributeSeparator,\n            stringToChunk(\"xlink:href\"),\n            attributeAssign,\n            stringToChunk(escapeTextForBrowser(value)),\n            attributeEnd\n          );\n          break;\n        case \"contentEditable\":\n        case \"spellCheck\":\n        case \"draggable\":\n        case \"value\":\n        case \"autoReverse\":\n        case \"externalResourcesRequired\":\n        case \"focusable\":\n        case \"preserveAlpha\":\n          \"function\" !== typeof value &&\n            \"symbol\" !== typeof value &&\n            target.push(\n              attributeSeparator,\n              stringToChunk(name),\n              attributeAssign,\n              stringToChunk(escapeTextForBrowser(value)),\n              attributeEnd\n            );\n          break;\n        case \"inert\":\n          \"\" !== value ||\n            didWarnForNewBooleanPropsWithEmptyValue[name] ||\n            ((didWarnForNewBooleanPropsWithEmptyValue[name] = !0),\n            console.error(\n              \"Received an empty string for a boolean attribute `%s`. This will treat the attribute as if it were false. Either pass `false` to silence this warning, or pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.\",\n              name\n            ));\n        case \"allowFullScreen\":\n        case \"async\":\n        case \"autoPlay\":\n        case \"controls\":\n        case \"default\":\n        case \"defer\":\n        case \"disabled\":\n        case \"disablePictureInPicture\":\n        case \"disableRemotePlayback\":\n        case \"formNoValidate\":\n        case \"hidden\":\n        case \"loop\":\n        case \"noModule\":\n        case \"noValidate\":\n        case \"open\":\n        case \"playsInline\":\n        case \"readOnly\":\n        case \"required\":\n        case \"reversed\":\n        case \"scoped\":\n        case \"seamless\":\n        case \"itemScope\":\n          value &&\n            \"function\" !== typeof value &&\n            \"symbol\" !== typeof value &&\n            target.push(\n              attributeSeparator,\n              stringToChunk(name),\n              attributeEmptyString\n            );\n          break;\n        case \"capture\":\n        case \"download\":\n          !0 === value\n            ? target.push(\n                attributeSeparator,\n                stringToChunk(name),\n                attributeEmptyString\n              )\n            : !1 !== value &&\n              \"function\" !== typeof value &&\n              \"symbol\" !== typeof value &&\n              target.push(\n                attributeSeparator,\n                stringToChunk(name),\n                attributeAssign,\n                stringToChunk(escapeTextForBrowser(value)),\n                attributeEnd\n              );\n          break;\n        case \"cols\":\n        case \"rows\":\n        case \"size\":\n        case \"span\":\n          \"function\" !== typeof value &&\n            \"symbol\" !== typeof value &&\n            !isNaN(value) &&\n            1 <= value &&\n            target.push(\n              attributeSeparator,\n              stringToChunk(name),\n              attributeAssign,\n              stringToChunk(escapeTextForBrowser(value)),\n              attributeEnd\n            );\n          break;\n        case \"rowSpan\":\n        case \"start\":\n          \"function\" === typeof value ||\n            \"symbol\" === typeof value ||\n            isNaN(value) ||\n            target.push(\n              attributeSeparator,\n              stringToChunk(name),\n              attributeAssign,\n              stringToChunk(escapeTextForBrowser(value)),\n              attributeEnd\n            );\n          break;\n        case \"xlinkActuate\":\n          pushStringAttribute(target, \"xlink:actuate\", value);\n          break;\n        case \"xlinkArcrole\":\n          pushStringAttribute(target, \"xlink:arcrole\", value);\n          break;\n        case \"xlinkRole\":\n          pushStringAttribute(target, \"xlink:role\", value);\n          break;\n        case \"xlinkShow\":\n          pushStringAttribute(target, \"xlink:show\", value);\n          break;\n        case \"xlinkTitle\":\n          pushStringAttribute(target, \"xlink:title\", value);\n          break;\n        case \"xlinkType\":\n          pushStringAttribute(target, \"xlink:type\", value);\n          break;\n        case \"xmlBase\":\n          pushStringAttribute(target, \"xml:base\", value);\n          break;\n        case \"xmlLang\":\n          pushStringAttribute(target, \"xml:lang\", value);\n          break;\n        case \"xmlSpace\":\n          pushStringAttribute(target, \"xml:space\", value);\n          break;\n        default:\n          if (\n            !(2 < name.length) ||\n            (\"o\" !== name[0] && \"O\" !== name[0]) ||\n            (\"n\" !== name[1] && \"N\" !== name[1])\n          )\n            if (\n              ((name = aliases.get(name) || name), isAttributeNameSafe(name))\n            ) {\n              switch (typeof value) {\n                case \"function\":\n                case \"symbol\":\n                  return;\n                case \"boolean\":\n                  var prefix = name.toLowerCase().slice(0, 5);\n                  if (\"data-\" !== prefix && \"aria-\" !== prefix) return;\n              }\n              target.push(\n                attributeSeparator,\n                stringToChunk(name),\n                attributeAssign,\n                stringToChunk(escapeTextForBrowser(value)),\n                attributeEnd\n              );\n            }\n      }\n    }\n    function pushInnerHTML(target, innerHTML, children) {\n      if (null != innerHTML) {\n        if (null != children)\n          throw Error(\n            \"Can only set one of `children` or `props.dangerouslySetInnerHTML`.\"\n          );\n        if (\"object\" !== typeof innerHTML || !(\"__html\" in innerHTML))\n          throw Error(\n            \"`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.\"\n          );\n        innerHTML = innerHTML.__html;\n        null !== innerHTML &&\n          void 0 !== innerHTML &&\n          (checkHtmlStringCoercion(innerHTML),\n          target.push(stringToChunk(\"\" + innerHTML)));\n      }\n    }\n    function checkSelectProp(props, propName) {\n      var value = props[propName];\n      null != value &&\n        ((value = isArrayImpl(value)),\n        props.multiple && !value\n          ? console.error(\n              \"The `%s` prop supplied to <select> must be an array if `multiple` is true.\",\n              propName\n            )\n          : !props.multiple &&\n            value &&\n            console.error(\n              \"The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.\",\n              propName\n            ));\n    }\n    function flattenOptionChildren(children) {\n      var content = \"\";\n      React.Children.forEach(children, function (child) {\n        null != child &&\n          ((content += child),\n          didWarnInvalidOptionChildren ||\n            \"string\" === typeof child ||\n            \"number\" === typeof child ||\n            \"bigint\" === typeof child ||\n            ((didWarnInvalidOptionChildren = !0),\n            console.error(\n              \"Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>.\"\n            )));\n      });\n      return content;\n    }\n    function injectFormReplayingRuntime(resumableState, renderState) {\n      if ((resumableState.instructions & 16) === NothingSent) {\n        resumableState.instructions |= 16;\n        var preamble = renderState.preamble,\n          bootstrapChunks = renderState.bootstrapChunks;\n        (preamble.htmlChunks || preamble.headChunks) &&\n        0 === bootstrapChunks.length\n          ? (bootstrapChunks.push(renderState.startInlineScript),\n            pushCompletedShellIdAttribute(bootstrapChunks, resumableState),\n            bootstrapChunks.push(\n              endOfStartTag,\n              formReplayingRuntimeScript,\n              endInlineScript\n            ))\n          : bootstrapChunks.unshift(\n              renderState.startInlineScript,\n              endOfStartTag,\n              formReplayingRuntimeScript,\n              endInlineScript\n            );\n      }\n    }\n    function pushLinkImpl(target, props) {\n      target.push(startChunkForTag(\"link\"));\n      for (var propKey in props)\n        if (hasOwnProperty.call(props, propKey)) {\n          var propValue = props[propKey];\n          if (null != propValue)\n            switch (propKey) {\n              case \"children\":\n              case \"dangerouslySetInnerHTML\":\n                throw Error(\n                  \"link is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`.\"\n                );\n              default:\n                pushAttribute(target, propKey, propValue);\n            }\n        }\n      target.push(endOfStartTagSelfClosing);\n      return null;\n    }\n    function escapeStyleTextContent(styleText) {\n      checkHtmlStringCoercion(styleText);\n      return (\"\" + styleText).replace(styleRegex, styleReplacer);\n    }\n    function pushSelfClosing(target, props, tag) {\n      target.push(startChunkForTag(tag));\n      for (var propKey in props)\n        if (hasOwnProperty.call(props, propKey)) {\n          var propValue = props[propKey];\n          if (null != propValue)\n            switch (propKey) {\n              case \"children\":\n              case \"dangerouslySetInnerHTML\":\n                throw Error(\n                  tag +\n                    \" is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`.\"\n                );\n              default:\n                pushAttribute(target, propKey, propValue);\n            }\n        }\n      target.push(endOfStartTagSelfClosing);\n      return null;\n    }\n    function pushTitleImpl(target, props) {\n      target.push(startChunkForTag(\"title\"));\n      var children = null,\n        innerHTML = null,\n        propKey;\n      for (propKey in props)\n        if (hasOwnProperty.call(props, propKey)) {\n          var propValue = props[propKey];\n          if (null != propValue)\n            switch (propKey) {\n              case \"children\":\n                children = propValue;\n                break;\n              case \"dangerouslySetInnerHTML\":\n                innerHTML = propValue;\n                break;\n              default:\n                pushAttribute(target, propKey, propValue);\n            }\n        }\n      target.push(endOfStartTag);\n      props = Array.isArray(children)\n        ? 2 > children.length\n          ? children[0]\n          : null\n        : children;\n      \"function\" !== typeof props &&\n        \"symbol\" !== typeof props &&\n        null !== props &&\n        void 0 !== props &&\n        target.push(stringToChunk(escapeTextForBrowser(\"\" + props)));\n      pushInnerHTML(target, innerHTML, children);\n      target.push(endChunkForTag(\"title\"));\n      return null;\n    }\n    function pushScriptImpl(target, props) {\n      target.push(startChunkForTag(\"script\"));\n      var children = null,\n        innerHTML = null,\n        propKey;\n      for (propKey in props)\n        if (hasOwnProperty.call(props, propKey)) {\n          var propValue = props[propKey];\n          if (null != propValue)\n            switch (propKey) {\n              case \"children\":\n                children = propValue;\n                break;\n              case \"dangerouslySetInnerHTML\":\n                innerHTML = propValue;\n                break;\n              default:\n                pushAttribute(target, propKey, propValue);\n            }\n        }\n      target.push(endOfStartTag);\n      null != children &&\n        \"string\" !== typeof children &&\n        ((props =\n          \"number\" === typeof children\n            ? \"a number for children\"\n            : Array.isArray(children)\n              ? \"an array for children\"\n              : \"something unexpected for children\"),\n        console.error(\n          \"A script element was rendered with %s. If script element has children it must be a single string. Consider using dangerouslySetInnerHTML or passing a plain string as children.\",\n          props\n        ));\n      pushInnerHTML(target, innerHTML, children);\n      \"string\" === typeof children &&\n        target.push(stringToChunk(escapeEntireInlineScriptContent(children)));\n      target.push(endChunkForTag(\"script\"));\n      return null;\n    }\n    function pushStartSingletonElement(target, props, tag) {\n      target.push(startChunkForTag(tag));\n      var innerHTML = (tag = null),\n        propKey;\n      for (propKey in props)\n        if (hasOwnProperty.call(props, propKey)) {\n          var propValue = props[propKey];\n          if (null != propValue)\n            switch (propKey) {\n              case \"children\":\n                tag = propValue;\n                break;\n              case \"dangerouslySetInnerHTML\":\n                innerHTML = propValue;\n                break;\n              default:\n                pushAttribute(target, propKey, propValue);\n            }\n        }\n      target.push(endOfStartTag);\n      pushInnerHTML(target, innerHTML, tag);\n      return tag;\n    }\n    function pushStartGenericElement(target, props, tag) {\n      target.push(startChunkForTag(tag));\n      var innerHTML = (tag = null),\n        propKey;\n      for (propKey in props)\n        if (hasOwnProperty.call(props, propKey)) {\n          var propValue = props[propKey];\n          if (null != propValue)\n            switch (propKey) {\n              case \"children\":\n                tag = propValue;\n                break;\n              case \"dangerouslySetInnerHTML\":\n                innerHTML = propValue;\n                break;\n              default:\n                pushAttribute(target, propKey, propValue);\n            }\n        }\n      target.push(endOfStartTag);\n      pushInnerHTML(target, innerHTML, tag);\n      return \"string\" === typeof tag\n        ? (target.push(stringToChunk(escapeTextForBrowser(tag))), null)\n        : tag;\n    }\n    function startChunkForTag(tag) {\n      var tagStartChunk = validatedTagCache.get(tag);\n      if (void 0 === tagStartChunk) {\n        if (!VALID_TAG_REGEX.test(tag)) throw Error(\"Invalid tag: \" + tag);\n        tagStartChunk = stringToPrecomputedChunk(\"<\" + tag);\n        validatedTagCache.set(tag, tagStartChunk);\n      }\n      return tagStartChunk;\n    }\n    function pushStartInstance(\n      target$jscomp$0,\n      type,\n      props,\n      resumableState,\n      renderState,\n      preambleState,\n      hoistableState,\n      formatContext,\n      textEmbedded\n    ) {\n      validateProperties$2(type, props);\n      (\"input\" !== type && \"textarea\" !== type && \"select\" !== type) ||\n        null == props ||\n        null !== props.value ||\n        didWarnValueNull ||\n        ((didWarnValueNull = !0),\n        \"select\" === type && props.multiple\n          ? console.error(\n              \"`value` prop on `%s` should not be null. Consider using an empty array when `multiple` is set to `true` to clear the component or `undefined` for uncontrolled components.\",\n              type\n            )\n          : console.error(\n              \"`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.\",\n              type\n            ));\n      b: if (-1 === type.indexOf(\"-\")) var JSCompiler_inline_result = !1;\n      else\n        switch (type) {\n          case \"annotation-xml\":\n          case \"color-profile\":\n          case \"font-face\":\n          case \"font-face-src\":\n          case \"font-face-uri\":\n          case \"font-face-format\":\n          case \"font-face-name\":\n          case \"missing-glyph\":\n            JSCompiler_inline_result = !1;\n            break b;\n          default:\n            JSCompiler_inline_result = !0;\n        }\n      JSCompiler_inline_result ||\n        \"string\" === typeof props.is ||\n        warnUnknownProperties(type, props, null);\n      !props.suppressContentEditableWarning &&\n        props.contentEditable &&\n        null != props.children &&\n        console.error(\n          \"A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional.\"\n        );\n      formatContext.insertionMode !== SVG_MODE &&\n        formatContext.insertionMode !== MATHML_MODE &&\n        -1 === type.indexOf(\"-\") &&\n        type.toLowerCase() !== type &&\n        console.error(\n          \"<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.\",\n          type\n        );\n      switch (type) {\n        case \"div\":\n        case \"span\":\n        case \"svg\":\n        case \"path\":\n          break;\n        case \"a\":\n          target$jscomp$0.push(startChunkForTag(\"a\"));\n          var children = null,\n            innerHTML = null,\n            propKey;\n          for (propKey in props)\n            if (hasOwnProperty.call(props, propKey)) {\n              var propValue = props[propKey];\n              if (null != propValue)\n                switch (propKey) {\n                  case \"children\":\n                    children = propValue;\n                    break;\n                  case \"dangerouslySetInnerHTML\":\n                    innerHTML = propValue;\n                    break;\n                  case \"href\":\n                    \"\" === propValue\n                      ? pushStringAttribute(target$jscomp$0, \"href\", \"\")\n                      : pushAttribute(target$jscomp$0, propKey, propValue);\n                    break;\n                  default:\n                    pushAttribute(target$jscomp$0, propKey, propValue);\n                }\n            }\n          target$jscomp$0.push(endOfStartTag);\n          pushInnerHTML(target$jscomp$0, innerHTML, children);\n          if (\"string\" === typeof children) {\n            target$jscomp$0.push(stringToChunk(escapeTextForBrowser(children)));\n            var JSCompiler_inline_result$jscomp$0 = null;\n          } else JSCompiler_inline_result$jscomp$0 = children;\n          return JSCompiler_inline_result$jscomp$0;\n        case \"g\":\n        case \"p\":\n        case \"li\":\n          break;\n        case \"select\":\n          checkControlledValueProps(\"select\", props);\n          checkSelectProp(props, \"value\");\n          checkSelectProp(props, \"defaultValue\");\n          void 0 === props.value ||\n            void 0 === props.defaultValue ||\n            didWarnDefaultSelectValue ||\n            (console.error(\n              \"Select elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled select element and remove one of these props. More info: https://react.dev/link/controlled-components\"\n            ),\n            (didWarnDefaultSelectValue = !0));\n          target$jscomp$0.push(startChunkForTag(\"select\"));\n          var children$jscomp$0 = null,\n            innerHTML$jscomp$0 = null,\n            propKey$jscomp$0;\n          for (propKey$jscomp$0 in props)\n            if (hasOwnProperty.call(props, propKey$jscomp$0)) {\n              var propValue$jscomp$0 = props[propKey$jscomp$0];\n              if (null != propValue$jscomp$0)\n                switch (propKey$jscomp$0) {\n                  case \"children\":\n                    children$jscomp$0 = propValue$jscomp$0;\n                    break;\n                  case \"dangerouslySetInnerHTML\":\n                    innerHTML$jscomp$0 = propValue$jscomp$0;\n                    break;\n                  case \"defaultValue\":\n                  case \"value\":\n                    break;\n                  default:\n                    pushAttribute(\n                      target$jscomp$0,\n                      propKey$jscomp$0,\n                      propValue$jscomp$0\n                    );\n                }\n            }\n          target$jscomp$0.push(endOfStartTag);\n          pushInnerHTML(target$jscomp$0, innerHTML$jscomp$0, children$jscomp$0);\n          return children$jscomp$0;\n        case \"option\":\n          var selectedValue = formatContext.selectedValue;\n          target$jscomp$0.push(startChunkForTag(\"option\"));\n          var children$jscomp$1 = null,\n            value = null,\n            selected = null,\n            innerHTML$jscomp$1 = null,\n            propKey$jscomp$1;\n          for (propKey$jscomp$1 in props)\n            if (hasOwnProperty.call(props, propKey$jscomp$1)) {\n              var propValue$jscomp$1 = props[propKey$jscomp$1];\n              if (null != propValue$jscomp$1)\n                switch (propKey$jscomp$1) {\n                  case \"children\":\n                    children$jscomp$1 = propValue$jscomp$1;\n                    break;\n                  case \"selected\":\n                    selected = propValue$jscomp$1;\n                    didWarnSelectedSetOnOption ||\n                      (console.error(\n                        \"Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>.\"\n                      ),\n                      (didWarnSelectedSetOnOption = !0));\n                    break;\n                  case \"dangerouslySetInnerHTML\":\n                    innerHTML$jscomp$1 = propValue$jscomp$1;\n                    break;\n                  case \"value\":\n                    value = propValue$jscomp$1;\n                  default:\n                    pushAttribute(\n                      target$jscomp$0,\n                      propKey$jscomp$1,\n                      propValue$jscomp$1\n                    );\n                }\n            }\n          if (null != selectedValue) {\n            if (null !== value) {\n              checkAttributeStringCoercion(value, \"value\");\n              var stringValue = \"\" + value;\n            } else\n              null === innerHTML$jscomp$1 ||\n                didWarnInvalidOptionInnerHTML ||\n                ((didWarnInvalidOptionInnerHTML = !0),\n                console.error(\n                  \"Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected.\"\n                )),\n                (stringValue = flattenOptionChildren(children$jscomp$1));\n            if (isArrayImpl(selectedValue))\n              for (var i = 0; i < selectedValue.length; i++) {\n                if (\n                  (checkAttributeStringCoercion(selectedValue[i], \"value\"),\n                  \"\" + selectedValue[i] === stringValue)\n                ) {\n                  target$jscomp$0.push(selectedMarkerAttribute);\n                  break;\n                }\n              }\n            else\n              checkAttributeStringCoercion(selectedValue, \"select.value\"),\n                \"\" + selectedValue === stringValue &&\n                  target$jscomp$0.push(selectedMarkerAttribute);\n          } else selected && target$jscomp$0.push(selectedMarkerAttribute);\n          target$jscomp$0.push(endOfStartTag);\n          pushInnerHTML(target$jscomp$0, innerHTML$jscomp$1, children$jscomp$1);\n          return children$jscomp$1;\n        case \"textarea\":\n          checkControlledValueProps(\"textarea\", props);\n          void 0 === props.value ||\n            void 0 === props.defaultValue ||\n            didWarnDefaultTextareaValue ||\n            (console.error(\n              \"Textarea elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled textarea and remove one of these props. More info: https://react.dev/link/controlled-components\"\n            ),\n            (didWarnDefaultTextareaValue = !0));\n          target$jscomp$0.push(startChunkForTag(\"textarea\"));\n          var value$jscomp$0 = null,\n            defaultValue = null,\n            children$jscomp$2 = null,\n            propKey$jscomp$2;\n          for (propKey$jscomp$2 in props)\n            if (hasOwnProperty.call(props, propKey$jscomp$2)) {\n              var propValue$jscomp$2 = props[propKey$jscomp$2];\n              if (null != propValue$jscomp$2)\n                switch (propKey$jscomp$2) {\n                  case \"children\":\n                    children$jscomp$2 = propValue$jscomp$2;\n                    break;\n                  case \"value\":\n                    value$jscomp$0 = propValue$jscomp$2;\n                    break;\n                  case \"defaultValue\":\n                    defaultValue = propValue$jscomp$2;\n                    break;\n                  case \"dangerouslySetInnerHTML\":\n                    throw Error(\n                      \"`dangerouslySetInnerHTML` does not make sense on <textarea>.\"\n                    );\n                  default:\n                    pushAttribute(\n                      target$jscomp$0,\n                      propKey$jscomp$2,\n                      propValue$jscomp$2\n                    );\n                }\n            }\n          null === value$jscomp$0 &&\n            null !== defaultValue &&\n            (value$jscomp$0 = defaultValue);\n          target$jscomp$0.push(endOfStartTag);\n          if (null != children$jscomp$2) {\n            console.error(\n              \"Use the `defaultValue` or `value` props instead of setting children on <textarea>.\"\n            );\n            if (null != value$jscomp$0)\n              throw Error(\n                \"If you supply `defaultValue` on a <textarea>, do not pass children.\"\n              );\n            if (isArrayImpl(children$jscomp$2)) {\n              if (1 < children$jscomp$2.length)\n                throw Error(\"<textarea> can only have at most one child.\");\n              checkHtmlStringCoercion(children$jscomp$2[0]);\n              value$jscomp$0 = \"\" + children$jscomp$2[0];\n            }\n            checkHtmlStringCoercion(children$jscomp$2);\n            value$jscomp$0 = \"\" + children$jscomp$2;\n          }\n          \"string\" === typeof value$jscomp$0 &&\n            \"\\n\" === value$jscomp$0[0] &&\n            target$jscomp$0.push(leadingNewline);\n          null !== value$jscomp$0 &&\n            (checkAttributeStringCoercion(value$jscomp$0, \"value\"),\n            target$jscomp$0.push(\n              stringToChunk(escapeTextForBrowser(\"\" + value$jscomp$0))\n            ));\n          return null;\n        case \"input\":\n          checkControlledValueProps(\"input\", props);\n          target$jscomp$0.push(startChunkForTag(\"input\"));\n          var name = null,\n            formAction = null,\n            formEncType = null,\n            formMethod = null,\n            formTarget = null,\n            value$jscomp$1 = null,\n            defaultValue$jscomp$0 = null,\n            checked = null,\n            defaultChecked = null,\n            propKey$jscomp$3;\n          for (propKey$jscomp$3 in props)\n            if (hasOwnProperty.call(props, propKey$jscomp$3)) {\n              var propValue$jscomp$3 = props[propKey$jscomp$3];\n              if (null != propValue$jscomp$3)\n                switch (propKey$jscomp$3) {\n                  case \"children\":\n                  case \"dangerouslySetInnerHTML\":\n                    throw Error(\n                      \"input is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`.\"\n                    );\n                  case \"name\":\n                    name = propValue$jscomp$3;\n                    break;\n                  case \"formAction\":\n                    formAction = propValue$jscomp$3;\n                    break;\n                  case \"formEncType\":\n                    formEncType = propValue$jscomp$3;\n                    break;\n                  case \"formMethod\":\n                    formMethod = propValue$jscomp$3;\n                    break;\n                  case \"formTarget\":\n                    formTarget = propValue$jscomp$3;\n                    break;\n                  case \"defaultChecked\":\n                    defaultChecked = propValue$jscomp$3;\n                    break;\n                  case \"defaultValue\":\n                    defaultValue$jscomp$0 = propValue$jscomp$3;\n                    break;\n                  case \"checked\":\n                    checked = propValue$jscomp$3;\n                    break;\n                  case \"value\":\n                    value$jscomp$1 = propValue$jscomp$3;\n                    break;\n                  default:\n                    pushAttribute(\n                      target$jscomp$0,\n                      propKey$jscomp$3,\n                      propValue$jscomp$3\n                    );\n                }\n            }\n          null === formAction ||\n            \"image\" === props.type ||\n            \"submit\" === props.type ||\n            didWarnFormActionType ||\n            ((didWarnFormActionType = !0),\n            console.error(\n              'An input can only specify a formAction along with type=\"submit\" or type=\"image\".'\n            ));\n          var formData = pushFormActionAttribute(\n            target$jscomp$0,\n            resumableState,\n            renderState,\n            formAction,\n            formEncType,\n            formMethod,\n            formTarget,\n            name\n          );\n          null === checked ||\n            null === defaultChecked ||\n            didWarnDefaultChecked ||\n            (console.error(\n              \"%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components\",\n              \"A component\",\n              props.type\n            ),\n            (didWarnDefaultChecked = !0));\n          null === value$jscomp$1 ||\n            null === defaultValue$jscomp$0 ||\n            didWarnDefaultInputValue ||\n            (console.error(\n              \"%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components\",\n              \"A component\",\n              props.type\n            ),\n            (didWarnDefaultInputValue = !0));\n          null !== checked\n            ? pushBooleanAttribute(target$jscomp$0, \"checked\", checked)\n            : null !== defaultChecked &&\n              pushBooleanAttribute(target$jscomp$0, \"checked\", defaultChecked);\n          null !== value$jscomp$1\n            ? pushAttribute(target$jscomp$0, \"value\", value$jscomp$1)\n            : null !== defaultValue$jscomp$0 &&\n              pushAttribute(target$jscomp$0, \"value\", defaultValue$jscomp$0);\n          target$jscomp$0.push(endOfStartTagSelfClosing);\n          null != formData &&\n            formData.forEach(pushAdditionalFormField, target$jscomp$0);\n          return null;\n        case \"button\":\n          target$jscomp$0.push(startChunkForTag(\"button\"));\n          var children$jscomp$3 = null,\n            innerHTML$jscomp$2 = null,\n            name$jscomp$0 = null,\n            formAction$jscomp$0 = null,\n            formEncType$jscomp$0 = null,\n            formMethod$jscomp$0 = null,\n            formTarget$jscomp$0 = null,\n            propKey$jscomp$4;\n          for (propKey$jscomp$4 in props)\n            if (hasOwnProperty.call(props, propKey$jscomp$4)) {\n              var propValue$jscomp$4 = props[propKey$jscomp$4];\n              if (null != propValue$jscomp$4)\n                switch (propKey$jscomp$4) {\n                  case \"children\":\n                    children$jscomp$3 = propValue$jscomp$4;\n                    break;\n                  case \"dangerouslySetInnerHTML\":\n                    innerHTML$jscomp$2 = propValue$jscomp$4;\n                    break;\n                  case \"name\":\n                    name$jscomp$0 = propValue$jscomp$4;\n                    break;\n                  case \"formAction\":\n                    formAction$jscomp$0 = propValue$jscomp$4;\n                    break;\n                  case \"formEncType\":\n                    formEncType$jscomp$0 = propValue$jscomp$4;\n                    break;\n                  case \"formMethod\":\n                    formMethod$jscomp$0 = propValue$jscomp$4;\n                    break;\n                  case \"formTarget\":\n                    formTarget$jscomp$0 = propValue$jscomp$4;\n                    break;\n                  default:\n                    pushAttribute(\n                      target$jscomp$0,\n                      propKey$jscomp$4,\n                      propValue$jscomp$4\n                    );\n                }\n            }\n          null === formAction$jscomp$0 ||\n            null == props.type ||\n            \"submit\" === props.type ||\n            didWarnFormActionType ||\n            ((didWarnFormActionType = !0),\n            console.error(\n              'A button can only specify a formAction along with type=\"submit\" or no type.'\n            ));\n          var formData$jscomp$0 = pushFormActionAttribute(\n            target$jscomp$0,\n            resumableState,\n            renderState,\n            formAction$jscomp$0,\n            formEncType$jscomp$0,\n            formMethod$jscomp$0,\n            formTarget$jscomp$0,\n            name$jscomp$0\n          );\n          target$jscomp$0.push(endOfStartTag);\n          null != formData$jscomp$0 &&\n            formData$jscomp$0.forEach(pushAdditionalFormField, target$jscomp$0);\n          pushInnerHTML(target$jscomp$0, innerHTML$jscomp$2, children$jscomp$3);\n          if (\"string\" === typeof children$jscomp$3) {\n            target$jscomp$0.push(\n              stringToChunk(escapeTextForBrowser(children$jscomp$3))\n            );\n            var JSCompiler_inline_result$jscomp$1 = null;\n          } else JSCompiler_inline_result$jscomp$1 = children$jscomp$3;\n          return JSCompiler_inline_result$jscomp$1;\n        case \"form\":\n          target$jscomp$0.push(startChunkForTag(\"form\"));\n          var children$jscomp$4 = null,\n            innerHTML$jscomp$3 = null,\n            formAction$jscomp$1 = null,\n            formEncType$jscomp$1 = null,\n            formMethod$jscomp$1 = null,\n            formTarget$jscomp$1 = null,\n            propKey$jscomp$5;\n          for (propKey$jscomp$5 in props)\n            if (hasOwnProperty.call(props, propKey$jscomp$5)) {\n              var propValue$jscomp$5 = props[propKey$jscomp$5];\n              if (null != propValue$jscomp$5)\n                switch (propKey$jscomp$5) {\n                  case \"children\":\n                    children$jscomp$4 = propValue$jscomp$5;\n                    break;\n                  case \"dangerouslySetInnerHTML\":\n                    innerHTML$jscomp$3 = propValue$jscomp$5;\n                    break;\n                  case \"action\":\n                    formAction$jscomp$1 = propValue$jscomp$5;\n                    break;\n                  case \"encType\":\n                    formEncType$jscomp$1 = propValue$jscomp$5;\n                    break;\n                  case \"method\":\n                    formMethod$jscomp$1 = propValue$jscomp$5;\n                    break;\n                  case \"target\":\n                    formTarget$jscomp$1 = propValue$jscomp$5;\n                    break;\n                  default:\n                    pushAttribute(\n                      target$jscomp$0,\n                      propKey$jscomp$5,\n                      propValue$jscomp$5\n                    );\n                }\n            }\n          var formData$jscomp$1 = null,\n            formActionName = null;\n          if (\"function\" === typeof formAction$jscomp$1) {\n            (null === formEncType$jscomp$1 && null === formMethod$jscomp$1) ||\n              didWarnFormActionMethod ||\n              ((didWarnFormActionMethod = !0),\n              console.error(\n                \"Cannot specify a encType or method for a form that specifies a function as the action. React provides those automatically. They will get overridden.\"\n              ));\n            null === formTarget$jscomp$1 ||\n              didWarnFormActionTarget ||\n              ((didWarnFormActionTarget = !0),\n              console.error(\n                \"Cannot specify a target for a form that specifies a function as the action. The function will always be executed in the same window.\"\n              ));\n            var customFields = getCustomFormFields(\n              resumableState,\n              formAction$jscomp$1\n            );\n            null !== customFields\n              ? ((formAction$jscomp$1 = customFields.action || \"\"),\n                (formEncType$jscomp$1 = customFields.encType),\n                (formMethod$jscomp$1 = customFields.method),\n                (formTarget$jscomp$1 = customFields.target),\n                (formData$jscomp$1 = customFields.data),\n                (formActionName = customFields.name))\n              : (target$jscomp$0.push(\n                  attributeSeparator,\n                  stringToChunk(\"action\"),\n                  attributeAssign,\n                  actionJavaScriptURL,\n                  attributeEnd\n                ),\n                (formTarget$jscomp$1 =\n                  formMethod$jscomp$1 =\n                  formEncType$jscomp$1 =\n                  formAction$jscomp$1 =\n                    null),\n                injectFormReplayingRuntime(resumableState, renderState));\n          }\n          null != formAction$jscomp$1 &&\n            pushAttribute(target$jscomp$0, \"action\", formAction$jscomp$1);\n          null != formEncType$jscomp$1 &&\n            pushAttribute(target$jscomp$0, \"encType\", formEncType$jscomp$1);\n          null != formMethod$jscomp$1 &&\n            pushAttribute(target$jscomp$0, \"method\", formMethod$jscomp$1);\n          null != formTarget$jscomp$1 &&\n            pushAttribute(target$jscomp$0, \"target\", formTarget$jscomp$1);\n          target$jscomp$0.push(endOfStartTag);\n          null !== formActionName &&\n            (target$jscomp$0.push(startHiddenInputChunk),\n            pushStringAttribute(target$jscomp$0, \"name\", formActionName),\n            target$jscomp$0.push(endOfStartTagSelfClosing),\n            null != formData$jscomp$1 &&\n              formData$jscomp$1.forEach(\n                pushAdditionalFormField,\n                target$jscomp$0\n              ));\n          pushInnerHTML(target$jscomp$0, innerHTML$jscomp$3, children$jscomp$4);\n          if (\"string\" === typeof children$jscomp$4) {\n            target$jscomp$0.push(\n              stringToChunk(escapeTextForBrowser(children$jscomp$4))\n            );\n            var JSCompiler_inline_result$jscomp$2 = null;\n          } else JSCompiler_inline_result$jscomp$2 = children$jscomp$4;\n          return JSCompiler_inline_result$jscomp$2;\n        case \"menuitem\":\n          target$jscomp$0.push(startChunkForTag(\"menuitem\"));\n          for (var propKey$jscomp$6 in props)\n            if (hasOwnProperty.call(props, propKey$jscomp$6)) {\n              var propValue$jscomp$6 = props[propKey$jscomp$6];\n              if (null != propValue$jscomp$6)\n                switch (propKey$jscomp$6) {\n                  case \"children\":\n                  case \"dangerouslySetInnerHTML\":\n                    throw Error(\n                      \"menuitems cannot have `children` nor `dangerouslySetInnerHTML`.\"\n                    );\n                  default:\n                    pushAttribute(\n                      target$jscomp$0,\n                      propKey$jscomp$6,\n                      propValue$jscomp$6\n                    );\n                }\n            }\n          target$jscomp$0.push(endOfStartTag);\n          return null;\n        case \"object\":\n          target$jscomp$0.push(startChunkForTag(\"object\"));\n          var children$jscomp$5 = null,\n            innerHTML$jscomp$4 = null,\n            propKey$jscomp$7;\n          for (propKey$jscomp$7 in props)\n            if (hasOwnProperty.call(props, propKey$jscomp$7)) {\n              var propValue$jscomp$7 = props[propKey$jscomp$7];\n              if (null != propValue$jscomp$7)\n                switch (propKey$jscomp$7) {\n                  case \"children\":\n                    children$jscomp$5 = propValue$jscomp$7;\n                    break;\n                  case \"dangerouslySetInnerHTML\":\n                    innerHTML$jscomp$4 = propValue$jscomp$7;\n                    break;\n                  case \"data\":\n                    checkAttributeStringCoercion(propValue$jscomp$7, \"data\");\n                    var sanitizedValue = sanitizeURL(\"\" + propValue$jscomp$7);\n                    if (\"\" === sanitizedValue) {\n                      console.error(\n                        'An empty string (\"\") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',\n                        propKey$jscomp$7,\n                        propKey$jscomp$7\n                      );\n                      break;\n                    }\n                    target$jscomp$0.push(\n                      attributeSeparator,\n                      stringToChunk(\"data\"),\n                      attributeAssign,\n                      stringToChunk(escapeTextForBrowser(sanitizedValue)),\n                      attributeEnd\n                    );\n                    break;\n                  default:\n                    pushAttribute(\n                      target$jscomp$0,\n                      propKey$jscomp$7,\n                      propValue$jscomp$7\n                    );\n                }\n            }\n          target$jscomp$0.push(endOfStartTag);\n          pushInnerHTML(target$jscomp$0, innerHTML$jscomp$4, children$jscomp$5);\n          if (\"string\" === typeof children$jscomp$5) {\n            target$jscomp$0.push(\n              stringToChunk(escapeTextForBrowser(children$jscomp$5))\n            );\n            var JSCompiler_inline_result$jscomp$3 = null;\n          } else JSCompiler_inline_result$jscomp$3 = children$jscomp$5;\n          return JSCompiler_inline_result$jscomp$3;\n        case \"title\":\n          var noscriptTagInScope = formatContext.tagScope & 1,\n            isFallback = formatContext.tagScope & 4;\n          if (hasOwnProperty.call(props, \"children\")) {\n            var children$jscomp$6 = props.children,\n              child = Array.isArray(children$jscomp$6)\n                ? 2 > children$jscomp$6.length\n                  ? children$jscomp$6[0]\n                  : null\n                : children$jscomp$6;\n            Array.isArray(children$jscomp$6) && 1 < children$jscomp$6.length\n              ? console.error(\n                  \"React expects the `children` prop of <title> tags to be a string, number, bigint, or object with a novel `toString` method but found an Array with length %s instead. Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert `children` of <title> tags to a single string value which is why Arrays of length greater than 1 are not supported. When using JSX it can be common to combine text nodes and value nodes. For example: <title>hello {nameOfUser}</title>. While not immediately apparent, `children` in this case is an Array with length 2. If your `children` prop is using this form try rewriting it using a template string: <title>{`hello ${nameOfUser}`}</title>.\",\n                  children$jscomp$6.length\n                )\n              : \"function\" === typeof child || \"symbol\" === typeof child\n                ? console.error(\n                    \"React expect children of <title> tags to be a string, number, bigint, or object with a novel `toString` method but found %s instead. Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert children of <title> tags to a single string value.\",\n                    \"function\" === typeof child ? \"a Function\" : \"a Sybmol\"\n                  )\n                : child &&\n                  child.toString === {}.toString &&\n                  (null != child.$$typeof\n                    ? console.error(\n                        \"React expects the `children` prop of <title> tags to be a string, number, bigint, or object with a novel `toString` method but found an object that appears to be a React element which never implements a suitable `toString` method. Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert children of <title> tags to a single string value which is why rendering React elements is not supported. If the `children` of <title> is a React Component try moving the <title> tag into that component. If the `children` of <title> is some HTML markup change it to be Text only to be valid HTML.\"\n                      )\n                    : console.error(\n                        \"React expects the `children` prop of <title> tags to be a string, number, bigint, or object with a novel `toString` method but found an object that does not implement a suitable `toString` method. Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert children of <title> tags to a single string value. Using the default `toString` method available on every object is almost certainly an error. Consider whether the `children` of this <title> is an object in error and change it to a string or number value if so. Otherwise implement a `toString` method that React can use to produce a valid <title>.\"\n                      ));\n          }\n          if (\n            formatContext.insertionMode === SVG_MODE ||\n            noscriptTagInScope ||\n            null != props.itemProp\n          )\n            var JSCompiler_inline_result$jscomp$4 = pushTitleImpl(\n              target$jscomp$0,\n              props\n            );\n          else\n            isFallback\n              ? (JSCompiler_inline_result$jscomp$4 = null)\n              : (pushTitleImpl(renderState.hoistableChunks, props),\n                (JSCompiler_inline_result$jscomp$4 = void 0));\n          return JSCompiler_inline_result$jscomp$4;\n        case \"link\":\n          var noscriptTagInScope$jscomp$0 = formatContext.tagScope & 1,\n            isFallback$jscomp$0 = formatContext.tagScope & 4,\n            rel = props.rel,\n            href = props.href,\n            precedence = props.precedence;\n          if (\n            formatContext.insertionMode === SVG_MODE ||\n            noscriptTagInScope$jscomp$0 ||\n            null != props.itemProp ||\n            \"string\" !== typeof rel ||\n            \"string\" !== typeof href ||\n            \"\" === href\n          ) {\n            \"stylesheet\" === rel &&\n              \"string\" === typeof props.precedence &&\n              ((\"string\" === typeof href && href) ||\n                console.error(\n                  'React encountered a `<link rel=\"stylesheet\" .../>` with a `precedence` prop and expected the `href` prop to be a non-empty string but ecountered %s instead. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop ensure there is a non-empty string `href` prop as well, otherwise remove the `precedence` prop.',\n                  null === href\n                    ? \"`null`\"\n                    : void 0 === href\n                      ? \"`undefined`\"\n                      : \"\" === href\n                        ? \"an empty string\"\n                        : 'something with type \"' + typeof href + '\"'\n                ));\n            pushLinkImpl(target$jscomp$0, props);\n            var JSCompiler_inline_result$jscomp$5 = null;\n          } else if (\"stylesheet\" === props.rel)\n            if (\n              \"string\" !== typeof precedence ||\n              null != props.disabled ||\n              props.onLoad ||\n              props.onError\n            ) {\n              if (\"string\" === typeof precedence)\n                if (null != props.disabled)\n                  console.error(\n                    'React encountered a `<link rel=\"stylesheet\" .../>` with a `precedence` prop and a `disabled` prop. The presence of the `disabled` prop indicates an intent to manage the stylesheet active state from your from your Component code and React will not hoist or deduplicate this stylesheet. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop remove the `disabled` prop, otherwise remove the `precedence` prop.'\n                  );\n                else if (props.onLoad || props.onError) {\n                  var propDescription =\n                    props.onLoad && props.onError\n                      ? \"`onLoad` and `onError` props\"\n                      : props.onLoad\n                        ? \"`onLoad` prop\"\n                        : \"`onError` prop\";\n                  console.error(\n                    'React encountered a `<link rel=\"stylesheet\" .../>` with a `precedence` prop and %s. The presence of loading and error handlers indicates an intent to manage the stylesheet loading state from your from your Component code and React will not hoist or deduplicate this stylesheet. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop remove the %s, otherwise remove the `precedence` prop.',\n                    propDescription,\n                    propDescription\n                  );\n                }\n              JSCompiler_inline_result$jscomp$5 = pushLinkImpl(\n                target$jscomp$0,\n                props\n              );\n            } else {\n              var styleQueue = renderState.styles.get(precedence),\n                resourceState = resumableState.styleResources.hasOwnProperty(\n                  href\n                )\n                  ? resumableState.styleResources[href]\n                  : void 0;\n              if (resourceState !== EXISTS) {\n                resumableState.styleResources[href] = EXISTS;\n                styleQueue ||\n                  ((styleQueue = {\n                    precedence: stringToChunk(escapeTextForBrowser(precedence)),\n                    rules: [],\n                    hrefs: [],\n                    sheets: new Map()\n                  }),\n                  renderState.styles.set(precedence, styleQueue));\n                var resource = {\n                  state: PENDING$1,\n                  props: assign({}, props, {\n                    \"data-precedence\": props.precedence,\n                    precedence: null\n                  })\n                };\n                if (resourceState) {\n                  2 === resourceState.length &&\n                    adoptPreloadCredentials(resource.props, resourceState);\n                  var preloadResource =\n                    renderState.preloads.stylesheets.get(href);\n                  preloadResource && 0 < preloadResource.length\n                    ? (preloadResource.length = 0)\n                    : (resource.state = PRELOADED);\n                }\n                styleQueue.sheets.set(href, resource);\n                hoistableState && hoistableState.stylesheets.add(resource);\n              } else if (styleQueue) {\n                var _resource = styleQueue.sheets.get(href);\n                _resource &&\n                  hoistableState &&\n                  hoistableState.stylesheets.add(_resource);\n              }\n              textEmbedded && target$jscomp$0.push(textSeparator);\n              JSCompiler_inline_result$jscomp$5 = null;\n            }\n          else\n            props.onLoad || props.onError\n              ? (JSCompiler_inline_result$jscomp$5 = pushLinkImpl(\n                  target$jscomp$0,\n                  props\n                ))\n              : (textEmbedded && target$jscomp$0.push(textSeparator),\n                (JSCompiler_inline_result$jscomp$5 = isFallback$jscomp$0\n                  ? null\n                  : pushLinkImpl(renderState.hoistableChunks, props)));\n          return JSCompiler_inline_result$jscomp$5;\n        case \"script\":\n          var noscriptTagInScope$jscomp$1 = formatContext.tagScope & 1,\n            asyncProp = props.async;\n          if (\n            \"string\" !== typeof props.src ||\n            !props.src ||\n            !asyncProp ||\n            \"function\" === typeof asyncProp ||\n            \"symbol\" === typeof asyncProp ||\n            props.onLoad ||\n            props.onError ||\n            formatContext.insertionMode === SVG_MODE ||\n            noscriptTagInScope$jscomp$1 ||\n            null != props.itemProp\n          )\n            var JSCompiler_inline_result$jscomp$6 = pushScriptImpl(\n              target$jscomp$0,\n              props\n            );\n          else {\n            var key = props.src;\n            if (\"module\" === props.type) {\n              var resources = resumableState.moduleScriptResources;\n              var preloads = renderState.preloads.moduleScripts;\n            } else\n              (resources = resumableState.scriptResources),\n                (preloads = renderState.preloads.scripts);\n            var resourceState$jscomp$0 = resources.hasOwnProperty(key)\n              ? resources[key]\n              : void 0;\n            if (resourceState$jscomp$0 !== EXISTS) {\n              resources[key] = EXISTS;\n              var scriptProps = props;\n              if (resourceState$jscomp$0) {\n                2 === resourceState$jscomp$0.length &&\n                  ((scriptProps = assign({}, props)),\n                  adoptPreloadCredentials(scriptProps, resourceState$jscomp$0));\n                var preloadResource$jscomp$0 = preloads.get(key);\n                preloadResource$jscomp$0 &&\n                  (preloadResource$jscomp$0.length = 0);\n              }\n              var resource$jscomp$0 = [];\n              renderState.scripts.add(resource$jscomp$0);\n              pushScriptImpl(resource$jscomp$0, scriptProps);\n            }\n            textEmbedded && target$jscomp$0.push(textSeparator);\n            JSCompiler_inline_result$jscomp$6 = null;\n          }\n          return JSCompiler_inline_result$jscomp$6;\n        case \"style\":\n          var noscriptTagInScope$jscomp$2 = formatContext.tagScope & 1;\n          if (hasOwnProperty.call(props, \"children\")) {\n            var children$jscomp$7 = props.children,\n              child$jscomp$0 = Array.isArray(children$jscomp$7)\n                ? 2 > children$jscomp$7.length\n                  ? children$jscomp$7[0]\n                  : null\n                : children$jscomp$7;\n            (\"function\" === typeof child$jscomp$0 ||\n              \"symbol\" === typeof child$jscomp$0 ||\n              Array.isArray(child$jscomp$0)) &&\n              console.error(\n                \"React expect children of <style> tags to be a string, number, or object with a `toString` method but found %s instead. In browsers style Elements can only have `Text` Nodes as children.\",\n                \"function\" === typeof child$jscomp$0\n                  ? \"a Function\"\n                  : \"symbol\" === typeof child$jscomp$0\n                    ? \"a Sybmol\"\n                    : \"an Array\"\n              );\n          }\n          var precedence$jscomp$0 = props.precedence,\n            href$jscomp$0 = props.href,\n            nonce = props.nonce;\n          if (\n            formatContext.insertionMode === SVG_MODE ||\n            noscriptTagInScope$jscomp$2 ||\n            null != props.itemProp ||\n            \"string\" !== typeof precedence$jscomp$0 ||\n            \"string\" !== typeof href$jscomp$0 ||\n            \"\" === href$jscomp$0\n          ) {\n            target$jscomp$0.push(startChunkForTag(\"style\"));\n            var children$jscomp$8 = null,\n              innerHTML$jscomp$5 = null,\n              propKey$jscomp$8;\n            for (propKey$jscomp$8 in props)\n              if (hasOwnProperty.call(props, propKey$jscomp$8)) {\n                var propValue$jscomp$8 = props[propKey$jscomp$8];\n                if (null != propValue$jscomp$8)\n                  switch (propKey$jscomp$8) {\n                    case \"children\":\n                      children$jscomp$8 = propValue$jscomp$8;\n                      break;\n                    case \"dangerouslySetInnerHTML\":\n                      innerHTML$jscomp$5 = propValue$jscomp$8;\n                      break;\n                    default:\n                      pushAttribute(\n                        target$jscomp$0,\n                        propKey$jscomp$8,\n                        propValue$jscomp$8\n                      );\n                  }\n              }\n            target$jscomp$0.push(endOfStartTag);\n            var child$jscomp$1 = Array.isArray(children$jscomp$8)\n              ? 2 > children$jscomp$8.length\n                ? children$jscomp$8[0]\n                : null\n              : children$jscomp$8;\n            \"function\" !== typeof child$jscomp$1 &&\n              \"symbol\" !== typeof child$jscomp$1 &&\n              null !== child$jscomp$1 &&\n              void 0 !== child$jscomp$1 &&\n              target$jscomp$0.push(\n                stringToChunk(escapeStyleTextContent(child$jscomp$1))\n              );\n            pushInnerHTML(\n              target$jscomp$0,\n              innerHTML$jscomp$5,\n              children$jscomp$8\n            );\n            target$jscomp$0.push(endChunkForTag(\"style\"));\n            var JSCompiler_inline_result$jscomp$7 = null;\n          } else {\n            href$jscomp$0.includes(\" \") &&\n              console.error(\n                'React expected the `href` prop for a <style> tag opting into hoisting semantics using the `precedence` prop to not have any spaces but ecountered spaces instead. using spaces in this prop will cause hydration of this style to fail on the client. The href for the <style> where this ocurred is \"%s\".',\n                href$jscomp$0\n              );\n            var styleQueue$jscomp$0 =\n                renderState.styles.get(precedence$jscomp$0),\n              resourceState$jscomp$1 =\n                resumableState.styleResources.hasOwnProperty(href$jscomp$0)\n                  ? resumableState.styleResources[href$jscomp$0]\n                  : void 0;\n            if (resourceState$jscomp$1 !== EXISTS) {\n              resumableState.styleResources[href$jscomp$0] = EXISTS;\n              resourceState$jscomp$1 &&\n                console.error(\n                  'React encountered a hoistable style tag for the same href as a preload: \"%s\". When using a style tag to inline styles you should not also preload it as a stylsheet.',\n                  href$jscomp$0\n                );\n              styleQueue$jscomp$0 ||\n                ((styleQueue$jscomp$0 = {\n                  precedence: stringToChunk(\n                    escapeTextForBrowser(precedence$jscomp$0)\n                  ),\n                  rules: [],\n                  hrefs: [],\n                  sheets: new Map()\n                }),\n                renderState.styles.set(\n                  precedence$jscomp$0,\n                  styleQueue$jscomp$0\n                ));\n              var nonceStyle = renderState.nonce.style;\n              if (nonceStyle && nonceStyle !== nonce)\n                console.error(\n                  'React encountered a style tag with `precedence` \"%s\" and `nonce` \"%s\". When React manages style rules using `precedence` it will only include rules if the nonce matches the style nonce \"%s\" that was included with this render.',\n                  precedence$jscomp$0,\n                  nonce,\n                  nonceStyle\n                );\n              else {\n                !nonceStyle &&\n                  nonce &&\n                  console.error(\n                    'React encountered a style tag with `precedence` \"%s\" and `nonce` \"%s\". When React manages style rules using `precedence` it will only include a nonce attributes if you also provide the same style nonce value as a render option.',\n                    precedence$jscomp$0,\n                    nonce\n                  );\n                styleQueue$jscomp$0.hrefs.push(\n                  stringToChunk(escapeTextForBrowser(href$jscomp$0))\n                );\n                var target = styleQueue$jscomp$0.rules,\n                  children$jscomp$9 = null,\n                  innerHTML$jscomp$6 = null,\n                  propKey$jscomp$9;\n                for (propKey$jscomp$9 in props)\n                  if (hasOwnProperty.call(props, propKey$jscomp$9)) {\n                    var propValue$jscomp$9 = props[propKey$jscomp$9];\n                    if (null != propValue$jscomp$9)\n                      switch (propKey$jscomp$9) {\n                        case \"children\":\n                          children$jscomp$9 = propValue$jscomp$9;\n                          break;\n                        case \"dangerouslySetInnerHTML\":\n                          innerHTML$jscomp$6 = propValue$jscomp$9;\n                      }\n                  }\n                var child$jscomp$2 = Array.isArray(children$jscomp$9)\n                  ? 2 > children$jscomp$9.length\n                    ? children$jscomp$9[0]\n                    : null\n                  : children$jscomp$9;\n                \"function\" !== typeof child$jscomp$2 &&\n                  \"symbol\" !== typeof child$jscomp$2 &&\n                  null !== child$jscomp$2 &&\n                  void 0 !== child$jscomp$2 &&\n                  target.push(\n                    stringToChunk(escapeStyleTextContent(child$jscomp$2))\n                  );\n                pushInnerHTML(target, innerHTML$jscomp$6, children$jscomp$9);\n              }\n            }\n            styleQueue$jscomp$0 &&\n              hoistableState &&\n              hoistableState.styles.add(styleQueue$jscomp$0);\n            textEmbedded && target$jscomp$0.push(textSeparator);\n            JSCompiler_inline_result$jscomp$7 = void 0;\n          }\n          return JSCompiler_inline_result$jscomp$7;\n        case \"meta\":\n          var noscriptTagInScope$jscomp$3 = formatContext.tagScope & 1,\n            isFallback$jscomp$1 = formatContext.tagScope & 4;\n          if (\n            formatContext.insertionMode === SVG_MODE ||\n            noscriptTagInScope$jscomp$3 ||\n            null != props.itemProp\n          )\n            var JSCompiler_inline_result$jscomp$8 = pushSelfClosing(\n              target$jscomp$0,\n              props,\n              \"meta\"\n            );\n          else\n            textEmbedded && target$jscomp$0.push(textSeparator),\n              (JSCompiler_inline_result$jscomp$8 = isFallback$jscomp$1\n                ? null\n                : \"string\" === typeof props.charSet\n                  ? pushSelfClosing(renderState.charsetChunks, props, \"meta\")\n                  : \"viewport\" === props.name\n                    ? pushSelfClosing(renderState.viewportChunks, props, \"meta\")\n                    : pushSelfClosing(\n                        renderState.hoistableChunks,\n                        props,\n                        \"meta\"\n                      ));\n          return JSCompiler_inline_result$jscomp$8;\n        case \"listing\":\n        case \"pre\":\n          target$jscomp$0.push(startChunkForTag(type));\n          var children$jscomp$10 = null,\n            innerHTML$jscomp$7 = null,\n            propKey$jscomp$10;\n          for (propKey$jscomp$10 in props)\n            if (hasOwnProperty.call(props, propKey$jscomp$10)) {\n              var propValue$jscomp$10 = props[propKey$jscomp$10];\n              if (null != propValue$jscomp$10)\n                switch (propKey$jscomp$10) {\n                  case \"children\":\n                    children$jscomp$10 = propValue$jscomp$10;\n                    break;\n                  case \"dangerouslySetInnerHTML\":\n                    innerHTML$jscomp$7 = propValue$jscomp$10;\n                    break;\n                  default:\n                    pushAttribute(\n                      target$jscomp$0,\n                      propKey$jscomp$10,\n                      propValue$jscomp$10\n                    );\n                }\n            }\n          target$jscomp$0.push(endOfStartTag);\n          if (null != innerHTML$jscomp$7) {\n            if (null != children$jscomp$10)\n              throw Error(\n                \"Can only set one of `children` or `props.dangerouslySetInnerHTML`.\"\n              );\n            if (\n              \"object\" !== typeof innerHTML$jscomp$7 ||\n              !(\"__html\" in innerHTML$jscomp$7)\n            )\n              throw Error(\n                \"`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.\"\n              );\n            var html = innerHTML$jscomp$7.__html;\n            null !== html &&\n              void 0 !== html &&\n              (\"string\" === typeof html && 0 < html.length && \"\\n\" === html[0]\n                ? target$jscomp$0.push(leadingNewline, stringToChunk(html))\n                : (checkHtmlStringCoercion(html),\n                  target$jscomp$0.push(stringToChunk(\"\" + html))));\n          }\n          \"string\" === typeof children$jscomp$10 &&\n            \"\\n\" === children$jscomp$10[0] &&\n            target$jscomp$0.push(leadingNewline);\n          return children$jscomp$10;\n        case \"img\":\n          var pictureOrNoScriptTagInScope = formatContext.tagScope & 3,\n            src = props.src,\n            srcSet = props.srcSet;\n          if (\n            !(\n              \"lazy\" === props.loading ||\n              (!src && !srcSet) ||\n              (\"string\" !== typeof src && null != src) ||\n              (\"string\" !== typeof srcSet && null != srcSet) ||\n              \"low\" === props.fetchPriority ||\n              pictureOrNoScriptTagInScope\n            ) &&\n            (\"string\" !== typeof src ||\n              \":\" !== src[4] ||\n              (\"d\" !== src[0] && \"D\" !== src[0]) ||\n              (\"a\" !== src[1] && \"A\" !== src[1]) ||\n              (\"t\" !== src[2] && \"T\" !== src[2]) ||\n              (\"a\" !== src[3] && \"A\" !== src[3])) &&\n            (\"string\" !== typeof srcSet ||\n              \":\" !== srcSet[4] ||\n              (\"d\" !== srcSet[0] && \"D\" !== srcSet[0]) ||\n              (\"a\" !== srcSet[1] && \"A\" !== srcSet[1]) ||\n              (\"t\" !== srcSet[2] && \"T\" !== srcSet[2]) ||\n              (\"a\" !== srcSet[3] && \"A\" !== srcSet[3]))\n          ) {\n            null !== hoistableState &&\n              formatContext.tagScope & 64 &&\n              (hoistableState.suspenseyImages = !0);\n            var sizes = \"string\" === typeof props.sizes ? props.sizes : void 0,\n              key$jscomp$0 = srcSet ? srcSet + \"\\n\" + (sizes || \"\") : src,\n              promotablePreloads = renderState.preloads.images,\n              resource$jscomp$1 = promotablePreloads.get(key$jscomp$0);\n            if (resource$jscomp$1) {\n              if (\n                \"high\" === props.fetchPriority ||\n                10 > renderState.highImagePreloads.size\n              )\n                promotablePreloads.delete(key$jscomp$0),\n                  renderState.highImagePreloads.add(resource$jscomp$1);\n            } else if (\n              !resumableState.imageResources.hasOwnProperty(key$jscomp$0)\n            ) {\n              resumableState.imageResources[key$jscomp$0] = PRELOAD_NO_CREDS;\n              var input = props.crossOrigin;\n              var crossOrigin =\n                \"string\" === typeof input\n                  ? \"use-credentials\" === input\n                    ? input\n                    : \"\"\n                  : void 0;\n              var headers = renderState.headers,\n                header;\n              headers &&\n              0 < headers.remainingCapacity &&\n              \"string\" !== typeof props.srcSet &&\n              (\"high\" === props.fetchPriority ||\n                500 > headers.highImagePreloads.length) &&\n              ((header = getPreloadAsHeader(src, \"image\", {\n                imageSrcSet: props.srcSet,\n                imageSizes: props.sizes,\n                crossOrigin: crossOrigin,\n                integrity: props.integrity,\n                nonce: props.nonce,\n                type: props.type,\n                fetchPriority: props.fetchPriority,\n                referrerPolicy: props.refererPolicy\n              })),\n              0 <= (headers.remainingCapacity -= header.length + 2))\n                ? ((renderState.resets.image[key$jscomp$0] = PRELOAD_NO_CREDS),\n                  headers.highImagePreloads &&\n                    (headers.highImagePreloads += \", \"),\n                  (headers.highImagePreloads += header))\n                : ((resource$jscomp$1 = []),\n                  pushLinkImpl(resource$jscomp$1, {\n                    rel: \"preload\",\n                    as: \"image\",\n                    href: srcSet ? void 0 : src,\n                    imageSrcSet: srcSet,\n                    imageSizes: sizes,\n                    crossOrigin: crossOrigin,\n                    integrity: props.integrity,\n                    type: props.type,\n                    fetchPriority: props.fetchPriority,\n                    referrerPolicy: props.referrerPolicy\n                  }),\n                  \"high\" === props.fetchPriority ||\n                  10 > renderState.highImagePreloads.size\n                    ? renderState.highImagePreloads.add(resource$jscomp$1)\n                    : (renderState.bulkPreloads.add(resource$jscomp$1),\n                      promotablePreloads.set(key$jscomp$0, resource$jscomp$1)));\n            }\n          }\n          return pushSelfClosing(target$jscomp$0, props, \"img\");\n        case \"base\":\n        case \"area\":\n        case \"br\":\n        case \"col\":\n        case \"embed\":\n        case \"hr\":\n        case \"keygen\":\n        case \"param\":\n        case \"source\":\n        case \"track\":\n        case \"wbr\":\n          return pushSelfClosing(target$jscomp$0, props, type);\n        case \"annotation-xml\":\n        case \"color-profile\":\n        case \"font-face\":\n        case \"font-face-src\":\n        case \"font-face-uri\":\n        case \"font-face-format\":\n        case \"font-face-name\":\n        case \"missing-glyph\":\n          break;\n        case \"head\":\n          if (formatContext.insertionMode < HTML_MODE) {\n            var preamble = preambleState || renderState.preamble;\n            if (preamble.headChunks)\n              throw Error(\"The `<head>` tag may only be rendered once.\");\n            null !== preambleState &&\n              target$jscomp$0.push(headPreambleContributionChunk);\n            preamble.headChunks = [];\n            var JSCompiler_inline_result$jscomp$9 = pushStartSingletonElement(\n              preamble.headChunks,\n              props,\n              \"head\"\n            );\n          } else\n            JSCompiler_inline_result$jscomp$9 = pushStartGenericElement(\n              target$jscomp$0,\n              props,\n              \"head\"\n            );\n          return JSCompiler_inline_result$jscomp$9;\n        case \"body\":\n          if (formatContext.insertionMode < HTML_MODE) {\n            var preamble$jscomp$0 = preambleState || renderState.preamble;\n            if (preamble$jscomp$0.bodyChunks)\n              throw Error(\"The `<body>` tag may only be rendered once.\");\n            null !== preambleState &&\n              target$jscomp$0.push(bodyPreambleContributionChunk);\n            preamble$jscomp$0.bodyChunks = [];\n            var JSCompiler_inline_result$jscomp$10 = pushStartSingletonElement(\n              preamble$jscomp$0.bodyChunks,\n              props,\n              \"body\"\n            );\n          } else\n            JSCompiler_inline_result$jscomp$10 = pushStartGenericElement(\n              target$jscomp$0,\n              props,\n              \"body\"\n            );\n          return JSCompiler_inline_result$jscomp$10;\n        case \"html\":\n          if (formatContext.insertionMode === ROOT_HTML_MODE) {\n            var preamble$jscomp$1 = preambleState || renderState.preamble;\n            if (preamble$jscomp$1.htmlChunks)\n              throw Error(\"The `<html>` tag may only be rendered once.\");\n            null !== preambleState &&\n              target$jscomp$0.push(htmlPreambleContributionChunk);\n            preamble$jscomp$1.htmlChunks = [doctypeChunk];\n            var JSCompiler_inline_result$jscomp$11 = pushStartSingletonElement(\n              preamble$jscomp$1.htmlChunks,\n              props,\n              \"html\"\n            );\n          } else\n            JSCompiler_inline_result$jscomp$11 = pushStartGenericElement(\n              target$jscomp$0,\n              props,\n              \"html\"\n            );\n          return JSCompiler_inline_result$jscomp$11;\n        default:\n          if (-1 !== type.indexOf(\"-\")) {\n            target$jscomp$0.push(startChunkForTag(type));\n            var children$jscomp$11 = null,\n              innerHTML$jscomp$8 = null,\n              propKey$jscomp$11;\n            for (propKey$jscomp$11 in props)\n              if (hasOwnProperty.call(props, propKey$jscomp$11)) {\n                var propValue$jscomp$11 = props[propKey$jscomp$11];\n                if (null != propValue$jscomp$11) {\n                  var attributeName = propKey$jscomp$11;\n                  switch (propKey$jscomp$11) {\n                    case \"children\":\n                      children$jscomp$11 = propValue$jscomp$11;\n                      break;\n                    case \"dangerouslySetInnerHTML\":\n                      innerHTML$jscomp$8 = propValue$jscomp$11;\n                      break;\n                    case \"style\":\n                      pushStyleAttribute(target$jscomp$0, propValue$jscomp$11);\n                      break;\n                    case \"suppressContentEditableWarning\":\n                    case \"suppressHydrationWarning\":\n                    case \"ref\":\n                      break;\n                    case \"className\":\n                      attributeName = \"class\";\n                    default:\n                      if (\n                        isAttributeNameSafe(propKey$jscomp$11) &&\n                        \"function\" !== typeof propValue$jscomp$11 &&\n                        \"symbol\" !== typeof propValue$jscomp$11 &&\n                        !1 !== propValue$jscomp$11\n                      ) {\n                        if (!0 === propValue$jscomp$11)\n                          propValue$jscomp$11 = \"\";\n                        else if (\"object\" === typeof propValue$jscomp$11)\n                          continue;\n                        target$jscomp$0.push(\n                          attributeSeparator,\n                          stringToChunk(attributeName),\n                          attributeAssign,\n                          stringToChunk(\n                            escapeTextForBrowser(propValue$jscomp$11)\n                          ),\n                          attributeEnd\n                        );\n                      }\n                  }\n                }\n              }\n            target$jscomp$0.push(endOfStartTag);\n            pushInnerHTML(\n              target$jscomp$0,\n              innerHTML$jscomp$8,\n              children$jscomp$11\n            );\n            return children$jscomp$11;\n          }\n      }\n      return pushStartGenericElement(target$jscomp$0, props, type);\n    }\n    function endChunkForTag(tag) {\n      var chunk = endTagCache.get(tag);\n      void 0 === chunk &&\n        ((chunk = stringToPrecomputedChunk(\"</\" + tag + \">\")),\n        endTagCache.set(tag, chunk));\n      return chunk;\n    }\n    function hoistPreambleState(renderState, preambleState) {\n      renderState = renderState.preamble;\n      null === renderState.htmlChunks &&\n        preambleState.htmlChunks &&\n        (renderState.htmlChunks = preambleState.htmlChunks);\n      null === renderState.headChunks &&\n        preambleState.headChunks &&\n        (renderState.headChunks = preambleState.headChunks);\n      null === renderState.bodyChunks &&\n        preambleState.bodyChunks &&\n        (renderState.bodyChunks = preambleState.bodyChunks);\n    }\n    function writeBootstrap(destination, renderState) {\n      renderState = renderState.bootstrapChunks;\n      for (var i = 0; i < renderState.length - 1; i++)\n        writeChunk(destination, renderState[i]);\n      return i < renderState.length\n        ? ((i = renderState[i]),\n          (renderState.length = 0),\n          writeChunkAndReturn(destination, i))\n        : !0;\n    }\n    function writeStartPendingSuspenseBoundary(destination, renderState, id) {\n      writeChunk(destination, startPendingSuspenseBoundary1);\n      if (null === id)\n        throw Error(\n          \"An ID must have been assigned before we can complete the boundary.\"\n        );\n      writeChunk(destination, renderState.boundaryPrefix);\n      writeChunk(destination, stringToChunk(id.toString(16)));\n      return writeChunkAndReturn(destination, startPendingSuspenseBoundary2);\n    }\n    function writeStartSegment(destination, renderState, formatContext, id) {\n      switch (formatContext.insertionMode) {\n        case ROOT_HTML_MODE:\n        case HTML_HTML_MODE:\n        case HTML_HEAD_MODE:\n        case HTML_MODE:\n          return (\n            writeChunk(destination, startSegmentHTML),\n            writeChunk(destination, renderState.segmentPrefix),\n            writeChunk(destination, stringToChunk(id.toString(16))),\n            writeChunkAndReturn(destination, startSegmentHTML2)\n          );\n        case SVG_MODE:\n          return (\n            writeChunk(destination, startSegmentSVG),\n            writeChunk(destination, renderState.segmentPrefix),\n            writeChunk(destination, stringToChunk(id.toString(16))),\n            writeChunkAndReturn(destination, startSegmentSVG2)\n          );\n        case MATHML_MODE:\n          return (\n            writeChunk(destination, startSegmentMathML),\n            writeChunk(destination, renderState.segmentPrefix),\n            writeChunk(destination, stringToChunk(id.toString(16))),\n            writeChunkAndReturn(destination, startSegmentMathML2)\n          );\n        case HTML_TABLE_MODE:\n          return (\n            writeChunk(destination, startSegmentTable),\n            writeChunk(destination, renderState.segmentPrefix),\n            writeChunk(destination, stringToChunk(id.toString(16))),\n            writeChunkAndReturn(destination, startSegmentTable2)\n          );\n        case HTML_TABLE_BODY_MODE:\n          return (\n            writeChunk(destination, startSegmentTableBody),\n            writeChunk(destination, renderState.segmentPrefix),\n            writeChunk(destination, stringToChunk(id.toString(16))),\n            writeChunkAndReturn(destination, startSegmentTableBody2)\n          );\n        case HTML_TABLE_ROW_MODE:\n          return (\n            writeChunk(destination, startSegmentTableRow),\n            writeChunk(destination, renderState.segmentPrefix),\n            writeChunk(destination, stringToChunk(id.toString(16))),\n            writeChunkAndReturn(destination, startSegmentTableRow2)\n          );\n        case HTML_COLGROUP_MODE:\n          return (\n            writeChunk(destination, startSegmentColGroup),\n            writeChunk(destination, renderState.segmentPrefix),\n            writeChunk(destination, stringToChunk(id.toString(16))),\n            writeChunkAndReturn(destination, startSegmentColGroup2)\n          );\n        default:\n          throw Error(\"Unknown insertion mode. This is a bug in React.\");\n      }\n    }\n    function writeEndSegment(destination, formatContext) {\n      switch (formatContext.insertionMode) {\n        case ROOT_HTML_MODE:\n        case HTML_HTML_MODE:\n        case HTML_HEAD_MODE:\n        case HTML_MODE:\n          return writeChunkAndReturn(destination, endSegmentHTML);\n        case SVG_MODE:\n          return writeChunkAndReturn(destination, endSegmentSVG);\n        case MATHML_MODE:\n          return writeChunkAndReturn(destination, endSegmentMathML);\n        case HTML_TABLE_MODE:\n          return writeChunkAndReturn(destination, endSegmentTable);\n        case HTML_TABLE_BODY_MODE:\n          return writeChunkAndReturn(destination, endSegmentTableBody);\n        case HTML_TABLE_ROW_MODE:\n          return writeChunkAndReturn(destination, endSegmentTableRow);\n        case HTML_COLGROUP_MODE:\n          return writeChunkAndReturn(destination, endSegmentColGroup);\n        default:\n          throw Error(\"Unknown insertion mode. This is a bug in React.\");\n      }\n    }\n    function escapeJSStringsForInstructionScripts(input) {\n      return JSON.stringify(input).replace(\n        regexForJSStringsInInstructionScripts,\n        function (match) {\n          switch (match) {\n            case \"<\":\n              return \"\\\\u003c\";\n            case \"\\u2028\":\n              return \"\\\\u2028\";\n            case \"\\u2029\":\n              return \"\\\\u2029\";\n            default:\n              throw Error(\n                \"escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React\"\n              );\n          }\n        }\n      );\n    }\n    function escapeJSObjectForInstructionScripts(input) {\n      return JSON.stringify(input).replace(\n        regexForJSStringsInScripts,\n        function (match) {\n          switch (match) {\n            case \"&\":\n              return \"\\\\u0026\";\n            case \">\":\n              return \"\\\\u003e\";\n            case \"<\":\n              return \"\\\\u003c\";\n            case \"\\u2028\":\n              return \"\\\\u2028\";\n            case \"\\u2029\":\n              return \"\\\\u2029\";\n            default:\n              throw Error(\n                \"escapeJSObjectForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React\"\n              );\n          }\n        }\n      );\n    }\n    function flushStyleTagsLateForBoundary(styleQueue) {\n      var rules = styleQueue.rules,\n        hrefs = styleQueue.hrefs;\n      0 < rules.length &&\n        0 === hrefs.length &&\n        console.error(\n          \"React expected to have at least one href for an a hoistable style but found none. This is a bug in React.\"\n        );\n      var i = 0;\n      if (hrefs.length) {\n        writeChunk(this, currentlyFlushingRenderState.startInlineStyle);\n        writeChunk(this, lateStyleTagResourceOpen1);\n        writeChunk(this, styleQueue.precedence);\n        for (\n          writeChunk(this, lateStyleTagResourceOpen2);\n          i < hrefs.length - 1;\n          i++\n        )\n          writeChunk(this, hrefs[i]), writeChunk(this, spaceSeparator);\n        writeChunk(this, hrefs[i]);\n        writeChunk(this, lateStyleTagResourceOpen3);\n        for (i = 0; i < rules.length; i++) writeChunk(this, rules[i]);\n        destinationHasCapacity = writeChunkAndReturn(\n          this,\n          lateStyleTagTemplateClose\n        );\n        currentlyRenderingBoundaryHasStylesToHoist = !0;\n        rules.length = 0;\n        hrefs.length = 0;\n      }\n    }\n    function hasStylesToHoist(stylesheet) {\n      return stylesheet.state !== PREAMBLE\n        ? (currentlyRenderingBoundaryHasStylesToHoist = !0)\n        : !1;\n    }\n    function writeHoistablesForBoundary(\n      destination,\n      hoistableState,\n      renderState\n    ) {\n      currentlyRenderingBoundaryHasStylesToHoist = !1;\n      destinationHasCapacity = !0;\n      currentlyFlushingRenderState = renderState;\n      hoistableState.styles.forEach(flushStyleTagsLateForBoundary, destination);\n      currentlyFlushingRenderState = null;\n      hoistableState.stylesheets.forEach(hasStylesToHoist);\n      currentlyRenderingBoundaryHasStylesToHoist &&\n        (renderState.stylesToHoist = !0);\n      return destinationHasCapacity;\n    }\n    function flushResource(resource) {\n      for (var i = 0; i < resource.length; i++) writeChunk(this, resource[i]);\n      resource.length = 0;\n    }\n    function flushStyleInPreamble(stylesheet) {\n      pushLinkImpl(stylesheetFlushingQueue, stylesheet.props);\n      for (var i = 0; i < stylesheetFlushingQueue.length; i++)\n        writeChunk(this, stylesheetFlushingQueue[i]);\n      stylesheetFlushingQueue.length = 0;\n      stylesheet.state = PREAMBLE;\n    }\n    function flushStylesInPreamble(styleQueue) {\n      var hasStylesheets = 0 < styleQueue.sheets.size;\n      styleQueue.sheets.forEach(flushStyleInPreamble, this);\n      styleQueue.sheets.clear();\n      var rules = styleQueue.rules,\n        hrefs = styleQueue.hrefs;\n      if (!hasStylesheets || hrefs.length) {\n        writeChunk(this, currentlyFlushingRenderState.startInlineStyle);\n        writeChunk(this, styleTagResourceOpen1);\n        writeChunk(this, styleQueue.precedence);\n        styleQueue = 0;\n        if (hrefs.length) {\n          for (\n            writeChunk(this, styleTagResourceOpen2);\n            styleQueue < hrefs.length - 1;\n            styleQueue++\n          )\n            writeChunk(this, hrefs[styleQueue]),\n              writeChunk(this, spaceSeparator);\n          writeChunk(this, hrefs[styleQueue]);\n        }\n        writeChunk(this, styleTagResourceOpen3);\n        for (styleQueue = 0; styleQueue < rules.length; styleQueue++)\n          writeChunk(this, rules[styleQueue]);\n        writeChunk(this, styleTagResourceClose);\n        rules.length = 0;\n        hrefs.length = 0;\n      }\n    }\n    function preloadLateStyle(stylesheet) {\n      if (stylesheet.state === PENDING$1) {\n        stylesheet.state = PRELOADED;\n        var props = stylesheet.props;\n        pushLinkImpl(stylesheetFlushingQueue, {\n          rel: \"preload\",\n          as: \"style\",\n          href: stylesheet.props.href,\n          crossOrigin: props.crossOrigin,\n          fetchPriority: props.fetchPriority,\n          integrity: props.integrity,\n          media: props.media,\n          hrefLang: props.hrefLang,\n          referrerPolicy: props.referrerPolicy\n        });\n        for (\n          stylesheet = 0;\n          stylesheet < stylesheetFlushingQueue.length;\n          stylesheet++\n        )\n          writeChunk(this, stylesheetFlushingQueue[stylesheet]);\n        stylesheetFlushingQueue.length = 0;\n      }\n    }\n    function preloadLateStyles(styleQueue) {\n      styleQueue.sheets.forEach(preloadLateStyle, this);\n      styleQueue.sheets.clear();\n    }\n    function pushCompletedShellIdAttribute(target, resumableState) {\n      (resumableState.instructions & SentCompletedShellId) === NothingSent &&\n        ((resumableState.instructions |= SentCompletedShellId),\n        target.push(\n          completedShellIdAttributeStart,\n          stringToChunk(\n            escapeTextForBrowser(\"_\" + resumableState.idPrefix + \"R_\")\n          ),\n          attributeEnd\n        ));\n    }\n    function writeStyleResourceDependenciesInJS(destination, hoistableState) {\n      writeChunk(destination, arrayFirstOpenBracket);\n      var nextArrayOpenBrackChunk = arrayFirstOpenBracket;\n      hoistableState.stylesheets.forEach(function (resource) {\n        if (resource.state !== PREAMBLE)\n          if (resource.state === LATE)\n            writeChunk(destination, nextArrayOpenBrackChunk),\n              (resource = resource.props.href),\n              checkAttributeStringCoercion(resource, \"href\"),\n              writeChunk(\n                destination,\n                stringToChunk(\n                  escapeJSObjectForInstructionScripts(\"\" + resource)\n                )\n              ),\n              writeChunk(destination, arrayCloseBracket),\n              (nextArrayOpenBrackChunk = arraySubsequentOpenBracket);\n          else {\n            writeChunk(destination, nextArrayOpenBrackChunk);\n            var precedence = resource.props[\"data-precedence\"],\n              props = resource.props,\n              coercedHref = sanitizeURL(\"\" + resource.props.href);\n            writeChunk(\n              destination,\n              stringToChunk(escapeJSObjectForInstructionScripts(coercedHref))\n            );\n            checkAttributeStringCoercion(precedence, \"precedence\");\n            precedence = \"\" + precedence;\n            writeChunk(destination, arrayInterstitial);\n            writeChunk(\n              destination,\n              stringToChunk(escapeJSObjectForInstructionScripts(precedence))\n            );\n            for (var propKey in props)\n              if (\n                hasOwnProperty.call(props, propKey) &&\n                ((precedence = props[propKey]), null != precedence)\n              )\n                switch (propKey) {\n                  case \"href\":\n                  case \"rel\":\n                  case \"precedence\":\n                  case \"data-precedence\":\n                    break;\n                  case \"children\":\n                  case \"dangerouslySetInnerHTML\":\n                    throw Error(\n                      \"link is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`.\"\n                    );\n                  default:\n                    writeStyleResourceAttributeInJS(\n                      destination,\n                      propKey,\n                      precedence\n                    );\n                }\n            writeChunk(destination, arrayCloseBracket);\n            nextArrayOpenBrackChunk = arraySubsequentOpenBracket;\n            resource.state = LATE;\n          }\n      });\n      writeChunk(destination, arrayCloseBracket);\n    }\n    function writeStyleResourceAttributeInJS(destination, name, value) {\n      var attributeName = name.toLowerCase();\n      switch (typeof value) {\n        case \"function\":\n        case \"symbol\":\n          return;\n      }\n      switch (name) {\n        case \"innerHTML\":\n        case \"dangerouslySetInnerHTML\":\n        case \"suppressContentEditableWarning\":\n        case \"suppressHydrationWarning\":\n        case \"style\":\n        case \"ref\":\n          return;\n        case \"className\":\n          attributeName = \"class\";\n          checkAttributeStringCoercion(value, attributeName);\n          name = \"\" + value;\n          break;\n        case \"hidden\":\n          if (!1 === value) return;\n          name = \"\";\n          break;\n        case \"src\":\n        case \"href\":\n          value = sanitizeURL(value);\n          checkAttributeStringCoercion(value, attributeName);\n          name = \"\" + value;\n          break;\n        default:\n          if (\n            (2 < name.length &&\n              (\"o\" === name[0] || \"O\" === name[0]) &&\n              (\"n\" === name[1] || \"N\" === name[1])) ||\n            !isAttributeNameSafe(name)\n          )\n            return;\n          checkAttributeStringCoercion(value, attributeName);\n          name = \"\" + value;\n      }\n      writeChunk(destination, arrayInterstitial);\n      writeChunk(\n        destination,\n        stringToChunk(escapeJSObjectForInstructionScripts(attributeName))\n      );\n      writeChunk(destination, arrayInterstitial);\n      writeChunk(\n        destination,\n        stringToChunk(escapeJSObjectForInstructionScripts(name))\n      );\n    }\n    function createHoistableState() {\n      return { styles: new Set(), stylesheets: new Set(), suspenseyImages: !1 };\n    }\n    function preloadBootstrapScriptOrModule(\n      resumableState,\n      renderState,\n      href,\n      props\n    ) {\n      (resumableState.scriptResources.hasOwnProperty(href) ||\n        resumableState.moduleScriptResources.hasOwnProperty(href)) &&\n        console.error(\n          'Internal React Error: React expected bootstrap script or module with src \"%s\" to not have been preloaded already. please file an issue',\n          href\n        );\n      resumableState.scriptResources[href] = EXISTS;\n      resumableState.moduleScriptResources[href] = EXISTS;\n      resumableState = [];\n      pushLinkImpl(resumableState, props);\n      renderState.bootstrapScripts.add(resumableState);\n    }\n    function adoptPreloadCredentials(target, preloadState) {\n      null == target.crossOrigin && (target.crossOrigin = preloadState[0]);\n      null == target.integrity && (target.integrity = preloadState[1]);\n    }\n    function getPreloadAsHeader(href, as, params) {\n      href = escapeHrefForLinkHeaderURLContext(href);\n      as = escapeStringForLinkHeaderQuotedParamValueContext(as, \"as\");\n      as = \"<\" + href + '>; rel=preload; as=\"' + as + '\"';\n      for (var paramName in params)\n        hasOwnProperty.call(params, paramName) &&\n          ((href = params[paramName]),\n          \"string\" === typeof href &&\n            (as +=\n              \"; \" +\n              paramName.toLowerCase() +\n              '=\"' +\n              escapeStringForLinkHeaderQuotedParamValueContext(\n                href,\n                paramName\n              ) +\n              '\"'));\n      return as;\n    }\n    function escapeHrefForLinkHeaderURLContext(hrefInput) {\n      checkAttributeStringCoercion(hrefInput, \"href\");\n      return (\"\" + hrefInput).replace(\n        regexForHrefInLinkHeaderURLContext,\n        escapeHrefForLinkHeaderURLContextReplacer\n      );\n    }\n    function escapeHrefForLinkHeaderURLContextReplacer(match) {\n      switch (match) {\n        case \"<\":\n          return \"%3C\";\n        case \">\":\n          return \"%3E\";\n        case \"\\n\":\n          return \"%0A\";\n        case \"\\r\":\n          return \"%0D\";\n        default:\n          throw Error(\n            \"escapeLinkHrefForHeaderContextReplacer encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React\"\n          );\n      }\n    }\n    function escapeStringForLinkHeaderQuotedParamValueContext(value, name) {\n      willCoercionThrow(value) &&\n        (console.error(\n          \"The provided `%s` option is an unsupported type %s. This value must be coerced to a string before using it here.\",\n          name,\n          typeName(value)\n        ),\n        testStringCoercion(value));\n      return (\"\" + value).replace(\n        regexForLinkHeaderQuotedParamValueContext,\n        escapeStringForLinkHeaderQuotedParamValueContextReplacer\n      );\n    }\n    function escapeStringForLinkHeaderQuotedParamValueContextReplacer(match) {\n      switch (match) {\n        case '\"':\n          return \"%22\";\n        case \"'\":\n          return \"%27\";\n        case \";\":\n          return \"%3B\";\n        case \",\":\n          return \"%2C\";\n        case \"\\n\":\n          return \"%0A\";\n        case \"\\r\":\n          return \"%0D\";\n        default:\n          throw Error(\n            \"escapeStringForLinkHeaderQuotedParamValueContextReplacer encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React\"\n          );\n      }\n    }\n    function hoistStyleQueueDependency(styleQueue) {\n      this.styles.add(styleQueue);\n    }\n    function hoistStylesheetDependency(stylesheet) {\n      this.stylesheets.add(stylesheet);\n    }\n    function hoistHoistables(parentState, childState) {\n      childState.styles.forEach(hoistStyleQueueDependency, parentState);\n      childState.stylesheets.forEach(hoistStylesheetDependency, parentState);\n      childState.suspenseyImages && (parentState.suspenseyImages = !0);\n    }\n    function hasSuspenseyContent(hoistableState) {\n      return (\n        0 < hoistableState.stylesheets.size || hoistableState.suspenseyImages\n      );\n    }\n    function getComponentNameFromType(type) {\n      if (null == type) return null;\n      if (\"function\" === typeof type)\n        return type.$$typeof === REACT_CLIENT_REFERENCE\n          ? null\n          : type.displayName || type.name || null;\n      if (\"string\" === typeof type) return type;\n      switch (type) {\n        case REACT_FRAGMENT_TYPE:\n          return \"Fragment\";\n        case REACT_PROFILER_TYPE:\n          return \"Profiler\";\n        case REACT_STRICT_MODE_TYPE:\n          return \"StrictMode\";\n        case REACT_SUSPENSE_TYPE:\n          return \"Suspense\";\n        case REACT_SUSPENSE_LIST_TYPE:\n          return \"SuspenseList\";\n        case REACT_ACTIVITY_TYPE:\n          return \"Activity\";\n      }\n      if (\"object\" === typeof type)\n        switch (\n          (\"number\" === typeof type.tag &&\n            console.error(\n              \"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"\n            ),\n          type.$$typeof)\n        ) {\n          case REACT_PORTAL_TYPE:\n            return \"Portal\";\n          case REACT_CONTEXT_TYPE:\n            return type.displayName || \"Context\";\n          case REACT_CONSUMER_TYPE:\n            return (type._context.displayName || \"Context\") + \".Consumer\";\n          case REACT_FORWARD_REF_TYPE:\n            var innerType = type.render;\n            type = type.displayName;\n            type ||\n              ((type = innerType.displayName || innerType.name || \"\"),\n              (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n            return type;\n          case REACT_MEMO_TYPE:\n            return (\n              (innerType = type.displayName || null),\n              null !== innerType\n                ? innerType\n                : getComponentNameFromType(type.type) || \"Memo\"\n            );\n          case REACT_LAZY_TYPE:\n            innerType = type._payload;\n            type = type._init;\n            try {\n              return getComponentNameFromType(type(innerType));\n            } catch (x) {}\n        }\n      return null;\n    }\n    function popToNearestCommonAncestor(prev, next) {\n      if (prev !== next) {\n        prev.context._currentValue = prev.parentValue;\n        prev = prev.parent;\n        var parentNext = next.parent;\n        if (null === prev) {\n          if (null !== parentNext)\n            throw Error(\n              \"The stacks must reach the root at the same time. This is a bug in React.\"\n            );\n        } else {\n          if (null === parentNext)\n            throw Error(\n              \"The stacks must reach the root at the same time. This is a bug in React.\"\n            );\n          popToNearestCommonAncestor(prev, parentNext);\n        }\n        next.context._currentValue = next.value;\n      }\n    }\n    function popAllPrevious(prev) {\n      prev.context._currentValue = prev.parentValue;\n      prev = prev.parent;\n      null !== prev && popAllPrevious(prev);\n    }\n    function pushAllNext(next) {\n      var parentNext = next.parent;\n      null !== parentNext && pushAllNext(parentNext);\n      next.context._currentValue = next.value;\n    }\n    function popPreviousToCommonLevel(prev, next) {\n      prev.context._currentValue = prev.parentValue;\n      prev = prev.parent;\n      if (null === prev)\n        throw Error(\n          \"The depth must equal at least at zero before reaching the root. This is a bug in React.\"\n        );\n      prev.depth === next.depth\n        ? popToNearestCommonAncestor(prev, next)\n        : popPreviousToCommonLevel(prev, next);\n    }\n    function popNextToCommonLevel(prev, next) {\n      var parentNext = next.parent;\n      if (null === parentNext)\n        throw Error(\n          \"The depth must equal at least at zero before reaching the root. This is a bug in React.\"\n        );\n      prev.depth === parentNext.depth\n        ? popToNearestCommonAncestor(prev, parentNext)\n        : popNextToCommonLevel(prev, parentNext);\n      next.context._currentValue = next.value;\n    }\n    function switchContext(newSnapshot) {\n      var prev = currentActiveSnapshot;\n      prev !== newSnapshot &&\n        (null === prev\n          ? pushAllNext(newSnapshot)\n          : null === newSnapshot\n            ? popAllPrevious(prev)\n            : prev.depth === newSnapshot.depth\n              ? popToNearestCommonAncestor(prev, newSnapshot)\n              : prev.depth > newSnapshot.depth\n                ? popPreviousToCommonLevel(prev, newSnapshot)\n                : popNextToCommonLevel(prev, newSnapshot),\n        (currentActiveSnapshot = newSnapshot));\n    }\n    function warnOnInvalidCallback(callback) {\n      if (null !== callback && \"function\" !== typeof callback) {\n        var key = String(callback);\n        didWarnOnInvalidCallback.has(key) ||\n          (didWarnOnInvalidCallback.add(key),\n          console.error(\n            \"Expected the last optional `callback` argument to be a function. Instead received: %s.\",\n            callback\n          ));\n      }\n    }\n    function warnNoop(publicInstance, callerName) {\n      publicInstance =\n        ((publicInstance = publicInstance.constructor) &&\n          getComponentNameFromType(publicInstance)) ||\n        \"ReactClass\";\n      var warningKey = publicInstance + \".\" + callerName;\n      didWarnAboutNoopUpdateForComponent[warningKey] ||\n        (console.error(\n          \"Can only update a mounting component. This usually means you called %s() outside componentWillMount() on the server. This is a no-op.\\n\\nPlease check the code for the %s component.\",\n          callerName,\n          publicInstance\n        ),\n        (didWarnAboutNoopUpdateForComponent[warningKey] = !0));\n    }\n    function pushTreeContext(baseContext, totalChildren, index) {\n      var baseIdWithLeadingBit = baseContext.id;\n      baseContext = baseContext.overflow;\n      var baseLength = 32 - clz32(baseIdWithLeadingBit) - 1;\n      baseIdWithLeadingBit &= ~(1 << baseLength);\n      index += 1;\n      var length = 32 - clz32(totalChildren) + baseLength;\n      if (30 < length) {\n        var numberOfOverflowBits = baseLength - (baseLength % 5);\n        length = (\n          baseIdWithLeadingBit &\n          ((1 << numberOfOverflowBits) - 1)\n        ).toString(32);\n        baseIdWithLeadingBit >>= numberOfOverflowBits;\n        baseLength -= numberOfOverflowBits;\n        return {\n          id:\n            (1 << (32 - clz32(totalChildren) + baseLength)) |\n            (index << baseLength) |\n            baseIdWithLeadingBit,\n          overflow: length + baseContext\n        };\n      }\n      return {\n        id: (1 << length) | (index << baseLength) | baseIdWithLeadingBit,\n        overflow: baseContext\n      };\n    }\n    function clz32Fallback(x) {\n      x >>>= 0;\n      return 0 === x ? 32 : (31 - ((log(x) / LN2) | 0)) | 0;\n    }\n    function noop() {}\n    function trackUsedThenable(thenableState, thenable, index) {\n      index = thenableState[index];\n      void 0 === index\n        ? thenableState.push(thenable)\n        : index !== thenable && (thenable.then(noop, noop), (thenable = index));\n      switch (thenable.status) {\n        case \"fulfilled\":\n          return thenable.value;\n        case \"rejected\":\n          throw thenable.reason;\n        default:\n          \"string\" === typeof thenable.status\n            ? thenable.then(noop, noop)\n            : ((thenableState = thenable),\n              (thenableState.status = \"pending\"),\n              thenableState.then(\n                function (fulfilledValue) {\n                  if (\"pending\" === thenable.status) {\n                    var fulfilledThenable = thenable;\n                    fulfilledThenable.status = \"fulfilled\";\n                    fulfilledThenable.value = fulfilledValue;\n                  }\n                },\n                function (error) {\n                  if (\"pending\" === thenable.status) {\n                    var rejectedThenable = thenable;\n                    rejectedThenable.status = \"rejected\";\n                    rejectedThenable.reason = error;\n                  }\n                }\n              ));\n          switch (thenable.status) {\n            case \"fulfilled\":\n              return thenable.value;\n            case \"rejected\":\n              throw thenable.reason;\n          }\n          suspendedThenable = thenable;\n          throw SuspenseException;\n      }\n    }\n    function getSuspendedThenable() {\n      if (null === suspendedThenable)\n        throw Error(\n          \"Expected a suspended thenable. This is a bug in React. Please file an issue.\"\n        );\n      var thenable = suspendedThenable;\n      suspendedThenable = null;\n      return thenable;\n    }\n    function is(x, y) {\n      return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n    }\n    function resolveCurrentlyRenderingComponent() {\n      if (null === currentlyRenderingComponent)\n        throw Error(\n          \"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\\n1. You might have mismatching versions of React and the renderer (such as React DOM)\\n2. You might be breaking the Rules of Hooks\\n3. You might have more than one copy of React in the same app\\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.\"\n        );\n      isInHookUserCodeInDev &&\n        console.error(\n          \"Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://react.dev/link/rules-of-hooks\"\n        );\n      return currentlyRenderingComponent;\n    }\n    function createHook() {\n      if (0 < numberOfReRenders)\n        throw Error(\"Rendered more hooks than during the previous render\");\n      return { memoizedState: null, queue: null, next: null };\n    }\n    function createWorkInProgressHook() {\n      null === workInProgressHook\n        ? null === firstWorkInProgressHook\n          ? ((isReRender = !1),\n            (firstWorkInProgressHook = workInProgressHook = createHook()))\n          : ((isReRender = !0), (workInProgressHook = firstWorkInProgressHook))\n        : null === workInProgressHook.next\n          ? ((isReRender = !1),\n            (workInProgressHook = workInProgressHook.next = createHook()))\n          : ((isReRender = !0), (workInProgressHook = workInProgressHook.next));\n      return workInProgressHook;\n    }\n    function getThenableStateAfterSuspending() {\n      var state = thenableState;\n      thenableState = null;\n      return state;\n    }\n    function resetHooksState() {\n      isInHookUserCodeInDev = !1;\n      currentlyRenderingKeyPath =\n        currentlyRenderingRequest =\n        currentlyRenderingTask =\n        currentlyRenderingComponent =\n          null;\n      didScheduleRenderPhaseUpdate = !1;\n      firstWorkInProgressHook = null;\n      numberOfReRenders = 0;\n      workInProgressHook = renderPhaseUpdates = null;\n    }\n    function readContext(context) {\n      isInHookUserCodeInDev &&\n        console.error(\n          \"Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().\"\n        );\n      return context._currentValue;\n    }\n    function basicStateReducer(state, action) {\n      return \"function\" === typeof action ? action(state) : action;\n    }\n    function useReducer(reducer, initialArg, init) {\n      reducer !== basicStateReducer && (currentHookNameInDev = \"useReducer\");\n      currentlyRenderingComponent = resolveCurrentlyRenderingComponent();\n      workInProgressHook = createWorkInProgressHook();\n      if (isReRender) {\n        init = workInProgressHook.queue;\n        initialArg = init.dispatch;\n        if (null !== renderPhaseUpdates) {\n          var firstRenderPhaseUpdate = renderPhaseUpdates.get(init);\n          if (void 0 !== firstRenderPhaseUpdate) {\n            renderPhaseUpdates.delete(init);\n            init = workInProgressHook.memoizedState;\n            do {\n              var action = firstRenderPhaseUpdate.action;\n              isInHookUserCodeInDev = !0;\n              init = reducer(init, action);\n              isInHookUserCodeInDev = !1;\n              firstRenderPhaseUpdate = firstRenderPhaseUpdate.next;\n            } while (null !== firstRenderPhaseUpdate);\n            workInProgressHook.memoizedState = init;\n            return [init, initialArg];\n          }\n        }\n        return [workInProgressHook.memoizedState, initialArg];\n      }\n      isInHookUserCodeInDev = !0;\n      reducer =\n        reducer === basicStateReducer\n          ? \"function\" === typeof initialArg\n            ? initialArg()\n            : initialArg\n          : void 0 !== init\n            ? init(initialArg)\n            : initialArg;\n      isInHookUserCodeInDev = !1;\n      workInProgressHook.memoizedState = reducer;\n      reducer = workInProgressHook.queue = { last: null, dispatch: null };\n      reducer = reducer.dispatch = dispatchAction.bind(\n        null,\n        currentlyRenderingComponent,\n        reducer\n      );\n      return [workInProgressHook.memoizedState, reducer];\n    }\n    function useMemo(nextCreate, deps) {\n      currentlyRenderingComponent = resolveCurrentlyRenderingComponent();\n      workInProgressHook = createWorkInProgressHook();\n      deps = void 0 === deps ? null : deps;\n      if (null !== workInProgressHook) {\n        var prevState = workInProgressHook.memoizedState;\n        if (null !== prevState && null !== deps) {\n          a: {\n            var JSCompiler_inline_result = prevState[1];\n            if (null === JSCompiler_inline_result)\n              console.error(\n                \"%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.\",\n                currentHookNameInDev\n              ),\n                (JSCompiler_inline_result = !1);\n            else {\n              deps.length !== JSCompiler_inline_result.length &&\n                console.error(\n                  \"The final argument passed to %s changed size between renders. The order and size of this array must remain constant.\\n\\nPrevious: %s\\nIncoming: %s\",\n                  currentHookNameInDev,\n                  \"[\" + deps.join(\", \") + \"]\",\n                  \"[\" + JSCompiler_inline_result.join(\", \") + \"]\"\n                );\n              for (\n                var i = 0;\n                i < JSCompiler_inline_result.length && i < deps.length;\n                i++\n              )\n                if (!objectIs(deps[i], JSCompiler_inline_result[i])) {\n                  JSCompiler_inline_result = !1;\n                  break a;\n                }\n              JSCompiler_inline_result = !0;\n            }\n          }\n          if (JSCompiler_inline_result) return prevState[0];\n        }\n      }\n      isInHookUserCodeInDev = !0;\n      nextCreate = nextCreate();\n      isInHookUserCodeInDev = !1;\n      workInProgressHook.memoizedState = [nextCreate, deps];\n      return nextCreate;\n    }\n    function dispatchAction(componentIdentity, queue, action) {\n      if (25 <= numberOfReRenders)\n        throw Error(\n          \"Too many re-renders. React limits the number of renders to prevent an infinite loop.\"\n        );\n      if (componentIdentity === currentlyRenderingComponent)\n        if (\n          ((didScheduleRenderPhaseUpdate = !0),\n          (componentIdentity = { action: action, next: null }),\n          null === renderPhaseUpdates && (renderPhaseUpdates = new Map()),\n          (action = renderPhaseUpdates.get(queue)),\n          void 0 === action)\n        )\n          renderPhaseUpdates.set(queue, componentIdentity);\n        else {\n          for (queue = action; null !== queue.next; ) queue = queue.next;\n          queue.next = componentIdentity;\n        }\n    }\n    function throwOnUseEffectEventCall() {\n      throw Error(\n        \"A function wrapped in useEffectEvent can't be called during rendering.\"\n      );\n    }\n    function unsupportedStartTransition() {\n      throw Error(\"startTransition cannot be called during server rendering.\");\n    }\n    function unsupportedSetOptimisticState() {\n      throw Error(\"Cannot update optimistic state while rendering.\");\n    }\n    function useActionState(action, initialState, permalink) {\n      resolveCurrentlyRenderingComponent();\n      var actionStateHookIndex = actionStateCounter++,\n        request = currentlyRenderingRequest;\n      if (\"function\" === typeof action.$$FORM_ACTION) {\n        var nextPostbackStateKey = null,\n          componentKeyPath = currentlyRenderingKeyPath;\n        request = request.formState;\n        var isSignatureEqual = action.$$IS_SIGNATURE_EQUAL;\n        if (null !== request && \"function\" === typeof isSignatureEqual) {\n          var postbackKey = request[1];\n          isSignatureEqual.call(action, request[2], request[3]) &&\n            ((nextPostbackStateKey =\n              void 0 !== permalink\n                ? \"p\" + permalink\n                : \"k\" +\n                  murmurhash3_32_gc(\n                    JSON.stringify([\n                      componentKeyPath,\n                      null,\n                      actionStateHookIndex\n                    ]),\n                    0\n                  )),\n            postbackKey === nextPostbackStateKey &&\n              ((actionStateMatchingIndex = actionStateHookIndex),\n              (initialState = request[0])));\n        }\n        var boundAction = action.bind(null, initialState);\n        action = function (payload) {\n          boundAction(payload);\n        };\n        \"function\" === typeof boundAction.$$FORM_ACTION &&\n          (action.$$FORM_ACTION = function (prefix) {\n            prefix = boundAction.$$FORM_ACTION(prefix);\n            void 0 !== permalink &&\n              (checkAttributeStringCoercion(permalink, \"target\"),\n              (permalink += \"\"),\n              (prefix.action = permalink));\n            var formData = prefix.data;\n            formData &&\n              (null === nextPostbackStateKey &&\n                (nextPostbackStateKey =\n                  void 0 !== permalink\n                    ? \"p\" + permalink\n                    : \"k\" +\n                      murmurhash3_32_gc(\n                        JSON.stringify([\n                          componentKeyPath,\n                          null,\n                          actionStateHookIndex\n                        ]),\n                        0\n                      )),\n              formData.append(\"$ACTION_KEY\", nextPostbackStateKey));\n            return prefix;\n          });\n        return [initialState, action, !1];\n      }\n      var _boundAction = action.bind(null, initialState);\n      return [\n        initialState,\n        function (payload) {\n          _boundAction(payload);\n        },\n        !1\n      ];\n    }\n    function unwrapThenable(thenable) {\n      var index = thenableIndexCounter;\n      thenableIndexCounter += 1;\n      null === thenableState && (thenableState = []);\n      return trackUsedThenable(thenableState, thenable, index);\n    }\n    function unsupportedRefresh() {\n      throw Error(\"Cache cannot be refreshed during server rendering.\");\n    }\n    function disabledLog() {}\n    function disableLogs() {\n      if (0 === disabledDepth) {\n        prevLog = console.log;\n        prevInfo = console.info;\n        prevWarn = console.warn;\n        prevError = console.error;\n        prevGroup = console.group;\n        prevGroupCollapsed = console.groupCollapsed;\n        prevGroupEnd = console.groupEnd;\n        var props = {\n          configurable: !0,\n          enumerable: !0,\n          value: disabledLog,\n          writable: !0\n        };\n        Object.defineProperties(console, {\n          info: props,\n          log: props,\n          warn: props,\n          error: props,\n          group: props,\n          groupCollapsed: props,\n          groupEnd: props\n        });\n      }\n      disabledDepth++;\n    }\n    function reenableLogs() {\n      disabledDepth--;\n      if (0 === disabledDepth) {\n        var props = { configurable: !0, enumerable: !0, writable: !0 };\n        Object.defineProperties(console, {\n          log: assign({}, props, { value: prevLog }),\n          info: assign({}, props, { value: prevInfo }),\n          warn: assign({}, props, { value: prevWarn }),\n          error: assign({}, props, { value: prevError }),\n          group: assign({}, props, { value: prevGroup }),\n          groupCollapsed: assign({}, props, { value: prevGroupCollapsed }),\n          groupEnd: assign({}, props, { value: prevGroupEnd })\n        });\n      }\n      0 > disabledDepth &&\n        console.error(\n          \"disabledDepth fell below zero. This is a bug in React. Please file an issue.\"\n        );\n    }\n    function formatOwnerStack(error) {\n      var prevPrepareStackTrace = Error.prepareStackTrace;\n      Error.prepareStackTrace = void 0;\n      error = error.stack;\n      Error.prepareStackTrace = prevPrepareStackTrace;\n      error.startsWith(\"Error: react-stack-top-frame\\n\") &&\n        (error = error.slice(29));\n      prevPrepareStackTrace = error.indexOf(\"\\n\");\n      -1 !== prevPrepareStackTrace &&\n        (error = error.slice(prevPrepareStackTrace + 1));\n      prevPrepareStackTrace = error.indexOf(\"react_stack_bottom_frame\");\n      -1 !== prevPrepareStackTrace &&\n        (prevPrepareStackTrace = error.lastIndexOf(\n          \"\\n\",\n          prevPrepareStackTrace\n        ));\n      if (-1 !== prevPrepareStackTrace)\n        error = error.slice(0, prevPrepareStackTrace);\n      else return \"\";\n      return error;\n    }\n    function describeBuiltInComponentFrame(name) {\n      if (void 0 === prefix)\n        try {\n          throw Error();\n        } catch (x) {\n          var match = x.stack.trim().match(/\\n( *(at )?)/);\n          prefix = (match && match[1]) || \"\";\n          suffix =\n            -1 < x.stack.indexOf(\"\\n    at\")\n              ? \" (<anonymous>)\"\n              : -1 < x.stack.indexOf(\"@\")\n                ? \"@unknown:0:0\"\n                : \"\";\n        }\n      return \"\\n\" + prefix + name + suffix;\n    }\n    function describeNativeComponentFrame(fn, construct) {\n      if (!fn || reentry) return \"\";\n      var frame = componentFrameCache.get(fn);\n      if (void 0 !== frame) return frame;\n      reentry = !0;\n      frame = Error.prepareStackTrace;\n      Error.prepareStackTrace = void 0;\n      var previousDispatcher = null;\n      previousDispatcher = ReactSharedInternals.H;\n      ReactSharedInternals.H = null;\n      disableLogs();\n      try {\n        var RunInRootFrame = {\n          DetermineComponentFrameRoot: function () {\n            try {\n              if (construct) {\n                var Fake = function () {\n                  throw Error();\n                };\n                Object.defineProperty(Fake.prototype, \"props\", {\n                  set: function () {\n                    throw Error();\n                  }\n                });\n                if (\"object\" === typeof Reflect && Reflect.construct) {\n                  try {\n                    Reflect.construct(Fake, []);\n                  } catch (x) {\n                    var control = x;\n                  }\n                  Reflect.construct(fn, [], Fake);\n                } else {\n                  try {\n                    Fake.call();\n                  } catch (x$0) {\n                    control = x$0;\n                  }\n                  fn.call(Fake.prototype);\n                }\n              } else {\n                try {\n                  throw Error();\n                } catch (x$1) {\n                  control = x$1;\n                }\n                (Fake = fn()) &&\n                  \"function\" === typeof Fake.catch &&\n                  Fake.catch(function () {});\n              }\n            } catch (sample) {\n              if (sample && control && \"string\" === typeof sample.stack)\n                return [sample.stack, control.stack];\n            }\n            return [null, null];\n          }\n        };\n        RunInRootFrame.DetermineComponentFrameRoot.displayName =\n          \"DetermineComponentFrameRoot\";\n        var namePropDescriptor = Object.getOwnPropertyDescriptor(\n          RunInRootFrame.DetermineComponentFrameRoot,\n          \"name\"\n        );\n        namePropDescriptor &&\n          namePropDescriptor.configurable &&\n          Object.defineProperty(\n            RunInRootFrame.DetermineComponentFrameRoot,\n            \"name\",\n            { value: \"DetermineComponentFrameRoot\" }\n          );\n        var _RunInRootFrame$Deter =\n            RunInRootFrame.DetermineComponentFrameRoot(),\n          sampleStack = _RunInRootFrame$Deter[0],\n          controlStack = _RunInRootFrame$Deter[1];\n        if (sampleStack && controlStack) {\n          var sampleLines = sampleStack.split(\"\\n\"),\n            controlLines = controlStack.split(\"\\n\");\n          for (\n            _RunInRootFrame$Deter = namePropDescriptor = 0;\n            namePropDescriptor < sampleLines.length &&\n            !sampleLines[namePropDescriptor].includes(\n              \"DetermineComponentFrameRoot\"\n            );\n\n          )\n            namePropDescriptor++;\n          for (\n            ;\n            _RunInRootFrame$Deter < controlLines.length &&\n            !controlLines[_RunInRootFrame$Deter].includes(\n              \"DetermineComponentFrameRoot\"\n            );\n\n          )\n            _RunInRootFrame$Deter++;\n          if (\n            namePropDescriptor === sampleLines.length ||\n            _RunInRootFrame$Deter === controlLines.length\n          )\n            for (\n              namePropDescriptor = sampleLines.length - 1,\n                _RunInRootFrame$Deter = controlLines.length - 1;\n              1 <= namePropDescriptor &&\n              0 <= _RunInRootFrame$Deter &&\n              sampleLines[namePropDescriptor] !==\n                controlLines[_RunInRootFrame$Deter];\n\n            )\n              _RunInRootFrame$Deter--;\n          for (\n            ;\n            1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter;\n            namePropDescriptor--, _RunInRootFrame$Deter--\n          )\n            if (\n              sampleLines[namePropDescriptor] !==\n              controlLines[_RunInRootFrame$Deter]\n            ) {\n              if (1 !== namePropDescriptor || 1 !== _RunInRootFrame$Deter) {\n                do\n                  if (\n                    (namePropDescriptor--,\n                    _RunInRootFrame$Deter--,\n                    0 > _RunInRootFrame$Deter ||\n                      sampleLines[namePropDescriptor] !==\n                        controlLines[_RunInRootFrame$Deter])\n                  ) {\n                    var _frame =\n                      \"\\n\" +\n                      sampleLines[namePropDescriptor].replace(\n                        \" at new \",\n                        \" at \"\n                      );\n                    fn.displayName &&\n                      _frame.includes(\"<anonymous>\") &&\n                      (_frame = _frame.replace(\"<anonymous>\", fn.displayName));\n                    \"function\" === typeof fn &&\n                      componentFrameCache.set(fn, _frame);\n                    return _frame;\n                  }\n                while (1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter);\n              }\n              break;\n            }\n        }\n      } finally {\n        (reentry = !1),\n          (ReactSharedInternals.H = previousDispatcher),\n          reenableLogs(),\n          (Error.prepareStackTrace = frame);\n      }\n      sampleLines = (sampleLines = fn ? fn.displayName || fn.name : \"\")\n        ? describeBuiltInComponentFrame(sampleLines)\n        : \"\";\n      \"function\" === typeof fn && componentFrameCache.set(fn, sampleLines);\n      return sampleLines;\n    }\n    function describeComponentStackByType(type) {\n      if (\"string\" === typeof type) return describeBuiltInComponentFrame(type);\n      if (\"function\" === typeof type)\n        return type.prototype && type.prototype.isReactComponent\n          ? describeNativeComponentFrame(type, !0)\n          : describeNativeComponentFrame(type, !1);\n      if (\"object\" === typeof type && null !== type) {\n        switch (type.$$typeof) {\n          case REACT_FORWARD_REF_TYPE:\n            return describeNativeComponentFrame(type.render, !1);\n          case REACT_MEMO_TYPE:\n            return describeNativeComponentFrame(type.type, !1);\n          case REACT_LAZY_TYPE:\n            var lazyComponent = type,\n              payload = lazyComponent._payload;\n            lazyComponent = lazyComponent._init;\n            try {\n              type = lazyComponent(payload);\n            } catch (x) {\n              return describeBuiltInComponentFrame(\"Lazy\");\n            }\n            return describeComponentStackByType(type);\n        }\n        if (\"string\" === typeof type.name) {\n          a: {\n            payload = type.name;\n            lazyComponent = type.env;\n            type = type.debugLocation;\n            if (null != type) {\n              type = formatOwnerStack(type);\n              var idx = type.lastIndexOf(\"\\n\");\n              type = -1 === idx ? type : type.slice(idx + 1);\n              if (-1 !== type.indexOf(payload)) {\n                payload = \"\\n\" + type;\n                break a;\n              }\n            }\n            payload = describeBuiltInComponentFrame(\n              payload + (lazyComponent ? \" [\" + lazyComponent + \"]\" : \"\")\n            );\n          }\n          return payload;\n        }\n      }\n      switch (type) {\n        case REACT_SUSPENSE_LIST_TYPE:\n          return describeBuiltInComponentFrame(\"SuspenseList\");\n        case REACT_SUSPENSE_TYPE:\n          return describeBuiltInComponentFrame(\"Suspense\");\n      }\n      return \"\";\n    }\n    function resetOwnerStackLimit() {\n      var now = getCurrentTime();\n      1e3 < now - lastResetTime &&\n        ((ReactSharedInternals.recentlyCreatedOwnerStacks = 0),\n        (lastResetTime = now));\n    }\n    function isEligibleForOutlining(request, boundary) {\n      return (\n        (500 < boundary.byteSize ||\n          hasSuspenseyContent(boundary.contentState)) &&\n        null === boundary.contentPreamble\n      );\n    }\n    function defaultErrorHandler(error) {\n      if (\n        \"object\" === typeof error &&\n        null !== error &&\n        \"string\" === typeof error.environmentName\n      ) {\n        var JSCompiler_inline_result = error.environmentName;\n        error = [error].slice(0);\n        \"string\" === typeof error[0]\n          ? error.splice(\n              0,\n              1,\n              \"%c%s%c \" + error[0],\n              \"background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px\",\n              \" \" + JSCompiler_inline_result + \" \",\n              \"\"\n            )\n          : error.splice(\n              0,\n              0,\n              \"%c%s%c\",\n              \"background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px\",\n              \" \" + JSCompiler_inline_result + \" \",\n              \"\"\n            );\n        error.unshift(console);\n        JSCompiler_inline_result = bind.apply(console.error, error);\n        JSCompiler_inline_result();\n      } else console.error(error);\n      return null;\n    }\n    function RequestInstance(\n      resumableState,\n      renderState,\n      rootFormatContext,\n      progressiveChunkSize,\n      onError,\n      onAllReady,\n      onShellReady,\n      onShellError,\n      onFatalError,\n      onPostpone,\n      formState\n    ) {\n      var abortSet = new Set();\n      this.destination = null;\n      this.flushScheduled = !1;\n      this.resumableState = resumableState;\n      this.renderState = renderState;\n      this.rootFormatContext = rootFormatContext;\n      this.progressiveChunkSize =\n        void 0 === progressiveChunkSize ? 12800 : progressiveChunkSize;\n      this.status = 10;\n      this.fatalError = null;\n      this.pendingRootTasks = this.allPendingTasks = this.nextSegmentId = 0;\n      this.completedPreambleSegments = this.completedRootSegment = null;\n      this.byteSize = 0;\n      this.abortableTasks = abortSet;\n      this.pingedTasks = [];\n      this.clientRenderedBoundaries = [];\n      this.completedBoundaries = [];\n      this.partialBoundaries = [];\n      this.trackedPostpones = null;\n      this.onError = void 0 === onError ? defaultErrorHandler : onError;\n      this.onPostpone = void 0 === onPostpone ? noop : onPostpone;\n      this.onAllReady = void 0 === onAllReady ? noop : onAllReady;\n      this.onShellReady = void 0 === onShellReady ? noop : onShellReady;\n      this.onShellError = void 0 === onShellError ? noop : onShellError;\n      this.onFatalError = void 0 === onFatalError ? noop : onFatalError;\n      this.formState = void 0 === formState ? null : formState;\n      this.didWarnForKey = null;\n    }\n    function createRequest(\n      children,\n      resumableState,\n      renderState,\n      rootFormatContext,\n      progressiveChunkSize,\n      onError,\n      onAllReady,\n      onShellReady,\n      onShellError,\n      onFatalError,\n      onPostpone,\n      formState\n    ) {\n      resetOwnerStackLimit();\n      resumableState = new RequestInstance(\n        resumableState,\n        renderState,\n        rootFormatContext,\n        progressiveChunkSize,\n        onError,\n        onAllReady,\n        onShellReady,\n        onShellError,\n        onFatalError,\n        onPostpone,\n        formState\n      );\n      renderState = createPendingSegment(\n        resumableState,\n        0,\n        null,\n        rootFormatContext,\n        !1,\n        !1\n      );\n      renderState.parentFlushed = !0;\n      children = createRenderTask(\n        resumableState,\n        null,\n        children,\n        -1,\n        null,\n        renderState,\n        null,\n        null,\n        resumableState.abortableTasks,\n        null,\n        rootFormatContext,\n        null,\n        emptyTreeContext,\n        null,\n        null,\n        emptyContextObject,\n        null\n      );\n      pushComponentStack(children);\n      resumableState.pingedTasks.push(children);\n      return resumableState;\n    }\n    function createPrerenderRequest(\n      children,\n      resumableState,\n      renderState,\n      rootFormatContext,\n      progressiveChunkSize,\n      onError,\n      onAllReady,\n      onShellReady,\n      onShellError,\n      onFatalError,\n      onPostpone\n    ) {\n      children = createRequest(\n        children,\n        resumableState,\n        renderState,\n        rootFormatContext,\n        progressiveChunkSize,\n        onError,\n        onAllReady,\n        onShellReady,\n        onShellError,\n        onFatalError,\n        onPostpone,\n        void 0\n      );\n      children.trackedPostpones = {\n        workingMap: new Map(),\n        rootNodes: [],\n        rootSlots: null\n      };\n      return children;\n    }\n    function resumeRequest(\n      children,\n      postponedState,\n      renderState,\n      onError,\n      onAllReady,\n      onShellReady,\n      onShellError,\n      onFatalError,\n      onPostpone\n    ) {\n      resetOwnerStackLimit();\n      renderState = new RequestInstance(\n        postponedState.resumableState,\n        renderState,\n        postponedState.rootFormatContext,\n        postponedState.progressiveChunkSize,\n        onError,\n        onAllReady,\n        onShellReady,\n        onShellError,\n        onFatalError,\n        onPostpone,\n        null\n      );\n      renderState.nextSegmentId = postponedState.nextSegmentId;\n      if (\"number\" === typeof postponedState.replaySlots)\n        return (\n          (onError = createPendingSegment(\n            renderState,\n            0,\n            null,\n            postponedState.rootFormatContext,\n            !1,\n            !1\n          )),\n          (onError.parentFlushed = !0),\n          (children = createRenderTask(\n            renderState,\n            null,\n            children,\n            -1,\n            null,\n            onError,\n            null,\n            null,\n            renderState.abortableTasks,\n            null,\n            postponedState.rootFormatContext,\n            null,\n            emptyTreeContext,\n            null,\n            null,\n            emptyContextObject,\n            null\n          )),\n          pushComponentStack(children),\n          renderState.pingedTasks.push(children),\n          renderState\n        );\n      children = createReplayTask(\n        renderState,\n        null,\n        {\n          nodes: postponedState.replayNodes,\n          slots: postponedState.replaySlots,\n          pendingTasks: 0\n        },\n        children,\n        -1,\n        null,\n        null,\n        renderState.abortableTasks,\n        null,\n        postponedState.rootFormatContext,\n        null,\n        emptyTreeContext,\n        null,\n        null,\n        emptyContextObject,\n        null\n      );\n      pushComponentStack(children);\n      renderState.pingedTasks.push(children);\n      return renderState;\n    }\n    function resumeAndPrerenderRequest(\n      children,\n      postponedState,\n      renderState,\n      onError,\n      onAllReady,\n      onShellReady,\n      onShellError,\n      onFatalError,\n      onPostpone\n    ) {\n      children = resumeRequest(\n        children,\n        postponedState,\n        renderState,\n        onError,\n        onAllReady,\n        onShellReady,\n        onShellError,\n        onFatalError,\n        onPostpone\n      );\n      children.trackedPostpones = {\n        workingMap: new Map(),\n        rootNodes: [],\n        rootSlots: null\n      };\n      return children;\n    }\n    function pingTask(request, task) {\n      request.pingedTasks.push(task);\n      1 === request.pingedTasks.length &&\n        ((request.flushScheduled = null !== request.destination),\n        null !== request.trackedPostpones || 10 === request.status\n          ? scheduleMicrotask(function () {\n              return performWork(request);\n            })\n          : scheduleWork(function () {\n              return performWork(request);\n            }));\n    }\n    function createSuspenseBoundary(\n      request,\n      row,\n      fallbackAbortableTasks,\n      contentPreamble,\n      fallbackPreamble\n    ) {\n      fallbackAbortableTasks = {\n        status: PENDING,\n        rootSegmentID: -1,\n        parentFlushed: !1,\n        pendingTasks: 0,\n        row: row,\n        completedSegments: [],\n        byteSize: 0,\n        fallbackAbortableTasks: fallbackAbortableTasks,\n        errorDigest: null,\n        contentState: createHoistableState(),\n        fallbackState: createHoistableState(),\n        contentPreamble: contentPreamble,\n        fallbackPreamble: fallbackPreamble,\n        trackedContentKeyPath: null,\n        trackedFallbackNode: null,\n        errorMessage: null,\n        errorStack: null,\n        errorComponentStack: null\n      };\n      null !== row &&\n        (row.pendingTasks++,\n        (contentPreamble = row.boundaries),\n        null !== contentPreamble &&\n          (request.allPendingTasks++,\n          fallbackAbortableTasks.pendingTasks++,\n          contentPreamble.push(fallbackAbortableTasks)),\n        (request = row.inheritedHoistables),\n        null !== request &&\n          hoistHoistables(fallbackAbortableTasks.contentState, request));\n      return fallbackAbortableTasks;\n    }\n    function createRenderTask(\n      request,\n      thenableState,\n      node,\n      childIndex,\n      blockedBoundary,\n      blockedSegment,\n      blockedPreamble,\n      hoistableState,\n      abortSet,\n      keyPath,\n      formatContext,\n      context,\n      treeContext,\n      row,\n      componentStack,\n      legacyContext,\n      debugTask\n    ) {\n      request.allPendingTasks++;\n      null === blockedBoundary\n        ? request.pendingRootTasks++\n        : blockedBoundary.pendingTasks++;\n      null !== row && row.pendingTasks++;\n      var task = {\n        replay: null,\n        node: node,\n        childIndex: childIndex,\n        ping: function () {\n          return pingTask(request, task);\n        },\n        blockedBoundary: blockedBoundary,\n        blockedSegment: blockedSegment,\n        blockedPreamble: blockedPreamble,\n        hoistableState: hoistableState,\n        abortSet: abortSet,\n        keyPath: keyPath,\n        formatContext: formatContext,\n        context: context,\n        treeContext: treeContext,\n        row: row,\n        componentStack: componentStack,\n        thenableState: thenableState\n      };\n      task.debugTask = debugTask;\n      abortSet.add(task);\n      return task;\n    }\n    function createReplayTask(\n      request,\n      thenableState,\n      replay,\n      node,\n      childIndex,\n      blockedBoundary,\n      hoistableState,\n      abortSet,\n      keyPath,\n      formatContext,\n      context,\n      treeContext,\n      row,\n      componentStack,\n      legacyContext,\n      debugTask\n    ) {\n      request.allPendingTasks++;\n      null === blockedBoundary\n        ? request.pendingRootTasks++\n        : blockedBoundary.pendingTasks++;\n      null !== row && row.pendingTasks++;\n      replay.pendingTasks++;\n      var task = {\n        replay: replay,\n        node: node,\n        childIndex: childIndex,\n        ping: function () {\n          return pingTask(request, task);\n        },\n        blockedBoundary: blockedBoundary,\n        blockedSegment: null,\n        blockedPreamble: null,\n        hoistableState: hoistableState,\n        abortSet: abortSet,\n        keyPath: keyPath,\n        formatContext: formatContext,\n        context: context,\n        treeContext: treeContext,\n        row: row,\n        componentStack: componentStack,\n        thenableState: thenableState\n      };\n      task.debugTask = debugTask;\n      abortSet.add(task);\n      return task;\n    }\n    function createPendingSegment(\n      request,\n      index,\n      boundary,\n      parentFormatContext,\n      lastPushedText,\n      textEmbedded\n    ) {\n      return {\n        status: PENDING,\n        parentFlushed: !1,\n        id: -1,\n        index: index,\n        chunks: [],\n        children: [],\n        preambleChildren: [],\n        parentFormatContext: parentFormatContext,\n        boundary: boundary,\n        lastPushedText: lastPushedText,\n        textEmbedded: textEmbedded\n      };\n    }\n    function getCurrentStackInDEV() {\n      if (null === currentTaskInDEV || null === currentTaskInDEV.componentStack)\n        return \"\";\n      var componentStack = currentTaskInDEV.componentStack;\n      try {\n        var info = \"\";\n        if (\"string\" === typeof componentStack.type)\n          info += describeBuiltInComponentFrame(componentStack.type);\n        else if (\"function\" === typeof componentStack.type) {\n          if (!componentStack.owner) {\n            var JSCompiler_temp_const = info,\n              fn = componentStack.type,\n              name = fn ? fn.displayName || fn.name : \"\";\n            var JSCompiler_inline_result = name\n              ? describeBuiltInComponentFrame(name)\n              : \"\";\n            info = JSCompiler_temp_const + JSCompiler_inline_result;\n          }\n        } else\n          componentStack.owner ||\n            (info += describeComponentStackByType(componentStack.type));\n        for (; componentStack; )\n          (JSCompiler_temp_const = null),\n            null != componentStack.debugStack\n              ? (JSCompiler_temp_const = formatOwnerStack(\n                  componentStack.debugStack\n                ))\n              : ((JSCompiler_inline_result = componentStack),\n                null != JSCompiler_inline_result.stack &&\n                  (JSCompiler_temp_const =\n                    \"string\" !== typeof JSCompiler_inline_result.stack\n                      ? (JSCompiler_inline_result.stack = formatOwnerStack(\n                          JSCompiler_inline_result.stack\n                        ))\n                      : JSCompiler_inline_result.stack)),\n            (componentStack = componentStack.owner) &&\n              JSCompiler_temp_const &&\n              (info += \"\\n\" + JSCompiler_temp_const);\n        var JSCompiler_inline_result$jscomp$0 = info;\n      } catch (x) {\n        JSCompiler_inline_result$jscomp$0 =\n          \"\\nError generating stack: \" + x.message + \"\\n\" + x.stack;\n      }\n      return JSCompiler_inline_result$jscomp$0;\n    }\n    function pushHaltedAwaitOnComponentStack(task, debugInfo) {\n      if (null != debugInfo)\n        for (var i = debugInfo.length - 1; 0 <= i; i--) {\n          var info = debugInfo[i];\n          if (\"string\" === typeof info.name) break;\n          if (\"number\" === typeof info.time) break;\n          if (null != info.awaited) {\n            var bestStack = null == info.debugStack ? info.awaited : info;\n            if (void 0 !== bestStack.debugStack) {\n              task.componentStack = {\n                parent: task.componentStack,\n                type: info,\n                owner: bestStack.owner,\n                stack: bestStack.debugStack\n              };\n              task.debugTask = bestStack.debugTask;\n              break;\n            }\n          }\n        }\n    }\n    function pushServerComponentStack(task, debugInfo) {\n      if (null != debugInfo)\n        for (var i = 0; i < debugInfo.length; i++) {\n          var componentInfo = debugInfo[i];\n          \"string\" === typeof componentInfo.name &&\n            void 0 !== componentInfo.debugStack &&\n            ((task.componentStack = {\n              parent: task.componentStack,\n              type: componentInfo,\n              owner: componentInfo.owner,\n              stack: componentInfo.debugStack\n            }),\n            (task.debugTask = componentInfo.debugTask));\n        }\n    }\n    function pushComponentStack(task) {\n      var node = task.node;\n      if (\"object\" === typeof node && null !== node)\n        switch (node.$$typeof) {\n          case REACT_ELEMENT_TYPE:\n            var type = node.type,\n              owner = node._owner,\n              stack = node._debugStack;\n            pushServerComponentStack(task, node._debugInfo);\n            task.debugTask = node._debugTask;\n            task.componentStack = {\n              parent: task.componentStack,\n              type: type,\n              owner: owner,\n              stack: stack\n            };\n            break;\n          case REACT_LAZY_TYPE:\n            pushServerComponentStack(task, node._debugInfo);\n            break;\n          default:\n            \"function\" === typeof node.then &&\n              pushServerComponentStack(task, node._debugInfo);\n        }\n    }\n    function replaceSuspenseComponentStackWithSuspenseFallbackStack(\n      componentStack\n    ) {\n      return null === componentStack\n        ? null\n        : {\n            parent: componentStack.parent,\n            type: \"Suspense Fallback\",\n            owner: componentStack.owner,\n            stack: componentStack.stack\n          };\n    }\n    function getThrownInfo(node$jscomp$0) {\n      var errorInfo = {};\n      node$jscomp$0 &&\n        Object.defineProperty(errorInfo, \"componentStack\", {\n          configurable: !0,\n          enumerable: !0,\n          get: function () {\n            try {\n              var info = \"\",\n                node = node$jscomp$0;\n              do\n                (info += describeComponentStackByType(node.type)),\n                  (node = node.parent);\n              while (node);\n              var stack = info;\n            } catch (x) {\n              stack = \"\\nError generating stack: \" + x.message + \"\\n\" + x.stack;\n            }\n            Object.defineProperty(errorInfo, \"componentStack\", {\n              value: stack\n            });\n            return stack;\n          }\n        });\n      return errorInfo;\n    }\n    function encodeErrorForBoundary(\n      boundary,\n      digest,\n      error,\n      thrownInfo,\n      wasAborted\n    ) {\n      boundary.errorDigest = digest;\n      error instanceof Error\n        ? ((digest = String(error.message)), (error = String(error.stack)))\n        : ((digest =\n            \"object\" === typeof error && null !== error\n              ? describeObjectForErrorMessage(error)\n              : String(error)),\n          (error = null));\n      wasAborted = wasAborted\n        ? \"Switched to client rendering because the server rendering aborted due to:\\n\\n\"\n        : \"Switched to client rendering because the server rendering errored:\\n\\n\";\n      boundary.errorMessage = wasAborted + digest;\n      boundary.errorStack = null !== error ? wasAborted + error : null;\n      boundary.errorComponentStack = thrownInfo.componentStack;\n    }\n    function logRecoverableError(request, error, errorInfo, debugTask) {\n      request = request.onError;\n      error = debugTask\n        ? debugTask.run(request.bind(null, error, errorInfo))\n        : request(error, errorInfo);\n      if (null != error && \"string\" !== typeof error)\n        console.error(\n          'onError returned something with a type other than \"string\". onError should return a string and may return null or undefined but must not return anything else. It received something of type \"%s\" instead',\n          typeof error\n        );\n      else return error;\n    }\n    function fatalError(request, error, errorInfo, debugTask) {\n      errorInfo = request.onShellError;\n      var onFatalError = request.onFatalError;\n      debugTask\n        ? (debugTask.run(errorInfo.bind(null, error)),\n          debugTask.run(onFatalError.bind(null, error)))\n        : (errorInfo(error), onFatalError(error));\n      null !== request.destination\n        ? ((request.status = CLOSED),\n          closeWithError(request.destination, error))\n        : ((request.status = 13), (request.fatalError = error));\n    }\n    function finishSuspenseListRow(request, row) {\n      unblockSuspenseListRow(request, row.next, row.hoistables);\n    }\n    function unblockSuspenseListRow(\n      request,\n      unblockedRow,\n      inheritedHoistables\n    ) {\n      for (; null !== unblockedRow; ) {\n        null !== inheritedHoistables &&\n          (hoistHoistables(unblockedRow.hoistables, inheritedHoistables),\n          (unblockedRow.inheritedHoistables = inheritedHoistables));\n        var unblockedBoundaries = unblockedRow.boundaries;\n        if (null !== unblockedBoundaries) {\n          unblockedRow.boundaries = null;\n          for (var i = 0; i < unblockedBoundaries.length; i++) {\n            var unblockedBoundary = unblockedBoundaries[i];\n            null !== inheritedHoistables &&\n              hoistHoistables(\n                unblockedBoundary.contentState,\n                inheritedHoistables\n              );\n            finishedTask(request, unblockedBoundary, null, null);\n          }\n        }\n        unblockedRow.pendingTasks--;\n        if (0 < unblockedRow.pendingTasks) break;\n        inheritedHoistables = unblockedRow.hoistables;\n        unblockedRow = unblockedRow.next;\n      }\n    }\n    function tryToResolveTogetherRow(request, togetherRow) {\n      var boundaries = togetherRow.boundaries;\n      if (\n        null !== boundaries &&\n        togetherRow.pendingTasks === boundaries.length\n      ) {\n        for (\n          var allCompleteAndInlinable = !0, i = 0;\n          i < boundaries.length;\n          i++\n        ) {\n          var rowBoundary = boundaries[i];\n          if (\n            1 !== rowBoundary.pendingTasks ||\n            rowBoundary.parentFlushed ||\n            isEligibleForOutlining(request, rowBoundary)\n          ) {\n            allCompleteAndInlinable = !1;\n            break;\n          }\n        }\n        allCompleteAndInlinable &&\n          unblockSuspenseListRow(request, togetherRow, togetherRow.hoistables);\n      }\n    }\n    function createSuspenseListRow(previousRow) {\n      var newRow = {\n        pendingTasks: 1,\n        boundaries: null,\n        hoistables: createHoistableState(),\n        inheritedHoistables: null,\n        together: !1,\n        next: null\n      };\n      null !== previousRow &&\n        0 < previousRow.pendingTasks &&\n        (newRow.pendingTasks++,\n        (newRow.boundaries = []),\n        (previousRow.next = newRow));\n      return newRow;\n    }\n    function renderSuspenseListRows(request, task, keyPath, rows, revealOrder) {\n      var prevKeyPath = task.keyPath,\n        prevTreeContext = task.treeContext,\n        prevRow = task.row,\n        previousComponentStack = task.componentStack;\n      var previousDebugTask = task.debugTask;\n      pushServerComponentStack(task, task.node.props.children._debugInfo);\n      task.keyPath = keyPath;\n      keyPath = rows.length;\n      var previousSuspenseListRow = null;\n      if (null !== task.replay) {\n        var resumeSlots = task.replay.slots;\n        if (null !== resumeSlots && \"object\" === typeof resumeSlots)\n          for (var n = 0; n < keyPath; n++) {\n            var i =\n                \"backwards\" !== revealOrder &&\n                \"unstable_legacy-backwards\" !== revealOrder\n                  ? n\n                  : keyPath - 1 - n,\n              node = rows[i];\n            task.row = previousSuspenseListRow = createSuspenseListRow(\n              previousSuspenseListRow\n            );\n            task.treeContext = pushTreeContext(prevTreeContext, keyPath, i);\n            var resumeSegmentID = resumeSlots[i];\n            \"number\" === typeof resumeSegmentID\n              ? (resumeNode(request, task, resumeSegmentID, node, i),\n                delete resumeSlots[i])\n              : renderNode(request, task, node, i);\n            0 === --previousSuspenseListRow.pendingTasks &&\n              finishSuspenseListRow(request, previousSuspenseListRow);\n          }\n        else\n          for (resumeSlots = 0; resumeSlots < keyPath; resumeSlots++)\n            (n =\n              \"backwards\" !== revealOrder &&\n              \"unstable_legacy-backwards\" !== revealOrder\n                ? resumeSlots\n                : keyPath - 1 - resumeSlots),\n              (i = rows[n]),\n              warnForMissingKey(request, task, i),\n              (task.row = previousSuspenseListRow =\n                createSuspenseListRow(previousSuspenseListRow)),\n              (task.treeContext = pushTreeContext(prevTreeContext, keyPath, n)),\n              renderNode(request, task, i, n),\n              0 === --previousSuspenseListRow.pendingTasks &&\n                finishSuspenseListRow(request, previousSuspenseListRow);\n      } else if (\n        \"backwards\" !== revealOrder &&\n        \"unstable_legacy-backwards\" !== revealOrder\n      )\n        for (revealOrder = 0; revealOrder < keyPath; revealOrder++)\n          (resumeSlots = rows[revealOrder]),\n            warnForMissingKey(request, task, resumeSlots),\n            (task.row = previousSuspenseListRow =\n              createSuspenseListRow(previousSuspenseListRow)),\n            (task.treeContext = pushTreeContext(\n              prevTreeContext,\n              keyPath,\n              revealOrder\n            )),\n            renderNode(request, task, resumeSlots, revealOrder),\n            0 === --previousSuspenseListRow.pendingTasks &&\n              finishSuspenseListRow(request, previousSuspenseListRow);\n      else {\n        revealOrder = task.blockedSegment;\n        resumeSlots = revealOrder.children.length;\n        n = revealOrder.chunks.length;\n        for (i = keyPath - 1; 0 <= i; i--) {\n          node = rows[i];\n          task.row = previousSuspenseListRow = createSuspenseListRow(\n            previousSuspenseListRow\n          );\n          task.treeContext = pushTreeContext(prevTreeContext, keyPath, i);\n          resumeSegmentID = createPendingSegment(\n            request,\n            n,\n            null,\n            task.formatContext,\n            0 === i ? revealOrder.lastPushedText : !0,\n            !0\n          );\n          revealOrder.children.splice(resumeSlots, 0, resumeSegmentID);\n          task.blockedSegment = resumeSegmentID;\n          warnForMissingKey(request, task, node);\n          try {\n            renderNode(request, task, node, i),\n              resumeSegmentID.lastPushedText &&\n                resumeSegmentID.textEmbedded &&\n                resumeSegmentID.chunks.push(textSeparator),\n              (resumeSegmentID.status = COMPLETED),\n              finishedSegment(request, task.blockedBoundary, resumeSegmentID),\n              0 === --previousSuspenseListRow.pendingTasks &&\n                finishSuspenseListRow(request, previousSuspenseListRow);\n          } catch (thrownValue) {\n            throw (\n              ((resumeSegmentID.status =\n                12 === request.status ? ABORTED : ERRORED),\n              thrownValue)\n            );\n          }\n        }\n        task.blockedSegment = revealOrder;\n        revealOrder.lastPushedText = !1;\n      }\n      null !== prevRow &&\n        null !== previousSuspenseListRow &&\n        0 < previousSuspenseListRow.pendingTasks &&\n        (prevRow.pendingTasks++, (previousSuspenseListRow.next = prevRow));\n      task.treeContext = prevTreeContext;\n      task.row = prevRow;\n      task.keyPath = prevKeyPath;\n      task.componentStack = previousComponentStack;\n      task.debugTask = previousDebugTask;\n    }\n    function renderWithHooks(\n      request,\n      task,\n      keyPath,\n      Component,\n      props,\n      secondArg\n    ) {\n      var prevThenableState = task.thenableState;\n      task.thenableState = null;\n      currentlyRenderingComponent = {};\n      currentlyRenderingTask = task;\n      currentlyRenderingRequest = request;\n      currentlyRenderingKeyPath = keyPath;\n      isInHookUserCodeInDev = !1;\n      actionStateCounter = localIdCounter = 0;\n      actionStateMatchingIndex = -1;\n      thenableIndexCounter = 0;\n      thenableState = prevThenableState;\n      for (\n        request = callComponentInDEV(Component, props, secondArg);\n        didScheduleRenderPhaseUpdate;\n\n      )\n        (didScheduleRenderPhaseUpdate = !1),\n          (actionStateCounter = localIdCounter = 0),\n          (actionStateMatchingIndex = -1),\n          (thenableIndexCounter = 0),\n          (numberOfReRenders += 1),\n          (workInProgressHook = null),\n          (request = Component(props, secondArg));\n      resetHooksState();\n      return request;\n    }\n    function finishFunctionComponent(\n      request,\n      task,\n      keyPath,\n      children,\n      hasId,\n      actionStateCount,\n      actionStateMatchingIndex\n    ) {\n      var didEmitActionStateMarkers = !1;\n      if (0 !== actionStateCount && null !== request.formState) {\n        var segment = task.blockedSegment;\n        if (null !== segment) {\n          didEmitActionStateMarkers = !0;\n          segment = segment.chunks;\n          for (var i = 0; i < actionStateCount; i++)\n            i === actionStateMatchingIndex\n              ? segment.push(formStateMarkerIsMatching)\n              : segment.push(formStateMarkerIsNotMatching);\n        }\n      }\n      actionStateCount = task.keyPath;\n      task.keyPath = keyPath;\n      hasId\n        ? ((keyPath = task.treeContext),\n          (task.treeContext = pushTreeContext(keyPath, 1, 0)),\n          renderNode(request, task, children, -1),\n          (task.treeContext = keyPath))\n        : didEmitActionStateMarkers\n          ? renderNode(request, task, children, -1)\n          : renderNodeDestructive(request, task, children, -1);\n      task.keyPath = actionStateCount;\n    }\n    function renderElement(request, task, keyPath, type, props, ref) {\n      if (\"function\" === typeof type)\n        if (type.prototype && type.prototype.isReactComponent) {\n          var newProps = props;\n          if (\"ref\" in props) {\n            newProps = {};\n            for (var propName in props)\n              \"ref\" !== propName && (newProps[propName] = props[propName]);\n          }\n          var defaultProps = type.defaultProps;\n          if (defaultProps) {\n            newProps === props && (newProps = assign({}, newProps, props));\n            for (var _propName in defaultProps)\n              void 0 === newProps[_propName] &&\n                (newProps[_propName] = defaultProps[_propName]);\n          }\n          var resolvedProps = newProps;\n          var context = emptyContextObject,\n            contextType = type.contextType;\n          if (\n            \"contextType\" in type &&\n            null !== contextType &&\n            (void 0 === contextType ||\n              contextType.$$typeof !== REACT_CONTEXT_TYPE) &&\n            !didWarnAboutInvalidateContextType.has(type)\n          ) {\n            didWarnAboutInvalidateContextType.add(type);\n            var addendum =\n              void 0 === contextType\n                ? \" However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file.\"\n                : \"object\" !== typeof contextType\n                  ? \" However, it is set to a \" + typeof contextType + \".\"\n                  : contextType.$$typeof === REACT_CONSUMER_TYPE\n                    ? \" Did you accidentally pass the Context.Consumer instead?\"\n                    : \" However, it is set to an object with keys {\" +\n                      Object.keys(contextType).join(\", \") +\n                      \"}.\";\n            console.error(\n              \"%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s\",\n              getComponentNameFromType(type) || \"Component\",\n              addendum\n            );\n          }\n          \"object\" === typeof contextType &&\n            null !== contextType &&\n            (context = contextType._currentValue);\n          var instance = new type(resolvedProps, context);\n          if (\n            \"function\" === typeof type.getDerivedStateFromProps &&\n            (null === instance.state || void 0 === instance.state)\n          ) {\n            var componentName = getComponentNameFromType(type) || \"Component\";\n            didWarnAboutUninitializedState.has(componentName) ||\n              (didWarnAboutUninitializedState.add(componentName),\n              console.error(\n                \"`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.\",\n                componentName,\n                null === instance.state ? \"null\" : \"undefined\",\n                componentName\n              ));\n          }\n          if (\n            \"function\" === typeof type.getDerivedStateFromProps ||\n            \"function\" === typeof instance.getSnapshotBeforeUpdate\n          ) {\n            var foundWillMountName = null,\n              foundWillReceivePropsName = null,\n              foundWillUpdateName = null;\n            \"function\" === typeof instance.componentWillMount &&\n            !0 !== instance.componentWillMount.__suppressDeprecationWarning\n              ? (foundWillMountName = \"componentWillMount\")\n              : \"function\" === typeof instance.UNSAFE_componentWillMount &&\n                (foundWillMountName = \"UNSAFE_componentWillMount\");\n            \"function\" === typeof instance.componentWillReceiveProps &&\n            !0 !==\n              instance.componentWillReceiveProps.__suppressDeprecationWarning\n              ? (foundWillReceivePropsName = \"componentWillReceiveProps\")\n              : \"function\" ===\n                  typeof instance.UNSAFE_componentWillReceiveProps &&\n                (foundWillReceivePropsName =\n                  \"UNSAFE_componentWillReceiveProps\");\n            \"function\" === typeof instance.componentWillUpdate &&\n            !0 !== instance.componentWillUpdate.__suppressDeprecationWarning\n              ? (foundWillUpdateName = \"componentWillUpdate\")\n              : \"function\" === typeof instance.UNSAFE_componentWillUpdate &&\n                (foundWillUpdateName = \"UNSAFE_componentWillUpdate\");\n            if (\n              null !== foundWillMountName ||\n              null !== foundWillReceivePropsName ||\n              null !== foundWillUpdateName\n            ) {\n              var _componentName =\n                  getComponentNameFromType(type) || \"Component\",\n                newApiName =\n                  \"function\" === typeof type.getDerivedStateFromProps\n                    ? \"getDerivedStateFromProps()\"\n                    : \"getSnapshotBeforeUpdate()\";\n              didWarnAboutLegacyLifecyclesAndDerivedState.has(_componentName) ||\n                (didWarnAboutLegacyLifecyclesAndDerivedState.add(\n                  _componentName\n                ),\n                console.error(\n                  \"Unsafe legacy lifecycles will not be called for components using new component APIs.\\n\\n%s uses %s but also contains the following legacy lifecycles:%s%s%s\\n\\nThe above lifecycles should be removed. Learn more about this warning here:\\nhttps://react.dev/link/unsafe-component-lifecycles\",\n                  _componentName,\n                  newApiName,\n                  null !== foundWillMountName\n                    ? \"\\n  \" + foundWillMountName\n                    : \"\",\n                  null !== foundWillReceivePropsName\n                    ? \"\\n  \" + foundWillReceivePropsName\n                    : \"\",\n                  null !== foundWillUpdateName\n                    ? \"\\n  \" + foundWillUpdateName\n                    : \"\"\n                ));\n            }\n          }\n          var name = getComponentNameFromType(type) || \"Component\";\n          instance.render ||\n            (type.prototype && \"function\" === typeof type.prototype.render\n              ? console.error(\n                  \"No `render` method found on the %s instance: did you accidentally return an object from the constructor?\",\n                  name\n                )\n              : console.error(\n                  \"No `render` method found on the %s instance: you may have forgotten to define `render`.\",\n                  name\n                ));\n          !instance.getInitialState ||\n            instance.getInitialState.isReactClassApproved ||\n            instance.state ||\n            console.error(\n              \"getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?\",\n              name\n            );\n          instance.getDefaultProps &&\n            !instance.getDefaultProps.isReactClassApproved &&\n            console.error(\n              \"getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.\",\n              name\n            );\n          instance.contextType &&\n            console.error(\n              \"contextType was defined as an instance property on %s. Use a static property to define contextType instead.\",\n              name\n            );\n          type.childContextTypes &&\n            !didWarnAboutChildContextTypes.has(type) &&\n            (didWarnAboutChildContextTypes.add(type),\n            console.error(\n              \"%s uses the legacy childContextTypes API which was removed in React 19. Use React.createContext() instead. (https://react.dev/link/legacy-context)\",\n              name\n            ));\n          type.contextTypes &&\n            !didWarnAboutContextTypes$1.has(type) &&\n            (didWarnAboutContextTypes$1.add(type),\n            console.error(\n              \"%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with static contextType instead. (https://react.dev/link/legacy-context)\",\n              name\n            ));\n          \"function\" === typeof instance.componentShouldUpdate &&\n            console.error(\n              \"%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.\",\n              name\n            );\n          type.prototype &&\n            type.prototype.isPureReactComponent &&\n            \"undefined\" !== typeof instance.shouldComponentUpdate &&\n            console.error(\n              \"%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.\",\n              getComponentNameFromType(type) || \"A pure component\"\n            );\n          \"function\" === typeof instance.componentDidUnmount &&\n            console.error(\n              \"%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?\",\n              name\n            );\n          \"function\" === typeof instance.componentDidReceiveProps &&\n            console.error(\n              \"%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().\",\n              name\n            );\n          \"function\" === typeof instance.componentWillRecieveProps &&\n            console.error(\n              \"%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?\",\n              name\n            );\n          \"function\" === typeof instance.UNSAFE_componentWillRecieveProps &&\n            console.error(\n              \"%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?\",\n              name\n            );\n          var hasMutatedProps = instance.props !== resolvedProps;\n          void 0 !== instance.props &&\n            hasMutatedProps &&\n            console.error(\n              \"When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.\",\n              name\n            );\n          instance.defaultProps &&\n            console.error(\n              \"Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.\",\n              name,\n              name\n            );\n          \"function\" !== typeof instance.getSnapshotBeforeUpdate ||\n            \"function\" === typeof instance.componentDidUpdate ||\n            didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(type) ||\n            (didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(type),\n            console.error(\n              \"%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.\",\n              getComponentNameFromType(type)\n            ));\n          \"function\" === typeof instance.getDerivedStateFromProps &&\n            console.error(\n              \"%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.\",\n              name\n            );\n          \"function\" === typeof instance.getDerivedStateFromError &&\n            console.error(\n              \"%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.\",\n              name\n            );\n          \"function\" === typeof type.getSnapshotBeforeUpdate &&\n            console.error(\n              \"%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.\",\n              name\n            );\n          var state = instance.state;\n          state &&\n            (\"object\" !== typeof state || isArrayImpl(state)) &&\n            console.error(\"%s.state: must be set to an object or null\", name);\n          \"function\" === typeof instance.getChildContext &&\n            \"object\" !== typeof type.childContextTypes &&\n            console.error(\n              \"%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().\",\n              name\n            );\n          var initialState = void 0 !== instance.state ? instance.state : null;\n          instance.updater = classComponentUpdater;\n          instance.props = resolvedProps;\n          instance.state = initialState;\n          var internalInstance = { queue: [], replace: !1 };\n          instance._reactInternals = internalInstance;\n          var contextType$jscomp$0 = type.contextType;\n          instance.context =\n            \"object\" === typeof contextType$jscomp$0 &&\n            null !== contextType$jscomp$0\n              ? contextType$jscomp$0._currentValue\n              : emptyContextObject;\n          if (instance.state === resolvedProps) {\n            var componentName$jscomp$0 =\n              getComponentNameFromType(type) || \"Component\";\n            didWarnAboutDirectlyAssigningPropsToState.has(\n              componentName$jscomp$0\n            ) ||\n              (didWarnAboutDirectlyAssigningPropsToState.add(\n                componentName$jscomp$0\n              ),\n              console.error(\n                \"%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.\",\n                componentName$jscomp$0\n              ));\n          }\n          var getDerivedStateFromProps = type.getDerivedStateFromProps;\n          if (\"function\" === typeof getDerivedStateFromProps) {\n            var partialState = getDerivedStateFromProps(\n              resolvedProps,\n              initialState\n            );\n            if (void 0 === partialState) {\n              var componentName$jscomp$1 =\n                getComponentNameFromType(type) || \"Component\";\n              didWarnAboutUndefinedDerivedState.has(componentName$jscomp$1) ||\n                (didWarnAboutUndefinedDerivedState.add(componentName$jscomp$1),\n                console.error(\n                  \"%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.\",\n                  componentName$jscomp$1\n                ));\n            }\n            var JSCompiler_inline_result =\n              null === partialState || void 0 === partialState\n                ? initialState\n                : assign({}, initialState, partialState);\n            instance.state = JSCompiler_inline_result;\n          }\n          if (\n            \"function\" !== typeof type.getDerivedStateFromProps &&\n            \"function\" !== typeof instance.getSnapshotBeforeUpdate &&\n            (\"function\" === typeof instance.UNSAFE_componentWillMount ||\n              \"function\" === typeof instance.componentWillMount)\n          ) {\n            var oldState = instance.state;\n            if (\"function\" === typeof instance.componentWillMount) {\n              if (\n                !0 !== instance.componentWillMount.__suppressDeprecationWarning\n              ) {\n                var componentName$jscomp$2 =\n                  getComponentNameFromType(type) || \"Unknown\";\n                didWarnAboutDeprecatedWillMount[componentName$jscomp$2] ||\n                  (console.warn(\n                    \"componentWillMount has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.\\n\\n* Move code from componentWillMount to componentDidMount (preferred in most cases) or the constructor.\\n\\nPlease update the following components: %s\",\n                    componentName$jscomp$2\n                  ),\n                  (didWarnAboutDeprecatedWillMount[componentName$jscomp$2] =\n                    !0));\n              }\n              instance.componentWillMount();\n            }\n            \"function\" === typeof instance.UNSAFE_componentWillMount &&\n              instance.UNSAFE_componentWillMount();\n            oldState !== instance.state &&\n              (console.error(\n                \"%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.\",\n                getComponentNameFromType(type) || \"Component\"\n              ),\n              classComponentUpdater.enqueueReplaceState(\n                instance,\n                instance.state,\n                null\n              ));\n            if (\n              null !== internalInstance.queue &&\n              0 < internalInstance.queue.length\n            ) {\n              var oldQueue = internalInstance.queue,\n                oldReplace = internalInstance.replace;\n              internalInstance.queue = null;\n              internalInstance.replace = !1;\n              if (oldReplace && 1 === oldQueue.length)\n                instance.state = oldQueue[0];\n              else {\n                for (\n                  var nextState = oldReplace ? oldQueue[0] : instance.state,\n                    dontMutate = !0,\n                    i = oldReplace ? 1 : 0;\n                  i < oldQueue.length;\n                  i++\n                ) {\n                  var partial = oldQueue[i],\n                    partialState$jscomp$0 =\n                      \"function\" === typeof partial\n                        ? partial.call(\n                            instance,\n                            nextState,\n                            resolvedProps,\n                            void 0\n                          )\n                        : partial;\n                  null != partialState$jscomp$0 &&\n                    (dontMutate\n                      ? ((dontMutate = !1),\n                        (nextState = assign(\n                          {},\n                          nextState,\n                          partialState$jscomp$0\n                        )))\n                      : assign(nextState, partialState$jscomp$0));\n                }\n                instance.state = nextState;\n              }\n            } else internalInstance.queue = null;\n          }\n          var nextChildren = callRenderInDEV(instance);\n          if (12 === request.status) throw null;\n          instance.props !== resolvedProps &&\n            (didWarnAboutReassigningProps ||\n              console.error(\n                \"It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.\",\n                getComponentNameFromType(type) || \"a component\"\n              ),\n            (didWarnAboutReassigningProps = !0));\n          var prevKeyPath = task.keyPath;\n          task.keyPath = keyPath;\n          renderNodeDestructive(request, task, nextChildren, -1);\n          task.keyPath = prevKeyPath;\n        } else {\n          if (type.prototype && \"function\" === typeof type.prototype.render) {\n            var componentName$jscomp$3 =\n              getComponentNameFromType(type) || \"Unknown\";\n            didWarnAboutBadClass[componentName$jscomp$3] ||\n              (console.error(\n                \"The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.\",\n                componentName$jscomp$3,\n                componentName$jscomp$3\n              ),\n              (didWarnAboutBadClass[componentName$jscomp$3] = !0));\n          }\n          var value = renderWithHooks(\n            request,\n            task,\n            keyPath,\n            type,\n            props,\n            void 0\n          );\n          if (12 === request.status) throw null;\n          var hasId = 0 !== localIdCounter,\n            actionStateCount = actionStateCounter,\n            actionStateMatchingIndex$jscomp$0 = actionStateMatchingIndex;\n          if (type.contextTypes) {\n            var _componentName$jscomp$0 =\n              getComponentNameFromType(type) || \"Unknown\";\n            didWarnAboutContextTypes[_componentName$jscomp$0] ||\n              ((didWarnAboutContextTypes[_componentName$jscomp$0] = !0),\n              console.error(\n                \"%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with React.useContext() instead. (https://react.dev/link/legacy-context)\",\n                _componentName$jscomp$0\n              ));\n          }\n          type &&\n            type.childContextTypes &&\n            console.error(\n              \"childContextTypes cannot be defined on a function component.\\n  %s.childContextTypes = ...\",\n              type.displayName || type.name || \"Component\"\n            );\n          if (\"function\" === typeof type.getDerivedStateFromProps) {\n            var componentName$jscomp$4 =\n              getComponentNameFromType(type) || \"Unknown\";\n            didWarnAboutGetDerivedStateOnFunctionComponent[\n              componentName$jscomp$4\n            ] ||\n              (console.error(\n                \"%s: Function components do not support getDerivedStateFromProps.\",\n                componentName$jscomp$4\n              ),\n              (didWarnAboutGetDerivedStateOnFunctionComponent[\n                componentName$jscomp$4\n              ] = !0));\n          }\n          if (\n            \"object\" === typeof type.contextType &&\n            null !== type.contextType\n          ) {\n            var _componentName2 = getComponentNameFromType(type) || \"Unknown\";\n            didWarnAboutContextTypeOnFunctionComponent[_componentName2] ||\n              (console.error(\n                \"%s: Function components do not support contextType.\",\n                _componentName2\n              ),\n              (didWarnAboutContextTypeOnFunctionComponent[_componentName2] =\n                !0));\n          }\n          finishFunctionComponent(\n            request,\n            task,\n            keyPath,\n            value,\n            hasId,\n            actionStateCount,\n            actionStateMatchingIndex$jscomp$0\n          );\n        }\n      else if (\"string\" === typeof type) {\n        var segment = task.blockedSegment;\n        if (null === segment) {\n          var children = props.children,\n            prevContext = task.formatContext,\n            prevKeyPath$jscomp$0 = task.keyPath;\n          task.formatContext = getChildFormatContext(prevContext, type, props);\n          task.keyPath = keyPath;\n          renderNode(request, task, children, -1);\n          task.formatContext = prevContext;\n          task.keyPath = prevKeyPath$jscomp$0;\n        } else {\n          var _children = pushStartInstance(\n            segment.chunks,\n            type,\n            props,\n            request.resumableState,\n            request.renderState,\n            task.blockedPreamble,\n            task.hoistableState,\n            task.formatContext,\n            segment.lastPushedText\n          );\n          segment.lastPushedText = !1;\n          var _prevContext2 = task.formatContext,\n            _prevKeyPath3 = task.keyPath;\n          task.keyPath = keyPath;\n          if (\n            (task.formatContext = getChildFormatContext(\n              _prevContext2,\n              type,\n              props\n            )).insertionMode === HTML_HEAD_MODE\n          ) {\n            var preambleSegment = createPendingSegment(\n              request,\n              0,\n              null,\n              task.formatContext,\n              !1,\n              !1\n            );\n            segment.preambleChildren.push(preambleSegment);\n            task.blockedSegment = preambleSegment;\n            try {\n              (preambleSegment.status = 6),\n                renderNode(request, task, _children, -1),\n                preambleSegment.lastPushedText &&\n                  preambleSegment.textEmbedded &&\n                  preambleSegment.chunks.push(textSeparator),\n                (preambleSegment.status = COMPLETED),\n                finishedSegment(request, task.blockedBoundary, preambleSegment);\n            } finally {\n              task.blockedSegment = segment;\n            }\n          } else renderNode(request, task, _children, -1);\n          task.formatContext = _prevContext2;\n          task.keyPath = _prevKeyPath3;\n          a: {\n            var target = segment.chunks,\n              resumableState = request.resumableState;\n            switch (type) {\n              case \"title\":\n              case \"style\":\n              case \"script\":\n              case \"area\":\n              case \"base\":\n              case \"br\":\n              case \"col\":\n              case \"embed\":\n              case \"hr\":\n              case \"img\":\n              case \"input\":\n              case \"keygen\":\n              case \"link\":\n              case \"meta\":\n              case \"param\":\n              case \"source\":\n              case \"track\":\n              case \"wbr\":\n                break a;\n              case \"body\":\n                if (_prevContext2.insertionMode <= HTML_HTML_MODE) {\n                  resumableState.hasBody = !0;\n                  break a;\n                }\n                break;\n              case \"html\":\n                if (_prevContext2.insertionMode === ROOT_HTML_MODE) {\n                  resumableState.hasHtml = !0;\n                  break a;\n                }\n                break;\n              case \"head\":\n                if (_prevContext2.insertionMode <= HTML_HTML_MODE) break a;\n            }\n            target.push(endChunkForTag(type));\n          }\n          segment.lastPushedText = !1;\n        }\n      } else {\n        switch (type) {\n          case REACT_LEGACY_HIDDEN_TYPE:\n          case REACT_STRICT_MODE_TYPE:\n          case REACT_PROFILER_TYPE:\n          case REACT_FRAGMENT_TYPE:\n            var prevKeyPath$jscomp$1 = task.keyPath;\n            task.keyPath = keyPath;\n            renderNodeDestructive(request, task, props.children, -1);\n            task.keyPath = prevKeyPath$jscomp$1;\n            return;\n          case REACT_ACTIVITY_TYPE:\n            var segment$jscomp$0 = task.blockedSegment;\n            if (null === segment$jscomp$0) {\n              if (\"hidden\" !== props.mode) {\n                var prevKeyPath$jscomp$2 = task.keyPath;\n                task.keyPath = keyPath;\n                renderNode(request, task, props.children, -1);\n                task.keyPath = prevKeyPath$jscomp$2;\n              }\n            } else if (\"hidden\" !== props.mode) {\n              segment$jscomp$0.chunks.push(startActivityBoundary);\n              segment$jscomp$0.lastPushedText = !1;\n              var _prevKeyPath4 = task.keyPath;\n              task.keyPath = keyPath;\n              renderNode(request, task, props.children, -1);\n              task.keyPath = _prevKeyPath4;\n              segment$jscomp$0.chunks.push(endActivityBoundary);\n              segment$jscomp$0.lastPushedText = !1;\n            }\n            return;\n          case REACT_SUSPENSE_LIST_TYPE:\n            a: {\n              var children$jscomp$0 = props.children,\n                revealOrder = props.revealOrder;\n              if (\n                \"forwards\" === revealOrder ||\n                \"backwards\" === revealOrder ||\n                \"unstable_legacy-backwards\" === revealOrder\n              ) {\n                if (isArrayImpl(children$jscomp$0)) {\n                  renderSuspenseListRows(\n                    request,\n                    task,\n                    keyPath,\n                    children$jscomp$0,\n                    revealOrder\n                  );\n                  break a;\n                }\n                var iteratorFn = getIteratorFn(children$jscomp$0);\n                if (iteratorFn) {\n                  var iterator = iteratorFn.call(children$jscomp$0);\n                  if (iterator) {\n                    validateIterable(\n                      task,\n                      children$jscomp$0,\n                      -1,\n                      iterator,\n                      iteratorFn\n                    );\n                    var step = iterator.next();\n                    if (!step.done) {\n                      var rows = [];\n                      do rows.push(step.value), (step = iterator.next());\n                      while (!step.done);\n                      renderSuspenseListRows(\n                        request,\n                        task,\n                        keyPath,\n                        children$jscomp$0,\n                        revealOrder\n                      );\n                    }\n                    break a;\n                  }\n                }\n              }\n              if (\"together\" === revealOrder) {\n                var _prevKeyPath2 = task.keyPath,\n                  prevRow = task.row,\n                  newRow = (task.row = createSuspenseListRow(null));\n                newRow.boundaries = [];\n                newRow.together = !0;\n                task.keyPath = keyPath;\n                renderNodeDestructive(request, task, children$jscomp$0, -1);\n                0 === --newRow.pendingTasks &&\n                  finishSuspenseListRow(request, newRow);\n                task.keyPath = _prevKeyPath2;\n                task.row = prevRow;\n                null !== prevRow &&\n                  0 < newRow.pendingTasks &&\n                  (prevRow.pendingTasks++, (newRow.next = prevRow));\n              } else {\n                var prevKeyPath$jscomp$3 = task.keyPath;\n                task.keyPath = keyPath;\n                renderNodeDestructive(request, task, children$jscomp$0, -1);\n                task.keyPath = prevKeyPath$jscomp$3;\n              }\n            }\n            return;\n          case REACT_VIEW_TRANSITION_TYPE:\n          case REACT_SCOPE_TYPE:\n            throw Error(\n              \"ReactDOMServer does not yet support scope components.\"\n            );\n          case REACT_SUSPENSE_TYPE:\n            a: if (null !== task.replay) {\n              var _prevKeyPath = task.keyPath,\n                _prevContext = task.formatContext,\n                _prevRow = task.row;\n              task.keyPath = keyPath;\n              task.formatContext = getSuspenseContentFormatContext(\n                request.resumableState,\n                _prevContext\n              );\n              task.row = null;\n              var _content = props.children;\n              try {\n                renderNode(request, task, _content, -1);\n              } finally {\n                (task.keyPath = _prevKeyPath),\n                  (task.formatContext = _prevContext),\n                  (task.row = _prevRow);\n              }\n            } else {\n              var prevKeyPath$jscomp$4 = task.keyPath,\n                prevContext$jscomp$0 = task.formatContext,\n                prevRow$jscomp$0 = task.row,\n                parentBoundary = task.blockedBoundary,\n                parentPreamble = task.blockedPreamble,\n                parentHoistableState = task.hoistableState,\n                parentSegment = task.blockedSegment,\n                fallback = props.fallback,\n                content = props.children,\n                fallbackAbortSet = new Set();\n              var newBoundary =\n                task.formatContext.insertionMode < HTML_MODE\n                  ? createSuspenseBoundary(\n                      request,\n                      task.row,\n                      fallbackAbortSet,\n                      createPreambleState(),\n                      createPreambleState()\n                    )\n                  : createSuspenseBoundary(\n                      request,\n                      task.row,\n                      fallbackAbortSet,\n                      null,\n                      null\n                    );\n              null !== request.trackedPostpones &&\n                (newBoundary.trackedContentKeyPath = keyPath);\n              var boundarySegment = createPendingSegment(\n                request,\n                parentSegment.chunks.length,\n                newBoundary,\n                task.formatContext,\n                !1,\n                !1\n              );\n              parentSegment.children.push(boundarySegment);\n              parentSegment.lastPushedText = !1;\n              var contentRootSegment = createPendingSegment(\n                request,\n                0,\n                null,\n                task.formatContext,\n                !1,\n                !1\n              );\n              contentRootSegment.parentFlushed = !0;\n              if (null !== request.trackedPostpones) {\n                var suspenseComponentStack = task.componentStack,\n                  fallbackKeyPath = [\n                    keyPath[0],\n                    \"Suspense Fallback\",\n                    keyPath[2]\n                  ],\n                  fallbackReplayNode = [\n                    fallbackKeyPath[1],\n                    fallbackKeyPath[2],\n                    [],\n                    null\n                  ];\n                request.trackedPostpones.workingMap.set(\n                  fallbackKeyPath,\n                  fallbackReplayNode\n                );\n                newBoundary.trackedFallbackNode = fallbackReplayNode;\n                task.blockedSegment = boundarySegment;\n                task.blockedPreamble = newBoundary.fallbackPreamble;\n                task.keyPath = fallbackKeyPath;\n                task.formatContext = getSuspenseFallbackFormatContext(\n                  request.resumableState,\n                  prevContext$jscomp$0\n                );\n                task.componentStack =\n                  replaceSuspenseComponentStackWithSuspenseFallbackStack(\n                    suspenseComponentStack\n                  );\n                boundarySegment.status = 6;\n                try {\n                  renderNode(request, task, fallback, -1),\n                    boundarySegment.lastPushedText &&\n                      boundarySegment.textEmbedded &&\n                      boundarySegment.chunks.push(textSeparator),\n                    (boundarySegment.status = COMPLETED),\n                    finishedSegment(request, parentBoundary, boundarySegment);\n                } catch (thrownValue) {\n                  throw (\n                    ((boundarySegment.status =\n                      12 === request.status ? ABORTED : ERRORED),\n                    thrownValue)\n                  );\n                } finally {\n                  (task.blockedSegment = parentSegment),\n                    (task.blockedPreamble = parentPreamble),\n                    (task.keyPath = prevKeyPath$jscomp$4),\n                    (task.formatContext = prevContext$jscomp$0);\n                }\n                var suspendedPrimaryTask = createRenderTask(\n                  request,\n                  null,\n                  content,\n                  -1,\n                  newBoundary,\n                  contentRootSegment,\n                  newBoundary.contentPreamble,\n                  newBoundary.contentState,\n                  task.abortSet,\n                  keyPath,\n                  getSuspenseContentFormatContext(\n                    request.resumableState,\n                    task.formatContext\n                  ),\n                  task.context,\n                  task.treeContext,\n                  null,\n                  suspenseComponentStack,\n                  emptyContextObject,\n                  task.debugTask\n                );\n                pushComponentStack(suspendedPrimaryTask);\n                request.pingedTasks.push(suspendedPrimaryTask);\n              } else {\n                task.blockedBoundary = newBoundary;\n                task.blockedPreamble = newBoundary.contentPreamble;\n                task.hoistableState = newBoundary.contentState;\n                task.blockedSegment = contentRootSegment;\n                task.keyPath = keyPath;\n                task.formatContext = getSuspenseContentFormatContext(\n                  request.resumableState,\n                  prevContext$jscomp$0\n                );\n                task.row = null;\n                contentRootSegment.status = 6;\n                try {\n                  if (\n                    (renderNode(request, task, content, -1),\n                    contentRootSegment.lastPushedText &&\n                      contentRootSegment.textEmbedded &&\n                      contentRootSegment.chunks.push(textSeparator),\n                    (contentRootSegment.status = COMPLETED),\n                    finishedSegment(request, newBoundary, contentRootSegment),\n                    queueCompletedSegment(newBoundary, contentRootSegment),\n                    0 === newBoundary.pendingTasks &&\n                      newBoundary.status === PENDING)\n                  ) {\n                    if (\n                      ((newBoundary.status = COMPLETED),\n                      !isEligibleForOutlining(request, newBoundary))\n                    ) {\n                      null !== prevRow$jscomp$0 &&\n                        0 === --prevRow$jscomp$0.pendingTasks &&\n                        finishSuspenseListRow(request, prevRow$jscomp$0);\n                      0 === request.pendingRootTasks &&\n                        task.blockedPreamble &&\n                        preparePreamble(request);\n                      break a;\n                    }\n                  } else\n                    null !== prevRow$jscomp$0 &&\n                      prevRow$jscomp$0.together &&\n                      tryToResolveTogetherRow(request, prevRow$jscomp$0);\n                } catch (thrownValue$2) {\n                  newBoundary.status = CLIENT_RENDERED;\n                  if (12 === request.status) {\n                    contentRootSegment.status = ABORTED;\n                    var error = request.fatalError;\n                  } else\n                    (contentRootSegment.status = ERRORED),\n                      (error = thrownValue$2);\n                  var thrownInfo = getThrownInfo(task.componentStack);\n                  var errorDigest = logRecoverableError(\n                    request,\n                    error,\n                    thrownInfo,\n                    task.debugTask\n                  );\n                  encodeErrorForBoundary(\n                    newBoundary,\n                    errorDigest,\n                    error,\n                    thrownInfo,\n                    !1\n                  );\n                  untrackBoundary(request, newBoundary);\n                } finally {\n                  (task.blockedBoundary = parentBoundary),\n                    (task.blockedPreamble = parentPreamble),\n                    (task.hoistableState = parentHoistableState),\n                    (task.blockedSegment = parentSegment),\n                    (task.keyPath = prevKeyPath$jscomp$4),\n                    (task.formatContext = prevContext$jscomp$0),\n                    (task.row = prevRow$jscomp$0);\n                }\n                var suspendedFallbackTask = createRenderTask(\n                  request,\n                  null,\n                  fallback,\n                  -1,\n                  parentBoundary,\n                  boundarySegment,\n                  newBoundary.fallbackPreamble,\n                  newBoundary.fallbackState,\n                  fallbackAbortSet,\n                  [keyPath[0], \"Suspense Fallback\", keyPath[2]],\n                  getSuspenseFallbackFormatContext(\n                    request.resumableState,\n                    task.formatContext\n                  ),\n                  task.context,\n                  task.treeContext,\n                  task.row,\n                  replaceSuspenseComponentStackWithSuspenseFallbackStack(\n                    task.componentStack\n                  ),\n                  emptyContextObject,\n                  task.debugTask\n                );\n                pushComponentStack(suspendedFallbackTask);\n                request.pingedTasks.push(suspendedFallbackTask);\n              }\n            }\n            return;\n        }\n        if (\"object\" === typeof type && null !== type)\n          switch (type.$$typeof) {\n            case REACT_FORWARD_REF_TYPE:\n              if (\"ref\" in props) {\n                var propsWithoutRef = {};\n                for (var key in props)\n                  \"ref\" !== key && (propsWithoutRef[key] = props[key]);\n              } else propsWithoutRef = props;\n              var children$jscomp$1 = renderWithHooks(\n                request,\n                task,\n                keyPath,\n                type.render,\n                propsWithoutRef,\n                ref\n              );\n              finishFunctionComponent(\n                request,\n                task,\n                keyPath,\n                children$jscomp$1,\n                0 !== localIdCounter,\n                actionStateCounter,\n                actionStateMatchingIndex\n              );\n              return;\n            case REACT_MEMO_TYPE:\n              renderElement(request, task, keyPath, type.type, props, ref);\n              return;\n            case REACT_CONTEXT_TYPE:\n              var value$jscomp$0 = props.value,\n                children$jscomp$2 = props.children;\n              var prevSnapshot = task.context;\n              var prevKeyPath$jscomp$5 = task.keyPath;\n              var prevValue = type._currentValue;\n              type._currentValue = value$jscomp$0;\n              void 0 !== type._currentRenderer &&\n                null !== type._currentRenderer &&\n                type._currentRenderer !== rendererSigil &&\n                console.error(\n                  \"Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported.\"\n                );\n              type._currentRenderer = rendererSigil;\n              var prevNode = currentActiveSnapshot,\n                newNode = {\n                  parent: prevNode,\n                  depth: null === prevNode ? 0 : prevNode.depth + 1,\n                  context: type,\n                  parentValue: prevValue,\n                  value: value$jscomp$0\n                };\n              currentActiveSnapshot = newNode;\n              task.context = newNode;\n              task.keyPath = keyPath;\n              renderNodeDestructive(request, task, children$jscomp$2, -1);\n              var prevSnapshot$jscomp$0 = currentActiveSnapshot;\n              if (null === prevSnapshot$jscomp$0)\n                throw Error(\n                  \"Tried to pop a Context at the root of the app. This is a bug in React.\"\n                );\n              prevSnapshot$jscomp$0.context !== type &&\n                console.error(\n                  \"The parent context is not the expected context. This is probably a bug in React.\"\n                );\n              prevSnapshot$jscomp$0.context._currentValue =\n                prevSnapshot$jscomp$0.parentValue;\n              void 0 !== type._currentRenderer &&\n                null !== type._currentRenderer &&\n                type._currentRenderer !== rendererSigil &&\n                console.error(\n                  \"Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported.\"\n                );\n              type._currentRenderer = rendererSigil;\n              var JSCompiler_inline_result$jscomp$0 = (currentActiveSnapshot =\n                prevSnapshot$jscomp$0.parent);\n              task.context = JSCompiler_inline_result$jscomp$0;\n              task.keyPath = prevKeyPath$jscomp$5;\n              prevSnapshot !== task.context &&\n                console.error(\n                  \"Popping the context provider did not return back to the original snapshot. This is a bug in React.\"\n                );\n              return;\n            case REACT_CONSUMER_TYPE:\n              var context$jscomp$0 = type._context,\n                render = props.children;\n              \"function\" !== typeof render &&\n                console.error(\n                  \"A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it.\"\n                );\n              var newChildren = render(context$jscomp$0._currentValue),\n                prevKeyPath$jscomp$6 = task.keyPath;\n              task.keyPath = keyPath;\n              renderNodeDestructive(request, task, newChildren, -1);\n              task.keyPath = prevKeyPath$jscomp$6;\n              return;\n            case REACT_LAZY_TYPE:\n              var Component = callLazyInitInDEV(type);\n              if (12 === request.status) throw null;\n              renderElement(request, task, keyPath, Component, props, ref);\n              return;\n          }\n        var info = \"\";\n        if (\n          void 0 === type ||\n          (\"object\" === typeof type &&\n            null !== type &&\n            0 === Object.keys(type).length)\n        )\n          info +=\n            \" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.\";\n        throw Error(\n          \"Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: \" +\n            ((null == type ? type : typeof type) + \".\" + info)\n        );\n      }\n    }\n    function resumeNode(request, task, segmentId, node, childIndex) {\n      var prevReplay = task.replay,\n        blockedBoundary = task.blockedBoundary,\n        resumedSegment = createPendingSegment(\n          request,\n          0,\n          null,\n          task.formatContext,\n          !1,\n          !1\n        );\n      resumedSegment.id = segmentId;\n      resumedSegment.parentFlushed = !0;\n      try {\n        (task.replay = null),\n          (task.blockedSegment = resumedSegment),\n          renderNode(request, task, node, childIndex),\n          (resumedSegment.status = COMPLETED),\n          finishedSegment(request, blockedBoundary, resumedSegment),\n          null === blockedBoundary\n            ? (request.completedRootSegment = resumedSegment)\n            : (queueCompletedSegment(blockedBoundary, resumedSegment),\n              blockedBoundary.parentFlushed &&\n                request.partialBoundaries.push(blockedBoundary));\n      } finally {\n        (task.replay = prevReplay), (task.blockedSegment = null);\n      }\n    }\n    function replayElement(\n      request,\n      task,\n      keyPath,\n      name,\n      keyOrIndex,\n      childIndex,\n      type,\n      props,\n      ref,\n      replay\n    ) {\n      childIndex = replay.nodes;\n      for (var i = 0; i < childIndex.length; i++) {\n        var node = childIndex[i];\n        if (keyOrIndex === node[1]) {\n          if (4 === node.length) {\n            if (null !== name && name !== node[0])\n              throw Error(\n                \"Expected the resume to render <\" +\n                  node[0] +\n                  \"> in this slot but instead it rendered <\" +\n                  name +\n                  \">. The tree doesn't match so React will fallback to client rendering.\"\n              );\n            var childNodes = node[2];\n            name = node[3];\n            keyOrIndex = task.node;\n            task.replay = { nodes: childNodes, slots: name, pendingTasks: 1 };\n            try {\n              renderElement(request, task, keyPath, type, props, ref);\n              if (\n                1 === task.replay.pendingTasks &&\n                0 < task.replay.nodes.length\n              )\n                throw Error(\n                  \"Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering.\"\n                );\n              task.replay.pendingTasks--;\n            } catch (x) {\n              if (\n                \"object\" === typeof x &&\n                null !== x &&\n                (x === SuspenseException || \"function\" === typeof x.then)\n              )\n                throw (\n                  (task.node === keyOrIndex\n                    ? (task.replay = replay)\n                    : childIndex.splice(i, 1),\n                  x)\n                );\n              task.replay.pendingTasks--;\n              type = getThrownInfo(task.componentStack);\n              props = request;\n              request = task.blockedBoundary;\n              keyPath = x;\n              ref = name;\n              name = logRecoverableError(props, keyPath, type, task.debugTask);\n              abortRemainingReplayNodes(\n                props,\n                request,\n                childNodes,\n                ref,\n                keyPath,\n                name,\n                type,\n                !1\n              );\n            }\n            task.replay = replay;\n          } else {\n            if (type !== REACT_SUSPENSE_TYPE)\n              throw Error(\n                \"Expected the resume to render <Suspense> in this slot but instead it rendered <\" +\n                  (getComponentNameFromType(type) || \"Unknown\") +\n                  \">. The tree doesn't match so React will fallback to client rendering.\"\n              );\n            a: {\n              replay = void 0;\n              name = node[5];\n              type = node[2];\n              ref = node[3];\n              keyOrIndex = null === node[4] ? [] : node[4][2];\n              node = null === node[4] ? null : node[4][3];\n              var prevKeyPath = task.keyPath,\n                prevContext = task.formatContext,\n                prevRow = task.row,\n                previousReplaySet = task.replay,\n                parentBoundary = task.blockedBoundary,\n                parentHoistableState = task.hoistableState,\n                content = props.children,\n                fallback = props.fallback,\n                fallbackAbortSet = new Set();\n              props =\n                task.formatContext.insertionMode < HTML_MODE\n                  ? createSuspenseBoundary(\n                      request,\n                      task.row,\n                      fallbackAbortSet,\n                      createPreambleState(),\n                      createPreambleState()\n                    )\n                  : createSuspenseBoundary(\n                      request,\n                      task.row,\n                      fallbackAbortSet,\n                      null,\n                      null\n                    );\n              props.parentFlushed = !0;\n              props.rootSegmentID = name;\n              task.blockedBoundary = props;\n              task.hoistableState = props.contentState;\n              task.keyPath = keyPath;\n              task.formatContext = getSuspenseContentFormatContext(\n                request.resumableState,\n                prevContext\n              );\n              task.row = null;\n              task.replay = { nodes: type, slots: ref, pendingTasks: 1 };\n              try {\n                renderNode(request, task, content, -1);\n                if (\n                  1 === task.replay.pendingTasks &&\n                  0 < task.replay.nodes.length\n                )\n                  throw Error(\n                    \"Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering.\"\n                  );\n                task.replay.pendingTasks--;\n                if (0 === props.pendingTasks && props.status === PENDING) {\n                  props.status = COMPLETED;\n                  request.completedBoundaries.push(props);\n                  break a;\n                }\n              } catch (error) {\n                (props.status = CLIENT_RENDERED),\n                  (childNodes = getThrownInfo(task.componentStack)),\n                  (replay = logRecoverableError(\n                    request,\n                    error,\n                    childNodes,\n                    task.debugTask\n                  )),\n                  encodeErrorForBoundary(props, replay, error, childNodes, !1),\n                  task.replay.pendingTasks--,\n                  request.clientRenderedBoundaries.push(props);\n              } finally {\n                (task.blockedBoundary = parentBoundary),\n                  (task.hoistableState = parentHoistableState),\n                  (task.replay = previousReplaySet),\n                  (task.keyPath = prevKeyPath),\n                  (task.formatContext = prevContext),\n                  (task.row = prevRow);\n              }\n              props = createReplayTask(\n                request,\n                null,\n                { nodes: keyOrIndex, slots: node, pendingTasks: 0 },\n                fallback,\n                -1,\n                parentBoundary,\n                props.fallbackState,\n                fallbackAbortSet,\n                [keyPath[0], \"Suspense Fallback\", keyPath[2]],\n                getSuspenseFallbackFormatContext(\n                  request.resumableState,\n                  task.formatContext\n                ),\n                task.context,\n                task.treeContext,\n                task.row,\n                replaceSuspenseComponentStackWithSuspenseFallbackStack(\n                  task.componentStack\n                ),\n                emptyContextObject,\n                task.debugTask\n              );\n              pushComponentStack(props);\n              request.pingedTasks.push(props);\n            }\n          }\n          childIndex.splice(i, 1);\n          break;\n        }\n      }\n    }\n    function validateIterable(\n      task,\n      iterable,\n      childIndex,\n      iterator,\n      iteratorFn\n    ) {\n      if (iterator === iterable) {\n        if (\n          -1 !== childIndex ||\n          null === task.componentStack ||\n          \"function\" !== typeof task.componentStack.type ||\n          \"[object GeneratorFunction]\" !==\n            Object.prototype.toString.call(task.componentStack.type) ||\n          \"[object Generator]\" !== Object.prototype.toString.call(iterator)\n        )\n          didWarnAboutGenerators ||\n            console.error(\n              \"Using Iterators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. You can also use an Iterable that can iterate multiple times over the same items.\"\n            ),\n            (didWarnAboutGenerators = !0);\n      } else\n        iterable.entries !== iteratorFn ||\n          didWarnAboutMaps ||\n          (console.error(\n            \"Using Maps as children is not supported. Use an array of keyed ReactElements instead.\"\n          ),\n          (didWarnAboutMaps = !0));\n    }\n    function renderNodeDestructive(request, task, node, childIndex) {\n      null !== task.replay && \"number\" === typeof task.replay.slots\n        ? resumeNode(request, task, task.replay.slots, node, childIndex)\n        : ((task.node = node),\n          (task.childIndex = childIndex),\n          (node = task.componentStack),\n          (childIndex = task.debugTask),\n          pushComponentStack(task),\n          retryNode(request, task),\n          (task.componentStack = node),\n          (task.debugTask = childIndex));\n    }\n    function retryNode(request, task) {\n      var node = task.node,\n        childIndex = task.childIndex;\n      if (null !== node) {\n        if (\"object\" === typeof node) {\n          switch (node.$$typeof) {\n            case REACT_ELEMENT_TYPE:\n              var type = node.type,\n                key = node.key;\n              node = node.props;\n              var refProp = node.ref;\n              refProp = void 0 !== refProp ? refProp : null;\n              var debugTask = task.debugTask,\n                name = getComponentNameFromType(type);\n              key = null == key ? (-1 === childIndex ? 0 : childIndex) : key;\n              var keyPath = [task.keyPath, name, key];\n              null !== task.replay\n                ? debugTask\n                  ? debugTask.run(\n                      replayElement.bind(\n                        null,\n                        request,\n                        task,\n                        keyPath,\n                        name,\n                        key,\n                        childIndex,\n                        type,\n                        node,\n                        refProp,\n                        task.replay\n                      )\n                    )\n                  : replayElement(\n                      request,\n                      task,\n                      keyPath,\n                      name,\n                      key,\n                      childIndex,\n                      type,\n                      node,\n                      refProp,\n                      task.replay\n                    )\n                : debugTask\n                  ? debugTask.run(\n                      renderElement.bind(\n                        null,\n                        request,\n                        task,\n                        keyPath,\n                        type,\n                        node,\n                        refProp\n                      )\n                    )\n                  : renderElement(request, task, keyPath, type, node, refProp);\n              return;\n            case REACT_PORTAL_TYPE:\n              throw Error(\n                \"Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render.\"\n              );\n            case REACT_LAZY_TYPE:\n              type = callLazyInitInDEV(node);\n              if (12 === request.status) throw null;\n              renderNodeDestructive(request, task, type, childIndex);\n              return;\n          }\n          if (isArrayImpl(node)) {\n            renderChildrenArray(request, task, node, childIndex);\n            return;\n          }\n          if ((key = getIteratorFn(node)))\n            if ((type = key.call(node))) {\n              validateIterable(task, node, childIndex, type, key);\n              node = type.next();\n              if (!node.done) {\n                key = [];\n                do key.push(node.value), (node = type.next());\n                while (!node.done);\n                renderChildrenArray(request, task, key, childIndex);\n              }\n              return;\n            }\n          if (\"function\" === typeof node.then)\n            return (\n              (task.thenableState = null),\n              renderNodeDestructive(\n                request,\n                task,\n                unwrapThenable(node),\n                childIndex\n              )\n            );\n          if (node.$$typeof === REACT_CONTEXT_TYPE)\n            return renderNodeDestructive(\n              request,\n              task,\n              node._currentValue,\n              childIndex\n            );\n          request = Object.prototype.toString.call(node);\n          throw Error(\n            \"Objects are not valid as a React child (found: \" +\n              (\"[object Object]\" === request\n                ? \"object with keys {\" + Object.keys(node).join(\", \") + \"}\"\n                : request) +\n              \"). If you meant to render a collection of children, use an array instead.\"\n          );\n        }\n        \"string\" === typeof node\n          ? ((task = task.blockedSegment),\n            null !== task &&\n              (task.lastPushedText = pushTextInstance(\n                task.chunks,\n                node,\n                request.renderState,\n                task.lastPushedText\n              )))\n          : \"number\" === typeof node || \"bigint\" === typeof node\n            ? ((task = task.blockedSegment),\n              null !== task &&\n                (task.lastPushedText = pushTextInstance(\n                  task.chunks,\n                  \"\" + node,\n                  request.renderState,\n                  task.lastPushedText\n                )))\n            : (\"function\" === typeof node &&\n                ((request = node.displayName || node.name || \"Component\"),\n                console.error(\n                  \"Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.\",\n                  request,\n                  request\n                )),\n              \"symbol\" === typeof node &&\n                console.error(\n                  \"Symbols are not valid as a React child.\\n  %s\",\n                  String(node)\n                ));\n      }\n    }\n    function warnForMissingKey(request, task, child) {\n      if (\n        null !== child &&\n        \"object\" === typeof child &&\n        (child.$$typeof === REACT_ELEMENT_TYPE ||\n          child.$$typeof === REACT_PORTAL_TYPE) &&\n        child._store &&\n        ((!child._store.validated && null == child.key) ||\n          2 === child._store.validated)\n      ) {\n        if (\"object\" !== typeof child._store)\n          throw Error(\n            \"React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.\"\n          );\n        child._store.validated = 1;\n        var didWarnForKey = request.didWarnForKey;\n        null == didWarnForKey &&\n          (didWarnForKey = request.didWarnForKey = new WeakSet());\n        request = task.componentStack;\n        if (null !== request && !didWarnForKey.has(request)) {\n          didWarnForKey.add(request);\n          var componentName = getComponentNameFromType(child.type);\n          didWarnForKey = child._owner;\n          var parentOwner = request.owner;\n          request = \"\";\n          if (parentOwner && \"undefined\" !== typeof parentOwner.type) {\n            var name = getComponentNameFromType(parentOwner.type);\n            name &&\n              (request = \"\\n\\nCheck the render method of `\" + name + \"`.\");\n          }\n          request ||\n            (componentName &&\n              (request =\n                \"\\n\\nCheck the top-level render call using <\" +\n                componentName +\n                \">.\"));\n          componentName = \"\";\n          null != didWarnForKey &&\n            parentOwner !== didWarnForKey &&\n            ((parentOwner = null),\n            \"undefined\" !== typeof didWarnForKey.type\n              ? (parentOwner = getComponentNameFromType(didWarnForKey.type))\n              : \"string\" === typeof didWarnForKey.name &&\n                (parentOwner = didWarnForKey.name),\n            parentOwner &&\n              (componentName =\n                \" It was passed a child from \" + parentOwner + \".\"));\n          didWarnForKey = task.componentStack;\n          task.componentStack = {\n            parent: task.componentStack,\n            type: child.type,\n            owner: child._owner,\n            stack: child._debugStack\n          };\n          console.error(\n            'Each child in a list should have a unique \"key\" prop.%s%s See https://react.dev/link/warning-keys for more information.',\n            request,\n            componentName\n          );\n          task.componentStack = didWarnForKey;\n        }\n      }\n    }\n    function renderChildrenArray(request, task, children, childIndex) {\n      var prevKeyPath = task.keyPath,\n        previousComponentStack = task.componentStack;\n      var previousDebugTask = task.debugTask;\n      pushServerComponentStack(task, task.node._debugInfo);\n      if (\n        -1 !== childIndex &&\n        ((task.keyPath = [task.keyPath, \"Fragment\", childIndex]),\n        null !== task.replay)\n      ) {\n        for (\n          var replay = task.replay, replayNodes = replay.nodes, j = 0;\n          j < replayNodes.length;\n          j++\n        ) {\n          var node = replayNodes[j];\n          if (node[1] === childIndex) {\n            childIndex = node[2];\n            node = node[3];\n            task.replay = { nodes: childIndex, slots: node, pendingTasks: 1 };\n            try {\n              renderChildrenArray(request, task, children, -1);\n              if (\n                1 === task.replay.pendingTasks &&\n                0 < task.replay.nodes.length\n              )\n                throw Error(\n                  \"Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering.\"\n                );\n              task.replay.pendingTasks--;\n            } catch (x) {\n              if (\n                \"object\" === typeof x &&\n                null !== x &&\n                (x === SuspenseException || \"function\" === typeof x.then)\n              )\n                throw x;\n              task.replay.pendingTasks--;\n              var thrownInfo = getThrownInfo(task.componentStack);\n              children = task.blockedBoundary;\n              var error = x,\n                resumeSlots = node;\n              node = logRecoverableError(\n                request,\n                error,\n                thrownInfo,\n                task.debugTask\n              );\n              abortRemainingReplayNodes(\n                request,\n                children,\n                childIndex,\n                resumeSlots,\n                error,\n                node,\n                thrownInfo,\n                !1\n              );\n            }\n            task.replay = replay;\n            replayNodes.splice(j, 1);\n            break;\n          }\n        }\n        task.keyPath = prevKeyPath;\n        task.componentStack = previousComponentStack;\n        task.debugTask = previousDebugTask;\n        return;\n      }\n      replay = task.treeContext;\n      replayNodes = children.length;\n      if (\n        null !== task.replay &&\n        ((j = task.replay.slots), null !== j && \"object\" === typeof j)\n      ) {\n        for (childIndex = 0; childIndex < replayNodes; childIndex++)\n          (node = children[childIndex]),\n            (task.treeContext = pushTreeContext(\n              replay,\n              replayNodes,\n              childIndex\n            )),\n            (error = j[childIndex]),\n            \"number\" === typeof error\n              ? (resumeNode(request, task, error, node, childIndex),\n                delete j[childIndex])\n              : renderNode(request, task, node, childIndex);\n        task.treeContext = replay;\n        task.keyPath = prevKeyPath;\n        task.componentStack = previousComponentStack;\n        task.debugTask = previousDebugTask;\n        return;\n      }\n      for (j = 0; j < replayNodes; j++)\n        (childIndex = children[j]),\n          warnForMissingKey(request, task, childIndex),\n          (task.treeContext = pushTreeContext(replay, replayNodes, j)),\n          renderNode(request, task, childIndex, j);\n      task.treeContext = replay;\n      task.keyPath = prevKeyPath;\n      task.componentStack = previousComponentStack;\n      task.debugTask = previousDebugTask;\n    }\n    function trackPostponedBoundary(request, trackedPostpones, boundary) {\n      boundary.status = POSTPONED;\n      boundary.rootSegmentID = request.nextSegmentId++;\n      request = boundary.trackedContentKeyPath;\n      if (null === request)\n        throw Error(\n          \"It should not be possible to postpone at the root. This is a bug in React.\"\n        );\n      var fallbackReplayNode = boundary.trackedFallbackNode,\n        children = [],\n        boundaryNode = trackedPostpones.workingMap.get(request);\n      if (void 0 === boundaryNode)\n        return (\n          (boundary = [\n            request[1],\n            request[2],\n            children,\n            null,\n            fallbackReplayNode,\n            boundary.rootSegmentID\n          ]),\n          trackedPostpones.workingMap.set(request, boundary),\n          addToReplayParent(boundary, request[0], trackedPostpones),\n          boundary\n        );\n      boundaryNode[4] = fallbackReplayNode;\n      boundaryNode[5] = boundary.rootSegmentID;\n      return boundaryNode;\n    }\n    function trackPostpone(request, trackedPostpones, task, segment) {\n      segment.status = POSTPONED;\n      var keyPath = task.keyPath,\n        boundary = task.blockedBoundary;\n      if (null === boundary)\n        (segment.id = request.nextSegmentId++),\n          (trackedPostpones.rootSlots = segment.id),\n          null !== request.completedRootSegment &&\n            (request.completedRootSegment.status = POSTPONED);\n      else {\n        if (null !== boundary && boundary.status === PENDING) {\n          var boundaryNode = trackPostponedBoundary(\n            request,\n            trackedPostpones,\n            boundary\n          );\n          if (\n            boundary.trackedContentKeyPath === keyPath &&\n            -1 === task.childIndex\n          ) {\n            -1 === segment.id &&\n              (segment.id = segment.parentFlushed\n                ? boundary.rootSegmentID\n                : request.nextSegmentId++);\n            boundaryNode[3] = segment.id;\n            return;\n          }\n        }\n        -1 === segment.id &&\n          (segment.id =\n            segment.parentFlushed && null !== boundary\n              ? boundary.rootSegmentID\n              : request.nextSegmentId++);\n        if (-1 === task.childIndex)\n          null === keyPath\n            ? (trackedPostpones.rootSlots = segment.id)\n            : ((task = trackedPostpones.workingMap.get(keyPath)),\n              void 0 === task\n                ? ((task = [keyPath[1], keyPath[2], [], segment.id]),\n                  addToReplayParent(task, keyPath[0], trackedPostpones))\n                : (task[3] = segment.id));\n        else {\n          if (null === keyPath)\n            if (((request = trackedPostpones.rootSlots), null === request))\n              request = trackedPostpones.rootSlots = {};\n            else {\n              if (\"number\" === typeof request)\n                throw Error(\n                  \"It should not be possible to postpone both at the root of an element as well as a slot below. This is a bug in React.\"\n                );\n            }\n          else if (\n            ((boundary = trackedPostpones.workingMap),\n            (boundaryNode = boundary.get(keyPath)),\n            void 0 === boundaryNode)\n          )\n            (request = {}),\n              (boundaryNode = [keyPath[1], keyPath[2], [], request]),\n              boundary.set(keyPath, boundaryNode),\n              addToReplayParent(boundaryNode, keyPath[0], trackedPostpones);\n          else if (((request = boundaryNode[3]), null === request))\n            request = boundaryNode[3] = {};\n          else if (\"number\" === typeof request)\n            throw Error(\n              \"It should not be possible to postpone both at the root of an element as well as a slot below. This is a bug in React.\"\n            );\n          request[task.childIndex] = segment.id;\n        }\n      }\n    }\n    function untrackBoundary(request, boundary) {\n      request = request.trackedPostpones;\n      null !== request &&\n        ((boundary = boundary.trackedContentKeyPath),\n        null !== boundary &&\n          ((boundary = request.workingMap.get(boundary)),\n          void 0 !== boundary &&\n            ((boundary.length = 4), (boundary[2] = []), (boundary[3] = null))));\n    }\n    function spawnNewSuspendedReplayTask(request, task, thenableState) {\n      return createReplayTask(\n        request,\n        thenableState,\n        task.replay,\n        task.node,\n        task.childIndex,\n        task.blockedBoundary,\n        task.hoistableState,\n        task.abortSet,\n        task.keyPath,\n        task.formatContext,\n        task.context,\n        task.treeContext,\n        task.row,\n        task.componentStack,\n        emptyContextObject,\n        task.debugTask\n      );\n    }\n    function spawnNewSuspendedRenderTask(request, task, thenableState) {\n      var segment = task.blockedSegment,\n        newSegment = createPendingSegment(\n          request,\n          segment.chunks.length,\n          null,\n          task.formatContext,\n          segment.lastPushedText,\n          !0\n        );\n      segment.children.push(newSegment);\n      segment.lastPushedText = !1;\n      return createRenderTask(\n        request,\n        thenableState,\n        task.node,\n        task.childIndex,\n        task.blockedBoundary,\n        newSegment,\n        task.blockedPreamble,\n        task.hoistableState,\n        task.abortSet,\n        task.keyPath,\n        task.formatContext,\n        task.context,\n        task.treeContext,\n        task.row,\n        task.componentStack,\n        emptyContextObject,\n        task.debugTask\n      );\n    }\n    function renderNode(request, task, node, childIndex) {\n      var previousFormatContext = task.formatContext,\n        previousContext = task.context,\n        previousKeyPath = task.keyPath,\n        previousTreeContext = task.treeContext,\n        previousComponentStack = task.componentStack,\n        previousDebugTask = task.debugTask,\n        segment = task.blockedSegment;\n      if (null === segment) {\n        segment = task.replay;\n        try {\n          return renderNodeDestructive(request, task, node, childIndex);\n        } catch (thrownValue) {\n          if (\n            (resetHooksState(),\n            (node =\n              thrownValue === SuspenseException\n                ? getSuspendedThenable()\n                : thrownValue),\n            12 !== request.status && \"object\" === typeof node && null !== node)\n          ) {\n            if (\"function\" === typeof node.then) {\n              childIndex =\n                thrownValue === SuspenseException\n                  ? getThenableStateAfterSuspending()\n                  : null;\n              request = spawnNewSuspendedReplayTask(\n                request,\n                task,\n                childIndex\n              ).ping;\n              node.then(request, request);\n              task.formatContext = previousFormatContext;\n              task.context = previousContext;\n              task.keyPath = previousKeyPath;\n              task.treeContext = previousTreeContext;\n              task.componentStack = previousComponentStack;\n              task.replay = segment;\n              task.debugTask = previousDebugTask;\n              switchContext(previousContext);\n              return;\n            }\n            if (\"Maximum call stack size exceeded\" === node.message) {\n              node =\n                thrownValue === SuspenseException\n                  ? getThenableStateAfterSuspending()\n                  : null;\n              node = spawnNewSuspendedReplayTask(request, task, node);\n              request.pingedTasks.push(node);\n              task.formatContext = previousFormatContext;\n              task.context = previousContext;\n              task.keyPath = previousKeyPath;\n              task.treeContext = previousTreeContext;\n              task.componentStack = previousComponentStack;\n              task.replay = segment;\n              task.debugTask = previousDebugTask;\n              switchContext(previousContext);\n              return;\n            }\n          }\n        }\n      } else {\n        var childrenLength = segment.children.length,\n          chunkLength = segment.chunks.length;\n        try {\n          return renderNodeDestructive(request, task, node, childIndex);\n        } catch (thrownValue$3) {\n          if (\n            (resetHooksState(),\n            (segment.children.length = childrenLength),\n            (segment.chunks.length = chunkLength),\n            (node =\n              thrownValue$3 === SuspenseException\n                ? getSuspendedThenable()\n                : thrownValue$3),\n            12 !== request.status && \"object\" === typeof node && null !== node)\n          ) {\n            if (\"function\" === typeof node.then) {\n              segment = node;\n              node =\n                thrownValue$3 === SuspenseException\n                  ? getThenableStateAfterSuspending()\n                  : null;\n              request = spawnNewSuspendedRenderTask(request, task, node).ping;\n              segment.then(request, request);\n              task.formatContext = previousFormatContext;\n              task.context = previousContext;\n              task.keyPath = previousKeyPath;\n              task.treeContext = previousTreeContext;\n              task.componentStack = previousComponentStack;\n              task.debugTask = previousDebugTask;\n              switchContext(previousContext);\n              return;\n            }\n            if (\"Maximum call stack size exceeded\" === node.message) {\n              segment =\n                thrownValue$3 === SuspenseException\n                  ? getThenableStateAfterSuspending()\n                  : null;\n              segment = spawnNewSuspendedRenderTask(request, task, segment);\n              request.pingedTasks.push(segment);\n              task.formatContext = previousFormatContext;\n              task.context = previousContext;\n              task.keyPath = previousKeyPath;\n              task.treeContext = previousTreeContext;\n              task.componentStack = previousComponentStack;\n              task.debugTask = previousDebugTask;\n              switchContext(previousContext);\n              return;\n            }\n          }\n        }\n      }\n      task.formatContext = previousFormatContext;\n      task.context = previousContext;\n      task.keyPath = previousKeyPath;\n      task.treeContext = previousTreeContext;\n      switchContext(previousContext);\n      throw node;\n    }\n    function abortTaskSoft(task) {\n      var boundary = task.blockedBoundary,\n        segment = task.blockedSegment;\n      null !== segment &&\n        ((segment.status = ABORTED),\n        finishedTask(this, boundary, task.row, segment));\n    }\n    function abortRemainingReplayNodes(\n      request$jscomp$0,\n      boundary,\n      nodes,\n      slots,\n      error$jscomp$0,\n      errorDigest$jscomp$0,\n      errorInfo$jscomp$0,\n      aborted\n    ) {\n      for (var i = 0; i < nodes.length; i++) {\n        var node = nodes[i];\n        if (4 === node.length)\n          abortRemainingReplayNodes(\n            request$jscomp$0,\n            boundary,\n            node[2],\n            node[3],\n            error$jscomp$0,\n            errorDigest$jscomp$0,\n            errorInfo$jscomp$0,\n            aborted\n          );\n        else {\n          var request = request$jscomp$0;\n          node = node[5];\n          var error = error$jscomp$0,\n            errorDigest = errorDigest$jscomp$0,\n            errorInfo = errorInfo$jscomp$0,\n            wasAborted = aborted,\n            resumedBoundary = createSuspenseBoundary(\n              request,\n              null,\n              new Set(),\n              null,\n              null\n            );\n          resumedBoundary.parentFlushed = !0;\n          resumedBoundary.rootSegmentID = node;\n          resumedBoundary.status = CLIENT_RENDERED;\n          encodeErrorForBoundary(\n            resumedBoundary,\n            errorDigest,\n            error,\n            errorInfo,\n            wasAborted\n          );\n          resumedBoundary.parentFlushed &&\n            request.clientRenderedBoundaries.push(resumedBoundary);\n        }\n      }\n      nodes.length = 0;\n      if (null !== slots) {\n        if (null === boundary)\n          throw Error(\n            \"We should not have any resumable nodes in the shell. This is a bug in React.\"\n          );\n        boundary.status !== CLIENT_RENDERED &&\n          ((boundary.status = CLIENT_RENDERED),\n          encodeErrorForBoundary(\n            boundary,\n            errorDigest$jscomp$0,\n            error$jscomp$0,\n            errorInfo$jscomp$0,\n            aborted\n          ),\n          boundary.parentFlushed &&\n            request$jscomp$0.clientRenderedBoundaries.push(boundary));\n        if (\"object\" === typeof slots)\n          for (var index in slots) delete slots[index];\n      }\n    }\n    function abortTask(task, request, error) {\n      var boundary = task.blockedBoundary,\n        segment = task.blockedSegment;\n      if (null !== segment) {\n        if (6 === segment.status) return;\n        segment.status = ABORTED;\n      }\n      var errorInfo = getThrownInfo(task.componentStack),\n        node = task.node;\n      null !== node &&\n        \"object\" === typeof node &&\n        pushHaltedAwaitOnComponentStack(task, node._debugInfo);\n      if (null === boundary) {\n        if (13 !== request.status && request.status !== CLOSED) {\n          boundary = task.replay;\n          if (null === boundary) {\n            null !== request.trackedPostpones && null !== segment\n              ? ((boundary = request.trackedPostpones),\n                logRecoverableError(request, error, errorInfo, task.debugTask),\n                trackPostpone(request, boundary, task, segment),\n                finishedTask(request, null, task.row, segment))\n              : (logRecoverableError(request, error, errorInfo, task.debugTask),\n                fatalError(request, error, errorInfo, task.debugTask));\n            return;\n          }\n          boundary.pendingTasks--;\n          0 === boundary.pendingTasks &&\n            0 < boundary.nodes.length &&\n            ((segment = logRecoverableError(request, error, errorInfo, null)),\n            abortRemainingReplayNodes(\n              request,\n              null,\n              boundary.nodes,\n              boundary.slots,\n              error,\n              segment,\n              errorInfo,\n              !0\n            ));\n          request.pendingRootTasks--;\n          0 === request.pendingRootTasks && completeShell(request);\n        }\n      } else {\n        node = request.trackedPostpones;\n        if (boundary.status !== CLIENT_RENDERED) {\n          if (null !== node && null !== segment)\n            return (\n              logRecoverableError(request, error, errorInfo, task.debugTask),\n              trackPostpone(request, node, task, segment),\n              boundary.fallbackAbortableTasks.forEach(function (fallbackTask) {\n                return abortTask(fallbackTask, request, error);\n              }),\n              boundary.fallbackAbortableTasks.clear(),\n              finishedTask(request, boundary, task.row, segment)\n            );\n          boundary.status = CLIENT_RENDERED;\n          segment = logRecoverableError(\n            request,\n            error,\n            errorInfo,\n            task.debugTask\n          );\n          boundary.status = CLIENT_RENDERED;\n          encodeErrorForBoundary(boundary, segment, error, errorInfo, !0);\n          untrackBoundary(request, boundary);\n          boundary.parentFlushed &&\n            request.clientRenderedBoundaries.push(boundary);\n        }\n        boundary.pendingTasks--;\n        errorInfo = boundary.row;\n        null !== errorInfo &&\n          0 === --errorInfo.pendingTasks &&\n          finishSuspenseListRow(request, errorInfo);\n        boundary.fallbackAbortableTasks.forEach(function (fallbackTask) {\n          return abortTask(fallbackTask, request, error);\n        });\n        boundary.fallbackAbortableTasks.clear();\n      }\n      task = task.row;\n      null !== task &&\n        0 === --task.pendingTasks &&\n        finishSuspenseListRow(request, task);\n      request.allPendingTasks--;\n      0 === request.allPendingTasks && completeAll(request);\n    }\n    function safelyEmitEarlyPreloads(request, shellComplete) {\n      try {\n        var renderState = request.renderState,\n          onHeaders = renderState.onHeaders;\n        if (onHeaders) {\n          var headers = renderState.headers;\n          if (headers) {\n            renderState.headers = null;\n            var linkHeader = headers.preconnects;\n            headers.fontPreloads &&\n              (linkHeader && (linkHeader += \", \"),\n              (linkHeader += headers.fontPreloads));\n            headers.highImagePreloads &&\n              (linkHeader && (linkHeader += \", \"),\n              (linkHeader += headers.highImagePreloads));\n            if (!shellComplete) {\n              var queueIter = renderState.styles.values(),\n                queueStep = queueIter.next();\n              b: for (\n                ;\n                0 < headers.remainingCapacity && !queueStep.done;\n                queueStep = queueIter.next()\n              )\n                for (\n                  var sheetIter = queueStep.value.sheets.values(),\n                    sheetStep = sheetIter.next();\n                  0 < headers.remainingCapacity && !sheetStep.done;\n                  sheetStep = sheetIter.next()\n                ) {\n                  var sheet = sheetStep.value,\n                    props = sheet.props,\n                    key = props.href,\n                    props$jscomp$0 = sheet.props;\n                  var header = getPreloadAsHeader(\n                    props$jscomp$0.href,\n                    \"style\",\n                    {\n                      crossOrigin: props$jscomp$0.crossOrigin,\n                      integrity: props$jscomp$0.integrity,\n                      nonce: props$jscomp$0.nonce,\n                      type: props$jscomp$0.type,\n                      fetchPriority: props$jscomp$0.fetchPriority,\n                      referrerPolicy: props$jscomp$0.referrerPolicy,\n                      media: props$jscomp$0.media\n                    }\n                  );\n                  if (0 <= (headers.remainingCapacity -= header.length + 2))\n                    (renderState.resets.style[key] = PRELOAD_NO_CREDS),\n                      linkHeader && (linkHeader += \", \"),\n                      (linkHeader += header),\n                      (renderState.resets.style[key] =\n                        \"string\" === typeof props.crossOrigin ||\n                        \"string\" === typeof props.integrity\n                          ? [props.crossOrigin, props.integrity]\n                          : PRELOAD_NO_CREDS);\n                  else break b;\n                }\n            }\n            linkHeader ? onHeaders({ Link: linkHeader }) : onHeaders({});\n          }\n        }\n      } catch (error) {\n        logRecoverableError(request, error, {}, null);\n      }\n    }\n    function completeShell(request) {\n      null === request.trackedPostpones && safelyEmitEarlyPreloads(request, !0);\n      null === request.trackedPostpones && preparePreamble(request);\n      request.onShellError = noop;\n      request = request.onShellReady;\n      request();\n    }\n    function completeAll(request) {\n      safelyEmitEarlyPreloads(\n        request,\n        null === request.trackedPostpones\n          ? !0\n          : null === request.completedRootSegment ||\n              request.completedRootSegment.status !== POSTPONED\n      );\n      preparePreamble(request);\n      request = request.onAllReady;\n      request();\n    }\n    function queueCompletedSegment(boundary, segment) {\n      if (\n        0 === segment.chunks.length &&\n        1 === segment.children.length &&\n        null === segment.children[0].boundary &&\n        -1 === segment.children[0].id\n      ) {\n        var childSegment = segment.children[0];\n        childSegment.id = segment.id;\n        childSegment.parentFlushed = !0;\n        (childSegment.status !== COMPLETED &&\n          childSegment.status !== ABORTED &&\n          childSegment.status !== ERRORED) ||\n          queueCompletedSegment(boundary, childSegment);\n      } else boundary.completedSegments.push(segment);\n    }\n    function finishedSegment(request, boundary, segment) {\n      if (null !== byteLengthOfChunk) {\n        segment = segment.chunks;\n        for (var segmentByteSize = 0, i = 0; i < segment.length; i++)\n          segmentByteSize += segment[i].byteLength;\n        null === boundary\n          ? (request.byteSize += segmentByteSize)\n          : (boundary.byteSize += segmentByteSize);\n      }\n    }\n    function finishedTask(request, boundary, row, segment) {\n      null !== row &&\n        (0 === --row.pendingTasks\n          ? finishSuspenseListRow(request, row)\n          : row.together && tryToResolveTogetherRow(request, row));\n      request.allPendingTasks--;\n      if (null === boundary) {\n        if (null !== segment && segment.parentFlushed) {\n          if (null !== request.completedRootSegment)\n            throw Error(\n              \"There can only be one root segment. This is a bug in React.\"\n            );\n          request.completedRootSegment = segment;\n        }\n        request.pendingRootTasks--;\n        0 === request.pendingRootTasks && completeShell(request);\n      } else if ((boundary.pendingTasks--, boundary.status !== CLIENT_RENDERED))\n        if (0 === boundary.pendingTasks)\n          if (\n            (boundary.status === PENDING && (boundary.status = COMPLETED),\n            null !== segment &&\n              segment.parentFlushed &&\n              (segment.status === COMPLETED || segment.status === ABORTED) &&\n              queueCompletedSegment(boundary, segment),\n            boundary.parentFlushed &&\n              request.completedBoundaries.push(boundary),\n            boundary.status === COMPLETED)\n          )\n            (row = boundary.row),\n              null !== row &&\n                hoistHoistables(row.hoistables, boundary.contentState),\n              isEligibleForOutlining(request, boundary) ||\n                (boundary.fallbackAbortableTasks.forEach(\n                  abortTaskSoft,\n                  request\n                ),\n                boundary.fallbackAbortableTasks.clear(),\n                null !== row &&\n                  0 === --row.pendingTasks &&\n                  finishSuspenseListRow(request, row)),\n              0 === request.pendingRootTasks &&\n                null === request.trackedPostpones &&\n                null !== boundary.contentPreamble &&\n                preparePreamble(request);\n          else {\n            if (\n              boundary.status === POSTPONED &&\n              ((boundary = boundary.row), null !== boundary)\n            ) {\n              if (null !== request.trackedPostpones) {\n                row = request.trackedPostpones;\n                var postponedRow = boundary.next;\n                if (\n                  null !== postponedRow &&\n                  ((segment = postponedRow.boundaries), null !== segment)\n                )\n                  for (\n                    postponedRow.boundaries = null, postponedRow = 0;\n                    postponedRow < segment.length;\n                    postponedRow++\n                  ) {\n                    var postponedBoundary = segment[postponedRow];\n                    trackPostponedBoundary(request, row, postponedBoundary);\n                    finishedTask(request, postponedBoundary, null, null);\n                  }\n              }\n              0 === --boundary.pendingTasks &&\n                finishSuspenseListRow(request, boundary);\n            }\n          }\n        else\n          null === segment ||\n            !segment.parentFlushed ||\n            (segment.status !== COMPLETED && segment.status !== ABORTED) ||\n            (queueCompletedSegment(boundary, segment),\n            1 === boundary.completedSegments.length &&\n              boundary.parentFlushed &&\n              request.partialBoundaries.push(boundary)),\n            (boundary = boundary.row),\n            null !== boundary &&\n              boundary.together &&\n              tryToResolveTogetherRow(request, boundary);\n      0 === request.allPendingTasks && completeAll(request);\n    }\n    function performWork(request$jscomp$2) {\n      if (\n        request$jscomp$2.status !== CLOSED &&\n        13 !== request$jscomp$2.status\n      ) {\n        var prevContext = currentActiveSnapshot,\n          prevDispatcher = ReactSharedInternals.H;\n        ReactSharedInternals.H = HooksDispatcher;\n        var prevAsyncDispatcher = ReactSharedInternals.A;\n        ReactSharedInternals.A = DefaultAsyncDispatcher;\n        var prevRequest = currentRequest;\n        currentRequest = request$jscomp$2;\n        var prevGetCurrentStackImpl = ReactSharedInternals.getCurrentStack;\n        ReactSharedInternals.getCurrentStack = getCurrentStackInDEV;\n        var prevResumableState = currentResumableState;\n        currentResumableState = request$jscomp$2.resumableState;\n        try {\n          var pingedTasks = request$jscomp$2.pingedTasks,\n            i;\n          for (i = 0; i < pingedTasks.length; i++) {\n            var request = request$jscomp$2,\n              task = pingedTasks[i],\n              segment = task.blockedSegment;\n            if (null === segment) {\n              var prevTaskInDEV = void 0,\n                request$jscomp$0 = request;\n              request = task;\n              if (0 !== request.replay.pendingTasks) {\n                switchContext(request.context);\n                prevTaskInDEV = currentTaskInDEV;\n                currentTaskInDEV = request;\n                try {\n                  \"number\" === typeof request.replay.slots\n                    ? resumeNode(\n                        request$jscomp$0,\n                        request,\n                        request.replay.slots,\n                        request.node,\n                        request.childIndex\n                      )\n                    : retryNode(request$jscomp$0, request);\n                  if (\n                    1 === request.replay.pendingTasks &&\n                    0 < request.replay.nodes.length\n                  )\n                    throw Error(\n                      \"Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering.\"\n                    );\n                  request.replay.pendingTasks--;\n                  request.abortSet.delete(request);\n                  finishedTask(\n                    request$jscomp$0,\n                    request.blockedBoundary,\n                    request.row,\n                    null\n                  );\n                } catch (thrownValue) {\n                  resetHooksState();\n                  var x =\n                    thrownValue === SuspenseException\n                      ? getSuspendedThenable()\n                      : thrownValue;\n                  if (\n                    \"object\" === typeof x &&\n                    null !== x &&\n                    \"function\" === typeof x.then\n                  ) {\n                    var ping = request.ping;\n                    x.then(ping, ping);\n                    request.thenableState =\n                      thrownValue === SuspenseException\n                        ? getThenableStateAfterSuspending()\n                        : null;\n                  } else {\n                    request.replay.pendingTasks--;\n                    request.abortSet.delete(request);\n                    var errorInfo = getThrownInfo(request.componentStack),\n                      errorDigest = void 0,\n                      request$jscomp$1 = request$jscomp$0,\n                      boundary = request.blockedBoundary,\n                      error$jscomp$0 =\n                        12 === request$jscomp$0.status\n                          ? request$jscomp$0.fatalError\n                          : x,\n                      errorInfo$jscomp$0 = errorInfo,\n                      replayNodes = request.replay.nodes,\n                      resumeSlots = request.replay.slots;\n                    errorDigest = logRecoverableError(\n                      request$jscomp$1,\n                      error$jscomp$0,\n                      errorInfo$jscomp$0,\n                      request.debugTask\n                    );\n                    abortRemainingReplayNodes(\n                      request$jscomp$1,\n                      boundary,\n                      replayNodes,\n                      resumeSlots,\n                      error$jscomp$0,\n                      errorDigest,\n                      errorInfo$jscomp$0,\n                      !1\n                    );\n                    request$jscomp$0.pendingRootTasks--;\n                    0 === request$jscomp$0.pendingRootTasks &&\n                      completeShell(request$jscomp$0);\n                    request$jscomp$0.allPendingTasks--;\n                    0 === request$jscomp$0.allPendingTasks &&\n                      completeAll(request$jscomp$0);\n                  }\n                } finally {\n                  currentTaskInDEV = prevTaskInDEV;\n                }\n              }\n            } else if (\n              ((request$jscomp$0 = prevTaskInDEV = void 0),\n              (errorDigest = task),\n              (request$jscomp$1 = segment),\n              request$jscomp$1.status === PENDING)\n            ) {\n              request$jscomp$1.status = 6;\n              switchContext(errorDigest.context);\n              request$jscomp$0 = currentTaskInDEV;\n              currentTaskInDEV = errorDigest;\n              var childrenLength = request$jscomp$1.children.length,\n                chunkLength = request$jscomp$1.chunks.length;\n              try {\n                retryNode(request, errorDigest),\n                  request$jscomp$1.lastPushedText &&\n                    request$jscomp$1.textEmbedded &&\n                    request$jscomp$1.chunks.push(textSeparator),\n                  errorDigest.abortSet.delete(errorDigest),\n                  (request$jscomp$1.status = COMPLETED),\n                  finishedSegment(\n                    request,\n                    errorDigest.blockedBoundary,\n                    request$jscomp$1\n                  ),\n                  finishedTask(\n                    request,\n                    errorDigest.blockedBoundary,\n                    errorDigest.row,\n                    request$jscomp$1\n                  );\n              } catch (thrownValue) {\n                resetHooksState();\n                request$jscomp$1.children.length = childrenLength;\n                request$jscomp$1.chunks.length = chunkLength;\n                var x$jscomp$0 =\n                  thrownValue === SuspenseException\n                    ? getSuspendedThenable()\n                    : 12 === request.status\n                      ? request.fatalError\n                      : thrownValue;\n                if (\n                  12 === request.status &&\n                  null !== request.trackedPostpones\n                ) {\n                  var trackedPostpones = request.trackedPostpones,\n                    thrownInfo = getThrownInfo(errorDigest.componentStack);\n                  errorDigest.abortSet.delete(errorDigest);\n                  logRecoverableError(\n                    request,\n                    x$jscomp$0,\n                    thrownInfo,\n                    errorDigest.debugTask\n                  );\n                  trackPostpone(\n                    request,\n                    trackedPostpones,\n                    errorDigest,\n                    request$jscomp$1\n                  );\n                  finishedTask(\n                    request,\n                    errorDigest.blockedBoundary,\n                    errorDigest.row,\n                    request$jscomp$1\n                  );\n                } else if (\n                  \"object\" === typeof x$jscomp$0 &&\n                  null !== x$jscomp$0 &&\n                  \"function\" === typeof x$jscomp$0.then\n                ) {\n                  request$jscomp$1.status = PENDING;\n                  errorDigest.thenableState =\n                    thrownValue === SuspenseException\n                      ? getThenableStateAfterSuspending()\n                      : null;\n                  var ping$jscomp$0 = errorDigest.ping;\n                  x$jscomp$0.then(ping$jscomp$0, ping$jscomp$0);\n                } else {\n                  var errorInfo$jscomp$1 = getThrownInfo(\n                    errorDigest.componentStack\n                  );\n                  errorDigest.abortSet.delete(errorDigest);\n                  request$jscomp$1.status = ERRORED;\n                  var boundary$jscomp$0 = errorDigest.blockedBoundary,\n                    row = errorDigest.row,\n                    debugTask = errorDigest.debugTask;\n                  null !== row &&\n                    0 === --row.pendingTasks &&\n                    finishSuspenseListRow(request, row);\n                  request.allPendingTasks--;\n                  prevTaskInDEV = logRecoverableError(\n                    request,\n                    x$jscomp$0,\n                    errorInfo$jscomp$1,\n                    debugTask\n                  );\n                  if (null === boundary$jscomp$0)\n                    fatalError(\n                      request,\n                      x$jscomp$0,\n                      errorInfo$jscomp$1,\n                      debugTask\n                    );\n                  else if (\n                    (boundary$jscomp$0.pendingTasks--,\n                    boundary$jscomp$0.status !== CLIENT_RENDERED)\n                  ) {\n                    boundary$jscomp$0.status = CLIENT_RENDERED;\n                    encodeErrorForBoundary(\n                      boundary$jscomp$0,\n                      prevTaskInDEV,\n                      x$jscomp$0,\n                      errorInfo$jscomp$1,\n                      !1\n                    );\n                    untrackBoundary(request, boundary$jscomp$0);\n                    var boundaryRow = boundary$jscomp$0.row;\n                    null !== boundaryRow &&\n                      0 === --boundaryRow.pendingTasks &&\n                      finishSuspenseListRow(request, boundaryRow);\n                    boundary$jscomp$0.parentFlushed &&\n                      request.clientRenderedBoundaries.push(boundary$jscomp$0);\n                    0 === request.pendingRootTasks &&\n                      null === request.trackedPostpones &&\n                      null !== boundary$jscomp$0.contentPreamble &&\n                      preparePreamble(request);\n                  }\n                  0 === request.allPendingTasks && completeAll(request);\n                }\n              } finally {\n                currentTaskInDEV = request$jscomp$0;\n              }\n            }\n          }\n          pingedTasks.splice(0, i);\n          null !== request$jscomp$2.destination &&\n            flushCompletedQueues(\n              request$jscomp$2,\n              request$jscomp$2.destination\n            );\n        } catch (error) {\n          (pingedTasks = {}),\n            logRecoverableError(request$jscomp$2, error, pingedTasks, null),\n            fatalError(request$jscomp$2, error, pingedTasks, null);\n        } finally {\n          (currentResumableState = prevResumableState),\n            (ReactSharedInternals.H = prevDispatcher),\n            (ReactSharedInternals.A = prevAsyncDispatcher),\n            (ReactSharedInternals.getCurrentStack = prevGetCurrentStackImpl),\n            prevDispatcher === HooksDispatcher && switchContext(prevContext),\n            (currentRequest = prevRequest);\n        }\n      }\n    }\n    function preparePreambleFromSubtree(\n      request,\n      segment,\n      collectedPreambleSegments\n    ) {\n      segment.preambleChildren.length &&\n        collectedPreambleSegments.push(segment.preambleChildren);\n      for (var pendingPreambles = !1, i = 0; i < segment.children.length; i++)\n        pendingPreambles =\n          preparePreambleFromSegment(\n            request,\n            segment.children[i],\n            collectedPreambleSegments\n          ) || pendingPreambles;\n      return pendingPreambles;\n    }\n    function preparePreambleFromSegment(\n      request,\n      segment,\n      collectedPreambleSegments\n    ) {\n      var boundary = segment.boundary;\n      if (null === boundary)\n        return preparePreambleFromSubtree(\n          request,\n          segment,\n          collectedPreambleSegments\n        );\n      var preamble = boundary.contentPreamble,\n        fallbackPreamble = boundary.fallbackPreamble;\n      if (null === preamble || null === fallbackPreamble) return !1;\n      switch (boundary.status) {\n        case COMPLETED:\n          hoistPreambleState(request.renderState, preamble);\n          request.byteSize += boundary.byteSize;\n          segment = boundary.completedSegments[0];\n          if (!segment)\n            throw Error(\n              \"A previously unvisited boundary must have exactly one root segment. This is a bug in React.\"\n            );\n          return preparePreambleFromSubtree(\n            request,\n            segment,\n            collectedPreambleSegments\n          );\n        case POSTPONED:\n          if (null !== request.trackedPostpones) return !0;\n        case CLIENT_RENDERED:\n          if (segment.status === COMPLETED)\n            return (\n              hoistPreambleState(request.renderState, fallbackPreamble),\n              preparePreambleFromSubtree(\n                request,\n                segment,\n                collectedPreambleSegments\n              )\n            );\n        default:\n          return !0;\n      }\n    }\n    function preparePreamble(request) {\n      if (\n        request.completedRootSegment &&\n        null === request.completedPreambleSegments\n      ) {\n        var collectedPreambleSegments = [],\n          originalRequestByteSize = request.byteSize,\n          hasPendingPreambles = preparePreambleFromSegment(\n            request,\n            request.completedRootSegment,\n            collectedPreambleSegments\n          ),\n          preamble = request.renderState.preamble;\n        !1 === hasPendingPreambles ||\n        (preamble.headChunks && preamble.bodyChunks)\n          ? (request.completedPreambleSegments = collectedPreambleSegments)\n          : (request.byteSize = originalRequestByteSize);\n      }\n    }\n    function flushSubtree(request, destination, segment, hoistableState) {\n      segment.parentFlushed = !0;\n      switch (segment.status) {\n        case PENDING:\n          segment.id = request.nextSegmentId++;\n        case POSTPONED:\n          return (\n            (hoistableState = segment.id),\n            (segment.lastPushedText = !1),\n            (segment.textEmbedded = !1),\n            (request = request.renderState),\n            writeChunk(destination, placeholder1),\n            writeChunk(destination, request.placeholderPrefix),\n            (request = stringToChunk(hoistableState.toString(16))),\n            writeChunk(destination, request),\n            writeChunkAndReturn(destination, placeholder2)\n          );\n        case COMPLETED:\n          segment.status = FLUSHED;\n          var r = !0,\n            chunks = segment.chunks,\n            chunkIdx = 0;\n          segment = segment.children;\n          for (var childIdx = 0; childIdx < segment.length; childIdx++) {\n            for (r = segment[childIdx]; chunkIdx < r.index; chunkIdx++)\n              writeChunk(destination, chunks[chunkIdx]);\n            r = flushSegment(request, destination, r, hoistableState);\n          }\n          for (; chunkIdx < chunks.length - 1; chunkIdx++)\n            writeChunk(destination, chunks[chunkIdx]);\n          chunkIdx < chunks.length &&\n            (r = writeChunkAndReturn(destination, chunks[chunkIdx]));\n          return r;\n        case ABORTED:\n          return !0;\n        default:\n          throw Error(\n            \"Aborted, errored or already flushed boundaries should not be flushed again. This is a bug in React.\"\n          );\n      }\n    }\n    function flushSegment(request, destination, segment, hoistableState) {\n      var boundary = segment.boundary;\n      if (null === boundary)\n        return flushSubtree(request, destination, segment, hoistableState);\n      boundary.parentFlushed = !0;\n      if (boundary.status === CLIENT_RENDERED) {\n        var row = boundary.row;\n        null !== row &&\n          0 === --row.pendingTasks &&\n          finishSuspenseListRow(request, row);\n        row = boundary.errorDigest;\n        var errorMessage = boundary.errorMessage,\n          errorStack = boundary.errorStack;\n        boundary = boundary.errorComponentStack;\n        writeChunkAndReturn(destination, startClientRenderedSuspenseBoundary);\n        writeChunk(destination, clientRenderedSuspenseBoundaryError1);\n        row &&\n          (writeChunk(destination, clientRenderedSuspenseBoundaryError1A),\n          writeChunk(destination, stringToChunk(escapeTextForBrowser(row))),\n          writeChunk(\n            destination,\n            clientRenderedSuspenseBoundaryErrorAttrInterstitial\n          ));\n        errorMessage &&\n          (writeChunk(destination, clientRenderedSuspenseBoundaryError1B),\n          writeChunk(\n            destination,\n            stringToChunk(escapeTextForBrowser(errorMessage))\n          ),\n          writeChunk(\n            destination,\n            clientRenderedSuspenseBoundaryErrorAttrInterstitial\n          ));\n        errorStack &&\n          (writeChunk(destination, clientRenderedSuspenseBoundaryError1C),\n          writeChunk(\n            destination,\n            stringToChunk(escapeTextForBrowser(errorStack))\n          ),\n          writeChunk(\n            destination,\n            clientRenderedSuspenseBoundaryErrorAttrInterstitial\n          ));\n        boundary &&\n          (writeChunk(destination, clientRenderedSuspenseBoundaryError1D),\n          writeChunk(\n            destination,\n            stringToChunk(escapeTextForBrowser(boundary))\n          ),\n          writeChunk(\n            destination,\n            clientRenderedSuspenseBoundaryErrorAttrInterstitial\n          ));\n        writeChunkAndReturn(destination, clientRenderedSuspenseBoundaryError2);\n        flushSubtree(request, destination, segment, hoistableState);\n      } else if (boundary.status !== COMPLETED)\n        boundary.status === PENDING &&\n          (boundary.rootSegmentID = request.nextSegmentId++),\n          0 < boundary.completedSegments.length &&\n            request.partialBoundaries.push(boundary),\n          writeStartPendingSuspenseBoundary(\n            destination,\n            request.renderState,\n            boundary.rootSegmentID\n          ),\n          hoistableState &&\n            hoistHoistables(hoistableState, boundary.fallbackState),\n          flushSubtree(request, destination, segment, hoistableState);\n      else if (\n        !flushingPartialBoundaries &&\n        isEligibleForOutlining(request, boundary) &&\n        (flushedByteSize + boundary.byteSize > request.progressiveChunkSize ||\n          hasSuspenseyContent(boundary.contentState))\n      )\n        (boundary.rootSegmentID = request.nextSegmentId++),\n          request.completedBoundaries.push(boundary),\n          writeStartPendingSuspenseBoundary(\n            destination,\n            request.renderState,\n            boundary.rootSegmentID\n          ),\n          flushSubtree(request, destination, segment, hoistableState);\n      else {\n        flushedByteSize += boundary.byteSize;\n        hoistableState &&\n          hoistHoistables(hoistableState, boundary.contentState);\n        segment = boundary.row;\n        null !== segment &&\n          isEligibleForOutlining(request, boundary) &&\n          0 === --segment.pendingTasks &&\n          finishSuspenseListRow(request, segment);\n        writeChunkAndReturn(destination, startCompletedSuspenseBoundary);\n        segment = boundary.completedSegments;\n        if (1 !== segment.length)\n          throw Error(\n            \"A previously unvisited boundary must have exactly one root segment. This is a bug in React.\"\n          );\n        flushSegment(request, destination, segment[0], hoistableState);\n      }\n      return writeChunkAndReturn(destination, endSuspenseBoundary);\n    }\n    function flushSegmentContainer(\n      request,\n      destination,\n      segment,\n      hoistableState\n    ) {\n      writeStartSegment(\n        destination,\n        request.renderState,\n        segment.parentFormatContext,\n        segment.id\n      );\n      flushSegment(request, destination, segment, hoistableState);\n      return writeEndSegment(destination, segment.parentFormatContext);\n    }\n    function flushCompletedBoundary(request, destination, boundary) {\n      flushedByteSize = boundary.byteSize;\n      for (\n        var completedSegments = boundary.completedSegments, i = 0;\n        i < completedSegments.length;\n        i++\n      )\n        flushPartiallyCompletedSegment(\n          request,\n          destination,\n          boundary,\n          completedSegments[i]\n        );\n      completedSegments.length = 0;\n      completedSegments = boundary.row;\n      null !== completedSegments &&\n        isEligibleForOutlining(request, boundary) &&\n        0 === --completedSegments.pendingTasks &&\n        finishSuspenseListRow(request, completedSegments);\n      writeHoistablesForBoundary(\n        destination,\n        boundary.contentState,\n        request.renderState\n      );\n      completedSegments = request.resumableState;\n      request = request.renderState;\n      i = boundary.rootSegmentID;\n      boundary = boundary.contentState;\n      var requiresStyleInsertion = request.stylesToHoist;\n      request.stylesToHoist = !1;\n      writeChunk(destination, request.startInlineScript);\n      writeChunk(destination, endOfStartTag);\n      requiresStyleInsertion\n        ? ((completedSegments.instructions & SentClientRenderFunction) ===\n            NothingSent &&\n            ((completedSegments.instructions |= SentClientRenderFunction),\n            writeChunk(destination, clientRenderScriptFunctionOnly)),\n          (completedSegments.instructions & SentCompleteBoundaryFunction) ===\n            NothingSent &&\n            ((completedSegments.instructions |= SentCompleteBoundaryFunction),\n            writeChunk(destination, completeBoundaryScriptFunctionOnly)),\n          (completedSegments.instructions & SentStyleInsertionFunction) ===\n          NothingSent\n            ? ((completedSegments.instructions |= SentStyleInsertionFunction),\n              writeChunk(\n                destination,\n                completeBoundaryWithStylesScript1FullPartial\n              ))\n            : writeChunk(destination, completeBoundaryWithStylesScript1Partial))\n        : ((completedSegments.instructions & SentCompleteBoundaryFunction) ===\n            NothingSent &&\n            ((completedSegments.instructions |= SentCompleteBoundaryFunction),\n            writeChunk(destination, completeBoundaryScriptFunctionOnly)),\n          writeChunk(destination, completeBoundaryScript1Partial));\n      completedSegments = stringToChunk(i.toString(16));\n      writeChunk(destination, request.boundaryPrefix);\n      writeChunk(destination, completedSegments);\n      writeChunk(destination, completeBoundaryScript2);\n      writeChunk(destination, request.segmentPrefix);\n      writeChunk(destination, completedSegments);\n      requiresStyleInsertion\n        ? (writeChunk(destination, completeBoundaryScript3a),\n          writeStyleResourceDependenciesInJS(destination, boundary))\n        : writeChunk(destination, completeBoundaryScript3b);\n      boundary = writeChunkAndReturn(destination, completeBoundaryScriptEnd);\n      return writeBootstrap(destination, request) && boundary;\n    }\n    function flushPartiallyCompletedSegment(\n      request,\n      destination,\n      boundary,\n      segment\n    ) {\n      if (segment.status === FLUSHED) return !0;\n      var hoistableState = boundary.contentState,\n        segmentID = segment.id;\n      if (-1 === segmentID) {\n        if (-1 === (segment.id = boundary.rootSegmentID))\n          throw Error(\n            \"A root segment ID must have been assigned by now. This is a bug in React.\"\n          );\n        return flushSegmentContainer(\n          request,\n          destination,\n          segment,\n          hoistableState\n        );\n      }\n      if (segmentID === boundary.rootSegmentID)\n        return flushSegmentContainer(\n          request,\n          destination,\n          segment,\n          hoistableState\n        );\n      flushSegmentContainer(request, destination, segment, hoistableState);\n      boundary = request.resumableState;\n      request = request.renderState;\n      writeChunk(destination, request.startInlineScript);\n      writeChunk(destination, endOfStartTag);\n      (boundary.instructions & SentCompleteSegmentFunction) === NothingSent\n        ? ((boundary.instructions |= SentCompleteSegmentFunction),\n          writeChunk(destination, completeSegmentScript1Full))\n        : writeChunk(destination, completeSegmentScript1Partial);\n      writeChunk(destination, request.segmentPrefix);\n      segmentID = stringToChunk(segmentID.toString(16));\n      writeChunk(destination, segmentID);\n      writeChunk(destination, completeSegmentScript2);\n      writeChunk(destination, request.placeholderPrefix);\n      writeChunk(destination, segmentID);\n      destination = writeChunkAndReturn(destination, completeSegmentScriptEnd);\n      return destination;\n    }\n    function flushCompletedQueues(request, destination) {\n      currentView = new Uint8Array(2048);\n      writtenBytes = 0;\n      try {\n        if (!(0 < request.pendingRootTasks)) {\n          var i,\n            completedRootSegment = request.completedRootSegment;\n          if (null !== completedRootSegment) {\n            if (completedRootSegment.status === POSTPONED) return;\n            var completedPreambleSegments = request.completedPreambleSegments;\n            if (null === completedPreambleSegments) return;\n            flushedByteSize = request.byteSize;\n            var resumableState = request.resumableState,\n              renderState = request.renderState,\n              preamble = renderState.preamble,\n              htmlChunks = preamble.htmlChunks,\n              headChunks = preamble.headChunks,\n              i$jscomp$0;\n            if (htmlChunks) {\n              for (i$jscomp$0 = 0; i$jscomp$0 < htmlChunks.length; i$jscomp$0++)\n                writeChunk(destination, htmlChunks[i$jscomp$0]);\n              if (headChunks)\n                for (\n                  i$jscomp$0 = 0;\n                  i$jscomp$0 < headChunks.length;\n                  i$jscomp$0++\n                )\n                  writeChunk(destination, headChunks[i$jscomp$0]);\n              else\n                writeChunk(destination, startChunkForTag(\"head\")),\n                  writeChunk(destination, endOfStartTag);\n            } else if (headChunks)\n              for (i$jscomp$0 = 0; i$jscomp$0 < headChunks.length; i$jscomp$0++)\n                writeChunk(destination, headChunks[i$jscomp$0]);\n            var charsetChunks = renderState.charsetChunks;\n            for (\n              i$jscomp$0 = 0;\n              i$jscomp$0 < charsetChunks.length;\n              i$jscomp$0++\n            )\n              writeChunk(destination, charsetChunks[i$jscomp$0]);\n            charsetChunks.length = 0;\n            renderState.preconnects.forEach(flushResource, destination);\n            renderState.preconnects.clear();\n            var viewportChunks = renderState.viewportChunks;\n            for (\n              i$jscomp$0 = 0;\n              i$jscomp$0 < viewportChunks.length;\n              i$jscomp$0++\n            )\n              writeChunk(destination, viewportChunks[i$jscomp$0]);\n            viewportChunks.length = 0;\n            renderState.fontPreloads.forEach(flushResource, destination);\n            renderState.fontPreloads.clear();\n            renderState.highImagePreloads.forEach(flushResource, destination);\n            renderState.highImagePreloads.clear();\n            currentlyFlushingRenderState = renderState;\n            renderState.styles.forEach(flushStylesInPreamble, destination);\n            currentlyFlushingRenderState = null;\n            var importMapChunks = renderState.importMapChunks;\n            for (\n              i$jscomp$0 = 0;\n              i$jscomp$0 < importMapChunks.length;\n              i$jscomp$0++\n            )\n              writeChunk(destination, importMapChunks[i$jscomp$0]);\n            importMapChunks.length = 0;\n            renderState.bootstrapScripts.forEach(flushResource, destination);\n            renderState.scripts.forEach(flushResource, destination);\n            renderState.scripts.clear();\n            renderState.bulkPreloads.forEach(flushResource, destination);\n            renderState.bulkPreloads.clear();\n            htmlChunks ||\n              headChunks ||\n              (resumableState.instructions |= SentCompletedShellId);\n            var hoistableChunks = renderState.hoistableChunks;\n            for (\n              i$jscomp$0 = 0;\n              i$jscomp$0 < hoistableChunks.length;\n              i$jscomp$0++\n            )\n              writeChunk(destination, hoistableChunks[i$jscomp$0]);\n            for (\n              resumableState = hoistableChunks.length = 0;\n              resumableState < completedPreambleSegments.length;\n              resumableState++\n            ) {\n              var segments = completedPreambleSegments[resumableState];\n              for (\n                renderState = 0;\n                renderState < segments.length;\n                renderState++\n              )\n                flushSegment(request, destination, segments[renderState], null);\n            }\n            var preamble$jscomp$0 = request.renderState.preamble,\n              headChunks$jscomp$0 = preamble$jscomp$0.headChunks;\n            (preamble$jscomp$0.htmlChunks || headChunks$jscomp$0) &&\n              writeChunk(destination, endChunkForTag(\"head\"));\n            var bodyChunks = preamble$jscomp$0.bodyChunks;\n            if (bodyChunks)\n              for (\n                completedPreambleSegments = 0;\n                completedPreambleSegments < bodyChunks.length;\n                completedPreambleSegments++\n              )\n                writeChunk(destination, bodyChunks[completedPreambleSegments]);\n            flushSegment(request, destination, completedRootSegment, null);\n            request.completedRootSegment = null;\n            var renderState$jscomp$0 = request.renderState;\n            if (\n              0 !== request.allPendingTasks ||\n              0 !== request.clientRenderedBoundaries.length ||\n              0 !== request.completedBoundaries.length ||\n              (null !== request.trackedPostpones &&\n                (0 !== request.trackedPostpones.rootNodes.length ||\n                  null !== request.trackedPostpones.rootSlots))\n            ) {\n              var resumableState$jscomp$0 = request.resumableState;\n              if (\n                (resumableState$jscomp$0.instructions & SentMarkShellTime) ===\n                NothingSent\n              ) {\n                resumableState$jscomp$0.instructions |= SentMarkShellTime;\n                writeChunk(destination, renderState$jscomp$0.startInlineScript);\n                if (\n                  (resumableState$jscomp$0.instructions &\n                    SentCompletedShellId) ===\n                  NothingSent\n                ) {\n                  resumableState$jscomp$0.instructions |= SentCompletedShellId;\n                  var shellId = \"_\" + resumableState$jscomp$0.idPrefix + \"R_\";\n                  writeChunk(destination, completedShellIdAttributeStart);\n                  writeChunk(\n                    destination,\n                    stringToChunk(escapeTextForBrowser(shellId))\n                  );\n                  writeChunk(destination, attributeEnd);\n                }\n                writeChunk(destination, endOfStartTag);\n                writeChunk(destination, shellTimeRuntimeScript);\n                writeChunkAndReturn(destination, endInlineScript);\n              }\n            }\n            writeBootstrap(destination, renderState$jscomp$0);\n          }\n          var renderState$jscomp$1 = request.renderState;\n          completedRootSegment = 0;\n          var viewportChunks$jscomp$0 = renderState$jscomp$1.viewportChunks;\n          for (\n            completedRootSegment = 0;\n            completedRootSegment < viewportChunks$jscomp$0.length;\n            completedRootSegment++\n          )\n            writeChunk(\n              destination,\n              viewportChunks$jscomp$0[completedRootSegment]\n            );\n          viewportChunks$jscomp$0.length = 0;\n          renderState$jscomp$1.preconnects.forEach(flushResource, destination);\n          renderState$jscomp$1.preconnects.clear();\n          renderState$jscomp$1.fontPreloads.forEach(flushResource, destination);\n          renderState$jscomp$1.fontPreloads.clear();\n          renderState$jscomp$1.highImagePreloads.forEach(\n            flushResource,\n            destination\n          );\n          renderState$jscomp$1.highImagePreloads.clear();\n          renderState$jscomp$1.styles.forEach(preloadLateStyles, destination);\n          renderState$jscomp$1.scripts.forEach(flushResource, destination);\n          renderState$jscomp$1.scripts.clear();\n          renderState$jscomp$1.bulkPreloads.forEach(flushResource, destination);\n          renderState$jscomp$1.bulkPreloads.clear();\n          var hoistableChunks$jscomp$0 = renderState$jscomp$1.hoistableChunks;\n          for (\n            completedRootSegment = 0;\n            completedRootSegment < hoistableChunks$jscomp$0.length;\n            completedRootSegment++\n          )\n            writeChunk(\n              destination,\n              hoistableChunks$jscomp$0[completedRootSegment]\n            );\n          hoistableChunks$jscomp$0.length = 0;\n          var clientRenderedBoundaries = request.clientRenderedBoundaries;\n          for (i = 0; i < clientRenderedBoundaries.length; i++) {\n            var boundary = clientRenderedBoundaries[i];\n            renderState$jscomp$1 = destination;\n            var resumableState$jscomp$1 = request.resumableState,\n              renderState$jscomp$2 = request.renderState,\n              id = boundary.rootSegmentID,\n              errorDigest = boundary.errorDigest,\n              errorMessage = boundary.errorMessage,\n              errorStack = boundary.errorStack,\n              errorComponentStack = boundary.errorComponentStack;\n            writeChunk(\n              renderState$jscomp$1,\n              renderState$jscomp$2.startInlineScript\n            );\n            writeChunk(renderState$jscomp$1, endOfStartTag);\n            (resumableState$jscomp$1.instructions &\n              SentClientRenderFunction) ===\n            NothingSent\n              ? ((resumableState$jscomp$1.instructions |=\n                  SentClientRenderFunction),\n                writeChunk(renderState$jscomp$1, clientRenderScript1Full))\n              : writeChunk(renderState$jscomp$1, clientRenderScript1Partial);\n            writeChunk(\n              renderState$jscomp$1,\n              renderState$jscomp$2.boundaryPrefix\n            );\n            writeChunk(renderState$jscomp$1, stringToChunk(id.toString(16)));\n            writeChunk(renderState$jscomp$1, clientRenderScript1A);\n            if (\n              errorDigest ||\n              errorMessage ||\n              errorStack ||\n              errorComponentStack\n            )\n              writeChunk(\n                renderState$jscomp$1,\n                clientRenderErrorScriptArgInterstitial\n              ),\n                writeChunk(\n                  renderState$jscomp$1,\n                  stringToChunk(\n                    escapeJSStringsForInstructionScripts(errorDigest || \"\")\n                  )\n                );\n            if (errorMessage || errorStack || errorComponentStack)\n              writeChunk(\n                renderState$jscomp$1,\n                clientRenderErrorScriptArgInterstitial\n              ),\n                writeChunk(\n                  renderState$jscomp$1,\n                  stringToChunk(\n                    escapeJSStringsForInstructionScripts(errorMessage || \"\")\n                  )\n                );\n            if (errorStack || errorComponentStack)\n              writeChunk(\n                renderState$jscomp$1,\n                clientRenderErrorScriptArgInterstitial\n              ),\n                writeChunk(\n                  renderState$jscomp$1,\n                  stringToChunk(\n                    escapeJSStringsForInstructionScripts(errorStack || \"\")\n                  )\n                );\n            errorComponentStack &&\n              (writeChunk(\n                renderState$jscomp$1,\n                clientRenderErrorScriptArgInterstitial\n              ),\n              writeChunk(\n                renderState$jscomp$1,\n                stringToChunk(\n                  escapeJSStringsForInstructionScripts(errorComponentStack)\n                )\n              ));\n            var JSCompiler_inline_result = writeChunkAndReturn(\n              renderState$jscomp$1,\n              clientRenderScriptEnd\n            );\n            if (!JSCompiler_inline_result) {\n              request.destination = null;\n              i++;\n              clientRenderedBoundaries.splice(0, i);\n              return;\n            }\n          }\n          clientRenderedBoundaries.splice(0, i);\n          var completedBoundaries = request.completedBoundaries;\n          for (i = 0; i < completedBoundaries.length; i++)\n            if (\n              !flushCompletedBoundary(\n                request,\n                destination,\n                completedBoundaries[i]\n              )\n            ) {\n              request.destination = null;\n              i++;\n              completedBoundaries.splice(0, i);\n              return;\n            }\n          completedBoundaries.splice(0, i);\n          completeWriting(destination);\n          currentView = new Uint8Array(2048);\n          writtenBytes = 0;\n          flushingPartialBoundaries = !0;\n          var partialBoundaries = request.partialBoundaries;\n          for (i = 0; i < partialBoundaries.length; i++) {\n            a: {\n              clientRenderedBoundaries = request;\n              boundary = destination;\n              var boundary$jscomp$0 = partialBoundaries[i];\n              flushedByteSize = boundary$jscomp$0.byteSize;\n              var completedSegments = boundary$jscomp$0.completedSegments;\n              for (\n                JSCompiler_inline_result = 0;\n                JSCompiler_inline_result < completedSegments.length;\n                JSCompiler_inline_result++\n              )\n                if (\n                  !flushPartiallyCompletedSegment(\n                    clientRenderedBoundaries,\n                    boundary,\n                    boundary$jscomp$0,\n                    completedSegments[JSCompiler_inline_result]\n                  )\n                ) {\n                  JSCompiler_inline_result++;\n                  completedSegments.splice(0, JSCompiler_inline_result);\n                  var JSCompiler_inline_result$jscomp$0 = !1;\n                  break a;\n                }\n              completedSegments.splice(0, JSCompiler_inline_result);\n              var row = boundary$jscomp$0.row;\n              null !== row &&\n                row.together &&\n                1 === boundary$jscomp$0.pendingTasks &&\n                (1 === row.pendingTasks\n                  ? unblockSuspenseListRow(\n                      clientRenderedBoundaries,\n                      row,\n                      row.hoistables\n                    )\n                  : row.pendingTasks--);\n              JSCompiler_inline_result$jscomp$0 = writeHoistablesForBoundary(\n                boundary,\n                boundary$jscomp$0.contentState,\n                clientRenderedBoundaries.renderState\n              );\n            }\n            if (!JSCompiler_inline_result$jscomp$0) {\n              request.destination = null;\n              i++;\n              partialBoundaries.splice(0, i);\n              return;\n            }\n          }\n          partialBoundaries.splice(0, i);\n          flushingPartialBoundaries = !1;\n          var largeBoundaries = request.completedBoundaries;\n          for (i = 0; i < largeBoundaries.length; i++)\n            if (\n              !flushCompletedBoundary(request, destination, largeBoundaries[i])\n            ) {\n              request.destination = null;\n              i++;\n              largeBoundaries.splice(0, i);\n              return;\n            }\n          largeBoundaries.splice(0, i);\n        }\n      } finally {\n        (flushingPartialBoundaries = !1),\n          0 === request.allPendingTasks &&\n          0 === request.clientRenderedBoundaries.length &&\n          0 === request.completedBoundaries.length\n            ? ((request.flushScheduled = !1),\n              (i = request.resumableState),\n              i.hasBody && writeChunk(destination, endChunkForTag(\"body\")),\n              i.hasHtml && writeChunk(destination, endChunkForTag(\"html\")),\n              completeWriting(destination),\n              0 !== request.abortableTasks.size &&\n                console.error(\n                  \"There was still abortable task at the root when we closed. This is a bug in React.\"\n                ),\n              (request.status = CLOSED),\n              destination.close(),\n              (request.destination = null))\n            : completeWriting(destination);\n      }\n    }\n    function startWork(request) {\n      request.flushScheduled = null !== request.destination;\n      scheduleMicrotask(function () {\n        return performWork(request);\n      });\n      scheduleWork(function () {\n        10 === request.status && (request.status = 11);\n        null === request.trackedPostpones &&\n          safelyEmitEarlyPreloads(request, 0 === request.pendingRootTasks);\n      });\n    }\n    function enqueueFlush(request) {\n      !1 === request.flushScheduled &&\n        0 === request.pingedTasks.length &&\n        null !== request.destination &&\n        ((request.flushScheduled = !0),\n        scheduleWork(function () {\n          var destination = request.destination;\n          destination\n            ? flushCompletedQueues(request, destination)\n            : (request.flushScheduled = !1);\n        }));\n    }\n    function startFlowing(request, destination) {\n      if (13 === request.status)\n        (request.status = CLOSED),\n          closeWithError(destination, request.fatalError);\n      else if (request.status !== CLOSED && null === request.destination) {\n        request.destination = destination;\n        try {\n          flushCompletedQueues(request, destination);\n        } catch (error) {\n          (destination = {}),\n            logRecoverableError(request, error, destination, null),\n            fatalError(request, error, destination, null);\n        }\n      }\n    }\n    function abort(request, reason) {\n      if (11 === request.status || 10 === request.status) request.status = 12;\n      try {\n        var abortableTasks = request.abortableTasks;\n        if (0 < abortableTasks.size) {\n          var error =\n            void 0 === reason\n              ? Error(\"The render was aborted by the server without a reason.\")\n              : \"object\" === typeof reason &&\n                  null !== reason &&\n                  \"function\" === typeof reason.then\n                ? Error(\"The render was aborted by the server with a promise.\")\n                : reason;\n          request.fatalError = error;\n          abortableTasks.forEach(function (task) {\n            var prevTaskInDEV = currentTaskInDEV,\n              prevGetCurrentStackImpl = ReactSharedInternals.getCurrentStack;\n            currentTaskInDEV = task;\n            ReactSharedInternals.getCurrentStack = getCurrentStackInDEV;\n            try {\n              abortTask(task, request, error);\n            } finally {\n              (currentTaskInDEV = prevTaskInDEV),\n                (ReactSharedInternals.getCurrentStack =\n                  prevGetCurrentStackImpl);\n            }\n          });\n          abortableTasks.clear();\n        }\n        null !== request.destination &&\n          flushCompletedQueues(request, request.destination);\n      } catch (error$4) {\n        (reason = {}),\n          logRecoverableError(request, error$4, reason, null),\n          fatalError(request, error$4, reason, null);\n      }\n    }\n    function addToReplayParent(node, parentKeyPath, trackedPostpones) {\n      if (null === parentKeyPath) trackedPostpones.rootNodes.push(node);\n      else {\n        var workingMap = trackedPostpones.workingMap,\n          parentNode = workingMap.get(parentKeyPath);\n        void 0 === parentNode &&\n          ((parentNode = [parentKeyPath[1], parentKeyPath[2], [], null]),\n          workingMap.set(parentKeyPath, parentNode),\n          addToReplayParent(parentNode, parentKeyPath[0], trackedPostpones));\n        parentNode[2].push(node);\n      }\n    }\n    function getPostponedState(request) {\n      var trackedPostpones = request.trackedPostpones;\n      if (\n        null === trackedPostpones ||\n        (0 === trackedPostpones.rootNodes.length &&\n          null === trackedPostpones.rootSlots)\n      )\n        return (request.trackedPostpones = null);\n      if (\n        null === request.completedRootSegment ||\n        (request.completedRootSegment.status !== POSTPONED &&\n          null !== request.completedPreambleSegments)\n      ) {\n        var nextSegmentId = request.nextSegmentId;\n        var replaySlots = trackedPostpones.rootSlots;\n        var resumableState = request.resumableState;\n        resumableState.bootstrapScriptContent = void 0;\n        resumableState.bootstrapScripts = void 0;\n        resumableState.bootstrapModules = void 0;\n      } else {\n        nextSegmentId = 0;\n        replaySlots = -1;\n        resumableState = request.resumableState;\n        var renderState = request.renderState;\n        resumableState.nextFormID = 0;\n        resumableState.hasBody = !1;\n        resumableState.hasHtml = !1;\n        resumableState.unknownResources = { font: renderState.resets.font };\n        resumableState.dnsResources = renderState.resets.dns;\n        resumableState.connectResources = renderState.resets.connect;\n        resumableState.imageResources = renderState.resets.image;\n        resumableState.styleResources = renderState.resets.style;\n        resumableState.scriptResources = {};\n        resumableState.moduleUnknownResources = {};\n        resumableState.moduleScriptResources = {};\n        resumableState.instructions = NothingSent;\n      }\n      return {\n        nextSegmentId: nextSegmentId,\n        rootFormatContext: request.rootFormatContext,\n        progressiveChunkSize: request.progressiveChunkSize,\n        resumableState: request.resumableState,\n        replayNodes: trackedPostpones.rootNodes,\n        replaySlots: replaySlots\n      };\n    }\n    function ensureCorrectIsomorphicReactVersion() {\n      var isomorphicReactPackageVersion = React.version;\n      if (\"19.2.8\" !== isomorphicReactPackageVersion)\n        throw Error(\n          'Incompatible React versions: The \"react\" and \"react-dom\" packages must have the exact same version. Instead got:\\n  - react:      ' +\n            (isomorphicReactPackageVersion +\n              \"\\n  - react-dom:  19.2.8\\nLearn more: https://react.dev/warnings/version-mismatch\")\n        );\n    }\n    var React = require(\"react\"),\n      ReactDOM = require(\"react-dom\"),\n      REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n      REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n      REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n      REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n      REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n      REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n      REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n      REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n      REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n      REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n      REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n      REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n      REACT_SCOPE_TYPE = Symbol.for(\"react.scope\"),\n      REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n      REACT_LEGACY_HIDDEN_TYPE = Symbol.for(\"react.legacy_hidden\"),\n      REACT_MEMO_CACHE_SENTINEL = Symbol.for(\"react.memo_cache_sentinel\"),\n      REACT_VIEW_TRANSITION_TYPE = Symbol.for(\"react.view_transition\"),\n      MAYBE_ITERATOR_SYMBOL = Symbol.iterator,\n      isArrayImpl = Array.isArray,\n      jsxPropsParents = new WeakMap(),\n      jsxChildrenParents = new WeakMap(),\n      CLIENT_REFERENCE_TAG = Symbol.for(\"react.client.reference\"),\n      channel = new MessageChannel(),\n      taskQueue = [];\n    channel.port1.onmessage = function () {\n      var task = taskQueue.shift();\n      task && task();\n    };\n    var LocalPromise = Promise,\n      scheduleMicrotask =\n        \"function\" === typeof queueMicrotask\n          ? queueMicrotask\n          : function (callback) {\n              LocalPromise.resolve(null)\n                .then(callback)\n                .catch(handleErrorInNextTick);\n            },\n      currentView = null,\n      writtenBytes = 0,\n      textEncoder = new TextEncoder(),\n      assign = Object.assign,\n      hasOwnProperty = Object.prototype.hasOwnProperty,\n      VALID_ATTRIBUTE_NAME_REGEX = RegExp(\n        \"^[:A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD][:A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040]*$\"\n      ),\n      illegalAttributeNameCache = {},\n      validatedAttributeNameCache = {},\n      unitlessNumbers = new Set(\n        \"animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp\".split(\n          \" \"\n        )\n      ),\n      aliases = new Map([\n        [\"acceptCharset\", \"accept-charset\"],\n        [\"htmlFor\", \"for\"],\n        [\"httpEquiv\", \"http-equiv\"],\n        [\"crossOrigin\", \"crossorigin\"],\n        [\"accentHeight\", \"accent-height\"],\n        [\"alignmentBaseline\", \"alignment-baseline\"],\n        [\"arabicForm\", \"arabic-form\"],\n        [\"baselineShift\", \"baseline-shift\"],\n        [\"capHeight\", \"cap-height\"],\n        [\"clipPath\", \"clip-path\"],\n        [\"clipRule\", \"clip-rule\"],\n        [\"colorInterpolation\", \"color-interpolation\"],\n        [\"colorInterpolationFilters\", \"color-interpolation-filters\"],\n        [\"colorProfile\", \"color-profile\"],\n        [\"colorRendering\", \"color-rendering\"],\n        [\"dominantBaseline\", \"dominant-baseline\"],\n        [\"enableBackground\", \"enable-background\"],\n        [\"fillOpacity\", \"fill-opacity\"],\n        [\"fillRule\", \"fill-rule\"],\n        [\"floodColor\", \"flood-color\"],\n        [\"floodOpacity\", \"flood-opacity\"],\n        [\"fontFamily\", \"font-family\"],\n        [\"fontSize\", \"font-size\"],\n        [\"fontSizeAdjust\", \"font-size-adjust\"],\n        [\"fontStretch\", \"font-stretch\"],\n        [\"fontStyle\", \"font-style\"],\n        [\"fontVariant\", \"font-variant\"],\n        [\"fontWeight\", \"font-weight\"],\n        [\"glyphName\", \"glyph-name\"],\n        [\"glyphOrientationHorizontal\", \"glyph-orientation-horizontal\"],\n        [\"glyphOrientationVertical\", \"glyph-orientation-vertical\"],\n        [\"horizAdvX\", \"horiz-adv-x\"],\n        [\"horizOriginX\", \"horiz-origin-x\"],\n        [\"imageRendering\", \"image-rendering\"],\n        [\"letterSpacing\", \"letter-spacing\"],\n        [\"lightingColor\", \"lighting-color\"],\n        [\"markerEnd\", \"marker-end\"],\n        [\"markerMid\", \"marker-mid\"],\n        [\"markerStart\", \"marker-start\"],\n        [\"overlinePosition\", \"overline-position\"],\n        [\"overlineThickness\", \"overline-thickness\"],\n        [\"paintOrder\", \"paint-order\"],\n        [\"panose-1\", \"panose-1\"],\n        [\"pointerEvents\", \"pointer-events\"],\n        [\"renderingIntent\", \"rendering-intent\"],\n        [\"shapeRendering\", \"shape-rendering\"],\n        [\"stopColor\", \"stop-color\"],\n        [\"stopOpacity\", \"stop-opacity\"],\n        [\"strikethroughPosition\", \"strikethrough-position\"],\n        [\"strikethroughThickness\", \"strikethrough-thickness\"],\n        [\"strokeDasharray\", \"stroke-dasharray\"],\n        [\"strokeDashoffset\", \"stroke-dashoffset\"],\n        [\"strokeLinecap\", \"stroke-linecap\"],\n        [\"strokeLinejoin\", \"stroke-linejoin\"],\n        [\"strokeMiterlimit\", \"stroke-miterlimit\"],\n        [\"strokeOpacity\", \"stroke-opacity\"],\n        [\"strokeWidth\", \"stroke-width\"],\n        [\"textAnchor\", \"text-anchor\"],\n        [\"textDecoration\", \"text-decoration\"],\n        [\"textRendering\", \"text-rendering\"],\n        [\"transformOrigin\", \"transform-origin\"],\n        [\"underlinePosition\", \"underline-position\"],\n        [\"underlineThickness\", \"underline-thickness\"],\n        [\"unicodeBidi\", \"unicode-bidi\"],\n        [\"unicodeRange\", \"unicode-range\"],\n        [\"unitsPerEm\", \"units-per-em\"],\n        [\"vAlphabetic\", \"v-alphabetic\"],\n        [\"vHanging\", \"v-hanging\"],\n        [\"vIdeographic\", \"v-ideographic\"],\n        [\"vMathematical\", \"v-mathematical\"],\n        [\"vectorEffect\", \"vector-effect\"],\n        [\"vertAdvY\", \"vert-adv-y\"],\n        [\"vertOriginX\", \"vert-origin-x\"],\n        [\"vertOriginY\", \"vert-origin-y\"],\n        [\"wordSpacing\", \"word-spacing\"],\n        [\"writingMode\", \"writing-mode\"],\n        [\"xmlnsXlink\", \"xmlns:xlink\"],\n        [\"xHeight\", \"x-height\"]\n      ]),\n      hasReadOnlyValue = {\n        button: !0,\n        checkbox: !0,\n        image: !0,\n        hidden: !0,\n        radio: !0,\n        reset: !0,\n        submit: !0\n      },\n      ariaProperties = {\n        \"aria-current\": 0,\n        \"aria-description\": 0,\n        \"aria-details\": 0,\n        \"aria-disabled\": 0,\n        \"aria-hidden\": 0,\n        \"aria-invalid\": 0,\n        \"aria-keyshortcuts\": 0,\n        \"aria-label\": 0,\n        \"aria-roledescription\": 0,\n        \"aria-autocomplete\": 0,\n        \"aria-checked\": 0,\n        \"aria-expanded\": 0,\n        \"aria-haspopup\": 0,\n        \"aria-level\": 0,\n        \"aria-modal\": 0,\n        \"aria-multiline\": 0,\n        \"aria-multiselectable\": 0,\n        \"aria-orientation\": 0,\n        \"aria-placeholder\": 0,\n        \"aria-pressed\": 0,\n        \"aria-readonly\": 0,\n        \"aria-required\": 0,\n        \"aria-selected\": 0,\n        \"aria-sort\": 0,\n        \"aria-valuemax\": 0,\n        \"aria-valuemin\": 0,\n        \"aria-valuenow\": 0,\n        \"aria-valuetext\": 0,\n        \"aria-atomic\": 0,\n        \"aria-busy\": 0,\n        \"aria-live\": 0,\n        \"aria-relevant\": 0,\n        \"aria-dropeffect\": 0,\n        \"aria-grabbed\": 0,\n        \"aria-activedescendant\": 0,\n        \"aria-colcount\": 0,\n        \"aria-colindex\": 0,\n        \"aria-colspan\": 0,\n        \"aria-controls\": 0,\n        \"aria-describedby\": 0,\n        \"aria-errormessage\": 0,\n        \"aria-flowto\": 0,\n        \"aria-labelledby\": 0,\n        \"aria-owns\": 0,\n        \"aria-posinset\": 0,\n        \"aria-rowcount\": 0,\n        \"aria-rowindex\": 0,\n        \"aria-rowspan\": 0,\n        \"aria-setsize\": 0,\n        \"aria-braillelabel\": 0,\n        \"aria-brailleroledescription\": 0,\n        \"aria-colindextext\": 0,\n        \"aria-rowindextext\": 0\n      },\n      warnedProperties$1 = {},\n      rARIA$1 = RegExp(\n        \"^(aria)-[:A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040]*$\"\n      ),\n      rARIACamel$1 = RegExp(\n        \"^(aria)[A-Z][:A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040]*$\"\n      ),\n      didWarnValueNull = !1,\n      possibleStandardNames = {\n        accept: \"accept\",\n        acceptcharset: \"acceptCharset\",\n        \"accept-charset\": \"acceptCharset\",\n        accesskey: \"accessKey\",\n        action: \"action\",\n        allowfullscreen: \"allowFullScreen\",\n        alt: \"alt\",\n        as: \"as\",\n        async: \"async\",\n        autocapitalize: \"autoCapitalize\",\n        autocomplete: \"autoComplete\",\n        autocorrect: \"autoCorrect\",\n        autofocus: \"autoFocus\",\n        autoplay: \"autoPlay\",\n        autosave: \"autoSave\",\n        capture: \"capture\",\n        cellpadding: \"cellPadding\",\n        cellspacing: \"cellSpacing\",\n        challenge: \"challenge\",\n        charset: \"charSet\",\n        checked: \"checked\",\n        children: \"children\",\n        cite: \"cite\",\n        class: \"className\",\n        classid: \"classID\",\n        classname: \"className\",\n        cols: \"cols\",\n        colspan: \"colSpan\",\n        content: \"content\",\n        contenteditable: \"contentEditable\",\n        contextmenu: \"contextMenu\",\n        controls: \"controls\",\n        controlslist: \"controlsList\",\n        coords: \"coords\",\n        crossorigin: \"crossOrigin\",\n        dangerouslysetinnerhtml: \"dangerouslySetInnerHTML\",\n        data: \"data\",\n        datetime: \"dateTime\",\n        default: \"default\",\n        defaultchecked: \"defaultChecked\",\n        defaultvalue: \"defaultValue\",\n        defer: \"defer\",\n        dir: \"dir\",\n        disabled: \"disabled\",\n        disablepictureinpicture: \"disablePictureInPicture\",\n        disableremoteplayback: \"disableRemotePlayback\",\n        download: \"download\",\n        draggable: \"draggable\",\n        enctype: \"encType\",\n        enterkeyhint: \"enterKeyHint\",\n        fetchpriority: \"fetchPriority\",\n        for: \"htmlFor\",\n        form: \"form\",\n        formmethod: \"formMethod\",\n        formaction: \"formAction\",\n        formenctype: \"formEncType\",\n        formnovalidate: \"formNoValidate\",\n        formtarget: \"formTarget\",\n        frameborder: \"frameBorder\",\n        headers: \"headers\",\n        height: \"height\",\n        hidden: \"hidden\",\n        high: \"high\",\n        href: \"href\",\n        hreflang: \"hrefLang\",\n        htmlfor: \"htmlFor\",\n        httpequiv: \"httpEquiv\",\n        \"http-equiv\": \"httpEquiv\",\n        icon: \"icon\",\n        id: \"id\",\n        imagesizes: \"imageSizes\",\n        imagesrcset: \"imageSrcSet\",\n        inert: \"inert\",\n        innerhtml: \"innerHTML\",\n        inputmode: \"inputMode\",\n        integrity: \"integrity\",\n        is: \"is\",\n        itemid: \"itemID\",\n        itemprop: \"itemProp\",\n        itemref: \"itemRef\",\n        itemscope: \"itemScope\",\n        itemtype: \"itemType\",\n        keyparams: \"keyParams\",\n        keytype: \"keyType\",\n        kind: \"kind\",\n        label: \"label\",\n        lang: \"lang\",\n        list: \"list\",\n        loop: \"loop\",\n        low: \"low\",\n        manifest: \"manifest\",\n        marginwidth: \"marginWidth\",\n        marginheight: \"marginHeight\",\n        max: \"max\",\n        maxlength: \"maxLength\",\n        media: \"media\",\n        mediagroup: \"mediaGroup\",\n        method: \"method\",\n        min: \"min\",\n        minlength: \"minLength\",\n        multiple: \"multiple\",\n        muted: \"muted\",\n        name: \"name\",\n        nomodule: \"noModule\",\n        nonce: \"nonce\",\n        novalidate: \"noValidate\",\n        open: \"open\",\n        optimum: \"optimum\",\n        pattern: \"pattern\",\n        placeholder: \"placeholder\",\n        playsinline: \"playsInline\",\n        poster: \"poster\",\n        preload: \"preload\",\n        profile: \"profile\",\n        radiogroup: \"radioGroup\",\n        readonly: \"readOnly\",\n        referrerpolicy: \"referrerPolicy\",\n        rel: \"rel\",\n        required: \"required\",\n        reversed: \"reversed\",\n        role: \"role\",\n        rows: \"rows\",\n        rowspan: \"rowSpan\",\n        sandbox: \"sandbox\",\n        scope: \"scope\",\n        scoped: \"scoped\",\n        scrolling: \"scrolling\",\n        seamless: \"seamless\",\n        selected: \"selected\",\n        shape: \"shape\",\n        size: \"size\",\n        sizes: \"sizes\",\n        span: \"span\",\n        spellcheck: \"spellCheck\",\n        src: \"src\",\n        srcdoc: \"srcDoc\",\n        srclang: \"srcLang\",\n        srcset: \"srcSet\",\n        start: \"start\",\n        step: \"step\",\n        style: \"style\",\n        summary: \"summary\",\n        tabindex: \"tabIndex\",\n        target: \"target\",\n        title: \"title\",\n        type: \"type\",\n        usemap: \"useMap\",\n        value: \"value\",\n        width: \"width\",\n        wmode: \"wmode\",\n        wrap: \"wrap\",\n        about: \"about\",\n        accentheight: \"accentHeight\",\n        \"accent-height\": \"accentHeight\",\n        accumulate: \"accumulate\",\n        additive: \"additive\",\n        alignmentbaseline: \"alignmentBaseline\",\n        \"alignment-baseline\": \"alignmentBaseline\",\n        allowreorder: \"allowReorder\",\n        alphabetic: \"alphabetic\",\n        amplitude: \"amplitude\",\n        arabicform: \"arabicForm\",\n        \"arabic-form\": \"arabicForm\",\n        ascent: \"ascent\",\n        attributename: \"attributeName\",\n        attributetype: \"attributeType\",\n        autoreverse: \"autoReverse\",\n        azimuth: \"azimuth\",\n        basefrequency: \"baseFrequency\",\n        baselineshift: \"baselineShift\",\n        \"baseline-shift\": \"baselineShift\",\n        baseprofile: \"baseProfile\",\n        bbox: \"bbox\",\n        begin: \"begin\",\n        bias: \"bias\",\n        by: \"by\",\n        calcmode: \"calcMode\",\n        capheight: \"capHeight\",\n        \"cap-height\": \"capHeight\",\n        clip: \"clip\",\n        clippath: \"clipPath\",\n        \"clip-path\": \"clipPath\",\n        clippathunits: \"clipPathUnits\",\n        cliprule: \"clipRule\",\n        \"clip-rule\": \"clipRule\",\n        color: \"color\",\n        colorinterpolation: \"colorInterpolation\",\n        \"color-interpolation\": \"colorInterpolation\",\n        colorinterpolationfilters: \"colorInterpolationFilters\",\n        \"color-interpolation-filters\": \"colorInterpolationFilters\",\n        colorprofile: \"colorProfile\",\n        \"color-profile\": \"colorProfile\",\n        colorrendering: \"colorRendering\",\n        \"color-rendering\": \"colorRendering\",\n        contentscripttype: \"contentScriptType\",\n        contentstyletype: \"contentStyleType\",\n        cursor: \"cursor\",\n        cx: \"cx\",\n        cy: \"cy\",\n        d: \"d\",\n        datatype: \"datatype\",\n        decelerate: \"decelerate\",\n        descent: \"descent\",\n        diffuseconstant: \"diffuseConstant\",\n        direction: \"direction\",\n        display: \"display\",\n        divisor: \"divisor\",\n        dominantbaseline: \"dominantBaseline\",\n        \"dominant-baseline\": \"dominantBaseline\",\n        dur: \"dur\",\n        dx: \"dx\",\n        dy: \"dy\",\n        edgemode: \"edgeMode\",\n        elevation: \"elevation\",\n        enablebackground: \"enableBackground\",\n        \"enable-background\": \"enableBackground\",\n        end: \"end\",\n        exponent: \"exponent\",\n        externalresourcesrequired: \"externalResourcesRequired\",\n        fill: \"fill\",\n        fillopacity: \"fillOpacity\",\n        \"fill-opacity\": \"fillOpacity\",\n        fillrule: \"fillRule\",\n        \"fill-rule\": \"fillRule\",\n        filter: \"filter\",\n        filterres: \"filterRes\",\n        filterunits: \"filterUnits\",\n        floodopacity: \"floodOpacity\",\n        \"flood-opacity\": \"floodOpacity\",\n        floodcolor: \"floodColor\",\n        \"flood-color\": \"floodColor\",\n        focusable: \"focusable\",\n        fontfamily: \"fontFamily\",\n        \"font-family\": \"fontFamily\",\n        fontsize: \"fontSize\",\n        \"font-size\": \"fontSize\",\n        fontsizeadjust: \"fontSizeAdjust\",\n        \"font-size-adjust\": \"fontSizeAdjust\",\n        fontstretch: \"fontStretch\",\n        \"font-stretch\": \"fontStretch\",\n        fontstyle: \"fontStyle\",\n        \"font-style\": \"fontStyle\",\n        fontvariant: \"fontVariant\",\n        \"font-variant\": \"fontVariant\",\n        fontweight: \"fontWeight\",\n        \"font-weight\": \"fontWeight\",\n        format: \"format\",\n        from: \"from\",\n        fx: \"fx\",\n        fy: \"fy\",\n        g1: \"g1\",\n        g2: \"g2\",\n        glyphname: \"glyphName\",\n        \"glyph-name\": \"glyphName\",\n        glyphorientationhorizontal: \"glyphOrientationHorizontal\",\n        \"glyph-orientation-horizontal\": \"glyphOrientationHorizontal\",\n        glyphorientationvertical: \"glyphOrientationVertical\",\n        \"glyph-orientation-vertical\": \"glyphOrientationVertical\",\n        glyphref: \"glyphRef\",\n        gradienttransform: \"gradientTransform\",\n        gradientunits: \"gradientUnits\",\n        hanging: \"hanging\",\n        horizadvx: \"horizAdvX\",\n        \"horiz-adv-x\": \"horizAdvX\",\n        horizoriginx: \"horizOriginX\",\n        \"horiz-origin-x\": \"horizOriginX\",\n        ideographic: \"ideographic\",\n        imagerendering: \"imageRendering\",\n        \"image-rendering\": \"imageRendering\",\n        in2: \"in2\",\n        in: \"in\",\n        inlist: \"inlist\",\n        intercept: \"intercept\",\n        k1: \"k1\",\n        k2: \"k2\",\n        k3: \"k3\",\n        k4: \"k4\",\n        k: \"k\",\n        kernelmatrix: \"kernelMatrix\",\n        kernelunitlength: \"kernelUnitLength\",\n        kerning: \"kerning\",\n        keypoints: \"keyPoints\",\n        keysplines: \"keySplines\",\n        keytimes: \"keyTimes\",\n        lengthadjust: \"lengthAdjust\",\n        letterspacing: \"letterSpacing\",\n        \"letter-spacing\": \"letterSpacing\",\n        lightingcolor: \"lightingColor\",\n        \"lighting-color\": \"lightingColor\",\n        limitingconeangle: \"limitingConeAngle\",\n        local: \"local\",\n        markerend: \"markerEnd\",\n        \"marker-end\": \"markerEnd\",\n        markerheight: \"markerHeight\",\n        markermid: \"markerMid\",\n        \"marker-mid\": \"markerMid\",\n        markerstart: \"markerStart\",\n        \"marker-start\": \"markerStart\",\n        markerunits: \"markerUnits\",\n        markerwidth: \"markerWidth\",\n        mask: \"mask\",\n        maskcontentunits: \"maskContentUnits\",\n        maskunits: \"maskUnits\",\n        mathematical: \"mathematical\",\n        mode: \"mode\",\n        numoctaves: \"numOctaves\",\n        offset: \"offset\",\n        opacity: \"opacity\",\n        operator: \"operator\",\n        order: \"order\",\n        orient: \"orient\",\n        orientation: \"orientation\",\n        origin: \"origin\",\n        overflow: \"overflow\",\n        overlineposition: \"overlinePosition\",\n        \"overline-position\": \"overlinePosition\",\n        overlinethickness: \"overlineThickness\",\n        \"overline-thickness\": \"overlineThickness\",\n        paintorder: \"paintOrder\",\n        \"paint-order\": \"paintOrder\",\n        panose1: \"panose1\",\n        \"panose-1\": \"panose1\",\n        pathlength: \"pathLength\",\n        patterncontentunits: \"patternContentUnits\",\n        patterntransform: \"patternTransform\",\n        patternunits: \"patternUnits\",\n        pointerevents: \"pointerEvents\",\n        \"pointer-events\": \"pointerEvents\",\n        points: \"points\",\n        pointsatx: \"pointsAtX\",\n        pointsaty: \"pointsAtY\",\n        pointsatz: \"pointsAtZ\",\n        popover: \"popover\",\n        popovertarget: \"popoverTarget\",\n        popovertargetaction: \"popoverTargetAction\",\n        prefix: \"prefix\",\n        preservealpha: \"preserveAlpha\",\n        preserveaspectratio: \"preserveAspectRatio\",\n        primitiveunits: \"primitiveUnits\",\n        property: \"property\",\n        r: \"r\",\n        radius: \"radius\",\n        refx: \"refX\",\n        refy: \"refY\",\n        renderingintent: \"renderingIntent\",\n        \"rendering-intent\": \"renderingIntent\",\n        repeatcount: \"repeatCount\",\n        repeatdur: \"repeatDur\",\n        requiredextensions: \"requiredExtensions\",\n        requiredfeatures: \"requiredFeatures\",\n        resource: \"resource\",\n        restart: \"restart\",\n        result: \"result\",\n        results: \"results\",\n        rotate: \"rotate\",\n        rx: \"rx\",\n        ry: \"ry\",\n        scale: \"scale\",\n        security: \"security\",\n        seed: \"seed\",\n        shaperendering: \"shapeRendering\",\n        \"shape-rendering\": \"shapeRendering\",\n        slope: \"slope\",\n        spacing: \"spacing\",\n        specularconstant: \"specularConstant\",\n        specularexponent: \"specularExponent\",\n        speed: \"speed\",\n        spreadmethod: \"spreadMethod\",\n        startoffset: \"startOffset\",\n        stddeviation: \"stdDeviation\",\n        stemh: \"stemh\",\n        stemv: \"stemv\",\n        stitchtiles: \"stitchTiles\",\n        stopcolor: \"stopColor\",\n        \"stop-color\": \"stopColor\",\n        stopopacity: \"stopOpacity\",\n        \"stop-opacity\": \"stopOpacity\",\n        strikethroughposition: \"strikethroughPosition\",\n        \"strikethrough-position\": \"strikethroughPosition\",\n        strikethroughthickness: \"strikethroughThickness\",\n        \"strikethrough-thickness\": \"strikethroughThickness\",\n        string: \"string\",\n        stroke: \"stroke\",\n        strokedasharray: \"strokeDasharray\",\n        \"stroke-dasharray\": \"strokeDasharray\",\n        strokedashoffset: \"strokeDashoffset\",\n        \"stroke-dashoffset\": \"strokeDashoffset\",\n        strokelinecap: \"strokeLinecap\",\n        \"stroke-linecap\": \"strokeLinecap\",\n        strokelinejoin: \"strokeLinejoin\",\n        \"stroke-linejoin\": \"strokeLinejoin\",\n        strokemiterlimit: \"strokeMiterlimit\",\n        \"stroke-miterlimit\": \"strokeMiterlimit\",\n        strokewidth: \"strokeWidth\",\n        \"stroke-width\": \"strokeWidth\",\n        strokeopacity: \"strokeOpacity\",\n        \"stroke-opacity\": \"strokeOpacity\",\n        suppresscontenteditablewarning: \"suppressContentEditableWarning\",\n        suppresshydrationwarning: \"suppressHydrationWarning\",\n        surfacescale: \"surfaceScale\",\n        systemlanguage: \"systemLanguage\",\n        tablevalues: \"tableValues\",\n        targetx: \"targetX\",\n        targety: \"targetY\",\n        textanchor: \"textAnchor\",\n        \"text-anchor\": \"textAnchor\",\n        textdecoration: \"textDecoration\",\n        \"text-decoration\": \"textDecoration\",\n        textlength: \"textLength\",\n        textrendering: \"textRendering\",\n        \"text-rendering\": \"textRendering\",\n        to: \"to\",\n        transform: \"transform\",\n        transformorigin: \"transformOrigin\",\n        \"transform-origin\": \"transformOrigin\",\n        typeof: \"typeof\",\n        u1: \"u1\",\n        u2: \"u2\",\n        underlineposition: \"underlinePosition\",\n        \"underline-position\": \"underlinePosition\",\n        underlinethickness: \"underlineThickness\",\n        \"underline-thickness\": \"underlineThickness\",\n        unicode: \"unicode\",\n        unicodebidi: \"unicodeBidi\",\n        \"unicode-bidi\": \"unicodeBidi\",\n        unicoderange: \"unicodeRange\",\n        \"unicode-range\": \"unicodeRange\",\n        unitsperem: \"unitsPerEm\",\n        \"units-per-em\": \"unitsPerEm\",\n        unselectable: \"unselectable\",\n        valphabetic: \"vAlphabetic\",\n        \"v-alphabetic\": \"vAlphabetic\",\n        values: \"values\",\n        vectoreffect: \"vectorEffect\",\n        \"vector-effect\": \"vectorEffect\",\n        version: \"version\",\n        vertadvy: \"vertAdvY\",\n        \"vert-adv-y\": \"vertAdvY\",\n        vertoriginx: \"vertOriginX\",\n        \"vert-origin-x\": \"vertOriginX\",\n        vertoriginy: \"vertOriginY\",\n        \"vert-origin-y\": \"vertOriginY\",\n        vhanging: \"vHanging\",\n        \"v-hanging\": \"vHanging\",\n        videographic: \"vIdeographic\",\n        \"v-ideographic\": \"vIdeographic\",\n        viewbox: \"viewBox\",\n        viewtarget: \"viewTarget\",\n        visibility: \"visibility\",\n        vmathematical: \"vMathematical\",\n        \"v-mathematical\": \"vMathematical\",\n        vocab: \"vocab\",\n        widths: \"widths\",\n        wordspacing: \"wordSpacing\",\n        \"word-spacing\": \"wordSpacing\",\n        writingmode: \"writingMode\",\n        \"writing-mode\": \"writingMode\",\n        x1: \"x1\",\n        x2: \"x2\",\n        x: \"x\",\n        xchannelselector: \"xChannelSelector\",\n        xheight: \"xHeight\",\n        \"x-height\": \"xHeight\",\n        xlinkactuate: \"xlinkActuate\",\n        \"xlink:actuate\": \"xlinkActuate\",\n        xlinkarcrole: \"xlinkArcrole\",\n        \"xlink:arcrole\": \"xlinkArcrole\",\n        xlinkhref: \"xlinkHref\",\n        \"xlink:href\": \"xlinkHref\",\n        xlinkrole: \"xlinkRole\",\n        \"xlink:role\": \"xlinkRole\",\n        xlinkshow: \"xlinkShow\",\n        \"xlink:show\": \"xlinkShow\",\n        xlinktitle: \"xlinkTitle\",\n        \"xlink:title\": \"xlinkTitle\",\n        xlinktype: \"xlinkType\",\n        \"xlink:type\": \"xlinkType\",\n        xmlbase: \"xmlBase\",\n        \"xml:base\": \"xmlBase\",\n        xmllang: \"xmlLang\",\n        \"xml:lang\": \"xmlLang\",\n        xmlns: \"xmlns\",\n        \"xml:space\": \"xmlSpace\",\n        xmlnsxlink: \"xmlnsXlink\",\n        \"xmlns:xlink\": \"xmlnsXlink\",\n        xmlspace: \"xmlSpace\",\n        y1: \"y1\",\n        y2: \"y2\",\n        y: \"y\",\n        ychannelselector: \"yChannelSelector\",\n        z: \"z\",\n        zoomandpan: \"zoomAndPan\"\n      },\n      warnedProperties = {},\n      EVENT_NAME_REGEX = /^on./,\n      INVALID_EVENT_NAME_REGEX = /^on[^A-Z]/,\n      rARIA = RegExp(\n        \"^(aria)-[:A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040]*$\"\n      ),\n      rARIACamel = RegExp(\n        \"^(aria)[A-Z][:A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040]*$\"\n      ),\n      badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/,\n      msPattern$1 = /^-ms-/,\n      hyphenPattern = /-(.)/g,\n      badStyleValueWithSemicolonPattern = /;\\s*$/,\n      warnedStyleNames = {},\n      warnedStyleValues = {},\n      warnedForNaNValue = !1,\n      warnedForInfinityValue = !1,\n      matchHtmlRegExp = /[\"'&<>]/,\n      uppercasePattern = /([A-Z])/g,\n      msPattern = /^ms-/,\n      isJavaScriptProtocol =\n        /^[\\u0000-\\u001F ]*j[\\r\\n\\t]*a[\\r\\n\\t]*v[\\r\\n\\t]*a[\\r\\n\\t]*s[\\r\\n\\t]*c[\\r\\n\\t]*r[\\r\\n\\t]*i[\\r\\n\\t]*p[\\r\\n\\t]*t[\\r\\n\\t]*:/i,\n      ReactSharedInternals =\n        React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,\n      ReactDOMSharedInternals =\n        ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,\n      NotPending = Object.freeze({\n        pending: !1,\n        data: null,\n        method: null,\n        action: null\n      }),\n      previousDispatcher = ReactDOMSharedInternals.d;\n    ReactDOMSharedInternals.d = {\n      f: previousDispatcher.f,\n      r: previousDispatcher.r,\n      D: function (href) {\n        var request = currentRequest ? currentRequest : null;\n        if (request) {\n          var resumableState = request.resumableState,\n            renderState = request.renderState;\n          if (\"string\" === typeof href && href) {\n            if (!resumableState.dnsResources.hasOwnProperty(href)) {\n              resumableState.dnsResources[href] = EXISTS;\n              resumableState = renderState.headers;\n              var header, JSCompiler_temp;\n              if (\n                (JSCompiler_temp =\n                  resumableState && 0 < resumableState.remainingCapacity)\n              )\n                JSCompiler_temp =\n                  ((header =\n                    \"<\" +\n                    escapeHrefForLinkHeaderURLContext(href) +\n                    \">; rel=dns-prefetch\"),\n                  0 <= (resumableState.remainingCapacity -= header.length + 2));\n              JSCompiler_temp\n                ? ((renderState.resets.dns[href] = EXISTS),\n                  resumableState.preconnects &&\n                    (resumableState.preconnects += \", \"),\n                  (resumableState.preconnects += header))\n                : ((header = []),\n                  pushLinkImpl(header, { href: href, rel: \"dns-prefetch\" }),\n                  renderState.preconnects.add(header));\n            }\n            enqueueFlush(request);\n          }\n        } else previousDispatcher.D(href);\n      },\n      C: function (href, crossOrigin) {\n        var request = currentRequest ? currentRequest : null;\n        if (request) {\n          var resumableState = request.resumableState,\n            renderState = request.renderState;\n          if (\"string\" === typeof href && href) {\n            var bucket =\n              \"use-credentials\" === crossOrigin\n                ? \"credentials\"\n                : \"string\" === typeof crossOrigin\n                  ? \"anonymous\"\n                  : \"default\";\n            if (!resumableState.connectResources[bucket].hasOwnProperty(href)) {\n              resumableState.connectResources[bucket][href] = EXISTS;\n              resumableState = renderState.headers;\n              var header, JSCompiler_temp;\n              if (\n                (JSCompiler_temp =\n                  resumableState && 0 < resumableState.remainingCapacity)\n              ) {\n                JSCompiler_temp =\n                  \"<\" +\n                  escapeHrefForLinkHeaderURLContext(href) +\n                  \">; rel=preconnect\";\n                if (\"string\" === typeof crossOrigin) {\n                  var escapedCrossOrigin =\n                    escapeStringForLinkHeaderQuotedParamValueContext(\n                      crossOrigin,\n                      \"crossOrigin\"\n                    );\n                  JSCompiler_temp +=\n                    '; crossorigin=\"' + escapedCrossOrigin + '\"';\n                }\n                JSCompiler_temp =\n                  ((header = JSCompiler_temp),\n                  0 <= (resumableState.remainingCapacity -= header.length + 2));\n              }\n              JSCompiler_temp\n                ? ((renderState.resets.connect[bucket][href] = EXISTS),\n                  resumableState.preconnects &&\n                    (resumableState.preconnects += \", \"),\n                  (resumableState.preconnects += header))\n                : ((bucket = []),\n                  pushLinkImpl(bucket, {\n                    rel: \"preconnect\",\n                    href: href,\n                    crossOrigin: crossOrigin\n                  }),\n                  renderState.preconnects.add(bucket));\n            }\n            enqueueFlush(request);\n          }\n        } else previousDispatcher.C(href, crossOrigin);\n      },\n      L: function (href, as, options) {\n        var request = currentRequest ? currentRequest : null;\n        if (request) {\n          var resumableState = request.resumableState,\n            renderState = request.renderState;\n          if (as && href) {\n            switch (as) {\n              case \"image\":\n                if (options) {\n                  var imageSrcSet = options.imageSrcSet;\n                  var imageSizes = options.imageSizes;\n                  var fetchPriority = options.fetchPriority;\n                }\n                var key = imageSrcSet\n                  ? imageSrcSet + \"\\n\" + (imageSizes || \"\")\n                  : href;\n                if (resumableState.imageResources.hasOwnProperty(key)) return;\n                resumableState.imageResources[key] = PRELOAD_NO_CREDS;\n                resumableState = renderState.headers;\n                var header;\n                resumableState &&\n                0 < resumableState.remainingCapacity &&\n                \"string\" !== typeof imageSrcSet &&\n                \"high\" === fetchPriority &&\n                ((header = getPreloadAsHeader(href, as, options)),\n                0 <= (resumableState.remainingCapacity -= header.length + 2))\n                  ? ((renderState.resets.image[key] = PRELOAD_NO_CREDS),\n                    resumableState.highImagePreloads &&\n                      (resumableState.highImagePreloads += \", \"),\n                    (resumableState.highImagePreloads += header))\n                  : ((resumableState = []),\n                    pushLinkImpl(\n                      resumableState,\n                      assign(\n                        {\n                          rel: \"preload\",\n                          href: imageSrcSet ? void 0 : href,\n                          as: as\n                        },\n                        options\n                      )\n                    ),\n                    \"high\" === fetchPriority\n                      ? renderState.highImagePreloads.add(resumableState)\n                      : (renderState.bulkPreloads.add(resumableState),\n                        renderState.preloads.images.set(key, resumableState)));\n                break;\n              case \"style\":\n                if (resumableState.styleResources.hasOwnProperty(href)) return;\n                imageSrcSet = [];\n                pushLinkImpl(\n                  imageSrcSet,\n                  assign({ rel: \"preload\", href: href, as: as }, options)\n                );\n                resumableState.styleResources[href] =\n                  !options ||\n                  (\"string\" !== typeof options.crossOrigin &&\n                    \"string\" !== typeof options.integrity)\n                    ? PRELOAD_NO_CREDS\n                    : [options.crossOrigin, options.integrity];\n                renderState.preloads.stylesheets.set(href, imageSrcSet);\n                renderState.bulkPreloads.add(imageSrcSet);\n                break;\n              case \"script\":\n                if (resumableState.scriptResources.hasOwnProperty(href)) return;\n                imageSrcSet = [];\n                renderState.preloads.scripts.set(href, imageSrcSet);\n                renderState.bulkPreloads.add(imageSrcSet);\n                pushLinkImpl(\n                  imageSrcSet,\n                  assign({ rel: \"preload\", href: href, as: as }, options)\n                );\n                resumableState.scriptResources[href] =\n                  !options ||\n                  (\"string\" !== typeof options.crossOrigin &&\n                    \"string\" !== typeof options.integrity)\n                    ? PRELOAD_NO_CREDS\n                    : [options.crossOrigin, options.integrity];\n                break;\n              default:\n                if (resumableState.unknownResources.hasOwnProperty(as)) {\n                  if (\n                    ((imageSrcSet = resumableState.unknownResources[as]),\n                    imageSrcSet.hasOwnProperty(href))\n                  )\n                    return;\n                } else\n                  (imageSrcSet = {}),\n                    (resumableState.unknownResources[as] = imageSrcSet);\n                imageSrcSet[href] = PRELOAD_NO_CREDS;\n                if (\n                  (resumableState = renderState.headers) &&\n                  0 < resumableState.remainingCapacity &&\n                  \"font\" === as &&\n                  ((key = getPreloadAsHeader(href, as, options)),\n                  0 <= (resumableState.remainingCapacity -= key.length + 2))\n                )\n                  (renderState.resets.font[href] = PRELOAD_NO_CREDS),\n                    resumableState.fontPreloads &&\n                      (resumableState.fontPreloads += \", \"),\n                    (resumableState.fontPreloads += key);\n                else\n                  switch (\n                    ((resumableState = []),\n                    (href = assign(\n                      { rel: \"preload\", href: href, as: as },\n                      options\n                    )),\n                    pushLinkImpl(resumableState, href),\n                    as)\n                  ) {\n                    case \"font\":\n                      renderState.fontPreloads.add(resumableState);\n                      break;\n                    default:\n                      renderState.bulkPreloads.add(resumableState);\n                  }\n            }\n            enqueueFlush(request);\n          }\n        } else previousDispatcher.L(href, as, options);\n      },\n      m: function (href, options) {\n        var request = currentRequest ? currentRequest : null;\n        if (request) {\n          var resumableState = request.resumableState,\n            renderState = request.renderState;\n          if (href) {\n            var as =\n              options && \"string\" === typeof options.as ? options.as : \"script\";\n            switch (as) {\n              case \"script\":\n                if (resumableState.moduleScriptResources.hasOwnProperty(href))\n                  return;\n                as = [];\n                resumableState.moduleScriptResources[href] =\n                  !options ||\n                  (\"string\" !== typeof options.crossOrigin &&\n                    \"string\" !== typeof options.integrity)\n                    ? PRELOAD_NO_CREDS\n                    : [options.crossOrigin, options.integrity];\n                renderState.preloads.moduleScripts.set(href, as);\n                break;\n              default:\n                if (resumableState.moduleUnknownResources.hasOwnProperty(as)) {\n                  var resources = resumableState.unknownResources[as];\n                  if (resources.hasOwnProperty(href)) return;\n                } else\n                  (resources = {}),\n                    (resumableState.moduleUnknownResources[as] = resources);\n                as = [];\n                resources[href] = PRELOAD_NO_CREDS;\n            }\n            pushLinkImpl(\n              as,\n              assign({ rel: \"modulepreload\", href: href }, options)\n            );\n            renderState.bulkPreloads.add(as);\n            enqueueFlush(request);\n          }\n        } else previousDispatcher.m(href, options);\n      },\n      X: function (src, options) {\n        var request = currentRequest ? currentRequest : null;\n        if (request) {\n          var resumableState = request.resumableState,\n            renderState = request.renderState;\n          if (src) {\n            var resourceState = resumableState.scriptResources.hasOwnProperty(\n              src\n            )\n              ? resumableState.scriptResources[src]\n              : void 0;\n            resourceState !== EXISTS &&\n              ((resumableState.scriptResources[src] = EXISTS),\n              (options = assign({ src: src, async: !0 }, options)),\n              resourceState &&\n                (2 === resourceState.length &&\n                  adoptPreloadCredentials(options, resourceState),\n                (src = renderState.preloads.scripts.get(src))) &&\n                (src.length = 0),\n              (src = []),\n              renderState.scripts.add(src),\n              pushScriptImpl(src, options),\n              enqueueFlush(request));\n          }\n        } else previousDispatcher.X(src, options);\n      },\n      S: function (href, precedence, options) {\n        var request = currentRequest ? currentRequest : null;\n        if (request) {\n          var resumableState = request.resumableState,\n            renderState = request.renderState;\n          if (href) {\n            precedence = precedence || \"default\";\n            var styleQueue = renderState.styles.get(precedence),\n              resourceState = resumableState.styleResources.hasOwnProperty(href)\n                ? resumableState.styleResources[href]\n                : void 0;\n            resourceState !== EXISTS &&\n              ((resumableState.styleResources[href] = EXISTS),\n              styleQueue ||\n                ((styleQueue = {\n                  precedence: stringToChunk(escapeTextForBrowser(precedence)),\n                  rules: [],\n                  hrefs: [],\n                  sheets: new Map()\n                }),\n                renderState.styles.set(precedence, styleQueue)),\n              (precedence = {\n                state: PENDING$1,\n                props: assign(\n                  {\n                    rel: \"stylesheet\",\n                    href: href,\n                    \"data-precedence\": precedence\n                  },\n                  options\n                )\n              }),\n              resourceState &&\n                (2 === resourceState.length &&\n                  adoptPreloadCredentials(precedence.props, resourceState),\n                (renderState = renderState.preloads.stylesheets.get(href)) &&\n                0 < renderState.length\n                  ? (renderState.length = 0)\n                  : (precedence.state = PRELOADED)),\n              styleQueue.sheets.set(href, precedence),\n              enqueueFlush(request));\n          }\n        } else previousDispatcher.S(href, precedence, options);\n      },\n      M: function (src, options) {\n        var request = currentRequest ? currentRequest : null;\n        if (request) {\n          var resumableState = request.resumableState,\n            renderState = request.renderState;\n          if (src) {\n            var resourceState =\n              resumableState.moduleScriptResources.hasOwnProperty(src)\n                ? resumableState.moduleScriptResources[src]\n                : void 0;\n            resourceState !== EXISTS &&\n              ((resumableState.moduleScriptResources[src] = EXISTS),\n              (options = assign(\n                { src: src, type: \"module\", async: !0 },\n                options\n              )),\n              resourceState &&\n                (2 === resourceState.length &&\n                  adoptPreloadCredentials(options, resourceState),\n                (src = renderState.preloads.moduleScripts.get(src))) &&\n                (src.length = 0),\n              (src = []),\n              renderState.scripts.add(src),\n              pushScriptImpl(src, options),\n              enqueueFlush(request));\n          }\n        } else previousDispatcher.M(src, options);\n      }\n    };\n    var NothingSent = 0,\n      SentCompleteSegmentFunction = 1,\n      SentCompleteBoundaryFunction = 2,\n      SentClientRenderFunction = 4,\n      SentStyleInsertionFunction = 8,\n      SentCompletedShellId = 32,\n      SentMarkShellTime = 64,\n      EXISTS = null,\n      PRELOAD_NO_CREDS = [];\n    Object.freeze(PRELOAD_NO_CREDS);\n    var currentlyFlushingRenderState = null;\n    stringToPrecomputedChunk('\"></template>');\n    var startInlineScript = stringToPrecomputedChunk(\"<script\"),\n      endInlineScript = stringToPrecomputedChunk(\"\\x3c/script>\"),\n      startScriptSrc = stringToPrecomputedChunk('<script src=\"'),\n      startModuleSrc = stringToPrecomputedChunk('<script type=\"module\" src=\"'),\n      scriptNonce = stringToPrecomputedChunk(' nonce=\"'),\n      scriptIntegirty = stringToPrecomputedChunk(' integrity=\"'),\n      scriptCrossOrigin = stringToPrecomputedChunk(' crossorigin=\"'),\n      endAsyncScript = stringToPrecomputedChunk(' async=\"\">\\x3c/script>'),\n      startInlineStyle = stringToPrecomputedChunk(\"<style\"),\n      scriptRegex = /(<\\/|<)(s)(cript)/gi,\n      importMapScriptStart = stringToPrecomputedChunk(\n        '<script type=\"importmap\">'\n      ),\n      importMapScriptEnd = stringToPrecomputedChunk(\"\\x3c/script>\");\n    var didWarnForNewBooleanPropsWithEmptyValue = {};\n    var ROOT_HTML_MODE = 0,\n      HTML_HTML_MODE = 1,\n      HTML_MODE = 2,\n      HTML_HEAD_MODE = 3,\n      SVG_MODE = 4,\n      MATHML_MODE = 5,\n      HTML_TABLE_MODE = 6,\n      HTML_TABLE_BODY_MODE = 7,\n      HTML_TABLE_ROW_MODE = 8,\n      HTML_COLGROUP_MODE = 9,\n      textSeparator = stringToPrecomputedChunk(\"\\x3c!-- --\\x3e\"),\n      styleNameCache = new Map(),\n      styleAttributeStart = stringToPrecomputedChunk(' style=\"'),\n      styleAssign = stringToPrecomputedChunk(\":\"),\n      styleSeparator = stringToPrecomputedChunk(\";\"),\n      attributeSeparator = stringToPrecomputedChunk(\" \"),\n      attributeAssign = stringToPrecomputedChunk('=\"'),\n      attributeEnd = stringToPrecomputedChunk('\"'),\n      attributeEmptyString = stringToPrecomputedChunk('=\"\"'),\n      actionJavaScriptURL = stringToPrecomputedChunk(\n        escapeTextForBrowser(\n          \"javascript:throw new Error('React form unexpectedly submitted.')\"\n        )\n      ),\n      startHiddenInputChunk = stringToPrecomputedChunk('<input type=\"hidden\"'),\n      endOfStartTag = stringToPrecomputedChunk(\">\"),\n      endOfStartTagSelfClosing = stringToPrecomputedChunk(\"/>\"),\n      didWarnDefaultInputValue = !1,\n      didWarnDefaultChecked = !1,\n      didWarnDefaultSelectValue = !1,\n      didWarnDefaultTextareaValue = !1,\n      didWarnInvalidOptionChildren = !1,\n      didWarnInvalidOptionInnerHTML = !1,\n      didWarnSelectedSetOnOption = !1,\n      didWarnFormActionType = !1,\n      didWarnFormActionName = !1,\n      didWarnFormActionTarget = !1,\n      didWarnFormActionMethod = !1,\n      selectedMarkerAttribute = stringToPrecomputedChunk(' selected=\"\"'),\n      formReplayingRuntimeScript = stringToPrecomputedChunk(\n        'addEventListener(\"submit\",function(a){if(!a.defaultPrevented){var c=a.target,d=a.submitter,e=c.action,b=d;if(d){var f=d.getAttribute(\"formAction\");null!=f&&(e=f,b=null)}\"javascript:throw new Error(\\'React form unexpectedly submitted.\\')\"===e&&(a.preventDefault(),b?(a=document.createElement(\"input\"),a.name=b.name,a.value=b.value,b.parentNode.insertBefore(a,b),b=new FormData(c),a.parentNode.removeChild(a)):b=new FormData(c),a=c.ownerDocument||c,(a.$$reactFormReplay=a.$$reactFormReplay||[]).push(c,d,b))}});'\n      ),\n      formStateMarkerIsMatching = stringToPrecomputedChunk(\"\\x3c!--F!--\\x3e\"),\n      formStateMarkerIsNotMatching = stringToPrecomputedChunk(\"\\x3c!--F--\\x3e\"),\n      styleRegex = /(<\\/|<)(s)(tyle)/gi,\n      headPreambleContributionChunk =\n        stringToPrecomputedChunk(\"\\x3c!--head--\\x3e\"),\n      bodyPreambleContributionChunk =\n        stringToPrecomputedChunk(\"\\x3c!--body--\\x3e\"),\n      htmlPreambleContributionChunk =\n        stringToPrecomputedChunk(\"\\x3c!--html--\\x3e\"),\n      leadingNewline = stringToPrecomputedChunk(\"\\n\"),\n      VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\\.\\-\\d]*$/,\n      validatedTagCache = new Map(),\n      doctypeChunk = stringToPrecomputedChunk(\"<!DOCTYPE html>\"),\n      endTagCache = new Map(),\n      shellTimeRuntimeScript = stringToPrecomputedChunk(\n        \"requestAnimationFrame(function(){$RT=performance.now()});\"\n      ),\n      placeholder1 = stringToPrecomputedChunk('<template id=\"'),\n      placeholder2 = stringToPrecomputedChunk('\"></template>'),\n      startActivityBoundary = stringToPrecomputedChunk(\"\\x3c!--&--\\x3e\"),\n      endActivityBoundary = stringToPrecomputedChunk(\"\\x3c!--/&--\\x3e\"),\n      startCompletedSuspenseBoundary =\n        stringToPrecomputedChunk(\"\\x3c!--$--\\x3e\"),\n      startPendingSuspenseBoundary1 = stringToPrecomputedChunk(\n        '\\x3c!--$?--\\x3e<template id=\"'\n      ),\n      startPendingSuspenseBoundary2 = stringToPrecomputedChunk('\"></template>'),\n      startClientRenderedSuspenseBoundary =\n        stringToPrecomputedChunk(\"\\x3c!--$!--\\x3e\"),\n      endSuspenseBoundary = stringToPrecomputedChunk(\"\\x3c!--/$--\\x3e\"),\n      clientRenderedSuspenseBoundaryError1 =\n        stringToPrecomputedChunk(\"<template\"),\n      clientRenderedSuspenseBoundaryErrorAttrInterstitial =\n        stringToPrecomputedChunk('\"'),\n      clientRenderedSuspenseBoundaryError1A =\n        stringToPrecomputedChunk(' data-dgst=\"'),\n      clientRenderedSuspenseBoundaryError1B =\n        stringToPrecomputedChunk(' data-msg=\"'),\n      clientRenderedSuspenseBoundaryError1C =\n        stringToPrecomputedChunk(' data-stck=\"'),\n      clientRenderedSuspenseBoundaryError1D =\n        stringToPrecomputedChunk(' data-cstck=\"'),\n      clientRenderedSuspenseBoundaryError2 =\n        stringToPrecomputedChunk(\"></template>\"),\n      startSegmentHTML = stringToPrecomputedChunk('<div hidden id=\"'),\n      startSegmentHTML2 = stringToPrecomputedChunk('\">'),\n      endSegmentHTML = stringToPrecomputedChunk(\"</div>\"),\n      startSegmentSVG = stringToPrecomputedChunk(\n        '<svg aria-hidden=\"true\" style=\"display:none\" id=\"'\n      ),\n      startSegmentSVG2 = stringToPrecomputedChunk('\">'),\n      endSegmentSVG = stringToPrecomputedChunk(\"</svg>\"),\n      startSegmentMathML = stringToPrecomputedChunk(\n        '<math aria-hidden=\"true\" style=\"display:none\" id=\"'\n      ),\n      startSegmentMathML2 = stringToPrecomputedChunk('\">'),\n      endSegmentMathML = stringToPrecomputedChunk(\"</math>\"),\n      startSegmentTable = stringToPrecomputedChunk('<table hidden id=\"'),\n      startSegmentTable2 = stringToPrecomputedChunk('\">'),\n      endSegmentTable = stringToPrecomputedChunk(\"</table>\"),\n      startSegmentTableBody = stringToPrecomputedChunk(\n        '<table hidden><tbody id=\"'\n      ),\n      startSegmentTableBody2 = stringToPrecomputedChunk('\">'),\n      endSegmentTableBody = stringToPrecomputedChunk(\"</tbody></table>\"),\n      startSegmentTableRow = stringToPrecomputedChunk('<table hidden><tr id=\"'),\n      startSegmentTableRow2 = stringToPrecomputedChunk('\">'),\n      endSegmentTableRow = stringToPrecomputedChunk(\"</tr></table>\"),\n      startSegmentColGroup = stringToPrecomputedChunk(\n        '<table hidden><colgroup id=\"'\n      ),\n      startSegmentColGroup2 = stringToPrecomputedChunk('\">'),\n      endSegmentColGroup = stringToPrecomputedChunk(\"</colgroup></table>\"),\n      completeSegmentScript1Full = stringToPrecomputedChunk(\n        '$RS=function(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS(\"'\n      ),\n      completeSegmentScript1Partial = stringToPrecomputedChunk('$RS(\"'),\n      completeSegmentScript2 = stringToPrecomputedChunk('\",\"'),\n      completeSegmentScriptEnd = stringToPrecomputedChunk('\")\\x3c/script>');\n    stringToPrecomputedChunk('<template data-rsi=\"\" data-sid=\"');\n    stringToPrecomputedChunk('\" data-pid=\"');\n    var completeBoundaryScriptFunctionOnly = stringToPrecomputedChunk(\n      '$RB=[];$RV=function(a){$RT=performance.now();for(var b=0;b<a.length;b+=2){var c=a[b],e=a[b+1];null!==e.parentNode&&e.parentNode.removeChild(e);var f=c.parentNode;if(f){var g=c.previousSibling,h=0;do{if(c&&8===c.nodeType){var d=c.data;if(\"/$\"===d||\"/&\"===d)if(0===h)break;else h--;else\"$\"!==d&&\"$?\"!==d&&\"$~\"!==d&&\"$!\"!==d&&\"&\"!==d||h++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;e.firstChild;)f.insertBefore(e.firstChild,c);g.data=\"$\";g._reactRetry&&requestAnimationFrame(g._reactRetry)}}a.length=0};\\n$RC=function(a,b){if(b=document.getElementById(b))(a=document.getElementById(a))?(a.previousSibling.data=\"$~\",$RB.push(a,b),2===$RB.length&&(\"number\"!==typeof $RT?requestAnimationFrame($RV.bind(null,$RB)):(a=performance.now(),setTimeout($RV.bind(null,$RB),2300>a&&2E3<a?2300-a:$RT+300-a)))):b.parentNode.removeChild(b)};'\n    );\n    stringToChunk(\n      '$RV=function(A,g){function k(a,b){var e=a.getAttribute(b);e&&(b=a.style,l.push(a,b.viewTransitionName,b.viewTransitionClass),\"auto\"!==e&&(b.viewTransitionClass=e),(a=a.getAttribute(\"vt-name\"))||(a=\"_T_\"+K++ +\"_\"),b.viewTransitionName=a,B=!0)}var B=!1,K=0,l=[];try{var f=document.__reactViewTransition;if(f){f.finished.finally($RV.bind(null,g));return}var m=new Map;for(f=1;f<g.length;f+=2)for(var h=g[f].querySelectorAll(\"[vt-share]\"),d=0;d<h.length;d++){var c=h[d];m.set(c.getAttribute(\"vt-name\"),c)}var u=[];for(h=0;h<g.length;h+=2){var C=g[h],x=C.parentNode;if(x){var v=x.getBoundingClientRect();if(v.left||v.top||v.width||v.height){c=C;for(f=0;c;){if(8===c.nodeType){var r=c.data;if(\"/$\"===r)if(0===f)break;else f--;else\"$\"!==r&&\"$?\"!==r&&\"$~\"!==r&&\"$!\"!==r||f++}else if(1===c.nodeType){d=c;var D=d.getAttribute(\"vt-name\"),y=m.get(D);k(d,y?\"vt-share\":\"vt-exit\");y&&(k(y,\"vt-share\"),m.set(D,null));var E=d.querySelectorAll(\"[vt-share]\");for(d=0;d<E.length;d++){var F=E[d],G=F.getAttribute(\"vt-name\"),\\nH=m.get(G);H&&(k(F,\"vt-share\"),k(H,\"vt-share\"),m.set(G,null))}}c=c.nextSibling}for(var I=g[h+1],t=I.firstElementChild;t;)null!==m.get(t.getAttribute(\"vt-name\"))&&k(t,\"vt-enter\"),t=t.nextElementSibling;c=x;do for(var n=c.firstElementChild;n;){var J=n.getAttribute(\"vt-update\");J&&\"none\"!==J&&!l.includes(n)&&k(n,\"vt-update\");n=n.nextElementSibling}while((c=c.parentNode)&&1===c.nodeType&&\"none\"!==c.getAttribute(\"vt-update\"));u.push.apply(u,I.querySelectorAll(\\'img[src]:not([loading=\"lazy\"])\\'))}}}if(B){var z=\\ndocument.__reactViewTransition=document.startViewTransition({update:function(){A(g);for(var a=[document.documentElement.clientHeight,document.fonts.ready],b={},e=0;e<u.length;b={g:b.g},e++)if(b.g=u[e],!b.g.complete){var p=b.g.getBoundingClientRect();0<p.bottom&&0<p.right&&p.top<window.innerHeight&&p.left<window.innerWidth&&(p=new Promise(function(w){return function(q){w.g.addEventListener(\"load\",q);w.g.addEventListener(\"error\",q)}}(b)),a.push(p))}return Promise.race([Promise.all(a),new Promise(function(w){var q=\\nperformance.now();setTimeout(w,2300>q&&2E3<q?2300-q:500)})])},types:[]});z.ready.finally(function(){for(var a=l.length-3;0<=a;a-=3){var b=l[a],e=b.style;e.viewTransitionName=l[a+1];e.viewTransitionClass=l[a+1];\"\"===b.getAttribute(\"style\")&&b.removeAttribute(\"style\")}});z.finished.finally(function(){document.__reactViewTransition===z&&(document.__reactViewTransition=null)});$RB=[];return}}catch(a){}A(g)}.bind(null,$RV);'\n    );\n    var completeBoundaryScript1Partial = stringToPrecomputedChunk('$RC(\"'),\n      completeBoundaryWithStylesScript1FullPartial = stringToPrecomputedChunk(\n        '$RM=new Map;$RR=function(n,w,p){function u(q){this._p=null;q()}for(var r=new Map,t=document,h,b,e=t.querySelectorAll(\"link[data-precedence],style[data-precedence]\"),v=[],k=0;b=e[k++];)\"not all\"===b.getAttribute(\"media\")?v.push(b):(\"LINK\"===b.tagName&&$RM.set(b.getAttribute(\"href\"),b),r.set(b.dataset.precedence,h=b));e=0;b=[];var l,a;for(k=!0;;){if(k){var f=p[e++];if(!f){k=!1;e=0;continue}var c=!1,m=0;var d=f[m++];if(a=$RM.get(d)){var g=a._p;c=!0}else{a=t.createElement(\"link\");a.href=d;a.rel=\\n\"stylesheet\";for(a.dataset.precedence=l=f[m++];g=f[m++];)a.setAttribute(g,f[m++]);g=a._p=new Promise(function(q,x){a.onload=u.bind(a,q);a.onerror=u.bind(a,x)});$RM.set(d,a)}d=a.getAttribute(\"media\");!g||d&&!matchMedia(d).matches||b.push(g);if(c)continue}else{a=v[e++];if(!a)break;l=a.getAttribute(\"data-precedence\");a.removeAttribute(\"media\")}c=r.get(l)||h;c===h&&(h=a);r.set(l,a);c?c.parentNode.insertBefore(a,c.nextSibling):(c=t.head,c.insertBefore(a,c.firstChild))}if(p=document.getElementById(n))p.previousSibling.data=\\n\"$~\";Promise.all(b).then($RC.bind(null,n,w),$RX.bind(null,n,\"CSS failed to load\"))};$RR(\"'\n      ),\n      completeBoundaryWithStylesScript1Partial =\n        stringToPrecomputedChunk('$RR(\"'),\n      completeBoundaryScript2 = stringToPrecomputedChunk('\",\"'),\n      completeBoundaryScript3a = stringToPrecomputedChunk('\",'),\n      completeBoundaryScript3b = stringToPrecomputedChunk('\"'),\n      completeBoundaryScriptEnd = stringToPrecomputedChunk(\")\\x3c/script>\");\n    stringToPrecomputedChunk('<template data-rci=\"\" data-bid=\"');\n    stringToPrecomputedChunk('<template data-rri=\"\" data-bid=\"');\n    stringToPrecomputedChunk('\" data-sid=\"');\n    stringToPrecomputedChunk('\" data-sty=\"');\n    var clientRenderScriptFunctionOnly = stringToPrecomputedChunk(\n        '$RX=function(b,c,d,e,f){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data=\"$!\",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),f&&(a.cstck=f),b._reactRetry&&b._reactRetry())};'\n      ),\n      clientRenderScript1Full = stringToPrecomputedChunk(\n        '$RX=function(b,c,d,e,f){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data=\"$!\",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),f&&(a.cstck=f),b._reactRetry&&b._reactRetry())};;$RX(\"'\n      ),\n      clientRenderScript1Partial = stringToPrecomputedChunk('$RX(\"'),\n      clientRenderScript1A = stringToPrecomputedChunk('\"'),\n      clientRenderErrorScriptArgInterstitial = stringToPrecomputedChunk(\",\"),\n      clientRenderScriptEnd = stringToPrecomputedChunk(\")\\x3c/script>\");\n    stringToPrecomputedChunk('<template data-rxi=\"\" data-bid=\"');\n    stringToPrecomputedChunk('\" data-dgst=\"');\n    stringToPrecomputedChunk('\" data-msg=\"');\n    stringToPrecomputedChunk('\" data-stck=\"');\n    stringToPrecomputedChunk('\" data-cstck=\"');\n    var regexForJSStringsInInstructionScripts = /[<\\u2028\\u2029]/g,\n      regexForJSStringsInScripts = /[&><\\u2028\\u2029]/g,\n      lateStyleTagResourceOpen1 = stringToPrecomputedChunk(\n        ' media=\"not all\" data-precedence=\"'\n      ),\n      lateStyleTagResourceOpen2 = stringToPrecomputedChunk('\" data-href=\"'),\n      lateStyleTagResourceOpen3 = stringToPrecomputedChunk('\">'),\n      lateStyleTagTemplateClose = stringToPrecomputedChunk(\"</style>\"),\n      currentlyRenderingBoundaryHasStylesToHoist = !1,\n      destinationHasCapacity = !0,\n      stylesheetFlushingQueue = [],\n      styleTagResourceOpen1 = stringToPrecomputedChunk(' data-precedence=\"'),\n      styleTagResourceOpen2 = stringToPrecomputedChunk('\" data-href=\"'),\n      spaceSeparator = stringToPrecomputedChunk(\" \"),\n      styleTagResourceOpen3 = stringToPrecomputedChunk('\">'),\n      styleTagResourceClose = stringToPrecomputedChunk(\"</style>\");\n    stringToPrecomputedChunk('<link rel=\"expect\" href=\"#');\n    stringToPrecomputedChunk('\" blocking=\"render\"/>');\n    var completedShellIdAttributeStart = stringToPrecomputedChunk(' id=\"'),\n      arrayFirstOpenBracket = stringToPrecomputedChunk(\"[\"),\n      arraySubsequentOpenBracket = stringToPrecomputedChunk(\",[\"),\n      arrayInterstitial = stringToPrecomputedChunk(\",\"),\n      arrayCloseBracket = stringToPrecomputedChunk(\"]\"),\n      PENDING$1 = 0,\n      PRELOADED = 1,\n      PREAMBLE = 2,\n      LATE = 3,\n      regexForHrefInLinkHeaderURLContext = /[<>\\r\\n]/g,\n      regexForLinkHeaderQuotedParamValueContext = /[\"';,\\r\\n]/g,\n      bind = Function.prototype.bind,\n      REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\"),\n      emptyContextObject = {};\n    Object.freeze(emptyContextObject);\n    var rendererSigil = {};\n    var currentActiveSnapshot = null,\n      didWarnAboutNoopUpdateForComponent = {},\n      didWarnAboutDeprecatedWillMount = {};\n    var didWarnAboutUninitializedState = new Set();\n    var didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate = new Set();\n    var didWarnAboutLegacyLifecyclesAndDerivedState = new Set();\n    var didWarnAboutDirectlyAssigningPropsToState = new Set();\n    var didWarnAboutUndefinedDerivedState = new Set();\n    var didWarnAboutContextTypes$1 = new Set();\n    var didWarnAboutChildContextTypes = new Set();\n    var didWarnAboutInvalidateContextType = new Set();\n    var didWarnOnInvalidCallback = new Set();\n    var classComponentUpdater = {\n        enqueueSetState: function (inst, payload, callback) {\n          var internals = inst._reactInternals;\n          null === internals.queue\n            ? warnNoop(inst, \"setState\")\n            : (internals.queue.push(payload),\n              void 0 !== callback &&\n                null !== callback &&\n                warnOnInvalidCallback(callback));\n        },\n        enqueueReplaceState: function (inst, payload, callback) {\n          inst = inst._reactInternals;\n          inst.replace = !0;\n          inst.queue = [payload];\n          void 0 !== callback &&\n            null !== callback &&\n            warnOnInvalidCallback(callback);\n        },\n        enqueueForceUpdate: function (inst, callback) {\n          null === inst._reactInternals.queue\n            ? warnNoop(inst, \"forceUpdate\")\n            : void 0 !== callback &&\n              null !== callback &&\n              warnOnInvalidCallback(callback);\n        }\n      },\n      emptyTreeContext = { id: 1, overflow: \"\" },\n      clz32 = Math.clz32 ? Math.clz32 : clz32Fallback,\n      log = Math.log,\n      LN2 = Math.LN2,\n      SuspenseException = Error(\n        \"Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\\n\\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`.\"\n      ),\n      suspendedThenable = null,\n      objectIs = \"function\" === typeof Object.is ? Object.is : is,\n      currentlyRenderingComponent = null,\n      currentlyRenderingTask = null,\n      currentlyRenderingRequest = null,\n      currentlyRenderingKeyPath = null,\n      firstWorkInProgressHook = null,\n      workInProgressHook = null,\n      isReRender = !1,\n      didScheduleRenderPhaseUpdate = !1,\n      localIdCounter = 0,\n      actionStateCounter = 0,\n      actionStateMatchingIndex = -1,\n      thenableIndexCounter = 0,\n      thenableState = null,\n      renderPhaseUpdates = null,\n      numberOfReRenders = 0,\n      isInHookUserCodeInDev = !1,\n      currentHookNameInDev,\n      HooksDispatcher = {\n        readContext: readContext,\n        use: function (usable) {\n          if (null !== usable && \"object\" === typeof usable) {\n            if (\"function\" === typeof usable.then)\n              return unwrapThenable(usable);\n            if (usable.$$typeof === REACT_CONTEXT_TYPE)\n              return readContext(usable);\n          }\n          throw Error(\n            \"An unsupported type was passed to use(): \" + String(usable)\n          );\n        },\n        useContext: function (context) {\n          currentHookNameInDev = \"useContext\";\n          resolveCurrentlyRenderingComponent();\n          return context._currentValue;\n        },\n        useMemo: useMemo,\n        useReducer: useReducer,\n        useRef: function (initialValue) {\n          currentlyRenderingComponent = resolveCurrentlyRenderingComponent();\n          workInProgressHook = createWorkInProgressHook();\n          var previousRef = workInProgressHook.memoizedState;\n          return null === previousRef\n            ? ((initialValue = { current: initialValue }),\n              Object.seal(initialValue),\n              (workInProgressHook.memoizedState = initialValue))\n            : previousRef;\n        },\n        useState: function (initialState) {\n          currentHookNameInDev = \"useState\";\n          return useReducer(basicStateReducer, initialState);\n        },\n        useInsertionEffect: noop,\n        useLayoutEffect: noop,\n        useCallback: function (callback, deps) {\n          return useMemo(function () {\n            return callback;\n          }, deps);\n        },\n        useImperativeHandle: noop,\n        useEffect: noop,\n        useDebugValue: noop,\n        useDeferredValue: function (value, initialValue) {\n          resolveCurrentlyRenderingComponent();\n          return void 0 !== initialValue ? initialValue : value;\n        },\n        useTransition: function () {\n          resolveCurrentlyRenderingComponent();\n          return [!1, unsupportedStartTransition];\n        },\n        useId: function () {\n          var treeId = currentlyRenderingTask.treeContext;\n          var overflow = treeId.overflow;\n          treeId = treeId.id;\n          treeId =\n            (treeId & ~(1 << (32 - clz32(treeId) - 1))).toString(32) + overflow;\n          var resumableState = currentResumableState;\n          if (null === resumableState)\n            throw Error(\n              \"Invalid hook call. Hooks can only be called inside of the body of a function component.\"\n            );\n          overflow = localIdCounter++;\n          treeId = \"_\" + resumableState.idPrefix + \"R_\" + treeId;\n          0 < overflow && (treeId += \"H\" + overflow.toString(32));\n          return treeId + \"_\";\n        },\n        useSyncExternalStore: function (\n          subscribe,\n          getSnapshot,\n          getServerSnapshot\n        ) {\n          if (void 0 === getServerSnapshot)\n            throw Error(\n              \"Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.\"\n            );\n          return getServerSnapshot();\n        },\n        useOptimistic: function (passthrough) {\n          resolveCurrentlyRenderingComponent();\n          return [passthrough, unsupportedSetOptimisticState];\n        },\n        useActionState: useActionState,\n        useFormState: useActionState,\n        useHostTransitionStatus: function () {\n          resolveCurrentlyRenderingComponent();\n          return NotPending;\n        },\n        useMemoCache: function (size) {\n          for (var data = Array(size), i = 0; i < size; i++)\n            data[i] = REACT_MEMO_CACHE_SENTINEL;\n          return data;\n        },\n        useCacheRefresh: function () {\n          return unsupportedRefresh;\n        },\n        useEffectEvent: function () {\n          return throwOnUseEffectEventCall;\n        }\n      },\n      currentResumableState = null,\n      currentTaskInDEV = null,\n      DefaultAsyncDispatcher = {\n        getCacheForType: function () {\n          throw Error(\"Not implemented.\");\n        },\n        cacheSignal: function () {\n          throw Error(\"Not implemented.\");\n        },\n        getOwner: function () {\n          return null === currentTaskInDEV\n            ? null\n            : currentTaskInDEV.componentStack;\n        }\n      },\n      disabledDepth = 0,\n      prevLog,\n      prevInfo,\n      prevWarn,\n      prevError,\n      prevGroup,\n      prevGroupCollapsed,\n      prevGroupEnd;\n    disabledLog.__reactDisabledLog = !0;\n    var prefix,\n      suffix,\n      reentry = !1;\n    var componentFrameCache = new (\n      \"function\" === typeof WeakMap ? WeakMap : Map\n    )();\n    var callComponent = {\n        react_stack_bottom_frame: function (Component, props, secondArg) {\n          return Component(props, secondArg);\n        }\n      },\n      callComponentInDEV =\n        callComponent.react_stack_bottom_frame.bind(callComponent),\n      callRender = {\n        react_stack_bottom_frame: function (instance) {\n          return instance.render();\n        }\n      },\n      callRenderInDEV = callRender.react_stack_bottom_frame.bind(callRender),\n      callLazyInit = {\n        react_stack_bottom_frame: function (lazy) {\n          var init = lazy._init;\n          return init(lazy._payload);\n        }\n      },\n      callLazyInitInDEV =\n        callLazyInit.react_stack_bottom_frame.bind(callLazyInit),\n      lastResetTime = 0;\n    if (\n      \"object\" === typeof performance &&\n      \"function\" === typeof performance.now\n    ) {\n      var localPerformance = performance;\n      var getCurrentTime = function () {\n        return localPerformance.now();\n      };\n    } else {\n      var localDate = Date;\n      getCurrentTime = function () {\n        return localDate.now();\n      };\n    }\n    var CLIENT_RENDERED = 4,\n      PENDING = 0,\n      COMPLETED = 1,\n      FLUSHED = 2,\n      ABORTED = 3,\n      ERRORED = 4,\n      POSTPONED = 5,\n      CLOSED = 14,\n      currentRequest = null,\n      didWarnAboutBadClass = {},\n      didWarnAboutContextTypes = {},\n      didWarnAboutContextTypeOnFunctionComponent = {},\n      didWarnAboutGetDerivedStateOnFunctionComponent = {},\n      didWarnAboutReassigningProps = !1,\n      didWarnAboutGenerators = !1,\n      didWarnAboutMaps = !1,\n      flushedByteSize = 0,\n      flushingPartialBoundaries = !1;\n    ensureCorrectIsomorphicReactVersion();\n    ensureCorrectIsomorphicReactVersion();\n    exports.prerender = function (children, options) {\n      return new Promise(function (resolve, reject) {\n        var onHeaders = options ? options.onHeaders : void 0,\n          onHeadersImpl;\n        onHeaders &&\n          (onHeadersImpl = function (headersDescriptor) {\n            onHeaders(new Headers(headersDescriptor));\n          });\n        var resources = createResumableState(\n            options ? options.identifierPrefix : void 0,\n            options ? options.unstable_externalRuntimeSrc : void 0,\n            options ? options.bootstrapScriptContent : void 0,\n            options ? options.bootstrapScripts : void 0,\n            options ? options.bootstrapModules : void 0\n          ),\n          request = createPrerenderRequest(\n            children,\n            resources,\n            createRenderState(\n              resources,\n              void 0,\n              options ? options.unstable_externalRuntimeSrc : void 0,\n              options ? options.importMap : void 0,\n              onHeadersImpl,\n              options ? options.maxHeadersLength : void 0\n            ),\n            createRootFormatContext(options ? options.namespaceURI : void 0),\n            options ? options.progressiveChunkSize : void 0,\n            options ? options.onError : void 0,\n            function () {\n              var stream = new ReadableStream(\n                {\n                  type: \"bytes\",\n                  pull: function (controller) {\n                    startFlowing(request, controller);\n                  },\n                  cancel: function (reason) {\n                    request.destination = null;\n                    abort(request, reason);\n                  }\n                },\n                { highWaterMark: 0 }\n              );\n              stream = {\n                postponed: getPostponedState(request),\n                prelude: stream\n              };\n              resolve(stream);\n            },\n            void 0,\n            void 0,\n            reject,\n            options ? options.onPostpone : void 0\n          );\n        if (options && options.signal) {\n          var signal = options.signal;\n          if (signal.aborted) abort(request, signal.reason);\n          else {\n            var listener = function () {\n              abort(request, signal.reason);\n              signal.removeEventListener(\"abort\", listener);\n            };\n            signal.addEventListener(\"abort\", listener);\n          }\n        }\n        startWork(request);\n      });\n    };\n    exports.renderToReadableStream = function (children, options) {\n      return new Promise(function (resolve, reject) {\n        var onFatalError,\n          onAllReady,\n          allReady = new Promise(function (res, rej) {\n            onAllReady = res;\n            onFatalError = rej;\n          }),\n          onHeaders = options ? options.onHeaders : void 0,\n          onHeadersImpl;\n        onHeaders &&\n          (onHeadersImpl = function (headersDescriptor) {\n            onHeaders(new Headers(headersDescriptor));\n          });\n        var resumableState = createResumableState(\n            options ? options.identifierPrefix : void 0,\n            options ? options.unstable_externalRuntimeSrc : void 0,\n            options ? options.bootstrapScriptContent : void 0,\n            options ? options.bootstrapScripts : void 0,\n            options ? options.bootstrapModules : void 0\n          ),\n          request = createRequest(\n            children,\n            resumableState,\n            createRenderState(\n              resumableState,\n              options ? options.nonce : void 0,\n              options ? options.unstable_externalRuntimeSrc : void 0,\n              options ? options.importMap : void 0,\n              onHeadersImpl,\n              options ? options.maxHeadersLength : void 0\n            ),\n            createRootFormatContext(options ? options.namespaceURI : void 0),\n            options ? options.progressiveChunkSize : void 0,\n            options ? options.onError : void 0,\n            onAllReady,\n            function () {\n              var stream = new ReadableStream(\n                {\n                  type: \"bytes\",\n                  pull: function (controller) {\n                    startFlowing(request, controller);\n                  },\n                  cancel: function (reason) {\n                    request.destination = null;\n                    abort(request, reason);\n                  }\n                },\n                { highWaterMark: 0 }\n              );\n              stream.allReady = allReady;\n              resolve(stream);\n            },\n            function (error) {\n              allReady.catch(function () {});\n              reject(error);\n            },\n            onFatalError,\n            options ? options.onPostpone : void 0,\n            options ? options.formState : void 0\n          );\n        if (options && options.signal) {\n          var signal = options.signal;\n          if (signal.aborted) abort(request, signal.reason);\n          else {\n            var listener = function () {\n              abort(request, signal.reason);\n              signal.removeEventListener(\"abort\", listener);\n            };\n            signal.addEventListener(\"abort\", listener);\n          }\n        }\n        startWork(request);\n      });\n    };\n    exports.resume = function (children, postponedState, options) {\n      return new Promise(function (resolve, reject) {\n        var onFatalError,\n          onAllReady,\n          allReady = new Promise(function (res, rej) {\n            onAllReady = res;\n            onFatalError = rej;\n          }),\n          request = resumeRequest(\n            children,\n            postponedState,\n            createRenderState(\n              postponedState.resumableState,\n              options ? options.nonce : void 0,\n              void 0,\n              void 0,\n              void 0,\n              void 0\n            ),\n            options ? options.onError : void 0,\n            onAllReady,\n            function () {\n              var stream = new ReadableStream(\n                {\n                  type: \"bytes\",\n                  pull: function (controller) {\n                    startFlowing(request, controller);\n                  },\n                  cancel: function (reason) {\n                    request.destination = null;\n                    abort(request, reason);\n                  }\n                },\n                { highWaterMark: 0 }\n              );\n              stream.allReady = allReady;\n              resolve(stream);\n            },\n            function (error) {\n              allReady.catch(function () {});\n              reject(error);\n            },\n            onFatalError,\n            options ? options.onPostpone : void 0\n          );\n        if (options && options.signal) {\n          var signal = options.signal;\n          if (signal.aborted) abort(request, signal.reason);\n          else {\n            var listener = function () {\n              abort(request, signal.reason);\n              signal.removeEventListener(\"abort\", listener);\n            };\n            signal.addEventListener(\"abort\", listener);\n          }\n        }\n        startWork(request);\n      });\n    };\n    exports.resumeAndPrerender = function (children, postponedState, options) {\n      return new Promise(function (resolve, reject) {\n        var request = resumeAndPrerenderRequest(\n          children,\n          postponedState,\n          createRenderState(\n            postponedState.resumableState,\n            void 0,\n            void 0,\n            void 0,\n            void 0,\n            void 0\n          ),\n          options ? options.onError : void 0,\n          function () {\n            var stream = new ReadableStream(\n              {\n                type: \"bytes\",\n                pull: function (controller) {\n                  startFlowing(request, controller);\n                },\n                cancel: function (reason) {\n                  request.destination = null;\n                  abort(request, reason);\n                }\n              },\n              { highWaterMark: 0 }\n            );\n            stream = { postponed: getPostponedState(request), prelude: stream };\n            resolve(stream);\n          },\n          void 0,\n          void 0,\n          reject,\n          options ? options.onPostpone : void 0\n        );\n        if (options && options.signal) {\n          var signal = options.signal;\n          if (signal.aborted) abort(request, signal.reason);\n          else {\n            var listener = function () {\n              abort(request, signal.reason);\n              signal.removeEventListener(\"abort\", listener);\n            };\n            signal.addEventListener(\"abort\", listener);\n          }\n        }\n        startWork(request);\n      });\n    };\n    exports.version = \"19.2.8\";\n  })();\n", "'use strict';\n\nvar l, s;\nif (process.env.NODE_ENV === 'production') {\n  l = require('./cjs/react-dom-server-legacy.browser.production.js');\n  s = require('./cjs/react-dom-server.browser.production.js');\n} else {\n  l = require('./cjs/react-dom-server-legacy.browser.development.js');\n  s = require('./cjs/react-dom-server.browser.development.js');\n}\n\nexports.version = l.version;\nexports.renderToString = l.renderToString;\nexports.renderToStaticMarkup = l.renderToStaticMarkup;\nexports.renderToReadableStream = s.renderToReadableStream;\nexports.resume = s.resume;\n", "export default {\n  logger: typeof console !== \"undefined\" ? console : undefined,\n  WebSocket: typeof WebSocket !== \"undefined\" ? WebSocket : undefined,\n}\n", "import adapters from \"./adapters\"\n\n// The logger is disabled by default. You can enable it with:\n//\n//   ActionCable.logger.enabled = true\n//\n//   Example:\n//\n//   import * as ActionCable from '@rails/actioncable'\n//\n//   ActionCable.logger.enabled = true\n//   ActionCable.logger.log('Connection Established.')\n//\n\nexport default {\n  log(...messages) {\n    if (this.enabled) {\n      messages.push(Date.now())\n      adapters.logger.log(\"[ActionCable]\", ...messages)\n    }\n  },\n}\n", "import logger from \"./logger\"\n\n// Responsible for ensuring the cable connection is in good health by validating the heartbeat pings sent from the server, and attempting\n// revival reconnections if things go astray. Internal class, not intended for direct user manipulation.\n\nconst now = () => new Date().getTime()\n\nconst secondsSince = time => (now() - time) / 1000\n\nclass ConnectionMonitor {\n  constructor(connection) {\n    this.visibilityDidChange = this.visibilityDidChange.bind(this)\n    this.connection = connection\n    this.reconnectAttempts = 0\n  }\n\n  start() {\n    if (!this.isRunning()) {\n      this.startedAt = now()\n      delete this.stoppedAt\n      this.startPolling()\n      addEventListener(\"visibilitychange\", this.visibilityDidChange)\n      logger.log(`ConnectionMonitor started. stale threshold = ${this.constructor.staleThreshold} s`)\n    }\n  }\n\n  stop() {\n    if (this.isRunning()) {\n      this.stoppedAt = now()\n      this.stopPolling()\n      removeEventListener(\"visibilitychange\", this.visibilityDidChange)\n      logger.log(\"ConnectionMonitor stopped\")\n    }\n  }\n\n  isRunning() {\n    return this.startedAt && !this.stoppedAt\n  }\n\n  recordMessage() {\n    this.pingedAt = now()\n  }\n\n  recordConnect() {\n    this.reconnectAttempts = 0\n    delete this.disconnectedAt\n    logger.log(\"ConnectionMonitor recorded connect\")\n  }\n\n  recordDisconnect() {\n    this.disconnectedAt = now()\n    logger.log(\"ConnectionMonitor recorded disconnect\")\n  }\n\n  // Private\n\n  startPolling() {\n    this.stopPolling()\n    this.poll()\n  }\n\n  stopPolling() {\n    clearTimeout(this.pollTimeout)\n  }\n\n  poll() {\n    this.pollTimeout = setTimeout(() => {\n      this.reconnectIfStale()\n      this.poll()\n    }\n    , this.getPollInterval())\n  }\n\n  getPollInterval() {\n    const { staleThreshold, reconnectionBackoffRate } = this.constructor\n    const backoff = Math.pow(1 + reconnectionBackoffRate, Math.min(this.reconnectAttempts, 10))\n    const jitterMax = this.reconnectAttempts === 0 ? 1.0 : reconnectionBackoffRate\n    const jitter = jitterMax * Math.random()\n    return staleThreshold * 1000 * backoff * (1 + jitter)\n  }\n\n  reconnectIfStale() {\n    if (this.connectionIsStale()) {\n      logger.log(`ConnectionMonitor detected stale connection. reconnectAttempts = ${this.reconnectAttempts}, time stale = ${secondsSince(this.refreshedAt)} s, stale threshold = ${this.constructor.staleThreshold} s`)\n      this.reconnectAttempts++\n      if (this.disconnectedRecently()) {\n        logger.log(`ConnectionMonitor skipping reopening recent disconnect. time disconnected = ${secondsSince(this.disconnectedAt)} s`)\n      } else {\n        logger.log(\"ConnectionMonitor reopening\")\n        this.connection.reopen()\n      }\n    }\n  }\n\n  get refreshedAt() {\n    return this.pingedAt ? this.pingedAt : this.startedAt\n  }\n\n  connectionIsStale() {\n    return secondsSince(this.refreshedAt) > this.constructor.staleThreshold\n  }\n\n  disconnectedRecently() {\n    return this.disconnectedAt && (secondsSince(this.disconnectedAt) < this.constructor.staleThreshold)\n  }\n\n  visibilityDidChange() {\n    if (document.visibilityState === \"visible\") {\n      setTimeout(() => {\n        if (this.connectionIsStale() || !this.connection.isOpen()) {\n          logger.log(`ConnectionMonitor reopening stale connection on visibilitychange. visibilityState = ${document.visibilityState}`)\n          this.connection.reopen()\n        }\n      }\n      , 200)\n    }\n  }\n\n}\n\nConnectionMonitor.staleThreshold = 6 // Server::Connections::BEAT_INTERVAL * 2 (missed two pings)\nConnectionMonitor.reconnectionBackoffRate = 0.15\n\nexport default ConnectionMonitor\n", "export default {\n  \"message_types\": {\n    \"welcome\": \"welcome\",\n    \"disconnect\": \"disconnect\",\n    \"ping\": \"ping\",\n    \"confirmation\": \"confirm_subscription\",\n    \"rejection\": \"reject_subscription\"\n  },\n  \"disconnect_reasons\": {\n    \"unauthorized\": \"unauthorized\",\n    \"invalid_request\": \"invalid_request\",\n    \"server_restart\": \"server_restart\",\n    \"remote\": \"remote\"\n  },\n  \"default_mount_path\": \"/cable\",\n  \"protocols\": [\n    \"actioncable-v1-json\",\n    \"actioncable-unsupported\"\n  ]\n}\n", "import adapters from \"./adapters\"\nimport ConnectionMonitor from \"./connection_monitor\"\nimport INTERNAL from \"./internal\"\nimport logger from \"./logger\"\n\n// Encapsulate the cable connection held by the consumer. This is an internal class not intended for direct user manipulation.\n\nconst {message_types, protocols} = INTERNAL\nconst supportedProtocols = protocols.slice(0, protocols.length - 1)\n\nconst indexOf = [].indexOf\n\nclass Connection {\n  constructor(consumer) {\n    this.open = this.open.bind(this)\n    this.consumer = consumer\n    this.subscriptions = this.consumer.subscriptions\n    this.monitor = new ConnectionMonitor(this)\n    this.disconnected = true\n  }\n\n  send(data) {\n    if (this.isOpen()) {\n      this.webSocket.send(JSON.stringify(data))\n      return true\n    } else {\n      return false\n    }\n  }\n\n  open() {\n    if (this.isActive()) {\n      logger.log(`Attempted to open WebSocket, but existing socket is ${this.getState()}`)\n      return false\n    } else {\n      const socketProtocols = [...protocols, ...this.consumer.subprotocols || []]\n      logger.log(`Opening WebSocket, current state is ${this.getState()}, subprotocols: ${socketProtocols}`)\n      if (this.webSocket) { this.uninstallEventHandlers() }\n      this.webSocket = new adapters.WebSocket(this.consumer.url, socketProtocols)\n      this.installEventHandlers()\n      this.monitor.start()\n      return true\n    }\n  }\n\n  close({allowReconnect} = {allowReconnect: true}) {\n    if (!allowReconnect) { this.monitor.stop() }\n    // Avoid closing websockets in a \"connecting\" state due to Safari 15.1+ bug. See: https://github.com/rails/rails/issues/43835#issuecomment-1002288478\n    if (this.isOpen()) {\n      return this.webSocket.close()\n    }\n  }\n\n  reopen() {\n    logger.log(`Reopening WebSocket, current state is ${this.getState()}`)\n    if (this.isActive()) {\n      try {\n        return this.close()\n      } catch (error) {\n        logger.log(\"Failed to reopen WebSocket\", error)\n      }\n      finally {\n        logger.log(`Reopening WebSocket in ${this.constructor.reopenDelay}ms`)\n        setTimeout(this.open, this.constructor.reopenDelay)\n      }\n    } else {\n      return this.open()\n    }\n  }\n\n  getProtocol() {\n    if (this.webSocket) {\n      return this.webSocket.protocol\n    }\n  }\n\n  isOpen() {\n    return this.isState(\"open\")\n  }\n\n  isActive() {\n    return this.isState(\"open\", \"connecting\")\n  }\n\n  triedToReconnect() {\n    return this.monitor.reconnectAttempts > 0\n  }\n\n  // Private\n\n  isProtocolSupported() {\n    return indexOf.call(supportedProtocols, this.getProtocol()) >= 0\n  }\n\n  isState(...states) {\n    return indexOf.call(states, this.getState()) >= 0\n  }\n\n  getState() {\n    if (this.webSocket) {\n      for (let state in adapters.WebSocket) {\n        if (adapters.WebSocket[state] === this.webSocket.readyState) {\n          return state.toLowerCase()\n        }\n      }\n    }\n    return null\n  }\n\n  installEventHandlers() {\n    for (let eventName in this.events) {\n      const handler = this.events[eventName].bind(this)\n      this.webSocket[`on${eventName}`] = handler\n    }\n  }\n\n  uninstallEventHandlers() {\n    for (let eventName in this.events) {\n      this.webSocket[`on${eventName}`] = function() {}\n    }\n  }\n\n}\n\nConnection.reopenDelay = 500\n\nConnection.prototype.events = {\n  message(event) {\n    if (!this.isProtocolSupported()) { return }\n    const {identifier, message, reason, reconnect, type} = JSON.parse(event.data)\n    this.monitor.recordMessage()\n    switch (type) {\n      case message_types.welcome:\n        if (this.triedToReconnect()) {\n          this.reconnectAttempted = true\n        }\n        this.monitor.recordConnect()\n        return this.subscriptions.reload()\n      case message_types.disconnect:\n        logger.log(`Disconnecting. Reason: ${reason}`)\n        return this.close({allowReconnect: reconnect})\n      case message_types.ping:\n        return null\n      case message_types.confirmation:\n        this.subscriptions.confirmSubscription(identifier)\n        if (this.reconnectAttempted) {\n          this.reconnectAttempted = false\n          return this.subscriptions.notify(identifier, \"connected\", {reconnected: true})\n        } else {\n          return this.subscriptions.notify(identifier, \"connected\", {reconnected: false})\n        }\n      case message_types.rejection:\n        return this.subscriptions.reject(identifier)\n      default:\n        return this.subscriptions.notify(identifier, \"received\", message)\n    }\n  },\n\n  open() {\n    logger.log(`WebSocket onopen event, using '${this.getProtocol()}' subprotocol`)\n    this.disconnected = false\n    if (!this.isProtocolSupported()) {\n      logger.log(\"Protocol is unsupported. Stopping monitor and disconnecting.\")\n      return this.close({allowReconnect: false})\n    }\n  },\n\n  close(event) {\n    logger.log(\"WebSocket onclose event\")\n    if (this.disconnected) { return }\n    this.disconnected = true\n    this.monitor.recordDisconnect()\n    return this.subscriptions.notifyAll(\"disconnected\", {willAttemptReconnect: this.monitor.isRunning()})\n  },\n\n  error() {\n    logger.log(\"WebSocket onerror event\")\n  }\n}\n\nexport default Connection\n", "// A new subscription is created through the ActionCable.Subscriptions instance available on the consumer.\n// It provides a number of callbacks and a method for calling remote procedure calls on the corresponding\n// Channel instance on the server side.\n//\n// An example demonstrates the basic functionality:\n//\n//   App.appearance = App.cable.subscriptions.create(\"AppearanceChannel\", {\n//     connected() {\n//       // Called once the subscription has been successfully completed\n//     },\n//\n//     disconnected({ willAttemptReconnect: boolean }) {\n//       // Called when the client has disconnected with the server.\n//       // The object will have an `willAttemptReconnect` property which\n//       // says whether the client has the intention of attempting\n//       // to reconnect.\n//     },\n//\n//     appear() {\n//       this.perform('appear', {appearing_on: this.appearingOn()})\n//     },\n//\n//     away() {\n//       this.perform('away')\n//     },\n//\n//     appearingOn() {\n//       $('main').data('appearing-on')\n//     }\n//   })\n//\n// The methods #appear and #away forward their intent to the remote AppearanceChannel instance on the server\n// by calling the `perform` method with the first parameter being the action (which maps to AppearanceChannel#appear/away).\n// The second parameter is a hash that'll get JSON encoded and made available on the server in the data parameter.\n//\n// This is how the server component would look:\n//\n//   class AppearanceChannel < ApplicationActionCable::Channel\n//     def subscribed\n//       current_user.appear\n//     end\n//\n//     def unsubscribed\n//       current_user.disappear\n//     end\n//\n//     def appear(data)\n//       current_user.appear on: data['appearing_on']\n//     end\n//\n//     def away\n//       current_user.away\n//     end\n//   end\n//\n// The \"AppearanceChannel\" name is automatically mapped between the client-side subscription creation and the server-side Ruby class name.\n// The AppearanceChannel#appear/away public methods are exposed automatically to client-side invocation through the perform method.\n\nconst extend = function(object, properties) {\n  if (properties != null) {\n    for (let key in properties) {\n      const value = properties[key]\n      object[key] = value\n    }\n  }\n  return object\n}\n\nexport default class Subscription {\n  constructor(consumer, params = {}, mixin) {\n    this.consumer = consumer\n    this.identifier = JSON.stringify(params)\n    extend(this, mixin)\n  }\n\n  // Perform a channel action with the optional data passed as an attribute\n  perform(action, data = {}) {\n    data.action = action\n    return this.send(data)\n  }\n\n  send(data) {\n    return this.consumer.send({command: \"message\", identifier: this.identifier, data: JSON.stringify(data)})\n  }\n\n  unsubscribe() {\n    return this.consumer.subscriptions.remove(this)\n  }\n}\n", "import logger from \"./logger\"\n\n// Responsible for ensuring channel subscribe command is confirmed, retrying until confirmation is received.\n// Internal class, not intended for direct user manipulation.\n\nclass SubscriptionGuarantor {\n  constructor(subscriptions) {\n    this.subscriptions = subscriptions\n    this.pendingSubscriptions = []\n  }\n\n  guarantee(subscription) {\n    if(this.pendingSubscriptions.indexOf(subscription) == -1){ \n      logger.log(`SubscriptionGuarantor guaranteeing ${subscription.identifier}`)\n      this.pendingSubscriptions.push(subscription) \n    }\n    else {\n      logger.log(`SubscriptionGuarantor already guaranteeing ${subscription.identifier}`)\n    }\n    this.startGuaranteeing()\n  }\n\n  forget(subscription) {\n    logger.log(`SubscriptionGuarantor forgetting ${subscription.identifier}`)\n    this.pendingSubscriptions = (this.pendingSubscriptions.filter((s) => s !== subscription))\n  }\n\n  startGuaranteeing() {\n    this.stopGuaranteeing()\n    this.retrySubscribing()\n  }\n  \n  stopGuaranteeing() {\n    clearTimeout(this.retryTimeout)\n  }\n\n  retrySubscribing() {\n    this.retryTimeout = setTimeout(() => {\n      if (this.subscriptions && typeof(this.subscriptions.subscribe) === \"function\") {\n        this.pendingSubscriptions.map((subscription) => {\n          logger.log(`SubscriptionGuarantor resubscribing ${subscription.identifier}`)\n          this.subscriptions.subscribe(subscription)\n        })\n      }\n    }\n    , 500)\n  }\n}\n\nexport default SubscriptionGuarantor", "import logger from \"./logger\"\nimport Subscription from \"./subscription\"\nimport SubscriptionGuarantor from \"./subscription_guarantor\"\n\n// Collection class for creating (and internally managing) channel subscriptions.\n// The only method intended to be triggered by the user is ActionCable.Subscriptions#create,\n// and it should be called through the consumer like so:\n//\n//   App = {}\n//   App.cable = ActionCable.createConsumer(\"ws://example.com/accounts/1\")\n//   App.appearance = App.cable.subscriptions.create(\"AppearanceChannel\")\n//\n// For more details on how you'd configure an actual channel subscription, see ActionCable.Subscription.\n\nexport default class Subscriptions {\n  constructor(consumer) {\n    this.consumer = consumer\n    this.guarantor = new SubscriptionGuarantor(this)\n    this.subscriptions = []\n  }\n\n  create(channelName, mixin) {\n    const channel = channelName\n    const params = typeof channel === \"object\" ? channel : {channel}\n    const subscription = new Subscription(this.consumer, params, mixin)\n    return this.add(subscription)\n  }\n\n  // Private\n\n  add(subscription) {\n    this.subscriptions.push(subscription)\n    this.consumer.ensureActiveConnection()\n    this.notify(subscription, \"initialized\")\n    this.subscribe(subscription)\n    return subscription\n  }\n\n  remove(subscription) {\n    this.forget(subscription)\n    if (!this.findAll(subscription.identifier).length) {\n      this.sendCommand(subscription, \"unsubscribe\")\n    }\n    return subscription\n  }\n\n  reject(identifier) {\n    return this.findAll(identifier).map((subscription) => {\n      this.forget(subscription)\n      this.notify(subscription, \"rejected\")\n      return subscription\n    })\n  }\n\n  forget(subscription) {\n    this.guarantor.forget(subscription)\n    this.subscriptions = (this.subscriptions.filter((s) => s !== subscription))\n    return subscription\n  }\n\n  findAll(identifier) {\n    return this.subscriptions.filter((s) => s.identifier === identifier)\n  }\n\n  reload() {\n    return this.subscriptions.map((subscription) =>\n      this.subscribe(subscription))\n  }\n\n  notifyAll(callbackName, ...args) {\n    return this.subscriptions.map((subscription) =>\n      this.notify(subscription, callbackName, ...args))\n  }\n\n  notify(subscription, callbackName, ...args) {\n    let subscriptions\n    if (typeof subscription === \"string\") {\n      subscriptions = this.findAll(subscription)\n    } else {\n      subscriptions = [subscription]\n    }\n\n    return subscriptions.map((subscription) =>\n      (typeof subscription[callbackName] === \"function\" ? subscription[callbackName](...args) : undefined))\n  }\n\n  subscribe(subscription) {\n    if (this.sendCommand(subscription, \"subscribe\")) {\n      this.guarantor.guarantee(subscription)\n    }\n  }\n\n  confirmSubscription(identifier) {\n    logger.log(`Subscription confirmed ${identifier}`)\n    this.findAll(identifier).map((subscription) =>\n      this.guarantor.forget(subscription))\n  }\n\n  sendCommand(subscription, command) {\n    const {identifier} = subscription\n    return this.consumer.send({command, identifier})\n  }\n}\n", "import Connection from \"./connection\"\nimport Subscriptions from \"./subscriptions\"\n\n// The ActionCable.Consumer establishes the connection to a server-side Ruby Connection object. Once established,\n// the ActionCable.ConnectionMonitor will ensure that its properly maintained through heartbeats and checking for stale updates.\n// The Consumer instance is also the gateway to establishing subscriptions to desired channels through the #createSubscription\n// method.\n//\n// The following example shows how this can be set up:\n//\n//   App = {}\n//   App.cable = ActionCable.createConsumer(\"ws://example.com/accounts/1\")\n//   App.appearance = App.cable.subscriptions.create(\"AppearanceChannel\")\n//\n// For more details on how you'd configure an actual channel subscription, see ActionCable.Subscription.\n//\n// When a consumer is created, it automatically connects with the server.\n//\n// To disconnect from the server, call\n//\n//   App.cable.disconnect()\n//\n// and to restart the connection:\n//\n//   App.cable.connect()\n//\n// Any channel subscriptions which existed prior to disconnecting will\n// automatically resubscribe.\n\nexport default class Consumer {\n  constructor(url) {\n    this._url = url\n    this.subscriptions = new Subscriptions(this)\n    this.connection = new Connection(this)\n    this.subprotocols = []\n  }\n\n  get url() {\n    return createWebSocketURL(this._url)\n  }\n\n  send(data) {\n    return this.connection.send(data)\n  }\n\n  connect() {\n    return this.connection.open()\n  }\n\n  disconnect() {\n    return this.connection.close({allowReconnect: false})\n  }\n\n  ensureActiveConnection() {\n    if (!this.connection.isActive()) {\n      return this.connection.open()\n    }\n  }\n\n  addSubProtocol(subprotocol) {\n    this.subprotocols = [...this.subprotocols, subprotocol]\n  }\n}\n\nexport function createWebSocketURL(url) {\n  if (typeof url === \"function\") {\n    url = url()\n  }\n\n  if (url && !/^wss?:/i.test(url)) {\n    const a = document.createElement(\"a\")\n    a.href = url\n    // Fix populating Location properties in IE. Otherwise, protocol will be blank.\n    a.href = a.href // eslint-disable-line\n    a.protocol = a.protocol.replace(\"http\", \"ws\")\n    return a.href\n  } else {\n    return url\n  }\n}\n", "import adapters from \"./adapters\"\nimport Connection from \"./connection\"\nimport ConnectionMonitor from \"./connection_monitor\"\nimport Consumer, { createWebSocketURL } from \"./consumer\"\nimport INTERNAL from \"./internal\"\nimport logger from \"./logger\"\nimport Subscription from \"./subscription\"\nimport SubscriptionGuarantor from \"./subscription_guarantor\"\nimport Subscriptions from \"./subscriptions\"\n\nexport {\n  Connection,\n  ConnectionMonitor,\n  Consumer,\n  INTERNAL,\n  Subscription,\n  Subscriptions,\n  SubscriptionGuarantor,\n  adapters,\n  createWebSocketURL,\n  logger,\n}\n\nexport function createConsumer(url = getConfig(\"url\") || INTERNAL.default_mount_path) {\n  return new Consumer(url)\n}\n\nexport function getConfig(name) {\n  const element = document.head.querySelector(`meta[name='action-cable-${name}']`)\n  if (element) {\n    return element.getAttribute(\"content\")\n  }\n}\n", "/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n  var type = typeof value;\n  return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n", "/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n", "var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n", "var root = require('./_root');\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n *   console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n  return root.Date.now();\n};\n\nmodule.exports = now;\n", "/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n  var index = string.length;\n\n  while (index-- && reWhitespace.test(string.charAt(index))) {}\n  return index;\n}\n\nmodule.exports = trimmedEndIndex;\n", "var trimmedEndIndex = require('./_trimmedEndIndex');\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n  return string\n    ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n    : string;\n}\n\nmodule.exports = baseTrim;\n", "var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n", "var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n  var isOwn = hasOwnProperty.call(value, symToStringTag),\n      tag = value[symToStringTag];\n\n  try {\n    value[symToStringTag] = undefined;\n    var unmasked = true;\n  } catch (e) {}\n\n  var result = nativeObjectToString.call(value);\n  if (unmasked) {\n    if (isOwn) {\n      value[symToStringTag] = tag;\n    } else {\n      delete value[symToStringTag];\n    }\n  }\n  return result;\n}\n\nmodule.exports = getRawTag;\n", "/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n  return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n", "var Symbol = require('./_Symbol'),\n    getRawTag = require('./_getRawTag'),\n    objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n    undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n  if (value == null) {\n    return value === undefined ? undefinedTag : nullTag;\n  }\n  return (symToStringTag && symToStringTag in Object(value))\n    ? getRawTag(value)\n    : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n", "/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n  return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n", "var baseGetTag = require('./_baseGetTag'),\n    isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n  return typeof value == 'symbol' ||\n    (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n", "var baseTrim = require('./_baseTrim'),\n    isObject = require('./isObject'),\n    isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n  if (typeof value == 'number') {\n    return value;\n  }\n  if (isSymbol(value)) {\n    return NAN;\n  }\n  if (isObject(value)) {\n    var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n    value = isObject(other) ? (other + '') : other;\n  }\n  if (typeof value != 'string') {\n    return value === 0 ? value : +value;\n  }\n  value = baseTrim(value);\n  var isBinary = reIsBinary.test(value);\n  return (isBinary || reIsOctal.test(value))\n    ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n    : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n", "var isObject = require('./isObject'),\n    now = require('./now'),\n    toNumber = require('./toNumber');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n    nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n *  Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n *  The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n *  Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n *   'leading': true,\n *   'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n  var lastArgs,\n      lastThis,\n      maxWait,\n      result,\n      timerId,\n      lastCallTime,\n      lastInvokeTime = 0,\n      leading = false,\n      maxing = false,\n      trailing = true;\n\n  if (typeof func != 'function') {\n    throw new TypeError(FUNC_ERROR_TEXT);\n  }\n  wait = toNumber(wait) || 0;\n  if (isObject(options)) {\n    leading = !!options.leading;\n    maxing = 'maxWait' in options;\n    maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n    trailing = 'trailing' in options ? !!options.trailing : trailing;\n  }\n\n  function invokeFunc(time) {\n    var args = lastArgs,\n        thisArg = lastThis;\n\n    lastArgs = lastThis = undefined;\n    lastInvokeTime = time;\n    result = func.apply(thisArg, args);\n    return result;\n  }\n\n  function leadingEdge(time) {\n    // Reset any `maxWait` timer.\n    lastInvokeTime = time;\n    // Start the timer for the trailing edge.\n    timerId = setTimeout(timerExpired, wait);\n    // Invoke the leading edge.\n    return leading ? invokeFunc(time) : result;\n  }\n\n  function remainingWait(time) {\n    var timeSinceLastCall = time - lastCallTime,\n        timeSinceLastInvoke = time - lastInvokeTime,\n        timeWaiting = wait - timeSinceLastCall;\n\n    return maxing\n      ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n      : timeWaiting;\n  }\n\n  function shouldInvoke(time) {\n    var timeSinceLastCall = time - lastCallTime,\n        timeSinceLastInvoke = time - lastInvokeTime;\n\n    // Either this is the first call, activity has stopped and we're at the\n    // trailing edge, the system time has gone backwards and we're treating\n    // it as the trailing edge, or we've hit the `maxWait` limit.\n    return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n      (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n  }\n\n  function timerExpired() {\n    var time = now();\n    if (shouldInvoke(time)) {\n      return trailingEdge(time);\n    }\n    // Restart the timer.\n    timerId = setTimeout(timerExpired, remainingWait(time));\n  }\n\n  function trailingEdge(time) {\n    timerId = undefined;\n\n    // Only invoke if we have `lastArgs` which means `func` has been\n    // debounced at least once.\n    if (trailing && lastArgs) {\n      return invokeFunc(time);\n    }\n    lastArgs = lastThis = undefined;\n    return result;\n  }\n\n  function cancel() {\n    if (timerId !== undefined) {\n      clearTimeout(timerId);\n    }\n    lastInvokeTime = 0;\n    lastArgs = lastCallTime = lastThis = timerId = undefined;\n  }\n\n  function flush() {\n    return timerId === undefined ? result : trailingEdge(now());\n  }\n\n  function debounced() {\n    var time = now(),\n        isInvoking = shouldInvoke(time);\n\n    lastArgs = arguments;\n    lastThis = this;\n    lastCallTime = time;\n\n    if (isInvoking) {\n      if (timerId === undefined) {\n        return leadingEdge(lastCallTime);\n      }\n      if (maxing) {\n        // Handle invocations in a tight loop.\n        clearTimeout(timerId);\n        timerId = setTimeout(timerExpired, wait);\n        return invokeFunc(lastCallTime);\n      }\n    }\n    if (timerId === undefined) {\n      timerId = setTimeout(timerExpired, wait);\n    }\n    return result;\n  }\n  debounced.cancel = cancel;\n  debounced.flush = flush;\n  return debounced;\n}\n\nmodule.exports = debounce;\n", "var debounce = require('./debounce'),\n    isObject = require('./isObject');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n *  Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n *  Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\nfunction throttle(func, wait, options) {\n  var leading = true,\n      trailing = true;\n\n  if (typeof func != 'function') {\n    throw new TypeError(FUNC_ERROR_TEXT);\n  }\n  if (isObject(options)) {\n    leading = 'leading' in options ? !!options.leading : leading;\n    trailing = 'trailing' in options ? !!options.trailing : trailing;\n  }\n  return debounce(func, wait, {\n    'leading': leading,\n    'maxWait': wait,\n    'trailing': trailing\n  });\n}\n\nmodule.exports = throttle;\n", "var isSymbol = require('./isSymbol');\n\n/**\n * The base implementation of methods like `_.max` and `_.min` which accepts a\n * `comparator` to determine the extremum value.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The iteratee invoked per iteration.\n * @param {Function} comparator The comparator used to compare values.\n * @returns {*} Returns the extremum value.\n */\nfunction baseExtremum(array, iteratee, comparator) {\n  var index = -1,\n      length = array.length;\n\n  while (++index < length) {\n    var value = array[index],\n        current = iteratee(value);\n\n    if (current != null && (computed === undefined\n          ? (current === current && !isSymbol(current))\n          : comparator(current, computed)\n        )) {\n      var computed = current,\n          result = value;\n    }\n  }\n  return result;\n}\n\nmodule.exports = baseExtremum;\n", "/**\n * The base implementation of `_.gt` which doesn't coerce arguments.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than `other`,\n *  else `false`.\n */\nfunction baseGt(value, other) {\n  return value > other;\n}\n\nmodule.exports = baseGt;\n", "/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n  this.__data__ = [];\n  this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n", "/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n  return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n", "var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n  var length = array.length;\n  while (length--) {\n    if (eq(array[length][0], key)) {\n      return length;\n    }\n  }\n  return -1;\n}\n\nmodule.exports = assocIndexOf;\n", "var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n  var data = this.__data__,\n      index = assocIndexOf(data, key);\n\n  if (index < 0) {\n    return false;\n  }\n  var lastIndex = data.length - 1;\n  if (index == lastIndex) {\n    data.pop();\n  } else {\n    splice.call(data, index, 1);\n  }\n  --this.size;\n  return true;\n}\n\nmodule.exports = listCacheDelete;\n", "var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n  var data = this.__data__,\n      index = assocIndexOf(data, key);\n\n  return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n", "var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n  return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n", "var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n  var data = this.__data__,\n      index = assocIndexOf(data, key);\n\n  if (index < 0) {\n    ++this.size;\n    data.push([key, value]);\n  } else {\n    data[index][1] = value;\n  }\n  return this;\n}\n\nmodule.exports = listCacheSet;\n", "var listCacheClear = require('./_listCacheClear'),\n    listCacheDelete = require('./_listCacheDelete'),\n    listCacheGet = require('./_listCacheGet'),\n    listCacheHas = require('./_listCacheHas'),\n    listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n  var index = -1,\n      length = entries == null ? 0 : entries.length;\n\n  this.clear();\n  while (++index < length) {\n    var entry = entries[index];\n    this.set(entry[0], entry[1]);\n  }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n", "var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n  this.__data__ = new ListCache;\n  this.size = 0;\n}\n\nmodule.exports = stackClear;\n", "/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n  var data = this.__data__,\n      result = data['delete'](key);\n\n  this.size = data.size;\n  return result;\n}\n\nmodule.exports = stackDelete;\n", "/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n  return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n", "/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n  return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n", "var baseGetTag = require('./_baseGetTag'),\n    isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n    funcTag = '[object Function]',\n    genTag = '[object GeneratorFunction]',\n    proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n  if (!isObject(value)) {\n    return false;\n  }\n  // The use of `Object#toString` avoids issues with the `typeof` operator\n  // in Safari 9 which returns 'object' for typed arrays and other constructors.\n  var tag = baseGetTag(value);\n  return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n", "var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n", "var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n  var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n  return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n  return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n", "/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n  if (func != null) {\n    try {\n      return funcToString.call(func);\n    } catch (e) {}\n    try {\n      return (func + '');\n    } catch (e) {}\n  }\n  return '';\n}\n\nmodule.exports = toSource;\n", "var isFunction = require('./isFunction'),\n    isMasked = require('./_isMasked'),\n    isObject = require('./isObject'),\n    toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n    objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n  funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n  .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n *  else `false`.\n */\nfunction baseIsNative(value) {\n  if (!isObject(value) || isMasked(value)) {\n    return false;\n  }\n  var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n  return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n", "/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n  return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n", "var baseIsNative = require('./_baseIsNative'),\n    getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n  var value = getValue(object, key);\n  return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n", "var getNative = require('./_getNative'),\n    root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n", "var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n", "var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n  this.__data__ = nativeCreate ? nativeCreate(null) : {};\n  this.size = 0;\n}\n\nmodule.exports = hashClear;\n", "/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n  var result = this.has(key) && delete this.__data__[key];\n  this.size -= result ? 1 : 0;\n  return result;\n}\n\nmodule.exports = hashDelete;\n", "var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n  var data = this.__data__;\n  if (nativeCreate) {\n    var result = data[key];\n    return result === HASH_UNDEFINED ? undefined : result;\n  }\n  return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n", "var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n  var data = this.__data__;\n  return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n", "var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n  var data = this.__data__;\n  this.size += this.has(key) ? 0 : 1;\n  data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n  return this;\n}\n\nmodule.exports = hashSet;\n", "var hashClear = require('./_hashClear'),\n    hashDelete = require('./_hashDelete'),\n    hashGet = require('./_hashGet'),\n    hashHas = require('./_hashHas'),\n    hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n  var index = -1,\n      length = entries == null ? 0 : entries.length;\n\n  this.clear();\n  while (++index < length) {\n    var entry = entries[index];\n    this.set(entry[0], entry[1]);\n  }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n", "var Hash = require('./_Hash'),\n    ListCache = require('./_ListCache'),\n    Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n  this.size = 0;\n  this.__data__ = {\n    'hash': new Hash,\n    'map': new (Map || ListCache),\n    'string': new Hash\n  };\n}\n\nmodule.exports = mapCacheClear;\n", "/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n  var type = typeof value;\n  return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n    ? (value !== '__proto__')\n    : (value === null);\n}\n\nmodule.exports = isKeyable;\n", "var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n  var data = map.__data__;\n  return isKeyable(key)\n    ? data[typeof key == 'string' ? 'string' : 'hash']\n    : data.map;\n}\n\nmodule.exports = getMapData;\n", "var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n  var result = getMapData(this, key)['delete'](key);\n  this.size -= result ? 1 : 0;\n  return result;\n}\n\nmodule.exports = mapCacheDelete;\n", "var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n  return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n", "var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n  return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n", "var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n  var data = getMapData(this, key),\n      size = data.size;\n\n  data.set(key, value);\n  this.size += data.size == size ? 0 : 1;\n  return this;\n}\n\nmodule.exports = mapCacheSet;\n", "var mapCacheClear = require('./_mapCacheClear'),\n    mapCacheDelete = require('./_mapCacheDelete'),\n    mapCacheGet = require('./_mapCacheGet'),\n    mapCacheHas = require('./_mapCacheHas'),\n    mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n  var index = -1,\n      length = entries == null ? 0 : entries.length;\n\n  this.clear();\n  while (++index < length) {\n    var entry = entries[index];\n    this.set(entry[0], entry[1]);\n  }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n", "var ListCache = require('./_ListCache'),\n    Map = require('./_Map'),\n    MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n  var data = this.__data__;\n  if (data instanceof ListCache) {\n    var pairs = data.__data__;\n    if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n      pairs.push([key, value]);\n      this.size = ++data.size;\n      return this;\n    }\n    data = this.__data__ = new MapCache(pairs);\n  }\n  data.set(key, value);\n  this.size = data.size;\n  return this;\n}\n\nmodule.exports = stackSet;\n", "var ListCache = require('./_ListCache'),\n    stackClear = require('./_stackClear'),\n    stackDelete = require('./_stackDelete'),\n    stackGet = require('./_stackGet'),\n    stackHas = require('./_stackHas'),\n    stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n  var data = this.__data__ = new ListCache(entries);\n  this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n", "/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n  this.__data__.set(value, HASH_UNDEFINED);\n  return this;\n}\n\nmodule.exports = setCacheAdd;\n", "/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {boolean} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n  return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n", "var MapCache = require('./_MapCache'),\n    setCacheAdd = require('./_setCacheAdd'),\n    setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n  var index = -1,\n      length = values == null ? 0 : values.length;\n\n  this.__data__ = new MapCache;\n  while (++index < length) {\n    this.add(values[index]);\n  }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n", "/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n *  else `false`.\n */\nfunction arraySome(array, predicate) {\n  var index = -1,\n      length = array == null ? 0 : array.length;\n\n  while (++index < length) {\n    if (predicate(array[index], index, array)) {\n      return true;\n    }\n  }\n  return false;\n}\n\nmodule.exports = arraySome;\n", "/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n  return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n", "var SetCache = require('./_SetCache'),\n    arraySome = require('./_arraySome'),\n    cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n    COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n  var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n      arrLength = array.length,\n      othLength = other.length;\n\n  if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n    return false;\n  }\n  // Check that cyclic values are equal.\n  var arrStacked = stack.get(array);\n  var othStacked = stack.get(other);\n  if (arrStacked && othStacked) {\n    return arrStacked == other && othStacked == array;\n  }\n  var index = -1,\n      result = true,\n      seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n  stack.set(array, other);\n  stack.set(other, array);\n\n  // Ignore non-index properties.\n  while (++index < arrLength) {\n    var arrValue = array[index],\n        othValue = other[index];\n\n    if (customizer) {\n      var compared = isPartial\n        ? customizer(othValue, arrValue, index, other, array, stack)\n        : customizer(arrValue, othValue, index, array, other, stack);\n    }\n    if (compared !== undefined) {\n      if (compared) {\n        continue;\n      }\n      result = false;\n      break;\n    }\n    // Recursively compare arrays (susceptible to call stack limits).\n    if (seen) {\n      if (!arraySome(other, function(othValue, othIndex) {\n            if (!cacheHas(seen, othIndex) &&\n                (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n              return seen.push(othIndex);\n            }\n          })) {\n        result = false;\n        break;\n      }\n    } else if (!(\n          arrValue === othValue ||\n            equalFunc(arrValue, othValue, bitmask, customizer, stack)\n        )) {\n      result = false;\n      break;\n    }\n  }\n  stack['delete'](array);\n  stack['delete'](other);\n  return result;\n}\n\nmodule.exports = equalArrays;\n", "var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n", "/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n  var index = -1,\n      result = Array(map.size);\n\n  map.forEach(function(value, key) {\n    result[++index] = [key, value];\n  });\n  return result;\n}\n\nmodule.exports = mapToArray;\n", "/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n  var index = -1,\n      result = Array(set.size);\n\n  set.forEach(function(value) {\n    result[++index] = value;\n  });\n  return result;\n}\n\nmodule.exports = setToArray;\n", "var Symbol = require('./_Symbol'),\n    Uint8Array = require('./_Uint8Array'),\n    eq = require('./eq'),\n    equalArrays = require('./_equalArrays'),\n    mapToArray = require('./_mapToArray'),\n    setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n    COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n    dateTag = '[object Date]',\n    errorTag = '[object Error]',\n    mapTag = '[object Map]',\n    numberTag = '[object Number]',\n    regexpTag = '[object RegExp]',\n    setTag = '[object Set]',\n    stringTag = '[object String]',\n    symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n    dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n    symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n  switch (tag) {\n    case dataViewTag:\n      if ((object.byteLength != other.byteLength) ||\n          (object.byteOffset != other.byteOffset)) {\n        return false;\n      }\n      object = object.buffer;\n      other = other.buffer;\n\n    case arrayBufferTag:\n      if ((object.byteLength != other.byteLength) ||\n          !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n        return false;\n      }\n      return true;\n\n    case boolTag:\n    case dateTag:\n    case numberTag:\n      // Coerce booleans to `1` or `0` and dates to milliseconds.\n      // Invalid dates are coerced to `NaN`.\n      return eq(+object, +other);\n\n    case errorTag:\n      return object.name == other.name && object.message == other.message;\n\n    case regexpTag:\n    case stringTag:\n      // Coerce regexes to strings and treat strings, primitives and objects,\n      // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n      // for more details.\n      return object == (other + '');\n\n    case mapTag:\n      var convert = mapToArray;\n\n    case setTag:\n      var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n      convert || (convert = setToArray);\n\n      if (object.size != other.size && !isPartial) {\n        return false;\n      }\n      // Assume cyclic values are equal.\n      var stacked = stack.get(object);\n      if (stacked) {\n        return stacked == other;\n      }\n      bitmask |= COMPARE_UNORDERED_FLAG;\n\n      // Recursively compare objects (susceptible to call stack limits).\n      stack.set(object, other);\n      var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n      stack['delete'](object);\n      return result;\n\n    case symbolTag:\n      if (symbolValueOf) {\n        return symbolValueOf.call(object) == symbolValueOf.call(other);\n      }\n  }\n  return false;\n}\n\nmodule.exports = equalByTag;\n", "/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n  var index = -1,\n      length = values.length,\n      offset = array.length;\n\n  while (++index < length) {\n    array[offset + index] = values[index];\n  }\n  return array;\n}\n\nmodule.exports = arrayPush;\n", "/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n", "var arrayPush = require('./_arrayPush'),\n    isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n  var result = keysFunc(object);\n  return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n", "/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n  var index = -1,\n      length = array == null ? 0 : array.length,\n      resIndex = 0,\n      result = [];\n\n  while (++index < length) {\n    var value = array[index];\n    if (predicate(value, index, array)) {\n      result[resIndex++] = value;\n    }\n  }\n  return result;\n}\n\nmodule.exports = arrayFilter;\n", "/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n  return [];\n}\n\nmodule.exports = stubArray;\n", "var arrayFilter = require('./_arrayFilter'),\n    stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n  if (object == null) {\n    return [];\n  }\n  object = Object(object);\n  return arrayFilter(nativeGetSymbols(object), function(symbol) {\n    return propertyIsEnumerable.call(object, symbol);\n  });\n};\n\nmodule.exports = getSymbols;\n", "/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n  var index = -1,\n      result = Array(n);\n\n  while (++index < n) {\n    result[index] = iteratee(index);\n  }\n  return result;\n}\n\nmodule.exports = baseTimes;\n", "var baseGetTag = require('./_baseGetTag'),\n    isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n  return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n", "var baseIsArguments = require('./_baseIsArguments'),\n    isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n *  else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n  return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n    !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n", "/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n  return false;\n}\n\nmodule.exports = stubFalse;\n", "var root = require('./_root'),\n    stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n", "/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n  var type = typeof value;\n  length = length == null ? MAX_SAFE_INTEGER : length;\n\n  return !!length &&\n    (type == 'number' ||\n      (type != 'symbol' && reIsUint.test(value))) &&\n        (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n", "/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n  return typeof value == 'number' &&\n    value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n", "var baseGetTag = require('./_baseGetTag'),\n    isLength = require('./isLength'),\n    isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n    arrayTag = '[object Array]',\n    boolTag = '[object Boolean]',\n    dateTag = '[object Date]',\n    errorTag = '[object Error]',\n    funcTag = '[object Function]',\n    mapTag = '[object Map]',\n    numberTag = '[object Number]',\n    objectTag = '[object Object]',\n    regexpTag = '[object RegExp]',\n    setTag = '[object Set]',\n    stringTag = '[object String]',\n    weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n    dataViewTag = '[object DataView]',\n    float32Tag = '[object Float32Array]',\n    float64Tag = '[object Float64Array]',\n    int8Tag = '[object Int8Array]',\n    int16Tag = '[object Int16Array]',\n    int32Tag = '[object Int32Array]',\n    uint8Tag = '[object Uint8Array]',\n    uint8ClampedTag = '[object Uint8ClampedArray]',\n    uint16Tag = '[object Uint16Array]',\n    uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n  return isObjectLike(value) &&\n    isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n", "/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n  return function(value) {\n    return func(value);\n  };\n}\n\nmodule.exports = baseUnary;\n", "var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n  try {\n    // Use `util.types` for Node.js 10+.\n    var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n    if (types) {\n      return types;\n    }\n\n    // Legacy `process.binding('util')` for Node.js < 10.\n    return freeProcess && freeProcess.binding && freeProcess.binding('util');\n  } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n", "var baseIsTypedArray = require('./_baseIsTypedArray'),\n    baseUnary = require('./_baseUnary'),\n    nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n", "var baseTimes = require('./_baseTimes'),\n    isArguments = require('./isArguments'),\n    isArray = require('./isArray'),\n    isBuffer = require('./isBuffer'),\n    isIndex = require('./_isIndex'),\n    isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n  var isArr = isArray(value),\n      isArg = !isArr && isArguments(value),\n      isBuff = !isArr && !isArg && isBuffer(value),\n      isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n      skipIndexes = isArr || isArg || isBuff || isType,\n      result = skipIndexes ? baseTimes(value.length, String) : [],\n      length = result.length;\n\n  for (var key in value) {\n    if ((inherited || hasOwnProperty.call(value, key)) &&\n        !(skipIndexes && (\n           // Safari 9 has enumerable `arguments.length` in strict mode.\n           key == 'length' ||\n           // Node.js 0.10 has enumerable non-index properties on buffers.\n           (isBuff && (key == 'offset' || key == 'parent')) ||\n           // PhantomJS 2 has enumerable non-index properties on typed arrays.\n           (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n           // Skip index properties.\n           isIndex(key, length)\n        ))) {\n      result.push(key);\n    }\n  }\n  return result;\n}\n\nmodule.exports = arrayLikeKeys;\n", "/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n  var Ctor = value && value.constructor,\n      proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n  return value === proto;\n}\n\nmodule.exports = isPrototype;\n", "/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n  return function(arg) {\n    return func(transform(arg));\n  };\n}\n\nmodule.exports = overArg;\n", "var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n", "var isPrototype = require('./_isPrototype'),\n    nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n  if (!isPrototype(object)) {\n    return nativeKeys(object);\n  }\n  var result = [];\n  for (var key in Object(object)) {\n    if (hasOwnProperty.call(object, key) && key != 'constructor') {\n      result.push(key);\n    }\n  }\n  return result;\n}\n\nmodule.exports = baseKeys;\n", "var isFunction = require('./isFunction'),\n    isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n  return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n", "var arrayLikeKeys = require('./_arrayLikeKeys'),\n    baseKeys = require('./_baseKeys'),\n    isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n *   this.a = 1;\n *   this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n  return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n", "var baseGetAllKeys = require('./_baseGetAllKeys'),\n    getSymbols = require('./_getSymbols'),\n    keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n  return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n", "var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n  var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n      objProps = getAllKeys(object),\n      objLength = objProps.length,\n      othProps = getAllKeys(other),\n      othLength = othProps.length;\n\n  if (objLength != othLength && !isPartial) {\n    return false;\n  }\n  var index = objLength;\n  while (index--) {\n    var key = objProps[index];\n    if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n      return false;\n    }\n  }\n  // Check that cyclic values are equal.\n  var objStacked = stack.get(object);\n  var othStacked = stack.get(other);\n  if (objStacked && othStacked) {\n    return objStacked == other && othStacked == object;\n  }\n  var result = true;\n  stack.set(object, other);\n  stack.set(other, object);\n\n  var skipCtor = isPartial;\n  while (++index < objLength) {\n    key = objProps[index];\n    var objValue = object[key],\n        othValue = other[key];\n\n    if (customizer) {\n      var compared = isPartial\n        ? customizer(othValue, objValue, key, other, object, stack)\n        : customizer(objValue, othValue, key, object, other, stack);\n    }\n    // Recursively compare objects (susceptible to call stack limits).\n    if (!(compared === undefined\n          ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n          : compared\n        )) {\n      result = false;\n      break;\n    }\n    skipCtor || (skipCtor = key == 'constructor');\n  }\n  if (result && !skipCtor) {\n    var objCtor = object.constructor,\n        othCtor = other.constructor;\n\n    // Non `Object` object instances with different constructors are not equal.\n    if (objCtor != othCtor &&\n        ('constructor' in object && 'constructor' in other) &&\n        !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n          typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n      result = false;\n    }\n  }\n  stack['delete'](object);\n  stack['delete'](other);\n  return result;\n}\n\nmodule.exports = equalObjects;\n", "var getNative = require('./_getNative'),\n    root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n", "var getNative = require('./_getNative'),\n    root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n", "var getNative = require('./_getNative'),\n    root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n", "var getNative = require('./_getNative'),\n    root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n", "var DataView = require('./_DataView'),\n    Map = require('./_Map'),\n    Promise = require('./_Promise'),\n    Set = require('./_Set'),\n    WeakMap = require('./_WeakMap'),\n    baseGetTag = require('./_baseGetTag'),\n    toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n    objectTag = '[object Object]',\n    promiseTag = '[object Promise]',\n    setTag = '[object Set]',\n    weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n    mapCtorString = toSource(Map),\n    promiseCtorString = toSource(Promise),\n    setCtorString = toSource(Set),\n    weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n    (Map && getTag(new Map) != mapTag) ||\n    (Promise && getTag(Promise.resolve()) != promiseTag) ||\n    (Set && getTag(new Set) != setTag) ||\n    (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n  getTag = function(value) {\n    var result = baseGetTag(value),\n        Ctor = result == objectTag ? value.constructor : undefined,\n        ctorString = Ctor ? toSource(Ctor) : '';\n\n    if (ctorString) {\n      switch (ctorString) {\n        case dataViewCtorString: return dataViewTag;\n        case mapCtorString: return mapTag;\n        case promiseCtorString: return promiseTag;\n        case setCtorString: return setTag;\n        case weakMapCtorString: return weakMapTag;\n      }\n    }\n    return result;\n  };\n}\n\nmodule.exports = getTag;\n", "var Stack = require('./_Stack'),\n    equalArrays = require('./_equalArrays'),\n    equalByTag = require('./_equalByTag'),\n    equalObjects = require('./_equalObjects'),\n    getTag = require('./_getTag'),\n    isArray = require('./isArray'),\n    isBuffer = require('./isBuffer'),\n    isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n    arrayTag = '[object Array]',\n    objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n  var objIsArr = isArray(object),\n      othIsArr = isArray(other),\n      objTag = objIsArr ? arrayTag : getTag(object),\n      othTag = othIsArr ? arrayTag : getTag(other);\n\n  objTag = objTag == argsTag ? objectTag : objTag;\n  othTag = othTag == argsTag ? objectTag : othTag;\n\n  var objIsObj = objTag == objectTag,\n      othIsObj = othTag == objectTag,\n      isSameTag = objTag == othTag;\n\n  if (isSameTag && isBuffer(object)) {\n    if (!isBuffer(other)) {\n      return false;\n    }\n    objIsArr = true;\n    objIsObj = false;\n  }\n  if (isSameTag && !objIsObj) {\n    stack || (stack = new Stack);\n    return (objIsArr || isTypedArray(object))\n      ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n      : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n  }\n  if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n    var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n        othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n    if (objIsWrapped || othIsWrapped) {\n      var objUnwrapped = objIsWrapped ? object.value() : object,\n          othUnwrapped = othIsWrapped ? other.value() : other;\n\n      stack || (stack = new Stack);\n      return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n    }\n  }\n  if (!isSameTag) {\n    return false;\n  }\n  stack || (stack = new Stack);\n  return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n", "var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n    isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n *  1 - Unordered comparison\n *  2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n  if (value === other) {\n    return true;\n  }\n  if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n    return value !== value && other !== other;\n  }\n  return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n", "var Stack = require('./_Stack'),\n    baseIsEqual = require('./_baseIsEqual');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n    COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * The base implementation of `_.isMatch` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Array} matchData The property names, values, and compare flags to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n */\nfunction baseIsMatch(object, source, matchData, customizer) {\n  var index = matchData.length,\n      length = index,\n      noCustomizer = !customizer;\n\n  if (object == null) {\n    return !length;\n  }\n  object = Object(object);\n  while (index--) {\n    var data = matchData[index];\n    if ((noCustomizer && data[2])\n          ? data[1] !== object[data[0]]\n          : !(data[0] in object)\n        ) {\n      return false;\n    }\n  }\n  while (++index < length) {\n    data = matchData[index];\n    var key = data[0],\n        objValue = object[key],\n        srcValue = data[1];\n\n    if (noCustomizer && data[2]) {\n      if (objValue === undefined && !(key in object)) {\n        return false;\n      }\n    } else {\n      var stack = new Stack;\n      if (customizer) {\n        var result = customizer(objValue, srcValue, key, object, source, stack);\n      }\n      if (!(result === undefined\n            ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)\n            : result\n          )) {\n        return false;\n      }\n    }\n  }\n  return true;\n}\n\nmodule.exports = baseIsMatch;\n", "var isObject = require('./isObject');\n\n/**\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` if suitable for strict\n *  equality comparisons, else `false`.\n */\nfunction isStrictComparable(value) {\n  return value === value && !isObject(value);\n}\n\nmodule.exports = isStrictComparable;\n", "var isStrictComparable = require('./_isStrictComparable'),\n    keys = require('./keys');\n\n/**\n * Gets the property names, values, and compare flags of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the match data of `object`.\n */\nfunction getMatchData(object) {\n  var result = keys(object),\n      length = result.length;\n\n  while (length--) {\n    var key = result[length],\n        value = object[key];\n\n    result[length] = [key, value, isStrictComparable(value)];\n  }\n  return result;\n}\n\nmodule.exports = getMatchData;\n", "/**\n * A specialized version of `matchesProperty` for source values suitable\n * for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction matchesStrictComparable(key, srcValue) {\n  return function(object) {\n    if (object == null) {\n      return false;\n    }\n    return object[key] === srcValue &&\n      (srcValue !== undefined || (key in Object(object)));\n  };\n}\n\nmodule.exports = matchesStrictComparable;\n", "var baseIsMatch = require('./_baseIsMatch'),\n    getMatchData = require('./_getMatchData'),\n    matchesStrictComparable = require('./_matchesStrictComparable');\n\n/**\n * The base implementation of `_.matches` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatches(source) {\n  var matchData = getMatchData(source);\n  if (matchData.length == 1 && matchData[0][2]) {\n    return matchesStrictComparable(matchData[0][0], matchData[0][1]);\n  }\n  return function(object) {\n    return object === source || baseIsMatch(object, source, matchData);\n  };\n}\n\nmodule.exports = baseMatches;\n", "var isArray = require('./isArray'),\n    isSymbol = require('./isSymbol');\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n    reIsPlainProp = /^\\w*$/;\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n  if (isArray(value)) {\n    return false;\n  }\n  var type = typeof value;\n  if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n      value == null || isSymbol(value)) {\n    return true;\n  }\n  return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n    (object != null && value in Object(object));\n}\n\nmodule.exports = isKey;\n", "var MapCache = require('./_MapCache');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\nfunction memoize(func, resolver) {\n  if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n    throw new TypeError(FUNC_ERROR_TEXT);\n  }\n  var memoized = function() {\n    var args = arguments,\n        key = resolver ? resolver.apply(this, args) : args[0],\n        cache = memoized.cache;\n\n    if (cache.has(key)) {\n      return cache.get(key);\n    }\n    var result = func.apply(this, args);\n    memoized.cache = cache.set(key, result) || cache;\n    return result;\n  };\n  memoized.cache = new (memoize.Cache || MapCache);\n  return memoized;\n}\n\n// Expose `MapCache`.\nmemoize.Cache = MapCache;\n\nmodule.exports = memoize;\n", "var memoize = require('./memoize');\n\n/** Used as the maximum memoize cache size. */\nvar MAX_MEMOIZE_SIZE = 500;\n\n/**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\nfunction memoizeCapped(func) {\n  var result = memoize(func, function(key) {\n    if (cache.size === MAX_MEMOIZE_SIZE) {\n      cache.clear();\n    }\n    return key;\n  });\n\n  var cache = result.cache;\n  return result;\n}\n\nmodule.exports = memoizeCapped;\n", "var memoizeCapped = require('./_memoizeCapped');\n\n/** Used to match property names within property paths. */\nvar rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\nvar stringToPath = memoizeCapped(function(string) {\n  var result = [];\n  if (string.charCodeAt(0) === 46 /* . */) {\n    result.push('');\n  }\n  string.replace(rePropName, function(match, number, quote, subString) {\n    result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n  });\n  return result;\n});\n\nmodule.exports = stringToPath;\n", "/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n  var index = -1,\n      length = array == null ? 0 : array.length,\n      result = Array(length);\n\n  while (++index < length) {\n    result[index] = iteratee(array[index], index, array);\n  }\n  return result;\n}\n\nmodule.exports = arrayMap;\n", "var Symbol = require('./_Symbol'),\n    arrayMap = require('./_arrayMap'),\n    isArray = require('./isArray'),\n    isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n    symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n  // Exit early for strings to avoid a performance hit in some environments.\n  if (typeof value == 'string') {\n    return value;\n  }\n  if (isArray(value)) {\n    // Recursively convert values (susceptible to call stack limits).\n    return arrayMap(value, baseToString) + '';\n  }\n  if (isSymbol(value)) {\n    return symbolToString ? symbolToString.call(value) : '';\n  }\n  var result = (value + '');\n  return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = baseToString;\n", "var baseToString = require('./_baseToString');\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n  return value == null ? '' : baseToString(value);\n}\n\nmodule.exports = toString;\n", "var isArray = require('./isArray'),\n    isKey = require('./_isKey'),\n    stringToPath = require('./_stringToPath'),\n    toString = require('./toString');\n\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value, object) {\n  if (isArray(value)) {\n    return value;\n  }\n  return isKey(value, object) ? [value] : stringToPath(toString(value));\n}\n\nmodule.exports = castPath;\n", "var isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n  if (typeof value == 'string' || isSymbol(value)) {\n    return value;\n  }\n  var result = (value + '');\n  return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = toKey;\n", "var castPath = require('./_castPath'),\n    toKey = require('./_toKey');\n\n/**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\nfunction baseGet(object, path) {\n  path = castPath(path, object);\n\n  var index = 0,\n      length = path.length;\n\n  while (object != null && index < length) {\n    object = object[toKey(path[index++])];\n  }\n  return (index && index == length) ? object : undefined;\n}\n\nmodule.exports = baseGet;\n", "var baseGet = require('./_baseGet');\n\n/**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\nfunction get(object, path, defaultValue) {\n  var result = object == null ? undefined : baseGet(object, path);\n  return result === undefined ? defaultValue : result;\n}\n\nmodule.exports = get;\n", "/**\n * The base implementation of `_.hasIn` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\nfunction baseHasIn(object, key) {\n  return object != null && key in Object(object);\n}\n\nmodule.exports = baseHasIn;\n", "var castPath = require('./_castPath'),\n    isArguments = require('./isArguments'),\n    isArray = require('./isArray'),\n    isIndex = require('./_isIndex'),\n    isLength = require('./isLength'),\n    toKey = require('./_toKey');\n\n/**\n * Checks if `path` exists on `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @param {Function} hasFunc The function to check properties.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n */\nfunction hasPath(object, path, hasFunc) {\n  path = castPath(path, object);\n\n  var index = -1,\n      length = path.length,\n      result = false;\n\n  while (++index < length) {\n    var key = toKey(path[index]);\n    if (!(result = object != null && hasFunc(object, key))) {\n      break;\n    }\n    object = object[key];\n  }\n  if (result || ++index != length) {\n    return result;\n  }\n  length = object == null ? 0 : object.length;\n  return !!length && isLength(length) && isIndex(key, length) &&\n    (isArray(object) || isArguments(object));\n}\n\nmodule.exports = hasPath;\n", "var baseHasIn = require('./_baseHasIn'),\n    hasPath = require('./_hasPath');\n\n/**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b');\n * // => true\n *\n * _.hasIn(object, ['a', 'b']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */\nfunction hasIn(object, path) {\n  return object != null && hasPath(object, path, baseHasIn);\n}\n\nmodule.exports = hasIn;\n", "var baseIsEqual = require('./_baseIsEqual'),\n    get = require('./get'),\n    hasIn = require('./hasIn'),\n    isKey = require('./_isKey'),\n    isStrictComparable = require('./_isStrictComparable'),\n    matchesStrictComparable = require('./_matchesStrictComparable'),\n    toKey = require('./_toKey');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n    COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n *\n * @private\n * @param {string} path The path of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatchesProperty(path, srcValue) {\n  if (isKey(path) && isStrictComparable(srcValue)) {\n    return matchesStrictComparable(toKey(path), srcValue);\n  }\n  return function(object) {\n    var objValue = get(object, path);\n    return (objValue === undefined && objValue === srcValue)\n      ? hasIn(object, path)\n      : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\n  };\n}\n\nmodule.exports = baseMatchesProperty;\n", "/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n  return value;\n}\n\nmodule.exports = identity;\n", "/**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction baseProperty(key) {\n  return function(object) {\n    return object == null ? undefined : object[key];\n  };\n}\n\nmodule.exports = baseProperty;\n", "var baseGet = require('./_baseGet');\n\n/**\n * A specialized version of `baseProperty` which supports deep paths.\n *\n * @private\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction basePropertyDeep(path) {\n  return function(object) {\n    return baseGet(object, path);\n  };\n}\n\nmodule.exports = basePropertyDeep;\n", "var baseProperty = require('./_baseProperty'),\n    basePropertyDeep = require('./_basePropertyDeep'),\n    isKey = require('./_isKey'),\n    toKey = require('./_toKey');\n\n/**\n * Creates a function that returns the value at `path` of a given object.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n * @example\n *\n * var objects = [\n *   { 'a': { 'b': 2 } },\n *   { 'a': { 'b': 1 } }\n * ];\n *\n * _.map(objects, _.property('a.b'));\n * // => [2, 1]\n *\n * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');\n * // => [1, 2]\n */\nfunction property(path) {\n  return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);\n}\n\nmodule.exports = property;\n", "var baseMatches = require('./_baseMatches'),\n    baseMatchesProperty = require('./_baseMatchesProperty'),\n    identity = require('./identity'),\n    isArray = require('./isArray'),\n    property = require('./property');\n\n/**\n * The base implementation of `_.iteratee`.\n *\n * @private\n * @param {*} [value=_.identity] The value to convert to an iteratee.\n * @returns {Function} Returns the iteratee.\n */\nfunction baseIteratee(value) {\n  // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n  // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\n  if (typeof value == 'function') {\n    return value;\n  }\n  if (value == null) {\n    return identity;\n  }\n  if (typeof value == 'object') {\n    return isArray(value)\n      ? baseMatchesProperty(value[0], value[1])\n      : baseMatches(value);\n  }\n  return property(value);\n}\n\nmodule.exports = baseIteratee;\n", "var baseExtremum = require('./_baseExtremum'),\n    baseGt = require('./_baseGt'),\n    baseIteratee = require('./_baseIteratee');\n\n/**\n * This method is like `_.max` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the criterion by which\n * the value is ranked. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Math\n * @param {Array} array The array to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {*} Returns the maximum value.\n * @example\n *\n * var objects = [{ 'n': 1 }, { 'n': 2 }];\n *\n * _.maxBy(objects, function(o) { return o.n; });\n * // => { 'n': 2 }\n *\n * // The `_.property` iteratee shorthand.\n * _.maxBy(objects, 'n');\n * // => { 'n': 2 }\n */\nfunction maxBy(array, iteratee) {\n  return (array && array.length)\n    ? baseExtremum(array, baseIteratee(iteratee, 2), baseGt)\n    : undefined;\n}\n\nmodule.exports = maxBy;\n", "/**\n * @license\n * Lodash <https://lodash.com/>\n * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n;(function() {\n\n  /** Used as a safe reference for `undefined` in pre-ES5 environments. */\n  var undefined;\n\n  /** Used as the semantic version number. */\n  var VERSION = '4.18.1';\n\n  /** Used as the size to enable large array optimizations. */\n  var LARGE_ARRAY_SIZE = 200;\n\n  /** Error message constants. */\n  var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',\n      FUNC_ERROR_TEXT = 'Expected a function',\n      INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`',\n      INVALID_TEMPL_IMPORTS_ERROR_TEXT = 'Invalid `imports` option passed into `_.template`';\n\n  /** Used to stand-in for `undefined` hash values. */\n  var HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n  /** Used as the maximum memoize cache size. */\n  var MAX_MEMOIZE_SIZE = 500;\n\n  /** Used as the internal argument placeholder. */\n  var PLACEHOLDER = '__lodash_placeholder__';\n\n  /** Used to compose bitmasks for cloning. */\n  var CLONE_DEEP_FLAG = 1,\n      CLONE_FLAT_FLAG = 2,\n      CLONE_SYMBOLS_FLAG = 4;\n\n  /** Used to compose bitmasks for value comparisons. */\n  var COMPARE_PARTIAL_FLAG = 1,\n      COMPARE_UNORDERED_FLAG = 2;\n\n  /** Used to compose bitmasks for function metadata. */\n  var WRAP_BIND_FLAG = 1,\n      WRAP_BIND_KEY_FLAG = 2,\n      WRAP_CURRY_BOUND_FLAG = 4,\n      WRAP_CURRY_FLAG = 8,\n      WRAP_CURRY_RIGHT_FLAG = 16,\n      WRAP_PARTIAL_FLAG = 32,\n      WRAP_PARTIAL_RIGHT_FLAG = 64,\n      WRAP_ARY_FLAG = 128,\n      WRAP_REARG_FLAG = 256,\n      WRAP_FLIP_FLAG = 512;\n\n  /** Used as default options for `_.truncate`. */\n  var DEFAULT_TRUNC_LENGTH = 30,\n      DEFAULT_TRUNC_OMISSION = '...';\n\n  /** Used to detect hot functions by number of calls within a span of milliseconds. */\n  var HOT_COUNT = 800,\n      HOT_SPAN = 16;\n\n  /** Used to indicate the type of lazy iteratees. */\n  var LAZY_FILTER_FLAG = 1,\n      LAZY_MAP_FLAG = 2,\n      LAZY_WHILE_FLAG = 3;\n\n  /** Used as references for various `Number` constants. */\n  var INFINITY = 1 / 0,\n      MAX_SAFE_INTEGER = 9007199254740991,\n      MAX_INTEGER = 1.7976931348623157e+308,\n      NAN = 0 / 0;\n\n  /** Used as references for the maximum length and index of an array. */\n  var MAX_ARRAY_LENGTH = 4294967295,\n      MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,\n      HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;\n\n  /** Used to associate wrap methods with their bit flags. */\n  var wrapFlags = [\n    ['ary', WRAP_ARY_FLAG],\n    ['bind', WRAP_BIND_FLAG],\n    ['bindKey', WRAP_BIND_KEY_FLAG],\n    ['curry', WRAP_CURRY_FLAG],\n    ['curryRight', WRAP_CURRY_RIGHT_FLAG],\n    ['flip', WRAP_FLIP_FLAG],\n    ['partial', WRAP_PARTIAL_FLAG],\n    ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],\n    ['rearg', WRAP_REARG_FLAG]\n  ];\n\n  /** `Object#toString` result references. */\n  var argsTag = '[object Arguments]',\n      arrayTag = '[object Array]',\n      asyncTag = '[object AsyncFunction]',\n      boolTag = '[object Boolean]',\n      dateTag = '[object Date]',\n      domExcTag = '[object DOMException]',\n      errorTag = '[object Error]',\n      funcTag = '[object Function]',\n      genTag = '[object GeneratorFunction]',\n      mapTag = '[object Map]',\n      numberTag = '[object Number]',\n      nullTag = '[object Null]',\n      objectTag = '[object Object]',\n      promiseTag = '[object Promise]',\n      proxyTag = '[object Proxy]',\n      regexpTag = '[object RegExp]',\n      setTag = '[object Set]',\n      stringTag = '[object String]',\n      symbolTag = '[object Symbol]',\n      undefinedTag = '[object Undefined]',\n      weakMapTag = '[object WeakMap]',\n      weakSetTag = '[object WeakSet]';\n\n  var arrayBufferTag = '[object ArrayBuffer]',\n      dataViewTag = '[object DataView]',\n      float32Tag = '[object Float32Array]',\n      float64Tag = '[object Float64Array]',\n      int8Tag = '[object Int8Array]',\n      int16Tag = '[object Int16Array]',\n      int32Tag = '[object Int32Array]',\n      uint8Tag = '[object Uint8Array]',\n      uint8ClampedTag = '[object Uint8ClampedArray]',\n      uint16Tag = '[object Uint16Array]',\n      uint32Tag = '[object Uint32Array]';\n\n  /** Used to match empty string literals in compiled template source. */\n  var reEmptyStringLeading = /\\b__p \\+= '';/g,\n      reEmptyStringMiddle = /\\b(__p \\+=) '' \\+/g,\n      reEmptyStringTrailing = /(__e\\(.*?\\)|\\b__t\\)) \\+\\n'';/g;\n\n  /** Used to match HTML entities and HTML characters. */\n  var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,\n      reUnescapedHtml = /[&<>\"']/g,\n      reHasEscapedHtml = RegExp(reEscapedHtml.source),\n      reHasUnescapedHtml = RegExp(reUnescapedHtml.source);\n\n  /** Used to match template delimiters. */\n  var reEscape = /<%-([\\s\\S]+?)%>/g,\n      reEvaluate = /<%([\\s\\S]+?)%>/g,\n      reInterpolate = /<%=([\\s\\S]+?)%>/g;\n\n  /** Used to match property names within property paths. */\n  var reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n      reIsPlainProp = /^\\w*$/,\n      rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n  /**\n   * Used to match `RegExp`\n   * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n   */\n  var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g,\n      reHasRegExpChar = RegExp(reRegExpChar.source);\n\n  /** Used to match leading whitespace. */\n  var reTrimStart = /^\\s+/;\n\n  /** Used to match a single whitespace character. */\n  var reWhitespace = /\\s/;\n\n  /** Used to match wrap detail comments. */\n  var reWrapComment = /\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/,\n      reWrapDetails = /\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,\n      reSplitDetails = /,? & /;\n\n  /** Used to match words composed of alphanumeric characters. */\n  var reAsciiWord = /[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g;\n\n  /**\n   * Used to validate the `validate` option in `_.template` variable.\n   *\n   * Forbids characters which could potentially change the meaning of the function argument definition:\n   * - \"(),\" (modification of function parameters)\n   * - \"=\" (default value)\n   * - \"[]{}\" (destructuring of function parameters)\n   * - \"/\" (beginning of a comment)\n   * - whitespace\n   */\n  var reForbiddenIdentifierChars = /[()=,{}\\[\\]\\/\\s]/;\n\n  /** Used to match backslashes in property paths. */\n  var reEscapeChar = /\\\\(\\\\)?/g;\n\n  /**\n   * Used to match\n   * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).\n   */\n  var reEsTemplate = /\\$\\{([^\\\\}]*(?:\\\\.[^\\\\}]*)*)\\}/g;\n\n  /** Used to match `RegExp` flags from their coerced string values. */\n  var reFlags = /\\w*$/;\n\n  /** Used to detect bad signed hexadecimal string values. */\n  var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n  /** Used to detect binary string values. */\n  var reIsBinary = /^0b[01]+$/i;\n\n  /** Used to detect host constructors (Safari). */\n  var reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n  /** Used to detect octal string values. */\n  var reIsOctal = /^0o[0-7]+$/i;\n\n  /** Used to detect unsigned integer values. */\n  var reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n  /** Used to match Latin Unicode letters (excluding mathematical operators). */\n  var reLatin = /[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g;\n\n  /** Used to ensure capturing order of template delimiters. */\n  var reNoMatch = /($^)/;\n\n  /** Used to match unescaped characters in compiled string literals. */\n  var reUnescapedString = /['\\n\\r\\u2028\\u2029\\\\]/g;\n\n  /** Used to compose unicode character classes. */\n  var rsAstralRange = '\\\\ud800-\\\\udfff',\n      rsComboMarksRange = '\\\\u0300-\\\\u036f',\n      reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n      rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n      rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n      rsDingbatRange = '\\\\u2700-\\\\u27bf',\n      rsLowerRange = 'a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff',\n      rsMathOpRange = '\\\\xac\\\\xb1\\\\xd7\\\\xf7',\n      rsNonCharRange = '\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf',\n      rsPunctuationRange = '\\\\u2000-\\\\u206f',\n      rsSpaceRange = ' \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000',\n      rsUpperRange = 'A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde',\n      rsVarRange = '\\\\ufe0e\\\\ufe0f',\n      rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;\n\n  /** Used to compose unicode capture groups. */\n  var rsApos = \"['\\u2019]\",\n      rsAstral = '[' + rsAstralRange + ']',\n      rsBreak = '[' + rsBreakRange + ']',\n      rsCombo = '[' + rsComboRange + ']',\n      rsDigits = '\\\\d+',\n      rsDingbat = '[' + rsDingbatRange + ']',\n      rsLower = '[' + rsLowerRange + ']',\n      rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',\n      rsFitz = '\\\\ud83c[\\\\udffb-\\\\udfff]',\n      rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',\n      rsNonAstral = '[^' + rsAstralRange + ']',\n      rsRegional = '(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}',\n      rsSurrPair = '[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]',\n      rsUpper = '[' + rsUpperRange + ']',\n      rsZWJ = '\\\\u200d';\n\n  /** Used to compose unicode regexes. */\n  var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',\n      rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',\n      rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',\n      rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',\n      reOptMod = rsModifier + '?',\n      rsOptVar = '[' + rsVarRange + ']?',\n      rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\n      rsOrdLower = '\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])',\n      rsOrdUpper = '\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])',\n      rsSeq = rsOptVar + reOptMod + rsOptJoin,\n      rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,\n      rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';\n\n  /** Used to match apostrophes. */\n  var reApos = RegExp(rsApos, 'g');\n\n  /**\n   * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and\n   * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).\n   */\n  var reComboMark = RegExp(rsCombo, 'g');\n\n  /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */\n  var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');\n\n  /** Used to match complex or compound words. */\n  var reUnicodeWord = RegExp([\n    rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',\n    rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',\n    rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,\n    rsUpper + '+' + rsOptContrUpper,\n    rsOrdUpper,\n    rsOrdLower,\n    rsDigits,\n    rsEmoji\n  ].join('|'), 'g');\n\n  /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */\n  var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange  + rsComboRange + rsVarRange + ']');\n\n  /** Used to detect strings that need a more robust regexp to match words. */\n  var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;\n\n  /** Used to assign default `context` object properties. */\n  var contextProps = [\n    'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array',\n    'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',\n    'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array',\n    'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap',\n    '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'\n  ];\n\n  /** Used to make template sourceURLs easier to identify. */\n  var templateCounter = -1;\n\n  /** Used to identify `toStringTag` values of typed arrays. */\n  var typedArrayTags = {};\n  typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\n  typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\n  typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\n  typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\n  typedArrayTags[uint32Tag] = true;\n  typedArrayTags[argsTag] = typedArrayTags[arrayTag] =\n  typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\n  typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\n  typedArrayTags[errorTag] = typedArrayTags[funcTag] =\n  typedArrayTags[mapTag] = typedArrayTags[numberTag] =\n  typedArrayTags[objectTag] = typedArrayTags[regexpTag] =\n  typedArrayTags[setTag] = typedArrayTags[stringTag] =\n  typedArrayTags[weakMapTag] = false;\n\n  /** Used to identify `toStringTag` values supported by `_.clone`. */\n  var cloneableTags = {};\n  cloneableTags[argsTag] = cloneableTags[arrayTag] =\n  cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\n  cloneableTags[boolTag] = cloneableTags[dateTag] =\n  cloneableTags[float32Tag] = cloneableTags[float64Tag] =\n  cloneableTags[int8Tag] = cloneableTags[int16Tag] =\n  cloneableTags[int32Tag] = cloneableTags[mapTag] =\n  cloneableTags[numberTag] = cloneableTags[objectTag] =\n  cloneableTags[regexpTag] = cloneableTags[setTag] =\n  cloneableTags[stringTag] = cloneableTags[symbolTag] =\n  cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\n  cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\n  cloneableTags[errorTag] = cloneableTags[funcTag] =\n  cloneableTags[weakMapTag] = false;\n\n  /** Used to map Latin Unicode letters to basic Latin letters. */\n  var deburredLetters = {\n    // Latin-1 Supplement block.\n    '\\xc0': 'A',  '\\xc1': 'A', '\\xc2': 'A', '\\xc3': 'A', '\\xc4': 'A', '\\xc5': 'A',\n    '\\xe0': 'a',  '\\xe1': 'a', '\\xe2': 'a', '\\xe3': 'a', '\\xe4': 'a', '\\xe5': 'a',\n    '\\xc7': 'C',  '\\xe7': 'c',\n    '\\xd0': 'D',  '\\xf0': 'd',\n    '\\xc8': 'E',  '\\xc9': 'E', '\\xca': 'E', '\\xcb': 'E',\n    '\\xe8': 'e',  '\\xe9': 'e', '\\xea': 'e', '\\xeb': 'e',\n    '\\xcc': 'I',  '\\xcd': 'I', '\\xce': 'I', '\\xcf': 'I',\n    '\\xec': 'i',  '\\xed': 'i', '\\xee': 'i', '\\xef': 'i',\n    '\\xd1': 'N',  '\\xf1': 'n',\n    '\\xd2': 'O',  '\\xd3': 'O', '\\xd4': 'O', '\\xd5': 'O', '\\xd6': 'O', '\\xd8': 'O',\n    '\\xf2': 'o',  '\\xf3': 'o', '\\xf4': 'o', '\\xf5': 'o', '\\xf6': 'o', '\\xf8': 'o',\n    '\\xd9': 'U',  '\\xda': 'U', '\\xdb': 'U', '\\xdc': 'U',\n    '\\xf9': 'u',  '\\xfa': 'u', '\\xfb': 'u', '\\xfc': 'u',\n    '\\xdd': 'Y',  '\\xfd': 'y', '\\xff': 'y',\n    '\\xc6': 'Ae', '\\xe6': 'ae',\n    '\\xde': 'Th', '\\xfe': 'th',\n    '\\xdf': 'ss',\n    // Latin Extended-A block.\n    '\\u0100': 'A',  '\\u0102': 'A', '\\u0104': 'A',\n    '\\u0101': 'a',  '\\u0103': 'a', '\\u0105': 'a',\n    '\\u0106': 'C',  '\\u0108': 'C', '\\u010a': 'C', '\\u010c': 'C',\n    '\\u0107': 'c',  '\\u0109': 'c', '\\u010b': 'c', '\\u010d': 'c',\n    '\\u010e': 'D',  '\\u0110': 'D', '\\u010f': 'd', '\\u0111': 'd',\n    '\\u0112': 'E',  '\\u0114': 'E', '\\u0116': 'E', '\\u0118': 'E', '\\u011a': 'E',\n    '\\u0113': 'e',  '\\u0115': 'e', '\\u0117': 'e', '\\u0119': 'e', '\\u011b': 'e',\n    '\\u011c': 'G',  '\\u011e': 'G', '\\u0120': 'G', '\\u0122': 'G',\n    '\\u011d': 'g',  '\\u011f': 'g', '\\u0121': 'g', '\\u0123': 'g',\n    '\\u0124': 'H',  '\\u0126': 'H', '\\u0125': 'h', '\\u0127': 'h',\n    '\\u0128': 'I',  '\\u012a': 'I', '\\u012c': 'I', '\\u012e': 'I', '\\u0130': 'I',\n    '\\u0129': 'i',  '\\u012b': 'i', '\\u012d': 'i', '\\u012f': 'i', '\\u0131': 'i',\n    '\\u0134': 'J',  '\\u0135': 'j',\n    '\\u0136': 'K',  '\\u0137': 'k', '\\u0138': 'k',\n    '\\u0139': 'L',  '\\u013b': 'L', '\\u013d': 'L', '\\u013f': 'L', '\\u0141': 'L',\n    '\\u013a': 'l',  '\\u013c': 'l', '\\u013e': 'l', '\\u0140': 'l', '\\u0142': 'l',\n    '\\u0143': 'N',  '\\u0145': 'N', '\\u0147': 'N', '\\u014a': 'N',\n    '\\u0144': 'n',  '\\u0146': 'n', '\\u0148': 'n', '\\u014b': 'n',\n    '\\u014c': 'O',  '\\u014e': 'O', '\\u0150': 'O',\n    '\\u014d': 'o',  '\\u014f': 'o', '\\u0151': 'o',\n    '\\u0154': 'R',  '\\u0156': 'R', '\\u0158': 'R',\n    '\\u0155': 'r',  '\\u0157': 'r', '\\u0159': 'r',\n    '\\u015a': 'S',  '\\u015c': 'S', '\\u015e': 'S', '\\u0160': 'S',\n    '\\u015b': 's',  '\\u015d': 's', '\\u015f': 's', '\\u0161': 's',\n    '\\u0162': 'T',  '\\u0164': 'T', '\\u0166': 'T',\n    '\\u0163': 't',  '\\u0165': 't', '\\u0167': 't',\n    '\\u0168': 'U',  '\\u016a': 'U', '\\u016c': 'U', '\\u016e': 'U', '\\u0170': 'U', '\\u0172': 'U',\n    '\\u0169': 'u',  '\\u016b': 'u', '\\u016d': 'u', '\\u016f': 'u', '\\u0171': 'u', '\\u0173': 'u',\n    '\\u0174': 'W',  '\\u0175': 'w',\n    '\\u0176': 'Y',  '\\u0177': 'y', '\\u0178': 'Y',\n    '\\u0179': 'Z',  '\\u017b': 'Z', '\\u017d': 'Z',\n    '\\u017a': 'z',  '\\u017c': 'z', '\\u017e': 'z',\n    '\\u0132': 'IJ', '\\u0133': 'ij',\n    '\\u0152': 'Oe', '\\u0153': 'oe',\n    '\\u0149': \"'n\", '\\u017f': 's'\n  };\n\n  /** Used to map characters to HTML entities. */\n  var htmlEscapes = {\n    '&': '&amp;',\n    '<': '&lt;',\n    '>': '&gt;',\n    '\"': '&quot;',\n    \"'\": '&#39;'\n  };\n\n  /** Used to map HTML entities to characters. */\n  var htmlUnescapes = {\n    '&amp;': '&',\n    '&lt;': '<',\n    '&gt;': '>',\n    '&quot;': '\"',\n    '&#39;': \"'\"\n  };\n\n  /** Used to escape characters for inclusion in compiled string literals. */\n  var stringEscapes = {\n    '\\\\': '\\\\',\n    \"'\": \"'\",\n    '\\n': 'n',\n    '\\r': 'r',\n    '\\u2028': 'u2028',\n    '\\u2029': 'u2029'\n  };\n\n  /** Built-in method references without a dependency on `root`. */\n  var freeParseFloat = parseFloat,\n      freeParseInt = parseInt;\n\n  /** Detect free variable `global` from Node.js. */\n  var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n  /** Detect free variable `self`. */\n  var freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n  /** Used as a reference to the global object. */\n  var root = freeGlobal || freeSelf || Function('return this')();\n\n  /** Detect free variable `exports`. */\n  var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n  /** Detect free variable `module`. */\n  var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n  /** Detect the popular CommonJS extension `module.exports`. */\n  var moduleExports = freeModule && freeModule.exports === freeExports;\n\n  /** Detect free variable `process` from Node.js. */\n  var freeProcess = moduleExports && freeGlobal.process;\n\n  /** Used to access faster Node.js helpers. */\n  var nodeUtil = (function() {\n    try {\n      // Use `util.types` for Node.js 10+.\n      var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n      if (types) {\n        return types;\n      }\n\n      // Legacy `process.binding('util')` for Node.js < 10.\n      return freeProcess && freeProcess.binding && freeProcess.binding('util');\n    } catch (e) {}\n  }());\n\n  /* Node.js helper references. */\n  var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer,\n      nodeIsDate = nodeUtil && nodeUtil.isDate,\n      nodeIsMap = nodeUtil && nodeUtil.isMap,\n      nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,\n      nodeIsSet = nodeUtil && nodeUtil.isSet,\n      nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n  /*--------------------------------------------------------------------------*/\n\n  /**\n   * A faster alternative to `Function#apply`, this function invokes `func`\n   * with the `this` binding of `thisArg` and the arguments of `args`.\n   *\n   * @private\n   * @param {Function} func The function to invoke.\n   * @param {*} thisArg The `this` binding of `func`.\n   * @param {Array} args The arguments to invoke `func` with.\n   * @returns {*} Returns the result of `func`.\n   */\n  function apply(func, thisArg, args) {\n    switch (args.length) {\n      case 0: return func.call(thisArg);\n      case 1: return func.call(thisArg, args[0]);\n      case 2: return func.call(thisArg, args[0], args[1]);\n      case 3: return func.call(thisArg, args[0], args[1], args[2]);\n    }\n    return func.apply(thisArg, args);\n  }\n\n  /**\n   * A specialized version of `baseAggregator` for arrays.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} setter The function to set `accumulator` values.\n   * @param {Function} iteratee The iteratee to transform keys.\n   * @param {Object} accumulator The initial aggregated object.\n   * @returns {Function} Returns `accumulator`.\n   */\n  function arrayAggregator(array, setter, iteratee, accumulator) {\n    var index = -1,\n        length = array == null ? 0 : array.length;\n\n    while (++index < length) {\n      var value = array[index];\n      setter(accumulator, value, iteratee(value), array);\n    }\n    return accumulator;\n  }\n\n  /**\n   * A specialized version of `_.forEach` for arrays without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @returns {Array} Returns `array`.\n   */\n  function arrayEach(array, iteratee) {\n    var index = -1,\n        length = array == null ? 0 : array.length;\n\n    while (++index < length) {\n      if (iteratee(array[index], index, array) === false) {\n        break;\n      }\n    }\n    return array;\n  }\n\n  /**\n   * A specialized version of `_.forEachRight` for arrays without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @returns {Array} Returns `array`.\n   */\n  function arrayEachRight(array, iteratee) {\n    var length = array == null ? 0 : array.length;\n\n    while (length--) {\n      if (iteratee(array[length], length, array) === false) {\n        break;\n      }\n    }\n    return array;\n  }\n\n  /**\n   * A specialized version of `_.every` for arrays without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} predicate The function invoked per iteration.\n   * @returns {boolean} Returns `true` if all elements pass the predicate check,\n   *  else `false`.\n   */\n  function arrayEvery(array, predicate) {\n    var index = -1,\n        length = array == null ? 0 : array.length;\n\n    while (++index < length) {\n      if (!predicate(array[index], index, array)) {\n        return false;\n      }\n    }\n    return true;\n  }\n\n  /**\n   * A specialized version of `_.filter` for arrays without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} predicate The function invoked per iteration.\n   * @returns {Array} Returns the new filtered array.\n   */\n  function arrayFilter(array, predicate) {\n    var index = -1,\n        length = array == null ? 0 : array.length,\n        resIndex = 0,\n        result = [];\n\n    while (++index < length) {\n      var value = array[index];\n      if (predicate(value, index, array)) {\n        result[resIndex++] = value;\n      }\n    }\n    return result;\n  }\n\n  /**\n   * A specialized version of `_.includes` for arrays without support for\n   * specifying an index to search from.\n   *\n   * @private\n   * @param {Array} [array] The array to inspect.\n   * @param {*} target The value to search for.\n   * @returns {boolean} Returns `true` if `target` is found, else `false`.\n   */\n  function arrayIncludes(array, value) {\n    var length = array == null ? 0 : array.length;\n    return !!length && baseIndexOf(array, value, 0) > -1;\n  }\n\n  /**\n   * This function is like `arrayIncludes` except that it accepts a comparator.\n   *\n   * @private\n   * @param {Array} [array] The array to inspect.\n   * @param {*} target The value to search for.\n   * @param {Function} comparator The comparator invoked per element.\n   * @returns {boolean} Returns `true` if `target` is found, else `false`.\n   */\n  function arrayIncludesWith(array, value, comparator) {\n    var index = -1,\n        length = array == null ? 0 : array.length;\n\n    while (++index < length) {\n      if (comparator(value, array[index])) {\n        return true;\n      }\n    }\n    return false;\n  }\n\n  /**\n   * A specialized version of `_.map` for arrays without support for iteratee\n   * shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @returns {Array} Returns the new mapped array.\n   */\n  function arrayMap(array, iteratee) {\n    var index = -1,\n        length = array == null ? 0 : array.length,\n        result = Array(length);\n\n    while (++index < length) {\n      result[index] = iteratee(array[index], index, array);\n    }\n    return result;\n  }\n\n  /**\n   * Appends the elements of `values` to `array`.\n   *\n   * @private\n   * @param {Array} array The array to modify.\n   * @param {Array} values The values to append.\n   * @returns {Array} Returns `array`.\n   */\n  function arrayPush(array, values) {\n    var index = -1,\n        length = values.length,\n        offset = array.length;\n\n    while (++index < length) {\n      array[offset + index] = values[index];\n    }\n    return array;\n  }\n\n  /**\n   * A specialized version of `_.reduce` for arrays without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @param {*} [accumulator] The initial value.\n   * @param {boolean} [initAccum] Specify using the first element of `array` as\n   *  the initial value.\n   * @returns {*} Returns the accumulated value.\n   */\n  function arrayReduce(array, iteratee, accumulator, initAccum) {\n    var index = -1,\n        length = array == null ? 0 : array.length;\n\n    if (initAccum && length) {\n      accumulator = array[++index];\n    }\n    while (++index < length) {\n      accumulator = iteratee(accumulator, array[index], index, array);\n    }\n    return accumulator;\n  }\n\n  /**\n   * A specialized version of `_.reduceRight` for arrays without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @param {*} [accumulator] The initial value.\n   * @param {boolean} [initAccum] Specify using the last element of `array` as\n   *  the initial value.\n   * @returns {*} Returns the accumulated value.\n   */\n  function arrayReduceRight(array, iteratee, accumulator, initAccum) {\n    var length = array == null ? 0 : array.length;\n    if (initAccum && length) {\n      accumulator = array[--length];\n    }\n    while (length--) {\n      accumulator = iteratee(accumulator, array[length], length, array);\n    }\n    return accumulator;\n  }\n\n  /**\n   * A specialized version of `_.some` for arrays without support for iteratee\n   * shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} predicate The function invoked per iteration.\n   * @returns {boolean} Returns `true` if any element passes the predicate check,\n   *  else `false`.\n   */\n  function arraySome(array, predicate) {\n    var index = -1,\n        length = array == null ? 0 : array.length;\n\n    while (++index < length) {\n      if (predicate(array[index], index, array)) {\n        return true;\n      }\n    }\n    return false;\n  }\n\n  /**\n   * Gets the size of an ASCII `string`.\n   *\n   * @private\n   * @param {string} string The string inspect.\n   * @returns {number} Returns the string size.\n   */\n  var asciiSize = baseProperty('length');\n\n  /**\n   * Converts an ASCII `string` to an array.\n   *\n   * @private\n   * @param {string} string The string to convert.\n   * @returns {Array} Returns the converted array.\n   */\n  function asciiToArray(string) {\n    return string.split('');\n  }\n\n  /**\n   * Splits an ASCII `string` into an array of its words.\n   *\n   * @private\n   * @param {string} The string to inspect.\n   * @returns {Array} Returns the words of `string`.\n   */\n  function asciiWords(string) {\n    return string.match(reAsciiWord) || [];\n  }\n\n  /**\n   * The base implementation of methods like `_.findKey` and `_.findLastKey`,\n   * without support for iteratee shorthands, which iterates over `collection`\n   * using `eachFunc`.\n   *\n   * @private\n   * @param {Array|Object} collection The collection to inspect.\n   * @param {Function} predicate The function invoked per iteration.\n   * @param {Function} eachFunc The function to iterate over `collection`.\n   * @returns {*} Returns the found element or its key, else `undefined`.\n   */\n  function baseFindKey(collection, predicate, eachFunc) {\n    var result;\n    eachFunc(collection, function(value, key, collection) {\n      if (predicate(value, key, collection)) {\n        result = key;\n        return false;\n      }\n    });\n    return result;\n  }\n\n  /**\n   * The base implementation of `_.findIndex` and `_.findLastIndex` without\n   * support for iteratee shorthands.\n   *\n   * @private\n   * @param {Array} array The array to inspect.\n   * @param {Function} predicate The function invoked per iteration.\n   * @param {number} fromIndex The index to search from.\n   * @param {boolean} [fromRight] Specify iterating from right to left.\n   * @returns {number} Returns the index of the matched value, else `-1`.\n   */\n  function baseFindIndex(array, predicate, fromIndex, fromRight) {\n    var length = array.length,\n        index = fromIndex + (fromRight ? 1 : -1);\n\n    while ((fromRight ? index-- : ++index < length)) {\n      if (predicate(array[index], index, array)) {\n        return index;\n      }\n    }\n    return -1;\n  }\n\n  /**\n   * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n   *\n   * @private\n   * @param {Array} array The array to inspect.\n   * @param {*} value The value to search for.\n   * @param {number} fromIndex The index to search from.\n   * @returns {number} Returns the index of the matched value, else `-1`.\n   */\n  function baseIndexOf(array, value, fromIndex) {\n    return value === value\n      ? strictIndexOf(array, value, fromIndex)\n      : baseFindIndex(array, baseIsNaN, fromIndex);\n  }\n\n  /**\n   * This function is like `baseIndexOf` except that it accepts a comparator.\n   *\n   * @private\n   * @param {Array} array The array to inspect.\n   * @param {*} value The value to search for.\n   * @param {number} fromIndex The index to search from.\n   * @param {Function} comparator The comparator invoked per element.\n   * @returns {number} Returns the index of the matched value, else `-1`.\n   */\n  function baseIndexOfWith(array, value, fromIndex, comparator) {\n    var index = fromIndex - 1,\n        length = array.length;\n\n    while (++index < length) {\n      if (comparator(array[index], value)) {\n        return index;\n      }\n    }\n    return -1;\n  }\n\n  /**\n   * The base implementation of `_.isNaN` without support for number objects.\n   *\n   * @private\n   * @param {*} value The value to check.\n   * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n   */\n  function baseIsNaN(value) {\n    return value !== value;\n  }\n\n  /**\n   * The base implementation of `_.mean` and `_.meanBy` without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} array The array to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @returns {number} Returns the mean.\n   */\n  function baseMean(array, iteratee) {\n    var length = array == null ? 0 : array.length;\n    return length ? (baseSum(array, iteratee) / length) : NAN;\n  }\n\n  /**\n   * The base implementation of `_.property` without support for deep paths.\n   *\n   * @private\n   * @param {string} key The key of the property to get.\n   * @returns {Function} Returns the new accessor function.\n   */\n  function baseProperty(key) {\n    return function(object) {\n      return object == null ? undefined : object[key];\n    };\n  }\n\n  /**\n   * The base implementation of `_.propertyOf` without support for deep paths.\n   *\n   * @private\n   * @param {Object} object The object to query.\n   * @returns {Function} Returns the new accessor function.\n   */\n  function basePropertyOf(object) {\n    return function(key) {\n      return object == null ? undefined : object[key];\n    };\n  }\n\n  /**\n   * The base implementation of `_.reduce` and `_.reduceRight`, without support\n   * for iteratee shorthands, which iterates over `collection` using `eachFunc`.\n   *\n   * @private\n   * @param {Array|Object} collection The collection to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @param {*} accumulator The initial value.\n   * @param {boolean} initAccum Specify using the first or last element of\n   *  `collection` as the initial value.\n   * @param {Function} eachFunc The function to iterate over `collection`.\n   * @returns {*} Returns the accumulated value.\n   */\n  function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {\n    eachFunc(collection, function(value, index, collection) {\n      accumulator = initAccum\n        ? (initAccum = false, value)\n        : iteratee(accumulator, value, index, collection);\n    });\n    return accumulator;\n  }\n\n  /**\n   * The base implementation of `_.sortBy` which uses `comparer` to define the\n   * sort order of `array` and replaces criteria objects with their corresponding\n   * values.\n   *\n   * @private\n   * @param {Array} array The array to sort.\n   * @param {Function} comparer The function to define sort order.\n   * @returns {Array} Returns `array`.\n   */\n  function baseSortBy(array, comparer) {\n    var length = array.length;\n\n    array.sort(comparer);\n    while (length--) {\n      array[length] = array[length].value;\n    }\n    return array;\n  }\n\n  /**\n   * The base implementation of `_.sum` and `_.sumBy` without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} array The array to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @returns {number} Returns the sum.\n   */\n  function baseSum(array, iteratee) {\n    var result,\n        index = -1,\n        length = array.length;\n\n    while (++index < length) {\n      var current = iteratee(array[index]);\n      if (current !== undefined) {\n        result = result === undefined ? current : (result + current);\n      }\n    }\n    return result;\n  }\n\n  /**\n   * The base implementation of `_.times` without support for iteratee shorthands\n   * or max array length checks.\n   *\n   * @private\n   * @param {number} n The number of times to invoke `iteratee`.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @returns {Array} Returns the array of results.\n   */\n  function baseTimes(n, iteratee) {\n    var index = -1,\n        result = Array(n);\n\n    while (++index < n) {\n      result[index] = iteratee(index);\n    }\n    return result;\n  }\n\n  /**\n   * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array\n   * of key-value pairs for `object` corresponding to the property names of `props`.\n   *\n   * @private\n   * @param {Object} object The object to query.\n   * @param {Array} props The property names to get values for.\n   * @returns {Object} Returns the key-value pairs.\n   */\n  function baseToPairs(object, props) {\n    return arrayMap(props, function(key) {\n      return [key, object[key]];\n    });\n  }\n\n  /**\n   * The base implementation of `_.trim`.\n   *\n   * @private\n   * @param {string} string The string to trim.\n   * @returns {string} Returns the trimmed string.\n   */\n  function baseTrim(string) {\n    return string\n      ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n      : string;\n  }\n\n  /**\n   * The base implementation of `_.unary` without support for storing metadata.\n   *\n   * @private\n   * @param {Function} func The function to cap arguments for.\n   * @returns {Function} Returns the new capped function.\n   */\n  function baseUnary(func) {\n    return function(value) {\n      return func(value);\n    };\n  }\n\n  /**\n   * The base implementation of `_.values` and `_.valuesIn` which creates an\n   * array of `object` property values corresponding to the property names\n   * of `props`.\n   *\n   * @private\n   * @param {Object} object The object to query.\n   * @param {Array} props The property names to get values for.\n   * @returns {Object} Returns the array of property values.\n   */\n  function baseValues(object, props) {\n    return arrayMap(props, function(key) {\n      return object[key];\n    });\n  }\n\n  /**\n   * Checks if a `cache` value for `key` exists.\n   *\n   * @private\n   * @param {Object} cache The cache to query.\n   * @param {string} key The key of the entry to check.\n   * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n   */\n  function cacheHas(cache, key) {\n    return cache.has(key);\n  }\n\n  /**\n   * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol\n   * that is not found in the character symbols.\n   *\n   * @private\n   * @param {Array} strSymbols The string symbols to inspect.\n   * @param {Array} chrSymbols The character symbols to find.\n   * @returns {number} Returns the index of the first unmatched string symbol.\n   */\n  function charsStartIndex(strSymbols, chrSymbols) {\n    var index = -1,\n        length = strSymbols.length;\n\n    while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\n    return index;\n  }\n\n  /**\n   * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol\n   * that is not found in the character symbols.\n   *\n   * @private\n   * @param {Array} strSymbols The string symbols to inspect.\n   * @param {Array} chrSymbols The character symbols to find.\n   * @returns {number} Returns the index of the last unmatched string symbol.\n   */\n  function charsEndIndex(strSymbols, chrSymbols) {\n    var index = strSymbols.length;\n\n    while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\n    return index;\n  }\n\n  /**\n   * Gets the number of `placeholder` occurrences in `array`.\n   *\n   * @private\n   * @param {Array} array The array to inspect.\n   * @param {*} placeholder The placeholder to search for.\n   * @returns {number} Returns the placeholder count.\n   */\n  function countHolders(array, placeholder) {\n    var length = array.length,\n        result = 0;\n\n    while (length--) {\n      if (array[length] === placeholder) {\n        ++result;\n      }\n    }\n    return result;\n  }\n\n  /**\n   * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A\n   * letters to basic Latin letters.\n   *\n   * @private\n   * @param {string} letter The matched letter to deburr.\n   * @returns {string} Returns the deburred letter.\n   */\n  var deburrLetter = basePropertyOf(deburredLetters);\n\n  /**\n   * Used by `_.escape` to convert characters to HTML entities.\n   *\n   * @private\n   * @param {string} chr The matched character to escape.\n   * @returns {string} Returns the escaped character.\n   */\n  var escapeHtmlChar = basePropertyOf(htmlEscapes);\n\n  /**\n   * Used by `_.template` to escape characters for inclusion in compiled string literals.\n   *\n   * @private\n   * @param {string} chr The matched character to escape.\n   * @returns {string} Returns the escaped character.\n   */\n  function escapeStringChar(chr) {\n    return '\\\\' + stringEscapes[chr];\n  }\n\n  /**\n   * Gets the value at `key` of `object`.\n   *\n   * @private\n   * @param {Object} [object] The object to query.\n   * @param {string} key The key of the property to get.\n   * @returns {*} Returns the property value.\n   */\n  function getValue(object, key) {\n    return object == null ? undefined : object[key];\n  }\n\n  /**\n   * Checks if `string` contains Unicode symbols.\n   *\n   * @private\n   * @param {string} string The string to inspect.\n   * @returns {boolean} Returns `true` if a symbol is found, else `false`.\n   */\n  function hasUnicode(string) {\n    return reHasUnicode.test(string);\n  }\n\n  /**\n   * Checks if `string` contains a word composed of Unicode symbols.\n   *\n   * @private\n   * @param {string} string The string to inspect.\n   * @returns {boolean} Returns `true` if a word is found, else `false`.\n   */\n  function hasUnicodeWord(string) {\n    return reHasUnicodeWord.test(string);\n  }\n\n  /**\n   * Converts `iterator` to an array.\n   *\n   * @private\n   * @param {Object} iterator The iterator to convert.\n   * @returns {Array} Returns the converted array.\n   */\n  function iteratorToArray(iterator) {\n    var data,\n        result = [];\n\n    while (!(data = iterator.next()).done) {\n      result.push(data.value);\n    }\n    return result;\n  }\n\n  /**\n   * Converts `map` to its key-value pairs.\n   *\n   * @private\n   * @param {Object} map The map to convert.\n   * @returns {Array} Returns the key-value pairs.\n   */\n  function mapToArray(map) {\n    var index = -1,\n        result = Array(map.size);\n\n    map.forEach(function(value, key) {\n      result[++index] = [key, value];\n    });\n    return result;\n  }\n\n  /**\n   * Creates a unary function that invokes `func` with its argument transformed.\n   *\n   * @private\n   * @param {Function} func The function to wrap.\n   * @param {Function} transform The argument transform.\n   * @returns {Function} Returns the new function.\n   */\n  function overArg(func, transform) {\n    return function(arg) {\n      return func(transform(arg));\n    };\n  }\n\n  /**\n   * Replaces all `placeholder` elements in `array` with an internal placeholder\n   * and returns an array of their indexes.\n   *\n   * @private\n   * @param {Array} array The array to modify.\n   * @param {*} placeholder The placeholder to replace.\n   * @returns {Array} Returns the new array of placeholder indexes.\n   */\n  function replaceHolders(array, placeholder) {\n    var index = -1,\n        length = array.length,\n        resIndex = 0,\n        result = [];\n\n    while (++index < length) {\n      var value = array[index];\n      if (value === placeholder || value === PLACEHOLDER) {\n        array[index] = PLACEHOLDER;\n        result[resIndex++] = index;\n      }\n    }\n    return result;\n  }\n\n  /**\n   * Converts `set` to an array of its values.\n   *\n   * @private\n   * @param {Object} set The set to convert.\n   * @returns {Array} Returns the values.\n   */\n  function setToArray(set) {\n    var index = -1,\n        result = Array(set.size);\n\n    set.forEach(function(value) {\n      result[++index] = value;\n    });\n    return result;\n  }\n\n  /**\n   * Converts `set` to its value-value pairs.\n   *\n   * @private\n   * @param {Object} set The set to convert.\n   * @returns {Array} Returns the value-value pairs.\n   */\n  function setToPairs(set) {\n    var index = -1,\n        result = Array(set.size);\n\n    set.forEach(function(value) {\n      result[++index] = [value, value];\n    });\n    return result;\n  }\n\n  /**\n   * A specialized version of `_.indexOf` which performs strict equality\n   * comparisons of values, i.e. `===`.\n   *\n   * @private\n   * @param {Array} array The array to inspect.\n   * @param {*} value The value to search for.\n   * @param {number} fromIndex The index to search from.\n   * @returns {number} Returns the index of the matched value, else `-1`.\n   */\n  function strictIndexOf(array, value, fromIndex) {\n    var index = fromIndex - 1,\n        length = array.length;\n\n    while (++index < length) {\n      if (array[index] === value) {\n        return index;\n      }\n    }\n    return -1;\n  }\n\n  /**\n   * A specialized version of `_.lastIndexOf` which performs strict equality\n   * comparisons of values, i.e. `===`.\n   *\n   * @private\n   * @param {Array} array The array to inspect.\n   * @param {*} value The value to search for.\n   * @param {number} fromIndex The index to search from.\n   * @returns {number} Returns the index of the matched value, else `-1`.\n   */\n  function strictLastIndexOf(array, value, fromIndex) {\n    var index = fromIndex + 1;\n    while (index--) {\n      if (array[index] === value) {\n        return index;\n      }\n    }\n    return index;\n  }\n\n  /**\n   * Gets the number of symbols in `string`.\n   *\n   * @private\n   * @param {string} string The string to inspect.\n   * @returns {number} Returns the string size.\n   */\n  function stringSize(string) {\n    return hasUnicode(string)\n      ? unicodeSize(string)\n      : asciiSize(string);\n  }\n\n  /**\n   * Converts `string` to an array.\n   *\n   * @private\n   * @param {string} string The string to convert.\n   * @returns {Array} Returns the converted array.\n   */\n  function stringToArray(string) {\n    return hasUnicode(string)\n      ? unicodeToArray(string)\n      : asciiToArray(string);\n  }\n\n  /**\n   * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n   * character of `string`.\n   *\n   * @private\n   * @param {string} string The string to inspect.\n   * @returns {number} Returns the index of the last non-whitespace character.\n   */\n  function trimmedEndIndex(string) {\n    var index = string.length;\n\n    while (index-- && reWhitespace.test(string.charAt(index))) {}\n    return index;\n  }\n\n  /**\n   * Used by `_.unescape` to convert HTML entities to characters.\n   *\n   * @private\n   * @param {string} chr The matched character to unescape.\n   * @returns {string} Returns the unescaped character.\n   */\n  var unescapeHtmlChar = basePropertyOf(htmlUnescapes);\n\n  /**\n   * Gets the size of a Unicode `string`.\n   *\n   * @private\n   * @param {string} string The string inspect.\n   * @returns {number} Returns the string size.\n   */\n  function unicodeSize(string) {\n    var result = reUnicode.lastIndex = 0;\n    while (reUnicode.test(string)) {\n      ++result;\n    }\n    return result;\n  }\n\n  /**\n   * Converts a Unicode `string` to an array.\n   *\n   * @private\n   * @param {string} string The string to convert.\n   * @returns {Array} Returns the converted array.\n   */\n  function unicodeToArray(string) {\n    return string.match(reUnicode) || [];\n  }\n\n  /**\n   * Splits a Unicode `string` into an array of its words.\n   *\n   * @private\n   * @param {string} The string to inspect.\n   * @returns {Array} Returns the words of `string`.\n   */\n  function unicodeWords(string) {\n    return string.match(reUnicodeWord) || [];\n  }\n\n  /*--------------------------------------------------------------------------*/\n\n  /**\n   * Create a new pristine `lodash` function using the `context` object.\n   *\n   * @static\n   * @memberOf _\n   * @since 1.1.0\n   * @category Util\n   * @param {Object} [context=root] The context object.\n   * @returns {Function} Returns a new `lodash` function.\n   * @example\n   *\n   * _.mixin({ 'foo': _.constant('foo') });\n   *\n   * var lodash = _.runInContext();\n   * lodash.mixin({ 'bar': lodash.constant('bar') });\n   *\n   * _.isFunction(_.foo);\n   * // => true\n   * _.isFunction(_.bar);\n   * // => false\n   *\n   * lodash.isFunction(lodash.foo);\n   * // => false\n   * lodash.isFunction(lodash.bar);\n   * // => true\n   *\n   * // Create a suped-up `defer` in Node.js.\n   * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;\n   */\n  var runInContext = (function runInContext(context) {\n    context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));\n\n    /** Built-in constructor references. */\n    var Array = context.Array,\n        Date = context.Date,\n        Error = context.Error,\n        Function = context.Function,\n        Math = context.Math,\n        Object = context.Object,\n        RegExp = context.RegExp,\n        String = context.String,\n        TypeError = context.TypeError;\n\n    /** Used for built-in method references. */\n    var arrayProto = Array.prototype,\n        funcProto = Function.prototype,\n        objectProto = Object.prototype;\n\n    /** Used to detect overreaching core-js shims. */\n    var coreJsData = context['__core-js_shared__'];\n\n    /** Used to resolve the decompiled source of functions. */\n    var funcToString = funcProto.toString;\n\n    /** Used to check objects for own properties. */\n    var hasOwnProperty = objectProto.hasOwnProperty;\n\n    /** Used to generate unique IDs. */\n    var idCounter = 0;\n\n    /** Used to detect methods masquerading as native. */\n    var maskSrcKey = (function() {\n      var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n      return uid ? ('Symbol(src)_1.' + uid) : '';\n    }());\n\n    /**\n     * Used to resolve the\n     * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n     * of values.\n     */\n    var nativeObjectToString = objectProto.toString;\n\n    /** Used to infer the `Object` constructor. */\n    var objectCtorString = funcToString.call(Object);\n\n    /** Used to restore the original `_` reference in `_.noConflict`. */\n    var oldDash = root._;\n\n    /** Used to detect if a method is native. */\n    var reIsNative = RegExp('^' +\n      funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n      .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n    );\n\n    /** Built-in value references. */\n    var Buffer = moduleExports ? context.Buffer : undefined,\n        Symbol = context.Symbol,\n        Uint8Array = context.Uint8Array,\n        allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,\n        getPrototype = overArg(Object.getPrototypeOf, Object),\n        objectCreate = Object.create,\n        propertyIsEnumerable = objectProto.propertyIsEnumerable,\n        splice = arrayProto.splice,\n        spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined,\n        symIterator = Symbol ? Symbol.iterator : undefined,\n        symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n    var defineProperty = (function() {\n      try {\n        var func = getNative(Object, 'defineProperty');\n        func({}, '', {});\n        return func;\n      } catch (e) {}\n    }());\n\n    /** Mocked built-ins. */\n    var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout,\n        ctxNow = Date && Date.now !== root.Date.now && Date.now,\n        ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;\n\n    /* Built-in method references for those with the same name as other `lodash` methods. */\n    var nativeCeil = Math.ceil,\n        nativeFloor = Math.floor,\n        nativeGetSymbols = Object.getOwnPropertySymbols,\n        nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n        nativeIsFinite = context.isFinite,\n        nativeJoin = arrayProto.join,\n        nativeKeys = overArg(Object.keys, Object),\n        nativeMax = Math.max,\n        nativeMin = Math.min,\n        nativeNow = Date.now,\n        nativeParseInt = context.parseInt,\n        nativeRandom = Math.random,\n        nativeReverse = arrayProto.reverse;\n\n    /* Built-in method references that are verified to be native. */\n    var DataView = getNative(context, 'DataView'),\n        Map = getNative(context, 'Map'),\n        Promise = getNative(context, 'Promise'),\n        Set = getNative(context, 'Set'),\n        WeakMap = getNative(context, 'WeakMap'),\n        nativeCreate = getNative(Object, 'create');\n\n    /** Used to store function metadata. */\n    var metaMap = WeakMap && new WeakMap;\n\n    /** Used to lookup unminified function names. */\n    var realNames = {};\n\n    /** Used to detect maps, sets, and weakmaps. */\n    var dataViewCtorString = toSource(DataView),\n        mapCtorString = toSource(Map),\n        promiseCtorString = toSource(Promise),\n        setCtorString = toSource(Set),\n        weakMapCtorString = toSource(WeakMap);\n\n    /** Used to convert symbols to primitives and strings. */\n    var symbolProto = Symbol ? Symbol.prototype : undefined,\n        symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,\n        symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates a `lodash` object which wraps `value` to enable implicit method\n     * chain sequences. Methods that operate on and return arrays, collections,\n     * and functions can be chained together. Methods that retrieve a single value\n     * or may return a primitive value will automatically end the chain sequence\n     * and return the unwrapped value. Otherwise, the value must be unwrapped\n     * with `_#value`.\n     *\n     * Explicit chain sequences, which must be unwrapped with `_#value`, may be\n     * enabled using `_.chain`.\n     *\n     * The execution of chained methods is lazy, that is, it's deferred until\n     * `_#value` is implicitly or explicitly called.\n     *\n     * Lazy evaluation allows several methods to support shortcut fusion.\n     * Shortcut fusion is an optimization to merge iteratee calls; this avoids\n     * the creation of intermediate arrays and can greatly reduce the number of\n     * iteratee executions. Sections of a chain sequence qualify for shortcut\n     * fusion if the section is applied to an array and iteratees accept only\n     * one argument. The heuristic for whether a section qualifies for shortcut\n     * fusion is subject to change.\n     *\n     * Chaining is supported in custom builds as long as the `_#value` method is\n     * directly or indirectly included in the build.\n     *\n     * In addition to lodash methods, wrappers have `Array` and `String` methods.\n     *\n     * The wrapper `Array` methods are:\n     * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`\n     *\n     * The wrapper `String` methods are:\n     * `replace` and `split`\n     *\n     * The wrapper methods that support shortcut fusion are:\n     * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,\n     * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,\n     * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`\n     *\n     * The chainable wrapper methods are:\n     * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,\n     * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,\n     * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,\n     * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,\n     * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,\n     * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,\n     * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,\n     * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,\n     * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,\n     * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,\n     * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,\n     * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,\n     * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,\n     * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,\n     * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,\n     * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,\n     * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,\n     * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,\n     * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,\n     * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,\n     * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,\n     * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,\n     * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,\n     * `zipObject`, `zipObjectDeep`, and `zipWith`\n     *\n     * The wrapper methods that are **not** chainable by default are:\n     * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,\n     * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,\n     * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,\n     * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,\n     * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,\n     * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,\n     * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,\n     * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,\n     * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,\n     * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,\n     * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,\n     * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,\n     * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,\n     * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,\n     * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,\n     * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,\n     * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,\n     * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,\n     * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,\n     * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,\n     * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,\n     * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,\n     * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,\n     * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,\n     * `upperFirst`, `value`, and `words`\n     *\n     * @name _\n     * @constructor\n     * @category Seq\n     * @param {*} value The value to wrap in a `lodash` instance.\n     * @returns {Object} Returns the new `lodash` wrapper instance.\n     * @example\n     *\n     * function square(n) {\n     *   return n * n;\n     * }\n     *\n     * var wrapped = _([1, 2, 3]);\n     *\n     * // Returns an unwrapped value.\n     * wrapped.reduce(_.add);\n     * // => 6\n     *\n     * // Returns a wrapped value.\n     * var squares = wrapped.map(square);\n     *\n     * _.isArray(squares);\n     * // => false\n     *\n     * _.isArray(squares.value());\n     * // => true\n     */\n    function lodash(value) {\n      if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {\n        if (value instanceof LodashWrapper) {\n          return value;\n        }\n        if (hasOwnProperty.call(value, '__wrapped__')) {\n          return wrapperClone(value);\n        }\n      }\n      return new LodashWrapper(value);\n    }\n\n    /**\n     * The base implementation of `_.create` without support for assigning\n     * properties to the created object.\n     *\n     * @private\n     * @param {Object} proto The object to inherit from.\n     * @returns {Object} Returns the new object.\n     */\n    var baseCreate = (function() {\n      function object() {}\n      return function(proto) {\n        if (!isObject(proto)) {\n          return {};\n        }\n        if (objectCreate) {\n          return objectCreate(proto);\n        }\n        object.prototype = proto;\n        var result = new object;\n        object.prototype = undefined;\n        return result;\n      };\n    }());\n\n    /**\n     * The function whose prototype chain sequence wrappers inherit from.\n     *\n     * @private\n     */\n    function baseLodash() {\n      // No operation performed.\n    }\n\n    /**\n     * The base constructor for creating `lodash` wrapper objects.\n     *\n     * @private\n     * @param {*} value The value to wrap.\n     * @param {boolean} [chainAll] Enable explicit method chain sequences.\n     */\n    function LodashWrapper(value, chainAll) {\n      this.__wrapped__ = value;\n      this.__actions__ = [];\n      this.__chain__ = !!chainAll;\n      this.__index__ = 0;\n      this.__values__ = undefined;\n    }\n\n    /**\n     * By default, the template delimiters used by lodash are like those in\n     * embedded Ruby (ERB) as well as ES2015 template strings. Change the\n     * following template settings to use alternative delimiters.\n     *\n     * **Security:** See\n     * [threat model](https://github.com/lodash/lodash/blob/main/threat-model.md)\n     * \u2014 `_.template` is insecure and will be removed in v5.\n     *\n     * @static\n     * @memberOf _\n     * @type {Object}\n     */\n    lodash.templateSettings = {\n\n      /**\n       * Used to detect `data` property values to be HTML-escaped.\n       *\n       * @memberOf _.templateSettings\n       * @type {RegExp}\n       */\n      'escape': reEscape,\n\n      /**\n       * Used to detect code to be evaluated.\n       *\n       * @memberOf _.templateSettings\n       * @type {RegExp}\n       */\n      'evaluate': reEvaluate,\n\n      /**\n       * Used to detect `data` property values to inject.\n       *\n       * @memberOf _.templateSettings\n       * @type {RegExp}\n       */\n      'interpolate': reInterpolate,\n\n      /**\n       * Used to reference the data object in the template text.\n       *\n       * @memberOf _.templateSettings\n       * @type {string}\n       */\n      'variable': '',\n\n      /**\n       * Used to import variables into the compiled template.\n       *\n       * @memberOf _.templateSettings\n       * @type {Object}\n       */\n      'imports': {\n\n        /**\n         * A reference to the `lodash` function.\n         *\n         * @memberOf _.templateSettings.imports\n         * @type {Function}\n         */\n        '_': lodash\n      }\n    };\n\n    // Ensure wrappers are instances of `baseLodash`.\n    lodash.prototype = baseLodash.prototype;\n    lodash.prototype.constructor = lodash;\n\n    LodashWrapper.prototype = baseCreate(baseLodash.prototype);\n    LodashWrapper.prototype.constructor = LodashWrapper;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.\n     *\n     * @private\n     * @constructor\n     * @param {*} value The value to wrap.\n     */\n    function LazyWrapper(value) {\n      this.__wrapped__ = value;\n      this.__actions__ = [];\n      this.__dir__ = 1;\n      this.__filtered__ = false;\n      this.__iteratees__ = [];\n      this.__takeCount__ = MAX_ARRAY_LENGTH;\n      this.__views__ = [];\n    }\n\n    /**\n     * Creates a clone of the lazy wrapper object.\n     *\n     * @private\n     * @name clone\n     * @memberOf LazyWrapper\n     * @returns {Object} Returns the cloned `LazyWrapper` object.\n     */\n    function lazyClone() {\n      var result = new LazyWrapper(this.__wrapped__);\n      result.__actions__ = copyArray(this.__actions__);\n      result.__dir__ = this.__dir__;\n      result.__filtered__ = this.__filtered__;\n      result.__iteratees__ = copyArray(this.__iteratees__);\n      result.__takeCount__ = this.__takeCount__;\n      result.__views__ = copyArray(this.__views__);\n      return result;\n    }\n\n    /**\n     * Reverses the direction of lazy iteration.\n     *\n     * @private\n     * @name reverse\n     * @memberOf LazyWrapper\n     * @returns {Object} Returns the new reversed `LazyWrapper` object.\n     */\n    function lazyReverse() {\n      if (this.__filtered__) {\n        var result = new LazyWrapper(this);\n        result.__dir__ = -1;\n        result.__filtered__ = true;\n      } else {\n        result = this.clone();\n        result.__dir__ *= -1;\n      }\n      return result;\n    }\n\n    /**\n     * Extracts the unwrapped value from its lazy wrapper.\n     *\n     * @private\n     * @name value\n     * @memberOf LazyWrapper\n     * @returns {*} Returns the unwrapped value.\n     */\n    function lazyValue() {\n      var array = this.__wrapped__.value(),\n          dir = this.__dir__,\n          isArr = isArray(array),\n          isRight = dir < 0,\n          arrLength = isArr ? array.length : 0,\n          view = getView(0, arrLength, this.__views__),\n          start = view.start,\n          end = view.end,\n          length = end - start,\n          index = isRight ? end : (start - 1),\n          iteratees = this.__iteratees__,\n          iterLength = iteratees.length,\n          resIndex = 0,\n          takeCount = nativeMin(length, this.__takeCount__);\n\n      if (!isArr || (!isRight && arrLength == length && takeCount == length)) {\n        return baseWrapperValue(array, this.__actions__);\n      }\n      var result = [];\n\n      outer:\n      while (length-- && resIndex < takeCount) {\n        index += dir;\n\n        var iterIndex = -1,\n            value = array[index];\n\n        while (++iterIndex < iterLength) {\n          var data = iteratees[iterIndex],\n              iteratee = data.iteratee,\n              type = data.type,\n              computed = iteratee(value);\n\n          if (type == LAZY_MAP_FLAG) {\n            value = computed;\n          } else if (!computed) {\n            if (type == LAZY_FILTER_FLAG) {\n              continue outer;\n            } else {\n              break outer;\n            }\n          }\n        }\n        result[resIndex++] = value;\n      }\n      return result;\n    }\n\n    // Ensure `LazyWrapper` is an instance of `baseLodash`.\n    LazyWrapper.prototype = baseCreate(baseLodash.prototype);\n    LazyWrapper.prototype.constructor = LazyWrapper;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates a hash object.\n     *\n     * @private\n     * @constructor\n     * @param {Array} [entries] The key-value pairs to cache.\n     */\n    function Hash(entries) {\n      var index = -1,\n          length = entries == null ? 0 : entries.length;\n\n      this.clear();\n      while (++index < length) {\n        var entry = entries[index];\n        this.set(entry[0], entry[1]);\n      }\n    }\n\n    /**\n     * Removes all key-value entries from the hash.\n     *\n     * @private\n     * @name clear\n     * @memberOf Hash\n     */\n    function hashClear() {\n      this.__data__ = nativeCreate ? nativeCreate(null) : {};\n      this.size = 0;\n    }\n\n    /**\n     * Removes `key` and its value from the hash.\n     *\n     * @private\n     * @name delete\n     * @memberOf Hash\n     * @param {Object} hash The hash to modify.\n     * @param {string} key The key of the value to remove.\n     * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n     */\n    function hashDelete(key) {\n      var result = this.has(key) && delete this.__data__[key];\n      this.size -= result ? 1 : 0;\n      return result;\n    }\n\n    /**\n     * Gets the hash value for `key`.\n     *\n     * @private\n     * @name get\n     * @memberOf Hash\n     * @param {string} key The key of the value to get.\n     * @returns {*} Returns the entry value.\n     */\n    function hashGet(key) {\n      var data = this.__data__;\n      if (nativeCreate) {\n        var result = data[key];\n        return result === HASH_UNDEFINED ? undefined : result;\n      }\n      return hasOwnProperty.call(data, key) ? data[key] : undefined;\n    }\n\n    /**\n     * Checks if a hash value for `key` exists.\n     *\n     * @private\n     * @name has\n     * @memberOf Hash\n     * @param {string} key The key of the entry to check.\n     * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n     */\n    function hashHas(key) {\n      var data = this.__data__;\n      return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n    }\n\n    /**\n     * Sets the hash `key` to `value`.\n     *\n     * @private\n     * @name set\n     * @memberOf Hash\n     * @param {string} key The key of the value to set.\n     * @param {*} value The value to set.\n     * @returns {Object} Returns the hash instance.\n     */\n    function hashSet(key, value) {\n      var data = this.__data__;\n      this.size += this.has(key) ? 0 : 1;\n      data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n      return this;\n    }\n\n    // Add methods to `Hash`.\n    Hash.prototype.clear = hashClear;\n    Hash.prototype['delete'] = hashDelete;\n    Hash.prototype.get = hashGet;\n    Hash.prototype.has = hashHas;\n    Hash.prototype.set = hashSet;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates an list cache object.\n     *\n     * @private\n     * @constructor\n     * @param {Array} [entries] The key-value pairs to cache.\n     */\n    function ListCache(entries) {\n      var index = -1,\n          length = entries == null ? 0 : entries.length;\n\n      this.clear();\n      while (++index < length) {\n        var entry = entries[index];\n        this.set(entry[0], entry[1]);\n      }\n    }\n\n    /**\n     * Removes all key-value entries from the list cache.\n     *\n     * @private\n     * @name clear\n     * @memberOf ListCache\n     */\n    function listCacheClear() {\n      this.__data__ = [];\n      this.size = 0;\n    }\n\n    /**\n     * Removes `key` and its value from the list cache.\n     *\n     * @private\n     * @name delete\n     * @memberOf ListCache\n     * @param {string} key The key of the value to remove.\n     * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n     */\n    function listCacheDelete(key) {\n      var data = this.__data__,\n          index = assocIndexOf(data, key);\n\n      if (index < 0) {\n        return false;\n      }\n      var lastIndex = data.length - 1;\n      if (index == lastIndex) {\n        data.pop();\n      } else {\n        splice.call(data, index, 1);\n      }\n      --this.size;\n      return true;\n    }\n\n    /**\n     * Gets the list cache value for `key`.\n     *\n     * @private\n     * @name get\n     * @memberOf ListCache\n     * @param {string} key The key of the value to get.\n     * @returns {*} Returns the entry value.\n     */\n    function listCacheGet(key) {\n      var data = this.__data__,\n          index = assocIndexOf(data, key);\n\n      return index < 0 ? undefined : data[index][1];\n    }\n\n    /**\n     * Checks if a list cache value for `key` exists.\n     *\n     * @private\n     * @name has\n     * @memberOf ListCache\n     * @param {string} key The key of the entry to check.\n     * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n     */\n    function listCacheHas(key) {\n      return assocIndexOf(this.__data__, key) > -1;\n    }\n\n    /**\n     * Sets the list cache `key` to `value`.\n     *\n     * @private\n     * @name set\n     * @memberOf ListCache\n     * @param {string} key The key of the value to set.\n     * @param {*} value The value to set.\n     * @returns {Object} Returns the list cache instance.\n     */\n    function listCacheSet(key, value) {\n      var data = this.__data__,\n          index = assocIndexOf(data, key);\n\n      if (index < 0) {\n        ++this.size;\n        data.push([key, value]);\n      } else {\n        data[index][1] = value;\n      }\n      return this;\n    }\n\n    // Add methods to `ListCache`.\n    ListCache.prototype.clear = listCacheClear;\n    ListCache.prototype['delete'] = listCacheDelete;\n    ListCache.prototype.get = listCacheGet;\n    ListCache.prototype.has = listCacheHas;\n    ListCache.prototype.set = listCacheSet;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates a map cache object to store key-value pairs.\n     *\n     * @private\n     * @constructor\n     * @param {Array} [entries] The key-value pairs to cache.\n     */\n    function MapCache(entries) {\n      var index = -1,\n          length = entries == null ? 0 : entries.length;\n\n      this.clear();\n      while (++index < length) {\n        var entry = entries[index];\n        this.set(entry[0], entry[1]);\n      }\n    }\n\n    /**\n     * Removes all key-value entries from the map.\n     *\n     * @private\n     * @name clear\n     * @memberOf MapCache\n     */\n    function mapCacheClear() {\n      this.size = 0;\n      this.__data__ = {\n        'hash': new Hash,\n        'map': new (Map || ListCache),\n        'string': new Hash\n      };\n    }\n\n    /**\n     * Removes `key` and its value from the map.\n     *\n     * @private\n     * @name delete\n     * @memberOf MapCache\n     * @param {string} key The key of the value to remove.\n     * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n     */\n    function mapCacheDelete(key) {\n      var result = getMapData(this, key)['delete'](key);\n      this.size -= result ? 1 : 0;\n      return result;\n    }\n\n    /**\n     * Gets the map value for `key`.\n     *\n     * @private\n     * @name get\n     * @memberOf MapCache\n     * @param {string} key The key of the value to get.\n     * @returns {*} Returns the entry value.\n     */\n    function mapCacheGet(key) {\n      return getMapData(this, key).get(key);\n    }\n\n    /**\n     * Checks if a map value for `key` exists.\n     *\n     * @private\n     * @name has\n     * @memberOf MapCache\n     * @param {string} key The key of the entry to check.\n     * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n     */\n    function mapCacheHas(key) {\n      return getMapData(this, key).has(key);\n    }\n\n    /**\n     * Sets the map `key` to `value`.\n     *\n     * @private\n     * @name set\n     * @memberOf MapCache\n     * @param {string} key The key of the value to set.\n     * @param {*} value The value to set.\n     * @returns {Object} Returns the map cache instance.\n     */\n    function mapCacheSet(key, value) {\n      var data = getMapData(this, key),\n          size = data.size;\n\n      data.set(key, value);\n      this.size += data.size == size ? 0 : 1;\n      return this;\n    }\n\n    // Add methods to `MapCache`.\n    MapCache.prototype.clear = mapCacheClear;\n    MapCache.prototype['delete'] = mapCacheDelete;\n    MapCache.prototype.get = mapCacheGet;\n    MapCache.prototype.has = mapCacheHas;\n    MapCache.prototype.set = mapCacheSet;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     *\n     * Creates an array cache object to store unique values.\n     *\n     * @private\n     * @constructor\n     * @param {Array} [values] The values to cache.\n     */\n    function SetCache(values) {\n      var index = -1,\n          length = values == null ? 0 : values.length;\n\n      this.__data__ = new MapCache;\n      while (++index < length) {\n        this.add(values[index]);\n      }\n    }\n\n    /**\n     * Adds `value` to the array cache.\n     *\n     * @private\n     * @name add\n     * @memberOf SetCache\n     * @alias push\n     * @param {*} value The value to cache.\n     * @returns {Object} Returns the cache instance.\n     */\n    function setCacheAdd(value) {\n      this.__data__.set(value, HASH_UNDEFINED);\n      return this;\n    }\n\n    /**\n     * Checks if `value` is in the array cache.\n     *\n     * @private\n     * @name has\n     * @memberOf SetCache\n     * @param {*} value The value to search for.\n     * @returns {boolean} Returns `true` if `value` is found, else `false`.\n     */\n    function setCacheHas(value) {\n      return this.__data__.has(value);\n    }\n\n    // Add methods to `SetCache`.\n    SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\n    SetCache.prototype.has = setCacheHas;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates a stack cache object to store key-value pairs.\n     *\n     * @private\n     * @constructor\n     * @param {Array} [entries] The key-value pairs to cache.\n     */\n    function Stack(entries) {\n      var data = this.__data__ = new ListCache(entries);\n      this.size = data.size;\n    }\n\n    /**\n     * Removes all key-value entries from the stack.\n     *\n     * @private\n     * @name clear\n     * @memberOf Stack\n     */\n    function stackClear() {\n      this.__data__ = new ListCache;\n      this.size = 0;\n    }\n\n    /**\n     * Removes `key` and its value from the stack.\n     *\n     * @private\n     * @name delete\n     * @memberOf Stack\n     * @param {string} key The key of the value to remove.\n     * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n     */\n    function stackDelete(key) {\n      var data = this.__data__,\n          result = data['delete'](key);\n\n      this.size = data.size;\n      return result;\n    }\n\n    /**\n     * Gets the stack value for `key`.\n     *\n     * @private\n     * @name get\n     * @memberOf Stack\n     * @param {string} key The key of the value to get.\n     * @returns {*} Returns the entry value.\n     */\n    function stackGet(key) {\n      return this.__data__.get(key);\n    }\n\n    /**\n     * Checks if a stack value for `key` exists.\n     *\n     * @private\n     * @name has\n     * @memberOf Stack\n     * @param {string} key The key of the entry to check.\n     * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n     */\n    function stackHas(key) {\n      return this.__data__.has(key);\n    }\n\n    /**\n     * Sets the stack `key` to `value`.\n     *\n     * @private\n     * @name set\n     * @memberOf Stack\n     * @param {string} key The key of the value to set.\n     * @param {*} value The value to set.\n     * @returns {Object} Returns the stack cache instance.\n     */\n    function stackSet(key, value) {\n      var data = this.__data__;\n      if (data instanceof ListCache) {\n        var pairs = data.__data__;\n        if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n          pairs.push([key, value]);\n          this.size = ++data.size;\n          return this;\n        }\n        data = this.__data__ = new MapCache(pairs);\n      }\n      data.set(key, value);\n      this.size = data.size;\n      return this;\n    }\n\n    // Add methods to `Stack`.\n    Stack.prototype.clear = stackClear;\n    Stack.prototype['delete'] = stackDelete;\n    Stack.prototype.get = stackGet;\n    Stack.prototype.has = stackHas;\n    Stack.prototype.set = stackSet;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates an array of the enumerable property names of the array-like `value`.\n     *\n     * @private\n     * @param {*} value The value to query.\n     * @param {boolean} inherited Specify returning inherited property names.\n     * @returns {Array} Returns the array of property names.\n     */\n    function arrayLikeKeys(value, inherited) {\n      var isArr = isArray(value),\n          isArg = !isArr && isArguments(value),\n          isBuff = !isArr && !isArg && isBuffer(value),\n          isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n          skipIndexes = isArr || isArg || isBuff || isType,\n          result = skipIndexes ? baseTimes(value.length, String) : [],\n          length = result.length;\n\n      for (var key in value) {\n        if ((inherited || hasOwnProperty.call(value, key)) &&\n            !(skipIndexes && (\n               // Safari 9 has enumerable `arguments.length` in strict mode.\n               key == 'length' ||\n               // Node.js 0.10 has enumerable non-index properties on buffers.\n               (isBuff && (key == 'offset' || key == 'parent')) ||\n               // PhantomJS 2 has enumerable non-index properties on typed arrays.\n               (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n               // Skip index properties.\n               isIndex(key, length)\n            ))) {\n          result.push(key);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * A specialized version of `_.sample` for arrays.\n     *\n     * @private\n     * @param {Array} array The array to sample.\n     * @returns {*} Returns the random element.\n     */\n    function arraySample(array) {\n      var length = array.length;\n      return length ? array[baseRandom(0, length - 1)] : undefined;\n    }\n\n    /**\n     * A specialized version of `_.sampleSize` for arrays.\n     *\n     * @private\n     * @param {Array} array The array to sample.\n     * @param {number} n The number of elements to sample.\n     * @returns {Array} Returns the random elements.\n     */\n    function arraySampleSize(array, n) {\n      return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));\n    }\n\n    /**\n     * A specialized version of `_.shuffle` for arrays.\n     *\n     * @private\n     * @param {Array} array The array to shuffle.\n     * @returns {Array} Returns the new shuffled array.\n     */\n    function arrayShuffle(array) {\n      return shuffleSelf(copyArray(array));\n    }\n\n    /**\n     * This function is like `assignValue` except that it doesn't assign\n     * `undefined` values.\n     *\n     * @private\n     * @param {Object} object The object to modify.\n     * @param {string} key The key of the property to assign.\n     * @param {*} value The value to assign.\n     */\n    function assignMergeValue(object, key, value) {\n      if ((value !== undefined && !eq(object[key], value)) ||\n          (value === undefined && !(key in object))) {\n        baseAssignValue(object, key, value);\n      }\n    }\n\n    /**\n     * Assigns `value` to `key` of `object` if the existing value is not equivalent\n     * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons.\n     *\n     * @private\n     * @param {Object} object The object to modify.\n     * @param {string} key The key of the property to assign.\n     * @param {*} value The value to assign.\n     */\n    function assignValue(object, key, value) {\n      var objValue = object[key];\n      if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n          (value === undefined && !(key in object))) {\n        baseAssignValue(object, key, value);\n      }\n    }\n\n    /**\n     * Gets the index at which the `key` is found in `array` of key-value pairs.\n     *\n     * @private\n     * @param {Array} array The array to inspect.\n     * @param {*} key The key to search for.\n     * @returns {number} Returns the index of the matched value, else `-1`.\n     */\n    function assocIndexOf(array, key) {\n      var length = array.length;\n      while (length--) {\n        if (eq(array[length][0], key)) {\n          return length;\n        }\n      }\n      return -1;\n    }\n\n    /**\n     * Aggregates elements of `collection` on `accumulator` with keys transformed\n     * by `iteratee` and values set by `setter`.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} setter The function to set `accumulator` values.\n     * @param {Function} iteratee The iteratee to transform keys.\n     * @param {Object} accumulator The initial aggregated object.\n     * @returns {Function} Returns `accumulator`.\n     */\n    function baseAggregator(collection, setter, iteratee, accumulator) {\n      baseEach(collection, function(value, key, collection) {\n        setter(accumulator, value, iteratee(value), collection);\n      });\n      return accumulator;\n    }\n\n    /**\n     * The base implementation of `_.assign` without support for multiple sources\n     * or `customizer` functions.\n     *\n     * @private\n     * @param {Object} object The destination object.\n     * @param {Object} source The source object.\n     * @returns {Object} Returns `object`.\n     */\n    function baseAssign(object, source) {\n      return object && copyObject(source, keys(source), object);\n    }\n\n    /**\n     * The base implementation of `_.assignIn` without support for multiple sources\n     * or `customizer` functions.\n     *\n     * @private\n     * @param {Object} object The destination object.\n     * @param {Object} source The source object.\n     * @returns {Object} Returns `object`.\n     */\n    function baseAssignIn(object, source) {\n      return object && copyObject(source, keysIn(source), object);\n    }\n\n    /**\n     * The base implementation of `assignValue` and `assignMergeValue` without\n     * value checks.\n     *\n     * @private\n     * @param {Object} object The object to modify.\n     * @param {string} key The key of the property to assign.\n     * @param {*} value The value to assign.\n     */\n    function baseAssignValue(object, key, value) {\n      if (key == '__proto__' && defineProperty) {\n        defineProperty(object, key, {\n          'configurable': true,\n          'enumerable': true,\n          'value': value,\n          'writable': true\n        });\n      } else {\n        object[key] = value;\n      }\n    }\n\n    /**\n     * The base implementation of `_.at` without support for individual paths.\n     *\n     * @private\n     * @param {Object} object The object to iterate over.\n     * @param {string[]} paths The property paths to pick.\n     * @returns {Array} Returns the picked elements.\n     */\n    function baseAt(object, paths) {\n      var index = -1,\n          length = paths.length,\n          result = Array(length),\n          skip = object == null;\n\n      while (++index < length) {\n        result[index] = skip ? undefined : get(object, paths[index]);\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.clamp` which doesn't coerce arguments.\n     *\n     * @private\n     * @param {number} number The number to clamp.\n     * @param {number} [lower] The lower bound.\n     * @param {number} upper The upper bound.\n     * @returns {number} Returns the clamped number.\n     */\n    function baseClamp(number, lower, upper) {\n      if (number === number) {\n        if (upper !== undefined) {\n          number = number <= upper ? number : upper;\n        }\n        if (lower !== undefined) {\n          number = number >= lower ? number : lower;\n        }\n      }\n      return number;\n    }\n\n    /**\n     * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n     * traversed objects.\n     *\n     * @private\n     * @param {*} value The value to clone.\n     * @param {boolean} bitmask The bitmask flags.\n     *  1 - Deep clone\n     *  2 - Flatten inherited properties\n     *  4 - Clone symbols\n     * @param {Function} [customizer] The function to customize cloning.\n     * @param {string} [key] The key of `value`.\n     * @param {Object} [object] The parent object of `value`.\n     * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n     * @returns {*} Returns the cloned value.\n     */\n    function baseClone(value, bitmask, customizer, key, object, stack) {\n      var result,\n          isDeep = bitmask & CLONE_DEEP_FLAG,\n          isFlat = bitmask & CLONE_FLAT_FLAG,\n          isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n      if (customizer) {\n        result = object ? customizer(value, key, object, stack) : customizer(value);\n      }\n      if (result !== undefined) {\n        return result;\n      }\n      if (!isObject(value)) {\n        return value;\n      }\n      var isArr = isArray(value);\n      if (isArr) {\n        result = initCloneArray(value);\n        if (!isDeep) {\n          return copyArray(value, result);\n        }\n      } else {\n        var tag = getTag(value),\n            isFunc = tag == funcTag || tag == genTag;\n\n        if (isBuffer(value)) {\n          return cloneBuffer(value, isDeep);\n        }\n        if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n          result = (isFlat || isFunc) ? {} : initCloneObject(value);\n          if (!isDeep) {\n            return isFlat\n              ? copySymbolsIn(value, baseAssignIn(result, value))\n              : copySymbols(value, baseAssign(result, value));\n          }\n        } else {\n          if (!cloneableTags[tag]) {\n            return object ? value : {};\n          }\n          result = initCloneByTag(value, tag, isDeep);\n        }\n      }\n      // Check for circular references and return its corresponding clone.\n      stack || (stack = new Stack);\n      var stacked = stack.get(value);\n      if (stacked) {\n        return stacked;\n      }\n      stack.set(value, result);\n\n      if (isSet(value)) {\n        value.forEach(function(subValue) {\n          result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n        });\n      } else if (isMap(value)) {\n        value.forEach(function(subValue, key) {\n          result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n        });\n      }\n\n      var keysFunc = isFull\n        ? (isFlat ? getAllKeysIn : getAllKeys)\n        : (isFlat ? keysIn : keys);\n\n      var props = isArr ? undefined : keysFunc(value);\n      arrayEach(props || value, function(subValue, key) {\n        if (props) {\n          key = subValue;\n          subValue = value[key];\n        }\n        // Recursively populate clone (susceptible to call stack limits).\n        assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n      });\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.conforms` which doesn't clone `source`.\n     *\n     * @private\n     * @param {Object} source The object of property predicates to conform to.\n     * @returns {Function} Returns the new spec function.\n     */\n    function baseConforms(source) {\n      var props = keys(source);\n      return function(object) {\n        return baseConformsTo(object, source, props);\n      };\n    }\n\n    /**\n     * The base implementation of `_.conformsTo` which accepts `props` to check.\n     *\n     * @private\n     * @param {Object} object The object to inspect.\n     * @param {Object} source The object of property predicates to conform to.\n     * @returns {boolean} Returns `true` if `object` conforms, else `false`.\n     */\n    function baseConformsTo(object, source, props) {\n      var length = props.length;\n      if (object == null) {\n        return !length;\n      }\n      object = Object(object);\n      while (length--) {\n        var key = props[length],\n            predicate = source[key],\n            value = object[key];\n\n        if ((value === undefined && !(key in object)) || !predicate(value)) {\n          return false;\n        }\n      }\n      return true;\n    }\n\n    /**\n     * The base implementation of `_.delay` and `_.defer` which accepts `args`\n     * to provide to `func`.\n     *\n     * @private\n     * @param {Function} func The function to delay.\n     * @param {number} wait The number of milliseconds to delay invocation.\n     * @param {Array} args The arguments to provide to `func`.\n     * @returns {number|Object} Returns the timer id or timeout object.\n     */\n    function baseDelay(func, wait, args) {\n      if (typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      return setTimeout(function() { func.apply(undefined, args); }, wait);\n    }\n\n    /**\n     * The base implementation of methods like `_.difference` without support\n     * for excluding multiple arrays or iteratee shorthands.\n     *\n     * @private\n     * @param {Array} array The array to inspect.\n     * @param {Array} values The values to exclude.\n     * @param {Function} [iteratee] The iteratee invoked per element.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new array of filtered values.\n     */\n    function baseDifference(array, values, iteratee, comparator) {\n      var index = -1,\n          includes = arrayIncludes,\n          isCommon = true,\n          length = array.length,\n          result = [],\n          valuesLength = values.length;\n\n      if (!length) {\n        return result;\n      }\n      if (iteratee) {\n        values = arrayMap(values, baseUnary(iteratee));\n      }\n      if (comparator) {\n        includes = arrayIncludesWith;\n        isCommon = false;\n      }\n      else if (values.length >= LARGE_ARRAY_SIZE) {\n        includes = cacheHas;\n        isCommon = false;\n        values = new SetCache(values);\n      }\n      outer:\n      while (++index < length) {\n        var value = array[index],\n            computed = iteratee == null ? value : iteratee(value);\n\n        value = (comparator || value !== 0) ? value : 0;\n        if (isCommon && computed === computed) {\n          var valuesIndex = valuesLength;\n          while (valuesIndex--) {\n            if (values[valuesIndex] === computed) {\n              continue outer;\n            }\n          }\n          result.push(value);\n        }\n        else if (!includes(values, computed, comparator)) {\n          result.push(value);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.forEach` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} iteratee The function invoked per iteration.\n     * @returns {Array|Object} Returns `collection`.\n     */\n    var baseEach = createBaseEach(baseForOwn);\n\n    /**\n     * The base implementation of `_.forEachRight` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} iteratee The function invoked per iteration.\n     * @returns {Array|Object} Returns `collection`.\n     */\n    var baseEachRight = createBaseEach(baseForOwnRight, true);\n\n    /**\n     * The base implementation of `_.every` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} predicate The function invoked per iteration.\n     * @returns {boolean} Returns `true` if all elements pass the predicate check,\n     *  else `false`\n     */\n    function baseEvery(collection, predicate) {\n      var result = true;\n      baseEach(collection, function(value, index, collection) {\n        result = !!predicate(value, index, collection);\n        return result;\n      });\n      return result;\n    }\n\n    /**\n     * The base implementation of methods like `_.max` and `_.min` which accepts a\n     * `comparator` to determine the extremum value.\n     *\n     * @private\n     * @param {Array} array The array to iterate over.\n     * @param {Function} iteratee The iteratee invoked per iteration.\n     * @param {Function} comparator The comparator used to compare values.\n     * @returns {*} Returns the extremum value.\n     */\n    function baseExtremum(array, iteratee, comparator) {\n      var index = -1,\n          length = array.length;\n\n      while (++index < length) {\n        var value = array[index],\n            current = iteratee(value);\n\n        if (current != null && (computed === undefined\n              ? (current === current && !isSymbol(current))\n              : comparator(current, computed)\n            )) {\n          var computed = current,\n              result = value;\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.fill` without an iteratee call guard.\n     *\n     * @private\n     * @param {Array} array The array to fill.\n     * @param {*} value The value to fill `array` with.\n     * @param {number} [start=0] The start position.\n     * @param {number} [end=array.length] The end position.\n     * @returns {Array} Returns `array`.\n     */\n    function baseFill(array, value, start, end) {\n      var length = array.length;\n\n      start = toInteger(start);\n      if (start < 0) {\n        start = -start > length ? 0 : (length + start);\n      }\n      end = (end === undefined || end > length) ? length : toInteger(end);\n      if (end < 0) {\n        end += length;\n      }\n      end = start > end ? 0 : toLength(end);\n      while (start < end) {\n        array[start++] = value;\n      }\n      return array;\n    }\n\n    /**\n     * The base implementation of `_.filter` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} predicate The function invoked per iteration.\n     * @returns {Array} Returns the new filtered array.\n     */\n    function baseFilter(collection, predicate) {\n      var result = [];\n      baseEach(collection, function(value, index, collection) {\n        if (predicate(value, index, collection)) {\n          result.push(value);\n        }\n      });\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.flatten` with support for restricting flattening.\n     *\n     * @private\n     * @param {Array} array The array to flatten.\n     * @param {number} depth The maximum recursion depth.\n     * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n     * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n     * @param {Array} [result=[]] The initial result value.\n     * @returns {Array} Returns the new flattened array.\n     */\n    function baseFlatten(array, depth, predicate, isStrict, result) {\n      var index = -1,\n          length = array.length;\n\n      predicate || (predicate = isFlattenable);\n      result || (result = []);\n\n      while (++index < length) {\n        var value = array[index];\n        if (depth > 0 && predicate(value)) {\n          if (depth > 1) {\n            // Recursively flatten arrays (susceptible to call stack limits).\n            baseFlatten(value, depth - 1, predicate, isStrict, result);\n          } else {\n            arrayPush(result, value);\n          }\n        } else if (!isStrict) {\n          result[result.length] = value;\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `baseForOwn` which iterates over `object`\n     * properties returned by `keysFunc` and invokes `iteratee` for each property.\n     * Iteratee functions may exit iteration early by explicitly returning `false`.\n     *\n     * @private\n     * @param {Object} object The object to iterate over.\n     * @param {Function} iteratee The function invoked per iteration.\n     * @param {Function} keysFunc The function to get the keys of `object`.\n     * @returns {Object} Returns `object`.\n     */\n    var baseFor = createBaseFor();\n\n    /**\n     * This function is like `baseFor` except that it iterates over properties\n     * in the opposite order.\n     *\n     * @private\n     * @param {Object} object The object to iterate over.\n     * @param {Function} iteratee The function invoked per iteration.\n     * @param {Function} keysFunc The function to get the keys of `object`.\n     * @returns {Object} Returns `object`.\n     */\n    var baseForRight = createBaseFor(true);\n\n    /**\n     * The base implementation of `_.forOwn` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Object} object The object to iterate over.\n     * @param {Function} iteratee The function invoked per iteration.\n     * @returns {Object} Returns `object`.\n     */\n    function baseForOwn(object, iteratee) {\n      return object && baseFor(object, iteratee, keys);\n    }\n\n    /**\n     * The base implementation of `_.forOwnRight` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Object} object The object to iterate over.\n     * @param {Function} iteratee The function invoked per iteration.\n     * @returns {Object} Returns `object`.\n     */\n    function baseForOwnRight(object, iteratee) {\n      return object && baseForRight(object, iteratee, keys);\n    }\n\n    /**\n     * The base implementation of `_.functions` which creates an array of\n     * `object` function property names filtered from `props`.\n     *\n     * @private\n     * @param {Object} object The object to inspect.\n     * @param {Array} props The property names to filter.\n     * @returns {Array} Returns the function names.\n     */\n    function baseFunctions(object, props) {\n      return arrayFilter(props, function(key) {\n        return isFunction(object[key]);\n      });\n    }\n\n    /**\n     * The base implementation of `_.get` without support for default values.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path of the property to get.\n     * @returns {*} Returns the resolved value.\n     */\n    function baseGet(object, path) {\n      path = castPath(path, object);\n\n      var index = 0,\n          length = path.length;\n\n      while (object != null && index < length) {\n        object = object[toKey(path[index++])];\n      }\n      return (index && index == length) ? object : undefined;\n    }\n\n    /**\n     * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n     * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n     * symbols of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @param {Function} keysFunc The function to get the keys of `object`.\n     * @param {Function} symbolsFunc The function to get the symbols of `object`.\n     * @returns {Array} Returns the array of property names and symbols.\n     */\n    function baseGetAllKeys(object, keysFunc, symbolsFunc) {\n      var result = keysFunc(object);\n      return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n    }\n\n    /**\n     * The base implementation of `getTag` without fallbacks for buggy environments.\n     *\n     * @private\n     * @param {*} value The value to query.\n     * @returns {string} Returns the `toStringTag`.\n     */\n    function baseGetTag(value) {\n      if (value == null) {\n        return value === undefined ? undefinedTag : nullTag;\n      }\n      return (symToStringTag && symToStringTag in Object(value))\n        ? getRawTag(value)\n        : objectToString(value);\n    }\n\n    /**\n     * The base implementation of `_.gt` which doesn't coerce arguments.\n     *\n     * @private\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if `value` is greater than `other`,\n     *  else `false`.\n     */\n    function baseGt(value, other) {\n      return value > other;\n    }\n\n    /**\n     * The base implementation of `_.has` without support for deep paths.\n     *\n     * @private\n     * @param {Object} [object] The object to query.\n     * @param {Array|string} key The key to check.\n     * @returns {boolean} Returns `true` if `key` exists, else `false`.\n     */\n    function baseHas(object, key) {\n      return object != null && hasOwnProperty.call(object, key);\n    }\n\n    /**\n     * The base implementation of `_.hasIn` without support for deep paths.\n     *\n     * @private\n     * @param {Object} [object] The object to query.\n     * @param {Array|string} key The key to check.\n     * @returns {boolean} Returns `true` if `key` exists, else `false`.\n     */\n    function baseHasIn(object, key) {\n      return object != null && key in Object(object);\n    }\n\n    /**\n     * The base implementation of `_.inRange` which doesn't coerce arguments.\n     *\n     * @private\n     * @param {number} number The number to check.\n     * @param {number} start The start of the range.\n     * @param {number} end The end of the range.\n     * @returns {boolean} Returns `true` if `number` is in the range, else `false`.\n     */\n    function baseInRange(number, start, end) {\n      return number >= nativeMin(start, end) && number < nativeMax(start, end);\n    }\n\n    /**\n     * The base implementation of methods like `_.intersection`, without support\n     * for iteratee shorthands, that accepts an array of arrays to inspect.\n     *\n     * @private\n     * @param {Array} arrays The arrays to inspect.\n     * @param {Function} [iteratee] The iteratee invoked per element.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new array of shared values.\n     */\n    function baseIntersection(arrays, iteratee, comparator) {\n      var includes = comparator ? arrayIncludesWith : arrayIncludes,\n          length = arrays[0].length,\n          othLength = arrays.length,\n          othIndex = othLength,\n          caches = Array(othLength),\n          maxLength = Infinity,\n          result = [];\n\n      while (othIndex--) {\n        var array = arrays[othIndex];\n        if (othIndex && iteratee) {\n          array = arrayMap(array, baseUnary(iteratee));\n        }\n        maxLength = nativeMin(array.length, maxLength);\n        caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))\n          ? new SetCache(othIndex && array)\n          : undefined;\n      }\n      array = arrays[0];\n\n      var index = -1,\n          seen = caches[0];\n\n      outer:\n      while (++index < length && result.length < maxLength) {\n        var value = array[index],\n            computed = iteratee ? iteratee(value) : value;\n\n        value = (comparator || value !== 0) ? value : 0;\n        if (!(seen\n              ? cacheHas(seen, computed)\n              : includes(result, computed, comparator)\n            )) {\n          othIndex = othLength;\n          while (--othIndex) {\n            var cache = caches[othIndex];\n            if (!(cache\n                  ? cacheHas(cache, computed)\n                  : includes(arrays[othIndex], computed, comparator))\n                ) {\n              continue outer;\n            }\n          }\n          if (seen) {\n            seen.push(computed);\n          }\n          result.push(value);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.invert` and `_.invertBy` which inverts\n     * `object` with values transformed by `iteratee` and set by `setter`.\n     *\n     * @private\n     * @param {Object} object The object to iterate over.\n     * @param {Function} setter The function to set `accumulator` values.\n     * @param {Function} iteratee The iteratee to transform values.\n     * @param {Object} accumulator The initial inverted object.\n     * @returns {Function} Returns `accumulator`.\n     */\n    function baseInverter(object, setter, iteratee, accumulator) {\n      baseForOwn(object, function(value, key, object) {\n        setter(accumulator, iteratee(value), key, object);\n      });\n      return accumulator;\n    }\n\n    /**\n     * The base implementation of `_.invoke` without support for individual\n     * method arguments.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path of the method to invoke.\n     * @param {Array} args The arguments to invoke the method with.\n     * @returns {*} Returns the result of the invoked method.\n     */\n    function baseInvoke(object, path, args) {\n      path = castPath(path, object);\n      object = parent(object, path);\n      var func = object == null ? object : object[toKey(last(path))];\n      return func == null ? undefined : apply(func, object, args);\n    }\n\n    /**\n     * The base implementation of `_.isArguments`.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n     */\n    function baseIsArguments(value) {\n      return isObjectLike(value) && baseGetTag(value) == argsTag;\n    }\n\n    /**\n     * The base implementation of `_.isArrayBuffer` without Node.js optimizations.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.\n     */\n    function baseIsArrayBuffer(value) {\n      return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;\n    }\n\n    /**\n     * The base implementation of `_.isDate` without Node.js optimizations.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\n     */\n    function baseIsDate(value) {\n      return isObjectLike(value) && baseGetTag(value) == dateTag;\n    }\n\n    /**\n     * The base implementation of `_.isEqual` which supports partial comparisons\n     * and tracks traversed objects.\n     *\n     * @private\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @param {boolean} bitmask The bitmask flags.\n     *  1 - Unordered comparison\n     *  2 - Partial comparison\n     * @param {Function} [customizer] The function to customize comparisons.\n     * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n     * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n     */\n    function baseIsEqual(value, other, bitmask, customizer, stack) {\n      if (value === other) {\n        return true;\n      }\n      if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n        return value !== value && other !== other;\n      }\n      return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n    }\n\n    /**\n     * A specialized version of `baseIsEqual` for arrays and objects which performs\n     * deep comparisons and tracks traversed objects enabling objects with circular\n     * references to be compared.\n     *\n     * @private\n     * @param {Object} object The object to compare.\n     * @param {Object} other The other object to compare.\n     * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n     * @param {Function} customizer The function to customize comparisons.\n     * @param {Function} equalFunc The function to determine equivalents of values.\n     * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n     * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n     */\n    function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n      var objIsArr = isArray(object),\n          othIsArr = isArray(other),\n          objTag = objIsArr ? arrayTag : getTag(object),\n          othTag = othIsArr ? arrayTag : getTag(other);\n\n      objTag = objTag == argsTag ? objectTag : objTag;\n      othTag = othTag == argsTag ? objectTag : othTag;\n\n      var objIsObj = objTag == objectTag,\n          othIsObj = othTag == objectTag,\n          isSameTag = objTag == othTag;\n\n      if (isSameTag && isBuffer(object)) {\n        if (!isBuffer(other)) {\n          return false;\n        }\n        objIsArr = true;\n        objIsObj = false;\n      }\n      if (isSameTag && !objIsObj) {\n        stack || (stack = new Stack);\n        return (objIsArr || isTypedArray(object))\n          ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n          : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n      }\n      if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n        var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n            othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n        if (objIsWrapped || othIsWrapped) {\n          var objUnwrapped = objIsWrapped ? object.value() : object,\n              othUnwrapped = othIsWrapped ? other.value() : other;\n\n          stack || (stack = new Stack);\n          return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n        }\n      }\n      if (!isSameTag) {\n        return false;\n      }\n      stack || (stack = new Stack);\n      return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n    }\n\n    /**\n     * The base implementation of `_.isMap` without Node.js optimizations.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n     */\n    function baseIsMap(value) {\n      return isObjectLike(value) && getTag(value) == mapTag;\n    }\n\n    /**\n     * The base implementation of `_.isMatch` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Object} object The object to inspect.\n     * @param {Object} source The object of property values to match.\n     * @param {Array} matchData The property names, values, and compare flags to match.\n     * @param {Function} [customizer] The function to customize comparisons.\n     * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n     */\n    function baseIsMatch(object, source, matchData, customizer) {\n      var index = matchData.length,\n          length = index,\n          noCustomizer = !customizer;\n\n      if (object == null) {\n        return !length;\n      }\n      object = Object(object);\n      while (index--) {\n        var data = matchData[index];\n        if ((noCustomizer && data[2])\n              ? data[1] !== object[data[0]]\n              : !(data[0] in object)\n            ) {\n          return false;\n        }\n      }\n      while (++index < length) {\n        data = matchData[index];\n        var key = data[0],\n            objValue = object[key],\n            srcValue = data[1];\n\n        if (noCustomizer && data[2]) {\n          if (objValue === undefined && !(key in object)) {\n            return false;\n          }\n        } else {\n          var stack = new Stack;\n          if (customizer) {\n            var result = customizer(objValue, srcValue, key, object, source, stack);\n          }\n          if (!(result === undefined\n                ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)\n                : result\n              )) {\n            return false;\n          }\n        }\n      }\n      return true;\n    }\n\n    /**\n     * The base implementation of `_.isNative` without bad shim checks.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a native function,\n     *  else `false`.\n     */\n    function baseIsNative(value) {\n      if (!isObject(value) || isMasked(value)) {\n        return false;\n      }\n      var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n      return pattern.test(toSource(value));\n    }\n\n    /**\n     * The base implementation of `_.isRegExp` without Node.js optimizations.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\n     */\n    function baseIsRegExp(value) {\n      return isObjectLike(value) && baseGetTag(value) == regexpTag;\n    }\n\n    /**\n     * The base implementation of `_.isSet` without Node.js optimizations.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n     */\n    function baseIsSet(value) {\n      return isObjectLike(value) && getTag(value) == setTag;\n    }\n\n    /**\n     * The base implementation of `_.isTypedArray` without Node.js optimizations.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n     */\n    function baseIsTypedArray(value) {\n      return isObjectLike(value) &&\n        isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n    }\n\n    /**\n     * The base implementation of `_.iteratee`.\n     *\n     * @private\n     * @param {*} [value=_.identity] The value to convert to an iteratee.\n     * @returns {Function} Returns the iteratee.\n     */\n    function baseIteratee(value) {\n      // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n      // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\n      if (typeof value == 'function') {\n        return value;\n      }\n      if (value == null) {\n        return identity;\n      }\n      if (typeof value == 'object') {\n        return isArray(value)\n          ? baseMatchesProperty(value[0], value[1])\n          : baseMatches(value);\n      }\n      return property(value);\n    }\n\n    /**\n     * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property names.\n     */\n    function baseKeys(object) {\n      if (!isPrototype(object)) {\n        return nativeKeys(object);\n      }\n      var result = [];\n      for (var key in Object(object)) {\n        if (hasOwnProperty.call(object, key) && key != 'constructor') {\n          result.push(key);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property names.\n     */\n    function baseKeysIn(object) {\n      if (!isObject(object)) {\n        return nativeKeysIn(object);\n      }\n      var isProto = isPrototype(object),\n          result = [];\n\n      for (var key in object) {\n        if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n          result.push(key);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.lt` which doesn't coerce arguments.\n     *\n     * @private\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if `value` is less than `other`,\n     *  else `false`.\n     */\n    function baseLt(value, other) {\n      return value < other;\n    }\n\n    /**\n     * The base implementation of `_.map` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} iteratee The function invoked per iteration.\n     * @returns {Array} Returns the new mapped array.\n     */\n    function baseMap(collection, iteratee) {\n      var index = -1,\n          result = isArrayLike(collection) ? Array(collection.length) : [];\n\n      baseEach(collection, function(value, key, collection) {\n        result[++index] = iteratee(value, key, collection);\n      });\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.matches` which doesn't clone `source`.\n     *\n     * @private\n     * @param {Object} source The object of property values to match.\n     * @returns {Function} Returns the new spec function.\n     */\n    function baseMatches(source) {\n      var matchData = getMatchData(source);\n      if (matchData.length == 1 && matchData[0][2]) {\n        return matchesStrictComparable(matchData[0][0], matchData[0][1]);\n      }\n      return function(object) {\n        return object === source || baseIsMatch(object, source, matchData);\n      };\n    }\n\n    /**\n     * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n     *\n     * @private\n     * @param {string} path The path of the property to get.\n     * @param {*} srcValue The value to match.\n     * @returns {Function} Returns the new spec function.\n     */\n    function baseMatchesProperty(path, srcValue) {\n      if (isKey(path) && isStrictComparable(srcValue)) {\n        return matchesStrictComparable(toKey(path), srcValue);\n      }\n      return function(object) {\n        var objValue = get(object, path);\n        return (objValue === undefined && objValue === srcValue)\n          ? hasIn(object, path)\n          : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\n      };\n    }\n\n    /**\n     * The base implementation of `_.merge` without support for multiple sources.\n     *\n     * @private\n     * @param {Object} object The destination object.\n     * @param {Object} source The source object.\n     * @param {number} srcIndex The index of `source`.\n     * @param {Function} [customizer] The function to customize merged values.\n     * @param {Object} [stack] Tracks traversed source values and their merged\n     *  counterparts.\n     */\n    function baseMerge(object, source, srcIndex, customizer, stack) {\n      if (object === source) {\n        return;\n      }\n      baseFor(source, function(srcValue, key) {\n        stack || (stack = new Stack);\n        if (isObject(srcValue)) {\n          baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n        }\n        else {\n          var newValue = customizer\n            ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)\n            : undefined;\n\n          if (newValue === undefined) {\n            newValue = srcValue;\n          }\n          assignMergeValue(object, key, newValue);\n        }\n      }, keysIn);\n    }\n\n    /**\n     * A specialized version of `baseMerge` for arrays and objects which performs\n     * deep merges and tracks traversed objects enabling objects with circular\n     * references to be merged.\n     *\n     * @private\n     * @param {Object} object The destination object.\n     * @param {Object} source The source object.\n     * @param {string} key The key of the value to merge.\n     * @param {number} srcIndex The index of `source`.\n     * @param {Function} mergeFunc The function to merge values.\n     * @param {Function} [customizer] The function to customize assigned values.\n     * @param {Object} [stack] Tracks traversed source values and their merged\n     *  counterparts.\n     */\n    function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n      var objValue = safeGet(object, key),\n          srcValue = safeGet(source, key),\n          stacked = stack.get(srcValue);\n\n      if (stacked) {\n        assignMergeValue(object, key, stacked);\n        return;\n      }\n      var newValue = customizer\n        ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n        : undefined;\n\n      var isCommon = newValue === undefined;\n\n      if (isCommon) {\n        var isArr = isArray(srcValue),\n            isBuff = !isArr && isBuffer(srcValue),\n            isTyped = !isArr && !isBuff && isTypedArray(srcValue);\n\n        newValue = srcValue;\n        if (isArr || isBuff || isTyped) {\n          if (isArray(objValue)) {\n            newValue = objValue;\n          }\n          else if (isArrayLikeObject(objValue)) {\n            newValue = copyArray(objValue);\n          }\n          else if (isBuff) {\n            isCommon = false;\n            newValue = cloneBuffer(srcValue, true);\n          }\n          else if (isTyped) {\n            isCommon = false;\n            newValue = cloneTypedArray(srcValue, true);\n          }\n          else {\n            newValue = [];\n          }\n        }\n        else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n          newValue = objValue;\n          if (isArguments(objValue)) {\n            newValue = toPlainObject(objValue);\n          }\n          else if (!isObject(objValue) || isFunction(objValue)) {\n            newValue = initCloneObject(srcValue);\n          }\n        }\n        else {\n          isCommon = false;\n        }\n      }\n      if (isCommon) {\n        // Recursively merge objects and arrays (susceptible to call stack limits).\n        stack.set(srcValue, newValue);\n        mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n        stack['delete'](srcValue);\n      }\n      assignMergeValue(object, key, newValue);\n    }\n\n    /**\n     * The base implementation of `_.nth` which doesn't coerce arguments.\n     *\n     * @private\n     * @param {Array} array The array to query.\n     * @param {number} n The index of the element to return.\n     * @returns {*} Returns the nth element of `array`.\n     */\n    function baseNth(array, n) {\n      var length = array.length;\n      if (!length) {\n        return;\n      }\n      n += n < 0 ? length : 0;\n      return isIndex(n, length) ? array[n] : undefined;\n    }\n\n    /**\n     * The base implementation of `_.orderBy` without param guards.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.\n     * @param {string[]} orders The sort orders of `iteratees`.\n     * @returns {Array} Returns the new sorted array.\n     */\n    function baseOrderBy(collection, iteratees, orders) {\n      if (iteratees.length) {\n        iteratees = arrayMap(iteratees, function(iteratee) {\n          if (isArray(iteratee)) {\n            return function(value) {\n              return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);\n            };\n          }\n          return iteratee;\n        });\n      } else {\n        iteratees = [identity];\n      }\n\n      var index = -1;\n      iteratees = arrayMap(iteratees, baseUnary(getIteratee()));\n\n      var result = baseMap(collection, function(value, key, collection) {\n        var criteria = arrayMap(iteratees, function(iteratee) {\n          return iteratee(value);\n        });\n        return { 'criteria': criteria, 'index': ++index, 'value': value };\n      });\n\n      return baseSortBy(result, function(object, other) {\n        return compareMultiple(object, other, orders);\n      });\n    }\n\n    /**\n     * The base implementation of `_.pick` without support for individual\n     * property identifiers.\n     *\n     * @private\n     * @param {Object} object The source object.\n     * @param {string[]} paths The property paths to pick.\n     * @returns {Object} Returns the new object.\n     */\n    function basePick(object, paths) {\n      return basePickBy(object, paths, function(value, path) {\n        return hasIn(object, path);\n      });\n    }\n\n    /**\n     * The base implementation of  `_.pickBy` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Object} object The source object.\n     * @param {string[]} paths The property paths to pick.\n     * @param {Function} predicate The function invoked per property.\n     * @returns {Object} Returns the new object.\n     */\n    function basePickBy(object, paths, predicate) {\n      var index = -1,\n          length = paths.length,\n          result = {};\n\n      while (++index < length) {\n        var path = paths[index],\n            value = baseGet(object, path);\n\n        if (predicate(value, path)) {\n          baseSet(result, castPath(path, object), value);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * A specialized version of `baseProperty` which supports deep paths.\n     *\n     * @private\n     * @param {Array|string} path The path of the property to get.\n     * @returns {Function} Returns the new accessor function.\n     */\n    function basePropertyDeep(path) {\n      return function(object) {\n        return baseGet(object, path);\n      };\n    }\n\n    /**\n     * The base implementation of `_.pullAllBy` without support for iteratee\n     * shorthands.\n     *\n     * @private\n     * @param {Array} array The array to modify.\n     * @param {Array} values The values to remove.\n     * @param {Function} [iteratee] The iteratee invoked per element.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns `array`.\n     */\n    function basePullAll(array, values, iteratee, comparator) {\n      var indexOf = comparator ? baseIndexOfWith : baseIndexOf,\n          index = -1,\n          length = values.length,\n          seen = array;\n\n      if (array === values) {\n        values = copyArray(values);\n      }\n      if (iteratee) {\n        seen = arrayMap(array, baseUnary(iteratee));\n      }\n      while (++index < length) {\n        var fromIndex = 0,\n            value = values[index],\n            computed = iteratee ? iteratee(value) : value;\n\n        while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {\n          if (seen !== array) {\n            splice.call(seen, fromIndex, 1);\n          }\n          splice.call(array, fromIndex, 1);\n        }\n      }\n      return array;\n    }\n\n    /**\n     * The base implementation of `_.pullAt` without support for individual\n     * indexes or capturing the removed elements.\n     *\n     * @private\n     * @param {Array} array The array to modify.\n     * @param {number[]} indexes The indexes of elements to remove.\n     * @returns {Array} Returns `array`.\n     */\n    function basePullAt(array, indexes) {\n      var length = array ? indexes.length : 0,\n          lastIndex = length - 1;\n\n      while (length--) {\n        var index = indexes[length];\n        if (length == lastIndex || index !== previous) {\n          var previous = index;\n          if (isIndex(index)) {\n            splice.call(array, index, 1);\n          } else {\n            baseUnset(array, index);\n          }\n        }\n      }\n      return array;\n    }\n\n    /**\n     * The base implementation of `_.random` without support for returning\n     * floating-point numbers.\n     *\n     * @private\n     * @param {number} lower The lower bound.\n     * @param {number} upper The upper bound.\n     * @returns {number} Returns the random number.\n     */\n    function baseRandom(lower, upper) {\n      return lower + nativeFloor(nativeRandom() * (upper - lower + 1));\n    }\n\n    /**\n     * The base implementation of `_.range` and `_.rangeRight` which doesn't\n     * coerce arguments.\n     *\n     * @private\n     * @param {number} start The start of the range.\n     * @param {number} end The end of the range.\n     * @param {number} step The value to increment or decrement by.\n     * @param {boolean} [fromRight] Specify iterating from right to left.\n     * @returns {Array} Returns the range of numbers.\n     */\n    function baseRange(start, end, step, fromRight) {\n      var index = -1,\n          length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),\n          result = Array(length);\n\n      while (length--) {\n        result[fromRight ? length : ++index] = start;\n        start += step;\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.repeat` which doesn't coerce arguments.\n     *\n     * @private\n     * @param {string} string The string to repeat.\n     * @param {number} n The number of times to repeat the string.\n     * @returns {string} Returns the repeated string.\n     */\n    function baseRepeat(string, n) {\n      var result = '';\n      if (!string || n < 1 || n > MAX_SAFE_INTEGER) {\n        return result;\n      }\n      // Leverage the exponentiation by squaring algorithm for a faster repeat.\n      // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.\n      do {\n        if (n % 2) {\n          result += string;\n        }\n        n = nativeFloor(n / 2);\n        if (n) {\n          string += string;\n        }\n      } while (n);\n\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n     *\n     * @private\n     * @param {Function} func The function to apply a rest parameter to.\n     * @param {number} [start=func.length-1] The start position of the rest parameter.\n     * @returns {Function} Returns the new function.\n     */\n    function baseRest(func, start) {\n      return setToString(overRest(func, start, identity), func + '');\n    }\n\n    /**\n     * The base implementation of `_.sample`.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to sample.\n     * @returns {*} Returns the random element.\n     */\n    function baseSample(collection) {\n      return arraySample(values(collection));\n    }\n\n    /**\n     * The base implementation of `_.sampleSize` without param guards.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to sample.\n     * @param {number} n The number of elements to sample.\n     * @returns {Array} Returns the random elements.\n     */\n    function baseSampleSize(collection, n) {\n      var array = values(collection);\n      return shuffleSelf(array, baseClamp(n, 0, array.length));\n    }\n\n    /**\n     * The base implementation of `_.set`.\n     *\n     * @private\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The path of the property to set.\n     * @param {*} value The value to set.\n     * @param {Function} [customizer] The function to customize path creation.\n     * @returns {Object} Returns `object`.\n     */\n    function baseSet(object, path, value, customizer) {\n      if (!isObject(object)) {\n        return object;\n      }\n      path = castPath(path, object);\n\n      var index = -1,\n          length = path.length,\n          lastIndex = length - 1,\n          nested = object;\n\n      while (nested != null && ++index < length) {\n        var key = toKey(path[index]),\n            newValue = value;\n\n        if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n          return object;\n        }\n\n        if (index != lastIndex) {\n          var objValue = nested[key];\n          newValue = customizer ? customizer(objValue, key, nested) : undefined;\n          if (newValue === undefined) {\n            newValue = isObject(objValue)\n              ? objValue\n              : (isIndex(path[index + 1]) ? [] : {});\n          }\n        }\n        assignValue(nested, key, newValue);\n        nested = nested[key];\n      }\n      return object;\n    }\n\n    /**\n     * The base implementation of `setData` without support for hot loop shorting.\n     *\n     * @private\n     * @param {Function} func The function to associate metadata with.\n     * @param {*} data The metadata.\n     * @returns {Function} Returns `func`.\n     */\n    var baseSetData = !metaMap ? identity : function(func, data) {\n      metaMap.set(func, data);\n      return func;\n    };\n\n    /**\n     * The base implementation of `setToString` without support for hot loop shorting.\n     *\n     * @private\n     * @param {Function} func The function to modify.\n     * @param {Function} string The `toString` result.\n     * @returns {Function} Returns `func`.\n     */\n    var baseSetToString = !defineProperty ? identity : function(func, string) {\n      return defineProperty(func, 'toString', {\n        'configurable': true,\n        'enumerable': false,\n        'value': constant(string),\n        'writable': true\n      });\n    };\n\n    /**\n     * The base implementation of `_.shuffle`.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to shuffle.\n     * @returns {Array} Returns the new shuffled array.\n     */\n    function baseShuffle(collection) {\n      return shuffleSelf(values(collection));\n    }\n\n    /**\n     * The base implementation of `_.slice` without an iteratee call guard.\n     *\n     * @private\n     * @param {Array} array The array to slice.\n     * @param {number} [start=0] The start position.\n     * @param {number} [end=array.length] The end position.\n     * @returns {Array} Returns the slice of `array`.\n     */\n    function baseSlice(array, start, end) {\n      var index = -1,\n          length = array.length;\n\n      if (start < 0) {\n        start = -start > length ? 0 : (length + start);\n      }\n      end = end > length ? length : end;\n      if (end < 0) {\n        end += length;\n      }\n      length = start > end ? 0 : ((end - start) >>> 0);\n      start >>>= 0;\n\n      var result = Array(length);\n      while (++index < length) {\n        result[index] = array[index + start];\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.some` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} predicate The function invoked per iteration.\n     * @returns {boolean} Returns `true` if any element passes the predicate check,\n     *  else `false`.\n     */\n    function baseSome(collection, predicate) {\n      var result;\n\n      baseEach(collection, function(value, index, collection) {\n        result = predicate(value, index, collection);\n        return !result;\n      });\n      return !!result;\n    }\n\n    /**\n     * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which\n     * performs a binary search of `array` to determine the index at which `value`\n     * should be inserted into `array` in order to maintain its sort order.\n     *\n     * @private\n     * @param {Array} array The sorted array to inspect.\n     * @param {*} value The value to evaluate.\n     * @param {boolean} [retHighest] Specify returning the highest qualified index.\n     * @returns {number} Returns the index at which `value` should be inserted\n     *  into `array`.\n     */\n    function baseSortedIndex(array, value, retHighest) {\n      var low = 0,\n          high = array == null ? low : array.length;\n\n      if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {\n        while (low < high) {\n          var mid = (low + high) >>> 1,\n              computed = array[mid];\n\n          if (computed !== null && !isSymbol(computed) &&\n              (retHighest ? (computed <= value) : (computed < value))) {\n            low = mid + 1;\n          } else {\n            high = mid;\n          }\n        }\n        return high;\n      }\n      return baseSortedIndexBy(array, value, identity, retHighest);\n    }\n\n    /**\n     * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`\n     * which invokes `iteratee` for `value` and each element of `array` to compute\n     * their sort ranking. The iteratee is invoked with one argument; (value).\n     *\n     * @private\n     * @param {Array} array The sorted array to inspect.\n     * @param {*} value The value to evaluate.\n     * @param {Function} iteratee The iteratee invoked per element.\n     * @param {boolean} [retHighest] Specify returning the highest qualified index.\n     * @returns {number} Returns the index at which `value` should be inserted\n     *  into `array`.\n     */\n    function baseSortedIndexBy(array, value, iteratee, retHighest) {\n      var low = 0,\n          high = array == null ? 0 : array.length;\n      if (high === 0) {\n        return 0;\n      }\n\n      value = iteratee(value);\n      var valIsNaN = value !== value,\n          valIsNull = value === null,\n          valIsSymbol = isSymbol(value),\n          valIsUndefined = value === undefined;\n\n      while (low < high) {\n        var mid = nativeFloor((low + high) / 2),\n            computed = iteratee(array[mid]),\n            othIsDefined = computed !== undefined,\n            othIsNull = computed === null,\n            othIsReflexive = computed === computed,\n            othIsSymbol = isSymbol(computed);\n\n        if (valIsNaN) {\n          var setLow = retHighest || othIsReflexive;\n        } else if (valIsUndefined) {\n          setLow = othIsReflexive && (retHighest || othIsDefined);\n        } else if (valIsNull) {\n          setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);\n        } else if (valIsSymbol) {\n          setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);\n        } else if (othIsNull || othIsSymbol) {\n          setLow = false;\n        } else {\n          setLow = retHighest ? (computed <= value) : (computed < value);\n        }\n        if (setLow) {\n          low = mid + 1;\n        } else {\n          high = mid;\n        }\n      }\n      return nativeMin(high, MAX_ARRAY_INDEX);\n    }\n\n    /**\n     * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without\n     * support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array} array The array to inspect.\n     * @param {Function} [iteratee] The iteratee invoked per element.\n     * @returns {Array} Returns the new duplicate free array.\n     */\n    function baseSortedUniq(array, iteratee) {\n      var index = -1,\n          length = array.length,\n          resIndex = 0,\n          result = [];\n\n      while (++index < length) {\n        var value = array[index],\n            computed = iteratee ? iteratee(value) : value;\n\n        if (!index || !eq(computed, seen)) {\n          var seen = computed;\n          result[resIndex++] = value === 0 ? 0 : value;\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.toNumber` which doesn't ensure correct\n     * conversions of binary, hexadecimal, or octal string values.\n     *\n     * @private\n     * @param {*} value The value to process.\n     * @returns {number} Returns the number.\n     */\n    function baseToNumber(value) {\n      if (typeof value == 'number') {\n        return value;\n      }\n      if (isSymbol(value)) {\n        return NAN;\n      }\n      return +value;\n    }\n\n    /**\n     * The base implementation of `_.toString` which doesn't convert nullish\n     * values to empty strings.\n     *\n     * @private\n     * @param {*} value The value to process.\n     * @returns {string} Returns the string.\n     */\n    function baseToString(value) {\n      // Exit early for strings to avoid a performance hit in some environments.\n      if (typeof value == 'string') {\n        return value;\n      }\n      if (isArray(value)) {\n        // Recursively convert values (susceptible to call stack limits).\n        return arrayMap(value, baseToString) + '';\n      }\n      if (isSymbol(value)) {\n        return symbolToString ? symbolToString.call(value) : '';\n      }\n      var result = (value + '');\n      return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n    }\n\n    /**\n     * The base implementation of `_.uniqBy` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array} array The array to inspect.\n     * @param {Function} [iteratee] The iteratee invoked per element.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new duplicate free array.\n     */\n    function baseUniq(array, iteratee, comparator) {\n      var index = -1,\n          includes = arrayIncludes,\n          length = array.length,\n          isCommon = true,\n          result = [],\n          seen = result;\n\n      if (comparator) {\n        isCommon = false;\n        includes = arrayIncludesWith;\n      }\n      else if (length >= LARGE_ARRAY_SIZE) {\n        var set = iteratee ? null : createSet(array);\n        if (set) {\n          return setToArray(set);\n        }\n        isCommon = false;\n        includes = cacheHas;\n        seen = new SetCache;\n      }\n      else {\n        seen = iteratee ? [] : result;\n      }\n      outer:\n      while (++index < length) {\n        var value = array[index],\n            computed = iteratee ? iteratee(value) : value;\n\n        value = (comparator || value !== 0) ? value : 0;\n        if (isCommon && computed === computed) {\n          var seenIndex = seen.length;\n          while (seenIndex--) {\n            if (seen[seenIndex] === computed) {\n              continue outer;\n            }\n          }\n          if (iteratee) {\n            seen.push(computed);\n          }\n          result.push(value);\n        }\n        else if (!includes(seen, computed, comparator)) {\n          if (seen !== result) {\n            seen.push(computed);\n          }\n          result.push(value);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.unset`.\n     *\n     * @private\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The property path to unset.\n     * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n     */\n    function baseUnset(object, path) {\n      path = castPath(path, object);\n\n      // Prevent prototype pollution:\n      // https://github.com/lodash/lodash/security/advisories/GHSA-xxjr-mmjv-4gpg\n      // https://github.com/lodash/lodash/security/advisories/GHSA-f23m-r3pf-42rh\n      var index = -1,\n          length = path.length;\n\n      if (!length) {\n        return true;\n      }\n\n      while (++index < length) {\n        var key = toKey(path[index]);\n\n        // Always block \"__proto__\" anywhere in the path if it's not expected\n        if (key === '__proto__' && !hasOwnProperty.call(object, '__proto__')) {\n          return false;\n        }\n\n        // Block constructor/prototype as non-terminal traversal keys to prevent\n        // escaping the object graph into built-in constructors and prototypes.\n        if ((key === 'constructor' || key === 'prototype') && index < length - 1) {\n          return false;\n        }\n      }\n\n      var obj = parent(object, path);\n      return obj == null || delete obj[toKey(last(path))];\n    }\n\n    /**\n     * The base implementation of `_.update`.\n     *\n     * @private\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The path of the property to update.\n     * @param {Function} updater The function to produce the updated value.\n     * @param {Function} [customizer] The function to customize path creation.\n     * @returns {Object} Returns `object`.\n     */\n    function baseUpdate(object, path, updater, customizer) {\n      return baseSet(object, path, updater(baseGet(object, path)), customizer);\n    }\n\n    /**\n     * The base implementation of methods like `_.dropWhile` and `_.takeWhile`\n     * without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array} array The array to query.\n     * @param {Function} predicate The function invoked per iteration.\n     * @param {boolean} [isDrop] Specify dropping elements instead of taking them.\n     * @param {boolean} [fromRight] Specify iterating from right to left.\n     * @returns {Array} Returns the slice of `array`.\n     */\n    function baseWhile(array, predicate, isDrop, fromRight) {\n      var length = array.length,\n          index = fromRight ? length : -1;\n\n      while ((fromRight ? index-- : ++index < length) &&\n        predicate(array[index], index, array)) {}\n\n      return isDrop\n        ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))\n        : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));\n    }\n\n    /**\n     * The base implementation of `wrapperValue` which returns the result of\n     * performing a sequence of actions on the unwrapped `value`, where each\n     * successive action is supplied the return value of the previous.\n     *\n     * @private\n     * @param {*} value The unwrapped value.\n     * @param {Array} actions Actions to perform to resolve the unwrapped value.\n     * @returns {*} Returns the resolved value.\n     */\n    function baseWrapperValue(value, actions) {\n      var result = value;\n      if (result instanceof LazyWrapper) {\n        result = result.value();\n      }\n      return arrayReduce(actions, function(result, action) {\n        return action.func.apply(action.thisArg, arrayPush([result], action.args));\n      }, result);\n    }\n\n    /**\n     * The base implementation of methods like `_.xor`, without support for\n     * iteratee shorthands, that accepts an array of arrays to inspect.\n     *\n     * @private\n     * @param {Array} arrays The arrays to inspect.\n     * @param {Function} [iteratee] The iteratee invoked per element.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new array of values.\n     */\n    function baseXor(arrays, iteratee, comparator) {\n      var length = arrays.length;\n      if (length < 2) {\n        return length ? baseUniq(arrays[0]) : [];\n      }\n      var index = -1,\n          result = Array(length);\n\n      while (++index < length) {\n        var array = arrays[index],\n            othIndex = -1;\n\n        while (++othIndex < length) {\n          if (othIndex != index) {\n            result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);\n          }\n        }\n      }\n      return baseUniq(baseFlatten(result, 1), iteratee, comparator);\n    }\n\n    /**\n     * This base implementation of `_.zipObject` which assigns values using `assignFunc`.\n     *\n     * @private\n     * @param {Array} props The property identifiers.\n     * @param {Array} values The property values.\n     * @param {Function} assignFunc The function to assign values.\n     * @returns {Object} Returns the new object.\n     */\n    function baseZipObject(props, values, assignFunc) {\n      var index = -1,\n          length = props.length,\n          valsLength = values.length,\n          result = {};\n\n      while (++index < length) {\n        var value = index < valsLength ? values[index] : undefined;\n        assignFunc(result, props[index], value);\n      }\n      return result;\n    }\n\n    /**\n     * Casts `value` to an empty array if it's not an array like object.\n     *\n     * @private\n     * @param {*} value The value to inspect.\n     * @returns {Array|Object} Returns the cast array-like object.\n     */\n    function castArrayLikeObject(value) {\n      return isArrayLikeObject(value) ? value : [];\n    }\n\n    /**\n     * Casts `value` to `identity` if it's not a function.\n     *\n     * @private\n     * @param {*} value The value to inspect.\n     * @returns {Function} Returns cast function.\n     */\n    function castFunction(value) {\n      return typeof value == 'function' ? value : identity;\n    }\n\n    /**\n     * Casts `value` to a path array if it's not one.\n     *\n     * @private\n     * @param {*} value The value to inspect.\n     * @param {Object} [object] The object to query keys on.\n     * @returns {Array} Returns the cast property path array.\n     */\n    function castPath(value, object) {\n      if (isArray(value)) {\n        return value;\n      }\n      return isKey(value, object) ? [value] : stringToPath(toString(value));\n    }\n\n    /**\n     * A `baseRest` alias which can be replaced with `identity` by module\n     * replacement plugins.\n     *\n     * @private\n     * @type {Function}\n     * @param {Function} func The function to apply a rest parameter to.\n     * @returns {Function} Returns the new function.\n     */\n    var castRest = baseRest;\n\n    /**\n     * Casts `array` to a slice if it's needed.\n     *\n     * @private\n     * @param {Array} array The array to inspect.\n     * @param {number} start The start position.\n     * @param {number} [end=array.length] The end position.\n     * @returns {Array} Returns the cast slice.\n     */\n    function castSlice(array, start, end) {\n      var length = array.length;\n      end = end === undefined ? length : end;\n      return (!start && end >= length) ? array : baseSlice(array, start, end);\n    }\n\n    /**\n     * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout).\n     *\n     * @private\n     * @param {number|Object} id The timer id or timeout object of the timer to clear.\n     */\n    var clearTimeout = ctxClearTimeout || function(id) {\n      return root.clearTimeout(id);\n    };\n\n    /**\n     * Creates a clone of  `buffer`.\n     *\n     * @private\n     * @param {Buffer} buffer The buffer to clone.\n     * @param {boolean} [isDeep] Specify a deep clone.\n     * @returns {Buffer} Returns the cloned buffer.\n     */\n    function cloneBuffer(buffer, isDeep) {\n      if (isDeep) {\n        return buffer.slice();\n      }\n      var length = buffer.length,\n          result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n      buffer.copy(result);\n      return result;\n    }\n\n    /**\n     * Creates a clone of `arrayBuffer`.\n     *\n     * @private\n     * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n     * @returns {ArrayBuffer} Returns the cloned array buffer.\n     */\n    function cloneArrayBuffer(arrayBuffer) {\n      var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n      new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n      return result;\n    }\n\n    /**\n     * Creates a clone of `dataView`.\n     *\n     * @private\n     * @param {Object} dataView The data view to clone.\n     * @param {boolean} [isDeep] Specify a deep clone.\n     * @returns {Object} Returns the cloned data view.\n     */\n    function cloneDataView(dataView, isDeep) {\n      var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n      return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n    }\n\n    /**\n     * Creates a clone of `regexp`.\n     *\n     * @private\n     * @param {Object} regexp The regexp to clone.\n     * @returns {Object} Returns the cloned regexp.\n     */\n    function cloneRegExp(regexp) {\n      var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n      result.lastIndex = regexp.lastIndex;\n      return result;\n    }\n\n    /**\n     * Creates a clone of the `symbol` object.\n     *\n     * @private\n     * @param {Object} symbol The symbol object to clone.\n     * @returns {Object} Returns the cloned symbol object.\n     */\n    function cloneSymbol(symbol) {\n      return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n    }\n\n    /**\n     * Creates a clone of `typedArray`.\n     *\n     * @private\n     * @param {Object} typedArray The typed array to clone.\n     * @param {boolean} [isDeep] Specify a deep clone.\n     * @returns {Object} Returns the cloned typed array.\n     */\n    function cloneTypedArray(typedArray, isDeep) {\n      var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n      return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n    }\n\n    /**\n     * Compares values to sort them in ascending order.\n     *\n     * @private\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {number} Returns the sort order indicator for `value`.\n     */\n    function compareAscending(value, other) {\n      if (value !== other) {\n        var valIsDefined = value !== undefined,\n            valIsNull = value === null,\n            valIsReflexive = value === value,\n            valIsSymbol = isSymbol(value);\n\n        var othIsDefined = other !== undefined,\n            othIsNull = other === null,\n            othIsReflexive = other === other,\n            othIsSymbol = isSymbol(other);\n\n        if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||\n            (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||\n            (valIsNull && othIsDefined && othIsReflexive) ||\n            (!valIsDefined && othIsReflexive) ||\n            !valIsReflexive) {\n          return 1;\n        }\n        if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||\n            (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||\n            (othIsNull && valIsDefined && valIsReflexive) ||\n            (!othIsDefined && valIsReflexive) ||\n            !othIsReflexive) {\n          return -1;\n        }\n      }\n      return 0;\n    }\n\n    /**\n     * Used by `_.orderBy` to compare multiple properties of a value to another\n     * and stable sort them.\n     *\n     * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,\n     * specify an order of \"desc\" for descending or \"asc\" for ascending sort order\n     * of corresponding values.\n     *\n     * @private\n     * @param {Object} object The object to compare.\n     * @param {Object} other The other object to compare.\n     * @param {boolean[]|string[]} orders The order to sort by for each property.\n     * @returns {number} Returns the sort order indicator for `object`.\n     */\n    function compareMultiple(object, other, orders) {\n      var index = -1,\n          objCriteria = object.criteria,\n          othCriteria = other.criteria,\n          length = objCriteria.length,\n          ordersLength = orders.length;\n\n      while (++index < length) {\n        var result = compareAscending(objCriteria[index], othCriteria[index]);\n        if (result) {\n          if (index >= ordersLength) {\n            return result;\n          }\n          var order = orders[index];\n          return result * (order == 'desc' ? -1 : 1);\n        }\n      }\n      // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications\n      // that causes it, under certain circumstances, to provide the same value for\n      // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247\n      // for more details.\n      //\n      // This also ensures a stable sort in V8 and other engines.\n      // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.\n      return object.index - other.index;\n    }\n\n    /**\n     * Creates an array that is the composition of partially applied arguments,\n     * placeholders, and provided arguments into a single array of arguments.\n     *\n     * @private\n     * @param {Array} args The provided arguments.\n     * @param {Array} partials The arguments to prepend to those provided.\n     * @param {Array} holders The `partials` placeholder indexes.\n     * @params {boolean} [isCurried] Specify composing for a curried function.\n     * @returns {Array} Returns the new array of composed arguments.\n     */\n    function composeArgs(args, partials, holders, isCurried) {\n      var argsIndex = -1,\n          argsLength = args.length,\n          holdersLength = holders.length,\n          leftIndex = -1,\n          leftLength = partials.length,\n          rangeLength = nativeMax(argsLength - holdersLength, 0),\n          result = Array(leftLength + rangeLength),\n          isUncurried = !isCurried;\n\n      while (++leftIndex < leftLength) {\n        result[leftIndex] = partials[leftIndex];\n      }\n      while (++argsIndex < holdersLength) {\n        if (isUncurried || argsIndex < argsLength) {\n          result[holders[argsIndex]] = args[argsIndex];\n        }\n      }\n      while (rangeLength--) {\n        result[leftIndex++] = args[argsIndex++];\n      }\n      return result;\n    }\n\n    /**\n     * This function is like `composeArgs` except that the arguments composition\n     * is tailored for `_.partialRight`.\n     *\n     * @private\n     * @param {Array} args The provided arguments.\n     * @param {Array} partials The arguments to append to those provided.\n     * @param {Array} holders The `partials` placeholder indexes.\n     * @params {boolean} [isCurried] Specify composing for a curried function.\n     * @returns {Array} Returns the new array of composed arguments.\n     */\n    function composeArgsRight(args, partials, holders, isCurried) {\n      var argsIndex = -1,\n          argsLength = args.length,\n          holdersIndex = -1,\n          holdersLength = holders.length,\n          rightIndex = -1,\n          rightLength = partials.length,\n          rangeLength = nativeMax(argsLength - holdersLength, 0),\n          result = Array(rangeLength + rightLength),\n          isUncurried = !isCurried;\n\n      while (++argsIndex < rangeLength) {\n        result[argsIndex] = args[argsIndex];\n      }\n      var offset = argsIndex;\n      while (++rightIndex < rightLength) {\n        result[offset + rightIndex] = partials[rightIndex];\n      }\n      while (++holdersIndex < holdersLength) {\n        if (isUncurried || argsIndex < argsLength) {\n          result[offset + holders[holdersIndex]] = args[argsIndex++];\n        }\n      }\n      return result;\n    }\n\n    /**\n     * Copies the values of `source` to `array`.\n     *\n     * @private\n     * @param {Array} source The array to copy values from.\n     * @param {Array} [array=[]] The array to copy values to.\n     * @returns {Array} Returns `array`.\n     */\n    function copyArray(source, array) {\n      var index = -1,\n          length = source.length;\n\n      array || (array = Array(length));\n      while (++index < length) {\n        array[index] = source[index];\n      }\n      return array;\n    }\n\n    /**\n     * Copies properties of `source` to `object`.\n     *\n     * @private\n     * @param {Object} source The object to copy properties from.\n     * @param {Array} props The property identifiers to copy.\n     * @param {Object} [object={}] The object to copy properties to.\n     * @param {Function} [customizer] The function to customize copied values.\n     * @returns {Object} Returns `object`.\n     */\n    function copyObject(source, props, object, customizer) {\n      var isNew = !object;\n      object || (object = {});\n\n      var index = -1,\n          length = props.length;\n\n      while (++index < length) {\n        var key = props[index];\n\n        var newValue = customizer\n          ? customizer(object[key], source[key], key, object, source)\n          : undefined;\n\n        if (newValue === undefined) {\n          newValue = source[key];\n        }\n        if (isNew) {\n          baseAssignValue(object, key, newValue);\n        } else {\n          assignValue(object, key, newValue);\n        }\n      }\n      return object;\n    }\n\n    /**\n     * Copies own symbols of `source` to `object`.\n     *\n     * @private\n     * @param {Object} source The object to copy symbols from.\n     * @param {Object} [object={}] The object to copy symbols to.\n     * @returns {Object} Returns `object`.\n     */\n    function copySymbols(source, object) {\n      return copyObject(source, getSymbols(source), object);\n    }\n\n    /**\n     * Copies own and inherited symbols of `source` to `object`.\n     *\n     * @private\n     * @param {Object} source The object to copy symbols from.\n     * @param {Object} [object={}] The object to copy symbols to.\n     * @returns {Object} Returns `object`.\n     */\n    function copySymbolsIn(source, object) {\n      return copyObject(source, getSymbolsIn(source), object);\n    }\n\n    /**\n     * Creates a function like `_.groupBy`.\n     *\n     * @private\n     * @param {Function} setter The function to set accumulator values.\n     * @param {Function} [initializer] The accumulator object initializer.\n     * @returns {Function} Returns the new aggregator function.\n     */\n    function createAggregator(setter, initializer) {\n      return function(collection, iteratee) {\n        var func = isArray(collection) ? arrayAggregator : baseAggregator,\n            accumulator = initializer ? initializer() : {};\n\n        return func(collection, setter, getIteratee(iteratee, 2), accumulator);\n      };\n    }\n\n    /**\n     * Creates a function like `_.assign`.\n     *\n     * @private\n     * @param {Function} assigner The function to assign values.\n     * @returns {Function} Returns the new assigner function.\n     */\n    function createAssigner(assigner) {\n      return baseRest(function(object, sources) {\n        var index = -1,\n            length = sources.length,\n            customizer = length > 1 ? sources[length - 1] : undefined,\n            guard = length > 2 ? sources[2] : undefined;\n\n        customizer = (assigner.length > 3 && typeof customizer == 'function')\n          ? (length--, customizer)\n          : undefined;\n\n        if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n          customizer = length < 3 ? undefined : customizer;\n          length = 1;\n        }\n        object = Object(object);\n        while (++index < length) {\n          var source = sources[index];\n          if (source) {\n            assigner(object, source, index, customizer);\n          }\n        }\n        return object;\n      });\n    }\n\n    /**\n     * Creates a `baseEach` or `baseEachRight` function.\n     *\n     * @private\n     * @param {Function} eachFunc The function to iterate over a collection.\n     * @param {boolean} [fromRight] Specify iterating from right to left.\n     * @returns {Function} Returns the new base function.\n     */\n    function createBaseEach(eachFunc, fromRight) {\n      return function(collection, iteratee) {\n        if (collection == null) {\n          return collection;\n        }\n        if (!isArrayLike(collection)) {\n          return eachFunc(collection, iteratee);\n        }\n        var length = collection.length,\n            index = fromRight ? length : -1,\n            iterable = Object(collection);\n\n        while ((fromRight ? index-- : ++index < length)) {\n          if (iteratee(iterable[index], index, iterable) === false) {\n            break;\n          }\n        }\n        return collection;\n      };\n    }\n\n    /**\n     * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n     *\n     * @private\n     * @param {boolean} [fromRight] Specify iterating from right to left.\n     * @returns {Function} Returns the new base function.\n     */\n    function createBaseFor(fromRight) {\n      return function(object, iteratee, keysFunc) {\n        var index = -1,\n            iterable = Object(object),\n            props = keysFunc(object),\n            length = props.length;\n\n        while (length--) {\n          var key = props[fromRight ? length : ++index];\n          if (iteratee(iterable[key], key, iterable) === false) {\n            break;\n          }\n        }\n        return object;\n      };\n    }\n\n    /**\n     * Creates a function that wraps `func` to invoke it with the optional `this`\n     * binding of `thisArg`.\n     *\n     * @private\n     * @param {Function} func The function to wrap.\n     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n     * @param {*} [thisArg] The `this` binding of `func`.\n     * @returns {Function} Returns the new wrapped function.\n     */\n    function createBind(func, bitmask, thisArg) {\n      var isBind = bitmask & WRAP_BIND_FLAG,\n          Ctor = createCtor(func);\n\n      function wrapper() {\n        var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n        return fn.apply(isBind ? thisArg : this, arguments);\n      }\n      return wrapper;\n    }\n\n    /**\n     * Creates a function like `_.lowerFirst`.\n     *\n     * @private\n     * @param {string} methodName The name of the `String` case method to use.\n     * @returns {Function} Returns the new case function.\n     */\n    function createCaseFirst(methodName) {\n      return function(string) {\n        string = toString(string);\n\n        var strSymbols = hasUnicode(string)\n          ? stringToArray(string)\n          : undefined;\n\n        var chr = strSymbols\n          ? strSymbols[0]\n          : string.charAt(0);\n\n        var trailing = strSymbols\n          ? castSlice(strSymbols, 1).join('')\n          : string.slice(1);\n\n        return chr[methodName]() + trailing;\n      };\n    }\n\n    /**\n     * Creates a function like `_.camelCase`.\n     *\n     * @private\n     * @param {Function} callback The function to combine each word.\n     * @returns {Function} Returns the new compounder function.\n     */\n    function createCompounder(callback) {\n      return function(string) {\n        return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');\n      };\n    }\n\n    /**\n     * Creates a function that produces an instance of `Ctor` regardless of\n     * whether it was invoked as part of a `new` expression or by `call` or `apply`.\n     *\n     * @private\n     * @param {Function} Ctor The constructor to wrap.\n     * @returns {Function} Returns the new wrapped function.\n     */\n    function createCtor(Ctor) {\n      return function() {\n        // Use a `switch` statement to work with class constructors. See\n        // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist\n        // for more details.\n        var args = arguments;\n        switch (args.length) {\n          case 0: return new Ctor;\n          case 1: return new Ctor(args[0]);\n          case 2: return new Ctor(args[0], args[1]);\n          case 3: return new Ctor(args[0], args[1], args[2]);\n          case 4: return new Ctor(args[0], args[1], args[2], args[3]);\n          case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);\n          case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);\n          case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);\n        }\n        var thisBinding = baseCreate(Ctor.prototype),\n            result = Ctor.apply(thisBinding, args);\n\n        // Mimic the constructor's `return` behavior.\n        // See https://es5.github.io/#x13.2.2 for more details.\n        return isObject(result) ? result : thisBinding;\n      };\n    }\n\n    /**\n     * Creates a function that wraps `func` to enable currying.\n     *\n     * @private\n     * @param {Function} func The function to wrap.\n     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n     * @param {number} arity The arity of `func`.\n     * @returns {Function} Returns the new wrapped function.\n     */\n    function createCurry(func, bitmask, arity) {\n      var Ctor = createCtor(func);\n\n      function wrapper() {\n        var length = arguments.length,\n            args = Array(length),\n            index = length,\n            placeholder = getHolder(wrapper);\n\n        while (index--) {\n          args[index] = arguments[index];\n        }\n        var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)\n          ? []\n          : replaceHolders(args, placeholder);\n\n        length -= holders.length;\n        if (length < arity) {\n          return createRecurry(\n            func, bitmask, createHybrid, wrapper.placeholder, undefined,\n            args, holders, undefined, undefined, arity - length);\n        }\n        var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n        return apply(fn, this, args);\n      }\n      return wrapper;\n    }\n\n    /**\n     * Creates a `_.find` or `_.findLast` function.\n     *\n     * @private\n     * @param {Function} findIndexFunc The function to find the collection index.\n     * @returns {Function} Returns the new find function.\n     */\n    function createFind(findIndexFunc) {\n      return function(collection, predicate, fromIndex) {\n        var iterable = Object(collection);\n        if (!isArrayLike(collection)) {\n          var iteratee = getIteratee(predicate, 3);\n          collection = keys(collection);\n          predicate = function(key) { return iteratee(iterable[key], key, iterable); };\n        }\n        var index = findIndexFunc(collection, predicate, fromIndex);\n        return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;\n      };\n    }\n\n    /**\n     * Creates a `_.flow` or `_.flowRight` function.\n     *\n     * @private\n     * @param {boolean} [fromRight] Specify iterating from right to left.\n     * @returns {Function} Returns the new flow function.\n     */\n    function createFlow(fromRight) {\n      return flatRest(function(funcs) {\n        var length = funcs.length,\n            index = length,\n            prereq = LodashWrapper.prototype.thru;\n\n        if (fromRight) {\n          funcs.reverse();\n        }\n        while (index--) {\n          var func = funcs[index];\n          if (typeof func != 'function') {\n            throw new TypeError(FUNC_ERROR_TEXT);\n          }\n          if (prereq && !wrapper && getFuncName(func) == 'wrapper') {\n            var wrapper = new LodashWrapper([], true);\n          }\n        }\n        index = wrapper ? index : length;\n        while (++index < length) {\n          func = funcs[index];\n\n          var funcName = getFuncName(func),\n              data = funcName == 'wrapper' ? getData(func) : undefined;\n\n          if (data && isLaziable(data[0]) &&\n                data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&\n                !data[4].length && data[9] == 1\n              ) {\n            wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);\n          } else {\n            wrapper = (func.length == 1 && isLaziable(func))\n              ? wrapper[funcName]()\n              : wrapper.thru(func);\n          }\n        }\n        return function() {\n          var args = arguments,\n              value = args[0];\n\n          if (wrapper && args.length == 1 && isArray(value)) {\n            return wrapper.plant(value).value();\n          }\n          var index = 0,\n              result = length ? funcs[index].apply(this, args) : value;\n\n          while (++index < length) {\n            result = funcs[index].call(this, result);\n          }\n          return result;\n        };\n      });\n    }\n\n    /**\n     * Creates a function that wraps `func` to invoke it with optional `this`\n     * binding of `thisArg`, partial application, and currying.\n     *\n     * @private\n     * @param {Function|string} func The function or method name to wrap.\n     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n     * @param {*} [thisArg] The `this` binding of `func`.\n     * @param {Array} [partials] The arguments to prepend to those provided to\n     *  the new function.\n     * @param {Array} [holders] The `partials` placeholder indexes.\n     * @param {Array} [partialsRight] The arguments to append to those provided\n     *  to the new function.\n     * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.\n     * @param {Array} [argPos] The argument positions of the new function.\n     * @param {number} [ary] The arity cap of `func`.\n     * @param {number} [arity] The arity of `func`.\n     * @returns {Function} Returns the new wrapped function.\n     */\n    function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {\n      var isAry = bitmask & WRAP_ARY_FLAG,\n          isBind = bitmask & WRAP_BIND_FLAG,\n          isBindKey = bitmask & WRAP_BIND_KEY_FLAG,\n          isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),\n          isFlip = bitmask & WRAP_FLIP_FLAG,\n          Ctor = isBindKey ? undefined : createCtor(func);\n\n      function wrapper() {\n        var length = arguments.length,\n            args = Array(length),\n            index = length;\n\n        while (index--) {\n          args[index] = arguments[index];\n        }\n        if (isCurried) {\n          var placeholder = getHolder(wrapper),\n              holdersCount = countHolders(args, placeholder);\n        }\n        if (partials) {\n          args = composeArgs(args, partials, holders, isCurried);\n        }\n        if (partialsRight) {\n          args = composeArgsRight(args, partialsRight, holdersRight, isCurried);\n        }\n        length -= holdersCount;\n        if (isCurried && length < arity) {\n          var newHolders = replaceHolders(args, placeholder);\n          return createRecurry(\n            func, bitmask, createHybrid, wrapper.placeholder, thisArg,\n            args, newHolders, argPos, ary, arity - length\n          );\n        }\n        var thisBinding = isBind ? thisArg : this,\n            fn = isBindKey ? thisBinding[func] : func;\n\n        length = args.length;\n        if (argPos) {\n          args = reorder(args, argPos);\n        } else if (isFlip && length > 1) {\n          args.reverse();\n        }\n        if (isAry && ary < length) {\n          args.length = ary;\n        }\n        if (this && this !== root && this instanceof wrapper) {\n          fn = Ctor || createCtor(fn);\n        }\n        return fn.apply(thisBinding, args);\n      }\n      return wrapper;\n    }\n\n    /**\n     * Creates a function like `_.invertBy`.\n     *\n     * @private\n     * @param {Function} setter The function to set accumulator values.\n     * @param {Function} toIteratee The function to resolve iteratees.\n     * @returns {Function} Returns the new inverter function.\n     */\n    function createInverter(setter, toIteratee) {\n      return function(object, iteratee) {\n        return baseInverter(object, setter, toIteratee(iteratee), {});\n      };\n    }\n\n    /**\n     * Creates a function that performs a mathematical operation on two values.\n     *\n     * @private\n     * @param {Function} operator The function to perform the operation.\n     * @param {number} [defaultValue] The value used for `undefined` arguments.\n     * @returns {Function} Returns the new mathematical operation function.\n     */\n    function createMathOperation(operator, defaultValue) {\n      return function(value, other) {\n        var result;\n        if (value === undefined && other === undefined) {\n          return defaultValue;\n        }\n        if (value !== undefined) {\n          result = value;\n        }\n        if (other !== undefined) {\n          if (result === undefined) {\n            return other;\n          }\n          if (typeof value == 'string' || typeof other == 'string') {\n            value = baseToString(value);\n            other = baseToString(other);\n          } else {\n            value = baseToNumber(value);\n            other = baseToNumber(other);\n          }\n          result = operator(value, other);\n        }\n        return result;\n      };\n    }\n\n    /**\n     * Creates a function like `_.over`.\n     *\n     * @private\n     * @param {Function} arrayFunc The function to iterate over iteratees.\n     * @returns {Function} Returns the new over function.\n     */\n    function createOver(arrayFunc) {\n      return flatRest(function(iteratees) {\n        iteratees = arrayMap(iteratees, baseUnary(getIteratee()));\n        return baseRest(function(args) {\n          var thisArg = this;\n          return arrayFunc(iteratees, function(iteratee) {\n            return apply(iteratee, thisArg, args);\n          });\n        });\n      });\n    }\n\n    /**\n     * Creates the padding for `string` based on `length`. The `chars` string\n     * is truncated if the number of characters exceeds `length`.\n     *\n     * @private\n     * @param {number} length The padding length.\n     * @param {string} [chars=' '] The string used as padding.\n     * @returns {string} Returns the padding for `string`.\n     */\n    function createPadding(length, chars) {\n      chars = chars === undefined ? ' ' : baseToString(chars);\n\n      var charsLength = chars.length;\n      if (charsLength < 2) {\n        return charsLength ? baseRepeat(chars, length) : chars;\n      }\n      var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));\n      return hasUnicode(chars)\n        ? castSlice(stringToArray(result), 0, length).join('')\n        : result.slice(0, length);\n    }\n\n    /**\n     * Creates a function that wraps `func` to invoke it with the `this` binding\n     * of `thisArg` and `partials` prepended to the arguments it receives.\n     *\n     * @private\n     * @param {Function} func The function to wrap.\n     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n     * @param {*} thisArg The `this` binding of `func`.\n     * @param {Array} partials The arguments to prepend to those provided to\n     *  the new function.\n     * @returns {Function} Returns the new wrapped function.\n     */\n    function createPartial(func, bitmask, thisArg, partials) {\n      var isBind = bitmask & WRAP_BIND_FLAG,\n          Ctor = createCtor(func);\n\n      function wrapper() {\n        var argsIndex = -1,\n            argsLength = arguments.length,\n            leftIndex = -1,\n            leftLength = partials.length,\n            args = Array(leftLength + argsLength),\n            fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n\n        while (++leftIndex < leftLength) {\n          args[leftIndex] = partials[leftIndex];\n        }\n        while (argsLength--) {\n          args[leftIndex++] = arguments[++argsIndex];\n        }\n        return apply(fn, isBind ? thisArg : this, args);\n      }\n      return wrapper;\n    }\n\n    /**\n     * Creates a `_.range` or `_.rangeRight` function.\n     *\n     * @private\n     * @param {boolean} [fromRight] Specify iterating from right to left.\n     * @returns {Function} Returns the new range function.\n     */\n    function createRange(fromRight) {\n      return function(start, end, step) {\n        if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {\n          end = step = undefined;\n        }\n        // Ensure the sign of `-0` is preserved.\n        start = toFinite(start);\n        if (end === undefined) {\n          end = start;\n          start = 0;\n        } else {\n          end = toFinite(end);\n        }\n        step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);\n        return baseRange(start, end, step, fromRight);\n      };\n    }\n\n    /**\n     * Creates a function that performs a relational operation on two values.\n     *\n     * @private\n     * @param {Function} operator The function to perform the operation.\n     * @returns {Function} Returns the new relational operation function.\n     */\n    function createRelationalOperation(operator) {\n      return function(value, other) {\n        if (!(typeof value == 'string' && typeof other == 'string')) {\n          value = toNumber(value);\n          other = toNumber(other);\n        }\n        return operator(value, other);\n      };\n    }\n\n    /**\n     * Creates a function that wraps `func` to continue currying.\n     *\n     * @private\n     * @param {Function} func The function to wrap.\n     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n     * @param {Function} wrapFunc The function to create the `func` wrapper.\n     * @param {*} placeholder The placeholder value.\n     * @param {*} [thisArg] The `this` binding of `func`.\n     * @param {Array} [partials] The arguments to prepend to those provided to\n     *  the new function.\n     * @param {Array} [holders] The `partials` placeholder indexes.\n     * @param {Array} [argPos] The argument positions of the new function.\n     * @param {number} [ary] The arity cap of `func`.\n     * @param {number} [arity] The arity of `func`.\n     * @returns {Function} Returns the new wrapped function.\n     */\n    function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {\n      var isCurry = bitmask & WRAP_CURRY_FLAG,\n          newHolders = isCurry ? holders : undefined,\n          newHoldersRight = isCurry ? undefined : holders,\n          newPartials = isCurry ? partials : undefined,\n          newPartialsRight = isCurry ? undefined : partials;\n\n      bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);\n      bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);\n\n      if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {\n        bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);\n      }\n      var newData = [\n        func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,\n        newHoldersRight, argPos, ary, arity\n      ];\n\n      var result = wrapFunc.apply(undefined, newData);\n      if (isLaziable(func)) {\n        setData(result, newData);\n      }\n      result.placeholder = placeholder;\n      return setWrapToString(result, func, bitmask);\n    }\n\n    /**\n     * Creates a function like `_.round`.\n     *\n     * @private\n     * @param {string} methodName The name of the `Math` method to use when rounding.\n     * @returns {Function} Returns the new round function.\n     */\n    function createRound(methodName) {\n      var func = Math[methodName];\n      return function(number, precision) {\n        number = toNumber(number);\n        precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);\n        if (precision && nativeIsFinite(number)) {\n          // Shift with exponential notation to avoid floating-point issues.\n          // See [MDN](https://mdn.io/round#Examples) for more details.\n          var pair = (toString(number) + 'e').split('e'),\n              value = func(pair[0] + 'e' + (+pair[1] + precision));\n\n          pair = (toString(value) + 'e').split('e');\n          return +(pair[0] + 'e' + (+pair[1] - precision));\n        }\n        return func(number);\n      };\n    }\n\n    /**\n     * Creates a set object of `values`.\n     *\n     * @private\n     * @param {Array} values The values to add to the set.\n     * @returns {Object} Returns the new set.\n     */\n    var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {\n      return new Set(values);\n    };\n\n    /**\n     * Creates a `_.toPairs` or `_.toPairsIn` function.\n     *\n     * @private\n     * @param {Function} keysFunc The function to get the keys of a given object.\n     * @returns {Function} Returns the new pairs function.\n     */\n    function createToPairs(keysFunc) {\n      return function(object) {\n        var tag = getTag(object);\n        if (tag == mapTag) {\n          return mapToArray(object);\n        }\n        if (tag == setTag) {\n          return setToPairs(object);\n        }\n        return baseToPairs(object, keysFunc(object));\n      };\n    }\n\n    /**\n     * Creates a function that either curries or invokes `func` with optional\n     * `this` binding and partially applied arguments.\n     *\n     * @private\n     * @param {Function|string} func The function or method name to wrap.\n     * @param {number} bitmask The bitmask flags.\n     *    1 - `_.bind`\n     *    2 - `_.bindKey`\n     *    4 - `_.curry` or `_.curryRight` of a bound function\n     *    8 - `_.curry`\n     *   16 - `_.curryRight`\n     *   32 - `_.partial`\n     *   64 - `_.partialRight`\n     *  128 - `_.rearg`\n     *  256 - `_.ary`\n     *  512 - `_.flip`\n     * @param {*} [thisArg] The `this` binding of `func`.\n     * @param {Array} [partials] The arguments to be partially applied.\n     * @param {Array} [holders] The `partials` placeholder indexes.\n     * @param {Array} [argPos] The argument positions of the new function.\n     * @param {number} [ary] The arity cap of `func`.\n     * @param {number} [arity] The arity of `func`.\n     * @returns {Function} Returns the new wrapped function.\n     */\n    function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {\n      var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;\n      if (!isBindKey && typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      var length = partials ? partials.length : 0;\n      if (!length) {\n        bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);\n        partials = holders = undefined;\n      }\n      ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);\n      arity = arity === undefined ? arity : toInteger(arity);\n      length -= holders ? holders.length : 0;\n\n      if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {\n        var partialsRight = partials,\n            holdersRight = holders;\n\n        partials = holders = undefined;\n      }\n      var data = isBindKey ? undefined : getData(func);\n\n      var newData = [\n        func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,\n        argPos, ary, arity\n      ];\n\n      if (data) {\n        mergeData(newData, data);\n      }\n      func = newData[0];\n      bitmask = newData[1];\n      thisArg = newData[2];\n      partials = newData[3];\n      holders = newData[4];\n      arity = newData[9] = newData[9] === undefined\n        ? (isBindKey ? 0 : func.length)\n        : nativeMax(newData[9] - length, 0);\n\n      if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {\n        bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);\n      }\n      if (!bitmask || bitmask == WRAP_BIND_FLAG) {\n        var result = createBind(func, bitmask, thisArg);\n      } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {\n        result = createCurry(func, bitmask, arity);\n      } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {\n        result = createPartial(func, bitmask, thisArg, partials);\n      } else {\n        result = createHybrid.apply(undefined, newData);\n      }\n      var setter = data ? baseSetData : setData;\n      return setWrapToString(setter(result, newData), func, bitmask);\n    }\n\n    /**\n     * Used by `_.defaults` to customize its `_.assignIn` use to assign properties\n     * of source objects to the destination object for all destination properties\n     * that resolve to `undefined`.\n     *\n     * @private\n     * @param {*} objValue The destination value.\n     * @param {*} srcValue The source value.\n     * @param {string} key The key of the property to assign.\n     * @param {Object} object The parent object of `objValue`.\n     * @returns {*} Returns the value to assign.\n     */\n    function customDefaultsAssignIn(objValue, srcValue, key, object) {\n      if (objValue === undefined ||\n          (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n        return srcValue;\n      }\n      return objValue;\n    }\n\n    /**\n     * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source\n     * objects into destination objects that are passed thru.\n     *\n     * @private\n     * @param {*} objValue The destination value.\n     * @param {*} srcValue The source value.\n     * @param {string} key The key of the property to merge.\n     * @param {Object} object The parent object of `objValue`.\n     * @param {Object} source The parent object of `srcValue`.\n     * @param {Object} [stack] Tracks traversed source values and their merged\n     *  counterparts.\n     * @returns {*} Returns the value to assign.\n     */\n    function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {\n      if (isObject(objValue) && isObject(srcValue)) {\n        // Recursively merge objects and arrays (susceptible to call stack limits).\n        stack.set(srcValue, objValue);\n        baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);\n        stack['delete'](srcValue);\n      }\n      return objValue;\n    }\n\n    /**\n     * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain\n     * objects.\n     *\n     * @private\n     * @param {*} value The value to inspect.\n     * @param {string} key The key of the property to inspect.\n     * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.\n     */\n    function customOmitClone(value) {\n      return isPlainObject(value) ? undefined : value;\n    }\n\n    /**\n     * A specialized version of `baseIsEqualDeep` for arrays with support for\n     * partial deep comparisons.\n     *\n     * @private\n     * @param {Array} array The array to compare.\n     * @param {Array} other The other array to compare.\n     * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n     * @param {Function} customizer The function to customize comparisons.\n     * @param {Function} equalFunc The function to determine equivalents of values.\n     * @param {Object} stack Tracks traversed `array` and `other` objects.\n     * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n     */\n    function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n      var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n          arrLength = array.length,\n          othLength = other.length;\n\n      if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n        return false;\n      }\n      // Check that cyclic values are equal.\n      var arrStacked = stack.get(array);\n      var othStacked = stack.get(other);\n      if (arrStacked && othStacked) {\n        return arrStacked == other && othStacked == array;\n      }\n      var index = -1,\n          result = true,\n          seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n      stack.set(array, other);\n      stack.set(other, array);\n\n      // Ignore non-index properties.\n      while (++index < arrLength) {\n        var arrValue = array[index],\n            othValue = other[index];\n\n        if (customizer) {\n          var compared = isPartial\n            ? customizer(othValue, arrValue, index, other, array, stack)\n            : customizer(arrValue, othValue, index, array, other, stack);\n        }\n        if (compared !== undefined) {\n          if (compared) {\n            continue;\n          }\n          result = false;\n          break;\n        }\n        // Recursively compare arrays (susceptible to call stack limits).\n        if (seen) {\n          if (!arraySome(other, function(othValue, othIndex) {\n                if (!cacheHas(seen, othIndex) &&\n                    (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n                  return seen.push(othIndex);\n                }\n              })) {\n            result = false;\n            break;\n          }\n        } else if (!(\n              arrValue === othValue ||\n                equalFunc(arrValue, othValue, bitmask, customizer, stack)\n            )) {\n          result = false;\n          break;\n        }\n      }\n      stack['delete'](array);\n      stack['delete'](other);\n      return result;\n    }\n\n    /**\n     * A specialized version of `baseIsEqualDeep` for comparing objects of\n     * the same `toStringTag`.\n     *\n     * **Note:** This function only supports comparing values with tags of\n     * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n     *\n     * @private\n     * @param {Object} object The object to compare.\n     * @param {Object} other The other object to compare.\n     * @param {string} tag The `toStringTag` of the objects to compare.\n     * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n     * @param {Function} customizer The function to customize comparisons.\n     * @param {Function} equalFunc The function to determine equivalents of values.\n     * @param {Object} stack Tracks traversed `object` and `other` objects.\n     * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n     */\n    function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n      switch (tag) {\n        case dataViewTag:\n          if ((object.byteLength != other.byteLength) ||\n              (object.byteOffset != other.byteOffset)) {\n            return false;\n          }\n          object = object.buffer;\n          other = other.buffer;\n\n        case arrayBufferTag:\n          if ((object.byteLength != other.byteLength) ||\n              !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n            return false;\n          }\n          return true;\n\n        case boolTag:\n        case dateTag:\n        case numberTag:\n          // Coerce booleans to `1` or `0` and dates to milliseconds.\n          // Invalid dates are coerced to `NaN`.\n          return eq(+object, +other);\n\n        case errorTag:\n          return object.name == other.name && object.message == other.message;\n\n        case regexpTag:\n        case stringTag:\n          // Coerce regexes to strings and treat strings, primitives and objects,\n          // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n          // for more details.\n          return object == (other + '');\n\n        case mapTag:\n          var convert = mapToArray;\n\n        case setTag:\n          var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n          convert || (convert = setToArray);\n\n          if (object.size != other.size && !isPartial) {\n            return false;\n          }\n          // Assume cyclic values are equal.\n          var stacked = stack.get(object);\n          if (stacked) {\n            return stacked == other;\n          }\n          bitmask |= COMPARE_UNORDERED_FLAG;\n\n          // Recursively compare objects (susceptible to call stack limits).\n          stack.set(object, other);\n          var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n          stack['delete'](object);\n          return result;\n\n        case symbolTag:\n          if (symbolValueOf) {\n            return symbolValueOf.call(object) == symbolValueOf.call(other);\n          }\n      }\n      return false;\n    }\n\n    /**\n     * A specialized version of `baseIsEqualDeep` for objects with support for\n     * partial deep comparisons.\n     *\n     * @private\n     * @param {Object} object The object to compare.\n     * @param {Object} other The other object to compare.\n     * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n     * @param {Function} customizer The function to customize comparisons.\n     * @param {Function} equalFunc The function to determine equivalents of values.\n     * @param {Object} stack Tracks traversed `object` and `other` objects.\n     * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n     */\n    function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n      var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n          objProps = getAllKeys(object),\n          objLength = objProps.length,\n          othProps = getAllKeys(other),\n          othLength = othProps.length;\n\n      if (objLength != othLength && !isPartial) {\n        return false;\n      }\n      var index = objLength;\n      while (index--) {\n        var key = objProps[index];\n        if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n          return false;\n        }\n      }\n      // Check that cyclic values are equal.\n      var objStacked = stack.get(object);\n      var othStacked = stack.get(other);\n      if (objStacked && othStacked) {\n        return objStacked == other && othStacked == object;\n      }\n      var result = true;\n      stack.set(object, other);\n      stack.set(other, object);\n\n      var skipCtor = isPartial;\n      while (++index < objLength) {\n        key = objProps[index];\n        var objValue = object[key],\n            othValue = other[key];\n\n        if (customizer) {\n          var compared = isPartial\n            ? customizer(othValue, objValue, key, other, object, stack)\n            : customizer(objValue, othValue, key, object, other, stack);\n        }\n        // Recursively compare objects (susceptible to call stack limits).\n        if (!(compared === undefined\n              ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n              : compared\n            )) {\n          result = false;\n          break;\n        }\n        skipCtor || (skipCtor = key == 'constructor');\n      }\n      if (result && !skipCtor) {\n        var objCtor = object.constructor,\n            othCtor = other.constructor;\n\n        // Non `Object` object instances with different constructors are not equal.\n        if (objCtor != othCtor &&\n            ('constructor' in object && 'constructor' in other) &&\n            !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n              typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n          result = false;\n        }\n      }\n      stack['delete'](object);\n      stack['delete'](other);\n      return result;\n    }\n\n    /**\n     * A specialized version of `baseRest` which flattens the rest array.\n     *\n     * @private\n     * @param {Function} func The function to apply a rest parameter to.\n     * @returns {Function} Returns the new function.\n     */\n    function flatRest(func) {\n      return setToString(overRest(func, undefined, flatten), func + '');\n    }\n\n    /**\n     * Creates an array of own enumerable property names and symbols of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property names and symbols.\n     */\n    function getAllKeys(object) {\n      return baseGetAllKeys(object, keys, getSymbols);\n    }\n\n    /**\n     * Creates an array of own and inherited enumerable property names and\n     * symbols of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property names and symbols.\n     */\n    function getAllKeysIn(object) {\n      return baseGetAllKeys(object, keysIn, getSymbolsIn);\n    }\n\n    /**\n     * Gets metadata for `func`.\n     *\n     * @private\n     * @param {Function} func The function to query.\n     * @returns {*} Returns the metadata for `func`.\n     */\n    var getData = !metaMap ? noop : function(func) {\n      return metaMap.get(func);\n    };\n\n    /**\n     * Gets the name of `func`.\n     *\n     * @private\n     * @param {Function} func The function to query.\n     * @returns {string} Returns the function name.\n     */\n    function getFuncName(func) {\n      var result = (func.name + ''),\n          array = realNames[result],\n          length = hasOwnProperty.call(realNames, result) ? array.length : 0;\n\n      while (length--) {\n        var data = array[length],\n            otherFunc = data.func;\n        if (otherFunc == null || otherFunc == func) {\n          return data.name;\n        }\n      }\n      return result;\n    }\n\n    /**\n     * Gets the argument placeholder value for `func`.\n     *\n     * @private\n     * @param {Function} func The function to inspect.\n     * @returns {*} Returns the placeholder value.\n     */\n    function getHolder(func) {\n      var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;\n      return object.placeholder;\n    }\n\n    /**\n     * Gets the appropriate \"iteratee\" function. If `_.iteratee` is customized,\n     * this function returns the custom method, otherwise it returns `baseIteratee`.\n     * If arguments are provided, the chosen function is invoked with them and\n     * its result is returned.\n     *\n     * @private\n     * @param {*} [value] The value to convert to an iteratee.\n     * @param {number} [arity] The arity of the created iteratee.\n     * @returns {Function} Returns the chosen function or its result.\n     */\n    function getIteratee() {\n      var result = lodash.iteratee || iteratee;\n      result = result === iteratee ? baseIteratee : result;\n      return arguments.length ? result(arguments[0], arguments[1]) : result;\n    }\n\n    /**\n     * Gets the data for `map`.\n     *\n     * @private\n     * @param {Object} map The map to query.\n     * @param {string} key The reference key.\n     * @returns {*} Returns the map data.\n     */\n    function getMapData(map, key) {\n      var data = map.__data__;\n      return isKeyable(key)\n        ? data[typeof key == 'string' ? 'string' : 'hash']\n        : data.map;\n    }\n\n    /**\n     * Gets the property names, values, and compare flags of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the match data of `object`.\n     */\n    function getMatchData(object) {\n      var result = keys(object),\n          length = result.length;\n\n      while (length--) {\n        var key = result[length],\n            value = object[key];\n\n        result[length] = [key, value, isStrictComparable(value)];\n      }\n      return result;\n    }\n\n    /**\n     * Gets the native function at `key` of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @param {string} key The key of the method to get.\n     * @returns {*} Returns the function if it's native, else `undefined`.\n     */\n    function getNative(object, key) {\n      var value = getValue(object, key);\n      return baseIsNative(value) ? value : undefined;\n    }\n\n    /**\n     * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n     *\n     * @private\n     * @param {*} value The value to query.\n     * @returns {string} Returns the raw `toStringTag`.\n     */\n    function getRawTag(value) {\n      var isOwn = hasOwnProperty.call(value, symToStringTag),\n          tag = value[symToStringTag];\n\n      try {\n        value[symToStringTag] = undefined;\n        var unmasked = true;\n      } catch (e) {}\n\n      var result = nativeObjectToString.call(value);\n      if (unmasked) {\n        if (isOwn) {\n          value[symToStringTag] = tag;\n        } else {\n          delete value[symToStringTag];\n        }\n      }\n      return result;\n    }\n\n    /**\n     * Creates an array of the own enumerable symbols of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of symbols.\n     */\n    var getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n      if (object == null) {\n        return [];\n      }\n      object = Object(object);\n      return arrayFilter(nativeGetSymbols(object), function(symbol) {\n        return propertyIsEnumerable.call(object, symbol);\n      });\n    };\n\n    /**\n     * Creates an array of the own and inherited enumerable symbols of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of symbols.\n     */\n    var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n      var result = [];\n      while (object) {\n        arrayPush(result, getSymbols(object));\n        object = getPrototype(object);\n      }\n      return result;\n    };\n\n    /**\n     * Gets the `toStringTag` of `value`.\n     *\n     * @private\n     * @param {*} value The value to query.\n     * @returns {string} Returns the `toStringTag`.\n     */\n    var getTag = baseGetTag;\n\n    // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\n    if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n        (Map && getTag(new Map) != mapTag) ||\n        (Promise && getTag(Promise.resolve()) != promiseTag) ||\n        (Set && getTag(new Set) != setTag) ||\n        (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n      getTag = function(value) {\n        var result = baseGetTag(value),\n            Ctor = result == objectTag ? value.constructor : undefined,\n            ctorString = Ctor ? toSource(Ctor) : '';\n\n        if (ctorString) {\n          switch (ctorString) {\n            case dataViewCtorString: return dataViewTag;\n            case mapCtorString: return mapTag;\n            case promiseCtorString: return promiseTag;\n            case setCtorString: return setTag;\n            case weakMapCtorString: return weakMapTag;\n          }\n        }\n        return result;\n      };\n    }\n\n    /**\n     * Gets the view, applying any `transforms` to the `start` and `end` positions.\n     *\n     * @private\n     * @param {number} start The start of the view.\n     * @param {number} end The end of the view.\n     * @param {Array} transforms The transformations to apply to the view.\n     * @returns {Object} Returns an object containing the `start` and `end`\n     *  positions of the view.\n     */\n    function getView(start, end, transforms) {\n      var index = -1,\n          length = transforms.length;\n\n      while (++index < length) {\n        var data = transforms[index],\n            size = data.size;\n\n        switch (data.type) {\n          case 'drop':      start += size; break;\n          case 'dropRight': end -= size; break;\n          case 'take':      end = nativeMin(end, start + size); break;\n          case 'takeRight': start = nativeMax(start, end - size); break;\n        }\n      }\n      return { 'start': start, 'end': end };\n    }\n\n    /**\n     * Extracts wrapper details from the `source` body comment.\n     *\n     * @private\n     * @param {string} source The source to inspect.\n     * @returns {Array} Returns the wrapper details.\n     */\n    function getWrapDetails(source) {\n      var match = source.match(reWrapDetails);\n      return match ? match[1].split(reSplitDetails) : [];\n    }\n\n    /**\n     * Checks if `path` exists on `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path to check.\n     * @param {Function} hasFunc The function to check properties.\n     * @returns {boolean} Returns `true` if `path` exists, else `false`.\n     */\n    function hasPath(object, path, hasFunc) {\n      path = castPath(path, object);\n\n      var index = -1,\n          length = path.length,\n          result = false;\n\n      while (++index < length) {\n        var key = toKey(path[index]);\n        if (!(result = object != null && hasFunc(object, key))) {\n          break;\n        }\n        object = object[key];\n      }\n      if (result || ++index != length) {\n        return result;\n      }\n      length = object == null ? 0 : object.length;\n      return !!length && isLength(length) && isIndex(key, length) &&\n        (isArray(object) || isArguments(object));\n    }\n\n    /**\n     * Initializes an array clone.\n     *\n     * @private\n     * @param {Array} array The array to clone.\n     * @returns {Array} Returns the initialized clone.\n     */\n    function initCloneArray(array) {\n      var length = array.length,\n          result = new array.constructor(length);\n\n      // Add properties assigned by `RegExp#exec`.\n      if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n        result.index = array.index;\n        result.input = array.input;\n      }\n      return result;\n    }\n\n    /**\n     * Initializes an object clone.\n     *\n     * @private\n     * @param {Object} object The object to clone.\n     * @returns {Object} Returns the initialized clone.\n     */\n    function initCloneObject(object) {\n      return (typeof object.constructor == 'function' && !isPrototype(object))\n        ? baseCreate(getPrototype(object))\n        : {};\n    }\n\n    /**\n     * Initializes an object clone based on its `toStringTag`.\n     *\n     * **Note:** This function only supports cloning values with tags of\n     * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n     *\n     * @private\n     * @param {Object} object The object to clone.\n     * @param {string} tag The `toStringTag` of the object to clone.\n     * @param {boolean} [isDeep] Specify a deep clone.\n     * @returns {Object} Returns the initialized clone.\n     */\n    function initCloneByTag(object, tag, isDeep) {\n      var Ctor = object.constructor;\n      switch (tag) {\n        case arrayBufferTag:\n          return cloneArrayBuffer(object);\n\n        case boolTag:\n        case dateTag:\n          return new Ctor(+object);\n\n        case dataViewTag:\n          return cloneDataView(object, isDeep);\n\n        case float32Tag: case float64Tag:\n        case int8Tag: case int16Tag: case int32Tag:\n        case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n          return cloneTypedArray(object, isDeep);\n\n        case mapTag:\n          return new Ctor;\n\n        case numberTag:\n        case stringTag:\n          return new Ctor(object);\n\n        case regexpTag:\n          return cloneRegExp(object);\n\n        case setTag:\n          return new Ctor;\n\n        case symbolTag:\n          return cloneSymbol(object);\n      }\n    }\n\n    /**\n     * Inserts wrapper `details` in a comment at the top of the `source` body.\n     *\n     * @private\n     * @param {string} source The source to modify.\n     * @returns {Array} details The details to insert.\n     * @returns {string} Returns the modified source.\n     */\n    function insertWrapDetails(source, details) {\n      var length = details.length;\n      if (!length) {\n        return source;\n      }\n      var lastIndex = length - 1;\n      details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];\n      details = details.join(length > 2 ? ', ' : ' ');\n      return source.replace(reWrapComment, '{\\n/* [wrapped with ' + details + '] */\\n');\n    }\n\n    /**\n     * Checks if `value` is a flattenable `arguments` object or array.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n     */\n    function isFlattenable(value) {\n      return isArray(value) || isArguments(value) ||\n        !!(spreadableSymbol && value && value[spreadableSymbol]);\n    }\n\n    /**\n     * Checks if `value` is a valid array-like index.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n     * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n     */\n    function isIndex(value, length) {\n      var type = typeof value;\n      length = length == null ? MAX_SAFE_INTEGER : length;\n\n      return !!length &&\n        (type == 'number' ||\n          (type != 'symbol' && reIsUint.test(value))) &&\n            (value > -1 && value % 1 == 0 && value < length);\n    }\n\n    /**\n     * Checks if the given arguments are from an iteratee call.\n     *\n     * @private\n     * @param {*} value The potential iteratee value argument.\n     * @param {*} index The potential iteratee index or key argument.\n     * @param {*} object The potential iteratee object argument.\n     * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n     *  else `false`.\n     */\n    function isIterateeCall(value, index, object) {\n      if (!isObject(object)) {\n        return false;\n      }\n      var type = typeof index;\n      if (type == 'number'\n            ? (isArrayLike(object) && isIndex(index, object.length))\n            : (type == 'string' && index in object)\n          ) {\n        return eq(object[index], value);\n      }\n      return false;\n    }\n\n    /**\n     * Checks if `value` is a property name and not a property path.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @param {Object} [object] The object to query keys on.\n     * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n     */\n    function isKey(value, object) {\n      if (isArray(value)) {\n        return false;\n      }\n      var type = typeof value;\n      if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n          value == null || isSymbol(value)) {\n        return true;\n      }\n      return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n        (object != null && value in Object(object));\n    }\n\n    /**\n     * Checks if `value` is suitable for use as unique object key.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n     */\n    function isKeyable(value) {\n      var type = typeof value;\n      return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n        ? (value !== '__proto__')\n        : (value === null);\n    }\n\n    /**\n     * Checks if `func` has a lazy counterpart.\n     *\n     * @private\n     * @param {Function} func The function to check.\n     * @returns {boolean} Returns `true` if `func` has a lazy counterpart,\n     *  else `false`.\n     */\n    function isLaziable(func) {\n      var funcName = getFuncName(func),\n          other = lodash[funcName];\n\n      if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {\n        return false;\n      }\n      if (func === other) {\n        return true;\n      }\n      var data = getData(other);\n      return !!data && func === data[0];\n    }\n\n    /**\n     * Checks if `func` has its source masked.\n     *\n     * @private\n     * @param {Function} func The function to check.\n     * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n     */\n    function isMasked(func) {\n      return !!maskSrcKey && (maskSrcKey in func);\n    }\n\n    /**\n     * Checks if `func` is capable of being masked.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `func` is maskable, else `false`.\n     */\n    var isMaskable = coreJsData ? isFunction : stubFalse;\n\n    /**\n     * Checks if `value` is likely a prototype object.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n     */\n    function isPrototype(value) {\n      var Ctor = value && value.constructor,\n          proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n      return value === proto;\n    }\n\n    /**\n     * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` if suitable for strict\n     *  equality comparisons, else `false`.\n     */\n    function isStrictComparable(value) {\n      return value === value && !isObject(value);\n    }\n\n    /**\n     * A specialized version of `matchesProperty` for source values suitable\n     * for strict equality comparisons, i.e. `===`.\n     *\n     * @private\n     * @param {string} key The key of the property to get.\n     * @param {*} srcValue The value to match.\n     * @returns {Function} Returns the new spec function.\n     */\n    function matchesStrictComparable(key, srcValue) {\n      return function(object) {\n        if (object == null) {\n          return false;\n        }\n        return object[key] === srcValue &&\n          (srcValue !== undefined || (key in Object(object)));\n      };\n    }\n\n    /**\n     * A specialized version of `_.memoize` which clears the memoized function's\n     * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n     *\n     * @private\n     * @param {Function} func The function to have its output memoized.\n     * @returns {Function} Returns the new memoized function.\n     */\n    function memoizeCapped(func) {\n      var result = memoize(func, function(key) {\n        if (cache.size === MAX_MEMOIZE_SIZE) {\n          cache.clear();\n        }\n        return key;\n      });\n\n      var cache = result.cache;\n      return result;\n    }\n\n    /**\n     * Merges the function metadata of `source` into `data`.\n     *\n     * Merging metadata reduces the number of wrappers used to invoke a function.\n     * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`\n     * may be applied regardless of execution order. Methods like `_.ary` and\n     * `_.rearg` modify function arguments, making the order in which they are\n     * executed important, preventing the merging of metadata. However, we make\n     * an exception for a safe combined case where curried functions have `_.ary`\n     * and or `_.rearg` applied.\n     *\n     * @private\n     * @param {Array} data The destination metadata.\n     * @param {Array} source The source metadata.\n     * @returns {Array} Returns `data`.\n     */\n    function mergeData(data, source) {\n      var bitmask = data[1],\n          srcBitmask = source[1],\n          newBitmask = bitmask | srcBitmask,\n          isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);\n\n      var isCombo =\n        ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||\n        ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||\n        ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));\n\n      // Exit early if metadata can't be merged.\n      if (!(isCommon || isCombo)) {\n        return data;\n      }\n      // Use source `thisArg` if available.\n      if (srcBitmask & WRAP_BIND_FLAG) {\n        data[2] = source[2];\n        // Set when currying a bound function.\n        newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;\n      }\n      // Compose partial arguments.\n      var value = source[3];\n      if (value) {\n        var partials = data[3];\n        data[3] = partials ? composeArgs(partials, value, source[4]) : value;\n        data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];\n      }\n      // Compose partial right arguments.\n      value = source[5];\n      if (value) {\n        partials = data[5];\n        data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;\n        data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];\n      }\n      // Use source `argPos` if available.\n      value = source[7];\n      if (value) {\n        data[7] = value;\n      }\n      // Use source `ary` if it's smaller.\n      if (srcBitmask & WRAP_ARY_FLAG) {\n        data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);\n      }\n      // Use source `arity` if one is not provided.\n      if (data[9] == null) {\n        data[9] = source[9];\n      }\n      // Use source `func` and merge bitmasks.\n      data[0] = source[0];\n      data[1] = newBitmask;\n\n      return data;\n    }\n\n    /**\n     * This function is like\n     * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n     * except that it includes inherited enumerable properties.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property names.\n     */\n    function nativeKeysIn(object) {\n      var result = [];\n      if (object != null) {\n        for (var key in Object(object)) {\n          result.push(key);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * Converts `value` to a string using `Object.prototype.toString`.\n     *\n     * @private\n     * @param {*} value The value to convert.\n     * @returns {string} Returns the converted string.\n     */\n    function objectToString(value) {\n      return nativeObjectToString.call(value);\n    }\n\n    /**\n     * A specialized version of `baseRest` which transforms the rest array.\n     *\n     * @private\n     * @param {Function} func The function to apply a rest parameter to.\n     * @param {number} [start=func.length-1] The start position of the rest parameter.\n     * @param {Function} transform The rest array transform.\n     * @returns {Function} Returns the new function.\n     */\n    function overRest(func, start, transform) {\n      start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n      return function() {\n        var args = arguments,\n            index = -1,\n            length = nativeMax(args.length - start, 0),\n            array = Array(length);\n\n        while (++index < length) {\n          array[index] = args[start + index];\n        }\n        index = -1;\n        var otherArgs = Array(start + 1);\n        while (++index < start) {\n          otherArgs[index] = args[index];\n        }\n        otherArgs[start] = transform(array);\n        return apply(func, this, otherArgs);\n      };\n    }\n\n    /**\n     * Gets the parent value at `path` of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @param {Array} path The path to get the parent value of.\n     * @returns {*} Returns the parent value.\n     */\n    function parent(object, path) {\n      return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));\n    }\n\n    /**\n     * Reorder `array` according to the specified indexes where the element at\n     * the first index is assigned as the first element, the element at\n     * the second index is assigned as the second element, and so on.\n     *\n     * @private\n     * @param {Array} array The array to reorder.\n     * @param {Array} indexes The arranged array indexes.\n     * @returns {Array} Returns `array`.\n     */\n    function reorder(array, indexes) {\n      var arrLength = array.length,\n          length = nativeMin(indexes.length, arrLength),\n          oldArray = copyArray(array);\n\n      while (length--) {\n        var index = indexes[length];\n        array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;\n      }\n      return array;\n    }\n\n    /**\n     * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @param {string} key The key of the property to get.\n     * @returns {*} Returns the property value.\n     */\n    function safeGet(object, key) {\n      if (key === 'constructor' && typeof object[key] === 'function') {\n        return;\n      }\n\n      if (key == '__proto__') {\n        return;\n      }\n\n      return object[key];\n    }\n\n    /**\n     * Sets metadata for `func`.\n     *\n     * **Note:** If this function becomes hot, i.e. is invoked a lot in a short\n     * period of time, it will trip its breaker and transition to an identity\n     * function to avoid garbage collection pauses in V8. See\n     * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)\n     * for more details.\n     *\n     * @private\n     * @param {Function} func The function to associate metadata with.\n     * @param {*} data The metadata.\n     * @returns {Function} Returns `func`.\n     */\n    var setData = shortOut(baseSetData);\n\n    /**\n     * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout).\n     *\n     * @private\n     * @param {Function} func The function to delay.\n     * @param {number} wait The number of milliseconds to delay invocation.\n     * @returns {number|Object} Returns the timer id or timeout object.\n     */\n    var setTimeout = ctxSetTimeout || function(func, wait) {\n      return root.setTimeout(func, wait);\n    };\n\n    /**\n     * Sets the `toString` method of `func` to return `string`.\n     *\n     * @private\n     * @param {Function} func The function to modify.\n     * @param {Function} string The `toString` result.\n     * @returns {Function} Returns `func`.\n     */\n    var setToString = shortOut(baseSetToString);\n\n    /**\n     * Sets the `toString` method of `wrapper` to mimic the source of `reference`\n     * with wrapper details in a comment at the top of the source body.\n     *\n     * @private\n     * @param {Function} wrapper The function to modify.\n     * @param {Function} reference The reference function.\n     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n     * @returns {Function} Returns `wrapper`.\n     */\n    function setWrapToString(wrapper, reference, bitmask) {\n      var source = (reference + '');\n      return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));\n    }\n\n    /**\n     * Creates a function that'll short out and invoke `identity` instead\n     * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n     * milliseconds.\n     *\n     * @private\n     * @param {Function} func The function to restrict.\n     * @returns {Function} Returns the new shortable function.\n     */\n    function shortOut(func) {\n      var count = 0,\n          lastCalled = 0;\n\n      return function() {\n        var stamp = nativeNow(),\n            remaining = HOT_SPAN - (stamp - lastCalled);\n\n        lastCalled = stamp;\n        if (remaining > 0) {\n          if (++count >= HOT_COUNT) {\n            return arguments[0];\n          }\n        } else {\n          count = 0;\n        }\n        return func.apply(undefined, arguments);\n      };\n    }\n\n    /**\n     * A specialized version of `_.shuffle` which mutates and sets the size of `array`.\n     *\n     * @private\n     * @param {Array} array The array to shuffle.\n     * @param {number} [size=array.length] The size of `array`.\n     * @returns {Array} Returns `array`.\n     */\n    function shuffleSelf(array, size) {\n      var index = -1,\n          length = array.length,\n          lastIndex = length - 1;\n\n      size = size === undefined ? length : size;\n      while (++index < size) {\n        var rand = baseRandom(index, lastIndex),\n            value = array[rand];\n\n        array[rand] = array[index];\n        array[index] = value;\n      }\n      array.length = size;\n      return array;\n    }\n\n    /**\n     * Converts `string` to a property path array.\n     *\n     * @private\n     * @param {string} string The string to convert.\n     * @returns {Array} Returns the property path array.\n     */\n    var stringToPath = memoizeCapped(function(string) {\n      var result = [];\n      if (string.charCodeAt(0) === 46 /* . */) {\n        result.push('');\n      }\n      string.replace(rePropName, function(match, number, quote, subString) {\n        result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n      });\n      return result;\n    });\n\n    /**\n     * Converts `value` to a string key if it's not a string or symbol.\n     *\n     * @private\n     * @param {*} value The value to inspect.\n     * @returns {string|symbol} Returns the key.\n     */\n    function toKey(value) {\n      if (typeof value == 'string' || isSymbol(value)) {\n        return value;\n      }\n      var result = (value + '');\n      return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n    }\n\n    /**\n     * Converts `func` to its source code.\n     *\n     * @private\n     * @param {Function} func The function to convert.\n     * @returns {string} Returns the source code.\n     */\n    function toSource(func) {\n      if (func != null) {\n        try {\n          return funcToString.call(func);\n        } catch (e) {}\n        try {\n          return (func + '');\n        } catch (e) {}\n      }\n      return '';\n    }\n\n    /**\n     * Updates wrapper `details` based on `bitmask` flags.\n     *\n     * @private\n     * @returns {Array} details The details to modify.\n     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n     * @returns {Array} Returns `details`.\n     */\n    function updateWrapDetails(details, bitmask) {\n      arrayEach(wrapFlags, function(pair) {\n        var value = '_.' + pair[0];\n        if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {\n          details.push(value);\n        }\n      });\n      return details.sort();\n    }\n\n    /**\n     * Creates a clone of `wrapper`.\n     *\n     * @private\n     * @param {Object} wrapper The wrapper to clone.\n     * @returns {Object} Returns the cloned wrapper.\n     */\n    function wrapperClone(wrapper) {\n      if (wrapper instanceof LazyWrapper) {\n        return wrapper.clone();\n      }\n      var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);\n      result.__actions__ = copyArray(wrapper.__actions__);\n      result.__index__  = wrapper.__index__;\n      result.__values__ = wrapper.__values__;\n      return result;\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates an array of elements split into groups the length of `size`.\n     * If `array` can't be split evenly, the final chunk will be the remaining\n     * elements.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to process.\n     * @param {number} [size=1] The length of each chunk\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Array} Returns the new array of chunks.\n     * @example\n     *\n     * _.chunk(['a', 'b', 'c', 'd'], 2);\n     * // => [['a', 'b'], ['c', 'd']]\n     *\n     * _.chunk(['a', 'b', 'c', 'd'], 3);\n     * // => [['a', 'b', 'c'], ['d']]\n     */\n    function chunk(array, size, guard) {\n      if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {\n        size = 1;\n      } else {\n        size = nativeMax(toInteger(size), 0);\n      }\n      var length = array == null ? 0 : array.length;\n      if (!length || size < 1) {\n        return [];\n      }\n      var index = 0,\n          resIndex = 0,\n          result = Array(nativeCeil(length / size));\n\n      while (index < length) {\n        result[resIndex++] = baseSlice(array, index, (index += size));\n      }\n      return result;\n    }\n\n    /**\n     * Creates an array with all falsey values removed. The values `false`, `null`,\n     * `0`, `-0`, `0n`, `\"\"`, `undefined`, and `NaN` are falsy.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to compact.\n     * @returns {Array} Returns the new array of filtered values.\n     * @example\n     *\n     * _.compact([0, 1, false, 2, '', 3]);\n     * // => [1, 2, 3]\n     */\n    function compact(array) {\n      var index = -1,\n          length = array == null ? 0 : array.length,\n          resIndex = 0,\n          result = [];\n\n      while (++index < length) {\n        var value = array[index];\n        if (value) {\n          result[resIndex++] = value;\n        }\n      }\n      return result;\n    }\n\n    /**\n     * Creates a new array concatenating `array` with any additional arrays\n     * and/or values.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to concatenate.\n     * @param {...*} [values] The values to concatenate.\n     * @returns {Array} Returns the new concatenated array.\n     * @example\n     *\n     * var array = [1];\n     * var other = _.concat(array, 2, [3], [[4]]);\n     *\n     * console.log(other);\n     * // => [1, 2, 3, [4]]\n     *\n     * console.log(array);\n     * // => [1]\n     */\n    function concat() {\n      var length = arguments.length;\n      if (!length) {\n        return [];\n      }\n      var args = Array(length - 1),\n          array = arguments[0],\n          index = length;\n\n      while (index--) {\n        args[index - 1] = arguments[index];\n      }\n      return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));\n    }\n\n    /**\n     * Creates an array of `array` values not included in the other given arrays\n     * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons. The order and references of result values are\n     * determined by the first array.\n     *\n     * **Note:** Unlike `_.pullAll`, this method returns a new array.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {...Array} [values] The values to exclude.\n     * @returns {Array} Returns the new array of filtered values.\n     * @see _.without, _.xor\n     * @example\n     *\n     * _.difference([2, 1], [2, 3]);\n     * // => [1]\n     */\n    var difference = baseRest(function(array, values) {\n      return isArrayLikeObject(array)\n        ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))\n        : [];\n    });\n\n    /**\n     * This method is like `_.difference` except that it accepts `iteratee` which\n     * is invoked for each element of `array` and `values` to generate the criterion\n     * by which they're compared. The order and references of result values are\n     * determined by the first array. The iteratee is invoked with one argument:\n     * (value).\n     *\n     * **Note:** Unlike `_.pullAllBy`, this method returns a new array.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {...Array} [values] The values to exclude.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {Array} Returns the new array of filtered values.\n     * @example\n     *\n     * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n     * // => [1.2]\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');\n     * // => [{ 'x': 2 }]\n     */\n    var differenceBy = baseRest(function(array, values) {\n      var iteratee = last(values);\n      if (isArrayLikeObject(iteratee)) {\n        iteratee = undefined;\n      }\n      return isArrayLikeObject(array)\n        ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2))\n        : [];\n    });\n\n    /**\n     * This method is like `_.difference` except that it accepts `comparator`\n     * which is invoked to compare elements of `array` to `values`. The order and\n     * references of result values are determined by the first array. The comparator\n     * is invoked with two arguments: (arrVal, othVal).\n     *\n     * **Note:** Unlike `_.pullAllWith`, this method returns a new array.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {...Array} [values] The values to exclude.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new array of filtered values.\n     * @example\n     *\n     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n     *\n     * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);\n     * // => [{ 'x': 2, 'y': 1 }]\n     */\n    var differenceWith = baseRest(function(array, values) {\n      var comparator = last(values);\n      if (isArrayLikeObject(comparator)) {\n        comparator = undefined;\n      }\n      return isArrayLikeObject(array)\n        ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)\n        : [];\n    });\n\n    /**\n     * Creates a slice of `array` with `n` elements dropped from the beginning.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.5.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {number} [n=1] The number of elements to drop.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * _.drop([1, 2, 3]);\n     * // => [2, 3]\n     *\n     * _.drop([1, 2, 3], 2);\n     * // => [3]\n     *\n     * _.drop([1, 2, 3], 5);\n     * // => []\n     *\n     * _.drop([1, 2, 3], 0);\n     * // => [1, 2, 3]\n     */\n    function drop(array, n, guard) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return [];\n      }\n      n = (guard || n === undefined) ? 1 : toInteger(n);\n      return baseSlice(array, n < 0 ? 0 : n, length);\n    }\n\n    /**\n     * Creates a slice of `array` with `n` elements dropped from the end.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {number} [n=1] The number of elements to drop.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * _.dropRight([1, 2, 3]);\n     * // => [1, 2]\n     *\n     * _.dropRight([1, 2, 3], 2);\n     * // => [1]\n     *\n     * _.dropRight([1, 2, 3], 5);\n     * // => []\n     *\n     * _.dropRight([1, 2, 3], 0);\n     * // => [1, 2, 3]\n     */\n    function dropRight(array, n, guard) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return [];\n      }\n      n = (guard || n === undefined) ? 1 : toInteger(n);\n      n = length - n;\n      return baseSlice(array, 0, n < 0 ? 0 : n);\n    }\n\n    /**\n     * Creates a slice of `array` excluding elements dropped from the end.\n     * Elements are dropped until `predicate` returns falsey. The predicate is\n     * invoked with three arguments: (value, index, array).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'active': true },\n     *   { 'user': 'fred',    'active': false },\n     *   { 'user': 'pebbles', 'active': false }\n     * ];\n     *\n     * _.dropRightWhile(users, function(o) { return !o.active; });\n     * // => objects for ['barney']\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });\n     * // => objects for ['barney', 'fred']\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.dropRightWhile(users, ['active', false]);\n     * // => objects for ['barney']\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.dropRightWhile(users, 'active');\n     * // => objects for ['barney', 'fred', 'pebbles']\n     */\n    function dropRightWhile(array, predicate) {\n      return (array && array.length)\n        ? baseWhile(array, getIteratee(predicate, 3), true, true)\n        : [];\n    }\n\n    /**\n     * Creates a slice of `array` excluding elements dropped from the beginning.\n     * Elements are dropped until `predicate` returns falsey. The predicate is\n     * invoked with three arguments: (value, index, array).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'active': false },\n     *   { 'user': 'fred',    'active': false },\n     *   { 'user': 'pebbles', 'active': true }\n     * ];\n     *\n     * _.dropWhile(users, function(o) { return !o.active; });\n     * // => objects for ['pebbles']\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.dropWhile(users, { 'user': 'barney', 'active': false });\n     * // => objects for ['fred', 'pebbles']\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.dropWhile(users, ['active', false]);\n     * // => objects for ['pebbles']\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.dropWhile(users, 'active');\n     * // => objects for ['barney', 'fred', 'pebbles']\n     */\n    function dropWhile(array, predicate) {\n      return (array && array.length)\n        ? baseWhile(array, getIteratee(predicate, 3), true)\n        : [];\n    }\n\n    /**\n     * Fills elements of `array` with `value` from `start` up to, but not\n     * including, `end`.\n     *\n     * **Note:** This method mutates `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.2.0\n     * @category Array\n     * @param {Array} array The array to fill.\n     * @param {*} value The value to fill `array` with.\n     * @param {number} [start=0] The start position.\n     * @param {number} [end=array.length] The end position.\n     * @returns {Array} Returns `array`.\n     * @example\n     *\n     * var array = [1, 2, 3];\n     *\n     * _.fill(array, 'a');\n     * console.log(array);\n     * // => ['a', 'a', 'a']\n     *\n     * _.fill(Array(3), 2);\n     * // => [2, 2, 2]\n     *\n     * _.fill([4, 6, 8, 10], '*', 1, 3);\n     * // => [4, '*', '*', 10]\n     */\n    function fill(array, value, start, end) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return [];\n      }\n      if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {\n        start = 0;\n        end = length;\n      }\n      return baseFill(array, value, start, end);\n    }\n\n    /**\n     * This method is like `_.find` except that it returns the index of the first\n     * element `predicate` returns truthy for instead of the element itself.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.1.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @param {number} [fromIndex=0] The index to search from.\n     * @returns {number} Returns the index of the found element, else `-1`.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'active': false },\n     *   { 'user': 'fred',    'active': false },\n     *   { 'user': 'pebbles', 'active': true }\n     * ];\n     *\n     * _.findIndex(users, function(o) { return o.user == 'barney'; });\n     * // => 0\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.findIndex(users, { 'user': 'fred', 'active': false });\n     * // => 1\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.findIndex(users, ['active', false]);\n     * // => 0\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.findIndex(users, 'active');\n     * // => 2\n     */\n    function findIndex(array, predicate, fromIndex) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return -1;\n      }\n      var index = fromIndex == null ? 0 : toInteger(fromIndex);\n      if (index < 0) {\n        index = nativeMax(length + index, 0);\n      }\n      return baseFindIndex(array, getIteratee(predicate, 3), index);\n    }\n\n    /**\n     * This method is like `_.findIndex` except that it iterates over elements\n     * of `collection` from right to left.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @param {number} [fromIndex=array.length-1] The index to search from.\n     * @returns {number} Returns the index of the found element, else `-1`.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'active': true },\n     *   { 'user': 'fred',    'active': false },\n     *   { 'user': 'pebbles', 'active': false }\n     * ];\n     *\n     * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });\n     * // => 2\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.findLastIndex(users, { 'user': 'barney', 'active': true });\n     * // => 0\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.findLastIndex(users, ['active', false]);\n     * // => 2\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.findLastIndex(users, 'active');\n     * // => 0\n     */\n    function findLastIndex(array, predicate, fromIndex) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return -1;\n      }\n      var index = length - 1;\n      if (fromIndex !== undefined) {\n        index = toInteger(fromIndex);\n        index = fromIndex < 0\n          ? nativeMax(length + index, 0)\n          : nativeMin(index, length - 1);\n      }\n      return baseFindIndex(array, getIteratee(predicate, 3), index, true);\n    }\n\n    /**\n     * Flattens `array` a single level deep.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to flatten.\n     * @returns {Array} Returns the new flattened array.\n     * @example\n     *\n     * _.flatten([1, [2, [3, [4]], 5]]);\n     * // => [1, 2, [3, [4]], 5]\n     */\n    function flatten(array) {\n      var length = array == null ? 0 : array.length;\n      return length ? baseFlatten(array, 1) : [];\n    }\n\n    /**\n     * Recursively flattens `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to flatten.\n     * @returns {Array} Returns the new flattened array.\n     * @example\n     *\n     * _.flattenDeep([1, [2, [3, [4]], 5]]);\n     * // => [1, 2, 3, 4, 5]\n     */\n    function flattenDeep(array) {\n      var length = array == null ? 0 : array.length;\n      return length ? baseFlatten(array, INFINITY) : [];\n    }\n\n    /**\n     * Recursively flatten `array` up to `depth` times.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.4.0\n     * @category Array\n     * @param {Array} array The array to flatten.\n     * @param {number} [depth=1] The maximum recursion depth.\n     * @returns {Array} Returns the new flattened array.\n     * @example\n     *\n     * var array = [1, [2, [3, [4]], 5]];\n     *\n     * _.flattenDepth(array, 1);\n     * // => [1, 2, [3, [4]], 5]\n     *\n     * _.flattenDepth(array, 2);\n     * // => [1, 2, 3, [4], 5]\n     */\n    function flattenDepth(array, depth) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return [];\n      }\n      depth = depth === undefined ? 1 : toInteger(depth);\n      return baseFlatten(array, depth);\n    }\n\n    /**\n     * The inverse of `_.toPairs`; this method returns an object composed\n     * from key-value `pairs`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} pairs The key-value pairs.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * _.fromPairs([['a', 1], ['b', 2]]);\n     * // => { 'a': 1, 'b': 2 }\n     */\n    function fromPairs(pairs) {\n      var index = -1,\n          length = pairs == null ? 0 : pairs.length,\n          result = {};\n\n      while (++index < length) {\n        var pair = pairs[index];\n        baseAssignValue(result, pair[0], pair[1]);\n      }\n      return result;\n    }\n\n    /**\n     * Gets the first element of `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @alias first\n     * @category Array\n     * @param {Array} array The array to query.\n     * @returns {*} Returns the first element of `array`.\n     * @example\n     *\n     * _.head([1, 2, 3]);\n     * // => 1\n     *\n     * _.head([]);\n     * // => undefined\n     */\n    function head(array) {\n      return (array && array.length) ? array[0] : undefined;\n    }\n\n    /**\n     * Gets the index at which the first occurrence of `value` is found in `array`\n     * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons. If `fromIndex` is negative, it's used as the\n     * offset from the end of `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {*} value The value to search for.\n     * @param {number} [fromIndex=0] The index to search from.\n     * @returns {number} Returns the index of the matched value, else `-1`.\n     * @example\n     *\n     * _.indexOf([1, 2, 1, 2], 2);\n     * // => 1\n     *\n     * // Search from the `fromIndex`.\n     * _.indexOf([1, 2, 1, 2], 2, 2);\n     * // => 3\n     */\n    function indexOf(array, value, fromIndex) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return -1;\n      }\n      var index = fromIndex == null ? 0 : toInteger(fromIndex);\n      if (index < 0) {\n        index = nativeMax(length + index, 0);\n      }\n      return baseIndexOf(array, value, index);\n    }\n\n    /**\n     * Gets all but the last element of `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * _.initial([1, 2, 3]);\n     * // => [1, 2]\n     */\n    function initial(array) {\n      var length = array == null ? 0 : array.length;\n      return length ? baseSlice(array, 0, -1) : [];\n    }\n\n    /**\n     * Creates an array of unique values that are included in all given arrays\n     * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons. The order and references of result values are\n     * determined by the first array.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @returns {Array} Returns the new array of intersecting values.\n     * @example\n     *\n     * _.intersection([2, 1], [2, 3]);\n     * // => [2]\n     */\n    var intersection = baseRest(function(arrays) {\n      var mapped = arrayMap(arrays, castArrayLikeObject);\n      return (mapped.length && mapped[0] === arrays[0])\n        ? baseIntersection(mapped)\n        : [];\n    });\n\n    /**\n     * This method is like `_.intersection` except that it accepts `iteratee`\n     * which is invoked for each element of each `arrays` to generate the criterion\n     * by which they're compared. The order and references of result values are\n     * determined by the first array. The iteratee is invoked with one argument:\n     * (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {Array} Returns the new array of intersecting values.\n     * @example\n     *\n     * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n     * // => [2.1]\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n     * // => [{ 'x': 1 }]\n     */\n    var intersectionBy = baseRest(function(arrays) {\n      var iteratee = last(arrays),\n          mapped = arrayMap(arrays, castArrayLikeObject);\n\n      if (iteratee === last(mapped)) {\n        iteratee = undefined;\n      } else {\n        mapped.pop();\n      }\n      return (mapped.length && mapped[0] === arrays[0])\n        ? baseIntersection(mapped, getIteratee(iteratee, 2))\n        : [];\n    });\n\n    /**\n     * This method is like `_.intersection` except that it accepts `comparator`\n     * which is invoked to compare elements of `arrays`. The order and references\n     * of result values are determined by the first array. The comparator is\n     * invoked with two arguments: (arrVal, othVal).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new array of intersecting values.\n     * @example\n     *\n     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n     * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n     *\n     * _.intersectionWith(objects, others, _.isEqual);\n     * // => [{ 'x': 1, 'y': 2 }]\n     */\n    var intersectionWith = baseRest(function(arrays) {\n      var comparator = last(arrays),\n          mapped = arrayMap(arrays, castArrayLikeObject);\n\n      comparator = typeof comparator == 'function' ? comparator : undefined;\n      if (comparator) {\n        mapped.pop();\n      }\n      return (mapped.length && mapped[0] === arrays[0])\n        ? baseIntersection(mapped, undefined, comparator)\n        : [];\n    });\n\n    /**\n     * Converts all elements in `array` into a string separated by `separator`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to convert.\n     * @param {string} [separator=','] The element separator.\n     * @returns {string} Returns the joined string.\n     * @example\n     *\n     * _.join(['a', 'b', 'c'], '~');\n     * // => 'a~b~c'\n     */\n    function join(array, separator) {\n      return array == null ? '' : nativeJoin.call(array, separator);\n    }\n\n    /**\n     * Gets the last element of `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @returns {*} Returns the last element of `array`.\n     * @example\n     *\n     * _.last([1, 2, 3]);\n     * // => 3\n     */\n    function last(array) {\n      var length = array == null ? 0 : array.length;\n      return length ? array[length - 1] : undefined;\n    }\n\n    /**\n     * This method is like `_.indexOf` except that it iterates over elements of\n     * `array` from right to left.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {*} value The value to search for.\n     * @param {number} [fromIndex=array.length-1] The index to search from.\n     * @returns {number} Returns the index of the matched value, else `-1`.\n     * @example\n     *\n     * _.lastIndexOf([1, 2, 1, 2], 2);\n     * // => 3\n     *\n     * // Search from the `fromIndex`.\n     * _.lastIndexOf([1, 2, 1, 2], 2, 2);\n     * // => 1\n     */\n    function lastIndexOf(array, value, fromIndex) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return -1;\n      }\n      var index = length;\n      if (fromIndex !== undefined) {\n        index = toInteger(fromIndex);\n        index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);\n      }\n      return value === value\n        ? strictLastIndexOf(array, value, index)\n        : baseFindIndex(array, baseIsNaN, index, true);\n    }\n\n    /**\n     * Gets the element at index `n` of `array`. If `n` is negative, the nth\n     * element from the end is returned.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.11.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {number} [n=0] The index of the element to return.\n     * @returns {*} Returns the nth element of `array`.\n     * @example\n     *\n     * var array = ['a', 'b', 'c', 'd'];\n     *\n     * _.nth(array, 1);\n     * // => 'b'\n     *\n     * _.nth(array, -2);\n     * // => 'c';\n     */\n    function nth(array, n) {\n      return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;\n    }\n\n    /**\n     * Removes all given values from `array` using\n     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons.\n     *\n     * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`\n     * to remove elements from an array by predicate.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Array\n     * @param {Array} array The array to modify.\n     * @param {...*} [values] The values to remove.\n     * @returns {Array} Returns `array`.\n     * @example\n     *\n     * var array = ['a', 'b', 'c', 'a', 'b', 'c'];\n     *\n     * _.pull(array, 'a', 'c');\n     * console.log(array);\n     * // => ['b', 'b']\n     */\n    var pull = baseRest(pullAll);\n\n    /**\n     * This method is like `_.pull` except that it accepts an array of values to remove.\n     *\n     * **Note:** Unlike `_.difference`, this method mutates `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to modify.\n     * @param {Array} values The values to remove.\n     * @returns {Array} Returns `array`.\n     * @example\n     *\n     * var array = ['a', 'b', 'c', 'a', 'b', 'c'];\n     *\n     * _.pullAll(array, ['a', 'c']);\n     * console.log(array);\n     * // => ['b', 'b']\n     */\n    function pullAll(array, values) {\n      return (array && array.length && values && values.length)\n        ? basePullAll(array, values)\n        : array;\n    }\n\n    /**\n     * This method is like `_.pullAll` except that it accepts `iteratee` which is\n     * invoked for each element of `array` and `values` to generate the criterion\n     * by which they're compared. The iteratee is invoked with one argument: (value).\n     *\n     * **Note:** Unlike `_.differenceBy`, this method mutates `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to modify.\n     * @param {Array} values The values to remove.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {Array} Returns `array`.\n     * @example\n     *\n     * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];\n     *\n     * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');\n     * console.log(array);\n     * // => [{ 'x': 2 }]\n     */\n    function pullAllBy(array, values, iteratee) {\n      return (array && array.length && values && values.length)\n        ? basePullAll(array, values, getIteratee(iteratee, 2))\n        : array;\n    }\n\n    /**\n     * This method is like `_.pullAll` except that it accepts `comparator` which\n     * is invoked to compare elements of `array` to `values`. The comparator is\n     * invoked with two arguments: (arrVal, othVal).\n     *\n     * **Note:** Unlike `_.differenceWith`, this method mutates `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.6.0\n     * @category Array\n     * @param {Array} array The array to modify.\n     * @param {Array} values The values to remove.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns `array`.\n     * @example\n     *\n     * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];\n     *\n     * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);\n     * console.log(array);\n     * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]\n     */\n    function pullAllWith(array, values, comparator) {\n      return (array && array.length && values && values.length)\n        ? basePullAll(array, values, undefined, comparator)\n        : array;\n    }\n\n    /**\n     * Removes elements from `array` corresponding to `indexes` and returns an\n     * array of removed elements.\n     *\n     * **Note:** Unlike `_.at`, this method mutates `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to modify.\n     * @param {...(number|number[])} [indexes] The indexes of elements to remove.\n     * @returns {Array} Returns the new array of removed elements.\n     * @example\n     *\n     * var array = ['a', 'b', 'c', 'd'];\n     * var pulled = _.pullAt(array, [1, 3]);\n     *\n     * console.log(array);\n     * // => ['a', 'c']\n     *\n     * console.log(pulled);\n     * // => ['b', 'd']\n     */\n    var pullAt = flatRest(function(array, indexes) {\n      var length = array == null ? 0 : array.length,\n          result = baseAt(array, indexes);\n\n      basePullAt(array, arrayMap(indexes, function(index) {\n        return isIndex(index, length) ? +index : index;\n      }).sort(compareAscending));\n\n      return result;\n    });\n\n    /**\n     * Removes all elements from `array` that `predicate` returns truthy for\n     * and returns an array of the removed elements. The predicate is invoked\n     * with three arguments: (value, index, array).\n     *\n     * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`\n     * to pull elements from an array by value.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Array\n     * @param {Array} array The array to modify.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the new array of removed elements.\n     * @example\n     *\n     * var array = [1, 2, 3, 4];\n     * var evens = _.remove(array, function(n) {\n     *   return n % 2 == 0;\n     * });\n     *\n     * console.log(array);\n     * // => [1, 3]\n     *\n     * console.log(evens);\n     * // => [2, 4]\n     */\n    function remove(array, predicate) {\n      var result = [];\n      if (!(array && array.length)) {\n        return result;\n      }\n      var index = -1,\n          indexes = [],\n          length = array.length;\n\n      predicate = getIteratee(predicate, 3);\n      while (++index < length) {\n        var value = array[index];\n        if (predicate(value, index, array)) {\n          result.push(value);\n          indexes.push(index);\n        }\n      }\n      basePullAt(array, indexes);\n      return result;\n    }\n\n    /**\n     * Reverses `array` so that the first element becomes the last, the second\n     * element becomes the second to last, and so on.\n     *\n     * **Note:** This method mutates `array` and is based on\n     * [`Array#reverse`](https://mdn.io/Array/reverse).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to modify.\n     * @returns {Array} Returns `array`.\n     * @example\n     *\n     * var array = [1, 2, 3];\n     *\n     * _.reverse(array);\n     * // => [3, 2, 1]\n     *\n     * console.log(array);\n     * // => [3, 2, 1]\n     */\n    function reverse(array) {\n      return array == null ? array : nativeReverse.call(array);\n    }\n\n    /**\n     * Creates a slice of `array` from `start` up to, but not including, `end`.\n     *\n     * **Note:** This method is used instead of\n     * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are\n     * returned.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to slice.\n     * @param {number} [start=0] The start position.\n     * @param {number} [end=array.length] The end position.\n     * @returns {Array} Returns the slice of `array`.\n     */\n    function slice(array, start, end) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return [];\n      }\n      if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {\n        start = 0;\n        end = length;\n      }\n      else {\n        start = start == null ? 0 : toInteger(start);\n        end = end === undefined ? length : toInteger(end);\n      }\n      return baseSlice(array, start, end);\n    }\n\n    /**\n     * Uses a binary search to determine the lowest index at which `value`\n     * should be inserted into `array` in order to maintain its sort order.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The sorted array to inspect.\n     * @param {*} value The value to evaluate.\n     * @returns {number} Returns the index at which `value` should be inserted\n     *  into `array`.\n     * @example\n     *\n     * _.sortedIndex([30, 50], 40);\n     * // => 1\n     */\n    function sortedIndex(array, value) {\n      return baseSortedIndex(array, value);\n    }\n\n    /**\n     * This method is like `_.sortedIndex` except that it accepts `iteratee`\n     * which is invoked for `value` and each element of `array` to compute their\n     * sort ranking. The iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The sorted array to inspect.\n     * @param {*} value The value to evaluate.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {number} Returns the index at which `value` should be inserted\n     *  into `array`.\n     * @example\n     *\n     * var objects = [{ 'x': 4 }, { 'x': 5 }];\n     *\n     * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });\n     * // => 0\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.sortedIndexBy(objects, { 'x': 4 }, 'x');\n     * // => 0\n     */\n    function sortedIndexBy(array, value, iteratee) {\n      return baseSortedIndexBy(array, value, getIteratee(iteratee, 2));\n    }\n\n    /**\n     * This method is like `_.indexOf` except that it performs a binary\n     * search on a sorted `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {*} value The value to search for.\n     * @returns {number} Returns the index of the matched value, else `-1`.\n     * @example\n     *\n     * _.sortedIndexOf([4, 5, 5, 5, 6], 5);\n     * // => 1\n     */\n    function sortedIndexOf(array, value) {\n      var length = array == null ? 0 : array.length;\n      if (length) {\n        var index = baseSortedIndex(array, value);\n        if (index < length && eq(array[index], value)) {\n          return index;\n        }\n      }\n      return -1;\n    }\n\n    /**\n     * This method is like `_.sortedIndex` except that it returns the highest\n     * index at which `value` should be inserted into `array` in order to\n     * maintain its sort order.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The sorted array to inspect.\n     * @param {*} value The value to evaluate.\n     * @returns {number} Returns the index at which `value` should be inserted\n     *  into `array`.\n     * @example\n     *\n     * _.sortedLastIndex([4, 5, 5, 5, 6], 5);\n     * // => 4\n     */\n    function sortedLastIndex(array, value) {\n      return baseSortedIndex(array, value, true);\n    }\n\n    /**\n     * This method is like `_.sortedLastIndex` except that it accepts `iteratee`\n     * which is invoked for `value` and each element of `array` to compute their\n     * sort ranking. The iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The sorted array to inspect.\n     * @param {*} value The value to evaluate.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {number} Returns the index at which `value` should be inserted\n     *  into `array`.\n     * @example\n     *\n     * var objects = [{ 'x': 4 }, { 'x': 5 }];\n     *\n     * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });\n     * // => 1\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');\n     * // => 1\n     */\n    function sortedLastIndexBy(array, value, iteratee) {\n      return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true);\n    }\n\n    /**\n     * This method is like `_.lastIndexOf` except that it performs a binary\n     * search on a sorted `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {*} value The value to search for.\n     * @returns {number} Returns the index of the matched value, else `-1`.\n     * @example\n     *\n     * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);\n     * // => 3\n     */\n    function sortedLastIndexOf(array, value) {\n      var length = array == null ? 0 : array.length;\n      if (length) {\n        var index = baseSortedIndex(array, value, true) - 1;\n        if (eq(array[index], value)) {\n          return index;\n        }\n      }\n      return -1;\n    }\n\n    /**\n     * This method is like `_.uniq` except that it's designed and optimized\n     * for sorted arrays.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @returns {Array} Returns the new duplicate free array.\n     * @example\n     *\n     * _.sortedUniq([1, 1, 2]);\n     * // => [1, 2]\n     */\n    function sortedUniq(array) {\n      return (array && array.length)\n        ? baseSortedUniq(array)\n        : [];\n    }\n\n    /**\n     * This method is like `_.uniqBy` except that it's designed and optimized\n     * for sorted arrays.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {Function} [iteratee] The iteratee invoked per element.\n     * @returns {Array} Returns the new duplicate free array.\n     * @example\n     *\n     * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);\n     * // => [1.1, 2.3]\n     */\n    function sortedUniqBy(array, iteratee) {\n      return (array && array.length)\n        ? baseSortedUniq(array, getIteratee(iteratee, 2))\n        : [];\n    }\n\n    /**\n     * Gets all but the first element of `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * _.tail([1, 2, 3]);\n     * // => [2, 3]\n     */\n    function tail(array) {\n      var length = array == null ? 0 : array.length;\n      return length ? baseSlice(array, 1, length) : [];\n    }\n\n    /**\n     * Creates a slice of `array` with `n` elements taken from the beginning.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {number} [n=1] The number of elements to take.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * _.take([1, 2, 3]);\n     * // => [1]\n     *\n     * _.take([1, 2, 3], 2);\n     * // => [1, 2]\n     *\n     * _.take([1, 2, 3], 5);\n     * // => [1, 2, 3]\n     *\n     * _.take([1, 2, 3], 0);\n     * // => []\n     */\n    function take(array, n, guard) {\n      if (!(array && array.length)) {\n        return [];\n      }\n      n = (guard || n === undefined) ? 1 : toInteger(n);\n      return baseSlice(array, 0, n < 0 ? 0 : n);\n    }\n\n    /**\n     * Creates a slice of `array` with `n` elements taken from the end.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {number} [n=1] The number of elements to take.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * _.takeRight([1, 2, 3]);\n     * // => [3]\n     *\n     * _.takeRight([1, 2, 3], 2);\n     * // => [2, 3]\n     *\n     * _.takeRight([1, 2, 3], 5);\n     * // => [1, 2, 3]\n     *\n     * _.takeRight([1, 2, 3], 0);\n     * // => []\n     */\n    function takeRight(array, n, guard) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return [];\n      }\n      n = (guard || n === undefined) ? 1 : toInteger(n);\n      n = length - n;\n      return baseSlice(array, n < 0 ? 0 : n, length);\n    }\n\n    /**\n     * Creates a slice of `array` with elements taken from the end. Elements are\n     * taken until `predicate` returns falsey. The predicate is invoked with\n     * three arguments: (value, index, array).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'active': true },\n     *   { 'user': 'fred',    'active': false },\n     *   { 'user': 'pebbles', 'active': false }\n     * ];\n     *\n     * _.takeRightWhile(users, function(o) { return !o.active; });\n     * // => objects for ['fred', 'pebbles']\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });\n     * // => objects for ['pebbles']\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.takeRightWhile(users, ['active', false]);\n     * // => objects for ['fred', 'pebbles']\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.takeRightWhile(users, 'active');\n     * // => []\n     */\n    function takeRightWhile(array, predicate) {\n      return (array && array.length)\n        ? baseWhile(array, getIteratee(predicate, 3), false, true)\n        : [];\n    }\n\n    /**\n     * Creates a slice of `array` with elements taken from the beginning. Elements\n     * are taken until `predicate` returns falsey. The predicate is invoked with\n     * three arguments: (value, index, array).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'active': false },\n     *   { 'user': 'fred',    'active': false },\n     *   { 'user': 'pebbles', 'active': true }\n     * ];\n     *\n     * _.takeWhile(users, function(o) { return !o.active; });\n     * // => objects for ['barney', 'fred']\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.takeWhile(users, { 'user': 'barney', 'active': false });\n     * // => objects for ['barney']\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.takeWhile(users, ['active', false]);\n     * // => objects for ['barney', 'fred']\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.takeWhile(users, 'active');\n     * // => []\n     */\n    function takeWhile(array, predicate) {\n      return (array && array.length)\n        ? baseWhile(array, getIteratee(predicate, 3))\n        : [];\n    }\n\n    /**\n     * Creates an array of unique values, in order, from all given arrays using\n     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @returns {Array} Returns the new array of combined values.\n     * @example\n     *\n     * _.union([2], [1, 2]);\n     * // => [2, 1]\n     */\n    var union = baseRest(function(arrays) {\n      return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));\n    });\n\n    /**\n     * This method is like `_.union` except that it accepts `iteratee` which is\n     * invoked for each element of each `arrays` to generate the criterion by\n     * which uniqueness is computed. Result values are chosen from the first\n     * array in which the value occurs. The iteratee is invoked with one argument:\n     * (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {Array} Returns the new array of combined values.\n     * @example\n     *\n     * _.unionBy([2.1], [1.2, 2.3], Math.floor);\n     * // => [2.1, 1.2]\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n     * // => [{ 'x': 1 }, { 'x': 2 }]\n     */\n    var unionBy = baseRest(function(arrays) {\n      var iteratee = last(arrays);\n      if (isArrayLikeObject(iteratee)) {\n        iteratee = undefined;\n      }\n      return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2));\n    });\n\n    /**\n     * This method is like `_.union` except that it accepts `comparator` which\n     * is invoked to compare elements of `arrays`. Result values are chosen from\n     * the first array in which the value occurs. The comparator is invoked\n     * with two arguments: (arrVal, othVal).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new array of combined values.\n     * @example\n     *\n     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n     * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n     *\n     * _.unionWith(objects, others, _.isEqual);\n     * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]\n     */\n    var unionWith = baseRest(function(arrays) {\n      var comparator = last(arrays);\n      comparator = typeof comparator == 'function' ? comparator : undefined;\n      return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);\n    });\n\n    /**\n     * Creates a duplicate-free version of an array, using\n     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons, in which only the first occurrence of each element\n     * is kept. The order of result values is determined by the order they occur\n     * in the array.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @returns {Array} Returns the new duplicate free array.\n     * @example\n     *\n     * _.uniq([2, 1, 2]);\n     * // => [2, 1]\n     */\n    function uniq(array) {\n      return (array && array.length) ? baseUniq(array) : [];\n    }\n\n    /**\n     * This method is like `_.uniq` except that it accepts `iteratee` which is\n     * invoked for each element in `array` to generate the criterion by which\n     * uniqueness is computed. The order of result values is determined by the\n     * order they occur in the array. The iteratee is invoked with one argument:\n     * (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {Array} Returns the new duplicate free array.\n     * @example\n     *\n     * _.uniqBy([2.1, 1.2, 2.3], Math.floor);\n     * // => [2.1, 1.2]\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');\n     * // => [{ 'x': 1 }, { 'x': 2 }]\n     */\n    function uniqBy(array, iteratee) {\n      return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : [];\n    }\n\n    /**\n     * This method is like `_.uniq` except that it accepts `comparator` which\n     * is invoked to compare elements of `array`. The order of result values is\n     * determined by the order they occur in the array.The comparator is invoked\n     * with two arguments: (arrVal, othVal).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new duplicate free array.\n     * @example\n     *\n     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];\n     *\n     * _.uniqWith(objects, _.isEqual);\n     * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]\n     */\n    function uniqWith(array, comparator) {\n      comparator = typeof comparator == 'function' ? comparator : undefined;\n      return (array && array.length) ? baseUniq(array, undefined, comparator) : [];\n    }\n\n    /**\n     * This method is like `_.zip` except that it accepts an array of grouped\n     * elements and creates an array regrouping the elements to their pre-zip\n     * configuration.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.2.0\n     * @category Array\n     * @param {Array} array The array of grouped elements to process.\n     * @returns {Array} Returns the new array of regrouped elements.\n     * @example\n     *\n     * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);\n     * // => [['a', 1, true], ['b', 2, false]]\n     *\n     * _.unzip(zipped);\n     * // => [['a', 'b'], [1, 2], [true, false]]\n     */\n    function unzip(array) {\n      if (!(array && array.length)) {\n        return [];\n      }\n      var length = 0;\n      array = arrayFilter(array, function(group) {\n        if (isArrayLikeObject(group)) {\n          length = nativeMax(group.length, length);\n          return true;\n        }\n      });\n      return baseTimes(length, function(index) {\n        return arrayMap(array, baseProperty(index));\n      });\n    }\n\n    /**\n     * This method is like `_.unzip` except that it accepts `iteratee` to specify\n     * how regrouped values should be combined. The iteratee is invoked with the\n     * elements of each group: (...group).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.8.0\n     * @category Array\n     * @param {Array} array The array of grouped elements to process.\n     * @param {Function} [iteratee=_.identity] The function to combine\n     *  regrouped values.\n     * @returns {Array} Returns the new array of regrouped elements.\n     * @example\n     *\n     * var zipped = _.zip([1, 2], [10, 20], [100, 200]);\n     * // => [[1, 10, 100], [2, 20, 200]]\n     *\n     * _.unzipWith(zipped, _.add);\n     * // => [3, 30, 300]\n     */\n    function unzipWith(array, iteratee) {\n      if (!(array && array.length)) {\n        return [];\n      }\n      var result = unzip(array);\n      if (iteratee == null) {\n        return result;\n      }\n      return arrayMap(result, function(group) {\n        return apply(iteratee, undefined, group);\n      });\n    }\n\n    /**\n     * Creates an array excluding all given values using\n     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons.\n     *\n     * **Note:** Unlike `_.pull`, this method returns a new array.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {...*} [values] The values to exclude.\n     * @returns {Array} Returns the new array of filtered values.\n     * @see _.difference, _.xor\n     * @example\n     *\n     * _.without([2, 1, 2, 3], 1, 2);\n     * // => [3]\n     */\n    var without = baseRest(function(array, values) {\n      return isArrayLikeObject(array)\n        ? baseDifference(array, values)\n        : [];\n    });\n\n    /**\n     * Creates an array of unique values that is the\n     * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)\n     * of the given arrays. The order of result values is determined by the order\n     * they occur in the arrays.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.4.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @returns {Array} Returns the new array of filtered values.\n     * @see _.difference, _.without\n     * @example\n     *\n     * _.xor([2, 1], [2, 3]);\n     * // => [1, 3]\n     */\n    var xor = baseRest(function(arrays) {\n      return baseXor(arrayFilter(arrays, isArrayLikeObject));\n    });\n\n    /**\n     * This method is like `_.xor` except that it accepts `iteratee` which is\n     * invoked for each element of each `arrays` to generate the criterion by\n     * which by which they're compared. The order of result values is determined\n     * by the order they occur in the arrays. The iteratee is invoked with one\n     * argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {Array} Returns the new array of filtered values.\n     * @example\n     *\n     * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n     * // => [1.2, 3.4]\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n     * // => [{ 'x': 2 }]\n     */\n    var xorBy = baseRest(function(arrays) {\n      var iteratee = last(arrays);\n      if (isArrayLikeObject(iteratee)) {\n        iteratee = undefined;\n      }\n      return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2));\n    });\n\n    /**\n     * This method is like `_.xor` except that it accepts `comparator` which is\n     * invoked to compare elements of `arrays`. The order of result values is\n     * determined by the order they occur in the arrays. The comparator is invoked\n     * with two arguments: (arrVal, othVal).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new array of filtered values.\n     * @example\n     *\n     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n     * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n     *\n     * _.xorWith(objects, others, _.isEqual);\n     * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]\n     */\n    var xorWith = baseRest(function(arrays) {\n      var comparator = last(arrays);\n      comparator = typeof comparator == 'function' ? comparator : undefined;\n      return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);\n    });\n\n    /**\n     * Creates an array of grouped elements, the first of which contains the\n     * first elements of the given arrays, the second of which contains the\n     * second elements of the given arrays, and so on.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to process.\n     * @returns {Array} Returns the new array of grouped elements.\n     * @example\n     *\n     * _.zip(['a', 'b'], [1, 2], [true, false]);\n     * // => [['a', 1, true], ['b', 2, false]]\n     */\n    var zip = baseRest(unzip);\n\n    /**\n     * This method is like `_.fromPairs` except that it accepts two arrays,\n     * one of property identifiers and one of corresponding values.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.4.0\n     * @category Array\n     * @param {Array} [props=[]] The property identifiers.\n     * @param {Array} [values=[]] The property values.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * _.zipObject(['a', 'b'], [1, 2]);\n     * // => { 'a': 1, 'b': 2 }\n     */\n    function zipObject(props, values) {\n      return baseZipObject(props || [], values || [], assignValue);\n    }\n\n    /**\n     * This method is like `_.zipObject` except that it supports property paths.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.1.0\n     * @category Array\n     * @param {Array} [props=[]] The property identifiers.\n     * @param {Array} [values=[]] The property values.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);\n     * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }\n     */\n    function zipObjectDeep(props, values) {\n      return baseZipObject(props || [], values || [], baseSet);\n    }\n\n    /**\n     * This method is like `_.zip` except that it accepts `iteratee` to specify\n     * how grouped values should be combined. The iteratee is invoked with the\n     * elements of each group: (...group).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.8.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to process.\n     * @param {Function} [iteratee=_.identity] The function to combine\n     *  grouped values.\n     * @returns {Array} Returns the new array of grouped elements.\n     * @example\n     *\n     * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {\n     *   return a + b + c;\n     * });\n     * // => [111, 222]\n     */\n    var zipWith = baseRest(function(arrays) {\n      var length = arrays.length,\n          iteratee = length > 1 ? arrays[length - 1] : undefined;\n\n      iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;\n      return unzipWith(arrays, iteratee);\n    });\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates a `lodash` wrapper instance that wraps `value` with explicit method\n     * chain sequences enabled. The result of such sequences must be unwrapped\n     * with `_#value`.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.3.0\n     * @category Seq\n     * @param {*} value The value to wrap.\n     * @returns {Object} Returns the new `lodash` wrapper instance.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'age': 36 },\n     *   { 'user': 'fred',    'age': 40 },\n     *   { 'user': 'pebbles', 'age': 1 }\n     * ];\n     *\n     * var youngest = _\n     *   .chain(users)\n     *   .sortBy('age')\n     *   .map(function(o) {\n     *     return o.user + ' is ' + o.age;\n     *   })\n     *   .head()\n     *   .value();\n     * // => 'pebbles is 1'\n     */\n    function chain(value) {\n      var result = lodash(value);\n      result.__chain__ = true;\n      return result;\n    }\n\n    /**\n     * This method invokes `interceptor` and returns `value`. The interceptor\n     * is invoked with one argument; (value). The purpose of this method is to\n     * \"tap into\" a method chain sequence in order to modify intermediate results.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Seq\n     * @param {*} value The value to provide to `interceptor`.\n     * @param {Function} interceptor The function to invoke.\n     * @returns {*} Returns `value`.\n     * @example\n     *\n     * _([1, 2, 3])\n     *  .tap(function(array) {\n     *    // Mutate input array.\n     *    array.pop();\n     *  })\n     *  .reverse()\n     *  .value();\n     * // => [2, 1]\n     */\n    function tap(value, interceptor) {\n      interceptor(value);\n      return value;\n    }\n\n    /**\n     * This method is like `_.tap` except that it returns the result of `interceptor`.\n     * The purpose of this method is to \"pass thru\" values replacing intermediate\n     * results in a method chain sequence.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Seq\n     * @param {*} value The value to provide to `interceptor`.\n     * @param {Function} interceptor The function to invoke.\n     * @returns {*} Returns the result of `interceptor`.\n     * @example\n     *\n     * _('  abc  ')\n     *  .chain()\n     *  .trim()\n     *  .thru(function(value) {\n     *    return [value];\n     *  })\n     *  .value();\n     * // => ['abc']\n     */\n    function thru(value, interceptor) {\n      return interceptor(value);\n    }\n\n    /**\n     * This method is the wrapper version of `_.at`.\n     *\n     * @name at\n     * @memberOf _\n     * @since 1.0.0\n     * @category Seq\n     * @param {...(string|string[])} [paths] The property paths to pick.\n     * @returns {Object} Returns the new `lodash` wrapper instance.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\n     *\n     * _(object).at(['a[0].b.c', 'a[1]']).value();\n     * // => [3, 4]\n     */\n    var wrapperAt = flatRest(function(paths) {\n      var length = paths.length,\n          start = length ? paths[0] : 0,\n          value = this.__wrapped__,\n          interceptor = function(object) { return baseAt(object, paths); };\n\n      if (length > 1 || this.__actions__.length ||\n          !(value instanceof LazyWrapper) || !isIndex(start)) {\n        return this.thru(interceptor);\n      }\n      value = value.slice(start, +start + (length ? 1 : 0));\n      value.__actions__.push({\n        'func': thru,\n        'args': [interceptor],\n        'thisArg': undefined\n      });\n      return new LodashWrapper(value, this.__chain__).thru(function(array) {\n        if (length && !array.length) {\n          array.push(undefined);\n        }\n        return array;\n      });\n    });\n\n    /**\n     * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.\n     *\n     * @name chain\n     * @memberOf _\n     * @since 0.1.0\n     * @category Seq\n     * @returns {Object} Returns the new `lodash` wrapper instance.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney', 'age': 36 },\n     *   { 'user': 'fred',   'age': 40 }\n     * ];\n     *\n     * // A sequence without explicit chaining.\n     * _(users).head();\n     * // => { 'user': 'barney', 'age': 36 }\n     *\n     * // A sequence with explicit chaining.\n     * _(users)\n     *   .chain()\n     *   .head()\n     *   .pick('user')\n     *   .value();\n     * // => { 'user': 'barney' }\n     */\n    function wrapperChain() {\n      return chain(this);\n    }\n\n    /**\n     * Executes the chain sequence and returns the wrapped result.\n     *\n     * @name commit\n     * @memberOf _\n     * @since 3.2.0\n     * @category Seq\n     * @returns {Object} Returns the new `lodash` wrapper instance.\n     * @example\n     *\n     * var array = [1, 2];\n     * var wrapped = _(array).push(3);\n     *\n     * console.log(array);\n     * // => [1, 2]\n     *\n     * wrapped = wrapped.commit();\n     * console.log(array);\n     * // => [1, 2, 3]\n     *\n     * wrapped.last();\n     * // => 3\n     *\n     * console.log(array);\n     * // => [1, 2, 3]\n     */\n    function wrapperCommit() {\n      return new LodashWrapper(this.value(), this.__chain__);\n    }\n\n    /**\n     * Gets the next value on a wrapped object following the\n     * [iterator protocol](https://mdn.io/iteration_protocols#iterator).\n     *\n     * @name next\n     * @memberOf _\n     * @since 4.0.0\n     * @category Seq\n     * @returns {Object} Returns the next iterator value.\n     * @example\n     *\n     * var wrapped = _([1, 2]);\n     *\n     * wrapped.next();\n     * // => { 'done': false, 'value': 1 }\n     *\n     * wrapped.next();\n     * // => { 'done': false, 'value': 2 }\n     *\n     * wrapped.next();\n     * // => { 'done': true, 'value': undefined }\n     */\n    function wrapperNext() {\n      if (this.__values__ === undefined) {\n        this.__values__ = toArray(this.value());\n      }\n      var done = this.__index__ >= this.__values__.length,\n          value = done ? undefined : this.__values__[this.__index__++];\n\n      return { 'done': done, 'value': value };\n    }\n\n    /**\n     * Enables the wrapper to be iterable.\n     *\n     * @name Symbol.iterator\n     * @memberOf _\n     * @since 4.0.0\n     * @category Seq\n     * @returns {Object} Returns the wrapper object.\n     * @example\n     *\n     * var wrapped = _([1, 2]);\n     *\n     * wrapped[Symbol.iterator]() === wrapped;\n     * // => true\n     *\n     * Array.from(wrapped);\n     * // => [1, 2]\n     */\n    function wrapperToIterator() {\n      return this;\n    }\n\n    /**\n     * Creates a clone of the chain sequence planting `value` as the wrapped value.\n     *\n     * @name plant\n     * @memberOf _\n     * @since 3.2.0\n     * @category Seq\n     * @param {*} value The value to plant.\n     * @returns {Object} Returns the new `lodash` wrapper instance.\n     * @example\n     *\n     * function square(n) {\n     *   return n * n;\n     * }\n     *\n     * var wrapped = _([1, 2]).map(square);\n     * var other = wrapped.plant([3, 4]);\n     *\n     * other.value();\n     * // => [9, 16]\n     *\n     * wrapped.value();\n     * // => [1, 4]\n     */\n    function wrapperPlant(value) {\n      var result,\n          parent = this;\n\n      while (parent instanceof baseLodash) {\n        var clone = wrapperClone(parent);\n        clone.__index__ = 0;\n        clone.__values__ = undefined;\n        if (result) {\n          previous.__wrapped__ = clone;\n        } else {\n          result = clone;\n        }\n        var previous = clone;\n        parent = parent.__wrapped__;\n      }\n      previous.__wrapped__ = value;\n      return result;\n    }\n\n    /**\n     * This method is the wrapper version of `_.reverse`.\n     *\n     * **Note:** This method mutates the wrapped array.\n     *\n     * @name reverse\n     * @memberOf _\n     * @since 0.1.0\n     * @category Seq\n     * @returns {Object} Returns the new `lodash` wrapper instance.\n     * @example\n     *\n     * var array = [1, 2, 3];\n     *\n     * _(array).reverse().value()\n     * // => [3, 2, 1]\n     *\n     * console.log(array);\n     * // => [3, 2, 1]\n     */\n    function wrapperReverse() {\n      var value = this.__wrapped__;\n      if (value instanceof LazyWrapper) {\n        var wrapped = value;\n        if (this.__actions__.length) {\n          wrapped = new LazyWrapper(this);\n        }\n        wrapped = wrapped.reverse();\n        wrapped.__actions__.push({\n          'func': thru,\n          'args': [reverse],\n          'thisArg': undefined\n        });\n        return new LodashWrapper(wrapped, this.__chain__);\n      }\n      return this.thru(reverse);\n    }\n\n    /**\n     * Executes the chain sequence to resolve the unwrapped value.\n     *\n     * @name value\n     * @memberOf _\n     * @since 0.1.0\n     * @alias toJSON, valueOf\n     * @category Seq\n     * @returns {*} Returns the resolved unwrapped value.\n     * @example\n     *\n     * _([1, 2, 3]).value();\n     * // => [1, 2, 3]\n     */\n    function wrapperValue() {\n      return baseWrapperValue(this.__wrapped__, this.__actions__);\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates an object composed of keys generated from the results of running\n     * each element of `collection` thru `iteratee`. The corresponding value of\n     * each key is the number of times the key was returned by `iteratee`. The\n     * iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.5.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n     * @returns {Object} Returns the composed aggregate object.\n     * @example\n     *\n     * _.countBy([6.1, 4.2, 6.3], Math.floor);\n     * // => { '4': 1, '6': 2 }\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.countBy(['one', 'two', 'three'], 'length');\n     * // => { '3': 2, '5': 1 }\n     */\n    var countBy = createAggregator(function(result, value, key) {\n      if (hasOwnProperty.call(result, key)) {\n        ++result[key];\n      } else {\n        baseAssignValue(result, key, 1);\n      }\n    });\n\n    /**\n     * Checks if `predicate` returns truthy for **all** elements of `collection`.\n     * Iteration is stopped once `predicate` returns falsey. The predicate is\n     * invoked with three arguments: (value, index|key, collection).\n     *\n     * **Note:** This method returns `true` for\n     * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because\n     * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of\n     * elements of empty collections.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {boolean} Returns `true` if all elements pass the predicate check,\n     *  else `false`.\n     * @example\n     *\n     * _.every([true, 1, null, 'yes'], Boolean);\n     * // => false\n     *\n     * var users = [\n     *   { 'user': 'barney', 'age': 36, 'active': false },\n     *   { 'user': 'fred',   'age': 40, 'active': false }\n     * ];\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.every(users, { 'user': 'barney', 'active': false });\n     * // => false\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.every(users, ['active', false]);\n     * // => true\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.every(users, 'active');\n     * // => false\n     */\n    function every(collection, predicate, guard) {\n      var func = isArray(collection) ? arrayEvery : baseEvery;\n      if (guard && isIterateeCall(collection, predicate, guard)) {\n        predicate = undefined;\n      }\n      return func(collection, getIteratee(predicate, 3));\n    }\n\n    /**\n     * Iterates over elements of `collection`, returning an array of all elements\n     * `predicate` returns truthy for. The predicate is invoked with three\n     * arguments: (value, index|key, collection).\n     *\n     * **Note:** Unlike `_.remove`, this method returns a new array.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the new filtered array.\n     * @see _.reject\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney', 'age': 36, 'active': true },\n     *   { 'user': 'fred',   'age': 40, 'active': false }\n     * ];\n     *\n     * _.filter(users, function(o) { return !o.active; });\n     * // => objects for ['fred']\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.filter(users, { 'age': 36, 'active': true });\n     * // => objects for ['barney']\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.filter(users, ['active', false]);\n     * // => objects for ['fred']\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.filter(users, 'active');\n     * // => objects for ['barney']\n     *\n     * // Combining several predicates using `_.overEvery` or `_.overSome`.\n     * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));\n     * // => objects for ['fred', 'barney']\n     */\n    function filter(collection, predicate) {\n      var func = isArray(collection) ? arrayFilter : baseFilter;\n      return func(collection, getIteratee(predicate, 3));\n    }\n\n    /**\n     * Iterates over elements of `collection`, returning the first element\n     * `predicate` returns truthy for. The predicate is invoked with three\n     * arguments: (value, index|key, collection).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to inspect.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @param {number} [fromIndex=0] The index to search from.\n     * @returns {*} Returns the matched element, else `undefined`.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'age': 36, 'active': true },\n     *   { 'user': 'fred',    'age': 40, 'active': false },\n     *   { 'user': 'pebbles', 'age': 1,  'active': true }\n     * ];\n     *\n     * _.find(users, function(o) { return o.age < 40; });\n     * // => object for 'barney'\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.find(users, { 'age': 1, 'active': true });\n     * // => object for 'pebbles'\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.find(users, ['active', false]);\n     * // => object for 'fred'\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.find(users, 'active');\n     * // => object for 'barney'\n     */\n    var find = createFind(findIndex);\n\n    /**\n     * This method is like `_.find` except that it iterates over elements of\n     * `collection` from right to left.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to inspect.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @param {number} [fromIndex=collection.length-1] The index to search from.\n     * @returns {*} Returns the matched element, else `undefined`.\n     * @example\n     *\n     * _.findLast([1, 2, 3, 4], function(n) {\n     *   return n % 2 == 1;\n     * });\n     * // => 3\n     */\n    var findLast = createFind(findLastIndex);\n\n    /**\n     * Creates a flattened array of values by running each element in `collection`\n     * thru `iteratee` and flattening the mapped results. The iteratee is invoked\n     * with three arguments: (value, index|key, collection).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the new flattened array.\n     * @example\n     *\n     * function duplicate(n) {\n     *   return [n, n];\n     * }\n     *\n     * _.flatMap([1, 2], duplicate);\n     * // => [1, 1, 2, 2]\n     */\n    function flatMap(collection, iteratee) {\n      return baseFlatten(map(collection, iteratee), 1);\n    }\n\n    /**\n     * This method is like `_.flatMap` except that it recursively flattens the\n     * mapped results.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.7.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the new flattened array.\n     * @example\n     *\n     * function duplicate(n) {\n     *   return [[[n, n]]];\n     * }\n     *\n     * _.flatMapDeep([1, 2], duplicate);\n     * // => [1, 1, 2, 2]\n     */\n    function flatMapDeep(collection, iteratee) {\n      return baseFlatten(map(collection, iteratee), INFINITY);\n    }\n\n    /**\n     * This method is like `_.flatMap` except that it recursively flattens the\n     * mapped results up to `depth` times.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.7.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @param {number} [depth=1] The maximum recursion depth.\n     * @returns {Array} Returns the new flattened array.\n     * @example\n     *\n     * function duplicate(n) {\n     *   return [[[n, n]]];\n     * }\n     *\n     * _.flatMapDepth([1, 2], duplicate, 2);\n     * // => [[1, 1], [2, 2]]\n     */\n    function flatMapDepth(collection, iteratee, depth) {\n      depth = depth === undefined ? 1 : toInteger(depth);\n      return baseFlatten(map(collection, iteratee), depth);\n    }\n\n    /**\n     * Iterates over elements of `collection` and invokes `iteratee` for each element.\n     * The iteratee is invoked with three arguments: (value, index|key, collection).\n     * Iteratee functions may exit iteration early by explicitly returning `false`.\n     *\n     * **Note:** As with other \"Collections\" methods, objects with a \"length\"\n     * property are iterated like arrays. To avoid this behavior use `_.forIn`\n     * or `_.forOwn` for object iteration.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @alias each\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Array|Object} Returns `collection`.\n     * @see _.forEachRight\n     * @example\n     *\n     * _.forEach([1, 2], function(value) {\n     *   console.log(value);\n     * });\n     * // => Logs `1` then `2`.\n     *\n     * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {\n     *   console.log(key);\n     * });\n     * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n     */\n    function forEach(collection, iteratee) {\n      var func = isArray(collection) ? arrayEach : baseEach;\n      return func(collection, getIteratee(iteratee, 3));\n    }\n\n    /**\n     * This method is like `_.forEach` except that it iterates over elements of\n     * `collection` from right to left.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @alias eachRight\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Array|Object} Returns `collection`.\n     * @see _.forEach\n     * @example\n     *\n     * _.forEachRight([1, 2], function(value) {\n     *   console.log(value);\n     * });\n     * // => Logs `2` then `1`.\n     */\n    function forEachRight(collection, iteratee) {\n      var func = isArray(collection) ? arrayEachRight : baseEachRight;\n      return func(collection, getIteratee(iteratee, 3));\n    }\n\n    /**\n     * Creates an object composed of keys generated from the results of running\n     * each element of `collection` thru `iteratee`. The order of grouped values\n     * is determined by the order they occur in `collection`. The corresponding\n     * value of each key is an array of elements responsible for generating the\n     * key. The iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n     * @returns {Object} Returns the composed aggregate object.\n     * @example\n     *\n     * _.groupBy([6.1, 4.2, 6.3], Math.floor);\n     * // => { '4': [4.2], '6': [6.1, 6.3] }\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.groupBy(['one', 'two', 'three'], 'length');\n     * // => { '3': ['one', 'two'], '5': ['three'] }\n     */\n    var groupBy = createAggregator(function(result, value, key) {\n      if (hasOwnProperty.call(result, key)) {\n        result[key].push(value);\n      } else {\n        baseAssignValue(result, key, [value]);\n      }\n    });\n\n    /**\n     * Checks if `value` is in `collection`. If `collection` is a string, it's\n     * checked for a substring of `value`, otherwise\n     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * is used for equality comparisons. If `fromIndex` is negative, it's used as\n     * the offset from the end of `collection`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object|string} collection The collection to inspect.\n     * @param {*} value The value to search for.\n     * @param {number} [fromIndex=0] The index to search from.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\n     * @returns {boolean} Returns `true` if `value` is found, else `false`.\n     * @example\n     *\n     * _.includes([1, 2, 3], 1);\n     * // => true\n     *\n     * _.includes([1, 2, 3], 1, 2);\n     * // => false\n     *\n     * _.includes({ 'a': 1, 'b': 2 }, 1);\n     * // => true\n     *\n     * _.includes('abcd', 'bc');\n     * // => true\n     */\n    function includes(collection, value, fromIndex, guard) {\n      collection = isArrayLike(collection) ? collection : values(collection);\n      fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;\n\n      var length = collection.length;\n      if (fromIndex < 0) {\n        fromIndex = nativeMax(length + fromIndex, 0);\n      }\n      return isString(collection)\n        ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)\n        : (!!length && baseIndexOf(collection, value, fromIndex) > -1);\n    }\n\n    /**\n     * Invokes the method at `path` of each element in `collection`, returning\n     * an array of the results of each invoked method. Any additional arguments\n     * are provided to each invoked method. If `path` is a function, it's invoked\n     * for, and `this` bound to, each element in `collection`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Array|Function|string} path The path of the method to invoke or\n     *  the function invoked per iteration.\n     * @param {...*} [args] The arguments to invoke each method with.\n     * @returns {Array} Returns the array of results.\n     * @example\n     *\n     * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');\n     * // => [[1, 5, 7], [1, 2, 3]]\n     *\n     * _.invokeMap([123, 456], String.prototype.split, '');\n     * // => [['1', '2', '3'], ['4', '5', '6']]\n     */\n    var invokeMap = baseRest(function(collection, path, args) {\n      var index = -1,\n          isFunc = typeof path == 'function',\n          result = isArrayLike(collection) ? Array(collection.length) : [];\n\n      baseEach(collection, function(value) {\n        result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);\n      });\n      return result;\n    });\n\n    /**\n     * Creates an object composed of keys generated from the results of running\n     * each element of `collection` thru `iteratee`. The corresponding value of\n     * each key is the last element responsible for generating the key. The\n     * iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n     * @returns {Object} Returns the composed aggregate object.\n     * @example\n     *\n     * var array = [\n     *   { 'dir': 'left', 'code': 97 },\n     *   { 'dir': 'right', 'code': 100 }\n     * ];\n     *\n     * _.keyBy(array, function(o) {\n     *   return String.fromCharCode(o.code);\n     * });\n     * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }\n     *\n     * _.keyBy(array, 'dir');\n     * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }\n     */\n    var keyBy = createAggregator(function(result, value, key) {\n      baseAssignValue(result, key, value);\n    });\n\n    /**\n     * Creates an array of values by running each element in `collection` thru\n     * `iteratee`. The iteratee is invoked with three arguments:\n     * (value, index|key, collection).\n     *\n     * Many lodash methods are guarded to work as iteratees for methods like\n     * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.\n     *\n     * The guarded methods are:\n     * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,\n     * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,\n     * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,\n     * `template`, `trim`, `trimEnd`, `trimStart`, and `words`\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the new mapped array.\n     * @example\n     *\n     * function square(n) {\n     *   return n * n;\n     * }\n     *\n     * _.map([4, 8], square);\n     * // => [16, 64]\n     *\n     * _.map({ 'a': 4, 'b': 8 }, square);\n     * // => [16, 64] (iteration order is not guaranteed)\n     *\n     * var users = [\n     *   { 'user': 'barney' },\n     *   { 'user': 'fred' }\n     * ];\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.map(users, 'user');\n     * // => ['barney', 'fred']\n     */\n    function map(collection, iteratee) {\n      var func = isArray(collection) ? arrayMap : baseMap;\n      return func(collection, getIteratee(iteratee, 3));\n    }\n\n    /**\n     * This method is like `_.sortBy` except that it allows specifying the sort\n     * orders of the iteratees to sort by. If `orders` is unspecified, all values\n     * are sorted in ascending order. Otherwise, specify an order of \"desc\" for\n     * descending or \"asc\" for ascending sort order of corresponding values.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]\n     *  The iteratees to sort by.\n     * @param {string[]} [orders] The sort orders of `iteratees`.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\n     * @returns {Array} Returns the new sorted array.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'fred',   'age': 48 },\n     *   { 'user': 'barney', 'age': 34 },\n     *   { 'user': 'fred',   'age': 40 },\n     *   { 'user': 'barney', 'age': 36 }\n     * ];\n     *\n     * // Sort by `user` in ascending order and by `age` in descending order.\n     * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);\n     * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]\n     */\n    function orderBy(collection, iteratees, orders, guard) {\n      if (collection == null) {\n        return [];\n      }\n      if (!isArray(iteratees)) {\n        iteratees = iteratees == null ? [] : [iteratees];\n      }\n      orders = guard ? undefined : orders;\n      if (!isArray(orders)) {\n        orders = orders == null ? [] : [orders];\n      }\n      return baseOrderBy(collection, iteratees, orders);\n    }\n\n    /**\n     * Creates an array of elements split into two groups, the first of which\n     * contains elements `predicate` returns truthy for, the second of which\n     * contains elements `predicate` returns falsey for. The predicate is\n     * invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the array of grouped elements.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'age': 36, 'active': false },\n     *   { 'user': 'fred',    'age': 40, 'active': true },\n     *   { 'user': 'pebbles', 'age': 1,  'active': false }\n     * ];\n     *\n     * _.partition(users, function(o) { return o.active; });\n     * // => objects for [['fred'], ['barney', 'pebbles']]\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.partition(users, { 'age': 1, 'active': false });\n     * // => objects for [['pebbles'], ['barney', 'fred']]\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.partition(users, ['active', false]);\n     * // => objects for [['barney', 'pebbles'], ['fred']]\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.partition(users, 'active');\n     * // => objects for [['fred'], ['barney', 'pebbles']]\n     */\n    var partition = createAggregator(function(result, value, key) {\n      result[key ? 0 : 1].push(value);\n    }, function() { return [[], []]; });\n\n    /**\n     * Reduces `collection` to a value which is the accumulated result of running\n     * each element in `collection` thru `iteratee`, where each successive\n     * invocation is supplied the return value of the previous. If `accumulator`\n     * is not given, the first element of `collection` is used as the initial\n     * value. The iteratee is invoked with four arguments:\n     * (accumulator, value, index|key, collection).\n     *\n     * Many lodash methods are guarded to work as iteratees for methods like\n     * `_.reduce`, `_.reduceRight`, and `_.transform`.\n     *\n     * The guarded methods are:\n     * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,\n     * and `sortBy`\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @param {*} [accumulator] The initial value.\n     * @returns {*} Returns the accumulated value.\n     * @see _.reduceRight\n     * @example\n     *\n     * _.reduce([1, 2], function(sum, n) {\n     *   return sum + n;\n     * }, 0);\n     * // => 3\n     *\n     * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n     *   (result[value] || (result[value] = [])).push(key);\n     *   return result;\n     * }, {});\n     * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)\n     */\n    function reduce(collection, iteratee, accumulator) {\n      var func = isArray(collection) ? arrayReduce : baseReduce,\n          initAccum = arguments.length < 3;\n\n      return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);\n    }\n\n    /**\n     * This method is like `_.reduce` except that it iterates over elements of\n     * `collection` from right to left.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @param {*} [accumulator] The initial value.\n     * @returns {*} Returns the accumulated value.\n     * @see _.reduce\n     * @example\n     *\n     * var array = [[0, 1], [2, 3], [4, 5]];\n     *\n     * _.reduceRight(array, function(flattened, other) {\n     *   return flattened.concat(other);\n     * }, []);\n     * // => [4, 5, 2, 3, 0, 1]\n     */\n    function reduceRight(collection, iteratee, accumulator) {\n      var func = isArray(collection) ? arrayReduceRight : baseReduce,\n          initAccum = arguments.length < 3;\n\n      return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);\n    }\n\n    /**\n     * The opposite of `_.filter`; this method returns the elements of `collection`\n     * that `predicate` does **not** return truthy for.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the new filtered array.\n     * @see _.filter\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney', 'age': 36, 'active': false },\n     *   { 'user': 'fred',   'age': 40, 'active': true }\n     * ];\n     *\n     * _.reject(users, function(o) { return !o.active; });\n     * // => objects for ['fred']\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.reject(users, { 'age': 40, 'active': true });\n     * // => objects for ['barney']\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.reject(users, ['active', false]);\n     * // => objects for ['fred']\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.reject(users, 'active');\n     * // => objects for ['barney']\n     */\n    function reject(collection, predicate) {\n      var func = isArray(collection) ? arrayFilter : baseFilter;\n      return func(collection, negate(getIteratee(predicate, 3)));\n    }\n\n    /**\n     * Gets a random element from `collection`.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to sample.\n     * @returns {*} Returns the random element.\n     * @example\n     *\n     * _.sample([1, 2, 3, 4]);\n     * // => 2\n     */\n    function sample(collection) {\n      var func = isArray(collection) ? arraySample : baseSample;\n      return func(collection);\n    }\n\n    /**\n     * Gets `n` random elements at unique keys from `collection` up to the\n     * size of `collection`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to sample.\n     * @param {number} [n=1] The number of elements to sample.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Array} Returns the random elements.\n     * @example\n     *\n     * _.sampleSize([1, 2, 3], 2);\n     * // => [3, 1]\n     *\n     * _.sampleSize([1, 2, 3], 4);\n     * // => [2, 3, 1]\n     */\n    function sampleSize(collection, n, guard) {\n      if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {\n        n = 1;\n      } else {\n        n = toInteger(n);\n      }\n      var func = isArray(collection) ? arraySampleSize : baseSampleSize;\n      return func(collection, n);\n    }\n\n    /**\n     * Creates an array of shuffled values, using a version of the\n     * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to shuffle.\n     * @returns {Array} Returns the new shuffled array.\n     * @example\n     *\n     * _.shuffle([1, 2, 3, 4]);\n     * // => [4, 1, 3, 2]\n     */\n    function shuffle(collection) {\n      var func = isArray(collection) ? arrayShuffle : baseShuffle;\n      return func(collection);\n    }\n\n    /**\n     * Gets the size of `collection` by returning its length for array-like\n     * values or the number of own enumerable string keyed properties for objects.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object|string} collection The collection to inspect.\n     * @returns {number} Returns the collection size.\n     * @example\n     *\n     * _.size([1, 2, 3]);\n     * // => 3\n     *\n     * _.size({ 'a': 1, 'b': 2 });\n     * // => 2\n     *\n     * _.size('pebbles');\n     * // => 7\n     */\n    function size(collection) {\n      if (collection == null) {\n        return 0;\n      }\n      if (isArrayLike(collection)) {\n        return isString(collection) ? stringSize(collection) : collection.length;\n      }\n      var tag = getTag(collection);\n      if (tag == mapTag || tag == setTag) {\n        return collection.size;\n      }\n      return baseKeys(collection).length;\n    }\n\n    /**\n     * Checks if `predicate` returns truthy for **any** element of `collection`.\n     * Iteration is stopped once `predicate` returns truthy. The predicate is\n     * invoked with three arguments: (value, index|key, collection).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {boolean} Returns `true` if any element passes the predicate check,\n     *  else `false`.\n     * @example\n     *\n     * _.some([null, 0, 'yes', false], Boolean);\n     * // => true\n     *\n     * var users = [\n     *   { 'user': 'barney', 'active': true },\n     *   { 'user': 'fred',   'active': false }\n     * ];\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.some(users, { 'user': 'barney', 'active': false });\n     * // => false\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.some(users, ['active', false]);\n     * // => true\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.some(users, 'active');\n     * // => true\n     */\n    function some(collection, predicate, guard) {\n      var func = isArray(collection) ? arraySome : baseSome;\n      if (guard && isIterateeCall(collection, predicate, guard)) {\n        predicate = undefined;\n      }\n      return func(collection, getIteratee(predicate, 3));\n    }\n\n    /**\n     * Creates an array of elements, sorted in ascending order by the results of\n     * running each element in a collection thru each iteratee. This method\n     * performs a stable sort, that is, it preserves the original sort order of\n     * equal elements. The iteratees are invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {...(Function|Function[])} [iteratees=[_.identity]]\n     *  The iteratees to sort by.\n     * @returns {Array} Returns the new sorted array.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'fred',   'age': 48 },\n     *   { 'user': 'barney', 'age': 36 },\n     *   { 'user': 'fred',   'age': 30 },\n     *   { 'user': 'barney', 'age': 34 }\n     * ];\n     *\n     * _.sortBy(users, [function(o) { return o.user; }]);\n     * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]\n     *\n     * _.sortBy(users, ['user', 'age']);\n     * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]\n     */\n    var sortBy = baseRest(function(collection, iteratees) {\n      if (collection == null) {\n        return [];\n      }\n      var length = iteratees.length;\n      if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {\n        iteratees = [];\n      } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {\n        iteratees = [iteratees[0]];\n      }\n      return baseOrderBy(collection, baseFlatten(iteratees, 1), []);\n    });\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Gets the timestamp of the number of milliseconds that have elapsed since\n     * the Unix epoch (1 January 1970 00:00:00 UTC).\n     *\n     * @static\n     * @memberOf _\n     * @since 2.4.0\n     * @category Date\n     * @returns {number} Returns the timestamp.\n     * @example\n     *\n     * _.defer(function(stamp) {\n     *   console.log(_.now() - stamp);\n     * }, _.now());\n     * // => Logs the number of milliseconds it took for the deferred invocation.\n     */\n    var now = ctxNow || function() {\n      return root.Date.now();\n    };\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * The opposite of `_.before`; this method creates a function that invokes\n     * `func` once it's called `n` or more times.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {number} n The number of calls before `func` is invoked.\n     * @param {Function} func The function to restrict.\n     * @returns {Function} Returns the new restricted function.\n     * @example\n     *\n     * var saves = ['profile', 'settings'];\n     *\n     * var done = _.after(saves.length, function() {\n     *   console.log('done saving!');\n     * });\n     *\n     * _.forEach(saves, function(type) {\n     *   asyncSave({ 'type': type, 'complete': done });\n     * });\n     * // => Logs 'done saving!' after the two async saves have completed.\n     */\n    function after(n, func) {\n      if (typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      n = toInteger(n);\n      return function() {\n        if (--n < 1) {\n          return func.apply(this, arguments);\n        }\n      };\n    }\n\n    /**\n     * Creates a function that invokes `func`, with up to `n` arguments,\n     * ignoring any additional arguments.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Function\n     * @param {Function} func The function to cap arguments for.\n     * @param {number} [n=func.length] The arity cap.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Function} Returns the new capped function.\n     * @example\n     *\n     * _.map(['6', '8', '10'], _.ary(parseInt, 1));\n     * // => [6, 8, 10]\n     */\n    function ary(func, n, guard) {\n      n = guard ? undefined : n;\n      n = (func && n == null) ? func.length : n;\n      return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);\n    }\n\n    /**\n     * Creates a function that invokes `func`, with the `this` binding and arguments\n     * of the created function, while it's called less than `n` times. Subsequent\n     * calls to the created function return the result of the last `func` invocation.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Function\n     * @param {number} n The number of calls at which `func` is no longer invoked.\n     * @param {Function} func The function to restrict.\n     * @returns {Function} Returns the new restricted function.\n     * @example\n     *\n     * jQuery(element).on('click', _.before(5, addContactToList));\n     * // => Allows adding up to 4 contacts to the list.\n     */\n    function before(n, func) {\n      var result;\n      if (typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      n = toInteger(n);\n      return function() {\n        if (--n > 0) {\n          result = func.apply(this, arguments);\n        }\n        if (n <= 1) {\n          func = undefined;\n        }\n        return result;\n      };\n    }\n\n    /**\n     * Creates a function that invokes `func` with the `this` binding of `thisArg`\n     * and `partials` prepended to the arguments it receives.\n     *\n     * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,\n     * may be used as a placeholder for partially applied arguments.\n     *\n     * **Note:** Unlike native `Function#bind`, this method doesn't set the \"length\"\n     * property of bound functions.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {Function} func The function to bind.\n     * @param {*} thisArg The `this` binding of `func`.\n     * @param {...*} [partials] The arguments to be partially applied.\n     * @returns {Function} Returns the new bound function.\n     * @example\n     *\n     * function greet(greeting, punctuation) {\n     *   return greeting + ' ' + this.user + punctuation;\n     * }\n     *\n     * var object = { 'user': 'fred' };\n     *\n     * var bound = _.bind(greet, object, 'hi');\n     * bound('!');\n     * // => 'hi fred!'\n     *\n     * // Bound with placeholders.\n     * var bound = _.bind(greet, object, _, '!');\n     * bound('hi');\n     * // => 'hi fred!'\n     */\n    var bind = baseRest(function(func, thisArg, partials) {\n      var bitmask = WRAP_BIND_FLAG;\n      if (partials.length) {\n        var holders = replaceHolders(partials, getHolder(bind));\n        bitmask |= WRAP_PARTIAL_FLAG;\n      }\n      return createWrap(func, bitmask, thisArg, partials, holders);\n    });\n\n    /**\n     * Creates a function that invokes the method at `object[key]` with `partials`\n     * prepended to the arguments it receives.\n     *\n     * This method differs from `_.bind` by allowing bound functions to reference\n     * methods that may be redefined or don't yet exist. See\n     * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)\n     * for more details.\n     *\n     * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic\n     * builds, may be used as a placeholder for partially applied arguments.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.10.0\n     * @category Function\n     * @param {Object} object The object to invoke the method on.\n     * @param {string} key The key of the method.\n     * @param {...*} [partials] The arguments to be partially applied.\n     * @returns {Function} Returns the new bound function.\n     * @example\n     *\n     * var object = {\n     *   'user': 'fred',\n     *   'greet': function(greeting, punctuation) {\n     *     return greeting + ' ' + this.user + punctuation;\n     *   }\n     * };\n     *\n     * var bound = _.bindKey(object, 'greet', 'hi');\n     * bound('!');\n     * // => 'hi fred!'\n     *\n     * object.greet = function(greeting, punctuation) {\n     *   return greeting + 'ya ' + this.user + punctuation;\n     * };\n     *\n     * bound('!');\n     * // => 'hiya fred!'\n     *\n     * // Bound with placeholders.\n     * var bound = _.bindKey(object, 'greet', _, '!');\n     * bound('hi');\n     * // => 'hiya fred!'\n     */\n    var bindKey = baseRest(function(object, key, partials) {\n      var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;\n      if (partials.length) {\n        var holders = replaceHolders(partials, getHolder(bindKey));\n        bitmask |= WRAP_PARTIAL_FLAG;\n      }\n      return createWrap(key, bitmask, object, partials, holders);\n    });\n\n    /**\n     * Creates a function that accepts arguments of `func` and either invokes\n     * `func` returning its result, if at least `arity` number of arguments have\n     * been provided, or returns a function that accepts the remaining `func`\n     * arguments, and so on. The arity of `func` may be specified if `func.length`\n     * is not sufficient.\n     *\n     * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,\n     * may be used as a placeholder for provided arguments.\n     *\n     * **Note:** This method doesn't set the \"length\" property of curried functions.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Function\n     * @param {Function} func The function to curry.\n     * @param {number} [arity=func.length] The arity of `func`.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Function} Returns the new curried function.\n     * @example\n     *\n     * var abc = function(a, b, c) {\n     *   return [a, b, c];\n     * };\n     *\n     * var curried = _.curry(abc);\n     *\n     * curried(1)(2)(3);\n     * // => [1, 2, 3]\n     *\n     * curried(1, 2)(3);\n     * // => [1, 2, 3]\n     *\n     * curried(1, 2, 3);\n     * // => [1, 2, 3]\n     *\n     * // Curried with placeholders.\n     * curried(1)(_, 3)(2);\n     * // => [1, 2, 3]\n     */\n    function curry(func, arity, guard) {\n      arity = guard ? undefined : arity;\n      var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);\n      result.placeholder = curry.placeholder;\n      return result;\n    }\n\n    /**\n     * This method is like `_.curry` except that arguments are applied to `func`\n     * in the manner of `_.partialRight` instead of `_.partial`.\n     *\n     * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic\n     * builds, may be used as a placeholder for provided arguments.\n     *\n     * **Note:** This method doesn't set the \"length\" property of curried functions.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Function\n     * @param {Function} func The function to curry.\n     * @param {number} [arity=func.length] The arity of `func`.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Function} Returns the new curried function.\n     * @example\n     *\n     * var abc = function(a, b, c) {\n     *   return [a, b, c];\n     * };\n     *\n     * var curried = _.curryRight(abc);\n     *\n     * curried(3)(2)(1);\n     * // => [1, 2, 3]\n     *\n     * curried(2, 3)(1);\n     * // => [1, 2, 3]\n     *\n     * curried(1, 2, 3);\n     * // => [1, 2, 3]\n     *\n     * // Curried with placeholders.\n     * curried(3)(1, _)(2);\n     * // => [1, 2, 3]\n     */\n    function curryRight(func, arity, guard) {\n      arity = guard ? undefined : arity;\n      var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);\n      result.placeholder = curryRight.placeholder;\n      return result;\n    }\n\n    /**\n     * Creates a debounced function that delays invoking `func` until after `wait`\n     * milliseconds have elapsed since the last time the debounced function was\n     * invoked. The debounced function comes with a `cancel` method to cancel\n     * delayed `func` invocations and a `flush` method to immediately invoke them.\n     * Provide `options` to indicate whether `func` should be invoked on the\n     * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n     * with the last arguments provided to the debounced function. Subsequent\n     * calls to the debounced function return the result of the last `func`\n     * invocation.\n     *\n     * **Note:** If `leading` and `trailing` options are `true`, `func` is\n     * invoked on the trailing edge of the timeout only if the debounced function\n     * is invoked more than once during the `wait` timeout.\n     *\n     * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n     * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n     *\n     * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n     * for details over the differences between `_.debounce` and `_.throttle`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {Function} func The function to debounce.\n     * @param {number} [wait=0] The number of milliseconds to delay.\n     * @param {Object} [options={}] The options object.\n     * @param {boolean} [options.leading=false]\n     *  Specify invoking on the leading edge of the timeout.\n     * @param {number} [options.maxWait]\n     *  The maximum time `func` is allowed to be delayed before it's invoked.\n     * @param {boolean} [options.trailing=true]\n     *  Specify invoking on the trailing edge of the timeout.\n     * @returns {Function} Returns the new debounced function.\n     * @example\n     *\n     * // Avoid costly calculations while the window size is in flux.\n     * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n     *\n     * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n     * jQuery(element).on('click', _.debounce(sendMail, 300, {\n     *   'leading': true,\n     *   'trailing': false\n     * }));\n     *\n     * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n     * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n     * var source = new EventSource('/stream');\n     * jQuery(source).on('message', debounced);\n     *\n     * // Cancel the trailing debounced invocation.\n     * jQuery(window).on('popstate', debounced.cancel);\n     */\n    function debounce(func, wait, options) {\n      var lastArgs,\n          lastThis,\n          maxWait,\n          result,\n          timerId,\n          lastCallTime,\n          lastInvokeTime = 0,\n          leading = false,\n          maxing = false,\n          trailing = true;\n\n      if (typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      wait = toNumber(wait) || 0;\n      if (isObject(options)) {\n        leading = !!options.leading;\n        maxing = 'maxWait' in options;\n        maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n        trailing = 'trailing' in options ? !!options.trailing : trailing;\n      }\n\n      function invokeFunc(time) {\n        var args = lastArgs,\n            thisArg = lastThis;\n\n        lastArgs = lastThis = undefined;\n        lastInvokeTime = time;\n        result = func.apply(thisArg, args);\n        return result;\n      }\n\n      function leadingEdge(time) {\n        // Reset any `maxWait` timer.\n        lastInvokeTime = time;\n        // Start the timer for the trailing edge.\n        timerId = setTimeout(timerExpired, wait);\n        // Invoke the leading edge.\n        return leading ? invokeFunc(time) : result;\n      }\n\n      function remainingWait(time) {\n        var timeSinceLastCall = time - lastCallTime,\n            timeSinceLastInvoke = time - lastInvokeTime,\n            timeWaiting = wait - timeSinceLastCall;\n\n        return maxing\n          ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n          : timeWaiting;\n      }\n\n      function shouldInvoke(time) {\n        var timeSinceLastCall = time - lastCallTime,\n            timeSinceLastInvoke = time - lastInvokeTime;\n\n        // Either this is the first call, activity has stopped and we're at the\n        // trailing edge, the system time has gone backwards and we're treating\n        // it as the trailing edge, or we've hit the `maxWait` limit.\n        return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n          (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n      }\n\n      function timerExpired() {\n        var time = now();\n        if (shouldInvoke(time)) {\n          return trailingEdge(time);\n        }\n        // Restart the timer.\n        timerId = setTimeout(timerExpired, remainingWait(time));\n      }\n\n      function trailingEdge(time) {\n        timerId = undefined;\n\n        // Only invoke if we have `lastArgs` which means `func` has been\n        // debounced at least once.\n        if (trailing && lastArgs) {\n          return invokeFunc(time);\n        }\n        lastArgs = lastThis = undefined;\n        return result;\n      }\n\n      function cancel() {\n        if (timerId !== undefined) {\n          clearTimeout(timerId);\n        }\n        lastInvokeTime = 0;\n        lastArgs = lastCallTime = lastThis = timerId = undefined;\n      }\n\n      function flush() {\n        return timerId === undefined ? result : trailingEdge(now());\n      }\n\n      function debounced() {\n        var time = now(),\n            isInvoking = shouldInvoke(time);\n\n        lastArgs = arguments;\n        lastThis = this;\n        lastCallTime = time;\n\n        if (isInvoking) {\n          if (timerId === undefined) {\n            return leadingEdge(lastCallTime);\n          }\n          if (maxing) {\n            // Handle invocations in a tight loop.\n            clearTimeout(timerId);\n            timerId = setTimeout(timerExpired, wait);\n            return invokeFunc(lastCallTime);\n          }\n        }\n        if (timerId === undefined) {\n          timerId = setTimeout(timerExpired, wait);\n        }\n        return result;\n      }\n      debounced.cancel = cancel;\n      debounced.flush = flush;\n      return debounced;\n    }\n\n    /**\n     * Defers invoking the `func` until the current call stack has cleared. Any\n     * additional arguments are provided to `func` when it's invoked.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {Function} func The function to defer.\n     * @param {...*} [args] The arguments to invoke `func` with.\n     * @returns {number} Returns the timer id.\n     * @example\n     *\n     * _.defer(function(text) {\n     *   console.log(text);\n     * }, 'deferred');\n     * // => Logs 'deferred' after one millisecond.\n     */\n    var defer = baseRest(function(func, args) {\n      return baseDelay(func, 1, args);\n    });\n\n    /**\n     * Invokes `func` after `wait` milliseconds. Any additional arguments are\n     * provided to `func` when it's invoked.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {Function} func The function to delay.\n     * @param {number} wait The number of milliseconds to delay invocation.\n     * @param {...*} [args] The arguments to invoke `func` with.\n     * @returns {number} Returns the timer id.\n     * @example\n     *\n     * _.delay(function(text) {\n     *   console.log(text);\n     * }, 1000, 'later');\n     * // => Logs 'later' after one second.\n     */\n    var delay = baseRest(function(func, wait, args) {\n      return baseDelay(func, toNumber(wait) || 0, args);\n    });\n\n    /**\n     * Creates a function that invokes `func` with arguments reversed.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Function\n     * @param {Function} func The function to flip arguments for.\n     * @returns {Function} Returns the new flipped function.\n     * @example\n     *\n     * var flipped = _.flip(function() {\n     *   return _.toArray(arguments);\n     * });\n     *\n     * flipped('a', 'b', 'c', 'd');\n     * // => ['d', 'c', 'b', 'a']\n     */\n    function flip(func) {\n      return createWrap(func, WRAP_FLIP_FLAG);\n    }\n\n    /**\n     * Creates a function that memoizes the result of `func`. If `resolver` is\n     * provided, it determines the cache key for storing the result based on the\n     * arguments provided to the memoized function. By default, the first argument\n     * provided to the memoized function is used as the map cache key. The `func`\n     * is invoked with the `this` binding of the memoized function.\n     *\n     * **Note:** The cache is exposed as the `cache` property on the memoized\n     * function. Its creation may be customized by replacing the `_.memoize.Cache`\n     * constructor with one whose instances implement the\n     * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n     * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {Function} func The function to have its output memoized.\n     * @param {Function} [resolver] The function to resolve the cache key.\n     * @returns {Function} Returns the new memoized function.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': 2 };\n     * var other = { 'c': 3, 'd': 4 };\n     *\n     * var values = _.memoize(_.values);\n     * values(object);\n     * // => [1, 2]\n     *\n     * values(other);\n     * // => [3, 4]\n     *\n     * object.a = 2;\n     * values(object);\n     * // => [1, 2]\n     *\n     * // Modify the result cache.\n     * values.cache.set(object, ['a', 'b']);\n     * values(object);\n     * // => ['a', 'b']\n     *\n     * // Replace `_.memoize.Cache`.\n     * _.memoize.Cache = WeakMap;\n     */\n    function memoize(func, resolver) {\n      if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      var memoized = function() {\n        var args = arguments,\n            key = resolver ? resolver.apply(this, args) : args[0],\n            cache = memoized.cache;\n\n        if (cache.has(key)) {\n          return cache.get(key);\n        }\n        var result = func.apply(this, args);\n        memoized.cache = cache.set(key, result) || cache;\n        return result;\n      };\n      memoized.cache = new (memoize.Cache || MapCache);\n      return memoized;\n    }\n\n    // Expose `MapCache`.\n    memoize.Cache = MapCache;\n\n    /**\n     * Creates a function that negates the result of the predicate `func`. The\n     * `func` predicate is invoked with the `this` binding and arguments of the\n     * created function.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Function\n     * @param {Function} predicate The predicate to negate.\n     * @returns {Function} Returns the new negated function.\n     * @example\n     *\n     * function isEven(n) {\n     *   return n % 2 == 0;\n     * }\n     *\n     * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));\n     * // => [1, 3, 5]\n     */\n    function negate(predicate) {\n      if (typeof predicate != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      return function() {\n        var args = arguments;\n        switch (args.length) {\n          case 0: return !predicate.call(this);\n          case 1: return !predicate.call(this, args[0]);\n          case 2: return !predicate.call(this, args[0], args[1]);\n          case 3: return !predicate.call(this, args[0], args[1], args[2]);\n        }\n        return !predicate.apply(this, args);\n      };\n    }\n\n    /**\n     * Creates a function that is restricted to invoking `func` once. Repeat calls\n     * to the function return the value of the first invocation. The `func` is\n     * invoked with the `this` binding and arguments of the created function.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {Function} func The function to restrict.\n     * @returns {Function} Returns the new restricted function.\n     * @example\n     *\n     * var initialize = _.once(createApplication);\n     * initialize();\n     * initialize();\n     * // => `createApplication` is invoked once\n     */\n    function once(func) {\n      return before(2, func);\n    }\n\n    /**\n     * Creates a function that invokes `func` with its arguments transformed.\n     *\n     * @static\n     * @since 4.0.0\n     * @memberOf _\n     * @category Function\n     * @param {Function} func The function to wrap.\n     * @param {...(Function|Function[])} [transforms=[_.identity]]\n     *  The argument transforms.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * function doubled(n) {\n     *   return n * 2;\n     * }\n     *\n     * function square(n) {\n     *   return n * n;\n     * }\n     *\n     * var func = _.overArgs(function(x, y) {\n     *   return [x, y];\n     * }, [square, doubled]);\n     *\n     * func(9, 3);\n     * // => [81, 6]\n     *\n     * func(10, 5);\n     * // => [100, 10]\n     */\n    var overArgs = castRest(function(func, transforms) {\n      transforms = (transforms.length == 1 && isArray(transforms[0]))\n        ? arrayMap(transforms[0], baseUnary(getIteratee()))\n        : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));\n\n      var funcsLength = transforms.length;\n      return baseRest(function(args) {\n        var index = -1,\n            length = nativeMin(args.length, funcsLength);\n\n        while (++index < length) {\n          args[index] = transforms[index].call(this, args[index]);\n        }\n        return apply(func, this, args);\n      });\n    });\n\n    /**\n     * Creates a function that invokes `func` with `partials` prepended to the\n     * arguments it receives. This method is like `_.bind` except it does **not**\n     * alter the `this` binding.\n     *\n     * The `_.partial.placeholder` value, which defaults to `_` in monolithic\n     * builds, may be used as a placeholder for partially applied arguments.\n     *\n     * **Note:** This method doesn't set the \"length\" property of partially\n     * applied functions.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.2.0\n     * @category Function\n     * @param {Function} func The function to partially apply arguments to.\n     * @param {...*} [partials] The arguments to be partially applied.\n     * @returns {Function} Returns the new partially applied function.\n     * @example\n     *\n     * function greet(greeting, name) {\n     *   return greeting + ' ' + name;\n     * }\n     *\n     * var sayHelloTo = _.partial(greet, 'hello');\n     * sayHelloTo('fred');\n     * // => 'hello fred'\n     *\n     * // Partially applied with placeholders.\n     * var greetFred = _.partial(greet, _, 'fred');\n     * greetFred('hi');\n     * // => 'hi fred'\n     */\n    var partial = baseRest(function(func, partials) {\n      var holders = replaceHolders(partials, getHolder(partial));\n      return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);\n    });\n\n    /**\n     * This method is like `_.partial` except that partially applied arguments\n     * are appended to the arguments it receives.\n     *\n     * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic\n     * builds, may be used as a placeholder for partially applied arguments.\n     *\n     * **Note:** This method doesn't set the \"length\" property of partially\n     * applied functions.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.0.0\n     * @category Function\n     * @param {Function} func The function to partially apply arguments to.\n     * @param {...*} [partials] The arguments to be partially applied.\n     * @returns {Function} Returns the new partially applied function.\n     * @example\n     *\n     * function greet(greeting, name) {\n     *   return greeting + ' ' + name;\n     * }\n     *\n     * var greetFred = _.partialRight(greet, 'fred');\n     * greetFred('hi');\n     * // => 'hi fred'\n     *\n     * // Partially applied with placeholders.\n     * var sayHelloTo = _.partialRight(greet, 'hello', _);\n     * sayHelloTo('fred');\n     * // => 'hello fred'\n     */\n    var partialRight = baseRest(function(func, partials) {\n      var holders = replaceHolders(partials, getHolder(partialRight));\n      return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);\n    });\n\n    /**\n     * Creates a function that invokes `func` with arguments arranged according\n     * to the specified `indexes` where the argument value at the first index is\n     * provided as the first argument, the argument value at the second index is\n     * provided as the second argument, and so on.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Function\n     * @param {Function} func The function to rearrange arguments for.\n     * @param {...(number|number[])} indexes The arranged argument indexes.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * var rearged = _.rearg(function(a, b, c) {\n     *   return [a, b, c];\n     * }, [2, 0, 1]);\n     *\n     * rearged('b', 'c', 'a')\n     * // => ['a', 'b', 'c']\n     */\n    var rearg = flatRest(function(func, indexes) {\n      return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);\n    });\n\n    /**\n     * Creates a function that invokes `func` with the `this` binding of the\n     * created function and arguments from `start` and beyond provided as\n     * an array.\n     *\n     * **Note:** This method is based on the\n     * [rest parameter](https://mdn.io/rest_parameters).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Function\n     * @param {Function} func The function to apply a rest parameter to.\n     * @param {number} [start=func.length-1] The start position of the rest parameter.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * var say = _.rest(function(what, names) {\n     *   return what + ' ' + _.initial(names).join(', ') +\n     *     (_.size(names) > 1 ? ', & ' : '') + _.last(names);\n     * });\n     *\n     * say('hello', 'fred', 'barney', 'pebbles');\n     * // => 'hello fred, barney, & pebbles'\n     */\n    function rest(func, start) {\n      if (typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      start = start === undefined ? start : toInteger(start);\n      return baseRest(func, start);\n    }\n\n    /**\n     * Creates a function that invokes `func` with the `this` binding of the\n     * create function and an array of arguments much like\n     * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply).\n     *\n     * **Note:** This method is based on the\n     * [spread operator](https://mdn.io/spread_operator).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.2.0\n     * @category Function\n     * @param {Function} func The function to spread arguments over.\n     * @param {number} [start=0] The start position of the spread.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * var say = _.spread(function(who, what) {\n     *   return who + ' says ' + what;\n     * });\n     *\n     * say(['fred', 'hello']);\n     * // => 'fred says hello'\n     *\n     * var numbers = Promise.all([\n     *   Promise.resolve(40),\n     *   Promise.resolve(36)\n     * ]);\n     *\n     * numbers.then(_.spread(function(x, y) {\n     *   return x + y;\n     * }));\n     * // => a Promise of 76\n     */\n    function spread(func, start) {\n      if (typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      start = start == null ? 0 : nativeMax(toInteger(start), 0);\n      return baseRest(function(args) {\n        var array = args[start],\n            otherArgs = castSlice(args, 0, start);\n\n        if (array) {\n          arrayPush(otherArgs, array);\n        }\n        return apply(func, this, otherArgs);\n      });\n    }\n\n    /**\n     * Creates a throttled function that only invokes `func` at most once per\n     * every `wait` milliseconds. The throttled function comes with a `cancel`\n     * method to cancel delayed `func` invocations and a `flush` method to\n     * immediately invoke them. Provide `options` to indicate whether `func`\n     * should be invoked on the leading and/or trailing edge of the `wait`\n     * timeout. The `func` is invoked with the last arguments provided to the\n     * throttled function. Subsequent calls to the throttled function return the\n     * result of the last `func` invocation.\n     *\n     * **Note:** If `leading` and `trailing` options are `true`, `func` is\n     * invoked on the trailing edge of the timeout only if the throttled function\n     * is invoked more than once during the `wait` timeout.\n     *\n     * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n     * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n     *\n     * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n     * for details over the differences between `_.throttle` and `_.debounce`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {Function} func The function to throttle.\n     * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n     * @param {Object} [options={}] The options object.\n     * @param {boolean} [options.leading=true]\n     *  Specify invoking on the leading edge of the timeout.\n     * @param {boolean} [options.trailing=true]\n     *  Specify invoking on the trailing edge of the timeout.\n     * @returns {Function} Returns the new throttled function.\n     * @example\n     *\n     * // Avoid excessively updating the position while scrolling.\n     * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n     *\n     * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n     * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n     * jQuery(element).on('click', throttled);\n     *\n     * // Cancel the trailing throttled invocation.\n     * jQuery(window).on('popstate', throttled.cancel);\n     */\n    function throttle(func, wait, options) {\n      var leading = true,\n          trailing = true;\n\n      if (typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      if (isObject(options)) {\n        leading = 'leading' in options ? !!options.leading : leading;\n        trailing = 'trailing' in options ? !!options.trailing : trailing;\n      }\n      return debounce(func, wait, {\n        'leading': leading,\n        'maxWait': wait,\n        'trailing': trailing\n      });\n    }\n\n    /**\n     * Creates a function that accepts up to one argument, ignoring any\n     * additional arguments.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Function\n     * @param {Function} func The function to cap arguments for.\n     * @returns {Function} Returns the new capped function.\n     * @example\n     *\n     * _.map(['6', '8', '10'], _.unary(parseInt));\n     * // => [6, 8, 10]\n     */\n    function unary(func) {\n      return ary(func, 1);\n    }\n\n    /**\n     * Creates a function that provides `value` to `wrapper` as its first\n     * argument. Any additional arguments provided to the function are appended\n     * to those provided to the `wrapper`. The wrapper is invoked with the `this`\n     * binding of the created function.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {*} value The value to wrap.\n     * @param {Function} [wrapper=identity] The wrapper function.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * var p = _.wrap(_.escape, function(func, text) {\n     *   return '<p>' + func(text) + '</p>';\n     * });\n     *\n     * p('fred, barney, & pebbles');\n     * // => '<p>fred, barney, &amp; pebbles</p>'\n     */\n    function wrap(value, wrapper) {\n      return partial(castFunction(wrapper), value);\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Casts `value` as an array if it's not one.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.4.0\n     * @category Lang\n     * @param {*} value The value to inspect.\n     * @returns {Array} Returns the cast array.\n     * @example\n     *\n     * _.castArray(1);\n     * // => [1]\n     *\n     * _.castArray({ 'a': 1 });\n     * // => [{ 'a': 1 }]\n     *\n     * _.castArray('abc');\n     * // => ['abc']\n     *\n     * _.castArray(null);\n     * // => [null]\n     *\n     * _.castArray(undefined);\n     * // => [undefined]\n     *\n     * _.castArray();\n     * // => []\n     *\n     * var array = [1, 2, 3];\n     * console.log(_.castArray(array) === array);\n     * // => true\n     */\n    function castArray() {\n      if (!arguments.length) {\n        return [];\n      }\n      var value = arguments[0];\n      return isArray(value) ? value : [value];\n    }\n\n    /**\n     * Creates a shallow clone of `value`.\n     *\n     * **Note:** This method is loosely based on the\n     * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)\n     * and supports cloning arrays, array buffers, booleans, date objects, maps,\n     * numbers, `Object` objects, regexes, sets, strings, symbols, and typed\n     * arrays. The own enumerable properties of `arguments` objects are cloned\n     * as plain objects. An empty object is returned for uncloneable values such\n     * as error objects, functions, DOM nodes, and WeakMaps.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to clone.\n     * @returns {*} Returns the cloned value.\n     * @see _.cloneDeep\n     * @example\n     *\n     * var objects = [{ 'a': 1 }, { 'b': 2 }];\n     *\n     * var shallow = _.clone(objects);\n     * console.log(shallow[0] === objects[0]);\n     * // => true\n     */\n    function clone(value) {\n      return baseClone(value, CLONE_SYMBOLS_FLAG);\n    }\n\n    /**\n     * This method is like `_.clone` except that it accepts `customizer` which\n     * is invoked to produce the cloned value. If `customizer` returns `undefined`,\n     * cloning is handled by the method instead. The `customizer` is invoked with\n     * up to four arguments; (value [, index|key, object, stack]).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to clone.\n     * @param {Function} [customizer] The function to customize cloning.\n     * @returns {*} Returns the cloned value.\n     * @see _.cloneDeepWith\n     * @example\n     *\n     * function customizer(value) {\n     *   if (_.isElement(value)) {\n     *     return value.cloneNode(false);\n     *   }\n     * }\n     *\n     * var el = _.cloneWith(document.body, customizer);\n     *\n     * console.log(el === document.body);\n     * // => false\n     * console.log(el.nodeName);\n     * // => 'BODY'\n     * console.log(el.childNodes.length);\n     * // => 0\n     */\n    function cloneWith(value, customizer) {\n      customizer = typeof customizer == 'function' ? customizer : undefined;\n      return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);\n    }\n\n    /**\n     * This method is like `_.clone` except that it recursively clones `value`.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.0.0\n     * @category Lang\n     * @param {*} value The value to recursively clone.\n     * @returns {*} Returns the deep cloned value.\n     * @see _.clone\n     * @example\n     *\n     * var objects = [{ 'a': 1 }, { 'b': 2 }];\n     *\n     * var deep = _.cloneDeep(objects);\n     * console.log(deep[0] === objects[0]);\n     * // => false\n     */\n    function cloneDeep(value) {\n      return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n    }\n\n    /**\n     * This method is like `_.cloneWith` except that it recursively clones `value`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to recursively clone.\n     * @param {Function} [customizer] The function to customize cloning.\n     * @returns {*} Returns the deep cloned value.\n     * @see _.cloneWith\n     * @example\n     *\n     * function customizer(value) {\n     *   if (_.isElement(value)) {\n     *     return value.cloneNode(true);\n     *   }\n     * }\n     *\n     * var el = _.cloneDeepWith(document.body, customizer);\n     *\n     * console.log(el === document.body);\n     * // => false\n     * console.log(el.nodeName);\n     * // => 'BODY'\n     * console.log(el.childNodes.length);\n     * // => 20\n     */\n    function cloneDeepWith(value, customizer) {\n      customizer = typeof customizer == 'function' ? customizer : undefined;\n      return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);\n    }\n\n    /**\n     * Checks if `object` conforms to `source` by invoking the predicate\n     * properties of `source` with the corresponding property values of `object`.\n     *\n     * **Note:** This method is equivalent to `_.conforms` when `source` is\n     * partially applied.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.14.0\n     * @category Lang\n     * @param {Object} object The object to inspect.\n     * @param {Object} source The object of property predicates to conform to.\n     * @returns {boolean} Returns `true` if `object` conforms, else `false`.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': 2 };\n     *\n     * _.conformsTo(object, { 'b': function(n) { return n > 1; } });\n     * // => true\n     *\n     * _.conformsTo(object, { 'b': function(n) { return n > 2; } });\n     * // => false\n     */\n    function conformsTo(object, source) {\n      return source == null || baseConformsTo(object, source, keys(source));\n    }\n\n    /**\n     * Performs a\n     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * comparison between two values to determine if they are equivalent.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n     * @example\n     *\n     * var object = { 'a': 1 };\n     * var other = { 'a': 1 };\n     *\n     * _.eq(object, object);\n     * // => true\n     *\n     * _.eq(object, other);\n     * // => false\n     *\n     * _.eq('a', 'a');\n     * // => true\n     *\n     * _.eq('a', Object('a'));\n     * // => false\n     *\n     * _.eq(NaN, NaN);\n     * // => true\n     */\n    function eq(value, other) {\n      return value === other || (value !== value && other !== other);\n    }\n\n    /**\n     * Checks if `value` is greater than `other`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.9.0\n     * @category Lang\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if `value` is greater than `other`,\n     *  else `false`.\n     * @see _.lt\n     * @example\n     *\n     * _.gt(3, 1);\n     * // => true\n     *\n     * _.gt(3, 3);\n     * // => false\n     *\n     * _.gt(1, 3);\n     * // => false\n     */\n    var gt = createRelationalOperation(baseGt);\n\n    /**\n     * Checks if `value` is greater than or equal to `other`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.9.0\n     * @category Lang\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if `value` is greater than or equal to\n     *  `other`, else `false`.\n     * @see _.lte\n     * @example\n     *\n     * _.gte(3, 1);\n     * // => true\n     *\n     * _.gte(3, 3);\n     * // => true\n     *\n     * _.gte(1, 3);\n     * // => false\n     */\n    var gte = createRelationalOperation(function(value, other) {\n      return value >= other;\n    });\n\n    /**\n     * Checks if `value` is likely an `arguments` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n     *  else `false`.\n     * @example\n     *\n     * _.isArguments(function() { return arguments; }());\n     * // => true\n     *\n     * _.isArguments([1, 2, 3]);\n     * // => false\n     */\n    var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n      return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n        !propertyIsEnumerable.call(value, 'callee');\n    };\n\n    /**\n     * Checks if `value` is classified as an `Array` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n     * @example\n     *\n     * _.isArray([1, 2, 3]);\n     * // => true\n     *\n     * _.isArray(document.body.children);\n     * // => false\n     *\n     * _.isArray('abc');\n     * // => false\n     *\n     * _.isArray(_.noop);\n     * // => false\n     */\n    var isArray = Array.isArray;\n\n    /**\n     * Checks if `value` is classified as an `ArrayBuffer` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.3.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.\n     * @example\n     *\n     * _.isArrayBuffer(new ArrayBuffer(2));\n     * // => true\n     *\n     * _.isArrayBuffer(new Array(2));\n     * // => false\n     */\n    var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;\n\n    /**\n     * Checks if `value` is array-like. A value is considered array-like if it's\n     * not a function and has a `value.length` that's an integer greater than or\n     * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n     * @example\n     *\n     * _.isArrayLike([1, 2, 3]);\n     * // => true\n     *\n     * _.isArrayLike(document.body.children);\n     * // => true\n     *\n     * _.isArrayLike('abc');\n     * // => true\n     *\n     * _.isArrayLike(_.noop);\n     * // => false\n     */\n    function isArrayLike(value) {\n      return value != null && isLength(value.length) && !isFunction(value);\n    }\n\n    /**\n     * This method is like `_.isArrayLike` except that it also checks if `value`\n     * is an object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an array-like object,\n     *  else `false`.\n     * @example\n     *\n     * _.isArrayLikeObject([1, 2, 3]);\n     * // => true\n     *\n     * _.isArrayLikeObject(document.body.children);\n     * // => true\n     *\n     * _.isArrayLikeObject('abc');\n     * // => false\n     *\n     * _.isArrayLikeObject(_.noop);\n     * // => false\n     */\n    function isArrayLikeObject(value) {\n      return isObjectLike(value) && isArrayLike(value);\n    }\n\n    /**\n     * Checks if `value` is classified as a boolean primitive or object.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.\n     * @example\n     *\n     * _.isBoolean(false);\n     * // => true\n     *\n     * _.isBoolean(null);\n     * // => false\n     */\n    function isBoolean(value) {\n      return value === true || value === false ||\n        (isObjectLike(value) && baseGetTag(value) == boolTag);\n    }\n\n    /**\n     * Checks if `value` is a buffer.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.3.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n     * @example\n     *\n     * _.isBuffer(new Buffer(2));\n     * // => true\n     *\n     * _.isBuffer(new Uint8Array(2));\n     * // => false\n     */\n    var isBuffer = nativeIsBuffer || stubFalse;\n\n    /**\n     * Checks if `value` is classified as a `Date` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\n     * @example\n     *\n     * _.isDate(new Date);\n     * // => true\n     *\n     * _.isDate('Mon April 23 2012');\n     * // => false\n     */\n    var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;\n\n    /**\n     * Checks if `value` is likely a DOM element.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.\n     * @example\n     *\n     * _.isElement(document.body);\n     * // => true\n     *\n     * _.isElement('<body>');\n     * // => false\n     */\n    function isElement(value) {\n      return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);\n    }\n\n    /**\n     * Checks if `value` is an empty object, collection, map, or set.\n     *\n     * Objects are considered empty if they have no own enumerable string keyed\n     * properties.\n     *\n     * Array-like values such as `arguments` objects, arrays, buffers, strings, or\n     * jQuery-like collections are considered empty if they have a `length` of `0`.\n     * Similarly, maps and sets are considered empty if they have a `size` of `0`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is empty, else `false`.\n     * @example\n     *\n     * _.isEmpty(null);\n     * // => true\n     *\n     * _.isEmpty(true);\n     * // => true\n     *\n     * _.isEmpty(1);\n     * // => true\n     *\n     * _.isEmpty([1, 2, 3]);\n     * // => false\n     *\n     * _.isEmpty({ 'a': 1 });\n     * // => false\n     */\n    function isEmpty(value) {\n      if (value == null) {\n        return true;\n      }\n      if (isArrayLike(value) &&\n          (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||\n            isBuffer(value) || isTypedArray(value) || isArguments(value))) {\n        return !value.length;\n      }\n      var tag = getTag(value);\n      if (tag == mapTag || tag == setTag) {\n        return !value.size;\n      }\n      if (isPrototype(value)) {\n        return !baseKeys(value).length;\n      }\n      for (var key in value) {\n        if (hasOwnProperty.call(value, key)) {\n          return false;\n        }\n      }\n      return true;\n    }\n\n    /**\n     * Performs a deep comparison between two values to determine if they are\n     * equivalent.\n     *\n     * **Note:** This method supports comparing arrays, array buffers, booleans,\n     * date objects, error objects, maps, numbers, `Object` objects, regexes,\n     * sets, strings, symbols, and typed arrays. `Object` objects are compared\n     * by their own, not inherited, enumerable properties. Functions and DOM\n     * nodes are compared by strict equality, i.e. `===`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n     * @example\n     *\n     * var object = { 'a': 1 };\n     * var other = { 'a': 1 };\n     *\n     * _.isEqual(object, other);\n     * // => true\n     *\n     * object === other;\n     * // => false\n     */\n    function isEqual(value, other) {\n      return baseIsEqual(value, other);\n    }\n\n    /**\n     * This method is like `_.isEqual` except that it accepts `customizer` which\n     * is invoked to compare values. If `customizer` returns `undefined`, comparisons\n     * are handled by the method instead. The `customizer` is invoked with up to\n     * six arguments: (objValue, othValue [, index|key, object, other, stack]).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @param {Function} [customizer] The function to customize comparisons.\n     * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n     * @example\n     *\n     * function isGreeting(value) {\n     *   return /^h(?:i|ello)$/.test(value);\n     * }\n     *\n     * function customizer(objValue, othValue) {\n     *   if (isGreeting(objValue) && isGreeting(othValue)) {\n     *     return true;\n     *   }\n     * }\n     *\n     * var array = ['hello', 'goodbye'];\n     * var other = ['hi', 'goodbye'];\n     *\n     * _.isEqualWith(array, other, customizer);\n     * // => true\n     */\n    function isEqualWith(value, other, customizer) {\n      customizer = typeof customizer == 'function' ? customizer : undefined;\n      var result = customizer ? customizer(value, other) : undefined;\n      return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;\n    }\n\n    /**\n     * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,\n     * `SyntaxError`, `TypeError`, or `URIError` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an error object, else `false`.\n     * @example\n     *\n     * _.isError(new Error);\n     * // => true\n     *\n     * _.isError(Error);\n     * // => false\n     */\n    function isError(value) {\n      if (!isObjectLike(value)) {\n        return false;\n      }\n      var tag = baseGetTag(value);\n      return tag == errorTag || tag == domExcTag ||\n        (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));\n    }\n\n    /**\n     * Checks if `value` is a finite primitive number.\n     *\n     * **Note:** This method is based on\n     * [`Number.isFinite`](https://mdn.io/Number/isFinite).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.\n     * @example\n     *\n     * _.isFinite(3);\n     * // => true\n     *\n     * _.isFinite(Number.MIN_VALUE);\n     * // => true\n     *\n     * _.isFinite(Infinity);\n     * // => false\n     *\n     * _.isFinite('3');\n     * // => false\n     */\n    function isFinite(value) {\n      return typeof value == 'number' && nativeIsFinite(value);\n    }\n\n    /**\n     * Checks if `value` is classified as a `Function` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n     * @example\n     *\n     * _.isFunction(_);\n     * // => true\n     *\n     * _.isFunction(/abc/);\n     * // => false\n     */\n    function isFunction(value) {\n      if (!isObject(value)) {\n        return false;\n      }\n      // The use of `Object#toString` avoids issues with the `typeof` operator\n      // in Safari 9 which returns 'object' for typed arrays and other constructors.\n      var tag = baseGetTag(value);\n      return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n    }\n\n    /**\n     * Checks if `value` is an integer.\n     *\n     * **Note:** This method is based on\n     * [`Number.isInteger`](https://mdn.io/Number/isInteger).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an integer, else `false`.\n     * @example\n     *\n     * _.isInteger(3);\n     * // => true\n     *\n     * _.isInteger(Number.MIN_VALUE);\n     * // => false\n     *\n     * _.isInteger(Infinity);\n     * // => false\n     *\n     * _.isInteger('3');\n     * // => false\n     */\n    function isInteger(value) {\n      return typeof value == 'number' && value == toInteger(value);\n    }\n\n    /**\n     * Checks if `value` is a valid array-like length.\n     *\n     * **Note:** This method is loosely based on\n     * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n     * @example\n     *\n     * _.isLength(3);\n     * // => true\n     *\n     * _.isLength(Number.MIN_VALUE);\n     * // => false\n     *\n     * _.isLength(Infinity);\n     * // => false\n     *\n     * _.isLength('3');\n     * // => false\n     */\n    function isLength(value) {\n      return typeof value == 'number' &&\n        value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n    }\n\n    /**\n     * Checks if `value` is the\n     * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n     * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n     * @example\n     *\n     * _.isObject({});\n     * // => true\n     *\n     * _.isObject([1, 2, 3]);\n     * // => true\n     *\n     * _.isObject(_.noop);\n     * // => true\n     *\n     * _.isObject(null);\n     * // => false\n     */\n    function isObject(value) {\n      var type = typeof value;\n      return value != null && (type == 'object' || type == 'function');\n    }\n\n    /**\n     * Checks if `value` is object-like. A value is object-like if it's not `null`\n     * and has a `typeof` result of \"object\".\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n     * @example\n     *\n     * _.isObjectLike({});\n     * // => true\n     *\n     * _.isObjectLike([1, 2, 3]);\n     * // => true\n     *\n     * _.isObjectLike(_.noop);\n     * // => false\n     *\n     * _.isObjectLike(null);\n     * // => false\n     */\n    function isObjectLike(value) {\n      return value != null && typeof value == 'object';\n    }\n\n    /**\n     * Checks if `value` is classified as a `Map` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.3.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n     * @example\n     *\n     * _.isMap(new Map);\n     * // => true\n     *\n     * _.isMap(new WeakMap);\n     * // => false\n     */\n    var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\n    /**\n     * Performs a partial deep comparison between `object` and `source` to\n     * determine if `object` contains equivalent property values.\n     *\n     * **Note:** This method is equivalent to `_.matches` when `source` is\n     * partially applied.\n     *\n     * Partial comparisons will match empty array and empty object `source`\n     * values against any array or object value, respectively. See `_.isEqual`\n     * for a list of supported value comparisons.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Lang\n     * @param {Object} object The object to inspect.\n     * @param {Object} source The object of property values to match.\n     * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': 2 };\n     *\n     * _.isMatch(object, { 'b': 2 });\n     * // => true\n     *\n     * _.isMatch(object, { 'b': 1 });\n     * // => false\n     */\n    function isMatch(object, source) {\n      return object === source || baseIsMatch(object, source, getMatchData(source));\n    }\n\n    /**\n     * This method is like `_.isMatch` except that it accepts `customizer` which\n     * is invoked to compare values. If `customizer` returns `undefined`, comparisons\n     * are handled by the method instead. The `customizer` is invoked with five\n     * arguments: (objValue, srcValue, index|key, object, source).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {Object} object The object to inspect.\n     * @param {Object} source The object of property values to match.\n     * @param {Function} [customizer] The function to customize comparisons.\n     * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n     * @example\n     *\n     * function isGreeting(value) {\n     *   return /^h(?:i|ello)$/.test(value);\n     * }\n     *\n     * function customizer(objValue, srcValue) {\n     *   if (isGreeting(objValue) && isGreeting(srcValue)) {\n     *     return true;\n     *   }\n     * }\n     *\n     * var object = { 'greeting': 'hello' };\n     * var source = { 'greeting': 'hi' };\n     *\n     * _.isMatchWith(object, source, customizer);\n     * // => true\n     */\n    function isMatchWith(object, source, customizer) {\n      customizer = typeof customizer == 'function' ? customizer : undefined;\n      return baseIsMatch(object, source, getMatchData(source), customizer);\n    }\n\n    /**\n     * Checks if `value` is `NaN`.\n     *\n     * **Note:** This method is based on\n     * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as\n     * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for\n     * `undefined` and other non-number values.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n     * @example\n     *\n     * _.isNaN(NaN);\n     * // => true\n     *\n     * _.isNaN(new Number(NaN));\n     * // => true\n     *\n     * isNaN(undefined);\n     * // => true\n     *\n     * _.isNaN(undefined);\n     * // => false\n     */\n    function isNaN(value) {\n      // An `NaN` primitive is the only value that is not equal to itself.\n      // Perform the `toStringTag` check first to avoid errors with some\n      // ActiveX objects in IE.\n      return isNumber(value) && value != +value;\n    }\n\n    /**\n     * Checks if `value` is a pristine native function.\n     *\n     * **Note:** This method can't reliably detect native functions in the presence\n     * of the core-js package because core-js circumvents this kind of detection.\n     * Despite multiple requests, the core-js maintainer has made it clear: any\n     * attempt to fix the detection will be obstructed. As a result, we're left\n     * with little choice but to throw an error. Unfortunately, this also affects\n     * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),\n     * which rely on core-js.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a native function,\n     *  else `false`.\n     * @example\n     *\n     * _.isNative(Array.prototype.push);\n     * // => true\n     *\n     * _.isNative(_);\n     * // => false\n     */\n    function isNative(value) {\n      if (isMaskable(value)) {\n        throw new Error(CORE_ERROR_TEXT);\n      }\n      return baseIsNative(value);\n    }\n\n    /**\n     * Checks if `value` is `null`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is `null`, else `false`.\n     * @example\n     *\n     * _.isNull(null);\n     * // => true\n     *\n     * _.isNull(void 0);\n     * // => false\n     */\n    function isNull(value) {\n      return value === null;\n    }\n\n    /**\n     * Checks if `value` is `null` or `undefined`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is nullish, else `false`.\n     * @example\n     *\n     * _.isNil(null);\n     * // => true\n     *\n     * _.isNil(void 0);\n     * // => true\n     *\n     * _.isNil(NaN);\n     * // => false\n     */\n    function isNil(value) {\n      return value == null;\n    }\n\n    /**\n     * Checks if `value` is classified as a `Number` primitive or object.\n     *\n     * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are\n     * classified as numbers, use the `_.isFinite` method.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a number, else `false`.\n     * @example\n     *\n     * _.isNumber(3);\n     * // => true\n     *\n     * _.isNumber(Number.MIN_VALUE);\n     * // => true\n     *\n     * _.isNumber(Infinity);\n     * // => true\n     *\n     * _.isNumber('3');\n     * // => false\n     */\n    function isNumber(value) {\n      return typeof value == 'number' ||\n        (isObjectLike(value) && baseGetTag(value) == numberTag);\n    }\n\n    /**\n     * Checks if `value` is a plain object, that is, an object created by the\n     * `Object` constructor or one with a `[[Prototype]]` of `null`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.8.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     * }\n     *\n     * _.isPlainObject(new Foo);\n     * // => false\n     *\n     * _.isPlainObject([1, 2, 3]);\n     * // => false\n     *\n     * _.isPlainObject({ 'x': 0, 'y': 0 });\n     * // => true\n     *\n     * _.isPlainObject(Object.create(null));\n     * // => true\n     */\n    function isPlainObject(value) {\n      if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n        return false;\n      }\n      var proto = getPrototype(value);\n      if (proto === null) {\n        return true;\n      }\n      var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n      return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n        funcToString.call(Ctor) == objectCtorString;\n    }\n\n    /**\n     * Checks if `value` is classified as a `RegExp` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\n     * @example\n     *\n     * _.isRegExp(/abc/);\n     * // => true\n     *\n     * _.isRegExp('/abc/');\n     * // => false\n     */\n    var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;\n\n    /**\n     * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754\n     * double precision number which isn't the result of a rounded unsafe integer.\n     *\n     * **Note:** This method is based on\n     * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.\n     * @example\n     *\n     * _.isSafeInteger(3);\n     * // => true\n     *\n     * _.isSafeInteger(Number.MIN_VALUE);\n     * // => false\n     *\n     * _.isSafeInteger(Infinity);\n     * // => false\n     *\n     * _.isSafeInteger('3');\n     * // => false\n     */\n    function isSafeInteger(value) {\n      return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;\n    }\n\n    /**\n     * Checks if `value` is classified as a `Set` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.3.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n     * @example\n     *\n     * _.isSet(new Set);\n     * // => true\n     *\n     * _.isSet(new WeakSet);\n     * // => false\n     */\n    var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\n    /**\n     * Checks if `value` is classified as a `String` primitive or object.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a string, else `false`.\n     * @example\n     *\n     * _.isString('abc');\n     * // => true\n     *\n     * _.isString(1);\n     * // => false\n     */\n    function isString(value) {\n      return typeof value == 'string' ||\n        (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);\n    }\n\n    /**\n     * Checks if `value` is classified as a `Symbol` primitive or object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n     * @example\n     *\n     * _.isSymbol(Symbol.iterator);\n     * // => true\n     *\n     * _.isSymbol('abc');\n     * // => false\n     */\n    function isSymbol(value) {\n      return typeof value == 'symbol' ||\n        (isObjectLike(value) && baseGetTag(value) == symbolTag);\n    }\n\n    /**\n     * Checks if `value` is classified as a typed array.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n     * @example\n     *\n     * _.isTypedArray(new Uint8Array);\n     * // => true\n     *\n     * _.isTypedArray([]);\n     * // => false\n     */\n    var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\n    /**\n     * Checks if `value` is `undefined`.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.\n     * @example\n     *\n     * _.isUndefined(void 0);\n     * // => true\n     *\n     * _.isUndefined(null);\n     * // => false\n     */\n    function isUndefined(value) {\n      return value === undefined;\n    }\n\n    /**\n     * Checks if `value` is classified as a `WeakMap` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.3.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.\n     * @example\n     *\n     * _.isWeakMap(new WeakMap);\n     * // => true\n     *\n     * _.isWeakMap(new Map);\n     * // => false\n     */\n    function isWeakMap(value) {\n      return isObjectLike(value) && getTag(value) == weakMapTag;\n    }\n\n    /**\n     * Checks if `value` is classified as a `WeakSet` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.3.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a weak set, else `false`.\n     * @example\n     *\n     * _.isWeakSet(new WeakSet);\n     * // => true\n     *\n     * _.isWeakSet(new Set);\n     * // => false\n     */\n    function isWeakSet(value) {\n      return isObjectLike(value) && baseGetTag(value) == weakSetTag;\n    }\n\n    /**\n     * Checks if `value` is less than `other`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.9.0\n     * @category Lang\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if `value` is less than `other`,\n     *  else `false`.\n     * @see _.gt\n     * @example\n     *\n     * _.lt(1, 3);\n     * // => true\n     *\n     * _.lt(3, 3);\n     * // => false\n     *\n     * _.lt(3, 1);\n     * // => false\n     */\n    var lt = createRelationalOperation(baseLt);\n\n    /**\n     * Checks if `value` is less than or equal to `other`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.9.0\n     * @category Lang\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if `value` is less than or equal to\n     *  `other`, else `false`.\n     * @see _.gte\n     * @example\n     *\n     * _.lte(1, 3);\n     * // => true\n     *\n     * _.lte(3, 3);\n     * // => true\n     *\n     * _.lte(3, 1);\n     * // => false\n     */\n    var lte = createRelationalOperation(function(value, other) {\n      return value <= other;\n    });\n\n    /**\n     * Converts `value` to an array.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Lang\n     * @param {*} value The value to convert.\n     * @returns {Array} Returns the converted array.\n     * @example\n     *\n     * _.toArray({ 'a': 1, 'b': 2 });\n     * // => [1, 2]\n     *\n     * _.toArray('abc');\n     * // => ['a', 'b', 'c']\n     *\n     * _.toArray(1);\n     * // => []\n     *\n     * _.toArray(null);\n     * // => []\n     */\n    function toArray(value) {\n      if (!value) {\n        return [];\n      }\n      if (isArrayLike(value)) {\n        return isString(value) ? stringToArray(value) : copyArray(value);\n      }\n      if (symIterator && value[symIterator]) {\n        return iteratorToArray(value[symIterator]());\n      }\n      var tag = getTag(value),\n          func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);\n\n      return func(value);\n    }\n\n    /**\n     * Converts `value` to a finite number.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.12.0\n     * @category Lang\n     * @param {*} value The value to convert.\n     * @returns {number} Returns the converted number.\n     * @example\n     *\n     * _.toFinite(3.2);\n     * // => 3.2\n     *\n     * _.toFinite(Number.MIN_VALUE);\n     * // => 5e-324\n     *\n     * _.toFinite(Infinity);\n     * // => 1.7976931348623157e+308\n     *\n     * _.toFinite('3.2');\n     * // => 3.2\n     */\n    function toFinite(value) {\n      if (!value) {\n        return value === 0 ? value : 0;\n      }\n      value = toNumber(value);\n      if (value === INFINITY || value === -INFINITY) {\n        var sign = (value < 0 ? -1 : 1);\n        return sign * MAX_INTEGER;\n      }\n      return value === value ? value : 0;\n    }\n\n    /**\n     * Converts `value` to an integer.\n     *\n     * **Note:** This method is loosely based on\n     * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to convert.\n     * @returns {number} Returns the converted integer.\n     * @example\n     *\n     * _.toInteger(3.2);\n     * // => 3\n     *\n     * _.toInteger(Number.MIN_VALUE);\n     * // => 0\n     *\n     * _.toInteger(Infinity);\n     * // => 1.7976931348623157e+308\n     *\n     * _.toInteger('3.2');\n     * // => 3\n     */\n    function toInteger(value) {\n      var result = toFinite(value),\n          remainder = result % 1;\n\n      return result === result ? (remainder ? result - remainder : result) : 0;\n    }\n\n    /**\n     * Converts `value` to an integer suitable for use as the length of an\n     * array-like object.\n     *\n     * **Note:** This method is based on\n     * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to convert.\n     * @returns {number} Returns the converted integer.\n     * @example\n     *\n     * _.toLength(3.2);\n     * // => 3\n     *\n     * _.toLength(Number.MIN_VALUE);\n     * // => 0\n     *\n     * _.toLength(Infinity);\n     * // => 4294967295\n     *\n     * _.toLength('3.2');\n     * // => 3\n     */\n    function toLength(value) {\n      return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;\n    }\n\n    /**\n     * Converts `value` to a number.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to process.\n     * @returns {number} Returns the number.\n     * @example\n     *\n     * _.toNumber(3.2);\n     * // => 3.2\n     *\n     * _.toNumber(Number.MIN_VALUE);\n     * // => 5e-324\n     *\n     * _.toNumber(Infinity);\n     * // => Infinity\n     *\n     * _.toNumber('3.2');\n     * // => 3.2\n     */\n    function toNumber(value) {\n      if (typeof value == 'number') {\n        return value;\n      }\n      if (isSymbol(value)) {\n        return NAN;\n      }\n      if (isObject(value)) {\n        var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n        value = isObject(other) ? (other + '') : other;\n      }\n      if (typeof value != 'string') {\n        return value === 0 ? value : +value;\n      }\n      value = baseTrim(value);\n      var isBinary = reIsBinary.test(value);\n      return (isBinary || reIsOctal.test(value))\n        ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n        : (reIsBadHex.test(value) ? NAN : +value);\n    }\n\n    /**\n     * Converts `value` to a plain object flattening inherited enumerable string\n     * keyed properties of `value` to own properties of the plain object.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Lang\n     * @param {*} value The value to convert.\n     * @returns {Object} Returns the converted plain object.\n     * @example\n     *\n     * function Foo() {\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.assign({ 'a': 1 }, new Foo);\n     * // => { 'a': 1, 'b': 2 }\n     *\n     * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n     * // => { 'a': 1, 'b': 2, 'c': 3 }\n     */\n    function toPlainObject(value) {\n      return copyObject(value, keysIn(value));\n    }\n\n    /**\n     * Converts `value` to a safe integer. A safe integer can be compared and\n     * represented correctly.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to convert.\n     * @returns {number} Returns the converted integer.\n     * @example\n     *\n     * _.toSafeInteger(3.2);\n     * // => 3\n     *\n     * _.toSafeInteger(Number.MIN_VALUE);\n     * // => 0\n     *\n     * _.toSafeInteger(Infinity);\n     * // => 9007199254740991\n     *\n     * _.toSafeInteger('3.2');\n     * // => 3\n     */\n    function toSafeInteger(value) {\n      return value\n        ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)\n        : (value === 0 ? value : 0);\n    }\n\n    /**\n     * Converts `value` to a string. An empty string is returned for `null`\n     * and `undefined` values. The sign of `-0` is preserved.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to convert.\n     * @returns {string} Returns the converted string.\n     * @example\n     *\n     * _.toString(null);\n     * // => ''\n     *\n     * _.toString(-0);\n     * // => '-0'\n     *\n     * _.toString([1, 2, 3]);\n     * // => '1,2,3'\n     */\n    function toString(value) {\n      return value == null ? '' : baseToString(value);\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Assigns own enumerable string keyed properties of source objects to the\n     * destination object. Source objects are applied from left to right.\n     * Subsequent sources overwrite property assignments of previous sources.\n     *\n     * **Note:** This method mutates `object` and is loosely based on\n     * [`Object.assign`](https://mdn.io/Object/assign).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.10.0\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} [sources] The source objects.\n     * @returns {Object} Returns `object`.\n     * @see _.assignIn\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     * }\n     *\n     * function Bar() {\n     *   this.c = 3;\n     * }\n     *\n     * Foo.prototype.b = 2;\n     * Bar.prototype.d = 4;\n     *\n     * _.assign({ 'a': 0 }, new Foo, new Bar);\n     * // => { 'a': 1, 'c': 3 }\n     */\n    var assign = createAssigner(function(object, source) {\n      if (isPrototype(source) || isArrayLike(source)) {\n        copyObject(source, keys(source), object);\n        return;\n      }\n      for (var key in source) {\n        if (hasOwnProperty.call(source, key)) {\n          assignValue(object, key, source[key]);\n        }\n      }\n    });\n\n    /**\n     * This method is like `_.assign` except that it iterates over own and\n     * inherited source properties.\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @alias extend\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} [sources] The source objects.\n     * @returns {Object} Returns `object`.\n     * @see _.assign\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     * }\n     *\n     * function Bar() {\n     *   this.c = 3;\n     * }\n     *\n     * Foo.prototype.b = 2;\n     * Bar.prototype.d = 4;\n     *\n     * _.assignIn({ 'a': 0 }, new Foo, new Bar);\n     * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }\n     */\n    var assignIn = createAssigner(function(object, source) {\n      copyObject(source, keysIn(source), object);\n    });\n\n    /**\n     * This method is like `_.assignIn` except that it accepts `customizer`\n     * which is invoked to produce the assigned values. If `customizer` returns\n     * `undefined`, assignment is handled by the method instead. The `customizer`\n     * is invoked with five arguments: (objValue, srcValue, key, object, source).\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @alias extendWith\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} sources The source objects.\n     * @param {Function} [customizer] The function to customize assigned values.\n     * @returns {Object} Returns `object`.\n     * @see _.assignWith\n     * @example\n     *\n     * function customizer(objValue, srcValue) {\n     *   return _.isUndefined(objValue) ? srcValue : objValue;\n     * }\n     *\n     * var defaults = _.partialRight(_.assignInWith, customizer);\n     *\n     * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n     * // => { 'a': 1, 'b': 2 }\n     */\n    var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {\n      copyObject(source, keysIn(source), object, customizer);\n    });\n\n    /**\n     * This method is like `_.assign` except that it accepts `customizer`\n     * which is invoked to produce the assigned values. If `customizer` returns\n     * `undefined`, assignment is handled by the method instead. The `customizer`\n     * is invoked with five arguments: (objValue, srcValue, key, object, source).\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} sources The source objects.\n     * @param {Function} [customizer] The function to customize assigned values.\n     * @returns {Object} Returns `object`.\n     * @see _.assignInWith\n     * @example\n     *\n     * function customizer(objValue, srcValue) {\n     *   return _.isUndefined(objValue) ? srcValue : objValue;\n     * }\n     *\n     * var defaults = _.partialRight(_.assignWith, customizer);\n     *\n     * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n     * // => { 'a': 1, 'b': 2 }\n     */\n    var assignWith = createAssigner(function(object, source, srcIndex, customizer) {\n      copyObject(source, keys(source), object, customizer);\n    });\n\n    /**\n     * Creates an array of values corresponding to `paths` of `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.0.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {...(string|string[])} [paths] The property paths to pick.\n     * @returns {Array} Returns the picked values.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\n     *\n     * _.at(object, ['a[0].b.c', 'a[1]']);\n     * // => [3, 4]\n     */\n    var at = flatRest(baseAt);\n\n    /**\n     * Creates an object that inherits from the `prototype` object. If a\n     * `properties` object is given, its own enumerable string keyed properties\n     * are assigned to the created object.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.3.0\n     * @category Object\n     * @param {Object} prototype The object to inherit from.\n     * @param {Object} [properties] The properties to assign to the object.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * function Shape() {\n     *   this.x = 0;\n     *   this.y = 0;\n     * }\n     *\n     * function Circle() {\n     *   Shape.call(this);\n     * }\n     *\n     * Circle.prototype = _.create(Shape.prototype, {\n     *   'constructor': Circle\n     * });\n     *\n     * var circle = new Circle;\n     * circle instanceof Circle;\n     * // => true\n     *\n     * circle instanceof Shape;\n     * // => true\n     */\n    function create(prototype, properties) {\n      var result = baseCreate(prototype);\n      return properties == null ? result : baseAssign(result, properties);\n    }\n\n    /**\n     * Assigns own and inherited enumerable string keyed properties of source\n     * objects to the destination object for all destination properties that\n     * resolve to `undefined`. Source objects are applied from left to right.\n     * Once a property is set, additional values of the same property are ignored.\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} [sources] The source objects.\n     * @returns {Object} Returns `object`.\n     * @see _.defaultsDeep\n     * @example\n     *\n     * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n     * // => { 'a': 1, 'b': 2 }\n     */\n    var defaults = baseRest(function(object, sources) {\n      object = Object(object);\n\n      var index = -1;\n      var length = sources.length;\n      var guard = length > 2 ? sources[2] : undefined;\n\n      if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n        length = 1;\n      }\n\n      while (++index < length) {\n        var source = sources[index];\n        var props = keysIn(source);\n        var propsIndex = -1;\n        var propsLength = props.length;\n\n        while (++propsIndex < propsLength) {\n          var key = props[propsIndex];\n          var value = object[key];\n\n          if (value === undefined ||\n              (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n            object[key] = source[key];\n          }\n        }\n      }\n\n      return object;\n    });\n\n    /**\n     * This method is like `_.defaults` except that it recursively assigns\n     * default properties.\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.10.0\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} [sources] The source objects.\n     * @returns {Object} Returns `object`.\n     * @see _.defaults\n     * @example\n     *\n     * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });\n     * // => { 'a': { 'b': 2, 'c': 3 } }\n     */\n    var defaultsDeep = baseRest(function(args) {\n      args.push(undefined, customDefaultsMerge);\n      return apply(mergeWith, undefined, args);\n    });\n\n    /**\n     * This method is like `_.find` except that it returns the key of the first\n     * element `predicate` returns truthy for instead of the element itself.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.1.0\n     * @category Object\n     * @param {Object} object The object to inspect.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {string|undefined} Returns the key of the matched element,\n     *  else `undefined`.\n     * @example\n     *\n     * var users = {\n     *   'barney':  { 'age': 36, 'active': true },\n     *   'fred':    { 'age': 40, 'active': false },\n     *   'pebbles': { 'age': 1,  'active': true }\n     * };\n     *\n     * _.findKey(users, function(o) { return o.age < 40; });\n     * // => 'barney' (iteration order is not guaranteed)\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.findKey(users, { 'age': 1, 'active': true });\n     * // => 'pebbles'\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.findKey(users, ['active', false]);\n     * // => 'fred'\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.findKey(users, 'active');\n     * // => 'barney'\n     */\n    function findKey(object, predicate) {\n      return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);\n    }\n\n    /**\n     * This method is like `_.findKey` except that it iterates over elements of\n     * a collection in the opposite order.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Object\n     * @param {Object} object The object to inspect.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {string|undefined} Returns the key of the matched element,\n     *  else `undefined`.\n     * @example\n     *\n     * var users = {\n     *   'barney':  { 'age': 36, 'active': true },\n     *   'fred':    { 'age': 40, 'active': false },\n     *   'pebbles': { 'age': 1,  'active': true }\n     * };\n     *\n     * _.findLastKey(users, function(o) { return o.age < 40; });\n     * // => returns 'pebbles' assuming `_.findKey` returns 'barney'\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.findLastKey(users, { 'age': 36, 'active': true });\n     * // => 'barney'\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.findLastKey(users, ['active', false]);\n     * // => 'fred'\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.findLastKey(users, 'active');\n     * // => 'pebbles'\n     */\n    function findLastKey(object, predicate) {\n      return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);\n    }\n\n    /**\n     * Iterates over own and inherited enumerable string keyed properties of an\n     * object and invokes `iteratee` for each property. The iteratee is invoked\n     * with three arguments: (value, key, object). Iteratee functions may exit\n     * iteration early by explicitly returning `false`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.3.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Object} Returns `object`.\n     * @see _.forInRight\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.forIn(new Foo, function(value, key) {\n     *   console.log(key);\n     * });\n     * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).\n     */\n    function forIn(object, iteratee) {\n      return object == null\n        ? object\n        : baseFor(object, getIteratee(iteratee, 3), keysIn);\n    }\n\n    /**\n     * This method is like `_.forIn` except that it iterates over properties of\n     * `object` in the opposite order.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Object} Returns `object`.\n     * @see _.forIn\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.forInRight(new Foo, function(value, key) {\n     *   console.log(key);\n     * });\n     * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.\n     */\n    function forInRight(object, iteratee) {\n      return object == null\n        ? object\n        : baseForRight(object, getIteratee(iteratee, 3), keysIn);\n    }\n\n    /**\n     * Iterates over own enumerable string keyed properties of an object and\n     * invokes `iteratee` for each property. The iteratee is invoked with three\n     * arguments: (value, key, object). Iteratee functions may exit iteration\n     * early by explicitly returning `false`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.3.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Object} Returns `object`.\n     * @see _.forOwnRight\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.forOwn(new Foo, function(value, key) {\n     *   console.log(key);\n     * });\n     * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n     */\n    function forOwn(object, iteratee) {\n      return object && baseForOwn(object, getIteratee(iteratee, 3));\n    }\n\n    /**\n     * This method is like `_.forOwn` except that it iterates over properties of\n     * `object` in the opposite order.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Object} Returns `object`.\n     * @see _.forOwn\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.forOwnRight(new Foo, function(value, key) {\n     *   console.log(key);\n     * });\n     * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.\n     */\n    function forOwnRight(object, iteratee) {\n      return object && baseForOwnRight(object, getIteratee(iteratee, 3));\n    }\n\n    /**\n     * Creates an array of function property names from own enumerable properties\n     * of `object`.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The object to inspect.\n     * @returns {Array} Returns the function names.\n     * @see _.functionsIn\n     * @example\n     *\n     * function Foo() {\n     *   this.a = _.constant('a');\n     *   this.b = _.constant('b');\n     * }\n     *\n     * Foo.prototype.c = _.constant('c');\n     *\n     * _.functions(new Foo);\n     * // => ['a', 'b']\n     */\n    function functions(object) {\n      return object == null ? [] : baseFunctions(object, keys(object));\n    }\n\n    /**\n     * Creates an array of function property names from own and inherited\n     * enumerable properties of `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The object to inspect.\n     * @returns {Array} Returns the function names.\n     * @see _.functions\n     * @example\n     *\n     * function Foo() {\n     *   this.a = _.constant('a');\n     *   this.b = _.constant('b');\n     * }\n     *\n     * Foo.prototype.c = _.constant('c');\n     *\n     * _.functionsIn(new Foo);\n     * // => ['a', 'b', 'c']\n     */\n    function functionsIn(object) {\n      return object == null ? [] : baseFunctions(object, keysIn(object));\n    }\n\n    /**\n     * Gets the value at `path` of `object`. If the resolved value is\n     * `undefined`, the `defaultValue` is returned in its place.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.7.0\n     * @category Object\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path of the property to get.\n     * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n     * @returns {*} Returns the resolved value.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n     *\n     * _.get(object, 'a[0].b.c');\n     * // => 3\n     *\n     * _.get(object, ['a', '0', 'b', 'c']);\n     * // => 3\n     *\n     * _.get(object, 'a.b.c', 'default');\n     * // => 'default'\n     */\n    function get(object, path, defaultValue) {\n      var result = object == null ? undefined : baseGet(object, path);\n      return result === undefined ? defaultValue : result;\n    }\n\n    /**\n     * Checks if `path` is a direct property of `object`.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path to check.\n     * @returns {boolean} Returns `true` if `path` exists, else `false`.\n     * @example\n     *\n     * var object = { 'a': { 'b': 2 } };\n     * var other = _.create({ 'a': _.create({ 'b': 2 }) });\n     *\n     * _.has(object, 'a');\n     * // => true\n     *\n     * _.has(object, 'a.b');\n     * // => true\n     *\n     * _.has(object, ['a', 'b']);\n     * // => true\n     *\n     * _.has(other, 'a');\n     * // => false\n     */\n    function has(object, path) {\n      return object != null && hasPath(object, path, baseHas);\n    }\n\n    /**\n     * Checks if `path` is a direct or inherited property of `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path to check.\n     * @returns {boolean} Returns `true` if `path` exists, else `false`.\n     * @example\n     *\n     * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n     *\n     * _.hasIn(object, 'a');\n     * // => true\n     *\n     * _.hasIn(object, 'a.b');\n     * // => true\n     *\n     * _.hasIn(object, ['a', 'b']);\n     * // => true\n     *\n     * _.hasIn(object, 'b');\n     * // => false\n     */\n    function hasIn(object, path) {\n      return object != null && hasPath(object, path, baseHasIn);\n    }\n\n    /**\n     * Creates an object composed of the inverted keys and values of `object`.\n     * If `object` contains duplicate values, subsequent values overwrite\n     * property assignments of previous values.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.7.0\n     * @category Object\n     * @param {Object} object The object to invert.\n     * @returns {Object} Returns the new inverted object.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': 2, 'c': 1 };\n     *\n     * _.invert(object);\n     * // => { '1': 'c', '2': 'b' }\n     */\n    var invert = createInverter(function(result, value, key) {\n      if (value != null &&\n          typeof value.toString != 'function') {\n        value = nativeObjectToString.call(value);\n      }\n\n      result[value] = key;\n    }, constant(identity));\n\n    /**\n     * This method is like `_.invert` except that the inverted object is generated\n     * from the results of running each element of `object` thru `iteratee`. The\n     * corresponding inverted value of each inverted key is an array of keys\n     * responsible for generating the inverted value. The iteratee is invoked\n     * with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.1.0\n     * @category Object\n     * @param {Object} object The object to invert.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {Object} Returns the new inverted object.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': 2, 'c': 1 };\n     *\n     * _.invertBy(object);\n     * // => { '1': ['a', 'c'], '2': ['b'] }\n     *\n     * _.invertBy(object, function(value) {\n     *   return 'group' + value;\n     * });\n     * // => { 'group1': ['a', 'c'], 'group2': ['b'] }\n     */\n    var invertBy = createInverter(function(result, value, key) {\n      if (value != null &&\n          typeof value.toString != 'function') {\n        value = nativeObjectToString.call(value);\n      }\n\n      if (hasOwnProperty.call(result, value)) {\n        result[value].push(key);\n      } else {\n        result[value] = [key];\n      }\n    }, getIteratee);\n\n    /**\n     * Invokes the method at `path` of `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path of the method to invoke.\n     * @param {...*} [args] The arguments to invoke the method with.\n     * @returns {*} Returns the result of the invoked method.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };\n     *\n     * _.invoke(object, 'a[0].b.c.slice', 1, 3);\n     * // => [2, 3]\n     */\n    var invoke = baseRest(baseInvoke);\n\n    /**\n     * Creates an array of the own enumerable property names of `object`.\n     *\n     * **Note:** Non-object values are coerced to objects. See the\n     * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n     * for more details.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property names.\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.keys(new Foo);\n     * // => ['a', 'b'] (iteration order is not guaranteed)\n     *\n     * _.keys('hi');\n     * // => ['0', '1']\n     */\n    function keys(object) {\n      return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n    }\n\n    /**\n     * Creates an array of the own and inherited enumerable property names of `object`.\n     *\n     * **Note:** Non-object values are coerced to objects.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Object\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property names.\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.keysIn(new Foo);\n     * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n     */\n    function keysIn(object) {\n      return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n    }\n\n    /**\n     * The opposite of `_.mapValues`; this method creates an object with the\n     * same values as `object` and keys generated by running each own enumerable\n     * string keyed property of `object` thru `iteratee`. The iteratee is invoked\n     * with three arguments: (value, key, object).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.8.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Object} Returns the new mapped object.\n     * @see _.mapValues\n     * @example\n     *\n     * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {\n     *   return key + value;\n     * });\n     * // => { 'a1': 1, 'b2': 2 }\n     */\n    function mapKeys(object, iteratee) {\n      var result = {};\n      iteratee = getIteratee(iteratee, 3);\n\n      baseForOwn(object, function(value, key, object) {\n        baseAssignValue(result, iteratee(value, key, object), value);\n      });\n      return result;\n    }\n\n    /**\n     * Creates an object with the same keys as `object` and values generated\n     * by running each own enumerable string keyed property of `object` thru\n     * `iteratee`. The iteratee is invoked with three arguments:\n     * (value, key, object).\n     *\n     * @static\n     * @memberOf _\n     * @since 2.4.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Object} Returns the new mapped object.\n     * @see _.mapKeys\n     * @example\n     *\n     * var users = {\n     *   'fred':    { 'user': 'fred',    'age': 40 },\n     *   'pebbles': { 'user': 'pebbles', 'age': 1 }\n     * };\n     *\n     * _.mapValues(users, function(o) { return o.age; });\n     * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.mapValues(users, 'age');\n     * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n     */\n    function mapValues(object, iteratee) {\n      var result = {};\n      iteratee = getIteratee(iteratee, 3);\n\n      baseForOwn(object, function(value, key, object) {\n        baseAssignValue(result, key, iteratee(value, key, object));\n      });\n      return result;\n    }\n\n    /**\n     * This method is like `_.assign` except that it recursively merges own and\n     * inherited enumerable string keyed properties of source objects into the\n     * destination object. Source properties that resolve to `undefined` are\n     * skipped if a destination value exists. Array and plain object properties\n     * are merged recursively. Other objects and value types are overridden by\n     * assignment. Source objects are applied from left to right. Subsequent\n     * sources overwrite property assignments of previous sources.\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.5.0\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} [sources] The source objects.\n     * @returns {Object} Returns `object`.\n     * @example\n     *\n     * var object = {\n     *   'a': [{ 'b': 2 }, { 'd': 4 }]\n     * };\n     *\n     * var other = {\n     *   'a': [{ 'c': 3 }, { 'e': 5 }]\n     * };\n     *\n     * _.merge(object, other);\n     * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\n     */\n    var merge = createAssigner(function(object, source, srcIndex) {\n      baseMerge(object, source, srcIndex);\n    });\n\n    /**\n     * This method is like `_.merge` except that it accepts `customizer` which\n     * is invoked to produce the merged values of the destination and source\n     * properties. If `customizer` returns `undefined`, merging is handled by the\n     * method instead. The `customizer` is invoked with six arguments:\n     * (objValue, srcValue, key, object, source, stack).\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} sources The source objects.\n     * @param {Function} customizer The function to customize assigned values.\n     * @returns {Object} Returns `object`.\n     * @example\n     *\n     * function customizer(objValue, srcValue) {\n     *   if (_.isArray(objValue)) {\n     *     return objValue.concat(srcValue);\n     *   }\n     * }\n     *\n     * var object = { 'a': [1], 'b': [2] };\n     * var other = { 'a': [3], 'b': [4] };\n     *\n     * _.mergeWith(object, other, customizer);\n     * // => { 'a': [1, 3], 'b': [2, 4] }\n     */\n    var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {\n      baseMerge(object, source, srcIndex, customizer);\n    });\n\n    /**\n     * The opposite of `_.pick`; this method creates an object composed of the\n     * own and inherited enumerable property paths of `object` that are not omitted.\n     *\n     * **Note:** This method is considerably slower than `_.pick`.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The source object.\n     * @param {...(string|string[])} [paths] The property paths to omit.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': '2', 'c': 3 };\n     *\n     * _.omit(object, ['a', 'c']);\n     * // => { 'b': '2' }\n     */\n    var omit = flatRest(function(object, paths) {\n      var result = {};\n      if (object == null) {\n        return result;\n      }\n      var isDeep = false;\n      paths = arrayMap(paths, function(path) {\n        path = castPath(path, object);\n        isDeep || (isDeep = path.length > 1);\n        return path;\n      });\n      copyObject(object, getAllKeysIn(object), result);\n      if (isDeep) {\n        result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);\n      }\n      var length = paths.length;\n      while (length--) {\n        baseUnset(result, paths[length]);\n      }\n      return result;\n    });\n\n    /**\n     * The opposite of `_.pickBy`; this method creates an object composed of\n     * the own and inherited enumerable string keyed properties of `object` that\n     * `predicate` doesn't return truthy for. The predicate is invoked with two\n     * arguments: (value, key).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The source object.\n     * @param {Function} [predicate=_.identity] The function invoked per property.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': '2', 'c': 3 };\n     *\n     * _.omitBy(object, _.isNumber);\n     * // => { 'b': '2' }\n     */\n    function omitBy(object, predicate) {\n      return pickBy(object, negate(getIteratee(predicate)));\n    }\n\n    /**\n     * Creates an object composed of the picked `object` properties.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The source object.\n     * @param {...(string|string[])} [paths] The property paths to pick.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': '2', 'c': 3 };\n     *\n     * _.pick(object, ['a', 'c']);\n     * // => { 'a': 1, 'c': 3 }\n     */\n    var pick = flatRest(function(object, paths) {\n      return object == null ? {} : basePick(object, paths);\n    });\n\n    /**\n     * Creates an object composed of the `object` properties `predicate` returns\n     * truthy for. The predicate is invoked with two arguments: (value, key).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The source object.\n     * @param {Function} [predicate=_.identity] The function invoked per property.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': '2', 'c': 3 };\n     *\n     * _.pickBy(object, _.isNumber);\n     * // => { 'a': 1, 'c': 3 }\n     */\n    function pickBy(object, predicate) {\n      if (object == null) {\n        return {};\n      }\n      var props = arrayMap(getAllKeysIn(object), function(prop) {\n        return [prop];\n      });\n      predicate = getIteratee(predicate);\n      return basePickBy(object, props, function(value, path) {\n        return predicate(value, path[0]);\n      });\n    }\n\n    /**\n     * This method is like `_.get` except that if the resolved value is a\n     * function it's invoked with the `this` binding of its parent object and\n     * its result is returned.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path of the property to resolve.\n     * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n     * @returns {*} Returns the resolved value.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };\n     *\n     * _.result(object, 'a[0].b.c1');\n     * // => 3\n     *\n     * _.result(object, 'a[0].b.c2');\n     * // => 4\n     *\n     * _.result(object, 'a[0].b.c3', 'default');\n     * // => 'default'\n     *\n     * _.result(object, 'a[0].b.c3', _.constant('default'));\n     * // => 'default'\n     */\n    function result(object, path, defaultValue) {\n      path = castPath(path, object);\n\n      var index = -1,\n          length = path.length;\n\n      // Ensure the loop is entered when path is empty.\n      if (!length) {\n        length = 1;\n        object = undefined;\n      }\n      while (++index < length) {\n        var value = object == null ? undefined : object[toKey(path[index])];\n        if (value === undefined) {\n          index = length;\n          value = defaultValue;\n        }\n        object = isFunction(value) ? value.call(object) : value;\n      }\n      return object;\n    }\n\n    /**\n     * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,\n     * it's created. Arrays are created for missing index properties while objects\n     * are created for all other missing properties. Use `_.setWith` to customize\n     * `path` creation.\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.7.0\n     * @category Object\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The path of the property to set.\n     * @param {*} value The value to set.\n     * @returns {Object} Returns `object`.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n     *\n     * _.set(object, 'a[0].b.c', 4);\n     * console.log(object.a[0].b.c);\n     * // => 4\n     *\n     * _.set(object, ['x', '0', 'y', 'z'], 5);\n     * console.log(object.x[0].y.z);\n     * // => 5\n     */\n    function set(object, path, value) {\n      return object == null ? object : baseSet(object, path, value);\n    }\n\n    /**\n     * This method is like `_.set` except that it accepts `customizer` which is\n     * invoked to produce the objects of `path`.  If `customizer` returns `undefined`\n     * path creation is handled by the method instead. The `customizer` is invoked\n     * with three arguments: (nsValue, key, nsObject).\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The path of the property to set.\n     * @param {*} value The value to set.\n     * @param {Function} [customizer] The function to customize assigned values.\n     * @returns {Object} Returns `object`.\n     * @example\n     *\n     * var object = {};\n     *\n     * _.setWith(object, '[0][1]', 'a', Object);\n     * // => { '0': { '1': 'a' } }\n     */\n    function setWith(object, path, value, customizer) {\n      customizer = typeof customizer == 'function' ? customizer : undefined;\n      return object == null ? object : baseSet(object, path, value, customizer);\n    }\n\n    /**\n     * Creates an array of own enumerable string keyed-value pairs for `object`\n     * which can be consumed by `_.fromPairs`. If `object` is a map or set, its\n     * entries are returned.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @alias entries\n     * @category Object\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the key-value pairs.\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.toPairs(new Foo);\n     * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)\n     */\n    var toPairs = createToPairs(keys);\n\n    /**\n     * Creates an array of own and inherited enumerable string keyed-value pairs\n     * for `object` which can be consumed by `_.fromPairs`. If `object` is a map\n     * or set, its entries are returned.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @alias entriesIn\n     * @category Object\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the key-value pairs.\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.toPairsIn(new Foo);\n     * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)\n     */\n    var toPairsIn = createToPairs(keysIn);\n\n    /**\n     * An alternative to `_.reduce`; this method transforms `object` to a new\n     * `accumulator` object which is the result of running each of its own\n     * enumerable string keyed properties thru `iteratee`, with each invocation\n     * potentially mutating the `accumulator` object. If `accumulator` is not\n     * provided, a new object with the same `[[Prototype]]` will be used. The\n     * iteratee is invoked with four arguments: (accumulator, value, key, object).\n     * Iteratee functions may exit iteration early by explicitly returning `false`.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.3.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @param {*} [accumulator] The custom accumulator value.\n     * @returns {*} Returns the accumulated value.\n     * @example\n     *\n     * _.transform([2, 3, 4], function(result, n) {\n     *   result.push(n *= n);\n     *   return n % 2 == 0;\n     * }, []);\n     * // => [4, 9]\n     *\n     * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n     *   (result[value] || (result[value] = [])).push(key);\n     * }, {});\n     * // => { '1': ['a', 'c'], '2': ['b'] }\n     */\n    function transform(object, iteratee, accumulator) {\n      var isArr = isArray(object),\n          isArrLike = isArr || isBuffer(object) || isTypedArray(object);\n\n      iteratee = getIteratee(iteratee, 4);\n      if (accumulator == null) {\n        var Ctor = object && object.constructor;\n        if (isArrLike) {\n          accumulator = isArr ? new Ctor : [];\n        }\n        else if (isObject(object)) {\n          accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};\n        }\n        else {\n          accumulator = {};\n        }\n      }\n      (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {\n        return iteratee(accumulator, value, index, object);\n      });\n      return accumulator;\n    }\n\n    /**\n     * Removes the property at `path` of `object`.\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The path of the property to unset.\n     * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c': 7 } }] };\n     * _.unset(object, 'a[0].b.c');\n     * // => true\n     *\n     * console.log(object);\n     * // => { 'a': [{ 'b': {} }] };\n     *\n     * _.unset(object, ['a', '0', 'b', 'c']);\n     * // => true\n     *\n     * console.log(object);\n     * // => { 'a': [{ 'b': {} }] };\n     */\n    function unset(object, path) {\n      return object == null ? true : baseUnset(object, path);\n    }\n\n    /**\n     * This method is like `_.set` except that accepts `updater` to produce the\n     * value to set. Use `_.updateWith` to customize `path` creation. The `updater`\n     * is invoked with one argument: (value).\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.6.0\n     * @category Object\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The path of the property to set.\n     * @param {Function} updater The function to produce the updated value.\n     * @returns {Object} Returns `object`.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n     *\n     * _.update(object, 'a[0].b.c', function(n) { return n * n; });\n     * console.log(object.a[0].b.c);\n     * // => 9\n     *\n     * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });\n     * console.log(object.x[0].y.z);\n     * // => 0\n     */\n    function update(object, path, updater) {\n      return object == null ? object : baseUpdate(object, path, castFunction(updater));\n    }\n\n    /**\n     * This method is like `_.update` except that it accepts `customizer` which is\n     * invoked to produce the objects of `path`.  If `customizer` returns `undefined`\n     * path creation is handled by the method instead. The `customizer` is invoked\n     * with three arguments: (nsValue, key, nsObject).\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.6.0\n     * @category Object\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The path of the property to set.\n     * @param {Function} updater The function to produce the updated value.\n     * @param {Function} [customizer] The function to customize assigned values.\n     * @returns {Object} Returns `object`.\n     * @example\n     *\n     * var object = {};\n     *\n     * _.updateWith(object, '[0][1]', _.constant('a'), Object);\n     * // => { '0': { '1': 'a' } }\n     */\n    function updateWith(object, path, updater, customizer) {\n      customizer = typeof customizer == 'function' ? customizer : undefined;\n      return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);\n    }\n\n    /**\n     * Creates an array of the own enumerable string keyed property values of `object`.\n     *\n     * **Note:** Non-object values are coerced to objects.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property values.\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.values(new Foo);\n     * // => [1, 2] (iteration order is not guaranteed)\n     *\n     * _.values('hi');\n     * // => ['h', 'i']\n     */\n    function values(object) {\n      return object == null ? [] : baseValues(object, keys(object));\n    }\n\n    /**\n     * Creates an array of the own and inherited enumerable string keyed property\n     * values of `object`.\n     *\n     * **Note:** Non-object values are coerced to objects.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Object\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property values.\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.valuesIn(new Foo);\n     * // => [1, 2, 3] (iteration order is not guaranteed)\n     */\n    function valuesIn(object) {\n      return object == null ? [] : baseValues(object, keysIn(object));\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Clamps `number` within the inclusive `lower` and `upper` bounds.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Number\n     * @param {number} number The number to clamp.\n     * @param {number} [lower] The lower bound.\n     * @param {number} upper The upper bound.\n     * @returns {number} Returns the clamped number.\n     * @example\n     *\n     * _.clamp(-10, -5, 5);\n     * // => -5\n     *\n     * _.clamp(10, -5, 5);\n     * // => 5\n     */\n    function clamp(number, lower, upper) {\n      if (upper === undefined) {\n        upper = lower;\n        lower = undefined;\n      }\n      if (upper !== undefined) {\n        upper = toNumber(upper);\n        upper = upper === upper ? upper : 0;\n      }\n      if (lower !== undefined) {\n        lower = toNumber(lower);\n        lower = lower === lower ? lower : 0;\n      }\n      return baseClamp(toNumber(number), lower, upper);\n    }\n\n    /**\n     * Checks if `n` is between `start` and up to, but not including, `end`. If\n     * `end` is not specified, it's set to `start` with `start` then set to `0`.\n     * If `start` is greater than `end` the params are swapped to support\n     * negative ranges.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.3.0\n     * @category Number\n     * @param {number} number The number to check.\n     * @param {number} [start=0] The start of the range.\n     * @param {number} end The end of the range.\n     * @returns {boolean} Returns `true` if `number` is in the range, else `false`.\n     * @see _.range, _.rangeRight\n     * @example\n     *\n     * _.inRange(3, 2, 4);\n     * // => true\n     *\n     * _.inRange(4, 8);\n     * // => true\n     *\n     * _.inRange(4, 2);\n     * // => false\n     *\n     * _.inRange(2, 2);\n     * // => false\n     *\n     * _.inRange(1.2, 2);\n     * // => true\n     *\n     * _.inRange(5.2, 4);\n     * // => false\n     *\n     * _.inRange(-3, -2, -6);\n     * // => true\n     */\n    function inRange(number, start, end) {\n      start = toFinite(start);\n      if (end === undefined) {\n        end = start;\n        start = 0;\n      } else {\n        end = toFinite(end);\n      }\n      number = toNumber(number);\n      return baseInRange(number, start, end);\n    }\n\n    /**\n     * Produces a random number between the inclusive `lower` and `upper` bounds.\n     * If only one argument is provided a number between `0` and the given number\n     * is returned. If `floating` is `true`, or either `lower` or `upper` are\n     * floats, a floating-point number is returned instead of an integer.\n     *\n     * **Note:** JavaScript follows the IEEE-754 standard for resolving\n     * floating-point values which can produce unexpected results.\n     *\n     * **Note:** If `lower` is greater than `upper`, the values are swapped.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.7.0\n     * @category Number\n     * @param {number} [lower=0] The lower bound.\n     * @param {number} [upper=1] The upper bound.\n     * @param {boolean} [floating] Specify returning a floating-point number.\n     * @returns {number} Returns the random number.\n     * @example\n     *\n     * _.random(0, 5);\n     * // => an integer between 0 and 5\n     *\n     * // when lower is greater than upper the values are swapped\n     * _.random(5, 0);\n     * // => an integer between 0 and 5\n     *\n     * _.random(5);\n     * // => also an integer between 0 and 5\n     *\n     * _.random(-5);\n     * // => an integer between -5 and 0\n     *\n     * _.random(5, true);\n     * // => a floating-point number between 0 and 5\n     *\n     * _.random(1.2, 5.2);\n     * // => a floating-point number between 1.2 and 5.2\n     */\n    function random(lower, upper, floating) {\n      if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {\n        upper = floating = undefined;\n      }\n      if (floating === undefined) {\n        if (typeof upper == 'boolean') {\n          floating = upper;\n          upper = undefined;\n        }\n        else if (typeof lower == 'boolean') {\n          floating = lower;\n          lower = undefined;\n        }\n      }\n      if (lower === undefined && upper === undefined) {\n        lower = 0;\n        upper = 1;\n      }\n      else {\n        lower = toFinite(lower);\n        if (upper === undefined) {\n          upper = lower;\n          lower = 0;\n        } else {\n          upper = toFinite(upper);\n        }\n      }\n      if (lower > upper) {\n        var temp = lower;\n        lower = upper;\n        upper = temp;\n      }\n      if (floating || lower % 1 || upper % 1) {\n        var rand = nativeRandom();\n        return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);\n      }\n      return baseRandom(lower, upper);\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the camel cased string.\n     * @example\n     *\n     * _.camelCase('Foo Bar');\n     * // => 'fooBar'\n     *\n     * _.camelCase('--foo-bar--');\n     * // => 'fooBar'\n     *\n     * _.camelCase('__FOO_BAR__');\n     * // => 'fooBar'\n     */\n    var camelCase = createCompounder(function(result, word, index) {\n      word = word.toLowerCase();\n      return result + (index ? capitalize(word) : word);\n    });\n\n    /**\n     * Converts the first character of `string` to upper case and the remaining\n     * to lower case.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to capitalize.\n     * @returns {string} Returns the capitalized string.\n     * @example\n     *\n     * _.capitalize('FRED');\n     * // => 'Fred'\n     */\n    function capitalize(string) {\n      return upperFirst(toString(string).toLowerCase());\n    }\n\n    /**\n     * Deburrs `string` by converting\n     * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)\n     * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)\n     * letters to basic Latin letters and removing\n     * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to deburr.\n     * @returns {string} Returns the deburred string.\n     * @example\n     *\n     * _.deburr('d\u00E9j\u00E0 vu');\n     * // => 'deja vu'\n     */\n    function deburr(string) {\n      string = toString(string);\n      return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');\n    }\n\n    /**\n     * Checks if `string` ends with the given target string.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to inspect.\n     * @param {string} [target] The string to search for.\n     * @param {number} [position=string.length] The position to search up to.\n     * @returns {boolean} Returns `true` if `string` ends with `target`,\n     *  else `false`.\n     * @example\n     *\n     * _.endsWith('abc', 'c');\n     * // => true\n     *\n     * _.endsWith('abc', 'b');\n     * // => false\n     *\n     * _.endsWith('abc', 'b', 2);\n     * // => true\n     */\n    function endsWith(string, target, position) {\n      string = toString(string);\n      target = baseToString(target);\n\n      var length = string.length;\n      position = position === undefined\n        ? length\n        : baseClamp(toInteger(position), 0, length);\n\n      var end = position;\n      position -= target.length;\n      return position >= 0 && string.slice(position, end) == target;\n    }\n\n    /**\n     * Converts the characters \"&\", \"<\", \">\", '\"', and \"'\" in `string` to their\n     * corresponding HTML entities.\n     *\n     * **Note:** No other characters are escaped. To escape additional\n     * characters use a third-party library like [_he_](https://mths.be/he).\n     *\n     * Though the \">\" character is escaped for symmetry, characters like\n     * \">\" and \"/\" don't need escaping in HTML and have no special meaning\n     * unless they're part of a tag or unquoted attribute value. See\n     * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)\n     * (under \"semi-related fun fact\") for more details.\n     *\n     * When working with HTML you should always\n     * [quote attribute values](http://wonko.com/post/html-escaping) to reduce\n     * XSS vectors.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category String\n     * @param {string} [string=''] The string to escape.\n     * @returns {string} Returns the escaped string.\n     * @example\n     *\n     * _.escape('fred, barney, & pebbles');\n     * // => 'fred, barney, &amp; pebbles'\n     */\n    function escape(string) {\n      string = toString(string);\n      return (string && reHasUnescapedHtml.test(string))\n        ? string.replace(reUnescapedHtml, escapeHtmlChar)\n        : string;\n    }\n\n    /**\n     * Escapes the `RegExp` special characters \"^\", \"$\", \"\\\", \".\", \"*\", \"+\",\n     * \"?\", \"(\", \")\", \"[\", \"]\", \"{\", \"}\", and \"|\" in `string`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to escape.\n     * @returns {string} Returns the escaped string.\n     * @example\n     *\n     * _.escapeRegExp('[lodash](https://lodash.com/)');\n     * // => '\\[lodash\\]\\(https://lodash\\.com/\\)'\n     */\n    function escapeRegExp(string) {\n      string = toString(string);\n      return (string && reHasRegExpChar.test(string))\n        ? string.replace(reRegExpChar, '\\\\$&')\n        : string;\n    }\n\n    /**\n     * Converts `string` to\n     * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the kebab cased string.\n     * @example\n     *\n     * _.kebabCase('Foo Bar');\n     * // => 'foo-bar'\n     *\n     * _.kebabCase('fooBar');\n     * // => 'foo-bar'\n     *\n     * _.kebabCase('__FOO_BAR__');\n     * // => 'foo-bar'\n     */\n    var kebabCase = createCompounder(function(result, word, index) {\n      return result + (index ? '-' : '') + word.toLowerCase();\n    });\n\n    /**\n     * Converts `string`, as space separated words, to lower case.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the lower cased string.\n     * @example\n     *\n     * _.lowerCase('--Foo-Bar--');\n     * // => 'foo bar'\n     *\n     * _.lowerCase('fooBar');\n     * // => 'foo bar'\n     *\n     * _.lowerCase('__FOO_BAR__');\n     * // => 'foo bar'\n     */\n    var lowerCase = createCompounder(function(result, word, index) {\n      return result + (index ? ' ' : '') + word.toLowerCase();\n    });\n\n    /**\n     * Converts the first character of `string` to lower case.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the converted string.\n     * @example\n     *\n     * _.lowerFirst('Fred');\n     * // => 'fred'\n     *\n     * _.lowerFirst('FRED');\n     * // => 'fRED'\n     */\n    var lowerFirst = createCaseFirst('toLowerCase');\n\n    /**\n     * Pads `string` on the left and right sides if it's shorter than `length`.\n     * Padding characters are truncated if they can't be evenly divided by `length`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to pad.\n     * @param {number} [length=0] The padding length.\n     * @param {string} [chars=' '] The string used as padding.\n     * @returns {string} Returns the padded string.\n     * @example\n     *\n     * _.pad('abc', 8);\n     * // => '  abc   '\n     *\n     * _.pad('abc', 8, '_-');\n     * // => '_-abc_-_'\n     *\n     * _.pad('abc', 3);\n     * // => 'abc'\n     */\n    function pad(string, length, chars) {\n      string = toString(string);\n      length = toInteger(length);\n\n      var strLength = length ? stringSize(string) : 0;\n      if (!length || strLength >= length) {\n        return string;\n      }\n      var mid = (length - strLength) / 2;\n      return (\n        createPadding(nativeFloor(mid), chars) +\n        string +\n        createPadding(nativeCeil(mid), chars)\n      );\n    }\n\n    /**\n     * Pads `string` on the right side if it's shorter than `length`. Padding\n     * characters are truncated if they exceed `length`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to pad.\n     * @param {number} [length=0] The padding length.\n     * @param {string} [chars=' '] The string used as padding.\n     * @returns {string} Returns the padded string.\n     * @example\n     *\n     * _.padEnd('abc', 6);\n     * // => 'abc   '\n     *\n     * _.padEnd('abc', 6, '_-');\n     * // => 'abc_-_'\n     *\n     * _.padEnd('abc', 3);\n     * // => 'abc'\n     */\n    function padEnd(string, length, chars) {\n      string = toString(string);\n      length = toInteger(length);\n\n      var strLength = length ? stringSize(string) : 0;\n      return (length && strLength < length)\n        ? (string + createPadding(length - strLength, chars))\n        : string;\n    }\n\n    /**\n     * Pads `string` on the left side if it's shorter than `length`. Padding\n     * characters are truncated if they exceed `length`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to pad.\n     * @param {number} [length=0] The padding length.\n     * @param {string} [chars=' '] The string used as padding.\n     * @returns {string} Returns the padded string.\n     * @example\n     *\n     * _.padStart('abc', 6);\n     * // => '   abc'\n     *\n     * _.padStart('abc', 6, '_-');\n     * // => '_-_abc'\n     *\n     * _.padStart('abc', 3);\n     * // => 'abc'\n     */\n    function padStart(string, length, chars) {\n      string = toString(string);\n      length = toInteger(length);\n\n      var strLength = length ? stringSize(string) : 0;\n      return (length && strLength < length)\n        ? (createPadding(length - strLength, chars) + string)\n        : string;\n    }\n\n    /**\n     * Converts `string` to an integer of the specified radix. If `radix` is\n     * `undefined` or `0`, a `radix` of `10` is used unless `value` is a\n     * hexadecimal, in which case a `radix` of `16` is used.\n     *\n     * **Note:** This method aligns with the\n     * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.1.0\n     * @category String\n     * @param {string} string The string to convert.\n     * @param {number} [radix=10] The radix to interpret `value` by.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {number} Returns the converted integer.\n     * @example\n     *\n     * _.parseInt('08');\n     * // => 8\n     *\n     * _.map(['6', '08', '10'], _.parseInt);\n     * // => [6, 8, 10]\n     */\n    function parseInt(string, radix, guard) {\n      if (guard || radix == null) {\n        radix = 0;\n      } else if (radix) {\n        radix = +radix;\n      }\n      return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);\n    }\n\n    /**\n     * Repeats the given string `n` times.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to repeat.\n     * @param {number} [n=1] The number of times to repeat the string.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {string} Returns the repeated string.\n     * @example\n     *\n     * _.repeat('*', 3);\n     * // => '***'\n     *\n     * _.repeat('abc', 2);\n     * // => 'abcabc'\n     *\n     * _.repeat('abc', 0);\n     * // => ''\n     */\n    function repeat(string, n, guard) {\n      if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {\n        n = 1;\n      } else {\n        n = toInteger(n);\n      }\n      return baseRepeat(toString(string), n);\n    }\n\n    /**\n     * Replaces matches for `pattern` in `string` with `replacement`.\n     *\n     * **Note:** This method is based on\n     * [`String#replace`](https://mdn.io/String/replace).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to modify.\n     * @param {RegExp|string} pattern The pattern to replace.\n     * @param {Function|string} replacement The match replacement.\n     * @returns {string} Returns the modified string.\n     * @example\n     *\n     * _.replace('Hi Fred', 'Fred', 'Barney');\n     * // => 'Hi Barney'\n     */\n    function replace() {\n      var args = arguments,\n          string = toString(args[0]);\n\n      return args.length < 3 ? string : string.replace(args[1], args[2]);\n    }\n\n    /**\n     * Converts `string` to\n     * [snake case](https://en.wikipedia.org/wiki/Snake_case).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the snake cased string.\n     * @example\n     *\n     * _.snakeCase('Foo Bar');\n     * // => 'foo_bar'\n     *\n     * _.snakeCase('fooBar');\n     * // => 'foo_bar'\n     *\n     * _.snakeCase('--FOO-BAR--');\n     * // => 'foo_bar'\n     */\n    var snakeCase = createCompounder(function(result, word, index) {\n      return result + (index ? '_' : '') + word.toLowerCase();\n    });\n\n    /**\n     * Splits `string` by `separator`.\n     *\n     * **Note:** This method is based on\n     * [`String#split`](https://mdn.io/String/split).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to split.\n     * @param {RegExp|string} separator The separator pattern to split by.\n     * @param {number} [limit] The length to truncate results to.\n     * @returns {Array} Returns the string segments.\n     * @example\n     *\n     * _.split('a-b-c', '-', 2);\n     * // => ['a', 'b']\n     */\n    function split(string, separator, limit) {\n      if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {\n        separator = limit = undefined;\n      }\n      limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;\n      if (!limit) {\n        return [];\n      }\n      string = toString(string);\n      if (string && (\n            typeof separator == 'string' ||\n            (separator != null && !isRegExp(separator))\n          )) {\n        separator = baseToString(separator);\n        if (!separator && hasUnicode(string)) {\n          return castSlice(stringToArray(string), 0, limit);\n        }\n      }\n      return string.split(separator, limit);\n    }\n\n    /**\n     * Converts `string` to\n     * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.1.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the start cased string.\n     * @example\n     *\n     * _.startCase('--foo-bar--');\n     * // => 'Foo Bar'\n     *\n     * _.startCase('fooBar');\n     * // => 'Foo Bar'\n     *\n     * _.startCase('__FOO_BAR__');\n     * // => 'FOO BAR'\n     */\n    var startCase = createCompounder(function(result, word, index) {\n      return result + (index ? ' ' : '') + upperFirst(word);\n    });\n\n    /**\n     * Checks if `string` starts with the given target string.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to inspect.\n     * @param {string} [target] The string to search for.\n     * @param {number} [position=0] The position to search from.\n     * @returns {boolean} Returns `true` if `string` starts with `target`,\n     *  else `false`.\n     * @example\n     *\n     * _.startsWith('abc', 'a');\n     * // => true\n     *\n     * _.startsWith('abc', 'b');\n     * // => false\n     *\n     * _.startsWith('abc', 'b', 1);\n     * // => true\n     */\n    function startsWith(string, target, position) {\n      string = toString(string);\n      position = position == null\n        ? 0\n        : baseClamp(toInteger(position), 0, string.length);\n\n      target = baseToString(target);\n      return string.slice(position, position + target.length) == target;\n    }\n\n    /**\n     * Creates a compiled template function that can interpolate data properties\n     * in \"interpolate\" delimiters, HTML-escape interpolated data properties in\n     * \"escape\" delimiters, and execute JavaScript in \"evaluate\" delimiters. Data\n     * properties may be accessed as free variables in the template. If a setting\n     * object is given, it takes precedence over `_.templateSettings` values.\n     *\n     * **Security:** `_.template` is insecure and should not be used. It will be\n     * removed in Lodash v5. Avoid untrusted input. See\n     * [threat model](https://github.com/lodash/lodash/blob/main/threat-model.md).\n     *\n     * **Note:** In the development build `_.template` utilizes\n     * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)\n     * for easier debugging.\n     *\n     * For more information on precompiling templates see\n     * [lodash's custom builds documentation](https://lodash.com/custom-builds).\n     *\n     * For more information on Chrome extension sandboxes see\n     * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category String\n     * @param {string} [string=''] The template string.\n     * @param {Object} [options={}] The options object.\n     * @param {RegExp} [options.escape=_.templateSettings.escape]\n     *  The HTML \"escape\" delimiter.\n     * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]\n     *  The \"evaluate\" delimiter.\n     * @param {Object} [options.imports=_.templateSettings.imports]\n     *  An object to import into the template as free variables.\n     * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]\n     *  The \"interpolate\" delimiter.\n     * @param {string} [options.sourceURL='lodash.templateSources[n]']\n     *  The sourceURL of the compiled template.\n     * @param {string} [options.variable='obj']\n     *  The data object variable name.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Function} Returns the compiled template function.\n     * @example\n     *\n     * // Use the \"interpolate\" delimiter to create a compiled template.\n     * var compiled = _.template('hello <%= user %>!');\n     * compiled({ 'user': 'fred' });\n     * // => 'hello fred!'\n     *\n     * // Use the HTML \"escape\" delimiter to escape data property values.\n     * var compiled = _.template('<b><%- value %></b>');\n     * compiled({ 'value': '<script>' });\n     * // => '<b>&lt;script&gt;</b>'\n     *\n     * // Use the \"evaluate\" delimiter to execute JavaScript and generate HTML.\n     * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');\n     * compiled({ 'users': ['fred', 'barney'] });\n     * // => '<li>fred</li><li>barney</li>'\n     *\n     * // Use the internal `print` function in \"evaluate\" delimiters.\n     * var compiled = _.template('<% print(\"hello \" + user); %>!');\n     * compiled({ 'user': 'barney' });\n     * // => 'hello barney!'\n     *\n     * // Use the ES template literal delimiter as an \"interpolate\" delimiter.\n     * // Disable support by replacing the \"interpolate\" delimiter.\n     * var compiled = _.template('hello ${ user }!');\n     * compiled({ 'user': 'pebbles' });\n     * // => 'hello pebbles!'\n     *\n     * // Use backslashes to treat delimiters as plain text.\n     * var compiled = _.template('<%= \"\\\\<%- value %\\\\>\" %>');\n     * compiled({ 'value': 'ignored' });\n     * // => '<%- value %>'\n     *\n     * // Use the `imports` option to import `jQuery` as `jq`.\n     * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';\n     * var compiled = _.template(text, { 'imports': { 'jq': jQuery } });\n     * compiled({ 'users': ['fred', 'barney'] });\n     * // => '<li>fred</li><li>barney</li>'\n     *\n     * // Use the `sourceURL` option to specify a custom sourceURL for the template.\n     * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });\n     * compiled(data);\n     * // => Find the source of \"greeting.jst\" under the Sources tab or Resources panel of the web inspector.\n     *\n     * // Use the `variable` option to ensure a with-statement isn't used in the compiled template.\n     * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });\n     * compiled.source;\n     * // => function(data) {\n     * //   var __t, __p = '';\n     * //   __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';\n     * //   return __p;\n     * // }\n     *\n     * // Use custom template delimiters.\n     * _.templateSettings.interpolate = /{{([\\s\\S]+?)}}/g;\n     * var compiled = _.template('hello {{ user }}!');\n     * compiled({ 'user': 'mustache' });\n     * // => 'hello mustache!'\n     *\n     * // Use the `source` property to inline compiled templates for meaningful\n     * // line numbers in error messages and stack traces.\n     * fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\\\n     *   var JST = {\\\n     *     \"main\": ' + _.template(mainText).source + '\\\n     *   };\\\n     * ');\n     */\n    function template(string, options, guard) {\n      // Based on John Resig's `tmpl` implementation\n      // (http://ejohn.org/blog/javascript-micro-templating/)\n      // and Laura Doktorova's doT.js (https://github.com/olado/doT).\n      var settings = lodash.templateSettings;\n\n      if (guard && isIterateeCall(string, options, guard)) {\n        options = undefined;\n      }\n      string = toString(string);\n      options = assignWith({}, options, settings, customDefaultsAssignIn);\n\n      var imports = assignWith({}, options.imports, settings.imports, customDefaultsAssignIn),\n          importsKeys = keys(imports),\n          importsValues = baseValues(imports, importsKeys);\n\n      arrayEach(importsKeys, function(key) {\n        if (reForbiddenIdentifierChars.test(key)) {\n          throw new Error(INVALID_TEMPL_IMPORTS_ERROR_TEXT);\n        }\n      });\n\n      var isEscaping,\n          isEvaluating,\n          index = 0,\n          interpolate = options.interpolate || reNoMatch,\n          source = \"__p += '\";\n\n      // Compile the regexp to match each delimiter.\n      var reDelimiters = RegExp(\n        (options.escape || reNoMatch).source + '|' +\n        interpolate.source + '|' +\n        (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' +\n        (options.evaluate || reNoMatch).source + '|$'\n      , 'g');\n\n      // Use a sourceURL for easier debugging.\n      // The sourceURL gets injected into the source that's eval-ed, so be careful\n      // to normalize all kinds of whitespace, so e.g. newlines (and unicode versions of it) can't sneak in\n      // and escape the comment, thus injecting code that gets evaled.\n      var sourceURL = '//# sourceURL=' +\n        (hasOwnProperty.call(options, 'sourceURL')\n          ? (options.sourceURL + '').replace(/\\s/g, ' ')\n          : ('lodash.templateSources[' + (++templateCounter) + ']')\n        ) + '\\n';\n\n      string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {\n        interpolateValue || (interpolateValue = esTemplateValue);\n\n        // Escape characters that can't be included in string literals.\n        source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);\n\n        // Replace delimiters with snippets.\n        if (escapeValue) {\n          isEscaping = true;\n          source += \"' +\\n__e(\" + escapeValue + \") +\\n'\";\n        }\n        if (evaluateValue) {\n          isEvaluating = true;\n          source += \"';\\n\" + evaluateValue + \";\\n__p += '\";\n        }\n        if (interpolateValue) {\n          source += \"' +\\n((__t = (\" + interpolateValue + \")) == null ? '' : __t) +\\n'\";\n        }\n        index = offset + match.length;\n\n        // The JS engine embedded in Adobe products needs `match` returned in\n        // order to produce the correct `offset` value.\n        return match;\n      });\n\n      source += \"';\\n\";\n\n      // If `variable` is not specified wrap a with-statement around the generated\n      // code to add the data object to the top of the scope chain.\n      var variable = hasOwnProperty.call(options, 'variable') && options.variable;\n      if (!variable) {\n        source = 'with (obj) {\\n' + source + '\\n}\\n';\n      }\n      // Throw an error if a forbidden character was found in `variable`, to prevent\n      // potential command injection attacks.\n      else if (reForbiddenIdentifierChars.test(variable)) {\n        throw new Error(INVALID_TEMPL_VAR_ERROR_TEXT);\n      }\n\n      // Cleanup code by stripping empty strings.\n      source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)\n        .replace(reEmptyStringMiddle, '$1')\n        .replace(reEmptyStringTrailing, '$1;');\n\n      // Frame code as the function body.\n      source = 'function(' + (variable || 'obj') + ') {\\n' +\n        (variable\n          ? ''\n          : 'obj || (obj = {});\\n'\n        ) +\n        \"var __t, __p = ''\" +\n        (isEscaping\n           ? ', __e = _.escape'\n           : ''\n        ) +\n        (isEvaluating\n          ? ', __j = Array.prototype.join;\\n' +\n            \"function print() { __p += __j.call(arguments, '') }\\n\"\n          : ';\\n'\n        ) +\n        source +\n        'return __p\\n}';\n\n      var result = attempt(function() {\n        return Function(importsKeys, sourceURL + 'return ' + source)\n          .apply(undefined, importsValues);\n      });\n\n      // Provide the compiled function's source by its `toString` method or\n      // the `source` property as a convenience for inlining compiled templates.\n      result.source = source;\n      if (isError(result)) {\n        throw result;\n      }\n      return result;\n    }\n\n    /**\n     * Converts `string`, as a whole, to lower case just like\n     * [String#toLowerCase](https://mdn.io/toLowerCase).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the lower cased string.\n     * @example\n     *\n     * _.toLower('--Foo-Bar--');\n     * // => '--foo-bar--'\n     *\n     * _.toLower('fooBar');\n     * // => 'foobar'\n     *\n     * _.toLower('__FOO_BAR__');\n     * // => '__foo_bar__'\n     */\n    function toLower(value) {\n      return toString(value).toLowerCase();\n    }\n\n    /**\n     * Converts `string`, as a whole, to upper case just like\n     * [String#toUpperCase](https://mdn.io/toUpperCase).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the upper cased string.\n     * @example\n     *\n     * _.toUpper('--foo-bar--');\n     * // => '--FOO-BAR--'\n     *\n     * _.toUpper('fooBar');\n     * // => 'FOOBAR'\n     *\n     * _.toUpper('__foo_bar__');\n     * // => '__FOO_BAR__'\n     */\n    function toUpper(value) {\n      return toString(value).toUpperCase();\n    }\n\n    /**\n     * Removes leading and trailing whitespace or specified characters from `string`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to trim.\n     * @param {string} [chars=whitespace] The characters to trim.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {string} Returns the trimmed string.\n     * @example\n     *\n     * _.trim('  abc  ');\n     * // => 'abc'\n     *\n     * _.trim('-_-abc-_-', '_-');\n     * // => 'abc'\n     *\n     * _.map(['  foo  ', '  bar  '], _.trim);\n     * // => ['foo', 'bar']\n     */\n    function trim(string, chars, guard) {\n      string = toString(string);\n      if (string && (guard || chars === undefined)) {\n        return baseTrim(string);\n      }\n      if (!string || !(chars = baseToString(chars))) {\n        return string;\n      }\n      var strSymbols = stringToArray(string),\n          chrSymbols = stringToArray(chars),\n          start = charsStartIndex(strSymbols, chrSymbols),\n          end = charsEndIndex(strSymbols, chrSymbols) + 1;\n\n      return castSlice(strSymbols, start, end).join('');\n    }\n\n    /**\n     * Removes trailing whitespace or specified characters from `string`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to trim.\n     * @param {string} [chars=whitespace] The characters to trim.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {string} Returns the trimmed string.\n     * @example\n     *\n     * _.trimEnd('  abc  ');\n     * // => '  abc'\n     *\n     * _.trimEnd('-_-abc-_-', '_-');\n     * // => '-_-abc'\n     */\n    function trimEnd(string, chars, guard) {\n      string = toString(string);\n      if (string && (guard || chars === undefined)) {\n        return string.slice(0, trimmedEndIndex(string) + 1);\n      }\n      if (!string || !(chars = baseToString(chars))) {\n        return string;\n      }\n      var strSymbols = stringToArray(string),\n          end = charsEndIndex(strSymbols, stringToArray(chars)) + 1;\n\n      return castSlice(strSymbols, 0, end).join('');\n    }\n\n    /**\n     * Removes leading whitespace or specified characters from `string`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to trim.\n     * @param {string} [chars=whitespace] The characters to trim.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {string} Returns the trimmed string.\n     * @example\n     *\n     * _.trimStart('  abc  ');\n     * // => 'abc  '\n     *\n     * _.trimStart('-_-abc-_-', '_-');\n     * // => 'abc-_-'\n     */\n    function trimStart(string, chars, guard) {\n      string = toString(string);\n      if (string && (guard || chars === undefined)) {\n        return string.replace(reTrimStart, '');\n      }\n      if (!string || !(chars = baseToString(chars))) {\n        return string;\n      }\n      var strSymbols = stringToArray(string),\n          start = charsStartIndex(strSymbols, stringToArray(chars));\n\n      return castSlice(strSymbols, start).join('');\n    }\n\n    /**\n     * Truncates `string` if it's longer than the given maximum string length.\n     * The last characters of the truncated string are replaced with the omission\n     * string which defaults to \"...\".\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to truncate.\n     * @param {Object} [options={}] The options object.\n     * @param {number} [options.length=30] The maximum string length.\n     * @param {string} [options.omission='...'] The string to indicate text is omitted.\n     * @param {RegExp|string} [options.separator] The separator pattern to truncate to.\n     * @returns {string} Returns the truncated string.\n     * @example\n     *\n     * _.truncate('hi-diddly-ho there, neighborino');\n     * // => 'hi-diddly-ho there, neighbo...'\n     *\n     * _.truncate('hi-diddly-ho there, neighborino', {\n     *   'length': 24,\n     *   'separator': ' '\n     * });\n     * // => 'hi-diddly-ho there,...'\n     *\n     * _.truncate('hi-diddly-ho there, neighborino', {\n     *   'length': 24,\n     *   'separator': /,? +/\n     * });\n     * // => 'hi-diddly-ho there...'\n     *\n     * _.truncate('hi-diddly-ho there, neighborino', {\n     *   'omission': ' [...]'\n     * });\n     * // => 'hi-diddly-ho there, neig [...]'\n     */\n    function truncate(string, options) {\n      var length = DEFAULT_TRUNC_LENGTH,\n          omission = DEFAULT_TRUNC_OMISSION;\n\n      if (isObject(options)) {\n        var separator = 'separator' in options ? options.separator : separator;\n        length = 'length' in options ? toInteger(options.length) : length;\n        omission = 'omission' in options ? baseToString(options.omission) : omission;\n      }\n      string = toString(string);\n\n      var strLength = string.length;\n      if (hasUnicode(string)) {\n        var strSymbols = stringToArray(string);\n        strLength = strSymbols.length;\n      }\n      if (length >= strLength) {\n        return string;\n      }\n      var end = length - stringSize(omission);\n      if (end < 1) {\n        return omission;\n      }\n      var result = strSymbols\n        ? castSlice(strSymbols, 0, end).join('')\n        : string.slice(0, end);\n\n      if (separator === undefined) {\n        return result + omission;\n      }\n      if (strSymbols) {\n        end += (result.length - end);\n      }\n      if (isRegExp(separator)) {\n        if (string.slice(end).search(separator)) {\n          var match,\n              substring = result;\n\n          if (!separator.global) {\n            separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g');\n          }\n          separator.lastIndex = 0;\n          while ((match = separator.exec(substring))) {\n            var newEnd = match.index;\n          }\n          result = result.slice(0, newEnd === undefined ? end : newEnd);\n        }\n      } else if (string.indexOf(baseToString(separator), end) != end) {\n        var index = result.lastIndexOf(separator);\n        if (index > -1) {\n          result = result.slice(0, index);\n        }\n      }\n      return result + omission;\n    }\n\n    /**\n     * The inverse of `_.escape`; this method converts the HTML entities\n     * `&amp;`, `&lt;`, `&gt;`, `&quot;`, and `&#39;` in `string` to\n     * their corresponding characters.\n     *\n     * **Note:** No other HTML entities are unescaped. To unescape additional\n     * HTML entities use a third-party library like [_he_](https://mths.be/he).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.6.0\n     * @category String\n     * @param {string} [string=''] The string to unescape.\n     * @returns {string} Returns the unescaped string.\n     * @example\n     *\n     * _.unescape('fred, barney, &amp; pebbles');\n     * // => 'fred, barney, & pebbles'\n     */\n    function unescape(string) {\n      string = toString(string);\n      return (string && reHasEscapedHtml.test(string))\n        ? string.replace(reEscapedHtml, unescapeHtmlChar)\n        : string;\n    }\n\n    /**\n     * Converts `string`, as space separated words, to upper case.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the upper cased string.\n     * @example\n     *\n     * _.upperCase('--foo-bar');\n     * // => 'FOO BAR'\n     *\n     * _.upperCase('fooBar');\n     * // => 'FOO BAR'\n     *\n     * _.upperCase('__foo_bar__');\n     * // => 'FOO BAR'\n     */\n    var upperCase = createCompounder(function(result, word, index) {\n      return result + (index ? ' ' : '') + word.toUpperCase();\n    });\n\n    /**\n     * Converts the first character of `string` to upper case.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the converted string.\n     * @example\n     *\n     * _.upperFirst('fred');\n     * // => 'Fred'\n     *\n     * _.upperFirst('FRED');\n     * // => 'FRED'\n     */\n    var upperFirst = createCaseFirst('toUpperCase');\n\n    /**\n     * Splits `string` into an array of its words.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to inspect.\n     * @param {RegExp|string} [pattern] The pattern to match words.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Array} Returns the words of `string`.\n     * @example\n     *\n     * _.words('fred, barney, & pebbles');\n     * // => ['fred', 'barney', 'pebbles']\n     *\n     * _.words('fred, barney, & pebbles', /[^, ]+/g);\n     * // => ['fred', 'barney', '&', 'pebbles']\n     */\n    function words(string, pattern, guard) {\n      string = toString(string);\n      pattern = guard ? undefined : pattern;\n\n      if (pattern === undefined) {\n        return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);\n      }\n      return string.match(pattern) || [];\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Attempts to invoke `func`, returning either the result or the caught error\n     * object. Any additional arguments are provided to `func` when it's invoked.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Util\n     * @param {Function} func The function to attempt.\n     * @param {...*} [args] The arguments to invoke `func` with.\n     * @returns {*} Returns the `func` result or error object.\n     * @example\n     *\n     * // Avoid throwing errors for invalid selectors.\n     * var elements = _.attempt(function(selector) {\n     *   return document.querySelectorAll(selector);\n     * }, '>_>');\n     *\n     * if (_.isError(elements)) {\n     *   elements = [];\n     * }\n     */\n    var attempt = baseRest(function(func, args) {\n      try {\n        return apply(func, undefined, args);\n      } catch (e) {\n        return isError(e) ? e : new Error(e);\n      }\n    });\n\n    /**\n     * Binds methods of an object to the object itself, overwriting the existing\n     * method.\n     *\n     * **Note:** This method doesn't set the \"length\" property of bound functions.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Util\n     * @param {Object} object The object to bind and assign the bound methods to.\n     * @param {...(string|string[])} methodNames The object method names to bind.\n     * @returns {Object} Returns `object`.\n     * @example\n     *\n     * var view = {\n     *   'label': 'docs',\n     *   'click': function() {\n     *     console.log('clicked ' + this.label);\n     *   }\n     * };\n     *\n     * _.bindAll(view, ['click']);\n     * jQuery(element).on('click', view.click);\n     * // => Logs 'clicked docs' when clicked.\n     */\n    var bindAll = flatRest(function(object, methodNames) {\n      arrayEach(methodNames, function(key) {\n        key = toKey(key);\n        baseAssignValue(object, key, bind(object[key], object));\n      });\n      return object;\n    });\n\n    /**\n     * Creates a function that iterates over `pairs` and invokes the corresponding\n     * function of the first predicate to return truthy. The predicate-function\n     * pairs are invoked with the `this` binding and arguments of the created\n     * function.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {Array} pairs The predicate-function pairs.\n     * @returns {Function} Returns the new composite function.\n     * @example\n     *\n     * var func = _.cond([\n     *   [_.matches({ 'a': 1 }),           _.constant('matches A')],\n     *   [_.conforms({ 'b': _.isNumber }), _.constant('matches B')],\n     *   [_.stubTrue,                      _.constant('no match')]\n     * ]);\n     *\n     * func({ 'a': 1, 'b': 2 });\n     * // => 'matches A'\n     *\n     * func({ 'a': 0, 'b': 1 });\n     * // => 'matches B'\n     *\n     * func({ 'a': '1', 'b': '2' });\n     * // => 'no match'\n     */\n    function cond(pairs) {\n      var length = pairs == null ? 0 : pairs.length,\n          toIteratee = getIteratee();\n\n      pairs = !length ? [] : arrayMap(pairs, function(pair) {\n        if (typeof pair[1] != 'function') {\n          throw new TypeError(FUNC_ERROR_TEXT);\n        }\n        return [toIteratee(pair[0]), pair[1]];\n      });\n\n      return baseRest(function(args) {\n        var index = -1;\n        while (++index < length) {\n          var pair = pairs[index];\n          if (apply(pair[0], this, args)) {\n            return apply(pair[1], this, args);\n          }\n        }\n      });\n    }\n\n    /**\n     * Creates a function that invokes the predicate properties of `source` with\n     * the corresponding property values of a given object, returning `true` if\n     * all predicates return truthy, else `false`.\n     *\n     * **Note:** The created function is equivalent to `_.conformsTo` with\n     * `source` partially applied.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {Object} source The object of property predicates to conform to.\n     * @returns {Function} Returns the new spec function.\n     * @example\n     *\n     * var objects = [\n     *   { 'a': 2, 'b': 1 },\n     *   { 'a': 1, 'b': 2 }\n     * ];\n     *\n     * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } }));\n     * // => [{ 'a': 1, 'b': 2 }]\n     */\n    function conforms(source) {\n      return baseConforms(baseClone(source, CLONE_DEEP_FLAG));\n    }\n\n    /**\n     * Creates a function that returns `value`.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.4.0\n     * @category Util\n     * @param {*} value The value to return from the new function.\n     * @returns {Function} Returns the new constant function.\n     * @example\n     *\n     * var objects = _.times(2, _.constant({ 'a': 1 }));\n     *\n     * console.log(objects);\n     * // => [{ 'a': 1 }, { 'a': 1 }]\n     *\n     * console.log(objects[0] === objects[1]);\n     * // => true\n     */\n    function constant(value) {\n      return function() {\n        return value;\n      };\n    }\n\n    /**\n     * Checks `value` to determine whether a default value should be returned in\n     * its place. The `defaultValue` is returned if `value` is `NaN`, `null`,\n     * or `undefined`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.14.0\n     * @category Util\n     * @param {*} value The value to check.\n     * @param {*} defaultValue The default value.\n     * @returns {*} Returns the resolved value.\n     * @example\n     *\n     * _.defaultTo(1, 10);\n     * // => 1\n     *\n     * _.defaultTo(undefined, 10);\n     * // => 10\n     */\n    function defaultTo(value, defaultValue) {\n      return (value == null || value !== value) ? defaultValue : value;\n    }\n\n    /**\n     * Creates a function that returns the result of invoking the given functions\n     * with the `this` binding of the created function, where each successive\n     * invocation is supplied the return value of the previous.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Util\n     * @param {...(Function|Function[])} [funcs] The functions to invoke.\n     * @returns {Function} Returns the new composite function.\n     * @see _.flowRight\n     * @example\n     *\n     * function square(n) {\n     *   return n * n;\n     * }\n     *\n     * var addSquare = _.flow([_.add, square]);\n     * addSquare(1, 2);\n     * // => 9\n     */\n    var flow = createFlow();\n\n    /**\n     * This method is like `_.flow` except that it creates a function that\n     * invokes the given functions from right to left.\n     *\n     * @static\n     * @since 3.0.0\n     * @memberOf _\n     * @category Util\n     * @param {...(Function|Function[])} [funcs] The functions to invoke.\n     * @returns {Function} Returns the new composite function.\n     * @see _.flow\n     * @example\n     *\n     * function square(n) {\n     *   return n * n;\n     * }\n     *\n     * var addSquare = _.flowRight([square, _.add]);\n     * addSquare(1, 2);\n     * // => 9\n     */\n    var flowRight = createFlow(true);\n\n    /**\n     * This method returns the first argument it receives.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Util\n     * @param {*} value Any value.\n     * @returns {*} Returns `value`.\n     * @example\n     *\n     * var object = { 'a': 1 };\n     *\n     * console.log(_.identity(object) === object);\n     * // => true\n     */\n    function identity(value) {\n      return value;\n    }\n\n    /**\n     * Creates a function that invokes `func` with the arguments of the created\n     * function. If `func` is a property name, the created function returns the\n     * property value for a given element. If `func` is an array or object, the\n     * created function returns `true` for elements that contain the equivalent\n     * source properties, otherwise it returns `false`.\n     *\n     * @static\n     * @since 4.0.0\n     * @memberOf _\n     * @category Util\n     * @param {*} [func=_.identity] The value to convert to a callback.\n     * @returns {Function} Returns the callback.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney', 'age': 36, 'active': true },\n     *   { 'user': 'fred',   'age': 40, 'active': false }\n     * ];\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));\n     * // => [{ 'user': 'barney', 'age': 36, 'active': true }]\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.filter(users, _.iteratee(['user', 'fred']));\n     * // => [{ 'user': 'fred', 'age': 40 }]\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.map(users, _.iteratee('user'));\n     * // => ['barney', 'fred']\n     *\n     * // Create custom iteratee shorthands.\n     * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) {\n     *   return !_.isRegExp(func) ? iteratee(func) : function(string) {\n     *     return func.test(string);\n     *   };\n     * });\n     *\n     * _.filter(['abc', 'def'], /ef/);\n     * // => ['def']\n     */\n    function iteratee(func) {\n      return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG));\n    }\n\n    /**\n     * Creates a function that performs a partial deep comparison between a given\n     * object and `source`, returning `true` if the given object has equivalent\n     * property values, else `false`.\n     *\n     * **Note:** The created function is equivalent to `_.isMatch` with `source`\n     * partially applied.\n     *\n     * Partial comparisons will match empty array and empty object `source`\n     * values against any array or object value, respectively. See `_.isEqual`\n     * for a list of supported value comparisons.\n     *\n     * **Note:** Multiple values can be checked by combining several matchers\n     * using `_.overSome`\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Util\n     * @param {Object} source The object of property values to match.\n     * @returns {Function} Returns the new spec function.\n     * @example\n     *\n     * var objects = [\n     *   { 'a': 1, 'b': 2, 'c': 3 },\n     *   { 'a': 4, 'b': 5, 'c': 6 }\n     * ];\n     *\n     * _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));\n     * // => [{ 'a': 4, 'b': 5, 'c': 6 }]\n     *\n     * // Checking for several possible values\n     * _.filter(objects, _.overSome([_.matches({ 'a': 1 }), _.matches({ 'a': 4 })]));\n     * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]\n     */\n    function matches(source) {\n      return baseMatches(baseClone(source, CLONE_DEEP_FLAG));\n    }\n\n    /**\n     * Creates a function that performs a partial deep comparison between the\n     * value at `path` of a given object to `srcValue`, returning `true` if the\n     * object value is equivalent, else `false`.\n     *\n     * **Note:** Partial comparisons will match empty array and empty object\n     * `srcValue` values against any array or object value, respectively. See\n     * `_.isEqual` for a list of supported value comparisons.\n     *\n     * **Note:** Multiple values can be checked by combining several matchers\n     * using `_.overSome`\n     *\n     * @static\n     * @memberOf _\n     * @since 3.2.0\n     * @category Util\n     * @param {Array|string} path The path of the property to get.\n     * @param {*} srcValue The value to match.\n     * @returns {Function} Returns the new spec function.\n     * @example\n     *\n     * var objects = [\n     *   { 'a': 1, 'b': 2, 'c': 3 },\n     *   { 'a': 4, 'b': 5, 'c': 6 }\n     * ];\n     *\n     * _.find(objects, _.matchesProperty('a', 4));\n     * // => { 'a': 4, 'b': 5, 'c': 6 }\n     *\n     * // Checking for several possible values\n     * _.filter(objects, _.overSome([_.matchesProperty('a', 1), _.matchesProperty('a', 4)]));\n     * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]\n     */\n    function matchesProperty(path, srcValue) {\n      return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));\n    }\n\n    /**\n     * Creates a function that invokes the method at `path` of a given object.\n     * Any additional arguments are provided to the invoked method.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.7.0\n     * @category Util\n     * @param {Array|string} path The path of the method to invoke.\n     * @param {...*} [args] The arguments to invoke the method with.\n     * @returns {Function} Returns the new invoker function.\n     * @example\n     *\n     * var objects = [\n     *   { 'a': { 'b': _.constant(2) } },\n     *   { 'a': { 'b': _.constant(1) } }\n     * ];\n     *\n     * _.map(objects, _.method('a.b'));\n     * // => [2, 1]\n     *\n     * _.map(objects, _.method(['a', 'b']));\n     * // => [2, 1]\n     */\n    var method = baseRest(function(path, args) {\n      return function(object) {\n        return baseInvoke(object, path, args);\n      };\n    });\n\n    /**\n     * The opposite of `_.method`; this method creates a function that invokes\n     * the method at a given path of `object`. Any additional arguments are\n     * provided to the invoked method.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.7.0\n     * @category Util\n     * @param {Object} object The object to query.\n     * @param {...*} [args] The arguments to invoke the method with.\n     * @returns {Function} Returns the new invoker function.\n     * @example\n     *\n     * var array = _.times(3, _.constant),\n     *     object = { 'a': array, 'b': array, 'c': array };\n     *\n     * _.map(['a[2]', 'c[0]'], _.methodOf(object));\n     * // => [2, 0]\n     *\n     * _.map([['a', '2'], ['c', '0']], _.methodOf(object));\n     * // => [2, 0]\n     */\n    var methodOf = baseRest(function(object, args) {\n      return function(path) {\n        return baseInvoke(object, path, args);\n      };\n    });\n\n    /**\n     * Adds all own enumerable string keyed function properties of a source\n     * object to the destination object. If `object` is a function, then methods\n     * are added to its prototype as well.\n     *\n     * **Note:** Use `_.runInContext` to create a pristine `lodash` function to\n     * avoid conflicts caused by modifying the original.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Util\n     * @param {Function|Object} [object=lodash] The destination object.\n     * @param {Object} source The object of functions to add.\n     * @param {Object} [options={}] The options object.\n     * @param {boolean} [options.chain=true] Specify whether mixins are chainable.\n     * @returns {Function|Object} Returns `object`.\n     * @example\n     *\n     * function vowels(string) {\n     *   return _.filter(string, function(v) {\n     *     return /[aeiou]/i.test(v);\n     *   });\n     * }\n     *\n     * _.mixin({ 'vowels': vowels });\n     * _.vowels('fred');\n     * // => ['e']\n     *\n     * _('fred').vowels().value();\n     * // => ['e']\n     *\n     * _.mixin({ 'vowels': vowels }, { 'chain': false });\n     * _('fred').vowels();\n     * // => ['e']\n     */\n    function mixin(object, source, options) {\n      var props = keys(source),\n          methodNames = baseFunctions(source, props);\n\n      if (options == null &&\n          !(isObject(source) && (methodNames.length || !props.length))) {\n        options = source;\n        source = object;\n        object = this;\n        methodNames = baseFunctions(source, keys(source));\n      }\n      var chain = !(isObject(options) && 'chain' in options) || !!options.chain,\n          isFunc = isFunction(object);\n\n      arrayEach(methodNames, function(methodName) {\n        var func = source[methodName];\n        object[methodName] = func;\n        if (isFunc) {\n          object.prototype[methodName] = function() {\n            var chainAll = this.__chain__;\n            if (chain || chainAll) {\n              var result = object(this.__wrapped__),\n                  actions = result.__actions__ = copyArray(this.__actions__);\n\n              actions.push({ 'func': func, 'args': arguments, 'thisArg': object });\n              result.__chain__ = chainAll;\n              return result;\n            }\n            return func.apply(object, arrayPush([this.value()], arguments));\n          };\n        }\n      });\n\n      return object;\n    }\n\n    /**\n     * Reverts the `_` variable to its previous value and returns a reference to\n     * the `lodash` function.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Util\n     * @returns {Function} Returns the `lodash` function.\n     * @example\n     *\n     * var lodash = _.noConflict();\n     */\n    function noConflict() {\n      if (root._ === this) {\n        root._ = oldDash;\n      }\n      return this;\n    }\n\n    /**\n     * This method returns `undefined`.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.3.0\n     * @category Util\n     * @example\n     *\n     * _.times(2, _.noop);\n     * // => [undefined, undefined]\n     */\n    function noop() {\n      // No operation performed.\n    }\n\n    /**\n     * Creates a function that gets the argument at index `n`. If `n` is negative,\n     * the nth argument from the end is returned.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {number} [n=0] The index of the argument to return.\n     * @returns {Function} Returns the new pass-thru function.\n     * @example\n     *\n     * var func = _.nthArg(1);\n     * func('a', 'b', 'c', 'd');\n     * // => 'b'\n     *\n     * var func = _.nthArg(-2);\n     * func('a', 'b', 'c', 'd');\n     * // => 'c'\n     */\n    function nthArg(n) {\n      n = toInteger(n);\n      return baseRest(function(args) {\n        return baseNth(args, n);\n      });\n    }\n\n    /**\n     * Creates a function that invokes `iteratees` with the arguments it receives\n     * and returns their results.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {...(Function|Function[])} [iteratees=[_.identity]]\n     *  The iteratees to invoke.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * var func = _.over([Math.max, Math.min]);\n     *\n     * func(1, 2, 3, 4);\n     * // => [4, 1]\n     */\n    var over = createOver(arrayMap);\n\n    /**\n     * Creates a function that checks if **all** of the `predicates` return\n     * truthy when invoked with the arguments it receives.\n     *\n     * Following shorthands are possible for providing predicates.\n     * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.\n     * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {...(Function|Function[])} [predicates=[_.identity]]\n     *  The predicates to check.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * var func = _.overEvery([Boolean, isFinite]);\n     *\n     * func('1');\n     * // => true\n     *\n     * func(null);\n     * // => false\n     *\n     * func(NaN);\n     * // => false\n     */\n    var overEvery = createOver(arrayEvery);\n\n    /**\n     * Creates a function that checks if **any** of the `predicates` return\n     * truthy when invoked with the arguments it receives.\n     *\n     * Following shorthands are possible for providing predicates.\n     * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.\n     * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {...(Function|Function[])} [predicates=[_.identity]]\n     *  The predicates to check.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * var func = _.overSome([Boolean, isFinite]);\n     *\n     * func('1');\n     * // => true\n     *\n     * func(null);\n     * // => true\n     *\n     * func(NaN);\n     * // => false\n     *\n     * var matchesFunc = _.overSome([{ 'a': 1 }, { 'a': 2 }])\n     * var matchesPropertyFunc = _.overSome([['a', 1], ['a', 2]])\n     */\n    var overSome = createOver(arraySome);\n\n    /**\n     * Creates a function that returns the value at `path` of a given object.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.4.0\n     * @category Util\n     * @param {Array|string} path The path of the property to get.\n     * @returns {Function} Returns the new accessor function.\n     * @example\n     *\n     * var objects = [\n     *   { 'a': { 'b': 2 } },\n     *   { 'a': { 'b': 1 } }\n     * ];\n     *\n     * _.map(objects, _.property('a.b'));\n     * // => [2, 1]\n     *\n     * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');\n     * // => [1, 2]\n     */\n    function property(path) {\n      return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);\n    }\n\n    /**\n     * The opposite of `_.property`; this method creates a function that returns\n     * the value at a given path of `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Util\n     * @param {Object} object The object to query.\n     * @returns {Function} Returns the new accessor function.\n     * @example\n     *\n     * var array = [0, 1, 2],\n     *     object = { 'a': array, 'b': array, 'c': array };\n     *\n     * _.map(['a[2]', 'c[0]'], _.propertyOf(object));\n     * // => [2, 0]\n     *\n     * _.map([['a', '2'], ['c', '0']], _.propertyOf(object));\n     * // => [2, 0]\n     */\n    function propertyOf(object) {\n      return function(path) {\n        return object == null ? undefined : baseGet(object, path);\n      };\n    }\n\n    /**\n     * Creates an array of numbers (positive and/or negative) progressing from\n     * `start` up to, but not including, `end`. A step of `-1` is used if a negative\n     * `start` is specified without an `end` or `step`. If `end` is not specified,\n     * it's set to `start` with `start` then set to `0`.\n     *\n     * **Note:** JavaScript follows the IEEE-754 standard for resolving\n     * floating-point values which can produce unexpected results.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Util\n     * @param {number} [start=0] The start of the range.\n     * @param {number} end The end of the range.\n     * @param {number} [step=1] The value to increment or decrement by.\n     * @returns {Array} Returns the range of numbers.\n     * @see _.inRange, _.rangeRight\n     * @example\n     *\n     * _.range(4);\n     * // => [0, 1, 2, 3]\n     *\n     * _.range(-4);\n     * // => [0, -1, -2, -3]\n     *\n     * _.range(1, 5);\n     * // => [1, 2, 3, 4]\n     *\n     * _.range(0, 20, 5);\n     * // => [0, 5, 10, 15]\n     *\n     * _.range(0, -4, -1);\n     * // => [0, -1, -2, -3]\n     *\n     * _.range(1, 4, 0);\n     * // => [1, 1, 1]\n     *\n     * _.range(0);\n     * // => []\n     */\n    var range = createRange();\n\n    /**\n     * This method is like `_.range` except that it populates values in\n     * descending order.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {number} [start=0] The start of the range.\n     * @param {number} end The end of the range.\n     * @param {number} [step=1] The value to increment or decrement by.\n     * @returns {Array} Returns the range of numbers.\n     * @see _.inRange, _.range\n     * @example\n     *\n     * _.rangeRight(4);\n     * // => [3, 2, 1, 0]\n     *\n     * _.rangeRight(-4);\n     * // => [-3, -2, -1, 0]\n     *\n     * _.rangeRight(1, 5);\n     * // => [4, 3, 2, 1]\n     *\n     * _.rangeRight(0, 20, 5);\n     * // => [15, 10, 5, 0]\n     *\n     * _.rangeRight(0, -4, -1);\n     * // => [-3, -2, -1, 0]\n     *\n     * _.rangeRight(1, 4, 0);\n     * // => [1, 1, 1]\n     *\n     * _.rangeRight(0);\n     * // => []\n     */\n    var rangeRight = createRange(true);\n\n    /**\n     * This method returns a new empty array.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.13.0\n     * @category Util\n     * @returns {Array} Returns the new empty array.\n     * @example\n     *\n     * var arrays = _.times(2, _.stubArray);\n     *\n     * console.log(arrays);\n     * // => [[], []]\n     *\n     * console.log(arrays[0] === arrays[1]);\n     * // => false\n     */\n    function stubArray() {\n      return [];\n    }\n\n    /**\n     * This method returns `false`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.13.0\n     * @category Util\n     * @returns {boolean} Returns `false`.\n     * @example\n     *\n     * _.times(2, _.stubFalse);\n     * // => [false, false]\n     */\n    function stubFalse() {\n      return false;\n    }\n\n    /**\n     * This method returns a new empty object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.13.0\n     * @category Util\n     * @returns {Object} Returns the new empty object.\n     * @example\n     *\n     * var objects = _.times(2, _.stubObject);\n     *\n     * console.log(objects);\n     * // => [{}, {}]\n     *\n     * console.log(objects[0] === objects[1]);\n     * // => false\n     */\n    function stubObject() {\n      return {};\n    }\n\n    /**\n     * This method returns an empty string.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.13.0\n     * @category Util\n     * @returns {string} Returns the empty string.\n     * @example\n     *\n     * _.times(2, _.stubString);\n     * // => ['', '']\n     */\n    function stubString() {\n      return '';\n    }\n\n    /**\n     * This method returns `true`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.13.0\n     * @category Util\n     * @returns {boolean} Returns `true`.\n     * @example\n     *\n     * _.times(2, _.stubTrue);\n     * // => [true, true]\n     */\n    function stubTrue() {\n      return true;\n    }\n\n    /**\n     * Invokes the iteratee `n` times, returning an array of the results of\n     * each invocation. The iteratee is invoked with one argument; (index).\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Util\n     * @param {number} n The number of times to invoke `iteratee`.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the array of results.\n     * @example\n     *\n     * _.times(3, String);\n     * // => ['0', '1', '2']\n     *\n     *  _.times(4, _.constant(0));\n     * // => [0, 0, 0, 0]\n     */\n    function times(n, iteratee) {\n      n = toInteger(n);\n      if (n < 1 || n > MAX_SAFE_INTEGER) {\n        return [];\n      }\n      var index = MAX_ARRAY_LENGTH,\n          length = nativeMin(n, MAX_ARRAY_LENGTH);\n\n      iteratee = getIteratee(iteratee);\n      n -= MAX_ARRAY_LENGTH;\n\n      var result = baseTimes(length, iteratee);\n      while (++index < n) {\n        iteratee(index);\n      }\n      return result;\n    }\n\n    /**\n     * Converts `value` to a property path array.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {*} value The value to convert.\n     * @returns {Array} Returns the new property path array.\n     * @example\n     *\n     * _.toPath('a.b.c');\n     * // => ['a', 'b', 'c']\n     *\n     * _.toPath('a[0].b.c');\n     * // => ['a', '0', 'b', 'c']\n     */\n    function toPath(value) {\n      if (isArray(value)) {\n        return arrayMap(value, toKey);\n      }\n      return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));\n    }\n\n    /**\n     * Generates a unique ID. If `prefix` is given, the ID is appended to it.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Util\n     * @param {string} [prefix=''] The value to prefix the ID with.\n     * @returns {string} Returns the unique ID.\n     * @example\n     *\n     * _.uniqueId('contact_');\n     * // => 'contact_104'\n     *\n     * _.uniqueId();\n     * // => '105'\n     */\n    function uniqueId(prefix) {\n      var id = ++idCounter;\n      return toString(prefix) + id;\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Adds two numbers.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.4.0\n     * @category Math\n     * @param {number} augend The first number in an addition.\n     * @param {number} addend The second number in an addition.\n     * @returns {number} Returns the total.\n     * @example\n     *\n     * _.add(6, 4);\n     * // => 10\n     */\n    var add = createMathOperation(function(augend, addend) {\n      return augend + addend;\n    }, 0);\n\n    /**\n     * Computes `number` rounded up to `precision`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.10.0\n     * @category Math\n     * @param {number} number The number to round up.\n     * @param {number} [precision=0] The precision to round up to.\n     * @returns {number} Returns the rounded up number.\n     * @example\n     *\n     * _.ceil(4.006);\n     * // => 5\n     *\n     * _.ceil(6.004, 2);\n     * // => 6.01\n     *\n     * _.ceil(6040, -2);\n     * // => 6100\n     */\n    var ceil = createRound('ceil');\n\n    /**\n     * Divide two numbers.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.7.0\n     * @category Math\n     * @param {number} dividend The first number in a division.\n     * @param {number} divisor The second number in a division.\n     * @returns {number} Returns the quotient.\n     * @example\n     *\n     * _.divide(6, 4);\n     * // => 1.5\n     */\n    var divide = createMathOperation(function(dividend, divisor) {\n      return dividend / divisor;\n    }, 1);\n\n    /**\n     * Computes `number` rounded down to `precision`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.10.0\n     * @category Math\n     * @param {number} number The number to round down.\n     * @param {number} [precision=0] The precision to round down to.\n     * @returns {number} Returns the rounded down number.\n     * @example\n     *\n     * _.floor(4.006);\n     * // => 4\n     *\n     * _.floor(0.046, 2);\n     * // => 0.04\n     *\n     * _.floor(4060, -2);\n     * // => 4000\n     */\n    var floor = createRound('floor');\n\n    /**\n     * Computes the maximum value of `array`. If `array` is empty or falsey,\n     * `undefined` is returned.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @returns {*} Returns the maximum value.\n     * @example\n     *\n     * _.max([4, 2, 8, 6]);\n     * // => 8\n     *\n     * _.max([]);\n     * // => undefined\n     */\n    function max(array) {\n      return (array && array.length)\n        ? baseExtremum(array, identity, baseGt)\n        : undefined;\n    }\n\n    /**\n     * This method is like `_.max` except that it accepts `iteratee` which is\n     * invoked for each element in `array` to generate the criterion by which\n     * the value is ranked. The iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {*} Returns the maximum value.\n     * @example\n     *\n     * var objects = [{ 'n': 1 }, { 'n': 2 }];\n     *\n     * _.maxBy(objects, function(o) { return o.n; });\n     * // => { 'n': 2 }\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.maxBy(objects, 'n');\n     * // => { 'n': 2 }\n     */\n    function maxBy(array, iteratee) {\n      return (array && array.length)\n        ? baseExtremum(array, getIteratee(iteratee, 2), baseGt)\n        : undefined;\n    }\n\n    /**\n     * Computes the mean of the values in `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @returns {number} Returns the mean.\n     * @example\n     *\n     * _.mean([4, 2, 8, 6]);\n     * // => 5\n     */\n    function mean(array) {\n      return baseMean(array, identity);\n    }\n\n    /**\n     * This method is like `_.mean` except that it accepts `iteratee` which is\n     * invoked for each element in `array` to generate the value to be averaged.\n     * The iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.7.0\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {number} Returns the mean.\n     * @example\n     *\n     * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];\n     *\n     * _.meanBy(objects, function(o) { return o.n; });\n     * // => 5\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.meanBy(objects, 'n');\n     * // => 5\n     */\n    function meanBy(array, iteratee) {\n      return baseMean(array, getIteratee(iteratee, 2));\n    }\n\n    /**\n     * Computes the minimum value of `array`. If `array` is empty or falsey,\n     * `undefined` is returned.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @returns {*} Returns the minimum value.\n     * @example\n     *\n     * _.min([4, 2, 8, 6]);\n     * // => 2\n     *\n     * _.min([]);\n     * // => undefined\n     */\n    function min(array) {\n      return (array && array.length)\n        ? baseExtremum(array, identity, baseLt)\n        : undefined;\n    }\n\n    /**\n     * This method is like `_.min` except that it accepts `iteratee` which is\n     * invoked for each element in `array` to generate the criterion by which\n     * the value is ranked. The iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {*} Returns the minimum value.\n     * @example\n     *\n     * var objects = [{ 'n': 1 }, { 'n': 2 }];\n     *\n     * _.minBy(objects, function(o) { return o.n; });\n     * // => { 'n': 1 }\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.minBy(objects, 'n');\n     * // => { 'n': 1 }\n     */\n    function minBy(array, iteratee) {\n      return (array && array.length)\n        ? baseExtremum(array, getIteratee(iteratee, 2), baseLt)\n        : undefined;\n    }\n\n    /**\n     * Multiply two numbers.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.7.0\n     * @category Math\n     * @param {number} multiplier The first number in a multiplication.\n     * @param {number} multiplicand The second number in a multiplication.\n     * @returns {number} Returns the product.\n     * @example\n     *\n     * _.multiply(6, 4);\n     * // => 24\n     */\n    var multiply = createMathOperation(function(multiplier, multiplicand) {\n      return multiplier * multiplicand;\n    }, 1);\n\n    /**\n     * Computes `number` rounded to `precision`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.10.0\n     * @category Math\n     * @param {number} number The number to round.\n     * @param {number} [precision=0] The precision to round to.\n     * @returns {number} Returns the rounded number.\n     * @example\n     *\n     * _.round(4.006);\n     * // => 4\n     *\n     * _.round(4.006, 2);\n     * // => 4.01\n     *\n     * _.round(4060, -2);\n     * // => 4100\n     */\n    var round = createRound('round');\n\n    /**\n     * Subtract two numbers.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Math\n     * @param {number} minuend The first number in a subtraction.\n     * @param {number} subtrahend The second number in a subtraction.\n     * @returns {number} Returns the difference.\n     * @example\n     *\n     * _.subtract(6, 4);\n     * // => 2\n     */\n    var subtract = createMathOperation(function(minuend, subtrahend) {\n      return minuend - subtrahend;\n    }, 0);\n\n    /**\n     * Computes the sum of the values in `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.4.0\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @returns {number} Returns the sum.\n     * @example\n     *\n     * _.sum([4, 2, 8, 6]);\n     * // => 20\n     */\n    function sum(array) {\n      return (array && array.length)\n        ? baseSum(array, identity)\n        : 0;\n    }\n\n    /**\n     * This method is like `_.sum` except that it accepts `iteratee` which is\n     * invoked for each element in `array` to generate the value to be summed.\n     * The iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {number} Returns the sum.\n     * @example\n     *\n     * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];\n     *\n     * _.sumBy(objects, function(o) { return o.n; });\n     * // => 20\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.sumBy(objects, 'n');\n     * // => 20\n     */\n    function sumBy(array, iteratee) {\n      return (array && array.length)\n        ? baseSum(array, getIteratee(iteratee, 2))\n        : 0;\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    // Add methods that return wrapped values in chain sequences.\n    lodash.after = after;\n    lodash.ary = ary;\n    lodash.assign = assign;\n    lodash.assignIn = assignIn;\n    lodash.assignInWith = assignInWith;\n    lodash.assignWith = assignWith;\n    lodash.at = at;\n    lodash.before = before;\n    lodash.bind = bind;\n    lodash.bindAll = bindAll;\n    lodash.bindKey = bindKey;\n    lodash.castArray = castArray;\n    lodash.chain = chain;\n    lodash.chunk = chunk;\n    lodash.compact = compact;\n    lodash.concat = concat;\n    lodash.cond = cond;\n    lodash.conforms = conforms;\n    lodash.constant = constant;\n    lodash.countBy = countBy;\n    lodash.create = create;\n    lodash.curry = curry;\n    lodash.curryRight = curryRight;\n    lodash.debounce = debounce;\n    lodash.defaults = defaults;\n    lodash.defaultsDeep = defaultsDeep;\n    lodash.defer = defer;\n    lodash.delay = delay;\n    lodash.difference = difference;\n    lodash.differenceBy = differenceBy;\n    lodash.differenceWith = differenceWith;\n    lodash.drop = drop;\n    lodash.dropRight = dropRight;\n    lodash.dropRightWhile = dropRightWhile;\n    lodash.dropWhile = dropWhile;\n    lodash.fill = fill;\n    lodash.filter = filter;\n    lodash.flatMap = flatMap;\n    lodash.flatMapDeep = flatMapDeep;\n    lodash.flatMapDepth = flatMapDepth;\n    lodash.flatten = flatten;\n    lodash.flattenDeep = flattenDeep;\n    lodash.flattenDepth = flattenDepth;\n    lodash.flip = flip;\n    lodash.flow = flow;\n    lodash.flowRight = flowRight;\n    lodash.fromPairs = fromPairs;\n    lodash.functions = functions;\n    lodash.functionsIn = functionsIn;\n    lodash.groupBy = groupBy;\n    lodash.initial = initial;\n    lodash.intersection = intersection;\n    lodash.intersectionBy = intersectionBy;\n    lodash.intersectionWith = intersectionWith;\n    lodash.invert = invert;\n    lodash.invertBy = invertBy;\n    lodash.invokeMap = invokeMap;\n    lodash.iteratee = iteratee;\n    lodash.keyBy = keyBy;\n    lodash.keys = keys;\n    lodash.keysIn = keysIn;\n    lodash.map = map;\n    lodash.mapKeys = mapKeys;\n    lodash.mapValues = mapValues;\n    lodash.matches = matches;\n    lodash.matchesProperty = matchesProperty;\n    lodash.memoize = memoize;\n    lodash.merge = merge;\n    lodash.mergeWith = mergeWith;\n    lodash.method = method;\n    lodash.methodOf = methodOf;\n    lodash.mixin = mixin;\n    lodash.negate = negate;\n    lodash.nthArg = nthArg;\n    lodash.omit = omit;\n    lodash.omitBy = omitBy;\n    lodash.once = once;\n    lodash.orderBy = orderBy;\n    lodash.over = over;\n    lodash.overArgs = overArgs;\n    lodash.overEvery = overEvery;\n    lodash.overSome = overSome;\n    lodash.partial = partial;\n    lodash.partialRight = partialRight;\n    lodash.partition = partition;\n    lodash.pick = pick;\n    lodash.pickBy = pickBy;\n    lodash.property = property;\n    lodash.propertyOf = propertyOf;\n    lodash.pull = pull;\n    lodash.pullAll = pullAll;\n    lodash.pullAllBy = pullAllBy;\n    lodash.pullAllWith = pullAllWith;\n    lodash.pullAt = pullAt;\n    lodash.range = range;\n    lodash.rangeRight = rangeRight;\n    lodash.rearg = rearg;\n    lodash.reject = reject;\n    lodash.remove = remove;\n    lodash.rest = rest;\n    lodash.reverse = reverse;\n    lodash.sampleSize = sampleSize;\n    lodash.set = set;\n    lodash.setWith = setWith;\n    lodash.shuffle = shuffle;\n    lodash.slice = slice;\n    lodash.sortBy = sortBy;\n    lodash.sortedUniq = sortedUniq;\n    lodash.sortedUniqBy = sortedUniqBy;\n    lodash.split = split;\n    lodash.spread = spread;\n    lodash.tail = tail;\n    lodash.take = take;\n    lodash.takeRight = takeRight;\n    lodash.takeRightWhile = takeRightWhile;\n    lodash.takeWhile = takeWhile;\n    lodash.tap = tap;\n    lodash.throttle = throttle;\n    lodash.thru = thru;\n    lodash.toArray = toArray;\n    lodash.toPairs = toPairs;\n    lodash.toPairsIn = toPairsIn;\n    lodash.toPath = toPath;\n    lodash.toPlainObject = toPlainObject;\n    lodash.transform = transform;\n    lodash.unary = unary;\n    lodash.union = union;\n    lodash.unionBy = unionBy;\n    lodash.unionWith = unionWith;\n    lodash.uniq = uniq;\n    lodash.uniqBy = uniqBy;\n    lodash.uniqWith = uniqWith;\n    lodash.unset = unset;\n    lodash.unzip = unzip;\n    lodash.unzipWith = unzipWith;\n    lodash.update = update;\n    lodash.updateWith = updateWith;\n    lodash.values = values;\n    lodash.valuesIn = valuesIn;\n    lodash.without = without;\n    lodash.words = words;\n    lodash.wrap = wrap;\n    lodash.xor = xor;\n    lodash.xorBy = xorBy;\n    lodash.xorWith = xorWith;\n    lodash.zip = zip;\n    lodash.zipObject = zipObject;\n    lodash.zipObjectDeep = zipObjectDeep;\n    lodash.zipWith = zipWith;\n\n    // Add aliases.\n    lodash.entries = toPairs;\n    lodash.entriesIn = toPairsIn;\n    lodash.extend = assignIn;\n    lodash.extendWith = assignInWith;\n\n    // Add methods to `lodash.prototype`.\n    mixin(lodash, lodash);\n\n    /*------------------------------------------------------------------------*/\n\n    // Add methods that return unwrapped values in chain sequences.\n    lodash.add = add;\n    lodash.attempt = attempt;\n    lodash.camelCase = camelCase;\n    lodash.capitalize = capitalize;\n    lodash.ceil = ceil;\n    lodash.clamp = clamp;\n    lodash.clone = clone;\n    lodash.cloneDeep = cloneDeep;\n    lodash.cloneDeepWith = cloneDeepWith;\n    lodash.cloneWith = cloneWith;\n    lodash.conformsTo = conformsTo;\n    lodash.deburr = deburr;\n    lodash.defaultTo = defaultTo;\n    lodash.divide = divide;\n    lodash.endsWith = endsWith;\n    lodash.eq = eq;\n    lodash.escape = escape;\n    lodash.escapeRegExp = escapeRegExp;\n    lodash.every = every;\n    lodash.find = find;\n    lodash.findIndex = findIndex;\n    lodash.findKey = findKey;\n    lodash.findLast = findLast;\n    lodash.findLastIndex = findLastIndex;\n    lodash.findLastKey = findLastKey;\n    lodash.floor = floor;\n    lodash.forEach = forEach;\n    lodash.forEachRight = forEachRight;\n    lodash.forIn = forIn;\n    lodash.forInRight = forInRight;\n    lodash.forOwn = forOwn;\n    lodash.forOwnRight = forOwnRight;\n    lodash.get = get;\n    lodash.gt = gt;\n    lodash.gte = gte;\n    lodash.has = has;\n    lodash.hasIn = hasIn;\n    lodash.head = head;\n    lodash.identity = identity;\n    lodash.includes = includes;\n    lodash.indexOf = indexOf;\n    lodash.inRange = inRange;\n    lodash.invoke = invoke;\n    lodash.isArguments = isArguments;\n    lodash.isArray = isArray;\n    lodash.isArrayBuffer = isArrayBuffer;\n    lodash.isArrayLike = isArrayLike;\n    lodash.isArrayLikeObject = isArrayLikeObject;\n    lodash.isBoolean = isBoolean;\n    lodash.isBuffer = isBuffer;\n    lodash.isDate = isDate;\n    lodash.isElement = isElement;\n    lodash.isEmpty = isEmpty;\n    lodash.isEqual = isEqual;\n    lodash.isEqualWith = isEqualWith;\n    lodash.isError = isError;\n    lodash.isFinite = isFinite;\n    lodash.isFunction = isFunction;\n    lodash.isInteger = isInteger;\n    lodash.isLength = isLength;\n    lodash.isMap = isMap;\n    lodash.isMatch = isMatch;\n    lodash.isMatchWith = isMatchWith;\n    lodash.isNaN = isNaN;\n    lodash.isNative = isNative;\n    lodash.isNil = isNil;\n    lodash.isNull = isNull;\n    lodash.isNumber = isNumber;\n    lodash.isObject = isObject;\n    lodash.isObjectLike = isObjectLike;\n    lodash.isPlainObject = isPlainObject;\n    lodash.isRegExp = isRegExp;\n    lodash.isSafeInteger = isSafeInteger;\n    lodash.isSet = isSet;\n    lodash.isString = isString;\n    lodash.isSymbol = isSymbol;\n    lodash.isTypedArray = isTypedArray;\n    lodash.isUndefined = isUndefined;\n    lodash.isWeakMap = isWeakMap;\n    lodash.isWeakSet = isWeakSet;\n    lodash.join = join;\n    lodash.kebabCase = kebabCase;\n    lodash.last = last;\n    lodash.lastIndexOf = lastIndexOf;\n    lodash.lowerCase = lowerCase;\n    lodash.lowerFirst = lowerFirst;\n    lodash.lt = lt;\n    lodash.lte = lte;\n    lodash.max = max;\n    lodash.maxBy = maxBy;\n    lodash.mean = mean;\n    lodash.meanBy = meanBy;\n    lodash.min = min;\n    lodash.minBy = minBy;\n    lodash.stubArray = stubArray;\n    lodash.stubFalse = stubFalse;\n    lodash.stubObject = stubObject;\n    lodash.stubString = stubString;\n    lodash.stubTrue = stubTrue;\n    lodash.multiply = multiply;\n    lodash.nth = nth;\n    lodash.noConflict = noConflict;\n    lodash.noop = noop;\n    lodash.now = now;\n    lodash.pad = pad;\n    lodash.padEnd = padEnd;\n    lodash.padStart = padStart;\n    lodash.parseInt = parseInt;\n    lodash.random = random;\n    lodash.reduce = reduce;\n    lodash.reduceRight = reduceRight;\n    lodash.repeat = repeat;\n    lodash.replace = replace;\n    lodash.result = result;\n    lodash.round = round;\n    lodash.runInContext = runInContext;\n    lodash.sample = sample;\n    lodash.size = size;\n    lodash.snakeCase = snakeCase;\n    lodash.some = some;\n    lodash.sortedIndex = sortedIndex;\n    lodash.sortedIndexBy = sortedIndexBy;\n    lodash.sortedIndexOf = sortedIndexOf;\n    lodash.sortedLastIndex = sortedLastIndex;\n    lodash.sortedLastIndexBy = sortedLastIndexBy;\n    lodash.sortedLastIndexOf = sortedLastIndexOf;\n    lodash.startCase = startCase;\n    lodash.startsWith = startsWith;\n    lodash.subtract = subtract;\n    lodash.sum = sum;\n    lodash.sumBy = sumBy;\n    lodash.template = template;\n    lodash.times = times;\n    lodash.toFinite = toFinite;\n    lodash.toInteger = toInteger;\n    lodash.toLength = toLength;\n    lodash.toLower = toLower;\n    lodash.toNumber = toNumber;\n    lodash.toSafeInteger = toSafeInteger;\n    lodash.toString = toString;\n    lodash.toUpper = toUpper;\n    lodash.trim = trim;\n    lodash.trimEnd = trimEnd;\n    lodash.trimStart = trimStart;\n    lodash.truncate = truncate;\n    lodash.unescape = unescape;\n    lodash.uniqueId = uniqueId;\n    lodash.upperCase = upperCase;\n    lodash.upperFirst = upperFirst;\n\n    // Add aliases.\n    lodash.each = forEach;\n    lodash.eachRight = forEachRight;\n    lodash.first = head;\n\n    mixin(lodash, (function() {\n      var source = {};\n      baseForOwn(lodash, function(func, methodName) {\n        if (!hasOwnProperty.call(lodash.prototype, methodName)) {\n          source[methodName] = func;\n        }\n      });\n      return source;\n    }()), { 'chain': false });\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * The semantic version number.\n     *\n     * @static\n     * @memberOf _\n     * @type {string}\n     */\n    lodash.VERSION = VERSION;\n\n    // Assign default placeholders.\n    arrayEach(['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], function(methodName) {\n      lodash[methodName].placeholder = lodash;\n    });\n\n    // Add `LazyWrapper` methods for `_.drop` and `_.take` variants.\n    arrayEach(['drop', 'take'], function(methodName, index) {\n      LazyWrapper.prototype[methodName] = function(n) {\n        n = n === undefined ? 1 : nativeMax(toInteger(n), 0);\n\n        var result = (this.__filtered__ && !index)\n          ? new LazyWrapper(this)\n          : this.clone();\n\n        if (result.__filtered__) {\n          result.__takeCount__ = nativeMin(n, result.__takeCount__);\n        } else {\n          result.__views__.push({\n            'size': nativeMin(n, MAX_ARRAY_LENGTH),\n            'type': methodName + (result.__dir__ < 0 ? 'Right' : '')\n          });\n        }\n        return result;\n      };\n\n      LazyWrapper.prototype[methodName + 'Right'] = function(n) {\n        return this.reverse()[methodName](n).reverse();\n      };\n    });\n\n    // Add `LazyWrapper` methods that accept an `iteratee` value.\n    arrayEach(['filter', 'map', 'takeWhile'], function(methodName, index) {\n      var type = index + 1,\n          isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;\n\n      LazyWrapper.prototype[methodName] = function(iteratee) {\n        var result = this.clone();\n        result.__iteratees__.push({\n          'iteratee': getIteratee(iteratee, 3),\n          'type': type\n        });\n        result.__filtered__ = result.__filtered__ || isFilter;\n        return result;\n      };\n    });\n\n    // Add `LazyWrapper` methods for `_.head` and `_.last`.\n    arrayEach(['head', 'last'], function(methodName, index) {\n      var takeName = 'take' + (index ? 'Right' : '');\n\n      LazyWrapper.prototype[methodName] = function() {\n        return this[takeName](1).value()[0];\n      };\n    });\n\n    // Add `LazyWrapper` methods for `_.initial` and `_.tail`.\n    arrayEach(['initial', 'tail'], function(methodName, index) {\n      var dropName = 'drop' + (index ? '' : 'Right');\n\n      LazyWrapper.prototype[methodName] = function() {\n        return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);\n      };\n    });\n\n    LazyWrapper.prototype.compact = function() {\n      return this.filter(identity);\n    };\n\n    LazyWrapper.prototype.find = function(predicate) {\n      return this.filter(predicate).head();\n    };\n\n    LazyWrapper.prototype.findLast = function(predicate) {\n      return this.reverse().find(predicate);\n    };\n\n    LazyWrapper.prototype.invokeMap = baseRest(function(path, args) {\n      if (typeof path == 'function') {\n        return new LazyWrapper(this);\n      }\n      return this.map(function(value) {\n        return baseInvoke(value, path, args);\n      });\n    });\n\n    LazyWrapper.prototype.reject = function(predicate) {\n      return this.filter(negate(getIteratee(predicate)));\n    };\n\n    LazyWrapper.prototype.slice = function(start, end) {\n      start = toInteger(start);\n\n      var result = this;\n      if (result.__filtered__ && (start > 0 || end < 0)) {\n        return new LazyWrapper(result);\n      }\n      if (start < 0) {\n        result = result.takeRight(-start);\n      } else if (start) {\n        result = result.drop(start);\n      }\n      if (end !== undefined) {\n        end = toInteger(end);\n        result = end < 0 ? result.dropRight(-end) : result.take(end - start);\n      }\n      return result;\n    };\n\n    LazyWrapper.prototype.takeRightWhile = function(predicate) {\n      return this.reverse().takeWhile(predicate).reverse();\n    };\n\n    LazyWrapper.prototype.toArray = function() {\n      return this.take(MAX_ARRAY_LENGTH);\n    };\n\n    // Add `LazyWrapper` methods to `lodash.prototype`.\n    baseForOwn(LazyWrapper.prototype, function(func, methodName) {\n      var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName),\n          isTaker = /^(?:head|last)$/.test(methodName),\n          lodashFunc = lodash[isTaker ? ('take' + (methodName == 'last' ? 'Right' : '')) : methodName],\n          retUnwrapped = isTaker || /^find/.test(methodName);\n\n      if (!lodashFunc) {\n        return;\n      }\n      lodash.prototype[methodName] = function() {\n        var value = this.__wrapped__,\n            args = isTaker ? [1] : arguments,\n            isLazy = value instanceof LazyWrapper,\n            iteratee = args[0],\n            useLazy = isLazy || isArray(value);\n\n        var interceptor = function(value) {\n          var result = lodashFunc.apply(lodash, arrayPush([value], args));\n          return (isTaker && chainAll) ? result[0] : result;\n        };\n\n        if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) {\n          // Avoid lazy use if the iteratee has a \"length\" value other than `1`.\n          isLazy = useLazy = false;\n        }\n        var chainAll = this.__chain__,\n            isHybrid = !!this.__actions__.length,\n            isUnwrapped = retUnwrapped && !chainAll,\n            onlyLazy = isLazy && !isHybrid;\n\n        if (!retUnwrapped && useLazy) {\n          value = onlyLazy ? value : new LazyWrapper(this);\n          var result = func.apply(value, args);\n          result.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined });\n          return new LodashWrapper(result, chainAll);\n        }\n        if (isUnwrapped && onlyLazy) {\n          return func.apply(this, args);\n        }\n        result = this.thru(interceptor);\n        return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result;\n      };\n    });\n\n    // Add `Array` methods to `lodash.prototype`.\n    arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) {\n      var func = arrayProto[methodName],\n          chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',\n          retUnwrapped = /^(?:pop|shift)$/.test(methodName);\n\n      lodash.prototype[methodName] = function() {\n        var args = arguments;\n        if (retUnwrapped && !this.__chain__) {\n          var value = this.value();\n          return func.apply(isArray(value) ? value : [], args);\n        }\n        return this[chainName](function(value) {\n          return func.apply(isArray(value) ? value : [], args);\n        });\n      };\n    });\n\n    // Map minified method names to their real names.\n    baseForOwn(LazyWrapper.prototype, function(func, methodName) {\n      var lodashFunc = lodash[methodName];\n      if (lodashFunc) {\n        var key = lodashFunc.name + '';\n        if (!hasOwnProperty.call(realNames, key)) {\n          realNames[key] = [];\n        }\n        realNames[key].push({ 'name': methodName, 'func': lodashFunc });\n      }\n    });\n\n    realNames[createHybrid(undefined, WRAP_BIND_KEY_FLAG).name] = [{\n      'name': 'wrapper',\n      'func': undefined\n    }];\n\n    // Add methods to `LazyWrapper`.\n    LazyWrapper.prototype.clone = lazyClone;\n    LazyWrapper.prototype.reverse = lazyReverse;\n    LazyWrapper.prototype.value = lazyValue;\n\n    // Add chain sequence methods to the `lodash` wrapper.\n    lodash.prototype.at = wrapperAt;\n    lodash.prototype.chain = wrapperChain;\n    lodash.prototype.commit = wrapperCommit;\n    lodash.prototype.next = wrapperNext;\n    lodash.prototype.plant = wrapperPlant;\n    lodash.prototype.reverse = wrapperReverse;\n    lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;\n\n    // Add lazy aliases.\n    lodash.prototype.first = lodash.prototype.head;\n\n    if (symIterator) {\n      lodash.prototype[symIterator] = wrapperToIterator;\n    }\n    return lodash;\n  });\n\n  /*--------------------------------------------------------------------------*/\n\n  // Export lodash.\n  var _ = runInContext();\n\n  // Some AMD build optimizers, like r.js, check for condition patterns like:\n  if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) {\n    // Expose Lodash on the global object to prevent errors when Lodash is\n    // loaded by a script tag in the presence of an AMD loader.\n    // See http://requirejs.org/docs/errors.html#mismatch for more details.\n    // Use `_.noConflict` to remove Lodash from the global object.\n    root._ = _;\n\n    // Define as an anonymous module so, through path mapping, it can be\n    // referenced as the \"underscore\" module.\n    define(function() {\n      return _;\n    });\n  }\n  // Check for `exports` after `define` in case a build optimizer adds it.\n  else if (freeModule) {\n    // Export for Node.js.\n    (freeModule.exports = _)._ = _;\n    // Export for CommonJS support.\n    freeExports._ = _;\n  }\n  else {\n    // Export to the global object.\n    root._ = _;\n  }\n}.call(this));\n", "export default class BufferParameters {\n  constructor() {\n    BufferParameters.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this._quadrantSegments = BufferParameters.DEFAULT_QUADRANT_SEGMENTS\n    this._endCapStyle = BufferParameters.CAP_ROUND\n    this._joinStyle = BufferParameters.JOIN_ROUND\n    this._mitreLimit = BufferParameters.DEFAULT_MITRE_LIMIT\n    this._isSingleSided = false\n    this._simplifyFactor = BufferParameters.DEFAULT_SIMPLIFY_FACTOR\n    if (arguments.length === 0) {} else if (arguments.length === 1) {\n      const quadrantSegments = arguments[0]\n      this.setQuadrantSegments(quadrantSegments)\n    } else if (arguments.length === 2) {\n      const quadrantSegments = arguments[0], endCapStyle = arguments[1]\n      this.setQuadrantSegments(quadrantSegments)\n      this.setEndCapStyle(endCapStyle)\n    } else if (arguments.length === 4) {\n      const quadrantSegments = arguments[0], endCapStyle = arguments[1], joinStyle = arguments[2], mitreLimit = arguments[3]\n      this.setQuadrantSegments(quadrantSegments)\n      this.setEndCapStyle(endCapStyle)\n      this.setJoinStyle(joinStyle)\n      this.setMitreLimit(mitreLimit)\n    }\n  }\n  static bufferDistanceError(quadSegs) {\n    const alpha = Math.PI / 2.0 / quadSegs\n    return 1 - Math.cos(alpha / 2.0)\n  }\n  getEndCapStyle() {\n    return this._endCapStyle\n  }\n  isSingleSided() {\n    return this._isSingleSided\n  }\n  setQuadrantSegments(quadSegs) {\n    this._quadrantSegments = quadSegs\n    if (this._quadrantSegments === 0) this._joinStyle = BufferParameters.JOIN_BEVEL\n    if (this._quadrantSegments < 0) {\n      this._joinStyle = BufferParameters.JOIN_MITRE\n      this._mitreLimit = Math.abs(this._quadrantSegments)\n    }\n    if (quadSegs <= 0) \n      this._quadrantSegments = 1\n    \n    if (this._joinStyle !== BufferParameters.JOIN_ROUND) \n      this._quadrantSegments = BufferParameters.DEFAULT_QUADRANT_SEGMENTS\n    \n  }\n  getJoinStyle() {\n    return this._joinStyle\n  }\n  setJoinStyle(joinStyle) {\n    this._joinStyle = joinStyle\n  }\n  setSimplifyFactor(simplifyFactor) {\n    this._simplifyFactor = simplifyFactor < 0 ? 0 : simplifyFactor\n  }\n  getSimplifyFactor() {\n    return this._simplifyFactor\n  }\n  getQuadrantSegments() {\n    return this._quadrantSegments\n  }\n  setEndCapStyle(endCapStyle) {\n    this._endCapStyle = endCapStyle\n  }\n  getMitreLimit() {\n    return this._mitreLimit\n  }\n  setMitreLimit(mitreLimit) {\n    this._mitreLimit = mitreLimit\n  }\n  setSingleSided(isSingleSided) {\n    this._isSingleSided = isSingleSided\n  }\n}\nBufferParameters.CAP_ROUND = 1\nBufferParameters.CAP_FLAT = 2\nBufferParameters.CAP_SQUARE = 3\nBufferParameters.JOIN_ROUND = 1\nBufferParameters.JOIN_MITRE = 2\nBufferParameters.JOIN_BEVEL = 3\nBufferParameters.DEFAULT_QUADRANT_SEGMENTS = 8\nBufferParameters.DEFAULT_MITRE_LIMIT = 5.0\nBufferParameters.DEFAULT_SIMPLIFY_FACTOR = 0.01\n", "export default class Exception extends Error {\n  constructor(message) {\n    super(message)\n    this.name = Object.keys({ Exception })[0]\n  }\n  toString() {\n    return this.message\n  }\n}\n", "import Exception from './Exception'\n\nexport default class IllegalArgumentException extends Exception {\n  constructor(message) {\n    super(message)\n    this.name = Object.keys({ IllegalArgumentException })[0]\n  }\n}\n", "export default class GeometryComponentFilter {\n  filter(geom) {}\n}\n", "export default function Comparable() {}\n", "export default function Clonable() {}\n", "export default function Serializable() {}\n", "import Long from './Long'\n\nexport default function Double() { }\n\nDouble.NaN = NaN\nDouble.isNaN = n => Number.isNaN(n)\nDouble.isInfinite = n => !Number.isFinite(n)\nDouble.MAX_VALUE = Number.MAX_VALUE\nDouble.POSITIVE_INFINITY = Number.POSITIVE_INFINITY\nDouble.NEGATIVE_INFINITY = Number.NEGATIVE_INFINITY\n\nif (typeof Float64Array === 'function' &&\n  typeof Int32Array === 'function')\n// Simple and fast conversion between double and long bits\n// using TypedArrays and ArrayViewBuffers.\n\n  (function() {\n    const EXP_BIT_MASK = 0x7ff00000\n    const SIGNIF_BIT_MASK = 0xFFFFF\n    const f64buf = new Float64Array(1)\n    const i32buf = new Int32Array(f64buf.buffer)\n    Double.doubleToLongBits = function(value) {\n      f64buf[0] = value\n      let low = i32buf[0] | 0\n      let high = i32buf[1] | 0\n      // Check for NaN based on values of bit fields, maximum\n      // exponent and nonzero significand.\n      if (((high & EXP_BIT_MASK) === EXP_BIT_MASK) &&\n        ((high & SIGNIF_BIT_MASK) !== 0) &&\n        (low !== 0)) {\n        low = 0 | 0\n        high = 0x7ff80000 | 0\n      }\n      return new Long(high, low)\n    }\n    Double.longBitsToDouble = function(bits) {\n      i32buf[0] = bits.low\n      i32buf[1] = bits.high\n      return f64buf[0]\n    }\n  })()\nelse\n// More complex and slower fallback implementation using\n// math and the divide-by-two and multiply-by-two algorithms.\n\n  (function() {\n    const BIAS = 1023\n    const log2 = Math.log2\n    const floor = Math.floor\n    const pow = Math.pow\n    const MAX_REL_BITS_INTEGER = (function() {\n      for (let i = 53; i > 0; i--) {\n        const bits = pow(2, i) - 1\n        if (floor(log2(bits)) + 1 === i) return bits\n      }\n      return 0\n    })()\n    Double.doubleToLongBits = function(value) {\n      let x, y, f, bits, skip\n      let sign, exp, high, low\n\n      // Get the sign bit and absolute value.\n      if (value < 0 || 1 / value === Number.NEGATIVE_INFINITY) {\n        sign = (1 << 31)\n        value = (-value)\n      } else {\n        sign = 0\n      }\n\n      // Handle some special values.\n      if (value === 0) {\n        // Handle zeros (+/-0).\n        low = 0 | 0\n        high = sign // exponent: 00..00, significand: 00..00\n        return new Long(high, low)\n      }\n\n      if (value === Infinity) {\n        // Handle infinity (only positive values for value possible).\n        low = 0 | 0\n        high = sign | 0x7ff00000 // exponent: 11..11, significand: 00..00\n        return new Long(high, low)\n      }\n\n      if (value !== value) { // eslint-disable-line\n        // Handle NaNs (boiled down to only one distinct NaN).\n        low = 0 | 0\n        high = 0x7ff80000 // exponent: 11..11, significand: 10..00\n        return new Long(high, low)\n      }\n\n      // Preinitialize variables, that are not neccessarily set by\n      // the algorithm.\n      bits = 0\n      low = 0 | 0\n\n      // Get the (always positive) integer part of value.\n      x = floor(value)\n\n      // Process the integer part if it's greater than 1. Zero requires\n      // no bits at all, 1 represents the implicit (hidden) leading bit,\n      // which must not be written as well.\n      if (x > 1)\n      // If we can reliably determine the number of bits required for\n      // the integer part,\n\n        if (x <= MAX_REL_BITS_INTEGER) {\n          // get the number of bits required to represent it minus 1\n          bits = floor(log2(x)) /* + 1 - 1 */\n          // and simply copy/shift the integer bits into low and high.\n          // That's much faster than the divide-by-two algorithm (saves\n          // up to ~60%).\n          // We always need to mask out the most significant bit, which\n          // is the implicit (aka hidden) bit.\n          if (bits <= 20) {\n            // The simple case in which the integer fits into the\n            // lower 20 bits of the high word is worth to be handled\n            // separately (saves ~25%).\n            low = 0 | 0\n            high = (x << (20 - bits)) & 0xfffff\n          } else {\n            // Here, the integer part is split into low and high.\n            // Since its value may require more than 32 bits, we\n            // cannot use bitwise operators (which implicitly cast\n            // to Int32), but use arithmetic operators % and / to\n            // get low and high parts. The uppper 20 bits go to high,\n            // the remaining bits (in f) to low.\n            f = bits - 20\n            // Like (1 << f) but safe with even more than 32 bits.\n            y = pow(2, f)\n            low = (x % y) << (32 - f)\n            high = (x / y) & 0xfffff\n          }\n        } else {\n          // For greater values, we must use the much slower divide-by-two\n          // algorithm. Bits are generated from right to left, that is from\n          // least to most significant bit. For each bit, we left-shift both\n          // low and high by one and carry bit #0 from high to #31 in low.\n          // The next bit is then copied into bit #19 in high, the leftmost\n          // bit of the double's significand.\n\n          // Preserve x for later user, so work with f.\n          f = x\n          low = 0 | 0\n          for (;;) {\n            y = f / 2\n            f = floor(y)\n            if (f === 0)\n            // We just found the most signigicant (1-)bit, which\n            // is the implicit bit and so, not stored in the double\n            // value. So, it's time to leave the loop.\n              break\n\n            // Count this bit, shift low and carry bit #0 from high.\n            bits++\n            low >>>= 1\n            low |= (high & 0x1) << 31\n            // Shift high.\n            high >>>= 1\n            if (y !== f)\n            // Copy the new bit into bit #19 in high (only required if 1).\n              high |= 0x80000\n          }\n        }\n\n      // Bias the exponent.\n      exp = bits + BIAS\n\n      // If the integer part is zero, we've not yet seen the implicit\n      // leading bit. Variable skip is later used while processing the\n      // fractional part (if any).\n      skip = (x === 0)\n\n      // Get fraction only into x.\n      x = value - x\n\n      // If some significand bits are still left to be filled and\n      // the fractional part is not zero, convert the fraction using\n      // the multiply-by-2 algorithm.\n      if (bits < 52 && x !== 0) {\n        // Initialize 'buffer' f, into which newly created bits get\n        // shifted from right to left.\n        f = 0\n\n        for (;;) {\n          y = x * 2\n          if (y >= 1) {\n            // This is a new 1-bit. Add and count this bit, if not\n            // prohibited by skip.\n            x = y - 1\n            if (!skip) {\n              f <<= 1\n              f |= 1\n              bits++\n            } else {\n              // Otherwise, decrement the exponent and unset\n              // skip, so that all following bits get written.\n              exp--\n              skip = false\n            }\n          } else {\n            // This is a new 0-bit. Add and count this bit, if not\n            // prohibited by skip.\n            x = y\n            if (!skip) {\n              f <<= 1\n              bits++\n            } else if (--exp === 0) {\n              // Otherwise we've just decremented the exponent. If the\n              // biased exponent is zero now (-1023), we process a\n              // subnormal number, which has no impled leading 1-bit.\n              // So, count this 0-bit and unset skip to write out\n              // all the following bits.\n              bits++\n              skip = false\n            }\n          }\n          if (bits === 20) {\n            // When 20 bits have been created in total, we're done with\n            // the high word. Copy the bits from 'buffer' f into high\n            // and reset 'buffer' f. Following bits will end up in the\n            // low word.\n            high |= f\n            f = 0\n          } else if (bits === 52) {\n            // When 52 bits have been created in total, we're done with\n            // low word as well. Copy the bits from 'buffer' f into low\n            // and exit the loop.\n            low |= f\n            break\n          }\n          if (y === 1) {\n            // When y is exactly 1, there is no remainder and the process\n            // is complete (the number is finite). Copy the bits from\n            // 'buffer' f into either low or high and exit the loop.\n            if (bits < 20)\n              high |= (f << (20 - bits))\n            else if (bits < 52) low |= (f << (52 - bits))\n\n            break\n          }\n        }\n      }\n\n      // Copy/shift the exponent and sign bits into the high word.\n      high |= (exp << 20)\n      high |= sign\n\n      return new Long(high, low)\n    }\n    Double.longBitsToDouble = function(bits) {\n      let i\n      let x, exp, fract\n      const high = bits.high\n      const low = bits.low\n\n      // Extract the sign.\n      const sign = (high & (1 << 31)) ? -1 : 1\n\n      // Extract the unbiased exponent.\n      exp = ((high & 0x7ff00000) >> 20) - BIAS\n\n      // Calculate the fraction from left to right. Start\n      // off with the 20 lower bits from the high word.\n      fract = 0\n      x = (1 << 19)\n      for (i = 1; i <= 20; i++) {\n        if (high & x) fract += pow(2, -i)\n\n        x >>>= 1\n      }\n      // Continue with all 32 bits from the low word.\n      x = (1 << 31)\n      for (i = 21; i <= 52; i++) {\n        if (low & x) fract += pow(2, -i)\n\n        x >>>= 1\n      }\n\n      // Handle special values.\n      // Check for zero and subnormal values.\n      if (exp === -BIAS) {\n        if (fract === 0)\n        // +/-1.0 * 0.0 => +/-0.0\n          return sign * 0\n\n        exp = -1022\n      } else if (exp === BIAS + 1) { // Check for +/-Infinity or NaN.\n        if (fract === 0)\n        // +/-1.0 / 0.0 => +/-Infinity\n          return sign / 0\n\n        return NaN\n      } else { // Nothing special? Seems to be a normal number.\n        // Add the implicit leading bit (1*2^0).\n        fract += 1\n      }\n\n      return sign * fract * pow(2, exp)\n    }\n  })()\n", "export default class NumberUtil {\n  static equalsWithTolerance(x1, x2, tolerance) {\n    return Math.abs(x1 - x2) <= tolerance\n  }\n}\n", "export default class Long {\n  constructor(high, low) {\n    this.low = low || 0\n    this.high = high || 0\n  }\n\n  static toBinaryString(i) {\n    let mask\n    let result = ''\n    for (mask = 0x80000000; mask > 0; mask >>>= 1)\n      result += (i.high & mask) === mask ? '1' : '0'\n    for (mask = 0x80000000; mask > 0; mask >>>= 1)\n      result += (i.low & mask) === mask ? '1' : '0'\n    return result\n  }\n}\n", "export default function Comparator() {}\n", "import Exception from './Exception'\n\nexport default class RuntimeException extends Exception {\n  constructor(message) {\n    super(message)\n    this.name = Object.keys({ RuntimeException })[0]\n  }\n}\n", "import RuntimeException from '../../../../java/lang/RuntimeException'\nexport default class AssertionFailedException extends RuntimeException {\n  constructor() {\n    super()\n    AssertionFailedException.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    if (arguments.length === 0) {\n      RuntimeException.constructor_.call(this)\n    } else if (arguments.length === 1) {\n      const message = arguments[0]\n      RuntimeException.constructor_.call(this, message)\n    }\n  }\n}\n", "import AssertionFailedException from './AssertionFailedException'\nexport default class Assert {\n  static shouldNeverReachHere() {\n    if (arguments.length === 0) {\n      Assert.shouldNeverReachHere(null)\n    } else if (arguments.length === 1) {\n      const message = arguments[0]\n      throw new AssertionFailedException('Should never reach here' + (message !== null ? ': ' + message : ''))\n    }\n  }\n  static isTrue() {\n    if (arguments.length === 1) {\n      const assertion = arguments[0]\n      Assert.isTrue(assertion, null)\n    } else if (arguments.length === 2) {\n      const assertion = arguments[0], message = arguments[1]\n      if (!assertion) \n        if (message === null) \n          throw new AssertionFailedException()\n        else \n          throw new AssertionFailedException(message)\n        \n      \n    }\n  }\n  static equals() {\n    if (arguments.length === 2) {\n      const expectedValue = arguments[0], actualValue = arguments[1]\n      Assert.equals(expectedValue, actualValue, null)\n    } else if (arguments.length === 3) {\n      const expectedValue = arguments[0], actualValue = arguments[1], message = arguments[2]\n      if (!actualValue.equals(expectedValue)) \n        throw new AssertionFailedException('Expected ' + expectedValue + ' but encountered ' + actualValue + (message !== null ? ': ' + message : ''))\n      \n    }\n  }\n}\n", "import NumberUtil from '../util/NumberUtil'\nimport IllegalArgumentException from '../../../../java/lang/IllegalArgumentException'\nimport Double from '../../../../java/lang/Double'\nimport Comparable from '../../../../java/lang/Comparable'\nimport Cloneable from '../../../../java/lang/Cloneable'\nimport Comparator from '../../../../java/util/Comparator'\nimport Serializable from '../../../../java/io/Serializable'\nimport Assert from '../util/Assert'\n\nconst kBuf = new ArrayBuffer(8)\nconst kBufAsF64 = new Float64Array(kBuf)\nconst kBufAsI32 = new Int32Array(kBuf)\n\nexport default class Coordinate {\n  constructor() {\n    Coordinate.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this.x = null\n    this.y = null\n    this.z = null\n    if (arguments.length === 0) {\n      Coordinate.constructor_.call(this, 0.0, 0.0)\n    } else if (arguments.length === 1) {\n      const c = arguments[0]\n      Coordinate.constructor_.call(this, c.x, c.y, c.getZ())\n    } else if (arguments.length === 2) {\n      const x = arguments[0], y = arguments[1]\n      Coordinate.constructor_.call(this, x, y, Coordinate.NULL_ORDINATE)\n    } else if (arguments.length === 3) {\n      const x = arguments[0], y = arguments[1], z = arguments[2]\n      this.x = x\n      this.y = y\n      this.z = z\n    }\n  }\n  static hashCode(n) {\n    kBufAsF64[0] = n\n    return kBufAsI32[0] ^ kBufAsI32[1]\n  }\n  getM() {\n    return Double.NaN\n  }\n  setOrdinate(ordinateIndex, value) {\n    switch (ordinateIndex) {\n    case Coordinate.X:\n      this.x = value\n      break\n    case Coordinate.Y:\n      this.y = value\n      break\n    case Coordinate.Z:\n      this.setZ(value)\n      break\n    default:\n      throw new IllegalArgumentException('Invalid ordinate index: ' + ordinateIndex)\n    }\n  }\n  equals2D() {\n    if (arguments.length === 1) {\n      const other = arguments[0]\n      if (this.x !== other.x) \n        return false\n      \n      if (this.y !== other.y) \n        return false\n      \n      return true\n    } else if (arguments.length === 2) {\n      const c = arguments[0], tolerance = arguments[1]\n      if (!NumberUtil.equalsWithTolerance(this.x, c.x, tolerance)) \n        return false\n      \n      if (!NumberUtil.equalsWithTolerance(this.y, c.y, tolerance)) \n        return false\n      \n      return true\n    }\n  }\n  setM(m) {\n    throw new IllegalArgumentException('Invalid ordinate index: ' + Coordinate.M)\n  }\n  getZ() {\n    return this.z\n  }\n  getOrdinate(ordinateIndex) {\n    switch (ordinateIndex) {\n    case Coordinate.X:\n      return this.x\n    case Coordinate.Y:\n      return this.y\n    case Coordinate.Z:\n      return this.getZ()\n    }\n    throw new IllegalArgumentException('Invalid ordinate index: ' + ordinateIndex)\n  }\n  equals3D(other) {\n    return this.x === other.x && this.y === other.y && (this.getZ() === other.getZ() || Double.isNaN(this.getZ()) && Double.isNaN(other.getZ()))\n  }\n  equals(other) {\n    if (!(other instanceof Coordinate)) \n      return false\n    \n    return this.equals2D(other)\n  }\n  equalInZ(c, tolerance) {\n    return NumberUtil.equalsWithTolerance(this.getZ(), c.getZ(), tolerance)\n  }\n  setX(x) {\n    this.x = x\n  }\n  compareTo(o) {\n    const other = o\n    if (this.x < other.x) return -1\n    if (this.x > other.x) return 1\n    if (this.y < other.y) return -1\n    if (this.y > other.y) return 1\n    return 0\n  }\n  getX() {\n    return this.x\n  }\n  setZ(z) {\n    this.z = z\n  }\n  clone() {\n    try {\n      const coord = null\n      return coord\n    } catch (e) {\n      if (e instanceof CloneNotSupportedException) {\n        Assert.shouldNeverReachHere('this shouldn\\'t happen because this class is Cloneable')\n        return null\n      } else {\n        throw e\n      }\n    } finally {}\n  }\n  copy() {\n    return new Coordinate(this)\n  }\n  toString() {\n    return '(' + this.x + ', ' + this.y + ', ' + this.getZ() + ')'\n  }\n  distance3D(c) {\n    const dx = this.x - c.x\n    const dy = this.y - c.y\n    const dz = this.getZ() - c.getZ()\n    return Math.sqrt(dx * dx + dy * dy + dz * dz)\n  }\n  getY() {\n    return this.y\n  }\n  setY(y) {\n    this.y = y\n  }\n  distance(c) {\n    const dx = this.x - c.x\n    const dy = this.y - c.y\n    return Math.sqrt(dx * dx + dy * dy)\n  }\n  hashCode() {\n    let result = 17\n    result = 37 * result + Coordinate.hashCode(this.x)\n    result = 37 * result + Coordinate.hashCode(this.y)\n    return result\n  }\n  setCoordinate(other) {\n    this.x = other.x\n    this.y = other.y\n    this.z = other.getZ()\n  }\n  get interfaces_() {\n    return [Comparable, Cloneable, Serializable]\n  }\n}\nclass DimensionalComparator {\n  constructor() {\n    DimensionalComparator.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this._dimensionsToTest = 2\n    if (arguments.length === 0) {\n      DimensionalComparator.constructor_.call(this, 2)\n    } else if (arguments.length === 1) {\n      const dimensionsToTest = arguments[0]\n      if (dimensionsToTest !== 2 && dimensionsToTest !== 3) throw new IllegalArgumentException('only 2 or 3 dimensions may be specified')\n      this._dimensionsToTest = dimensionsToTest\n    }\n  }\n  static compare(a, b) {\n    if (a < b) return -1\n    if (a > b) return 1\n    if (Double.isNaN(a)) {\n      if (Double.isNaN(b)) return 0\n      return -1\n    }\n    if (Double.isNaN(b)) return 1\n    return 0\n  }\n  compare(c1, c2) {\n    const compX = DimensionalComparator.compare(c1.x, c2.x)\n    if (compX !== 0) return compX\n    const compY = DimensionalComparator.compare(c1.y, c2.y)\n    if (compY !== 0) return compY\n    if (this._dimensionsToTest <= 2) return 0\n    const compZ = DimensionalComparator.compare(c1.getZ(), c2.getZ())\n    return compZ\n  }\n  get interfaces_() {\n    return [Comparator]\n  }\n}\nCoordinate.DimensionalComparator = DimensionalComparator\nCoordinate.NULL_ORDINATE = Double.NaN\nCoordinate.X = 0\nCoordinate.Y = 1\nCoordinate.Z = 2\nCoordinate.M = 3\n", "import Coordinate from './Coordinate'\nimport Comparable from '../../../../java/lang/Comparable'\nimport Serializable from '../../../../java/io/Serializable'\nexport default class Envelope {\n  constructor() {\n    Envelope.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this._minx = null\n    this._maxx = null\n    this._miny = null\n    this._maxy = null\n    if (arguments.length === 0) {\n      this.init()\n    } else if (arguments.length === 1) {\n      if (arguments[0] instanceof Coordinate) {\n        const p = arguments[0]\n        this.init(p.x, p.x, p.y, p.y)\n      } else if (arguments[0] instanceof Envelope) {\n        const env = arguments[0]\n        this.init(env)\n      }\n    } else if (arguments.length === 2) {\n      const p1 = arguments[0], p2 = arguments[1]\n      this.init(p1.x, p2.x, p1.y, p2.y)\n    } else if (arguments.length === 4) {\n      const x1 = arguments[0], x2 = arguments[1], y1 = arguments[2], y2 = arguments[3]\n      this.init(x1, x2, y1, y2)\n    }\n  }\n  static intersects() {\n    if (arguments.length === 3) {\n      const p1 = arguments[0], p2 = arguments[1], q = arguments[2]\n      if (q.x >= (p1.x < p2.x ? p1.x : p2.x) && q.x <= (p1.x > p2.x ? p1.x : p2.x) && (q.y >= (p1.y < p2.y ? p1.y : p2.y) && q.y <= (p1.y > p2.y ? p1.y : p2.y))) \n        return true\n      \n      return false\n    } else if (arguments.length === 4) {\n      const p1 = arguments[0], p2 = arguments[1], q1 = arguments[2], q2 = arguments[3]\n      let minq = Math.min(q1.x, q2.x)\n      let maxq = Math.max(q1.x, q2.x)\n      let minp = Math.min(p1.x, p2.x)\n      let maxp = Math.max(p1.x, p2.x)\n      if (minp > maxq) return false\n      if (maxp < minq) return false\n      minq = Math.min(q1.y, q2.y)\n      maxq = Math.max(q1.y, q2.y)\n      minp = Math.min(p1.y, p2.y)\n      maxp = Math.max(p1.y, p2.y)\n      if (minp > maxq) return false\n      if (maxp < minq) return false\n      return true\n    }\n  }\n  getArea() {\n    return this.getWidth() * this.getHeight()\n  }\n  equals(other) {\n    if (!(other instanceof Envelope)) \n      return false\n    \n    const otherEnvelope = other\n    if (this.isNull()) \n      return otherEnvelope.isNull()\n    \n    return this._maxx === otherEnvelope.getMaxX() && this._maxy === otherEnvelope.getMaxY() && this._minx === otherEnvelope.getMinX() && this._miny === otherEnvelope.getMinY()\n  }\n  intersection(env) {\n    if (this.isNull() || env.isNull() || !this.intersects(env)) return new Envelope()\n    const intMinX = this._minx > env._minx ? this._minx : env._minx\n    const intMinY = this._miny > env._miny ? this._miny : env._miny\n    const intMaxX = this._maxx < env._maxx ? this._maxx : env._maxx\n    const intMaxY = this._maxy < env._maxy ? this._maxy : env._maxy\n    return new Envelope(intMinX, intMaxX, intMinY, intMaxY)\n  }\n  isNull() {\n    return this._maxx < this._minx\n  }\n  getMaxX() {\n    return this._maxx\n  }\n  covers() {\n    if (arguments.length === 1) {\n      if (arguments[0] instanceof Coordinate) {\n        const p = arguments[0]\n        return this.covers(p.x, p.y)\n      } else if (arguments[0] instanceof Envelope) {\n        const other = arguments[0]\n        if (this.isNull() || other.isNull()) \n          return false\n        \n        return other.getMinX() >= this._minx && other.getMaxX() <= this._maxx && other.getMinY() >= this._miny && other.getMaxY() <= this._maxy\n      }\n    } else if (arguments.length === 2) {\n      const x = arguments[0], y = arguments[1]\n      if (this.isNull()) return false\n      return x >= this._minx && x <= this._maxx && y >= this._miny && y <= this._maxy\n    }\n  }\n  intersects() {\n    if (arguments.length === 1) {\n      if (arguments[0] instanceof Envelope) {\n        const other = arguments[0]\n        if (this.isNull() || other.isNull()) \n          return false\n        \n        return !(other._minx > this._maxx || other._maxx < this._minx || other._miny > this._maxy || other._maxy < this._miny)\n      } else if (arguments[0] instanceof Coordinate) {\n        const p = arguments[0]\n        return this.intersects(p.x, p.y)\n      }\n    } else if (arguments.length === 2) {\n      if (arguments[0] instanceof Coordinate && arguments[1] instanceof Coordinate) {\n        const a = arguments[0], b = arguments[1]\n        if (this.isNull()) \n          return false\n        \n        const envminx = a.x < b.x ? a.x : b.x\n        if (envminx > this._maxx) return false\n        const envmaxx = a.x > b.x ? a.x : b.x\n        if (envmaxx < this._minx) return false\n        const envminy = a.y < b.y ? a.y : b.y\n        if (envminy > this._maxy) return false\n        const envmaxy = a.y > b.y ? a.y : b.y\n        if (envmaxy < this._miny) return false\n        return true\n      } else if (typeof arguments[0] === 'number' && typeof arguments[1] === 'number') {\n        const x = arguments[0], y = arguments[1]\n        if (this.isNull()) return false\n        return !(x > this._maxx || x < this._minx || y > this._maxy || y < this._miny)\n      }\n    }\n  }\n  getMinY() {\n    return this._miny\n  }\n  getDiameter() {\n    if (this.isNull()) \n      return 0\n    \n    const w = this.getWidth()\n    const h = this.getHeight()\n    return Math.sqrt(w * w + h * h)\n  }\n  getMinX() {\n    return this._minx\n  }\n  expandToInclude() {\n    if (arguments.length === 1) {\n      if (arguments[0] instanceof Coordinate) {\n        const p = arguments[0]\n        this.expandToInclude(p.x, p.y)\n      } else if (arguments[0] instanceof Envelope) {\n        const other = arguments[0]\n        if (other.isNull()) \n          return null\n        \n        if (this.isNull()) {\n          this._minx = other.getMinX()\n          this._maxx = other.getMaxX()\n          this._miny = other.getMinY()\n          this._maxy = other.getMaxY()\n        } else {\n          if (other._minx < this._minx) \n            this._minx = other._minx\n          \n          if (other._maxx > this._maxx) \n            this._maxx = other._maxx\n          \n          if (other._miny < this._miny) \n            this._miny = other._miny\n          \n          if (other._maxy > this._maxy) \n            this._maxy = other._maxy\n          \n        }\n      }\n    } else if (arguments.length === 2) {\n      const x = arguments[0], y = arguments[1]\n      if (this.isNull()) {\n        this._minx = x\n        this._maxx = x\n        this._miny = y\n        this._maxy = y\n      } else {\n        if (x < this._minx) \n          this._minx = x\n        \n        if (x > this._maxx) \n          this._maxx = x\n        \n        if (y < this._miny) \n          this._miny = y\n        \n        if (y > this._maxy) \n          this._maxy = y\n        \n      }\n    }\n  }\n  minExtent() {\n    if (this.isNull()) return 0.0\n    const w = this.getWidth()\n    const h = this.getHeight()\n    if (w < h) return w\n    return h\n  }\n  getWidth() {\n    if (this.isNull()) \n      return 0\n    \n    return this._maxx - this._minx\n  }\n  compareTo(o) {\n    const env = o\n    if (this.isNull()) {\n      if (env.isNull()) return 0\n      return -1\n    } else {\n      if (env.isNull()) return 1\n    }\n    if (this._minx < env._minx) return -1\n    if (this._minx > env._minx) return 1\n    if (this._miny < env._miny) return -1\n    if (this._miny > env._miny) return 1\n    if (this._maxx < env._maxx) return -1\n    if (this._maxx > env._maxx) return 1\n    if (this._maxy < env._maxy) return -1\n    if (this._maxy > env._maxy) return 1\n    return 0\n  }\n  translate(transX, transY) {\n    if (this.isNull()) \n      return null\n    \n    this.init(this.getMinX() + transX, this.getMaxX() + transX, this.getMinY() + transY, this.getMaxY() + transY)\n  }\n  copy() {\n    return new Envelope(this)\n  }\n  toString() {\n    return 'Env[' + this._minx + ' : ' + this._maxx + ', ' + this._miny + ' : ' + this._maxy + ']'\n  }\n  setToNull() {\n    this._minx = 0\n    this._maxx = -1\n    this._miny = 0\n    this._maxy = -1\n  }\n  disjoint(other) {\n    if (this.isNull() || other.isNull()) \n      return true\n    \n    return other._minx > this._maxx || other._maxx < this._minx || other._miny > this._maxy || other._maxy < this._miny\n  }\n  getHeight() {\n    if (this.isNull()) \n      return 0\n    \n    return this._maxy - this._miny\n  }\n  maxExtent() {\n    if (this.isNull()) return 0.0\n    const w = this.getWidth()\n    const h = this.getHeight()\n    if (w > h) return w\n    return h\n  }\n  expandBy() {\n    if (arguments.length === 1) {\n      const distance = arguments[0]\n      this.expandBy(distance, distance)\n    } else if (arguments.length === 2) {\n      const deltaX = arguments[0], deltaY = arguments[1]\n      if (this.isNull()) return null\n      this._minx -= deltaX\n      this._maxx += deltaX\n      this._miny -= deltaY\n      this._maxy += deltaY\n      if (this._minx > this._maxx || this._miny > this._maxy) this.setToNull()\n    }\n  }\n  contains() {\n    if (arguments.length === 1) {\n      if (arguments[0] instanceof Envelope) {\n        const other = arguments[0]\n        return this.covers(other)\n      } else if (arguments[0] instanceof Coordinate) {\n        const p = arguments[0]\n        return this.covers(p)\n      }\n    } else if (arguments.length === 2) {\n      const x = arguments[0], y = arguments[1]\n      return this.covers(x, y)\n    }\n  }\n  centre() {\n    if (this.isNull()) return null\n    return new Coordinate((this.getMinX() + this.getMaxX()) / 2.0, (this.getMinY() + this.getMaxY()) / 2.0)\n  }\n  init() {\n    if (arguments.length === 0) {\n      this.setToNull()\n    } else if (arguments.length === 1) {\n      if (arguments[0] instanceof Coordinate) {\n        const p = arguments[0]\n        this.init(p.x, p.x, p.y, p.y)\n      } else if (arguments[0] instanceof Envelope) {\n        const env = arguments[0]\n        this._minx = env._minx\n        this._maxx = env._maxx\n        this._miny = env._miny\n        this._maxy = env._maxy\n      }\n    } else if (arguments.length === 2) {\n      const p1 = arguments[0], p2 = arguments[1]\n      this.init(p1.x, p2.x, p1.y, p2.y)\n    } else if (arguments.length === 4) {\n      const x1 = arguments[0], x2 = arguments[1], y1 = arguments[2], y2 = arguments[3]\n      if (x1 < x2) {\n        this._minx = x1\n        this._maxx = x2\n      } else {\n        this._minx = x2\n        this._maxx = x1\n      }\n      if (y1 < y2) {\n        this._miny = y1\n        this._maxy = y2\n      } else {\n        this._miny = y2\n        this._maxy = y1\n      }\n    }\n  }\n  getMaxY() {\n    return this._maxy\n  }\n  distance(env) {\n    if (this.intersects(env)) return 0\n    let dx = 0.0\n    if (this._maxx < env._minx) dx = env._minx - this._maxx; else if (this._minx > env._maxx) dx = this._minx - env._maxx\n    let dy = 0.0\n    if (this._maxy < env._miny) dy = env._miny - this._maxy; else if (this._miny > env._maxy) dy = this._miny - env._maxy\n    if (dx === 0.0) return dy\n    if (dy === 0.0) return dx\n    return Math.sqrt(dx * dx + dy * dy)\n  }\n  hashCode() {\n    let result = 17\n    result = 37 * result + Coordinate.hashCode(this._minx)\n    result = 37 * result + Coordinate.hashCode(this._maxx)\n    result = 37 * result + Coordinate.hashCode(this._miny)\n    result = 37 * result + Coordinate.hashCode(this._maxy)\n    return result\n  }\n  get interfaces_() {\n    return [Comparable, Serializable]\n  }\n}\n", "import IllegalArgumentException from '../../../../java/lang/IllegalArgumentException'\nimport GeometryComponentFilter from './GeometryComponentFilter'\nimport Comparable from '../../../../java/lang/Comparable'\nimport Cloneable from '../../../../java/lang/Cloneable'\nimport Serializable from '../../../../java/io/Serializable'\nimport Envelope from './Envelope'\nexport default class Geometry {\n  constructor() {\n    Geometry.constructor_.apply(this, arguments)\n  }\n\n  isGeometryCollection() {\n    return this.getTypeCode() === Geometry.TYPECODE_GEOMETRYCOLLECTION\n  }\n\n  getFactory() {\n    return this._factory\n  }\n\n  getGeometryN(n) {\n    return this\n  }\n\n  getArea() {\n    return 0.0\n  }\n\n  isRectangle() {\n    return false\n  }\n\n  equalsExact(other) {\n    return this === other || this.equalsExact(other, 0)\n  }\n\n  geometryChanged() {\n    this.apply(Geometry.geometryChangedFilter)\n  }\n\n  geometryChangedAction() {\n    this._envelope = null\n  }\n\n  equalsNorm(g) {\n    if (g === null) return false\n    return this.norm().equalsExact(g.norm())\n  }\n\n  getLength() {\n    return 0.0\n  }\n\n  getNumGeometries() {\n    return 1\n  }\n\n  compareTo() {\n    let other\n    if (arguments.length === 1) {\n      const o = arguments[0]\n      other = o\n      if (this.getTypeCode() !== other.getTypeCode()) return this.getTypeCode() - other.getTypeCode()\n\n      if (this.isEmpty() && other.isEmpty()) return 0\n\n      if (this.isEmpty()) return -1\n\n      if (other.isEmpty()) return 1\n\n      return this.compareToSameClass(o)\n    } else if (arguments.length === 2) {\n      const o = arguments[0]; const comp = arguments[1]\n      other = o\n      if (this.getTypeCode() !== other.getTypeCode()) return this.getTypeCode() - other.getTypeCode()\n\n      if (this.isEmpty() && other.isEmpty()) return 0\n\n      if (this.isEmpty()) return -1\n\n      if (other.isEmpty()) return 1\n\n      return this.compareToSameClass(o, comp)\n    }\n  }\n\n  getUserData() {\n    return this._userData\n  }\n\n  getSRID() {\n    return this._SRID\n  }\n\n  getEnvelope() {\n    return this.getFactory().toGeometry(this.getEnvelopeInternal())\n  }\n\n  checkNotGeometryCollection(g) {\n    if (g.getTypeCode() === Geometry.TYPECODE_GEOMETRYCOLLECTION) throw new IllegalArgumentException('This method does not support GeometryCollection arguments')\n  }\n\n  equal(a, b, tolerance) {\n    if (tolerance === 0) return a.equals(b)\n\n    return a.distance(b) <= tolerance\n  }\n\n  norm() {\n    const copy = this.copy()\n    copy.normalize()\n    return copy\n  }\n\n  reverse() {\n    const res = this.reverseInternal()\n    if (this.envelope != null) res.envelope = this.envelope.copy()\n\n    res.setSRID(this.getSRID())\n    return res\n  }\n\n  copy() {\n    const copy = this.copyInternal()\n    copy.envelope = this._envelope == null ? null : this._envelope.copy()\n    copy._SRID = this._SRID\n    copy._userData = this._userData\n    return copy\n  }\n\n  getPrecisionModel() {\n    return this._factory.getPrecisionModel()\n  }\n\n  getEnvelopeInternal() {\n    if (this._envelope === null) this._envelope = this.computeEnvelopeInternal()\n\n    return new Envelope(this._envelope)\n  }\n\n  setSRID(SRID) {\n    this._SRID = SRID\n  }\n\n  setUserData(userData) {\n    this._userData = userData\n  }\n\n  compare(a, b) {\n    const i = a.iterator()\n    const j = b.iterator()\n    while (i.hasNext() && j.hasNext()) {\n      const aElement = i.next()\n      const bElement = j.next()\n      const comparison = aElement.compareTo(bElement)\n      if (comparison !== 0) return comparison\n    }\n    if (i.hasNext()) return 1\n\n    if (j.hasNext()) return -1\n\n    return 0\n  }\n\n  hashCode() {\n    return this.getEnvelopeInternal().hashCode()\n  }\n\n  isEquivalentClass(other) {\n    return this.getClass() === other.getClass()\n  }\n\n  isGeometryCollectionOrDerived() {\n    if (this.getTypeCode() === Geometry.TYPECODE_GEOMETRYCOLLECTION || this.getTypeCode() === Geometry.TYPECODE_MULTIPOINT || this.getTypeCode() === Geometry.TYPECODE_MULTILINESTRING || this.getTypeCode() === Geometry.TYPECODE_MULTIPOLYGON) return true\n\n    return false\n  }\n\n  get interfaces_() {\n    return [Cloneable, Comparable, Serializable]\n  }\n\n  getClass() {\n    return Geometry\n  }\n\n  static hasNonEmptyElements(geometries) {\n    for (let i = 0; i < geometries.length; i++)\n      if (!geometries[i].isEmpty()) return true\n\n    return false\n  }\n\n  static hasNullElements(array) {\n    for (let i = 0; i < array.length; i++)\n      if (array[i] === null) return true\n\n    return false\n  }\n}\nGeometry.constructor_ = function(factory) {\n  if (!factory) return\n  this._envelope = null\n  this._userData = null\n  this._factory = factory\n  this._SRID = factory.getSRID()\n}\nGeometry.TYPECODE_POINT = 0\nGeometry.TYPECODE_MULTIPOINT = 1\nGeometry.TYPECODE_LINESTRING = 2\nGeometry.TYPECODE_LINEARRING = 3\nGeometry.TYPECODE_MULTILINESTRING = 4\nGeometry.TYPECODE_POLYGON = 5\nGeometry.TYPECODE_MULTIPOLYGON = 6\nGeometry.TYPECODE_GEOMETRYCOLLECTION = 7\nGeometry.TYPENAME_POINT = 'Point'\nGeometry.TYPENAME_MULTIPOINT = 'MultiPoint'\nGeometry.TYPENAME_LINESTRING = 'LineString'\nGeometry.TYPENAME_LINEARRING = 'LinearRing'\nGeometry.TYPENAME_MULTILINESTRING = 'MultiLineString'\nGeometry.TYPENAME_POLYGON = 'Polygon'\nGeometry.TYPENAME_MULTIPOLYGON = 'MultiPolygon'\nGeometry.TYPENAME_GEOMETRYCOLLECTION = 'GeometryCollection'\nGeometry.geometryChangedFilter = {\n  get interfaces_() {\n    return [GeometryComponentFilter]\n  },\n  filter(geom) {\n    geom.geometryChangedAction()\n  }\n}\n", "import IllegalArgumentException from '../../../../java/lang/IllegalArgumentException'\nexport default class Location {\n  static toLocationSymbol(locationValue) {\n    switch (locationValue) {\n    case Location.EXTERIOR:\n      return 'e'\n    case Location.BOUNDARY:\n      return 'b'\n    case Location.INTERIOR:\n      return 'i'\n    case Location.NONE:\n      return '-'\n    }\n    throw new IllegalArgumentException('Unknown location value: ' + locationValue)\n  }\n}\nLocation.INTERIOR = 0\nLocation.BOUNDARY = 1\nLocation.EXTERIOR = 2\nLocation.NONE = -1\n", "/**\n * @see http://download.oracle.com/javase/6/docs/api/java/util/Collection.html\n */\nexport default class Collection {\n  /**\n     * Ensures that this collection contains the specified element (optional\n     * operation).\n     * @param {Object} e\n     * @return {boolean}\n     */\n  add() { }\n  /**\n     * Appends all of the elements in the specified collection to the end of this\n     * list, in the order that they are returned by the specified collection's\n     * iterator (optional operation).\n     * @param {javascript.util.Collection} c\n     * @return {boolean}\n     */\n  addAll() { }\n  /**\n     * Returns true if this collection contains no elements.\n     * @return {boolean}\n     */\n  isEmpty() { }\n  /**\n     * Returns an iterator over the elements in this collection.\n     * @return {javascript.util.Iterator}\n     */\n  iterator() { }\n  /**\n     * Returns an iterator over the elements in this collection.\n     * @return {number}\n     */\n  size() { }\n  /**\n     * Returns an array containing all of the elements in this collection.\n     * @return {Array}\n     */\n  toArray() { }\n  /**\n     * Removes a single instance of the specified element from this collection if it\n     * is present. (optional)\n     * @param {Object} e\n     * @return {boolean}\n     */\n  remove() { }\n}\n", "import Exception from '../lang/Exception'\n\nexport default class NoSuchElementException extends Exception {\n  constructor(message) {\n    super(message)\n    this.name = Object.keys({ NoSuchElementException })[0]\n  }\n}", "import Exception from './Exception'\n\nexport default class UnsupportedOperationException extends Exception {\n  constructor(message) {\n    super(message)\n    this.name = Object.keys({ UnsupportedOperationException })[0]\n  }\n}\n", "import Collection from './Collection'\n\n/**\n * @see http://download.oracle.com/javase/6/docs/api/java/util/Set.html\n *\n * @extends {Collection}\n * @constructor\n * @private\n */\nexport default class Set extends Collection {\n  /**\n   * Returns true if this set contains the specified element. More formally,\n   * returns true if and only if this set contains an element e such that (o==null ?\n   * e==null : o.equals(e)).\n   * @param {Object} e\n   * @return {boolean}\n   */\n  contains() { }\n}\n", "import Collection from './Collection'\nimport NoSuchElementException from './NoSuchElementException'\nimport UnsupportedOperationException from '../lang/UnsupportedOperationException'\nimport Set from './Set'\n\n/**\n * @see http://docs.oracle.com/javase/6/docs/api/java/util/HashSet.html\n */\nexport default class HashSet extends Set {\n  constructor(o) {\n    super()\n    this.map = new Map()\n    if (o instanceof Collection)\n      this.addAll(o)\n  }\n\n  contains(o) {\n    const hashCode = o.hashCode ? o.hashCode() : o\n    if (this.map.has(hashCode))\n      return true\n    return false\n  }\n\n  add(o) {\n    const hashCode = o.hashCode ? o.hashCode() : o\n    if (this.map.has(hashCode))\n      return false\n    return !!this.map.set(hashCode, o)\n  }\n\n  addAll(c) {\n    for (const e of c)\n      this.add(e)\n    return true\n  }\n\n  remove() {\n    throw new UnsupportedOperationException()\n  }\n\n  size() {\n    return this.map.size\n  }\n\n  isEmpty() {\n    return this.map.size === 0\n  }\n\n  toArray() {\n    return Array.from(this.map.values())\n  }\n\n  iterator() {\n    return new Iterator(this.map)\n  }\n\n  [Symbol.iterator]() {\n    return this.map\n  }\n}\n\nclass Iterator {\n  constructor(map) {\n    this.iterator = map.values()\n    const { done, value } = this.iterator.next()\n    this.done = done\n    this.value = value\n  }\n\n  next() {\n    if (this.done)\n      throw new NoSuchElementException()\n    const current = this.value\n    const { done, value } = this.iterator.next()\n    this.done = done\n    this.value = value\n    return current\n  }\n\n  hasNext() {\n    return !this.done\n  }\n\n  remove() {\n    throw new UnsupportedOperationException()\n  }\n}\n", "export default class Position {\n  static opposite(position) {\n    if (position === Position.LEFT) return Position.RIGHT\n    if (position === Position.RIGHT) return Position.LEFT\n    return position\n  }\n}\nPosition.ON = 0\nPosition.LEFT = 1\nPosition.RIGHT = 2\n", "import Exception from '../lang/Exception'\n\nexport default class EmptyStackException extends Exception {\n  constructor(message) {\n    super(message)\n    this.name = Object.keys({ EmptyStackException })[0]\n  }\n}\n", "import Exception from './Exception'\n\nexport default class IndexOutOfBoundsException extends Exception {\n  constructor(message) {\n    super(message)\n    this.name = Object.keys({ IndexOutOfBoundsException })[0]\n  } \n}", "import Collection from './Collection'\n\n/**\n * @see http://download.oracle.com/javase/6/docs/api/java/util/List.html\n */\nexport default class List extends Collection {\n  /**\n     * Returns the element at the specified position in this list.\n     * @param {number} index\n     * @return {Object}\n     */\n  get() { }\n  /**\n     * Replaces the element at the specified position in this list with the\n     * specified element (optional operation).\n     * @param {number} index\n     * @param {Object} e\n     * @return {Object}\n     */\n  set() { }\n  /**\n     * Returns true if this collection contains no elements.\n     * @return {boolean}\n     */\n  isEmpty() { }\n}\n", "import EmptyStackException from './EmptyStackException'\nimport IndexOutOfBoundsException from '../lang/IndexOutOfBoundsException'\nimport List from './List'\n\n/**\n * @see http://download.oracle.com/javase/6/docs/api/java/util/Stack.html\n */\nexport default class Stack extends List {\n  constructor() {\n    super()\n    this.array = []\n  }\n\n  add(e) {\n    this.array.push(e)\n    return true\n  }\n\n  get(index) {\n    if (index < 0 || index >= this.size())\n      throw new IndexOutOfBoundsException()\n    return this.array[index]\n  }\n\n  /**\n   * Pushes an item onto the top of this stack.\n   * @param {Object} e\n   * @return {Object}\n   */\n  push(e) {\n    this.array.push(e)\n    return e\n  }\n\n  /**\n   * Removes the object at the top of this stack and returns that object as the value of this function.\n   * @return {Object}\n   */\n  pop() {\n    if (this.array.length === 0)\n      throw new EmptyStackException()\n    return this.array.pop()\n  }\n\n  /**\n   * Looks at the object at the top of this stack without removing it from the\n   * stack.\n   * @return {Object}\n   */\n  peek() {\n    if (this.array.length === 0)\n      throw new EmptyStackException()\n    return this.array[this.array.length - 1]\n  }\n\n  /**\n   * Tests if this stack is empty.\n   * @return {boolean} true if and only if this stack contains no items; false\n   *         otherwise.\n   */\n  empty() {\n    return this.array.length === 0\n  }\n\n  /**\n   * @return {boolean}\n   */\n  isEmpty() {\n    return this.empty()\n  }\n\n  /**\n   * Returns the 1-based position where an object is on this stack. If the object\n   * o occurs as an item in this stack, this method returns the distance from the\n   * top of the stack of the occurrence nearest the top of the stack; the topmost\n   * item on the stack is considered to be at distance 1. The equals method is\n   * used to compare o to the items in this stack.\n   *\n   * NOTE: does not currently actually use equals. (=== is used)\n   *\n   * @param {Object} o\n   * @return {number} the 1-based position from the top of the stack where the\n   *         object is located; the return value -1 indicates that the object is\n   *         not on the stack.\n   */\n  search(o) {\n    return this.array.indexOf(o)\n  }\n\n  /**\n   * @return {number}\n   */\n  size() {\n    return this.array.length\n  }\n\n  /**\n   * @return {Array}\n   */\n  toArray() {\n    return this.array.slice()\n  }\n}\n", "export default function(o, i) {\n  return o.interfaces_ && o.interfaces_.indexOf(i) > -1\n}\n", "export default class StringBuffer {\n  constructor(str) {\n    this.str = str\n  }\n  append(e) {\n    this.str += e\n  }\n  setCharAt(i, c) {\n    this.str = this.str.substr(0, i) + c + this.str.substr(i + 1)\n  }\n  toString() {\n    return this.str\n  }\n}", "export default class Integer {\n  constructor(value) {\n    this.value = value\n  }\n\n  intValue() {\n    return this.value\n  }\n\n  compareTo(o) {\n    if (this.value < o)\n      return -1\n    if (this.value > o)\n      return 1\n    return 0\n  }\n\n  static compare(x, y) {\n    if (x < y)\n      return -1\n    if (x > y)\n      return 1\n    return 0\n  }\n\n  static isNan(n) {\n    return Number.isNaN(n)\n  }\n\n  static valueOf(value) {\n    return new Integer(value)\n  }\n}\n", "export default class Character {\n  static isWhitespace(c) {\n    return ((c <= 32 && c >= 0) || c === 127)\n  }\n\n  static toUpperCase(c) {\n    return c.toUpperCase()\n  }\n}\n", "import StringBuffer from '../../../../java/lang/StringBuffer'\nimport Double from '../../../../java/lang/Double'\nimport Integer from '../../../../java/lang/Integer'\nimport Character from '../../../../java/lang/Character'\nimport Comparable from '../../../../java/lang/Comparable'\nimport Cloneable from '../../../../java/lang/Cloneable'\nimport Serializable from '../../../../java/io/Serializable'\nexport default class DD {\n  constructor() {\n    DD.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this._hi = 0.0\n    this._lo = 0.0\n    if (arguments.length === 0) {\n      this.init(0.0)\n    } else if (arguments.length === 1) {\n      if (typeof arguments[0] === 'number') {\n        const x = arguments[0]\n        this.init(x)\n      } else if (arguments[0] instanceof DD) {\n        const dd = arguments[0]\n        this.init(dd)\n      } else if (typeof arguments[0] === 'string') {\n        const str = arguments[0]\n        DD.constructor_.call(this, DD.parse(str))\n      }\n    } else if (arguments.length === 2) {\n      const hi = arguments[0], lo = arguments[1]\n      this.init(hi, lo)\n    }\n  }\n  static determinant() {\n    if (typeof arguments[3] === 'number' && (typeof arguments[2] === 'number' && (typeof arguments[0] === 'number' && typeof arguments[1] === 'number'))) {\n      const x1 = arguments[0], y1 = arguments[1], x2 = arguments[2], y2 = arguments[3]\n      return DD.determinant(DD.valueOf(x1), DD.valueOf(y1), DD.valueOf(x2), DD.valueOf(y2))\n    } else if (arguments[3] instanceof DD && (arguments[2] instanceof DD && (arguments[0] instanceof DD && arguments[1] instanceof DD))) {\n      const x1 = arguments[0], y1 = arguments[1], x2 = arguments[2], y2 = arguments[3]\n      const det = x1.multiply(y2).selfSubtract(y1.multiply(x2))\n      return det\n    }\n  }\n  static sqr(x) {\n    return DD.valueOf(x).selfMultiply(x)\n  }\n  static valueOf() {\n    if (typeof arguments[0] === 'string') {\n      const str = arguments[0]\n      return DD.parse(str)\n    } else if (typeof arguments[0] === 'number') {\n      const x = arguments[0]\n      return new DD(x)\n    }\n  }\n  static sqrt(x) {\n    return DD.valueOf(x).sqrt()\n  }\n  static parse(str) {\n    let i = 0\n    const strlen = str.length\n    while (Character.isWhitespace(str.charAt(i))) i++\n    let isNegative = false\n    if (i < strlen) {\n      const signCh = str.charAt(i)\n      if (signCh === '-' || signCh === '+') {\n        i++\n        if (signCh === '-') isNegative = true\n      }\n    }\n    const val = new DD()\n    let numDigits = 0\n    let numBeforeDec = 0\n    let exp = 0\n    let hasDecimalChar = false\n    while (true) {\n      if (i >= strlen) break\n      const ch = str.charAt(i)\n      i++\n      if (Character.isDigit(ch)) {\n        const d = ch - '0'\n        val.selfMultiply(DD.TEN)\n        val.selfAdd(d)\n        numDigits++\n        continue\n      }\n      if (ch === '.') {\n        numBeforeDec = numDigits\n        hasDecimalChar = true\n        continue\n      }\n      if (ch === 'e' || ch === 'E') {\n        const expStr = str.substring(i)\n        try {\n          exp = Integer.parseInt(expStr)\n        } catch (ex) {\n          if (ex instanceof NumberFormatException) \n            throw new NumberFormatException('Invalid exponent ' + expStr + ' in string ' + str)\n          else throw ex\n        } finally {}\n        break\n      }\n      throw new NumberFormatException('Unexpected character \\'' + ch + '\\' at position ' + i + ' in string ' + str)\n    }\n    let val2 = val\n    if (!hasDecimalChar) numBeforeDec = numDigits\n    const numDecPlaces = numDigits - numBeforeDec - exp\n    if (numDecPlaces === 0) {\n      val2 = val\n    } else if (numDecPlaces > 0) {\n      const scale = DD.TEN.pow(numDecPlaces)\n      val2 = val.divide(scale)\n    } else if (numDecPlaces < 0) {\n      const scale = DD.TEN.pow(-numDecPlaces)\n      val2 = val.multiply(scale)\n    }\n    if (isNegative) \n      return val2.negate()\n    \n    return val2\n  }\n  static createNaN() {\n    return new DD(Double.NaN, Double.NaN)\n  }\n  static copy(dd) {\n    return new DD(dd)\n  }\n  static magnitude(x) {\n    const xAbs = Math.abs(x)\n    const xLog10 = Math.log(xAbs) / Math.log(10)\n    let xMag = Math.trunc(Math.floor(xLog10))\n    const xApprox = Math.pow(10, xMag)\n    if (xApprox * 10 <= xAbs) xMag += 1\n    return xMag\n  }\n  static stringOfChar(ch, len) {\n    const buf = new StringBuffer()\n    for (let i = 0; i < len; i++) \n      buf.append(ch)\n    \n    return buf.toString()\n  }\n  le(y) {\n    return this._hi < y._hi || this._hi === y._hi && this._lo <= y._lo\n  }\n  extractSignificantDigits(insertDecimalPoint, magnitude) {\n    let y = this.abs()\n    let mag = DD.magnitude(y._hi)\n    const scale = DD.TEN.pow(mag)\n    y = y.divide(scale)\n    if (y.gt(DD.TEN)) {\n      y = y.divide(DD.TEN)\n      mag += 1\n    } else if (y.lt(DD.ONE)) {\n      y = y.multiply(DD.TEN)\n      mag -= 1\n    }\n    const decimalPointPos = mag + 1\n    const buf = new StringBuffer()\n    const numDigits = DD.MAX_PRINT_DIGITS - 1\n    for (let i = 0; i <= numDigits; i++) {\n      if (insertDecimalPoint && i === decimalPointPos) \n        buf.append('.')\n      \n      const digit = Math.trunc(y._hi)\n      if (digit < 0 || digit > 9) {}\n      if (digit < 0) \n        break\n      \n      let rebiasBy10 = false\n      let digitChar = 0\n      if (digit > 9) {\n        rebiasBy10 = true\n        digitChar = '9'\n      } else {\n        digitChar = '0' + digit\n      }\n      buf.append(digitChar)\n      y = y.subtract(DD.valueOf(digit)).multiply(DD.TEN)\n      if (rebiasBy10) y.selfAdd(DD.TEN)\n      let continueExtractingDigits = true\n      const remMag = DD.magnitude(y._hi)\n      if (remMag < 0 && Math.abs(remMag) >= numDigits - i) continueExtractingDigits = false\n      if (!continueExtractingDigits) break\n    }\n    magnitude[0] = mag\n    return buf.toString()\n  }\n  sqr() {\n    return this.multiply(this)\n  }\n  doubleValue() {\n    return this._hi + this._lo\n  }\n  subtract() {\n    if (arguments[0] instanceof DD) {\n      const y = arguments[0]\n      return this.add(y.negate())\n    } else if (typeof arguments[0] === 'number') {\n      const y = arguments[0]\n      return this.add(-y)\n    }\n  }\n  equals() {\n    if (arguments.length === 1 && arguments[0] instanceof DD) {\n      const y = arguments[0]\n      return this._hi === y._hi && this._lo === y._lo\n    }\n  }\n  isZero() {\n    return this._hi === 0.0 && this._lo === 0.0\n  }\n  selfSubtract() {\n    if (arguments[0] instanceof DD) {\n      const y = arguments[0]\n      if (this.isNaN()) return this\n      return this.selfAdd(-y._hi, -y._lo)\n    } else if (typeof arguments[0] === 'number') {\n      const y = arguments[0]\n      if (this.isNaN()) return this\n      return this.selfAdd(-y, 0.0)\n    }\n  }\n  getSpecialNumberString() {\n    if (this.isZero()) return '0.0'\n    if (this.isNaN()) return 'NaN '\n    return null\n  }\n  min(x) {\n    if (this.le(x)) \n      return this\n    else \n      return x\n    \n  }\n  selfDivide() {\n    if (arguments.length === 1) {\n      if (arguments[0] instanceof DD) {\n        const y = arguments[0]\n        return this.selfDivide(y._hi, y._lo)\n      } else if (typeof arguments[0] === 'number') {\n        const y = arguments[0]\n        return this.selfDivide(y, 0.0)\n      }\n    } else if (arguments.length === 2) {\n      const yhi = arguments[0], ylo = arguments[1]\n      let hc = null, tc = null, hy = null, ty = null, C = null, c = null, U = null, u = null\n      C = this._hi / yhi\n      c = DD.SPLIT * C\n      hc = c - C\n      u = DD.SPLIT * yhi\n      hc = c - hc\n      tc = C - hc\n      hy = u - yhi\n      U = C * yhi\n      hy = u - hy\n      ty = yhi - hy\n      u = hc * hy - U + hc * ty + tc * hy + tc * ty\n      c = (this._hi - U - u + this._lo - C * ylo) / yhi\n      u = C + c\n      this._hi = u\n      this._lo = C - u + c\n      return this\n    }\n  }\n  dump() {\n    return 'DD<' + this._hi + ', ' + this._lo + '>'\n  }\n  divide() {\n    if (arguments[0] instanceof DD) {\n      const y = arguments[0]\n      let hc = null, tc = null, hy = null, ty = null, C = null, c = null, U = null, u = null\n      C = this._hi / y._hi\n      c = DD.SPLIT * C\n      hc = c - C\n      u = DD.SPLIT * y._hi\n      hc = c - hc\n      tc = C - hc\n      hy = u - y._hi\n      U = C * y._hi\n      hy = u - hy\n      ty = y._hi - hy\n      u = hc * hy - U + hc * ty + tc * hy + tc * ty\n      c = (this._hi - U - u + this._lo - C * y._lo) / y._hi\n      u = C + c\n      const zhi = u\n      const zlo = C - u + c\n      return new DD(zhi, zlo)\n    } else if (typeof arguments[0] === 'number') {\n      const y = arguments[0]\n      if (Double.isNaN(y)) return DD.createNaN()\n      return DD.copy(this).selfDivide(y, 0.0)\n    }\n  }\n  ge(y) {\n    return this._hi > y._hi || this._hi === y._hi && this._lo >= y._lo\n  }\n  pow(exp) {\n    if (exp === 0.0) return DD.valueOf(1.0)\n    let r = new DD(this)\n    let s = DD.valueOf(1.0)\n    let n = Math.abs(exp)\n    if (n > 1) \n      while (n > 0) {\n        if (n % 2 === 1) \n          s.selfMultiply(r)\n        \n        n /= 2\n        if (n > 0) r = r.sqr()\n      }\n    else \n      s = r\n    \n    if (exp < 0) return s.reciprocal()\n    return s\n  }\n  ceil() {\n    if (this.isNaN()) return DD.NaN\n    const fhi = Math.ceil(this._hi)\n    let flo = 0.0\n    if (fhi === this._hi) \n      flo = Math.ceil(this._lo)\n    \n    return new DD(fhi, flo)\n  }\n  compareTo(o) {\n    const other = o\n    if (this._hi < other._hi) return -1\n    if (this._hi > other._hi) return 1\n    if (this._lo < other._lo) return -1\n    if (this._lo > other._lo) return 1\n    return 0\n  }\n  rint() {\n    if (this.isNaN()) return this\n    const plus5 = this.add(0.5)\n    return plus5.floor()\n  }\n  setValue() {\n    if (arguments[0] instanceof DD) {\n      const value = arguments[0]\n      this.init(value)\n      return this\n    } else if (typeof arguments[0] === 'number') {\n      const value = arguments[0]\n      this.init(value)\n      return this\n    }\n  }\n  max(x) {\n    if (this.ge(x)) \n      return this\n    else \n      return x\n    \n  }\n  sqrt() {\n    if (this.isZero()) return DD.valueOf(0.0)\n    if (this.isNegative()) \n      return DD.NaN\n    \n    const x = 1.0 / Math.sqrt(this._hi)\n    const ax = this._hi * x\n    const axdd = DD.valueOf(ax)\n    const diffSq = this.subtract(axdd.sqr())\n    const d2 = diffSq._hi * (x * 0.5)\n    return axdd.add(d2)\n  }\n  selfAdd() {\n    if (arguments.length === 1) {\n      if (arguments[0] instanceof DD) {\n        const y = arguments[0]\n        return this.selfAdd(y._hi, y._lo)\n      } else if (typeof arguments[0] === 'number') {\n        const y = arguments[0]\n        let H = null, h = null, S = null, s = null, e = null, f = null\n        S = this._hi + y\n        e = S - this._hi\n        s = S - e\n        s = y - e + (this._hi - s)\n        f = s + this._lo\n        H = S + f\n        h = f + (S - H)\n        this._hi = H + h\n        this._lo = h + (H - this._hi)\n        return this\n      }\n    } else if (arguments.length === 2) {\n      const yhi = arguments[0], ylo = arguments[1]\n      let H = null, h = null, T = null, t = null, S = null, s = null, e = null, f = null\n      S = this._hi + yhi\n      T = this._lo + ylo\n      e = S - this._hi\n      f = T - this._lo\n      s = S - e\n      t = T - f\n      s = yhi - e + (this._hi - s)\n      t = ylo - f + (this._lo - t)\n      e = s + T\n      H = S + e\n      h = e + (S - H)\n      e = t + h\n      const zhi = H + e\n      const zlo = e + (H - zhi)\n      this._hi = zhi\n      this._lo = zlo\n      return this\n    }\n  }\n  selfMultiply() {\n    if (arguments.length === 1) {\n      if (arguments[0] instanceof DD) {\n        const y = arguments[0]\n        return this.selfMultiply(y._hi, y._lo)\n      } else if (typeof arguments[0] === 'number') {\n        const y = arguments[0]\n        return this.selfMultiply(y, 0.0)\n      }\n    } else if (arguments.length === 2) {\n      const yhi = arguments[0], ylo = arguments[1]\n      let hx = null, tx = null, hy = null, ty = null, C = null, c = null\n      C = DD.SPLIT * this._hi\n      hx = C - this._hi\n      c = DD.SPLIT * yhi\n      hx = C - hx\n      tx = this._hi - hx\n      hy = c - yhi\n      C = this._hi * yhi\n      hy = c - hy\n      ty = yhi - hy\n      c = hx * hy - C + hx * ty + tx * hy + tx * ty + (this._hi * ylo + this._lo * yhi)\n      const zhi = C + c\n      hx = C - zhi\n      const zlo = c + hx\n      this._hi = zhi\n      this._lo = zlo\n      return this\n    }\n  }\n  selfSqr() {\n    return this.selfMultiply(this)\n  }\n  floor() {\n    if (this.isNaN()) return DD.NaN\n    const fhi = Math.floor(this._hi)\n    let flo = 0.0\n    if (fhi === this._hi) \n      flo = Math.floor(this._lo)\n    \n    return new DD(fhi, flo)\n  }\n  negate() {\n    if (this.isNaN()) return this\n    return new DD(-this._hi, -this._lo)\n  }\n  clone() {\n    try {\n      return null\n    } catch (ex) {\n      if (ex instanceof CloneNotSupportedException) \n        return null\n      else throw ex\n    } finally {}\n  }\n  multiply() {\n    if (arguments[0] instanceof DD) {\n      const y = arguments[0]\n      if (y.isNaN()) return DD.createNaN()\n      return DD.copy(this).selfMultiply(y)\n    } else if (typeof arguments[0] === 'number') {\n      const y = arguments[0]\n      if (Double.isNaN(y)) return DD.createNaN()\n      return DD.copy(this).selfMultiply(y, 0.0)\n    }\n  }\n  isNaN() {\n    return Double.isNaN(this._hi)\n  }\n  intValue() {\n    return Math.trunc(this._hi)\n  }\n  toString() {\n    const mag = DD.magnitude(this._hi)\n    if (mag >= -3 && mag <= 20) return this.toStandardNotation()\n    return this.toSciNotation()\n  }\n  toStandardNotation() {\n    const specialStr = this.getSpecialNumberString()\n    if (specialStr !== null) return specialStr\n    const magnitude = new Array(1).fill(null)\n    const sigDigits = this.extractSignificantDigits(true, magnitude)\n    const decimalPointPos = magnitude[0] + 1\n    let num = sigDigits\n    if (sigDigits.charAt(0) === '.') {\n      num = '0' + sigDigits\n    } else if (decimalPointPos < 0) {\n      num = '0.' + DD.stringOfChar('0', -decimalPointPos) + sigDigits\n    } else if (sigDigits.indexOf('.') === -1) {\n      const numZeroes = decimalPointPos - sigDigits.length\n      const zeroes = DD.stringOfChar('0', numZeroes)\n      num = sigDigits + zeroes + '.0'\n    }\n    if (this.isNegative()) return '-' + num\n    return num\n  }\n  reciprocal() {\n    let hc = null, tc = null, hy = null, ty = null, C = null, c = null, U = null, u = null\n    C = 1.0 / this._hi\n    c = DD.SPLIT * C\n    hc = c - C\n    u = DD.SPLIT * this._hi\n    hc = c - hc\n    tc = C - hc\n    hy = u - this._hi\n    U = C * this._hi\n    hy = u - hy\n    ty = this._hi - hy\n    u = hc * hy - U + hc * ty + tc * hy + tc * ty\n    c = (1.0 - U - u - C * this._lo) / this._hi\n    const zhi = C + c\n    const zlo = C - zhi + c\n    return new DD(zhi, zlo)\n  }\n  toSciNotation() {\n    if (this.isZero()) return DD.SCI_NOT_ZERO\n    const specialStr = this.getSpecialNumberString()\n    if (specialStr !== null) return specialStr\n    const magnitude = new Array(1).fill(null)\n    const digits = this.extractSignificantDigits(false, magnitude)\n    const expStr = DD.SCI_NOT_EXPONENT_CHAR + magnitude[0]\n    if (digits.charAt(0) === '0') \n      throw new IllegalStateException('Found leading zero: ' + digits)\n    \n    let trailingDigits = ''\n    if (digits.length > 1) trailingDigits = digits.substring(1)\n    const digitsWithDecimal = digits.charAt(0) + '.' + trailingDigits\n    if (this.isNegative()) return '-' + digitsWithDecimal + expStr\n    return digitsWithDecimal + expStr\n  }\n  abs() {\n    if (this.isNaN()) return DD.NaN\n    if (this.isNegative()) return this.negate()\n    return new DD(this)\n  }\n  isPositive() {\n    return this._hi > 0.0 || this._hi === 0.0 && this._lo > 0.0\n  }\n  lt(y) {\n    return this._hi < y._hi || this._hi === y._hi && this._lo < y._lo\n  }\n  add() {\n    if (arguments[0] instanceof DD) {\n      const y = arguments[0]\n      return DD.copy(this).selfAdd(y)\n    } else if (typeof arguments[0] === 'number') {\n      const y = arguments[0]\n      return DD.copy(this).selfAdd(y)\n    }\n  }\n  init() {\n    if (arguments.length === 1) {\n      if (typeof arguments[0] === 'number') {\n        const x = arguments[0]\n        this._hi = x\n        this._lo = 0.0\n      } else if (arguments[0] instanceof DD) {\n        const dd = arguments[0]\n        this._hi = dd._hi\n        this._lo = dd._lo\n      }\n    } else if (arguments.length === 2) {\n      const hi = arguments[0], lo = arguments[1]\n      this._hi = hi\n      this._lo = lo\n    }\n  }\n  gt(y) {\n    return this._hi > y._hi || this._hi === y._hi && this._lo > y._lo\n  }\n  isNegative() {\n    return this._hi < 0.0 || this._hi === 0.0 && this._lo < 0.0\n  }\n  trunc() {\n    if (this.isNaN()) return DD.NaN\n    if (this.isPositive()) return this.floor(); else return this.ceil()\n  }\n  signum() {\n    if (this._hi > 0) return 1\n    if (this._hi < 0) return -1\n    if (this._lo > 0) return 1\n    if (this._lo < 0) return -1\n    return 0\n  }\n  get interfaces_() {\n    return [Serializable, Comparable, Cloneable]\n  }\n}\nDD.PI = new DD(3.141592653589793116e+00, 1.224646799147353207e-16)\nDD.TWO_PI = new DD(6.283185307179586232e+00, 2.449293598294706414e-16)\nDD.PI_2 = new DD(1.570796326794896558e+00, 6.123233995736766036e-17)\nDD.E = new DD(2.718281828459045091e+00, 1.445646891729250158e-16)\nDD.NaN = new DD(Double.NaN, Double.NaN)\nDD.EPS = 1.23259516440783e-32\nDD.SPLIT = 134217729.0\nDD.MAX_PRINT_DIGITS = 32\nDD.TEN = DD.valueOf(10.0)\nDD.ONE = DD.valueOf(1.0)\nDD.SCI_NOT_EXPONENT_CHAR = 'E'\nDD.SCI_NOT_ZERO = '0.0E0'\n", "import Coordinate from '../geom/Coordinate'\nimport Double from '../../../../java/lang/Double'\nimport DD from '../math/DD'\nexport default class CGAlgorithmsDD {\n  static orientationIndex(p1, p2, q) {\n    const index = CGAlgorithmsDD.orientationIndexFilter(p1, p2, q)\n    if (index <= 1) return index\n    const dx1 = DD.valueOf(p2.x).selfAdd(-p1.x)\n    const dy1 = DD.valueOf(p2.y).selfAdd(-p1.y)\n    const dx2 = DD.valueOf(q.x).selfAdd(-p2.x)\n    const dy2 = DD.valueOf(q.y).selfAdd(-p2.y)\n    return dx1.selfMultiply(dy2).selfSubtract(dy1.selfMultiply(dx2)).signum()\n  }\n  static signOfDet2x2() {\n    if (arguments[3] instanceof DD && (arguments[2] instanceof DD && (arguments[0] instanceof DD && arguments[1] instanceof DD))) {\n      const x1 = arguments[0], y1 = arguments[1], x2 = arguments[2], y2 = arguments[3]\n      const det = x1.multiply(y2).selfSubtract(y1.multiply(x2))\n      return det.signum()\n    } else if (typeof arguments[3] === 'number' && (typeof arguments[2] === 'number' && (typeof arguments[0] === 'number' && typeof arguments[1] === 'number'))) {\n      const dx1 = arguments[0], dy1 = arguments[1], dx2 = arguments[2], dy2 = arguments[3]\n      const x1 = DD.valueOf(dx1)\n      const y1 = DD.valueOf(dy1)\n      const x2 = DD.valueOf(dx2)\n      const y2 = DD.valueOf(dy2)\n      const det = x1.multiply(y2).selfSubtract(y1.multiply(x2))\n      return det.signum()\n    }\n  }\n  static intersection(p1, p2, q1, q2) {\n    const px = new DD(p1.y).selfSubtract(p2.y)\n    const py = new DD(p2.x).selfSubtract(p1.x)\n    const pw = new DD(p1.x).selfMultiply(p2.y).selfSubtract(new DD(p2.x).selfMultiply(p1.y))\n    const qx = new DD(q1.y).selfSubtract(q2.y)\n    const qy = new DD(q2.x).selfSubtract(q1.x)\n    const qw = new DD(q1.x).selfMultiply(q2.y).selfSubtract(new DD(q2.x).selfMultiply(q1.y))\n    const x = py.multiply(qw).selfSubtract(qy.multiply(pw))\n    const y = qx.multiply(pw).selfSubtract(px.multiply(qw))\n    const w = px.multiply(qy).selfSubtract(qx.multiply(py))\n    const xInt = x.selfDivide(w).doubleValue()\n    const yInt = y.selfDivide(w).doubleValue()\n    if (Double.isNaN(xInt) || (Double.isInfinite(xInt) || Double.isNaN(yInt)) || Double.isInfinite(yInt)) \n      return null\n    \n    return new Coordinate(xInt, yInt)\n  }\n  static orientationIndexFilter(pa, pb, pc) {\n    let detsum = null\n    const detleft = (pa.x - pc.x) * (pb.y - pc.y)\n    const detright = (pa.y - pc.y) * (pb.x - pc.x)\n    const det = detleft - detright\n    if (detleft > 0.0) \n      if (detright <= 0.0) \n        return CGAlgorithmsDD.signum(det)\n      else \n        detsum = detleft + detright\n      \n    else if (detleft < 0.0) \n      if (detright >= 0.0) \n        return CGAlgorithmsDD.signum(det)\n      else \n        detsum = -detleft - detright\n      \n    else \n      return CGAlgorithmsDD.signum(det)\n    \n    const errbound = CGAlgorithmsDD.DP_SAFE_EPSILON * detsum\n    if (det >= errbound || -det >= errbound) \n      return CGAlgorithmsDD.signum(det)\n    \n    return 2\n  }\n  static signum(x) {\n    if (x > 0) return 1\n    if (x < 0) return -1\n    return 0\n  }\n}\nCGAlgorithmsDD.DP_SAFE_EPSILON = 1e-15\n", "import Double from '../../../../java/lang/Double'\nimport Cloneable from '../../../../java/lang/Cloneable'\nexport default class CoordinateSequence {\n  getM(index) {\n    if (this.hasM()) {\n      const mIndex = this.getDimension() - this.getMeasures()\n      return this.getOrdinate(index, mIndex)\n    } else {\n      return Double.NaN\n    }\n  }\n  setOrdinate(index, ordinateIndex, value) {}\n  getZ(index) {\n    if (this.hasZ()) \n      return this.getOrdinate(index, 2)\n    else \n      return Double.NaN\n    \n  }\n  size() {}\n  getOrdinate(index, ordinateIndex) {}\n  getCoordinate() {\n    if (arguments.length === 1) {\n      const i = arguments[0]\n    } else if (arguments.length === 2) {\n      const index = arguments[0], coord = arguments[1]\n    }\n  }\n  getCoordinateCopy(i) {}\n  createCoordinate() {}\n  getDimension() {}\n  hasM() {\n    return this.getMeasures() > 0\n  }\n  getX(index) {}\n  hasZ() {\n    return this.getDimension() - this.getMeasures() > 2\n  }\n  getMeasures() {\n    return 0\n  }\n  expandEnvelope(env) {}\n  copy() {}\n  getY(index) {}\n  toCoordinateArray() {}\n  get interfaces_() {\n    return [Cloneable]\n  }\n}\nCoordinateSequence.X = 0\nCoordinateSequence.Y = 1\nCoordinateSequence.Z = 2\nCoordinateSequence.M = 3\n", "import hasInterface from '../../../../hasInterface'\nimport IllegalArgumentException from '../../../../java/lang/IllegalArgumentException'\nimport CGAlgorithmsDD from './CGAlgorithmsDD'\nimport CoordinateSequence from '../geom/CoordinateSequence'\nexport default class Orientation {\n  static index(p1, p2, q) {\n    return CGAlgorithmsDD.orientationIndex(p1, p2, q)\n  }\n  static isCCW() {\n    if (arguments[0] instanceof Array) {\n      const ring = arguments[0]\n      const nPts = ring.length - 1\n      if (nPts < 3) throw new IllegalArgumentException('Ring has fewer than 4 points, so orientation cannot be determined')\n      let hiPt = ring[0]\n      let hiIndex = 0\n      for (let i = 1; i <= nPts; i++) {\n        const p = ring[i]\n        if (p.y > hiPt.y) {\n          hiPt = p\n          hiIndex = i\n        }\n      }\n      let iPrev = hiIndex\n      do {\n        iPrev = iPrev - 1\n        if (iPrev < 0) iPrev = nPts\n      } while (ring[iPrev].equals2D(hiPt) && iPrev !== hiIndex)\n      let iNext = hiIndex\n      do \n        iNext = (iNext + 1) % nPts\n      while (ring[iNext].equals2D(hiPt) && iNext !== hiIndex)\n      const prev = ring[iPrev]\n      const next = ring[iNext]\n      if (prev.equals2D(hiPt) || next.equals2D(hiPt) || prev.equals2D(next)) return false\n      const disc = Orientation.index(prev, hiPt, next)\n      let isCCW = null\n      if (disc === 0) \n        isCCW = prev.x > next.x\n      else \n        isCCW = disc > 0\n      \n      return isCCW\n    } else if (hasInterface(arguments[0], CoordinateSequence)) {\n      const ring = arguments[0]\n      const nPts = ring.size() - 1\n      if (nPts < 3) throw new IllegalArgumentException('Ring has fewer than 4 points, so orientation cannot be determined')\n      let hiPt = ring.getCoordinate(0)\n      let hiIndex = 0\n      for (let i = 1; i <= nPts; i++) {\n        const p = ring.getCoordinate(i)\n        if (p.y > hiPt.y) {\n          hiPt = p\n          hiIndex = i\n        }\n      }\n      let prev = null\n      let iPrev = hiIndex\n      do {\n        iPrev = iPrev - 1\n        if (iPrev < 0) iPrev = nPts\n        prev = ring.getCoordinate(iPrev)\n      } while (prev.equals2D(hiPt) && iPrev !== hiIndex)\n      let next = null\n      let iNext = hiIndex\n      do {\n        iNext = (iNext + 1) % nPts\n        next = ring.getCoordinate(iNext)\n      } while (next.equals2D(hiPt) && iNext !== hiIndex)\n      if (prev.equals2D(hiPt) || next.equals2D(hiPt) || prev.equals2D(next)) return false\n      const disc = Orientation.index(prev, hiPt, next)\n      let isCCW = null\n      if (disc === 0) \n        isCCW = prev.x > next.x\n      else \n        isCCW = disc > 0\n      \n      return isCCW\n    }\n  }\n}\nOrientation.CLOCKWISE = -1\nOrientation.RIGHT = Orientation.CLOCKWISE\nOrientation.COUNTERCLOCKWISE = 1\nOrientation.LEFT = Orientation.COUNTERCLOCKWISE\nOrientation.COLLINEAR = 0\nOrientation.STRAIGHT = Orientation.COLLINEAR\n", "import Position from '../../geomgraph/Position'\nimport Orientation from '../../algorithm/Orientation'\nimport Assert from '../../util/Assert'\nexport default class RightmostEdgeFinder {\n  constructor() {\n    RightmostEdgeFinder.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this._minIndex = -1\n    this._minCoord = null\n    this._minDe = null\n    this._orientedDe = null\n  }\n  getCoordinate() {\n    return this._minCoord\n  }\n  getRightmostSide(de, index) {\n    let side = this.getRightmostSideOfSegment(de, index)\n    if (side < 0) side = this.getRightmostSideOfSegment(de, index - 1)\n    if (side < 0) {\n      this._minCoord = null\n      this.checkForRightmostCoordinate(de)\n    }\n    return side\n  }\n  findRightmostEdgeAtVertex() {\n    const pts = this._minDe.getEdge().getCoordinates()\n    Assert.isTrue(this._minIndex > 0 && this._minIndex < pts.length, 'rightmost point expected to be interior vertex of edge')\n    const pPrev = pts[this._minIndex - 1]\n    const pNext = pts[this._minIndex + 1]\n    const orientation = Orientation.index(this._minCoord, pNext, pPrev)\n    let usePrev = false\n    if (pPrev.y < this._minCoord.y && pNext.y < this._minCoord.y && orientation === Orientation.COUNTERCLOCKWISE) \n      usePrev = true\n    else if (pPrev.y > this._minCoord.y && pNext.y > this._minCoord.y && orientation === Orientation.CLOCKWISE) \n      usePrev = true\n    \n    if (usePrev) \n      this._minIndex = this._minIndex - 1\n    \n  }\n  getRightmostSideOfSegment(de, i) {\n    const e = de.getEdge()\n    const coord = e.getCoordinates()\n    if (i < 0 || i + 1 >= coord.length) return -1\n    if (coord[i].y === coord[i + 1].y) return -1\n    let pos = Position.LEFT\n    if (coord[i].y < coord[i + 1].y) pos = Position.RIGHT\n    return pos\n  }\n  getEdge() {\n    return this._orientedDe\n  }\n  checkForRightmostCoordinate(de) {\n    const coord = de.getEdge().getCoordinates()\n    for (let i = 0; i < coord.length - 1; i++) \n      if (this._minCoord === null || coord[i].x > this._minCoord.x) {\n        this._minDe = de\n        this._minIndex = i\n        this._minCoord = coord[i]\n      }\n    \n  }\n  findRightmostEdgeAtNode() {\n    const node = this._minDe.getNode()\n    const star = node.getEdges()\n    this._minDe = star.getRightmostEdge()\n    if (!this._minDe.isForward()) {\n      this._minDe = this._minDe.getSym()\n      this._minIndex = this._minDe.getEdge().getCoordinates().length - 1\n    }\n  }\n  findEdge(dirEdgeList) {\n    for (let i = dirEdgeList.iterator(); i.hasNext(); ) {\n      const de = i.next()\n      if (!de.isForward()) continue\n      this.checkForRightmostCoordinate(de)\n    }\n    Assert.isTrue(this._minIndex !== 0 || this._minCoord.equals(this._minDe.getCoordinate()), 'inconsistency in rightmost processing')\n    if (this._minIndex === 0) \n      this.findRightmostEdgeAtNode()\n    else \n      this.findRightmostEdgeAtVertex()\n    \n    this._orientedDe = this._minDe\n    const rightmostSide = this.getRightmostSide(this._minDe, this._minIndex)\n    if (rightmostSide === Position.LEFT) \n      this._orientedDe = this._minDe.getSym()\n    \n  }\n}\n", "import Coordinate from './Coordinate'\nimport RuntimeException from '../../../../java/lang/RuntimeException'\n\nexport default class TopologyException extends RuntimeException {\n  constructor(msg, pt) {\n    super(pt ? msg + ' [ ' + pt + ' ]' : msg)\n    this.pt = pt ? new Coordinate(pt) : undefined\n    this.name = Object.keys({ TopologyException })[0]\n  }\n  getCoordinate() {\n    return this.pt\n  }\n}\n", "export default class LinkedList {\n  constructor() {\n    this.array = []\n  }\n\n  addLast(e) {\n    this.array.push(e)\n  }\n\n  removeFirst() {\n    return this.array.shift()\n  }\n\n  isEmpty() {\n    return this.array.length === 0\n  }\n}\n", "import Collection from './Collection'\nimport IndexOutOfBoundsException from '../lang/IndexOutOfBoundsException'\nimport List from './List'\nimport NoSuchElementException from './NoSuchElementException'\n\n/**\n * @see http://download.oracle.com/javase/6/docs/api/java/util/ArrayList.html\n */\nexport default class ArrayList extends List {\n\n  constructor(o) {\n    super()\n    this.array = []\n    if (o instanceof Collection) this.addAll(o)\n  }\n\n  get interfaces_() {\n    return [List, Collection]\n  }\n\n  ensureCapacity() { }\n\n  add(e) {\n    if (arguments.length === 1)\n      this.array.push(e)\n    else\n      this.array.splice(arguments[0], 0, arguments[1])\n    return true\n  }\n\n  clear() {\n    this.array = []\n  }\n\n  addAll(c) {\n    for (const e of c)\n      this.array.push(e)\n  }\n\n  set(index, element) {\n    const oldElement = this.array[index]\n    this.array[index] = element\n    return oldElement\n  }\n\n  iterator() {\n    return new Iterator(this)\n  }\n\n  get(index) {\n    if (index < 0 || index >= this.size())\n      throw new IndexOutOfBoundsException()\n    return this.array[index]\n  }\n\n  isEmpty() {\n    return this.array.length === 0\n  }\n\n  sort(comparator) {\n    if (comparator)\n      this.array.sort((a, b) => comparator.compare(a, b))\n    else this.array.sort()\n  }\n\n  size() {\n    return this.array.length\n  }\n\n  toArray() {\n    return this.array.slice()\n  }\n\n  remove(o) {\n    for (let i = 0, len = this.array.length; i < len; i++)\n      if (this.array[i] === o)\n        return !!this.array.splice(i, 1)\n    return false\n  }\n\n  [Symbol.iterator]() {\n    return this.array.values()\n  }\n}\n\nclass Iterator {\n  constructor(arrayList) {\n    this.arrayList = arrayList\n    this.position = 0\n  }\n\n  next() {\n    if (this.position === this.arrayList.size())\n      throw new NoSuchElementException()\n    return this.arrayList.get(this.position++)\n  }\n\n  hasNext() {\n    return this.position < this.arrayList.size()\n  }\n\n  set(element) {\n    return this.arrayList.set(this.position - 1, element)\n  }\n\n  remove() {\n    this.arrayList.remove(this.arrayList.get(this.position))\n  }\n}\n", "import HashSet from '../../../../../java/util/HashSet'\nimport Position from '../../geomgraph/Position'\nimport Stack from '../../../../../java/util/Stack'\nimport RightmostEdgeFinder from './RightmostEdgeFinder'\nimport TopologyException from '../../geom/TopologyException'\nimport LinkedList from '../../../../../java/util/LinkedList'\nimport Comparable from '../../../../../java/lang/Comparable'\nimport ArrayList from '../../../../../java/util/ArrayList'\nimport Envelope from '../../geom/Envelope'\nexport default class BufferSubgraph {\n  constructor() {\n    BufferSubgraph.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this._finder = null\n    this._dirEdgeList = new ArrayList()\n    this._nodes = new ArrayList()\n    this._rightMostCoord = null\n    this._env = null\n    this._finder = new RightmostEdgeFinder()\n  }\n  clearVisitedEdges() {\n    for (let it = this._dirEdgeList.iterator(); it.hasNext(); ) {\n      const de = it.next()\n      de.setVisited(false)\n    }\n  }\n  getRightmostCoordinate() {\n    return this._rightMostCoord\n  }\n  computeNodeDepth(n) {\n    let startEdge = null\n    for (let i = n.getEdges().iterator(); i.hasNext(); ) {\n      const de = i.next()\n      if (de.isVisited() || de.getSym().isVisited()) {\n        startEdge = de\n        break\n      }\n    }\n    if (startEdge === null) throw new TopologyException('unable to find edge to compute depths at ' + n.getCoordinate())\n    n.getEdges().computeDepths(startEdge)\n    for (let i = n.getEdges().iterator(); i.hasNext(); ) {\n      const de = i.next()\n      de.setVisited(true)\n      this.copySymDepths(de)\n    }\n  }\n  computeDepth(outsideDepth) {\n    this.clearVisitedEdges()\n    const de = this._finder.getEdge()\n    const n = de.getNode()\n    const label = de.getLabel()\n    de.setEdgeDepths(Position.RIGHT, outsideDepth)\n    this.copySymDepths(de)\n    this.computeDepths(de)\n  }\n  create(node) {\n    this.addReachable(node)\n    this._finder.findEdge(this._dirEdgeList)\n    this._rightMostCoord = this._finder.getCoordinate()\n  }\n  findResultEdges() {\n    for (let it = this._dirEdgeList.iterator(); it.hasNext(); ) {\n      const de = it.next()\n      if (de.getDepth(Position.RIGHT) >= 1 && de.getDepth(Position.LEFT) <= 0 && !de.isInteriorAreaEdge()) \n        de.setInResult(true)\n      \n    }\n  }\n  computeDepths(startEdge) {\n    const nodesVisited = new HashSet()\n    const nodeQueue = new LinkedList()\n    const startNode = startEdge.getNode()\n    nodeQueue.addLast(startNode)\n    nodesVisited.add(startNode)\n    startEdge.setVisited(true)\n    while (!nodeQueue.isEmpty()) {\n      const n = nodeQueue.removeFirst()\n      nodesVisited.add(n)\n      this.computeNodeDepth(n)\n      for (let i = n.getEdges().iterator(); i.hasNext(); ) {\n        const de = i.next()\n        const sym = de.getSym()\n        if (sym.isVisited()) continue\n        const adjNode = sym.getNode()\n        if (!nodesVisited.contains(adjNode)) {\n          nodeQueue.addLast(adjNode)\n          nodesVisited.add(adjNode)\n        }\n      }\n    }\n  }\n  compareTo(o) {\n    const graph = o\n    if (this._rightMostCoord.x < graph._rightMostCoord.x) \n      return -1\n    \n    if (this._rightMostCoord.x > graph._rightMostCoord.x) \n      return 1\n    \n    return 0\n  }\n  getEnvelope() {\n    if (this._env === null) {\n      const edgeEnv = new Envelope()\n      for (let it = this._dirEdgeList.iterator(); it.hasNext(); ) {\n        const dirEdge = it.next()\n        const pts = dirEdge.getEdge().getCoordinates()\n        for (let i = 0; i < pts.length - 1; i++) \n          edgeEnv.expandToInclude(pts[i])\n        \n      }\n      this._env = edgeEnv\n    }\n    return this._env\n  }\n  addReachable(startNode) {\n    const nodeStack = new Stack()\n    nodeStack.add(startNode)\n    while (!nodeStack.empty()) {\n      const node = nodeStack.pop()\n      this.add(node, nodeStack)\n    }\n  }\n  copySymDepths(de) {\n    const sym = de.getSym()\n    sym.setDepth(Position.LEFT, de.getDepth(Position.RIGHT))\n    sym.setDepth(Position.RIGHT, de.getDepth(Position.LEFT))\n  }\n  add(node, nodeStack) {\n    node.setVisited(true)\n    this._nodes.add(node)\n    for (let i = node.getEdges().iterator(); i.hasNext(); ) {\n      const de = i.next()\n      this._dirEdgeList.add(de)\n      const sym = de.getSym()\n      const symNode = sym.getNode()\n      if (!symNode.isVisited()) nodeStack.push(symNode)\n    }\n  }\n  getNodes() {\n    return this._nodes\n  }\n  getDirectedEdges() {\n    return this._dirEdgeList\n  }\n  get interfaces_() {\n    return [Comparable]\n  }\n}\n", "import Coordinate from '../geom/Coordinate'\nimport Double from '../../../../java/lang/Double'\nexport default class Intersection {\n  static intersection(p1, p2, q1, q2) {\n    const minX0 = p1.x < p2.x ? p1.x : p2.x\n    const minY0 = p1.y < p2.y ? p1.y : p2.y\n    const maxX0 = p1.x > p2.x ? p1.x : p2.x\n    const maxY0 = p1.y > p2.y ? p1.y : p2.y\n    const minX1 = q1.x < q2.x ? q1.x : q2.x\n    const minY1 = q1.y < q2.y ? q1.y : q2.y\n    const maxX1 = q1.x > q2.x ? q1.x : q2.x\n    const maxY1 = q1.y > q2.y ? q1.y : q2.y\n    const intMinX = minX0 > minX1 ? minX0 : minX1\n    const intMaxX = maxX0 < maxX1 ? maxX0 : maxX1\n    const intMinY = minY0 > minY1 ? minY0 : minY1\n    const intMaxY = maxY0 < maxY1 ? maxY0 : maxY1\n    const midx = (intMinX + intMaxX) / 2.0\n    const midy = (intMinY + intMaxY) / 2.0\n    const p1x = p1.x - midx\n    const p1y = p1.y - midy\n    const p2x = p2.x - midx\n    const p2y = p2.y - midy\n    const q1x = q1.x - midx\n    const q1y = q1.y - midy\n    const q2x = q2.x - midx\n    const q2y = q2.y - midy\n    const px = p1y - p2y\n    const py = p2x - p1x\n    const pw = p1x * p2y - p2x * p1y\n    const qx = q1y - q2y\n    const qy = q2x - q1x\n    const qw = q1x * q2y - q2x * q1y\n    const x = py * qw - qy * pw\n    const y = qx * pw - px * qw\n    const w = px * qy - qx * py\n    const xInt = x / w\n    const yInt = y / w\n    if (Double.isNaN(xInt) || (Double.isInfinite(xInt) || Double.isNaN(yInt)) || Double.isInfinite(yInt)) \n      return null\n    \n    return new Coordinate(xInt + midx, yInt + midy)\n  }\n}\n", "export default class System {\n  static arraycopy(src, srcPos, dest, destPos, len) {\n    let c = 0\n    for (let i = srcPos; i < srcPos + len; i++) {\n      dest[destPos + c] = src[i]\n      c++\n    }\n  }\n\n  static getProperty(name) {\n    return {\n      'line.separator': '\\n'\n    }[name]\n  }\n}\n", "import Double from '../../../../java/lang/Double'\nexport default class MathUtil {\n  static log10(x) {\n    const ln = Math.log(x)\n    if (Double.isInfinite(ln)) return ln\n    if (Double.isNaN(ln)) return ln\n    return ln / MathUtil.LOG_10\n  }\n  static min(v1, v2, v3, v4) {\n    let min = v1\n    if (v2 < min) min = v2\n    if (v3 < min) min = v3\n    if (v4 < min) min = v4\n    return min\n  }\n  static clamp() {\n    if (typeof arguments[2] === 'number' && (typeof arguments[0] === 'number' && typeof arguments[1] === 'number')) {\n      const x = arguments[0], min = arguments[1], max = arguments[2]\n      if (x < min) return min\n      if (x > max) return max\n      return x\n    } else if (Number.isInteger(arguments[2]) && (Number.isInteger(arguments[0]) && Number.isInteger(arguments[1]))) {\n      const x = arguments[0], min = arguments[1], max = arguments[2]\n      if (x < min) return min\n      if (x > max) return max\n      return x\n    }\n  }\n  static wrap(index, max) {\n    if (index < 0) \n      return max - -index % max\n    \n    return index % max\n  }\n  static max() {\n    if (arguments.length === 3) {\n      const v1 = arguments[0], v2 = arguments[1], v3 = arguments[2]\n      let max = v1\n      if (v2 > max) max = v2\n      if (v3 > max) max = v3\n      return max\n    } else if (arguments.length === 4) {\n      const v1 = arguments[0], v2 = arguments[1], v3 = arguments[2], v4 = arguments[3]\n      let max = v1\n      if (v2 > max) max = v2\n      if (v3 > max) max = v3\n      if (v4 > max) max = v4\n      return max\n    }\n  }\n  static average(x1, x2) {\n    return (x1 + x2) / 2.0\n  }\n}\nMathUtil.LOG_10 = Math.log(10)\n", "import IllegalArgumentException from '../../../../java/lang/IllegalArgumentException'\nimport MathUtil from '../math/MathUtil'\nimport Envelope from '../geom/Envelope'\nexport default class Distance {\n  static segmentToSegment(A, B, C, D) {\n    if (A.equals(B)) return Distance.pointToSegment(A, C, D)\n    if (C.equals(D)) return Distance.pointToSegment(D, A, B)\n    let noIntersection = false\n    if (!Envelope.intersects(A, B, C, D)) {\n      noIntersection = true\n    } else {\n      const denom = (B.x - A.x) * (D.y - C.y) - (B.y - A.y) * (D.x - C.x)\n      if (denom === 0) {\n        noIntersection = true\n      } else {\n        const r_num = (A.y - C.y) * (D.x - C.x) - (A.x - C.x) * (D.y - C.y)\n        const s_num = (A.y - C.y) * (B.x - A.x) - (A.x - C.x) * (B.y - A.y)\n        const s = s_num / denom\n        const r = r_num / denom\n        if (r < 0 || r > 1 || s < 0 || s > 1) \n          noIntersection = true\n        \n      }\n    }\n    if (noIntersection) \n      return MathUtil.min(Distance.pointToSegment(A, C, D), Distance.pointToSegment(B, C, D), Distance.pointToSegment(C, A, B), Distance.pointToSegment(D, A, B))\n    \n    return 0.0\n  }\n  static pointToSegment(p, A, B) {\n    if (A.x === B.x && A.y === B.y) return p.distance(A)\n    const len2 = (B.x - A.x) * (B.x - A.x) + (B.y - A.y) * (B.y - A.y)\n    const r = ((p.x - A.x) * (B.x - A.x) + (p.y - A.y) * (B.y - A.y)) / len2\n    if (r <= 0.0) return p.distance(A)\n    if (r >= 1.0) return p.distance(B)\n    const s = ((A.y - p.y) * (B.x - A.x) - (A.x - p.x) * (B.y - A.y)) / len2\n    return Math.abs(s) * Math.sqrt(len2)\n  }\n  static pointToLinePerpendicular(p, A, B) {\n    const len2 = (B.x - A.x) * (B.x - A.x) + (B.y - A.y) * (B.y - A.y)\n    const s = ((A.y - p.y) * (B.x - A.x) - (A.x - p.x) * (B.y - A.y)) / len2\n    return Math.abs(s) * Math.sqrt(len2)\n  }\n  static pointToSegmentString(p, line) {\n    if (line.length === 0) throw new IllegalArgumentException('Line array must contain at least one vertex')\n    let minDistance = p.distance(line[0])\n    for (let i = 0; i < line.length - 1; i++) {\n      const dist = Distance.pointToSegment(p, line[i], line[i + 1])\n      if (dist < minDistance) \n        minDistance = dist\n      \n    }\n    return minDistance\n  }\n}\n", "import hasInterface from '../../../../hasInterface'\nimport CoordinateSequence from './CoordinateSequence'\nexport default class CoordinateSequenceFactory {\n  create() {\n    if (arguments.length === 1) {\n      if (arguments[0] instanceof Array) {\n        const coordinates = arguments[0]\n      } else if (hasInterface(arguments[0], CoordinateSequence)) {\n        const coordSeq = arguments[0]\n      }\n    } else if (arguments.length === 2) {\n      const size = arguments[0], dimension = arguments[1]\n    } else if (arguments.length === 3) {\n      const size = arguments[0], dimension = arguments[1], measures = arguments[2]\n      return this.create(size, dimension)\n    }\n  }\n}\n", "export default class CoordinateFilter {\n  filter(coord) {}\n}\n", "import Coordinate from '../geom/Coordinate'\nexport default class Length {\n  static ofLine(pts) {\n    const n = pts.size()\n    if (n <= 1) return 0.0\n    let len = 0.0\n    const p = new Coordinate()\n    pts.getCoordinate(0, p)\n    let x0 = p.x\n    let y0 = p.y\n    for (let i = 1; i < n; i++) {\n      pts.getCoordinate(i, p)\n      const x1 = p.x\n      const y1 = p.y\n      const dx = x1 - x0\n      const dy = y1 - y0\n      len += Math.sqrt(dx * dx + dy * dy)\n      x0 = x1\n      y0 = y1\n    }\n    return len\n  }\n}\n", "export default class Lineal {}\n", "import hasInterface from '../../../../hasInterface'\nimport Coordinate from './Coordinate'\nimport Double from '../../../../java/lang/Double'\nimport CoordinateSequence from './CoordinateSequence'\nexport default class CoordinateSequences {\n  static copyCoord(src, srcPos, dest, destPos) {\n    const minDim = Math.min(src.getDimension(), dest.getDimension())\n    for (let dim = 0; dim < minDim; dim++) \n      dest.setOrdinate(destPos, dim, src.getOrdinate(srcPos, dim))\n    \n  }\n  static isRing(seq) {\n    const n = seq.size()\n    if (n === 0) return true\n    if (n <= 3) return false\n    return seq.getOrdinate(0, CoordinateSequence.X) === seq.getOrdinate(n - 1, CoordinateSequence.X) && seq.getOrdinate(0, CoordinateSequence.Y) === seq.getOrdinate(n - 1, CoordinateSequence.Y)\n  }\n  static scroll() {\n    if (arguments.length === 2) {\n      if (hasInterface(arguments[0], CoordinateSequence) && Number.isInteger(arguments[1])) {\n        const seq = arguments[0], indexOfFirstCoordinate = arguments[1]\n        CoordinateSequences.scroll(seq, indexOfFirstCoordinate, CoordinateSequences.isRing(seq))\n      } else if (hasInterface(arguments[0], CoordinateSequence) && arguments[1] instanceof Coordinate) {\n        const seq = arguments[0], firstCoordinate = arguments[1]\n        const i = CoordinateSequences.indexOf(firstCoordinate, seq)\n        if (i <= 0) return null\n        CoordinateSequences.scroll(seq, i)\n      }\n    } else if (arguments.length === 3) {\n      const seq = arguments[0], indexOfFirstCoordinate = arguments[1], ensureRing = arguments[2]\n      const i = indexOfFirstCoordinate\n      if (i <= 0) return null\n      const copy = seq.copy()\n      const last = ensureRing ? seq.size() - 1 : seq.size()\n      for (let j = 0; j < last; j++) \n        for (let k = 0; k < seq.getDimension(); k++) seq.setOrdinate(j, k, copy.getOrdinate((indexOfFirstCoordinate + j) % last, k))\n      \n      if (ensureRing) \n        for (let k = 0; k < seq.getDimension(); k++) seq.setOrdinate(last, k, seq.getOrdinate(0, k))\n      \n    }\n  }\n  static isEqual(cs1, cs2) {\n    const cs1Size = cs1.size()\n    const cs2Size = cs2.size()\n    if (cs1Size !== cs2Size) return false\n    const dim = Math.min(cs1.getDimension(), cs2.getDimension())\n    for (let i = 0; i < cs1Size; i++) \n      for (let d = 0; d < dim; d++) {\n        const v1 = cs1.getOrdinate(i, d)\n        const v2 = cs2.getOrdinate(i, d)\n        if (cs1.getOrdinate(i, d) === cs2.getOrdinate(i, d)) continue\n        if (Double.isNaN(v1) && Double.isNaN(v2)) continue\n        return false\n      }\n    \n    return true\n  }\n  static minCoordinateIndex() {\n    if (arguments.length === 1) {\n      const seq = arguments[0]\n      return CoordinateSequences.minCoordinateIndex(seq, 0, seq.size() - 1)\n    } else if (arguments.length === 3) {\n      const seq = arguments[0], from = arguments[1], to = arguments[2]\n      let minCoordIndex = -1\n      let minCoord = null\n      for (let i = from; i <= to; i++) {\n        const testCoord = seq.getCoordinate(i)\n        if (minCoord === null || minCoord.compareTo(testCoord) > 0) {\n          minCoord = testCoord\n          minCoordIndex = i\n        }\n      }\n      return minCoordIndex\n    }\n  }\n  static extend(fact, seq, size) {\n    const newseq = fact.create(size, seq.getDimension())\n    const n = seq.size()\n    CoordinateSequences.copy(seq, 0, newseq, 0, n)\n    if (n > 0) \n      for (let i = n; i < size; i++) CoordinateSequences.copy(seq, n - 1, newseq, i, 1)\n    \n    return newseq\n  }\n  static reverse(seq) {\n    const last = seq.size() - 1\n    const mid = Math.trunc(last / 2)\n    for (let i = 0; i <= mid; i++) \n      CoordinateSequences.swap(seq, i, last - i)\n    \n  }\n  static swap(seq, i, j) {\n    if (i === j) return null\n    for (let dim = 0; dim < seq.getDimension(); dim++) {\n      const tmp = seq.getOrdinate(i, dim)\n      seq.setOrdinate(i, dim, seq.getOrdinate(j, dim))\n      seq.setOrdinate(j, dim, tmp)\n    }\n  }\n  static copy(src, srcPos, dest, destPos, length) {\n    for (let i = 0; i < length; i++) \n      CoordinateSequences.copyCoord(src, srcPos + i, dest, destPos + i)\n    \n  }\n  static ensureValidRing(fact, seq) {\n    const n = seq.size()\n    if (n === 0) return seq\n    if (n <= 3) return CoordinateSequences.createClosedRing(fact, seq, 4)\n    const isClosed = seq.getOrdinate(0, CoordinateSequence.X) === seq.getOrdinate(n - 1, CoordinateSequence.X) && seq.getOrdinate(0, CoordinateSequence.Y) === seq.getOrdinate(n - 1, CoordinateSequence.Y)\n    if (isClosed) return seq\n    return CoordinateSequences.createClosedRing(fact, seq, n + 1)\n  }\n  static indexOf(coordinate, seq) {\n    for (let i = 0; i < seq.size(); i++) \n      if (coordinate.x === seq.getOrdinate(i, CoordinateSequence.X) && coordinate.y === seq.getOrdinate(i, CoordinateSequence.Y)) \n        return i\n      \n    \n    return -1\n  }\n  static createClosedRing(fact, seq, size) {\n    const newseq = fact.create(size, seq.getDimension())\n    const n = seq.size()\n    CoordinateSequences.copy(seq, 0, newseq, 0, n)\n    for (let i = n; i < size; i++) CoordinateSequences.copy(seq, 0, newseq, i, 1)\n    return newseq\n  }\n  static minCoordinate(seq) {\n    let minCoord = null\n    for (let i = 0; i < seq.size(); i++) {\n      const testCoord = seq.getCoordinate(i)\n      if (minCoord === null || minCoord.compareTo(testCoord) > 0) \n        minCoord = testCoord\n      \n    }\n    return minCoord\n  }\n}\n", "import IllegalArgumentException from '../../../../java/lang/IllegalArgumentException'\nimport Character from '../../../../java/lang/Character'\nexport default class Dimension {\n  static toDimensionSymbol(dimensionValue) {\n    switch (dimensionValue) {\n    case Dimension.FALSE:\n      return Dimension.SYM_FALSE\n    case Dimension.TRUE:\n      return Dimension.SYM_TRUE\n    case Dimension.DONTCARE:\n      return Dimension.SYM_DONTCARE\n    case Dimension.P:\n      return Dimension.SYM_P\n    case Dimension.L:\n      return Dimension.SYM_L\n    case Dimension.A:\n      return Dimension.SYM_A\n    }\n    throw new IllegalArgumentException('Unknown dimension value: ' + dimensionValue)\n  }\n  static toDimensionValue(dimensionSymbol) {\n    switch (Character.toUpperCase(dimensionSymbol)) {\n    case Dimension.SYM_FALSE:\n      return Dimension.FALSE\n    case Dimension.SYM_TRUE:\n      return Dimension.TRUE\n    case Dimension.SYM_DONTCARE:\n      return Dimension.DONTCARE\n    case Dimension.SYM_P:\n      return Dimension.P\n    case Dimension.SYM_L:\n      return Dimension.L\n    case Dimension.SYM_A:\n      return Dimension.A\n    }\n    throw new IllegalArgumentException('Unknown dimension symbol: ' + dimensionSymbol)\n  }\n}\nDimension.P = 0\nDimension.L = 1\nDimension.A = 2\nDimension.FALSE = -1\nDimension.TRUE = -2\nDimension.DONTCARE = -3\nDimension.SYM_FALSE = 'F'\nDimension.SYM_TRUE = 'T'\nDimension.SYM_DONTCARE = '*'\nDimension.SYM_P = '0'\nDimension.SYM_L = '1'\nDimension.SYM_A = '2'\n", "export default class GeometryFilter {\n  filter(geom) {}\n}\n", "export default class CoordinateSequenceFilter {\n  filter(seq, i) {}\n  isDone() {}\n  isGeometryChanged() {}\n}\n", "import Geometry from './Geometry'\nimport CoordinateFilter from './CoordinateFilter'\nimport hasInterface from '../../../../hasInterface'\nimport Length from '../algorithm/Length'\nimport IllegalArgumentException from '../../../../java/lang/IllegalArgumentException'\nimport Lineal from './Lineal'\nimport CoordinateSequences from './CoordinateSequences'\nimport GeometryComponentFilter from './GeometryComponentFilter'\nimport UnsupportedOperationException from '../../../../java/lang/UnsupportedOperationException'\nimport Dimension from './Dimension'\nimport GeometryFilter from './GeometryFilter'\nimport CoordinateSequenceFilter from './CoordinateSequenceFilter'\nimport Envelope from './Envelope'\nexport default class LineString extends Geometry {\n  constructor() {\n    super()\n    LineString.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this._points = null\n    if (arguments.length === 0) {} else if (arguments.length === 2) {\n      const points = arguments[0], factory = arguments[1]\n      Geometry.constructor_.call(this, factory)\n      this.init(points)\n    }\n  }\n  computeEnvelopeInternal() {\n    if (this.isEmpty()) \n      return new Envelope()\n    \n    return this._points.expandEnvelope(new Envelope())\n  }\n  isRing() {\n    return this.isClosed() && this.isSimple()\n  }\n  getCoordinates() {\n    return this._points.toCoordinateArray()\n  }\n  copyInternal() {\n    return new LineString(this._points.copy(), this._factory)\n  }\n  equalsExact() {\n    if (arguments.length === 2 && (typeof arguments[1] === 'number' && arguments[0] instanceof Geometry)) {\n      const other = arguments[0], tolerance = arguments[1]\n      if (!this.isEquivalentClass(other)) \n        return false\n      \n      const otherLineString = other\n      if (this._points.size() !== otherLineString._points.size()) \n        return false\n      \n      for (let i = 0; i < this._points.size(); i++) \n        if (!this.equal(this._points.getCoordinate(i), otherLineString._points.getCoordinate(i), tolerance)) \n          return false\n        \n      \n      return true\n    } else {\n      return super.equalsExact.apply(this, arguments)\n    }\n  }\n  normalize() {\n    for (let i = 0; i < Math.trunc(this._points.size() / 2); i++) {\n      const j = this._points.size() - 1 - i\n      if (!this._points.getCoordinate(i).equals(this._points.getCoordinate(j))) {\n        if (this._points.getCoordinate(i).compareTo(this._points.getCoordinate(j)) > 0) {\n          const copy = this._points.copy()\n          CoordinateSequences.reverse(copy)\n          this._points = copy\n        }\n        return null\n      }\n    }\n  }\n  getCoordinate() {\n    if (this.isEmpty()) return null\n    return this._points.getCoordinate(0)\n  }\n  getBoundaryDimension() {\n    if (this.isClosed()) \n      return Dimension.FALSE\n    \n    return 0\n  }\n  isClosed() {\n    if (this.isEmpty()) \n      return false\n    \n    return this.getCoordinateN(0).equals2D(this.getCoordinateN(this.getNumPoints() - 1))\n  }\n  reverseInternal() {\n    const seq = this._points.copy()\n    CoordinateSequences.reverse(seq)\n    return this.getFactory().createLineString(seq)\n  }\n  getEndPoint() {\n    if (this.isEmpty()) \n      return null\n    \n    return this.getPointN(this.getNumPoints() - 1)\n  }\n  getTypeCode() {\n    return Geometry.TYPECODE_LINESTRING\n  }\n  getDimension() {\n    return 1\n  }\n  getLength() {\n    return Length.ofLine(this._points)\n  }\n  getNumPoints() {\n    return this._points.size()\n  }\n  compareToSameClass() {\n    if (arguments.length === 1) {\n      const o = arguments[0]\n      const line = o\n      let i = 0\n      let j = 0\n      while (i < this._points.size() && j < line._points.size()) {\n        const comparison = this._points.getCoordinate(i).compareTo(line._points.getCoordinate(j))\n        if (comparison !== 0) \n          return comparison\n        \n        i++\n        j++\n      }\n      if (i < this._points.size()) \n        return 1\n      \n      if (j < line._points.size()) \n        return -1\n      \n      return 0\n    } else if (arguments.length === 2) {\n      const o = arguments[0], comp = arguments[1]\n      const line = o\n      return comp.compare(this._points, line._points)\n    }\n  }\n  apply() {\n    if (hasInterface(arguments[0], CoordinateFilter)) {\n      const filter = arguments[0]\n      for (let i = 0; i < this._points.size(); i++) \n        filter.filter(this._points.getCoordinate(i))\n      \n    } else if (hasInterface(arguments[0], CoordinateSequenceFilter)) {\n      const filter = arguments[0]\n      if (this._points.size() === 0) return null\n      for (let i = 0; i < this._points.size(); i++) {\n        filter.filter(this._points, i)\n        if (filter.isDone()) break\n      }\n      if (filter.isGeometryChanged()) this.geometryChanged()\n    } else if (hasInterface(arguments[0], GeometryFilter)) {\n      const filter = arguments[0]\n      filter.filter(this)\n    } else if (hasInterface(arguments[0], GeometryComponentFilter)) {\n      const filter = arguments[0]\n      filter.filter(this)\n    }\n  }\n  getBoundary() {\n    throw new UnsupportedOperationException()\n  }\n  isEquivalentClass(other) {\n    return other instanceof LineString\n  }\n  getCoordinateN(n) {\n    return this._points.getCoordinate(n)\n  }\n  getGeometryType() {\n    return Geometry.TYPENAME_LINESTRING\n  }\n  getCoordinateSequence() {\n    return this._points\n  }\n  isEmpty() {\n    return this._points.size() === 0\n  }\n  init(points) {\n    if (points === null) \n      points = this.getFactory().getCoordinateSequenceFactory().create([])\n    \n    if (points.size() === 1) \n      throw new IllegalArgumentException('Invalid number of points in LineString (found ' + points.size() + ' - must be 0 or >= 2)')\n    \n    this._points = points\n  }\n  isCoordinate(pt) {\n    for (let i = 0; i < this._points.size(); i++) \n      if (this._points.getCoordinate(i).equals(pt)) \n        return true\n      \n    \n    return false\n  }\n  getStartPoint() {\n    if (this.isEmpty()) \n      return null\n    \n    return this.getPointN(0)\n  }\n  getPointN(n) {\n    return this.getFactory().createPoint(this._points.getCoordinate(n))\n  }\n  get interfaces_() {\n    return [Lineal]\n  }\n}\n", "export default class Puntal {}\n", "import Geometry from './Geometry'\nimport CoordinateFilter from './CoordinateFilter'\nimport hasInterface from '../../../../hasInterface'\nimport GeometryComponentFilter from './GeometryComponentFilter'\nimport Dimension from './Dimension'\nimport GeometryFilter from './GeometryFilter'\nimport CoordinateSequenceFilter from './CoordinateSequenceFilter'\nimport Puntal from './Puntal'\nimport Envelope from './Envelope'\nimport Assert from '../util/Assert'\nexport default class Point extends Geometry {\n  constructor() {\n    super()\n    Point.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this._coordinates = null\n    const coordinates = arguments[0], factory = arguments[1]\n    Geometry.constructor_.call(this, factory)\n    this.init(coordinates)\n  }\n  computeEnvelopeInternal() {\n    if (this.isEmpty()) \n      return new Envelope()\n    \n    const env = new Envelope()\n    env.expandToInclude(this._coordinates.getX(0), this._coordinates.getY(0))\n    return env\n  }\n  getCoordinates() {\n    return this.isEmpty() ? [] : [this.getCoordinate()]\n  }\n  copyInternal() {\n    return new Point(this._coordinates.copy(), this._factory)\n  }\n  equalsExact() {\n    if (arguments.length === 2 && (typeof arguments[1] === 'number' && arguments[0] instanceof Geometry)) {\n      const other = arguments[0], tolerance = arguments[1]\n      if (!this.isEquivalentClass(other)) \n        return false\n      \n      if (this.isEmpty() && other.isEmpty()) \n        return true\n      \n      if (this.isEmpty() !== other.isEmpty()) \n        return false\n      \n      return this.equal(other.getCoordinate(), this.getCoordinate(), tolerance)\n    } else {\n      return super.equalsExact.apply(this, arguments)\n    }\n  }\n  normalize() {}\n  getCoordinate() {\n    return this._coordinates.size() !== 0 ? this._coordinates.getCoordinate(0) : null\n  }\n  getBoundaryDimension() {\n    return Dimension.FALSE\n  }\n  reverseInternal() {\n    return this.getFactory().createPoint(this._coordinates.copy())\n  }\n  getTypeCode() {\n    return Geometry.TYPECODE_POINT\n  }\n  getDimension() {\n    return 0\n  }\n  getNumPoints() {\n    return this.isEmpty() ? 0 : 1\n  }\n  getX() {\n    if (this.getCoordinate() === null) \n      throw new IllegalStateException('getX called on empty Point')\n    \n    return this.getCoordinate().x\n  }\n  compareToSameClass() {\n    if (arguments.length === 1) {\n      const other = arguments[0]\n      const point = other\n      return this.getCoordinate().compareTo(point.getCoordinate())\n    } else if (arguments.length === 2) {\n      const other = arguments[0], comp = arguments[1]\n      const point = other\n      return comp.compare(this._coordinates, point._coordinates)\n    }\n  }\n  apply() {\n    if (hasInterface(arguments[0], CoordinateFilter)) {\n      const filter = arguments[0]\n      if (this.isEmpty()) \n        return null\n      \n      filter.filter(this.getCoordinate())\n    } else if (hasInterface(arguments[0], CoordinateSequenceFilter)) {\n      const filter = arguments[0]\n      if (this.isEmpty()) return null\n      filter.filter(this._coordinates, 0)\n      if (filter.isGeometryChanged()) this.geometryChanged()\n    } else if (hasInterface(arguments[0], GeometryFilter)) {\n      const filter = arguments[0]\n      filter.filter(this)\n    } else if (hasInterface(arguments[0], GeometryComponentFilter)) {\n      const filter = arguments[0]\n      filter.filter(this)\n    }\n  }\n  getBoundary() {\n    return this.getFactory().createGeometryCollection()\n  }\n  getGeometryType() {\n    return Geometry.TYPENAME_POINT\n  }\n  getCoordinateSequence() {\n    return this._coordinates\n  }\n  getY() {\n    if (this.getCoordinate() === null) \n      throw new IllegalStateException('getY called on empty Point')\n    \n    return this.getCoordinate().y\n  }\n  isEmpty() {\n    return this._coordinates.size() === 0\n  }\n  init(coordinates) {\n    if (coordinates === null) \n      coordinates = this.getFactory().getCoordinateSequenceFactory().create([])\n    \n    Assert.isTrue(coordinates.size() <= 1)\n    this._coordinates = coordinates\n  }\n  isSimple() {\n    return true\n  }\n  get interfaces_() {\n    return [Puntal]\n  }\n}\n", "import hasInterface from '../../../../hasInterface'\nimport Coordinate from '../geom/Coordinate'\nimport CoordinateSequence from '../geom/CoordinateSequence'\nexport default class Area {\n  static ofRing() {\n    if (arguments[0] instanceof Array) {\n      const ring = arguments[0]\n      return Math.abs(Area.ofRingSigned(ring))\n    } else if (hasInterface(arguments[0], CoordinateSequence)) {\n      const ring = arguments[0]\n      return Math.abs(Area.ofRingSigned(ring))\n    }\n  }\n  static ofRingSigned() {\n    if (arguments[0] instanceof Array) {\n      const ring = arguments[0]\n      if (ring.length < 3) return 0.0\n      let sum = 0.0\n      const x0 = ring[0].x\n      for (let i = 1; i < ring.length - 1; i++) {\n        const x = ring[i].x - x0\n        const y1 = ring[i + 1].y\n        const y2 = ring[i - 1].y\n        sum += x * (y2 - y1)\n      }\n      return sum / 2.0\n    } else if (hasInterface(arguments[0], CoordinateSequence)) {\n      const ring = arguments[0]\n      const n = ring.size()\n      if (n < 3) return 0.0\n      const p0 = new Coordinate()\n      const p1 = new Coordinate()\n      const p2 = new Coordinate()\n      ring.getCoordinate(0, p1)\n      ring.getCoordinate(1, p2)\n      const x0 = p1.x\n      p2.x -= x0\n      let sum = 0.0\n      for (let i = 1; i < n - 1; i++) {\n        p0.y = p1.y\n        p1.x = p2.x\n        p1.y = p2.y\n        ring.getCoordinate(i + 1, p2)\n        p2.x -= x0\n        sum += p1.x * (p0.y - p2.y)\n      }\n      return sum / 2.0\n    }\n  }\n}\n", "import ArrayList from './ArrayList'\n\n/**\n * @see http://download.oracle.com/javase/6/docs/api/java/util/Arrays.html\n */\nexport default class Arrays {\n  static sort() {\n    const a = arguments[0]\n    if (arguments.length === 1) {\n      a.sort((a, b) => a.compareTo(b))\n    } else if (arguments.length === 2) {\n      a.sort((a, b) => arguments[1].compare(a, b))\n    } else if (arguments.length === 3) {\n      const t = a.slice(arguments[1], arguments[2])\n      t.sort()\n      const r = a.slice(0, arguments[1]).concat(t, a.slice(arguments[2], a.length))\n      a.splice(0, a.length)\n      for (const e of r)\n        a.push(e)\n    } else if (arguments.length === 4) {\n      const t = a.slice(arguments[1], arguments[2])\n      t.sort((a, b) => arguments[3].compare(a, b))\n      const r = a.slice(0, arguments[1]).concat(t, a.slice(arguments[2], a.length))\n      a.splice(0, a.length)\n      for (const e of r)\n        a.push(e)\n    }\n  }\n\n  /**\n   * @param {Array} array\n   * @return {ArrayList}\n   */\n  static asList(array) {\n    const arrayList = new ArrayList()\n    for (const e of array)\n      arrayList.add(e)\n    return arrayList\n  }\n\n  static copyOf(original, newLength) {\n    return original.slice(0, newLength)\n  }\n}\n", "export default class Polygonal {}\n", "import Area from '../algorithm/Area'\nimport Geometry from './Geometry'\nimport Arrays from '../../../../java/util/Arrays'\nimport CoordinateFilter from './CoordinateFilter'\nimport hasInterface from '../../../../hasInterface'\nimport IllegalArgumentException from '../../../../java/lang/IllegalArgumentException'\nimport Orientation from '../algorithm/Orientation'\nimport CoordinateSequences from './CoordinateSequences'\nimport GeometryComponentFilter from './GeometryComponentFilter'\nimport Polygonal from './Polygonal'\nimport GeometryFilter from './GeometryFilter'\nimport CoordinateSequenceFilter from './CoordinateSequenceFilter'\nexport default class Polygon extends Geometry {\n  constructor() {\n    super()\n    Polygon.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this._shell = null\n    this._holes = null\n    let shell = arguments[0], holes = arguments[1], factory = arguments[2]\n    Geometry.constructor_.call(this, factory)\n    if (shell === null) \n      shell = this.getFactory().createLinearRing()\n    \n    if (holes === null) \n      holes = []\n    \n    if (Geometry.hasNullElements(holes)) \n      throw new IllegalArgumentException('holes must not contain null elements')\n    \n    if (shell.isEmpty() && Geometry.hasNonEmptyElements(holes)) \n      throw new IllegalArgumentException('shell is empty but holes are not')\n    \n    this._shell = shell\n    this._holes = holes\n  }\n  computeEnvelopeInternal() {\n    return this._shell.getEnvelopeInternal()\n  }\n  getCoordinates() {\n    if (this.isEmpty()) \n      return []\n    \n    const coordinates = new Array(this.getNumPoints()).fill(null)\n    let k = -1\n    const shellCoordinates = this._shell.getCoordinates()\n    for (let x = 0; x < shellCoordinates.length; x++) {\n      k++\n      coordinates[k] = shellCoordinates[x]\n    }\n    for (let i = 0; i < this._holes.length; i++) {\n      const childCoordinates = this._holes[i].getCoordinates()\n      for (let j = 0; j < childCoordinates.length; j++) {\n        k++\n        coordinates[k] = childCoordinates[j]\n      }\n    }\n    return coordinates\n  }\n  getArea() {\n    let area = 0.0\n    area += Area.ofRing(this._shell.getCoordinateSequence())\n    for (let i = 0; i < this._holes.length; i++) \n      area -= Area.ofRing(this._holes[i].getCoordinateSequence())\n    \n    return area\n  }\n  copyInternal() {\n    const shellCopy = this._shell.copy()\n    const holeCopies = new Array(this._holes.length).fill(null)\n    for (let i = 0; i < this._holes.length; i++) \n      holeCopies[i] = this._holes[i].copy()\n    \n    return new Polygon(shellCopy, holeCopies, this._factory)\n  }\n  isRectangle() {\n    if (this.getNumInteriorRing() !== 0) return false\n    if (this._shell === null) return false\n    if (this._shell.getNumPoints() !== 5) return false\n    const seq = this._shell.getCoordinateSequence()\n    const env = this.getEnvelopeInternal()\n    for (let i = 0; i < 5; i++) {\n      const x = seq.getX(i)\n      if (!(x === env.getMinX() || x === env.getMaxX())) return false\n      const y = seq.getY(i)\n      if (!(y === env.getMinY() || y === env.getMaxY())) return false\n    }\n    let prevX = seq.getX(0)\n    let prevY = seq.getY(0)\n    for (let i = 1; i <= 4; i++) {\n      const x = seq.getX(i)\n      const y = seq.getY(i)\n      const xChanged = x !== prevX\n      const yChanged = y !== prevY\n      if (xChanged === yChanged) return false\n      prevX = x\n      prevY = y\n    }\n    return true\n  }\n  equalsExact() {\n    if (arguments.length === 2 && (typeof arguments[1] === 'number' && arguments[0] instanceof Geometry)) {\n      const other = arguments[0], tolerance = arguments[1]\n      if (!this.isEquivalentClass(other)) \n        return false\n      \n      const otherPolygon = other\n      const thisShell = this._shell\n      const otherPolygonShell = otherPolygon._shell\n      if (!thisShell.equalsExact(otherPolygonShell, tolerance)) \n        return false\n      \n      if (this._holes.length !== otherPolygon._holes.length) \n        return false\n      \n      for (let i = 0; i < this._holes.length; i++) \n        if (!this._holes[i].equalsExact(otherPolygon._holes[i], tolerance)) \n          return false\n        \n      \n      return true\n    } else {\n      return super.equalsExact.apply(this, arguments)\n    }\n  }\n  normalize() {\n    if (arguments.length === 0) {\n      this._shell = this.normalized(this._shell, true)\n      for (let i = 0; i < this._holes.length; i++) \n        this._holes[i] = this.normalized(this._holes[i], false)\n      \n      Arrays.sort(this._holes)\n    } else if (arguments.length === 2) {\n      const ring = arguments[0], clockwise = arguments[1]\n      if (ring.isEmpty()) \n        return null\n      \n      const seq = ring.getCoordinateSequence()\n      const minCoordinateIndex = CoordinateSequences.minCoordinateIndex(seq, 0, seq.size() - 2)\n      CoordinateSequences.scroll(seq, minCoordinateIndex, true)\n      if (Orientation.isCCW(seq) === clockwise) CoordinateSequences.reverse(seq)\n    }\n  }\n  getCoordinate() {\n    return this._shell.getCoordinate()\n  }\n  getNumInteriorRing() {\n    return this._holes.length\n  }\n  getBoundaryDimension() {\n    return 1\n  }\n  reverseInternal() {\n    const shell = this.getExteriorRing().reverse()\n    const holes = new Array(this.getNumInteriorRing()).fill(null)\n    for (let i = 0; i < holes.length; i++) \n      holes[i] = this.getInteriorRingN(i).reverse()\n    \n    return this.getFactory().createPolygon(shell, holes)\n  }\n  getTypeCode() {\n    return Geometry.TYPECODE_POLYGON\n  }\n  getDimension() {\n    return 2\n  }\n  getLength() {\n    let len = 0.0\n    len += this._shell.getLength()\n    for (let i = 0; i < this._holes.length; i++) \n      len += this._holes[i].getLength()\n    \n    return len\n  }\n  getNumPoints() {\n    let numPoints = this._shell.getNumPoints()\n    for (let i = 0; i < this._holes.length; i++) \n      numPoints += this._holes[i].getNumPoints()\n    \n    return numPoints\n  }\n  convexHull() {\n    return this.getExteriorRing().convexHull()\n  }\n  normalized(ring, clockwise) {\n    const res = ring.copy()\n    this.normalize(res, clockwise)\n    return res\n  }\n  compareToSameClass() {\n    if (arguments.length === 1) {\n      const o = arguments[0]\n      const thisShell = this._shell\n      const otherShell = o._shell\n      return thisShell.compareToSameClass(otherShell)\n    } else if (arguments.length === 2) {\n      const o = arguments[0], comp = arguments[1]\n      const poly = o\n      const thisShell = this._shell\n      const otherShell = poly._shell\n      const shellComp = thisShell.compareToSameClass(otherShell, comp)\n      if (shellComp !== 0) return shellComp\n      const nHole1 = this.getNumInteriorRing()\n      const nHole2 = poly.getNumInteriorRing()\n      let i = 0\n      while (i < nHole1 && i < nHole2) {\n        const thisHole = this.getInteriorRingN(i)\n        const otherHole = poly.getInteriorRingN(i)\n        const holeComp = thisHole.compareToSameClass(otherHole, comp)\n        if (holeComp !== 0) return holeComp\n        i++\n      }\n      if (i < nHole1) return 1\n      if (i < nHole2) return -1\n      return 0\n    }\n  }\n  apply() {\n    if (hasInterface(arguments[0], CoordinateFilter)) {\n      const filter = arguments[0]\n      this._shell.apply(filter)\n      for (let i = 0; i < this._holes.length; i++) \n        this._holes[i].apply(filter)\n      \n    } else if (hasInterface(arguments[0], CoordinateSequenceFilter)) {\n      const filter = arguments[0]\n      this._shell.apply(filter)\n      if (!filter.isDone()) \n        for (let i = 0; i < this._holes.length; i++) {\n          this._holes[i].apply(filter)\n          if (filter.isDone()) break\n        }\n      \n      if (filter.isGeometryChanged()) this.geometryChanged()\n    } else if (hasInterface(arguments[0], GeometryFilter)) {\n      const filter = arguments[0]\n      filter.filter(this)\n    } else if (hasInterface(arguments[0], GeometryComponentFilter)) {\n      const filter = arguments[0]\n      filter.filter(this)\n      this._shell.apply(filter)\n      for (let i = 0; i < this._holes.length; i++) \n        this._holes[i].apply(filter)\n      \n    }\n  }\n  getBoundary() {\n    if (this.isEmpty()) \n      return this.getFactory().createMultiLineString()\n    \n    const rings = new Array(this._holes.length + 1).fill(null)\n    rings[0] = this._shell\n    for (let i = 0; i < this._holes.length; i++) \n      rings[i + 1] = this._holes[i]\n    \n    if (rings.length <= 1) return this.getFactory().createLinearRing(rings[0].getCoordinateSequence())\n    return this.getFactory().createMultiLineString(rings)\n  }\n  getGeometryType() {\n    return Geometry.TYPENAME_POLYGON\n  }\n  getExteriorRing() {\n    return this._shell\n  }\n  isEmpty() {\n    return this._shell.isEmpty()\n  }\n  getInteriorRingN(n) {\n    return this._holes[n]\n  }\n  get interfaces_() {\n    return [Polygonal]\n  }\n}\n", "import Set from './Set'\n\n/**\n * @see http://download.oracle.com/javase/6/docs/api/java/util/SortedSet.html\n */\nexport default class SortedSet extends Set {}\n", "import Collection from './Collection'\nimport NoSuchElementException from './NoSuchElementException'\nimport UnsupportedOperationException from '../lang/UnsupportedOperationException'\nimport SortedSet from './SortedSet'\n\n/**\n * @see http://download.oracle.com/javase/6/docs/api/java/util/TreeSet.html\n */\nexport default class TreeSet extends SortedSet {\n  constructor(o) {\n    super()\n    this.array = []\n    if (o instanceof Collection)\n      this.addAll(o)\n  }\n\n  contains(o) {\n    for (const e of this.array)\n      if (e.compareTo(o) === 0)\n        return true\n    return false\n  }\n\n  add(o) {\n    if (this.contains(o))\n      return false\n    for (let i = 0, len = this.array.length; i < len; i++) {\n      const e = this.array[i]\n      if (e.compareTo(o) === 1)\n        return !!this.array.splice(i, 0, o)\n    }\n    this.array.push(o)\n    return true\n  }\n\n  addAll(c) {\n    for (const e of c)\n      this.add(e)\n    return true\n  }\n\n  remove() {\n    throw new UnsupportedOperationException()\n  }\n\n  size() {\n    return this.array.length\n  }\n\n  isEmpty() {\n    return this.array.length === 0\n  }\n\n  toArray() {\n    return this.array.slice()\n  }\n\n  iterator() {\n    return new Iterator(this.array)\n  }\n}\n\nclass Iterator {\n  constructor(array) {\n    this.array = array\n    this.position = 0\n  }\n\n  next() {\n    if (this.position === this.array.length)\n      throw new NoSuchElementException()\n    return this.array[this.position++]\n  }\n\n  hasNext() {\n    return this.position < this.array.length\n  }\n\n  remove() {\n    throw new UnsupportedOperationException()\n  }\n}\n", "import TreeSet from '../../../../java/util/TreeSet'\nimport Geometry from './Geometry'\nimport Arrays from '../../../../java/util/Arrays'\nimport CoordinateFilter from './CoordinateFilter'\nimport hasInterface from '../../../../hasInterface'\nimport IllegalArgumentException from '../../../../java/lang/IllegalArgumentException'\nimport GeometryComponentFilter from './GeometryComponentFilter'\nimport Dimension from './Dimension'\nimport ArrayList from '../../../../java/util/ArrayList'\nimport GeometryFilter from './GeometryFilter'\nimport CoordinateSequenceFilter from './CoordinateSequenceFilter'\nimport Envelope from './Envelope'\nimport Assert from '../util/Assert'\nexport default class GeometryCollection extends Geometry {\n  constructor() {\n    super()\n    GeometryCollection.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this._geometries = null\n    if (arguments.length === 0) {} else if (arguments.length === 2) {\n      let geometries = arguments[0], factory = arguments[1]\n      Geometry.constructor_.call(this, factory)\n      if (geometries === null) \n        geometries = []\n      \n      if (Geometry.hasNullElements(geometries)) \n        throw new IllegalArgumentException('geometries must not contain null elements')\n      \n      this._geometries = geometries\n    }\n  }\n  computeEnvelopeInternal() {\n    const envelope = new Envelope()\n    for (let i = 0; i < this._geometries.length; i++) \n      envelope.expandToInclude(this._geometries[i].getEnvelopeInternal())\n    \n    return envelope\n  }\n  getGeometryN(n) {\n    return this._geometries[n]\n  }\n  getCoordinates() {\n    const coordinates = new Array(this.getNumPoints()).fill(null)\n    let k = -1\n    for (let i = 0; i < this._geometries.length; i++) {\n      const childCoordinates = this._geometries[i].getCoordinates()\n      for (let j = 0; j < childCoordinates.length; j++) {\n        k++\n        coordinates[k] = childCoordinates[j]\n      }\n    }\n    return coordinates\n  }\n  getArea() {\n    let area = 0.0\n    for (let i = 0; i < this._geometries.length; i++) \n      area += this._geometries[i].getArea()\n    \n    return area\n  }\n  copyInternal() {\n    const geometries = new Array(this._geometries.length).fill(null)\n    for (let i = 0; i < geometries.length; i++) \n      geometries[i] = this._geometries[i].copy()\n    \n    return new GeometryCollection(geometries, this._factory)\n  }\n  equalsExact() {\n    if (arguments.length === 2 && (typeof arguments[1] === 'number' && arguments[0] instanceof Geometry)) {\n      const other = arguments[0], tolerance = arguments[1]\n      if (!this.isEquivalentClass(other)) \n        return false\n      \n      const otherCollection = other\n      if (this._geometries.length !== otherCollection._geometries.length) \n        return false\n      \n      for (let i = 0; i < this._geometries.length; i++) \n        if (!this._geometries[i].equalsExact(otherCollection._geometries[i], tolerance)) \n          return false\n        \n      \n      return true\n    } else {\n      return super.equalsExact.apply(this, arguments)\n    }\n  }\n  normalize() {\n    for (let i = 0; i < this._geometries.length; i++) \n      this._geometries[i].normalize()\n    \n    Arrays.sort(this._geometries)\n  }\n  getCoordinate() {\n    if (this.isEmpty()) return null\n    return this._geometries[0].getCoordinate()\n  }\n  getBoundaryDimension() {\n    let dimension = Dimension.FALSE\n    for (let i = 0; i < this._geometries.length; i++) \n      dimension = Math.max(dimension, this._geometries[i].getBoundaryDimension())\n    \n    return dimension\n  }\n  reverseInternal() {\n    const numGeometries = this._geometries.length\n    const reversed = new ArrayList(numGeometries)\n    for (let i = 0; i < numGeometries; i++) \n      reversed.add(this._geometries[i].reverse())\n    \n    return this.getFactory().buildGeometry(reversed)\n  }\n  getTypeCode() {\n    return Geometry.TYPECODE_GEOMETRYCOLLECTION\n  }\n  getDimension() {\n    let dimension = Dimension.FALSE\n    for (let i = 0; i < this._geometries.length; i++) \n      dimension = Math.max(dimension, this._geometries[i].getDimension())\n    \n    return dimension\n  }\n  getLength() {\n    let sum = 0.0\n    for (let i = 0; i < this._geometries.length; i++) \n      sum += this._geometries[i].getLength()\n    \n    return sum\n  }\n  getNumPoints() {\n    let numPoints = 0\n    for (let i = 0; i < this._geometries.length; i++) \n      numPoints += this._geometries[i].getNumPoints()\n    \n    return numPoints\n  }\n  getNumGeometries() {\n    return this._geometries.length\n  }\n  compareToSameClass() {\n    if (arguments.length === 1) {\n      const o = arguments[0]\n      const theseElements = new TreeSet(Arrays.asList(this._geometries))\n      const otherElements = new TreeSet(Arrays.asList(o._geometries))\n      return this.compare(theseElements, otherElements)\n    } else if (arguments.length === 2) {\n      const o = arguments[0], comp = arguments[1]\n      const gc = o\n      const n1 = this.getNumGeometries()\n      const n2 = gc.getNumGeometries()\n      let i = 0\n      while (i < n1 && i < n2) {\n        const thisGeom = this.getGeometryN(i)\n        const otherGeom = gc.getGeometryN(i)\n        const holeComp = thisGeom.compareToSameClass(otherGeom, comp)\n        if (holeComp !== 0) return holeComp\n        i++\n      }\n      if (i < n1) return 1\n      if (i < n2) return -1\n      return 0\n    }\n  }\n  apply() {\n    if (hasInterface(arguments[0], CoordinateFilter)) {\n      const filter = arguments[0]\n      for (let i = 0; i < this._geometries.length; i++) \n        this._geometries[i].apply(filter)\n      \n    } else if (hasInterface(arguments[0], CoordinateSequenceFilter)) {\n      const filter = arguments[0]\n      if (this._geometries.length === 0) return null\n      for (let i = 0; i < this._geometries.length; i++) {\n        this._geometries[i].apply(filter)\n        if (filter.isDone()) \n          break\n        \n      }\n      if (filter.isGeometryChanged()) this.geometryChanged()\n    } else if (hasInterface(arguments[0], GeometryFilter)) {\n      const filter = arguments[0]\n      filter.filter(this)\n      for (let i = 0; i < this._geometries.length; i++) \n        this._geometries[i].apply(filter)\n      \n    } else if (hasInterface(arguments[0], GeometryComponentFilter)) {\n      const filter = arguments[0]\n      filter.filter(this)\n      for (let i = 0; i < this._geometries.length; i++) \n        this._geometries[i].apply(filter)\n      \n    }\n  }\n  getBoundary() {\n    Geometry.checkNotGeometryCollection(this)\n    Assert.shouldNeverReachHere()\n    return null\n  }\n  getGeometryType() {\n    return Geometry.TYPENAME_GEOMETRYCOLLECTION\n  }\n  isEmpty() {\n    for (let i = 0; i < this._geometries.length; i++) \n      if (!this._geometries[i].isEmpty()) \n        return false\n      \n    \n    return true\n  }\n}\n", "import Geometry from './Geometry'\nimport GeometryCollection from './GeometryCollection'\nimport Dimension from './Dimension'\nimport Puntal from './Puntal'\nexport default class MultiPoint extends GeometryCollection {\n  constructor() {\n    super()\n    MultiPoint.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    const points = arguments[0], factory = arguments[1]\n    GeometryCollection.constructor_.call(this, points, factory)\n  }\n  copyInternal() {\n    const points = new Array(this._geometries.length).fill(null)\n    for (let i = 0; i < points.length; i++) \n      points[i] = this._geometries[i].copy()\n    \n    return new MultiPoint(points, this._factory)\n  }\n  isValid() {\n    return true\n  }\n  equalsExact() {\n    if (arguments.length === 2 && (typeof arguments[1] === 'number' && arguments[0] instanceof Geometry)) {\n      const other = arguments[0], tolerance = arguments[1]\n      if (!this.isEquivalentClass(other)) \n        return false\n      \n      return super.equalsExact.call(this, other, tolerance)\n    } else {\n      return super.equalsExact.apply(this, arguments)\n    }\n  }\n  getCoordinate() {\n    if (arguments.length === 1 && Number.isInteger(arguments[0])) {\n      const n = arguments[0]\n      return this._geometries[n].getCoordinate()\n    } else {\n      return super.getCoordinate.apply(this, arguments)\n    }\n  }\n  getBoundaryDimension() {\n    return Dimension.FALSE\n  }\n  getTypeCode() {\n    return Geometry.TYPECODE_MULTIPOINT\n  }\n  getDimension() {\n    return 0\n  }\n  getBoundary() {\n    return this.getFactory().createGeometryCollection()\n  }\n  getGeometryType() {\n    return Geometry.TYPENAME_MULTIPOINT\n  }\n  get interfaces_() {\n    return [Puntal]\n  }\n}\n", "import LineString from './LineString'\nimport Geometry from './Geometry'\nimport IllegalArgumentException from '../../../../java/lang/IllegalArgumentException'\nimport CoordinateSequences from './CoordinateSequences'\nimport Dimension from './Dimension'\nexport default class LinearRing extends LineString {\n  constructor() {\n    super()\n    LinearRing.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    const points = arguments[0], factory = arguments[1]\n    LineString.constructor_.call(this, points, factory)\n    this.validateConstruction()\n  }\n  copyInternal() {\n    return new LinearRing(this._points.copy(), this._factory)\n  }\n  getBoundaryDimension() {\n    return Dimension.FALSE\n  }\n  isClosed() {\n    if (this.isEmpty()) \n      return true\n    \n    return super.isClosed.call(this)\n  }\n  reverseInternal() {\n    const seq = this._points.copy()\n    CoordinateSequences.reverse(seq)\n    return this.getFactory().createLinearRing(seq)\n  }\n  getTypeCode() {\n    return Geometry.TYPECODE_LINEARRING\n  }\n  validateConstruction() {\n    if (!this.isEmpty() && !super.isClosed.call(this)) \n      throw new IllegalArgumentException('Points of LinearRing do not form a closed linestring')\n    \n    if (this.getCoordinateSequence().size() >= 1 && this.getCoordinateSequence().size() < LinearRing.MINIMUM_VALID_SIZE) \n      throw new IllegalArgumentException('Invalid number of points in LinearRing (found ' + this.getCoordinateSequence().size() + ' - must be 0 or >= 4)')\n    \n  }\n  getGeometryType() {\n    return Geometry.TYPENAME_LINEARRING\n  }\n}\nLinearRing.MINIMUM_VALID_SIZE = 4\n", "import Coordinate from './Coordinate'\nimport IllegalArgumentException from '../../../../java/lang/IllegalArgumentException'\nexport default class CoordinateXY extends Coordinate {\n  constructor() {\n    super()\n    CoordinateXY.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    if (arguments.length === 0) {\n      Coordinate.constructor_.call(this)\n    } else if (arguments.length === 1) {\n      if (arguments[0] instanceof CoordinateXY) {\n        const coord = arguments[0]\n        Coordinate.constructor_.call(this, coord.x, coord.y)\n      } else if (arguments[0] instanceof Coordinate) {\n        const coord = arguments[0]\n        Coordinate.constructor_.call(this, coord.x, coord.y)\n      }\n    } else if (arguments.length === 2) {\n      const x = arguments[0], y = arguments[1]\n      Coordinate.constructor_.call(this, x, y, Coordinate.NULL_ORDINATE)\n    }\n  }\n  setOrdinate(ordinateIndex, value) {\n    switch (ordinateIndex) {\n    case CoordinateXY.X:\n      this.x = value\n      break\n    case CoordinateXY.Y:\n      this.y = value\n      break\n    default:\n      throw new IllegalArgumentException('Invalid ordinate index: ' + ordinateIndex)\n    }\n  }\n  getZ() {\n    return Coordinate.NULL_ORDINATE\n  }\n  getOrdinate(ordinateIndex) {\n    switch (ordinateIndex) {\n    case CoordinateXY.X:\n      return this.x\n    case CoordinateXY.Y:\n      return this.y\n    }\n    throw new IllegalArgumentException('Invalid ordinate index: ' + ordinateIndex)\n  }\n  setZ(z) {\n    throw new IllegalArgumentException('CoordinateXY dimension 2 does not support z-ordinate')\n  }\n  copy() {\n    return new CoordinateXY(this)\n  }\n  toString() {\n    return '(' + this.x + ', ' + this.y + ')'\n  }\n  setCoordinate(other) {\n    this.x = other.x\n    this.y = other.y\n    this.z = other.getZ()\n  }\n}\nCoordinateXY.X = 0\nCoordinateXY.Y = 1\nCoordinateXY.Z = -1\nCoordinateXY.M = -1\n", "import Coordinate from './Coordinate'\nimport IllegalArgumentException from '../../../../java/lang/IllegalArgumentException'\nexport default class CoordinateXYM extends Coordinate {\n  constructor() {\n    super()\n    CoordinateXYM.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this._m = null\n    if (arguments.length === 0) {\n      Coordinate.constructor_.call(this)\n      this._m = 0.0\n    } else if (arguments.length === 1) {\n      if (arguments[0] instanceof CoordinateXYM) {\n        const coord = arguments[0]\n        Coordinate.constructor_.call(this, coord.x, coord.y)\n        this._m = coord._m\n      } else if (arguments[0] instanceof Coordinate) {\n        const coord = arguments[0]\n        Coordinate.constructor_.call(this, coord.x, coord.y)\n        this._m = this.getM()\n      }\n    } else if (arguments.length === 3) {\n      const x = arguments[0], y = arguments[1], m = arguments[2]\n      Coordinate.constructor_.call(this, x, y, Coordinate.NULL_ORDINATE)\n      this._m = m\n    }\n  }\n  getM() {\n    return this._m\n  }\n  setOrdinate(ordinateIndex, value) {\n    switch (ordinateIndex) {\n    case CoordinateXYM.X:\n      this.x = value\n      break\n    case CoordinateXYM.Y:\n      this.y = value\n      break\n    case CoordinateXYM.M:\n      this._m = value\n      break\n    default:\n      throw new IllegalArgumentException('Invalid ordinate index: ' + ordinateIndex)\n    }\n  }\n  setM(m) {\n    this._m = m\n  }\n  getZ() {\n    return Coordinate.NULL_ORDINATE\n  }\n  getOrdinate(ordinateIndex) {\n    switch (ordinateIndex) {\n    case CoordinateXYM.X:\n      return this.x\n    case CoordinateXYM.Y:\n      return this.y\n    case CoordinateXYM.M:\n      return this._m\n    }\n    throw new IllegalArgumentException('Invalid ordinate index: ' + ordinateIndex)\n  }\n  setZ(z) {\n    throw new IllegalArgumentException('CoordinateXY dimension 2 does not support z-ordinate')\n  }\n  copy() {\n    return new CoordinateXYM(this)\n  }\n  toString() {\n    return '(' + this.x + ', ' + this.y + ' m=' + this.getM() + ')'\n  }\n  setCoordinate(other) {\n    this.x = other.x\n    this.y = other.y\n    this.z = other.getZ()\n    this._m = other.getM()\n  }\n}\nCoordinateXYM.X = 0\nCoordinateXYM.Y = 1\nCoordinateXYM.Z = -1\nCoordinateXYM.M = 2\n", "import Coordinate from './Coordinate'\nimport IllegalArgumentException from '../../../../java/lang/IllegalArgumentException'\nexport default class CoordinateXYZM extends Coordinate {\n  constructor() {\n    super()\n    CoordinateXYZM.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this._m = null\n    if (arguments.length === 0) {\n      Coordinate.constructor_.call(this)\n      this._m = 0.0\n    } else if (arguments.length === 1) {\n      if (arguments[0] instanceof CoordinateXYZM) {\n        const coord = arguments[0]\n        Coordinate.constructor_.call(this, coord)\n        this._m = coord._m\n      } else if (arguments[0] instanceof Coordinate) {\n        const coord = arguments[0]\n        Coordinate.constructor_.call(this, coord)\n        this._m = this.getM()\n      }\n    } else if (arguments.length === 4) {\n      const x = arguments[0], y = arguments[1], z = arguments[2], m = arguments[3]\n      Coordinate.constructor_.call(this, x, y, z)\n      this._m = m\n    }\n  }\n  getM() {\n    return this._m\n  }\n  setOrdinate(ordinateIndex, value) {\n    switch (ordinateIndex) {\n    case Coordinate.X:\n      this.x = value\n      break\n    case Coordinate.Y:\n      this.y = value\n      break\n    case Coordinate.Z:\n      this.z = value\n      break\n    case Coordinate.M:\n      this._m = value\n      break\n    default:\n      throw new IllegalArgumentException('Invalid ordinate index: ' + ordinateIndex)\n    }\n  }\n  setM(m) {\n    this._m = m\n  }\n  getOrdinate(ordinateIndex) {\n    switch (ordinateIndex) {\n    case Coordinate.X:\n      return this.x\n    case Coordinate.Y:\n      return this.y\n    case Coordinate.Z:\n      return this.getZ()\n    case Coordinate.M:\n      return this.getM()\n    }\n    throw new IllegalArgumentException('Invalid ordinate index: ' + ordinateIndex)\n  }\n  copy() {\n    return new CoordinateXYZM(this)\n  }\n  toString() {\n    return '(' + this.x + ', ' + this.y + ', ' + this.getZ() + ' m=' + this.getM() + ')'\n  }\n  setCoordinate(other) {\n    this.x = other.x\n    this.y = other.y\n    this.z = other.getZ()\n    this._m = other.getM()\n  }\n}\n", "import CoordinateXY from './CoordinateXY'\nimport Coordinate from './Coordinate'\nimport CoordinateXYM from './CoordinateXYM'\nimport CoordinateXYZM from './CoordinateXYZM'\nexport default class Coordinates {\n  static measures(coordinate) {\n    if (coordinate instanceof CoordinateXY) \n      return 0\n    else if (coordinate instanceof CoordinateXYM) \n      return 1\n    else if (coordinate instanceof CoordinateXYZM) \n      return 1\n    else if (coordinate instanceof Coordinate) \n      return 0\n    \n    return 0\n  }\n  static dimension(coordinate) {\n    if (coordinate instanceof CoordinateXY) \n      return 2\n    else if (coordinate instanceof CoordinateXYM) \n      return 3\n    else if (coordinate instanceof CoordinateXYZM) \n      return 4\n    else if (coordinate instanceof Coordinate) \n      return 3\n    \n    return 3\n  }\n  static create() {\n    if (arguments.length === 1) {\n      const dimension = arguments[0]\n      return Coordinates.create(dimension, 0)\n    } else if (arguments.length === 2) {\n      const dimension = arguments[0], measures = arguments[1]\n      if (dimension === 2) \n        return new CoordinateXY()\n      else if (dimension === 3 && measures === 0) \n        return new Coordinate()\n      else if (dimension === 3 && measures === 1) \n        return new CoordinateXYM()\n      else if (dimension === 4 && measures === 1) \n        return new CoordinateXYZM()\n      \n      return new Coordinate()\n    }\n  }\n}\n", "import hasInterface from '../../../../hasInterface'\nimport Collection from '../../../../java/util/Collection'\nimport Coordinate from './Coordinate'\nimport ArrayList from '../../../../java/util/ArrayList'\nexport default class CoordinateList extends ArrayList {\n  constructor() {\n    super()\n    CoordinateList.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    if (arguments.length === 0) {} else if (arguments.length === 1) {\n      const coord = arguments[0]\n      this.ensureCapacity(coord.length)\n      this.add(coord, true)\n    } else if (arguments.length === 2) {\n      const coord = arguments[0], allowRepeated = arguments[1]\n      this.ensureCapacity(coord.length)\n      this.add(coord, allowRepeated)\n    }\n  }\n  getCoordinate(i) {\n    return this.get(i)\n  }\n  addAll() {\n    if (arguments.length === 2 && (typeof arguments[1] === 'boolean' && hasInterface(arguments[0], Collection))) {\n      const coll = arguments[0], allowRepeated = arguments[1]\n      let isChanged = false\n      for (let i = coll.iterator(); i.hasNext(); ) {\n        this.add(i.next(), allowRepeated)\n        isChanged = true\n      }\n      return isChanged\n    } else {\n      return super.addAll.apply(this, arguments)\n    }\n  }\n  clone() {\n    const clone = super.clone.call(this)\n    for (let i = 0; i < this.size(); i++) \n      clone.add(i, this.get(i).clone())\n    \n    return clone\n  }\n  toCoordinateArray() {\n    if (arguments.length === 0) {\n      return this.toArray(CoordinateList.coordArrayType)\n    } else if (arguments.length === 1) {\n      const isForward = arguments[0]\n      if (isForward) \n        return this.toArray(CoordinateList.coordArrayType)\n      \n      const size = this.size()\n      const pts = new Array(size).fill(null)\n      for (let i = 0; i < size; i++) \n        pts[i] = this.get(size - i - 1)\n      \n      return pts\n    }\n  }\n  add() {\n    if (arguments.length === 1) {\n      const coord = arguments[0]\n      return super.add.call(this, coord)\n    } else if (arguments.length === 2) {\n      if (arguments[0] instanceof Array && typeof arguments[1] === 'boolean') {\n        const coord = arguments[0], allowRepeated = arguments[1]\n        this.add(coord, allowRepeated, true)\n        return true\n      } else if (arguments[0] instanceof Coordinate && typeof arguments[1] === 'boolean') {\n        const coord = arguments[0], allowRepeated = arguments[1]\n        if (!allowRepeated) \n          if (this.size() >= 1) {\n            const last = this.get(this.size() - 1)\n            if (last.equals2D(coord)) return null\n          }\n        \n        super.add.call(this, coord)\n      } else if (arguments[0] instanceof Object && typeof arguments[1] === 'boolean') {\n        const obj = arguments[0], allowRepeated = arguments[1]\n        this.add(obj, allowRepeated)\n        return true\n      }\n    } else if (arguments.length === 3) {\n      if (typeof arguments[2] === 'boolean' && (arguments[0] instanceof Array && typeof arguments[1] === 'boolean')) {\n        const coord = arguments[0], allowRepeated = arguments[1], direction = arguments[2]\n        if (direction) \n          for (let i = 0; i < coord.length; i++) \n            this.add(coord[i], allowRepeated)\n          \n        else \n          for (let i = coord.length - 1; i >= 0; i--) \n            this.add(coord[i], allowRepeated)\n          \n        \n        return true\n      } else if (typeof arguments[2] === 'boolean' && (Number.isInteger(arguments[0]) && arguments[1] instanceof Coordinate)) {\n        const i = arguments[0], coord = arguments[1], allowRepeated = arguments[2]\n        if (!allowRepeated) {\n          const size = this.size()\n          if (size > 0) {\n            if (i > 0) {\n              const prev = this.get(i - 1)\n              if (prev.equals2D(coord)) return null\n            }\n            if (i < size) {\n              const next = this.get(i)\n              if (next.equals2D(coord)) return null\n            }\n          }\n        }\n        super.add.call(this, i, coord)\n      }\n    } else if (arguments.length === 4) {\n      const coord = arguments[0], allowRepeated = arguments[1], start = arguments[2], end = arguments[3]\n      let inc = 1\n      if (start > end) inc = -1\n      for (let i = start; i !== end; i += inc) \n        this.add(coord[i], allowRepeated)\n      \n      return true\n    }\n  }\n  closeRing() {\n    if (this.size() > 0) {\n      const duplicate = this.get(0).copy()\n      this.add(duplicate, false)\n    }\n  }\n}\nCoordinateList.coordArrayType = new Array(0).fill(null)\n", "import CoordinateList from './CoordinateList'\nimport Coordinates from './Coordinates'\nimport MathUtil from '../math/MathUtil'\nimport System from '../../../../java/lang/System'\nimport Comparator from '../../../../java/util/Comparator'\nimport Envelope from './Envelope'\nexport default class CoordinateArrays {\n  static isRing(pts) {\n    if (pts.length < 4) return false\n    if (!pts[0].equals2D(pts[pts.length - 1])) return false\n    return true\n  }\n  static ptNotInList(testPts, pts) {\n    for (let i = 0; i < testPts.length; i++) {\n      const testPt = testPts[i]\n      if (CoordinateArrays.indexOf(testPt, pts) < 0) return testPt\n    }\n    return null\n  }\n  static scroll(coordinates, firstCoordinate) {\n    const i = CoordinateArrays.indexOf(firstCoordinate, coordinates)\n    if (i < 0) return null\n    const newCoordinates = new Array(coordinates.length).fill(null)\n    System.arraycopy(coordinates, i, newCoordinates, 0, coordinates.length - i)\n    System.arraycopy(coordinates, 0, newCoordinates, coordinates.length - i, i)\n    System.arraycopy(newCoordinates, 0, coordinates, 0, coordinates.length)\n  }\n  static equals() {\n    if (arguments.length === 2) {\n      const coord1 = arguments[0], coord2 = arguments[1]\n      if (coord1 === coord2) return true\n      if (coord1 === null || coord2 === null) return false\n      if (coord1.length !== coord2.length) return false\n      for (let i = 0; i < coord1.length; i++) \n        if (!coord1[i].equals(coord2[i])) return false\n      \n      return true\n    } else if (arguments.length === 3) {\n      const coord1 = arguments[0], coord2 = arguments[1], coordinateComparator = arguments[2]\n      if (coord1 === coord2) return true\n      if (coord1 === null || coord2 === null) return false\n      if (coord1.length !== coord2.length) return false\n      for (let i = 0; i < coord1.length; i++) \n        if (coordinateComparator.compare(coord1[i], coord2[i]) !== 0) return false\n      \n      return true\n    }\n  }\n  static intersection(coordinates, env) {\n    const coordList = new CoordinateList()\n    for (let i = 0; i < coordinates.length; i++) \n      if (env.intersects(coordinates[i])) coordList.add(coordinates[i], true)\n    \n    return coordList.toCoordinateArray()\n  }\n  static measures(pts) {\n    if (pts === null || pts.length === 0) \n      return 0\n    \n    let measures = 0\n    for (const coordinate of pts) \n      measures = Math.max(measures, Coordinates.measures(coordinate))\n    \n    return measures\n  }\n  static hasRepeatedPoints(coord) {\n    for (let i = 1; i < coord.length; i++) \n      if (coord[i - 1].equals(coord[i])) \n        return true\n      \n    \n    return false\n  }\n  static removeRepeatedPoints(coord) {\n    if (!CoordinateArrays.hasRepeatedPoints(coord)) return coord\n    const coordList = new CoordinateList(coord, false)\n    return coordList.toCoordinateArray()\n  }\n  static reverse(coord) {\n    const last = coord.length - 1\n    const mid = Math.trunc(last / 2)\n    for (let i = 0; i <= mid; i++) {\n      const tmp = coord[i]\n      coord[i] = coord[last - i]\n      coord[last - i] = tmp\n    }\n  }\n  static removeNull(coord) {\n    let nonNull = 0\n    for (let i = 0; i < coord.length; i++) \n      if (coord[i] !== null) nonNull++\n    \n    const newCoord = new Array(nonNull).fill(null)\n    if (nonNull === 0) return newCoord\n    let j = 0\n    for (let i = 0; i < coord.length; i++) \n      if (coord[i] !== null) newCoord[j++] = coord[i]\n    \n    return newCoord\n  }\n  static copyDeep() {\n    if (arguments.length === 1) {\n      const coordinates = arguments[0]\n      const copy = new Array(coordinates.length).fill(null)\n      for (let i = 0; i < coordinates.length; i++) \n        copy[i] = coordinates[i].copy()\n      \n      return copy\n    } else if (arguments.length === 5) {\n      const src = arguments[0], srcStart = arguments[1], dest = arguments[2], destStart = arguments[3], length = arguments[4]\n      for (let i = 0; i < length; i++) \n        dest[destStart + i] = src[srcStart + i].copy()\n      \n    }\n  }\n  static isEqualReversed(pts1, pts2) {\n    for (let i = 0; i < pts1.length; i++) {\n      const p1 = pts1[i]\n      const p2 = pts2[pts1.length - i - 1]\n      if (p1.compareTo(p2) !== 0) return false\n    }\n    return true\n  }\n  static envelope(coordinates) {\n    const env = new Envelope()\n    for (let i = 0; i < coordinates.length; i++) \n      env.expandToInclude(coordinates[i])\n    \n    return env\n  }\n  static toCoordinateArray(coordList) {\n    return coordList.toArray(CoordinateArrays.coordArrayType)\n  }\n  static dimension(pts) {\n    if (pts === null || pts.length === 0) \n      return 3\n    \n    let dimension = 0\n    for (const coordinate of pts) \n      dimension = Math.max(dimension, Coordinates.dimension(coordinate))\n    \n    return dimension\n  }\n  static atLeastNCoordinatesOrNothing(n, c) {\n    return c.length >= n ? c : []\n  }\n  static indexOf(coordinate, coordinates) {\n    for (let i = 0; i < coordinates.length; i++) \n      if (coordinate.equals(coordinates[i])) \n        return i\n      \n    \n    return -1\n  }\n  static increasingDirection(pts) {\n    for (let i = 0; i < Math.trunc(pts.length / 2); i++) {\n      const j = pts.length - 1 - i\n      const comp = pts[i].compareTo(pts[j])\n      if (comp !== 0) return comp\n    }\n    return 1\n  }\n  static compare(pts1, pts2) {\n    let i = 0\n    while (i < pts1.length && i < pts2.length) {\n      const compare = pts1[i].compareTo(pts2[i])\n      if (compare !== 0) return compare\n      i++\n    }\n    if (i < pts2.length) return -1\n    if (i < pts1.length) return 1\n    return 0\n  }\n  static minCoordinate(coordinates) {\n    let minCoord = null\n    for (let i = 0; i < coordinates.length; i++) \n      if (minCoord === null || minCoord.compareTo(coordinates[i]) > 0) \n        minCoord = coordinates[i]\n      \n    \n    return minCoord\n  }\n  static extract(pts, start, end) {\n    start = MathUtil.clamp(start, 0, pts.length)\n    end = MathUtil.clamp(end, -1, pts.length)\n    let npts = end - start + 1\n    if (end < 0) npts = 0\n    if (start >= pts.length) npts = 0\n    if (end < start) npts = 0\n    const extractPts = new Array(npts).fill(null)\n    if (npts === 0) return extractPts\n    let iPts = 0\n    for (let i = start; i <= end; i++) \n      extractPts[iPts++] = pts[i]\n    \n    return extractPts\n  }\n}\nclass ForwardComparator {\n  compare(o1, o2) {\n    const pts1 = o1\n    const pts2 = o2\n    return CoordinateArrays.compare(pts1, pts2)\n  }\n  get interfaces_() {\n    return [Comparator]\n  }\n}\nclass BidirectionalComparator {\n  compare(o1, o2) {\n    const pts1 = o1\n    const pts2 = o2\n    if (pts1.length < pts2.length) return -1\n    if (pts1.length > pts2.length) return 1\n    if (pts1.length === 0) return 0\n    const forwardComp = CoordinateArrays.compare(pts1, pts2)\n    const isEqualRev = CoordinateArrays.isEqualReversed(pts1, pts2)\n    if (isEqualRev) return 0\n    return forwardComp\n  }\n  OLDcompare(o1, o2) {\n    const pts1 = o1\n    const pts2 = o2\n    if (pts1.length < pts2.length) return -1\n    if (pts1.length > pts2.length) return 1\n    if (pts1.length === 0) return 0\n    const dir1 = CoordinateArrays.increasingDirection(pts1)\n    const dir2 = CoordinateArrays.increasingDirection(pts2)\n    let i1 = dir1 > 0 ? 0 : pts1.length - 1\n    let i2 = dir2 > 0 ? 0 : pts1.length - 1\n    for (let i = 0; i < pts1.length; i++) {\n      const comparePt = pts1[i1].compareTo(pts2[i2])\n      if (comparePt !== 0) return comparePt\n      i1 += dir1\n      i2 += dir2\n    }\n    return 0\n  }\n  get interfaces_() {\n    return [Comparator]\n  }\n}\nCoordinateArrays.ForwardComparator = ForwardComparator\nCoordinateArrays.BidirectionalComparator = BidirectionalComparator\nCoordinateArrays.coordArrayType = new Array(0).fill(null)\n", "export default class StringBuilder {\n  constructor(str) {\n    this.str = str\n  }\n  append(e) {\n    this.str += e\n  }\n  setCharAt(i, c) {\n    this.str = this.str.substr(0, i) + c + this.str.substr(i + 1)\n  }\n  toString() {\n    return this.str\n  }\n}", "import hasInterface from '../../../../../hasInterface'\nimport Coordinate from '../Coordinate'\nimport Double from '../../../../../java/lang/Double'\nimport Coordinates from '../Coordinates'\nimport CoordinateSequence from '../CoordinateSequence'\nimport CoordinateArrays from '../CoordinateArrays'\nimport Serializable from '../../../../../java/io/Serializable'\nimport StringBuilder from '../../../../../java/lang/StringBuilder'\nexport default class CoordinateArraySequence {\n  constructor() {\n    CoordinateArraySequence.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this._dimension = 3\n    this._measures = 0\n    this._coordinates = null\n    if (arguments.length === 1) {\n      if (arguments[0] instanceof Array) {\n        const coordinates = arguments[0]\n        CoordinateArraySequence.constructor_.call(this, coordinates, CoordinateArrays.dimension(coordinates), CoordinateArrays.measures(coordinates))\n      } else if (Number.isInteger(arguments[0])) {\n        const size = arguments[0]\n        this._coordinates = new Array(size).fill(null)\n        for (let i = 0; i < size; i++) \n          this._coordinates[i] = new Coordinate()\n        \n      } else if (hasInterface(arguments[0], CoordinateSequence)) {\n        const coordSeq = arguments[0]\n        if (coordSeq === null) {\n          this._coordinates = new Array(0).fill(null)\n          return null\n        }\n        this._dimension = coordSeq.getDimension()\n        this._measures = coordSeq.getMeasures()\n        this._coordinates = new Array(coordSeq.size()).fill(null)\n        for (let i = 0; i < this._coordinates.length; i++) \n          this._coordinates[i] = coordSeq.getCoordinateCopy(i)\n        \n      }\n    } else if (arguments.length === 2) {\n      if (arguments[0] instanceof Array && Number.isInteger(arguments[1])) {\n        const coordinates = arguments[0], dimension = arguments[1]\n        CoordinateArraySequence.constructor_.call(this, coordinates, dimension, CoordinateArrays.measures(coordinates))\n      } else if (Number.isInteger(arguments[0]) && Number.isInteger(arguments[1])) {\n        const size = arguments[0], dimension = arguments[1]\n        this._coordinates = new Array(size).fill(null)\n        this._dimension = dimension\n        for (let i = 0; i < size; i++) \n          this._coordinates[i] = Coordinates.create(dimension)\n        \n      }\n    } else if (arguments.length === 3) {\n      if (Number.isInteger(arguments[2]) && (arguments[0] instanceof Array && Number.isInteger(arguments[1]))) {\n        const coordinates = arguments[0], dimension = arguments[1], measures = arguments[2]\n        this._dimension = dimension\n        this._measures = measures\n        if (coordinates === null) \n          this._coordinates = new Array(0).fill(null)\n        else \n          this._coordinates = coordinates\n        \n      } else if (Number.isInteger(arguments[2]) && (Number.isInteger(arguments[0]) && Number.isInteger(arguments[1]))) {\n        const size = arguments[0], dimension = arguments[1], measures = arguments[2]\n        this._coordinates = new Array(size).fill(null)\n        this._dimension = dimension\n        this._measures = measures\n        for (let i = 0; i < size; i++) \n          this._coordinates[i] = this.createCoordinate()\n        \n      }\n    }\n  }\n  getM(index) {\n    if (this.hasM()) \n      return this._coordinates[index].getM()\n    else \n      return Double.NaN\n    \n  }\n  setOrdinate(index, ordinateIndex, value) {\n    switch (ordinateIndex) {\n    case CoordinateSequence.X:\n      this._coordinates[index].x = value\n      break\n    case CoordinateSequence.Y:\n      this._coordinates[index].y = value\n      break\n    default:\n      this._coordinates[index].setOrdinate(ordinateIndex, value)\n    }\n  }\n  getZ(index) {\n    if (this.hasZ()) \n      return this._coordinates[index].getZ()\n    else \n      return Double.NaN\n    \n  }\n  size() {\n    return this._coordinates.length\n  }\n  getOrdinate(index, ordinateIndex) {\n    switch (ordinateIndex) {\n    case CoordinateSequence.X:\n      return this._coordinates[index].x\n    case CoordinateSequence.Y:\n      return this._coordinates[index].y\n    default:\n      return this._coordinates[index].getOrdinate(ordinateIndex)\n    }\n  }\n  getCoordinate() {\n    if (arguments.length === 1) {\n      const i = arguments[0]\n      return this._coordinates[i]\n    } else if (arguments.length === 2) {\n      const index = arguments[0], coord = arguments[1]\n      coord.setCoordinate(this._coordinates[index])\n    }\n  }\n  getCoordinateCopy(i) {\n    const copy = this.createCoordinate()\n    copy.setCoordinate(this._coordinates[i])\n    return copy\n  }\n  createCoordinate() {\n    return Coordinates.create(this.getDimension(), this.getMeasures())\n  }\n  getDimension() {\n    return this._dimension\n  }\n  getX(index) {\n    return this._coordinates[index].x\n  }\n  getMeasures() {\n    return this._measures\n  }\n  expandEnvelope(env) {\n    for (let i = 0; i < this._coordinates.length; i++) \n      env.expandToInclude(this._coordinates[i])\n    \n    return env\n  }\n  copy() {\n    const cloneCoordinates = new Array(this.size()).fill(null)\n    for (let i = 0; i < this._coordinates.length; i++) {\n      const duplicate = this.createCoordinate()\n      duplicate.setCoordinate(this._coordinates[i])\n      cloneCoordinates[i] = duplicate\n    }\n    return new CoordinateArraySequence(cloneCoordinates, this._dimension, this._measures)\n  }\n  toString() {\n    if (this._coordinates.length > 0) {\n      const strBuilder = new StringBuilder(17 * this._coordinates.length)\n      strBuilder.append('(')\n      strBuilder.append(this._coordinates[0])\n      for (let i = 1; i < this._coordinates.length; i++) {\n        strBuilder.append(', ')\n        strBuilder.append(this._coordinates[i])\n      }\n      strBuilder.append(')')\n      return strBuilder.toString()\n    } else {\n      return '()'\n    }\n  }\n  getY(index) {\n    return this._coordinates[index].y\n  }\n  toCoordinateArray() {\n    return this._coordinates\n  }\n  get interfaces_() {\n    return [CoordinateSequence, Serializable]\n  }\n}\n", "import CoordinateSequenceFactory from '../CoordinateSequenceFactory'\nimport hasInterface from '../../../../../hasInterface'\nimport CoordinateArraySequence from './CoordinateArraySequence'\nimport CoordinateSequence from '../CoordinateSequence'\nimport Serializable from '../../../../../java/io/Serializable'\nexport default class CoordinateArraySequenceFactory {\n  static instance() {\n    return CoordinateArraySequenceFactory.instanceObject\n  }\n  readResolve() {\n    return CoordinateArraySequenceFactory.instance()\n  }\n  create() {\n    if (arguments.length === 1) {\n      if (arguments[0] instanceof Array) {\n        const coordinates = arguments[0]\n        return new CoordinateArraySequence(coordinates)\n      } else if (hasInterface(arguments[0], CoordinateSequence)) {\n        const coordSeq = arguments[0]\n        return new CoordinateArraySequence(coordSeq)\n      }\n    } else if (arguments.length === 2) {\n      let size = arguments[0], dimension = arguments[1]\n      if (dimension > 3) dimension = 3\n      if (dimension < 2) dimension = 2\n      return new CoordinateArraySequence(size, dimension)\n    } else if (arguments.length === 3) {\n      let size = arguments[0], dimension = arguments[1], measures = arguments[2]\n      let spatial = dimension - measures\n      if (measures > 1) \n        measures = 1\n      \n      if (spatial > 3) \n        spatial = 3\n      \n      if (spatial < 2) spatial = 2\n      return new CoordinateArraySequence(size, spatial + measures, measures)\n    }\n  }\n  get interfaces_() {\n    return [CoordinateSequenceFactory, Serializable]\n  }\n}\nCoordinateArraySequenceFactory.instanceObject = new CoordinateArraySequenceFactory()\n", "import Geometry from './Geometry'\nimport GeometryCollection from './GeometryCollection'\nimport Polygonal from './Polygonal'\nimport ArrayList from '../../../../java/util/ArrayList'\nexport default class MultiPolygon extends GeometryCollection {\n  constructor() {\n    super()\n    MultiPolygon.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    const polygons = arguments[0], factory = arguments[1]\n    GeometryCollection.constructor_.call(this, polygons, factory)\n  }\n  copyInternal() {\n    const polygons = new Array(this._geometries.length).fill(null)\n    for (let i = 0; i < polygons.length; i++) \n      polygons[i] = this._geometries[i].copy()\n    \n    return new MultiPolygon(polygons, this._factory)\n  }\n  equalsExact() {\n    if (arguments.length === 2 && (typeof arguments[1] === 'number' && arguments[0] instanceof Geometry)) {\n      const other = arguments[0], tolerance = arguments[1]\n      if (!this.isEquivalentClass(other)) \n        return false\n      \n      return super.equalsExact.call(this, other, tolerance)\n    } else {\n      return super.equalsExact.apply(this, arguments)\n    }\n  }\n  getBoundaryDimension() {\n    return 1\n  }\n  getTypeCode() {\n    return Geometry.TYPECODE_MULTIPOLYGON\n  }\n  getDimension() {\n    return 2\n  }\n  getBoundary() {\n    if (this.isEmpty()) \n      return this.getFactory().createMultiLineString()\n    \n    const allRings = new ArrayList()\n    for (let i = 0; i < this._geometries.length; i++) {\n      const polygon = this._geometries[i]\n      const rings = polygon.getBoundary()\n      for (let j = 0; j < rings.getNumGeometries(); j++) \n        allRings.add(rings.getGeometryN(j))\n      \n    }\n    const allRingsArray = new Array(allRings.size()).fill(null)\n    return this.getFactory().createMultiLineString(allRings.toArray(allRingsArray))\n  }\n  getGeometryType() {\n    return Geometry.TYPENAME_MULTIPOLYGON\n  }\n  get interfaces_() {\n    return [Polygonal]\n  }\n}\n", "/**\n * @see http://download.oracle.com/javase/6/docs/api/java/util/Map.html\n */\nexport default class Map {\n  /**\n     * Returns the value to which the specified key is mapped, or null if this map\n     * contains no mapping for the key.\n     * @param {Object} key\n     * @return {Object}\n     */\n  get() { }\n\n  /**\n     * Associates the specified value with the specified key in this map (optional\n     * operation).\n     * @param {Object} key\n     * @param {Object} value\n     * @return {Object}\n     */\n  put() { }\n\n  /**\n     * Returns the number of key-value mappings in this map.\n     * @return {number}\n     */\n  size() { }\n\n  /**\n     * Returns a Collection view of the values contained in this map.\n     * @return {javascript.util.Collection}\n     */\n  values() { }\n\n  /**\n     * Returns a {@link Set} view of the mappings contained in this map.\n     * The set is backed by the map, so changes to the map are\n     * reflected in the set, and vice-versa.  If the map is modified\n     * while an iteration over the set is in progress (except through\n     * the iterator's own <tt>remove</tt> operation, or through the\n     * <tt>setValue</tt> operation on a map entry returned by the\n     * iterator) the results of the iteration are undefined.  The set\n     * supports element removal, which removes the corresponding\n     * mapping from the map, via the <tt>Iterator.remove</tt>,\n     * <tt>Set.remove</tt>, <tt>removeAll</tt>, <tt>retainAll</tt> and\n     * <tt>clear</tt> operations.  It does not support the\n     * <tt>add</tt> or <tt>addAll</tt> operations.\n     *\n     * @return {Set} a set view of the mappings contained in this map\n     */\n  entrySet() { }\n}\n", "import ArrayList from './ArrayList'\nimport MapInterface from './Map'\nimport HashSet from './HashSet'\n\n/**\n * @see http://download.oracle.com/javase/6/docs/api/java/util/HashMap.html\n */\nexport default class HashMap extends MapInterface {\n  constructor() {\n    super()\n    this.map = new Map()\n  }\n\n  get(key) {\n    return this.map.get(key) || null\n  }\n\n  put(key, value) {\n    this.map.set(key, value)\n    return value\n  }\n\n  values() {\n    const arrayList = new ArrayList()\n    const it = this.map.values()\n    let o = it.next()\n    while (!o.done) {\n      arrayList.add(o.value)\n      o = it.next()\n    }\n    return arrayList\n  }\n\n  entrySet() {\n    const hashSet = new HashSet()\n    this.map.entries().forEach(entry => hashSet.add(entry))\n    return hashSet\n  }\n\n  size() {\n    return this.map.size()\n  }\n}\n", "import HashMap from '../../../../java/util/HashMap'\nimport Coordinate from './Coordinate'\nimport Double from '../../../../java/lang/Double'\nimport Integer from '../../../../java/lang/Integer'\nimport Comparable from '../../../../java/lang/Comparable'\nimport Serializable from '../../../../java/io/Serializable'\nexport default class PrecisionModel {\n  constructor() {\n    PrecisionModel.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this._modelType = null\n    this._scale = null\n    if (arguments.length === 0) \n      this._modelType = PrecisionModel.FLOATING\n    else if (arguments.length === 1) \n      if (arguments[0] instanceof Type) {\n        const modelType = arguments[0]\n        this._modelType = modelType\n        if (modelType === PrecisionModel.FIXED) \n          this.setScale(1.0)\n        \n      } else if (typeof arguments[0] === 'number') {\n        const scale = arguments[0]\n        this._modelType = PrecisionModel.FIXED\n        this.setScale(scale)\n      } else if (arguments[0] instanceof PrecisionModel) {\n        const pm = arguments[0]\n        this._modelType = pm._modelType\n        this._scale = pm._scale\n      }\n    \n  }\n  static mostPrecise(pm1, pm2) {\n    if (pm1.compareTo(pm2) >= 0) return pm1\n    return pm2\n  }\n  equals(other) {\n    if (!(other instanceof PrecisionModel)) \n      return false\n    \n    const otherPrecisionModel = other\n    return this._modelType === otherPrecisionModel._modelType && this._scale === otherPrecisionModel._scale\n  }\n  compareTo(o) {\n    const other = o\n    const sigDigits = this.getMaximumSignificantDigits()\n    const otherSigDigits = other.getMaximumSignificantDigits()\n    return Integer.compare(sigDigits, otherSigDigits)\n  }\n  getScale() {\n    return this._scale\n  }\n  isFloating() {\n    return this._modelType === PrecisionModel.FLOATING || this._modelType === PrecisionModel.FLOATING_SINGLE\n  }\n  getType() {\n    return this._modelType\n  }\n  toString() {\n    let description = 'UNKNOWN'\n    if (this._modelType === PrecisionModel.FLOATING) \n      description = 'Floating'\n    else if (this._modelType === PrecisionModel.FLOATING_SINGLE) \n      description = 'Floating-Single'\n    else if (this._modelType === PrecisionModel.FIXED) \n      description = 'Fixed (Scale=' + this.getScale() + ')'\n    \n    return description\n  }\n  makePrecise() {\n    if (typeof arguments[0] === 'number') {\n      const val = arguments[0]\n      if (Double.isNaN(val)) return val\n      if (this._modelType === PrecisionModel.FLOATING_SINGLE) {\n        const floatSingleVal = val\n        return floatSingleVal\n      }\n      if (this._modelType === PrecisionModel.FIXED) \n        return Math.round(val * this._scale) / this._scale\n      \n      return val\n    } else if (arguments[0] instanceof Coordinate) {\n      const coord = arguments[0]\n      if (this._modelType === PrecisionModel.FLOATING) return null\n      coord.x = this.makePrecise(coord.x)\n      coord.y = this.makePrecise(coord.y)\n    }\n  }\n  getMaximumSignificantDigits() {\n    let maxSigDigits = 16\n    if (this._modelType === PrecisionModel.FLOATING) \n      maxSigDigits = 16\n    else if (this._modelType === PrecisionModel.FLOATING_SINGLE) \n      maxSigDigits = 6\n    else if (this._modelType === PrecisionModel.FIXED) \n      maxSigDigits = 1 + Math.trunc(Math.ceil(Math.log(this.getScale()) / Math.log(10)))\n    \n    return maxSigDigits\n  }\n  setScale(scale) {\n    this._scale = Math.abs(scale)\n  }\n  get interfaces_() {\n    return [Serializable, Comparable]\n  }\n}\nclass Type {\n  constructor() {\n    Type.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this._name = null\n    const name = arguments[0]\n    this._name = name\n    Type.nameToTypeMap.put(name, this)\n  }\n  readResolve() {\n    return Type.nameToTypeMap.get(this._name)\n  }\n  toString() {\n    return this._name\n  }\n  get interfaces_() {\n    return [Serializable]\n  }\n}\nType.nameToTypeMap = new HashMap()\nPrecisionModel.Type = Type\nPrecisionModel.FIXED = new Type('FIXED')\nPrecisionModel.FLOATING = new Type('FLOATING')\nPrecisionModel.FLOATING_SINGLE = new Type('FLOATING SINGLE')\nPrecisionModel.maximumPreciseValue = 9007199254740992.0\n", "import Geometry from './Geometry'\nimport Lineal from './Lineal'\nimport GeometryCollection from './GeometryCollection'\nimport UnsupportedOperationException from '../../../../java/lang/UnsupportedOperationException'\nimport Dimension from './Dimension'\nexport default class MultiLineString extends GeometryCollection {\n  constructor() {\n    super()\n    MultiLineString.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    const lineStrings = arguments[0], factory = arguments[1]\n    GeometryCollection.constructor_.call(this, lineStrings, factory)\n  }\n  copyInternal() {\n    const lineStrings = new Array(this._geometries.length).fill(null)\n    for (let i = 0; i < lineStrings.length; i++) \n      lineStrings[i] = this._geometries[i].copy()\n    \n    return new MultiLineString(lineStrings, this._factory)\n  }\n  equalsExact() {\n    if (arguments.length === 2 && (typeof arguments[1] === 'number' && arguments[0] instanceof Geometry)) {\n      const other = arguments[0], tolerance = arguments[1]\n      if (!this.isEquivalentClass(other)) \n        return false\n      \n      return super.equalsExact.call(this, other, tolerance)\n    } else {\n      return super.equalsExact.apply(this, arguments)\n    }\n  }\n  getBoundaryDimension() {\n    if (this.isClosed()) \n      return Dimension.FALSE\n    \n    return 0\n  }\n  isClosed() {\n    if (this.isEmpty()) \n      return false\n    \n    for (let i = 0; i < this._geometries.length; i++) \n      if (!this._geometries[i].isClosed()) \n        return false\n      \n    \n    return true\n  }\n  getTypeCode() {\n    return Geometry.TYPECODE_MULTILINESTRING\n  }\n  getDimension() {\n    return 1\n  }\n  getBoundary() {\n    throw new UnsupportedOperationException()\n  }\n  getGeometryType() {\n    return Geometry.TYPENAME_MULTILINESTRING\n  }\n  get interfaces_() {\n    return [Lineal]\n  }\n}\n", "import CoordinateSequenceFactory from './CoordinateSequenceFactory'\nimport LineString from './LineString'\nimport hasInterface from '../../../../hasInterface'\nimport Coordinate from './Coordinate'\nimport IllegalArgumentException from '../../../../java/lang/IllegalArgumentException'\nimport Point from './Point'\nimport Polygon from './Polygon'\nimport MultiPoint from './MultiPoint'\nimport LinearRing from './LinearRing'\nimport CoordinateArraySequenceFactory from './impl/CoordinateArraySequenceFactory'\nimport MultiPolygon from './MultiPolygon'\nimport CoordinateSequences from './CoordinateSequences'\nimport CoordinateSequence from './CoordinateSequence'\nimport GeometryCollection from './GeometryCollection'\nimport PrecisionModel from './PrecisionModel'\nimport Serializable from '../../../../java/io/Serializable'\nimport Assert from '../util/Assert'\nimport MultiLineString from './MultiLineString'\nexport default class GeometryFactory {\n  constructor() {\n    GeometryFactory.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this._precisionModel = null\n    this._coordinateSequenceFactory = null\n    this._SRID = null\n    if (arguments.length === 0) {\n      GeometryFactory.constructor_.call(this, new PrecisionModel(), 0)\n    } else if (arguments.length === 1) {\n      if (hasInterface(arguments[0], CoordinateSequenceFactory)) {\n        const coordinateSequenceFactory = arguments[0]\n        GeometryFactory.constructor_.call(this, new PrecisionModel(), 0, coordinateSequenceFactory)\n      } else if (arguments[0] instanceof PrecisionModel) {\n        const precisionModel = arguments[0]\n        GeometryFactory.constructor_.call(this, precisionModel, 0, GeometryFactory.getDefaultCoordinateSequenceFactory())\n      }\n    } else if (arguments.length === 2) {\n      const precisionModel = arguments[0], SRID = arguments[1]\n      GeometryFactory.constructor_.call(this, precisionModel, SRID, GeometryFactory.getDefaultCoordinateSequenceFactory())\n    } else if (arguments.length === 3) {\n      const precisionModel = arguments[0], SRID = arguments[1], coordinateSequenceFactory = arguments[2]\n      this._precisionModel = precisionModel\n      this._coordinateSequenceFactory = coordinateSequenceFactory\n      this._SRID = SRID\n    }\n  }\n  static toMultiPolygonArray(multiPolygons) {\n    const multiPolygonArray = new Array(multiPolygons.size()).fill(null)\n    return multiPolygons.toArray(multiPolygonArray)\n  }\n  static toGeometryArray(geometries) {\n    if (geometries === null) return null\n    const geometryArray = new Array(geometries.size()).fill(null)\n    return geometries.toArray(geometryArray)\n  }\n  static getDefaultCoordinateSequenceFactory() {\n    return CoordinateArraySequenceFactory.instance()\n  }\n  static toMultiLineStringArray(multiLineStrings) {\n    const multiLineStringArray = new Array(multiLineStrings.size()).fill(null)\n    return multiLineStrings.toArray(multiLineStringArray)\n  }\n  static toLineStringArray(lineStrings) {\n    const lineStringArray = new Array(lineStrings.size()).fill(null)\n    return lineStrings.toArray(lineStringArray)\n  }\n  static toMultiPointArray(multiPoints) {\n    const multiPointArray = new Array(multiPoints.size()).fill(null)\n    return multiPoints.toArray(multiPointArray)\n  }\n  static toLinearRingArray(linearRings) {\n    const linearRingArray = new Array(linearRings.size()).fill(null)\n    return linearRings.toArray(linearRingArray)\n  }\n  static toPointArray(points) {\n    const pointArray = new Array(points.size()).fill(null)\n    return points.toArray(pointArray)\n  }\n  static toPolygonArray(polygons) {\n    const polygonArray = new Array(polygons.size()).fill(null)\n    return polygons.toArray(polygonArray)\n  }\n  static createPointFromInternalCoord(coord, exemplar) {\n    exemplar.getPrecisionModel().makePrecise(coord)\n    return exemplar.getFactory().createPoint(coord)\n  }\n  createEmpty(dimension) {\n    switch (dimension) {\n    case -1:\n      return this.createGeometryCollection()\n    case 0:\n      return this.createPoint()\n    case 1:\n      return this.createLineString()\n    case 2:\n      return this.createPolygon()\n    default:\n      throw new IllegalArgumentException('Invalid dimension: ' + dimension)\n    }\n  }\n  toGeometry(envelope) {\n    if (envelope.isNull()) \n      return this.createPoint()\n    \n    if (envelope.getMinX() === envelope.getMaxX() && envelope.getMinY() === envelope.getMaxY()) \n      return this.createPoint(new Coordinate(envelope.getMinX(), envelope.getMinY()))\n    \n    if (envelope.getMinX() === envelope.getMaxX() || envelope.getMinY() === envelope.getMaxY()) \n      return this.createLineString([new Coordinate(envelope.getMinX(), envelope.getMinY()), new Coordinate(envelope.getMaxX(), envelope.getMaxY())])\n    \n    return this.createPolygon(this.createLinearRing([new Coordinate(envelope.getMinX(), envelope.getMinY()), new Coordinate(envelope.getMinX(), envelope.getMaxY()), new Coordinate(envelope.getMaxX(), envelope.getMaxY()), new Coordinate(envelope.getMaxX(), envelope.getMinY()), new Coordinate(envelope.getMinX(), envelope.getMinY())]), null)\n  }\n  createLineString() {\n    if (arguments.length === 0) \n      return this.createLineString(this.getCoordinateSequenceFactory().create([]))\n    else if (arguments.length === 1) \n      if (arguments[0] instanceof Array) {\n        const coordinates = arguments[0]\n        return this.createLineString(coordinates !== null ? this.getCoordinateSequenceFactory().create(coordinates) : null)\n      } else if (hasInterface(arguments[0], CoordinateSequence)) {\n        const coordinates = arguments[0]\n        return new LineString(coordinates, this)\n      }\n    \n  }\n  createMultiLineString() {\n    if (arguments.length === 0) {\n      return new MultiLineString(null, this)\n    } else if (arguments.length === 1) {\n      const lineStrings = arguments[0]\n      return new MultiLineString(lineStrings, this)\n    }\n  }\n  buildGeometry(geomList) {\n    let geomType = null\n    let isHeterogeneous = false\n    let hasGeometryCollection = false\n    for (let i = geomList.iterator(); i.hasNext(); ) {\n      const geom = i.next()\n      const partType = geom.getTypeCode()\n      if (geomType === null) \n        geomType = partType\n      \n      if (partType !== geomType) \n        isHeterogeneous = true\n      \n      if (geom instanceof GeometryCollection) hasGeometryCollection = true\n    }\n    if (geomType === null) \n      return this.createGeometryCollection()\n    \n    if (isHeterogeneous || hasGeometryCollection) \n      return this.createGeometryCollection(GeometryFactory.toGeometryArray(geomList))\n    \n    const geom0 = geomList.iterator().next()\n    const isCollection = geomList.size() > 1\n    if (isCollection) {\n      if (geom0 instanceof Polygon) \n        return this.createMultiPolygon(GeometryFactory.toPolygonArray(geomList))\n      else if (geom0 instanceof LineString) \n        return this.createMultiLineString(GeometryFactory.toLineStringArray(geomList))\n      else if (geom0 instanceof Point) \n        return this.createMultiPoint(GeometryFactory.toPointArray(geomList))\n      \n      Assert.shouldNeverReachHere('Unhandled geometry type: ' + geom0.getGeometryType())\n    }\n    return geom0\n  }\n  createMultiPointFromCoords(coordinates) {\n    return this.createMultiPoint(coordinates !== null ? this.getCoordinateSequenceFactory().create(coordinates) : null)\n  }\n  createPoint() {\n    if (arguments.length === 0) \n      return this.createPoint(this.getCoordinateSequenceFactory().create([]))\n    else if (arguments.length === 1) \n      if (arguments[0] instanceof Coordinate) {\n        const coordinate = arguments[0]\n        return this.createPoint(coordinate !== null ? this.getCoordinateSequenceFactory().create([coordinate]) : null)\n      } else if (hasInterface(arguments[0], CoordinateSequence)) {\n        const coordinates = arguments[0]\n        return new Point(coordinates, this)\n      }\n    \n  }\n  getCoordinateSequenceFactory() {\n    return this._coordinateSequenceFactory\n  }\n  createPolygon() {\n    if (arguments.length === 0) {\n      return this.createPolygon(null, null)\n    } else if (arguments.length === 1) {\n      if (hasInterface(arguments[0], CoordinateSequence)) {\n        const shell = arguments[0]\n        return this.createPolygon(this.createLinearRing(shell))\n      } else if (arguments[0] instanceof Array) {\n        const shell = arguments[0]\n        return this.createPolygon(this.createLinearRing(shell))\n      } else if (arguments[0] instanceof LinearRing) {\n        const shell = arguments[0]\n        return this.createPolygon(shell, null)\n      }\n    } else if (arguments.length === 2) {\n      const shell = arguments[0], holes = arguments[1]\n      return new Polygon(shell, holes, this)\n    }\n  }\n  getSRID() {\n    return this._SRID\n  }\n  createGeometryCollection() {\n    if (arguments.length === 0) {\n      return new GeometryCollection(null, this)\n    } else if (arguments.length === 1) {\n      const geometries = arguments[0]\n      return new GeometryCollection(geometries, this)\n    }\n  }\n  getPrecisionModel() {\n    return this._precisionModel\n  }\n  createLinearRing() {\n    if (arguments.length === 0) \n      return this.createLinearRing(this.getCoordinateSequenceFactory().create([]))\n    else if (arguments.length === 1) \n      if (arguments[0] instanceof Array) {\n        const coordinates = arguments[0]\n        return this.createLinearRing(coordinates !== null ? this.getCoordinateSequenceFactory().create(coordinates) : null)\n      } else if (hasInterface(arguments[0], CoordinateSequence)) {\n        const coordinates = arguments[0]\n        return new LinearRing(coordinates, this)\n      }\n    \n  }\n  createMultiPolygon() {\n    if (arguments.length === 0) {\n      return new MultiPolygon(null, this)\n    } else if (arguments.length === 1) {\n      const polygons = arguments[0]\n      return new MultiPolygon(polygons, this)\n    }\n  }\n  createMultiPoint() {\n    if (arguments.length === 0) \n      return new MultiPoint(null, this)\n    else if (arguments.length === 1) \n      if (arguments[0] instanceof Array) {\n        const point = arguments[0]\n        return new MultiPoint(point, this)\n      } else if (hasInterface(arguments[0], CoordinateSequence)) {\n        const coordinates = arguments[0]\n        if (coordinates === null) \n          return this.createMultiPoint(new Array(0).fill(null))\n        \n        const points = new Array(coordinates.size()).fill(null)\n        for (let i = 0; i < coordinates.size(); i++) {\n          const ptSeq = this.getCoordinateSequenceFactory().create(1, coordinates.getDimension(), coordinates.getMeasures())\n          CoordinateSequences.copy(coordinates, i, ptSeq, 0, 1)\n          points[i] = this.createPoint(ptSeq)\n        }\n        return this.createMultiPoint(points)\n      }\n    \n  }\n  get interfaces_() {\n    return [Serializable]\n  }\n}\n", "import Coordinate from '../geom/Coordinate'\nimport GeometryFactory from '../geom/GeometryFactory'\n\n/**\n * The coordinate layout for geometries, indicating whether a 3rd or 4th z ('Z')\n * or measure ('M') coordinate is available. Supported values are `'XY'`,\n * `'XYZ'`, `'XYM'`, `'XYZM'`.\n * @enum {string}\n */\nconst GeometryLayout = {\n  XY: 'XY',\n  XYZ: 'XYZ',\n  XYM: 'XYM',\n  XYZM: 'XYZM',\n}\n\n/**\n * The geometry type. One of `'Point'`, `'LineString'`, `'LinearRing'`,\n * `'Polygon'`, `'MultiPoint'`, `'MultiLineString'`, `'MultiPolygon'`,\n * `'GeometryCollection'`, `'Circle'`.\n * @enum {string}\n */\nconst GeometryType = {\n  POINT: 'Point',\n  LINE_STRING: 'LineString',\n  LINEAR_RING: 'LinearRing',\n  POLYGON: 'Polygon',\n  MULTI_POINT: 'MultiPoint',\n  MULTI_LINE_STRING: 'MultiLineString',\n  MULTI_POLYGON: 'MultiPolygon',\n  GEOMETRY_COLLECTION: 'GeometryCollection',\n  CIRCLE: 'Circle',\n}\n\n/**\n * @typedef {Object} Options\n * @property {boolean} [splitCollection=false] Whether to split GeometryCollections into\n * multiple features on reading.\n */\n\n/**\n * @typedef {Object} Token\n * @property {number} type\n * @property {number|string} [value]\n * @property {number} position\n */\n\n/**\n * @const\n * @type {string}\n */\nconst EMPTY = 'EMPTY'\n\n/**\n * @const\n * @type {string}\n */\nconst Z = 'Z'\n\n/**\n * @const\n * @type {string}\n */\nconst M = 'M'\n\n/**\n * @const\n * @type {string}\n */\nconst ZM = 'ZM'\n\n/**\n * @const\n * @enum {number}\n */\nconst TokenType = {\n  TEXT: 1,\n  LEFT_PAREN: 2,\n  RIGHT_PAREN: 3,\n  NUMBER: 4,\n  COMMA: 5,\n  EOF: 6,\n}\n\n/**\n * @const\n * @type {Object<string, string>}\n */\nconst WKTGeometryType = {}\nfor (const type in GeometryType)\n  WKTGeometryType[type] = GeometryType[type].toUpperCase()\n\n\n/**\n * Class to tokenize a WKT string.\n */\nclass Lexer {\n  /**\n   * @param {string} wkt WKT string.\n   */\n  constructor(wkt) {\n    /**\n     * @type {string}\n     */\n    this.wkt = wkt\n\n    /**\n     * @type {number}\n     * @private\n     */\n    this.index_ = -1\n  }\n\n  /**\n   * @param {string} c Character.\n   * @return {boolean} Whether the character is alphabetic.\n   * @private\n   */\n  isAlpha_(c) {\n    return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')\n  }\n\n  /**\n   * @param {string} c Character.\n   * @param {boolean=} opt_decimal Whether the string number\n   *     contains a dot, i.e. is a decimal number.\n   * @return {boolean} Whether the character is numeric.\n   * @private\n   */\n  isNumeric_(c, opt_decimal) {\n    const decimal = opt_decimal !== undefined ? opt_decimal : false\n    return (c >= '0' && c <= '9') || (c == '.' && !decimal)\n  }\n\n  /**\n   * @param {string} c Character.\n   * @return {boolean} Whether the character is whitespace.\n   * @private\n   */\n  isWhiteSpace_(c) {\n    return c == ' ' || c == '\\t' || c == '\\r' || c == '\\n'\n  }\n\n  /**\n   * @return {string} Next string character.\n   * @private\n   */\n  nextChar_() {\n    return this.wkt.charAt(++this.index_)\n  }\n\n  /**\n   * Fetch and return the next token.\n   * @return {!Token} Next string token.\n   */\n  nextToken() {\n    const c = this.nextChar_()\n    const position = this.index_\n    /** @type {number|string} */\n    let value = c\n    let type\n\n    if (c == '(') {\n      type = TokenType.LEFT_PAREN\n    } else if (c == ',') {\n      type = TokenType.COMMA\n    } else if (c == ')') {\n      type = TokenType.RIGHT_PAREN\n    } else if (this.isNumeric_(c) || c == '-') {\n      type = TokenType.NUMBER\n      value = this.readNumber_()\n    } else if (this.isAlpha_(c)) {\n      type = TokenType.TEXT\n      value = this.readText_()\n    } else if (this.isWhiteSpace_(c)) {\n      return this.nextToken()\n    } else if (c === '') {\n      type = TokenType.EOF\n    } else {\n      throw new Error('Unexpected character: ' + c)\n    }\n\n    return { position: position, value: value, type: type }\n  }\n\n  /**\n   * @return {number} Numeric token value.\n   * @private\n   */\n  readNumber_() {\n    let c\n    const index = this.index_\n    let decimal = false\n    let scientificNotation = false\n    do {\n      if (c == '.')\n        decimal = true\n      else if (c == 'e' || c == 'E')\n        scientificNotation = true\n      c = this.nextChar_()\n    } while (\n      this.isNumeric_(c, decimal) ||\n      // if we haven't detected a scientific number before, 'e' or 'E'\n      // hint that we should continue to read\n      (!scientificNotation && (c == 'e' || c == 'E')) ||\n      // once we know that we have a scientific number, both '-' and '+'\n      // are allowed\n      (scientificNotation && (c == '-' || c == '+'))\n    )\n    return parseFloat(this.wkt.substring(index, this.index_--))\n  }\n\n  /**\n   * @return {string} String token value.\n   * @private\n   */\n  readText_() {\n    let c\n    const index = this.index_\n    do\n      c = this.nextChar_()\n    while (this.isAlpha_(c))\n    return this.wkt.substring(index, this.index_--).toUpperCase()\n  }\n}\n\n/**\n * Class to parse the tokens from the WKT string.\n */\nclass Parser {\n  /**\n   * @param {Lexer} lexer The lexer.\n   */\n  constructor(lexer, factory) {\n    /**\n     * @type {Lexer}\n     * @private\n     */\n    this.lexer_ = lexer\n\n    /**\n     * @type {Token}\n     * @private\n     */\n    this.token_\n\n    /**\n     * @type {import(\"../geom/GeometryLayout.js\").default}\n     * @private\n     */\n    this.layout_ = GeometryLayout.XY\n\n    this.factory = factory\n  }\n\n  /**\n   * Fetch the next token form the lexer and replace the active token.\n   * @private\n   */\n  consume_() {\n    this.token_ = this.lexer_.nextToken()\n  }\n\n  /**\n   * Tests if the given type matches the type of the current token.\n   * @param {TokenType} type Token type.\n   * @return {boolean} Whether the token matches the given type.\n   */\n  isTokenType(type) {\n    const isMatch = this.token_.type == type\n    return isMatch\n  }\n\n  /**\n   * If the given type matches the current token, consume it.\n   * @param {TokenType} type Token type.\n   * @return {boolean} Whether the token matches the given type.\n   */\n  match(type) {\n    const isMatch = this.isTokenType(type)\n    if (isMatch) \n      this.consume_()\n    return isMatch\n  }\n\n  /**\n   * Try to parse the tokens provided by the lexer.\n   * @return {import(\"../geom/Geometry.js\").default} The geometry.\n   */\n  parse() {\n    this.consume_()\n    const geometry = this.parseGeometry_()\n    return geometry\n  }\n\n  /**\n   * Try to parse the dimensional info.\n   * @return {import(\"../geom/GeometryLayout.js\").default} The layout.\n   * @private\n   */\n  parseGeometryLayout_() {\n    let layout = GeometryLayout.XY\n    const dimToken = this.token_\n    if (this.isTokenType(TokenType.TEXT)) {\n      const dimInfo = dimToken.value\n      if (dimInfo === Z)\n        layout = GeometryLayout.XYZ\n      else if (dimInfo === M)\n        layout = GeometryLayout.XYM\n      else if (dimInfo === ZM)\n        layout = GeometryLayout.XYZM\n      if (layout !== GeometryLayout.XY)\n        this.consume_()\n    }\n    return layout\n  }\n\n  /**\n   * @return {!Array<import(\"../geom/Geometry.js\").default>} A collection of geometries.\n   * @private\n   */\n  parseGeometryCollectionText_() {\n    if (this.match(TokenType.LEFT_PAREN)) {\n      const geometries = []\n      do\n        geometries.push(this.parseGeometry_())\n      while (this.match(TokenType.COMMA))\n      if (this.match(TokenType.RIGHT_PAREN)) \n        return geometries\n    } else if (this.isEmptyGeometry_()) {\n      return []\n    }\n    throw new Error(this.formatErrorMessage_())\n  }\n\n  /**\n   * @return {Array<number>} All values in a point.\n   * @private\n   */\n  parsePointText_() {\n    if (this.match(TokenType.LEFT_PAREN)) {\n      const coordinates = this.parsePoint_()\n      if (this.match(TokenType.RIGHT_PAREN)) \n        return coordinates\n    } else if (this.isEmptyGeometry_()) {\n      return null\n    }\n    throw new Error(this.formatErrorMessage_())\n  }\n\n  /**\n   * @return {!Array<!Array<number>>} All points in a linestring.\n   * @private\n   */\n  parseLineStringText_() {\n    if (this.match(TokenType.LEFT_PAREN)) {\n      const coordinates = this.parsePointList_()\n      if (this.match(TokenType.RIGHT_PAREN)) \n        return coordinates\n    } else if (this.isEmptyGeometry_()) {\n      return []\n    }\n    throw new Error(this.formatErrorMessage_())\n  }\n\n  /**\n   * @return {!Array<!Array<!Array<number>>>} All points in a polygon.\n   * @private\n   */\n  parsePolygonText_() {\n    if (this.match(TokenType.LEFT_PAREN)) {\n      const coordinates = this.parseLineStringTextList_()\n      if (this.match(TokenType.RIGHT_PAREN)) \n        return coordinates\n    } else if (this.isEmptyGeometry_()) {\n      return []\n    }\n    throw new Error(this.formatErrorMessage_())\n  }\n\n  /**\n   * @return {!Array<!Array<number>>} All points in a multipoint.\n   * @private\n   */\n  parseMultiPointText_() {\n    if (this.match(TokenType.LEFT_PAREN)) {\n      let coordinates\n      if (this.token_.type == TokenType.LEFT_PAREN) \n        coordinates = this.parsePointTextList_()\n      else\n        coordinates = this.parsePointList_()\n      if (this.match(TokenType.RIGHT_PAREN)) \n        return coordinates\n    } else if (this.isEmptyGeometry_()) {\n      return []\n    }\n    throw new Error(this.formatErrorMessage_())\n  }\n\n  /**\n   * @return {!Array<!Array<!Array<number>>>} All linestring points\n   *                                          in a multilinestring.\n   * @private\n   */\n  parseMultiLineStringText_() {\n    if (this.match(TokenType.LEFT_PAREN)) {\n      const coordinates = this.parseLineStringTextList_()\n      if (this.match(TokenType.RIGHT_PAREN)) \n        return coordinates\n    } else if (this.isEmptyGeometry_()) {\n      return []\n    }\n    throw new Error(this.formatErrorMessage_())\n  }\n\n  /**\n   * @return {!Array<!Array<!Array<!Array<number>>>>} All polygon points in a multipolygon.\n   * @private\n   */\n  parseMultiPolygonText_() {\n    if (this.match(TokenType.LEFT_PAREN)) {\n      const coordinates = this.parsePolygonTextList_()\n      if (this.match(TokenType.RIGHT_PAREN)) \n        return coordinates\n    } else if (this.isEmptyGeometry_()) {\n      return []\n    }\n    throw new Error(this.formatErrorMessage_())\n  }\n\n  /**\n   * @return {!Array<number>} A point.\n   * @private\n   */\n  parsePoint_() {\n    const coordinates = []\n    const dimensions = this.layout_.length\n    for (let i = 0; i < dimensions; ++i) {\n      const token = this.token_\n      if (this.match(TokenType.NUMBER)) \n        coordinates.push(/** @type {number} */(token.value))\n      else\n        break\n    }\n    if (coordinates.length == dimensions) \n      return coordinates\n    throw new Error(this.formatErrorMessage_())\n  }\n\n  /**\n   * @return {!Array<!Array<number>>} An array of points.\n   * @private\n   */\n  parsePointList_() {\n    const coordinates = [this.parsePoint_()]\n    while (this.match(TokenType.COMMA))\n      coordinates.push(this.parsePoint_())\n    return coordinates\n  }\n\n  /**\n   * @return {!Array<!Array<number>>} An array of points.\n   * @private\n   */\n  parsePointTextList_() {\n    const coordinates = [this.parsePointText_()]\n    while (this.match(TokenType.COMMA))\n      coordinates.push(this.parsePointText_())\n    return coordinates\n  }\n\n  /**\n   * @return {!Array<!Array<!Array<number>>>} An array of points.\n   * @private\n   */\n  parseLineStringTextList_() {\n    const coordinates = [this.parseLineStringText_()]\n    while (this.match(TokenType.COMMA))\n      coordinates.push(this.parseLineStringText_())\n    return coordinates\n  }\n\n  /**\n   * @return {!Array<!Array<!Array<!Array<number>>>>} An array of points.\n   * @private\n   */\n  parsePolygonTextList_() {\n    const coordinates = [this.parsePolygonText_()]\n    while (this.match(TokenType.COMMA))\n      coordinates.push(this.parsePolygonText_())\n    return coordinates\n  }\n\n  /**\n   * @return {boolean} Whether the token implies an empty geometry.\n   * @private\n   */\n  isEmptyGeometry_() {\n    const isEmpty =\n      this.isTokenType(TokenType.TEXT) && this.token_.value == EMPTY\n    if (isEmpty)\n      this.consume_()\n    return isEmpty\n  }\n\n  /**\n   * Create an error message for an unexpected token error.\n   * @return {string} Error message.\n   * @private\n   */\n  formatErrorMessage_() {\n    return (\n      'Unexpected `' +\n      this.token_.value +\n      '` at position ' +\n      this.token_.position +\n      ' in `' +\n      this.lexer_.wkt +\n      '`'\n    )\n  }\n\n  /**\n   * @return {!import(\"../geom/Geometry.js\").default} The geometry.\n   * @private\n   */\n  parseGeometry_() {\n    const factory = this.factory\n\n    const o2c = ordinates => new Coordinate(...ordinates)\n    const ca2p = coordinates => {\n      const rings = coordinates.map(a => factory.createLinearRing(a.map(o2c)))\n      if (rings.length > 1)\n        return factory.createPolygon(rings[0], rings.slice(1))\n      else\n        return factory.createPolygon(rings[0])\n    }\n\n    const token = this.token_\n    if (this.match(TokenType.TEXT)) {\n      const geomType = token.value\n      this.layout_ = this.parseGeometryLayout_()\n      if (geomType == 'GEOMETRYCOLLECTION') {\n        const geometries = this.parseGeometryCollectionText_()\n        return factory.createGeometryCollection(geometries)\n      } else {\n        switch (geomType) {\n        case 'POINT': {\n          const ordinates = this.parsePointText_()\n          if (!ordinates)\n            return factory.createPoint()\n          return factory.createPoint(new Coordinate(...ordinates))\n        }\n        case 'LINESTRING': {\n          const coordinates = this.parseLineStringText_()\n          const components = coordinates.map(o2c)\n          return factory.createLineString(components)\n        }\n        case 'LINEARRING': {\n          const coordinates = this.parseLineStringText_()\n          const components = coordinates.map(o2c)\n          return factory.createLinearRing(components)\n        }\n        case 'POLYGON': {\n          const coordinates = this.parsePolygonText_()\n          if (!coordinates || coordinates.length === 0)\n            return factory.createPolygon()\n          return ca2p(coordinates)\n        }\n        case 'MULTIPOINT': {\n          const coordinates = this.parseMultiPointText_()\n          if (!coordinates || coordinates.length === 0)\n            return factory.createMultiPoint()\n          const components = coordinates.map(o2c).map(c => factory.createPoint(c))\n          return factory.createMultiPoint(components)\n        }\n        case 'MULTILINESTRING': {\n          const coordinates = this.parseMultiLineStringText_()\n          const components = coordinates.map(a => factory.createLineString(a.map(o2c)))\n          return factory.createMultiLineString(components)\n        }\n        case 'MULTIPOLYGON': {\n          const coordinates = this.parseMultiPolygonText_()\n          if (!coordinates || coordinates.length === 0)\n            return factory.createMultiPolygon()\n          const polygons = coordinates.map(ca2p)\n          return factory.createMultiPolygon(polygons)\n        }\n        default: {\n          throw new Error('Invalid geometry type: ' + geomType)\n        }\n        }\n      }\n    }\n    throw new Error(this.formatErrorMessage_())\n  }\n}\n\n/**\n * @param {Point} geom Point geometry.\n * @return {string} Coordinates part of Point as WKT.\n */\nfunction encodePointGeometry(geom) {\n  if (geom.isEmpty())\n    return ''\n  const c = geom.getCoordinate()\n  const cs = [c.x, c.y]\n  if (c.z !== undefined && !Number.isNaN(c.z))\n    cs.push(c.z)\n  if (c.m !== undefined && !Number.isNaN(c.m))\n    cs.push(c.m)\n  return cs.join(' ')\n}\n\n/**\n * @param {MultiPoint} geom MultiPoint geometry.\n * @return {string} Coordinates part of MultiPoint as WKT.\n */\nfunction encodeMultiPointGeometry(geom) {\n  const array = []\n  for (let i = 0, ii = geom.getNumGeometries(); i < ii; ++i) \n    array.push('(' + encodePointGeometry(geom.getGeometryN(i)) + ')')\n  return array.join(', ')\n}\n\n/**\n * @param {GeometryCollection} geom GeometryCollection geometry.\n * @return {string} Coordinates part of GeometryCollection as WKT.\n */\nfunction encodeGeometryCollectionGeometry(geom) {\n  const array = []\n  for (let i = 0, ii = geom.getNumGeometries(); i < ii; ++i) \n    array.push(encode(geom.getGeometryN(i)))\n  return array.join(', ')\n}\n\n/**\n * @param {LineString|import(\"../geom/LinearRing.js\").default} geom LineString geometry.\n * @return {string} Coordinates part of LineString as WKT.\n */\nfunction encodeLineStringGeometry(geom) {\n  const coordinates = geom.getCoordinates()\n    .map(c => {\n      const a = [c.x, c.y]\n      if (c.z !== undefined && !Number.isNaN(c.z))\n        a.push(c.z)\n      if (c.m !== undefined && !Number.isNaN(c.m))\n        a.push(c.m)\n      return a\n    })\n  const array = []\n  for (let i = 0, ii = coordinates.length; i < ii; ++i) \n    array.push(coordinates[i].join(' '))\n  return array.join(', ')\n}\n\n/**\n * @param {MultiLineString} geom MultiLineString geometry.\n * @return {string} Coordinates part of MultiLineString as WKT.\n */\nfunction encodeMultiLineStringGeometry(geom) {\n  const array = []\n  for (let i = 0, ii = geom.getNumGeometries(); i < ii; ++i) \n    array.push('(' + encodeLineStringGeometry(geom.getGeometryN(i)) + ')')\n  return array.join(', ')\n}\n\n/**\n * @param {Polygon} geom Polygon geometry.\n * @return {string} Coordinates part of Polygon as WKT.\n */\nfunction encodePolygonGeometry(geom) {\n  const array = []\n  array.push('(' + encodeLineStringGeometry(geom.getExteriorRing()) + ')')\n  for (let i = 0, ii = geom.getNumInteriorRing(); i < ii; ++i) \n    array.push('(' + encodeLineStringGeometry(geom.getInteriorRingN(i)) + ')')\n  return array.join(', ')\n}\n\n/**\n * @param {MultiPolygon} geom MultiPolygon geometry.\n * @return {string} Coordinates part of MultiPolygon as WKT.\n */\nfunction encodeMultiPolygonGeometry(geom) {\n  const array = []\n  for (let i = 0, ii = geom.getNumGeometries(); i < ii; ++i) \n    array.push('(' + encodePolygonGeometry(geom.getGeometryN(i)) + ')')\n  return array.join(', ')\n}\n\n/**\n * @param {Geometry} geom Geometry geometry.\n * @return {string} Potential dimensional information for WKT type.\n */\nfunction encodeGeometryLayout(geom) {\n  let dimInfo = ''\n  if (geom.isEmpty())\n    return dimInfo\n  const c = geom.getCoordinate()\n  if (c.z !== undefined && !Number.isNaN(c.z))\n    dimInfo += Z\n  if (c.m !== undefined && !Number.isNaN(c.m))\n    dimInfo += M\n  return dimInfo\n}\n\n/**\n * @const\n * @type {Object<string, function(import(\"../geom/Geometry.js\").default): string>}\n */\nconst GeometryEncoder = {\n  'Point': encodePointGeometry,\n  'LineString': encodeLineStringGeometry,\n  'LinearRing': encodeLineStringGeometry,\n  'Polygon': encodePolygonGeometry,\n  'MultiPoint': encodeMultiPointGeometry,\n  'MultiLineString': encodeMultiLineStringGeometry,\n  'MultiPolygon': encodeMultiPolygonGeometry,\n  'GeometryCollection': encodeGeometryCollectionGeometry,\n}\n\n/**\n * Encode a geometry as WKT.\n * @param {!import(\"../geom/Geometry.js\").default} geom The geometry to encode.\n * @return {string} WKT string for the geometry.\n */\nfunction encode(geom) {\n  let type = geom.getGeometryType()\n  const geometryEncoder = GeometryEncoder[type]\n  type = type.toUpperCase()\n  const dimInfo = encodeGeometryLayout(geom)\n  if (dimInfo.length > 0) \n    type += ' ' + dimInfo\n  if (geom.isEmpty()) \n    return type + ' ' + EMPTY\n  const enc = geometryEncoder(geom)\n  return type + ' (' + enc + ')'\n}\n\n/**\n * Class for reading and writing Well-Known Text.\n *\n * NOTE: Adapted from OpenLayers.\n */\n\nexport default class WKTParser {\n  /** Create a new parser for WKT\n   *\n   * @param {GeometryFactory} geometryFactory\n   * @return An instance of WKTParser.\n   * @private\n   */\n  constructor(geometryFactory) {\n    this.geometryFactory = geometryFactory || new GeometryFactory()\n    this.precisionModel = this.geometryFactory.getPrecisionModel()\n  }\n\n  /**\n   * Deserialize a WKT string and return a geometry. Supports WKT for POINT,\n   * MULTIPOINT, LINESTRING, LINEARRING, MULTILINESTRING, POLYGON, MULTIPOLYGON,\n   * and GEOMETRYCOLLECTION.\n   *\n   * @param {String} wkt A WKT string.\n   * @return {Geometry} A geometry instance.\n   * @private\n   */\n  read(wkt) {\n    const lexer = new Lexer(wkt)\n    const parser = new Parser(lexer, this.geometryFactory)\n    const geometry = parser.parse()\n    return geometry\n  }\n\n  /**\n   * Serialize a geometry into a WKT string.\n   *\n   * @param {Geometry} geometry A feature or array of features.\n   * @return {String} The WKT string representation of the input geometries.\n   * @private\n   */\n  write(geometry) {\n    return encode(geometry)\n  }\n}\n", "/**\n * @module org/locationtech/jts/io/WKTWriter\n */\n\nimport WKTParser from './WKTParser'\n\n/**\n * Writes the Well-Known Text representation of a {@link Geometry}. The\n * Well-Known Text format is defined in the <A\n * HREF=\"http://www.opengis.org/techno/specs.htm\"> OGC Simple Features\n * Specification for SQL</A>.\n * <p>\n * The <code>WKTWriter</code> outputs coordinates rounded to the precision\n * model. Only the maximum number of decimal places necessary to represent the\n * ordinates to the required precision will be output.\n * <p>\n * The SFS WKT spec does not define a special tag for {@link LinearRing}s.\n * Under the spec, rings are output as <code>LINESTRING</code>s.\n */\nexport default class WKTWriter {\n  /**\n   * @param {GeometryFactory} geometryFactory\n   */\n  constructor(geometryFactory) {\n    this.parser = new WKTParser(geometryFactory)\n  }\n\n  /**\n   * Converts a <code>Geometry</code> to its Well-known Text representation.\n   *\n   * @param {Geometry} geometry a <code>Geometry</code> to process.\n   * @return {string} a <Geometry Tagged Text> string (see the OpenGIS Simple\n   *         Features Specification).\n   * @memberof module:org/locationtech/jts/io/WKTWriter#\n   */\n  write(geometry) {\n    return this.parser.write(geometry)\n  }\n\n  /**\n   * Generates the WKT for a <tt>LINESTRING</tt> specified by two\n   * {@link Coordinate}s.\n   *\n   * @param p0 the first coordinate.\n   * @param p1 the second coordinate.\n   *\n   * @return the WKT.\n   * @private\n   */\n  static toLineString(p0, p1) {\n    if (arguments.length !== 2) throw new Error('Not implemented')\n\n    return 'LINESTRING ( ' + p0.x + ' ' + p0.y + ', ' + p1.x + ' ' + p1.y + ' )'\n  }\n}\n", "import WKTWriter from '../io/WKTWriter'\nimport Coordinate from '../geom/Coordinate'\nimport Assert from '../util/Assert'\nimport StringBuilder from '../../../../java/lang/StringBuilder'\nexport default class LineIntersector {\n  constructor() {\n    LineIntersector.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this._result = null\n    this._inputLines = Array(2).fill().map(() => Array(2))\n    this._intPt = new Array(2).fill(null)\n    this._intLineIndex = null\n    this._isProper = null\n    this._pa = null\n    this._pb = null\n    this._precisionModel = null\n    this._intPt[0] = new Coordinate()\n    this._intPt[1] = new Coordinate()\n    this._pa = this._intPt[0]\n    this._pb = this._intPt[1]\n    this._result = 0\n  }\n  static computeEdgeDistance(p, p0, p1) {\n    const dx = Math.abs(p1.x - p0.x)\n    const dy = Math.abs(p1.y - p0.y)\n    let dist = -1.0\n    if (p.equals(p0)) {\n      dist = 0.0\n    } else if (p.equals(p1)) {\n      if (dx > dy) dist = dx; else dist = dy\n    } else {\n      const pdx = Math.abs(p.x - p0.x)\n      const pdy = Math.abs(p.y - p0.y)\n      if (dx > dy) dist = pdx; else dist = pdy\n      if (dist === 0.0 && !p.equals(p0)) \n        dist = Math.max(pdx, pdy)\n      \n    }\n    Assert.isTrue(!(dist === 0.0 && !p.equals(p0)), 'Bad distance calculation')\n    return dist\n  }\n  static nonRobustComputeEdgeDistance(p, p1, p2) {\n    const dx = p.x - p1.x\n    const dy = p.y - p1.y\n    const dist = Math.sqrt(dx * dx + dy * dy)\n    Assert.isTrue(!(dist === 0.0 && !p.equals(p1)), 'Invalid distance calculation')\n    return dist\n  }\n  getIndexAlongSegment(segmentIndex, intIndex) {\n    this.computeIntLineIndex()\n    return this._intLineIndex[segmentIndex][intIndex]\n  }\n  getTopologySummary() {\n    const catBuilder = new StringBuilder()\n    if (this.isEndPoint()) catBuilder.append(' endpoint')\n    if (this._isProper) catBuilder.append(' proper')\n    if (this.isCollinear()) catBuilder.append(' collinear')\n    return catBuilder.toString()\n  }\n  computeIntersection(p1, p2, p3, p4) {\n    this._inputLines[0][0] = p1\n    this._inputLines[0][1] = p2\n    this._inputLines[1][0] = p3\n    this._inputLines[1][1] = p4\n    this._result = this.computeIntersect(p1, p2, p3, p4)\n  }\n  getIntersectionNum() {\n    return this._result\n  }\n  computeIntLineIndex() {\n    if (arguments.length === 0) {\n      if (this._intLineIndex === null) {\n        this._intLineIndex = Array(2).fill().map(() => Array(2))\n        this.computeIntLineIndex(0)\n        this.computeIntLineIndex(1)\n      }\n    } else if (arguments.length === 1) {\n      const segmentIndex = arguments[0]\n      const dist0 = this.getEdgeDistance(segmentIndex, 0)\n      const dist1 = this.getEdgeDistance(segmentIndex, 1)\n      if (dist0 > dist1) {\n        this._intLineIndex[segmentIndex][0] = 0\n        this._intLineIndex[segmentIndex][1] = 1\n      } else {\n        this._intLineIndex[segmentIndex][0] = 1\n        this._intLineIndex[segmentIndex][1] = 0\n      }\n    }\n  }\n  isProper() {\n    return this.hasIntersection() && this._isProper\n  }\n  setPrecisionModel(precisionModel) {\n    this._precisionModel = precisionModel\n  }\n  isInteriorIntersection() {\n    if (arguments.length === 0) {\n      if (this.isInteriorIntersection(0)) return true\n      if (this.isInteriorIntersection(1)) return true\n      return false\n    } else if (arguments.length === 1) {\n      const inputLineIndex = arguments[0]\n      for (let i = 0; i < this._result; i++) \n        if (!(this._intPt[i].equals2D(this._inputLines[inputLineIndex][0]) || this._intPt[i].equals2D(this._inputLines[inputLineIndex][1]))) \n          return true\n        \n      \n      return false\n    }\n  }\n  getIntersection(intIndex) {\n    return this._intPt[intIndex]\n  }\n  isEndPoint() {\n    return this.hasIntersection() && !this._isProper\n  }\n  hasIntersection() {\n    return this._result !== LineIntersector.NO_INTERSECTION\n  }\n  getEdgeDistance(segmentIndex, intIndex) {\n    const dist = LineIntersector.computeEdgeDistance(this._intPt[intIndex], this._inputLines[segmentIndex][0], this._inputLines[segmentIndex][1])\n    return dist\n  }\n  isCollinear() {\n    return this._result === LineIntersector.COLLINEAR_INTERSECTION\n  }\n  toString() {\n    return WKTWriter.toLineString(this._inputLines[0][0], this._inputLines[0][1]) + ' - ' + WKTWriter.toLineString(this._inputLines[1][0], this._inputLines[1][1]) + this.getTopologySummary()\n  }\n  getEndpoint(segmentIndex, ptIndex) {\n    return this._inputLines[segmentIndex][ptIndex]\n  }\n  isIntersection(pt) {\n    for (let i = 0; i < this._result; i++) \n      if (this._intPt[i].equals2D(pt)) \n        return true\n      \n    \n    return false\n  }\n  getIntersectionAlongSegment(segmentIndex, intIndex) {\n    this.computeIntLineIndex()\n    return this._intPt[this._intLineIndex[segmentIndex][intIndex]]\n  }\n}\nLineIntersector.DONT_INTERSECT = 0\nLineIntersector.DO_INTERSECT = 1\nLineIntersector.COLLINEAR = 2\nLineIntersector.NO_INTERSECTION = 0\nLineIntersector.POINT_INTERSECTION = 1\nLineIntersector.COLLINEAR_INTERSECTION = 2\n", "import Coordinate from '../geom/Coordinate'\nimport Orientation from './Orientation'\nimport Intersection from './Intersection'\nimport CGAlgorithmsDD from './CGAlgorithmsDD'\nimport System from '../../../../java/lang/System'\nimport Envelope from '../geom/Envelope'\nimport Distance from './Distance'\nimport LineIntersector from './LineIntersector'\nexport default class RobustLineIntersector extends LineIntersector {\n  constructor() {\n    super()\n  }\n  static nearestEndpoint(p1, p2, q1, q2) {\n    let nearestPt = p1\n    let minDist = Distance.pointToSegment(p1, q1, q2)\n    let dist = Distance.pointToSegment(p2, q1, q2)\n    if (dist < minDist) {\n      minDist = dist\n      nearestPt = p2\n    }\n    dist = Distance.pointToSegment(q1, p1, p2)\n    if (dist < minDist) {\n      minDist = dist\n      nearestPt = q1\n    }\n    dist = Distance.pointToSegment(q2, p1, p2)\n    if (dist < minDist) {\n      minDist = dist\n      nearestPt = q2\n    }\n    return nearestPt\n  }\n  isInSegmentEnvelopes(intPt) {\n    const env0 = new Envelope(this._inputLines[0][0], this._inputLines[0][1])\n    const env1 = new Envelope(this._inputLines[1][0], this._inputLines[1][1])\n    return env0.contains(intPt) && env1.contains(intPt)\n  }\n  computeIntersection() {\n    if (arguments.length === 3) {\n      const p = arguments[0], p1 = arguments[1], p2 = arguments[2]\n      this._isProper = false\n      if (Envelope.intersects(p1, p2, p)) \n        if (Orientation.index(p1, p2, p) === 0 && Orientation.index(p2, p1, p) === 0) {\n          this._isProper = true\n          if (p.equals(p1) || p.equals(p2)) \n            this._isProper = false\n          \n          this._result = LineIntersector.POINT_INTERSECTION\n          return null\n        }\n      \n      this._result = LineIntersector.NO_INTERSECTION\n    } else {\n      return super.computeIntersection.apply(this, arguments)\n    }\n  }\n  intersection(p1, p2, q1, q2) {\n    let intPt = this.intersectionSafe(p1, p2, q1, q2)\n    if (!this.isInSegmentEnvelopes(intPt)) \n      intPt = new Coordinate(RobustLineIntersector.nearestEndpoint(p1, p2, q1, q2))\n    \n    if (this._precisionModel !== null) \n      this._precisionModel.makePrecise(intPt)\n    \n    return intPt\n  }\n  checkDD(p1, p2, q1, q2, intPt) {\n    const intPtDD = CGAlgorithmsDD.intersection(p1, p2, q1, q2)\n    const isIn = this.isInSegmentEnvelopes(intPtDD)\n    System.out.println('DD in env = ' + isIn + '  --------------------- ' + intPtDD)\n    if (intPt.distance(intPtDD) > 0.0001) \n      System.out.println('Distance = ' + intPt.distance(intPtDD))\n    \n  }\n  intersectionSafe(p1, p2, q1, q2) {\n    let intPt = Intersection.intersection(p1, p2, q1, q2)\n    if (intPt === null) intPt = RobustLineIntersector.nearestEndpoint(p1, p2, q1, q2)\n    return intPt\n  }\n  computeCollinearIntersection(p1, p2, q1, q2) {\n    const p1q1p2 = Envelope.intersects(p1, p2, q1)\n    const p1q2p2 = Envelope.intersects(p1, p2, q2)\n    const q1p1q2 = Envelope.intersects(q1, q2, p1)\n    const q1p2q2 = Envelope.intersects(q1, q2, p2)\n    if (p1q1p2 && p1q2p2) {\n      this._intPt[0] = q1\n      this._intPt[1] = q2\n      return LineIntersector.COLLINEAR_INTERSECTION\n    }\n    if (q1p1q2 && q1p2q2) {\n      this._intPt[0] = p1\n      this._intPt[1] = p2\n      return LineIntersector.COLLINEAR_INTERSECTION\n    }\n    if (p1q1p2 && q1p1q2) {\n      this._intPt[0] = q1\n      this._intPt[1] = p1\n      return q1.equals(p1) && !p1q2p2 && !q1p2q2 ? LineIntersector.POINT_INTERSECTION : LineIntersector.COLLINEAR_INTERSECTION\n    }\n    if (p1q1p2 && q1p2q2) {\n      this._intPt[0] = q1\n      this._intPt[1] = p2\n      return q1.equals(p2) && !p1q2p2 && !q1p1q2 ? LineIntersector.POINT_INTERSECTION : LineIntersector.COLLINEAR_INTERSECTION\n    }\n    if (p1q2p2 && q1p1q2) {\n      this._intPt[0] = q2\n      this._intPt[1] = p1\n      return q2.equals(p1) && !p1q1p2 && !q1p2q2 ? LineIntersector.POINT_INTERSECTION : LineIntersector.COLLINEAR_INTERSECTION\n    }\n    if (p1q2p2 && q1p2q2) {\n      this._intPt[0] = q2\n      this._intPt[1] = p2\n      return q2.equals(p2) && !p1q1p2 && !q1p1q2 ? LineIntersector.POINT_INTERSECTION : LineIntersector.COLLINEAR_INTERSECTION\n    }\n    return LineIntersector.NO_INTERSECTION\n  }\n  computeIntersect(p1, p2, q1, q2) {\n    this._isProper = false\n    if (!Envelope.intersects(p1, p2, q1, q2)) return LineIntersector.NO_INTERSECTION\n    const Pq1 = Orientation.index(p1, p2, q1)\n    const Pq2 = Orientation.index(p1, p2, q2)\n    if (Pq1 > 0 && Pq2 > 0 || Pq1 < 0 && Pq2 < 0) \n      return LineIntersector.NO_INTERSECTION\n    \n    const Qp1 = Orientation.index(q1, q2, p1)\n    const Qp2 = Orientation.index(q1, q2, p2)\n    if (Qp1 > 0 && Qp2 > 0 || Qp1 < 0 && Qp2 < 0) \n      return LineIntersector.NO_INTERSECTION\n    \n    const collinear = Pq1 === 0 && Pq2 === 0 && Qp1 === 0 && Qp2 === 0\n    if (collinear) \n      return this.computeCollinearIntersection(p1, p2, q1, q2)\n    \n    if (Pq1 === 0 || Pq2 === 0 || Qp1 === 0 || Qp2 === 0) {\n      this._isProper = false\n      if (p1.equals2D(q1) || p1.equals2D(q2)) \n        this._intPt[0] = p1\n      else if (p2.equals2D(q1) || p2.equals2D(q2)) \n        this._intPt[0] = p2\n      else if (Pq1 === 0) \n        this._intPt[0] = new Coordinate(q1)\n      else if (Pq2 === 0) \n        this._intPt[0] = new Coordinate(q2)\n      else if (Qp1 === 0) \n        this._intPt[0] = new Coordinate(p1)\n      else if (Qp2 === 0) \n        this._intPt[0] = new Coordinate(p2)\n      \n    } else {\n      this._isProper = true\n      this._intPt[0] = this.intersection(p1, p2, q1, q2)\n    }\n    return LineIntersector.POINT_INTERSECTION\n  }\n}\n", "import Location from '../geom/Location'\nimport hasInterface from '../../../../hasInterface'\nimport Coordinate from '../geom/Coordinate'\nimport Orientation from './Orientation'\nimport CoordinateSequence from '../geom/CoordinateSequence'\nexport default class RayCrossingCounter {\n  constructor() {\n    RayCrossingCounter.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this._p = null\n    this._crossingCount = 0\n    this._isPointOnSegment = false\n    const p = arguments[0]\n    this._p = p\n  }\n  static locatePointInRing() {\n    if (arguments[0] instanceof Coordinate && hasInterface(arguments[1], CoordinateSequence)) {\n      const p = arguments[0], ring = arguments[1]\n      const counter = new RayCrossingCounter(p)\n      const p1 = new Coordinate()\n      const p2 = new Coordinate()\n      for (let i = 1; i < ring.size(); i++) {\n        ring.getCoordinate(i, p1)\n        ring.getCoordinate(i - 1, p2)\n        counter.countSegment(p1, p2)\n        if (counter.isOnSegment()) return counter.getLocation()\n      }\n      return counter.getLocation()\n    } else if (arguments[0] instanceof Coordinate && arguments[1] instanceof Array) {\n      const p = arguments[0], ring = arguments[1]\n      const counter = new RayCrossingCounter(p)\n      for (let i = 1; i < ring.length; i++) {\n        const p1 = ring[i]\n        const p2 = ring[i - 1]\n        counter.countSegment(p1, p2)\n        if (counter.isOnSegment()) return counter.getLocation()\n      }\n      return counter.getLocation()\n    }\n  }\n  countSegment(p1, p2) {\n    if (p1.x < this._p.x && p2.x < this._p.x) return null\n    if (this._p.x === p2.x && this._p.y === p2.y) {\n      this._isPointOnSegment = true\n      return null\n    }\n    if (p1.y === this._p.y && p2.y === this._p.y) {\n      let minx = p1.x\n      let maxx = p2.x\n      if (minx > maxx) {\n        minx = p2.x\n        maxx = p1.x\n      }\n      if (this._p.x >= minx && this._p.x <= maxx) \n        this._isPointOnSegment = true\n      \n      return null\n    }\n    if (p1.y > this._p.y && p2.y <= this._p.y || p2.y > this._p.y && p1.y <= this._p.y) {\n      let orient = Orientation.index(p1, p2, this._p)\n      if (orient === Orientation.COLLINEAR) {\n        this._isPointOnSegment = true\n        return null\n      }\n      if (p2.y < p1.y) \n        orient = -orient\n      \n      if (orient === Orientation.LEFT) \n        this._crossingCount++\n      \n    }\n  }\n  isPointInPolygon() {\n    return this.getLocation() !== Location.EXTERIOR\n  }\n  getLocation() {\n    if (this._isPointOnSegment) return Location.BOUNDARY\n    if (this._crossingCount % 2 === 1) \n      return Location.INTERIOR\n    \n    return Location.EXTERIOR\n  }\n  isOnSegment() {\n    return this._isPointOnSegment\n  }\n}\n", "import Location from '../geom/Location'\nimport hasInterface from '../../../../hasInterface'\nimport Coordinate from '../geom/Coordinate'\nimport CoordinateSequence from '../geom/CoordinateSequence'\nimport RobustLineIntersector from './RobustLineIntersector'\nimport RayCrossingCounter from './RayCrossingCounter'\nexport default class PointLocation {\n  static isOnLine() {\n    if (arguments[0] instanceof Coordinate && hasInterface(arguments[1], CoordinateSequence)) {\n      const p = arguments[0], line = arguments[1]\n      const lineIntersector = new RobustLineIntersector()\n      const p0 = new Coordinate()\n      const p1 = new Coordinate()\n      const n = line.size()\n      for (let i = 1; i < n; i++) {\n        line.getCoordinate(i - 1, p0)\n        line.getCoordinate(i, p1)\n        lineIntersector.computeIntersection(p, p0, p1)\n        if (lineIntersector.hasIntersection()) \n          return true\n        \n      }\n      return false\n    } else if (arguments[0] instanceof Coordinate && arguments[1] instanceof Array) {\n      const p = arguments[0], line = arguments[1]\n      const lineIntersector = new RobustLineIntersector()\n      for (let i = 1; i < line.length; i++) {\n        const p0 = line[i - 1]\n        const p1 = line[i]\n        lineIntersector.computeIntersection(p, p0, p1)\n        if (lineIntersector.hasIntersection()) \n          return true\n        \n      }\n      return false\n    }\n  }\n  static locateInRing(p, ring) {\n    return RayCrossingCounter.locatePointInRing(p, ring)\n  }\n  static isInRing(p, ring) {\n    return PointLocation.locateInRing(p, ring) !== Location.EXTERIOR\n  }\n}\n", "import StringBuffer from '../../../../java/lang/StringBuffer'\nimport Location from '../geom/Location'\nimport Position from './Position'\nexport default class TopologyLocation {\n  constructor() {\n    TopologyLocation.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this.location = null\n    if (arguments.length === 1) {\n      if (arguments[0] instanceof Array) {\n        const location = arguments[0]\n        this.init(location.length)\n      } else if (Number.isInteger(arguments[0])) {\n        const on = arguments[0]\n        this.init(1)\n        this.location[Position.ON] = on\n      } else if (arguments[0] instanceof TopologyLocation) {\n        const gl = arguments[0]\n        this.init(gl.location.length)\n        if (gl !== null) \n          for (let i = 0; i < this.location.length; i++) \n            this.location[i] = gl.location[i]\n          \n        \n      }\n    } else if (arguments.length === 3) {\n      const on = arguments[0], left = arguments[1], right = arguments[2]\n      this.init(3)\n      this.location[Position.ON] = on\n      this.location[Position.LEFT] = left\n      this.location[Position.RIGHT] = right\n    }\n  }\n  setAllLocations(locValue) {\n    for (let i = 0; i < this.location.length; i++) \n      this.location[i] = locValue\n    \n  }\n  isNull() {\n    for (let i = 0; i < this.location.length; i++) \n      if (this.location[i] !== Location.NONE) return false\n    \n    return true\n  }\n  setAllLocationsIfNull(locValue) {\n    for (let i = 0; i < this.location.length; i++) \n      if (this.location[i] === Location.NONE) this.location[i] = locValue\n    \n  }\n  isLine() {\n    return this.location.length === 1\n  }\n  merge(gl) {\n    if (gl.location.length > this.location.length) {\n      const newLoc = new Array(3).fill(null)\n      newLoc[Position.ON] = this.location[Position.ON]\n      newLoc[Position.LEFT] = Location.NONE\n      newLoc[Position.RIGHT] = Location.NONE\n      this.location = newLoc\n    }\n    for (let i = 0; i < this.location.length; i++) \n      if (this.location[i] === Location.NONE && i < gl.location.length) this.location[i] = gl.location[i]\n    \n  }\n  getLocations() {\n    return this.location\n  }\n  flip() {\n    if (this.location.length <= 1) return null\n    const temp = this.location[Position.LEFT]\n    this.location[Position.LEFT] = this.location[Position.RIGHT]\n    this.location[Position.RIGHT] = temp\n  }\n  toString() {\n    const buf = new StringBuffer()\n    if (this.location.length > 1) buf.append(Location.toLocationSymbol(this.location[Position.LEFT]))\n    buf.append(Location.toLocationSymbol(this.location[Position.ON]))\n    if (this.location.length > 1) buf.append(Location.toLocationSymbol(this.location[Position.RIGHT]))\n    return buf.toString()\n  }\n  setLocations(on, left, right) {\n    this.location[Position.ON] = on\n    this.location[Position.LEFT] = left\n    this.location[Position.RIGHT] = right\n  }\n  get(posIndex) {\n    if (posIndex < this.location.length) return this.location[posIndex]\n    return Location.NONE\n  }\n  isArea() {\n    return this.location.length > 1\n  }\n  isAnyNull() {\n    for (let i = 0; i < this.location.length; i++) \n      if (this.location[i] === Location.NONE) return true\n    \n    return false\n  }\n  setLocation() {\n    if (arguments.length === 1) {\n      const locValue = arguments[0]\n      this.setLocation(Position.ON, locValue)\n    } else if (arguments.length === 2) {\n      const locIndex = arguments[0], locValue = arguments[1]\n      this.location[locIndex] = locValue\n    }\n  }\n  init(size) {\n    this.location = new Array(size).fill(null)\n    this.setAllLocations(Location.NONE)\n  }\n  isEqualOnSide(le, locIndex) {\n    return this.location[locIndex] === le.location[locIndex]\n  }\n  allPositionsEqual(loc) {\n    for (let i = 0; i < this.location.length; i++) \n      if (this.location[i] !== loc) return false\n    \n    return true\n  }\n}\n", "import StringBuffer from '../../../../java/lang/StringBuffer'\nimport Location from '../geom/Location'\nimport Position from './Position'\nimport TopologyLocation from './TopologyLocation'\nexport default class Label {\n  constructor() {\n    Label.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this.elt = new Array(2).fill(null)\n    if (arguments.length === 1) {\n      if (Number.isInteger(arguments[0])) {\n        const onLoc = arguments[0]\n        this.elt[0] = new TopologyLocation(onLoc)\n        this.elt[1] = new TopologyLocation(onLoc)\n      } else if (arguments[0] instanceof Label) {\n        const lbl = arguments[0]\n        this.elt[0] = new TopologyLocation(lbl.elt[0])\n        this.elt[1] = new TopologyLocation(lbl.elt[1])\n      }\n    } else if (arguments.length === 2) {\n      const geomIndex = arguments[0], onLoc = arguments[1]\n      this.elt[0] = new TopologyLocation(Location.NONE)\n      this.elt[1] = new TopologyLocation(Location.NONE)\n      this.elt[geomIndex].setLocation(onLoc)\n    } else if (arguments.length === 3) {\n      const onLoc = arguments[0], leftLoc = arguments[1], rightLoc = arguments[2]\n      this.elt[0] = new TopologyLocation(onLoc, leftLoc, rightLoc)\n      this.elt[1] = new TopologyLocation(onLoc, leftLoc, rightLoc)\n    } else if (arguments.length === 4) {\n      const geomIndex = arguments[0], onLoc = arguments[1], leftLoc = arguments[2], rightLoc = arguments[3]\n      this.elt[0] = new TopologyLocation(Location.NONE, Location.NONE, Location.NONE)\n      this.elt[1] = new TopologyLocation(Location.NONE, Location.NONE, Location.NONE)\n      this.elt[geomIndex].setLocations(onLoc, leftLoc, rightLoc)\n    }\n  }\n  static toLineLabel(label) {\n    const lineLabel = new Label(Location.NONE)\n    for (let i = 0; i < 2; i++) \n      lineLabel.setLocation(i, label.getLocation(i))\n    \n    return lineLabel\n  }\n  getGeometryCount() {\n    let count = 0\n    if (!this.elt[0].isNull()) count++\n    if (!this.elt[1].isNull()) count++\n    return count\n  }\n  setAllLocations(geomIndex, location) {\n    this.elt[geomIndex].setAllLocations(location)\n  }\n  isNull(geomIndex) {\n    return this.elt[geomIndex].isNull()\n  }\n  setAllLocationsIfNull() {\n    if (arguments.length === 1) {\n      const location = arguments[0]\n      this.setAllLocationsIfNull(0, location)\n      this.setAllLocationsIfNull(1, location)\n    } else if (arguments.length === 2) {\n      const geomIndex = arguments[0], location = arguments[1]\n      this.elt[geomIndex].setAllLocationsIfNull(location)\n    }\n  }\n  isLine(geomIndex) {\n    return this.elt[geomIndex].isLine()\n  }\n  merge(lbl) {\n    for (let i = 0; i < 2; i++) \n      if (this.elt[i] === null && lbl.elt[i] !== null) \n        this.elt[i] = new TopologyLocation(lbl.elt[i])\n      else \n        this.elt[i].merge(lbl.elt[i])\n      \n    \n  }\n  flip() {\n    this.elt[0].flip()\n    this.elt[1].flip()\n  }\n  getLocation() {\n    if (arguments.length === 1) {\n      const geomIndex = arguments[0]\n      return this.elt[geomIndex].get(Position.ON)\n    } else if (arguments.length === 2) {\n      const geomIndex = arguments[0], posIndex = arguments[1]\n      return this.elt[geomIndex].get(posIndex)\n    }\n  }\n  toString() {\n    const buf = new StringBuffer()\n    if (this.elt[0] !== null) {\n      buf.append('A:')\n      buf.append(this.elt[0].toString())\n    }\n    if (this.elt[1] !== null) {\n      buf.append(' B:')\n      buf.append(this.elt[1].toString())\n    }\n    return buf.toString()\n  }\n  isArea() {\n    if (arguments.length === 0) {\n      return this.elt[0].isArea() || this.elt[1].isArea()\n    } else if (arguments.length === 1) {\n      const geomIndex = arguments[0]\n      return this.elt[geomIndex].isArea()\n    }\n  }\n  isAnyNull(geomIndex) {\n    return this.elt[geomIndex].isAnyNull()\n  }\n  setLocation() {\n    if (arguments.length === 2) {\n      const geomIndex = arguments[0], location = arguments[1]\n      this.elt[geomIndex].setLocation(Position.ON, location)\n    } else if (arguments.length === 3) {\n      const geomIndex = arguments[0], posIndex = arguments[1], location = arguments[2]\n      this.elt[geomIndex].setLocation(posIndex, location)\n    }\n  }\n  isEqualOnSide(lbl, side) {\n    return this.elt[0].isEqualOnSide(lbl.elt[0], side) && this.elt[1].isEqualOnSide(lbl.elt[1], side)\n  }\n  allPositionsEqual(geomIndex, loc) {\n    return this.elt[geomIndex].allPositionsEqual(loc)\n  }\n  toLine(geomIndex) {\n    if (this.elt[geomIndex].isArea()) this.elt[geomIndex] = new TopologyLocation(this.elt[geomIndex].location[0])\n  }\n}\n", "import Location from '../geom/Location'\nimport Position from './Position'\nimport PointLocation from '../algorithm/PointLocation'\nimport TopologyException from '../geom/TopologyException'\nimport Orientation from '../algorithm/Orientation'\nimport Label from './Label'\nimport ArrayList from '../../../../java/util/ArrayList'\nimport Assert from '../util/Assert'\nexport default class EdgeRing {\n  constructor() {\n    EdgeRing.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this._startDe = null\n    this._maxNodeDegree = -1\n    this._edges = new ArrayList()\n    this._pts = new ArrayList()\n    this._label = new Label(Location.NONE)\n    this._ring = null\n    this._isHole = null\n    this._shell = null\n    this._holes = new ArrayList()\n    this._geometryFactory = null\n    if (arguments.length === 0) {} else if (arguments.length === 2) {\n      const start = arguments[0], geometryFactory = arguments[1]\n      this._geometryFactory = geometryFactory\n      this.computePoints(start)\n      this.computeRing()\n    }\n  }\n  computeRing() {\n    if (this._ring !== null) return null\n    const coord = new Array(this._pts.size()).fill(null)\n    for (let i = 0; i < this._pts.size(); i++) \n      coord[i] = this._pts.get(i)\n    \n    this._ring = this._geometryFactory.createLinearRing(coord)\n    this._isHole = Orientation.isCCW(this._ring.getCoordinates())\n  }\n  isIsolated() {\n    return this._label.getGeometryCount() === 1\n  }\n  computePoints(start) {\n    this._startDe = start\n    let de = start\n    let isFirstEdge = true\n    do {\n      if (de === null) throw new TopologyException('Found null DirectedEdge')\n      if (de.getEdgeRing() === this) throw new TopologyException('Directed Edge visited twice during ring-building at ' + de.getCoordinate())\n      this._edges.add(de)\n      const label = de.getLabel()\n      Assert.isTrue(label.isArea())\n      this.mergeLabel(label)\n      this.addPoints(de.getEdge(), de.isForward(), isFirstEdge)\n      isFirstEdge = false\n      this.setEdgeRing(de, this)\n      de = this.getNext(de)\n    } while (de !== this._startDe)\n  }\n  getLinearRing() {\n    return this._ring\n  }\n  getCoordinate(i) {\n    return this._pts.get(i)\n  }\n  computeMaxNodeDegree() {\n    this._maxNodeDegree = 0\n    let de = this._startDe\n    do {\n      const node = de.getNode()\n      const degree = node.getEdges().getOutgoingDegree(this)\n      if (degree > this._maxNodeDegree) this._maxNodeDegree = degree\n      de = this.getNext(de)\n    } while (de !== this._startDe)\n    this._maxNodeDegree *= 2\n  }\n  addPoints(edge, isForward, isFirstEdge) {\n    const edgePts = edge.getCoordinates()\n    if (isForward) {\n      let startIndex = 1\n      if (isFirstEdge) startIndex = 0\n      for (let i = startIndex; i < edgePts.length; i++) \n        this._pts.add(edgePts[i])\n      \n    } else {\n      let startIndex = edgePts.length - 2\n      if (isFirstEdge) startIndex = edgePts.length - 1\n      for (let i = startIndex; i >= 0; i--) \n        this._pts.add(edgePts[i])\n      \n    }\n  }\n  isHole() {\n    return this._isHole\n  }\n  setInResult() {\n    let de = this._startDe\n    do {\n      de.getEdge().setInResult(true)\n      de = de.getNext()\n    } while (de !== this._startDe)\n  }\n  containsPoint(p) {\n    const shell = this.getLinearRing()\n    const env = shell.getEnvelopeInternal()\n    if (!env.contains(p)) return false\n    if (!PointLocation.isInRing(p, shell.getCoordinates())) return false\n    for (let i = this._holes.iterator(); i.hasNext(); ) {\n      const hole = i.next()\n      if (hole.containsPoint(p)) return false\n    }\n    return true\n  }\n  addHole(ring) {\n    this._holes.add(ring)\n  }\n  isShell() {\n    return this._shell === null\n  }\n  getLabel() {\n    return this._label\n  }\n  getEdges() {\n    return this._edges\n  }\n  getMaxNodeDegree() {\n    if (this._maxNodeDegree < 0) this.computeMaxNodeDegree()\n    return this._maxNodeDegree\n  }\n  getShell() {\n    return this._shell\n  }\n  mergeLabel() {\n    if (arguments.length === 1) {\n      const deLabel = arguments[0]\n      this.mergeLabel(deLabel, 0)\n      this.mergeLabel(deLabel, 1)\n    } else if (arguments.length === 2) {\n      const deLabel = arguments[0], geomIndex = arguments[1]\n      const loc = deLabel.getLocation(geomIndex, Position.RIGHT)\n      if (loc === Location.NONE) return null\n      if (this._label.getLocation(geomIndex) === Location.NONE) {\n        this._label.setLocation(geomIndex, loc)\n        return null\n      }\n    }\n  }\n  setShell(shell) {\n    this._shell = shell\n    if (shell !== null) shell.addHole(this)\n  }\n  toPolygon(geometryFactory) {\n    const holeLR = new Array(this._holes.size()).fill(null)\n    for (let i = 0; i < this._holes.size(); i++) \n      holeLR[i] = this._holes.get(i).getLinearRing()\n    \n    const poly = geometryFactory.createPolygon(this.getLinearRing(), holeLR)\n    return poly\n  }\n}\n", "import EdgeRing from '../../geomgraph/EdgeRing'\nexport default class MinimalEdgeRing extends EdgeRing {\n  constructor() {\n    super()\n    MinimalEdgeRing.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    const start = arguments[0], geometryFactory = arguments[1]\n    EdgeRing.constructor_.call(this, start, geometryFactory)\n  }\n  setEdgeRing(de, er) {\n    de.setMinEdgeRing(er)\n  }\n  getNext(de) {\n    return de.getNextMin()\n  }\n}\n", "import MinimalEdgeRing from './MinimalEdgeRing'\nimport EdgeRing from '../../geomgraph/EdgeRing'\nimport ArrayList from '../../../../../java/util/ArrayList'\nexport default class MaximalEdgeRing extends EdgeRing {\n  constructor() {\n    super()\n    MaximalEdgeRing.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    const start = arguments[0], geometryFactory = arguments[1]\n    EdgeRing.constructor_.call(this, start, geometryFactory)\n  }\n  buildMinimalRings() {\n    const minEdgeRings = new ArrayList()\n    let de = this._startDe\n    do {\n      if (de.getMinEdgeRing() === null) {\n        const minEr = new MinimalEdgeRing(de, this._geometryFactory)\n        minEdgeRings.add(minEr)\n      }\n      de = de.getNext()\n    } while (de !== this._startDe)\n    return minEdgeRings\n  }\n  setEdgeRing(de, er) {\n    de.setEdgeRing(er)\n  }\n  linkDirectedEdgesForMinimalEdgeRings() {\n    let de = this._startDe\n    do {\n      const node = de.getNode()\n      node.getEdges().linkMinimalDirectedEdges(this)\n      de = de.getNext()\n    } while (de !== this._startDe)\n  }\n  getNext(de) {\n    return de.getNext()\n  }\n}\n", "import Assert from '../util/Assert'\nexport default class GraphComponent {\n  constructor() {\n    GraphComponent.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this._label = null\n    this._isInResult = false\n    this._isCovered = false\n    this._isCoveredSet = false\n    this._isVisited = false\n    if (arguments.length === 0) {} else if (arguments.length === 1) {\n      const label = arguments[0]\n      this._label = label\n    }\n  }\n  setVisited(isVisited) {\n    this._isVisited = isVisited\n  }\n  setInResult(isInResult) {\n    this._isInResult = isInResult\n  }\n  isCovered() {\n    return this._isCovered\n  }\n  isCoveredSet() {\n    return this._isCoveredSet\n  }\n  setLabel(label) {\n    this._label = label\n  }\n  getLabel() {\n    return this._label\n  }\n  setCovered(isCovered) {\n    this._isCovered = isCovered\n    this._isCoveredSet = true\n  }\n  updateIM(im) {\n    Assert.isTrue(this._label.getGeometryCount() >= 2, 'found partial label')\n    this.computeIM(im)\n  }\n  isInResult() {\n    return this._isInResult\n  }\n  isVisited() {\n    return this._isVisited\n  }\n}\n", "import Location from '../geom/Location'\nimport Label from './Label'\nimport GraphComponent from './GraphComponent'\nexport default class Node extends GraphComponent {\n  constructor() {\n    super()\n    Node.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this._coord = null\n    this._edges = null\n    const coord = arguments[0], edges = arguments[1]\n    this._coord = coord\n    this._edges = edges\n    this._label = new Label(0, Location.NONE)\n  }\n  isIncidentEdgeInResult() {\n    for (let it = this.getEdges().getEdges().iterator(); it.hasNext(); ) {\n      const de = it.next()\n      if (de.getEdge().isInResult()) return true\n    }\n    return false\n  }\n  isIsolated() {\n    return this._label.getGeometryCount() === 1\n  }\n  getCoordinate() {\n    return this._coord\n  }\n  print(out) {\n    out.println('node ' + this._coord + ' lbl: ' + this._label)\n  }\n  computeIM(im) {}\n  computeMergedLocation(label2, eltIndex) {\n    let loc = Location.NONE\n    loc = this._label.getLocation(eltIndex)\n    if (!label2.isNull(eltIndex)) {\n      const nLoc = label2.getLocation(eltIndex)\n      if (loc !== Location.BOUNDARY) loc = nLoc\n    }\n    return loc\n  }\n  setLabel() {\n    if (arguments.length === 2 && (Number.isInteger(arguments[1]) && Number.isInteger(arguments[0]))) {\n      const argIndex = arguments[0], onLocation = arguments[1]\n      if (this._label === null) \n        this._label = new Label(argIndex, onLocation)\n      else this._label.setLocation(argIndex, onLocation)\n    } else {\n      return super.setLabel.apply(this, arguments)\n    }\n  }\n  getEdges() {\n    return this._edges\n  }\n  mergeLabel() {\n    if (arguments[0] instanceof Node) {\n      const n = arguments[0]\n      this.mergeLabel(n._label)\n    } else if (arguments[0] instanceof Label) {\n      const label2 = arguments[0]\n      for (let i = 0; i < 2; i++) {\n        const loc = this.computeMergedLocation(label2, i)\n        const thisLoc = this._label.getLocation(i)\n        if (thisLoc === Location.NONE) this._label.setLocation(i, loc)\n      }\n    }\n  }\n  add(e) {\n    this._edges.insert(e)\n    e.setNode(this)\n  }\n  setLabelBoundary(argIndex) {\n    if (this._label === null) return null\n    let loc = Location.NONE\n    if (this._label !== null) loc = this._label.getLocation(argIndex)\n    let newLoc = null\n    switch (loc) {\n    case Location.BOUNDARY:\n      newLoc = Location.INTERIOR\n      break\n    case Location.INTERIOR:\n      newLoc = Location.BOUNDARY\n      break\n    default:\n      newLoc = Location.BOUNDARY\n      break\n    }\n    this._label.setLocation(argIndex, newLoc)\n  }\n}\n", "import Map from './Map'\n\n/**\n * @see http://download.oracle.com/javase/6/docs/api/java/util/SortedMap.html\n */\nexport default class SortedMap extends Map {}\n", "import ArrayList from './ArrayList'\nimport SortedMap from './SortedMap'\nimport HashSet from './HashSet'\n\nconst BLACK = 0\nconst RED = 1\n\nfunction colorOf(p) {\n  return (p == null ? BLACK : p.color)\n}\nfunction parentOf(p) {\n  return (p == null ? null : p.parent)\n}\nfunction setColor(p, c) {\n  if (p !== null) p.color = c\n}\nfunction leftOf(p) {\n  return (p == null ? null : p.left)\n}\nfunction rightOf(p) {\n  return (p == null ? null : p.right)\n}\n\n/**\n * @see http://download.oracle.com/javase/6/docs/api/java/util/TreeMap.html\n */\nexport default class TreeMap extends SortedMap {\n  constructor() {\n    super()\n    this.root_ = null\n    this.size_ = 0\n  }\n\n  get(key) {\n    let p = this.root_\n    while (p !== null) {\n      const cmp = key.compareTo(p.key)\n      if (cmp < 0)\n        p = p.left\n      else if (cmp > 0)\n        p = p.right\n      else return p.value\n    }\n    return null\n  }\n\n  put(key, value) {\n    if (this.root_ === null) {\n      this.root_ = {\n        key: key,\n        value: value,\n        left: null,\n        right: null,\n        parent: null,\n        color: BLACK,\n        getValue() {\n          return this.value\n        },\n        getKey() {\n          return this.key\n        }\n      }\n      this.size_ = 1\n      return null\n    }\n    let t = this.root_; let parent; let cmp\n    do {\n      parent = t\n      cmp = key.compareTo(t.key)\n      if (cmp < 0) {\n        t = t.left\n      } else if (cmp > 0) {\n        t = t.right\n      } else {\n        const oldValue = t.value\n        t.value = value\n        return oldValue\n      }\n    } while (t !== null)\n    const e = {\n      key: key,\n      left: null,\n      right: null,\n      value: value,\n      parent: parent,\n      color: BLACK,\n      getValue() {\n        return this.value\n      },\n      getKey() {\n        return this.key\n      }\n    }\n    if (cmp < 0)\n      parent.left = e\n    else parent.right = e\n\n    this.fixAfterInsertion(e)\n    this.size_++\n    return null\n  }\n\n  /**\n   * @param {Object} x\n   */\n  fixAfterInsertion(x) {\n    let y\n    x.color = RED\n    while (x != null && x !== this.root_ && x.parent.color === RED)\n      if (parentOf(x) === leftOf(parentOf(parentOf(x)))) {\n        y = rightOf(parentOf(parentOf(x)))\n        if (colorOf(y) === RED) {\n          setColor(parentOf(x), BLACK)\n          setColor(y, BLACK)\n          setColor(parentOf(parentOf(x)), RED)\n          x = parentOf(parentOf(x))\n        } else {\n          if (x === rightOf(parentOf(x))) {\n            x = parentOf(x)\n            this.rotateLeft(x)\n          }\n          setColor(parentOf(x), BLACK)\n          setColor(parentOf(parentOf(x)), RED)\n          this.rotateRight(parentOf(parentOf(x)))\n        }\n      } else {\n        y = leftOf(parentOf(parentOf(x)))\n        if (colorOf(y) === RED) {\n          setColor(parentOf(x), BLACK)\n          setColor(y, BLACK)\n          setColor(parentOf(parentOf(x)), RED)\n          x = parentOf(parentOf(x))\n        } else {\n          if (x === leftOf(parentOf(x))) {\n            x = parentOf(x)\n            this.rotateRight(x)\n          }\n          setColor(parentOf(x), BLACK)\n          setColor(parentOf(parentOf(x)), RED)\n          this.rotateLeft(parentOf(parentOf(x)))\n        }\n      }\n\n    this.root_.color = BLACK\n  }\n\n  values() {\n    const arrayList = new ArrayList()\n    let p = this.getFirstEntry()\n    if (p !== null) {\n      arrayList.add(p.value)\n      while ((p = TreeMap.successor(p)) !== null)\n        arrayList.add(p.value)\n    }\n    return arrayList\n  }\n\n  entrySet() {\n    const hashSet = new HashSet()\n    let p = this.getFirstEntry()\n    if (p !== null) {\n      hashSet.add(p)\n      while ((p = TreeMap.successor(p)) !== null)\n        hashSet.add(p)\n    }\n    return hashSet\n  }\n\n  /**\n   * @param {Object} p\n   */\n  rotateLeft(p) {\n    if (p != null) {\n      const r = p.right\n      p.right = r.left\n      if (r.left != null)\n        r.left.parent = p\n      r.parent = p.parent\n      if (p.parent == null)\n        this.root_ = r\n      else if (p.parent.left === p)\n        p.parent.left = r\n      else\n        p.parent.right = r\n      r.left = p\n      p.parent = r\n    }\n  }\n\n  /**\n   * @param {Object} p\n   */\n  rotateRight(p) {\n    if (p != null) {\n      const l = p.left\n      p.left = l.right\n      if (l.right != null)\n        l.right.parent = p\n      l.parent = p.parent\n      if (p.parent == null)\n        this.root_ = l\n      else if (p.parent.right === p)\n        p.parent.right = l\n      else\n        p.parent.left = l\n      l.right = p\n      p.parent = l\n    }\n  }\n\n  /**\n   * @return {Object}\n   */\n  getFirstEntry() {\n    let p = this.root_\n    if (p != null)\n      while (p.left != null) p = p.left\n    return p\n  }\n\n  /**\n   * @param {Object} t\n   * @return {Object}\n   * @private\n   */\n  static successor(t) {\n    let p\n    if (t === null) {\n      return null\n    } else if (t.right !== null) {\n      p = t.right\n      while (p.left !== null)\n        p = p.left\n      return p\n    } else {\n      p = t.parent\n      let ch = t\n      while (p !== null && ch === p.right) {\n        ch = p\n        p = p.parent\n      }\n      return p\n    }\n  }\n\n  size() {\n    return this.size_\n  }\n\n  containsKey(key) {\n    let p = this.root_\n    while (p !== null) {\n      const cmp = key.compareTo(p.key)\n      if (cmp < 0)\n        p = p.left\n      else if (cmp > 0)\n        p = p.right\n      else return true\n    }\n    return false\n  }\n}\n", "import Location from '../geom/Location'\nimport Coordinate from '../geom/Coordinate'\nimport Node from './Node'\nimport ArrayList from '../../../../java/util/ArrayList'\nimport TreeMap from '../../../../java/util/TreeMap'\nexport default class NodeMap {\n  constructor() {\n    NodeMap.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this.nodeMap = new TreeMap()\n    this.nodeFact = null\n    const nodeFact = arguments[0]\n    this.nodeFact = nodeFact\n  }\n  find(coord) {\n    return this.nodeMap.get(coord)\n  }\n  addNode() {\n    if (arguments[0] instanceof Coordinate) {\n      const coord = arguments[0]\n      let node = this.nodeMap.get(coord)\n      if (node === null) {\n        node = this.nodeFact.createNode(coord)\n        this.nodeMap.put(coord, node)\n      }\n      return node\n    } else if (arguments[0] instanceof Node) {\n      const n = arguments[0]\n      const node = this.nodeMap.get(n.getCoordinate())\n      if (node === null) {\n        this.nodeMap.put(n.getCoordinate(), n)\n        return n\n      }\n      node.mergeLabel(n)\n      return node\n    }\n  }\n  print(out) {\n    for (let it = this.iterator(); it.hasNext(); ) {\n      const n = it.next()\n      n.print(out)\n    }\n  }\n  iterator() {\n    return this.nodeMap.values().iterator()\n  }\n  values() {\n    return this.nodeMap.values()\n  }\n  getBoundaryNodes(geomIndex) {\n    const bdyNodes = new ArrayList()\n    for (let i = this.iterator(); i.hasNext(); ) {\n      const node = i.next()\n      if (node.getLabel().getLocation(geomIndex) === Location.BOUNDARY) bdyNodes.add(node)\n    }\n    return bdyNodes\n  }\n  add(e) {\n    const p = e.getCoordinate()\n    const n = this.addNode(p)\n    n.add(e)\n  }\n}\n", "import Coordinate from '../geom/Coordinate'\nimport IllegalArgumentException from '../../../../java/lang/IllegalArgumentException'\nexport default class Quadrant {\n  static isNorthern(quad) {\n    return quad === Quadrant.NE || quad === Quadrant.NW\n  }\n  static isOpposite(quad1, quad2) {\n    if (quad1 === quad2) return false\n    const diff = (quad1 - quad2 + 4) % 4\n    if (diff === 2) return true\n    return false\n  }\n  static commonHalfPlane(quad1, quad2) {\n    if (quad1 === quad2) return quad1\n    const diff = (quad1 - quad2 + 4) % 4\n    if (diff === 2) return -1\n    const min = quad1 < quad2 ? quad1 : quad2\n    const max = quad1 > quad2 ? quad1 : quad2\n    if (min === 0 && max === 3) return 3\n    return min\n  }\n  static isInHalfPlane(quad, halfPlane) {\n    if (halfPlane === Quadrant.SE) \n      return quad === Quadrant.SE || quad === Quadrant.SW\n    \n    return quad === halfPlane || quad === halfPlane + 1\n  }\n  static quadrant() {\n    if (typeof arguments[0] === 'number' && typeof arguments[1] === 'number') {\n      const dx = arguments[0], dy = arguments[1]\n      if (dx === 0.0 && dy === 0.0) throw new IllegalArgumentException('Cannot compute the quadrant for point ( ' + dx + ', ' + dy + ' )')\n      if (dx >= 0.0) \n        if (dy >= 0.0) return Quadrant.NE; else return Quadrant.SE\n      else \n      if (dy >= 0.0) return Quadrant.NW; else return Quadrant.SW\n      \n    } else if (arguments[0] instanceof Coordinate && arguments[1] instanceof Coordinate) {\n      const p0 = arguments[0], p1 = arguments[1]\n      if (p1.x === p0.x && p1.y === p0.y) throw new IllegalArgumentException('Cannot compute the quadrant for two identical points ' + p0)\n      if (p1.x >= p0.x) \n        if (p1.y >= p0.y) return Quadrant.NE; else return Quadrant.SE\n      else \n      if (p1.y >= p0.y) return Quadrant.NW; else return Quadrant.SW\n      \n    }\n  }\n}\nQuadrant.NE = 0\nQuadrant.NW = 1\nQuadrant.SW = 2\nQuadrant.SE = 3\n", "import Orientation from '../algorithm/Orientation'\nimport Comparable from '../../../../java/lang/Comparable'\nimport Quadrant from './Quadrant'\nimport Assert from '../util/Assert'\nexport default class EdgeEnd {\n  constructor() {\n    EdgeEnd.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this._edge = null\n    this._label = null\n    this._node = null\n    this._p0 = null\n    this._p1 = null\n    this._dx = null\n    this._dy = null\n    this._quadrant = null\n    if (arguments.length === 1) {\n      const edge = arguments[0]\n      this._edge = edge\n    } else if (arguments.length === 3) {\n      const edge = arguments[0], p0 = arguments[1], p1 = arguments[2]\n      EdgeEnd.constructor_.call(this, edge, p0, p1, null)\n    } else if (arguments.length === 4) {\n      const edge = arguments[0], p0 = arguments[1], p1 = arguments[2], label = arguments[3]\n      EdgeEnd.constructor_.call(this, edge)\n      this.init(p0, p1)\n      this._label = label\n    }\n  }\n  compareDirection(e) {\n    if (this._dx === e._dx && this._dy === e._dy) return 0\n    if (this._quadrant > e._quadrant) return 1\n    if (this._quadrant < e._quadrant) return -1\n    return Orientation.index(e._p0, e._p1, this._p1)\n  }\n  getDy() {\n    return this._dy\n  }\n  getCoordinate() {\n    return this._p0\n  }\n  setNode(node) {\n    this._node = node\n  }\n  print(out) {\n    const angle = Math.atan2(this._dy, this._dx)\n    const className = this.getClass().getName()\n    const lastDotPos = className.lastIndexOf('.')\n    const name = className.substring(lastDotPos + 1)\n    out.print('  ' + name + ': ' + this._p0 + ' - ' + this._p1 + ' ' + this._quadrant + ':' + angle + '   ' + this._label)\n  }\n  compareTo(obj) {\n    const e = obj\n    return this.compareDirection(e)\n  }\n  getDirectedCoordinate() {\n    return this._p1\n  }\n  getDx() {\n    return this._dx\n  }\n  getLabel() {\n    return this._label\n  }\n  getEdge() {\n    return this._edge\n  }\n  getQuadrant() {\n    return this._quadrant\n  }\n  getNode() {\n    return this._node\n  }\n  toString() {\n    const angle = Math.atan2(this._dy, this._dx)\n    const className = this.getClass().getName()\n    const lastDotPos = className.lastIndexOf('.')\n    const name = className.substring(lastDotPos + 1)\n    return '  ' + name + ': ' + this._p0 + ' - ' + this._p1 + ' ' + this._quadrant + ':' + angle + '   ' + this._label\n  }\n  computeLabel(boundaryNodeRule) {}\n  init(p0, p1) {\n    this._p0 = p0\n    this._p1 = p1\n    this._dx = p1.x - p0.x\n    this._dy = p1.y - p0.y\n    this._quadrant = Quadrant.quadrant(this._dx, this._dy)\n    Assert.isTrue(!(this._dx === 0 && this._dy === 0), 'EdgeEnd with identical endpoints found')\n  }\n  get interfaces_() {\n    return [Comparable]\n  }\n}\n", "import Location from '../geom/Location'\nimport EdgeEnd from './EdgeEnd'\nimport Position from './Position'\nimport TopologyException from '../geom/TopologyException'\nimport Label from './Label'\nexport default class DirectedEdge extends EdgeEnd {\n  constructor() {\n    super()\n    DirectedEdge.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this._isForward = null\n    this._isInResult = false\n    this._isVisited = false\n    this._sym = null\n    this._next = null\n    this._nextMin = null\n    this._edgeRing = null\n    this._minEdgeRing = null\n    this._depth = [0, -999, -999]\n    const edge = arguments[0], isForward = arguments[1]\n    EdgeEnd.constructor_.call(this, edge)\n    this._isForward = isForward\n    if (isForward) {\n      this.init(edge.getCoordinate(0), edge.getCoordinate(1))\n    } else {\n      const n = edge.getNumPoints() - 1\n      this.init(edge.getCoordinate(n), edge.getCoordinate(n - 1))\n    }\n    this.computeDirectedLabel()\n  }\n  static depthFactor(currLocation, nextLocation) {\n    if (currLocation === Location.EXTERIOR && nextLocation === Location.INTERIOR) return 1; else if (currLocation === Location.INTERIOR && nextLocation === Location.EXTERIOR) return -1\n    return 0\n  }\n  getNextMin() {\n    return this._nextMin\n  }\n  getDepth(position) {\n    return this._depth[position]\n  }\n  setVisited(isVisited) {\n    this._isVisited = isVisited\n  }\n  computeDirectedLabel() {\n    this._label = new Label(this._edge.getLabel())\n    if (!this._isForward) this._label.flip()\n  }\n  getNext() {\n    return this._next\n  }\n  setDepth(position, depthVal) {\n    if (this._depth[position] !== -999) \n      if (this._depth[position] !== depthVal) throw new TopologyException('assigned depths do not match', this.getCoordinate())\n    \n    this._depth[position] = depthVal\n  }\n  isInteriorAreaEdge() {\n    let isInteriorAreaEdge = true\n    for (let i = 0; i < 2; i++) \n      if (!(this._label.isArea(i) && this._label.getLocation(i, Position.LEFT) === Location.INTERIOR && this._label.getLocation(i, Position.RIGHT) === Location.INTERIOR)) \n        isInteriorAreaEdge = false\n      \n    \n    return isInteriorAreaEdge\n  }\n  setNextMin(nextMin) {\n    this._nextMin = nextMin\n  }\n  print(out) {\n    super.print.call(this, out)\n    out.print(' ' + this._depth[Position.LEFT] + '/' + this._depth[Position.RIGHT])\n    out.print(' (' + this.getDepthDelta() + ')')\n    if (this._isInResult) out.print(' inResult')\n  }\n  setMinEdgeRing(minEdgeRing) {\n    this._minEdgeRing = minEdgeRing\n  }\n  isLineEdge() {\n    const isLine = this._label.isLine(0) || this._label.isLine(1)\n    const isExteriorIfArea0 = !this._label.isArea(0) || this._label.allPositionsEqual(0, Location.EXTERIOR)\n    const isExteriorIfArea1 = !this._label.isArea(1) || this._label.allPositionsEqual(1, Location.EXTERIOR)\n    return isLine && isExteriorIfArea0 && isExteriorIfArea1\n  }\n  setEdgeRing(edgeRing) {\n    this._edgeRing = edgeRing\n  }\n  getMinEdgeRing() {\n    return this._minEdgeRing\n  }\n  getDepthDelta() {\n    let depthDelta = this._edge.getDepthDelta()\n    if (!this._isForward) depthDelta = -depthDelta\n    return depthDelta\n  }\n  setInResult(isInResult) {\n    this._isInResult = isInResult\n  }\n  getSym() {\n    return this._sym\n  }\n  isForward() {\n    return this._isForward\n  }\n  getEdge() {\n    return this._edge\n  }\n  printEdge(out) {\n    this.print(out)\n    out.print(' ')\n    if (this._isForward) this._edge.print(out); else this._edge.printReverse(out)\n  }\n  setSym(de) {\n    this._sym = de\n  }\n  setVisitedEdge(isVisited) {\n    this.setVisited(isVisited)\n    this._sym.setVisited(isVisited)\n  }\n  setEdgeDepths(position, depth) {\n    let depthDelta = this.getEdge().getDepthDelta()\n    if (!this._isForward) depthDelta = -depthDelta\n    let directionFactor = 1\n    if (position === Position.LEFT) directionFactor = -1\n    const oppositePos = Position.opposite(position)\n    const delta = depthDelta * directionFactor\n    const oppositeDepth = depth + delta\n    this.setDepth(position, depth)\n    this.setDepth(oppositePos, oppositeDepth)\n  }\n  getEdgeRing() {\n    return this._edgeRing\n  }\n  isInResult() {\n    return this._isInResult\n  }\n  setNext(next) {\n    this._next = next\n  }\n  isVisited() {\n    return this._isVisited\n  }\n}\n", "import Node from './Node'\nexport default class NodeFactory {\n  createNode(coord) {\n    return new Node(coord, null)\n  }\n}\n", "import Location from '../geom/Location'\nimport Coordinate from '../geom/Coordinate'\nimport Node from './Node'\nimport NodeMap from './NodeMap'\nimport Orientation from '../algorithm/Orientation'\nimport DirectedEdge from './DirectedEdge'\nimport System from '../../../../java/lang/System'\nimport ArrayList from '../../../../java/util/ArrayList'\nimport Quadrant from './Quadrant'\nimport NodeFactory from './NodeFactory'\nexport default class PlanarGraph {\n  constructor() {\n    PlanarGraph.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this._edges = new ArrayList()\n    this._nodes = null\n    this._edgeEndList = new ArrayList()\n    if (arguments.length === 0) {\n      this._nodes = new NodeMap(new NodeFactory())\n    } else if (arguments.length === 1) {\n      const nodeFact = arguments[0]\n      this._nodes = new NodeMap(nodeFact)\n    }\n  }\n  static linkResultDirectedEdges(nodes) {\n    for (let nodeit = nodes.iterator(); nodeit.hasNext(); ) {\n      const node = nodeit.next()\n      node.getEdges().linkResultDirectedEdges()\n    }\n  }\n  printEdges(out) {\n    out.println('Edges:')\n    for (let i = 0; i < this._edges.size(); i++) {\n      out.println('edge ' + i + ':')\n      const e = this._edges.get(i)\n      e.print(out)\n      e.eiList.print(out)\n    }\n  }\n  find(coord) {\n    return this._nodes.find(coord)\n  }\n  addNode() {\n    if (arguments[0] instanceof Node) {\n      const node = arguments[0]\n      return this._nodes.addNode(node)\n    } else if (arguments[0] instanceof Coordinate) {\n      const coord = arguments[0]\n      return this._nodes.addNode(coord)\n    }\n  }\n  getNodeIterator() {\n    return this._nodes.iterator()\n  }\n  linkResultDirectedEdges() {\n    for (let nodeit = this._nodes.iterator(); nodeit.hasNext(); ) {\n      const node = nodeit.next()\n      node.getEdges().linkResultDirectedEdges()\n    }\n  }\n  debugPrintln(o) {\n    System.out.println(o)\n  }\n  isBoundaryNode(geomIndex, coord) {\n    const node = this._nodes.find(coord)\n    if (node === null) return false\n    const label = node.getLabel()\n    if (label !== null && label.getLocation(geomIndex) === Location.BOUNDARY) return true\n    return false\n  }\n  linkAllDirectedEdges() {\n    for (let nodeit = this._nodes.iterator(); nodeit.hasNext(); ) {\n      const node = nodeit.next()\n      node.getEdges().linkAllDirectedEdges()\n    }\n  }\n  matchInSameDirection(p0, p1, ep0, ep1) {\n    if (!p0.equals(ep0)) return false\n    if (Orientation.index(p0, p1, ep1) === Orientation.COLLINEAR && Quadrant.quadrant(p0, p1) === Quadrant.quadrant(ep0, ep1)) return true\n    return false\n  }\n  getEdgeEnds() {\n    return this._edgeEndList\n  }\n  debugPrint(o) {\n    System.out.print(o)\n  }\n  getEdgeIterator() {\n    return this._edges.iterator()\n  }\n  findEdgeInSameDirection(p0, p1) {\n    for (let i = 0; i < this._edges.size(); i++) {\n      const e = this._edges.get(i)\n      const eCoord = e.getCoordinates()\n      if (this.matchInSameDirection(p0, p1, eCoord[0], eCoord[1])) return e\n      if (this.matchInSameDirection(p0, p1, eCoord[eCoord.length - 1], eCoord[eCoord.length - 2])) return e\n    }\n    return null\n  }\n  insertEdge(e) {\n    this._edges.add(e)\n  }\n  findEdgeEnd(e) {\n    for (let i = this.getEdgeEnds().iterator(); i.hasNext(); ) {\n      const ee = i.next()\n      if (ee.getEdge() === e) return ee\n    }\n    return null\n  }\n  addEdges(edgesToAdd) {\n    for (let it = edgesToAdd.iterator(); it.hasNext(); ) {\n      const e = it.next()\n      this._edges.add(e)\n      const de1 = new DirectedEdge(e, true)\n      const de2 = new DirectedEdge(e, false)\n      de1.setSym(de2)\n      de2.setSym(de1)\n      this.add(de1)\n      this.add(de2)\n    }\n  }\n  add(e) {\n    this._nodes.add(e)\n    this._edgeEndList.add(e)\n  }\n  getNodes() {\n    return this._nodes.values()\n  }\n  findEdge(p0, p1) {\n    for (let i = 0; i < this._edges.size(); i++) {\n      const e = this._edges.get(i)\n      const eCoord = e.getCoordinates()\n      if (p0.equals(eCoord[0]) && p1.equals(eCoord[1])) return e\n    }\n    return null\n  }\n}\n", "import PointLocation from '../../algorithm/PointLocation'\nimport TopologyException from '../../geom/TopologyException'\nimport MaximalEdgeRing from './MaximalEdgeRing'\nimport CoordinateArrays from '../../geom/CoordinateArrays'\nimport ArrayList from '../../../../../java/util/ArrayList'\nimport Assert from '../../util/Assert'\nimport PlanarGraph from '../../geomgraph/PlanarGraph'\nexport default class PolygonBuilder {\n  constructor() {\n    PolygonBuilder.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this._geometryFactory = null\n    this._shellList = new ArrayList()\n    const geometryFactory = arguments[0]\n    this._geometryFactory = geometryFactory\n  }\n  static findEdgeRingContaining(testEr, shellList) {\n    const testRing = testEr.getLinearRing()\n    const testEnv = testRing.getEnvelopeInternal()\n    let testPt = testRing.getCoordinateN(0)\n    let minShell = null\n    let minShellEnv = null\n    for (let it = shellList.iterator(); it.hasNext(); ) {\n      const tryShell = it.next()\n      const tryShellRing = tryShell.getLinearRing()\n      const tryShellEnv = tryShellRing.getEnvelopeInternal()\n      if (tryShellEnv.equals(testEnv)) continue\n      if (!tryShellEnv.contains(testEnv)) continue\n      testPt = CoordinateArrays.ptNotInList(testRing.getCoordinates(), tryShellRing.getCoordinates())\n      let isContained = false\n      if (PointLocation.isInRing(testPt, tryShellRing.getCoordinates())) isContained = true\n      if (isContained) \n        if (minShell === null || minShellEnv.contains(tryShellEnv)) {\n          minShell = tryShell\n          minShellEnv = minShell.getLinearRing().getEnvelopeInternal()\n        }\n      \n    }\n    return minShell\n  }\n  sortShellsAndHoles(edgeRings, shellList, freeHoleList) {\n    for (let it = edgeRings.iterator(); it.hasNext(); ) {\n      const er = it.next()\n      if (er.isHole()) \n        freeHoleList.add(er)\n      else \n        shellList.add(er)\n      \n    }\n  }\n  computePolygons(shellList) {\n    const resultPolyList = new ArrayList()\n    for (let it = shellList.iterator(); it.hasNext(); ) {\n      const er = it.next()\n      const poly = er.toPolygon(this._geometryFactory)\n      resultPolyList.add(poly)\n    }\n    return resultPolyList\n  }\n  placeFreeHoles(shellList, freeHoleList) {\n    for (let it = freeHoleList.iterator(); it.hasNext(); ) {\n      const hole = it.next()\n      if (hole.getShell() === null) {\n        const shell = PolygonBuilder.findEdgeRingContaining(hole, shellList)\n        if (shell === null) throw new TopologyException('unable to assign hole to a shell', hole.getCoordinate(0))\n        hole.setShell(shell)\n      }\n    }\n  }\n  buildMinimalEdgeRings(maxEdgeRings, shellList, freeHoleList) {\n    const edgeRings = new ArrayList()\n    for (let it = maxEdgeRings.iterator(); it.hasNext(); ) {\n      const er = it.next()\n      if (er.getMaxNodeDegree() > 2) {\n        er.linkDirectedEdgesForMinimalEdgeRings()\n        const minEdgeRings = er.buildMinimalRings()\n        const shell = this.findShell(minEdgeRings)\n        if (shell !== null) {\n          this.placePolygonHoles(shell, minEdgeRings)\n          shellList.add(shell)\n        } else {\n          freeHoleList.addAll(minEdgeRings)\n        }\n      } else {\n        edgeRings.add(er)\n      }\n    }\n    return edgeRings\n  }\n  buildMaximalEdgeRings(dirEdges) {\n    const maxEdgeRings = new ArrayList()\n    for (let it = dirEdges.iterator(); it.hasNext(); ) {\n      const de = it.next()\n      if (de.isInResult() && de.getLabel().isArea()) \n        if (de.getEdgeRing() === null) {\n          const er = new MaximalEdgeRing(de, this._geometryFactory)\n          maxEdgeRings.add(er)\n          er.setInResult()\n        }\n      \n    }\n    return maxEdgeRings\n  }\n  placePolygonHoles(shell, minEdgeRings) {\n    for (let it = minEdgeRings.iterator(); it.hasNext(); ) {\n      const er = it.next()\n      if (er.isHole()) \n        er.setShell(shell)\n      \n    }\n  }\n  getPolygons() {\n    const resultPolyList = this.computePolygons(this._shellList)\n    return resultPolyList\n  }\n  findShell(minEdgeRings) {\n    let shellCount = 0\n    let shell = null\n    for (let it = minEdgeRings.iterator(); it.hasNext(); ) {\n      const er = it.next()\n      if (!er.isHole()) {\n        shell = er\n        shellCount++\n      }\n    }\n    Assert.isTrue(shellCount <= 1, 'found two shells in MinimalEdgeRing list')\n    return shell\n  }\n  add() {\n    if (arguments.length === 1) {\n      const graph = arguments[0]\n      this.add(graph.getEdgeEnds(), graph.getNodes())\n    } else if (arguments.length === 2) {\n      const dirEdges = arguments[0], nodes = arguments[1]\n      PlanarGraph.linkResultDirectedEdges(nodes)\n      const maxEdgeRings = this.buildMaximalEdgeRings(dirEdges)\n      const freeHoleList = new ArrayList()\n      const edgeRings = this.buildMinimalEdgeRings(maxEdgeRings, this._shellList, freeHoleList)\n      this.sortShellsAndHoles(edgeRings, this._shellList, freeHoleList)\n      this.placeFreeHoles(this._shellList, freeHoleList)\n    }\n  }\n}\n", "export default class Boundable {\n  getBounds() {}\n}\n", "import Boundable from './Boundable'\nimport Serializable from '../../../../../java/io/Serializable'\nexport default class ItemBoundable {\n  constructor() {\n    ItemBoundable.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this._bounds = null\n    this._item = null\n    const bounds = arguments[0], item = arguments[1]\n    this._bounds = bounds\n    this._item = item\n  }\n  getItem() {\n    return this._item\n  }\n  getBounds() {\n    return this._bounds\n  }\n  get interfaces_() {\n    return [Boundable, Serializable]\n  }\n}\n", "import ArrayList from '../../../../java/util/ArrayList'\nexport default class PriorityQueue {\n  constructor() {\n    PriorityQueue.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this._size = null\n    this._items = null\n    this._size = 0\n    this._items = new ArrayList()\n    this._items.add(null)\n  }\n  poll() {\n    if (this.isEmpty()) return null\n    const minItem = this._items.get(1)\n    this._items.set(1, this._items.get(this._size))\n    this._size -= 1\n    this.reorder(1)\n    return minItem\n  }\n  size() {\n    return this._size\n  }\n  reorder(hole) {\n    let child = null\n    const tmp = this._items.get(hole)\n    for (; hole * 2 <= this._size; hole = child) {\n      child = hole * 2\n      if (child !== this._size && this._items.get(child + 1).compareTo(this._items.get(child)) < 0) child++\n      if (this._items.get(child).compareTo(tmp) < 0) this._items.set(hole, this._items.get(child)); else break\n    }\n    this._items.set(hole, tmp)\n  }\n  clear() {\n    this._size = 0\n    this._items.clear()\n  }\n  peek() {\n    if (this.isEmpty()) return null\n    const minItem = this._items.get(1)\n    return minItem\n  }\n  isEmpty() {\n    return this._size === 0\n  }\n  add(x) {\n    this._items.add(null)\n    this._size += 1\n    let hole = this._size\n    this._items.set(0, x)\n    for (; x.compareTo(this._items.get(Math.trunc(hole / 2))) < 0; hole /= 2) \n      this._items.set(hole, this._items.get(Math.trunc(hole / 2)))\n    \n    this._items.set(hole, x)\n  }\n}\n", "export default class SpatialIndex {\n  insert(itemEnv, item) {}\n  remove(itemEnv, item) {}\n  query() {\n    if (arguments.length === 1) {\n      const searchEnv = arguments[0]\n    } else if (arguments.length === 2) {\n      const searchEnv = arguments[0], visitor = arguments[1]\n    }\n  }\n}\n", "import Boundable from './Boundable'\nimport ArrayList from '../../../../../java/util/ArrayList'\nimport Serializable from '../../../../../java/io/Serializable'\nimport Assert from '../../util/Assert'\nexport default class AbstractNode {\n  constructor() {\n    AbstractNode.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this._childBoundables = new ArrayList()\n    this._bounds = null\n    this._level = null\n    if (arguments.length === 0) {} else if (arguments.length === 1) {\n      const level = arguments[0]\n      this._level = level\n    }\n  }\n  getLevel() {\n    return this._level\n  }\n  size() {\n    return this._childBoundables.size()\n  }\n  getChildBoundables() {\n    return this._childBoundables\n  }\n  addChildBoundable(childBoundable) {\n    Assert.isTrue(this._bounds === null)\n    this._childBoundables.add(childBoundable)\n  }\n  isEmpty() {\n    return this._childBoundables.isEmpty()\n  }\n  getBounds() {\n    if (this._bounds === null) \n      this._bounds = this.computeBounds()\n    \n    return this._bounds\n  }\n  get interfaces_() {\n    return [Boundable, Serializable]\n  }\n}\n", "import Arrays from './Arrays'\nimport ArrayList from './ArrayList'\n\nconst Collections = {\n  reverseOrder: function() {\n    return {\n      compare(a, b) {\n        return b.compareTo(a)\n      }\n    }\n  },\n  min: function(l) {\n    Collections.sort(l)\n    return l.get(0)\n  },\n  sort: function(l, c) {\n    const a = l.toArray()\n    if (c)\n      Arrays.sort(a, c)\n    else\n      Arrays.sort(a)\n    const i = l.iterator()\n    for (let pos = 0, alen = a.length; pos < alen; pos++) {\n      i.next()\n      i.set(a[pos])\n    }\n  },\n  singletonList: function(o) {\n    const arrayList = new ArrayList()\n    arrayList.add(o)\n    return arrayList\n  }\n}\n\nexport default Collections\n", "export default class EnvelopeDistance {\n  static maxDistance(ax1, ay1, ax2, ay2, bx1, by1, bx2, by2) {\n    let dist = EnvelopeDistance.distance(ax1, ay1, bx1, by1)\n    dist = Math.max(dist, EnvelopeDistance.distance(ax1, ay1, bx2, by2))\n    dist = Math.max(dist, EnvelopeDistance.distance(ax2, ay2, bx1, by1))\n    dist = Math.max(dist, EnvelopeDistance.distance(ax2, ay2, bx2, by2))\n    return dist\n  }\n  static distance(x1, y1, x2, y2) {\n    const dx = x2 - x1\n    const dy = y2 - y1\n    return Math.sqrt(dx * dx + dy * dy)\n  }\n  static maximumDistance(env1, env2) {\n    const minx = Math.min(env1.getMinX(), env2.getMinX())\n    const miny = Math.min(env1.getMinY(), env2.getMinY())\n    const maxx = Math.max(env1.getMaxX(), env2.getMaxX())\n    const maxy = Math.max(env1.getMaxY(), env2.getMaxY())\n    return EnvelopeDistance.distance(minx, miny, maxx, maxy)\n  }\n  static minMaxDistance(a, b) {\n    const aminx = a.getMinX()\n    const aminy = a.getMinY()\n    const amaxx = a.getMaxX()\n    const amaxy = a.getMaxY()\n    const bminx = b.getMinX()\n    const bminy = b.getMinY()\n    const bmaxx = b.getMaxX()\n    const bmaxy = b.getMaxY()\n    let dist = EnvelopeDistance.maxDistance(aminx, aminy, aminx, amaxy, bminx, bminy, bminx, bmaxy)\n    dist = Math.min(dist, EnvelopeDistance.maxDistance(aminx, aminy, aminx, amaxy, bminx, bminy, bmaxx, bminy))\n    dist = Math.min(dist, EnvelopeDistance.maxDistance(aminx, aminy, aminx, amaxy, bmaxx, bmaxy, bminx, bmaxy))\n    dist = Math.min(dist, EnvelopeDistance.maxDistance(aminx, aminy, aminx, amaxy, bmaxx, bmaxy, bmaxx, bminy))\n    dist = Math.min(dist, EnvelopeDistance.maxDistance(aminx, aminy, amaxx, aminy, bminx, bminy, bminx, bmaxy))\n    dist = Math.min(dist, EnvelopeDistance.maxDistance(aminx, aminy, amaxx, aminy, bminx, bminy, bmaxx, bminy))\n    dist = Math.min(dist, EnvelopeDistance.maxDistance(aminx, aminy, amaxx, aminy, bmaxx, bmaxy, bminx, bmaxy))\n    dist = Math.min(dist, EnvelopeDistance.maxDistance(aminx, aminy, amaxx, aminy, bmaxx, bmaxy, bmaxx, bminy))\n    dist = Math.min(dist, EnvelopeDistance.maxDistance(amaxx, amaxy, aminx, amaxy, bminx, bminy, bminx, bmaxy))\n    dist = Math.min(dist, EnvelopeDistance.maxDistance(amaxx, amaxy, aminx, amaxy, bminx, bminy, bmaxx, bminy))\n    dist = Math.min(dist, EnvelopeDistance.maxDistance(amaxx, amaxy, aminx, amaxy, bmaxx, bmaxy, bminx, bmaxy))\n    dist = Math.min(dist, EnvelopeDistance.maxDistance(amaxx, amaxy, aminx, amaxy, bmaxx, bmaxy, bmaxx, bminy))\n    dist = Math.min(dist, EnvelopeDistance.maxDistance(amaxx, amaxy, amaxx, aminy, bminx, bminy, bminx, bmaxy))\n    dist = Math.min(dist, EnvelopeDistance.maxDistance(amaxx, amaxy, amaxx, aminy, bminx, bminy, bmaxx, bminy))\n    dist = Math.min(dist, EnvelopeDistance.maxDistance(amaxx, amaxy, amaxx, aminy, bmaxx, bmaxy, bminx, bmaxy))\n    dist = Math.min(dist, EnvelopeDistance.maxDistance(amaxx, amaxy, amaxx, aminy, bmaxx, bmaxy, bmaxx, bminy))\n    return dist\n  }\n}\n", "import IllegalArgumentException from '../../../../../java/lang/IllegalArgumentException'\nimport AbstractNode from './AbstractNode'\nimport EnvelopeDistance from './EnvelopeDistance'\nimport Comparable from '../../../../../java/lang/Comparable'\nexport default class BoundablePair {\n  constructor() {\n    BoundablePair.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this._boundable1 = null\n    this._boundable2 = null\n    this._distance = null\n    this._itemDistance = null\n    const boundable1 = arguments[0], boundable2 = arguments[1], itemDistance = arguments[2]\n    this._boundable1 = boundable1\n    this._boundable2 = boundable2\n    this._itemDistance = itemDistance\n    this._distance = this.distance()\n  }\n  static area(b) {\n    return b.getBounds().getArea()\n  }\n  static isComposite(item) {\n    return item instanceof AbstractNode\n  }\n  maximumDistance() {\n    return EnvelopeDistance.maximumDistance(this._boundable1.getBounds(), this._boundable2.getBounds())\n  }\n  expandToQueue(priQ, minDistance) {\n    const isComp1 = BoundablePair.isComposite(this._boundable1)\n    const isComp2 = BoundablePair.isComposite(this._boundable2)\n    if (isComp1 && isComp2) {\n      if (BoundablePair.area(this._boundable1) > BoundablePair.area(this._boundable2)) {\n        this.expand(this._boundable1, this._boundable2, false, priQ, minDistance)\n        return null\n      } else {\n        this.expand(this._boundable2, this._boundable1, true, priQ, minDistance)\n        return null\n      }\n    } else if (isComp1) {\n      this.expand(this._boundable1, this._boundable2, false, priQ, minDistance)\n      return null\n    } else if (isComp2) {\n      this.expand(this._boundable2, this._boundable1, true, priQ, minDistance)\n      return null\n    }\n    throw new IllegalArgumentException('neither boundable is composite')\n  }\n  isLeaves() {\n    return !(BoundablePair.isComposite(this._boundable1) || BoundablePair.isComposite(this._boundable2))\n  }\n  compareTo(o) {\n    const nd = o\n    if (this._distance < nd._distance) return -1\n    if (this._distance > nd._distance) return 1\n    return 0\n  }\n  expand(bndComposite, bndOther, isFlipped, priQ, minDistance) {\n    const children = bndComposite.getChildBoundables()\n    for (let i = children.iterator(); i.hasNext(); ) {\n      const child = i.next()\n      let bp = null\n      if (isFlipped) \n        bp = new BoundablePair(bndOther, child, this._itemDistance)\n      else \n        bp = new BoundablePair(child, bndOther, this._itemDistance)\n      \n      if (bp.getDistance() < minDistance) \n        priQ.add(bp)\n      \n    }\n  }\n  getBoundable(i) {\n    if (i === 0) return this._boundable1\n    return this._boundable2\n  }\n  getDistance() {\n    return this._distance\n  }\n  distance() {\n    if (this.isLeaves()) \n      return this._itemDistance.distance(this._boundable1, this._boundable2)\n    \n    return this._boundable1.getBounds().distance(this._boundable2.getBounds())\n  }\n  get interfaces_() {\n    return [Comparable]\n  }\n}\n", "export default class ItemVisitor {\n  visitItem(item) {}\n}\n", "import ItemBoundable from './ItemBoundable'\nimport hasInterface from '../../../../../hasInterface'\nimport ItemVisitor from '../ItemVisitor'\nimport AbstractNode from './AbstractNode'\nimport Collections from '../../../../../java/util/Collections'\nimport ArrayList from '../../../../../java/util/ArrayList'\nimport Serializable from '../../../../../java/io/Serializable'\nimport Assert from '../../util/Assert'\nimport List from '../../../../../java/util/List'\nexport default class AbstractSTRtree {\n  constructor() {\n    AbstractSTRtree.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this._root = null\n    this._built = false\n    this._itemBoundables = new ArrayList()\n    this._nodeCapacity = null\n    if (arguments.length === 0) {\n      AbstractSTRtree.constructor_.call(this, AbstractSTRtree.DEFAULT_NODE_CAPACITY)\n    } else if (arguments.length === 1) {\n      const nodeCapacity = arguments[0]\n      Assert.isTrue(nodeCapacity > 1, 'Node capacity must be greater than 1')\n      this._nodeCapacity = nodeCapacity\n    }\n  }\n  static compareDoubles(a, b) {\n    return a > b ? 1 : a < b ? -1 : 0\n  }\n  queryInternal() {\n    if (hasInterface(arguments[2], ItemVisitor) && (arguments[0] instanceof Object && arguments[1] instanceof AbstractNode)) {\n      const searchBounds = arguments[0], node = arguments[1], visitor = arguments[2]\n      const childBoundables = node.getChildBoundables()\n      for (let i = 0; i < childBoundables.size(); i++) {\n        const childBoundable = childBoundables.get(i)\n        if (!this.getIntersectsOp().intersects(childBoundable.getBounds(), searchBounds)) \n          continue\n        \n        if (childBoundable instanceof AbstractNode) \n          this.queryInternal(searchBounds, childBoundable, visitor)\n        else if (childBoundable instanceof ItemBoundable) \n          visitor.visitItem(childBoundable.getItem())\n        else \n          Assert.shouldNeverReachHere()\n        \n      }\n    } else if (hasInterface(arguments[2], List) && (arguments[0] instanceof Object && arguments[1] instanceof AbstractNode)) {\n      const searchBounds = arguments[0], node = arguments[1], matches = arguments[2]\n      const childBoundables = node.getChildBoundables()\n      for (let i = 0; i < childBoundables.size(); i++) {\n        const childBoundable = childBoundables.get(i)\n        if (!this.getIntersectsOp().intersects(childBoundable.getBounds(), searchBounds)) \n          continue\n        \n        if (childBoundable instanceof AbstractNode) \n          this.queryInternal(searchBounds, childBoundable, matches)\n        else if (childBoundable instanceof ItemBoundable) \n          matches.add(childBoundable.getItem())\n        else \n          Assert.shouldNeverReachHere()\n        \n      }\n    }\n  }\n  getNodeCapacity() {\n    return this._nodeCapacity\n  }\n  lastNode(nodes) {\n    return nodes.get(nodes.size() - 1)\n  }\n  size() {\n    if (arguments.length === 0) {\n      if (this.isEmpty()) \n        return 0\n      \n      this.build()\n      return this.size(this._root)\n    } else if (arguments.length === 1) {\n      const node = arguments[0]\n      let size = 0\n      for (let i = node.getChildBoundables().iterator(); i.hasNext(); ) {\n        const childBoundable = i.next()\n        if (childBoundable instanceof AbstractNode) \n          size += this.size(childBoundable)\n        else if (childBoundable instanceof ItemBoundable) \n          size += 1\n        \n      }\n      return size\n    }\n  }\n  removeItem(node, item) {\n    let childToRemove = null\n    for (let i = node.getChildBoundables().iterator(); i.hasNext(); ) {\n      const childBoundable = i.next()\n      if (childBoundable instanceof ItemBoundable) \n        if (childBoundable.getItem() === item) childToRemove = childBoundable\n      \n    }\n    if (childToRemove !== null) {\n      node.getChildBoundables().remove(childToRemove)\n      return true\n    }\n    return false\n  }\n  itemsTree() {\n    if (arguments.length === 0) {\n      this.build()\n      const valuesTree = this.itemsTree(this._root)\n      if (valuesTree === null) return new ArrayList()\n      return valuesTree\n    } else if (arguments.length === 1) {\n      const node = arguments[0]\n      const valuesTreeForNode = new ArrayList()\n      for (let i = node.getChildBoundables().iterator(); i.hasNext(); ) {\n        const childBoundable = i.next()\n        if (childBoundable instanceof AbstractNode) {\n          const valuesTreeForChild = this.itemsTree(childBoundable)\n          if (valuesTreeForChild !== null) valuesTreeForNode.add(valuesTreeForChild)\n        } else if (childBoundable instanceof ItemBoundable) {\n          valuesTreeForNode.add(childBoundable.getItem())\n        } else {\n          Assert.shouldNeverReachHere()\n        }\n      }\n      if (valuesTreeForNode.size() <= 0) return null\n      return valuesTreeForNode\n    }\n  }\n  insert(bounds, item) {\n    Assert.isTrue(!this._built, 'Cannot insert items into an STR packed R-tree after it has been built.')\n    this._itemBoundables.add(new ItemBoundable(bounds, item))\n  }\n  boundablesAtLevel() {\n    if (arguments.length === 1) {\n      const level = arguments[0]\n      const boundables = new ArrayList()\n      this.boundablesAtLevel(level, this._root, boundables)\n      return boundables\n    } else if (arguments.length === 3) {\n      const level = arguments[0], top = arguments[1], boundables = arguments[2]\n      Assert.isTrue(level > -2)\n      if (top.getLevel() === level) {\n        boundables.add(top)\n        return null\n      }\n      for (let i = top.getChildBoundables().iterator(); i.hasNext(); ) {\n        const boundable = i.next()\n        if (boundable instanceof AbstractNode) {\n          this.boundablesAtLevel(level, boundable, boundables)\n        } else {\n          Assert.isTrue(boundable instanceof ItemBoundable)\n          if (level === -1) \n            boundables.add(boundable)\n          \n        }\n      }\n      return null\n    }\n  }\n  query() {\n    if (arguments.length === 1) {\n      const searchBounds = arguments[0]\n      this.build()\n      const matches = new ArrayList()\n      if (this.isEmpty()) \n        return matches\n      \n      if (this.getIntersectsOp().intersects(this._root.getBounds(), searchBounds)) \n        this.queryInternal(searchBounds, this._root, matches)\n      \n      return matches\n    } else if (arguments.length === 2) {\n      const searchBounds = arguments[0], visitor = arguments[1]\n      this.build()\n      if (this.isEmpty()) \n        return null\n      \n      if (this.getIntersectsOp().intersects(this._root.getBounds(), searchBounds)) \n        this.queryInternal(searchBounds, this._root, visitor)\n      \n    }\n  }\n  build() {\n    if (this._built) return null\n    this._root = this._itemBoundables.isEmpty() ? this.createNode(0) : this.createHigherLevels(this._itemBoundables, -1)\n    this._itemBoundables = null\n    this._built = true\n  }\n  getRoot() {\n    this.build()\n    return this._root\n  }\n  remove() {\n    if (arguments.length === 2) {\n      const searchBounds = arguments[0], item = arguments[1]\n      this.build()\n      if (this.getIntersectsOp().intersects(this._root.getBounds(), searchBounds)) \n        return this.remove(searchBounds, this._root, item)\n      \n      return false\n    } else if (arguments.length === 3) {\n      const searchBounds = arguments[0], node = arguments[1], item = arguments[2]\n      let found = this.removeItem(node, item)\n      if (found) return true\n      let childToPrune = null\n      for (let i = node.getChildBoundables().iterator(); i.hasNext(); ) {\n        const childBoundable = i.next()\n        if (!this.getIntersectsOp().intersects(childBoundable.getBounds(), searchBounds)) \n          continue\n        \n        if (childBoundable instanceof AbstractNode) {\n          found = this.remove(searchBounds, childBoundable, item)\n          if (found) {\n            childToPrune = childBoundable\n            break\n          }\n        }\n      }\n      if (childToPrune !== null) \n        if (childToPrune.getChildBoundables().isEmpty()) \n          node.getChildBoundables().remove(childToPrune)\n        \n      \n      return found\n    }\n  }\n  createHigherLevels(boundablesOfALevel, level) {\n    Assert.isTrue(!boundablesOfALevel.isEmpty())\n    const parentBoundables = this.createParentBoundables(boundablesOfALevel, level + 1)\n    if (parentBoundables.size() === 1) \n      return parentBoundables.get(0)\n    \n    return this.createHigherLevels(parentBoundables, level + 1)\n  }\n  depth() {\n    if (arguments.length === 0) {\n      if (this.isEmpty()) \n        return 0\n      \n      this.build()\n      return this.depth(this._root)\n    } else if (arguments.length === 1) {\n      const node = arguments[0]\n      let maxChildDepth = 0\n      for (let i = node.getChildBoundables().iterator(); i.hasNext(); ) {\n        const childBoundable = i.next()\n        if (childBoundable instanceof AbstractNode) {\n          const childDepth = this.depth(childBoundable)\n          if (childDepth > maxChildDepth) maxChildDepth = childDepth\n        }\n      }\n      return maxChildDepth + 1\n    }\n  }\n  createParentBoundables(childBoundables, newLevel) {\n    Assert.isTrue(!childBoundables.isEmpty())\n    const parentBoundables = new ArrayList()\n    parentBoundables.add(this.createNode(newLevel))\n    const sortedChildBoundables = new ArrayList(childBoundables)\n    Collections.sort(sortedChildBoundables, this.getComparator())\n    for (let i = sortedChildBoundables.iterator(); i.hasNext(); ) {\n      const childBoundable = i.next()\n      if (this.lastNode(parentBoundables).getChildBoundables().size() === this.getNodeCapacity()) \n        parentBoundables.add(this.createNode(newLevel))\n      \n      this.lastNode(parentBoundables).addChildBoundable(childBoundable)\n    }\n    return parentBoundables\n  }\n  isEmpty() {\n    if (!this._built) return this._itemBoundables.isEmpty()\n    return this._root.isEmpty()\n  }\n  get interfaces_() {\n    return [Serializable]\n  }\n}\nfunction IntersectsOp() {}\nAbstractSTRtree.IntersectsOp = IntersectsOp\nAbstractSTRtree.DEFAULT_NODE_CAPACITY = 10\n", "export default class ItemDistance {\n  distance(item1, item2) {}\n}\n", "import ItemBoundable from './ItemBoundable'\nimport PriorityQueue from '../../util/PriorityQueue'\nimport hasInterface from '../../../../../hasInterface'\nimport SpatialIndex from '../SpatialIndex'\nimport AbstractNode from './AbstractNode'\nimport Double from '../../../../../java/lang/Double'\nimport Collections from '../../../../../java/util/Collections'\nimport BoundablePair from './BoundablePair'\nimport ArrayList from '../../../../../java/util/ArrayList'\nimport Comparator from '../../../../../java/util/Comparator'\nimport Serializable from '../../../../../java/io/Serializable'\nimport Envelope from '../../geom/Envelope'\nimport Assert from '../../util/Assert'\nimport AbstractSTRtree from './AbstractSTRtree'\nimport ItemDistance from './ItemDistance'\nexport default class STRtree extends AbstractSTRtree {\n  constructor() {\n    super()\n    STRtree.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    if (arguments.length === 0) {\n      STRtree.constructor_.call(this, STRtree.DEFAULT_NODE_CAPACITY)\n    } else if (arguments.length === 1) {\n      const nodeCapacity = arguments[0]\n      AbstractSTRtree.constructor_.call(this, nodeCapacity)\n    }\n  }\n  static centreX(e) {\n    return STRtree.avg(e.getMinX(), e.getMaxX())\n  }\n  static avg(a, b) {\n    return (a + b) / 2\n  }\n  static getItems(kNearestNeighbors) {\n    const items = new Array(kNearestNeighbors.size()).fill(null)\n    let count = 0\n    while (!kNearestNeighbors.isEmpty()) {\n      const bp = kNearestNeighbors.poll()\n      items[count] = bp.getBoundable(0).getItem()\n      count++\n    }\n    return items\n  }\n  static centreY(e) {\n    return STRtree.avg(e.getMinY(), e.getMaxY())\n  }\n  createParentBoundablesFromVerticalSlices(verticalSlices, newLevel) {\n    Assert.isTrue(verticalSlices.length > 0)\n    const parentBoundables = new ArrayList()\n    for (let i = 0; i < verticalSlices.length; i++) \n      parentBoundables.addAll(this.createParentBoundablesFromVerticalSlice(verticalSlices[i], newLevel))\n    \n    return parentBoundables\n  }\n  nearestNeighbourK() {\n    if (arguments.length === 2) {\n      const initBndPair = arguments[0], k = arguments[1]\n      return this.nearestNeighbourK(initBndPair, Double.POSITIVE_INFINITY, k)\n    } else if (arguments.length === 3) {\n      const initBndPair = arguments[0], maxDistance = arguments[1], k = arguments[2]\n      let distanceLowerBound = maxDistance\n      const priQ = new PriorityQueue()\n      priQ.add(initBndPair)\n      const kNearestNeighbors = new PriorityQueue()\n      while (!priQ.isEmpty() && distanceLowerBound >= 0.0) {\n        const bndPair = priQ.poll()\n        const pairDistance = bndPair.getDistance()\n        if (pairDistance >= distanceLowerBound) \n          break\n        \n        if (bndPair.isLeaves()) \n          if (kNearestNeighbors.size() < k) {\n            kNearestNeighbors.add(bndPair)\n          } else {\n            const bp1 = kNearestNeighbors.peek()\n            if (bp1.getDistance() > pairDistance) {\n              kNearestNeighbors.poll()\n              kNearestNeighbors.add(bndPair)\n            }\n            const bp2 = kNearestNeighbors.peek()\n            distanceLowerBound = bp2.getDistance()\n          }\n        else \n          bndPair.expandToQueue(priQ, distanceLowerBound)\n        \n      }\n      return STRtree.getItems(kNearestNeighbors)\n    }\n  }\n  createNode(level) {\n    return new STRtreeNode(level)\n  }\n  size() {\n    if (arguments.length === 0) \n      return super.size.call(this)\n    else return super.size.apply(this, arguments)\n  }\n  insert() {\n    if (arguments.length === 2 && (arguments[1] instanceof Object && arguments[0] instanceof Envelope)) {\n      const itemEnv = arguments[0], item = arguments[1]\n      if (itemEnv.isNull()) \n        return null\n      \n      super.insert.call(this, itemEnv, item)\n    } else {\n      return super.insert.apply(this, arguments)\n    }\n  }\n  getIntersectsOp() {\n    return STRtree.intersectsOp\n  }\n  verticalSlices(childBoundables, sliceCount) {\n    const sliceCapacity = Math.trunc(Math.ceil(childBoundables.size() / sliceCount))\n    const slices = new Array(sliceCount).fill(null)\n    const i = childBoundables.iterator()\n    for (let j = 0; j < sliceCount; j++) {\n      slices[j] = new ArrayList()\n      let boundablesAddedToSlice = 0\n      while (i.hasNext() && boundablesAddedToSlice < sliceCapacity) {\n        const childBoundable = i.next()\n        slices[j].add(childBoundable)\n        boundablesAddedToSlice++\n      }\n    }\n    return slices\n  }\n  query() {\n    if (arguments.length === 1) {\n      const searchEnv = arguments[0]\n      return super.query.call(this, searchEnv)\n    } else if (arguments.length === 2) {\n      const searchEnv = arguments[0], visitor = arguments[1]\n      super.query.call(this, searchEnv, visitor)\n    }\n  }\n  getComparator() {\n    return STRtree.yComparator\n  }\n  createParentBoundablesFromVerticalSlice(childBoundables, newLevel) {\n    return super.createParentBoundables.call(this, childBoundables, newLevel)\n  }\n  remove() {\n    if (arguments.length === 2 && (arguments[1] instanceof Object && arguments[0] instanceof Envelope)) {\n      const itemEnv = arguments[0], item = arguments[1]\n      return super.remove.call(this, itemEnv, item)\n    } else {\n      return super.remove.apply(this, arguments)\n    }\n  }\n  depth() {\n    if (arguments.length === 0) \n      return super.depth.call(this)\n    else return super.depth.apply(this, arguments)\n  }\n  createParentBoundables(childBoundables, newLevel) {\n    Assert.isTrue(!childBoundables.isEmpty())\n    const minLeafCount = Math.trunc(Math.ceil(childBoundables.size() / this.getNodeCapacity()))\n    const sortedChildBoundables = new ArrayList(childBoundables)\n    Collections.sort(sortedChildBoundables, STRtree.xComparator)\n    const verticalSlices = this.verticalSlices(sortedChildBoundables, Math.trunc(Math.ceil(Math.sqrt(minLeafCount))))\n    return this.createParentBoundablesFromVerticalSlices(verticalSlices, newLevel)\n  }\n  nearestNeighbour() {\n    if (arguments.length === 1) {\n      if (hasInterface(arguments[0], ItemDistance)) {\n        const itemDist = arguments[0]\n        if (this.isEmpty()) return null\n        const bp = new BoundablePair(this.getRoot(), this.getRoot(), itemDist)\n        return this.nearestNeighbour(bp)\n      } else if (arguments[0] instanceof BoundablePair) {\n        const initBndPair = arguments[0]\n        let distanceLowerBound = Double.POSITIVE_INFINITY\n        let minPair = null\n        const priQ = new PriorityQueue()\n        priQ.add(initBndPair)\n        while (!priQ.isEmpty() && distanceLowerBound > 0.0) {\n          const bndPair = priQ.poll()\n          const pairDistance = bndPair.getDistance()\n          if (pairDistance >= distanceLowerBound) break\n          if (bndPair.isLeaves()) {\n            distanceLowerBound = pairDistance\n            minPair = bndPair\n          } else {\n            bndPair.expandToQueue(priQ, distanceLowerBound)\n          }\n        }\n        if (minPair === null) return null\n        return [minPair.getBoundable(0).getItem(), minPair.getBoundable(1).getItem()]\n      }\n    } else if (arguments.length === 2) {\n      const tree = arguments[0], itemDist = arguments[1]\n      if (this.isEmpty() || tree.isEmpty()) return null\n      const bp = new BoundablePair(this.getRoot(), tree.getRoot(), itemDist)\n      return this.nearestNeighbour(bp)\n    } else if (arguments.length === 3) {\n      const env = arguments[0], item = arguments[1], itemDist = arguments[2]\n      const bnd = new ItemBoundable(env, item)\n      const bp = new BoundablePair(this.getRoot(), bnd, itemDist)\n      return this.nearestNeighbour(bp)[0]\n    } else if (arguments.length === 4) {\n      const env = arguments[0], item = arguments[1], itemDist = arguments[2], k = arguments[3]\n      const bnd = new ItemBoundable(env, item)\n      const bp = new BoundablePair(this.getRoot(), bnd, itemDist)\n      return this.nearestNeighbourK(bp, k)\n    }\n  }\n  isWithinDistance() {\n    if (arguments.length === 2) {\n      const initBndPair = arguments[0], maxDistance = arguments[1]\n      let distanceUpperBound = Double.POSITIVE_INFINITY\n      const priQ = new PriorityQueue()\n      priQ.add(initBndPair)\n      while (!priQ.isEmpty()) {\n        const bndPair = priQ.poll()\n        const pairDistance = bndPair.getDistance()\n        if (pairDistance > maxDistance) return false\n        if (bndPair.maximumDistance() <= maxDistance) return true\n        if (bndPair.isLeaves()) {\n          distanceUpperBound = pairDistance\n          if (distanceUpperBound <= maxDistance) return true\n        } else {\n          bndPair.expandToQueue(priQ, distanceUpperBound)\n        }\n      }\n      return false\n    } else if (arguments.length === 3) {\n      const tree = arguments[0], itemDist = arguments[1], maxDistance = arguments[2]\n      const bp = new BoundablePair(this.getRoot(), tree.getRoot(), itemDist)\n      return this.isWithinDistance(bp, maxDistance)\n    }\n  }\n  get interfaces_() {\n    return [SpatialIndex, Serializable]\n  }\n}\nclass STRtreeNode extends AbstractNode {\n  constructor() {\n    super()\n    STRtreeNode.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    const level = arguments[0]\n    AbstractNode.constructor_.call(this, level)\n  }\n  computeBounds() {\n    let bounds = null\n    for (let i = this.getChildBoundables().iterator(); i.hasNext(); ) {\n      const childBoundable = i.next()\n      if (bounds === null) \n        bounds = new Envelope(childBoundable.getBounds())\n      else \n        bounds.expandToInclude(childBoundable.getBounds())\n      \n    }\n    return bounds\n  }\n}\nSTRtree.STRtreeNode = STRtreeNode\nSTRtree.xComparator = new (class {\n  get interfaces_() {\n    return [Comparator]\n  }\n  compare(o1, o2) {\n    return AbstractSTRtree.compareDoubles(STRtree.centreX(o1.getBounds()), STRtree.centreX(o2.getBounds()))\n  }\n})()\nSTRtree.yComparator = new (class {\n  get interfaces_() {\n    return [Comparator]\n  }\n  compare(o1, o2) {\n    return AbstractSTRtree.compareDoubles(STRtree.centreY(o1.getBounds()), STRtree.centreY(o2.getBounds()))\n  }\n})()\nSTRtree.intersectsOp = new (class {\n  get interfaces_() {\n    return [IntersectsOp]\n  }\n  intersects(aBounds, bBounds) {\n    return aBounds.intersects(bBounds)\n  }\n})()\nSTRtree.DEFAULT_NODE_CAPACITY = 10\n", "import Assert from '../util/Assert'\nexport default class SegmentPointComparator {\n  static relativeSign(x0, x1) {\n    if (x0 < x1) return -1\n    if (x0 > x1) return 1\n    return 0\n  }\n  static compare(octant, p0, p1) {\n    if (p0.equals2D(p1)) return 0\n    const xSign = SegmentPointComparator.relativeSign(p0.x, p1.x)\n    const ySign = SegmentPointComparator.relativeSign(p0.y, p1.y)\n    switch (octant) {\n    case 0:\n      return SegmentPointComparator.compareValue(xSign, ySign)\n    case 1:\n      return SegmentPointComparator.compareValue(ySign, xSign)\n    case 2:\n      return SegmentPointComparator.compareValue(ySign, -xSign)\n    case 3:\n      return SegmentPointComparator.compareValue(-xSign, ySign)\n    case 4:\n      return SegmentPointComparator.compareValue(-xSign, -ySign)\n    case 5:\n      return SegmentPointComparator.compareValue(-ySign, -xSign)\n    case 6:\n      return SegmentPointComparator.compareValue(-ySign, xSign)\n    case 7:\n      return SegmentPointComparator.compareValue(xSign, -ySign)\n    }\n    Assert.shouldNeverReachHere('invalid octant value')\n    return 0\n  }\n  static compareValue(compareSign0, compareSign1) {\n    if (compareSign0 < 0) return -1\n    if (compareSign0 > 0) return 1\n    if (compareSign1 < 0) return -1\n    if (compareSign1 > 0) return 1\n    return 0\n  }\n}\n", "import Coordinate from '../geom/Coordinate'\nimport SegmentPointComparator from './SegmentPointComparator'\nimport Comparable from '../../../../java/lang/Comparable'\nexport default class SegmentNode {\n  constructor() {\n    SegmentNode.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this._segString = null\n    this.coord = null\n    this.segmentIndex = null\n    this._segmentOctant = null\n    this._isInterior = null\n    const segString = arguments[0], coord = arguments[1], segmentIndex = arguments[2], segmentOctant = arguments[3]\n    this._segString = segString\n    this.coord = new Coordinate(coord)\n    this.segmentIndex = segmentIndex\n    this._segmentOctant = segmentOctant\n    this._isInterior = !coord.equals2D(segString.getCoordinate(segmentIndex))\n  }\n  getCoordinate() {\n    return this.coord\n  }\n  print(out) {\n    out.print(this.coord)\n    out.print(' seg # = ' + this.segmentIndex)\n  }\n  compareTo(obj) {\n    const other = obj\n    if (this.segmentIndex < other.segmentIndex) return -1\n    if (this.segmentIndex > other.segmentIndex) return 1\n    if (this.coord.equals2D(other.coord)) return 0\n    if (!this._isInterior) return -1\n    if (!other._isInterior) return 1\n    return SegmentPointComparator.compare(this._segmentOctant, this.coord, other.coord)\n  }\n  isEndPoint(maxSegmentIndex) {\n    if (this.segmentIndex === 0 && !this._isInterior) return true\n    if (this.segmentIndex === maxSegmentIndex) return true\n    return false\n  }\n  toString() {\n    return this.segmentIndex + ':' + this.coord.toString()\n  }\n  isInterior() {\n    return this._isInterior\n  }\n  get interfaces_() {\n    return [Comparable]\n  }\n}\n", "/**\n * @see http://download.oracle.com/javase/6/docs/api/java/util/Iterator.html\n * @constructor\n * @private\n */\nexport default class Iterator {\n  /**\n     * Returns true if the iteration has more elements.\n     * @return {boolean}\n     */\n  hasNext() {}\n\n  /**\n     * Returns the next element in the iteration.\n     * @return {Object}\n     */\n  next() {}\n\n  /**\n     * Removes from the underlying collection the last element returned by the\n     * iterator (optional operation).\n     */\n  remove() {}\n}\n", "import CoordinateList from '../geom/CoordinateList'\nimport SegmentNode from './SegmentNode'\nimport Iterator from '../../../../java/util/Iterator'\nimport Coordinate from '../geom/Coordinate'\nimport NodedSegmentString from './NodedSegmentString'\nimport Integer from '../../../../java/lang/Integer'\nimport UnsupportedOperationException from '../../../../java/lang/UnsupportedOperationException'\nimport ArrayList from '../../../../java/util/ArrayList'\nimport RuntimeException from '../../../../java/lang/RuntimeException'\nimport Assert from '../util/Assert'\nimport TreeMap from '../../../../java/util/TreeMap'\nexport default class SegmentNodeList {\n  constructor() {\n    SegmentNodeList.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this._nodeMap = new TreeMap()\n    this._edge = null\n    const edge = arguments[0]\n    this._edge = edge\n  }\n  getSplitCoordinates() {\n    const coordList = new CoordinateList()\n    this.addEndpoints()\n    const it = this.iterator()\n    let eiPrev = it.next()\n    while (it.hasNext()) {\n      const ei = it.next()\n      this.addEdgeCoordinates(eiPrev, ei, coordList)\n      eiPrev = ei\n    }\n    return coordList.toCoordinateArray()\n  }\n  addCollapsedNodes() {\n    const collapsedVertexIndexes = new ArrayList()\n    this.findCollapsesFromInsertedNodes(collapsedVertexIndexes)\n    this.findCollapsesFromExistingVertices(collapsedVertexIndexes)\n    for (let it = collapsedVertexIndexes.iterator(); it.hasNext(); ) {\n      const vertexIndex = it.next().intValue()\n      this.add(this._edge.getCoordinate(vertexIndex), vertexIndex)\n    }\n  }\n  createSplitEdgePts(ei0, ei1) {\n    let npts = ei1.segmentIndex - ei0.segmentIndex + 2\n    if (npts === 2) return [new Coordinate(ei0.coord), new Coordinate(ei1.coord)]\n    const lastSegStartPt = this._edge.getCoordinate(ei1.segmentIndex)\n    const useIntPt1 = ei1.isInterior() || !ei1.coord.equals2D(lastSegStartPt)\n    if (!useIntPt1) \n      npts--\n    \n    const pts = new Array(npts).fill(null)\n    let ipt = 0\n    pts[ipt++] = new Coordinate(ei0.coord)\n    for (let i = ei0.segmentIndex + 1; i <= ei1.segmentIndex; i++) \n      pts[ipt++] = this._edge.getCoordinate(i)\n    \n    if (useIntPt1) pts[ipt] = new Coordinate(ei1.coord)\n    return pts\n  }\n  print(out) {\n    out.println('Intersections:')\n    for (let it = this.iterator(); it.hasNext(); ) {\n      const ei = it.next()\n      ei.print(out)\n    }\n  }\n  findCollapsesFromExistingVertices(collapsedVertexIndexes) {\n    for (let i = 0; i < this._edge.size() - 2; i++) {\n      const p0 = this._edge.getCoordinate(i)\n      const p1 = this._edge.getCoordinate(i + 1)\n      const p2 = this._edge.getCoordinate(i + 2)\n      if (p0.equals2D(p2)) \n        collapsedVertexIndexes.add(Integer.valueOf(i + 1))\n      \n    }\n  }\n  addEdgeCoordinates(ei0, ei1, coordList) {\n    const pts = this.createSplitEdgePts(ei0, ei1)\n    coordList.add(pts, false)\n  }\n  iterator() {\n    return this._nodeMap.values().iterator()\n  }\n  addSplitEdges(edgeList) {\n    this.addEndpoints()\n    this.addCollapsedNodes()\n    const it = this.iterator()\n    let eiPrev = it.next()\n    while (it.hasNext()) {\n      const ei = it.next()\n      const newEdge = this.createSplitEdge(eiPrev, ei)\n      edgeList.add(newEdge)\n      eiPrev = ei\n    }\n  }\n  findCollapseIndex(ei0, ei1, collapsedVertexIndex) {\n    if (!ei0.coord.equals2D(ei1.coord)) return false\n    let numVerticesBetween = ei1.segmentIndex - ei0.segmentIndex\n    if (!ei1.isInterior()) \n      numVerticesBetween--\n    \n    if (numVerticesBetween === 1) {\n      collapsedVertexIndex[0] = ei0.segmentIndex + 1\n      return true\n    }\n    return false\n  }\n  findCollapsesFromInsertedNodes(collapsedVertexIndexes) {\n    const collapsedVertexIndex = new Array(1).fill(null)\n    const it = this.iterator()\n    let eiPrev = it.next()\n    while (it.hasNext()) {\n      const ei = it.next()\n      const isCollapsed = this.findCollapseIndex(eiPrev, ei, collapsedVertexIndex)\n      if (isCollapsed) collapsedVertexIndexes.add(Integer.valueOf(collapsedVertexIndex[0]))\n      eiPrev = ei\n    }\n  }\n  getEdge() {\n    return this._edge\n  }\n  addEndpoints() {\n    const maxSegIndex = this._edge.size() - 1\n    this.add(this._edge.getCoordinate(0), 0)\n    this.add(this._edge.getCoordinate(maxSegIndex), maxSegIndex)\n  }\n  createSplitEdge(ei0, ei1) {\n    const pts = this.createSplitEdgePts(ei0, ei1)\n    return new NodedSegmentString(pts, this._edge.getData())\n  }\n  add(intPt, segmentIndex) {\n    const eiNew = new SegmentNode(this._edge, intPt, segmentIndex, this._edge.getSegmentOctant(segmentIndex))\n    const ei = this._nodeMap.get(eiNew)\n    if (ei !== null) {\n      Assert.isTrue(ei.coord.equals2D(intPt), 'Found equal nodes with different coordinates')\n      return ei\n    }\n    this._nodeMap.put(eiNew, eiNew)\n    return eiNew\n  }\n  checkSplitEdgesCorrectness(splitEdges) {\n    const edgePts = this._edge.getCoordinates()\n    const split0 = splitEdges.get(0)\n    const pt0 = split0.getCoordinate(0)\n    if (!pt0.equals2D(edgePts[0])) throw new RuntimeException('bad split edge start point at ' + pt0)\n    const splitn = splitEdges.get(splitEdges.size() - 1)\n    const splitnPts = splitn.getCoordinates()\n    const ptn = splitnPts[splitnPts.length - 1]\n    if (!ptn.equals2D(edgePts[edgePts.length - 1])) throw new RuntimeException('bad split edge end point at ' + ptn)\n  }\n}\nclass NodeVertexIterator {\n  constructor() {\n    NodeVertexIterator.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this._nodeList = null\n    this._edge = null\n    this._nodeIt = null\n    this._currNode = null\n    this._nextNode = null\n    this._currSegIndex = 0\n    const nodeList = arguments[0]\n    this._nodeList = nodeList\n    this._edge = nodeList.getEdge()\n    this._nodeIt = nodeList.iterator()\n    this.readNextNode()\n  }\n  next() {\n    if (this._currNode === null) {\n      this._currNode = this._nextNode\n      this._currSegIndex = this._currNode.segmentIndex\n      this.readNextNode()\n      return this._currNode\n    }\n    if (this._nextNode === null) return null\n    if (this._nextNode.segmentIndex === this._currNode.segmentIndex) {\n      this._currNode = this._nextNode\n      this._currSegIndex = this._currNode.segmentIndex\n      this.readNextNode()\n      return this._currNode\n    }\n    if (this._nextNode.segmentIndex > this._currNode.segmentIndex) {}\n    return null\n  }\n  remove() {\n    throw new UnsupportedOperationException(this.getClass().getName())\n  }\n  hasNext() {\n    if (this._nextNode === null) return false\n    return true\n  }\n  readNextNode() {\n    if (this._nodeIt.hasNext()) this._nextNode = this._nodeIt.next(); else this._nextNode = null\n  }\n  get interfaces_() {\n    return [Iterator]\n  }\n}\n", "import Coordinate from '../geom/Coordinate'\nimport IllegalArgumentException from '../../../../java/lang/IllegalArgumentException'\nexport default class Octant {\n  static octant() {\n    if (typeof arguments[0] === 'number' && typeof arguments[1] === 'number') {\n      const dx = arguments[0], dy = arguments[1]\n      if (dx === 0.0 && dy === 0.0) throw new IllegalArgumentException('Cannot compute the octant for point ( ' + dx + ', ' + dy + ' )')\n      const adx = Math.abs(dx)\n      const ady = Math.abs(dy)\n      if (dx >= 0) \n        if (dy >= 0) \n          if (adx >= ady) return 0; else return 1\n        else \n        if (adx >= ady) return 7; else return 6\n        \n      else \n      if (dy >= 0) \n        if (adx >= ady) return 3; else return 2\n      else \n      if (adx >= ady) return 4; else return 5\n        \n      \n    } else if (arguments[0] instanceof Coordinate && arguments[1] instanceof Coordinate) {\n      const p0 = arguments[0], p1 = arguments[1]\n      const dx = p1.x - p0.x\n      const dy = p1.y - p0.y\n      if (dx === 0.0 && dy === 0.0) throw new IllegalArgumentException('Cannot compute the octant for two identical points ' + p0)\n      return Octant.octant(dx, dy)\n    }\n  }\n}\n", "export default class SegmentString {\n  getCoordinates() {}\n  size() {}\n  getCoordinate(i) {}\n  isClosed() {}\n  setData(data) {}\n  getData() {}\n}\n", "import SegmentString from './SegmentString'\nexport default class NodableSegmentString {\n  addIntersection(intPt, segmentIndex) {}\n  get interfaces_() {\n    return [SegmentString]\n  }\n}\n", "import SegmentNodeList from './SegmentNodeList'\nimport WKTWriter from '../io/WKTWriter'\nimport CoordinateArraySequence from '../geom/impl/CoordinateArraySequence'\nimport Coordinate from '../geom/Coordinate'\nimport Octant from './Octant'\nimport ArrayList from '../../../../java/util/ArrayList'\nimport NodableSegmentString from './NodableSegmentString'\nexport default class NodedSegmentString {\n  constructor() {\n    NodedSegmentString.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this._nodeList = new SegmentNodeList(this)\n    this._pts = null\n    this._data = null\n    const pts = arguments[0], data = arguments[1]\n    this._pts = pts\n    this._data = data\n  }\n  static getNodedSubstrings() {\n    if (arguments.length === 1) {\n      const segStrings = arguments[0]\n      const resultEdgelist = new ArrayList()\n      NodedSegmentString.getNodedSubstrings(segStrings, resultEdgelist)\n      return resultEdgelist\n    } else if (arguments.length === 2) {\n      const segStrings = arguments[0], resultEdgelist = arguments[1]\n      for (let i = segStrings.iterator(); i.hasNext(); ) {\n        const ss = i.next()\n        ss.getNodeList().addSplitEdges(resultEdgelist)\n      }\n    }\n  }\n  getCoordinates() {\n    return this._pts\n  }\n  size() {\n    return this._pts.length\n  }\n  getCoordinate(i) {\n    return this._pts[i]\n  }\n  isClosed() {\n    return this._pts[0].equals(this._pts[this._pts.length - 1])\n  }\n  getSegmentOctant(index) {\n    if (index === this._pts.length - 1) return -1\n    return this.safeOctant(this.getCoordinate(index), this.getCoordinate(index + 1))\n  }\n  setData(data) {\n    this._data = data\n  }\n  safeOctant(p0, p1) {\n    if (p0.equals2D(p1)) return 0\n    return Octant.octant(p0, p1)\n  }\n  getData() {\n    return this._data\n  }\n  addIntersection() {\n    if (arguments.length === 2) {\n      const intPt = arguments[0], segmentIndex = arguments[1]\n      this.addIntersectionNode(intPt, segmentIndex)\n    } else if (arguments.length === 4) {\n      const li = arguments[0], segmentIndex = arguments[1], geomIndex = arguments[2], intIndex = arguments[3]\n      const intPt = new Coordinate(li.getIntersection(intIndex))\n      this.addIntersection(intPt, segmentIndex)\n    }\n  }\n  toString() {\n    return WKTWriter.toLineString(new CoordinateArraySequence(this._pts))\n  }\n  getNodeList() {\n    return this._nodeList\n  }\n  addIntersectionNode(intPt, segmentIndex) {\n    let normalizedSegmentIndex = segmentIndex\n    const nextSegIndex = normalizedSegmentIndex + 1\n    if (nextSegIndex < this._pts.length) {\n      const nextPt = this._pts[nextSegIndex]\n      if (intPt.equals2D(nextPt)) \n        normalizedSegmentIndex = nextSegIndex\n      \n    }\n    const ei = this._nodeList.add(intPt, normalizedSegmentIndex)\n    return ei\n  }\n  addIntersections(li, segmentIndex, geomIndex) {\n    for (let i = 0; i < li.getIntersectionNum(); i++) \n      this.addIntersection(li, segmentIndex, geomIndex, i)\n    \n  }\n  get interfaces_() {\n    return [NodableSegmentString]\n  }\n}\n", "import Coordinate from './Coordinate'\nimport Double from '../../../../java/lang/Double'\nimport Orientation from '../algorithm/Orientation'\nimport Intersection from '../algorithm/Intersection'\nimport Comparable from '../../../../java/lang/Comparable'\nimport RobustLineIntersector from '../algorithm/RobustLineIntersector'\nimport Serializable from '../../../../java/io/Serializable'\nimport Distance from '../algorithm/Distance'\nexport default class LineSegment {\n  constructor() {\n    LineSegment.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this.p0 = null\n    this.p1 = null\n    if (arguments.length === 0) {\n      LineSegment.constructor_.call(this, new Coordinate(), new Coordinate())\n    } else if (arguments.length === 1) {\n      const ls = arguments[0]\n      LineSegment.constructor_.call(this, ls.p0, ls.p1)\n    } else if (arguments.length === 2) {\n      const p0 = arguments[0], p1 = arguments[1]\n      this.p0 = p0\n      this.p1 = p1\n    } else if (arguments.length === 4) {\n      const x0 = arguments[0], y0 = arguments[1], x1 = arguments[2], y1 = arguments[3]\n      LineSegment.constructor_.call(this, new Coordinate(x0, y0), new Coordinate(x1, y1))\n    }\n  }\n  static midPoint(p0, p1) {\n    return new Coordinate((p0.x + p1.x) / 2, (p0.y + p1.y) / 2)\n  }\n  minX() {\n    return Math.min(this.p0.x, this.p1.x)\n  }\n  orientationIndex() {\n    if (arguments[0] instanceof LineSegment) {\n      const seg = arguments[0]\n      const orient0 = Orientation.index(this.p0, this.p1, seg.p0)\n      const orient1 = Orientation.index(this.p0, this.p1, seg.p1)\n      if (orient0 >= 0 && orient1 >= 0) return Math.max(orient0, orient1)\n      if (orient0 <= 0 && orient1 <= 0) return Math.max(orient0, orient1)\n      return 0\n    } else if (arguments[0] instanceof Coordinate) {\n      const p = arguments[0]\n      return Orientation.index(this.p0, this.p1, p)\n    }\n  }\n  toGeometry(geomFactory) {\n    return geomFactory.createLineString([this.p0, this.p1])\n  }\n  isVertical() {\n    return this.p0.x === this.p1.x\n  }\n  equals(o) {\n    if (!(o instanceof LineSegment)) \n      return false\n    \n    const other = o\n    return this.p0.equals(other.p0) && this.p1.equals(other.p1)\n  }\n  intersection(line) {\n    const li = new RobustLineIntersector()\n    li.computeIntersection(this.p0, this.p1, line.p0, line.p1)\n    if (li.hasIntersection()) return li.getIntersection(0)\n    return null\n  }\n  project() {\n    if (arguments[0] instanceof Coordinate) {\n      const p = arguments[0]\n      if (p.equals(this.p0) || p.equals(this.p1)) return new Coordinate(p)\n      const r = this.projectionFactor(p)\n      const coord = new Coordinate()\n      coord.x = this.p0.x + r * (this.p1.x - this.p0.x)\n      coord.y = this.p0.y + r * (this.p1.y - this.p0.y)\n      return coord\n    } else if (arguments[0] instanceof LineSegment) {\n      const seg = arguments[0]\n      const pf0 = this.projectionFactor(seg.p0)\n      const pf1 = this.projectionFactor(seg.p1)\n      if (pf0 >= 1.0 && pf1 >= 1.0) return null\n      if (pf0 <= 0.0 && pf1 <= 0.0) return null\n      let newp0 = this.project(seg.p0)\n      if (pf0 < 0.0) newp0 = this.p0\n      if (pf0 > 1.0) newp0 = this.p1\n      let newp1 = this.project(seg.p1)\n      if (pf1 < 0.0) newp1 = this.p0\n      if (pf1 > 1.0) newp1 = this.p1\n      return new LineSegment(newp0, newp1)\n    }\n  }\n  normalize() {\n    if (this.p1.compareTo(this.p0) < 0) this.reverse()\n  }\n  angle() {\n    return Math.atan2(this.p1.y - this.p0.y, this.p1.x - this.p0.x)\n  }\n  getCoordinate(i) {\n    if (i === 0) return this.p0\n    return this.p1\n  }\n  distancePerpendicular(p) {\n    return Distance.pointToLinePerpendicular(p, this.p0, this.p1)\n  }\n  minY() {\n    return Math.min(this.p0.y, this.p1.y)\n  }\n  midPoint() {\n    return LineSegment.midPoint(this.p0, this.p1)\n  }\n  projectionFactor(p) {\n    if (p.equals(this.p0)) return 0.0\n    if (p.equals(this.p1)) return 1.0\n    const dx = this.p1.x - this.p0.x\n    const dy = this.p1.y - this.p0.y\n    const len = dx * dx + dy * dy\n    if (len <= 0.0) return Double.NaN\n    const r = ((p.x - this.p0.x) * dx + (p.y - this.p0.y) * dy) / len\n    return r\n  }\n  closestPoints(line) {\n    const intPt = this.intersection(line)\n    if (intPt !== null) \n      return [intPt, intPt]\n    \n    const closestPt = new Array(2).fill(null)\n    let minDistance = Double.MAX_VALUE\n    let dist = null\n    const close00 = this.closestPoint(line.p0)\n    minDistance = close00.distance(line.p0)\n    closestPt[0] = close00\n    closestPt[1] = line.p0\n    const close01 = this.closestPoint(line.p1)\n    dist = close01.distance(line.p1)\n    if (dist < minDistance) {\n      minDistance = dist\n      closestPt[0] = close01\n      closestPt[1] = line.p1\n    }\n    const close10 = line.closestPoint(this.p0)\n    dist = close10.distance(this.p0)\n    if (dist < minDistance) {\n      minDistance = dist\n      closestPt[0] = this.p0\n      closestPt[1] = close10\n    }\n    const close11 = line.closestPoint(this.p1)\n    dist = close11.distance(this.p1)\n    if (dist < minDistance) {\n      minDistance = dist\n      closestPt[0] = this.p1\n      closestPt[1] = close11\n    }\n    return closestPt\n  }\n  closestPoint(p) {\n    const factor = this.projectionFactor(p)\n    if (factor > 0 && factor < 1) \n      return this.project(p)\n    \n    const dist0 = this.p0.distance(p)\n    const dist1 = this.p1.distance(p)\n    if (dist0 < dist1) return this.p0\n    return this.p1\n  }\n  maxX() {\n    return Math.max(this.p0.x, this.p1.x)\n  }\n  getLength() {\n    return this.p0.distance(this.p1)\n  }\n  compareTo(o) {\n    const other = o\n    const comp0 = this.p0.compareTo(other.p0)\n    if (comp0 !== 0) return comp0\n    return this.p1.compareTo(other.p1)\n  }\n  reverse() {\n    const temp = this.p0\n    this.p0 = this.p1\n    this.p1 = temp\n  }\n  equalsTopo(other) {\n    return this.p0.equals(other.p0) && this.p1.equals(other.p1) || this.p0.equals(other.p1) && this.p1.equals(other.p0)\n  }\n  lineIntersection(line) {\n    const intPt = Intersection.intersection(this.p0, this.p1, line.p0, line.p1)\n    return intPt\n  }\n  maxY() {\n    return Math.max(this.p0.y, this.p1.y)\n  }\n  pointAlongOffset(segmentLengthFraction, offsetDistance) {\n    const segx = this.p0.x + segmentLengthFraction * (this.p1.x - this.p0.x)\n    const segy = this.p0.y + segmentLengthFraction * (this.p1.y - this.p0.y)\n    const dx = this.p1.x - this.p0.x\n    const dy = this.p1.y - this.p0.y\n    const len = Math.sqrt(dx * dx + dy * dy)\n    let ux = 0.0\n    let uy = 0.0\n    if (offsetDistance !== 0.0) {\n      if (len <= 0.0) throw new IllegalStateException('Cannot compute offset from zero-length line segment')\n      ux = offsetDistance * dx / len\n      uy = offsetDistance * dy / len\n    }\n    const offsetx = segx - uy\n    const offsety = segy + ux\n    const coord = new Coordinate(offsetx, offsety)\n    return coord\n  }\n  setCoordinates() {\n    if (arguments.length === 1) {\n      const ls = arguments[0]\n      this.setCoordinates(ls.p0, ls.p1)\n    } else if (arguments.length === 2) {\n      const p0 = arguments[0], p1 = arguments[1]\n      this.p0.x = p0.x\n      this.p0.y = p0.y\n      this.p1.x = p1.x\n      this.p1.y = p1.y\n    }\n  }\n  segmentFraction(inputPt) {\n    let segFrac = this.projectionFactor(inputPt)\n    if (segFrac < 0.0) segFrac = 0.0; else if (segFrac > 1.0 || Double.isNaN(segFrac)) segFrac = 1.0\n    return segFrac\n  }\n  toString() {\n    return 'LINESTRING( ' + this.p0.x + ' ' + this.p0.y + ', ' + this.p1.x + ' ' + this.p1.y + ')'\n  }\n  isHorizontal() {\n    return this.p0.y === this.p1.y\n  }\n  reflect(p) {\n    const A = this.p1.getY() - this.p0.getY()\n    const B = this.p0.getX() - this.p1.getX()\n    const C = this.p0.getY() * (this.p1.getX() - this.p0.getX()) - this.p0.getX() * (this.p1.getY() - this.p0.getY())\n    const A2plusB2 = A * A + B * B\n    const A2subB2 = A * A - B * B\n    const x = p.getX()\n    const y = p.getY()\n    const rx = (-A2subB2 * x - 2 * A * B * y - 2 * A * C) / A2plusB2\n    const ry = (A2subB2 * y - 2 * A * B * x - 2 * B * C) / A2plusB2\n    return new Coordinate(rx, ry)\n  }\n  distance() {\n    if (arguments[0] instanceof LineSegment) {\n      const ls = arguments[0]\n      return Distance.segmentToSegment(this.p0, this.p1, ls.p0, ls.p1)\n    } else if (arguments[0] instanceof Coordinate) {\n      const p = arguments[0]\n      return Distance.pointToSegment(p, this.p0, this.p1)\n    }\n  }\n  pointAlong(segmentLengthFraction) {\n    const coord = new Coordinate()\n    coord.x = this.p0.x + segmentLengthFraction * (this.p1.x - this.p0.x)\n    coord.y = this.p0.y + segmentLengthFraction * (this.p1.y - this.p0.y)\n    return coord\n  }\n  hashCode() {\n    let bits0 = Double.doubleToLongBits(this.p0.x)\n    bits0 ^= Double.doubleToLongBits(this.p0.y) * 31\n    const hash0 = Math.trunc(bits0) ^ Math.trunc(bits0 >> 32)\n    let bits1 = Double.doubleToLongBits(this.p1.x)\n    bits1 ^= Double.doubleToLongBits(this.p1.y) * 31\n    const hash1 = Math.trunc(bits1) ^ Math.trunc(bits1 >> 32)\n    return hash0 ^ hash1\n  }\n  get interfaces_() {\n    return [Comparable, Serializable]\n  }\n}\n", "import LineSegment from '../../geom/LineSegment'\nexport default class MonotoneChainOverlapAction {\n  constructor() {\n    MonotoneChainOverlapAction.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this._overlapSeg1 = new LineSegment()\n    this._overlapSeg2 = new LineSegment()\n  }\n  overlap() {\n    if (arguments.length === 2) {\n      const seg1 = arguments[0], seg2 = arguments[1]\n    } else if (arguments.length === 4) {\n      const mc1 = arguments[0], start1 = arguments[1], mc2 = arguments[2], start2 = arguments[3]\n      mc1.getLineSegment(start1, this._overlapSeg1)\n      mc2.getLineSegment(start2, this._overlapSeg2)\n      this.overlap(this._overlapSeg1, this._overlapSeg2)\n    }\n  }\n}\n", "import Envelope from '../../geom/Envelope'\nexport default class MonotoneChain {\n  constructor() {\n    MonotoneChain.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this._pts = null\n    this._start = null\n    this._end = null\n    this._env = null\n    this._context = null\n    this._id = null\n    const pts = arguments[0], start = arguments[1], end = arguments[2], context = arguments[3]\n    this._pts = pts\n    this._start = start\n    this._end = end\n    this._context = context\n  }\n  getLineSegment(index, ls) {\n    ls.p0 = this._pts[index]\n    ls.p1 = this._pts[index + 1]\n  }\n  computeSelect(searchEnv, start0, end0, mcs) {\n    const p0 = this._pts[start0]\n    const p1 = this._pts[end0]\n    if (end0 - start0 === 1) {\n      mcs.select(this, start0)\n      return null\n    }\n    if (!searchEnv.intersects(p0, p1)) return null\n    const mid = Math.trunc((start0 + end0) / 2)\n    if (start0 < mid) \n      this.computeSelect(searchEnv, start0, mid, mcs)\n    \n    if (mid < end0) \n      this.computeSelect(searchEnv, mid, end0, mcs)\n    \n  }\n  getCoordinates() {\n    const coord = new Array(this._end - this._start + 1).fill(null)\n    let index = 0\n    for (let i = this._start; i <= this._end; i++) \n      coord[index++] = this._pts[i]\n    \n    return coord\n  }\n  computeOverlaps() {\n    if (arguments.length === 2) {\n      const mc = arguments[0], mco = arguments[1]\n      this.computeOverlaps(this._start, this._end, mc, mc._start, mc._end, mco)\n    } else if (arguments.length === 6) {\n      const start0 = arguments[0], end0 = arguments[1], mc = arguments[2], start1 = arguments[3], end1 = arguments[4], mco = arguments[5]\n      if (end0 - start0 === 1 && end1 - start1 === 1) {\n        mco.overlap(this, start0, mc, start1)\n        return null\n      }\n      if (!this.overlaps(start0, end0, mc, start1, end1)) return null\n      const mid0 = Math.trunc((start0 + end0) / 2)\n      const mid1 = Math.trunc((start1 + end1) / 2)\n      if (start0 < mid0) {\n        if (start1 < mid1) this.computeOverlaps(start0, mid0, mc, start1, mid1, mco)\n        if (mid1 < end1) this.computeOverlaps(start0, mid0, mc, mid1, end1, mco)\n      }\n      if (mid0 < end0) {\n        if (start1 < mid1) this.computeOverlaps(mid0, end0, mc, start1, mid1, mco)\n        if (mid1 < end1) this.computeOverlaps(mid0, end0, mc, mid1, end1, mco)\n      }\n    }\n  }\n  setId(id) {\n    this._id = id\n  }\n  select(searchEnv, mcs) {\n    this.computeSelect(searchEnv, this._start, this._end, mcs)\n  }\n  getEnvelope() {\n    if (this._env === null) {\n      const p0 = this._pts[this._start]\n      const p1 = this._pts[this._end]\n      this._env = new Envelope(p0, p1)\n    }\n    return this._env\n  }\n  overlaps(start0, end0, mc, start1, end1) {\n    return Envelope.intersects(this._pts[start0], this._pts[end0], mc._pts[start1], mc._pts[end1])\n  }\n  getEndIndex() {\n    return this._end\n  }\n  getStartIndex() {\n    return this._start\n  }\n  getContext() {\n    return this._context\n  }\n  getId() {\n    return this._id\n  }\n}\n", "import MonotoneChain from './MonotoneChain'\nimport ArrayList from '../../../../../java/util/ArrayList'\nimport Quadrant from '../../geomgraph/Quadrant'\nexport default class MonotoneChainBuilder {\n  static findChainEnd(pts, start) {\n    let safeStart = start\n    while (safeStart < pts.length - 1 && pts[safeStart].equals2D(pts[safeStart + 1])) \n      safeStart++\n    \n    if (safeStart >= pts.length - 1) \n      return pts.length - 1\n    \n    const chainQuad = Quadrant.quadrant(pts[safeStart], pts[safeStart + 1])\n    let last = start + 1\n    while (last < pts.length) {\n      if (!pts[last - 1].equals2D(pts[last])) {\n        const quad = Quadrant.quadrant(pts[last - 1], pts[last])\n        if (quad !== chainQuad) break\n      }\n      last++\n    }\n    return last - 1\n  }\n  static getChains() {\n    if (arguments.length === 1) {\n      const pts = arguments[0]\n      return MonotoneChainBuilder.getChains(pts, null)\n    } else if (arguments.length === 2) {\n      const pts = arguments[0], context = arguments[1]\n      const mcList = new ArrayList()\n      let chainStart = 0\n      do {\n        const chainEnd = MonotoneChainBuilder.findChainEnd(pts, chainStart)\n        const mc = new MonotoneChain(pts, chainStart, chainEnd, context)\n        mcList.add(mc)\n        chainStart = chainEnd\n      } while (chainStart < pts.length - 1)\n      return mcList\n    }\n  }\n}\n", "export default class Noder {\n  computeNodes(segStrings) {}\n  getNodedSubstrings() {}\n}\n", "import Noder from './Noder'\nexport default class SinglePassNoder {\n  constructor() {\n    SinglePassNoder.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this._segInt = null\n    if (arguments.length === 0) {} else if (arguments.length === 1) {\n      const segInt = arguments[0]\n      this.setSegmentIntersector(segInt)\n    }\n  }\n  setSegmentIntersector(segInt) {\n    this._segInt = segInt\n  }\n  get interfaces_() {\n    return [Noder]\n  }\n}\n", "import STRtree from '../index/strtree/STRtree'\nimport NodedSegmentString from './NodedSegmentString'\nimport MonotoneChainOverlapAction from '../index/chain/MonotoneChainOverlapAction'\nimport MonotoneChainBuilder from '../index/chain/MonotoneChainBuilder'\nimport ArrayList from '../../../../java/util/ArrayList'\nimport SinglePassNoder from './SinglePassNoder'\nexport default class MCIndexNoder extends SinglePassNoder {\n  constructor() {\n    super()\n    MCIndexNoder.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this._monoChains = new ArrayList()\n    this._index = new STRtree()\n    this._idCounter = 0\n    this._nodedSegStrings = null\n    this._nOverlaps = 0\n    if (arguments.length === 0) {} else if (arguments.length === 1) {\n      const si = arguments[0]\n      SinglePassNoder.constructor_.call(this, si)\n    }\n  }\n  getMonotoneChains() {\n    return this._monoChains\n  }\n  getNodedSubstrings() {\n    return NodedSegmentString.getNodedSubstrings(this._nodedSegStrings)\n  }\n  getIndex() {\n    return this._index\n  }\n  add(segStr) {\n    const segChains = MonotoneChainBuilder.getChains(segStr.getCoordinates(), segStr)\n    for (let i = segChains.iterator(); i.hasNext(); ) {\n      const mc = i.next()\n      mc.setId(this._idCounter++)\n      this._index.insert(mc.getEnvelope(), mc)\n      this._monoChains.add(mc)\n    }\n  }\n  computeNodes(inputSegStrings) {\n    this._nodedSegStrings = inputSegStrings\n    for (let i = inputSegStrings.iterator(); i.hasNext(); ) \n      this.add(i.next())\n    \n    this.intersectChains()\n  }\n  intersectChains() {\n    const overlapAction = new SegmentOverlapAction(this._segInt)\n    for (let i = this._monoChains.iterator(); i.hasNext(); ) {\n      const queryChain = i.next()\n      const overlapChains = this._index.query(queryChain.getEnvelope())\n      for (let j = overlapChains.iterator(); j.hasNext(); ) {\n        const testChain = j.next()\n        if (testChain.getId() > queryChain.getId()) {\n          queryChain.computeOverlaps(testChain, overlapAction)\n          this._nOverlaps++\n        }\n        if (this._segInt.isDone()) return null\n      }\n    }\n  }\n}\nclass SegmentOverlapAction extends MonotoneChainOverlapAction {\n  constructor() {\n    super()\n    SegmentOverlapAction.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this._si = null\n    const si = arguments[0]\n    this._si = si\n  }\n  overlap() {\n    if (arguments.length === 4) {\n      const mc1 = arguments[0], start1 = arguments[1], mc2 = arguments[2], start2 = arguments[3]\n      const ss1 = mc1.getContext()\n      const ss2 = mc2.getContext()\n      this._si.processIntersections(ss1, start1, ss2, start2)\n    } else {\n      return super.overlap.apply(this, arguments)\n    }\n  }\n}\nMCIndexNoder.SegmentOverlapAction = SegmentOverlapAction\n", "import CoordinateList from '../../geom/CoordinateList'\nimport Orientation from '../../algorithm/Orientation'\nimport Distance from '../../algorithm/Distance'\nexport default class BufferInputLineSimplifier {\n  constructor() {\n    BufferInputLineSimplifier.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this._inputLine = null\n    this._distanceTol = null\n    this._isDeleted = null\n    this._angleOrientation = Orientation.COUNTERCLOCKWISE\n    const inputLine = arguments[0]\n    this._inputLine = inputLine\n  }\n  static simplify(inputLine, distanceTol) {\n    const simp = new BufferInputLineSimplifier(inputLine)\n    return simp.simplify(distanceTol)\n  }\n  isDeletable(i0, i1, i2, distanceTol) {\n    const p0 = this._inputLine[i0]\n    const p1 = this._inputLine[i1]\n    const p2 = this._inputLine[i2]\n    if (!this.isConcave(p0, p1, p2)) return false\n    if (!this.isShallow(p0, p1, p2, distanceTol)) return false\n    return this.isShallowSampled(p0, p1, i0, i2, distanceTol)\n  }\n  deleteShallowConcavities() {\n    let index = 1\n    let midIndex = this.findNextNonDeletedIndex(index)\n    let lastIndex = this.findNextNonDeletedIndex(midIndex)\n    let isChanged = false\n    while (lastIndex < this._inputLine.length) {\n      let isMiddleVertexDeleted = false\n      if (this.isDeletable(index, midIndex, lastIndex, this._distanceTol)) {\n        this._isDeleted[midIndex] = BufferInputLineSimplifier.DELETE\n        isMiddleVertexDeleted = true\n        isChanged = true\n      }\n      if (isMiddleVertexDeleted) index = lastIndex; else index = midIndex\n      midIndex = this.findNextNonDeletedIndex(index)\n      lastIndex = this.findNextNonDeletedIndex(midIndex)\n    }\n    return isChanged\n  }\n  isShallowConcavity(p0, p1, p2, distanceTol) {\n    const orientation = Orientation.index(p0, p1, p2)\n    const isAngleToSimplify = orientation === this._angleOrientation\n    if (!isAngleToSimplify) return false\n    const dist = Distance.pointToSegment(p1, p0, p2)\n    return dist < distanceTol\n  }\n  isShallowSampled(p0, p2, i0, i2, distanceTol) {\n    let inc = Math.trunc((i2 - i0) / BufferInputLineSimplifier.NUM_PTS_TO_CHECK)\n    if (inc <= 0) inc = 1\n    for (let i = i0; i < i2; i += inc) \n      if (!this.isShallow(p0, p2, this._inputLine[i], distanceTol)) return false\n    \n    return true\n  }\n  isConcave(p0, p1, p2) {\n    const orientation = Orientation.index(p0, p1, p2)\n    const isConcave = orientation === this._angleOrientation\n    return isConcave\n  }\n  simplify(distanceTol) {\n    this._distanceTol = Math.abs(distanceTol)\n    if (distanceTol < 0) this._angleOrientation = Orientation.CLOCKWISE\n    this._isDeleted = new Array(this._inputLine.length).fill(null)\n    let isChanged = false\n    do \n      isChanged = this.deleteShallowConcavities()\n    while (isChanged)\n    return this.collapseLine()\n  }\n  findNextNonDeletedIndex(index) {\n    let next = index + 1\n    while (next < this._inputLine.length && this._isDeleted[next] === BufferInputLineSimplifier.DELETE) next++\n    return next\n  }\n  isShallow(p0, p1, p2, distanceTol) {\n    const dist = Distance.pointToSegment(p1, p0, p2)\n    return dist < distanceTol\n  }\n  collapseLine() {\n    const coordList = new CoordinateList()\n    for (let i = 0; i < this._inputLine.length; i++) \n      if (this._isDeleted[i] !== BufferInputLineSimplifier.DELETE) coordList.add(this._inputLine[i])\n    \n    return coordList.toCoordinateArray()\n  }\n}\nBufferInputLineSimplifier.INIT = 0\nBufferInputLineSimplifier.DELETE = 1\nBufferInputLineSimplifier.KEEP = 1\nBufferInputLineSimplifier.NUM_PTS_TO_CHECK = 10\n", "import GeometryFactory from '../../geom/GeometryFactory'\nimport Coordinate from '../../geom/Coordinate'\nimport ArrayList from '../../../../../java/util/ArrayList'\nexport default class OffsetSegmentString {\n  constructor() {\n    OffsetSegmentString.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this._ptList = null\n    this._precisionModel = null\n    this._minimimVertexDistance = 0.0\n    this._ptList = new ArrayList()\n  }\n  getCoordinates() {\n    const coord = this._ptList.toArray(OffsetSegmentString.COORDINATE_ARRAY_TYPE)\n    return coord\n  }\n  setPrecisionModel(precisionModel) {\n    this._precisionModel = precisionModel\n  }\n  addPt(pt) {\n    const bufPt = new Coordinate(pt)\n    this._precisionModel.makePrecise(bufPt)\n    if (this.isRedundant(bufPt)) return null\n    this._ptList.add(bufPt)\n  }\n  reverse() {}\n  addPts(pt, isForward) {\n    if (isForward) \n      for (let i = 0; i < pt.length; i++) \n        this.addPt(pt[i])\n      \n    else \n      for (let i = pt.length - 1; i >= 0; i--) \n        this.addPt(pt[i])\n      \n    \n  }\n  isRedundant(pt) {\n    if (this._ptList.size() < 1) return false\n    const lastPt = this._ptList.get(this._ptList.size() - 1)\n    const ptDist = pt.distance(lastPt)\n    if (ptDist < this._minimimVertexDistance) return true\n    return false\n  }\n  toString() {\n    const fact = new GeometryFactory()\n    const line = fact.createLineString(this.getCoordinates())\n    return line.toString()\n  }\n  closeRing() {\n    if (this._ptList.size() < 1) return null\n    const startPt = new Coordinate(this._ptList.get(0))\n    const lastPt = this._ptList.get(this._ptList.size() - 1)\n    if (startPt.equals(lastPt)) return null\n    this._ptList.add(startPt)\n  }\n  setMinimumVertexDistance(minimimVertexDistance) {\n    this._minimimVertexDistance = minimimVertexDistance\n  }\n}\nOffsetSegmentString.COORDINATE_ARRAY_TYPE = new Array(0).fill(null)\n", "import Orientation from './Orientation'\nexport default class Angle {\n  static toDegrees(radians) {\n    return radians * 180 / Math.PI\n  }\n  static normalize(angle) {\n    while (angle > Math.PI) angle -= Angle.PI_TIMES_2\n    while (angle <= -Math.PI) angle += Angle.PI_TIMES_2\n    return angle\n  }\n  static angle() {\n    if (arguments.length === 1) {\n      const p = arguments[0]\n      return Math.atan2(p.y, p.x)\n    } else if (arguments.length === 2) {\n      const p0 = arguments[0], p1 = arguments[1]\n      const dx = p1.x - p0.x\n      const dy = p1.y - p0.y\n      return Math.atan2(dy, dx)\n    }\n  }\n  static isAcute(p0, p1, p2) {\n    const dx0 = p0.x - p1.x\n    const dy0 = p0.y - p1.y\n    const dx1 = p2.x - p1.x\n    const dy1 = p2.y - p1.y\n    const dotprod = dx0 * dx1 + dy0 * dy1\n    return dotprod > 0\n  }\n  static isObtuse(p0, p1, p2) {\n    const dx0 = p0.x - p1.x\n    const dy0 = p0.y - p1.y\n    const dx1 = p2.x - p1.x\n    const dy1 = p2.y - p1.y\n    const dotprod = dx0 * dx1 + dy0 * dy1\n    return dotprod < 0\n  }\n  static interiorAngle(p0, p1, p2) {\n    const anglePrev = Angle.angle(p1, p0)\n    const angleNext = Angle.angle(p1, p2)\n    return Math.abs(angleNext - anglePrev)\n  }\n  static normalizePositive(angle) {\n    if (angle < 0.0) {\n      while (angle < 0.0) angle += Angle.PI_TIMES_2\n      if (angle >= Angle.PI_TIMES_2) angle = 0.0\n    } else {\n      while (angle >= Angle.PI_TIMES_2) angle -= Angle.PI_TIMES_2\n      if (angle < 0.0) angle = 0.0\n    }\n    return angle\n  }\n  static angleBetween(tip1, tail, tip2) {\n    const a1 = Angle.angle(tail, tip1)\n    const a2 = Angle.angle(tail, tip2)\n    return Angle.diff(a1, a2)\n  }\n  static diff(ang1, ang2) {\n    let delAngle = null\n    if (ang1 < ang2) \n      delAngle = ang2 - ang1\n    else \n      delAngle = ang1 - ang2\n    \n    if (delAngle > Math.PI) \n      delAngle = 2 * Math.PI - delAngle\n    \n    return delAngle\n  }\n  static toRadians(angleDegrees) {\n    return angleDegrees * Math.PI / 180.0\n  }\n  static getTurn(ang1, ang2) {\n    const crossproduct = Math.sin(ang2 - ang1)\n    if (crossproduct > 0) \n      return Angle.COUNTERCLOCKWISE\n    \n    if (crossproduct < 0) \n      return Angle.CLOCKWISE\n    \n    return Angle.NONE\n  }\n  static angleBetweenOriented(tip1, tail, tip2) {\n    const a1 = Angle.angle(tail, tip1)\n    const a2 = Angle.angle(tail, tip2)\n    const angDel = a2 - a1\n    if (angDel <= -Math.PI) return angDel + Angle.PI_TIMES_2\n    if (angDel > Math.PI) return angDel - Angle.PI_TIMES_2\n    return angDel\n  }\n}\nAngle.PI_TIMES_2 = 2.0 * Math.PI\nAngle.PI_OVER_2 = Math.PI / 2.0\nAngle.PI_OVER_4 = Math.PI / 4.0\nAngle.COUNTERCLOCKWISE = Orientation.COUNTERCLOCKWISE\nAngle.CLOCKWISE = Orientation.CLOCKWISE\nAngle.NONE = Orientation.COLLINEAR\n", "import BufferParameters from './BufferParameters'\nimport Position from '../../geomgraph/Position'\nimport Coordinate from '../../geom/Coordinate'\nimport Orientation from '../../algorithm/Orientation'\nimport Intersection from '../../algorithm/Intersection'\nimport OffsetSegmentString from './OffsetSegmentString'\nimport LineSegment from '../../geom/LineSegment'\nimport Angle from '../../algorithm/Angle'\nimport RobustLineIntersector from '../../algorithm/RobustLineIntersector'\nexport default class OffsetSegmentGenerator {\n  constructor() {\n    OffsetSegmentGenerator.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this._maxCurveSegmentError = 0.0\n    this._filletAngleQuantum = null\n    this._closingSegLengthFactor = 1\n    this._segList = null\n    this._distance = 0.0\n    this._precisionModel = null\n    this._bufParams = null\n    this._li = null\n    this._s0 = null\n    this._s1 = null\n    this._s2 = null\n    this._seg0 = new LineSegment()\n    this._seg1 = new LineSegment()\n    this._offset0 = new LineSegment()\n    this._offset1 = new LineSegment()\n    this._side = 0\n    this._hasNarrowConcaveAngle = false\n    const precisionModel = arguments[0], bufParams = arguments[1], distance = arguments[2]\n    this._precisionModel = precisionModel\n    this._bufParams = bufParams\n    this._li = new RobustLineIntersector()\n    this._filletAngleQuantum = Math.PI / 2.0 / bufParams.getQuadrantSegments()\n    if (bufParams.getQuadrantSegments() >= 8 && bufParams.getJoinStyle() === BufferParameters.JOIN_ROUND) this._closingSegLengthFactor = OffsetSegmentGenerator.MAX_CLOSING_SEG_LEN_FACTOR\n    this.init(distance)\n  }\n  addNextSegment(p, addStartPoint) {\n    this._s0 = this._s1\n    this._s1 = this._s2\n    this._s2 = p\n    this._seg0.setCoordinates(this._s0, this._s1)\n    this.computeOffsetSegment(this._seg0, this._side, this._distance, this._offset0)\n    this._seg1.setCoordinates(this._s1, this._s2)\n    this.computeOffsetSegment(this._seg1, this._side, this._distance, this._offset1)\n    if (this._s1.equals(this._s2)) return null\n    const orientation = Orientation.index(this._s0, this._s1, this._s2)\n    const outsideTurn = orientation === Orientation.CLOCKWISE && this._side === Position.LEFT || orientation === Orientation.COUNTERCLOCKWISE && this._side === Position.RIGHT\n    if (orientation === 0) \n      this.addCollinear(addStartPoint)\n    else if (outsideTurn) \n      this.addOutsideTurn(orientation, addStartPoint)\n    else \n      this.addInsideTurn(orientation, addStartPoint)\n    \n  }\n  addLineEndCap(p0, p1) {\n    const seg = new LineSegment(p0, p1)\n    const offsetL = new LineSegment()\n    this.computeOffsetSegment(seg, Position.LEFT, this._distance, offsetL)\n    const offsetR = new LineSegment()\n    this.computeOffsetSegment(seg, Position.RIGHT, this._distance, offsetR)\n    const dx = p1.x - p0.x\n    const dy = p1.y - p0.y\n    const angle = Math.atan2(dy, dx)\n    switch (this._bufParams.getEndCapStyle()) {\n    case BufferParameters.CAP_ROUND:\n      this._segList.addPt(offsetL.p1)\n      this.addDirectedFillet(p1, angle + Math.PI / 2, angle - Math.PI / 2, Orientation.CLOCKWISE, this._distance)\n      this._segList.addPt(offsetR.p1)\n      break\n    case BufferParameters.CAP_FLAT:\n      this._segList.addPt(offsetL.p1)\n      this._segList.addPt(offsetR.p1)\n      break\n    case BufferParameters.CAP_SQUARE:\n      const squareCapSideOffset = new Coordinate()\n      squareCapSideOffset.x = Math.abs(this._distance) * Math.cos(angle)\n      squareCapSideOffset.y = Math.abs(this._distance) * Math.sin(angle)\n      const squareCapLOffset = new Coordinate(offsetL.p1.x + squareCapSideOffset.x, offsetL.p1.y + squareCapSideOffset.y)\n      const squareCapROffset = new Coordinate(offsetR.p1.x + squareCapSideOffset.x, offsetR.p1.y + squareCapSideOffset.y)\n      this._segList.addPt(squareCapLOffset)\n      this._segList.addPt(squareCapROffset)\n      break\n    }\n  }\n  getCoordinates() {\n    const pts = this._segList.getCoordinates()\n    return pts\n  }\n  addMitreJoin(p, offset0, offset1, distance) {\n    const intPt = Intersection.intersection(offset0.p0, offset0.p1, offset1.p0, offset1.p1)\n    if (intPt !== null) {\n      const mitreRatio = distance <= 0.0 ? 1.0 : intPt.distance(p) / Math.abs(distance)\n      if (mitreRatio <= this._bufParams.getMitreLimit()) {\n        this._segList.addPt(intPt)\n        return null\n      }\n    }\n    this.addLimitedMitreJoin(offset0, offset1, distance, this._bufParams.getMitreLimit())\n  }\n  addOutsideTurn(orientation, addStartPoint) {\n    if (this._offset0.p1.distance(this._offset1.p0) < this._distance * OffsetSegmentGenerator.OFFSET_SEGMENT_SEPARATION_FACTOR) {\n      this._segList.addPt(this._offset0.p1)\n      return null\n    }\n    if (this._bufParams.getJoinStyle() === BufferParameters.JOIN_MITRE) {\n      this.addMitreJoin(this._s1, this._offset0, this._offset1, this._distance)\n    } else if (this._bufParams.getJoinStyle() === BufferParameters.JOIN_BEVEL) {\n      this.addBevelJoin(this._offset0, this._offset1)\n    } else {\n      if (addStartPoint) this._segList.addPt(this._offset0.p1)\n      this.addCornerFillet(this._s1, this._offset0.p1, this._offset1.p0, orientation, this._distance)\n      this._segList.addPt(this._offset1.p0)\n    }\n  }\n  createSquare(p) {\n    this._segList.addPt(new Coordinate(p.x + this._distance, p.y + this._distance))\n    this._segList.addPt(new Coordinate(p.x + this._distance, p.y - this._distance))\n    this._segList.addPt(new Coordinate(p.x - this._distance, p.y - this._distance))\n    this._segList.addPt(new Coordinate(p.x - this._distance, p.y + this._distance))\n    this._segList.closeRing()\n  }\n  addSegments(pt, isForward) {\n    this._segList.addPts(pt, isForward)\n  }\n  addFirstSegment() {\n    this._segList.addPt(this._offset1.p0)\n  }\n  addCornerFillet(p, p0, p1, direction, radius) {\n    const dx0 = p0.x - p.x\n    const dy0 = p0.y - p.y\n    let startAngle = Math.atan2(dy0, dx0)\n    const dx1 = p1.x - p.x\n    const dy1 = p1.y - p.y\n    const endAngle = Math.atan2(dy1, dx1)\n    if (direction === Orientation.CLOCKWISE) {\n      if (startAngle <= endAngle) startAngle += 2.0 * Math.PI\n    } else {\n      if (startAngle >= endAngle) startAngle -= 2.0 * Math.PI\n    }\n    this._segList.addPt(p0)\n    this.addDirectedFillet(p, startAngle, endAngle, direction, radius)\n    this._segList.addPt(p1)\n  }\n  addLastSegment() {\n    this._segList.addPt(this._offset1.p1)\n  }\n  initSideSegments(s1, s2, side) {\n    this._s1 = s1\n    this._s2 = s2\n    this._side = side\n    this._seg1.setCoordinates(s1, s2)\n    this.computeOffsetSegment(this._seg1, side, this._distance, this._offset1)\n  }\n  addLimitedMitreJoin(offset0, offset1, distance, mitreLimit) {\n    const basePt = this._seg0.p1\n    const ang0 = Angle.angle(basePt, this._seg0.p0)\n    const angDiff = Angle.angleBetweenOriented(this._seg0.p0, basePt, this._seg1.p1)\n    const angDiffHalf = angDiff / 2\n    const midAng = Angle.normalize(ang0 + angDiffHalf)\n    const mitreMidAng = Angle.normalize(midAng + Math.PI)\n    const mitreDist = mitreLimit * distance\n    const bevelDelta = mitreDist * Math.abs(Math.sin(angDiffHalf))\n    const bevelHalfLen = distance - bevelDelta\n    const bevelMidX = basePt.x + mitreDist * Math.cos(mitreMidAng)\n    const bevelMidY = basePt.y + mitreDist * Math.sin(mitreMidAng)\n    const bevelMidPt = new Coordinate(bevelMidX, bevelMidY)\n    const mitreMidLine = new LineSegment(basePt, bevelMidPt)\n    const bevelEndLeft = mitreMidLine.pointAlongOffset(1.0, bevelHalfLen)\n    const bevelEndRight = mitreMidLine.pointAlongOffset(1.0, -bevelHalfLen)\n    if (this._side === Position.LEFT) {\n      this._segList.addPt(bevelEndLeft)\n      this._segList.addPt(bevelEndRight)\n    } else {\n      this._segList.addPt(bevelEndRight)\n      this._segList.addPt(bevelEndLeft)\n    }\n  }\n  addDirectedFillet(p, startAngle, endAngle, direction, radius) {\n    const directionFactor = direction === Orientation.CLOCKWISE ? -1 : 1\n    const totalAngle = Math.abs(startAngle - endAngle)\n    const nSegs = Math.trunc(totalAngle / this._filletAngleQuantum + 0.5)\n    if (nSegs < 1) return null\n    const angleInc = totalAngle / nSegs\n    const pt = new Coordinate()\n    for (let i = 0; i < nSegs; i++) {\n      const angle = startAngle + directionFactor * i * angleInc\n      pt.x = p.x + radius * Math.cos(angle)\n      pt.y = p.y + radius * Math.sin(angle)\n      this._segList.addPt(pt)\n    }\n  }\n  computeOffsetSegment(seg, side, distance, offset) {\n    const sideSign = side === Position.LEFT ? 1 : -1\n    const dx = seg.p1.x - seg.p0.x\n    const dy = seg.p1.y - seg.p0.y\n    const len = Math.sqrt(dx * dx + dy * dy)\n    const ux = sideSign * distance * dx / len\n    const uy = sideSign * distance * dy / len\n    offset.p0.x = seg.p0.x - uy\n    offset.p0.y = seg.p0.y + ux\n    offset.p1.x = seg.p1.x - uy\n    offset.p1.y = seg.p1.y + ux\n  }\n  addInsideTurn(orientation, addStartPoint) {\n    this._li.computeIntersection(this._offset0.p0, this._offset0.p1, this._offset1.p0, this._offset1.p1)\n    if (this._li.hasIntersection()) {\n      this._segList.addPt(this._li.getIntersection(0))\n    } else {\n      this._hasNarrowConcaveAngle = true\n      if (this._offset0.p1.distance(this._offset1.p0) < this._distance * OffsetSegmentGenerator.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR) {\n        this._segList.addPt(this._offset0.p1)\n      } else {\n        this._segList.addPt(this._offset0.p1)\n        if (this._closingSegLengthFactor > 0) {\n          const mid0 = new Coordinate((this._closingSegLengthFactor * this._offset0.p1.x + this._s1.x) / (this._closingSegLengthFactor + 1), (this._closingSegLengthFactor * this._offset0.p1.y + this._s1.y) / (this._closingSegLengthFactor + 1))\n          this._segList.addPt(mid0)\n          const mid1 = new Coordinate((this._closingSegLengthFactor * this._offset1.p0.x + this._s1.x) / (this._closingSegLengthFactor + 1), (this._closingSegLengthFactor * this._offset1.p0.y + this._s1.y) / (this._closingSegLengthFactor + 1))\n          this._segList.addPt(mid1)\n        } else {\n          this._segList.addPt(this._s1)\n        }\n        this._segList.addPt(this._offset1.p0)\n      }\n    }\n  }\n  createCircle(p) {\n    const pt = new Coordinate(p.x + this._distance, p.y)\n    this._segList.addPt(pt)\n    this.addDirectedFillet(p, 0.0, 2.0 * Math.PI, -1, this._distance)\n    this._segList.closeRing()\n  }\n  addBevelJoin(offset0, offset1) {\n    this._segList.addPt(offset0.p1)\n    this._segList.addPt(offset1.p0)\n  }\n  init(distance) {\n    this._distance = distance\n    this._maxCurveSegmentError = distance * (1 - Math.cos(this._filletAngleQuantum / 2.0))\n    this._segList = new OffsetSegmentString()\n    this._segList.setPrecisionModel(this._precisionModel)\n    this._segList.setMinimumVertexDistance(distance * OffsetSegmentGenerator.CURVE_VERTEX_SNAP_DISTANCE_FACTOR)\n  }\n  addCollinear(addStartPoint) {\n    this._li.computeIntersection(this._s0, this._s1, this._s1, this._s2)\n    const numInt = this._li.getIntersectionNum()\n    if (numInt >= 2) \n      if (this._bufParams.getJoinStyle() === BufferParameters.JOIN_BEVEL || this._bufParams.getJoinStyle() === BufferParameters.JOIN_MITRE) {\n        if (addStartPoint) this._segList.addPt(this._offset0.p1)\n        this._segList.addPt(this._offset1.p0)\n      } else {\n        this.addCornerFillet(this._s1, this._offset0.p1, this._offset1.p0, Orientation.CLOCKWISE, this._distance)\n      }\n    \n  }\n  closeRing() {\n    this._segList.closeRing()\n  }\n  hasNarrowConcaveAngle() {\n    return this._hasNarrowConcaveAngle\n  }\n}\nOffsetSegmentGenerator.OFFSET_SEGMENT_SEPARATION_FACTOR = 1.0E-3\nOffsetSegmentGenerator.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR = 1.0E-3\nOffsetSegmentGenerator.CURVE_VERTEX_SNAP_DISTANCE_FACTOR = 1.0E-6\nOffsetSegmentGenerator.MAX_CLOSING_SEG_LEN_FACTOR = 80\n", "import BufferParameters from './BufferParameters'\nimport Position from '../../geomgraph/Position'\nimport Coordinate from '../../geom/Coordinate'\nimport BufferInputLineSimplifier from './BufferInputLineSimplifier'\nimport CoordinateArrays from '../../geom/CoordinateArrays'\nimport OffsetSegmentGenerator from './OffsetSegmentGenerator'\nexport default class OffsetCurveBuilder {\n  constructor() {\n    OffsetCurveBuilder.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this._distance = 0.0\n    this._precisionModel = null\n    this._bufParams = null\n    const precisionModel = arguments[0], bufParams = arguments[1]\n    this._precisionModel = precisionModel\n    this._bufParams = bufParams\n  }\n  static copyCoordinates(pts) {\n    const copy = new Array(pts.length).fill(null)\n    for (let i = 0; i < copy.length; i++) \n      copy[i] = new Coordinate(pts[i])\n    \n    return copy\n  }\n  getOffsetCurve(inputPts, distance) {\n    this._distance = distance\n    if (distance === 0.0) return null\n    const isRightSide = distance < 0.0\n    const posDistance = Math.abs(distance)\n    const segGen = this.getSegGen(posDistance)\n    if (inputPts.length <= 1) \n      this.computePointCurve(inputPts[0], segGen)\n    else \n      this.computeOffsetCurve(inputPts, isRightSide, segGen)\n    \n    const curvePts = segGen.getCoordinates()\n    if (isRightSide) CoordinateArrays.reverse(curvePts)\n    return curvePts\n  }\n  computeSingleSidedBufferCurve(inputPts, isRightSide, segGen) {\n    const distTol = this.simplifyTolerance(this._distance)\n    if (isRightSide) {\n      segGen.addSegments(inputPts, true)\n      const simp2 = BufferInputLineSimplifier.simplify(inputPts, -distTol)\n      const n2 = simp2.length - 1\n      segGen.initSideSegments(simp2[n2], simp2[n2 - 1], Position.LEFT)\n      segGen.addFirstSegment()\n      for (let i = n2 - 2; i >= 0; i--) \n        segGen.addNextSegment(simp2[i], true)\n      \n    } else {\n      segGen.addSegments(inputPts, false)\n      const simp1 = BufferInputLineSimplifier.simplify(inputPts, distTol)\n      const n1 = simp1.length - 1\n      segGen.initSideSegments(simp1[0], simp1[1], Position.LEFT)\n      segGen.addFirstSegment()\n      for (let i = 2; i <= n1; i++) \n        segGen.addNextSegment(simp1[i], true)\n      \n    }\n    segGen.addLastSegment()\n    segGen.closeRing()\n  }\n  computeRingBufferCurve(inputPts, side, segGen) {\n    let distTol = this.simplifyTolerance(this._distance)\n    if (side === Position.RIGHT) distTol = -distTol\n    const simp = BufferInputLineSimplifier.simplify(inputPts, distTol)\n    const n = simp.length - 1\n    segGen.initSideSegments(simp[n - 1], simp[0], side)\n    for (let i = 1; i <= n; i++) {\n      const addStartPoint = i !== 1\n      segGen.addNextSegment(simp[i], addStartPoint)\n    }\n    segGen.closeRing()\n  }\n  computeLineBufferCurve(inputPts, segGen) {\n    const distTol = this.simplifyTolerance(this._distance)\n    const simp1 = BufferInputLineSimplifier.simplify(inputPts, distTol)\n    const n1 = simp1.length - 1\n    segGen.initSideSegments(simp1[0], simp1[1], Position.LEFT)\n    for (let i = 2; i <= n1; i++) \n      segGen.addNextSegment(simp1[i], true)\n    \n    segGen.addLastSegment()\n    segGen.addLineEndCap(simp1[n1 - 1], simp1[n1])\n    const simp2 = BufferInputLineSimplifier.simplify(inputPts, -distTol)\n    const n2 = simp2.length - 1\n    segGen.initSideSegments(simp2[n2], simp2[n2 - 1], Position.LEFT)\n    for (let i = n2 - 2; i >= 0; i--) \n      segGen.addNextSegment(simp2[i], true)\n    \n    segGen.addLastSegment()\n    segGen.addLineEndCap(simp2[1], simp2[0])\n    segGen.closeRing()\n  }\n  computePointCurve(pt, segGen) {\n    switch (this._bufParams.getEndCapStyle()) {\n    case BufferParameters.CAP_ROUND:\n      segGen.createCircle(pt)\n      break\n    case BufferParameters.CAP_SQUARE:\n      segGen.createSquare(pt)\n      break\n    }\n  }\n  getLineCurve(inputPts, distance) {\n    this._distance = distance\n    if (this.isLineOffsetEmpty(distance)) return null\n    const posDistance = Math.abs(distance)\n    const segGen = this.getSegGen(posDistance)\n    if (inputPts.length <= 1) {\n      this.computePointCurve(inputPts[0], segGen)\n    } else \n    if (this._bufParams.isSingleSided()) {\n      const isRightSide = distance < 0.0\n      this.computeSingleSidedBufferCurve(inputPts, isRightSide, segGen)\n    } else {\n      this.computeLineBufferCurve(inputPts, segGen)\n    }\n    \n    const lineCoord = segGen.getCoordinates()\n    return lineCoord\n  }\n  getBufferParameters() {\n    return this._bufParams\n  }\n  simplifyTolerance(bufDistance) {\n    return bufDistance * this._bufParams.getSimplifyFactor()\n  }\n  getRingCurve(inputPts, side, distance) {\n    this._distance = distance\n    if (inputPts.length <= 2) return this.getLineCurve(inputPts, distance)\n    if (distance === 0.0) \n      return OffsetCurveBuilder.copyCoordinates(inputPts)\n    \n    const segGen = this.getSegGen(distance)\n    this.computeRingBufferCurve(inputPts, side, segGen)\n    return segGen.getCoordinates()\n  }\n  computeOffsetCurve(inputPts, isRightSide, segGen) {\n    const distTol = this.simplifyTolerance(this._distance)\n    if (isRightSide) {\n      const simp2 = BufferInputLineSimplifier.simplify(inputPts, -distTol)\n      const n2 = simp2.length - 1\n      segGen.initSideSegments(simp2[n2], simp2[n2 - 1], Position.LEFT)\n      segGen.addFirstSegment()\n      for (let i = n2 - 2; i >= 0; i--) \n        segGen.addNextSegment(simp2[i], true)\n      \n    } else {\n      const simp1 = BufferInputLineSimplifier.simplify(inputPts, distTol)\n      const n1 = simp1.length - 1\n      segGen.initSideSegments(simp1[0], simp1[1], Position.LEFT)\n      segGen.addFirstSegment()\n      for (let i = 2; i <= n1; i++) \n        segGen.addNextSegment(simp1[i], true)\n      \n    }\n    segGen.addLastSegment()\n  }\n  isLineOffsetEmpty(distance) {\n    if (distance === 0.0) return true\n    if (distance < 0.0 && !this._bufParams.isSingleSided()) return true\n    return false\n  }\n  getSegGen(distance) {\n    return new OffsetSegmentGenerator(this._precisionModel, this._bufParams, distance)\n  }\n}\n", "import hasInterface from '../../../../../hasInterface'\nimport Position from '../../geomgraph/Position'\nimport Coordinate from '../../geom/Coordinate'\nimport Orientation from '../../algorithm/Orientation'\nimport Collections from '../../../../../java/util/Collections'\nimport DirectedEdge from '../../geomgraph/DirectedEdge'\nimport LineSegment from '../../geom/LineSegment'\nimport Comparable from '../../../../../java/lang/Comparable'\nimport ArrayList from '../../../../../java/util/ArrayList'\nimport List from '../../../../../java/util/List'\nexport default class SubgraphDepthLocater {\n  constructor() {\n    SubgraphDepthLocater.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this._subgraphs = null\n    this._seg = new LineSegment()\n    const subgraphs = arguments[0]\n    this._subgraphs = subgraphs\n  }\n  findStabbedSegments() {\n    if (arguments.length === 1) {\n      const stabbingRayLeftPt = arguments[0]\n      const stabbedSegments = new ArrayList()\n      for (let i = this._subgraphs.iterator(); i.hasNext(); ) {\n        const bsg = i.next()\n        const env = bsg.getEnvelope()\n        if (stabbingRayLeftPt.y < env.getMinY() || stabbingRayLeftPt.y > env.getMaxY()) continue\n        this.findStabbedSegments(stabbingRayLeftPt, bsg.getDirectedEdges(), stabbedSegments)\n      }\n      return stabbedSegments\n    } else if (arguments.length === 3) {\n      if (hasInterface(arguments[2], List) && (arguments[0] instanceof Coordinate && arguments[1] instanceof DirectedEdge)) {\n        const stabbingRayLeftPt = arguments[0], dirEdge = arguments[1], stabbedSegments = arguments[2]\n        const pts = dirEdge.getEdge().getCoordinates()\n        for (let i = 0; i < pts.length - 1; i++) {\n          this._seg.p0 = pts[i]\n          this._seg.p1 = pts[i + 1]\n          if (this._seg.p0.y > this._seg.p1.y) this._seg.reverse()\n          const maxx = Math.max(this._seg.p0.x, this._seg.p1.x)\n          if (maxx < stabbingRayLeftPt.x) continue\n          if (this._seg.isHorizontal()) continue\n          if (stabbingRayLeftPt.y < this._seg.p0.y || stabbingRayLeftPt.y > this._seg.p1.y) continue\n          if (Orientation.index(this._seg.p0, this._seg.p1, stabbingRayLeftPt) === Orientation.RIGHT) continue\n          let depth = dirEdge.getDepth(Position.LEFT)\n          if (!this._seg.p0.equals(pts[i])) depth = dirEdge.getDepth(Position.RIGHT)\n          const ds = new DepthSegment(this._seg, depth)\n          stabbedSegments.add(ds)\n        }\n      } else if (hasInterface(arguments[2], List) && (arguments[0] instanceof Coordinate && hasInterface(arguments[1], List))) {\n        const stabbingRayLeftPt = arguments[0], dirEdges = arguments[1], stabbedSegments = arguments[2]\n        for (let i = dirEdges.iterator(); i.hasNext(); ) {\n          const de = i.next()\n          if (!de.isForward()) continue\n          this.findStabbedSegments(stabbingRayLeftPt, de, stabbedSegments)\n        }\n      }\n    }\n  }\n  getDepth(p) {\n    const stabbedSegments = this.findStabbedSegments(p)\n    if (stabbedSegments.size() === 0) return 0\n    const ds = Collections.min(stabbedSegments)\n    return ds._leftDepth\n  }\n}\nclass DepthSegment {\n  constructor() {\n    DepthSegment.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this._upwardSeg = null\n    this._leftDepth = null\n    const seg = arguments[0], depth = arguments[1]\n    this._upwardSeg = new LineSegment(seg)\n    this._leftDepth = depth\n  }\n  compareTo(obj) {\n    const other = obj\n    if (this._upwardSeg.minX() >= other._upwardSeg.maxX()) return 1\n    if (this._upwardSeg.maxX() <= other._upwardSeg.minX()) return -1\n    let orientIndex = this._upwardSeg.orientationIndex(other._upwardSeg)\n    if (orientIndex !== 0) return orientIndex\n    orientIndex = -1 * other._upwardSeg.orientationIndex(this._upwardSeg)\n    if (orientIndex !== 0) return orientIndex\n    return this._upwardSeg.compareTo(other._upwardSeg)\n  }\n  compareX(seg0, seg1) {\n    const compare0 = seg0.p0.compareTo(seg1.p0)\n    if (compare0 !== 0) return compare0\n    return seg0.p1.compareTo(seg1.p1)\n  }\n  toString() {\n    return this._upwardSeg.toString()\n  }\n  get interfaces_() {\n    return [Comparable]\n  }\n}\nSubgraphDepthLocater.DepthSegment = DepthSegment\n", "import Exception from '../../../../java/lang/Exception'\nexport default class NotRepresentableException extends Exception {\n  constructor() {\n    super()\n    NotRepresentableException.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    Exception.constructor_.call(this, 'Projective point not representable on the Cartesian plane.')\n  }\n}\n", "import NotRepresentableException from './NotRepresentableException'\nimport Coordinate from '../geom/Coordinate'\nimport Double from '../../../../java/lang/Double'\nexport default class HCoordinate {\n  constructor() {\n    HCoordinate.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this.x = null\n    this.y = null\n    this.w = null\n    if (arguments.length === 0) {\n      this.x = 0.0\n      this.y = 0.0\n      this.w = 1.0\n    } else if (arguments.length === 1) {\n      const p = arguments[0]\n      this.x = p.x\n      this.y = p.y\n      this.w = 1.0\n    } else if (arguments.length === 2) {\n      if (typeof arguments[0] === 'number' && typeof arguments[1] === 'number') {\n        const _x = arguments[0], _y = arguments[1]\n        this.x = _x\n        this.y = _y\n        this.w = 1.0\n      } else if (arguments[0] instanceof HCoordinate && arguments[1] instanceof HCoordinate) {\n        const p1 = arguments[0], p2 = arguments[1]\n        this.x = p1.y * p2.w - p2.y * p1.w\n        this.y = p2.x * p1.w - p1.x * p2.w\n        this.w = p1.x * p2.y - p2.x * p1.y\n      } else if (arguments[0] instanceof Coordinate && arguments[1] instanceof Coordinate) {\n        const p1 = arguments[0], p2 = arguments[1]\n        this.x = p1.y - p2.y\n        this.y = p2.x - p1.x\n        this.w = p1.x * p2.y - p2.x * p1.y\n      }\n    } else if (arguments.length === 3) {\n      const _x = arguments[0], _y = arguments[1], _w = arguments[2]\n      this.x = _x\n      this.y = _y\n      this.w = _w\n    } else if (arguments.length === 4) {\n      const p1 = arguments[0], p2 = arguments[1], q1 = arguments[2], q2 = arguments[3]\n      const px = p1.y - p2.y\n      const py = p2.x - p1.x\n      const pw = p1.x * p2.y - p2.x * p1.y\n      const qx = q1.y - q2.y\n      const qy = q2.x - q1.x\n      const qw = q1.x * q2.y - q2.x * q1.y\n      this.x = py * qw - qy * pw\n      this.y = qx * pw - px * qw\n      this.w = px * qy - qx * py\n    }\n  }\n  getY() {\n    const a = this.y / this.w\n    if (Double.isNaN(a) || Double.isInfinite(a)) \n      throw new NotRepresentableException()\n    \n    return a\n  }\n  getX() {\n    const a = this.x / this.w\n    if (Double.isNaN(a) || Double.isInfinite(a)) \n      throw new NotRepresentableException()\n    \n    return a\n  }\n  getCoordinate() {\n    const p = new Coordinate()\n    p.x = this.getX()\n    p.y = this.getY()\n    return p\n  }\n}\n", "import Coordinate from './Coordinate'\nimport IllegalArgumentException from '../../../../java/lang/IllegalArgumentException'\nimport DD from '../math/DD'\nimport Angle from '../algorithm/Angle'\nimport HCoordinate from '../algorithm/HCoordinate'\nexport default class Triangle {\n  constructor() {\n    Triangle.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this.p0 = null\n    this.p1 = null\n    this.p2 = null\n    const p0 = arguments[0], p1 = arguments[1], p2 = arguments[2]\n    this.p0 = p0\n    this.p1 = p1\n    this.p2 = p2\n  }\n  static area(a, b, c) {\n    return Math.abs(((c.x - a.x) * (b.y - a.y) - (b.x - a.x) * (c.y - a.y)) / 2)\n  }\n  static signedArea(a, b, c) {\n    return ((c.x - a.x) * (b.y - a.y) - (b.x - a.x) * (c.y - a.y)) / 2\n  }\n  static det(m00, m01, m10, m11) {\n    return m00 * m11 - m01 * m10\n  }\n  static interpolateZ(p, v0, v1, v2) {\n    const x0 = v0.x\n    const y0 = v0.y\n    const a = v1.x - x0\n    const b = v2.x - x0\n    const c = v1.y - y0\n    const d = v2.y - y0\n    const det = a * d - b * c\n    const dx = p.x - x0\n    const dy = p.y - y0\n    const t = (d * dx - b * dy) / det\n    const u = (-c * dx + a * dy) / det\n    const z = v0.getZ() + t * (v1.getZ() - v0.getZ()) + u * (v2.getZ() - v0.getZ())\n    return z\n  }\n  static longestSideLength(a, b, c) {\n    const lenAB = a.distance(b)\n    const lenBC = b.distance(c)\n    const lenCA = c.distance(a)\n    let maxLen = lenAB\n    if (lenBC > maxLen) maxLen = lenBC\n    if (lenCA > maxLen) maxLen = lenCA\n    return maxLen\n  }\n  static circumcentreDD(a, b, c) {\n    const ax = DD.valueOf(a.x).subtract(c.x)\n    const ay = DD.valueOf(a.y).subtract(c.y)\n    const bx = DD.valueOf(b.x).subtract(c.x)\n    const by = DD.valueOf(b.y).subtract(c.y)\n    const denom = DD.determinant(ax, ay, bx, by).multiply(2)\n    const asqr = ax.sqr().add(ay.sqr())\n    const bsqr = bx.sqr().add(by.sqr())\n    const numx = DD.determinant(ay, asqr, by, bsqr)\n    const numy = DD.determinant(ax, asqr, bx, bsqr)\n    const ccx = DD.valueOf(c.x).subtract(numx.divide(denom)).doubleValue()\n    const ccy = DD.valueOf(c.y).add(numy.divide(denom)).doubleValue()\n    return new Coordinate(ccx, ccy)\n  }\n  static isAcute(a, b, c) {\n    if (!Angle.isAcute(a, b, c)) return false\n    if (!Angle.isAcute(b, c, a)) return false\n    if (!Angle.isAcute(c, a, b)) return false\n    return true\n  }\n  static circumcentre(a, b, c) {\n    const cx = c.x\n    const cy = c.y\n    const ax = a.x - cx\n    const ay = a.y - cy\n    const bx = b.x - cx\n    const by = b.y - cy\n    const denom = 2 * Triangle.det(ax, ay, bx, by)\n    const numx = Triangle.det(ay, ax * ax + ay * ay, by, bx * bx + by * by)\n    const numy = Triangle.det(ax, ax * ax + ay * ay, bx, bx * bx + by * by)\n    const ccx = cx - numx / denom\n    const ccy = cy + numy / denom\n    return new Coordinate(ccx, ccy)\n  }\n  static perpendicularBisector(a, b) {\n    const dx = b.x - a.x\n    const dy = b.y - a.y\n    const l1 = new HCoordinate(a.x + dx / 2.0, a.y + dy / 2.0, 1.0)\n    const l2 = new HCoordinate(a.x - dy + dx / 2.0, a.y + dx + dy / 2.0, 1.0)\n    return new HCoordinate(l1, l2)\n  }\n  static angleBisector(a, b, c) {\n    const len0 = b.distance(a)\n    const len2 = b.distance(c)\n    const frac = len0 / (len0 + len2)\n    const dx = c.x - a.x\n    const dy = c.y - a.y\n    const splitPt = new Coordinate(a.x + frac * dx, a.y + frac * dy)\n    return splitPt\n  }\n  static area3D(a, b, c) {\n    const ux = b.x - a.x\n    const uy = b.y - a.y\n    const uz = b.getZ() - a.getZ()\n    const vx = c.x - a.x\n    const vy = c.y - a.y\n    const vz = c.getZ() - a.getZ()\n    const crossx = uy * vz - uz * vy\n    const crossy = uz * vx - ux * vz\n    const crossz = ux * vy - uy * vx\n    const absSq = crossx * crossx + crossy * crossy + crossz * crossz\n    const area3D = Math.sqrt(absSq) / 2\n    return area3D\n  }\n  static centroid(a, b, c) {\n    const x = (a.x + b.x + c.x) / 3\n    const y = (a.y + b.y + c.y) / 3\n    return new Coordinate(x, y)\n  }\n  static inCentre(a, b, c) {\n    const len0 = b.distance(c)\n    const len1 = a.distance(c)\n    const len2 = a.distance(b)\n    const circum = len0 + len1 + len2\n    const inCentreX = (len0 * a.x + len1 * b.x + len2 * c.x) / circum\n    const inCentreY = (len0 * a.y + len1 * b.y + len2 * c.y) / circum\n    return new Coordinate(inCentreX, inCentreY)\n  }\n  area() {\n    return Triangle.area(this.p0, this.p1, this.p2)\n  }\n  signedArea() {\n    return Triangle.signedArea(this.p0, this.p1, this.p2)\n  }\n  interpolateZ(p) {\n    if (p === null) throw new IllegalArgumentException('Supplied point is null.')\n    return Triangle.interpolateZ(p, this.p0, this.p1, this.p2)\n  }\n  longestSideLength() {\n    return Triangle.longestSideLength(this.p0, this.p1, this.p2)\n  }\n  isAcute() {\n    return Triangle.isAcute(this.p0, this.p1, this.p2)\n  }\n  circumcentre() {\n    return Triangle.circumcentre(this.p0, this.p1, this.p2)\n  }\n  area3D() {\n    return Triangle.area3D(this.p0, this.p1, this.p2)\n  }\n  centroid() {\n    return Triangle.centroid(this.p0, this.p1, this.p2)\n  }\n  inCentre() {\n    return Triangle.inCentre(this.p0, this.p1, this.p2)\n  }\n}\n", "import Location from '../../geom/Location'\nimport LineString from '../../geom/LineString'\nimport Position from '../../geomgraph/Position'\nimport Point from '../../geom/Point'\nimport NodedSegmentString from '../../noding/NodedSegmentString'\nimport Polygon from '../../geom/Polygon'\nimport MultiPoint from '../../geom/MultiPoint'\nimport LinearRing from '../../geom/LinearRing'\nimport Orientation from '../../algorithm/Orientation'\nimport MultiPolygon from '../../geom/MultiPolygon'\nimport Label from '../../geomgraph/Label'\nimport GeometryCollection from '../../geom/GeometryCollection'\nimport UnsupportedOperationException from '../../../../../java/lang/UnsupportedOperationException'\nimport CoordinateArrays from '../../geom/CoordinateArrays'\nimport ArrayList from '../../../../../java/util/ArrayList'\nimport Distance from '../../algorithm/Distance'\nimport MultiLineString from '../../geom/MultiLineString'\nimport Triangle from '../../geom/Triangle'\nexport default class OffsetCurveSetBuilder {\n  constructor() {\n    OffsetCurveSetBuilder.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this._inputGeom = null\n    this._distance = null\n    this._curveBuilder = null\n    this._curveList = new ArrayList()\n    const inputGeom = arguments[0], distance = arguments[1], curveBuilder = arguments[2]\n    this._inputGeom = inputGeom\n    this._distance = distance\n    this._curveBuilder = curveBuilder\n  }\n  addRingSide(coord, offsetDistance, side, cwLeftLoc, cwRightLoc) {\n    if (offsetDistance === 0.0 && coord.length < LinearRing.MINIMUM_VALID_SIZE) return null\n    let leftLoc = cwLeftLoc\n    let rightLoc = cwRightLoc\n    if (coord.length >= LinearRing.MINIMUM_VALID_SIZE && Orientation.isCCW(coord)) {\n      leftLoc = cwRightLoc\n      rightLoc = cwLeftLoc\n      side = Position.opposite(side)\n    }\n    const curve = this._curveBuilder.getRingCurve(coord, side, offsetDistance)\n    this.addCurve(curve, leftLoc, rightLoc)\n  }\n  addRingBothSides(coord, distance) {\n    this.addRingSide(coord, distance, Position.LEFT, Location.EXTERIOR, Location.INTERIOR)\n    this.addRingSide(coord, distance, Position.RIGHT, Location.INTERIOR, Location.EXTERIOR)\n  }\n  addPoint(p) {\n    if (this._distance <= 0.0) return null\n    const coord = p.getCoordinates()\n    const curve = this._curveBuilder.getLineCurve(coord, this._distance)\n    this.addCurve(curve, Location.EXTERIOR, Location.INTERIOR)\n  }\n  addPolygon(p) {\n    let offsetDistance = this._distance\n    let offsetSide = Position.LEFT\n    if (this._distance < 0.0) {\n      offsetDistance = -this._distance\n      offsetSide = Position.RIGHT\n    }\n    const shell = p.getExteriorRing()\n    const shellCoord = CoordinateArrays.removeRepeatedPoints(shell.getCoordinates())\n    if (this._distance < 0.0 && this.isErodedCompletely(shell, this._distance)) return null\n    if (this._distance <= 0.0 && shellCoord.length < 3) return null\n    this.addRingSide(shellCoord, offsetDistance, offsetSide, Location.EXTERIOR, Location.INTERIOR)\n    for (let i = 0; i < p.getNumInteriorRing(); i++) {\n      const hole = p.getInteriorRingN(i)\n      const holeCoord = CoordinateArrays.removeRepeatedPoints(hole.getCoordinates())\n      if (this._distance > 0.0 && this.isErodedCompletely(hole, -this._distance)) continue\n      this.addRingSide(holeCoord, offsetDistance, Position.opposite(offsetSide), Location.INTERIOR, Location.EXTERIOR)\n    }\n  }\n  isTriangleErodedCompletely(triangleCoord, bufferDistance) {\n    const tri = new Triangle(triangleCoord[0], triangleCoord[1], triangleCoord[2])\n    const inCentre = tri.inCentre()\n    const distToCentre = Distance.pointToSegment(inCentre, tri.p0, tri.p1)\n    return distToCentre < Math.abs(bufferDistance)\n  }\n  addLineString(line) {\n    if (this._curveBuilder.isLineOffsetEmpty(this._distance)) return null\n    const coord = CoordinateArrays.removeRepeatedPoints(line.getCoordinates())\n    if (CoordinateArrays.isRing(coord) && !this._curveBuilder.getBufferParameters().isSingleSided()) {\n      this.addRingBothSides(coord, this._distance)\n    } else {\n      const curve = this._curveBuilder.getLineCurve(coord, this._distance)\n      this.addCurve(curve, Location.EXTERIOR, Location.INTERIOR)\n    }\n  }\n  addCurve(coord, leftLoc, rightLoc) {\n    if (coord === null || coord.length < 2) return null\n    const e = new NodedSegmentString(coord, new Label(0, Location.BOUNDARY, leftLoc, rightLoc))\n    this._curveList.add(e)\n  }\n  getCurves() {\n    this.add(this._inputGeom)\n    return this._curveList\n  }\n  add(g) {\n    if (g.isEmpty()) return null\n    if (g instanceof Polygon) this.addPolygon(g); else if (g instanceof LineString) this.addLineString(g); else if (g instanceof Point) this.addPoint(g); else if (g instanceof MultiPoint) this.addCollection(g); else if (g instanceof MultiLineString) this.addCollection(g); else if (g instanceof MultiPolygon) this.addCollection(g); else if (g instanceof GeometryCollection) this.addCollection(g); else throw new UnsupportedOperationException(g.getGeometryType())\n  }\n  isErodedCompletely(ring, bufferDistance) {\n    const ringCoord = ring.getCoordinates()\n    if (ringCoord.length < 4) return bufferDistance < 0\n    if (ringCoord.length === 4) return this.isTriangleErodedCompletely(ringCoord, bufferDistance)\n    const env = ring.getEnvelopeInternal()\n    const envMinDimension = Math.min(env.getHeight(), env.getWidth())\n    if (bufferDistance < 0.0 && 2 * Math.abs(bufferDistance) > envMinDimension) return true\n    return false\n  }\n  addCollection(gc) {\n    for (let i = 0; i < gc.getNumGeometries(); i++) {\n      const g = gc.getGeometryN(i)\n      this.add(g)\n    }\n  }\n}\n", "export default class PointOnGeometryLocator {\n  locate(p) {}\n}\n", "import Iterator from '../../../../java/util/Iterator'\nimport NoSuchElementException from '../../../../java/util/NoSuchElementException'\nimport GeometryCollection from './GeometryCollection'\nimport UnsupportedOperationException from '../../../../java/lang/UnsupportedOperationException'\nexport default class GeometryCollectionIterator {\n  constructor() {\n    GeometryCollectionIterator.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this._parent = null\n    this._atStart = null\n    this._max = null\n    this._index = null\n    this._subcollectionIterator = null\n    const parent = arguments[0]\n    this._parent = parent\n    this._atStart = true\n    this._index = 0\n    this._max = parent.getNumGeometries()\n  }\n  static isAtomic(geom) {\n    return !(geom instanceof GeometryCollection)\n  }\n  next() {\n    if (this._atStart) {\n      this._atStart = false\n      if (GeometryCollectionIterator.isAtomic(this._parent)) this._index++\n      return this._parent\n    }\n    if (this._subcollectionIterator !== null) \n      if (this._subcollectionIterator.hasNext()) \n        return this._subcollectionIterator.next()\n      else \n        this._subcollectionIterator = null\n      \n    \n    if (this._index >= this._max) \n      throw new NoSuchElementException()\n    \n    const obj = this._parent.getGeometryN(this._index++)\n    if (obj instanceof GeometryCollection) {\n      this._subcollectionIterator = new GeometryCollectionIterator(obj)\n      return this._subcollectionIterator.next()\n    }\n    return obj\n  }\n  remove() {\n    throw new UnsupportedOperationException(this.getClass().getName())\n  }\n  hasNext() {\n    if (this._atStart) \n      return true\n    \n    if (this._subcollectionIterator !== null) {\n      if (this._subcollectionIterator.hasNext()) \n        return true\n      \n      this._subcollectionIterator = null\n    }\n    if (this._index >= this._max) \n      return false\n    \n    return true\n  }\n  get interfaces_() {\n    return [Iterator]\n  }\n}\n", "import Location from '../../geom/Location'\nimport Polygon from '../../geom/Polygon'\nimport PointLocation from '../PointLocation'\nimport PointOnGeometryLocator from './PointOnGeometryLocator'\nimport GeometryCollectionIterator from '../../geom/GeometryCollectionIterator'\nimport GeometryCollection from '../../geom/GeometryCollection'\nexport default class SimplePointInAreaLocator {\n  constructor() {\n    SimplePointInAreaLocator.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this._geom = null\n    const geom = arguments[0]\n    this._geom = geom\n  }\n  static locatePointInPolygon(p, poly) {\n    if (poly.isEmpty()) return Location.EXTERIOR\n    const shell = poly.getExteriorRing()\n    const shellLoc = SimplePointInAreaLocator.locatePointInRing(p, shell)\n    if (shellLoc !== Location.INTERIOR) return shellLoc\n    for (let i = 0; i < poly.getNumInteriorRing(); i++) {\n      const hole = poly.getInteriorRingN(i)\n      const holeLoc = SimplePointInAreaLocator.locatePointInRing(p, hole)\n      if (holeLoc === Location.BOUNDARY) return Location.BOUNDARY\n      if (holeLoc === Location.INTERIOR) return Location.EXTERIOR\n    }\n    return Location.INTERIOR\n  }\n  static locatePointInRing(p, ring) {\n    if (!ring.getEnvelopeInternal().intersects(p)) return Location.EXTERIOR\n    return PointLocation.locateInRing(p, ring.getCoordinates())\n  }\n  static containsPointInPolygon(p, poly) {\n    return Location.EXTERIOR !== SimplePointInAreaLocator.locatePointInPolygon(p, poly)\n  }\n  static locateInGeometry(p, geom) {\n    if (geom instanceof Polygon) \n      return SimplePointInAreaLocator.locatePointInPolygon(p, geom)\n    \n    if (geom instanceof GeometryCollection) {\n      const geomi = new GeometryCollectionIterator(geom)\n      while (geomi.hasNext()) {\n        const g2 = geomi.next()\n        if (g2 !== geom) {\n          const loc = SimplePointInAreaLocator.locateInGeometry(p, g2)\n          if (loc !== Location.EXTERIOR) return loc\n        }\n      }\n    }\n    return Location.EXTERIOR\n  }\n  static isContained(p, geom) {\n    return Location.EXTERIOR !== SimplePointInAreaLocator.locate(p, geom)\n  }\n  static locate(p, geom) {\n    if (geom.isEmpty()) return Location.EXTERIOR\n    if (!geom.getEnvelopeInternal().intersects(p)) return Location.EXTERIOR\n    return SimplePointInAreaLocator.locateInGeometry(p, geom)\n  }\n  locate(p) {\n    return SimplePointInAreaLocator.locate(p, this._geom)\n  }\n  get interfaces_() {\n    return [PointOnGeometryLocator]\n  }\n}\n", "import StringBuffer from '../../../../java/lang/StringBuffer'\nimport Location from '../geom/Location'\nimport Position from './Position'\nimport TopologyException from '../geom/TopologyException'\nimport System from '../../../../java/lang/System'\nimport SimplePointInAreaLocator from '../algorithm/locate/SimplePointInAreaLocator'\nimport ArrayList from '../../../../java/util/ArrayList'\nimport Assert from '../util/Assert'\nimport TreeMap from '../../../../java/util/TreeMap'\nexport default class EdgeEndStar {\n  constructor() {\n    EdgeEndStar.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this._edgeMap = new TreeMap()\n    this._edgeList = null\n    this._ptInAreaLocation = [Location.NONE, Location.NONE]\n  }\n  getNextCW(ee) {\n    this.getEdges()\n    const i = this._edgeList.indexOf(ee)\n    let iNextCW = i - 1\n    if (i === 0) iNextCW = this._edgeList.size() - 1\n    return this._edgeList.get(iNextCW)\n  }\n  propagateSideLabels(geomIndex) {\n    let startLoc = Location.NONE\n    for (let it = this.iterator(); it.hasNext(); ) {\n      const e = it.next()\n      const label = e.getLabel()\n      if (label.isArea(geomIndex) && label.getLocation(geomIndex, Position.LEFT) !== Location.NONE) startLoc = label.getLocation(geomIndex, Position.LEFT)\n    }\n    if (startLoc === Location.NONE) return null\n    let currLoc = startLoc\n    for (let it = this.iterator(); it.hasNext(); ) {\n      const e = it.next()\n      const label = e.getLabel()\n      if (label.getLocation(geomIndex, Position.ON) === Location.NONE) label.setLocation(geomIndex, Position.ON, currLoc)\n      if (label.isArea(geomIndex)) {\n        const leftLoc = label.getLocation(geomIndex, Position.LEFT)\n        const rightLoc = label.getLocation(geomIndex, Position.RIGHT)\n        if (rightLoc !== Location.NONE) {\n          if (rightLoc !== currLoc) throw new TopologyException('side location conflict', e.getCoordinate())\n          if (leftLoc === Location.NONE) \n            Assert.shouldNeverReachHere('found single null side (at ' + e.getCoordinate() + ')')\n          \n          currLoc = leftLoc\n        } else {\n          Assert.isTrue(label.getLocation(geomIndex, Position.LEFT) === Location.NONE, 'found single null side')\n          label.setLocation(geomIndex, Position.RIGHT, currLoc)\n          label.setLocation(geomIndex, Position.LEFT, currLoc)\n        }\n      }\n    }\n  }\n  getCoordinate() {\n    const it = this.iterator()\n    if (!it.hasNext()) return null\n    const e = it.next()\n    return e.getCoordinate()\n  }\n  print(out) {\n    System.out.println('EdgeEndStar:   ' + this.getCoordinate())\n    for (let it = this.iterator(); it.hasNext(); ) {\n      const e = it.next()\n      e.print(out)\n    }\n  }\n  isAreaLabelsConsistent(geomGraph) {\n    this.computeEdgeEndLabels(geomGraph.getBoundaryNodeRule())\n    return this.checkAreaLabelsConsistent(0)\n  }\n  checkAreaLabelsConsistent(geomIndex) {\n    const edges = this.getEdges()\n    if (edges.size() <= 0) return true\n    const lastEdgeIndex = edges.size() - 1\n    const startLabel = edges.get(lastEdgeIndex).getLabel()\n    const startLoc = startLabel.getLocation(geomIndex, Position.LEFT)\n    Assert.isTrue(startLoc !== Location.NONE, 'Found unlabelled area edge')\n    let currLoc = startLoc\n    for (let it = this.iterator(); it.hasNext(); ) {\n      const e = it.next()\n      const label = e.getLabel()\n      Assert.isTrue(label.isArea(geomIndex), 'Found non-area edge')\n      const leftLoc = label.getLocation(geomIndex, Position.LEFT)\n      const rightLoc = label.getLocation(geomIndex, Position.RIGHT)\n      if (leftLoc === rightLoc) \n        return false\n      \n      if (rightLoc !== currLoc) \n        return false\n      \n      currLoc = leftLoc\n    }\n    return true\n  }\n  findIndex(eSearch) {\n    this.iterator()\n    for (let i = 0; i < this._edgeList.size(); i++) {\n      const e = this._edgeList.get(i)\n      if (e === eSearch) return i\n    }\n    return -1\n  }\n  iterator() {\n    return this.getEdges().iterator()\n  }\n  getEdges() {\n    if (this._edgeList === null) \n      this._edgeList = new ArrayList(this._edgeMap.values())\n    \n    return this._edgeList\n  }\n  getLocation(geomIndex, p, geom) {\n    if (this._ptInAreaLocation[geomIndex] === Location.NONE) \n      this._ptInAreaLocation[geomIndex] = SimplePointInAreaLocator.locate(p, geom[geomIndex].getGeometry())\n    \n    return this._ptInAreaLocation[geomIndex]\n  }\n  toString() {\n    const buf = new StringBuffer()\n    buf.append('EdgeEndStar:   ' + this.getCoordinate())\n    buf.append('\\n')\n    for (let it = this.iterator(); it.hasNext(); ) {\n      const e = it.next()\n      buf.append(e)\n      buf.append('\\n')\n    }\n    return buf.toString()\n  }\n  computeEdgeEndLabels(boundaryNodeRule) {\n    for (let it = this.iterator(); it.hasNext(); ) {\n      const ee = it.next()\n      ee.computeLabel(boundaryNodeRule)\n    }\n  }\n  computeLabelling(geomGraph) {\n    this.computeEdgeEndLabels(geomGraph[0].getBoundaryNodeRule())\n    this.propagateSideLabels(0)\n    this.propagateSideLabels(1)\n    const hasDimensionalCollapseEdge = [false, false]\n    for (let it = this.iterator(); it.hasNext(); ) {\n      const e = it.next()\n      const label = e.getLabel()\n      for (let geomi = 0; geomi < 2; geomi++) \n        if (label.isLine(geomi) && label.getLocation(geomi) === Location.BOUNDARY) hasDimensionalCollapseEdge[geomi] = true\n      \n    }\n    for (let it = this.iterator(); it.hasNext(); ) {\n      const e = it.next()\n      const label = e.getLabel()\n      for (let geomi = 0; geomi < 2; geomi++) \n        if (label.isAnyNull(geomi)) {\n          let loc = Location.NONE\n          if (hasDimensionalCollapseEdge[geomi]) {\n            loc = Location.EXTERIOR\n          } else {\n            const p = e.getCoordinate()\n            loc = this.getLocation(geomi, p, geomGraph)\n          }\n          label.setAllLocationsIfNull(geomi, loc)\n        }\n      \n    }\n  }\n  getDegree() {\n    return this._edgeMap.size()\n  }\n  insertEdgeEnd(e, obj) {\n    this._edgeMap.put(e, obj)\n    this._edgeList = null\n  }\n}\n", "import Location from '../geom/Location'\nimport Position from './Position'\nimport TopologyException from '../geom/TopologyException'\nimport EdgeEndStar from './EdgeEndStar'\nimport System from '../../../../java/lang/System'\nimport Label from './Label'\nimport ArrayList from '../../../../java/util/ArrayList'\nimport Quadrant from './Quadrant'\nimport Assert from '../util/Assert'\nexport default class DirectedEdgeStar extends EdgeEndStar {\n  constructor() {\n    super()\n    DirectedEdgeStar.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this._resultAreaEdgeList = null\n    this._label = null\n    this._SCANNING_FOR_INCOMING = 1\n    this._LINKING_TO_OUTGOING = 2\n  }\n  linkResultDirectedEdges() {\n    this.getResultAreaEdges()\n    let firstOut = null\n    let incoming = null\n    let state = this._SCANNING_FOR_INCOMING\n    for (let i = 0; i < this._resultAreaEdgeList.size(); i++) {\n      const nextOut = this._resultAreaEdgeList.get(i)\n      const nextIn = nextOut.getSym()\n      if (!nextOut.getLabel().isArea()) continue\n      if (firstOut === null && nextOut.isInResult()) firstOut = nextOut\n      switch (state) {\n      case this._SCANNING_FOR_INCOMING:\n        if (!nextIn.isInResult()) continue\n        incoming = nextIn\n        state = this._LINKING_TO_OUTGOING\n        break\n      case this._LINKING_TO_OUTGOING:\n        if (!nextOut.isInResult()) continue\n        incoming.setNext(nextOut)\n        state = this._SCANNING_FOR_INCOMING\n        break\n      }\n    }\n    if (state === this._LINKING_TO_OUTGOING) {\n      if (firstOut === null) throw new TopologyException('no outgoing dirEdge found', this.getCoordinate())\n      Assert.isTrue(firstOut.isInResult(), 'unable to link last incoming dirEdge')\n      incoming.setNext(firstOut)\n    }\n  }\n  insert(ee) {\n    const de = ee\n    this.insertEdgeEnd(de, de)\n  }\n  getRightmostEdge() {\n    const edges = this.getEdges()\n    const size = edges.size()\n    if (size < 1) return null\n    const de0 = edges.get(0)\n    if (size === 1) return de0\n    const deLast = edges.get(size - 1)\n    const quad0 = de0.getQuadrant()\n    const quad1 = deLast.getQuadrant()\n    if (Quadrant.isNorthern(quad0) && Quadrant.isNorthern(quad1)) {\n      return de0\n    } else if (!Quadrant.isNorthern(quad0) && !Quadrant.isNorthern(quad1)) {\n      return deLast\n    } else {\n      const nonHorizontalEdge = null\n      if (de0.getDy() !== 0) return de0; else if (deLast.getDy() !== 0) return deLast\n    }\n    Assert.shouldNeverReachHere('found two horizontal edges incident on node')\n    return null\n  }\n  print(out) {\n    System.out.println('DirectedEdgeStar: ' + this.getCoordinate())\n    for (let it = this.iterator(); it.hasNext(); ) {\n      const de = it.next()\n      out.print('out ')\n      de.print(out)\n      out.println()\n      out.print('in ')\n      de.getSym().print(out)\n      out.println()\n    }\n  }\n  getResultAreaEdges() {\n    if (this._resultAreaEdgeList !== null) return this._resultAreaEdgeList\n    this._resultAreaEdgeList = new ArrayList()\n    for (let it = this.iterator(); it.hasNext(); ) {\n      const de = it.next()\n      if (de.isInResult() || de.getSym().isInResult()) this._resultAreaEdgeList.add(de)\n    }\n    return this._resultAreaEdgeList\n  }\n  updateLabelling(nodeLabel) {\n    for (let it = this.iterator(); it.hasNext(); ) {\n      const de = it.next()\n      const label = de.getLabel()\n      label.setAllLocationsIfNull(0, nodeLabel.getLocation(0))\n      label.setAllLocationsIfNull(1, nodeLabel.getLocation(1))\n    }\n  }\n  linkAllDirectedEdges() {\n    this.getEdges()\n    let prevOut = null\n    let firstIn = null\n    for (let i = this._edgeList.size() - 1; i >= 0; i--) {\n      const nextOut = this._edgeList.get(i)\n      const nextIn = nextOut.getSym()\n      if (firstIn === null) firstIn = nextIn\n      if (prevOut !== null) nextIn.setNext(prevOut)\n      prevOut = nextOut\n    }\n    firstIn.setNext(prevOut)\n  }\n  computeDepths() {\n    if (arguments.length === 1) {\n      const de = arguments[0]\n      const edgeIndex = this.findIndex(de)\n      const startDepth = de.getDepth(Position.LEFT)\n      const targetLastDepth = de.getDepth(Position.RIGHT)\n      const nextDepth = this.computeDepths(edgeIndex + 1, this._edgeList.size(), startDepth)\n      const lastDepth = this.computeDepths(0, edgeIndex, nextDepth)\n      if (lastDepth !== targetLastDepth) throw new TopologyException('depth mismatch at ' + de.getCoordinate())\n    } else if (arguments.length === 3) {\n      const startIndex = arguments[0], endIndex = arguments[1], startDepth = arguments[2]\n      let currDepth = startDepth\n      for (let i = startIndex; i < endIndex; i++) {\n        const nextDe = this._edgeList.get(i)\n        nextDe.setEdgeDepths(Position.RIGHT, currDepth)\n        currDepth = nextDe.getDepth(Position.LEFT)\n      }\n      return currDepth\n    }\n  }\n  mergeSymLabels() {\n    for (let it = this.iterator(); it.hasNext(); ) {\n      const de = it.next()\n      const label = de.getLabel()\n      label.merge(de.getSym().getLabel())\n    }\n  }\n  linkMinimalDirectedEdges(er) {\n    let firstOut = null\n    let incoming = null\n    let state = this._SCANNING_FOR_INCOMING\n    for (let i = this._resultAreaEdgeList.size() - 1; i >= 0; i--) {\n      const nextOut = this._resultAreaEdgeList.get(i)\n      const nextIn = nextOut.getSym()\n      if (firstOut === null && nextOut.getEdgeRing() === er) firstOut = nextOut\n      switch (state) {\n      case this._SCANNING_FOR_INCOMING:\n        if (nextIn.getEdgeRing() !== er) continue\n        incoming = nextIn\n        state = this._LINKING_TO_OUTGOING\n        break\n      case this._LINKING_TO_OUTGOING:\n        if (nextOut.getEdgeRing() !== er) continue\n        incoming.setNextMin(nextOut)\n        state = this._SCANNING_FOR_INCOMING\n        break\n      }\n    }\n    if (state === this._LINKING_TO_OUTGOING) {\n      Assert.isTrue(firstOut !== null, 'found null for first outgoing dirEdge')\n      Assert.isTrue(firstOut.getEdgeRing() === er, 'unable to link last incoming dirEdge')\n      incoming.setNextMin(firstOut)\n    }\n  }\n  getOutgoingDegree() {\n    if (arguments.length === 0) {\n      let degree = 0\n      for (let it = this.iterator(); it.hasNext(); ) {\n        const de = it.next()\n        if (de.isInResult()) degree++\n      }\n      return degree\n    } else if (arguments.length === 1) {\n      const er = arguments[0]\n      let degree = 0\n      for (let it = this.iterator(); it.hasNext(); ) {\n        const de = it.next()\n        if (de.getEdgeRing() === er) degree++\n      }\n      return degree\n    }\n  }\n  getLabel() {\n    return this._label\n  }\n  findCoveredLineEdges() {\n    let startLoc = Location.NONE\n    for (let it = this.iterator(); it.hasNext(); ) {\n      const nextOut = it.next()\n      const nextIn = nextOut.getSym()\n      if (!nextOut.isLineEdge()) {\n        if (nextOut.isInResult()) {\n          startLoc = Location.INTERIOR\n          break\n        }\n        if (nextIn.isInResult()) {\n          startLoc = Location.EXTERIOR\n          break\n        }\n      }\n    }\n    if (startLoc === Location.NONE) return null\n    let currLoc = startLoc\n    for (let it = this.iterator(); it.hasNext(); ) {\n      const nextOut = it.next()\n      const nextIn = nextOut.getSym()\n      if (nextOut.isLineEdge()) {\n        nextOut.getEdge().setCovered(currLoc === Location.INTERIOR)\n      } else {\n        if (nextOut.isInResult()) currLoc = Location.EXTERIOR\n        if (nextIn.isInResult()) currLoc = Location.INTERIOR\n      }\n    }\n  }\n  computeLabelling(geom) {\n    super.computeLabelling.call(this, geom)\n    this._label = new Label(Location.NONE)\n    for (let it = this.iterator(); it.hasNext(); ) {\n      const ee = it.next()\n      const e = ee.getEdge()\n      const eLabel = e.getLabel()\n      for (let i = 0; i < 2; i++) {\n        const eLoc = eLabel.getLocation(i)\n        if (eLoc === Location.INTERIOR || eLoc === Location.BOUNDARY) this._label.setLocation(i, Location.INTERIOR)\n      }\n    }\n  }\n}\n", "import DirectedEdgeStar from '../../geomgraph/DirectedEdgeStar'\nimport Node from '../../geomgraph/Node'\nimport NodeFactory from '../../geomgraph/NodeFactory'\nexport default class OverlayNodeFactory extends NodeFactory {\n  constructor() {\n    super()\n  }\n  createNode(coord) {\n    return new Node(coord, new DirectedEdgeStar())\n  }\n}\n", "import Comparable from '../../../../java/lang/Comparable'\nimport CoordinateArrays from '../geom/CoordinateArrays'\nexport default class OrientedCoordinateArray {\n  constructor() {\n    OrientedCoordinateArray.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this._pts = null\n    this._orientation = null\n    const pts = arguments[0]\n    this._pts = pts\n    this._orientation = OrientedCoordinateArray.orientation(pts)\n  }\n  static orientation(pts) {\n    return CoordinateArrays.increasingDirection(pts) === 1\n  }\n  static compareOriented(pts1, orientation1, pts2, orientation2) {\n    const dir1 = orientation1 ? 1 : -1\n    const dir2 = orientation2 ? 1 : -1\n    const limit1 = orientation1 ? pts1.length : -1\n    const limit2 = orientation2 ? pts2.length : -1\n    let i1 = orientation1 ? 0 : pts1.length - 1\n    let i2 = orientation2 ? 0 : pts2.length - 1\n    while (true) {\n      const compPt = pts1[i1].compareTo(pts2[i2])\n      if (compPt !== 0) return compPt\n      i1 += dir1\n      i2 += dir2\n      const done1 = i1 === limit1\n      const done2 = i2 === limit2\n      if (done1 && !done2) return -1\n      if (!done1 && done2) return 1\n      if (done1 && done2) return 0\n    }\n  }\n  compareTo(o1) {\n    const oca = o1\n    const comp = OrientedCoordinateArray.compareOriented(this._pts, this._orientation, oca._pts, oca._orientation)\n    return comp\n  }\n  get interfaces_() {\n    return [Comparable]\n  }\n}\n", "import OrientedCoordinateArray from '../noding/OrientedCoordinateArray'\nimport ArrayList from '../../../../java/util/ArrayList'\nimport TreeMap from '../../../../java/util/TreeMap'\nexport default class EdgeList {\n  constructor() {\n    EdgeList.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this._edges = new ArrayList()\n    this._ocaMap = new TreeMap()\n  }\n  print(out) {\n    out.print('MULTILINESTRING ( ')\n    for (let j = 0; j < this._edges.size(); j++) {\n      const e = this._edges.get(j)\n      if (j > 0) out.print(',')\n      out.print('(')\n      const pts = e.getCoordinates()\n      for (let i = 0; i < pts.length; i++) {\n        if (i > 0) out.print(',')\n        out.print(pts[i].x + ' ' + pts[i].y)\n      }\n      out.println(')')\n    }\n    out.print(')  ')\n  }\n  addAll(edgeColl) {\n    for (let i = edgeColl.iterator(); i.hasNext(); ) \n      this.add(i.next())\n    \n  }\n  findEdgeIndex(e) {\n    for (let i = 0; i < this._edges.size(); i++) \n      if (this._edges.get(i).equals(e)) return i\n    \n    return -1\n  }\n  iterator() {\n    return this._edges.iterator()\n  }\n  getEdges() {\n    return this._edges\n  }\n  get(i) {\n    return this._edges.get(i)\n  }\n  findEqualEdge(e) {\n    const oca = new OrientedCoordinateArray(e.getCoordinates())\n    const matchEdge = this._ocaMap.get(oca)\n    return matchEdge\n  }\n  add(e) {\n    this._edges.add(e)\n    const oca = new OrientedCoordinateArray(e.getCoordinates())\n    this._ocaMap.put(oca, e)\n  }\n}\n", "export default class SegmentIntersector {\n  processIntersections(e0, segIndex0, e1, segIndex1) {}\n  isDone() {}\n}\n", "import SegmentIntersector from './SegmentIntersector'\nexport default class IntersectionAdder {\n  constructor() {\n    IntersectionAdder.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this._hasIntersection = false\n    this._hasProper = false\n    this._hasProperInterior = false\n    this._hasInterior = false\n    this._properIntersectionPoint = null\n    this._li = null\n    this._isSelfIntersection = null\n    this.numIntersections = 0\n    this.numInteriorIntersections = 0\n    this.numProperIntersections = 0\n    this.numTests = 0\n    const li = arguments[0]\n    this._li = li\n  }\n  static isAdjacentSegments(i1, i2) {\n    return Math.abs(i1 - i2) === 1\n  }\n  isTrivialIntersection(e0, segIndex0, e1, segIndex1) {\n    if (e0 === e1) \n      if (this._li.getIntersectionNum() === 1) {\n        if (IntersectionAdder.isAdjacentSegments(segIndex0, segIndex1)) return true\n        if (e0.isClosed()) {\n          const maxSegIndex = e0.size() - 1\n          if (segIndex0 === 0 && segIndex1 === maxSegIndex || segIndex1 === 0 && segIndex0 === maxSegIndex) \n            return true\n          \n        }\n      }\n    \n    return false\n  }\n  getProperIntersectionPoint() {\n    return this._properIntersectionPoint\n  }\n  hasProperInteriorIntersection() {\n    return this._hasProperInterior\n  }\n  getLineIntersector() {\n    return this._li\n  }\n  hasProperIntersection() {\n    return this._hasProper\n  }\n  processIntersections(e0, segIndex0, e1, segIndex1) {\n    if (e0 === e1 && segIndex0 === segIndex1) return null\n    this.numTests++\n    const p00 = e0.getCoordinates()[segIndex0]\n    const p01 = e0.getCoordinates()[segIndex0 + 1]\n    const p10 = e1.getCoordinates()[segIndex1]\n    const p11 = e1.getCoordinates()[segIndex1 + 1]\n    this._li.computeIntersection(p00, p01, p10, p11)\n    if (this._li.hasIntersection()) {\n      this.numIntersections++\n      if (this._li.isInteriorIntersection()) {\n        this.numInteriorIntersections++\n        this._hasInterior = true\n      }\n      if (!this.isTrivialIntersection(e0, segIndex0, e1, segIndex1)) {\n        this._hasIntersection = true\n        e0.addIntersections(this._li, segIndex0, 0)\n        e1.addIntersections(this._li, segIndex1, 1)\n        if (this._li.isProper()) {\n          this.numProperIntersections++\n          this._hasProper = true\n          this._hasProperInterior = true\n        }\n      }\n    }\n  }\n  hasIntersection() {\n    return this._hasIntersection\n  }\n  isDone() {\n    return false\n  }\n  hasInteriorIntersection() {\n    return this._hasInterior\n  }\n  get interfaces_() {\n    return [SegmentIntersector]\n  }\n}\n", "import Coordinate from '../geom/Coordinate'\nimport Comparable from '../../../../java/lang/Comparable'\nexport default class EdgeIntersection {\n  constructor() {\n    EdgeIntersection.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this.coord = null\n    this.segmentIndex = null\n    this.dist = null\n    const coord = arguments[0], segmentIndex = arguments[1], dist = arguments[2]\n    this.coord = new Coordinate(coord)\n    this.segmentIndex = segmentIndex\n    this.dist = dist\n  }\n  getSegmentIndex() {\n    return this.segmentIndex\n  }\n  getCoordinate() {\n    return this.coord\n  }\n  print(out) {\n    out.print(this.coord)\n    out.print(' seg # = ' + this.segmentIndex)\n    out.println(' dist = ' + this.dist)\n  }\n  compareTo(obj) {\n    const other = obj\n    return this.compare(other.segmentIndex, other.dist)\n  }\n  isEndPoint(maxSegmentIndex) {\n    if (this.segmentIndex === 0 && this.dist === 0.0) return true\n    if (this.segmentIndex === maxSegmentIndex) return true\n    return false\n  }\n  toString() {\n    return this.coord + ' seg # = ' + this.segmentIndex + ' dist = ' + this.dist\n  }\n  getDistance() {\n    return this.dist\n  }\n  compare(segmentIndex, dist) {\n    if (this.segmentIndex < segmentIndex) return -1\n    if (this.segmentIndex > segmentIndex) return 1\n    if (this.dist < dist) return -1\n    if (this.dist > dist) return 1\n    return 0\n  }\n  get interfaces_() {\n    return [Comparable]\n  }\n}\n", "import EdgeIntersection from './EdgeIntersection'\nimport Coordinate from '../geom/Coordinate'\nimport Label from './Label'\nimport Edge from './Edge'\nimport TreeMap from '../../../../java/util/TreeMap'\nexport default class EdgeIntersectionList {\n  constructor() {\n    EdgeIntersectionList.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this._nodeMap = new TreeMap()\n    this.edge = null\n    const edge = arguments[0]\n    this.edge = edge\n  }\n  print(out) {\n    out.println('Intersections:')\n    for (let it = this.iterator(); it.hasNext(); ) {\n      const ei = it.next()\n      ei.print(out)\n    }\n  }\n  iterator() {\n    return this._nodeMap.values().iterator()\n  }\n  addSplitEdges(edgeList) {\n    this.addEndpoints()\n    const it = this.iterator()\n    let eiPrev = it.next()\n    while (it.hasNext()) {\n      const ei = it.next()\n      const newEdge = this.createSplitEdge(eiPrev, ei)\n      edgeList.add(newEdge)\n      eiPrev = ei\n    }\n  }\n  addEndpoints() {\n    const maxSegIndex = this.edge.pts.length - 1\n    this.add(this.edge.pts[0], 0, 0.0)\n    this.add(this.edge.pts[maxSegIndex], maxSegIndex, 0.0)\n  }\n  createSplitEdge(ei0, ei1) {\n    let npts = ei1.segmentIndex - ei0.segmentIndex + 2\n    const lastSegStartPt = this.edge.pts[ei1.segmentIndex]\n    const useIntPt1 = ei1.dist > 0.0 || !ei1.coord.equals2D(lastSegStartPt)\n    if (!useIntPt1) \n      npts--\n    \n    const pts = new Array(npts).fill(null)\n    let ipt = 0\n    pts[ipt++] = new Coordinate(ei0.coord)\n    for (let i = ei0.segmentIndex + 1; i <= ei1.segmentIndex; i++) \n      pts[ipt++] = this.edge.pts[i]\n    \n    if (useIntPt1) pts[ipt] = ei1.coord\n    return new Edge(pts, new Label(this.edge._label))\n  }\n  add(intPt, segmentIndex, dist) {\n    const eiNew = new EdgeIntersection(intPt, segmentIndex, dist)\n    const ei = this._nodeMap.get(eiNew)\n    if (ei !== null) \n      return ei\n    \n    this._nodeMap.put(eiNew, eiNew)\n    return eiNew\n  }\n  isIntersection(pt) {\n    for (let it = this.iterator(); it.hasNext(); ) {\n      const ei = it.next()\n      if (ei.coord.equals(pt)) return true\n    }\n    return false\n  }\n}\n", "import Location from './Location'\nimport IllegalArgumentException from '../../../../java/lang/IllegalArgumentException'\nimport Dimension from './Dimension'\nimport Cloneable from '../../../../java/lang/Cloneable'\nimport StringBuilder from '../../../../java/lang/StringBuilder'\nexport default class IntersectionMatrix {\n  constructor() {\n    IntersectionMatrix.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this._matrix = null\n    if (arguments.length === 0) {\n      this._matrix = Array(3).fill().map(() => Array(3))\n      this.setAll(Dimension.FALSE)\n    } else if (arguments.length === 1) {\n      if (typeof arguments[0] === 'string') {\n        const elements = arguments[0]\n        IntersectionMatrix.constructor_.call(this)\n        this.set(elements)\n      } else if (arguments[0] instanceof IntersectionMatrix) {\n        const other = arguments[0]\n        IntersectionMatrix.constructor_.call(this)\n        this._matrix[Location.INTERIOR][Location.INTERIOR] = other._matrix[Location.INTERIOR][Location.INTERIOR]\n        this._matrix[Location.INTERIOR][Location.BOUNDARY] = other._matrix[Location.INTERIOR][Location.BOUNDARY]\n        this._matrix[Location.INTERIOR][Location.EXTERIOR] = other._matrix[Location.INTERIOR][Location.EXTERIOR]\n        this._matrix[Location.BOUNDARY][Location.INTERIOR] = other._matrix[Location.BOUNDARY][Location.INTERIOR]\n        this._matrix[Location.BOUNDARY][Location.BOUNDARY] = other._matrix[Location.BOUNDARY][Location.BOUNDARY]\n        this._matrix[Location.BOUNDARY][Location.EXTERIOR] = other._matrix[Location.BOUNDARY][Location.EXTERIOR]\n        this._matrix[Location.EXTERIOR][Location.INTERIOR] = other._matrix[Location.EXTERIOR][Location.INTERIOR]\n        this._matrix[Location.EXTERIOR][Location.BOUNDARY] = other._matrix[Location.EXTERIOR][Location.BOUNDARY]\n        this._matrix[Location.EXTERIOR][Location.EXTERIOR] = other._matrix[Location.EXTERIOR][Location.EXTERIOR]\n      }\n    }\n  }\n  static matches() {\n    if (Number.isInteger(arguments[0]) && typeof arguments[1] === 'string') {\n      const actualDimensionValue = arguments[0], requiredDimensionSymbol = arguments[1]\n      if (requiredDimensionSymbol === Dimension.SYM_DONTCARE) \n        return true\n      \n      if (requiredDimensionSymbol === Dimension.SYM_TRUE && (actualDimensionValue >= 0 || actualDimensionValue === Dimension.TRUE)) \n        return true\n      \n      if (requiredDimensionSymbol === Dimension.SYM_FALSE && actualDimensionValue === Dimension.FALSE) \n        return true\n      \n      if (requiredDimensionSymbol === Dimension.SYM_P && actualDimensionValue === Dimension.P) \n        return true\n      \n      if (requiredDimensionSymbol === Dimension.SYM_L && actualDimensionValue === Dimension.L) \n        return true\n      \n      if (requiredDimensionSymbol === Dimension.SYM_A && actualDimensionValue === Dimension.A) \n        return true\n      \n      return false\n    } else if (typeof arguments[0] === 'string' && typeof arguments[1] === 'string') {\n      const actualDimensionSymbols = arguments[0], requiredDimensionSymbols = arguments[1]\n      const m = new IntersectionMatrix(actualDimensionSymbols)\n      return m.matches(requiredDimensionSymbols)\n    }\n  }\n  static isTrue(actualDimensionValue) {\n    if (actualDimensionValue >= 0 || actualDimensionValue === Dimension.TRUE) \n      return true\n    \n    return false\n  }\n  isIntersects() {\n    return !this.isDisjoint()\n  }\n  isCovers() {\n    const hasPointInCommon = IntersectionMatrix.isTrue(this._matrix[Location.INTERIOR][Location.INTERIOR]) || IntersectionMatrix.isTrue(this._matrix[Location.INTERIOR][Location.BOUNDARY]) || IntersectionMatrix.isTrue(this._matrix[Location.BOUNDARY][Location.INTERIOR]) || IntersectionMatrix.isTrue(this._matrix[Location.BOUNDARY][Location.BOUNDARY])\n    return hasPointInCommon && this._matrix[Location.EXTERIOR][Location.INTERIOR] === Dimension.FALSE && this._matrix[Location.EXTERIOR][Location.BOUNDARY] === Dimension.FALSE\n  }\n  isCoveredBy() {\n    const hasPointInCommon = IntersectionMatrix.isTrue(this._matrix[Location.INTERIOR][Location.INTERIOR]) || IntersectionMatrix.isTrue(this._matrix[Location.INTERIOR][Location.BOUNDARY]) || IntersectionMatrix.isTrue(this._matrix[Location.BOUNDARY][Location.INTERIOR]) || IntersectionMatrix.isTrue(this._matrix[Location.BOUNDARY][Location.BOUNDARY])\n    return hasPointInCommon && this._matrix[Location.INTERIOR][Location.EXTERIOR] === Dimension.FALSE && this._matrix[Location.BOUNDARY][Location.EXTERIOR] === Dimension.FALSE\n  }\n  set() {\n    if (arguments.length === 1) {\n      const dimensionSymbols = arguments[0]\n      for (let i = 0; i < dimensionSymbols.length; i++) {\n        const row = Math.trunc(i / 3)\n        const col = i % 3\n        this._matrix[row][col] = Dimension.toDimensionValue(dimensionSymbols.charAt(i))\n      }\n    } else if (arguments.length === 3) {\n      const row = arguments[0], column = arguments[1], dimensionValue = arguments[2]\n      this._matrix[row][column] = dimensionValue\n    }\n  }\n  isContains() {\n    return IntersectionMatrix.isTrue(this._matrix[Location.INTERIOR][Location.INTERIOR]) && this._matrix[Location.EXTERIOR][Location.INTERIOR] === Dimension.FALSE && this._matrix[Location.EXTERIOR][Location.BOUNDARY] === Dimension.FALSE\n  }\n  setAtLeast() {\n    if (arguments.length === 1) {\n      const minimumDimensionSymbols = arguments[0]\n      for (let i = 0; i < minimumDimensionSymbols.length; i++) {\n        const row = Math.trunc(i / 3)\n        const col = i % 3\n        this.setAtLeast(row, col, Dimension.toDimensionValue(minimumDimensionSymbols.charAt(i)))\n      }\n    } else if (arguments.length === 3) {\n      const row = arguments[0], column = arguments[1], minimumDimensionValue = arguments[2]\n      if (this._matrix[row][column] < minimumDimensionValue) \n        this._matrix[row][column] = minimumDimensionValue\n      \n    }\n  }\n  setAtLeastIfValid(row, column, minimumDimensionValue) {\n    if (row >= 0 && column >= 0) \n      this.setAtLeast(row, column, minimumDimensionValue)\n    \n  }\n  isWithin() {\n    return IntersectionMatrix.isTrue(this._matrix[Location.INTERIOR][Location.INTERIOR]) && this._matrix[Location.INTERIOR][Location.EXTERIOR] === Dimension.FALSE && this._matrix[Location.BOUNDARY][Location.EXTERIOR] === Dimension.FALSE\n  }\n  isTouches(dimensionOfGeometryA, dimensionOfGeometryB) {\n    if (dimensionOfGeometryA > dimensionOfGeometryB) \n      return this.isTouches(dimensionOfGeometryB, dimensionOfGeometryA)\n    \n    if (dimensionOfGeometryA === Dimension.A && dimensionOfGeometryB === Dimension.A || dimensionOfGeometryA === Dimension.L && dimensionOfGeometryB === Dimension.L || dimensionOfGeometryA === Dimension.L && dimensionOfGeometryB === Dimension.A || dimensionOfGeometryA === Dimension.P && dimensionOfGeometryB === Dimension.A || dimensionOfGeometryA === Dimension.P && dimensionOfGeometryB === Dimension.L) \n      return this._matrix[Location.INTERIOR][Location.INTERIOR] === Dimension.FALSE && (IntersectionMatrix.isTrue(this._matrix[Location.INTERIOR][Location.BOUNDARY]) || IntersectionMatrix.isTrue(this._matrix[Location.BOUNDARY][Location.INTERIOR]) || IntersectionMatrix.isTrue(this._matrix[Location.BOUNDARY][Location.BOUNDARY]))\n    \n    return false\n  }\n  isOverlaps(dimensionOfGeometryA, dimensionOfGeometryB) {\n    if (dimensionOfGeometryA === Dimension.P && dimensionOfGeometryB === Dimension.P || dimensionOfGeometryA === Dimension.A && dimensionOfGeometryB === Dimension.A) \n      return IntersectionMatrix.isTrue(this._matrix[Location.INTERIOR][Location.INTERIOR]) && IntersectionMatrix.isTrue(this._matrix[Location.INTERIOR][Location.EXTERIOR]) && IntersectionMatrix.isTrue(this._matrix[Location.EXTERIOR][Location.INTERIOR])\n    \n    if (dimensionOfGeometryA === Dimension.L && dimensionOfGeometryB === Dimension.L) \n      return this._matrix[Location.INTERIOR][Location.INTERIOR] === 1 && IntersectionMatrix.isTrue(this._matrix[Location.INTERIOR][Location.EXTERIOR]) && IntersectionMatrix.isTrue(this._matrix[Location.EXTERIOR][Location.INTERIOR])\n    \n    return false\n  }\n  isEquals(dimensionOfGeometryA, dimensionOfGeometryB) {\n    if (dimensionOfGeometryA !== dimensionOfGeometryB) \n      return false\n    \n    return IntersectionMatrix.isTrue(this._matrix[Location.INTERIOR][Location.INTERIOR]) && this._matrix[Location.INTERIOR][Location.EXTERIOR] === Dimension.FALSE && this._matrix[Location.BOUNDARY][Location.EXTERIOR] === Dimension.FALSE && this._matrix[Location.EXTERIOR][Location.INTERIOR] === Dimension.FALSE && this._matrix[Location.EXTERIOR][Location.BOUNDARY] === Dimension.FALSE\n  }\n  toString() {\n    const builder = new StringBuilder('123456789')\n    for (let ai = 0; ai < 3; ai++) \n      for (let bi = 0; bi < 3; bi++) \n        builder.setCharAt(3 * ai + bi, Dimension.toDimensionSymbol(this._matrix[ai][bi]))\n      \n    \n    return builder.toString()\n  }\n  setAll(dimensionValue) {\n    for (let ai = 0; ai < 3; ai++) \n      for (let bi = 0; bi < 3; bi++) \n        this._matrix[ai][bi] = dimensionValue\n      \n    \n  }\n  get(row, column) {\n    return this._matrix[row][column]\n  }\n  transpose() {\n    let temp = this._matrix[1][0]\n    this._matrix[1][0] = this._matrix[0][1]\n    this._matrix[0][1] = temp\n    temp = this._matrix[2][0]\n    this._matrix[2][0] = this._matrix[0][2]\n    this._matrix[0][2] = temp\n    temp = this._matrix[2][1]\n    this._matrix[2][1] = this._matrix[1][2]\n    this._matrix[1][2] = temp\n    return this\n  }\n  matches(requiredDimensionSymbols) {\n    if (requiredDimensionSymbols.length !== 9) \n      throw new IllegalArgumentException('Should be length 9: ' + requiredDimensionSymbols)\n    \n    for (let ai = 0; ai < 3; ai++) \n      for (let bi = 0; bi < 3; bi++) \n        if (!IntersectionMatrix.matches(this._matrix[ai][bi], requiredDimensionSymbols.charAt(3 * ai + bi))) \n          return false\n        \n      \n    \n    return true\n  }\n  add(im) {\n    for (let i = 0; i < 3; i++) \n      for (let j = 0; j < 3; j++) \n        this.setAtLeast(i, j, im.get(i, j))\n      \n    \n  }\n  isDisjoint() {\n    return this._matrix[Location.INTERIOR][Location.INTERIOR] === Dimension.FALSE && this._matrix[Location.INTERIOR][Location.BOUNDARY] === Dimension.FALSE && this._matrix[Location.BOUNDARY][Location.INTERIOR] === Dimension.FALSE && this._matrix[Location.BOUNDARY][Location.BOUNDARY] === Dimension.FALSE\n  }\n  isCrosses(dimensionOfGeometryA, dimensionOfGeometryB) {\n    if (dimensionOfGeometryA === Dimension.P && dimensionOfGeometryB === Dimension.L || dimensionOfGeometryA === Dimension.P && dimensionOfGeometryB === Dimension.A || dimensionOfGeometryA === Dimension.L && dimensionOfGeometryB === Dimension.A) \n      return IntersectionMatrix.isTrue(this._matrix[Location.INTERIOR][Location.INTERIOR]) && IntersectionMatrix.isTrue(this._matrix[Location.INTERIOR][Location.EXTERIOR])\n    \n    if (dimensionOfGeometryA === Dimension.L && dimensionOfGeometryB === Dimension.P || dimensionOfGeometryA === Dimension.A && dimensionOfGeometryB === Dimension.P || dimensionOfGeometryA === Dimension.A && dimensionOfGeometryB === Dimension.L) \n      return IntersectionMatrix.isTrue(this._matrix[Location.INTERIOR][Location.INTERIOR]) && IntersectionMatrix.isTrue(this._matrix[Location.EXTERIOR][Location.INTERIOR])\n    \n    if (dimensionOfGeometryA === Dimension.L && dimensionOfGeometryB === Dimension.L) \n      return this._matrix[Location.INTERIOR][Location.INTERIOR] === 0\n    \n    return false\n  }\n  get interfaces_() {\n    return [Cloneable]\n  }\n}\n", "import Arrays from '../../../../java/util/Arrays'\nimport System from '../../../../java/lang/System'\nexport default class IntArrayList {\n  constructor() {\n    IntArrayList.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this._data = null\n    this._size = 0\n    if (arguments.length === 0) {\n      IntArrayList.constructor_.call(this, 10)\n    } else if (arguments.length === 1) {\n      const initialCapacity = arguments[0]\n      this._data = new Array(initialCapacity).fill(null)\n    }\n  }\n  size() {\n    return this._size\n  }\n  addAll(values) {\n    if (values === null) return null\n    if (values.length === 0) return null\n    this.ensureCapacity(this._size + values.length)\n    System.arraycopy(values, 0, this._data, this._size, values.length)\n    this._size += values.length\n  }\n  ensureCapacity(capacity) {\n    if (capacity <= this._data.length) return null\n    const newLength = Math.max(capacity, this._data.length * 2)\n    this._data = Arrays.copyOf(this._data, newLength)\n  }\n  toArray() {\n    const array = new Array(this._size).fill(null)\n    System.arraycopy(this._data, 0, array, 0, this._size)\n    return array\n  }\n  add(value) {\n    this.ensureCapacity(this._size + 1)\n    this._data[this._size] = value\n    ++ this._size\n  }\n}\n", "import IntArrayList from '../../util/IntArrayList'\nimport ArrayList from '../../../../../java/util/ArrayList'\nimport Quadrant from '../Quadrant'\nexport default class MonotoneChainIndexer {\n  static toIntArray(list) {\n    const array = new Array(list.size()).fill(null)\n    for (let i = 0; i < array.length; i++) \n      array[i] = list.get(i).intValue()\n    \n    return array\n  }\n  getChainStartIndices(pts) {\n    let start = 0\n    const startIndexList = new IntArrayList(Math.trunc(pts.length / 2))\n    startIndexList.add(start)\n    do {\n      const last = this.findChainEnd(pts, start)\n      startIndexList.add(last)\n      start = last\n    } while (start < pts.length - 1)\n    return startIndexList.toArray()\n  }\n  findChainEnd(pts, start) {\n    const chainQuad = Quadrant.quadrant(pts[start], pts[start + 1])\n    let last = start + 1\n    while (last < pts.length) {\n      const quad = Quadrant.quadrant(pts[last - 1], pts[last])\n      if (quad !== chainQuad) break\n      last++\n    }\n    return last - 1\n  }\n  OLDgetChainStartIndices(pts) {\n    let start = 0\n    const startIndexList = new ArrayList()\n    startIndexList.add(start)\n    do {\n      const last = this.findChainEnd(pts, start)\n      startIndexList.add(last)\n      start = last\n    } while (start < pts.length - 1)\n    const startIndex = MonotoneChainIndexer.toIntArray(startIndexList)\n    return startIndex\n  }\n}\n", "import MonotoneChainIndexer from './MonotoneChainIndexer'\nimport Envelope from '../../geom/Envelope'\nexport default class MonotoneChainEdge {\n  constructor() {\n    MonotoneChainEdge.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this.e = null\n    this.pts = null\n    this.startIndex = null\n    const e = arguments[0]\n    this.e = e\n    this.pts = e.getCoordinates()\n    const mcb = new MonotoneChainIndexer()\n    this.startIndex = mcb.getChainStartIndices(this.pts)\n  }\n  getCoordinates() {\n    return this.pts\n  }\n  getMaxX(chainIndex) {\n    const x1 = this.pts[this.startIndex[chainIndex]].x\n    const x2 = this.pts[this.startIndex[chainIndex + 1]].x\n    return x1 > x2 ? x1 : x2\n  }\n  getMinX(chainIndex) {\n    const x1 = this.pts[this.startIndex[chainIndex]].x\n    const x2 = this.pts[this.startIndex[chainIndex + 1]].x\n    return x1 < x2 ? x1 : x2\n  }\n  computeIntersectsForChain() {\n    if (arguments.length === 4) {\n      const chainIndex0 = arguments[0], mce = arguments[1], chainIndex1 = arguments[2], si = arguments[3]\n      this.computeIntersectsForChain(this.startIndex[chainIndex0], this.startIndex[chainIndex0 + 1], mce, mce.startIndex[chainIndex1], mce.startIndex[chainIndex1 + 1], si)\n    } else if (arguments.length === 6) {\n      const start0 = arguments[0], end0 = arguments[1], mce = arguments[2], start1 = arguments[3], end1 = arguments[4], ei = arguments[5]\n      if (end0 - start0 === 1 && end1 - start1 === 1) {\n        ei.addIntersections(this.e, start0, mce.e, start1)\n        return null\n      }\n      if (!this.overlaps(start0, end0, mce, start1, end1)) return null\n      const mid0 = Math.trunc((start0 + end0) / 2)\n      const mid1 = Math.trunc((start1 + end1) / 2)\n      if (start0 < mid0) {\n        if (start1 < mid1) this.computeIntersectsForChain(start0, mid0, mce, start1, mid1, ei)\n        if (mid1 < end1) this.computeIntersectsForChain(start0, mid0, mce, mid1, end1, ei)\n      }\n      if (mid0 < end0) {\n        if (start1 < mid1) this.computeIntersectsForChain(mid0, end0, mce, start1, mid1, ei)\n        if (mid1 < end1) this.computeIntersectsForChain(mid0, end0, mce, mid1, end1, ei)\n      }\n    }\n  }\n  overlaps(start0, end0, mce, start1, end1) {\n    return Envelope.intersects(this.pts[start0], this.pts[end0], mce.pts[start1], mce.pts[end1])\n  }\n  getStartIndexes() {\n    return this.startIndex\n  }\n  computeIntersects(mce, si) {\n    for (let i = 0; i < this.startIndex.length - 1; i++) \n      for (let j = 0; j < mce.startIndex.length - 1; j++) \n        this.computeIntersectsForChain(i, mce, j, si)\n      \n    \n  }\n}\n", "import Location from '../geom/Location'\nimport Position from './Position'\nexport default class Depth {\n  constructor() {\n    Depth.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this._depth = Array(2).fill().map(() => Array(3))\n    for (let i = 0; i < 2; i++) \n      for (let j = 0; j < 3; j++) \n        this._depth[i][j] = Depth.NULL_VALUE\n      \n    \n  }\n  static depthAtLocation(location) {\n    if (location === Location.EXTERIOR) return 0\n    if (location === Location.INTERIOR) return 1\n    return Depth.NULL_VALUE\n  }\n  getDepth(geomIndex, posIndex) {\n    return this._depth[geomIndex][posIndex]\n  }\n  setDepth(geomIndex, posIndex, depthValue) {\n    this._depth[geomIndex][posIndex] = depthValue\n  }\n  isNull() {\n    if (arguments.length === 0) {\n      for (let i = 0; i < 2; i++) \n        for (let j = 0; j < 3; j++) \n          if (this._depth[i][j] !== Depth.NULL_VALUE) return false\n        \n      \n      return true\n    } else if (arguments.length === 1) {\n      const geomIndex = arguments[0]\n      return this._depth[geomIndex][1] === Depth.NULL_VALUE\n    } else if (arguments.length === 2) {\n      const geomIndex = arguments[0], posIndex = arguments[1]\n      return this._depth[geomIndex][posIndex] === Depth.NULL_VALUE\n    }\n  }\n  normalize() {\n    for (let i = 0; i < 2; i++) \n      if (!this.isNull(i)) {\n        let minDepth = this._depth[i][1]\n        if (this._depth[i][2] < minDepth) minDepth = this._depth[i][2]\n        if (minDepth < 0) minDepth = 0\n        for (let j = 1; j < 3; j++) {\n          let newValue = 0\n          if (this._depth[i][j] > minDepth) newValue = 1\n          this._depth[i][j] = newValue\n        }\n      }\n    \n  }\n  getDelta(geomIndex) {\n    return this._depth[geomIndex][Position.RIGHT] - this._depth[geomIndex][Position.LEFT]\n  }\n  getLocation(geomIndex, posIndex) {\n    if (this._depth[geomIndex][posIndex] <= 0) return Location.EXTERIOR\n    return Location.INTERIOR\n  }\n  toString() {\n    return 'A: ' + this._depth[0][1] + ',' + this._depth[0][2] + ' B: ' + this._depth[1][1] + ',' + this._depth[1][2]\n  }\n  add() {\n    if (arguments.length === 1) {\n      const lbl = arguments[0]\n      for (let i = 0; i < 2; i++) \n        for (let j = 1; j < 3; j++) {\n          const loc = lbl.getLocation(i, j)\n          if (loc === Location.EXTERIOR || loc === Location.INTERIOR) \n            if (this.isNull(i, j)) \n              this._depth[i][j] = Depth.depthAtLocation(loc)\n            else this._depth[i][j] += Depth.depthAtLocation(loc)\n          \n        }\n      \n    } else if (arguments.length === 3) {\n      const geomIndex = arguments[0], posIndex = arguments[1], location = arguments[2]\n      if (location === Location.INTERIOR) this._depth[geomIndex][posIndex]++\n    }\n  }\n}\nDepth.NULL_VALUE = -1\n", "import EdgeIntersectionList from './EdgeIntersectionList'\nimport IntersectionMatrix from '../geom/IntersectionMatrix'\nimport MonotoneChainEdge from './index/MonotoneChainEdge'\nimport Position from './Position'\nimport Coordinate from '../geom/Coordinate'\nimport Label from './Label'\nimport Envelope from '../geom/Envelope'\nimport StringBuilder from '../../../../java/lang/StringBuilder'\nimport Depth from './Depth'\nimport GraphComponent from './GraphComponent'\nexport default class Edge extends GraphComponent {\n  constructor() {\n    super()\n    Edge.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this.pts = null\n    this._env = null\n    this.eiList = new EdgeIntersectionList(this)\n    this._name = null\n    this._mce = null\n    this._isIsolated = true\n    this._depth = new Depth()\n    this._depthDelta = 0\n    if (arguments.length === 1) {\n      const pts = arguments[0]\n      Edge.constructor_.call(this, pts, null)\n    } else if (arguments.length === 2) {\n      const pts = arguments[0], label = arguments[1]\n      this.pts = pts\n      this._label = label\n    }\n  }\n  static updateIM() {\n    if (arguments.length === 2 && (arguments[1] instanceof IntersectionMatrix && arguments[0] instanceof Label)) {\n      const label = arguments[0], im = arguments[1]\n      im.setAtLeastIfValid(label.getLocation(0, Position.ON), label.getLocation(1, Position.ON), 1)\n      if (label.isArea()) {\n        im.setAtLeastIfValid(label.getLocation(0, Position.LEFT), label.getLocation(1, Position.LEFT), 2)\n        im.setAtLeastIfValid(label.getLocation(0, Position.RIGHT), label.getLocation(1, Position.RIGHT), 2)\n      }\n    } else {\n      return super.updateIM.apply(this, arguments)\n    }\n  }\n  getDepth() {\n    return this._depth\n  }\n  getCollapsedEdge() {\n    const newPts = new Array(2).fill(null)\n    newPts[0] = this.pts[0]\n    newPts[1] = this.pts[1]\n    const newe = new Edge(newPts, Label.toLineLabel(this._label))\n    return newe\n  }\n  isIsolated() {\n    return this._isIsolated\n  }\n  getCoordinates() {\n    return this.pts\n  }\n  setIsolated(isIsolated) {\n    this._isIsolated = isIsolated\n  }\n  setName(name) {\n    this._name = name\n  }\n  equals(o) {\n    if (!(o instanceof Edge)) return false\n    const e = o\n    if (this.pts.length !== e.pts.length) return false\n    let isEqualForward = true\n    let isEqualReverse = true\n    let iRev = this.pts.length\n    for (let i = 0; i < this.pts.length; i++) {\n      if (!this.pts[i].equals2D(e.pts[i])) \n        isEqualForward = false\n      \n      if (!this.pts[i].equals2D(e.pts[-- iRev])) \n        isEqualReverse = false\n      \n      if (!isEqualForward && !isEqualReverse) return false\n    }\n    return true\n  }\n  getCoordinate() {\n    if (arguments.length === 0) {\n      if (this.pts.length > 0) return this.pts[0]\n      return null\n    } else if (arguments.length === 1) {\n      const i = arguments[0]\n      return this.pts[i]\n    }\n  }\n  print(out) {\n    out.print('edge ' + this._name + ': ')\n    out.print('LINESTRING (')\n    for (let i = 0; i < this.pts.length; i++) {\n      if (i > 0) out.print(',')\n      out.print(this.pts[i].x + ' ' + this.pts[i].y)\n    }\n    out.print(')  ' + this._label + ' ' + this._depthDelta)\n  }\n  computeIM(im) {\n    Edge.updateIM(this._label, im)\n  }\n  isCollapsed() {\n    if (!this._label.isArea()) return false\n    if (this.pts.length !== 3) return false\n    if (this.pts[0].equals(this.pts[2])) return true\n    return false\n  }\n  isClosed() {\n    return this.pts[0].equals(this.pts[this.pts.length - 1])\n  }\n  getMaximumSegmentIndex() {\n    return this.pts.length - 1\n  }\n  getDepthDelta() {\n    return this._depthDelta\n  }\n  getNumPoints() {\n    return this.pts.length\n  }\n  printReverse(out) {\n    out.print('edge ' + this._name + ': ')\n    for (let i = this.pts.length - 1; i >= 0; i--) \n      out.print(this.pts[i] + ' ')\n    \n    out.println('')\n  }\n  getMonotoneChainEdge() {\n    if (this._mce === null) this._mce = new MonotoneChainEdge(this)\n    return this._mce\n  }\n  getEnvelope() {\n    if (this._env === null) {\n      this._env = new Envelope()\n      for (let i = 0; i < this.pts.length; i++) \n        this._env.expandToInclude(this.pts[i])\n      \n    }\n    return this._env\n  }\n  addIntersection(li, segmentIndex, geomIndex, intIndex) {\n    const intPt = new Coordinate(li.getIntersection(intIndex))\n    let normalizedSegmentIndex = segmentIndex\n    let dist = li.getEdgeDistance(geomIndex, intIndex)\n    const nextSegIndex = normalizedSegmentIndex + 1\n    if (nextSegIndex < this.pts.length) {\n      const nextPt = this.pts[nextSegIndex]\n      if (intPt.equals2D(nextPt)) {\n        normalizedSegmentIndex = nextSegIndex\n        dist = 0.0\n      }\n    }\n    const ei = this.eiList.add(intPt, normalizedSegmentIndex, dist)\n  }\n  toString() {\n    const builder = new StringBuilder()\n    builder.append('edge ' + this._name + ': ')\n    builder.append('LINESTRING (')\n    for (let i = 0; i < this.pts.length; i++) {\n      if (i > 0) builder.append(',')\n      builder.append(this.pts[i].x + ' ' + this.pts[i].y)\n    }\n    builder.append(')  ' + this._label + ' ' + this._depthDelta)\n    return builder.toString()\n  }\n  isPointwiseEqual(e) {\n    if (this.pts.length !== e.pts.length) return false\n    for (let i = 0; i < this.pts.length; i++) \n      if (!this.pts[i].equals2D(e.pts[i])) \n        return false\n      \n    \n    return true\n  }\n  setDepthDelta(depthDelta) {\n    this._depthDelta = depthDelta\n  }\n  getEdgeIntersectionList() {\n    return this.eiList\n  }\n  addIntersections(li, segmentIndex, geomIndex) {\n    for (let i = 0; i < li.getIntersectionNum(); i++) \n      this.addIntersection(li, segmentIndex, geomIndex, i)\n    \n  }\n}\n", "import Location from '../../geom/Location'\nimport BufferSubgraph from './BufferSubgraph'\nimport PolygonBuilder from '../overlay/PolygonBuilder'\nimport GeometryFactory from '../../geom/GeometryFactory'\nimport Position from '../../geomgraph/Position'\nimport MCIndexNoder from '../../noding/MCIndexNoder'\nimport OffsetCurveBuilder from './OffsetCurveBuilder'\nimport Collections from '../../../../../java/util/Collections'\nimport SubgraphDepthLocater from './SubgraphDepthLocater'\nimport OffsetCurveSetBuilder from './OffsetCurveSetBuilder'\nimport Label from '../../geomgraph/Label'\nimport OverlayNodeFactory from '../overlay/OverlayNodeFactory'\nimport EdgeList from '../../geomgraph/EdgeList'\nimport ArrayList from '../../../../../java/util/ArrayList'\nimport RobustLineIntersector from '../../algorithm/RobustLineIntersector'\nimport IntersectionAdder from '../../noding/IntersectionAdder'\nimport Edge from '../../geomgraph/Edge'\nimport PlanarGraph from '../../geomgraph/PlanarGraph'\nexport default class BufferBuilder {\n  constructor() {\n    BufferBuilder.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this._bufParams = null\n    this._workingPrecisionModel = null\n    this._workingNoder = null\n    this._geomFact = null\n    this._graph = null\n    this._edgeList = new EdgeList()\n    const bufParams = arguments[0]\n    this._bufParams = bufParams\n  }\n  static depthDelta(label) {\n    const lLoc = label.getLocation(0, Position.LEFT)\n    const rLoc = label.getLocation(0, Position.RIGHT)\n    if (lLoc === Location.INTERIOR && rLoc === Location.EXTERIOR) return 1; else if (lLoc === Location.EXTERIOR && rLoc === Location.INTERIOR) return -1\n    return 0\n  }\n  static convertSegStrings(it) {\n    const fact = new GeometryFactory()\n    const lines = new ArrayList()\n    while (it.hasNext()) {\n      const ss = it.next()\n      const line = fact.createLineString(ss.getCoordinates())\n      lines.add(line)\n    }\n    return fact.buildGeometry(lines)\n  }\n  setWorkingPrecisionModel(pm) {\n    this._workingPrecisionModel = pm\n  }\n  insertUniqueEdge(e) {\n    const existingEdge = this._edgeList.findEqualEdge(e)\n    if (existingEdge !== null) {\n      const existingLabel = existingEdge.getLabel()\n      let labelToMerge = e.getLabel()\n      if (!existingEdge.isPointwiseEqual(e)) {\n        labelToMerge = new Label(e.getLabel())\n        labelToMerge.flip()\n      }\n      existingLabel.merge(labelToMerge)\n      const mergeDelta = BufferBuilder.depthDelta(labelToMerge)\n      const existingDelta = existingEdge.getDepthDelta()\n      const newDelta = existingDelta + mergeDelta\n      existingEdge.setDepthDelta(newDelta)\n    } else {\n      this._edgeList.add(e)\n      e.setDepthDelta(BufferBuilder.depthDelta(e.getLabel()))\n    }\n  }\n  buildSubgraphs(subgraphList, polyBuilder) {\n    const processedGraphs = new ArrayList()\n    for (let i = subgraphList.iterator(); i.hasNext(); ) {\n      const subgraph = i.next()\n      const p = subgraph.getRightmostCoordinate()\n      const locater = new SubgraphDepthLocater(processedGraphs)\n      const outsideDepth = locater.getDepth(p)\n      subgraph.computeDepth(outsideDepth)\n      subgraph.findResultEdges()\n      processedGraphs.add(subgraph)\n      polyBuilder.add(subgraph.getDirectedEdges(), subgraph.getNodes())\n    }\n  }\n  createSubgraphs(graph) {\n    const subgraphList = new ArrayList()\n    for (let i = graph.getNodes().iterator(); i.hasNext(); ) {\n      const node = i.next()\n      if (!node.isVisited()) {\n        const subgraph = new BufferSubgraph()\n        subgraph.create(node)\n        subgraphList.add(subgraph)\n      }\n    }\n    Collections.sort(subgraphList, Collections.reverseOrder())\n    return subgraphList\n  }\n  createEmptyResultGeometry() {\n    const emptyGeom = this._geomFact.createPolygon()\n    return emptyGeom\n  }\n  getNoder(precisionModel) {\n    if (this._workingNoder !== null) return this._workingNoder\n    const noder = new MCIndexNoder()\n    const li = new RobustLineIntersector()\n    li.setPrecisionModel(precisionModel)\n    noder.setSegmentIntersector(new IntersectionAdder(li))\n    return noder\n  }\n  buffer(g, distance) {\n    let precisionModel = this._workingPrecisionModel\n    if (precisionModel === null) precisionModel = g.getPrecisionModel()\n    this._geomFact = g.getFactory()\n    const curveBuilder = new OffsetCurveBuilder(precisionModel, this._bufParams)\n    const curveSetBuilder = new OffsetCurveSetBuilder(g, distance, curveBuilder)\n    const bufferSegStrList = curveSetBuilder.getCurves()\n    if (bufferSegStrList.size() <= 0) \n      return this.createEmptyResultGeometry()\n    \n    this.computeNodedEdges(bufferSegStrList, precisionModel)\n    this._graph = new PlanarGraph(new OverlayNodeFactory())\n    this._graph.addEdges(this._edgeList.getEdges())\n    const subgraphList = this.createSubgraphs(this._graph)\n    const polyBuilder = new PolygonBuilder(this._geomFact)\n    this.buildSubgraphs(subgraphList, polyBuilder)\n    const resultPolyList = polyBuilder.getPolygons()\n    if (resultPolyList.size() <= 0) \n      return this.createEmptyResultGeometry()\n    \n    const resultGeom = this._geomFact.buildGeometry(resultPolyList)\n    return resultGeom\n  }\n  computeNodedEdges(bufferSegStrList, precisionModel) {\n    const noder = this.getNoder(precisionModel)\n    noder.computeNodes(bufferSegStrList)\n    const nodedSegStrings = noder.getNodedSubstrings()\n    for (let i = nodedSegStrings.iterator(); i.hasNext(); ) {\n      const segStr = i.next()\n      const pts = segStr.getCoordinates()\n      if (pts.length === 2 && pts[0].equals2D(pts[1])) continue\n      const oldLabel = segStr.getData()\n      const edge = new Edge(segStr.getCoordinates(), new Label(oldLabel))\n      this.insertUniqueEdge(edge)\n    }\n  }\n  setNoder(noder) {\n    this._workingNoder = noder\n  }\n}\n", "import hasInterface from '../../../../hasInterface'\nimport Collection from '../../../../java/util/Collection'\nimport Noder from './Noder'\nimport Coordinate from '../geom/Coordinate'\nimport NodedSegmentString from './NodedSegmentString'\nimport System from '../../../../java/lang/System'\nimport CoordinateArrays from '../geom/CoordinateArrays'\nimport ArrayList from '../../../../java/util/ArrayList'\nexport default class ScaledNoder {\n  constructor() {\n    ScaledNoder.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this._noder = null\n    this._scaleFactor = null\n    this._offsetX = null\n    this._offsetY = null\n    this._isScaled = false\n    if (arguments.length === 2) {\n      const noder = arguments[0], scaleFactor = arguments[1]\n      ScaledNoder.constructor_.call(this, noder, scaleFactor, 0, 0)\n    } else if (arguments.length === 4) {\n      const noder = arguments[0], scaleFactor = arguments[1], offsetX = arguments[2], offsetY = arguments[3]\n      this._noder = noder\n      this._scaleFactor = scaleFactor\n      this._isScaled = !this.isIntegerPrecision()\n    }\n  }\n  rescale() {\n    if (hasInterface(arguments[0], Collection)) {\n      const segStrings = arguments[0]\n      for (let i = segStrings.iterator(); i.hasNext(); ) {\n        const ss = i.next()\n        this.rescale(ss.getCoordinates())\n      }\n    } else if (arguments[0] instanceof Array) {\n      const pts = arguments[0]\n      for (let i = 0; i < pts.length; i++) {\n        pts[i].x = pts[i].x / this._scaleFactor + this._offsetX\n        pts[i].y = pts[i].y / this._scaleFactor + this._offsetY\n      }\n      if (pts.length === 2 && pts[0].equals2D(pts[1])) \n        System.out.println(pts)\n      \n    }\n  }\n  scale() {\n    if (hasInterface(arguments[0], Collection)) {\n      const segStrings = arguments[0]\n      const nodedSegmentStrings = new ArrayList(segStrings.size())\n      for (let i = segStrings.iterator(); i.hasNext(); ) {\n        const ss = i.next()\n        nodedSegmentStrings.add(new NodedSegmentString(this.scale(ss.getCoordinates()), ss.getData()))\n      }\n      return nodedSegmentStrings\n    } else if (arguments[0] instanceof Array) {\n      const pts = arguments[0]\n      const roundPts = new Array(pts.length).fill(null)\n      for (let i = 0; i < pts.length; i++) \n        roundPts[i] = new Coordinate(Math.round((pts[i].x - this._offsetX) * this._scaleFactor), Math.round((pts[i].y - this._offsetY) * this._scaleFactor), pts[i].getZ())\n      \n      const roundPtsNoDup = CoordinateArrays.removeRepeatedPoints(roundPts)\n      return roundPtsNoDup\n    }\n  }\n  isIntegerPrecision() {\n    return this._scaleFactor === 1.0\n  }\n  getNodedSubstrings() {\n    const splitSS = this._noder.getNodedSubstrings()\n    if (this._isScaled) this.rescale(splitSS)\n    return splitSS\n  }\n  computeNodes(inputSegStrings) {\n    let intSegStrings = inputSegStrings\n    if (this._isScaled) intSegStrings = this.scale(inputSegStrings)\n    this._noder.computeNodes(intSegStrings)\n  }\n  get interfaces_() {\n    return [Noder]\n  }\n}\n", "import GeometryFactory from '../geom/GeometryFactory'\nimport RobustLineIntersector from '../algorithm/RobustLineIntersector'\nimport RuntimeException from '../../../../java/lang/RuntimeException'\nexport default class NodingValidator {\n  constructor() {\n    NodingValidator.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this._li = new RobustLineIntersector()\n    this._segStrings = null\n    const segStrings = arguments[0]\n    this._segStrings = segStrings\n  }\n  checkEndPtVertexIntersections() {\n    if (arguments.length === 0) {\n      for (let i = this._segStrings.iterator(); i.hasNext(); ) {\n        const ss = i.next()\n        const pts = ss.getCoordinates()\n        this.checkEndPtVertexIntersections(pts[0], this._segStrings)\n        this.checkEndPtVertexIntersections(pts[pts.length - 1], this._segStrings)\n      }\n    } else if (arguments.length === 2) {\n      const testPt = arguments[0], segStrings = arguments[1]\n      for (let i = segStrings.iterator(); i.hasNext(); ) {\n        const ss = i.next()\n        const pts = ss.getCoordinates()\n        for (let j = 1; j < pts.length - 1; j++) \n          if (pts[j].equals(testPt)) throw new RuntimeException('found endpt/interior pt intersection at index ' + j + ' :pt ' + testPt)\n        \n      }\n    }\n  }\n  checkInteriorIntersections() {\n    if (arguments.length === 0) {\n      for (let i = this._segStrings.iterator(); i.hasNext(); ) {\n        const ss0 = i.next()\n        for (let j = this._segStrings.iterator(); j.hasNext(); ) {\n          const ss1 = j.next()\n          this.checkInteriorIntersections(ss0, ss1)\n        }\n      }\n    } else if (arguments.length === 2) {\n      const ss0 = arguments[0], ss1 = arguments[1]\n      const pts0 = ss0.getCoordinates()\n      const pts1 = ss1.getCoordinates()\n      for (let i0 = 0; i0 < pts0.length - 1; i0++) \n        for (let i1 = 0; i1 < pts1.length - 1; i1++) \n          this.checkInteriorIntersections(ss0, i0, ss1, i1)\n        \n      \n    } else if (arguments.length === 4) {\n      const e0 = arguments[0], segIndex0 = arguments[1], e1 = arguments[2], segIndex1 = arguments[3]\n      if (e0 === e1 && segIndex0 === segIndex1) return null\n      const p00 = e0.getCoordinates()[segIndex0]\n      const p01 = e0.getCoordinates()[segIndex0 + 1]\n      const p10 = e1.getCoordinates()[segIndex1]\n      const p11 = e1.getCoordinates()[segIndex1 + 1]\n      this._li.computeIntersection(p00, p01, p10, p11)\n      if (this._li.hasIntersection()) \n        if (this._li.isProper() || this.hasInteriorIntersection(this._li, p00, p01) || this.hasInteriorIntersection(this._li, p10, p11)) \n          throw new RuntimeException('found non-noded intersection at ' + p00 + '-' + p01 + ' and ' + p10 + '-' + p11)\n        \n      \n    }\n  }\n  checkValid() {\n    this.checkEndPtVertexIntersections()\n    this.checkInteriorIntersections()\n    this.checkCollapses()\n  }\n  checkCollapses() {\n    if (arguments.length === 0) {\n      for (let i = this._segStrings.iterator(); i.hasNext(); ) {\n        const ss = i.next()\n        this.checkCollapses(ss)\n      }\n    } else if (arguments.length === 1) {\n      const ss = arguments[0]\n      const pts = ss.getCoordinates()\n      for (let i = 0; i < pts.length - 2; i++) \n        this.checkCollapse(pts[i], pts[i + 1], pts[i + 2])\n      \n    }\n  }\n  hasInteriorIntersection(li, p0, p1) {\n    for (let i = 0; i < li.getIntersectionNum(); i++) {\n      const intPt = li.getIntersection(i)\n      if (!(intPt.equals(p0) || intPt.equals(p1))) return true\n    }\n    return false\n  }\n  checkCollapse(p0, p1, p2) {\n    if (p0.equals(p2)) throw new RuntimeException('found non-noded collapse at ' + NodingValidator.fact.createLineString([p0, p1, p2]))\n  }\n}\nNodingValidator.fact = new GeometryFactory()\n", "import Coordinate from '../../geom/Coordinate'\nimport IllegalArgumentException from '../../../../../java/lang/IllegalArgumentException'\nimport Envelope from '../../geom/Envelope'\nimport Assert from '../../util/Assert'\nexport default class HotPixel {\n  constructor() {\n    HotPixel.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this._li = null\n    this._pt = null\n    this._originalPt = null\n    this._ptScaled = null\n    this._p0Scaled = null\n    this._p1Scaled = null\n    this._scaleFactor = null\n    this._minx = null\n    this._maxx = null\n    this._miny = null\n    this._maxy = null\n    this._corner = new Array(4).fill(null)\n    this._safeEnv = null\n    const pt = arguments[0], scaleFactor = arguments[1], li = arguments[2]\n    this._originalPt = pt\n    this._pt = pt\n    this._scaleFactor = scaleFactor\n    this._li = li\n    if (scaleFactor <= 0) throw new IllegalArgumentException('Scale factor must be non-zero')\n    if (scaleFactor !== 1.0) {\n      this._pt = new Coordinate(this.scale(pt.x), this.scale(pt.y))\n      this._p0Scaled = new Coordinate()\n      this._p1Scaled = new Coordinate()\n    }\n    this.initCorners(this._pt)\n  }\n  intersectsScaled(p0, p1) {\n    const segMinx = Math.min(p0.x, p1.x)\n    const segMaxx = Math.max(p0.x, p1.x)\n    const segMiny = Math.min(p0.y, p1.y)\n    const segMaxy = Math.max(p0.y, p1.y)\n    const isOutsidePixelEnv = this._maxx < segMinx || this._minx > segMaxx || this._maxy < segMiny || this._miny > segMaxy\n    if (isOutsidePixelEnv) return false\n    const intersects = this.intersectsToleranceSquare(p0, p1)\n    Assert.isTrue(!(isOutsidePixelEnv && intersects), 'Found bad envelope test')\n    return intersects\n  }\n  initCorners(pt) {\n    const tolerance = 0.5\n    this._minx = pt.x - tolerance\n    this._maxx = pt.x + tolerance\n    this._miny = pt.y - tolerance\n    this._maxy = pt.y + tolerance\n    this._corner[0] = new Coordinate(this._maxx, this._maxy)\n    this._corner[1] = new Coordinate(this._minx, this._maxy)\n    this._corner[2] = new Coordinate(this._minx, this._miny)\n    this._corner[3] = new Coordinate(this._maxx, this._miny)\n  }\n  intersects(p0, p1) {\n    if (this._scaleFactor === 1.0) return this.intersectsScaled(p0, p1)\n    this.copyScaled(p0, this._p0Scaled)\n    this.copyScaled(p1, this._p1Scaled)\n    return this.intersectsScaled(this._p0Scaled, this._p1Scaled)\n  }\n  scale(val) {\n    return Math.round(val * this._scaleFactor)\n  }\n  getCoordinate() {\n    return this._originalPt\n  }\n  copyScaled(p, pScaled) {\n    pScaled.x = this.scale(p.x)\n    pScaled.y = this.scale(p.y)\n  }\n  getSafeEnvelope() {\n    if (this._safeEnv === null) {\n      const safeTolerance = HotPixel.SAFE_ENV_EXPANSION_FACTOR / this._scaleFactor\n      this._safeEnv = new Envelope(this._originalPt.x - safeTolerance, this._originalPt.x + safeTolerance, this._originalPt.y - safeTolerance, this._originalPt.y + safeTolerance)\n    }\n    return this._safeEnv\n  }\n  intersectsPixelClosure(p0, p1) {\n    this._li.computeIntersection(p0, p1, this._corner[0], this._corner[1])\n    if (this._li.hasIntersection()) return true\n    this._li.computeIntersection(p0, p1, this._corner[1], this._corner[2])\n    if (this._li.hasIntersection()) return true\n    this._li.computeIntersection(p0, p1, this._corner[2], this._corner[3])\n    if (this._li.hasIntersection()) return true\n    this._li.computeIntersection(p0, p1, this._corner[3], this._corner[0])\n    if (this._li.hasIntersection()) return true\n    return false\n  }\n  intersectsToleranceSquare(p0, p1) {\n    let intersectsLeft = false\n    let intersectsBottom = false\n    this._li.computeIntersection(p0, p1, this._corner[0], this._corner[1])\n    if (this._li.isProper()) return true\n    this._li.computeIntersection(p0, p1, this._corner[1], this._corner[2])\n    if (this._li.isProper()) return true\n    if (this._li.hasIntersection()) intersectsLeft = true\n    this._li.computeIntersection(p0, p1, this._corner[2], this._corner[3])\n    if (this._li.isProper()) return true\n    if (this._li.hasIntersection()) intersectsBottom = true\n    this._li.computeIntersection(p0, p1, this._corner[3], this._corner[0])\n    if (this._li.isProper()) return true\n    if (intersectsLeft && intersectsBottom) return true\n    if (p0.equals(this._pt)) return true\n    if (p1.equals(this._pt)) return true\n    return false\n  }\n  addSnappedNode(segStr, segIndex) {\n    const p0 = segStr.getCoordinate(segIndex)\n    const p1 = segStr.getCoordinate(segIndex + 1)\n    if (this.intersects(p0, p1)) {\n      segStr.addIntersection(this.getCoordinate(), segIndex)\n      return true\n    }\n    return false\n  }\n}\nHotPixel.SAFE_ENV_EXPANSION_FACTOR = 0.75\n", "import LineSegment from '../../geom/LineSegment'\nexport default class MonotoneChainSelectAction {\n  constructor() {\n    MonotoneChainSelectAction.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this.selectedSegment = new LineSegment()\n  }\n  select() {\n    if (arguments.length === 1) {\n      const seg = arguments[0]\n    } else if (arguments.length === 2) {\n      const mc = arguments[0], startIndex = arguments[1]\n      mc.getLineSegment(startIndex, this.selectedSegment)\n      this.select(this.selectedSegment)\n    }\n  }\n}\n", "import MonotoneChainSelectAction from '../../index/chain/MonotoneChainSelectAction'\nimport MonotoneChain from '../../index/chain/MonotoneChain'\nimport ItemVisitor from '../../index/ItemVisitor'\nexport default class MCIndexPointSnapper {\n  constructor() {\n    MCIndexPointSnapper.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this._index = null\n    const index = arguments[0]\n    this._index = index\n  }\n  snap() {\n    if (arguments.length === 1) {\n      const hotPixel = arguments[0]\n      return this.snap(hotPixel, null, -1)\n    } else if (arguments.length === 3) {\n      const hotPixel = arguments[0], parentEdge = arguments[1], hotPixelVertexIndex = arguments[2]\n      const pixelEnv = hotPixel.getSafeEnvelope()\n      const hotPixelSnapAction = new HotPixelSnapAction(hotPixel, parentEdge, hotPixelVertexIndex)\n      this._index.query(pixelEnv, new (class {\n        get interfaces_() {\n          return [ItemVisitor]\n        }\n        visitItem(item) {\n          const testChain = item\n          testChain.select(pixelEnv, hotPixelSnapAction)\n        }\n      })())\n      return hotPixelSnapAction.isNodeAdded()\n    }\n  }\n}\nclass HotPixelSnapAction extends MonotoneChainSelectAction {\n  constructor() {\n    super()\n    HotPixelSnapAction.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this._hotPixel = null\n    this._parentEdge = null\n    this._hotPixelVertexIndex = null\n    this._isNodeAdded = false\n    const hotPixel = arguments[0], parentEdge = arguments[1], hotPixelVertexIndex = arguments[2]\n    this._hotPixel = hotPixel\n    this._parentEdge = parentEdge\n    this._hotPixelVertexIndex = hotPixelVertexIndex\n  }\n  isNodeAdded() {\n    return this._isNodeAdded\n  }\n  select() {\n    if (arguments.length === 2 && (Number.isInteger(arguments[1]) && arguments[0] instanceof MonotoneChain)) {\n      const mc = arguments[0], startIndex = arguments[1]\n      const ss = mc.getContext()\n      if (this._parentEdge === ss) \n        if (startIndex === this._hotPixelVertexIndex || startIndex + 1 === this._hotPixelVertexIndex) return null\n      \n      this._isNodeAdded |= this._hotPixel.addSnappedNode(ss, startIndex)\n    } else {\n      return super.select.apply(this, arguments)\n    }\n  }\n}\nMCIndexPointSnapper.HotPixelSnapAction = HotPixelSnapAction\n", "import SegmentIntersector from './SegmentIntersector'\nimport ArrayList from '../../../../java/util/ArrayList'\nexport default class InteriorIntersectionFinderAdder {\n  constructor() {\n    InteriorIntersectionFinderAdder.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this._li = null\n    this._interiorIntersections = null\n    const li = arguments[0]\n    this._li = li\n    this._interiorIntersections = new ArrayList()\n  }\n  processIntersections(e0, segIndex0, e1, segIndex1) {\n    if (e0 === e1 && segIndex0 === segIndex1) return null\n    const p00 = e0.getCoordinates()[segIndex0]\n    const p01 = e0.getCoordinates()[segIndex0 + 1]\n    const p10 = e1.getCoordinates()[segIndex1]\n    const p11 = e1.getCoordinates()[segIndex1 + 1]\n    this._li.computeIntersection(p00, p01, p10, p11)\n    if (this._li.hasIntersection()) \n      if (this._li.isInteriorIntersection()) {\n        for (let intIndex = 0; intIndex < this._li.getIntersectionNum(); intIndex++) \n          this._interiorIntersections.add(this._li.getIntersection(intIndex))\n        \n        e0.addIntersections(this._li, segIndex0, 0)\n        e1.addIntersections(this._li, segIndex1, 1)\n      }\n    \n  }\n  isDone() {\n    return false\n  }\n  getInteriorIntersections() {\n    return this._interiorIntersections\n  }\n  get interfaces_() {\n    return [SegmentIntersector]\n  }\n}\n", "import NodingValidator from '../NodingValidator'\nimport hasInterface from '../../../../../hasInterface'\nimport Collection from '../../../../../java/util/Collection'\nimport Noder from '../Noder'\nimport MCIndexNoder from '../MCIndexNoder'\nimport NodedSegmentString from '../NodedSegmentString'\nimport HotPixel from './HotPixel'\nimport Exception from '../../../../../java/lang/Exception'\nimport MCIndexPointSnapper from './MCIndexPointSnapper'\nimport RobustLineIntersector from '../../algorithm/RobustLineIntersector'\nimport InteriorIntersectionFinderAdder from '../InteriorIntersectionFinderAdder'\nexport default class MCIndexSnapRounder {\n  constructor() {\n    MCIndexSnapRounder.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this._pm = null\n    this._li = null\n    this._scaleFactor = null\n    this._noder = null\n    this._pointSnapper = null\n    this._nodedSegStrings = null\n    const pm = arguments[0]\n    this._pm = pm\n    this._li = new RobustLineIntersector()\n    this._li.setPrecisionModel(pm)\n    this._scaleFactor = pm.getScale()\n  }\n  checkCorrectness(inputSegmentStrings) {\n    const resultSegStrings = NodedSegmentString.getNodedSubstrings(inputSegmentStrings)\n    const nv = new NodingValidator(resultSegStrings)\n    try {\n      nv.checkValid()\n    } catch (ex) {\n      if (ex instanceof Exception) \n        ex.printStackTrace()\n      else throw ex\n    } finally {}\n  }\n  getNodedSubstrings() {\n    return NodedSegmentString.getNodedSubstrings(this._nodedSegStrings)\n  }\n  snapRound(segStrings, li) {\n    const intersections = this.findInteriorIntersections(segStrings, li)\n    this.computeIntersectionSnaps(intersections)\n    this.computeVertexSnaps(segStrings)\n  }\n  findInteriorIntersections(segStrings, li) {\n    const intFinderAdder = new InteriorIntersectionFinderAdder(li)\n    this._noder.setSegmentIntersector(intFinderAdder)\n    this._noder.computeNodes(segStrings)\n    return intFinderAdder.getInteriorIntersections()\n  }\n  computeVertexSnaps() {\n    if (hasInterface(arguments[0], Collection)) {\n      const edges = arguments[0]\n      for (let i0 = edges.iterator(); i0.hasNext(); ) {\n        const edge0 = i0.next()\n        this.computeVertexSnaps(edge0)\n      }\n    } else if (arguments[0] instanceof NodedSegmentString) {\n      const e = arguments[0]\n      const pts0 = e.getCoordinates()\n      for (let i = 0; i < pts0.length; i++) {\n        const hotPixel = new HotPixel(pts0[i], this._scaleFactor, this._li)\n        const isNodeAdded = this._pointSnapper.snap(hotPixel, e, i)\n        if (isNodeAdded) \n          e.addIntersection(pts0[i], i)\n        \n      }\n    }\n  }\n  computeNodes(inputSegmentStrings) {\n    this._nodedSegStrings = inputSegmentStrings\n    this._noder = new MCIndexNoder()\n    this._pointSnapper = new MCIndexPointSnapper(this._noder.getIndex())\n    this.snapRound(inputSegmentStrings, this._li)\n  }\n  computeIntersectionSnaps(snapPts) {\n    for (let it = snapPts.iterator(); it.hasNext(); ) {\n      const snapPt = it.next()\n      const hotPixel = new HotPixel(snapPt, this._scaleFactor, this._li)\n      this._pointSnapper.snap(hotPixel)\n    }\n  }\n  get interfaces_() {\n    return [Noder]\n  }\n}\n", "import BufferParameters from './BufferParameters'\nimport Geometry from '../../geom/Geometry'\nimport BufferBuilder from './BufferBuilder'\nimport ScaledNoder from '../../noding/ScaledNoder'\nimport TopologyException from '../../geom/TopologyException'\nimport MathUtil from '../../math/MathUtil'\nimport PrecisionModel from '../../geom/PrecisionModel'\nimport RuntimeException from '../../../../../java/lang/RuntimeException'\nimport MCIndexSnapRounder from '../../noding/snapround/MCIndexSnapRounder'\nexport default class BufferOp {\n  constructor() {\n    BufferOp.constructor_.apply(this, arguments)\n  }\n  static constructor_() {\n    this._argGeom = null\n    this._distance = null\n    this._bufParams = new BufferParameters()\n    this._resultGeometry = null\n    this._saveException = null\n    if (arguments.length === 1) {\n      const g = arguments[0]\n      this._argGeom = g\n    } else if (arguments.length === 2) {\n      const g = arguments[0], bufParams = arguments[1]\n      this._argGeom = g\n      this._bufParams = bufParams\n    }\n  }\n  static bufferOp() {\n    if (arguments.length === 2) {\n      const g = arguments[0], distance = arguments[1]\n      const gBuf = new BufferOp(g)\n      const geomBuf = gBuf.getResultGeometry(distance)\n      return geomBuf\n    } else if (arguments.length === 3) {\n      if (Number.isInteger(arguments[2]) && (arguments[0] instanceof Geometry && typeof arguments[1] === 'number')) {\n        const g = arguments[0], distance = arguments[1], quadrantSegments = arguments[2]\n        const bufOp = new BufferOp(g)\n        bufOp.setQuadrantSegments(quadrantSegments)\n        const geomBuf = bufOp.getResultGeometry(distance)\n        return geomBuf\n      } else if (arguments[2] instanceof BufferParameters && (arguments[0] instanceof Geometry && typeof arguments[1] === 'number')) {\n        const g = arguments[0], distance = arguments[1], params = arguments[2]\n        const bufOp = new BufferOp(g, params)\n        const geomBuf = bufOp.getResultGeometry(distance)\n        return geomBuf\n      }\n    } else if (arguments.length === 4) {\n      const g = arguments[0], distance = arguments[1], quadrantSegments = arguments[2], endCapStyle = arguments[3]\n      const bufOp = new BufferOp(g)\n      bufOp.setQuadrantSegments(quadrantSegments)\n      bufOp.setEndCapStyle(endCapStyle)\n      const geomBuf = bufOp.getResultGeometry(distance)\n      return geomBuf\n    }\n  }\n  static precisionScaleFactor(g, distance, maxPrecisionDigits) {\n    const env = g.getEnvelopeInternal()\n    const envMax = MathUtil.max(Math.abs(env.getMaxX()), Math.abs(env.getMaxY()), Math.abs(env.getMinX()), Math.abs(env.getMinY()))\n    const expandByDistance = distance > 0.0 ? distance : 0.0\n    const bufEnvMax = envMax + 2 * expandByDistance\n    const bufEnvPrecisionDigits = Math.trunc(Math.log(bufEnvMax) / Math.log(10) + 1.0)\n    const minUnitLog10 = maxPrecisionDigits - bufEnvPrecisionDigits\n    const scaleFactor = Math.pow(10.0, minUnitLog10)\n    return scaleFactor\n  }\n  bufferFixedPrecision(fixedPM) {\n    const noder = new ScaledNoder(new MCIndexSnapRounder(new PrecisionModel(1.0)), fixedPM.getScale())\n    const bufBuilder = new BufferBuilder(this._bufParams)\n    bufBuilder.setWorkingPrecisionModel(fixedPM)\n    bufBuilder.setNoder(noder)\n    this._resultGeometry = bufBuilder.buffer(this._argGeom, this._distance)\n  }\n  bufferReducedPrecision() {\n    if (arguments.length === 0) {\n      for (let precDigits = BufferOp.MAX_PRECISION_DIGITS; precDigits >= 0; precDigits--) {\n        try {\n          this.bufferReducedPrecision(precDigits)\n        } catch (ex) {\n          if (ex instanceof TopologyException) \n            this._saveException = ex\n          else throw ex\n        } finally {}\n        if (this._resultGeometry !== null) return null\n      }\n      throw this._saveException\n    } else if (arguments.length === 1) {\n      const precisionDigits = arguments[0]\n      const sizeBasedScaleFactor = BufferOp.precisionScaleFactor(this._argGeom, this._distance, precisionDigits)\n      const fixedPM = new PrecisionModel(sizeBasedScaleFactor)\n      this.bufferFixedPrecision(fixedPM)\n    }\n  }\n  computeGeometry() {\n    this.bufferOriginalPrecision()\n    if (this._resultGeometry !== null) return null\n    const argPM = this._argGeom.getFactory().getPrecisionModel()\n    if (argPM.getType() === PrecisionModel.FIXED) this.bufferFixedPrecision(argPM); else this.bufferReducedPrecision()\n  }\n  setQuadrantSegments(quadrantSegments) {\n    this._bufParams.setQuadrantSegments(quadrantSegments)\n  }\n  bufferOriginalPrecision() {\n    try {\n      const bufBuilder = new BufferBuilder(this._bufParams)\n      this._resultGeometry = bufBuilder.buffer(this._argGeom, this._distance)\n    } catch (ex) {\n      if (ex instanceof RuntimeException) \n        this._saveException = ex\n      else throw ex\n    } finally {}\n  }\n  getResultGeometry(distance) {\n    this._distance = distance\n    this.computeGeometry()\n    return this._resultGeometry\n  }\n  setEndCapStyle(endCapStyle) {\n    this._bufParams.setEndCapStyle(endCapStyle)\n  }\n}\nBufferOp.CAP_ROUND = BufferParameters.CAP_ROUND\nBufferOp.CAP_BUTT = BufferParameters.CAP_FLAT\nBufferOp.CAP_FLAT = BufferParameters.CAP_FLAT\nBufferOp.CAP_SQUARE = BufferParameters.CAP_SQUARE\nBufferOp.MAX_PRECISION_DIGITS = 12\n", "import Coordinate from '../geom/Coordinate'\nimport GeometryFactory from '../geom/GeometryFactory'\n\nconst geometryTypes = ['Point', 'MultiPoint', 'LineString', 'MultiLineString', 'Polygon', 'MultiPolygon']\n\n/**\n * Class for reading and writing Well-Known Text.Create a new parser for GeoJSON\n * NOTE: Adapted from OpenLayers 2.11 implementation.\n */\n\n/**\n * Create a new parser for GeoJSON\n *\n * @param {GeometryFactory} geometryFactory\n * @return An instance of GeoJsonParser.\n * @constructor\n * @private\n */\nexport default class GeoJSONParser {\n  constructor(geometryFactory) {\n    this.geometryFactory = geometryFactory || new GeometryFactory()\n  }\n\n  /**\n   * Deserialize a GeoJSON object and return the Geometry or Feature(Collection) with JSTS Geometries\n   *\n   * @param {}\n   *          A GeoJSON object.\n   * @return {} A Geometry instance or object representing a Feature(Collection) with Geometry instances.\n   * @private\n   */\n  read(json) {\n    let obj\n    if (typeof json === 'string')\n      obj = JSON.parse(json)\n    else obj = json\n\n    const type = obj.type\n\n    if (!parse[type]) throw new Error('Unknown GeoJSON type: ' + obj.type)\n\n    if (geometryTypes.indexOf(type) !== -1)\n      return parse[type].call(this, obj.coordinates)\n    else if (type === 'GeometryCollection') return parse[type].call(this, obj.geometries)\n\n    // feature or feature collection\n    return parse[type].call(this, obj)\n  }\n\n  /**\n   * Serialize a Geometry object into GeoJSON\n   *\n   * @param {Geometry}\n   *          geometry A Geometry or array of Geometries.\n   * @return {Object} A GeoJSON object represting the input Geometry/Geometries.\n   * @private\n   */\n  write(geometry) {\n    const type = geometry.getGeometryType()\n\n    if (!extract[type]) throw new Error('Geometry is not supported')\n\n    return extract[type].call(this, geometry)\n  }\n}\n\nconst parse = {\n  /**\n   * Parse a GeoJSON Feature object\n   *\n   * @param {Object}\n   *          obj Object to parse.\n   *\n   * @return {Object} Feature with geometry/bbox converted to JSTS Geometries.\n   */\n  Feature: function(obj) {\n    const feature = {}\n\n    for (const key in obj) feature[key] = obj[key]\n\n    if (obj.geometry) {\n      const type = obj.geometry.type\n      if (!parse[type]) throw new Error('Unknown GeoJSON type: ' + obj.type)\n      feature.geometry = this.read(obj.geometry)\n    }\n\n    if (obj.bbox) feature.bbox = parse.bbox.call(this, obj.bbox)\n\n    return feature\n  },\n\n  /**\n   * Parse a GeoJSON FeatureCollection object\n   *\n   * @param {Object}\n   *          obj Object to parse.\n   *\n   * @return {Object} FeatureCollection with geometry/bbox converted to JSTS Geometries.\n   */\n  FeatureCollection: function(obj) {\n    const featureCollection = {}\n\n    if (obj.features) {\n      featureCollection.features = []\n\n      for (let i = 0; i < obj.features.length; ++i) featureCollection.features.push(this.read(obj.features[i]))\n    }\n\n    if (obj.bbox) featureCollection.bbox = this.parse.bbox.call(this, obj.bbox)\n\n    return featureCollection\n  },\n\n  /**\n   * Convert the ordinates in an array to an array of Coordinates\n   *\n   * @param {Array}\n   *          array Array with {Number}s.\n   *\n   * @return {Array} Array with Coordinates.\n   */\n  coordinates: function(array) {\n    const coordinates = []\n    for (let i = 0; i < array.length; ++i) {\n      const sub = array[i]\n      coordinates.push(new Coordinate(...sub))\n    }\n    return coordinates\n  },\n\n  /**\n   * Convert the bbox to a LinearRing\n   *\n   * @param {Array}\n   *          array Array with [xMin, yMin, xMax, yMax].\n   *\n   * @return {Array} Array with Coordinates.\n   */\n  bbox: function(array) {\n    return this.geometryFactory.createLinearRing([\n      new Coordinate(array[0], array[1]),\n      new Coordinate(array[2], array[1]),\n      new Coordinate(array[2], array[3]),\n      new Coordinate(array[0], array[3]),\n      new Coordinate(array[0], array[1])\n    ])\n  },\n\n  /**\n   * Convert an Array with ordinates to a Point\n   *\n   * @param {Array}\n   *          array Array with ordinates.\n   *\n   * @return {Point} Point.\n   */\n  Point: function(array) {\n    const coordinate = new Coordinate(...array)\n    return this.geometryFactory.createPoint(coordinate)\n  },\n\n  /**\n   * Convert an Array with coordinates to a MultiPoint\n   *\n   * @param {Array}\n   *          array Array with coordinates.\n   *\n   * @return {MultiPoint} MultiPoint.\n   */\n  MultiPoint: function(array) {\n    const points = []\n    for (let i = 0; i < array.length; ++i) points.push(parse.Point.call(this, array[i]))\n    return this.geometryFactory.createMultiPoint(points)\n  },\n\n  /**\n   * Convert an Array with coordinates to a LineString\n   *\n   * @param {Array}\n   *          array Array with coordinates.\n   *\n   * @return {LineString} LineString.\n   */\n  LineString: function(array) {\n    const coordinates = parse.coordinates.call(this, array)\n    return this.geometryFactory.createLineString(coordinates)\n  },\n\n  /**\n   * Convert an Array with coordinates to a MultiLineString\n   *\n   * @param {Array}\n   *          array Array with coordinates.\n   *\n   * @return {MultiLineString} MultiLineString.\n   */\n  MultiLineString: function(array) {\n    const lineStrings = []\n    for (let i = 0; i < array.length; ++i) lineStrings.push(parse.LineString.call(this, array[i]))\n    return this.geometryFactory.createMultiLineString(lineStrings)\n  },\n\n  /**\n   * Convert an Array to a Polygon\n   *\n   * @param {Array}\n   *          array Array with shell and holes.\n   *\n   * @return {Polygon} Polygon.\n   */\n  Polygon: function(array) {\n    const shellCoordinates = parse.coordinates.call(this, array[0])\n    const shell = this.geometryFactory.createLinearRing(shellCoordinates)\n    const holes = []\n    for (let i = 1; i < array.length; ++i) {\n      const hole = array[i]\n      const coordinates = parse.coordinates.call(this, hole)\n      const linearRing = this.geometryFactory.createLinearRing(coordinates)\n      holes.push(linearRing)\n    }\n    return this.geometryFactory.createPolygon(shell, holes)\n  },\n\n  /**\n   * Convert an Array to a MultiPolygon\n   *\n   * @param {Array}\n   *          array Array of arrays with shell and rings.\n   *\n   * @return {MultiPolygon} MultiPolygon.\n   */\n  MultiPolygon: function(array) {\n    const polygons = []\n    for (let i = 0; i < array.length; ++i) {\n      const polygon = array[i]\n      polygons.push(parse.Polygon.call(this, polygon))\n    }\n    return this.geometryFactory.createMultiPolygon(polygons)\n  },\n\n  /**\n   * Convert an Array to a GeometryCollection\n   *\n   * @param {Array}\n   *          array Array of GeoJSON geometries.\n   *\n   * @return {GeometryCollection} GeometryCollection.\n   */\n  GeometryCollection: function(array) {\n    const geometries = []\n    for (let i = 0; i < array.length; ++i) {\n      const geometry = array[i]\n      geometries.push(this.read(geometry))\n    }\n    return this.geometryFactory.createGeometryCollection(geometries)\n  }\n}\n\nconst extract = {\n  /**\n   * Convert a Coordinate to an Array\n   *\n   * @param {Coordinate}\n   *          coordinate Coordinate to convert.\n   *\n   * @return {Array} Array of ordinates.\n   */\n  coordinate: function(coordinate) {\n    const a = [coordinate.x, coordinate.y]\n    if (coordinate.z)\n      a.push(coordinate.z)\n    if (coordinate.m)\n      a.push(coordinate.m)\n    return a\n  },\n\n  /**\n   * Convert a Point to a GeoJSON object\n   *\n   * @param {Point}\n   *          point Point to convert.\n   *\n   * @return {Array} Array of 2 ordinates (paired to a coordinate).\n   */\n  Point: function(point) {\n    const array = extract.coordinate.call(this, point.getCoordinate())\n    return {\n      type: 'Point',\n      coordinates: array\n    }\n  },\n\n  /**\n   * Convert a MultiPoint to a GeoJSON object\n   *\n   * @param {MultiPoint}\n   *          multipoint MultiPoint to convert.\n   *\n   * @return {Array} Array of coordinates.\n   */\n  MultiPoint: function(multipoint) {\n    const array = []\n    for (let i = 0; i < multipoint._geometries.length; ++i) {\n      const point = multipoint._geometries[i]\n      const geoJson = extract.Point.call(this, point)\n      array.push(geoJson.coordinates)\n    }\n    return {\n      type: 'MultiPoint',\n      coordinates: array\n    }\n  },\n\n  /**\n   * Convert a LineString to a GeoJSON object\n   *\n   * @param {LineString}\n   *          linestring LineString to convert.\n   *\n   * @return {Array} Array of coordinates.\n   */\n  LineString: function(linestring) {\n    const array = []\n    const coordinates = linestring.getCoordinates()\n    for (let i = 0; i < coordinates.length; ++i) {\n      const coordinate = coordinates[i]\n      array.push(extract.coordinate.call(this, coordinate))\n    }\n    return {\n      type: 'LineString',\n      coordinates: array\n    }\n  },\n\n  /**\n   * Convert a MultiLineString to a GeoJSON object\n   *\n   * @param {MultiLineString}\n   *          multilinestring MultiLineString to convert.\n   *\n   * @return {Array} Array of Array of coordinates.\n   */\n  MultiLineString: function(multilinestring) {\n    const array = []\n    for (let i = 0; i < multilinestring._geometries.length; ++i) {\n      const linestring = multilinestring._geometries[i]\n      const geoJson = extract.LineString.call(this, linestring)\n      array.push(geoJson.coordinates)\n    }\n    return {\n      type: 'MultiLineString',\n      coordinates: array\n    }\n  },\n\n  /**\n   * Convert a Polygon to a GeoJSON object\n   *\n   * @param {Polygon}\n   *          polygon Polygon to convert.\n   *\n   * @return {Array} Array with shell, holes.\n   */\n  Polygon: function(polygon) {\n    const array = []\n    const shellGeoJson = extract.LineString.call(this, polygon._shell)\n    array.push(shellGeoJson.coordinates)\n    for (let i = 0; i < polygon._holes.length; ++i) {\n      const hole = polygon._holes[i]\n      const holeGeoJson = extract.LineString.call(this, hole)\n      array.push(holeGeoJson.coordinates)\n    }\n    return {\n      type: 'Polygon',\n      coordinates: array\n    }\n  },\n\n  /**\n   * Convert a MultiPolygon to a GeoJSON object\n   *\n   * @param {MultiPolygon}\n   *          multipolygon MultiPolygon to convert.\n   *\n   * @return {Array} Array of polygons.\n   */\n  MultiPolygon: function(multipolygon) {\n    const array = []\n    for (let i = 0; i < multipolygon._geometries.length; ++i) {\n      const polygon = multipolygon._geometries[i]\n      const geoJson = extract.Polygon.call(this, polygon)\n      array.push(geoJson.coordinates)\n    }\n    return {\n      type: 'MultiPolygon',\n      coordinates: array\n    }\n  },\n\n  /**\n   * Convert a GeometryCollection to a GeoJSON object\n   *\n   * @param {GeometryCollection}\n   *          collection GeometryCollection to convert.\n   *\n   * @return {Array} Array of geometries.\n   */\n  GeometryCollection: function(collection) {\n    const array = []\n    for (let i = 0; i < collection._geometries.length; ++i) {\n      const geometry = collection._geometries[i]\n      const type = geometry.getGeometryType()\n      array.push(extract[type].call(this, geometry))\n    }\n    return {\n      type: 'GeometryCollection',\n      geometries: array\n    }\n  }\n}\n", "import BufferOp from \"jsts/org/locationtech/jts/operation/buffer/BufferOp\";\nimport GeoJSONReader from \"jsts/org/locationtech/jts/io/GeoJSONReader\";\nimport GeoJSONWriter from \"jsts/org/locationtech/jts/io/GeoJSONWriter\";\n\nconst jsts = {\n  BufferOp,\n  GeoJSONReader,\n  GeoJSONWriter,\n};\n\nexport default jsts;\n", "/**\n * @module org/locationtech/jts/io/GeoJSONReader\n */\n\nimport GeometryFactory from '../geom/GeometryFactory'\nimport GeoJSONParser from './GeoJSONParser'\n\n/**\n * Converts a geometry in GeoJSON to a {@link Geometry}.\n */\nexport default class GeoJSONReader {\n  /**\n   * A <code>GeoJSONReader</code> is parameterized by a <code>GeometryFactory</code>,\n   * to allow it to create <code>Geometry</code> objects of the appropriate\n   * implementation. In particular, the <code>GeometryFactory</code> determines\n   * the <code>PrecisionModel</code> and <code>SRID</code> that is used.\n   *\n   * @param {GeometryFactory} geometryFactory\n   */\n  constructor(geometryFactory) {\n    this.parser = new GeoJSONParser(geometryFactory || new GeometryFactory())\n  }\n\n  /**\n   * Reads a GeoJSON representation of a {@link Geometry}\n   *\n   * Will also parse GeoJSON Features/FeatureCollections as custom objects.\n   *\n   * @param {Object|String} geoJson a GeoJSON Object or String.\n   * @return {Geometry|Object} a <code>Geometry or Feature/FeatureCollection representation.</code>\n   * @memberof module:org/locationtech/jts/io/GeoJSONReader#\n   */\n  read(geoJson) {\n    const geometry = this.parser.read(geoJson)\n    return geometry\n  }\n}\n", "/**\n * @module org/locationtech/jts/io/GeoJSONWriter\n */\n\nimport GeoJSONParser from './GeoJSONParser'\n\n/**\n * Writes the GeoJSON representation of a {@link Geometry}. The\n * The GeoJSON format is defined <A\n * HREF=\"http://geojson.org/geojson-spec.html\">here</A>.\n */\nexport default class GeoJSONWriter {\n  /**\n   * The <code>GeoJSONWriter</code> outputs coordinates rounded to the precision\n   * model. Only the maximum number of decimal places necessary to represent the\n   * ordinates to the required precision will be output.\n   *\n   * @param {GeometryFactory} geometryFactory\n   * @constructor\n   */\n  constructor() {\n    this.parser = new GeoJSONParser(this.geometryFactory)\n  }\n\n  /**\n   * Converts a <code>Geometry</code> to its GeoJSON representation.\n   *\n   * @param {Geometry}\n   *          geometry a <code>Geometry</code> to process.\n   * @return {Object} The GeoJSON representation of the Geometry.\n   * @memberof module:org/locationtech/jts/io/GeoJSONWriter#\n   */\n  write(geometry) {\n    return this.parser.write(geometry)\n  }\n}\n", "/*******************************************************************************\n *                                                                              *\n * Author    :  Angus Johnson                                                   *\n * Version   :  6.4.2                                                           *\n * Date      :  27 February 2017                                                *\n * Website   :  http://www.angusj.com                                           *\n * Copyright :  Angus Johnson 2010-2017                                         *\n *                                                                              *\n * License:                                                                     *\n * Use, modification & distribution is subject to Boost Software License Ver 1. *\n * http://www.boost.org/LICENSE_1_0.txt                                         *\n *                                                                              *\n * Attributions:                                                                *\n * The code in this library is an extension of Bala Vatti's clipping algorithm: *\n * \"A generic solution to polygon clipping\"                                     *\n * Communications of the ACM, Vol 35, Issue 7 (July 1992) pp 56-63.             *\n * http://portal.acm.org/citation.cfm?id=129906                                 *\n *                                                                              *\n * Computer graphics and geometric modeling: implementation and algorithms      *\n * By Max K. Agoston                                                            *\n * Springer; 1 edition (January 4, 2005)                                        *\n * http://books.google.com/books?q=vatti+clipping+agoston                       *\n *                                                                              *\n * See also:                                                                    *\n * \"Polygon Offsetting by Computing Winding Numbers\"                            *\n * Paper no. DETC2005-85513 pp. 565-575                                         *\n * ASME 2005 International Design Engineering Technical Conferences             *\n * and Computers and Information in Engineering Conference (IDETC/CIE2005)      *\n * September 24-28, 2005 , Long Beach, California, USA                          *\n * http://www.me.berkeley.edu/~mcmains/pubs/DAC05OffsetPolygon.pdf              *\n *                                                                              *\n *******************************************************************************/\n/*******************************************************************************\n *                                                                              *\n * Author    :  Timo                                                            *\n * Version   :  6.4.2.2                                                         *\n * Date      :  8 September 2017                                                 *\n *                                                                              *\n * This is a translation of the C# Clipper library to Javascript.               *\n * Int128 struct of C# is implemented using JSBN of Tom Wu.                     *\n * Because Javascript lacks support for 64-bit integers, the space              *\n * is a little more restricted than in C# version.                              *\n *                                                                              *\n * C# version has support for coordinate space:                                 *\n * +-4611686018427387903 ( sqrt(2^127 -1)/2 )                                   *\n * while Javascript version has support for space:                              *\n * +-4503599627370495 ( sqrt(2^106 -1)/2 )                                      *\n *                                                                              *\n * Tom Wu's JSBN proved to be the fastest big integer library:                  *\n * http://jsperf.com/big-integer-library-test                                   *\n *                                                                              *\n * This class can be made simpler when (if ever) 64-bit integer support comes   *\n * or floating point Clipper is released.                                       *\n *                                                                              *\n *******************************************************************************/\n/*******************************************************************************\n *                                                                              *\n * Basic JavaScript BN library - subset useful for RSA encryption.              *\n * http://www-cs-students.stanford.edu/~tjw/jsbn/                               *\n * Copyright (c) 2005  Tom Wu                                                   *\n * All Rights Reserved.                                                         *\n * See \"LICENSE\" for details:                                                   *\n * http://www-cs-students.stanford.edu/~tjw/jsbn/LICENSE                        *\n *                                                                              *\n *******************************************************************************/\n(function ()\n{\n\t\"use strict\";\n\tvar ClipperLib = {};\n\tClipperLib.version = '6.4.2.2';\n\n\t//UseLines: Enables open path clipping. Adds a very minor cost to performance.\n\tClipperLib.use_lines = true;\n\n\t//ClipperLib.use_xyz: adds a Z member to IntPoint. Adds a minor cost to performance.\n\tClipperLib.use_xyz = false;\n\n\tvar isNode = false;\n\tif (typeof module !== 'undefined' && module.exports)\n\t{\n\t\tmodule.exports = ClipperLib;\n\t\tisNode = true;\n\t}\n\telse\n\t{\n\t\tif (typeof define === 'function' && define.amd) {\n\t\t\tdefine(ClipperLib);\n\t\t}\n\t\tif (typeof (document) !== \"undefined\") window.ClipperLib = ClipperLib;\n\t\telse self['ClipperLib'] = ClipperLib;\n\t}\n\tvar navigator_appName;\n\tif (!isNode)\n\t{\n\t\tvar nav = navigator.userAgent.toString().toLowerCase();\n\t\tnavigator_appName = navigator.appName;\n\t}\n\telse\n\t{\n\t\tvar nav = \"chrome\"; // Node.js uses Chrome's V8 engine\n\t\tnavigator_appName = \"Netscape\"; // Firefox, Chrome and Safari returns \"Netscape\", so Node.js should also\n\t}\n\t// Browser test to speedup performance critical functions\n\tvar browser = {};\n\n\tif (nav.indexOf(\"chrome\") != -1 && nav.indexOf(\"chromium\") == -1) browser.chrome = 1;\n\telse browser.chrome = 0;\n\tif (nav.indexOf(\"chromium\") != -1) browser.chromium = 1;\n\telse browser.chromium = 0;\n\tif (nav.indexOf(\"safari\") != -1 && nav.indexOf(\"chrome\") == -1 && nav.indexOf(\"chromium\") == -1) browser.safari = 1;\n\telse browser.safari = 0;\n\tif (nav.indexOf(\"firefox\") != -1) browser.firefox = 1;\n\telse browser.firefox = 0;\n\tif (nav.indexOf(\"firefox/17\") != -1) browser.firefox17 = 1;\n\telse browser.firefox17 = 0;\n\tif (nav.indexOf(\"firefox/15\") != -1) browser.firefox15 = 1;\n\telse browser.firefox15 = 0;\n\tif (nav.indexOf(\"firefox/3\") != -1) browser.firefox3 = 1;\n\telse browser.firefox3 = 0;\n\tif (nav.indexOf(\"opera\") != -1) browser.opera = 1;\n\telse browser.opera = 0;\n\tif (nav.indexOf(\"msie 10\") != -1) browser.msie10 = 1;\n\telse browser.msie10 = 0;\n\tif (nav.indexOf(\"msie 9\") != -1) browser.msie9 = 1;\n\telse browser.msie9 = 0;\n\tif (nav.indexOf(\"msie 8\") != -1) browser.msie8 = 1;\n\telse browser.msie8 = 0;\n\tif (nav.indexOf(\"msie 7\") != -1) browser.msie7 = 1;\n\telse browser.msie7 = 0;\n\tif (nav.indexOf(\"msie \") != -1) browser.msie = 1;\n\telse browser.msie = 0;\n\tClipperLib.biginteger_used = null;\n\n\t// Copyright (c) 2005  Tom Wu\n\t// All Rights Reserved.\n\t// See \"LICENSE\" for details.\n\t// Basic JavaScript BN library - subset useful for RSA encryption.\n\t// Bits per digit\n\tvar dbits;\n\t// JavaScript engine analysis\n\tvar canary = 0xdeadbeefcafe;\n\tvar j_lm = ((canary & 0xffffff) == 0xefcafe);\n\t// (public) Constructor\n\t/**\n\t* @constructor\n\t*/\n\tfunction BigInteger(a, b, c)\n\t{\n\t\t// This test variable can be removed,\n\t\t// but at least for performance tests it is useful piece of knowledge\n\t\t// This is the only ClipperLib related variable in BigInteger library\n\t\tClipperLib.biginteger_used = 1;\n\t\tif (a != null)\n\t\t\tif (\"number\" == typeof a && \"undefined\" == typeof (b)) this.fromInt(a); // faster conversion\n\t\t\telse if (\"number\" == typeof a) this.fromNumber(a, b, c);\n\t\telse if (b == null && \"string\" != typeof a) this.fromString(a, 256);\n\t\telse this.fromString(a, b);\n\t}\n\t// return new, unset BigInteger\n\tfunction nbi()\n\t{\n\t\treturn new BigInteger(null, undefined, undefined);\n\t}\n\t// am: Compute w_j += (x*this_i), propagate carries,\n\t// c is initial carry, returns final carry.\n\t// c < 3*dvalue, x < 2*dvalue, this_i < dvalue\n\t// We need to select the fastest one that works in this environment.\n\t// am1: use a single mult and divide to get the high bits,\n\t// max digit bits should be 26 because\n\t// max internal value = 2*dvalue^2-2*dvalue (< 2^53)\n\tfunction am1(i, x, w, j, c, n)\n\t{\n\t\twhile (--n >= 0)\n\t\t{\n\t\t\tvar v = x * this[i++] + w[j] + c;\n\t\t\tc = Math.floor(v / 0x4000000);\n\t\t\tw[j++] = v & 0x3ffffff;\n\t\t}\n\t\treturn c;\n\t}\n\t// am2 avoids a big mult-and-extract completely.\n\t// Max digit bits should be <= 30 because we do bitwise ops\n\t// on values up to 2*hdvalue^2-hdvalue-1 (< 2^31)\n\tfunction am2(i, x, w, j, c, n)\n\t{\n\t\tvar xl = x & 0x7fff,\n\t\t\txh = x >> 15;\n\t\twhile (--n >= 0)\n\t\t{\n\t\t\tvar l = this[i] & 0x7fff;\n\t\t\tvar h = this[i++] >> 15;\n\t\t\tvar m = xh * l + h * xl;\n\t\t\tl = xl * l + ((m & 0x7fff) << 15) + w[j] + (c & 0x3fffffff);\n\t\t\tc = (l >>> 30) + (m >>> 15) + xh * h + (c >>> 30);\n\t\t\tw[j++] = l & 0x3fffffff;\n\t\t}\n\t\treturn c;\n\t}\n\t// Alternately, set max digit bits to 28 since some\n\t// browsers slow down when dealing with 32-bit numbers.\n\tfunction am3(i, x, w, j, c, n)\n\t{\n\t\tvar xl = x & 0x3fff,\n\t\t\txh = x >> 14;\n\t\twhile (--n >= 0)\n\t\t{\n\t\t\tvar l = this[i] & 0x3fff;\n\t\t\tvar h = this[i++] >> 14;\n\t\t\tvar m = xh * l + h * xl;\n\t\t\tl = xl * l + ((m & 0x3fff) << 14) + w[j] + c;\n\t\t\tc = (l >> 28) + (m >> 14) + xh * h;\n\t\t\tw[j++] = l & 0xfffffff;\n\t\t}\n\t\treturn c;\n\t}\n\tif (j_lm && (navigator_appName == \"Microsoft Internet Explorer\"))\n\t{\n\t\tBigInteger.prototype.am = am2;\n\t\tdbits = 30;\n\t}\n\telse if (j_lm && (navigator_appName != \"Netscape\"))\n\t{\n\t\tBigInteger.prototype.am = am1;\n\t\tdbits = 26;\n\t}\n\telse\n\t{ // Mozilla/Netscape seems to prefer am3\n\t\tBigInteger.prototype.am = am3;\n\t\tdbits = 28;\n\t}\n\tBigInteger.prototype.DB = dbits;\n\tBigInteger.prototype.DM = ((1 << dbits) - 1);\n\tBigInteger.prototype.DV = (1 << dbits);\n\tvar BI_FP = 52;\n\tBigInteger.prototype.FV = Math.pow(2, BI_FP);\n\tBigInteger.prototype.F1 = BI_FP - dbits;\n\tBigInteger.prototype.F2 = 2 * dbits - BI_FP;\n\t// Digit conversions\n\tvar BI_RM = \"0123456789abcdefghijklmnopqrstuvwxyz\";\n\tvar BI_RC = new Array();\n\tvar rr, vv;\n\trr = \"0\".charCodeAt(0);\n\tfor (vv = 0; vv <= 9; ++vv) BI_RC[rr++] = vv;\n\trr = \"a\".charCodeAt(0);\n\tfor (vv = 10; vv < 36; ++vv) BI_RC[rr++] = vv;\n\trr = \"A\".charCodeAt(0);\n\tfor (vv = 10; vv < 36; ++vv) BI_RC[rr++] = vv;\n\n\tfunction int2char(n)\n\t{\n\t\treturn BI_RM.charAt(n);\n\t}\n\n\tfunction intAt(s, i)\n\t{\n\t\tvar c = BI_RC[s.charCodeAt(i)];\n\t\treturn (c == null) ? -1 : c;\n\t}\n\t// (protected) copy this to r\n\tfunction bnpCopyTo(r)\n\t{\n\t\tfor (var i = this.t - 1; i >= 0; --i) r[i] = this[i];\n\t\tr.t = this.t;\n\t\tr.s = this.s;\n\t}\n\t// (protected) set from integer value x, -DV <= x < DV\n\tfunction bnpFromInt(x)\n\t{\n\t\tthis.t = 1;\n\t\tthis.s = (x < 0) ? -1 : 0;\n\t\tif (x > 0) this[0] = x;\n\t\telse if (x < -1) this[0] = x + this.DV;\n\t\telse this.t = 0;\n\t}\n\t// return bigint initialized to value\n\tfunction nbv(i)\n\t{\n\t\tvar r = nbi();\n\t\tr.fromInt(i);\n\t\treturn r;\n\t}\n\t// (protected) set from string and radix\n\tfunction bnpFromString(s, b)\n\t{\n\t\tvar k;\n\t\tif (b == 16) k = 4;\n\t\telse if (b == 8) k = 3;\n\t\telse if (b == 256) k = 8; // byte array\n\t\telse if (b == 2) k = 1;\n\t\telse if (b == 32) k = 5;\n\t\telse if (b == 4) k = 2;\n\t\telse\n\t\t{\n\t\t\tthis.fromRadix(s, b);\n\t\t\treturn;\n\t\t}\n\t\tthis.t = 0;\n\t\tthis.s = 0;\n\t\tvar i = s.length,\n\t\t\tmi = false,\n\t\t\tsh = 0;\n\t\twhile (--i >= 0)\n\t\t{\n\t\t\tvar x = (k == 8) ? s[i] & 0xff : intAt(s, i);\n\t\t\tif (x < 0)\n\t\t\t{\n\t\t\t\tif (s.charAt(i) == \"-\") mi = true;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tmi = false;\n\t\t\tif (sh == 0)\n\t\t\t\tthis[this.t++] = x;\n\t\t\telse if (sh + k > this.DB)\n\t\t\t{\n\t\t\t\tthis[this.t - 1] |= (x & ((1 << (this.DB - sh)) - 1)) << sh;\n\t\t\t\tthis[this.t++] = (x >> (this.DB - sh));\n\t\t\t}\n\t\t\telse\n\t\t\t\tthis[this.t - 1] |= x << sh;\n\t\t\tsh += k;\n\t\t\tif (sh >= this.DB) sh -= this.DB;\n\t\t}\n\t\tif (k == 8 && (s[0] & 0x80) != 0)\n\t\t{\n\t\t\tthis.s = -1;\n\t\t\tif (sh > 0) this[this.t - 1] |= ((1 << (this.DB - sh)) - 1) << sh;\n\t\t}\n\t\tthis.clamp();\n\t\tif (mi) BigInteger.ZERO.subTo(this, this);\n\t}\n\t// (protected) clamp off excess high words\n\tfunction bnpClamp()\n\t{\n\t\tvar c = this.s & this.DM;\n\t\twhile (this.t > 0 && this[this.t - 1] == c) --this.t;\n\t}\n\t// (public) return string representation in given radix\n\tfunction bnToString(b)\n\t{\n\t\tif (this.s < 0) return \"-\" + this.negate().toString(b);\n\t\tvar k;\n\t\tif (b == 16) k = 4;\n\t\telse if (b == 8) k = 3;\n\t\telse if (b == 2) k = 1;\n\t\telse if (b == 32) k = 5;\n\t\telse if (b == 4) k = 2;\n\t\telse return this.toRadix(b);\n\t\tvar km = (1 << k) - 1,\n\t\t\td, m = false,\n\t\t\tr = \"\",\n\t\t\ti = this.t;\n\t\tvar p = this.DB - (i * this.DB) % k;\n\t\tif (i-- > 0)\n\t\t{\n\t\t\tif (p < this.DB && (d = this[i] >> p) > 0)\n\t\t\t{\n\t\t\t\tm = true;\n\t\t\t\tr = int2char(d);\n\t\t\t}\n\t\t\twhile (i >= 0)\n\t\t\t{\n\t\t\t\tif (p < k)\n\t\t\t\t{\n\t\t\t\t\td = (this[i] & ((1 << p) - 1)) << (k - p);\n\t\t\t\t\td |= this[--i] >> (p += this.DB - k);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\td = (this[i] >> (p -= k)) & km;\n\t\t\t\t\tif (p <= 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tp += this.DB;\n\t\t\t\t\t\t--i;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (d > 0) m = true;\n\t\t\t\tif (m) r += int2char(d);\n\t\t\t}\n\t\t}\n\t\treturn m ? r : \"0\";\n\t}\n\t// (public) -this\n\tfunction bnNegate()\n\t{\n\t\tvar r = nbi();\n\t\tBigInteger.ZERO.subTo(this, r);\n\t\treturn r;\n\t}\n\t// (public) |this|\n\tfunction bnAbs()\n\t{\n\t\treturn (this.s < 0) ? this.negate() : this;\n\t}\n\t// (public) return + if this > a, - if this < a, 0 if equal\n\tfunction bnCompareTo(a)\n\t{\n\t\tvar r = this.s - a.s;\n\t\tif (r != 0) return r;\n\t\tvar i = this.t;\n\t\tr = i - a.t;\n\t\tif (r != 0) return (this.s < 0) ? -r : r;\n\t\twhile (--i >= 0)\n\t\t\tif ((r = this[i] - a[i]) != 0) return r;\n\t\treturn 0;\n\t}\n\t// returns bit length of the integer x\n\tfunction nbits(x)\n\t{\n\t\tvar r = 1,\n\t\t\tt;\n\t\tif ((t = x >>> 16) != 0)\n\t\t{\n\t\t\tx = t;\n\t\t\tr += 16;\n\t\t}\n\t\tif ((t = x >> 8) != 0)\n\t\t{\n\t\t\tx = t;\n\t\t\tr += 8;\n\t\t}\n\t\tif ((t = x >> 4) != 0)\n\t\t{\n\t\t\tx = t;\n\t\t\tr += 4;\n\t\t}\n\t\tif ((t = x >> 2) != 0)\n\t\t{\n\t\t\tx = t;\n\t\t\tr += 2;\n\t\t}\n\t\tif ((t = x >> 1) != 0)\n\t\t{\n\t\t\tx = t;\n\t\t\tr += 1;\n\t\t}\n\t\treturn r;\n\t}\n\t// (public) return the number of bits in \"this\"\n\tfunction bnBitLength()\n\t{\n\t\tif (this.t <= 0) return 0;\n\t\treturn this.DB * (this.t - 1) + nbits(this[this.t - 1] ^ (this.s & this.DM));\n\t}\n\t// (protected) r = this << n*DB\n\tfunction bnpDLShiftTo(n, r)\n\t{\n\t\tvar i;\n\t\tfor (i = this.t - 1; i >= 0; --i) r[i + n] = this[i];\n\t\tfor (i = n - 1; i >= 0; --i) r[i] = 0;\n\t\tr.t = this.t + n;\n\t\tr.s = this.s;\n\t}\n\t// (protected) r = this >> n*DB\n\tfunction bnpDRShiftTo(n, r)\n\t{\n\t\tfor (var i = n; i < this.t; ++i) r[i - n] = this[i];\n\t\tr.t = Math.max(this.t - n, 0);\n\t\tr.s = this.s;\n\t}\n\t// (protected) r = this << n\n\tfunction bnpLShiftTo(n, r)\n\t{\n\t\tvar bs = n % this.DB;\n\t\tvar cbs = this.DB - bs;\n\t\tvar bm = (1 << cbs) - 1;\n\t\tvar ds = Math.floor(n / this.DB),\n\t\t\tc = (this.s << bs) & this.DM,\n\t\t\ti;\n\t\tfor (i = this.t - 1; i >= 0; --i)\n\t\t{\n\t\t\tr[i + ds + 1] = (this[i] >> cbs) | c;\n\t\t\tc = (this[i] & bm) << bs;\n\t\t}\n\t\tfor (i = ds - 1; i >= 0; --i) r[i] = 0;\n\t\tr[ds] = c;\n\t\tr.t = this.t + ds + 1;\n\t\tr.s = this.s;\n\t\tr.clamp();\n\t}\n\t// (protected) r = this >> n\n\tfunction bnpRShiftTo(n, r)\n\t{\n\t\tr.s = this.s;\n\t\tvar ds = Math.floor(n / this.DB);\n\t\tif (ds >= this.t)\n\t\t{\n\t\t\tr.t = 0;\n\t\t\treturn;\n\t\t}\n\t\tvar bs = n % this.DB;\n\t\tvar cbs = this.DB - bs;\n\t\tvar bm = (1 << bs) - 1;\n\t\tr[0] = this[ds] >> bs;\n\t\tfor (var i = ds + 1; i < this.t; ++i)\n\t\t{\n\t\t\tr[i - ds - 1] |= (this[i] & bm) << cbs;\n\t\t\tr[i - ds] = this[i] >> bs;\n\t\t}\n\t\tif (bs > 0) r[this.t - ds - 1] |= (this.s & bm) << cbs;\n\t\tr.t = this.t - ds;\n\t\tr.clamp();\n\t}\n\t// (protected) r = this - a\n\tfunction bnpSubTo(a, r)\n\t{\n\t\tvar i = 0,\n\t\t\tc = 0,\n\t\t\tm = Math.min(a.t, this.t);\n\t\twhile (i < m)\n\t\t{\n\t\t\tc += this[i] - a[i];\n\t\t\tr[i++] = c & this.DM;\n\t\t\tc >>= this.DB;\n\t\t}\n\t\tif (a.t < this.t)\n\t\t{\n\t\t\tc -= a.s;\n\t\t\twhile (i < this.t)\n\t\t\t{\n\t\t\t\tc += this[i];\n\t\t\t\tr[i++] = c & this.DM;\n\t\t\t\tc >>= this.DB;\n\t\t\t}\n\t\t\tc += this.s;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tc += this.s;\n\t\t\twhile (i < a.t)\n\t\t\t{\n\t\t\t\tc -= a[i];\n\t\t\t\tr[i++] = c & this.DM;\n\t\t\t\tc >>= this.DB;\n\t\t\t}\n\t\t\tc -= a.s;\n\t\t}\n\t\tr.s = (c < 0) ? -1 : 0;\n\t\tif (c < -1) r[i++] = this.DV + c;\n\t\telse if (c > 0) r[i++] = c;\n\t\tr.t = i;\n\t\tr.clamp();\n\t}\n\t// (protected) r = this * a, r != this,a (HAC 14.12)\n\t// \"this\" should be the larger one if appropriate.\n\tfunction bnpMultiplyTo(a, r)\n\t{\n\t\tvar x = this.abs(),\n\t\t\ty = a.abs();\n\t\tvar i = x.t;\n\t\tr.t = i + y.t;\n\t\twhile (--i >= 0) r[i] = 0;\n\t\tfor (i = 0; i < y.t; ++i) r[i + x.t] = x.am(0, y[i], r, i, 0, x.t);\n\t\tr.s = 0;\n\t\tr.clamp();\n\t\tif (this.s != a.s) BigInteger.ZERO.subTo(r, r);\n\t}\n\t// (protected) r = this^2, r != this (HAC 14.16)\n\tfunction bnpSquareTo(r)\n\t{\n\t\tvar x = this.abs();\n\t\tvar i = r.t = 2 * x.t;\n\t\twhile (--i >= 0) r[i] = 0;\n\t\tfor (i = 0; i < x.t - 1; ++i)\n\t\t{\n\t\t\tvar c = x.am(i, x[i], r, 2 * i, 0, 1);\n\t\t\tif ((r[i + x.t] += x.am(i + 1, 2 * x[i], r, 2 * i + 1, c, x.t - i - 1)) >= x.DV)\n\t\t\t{\n\t\t\t\tr[i + x.t] -= x.DV;\n\t\t\t\tr[i + x.t + 1] = 1;\n\t\t\t}\n\t\t}\n\t\tif (r.t > 0) r[r.t - 1] += x.am(i, x[i], r, 2 * i, 0, 1);\n\t\tr.s = 0;\n\t\tr.clamp();\n\t}\n\t// (protected) divide this by m, quotient and remainder to q, r (HAC 14.20)\n\t// r != q, this != m.  q or r may be null.\n\tfunction bnpDivRemTo(m, q, r)\n\t{\n\t\tvar pm = m.abs();\n\t\tif (pm.t <= 0) return;\n\t\tvar pt = this.abs();\n\t\tif (pt.t < pm.t)\n\t\t{\n\t\t\tif (q != null) q.fromInt(0);\n\t\t\tif (r != null) this.copyTo(r);\n\t\t\treturn;\n\t\t}\n\t\tif (r == null) r = nbi();\n\t\tvar y = nbi(),\n\t\t\tts = this.s,\n\t\t\tms = m.s;\n\t\tvar nsh = this.DB - nbits(pm[pm.t - 1]); // normalize modulus\n\t\tif (nsh > 0)\n\t\t{\n\t\t\tpm.lShiftTo(nsh, y);\n\t\t\tpt.lShiftTo(nsh, r);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tpm.copyTo(y);\n\t\t\tpt.copyTo(r);\n\t\t}\n\t\tvar ys = y.t;\n\t\tvar y0 = y[ys - 1];\n\t\tif (y0 == 0) return;\n\t\tvar yt = y0 * (1 << this.F1) + ((ys > 1) ? y[ys - 2] >> this.F2 : 0);\n\t\tvar d1 = this.FV / yt,\n\t\t\td2 = (1 << this.F1) / yt,\n\t\t\te = 1 << this.F2;\n\t\tvar i = r.t,\n\t\t\tj = i - ys,\n\t\t\tt = (q == null) ? nbi() : q;\n\t\ty.dlShiftTo(j, t);\n\t\tif (r.compareTo(t) >= 0)\n\t\t{\n\t\t\tr[r.t++] = 1;\n\t\t\tr.subTo(t, r);\n\t\t}\n\t\tBigInteger.ONE.dlShiftTo(ys, t);\n\t\tt.subTo(y, y); // \"negative\" y so we can replace sub with am later\n\t\twhile (y.t < ys) y[y.t++] = 0;\n\t\twhile (--j >= 0)\n\t\t{\n\t\t\t// Estimate quotient digit\n\t\t\tvar qd = (r[--i] == y0) ? this.DM : Math.floor(r[i] * d1 + (r[i - 1] + e) * d2);\n\t\t\tif ((r[i] += y.am(0, qd, r, j, 0, ys)) < qd)\n\t\t\t{ // Try it out\n\t\t\t\ty.dlShiftTo(j, t);\n\t\t\t\tr.subTo(t, r);\n\t\t\t\twhile (r[i] < --qd) r.subTo(t, r);\n\t\t\t}\n\t\t}\n\t\tif (q != null)\n\t\t{\n\t\t\tr.drShiftTo(ys, q);\n\t\t\tif (ts != ms) BigInteger.ZERO.subTo(q, q);\n\t\t}\n\t\tr.t = ys;\n\t\tr.clamp();\n\t\tif (nsh > 0) r.rShiftTo(nsh, r); // Denormalize remainder\n\t\tif (ts < 0) BigInteger.ZERO.subTo(r, r);\n\t}\n\t// (public) this mod a\n\tfunction bnMod(a)\n\t{\n\t\tvar r = nbi();\n\t\tthis.abs().divRemTo(a, null, r);\n\t\tif (this.s < 0 && r.compareTo(BigInteger.ZERO) > 0) a.subTo(r, r);\n\t\treturn r;\n\t}\n\t// Modular reduction using \"classic\" algorithm\n\t/**\n\t* @constructor\n\t*/\n\tfunction Classic(m)\n\t{\n\t\tthis.m = m;\n\t}\n\n\tfunction cConvert(x)\n\t{\n\t\tif (x.s < 0 || x.compareTo(this.m) >= 0) return x.mod(this.m);\n\t\telse return x;\n\t}\n\n\tfunction cRevert(x)\n\t{\n\t\treturn x;\n\t}\n\n\tfunction cReduce(x)\n\t{\n\t\tx.divRemTo(this.m, null, x);\n\t}\n\n\tfunction cMulTo(x, y, r)\n\t{\n\t\tx.multiplyTo(y, r);\n\t\tthis.reduce(r);\n\t}\n\n\tfunction cSqrTo(x, r)\n\t{\n\t\tx.squareTo(r);\n\t\tthis.reduce(r);\n\t}\n\tClassic.prototype.convert = cConvert;\n\tClassic.prototype.revert = cRevert;\n\tClassic.prototype.reduce = cReduce;\n\tClassic.prototype.mulTo = cMulTo;\n\tClassic.prototype.sqrTo = cSqrTo;\n\t// (protected) return \"-1/this % 2^DB\"; useful for Mont. reduction\n\t// justification:\n\t//         xy == 1 (mod m)\n\t//         xy =  1+km\n\t//   xy(2-xy) = (1+km)(1-km)\n\t// x[y(2-xy)] = 1-k^2m^2\n\t// x[y(2-xy)] == 1 (mod m^2)\n\t// if y is 1/x mod m, then y(2-xy) is 1/x mod m^2\n\t// should reduce x and y(2-xy) by m^2 at each step to keep size bounded.\n\t// JS multiply \"overflows\" differently from C/C++, so care is needed here.\n\tfunction bnpInvDigit()\n\t{\n\t\tif (this.t < 1) return 0;\n\t\tvar x = this[0];\n\t\tif ((x & 1) == 0) return 0;\n\t\tvar y = x & 3; // y == 1/x mod 2^2\n\t\ty = (y * (2 - (x & 0xf) * y)) & 0xf; // y == 1/x mod 2^4\n\t\ty = (y * (2 - (x & 0xff) * y)) & 0xff; // y == 1/x mod 2^8\n\t\ty = (y * (2 - (((x & 0xffff) * y) & 0xffff))) & 0xffff; // y == 1/x mod 2^16\n\t\t// last step - calculate inverse mod DV directly;\n\t\t// assumes 16 < DB <= 32 and assumes ability to handle 48-bit ints\n\t\ty = (y * (2 - x * y % this.DV)) % this.DV; // y == 1/x mod 2^dbits\n\t\t// we really want the negative inverse, and -DV < y < DV\n\t\treturn (y > 0) ? this.DV - y : -y;\n\t}\n\t// Montgomery reduction\n\t/**\n\t* @constructor\n\t*/\n\tfunction Montgomery(m)\n\t{\n\t\tthis.m = m;\n\t\tthis.mp = m.invDigit();\n\t\tthis.mpl = this.mp & 0x7fff;\n\t\tthis.mph = this.mp >> 15;\n\t\tthis.um = (1 << (m.DB - 15)) - 1;\n\t\tthis.mt2 = 2 * m.t;\n\t}\n\t// xR mod m\n\tfunction montConvert(x)\n\t{\n\t\tvar r = nbi();\n\t\tx.abs().dlShiftTo(this.m.t, r);\n\t\tr.divRemTo(this.m, null, r);\n\t\tif (x.s < 0 && r.compareTo(BigInteger.ZERO) > 0) this.m.subTo(r, r);\n\t\treturn r;\n\t}\n\t// x/R mod m\n\tfunction montRevert(x)\n\t{\n\t\tvar r = nbi();\n\t\tx.copyTo(r);\n\t\tthis.reduce(r);\n\t\treturn r;\n\t}\n\t// x = x/R mod m (HAC 14.32)\n\tfunction montReduce(x)\n\t{\n\t\twhile (x.t <= this.mt2) // pad x so am has enough room later\n\t\t\tx[x.t++] = 0;\n\t\tfor (var i = 0; i < this.m.t; ++i)\n\t\t{\n\t\t\t// faster way of calculating u0 = x[i]*mp mod DV\n\t\t\tvar j = x[i] & 0x7fff;\n\t\t\tvar u0 = (j * this.mpl + (((j * this.mph + (x[i] >> 15) * this.mpl) & this.um) << 15)) & x.DM;\n\t\t\t// use am to combine the multiply-shift-add into one call\n\t\t\tj = i + this.m.t;\n\t\t\tx[j] += this.m.am(0, u0, x, i, 0, this.m.t);\n\t\t\t// propagate carry\n\t\t\twhile (x[j] >= x.DV)\n\t\t\t{\n\t\t\t\tx[j] -= x.DV;\n\t\t\t\tx[++j]++;\n\t\t\t}\n\t\t}\n\t\tx.clamp();\n\t\tx.drShiftTo(this.m.t, x);\n\t\tif (x.compareTo(this.m) >= 0) x.subTo(this.m, x);\n\t}\n\t// r = \"x^2/R mod m\"; x != r\n\tfunction montSqrTo(x, r)\n\t{\n\t\tx.squareTo(r);\n\t\tthis.reduce(r);\n\t}\n\t// r = \"xy/R mod m\"; x,y != r\n\tfunction montMulTo(x, y, r)\n\t{\n\t\tx.multiplyTo(y, r);\n\t\tthis.reduce(r);\n\t}\n\tMontgomery.prototype.convert = montConvert;\n\tMontgomery.prototype.revert = montRevert;\n\tMontgomery.prototype.reduce = montReduce;\n\tMontgomery.prototype.mulTo = montMulTo;\n\tMontgomery.prototype.sqrTo = montSqrTo;\n\t// (protected) true iff this is even\n\tfunction bnpIsEven()\n\t{\n\t\treturn ((this.t > 0) ? (this[0] & 1) : this.s) == 0;\n\t}\n\t// (protected) this^e, e < 2^32, doing sqr and mul with \"r\" (HAC 14.79)\n\tfunction bnpExp(e, z)\n\t{\n\t\tif (e > 0xffffffff || e < 1) return BigInteger.ONE;\n\t\tvar r = nbi(),\n\t\t\tr2 = nbi(),\n\t\t\tg = z.convert(this),\n\t\t\ti = nbits(e) - 1;\n\t\tg.copyTo(r);\n\t\twhile (--i >= 0)\n\t\t{\n\t\t\tz.sqrTo(r, r2);\n\t\t\tif ((e & (1 << i)) > 0) z.mulTo(r2, g, r);\n\t\t\telse\n\t\t\t{\n\t\t\t\tvar t = r;\n\t\t\t\tr = r2;\n\t\t\t\tr2 = t;\n\t\t\t}\n\t\t}\n\t\treturn z.revert(r);\n\t}\n\t// (public) this^e % m, 0 <= e < 2^32\n\tfunction bnModPowInt(e, m)\n\t{\n\t\tvar z;\n\t\tif (e < 256 || m.isEven()) z = new Classic(m);\n\t\telse z = new Montgomery(m);\n\t\treturn this.exp(e, z);\n\t}\n\t// protected\n\tBigInteger.prototype.copyTo = bnpCopyTo;\n\tBigInteger.prototype.fromInt = bnpFromInt;\n\tBigInteger.prototype.fromString = bnpFromString;\n\tBigInteger.prototype.clamp = bnpClamp;\n\tBigInteger.prototype.dlShiftTo = bnpDLShiftTo;\n\tBigInteger.prototype.drShiftTo = bnpDRShiftTo;\n\tBigInteger.prototype.lShiftTo = bnpLShiftTo;\n\tBigInteger.prototype.rShiftTo = bnpRShiftTo;\n\tBigInteger.prototype.subTo = bnpSubTo;\n\tBigInteger.prototype.multiplyTo = bnpMultiplyTo;\n\tBigInteger.prototype.squareTo = bnpSquareTo;\n\tBigInteger.prototype.divRemTo = bnpDivRemTo;\n\tBigInteger.prototype.invDigit = bnpInvDigit;\n\tBigInteger.prototype.isEven = bnpIsEven;\n\tBigInteger.prototype.exp = bnpExp;\n\t// public\n\tBigInteger.prototype.toString = bnToString;\n\tBigInteger.prototype.negate = bnNegate;\n\tBigInteger.prototype.abs = bnAbs;\n\tBigInteger.prototype.compareTo = bnCompareTo;\n\tBigInteger.prototype.bitLength = bnBitLength;\n\tBigInteger.prototype.mod = bnMod;\n\tBigInteger.prototype.modPowInt = bnModPowInt;\n\t// \"constants\"\n\tBigInteger.ZERO = nbv(0);\n\tBigInteger.ONE = nbv(1);\n\t// Copyright (c) 2005-2009  Tom Wu\n\t// All Rights Reserved.\n\t// See \"LICENSE\" for details.\n\t// Extended JavaScript BN functions, required for RSA private ops.\n\t// Version 1.1: new BigInteger(\"0\", 10) returns \"proper\" zero\n\t// Version 1.2: square() API, isProbablePrime fix\n\t// (public)\n\tfunction bnClone()\n\t{\n\t\tvar r = nbi();\n\t\tthis.copyTo(r);\n\t\treturn r;\n\t}\n\t// (public) return value as integer\n\tfunction bnIntValue()\n\t{\n\t\tif (this.s < 0)\n\t\t{\n\t\t\tif (this.t == 1) return this[0] - this.DV;\n\t\t\telse if (this.t == 0) return -1;\n\t\t}\n\t\telse if (this.t == 1) return this[0];\n\t\telse if (this.t == 0) return 0;\n\t\t// assumes 16 < DB < 32\n\t\treturn ((this[1] & ((1 << (32 - this.DB)) - 1)) << this.DB) | this[0];\n\t}\n\t// (public) return value as byte\n\tfunction bnByteValue()\n\t{\n\t\treturn (this.t == 0) ? this.s : (this[0] << 24) >> 24;\n\t}\n\t// (public) return value as short (assumes DB>=16)\n\tfunction bnShortValue()\n\t{\n\t\treturn (this.t == 0) ? this.s : (this[0] << 16) >> 16;\n\t}\n\t// (protected) return x s.t. r^x < DV\n\tfunction bnpChunkSize(r)\n\t{\n\t\treturn Math.floor(Math.LN2 * this.DB / Math.log(r));\n\t}\n\t// (public) 0 if this == 0, 1 if this > 0\n\tfunction bnSigNum()\n\t{\n\t\tif (this.s < 0) return -1;\n\t\telse if (this.t <= 0 || (this.t == 1 && this[0] <= 0)) return 0;\n\t\telse return 1;\n\t}\n\t// (protected) convert to radix string\n\tfunction bnpToRadix(b)\n\t{\n\t\tif (b == null) b = 10;\n\t\tif (this.signum() == 0 || b < 2 || b > 36) return \"0\";\n\t\tvar cs = this.chunkSize(b);\n\t\tvar a = Math.pow(b, cs);\n\t\tvar d = nbv(a),\n\t\t\ty = nbi(),\n\t\t\tz = nbi(),\n\t\t\tr = \"\";\n\t\tthis.divRemTo(d, y, z);\n\t\twhile (y.signum() > 0)\n\t\t{\n\t\t\tr = (a + z.intValue()).toString(b).substr(1) + r;\n\t\t\ty.divRemTo(d, y, z);\n\t\t}\n\t\treturn z.intValue().toString(b) + r;\n\t}\n\t// (protected) convert from radix string\n\tfunction bnpFromRadix(s, b)\n\t{\n\t\tthis.fromInt(0);\n\t\tif (b == null) b = 10;\n\t\tvar cs = this.chunkSize(b);\n\t\tvar d = Math.pow(b, cs),\n\t\t\tmi = false,\n\t\t\tj = 0,\n\t\t\tw = 0;\n\t\tfor (var i = 0; i < s.length; ++i)\n\t\t{\n\t\t\tvar x = intAt(s, i);\n\t\t\tif (x < 0)\n\t\t\t{\n\t\t\t\tif (s.charAt(i) == \"-\" && this.signum() == 0) mi = true;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tw = b * w + x;\n\t\t\tif (++j >= cs)\n\t\t\t{\n\t\t\t\tthis.dMultiply(d);\n\t\t\t\tthis.dAddOffset(w, 0);\n\t\t\t\tj = 0;\n\t\t\t\tw = 0;\n\t\t\t}\n\t\t}\n\t\tif (j > 0)\n\t\t{\n\t\t\tthis.dMultiply(Math.pow(b, j));\n\t\t\tthis.dAddOffset(w, 0);\n\t\t}\n\t\tif (mi) BigInteger.ZERO.subTo(this, this);\n\t}\n\t// (protected) alternate constructor\n\tfunction bnpFromNumber(a, b, c)\n\t{\n\t\tif (\"number\" == typeof b)\n\t\t{\n\t\t\t// new BigInteger(int,int,RNG)\n\t\t\tif (a < 2) this.fromInt(1);\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.fromNumber(a, c);\n\t\t\t\tif (!this.testBit(a - 1)) // force MSB set\n\t\t\t\t\tthis.bitwiseTo(BigInteger.ONE.shiftLeft(a - 1), op_or, this);\n\t\t\t\tif (this.isEven()) this.dAddOffset(1, 0); // force odd\n\t\t\t\twhile (!this.isProbablePrime(b))\n\t\t\t\t{\n\t\t\t\t\tthis.dAddOffset(2, 0);\n\t\t\t\t\tif (this.bitLength() > a) this.subTo(BigInteger.ONE.shiftLeft(a - 1), this);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// new BigInteger(int,RNG)\n\t\t\tvar x = new Array(),\n\t\t\t\tt = a & 7;\n\t\t\tx.length = (a >> 3) + 1;\n\t\t\tb.nextBytes(x);\n\t\t\tif (t > 0) x[0] &= ((1 << t) - 1);\n\t\t\telse x[0] = 0;\n\t\t\tthis.fromString(x, 256);\n\t\t}\n\t}\n\t// (public) convert to bigendian byte array\n\tfunction bnToByteArray()\n\t{\n\t\tvar i = this.t,\n\t\t\tr = new Array();\n\t\tr[0] = this.s;\n\t\tvar p = this.DB - (i * this.DB) % 8,\n\t\t\td, k = 0;\n\t\tif (i-- > 0)\n\t\t{\n\t\t\tif (p < this.DB && (d = this[i] >> p) != (this.s & this.DM) >> p)\n\t\t\t\tr[k++] = d | (this.s << (this.DB - p));\n\t\t\twhile (i >= 0)\n\t\t\t{\n\t\t\t\tif (p < 8)\n\t\t\t\t{\n\t\t\t\t\td = (this[i] & ((1 << p) - 1)) << (8 - p);\n\t\t\t\t\td |= this[--i] >> (p += this.DB - 8);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\td = (this[i] >> (p -= 8)) & 0xff;\n\t\t\t\t\tif (p <= 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tp += this.DB;\n\t\t\t\t\t\t--i;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ((d & 0x80) != 0) d |= -256;\n\t\t\t\tif (k == 0 && (this.s & 0x80) != (d & 0x80)) ++k;\n\t\t\t\tif (k > 0 || d != this.s) r[k++] = d;\n\t\t\t}\n\t\t}\n\t\treturn r;\n\t}\n\n\tfunction bnEquals(a)\n\t{\n\t\treturn (this.compareTo(a) == 0);\n\t}\n\n\tfunction bnMin(a)\n\t{\n\t\treturn (this.compareTo(a) < 0) ? this : a;\n\t}\n\n\tfunction bnMax(a)\n\t{\n\t\treturn (this.compareTo(a) > 0) ? this : a;\n\t}\n\t// (protected) r = this op a (bitwise)\n\tfunction bnpBitwiseTo(a, op, r)\n\t{\n\t\tvar i, f, m = Math.min(a.t, this.t);\n\t\tfor (i = 0; i < m; ++i) r[i] = op(this[i], a[i]);\n\t\tif (a.t < this.t)\n\t\t{\n\t\t\tf = a.s & this.DM;\n\t\t\tfor (i = m; i < this.t; ++i) r[i] = op(this[i], f);\n\t\t\tr.t = this.t;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tf = this.s & this.DM;\n\t\t\tfor (i = m; i < a.t; ++i) r[i] = op(f, a[i]);\n\t\t\tr.t = a.t;\n\t\t}\n\t\tr.s = op(this.s, a.s);\n\t\tr.clamp();\n\t}\n\t// (public) this & a\n\tfunction op_and(x, y)\n\t{\n\t\treturn x & y;\n\t}\n\n\tfunction bnAnd(a)\n\t{\n\t\tvar r = nbi();\n\t\tthis.bitwiseTo(a, op_and, r);\n\t\treturn r;\n\t}\n\t// (public) this | a\n\tfunction op_or(x, y)\n\t{\n\t\treturn x | y;\n\t}\n\n\tfunction bnOr(a)\n\t{\n\t\tvar r = nbi();\n\t\tthis.bitwiseTo(a, op_or, r);\n\t\treturn r;\n\t}\n\t// (public) this ^ a\n\tfunction op_xor(x, y)\n\t{\n\t\treturn x ^ y;\n\t}\n\n\tfunction bnXor(a)\n\t{\n\t\tvar r = nbi();\n\t\tthis.bitwiseTo(a, op_xor, r);\n\t\treturn r;\n\t}\n\t// (public) this & ~a\n\tfunction op_andnot(x, y)\n\t{\n\t\treturn x & ~y;\n\t}\n\n\tfunction bnAndNot(a)\n\t{\n\t\tvar r = nbi();\n\t\tthis.bitwiseTo(a, op_andnot, r);\n\t\treturn r;\n\t}\n\t// (public) ~this\n\tfunction bnNot()\n\t{\n\t\tvar r = nbi();\n\t\tfor (var i = 0; i < this.t; ++i) r[i] = this.DM & ~this[i];\n\t\tr.t = this.t;\n\t\tr.s = ~this.s;\n\t\treturn r;\n\t}\n\t// (public) this << n\n\tfunction bnShiftLeft(n)\n\t{\n\t\tvar r = nbi();\n\t\tif (n < 0) this.rShiftTo(-n, r);\n\t\telse this.lShiftTo(n, r);\n\t\treturn r;\n\t}\n\t// (public) this >> n\n\tfunction bnShiftRight(n)\n\t{\n\t\tvar r = nbi();\n\t\tif (n < 0) this.lShiftTo(-n, r);\n\t\telse this.rShiftTo(n, r);\n\t\treturn r;\n\t}\n\t// return index of lowest 1-bit in x, x < 2^31\n\tfunction lbit(x)\n\t{\n\t\tif (x == 0) return -1;\n\t\tvar r = 0;\n\t\tif ((x & 0xffff) == 0)\n\t\t{\n\t\t\tx >>= 16;\n\t\t\tr += 16;\n\t\t}\n\t\tif ((x & 0xff) == 0)\n\t\t{\n\t\t\tx >>= 8;\n\t\t\tr += 8;\n\t\t}\n\t\tif ((x & 0xf) == 0)\n\t\t{\n\t\t\tx >>= 4;\n\t\t\tr += 4;\n\t\t}\n\t\tif ((x & 3) == 0)\n\t\t{\n\t\t\tx >>= 2;\n\t\t\tr += 2;\n\t\t}\n\t\tif ((x & 1) == 0) ++r;\n\t\treturn r;\n\t}\n\t// (public) returns index of lowest 1-bit (or -1 if none)\n\tfunction bnGetLowestSetBit()\n\t{\n\t\tfor (var i = 0; i < this.t; ++i)\n\t\t\tif (this[i] != 0) return i * this.DB + lbit(this[i]);\n\t\tif (this.s < 0) return this.t * this.DB;\n\t\treturn -1;\n\t}\n\t// return number of 1 bits in x\n\tfunction cbit(x)\n\t{\n\t\tvar r = 0;\n\t\twhile (x != 0)\n\t\t{\n\t\t\tx &= x - 1;\n\t\t\t++r;\n\t\t}\n\t\treturn r;\n\t}\n\t// (public) return number of set bits\n\tfunction bnBitCount()\n\t{\n\t\tvar r = 0,\n\t\t\tx = this.s & this.DM;\n\t\tfor (var i = 0; i < this.t; ++i) r += cbit(this[i] ^ x);\n\t\treturn r;\n\t}\n\t// (public) true iff nth bit is set\n\tfunction bnTestBit(n)\n\t{\n\t\tvar j = Math.floor(n / this.DB);\n\t\tif (j >= this.t) return (this.s != 0);\n\t\treturn ((this[j] & (1 << (n % this.DB))) != 0);\n\t}\n\t// (protected) this op (1<<n)\n\tfunction bnpChangeBit(n, op)\n\t{\n\t\tvar r = BigInteger.ONE.shiftLeft(n);\n\t\tthis.bitwiseTo(r, op, r);\n\t\treturn r;\n\t}\n\t// (public) this | (1<<n)\n\tfunction bnSetBit(n)\n\t{\n\t\treturn this.changeBit(n, op_or);\n\t}\n\t// (public) this & ~(1<<n)\n\tfunction bnClearBit(n)\n\t{\n\t\treturn this.changeBit(n, op_andnot);\n\t}\n\t// (public) this ^ (1<<n)\n\tfunction bnFlipBit(n)\n\t{\n\t\treturn this.changeBit(n, op_xor);\n\t}\n\t// (protected) r = this + a\n\tfunction bnpAddTo(a, r)\n\t{\n\t\tvar i = 0,\n\t\t\tc = 0,\n\t\t\tm = Math.min(a.t, this.t);\n\t\twhile (i < m)\n\t\t{\n\t\t\tc += this[i] + a[i];\n\t\t\tr[i++] = c & this.DM;\n\t\t\tc >>= this.DB;\n\t\t}\n\t\tif (a.t < this.t)\n\t\t{\n\t\t\tc += a.s;\n\t\t\twhile (i < this.t)\n\t\t\t{\n\t\t\t\tc += this[i];\n\t\t\t\tr[i++] = c & this.DM;\n\t\t\t\tc >>= this.DB;\n\t\t\t}\n\t\t\tc += this.s;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tc += this.s;\n\t\t\twhile (i < a.t)\n\t\t\t{\n\t\t\t\tc += a[i];\n\t\t\t\tr[i++] = c & this.DM;\n\t\t\t\tc >>= this.DB;\n\t\t\t}\n\t\t\tc += a.s;\n\t\t}\n\t\tr.s = (c < 0) ? -1 : 0;\n\t\tif (c > 0) r[i++] = c;\n\t\telse if (c < -1) r[i++] = this.DV + c;\n\t\tr.t = i;\n\t\tr.clamp();\n\t}\n\t// (public) this + a\n\tfunction bnAdd(a)\n\t{\n\t\tvar r = nbi();\n\t\tthis.addTo(a, r);\n\t\treturn r;\n\t}\n\t// (public) this - a\n\tfunction bnSubtract(a)\n\t{\n\t\tvar r = nbi();\n\t\tthis.subTo(a, r);\n\t\treturn r;\n\t}\n\t// (public) this * a\n\tfunction bnMultiply(a)\n\t{\n\t\tvar r = nbi();\n\t\tthis.multiplyTo(a, r);\n\t\treturn r;\n\t}\n\t// (public) this^2\n\tfunction bnSquare()\n\t{\n\t\tvar r = nbi();\n\t\tthis.squareTo(r);\n\t\treturn r;\n\t}\n\t// (public) this / a\n\tfunction bnDivide(a)\n\t{\n\t\tvar r = nbi();\n\t\tthis.divRemTo(a, r, null);\n\t\treturn r;\n\t}\n\t// (public) this % a\n\tfunction bnRemainder(a)\n\t{\n\t\tvar r = nbi();\n\t\tthis.divRemTo(a, null, r);\n\t\treturn r;\n\t}\n\t// (public) [this/a,this%a]\n\tfunction bnDivideAndRemainder(a)\n\t{\n\t\tvar q = nbi(),\n\t\t\tr = nbi();\n\t\tthis.divRemTo(a, q, r);\n\t\treturn new Array(q, r);\n\t}\n\t// (protected) this *= n, this >= 0, 1 < n < DV\n\tfunction bnpDMultiply(n)\n\t{\n\t\tthis[this.t] = this.am(0, n - 1, this, 0, 0, this.t);\n\t\t++this.t;\n\t\tthis.clamp();\n\t}\n\t// (protected) this += n << w words, this >= 0\n\tfunction bnpDAddOffset(n, w)\n\t{\n\t\tif (n == 0) return;\n\t\twhile (this.t <= w) this[this.t++] = 0;\n\t\tthis[w] += n;\n\t\twhile (this[w] >= this.DV)\n\t\t{\n\t\t\tthis[w] -= this.DV;\n\t\t\tif (++w >= this.t) this[this.t++] = 0;\n\t\t\t++this[w];\n\t\t}\n\t}\n\t// A \"null\" reducer\n\t/**\n\t* @constructor\n\t*/\n\tfunction NullExp()\n\t{}\n\n\tfunction nNop(x)\n\t{\n\t\treturn x;\n\t}\n\n\tfunction nMulTo(x, y, r)\n\t{\n\t\tx.multiplyTo(y, r);\n\t}\n\n\tfunction nSqrTo(x, r)\n\t{\n\t\tx.squareTo(r);\n\t}\n\tNullExp.prototype.convert = nNop;\n\tNullExp.prototype.revert = nNop;\n\tNullExp.prototype.mulTo = nMulTo;\n\tNullExp.prototype.sqrTo = nSqrTo;\n\t// (public) this^e\n\tfunction bnPow(e)\n\t{\n\t\treturn this.exp(e, new NullExp());\n\t}\n\t// (protected) r = lower n words of \"this * a\", a.t <= n\n\t// \"this\" should be the larger one if appropriate.\n\tfunction bnpMultiplyLowerTo(a, n, r)\n\t{\n\t\tvar i = Math.min(this.t + a.t, n);\n\t\tr.s = 0; // assumes a,this >= 0\n\t\tr.t = i;\n\t\twhile (i > 0) r[--i] = 0;\n\t\tvar j;\n\t\tfor (j = r.t - this.t; i < j; ++i) r[i + this.t] = this.am(0, a[i], r, i, 0, this.t);\n\t\tfor (j = Math.min(a.t, n); i < j; ++i) this.am(0, a[i], r, i, 0, n - i);\n\t\tr.clamp();\n\t}\n\t// (protected) r = \"this * a\" without lower n words, n > 0\n\t// \"this\" should be the larger one if appropriate.\n\tfunction bnpMultiplyUpperTo(a, n, r)\n\t{\n\t\t--n;\n\t\tvar i = r.t = this.t + a.t - n;\n\t\tr.s = 0; // assumes a,this >= 0\n\t\twhile (--i >= 0) r[i] = 0;\n\t\tfor (i = Math.max(n - this.t, 0); i < a.t; ++i)\n\t\t\tr[this.t + i - n] = this.am(n - i, a[i], r, 0, 0, this.t + i - n);\n\t\tr.clamp();\n\t\tr.drShiftTo(1, r);\n\t}\n\t// Barrett modular reduction\n\t/**\n\t* @constructor\n\t*/\n\tfunction Barrett(m)\n\t{\n\t\t// setup Barrett\n\t\tthis.r2 = nbi();\n\t\tthis.q3 = nbi();\n\t\tBigInteger.ONE.dlShiftTo(2 * m.t, this.r2);\n\t\tthis.mu = this.r2.divide(m);\n\t\tthis.m = m;\n\t}\n\n\tfunction barrettConvert(x)\n\t{\n\t\tif (x.s < 0 || x.t > 2 * this.m.t) return x.mod(this.m);\n\t\telse if (x.compareTo(this.m) < 0) return x;\n\t\telse\n\t\t{\n\t\t\tvar r = nbi();\n\t\t\tx.copyTo(r);\n\t\t\tthis.reduce(r);\n\t\t\treturn r;\n\t\t}\n\t}\n\n\tfunction barrettRevert(x)\n\t{\n\t\treturn x;\n\t}\n\t// x = x mod m (HAC 14.42)\n\tfunction barrettReduce(x)\n\t{\n\t\tx.drShiftTo(this.m.t - 1, this.r2);\n\t\tif (x.t > this.m.t + 1)\n\t\t{\n\t\t\tx.t = this.m.t + 1;\n\t\t\tx.clamp();\n\t\t}\n\t\tthis.mu.multiplyUpperTo(this.r2, this.m.t + 1, this.q3);\n\t\tthis.m.multiplyLowerTo(this.q3, this.m.t + 1, this.r2);\n\t\twhile (x.compareTo(this.r2) < 0) x.dAddOffset(1, this.m.t + 1);\n\t\tx.subTo(this.r2, x);\n\t\twhile (x.compareTo(this.m) >= 0) x.subTo(this.m, x);\n\t}\n\t// r = x^2 mod m; x != r\n\tfunction barrettSqrTo(x, r)\n\t{\n\t\tx.squareTo(r);\n\t\tthis.reduce(r);\n\t}\n\t// r = x*y mod m; x,y != r\n\tfunction barrettMulTo(x, y, r)\n\t{\n\t\tx.multiplyTo(y, r);\n\t\tthis.reduce(r);\n\t}\n\tBarrett.prototype.convert = barrettConvert;\n\tBarrett.prototype.revert = barrettRevert;\n\tBarrett.prototype.reduce = barrettReduce;\n\tBarrett.prototype.mulTo = barrettMulTo;\n\tBarrett.prototype.sqrTo = barrettSqrTo;\n\t// (public) this^e % m (HAC 14.85)\n\tfunction bnModPow(e, m)\n\t{\n\t\tvar i = e.bitLength(),\n\t\t\tk, r = nbv(1),\n\t\t\tz;\n\t\tif (i <= 0) return r;\n\t\telse if (i < 18) k = 1;\n\t\telse if (i < 48) k = 3;\n\t\telse if (i < 144) k = 4;\n\t\telse if (i < 768) k = 5;\n\t\telse k = 6;\n\t\tif (i < 8)\n\t\t\tz = new Classic(m);\n\t\telse if (m.isEven())\n\t\t\tz = new Barrett(m);\n\t\telse\n\t\t\tz = new Montgomery(m);\n\t\t// precomputation\n\t\tvar g = new Array(),\n\t\t\tn = 3,\n\t\t\tk1 = k - 1,\n\t\t\tkm = (1 << k) - 1;\n\t\tg[1] = z.convert(this);\n\t\tif (k > 1)\n\t\t{\n\t\t\tvar g2 = nbi();\n\t\t\tz.sqrTo(g[1], g2);\n\t\t\twhile (n <= km)\n\t\t\t{\n\t\t\t\tg[n] = nbi();\n\t\t\t\tz.mulTo(g2, g[n - 2], g[n]);\n\t\t\t\tn += 2;\n\t\t\t}\n\t\t}\n\t\tvar j = e.t - 1,\n\t\t\tw, is1 = true,\n\t\t\tr2 = nbi(),\n\t\t\tt;\n\t\ti = nbits(e[j]) - 1;\n\t\twhile (j >= 0)\n\t\t{\n\t\t\tif (i >= k1) w = (e[j] >> (i - k1)) & km;\n\t\t\telse\n\t\t\t{\n\t\t\t\tw = (e[j] & ((1 << (i + 1)) - 1)) << (k1 - i);\n\t\t\t\tif (j > 0) w |= e[j - 1] >> (this.DB + i - k1);\n\t\t\t}\n\t\t\tn = k;\n\t\t\twhile ((w & 1) == 0)\n\t\t\t{\n\t\t\t\tw >>= 1;\n\t\t\t\t--n;\n\t\t\t}\n\t\t\tif ((i -= n) < 0)\n\t\t\t{\n\t\t\t\ti += this.DB;\n\t\t\t\t--j;\n\t\t\t}\n\t\t\tif (is1)\n\t\t\t{ // ret == 1, don't bother squaring or multiplying it\n\t\t\t\tg[w].copyTo(r);\n\t\t\t\tis1 = false;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\twhile (n > 1)\n\t\t\t\t{\n\t\t\t\t\tz.sqrTo(r, r2);\n\t\t\t\t\tz.sqrTo(r2, r);\n\t\t\t\t\tn -= 2;\n\t\t\t\t}\n\t\t\t\tif (n > 0) z.sqrTo(r, r2);\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tt = r;\n\t\t\t\t\tr = r2;\n\t\t\t\t\tr2 = t;\n\t\t\t\t}\n\t\t\t\tz.mulTo(r2, g[w], r);\n\t\t\t}\n\t\t\twhile (j >= 0 && (e[j] & (1 << i)) == 0)\n\t\t\t{\n\t\t\t\tz.sqrTo(r, r2);\n\t\t\t\tt = r;\n\t\t\t\tr = r2;\n\t\t\t\tr2 = t;\n\t\t\t\tif (--i < 0)\n\t\t\t\t{\n\t\t\t\t\ti = this.DB - 1;\n\t\t\t\t\t--j;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn z.revert(r);\n\t}\n\t// (public) gcd(this,a) (HAC 14.54)\n\tfunction bnGCD(a)\n\t{\n\t\tvar x = (this.s < 0) ? this.negate() : this.clone();\n\t\tvar y = (a.s < 0) ? a.negate() : a.clone();\n\t\tif (x.compareTo(y) < 0)\n\t\t{\n\t\t\tvar t = x;\n\t\t\tx = y;\n\t\t\ty = t;\n\t\t}\n\t\tvar i = x.getLowestSetBit(),\n\t\t\tg = y.getLowestSetBit();\n\t\tif (g < 0) return x;\n\t\tif (i < g) g = i;\n\t\tif (g > 0)\n\t\t{\n\t\t\tx.rShiftTo(g, x);\n\t\t\ty.rShiftTo(g, y);\n\t\t}\n\t\twhile (x.signum() > 0)\n\t\t{\n\t\t\tif ((i = x.getLowestSetBit()) > 0) x.rShiftTo(i, x);\n\t\t\tif ((i = y.getLowestSetBit()) > 0) y.rShiftTo(i, y);\n\t\t\tif (x.compareTo(y) >= 0)\n\t\t\t{\n\t\t\t\tx.subTo(y, x);\n\t\t\t\tx.rShiftTo(1, x);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\ty.subTo(x, y);\n\t\t\t\ty.rShiftTo(1, y);\n\t\t\t}\n\t\t}\n\t\tif (g > 0) y.lShiftTo(g, y);\n\t\treturn y;\n\t}\n\t// (protected) this % n, n < 2^26\n\tfunction bnpModInt(n)\n\t{\n\t\tif (n <= 0) return 0;\n\t\tvar d = this.DV % n,\n\t\t\tr = (this.s < 0) ? n - 1 : 0;\n\t\tif (this.t > 0)\n\t\t\tif (d == 0) r = this[0] % n;\n\t\t\telse\n\t\t\t\tfor (var i = this.t - 1; i >= 0; --i) r = (d * r + this[i]) % n;\n\t\treturn r;\n\t}\n\t// (public) 1/this % m (HAC 14.61)\n\tfunction bnModInverse(m)\n\t{\n\t\tvar ac = m.isEven();\n\t\tif ((this.isEven() && ac) || m.signum() == 0) return BigInteger.ZERO;\n\t\tvar u = m.clone(),\n\t\t\tv = this.clone();\n\t\tvar a = nbv(1),\n\t\t\tb = nbv(0),\n\t\t\tc = nbv(0),\n\t\t\td = nbv(1);\n\t\twhile (u.signum() != 0)\n\t\t{\n\t\t\twhile (u.isEven())\n\t\t\t{\n\t\t\t\tu.rShiftTo(1, u);\n\t\t\t\tif (ac)\n\t\t\t\t{\n\t\t\t\t\tif (!a.isEven() || !b.isEven())\n\t\t\t\t\t{\n\t\t\t\t\t\ta.addTo(this, a);\n\t\t\t\t\t\tb.subTo(m, b);\n\t\t\t\t\t}\n\t\t\t\t\ta.rShiftTo(1, a);\n\t\t\t\t}\n\t\t\t\telse if (!b.isEven()) b.subTo(m, b);\n\t\t\t\tb.rShiftTo(1, b);\n\t\t\t}\n\t\t\twhile (v.isEven())\n\t\t\t{\n\t\t\t\tv.rShiftTo(1, v);\n\t\t\t\tif (ac)\n\t\t\t\t{\n\t\t\t\t\tif (!c.isEven() || !d.isEven())\n\t\t\t\t\t{\n\t\t\t\t\t\tc.addTo(this, c);\n\t\t\t\t\t\td.subTo(m, d);\n\t\t\t\t\t}\n\t\t\t\t\tc.rShiftTo(1, c);\n\t\t\t\t}\n\t\t\t\telse if (!d.isEven()) d.subTo(m, d);\n\t\t\t\td.rShiftTo(1, d);\n\t\t\t}\n\t\t\tif (u.compareTo(v) >= 0)\n\t\t\t{\n\t\t\t\tu.subTo(v, u);\n\t\t\t\tif (ac) a.subTo(c, a);\n\t\t\t\tb.subTo(d, b);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tv.subTo(u, v);\n\t\t\t\tif (ac) c.subTo(a, c);\n\t\t\t\td.subTo(b, d);\n\t\t\t}\n\t\t}\n\t\tif (v.compareTo(BigInteger.ONE) != 0) return BigInteger.ZERO;\n\t\tif (d.compareTo(m) >= 0) return d.subtract(m);\n\t\tif (d.signum() < 0) d.addTo(m, d);\n\t\telse return d;\n\t\tif (d.signum() < 0) return d.add(m);\n\t\telse return d;\n\t}\n\tvar lowprimes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997];\n\tvar lplim = (1 << 26) / lowprimes[lowprimes.length - 1];\n\t// (public) test primality with certainty >= 1-.5^t\n\tfunction bnIsProbablePrime(t)\n\t{\n\t\tvar i, x = this.abs();\n\t\tif (x.t == 1 && x[0] <= lowprimes[lowprimes.length - 1])\n\t\t{\n\t\t\tfor (i = 0; i < lowprimes.length; ++i)\n\t\t\t\tif (x[0] == lowprimes[i]) return true;\n\t\t\treturn false;\n\t\t}\n\t\tif (x.isEven()) return false;\n\t\ti = 1;\n\t\twhile (i < lowprimes.length)\n\t\t{\n\t\t\tvar m = lowprimes[i],\n\t\t\t\tj = i + 1;\n\t\t\twhile (j < lowprimes.length && m < lplim) m *= lowprimes[j++];\n\t\t\tm = x.modInt(m);\n\t\t\twhile (i < j)\n\t\t\t\tif (m % lowprimes[i++] == 0) return false;\n\t\t}\n\t\treturn x.millerRabin(t);\n\t}\n\t// (protected) true if probably prime (HAC 4.24, Miller-Rabin)\n\tfunction bnpMillerRabin(t)\n\t{\n\t\tvar n1 = this.subtract(BigInteger.ONE);\n\t\tvar k = n1.getLowestSetBit();\n\t\tif (k <= 0) return false;\n\t\tvar r = n1.shiftRight(k);\n\t\tt = (t + 1) >> 1;\n\t\tif (t > lowprimes.length) t = lowprimes.length;\n\t\tvar a = nbi();\n\t\tfor (var i = 0; i < t; ++i)\n\t\t{\n\t\t\t//Pick bases at random, instead of starting at 2\n\t\t\ta.fromInt(lowprimes[Math.floor(Math.random() * lowprimes.length)]);\n\t\t\tvar y = a.modPow(r, this);\n\t\t\tif (y.compareTo(BigInteger.ONE) != 0 && y.compareTo(n1) != 0)\n\t\t\t{\n\t\t\t\tvar j = 1;\n\t\t\t\twhile (j++ < k && y.compareTo(n1) != 0)\n\t\t\t\t{\n\t\t\t\t\ty = y.modPowInt(2, this);\n\t\t\t\t\tif (y.compareTo(BigInteger.ONE) == 0) return false;\n\t\t\t\t}\n\t\t\t\tif (y.compareTo(n1) != 0) return false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\t// protected\n\tBigInteger.prototype.chunkSize = bnpChunkSize;\n\tBigInteger.prototype.toRadix = bnpToRadix;\n\tBigInteger.prototype.fromRadix = bnpFromRadix;\n\tBigInteger.prototype.fromNumber = bnpFromNumber;\n\tBigInteger.prototype.bitwiseTo = bnpBitwiseTo;\n\tBigInteger.prototype.changeBit = bnpChangeBit;\n\tBigInteger.prototype.addTo = bnpAddTo;\n\tBigInteger.prototype.dMultiply = bnpDMultiply;\n\tBigInteger.prototype.dAddOffset = bnpDAddOffset;\n\tBigInteger.prototype.multiplyLowerTo = bnpMultiplyLowerTo;\n\tBigInteger.prototype.multiplyUpperTo = bnpMultiplyUpperTo;\n\tBigInteger.prototype.modInt = bnpModInt;\n\tBigInteger.prototype.millerRabin = bnpMillerRabin;\n\t// public\n\tBigInteger.prototype.clone = bnClone;\n\tBigInteger.prototype.intValue = bnIntValue;\n\tBigInteger.prototype.byteValue = bnByteValue;\n\tBigInteger.prototype.shortValue = bnShortValue;\n\tBigInteger.prototype.signum = bnSigNum;\n\tBigInteger.prototype.toByteArray = bnToByteArray;\n\tBigInteger.prototype.equals = bnEquals;\n\tBigInteger.prototype.min = bnMin;\n\tBigInteger.prototype.max = bnMax;\n\tBigInteger.prototype.and = bnAnd;\n\tBigInteger.prototype.or = bnOr;\n\tBigInteger.prototype.xor = bnXor;\n\tBigInteger.prototype.andNot = bnAndNot;\n\tBigInteger.prototype.not = bnNot;\n\tBigInteger.prototype.shiftLeft = bnShiftLeft;\n\tBigInteger.prototype.shiftRight = bnShiftRight;\n\tBigInteger.prototype.getLowestSetBit = bnGetLowestSetBit;\n\tBigInteger.prototype.bitCount = bnBitCount;\n\tBigInteger.prototype.testBit = bnTestBit;\n\tBigInteger.prototype.setBit = bnSetBit;\n\tBigInteger.prototype.clearBit = bnClearBit;\n\tBigInteger.prototype.flipBit = bnFlipBit;\n\tBigInteger.prototype.add = bnAdd;\n\tBigInteger.prototype.subtract = bnSubtract;\n\tBigInteger.prototype.multiply = bnMultiply;\n\tBigInteger.prototype.divide = bnDivide;\n\tBigInteger.prototype.remainder = bnRemainder;\n\tBigInteger.prototype.divideAndRemainder = bnDivideAndRemainder;\n\tBigInteger.prototype.modPow = bnModPow;\n\tBigInteger.prototype.modInverse = bnModInverse;\n\tBigInteger.prototype.pow = bnPow;\n\tBigInteger.prototype.gcd = bnGCD;\n\tBigInteger.prototype.isProbablePrime = bnIsProbablePrime;\n\t// JSBN-specific extension\n\tBigInteger.prototype.square = bnSquare;\n\tvar Int128 = BigInteger;\n\t// BigInteger interfaces not implemented in jsbn:\n\t// BigInteger(int signum, byte[] magnitude)\n\t// double doubleValue()\n\t// float floatValue()\n\t// int hashCode()\n\t// long longValue()\n\t// static BigInteger valueOf(long val)\n\t// Helper functions to make BigInteger functions callable with two parameters\n\t// as in original C# Clipper\n\tInt128.prototype.IsNegative = function ()\n\t{\n\t\tif (this.compareTo(Int128.ZERO) == -1) return true;\n\t\telse return false;\n\t};\n\n\tInt128.op_Equality = function (val1, val2)\n\t{\n\t\tif (val1.compareTo(val2) == 0) return true;\n\t\telse return false;\n\t};\n\n\tInt128.op_Inequality = function (val1, val2)\n\t{\n\t\tif (val1.compareTo(val2) != 0) return true;\n\t\telse return false;\n\t};\n\n\tInt128.op_GreaterThan = function (val1, val2)\n\t{\n\t\tif (val1.compareTo(val2) > 0) return true;\n\t\telse return false;\n\t};\n\n\tInt128.op_LessThan = function (val1, val2)\n\t{\n\t\tif (val1.compareTo(val2) < 0) return true;\n\t\telse return false;\n\t};\n\n\tInt128.op_Addition = function (lhs, rhs)\n\t{\n\t\treturn new Int128(lhs, undefined, undefined).add(new Int128(rhs, undefined, undefined));\n\t};\n\n\tInt128.op_Subtraction = function (lhs, rhs)\n\t{\n\t\treturn new Int128(lhs, undefined, undefined).subtract(new Int128(rhs, undefined, undefined));\n\t};\n\n\tInt128.Int128Mul = function (lhs, rhs)\n\t{\n\t\treturn new Int128(lhs, undefined, undefined).multiply(new Int128(rhs, undefined, undefined));\n\t};\n\n\tInt128.op_Division = function (lhs, rhs)\n\t{\n\t\treturn lhs.divide(rhs);\n\t};\n\n\tInt128.prototype.ToDouble = function ()\n\t{\n\t\treturn parseFloat(this.toString()); // This could be something faster\n\t};\n\n\t// end of Int128 section\n\t/*\n\t// Uncomment the following two lines if you want to use Int128 outside ClipperLib\n\tif (typeof(document) !== \"undefined\") window.Int128 = Int128;\n\telse self.Int128 = Int128;\n\t*/\n\n\t// ---------------------------------------------\n\n\t// Here starts the actual Clipper library:\n\t// Helper function to support Inheritance in Javascript\n\tvar Inherit = function (ce, ce2)\n\t{\n\t\tvar p;\n\t\tif (typeof (Object.getOwnPropertyNames) === 'undefined')\n\t\t{\n\t\t\tfor (p in ce2.prototype)\n\t\t\t\tif (typeof (ce.prototype[p]) === 'undefined' || ce.prototype[p] === Object.prototype[p]) ce.prototype[p] = ce2.prototype[p];\n\t\t\tfor (p in ce2)\n\t\t\t\tif (typeof (ce[p]) === 'undefined') ce[p] = ce2[p];\n\t\t\tce.$baseCtor = ce2;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tvar props = Object.getOwnPropertyNames(ce2.prototype);\n\t\t\tfor (var i = 0; i < props.length; i++)\n\t\t\t\tif (typeof (Object.getOwnPropertyDescriptor(ce.prototype, props[i])) === 'undefined') Object.defineProperty(ce.prototype, props[i], Object.getOwnPropertyDescriptor(ce2.prototype, props[i]));\n\t\t\tfor (p in ce2)\n\t\t\t\tif (typeof (ce[p]) === 'undefined') ce[p] = ce2[p];\n\t\t\tce.$baseCtor = ce2;\n\t\t}\n\t};\n\n\t/**\n\t* @constructor\n\t*/\n\tClipperLib.Path = function ()\n\t{\n\t\treturn [];\n\t};\n\n\tClipperLib.Path.prototype.push = Array.prototype.push;\n\n\t/**\n\t* @constructor\n\t*/\n\tClipperLib.Paths = function ()\n\t{\n\t\treturn []; // Was previously [[]], but caused problems when pushed\n\t};\n\n\tClipperLib.Paths.prototype.push = Array.prototype.push;\n\n\t// Preserves the calling way of original C# Clipper\n\t// Is essential due to compatibility, because DoublePoint is public class in original C# version\n\t/**\n\t* @constructor\n\t*/\n\tClipperLib.DoublePoint = function ()\n\t{\n\t\tvar a = arguments;\n\t\tthis.X = 0;\n\t\tthis.Y = 0;\n\t\t// public DoublePoint(DoublePoint dp)\n\t\t// public DoublePoint(IntPoint ip)\n\t\tif (a.length === 1)\n\t\t{\n\t\t\tthis.X = a[0].X;\n\t\t\tthis.Y = a[0].Y;\n\t\t}\n\t\telse if (a.length === 2)\n\t\t{\n\t\t\tthis.X = a[0];\n\t\t\tthis.Y = a[1];\n\t\t}\n\t}; // This is internal faster function when called without arguments\n\t/**\n\t* @constructor\n\t*/\n\tClipperLib.DoublePoint0 = function ()\n\t{\n\t\tthis.X = 0;\n\t\tthis.Y = 0;\n\t};\n\n\tClipperLib.DoublePoint0.prototype = ClipperLib.DoublePoint.prototype;\n\n\t// This is internal faster function when called with 1 argument (dp or ip)\n\t/**\n\t* @constructor\n\t*/\n\tClipperLib.DoublePoint1 = function (dp)\n\t{\n\t\tthis.X = dp.X;\n\t\tthis.Y = dp.Y;\n\t};\n\n\tClipperLib.DoublePoint1.prototype = ClipperLib.DoublePoint.prototype;\n\n\t// This is internal faster function when called with 2 arguments (x and y)\n\t/**\n\t* @constructor\n\t*/\n\tClipperLib.DoublePoint2 = function (x, y)\n\t{\n\t\tthis.X = x;\n\t\tthis.Y = y;\n\t};\n\n\tClipperLib.DoublePoint2.prototype = ClipperLib.DoublePoint.prototype;\n\n\t// PolyTree & PolyNode start\n\t/**\n\t* @suppress {missingProperties}\n\t*/\n\tClipperLib.PolyNode = function ()\n\t{\n\t\tthis.m_Parent = null;\n\t\tthis.m_polygon = new ClipperLib.Path();\n\t\tthis.m_Index = 0;\n\t\tthis.m_jointype = 0;\n\t\tthis.m_endtype = 0;\n\t\tthis.m_Childs = [];\n\t\tthis.IsOpen = false;\n\t};\n\n\tClipperLib.PolyNode.prototype.IsHoleNode = function ()\n\t{\n\t\tvar result = true;\n\t\tvar node = this.m_Parent;\n\t\twhile (node !== null)\n\t\t{\n\t\t\tresult = !result;\n\t\t\tnode = node.m_Parent;\n\t\t}\n\t\treturn result;\n\t};\n\n\tClipperLib.PolyNode.prototype.ChildCount = function ()\n\t{\n\t\treturn this.m_Childs.length;\n\t};\n\n\tClipperLib.PolyNode.prototype.Contour = function ()\n\t{\n\t\treturn this.m_polygon;\n\t};\n\n\tClipperLib.PolyNode.prototype.AddChild = function (Child)\n\t{\n\t\tvar cnt = this.m_Childs.length;\n\t\tthis.m_Childs.push(Child);\n\t\tChild.m_Parent = this;\n\t\tChild.m_Index = cnt;\n\t};\n\n\tClipperLib.PolyNode.prototype.GetNext = function ()\n\t{\n\t\tif (this.m_Childs.length > 0)\n\t\t\treturn this.m_Childs[0];\n\t\telse\n\t\t\treturn this.GetNextSiblingUp();\n\t};\n\n\tClipperLib.PolyNode.prototype.GetNextSiblingUp = function ()\n\t{\n\t\tif (this.m_Parent === null)\n\t\t\treturn null;\n\t\telse if (this.m_Index === this.m_Parent.m_Childs.length - 1)\n\t\t\treturn this.m_Parent.GetNextSiblingUp();\n\t\telse\n\t\t\treturn this.m_Parent.m_Childs[this.m_Index + 1];\n\t};\n\n\tClipperLib.PolyNode.prototype.Childs = function ()\n\t{\n\t\treturn this.m_Childs;\n\t};\n\n\tClipperLib.PolyNode.prototype.Parent = function ()\n\t{\n\t\treturn this.m_Parent;\n\t};\n\n\tClipperLib.PolyNode.prototype.IsHole = function ()\n\t{\n\t\treturn this.IsHoleNode();\n\t};\n\n\t// PolyTree : PolyNode\n\t/**\n\t * @suppress {missingProperties}\n\t * @constructor\n\t */\n\tClipperLib.PolyTree = function ()\n\t{\n\t\tthis.m_AllPolys = [];\n\t\tClipperLib.PolyNode.call(this);\n\t};\n\n\tClipperLib.PolyTree.prototype.Clear = function ()\n\t{\n\t\tfor (var i = 0, ilen = this.m_AllPolys.length; i < ilen; i++)\n\t\t\tthis.m_AllPolys[i] = null;\n\t\tthis.m_AllPolys.length = 0;\n\t\tthis.m_Childs.length = 0;\n\t};\n\n\tClipperLib.PolyTree.prototype.GetFirst = function ()\n\t{\n\t\tif (this.m_Childs.length > 0)\n\t\t\treturn this.m_Childs[0];\n\t\telse\n\t\t\treturn null;\n\t};\n\n\tClipperLib.PolyTree.prototype.Total = function ()\n\t{\n\t\tvar result = this.m_AllPolys.length;\n\t\t//with negative offsets, ignore the hidden outer polygon ...\n\t\tif (result > 0 && this.m_Childs[0] !== this.m_AllPolys[0]) result--;\n\t\treturn result;\n\t};\n\n\tInherit(ClipperLib.PolyTree, ClipperLib.PolyNode);\n\n\t// PolyTree & PolyNode end\n\n\tClipperLib.Math_Abs_Int64 = ClipperLib.Math_Abs_Int32 = ClipperLib.Math_Abs_Double = function (a)\n\t{\n\t\treturn Math.abs(a);\n\t};\n\n\tClipperLib.Math_Max_Int32_Int32 = function (a, b)\n\t{\n\t\treturn Math.max(a, b);\n\t};\n\n\t/*\n\t-----------------------------------\n\tcast_32 speedtest: http://jsperf.com/truncate-float-to-integer/2\n\t-----------------------------------\n\t*/\n\tif (browser.msie || browser.opera || browser.safari) ClipperLib.Cast_Int32 = function (a)\n\t{\n\t\treturn a | 0;\n\t};\n\n\telse ClipperLib.Cast_Int32 = function (a)\n\t{ // eg. browser.chrome || browser.chromium || browser.firefox\n\t\treturn ~~a;\n\t};\n\n\t/*\n\t--------------------------\n\tcast_64 speedtests: http://jsperf.com/truncate-float-to-integer\n\tChrome: bitwise_not_floor\n\tFirefox17: toInteger (typeof test)\n\tIE9: bitwise_or_floor\n\tIE7 and IE8: to_parseint\n\tChromium: to_floor_or_ceil\n\tFirefox3: to_floor_or_ceil\n\tFirefox15: to_floor_or_ceil\n\tOpera: to_floor_or_ceil\n\tSafari: to_floor_or_ceil\n\t--------------------------\n\t*/\n\tif (typeof Number.toInteger === \"undefined\")\n\t\tNumber.toInteger = null;\n\n\tif (browser.chrome) ClipperLib.Cast_Int64 = function (a)\n\t{\n\t\tif (a < -2147483648 || a > 2147483647)\n\t\t\treturn a < 0 ? Math.ceil(a) : Math.floor(a);\n\t\telse return ~~a;\n\t};\n\n\telse if (browser.firefox && typeof (Number.toInteger) === \"function\") ClipperLib.Cast_Int64 = function (a)\n\t{\n\t\treturn Number.toInteger(a);\n\t};\n\n\telse if (browser.msie7 || browser.msie8) ClipperLib.Cast_Int64 = function (a)\n\t{\n\t\treturn parseInt(a, 10);\n\t};\n\n\telse if (browser.msie) ClipperLib.Cast_Int64 = function (a)\n\t{\n\t\tif (a < -2147483648 || a > 2147483647)\n\t\t\treturn a < 0 ? Math.ceil(a) : Math.floor(a);\n\t\treturn a | 0;\n\t};\n\n\t// eg. browser.chromium || browser.firefox || browser.opera || browser.safari\n\telse ClipperLib.Cast_Int64 = function (a)\n\t{\n\t\treturn a < 0 ? Math.ceil(a) : Math.floor(a);\n\t};\n\n\tClipperLib.Clear = function (a)\n\t{\n\t\ta.length = 0;\n\t};\n\n\t//ClipperLib.MaxSteps = 64; // How many steps at maximum in arc in BuildArc() function\n\tClipperLib.PI = 3.141592653589793;\n\tClipperLib.PI2 = 2 * 3.141592653589793;\n\t/**\n\t* @constructor\n\t*/\n\tClipperLib.IntPoint = function ()\n\t{\n\t\tvar a = arguments,\n\t\t\talen = a.length;\n\t\tthis.X = 0;\n\t\tthis.Y = 0;\n\t\tif (ClipperLib.use_xyz)\n\t\t{\n\t\t\tthis.Z = 0;\n\t\t\tif (alen === 3) // public IntPoint(cInt x, cInt y, cInt z = 0)\n\t\t\t{\n\t\t\t\tthis.X = a[0];\n\t\t\t\tthis.Y = a[1];\n\t\t\t\tthis.Z = a[2];\n\t\t\t}\n\t\t\telse if (alen === 2) // public IntPoint(cInt x, cInt y)\n\t\t\t{\n\t\t\t\tthis.X = a[0];\n\t\t\t\tthis.Y = a[1];\n\t\t\t\tthis.Z = 0;\n\t\t\t}\n\t\t\telse if (alen === 1)\n\t\t\t{\n\t\t\t\tif (a[0] instanceof ClipperLib.DoublePoint) // public IntPoint(DoublePoint dp)\n\t\t\t\t{\n\t\t\t\t\tvar dp = a[0];\n\t\t\t\t\tthis.X = ClipperLib.Clipper.Round(dp.X);\n\t\t\t\t\tthis.Y = ClipperLib.Clipper.Round(dp.Y);\n\t\t\t\t\tthis.Z = 0;\n\t\t\t\t}\n\t\t\t\telse // public IntPoint(IntPoint pt)\n\t\t\t\t{\n\t\t\t\t\tvar pt = a[0];\n\t\t\t\t\tif (typeof (pt.Z) === \"undefined\") pt.Z = 0;\n\t\t\t\t\tthis.X = pt.X;\n\t\t\t\t\tthis.Y = pt.Y;\n\t\t\t\t\tthis.Z = pt.Z;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse // public IntPoint()\n\t\t\t{\n\t\t\t\tthis.X = 0;\n\t\t\t\tthis.Y = 0;\n\t\t\t\tthis.Z = 0;\n\t\t\t}\n\t\t}\n\t\telse // if (!ClipperLib.use_xyz)\n\t\t{\n\t\t\tif (alen === 2) // public IntPoint(cInt X, cInt Y)\n\t\t\t{\n\t\t\t\tthis.X = a[0];\n\t\t\t\tthis.Y = a[1];\n\t\t\t}\n\t\t\telse if (alen === 1)\n\t\t\t{\n\t\t\t\tif (a[0] instanceof ClipperLib.DoublePoint) // public IntPoint(DoublePoint dp)\n\t\t\t\t{\n\t\t\t\t\tvar dp = a[0];\n\t\t\t\t\tthis.X = ClipperLib.Clipper.Round(dp.X);\n\t\t\t\t\tthis.Y = ClipperLib.Clipper.Round(dp.Y);\n\t\t\t\t}\n\t\t\t\telse // public IntPoint(IntPoint pt)\n\t\t\t\t{\n\t\t\t\t\tvar pt = a[0];\n\t\t\t\t\tthis.X = pt.X;\n\t\t\t\t\tthis.Y = pt.Y;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse // public IntPoint(IntPoint pt)\n\t\t\t{\n\t\t\t\tthis.X = 0;\n\t\t\t\tthis.Y = 0;\n\t\t\t}\n\t\t}\n\t};\n\n\tClipperLib.IntPoint.op_Equality = function (a, b)\n\t{\n\t\t//return a == b;\n\t\treturn a.X === b.X && a.Y === b.Y;\n\t};\n\n\tClipperLib.IntPoint.op_Inequality = function (a, b)\n\t{\n\t\t//return a !== b;\n\t\treturn a.X !== b.X || a.Y !== b.Y;\n\t};\n\n\t/*\n  ClipperLib.IntPoint.prototype.Equals = function (obj)\n  {\n\tif (obj === null)\n\t\treturn false;\n\tif (obj instanceof ClipperLib.IntPoint)\n\t{\n\t\tvar a = Cast(obj, ClipperLib.IntPoint);\n\t\treturn (this.X == a.X) && (this.Y == a.Y);\n\t}\n\telse\n\t\treturn false;\n  };\n\n\t*/\n\n\t/**\n\t* @constructor\n\t*/\n\tClipperLib.IntPoint0 = function ()\n\t{\n\t\tthis.X = 0;\n\t\tthis.Y = 0;\n\t\tif (ClipperLib.use_xyz)\n\t\t\tthis.Z = 0;\n\t};\n\n\tClipperLib.IntPoint0.prototype = ClipperLib.IntPoint.prototype;\n\n\t/**\n\t* @constructor\n\t*/\n\tClipperLib.IntPoint1 = function (pt)\n\t{\n\t\tthis.X = pt.X;\n\t\tthis.Y = pt.Y;\n\t\tif (ClipperLib.use_xyz)\n\t\t{\n\t\t\tif (typeof pt.Z === \"undefined\") this.Z = 0;\n\t\t\telse this.Z = pt.Z;\n\t\t}\n\t};\n\n\tClipperLib.IntPoint1.prototype = ClipperLib.IntPoint.prototype;\n\n\t/**\n\t* @constructor\n\t*/\n\tClipperLib.IntPoint1dp = function (dp)\n\t{\n\t\tthis.X = ClipperLib.Clipper.Round(dp.X);\n\t\tthis.Y = ClipperLib.Clipper.Round(dp.Y);\n\t\tif (ClipperLib.use_xyz)\n\t\t\tthis.Z = 0;\n\t};\n\n\tClipperLib.IntPoint1dp.prototype = ClipperLib.IntPoint.prototype;\n\n\t/**\n\t* @constructor\n\t*/\n\tClipperLib.IntPoint2 = function (x, y, z)\n\t{\n\t\tthis.X = x;\n\t\tthis.Y = y;\n\t\tif (ClipperLib.use_xyz)\n\t\t{\n\t\t\tif (typeof z === \"undefined\") this.Z = 0;\n\t\t\telse this.Z = z;\n\t\t}\n\t};\n\n\tClipperLib.IntPoint2.prototype = ClipperLib.IntPoint.prototype;\n\n\t/**\n\t* @constructor\n\t*/\n\tClipperLib.IntRect = function ()\n\t{\n\t\tvar a = arguments,\n\t\t\talen = a.length;\n\t\tif (alen === 4) // function (l, t, r, b)\n\t\t{\n\t\t\tthis.left = a[0];\n\t\t\tthis.top = a[1];\n\t\t\tthis.right = a[2];\n\t\t\tthis.bottom = a[3];\n\t\t}\n\t\telse if (alen === 1) // function (ir)\n\t\t{\n\t\t\tvar ir = a[0];\n\t\t\tthis.left = ir.left;\n\t\t\tthis.top = ir.top;\n\t\t\tthis.right = ir.right;\n\t\t\tthis.bottom = ir.bottom;\n\t\t}\n\t\telse // function ()\n\t\t{\n\t\t\tthis.left = 0;\n\t\t\tthis.top = 0;\n\t\t\tthis.right = 0;\n\t\t\tthis.bottom = 0;\n\t\t}\n\t};\n\n\t/**\n\t* @constructor\n\t*/\n\tClipperLib.IntRect0 = function ()\n\t{\n\t\tthis.left = 0;\n\t\tthis.top = 0;\n\t\tthis.right = 0;\n\t\tthis.bottom = 0;\n\t};\n\n\tClipperLib.IntRect0.prototype = ClipperLib.IntRect.prototype;\n\n\t/**\n\t* @constructor\n\t*/\n\tClipperLib.IntRect1 = function (ir)\n\t{\n\t\tthis.left = ir.left;\n\t\tthis.top = ir.top;\n\t\tthis.right = ir.right;\n\t\tthis.bottom = ir.bottom;\n\t};\n\n\tClipperLib.IntRect1.prototype = ClipperLib.IntRect.prototype;\n\n\t/**\n\t* @constructor\n\t*/\n\tClipperLib.IntRect4 = function (l, t, r, b)\n\t{\n\t\tthis.left = l;\n\t\tthis.top = t;\n\t\tthis.right = r;\n\t\tthis.bottom = b;\n\t};\n\n\tClipperLib.IntRect4.prototype = ClipperLib.IntRect.prototype;\n\n\tClipperLib.ClipType = {\n\t\tctIntersection: 0,\n\t\tctUnion: 1,\n\t\tctDifference: 2,\n\t\tctXor: 3\n\t};\n\n\tClipperLib.PolyType = {\n\t\tptSubject: 0,\n\t\tptClip: 1\n\t};\n\n\tClipperLib.PolyFillType = {\n\t\tpftEvenOdd: 0,\n\t\tpftNonZero: 1,\n\t\tpftPositive: 2,\n\t\tpftNegative: 3\n\t};\n\n\tClipperLib.JoinType = {\n\t\tjtSquare: 0,\n\t\tjtRound: 1,\n\t\tjtMiter: 2\n\t};\n\n\tClipperLib.EndType = {\n\t\tetOpenSquare: 0,\n\t\tetOpenRound: 1,\n\t\tetOpenButt: 2,\n\t\tetClosedLine: 3,\n\t\tetClosedPolygon: 4\n\t};\n\n\tClipperLib.EdgeSide = {\n\t\tesLeft: 0,\n\t\tesRight: 1\n\t};\n\n\tClipperLib.Direction = {\n\t\tdRightToLeft: 0,\n\t\tdLeftToRight: 1\n\t};\n\n\t/**\n\t* @constructor\n\t*/\n\tClipperLib.TEdge = function ()\n\t{\n\t\tthis.Bot = new ClipperLib.IntPoint0();\n\t\tthis.Curr = new ClipperLib.IntPoint0(); //current (updated for every new scanbeam)\n\t\tthis.Top = new ClipperLib.IntPoint0();\n\t\tthis.Delta = new ClipperLib.IntPoint0();\n\t\tthis.Dx = 0;\n\t\tthis.PolyTyp = ClipperLib.PolyType.ptSubject;\n\t\tthis.Side = ClipperLib.EdgeSide.esLeft; //side only refers to current side of solution poly\n\t\tthis.WindDelta = 0; //1 or -1 depending on winding direction\n\t\tthis.WindCnt = 0;\n\t\tthis.WindCnt2 = 0; //winding count of the opposite polytype\n\t\tthis.OutIdx = 0;\n\t\tthis.Next = null;\n\t\tthis.Prev = null;\n\t\tthis.NextInLML = null;\n\t\tthis.NextInAEL = null;\n\t\tthis.PrevInAEL = null;\n\t\tthis.NextInSEL = null;\n\t\tthis.PrevInSEL = null;\n\t};\n\n\t/**\n\t* @constructor\n\t*/\n\tClipperLib.IntersectNode = function ()\n\t{\n\t\tthis.Edge1 = null;\n\t\tthis.Edge2 = null;\n\t\tthis.Pt = new ClipperLib.IntPoint0();\n\t};\n\n\tClipperLib.MyIntersectNodeSort = function () {};\n\n\tClipperLib.MyIntersectNodeSort.Compare = function (node1, node2)\n\t{\n\t\tvar i = node2.Pt.Y - node1.Pt.Y;\n\t\tif (i > 0) return 1;\n\t\telse if (i < 0) return -1;\n\t\telse return 0;\n\t};\n\n\t/**\n\t* @constructor\n\t*/\n\tClipperLib.LocalMinima = function ()\n\t{\n\t\tthis.Y = 0;\n\t\tthis.LeftBound = null;\n\t\tthis.RightBound = null;\n\t\tthis.Next = null;\n\t};\n\n\t/**\n\t* @constructor\n\t*/\n\tClipperLib.Scanbeam = function ()\n\t{\n\t\tthis.Y = 0;\n\t\tthis.Next = null;\n\t};\n\n\t/**\n\t* @constructor\n\t*/\n\tClipperLib.Maxima = function ()\n\t{\n\t\tthis.X = 0;\n\t\tthis.Next = null;\n\t\tthis.Prev = null;\n\t};\n\n\t//OutRec: contains a path in the clipping solution. Edges in the AEL will\n\t//carry a pointer to an OutRec when they are part of the clipping solution.\n\t/**\n\t* @constructor\n\t*/\n\tClipperLib.OutRec = function ()\n\t{\n\t\tthis.Idx = 0;\n\t\tthis.IsHole = false;\n\t\tthis.IsOpen = false;\n\t\tthis.FirstLeft = null; //see comments in clipper.pas\n\t\tthis.Pts = null;\n\t\tthis.BottomPt = null;\n\t\tthis.PolyNode = null;\n\t};\n\n\t/**\n\t* @constructor\n\t*/\n\tClipperLib.OutPt = function ()\n\t{\n\t\tthis.Idx = 0;\n\t\tthis.Pt = new ClipperLib.IntPoint0();\n\t\tthis.Next = null;\n\t\tthis.Prev = null;\n\t};\n\n\t/**\n\t* @constructor\n\t*/\n\tClipperLib.Join = function ()\n\t{\n\t\tthis.OutPt1 = null;\n\t\tthis.OutPt2 = null;\n\t\tthis.OffPt = new ClipperLib.IntPoint0();\n\t};\n\n\tClipperLib.ClipperBase = function ()\n\t{\n\t\tthis.m_MinimaList = null;\n\t\tthis.m_CurrentLM = null;\n\t\tthis.m_edges = new Array();\n\t\tthis.m_UseFullRange = false;\n\t\tthis.m_HasOpenPaths = false;\n\t\tthis.PreserveCollinear = false;\n\t\tthis.m_Scanbeam = null;\n\t\tthis.m_PolyOuts = null;\n\t\tthis.m_ActiveEdges = null;\n\t};\n\n\t// Ranges are in original C# too high for Javascript (in current state 2013 september):\n\t// protected const double horizontal = -3.4E+38;\n\t// internal const cInt loRange = 0x3FFFFFFF; // = 1073741823 = sqrt(2^63 -1)/2\n\t// internal const cInt hiRange = 0x3FFFFFFFFFFFFFFFL; // = 4611686018427387903 = sqrt(2^127 -1)/2\n\t// So had to adjust them to more suitable for Javascript.\n\t// If JS some day supports truly 64-bit integers, then these ranges can be as in C#\n\t// and biginteger library can be more simpler (as then 128bit can be represented as two 64bit numbers)\n\tClipperLib.ClipperBase.horizontal = -9007199254740992; //-2^53\n\tClipperLib.ClipperBase.Skip = -2;\n\tClipperLib.ClipperBase.Unassigned = -1;\n\tClipperLib.ClipperBase.tolerance = 1E-20;\n\tClipperLib.ClipperBase.loRange = 47453132; // sqrt(2^53 -1)/2\n\tClipperLib.ClipperBase.hiRange = 4503599627370495; // sqrt(2^106 -1)/2\n\n\tClipperLib.ClipperBase.near_zero = function (val)\n\t{\n\t\treturn (val > -ClipperLib.ClipperBase.tolerance) && (val < ClipperLib.ClipperBase.tolerance);\n\t};\n\n\tClipperLib.ClipperBase.IsHorizontal = function (e)\n\t{\n\t\treturn e.Delta.Y === 0;\n\t};\n\n\tClipperLib.ClipperBase.prototype.PointIsVertex = function (pt, pp)\n\t{\n\t\tvar pp2 = pp;\n\t\tdo {\n\t\t\tif (ClipperLib.IntPoint.op_Equality(pp2.Pt, pt))\n\t\t\t\treturn true;\n\t\t\tpp2 = pp2.Next;\n\t\t}\n\t\twhile (pp2 !== pp)\n\t\treturn false;\n\t};\n\n\tClipperLib.ClipperBase.prototype.PointOnLineSegment = function (pt, linePt1, linePt2, UseFullRange)\n\t{\n\t\tif (UseFullRange)\n\t\t\treturn ((pt.X === linePt1.X) && (pt.Y === linePt1.Y)) ||\n\t\t\t\t((pt.X === linePt2.X) && (pt.Y === linePt2.Y)) ||\n\t\t\t\t(((pt.X > linePt1.X) === (pt.X < linePt2.X)) &&\n\t\t\t\t\t((pt.Y > linePt1.Y) === (pt.Y < linePt2.Y)) &&\n\t\t\t\t\t(Int128.op_Equality(Int128.Int128Mul((pt.X - linePt1.X), (linePt2.Y - linePt1.Y)),\n\t\t\t\t\t\tInt128.Int128Mul((linePt2.X - linePt1.X), (pt.Y - linePt1.Y)))));\n\t\telse\n\t\t\treturn ((pt.X === linePt1.X) && (pt.Y === linePt1.Y)) || ((pt.X === linePt2.X) && (pt.Y === linePt2.Y)) || (((pt.X > linePt1.X) === (pt.X < linePt2.X)) && ((pt.Y > linePt1.Y) === (pt.Y < linePt2.Y)) && ((pt.X - linePt1.X) * (linePt2.Y - linePt1.Y) === (linePt2.X - linePt1.X) * (pt.Y - linePt1.Y)));\n\t};\n\n\tClipperLib.ClipperBase.prototype.PointOnPolygon = function (pt, pp, UseFullRange)\n\t{\n\t\tvar pp2 = pp;\n\t\twhile (true)\n\t\t{\n\t\t\tif (this.PointOnLineSegment(pt, pp2.Pt, pp2.Next.Pt, UseFullRange))\n\t\t\t\treturn true;\n\t\t\tpp2 = pp2.Next;\n\t\t\tif (pp2 === pp)\n\t\t\t\tbreak;\n\t\t}\n\t\treturn false;\n\t};\n\n\tClipperLib.ClipperBase.prototype.SlopesEqual = ClipperLib.ClipperBase.SlopesEqual = function ()\n\t{\n\t\tvar a = arguments,\n\t\t\talen = a.length;\n\t\tvar e1, e2, pt1, pt2, pt3, pt4, UseFullRange;\n\t\tif (alen === 3) // function (e1, e2, UseFullRange)\n\t\t{\n\t\t\te1 = a[0];\n\t\t\te2 = a[1];\n\t\t\tUseFullRange = a[2];\n\t\t\tif (UseFullRange)\n\t\t\t\treturn Int128.op_Equality(Int128.Int128Mul(e1.Delta.Y, e2.Delta.X), Int128.Int128Mul(e1.Delta.X, e2.Delta.Y));\n\t\t\telse\n\t\t\t\treturn ClipperLib.Cast_Int64((e1.Delta.Y) * (e2.Delta.X)) === ClipperLib.Cast_Int64((e1.Delta.X) * (e2.Delta.Y));\n\t\t}\n\t\telse if (alen === 4) // function (pt1, pt2, pt3, UseFullRange)\n\t\t{\n\t\t\tpt1 = a[0];\n\t\t\tpt2 = a[1];\n\t\t\tpt3 = a[2];\n\t\t\tUseFullRange = a[3];\n\t\t\tif (UseFullRange)\n\t\t\t\treturn Int128.op_Equality(Int128.Int128Mul(pt1.Y - pt2.Y, pt2.X - pt3.X), Int128.Int128Mul(pt1.X - pt2.X, pt2.Y - pt3.Y));\n\t\t\telse\n\t\t\t\treturn ClipperLib.Cast_Int64((pt1.Y - pt2.Y) * (pt2.X - pt3.X)) - ClipperLib.Cast_Int64((pt1.X - pt2.X) * (pt2.Y - pt3.Y)) === 0;\n\t\t}\n\t\telse // function (pt1, pt2, pt3, pt4, UseFullRange)\n\t\t{\n\t\t\tpt1 = a[0];\n\t\t\tpt2 = a[1];\n\t\t\tpt3 = a[2];\n\t\t\tpt4 = a[3];\n\t\t\tUseFullRange = a[4];\n\t\t\tif (UseFullRange)\n\t\t\t\treturn Int128.op_Equality(Int128.Int128Mul(pt1.Y - pt2.Y, pt3.X - pt4.X), Int128.Int128Mul(pt1.X - pt2.X, pt3.Y - pt4.Y));\n\t\t\telse\n\t\t\t\treturn ClipperLib.Cast_Int64((pt1.Y - pt2.Y) * (pt3.X - pt4.X)) - ClipperLib.Cast_Int64((pt1.X - pt2.X) * (pt3.Y - pt4.Y)) === 0;\n\t\t}\n\t};\n\n\tClipperLib.ClipperBase.SlopesEqual3 = function (e1, e2, UseFullRange)\n\t{\n\t\tif (UseFullRange)\n\t\t\treturn Int128.op_Equality(Int128.Int128Mul(e1.Delta.Y, e2.Delta.X), Int128.Int128Mul(e1.Delta.X, e2.Delta.Y));\n\t\telse\n\t\t\treturn ClipperLib.Cast_Int64((e1.Delta.Y) * (e2.Delta.X)) === ClipperLib.Cast_Int64((e1.Delta.X) * (e2.Delta.Y));\n\t};\n\n\tClipperLib.ClipperBase.SlopesEqual4 = function (pt1, pt2, pt3, UseFullRange)\n\t{\n\t\tif (UseFullRange)\n\t\t\treturn Int128.op_Equality(Int128.Int128Mul(pt1.Y - pt2.Y, pt2.X - pt3.X), Int128.Int128Mul(pt1.X - pt2.X, pt2.Y - pt3.Y));\n\t\telse\n\t\t\treturn ClipperLib.Cast_Int64((pt1.Y - pt2.Y) * (pt2.X - pt3.X)) - ClipperLib.Cast_Int64((pt1.X - pt2.X) * (pt2.Y - pt3.Y)) === 0;\n\t};\n\n\tClipperLib.ClipperBase.SlopesEqual5 = function (pt1, pt2, pt3, pt4, UseFullRange)\n\t{\n\t\tif (UseFullRange)\n\t\t\treturn Int128.op_Equality(Int128.Int128Mul(pt1.Y - pt2.Y, pt3.X - pt4.X), Int128.Int128Mul(pt1.X - pt2.X, pt3.Y - pt4.Y));\n\t\telse\n\t\t\treturn ClipperLib.Cast_Int64((pt1.Y - pt2.Y) * (pt3.X - pt4.X)) - ClipperLib.Cast_Int64((pt1.X - pt2.X) * (pt3.Y - pt4.Y)) === 0;\n\t};\n\n\tClipperLib.ClipperBase.prototype.Clear = function ()\n\t{\n\t\tthis.DisposeLocalMinimaList();\n\t\tfor (var i = 0, ilen = this.m_edges.length; i < ilen; ++i)\n\t\t{\n\t\t\tfor (var j = 0, jlen = this.m_edges[i].length; j < jlen; ++j)\n\t\t\t\tthis.m_edges[i][j] = null;\n\t\t\tClipperLib.Clear(this.m_edges[i]);\n\t\t}\n\t\tClipperLib.Clear(this.m_edges);\n\t\tthis.m_UseFullRange = false;\n\t\tthis.m_HasOpenPaths = false;\n\t};\n\n\tClipperLib.ClipperBase.prototype.DisposeLocalMinimaList = function ()\n\t{\n\t\twhile (this.m_MinimaList !== null)\n\t\t{\n\t\t\tvar tmpLm = this.m_MinimaList.Next;\n\t\t\tthis.m_MinimaList = null;\n\t\t\tthis.m_MinimaList = tmpLm;\n\t\t}\n\t\tthis.m_CurrentLM = null;\n\t};\n\n\tClipperLib.ClipperBase.prototype.RangeTest = function (Pt, useFullRange)\n\t{\n\t\tif (useFullRange.Value)\n\t\t{\n\t\t\tif (Pt.X > ClipperLib.ClipperBase.hiRange || Pt.Y > ClipperLib.ClipperBase.hiRange || -Pt.X > ClipperLib.ClipperBase.hiRange || -Pt.Y > ClipperLib.ClipperBase.hiRange)\n\t\t\t\tClipperLib.Error(\"Coordinate outside allowed range in RangeTest().\");\n\t\t}\n\t\telse if (Pt.X > ClipperLib.ClipperBase.loRange || Pt.Y > ClipperLib.ClipperBase.loRange || -Pt.X > ClipperLib.ClipperBase.loRange || -Pt.Y > ClipperLib.ClipperBase.loRange)\n\t\t{\n\t\t\tuseFullRange.Value = true;\n\t\t\tthis.RangeTest(Pt, useFullRange);\n\t\t}\n\t};\n\n\tClipperLib.ClipperBase.prototype.InitEdge = function (e, eNext, ePrev, pt)\n\t{\n\t\te.Next = eNext;\n\t\te.Prev = ePrev;\n\t\t//e.Curr = pt;\n\t\te.Curr.X = pt.X;\n\t\te.Curr.Y = pt.Y;\n\t\tif (ClipperLib.use_xyz) e.Curr.Z = pt.Z;\n\t\te.OutIdx = -1;\n\t};\n\n\tClipperLib.ClipperBase.prototype.InitEdge2 = function (e, polyType)\n\t{\n\t\tif (e.Curr.Y >= e.Next.Curr.Y)\n\t\t{\n\t\t\t//e.Bot = e.Curr;\n\t\t\te.Bot.X = e.Curr.X;\n\t\t\te.Bot.Y = e.Curr.Y;\n\t\t\tif (ClipperLib.use_xyz) e.Bot.Z = e.Curr.Z;\n\t\t\t//e.Top = e.Next.Curr;\n\t\t\te.Top.X = e.Next.Curr.X;\n\t\t\te.Top.Y = e.Next.Curr.Y;\n\t\t\tif (ClipperLib.use_xyz) e.Top.Z = e.Next.Curr.Z;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//e.Top = e.Curr;\n\t\t\te.Top.X = e.Curr.X;\n\t\t\te.Top.Y = e.Curr.Y;\n\t\t\tif (ClipperLib.use_xyz) e.Top.Z = e.Curr.Z;\n\t\t\t//e.Bot = e.Next.Curr;\n\t\t\te.Bot.X = e.Next.Curr.X;\n\t\t\te.Bot.Y = e.Next.Curr.Y;\n\t\t\tif (ClipperLib.use_xyz) e.Bot.Z = e.Next.Curr.Z;\n\t\t}\n\t\tthis.SetDx(e);\n\t\te.PolyTyp = polyType;\n\t};\n\n\tClipperLib.ClipperBase.prototype.FindNextLocMin = function (E)\n\t{\n\t\tvar E2;\n\t\tfor (;;)\n\t\t{\n\t\t\twhile (ClipperLib.IntPoint.op_Inequality(E.Bot, E.Prev.Bot) || ClipperLib.IntPoint.op_Equality(E.Curr, E.Top))\n\t\t\t\tE = E.Next;\n\t\t\tif (E.Dx !== ClipperLib.ClipperBase.horizontal && E.Prev.Dx !== ClipperLib.ClipperBase.horizontal)\n\t\t\t\tbreak;\n\t\t\twhile (E.Prev.Dx === ClipperLib.ClipperBase.horizontal)\n\t\t\t\tE = E.Prev;\n\t\t\tE2 = E;\n\t\t\twhile (E.Dx === ClipperLib.ClipperBase.horizontal)\n\t\t\t\tE = E.Next;\n\t\t\tif (E.Top.Y === E.Prev.Bot.Y)\n\t\t\t\tcontinue;\n\t\t\t//ie just an intermediate horz.\n\t\t\tif (E2.Prev.Bot.X < E.Bot.X)\n\t\t\t\tE = E2;\n\t\t\tbreak;\n\t\t}\n\t\treturn E;\n\t};\n\n\tClipperLib.ClipperBase.prototype.ProcessBound = function (E, LeftBoundIsForward)\n\t{\n\t\tvar EStart;\n\t\tvar Result = E;\n\t\tvar Horz;\n\n\t\tif (Result.OutIdx === ClipperLib.ClipperBase.Skip)\n\t\t{\n\t\t\t//check if there are edges beyond the skip edge in the bound and if so\n\t\t\t//create another LocMin and calling ProcessBound once more ...\n\t\t\tE = Result;\n\t\t\tif (LeftBoundIsForward)\n\t\t\t{\n\t\t\t\twhile (E.Top.Y === E.Next.Bot.Y) E = E.Next;\n\t\t\t\twhile (E !== Result && E.Dx === ClipperLib.ClipperBase.horizontal) E = E.Prev;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\twhile (E.Top.Y === E.Prev.Bot.Y) E = E.Prev;\n\t\t\t\twhile (E !== Result && E.Dx === ClipperLib.ClipperBase.horizontal) E = E.Next;\n\t\t\t}\n\t\t\tif (E === Result)\n\t\t\t{\n\t\t\t\tif (LeftBoundIsForward) Result = E.Next;\n\t\t\t\telse Result = E.Prev;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//there are more edges in the bound beyond result starting with E\n\t\t\t\tif (LeftBoundIsForward)\n\t\t\t\t\tE = Result.Next;\n\t\t\t\telse\n\t\t\t\t\tE = Result.Prev;\n\t\t\t\tvar locMin = new ClipperLib.LocalMinima();\n\t\t\t\tlocMin.Next = null;\n\t\t\t\tlocMin.Y = E.Bot.Y;\n\t\t\t\tlocMin.LeftBound = null;\n\t\t\t\tlocMin.RightBound = E;\n\t\t\t\tE.WindDelta = 0;\n\t\t\t\tResult = this.ProcessBound(E, LeftBoundIsForward);\n\t\t\t\tthis.InsertLocalMinima(locMin);\n\t\t\t}\n\t\t\treturn Result;\n\t\t}\n\n\t\tif (E.Dx === ClipperLib.ClipperBase.horizontal)\n\t\t{\n\t\t\t//We need to be careful with open paths because this may not be a\n\t\t\t//true local minima (ie E may be following a skip edge).\n\t\t\t//Also, consecutive horz. edges may start heading left before going right.\n\t\t\tif (LeftBoundIsForward) EStart = E.Prev;\n\t\t\telse EStart = E.Next;\n\n\t\t\tif (EStart.Dx === ClipperLib.ClipperBase.horizontal) //ie an adjoining horizontal skip edge\n\t\t\t{\n\t\t\t\tif (EStart.Bot.X !== E.Bot.X && EStart.Top.X !== E.Bot.X)\n\t\t\t\t\tthis.ReverseHorizontal(E);\n\t\t\t}\n\t\t\telse if (EStart.Bot.X !== E.Bot.X)\n\t\t\t\tthis.ReverseHorizontal(E);\n\t\t}\n\n\t\tEStart = E;\n\t\tif (LeftBoundIsForward)\n\t\t{\n\t\t\twhile (Result.Top.Y === Result.Next.Bot.Y && Result.Next.OutIdx !== ClipperLib.ClipperBase.Skip)\n\t\t\t\tResult = Result.Next;\n\t\t\tif (Result.Dx === ClipperLib.ClipperBase.horizontal && Result.Next.OutIdx !== ClipperLib.ClipperBase.Skip)\n\t\t\t{\n\t\t\t\t//nb: at the top of a bound, horizontals are added to the bound\n\t\t\t\t//only when the preceding edge attaches to the horizontal's left vertex\n\t\t\t\t//unless a Skip edge is encountered when that becomes the top divide\n\t\t\t\tHorz = Result;\n\t\t\t\twhile (Horz.Prev.Dx === ClipperLib.ClipperBase.horizontal)\n\t\t\t\t\tHorz = Horz.Prev;\n\t\t\t\tif (Horz.Prev.Top.X > Result.Next.Top.X)\n\t\t\t\t\tResult = Horz.Prev;\n\t\t\t}\n\t\t\twhile (E !== Result)\n\t\t\t{\n\t\t\t\tE.NextInLML = E.Next;\n\t\t\t\tif (E.Dx === ClipperLib.ClipperBase.horizontal && E !== EStart && E.Bot.X !== E.Prev.Top.X)\n\t\t\t\t\tthis.ReverseHorizontal(E);\n\t\t\t\tE = E.Next;\n\t\t\t}\n\t\t\tif (E.Dx === ClipperLib.ClipperBase.horizontal && E !== EStart && E.Bot.X !== E.Prev.Top.X)\n\t\t\t\tthis.ReverseHorizontal(E);\n\t\t\tResult = Result.Next;\n\t\t\t//move to the edge just beyond current bound\n\t\t}\n\t\telse\n\t\t{\n\t\t\twhile (Result.Top.Y === Result.Prev.Bot.Y && Result.Prev.OutIdx !== ClipperLib.ClipperBase.Skip)\n\t\t\t\tResult = Result.Prev;\n\t\t\tif (Result.Dx === ClipperLib.ClipperBase.horizontal && Result.Prev.OutIdx !== ClipperLib.ClipperBase.Skip)\n\t\t\t{\n\t\t\t\tHorz = Result;\n\t\t\t\twhile (Horz.Next.Dx === ClipperLib.ClipperBase.horizontal)\n\t\t\t\t\tHorz = Horz.Next;\n\t\t\t\tif (Horz.Next.Top.X === Result.Prev.Top.X || Horz.Next.Top.X > Result.Prev.Top.X)\n\t\t\t\t{\n\t\t\t\t\tResult = Horz.Next;\n\t\t\t\t}\n\t\t\t}\n\t\t\twhile (E !== Result)\n\t\t\t{\n\t\t\t\tE.NextInLML = E.Prev;\n\t\t\t\tif (E.Dx === ClipperLib.ClipperBase.horizontal && E !== EStart && E.Bot.X !== E.Next.Top.X)\n\t\t\t\t\tthis.ReverseHorizontal(E);\n\t\t\t\tE = E.Prev;\n\t\t\t}\n\t\t\tif (E.Dx === ClipperLib.ClipperBase.horizontal && E !== EStart && E.Bot.X !== E.Next.Top.X)\n\t\t\t\tthis.ReverseHorizontal(E);\n\t\t\tResult = Result.Prev;\n\t\t\t//move to the edge just beyond current bound\n\t\t}\n\n\t\treturn Result;\n\t};\n\n\tClipperLib.ClipperBase.prototype.AddPath = function (pg, polyType, Closed)\n\t{\n\t\tif (ClipperLib.use_lines)\n\t\t{\n\t\t\tif (!Closed && polyType === ClipperLib.PolyType.ptClip)\n\t\t\t\tClipperLib.Error(\"AddPath: Open paths must be subject.\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (!Closed)\n\t\t\t\tClipperLib.Error(\"AddPath: Open paths have been disabled.\");\n\t\t}\n\t\tvar highI = pg.length - 1;\n\t\tif (Closed)\n\t\t\twhile (highI > 0 && (ClipperLib.IntPoint.op_Equality(pg[highI], pg[0])))\n\t\t\t\t--highI;\n\t\twhile (highI > 0 && (ClipperLib.IntPoint.op_Equality(pg[highI], pg[highI - 1])))\n\t\t\t--highI;\n\t\tif ((Closed && highI < 2) || (!Closed && highI < 1))\n\t\t\treturn false;\n\t\t//create a new edge array ...\n\t\tvar edges = new Array();\n\t\tfor (var i = 0; i <= highI; i++)\n\t\t\tedges.push(new ClipperLib.TEdge());\n\t\tvar IsFlat = true;\n\t\t//1. Basic (first) edge initialization ...\n\n\t\t//edges[1].Curr = pg[1];\n\t\tedges[1].Curr.X = pg[1].X;\n\t\tedges[1].Curr.Y = pg[1].Y;\n\t\tif (ClipperLib.use_xyz) edges[1].Curr.Z = pg[1].Z;\n\n\t\tvar $1 = {\n\t\t\tValue: this.m_UseFullRange\n\t\t};\n\n\t\tthis.RangeTest(pg[0], $1);\n\t\tthis.m_UseFullRange = $1.Value;\n\n\t\t$1.Value = this.m_UseFullRange;\n\t\tthis.RangeTest(pg[highI], $1);\n\t\tthis.m_UseFullRange = $1.Value;\n\n\t\tthis.InitEdge(edges[0], edges[1], edges[highI], pg[0]);\n\t\tthis.InitEdge(edges[highI], edges[0], edges[highI - 1], pg[highI]);\n\t\tfor (var i = highI - 1; i >= 1; --i)\n\t\t{\n\t\t\t$1.Value = this.m_UseFullRange;\n\t\t\tthis.RangeTest(pg[i], $1);\n\t\t\tthis.m_UseFullRange = $1.Value;\n\n\t\t\tthis.InitEdge(edges[i], edges[i + 1], edges[i - 1], pg[i]);\n\t\t}\n\n\t\tvar eStart = edges[0];\n\t\t//2. Remove duplicate vertices, and (when closed) collinear edges ...\n\t\tvar E = eStart,\n\t\t\teLoopStop = eStart;\n\t\tfor (;;)\n\t\t{\n\t\t\t//console.log(E.Next, eStart);\n\t\t\t//nb: allows matching start and end points when not Closed ...\n\t\t\tif (E.Curr === E.Next.Curr && (Closed || E.Next !== eStart))\n\t\t\t{\n\t\t\t\tif (E === E.Next)\n\t\t\t\t\tbreak;\n\t\t\t\tif (E === eStart)\n\t\t\t\t\teStart = E.Next;\n\t\t\t\tE = this.RemoveEdge(E);\n\t\t\t\teLoopStop = E;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (E.Prev === E.Next)\n\t\t\t\tbreak;\n\t\t\telse if (Closed && ClipperLib.ClipperBase.SlopesEqual4(E.Prev.Curr, E.Curr, E.Next.Curr, this.m_UseFullRange) && (!this.PreserveCollinear || !this.Pt2IsBetweenPt1AndPt3(E.Prev.Curr, E.Curr, E.Next.Curr)))\n\t\t\t{\n\t\t\t\t//Collinear edges are allowed for open paths but in closed paths\n\t\t\t\t//the default is to merge adjacent collinear edges into a single edge.\n\t\t\t\t//However, if the PreserveCollinear property is enabled, only overlapping\n\t\t\t\t//collinear edges (ie spikes) will be removed from closed paths.\n\t\t\t\tif (E === eStart)\n\t\t\t\t\teStart = E.Next;\n\t\t\t\tE = this.RemoveEdge(E);\n\t\t\t\tE = E.Prev;\n\t\t\t\teLoopStop = E;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tE = E.Next;\n\t\t\tif ((E === eLoopStop) || (!Closed && E.Next === eStart)) break;\n\t\t}\n\t\tif ((!Closed && (E === E.Next)) || (Closed && (E.Prev === E.Next)))\n\t\t\treturn false;\n\t\tif (!Closed)\n\t\t{\n\t\t\tthis.m_HasOpenPaths = true;\n\t\t\teStart.Prev.OutIdx = ClipperLib.ClipperBase.Skip;\n\t\t}\n\t\t//3. Do second stage of edge initialization ...\n\t\tE = eStart;\n\t\tdo {\n\t\t\tthis.InitEdge2(E, polyType);\n\t\t\tE = E.Next;\n\t\t\tif (IsFlat && E.Curr.Y !== eStart.Curr.Y)\n\t\t\t\tIsFlat = false;\n\t\t}\n\t\twhile (E !== eStart)\n\t\t//4. Finally, add edge bounds to LocalMinima list ...\n\t\t//Totally flat paths must be handled differently when adding them\n\t\t//to LocalMinima list to avoid endless loops etc ...\n\t\tif (IsFlat)\n\t\t{\n\t\t\tif (Closed)\n\t\t\t\treturn false;\n\n\t\t\tE.Prev.OutIdx = ClipperLib.ClipperBase.Skip;\n\n\t\t\tvar locMin = new ClipperLib.LocalMinima();\n\t\t\tlocMin.Next = null;\n\t\t\tlocMin.Y = E.Bot.Y;\n\t\t\tlocMin.LeftBound = null;\n\t\t\tlocMin.RightBound = E;\n\t\t\tlocMin.RightBound.Side = ClipperLib.EdgeSide.esRight;\n\t\t\tlocMin.RightBound.WindDelta = 0;\n\n\t\t\tfor (;;)\n\t\t\t{\n\t\t\t\tif (E.Bot.X !== E.Prev.Top.X) this.ReverseHorizontal(E);\n\t\t\t\tif (E.Next.OutIdx === ClipperLib.ClipperBase.Skip) break;\n\t\t\t\tE.NextInLML = E.Next;\n\t\t\t\tE = E.Next;\n\t\t\t}\n\t\t\tthis.InsertLocalMinima(locMin);\n\t\t\tthis.m_edges.push(edges);\n\t\t\treturn true;\n\t\t}\n\t\tthis.m_edges.push(edges);\n\t\tvar leftBoundIsForward;\n\t\tvar EMin = null;\n\n\t\t//workaround to avoid an endless loop in the while loop below when\n\t\t//open paths have matching start and end points ...\n\t\tif (ClipperLib.IntPoint.op_Equality(E.Prev.Bot, E.Prev.Top))\n\t\t\tE = E.Next;\n\n\t\tfor (;;)\n\t\t{\n\t\t\tE = this.FindNextLocMin(E);\n\t\t\tif (E === EMin)\n\t\t\t\tbreak;\n\t\t\telse if (EMin === null)\n\t\t\t\tEMin = E;\n\t\t\t//E and E.Prev now share a local minima (left aligned if horizontal).\n\t\t\t//Compare their slopes to find which starts which bound ...\n\t\t\tvar locMin = new ClipperLib.LocalMinima();\n\t\t\tlocMin.Next = null;\n\t\t\tlocMin.Y = E.Bot.Y;\n\t\t\tif (E.Dx < E.Prev.Dx)\n\t\t\t{\n\t\t\t\tlocMin.LeftBound = E.Prev;\n\t\t\t\tlocMin.RightBound = E;\n\t\t\t\tleftBoundIsForward = false;\n\t\t\t\t//Q.nextInLML = Q.prev\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tlocMin.LeftBound = E;\n\t\t\t\tlocMin.RightBound = E.Prev;\n\t\t\t\tleftBoundIsForward = true;\n\t\t\t\t//Q.nextInLML = Q.next\n\t\t\t}\n\t\t\tlocMin.LeftBound.Side = ClipperLib.EdgeSide.esLeft;\n\t\t\tlocMin.RightBound.Side = ClipperLib.EdgeSide.esRight;\n\t\t\tif (!Closed)\n\t\t\t\tlocMin.LeftBound.WindDelta = 0;\n\t\t\telse if (locMin.LeftBound.Next === locMin.RightBound)\n\t\t\t\tlocMin.LeftBound.WindDelta = -1;\n\t\t\telse\n\t\t\t\tlocMin.LeftBound.WindDelta = 1;\n\t\t\tlocMin.RightBound.WindDelta = -locMin.LeftBound.WindDelta;\n\t\t\tE = this.ProcessBound(locMin.LeftBound, leftBoundIsForward);\n\t\t\tif (E.OutIdx === ClipperLib.ClipperBase.Skip)\n\t\t\t\tE = this.ProcessBound(E, leftBoundIsForward);\n\t\t\tvar E2 = this.ProcessBound(locMin.RightBound, !leftBoundIsForward);\n\t\t\tif (E2.OutIdx === ClipperLib.ClipperBase.Skip) E2 = this.ProcessBound(E2, !leftBoundIsForward);\n\t\t\tif (locMin.LeftBound.OutIdx === ClipperLib.ClipperBase.Skip)\n\t\t\t\tlocMin.LeftBound = null;\n\t\t\telse if (locMin.RightBound.OutIdx === ClipperLib.ClipperBase.Skip)\n\t\t\t\tlocMin.RightBound = null;\n\t\t\tthis.InsertLocalMinima(locMin);\n\t\t\tif (!leftBoundIsForward)\n\t\t\t\tE = E2;\n\t\t}\n\t\treturn true;\n\t};\n\n\tClipperLib.ClipperBase.prototype.AddPaths = function (ppg, polyType, closed)\n\t{\n\t\t//  console.log(\"-------------------------------------------\");\n\t\t//  console.log(JSON.stringify(ppg));\n\t\tvar result = false;\n\t\tfor (var i = 0, ilen = ppg.length; i < ilen; ++i)\n\t\t\tif (this.AddPath(ppg[i], polyType, closed))\n\t\t\t\tresult = true;\n\t\treturn result;\n\t};\n\n\tClipperLib.ClipperBase.prototype.Pt2IsBetweenPt1AndPt3 = function (pt1, pt2, pt3)\n\t{\n\t\tif ((ClipperLib.IntPoint.op_Equality(pt1, pt3)) || (ClipperLib.IntPoint.op_Equality(pt1, pt2)) || (ClipperLib.IntPoint.op_Equality(pt3, pt2)))\n\n\t\t\t//if ((pt1 == pt3) || (pt1 == pt2) || (pt3 == pt2))\n\t\t\treturn false;\n\n\t\telse if (pt1.X !== pt3.X)\n\t\t\treturn (pt2.X > pt1.X) === (pt2.X < pt3.X);\n\t\telse\n\t\t\treturn (pt2.Y > pt1.Y) === (pt2.Y < pt3.Y);\n\t};\n\n\tClipperLib.ClipperBase.prototype.RemoveEdge = function (e)\n\t{\n\t\t//removes e from double_linked_list (but without removing from memory)\n\t\te.Prev.Next = e.Next;\n\t\te.Next.Prev = e.Prev;\n\t\tvar result = e.Next;\n\t\te.Prev = null; //flag as removed (see ClipperBase.Clear)\n\t\treturn result;\n\t};\n\n\tClipperLib.ClipperBase.prototype.SetDx = function (e)\n\t{\n\t\te.Delta.X = (e.Top.X - e.Bot.X);\n\t\te.Delta.Y = (e.Top.Y - e.Bot.Y);\n\t\tif (e.Delta.Y === 0) e.Dx = ClipperLib.ClipperBase.horizontal;\n\t\telse e.Dx = (e.Delta.X) / (e.Delta.Y);\n\t};\n\n\tClipperLib.ClipperBase.prototype.InsertLocalMinima = function (newLm)\n\t{\n\t\tif (this.m_MinimaList === null)\n\t\t{\n\t\t\tthis.m_MinimaList = newLm;\n\t\t}\n\t\telse if (newLm.Y >= this.m_MinimaList.Y)\n\t\t{\n\t\t\tnewLm.Next = this.m_MinimaList;\n\t\t\tthis.m_MinimaList = newLm;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tvar tmpLm = this.m_MinimaList;\n\t\t\twhile (tmpLm.Next !== null && (newLm.Y < tmpLm.Next.Y))\n\t\t\t\ttmpLm = tmpLm.Next;\n\t\t\tnewLm.Next = tmpLm.Next;\n\t\t\ttmpLm.Next = newLm;\n\t\t}\n\t};\n\n\tClipperLib.ClipperBase.prototype.PopLocalMinima = function (Y, current)\n\t{\n\t\tcurrent.v = this.m_CurrentLM;\n\t\tif (this.m_CurrentLM !== null && this.m_CurrentLM.Y === Y)\n\t\t{\n\t\t\tthis.m_CurrentLM = this.m_CurrentLM.Next;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t};\n\n\tClipperLib.ClipperBase.prototype.ReverseHorizontal = function (e)\n\t{\n\t\t//swap horizontal edges' top and bottom x's so they follow the natural\n\t\t//progression of the bounds - ie so their xbots will align with the\n\t\t//adjoining lower edge. [Helpful in the ProcessHorizontal() method.]\n\t\tvar tmp = e.Top.X;\n\t\te.Top.X = e.Bot.X;\n\t\te.Bot.X = tmp;\n\t\tif (ClipperLib.use_xyz)\n\t\t{\n\t\t\ttmp = e.Top.Z;\n\t\t\te.Top.Z = e.Bot.Z;\n\t\t\te.Bot.Z = tmp;\n\t\t}\n\t};\n\n\tClipperLib.ClipperBase.prototype.Reset = function ()\n\t{\n\t\tthis.m_CurrentLM = this.m_MinimaList;\n\t\tif (this.m_CurrentLM === null) //ie nothing to process\n\t\t\treturn;\n\t\t//reset all edges ...\n\t\tthis.m_Scanbeam = null;\n\t\tvar lm = this.m_MinimaList;\n\t\twhile (lm !== null)\n\t\t{\n\t\t\tthis.InsertScanbeam(lm.Y);\n\t\t\tvar e = lm.LeftBound;\n\t\t\tif (e !== null)\n\t\t\t{\n\t\t\t\t//e.Curr = e.Bot;\n\t\t\t\te.Curr.X = e.Bot.X;\n\t\t\t\te.Curr.Y = e.Bot.Y;\n\t\t\t\tif (ClipperLib.use_xyz) e.Curr.Z = e.Bot.Z;\n\t\t\t\te.OutIdx = ClipperLib.ClipperBase.Unassigned;\n\t\t\t}\n\t\t\te = lm.RightBound;\n\t\t\tif (e !== null)\n\t\t\t{\n\t\t\t\t//e.Curr = e.Bot;\n\t\t\t\te.Curr.X = e.Bot.X;\n\t\t\t\te.Curr.Y = e.Bot.Y;\n\t\t\t\tif (ClipperLib.use_xyz) e.Curr.Z = e.Bot.Z;\n\t\t\t\te.OutIdx = ClipperLib.ClipperBase.Unassigned;\n\t\t\t}\n\t\t\tlm = lm.Next;\n\t\t}\n\t\tthis.m_ActiveEdges = null;\n\t};\n\n\tClipperLib.ClipperBase.prototype.InsertScanbeam = function (Y)\n\t{\n\t\t//single-linked list: sorted descending, ignoring dups.\n\t\tif (this.m_Scanbeam === null)\n\t\t{\n\t\t\tthis.m_Scanbeam = new ClipperLib.Scanbeam();\n\t\t\tthis.m_Scanbeam.Next = null;\n\t\t\tthis.m_Scanbeam.Y = Y;\n\t\t}\n\t\telse if (Y > this.m_Scanbeam.Y)\n\t\t{\n\t\t\tvar newSb = new ClipperLib.Scanbeam();\n\t\t\tnewSb.Y = Y;\n\t\t\tnewSb.Next = this.m_Scanbeam;\n\t\t\tthis.m_Scanbeam = newSb;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tvar sb2 = this.m_Scanbeam;\n\t\t\twhile (sb2.Next !== null && Y <= sb2.Next.Y)\n\t\t\t{\n\t\t\t\tsb2 = sb2.Next;\n\t\t\t}\n\t\t\tif (Y === sb2.Y)\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t} //ie ignores duplicates\n\t\t\tvar newSb1 = new ClipperLib.Scanbeam();\n\t\t\tnewSb1.Y = Y;\n\t\t\tnewSb1.Next = sb2.Next;\n\t\t\tsb2.Next = newSb1;\n\t\t}\n\t};\n\n\tClipperLib.ClipperBase.prototype.PopScanbeam = function (Y)\n\t{\n\t\tif (this.m_Scanbeam === null)\n\t\t{\n\t\t\tY.v = 0;\n\t\t\treturn false;\n\t\t}\n\t\tY.v = this.m_Scanbeam.Y;\n\t\tthis.m_Scanbeam = this.m_Scanbeam.Next;\n\t\treturn true;\n\t};\n\n\tClipperLib.ClipperBase.prototype.LocalMinimaPending = function ()\n\t{\n\t\treturn (this.m_CurrentLM !== null);\n\t};\n\n\tClipperLib.ClipperBase.prototype.CreateOutRec = function ()\n\t{\n\t\tvar result = new ClipperLib.OutRec();\n\t\tresult.Idx = ClipperLib.ClipperBase.Unassigned;\n\t\tresult.IsHole = false;\n\t\tresult.IsOpen = false;\n\t\tresult.FirstLeft = null;\n\t\tresult.Pts = null;\n\t\tresult.BottomPt = null;\n\t\tresult.PolyNode = null;\n\t\tthis.m_PolyOuts.push(result);\n\t\tresult.Idx = this.m_PolyOuts.length - 1;\n\t\treturn result;\n\t};\n\n\tClipperLib.ClipperBase.prototype.DisposeOutRec = function (index)\n\t{\n\t\tvar outRec = this.m_PolyOuts[index];\n\t\toutRec.Pts = null;\n\t\toutRec = null;\n\t\tthis.m_PolyOuts[index] = null;\n\t};\n\n\tClipperLib.ClipperBase.prototype.UpdateEdgeIntoAEL = function (e)\n\t{\n\t\tif (e.NextInLML === null)\n\t\t{\n\t\t\tClipperLib.Error(\"UpdateEdgeIntoAEL: invalid call\");\n\t\t}\n\t\tvar AelPrev = e.PrevInAEL;\n\t\tvar AelNext = e.NextInAEL;\n\t\te.NextInLML.OutIdx = e.OutIdx;\n\t\tif (AelPrev !== null)\n\t\t{\n\t\t\tAelPrev.NextInAEL = e.NextInLML;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.m_ActiveEdges = e.NextInLML;\n\t\t}\n\t\tif (AelNext !== null)\n\t\t{\n\t\t\tAelNext.PrevInAEL = e.NextInLML;\n\t\t}\n\t\te.NextInLML.Side = e.Side;\n\t\te.NextInLML.WindDelta = e.WindDelta;\n\t\te.NextInLML.WindCnt = e.WindCnt;\n\t\te.NextInLML.WindCnt2 = e.WindCnt2;\n\t\te = e.NextInLML;\n\t\te.Curr.X = e.Bot.X;\n\t\te.Curr.Y = e.Bot.Y;\n\t\te.PrevInAEL = AelPrev;\n\t\te.NextInAEL = AelNext;\n\t\tif (!ClipperLib.ClipperBase.IsHorizontal(e))\n\t\t{\n\t\t\tthis.InsertScanbeam(e.Top.Y);\n\t\t}\n\t\treturn e;\n\t};\n\n\tClipperLib.ClipperBase.prototype.SwapPositionsInAEL = function (edge1, edge2)\n\t{\n\t\t//check that one or other edge hasn't already been removed from AEL ...\n\t\tif (edge1.NextInAEL === edge1.PrevInAEL || edge2.NextInAEL === edge2.PrevInAEL)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tif (edge1.NextInAEL === edge2)\n\t\t{\n\t\t\tvar next = edge2.NextInAEL;\n\t\t\tif (next !== null)\n\t\t\t{\n\t\t\t\tnext.PrevInAEL = edge1;\n\t\t\t}\n\t\t\tvar prev = edge1.PrevInAEL;\n\t\t\tif (prev !== null)\n\t\t\t{\n\t\t\t\tprev.NextInAEL = edge2;\n\t\t\t}\n\t\t\tedge2.PrevInAEL = prev;\n\t\t\tedge2.NextInAEL = edge1;\n\t\t\tedge1.PrevInAEL = edge2;\n\t\t\tedge1.NextInAEL = next;\n\t\t}\n\t\telse if (edge2.NextInAEL === edge1)\n\t\t{\n\t\t\tvar next1 = edge1.NextInAEL;\n\t\t\tif (next1 !== null)\n\t\t\t{\n\t\t\t\tnext1.PrevInAEL = edge2;\n\t\t\t}\n\t\t\tvar prev1 = edge2.PrevInAEL;\n\t\t\tif (prev1 !== null)\n\t\t\t{\n\t\t\t\tprev1.NextInAEL = edge1;\n\t\t\t}\n\t\t\tedge1.PrevInAEL = prev1;\n\t\t\tedge1.NextInAEL = edge2;\n\t\t\tedge2.PrevInAEL = edge1;\n\t\t\tedge2.NextInAEL = next1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tvar next2 = edge1.NextInAEL;\n\t\t\tvar prev2 = edge1.PrevInAEL;\n\t\t\tedge1.NextInAEL = edge2.NextInAEL;\n\t\t\tif (edge1.NextInAEL !== null)\n\t\t\t{\n\t\t\t\tedge1.NextInAEL.PrevInAEL = edge1;\n\t\t\t}\n\t\t\tedge1.PrevInAEL = edge2.PrevInAEL;\n\t\t\tif (edge1.PrevInAEL !== null)\n\t\t\t{\n\t\t\t\tedge1.PrevInAEL.NextInAEL = edge1;\n\t\t\t}\n\t\t\tedge2.NextInAEL = next2;\n\t\t\tif (edge2.NextInAEL !== null)\n\t\t\t{\n\t\t\t\tedge2.NextInAEL.PrevInAEL = edge2;\n\t\t\t}\n\t\t\tedge2.PrevInAEL = prev2;\n\t\t\tif (edge2.PrevInAEL !== null)\n\t\t\t{\n\t\t\t\tedge2.PrevInAEL.NextInAEL = edge2;\n\t\t\t}\n\t\t}\n\n\t\tif (edge1.PrevInAEL === null)\n\t\t{\n\t\t\tthis.m_ActiveEdges = edge1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (edge2.PrevInAEL === null)\n\t\t\t{\n\t\t\t\tthis.m_ActiveEdges = edge2;\n\t\t\t}\n\t\t}\n\t};\n\n\tClipperLib.ClipperBase.prototype.DeleteFromAEL = function (e)\n\t{\n\t\tvar AelPrev = e.PrevInAEL;\n\t\tvar AelNext = e.NextInAEL;\n\t\tif (AelPrev === null && AelNext === null && e !== this.m_ActiveEdges)\n\t\t{\n\t\t\treturn;\n\t\t} //already deleted\n\t\tif (AelPrev !== null)\n\t\t{\n\t\t\tAelPrev.NextInAEL = AelNext;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.m_ActiveEdges = AelNext;\n\t\t}\n\t\tif (AelNext !== null)\n\t\t{\n\t\t\tAelNext.PrevInAEL = AelPrev;\n\t\t}\n\t\te.NextInAEL = null;\n\t\te.PrevInAEL = null;\n\t}\n\n\t// public Clipper(int InitOptions = 0)\n\t/**\n\t * @suppress {missingProperties}\n\t */\n\tClipperLib.Clipper = function (InitOptions)\n\t{\n\t\tif (typeof (InitOptions) === \"undefined\") InitOptions = 0;\n\t\tthis.m_PolyOuts = null;\n\t\tthis.m_ClipType = ClipperLib.ClipType.ctIntersection;\n\t\tthis.m_Scanbeam = null;\n\t\tthis.m_Maxima = null;\n\t\tthis.m_ActiveEdges = null;\n\t\tthis.m_SortedEdges = null;\n\t\tthis.m_IntersectList = null;\n\t\tthis.m_IntersectNodeComparer = null;\n\t\tthis.m_ExecuteLocked = false;\n\t\tthis.m_ClipFillType = ClipperLib.PolyFillType.pftEvenOdd;\n\t\tthis.m_SubjFillType = ClipperLib.PolyFillType.pftEvenOdd;\n\t\tthis.m_Joins = null;\n\t\tthis.m_GhostJoins = null;\n\t\tthis.m_UsingPolyTree = false;\n\t\tthis.ReverseSolution = false;\n\t\tthis.StrictlySimple = false;\n\n\t\tClipperLib.ClipperBase.call(this);\n\n\t\tthis.m_Scanbeam = null;\n\t\tthis.m_Maxima = null;\n\t\tthis.m_ActiveEdges = null;\n\t\tthis.m_SortedEdges = null;\n\t\tthis.m_IntersectList = new Array();\n\t\tthis.m_IntersectNodeComparer = ClipperLib.MyIntersectNodeSort.Compare;\n\t\tthis.m_ExecuteLocked = false;\n\t\tthis.m_UsingPolyTree = false;\n\t\tthis.m_PolyOuts = new Array();\n\t\tthis.m_Joins = new Array();\n\t\tthis.m_GhostJoins = new Array();\n\t\tthis.ReverseSolution = (1 & InitOptions) !== 0;\n\t\tthis.StrictlySimple = (2 & InitOptions) !== 0;\n\t\tthis.PreserveCollinear = (4 & InitOptions) !== 0;\n\t\tif (ClipperLib.use_xyz)\n\t\t{\n\t\t\tthis.ZFillFunction = null; // function (IntPoint vert1, IntPoint vert2, ref IntPoint intersectPt);\n\t\t}\n\t};\n\n\tClipperLib.Clipper.ioReverseSolution = 1;\n\tClipperLib.Clipper.ioStrictlySimple = 2;\n\tClipperLib.Clipper.ioPreserveCollinear = 4;\n\n\tClipperLib.Clipper.prototype.Clear = function ()\n\t{\n\t\tif (this.m_edges.length === 0)\n\t\t\treturn;\n\t\t//avoids problems with ClipperBase destructor\n\t\tthis.DisposeAllPolyPts();\n\t\tClipperLib.ClipperBase.prototype.Clear.call(this);\n\t};\n\n\tClipperLib.Clipper.prototype.InsertMaxima = function (X)\n\t{\n\t\t//double-linked list: sorted ascending, ignoring dups.\n\t\tvar newMax = new ClipperLib.Maxima();\n\t\tnewMax.X = X;\n\t\tif (this.m_Maxima === null)\n\t\t{\n\t\t\tthis.m_Maxima = newMax;\n\t\t\tthis.m_Maxima.Next = null;\n\t\t\tthis.m_Maxima.Prev = null;\n\t\t}\n\t\telse if (X < this.m_Maxima.X)\n\t\t{\n\t\t\tnewMax.Next = this.m_Maxima;\n\t\t\tnewMax.Prev = null;\n\t\t\tthis.m_Maxima = newMax;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tvar m = this.m_Maxima;\n\t\t\twhile (m.Next !== null && X >= m.Next.X)\n\t\t\t{\n\t\t\t\tm = m.Next;\n\t\t\t}\n\t\t\tif (X === m.X)\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t} //ie ignores duplicates (& CG to clean up newMax)\n\t\t\t//insert newMax between m and m.Next ...\n\t\t\tnewMax.Next = m.Next;\n\t\t\tnewMax.Prev = m;\n\t\t\tif (m.Next !== null)\n\t\t\t{\n\t\t\t\tm.Next.Prev = newMax;\n\t\t\t}\n\t\t\tm.Next = newMax;\n\t\t}\n\t};\n\n\t// ************************************\n\tClipperLib.Clipper.prototype.Execute = function ()\n\t{\n\t\tvar a = arguments,\n\t\t\talen = a.length,\n\t\t\tispolytree = a[1] instanceof ClipperLib.PolyTree;\n\t\tif (alen === 4 && !ispolytree) // function (clipType, solution, subjFillType, clipFillType)\n\t\t{\n\t\t\tvar clipType = a[0],\n\t\t\t\tsolution = a[1],\n\t\t\t\tsubjFillType = a[2],\n\t\t\t\tclipFillType = a[3];\n\t\t\tif (this.m_ExecuteLocked)\n\t\t\t\treturn false;\n\t\t\tif (this.m_HasOpenPaths)\n\t\t\t\tClipperLib.Error(\"Error: PolyTree struct is needed for open path clipping.\");\n\t\t\tthis.m_ExecuteLocked = true;\n\t\t\tClipperLib.Clear(solution);\n\t\t\tthis.m_SubjFillType = subjFillType;\n\t\t\tthis.m_ClipFillType = clipFillType;\n\t\t\tthis.m_ClipType = clipType;\n\t\t\tthis.m_UsingPolyTree = false;\n\t\t\ttry\n\t\t\t{\n\t\t\t\tvar succeeded = this.ExecuteInternal();\n\t\t\t\t//build the return polygons ...\n\t\t\t\tif (succeeded) this.BuildResult(solution);\n\t\t\t}\n\t\t\tfinally\n\t\t\t{\n\t\t\t\tthis.DisposeAllPolyPts();\n\t\t\t\tthis.m_ExecuteLocked = false;\n\t\t\t}\n\t\t\treturn succeeded;\n\t\t}\n\t\telse if (alen === 4 && ispolytree) // function (clipType, polytree, subjFillType, clipFillType)\n\t\t{\n\t\t\tvar clipType = a[0],\n\t\t\t\tpolytree = a[1],\n\t\t\t\tsubjFillType = a[2],\n\t\t\t\tclipFillType = a[3];\n\t\t\tif (this.m_ExecuteLocked)\n\t\t\t\treturn false;\n\t\t\tthis.m_ExecuteLocked = true;\n\t\t\tthis.m_SubjFillType = subjFillType;\n\t\t\tthis.m_ClipFillType = clipFillType;\n\t\t\tthis.m_ClipType = clipType;\n\t\t\tthis.m_UsingPolyTree = true;\n\t\t\ttry\n\t\t\t{\n\t\t\t\tvar succeeded = this.ExecuteInternal();\n\t\t\t\t//build the return polygons ...\n\t\t\t\tif (succeeded) this.BuildResult2(polytree);\n\t\t\t}\n\t\t\tfinally\n\t\t\t{\n\t\t\t\tthis.DisposeAllPolyPts();\n\t\t\t\tthis.m_ExecuteLocked = false;\n\t\t\t}\n\t\t\treturn succeeded;\n\t\t}\n\t\telse if (alen === 2 && !ispolytree) // function (clipType, solution)\n\t\t{\n\t\t\tvar clipType = a[0],\n\t\t\t\tsolution = a[1];\n\t\t\treturn this.Execute(clipType, solution, ClipperLib.PolyFillType.pftEvenOdd, ClipperLib.PolyFillType.pftEvenOdd);\n\t\t}\n\t\telse if (alen === 2 && ispolytree) // function (clipType, polytree)\n\t\t{\n\t\t\tvar clipType = a[0],\n\t\t\t\tpolytree = a[1];\n\t\t\treturn this.Execute(clipType, polytree, ClipperLib.PolyFillType.pftEvenOdd, ClipperLib.PolyFillType.pftEvenOdd);\n\t\t}\n\t};\n\n\tClipperLib.Clipper.prototype.FixHoleLinkage = function (outRec)\n\t{\n\t\t//skip if an outermost polygon or\n\t\t//already already points to the correct FirstLeft ...\n\t\tif (outRec.FirstLeft === null || (outRec.IsHole !== outRec.FirstLeft.IsHole && outRec.FirstLeft.Pts !== null))\n\t\t\treturn;\n\t\tvar orfl = outRec.FirstLeft;\n\t\twhile (orfl !== null && ((orfl.IsHole === outRec.IsHole) || orfl.Pts === null))\n\t\t\torfl = orfl.FirstLeft;\n\t\toutRec.FirstLeft = orfl;\n\t};\n\n\tClipperLib.Clipper.prototype.ExecuteInternal = function ()\n\t{\n\t\ttry\n\t\t{\n\t\t\tthis.Reset();\n\t\t\tthis.m_SortedEdges = null;\n\t\t\tthis.m_Maxima = null;\n\n\t\t\tvar botY = {},\n\t\t\t\ttopY = {};\n\n\t\t\tif (!this.PopScanbeam(botY))\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tthis.InsertLocalMinimaIntoAEL(botY.v);\n\t\t\twhile (this.PopScanbeam(topY) || this.LocalMinimaPending())\n\t\t\t{\n\t\t\t\tthis.ProcessHorizontals();\n\t\t\t\tthis.m_GhostJoins.length = 0;\n\t\t\t\tif (!this.ProcessIntersections(topY.v))\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tthis.ProcessEdgesAtTopOfScanbeam(topY.v);\n\t\t\t\tbotY.v = topY.v;\n\t\t\t\tthis.InsertLocalMinimaIntoAEL(botY.v);\n\t\t\t}\n\n\t\t\t//fix orientations ...\n\t\t\tvar outRec, i, ilen;\n\t\t\t//fix orientations ...\n\t\t\tfor (i = 0, ilen = this.m_PolyOuts.length; i < ilen; i++)\n\t\t\t{\n\t\t\t\toutRec = this.m_PolyOuts[i];\n\t\t\t\tif (outRec.Pts === null || outRec.IsOpen) continue;\n\t\t\t\tif ((outRec.IsHole ^ this.ReverseSolution) == (this.Area$1(outRec) > 0))\n\t\t\t\t\tthis.ReversePolyPtLinks(outRec.Pts);\n\t\t\t}\n\n\t\t\tthis.JoinCommonEdges();\n\n\t\t\tfor (i = 0, ilen = this.m_PolyOuts.length; i < ilen; i++)\n\t\t\t{\n\t\t\t\toutRec = this.m_PolyOuts[i];\n\t\t\t\tif (outRec.Pts === null)\n\t\t\t\t\tcontinue;\n\t\t\t\telse if (outRec.IsOpen)\n\t\t\t\t\tthis.FixupOutPolyline(outRec);\n\t\t\t\telse\n\t\t\t\t\tthis.FixupOutPolygon(outRec);\n\t\t\t}\n\n\t\t\tif (this.StrictlySimple) this.DoSimplePolygons();\n\t\t\treturn true;\n\t\t}\n\t\t//catch { return false; }\n\t\tfinally\n\t\t{\n\t\t\tthis.m_Joins.length = 0;\n\t\t\tthis.m_GhostJoins.length = 0;\n\t\t}\n\t};\n\n\tClipperLib.Clipper.prototype.DisposeAllPolyPts = function ()\n\t{\n\t\tfor (var i = 0, ilen = this.m_PolyOuts.length; i < ilen; ++i)\n\t\t\tthis.DisposeOutRec(i);\n\t\tClipperLib.Clear(this.m_PolyOuts);\n\t};\n\n\tClipperLib.Clipper.prototype.AddJoin = function (Op1, Op2, OffPt)\n\t{\n\t\tvar j = new ClipperLib.Join();\n\t\tj.OutPt1 = Op1;\n\t\tj.OutPt2 = Op2;\n\t\t//j.OffPt = OffPt;\n\t\tj.OffPt.X = OffPt.X;\n\t\tj.OffPt.Y = OffPt.Y;\n\t\tif (ClipperLib.use_xyz) j.OffPt.Z = OffPt.Z;\n\t\tthis.m_Joins.push(j);\n\t};\n\n\tClipperLib.Clipper.prototype.AddGhostJoin = function (Op, OffPt)\n\t{\n\t\tvar j = new ClipperLib.Join();\n\t\tj.OutPt1 = Op;\n\t\t//j.OffPt = OffPt;\n\t\tj.OffPt.X = OffPt.X;\n\t\tj.OffPt.Y = OffPt.Y;\n\t\tif (ClipperLib.use_xyz) j.OffPt.Z = OffPt.Z;\n\t\tthis.m_GhostJoins.push(j);\n\t};\n\n\t//if (ClipperLib.use_xyz)\n\t//{\n\tClipperLib.Clipper.prototype.SetZ = function (pt, e1, e2)\n\t{\n\t\tif (this.ZFillFunction !== null)\n\t\t{\n\t\t\tif (pt.Z !== 0 || this.ZFillFunction === null) return;\n\t\t\telse if (ClipperLib.IntPoint.op_Equality(pt, e1.Bot)) pt.Z = e1.Bot.Z;\n\t\t\telse if (ClipperLib.IntPoint.op_Equality(pt, e1.Top)) pt.Z = e1.Top.Z;\n\t\t\telse if (ClipperLib.IntPoint.op_Equality(pt, e2.Bot)) pt.Z = e2.Bot.Z;\n\t\t\telse if (ClipperLib.IntPoint.op_Equality(pt, e2.Top)) pt.Z = e2.Top.Z;\n\t\t\telse this.ZFillFunction(e1.Bot, e1.Top, e2.Bot, e2.Top, pt);\n\t\t}\n\t};\n\t//}\n\n\tClipperLib.Clipper.prototype.InsertLocalMinimaIntoAEL = function (botY)\n\t{\n\t\tvar lm = {};\n\n\t\tvar lb;\n\t\tvar rb;\n\t\twhile (this.PopLocalMinima(botY, lm))\n\t\t{\n\t\t\tlb = lm.v.LeftBound;\n\t\t\trb = lm.v.RightBound;\n\n\t\t\tvar Op1 = null;\n\t\t\tif (lb === null)\n\t\t\t{\n\t\t\t\tthis.InsertEdgeIntoAEL(rb, null);\n\t\t\t\tthis.SetWindingCount(rb);\n\t\t\t\tif (this.IsContributing(rb))\n\t\t\t\t\tOp1 = this.AddOutPt(rb, rb.Bot);\n\t\t\t}\n\t\t\telse if (rb === null)\n\t\t\t{\n\t\t\t\tthis.InsertEdgeIntoAEL(lb, null);\n\t\t\t\tthis.SetWindingCount(lb);\n\t\t\t\tif (this.IsContributing(lb))\n\t\t\t\t\tOp1 = this.AddOutPt(lb, lb.Bot);\n\t\t\t\tthis.InsertScanbeam(lb.Top.Y);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.InsertEdgeIntoAEL(lb, null);\n\t\t\t\tthis.InsertEdgeIntoAEL(rb, lb);\n\t\t\t\tthis.SetWindingCount(lb);\n\t\t\t\trb.WindCnt = lb.WindCnt;\n\t\t\t\trb.WindCnt2 = lb.WindCnt2;\n\t\t\t\tif (this.IsContributing(lb))\n\t\t\t\t\tOp1 = this.AddLocalMinPoly(lb, rb, lb.Bot);\n\t\t\t\tthis.InsertScanbeam(lb.Top.Y);\n\t\t\t}\n\t\t\tif (rb !== null)\n\t\t\t{\n\t\t\t\tif (ClipperLib.ClipperBase.IsHorizontal(rb))\n\t\t\t\t{\n\t\t\t\t\tif (rb.NextInLML !== null)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.InsertScanbeam(rb.NextInLML.Top.Y);\n\t\t\t\t\t}\n\t\t\t\t\tthis.AddEdgeToSEL(rb);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tthis.InsertScanbeam(rb.Top.Y);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (lb === null || rb === null) continue;\n\t\t\t//if output polygons share an Edge with a horizontal rb, they'll need joining later ...\n\t\t\tif (Op1 !== null && ClipperLib.ClipperBase.IsHorizontal(rb) && this.m_GhostJoins.length > 0 && rb.WindDelta !== 0)\n\t\t\t{\n\t\t\t\tfor (var i = 0, ilen = this.m_GhostJoins.length; i < ilen; i++)\n\t\t\t\t{\n\t\t\t\t\t//if the horizontal Rb and a 'ghost' horizontal overlap, then convert\n\t\t\t\t\t//the 'ghost' join to a real join ready for later ...\n\t\t\t\t\tvar j = this.m_GhostJoins[i];\n\n\t\t\t\t\tif (this.HorzSegmentsOverlap(j.OutPt1.Pt.X, j.OffPt.X, rb.Bot.X, rb.Top.X))\n\t\t\t\t\t\tthis.AddJoin(j.OutPt1, Op1, j.OffPt);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (lb.OutIdx >= 0 && lb.PrevInAEL !== null &&\n\t\t\t\tlb.PrevInAEL.Curr.X === lb.Bot.X &&\n\t\t\t\tlb.PrevInAEL.OutIdx >= 0 &&\n\t\t\t\tClipperLib.ClipperBase.SlopesEqual5(lb.PrevInAEL.Curr, lb.PrevInAEL.Top, lb.Curr, lb.Top, this.m_UseFullRange) &&\n\t\t\t\tlb.WindDelta !== 0 && lb.PrevInAEL.WindDelta !== 0)\n\t\t\t{\n\t\t\t\tvar Op2 = this.AddOutPt(lb.PrevInAEL, lb.Bot);\n\t\t\t\tthis.AddJoin(Op1, Op2, lb.Top);\n\t\t\t}\n\t\t\tif (lb.NextInAEL !== rb)\n\t\t\t{\n\t\t\t\tif (rb.OutIdx >= 0 && rb.PrevInAEL.OutIdx >= 0 &&\n\t\t\t\t\tClipperLib.ClipperBase.SlopesEqual5(rb.PrevInAEL.Curr, rb.PrevInAEL.Top, rb.Curr, rb.Top, this.m_UseFullRange) &&\n\t\t\t\t\trb.WindDelta !== 0 && rb.PrevInAEL.WindDelta !== 0)\n\t\t\t\t{\n\t\t\t\t\tvar Op2 = this.AddOutPt(rb.PrevInAEL, rb.Bot);\n\t\t\t\t\tthis.AddJoin(Op1, Op2, rb.Top);\n\t\t\t\t}\n\t\t\t\tvar e = lb.NextInAEL;\n\t\t\t\tif (e !== null)\n\t\t\t\t\twhile (e !== rb)\n\t\t\t\t\t{\n\t\t\t\t\t\t//nb: For calculating winding counts etc, IntersectEdges() assumes\n\t\t\t\t\t\t//that param1 will be to the right of param2 ABOVE the intersection ...\n\t\t\t\t\t\tthis.IntersectEdges(rb, e, lb.Curr);\n\t\t\t\t\t\t//order important here\n\t\t\t\t\t\te = e.NextInAEL;\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\n\tClipperLib.Clipper.prototype.InsertEdgeIntoAEL = function (edge, startEdge)\n\t{\n\t\tif (this.m_ActiveEdges === null)\n\t\t{\n\t\t\tedge.PrevInAEL = null;\n\t\t\tedge.NextInAEL = null;\n\t\t\tthis.m_ActiveEdges = edge;\n\t\t}\n\t\telse if (startEdge === null && this.E2InsertsBeforeE1(this.m_ActiveEdges, edge))\n\t\t{\n\t\t\tedge.PrevInAEL = null;\n\t\t\tedge.NextInAEL = this.m_ActiveEdges;\n\t\t\tthis.m_ActiveEdges.PrevInAEL = edge;\n\t\t\tthis.m_ActiveEdges = edge;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (startEdge === null)\n\t\t\t\tstartEdge = this.m_ActiveEdges;\n\t\t\twhile (startEdge.NextInAEL !== null && !this.E2InsertsBeforeE1(startEdge.NextInAEL, edge))\n\t\t\t\tstartEdge = startEdge.NextInAEL;\n\t\t\tedge.NextInAEL = startEdge.NextInAEL;\n\t\t\tif (startEdge.NextInAEL !== null)\n\t\t\t\tstartEdge.NextInAEL.PrevInAEL = edge;\n\t\t\tedge.PrevInAEL = startEdge;\n\t\t\tstartEdge.NextInAEL = edge;\n\t\t}\n\t};\n\n\tClipperLib.Clipper.prototype.E2InsertsBeforeE1 = function (e1, e2)\n\t{\n\t\tif (e2.Curr.X === e1.Curr.X)\n\t\t{\n\t\t\tif (e2.Top.Y > e1.Top.Y)\n\t\t\t\treturn e2.Top.X < ClipperLib.Clipper.TopX(e1, e2.Top.Y);\n\t\t\telse\n\t\t\t\treturn e1.Top.X > ClipperLib.Clipper.TopX(e2, e1.Top.Y);\n\t\t}\n\t\telse\n\t\t\treturn e2.Curr.X < e1.Curr.X;\n\t};\n\n\tClipperLib.Clipper.prototype.IsEvenOddFillType = function (edge)\n\t{\n\t\tif (edge.PolyTyp === ClipperLib.PolyType.ptSubject)\n\t\t\treturn this.m_SubjFillType === ClipperLib.PolyFillType.pftEvenOdd;\n\t\telse\n\t\t\treturn this.m_ClipFillType === ClipperLib.PolyFillType.pftEvenOdd;\n\t};\n\n\tClipperLib.Clipper.prototype.IsEvenOddAltFillType = function (edge)\n\t{\n\t\tif (edge.PolyTyp === ClipperLib.PolyType.ptSubject)\n\t\t\treturn this.m_ClipFillType === ClipperLib.PolyFillType.pftEvenOdd;\n\t\telse\n\t\t\treturn this.m_SubjFillType === ClipperLib.PolyFillType.pftEvenOdd;\n\t};\n\n\tClipperLib.Clipper.prototype.IsContributing = function (edge)\n\t{\n\t\tvar pft, pft2;\n\t\tif (edge.PolyTyp === ClipperLib.PolyType.ptSubject)\n\t\t{\n\t\t\tpft = this.m_SubjFillType;\n\t\t\tpft2 = this.m_ClipFillType;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tpft = this.m_ClipFillType;\n\t\t\tpft2 = this.m_SubjFillType;\n\t\t}\n\t\tswitch (pft)\n\t\t{\n\t\tcase ClipperLib.PolyFillType.pftEvenOdd:\n\t\t\tif (edge.WindDelta === 0 && edge.WindCnt !== 1)\n\t\t\t\treturn false;\n\t\t\tbreak;\n\t\tcase ClipperLib.PolyFillType.pftNonZero:\n\t\t\tif (Math.abs(edge.WindCnt) !== 1)\n\t\t\t\treturn false;\n\t\t\tbreak;\n\t\tcase ClipperLib.PolyFillType.pftPositive:\n\t\t\tif (edge.WindCnt !== 1)\n\t\t\t\treturn false;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tif (edge.WindCnt !== -1)\n\t\t\t\treturn false;\n\t\t\tbreak;\n\t\t}\n\t\tswitch (this.m_ClipType)\n\t\t{\n\t\tcase ClipperLib.ClipType.ctIntersection:\n\t\t\tswitch (pft2)\n\t\t\t{\n\t\t\tcase ClipperLib.PolyFillType.pftEvenOdd:\n\t\t\tcase ClipperLib.PolyFillType.pftNonZero:\n\t\t\t\treturn (edge.WindCnt2 !== 0);\n\t\t\tcase ClipperLib.PolyFillType.pftPositive:\n\t\t\t\treturn (edge.WindCnt2 > 0);\n\t\t\tdefault:\n\t\t\t\treturn (edge.WindCnt2 < 0);\n\t\t\t}\n\t\tcase ClipperLib.ClipType.ctUnion:\n\t\t\tswitch (pft2)\n\t\t\t{\n\t\t\tcase ClipperLib.PolyFillType.pftEvenOdd:\n\t\t\tcase ClipperLib.PolyFillType.pftNonZero:\n\t\t\t\treturn (edge.WindCnt2 === 0);\n\t\t\tcase ClipperLib.PolyFillType.pftPositive:\n\t\t\t\treturn (edge.WindCnt2 <= 0);\n\t\t\tdefault:\n\t\t\t\treturn (edge.WindCnt2 >= 0);\n\t\t\t}\n\t\tcase ClipperLib.ClipType.ctDifference:\n\t\t\tif (edge.PolyTyp === ClipperLib.PolyType.ptSubject)\n\t\t\t\tswitch (pft2)\n\t\t\t\t{\n\t\t\t\tcase ClipperLib.PolyFillType.pftEvenOdd:\n\t\t\t\tcase ClipperLib.PolyFillType.pftNonZero:\n\t\t\t\t\treturn (edge.WindCnt2 === 0);\n\t\t\t\tcase ClipperLib.PolyFillType.pftPositive:\n\t\t\t\t\treturn (edge.WindCnt2 <= 0);\n\t\t\t\tdefault:\n\t\t\t\t\treturn (edge.WindCnt2 >= 0);\n\t\t\t\t}\n\t\t\telse\n\t\t\t\tswitch (pft2)\n\t\t\t\t{\n\t\t\t\tcase ClipperLib.PolyFillType.pftEvenOdd:\n\t\t\t\tcase ClipperLib.PolyFillType.pftNonZero:\n\t\t\t\t\treturn (edge.WindCnt2 !== 0);\n\t\t\t\tcase ClipperLib.PolyFillType.pftPositive:\n\t\t\t\t\treturn (edge.WindCnt2 > 0);\n\t\t\t\tdefault:\n\t\t\t\t\treturn (edge.WindCnt2 < 0);\n\t\t\t\t}\n\t\tcase ClipperLib.ClipType.ctXor:\n\t\t\tif (edge.WindDelta === 0)\n\t\t\t\tswitch (pft2)\n\t\t\t\t{\n\t\t\t\tcase ClipperLib.PolyFillType.pftEvenOdd:\n\t\t\t\tcase ClipperLib.PolyFillType.pftNonZero:\n\t\t\t\t\treturn (edge.WindCnt2 === 0);\n\t\t\t\tcase ClipperLib.PolyFillType.pftPositive:\n\t\t\t\t\treturn (edge.WindCnt2 <= 0);\n\t\t\t\tdefault:\n\t\t\t\t\treturn (edge.WindCnt2 >= 0);\n\t\t\t\t}\n\t\t\telse\n\t\t\t\treturn true;\n\t\t}\n\t\treturn true;\n\t};\n\n\tClipperLib.Clipper.prototype.SetWindingCount = function (edge)\n\t{\n\t\tvar e = edge.PrevInAEL;\n\t\t//find the edge of the same polytype that immediately preceeds 'edge' in AEL\n\t\twhile (e !== null && ((e.PolyTyp !== edge.PolyTyp) || (e.WindDelta === 0)))\n\t\t\te = e.PrevInAEL;\n\t\tif (e === null)\n\t\t{\n\t\t\tvar pft = (edge.PolyTyp === ClipperLib.PolyType.ptSubject ? this.m_SubjFillType : this.m_ClipFillType);\n\t\t\tif (edge.WindDelta === 0)\n\t\t\t{\n\t\t\t\tedge.WindCnt = (pft === ClipperLib.PolyFillType.pftNegative ? -1 : 1);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tedge.WindCnt = edge.WindDelta;\n\t\t\t}\n\t\t\tedge.WindCnt2 = 0;\n\t\t\te = this.m_ActiveEdges;\n\t\t\t//ie get ready to calc WindCnt2\n\t\t}\n\t\telse if (edge.WindDelta === 0 && this.m_ClipType !== ClipperLib.ClipType.ctUnion)\n\t\t{\n\t\t\tedge.WindCnt = 1;\n\t\t\tedge.WindCnt2 = e.WindCnt2;\n\t\t\te = e.NextInAEL;\n\t\t\t//ie get ready to calc WindCnt2\n\t\t}\n\t\telse if (this.IsEvenOddFillType(edge))\n\t\t{\n\t\t\t//EvenOdd filling ...\n\t\t\tif (edge.WindDelta === 0)\n\t\t\t{\n\t\t\t\t//are we inside a subj polygon ...\n\t\t\t\tvar Inside = true;\n\t\t\t\tvar e2 = e.PrevInAEL;\n\t\t\t\twhile (e2 !== null)\n\t\t\t\t{\n\t\t\t\t\tif (e2.PolyTyp === e.PolyTyp && e2.WindDelta !== 0)\n\t\t\t\t\t\tInside = !Inside;\n\t\t\t\t\te2 = e2.PrevInAEL;\n\t\t\t\t}\n\t\t\t\tedge.WindCnt = (Inside ? 0 : 1);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tedge.WindCnt = edge.WindDelta;\n\t\t\t}\n\t\t\tedge.WindCnt2 = e.WindCnt2;\n\t\t\te = e.NextInAEL;\n\t\t\t//ie get ready to calc WindCnt2\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//nonZero, Positive or Negative filling ...\n\t\t\tif (e.WindCnt * e.WindDelta < 0)\n\t\t\t{\n\t\t\t\t//prev edge is 'decreasing' WindCount (WC) toward zero\n\t\t\t\t//so we're outside the previous polygon ...\n\t\t\t\tif (Math.abs(e.WindCnt) > 1)\n\t\t\t\t{\n\t\t\t\t\t//outside prev poly but still inside another.\n\t\t\t\t\t//when reversing direction of prev poly use the same WC\n\t\t\t\t\tif (e.WindDelta * edge.WindDelta < 0)\n\t\t\t\t\t\tedge.WindCnt = e.WindCnt;\n\t\t\t\t\telse\n\t\t\t\t\t\tedge.WindCnt = e.WindCnt + edge.WindDelta;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tedge.WindCnt = (edge.WindDelta === 0 ? 1 : edge.WindDelta);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//prev edge is 'increasing' WindCount (WC) away from zero\n\t\t\t\t//so we're inside the previous polygon ...\n\t\t\t\tif (edge.WindDelta === 0)\n\t\t\t\t\tedge.WindCnt = (e.WindCnt < 0 ? e.WindCnt - 1 : e.WindCnt + 1);\n\t\t\t\telse if (e.WindDelta * edge.WindDelta < 0)\n\t\t\t\t\tedge.WindCnt = e.WindCnt;\n\t\t\t\telse\n\t\t\t\t\tedge.WindCnt = e.WindCnt + edge.WindDelta;\n\t\t\t}\n\t\t\tedge.WindCnt2 = e.WindCnt2;\n\t\t\te = e.NextInAEL;\n\t\t\t//ie get ready to calc WindCnt2\n\t\t}\n\t\t//update WindCnt2 ...\n\t\tif (this.IsEvenOddAltFillType(edge))\n\t\t{\n\t\t\t//EvenOdd filling ...\n\t\t\twhile (e !== edge)\n\t\t\t{\n\t\t\t\tif (e.WindDelta !== 0)\n\t\t\t\t\tedge.WindCnt2 = (edge.WindCnt2 === 0 ? 1 : 0);\n\t\t\t\te = e.NextInAEL;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//nonZero, Positive or Negative filling ...\n\t\t\twhile (e !== edge)\n\t\t\t{\n\t\t\t\tedge.WindCnt2 += e.WindDelta;\n\t\t\t\te = e.NextInAEL;\n\t\t\t}\n\t\t}\n\t};\n\n\tClipperLib.Clipper.prototype.AddEdgeToSEL = function (edge)\n\t{\n\t\t//SEL pointers in PEdge are use to build transient lists of horizontal edges.\n\t\t//However, since we don't need to worry about processing order, all additions\n\t\t//are made to the front of the list ...\n\t\tif (this.m_SortedEdges === null)\n\t\t{\n\t\t\tthis.m_SortedEdges = edge;\n\t\t\tedge.PrevInSEL = null;\n\t\t\tedge.NextInSEL = null;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tedge.NextInSEL = this.m_SortedEdges;\n\t\t\tedge.PrevInSEL = null;\n\t\t\tthis.m_SortedEdges.PrevInSEL = edge;\n\t\t\tthis.m_SortedEdges = edge;\n\t\t}\n\t};\n\n\tClipperLib.Clipper.prototype.PopEdgeFromSEL = function (e)\n\t{\n\t\t//Pop edge from front of SEL (ie SEL is a FILO list)\n\t\te.v = this.m_SortedEdges;\n\t\tif (e.v === null)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tvar oldE = e.v;\n\t\tthis.m_SortedEdges = e.v.NextInSEL;\n\t\tif (this.m_SortedEdges !== null)\n\t\t{\n\t\t\tthis.m_SortedEdges.PrevInSEL = null;\n\t\t}\n\t\toldE.NextInSEL = null;\n\t\toldE.PrevInSEL = null;\n\t\treturn true;\n\t};\n\n\tClipperLib.Clipper.prototype.CopyAELToSEL = function ()\n\t{\n\t\tvar e = this.m_ActiveEdges;\n\t\tthis.m_SortedEdges = e;\n\t\twhile (e !== null)\n\t\t{\n\t\t\te.PrevInSEL = e.PrevInAEL;\n\t\t\te.NextInSEL = e.NextInAEL;\n\t\t\te = e.NextInAEL;\n\t\t}\n\t};\n\n\tClipperLib.Clipper.prototype.SwapPositionsInSEL = function (edge1, edge2)\n\t{\n\t\tif (edge1.NextInSEL === null && edge1.PrevInSEL === null)\n\t\t\treturn;\n\t\tif (edge2.NextInSEL === null && edge2.PrevInSEL === null)\n\t\t\treturn;\n\t\tif (edge1.NextInSEL === edge2)\n\t\t{\n\t\t\tvar next = edge2.NextInSEL;\n\t\t\tif (next !== null)\n\t\t\t\tnext.PrevInSEL = edge1;\n\t\t\tvar prev = edge1.PrevInSEL;\n\t\t\tif (prev !== null)\n\t\t\t\tprev.NextInSEL = edge2;\n\t\t\tedge2.PrevInSEL = prev;\n\t\t\tedge2.NextInSEL = edge1;\n\t\t\tedge1.PrevInSEL = edge2;\n\t\t\tedge1.NextInSEL = next;\n\t\t}\n\t\telse if (edge2.NextInSEL === edge1)\n\t\t{\n\t\t\tvar next = edge1.NextInSEL;\n\t\t\tif (next !== null)\n\t\t\t\tnext.PrevInSEL = edge2;\n\t\t\tvar prev = edge2.PrevInSEL;\n\t\t\tif (prev !== null)\n\t\t\t\tprev.NextInSEL = edge1;\n\t\t\tedge1.PrevInSEL = prev;\n\t\t\tedge1.NextInSEL = edge2;\n\t\t\tedge2.PrevInSEL = edge1;\n\t\t\tedge2.NextInSEL = next;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tvar next = edge1.NextInSEL;\n\t\t\tvar prev = edge1.PrevInSEL;\n\t\t\tedge1.NextInSEL = edge2.NextInSEL;\n\t\t\tif (edge1.NextInSEL !== null)\n\t\t\t\tedge1.NextInSEL.PrevInSEL = edge1;\n\t\t\tedge1.PrevInSEL = edge2.PrevInSEL;\n\t\t\tif (edge1.PrevInSEL !== null)\n\t\t\t\tedge1.PrevInSEL.NextInSEL = edge1;\n\t\t\tedge2.NextInSEL = next;\n\t\t\tif (edge2.NextInSEL !== null)\n\t\t\t\tedge2.NextInSEL.PrevInSEL = edge2;\n\t\t\tedge2.PrevInSEL = prev;\n\t\t\tif (edge2.PrevInSEL !== null)\n\t\t\t\tedge2.PrevInSEL.NextInSEL = edge2;\n\t\t}\n\t\tif (edge1.PrevInSEL === null)\n\t\t\tthis.m_SortedEdges = edge1;\n\t\telse if (edge2.PrevInSEL === null)\n\t\t\tthis.m_SortedEdges = edge2;\n\t};\n\n\tClipperLib.Clipper.prototype.AddLocalMaxPoly = function (e1, e2, pt)\n\t{\n\t\tthis.AddOutPt(e1, pt);\n\t\tif (e2.WindDelta === 0) this.AddOutPt(e2, pt);\n\t\tif (e1.OutIdx === e2.OutIdx)\n\t\t{\n\t\t\te1.OutIdx = -1;\n\t\t\te2.OutIdx = -1;\n\t\t}\n\t\telse if (e1.OutIdx < e2.OutIdx)\n\t\t\tthis.AppendPolygon(e1, e2);\n\t\telse\n\t\t\tthis.AppendPolygon(e2, e1);\n\t};\n\n\tClipperLib.Clipper.prototype.AddLocalMinPoly = function (e1, e2, pt)\n\t{\n\t\tvar result;\n\t\tvar e, prevE;\n\t\tif (ClipperLib.ClipperBase.IsHorizontal(e2) || (e1.Dx > e2.Dx))\n\t\t{\n\t\t\tresult = this.AddOutPt(e1, pt);\n\t\t\te2.OutIdx = e1.OutIdx;\n\t\t\te1.Side = ClipperLib.EdgeSide.esLeft;\n\t\t\te2.Side = ClipperLib.EdgeSide.esRight;\n\t\t\te = e1;\n\t\t\tif (e.PrevInAEL === e2)\n\t\t\t\tprevE = e2.PrevInAEL;\n\t\t\telse\n\t\t\t\tprevE = e.PrevInAEL;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tresult = this.AddOutPt(e2, pt);\n\t\t\te1.OutIdx = e2.OutIdx;\n\t\t\te1.Side = ClipperLib.EdgeSide.esRight;\n\t\t\te2.Side = ClipperLib.EdgeSide.esLeft;\n\t\t\te = e2;\n\t\t\tif (e.PrevInAEL === e1)\n\t\t\t\tprevE = e1.PrevInAEL;\n\t\t\telse\n\t\t\t\tprevE = e.PrevInAEL;\n\t\t}\n\n\t\tif (prevE !== null && prevE.OutIdx >= 0 && prevE.Top.Y < pt.Y && e.Top.Y < pt.Y)\n\t\t{\n\t\t\tvar xPrev = ClipperLib.Clipper.TopX(prevE, pt.Y);\n\t\t\tvar xE = ClipperLib.Clipper.TopX(e, pt.Y);\n\t\t\tif ((xPrev === xE) && (e.WindDelta !== 0) && (prevE.WindDelta !== 0) && ClipperLib.ClipperBase.SlopesEqual5(new ClipperLib.IntPoint2(xPrev, pt.Y), prevE.Top, new ClipperLib.IntPoint2(xE, pt.Y), e.Top, this.m_UseFullRange))\n\t\t\t{\n\t\t\t\tvar outPt = this.AddOutPt(prevE, pt);\n\t\t\t\tthis.AddJoin(result, outPt, e.Top);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t};\n\n\tClipperLib.Clipper.prototype.AddOutPt = function (e, pt)\n\t{\n\t\tif (e.OutIdx < 0)\n\t\t{\n\t\t\tvar outRec = this.CreateOutRec();\n\t\t\toutRec.IsOpen = (e.WindDelta === 0);\n\t\t\tvar newOp = new ClipperLib.OutPt();\n\t\t\toutRec.Pts = newOp;\n\t\t\tnewOp.Idx = outRec.Idx;\n\t\t\t//newOp.Pt = pt;\n\t\t\tnewOp.Pt.X = pt.X;\n\t\t\tnewOp.Pt.Y = pt.Y;\n\t\t\tif (ClipperLib.use_xyz) newOp.Pt.Z = pt.Z;\n\t\t\tnewOp.Next = newOp;\n\t\t\tnewOp.Prev = newOp;\n\t\t\tif (!outRec.IsOpen)\n\t\t\t\tthis.SetHoleState(e, outRec);\n\t\t\te.OutIdx = outRec.Idx;\n\t\t\t//nb: do this after SetZ !\n\t\t\treturn newOp;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tvar outRec = this.m_PolyOuts[e.OutIdx];\n\t\t\t//OutRec.Pts is the 'Left-most' point & OutRec.Pts.Prev is the 'Right-most'\n\t\t\tvar op = outRec.Pts;\n\t\t\tvar ToFront = (e.Side === ClipperLib.EdgeSide.esLeft);\n\t\t\tif (ToFront && ClipperLib.IntPoint.op_Equality(pt, op.Pt))\n\t\t\t\treturn op;\n\t\t\telse if (!ToFront && ClipperLib.IntPoint.op_Equality(pt, op.Prev.Pt))\n\t\t\t\treturn op.Prev;\n\t\t\tvar newOp = new ClipperLib.OutPt();\n\t\t\tnewOp.Idx = outRec.Idx;\n\t\t\t//newOp.Pt = pt;\n\t\t\tnewOp.Pt.X = pt.X;\n\t\t\tnewOp.Pt.Y = pt.Y;\n\t\t\tif (ClipperLib.use_xyz) newOp.Pt.Z = pt.Z;\n\t\t\tnewOp.Next = op;\n\t\t\tnewOp.Prev = op.Prev;\n\t\t\tnewOp.Prev.Next = newOp;\n\t\t\top.Prev = newOp;\n\t\t\tif (ToFront)\n\t\t\t\toutRec.Pts = newOp;\n\t\t\treturn newOp;\n\t\t}\n\t};\n\n\tClipperLib.Clipper.prototype.GetLastOutPt = function (e)\n\t{\n\t\tvar outRec = this.m_PolyOuts[e.OutIdx];\n\t\tif (e.Side === ClipperLib.EdgeSide.esLeft)\n\t\t{\n\t\t\treturn outRec.Pts;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn outRec.Pts.Prev;\n\t\t}\n\t};\n\n\tClipperLib.Clipper.prototype.SwapPoints = function (pt1, pt2)\n\t{\n\t\tvar tmp = new ClipperLib.IntPoint1(pt1.Value);\n\t\t//pt1.Value = pt2.Value;\n\t\tpt1.Value.X = pt2.Value.X;\n\t\tpt1.Value.Y = pt2.Value.Y;\n\t\tif (ClipperLib.use_xyz) pt1.Value.Z = pt2.Value.Z;\n\t\t//pt2.Value = tmp;\n\t\tpt2.Value.X = tmp.X;\n\t\tpt2.Value.Y = tmp.Y;\n\t\tif (ClipperLib.use_xyz) pt2.Value.Z = tmp.Z;\n\t};\n\n\tClipperLib.Clipper.prototype.HorzSegmentsOverlap = function (seg1a, seg1b, seg2a, seg2b)\n\t{\n\t\tvar tmp;\n\t\tif (seg1a > seg1b)\n\t\t{\n\t\t\ttmp = seg1a;\n\t\t\tseg1a = seg1b;\n\t\t\tseg1b = tmp;\n\t\t}\n\t\tif (seg2a > seg2b)\n\t\t{\n\t\t\ttmp = seg2a;\n\t\t\tseg2a = seg2b;\n\t\t\tseg2b = tmp;\n\t\t}\n\t\treturn (seg1a < seg2b) && (seg2a < seg1b);\n\t}\n\n\tClipperLib.Clipper.prototype.SetHoleState = function (e, outRec)\n\t{\n\t\tvar e2 = e.PrevInAEL;\n\t\tvar eTmp = null;\n\t\twhile (e2 !== null)\n\t\t{\n\t\t\tif (e2.OutIdx >= 0 && e2.WindDelta !== 0)\n\t\t\t{\n\t\t\t\tif (eTmp === null)\n\t\t\t\t\teTmp = e2;\n\t\t\t\telse if (eTmp.OutIdx === e2.OutIdx)\n\t\t\t\t\teTmp = null; //paired\n\t\t\t}\n\t\t\te2 = e2.PrevInAEL;\n\t\t}\n\n\t\tif (eTmp === null)\n\t\t{\n\t\t\toutRec.FirstLeft = null;\n\t\t\toutRec.IsHole = false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\toutRec.FirstLeft = this.m_PolyOuts[eTmp.OutIdx];\n\t\t\toutRec.IsHole = !outRec.FirstLeft.IsHole;\n\t\t}\n\t};\n\n\tClipperLib.Clipper.prototype.GetDx = function (pt1, pt2)\n\t{\n\t\tif (pt1.Y === pt2.Y)\n\t\t\treturn ClipperLib.ClipperBase.horizontal;\n\t\telse\n\t\t\treturn (pt2.X - pt1.X) / (pt2.Y - pt1.Y);\n\t};\n\n\tClipperLib.Clipper.prototype.FirstIsBottomPt = function (btmPt1, btmPt2)\n\t{\n\t\tvar p = btmPt1.Prev;\n\t\twhile ((ClipperLib.IntPoint.op_Equality(p.Pt, btmPt1.Pt)) && (p !== btmPt1))\n\t\t\tp = p.Prev;\n\t\tvar dx1p = Math.abs(this.GetDx(btmPt1.Pt, p.Pt));\n\t\tp = btmPt1.Next;\n\t\twhile ((ClipperLib.IntPoint.op_Equality(p.Pt, btmPt1.Pt)) && (p !== btmPt1))\n\t\t\tp = p.Next;\n\t\tvar dx1n = Math.abs(this.GetDx(btmPt1.Pt, p.Pt));\n\t\tp = btmPt2.Prev;\n\t\twhile ((ClipperLib.IntPoint.op_Equality(p.Pt, btmPt2.Pt)) && (p !== btmPt2))\n\t\t\tp = p.Prev;\n\t\tvar dx2p = Math.abs(this.GetDx(btmPt2.Pt, p.Pt));\n\t\tp = btmPt2.Next;\n\t\twhile ((ClipperLib.IntPoint.op_Equality(p.Pt, btmPt2.Pt)) && (p !== btmPt2))\n\t\t\tp = p.Next;\n\t\tvar dx2n = Math.abs(this.GetDx(btmPt2.Pt, p.Pt));\n\n\t\tif (Math.max(dx1p, dx1n) === Math.max(dx2p, dx2n) && Math.min(dx1p, dx1n) === Math.min(dx2p, dx2n))\n\t\t{\n\t\t\treturn this.Area(btmPt1) > 0; //if otherwise identical use orientation\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn (dx1p >= dx2p && dx1p >= dx2n) || (dx1n >= dx2p && dx1n >= dx2n);\n\t\t}\n\t};\n\n\tClipperLib.Clipper.prototype.GetBottomPt = function (pp)\n\t{\n\t\tvar dups = null;\n\t\tvar p = pp.Next;\n\t\twhile (p !== pp)\n\t\t{\n\t\t\tif (p.Pt.Y > pp.Pt.Y)\n\t\t\t{\n\t\t\t\tpp = p;\n\t\t\t\tdups = null;\n\t\t\t}\n\t\t\telse if (p.Pt.Y === pp.Pt.Y && p.Pt.X <= pp.Pt.X)\n\t\t\t{\n\t\t\t\tif (p.Pt.X < pp.Pt.X)\n\t\t\t\t{\n\t\t\t\t\tdups = null;\n\t\t\t\t\tpp = p;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif (p.Next !== pp && p.Prev !== pp)\n\t\t\t\t\t\tdups = p;\n\t\t\t\t}\n\t\t\t}\n\t\t\tp = p.Next;\n\t\t}\n\t\tif (dups !== null)\n\t\t{\n\t\t\t//there appears to be at least 2 vertices at bottomPt so ...\n\t\t\twhile (dups !== p)\n\t\t\t{\n\t\t\t\tif (!this.FirstIsBottomPt(p, dups))\n\t\t\t\t\tpp = dups;\n\t\t\t\tdups = dups.Next;\n\t\t\t\twhile (ClipperLib.IntPoint.op_Inequality(dups.Pt, pp.Pt))\n\t\t\t\t\tdups = dups.Next;\n\t\t\t}\n\t\t}\n\t\treturn pp;\n\t};\n\n\tClipperLib.Clipper.prototype.GetLowermostRec = function (outRec1, outRec2)\n\t{\n\t\t//work out which polygon fragment has the correct hole state ...\n\t\tif (outRec1.BottomPt === null)\n\t\t\toutRec1.BottomPt = this.GetBottomPt(outRec1.Pts);\n\t\tif (outRec2.BottomPt === null)\n\t\t\toutRec2.BottomPt = this.GetBottomPt(outRec2.Pts);\n\t\tvar bPt1 = outRec1.BottomPt;\n\t\tvar bPt2 = outRec2.BottomPt;\n\t\tif (bPt1.Pt.Y > bPt2.Pt.Y)\n\t\t\treturn outRec1;\n\t\telse if (bPt1.Pt.Y < bPt2.Pt.Y)\n\t\t\treturn outRec2;\n\t\telse if (bPt1.Pt.X < bPt2.Pt.X)\n\t\t\treturn outRec1;\n\t\telse if (bPt1.Pt.X > bPt2.Pt.X)\n\t\t\treturn outRec2;\n\t\telse if (bPt1.Next === bPt1)\n\t\t\treturn outRec2;\n\t\telse if (bPt2.Next === bPt2)\n\t\t\treturn outRec1;\n\t\telse if (this.FirstIsBottomPt(bPt1, bPt2))\n\t\t\treturn outRec1;\n\t\telse\n\t\t\treturn outRec2;\n\t};\n\n\tClipperLib.Clipper.prototype.OutRec1RightOfOutRec2 = function (outRec1, outRec2)\n\t{\n\t\tdo {\n\t\t\toutRec1 = outRec1.FirstLeft;\n\t\t\tif (outRec1 === outRec2)\n\t\t\t\treturn true;\n\t\t}\n\t\twhile (outRec1 !== null)\n\t\treturn false;\n\t};\n\n\tClipperLib.Clipper.prototype.GetOutRec = function (idx)\n\t{\n\t\tvar outrec = this.m_PolyOuts[idx];\n\t\twhile (outrec !== this.m_PolyOuts[outrec.Idx])\n\t\t\toutrec = this.m_PolyOuts[outrec.Idx];\n\t\treturn outrec;\n\t};\n\n\tClipperLib.Clipper.prototype.AppendPolygon = function (e1, e2)\n\t{\n\t\t//get the start and ends of both output polygons ...\n\t\tvar outRec1 = this.m_PolyOuts[e1.OutIdx];\n\t\tvar outRec2 = this.m_PolyOuts[e2.OutIdx];\n\t\tvar holeStateRec;\n\t\tif (this.OutRec1RightOfOutRec2(outRec1, outRec2))\n\t\t\tholeStateRec = outRec2;\n\t\telse if (this.OutRec1RightOfOutRec2(outRec2, outRec1))\n\t\t\tholeStateRec = outRec1;\n\t\telse\n\t\t\tholeStateRec = this.GetLowermostRec(outRec1, outRec2);\n\n\t\t//get the start and ends of both output polygons and\n\t\t//join E2 poly onto E1 poly and delete pointers to E2 ...\n\n\t\tvar p1_lft = outRec1.Pts;\n\t\tvar p1_rt = p1_lft.Prev;\n\t\tvar p2_lft = outRec2.Pts;\n\t\tvar p2_rt = p2_lft.Prev;\n\t\t//join e2 poly onto e1 poly and delete pointers to e2 ...\n\t\tif (e1.Side === ClipperLib.EdgeSide.esLeft)\n\t\t{\n\t\t\tif (e2.Side === ClipperLib.EdgeSide.esLeft)\n\t\t\t{\n\t\t\t\t//z y x a b c\n\t\t\t\tthis.ReversePolyPtLinks(p2_lft);\n\t\t\t\tp2_lft.Next = p1_lft;\n\t\t\t\tp1_lft.Prev = p2_lft;\n\t\t\t\tp1_rt.Next = p2_rt;\n\t\t\t\tp2_rt.Prev = p1_rt;\n\t\t\t\toutRec1.Pts = p2_rt;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//x y z a b c\n\t\t\t\tp2_rt.Next = p1_lft;\n\t\t\t\tp1_lft.Prev = p2_rt;\n\t\t\t\tp2_lft.Prev = p1_rt;\n\t\t\t\tp1_rt.Next = p2_lft;\n\t\t\t\toutRec1.Pts = p2_lft;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (e2.Side === ClipperLib.EdgeSide.esRight)\n\t\t\t{\n\t\t\t\t//a b c z y x\n\t\t\t\tthis.ReversePolyPtLinks(p2_lft);\n\t\t\t\tp1_rt.Next = p2_rt;\n\t\t\t\tp2_rt.Prev = p1_rt;\n\t\t\t\tp2_lft.Next = p1_lft;\n\t\t\t\tp1_lft.Prev = p2_lft;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//a b c x y z\n\t\t\t\tp1_rt.Next = p2_lft;\n\t\t\t\tp2_lft.Prev = p1_rt;\n\t\t\t\tp1_lft.Prev = p2_rt;\n\t\t\t\tp2_rt.Next = p1_lft;\n\t\t\t}\n\t\t}\n\t\toutRec1.BottomPt = null;\n\t\tif (holeStateRec === outRec2)\n\t\t{\n\t\t\tif (outRec2.FirstLeft !== outRec1)\n\t\t\t\toutRec1.FirstLeft = outRec2.FirstLeft;\n\t\t\toutRec1.IsHole = outRec2.IsHole;\n\t\t}\n\t\toutRec2.Pts = null;\n\t\toutRec2.BottomPt = null;\n\t\toutRec2.FirstLeft = outRec1;\n\t\tvar OKIdx = e1.OutIdx;\n\t\tvar ObsoleteIdx = e2.OutIdx;\n\t\te1.OutIdx = -1;\n\t\t//nb: safe because we only get here via AddLocalMaxPoly\n\t\te2.OutIdx = -1;\n\t\tvar e = this.m_ActiveEdges;\n\t\twhile (e !== null)\n\t\t{\n\t\t\tif (e.OutIdx === ObsoleteIdx)\n\t\t\t{\n\t\t\t\te.OutIdx = OKIdx;\n\t\t\t\te.Side = e1.Side;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\te = e.NextInAEL;\n\t\t}\n\t\toutRec2.Idx = outRec1.Idx;\n\t};\n\n\tClipperLib.Clipper.prototype.ReversePolyPtLinks = function (pp)\n\t{\n\t\tif (pp === null)\n\t\t\treturn;\n\t\tvar pp1;\n\t\tvar pp2;\n\t\tpp1 = pp;\n\t\tdo {\n\t\t\tpp2 = pp1.Next;\n\t\t\tpp1.Next = pp1.Prev;\n\t\t\tpp1.Prev = pp2;\n\t\t\tpp1 = pp2;\n\t\t}\n\t\twhile (pp1 !== pp)\n\t};\n\n\tClipperLib.Clipper.SwapSides = function (edge1, edge2)\n\t{\n\t\tvar side = edge1.Side;\n\t\tedge1.Side = edge2.Side;\n\t\tedge2.Side = side;\n\t};\n\n\tClipperLib.Clipper.SwapPolyIndexes = function (edge1, edge2)\n\t{\n\t\tvar outIdx = edge1.OutIdx;\n\t\tedge1.OutIdx = edge2.OutIdx;\n\t\tedge2.OutIdx = outIdx;\n\t};\n\n\tClipperLib.Clipper.prototype.IntersectEdges = function (e1, e2, pt)\n\t{\n\t\t//e1 will be to the left of e2 BELOW the intersection. Therefore e1 is before\n\t\t//e2 in AEL except when e1 is being inserted at the intersection point ...\n\t\tvar e1Contributing = (e1.OutIdx >= 0);\n\t\tvar e2Contributing = (e2.OutIdx >= 0);\n\n\t\tif (ClipperLib.use_xyz)\n\t\t\tthis.SetZ(pt, e1, e2);\n\n\t\tif (ClipperLib.use_lines)\n\t\t{\n\t\t\t//if either edge is on an OPEN path ...\n\t\t\tif (e1.WindDelta === 0 || e2.WindDelta === 0)\n\t\t\t{\n\t\t\t\t//ignore subject-subject open path intersections UNLESS they\n\t\t\t\t//are both open paths, AND they are both 'contributing maximas' ...\n\t\t\t\tif (e1.WindDelta === 0 && e2.WindDelta === 0) return;\n\t\t\t\t//if intersecting a subj line with a subj poly ...\n\t\t\t\telse if (e1.PolyTyp === e2.PolyTyp &&\n\t\t\t\t\te1.WindDelta !== e2.WindDelta && this.m_ClipType === ClipperLib.ClipType.ctUnion)\n\t\t\t\t{\n\t\t\t\t\tif (e1.WindDelta === 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (e2Contributing)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tthis.AddOutPt(e1, pt);\n\t\t\t\t\t\t\tif (e1Contributing)\n\t\t\t\t\t\t\t\te1.OutIdx = -1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tif (e1Contributing)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tthis.AddOutPt(e2, pt);\n\t\t\t\t\t\t\tif (e2Contributing)\n\t\t\t\t\t\t\t\te2.OutIdx = -1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (e1.PolyTyp !== e2.PolyTyp)\n\t\t\t\t{\n\t\t\t\t\tif ((e1.WindDelta === 0) && Math.abs(e2.WindCnt) === 1 &&\n\t\t\t\t\t\t(this.m_ClipType !== ClipperLib.ClipType.ctUnion || e2.WindCnt2 === 0))\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.AddOutPt(e1, pt);\n\t\t\t\t\t\tif (e1Contributing)\n\t\t\t\t\t\t\te1.OutIdx = -1;\n\t\t\t\t\t}\n\t\t\t\t\telse if ((e2.WindDelta === 0) && (Math.abs(e1.WindCnt) === 1) &&\n\t\t\t\t\t\t(this.m_ClipType !== ClipperLib.ClipType.ctUnion || e1.WindCnt2 === 0))\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.AddOutPt(e2, pt);\n\t\t\t\t\t\tif (e2Contributing)\n\t\t\t\t\t\t\te2.OutIdx = -1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t//update winding counts...\n\t\t//assumes that e1 will be to the Right of e2 ABOVE the intersection\n\t\tif (e1.PolyTyp === e2.PolyTyp)\n\t\t{\n\t\t\tif (this.IsEvenOddFillType(e1))\n\t\t\t{\n\t\t\t\tvar oldE1WindCnt = e1.WindCnt;\n\t\t\t\te1.WindCnt = e2.WindCnt;\n\t\t\t\te2.WindCnt = oldE1WindCnt;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (e1.WindCnt + e2.WindDelta === 0)\n\t\t\t\t\te1.WindCnt = -e1.WindCnt;\n\t\t\t\telse\n\t\t\t\t\te1.WindCnt += e2.WindDelta;\n\t\t\t\tif (e2.WindCnt - e1.WindDelta === 0)\n\t\t\t\t\te2.WindCnt = -e2.WindCnt;\n\t\t\t\telse\n\t\t\t\t\te2.WindCnt -= e1.WindDelta;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (!this.IsEvenOddFillType(e2))\n\t\t\t\te1.WindCnt2 += e2.WindDelta;\n\t\t\telse\n\t\t\t\te1.WindCnt2 = (e1.WindCnt2 === 0) ? 1 : 0;\n\t\t\tif (!this.IsEvenOddFillType(e1))\n\t\t\t\te2.WindCnt2 -= e1.WindDelta;\n\t\t\telse\n\t\t\t\te2.WindCnt2 = (e2.WindCnt2 === 0) ? 1 : 0;\n\t\t}\n\t\tvar e1FillType, e2FillType, e1FillType2, e2FillType2;\n\t\tif (e1.PolyTyp === ClipperLib.PolyType.ptSubject)\n\t\t{\n\t\t\te1FillType = this.m_SubjFillType;\n\t\t\te1FillType2 = this.m_ClipFillType;\n\t\t}\n\t\telse\n\t\t{\n\t\t\te1FillType = this.m_ClipFillType;\n\t\t\te1FillType2 = this.m_SubjFillType;\n\t\t}\n\t\tif (e2.PolyTyp === ClipperLib.PolyType.ptSubject)\n\t\t{\n\t\t\te2FillType = this.m_SubjFillType;\n\t\t\te2FillType2 = this.m_ClipFillType;\n\t\t}\n\t\telse\n\t\t{\n\t\t\te2FillType = this.m_ClipFillType;\n\t\t\te2FillType2 = this.m_SubjFillType;\n\t\t}\n\t\tvar e1Wc, e2Wc;\n\t\tswitch (e1FillType)\n\t\t{\n\t\tcase ClipperLib.PolyFillType.pftPositive:\n\t\t\te1Wc = e1.WindCnt;\n\t\t\tbreak;\n\t\tcase ClipperLib.PolyFillType.pftNegative:\n\t\t\te1Wc = -e1.WindCnt;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\te1Wc = Math.abs(e1.WindCnt);\n\t\t\tbreak;\n\t\t}\n\t\tswitch (e2FillType)\n\t\t{\n\t\tcase ClipperLib.PolyFillType.pftPositive:\n\t\t\te2Wc = e2.WindCnt;\n\t\t\tbreak;\n\t\tcase ClipperLib.PolyFillType.pftNegative:\n\t\t\te2Wc = -e2.WindCnt;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\te2Wc = Math.abs(e2.WindCnt);\n\t\t\tbreak;\n\t\t}\n\t\tif (e1Contributing && e2Contributing)\n\t\t{\n\t\t\tif ((e1Wc !== 0 && e1Wc !== 1) || (e2Wc !== 0 && e2Wc !== 1) ||\n\t\t\t\t(e1.PolyTyp !== e2.PolyTyp && this.m_ClipType !== ClipperLib.ClipType.ctXor))\n\t\t\t{\n\t\t\t\tthis.AddLocalMaxPoly(e1, e2, pt);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.AddOutPt(e1, pt);\n\t\t\t\tthis.AddOutPt(e2, pt);\n\t\t\t\tClipperLib.Clipper.SwapSides(e1, e2);\n\t\t\t\tClipperLib.Clipper.SwapPolyIndexes(e1, e2);\n\t\t\t}\n\t\t}\n\t\telse if (e1Contributing)\n\t\t{\n\t\t\tif (e2Wc === 0 || e2Wc === 1)\n\t\t\t{\n\t\t\t\tthis.AddOutPt(e1, pt);\n\t\t\t\tClipperLib.Clipper.SwapSides(e1, e2);\n\t\t\t\tClipperLib.Clipper.SwapPolyIndexes(e1, e2);\n\t\t\t}\n\t\t}\n\t\telse if (e2Contributing)\n\t\t{\n\t\t\tif (e1Wc === 0 || e1Wc === 1)\n\t\t\t{\n\t\t\t\tthis.AddOutPt(e2, pt);\n\t\t\t\tClipperLib.Clipper.SwapSides(e1, e2);\n\t\t\t\tClipperLib.Clipper.SwapPolyIndexes(e1, e2);\n\t\t\t}\n\t\t}\n\t\telse if ((e1Wc === 0 || e1Wc === 1) && (e2Wc === 0 || e2Wc === 1))\n\t\t{\n\t\t\t//neither edge is currently contributing ...\n\t\t\tvar e1Wc2, e2Wc2;\n\t\t\tswitch (e1FillType2)\n\t\t\t{\n\t\t\tcase ClipperLib.PolyFillType.pftPositive:\n\t\t\t\te1Wc2 = e1.WindCnt2;\n\t\t\t\tbreak;\n\t\t\tcase ClipperLib.PolyFillType.pftNegative:\n\t\t\t\te1Wc2 = -e1.WindCnt2;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\te1Wc2 = Math.abs(e1.WindCnt2);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tswitch (e2FillType2)\n\t\t\t{\n\t\t\tcase ClipperLib.PolyFillType.pftPositive:\n\t\t\t\te2Wc2 = e2.WindCnt2;\n\t\t\t\tbreak;\n\t\t\tcase ClipperLib.PolyFillType.pftNegative:\n\t\t\t\te2Wc2 = -e2.WindCnt2;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\te2Wc2 = Math.abs(e2.WindCnt2);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (e1.PolyTyp !== e2.PolyTyp)\n\t\t\t{\n\t\t\t\tthis.AddLocalMinPoly(e1, e2, pt);\n\t\t\t}\n\t\t\telse if (e1Wc === 1 && e2Wc === 1)\n\t\t\t\tswitch (this.m_ClipType)\n\t\t\t\t{\n\t\t\t\tcase ClipperLib.ClipType.ctIntersection:\n\t\t\t\t\tif (e1Wc2 > 0 && e2Wc2 > 0)\n\t\t\t\t\t\tthis.AddLocalMinPoly(e1, e2, pt);\n\t\t\t\t\tbreak;\n\t\t\t\tcase ClipperLib.ClipType.ctUnion:\n\t\t\t\t\tif (e1Wc2 <= 0 && e2Wc2 <= 0)\n\t\t\t\t\t\tthis.AddLocalMinPoly(e1, e2, pt);\n\t\t\t\t\tbreak;\n\t\t\t\tcase ClipperLib.ClipType.ctDifference:\n\t\t\t\t\tif (((e1.PolyTyp === ClipperLib.PolyType.ptClip) && (e1Wc2 > 0) && (e2Wc2 > 0)) ||\n\t\t\t\t\t\t((e1.PolyTyp === ClipperLib.PolyType.ptSubject) && (e1Wc2 <= 0) && (e2Wc2 <= 0)))\n\t\t\t\t\t\tthis.AddLocalMinPoly(e1, e2, pt);\n\t\t\t\t\tbreak;\n\t\t\t\tcase ClipperLib.ClipType.ctXor:\n\t\t\t\t\tthis.AddLocalMinPoly(e1, e2, pt);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\telse\n\t\t\t\tClipperLib.Clipper.SwapSides(e1, e2);\n\t\t}\n\t};\n\n\tClipperLib.Clipper.prototype.DeleteFromSEL = function (e)\n\t{\n\t\tvar SelPrev = e.PrevInSEL;\n\t\tvar SelNext = e.NextInSEL;\n\t\tif (SelPrev === null && SelNext === null && (e !== this.m_SortedEdges))\n\t\t\treturn;\n\t\t//already deleted\n\t\tif (SelPrev !== null)\n\t\t\tSelPrev.NextInSEL = SelNext;\n\t\telse\n\t\t\tthis.m_SortedEdges = SelNext;\n\t\tif (SelNext !== null)\n\t\t\tSelNext.PrevInSEL = SelPrev;\n\t\te.NextInSEL = null;\n\t\te.PrevInSEL = null;\n\t};\n\n\tClipperLib.Clipper.prototype.ProcessHorizontals = function ()\n\t{\n\t\tvar horzEdge = {}; //m_SortedEdges;\n\t\twhile (this.PopEdgeFromSEL(horzEdge))\n\t\t{\n\t\t\tthis.ProcessHorizontal(horzEdge.v);\n\t\t}\n\t};\n\n\tClipperLib.Clipper.prototype.GetHorzDirection = function (HorzEdge, $var)\n\t{\n\t\tif (HorzEdge.Bot.X < HorzEdge.Top.X)\n\t\t{\n\t\t\t$var.Left = HorzEdge.Bot.X;\n\t\t\t$var.Right = HorzEdge.Top.X;\n\t\t\t$var.Dir = ClipperLib.Direction.dLeftToRight;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$var.Left = HorzEdge.Top.X;\n\t\t\t$var.Right = HorzEdge.Bot.X;\n\t\t\t$var.Dir = ClipperLib.Direction.dRightToLeft;\n\t\t}\n\t};\n\n\tClipperLib.Clipper.prototype.ProcessHorizontal = function (horzEdge)\n\t{\n\t\tvar $var = {\n\t\t\tDir: null,\n\t\t\tLeft: null,\n\t\t\tRight: null\n\t\t};\n\n\t\tthis.GetHorzDirection(horzEdge, $var);\n\t\tvar dir = $var.Dir;\n\t\tvar horzLeft = $var.Left;\n\t\tvar horzRight = $var.Right;\n\n\t\tvar IsOpen = horzEdge.WindDelta === 0;\n\n\t\tvar eLastHorz = horzEdge,\n\t\t\teMaxPair = null;\n\t\twhile (eLastHorz.NextInLML !== null && ClipperLib.ClipperBase.IsHorizontal(eLastHorz.NextInLML))\n\t\t\teLastHorz = eLastHorz.NextInLML;\n\t\tif (eLastHorz.NextInLML === null)\n\t\t\teMaxPair = this.GetMaximaPair(eLastHorz);\n\n\t\tvar currMax = this.m_Maxima;\n\t\tif (currMax !== null)\n\t\t{\n\t\t\t//get the first maxima in range (X) ...\n\t\t\tif (dir === ClipperLib.Direction.dLeftToRight)\n\t\t\t{\n\t\t\t\twhile (currMax !== null && currMax.X <= horzEdge.Bot.X)\n\t\t\t\t{\n\t\t\t\t\tcurrMax = currMax.Next;\n\t\t\t\t}\n\t\t\t\tif (currMax !== null && currMax.X >= eLastHorz.Top.X)\n\t\t\t\t{\n\t\t\t\t\tcurrMax = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\twhile (currMax.Next !== null && currMax.Next.X < horzEdge.Bot.X)\n\t\t\t\t{\n\t\t\t\t\tcurrMax = currMax.Next;\n\t\t\t\t}\n\t\t\t\tif (currMax.X <= eLastHorz.Top.X)\n\t\t\t\t{\n\t\t\t\t\tcurrMax = null;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tvar op1 = null;\n\t\tfor (;;) //loop through consec. horizontal edges\n\t\t{\n\t\t\tvar IsLastHorz = (horzEdge === eLastHorz);\n\t\t\tvar e = this.GetNextInAEL(horzEdge, dir);\n\t\t\twhile (e !== null)\n\t\t\t{\n\t\t\t\t//this code block inserts extra coords into horizontal edges (in output\n\t\t\t\t//polygons) whereever maxima touch these horizontal edges. This helps\n\t\t\t\t//'simplifying' polygons (ie if the Simplify property is set).\n\t\t\t\tif (currMax !== null)\n\t\t\t\t{\n\t\t\t\t\tif (dir === ClipperLib.Direction.dLeftToRight)\n\t\t\t\t\t{\n\t\t\t\t\t\twhile (currMax !== null && currMax.X < e.Curr.X)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (horzEdge.OutIdx >= 0 && !IsOpen)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tthis.AddOutPt(horzEdge, new ClipperLib.IntPoint2(currMax.X, horzEdge.Bot.Y));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcurrMax = currMax.Next;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\twhile (currMax !== null && currMax.X > e.Curr.X)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (horzEdge.OutIdx >= 0 && !IsOpen)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tthis.AddOutPt(horzEdge, new ClipperLib.IntPoint2(currMax.X, horzEdge.Bot.Y));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcurrMax = currMax.Prev;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ((dir === ClipperLib.Direction.dLeftToRight && e.Curr.X > horzRight) || (dir === ClipperLib.Direction.dRightToLeft && e.Curr.X < horzLeft))\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t//Also break if we've got to the end of an intermediate horizontal edge ...\n\t\t\t\t//nb: Smaller Dx's are to the right of larger Dx's ABOVE the horizontal.\n\t\t\t\tif (e.Curr.X === horzEdge.Top.X && horzEdge.NextInLML !== null && e.Dx < horzEdge.NextInLML.Dx)\n\t\t\t\t\tbreak;\n\n\t\t\t\tif (horzEdge.OutIdx >= 0 && !IsOpen) //note: may be done multiple times\n\t\t\t\t{\n\t\t\t\t\tif (ClipperLib.use_xyz)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (dir === ClipperLib.Direction.dLeftToRight)\n\t\t\t\t\t\t\tthis.SetZ(e.Curr, horzEdge, e);\n\t\t\t\t\t\telse this.SetZ(e.Curr, e, horzEdge);\n\t\t\t\t\t}\n\n\t\t\t\t\top1 = this.AddOutPt(horzEdge, e.Curr);\n\t\t\t\t\tvar eNextHorz = this.m_SortedEdges;\n\t\t\t\t\twhile (eNextHorz !== null)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (eNextHorz.OutIdx >= 0 && this.HorzSegmentsOverlap(horzEdge.Bot.X, horzEdge.Top.X, eNextHorz.Bot.X, eNextHorz.Top.X))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvar op2 = this.GetLastOutPt(eNextHorz);\n\t\t\t\t\t\t\tthis.AddJoin(op2, op1, eNextHorz.Top);\n\t\t\t\t\t\t}\n\t\t\t\t\t\teNextHorz = eNextHorz.NextInSEL;\n\t\t\t\t\t}\n\t\t\t\t\tthis.AddGhostJoin(op1, horzEdge.Bot);\n\t\t\t\t}\n\n\t\t\t\t//OK, so far we're still in range of the horizontal Edge  but make sure\n\t\t\t\t//we're at the last of consec. horizontals when matching with eMaxPair\n\t\t\t\tif (e === eMaxPair && IsLastHorz)\n\t\t\t\t{\n\t\t\t\t\tif (horzEdge.OutIdx >= 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.AddLocalMaxPoly(horzEdge, eMaxPair, horzEdge.Top);\n\t\t\t\t\t}\n\t\t\t\t\tthis.DeleteFromAEL(horzEdge);\n\t\t\t\t\tthis.DeleteFromAEL(eMaxPair);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (dir === ClipperLib.Direction.dLeftToRight)\n\t\t\t\t{\n\t\t\t\t\tvar Pt = new ClipperLib.IntPoint2(e.Curr.X, horzEdge.Curr.Y);\n\t\t\t\t\tthis.IntersectEdges(horzEdge, e, Pt);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tvar Pt = new ClipperLib.IntPoint2(e.Curr.X, horzEdge.Curr.Y);\n\t\t\t\t\tthis.IntersectEdges(e, horzEdge, Pt);\n\t\t\t\t}\n\t\t\t\tvar eNext = this.GetNextInAEL(e, dir);\n\t\t\t\tthis.SwapPositionsInAEL(horzEdge, e);\n\t\t\t\te = eNext;\n\t\t\t} //end while(e !== null)\n\n\t\t\t//Break out of loop if HorzEdge.NextInLML is not also horizontal ...\n\t\t\tif (horzEdge.NextInLML === null || !ClipperLib.ClipperBase.IsHorizontal(horzEdge.NextInLML))\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\thorzEdge = this.UpdateEdgeIntoAEL(horzEdge);\n\t\t\tif (horzEdge.OutIdx >= 0)\n\t\t\t{\n\t\t\t\tthis.AddOutPt(horzEdge, horzEdge.Bot);\n\t\t\t}\n\n\t\t\t$var = {\n\t\t\t\tDir: dir,\n\t\t\t\tLeft: horzLeft,\n\t\t\t\tRight: horzRight\n\t\t\t};\n\n\t\t\tthis.GetHorzDirection(horzEdge, $var);\n\t\t\tdir = $var.Dir;\n\t\t\thorzLeft = $var.Left;\n\t\t\thorzRight = $var.Right;\n\n\t\t} //end for (;;)\n\n\t\tif (horzEdge.OutIdx >= 0 && op1 === null)\n\t\t{\n\t\t\top1 = this.GetLastOutPt(horzEdge);\n\t\t\tvar eNextHorz = this.m_SortedEdges;\n\t\t\twhile (eNextHorz !== null)\n\t\t\t{\n\t\t\t\tif (eNextHorz.OutIdx >= 0 && this.HorzSegmentsOverlap(horzEdge.Bot.X, horzEdge.Top.X, eNextHorz.Bot.X, eNextHorz.Top.X))\n\t\t\t\t{\n\t\t\t\t\tvar op2 = this.GetLastOutPt(eNextHorz);\n\t\t\t\t\tthis.AddJoin(op2, op1, eNextHorz.Top);\n\t\t\t\t}\n\t\t\t\teNextHorz = eNextHorz.NextInSEL;\n\t\t\t}\n\t\t\tthis.AddGhostJoin(op1, horzEdge.Top);\n\t\t}\n\n\t\tif (horzEdge.NextInLML !== null)\n\t\t{\n\t\t\tif (horzEdge.OutIdx >= 0)\n\t\t\t{\n\t\t\t\top1 = this.AddOutPt(horzEdge, horzEdge.Top);\n\n\t\t\t\thorzEdge = this.UpdateEdgeIntoAEL(horzEdge);\n\t\t\t\tif (horzEdge.WindDelta === 0)\n\t\t\t\t{\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t//nb: HorzEdge is no longer horizontal here\n\t\t\t\tvar ePrev = horzEdge.PrevInAEL;\n\t\t\t\tvar eNext = horzEdge.NextInAEL;\n\t\t\t\tif (ePrev !== null && ePrev.Curr.X === horzEdge.Bot.X && ePrev.Curr.Y === horzEdge.Bot.Y && ePrev.WindDelta === 0 && (ePrev.OutIdx >= 0 && ePrev.Curr.Y > ePrev.Top.Y && ClipperLib.ClipperBase.SlopesEqual3(horzEdge, ePrev, this.m_UseFullRange)))\n\t\t\t\t{\n\t\t\t\t\tvar op2 = this.AddOutPt(ePrev, horzEdge.Bot);\n\t\t\t\t\tthis.AddJoin(op1, op2, horzEdge.Top);\n\t\t\t\t}\n\t\t\t\telse if (eNext !== null && eNext.Curr.X === horzEdge.Bot.X && eNext.Curr.Y === horzEdge.Bot.Y && eNext.WindDelta !== 0 && eNext.OutIdx >= 0 && eNext.Curr.Y > eNext.Top.Y && ClipperLib.ClipperBase.SlopesEqual3(horzEdge, eNext, this.m_UseFullRange))\n\t\t\t\t{\n\t\t\t\t\tvar op2 = this.AddOutPt(eNext, horzEdge.Bot);\n\t\t\t\t\tthis.AddJoin(op1, op2, horzEdge.Top);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\thorzEdge = this.UpdateEdgeIntoAEL(horzEdge);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (horzEdge.OutIdx >= 0)\n\t\t\t{\n\t\t\t\tthis.AddOutPt(horzEdge, horzEdge.Top);\n\t\t\t}\n\t\t\tthis.DeleteFromAEL(horzEdge);\n\t\t}\n\t};\n\n\tClipperLib.Clipper.prototype.GetNextInAEL = function (e, Direction)\n\t{\n\t\treturn Direction === ClipperLib.Direction.dLeftToRight ? e.NextInAEL : e.PrevInAEL;\n\t};\n\n\tClipperLib.Clipper.prototype.IsMinima = function (e)\n\t{\n\t\treturn e !== null && (e.Prev.NextInLML !== e) && (e.Next.NextInLML !== e);\n\t};\n\n\tClipperLib.Clipper.prototype.IsMaxima = function (e, Y)\n\t{\n\t\treturn (e !== null && e.Top.Y === Y && e.NextInLML === null);\n\t};\n\n\tClipperLib.Clipper.prototype.IsIntermediate = function (e, Y)\n\t{\n\t\treturn (e.Top.Y === Y && e.NextInLML !== null);\n\t};\n\n\tClipperLib.Clipper.prototype.GetMaximaPair = function (e)\n\t{\n\t\tif ((ClipperLib.IntPoint.op_Equality(e.Next.Top, e.Top)) && e.Next.NextInLML === null)\n\t\t{\n\t\t\treturn e.Next;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif ((ClipperLib.IntPoint.op_Equality(e.Prev.Top, e.Top)) && e.Prev.NextInLML === null)\n\t\t\t{\n\t\t\t\treturn e.Prev;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t};\n\n\tClipperLib.Clipper.prototype.GetMaximaPairEx = function (e)\n\t{\n\t\t//as above but returns null if MaxPair isn't in AEL (unless it's horizontal)\n\t\tvar result = this.GetMaximaPair(e);\n\t\tif (result === null || result.OutIdx === ClipperLib.ClipperBase.Skip ||\n\t\t\t((result.NextInAEL === result.PrevInAEL) && !ClipperLib.ClipperBase.IsHorizontal(result)))\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\treturn result;\n\t};\n\n\tClipperLib.Clipper.prototype.ProcessIntersections = function (topY)\n\t{\n\t\tif (this.m_ActiveEdges === null)\n\t\t\treturn true;\n\t\ttry\n\t\t{\n\t\t\tthis.BuildIntersectList(topY);\n\t\t\tif (this.m_IntersectList.length === 0)\n\t\t\t\treturn true;\n\t\t\tif (this.m_IntersectList.length === 1 || this.FixupIntersectionOrder())\n\t\t\t\tthis.ProcessIntersectList();\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\tcatch ($$e2)\n\t\t{\n\t\t\tthis.m_SortedEdges = null;\n\t\t\tthis.m_IntersectList.length = 0;\n\t\t\tClipperLib.Error(\"ProcessIntersections error\");\n\t\t}\n\t\tthis.m_SortedEdges = null;\n\t\treturn true;\n\t};\n\n\tClipperLib.Clipper.prototype.BuildIntersectList = function (topY)\n\t{\n\t\tif (this.m_ActiveEdges === null)\n\t\t\treturn;\n\t\t//prepare for sorting ...\n\t\tvar e = this.m_ActiveEdges;\n\t\t//console.log(JSON.stringify(JSON.decycle( e )));\n\t\tthis.m_SortedEdges = e;\n\t\twhile (e !== null)\n\t\t{\n\t\t\te.PrevInSEL = e.PrevInAEL;\n\t\t\te.NextInSEL = e.NextInAEL;\n\t\t\te.Curr.X = ClipperLib.Clipper.TopX(e, topY);\n\t\t\te = e.NextInAEL;\n\t\t}\n\t\t//bubblesort ...\n\t\tvar isModified = true;\n\t\twhile (isModified && this.m_SortedEdges !== null)\n\t\t{\n\t\t\tisModified = false;\n\t\t\te = this.m_SortedEdges;\n\t\t\twhile (e.NextInSEL !== null)\n\t\t\t{\n\t\t\t\tvar eNext = e.NextInSEL;\n\t\t\t\tvar pt = new ClipperLib.IntPoint0();\n\t\t\t\t//console.log(\"e.Curr.X: \" + e.Curr.X + \" eNext.Curr.X\" + eNext.Curr.X);\n\t\t\t\tif (e.Curr.X > eNext.Curr.X)\n\t\t\t\t{\n\t\t\t\t\tthis.IntersectPoint(e, eNext, pt);\n\t\t\t\t\tif (pt.Y < topY)\n\t\t\t\t\t{\n\t\t\t\t\t\tpt = new ClipperLib.IntPoint2(ClipperLib.Clipper.TopX(e, topY), topY);\n\t\t\t\t\t}\n\t\t\t\t\tvar newNode = new ClipperLib.IntersectNode();\n\t\t\t\t\tnewNode.Edge1 = e;\n\t\t\t\t\tnewNode.Edge2 = eNext;\n\t\t\t\t\t//newNode.Pt = pt;\n\t\t\t\t\tnewNode.Pt.X = pt.X;\n\t\t\t\t\tnewNode.Pt.Y = pt.Y;\n\t\t\t\t\tif (ClipperLib.use_xyz) newNode.Pt.Z = pt.Z;\n\t\t\t\t\tthis.m_IntersectList.push(newNode);\n\t\t\t\t\tthis.SwapPositionsInSEL(e, eNext);\n\t\t\t\t\tisModified = true;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\te = eNext;\n\t\t\t}\n\t\t\tif (e.PrevInSEL !== null)\n\t\t\t\te.PrevInSEL.NextInSEL = null;\n\t\t\telse\n\t\t\t\tbreak;\n\t\t}\n\t\tthis.m_SortedEdges = null;\n\t};\n\n\tClipperLib.Clipper.prototype.EdgesAdjacent = function (inode)\n\t{\n\t\treturn (inode.Edge1.NextInSEL === inode.Edge2) || (inode.Edge1.PrevInSEL === inode.Edge2);\n\t};\n\n\tClipperLib.Clipper.IntersectNodeSort = function (node1, node2)\n\t{\n\t\t//the following typecast is safe because the differences in Pt.Y will\n\t\t//be limited to the height of the scanbeam.\n\t\treturn (node2.Pt.Y - node1.Pt.Y);\n\t};\n\n\tClipperLib.Clipper.prototype.FixupIntersectionOrder = function ()\n\t{\n\t\t//pre-condition: intersections are sorted bottom-most first.\n\t\t//Now it's crucial that intersections are made only between adjacent edges,\n\t\t//so to ensure this the order of intersections may need adjusting ...\n\t\tthis.m_IntersectList.sort(this.m_IntersectNodeComparer);\n\t\tthis.CopyAELToSEL();\n\t\tvar cnt = this.m_IntersectList.length;\n\t\tfor (var i = 0; i < cnt; i++)\n\t\t{\n\t\t\tif (!this.EdgesAdjacent(this.m_IntersectList[i]))\n\t\t\t{\n\t\t\t\tvar j = i + 1;\n\t\t\t\twhile (j < cnt && !this.EdgesAdjacent(this.m_IntersectList[j]))\n\t\t\t\t\tj++;\n\t\t\t\tif (j === cnt)\n\t\t\t\t\treturn false;\n\t\t\t\tvar tmp = this.m_IntersectList[i];\n\t\t\t\tthis.m_IntersectList[i] = this.m_IntersectList[j];\n\t\t\t\tthis.m_IntersectList[j] = tmp;\n\t\t\t}\n\t\t\tthis.SwapPositionsInSEL(this.m_IntersectList[i].Edge1, this.m_IntersectList[i].Edge2);\n\t\t}\n\t\treturn true;\n\t};\n\n\tClipperLib.Clipper.prototype.ProcessIntersectList = function ()\n\t{\n\t\tfor (var i = 0, ilen = this.m_IntersectList.length; i < ilen; i++)\n\t\t{\n\t\t\tvar iNode = this.m_IntersectList[i];\n\t\t\tthis.IntersectEdges(iNode.Edge1, iNode.Edge2, iNode.Pt);\n\t\t\tthis.SwapPositionsInAEL(iNode.Edge1, iNode.Edge2);\n\t\t}\n\t\tthis.m_IntersectList.length = 0;\n\t};\n\n\t/*\n\t--------------------------------\n\tRound speedtest: http://jsperf.com/fastest-round\n\t--------------------------------\n\t*/\n\tvar R1 = function (a)\n\t{\n\t\treturn a < 0 ? Math.ceil(a - 0.5) : Math.round(a)\n\t};\n\n\tvar R2 = function (a)\n\t{\n\t\treturn a < 0 ? Math.ceil(a - 0.5) : Math.floor(a + 0.5)\n\t};\n\n\tvar R3 = function (a)\n\t{\n\t\treturn a < 0 ? -Math.round(Math.abs(a)) : Math.round(a)\n\t};\n\n\tvar R4 = function (a)\n\t{\n\t\tif (a < 0)\n\t\t{\n\t\t\ta -= 0.5;\n\t\t\treturn a < -2147483648 ? Math.ceil(a) : a | 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\ta += 0.5;\n\t\t\treturn a > 2147483647 ? Math.floor(a) : a | 0;\n\t\t}\n\t};\n\n\tif (browser.msie) ClipperLib.Clipper.Round = R1;\n\telse if (browser.chromium) ClipperLib.Clipper.Round = R3;\n\telse if (browser.safari) ClipperLib.Clipper.Round = R4;\n\telse ClipperLib.Clipper.Round = R2; // eg. browser.chrome || browser.firefox || browser.opera\n\tClipperLib.Clipper.TopX = function (edge, currentY)\n\t{\n\t\t//if (edge.Bot == edge.Curr) alert (\"edge.Bot = edge.Curr\");\n\t\t//if (edge.Bot == edge.Top) alert (\"edge.Bot = edge.Top\");\n\t\tif (currentY === edge.Top.Y)\n\t\t\treturn edge.Top.X;\n\t\treturn edge.Bot.X + ClipperLib.Clipper.Round(edge.Dx * (currentY - edge.Bot.Y));\n\t};\n\n\tClipperLib.Clipper.prototype.IntersectPoint = function (edge1, edge2, ip)\n\t{\n\t\tip.X = 0;\n\t\tip.Y = 0;\n\t\tvar b1, b2;\n\t\t//nb: with very large coordinate values, it's possible for SlopesEqual() to\n\t\t//return false but for the edge.Dx value be equal due to double precision rounding.\n\t\tif (edge1.Dx === edge2.Dx)\n\t\t{\n\t\t\tip.Y = edge1.Curr.Y;\n\t\t\tip.X = ClipperLib.Clipper.TopX(edge1, ip.Y);\n\t\t\treturn;\n\t\t}\n\t\tif (edge1.Delta.X === 0)\n\t\t{\n\t\t\tip.X = edge1.Bot.X;\n\t\t\tif (ClipperLib.ClipperBase.IsHorizontal(edge2))\n\t\t\t{\n\t\t\t\tip.Y = edge2.Bot.Y;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tb2 = edge2.Bot.Y - (edge2.Bot.X / edge2.Dx);\n\t\t\t\tip.Y = ClipperLib.Clipper.Round(ip.X / edge2.Dx + b2);\n\t\t\t}\n\t\t}\n\t\telse if (edge2.Delta.X === 0)\n\t\t{\n\t\t\tip.X = edge2.Bot.X;\n\t\t\tif (ClipperLib.ClipperBase.IsHorizontal(edge1))\n\t\t\t{\n\t\t\t\tip.Y = edge1.Bot.Y;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tb1 = edge1.Bot.Y - (edge1.Bot.X / edge1.Dx);\n\t\t\t\tip.Y = ClipperLib.Clipper.Round(ip.X / edge1.Dx + b1);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tb1 = edge1.Bot.X - edge1.Bot.Y * edge1.Dx;\n\t\t\tb2 = edge2.Bot.X - edge2.Bot.Y * edge2.Dx;\n\t\t\tvar q = (b2 - b1) / (edge1.Dx - edge2.Dx);\n\t\t\tip.Y = ClipperLib.Clipper.Round(q);\n\t\t\tif (Math.abs(edge1.Dx) < Math.abs(edge2.Dx))\n\t\t\t\tip.X = ClipperLib.Clipper.Round(edge1.Dx * q + b1);\n\t\t\telse\n\t\t\t\tip.X = ClipperLib.Clipper.Round(edge2.Dx * q + b2);\n\t\t}\n\t\tif (ip.Y < edge1.Top.Y || ip.Y < edge2.Top.Y)\n\t\t{\n\t\t\tif (edge1.Top.Y > edge2.Top.Y)\n\t\t\t{\n\t\t\t\tip.Y = edge1.Top.Y;\n\t\t\t\tip.X = ClipperLib.Clipper.TopX(edge2, edge1.Top.Y);\n\t\t\t\treturn ip.X < edge1.Top.X;\n\t\t\t}\n\t\t\telse\n\t\t\t\tip.Y = edge2.Top.Y;\n\t\t\tif (Math.abs(edge1.Dx) < Math.abs(edge2.Dx))\n\t\t\t\tip.X = ClipperLib.Clipper.TopX(edge1, ip.Y);\n\t\t\telse\n\t\t\t\tip.X = ClipperLib.Clipper.TopX(edge2, ip.Y);\n\t\t}\n\t\t//finally, don't allow 'ip' to be BELOW curr.Y (ie bottom of scanbeam) ...\n\t\tif (ip.Y > edge1.Curr.Y)\n\t\t{\n\t\t\tip.Y = edge1.Curr.Y;\n\t\t\t//better to use the more vertical edge to derive X ...\n\t\t\tif (Math.abs(edge1.Dx) > Math.abs(edge2.Dx))\n\t\t\t\tip.X = ClipperLib.Clipper.TopX(edge2, ip.Y);\n\t\t\telse\n\t\t\t\tip.X = ClipperLib.Clipper.TopX(edge1, ip.Y);\n\t\t}\n\t};\n\n\tClipperLib.Clipper.prototype.ProcessEdgesAtTopOfScanbeam = function (topY)\n\t{\n\t\tvar e = this.m_ActiveEdges;\n\n\t\twhile (e !== null)\n\t\t{\n\t\t\t//1. process maxima, treating them as if they're 'bent' horizontal edges,\n\t\t\t//   but exclude maxima with horizontal edges. nb: e can't be a horizontal.\n\t\t\tvar IsMaximaEdge = this.IsMaxima(e, topY);\n\t\t\tif (IsMaximaEdge)\n\t\t\t{\n\t\t\t\tvar eMaxPair = this.GetMaximaPairEx(e);\n\t\t\t\tIsMaximaEdge = (eMaxPair === null || !ClipperLib.ClipperBase.IsHorizontal(eMaxPair));\n\t\t\t}\n\t\t\tif (IsMaximaEdge)\n\t\t\t{\n\t\t\t\tif (this.StrictlySimple)\n\t\t\t\t{\n\t\t\t\t\tthis.InsertMaxima(e.Top.X);\n\t\t\t\t}\n\t\t\t\tvar ePrev = e.PrevInAEL;\n\t\t\t\tthis.DoMaxima(e);\n\t\t\t\tif (ePrev === null)\n\t\t\t\t\te = this.m_ActiveEdges;\n\t\t\t\telse\n\t\t\t\t\te = ePrev.NextInAEL;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//2. promote horizontal edges, otherwise update Curr.X and Curr.Y ...\n\t\t\t\tif (this.IsIntermediate(e, topY) && ClipperLib.ClipperBase.IsHorizontal(e.NextInLML))\n\t\t\t\t{\n\t\t\t\t\te = this.UpdateEdgeIntoAEL(e);\n\t\t\t\t\tif (e.OutIdx >= 0)\n\t\t\t\t\t\tthis.AddOutPt(e, e.Bot);\n\t\t\t\t\tthis.AddEdgeToSEL(e);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\te.Curr.X = ClipperLib.Clipper.TopX(e, topY);\n\t\t\t\t\te.Curr.Y = topY;\n\t\t\t\t}\n\n\t\t\t\tif (ClipperLib.use_xyz)\n\t\t\t\t{\n\t\t\t\t\tif (e.Top.Y === topY) e.Curr.Z = e.Top.Z;\n\t\t\t\t\telse if (e.Bot.Y === topY) e.Curr.Z = e.Bot.Z;\n\t\t\t\t\telse e.Curr.Z = 0;\n\t\t\t\t}\n\n\t\t\t\t//When StrictlySimple and 'e' is being touched by another edge, then\n\t\t\t\t//make sure both edges have a vertex here ...\n\t\t\t\tif (this.StrictlySimple)\n\t\t\t\t{\n\t\t\t\t\tvar ePrev = e.PrevInAEL;\n\t\t\t\t\tif ((e.OutIdx >= 0) && (e.WindDelta !== 0) && ePrev !== null &&\n\t\t\t\t\t\t(ePrev.OutIdx >= 0) && (ePrev.Curr.X === e.Curr.X) &&\n\t\t\t\t\t\t(ePrev.WindDelta !== 0))\n\t\t\t\t\t{\n\t\t\t\t\t\tvar ip = new ClipperLib.IntPoint1(e.Curr);\n\n\t\t\t\t\t\tif (ClipperLib.use_xyz)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tthis.SetZ(ip, ePrev, e);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar op = this.AddOutPt(ePrev, ip);\n\t\t\t\t\t\tvar op2 = this.AddOutPt(e, ip);\n\t\t\t\t\t\tthis.AddJoin(op, op2, ip); //StrictlySimple (type-3) join\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\te = e.NextInAEL;\n\t\t\t}\n\t\t}\n\t\t//3. Process horizontals at the Top of the scanbeam ...\n\t\tthis.ProcessHorizontals();\n\t\tthis.m_Maxima = null;\n\t\t//4. Promote intermediate vertices ...\n\t\te = this.m_ActiveEdges;\n\t\twhile (e !== null)\n\t\t{\n\t\t\tif (this.IsIntermediate(e, topY))\n\t\t\t{\n\t\t\t\tvar op = null;\n\t\t\t\tif (e.OutIdx >= 0)\n\t\t\t\t\top = this.AddOutPt(e, e.Top);\n\t\t\t\te = this.UpdateEdgeIntoAEL(e);\n\t\t\t\t//if output polygons share an edge, they'll need joining later ...\n\t\t\t\tvar ePrev = e.PrevInAEL;\n\t\t\t\tvar eNext = e.NextInAEL;\n\n\t\t\t\tif (ePrev !== null && ePrev.Curr.X === e.Bot.X && ePrev.Curr.Y === e.Bot.Y && op !== null && ePrev.OutIdx >= 0 && ePrev.Curr.Y === ePrev.Top.Y && ClipperLib.ClipperBase.SlopesEqual5(e.Curr, e.Top, ePrev.Curr, ePrev.Top, this.m_UseFullRange) && (e.WindDelta !== 0) && (ePrev.WindDelta !== 0))\n\t\t\t\t{\n\t\t\t\t\tvar op2 = this.AddOutPt(ePrev2, e.Bot);\n\t\t\t\t\tthis.AddJoin(op, op2, e.Top);\n\t\t\t\t}\n\t\t\t\telse if (eNext !== null && eNext.Curr.X === e.Bot.X && eNext.Curr.Y === e.Bot.Y && op !== null && eNext.OutIdx >= 0 && eNext.Curr.Y === eNext.Top.Y && ClipperLib.ClipperBase.SlopesEqual5(e.Curr, e.Top, eNext.Curr, eNext.Top, this.m_UseFullRange) && (e.WindDelta !== 0) && (eNext.WindDelta !== 0))\n\t\t\t\t{\n\t\t\t\t\tvar op2 = this.AddOutPt(eNext, e.Bot);\n\t\t\t\t\tthis.AddJoin(op, op2, e.Top);\n\t\t\t\t}\n\t\t\t}\n\t\t\te = e.NextInAEL;\n\t\t}\n\t};\n\n\tClipperLib.Clipper.prototype.DoMaxima = function (e)\n\t{\n\t\tvar eMaxPair = this.GetMaximaPairEx(e);\n\t\tif (eMaxPair === null)\n\t\t{\n\t\t\tif (e.OutIdx >= 0)\n\t\t\t\tthis.AddOutPt(e, e.Top);\n\t\t\tthis.DeleteFromAEL(e);\n\t\t\treturn;\n\t\t}\n\t\tvar eNext = e.NextInAEL;\n\t\twhile (eNext !== null && eNext !== eMaxPair)\n\t\t{\n\t\t\tthis.IntersectEdges(e, eNext, e.Top);\n\t\t\tthis.SwapPositionsInAEL(e, eNext);\n\t\t\teNext = e.NextInAEL;\n\t\t}\n\t\tif (e.OutIdx === -1 && eMaxPair.OutIdx === -1)\n\t\t{\n\t\t\tthis.DeleteFromAEL(e);\n\t\t\tthis.DeleteFromAEL(eMaxPair);\n\t\t}\n\t\telse if (e.OutIdx >= 0 && eMaxPair.OutIdx >= 0)\n\t\t{\n\t\t\tif (e.OutIdx >= 0) this.AddLocalMaxPoly(e, eMaxPair, e.Top);\n\t\t\tthis.DeleteFromAEL(e);\n\t\t\tthis.DeleteFromAEL(eMaxPair);\n\t\t}\n\t\telse if (ClipperLib.use_lines && e.WindDelta === 0)\n\t\t{\n\t\t\tif (e.OutIdx >= 0)\n\t\t\t{\n\t\t\t\tthis.AddOutPt(e, e.Top);\n\t\t\t\te.OutIdx = ClipperLib.ClipperBase.Unassigned;\n\t\t\t}\n\t\t\tthis.DeleteFromAEL(e);\n\t\t\tif (eMaxPair.OutIdx >= 0)\n\t\t\t{\n\t\t\t\tthis.AddOutPt(eMaxPair, e.Top);\n\t\t\t\teMaxPair.OutIdx = ClipperLib.ClipperBase.Unassigned;\n\t\t\t}\n\t\t\tthis.DeleteFromAEL(eMaxPair);\n\t\t}\n\t\telse\n\t\t\tClipperLib.Error(\"DoMaxima error\");\n\t};\n\n\tClipperLib.Clipper.ReversePaths = function (polys)\n\t{\n\t\tfor (var i = 0, len = polys.length; i < len; i++)\n\t\t\tpolys[i].reverse();\n\t};\n\n\tClipperLib.Clipper.Orientation = function (poly)\n\t{\n\t\treturn ClipperLib.Clipper.Area(poly) >= 0;\n\t};\n\n\tClipperLib.Clipper.prototype.PointCount = function (pts)\n\t{\n\t\tif (pts === null)\n\t\t\treturn 0;\n\t\tvar result = 0;\n\t\tvar p = pts;\n\t\tdo {\n\t\t\tresult++;\n\t\t\tp = p.Next;\n\t\t}\n\t\twhile (p !== pts)\n\t\treturn result;\n\t};\n\n\tClipperLib.Clipper.prototype.BuildResult = function (polyg)\n\t{\n\t\tClipperLib.Clear(polyg);\n\t\tfor (var i = 0, ilen = this.m_PolyOuts.length; i < ilen; i++)\n\t\t{\n\t\t\tvar outRec = this.m_PolyOuts[i];\n\t\t\tif (outRec.Pts === null)\n\t\t\t\tcontinue;\n\t\t\tvar p = outRec.Pts.Prev;\n\t\t\tvar cnt = this.PointCount(p);\n\t\t\tif (cnt < 2)\n\t\t\t\tcontinue;\n\t\t\tvar pg = new Array(cnt);\n\t\t\tfor (var j = 0; j < cnt; j++)\n\t\t\t{\n\t\t\t\tpg[j] = p.Pt;\n\t\t\t\tp = p.Prev;\n\t\t\t}\n\t\t\tpolyg.push(pg);\n\t\t}\n\t};\n\n\tClipperLib.Clipper.prototype.BuildResult2 = function (polytree)\n\t{\n\t\tpolytree.Clear();\n\t\t//add each output polygon/contour to polytree ...\n\t\t//polytree.m_AllPolys.set_Capacity(this.m_PolyOuts.length);\n\t\tfor (var i = 0, ilen = this.m_PolyOuts.length; i < ilen; i++)\n\t\t{\n\t\t\tvar outRec = this.m_PolyOuts[i];\n\t\t\tvar cnt = this.PointCount(outRec.Pts);\n\t\t\tif ((outRec.IsOpen && cnt < 2) || (!outRec.IsOpen && cnt < 3))\n\t\t\t\tcontinue;\n\t\t\tthis.FixHoleLinkage(outRec);\n\t\t\tvar pn = new ClipperLib.PolyNode();\n\t\t\tpolytree.m_AllPolys.push(pn);\n\t\t\toutRec.PolyNode = pn;\n\t\t\tpn.m_polygon.length = cnt;\n\t\t\tvar op = outRec.Pts.Prev;\n\t\t\tfor (var j = 0; j < cnt; j++)\n\t\t\t{\n\t\t\t\tpn.m_polygon[j] = op.Pt;\n\t\t\t\top = op.Prev;\n\t\t\t}\n\t\t}\n\t\t//fixup PolyNode links etc ...\n\t\t//polytree.m_Childs.set_Capacity(this.m_PolyOuts.length);\n\t\tfor (var i = 0, ilen = this.m_PolyOuts.length; i < ilen; i++)\n\t\t{\n\t\t\tvar outRec = this.m_PolyOuts[i];\n\t\t\tif (outRec.PolyNode === null)\n\t\t\t\tcontinue;\n\t\t\telse if (outRec.IsOpen)\n\t\t\t{\n\t\t\t\toutRec.PolyNode.IsOpen = true;\n\t\t\t\tpolytree.AddChild(outRec.PolyNode);\n\t\t\t}\n\t\t\telse if (outRec.FirstLeft !== null && outRec.FirstLeft.PolyNode !== null)\n\t\t\t\toutRec.FirstLeft.PolyNode.AddChild(outRec.PolyNode);\n\t\t\telse\n\t\t\t\tpolytree.AddChild(outRec.PolyNode);\n\t\t}\n\t};\n\n\tClipperLib.Clipper.prototype.FixupOutPolyline = function (outRec)\n\t{\n\t\tvar pp = outRec.Pts;\n\t\tvar lastPP = pp.Prev;\n\t\twhile (pp !== lastPP)\n\t\t{\n\t\t\tpp = pp.Next;\n\t\t\tif (ClipperLib.IntPoint.op_Equality(pp.Pt, pp.Prev.Pt))\n\t\t\t{\n\t\t\t\tif (pp === lastPP)\n\t\t\t\t{\n\t\t\t\t\tlastPP = pp.Prev;\n\t\t\t\t}\n\t\t\t\tvar tmpPP = pp.Prev;\n\t\t\t\ttmpPP.Next = pp.Next;\n\t\t\t\tpp.Next.Prev = tmpPP;\n\t\t\t\tpp = tmpPP;\n\t\t\t}\n\t\t}\n\t\tif (pp === pp.Prev)\n\t\t{\n\t\t\toutRec.Pts = null;\n\t\t}\n\t};\n\n\tClipperLib.Clipper.prototype.FixupOutPolygon = function (outRec)\n\t{\n\t\t//FixupOutPolygon() - removes duplicate points and simplifies consecutive\n\t\t//parallel edges by removing the middle vertex.\n\t\tvar lastOK = null;\n\t\toutRec.BottomPt = null;\n\t\tvar pp = outRec.Pts;\n\t\tvar preserveCol = this.PreserveCollinear || this.StrictlySimple;\n\t\tfor (;;)\n\t\t{\n\t\t\tif (pp.Prev === pp || pp.Prev === pp.Next)\n\t\t\t{\n\t\t\t\toutRec.Pts = null;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t//test for duplicate points and collinear edges ...\n\t\t\tif ((ClipperLib.IntPoint.op_Equality(pp.Pt, pp.Next.Pt)) || (ClipperLib.IntPoint.op_Equality(pp.Pt, pp.Prev.Pt)) || (ClipperLib.ClipperBase.SlopesEqual4(pp.Prev.Pt, pp.Pt, pp.Next.Pt, this.m_UseFullRange) && (!preserveCol || !this.Pt2IsBetweenPt1AndPt3(pp.Prev.Pt, pp.Pt, pp.Next.Pt))))\n\t\t\t{\n\t\t\t\tlastOK = null;\n\t\t\t\tpp.Prev.Next = pp.Next;\n\t\t\t\tpp.Next.Prev = pp.Prev;\n\t\t\t\tpp = pp.Prev;\n\t\t\t}\n\t\t\telse if (pp === lastOK)\n\t\t\t\tbreak;\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (lastOK === null)\n\t\t\t\t\tlastOK = pp;\n\t\t\t\tpp = pp.Next;\n\t\t\t}\n\t\t}\n\t\toutRec.Pts = pp;\n\t};\n\n\tClipperLib.Clipper.prototype.DupOutPt = function (outPt, InsertAfter)\n\t{\n\t\tvar result = new ClipperLib.OutPt();\n\t\t//result.Pt = outPt.Pt;\n\t\tresult.Pt.X = outPt.Pt.X;\n\t\tresult.Pt.Y = outPt.Pt.Y;\n\t\tif (ClipperLib.use_xyz) result.Pt.Z = outPt.Pt.Z;\n\t\tresult.Idx = outPt.Idx;\n\t\tif (InsertAfter)\n\t\t{\n\t\t\tresult.Next = outPt.Next;\n\t\t\tresult.Prev = outPt;\n\t\t\toutPt.Next.Prev = result;\n\t\t\toutPt.Next = result;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tresult.Prev = outPt.Prev;\n\t\t\tresult.Next = outPt;\n\t\t\toutPt.Prev.Next = result;\n\t\t\toutPt.Prev = result;\n\t\t}\n\t\treturn result;\n\t};\n\n\tClipperLib.Clipper.prototype.GetOverlap = function (a1, a2, b1, b2, $val)\n\t{\n\t\tif (a1 < a2)\n\t\t{\n\t\t\tif (b1 < b2)\n\t\t\t{\n\t\t\t\t$val.Left = Math.max(a1, b1);\n\t\t\t\t$val.Right = Math.min(a2, b2);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$val.Left = Math.max(a1, b2);\n\t\t\t\t$val.Right = Math.min(a2, b1);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (b1 < b2)\n\t\t\t{\n\t\t\t\t$val.Left = Math.max(a2, b1);\n\t\t\t\t$val.Right = Math.min(a1, b2);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$val.Left = Math.max(a2, b2);\n\t\t\t\t$val.Right = Math.min(a1, b1);\n\t\t\t}\n\t\t}\n\t\treturn $val.Left < $val.Right;\n\t};\n\n\tClipperLib.Clipper.prototype.JoinHorz = function (op1, op1b, op2, op2b, Pt, DiscardLeft)\n\t{\n\t\tvar Dir1 = (op1.Pt.X > op1b.Pt.X ? ClipperLib.Direction.dRightToLeft : ClipperLib.Direction.dLeftToRight);\n\t\tvar Dir2 = (op2.Pt.X > op2b.Pt.X ? ClipperLib.Direction.dRightToLeft : ClipperLib.Direction.dLeftToRight);\n\t\tif (Dir1 === Dir2)\n\t\t\treturn false;\n\t\t//When DiscardLeft, we want Op1b to be on the Left of Op1, otherwise we\n\t\t//want Op1b to be on the Right. (And likewise with Op2 and Op2b.)\n\t\t//So, to facilitate this while inserting Op1b and Op2b ...\n\t\t//when DiscardLeft, make sure we're AT or RIGHT of Pt before adding Op1b,\n\t\t//otherwise make sure we're AT or LEFT of Pt. (Likewise with Op2b.)\n\t\tif (Dir1 === ClipperLib.Direction.dLeftToRight)\n\t\t{\n\t\t\twhile (op1.Next.Pt.X <= Pt.X &&\n\t\t\t\top1.Next.Pt.X >= op1.Pt.X && op1.Next.Pt.Y === Pt.Y)\n\t\t\t\top1 = op1.Next;\n\t\t\tif (DiscardLeft && (op1.Pt.X !== Pt.X))\n\t\t\t\top1 = op1.Next;\n\t\t\top1b = this.DupOutPt(op1, !DiscardLeft);\n\t\t\tif (ClipperLib.IntPoint.op_Inequality(op1b.Pt, Pt))\n\t\t\t{\n\t\t\t\top1 = op1b;\n\t\t\t\t//op1.Pt = Pt;\n\t\t\t\top1.Pt.X = Pt.X;\n\t\t\t\top1.Pt.Y = Pt.Y;\n\t\t\t\tif (ClipperLib.use_xyz) op1.Pt.Z = Pt.Z;\n\t\t\t\top1b = this.DupOutPt(op1, !DiscardLeft);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\twhile (op1.Next.Pt.X >= Pt.X &&\n\t\t\t\top1.Next.Pt.X <= op1.Pt.X && op1.Next.Pt.Y === Pt.Y)\n\t\t\t\top1 = op1.Next;\n\t\t\tif (!DiscardLeft && (op1.Pt.X !== Pt.X))\n\t\t\t\top1 = op1.Next;\n\t\t\top1b = this.DupOutPt(op1, DiscardLeft);\n\t\t\tif (ClipperLib.IntPoint.op_Inequality(op1b.Pt, Pt))\n\t\t\t{\n\t\t\t\top1 = op1b;\n\t\t\t\t//op1.Pt = Pt;\n\t\t\t\top1.Pt.X = Pt.X;\n\t\t\t\top1.Pt.Y = Pt.Y;\n\t\t\t\tif (ClipperLib.use_xyz) op1.Pt.Z = Pt.Z;\n\t\t\t\top1b = this.DupOutPt(op1, DiscardLeft);\n\t\t\t}\n\t\t}\n\t\tif (Dir2 === ClipperLib.Direction.dLeftToRight)\n\t\t{\n\t\t\twhile (op2.Next.Pt.X <= Pt.X &&\n\t\t\t\top2.Next.Pt.X >= op2.Pt.X && op2.Next.Pt.Y === Pt.Y)\n\t\t\t\top2 = op2.Next;\n\t\t\tif (DiscardLeft && (op2.Pt.X !== Pt.X))\n\t\t\t\top2 = op2.Next;\n\t\t\top2b = this.DupOutPt(op2, !DiscardLeft);\n\t\t\tif (ClipperLib.IntPoint.op_Inequality(op2b.Pt, Pt))\n\t\t\t{\n\t\t\t\top2 = op2b;\n\t\t\t\t//op2.Pt = Pt;\n\t\t\t\top2.Pt.X = Pt.X;\n\t\t\t\top2.Pt.Y = Pt.Y;\n\t\t\t\tif (ClipperLib.use_xyz) op2.Pt.Z = Pt.Z;\n\t\t\t\top2b = this.DupOutPt(op2, !DiscardLeft);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\twhile (op2.Next.Pt.X >= Pt.X &&\n\t\t\t\top2.Next.Pt.X <= op2.Pt.X && op2.Next.Pt.Y === Pt.Y)\n\t\t\t\top2 = op2.Next;\n\t\t\tif (!DiscardLeft && (op2.Pt.X !== Pt.X))\n\t\t\t\top2 = op2.Next;\n\t\t\top2b = this.DupOutPt(op2, DiscardLeft);\n\t\t\tif (ClipperLib.IntPoint.op_Inequality(op2b.Pt, Pt))\n\t\t\t{\n\t\t\t\top2 = op2b;\n\t\t\t\t//op2.Pt = Pt;\n\t\t\t\top2.Pt.X = Pt.X;\n\t\t\t\top2.Pt.Y = Pt.Y;\n\t\t\t\tif (ClipperLib.use_xyz) op2.Pt.Z = Pt.Z;\n\t\t\t\top2b = this.DupOutPt(op2, DiscardLeft);\n\t\t\t}\n\t\t}\n\t\tif ((Dir1 === ClipperLib.Direction.dLeftToRight) === DiscardLeft)\n\t\t{\n\t\t\top1.Prev = op2;\n\t\t\top2.Next = op1;\n\t\t\top1b.Next = op2b;\n\t\t\top2b.Prev = op1b;\n\t\t}\n\t\telse\n\t\t{\n\t\t\top1.Next = op2;\n\t\t\top2.Prev = op1;\n\t\t\top1b.Prev = op2b;\n\t\t\top2b.Next = op1b;\n\t\t}\n\t\treturn true;\n\t};\n\n\tClipperLib.Clipper.prototype.JoinPoints = function (j, outRec1, outRec2)\n\t{\n\t\tvar op1 = j.OutPt1,\n\t\t\top1b = new ClipperLib.OutPt();\n\t\tvar op2 = j.OutPt2,\n\t\t\top2b = new ClipperLib.OutPt();\n\t\t//There are 3 kinds of joins for output polygons ...\n\t\t//1. Horizontal joins where Join.OutPt1 & Join.OutPt2 are vertices anywhere\n\t\t//along (horizontal) collinear edges (& Join.OffPt is on the same horizontal).\n\t\t//2. Non-horizontal joins where Join.OutPt1 & Join.OutPt2 are at the same\n\t\t//location at the Bottom of the overlapping segment (& Join.OffPt is above).\n\t\t//3. StrictlySimple joins where edges touch but are not collinear and where\n\t\t//Join.OutPt1, Join.OutPt2 & Join.OffPt all share the same point.\n\t\tvar isHorizontal = (j.OutPt1.Pt.Y === j.OffPt.Y);\n\t\tif (isHorizontal && (ClipperLib.IntPoint.op_Equality(j.OffPt, j.OutPt1.Pt)) && (ClipperLib.IntPoint.op_Equality(j.OffPt, j.OutPt2.Pt)))\n\t\t{\n\t\t\t//Strictly Simple join ...\n\t\t\tif (outRec1 !== outRec2) return false;\n\n\t\t\top1b = j.OutPt1.Next;\n\t\t\twhile (op1b !== op1 && (ClipperLib.IntPoint.op_Equality(op1b.Pt, j.OffPt)))\n\t\t\t\top1b = op1b.Next;\n\t\t\tvar reverse1 = (op1b.Pt.Y > j.OffPt.Y);\n\t\t\top2b = j.OutPt2.Next;\n\t\t\twhile (op2b !== op2 && (ClipperLib.IntPoint.op_Equality(op2b.Pt, j.OffPt)))\n\t\t\t\top2b = op2b.Next;\n\t\t\tvar reverse2 = (op2b.Pt.Y > j.OffPt.Y);\n\t\t\tif (reverse1 === reverse2)\n\t\t\t\treturn false;\n\t\t\tif (reverse1)\n\t\t\t{\n\t\t\t\top1b = this.DupOutPt(op1, false);\n\t\t\t\top2b = this.DupOutPt(op2, true);\n\t\t\t\top1.Prev = op2;\n\t\t\t\top2.Next = op1;\n\t\t\t\top1b.Next = op2b;\n\t\t\t\top2b.Prev = op1b;\n\t\t\t\tj.OutPt1 = op1;\n\t\t\t\tj.OutPt2 = op1b;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\top1b = this.DupOutPt(op1, true);\n\t\t\t\top2b = this.DupOutPt(op2, false);\n\t\t\t\top1.Next = op2;\n\t\t\t\top2.Prev = op1;\n\t\t\t\top1b.Prev = op2b;\n\t\t\t\top2b.Next = op1b;\n\t\t\t\tj.OutPt1 = op1;\n\t\t\t\tj.OutPt2 = op1b;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\telse if (isHorizontal)\n\t\t{\n\t\t\t//treat horizontal joins differently to non-horizontal joins since with\n\t\t\t//them we're not yet sure where the overlapping is. OutPt1.Pt & OutPt2.Pt\n\t\t\t//may be anywhere along the horizontal edge.\n\t\t\top1b = op1;\n\t\t\twhile (op1.Prev.Pt.Y === op1.Pt.Y && op1.Prev !== op1b && op1.Prev !== op2)\n\t\t\t\top1 = op1.Prev;\n\t\t\twhile (op1b.Next.Pt.Y === op1b.Pt.Y && op1b.Next !== op1 && op1b.Next !== op2)\n\t\t\t\top1b = op1b.Next;\n\t\t\tif (op1b.Next === op1 || op1b.Next === op2)\n\t\t\t\treturn false;\n\t\t\t//a flat 'polygon'\n\t\t\top2b = op2;\n\t\t\twhile (op2.Prev.Pt.Y === op2.Pt.Y && op2.Prev !== op2b && op2.Prev !== op1b)\n\t\t\t\top2 = op2.Prev;\n\t\t\twhile (op2b.Next.Pt.Y === op2b.Pt.Y && op2b.Next !== op2 && op2b.Next !== op1)\n\t\t\t\top2b = op2b.Next;\n\t\t\tif (op2b.Next === op2 || op2b.Next === op1)\n\t\t\t\treturn false;\n\t\t\t//a flat 'polygon'\n\t\t\t//Op1 -. Op1b & Op2 -. Op2b are the extremites of the horizontal edges\n\n\t\t\tvar $val = {\n\t\t\t\tLeft: null,\n\t\t\t\tRight: null\n\t\t\t};\n\n\t\t\tif (!this.GetOverlap(op1.Pt.X, op1b.Pt.X, op2.Pt.X, op2b.Pt.X, $val))\n\t\t\t\treturn false;\n\t\t\tvar Left = $val.Left;\n\t\t\tvar Right = $val.Right;\n\n\t\t\t//DiscardLeftSide: when overlapping edges are joined, a spike will created\n\t\t\t//which needs to be cleaned up. However, we don't want Op1 or Op2 caught up\n\t\t\t//on the discard Side as either may still be needed for other joins ...\n\t\t\tvar Pt = new ClipperLib.IntPoint0();\n\t\t\tvar DiscardLeftSide;\n\t\t\tif (op1.Pt.X >= Left && op1.Pt.X <= Right)\n\t\t\t{\n\t\t\t\t//Pt = op1.Pt;\n\t\t\t\tPt.X = op1.Pt.X;\n\t\t\t\tPt.Y = op1.Pt.Y;\n\t\t\t\tif (ClipperLib.use_xyz) Pt.Z = op1.Pt.Z;\n\t\t\t\tDiscardLeftSide = (op1.Pt.X > op1b.Pt.X);\n\t\t\t}\n\t\t\telse if (op2.Pt.X >= Left && op2.Pt.X <= Right)\n\t\t\t{\n\t\t\t\t//Pt = op2.Pt;\n\t\t\t\tPt.X = op2.Pt.X;\n\t\t\t\tPt.Y = op2.Pt.Y;\n\t\t\t\tif (ClipperLib.use_xyz) Pt.Z = op2.Pt.Z;\n\t\t\t\tDiscardLeftSide = (op2.Pt.X > op2b.Pt.X);\n\t\t\t}\n\t\t\telse if (op1b.Pt.X >= Left && op1b.Pt.X <= Right)\n\t\t\t{\n\t\t\t\t//Pt = op1b.Pt;\n\t\t\t\tPt.X = op1b.Pt.X;\n\t\t\t\tPt.Y = op1b.Pt.Y;\n\t\t\t\tif (ClipperLib.use_xyz) Pt.Z = op1b.Pt.Z;\n\t\t\t\tDiscardLeftSide = op1b.Pt.X > op1.Pt.X;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//Pt = op2b.Pt;\n\t\t\t\tPt.X = op2b.Pt.X;\n\t\t\t\tPt.Y = op2b.Pt.Y;\n\t\t\t\tif (ClipperLib.use_xyz) Pt.Z = op2b.Pt.Z;\n\t\t\t\tDiscardLeftSide = (op2b.Pt.X > op2.Pt.X);\n\t\t\t}\n\t\t\tj.OutPt1 = op1;\n\t\t\tj.OutPt2 = op2;\n\t\t\treturn this.JoinHorz(op1, op1b, op2, op2b, Pt, DiscardLeftSide);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//nb: For non-horizontal joins ...\n\t\t\t//    1. Jr.OutPt1.Pt.Y == Jr.OutPt2.Pt.Y\n\t\t\t//    2. Jr.OutPt1.Pt > Jr.OffPt.Y\n\t\t\t//make sure the polygons are correctly oriented ...\n\t\t\top1b = op1.Next;\n\t\t\twhile ((ClipperLib.IntPoint.op_Equality(op1b.Pt, op1.Pt)) && (op1b !== op1))\n\t\t\t\top1b = op1b.Next;\n\t\t\tvar Reverse1 = ((op1b.Pt.Y > op1.Pt.Y) || !ClipperLib.ClipperBase.SlopesEqual4(op1.Pt, op1b.Pt, j.OffPt, this.m_UseFullRange));\n\t\t\tif (Reverse1)\n\t\t\t{\n\t\t\t\top1b = op1.Prev;\n\t\t\t\twhile ((ClipperLib.IntPoint.op_Equality(op1b.Pt, op1.Pt)) && (op1b !== op1))\n\t\t\t\t\top1b = op1b.Prev;\n\n\t\t\t\tif ((op1b.Pt.Y > op1.Pt.Y) || !ClipperLib.ClipperBase.SlopesEqual4(op1.Pt, op1b.Pt, j.OffPt, this.m_UseFullRange))\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t\top2b = op2.Next;\n\t\t\twhile ((ClipperLib.IntPoint.op_Equality(op2b.Pt, op2.Pt)) && (op2b !== op2))\n\t\t\t\top2b = op2b.Next;\n\n\t\t\tvar Reverse2 = ((op2b.Pt.Y > op2.Pt.Y) || !ClipperLib.ClipperBase.SlopesEqual4(op2.Pt, op2b.Pt, j.OffPt, this.m_UseFullRange));\n\t\t\tif (Reverse2)\n\t\t\t{\n\t\t\t\top2b = op2.Prev;\n\t\t\t\twhile ((ClipperLib.IntPoint.op_Equality(op2b.Pt, op2.Pt)) && (op2b !== op2))\n\t\t\t\t\top2b = op2b.Prev;\n\n\t\t\t\tif ((op2b.Pt.Y > op2.Pt.Y) || !ClipperLib.ClipperBase.SlopesEqual4(op2.Pt, op2b.Pt, j.OffPt, this.m_UseFullRange))\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif ((op1b === op1) || (op2b === op2) || (op1b === op2b) ||\n\t\t\t\t((outRec1 === outRec2) && (Reverse1 === Reverse2)))\n\t\t\t\treturn false;\n\t\t\tif (Reverse1)\n\t\t\t{\n\t\t\t\top1b = this.DupOutPt(op1, false);\n\t\t\t\top2b = this.DupOutPt(op2, true);\n\t\t\t\top1.Prev = op2;\n\t\t\t\top2.Next = op1;\n\t\t\t\top1b.Next = op2b;\n\t\t\t\top2b.Prev = op1b;\n\t\t\t\tj.OutPt1 = op1;\n\t\t\t\tj.OutPt2 = op1b;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\top1b = this.DupOutPt(op1, true);\n\t\t\t\top2b = this.DupOutPt(op2, false);\n\t\t\t\top1.Next = op2;\n\t\t\t\top2.Prev = op1;\n\t\t\t\top1b.Prev = op2b;\n\t\t\t\top2b.Next = op1b;\n\t\t\t\tj.OutPt1 = op1;\n\t\t\t\tj.OutPt2 = op1b;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t};\n\n\tClipperLib.Clipper.GetBounds = function (paths)\n\t{\n\t\tvar i = 0,\n\t\t\tcnt = paths.length;\n\t\twhile (i < cnt && paths[i].length === 0) i++;\n\t\tif (i === cnt) return new ClipperLib.IntRect(0, 0, 0, 0);\n\t\tvar result = new ClipperLib.IntRect();\n\t\tresult.left = paths[i][0].X;\n\t\tresult.right = result.left;\n\t\tresult.top = paths[i][0].Y;\n\t\tresult.bottom = result.top;\n\t\tfor (; i < cnt; i++)\n\t\t\tfor (var j = 0, jlen = paths[i].length; j < jlen; j++)\n\t\t\t{\n\t\t\t\tif (paths[i][j].X < result.left) result.left = paths[i][j].X;\n\t\t\t\telse if (paths[i][j].X > result.right) result.right = paths[i][j].X;\n\t\t\t\tif (paths[i][j].Y < result.top) result.top = paths[i][j].Y;\n\t\t\t\telse if (paths[i][j].Y > result.bottom) result.bottom = paths[i][j].Y;\n\t\t\t}\n\t\treturn result;\n\t}\n\tClipperLib.Clipper.prototype.GetBounds2 = function (ops)\n\t{\n\t\tvar opStart = ops;\n\t\tvar result = new ClipperLib.IntRect();\n\t\tresult.left = ops.Pt.X;\n\t\tresult.right = ops.Pt.X;\n\t\tresult.top = ops.Pt.Y;\n\t\tresult.bottom = ops.Pt.Y;\n\t\tops = ops.Next;\n\t\twhile (ops !== opStart)\n\t\t{\n\t\t\tif (ops.Pt.X < result.left)\n\t\t\t\tresult.left = ops.Pt.X;\n\t\t\tif (ops.Pt.X > result.right)\n\t\t\t\tresult.right = ops.Pt.X;\n\t\t\tif (ops.Pt.Y < result.top)\n\t\t\t\tresult.top = ops.Pt.Y;\n\t\t\tif (ops.Pt.Y > result.bottom)\n\t\t\t\tresult.bottom = ops.Pt.Y;\n\t\t\tops = ops.Next;\n\t\t}\n\t\treturn result;\n\t};\n\n\tClipperLib.Clipper.PointInPolygon = function (pt, path)\n\t{\n\t\t//returns 0 if false, +1 if true, -1 if pt ON polygon boundary\n\t\t//See \"The Point in Polygon Problem for Arbitrary Polygons\" by Hormann & Agathos\n\t\t//http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.88.5498&rep=rep1&type=pdf\n\t\tvar result = 0,\n\t\t\tcnt = path.length;\n\t\tif (cnt < 3)\n\t\t\treturn 0;\n\t\tvar ip = path[0];\n\t\tfor (var i = 1; i <= cnt; ++i)\n\t\t{\n\t\t\tvar ipNext = (i === cnt ? path[0] : path[i]);\n\t\t\tif (ipNext.Y === pt.Y)\n\t\t\t{\n\t\t\t\tif ((ipNext.X === pt.X) || (ip.Y === pt.Y && ((ipNext.X > pt.X) === (ip.X < pt.X))))\n\t\t\t\t\treturn -1;\n\t\t\t}\n\t\t\tif ((ip.Y < pt.Y) !== (ipNext.Y < pt.Y))\n\t\t\t{\n\t\t\t\tif (ip.X >= pt.X)\n\t\t\t\t{\n\t\t\t\t\tif (ipNext.X > pt.X)\n\t\t\t\t\t\tresult = 1 - result;\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tvar d = (ip.X - pt.X) * (ipNext.Y - pt.Y) - (ipNext.X - pt.X) * (ip.Y - pt.Y);\n\t\t\t\t\t\tif (d === 0)\n\t\t\t\t\t\t\treturn -1;\n\t\t\t\t\t\telse if ((d > 0) === (ipNext.Y > ip.Y))\n\t\t\t\t\t\t\tresult = 1 - result;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif (ipNext.X > pt.X)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar d = (ip.X - pt.X) * (ipNext.Y - pt.Y) - (ipNext.X - pt.X) * (ip.Y - pt.Y);\n\t\t\t\t\t\tif (d === 0)\n\t\t\t\t\t\t\treturn -1;\n\t\t\t\t\t\telse if ((d > 0) === (ipNext.Y > ip.Y))\n\t\t\t\t\t\t\tresult = 1 - result;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tip = ipNext;\n\t\t}\n\t\treturn result;\n\t};\n\n\tClipperLib.Clipper.prototype.PointInPolygon = function (pt, op)\n\t{\n\t\t//returns 0 if false, +1 if true, -1 if pt ON polygon boundary\n\t\tvar result = 0;\n\t\tvar startOp = op;\n\t\tvar ptx = pt.X,\n\t\t\tpty = pt.Y;\n\t\tvar poly0x = op.Pt.X,\n\t\t\tpoly0y = op.Pt.Y;\n\t\tdo {\n\t\t\top = op.Next;\n\t\t\tvar poly1x = op.Pt.X,\n\t\t\t\tpoly1y = op.Pt.Y;\n\t\t\tif (poly1y === pty)\n\t\t\t{\n\t\t\t\tif ((poly1x === ptx) || (poly0y === pty && ((poly1x > ptx) === (poly0x < ptx))))\n\t\t\t\t\treturn -1;\n\t\t\t}\n\t\t\tif ((poly0y < pty) !== (poly1y < pty))\n\t\t\t{\n\t\t\t\tif (poly0x >= ptx)\n\t\t\t\t{\n\t\t\t\t\tif (poly1x > ptx)\n\t\t\t\t\t\tresult = 1 - result;\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tvar d = (poly0x - ptx) * (poly1y - pty) - (poly1x - ptx) * (poly0y - pty);\n\t\t\t\t\t\tif (d === 0)\n\t\t\t\t\t\t\treturn -1;\n\t\t\t\t\t\tif ((d > 0) === (poly1y > poly0y))\n\t\t\t\t\t\t\tresult = 1 - result;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif (poly1x > ptx)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar d = (poly0x - ptx) * (poly1y - pty) - (poly1x - ptx) * (poly0y - pty);\n\t\t\t\t\t\tif (d === 0)\n\t\t\t\t\t\t\treturn -1;\n\t\t\t\t\t\tif ((d > 0) === (poly1y > poly0y))\n\t\t\t\t\t\t\tresult = 1 - result;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tpoly0x = poly1x;\n\t\t\tpoly0y = poly1y;\n\t\t} while (startOp !== op);\n\n\t\treturn result;\n\t};\n\n\tClipperLib.Clipper.prototype.Poly2ContainsPoly1 = function (outPt1, outPt2)\n\t{\n\t\tvar op = outPt1;\n\t\tdo {\n\t\t\t//nb: PointInPolygon returns 0 if false, +1 if true, -1 if pt on polygon\n\t\t\tvar res = this.PointInPolygon(op.Pt, outPt2);\n\t\t\tif (res >= 0)\n\t\t\t\treturn res > 0;\n\t\t\top = op.Next;\n\t\t}\n\t\twhile (op !== outPt1)\n\t\treturn true;\n\t};\n\n\tClipperLib.Clipper.prototype.FixupFirstLefts1 = function (OldOutRec, NewOutRec)\n\t{\n\t\tvar outRec, firstLeft;\n\t\tfor (var i = 0, ilen = this.m_PolyOuts.length; i < ilen; i++)\n\t\t{\n\t\t\toutRec = this.m_PolyOuts[i];\n\t\t\tfirstLeft = ClipperLib.Clipper.ParseFirstLeft(outRec.FirstLeft);\n\t\t\tif (outRec.Pts !== null && firstLeft === OldOutRec)\n\t\t\t{\n\t\t\t\tif (this.Poly2ContainsPoly1(outRec.Pts, NewOutRec.Pts))\n\t\t\t\t\toutRec.FirstLeft = NewOutRec;\n\t\t\t}\n\t\t}\n\t}\n\n\tClipperLib.Clipper.prototype.FixupFirstLefts2 = function (innerOutRec, outerOutRec)\n\t{\n\t\t//A polygon has split into two such that one is now the inner of the other.\n\t\t//It's possible that these polygons now wrap around other polygons, so check\n\t\t//every polygon that's also contained by OuterOutRec's FirstLeft container\n\t\t//(including nil) to see if they've become inner to the new inner polygon ...\n\t\tvar orfl = outerOutRec.FirstLeft;\n\t\tvar outRec, firstLeft;\n\t\tfor (var i = 0, ilen = this.m_PolyOuts.length; i < ilen; i++)\n\t\t{\n\t\t\toutRec = this.m_PolyOuts[i];\n\t\t\tif (outRec.Pts === null || outRec === outerOutRec || outRec === innerOutRec)\n\t\t\t\tcontinue;\n\t\t\tfirstLeft = ClipperLib.Clipper.ParseFirstLeft(outRec.FirstLeft);\n\t\t\tif (firstLeft !== orfl && firstLeft !== innerOutRec && firstLeft !== outerOutRec)\n\t\t\t\tcontinue;\n\t\t\tif (this.Poly2ContainsPoly1(outRec.Pts, innerOutRec.Pts))\n\t\t\t\toutRec.FirstLeft = innerOutRec;\n\t\t\telse if (this.Poly2ContainsPoly1(outRec.Pts, outerOutRec.Pts))\n\t\t\t\toutRec.FirstLeft = outerOutRec;\n\t\t\telse if (outRec.FirstLeft === innerOutRec || outRec.FirstLeft === outerOutRec)\n\t\t\t\toutRec.FirstLeft = orfl;\n\t\t}\n\t}\n\n\tClipperLib.Clipper.prototype.FixupFirstLefts3 = function (OldOutRec, NewOutRec)\n\t{\n\t\t//same as FixupFirstLefts1 but doesn't call Poly2ContainsPoly1()\n\t\tvar outRec;\n\t\tvar firstLeft;\n\t\tfor (var i = 0, ilen = this.m_PolyOuts.length; i < ilen; i++)\n\t\t{\n\t\t\toutRec = this.m_PolyOuts[i];\n\t\t\tfirstLeft = ClipperLib.Clipper.ParseFirstLeft(outRec.FirstLeft);\n\t\t\tif (outRec.Pts !== null && firstLeft === OldOutRec)\n\t\t\t\toutRec.FirstLeft = NewOutRec;\n\t\t}\n\t}\n\n\tClipperLib.Clipper.ParseFirstLeft = function (FirstLeft)\n\t{\n\t\twhile (FirstLeft !== null && FirstLeft.Pts === null)\n\t\t\tFirstLeft = FirstLeft.FirstLeft;\n\t\treturn FirstLeft;\n\t};\n\n\tClipperLib.Clipper.prototype.JoinCommonEdges = function ()\n\t{\n\t\tfor (var i = 0, ilen = this.m_Joins.length; i < ilen; i++)\n\t\t{\n\t\t\tvar join = this.m_Joins[i];\n\t\t\tvar outRec1 = this.GetOutRec(join.OutPt1.Idx);\n\t\t\tvar outRec2 = this.GetOutRec(join.OutPt2.Idx);\n\t\t\tif (outRec1.Pts === null || outRec2.Pts === null)\n\t\t\t\tcontinue;\n\n\t\t\tif (outRec1.IsOpen || outRec2.IsOpen)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t//get the polygon fragment with the correct hole state (FirstLeft)\n\t\t\t//before calling JoinPoints() ...\n\t\t\tvar holeStateRec;\n\t\t\tif (outRec1 === outRec2)\n\t\t\t\tholeStateRec = outRec1;\n\t\t\telse if (this.OutRec1RightOfOutRec2(outRec1, outRec2))\n\t\t\t\tholeStateRec = outRec2;\n\t\t\telse if (this.OutRec1RightOfOutRec2(outRec2, outRec1))\n\t\t\t\tholeStateRec = outRec1;\n\t\t\telse\n\t\t\t\tholeStateRec = this.GetLowermostRec(outRec1, outRec2);\n\n\t\t\tif (!this.JoinPoints(join, outRec1, outRec2)) continue;\n\n\t\t\tif (outRec1 === outRec2)\n\t\t\t{\n\t\t\t\t//instead of joining two polygons, we've just created a new one by\n\t\t\t\t//splitting one polygon into two.\n\t\t\t\toutRec1.Pts = join.OutPt1;\n\t\t\t\toutRec1.BottomPt = null;\n\t\t\t\toutRec2 = this.CreateOutRec();\n\t\t\t\toutRec2.Pts = join.OutPt2;\n\t\t\t\t//update all OutRec2.Pts Idx's ...\n\t\t\t\tthis.UpdateOutPtIdxs(outRec2);\n\n\t\t\t\tif (this.Poly2ContainsPoly1(outRec2.Pts, outRec1.Pts))\n\t\t\t\t{\n\t\t\t\t\t//outRec1 contains outRec2 ...\n\t\t\t\t\toutRec2.IsHole = !outRec1.IsHole;\n\t\t\t\t\toutRec2.FirstLeft = outRec1;\n\t\t\t\t\tif (this.m_UsingPolyTree)\n\t\t\t\t\t\tthis.FixupFirstLefts2(outRec2, outRec1);\n\t\t\t\t\tif ((outRec2.IsHole ^ this.ReverseSolution) == (this.Area$1(outRec2) > 0))\n\t\t\t\t\t\tthis.ReversePolyPtLinks(outRec2.Pts);\n\t\t\t\t}\n\t\t\t\telse if (this.Poly2ContainsPoly1(outRec1.Pts, outRec2.Pts))\n\t\t\t\t{\n\t\t\t\t\t//outRec2 contains outRec1 ...\n\t\t\t\t\toutRec2.IsHole = outRec1.IsHole;\n\t\t\t\t\toutRec1.IsHole = !outRec2.IsHole;\n\t\t\t\t\toutRec2.FirstLeft = outRec1.FirstLeft;\n\t\t\t\t\toutRec1.FirstLeft = outRec2;\n\t\t\t\t\tif (this.m_UsingPolyTree)\n\t\t\t\t\t\tthis.FixupFirstLefts2(outRec1, outRec2);\n\n\t\t\t\t\tif ((outRec1.IsHole ^ this.ReverseSolution) == (this.Area$1(outRec1) > 0))\n\t\t\t\t\t\tthis.ReversePolyPtLinks(outRec1.Pts);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//the 2 polygons are completely separate ...\n\t\t\t\t\toutRec2.IsHole = outRec1.IsHole;\n\t\t\t\t\toutRec2.FirstLeft = outRec1.FirstLeft;\n\t\t\t\t\t//fixup FirstLeft pointers that may need reassigning to OutRec2\n\t\t\t\t\tif (this.m_UsingPolyTree)\n\t\t\t\t\t\tthis.FixupFirstLefts1(outRec1, outRec2);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//joined 2 polygons together ...\n\t\t\t\toutRec2.Pts = null;\n\t\t\t\toutRec2.BottomPt = null;\n\t\t\t\toutRec2.Idx = outRec1.Idx;\n\t\t\t\toutRec1.IsHole = holeStateRec.IsHole;\n\t\t\t\tif (holeStateRec === outRec2)\n\t\t\t\t\toutRec1.FirstLeft = outRec2.FirstLeft;\n\t\t\t\toutRec2.FirstLeft = outRec1;\n\t\t\t\t//fixup FirstLeft pointers that may need reassigning to OutRec1\n\t\t\t\tif (this.m_UsingPolyTree)\n\t\t\t\t\tthis.FixupFirstLefts3(outRec2, outRec1);\n\t\t\t}\n\t\t}\n\t};\n\n\tClipperLib.Clipper.prototype.UpdateOutPtIdxs = function (outrec)\n\t{\n\t\tvar op = outrec.Pts;\n\t\tdo {\n\t\t\top.Idx = outrec.Idx;\n\t\t\top = op.Prev;\n\t\t}\n\t\twhile (op !== outrec.Pts)\n\t};\n\n\tClipperLib.Clipper.prototype.DoSimplePolygons = function ()\n\t{\n\t\tvar i = 0;\n\t\twhile (i < this.m_PolyOuts.length)\n\t\t{\n\t\t\tvar outrec = this.m_PolyOuts[i++];\n\t\t\tvar op = outrec.Pts;\n\t\t\tif (op === null || outrec.IsOpen)\n\t\t\t\tcontinue;\n\t\t\tdo //for each Pt in Polygon until duplicate found do ...\n\t\t\t{\n\t\t\t\tvar op2 = op.Next;\n\t\t\t\twhile (op2 !== outrec.Pts)\n\t\t\t\t{\n\t\t\t\t\tif ((ClipperLib.IntPoint.op_Equality(op.Pt, op2.Pt)) && op2.Next !== op && op2.Prev !== op)\n\t\t\t\t\t{\n\t\t\t\t\t\t//split the polygon into two ...\n\t\t\t\t\t\tvar op3 = op.Prev;\n\t\t\t\t\t\tvar op4 = op2.Prev;\n\t\t\t\t\t\top.Prev = op4;\n\t\t\t\t\t\top4.Next = op;\n\t\t\t\t\t\top2.Prev = op3;\n\t\t\t\t\t\top3.Next = op2;\n\t\t\t\t\t\toutrec.Pts = op;\n\t\t\t\t\t\tvar outrec2 = this.CreateOutRec();\n\t\t\t\t\t\toutrec2.Pts = op2;\n\t\t\t\t\t\tthis.UpdateOutPtIdxs(outrec2);\n\t\t\t\t\t\tif (this.Poly2ContainsPoly1(outrec2.Pts, outrec.Pts))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//OutRec2 is contained by OutRec1 ...\n\t\t\t\t\t\t\toutrec2.IsHole = !outrec.IsHole;\n\t\t\t\t\t\t\toutrec2.FirstLeft = outrec;\n\t\t\t\t\t\t\tif (this.m_UsingPolyTree) this.FixupFirstLefts2(outrec2, outrec);\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (this.Poly2ContainsPoly1(outrec.Pts, outrec2.Pts))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//OutRec1 is contained by OutRec2 ...\n\t\t\t\t\t\t\toutrec2.IsHole = outrec.IsHole;\n\t\t\t\t\t\t\toutrec.IsHole = !outrec2.IsHole;\n\t\t\t\t\t\t\toutrec2.FirstLeft = outrec.FirstLeft;\n\t\t\t\t\t\t\toutrec.FirstLeft = outrec2;\n\t\t\t\t\t\t\tif (this.m_UsingPolyTree) this.FixupFirstLefts2(outrec, outrec2);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//the 2 polygons are separate ...\n\t\t\t\t\t\t\toutrec2.IsHole = outrec.IsHole;\n\t\t\t\t\t\t\toutrec2.FirstLeft = outrec.FirstLeft;\n\t\t\t\t\t\t\tif (this.m_UsingPolyTree) this.FixupFirstLefts1(outrec, outrec2);\n\t\t\t\t\t\t}\n\t\t\t\t\t\top2 = op;\n\t\t\t\t\t\t//ie get ready for the next iteration\n\t\t\t\t\t}\n\t\t\t\t\top2 = op2.Next;\n\t\t\t\t}\n\t\t\t\top = op.Next;\n\t\t\t}\n\t\t\twhile (op !== outrec.Pts)\n\t\t}\n\t};\n\n\tClipperLib.Clipper.Area = function (poly)\n\t{\n\t\tif (!Array.isArray(poly))\n\t\t\treturn 0;\n\t\tvar cnt = poly.length;\n\t\tif (cnt < 3)\n\t\t\treturn 0;\n\t\tvar a = 0;\n\t\tfor (var i = 0, j = cnt - 1; i < cnt; ++i)\n\t\t{\n\t\t\ta += (poly[j].X + poly[i].X) * (poly[j].Y - poly[i].Y);\n\t\t\tj = i;\n\t\t}\n\t\treturn -a * 0.5;\n\t};\n\n\tClipperLib.Clipper.prototype.Area = function (op)\n\t{\n\t\tvar opFirst = op;\n\t\tif (op === null) return 0;\n\t\tvar a = 0;\n\t\tdo {\n\t\t\ta = a + (op.Prev.Pt.X + op.Pt.X) * (op.Prev.Pt.Y - op.Pt.Y);\n\t\t\top = op.Next;\n\t\t} while (op !== opFirst); // && typeof op !== 'undefined');\n\t\treturn a * 0.5;\n\t}\n\n\tClipperLib.Clipper.prototype.Area$1 = function (outRec)\n\t{\n\t\treturn this.Area(outRec.Pts);\n\t};\n\n\tClipperLib.Clipper.SimplifyPolygon = function (poly, fillType)\n\t{\n\t\tvar result = new Array();\n\t\tvar c = new ClipperLib.Clipper(0);\n\t\tc.StrictlySimple = true;\n\t\tc.AddPath(poly, ClipperLib.PolyType.ptSubject, true);\n\t\tc.Execute(ClipperLib.ClipType.ctUnion, result, fillType, fillType);\n\t\treturn result;\n\t};\n\n\tClipperLib.Clipper.SimplifyPolygons = function (polys, fillType)\n\t{\n\t\tif (typeof (fillType) === \"undefined\") fillType = ClipperLib.PolyFillType.pftEvenOdd;\n\t\tvar result = new Array();\n\t\tvar c = new ClipperLib.Clipper(0);\n\t\tc.StrictlySimple = true;\n\t\tc.AddPaths(polys, ClipperLib.PolyType.ptSubject, true);\n\t\tc.Execute(ClipperLib.ClipType.ctUnion, result, fillType, fillType);\n\t\treturn result;\n\t};\n\n\tClipperLib.Clipper.DistanceSqrd = function (pt1, pt2)\n\t{\n\t\tvar dx = (pt1.X - pt2.X);\n\t\tvar dy = (pt1.Y - pt2.Y);\n\t\treturn (dx * dx + dy * dy);\n\t};\n\n\tClipperLib.Clipper.DistanceFromLineSqrd = function (pt, ln1, ln2)\n\t{\n\t\t//The equation of a line in general form (Ax + By + C = 0)\n\t\t//given 2 points (x\u00B9,y\u00B9) & (x\u00B2,y\u00B2) is ...\n\t\t//(y\u00B9 - y\u00B2)x + (x\u00B2 - x\u00B9)y + (y\u00B2 - y\u00B9)x\u00B9 - (x\u00B2 - x\u00B9)y\u00B9 = 0\n\t\t//A = (y\u00B9 - y\u00B2); B = (x\u00B2 - x\u00B9); C = (y\u00B2 - y\u00B9)x\u00B9 - (x\u00B2 - x\u00B9)y\u00B9\n\t\t//perpendicular distance of point (x\u00B3,y\u00B3) = (Ax\u00B3 + By\u00B3 + C)/Sqrt(A\u00B2 + B\u00B2)\n\t\t//see http://en.wikipedia.org/wiki/Perpendicular_distance\n\t\tvar A = ln1.Y - ln2.Y;\n\t\tvar B = ln2.X - ln1.X;\n\t\tvar C = A * ln1.X + B * ln1.Y;\n\t\tC = A * pt.X + B * pt.Y - C;\n\t\treturn (C * C) / (A * A + B * B);\n\t};\n\n\tClipperLib.Clipper.SlopesNearCollinear = function (pt1, pt2, pt3, distSqrd)\n\t{\n\t\t//this function is more accurate when the point that's GEOMETRICALLY\n\t\t//between the other 2 points is the one that's tested for distance.\n\t\t//nb: with 'spikes', either pt1 or pt3 is geometrically between the other pts\n\t\tif (Math.abs(pt1.X - pt2.X) > Math.abs(pt1.Y - pt2.Y))\n\t\t{\n\t\t\tif ((pt1.X > pt2.X) === (pt1.X < pt3.X))\n\t\t\t\treturn ClipperLib.Clipper.DistanceFromLineSqrd(pt1, pt2, pt3) < distSqrd;\n\t\t\telse if ((pt2.X > pt1.X) === (pt2.X < pt3.X))\n\t\t\t\treturn ClipperLib.Clipper.DistanceFromLineSqrd(pt2, pt1, pt3) < distSqrd;\n\t\t\telse\n\t\t\t\treturn ClipperLib.Clipper.DistanceFromLineSqrd(pt3, pt1, pt2) < distSqrd;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif ((pt1.Y > pt2.Y) === (pt1.Y < pt3.Y))\n\t\t\t\treturn ClipperLib.Clipper.DistanceFromLineSqrd(pt1, pt2, pt3) < distSqrd;\n\t\t\telse if ((pt2.Y > pt1.Y) === (pt2.Y < pt3.Y))\n\t\t\t\treturn ClipperLib.Clipper.DistanceFromLineSqrd(pt2, pt1, pt3) < distSqrd;\n\t\t\telse\n\t\t\t\treturn ClipperLib.Clipper.DistanceFromLineSqrd(pt3, pt1, pt2) < distSqrd;\n\t\t}\n\t}\n\n\tClipperLib.Clipper.PointsAreClose = function (pt1, pt2, distSqrd)\n\t{\n\t\tvar dx = pt1.X - pt2.X;\n\t\tvar dy = pt1.Y - pt2.Y;\n\t\treturn ((dx * dx) + (dy * dy) <= distSqrd);\n\t};\n\n\tClipperLib.Clipper.ExcludeOp = function (op)\n\t{\n\t\tvar result = op.Prev;\n\t\tresult.Next = op.Next;\n\t\top.Next.Prev = result;\n\t\tresult.Idx = 0;\n\t\treturn result;\n\t};\n\n\tClipperLib.Clipper.CleanPolygon = function (path, distance)\n\t{\n\t\tif (typeof (distance) === \"undefined\") distance = 1.415;\n\t\t//distance = proximity in units/pixels below which vertices will be stripped.\n\t\t//Default ~= sqrt(2) so when adjacent vertices or semi-adjacent vertices have\n\t\t//both x & y coords within 1 unit, then the second vertex will be stripped.\n\t\tvar cnt = path.length;\n\t\tif (cnt === 0)\n\t\t\treturn new Array();\n\t\tvar outPts = new Array(cnt);\n\t\tfor (var i = 0; i < cnt; ++i)\n\t\t\toutPts[i] = new ClipperLib.OutPt();\n\t\tfor (var i = 0; i < cnt; ++i)\n\t\t{\n\t\t\toutPts[i].Pt = path[i];\n\t\t\toutPts[i].Next = outPts[(i + 1) % cnt];\n\t\t\toutPts[i].Next.Prev = outPts[i];\n\t\t\toutPts[i].Idx = 0;\n\t\t}\n\t\tvar distSqrd = distance * distance;\n\t\tvar op = outPts[0];\n\t\twhile (op.Idx === 0 && op.Next !== op.Prev)\n\t\t{\n\t\t\tif (ClipperLib.Clipper.PointsAreClose(op.Pt, op.Prev.Pt, distSqrd))\n\t\t\t{\n\t\t\t\top = ClipperLib.Clipper.ExcludeOp(op);\n\t\t\t\tcnt--;\n\t\t\t}\n\t\t\telse if (ClipperLib.Clipper.PointsAreClose(op.Prev.Pt, op.Next.Pt, distSqrd))\n\t\t\t{\n\t\t\t\tClipperLib.Clipper.ExcludeOp(op.Next);\n\t\t\t\top = ClipperLib.Clipper.ExcludeOp(op);\n\t\t\t\tcnt -= 2;\n\t\t\t}\n\t\t\telse if (ClipperLib.Clipper.SlopesNearCollinear(op.Prev.Pt, op.Pt, op.Next.Pt, distSqrd))\n\t\t\t{\n\t\t\t\top = ClipperLib.Clipper.ExcludeOp(op);\n\t\t\t\tcnt--;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\top.Idx = 1;\n\t\t\t\top = op.Next;\n\t\t\t}\n\t\t}\n\t\tif (cnt < 3)\n\t\t\tcnt = 0;\n\t\tvar result = new Array(cnt);\n\t\tfor (var i = 0; i < cnt; ++i)\n\t\t{\n\t\t\tresult[i] = new ClipperLib.IntPoint1(op.Pt);\n\t\t\top = op.Next;\n\t\t}\n\t\toutPts = null;\n\t\treturn result;\n\t};\n\n\tClipperLib.Clipper.CleanPolygons = function (polys, distance)\n\t{\n\t\tvar result = new Array(polys.length);\n\t\tfor (var i = 0, ilen = polys.length; i < ilen; i++)\n\t\t\tresult[i] = ClipperLib.Clipper.CleanPolygon(polys[i], distance);\n\t\treturn result;\n\t};\n\n\tClipperLib.Clipper.Minkowski = function (pattern, path, IsSum, IsClosed)\n\t{\n\t\tvar delta = (IsClosed ? 1 : 0);\n\t\tvar polyCnt = pattern.length;\n\t\tvar pathCnt = path.length;\n\t\tvar result = new Array();\n\t\tif (IsSum)\n\t\t\tfor (var i = 0; i < pathCnt; i++)\n\t\t\t{\n\t\t\t\tvar p = new Array(polyCnt);\n\t\t\t\tfor (var j = 0, jlen = pattern.length, ip = pattern[j]; j < jlen; j++, ip = pattern[j])\n\t\t\t\t\tp[j] = new ClipperLib.IntPoint2(path[i].X + ip.X, path[i].Y + ip.Y);\n\t\t\t\tresult.push(p);\n\t\t\t}\n\t\telse\n\t\t\tfor (var i = 0; i < pathCnt; i++)\n\t\t\t{\n\t\t\t\tvar p = new Array(polyCnt);\n\t\t\t\tfor (var j = 0, jlen = pattern.length, ip = pattern[j]; j < jlen; j++, ip = pattern[j])\n\t\t\t\t\tp[j] = new ClipperLib.IntPoint2(path[i].X - ip.X, path[i].Y - ip.Y);\n\t\t\t\tresult.push(p);\n\t\t\t}\n\t\tvar quads = new Array();\n\t\tfor (var i = 0; i < pathCnt - 1 + delta; i++)\n\t\t\tfor (var j = 0; j < polyCnt; j++)\n\t\t\t{\n\t\t\t\tvar quad = new Array();\n\t\t\t\tquad.push(result[i % pathCnt][j % polyCnt]);\n\t\t\t\tquad.push(result[(i + 1) % pathCnt][j % polyCnt]);\n\t\t\t\tquad.push(result[(i + 1) % pathCnt][(j + 1) % polyCnt]);\n\t\t\t\tquad.push(result[i % pathCnt][(j + 1) % polyCnt]);\n\t\t\t\tif (!ClipperLib.Clipper.Orientation(quad))\n\t\t\t\t\tquad.reverse();\n\t\t\t\tquads.push(quad);\n\t\t\t}\n\t\treturn quads;\n\t};\n\n\tClipperLib.Clipper.MinkowskiSum = function (pattern, path_or_paths, pathIsClosed)\n\t{\n\t\tif (!(path_or_paths[0] instanceof Array))\n\t\t{\n\t\t\tvar path = path_or_paths;\n\t\t\tvar paths = ClipperLib.Clipper.Minkowski(pattern, path, true, pathIsClosed);\n\t\t\tvar c = new ClipperLib.Clipper();\n\t\t\tc.AddPaths(paths, ClipperLib.PolyType.ptSubject, true);\n\t\t\tc.Execute(ClipperLib.ClipType.ctUnion, paths, ClipperLib.PolyFillType.pftNonZero, ClipperLib.PolyFillType.pftNonZero);\n\t\t\treturn paths;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tvar paths = path_or_paths;\n\t\t\tvar solution = new ClipperLib.Paths();\n\t\t\tvar c = new ClipperLib.Clipper();\n\t\t\tfor (var i = 0; i < paths.length; ++i)\n\t\t\t{\n\t\t\t\tvar tmp = ClipperLib.Clipper.Minkowski(pattern, paths[i], true, pathIsClosed);\n\t\t\t\tc.AddPaths(tmp, ClipperLib.PolyType.ptSubject, true);\n\t\t\t\tif (pathIsClosed)\n\t\t\t\t{\n\t\t\t\t\tvar path = ClipperLib.Clipper.TranslatePath(paths[i], pattern[0]);\n\t\t\t\t\tc.AddPath(path, ClipperLib.PolyType.ptClip, true);\n\t\t\t\t}\n\t\t\t}\n\t\t\tc.Execute(ClipperLib.ClipType.ctUnion, solution,\n\t\t\t\tClipperLib.PolyFillType.pftNonZero, ClipperLib.PolyFillType.pftNonZero);\n\t\t\treturn solution;\n\t\t}\n\t}\n\n\tClipperLib.Clipper.TranslatePath = function (path, delta)\n\t{\n\t\tvar outPath = new ClipperLib.Path();\n\t\tfor (var i = 0; i < path.length; i++)\n\t\t\toutPath.push(new ClipperLib.IntPoint2(path[i].X + delta.X, path[i].Y + delta.Y));\n\t\treturn outPath;\n\t}\n\n\tClipperLib.Clipper.MinkowskiDiff = function (poly1, poly2)\n\t{\n\t\tvar paths = ClipperLib.Clipper.Minkowski(poly1, poly2, false, true);\n\t\tvar c = new ClipperLib.Clipper();\n\t\tc.AddPaths(paths, ClipperLib.PolyType.ptSubject, true);\n\t\tc.Execute(ClipperLib.ClipType.ctUnion, paths, ClipperLib.PolyFillType.pftNonZero, ClipperLib.PolyFillType.pftNonZero);\n\t\treturn paths;\n\t}\n\n\tClipperLib.Clipper.PolyTreeToPaths = function (polytree)\n\t{\n\t\tvar result = new Array();\n\t\t//result.set_Capacity(polytree.get_Total());\n\t\tClipperLib.Clipper.AddPolyNodeToPaths(polytree, ClipperLib.Clipper.NodeType.ntAny, result);\n\t\treturn result;\n\t};\n\n\tClipperLib.Clipper.AddPolyNodeToPaths = function (polynode, nt, paths)\n\t{\n\t\tvar match = true;\n\t\tswitch (nt)\n\t\t{\n\t\tcase ClipperLib.Clipper.NodeType.ntOpen:\n\t\t\treturn;\n\t\tcase ClipperLib.Clipper.NodeType.ntClosed:\n\t\t\tmatch = !polynode.IsOpen;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\tif (polynode.m_polygon.length > 0 && match)\n\t\t\tpaths.push(polynode.m_polygon);\n\t\tfor (var $i3 = 0, $t3 = polynode.Childs(), $l3 = $t3.length, pn = $t3[$i3]; $i3 < $l3; $i3++, pn = $t3[$i3])\n\t\t\tClipperLib.Clipper.AddPolyNodeToPaths(pn, nt, paths);\n\t};\n\n\tClipperLib.Clipper.OpenPathsFromPolyTree = function (polytree)\n\t{\n\t\tvar result = new ClipperLib.Paths();\n\t\t//result.set_Capacity(polytree.ChildCount());\n\t\tfor (var i = 0, ilen = polytree.ChildCount(); i < ilen; i++)\n\t\t\tif (polytree.Childs()[i].IsOpen)\n\t\t\t\tresult.push(polytree.Childs()[i].m_polygon);\n\t\treturn result;\n\t};\n\n\tClipperLib.Clipper.ClosedPathsFromPolyTree = function (polytree)\n\t{\n\t\tvar result = new ClipperLib.Paths();\n\t\t//result.set_Capacity(polytree.Total());\n\t\tClipperLib.Clipper.AddPolyNodeToPaths(polytree, ClipperLib.Clipper.NodeType.ntClosed, result);\n\t\treturn result;\n\t};\n\n\tInherit(ClipperLib.Clipper, ClipperLib.ClipperBase);\n\tClipperLib.Clipper.NodeType = {\n\t\tntAny: 0,\n\t\tntOpen: 1,\n\t\tntClosed: 2\n\t};\n\n\t/**\n\t* @constructor\n\t*/\n\tClipperLib.ClipperOffset = function (miterLimit, arcTolerance)\n\t{\n\t\tif (typeof (miterLimit) === \"undefined\") miterLimit = 2;\n\t\tif (typeof (arcTolerance) === \"undefined\") arcTolerance = ClipperLib.ClipperOffset.def_arc_tolerance;\n\t\tthis.m_destPolys = new ClipperLib.Paths();\n\t\tthis.m_srcPoly = new ClipperLib.Path();\n\t\tthis.m_destPoly = new ClipperLib.Path();\n\t\tthis.m_normals = new Array();\n\t\tthis.m_delta = 0;\n\t\tthis.m_sinA = 0;\n\t\tthis.m_sin = 0;\n\t\tthis.m_cos = 0;\n\t\tthis.m_miterLim = 0;\n\t\tthis.m_StepsPerRad = 0;\n\t\tthis.m_lowest = new ClipperLib.IntPoint0();\n\t\tthis.m_polyNodes = new ClipperLib.PolyNode();\n\t\tthis.MiterLimit = miterLimit;\n\t\tthis.ArcTolerance = arcTolerance;\n\t\tthis.m_lowest.X = -1;\n\t};\n\n\tClipperLib.ClipperOffset.two_pi = 6.28318530717959;\n\tClipperLib.ClipperOffset.def_arc_tolerance = 0.25;\n\tClipperLib.ClipperOffset.prototype.Clear = function ()\n\t{\n\t\tClipperLib.Clear(this.m_polyNodes.Childs());\n\t\tthis.m_lowest.X = -1;\n\t};\n\n\tClipperLib.ClipperOffset.Round = ClipperLib.Clipper.Round;\n\tClipperLib.ClipperOffset.prototype.AddPath = function (path, joinType, endType)\n\t{\n\t\tvar highI = path.length - 1;\n\t\tif (highI < 0)\n\t\t\treturn;\n\t\tvar newNode = new ClipperLib.PolyNode();\n\t\tnewNode.m_jointype = joinType;\n\t\tnewNode.m_endtype = endType;\n\t\t//strip duplicate points from path and also get index to the lowest point ...\n\t\tif (endType === ClipperLib.EndType.etClosedLine || endType === ClipperLib.EndType.etClosedPolygon)\n\t\t\twhile (highI > 0 && ClipperLib.IntPoint.op_Equality(path[0], path[highI]))\n\t\t\t\thighI--;\n\t\t//newNode.m_polygon.set_Capacity(highI + 1);\n\t\tnewNode.m_polygon.push(path[0]);\n\t\tvar j = 0,\n\t\t\tk = 0;\n\t\tfor (var i = 1; i <= highI; i++)\n\t\t\tif (ClipperLib.IntPoint.op_Inequality(newNode.m_polygon[j], path[i]))\n\t\t\t{\n\t\t\t\tj++;\n\t\t\t\tnewNode.m_polygon.push(path[i]);\n\t\t\t\tif (path[i].Y > newNode.m_polygon[k].Y || (path[i].Y === newNode.m_polygon[k].Y && path[i].X < newNode.m_polygon[k].X))\n\t\t\t\t\tk = j;\n\t\t\t}\n\t\tif (endType === ClipperLib.EndType.etClosedPolygon && j < 2) return;\n\n\t\tthis.m_polyNodes.AddChild(newNode);\n\t\t//if this path's lowest pt is lower than all the others then update m_lowest\n\t\tif (endType !== ClipperLib.EndType.etClosedPolygon)\n\t\t\treturn;\n\t\tif (this.m_lowest.X < 0)\n\t\t\tthis.m_lowest = new ClipperLib.IntPoint2(this.m_polyNodes.ChildCount() - 1, k);\n\t\telse\n\t\t{\n\t\t\tvar ip = this.m_polyNodes.Childs()[this.m_lowest.X].m_polygon[this.m_lowest.Y];\n\t\t\tif (newNode.m_polygon[k].Y > ip.Y || (newNode.m_polygon[k].Y === ip.Y && newNode.m_polygon[k].X < ip.X))\n\t\t\t\tthis.m_lowest = new ClipperLib.IntPoint2(this.m_polyNodes.ChildCount() - 1, k);\n\t\t}\n\t};\n\n\tClipperLib.ClipperOffset.prototype.AddPaths = function (paths, joinType, endType)\n\t{\n\t\tfor (var i = 0, ilen = paths.length; i < ilen; i++)\n\t\t\tthis.AddPath(paths[i], joinType, endType);\n\t};\n\n\tClipperLib.ClipperOffset.prototype.FixOrientations = function ()\n\t{\n\t\t//fixup orientations of all closed paths if the orientation of the\n\t\t//closed path with the lowermost vertex is wrong ...\n\t\tif (this.m_lowest.X >= 0 && !ClipperLib.Clipper.Orientation(this.m_polyNodes.Childs()[this.m_lowest.X].m_polygon))\n\t\t{\n\t\t\tfor (var i = 0; i < this.m_polyNodes.ChildCount(); i++)\n\t\t\t{\n\t\t\t\tvar node = this.m_polyNodes.Childs()[i];\n\t\t\t\tif (node.m_endtype === ClipperLib.EndType.etClosedPolygon || (node.m_endtype === ClipperLib.EndType.etClosedLine && ClipperLib.Clipper.Orientation(node.m_polygon)))\n\t\t\t\t\tnode.m_polygon.reverse();\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfor (var i = 0; i < this.m_polyNodes.ChildCount(); i++)\n\t\t\t{\n\t\t\t\tvar node = this.m_polyNodes.Childs()[i];\n\t\t\t\tif (node.m_endtype === ClipperLib.EndType.etClosedLine && !ClipperLib.Clipper.Orientation(node.m_polygon))\n\t\t\t\t\tnode.m_polygon.reverse();\n\t\t\t}\n\t\t}\n\t};\n\n\tClipperLib.ClipperOffset.GetUnitNormal = function (pt1, pt2)\n\t{\n\t\tvar dx = (pt2.X - pt1.X);\n\t\tvar dy = (pt2.Y - pt1.Y);\n\t\tif ((dx === 0) && (dy === 0))\n\t\t\treturn new ClipperLib.DoublePoint2(0, 0);\n\t\tvar f = 1 / Math.sqrt(dx * dx + dy * dy);\n\t\tdx *= f;\n\t\tdy *= f;\n\t\treturn new ClipperLib.DoublePoint2(dy, -dx);\n\t};\n\n\tClipperLib.ClipperOffset.prototype.DoOffset = function (delta)\n\t{\n\t\tthis.m_destPolys = new Array();\n\t\tthis.m_delta = delta;\n\t\t//if Zero offset, just copy any CLOSED polygons to m_p and return ...\n\t\tif (ClipperLib.ClipperBase.near_zero(delta))\n\t\t{\n\t\t\t//this.m_destPolys.set_Capacity(this.m_polyNodes.ChildCount);\n\t\t\tfor (var i = 0; i < this.m_polyNodes.ChildCount(); i++)\n\t\t\t{\n\t\t\t\tvar node = this.m_polyNodes.Childs()[i];\n\t\t\t\tif (node.m_endtype === ClipperLib.EndType.etClosedPolygon)\n\t\t\t\t\tthis.m_destPolys.push(node.m_polygon);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t//see offset_triginometry3.svg in the documentation folder ...\n\t\tif (this.MiterLimit > 2)\n\t\t\tthis.m_miterLim = 2 / (this.MiterLimit * this.MiterLimit);\n\t\telse\n\t\t\tthis.m_miterLim = 0.5;\n\t\tvar y;\n\t\tif (this.ArcTolerance <= 0)\n\t\t\ty = ClipperLib.ClipperOffset.def_arc_tolerance;\n\t\telse if (this.ArcTolerance > Math.abs(delta) * ClipperLib.ClipperOffset.def_arc_tolerance)\n\t\t\ty = Math.abs(delta) * ClipperLib.ClipperOffset.def_arc_tolerance;\n\t\telse\n\t\t\ty = this.ArcTolerance;\n\t\t//see offset_triginometry2.svg in the documentation folder ...\n\t\tvar steps = 3.14159265358979 / Math.acos(1 - y / Math.abs(delta));\n\t\tthis.m_sin = Math.sin(ClipperLib.ClipperOffset.two_pi / steps);\n\t\tthis.m_cos = Math.cos(ClipperLib.ClipperOffset.two_pi / steps);\n\t\tthis.m_StepsPerRad = steps / ClipperLib.ClipperOffset.two_pi;\n\t\tif (delta < 0)\n\t\t\tthis.m_sin = -this.m_sin;\n\t\t//this.m_destPolys.set_Capacity(this.m_polyNodes.ChildCount * 2);\n\t\tfor (var i = 0; i < this.m_polyNodes.ChildCount(); i++)\n\t\t{\n\t\t\tvar node = this.m_polyNodes.Childs()[i];\n\t\t\tthis.m_srcPoly = node.m_polygon;\n\t\t\tvar len = this.m_srcPoly.length;\n\t\t\tif (len === 0 || (delta <= 0 && (len < 3 || node.m_endtype !== ClipperLib.EndType.etClosedPolygon)))\n\t\t\t\tcontinue;\n\t\t\tthis.m_destPoly = new Array();\n\t\t\tif (len === 1)\n\t\t\t{\n\t\t\t\tif (node.m_jointype === ClipperLib.JoinType.jtRound)\n\t\t\t\t{\n\t\t\t\t\tvar X = 1,\n\t\t\t\t\t\tY = 0;\n\t\t\t\t\tfor (var j = 1; j <= steps; j++)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.m_destPoly.push(new ClipperLib.IntPoint2(ClipperLib.ClipperOffset.Round(this.m_srcPoly[0].X + X * delta), ClipperLib.ClipperOffset.Round(this.m_srcPoly[0].Y + Y * delta)));\n\t\t\t\t\t\tvar X2 = X;\n\t\t\t\t\t\tX = X * this.m_cos - this.m_sin * Y;\n\t\t\t\t\t\tY = X2 * this.m_sin + Y * this.m_cos;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tvar X = -1,\n\t\t\t\t\t\tY = -1;\n\t\t\t\t\tfor (var j = 0; j < 4; ++j)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.m_destPoly.push(new ClipperLib.IntPoint2(ClipperLib.ClipperOffset.Round(this.m_srcPoly[0].X + X * delta), ClipperLib.ClipperOffset.Round(this.m_srcPoly[0].Y + Y * delta)));\n\t\t\t\t\t\tif (X < 0)\n\t\t\t\t\t\t\tX = 1;\n\t\t\t\t\t\telse if (Y < 0)\n\t\t\t\t\t\t\tY = 1;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tX = -1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.m_destPolys.push(this.m_destPoly);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t//build m_normals ...\n\t\t\tthis.m_normals.length = 0;\n\t\t\t//this.m_normals.set_Capacity(len);\n\t\t\tfor (var j = 0; j < len - 1; j++)\n\t\t\t\tthis.m_normals.push(ClipperLib.ClipperOffset.GetUnitNormal(this.m_srcPoly[j], this.m_srcPoly[j + 1]));\n\t\t\tif (node.m_endtype === ClipperLib.EndType.etClosedLine || node.m_endtype === ClipperLib.EndType.etClosedPolygon)\n\t\t\t\tthis.m_normals.push(ClipperLib.ClipperOffset.GetUnitNormal(this.m_srcPoly[len - 1], this.m_srcPoly[0]));\n\t\t\telse\n\t\t\t\tthis.m_normals.push(new ClipperLib.DoublePoint1(this.m_normals[len - 2]));\n\t\t\tif (node.m_endtype === ClipperLib.EndType.etClosedPolygon)\n\t\t\t{\n\t\t\t\tvar k = len - 1;\n\t\t\t\tfor (var j = 0; j < len; j++)\n\t\t\t\t\tk = this.OffsetPoint(j, k, node.m_jointype);\n\t\t\t\tthis.m_destPolys.push(this.m_destPoly);\n\t\t\t}\n\t\t\telse if (node.m_endtype === ClipperLib.EndType.etClosedLine)\n\t\t\t{\n\t\t\t\tvar k = len - 1;\n\t\t\t\tfor (var j = 0; j < len; j++)\n\t\t\t\t\tk = this.OffsetPoint(j, k, node.m_jointype);\n\t\t\t\tthis.m_destPolys.push(this.m_destPoly);\n\t\t\t\tthis.m_destPoly = new Array();\n\t\t\t\t//re-build m_normals ...\n\t\t\t\tvar n = this.m_normals[len - 1];\n\t\t\t\tfor (var j = len - 1; j > 0; j--)\n\t\t\t\t\tthis.m_normals[j] = new ClipperLib.DoublePoint2(-this.m_normals[j - 1].X, -this.m_normals[j - 1].Y);\n\t\t\t\tthis.m_normals[0] = new ClipperLib.DoublePoint2(-n.X, -n.Y);\n\t\t\t\tk = 0;\n\t\t\t\tfor (var j = len - 1; j >= 0; j--)\n\t\t\t\t\tk = this.OffsetPoint(j, k, node.m_jointype);\n\t\t\t\tthis.m_destPolys.push(this.m_destPoly);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tvar k = 0;\n\t\t\t\tfor (var j = 1; j < len - 1; ++j)\n\t\t\t\t\tk = this.OffsetPoint(j, k, node.m_jointype);\n\t\t\t\tvar pt1;\n\t\t\t\tif (node.m_endtype === ClipperLib.EndType.etOpenButt)\n\t\t\t\t{\n\t\t\t\t\tvar j = len - 1;\n\t\t\t\t\tpt1 = new ClipperLib.IntPoint2(ClipperLib.ClipperOffset.Round(this.m_srcPoly[j].X + this.m_normals[j].X * delta), ClipperLib.ClipperOffset.Round(this.m_srcPoly[j].Y + this.m_normals[j].Y * delta));\n\t\t\t\t\tthis.m_destPoly.push(pt1);\n\t\t\t\t\tpt1 = new ClipperLib.IntPoint2(ClipperLib.ClipperOffset.Round(this.m_srcPoly[j].X - this.m_normals[j].X * delta), ClipperLib.ClipperOffset.Round(this.m_srcPoly[j].Y - this.m_normals[j].Y * delta));\n\t\t\t\t\tthis.m_destPoly.push(pt1);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tvar j = len - 1;\n\t\t\t\t\tk = len - 2;\n\t\t\t\t\tthis.m_sinA = 0;\n\t\t\t\t\tthis.m_normals[j] = new ClipperLib.DoublePoint2(-this.m_normals[j].X, -this.m_normals[j].Y);\n\t\t\t\t\tif (node.m_endtype === ClipperLib.EndType.etOpenSquare)\n\t\t\t\t\t\tthis.DoSquare(j, k);\n\t\t\t\t\telse\n\t\t\t\t\t\tthis.DoRound(j, k);\n\t\t\t\t}\n\t\t\t\t//re-build m_normals ...\n\t\t\t\tfor (var j = len - 1; j > 0; j--)\n\t\t\t\t\tthis.m_normals[j] = new ClipperLib.DoublePoint2(-this.m_normals[j - 1].X, -this.m_normals[j - 1].Y);\n\t\t\t\tthis.m_normals[0] = new ClipperLib.DoublePoint2(-this.m_normals[1].X, -this.m_normals[1].Y);\n\t\t\t\tk = len - 1;\n\t\t\t\tfor (var j = k - 1; j > 0; --j)\n\t\t\t\t\tk = this.OffsetPoint(j, k, node.m_jointype);\n\t\t\t\tif (node.m_endtype === ClipperLib.EndType.etOpenButt)\n\t\t\t\t{\n\t\t\t\t\tpt1 = new ClipperLib.IntPoint2(ClipperLib.ClipperOffset.Round(this.m_srcPoly[0].X - this.m_normals[0].X * delta), ClipperLib.ClipperOffset.Round(this.m_srcPoly[0].Y - this.m_normals[0].Y * delta));\n\t\t\t\t\tthis.m_destPoly.push(pt1);\n\t\t\t\t\tpt1 = new ClipperLib.IntPoint2(ClipperLib.ClipperOffset.Round(this.m_srcPoly[0].X + this.m_normals[0].X * delta), ClipperLib.ClipperOffset.Round(this.m_srcPoly[0].Y + this.m_normals[0].Y * delta));\n\t\t\t\t\tthis.m_destPoly.push(pt1);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tk = 1;\n\t\t\t\t\tthis.m_sinA = 0;\n\t\t\t\t\tif (node.m_endtype === ClipperLib.EndType.etOpenSquare)\n\t\t\t\t\t\tthis.DoSquare(0, 1);\n\t\t\t\t\telse\n\t\t\t\t\t\tthis.DoRound(0, 1);\n\t\t\t\t}\n\t\t\t\tthis.m_destPolys.push(this.m_destPoly);\n\t\t\t}\n\t\t}\n\t};\n\n\tClipperLib.ClipperOffset.prototype.Execute = function ()\n\t{\n\t\tvar a = arguments,\n\t\t\tispolytree = a[0] instanceof ClipperLib.PolyTree;\n\t\tif (!ispolytree) // function (solution, delta)\n\t\t{\n\t\t\tvar solution = a[0],\n\t\t\t\tdelta = a[1];\n\t\t\tClipperLib.Clear(solution);\n\t\t\tthis.FixOrientations();\n\t\t\tthis.DoOffset(delta);\n\t\t\t//now clean up 'corners' ...\n\t\t\tvar clpr = new ClipperLib.Clipper(0);\n\t\t\tclpr.AddPaths(this.m_destPolys, ClipperLib.PolyType.ptSubject, true);\n\t\t\tif (delta > 0)\n\t\t\t{\n\t\t\t\tclpr.Execute(ClipperLib.ClipType.ctUnion, solution, ClipperLib.PolyFillType.pftPositive, ClipperLib.PolyFillType.pftPositive);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tvar r = ClipperLib.Clipper.GetBounds(this.m_destPolys);\n\t\t\t\tvar outer = new ClipperLib.Path();\n\t\t\t\touter.push(new ClipperLib.IntPoint2(r.left - 10, r.bottom + 10));\n\t\t\t\touter.push(new ClipperLib.IntPoint2(r.right + 10, r.bottom + 10));\n\t\t\t\touter.push(new ClipperLib.IntPoint2(r.right + 10, r.top - 10));\n\t\t\t\touter.push(new ClipperLib.IntPoint2(r.left - 10, r.top - 10));\n\t\t\t\tclpr.AddPath(outer, ClipperLib.PolyType.ptSubject, true);\n\t\t\t\tclpr.ReverseSolution = true;\n\t\t\t\tclpr.Execute(ClipperLib.ClipType.ctUnion, solution, ClipperLib.PolyFillType.pftNegative, ClipperLib.PolyFillType.pftNegative);\n\t\t\t\tif (solution.length > 0)\n\t\t\t\t\tsolution.splice(0, 1);\n\t\t\t}\n\t\t\t//console.log(JSON.stringify(solution));\n\t\t}\n\t\telse // function (polytree, delta)\n\t\t{\n\t\t\tvar solution = a[0],\n\t\t\t\tdelta = a[1];\n\t\t\tsolution.Clear();\n\t\t\tthis.FixOrientations();\n\t\t\tthis.DoOffset(delta);\n\t\t\t//now clean up 'corners' ...\n\t\t\tvar clpr = new ClipperLib.Clipper(0);\n\t\t\tclpr.AddPaths(this.m_destPolys, ClipperLib.PolyType.ptSubject, true);\n\t\t\tif (delta > 0)\n\t\t\t{\n\t\t\t\tclpr.Execute(ClipperLib.ClipType.ctUnion, solution, ClipperLib.PolyFillType.pftPositive, ClipperLib.PolyFillType.pftPositive);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tvar r = ClipperLib.Clipper.GetBounds(this.m_destPolys);\n\t\t\t\tvar outer = new ClipperLib.Path();\n\t\t\t\touter.push(new ClipperLib.IntPoint2(r.left - 10, r.bottom + 10));\n\t\t\t\touter.push(new ClipperLib.IntPoint2(r.right + 10, r.bottom + 10));\n\t\t\t\touter.push(new ClipperLib.IntPoint2(r.right + 10, r.top - 10));\n\t\t\t\touter.push(new ClipperLib.IntPoint2(r.left - 10, r.top - 10));\n\t\t\t\tclpr.AddPath(outer, ClipperLib.PolyType.ptSubject, true);\n\t\t\t\tclpr.ReverseSolution = true;\n\t\t\t\tclpr.Execute(ClipperLib.ClipType.ctUnion, solution, ClipperLib.PolyFillType.pftNegative, ClipperLib.PolyFillType.pftNegative);\n\t\t\t\t//remove the outer PolyNode rectangle ...\n\t\t\t\tif (solution.ChildCount() === 1 && solution.Childs()[0].ChildCount() > 0)\n\t\t\t\t{\n\t\t\t\t\tvar outerNode = solution.Childs()[0];\n\t\t\t\t\t//solution.Childs.set_Capacity(outerNode.ChildCount);\n\t\t\t\t\tsolution.Childs()[0] = outerNode.Childs()[0];\n\t\t\t\t\tsolution.Childs()[0].m_Parent = solution;\n\t\t\t\t\tfor (var i = 1; i < outerNode.ChildCount(); i++)\n\t\t\t\t\t\tsolution.AddChild(outerNode.Childs()[i]);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tsolution.Clear();\n\t\t\t}\n\t\t}\n\t};\n\n\tClipperLib.ClipperOffset.prototype.OffsetPoint = function (j, k, jointype)\n\t{\n\t\t//cross product ...\n\t\tthis.m_sinA = (this.m_normals[k].X * this.m_normals[j].Y - this.m_normals[j].X * this.m_normals[k].Y);\n\n\t\tif (Math.abs(this.m_sinA * this.m_delta) < 1.0)\n\t\t{\n\t\t\t//dot product ...\n\t\t\tvar cosA = (this.m_normals[k].X * this.m_normals[j].X + this.m_normals[j].Y * this.m_normals[k].Y);\n\t\t\tif (cosA > 0) // angle ==> 0 degrees\n\t\t\t{\n\t\t\t\tthis.m_destPoly.push(new ClipperLib.IntPoint2(ClipperLib.ClipperOffset.Round(this.m_srcPoly[j].X + this.m_normals[k].X * this.m_delta),\n\t\t\t\t\tClipperLib.ClipperOffset.Round(this.m_srcPoly[j].Y + this.m_normals[k].Y * this.m_delta)));\n\t\t\t\treturn k;\n\t\t\t}\n\t\t\t//else angle ==> 180 degrees\n\t\t}\n\t\telse if (this.m_sinA > 1)\n\t\t\tthis.m_sinA = 1.0;\n\t\telse if (this.m_sinA < -1)\n\t\t\tthis.m_sinA = -1.0;\n\t\tif (this.m_sinA * this.m_delta < 0)\n\t\t{\n\t\t\tthis.m_destPoly.push(new ClipperLib.IntPoint2(ClipperLib.ClipperOffset.Round(this.m_srcPoly[j].X + this.m_normals[k].X * this.m_delta),\n\t\t\t\tClipperLib.ClipperOffset.Round(this.m_srcPoly[j].Y + this.m_normals[k].Y * this.m_delta)));\n\t\t\tthis.m_destPoly.push(new ClipperLib.IntPoint1(this.m_srcPoly[j]));\n\t\t\tthis.m_destPoly.push(new ClipperLib.IntPoint2(ClipperLib.ClipperOffset.Round(this.m_srcPoly[j].X + this.m_normals[j].X * this.m_delta),\n\t\t\t\tClipperLib.ClipperOffset.Round(this.m_srcPoly[j].Y + this.m_normals[j].Y * this.m_delta)));\n\t\t}\n\t\telse\n\t\t\tswitch (jointype)\n\t\t\t{\n\t\t\tcase ClipperLib.JoinType.jtMiter:\n\t\t\t\t{\n\t\t\t\t\tvar r = 1 + (this.m_normals[j].X * this.m_normals[k].X + this.m_normals[j].Y * this.m_normals[k].Y);\n\t\t\t\t\tif (r >= this.m_miterLim)\n\t\t\t\t\t\tthis.DoMiter(j, k, r);\n\t\t\t\t\telse\n\t\t\t\t\t\tthis.DoSquare(j, k);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tcase ClipperLib.JoinType.jtSquare:\n\t\t\t\tthis.DoSquare(j, k);\n\t\t\t\tbreak;\n\t\t\tcase ClipperLib.JoinType.jtRound:\n\t\t\t\tthis.DoRound(j, k);\n\t\t\t\tbreak;\n\t\t\t}\n\t\tk = j;\n\t\treturn k;\n\t};\n\n\tClipperLib.ClipperOffset.prototype.DoSquare = function (j, k)\n\t{\n\t\tvar dx = Math.tan(Math.atan2(this.m_sinA,\n\t\t\tthis.m_normals[k].X * this.m_normals[j].X + this.m_normals[k].Y * this.m_normals[j].Y) / 4);\n\t\tthis.m_destPoly.push(new ClipperLib.IntPoint2(\n\t\t\tClipperLib.ClipperOffset.Round(this.m_srcPoly[j].X + this.m_delta * (this.m_normals[k].X - this.m_normals[k].Y * dx)),\n\t\t\tClipperLib.ClipperOffset.Round(this.m_srcPoly[j].Y + this.m_delta * (this.m_normals[k].Y + this.m_normals[k].X * dx))));\n\t\tthis.m_destPoly.push(new ClipperLib.IntPoint2(\n\t\t\tClipperLib.ClipperOffset.Round(this.m_srcPoly[j].X + this.m_delta * (this.m_normals[j].X + this.m_normals[j].Y * dx)),\n\t\t\tClipperLib.ClipperOffset.Round(this.m_srcPoly[j].Y + this.m_delta * (this.m_normals[j].Y - this.m_normals[j].X * dx))));\n\t};\n\n\tClipperLib.ClipperOffset.prototype.DoMiter = function (j, k, r)\n\t{\n\t\tvar q = this.m_delta / r;\n\t\tthis.m_destPoly.push(new ClipperLib.IntPoint2(\n\t\t\tClipperLib.ClipperOffset.Round(this.m_srcPoly[j].X + (this.m_normals[k].X + this.m_normals[j].X) * q),\n\t\t\tClipperLib.ClipperOffset.Round(this.m_srcPoly[j].Y + (this.m_normals[k].Y + this.m_normals[j].Y) * q)));\n\t};\n\n\tClipperLib.ClipperOffset.prototype.DoRound = function (j, k)\n\t{\n\t\tvar a = Math.atan2(this.m_sinA,\n\t\t\tthis.m_normals[k].X * this.m_normals[j].X + this.m_normals[k].Y * this.m_normals[j].Y);\n\n\t\tvar steps = Math.max(ClipperLib.Cast_Int32(ClipperLib.ClipperOffset.Round(this.m_StepsPerRad * Math.abs(a))), 1);\n\n\t\tvar X = this.m_normals[k].X,\n\t\t\tY = this.m_normals[k].Y,\n\t\t\tX2;\n\t\tfor (var i = 0; i < steps; ++i)\n\t\t{\n\t\t\tthis.m_destPoly.push(new ClipperLib.IntPoint2(\n\t\t\t\tClipperLib.ClipperOffset.Round(this.m_srcPoly[j].X + X * this.m_delta),\n\t\t\t\tClipperLib.ClipperOffset.Round(this.m_srcPoly[j].Y + Y * this.m_delta)));\n\t\t\tX2 = X;\n\t\t\tX = X * this.m_cos - this.m_sin * Y;\n\t\t\tY = X2 * this.m_sin + Y * this.m_cos;\n\t\t}\n\t\tthis.m_destPoly.push(new ClipperLib.IntPoint2(\n\t\t\tClipperLib.ClipperOffset.Round(this.m_srcPoly[j].X + this.m_normals[j].X * this.m_delta),\n\t\t\tClipperLib.ClipperOffset.Round(this.m_srcPoly[j].Y + this.m_normals[j].Y * this.m_delta)));\n\t};\n\n\tClipperLib.Error = function (message)\n\t{\n\t\ttry\n\t\t{\n\t\t\tthrow new Error(message);\n\t\t}\n\t\tcatch (err)\n\t\t{\n\t\t\talert(err.message);\n\t\t}\n\t};\n\n\t// ---------------------------------------------\n\n\t// JS extension by Timo 2013\n\tClipperLib.JS = {};\n\n\tClipperLib.JS.AreaOfPolygon = function (poly, scale)\n\t{\n\t\tif (!scale) scale = 1;\n\t\treturn ClipperLib.Clipper.Area(poly) / (scale * scale);\n\t};\n\n\tClipperLib.JS.AreaOfPolygons = function (poly, scale)\n\t{\n\t\tif (!scale) scale = 1;\n\t\tvar area = 0;\n\t\tfor (var i = 0; i < poly.length; i++)\n\t\t{\n\t\t\tarea += ClipperLib.Clipper.Area(poly[i]);\n\t\t}\n\t\treturn area / (scale * scale);\n\t};\n\n\tClipperLib.JS.BoundsOfPath = function (path, scale)\n\t{\n\t\treturn ClipperLib.JS.BoundsOfPaths([path], scale);\n\t};\n\n\tClipperLib.JS.BoundsOfPaths = function (paths, scale)\n\t{\n\t\tif (!scale) scale = 1;\n\t\tvar bounds = ClipperLib.Clipper.GetBounds(paths);\n\t\tbounds.left /= scale;\n\t\tbounds.bottom /= scale;\n\t\tbounds.right /= scale;\n\t\tbounds.top /= scale;\n\t\treturn bounds;\n\t};\n\n\t// Clean() joins vertices that are too near each other\n\t// and causes distortion to offsetted polygons without cleaning\n\tClipperLib.JS.Clean = function (polygon, delta)\n\t{\n\t\tif (!(polygon instanceof Array)) return [];\n\t\tvar isPolygons = polygon[0] instanceof Array;\n\t\tvar polygon = ClipperLib.JS.Clone(polygon);\n\t\tif (typeof delta !== \"number\" || delta === null)\n\t\t{\n\t\t\tClipperLib.Error(\"Delta is not a number in Clean().\");\n\t\t\treturn polygon;\n\t\t}\n\t\tif (polygon.length === 0 || (polygon.length === 1 && polygon[0].length === 0) || delta < 0) return polygon;\n\t\tif (!isPolygons) polygon = [polygon];\n\t\tvar k_length = polygon.length;\n\t\tvar len, poly, result, d, p, j, i;\n\t\tvar results = [];\n\t\tfor (var k = 0; k < k_length; k++)\n\t\t{\n\t\t\tpoly = polygon[k];\n\t\t\tlen = poly.length;\n\t\t\tif (len === 0) continue;\n\t\t\telse if (len < 3)\n\t\t\t{\n\t\t\t\tresult = poly;\n\t\t\t\tresults.push(result);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tresult = poly;\n\t\t\td = delta * delta;\n\t\t\t//d = Math.floor(c_delta * c_delta);\n\t\t\tp = poly[0];\n\t\t\tj = 1;\n\t\t\tfor (i = 1; i < len; i++)\n\t\t\t{\n\t\t\t\tif ((poly[i].X - p.X) * (poly[i].X - p.X) +\n\t\t\t\t\t(poly[i].Y - p.Y) * (poly[i].Y - p.Y) <= d)\n\t\t\t\t\tcontinue;\n\t\t\t\tresult[j] = poly[i];\n\t\t\t\tp = poly[i];\n\t\t\t\tj++;\n\t\t\t}\n\t\t\tp = poly[j - 1];\n\t\t\tif ((poly[0].X - p.X) * (poly[0].X - p.X) +\n\t\t\t\t(poly[0].Y - p.Y) * (poly[0].Y - p.Y) <= d)\n\t\t\t\tj--;\n\t\t\tif (j < len)\n\t\t\t\tresult.splice(j, len - j);\n\t\t\tif (result.length) results.push(result);\n\t\t}\n\t\tif (!isPolygons && results.length) results = results[0];\n\t\telse if (!isPolygons && results.length === 0) results = [];\n\t\telse if (isPolygons && results.length === 0) results = [\n\t\t\t[]\n\t\t];\n\t\treturn results;\n\t}\n\t// Make deep copy of Polygons or Polygon\n\t// so that also IntPoint objects are cloned and not only referenced\n\t// This should be the fastest way\n\tClipperLib.JS.Clone = function (polygon)\n\t{\n\t\tif (!(polygon instanceof Array)) return [];\n\t\tif (polygon.length === 0) return [];\n\t\telse if (polygon.length === 1 && polygon[0].length === 0) return [\n\t\t\t[]\n\t\t];\n\t\tvar isPolygons = polygon[0] instanceof Array;\n\t\tif (!isPolygons) polygon = [polygon];\n\t\tvar len = polygon.length,\n\t\t\tplen, i, j, result;\n\t\tvar results = new Array(len);\n\t\tfor (i = 0; i < len; i++)\n\t\t{\n\t\t\tplen = polygon[i].length;\n\t\t\tresult = new Array(plen);\n\t\t\tfor (j = 0; j < plen; j++)\n\t\t\t{\n\t\t\t\tresult[j] = {\n\t\t\t\t\tX: polygon[i][j].X,\n\t\t\t\t\tY: polygon[i][j].Y\n\t\t\t\t};\n\n\t\t\t}\n\t\t\tresults[i] = result;\n\t\t}\n\t\tif (!isPolygons) results = results[0];\n\t\treturn results;\n\t};\n\n\t// Removes points that doesn't affect much to the visual appearance.\n\t// If middle point is at or under certain distance (tolerance) of the line segment between\n\t// start and end point, the middle point is removed.\n\tClipperLib.JS.Lighten = function (polygon, tolerance)\n\t{\n\t\tif (!(polygon instanceof Array)) return [];\n\t\tif (typeof tolerance !== \"number\" || tolerance === null)\n\t\t{\n\t\t\tClipperLib.Error(\"Tolerance is not a number in Lighten().\")\n\t\t\treturn ClipperLib.JS.Clone(polygon);\n\t\t}\n\t\tif (polygon.length === 0 || (polygon.length === 1 && polygon[0].length === 0) || tolerance < 0)\n\t\t{\n\t\t\treturn ClipperLib.JS.Clone(polygon);\n\t\t}\n\t\tvar isPolygons = polygon[0] instanceof Array;\n\t\tif (!isPolygons) polygon = [polygon];\n\t\tvar i, j, poly, k, poly2, plen, A, B, P, d, rem, addlast;\n\t\tvar bxax, byay, l, ax, ay;\n\t\tvar len = polygon.length;\n\t\tvar toleranceSq = tolerance * tolerance;\n\t\tvar results = [];\n\t\tfor (i = 0; i < len; i++)\n\t\t{\n\t\t\tpoly = polygon[i];\n\t\t\tplen = poly.length;\n\t\t\tif (plen === 0) continue;\n\t\t\tfor (k = 0; k < 1000000; k++) // could be forever loop, but wiser to restrict max repeat count\n\t\t\t{\n\t\t\t\tpoly2 = [];\n\t\t\t\tplen = poly.length;\n\t\t\t\t// the first have to added to the end, if first and last are not the same\n\t\t\t\t// this way we ensure that also the actual last point can be removed if needed\n\t\t\t\tif (poly[plen - 1].X !== poly[0].X || poly[plen - 1].Y !== poly[0].Y)\n\t\t\t\t{\n\t\t\t\t\taddlast = 1;\n\t\t\t\t\tpoly.push(\n\t\t\t\t\t{\n\t\t\t\t\t\tX: poly[0].X,\n\t\t\t\t\t\tY: poly[0].Y\n\t\t\t\t\t});\n\t\t\t\t\tplen = poly.length;\n\t\t\t\t}\n\t\t\t\telse addlast = 0;\n\t\t\t\trem = []; // Indexes of removed points\n\t\t\t\tfor (j = 0; j < plen - 2; j++)\n\t\t\t\t{\n\t\t\t\t\tA = poly[j]; // Start point of line segment\n\t\t\t\t\tP = poly[j + 1]; // Middle point. This is the one to be removed.\n\t\t\t\t\tB = poly[j + 2]; // End point of line segment\n\t\t\t\t\tax = A.X;\n\t\t\t\t\tay = A.Y;\n\t\t\t\t\tbxax = B.X - ax;\n\t\t\t\t\tbyay = B.Y - ay;\n\t\t\t\t\tif (bxax !== 0 || byay !== 0) // To avoid Nan, when A==P && P==B. And to avoid peaks (A==B && A!=P), which have lenght, but not area.\n\t\t\t\t\t{\n\t\t\t\t\t\tl = ((P.X - ax) * bxax + (P.Y - ay) * byay) / (bxax * bxax + byay * byay);\n\t\t\t\t\t\tif (l > 1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tax = B.X;\n\t\t\t\t\t\t\tay = B.Y;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (l > 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tax += bxax * l;\n\t\t\t\t\t\t\tay += byay * l;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbxax = P.X - ax;\n\t\t\t\t\tbyay = P.Y - ay;\n\t\t\t\t\td = bxax * bxax + byay * byay;\n\t\t\t\t\tif (d <= toleranceSq)\n\t\t\t\t\t{\n\t\t\t\t\t\trem[j + 1] = 1;\n\t\t\t\t\t\tj++; // when removed, transfer the pointer to the next one\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// add all unremoved points to poly2\n\t\t\t\tpoly2.push(\n\t\t\t\t{\n\t\t\t\t\tX: poly[0].X,\n\t\t\t\t\tY: poly[0].Y\n\t\t\t\t});\n\t\t\t\tfor (j = 1; j < plen - 1; j++)\n\t\t\t\t\tif (!rem[j]) poly2.push(\n\t\t\t\t\t{\n\t\t\t\t\t\tX: poly[j].X,\n\t\t\t\t\t\tY: poly[j].Y\n\t\t\t\t\t});\n\t\t\t\tpoly2.push(\n\t\t\t\t{\n\t\t\t\t\tX: poly[plen - 1].X,\n\t\t\t\t\tY: poly[plen - 1].Y\n\t\t\t\t});\n\t\t\t\t// if the first point was added to the end, remove it\n\t\t\t\tif (addlast) poly.pop();\n\t\t\t\t// break, if there was not anymore removed points\n\t\t\t\tif (!rem.length) break;\n\t\t\t\t// else continue looping using poly2, to check if there are points to remove\n\t\t\t\telse poly = poly2;\n\t\t\t}\n\t\t\tplen = poly2.length;\n\t\t\t// remove duplicate from end, if needed\n\t\t\tif (poly2[plen - 1].X === poly2[0].X && poly2[plen - 1].Y === poly2[0].Y)\n\t\t\t{\n\t\t\t\tpoly2.pop();\n\t\t\t}\n\t\t\tif (poly2.length > 2) // to avoid two-point-polygons\n\t\t\t\tresults.push(poly2);\n\t\t}\n\t\tif (!isPolygons)\n\t\t{\n\t\t\tresults = results[0];\n\t\t}\n\t\tif (typeof (results) === \"undefined\")\n\t\t{\n\t\t\tresults = [];\n\t\t}\n\t\treturn results;\n\t}\n\n\tClipperLib.JS.PerimeterOfPath = function (path, closed, scale)\n\t{\n\t\tif (typeof (path) === \"undefined\") return 0;\n\t\tvar sqrt = Math.sqrt;\n\t\tvar perimeter = 0.0;\n\t\tvar p1, p2, p1x = 0.0,\n\t\t\tp1y = 0.0,\n\t\t\tp2x = 0.0,\n\t\t\tp2y = 0.0;\n\t\tvar j = path.length;\n\t\tif (j < 2) return 0;\n\t\tif (closed)\n\t\t{\n\t\t\tpath[j] = path[0];\n\t\t\tj++;\n\t\t}\n\t\twhile (--j)\n\t\t{\n\t\t\tp1 = path[j];\n\t\t\tp1x = p1.X;\n\t\t\tp1y = p1.Y;\n\t\t\tp2 = path[j - 1];\n\t\t\tp2x = p2.X;\n\t\t\tp2y = p2.Y;\n\t\t\tperimeter += sqrt((p1x - p2x) * (p1x - p2x) + (p1y - p2y) * (p1y - p2y));\n\t\t}\n\t\tif (closed) path.pop();\n\t\treturn perimeter / scale;\n\t};\n\n\tClipperLib.JS.PerimeterOfPaths = function (paths, closed, scale)\n\t{\n\t\tif (!scale) scale = 1;\n\t\tvar perimeter = 0;\n\t\tfor (var i = 0; i < paths.length; i++)\n\t\t{\n\t\t\tperimeter += ClipperLib.JS.PerimeterOfPath(paths[i], closed, scale);\n\t\t}\n\t\treturn perimeter;\n\t};\n\n\tClipperLib.JS.ScaleDownPath = function (path, scale)\n\t{\n\t\tvar i, p;\n\t\tif (!scale) scale = 1;\n\t\ti = path.length;\n\t\twhile (i--)\n\t\t{\n\t\t\tp = path[i];\n\t\t\tp.X = p.X / scale;\n\t\t\tp.Y = p.Y / scale;\n\t\t}\n\t};\n\n\tClipperLib.JS.ScaleDownPaths = function (paths, scale)\n\t{\n\t\tvar i, j, p;\n\t\tif (!scale) scale = 1;\n\t\ti = paths.length;\n\t\twhile (i--)\n\t\t{\n\t\t\tj = paths[i].length;\n\t\t\twhile (j--)\n\t\t\t{\n\t\t\t\tp = paths[i][j];\n\t\t\t\tp.X = p.X / scale;\n\t\t\t\tp.Y = p.Y / scale;\n\t\t\t}\n\t\t}\n\t};\n\n\tClipperLib.JS.ScaleUpPath = function (path, scale)\n\t{\n\t\tvar i, p, round = Math.round;\n\t\tif (!scale) scale = 1;\n\t\ti = path.length;\n\t\twhile (i--)\n\t\t{\n\t\t\tp = path[i];\n\t\t\tp.X = round(p.X * scale);\n\t\t\tp.Y = round(p.Y * scale);\n\t\t}\n\t};\n\n\tClipperLib.JS.ScaleUpPaths = function (paths, scale)\n\t{\n\t\tvar i, j, p, round = Math.round;\n\t\tif (!scale) scale = 1;\n\t\ti = paths.length;\n\t\twhile (i--)\n\t\t{\n\t\t\tj = paths[i].length;\n\t\t\twhile (j--)\n\t\t\t{\n\t\t\t\tp = paths[i][j];\n\t\t\t\tp.X = round(p.X * scale);\n\t\t\t\tp.Y = round(p.Y * scale);\n\t\t\t}\n\t\t}\n\t};\n\n\t/**\n\t* @constructor\n\t*/\n\tClipperLib.ExPolygons = function ()\n\t{\n\t\treturn [];\n\t}\n\t/**\n\t* @constructor\n\t*/\n\tClipperLib.ExPolygon = function ()\n\t{\n\t\tthis.outer = null;\n\t\tthis.holes = null;\n\t};\n\n\tClipperLib.JS.AddOuterPolyNodeToExPolygons = function (polynode, expolygons)\n\t{\n\t\tvar ep = new ClipperLib.ExPolygon();\n\t\tep.outer = polynode.Contour();\n\t\tvar childs = polynode.Childs();\n\t\tvar ilen = childs.length;\n\t\tep.holes = new Array(ilen);\n\t\tvar node, n, i, j, childs2, jlen;\n\t\tfor (i = 0; i < ilen; i++)\n\t\t{\n\t\t\tnode = childs[i];\n\t\t\tep.holes[i] = node.Contour();\n\t\t\t//Add outer polygons contained by (nested within) holes ...\n\t\t\tfor (j = 0, childs2 = node.Childs(), jlen = childs2.length; j < jlen; j++)\n\t\t\t{\n\t\t\t\tn = childs2[j];\n\t\t\t\tClipperLib.JS.AddOuterPolyNodeToExPolygons(n, expolygons);\n\t\t\t}\n\t\t}\n\t\texpolygons.push(ep);\n\t};\n\n\tClipperLib.JS.ExPolygonsToPaths = function (expolygons)\n\t{\n\t\tvar a, i, alen, ilen;\n\t\tvar paths = new ClipperLib.Paths();\n\t\tfor (a = 0, alen = expolygons.length; a < alen; a++)\n\t\t{\n\t\t\tpaths.push(expolygons[a].outer);\n\t\t\tfor (i = 0, ilen = expolygons[a].holes.length; i < ilen; i++)\n\t\t\t{\n\t\t\t\tpaths.push(expolygons[a].holes[i]);\n\t\t\t}\n\t\t}\n\t\treturn paths;\n\t}\n\tClipperLib.JS.PolyTreeToExPolygons = function (polytree)\n\t{\n\t\tvar expolygons = new ClipperLib.ExPolygons();\n\t\tvar node, i, childs, ilen;\n\t\tfor (i = 0, childs = polytree.Childs(), ilen = childs.length; i < ilen; i++)\n\t\t{\n\t\t\tnode = childs[i];\n\t\t\tClipperLib.JS.AddOuterPolyNodeToExPolygons(node, expolygons);\n\t\t}\n\t\treturn expolygons;\n\t};\n\n})();\n", "/**\n * The base implementation of `_.sum` and `_.sumBy` without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {number} Returns the sum.\n */\nfunction baseSum(array, iteratee) {\n  var result,\n      index = -1,\n      length = array.length;\n\n  while (++index < length) {\n    var current = iteratee(array[index]);\n    if (current !== undefined) {\n      result = result === undefined ? current : (result + current);\n    }\n  }\n  return result;\n}\n\nmodule.exports = baseSum;\n", "var baseIteratee = require('./_baseIteratee'),\n    baseSum = require('./_baseSum');\n\n/**\n * This method is like `_.sum` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the value to be summed.\n * The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Math\n * @param {Array} array The array to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {number} Returns the sum.\n * @example\n *\n * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];\n *\n * _.sumBy(objects, function(o) { return o.n; });\n * // => 20\n *\n * // The `_.property` iteratee shorthand.\n * _.sumBy(objects, 'n');\n * // => 20\n */\nfunction sumBy(array, iteratee) {\n  return (array && array.length)\n    ? baseSum(array, baseIteratee(iteratee, 2))\n    : 0;\n}\n\nmodule.exports = sumBy;\n", "!function(e,t){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(\"Siema\",[],t):\"object\"==typeof exports?exports.Siema=t():e.Siema=t()}(\"undefined\"!=typeof self?self:this,function(){return function(e){function t(r){if(i[r])return i[r].exports;var n=i[r]={i:r,l:!1,exports:{}};return e[r].call(n.exports,n,n.exports,t),n.l=!0,n.exports}var i={};return t.m=e,t.c=i,t.d=function(e,i,r){t.o(e,i)||Object.defineProperty(e,i,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var i=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(i,\"a\",i),i},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p=\"\",t(t.s=0)}([function(e,t,i){\"use strict\";function r(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}Object.defineProperty(t,\"__esModule\",{value:!0});var n=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e},s=function(){function e(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,i,r){return i&&e(t.prototype,i),r&&e(t,r),t}}(),l=function(){function e(t){var i=this;if(r(this,e),this.config=e.mergeSettings(t),this.selector=\"string\"==typeof this.config.selector?document.querySelector(this.config.selector):this.config.selector,null===this.selector)throw new Error(\"Something wrong with your selector \uD83D\uDE2D\");this.resolveSlidesNumber(),this.selectorWidth=this.selector.offsetWidth,this.innerElements=[].slice.call(this.selector.children),this.currentSlide=this.config.loop?this.config.startIndex%this.innerElements.length:Math.max(0,Math.min(this.config.startIndex,this.innerElements.length-this.perPage)),this.transformProperty=e.webkitOrNot(),[\"resizeHandler\",\"touchstartHandler\",\"touchendHandler\",\"touchmoveHandler\",\"mousedownHandler\",\"mouseupHandler\",\"mouseleaveHandler\",\"mousemoveHandler\",\"clickHandler\"].forEach(function(e){i[e]=i[e].bind(i)}),this.init()}return s(e,[{key:\"attachEvents\",value:function(){window.addEventListener(\"resize\",this.resizeHandler),this.config.draggable&&(this.pointerDown=!1,this.drag={startX:0,endX:0,startY:0,letItGo:null,preventClick:!1},this.selector.addEventListener(\"touchstart\",this.touchstartHandler),this.selector.addEventListener(\"touchend\",this.touchendHandler),this.selector.addEventListener(\"touchmove\",this.touchmoveHandler),this.selector.addEventListener(\"mousedown\",this.mousedownHandler),this.selector.addEventListener(\"mouseup\",this.mouseupHandler),this.selector.addEventListener(\"mouseleave\",this.mouseleaveHandler),this.selector.addEventListener(\"mousemove\",this.mousemoveHandler),this.selector.addEventListener(\"click\",this.clickHandler))}},{key:\"detachEvents\",value:function(){window.removeEventListener(\"resize\",this.resizeHandler),this.selector.removeEventListener(\"touchstart\",this.touchstartHandler),this.selector.removeEventListener(\"touchend\",this.touchendHandler),this.selector.removeEventListener(\"touchmove\",this.touchmoveHandler),this.selector.removeEventListener(\"mousedown\",this.mousedownHandler),this.selector.removeEventListener(\"mouseup\",this.mouseupHandler),this.selector.removeEventListener(\"mouseleave\",this.mouseleaveHandler),this.selector.removeEventListener(\"mousemove\",this.mousemoveHandler),this.selector.removeEventListener(\"click\",this.clickHandler)}},{key:\"init\",value:function(){this.attachEvents(),this.selector.style.overflow=\"hidden\",this.selector.style.direction=this.config.rtl?\"rtl\":\"ltr\",this.buildSliderFrame(),this.config.onInit.call(this)}},{key:\"buildSliderFrame\",value:function(){var e=this.selectorWidth/this.perPage,t=this.config.loop?this.innerElements.length+2*this.perPage:this.innerElements.length;this.sliderFrame=document.createElement(\"div\"),this.sliderFrame.style.width=e*t+\"px\",this.enableTransition(),this.config.draggable&&(this.selector.style.cursor=\"-webkit-grab\");var i=document.createDocumentFragment();if(this.config.loop)for(var r=this.innerElements.length-this.perPage;r<this.innerElements.length;r++){var n=this.buildSliderFrameItem(this.innerElements[r].cloneNode(!0));i.appendChild(n)}for(var s=0;s<this.innerElements.length;s++){var l=this.buildSliderFrameItem(this.innerElements[s]);i.appendChild(l)}if(this.config.loop)for(var o=0;o<this.perPage;o++){var a=this.buildSliderFrameItem(this.innerElements[o].cloneNode(!0));i.appendChild(a)}this.sliderFrame.appendChild(i),this.selector.innerHTML=\"\",this.selector.appendChild(this.sliderFrame),this.slideToCurrent()}},{key:\"buildSliderFrameItem\",value:function(e){var t=document.createElement(\"div\");return t.style.cssFloat=this.config.rtl?\"right\":\"left\",t.style.float=this.config.rtl?\"right\":\"left\",t.style.width=(this.config.loop?100/(this.innerElements.length+2*this.perPage):100/this.innerElements.length)+\"%\",t.appendChild(e),t}},{key:\"resolveSlidesNumber\",value:function(){if(\"number\"==typeof this.config.perPage)this.perPage=this.config.perPage;else if(\"object\"===n(this.config.perPage)){this.perPage=1;for(var e in this.config.perPage)window.innerWidth>=e&&(this.perPage=this.config.perPage[e])}}},{key:\"prev\",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments[1];if(!(this.innerElements.length<=this.perPage)){var i=this.currentSlide;if(this.config.loop){if(this.currentSlide-e<0){this.disableTransition();var r=this.currentSlide+this.innerElements.length,n=this.perPage,s=r+n,l=(this.config.rtl?1:-1)*s*(this.selectorWidth/this.perPage),o=this.config.draggable?this.drag.endX-this.drag.startX:0;this.sliderFrame.style[this.transformProperty]=\"translate3d(\"+(l+o)+\"px, 0, 0)\",this.currentSlide=r-e}else this.currentSlide=this.currentSlide-e}else this.currentSlide=Math.max(this.currentSlide-e,0);i!==this.currentSlide&&(this.slideToCurrent(this.config.loop),this.config.onChange.call(this),t&&t.call(this))}}},{key:\"next\",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments[1];if(!(this.innerElements.length<=this.perPage)){var i=this.currentSlide;if(this.config.loop){if(this.currentSlide+e>this.innerElements.length-this.perPage){this.disableTransition();var r=this.currentSlide-this.innerElements.length,n=this.perPage,s=r+n,l=(this.config.rtl?1:-1)*s*(this.selectorWidth/this.perPage),o=this.config.draggable?this.drag.endX-this.drag.startX:0;this.sliderFrame.style[this.transformProperty]=\"translate3d(\"+(l+o)+\"px, 0, 0)\",this.currentSlide=r+e}else this.currentSlide=this.currentSlide+e}else this.currentSlide=Math.min(this.currentSlide+e,this.innerElements.length-this.perPage);i!==this.currentSlide&&(this.slideToCurrent(this.config.loop),this.config.onChange.call(this),t&&t.call(this))}}},{key:\"disableTransition\",value:function(){this.sliderFrame.style.webkitTransition=\"all 0ms \"+this.config.easing,this.sliderFrame.style.transition=\"all 0ms \"+this.config.easing}},{key:\"enableTransition\",value:function(){this.sliderFrame.style.webkitTransition=\"all \"+this.config.duration+\"ms \"+this.config.easing,this.sliderFrame.style.transition=\"all \"+this.config.duration+\"ms \"+this.config.easing}},{key:\"goTo\",value:function(e,t){if(!(this.innerElements.length<=this.perPage)){var i=this.currentSlide;this.currentSlide=this.config.loop?e%this.innerElements.length:Math.min(Math.max(e,0),this.innerElements.length-this.perPage),i!==this.currentSlide&&(this.slideToCurrent(),this.config.onChange.call(this),t&&t.call(this))}}},{key:\"slideToCurrent\",value:function(e){var t=this,i=this.config.loop?this.currentSlide+this.perPage:this.currentSlide,r=(this.config.rtl?1:-1)*i*(this.selectorWidth/this.perPage);e?requestAnimationFrame(function(){requestAnimationFrame(function(){t.enableTransition(),t.sliderFrame.style[t.transformProperty]=\"translate3d(\"+r+\"px, 0, 0)\"})}):this.sliderFrame.style[this.transformProperty]=\"translate3d(\"+r+\"px, 0, 0)\"}},{key:\"updateAfterDrag\",value:function(){var e=(this.config.rtl?-1:1)*(this.drag.endX-this.drag.startX),t=Math.abs(e),i=this.config.multipleDrag?Math.ceil(t/(this.selectorWidth/this.perPage)):1,r=e>0&&this.currentSlide-i<0,n=e<0&&this.currentSlide+i>this.innerElements.length-this.perPage;e>0&&t>this.config.threshold&&this.innerElements.length>this.perPage?this.prev(i):e<0&&t>this.config.threshold&&this.innerElements.length>this.perPage&&this.next(i),this.slideToCurrent(r||n)}},{key:\"resizeHandler\",value:function(){this.resolveSlidesNumber(),this.currentSlide+this.perPage>this.innerElements.length&&(this.currentSlide=this.innerElements.length<=this.perPage?0:this.innerElements.length-this.perPage),this.selectorWidth=this.selector.offsetWidth,this.buildSliderFrame()}},{key:\"clearDrag\",value:function(){this.drag={startX:0,endX:0,startY:0,letItGo:null,preventClick:this.drag.preventClick}}},{key:\"touchstartHandler\",value:function(e){-1!==[\"TEXTAREA\",\"OPTION\",\"INPUT\",\"SELECT\"].indexOf(e.target.nodeName)||(e.stopPropagation(),this.pointerDown=!0,this.drag.startX=e.touches[0].pageX,this.drag.startY=e.touches[0].pageY)}},{key:\"touchendHandler\",value:function(e){e.stopPropagation(),this.pointerDown=!1,this.enableTransition(),this.drag.endX&&this.updateAfterDrag(),this.clearDrag()}},{key:\"touchmoveHandler\",value:function(e){if(e.stopPropagation(),null===this.drag.letItGo&&(this.drag.letItGo=Math.abs(this.drag.startY-e.touches[0].pageY)<Math.abs(this.drag.startX-e.touches[0].pageX)),this.pointerDown&&this.drag.letItGo){e.preventDefault(),this.drag.endX=e.touches[0].pageX,this.sliderFrame.style.webkitTransition=\"all 0ms \"+this.config.easing,this.sliderFrame.style.transition=\"all 0ms \"+this.config.easing;var t=this.config.loop?this.currentSlide+this.perPage:this.currentSlide,i=t*(this.selectorWidth/this.perPage),r=this.drag.endX-this.drag.startX,n=this.config.rtl?i+r:i-r;this.sliderFrame.style[this.transformProperty]=\"translate3d(\"+(this.config.rtl?1:-1)*n+\"px, 0, 0)\"}}},{key:\"mousedownHandler\",value:function(e){-1!==[\"TEXTAREA\",\"OPTION\",\"INPUT\",\"SELECT\"].indexOf(e.target.nodeName)||(e.preventDefault(),e.stopPropagation(),this.pointerDown=!0,this.drag.startX=e.pageX)}},{key:\"mouseupHandler\",value:function(e){e.stopPropagation(),this.pointerDown=!1,this.selector.style.cursor=\"-webkit-grab\",this.enableTransition(),this.drag.endX&&this.updateAfterDrag(),this.clearDrag()}},{key:\"mousemoveHandler\",value:function(e){if(e.preventDefault(),this.pointerDown){\"A\"===e.target.nodeName&&(this.drag.preventClick=!0),this.drag.endX=e.pageX,this.selector.style.cursor=\"-webkit-grabbing\",this.sliderFrame.style.webkitTransition=\"all 0ms \"+this.config.easing,this.sliderFrame.style.transition=\"all 0ms \"+this.config.easing;var t=this.config.loop?this.currentSlide+this.perPage:this.currentSlide,i=t*(this.selectorWidth/this.perPage),r=this.drag.endX-this.drag.startX,n=this.config.rtl?i+r:i-r;this.sliderFrame.style[this.transformProperty]=\"translate3d(\"+(this.config.rtl?1:-1)*n+\"px, 0, 0)\"}}},{key:\"mouseleaveHandler\",value:function(e){this.pointerDown&&(this.pointerDown=!1,this.selector.style.cursor=\"-webkit-grab\",this.drag.endX=e.pageX,this.drag.preventClick=!1,this.enableTransition(),this.updateAfterDrag(),this.clearDrag())}},{key:\"clickHandler\",value:function(e){this.drag.preventClick&&e.preventDefault(),this.drag.preventClick=!1}},{key:\"remove\",value:function(e,t){if(e<0||e>=this.innerElements.length)throw new Error(\"Item to remove doesn't exist \uD83D\uDE2D\");var i=e<this.currentSlide,r=this.currentSlide+this.perPage-1===e;(i||r)&&this.currentSlide--,this.innerElements.splice(e,1),this.buildSliderFrame(),t&&t.call(this)}},{key:\"insert\",value:function(e,t,i){if(t<0||t>this.innerElements.length+1)throw new Error(\"Unable to inset it at this index \uD83D\uDE2D\");if(-1!==this.innerElements.indexOf(e))throw new Error(\"The same item in a carousel? Really? Nope \uD83D\uDE2D\");var r=t<=this.currentSlide>0&&this.innerElements.length;this.currentSlide=r?this.currentSlide+1:this.currentSlide,this.innerElements.splice(t,0,e),this.buildSliderFrame(),i&&i.call(this)}},{key:\"prepend\",value:function(e,t){this.insert(e,0),t&&t.call(this)}},{key:\"append\",value:function(e,t){this.insert(e,this.innerElements.length+1),t&&t.call(this)}},{key:\"destroy\",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments[1];if(this.detachEvents(),this.selector.style.cursor=\"auto\",e){for(var i=document.createDocumentFragment(),r=0;r<this.innerElements.length;r++)i.appendChild(this.innerElements[r]);this.selector.innerHTML=\"\",this.selector.appendChild(i),this.selector.removeAttribute(\"style\")}t&&t.call(this)}}],[{key:\"mergeSettings\",value:function(e){var t={selector:\".siema\",duration:200,easing:\"ease-out\",perPage:1,startIndex:0,draggable:!0,multipleDrag:!0,threshold:20,loop:!1,rtl:!1,onInit:function(){},onChange:function(){}},i=e;for(var r in i)t[r]=i[r];return t}},{key:\"webkitOrNot\",value:function(){return\"string\"==typeof document.documentElement.style.transform?\"transform\":\"WebkitTransform\"}}]),e}();t.default=l,e.exports=t.default}])});", "/**\n * @license React\n * scheduler.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n  (function () {\n    function performWorkUntilDeadline() {\n      needsPaint = !1;\n      if (isMessageLoopRunning) {\n        var currentTime = exports.unstable_now();\n        startTime = currentTime;\n        var hasMoreWork = !0;\n        try {\n          a: {\n            isHostCallbackScheduled = !1;\n            isHostTimeoutScheduled &&\n              ((isHostTimeoutScheduled = !1),\n              localClearTimeout(taskTimeoutID),\n              (taskTimeoutID = -1));\n            isPerformingWork = !0;\n            var previousPriorityLevel = currentPriorityLevel;\n            try {\n              b: {\n                advanceTimers(currentTime);\n                for (\n                  currentTask = peek(taskQueue);\n                  null !== currentTask &&\n                  !(\n                    currentTask.expirationTime > currentTime &&\n                    shouldYieldToHost()\n                  );\n\n                ) {\n                  var callback = currentTask.callback;\n                  if (\"function\" === typeof callback) {\n                    currentTask.callback = null;\n                    currentPriorityLevel = currentTask.priorityLevel;\n                    var continuationCallback = callback(\n                      currentTask.expirationTime <= currentTime\n                    );\n                    currentTime = exports.unstable_now();\n                    if (\"function\" === typeof continuationCallback) {\n                      currentTask.callback = continuationCallback;\n                      advanceTimers(currentTime);\n                      hasMoreWork = !0;\n                      break b;\n                    }\n                    currentTask === peek(taskQueue) && pop(taskQueue);\n                    advanceTimers(currentTime);\n                  } else pop(taskQueue);\n                  currentTask = peek(taskQueue);\n                }\n                if (null !== currentTask) hasMoreWork = !0;\n                else {\n                  var firstTimer = peek(timerQueue);\n                  null !== firstTimer &&\n                    requestHostTimeout(\n                      handleTimeout,\n                      firstTimer.startTime - currentTime\n                    );\n                  hasMoreWork = !1;\n                }\n              }\n              break a;\n            } finally {\n              (currentTask = null),\n                (currentPriorityLevel = previousPriorityLevel),\n                (isPerformingWork = !1);\n            }\n            hasMoreWork = void 0;\n          }\n        } finally {\n          hasMoreWork\n            ? schedulePerformWorkUntilDeadline()\n            : (isMessageLoopRunning = !1);\n        }\n      }\n    }\n    function push(heap, node) {\n      var index = heap.length;\n      heap.push(node);\n      a: for (; 0 < index; ) {\n        var parentIndex = (index - 1) >>> 1,\n          parent = heap[parentIndex];\n        if (0 < compare(parent, node))\n          (heap[parentIndex] = node),\n            (heap[index] = parent),\n            (index = parentIndex);\n        else break a;\n      }\n    }\n    function peek(heap) {\n      return 0 === heap.length ? null : heap[0];\n    }\n    function pop(heap) {\n      if (0 === heap.length) return null;\n      var first = heap[0],\n        last = heap.pop();\n      if (last !== first) {\n        heap[0] = last;\n        a: for (\n          var index = 0, length = heap.length, halfLength = length >>> 1;\n          index < halfLength;\n\n        ) {\n          var leftIndex = 2 * (index + 1) - 1,\n            left = heap[leftIndex],\n            rightIndex = leftIndex + 1,\n            right = heap[rightIndex];\n          if (0 > compare(left, last))\n            rightIndex < length && 0 > compare(right, left)\n              ? ((heap[index] = right),\n                (heap[rightIndex] = last),\n                (index = rightIndex))\n              : ((heap[index] = left),\n                (heap[leftIndex] = last),\n                (index = leftIndex));\n          else if (rightIndex < length && 0 > compare(right, last))\n            (heap[index] = right),\n              (heap[rightIndex] = last),\n              (index = rightIndex);\n          else break a;\n        }\n      }\n      return first;\n    }\n    function compare(a, b) {\n      var diff = a.sortIndex - b.sortIndex;\n      return 0 !== diff ? diff : a.id - b.id;\n    }\n    function advanceTimers(currentTime) {\n      for (var timer = peek(timerQueue); null !== timer; ) {\n        if (null === timer.callback) pop(timerQueue);\n        else if (timer.startTime <= currentTime)\n          pop(timerQueue),\n            (timer.sortIndex = timer.expirationTime),\n            push(taskQueue, timer);\n        else break;\n        timer = peek(timerQueue);\n      }\n    }\n    function handleTimeout(currentTime) {\n      isHostTimeoutScheduled = !1;\n      advanceTimers(currentTime);\n      if (!isHostCallbackScheduled)\n        if (null !== peek(taskQueue))\n          (isHostCallbackScheduled = !0),\n            isMessageLoopRunning ||\n              ((isMessageLoopRunning = !0), schedulePerformWorkUntilDeadline());\n        else {\n          var firstTimer = peek(timerQueue);\n          null !== firstTimer &&\n            requestHostTimeout(\n              handleTimeout,\n              firstTimer.startTime - currentTime\n            );\n        }\n    }\n    function shouldYieldToHost() {\n      return needsPaint\n        ? !0\n        : exports.unstable_now() - startTime < frameInterval\n          ? !1\n          : !0;\n    }\n    function requestHostTimeout(callback, ms) {\n      taskTimeoutID = localSetTimeout(function () {\n        callback(exports.unstable_now());\n      }, ms);\n    }\n    \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n      \"function\" ===\n        typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&\n      __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());\n    exports.unstable_now = void 0;\n    if (\n      \"object\" === typeof performance &&\n      \"function\" === typeof performance.now\n    ) {\n      var localPerformance = performance;\n      exports.unstable_now = function () {\n        return localPerformance.now();\n      };\n    } else {\n      var localDate = Date,\n        initialTime = localDate.now();\n      exports.unstable_now = function () {\n        return localDate.now() - initialTime;\n      };\n    }\n    var taskQueue = [],\n      timerQueue = [],\n      taskIdCounter = 1,\n      currentTask = null,\n      currentPriorityLevel = 3,\n      isPerformingWork = !1,\n      isHostCallbackScheduled = !1,\n      isHostTimeoutScheduled = !1,\n      needsPaint = !1,\n      localSetTimeout = \"function\" === typeof setTimeout ? setTimeout : null,\n      localClearTimeout =\n        \"function\" === typeof clearTimeout ? clearTimeout : null,\n      localSetImmediate =\n        \"undefined\" !== typeof setImmediate ? setImmediate : null,\n      isMessageLoopRunning = !1,\n      taskTimeoutID = -1,\n      frameInterval = 5,\n      startTime = -1;\n    if (\"function\" === typeof localSetImmediate)\n      var schedulePerformWorkUntilDeadline = function () {\n        localSetImmediate(performWorkUntilDeadline);\n      };\n    else if (\"undefined\" !== typeof MessageChannel) {\n      var channel = new MessageChannel(),\n        port = channel.port2;\n      channel.port1.onmessage = performWorkUntilDeadline;\n      schedulePerformWorkUntilDeadline = function () {\n        port.postMessage(null);\n      };\n    } else\n      schedulePerformWorkUntilDeadline = function () {\n        localSetTimeout(performWorkUntilDeadline, 0);\n      };\n    exports.unstable_IdlePriority = 5;\n    exports.unstable_ImmediatePriority = 1;\n    exports.unstable_LowPriority = 4;\n    exports.unstable_NormalPriority = 3;\n    exports.unstable_Profiling = null;\n    exports.unstable_UserBlockingPriority = 2;\n    exports.unstable_cancelCallback = function (task) {\n      task.callback = null;\n    };\n    exports.unstable_forceFrameRate = function (fps) {\n      0 > fps || 125 < fps\n        ? console.error(\n            \"forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported\"\n          )\n        : (frameInterval = 0 < fps ? Math.floor(1e3 / fps) : 5);\n    };\n    exports.unstable_getCurrentPriorityLevel = function () {\n      return currentPriorityLevel;\n    };\n    exports.unstable_next = function (eventHandler) {\n      switch (currentPriorityLevel) {\n        case 1:\n        case 2:\n        case 3:\n          var priorityLevel = 3;\n          break;\n        default:\n          priorityLevel = currentPriorityLevel;\n      }\n      var previousPriorityLevel = currentPriorityLevel;\n      currentPriorityLevel = priorityLevel;\n      try {\n        return eventHandler();\n      } finally {\n        currentPriorityLevel = previousPriorityLevel;\n      }\n    };\n    exports.unstable_requestPaint = function () {\n      needsPaint = !0;\n    };\n    exports.unstable_runWithPriority = function (priorityLevel, eventHandler) {\n      switch (priorityLevel) {\n        case 1:\n        case 2:\n        case 3:\n        case 4:\n        case 5:\n          break;\n        default:\n          priorityLevel = 3;\n      }\n      var previousPriorityLevel = currentPriorityLevel;\n      currentPriorityLevel = priorityLevel;\n      try {\n        return eventHandler();\n      } finally {\n        currentPriorityLevel = previousPriorityLevel;\n      }\n    };\n    exports.unstable_scheduleCallback = function (\n      priorityLevel,\n      callback,\n      options\n    ) {\n      var currentTime = exports.unstable_now();\n      \"object\" === typeof options && null !== options\n        ? ((options = options.delay),\n          (options =\n            \"number\" === typeof options && 0 < options\n              ? currentTime + options\n              : currentTime))\n        : (options = currentTime);\n      switch (priorityLevel) {\n        case 1:\n          var timeout = -1;\n          break;\n        case 2:\n          timeout = 250;\n          break;\n        case 5:\n          timeout = 1073741823;\n          break;\n        case 4:\n          timeout = 1e4;\n          break;\n        default:\n          timeout = 5e3;\n      }\n      timeout = options + timeout;\n      priorityLevel = {\n        id: taskIdCounter++,\n        callback: callback,\n        priorityLevel: priorityLevel,\n        startTime: options,\n        expirationTime: timeout,\n        sortIndex: -1\n      };\n      options > currentTime\n        ? ((priorityLevel.sortIndex = options),\n          push(timerQueue, priorityLevel),\n          null === peek(taskQueue) &&\n            priorityLevel === peek(timerQueue) &&\n            (isHostTimeoutScheduled\n              ? (localClearTimeout(taskTimeoutID), (taskTimeoutID = -1))\n              : (isHostTimeoutScheduled = !0),\n            requestHostTimeout(handleTimeout, options - currentTime)))\n        : ((priorityLevel.sortIndex = timeout),\n          push(taskQueue, priorityLevel),\n          isHostCallbackScheduled ||\n            isPerformingWork ||\n            ((isHostCallbackScheduled = !0),\n            isMessageLoopRunning ||\n              ((isMessageLoopRunning = !0),\n              schedulePerformWorkUntilDeadline())));\n      return priorityLevel;\n    };\n    exports.unstable_shouldYield = shouldYieldToHost;\n    exports.unstable_wrapCallback = function (callback) {\n      var parentPriorityLevel = currentPriorityLevel;\n      return function () {\n        var previousPriorityLevel = currentPriorityLevel;\n        currentPriorityLevel = parentPriorityLevel;\n        try {\n          return callback.apply(this, arguments);\n        } finally {\n          currentPriorityLevel = previousPriorityLevel;\n        }\n      };\n    };\n    \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n      \"function\" ===\n        typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&\n      __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());\n  })();\n", "'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n  module.exports = require('./cjs/scheduler.production.js');\n} else {\n  module.exports = require('./cjs/scheduler.development.js');\n}\n", "/**\n * @license React\n * react-dom-client.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n/*\n Modernizr 3.0.0pre (Custom Build) | MIT\n*/\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n  (function () {\n    function findHook(fiber, id) {\n      for (fiber = fiber.memoizedState; null !== fiber && 0 < id; )\n        (fiber = fiber.next), id--;\n      return fiber;\n    }\n    function copyWithSetImpl(obj, path, index, value) {\n      if (index >= path.length) return value;\n      var key = path[index],\n        updated = isArrayImpl(obj) ? obj.slice() : assign({}, obj);\n      updated[key] = copyWithSetImpl(obj[key], path, index + 1, value);\n      return updated;\n    }\n    function copyWithRename(obj, oldPath, newPath) {\n      if (oldPath.length !== newPath.length)\n        console.warn(\"copyWithRename() expects paths of the same length\");\n      else {\n        for (var i = 0; i < newPath.length - 1; i++)\n          if (oldPath[i] !== newPath[i]) {\n            console.warn(\n              \"copyWithRename() expects paths to be the same except for the deepest key\"\n            );\n            return;\n          }\n        return copyWithRenameImpl(obj, oldPath, newPath, 0);\n      }\n    }\n    function copyWithRenameImpl(obj, oldPath, newPath, index) {\n      var oldKey = oldPath[index],\n        updated = isArrayImpl(obj) ? obj.slice() : assign({}, obj);\n      index + 1 === oldPath.length\n        ? ((updated[newPath[index]] = updated[oldKey]),\n          isArrayImpl(updated)\n            ? updated.splice(oldKey, 1)\n            : delete updated[oldKey])\n        : (updated[oldKey] = copyWithRenameImpl(\n            obj[oldKey],\n            oldPath,\n            newPath,\n            index + 1\n          ));\n      return updated;\n    }\n    function copyWithDeleteImpl(obj, path, index) {\n      var key = path[index],\n        updated = isArrayImpl(obj) ? obj.slice() : assign({}, obj);\n      if (index + 1 === path.length)\n        return (\n          isArrayImpl(updated) ? updated.splice(key, 1) : delete updated[key],\n          updated\n        );\n      updated[key] = copyWithDeleteImpl(obj[key], path, index + 1);\n      return updated;\n    }\n    function shouldSuspendImpl() {\n      return !1;\n    }\n    function shouldErrorImpl() {\n      return null;\n    }\n    function warnInvalidHookAccess() {\n      console.error(\n        \"Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://react.dev/link/rules-of-hooks\"\n      );\n    }\n    function warnInvalidContextAccess() {\n      console.error(\n        \"Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().\"\n      );\n    }\n    function noop() {}\n    function warnForMissingKey() {}\n    function setToSortedString(set) {\n      var array = [];\n      set.forEach(function (value) {\n        array.push(value);\n      });\n      return array.sort().join(\", \");\n    }\n    function createFiber(tag, pendingProps, key, mode) {\n      return new FiberNode(tag, pendingProps, key, mode);\n    }\n    function scheduleRoot(root, element) {\n      root.context === emptyContextObject &&\n        (updateContainerImpl(root.current, 2, element, root, null, null),\n        flushSyncWork$1());\n    }\n    function scheduleRefresh(root, update) {\n      if (null !== resolveFamily) {\n        var staleFamilies = update.staleFamilies;\n        update = update.updatedFamilies;\n        flushPendingEffects();\n        scheduleFibersWithFamiliesRecursively(\n          root.current,\n          update,\n          staleFamilies\n        );\n        flushSyncWork$1();\n      }\n    }\n    function setRefreshHandler(handler) {\n      resolveFamily = handler;\n    }\n    function isValidContainer(node) {\n      return !(\n        !node ||\n        (1 !== node.nodeType && 9 !== node.nodeType && 11 !== node.nodeType)\n      );\n    }\n    function getNearestMountedFiber(fiber) {\n      var node = fiber,\n        nearestMounted = fiber;\n      if (fiber.alternate) for (; node.return; ) node = node.return;\n      else {\n        fiber = node;\n        do\n          (node = fiber),\n            0 !== (node.flags & 4098) && (nearestMounted = node.return),\n            (fiber = node.return);\n        while (fiber);\n      }\n      return 3 === node.tag ? nearestMounted : null;\n    }\n    function getSuspenseInstanceFromFiber(fiber) {\n      if (13 === fiber.tag) {\n        var suspenseState = fiber.memoizedState;\n        null === suspenseState &&\n          ((fiber = fiber.alternate),\n          null !== fiber && (suspenseState = fiber.memoizedState));\n        if (null !== suspenseState) return suspenseState.dehydrated;\n      }\n      return null;\n    }\n    function getActivityInstanceFromFiber(fiber) {\n      if (31 === fiber.tag) {\n        var activityState = fiber.memoizedState;\n        null === activityState &&\n          ((fiber = fiber.alternate),\n          null !== fiber && (activityState = fiber.memoizedState));\n        if (null !== activityState) return activityState.dehydrated;\n      }\n      return null;\n    }\n    function assertIsMounted(fiber) {\n      if (getNearestMountedFiber(fiber) !== fiber)\n        throw Error(\"Unable to find node on an unmounted component.\");\n    }\n    function findCurrentFiberUsingSlowPath(fiber) {\n      var alternate = fiber.alternate;\n      if (!alternate) {\n        alternate = getNearestMountedFiber(fiber);\n        if (null === alternate)\n          throw Error(\"Unable to find node on an unmounted component.\");\n        return alternate !== fiber ? null : fiber;\n      }\n      for (var a = fiber, b = alternate; ; ) {\n        var parentA = a.return;\n        if (null === parentA) break;\n        var parentB = parentA.alternate;\n        if (null === parentB) {\n          b = parentA.return;\n          if (null !== b) {\n            a = b;\n            continue;\n          }\n          break;\n        }\n        if (parentA.child === parentB.child) {\n          for (parentB = parentA.child; parentB; ) {\n            if (parentB === a) return assertIsMounted(parentA), fiber;\n            if (parentB === b) return assertIsMounted(parentA), alternate;\n            parentB = parentB.sibling;\n          }\n          throw Error(\"Unable to find node on an unmounted component.\");\n        }\n        if (a.return !== b.return) (a = parentA), (b = parentB);\n        else {\n          for (var didFindChild = !1, _child = parentA.child; _child; ) {\n            if (_child === a) {\n              didFindChild = !0;\n              a = parentA;\n              b = parentB;\n              break;\n            }\n            if (_child === b) {\n              didFindChild = !0;\n              b = parentA;\n              a = parentB;\n              break;\n            }\n            _child = _child.sibling;\n          }\n          if (!didFindChild) {\n            for (_child = parentB.child; _child; ) {\n              if (_child === a) {\n                didFindChild = !0;\n                a = parentB;\n                b = parentA;\n                break;\n              }\n              if (_child === b) {\n                didFindChild = !0;\n                b = parentB;\n                a = parentA;\n                break;\n              }\n              _child = _child.sibling;\n            }\n            if (!didFindChild)\n              throw Error(\n                \"Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.\"\n              );\n          }\n        }\n        if (a.alternate !== b)\n          throw Error(\n            \"Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.\"\n          );\n      }\n      if (3 !== a.tag)\n        throw Error(\"Unable to find node on an unmounted component.\");\n      return a.stateNode.current === a ? fiber : alternate;\n    }\n    function findCurrentHostFiberImpl(node) {\n      var tag = node.tag;\n      if (5 === tag || 26 === tag || 27 === tag || 6 === tag) return node;\n      for (node = node.child; null !== node; ) {\n        tag = findCurrentHostFiberImpl(node);\n        if (null !== tag) return tag;\n        node = node.sibling;\n      }\n      return null;\n    }\n    function getIteratorFn(maybeIterable) {\n      if (null === maybeIterable || \"object\" !== typeof maybeIterable)\n        return null;\n      maybeIterable =\n        (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||\n        maybeIterable[\"@@iterator\"];\n      return \"function\" === typeof maybeIterable ? maybeIterable : null;\n    }\n    function getComponentNameFromType(type) {\n      if (null == type) return null;\n      if (\"function\" === typeof type)\n        return type.$$typeof === REACT_CLIENT_REFERENCE\n          ? null\n          : type.displayName || type.name || null;\n      if (\"string\" === typeof type) return type;\n      switch (type) {\n        case REACT_FRAGMENT_TYPE:\n          return \"Fragment\";\n        case REACT_PROFILER_TYPE:\n          return \"Profiler\";\n        case REACT_STRICT_MODE_TYPE:\n          return \"StrictMode\";\n        case REACT_SUSPENSE_TYPE:\n          return \"Suspense\";\n        case REACT_SUSPENSE_LIST_TYPE:\n          return \"SuspenseList\";\n        case REACT_ACTIVITY_TYPE:\n          return \"Activity\";\n      }\n      if (\"object\" === typeof type)\n        switch (\n          (\"number\" === typeof type.tag &&\n            console.error(\n              \"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"\n            ),\n          type.$$typeof)\n        ) {\n          case REACT_PORTAL_TYPE:\n            return \"Portal\";\n          case REACT_CONTEXT_TYPE:\n            return type.displayName || \"Context\";\n          case REACT_CONSUMER_TYPE:\n            return (type._context.displayName || \"Context\") + \".Consumer\";\n          case REACT_FORWARD_REF_TYPE:\n            var innerType = type.render;\n            type = type.displayName;\n            type ||\n              ((type = innerType.displayName || innerType.name || \"\"),\n              (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n            return type;\n          case REACT_MEMO_TYPE:\n            return (\n              (innerType = type.displayName || null),\n              null !== innerType\n                ? innerType\n                : getComponentNameFromType(type.type) || \"Memo\"\n            );\n          case REACT_LAZY_TYPE:\n            innerType = type._payload;\n            type = type._init;\n            try {\n              return getComponentNameFromType(type(innerType));\n            } catch (x) {}\n        }\n      return null;\n    }\n    function getComponentNameFromOwner(owner) {\n      return \"number\" === typeof owner.tag\n        ? getComponentNameFromFiber(owner)\n        : \"string\" === typeof owner.name\n          ? owner.name\n          : null;\n    }\n    function getComponentNameFromFiber(fiber) {\n      var type = fiber.type;\n      switch (fiber.tag) {\n        case 31:\n          return \"Activity\";\n        case 24:\n          return \"Cache\";\n        case 9:\n          return (type._context.displayName || \"Context\") + \".Consumer\";\n        case 10:\n          return type.displayName || \"Context\";\n        case 18:\n          return \"DehydratedFragment\";\n        case 11:\n          return (\n            (fiber = type.render),\n            (fiber = fiber.displayName || fiber.name || \"\"),\n            type.displayName ||\n              (\"\" !== fiber ? \"ForwardRef(\" + fiber + \")\" : \"ForwardRef\")\n          );\n        case 7:\n          return \"Fragment\";\n        case 26:\n        case 27:\n        case 5:\n          return type;\n        case 4:\n          return \"Portal\";\n        case 3:\n          return \"Root\";\n        case 6:\n          return \"Text\";\n        case 16:\n          return getComponentNameFromType(type);\n        case 8:\n          return type === REACT_STRICT_MODE_TYPE ? \"StrictMode\" : \"Mode\";\n        case 22:\n          return \"Offscreen\";\n        case 12:\n          return \"Profiler\";\n        case 21:\n          return \"Scope\";\n        case 13:\n          return \"Suspense\";\n        case 19:\n          return \"SuspenseList\";\n        case 25:\n          return \"TracingMarker\";\n        case 1:\n        case 0:\n        case 14:\n        case 15:\n          if (\"function\" === typeof type)\n            return type.displayName || type.name || null;\n          if (\"string\" === typeof type) return type;\n          break;\n        case 29:\n          type = fiber._debugInfo;\n          if (null != type)\n            for (var i = type.length - 1; 0 <= i; i--)\n              if (\"string\" === typeof type[i].name) return type[i].name;\n          if (null !== fiber.return)\n            return getComponentNameFromFiber(fiber.return);\n      }\n      return null;\n    }\n    function createCursor(defaultValue) {\n      return { current: defaultValue };\n    }\n    function pop(cursor, fiber) {\n      0 > index$jscomp$0\n        ? console.error(\"Unexpected pop.\")\n        : (fiber !== fiberStack[index$jscomp$0] &&\n            console.error(\"Unexpected Fiber popped.\"),\n          (cursor.current = valueStack[index$jscomp$0]),\n          (valueStack[index$jscomp$0] = null),\n          (fiberStack[index$jscomp$0] = null),\n          index$jscomp$0--);\n    }\n    function push(cursor, value, fiber) {\n      index$jscomp$0++;\n      valueStack[index$jscomp$0] = cursor.current;\n      fiberStack[index$jscomp$0] = fiber;\n      cursor.current = value;\n    }\n    function requiredContext(c) {\n      null === c &&\n        console.error(\n          \"Expected host context to exist. This error is likely caused by a bug in React. Please file an issue.\"\n        );\n      return c;\n    }\n    function pushHostContainer(fiber, nextRootInstance) {\n      push(rootInstanceStackCursor, nextRootInstance, fiber);\n      push(contextFiberStackCursor, fiber, fiber);\n      push(contextStackCursor, null, fiber);\n      var nextRootContext = nextRootInstance.nodeType;\n      switch (nextRootContext) {\n        case 9:\n        case 11:\n          nextRootContext = 9 === nextRootContext ? \"#document\" : \"#fragment\";\n          nextRootInstance = (nextRootInstance =\n            nextRootInstance.documentElement)\n            ? (nextRootInstance = nextRootInstance.namespaceURI)\n              ? getOwnHostContext(nextRootInstance)\n              : HostContextNamespaceNone\n            : HostContextNamespaceNone;\n          break;\n        default:\n          if (\n            ((nextRootContext = nextRootInstance.tagName),\n            (nextRootInstance = nextRootInstance.namespaceURI))\n          )\n            (nextRootInstance = getOwnHostContext(nextRootInstance)),\n              (nextRootInstance = getChildHostContextProd(\n                nextRootInstance,\n                nextRootContext\n              ));\n          else\n            switch (nextRootContext) {\n              case \"svg\":\n                nextRootInstance = HostContextNamespaceSvg;\n                break;\n              case \"math\":\n                nextRootInstance = HostContextNamespaceMath;\n                break;\n              default:\n                nextRootInstance = HostContextNamespaceNone;\n            }\n      }\n      nextRootContext = nextRootContext.toLowerCase();\n      nextRootContext = updatedAncestorInfoDev(null, nextRootContext);\n      nextRootContext = {\n        context: nextRootInstance,\n        ancestorInfo: nextRootContext\n      };\n      pop(contextStackCursor, fiber);\n      push(contextStackCursor, nextRootContext, fiber);\n    }\n    function popHostContainer(fiber) {\n      pop(contextStackCursor, fiber);\n      pop(contextFiberStackCursor, fiber);\n      pop(rootInstanceStackCursor, fiber);\n    }\n    function getHostContext() {\n      return requiredContext(contextStackCursor.current);\n    }\n    function pushHostContext(fiber) {\n      null !== fiber.memoizedState &&\n        push(hostTransitionProviderCursor, fiber, fiber);\n      var context = requiredContext(contextStackCursor.current);\n      var type = fiber.type;\n      var nextContext = getChildHostContextProd(context.context, type);\n      type = updatedAncestorInfoDev(context.ancestorInfo, type);\n      nextContext = { context: nextContext, ancestorInfo: type };\n      context !== nextContext &&\n        (push(contextFiberStackCursor, fiber, fiber),\n        push(contextStackCursor, nextContext, fiber));\n    }\n    function popHostContext(fiber) {\n      contextFiberStackCursor.current === fiber &&\n        (pop(contextStackCursor, fiber), pop(contextFiberStackCursor, fiber));\n      hostTransitionProviderCursor.current === fiber &&\n        (pop(hostTransitionProviderCursor, fiber),\n        (HostTransitionContext._currentValue = NotPendingTransition));\n    }\n    function disabledLog() {}\n    function disableLogs() {\n      if (0 === disabledDepth) {\n        prevLog = console.log;\n        prevInfo = console.info;\n        prevWarn = console.warn;\n        prevError = console.error;\n        prevGroup = console.group;\n        prevGroupCollapsed = console.groupCollapsed;\n        prevGroupEnd = console.groupEnd;\n        var props = {\n          configurable: !0,\n          enumerable: !0,\n          value: disabledLog,\n          writable: !0\n        };\n        Object.defineProperties(console, {\n          info: props,\n          log: props,\n          warn: props,\n          error: props,\n          group: props,\n          groupCollapsed: props,\n          groupEnd: props\n        });\n      }\n      disabledDepth++;\n    }\n    function reenableLogs() {\n      disabledDepth--;\n      if (0 === disabledDepth) {\n        var props = { configurable: !0, enumerable: !0, writable: !0 };\n        Object.defineProperties(console, {\n          log: assign({}, props, { value: prevLog }),\n          info: assign({}, props, { value: prevInfo }),\n          warn: assign({}, props, { value: prevWarn }),\n          error: assign({}, props, { value: prevError }),\n          group: assign({}, props, { value: prevGroup }),\n          groupCollapsed: assign({}, props, { value: prevGroupCollapsed }),\n          groupEnd: assign({}, props, { value: prevGroupEnd })\n        });\n      }\n      0 > disabledDepth &&\n        console.error(\n          \"disabledDepth fell below zero. This is a bug in React. Please file an issue.\"\n        );\n    }\n    function formatOwnerStack(error) {\n      var prevPrepareStackTrace = Error.prepareStackTrace;\n      Error.prepareStackTrace = void 0;\n      error = error.stack;\n      Error.prepareStackTrace = prevPrepareStackTrace;\n      error.startsWith(\"Error: react-stack-top-frame\\n\") &&\n        (error = error.slice(29));\n      prevPrepareStackTrace = error.indexOf(\"\\n\");\n      -1 !== prevPrepareStackTrace &&\n        (error = error.slice(prevPrepareStackTrace + 1));\n      prevPrepareStackTrace = error.indexOf(\"react_stack_bottom_frame\");\n      -1 !== prevPrepareStackTrace &&\n        (prevPrepareStackTrace = error.lastIndexOf(\n          \"\\n\",\n          prevPrepareStackTrace\n        ));\n      if (-1 !== prevPrepareStackTrace)\n        error = error.slice(0, prevPrepareStackTrace);\n      else return \"\";\n      return error;\n    }\n    function describeBuiltInComponentFrame(name) {\n      if (void 0 === prefix)\n        try {\n          throw Error();\n        } catch (x) {\n          var match = x.stack.trim().match(/\\n( *(at )?)/);\n          prefix = (match && match[1]) || \"\";\n          suffix =\n            -1 < x.stack.indexOf(\"\\n    at\")\n              ? \" (<anonymous>)\"\n              : -1 < x.stack.indexOf(\"@\")\n                ? \"@unknown:0:0\"\n                : \"\";\n        }\n      return \"\\n\" + prefix + name + suffix;\n    }\n    function describeNativeComponentFrame(fn, construct) {\n      if (!fn || reentry) return \"\";\n      var frame = componentFrameCache.get(fn);\n      if (void 0 !== frame) return frame;\n      reentry = !0;\n      frame = Error.prepareStackTrace;\n      Error.prepareStackTrace = void 0;\n      var previousDispatcher = null;\n      previousDispatcher = ReactSharedInternals.H;\n      ReactSharedInternals.H = null;\n      disableLogs();\n      try {\n        var RunInRootFrame = {\n          DetermineComponentFrameRoot: function () {\n            try {\n              if (construct) {\n                var Fake = function () {\n                  throw Error();\n                };\n                Object.defineProperty(Fake.prototype, \"props\", {\n                  set: function () {\n                    throw Error();\n                  }\n                });\n                if (\"object\" === typeof Reflect && Reflect.construct) {\n                  try {\n                    Reflect.construct(Fake, []);\n                  } catch (x) {\n                    var control = x;\n                  }\n                  Reflect.construct(fn, [], Fake);\n                } else {\n                  try {\n                    Fake.call();\n                  } catch (x$0) {\n                    control = x$0;\n                  }\n                  fn.call(Fake.prototype);\n                }\n              } else {\n                try {\n                  throw Error();\n                } catch (x$1) {\n                  control = x$1;\n                }\n                (Fake = fn()) &&\n                  \"function\" === typeof Fake.catch &&\n                  Fake.catch(function () {});\n              }\n            } catch (sample) {\n              if (sample && control && \"string\" === typeof sample.stack)\n                return [sample.stack, control.stack];\n            }\n            return [null, null];\n          }\n        };\n        RunInRootFrame.DetermineComponentFrameRoot.displayName =\n          \"DetermineComponentFrameRoot\";\n        var namePropDescriptor = Object.getOwnPropertyDescriptor(\n          RunInRootFrame.DetermineComponentFrameRoot,\n          \"name\"\n        );\n        namePropDescriptor &&\n          namePropDescriptor.configurable &&\n          Object.defineProperty(\n            RunInRootFrame.DetermineComponentFrameRoot,\n            \"name\",\n            { value: \"DetermineComponentFrameRoot\" }\n          );\n        var _RunInRootFrame$Deter =\n            RunInRootFrame.DetermineComponentFrameRoot(),\n          sampleStack = _RunInRootFrame$Deter[0],\n          controlStack = _RunInRootFrame$Deter[1];\n        if (sampleStack && controlStack) {\n          var sampleLines = sampleStack.split(\"\\n\"),\n            controlLines = controlStack.split(\"\\n\");\n          for (\n            _RunInRootFrame$Deter = namePropDescriptor = 0;\n            namePropDescriptor < sampleLines.length &&\n            !sampleLines[namePropDescriptor].includes(\n              \"DetermineComponentFrameRoot\"\n            );\n\n          )\n            namePropDescriptor++;\n          for (\n            ;\n            _RunInRootFrame$Deter < controlLines.length &&\n            !controlLines[_RunInRootFrame$Deter].includes(\n              \"DetermineComponentFrameRoot\"\n            );\n\n          )\n            _RunInRootFrame$Deter++;\n          if (\n            namePropDescriptor === sampleLines.length ||\n            _RunInRootFrame$Deter === controlLines.length\n          )\n            for (\n              namePropDescriptor = sampleLines.length - 1,\n                _RunInRootFrame$Deter = controlLines.length - 1;\n              1 <= namePropDescriptor &&\n              0 <= _RunInRootFrame$Deter &&\n              sampleLines[namePropDescriptor] !==\n                controlLines[_RunInRootFrame$Deter];\n\n            )\n              _RunInRootFrame$Deter--;\n          for (\n            ;\n            1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter;\n            namePropDescriptor--, _RunInRootFrame$Deter--\n          )\n            if (\n              sampleLines[namePropDescriptor] !==\n              controlLines[_RunInRootFrame$Deter]\n            ) {\n              if (1 !== namePropDescriptor || 1 !== _RunInRootFrame$Deter) {\n                do\n                  if (\n                    (namePropDescriptor--,\n                    _RunInRootFrame$Deter--,\n                    0 > _RunInRootFrame$Deter ||\n                      sampleLines[namePropDescriptor] !==\n                        controlLines[_RunInRootFrame$Deter])\n                  ) {\n                    var _frame =\n                      \"\\n\" +\n                      sampleLines[namePropDescriptor].replace(\n                        \" at new \",\n                        \" at \"\n                      );\n                    fn.displayName &&\n                      _frame.includes(\"<anonymous>\") &&\n                      (_frame = _frame.replace(\"<anonymous>\", fn.displayName));\n                    \"function\" === typeof fn &&\n                      componentFrameCache.set(fn, _frame);\n                    return _frame;\n                  }\n                while (1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter);\n              }\n              break;\n            }\n        }\n      } finally {\n        (reentry = !1),\n          (ReactSharedInternals.H = previousDispatcher),\n          reenableLogs(),\n          (Error.prepareStackTrace = frame);\n      }\n      sampleLines = (sampleLines = fn ? fn.displayName || fn.name : \"\")\n        ? describeBuiltInComponentFrame(sampleLines)\n        : \"\";\n      \"function\" === typeof fn && componentFrameCache.set(fn, sampleLines);\n      return sampleLines;\n    }\n    function describeFiber(fiber, childFiber) {\n      switch (fiber.tag) {\n        case 26:\n        case 27:\n        case 5:\n          return describeBuiltInComponentFrame(fiber.type);\n        case 16:\n          return describeBuiltInComponentFrame(\"Lazy\");\n        case 13:\n          return fiber.child !== childFiber && null !== childFiber\n            ? describeBuiltInComponentFrame(\"Suspense Fallback\")\n            : describeBuiltInComponentFrame(\"Suspense\");\n        case 19:\n          return describeBuiltInComponentFrame(\"SuspenseList\");\n        case 0:\n        case 15:\n          return describeNativeComponentFrame(fiber.type, !1);\n        case 11:\n          return describeNativeComponentFrame(fiber.type.render, !1);\n        case 1:\n          return describeNativeComponentFrame(fiber.type, !0);\n        case 31:\n          return describeBuiltInComponentFrame(\"Activity\");\n        default:\n          return \"\";\n      }\n    }\n    function getStackByFiberInDevAndProd(workInProgress) {\n      try {\n        var info = \"\",\n          previous = null;\n        do {\n          info += describeFiber(workInProgress, previous);\n          var debugInfo = workInProgress._debugInfo;\n          if (debugInfo)\n            for (var i = debugInfo.length - 1; 0 <= i; i--) {\n              var entry = debugInfo[i];\n              if (\"string\" === typeof entry.name) {\n                var JSCompiler_temp_const = info;\n                a: {\n                  var name = entry.name,\n                    env = entry.env,\n                    location = entry.debugLocation;\n                  if (null != location) {\n                    var childStack = formatOwnerStack(location),\n                      idx = childStack.lastIndexOf(\"\\n\"),\n                      lastLine =\n                        -1 === idx ? childStack : childStack.slice(idx + 1);\n                    if (-1 !== lastLine.indexOf(name)) {\n                      var JSCompiler_inline_result = \"\\n\" + lastLine;\n                      break a;\n                    }\n                  }\n                  JSCompiler_inline_result = describeBuiltInComponentFrame(\n                    name + (env ? \" [\" + env + \"]\" : \"\")\n                  );\n                }\n                info = JSCompiler_temp_const + JSCompiler_inline_result;\n              }\n            }\n          previous = workInProgress;\n          workInProgress = workInProgress.return;\n        } while (workInProgress);\n        return info;\n      } catch (x) {\n        return \"\\nError generating stack: \" + x.message + \"\\n\" + x.stack;\n      }\n    }\n    function describeFunctionComponentFrameWithoutLineNumber(fn) {\n      return (fn = fn ? fn.displayName || fn.name : \"\")\n        ? describeBuiltInComponentFrame(fn)\n        : \"\";\n    }\n    function getCurrentFiberOwnerNameInDevOrNull() {\n      if (null === current) return null;\n      var owner = current._debugOwner;\n      return null != owner ? getComponentNameFromOwner(owner) : null;\n    }\n    function getCurrentFiberStackInDev() {\n      if (null === current) return \"\";\n      var workInProgress = current;\n      try {\n        var info = \"\";\n        6 === workInProgress.tag && (workInProgress = workInProgress.return);\n        switch (workInProgress.tag) {\n          case 26:\n          case 27:\n          case 5:\n            info += describeBuiltInComponentFrame(workInProgress.type);\n            break;\n          case 13:\n            info += describeBuiltInComponentFrame(\"Suspense\");\n            break;\n          case 19:\n            info += describeBuiltInComponentFrame(\"SuspenseList\");\n            break;\n          case 31:\n            info += describeBuiltInComponentFrame(\"Activity\");\n            break;\n          case 30:\n          case 0:\n          case 15:\n          case 1:\n            workInProgress._debugOwner ||\n              \"\" !== info ||\n              (info += describeFunctionComponentFrameWithoutLineNumber(\n                workInProgress.type\n              ));\n            break;\n          case 11:\n            workInProgress._debugOwner ||\n              \"\" !== info ||\n              (info += describeFunctionComponentFrameWithoutLineNumber(\n                workInProgress.type.render\n              ));\n        }\n        for (; workInProgress; )\n          if (\"number\" === typeof workInProgress.tag) {\n            var fiber = workInProgress;\n            workInProgress = fiber._debugOwner;\n            var debugStack = fiber._debugStack;\n            if (workInProgress && debugStack) {\n              var formattedStack = formatOwnerStack(debugStack);\n              \"\" !== formattedStack && (info += \"\\n\" + formattedStack);\n            }\n          } else if (null != workInProgress.debugStack) {\n            var ownerStack = workInProgress.debugStack;\n            (workInProgress = workInProgress.owner) &&\n              ownerStack &&\n              (info += \"\\n\" + formatOwnerStack(ownerStack));\n          } else break;\n        var JSCompiler_inline_result = info;\n      } catch (x) {\n        JSCompiler_inline_result =\n          \"\\nError generating stack: \" + x.message + \"\\n\" + x.stack;\n      }\n      return JSCompiler_inline_result;\n    }\n    function runWithFiberInDEV(fiber, callback, arg0, arg1, arg2, arg3, arg4) {\n      var previousFiber = current;\n      setCurrentFiber(fiber);\n      try {\n        return null !== fiber && fiber._debugTask\n          ? fiber._debugTask.run(\n              callback.bind(null, arg0, arg1, arg2, arg3, arg4)\n            )\n          : callback(arg0, arg1, arg2, arg3, arg4);\n      } finally {\n        setCurrentFiber(previousFiber);\n      }\n      throw Error(\n        \"runWithFiberInDEV should never be called in production. This is a bug in React.\"\n      );\n    }\n    function setCurrentFiber(fiber) {\n      ReactSharedInternals.getCurrentStack =\n        null === fiber ? null : getCurrentFiberStackInDev;\n      isRendering = !1;\n      current = fiber;\n    }\n    function typeName(value) {\n      return (\n        (\"function\" === typeof Symbol &&\n          Symbol.toStringTag &&\n          value[Symbol.toStringTag]) ||\n        value.constructor.name ||\n        \"Object\"\n      );\n    }\n    function willCoercionThrow(value) {\n      try {\n        return testStringCoercion(value), !1;\n      } catch (e) {\n        return !0;\n      }\n    }\n    function testStringCoercion(value) {\n      return \"\" + value;\n    }\n    function checkAttributeStringCoercion(value, attributeName) {\n      if (willCoercionThrow(value))\n        return (\n          console.error(\n            \"The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before using it here.\",\n            attributeName,\n            typeName(value)\n          ),\n          testStringCoercion(value)\n        );\n    }\n    function checkCSSPropertyStringCoercion(value, propName) {\n      if (willCoercionThrow(value))\n        return (\n          console.error(\n            \"The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before using it here.\",\n            propName,\n            typeName(value)\n          ),\n          testStringCoercion(value)\n        );\n    }\n    function checkFormFieldValueStringCoercion(value) {\n      if (willCoercionThrow(value))\n        return (\n          console.error(\n            \"Form field values (value, checked, defaultValue, or defaultChecked props) must be strings, not %s. This value must be coerced to a string before using it here.\",\n            typeName(value)\n          ),\n          testStringCoercion(value)\n        );\n    }\n    function injectInternals(internals) {\n      if (\"undefined\" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) return !1;\n      var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__;\n      if (hook.isDisabled) return !0;\n      if (!hook.supportsFiber)\n        return (\n          console.error(\n            \"The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://react.dev/link/react-devtools\"\n          ),\n          !0\n        );\n      try {\n        (rendererID = hook.inject(internals)), (injectedHook = hook);\n      } catch (err) {\n        console.error(\"React instrumentation encountered an error: %o.\", err);\n      }\n      return hook.checkDCE ? !0 : !1;\n    }\n    function setIsStrictModeForDevtools(newIsStrictMode) {\n      \"function\" === typeof log$1 &&\n        unstable_setDisableYieldValue(newIsStrictMode);\n      if (injectedHook && \"function\" === typeof injectedHook.setStrictMode)\n        try {\n          injectedHook.setStrictMode(rendererID, newIsStrictMode);\n        } catch (err) {\n          hasLoggedError ||\n            ((hasLoggedError = !0),\n            console.error(\n              \"React instrumentation encountered an error: %o\",\n              err\n            ));\n        }\n    }\n    function clz32Fallback(x) {\n      x >>>= 0;\n      return 0 === x ? 32 : (31 - ((log(x) / LN2) | 0)) | 0;\n    }\n    function getHighestPriorityLanes(lanes) {\n      var pendingSyncLanes = lanes & 42;\n      if (0 !== pendingSyncLanes) return pendingSyncLanes;\n      switch (lanes & -lanes) {\n        case 1:\n          return 1;\n        case 2:\n          return 2;\n        case 4:\n          return 4;\n        case 8:\n          return 8;\n        case 16:\n          return 16;\n        case 32:\n          return 32;\n        case 64:\n          return 64;\n        case 128:\n          return 128;\n        case 256:\n        case 512:\n        case 1024:\n        case 2048:\n        case 4096:\n        case 8192:\n        case 16384:\n        case 32768:\n        case 65536:\n        case 131072:\n          return lanes & 261888;\n        case 262144:\n        case 524288:\n        case 1048576:\n        case 2097152:\n          return lanes & 3932160;\n        case 4194304:\n        case 8388608:\n        case 16777216:\n        case 33554432:\n          return lanes & 62914560;\n        case 67108864:\n          return 67108864;\n        case 134217728:\n          return 134217728;\n        case 268435456:\n          return 268435456;\n        case 536870912:\n          return 536870912;\n        case 1073741824:\n          return 0;\n        default:\n          return (\n            console.error(\n              \"Should have found matching lanes. This is a bug in React.\"\n            ),\n            lanes\n          );\n      }\n    }\n    function getNextLanes(root, wipLanes, rootHasPendingCommit) {\n      var pendingLanes = root.pendingLanes;\n      if (0 === pendingLanes) return 0;\n      var nextLanes = 0,\n        suspendedLanes = root.suspendedLanes,\n        pingedLanes = root.pingedLanes;\n      root = root.warmLanes;\n      var nonIdlePendingLanes = pendingLanes & 134217727;\n      0 !== nonIdlePendingLanes\n        ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes),\n          0 !== pendingLanes\n            ? (nextLanes = getHighestPriorityLanes(pendingLanes))\n            : ((pingedLanes &= nonIdlePendingLanes),\n              0 !== pingedLanes\n                ? (nextLanes = getHighestPriorityLanes(pingedLanes))\n                : rootHasPendingCommit ||\n                  ((rootHasPendingCommit = nonIdlePendingLanes & ~root),\n                  0 !== rootHasPendingCommit &&\n                    (nextLanes =\n                      getHighestPriorityLanes(rootHasPendingCommit)))))\n        : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes),\n          0 !== nonIdlePendingLanes\n            ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes))\n            : 0 !== pingedLanes\n              ? (nextLanes = getHighestPriorityLanes(pingedLanes))\n              : rootHasPendingCommit ||\n                ((rootHasPendingCommit = pendingLanes & ~root),\n                0 !== rootHasPendingCommit &&\n                  (nextLanes = getHighestPriorityLanes(rootHasPendingCommit))));\n      return 0 === nextLanes\n        ? 0\n        : 0 !== wipLanes &&\n            wipLanes !== nextLanes &&\n            0 === (wipLanes & suspendedLanes) &&\n            ((suspendedLanes = nextLanes & -nextLanes),\n            (rootHasPendingCommit = wipLanes & -wipLanes),\n            suspendedLanes >= rootHasPendingCommit ||\n              (32 === suspendedLanes && 0 !== (rootHasPendingCommit & 4194048)))\n          ? wipLanes\n          : nextLanes;\n    }\n    function checkIfRootIsPrerendering(root, renderLanes) {\n      return (\n        0 ===\n        (root.pendingLanes &\n          ~(root.suspendedLanes & ~root.pingedLanes) &\n          renderLanes)\n      );\n    }\n    function computeExpirationTime(lane, currentTime) {\n      switch (lane) {\n        case 1:\n        case 2:\n        case 4:\n        case 8:\n        case 64:\n          return currentTime + 250;\n        case 16:\n        case 32:\n        case 128:\n        case 256:\n        case 512:\n        case 1024:\n        case 2048:\n        case 4096:\n        case 8192:\n        case 16384:\n        case 32768:\n        case 65536:\n        case 131072:\n        case 262144:\n        case 524288:\n        case 1048576:\n        case 2097152:\n          return currentTime + 5e3;\n        case 4194304:\n        case 8388608:\n        case 16777216:\n        case 33554432:\n          return -1;\n        case 67108864:\n        case 134217728:\n        case 268435456:\n        case 536870912:\n        case 1073741824:\n          return -1;\n        default:\n          return (\n            console.error(\n              \"Should have found matching lanes. This is a bug in React.\"\n            ),\n            -1\n          );\n      }\n    }\n    function claimNextRetryLane() {\n      var lane = nextRetryLane;\n      nextRetryLane <<= 1;\n      0 === (nextRetryLane & 62914560) && (nextRetryLane = 4194304);\n      return lane;\n    }\n    function createLaneMap(initial) {\n      for (var laneMap = [], i = 0; 31 > i; i++) laneMap.push(initial);\n      return laneMap;\n    }\n    function markRootUpdated$1(root, updateLane) {\n      root.pendingLanes |= updateLane;\n      268435456 !== updateLane &&\n        ((root.suspendedLanes = 0),\n        (root.pingedLanes = 0),\n        (root.warmLanes = 0));\n    }\n    function markRootFinished(\n      root,\n      finishedLanes,\n      remainingLanes,\n      spawnedLane,\n      updatedLanes,\n      suspendedRetryLanes\n    ) {\n      var previouslyPendingLanes = root.pendingLanes;\n      root.pendingLanes = remainingLanes;\n      root.suspendedLanes = 0;\n      root.pingedLanes = 0;\n      root.warmLanes = 0;\n      root.expiredLanes &= remainingLanes;\n      root.entangledLanes &= remainingLanes;\n      root.errorRecoveryDisabledLanes &= remainingLanes;\n      root.shellSuspendCounter = 0;\n      var entanglements = root.entanglements,\n        expirationTimes = root.expirationTimes,\n        hiddenUpdates = root.hiddenUpdates;\n      for (\n        remainingLanes = previouslyPendingLanes & ~remainingLanes;\n        0 < remainingLanes;\n\n      ) {\n        var index = 31 - clz32(remainingLanes),\n          lane = 1 << index;\n        entanglements[index] = 0;\n        expirationTimes[index] = -1;\n        var hiddenUpdatesForLane = hiddenUpdates[index];\n        if (null !== hiddenUpdatesForLane)\n          for (\n            hiddenUpdates[index] = null, index = 0;\n            index < hiddenUpdatesForLane.length;\n            index++\n          ) {\n            var update = hiddenUpdatesForLane[index];\n            null !== update && (update.lane &= -536870913);\n          }\n        remainingLanes &= ~lane;\n      }\n      0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0);\n      0 !== suspendedRetryLanes &&\n        0 === updatedLanes &&\n        0 !== root.tag &&\n        (root.suspendedLanes |=\n          suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes));\n    }\n    function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) {\n      root.pendingLanes |= spawnedLane;\n      root.suspendedLanes &= ~spawnedLane;\n      var spawnedLaneIndex = 31 - clz32(spawnedLane);\n      root.entangledLanes |= spawnedLane;\n      root.entanglements[spawnedLaneIndex] =\n        root.entanglements[spawnedLaneIndex] |\n        1073741824 |\n        (entangledLanes & 261930);\n    }\n    function markRootEntangled(root, entangledLanes) {\n      var rootEntangledLanes = (root.entangledLanes |= entangledLanes);\n      for (root = root.entanglements; rootEntangledLanes; ) {\n        var index = 31 - clz32(rootEntangledLanes),\n          lane = 1 << index;\n        (lane & entangledLanes) | (root[index] & entangledLanes) &&\n          (root[index] |= entangledLanes);\n        rootEntangledLanes &= ~lane;\n      }\n    }\n    function getBumpedLaneForHydration(root, renderLanes) {\n      var renderLane = renderLanes & -renderLanes;\n      renderLane =\n        0 !== (renderLane & 42)\n          ? 1\n          : getBumpedLaneForHydrationByLane(renderLane);\n      return 0 !== (renderLane & (root.suspendedLanes | renderLanes))\n        ? 0\n        : renderLane;\n    }\n    function getBumpedLaneForHydrationByLane(lane) {\n      switch (lane) {\n        case 2:\n          lane = 1;\n          break;\n        case 8:\n          lane = 4;\n          break;\n        case 32:\n          lane = 16;\n          break;\n        case 256:\n        case 512:\n        case 1024:\n        case 2048:\n        case 4096:\n        case 8192:\n        case 16384:\n        case 32768:\n        case 65536:\n        case 131072:\n        case 262144:\n        case 524288:\n        case 1048576:\n        case 2097152:\n        case 4194304:\n        case 8388608:\n        case 16777216:\n        case 33554432:\n          lane = 128;\n          break;\n        case 268435456:\n          lane = 134217728;\n          break;\n        default:\n          lane = 0;\n      }\n      return lane;\n    }\n    function addFiberToLanesMap(root, fiber, lanes) {\n      if (isDevToolsPresent)\n        for (root = root.pendingUpdatersLaneMap; 0 < lanes; ) {\n          var index = 31 - clz32(lanes),\n            lane = 1 << index;\n          root[index].add(fiber);\n          lanes &= ~lane;\n        }\n    }\n    function movePendingFibersToMemoized(root, lanes) {\n      if (isDevToolsPresent)\n        for (\n          var pendingUpdatersLaneMap = root.pendingUpdatersLaneMap,\n            memoizedUpdaters = root.memoizedUpdaters;\n          0 < lanes;\n\n        ) {\n          var index = 31 - clz32(lanes);\n          root = 1 << index;\n          index = pendingUpdatersLaneMap[index];\n          0 < index.size &&\n            (index.forEach(function (fiber) {\n              var alternate = fiber.alternate;\n              (null !== alternate && memoizedUpdaters.has(alternate)) ||\n                memoizedUpdaters.add(fiber);\n            }),\n            index.clear());\n          lanes &= ~root;\n        }\n    }\n    function lanesToEventPriority(lanes) {\n      lanes &= -lanes;\n      return 0 !== DiscreteEventPriority && DiscreteEventPriority < lanes\n        ? 0 !== ContinuousEventPriority && ContinuousEventPriority < lanes\n          ? 0 !== (lanes & 134217727)\n            ? DefaultEventPriority\n            : IdleEventPriority\n          : ContinuousEventPriority\n        : DiscreteEventPriority;\n    }\n    function resolveUpdatePriority() {\n      var updatePriority = ReactDOMSharedInternals.p;\n      if (0 !== updatePriority) return updatePriority;\n      updatePriority = window.event;\n      return void 0 === updatePriority\n        ? DefaultEventPriority\n        : getEventPriority(updatePriority.type);\n    }\n    function runWithPriority(priority, fn) {\n      var previousPriority = ReactDOMSharedInternals.p;\n      try {\n        return (ReactDOMSharedInternals.p = priority), fn();\n      } finally {\n        ReactDOMSharedInternals.p = previousPriority;\n      }\n    }\n    function detachDeletedInstance(node) {\n      delete node[internalInstanceKey];\n      delete node[internalPropsKey];\n      delete node[internalEventHandlersKey];\n      delete node[internalEventHandlerListenersKey];\n      delete node[internalEventHandlesSetKey];\n    }\n    function getClosestInstanceFromNode(targetNode) {\n      var targetInst = targetNode[internalInstanceKey];\n      if (targetInst) return targetInst;\n      for (var parentNode = targetNode.parentNode; parentNode; ) {\n        if (\n          (targetInst =\n            parentNode[internalContainerInstanceKey] ||\n            parentNode[internalInstanceKey])\n        ) {\n          parentNode = targetInst.alternate;\n          if (\n            null !== targetInst.child ||\n            (null !== parentNode && null !== parentNode.child)\n          )\n            for (\n              targetNode = getParentHydrationBoundary(targetNode);\n              null !== targetNode;\n\n            ) {\n              if ((parentNode = targetNode[internalInstanceKey]))\n                return parentNode;\n              targetNode = getParentHydrationBoundary(targetNode);\n            }\n          return targetInst;\n        }\n        targetNode = parentNode;\n        parentNode = targetNode.parentNode;\n      }\n      return null;\n    }\n    function getInstanceFromNode(node) {\n      if (\n        (node = node[internalInstanceKey] || node[internalContainerInstanceKey])\n      ) {\n        var tag = node.tag;\n        if (\n          5 === tag ||\n          6 === tag ||\n          13 === tag ||\n          31 === tag ||\n          26 === tag ||\n          27 === tag ||\n          3 === tag\n        )\n          return node;\n      }\n      return null;\n    }\n    function getNodeFromInstance(inst) {\n      var tag = inst.tag;\n      if (5 === tag || 26 === tag || 27 === tag || 6 === tag)\n        return inst.stateNode;\n      throw Error(\"getNodeFromInstance: Invalid argument.\");\n    }\n    function getResourcesFromRoot(root) {\n      var resources = root[internalRootNodeResourcesKey];\n      resources ||\n        (resources = root[internalRootNodeResourcesKey] =\n          { hoistableStyles: new Map(), hoistableScripts: new Map() });\n      return resources;\n    }\n    function markNodeAsHoistable(node) {\n      node[internalHoistableMarker] = !0;\n    }\n    function registerTwoPhaseEvent(registrationName, dependencies) {\n      registerDirectEvent(registrationName, dependencies);\n      registerDirectEvent(registrationName + \"Capture\", dependencies);\n    }\n    function registerDirectEvent(registrationName, dependencies) {\n      registrationNameDependencies[registrationName] &&\n        console.error(\n          \"EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.\",\n          registrationName\n        );\n      registrationNameDependencies[registrationName] = dependencies;\n      var lowerCasedName = registrationName.toLowerCase();\n      possibleRegistrationNames[lowerCasedName] = registrationName;\n      \"onDoubleClick\" === registrationName &&\n        (possibleRegistrationNames.ondblclick = registrationName);\n      for (\n        registrationName = 0;\n        registrationName < dependencies.length;\n        registrationName++\n      )\n        allNativeEvents.add(dependencies[registrationName]);\n    }\n    function checkControlledValueProps(tagName, props) {\n      hasReadOnlyValue[props.type] ||\n        props.onChange ||\n        props.onInput ||\n        props.readOnly ||\n        props.disabled ||\n        null == props.value ||\n        (\"select\" === tagName\n          ? console.error(\n              \"You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set `onChange`.\"\n            )\n          : console.error(\n              \"You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.\"\n            ));\n      props.onChange ||\n        props.readOnly ||\n        props.disabled ||\n        null == props.checked ||\n        console.error(\n          \"You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.\"\n        );\n    }\n    function isAttributeNameSafe(attributeName) {\n      if (hasOwnProperty.call(validatedAttributeNameCache, attributeName))\n        return !0;\n      if (hasOwnProperty.call(illegalAttributeNameCache, attributeName))\n        return !1;\n      if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName))\n        return (validatedAttributeNameCache[attributeName] = !0);\n      illegalAttributeNameCache[attributeName] = !0;\n      console.error(\"Invalid attribute name: `%s`\", attributeName);\n      return !1;\n    }\n    function getValueForAttributeOnCustomComponent(node, name, expected) {\n      if (isAttributeNameSafe(name)) {\n        if (!node.hasAttribute(name)) {\n          switch (typeof expected) {\n            case \"symbol\":\n            case \"object\":\n              return expected;\n            case \"function\":\n              return expected;\n            case \"boolean\":\n              if (!1 === expected) return expected;\n          }\n          return void 0 === expected ? void 0 : null;\n        }\n        node = node.getAttribute(name);\n        if (\"\" === node && !0 === expected) return !0;\n        checkAttributeStringCoercion(expected, name);\n        return node === \"\" + expected ? expected : node;\n      }\n    }\n    function setValueForAttribute(node, name, value) {\n      if (isAttributeNameSafe(name))\n        if (null === value) node.removeAttribute(name);\n        else {\n          switch (typeof value) {\n            case \"undefined\":\n            case \"function\":\n            case \"symbol\":\n              node.removeAttribute(name);\n              return;\n            case \"boolean\":\n              var prefix = name.toLowerCase().slice(0, 5);\n              if (\"data-\" !== prefix && \"aria-\" !== prefix) {\n                node.removeAttribute(name);\n                return;\n              }\n          }\n          checkAttributeStringCoercion(value, name);\n          node.setAttribute(name, \"\" + value);\n        }\n    }\n    function setValueForKnownAttribute(node, name, value) {\n      if (null === value) node.removeAttribute(name);\n      else {\n        switch (typeof value) {\n          case \"undefined\":\n          case \"function\":\n          case \"symbol\":\n          case \"boolean\":\n            node.removeAttribute(name);\n            return;\n        }\n        checkAttributeStringCoercion(value, name);\n        node.setAttribute(name, \"\" + value);\n      }\n    }\n    function setValueForNamespacedAttribute(node, namespace, name, value) {\n      if (null === value) node.removeAttribute(name);\n      else {\n        switch (typeof value) {\n          case \"undefined\":\n          case \"function\":\n          case \"symbol\":\n          case \"boolean\":\n            node.removeAttribute(name);\n            return;\n        }\n        checkAttributeStringCoercion(value, name);\n        node.setAttributeNS(namespace, name, \"\" + value);\n      }\n    }\n    function getToStringValue(value) {\n      switch (typeof value) {\n        case \"bigint\":\n        case \"boolean\":\n        case \"number\":\n        case \"string\":\n        case \"undefined\":\n          return value;\n        case \"object\":\n          return checkFormFieldValueStringCoercion(value), value;\n        default:\n          return \"\";\n      }\n    }\n    function isCheckable(elem) {\n      var type = elem.type;\n      return (\n        (elem = elem.nodeName) &&\n        \"input\" === elem.toLowerCase() &&\n        (\"checkbox\" === type || \"radio\" === type)\n      );\n    }\n    function trackValueOnNode(node, valueField, currentValue) {\n      var descriptor = Object.getOwnPropertyDescriptor(\n        node.constructor.prototype,\n        valueField\n      );\n      if (\n        !node.hasOwnProperty(valueField) &&\n        \"undefined\" !== typeof descriptor &&\n        \"function\" === typeof descriptor.get &&\n        \"function\" === typeof descriptor.set\n      ) {\n        var get = descriptor.get,\n          set = descriptor.set;\n        Object.defineProperty(node, valueField, {\n          configurable: !0,\n          get: function () {\n            return get.call(this);\n          },\n          set: function (value) {\n            checkFormFieldValueStringCoercion(value);\n            currentValue = \"\" + value;\n            set.call(this, value);\n          }\n        });\n        Object.defineProperty(node, valueField, {\n          enumerable: descriptor.enumerable\n        });\n        return {\n          getValue: function () {\n            return currentValue;\n          },\n          setValue: function (value) {\n            checkFormFieldValueStringCoercion(value);\n            currentValue = \"\" + value;\n          },\n          stopTracking: function () {\n            node._valueTracker = null;\n            delete node[valueField];\n          }\n        };\n      }\n    }\n    function track(node) {\n      if (!node._valueTracker) {\n        var valueField = isCheckable(node) ? \"checked\" : \"value\";\n        node._valueTracker = trackValueOnNode(\n          node,\n          valueField,\n          \"\" + node[valueField]\n        );\n      }\n    }\n    function updateValueIfChanged(node) {\n      if (!node) return !1;\n      var tracker = node._valueTracker;\n      if (!tracker) return !0;\n      var lastValue = tracker.getValue();\n      var value = \"\";\n      node &&\n        (value = isCheckable(node)\n          ? node.checked\n            ? \"true\"\n            : \"false\"\n          : node.value);\n      node = value;\n      return node !== lastValue ? (tracker.setValue(node), !0) : !1;\n    }\n    function getActiveElement(doc) {\n      doc = doc || (\"undefined\" !== typeof document ? document : void 0);\n      if (\"undefined\" === typeof doc) return null;\n      try {\n        return doc.activeElement || doc.body;\n      } catch (e) {\n        return doc.body;\n      }\n    }\n    function escapeSelectorAttributeValueInsideDoubleQuotes(value) {\n      return value.replace(\n        escapeSelectorAttributeValueInsideDoubleQuotesRegex,\n        function (ch) {\n          return \"\\\\\" + ch.charCodeAt(0).toString(16) + \" \";\n        }\n      );\n    }\n    function validateInputProps(element, props) {\n      void 0 === props.checked ||\n        void 0 === props.defaultChecked ||\n        didWarnCheckedDefaultChecked ||\n        (console.error(\n          \"%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components\",\n          getCurrentFiberOwnerNameInDevOrNull() || \"A component\",\n          props.type\n        ),\n        (didWarnCheckedDefaultChecked = !0));\n      void 0 === props.value ||\n        void 0 === props.defaultValue ||\n        didWarnValueDefaultValue$1 ||\n        (console.error(\n          \"%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components\",\n          getCurrentFiberOwnerNameInDevOrNull() || \"A component\",\n          props.type\n        ),\n        (didWarnValueDefaultValue$1 = !0));\n    }\n    function updateInput(\n      element,\n      value,\n      defaultValue,\n      lastDefaultValue,\n      checked,\n      defaultChecked,\n      type,\n      name\n    ) {\n      element.name = \"\";\n      null != type &&\n      \"function\" !== typeof type &&\n      \"symbol\" !== typeof type &&\n      \"boolean\" !== typeof type\n        ? (checkAttributeStringCoercion(type, \"type\"), (element.type = type))\n        : element.removeAttribute(\"type\");\n      if (null != value)\n        if (\"number\" === type) {\n          if ((0 === value && \"\" === element.value) || element.value != value)\n            element.value = \"\" + getToStringValue(value);\n        } else\n          element.value !== \"\" + getToStringValue(value) &&\n            (element.value = \"\" + getToStringValue(value));\n      else\n        (\"submit\" !== type && \"reset\" !== type) ||\n          element.removeAttribute(\"value\");\n      null != value\n        ? setDefaultValue(element, type, getToStringValue(value))\n        : null != defaultValue\n          ? setDefaultValue(element, type, getToStringValue(defaultValue))\n          : null != lastDefaultValue && element.removeAttribute(\"value\");\n      null == checked &&\n        null != defaultChecked &&\n        (element.defaultChecked = !!defaultChecked);\n      null != checked &&\n        (element.checked =\n          checked &&\n          \"function\" !== typeof checked &&\n          \"symbol\" !== typeof checked);\n      null != name &&\n      \"function\" !== typeof name &&\n      \"symbol\" !== typeof name &&\n      \"boolean\" !== typeof name\n        ? (checkAttributeStringCoercion(name, \"name\"),\n          (element.name = \"\" + getToStringValue(name)))\n        : element.removeAttribute(\"name\");\n    }\n    function initInput(\n      element,\n      value,\n      defaultValue,\n      checked,\n      defaultChecked,\n      type,\n      name,\n      isHydrating\n    ) {\n      null != type &&\n        \"function\" !== typeof type &&\n        \"symbol\" !== typeof type &&\n        \"boolean\" !== typeof type &&\n        (checkAttributeStringCoercion(type, \"type\"), (element.type = type));\n      if (null != value || null != defaultValue) {\n        if (\n          !(\n            (\"submit\" !== type && \"reset\" !== type) ||\n            (void 0 !== value && null !== value)\n          )\n        ) {\n          track(element);\n          return;\n        }\n        defaultValue =\n          null != defaultValue ? \"\" + getToStringValue(defaultValue) : \"\";\n        value = null != value ? \"\" + getToStringValue(value) : defaultValue;\n        isHydrating || value === element.value || (element.value = value);\n        element.defaultValue = value;\n      }\n      checked = null != checked ? checked : defaultChecked;\n      checked =\n        \"function\" !== typeof checked &&\n        \"symbol\" !== typeof checked &&\n        !!checked;\n      element.checked = isHydrating ? element.checked : !!checked;\n      element.defaultChecked = !!checked;\n      null != name &&\n        \"function\" !== typeof name &&\n        \"symbol\" !== typeof name &&\n        \"boolean\" !== typeof name &&\n        (checkAttributeStringCoercion(name, \"name\"), (element.name = name));\n      track(element);\n    }\n    function setDefaultValue(node, type, value) {\n      (\"number\" === type && getActiveElement(node.ownerDocument) === node) ||\n        node.defaultValue === \"\" + value ||\n        (node.defaultValue = \"\" + value);\n    }\n    function validateOptionProps(element, props) {\n      null == props.value &&\n        (\"object\" === typeof props.children && null !== props.children\n          ? React.Children.forEach(props.children, function (child) {\n              null == child ||\n                \"string\" === typeof child ||\n                \"number\" === typeof child ||\n                \"bigint\" === typeof child ||\n                didWarnInvalidChild ||\n                ((didWarnInvalidChild = !0),\n                console.error(\n                  \"Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>.\"\n                ));\n            })\n          : null == props.dangerouslySetInnerHTML ||\n            didWarnInvalidInnerHTML ||\n            ((didWarnInvalidInnerHTML = !0),\n            console.error(\n              \"Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected.\"\n            )));\n      null == props.selected ||\n        didWarnSelectedSetOnOption ||\n        (console.error(\n          \"Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>.\"\n        ),\n        (didWarnSelectedSetOnOption = !0));\n    }\n    function getDeclarationErrorAddendum() {\n      var ownerName = getCurrentFiberOwnerNameInDevOrNull();\n      return ownerName\n        ? \"\\n\\nCheck the render method of `\" + ownerName + \"`.\"\n        : \"\";\n    }\n    function updateOptions(node, multiple, propValue, setDefaultSelected) {\n      node = node.options;\n      if (multiple) {\n        multiple = {};\n        for (var i = 0; i < propValue.length; i++)\n          multiple[\"$\" + propValue[i]] = !0;\n        for (propValue = 0; propValue < node.length; propValue++)\n          (i = multiple.hasOwnProperty(\"$\" + node[propValue].value)),\n            node[propValue].selected !== i && (node[propValue].selected = i),\n            i && setDefaultSelected && (node[propValue].defaultSelected = !0);\n      } else {\n        propValue = \"\" + getToStringValue(propValue);\n        multiple = null;\n        for (i = 0; i < node.length; i++) {\n          if (node[i].value === propValue) {\n            node[i].selected = !0;\n            setDefaultSelected && (node[i].defaultSelected = !0);\n            return;\n          }\n          null !== multiple || node[i].disabled || (multiple = node[i]);\n        }\n        null !== multiple && (multiple.selected = !0);\n      }\n    }\n    function validateSelectProps(element, props) {\n      for (element = 0; element < valuePropNames.length; element++) {\n        var propName = valuePropNames[element];\n        if (null != props[propName]) {\n          var propNameIsArray = isArrayImpl(props[propName]);\n          props.multiple && !propNameIsArray\n            ? console.error(\n                \"The `%s` prop supplied to <select> must be an array if `multiple` is true.%s\",\n                propName,\n                getDeclarationErrorAddendum()\n              )\n            : !props.multiple &&\n              propNameIsArray &&\n              console.error(\n                \"The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.%s\",\n                propName,\n                getDeclarationErrorAddendum()\n              );\n        }\n      }\n      void 0 === props.value ||\n        void 0 === props.defaultValue ||\n        didWarnValueDefaultValue ||\n        (console.error(\n          \"Select elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled select element and remove one of these props. More info: https://react.dev/link/controlled-components\"\n        ),\n        (didWarnValueDefaultValue = !0));\n    }\n    function validateTextareaProps(element, props) {\n      void 0 === props.value ||\n        void 0 === props.defaultValue ||\n        didWarnValDefaultVal ||\n        (console.error(\n          \"%s contains a textarea with both value and defaultValue props. Textarea elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled textarea and remove one of these props. More info: https://react.dev/link/controlled-components\",\n          getCurrentFiberOwnerNameInDevOrNull() || \"A component\"\n        ),\n        (didWarnValDefaultVal = !0));\n      null != props.children &&\n        null == props.value &&\n        console.error(\n          \"Use the `defaultValue` or `value` props instead of setting children on <textarea>.\"\n        );\n    }\n    function updateTextarea(element, value, defaultValue) {\n      if (\n        null != value &&\n        ((value = \"\" + getToStringValue(value)),\n        value !== element.value && (element.value = value),\n        null == defaultValue)\n      ) {\n        element.defaultValue !== value && (element.defaultValue = value);\n        return;\n      }\n      element.defaultValue =\n        null != defaultValue ? \"\" + getToStringValue(defaultValue) : \"\";\n    }\n    function initTextarea(element, value, defaultValue, children) {\n      if (null == value) {\n        if (null != children) {\n          if (null != defaultValue)\n            throw Error(\n              \"If you supply `defaultValue` on a <textarea>, do not pass children.\"\n            );\n          if (isArrayImpl(children)) {\n            if (1 < children.length)\n              throw Error(\"<textarea> can only have at most one child.\");\n            children = children[0];\n          }\n          defaultValue = children;\n        }\n        null == defaultValue && (defaultValue = \"\");\n        value = defaultValue;\n      }\n      defaultValue = getToStringValue(value);\n      element.defaultValue = defaultValue;\n      children = element.textContent;\n      children === defaultValue &&\n        \"\" !== children &&\n        null !== children &&\n        (element.value = children);\n      track(element);\n    }\n    function findNotableNode(node, indent) {\n      return void 0 === node.serverProps &&\n        0 === node.serverTail.length &&\n        1 === node.children.length &&\n        3 < node.distanceFromLeaf &&\n        node.distanceFromLeaf > 15 - indent\n        ? findNotableNode(node.children[0], indent)\n        : node;\n    }\n    function indentation(indent) {\n      return \"  \" + \"  \".repeat(indent);\n    }\n    function added(indent) {\n      return \"+ \" + \"  \".repeat(indent);\n    }\n    function removed(indent) {\n      return \"- \" + \"  \".repeat(indent);\n    }\n    function describeFiberType(fiber) {\n      switch (fiber.tag) {\n        case 26:\n        case 27:\n        case 5:\n          return fiber.type;\n        case 16:\n          return \"Lazy\";\n        case 31:\n          return \"Activity\";\n        case 13:\n          return \"Suspense\";\n        case 19:\n          return \"SuspenseList\";\n        case 0:\n        case 15:\n          return (fiber = fiber.type), fiber.displayName || fiber.name || null;\n        case 11:\n          return (\n            (fiber = fiber.type.render), fiber.displayName || fiber.name || null\n          );\n        case 1:\n          return (fiber = fiber.type), fiber.displayName || fiber.name || null;\n        default:\n          return null;\n      }\n    }\n    function describeTextNode(content, maxLength) {\n      return needsEscaping.test(content)\n        ? ((content = JSON.stringify(content)),\n          content.length > maxLength - 2\n            ? 8 > maxLength\n              ? '{\"...\"}'\n              : \"{\" + content.slice(0, maxLength - 7) + '...\"}'\n            : \"{\" + content + \"}\")\n        : content.length > maxLength\n          ? 5 > maxLength\n            ? '{\"...\"}'\n            : content.slice(0, maxLength - 3) + \"...\"\n          : content;\n    }\n    function describeTextDiff(clientText, serverProps, indent) {\n      var maxLength = 120 - 2 * indent;\n      if (null === serverProps)\n        return added(indent) + describeTextNode(clientText, maxLength) + \"\\n\";\n      if (\"string\" === typeof serverProps) {\n        for (\n          var firstDiff = 0;\n          firstDiff < serverProps.length &&\n          firstDiff < clientText.length &&\n          serverProps.charCodeAt(firstDiff) ===\n            clientText.charCodeAt(firstDiff);\n          firstDiff++\n        );\n        firstDiff > maxLength - 8 &&\n          10 < firstDiff &&\n          ((clientText = \"...\" + clientText.slice(firstDiff - 8)),\n          (serverProps = \"...\" + serverProps.slice(firstDiff - 8)));\n        return (\n          added(indent) +\n          describeTextNode(clientText, maxLength) +\n          \"\\n\" +\n          removed(indent) +\n          describeTextNode(serverProps, maxLength) +\n          \"\\n\"\n        );\n      }\n      return (\n        indentation(indent) + describeTextNode(clientText, maxLength) + \"\\n\"\n      );\n    }\n    function objectName(object) {\n      return Object.prototype.toString\n        .call(object)\n        .replace(/^\\[object (.*)\\]$/, function (m, p0) {\n          return p0;\n        });\n    }\n    function describeValue(value, maxLength) {\n      switch (typeof value) {\n        case \"string\":\n          return (\n            (value = JSON.stringify(value)),\n            value.length > maxLength\n              ? 5 > maxLength\n                ? '\"...\"'\n                : value.slice(0, maxLength - 4) + '...\"'\n              : value\n          );\n        case \"object\":\n          if (null === value) return \"null\";\n          if (isArrayImpl(value)) return \"[...]\";\n          if (value.$$typeof === REACT_ELEMENT_TYPE)\n            return (maxLength = getComponentNameFromType(value.type))\n              ? \"<\" + maxLength + \">\"\n              : \"<...>\";\n          var name = objectName(value);\n          if (\"Object\" === name) {\n            name = \"\";\n            maxLength -= 2;\n            for (var propName in value)\n              if (value.hasOwnProperty(propName)) {\n                var jsonPropName = JSON.stringify(propName);\n                jsonPropName !== '\"' + propName + '\"' &&\n                  (propName = jsonPropName);\n                maxLength -= propName.length - 2;\n                jsonPropName = describeValue(\n                  value[propName],\n                  15 > maxLength ? maxLength : 15\n                );\n                maxLength -= jsonPropName.length;\n                if (0 > maxLength) {\n                  name += \"\" === name ? \"...\" : \", ...\";\n                  break;\n                }\n                name +=\n                  (\"\" === name ? \"\" : \",\") + propName + \":\" + jsonPropName;\n              }\n            return \"{\" + name + \"}\";\n          }\n          return name;\n        case \"function\":\n          return (maxLength = value.displayName || value.name)\n            ? \"function \" + maxLength\n            : \"function\";\n        default:\n          return String(value);\n      }\n    }\n    function describePropValue(value, maxLength) {\n      return \"string\" !== typeof value || needsEscaping.test(value)\n        ? \"{\" + describeValue(value, maxLength - 2) + \"}\"\n        : value.length > maxLength - 2\n          ? 5 > maxLength\n            ? '\"...\"'\n            : '\"' + value.slice(0, maxLength - 5) + '...\"'\n          : '\"' + value + '\"';\n    }\n    function describeExpandedElement(type, props, rowPrefix) {\n      var remainingRowLength = 120 - rowPrefix.length - type.length,\n        properties = [],\n        propName;\n      for (propName in props)\n        if (props.hasOwnProperty(propName) && \"children\" !== propName) {\n          var propValue = describePropValue(\n            props[propName],\n            120 - rowPrefix.length - propName.length - 1\n          );\n          remainingRowLength -= propName.length + propValue.length + 2;\n          properties.push(propName + \"=\" + propValue);\n        }\n      return 0 === properties.length\n        ? rowPrefix + \"<\" + type + \">\\n\"\n        : 0 < remainingRowLength\n          ? rowPrefix + \"<\" + type + \" \" + properties.join(\" \") + \">\\n\"\n          : rowPrefix +\n            \"<\" +\n            type +\n            \"\\n\" +\n            rowPrefix +\n            \"  \" +\n            properties.join(\"\\n\" + rowPrefix + \"  \") +\n            \"\\n\" +\n            rowPrefix +\n            \">\\n\";\n    }\n    function describePropertiesDiff(clientObject, serverObject, indent) {\n      var properties = \"\",\n        remainingServerProperties = assign({}, serverObject),\n        propName;\n      for (propName in clientObject)\n        if (clientObject.hasOwnProperty(propName)) {\n          delete remainingServerProperties[propName];\n          var maxLength = 120 - 2 * indent - propName.length - 2,\n            clientPropValue = describeValue(clientObject[propName], maxLength);\n          serverObject.hasOwnProperty(propName)\n            ? ((maxLength = describeValue(serverObject[propName], maxLength)),\n              (properties +=\n                added(indent) + propName + \": \" + clientPropValue + \"\\n\"),\n              (properties +=\n                removed(indent) + propName + \": \" + maxLength + \"\\n\"))\n            : (properties +=\n                added(indent) + propName + \": \" + clientPropValue + \"\\n\");\n        }\n      for (var _propName in remainingServerProperties)\n        remainingServerProperties.hasOwnProperty(_propName) &&\n          ((clientObject = describeValue(\n            remainingServerProperties[_propName],\n            120 - 2 * indent - _propName.length - 2\n          )),\n          (properties +=\n            removed(indent) + _propName + \": \" + clientObject + \"\\n\"));\n      return properties;\n    }\n    function describeElementDiff(type, clientProps, serverProps, indent) {\n      var content = \"\",\n        serverPropNames = new Map();\n      for (propName$jscomp$0 in serverProps)\n        serverProps.hasOwnProperty(propName$jscomp$0) &&\n          serverPropNames.set(\n            propName$jscomp$0.toLowerCase(),\n            propName$jscomp$0\n          );\n      if (1 === serverPropNames.size && serverPropNames.has(\"children\"))\n        content += describeExpandedElement(\n          type,\n          clientProps,\n          indentation(indent)\n        );\n      else {\n        for (var _propName2 in clientProps)\n          if (\n            clientProps.hasOwnProperty(_propName2) &&\n            \"children\" !== _propName2\n          ) {\n            var maxLength$jscomp$0 =\n                120 - 2 * (indent + 1) - _propName2.length - 1,\n              serverPropName = serverPropNames.get(_propName2.toLowerCase());\n            if (void 0 !== serverPropName) {\n              serverPropNames.delete(_propName2.toLowerCase());\n              var propName$jscomp$0 = clientProps[_propName2];\n              serverPropName = serverProps[serverPropName];\n              var clientPropValue = describePropValue(\n                propName$jscomp$0,\n                maxLength$jscomp$0\n              );\n              maxLength$jscomp$0 = describePropValue(\n                serverPropName,\n                maxLength$jscomp$0\n              );\n              \"object\" === typeof propName$jscomp$0 &&\n              null !== propName$jscomp$0 &&\n              \"object\" === typeof serverPropName &&\n              null !== serverPropName &&\n              \"Object\" === objectName(propName$jscomp$0) &&\n              \"Object\" === objectName(serverPropName) &&\n              (2 < Object.keys(propName$jscomp$0).length ||\n                2 < Object.keys(serverPropName).length ||\n                -1 < clientPropValue.indexOf(\"...\") ||\n                -1 < maxLength$jscomp$0.indexOf(\"...\"))\n                ? (content +=\n                    indentation(indent + 1) +\n                    _propName2 +\n                    \"={{\\n\" +\n                    describePropertiesDiff(\n                      propName$jscomp$0,\n                      serverPropName,\n                      indent + 2\n                    ) +\n                    indentation(indent + 1) +\n                    \"}}\\n\")\n                : ((content +=\n                    added(indent + 1) +\n                    _propName2 +\n                    \"=\" +\n                    clientPropValue +\n                    \"\\n\"),\n                  (content +=\n                    removed(indent + 1) +\n                    _propName2 +\n                    \"=\" +\n                    maxLength$jscomp$0 +\n                    \"\\n\"));\n            } else\n              content +=\n                indentation(indent + 1) +\n                _propName2 +\n                \"=\" +\n                describePropValue(clientProps[_propName2], maxLength$jscomp$0) +\n                \"\\n\";\n          }\n        serverPropNames.forEach(function (propName) {\n          if (\"children\" !== propName) {\n            var maxLength = 120 - 2 * (indent + 1) - propName.length - 1;\n            content +=\n              removed(indent + 1) +\n              propName +\n              \"=\" +\n              describePropValue(serverProps[propName], maxLength) +\n              \"\\n\";\n          }\n        });\n        content =\n          \"\" === content\n            ? indentation(indent) + \"<\" + type + \">\\n\"\n            : indentation(indent) +\n              \"<\" +\n              type +\n              \"\\n\" +\n              content +\n              indentation(indent) +\n              \">\\n\";\n      }\n      type = serverProps.children;\n      clientProps = clientProps.children;\n      if (\n        \"string\" === typeof type ||\n        \"number\" === typeof type ||\n        \"bigint\" === typeof type\n      ) {\n        serverPropNames = \"\";\n        if (\n          \"string\" === typeof clientProps ||\n          \"number\" === typeof clientProps ||\n          \"bigint\" === typeof clientProps\n        )\n          serverPropNames = \"\" + clientProps;\n        content += describeTextDiff(serverPropNames, \"\" + type, indent + 1);\n      } else if (\n        \"string\" === typeof clientProps ||\n        \"number\" === typeof clientProps ||\n        \"bigint\" === typeof clientProps\n      )\n        content =\n          null == type\n            ? content + describeTextDiff(\"\" + clientProps, null, indent + 1)\n            : content + describeTextDiff(\"\" + clientProps, void 0, indent + 1);\n      return content;\n    }\n    function describeSiblingFiber(fiber, indent) {\n      var type = describeFiberType(fiber);\n      if (null === type) {\n        type = \"\";\n        for (fiber = fiber.child; fiber; )\n          (type += describeSiblingFiber(fiber, indent)),\n            (fiber = fiber.sibling);\n        return type;\n      }\n      return indentation(indent) + \"<\" + type + \">\\n\";\n    }\n    function describeNode(node, indent) {\n      var skipToNode = findNotableNode(node, indent);\n      if (\n        skipToNode !== node &&\n        (1 !== node.children.length || node.children[0] !== skipToNode)\n      )\n        return (\n          indentation(indent) + \"...\\n\" + describeNode(skipToNode, indent + 1)\n        );\n      skipToNode = \"\";\n      var debugInfo = node.fiber._debugInfo;\n      if (debugInfo)\n        for (var i = 0; i < debugInfo.length; i++) {\n          var serverComponentName = debugInfo[i].name;\n          \"string\" === typeof serverComponentName &&\n            ((skipToNode +=\n              indentation(indent) + \"<\" + serverComponentName + \">\\n\"),\n            indent++);\n        }\n      debugInfo = \"\";\n      i = node.fiber.pendingProps;\n      if (6 === node.fiber.tag)\n        (debugInfo = describeTextDiff(i, node.serverProps, indent)), indent++;\n      else if (\n        ((serverComponentName = describeFiberType(node.fiber)),\n        null !== serverComponentName)\n      )\n        if (void 0 === node.serverProps) {\n          debugInfo = indent;\n          var maxLength = 120 - 2 * debugInfo - serverComponentName.length - 2,\n            content = \"\";\n          for (propName in i)\n            if (i.hasOwnProperty(propName) && \"children\" !== propName) {\n              var propValue = describePropValue(i[propName], 15);\n              maxLength -= propName.length + propValue.length + 2;\n              if (0 > maxLength) {\n                content += \" ...\";\n                break;\n              }\n              content += \" \" + propName + \"=\" + propValue;\n            }\n          debugInfo =\n            indentation(debugInfo) +\n            \"<\" +\n            serverComponentName +\n            content +\n            \">\\n\";\n          indent++;\n        } else\n          null === node.serverProps\n            ? ((debugInfo = describeExpandedElement(\n                serverComponentName,\n                i,\n                added(indent)\n              )),\n              indent++)\n            : \"string\" === typeof node.serverProps\n              ? console.error(\n                  \"Should not have matched a non HostText fiber to a Text node. This is a bug in React.\"\n                )\n              : ((debugInfo = describeElementDiff(\n                  serverComponentName,\n                  i,\n                  node.serverProps,\n                  indent\n                )),\n                indent++);\n      var propName = \"\";\n      i = node.fiber.child;\n      for (\n        serverComponentName = 0;\n        i && serverComponentName < node.children.length;\n\n      )\n        (maxLength = node.children[serverComponentName]),\n          maxLength.fiber === i\n            ? ((propName += describeNode(maxLength, indent)),\n              serverComponentName++)\n            : (propName += describeSiblingFiber(i, indent)),\n          (i = i.sibling);\n      i &&\n        0 < node.children.length &&\n        (propName += indentation(indent) + \"...\\n\");\n      i = node.serverTail;\n      null === node.serverProps && indent--;\n      for (node = 0; node < i.length; node++)\n        (serverComponentName = i[node]),\n          (propName =\n            \"string\" === typeof serverComponentName\n              ? propName +\n                (removed(indent) +\n                  describeTextNode(serverComponentName, 120 - 2 * indent) +\n                  \"\\n\")\n              : propName +\n                describeExpandedElement(\n                  serverComponentName.type,\n                  serverComponentName.props,\n                  removed(indent)\n                ));\n      return skipToNode + debugInfo + propName;\n    }\n    function describeDiff(rootNode) {\n      try {\n        return \"\\n\\n\" + describeNode(rootNode, 0);\n      } catch (x) {\n        return \"\";\n      }\n    }\n    function describeAncestors(ancestor, child, props) {\n      for (var fiber = child, node = null, distanceFromLeaf = 0; fiber; )\n        fiber === ancestor && (distanceFromLeaf = 0),\n          (node = {\n            fiber: fiber,\n            children: null !== node ? [node] : [],\n            serverProps:\n              fiber === child ? props : fiber === ancestor ? null : void 0,\n            serverTail: [],\n            distanceFromLeaf: distanceFromLeaf\n          }),\n          distanceFromLeaf++,\n          (fiber = fiber.return);\n      return null !== node ? describeDiff(node).replaceAll(/^[+-]/gm, \">\") : \"\";\n    }\n    function updatedAncestorInfoDev(oldInfo, tag) {\n      var ancestorInfo = assign({}, oldInfo || emptyAncestorInfoDev),\n        info = { tag: tag };\n      -1 !== inScopeTags.indexOf(tag) &&\n        ((ancestorInfo.aTagInScope = null),\n        (ancestorInfo.buttonTagInScope = null),\n        (ancestorInfo.nobrTagInScope = null));\n      -1 !== buttonScopeTags.indexOf(tag) &&\n        (ancestorInfo.pTagInButtonScope = null);\n      -1 !== specialTags.indexOf(tag) &&\n        \"address\" !== tag &&\n        \"div\" !== tag &&\n        \"p\" !== tag &&\n        ((ancestorInfo.listItemTagAutoclosing = null),\n        (ancestorInfo.dlItemTagAutoclosing = null));\n      ancestorInfo.current = info;\n      \"form\" === tag && (ancestorInfo.formTag = info);\n      \"a\" === tag && (ancestorInfo.aTagInScope = info);\n      \"button\" === tag && (ancestorInfo.buttonTagInScope = info);\n      \"nobr\" === tag && (ancestorInfo.nobrTagInScope = info);\n      \"p\" === tag && (ancestorInfo.pTagInButtonScope = info);\n      \"li\" === tag && (ancestorInfo.listItemTagAutoclosing = info);\n      if (\"dd\" === tag || \"dt\" === tag)\n        ancestorInfo.dlItemTagAutoclosing = info;\n      \"#document\" === tag || \"html\" === tag\n        ? (ancestorInfo.containerTagInScope = null)\n        : ancestorInfo.containerTagInScope ||\n          (ancestorInfo.containerTagInScope = info);\n      null !== oldInfo ||\n      (\"#document\" !== tag && \"html\" !== tag && \"body\" !== tag)\n        ? !0 === ancestorInfo.implicitRootScope &&\n          (ancestorInfo.implicitRootScope = !1)\n        : (ancestorInfo.implicitRootScope = !0);\n      return ancestorInfo;\n    }\n    function isTagValidWithParent(tag, parentTag, implicitRootScope) {\n      switch (parentTag) {\n        case \"select\":\n          return (\n            \"hr\" === tag ||\n            \"option\" === tag ||\n            \"optgroup\" === tag ||\n            \"script\" === tag ||\n            \"template\" === tag ||\n            \"#text\" === tag\n          );\n        case \"optgroup\":\n          return \"option\" === tag || \"#text\" === tag;\n        case \"option\":\n          return \"#text\" === tag;\n        case \"tr\":\n          return (\n            \"th\" === tag ||\n            \"td\" === tag ||\n            \"style\" === tag ||\n            \"script\" === tag ||\n            \"template\" === tag\n          );\n        case \"tbody\":\n        case \"thead\":\n        case \"tfoot\":\n          return (\n            \"tr\" === tag ||\n            \"style\" === tag ||\n            \"script\" === tag ||\n            \"template\" === tag\n          );\n        case \"colgroup\":\n          return \"col\" === tag || \"template\" === tag;\n        case \"table\":\n          return (\n            \"caption\" === tag ||\n            \"colgroup\" === tag ||\n            \"tbody\" === tag ||\n            \"tfoot\" === tag ||\n            \"thead\" === tag ||\n            \"style\" === tag ||\n            \"script\" === tag ||\n            \"template\" === tag\n          );\n        case \"head\":\n          return (\n            \"base\" === tag ||\n            \"basefont\" === tag ||\n            \"bgsound\" === tag ||\n            \"link\" === tag ||\n            \"meta\" === tag ||\n            \"title\" === tag ||\n            \"noscript\" === tag ||\n            \"noframes\" === tag ||\n            \"style\" === tag ||\n            \"script\" === tag ||\n            \"template\" === tag\n          );\n        case \"html\":\n          if (implicitRootScope) break;\n          return \"head\" === tag || \"body\" === tag || \"frameset\" === tag;\n        case \"frameset\":\n          return \"frame\" === tag;\n        case \"#document\":\n          if (!implicitRootScope) return \"html\" === tag;\n      }\n      switch (tag) {\n        case \"h1\":\n        case \"h2\":\n        case \"h3\":\n        case \"h4\":\n        case \"h5\":\n        case \"h6\":\n          return (\n            \"h1\" !== parentTag &&\n            \"h2\" !== parentTag &&\n            \"h3\" !== parentTag &&\n            \"h4\" !== parentTag &&\n            \"h5\" !== parentTag &&\n            \"h6\" !== parentTag\n          );\n        case \"rp\":\n        case \"rt\":\n          return -1 === impliedEndTags.indexOf(parentTag);\n        case \"caption\":\n        case \"col\":\n        case \"colgroup\":\n        case \"frameset\":\n        case \"frame\":\n        case \"tbody\":\n        case \"td\":\n        case \"tfoot\":\n        case \"th\":\n        case \"thead\":\n        case \"tr\":\n          return null == parentTag;\n        case \"head\":\n          return implicitRootScope || null === parentTag;\n        case \"html\":\n          return (\n            (implicitRootScope && \"#document\" === parentTag) ||\n            null === parentTag\n          );\n        case \"body\":\n          return (\n            (implicitRootScope &&\n              (\"#document\" === parentTag || \"html\" === parentTag)) ||\n            null === parentTag\n          );\n      }\n      return !0;\n    }\n    function findInvalidAncestorForTag(tag, ancestorInfo) {\n      switch (tag) {\n        case \"address\":\n        case \"article\":\n        case \"aside\":\n        case \"blockquote\":\n        case \"center\":\n        case \"details\":\n        case \"dialog\":\n        case \"dir\":\n        case \"div\":\n        case \"dl\":\n        case \"fieldset\":\n        case \"figcaption\":\n        case \"figure\":\n        case \"footer\":\n        case \"header\":\n        case \"hgroup\":\n        case \"main\":\n        case \"menu\":\n        case \"nav\":\n        case \"ol\":\n        case \"p\":\n        case \"section\":\n        case \"summary\":\n        case \"ul\":\n        case \"pre\":\n        case \"listing\":\n        case \"table\":\n        case \"hr\":\n        case \"xmp\":\n        case \"h1\":\n        case \"h2\":\n        case \"h3\":\n        case \"h4\":\n        case \"h5\":\n        case \"h6\":\n          return ancestorInfo.pTagInButtonScope;\n        case \"form\":\n          return ancestorInfo.formTag || ancestorInfo.pTagInButtonScope;\n        case \"li\":\n          return ancestorInfo.listItemTagAutoclosing;\n        case \"dd\":\n        case \"dt\":\n          return ancestorInfo.dlItemTagAutoclosing;\n        case \"button\":\n          return ancestorInfo.buttonTagInScope;\n        case \"a\":\n          return ancestorInfo.aTagInScope;\n        case \"nobr\":\n          return ancestorInfo.nobrTagInScope;\n      }\n      return null;\n    }\n    function findAncestor(parent, tagName) {\n      for (; parent; ) {\n        switch (parent.tag) {\n          case 5:\n          case 26:\n          case 27:\n            if (parent.type === tagName) return parent;\n        }\n        parent = parent.return;\n      }\n      return null;\n    }\n    function validateDOMNesting(childTag, ancestorInfo) {\n      ancestorInfo = ancestorInfo || emptyAncestorInfoDev;\n      var parentInfo = ancestorInfo.current;\n      ancestorInfo = (parentInfo = isTagValidWithParent(\n        childTag,\n        parentInfo && parentInfo.tag,\n        ancestorInfo.implicitRootScope\n      )\n        ? null\n        : parentInfo)\n        ? null\n        : findInvalidAncestorForTag(childTag, ancestorInfo);\n      ancestorInfo = parentInfo || ancestorInfo;\n      if (!ancestorInfo) return !0;\n      var ancestorTag = ancestorInfo.tag;\n      ancestorInfo = String(!!parentInfo) + \"|\" + childTag + \"|\" + ancestorTag;\n      if (didWarn[ancestorInfo]) return !1;\n      didWarn[ancestorInfo] = !0;\n      var ancestor = (ancestorInfo = current)\n          ? findAncestor(ancestorInfo.return, ancestorTag)\n          : null,\n        ancestorDescription =\n          null !== ancestorInfo && null !== ancestor\n            ? describeAncestors(ancestor, ancestorInfo, null)\n            : \"\",\n        tagDisplayName = \"<\" + childTag + \">\";\n      parentInfo\n        ? ((parentInfo = \"\"),\n          \"table\" === ancestorTag &&\n            \"tr\" === childTag &&\n            (parentInfo +=\n              \" Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by the browser.\"),\n          console.error(\n            \"In HTML, %s cannot be a child of <%s>.%s\\nThis will cause a hydration error.%s\",\n            tagDisplayName,\n            ancestorTag,\n            parentInfo,\n            ancestorDescription\n          ))\n        : console.error(\n            \"In HTML, %s cannot be a descendant of <%s>.\\nThis will cause a hydration error.%s\",\n            tagDisplayName,\n            ancestorTag,\n            ancestorDescription\n          );\n      ancestorInfo &&\n        ((childTag = ancestorInfo.return),\n        null === ancestor ||\n          null === childTag ||\n          (ancestor === childTag &&\n            childTag._debugOwner === ancestorInfo._debugOwner) ||\n          runWithFiberInDEV(ancestor, function () {\n            console.error(\n              \"<%s> cannot contain a nested %s.\\nSee this log for the ancestor stack trace.\",\n              ancestorTag,\n              tagDisplayName\n            );\n          }));\n      return !1;\n    }\n    function validateTextNesting(childText, parentTag, implicitRootScope) {\n      if (implicitRootScope || isTagValidWithParent(\"#text\", parentTag, !1))\n        return !0;\n      implicitRootScope = \"#text|\" + parentTag;\n      if (didWarn[implicitRootScope]) return !1;\n      didWarn[implicitRootScope] = !0;\n      var ancestor = (implicitRootScope = current)\n        ? findAncestor(implicitRootScope, parentTag)\n        : null;\n      implicitRootScope =\n        null !== implicitRootScope && null !== ancestor\n          ? describeAncestors(\n              ancestor,\n              implicitRootScope,\n              6 !== implicitRootScope.tag ? { children: null } : null\n            )\n          : \"\";\n      /\\S/.test(childText)\n        ? console.error(\n            \"In HTML, text nodes cannot be a child of <%s>.\\nThis will cause a hydration error.%s\",\n            parentTag,\n            implicitRootScope\n          )\n        : console.error(\n            \"In HTML, whitespace text nodes cannot be a child of <%s>. Make sure you don't have any extra whitespace between tags on each line of your source code.\\nThis will cause a hydration error.%s\",\n            parentTag,\n            implicitRootScope\n          );\n      return !1;\n    }\n    function setTextContent(node, text) {\n      if (text) {\n        var firstChild = node.firstChild;\n        if (\n          firstChild &&\n          firstChild === node.lastChild &&\n          3 === firstChild.nodeType\n        ) {\n          firstChild.nodeValue = text;\n          return;\n        }\n      }\n      node.textContent = text;\n    }\n    function camelize(string) {\n      return string.replace(hyphenPattern, function (_, character) {\n        return character.toUpperCase();\n      });\n    }\n    function setValueForStyle(style, styleName, value) {\n      var isCustomProperty = 0 === styleName.indexOf(\"--\");\n      isCustomProperty ||\n        (-1 < styleName.indexOf(\"-\")\n          ? (warnedStyleNames.hasOwnProperty(styleName) &&\n              warnedStyleNames[styleName]) ||\n            ((warnedStyleNames[styleName] = !0),\n            console.error(\n              \"Unsupported style property %s. Did you mean %s?\",\n              styleName,\n              camelize(styleName.replace(msPattern, \"ms-\"))\n            ))\n          : badVendoredStyleNamePattern.test(styleName)\n            ? (warnedStyleNames.hasOwnProperty(styleName) &&\n                warnedStyleNames[styleName]) ||\n              ((warnedStyleNames[styleName] = !0),\n              console.error(\n                \"Unsupported vendor-prefixed style property %s. Did you mean %s?\",\n                styleName,\n                styleName.charAt(0).toUpperCase() + styleName.slice(1)\n              ))\n            : !badStyleValueWithSemicolonPattern.test(value) ||\n              (warnedStyleValues.hasOwnProperty(value) &&\n                warnedStyleValues[value]) ||\n              ((warnedStyleValues[value] = !0),\n              console.error(\n                'Style property values shouldn\\'t contain a semicolon. Try \"%s: %s\" instead.',\n                styleName,\n                value.replace(badStyleValueWithSemicolonPattern, \"\")\n              )),\n        \"number\" === typeof value &&\n          (isNaN(value)\n            ? warnedForNaNValue ||\n              ((warnedForNaNValue = !0),\n              console.error(\n                \"`NaN` is an invalid value for the `%s` css style property.\",\n                styleName\n              ))\n            : isFinite(value) ||\n              warnedForInfinityValue ||\n              ((warnedForInfinityValue = !0),\n              console.error(\n                \"`Infinity` is an invalid value for the `%s` css style property.\",\n                styleName\n              ))));\n      null == value || \"boolean\" === typeof value || \"\" === value\n        ? isCustomProperty\n          ? style.setProperty(styleName, \"\")\n          : \"float\" === styleName\n            ? (style.cssFloat = \"\")\n            : (style[styleName] = \"\")\n        : isCustomProperty\n          ? style.setProperty(styleName, value)\n          : \"number\" !== typeof value ||\n              0 === value ||\n              unitlessNumbers.has(styleName)\n            ? \"float\" === styleName\n              ? (style.cssFloat = value)\n              : (checkCSSPropertyStringCoercion(value, styleName),\n                (style[styleName] = (\"\" + value).trim()))\n            : (style[styleName] = value + \"px\");\n    }\n    function setValueForStyles(node, styles, prevStyles) {\n      if (null != styles && \"object\" !== typeof styles)\n        throw Error(\n          \"The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.\"\n        );\n      styles && Object.freeze(styles);\n      node = node.style;\n      if (null != prevStyles) {\n        if (styles) {\n          var expandedUpdates = {};\n          if (prevStyles)\n            for (var key in prevStyles)\n              if (prevStyles.hasOwnProperty(key) && !styles.hasOwnProperty(key))\n                for (\n                  var longhands = shorthandToLonghand[key] || [key], i = 0;\n                  i < longhands.length;\n                  i++\n                )\n                  expandedUpdates[longhands[i]] = key;\n          for (var _key in styles)\n            if (\n              styles.hasOwnProperty(_key) &&\n              (!prevStyles || prevStyles[_key] !== styles[_key])\n            )\n              for (\n                key = shorthandToLonghand[_key] || [_key], longhands = 0;\n                longhands < key.length;\n                longhands++\n              )\n                expandedUpdates[key[longhands]] = _key;\n          _key = {};\n          for (var key$jscomp$0 in styles)\n            for (\n              key = shorthandToLonghand[key$jscomp$0] || [key$jscomp$0],\n                longhands = 0;\n              longhands < key.length;\n              longhands++\n            )\n              _key[key[longhands]] = key$jscomp$0;\n          key$jscomp$0 = {};\n          for (var _key2 in expandedUpdates)\n            if (\n              ((key = expandedUpdates[_key2]),\n              (longhands = _key[_key2]) &&\n                key !== longhands &&\n                ((i = key + \",\" + longhands), !key$jscomp$0[i]))\n            ) {\n              key$jscomp$0[i] = !0;\n              i = console;\n              var value = styles[key];\n              i.error.call(\n                i,\n                \"%s a style property during rerender (%s) when a conflicting property is set (%s) can lead to styling bugs. To avoid this, don't mix shorthand and non-shorthand properties for the same value; instead, replace the shorthand with separate values.\",\n                null == value || \"boolean\" === typeof value || \"\" === value\n                  ? \"Removing\"\n                  : \"Updating\",\n                key,\n                longhands\n              );\n            }\n        }\n        for (var styleName in prevStyles)\n          !prevStyles.hasOwnProperty(styleName) ||\n            (null != styles && styles.hasOwnProperty(styleName)) ||\n            (0 === styleName.indexOf(\"--\")\n              ? node.setProperty(styleName, \"\")\n              : \"float\" === styleName\n                ? (node.cssFloat = \"\")\n                : (node[styleName] = \"\"));\n        for (var _styleName in styles)\n          (_key2 = styles[_styleName]),\n            styles.hasOwnProperty(_styleName) &&\n              prevStyles[_styleName] !== _key2 &&\n              setValueForStyle(node, _styleName, _key2);\n      } else\n        for (expandedUpdates in styles)\n          styles.hasOwnProperty(expandedUpdates) &&\n            setValueForStyle(node, expandedUpdates, styles[expandedUpdates]);\n    }\n    function isCustomElement(tagName) {\n      if (-1 === tagName.indexOf(\"-\")) return !1;\n      switch (tagName) {\n        case \"annotation-xml\":\n        case \"color-profile\":\n        case \"font-face\":\n        case \"font-face-src\":\n        case \"font-face-uri\":\n        case \"font-face-format\":\n        case \"font-face-name\":\n        case \"missing-glyph\":\n          return !1;\n        default:\n          return !0;\n      }\n    }\n    function getAttributeAlias(name) {\n      return aliases.get(name) || name;\n    }\n    function validateProperty$1(tagName, name) {\n      if (\n        hasOwnProperty.call(warnedProperties$1, name) &&\n        warnedProperties$1[name]\n      )\n        return !0;\n      if (rARIACamel$1.test(name)) {\n        tagName = \"aria-\" + name.slice(4).toLowerCase();\n        tagName = ariaProperties.hasOwnProperty(tagName) ? tagName : null;\n        if (null == tagName)\n          return (\n            console.error(\n              \"Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.\",\n              name\n            ),\n            (warnedProperties$1[name] = !0)\n          );\n        if (name !== tagName)\n          return (\n            console.error(\n              \"Invalid ARIA attribute `%s`. Did you mean `%s`?\",\n              name,\n              tagName\n            ),\n            (warnedProperties$1[name] = !0)\n          );\n      }\n      if (rARIA$1.test(name)) {\n        tagName = name.toLowerCase();\n        tagName = ariaProperties.hasOwnProperty(tagName) ? tagName : null;\n        if (null == tagName) return (warnedProperties$1[name] = !0), !1;\n        name !== tagName &&\n          (console.error(\n            \"Unknown ARIA attribute `%s`. Did you mean `%s`?\",\n            name,\n            tagName\n          ),\n          (warnedProperties$1[name] = !0));\n      }\n      return !0;\n    }\n    function validateProperties$2(type, props) {\n      var invalidProps = [],\n        key;\n      for (key in props)\n        validateProperty$1(type, key) || invalidProps.push(key);\n      props = invalidProps\n        .map(function (prop) {\n          return \"`\" + prop + \"`\";\n        })\n        .join(\", \");\n      1 === invalidProps.length\n        ? console.error(\n            \"Invalid aria prop %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props\",\n            props,\n            type\n          )\n        : 1 < invalidProps.length &&\n          console.error(\n            \"Invalid aria props %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props\",\n            props,\n            type\n          );\n    }\n    function validateProperty(tagName, name, value, eventRegistry) {\n      if (hasOwnProperty.call(warnedProperties, name) && warnedProperties[name])\n        return !0;\n      var lowerCasedName = name.toLowerCase();\n      if (\"onfocusin\" === lowerCasedName || \"onfocusout\" === lowerCasedName)\n        return (\n          console.error(\n            \"React uses onFocus and onBlur instead of onFocusIn and onFocusOut. All React events are normalized to bubble, so onFocusIn and onFocusOut are not needed/supported by React.\"\n          ),\n          (warnedProperties[name] = !0)\n        );\n      if (\n        \"function\" === typeof value &&\n        ((\"form\" === tagName && \"action\" === name) ||\n          (\"input\" === tagName && \"formAction\" === name) ||\n          (\"button\" === tagName && \"formAction\" === name))\n      )\n        return !0;\n      if (null != eventRegistry) {\n        tagName = eventRegistry.possibleRegistrationNames;\n        if (eventRegistry.registrationNameDependencies.hasOwnProperty(name))\n          return !0;\n        eventRegistry = tagName.hasOwnProperty(lowerCasedName)\n          ? tagName[lowerCasedName]\n          : null;\n        if (null != eventRegistry)\n          return (\n            console.error(\n              \"Invalid event handler property `%s`. Did you mean `%s`?\",\n              name,\n              eventRegistry\n            ),\n            (warnedProperties[name] = !0)\n          );\n        if (EVENT_NAME_REGEX.test(name))\n          return (\n            console.error(\n              \"Unknown event handler property `%s`. It will be ignored.\",\n              name\n            ),\n            (warnedProperties[name] = !0)\n          );\n      } else if (EVENT_NAME_REGEX.test(name))\n        return (\n          INVALID_EVENT_NAME_REGEX.test(name) &&\n            console.error(\n              \"Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.\",\n              name\n            ),\n          (warnedProperties[name] = !0)\n        );\n      if (rARIA.test(name) || rARIACamel.test(name)) return !0;\n      if (\"innerhtml\" === lowerCasedName)\n        return (\n          console.error(\n            \"Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`.\"\n          ),\n          (warnedProperties[name] = !0)\n        );\n      if (\"aria\" === lowerCasedName)\n        return (\n          console.error(\n            \"The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead.\"\n          ),\n          (warnedProperties[name] = !0)\n        );\n      if (\n        \"is\" === lowerCasedName &&\n        null !== value &&\n        void 0 !== value &&\n        \"string\" !== typeof value\n      )\n        return (\n          console.error(\n            \"Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.\",\n            typeof value\n          ),\n          (warnedProperties[name] = !0)\n        );\n      if (\"number\" === typeof value && isNaN(value))\n        return (\n          console.error(\n            \"Received NaN for the `%s` attribute. If this is expected, cast the value to a string.\",\n            name\n          ),\n          (warnedProperties[name] = !0)\n        );\n      if (possibleStandardNames.hasOwnProperty(lowerCasedName)) {\n        if (\n          ((lowerCasedName = possibleStandardNames[lowerCasedName]),\n          lowerCasedName !== name)\n        )\n          return (\n            console.error(\n              \"Invalid DOM property `%s`. Did you mean `%s`?\",\n              name,\n              lowerCasedName\n            ),\n            (warnedProperties[name] = !0)\n          );\n      } else if (name !== lowerCasedName)\n        return (\n          console.error(\n            \"React does not recognize the `%s` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `%s` instead. If you accidentally passed it from a parent component, remove it from the DOM element.\",\n            name,\n            lowerCasedName\n          ),\n          (warnedProperties[name] = !0)\n        );\n      switch (name) {\n        case \"dangerouslySetInnerHTML\":\n        case \"children\":\n        case \"style\":\n        case \"suppressContentEditableWarning\":\n        case \"suppressHydrationWarning\":\n        case \"defaultValue\":\n        case \"defaultChecked\":\n        case \"innerHTML\":\n        case \"ref\":\n          return !0;\n        case \"innerText\":\n        case \"textContent\":\n          return !0;\n      }\n      switch (typeof value) {\n        case \"boolean\":\n          switch (name) {\n            case \"autoFocus\":\n            case \"checked\":\n            case \"multiple\":\n            case \"muted\":\n            case \"selected\":\n            case \"contentEditable\":\n            case \"spellCheck\":\n            case \"draggable\":\n            case \"value\":\n            case \"autoReverse\":\n            case \"externalResourcesRequired\":\n            case \"focusable\":\n            case \"preserveAlpha\":\n            case \"allowFullScreen\":\n            case \"async\":\n            case \"autoPlay\":\n            case \"controls\":\n            case \"default\":\n            case \"defer\":\n            case \"disabled\":\n            case \"disablePictureInPicture\":\n            case \"disableRemotePlayback\":\n            case \"formNoValidate\":\n            case \"hidden\":\n            case \"loop\":\n            case \"noModule\":\n            case \"noValidate\":\n            case \"open\":\n            case \"playsInline\":\n            case \"readOnly\":\n            case \"required\":\n            case \"reversed\":\n            case \"scoped\":\n            case \"seamless\":\n            case \"itemScope\":\n            case \"capture\":\n            case \"download\":\n            case \"inert\":\n              return !0;\n            default:\n              lowerCasedName = name.toLowerCase().slice(0, 5);\n              if (\"data-\" === lowerCasedName || \"aria-\" === lowerCasedName)\n                return !0;\n              value\n                ? console.error(\n                    'Received `%s` for a non-boolean attribute `%s`.\\n\\nIf you want to write it to the DOM, pass a string instead: %s=\"%s\" or %s={value.toString()}.',\n                    value,\n                    name,\n                    name,\n                    value,\n                    name\n                  )\n                : console.error(\n                    'Received `%s` for a non-boolean attribute `%s`.\\n\\nIf you want to write it to the DOM, pass a string instead: %s=\"%s\" or %s={value.toString()}.\\n\\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.',\n                    value,\n                    name,\n                    name,\n                    value,\n                    name,\n                    name,\n                    name\n                  );\n              return (warnedProperties[name] = !0);\n          }\n        case \"function\":\n        case \"symbol\":\n          return (warnedProperties[name] = !0), !1;\n        case \"string\":\n          if (\"false\" === value || \"true\" === value) {\n            switch (name) {\n              case \"checked\":\n              case \"selected\":\n              case \"multiple\":\n              case \"muted\":\n              case \"allowFullScreen\":\n              case \"async\":\n              case \"autoPlay\":\n              case \"controls\":\n              case \"default\":\n              case \"defer\":\n              case \"disabled\":\n              case \"disablePictureInPicture\":\n              case \"disableRemotePlayback\":\n              case \"formNoValidate\":\n              case \"hidden\":\n              case \"loop\":\n              case \"noModule\":\n              case \"noValidate\":\n              case \"open\":\n              case \"playsInline\":\n              case \"readOnly\":\n              case \"required\":\n              case \"reversed\":\n              case \"scoped\":\n              case \"seamless\":\n              case \"itemScope\":\n              case \"inert\":\n                break;\n              default:\n                return !0;\n            }\n            console.error(\n              \"Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?\",\n              value,\n              name,\n              \"false\" === value\n                ? \"The browser will interpret it as a truthy value.\"\n                : 'Although this works, it will not work as expected if you pass the string \"false\".',\n              name,\n              value\n            );\n            warnedProperties[name] = !0;\n          }\n      }\n      return !0;\n    }\n    function warnUnknownProperties(type, props, eventRegistry) {\n      var unknownProps = [],\n        key;\n      for (key in props)\n        validateProperty(type, key, props[key], eventRegistry) ||\n          unknownProps.push(key);\n      props = unknownProps\n        .map(function (prop) {\n          return \"`\" + prop + \"`\";\n        })\n        .join(\", \");\n      1 === unknownProps.length\n        ? console.error(\n            \"Invalid value for prop %s on <%s> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://react.dev/link/attribute-behavior \",\n            props,\n            type\n          )\n        : 1 < unknownProps.length &&\n          console.error(\n            \"Invalid values for props %s on <%s> tag. Either remove them from the element, or pass a string or number value to keep them in the DOM. For details, see https://react.dev/link/attribute-behavior \",\n            props,\n            type\n          );\n    }\n    function sanitizeURL(url) {\n      return isJavaScriptProtocol.test(\"\" + url)\n        ? \"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')\"\n        : url;\n    }\n    function noop$1() {}\n    function getEventTarget(nativeEvent) {\n      nativeEvent = nativeEvent.target || nativeEvent.srcElement || window;\n      nativeEvent.correspondingUseElement &&\n        (nativeEvent = nativeEvent.correspondingUseElement);\n      return 3 === nativeEvent.nodeType ? nativeEvent.parentNode : nativeEvent;\n    }\n    function restoreStateOfTarget(target) {\n      var internalInstance = getInstanceFromNode(target);\n      if (internalInstance && (target = internalInstance.stateNode)) {\n        var props = target[internalPropsKey] || null;\n        a: switch (\n          ((target = internalInstance.stateNode), internalInstance.type)\n        ) {\n          case \"input\":\n            updateInput(\n              target,\n              props.value,\n              props.defaultValue,\n              props.defaultValue,\n              props.checked,\n              props.defaultChecked,\n              props.type,\n              props.name\n            );\n            internalInstance = props.name;\n            if (\"radio\" === props.type && null != internalInstance) {\n              for (props = target; props.parentNode; ) props = props.parentNode;\n              checkAttributeStringCoercion(internalInstance, \"name\");\n              props = props.querySelectorAll(\n                'input[name=\"' +\n                  escapeSelectorAttributeValueInsideDoubleQuotes(\n                    \"\" + internalInstance\n                  ) +\n                  '\"][type=\"radio\"]'\n              );\n              for (\n                internalInstance = 0;\n                internalInstance < props.length;\n                internalInstance++\n              ) {\n                var otherNode = props[internalInstance];\n                if (otherNode !== target && otherNode.form === target.form) {\n                  var otherProps = otherNode[internalPropsKey] || null;\n                  if (!otherProps)\n                    throw Error(\n                      \"ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.\"\n                    );\n                  updateInput(\n                    otherNode,\n                    otherProps.value,\n                    otherProps.defaultValue,\n                    otherProps.defaultValue,\n                    otherProps.checked,\n                    otherProps.defaultChecked,\n                    otherProps.type,\n                    otherProps.name\n                  );\n                }\n              }\n              for (\n                internalInstance = 0;\n                internalInstance < props.length;\n                internalInstance++\n              )\n                (otherNode = props[internalInstance]),\n                  otherNode.form === target.form &&\n                    updateValueIfChanged(otherNode);\n            }\n            break a;\n          case \"textarea\":\n            updateTextarea(target, props.value, props.defaultValue);\n            break a;\n          case \"select\":\n            (internalInstance = props.value),\n              null != internalInstance &&\n                updateOptions(target, !!props.multiple, internalInstance, !1);\n        }\n      }\n    }\n    function batchedUpdates$1(fn, a, b) {\n      if (isInsideEventHandler) return fn(a, b);\n      isInsideEventHandler = !0;\n      try {\n        var JSCompiler_inline_result = fn(a);\n        return JSCompiler_inline_result;\n      } finally {\n        if (\n          ((isInsideEventHandler = !1),\n          null !== restoreTarget || null !== restoreQueue)\n        )\n          if (\n            (flushSyncWork$1(),\n            restoreTarget &&\n              ((a = restoreTarget),\n              (fn = restoreQueue),\n              (restoreQueue = restoreTarget = null),\n              restoreStateOfTarget(a),\n              fn))\n          )\n            for (a = 0; a < fn.length; a++) restoreStateOfTarget(fn[a]);\n      }\n    }\n    function getListener(inst, registrationName) {\n      var stateNode = inst.stateNode;\n      if (null === stateNode) return null;\n      var props = stateNode[internalPropsKey] || null;\n      if (null === props) return null;\n      stateNode = props[registrationName];\n      a: switch (registrationName) {\n        case \"onClick\":\n        case \"onClickCapture\":\n        case \"onDoubleClick\":\n        case \"onDoubleClickCapture\":\n        case \"onMouseDown\":\n        case \"onMouseDownCapture\":\n        case \"onMouseMove\":\n        case \"onMouseMoveCapture\":\n        case \"onMouseUp\":\n        case \"onMouseUpCapture\":\n        case \"onMouseEnter\":\n          (props = !props.disabled) ||\n            ((inst = inst.type),\n            (props = !(\n              \"button\" === inst ||\n              \"input\" === inst ||\n              \"select\" === inst ||\n              \"textarea\" === inst\n            )));\n          inst = !props;\n          break a;\n        default:\n          inst = !1;\n      }\n      if (inst) return null;\n      if (stateNode && \"function\" !== typeof stateNode)\n        throw Error(\n          \"Expected `\" +\n            registrationName +\n            \"` listener to be a function, instead got a value of `\" +\n            typeof stateNode +\n            \"` type.\"\n        );\n      return stateNode;\n    }\n    function getData() {\n      if (fallbackText) return fallbackText;\n      var start,\n        startValue = startText,\n        startLength = startValue.length,\n        end,\n        endValue = \"value\" in root ? root.value : root.textContent,\n        endLength = endValue.length;\n      for (\n        start = 0;\n        start < startLength && startValue[start] === endValue[start];\n        start++\n      );\n      var minEnd = startLength - start;\n      for (\n        end = 1;\n        end <= minEnd &&\n        startValue[startLength - end] === endValue[endLength - end];\n        end++\n      );\n      return (fallbackText = endValue.slice(start, 1 < end ? 1 - end : void 0));\n    }\n    function getEventCharCode(nativeEvent) {\n      var keyCode = nativeEvent.keyCode;\n      \"charCode\" in nativeEvent\n        ? ((nativeEvent = nativeEvent.charCode),\n          0 === nativeEvent && 13 === keyCode && (nativeEvent = 13))\n        : (nativeEvent = keyCode);\n      10 === nativeEvent && (nativeEvent = 13);\n      return 32 <= nativeEvent || 13 === nativeEvent ? nativeEvent : 0;\n    }\n    function functionThatReturnsTrue() {\n      return !0;\n    }\n    function functionThatReturnsFalse() {\n      return !1;\n    }\n    function createSyntheticEvent(Interface) {\n      function SyntheticBaseEvent(\n        reactName,\n        reactEventType,\n        targetInst,\n        nativeEvent,\n        nativeEventTarget\n      ) {\n        this._reactName = reactName;\n        this._targetInst = targetInst;\n        this.type = reactEventType;\n        this.nativeEvent = nativeEvent;\n        this.target = nativeEventTarget;\n        this.currentTarget = null;\n        for (var propName in Interface)\n          Interface.hasOwnProperty(propName) &&\n            ((reactName = Interface[propName]),\n            (this[propName] = reactName\n              ? reactName(nativeEvent)\n              : nativeEvent[propName]));\n        this.isDefaultPrevented = (\n          null != nativeEvent.defaultPrevented\n            ? nativeEvent.defaultPrevented\n            : !1 === nativeEvent.returnValue\n        )\n          ? functionThatReturnsTrue\n          : functionThatReturnsFalse;\n        this.isPropagationStopped = functionThatReturnsFalse;\n        return this;\n      }\n      assign(SyntheticBaseEvent.prototype, {\n        preventDefault: function () {\n          this.defaultPrevented = !0;\n          var event = this.nativeEvent;\n          event &&\n            (event.preventDefault\n              ? event.preventDefault()\n              : \"unknown\" !== typeof event.returnValue &&\n                (event.returnValue = !1),\n            (this.isDefaultPrevented = functionThatReturnsTrue));\n        },\n        stopPropagation: function () {\n          var event = this.nativeEvent;\n          event &&\n            (event.stopPropagation\n              ? event.stopPropagation()\n              : \"unknown\" !== typeof event.cancelBubble &&\n                (event.cancelBubble = !0),\n            (this.isPropagationStopped = functionThatReturnsTrue));\n        },\n        persist: function () {},\n        isPersistent: functionThatReturnsTrue\n      });\n      return SyntheticBaseEvent;\n    }\n    function modifierStateGetter(keyArg) {\n      var nativeEvent = this.nativeEvent;\n      return nativeEvent.getModifierState\n        ? nativeEvent.getModifierState(keyArg)\n        : (keyArg = modifierKeyToProp[keyArg])\n          ? !!nativeEvent[keyArg]\n          : !1;\n    }\n    function getEventModifierState() {\n      return modifierStateGetter;\n    }\n    function isFallbackCompositionEnd(domEventName, nativeEvent) {\n      switch (domEventName) {\n        case \"keyup\":\n          return -1 !== END_KEYCODES.indexOf(nativeEvent.keyCode);\n        case \"keydown\":\n          return nativeEvent.keyCode !== START_KEYCODE;\n        case \"keypress\":\n        case \"mousedown\":\n        case \"focusout\":\n          return !0;\n        default:\n          return !1;\n      }\n    }\n    function getDataFromCustomEvent(nativeEvent) {\n      nativeEvent = nativeEvent.detail;\n      return \"object\" === typeof nativeEvent && \"data\" in nativeEvent\n        ? nativeEvent.data\n        : null;\n    }\n    function getNativeBeforeInputChars(domEventName, nativeEvent) {\n      switch (domEventName) {\n        case \"compositionend\":\n          return getDataFromCustomEvent(nativeEvent);\n        case \"keypress\":\n          if (nativeEvent.which !== SPACEBAR_CODE) return null;\n          hasSpaceKeypress = !0;\n          return SPACEBAR_CHAR;\n        case \"textInput\":\n          return (\n            (domEventName = nativeEvent.data),\n            domEventName === SPACEBAR_CHAR && hasSpaceKeypress\n              ? null\n              : domEventName\n          );\n        default:\n          return null;\n      }\n    }\n    function getFallbackBeforeInputChars(domEventName, nativeEvent) {\n      if (isComposing)\n        return \"compositionend\" === domEventName ||\n          (!canUseCompositionEvent &&\n            isFallbackCompositionEnd(domEventName, nativeEvent))\n          ? ((domEventName = getData()),\n            (fallbackText = startText = root = null),\n            (isComposing = !1),\n            domEventName)\n          : null;\n      switch (domEventName) {\n        case \"paste\":\n          return null;\n        case \"keypress\":\n          if (\n            !(\n              nativeEvent.ctrlKey ||\n              nativeEvent.altKey ||\n              nativeEvent.metaKey\n            ) ||\n            (nativeEvent.ctrlKey && nativeEvent.altKey)\n          ) {\n            if (nativeEvent.char && 1 < nativeEvent.char.length)\n              return nativeEvent.char;\n            if (nativeEvent.which)\n              return String.fromCharCode(nativeEvent.which);\n          }\n          return null;\n        case \"compositionend\":\n          return useFallbackCompositionData && \"ko\" !== nativeEvent.locale\n            ? null\n            : nativeEvent.data;\n        default:\n          return null;\n      }\n    }\n    function isTextInputElement(elem) {\n      var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();\n      return \"input\" === nodeName\n        ? !!supportedInputTypes[elem.type]\n        : \"textarea\" === nodeName\n          ? !0\n          : !1;\n    }\n    function isEventSupported(eventNameSuffix) {\n      if (!canUseDOM) return !1;\n      eventNameSuffix = \"on\" + eventNameSuffix;\n      var isSupported = eventNameSuffix in document;\n      isSupported ||\n        ((isSupported = document.createElement(\"div\")),\n        isSupported.setAttribute(eventNameSuffix, \"return;\"),\n        (isSupported = \"function\" === typeof isSupported[eventNameSuffix]));\n      return isSupported;\n    }\n    function createAndAccumulateChangeEvent(\n      dispatchQueue,\n      inst,\n      nativeEvent,\n      target\n    ) {\n      restoreTarget\n        ? restoreQueue\n          ? restoreQueue.push(target)\n          : (restoreQueue = [target])\n        : (restoreTarget = target);\n      inst = accumulateTwoPhaseListeners(inst, \"onChange\");\n      0 < inst.length &&\n        ((nativeEvent = new SyntheticEvent(\n          \"onChange\",\n          \"change\",\n          null,\n          nativeEvent,\n          target\n        )),\n        dispatchQueue.push({ event: nativeEvent, listeners: inst }));\n    }\n    function runEventInBatch(dispatchQueue) {\n      processDispatchQueue(dispatchQueue, 0);\n    }\n    function getInstIfValueChanged(targetInst) {\n      var targetNode = getNodeFromInstance(targetInst);\n      if (updateValueIfChanged(targetNode)) return targetInst;\n    }\n    function getTargetInstForChangeEvent(domEventName, targetInst) {\n      if (\"change\" === domEventName) return targetInst;\n    }\n    function stopWatchingForValueChange() {\n      activeElement$1 &&\n        (activeElement$1.detachEvent(\"onpropertychange\", handlePropertyChange),\n        (activeElementInst$1 = activeElement$1 = null));\n    }\n    function handlePropertyChange(nativeEvent) {\n      if (\n        \"value\" === nativeEvent.propertyName &&\n        getInstIfValueChanged(activeElementInst$1)\n      ) {\n        var dispatchQueue = [];\n        createAndAccumulateChangeEvent(\n          dispatchQueue,\n          activeElementInst$1,\n          nativeEvent,\n          getEventTarget(nativeEvent)\n        );\n        batchedUpdates$1(runEventInBatch, dispatchQueue);\n      }\n    }\n    function handleEventsForInputEventPolyfill(\n      domEventName,\n      target,\n      targetInst\n    ) {\n      \"focusin\" === domEventName\n        ? (stopWatchingForValueChange(),\n          (activeElement$1 = target),\n          (activeElementInst$1 = targetInst),\n          activeElement$1.attachEvent(\"onpropertychange\", handlePropertyChange))\n        : \"focusout\" === domEventName && stopWatchingForValueChange();\n    }\n    function getTargetInstForInputEventPolyfill(domEventName) {\n      if (\n        \"selectionchange\" === domEventName ||\n        \"keyup\" === domEventName ||\n        \"keydown\" === domEventName\n      )\n        return getInstIfValueChanged(activeElementInst$1);\n    }\n    function getTargetInstForClickEvent(domEventName, targetInst) {\n      if (\"click\" === domEventName) return getInstIfValueChanged(targetInst);\n    }\n    function getTargetInstForInputOrChangeEvent(domEventName, targetInst) {\n      if (\"input\" === domEventName || \"change\" === domEventName)\n        return getInstIfValueChanged(targetInst);\n    }\n    function is(x, y) {\n      return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n    }\n    function shallowEqual(objA, objB) {\n      if (objectIs(objA, objB)) return !0;\n      if (\n        \"object\" !== typeof objA ||\n        null === objA ||\n        \"object\" !== typeof objB ||\n        null === objB\n      )\n        return !1;\n      var keysA = Object.keys(objA),\n        keysB = Object.keys(objB);\n      if (keysA.length !== keysB.length) return !1;\n      for (keysB = 0; keysB < keysA.length; keysB++) {\n        var currentKey = keysA[keysB];\n        if (\n          !hasOwnProperty.call(objB, currentKey) ||\n          !objectIs(objA[currentKey], objB[currentKey])\n        )\n          return !1;\n      }\n      return !0;\n    }\n    function getLeafNode(node) {\n      for (; node && node.firstChild; ) node = node.firstChild;\n      return node;\n    }\n    function getNodeForCharacterOffset(root, offset) {\n      var node = getLeafNode(root);\n      root = 0;\n      for (var nodeEnd; node; ) {\n        if (3 === node.nodeType) {\n          nodeEnd = root + node.textContent.length;\n          if (root <= offset && nodeEnd >= offset)\n            return { node: node, offset: offset - root };\n          root = nodeEnd;\n        }\n        a: {\n          for (; node; ) {\n            if (node.nextSibling) {\n              node = node.nextSibling;\n              break a;\n            }\n            node = node.parentNode;\n          }\n          node = void 0;\n        }\n        node = getLeafNode(node);\n      }\n    }\n    function containsNode(outerNode, innerNode) {\n      return outerNode && innerNode\n        ? outerNode === innerNode\n          ? !0\n          : outerNode && 3 === outerNode.nodeType\n            ? !1\n            : innerNode && 3 === innerNode.nodeType\n              ? containsNode(outerNode, innerNode.parentNode)\n              : \"contains\" in outerNode\n                ? outerNode.contains(innerNode)\n                : outerNode.compareDocumentPosition\n                  ? !!(outerNode.compareDocumentPosition(innerNode) & 16)\n                  : !1\n        : !1;\n    }\n    function getActiveElementDeep(containerInfo) {\n      containerInfo =\n        null != containerInfo &&\n        null != containerInfo.ownerDocument &&\n        null != containerInfo.ownerDocument.defaultView\n          ? containerInfo.ownerDocument.defaultView\n          : window;\n      for (\n        var element = getActiveElement(containerInfo.document);\n        element instanceof containerInfo.HTMLIFrameElement;\n\n      ) {\n        try {\n          var JSCompiler_inline_result =\n            \"string\" === typeof element.contentWindow.location.href;\n        } catch (err) {\n          JSCompiler_inline_result = !1;\n        }\n        if (JSCompiler_inline_result) containerInfo = element.contentWindow;\n        else break;\n        element = getActiveElement(containerInfo.document);\n      }\n      return element;\n    }\n    function hasSelectionCapabilities(elem) {\n      var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();\n      return (\n        nodeName &&\n        ((\"input\" === nodeName &&\n          (\"text\" === elem.type ||\n            \"search\" === elem.type ||\n            \"tel\" === elem.type ||\n            \"url\" === elem.type ||\n            \"password\" === elem.type)) ||\n          \"textarea\" === nodeName ||\n          \"true\" === elem.contentEditable)\n      );\n    }\n    function constructSelectEvent(\n      dispatchQueue,\n      nativeEvent,\n      nativeEventTarget\n    ) {\n      var doc =\n        nativeEventTarget.window === nativeEventTarget\n          ? nativeEventTarget.document\n          : 9 === nativeEventTarget.nodeType\n            ? nativeEventTarget\n            : nativeEventTarget.ownerDocument;\n      mouseDown ||\n        null == activeElement ||\n        activeElement !== getActiveElement(doc) ||\n        ((doc = activeElement),\n        \"selectionStart\" in doc && hasSelectionCapabilities(doc)\n          ? (doc = { start: doc.selectionStart, end: doc.selectionEnd })\n          : ((doc = (\n              (doc.ownerDocument && doc.ownerDocument.defaultView) ||\n              window\n            ).getSelection()),\n            (doc = {\n              anchorNode: doc.anchorNode,\n              anchorOffset: doc.anchorOffset,\n              focusNode: doc.focusNode,\n              focusOffset: doc.focusOffset\n            })),\n        (lastSelection && shallowEqual(lastSelection, doc)) ||\n          ((lastSelection = doc),\n          (doc = accumulateTwoPhaseListeners(activeElementInst, \"onSelect\")),\n          0 < doc.length &&\n            ((nativeEvent = new SyntheticEvent(\n              \"onSelect\",\n              \"select\",\n              null,\n              nativeEvent,\n              nativeEventTarget\n            )),\n            dispatchQueue.push({ event: nativeEvent, listeners: doc }),\n            (nativeEvent.target = activeElement))));\n    }\n    function makePrefixMap(styleProp, eventName) {\n      var prefixes = {};\n      prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();\n      prefixes[\"Webkit\" + styleProp] = \"webkit\" + eventName;\n      prefixes[\"Moz\" + styleProp] = \"moz\" + eventName;\n      return prefixes;\n    }\n    function getVendorPrefixedEventName(eventName) {\n      if (prefixedEventNames[eventName]) return prefixedEventNames[eventName];\n      if (!vendorPrefixes[eventName]) return eventName;\n      var prefixMap = vendorPrefixes[eventName],\n        styleProp;\n      for (styleProp in prefixMap)\n        if (prefixMap.hasOwnProperty(styleProp) && styleProp in style)\n          return (prefixedEventNames[eventName] = prefixMap[styleProp]);\n      return eventName;\n    }\n    function registerSimpleEvent(domEventName, reactName) {\n      topLevelEventsToReactNames.set(domEventName, reactName);\n      registerTwoPhaseEvent(reactName, [domEventName]);\n    }\n    function getArrayKind(array) {\n      for (var kind = EMPTY_ARRAY, i = 0; i < array.length; i++) {\n        var value = array[i];\n        if (\"object\" === typeof value && null !== value)\n          if (\n            isArrayImpl(value) &&\n            2 === value.length &&\n            \"string\" === typeof value[0]\n          ) {\n            if (kind !== EMPTY_ARRAY && kind !== ENTRIES_ARRAY)\n              return COMPLEX_ARRAY;\n            kind = ENTRIES_ARRAY;\n          } else return COMPLEX_ARRAY;\n        else {\n          if (\n            \"function\" === typeof value ||\n            (\"string\" === typeof value && 50 < value.length) ||\n            (kind !== EMPTY_ARRAY && kind !== PRIMITIVE_ARRAY)\n          )\n            return COMPLEX_ARRAY;\n          kind = PRIMITIVE_ARRAY;\n        }\n      }\n      return kind;\n    }\n    function addObjectToProperties(object, properties, indent, prefix) {\n      for (var key in object)\n        hasOwnProperty.call(object, key) &&\n          \"_\" !== key[0] &&\n          addValueToProperties(key, object[key], properties, indent, prefix);\n    }\n    function addValueToProperties(\n      propertyName,\n      value,\n      properties,\n      indent,\n      prefix\n    ) {\n      switch (typeof value) {\n        case \"object\":\n          if (null === value) {\n            value = \"null\";\n            break;\n          } else {\n            if (value.$$typeof === REACT_ELEMENT_TYPE) {\n              var typeName = getComponentNameFromType(value.type) || \"\\u2026\",\n                key = value.key;\n              value = value.props;\n              var propsKeys = Object.keys(value),\n                propsLength = propsKeys.length;\n              if (null == key && 0 === propsLength) {\n                value = \"<\" + typeName + \" />\";\n                break;\n              }\n              if (\n                3 > indent ||\n                (1 === propsLength &&\n                  \"children\" === propsKeys[0] &&\n                  null == key)\n              ) {\n                value = \"<\" + typeName + \" \\u2026 />\";\n                break;\n              }\n              properties.push([\n                prefix + \"\\u00a0\\u00a0\".repeat(indent) + propertyName,\n                \"<\" + typeName\n              ]);\n              null !== key &&\n                addValueToProperties(\n                  \"key\",\n                  key,\n                  properties,\n                  indent + 1,\n                  prefix\n                );\n              propertyName = !1;\n              for (var propKey in value)\n                \"children\" === propKey\n                  ? null != value.children &&\n                    (!isArrayImpl(value.children) ||\n                      0 < value.children.length) &&\n                    (propertyName = !0)\n                  : hasOwnProperty.call(value, propKey) &&\n                    \"_\" !== propKey[0] &&\n                    addValueToProperties(\n                      propKey,\n                      value[propKey],\n                      properties,\n                      indent + 1,\n                      prefix\n                    );\n              properties.push([\n                \"\",\n                propertyName ? \">\\u2026</\" + typeName + \">\" : \"/>\"\n              ]);\n              return;\n            }\n            typeName = Object.prototype.toString.call(value);\n            typeName = typeName.slice(8, typeName.length - 1);\n            if (\"Array\" === typeName)\n              if (\n                ((propKey = getArrayKind(value)),\n                propKey === PRIMITIVE_ARRAY || propKey === EMPTY_ARRAY)\n              ) {\n                value = JSON.stringify(value);\n                break;\n              } else if (propKey === ENTRIES_ARRAY) {\n                properties.push([\n                  prefix + \"\\u00a0\\u00a0\".repeat(indent) + propertyName,\n                  \"\"\n                ]);\n                for (\n                  propertyName = 0;\n                  propertyName < value.length;\n                  propertyName++\n                )\n                  (typeName = value[propertyName]),\n                    addValueToProperties(\n                      typeName[0],\n                      typeName[1],\n                      properties,\n                      indent + 1,\n                      prefix\n                    );\n                return;\n              }\n            if (\"Promise\" === typeName) {\n              if (\"fulfilled\" === value.status) {\n                if (\n                  ((typeName = properties.length),\n                  addValueToProperties(\n                    propertyName,\n                    value.value,\n                    properties,\n                    indent,\n                    prefix\n                  ),\n                  properties.length > typeName)\n                ) {\n                  properties = properties[typeName];\n                  properties[1] =\n                    \"Promise<\" + (properties[1] || \"Object\") + \">\";\n                  return;\n                }\n              } else if (\n                \"rejected\" === value.status &&\n                ((typeName = properties.length),\n                addValueToProperties(\n                  propertyName,\n                  value.reason,\n                  properties,\n                  indent,\n                  prefix\n                ),\n                properties.length > typeName)\n              ) {\n                properties = properties[typeName];\n                properties[1] = \"Rejected Promise<\" + properties[1] + \">\";\n                return;\n              }\n              properties.push([\n                \"\\u00a0\\u00a0\".repeat(indent) + propertyName,\n                \"Promise\"\n              ]);\n              return;\n            }\n            \"Object\" === typeName &&\n              (propKey = Object.getPrototypeOf(value)) &&\n              \"function\" === typeof propKey.constructor &&\n              (typeName = propKey.constructor.name);\n            properties.push([\n              prefix + \"\\u00a0\\u00a0\".repeat(indent) + propertyName,\n              \"Object\" === typeName ? (3 > indent ? \"\" : \"\\u2026\") : typeName\n            ]);\n            3 > indent &&\n              addObjectToProperties(value, properties, indent + 1, prefix);\n            return;\n          }\n        case \"function\":\n          value = \"\" === value.name ? \"() => {}\" : value.name + \"() {}\";\n          break;\n        case \"string\":\n          value =\n            value === OMITTED_PROP_ERROR ? \"\\u2026\" : JSON.stringify(value);\n          break;\n        case \"undefined\":\n          value = \"undefined\";\n          break;\n        case \"boolean\":\n          value = value ? \"true\" : \"false\";\n          break;\n        default:\n          value = String(value);\n      }\n      properties.push([\n        prefix + \"\\u00a0\\u00a0\".repeat(indent) + propertyName,\n        value\n      ]);\n    }\n    function addObjectDiffToProperties(prev, next, properties, indent) {\n      var isDeeplyEqual = !0;\n      for (key in prev)\n        key in next ||\n          (properties.push([\n            REMOVED + \"\\u00a0\\u00a0\".repeat(indent) + key,\n            \"\\u2026\"\n          ]),\n          (isDeeplyEqual = !1));\n      for (var _key in next)\n        if (_key in prev) {\n          var key = prev[_key];\n          var nextValue = next[_key];\n          if (key !== nextValue) {\n            if (0 === indent && \"children\" === _key)\n              (isDeeplyEqual = \"\\u00a0\\u00a0\".repeat(indent) + _key),\n                properties.push(\n                  [REMOVED + isDeeplyEqual, \"\\u2026\"],\n                  [ADDED + isDeeplyEqual, \"\\u2026\"]\n                );\n            else {\n              if (!(3 <= indent))\n                if (\n                  \"object\" === typeof key &&\n                  \"object\" === typeof nextValue &&\n                  null !== key &&\n                  null !== nextValue &&\n                  key.$$typeof === nextValue.$$typeof\n                )\n                  if (nextValue.$$typeof === REACT_ELEMENT_TYPE) {\n                    if (\n                      key.type === nextValue.type &&\n                      key.key === nextValue.key\n                    ) {\n                      key =\n                        getComponentNameFromType(nextValue.type) || \"\\u2026\";\n                      isDeeplyEqual = \"\\u00a0\\u00a0\".repeat(indent) + _key;\n                      key = \"<\" + key + \" \\u2026 />\";\n                      properties.push(\n                        [REMOVED + isDeeplyEqual, key],\n                        [ADDED + isDeeplyEqual, key]\n                      );\n                      isDeeplyEqual = !1;\n                      continue;\n                    }\n                  } else {\n                    var prevKind = Object.prototype.toString.call(key),\n                      nextKind = Object.prototype.toString.call(nextValue);\n                    if (\n                      prevKind === nextKind &&\n                      (\"[object Object]\" === nextKind ||\n                        \"[object Array]\" === nextKind)\n                    ) {\n                      prevKind = [\n                        UNCHANGED + \"\\u00a0\\u00a0\".repeat(indent) + _key,\n                        \"[object Array]\" === nextKind ? \"Array\" : \"\"\n                      ];\n                      properties.push(prevKind);\n                      nextKind = properties.length;\n                      addObjectDiffToProperties(\n                        key,\n                        nextValue,\n                        properties,\n                        indent + 1\n                      )\n                        ? nextKind === properties.length &&\n                          (prevKind[1] =\n                            \"Referentially unequal but deeply equal objects. Consider memoization.\")\n                        : (isDeeplyEqual = !1);\n                      continue;\n                    }\n                  }\n                else if (\n                  \"function\" === typeof key &&\n                  \"function\" === typeof nextValue &&\n                  key.name === nextValue.name &&\n                  key.length === nextValue.length &&\n                  ((prevKind = Function.prototype.toString.call(key)),\n                  (nextKind = Function.prototype.toString.call(nextValue)),\n                  prevKind === nextKind)\n                ) {\n                  key =\n                    \"\" === nextValue.name\n                      ? \"() => {}\"\n                      : nextValue.name + \"() {}\";\n                  properties.push([\n                    UNCHANGED + \"\\u00a0\\u00a0\".repeat(indent) + _key,\n                    key +\n                      \" Referentially unequal function closure. Consider memoization.\"\n                  ]);\n                  continue;\n                }\n              addValueToProperties(_key, key, properties, indent, REMOVED);\n              addValueToProperties(_key, nextValue, properties, indent, ADDED);\n            }\n            isDeeplyEqual = !1;\n          }\n        } else\n          properties.push([\n            ADDED + \"\\u00a0\\u00a0\".repeat(indent) + _key,\n            \"\\u2026\"\n          ]),\n            (isDeeplyEqual = !1);\n      return isDeeplyEqual;\n    }\n    function setCurrentTrackFromLanes(lanes) {\n      currentTrack =\n        lanes & 63\n          ? \"Blocking\"\n          : lanes & 64\n            ? \"Gesture\"\n            : lanes & 4194176\n              ? \"Transition\"\n              : lanes & 62914560\n                ? \"Suspense\"\n                : lanes & 2080374784\n                  ? \"Idle\"\n                  : \"Other\";\n    }\n    function logComponentTrigger(fiber, startTime, endTime, trigger) {\n      supportsUserTiming &&\n        ((reusableComponentOptions.start = startTime),\n        (reusableComponentOptions.end = endTime),\n        (reusableComponentDevToolDetails.color = \"warning\"),\n        (reusableComponentDevToolDetails.tooltipText = trigger),\n        (reusableComponentDevToolDetails.properties = null),\n        (fiber = fiber._debugTask)\n          ? fiber.run(\n              performance.measure.bind(\n                performance,\n                trigger,\n                reusableComponentOptions\n              )\n            )\n          : performance.measure(trigger, reusableComponentOptions));\n    }\n    function logComponentReappeared(fiber, startTime, endTime) {\n      logComponentTrigger(fiber, startTime, endTime, \"Reconnect\");\n    }\n    function logComponentRender(\n      fiber,\n      startTime,\n      endTime,\n      wasHydrated,\n      committedLanes\n    ) {\n      var name = getComponentNameFromFiber(fiber);\n      if (null !== name && supportsUserTiming) {\n        var alternate = fiber.alternate,\n          selfTime = fiber.actualDuration;\n        if (null === alternate || alternate.child !== fiber.child)\n          for (var child = fiber.child; null !== child; child = child.sibling)\n            selfTime -= child.actualDuration;\n        wasHydrated =\n          0.5 > selfTime\n            ? wasHydrated\n              ? \"tertiary-light\"\n              : \"primary-light\"\n            : 10 > selfTime\n              ? wasHydrated\n                ? \"tertiary\"\n                : \"primary\"\n              : 100 > selfTime\n                ? wasHydrated\n                  ? \"tertiary-dark\"\n                  : \"primary-dark\"\n                : \"error\";\n        var props = fiber.memoizedProps;\n        selfTime = fiber._debugTask;\n        null !== props &&\n        null !== alternate &&\n        alternate.memoizedProps !== props\n          ? ((child = [resuableChangedPropsEntry]),\n            (props = addObjectDiffToProperties(\n              alternate.memoizedProps,\n              props,\n              child,\n              0\n            )),\n            1 < child.length &&\n              (props &&\n              !alreadyWarnedForDeepEquality &&\n              0 === (alternate.lanes & committedLanes) &&\n              100 < fiber.actualDuration\n                ? ((alreadyWarnedForDeepEquality = !0),\n                  (child[0] = reusableDeeplyEqualPropsEntry),\n                  (reusableComponentDevToolDetails.color = \"warning\"),\n                  (reusableComponentDevToolDetails.tooltipText =\n                    DEEP_EQUALITY_WARNING))\n                : ((reusableComponentDevToolDetails.color = wasHydrated),\n                  (reusableComponentDevToolDetails.tooltipText = name)),\n              (reusableComponentDevToolDetails.properties = child),\n              (reusableComponentOptions.start = startTime),\n              (reusableComponentOptions.end = endTime),\n              null != selfTime\n                ? selfTime.run(\n                    performance.measure.bind(\n                      performance,\n                      \"\\u200b\" + name,\n                      reusableComponentOptions\n                    )\n                  )\n                : performance.measure(\n                    \"\\u200b\" + name,\n                    reusableComponentOptions\n                  )))\n          : null != selfTime\n            ? selfTime.run(\n                console.timeStamp.bind(\n                  console,\n                  name,\n                  startTime,\n                  endTime,\n                  COMPONENTS_TRACK,\n                  void 0,\n                  wasHydrated\n                )\n              )\n            : console.timeStamp(\n                name,\n                startTime,\n                endTime,\n                COMPONENTS_TRACK,\n                void 0,\n                wasHydrated\n              );\n      }\n    }\n    function logComponentErrored(fiber, startTime, endTime, errors) {\n      if (supportsUserTiming) {\n        var name = getComponentNameFromFiber(fiber);\n        if (null !== name) {\n          for (\n            var debugTask = null, properties = [], i = 0;\n            i < errors.length;\n            i++\n          ) {\n            var capturedValue = errors[i];\n            null == debugTask &&\n              null !== capturedValue.source &&\n              (debugTask = capturedValue.source._debugTask);\n            capturedValue = capturedValue.value;\n            properties.push([\n              \"Error\",\n              \"object\" === typeof capturedValue &&\n              null !== capturedValue &&\n              \"string\" === typeof capturedValue.message\n                ? String(capturedValue.message)\n                : String(capturedValue)\n            ]);\n          }\n          null !== fiber.key &&\n            addValueToProperties(\"key\", fiber.key, properties, 0, \"\");\n          null !== fiber.memoizedProps &&\n            addObjectToProperties(fiber.memoizedProps, properties, 0, \"\");\n          null == debugTask && (debugTask = fiber._debugTask);\n          fiber = {\n            start: startTime,\n            end: endTime,\n            detail: {\n              devtools: {\n                color: \"error\",\n                track: COMPONENTS_TRACK,\n                tooltipText:\n                  13 === fiber.tag\n                    ? \"Hydration failed\"\n                    : \"Error boundary caught an error\",\n                properties: properties\n              }\n            }\n          };\n          debugTask\n            ? debugTask.run(\n                performance.measure.bind(performance, \"\\u200b\" + name, fiber)\n              )\n            : performance.measure(\"\\u200b\" + name, fiber);\n        }\n      }\n    }\n    function logComponentEffect(fiber, startTime, endTime, selfTime, errors) {\n      if (null !== errors) {\n        if (supportsUserTiming) {\n          var name = getComponentNameFromFiber(fiber);\n          if (null !== name) {\n            selfTime = [];\n            for (var i = 0; i < errors.length; i++) {\n              var error = errors[i].value;\n              selfTime.push([\n                \"Error\",\n                \"object\" === typeof error &&\n                null !== error &&\n                \"string\" === typeof error.message\n                  ? String(error.message)\n                  : String(error)\n              ]);\n            }\n            null !== fiber.key &&\n              addValueToProperties(\"key\", fiber.key, selfTime, 0, \"\");\n            null !== fiber.memoizedProps &&\n              addObjectToProperties(fiber.memoizedProps, selfTime, 0, \"\");\n            startTime = {\n              start: startTime,\n              end: endTime,\n              detail: {\n                devtools: {\n                  color: \"error\",\n                  track: COMPONENTS_TRACK,\n                  tooltipText: \"A lifecycle or effect errored\",\n                  properties: selfTime\n                }\n              }\n            };\n            (fiber = fiber._debugTask)\n              ? fiber.run(\n                  performance.measure.bind(\n                    performance,\n                    \"\\u200b\" + name,\n                    startTime\n                  )\n                )\n              : performance.measure(\"\\u200b\" + name, startTime);\n          }\n        }\n      } else\n        (name = getComponentNameFromFiber(fiber)),\n          null !== name &&\n            supportsUserTiming &&\n            ((errors =\n              1 > selfTime\n                ? \"secondary-light\"\n                : 100 > selfTime\n                  ? \"secondary\"\n                  : 500 > selfTime\n                    ? \"secondary-dark\"\n                    : \"error\"),\n            (fiber = fiber._debugTask)\n              ? fiber.run(\n                  console.timeStamp.bind(\n                    console,\n                    name,\n                    startTime,\n                    endTime,\n                    COMPONENTS_TRACK,\n                    void 0,\n                    errors\n                  )\n                )\n              : console.timeStamp(\n                  name,\n                  startTime,\n                  endTime,\n                  COMPONENTS_TRACK,\n                  void 0,\n                  errors\n                ));\n    }\n    function logRenderPhase(startTime, endTime, lanes, debugTask) {\n      if (supportsUserTiming && !(endTime <= startTime)) {\n        var color =\n          (lanes & 738197653) === lanes ? \"tertiary-dark\" : \"primary-dark\";\n        lanes =\n          (lanes & 536870912) === lanes\n            ? \"Prepared\"\n            : (lanes & 201326741) === lanes\n              ? \"Hydrated\"\n              : \"Render\";\n        debugTask\n          ? debugTask.run(\n              console.timeStamp.bind(\n                console,\n                lanes,\n                startTime,\n                endTime,\n                currentTrack,\n                LANES_TRACK_GROUP,\n                color\n              )\n            )\n          : console.timeStamp(\n              lanes,\n              startTime,\n              endTime,\n              currentTrack,\n              LANES_TRACK_GROUP,\n              color\n            );\n      }\n    }\n    function logSuspendedRenderPhase(startTime, endTime, lanes, debugTask) {\n      !supportsUserTiming ||\n        endTime <= startTime ||\n        ((lanes =\n          (lanes & 738197653) === lanes ? \"tertiary-dark\" : \"primary-dark\"),\n        debugTask\n          ? debugTask.run(\n              console.timeStamp.bind(\n                console,\n                \"Prewarm\",\n                startTime,\n                endTime,\n                currentTrack,\n                LANES_TRACK_GROUP,\n                lanes\n              )\n            )\n          : console.timeStamp(\n              \"Prewarm\",\n              startTime,\n              endTime,\n              currentTrack,\n              LANES_TRACK_GROUP,\n              lanes\n            ));\n    }\n    function logSuspendedWithDelayPhase(startTime, endTime, lanes, debugTask) {\n      !supportsUserTiming ||\n        endTime <= startTime ||\n        ((lanes =\n          (lanes & 738197653) === lanes ? \"tertiary-dark\" : \"primary-dark\"),\n        debugTask\n          ? debugTask.run(\n              console.timeStamp.bind(\n                console,\n                \"Suspended\",\n                startTime,\n                endTime,\n                currentTrack,\n                LANES_TRACK_GROUP,\n                lanes\n              )\n            )\n          : console.timeStamp(\n              \"Suspended\",\n              startTime,\n              endTime,\n              currentTrack,\n              LANES_TRACK_GROUP,\n              lanes\n            ));\n    }\n    function logRecoveredRenderPhase(\n      startTime,\n      endTime,\n      lanes,\n      recoverableErrors,\n      hydrationFailed,\n      debugTask\n    ) {\n      if (supportsUserTiming && !(endTime <= startTime)) {\n        lanes = [];\n        for (var i = 0; i < recoverableErrors.length; i++) {\n          var error = recoverableErrors[i].value;\n          lanes.push([\n            \"Recoverable Error\",\n            \"object\" === typeof error &&\n            null !== error &&\n            \"string\" === typeof error.message\n              ? String(error.message)\n              : String(error)\n          ]);\n        }\n        startTime = {\n          start: startTime,\n          end: endTime,\n          detail: {\n            devtools: {\n              color: \"primary-dark\",\n              track: currentTrack,\n              trackGroup: LANES_TRACK_GROUP,\n              tooltipText: hydrationFailed\n                ? \"Hydration Failed\"\n                : \"Recovered after Error\",\n              properties: lanes\n            }\n          }\n        };\n        debugTask\n          ? debugTask.run(\n              performance.measure.bind(performance, \"Recovered\", startTime)\n            )\n          : performance.measure(\"Recovered\", startTime);\n      }\n    }\n    function logErroredRenderPhase(startTime, endTime, lanes, debugTask) {\n      !supportsUserTiming ||\n        endTime <= startTime ||\n        (debugTask\n          ? debugTask.run(\n              console.timeStamp.bind(\n                console,\n                \"Errored\",\n                startTime,\n                endTime,\n                currentTrack,\n                LANES_TRACK_GROUP,\n                \"error\"\n              )\n            )\n          : console.timeStamp(\n              \"Errored\",\n              startTime,\n              endTime,\n              currentTrack,\n              LANES_TRACK_GROUP,\n              \"error\"\n            ));\n    }\n    function logSuspendedCommitPhase(startTime, endTime, reason, debugTask) {\n      !supportsUserTiming ||\n        endTime <= startTime ||\n        (debugTask\n          ? debugTask.run(\n              console.timeStamp.bind(\n                console,\n                reason,\n                startTime,\n                endTime,\n                currentTrack,\n                LANES_TRACK_GROUP,\n                \"secondary-light\"\n              )\n            )\n          : console.timeStamp(\n              reason,\n              startTime,\n              endTime,\n              currentTrack,\n              LANES_TRACK_GROUP,\n              \"secondary-light\"\n            ));\n    }\n    function logCommitErrored(startTime, endTime, errors, passive, debugTask) {\n      if (supportsUserTiming && !(endTime <= startTime)) {\n        for (var properties = [], i = 0; i < errors.length; i++) {\n          var error = errors[i].value;\n          properties.push([\n            \"Error\",\n            \"object\" === typeof error &&\n            null !== error &&\n            \"string\" === typeof error.message\n              ? String(error.message)\n              : String(error)\n          ]);\n        }\n        startTime = {\n          start: startTime,\n          end: endTime,\n          detail: {\n            devtools: {\n              color: \"error\",\n              track: currentTrack,\n              trackGroup: LANES_TRACK_GROUP,\n              tooltipText: passive\n                ? \"Remaining Effects Errored\"\n                : \"Commit Errored\",\n              properties: properties\n            }\n          }\n        };\n        debugTask\n          ? debugTask.run(\n              performance.measure.bind(performance, \"Errored\", startTime)\n            )\n          : performance.measure(\"Errored\", startTime);\n      }\n    }\n    function logAnimatingPhase(startTime, endTime, debugTask) {\n      !supportsUserTiming ||\n        endTime <= startTime ||\n        (debugTask\n          ? debugTask.run(\n              console.timeStamp.bind(\n                console,\n                \"Animating\",\n                startTime,\n                endTime,\n                currentTrack,\n                LANES_TRACK_GROUP,\n                \"secondary-dark\"\n              )\n            )\n          : console.timeStamp(\n              \"Animating\",\n              startTime,\n              endTime,\n              currentTrack,\n              LANES_TRACK_GROUP,\n              \"secondary-dark\"\n            ));\n    }\n    function finishQueueingConcurrentUpdates() {\n      for (\n        var endIndex = concurrentQueuesIndex,\n          i = (concurrentlyUpdatedLanes = concurrentQueuesIndex = 0);\n        i < endIndex;\n\n      ) {\n        var fiber = concurrentQueues[i];\n        concurrentQueues[i++] = null;\n        var queue = concurrentQueues[i];\n        concurrentQueues[i++] = null;\n        var update = concurrentQueues[i];\n        concurrentQueues[i++] = null;\n        var lane = concurrentQueues[i];\n        concurrentQueues[i++] = null;\n        if (null !== queue && null !== update) {\n          var pending = queue.pending;\n          null === pending\n            ? (update.next = update)\n            : ((update.next = pending.next), (pending.next = update));\n          queue.pending = update;\n        }\n        0 !== lane && markUpdateLaneFromFiberToRoot(fiber, update, lane);\n      }\n    }\n    function enqueueUpdate$1(fiber, queue, update, lane) {\n      concurrentQueues[concurrentQueuesIndex++] = fiber;\n      concurrentQueues[concurrentQueuesIndex++] = queue;\n      concurrentQueues[concurrentQueuesIndex++] = update;\n      concurrentQueues[concurrentQueuesIndex++] = lane;\n      concurrentlyUpdatedLanes |= lane;\n      fiber.lanes |= lane;\n      fiber = fiber.alternate;\n      null !== fiber && (fiber.lanes |= lane);\n    }\n    function enqueueConcurrentHookUpdate(fiber, queue, update, lane) {\n      enqueueUpdate$1(fiber, queue, update, lane);\n      return getRootForUpdatedFiber(fiber);\n    }\n    function enqueueConcurrentRenderForLane(fiber, lane) {\n      enqueueUpdate$1(fiber, null, null, lane);\n      return getRootForUpdatedFiber(fiber);\n    }\n    function markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) {\n      sourceFiber.lanes |= lane;\n      var alternate = sourceFiber.alternate;\n      null !== alternate && (alternate.lanes |= lane);\n      for (var isHidden = !1, parent = sourceFiber.return; null !== parent; )\n        (parent.childLanes |= lane),\n          (alternate = parent.alternate),\n          null !== alternate && (alternate.childLanes |= lane),\n          22 === parent.tag &&\n            ((sourceFiber = parent.stateNode),\n            null === sourceFiber ||\n              sourceFiber._visibility & OffscreenVisible ||\n              (isHidden = !0)),\n          (sourceFiber = parent),\n          (parent = parent.return);\n      return 3 === sourceFiber.tag\n        ? ((parent = sourceFiber.stateNode),\n          isHidden &&\n            null !== update &&\n            ((isHidden = 31 - clz32(lane)),\n            (sourceFiber = parent.hiddenUpdates),\n            (alternate = sourceFiber[isHidden]),\n            null === alternate\n              ? (sourceFiber[isHidden] = [update])\n              : alternate.push(update),\n            (update.lane = lane | 536870912)),\n          parent)\n        : null;\n    }\n    function getRootForUpdatedFiber(sourceFiber) {\n      if (nestedUpdateCount > NESTED_UPDATE_LIMIT)\n        throw (\n          ((nestedPassiveUpdateCount = nestedUpdateCount = 0),\n          (rootWithPassiveNestedUpdates = rootWithNestedUpdates = null),\n          Error(\n            \"Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.\"\n          ))\n        );\n      nestedPassiveUpdateCount > NESTED_PASSIVE_UPDATE_LIMIT &&\n        ((nestedPassiveUpdateCount = 0),\n        (rootWithPassiveNestedUpdates = null),\n        console.error(\n          \"Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render.\"\n        ));\n      null === sourceFiber.alternate &&\n        0 !== (sourceFiber.flags & 4098) &&\n        warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber);\n      for (var node = sourceFiber, parent = node.return; null !== parent; )\n        null === node.alternate &&\n          0 !== (node.flags & 4098) &&\n          warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber),\n          (node = parent),\n          (parent = node.return);\n      return 3 === node.tag ? node.stateNode : null;\n    }\n    function resolveFunctionForHotReloading(type) {\n      if (null === resolveFamily) return type;\n      var family = resolveFamily(type);\n      return void 0 === family ? type : family.current;\n    }\n    function resolveForwardRefForHotReloading(type) {\n      if (null === resolveFamily) return type;\n      var family = resolveFamily(type);\n      return void 0 === family\n        ? null !== type &&\n          void 0 !== type &&\n          \"function\" === typeof type.render &&\n          ((family = resolveFunctionForHotReloading(type.render)),\n          type.render !== family)\n          ? ((family = { $$typeof: REACT_FORWARD_REF_TYPE, render: family }),\n            void 0 !== type.displayName &&\n              (family.displayName = type.displayName),\n            family)\n          : type\n        : family.current;\n    }\n    function isCompatibleFamilyForHotReloading(fiber, element) {\n      if (null === resolveFamily) return !1;\n      var prevType = fiber.elementType;\n      element = element.type;\n      var needsCompareFamilies = !1,\n        $$typeofNextType =\n          \"object\" === typeof element && null !== element\n            ? element.$$typeof\n            : null;\n      switch (fiber.tag) {\n        case 1:\n          \"function\" === typeof element && (needsCompareFamilies = !0);\n          break;\n        case 0:\n          \"function\" === typeof element\n            ? (needsCompareFamilies = !0)\n            : $$typeofNextType === REACT_LAZY_TYPE &&\n              (needsCompareFamilies = !0);\n          break;\n        case 11:\n          $$typeofNextType === REACT_FORWARD_REF_TYPE\n            ? (needsCompareFamilies = !0)\n            : $$typeofNextType === REACT_LAZY_TYPE &&\n              (needsCompareFamilies = !0);\n          break;\n        case 14:\n        case 15:\n          $$typeofNextType === REACT_MEMO_TYPE\n            ? (needsCompareFamilies = !0)\n            : $$typeofNextType === REACT_LAZY_TYPE &&\n              (needsCompareFamilies = !0);\n          break;\n        default:\n          return !1;\n      }\n      return needsCompareFamilies &&\n        ((fiber = resolveFamily(prevType)),\n        void 0 !== fiber && fiber === resolveFamily(element))\n        ? !0\n        : !1;\n    }\n    function markFailedErrorBoundaryForHotReloading(fiber) {\n      null !== resolveFamily &&\n        \"function\" === typeof WeakSet &&\n        (null === failedBoundaries && (failedBoundaries = new WeakSet()),\n        failedBoundaries.add(fiber));\n    }\n    function scheduleFibersWithFamiliesRecursively(\n      fiber,\n      updatedFamilies,\n      staleFamilies\n    ) {\n      do {\n        var _fiber = fiber,\n          alternate = _fiber.alternate,\n          child = _fiber.child,\n          sibling = _fiber.sibling,\n          tag = _fiber.tag;\n        _fiber = _fiber.type;\n        var candidateType = null;\n        switch (tag) {\n          case 0:\n          case 15:\n          case 1:\n            candidateType = _fiber;\n            break;\n          case 11:\n            candidateType = _fiber.render;\n        }\n        if (null === resolveFamily)\n          throw Error(\"Expected resolveFamily to be set during hot reload.\");\n        var needsRender = !1;\n        _fiber = !1;\n        null !== candidateType &&\n          ((candidateType = resolveFamily(candidateType)),\n          void 0 !== candidateType &&\n            (staleFamilies.has(candidateType)\n              ? (_fiber = !0)\n              : updatedFamilies.has(candidateType) &&\n                (1 === tag ? (_fiber = !0) : (needsRender = !0))));\n        null !== failedBoundaries &&\n          (failedBoundaries.has(fiber) ||\n            (null !== alternate && failedBoundaries.has(alternate))) &&\n          (_fiber = !0);\n        _fiber && (fiber._debugNeedsRemount = !0);\n        if (_fiber || needsRender)\n          (alternate = enqueueConcurrentRenderForLane(fiber, 2)),\n            null !== alternate && scheduleUpdateOnFiber(alternate, fiber, 2);\n        null === child ||\n          _fiber ||\n          scheduleFibersWithFamiliesRecursively(\n            child,\n            updatedFamilies,\n            staleFamilies\n          );\n        if (null === sibling) break;\n        fiber = sibling;\n      } while (1);\n    }\n    function FiberNode(tag, pendingProps, key, mode) {\n      this.tag = tag;\n      this.key = key;\n      this.sibling =\n        this.child =\n        this.return =\n        this.stateNode =\n        this.type =\n        this.elementType =\n          null;\n      this.index = 0;\n      this.refCleanup = this.ref = null;\n      this.pendingProps = pendingProps;\n      this.dependencies =\n        this.memoizedState =\n        this.updateQueue =\n        this.memoizedProps =\n          null;\n      this.mode = mode;\n      this.subtreeFlags = this.flags = 0;\n      this.deletions = null;\n      this.childLanes = this.lanes = 0;\n      this.alternate = null;\n      this.actualDuration = -0;\n      this.actualStartTime = -1.1;\n      this.treeBaseDuration = this.selfBaseDuration = -0;\n      this._debugTask =\n        this._debugStack =\n        this._debugOwner =\n        this._debugInfo =\n          null;\n      this._debugNeedsRemount = !1;\n      this._debugHookTypes = null;\n      hasBadMapPolyfill ||\n        \"function\" !== typeof Object.preventExtensions ||\n        Object.preventExtensions(this);\n    }\n    function shouldConstruct(Component) {\n      Component = Component.prototype;\n      return !(!Component || !Component.isReactComponent);\n    }\n    function createWorkInProgress(current, pendingProps) {\n      var workInProgress = current.alternate;\n      null === workInProgress\n        ? ((workInProgress = createFiber(\n            current.tag,\n            pendingProps,\n            current.key,\n            current.mode\n          )),\n          (workInProgress.elementType = current.elementType),\n          (workInProgress.type = current.type),\n          (workInProgress.stateNode = current.stateNode),\n          (workInProgress._debugOwner = current._debugOwner),\n          (workInProgress._debugStack = current._debugStack),\n          (workInProgress._debugTask = current._debugTask),\n          (workInProgress._debugHookTypes = current._debugHookTypes),\n          (workInProgress.alternate = current),\n          (current.alternate = workInProgress))\n        : ((workInProgress.pendingProps = pendingProps),\n          (workInProgress.type = current.type),\n          (workInProgress.flags = 0),\n          (workInProgress.subtreeFlags = 0),\n          (workInProgress.deletions = null),\n          (workInProgress.actualDuration = -0),\n          (workInProgress.actualStartTime = -1.1));\n      workInProgress.flags = current.flags & 65011712;\n      workInProgress.childLanes = current.childLanes;\n      workInProgress.lanes = current.lanes;\n      workInProgress.child = current.child;\n      workInProgress.memoizedProps = current.memoizedProps;\n      workInProgress.memoizedState = current.memoizedState;\n      workInProgress.updateQueue = current.updateQueue;\n      pendingProps = current.dependencies;\n      workInProgress.dependencies =\n        null === pendingProps\n          ? null\n          : {\n              lanes: pendingProps.lanes,\n              firstContext: pendingProps.firstContext,\n              _debugThenableState: pendingProps._debugThenableState\n            };\n      workInProgress.sibling = current.sibling;\n      workInProgress.index = current.index;\n      workInProgress.ref = current.ref;\n      workInProgress.refCleanup = current.refCleanup;\n      workInProgress.selfBaseDuration = current.selfBaseDuration;\n      workInProgress.treeBaseDuration = current.treeBaseDuration;\n      workInProgress._debugInfo = current._debugInfo;\n      workInProgress._debugNeedsRemount = current._debugNeedsRemount;\n      switch (workInProgress.tag) {\n        case 0:\n        case 15:\n          workInProgress.type = resolveFunctionForHotReloading(current.type);\n          break;\n        case 1:\n          workInProgress.type = resolveFunctionForHotReloading(current.type);\n          break;\n        case 11:\n          workInProgress.type = resolveForwardRefForHotReloading(current.type);\n      }\n      return workInProgress;\n    }\n    function resetWorkInProgress(workInProgress, renderLanes) {\n      workInProgress.flags &= 65011714;\n      var current = workInProgress.alternate;\n      null === current\n        ? ((workInProgress.childLanes = 0),\n          (workInProgress.lanes = renderLanes),\n          (workInProgress.child = null),\n          (workInProgress.subtreeFlags = 0),\n          (workInProgress.memoizedProps = null),\n          (workInProgress.memoizedState = null),\n          (workInProgress.updateQueue = null),\n          (workInProgress.dependencies = null),\n          (workInProgress.stateNode = null),\n          (workInProgress.selfBaseDuration = 0),\n          (workInProgress.treeBaseDuration = 0))\n        : ((workInProgress.childLanes = current.childLanes),\n          (workInProgress.lanes = current.lanes),\n          (workInProgress.child = current.child),\n          (workInProgress.subtreeFlags = 0),\n          (workInProgress.deletions = null),\n          (workInProgress.memoizedProps = current.memoizedProps),\n          (workInProgress.memoizedState = current.memoizedState),\n          (workInProgress.updateQueue = current.updateQueue),\n          (workInProgress.type = current.type),\n          (renderLanes = current.dependencies),\n          (workInProgress.dependencies =\n            null === renderLanes\n              ? null\n              : {\n                  lanes: renderLanes.lanes,\n                  firstContext: renderLanes.firstContext,\n                  _debugThenableState: renderLanes._debugThenableState\n                }),\n          (workInProgress.selfBaseDuration = current.selfBaseDuration),\n          (workInProgress.treeBaseDuration = current.treeBaseDuration));\n      return workInProgress;\n    }\n    function createFiberFromTypeAndProps(\n      type,\n      key,\n      pendingProps,\n      owner,\n      mode,\n      lanes\n    ) {\n      var fiberTag = 0,\n        resolvedType = type;\n      if (\"function\" === typeof type)\n        shouldConstruct(type) && (fiberTag = 1),\n          (resolvedType = resolveFunctionForHotReloading(resolvedType));\n      else if (\"string\" === typeof type)\n        (fiberTag = getHostContext()),\n          (fiberTag = isHostHoistableType(type, pendingProps, fiberTag)\n            ? 26\n            : \"html\" === type || \"head\" === type || \"body\" === type\n              ? 27\n              : 5);\n      else\n        a: switch (type) {\n          case REACT_ACTIVITY_TYPE:\n            return (\n              (key = createFiber(31, pendingProps, key, mode)),\n              (key.elementType = REACT_ACTIVITY_TYPE),\n              (key.lanes = lanes),\n              key\n            );\n          case REACT_FRAGMENT_TYPE:\n            return createFiberFromFragment(\n              pendingProps.children,\n              mode,\n              lanes,\n              key\n            );\n          case REACT_STRICT_MODE_TYPE:\n            fiberTag = 8;\n            mode |= StrictLegacyMode;\n            mode |= StrictEffectsMode;\n            break;\n          case REACT_PROFILER_TYPE:\n            return (\n              (type = pendingProps),\n              (owner = mode),\n              \"string\" !== typeof type.id &&\n                console.error(\n                  'Profiler must specify an \"id\" of type `string` as a prop. Received the type `%s` instead.',\n                  typeof type.id\n                ),\n              (key = createFiber(12, type, key, owner | ProfileMode)),\n              (key.elementType = REACT_PROFILER_TYPE),\n              (key.lanes = lanes),\n              (key.stateNode = { effectDuration: 0, passiveEffectDuration: 0 }),\n              key\n            );\n          case REACT_SUSPENSE_TYPE:\n            return (\n              (key = createFiber(13, pendingProps, key, mode)),\n              (key.elementType = REACT_SUSPENSE_TYPE),\n              (key.lanes = lanes),\n              key\n            );\n          case REACT_SUSPENSE_LIST_TYPE:\n            return (\n              (key = createFiber(19, pendingProps, key, mode)),\n              (key.elementType = REACT_SUSPENSE_LIST_TYPE),\n              (key.lanes = lanes),\n              key\n            );\n          default:\n            if (\"object\" === typeof type && null !== type)\n              switch (type.$$typeof) {\n                case REACT_CONTEXT_TYPE:\n                  fiberTag = 10;\n                  break a;\n                case REACT_CONSUMER_TYPE:\n                  fiberTag = 9;\n                  break a;\n                case REACT_FORWARD_REF_TYPE:\n                  fiberTag = 11;\n                  resolvedType = resolveForwardRefForHotReloading(resolvedType);\n                  break a;\n                case REACT_MEMO_TYPE:\n                  fiberTag = 14;\n                  break a;\n                case REACT_LAZY_TYPE:\n                  fiberTag = 16;\n                  resolvedType = null;\n                  break a;\n              }\n            resolvedType = \"\";\n            if (\n              void 0 === type ||\n              (\"object\" === typeof type &&\n                null !== type &&\n                0 === Object.keys(type).length)\n            )\n              resolvedType +=\n                \" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.\";\n            null === type\n              ? (pendingProps = \"null\")\n              : isArrayImpl(type)\n                ? (pendingProps = \"array\")\n                : void 0 !== type && type.$$typeof === REACT_ELEMENT_TYPE\n                  ? ((pendingProps =\n                      \"<\" +\n                      (getComponentNameFromType(type.type) || \"Unknown\") +\n                      \" />\"),\n                    (resolvedType =\n                      \" Did you accidentally export a JSX literal instead of a component?\"))\n                  : (pendingProps = typeof type);\n            (fiberTag = owner ? getComponentNameFromOwner(owner) : null) &&\n              (resolvedType +=\n                \"\\n\\nCheck the render method of `\" + fiberTag + \"`.\");\n            fiberTag = 29;\n            pendingProps = Error(\n              \"Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: \" +\n                (pendingProps + \".\" + resolvedType)\n            );\n            resolvedType = null;\n        }\n      key = createFiber(fiberTag, pendingProps, key, mode);\n      key.elementType = type;\n      key.type = resolvedType;\n      key.lanes = lanes;\n      key._debugOwner = owner;\n      return key;\n    }\n    function createFiberFromElement(element, mode, lanes) {\n      mode = createFiberFromTypeAndProps(\n        element.type,\n        element.key,\n        element.props,\n        element._owner,\n        mode,\n        lanes\n      );\n      mode._debugOwner = element._owner;\n      mode._debugStack = element._debugStack;\n      mode._debugTask = element._debugTask;\n      return mode;\n    }\n    function createFiberFromFragment(elements, mode, lanes, key) {\n      elements = createFiber(7, elements, key, mode);\n      elements.lanes = lanes;\n      return elements;\n    }\n    function createFiberFromText(content, mode, lanes) {\n      content = createFiber(6, content, null, mode);\n      content.lanes = lanes;\n      return content;\n    }\n    function createFiberFromDehydratedFragment(dehydratedNode) {\n      var fiber = createFiber(18, null, null, NoMode);\n      fiber.stateNode = dehydratedNode;\n      return fiber;\n    }\n    function createFiberFromPortal(portal, mode, lanes) {\n      mode = createFiber(\n        4,\n        null !== portal.children ? portal.children : [],\n        portal.key,\n        mode\n      );\n      mode.lanes = lanes;\n      mode.stateNode = {\n        containerInfo: portal.containerInfo,\n        pendingChildren: null,\n        implementation: portal.implementation\n      };\n      return mode;\n    }\n    function createCapturedValueAtFiber(value, source) {\n      if (\"object\" === typeof value && null !== value) {\n        var existing = CapturedStacks.get(value);\n        if (void 0 !== existing) return existing;\n        source = {\n          value: value,\n          source: source,\n          stack: getStackByFiberInDevAndProd(source)\n        };\n        CapturedStacks.set(value, source);\n        return source;\n      }\n      return {\n        value: value,\n        source: source,\n        stack: getStackByFiberInDevAndProd(source)\n      };\n    }\n    function pushTreeFork(workInProgress, totalChildren) {\n      warnIfNotHydrating();\n      forkStack[forkStackIndex++] = treeForkCount;\n      forkStack[forkStackIndex++] = treeForkProvider;\n      treeForkProvider = workInProgress;\n      treeForkCount = totalChildren;\n    }\n    function pushTreeId(workInProgress, totalChildren, index) {\n      warnIfNotHydrating();\n      idStack[idStackIndex++] = treeContextId;\n      idStack[idStackIndex++] = treeContextOverflow;\n      idStack[idStackIndex++] = treeContextProvider;\n      treeContextProvider = workInProgress;\n      var baseIdWithLeadingBit = treeContextId;\n      workInProgress = treeContextOverflow;\n      var baseLength = 32 - clz32(baseIdWithLeadingBit) - 1;\n      baseIdWithLeadingBit &= ~(1 << baseLength);\n      index += 1;\n      var length = 32 - clz32(totalChildren) + baseLength;\n      if (30 < length) {\n        var numberOfOverflowBits = baseLength - (baseLength % 5);\n        length = (\n          baseIdWithLeadingBit &\n          ((1 << numberOfOverflowBits) - 1)\n        ).toString(32);\n        baseIdWithLeadingBit >>= numberOfOverflowBits;\n        baseLength -= numberOfOverflowBits;\n        treeContextId =\n          (1 << (32 - clz32(totalChildren) + baseLength)) |\n          (index << baseLength) |\n          baseIdWithLeadingBit;\n        treeContextOverflow = length + workInProgress;\n      } else\n        (treeContextId =\n          (1 << length) | (index << baseLength) | baseIdWithLeadingBit),\n          (treeContextOverflow = workInProgress);\n    }\n    function pushMaterializedTreeId(workInProgress) {\n      warnIfNotHydrating();\n      null !== workInProgress.return &&\n        (pushTreeFork(workInProgress, 1), pushTreeId(workInProgress, 1, 0));\n    }\n    function popTreeContext(workInProgress) {\n      for (; workInProgress === treeForkProvider; )\n        (treeForkProvider = forkStack[--forkStackIndex]),\n          (forkStack[forkStackIndex] = null),\n          (treeForkCount = forkStack[--forkStackIndex]),\n          (forkStack[forkStackIndex] = null);\n      for (; workInProgress === treeContextProvider; )\n        (treeContextProvider = idStack[--idStackIndex]),\n          (idStack[idStackIndex] = null),\n          (treeContextOverflow = idStack[--idStackIndex]),\n          (idStack[idStackIndex] = null),\n          (treeContextId = idStack[--idStackIndex]),\n          (idStack[idStackIndex] = null);\n    }\n    function getSuspendedTreeContext() {\n      warnIfNotHydrating();\n      return null !== treeContextProvider\n        ? { id: treeContextId, overflow: treeContextOverflow }\n        : null;\n    }\n    function restoreSuspendedTreeContext(workInProgress, suspendedContext) {\n      warnIfNotHydrating();\n      idStack[idStackIndex++] = treeContextId;\n      idStack[idStackIndex++] = treeContextOverflow;\n      idStack[idStackIndex++] = treeContextProvider;\n      treeContextId = suspendedContext.id;\n      treeContextOverflow = suspendedContext.overflow;\n      treeContextProvider = workInProgress;\n    }\n    function warnIfNotHydrating() {\n      isHydrating ||\n        console.error(\n          \"Expected to be hydrating. This is a bug in React. Please file an issue.\"\n        );\n    }\n    function buildHydrationDiffNode(fiber, distanceFromLeaf) {\n      if (null === fiber.return) {\n        if (null === hydrationDiffRootDEV)\n          hydrationDiffRootDEV = {\n            fiber: fiber,\n            children: [],\n            serverProps: void 0,\n            serverTail: [],\n            distanceFromLeaf: distanceFromLeaf\n          };\n        else {\n          if (hydrationDiffRootDEV.fiber !== fiber)\n            throw Error(\n              \"Saw multiple hydration diff roots in a pass. This is a bug in React.\"\n            );\n          hydrationDiffRootDEV.distanceFromLeaf > distanceFromLeaf &&\n            (hydrationDiffRootDEV.distanceFromLeaf = distanceFromLeaf);\n        }\n        return hydrationDiffRootDEV;\n      }\n      var siblings = buildHydrationDiffNode(\n        fiber.return,\n        distanceFromLeaf + 1\n      ).children;\n      if (0 < siblings.length && siblings[siblings.length - 1].fiber === fiber)\n        return (\n          (siblings = siblings[siblings.length - 1]),\n          siblings.distanceFromLeaf > distanceFromLeaf &&\n            (siblings.distanceFromLeaf = distanceFromLeaf),\n          siblings\n        );\n      distanceFromLeaf = {\n        fiber: fiber,\n        children: [],\n        serverProps: void 0,\n        serverTail: [],\n        distanceFromLeaf: distanceFromLeaf\n      };\n      siblings.push(distanceFromLeaf);\n      return distanceFromLeaf;\n    }\n    function warnIfHydrating() {\n      isHydrating &&\n        console.error(\n          \"We should not be hydrating here. This is a bug in React. Please file a bug.\"\n        );\n    }\n    function warnNonHydratedInstance(fiber, rejectedCandidate) {\n      didSuspendOrErrorDEV ||\n        ((fiber = buildHydrationDiffNode(fiber, 0)),\n        (fiber.serverProps = null),\n        null !== rejectedCandidate &&\n          ((rejectedCandidate =\n            describeHydratableInstanceForDevWarnings(rejectedCandidate)),\n          fiber.serverTail.push(rejectedCandidate)));\n    }\n    function throwOnHydrationMismatch(fiber) {\n      var fromText =\n          1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : !1,\n        diff = \"\",\n        diffRoot = hydrationDiffRootDEV;\n      null !== diffRoot &&\n        ((hydrationDiffRootDEV = null), (diff = describeDiff(diffRoot)));\n      queueHydrationError(\n        createCapturedValueAtFiber(\n          Error(\n            \"Hydration failed because the server rendered \" +\n              (fromText ? \"text\" : \"HTML\") +\n              \" didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:\\n\\n- A server/client branch `if (typeof window !== 'undefined')`.\\n- Variable input such as `Date.now()` or `Math.random()` which changes each time it's called.\\n- Date formatting in a user's locale which doesn't match the server.\\n- External changing data without sending a snapshot of it along with the HTML.\\n- Invalid HTML tag nesting.\\n\\nIt can also happen if the client has a browser extension installed which messes with the HTML before React loaded.\\n\\nhttps://react.dev/link/hydration-mismatch\" +\n              diff\n          ),\n          fiber\n        )\n      );\n      throw HydrationMismatchException;\n    }\n    function prepareToHydrateHostInstance(fiber) {\n      var didHydrate = fiber.stateNode;\n      var type = fiber.type,\n        props = fiber.memoizedProps;\n      didHydrate[internalInstanceKey] = fiber;\n      didHydrate[internalPropsKey] = props;\n      validatePropertiesInDevelopment(type, props);\n      switch (type) {\n        case \"dialog\":\n          listenToNonDelegatedEvent(\"cancel\", didHydrate);\n          listenToNonDelegatedEvent(\"close\", didHydrate);\n          break;\n        case \"iframe\":\n        case \"object\":\n        case \"embed\":\n          listenToNonDelegatedEvent(\"load\", didHydrate);\n          break;\n        case \"video\":\n        case \"audio\":\n          for (type = 0; type < mediaEventTypes.length; type++)\n            listenToNonDelegatedEvent(mediaEventTypes[type], didHydrate);\n          break;\n        case \"source\":\n          listenToNonDelegatedEvent(\"error\", didHydrate);\n          break;\n        case \"img\":\n        case \"image\":\n        case \"link\":\n          listenToNonDelegatedEvent(\"error\", didHydrate);\n          listenToNonDelegatedEvent(\"load\", didHydrate);\n          break;\n        case \"details\":\n          listenToNonDelegatedEvent(\"toggle\", didHydrate);\n          break;\n        case \"input\":\n          checkControlledValueProps(\"input\", props);\n          listenToNonDelegatedEvent(\"invalid\", didHydrate);\n          validateInputProps(didHydrate, props);\n          initInput(\n            didHydrate,\n            props.value,\n            props.defaultValue,\n            props.checked,\n            props.defaultChecked,\n            props.type,\n            props.name,\n            !0\n          );\n          break;\n        case \"option\":\n          validateOptionProps(didHydrate, props);\n          break;\n        case \"select\":\n          checkControlledValueProps(\"select\", props);\n          listenToNonDelegatedEvent(\"invalid\", didHydrate);\n          validateSelectProps(didHydrate, props);\n          break;\n        case \"textarea\":\n          checkControlledValueProps(\"textarea\", props),\n            listenToNonDelegatedEvent(\"invalid\", didHydrate),\n            validateTextareaProps(didHydrate, props),\n            initTextarea(\n              didHydrate,\n              props.value,\n              props.defaultValue,\n              props.children\n            );\n      }\n      type = props.children;\n      (\"string\" !== typeof type &&\n        \"number\" !== typeof type &&\n        \"bigint\" !== typeof type) ||\n      didHydrate.textContent === \"\" + type ||\n      !0 === props.suppressHydrationWarning ||\n      checkForUnmatchedText(didHydrate.textContent, type)\n        ? (null != props.popover &&\n            (listenToNonDelegatedEvent(\"beforetoggle\", didHydrate),\n            listenToNonDelegatedEvent(\"toggle\", didHydrate)),\n          null != props.onScroll &&\n            listenToNonDelegatedEvent(\"scroll\", didHydrate),\n          null != props.onScrollEnd &&\n            listenToNonDelegatedEvent(\"scrollend\", didHydrate),\n          null != props.onClick && (didHydrate.onclick = noop$1),\n          (didHydrate = !0))\n        : (didHydrate = !1);\n      didHydrate || throwOnHydrationMismatch(fiber, !0);\n    }\n    function popToNextHostParent(fiber) {\n      for (hydrationParentFiber = fiber.return; hydrationParentFiber; )\n        switch (hydrationParentFiber.tag) {\n          case 5:\n          case 31:\n          case 13:\n            rootOrSingletonContext = !1;\n            return;\n          case 27:\n          case 3:\n            rootOrSingletonContext = !0;\n            return;\n          default:\n            hydrationParentFiber = hydrationParentFiber.return;\n        }\n    }\n    function popHydrationState(fiber) {\n      if (fiber !== hydrationParentFiber) return !1;\n      if (!isHydrating)\n        return popToNextHostParent(fiber), (isHydrating = !0), !1;\n      var tag = fiber.tag,\n        JSCompiler_temp;\n      if ((JSCompiler_temp = 3 !== tag && 27 !== tag)) {\n        if ((JSCompiler_temp = 5 === tag))\n          (JSCompiler_temp = fiber.type),\n            (JSCompiler_temp =\n              !(\"form\" !== JSCompiler_temp && \"button\" !== JSCompiler_temp) ||\n              shouldSetTextContent(fiber.type, fiber.memoizedProps));\n        JSCompiler_temp = !JSCompiler_temp;\n      }\n      if (JSCompiler_temp && nextHydratableInstance) {\n        for (JSCompiler_temp = nextHydratableInstance; JSCompiler_temp; ) {\n          var diffNode = buildHydrationDiffNode(fiber, 0),\n            description =\n              describeHydratableInstanceForDevWarnings(JSCompiler_temp);\n          diffNode.serverTail.push(description);\n          JSCompiler_temp =\n            \"Suspense\" === description.type\n              ? getNextHydratableInstanceAfterHydrationBoundary(JSCompiler_temp)\n              : getNextHydratable(JSCompiler_temp.nextSibling);\n        }\n        throwOnHydrationMismatch(fiber);\n      }\n      popToNextHostParent(fiber);\n      if (13 === tag) {\n        fiber = fiber.memoizedState;\n        fiber = null !== fiber ? fiber.dehydrated : null;\n        if (!fiber)\n          throw Error(\n            \"Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.\"\n          );\n        nextHydratableInstance =\n          getNextHydratableInstanceAfterHydrationBoundary(fiber);\n      } else if (31 === tag) {\n        fiber = fiber.memoizedState;\n        fiber = null !== fiber ? fiber.dehydrated : null;\n        if (!fiber)\n          throw Error(\n            \"Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.\"\n          );\n        nextHydratableInstance =\n          getNextHydratableInstanceAfterHydrationBoundary(fiber);\n      } else\n        27 === tag\n          ? ((tag = nextHydratableInstance),\n            isSingletonScope(fiber.type)\n              ? ((fiber = previousHydratableOnEnteringScopedSingleton),\n                (previousHydratableOnEnteringScopedSingleton = null),\n                (nextHydratableInstance = fiber))\n              : (nextHydratableInstance = tag))\n          : (nextHydratableInstance = hydrationParentFiber\n              ? getNextHydratable(fiber.stateNode.nextSibling)\n              : null);\n      return !0;\n    }\n    function resetHydrationState() {\n      nextHydratableInstance = hydrationParentFiber = null;\n      didSuspendOrErrorDEV = isHydrating = !1;\n    }\n    function upgradeHydrationErrorsToRecoverable() {\n      var queuedErrors = hydrationErrors;\n      null !== queuedErrors &&\n        (null === workInProgressRootRecoverableErrors\n          ? (workInProgressRootRecoverableErrors = queuedErrors)\n          : workInProgressRootRecoverableErrors.push.apply(\n              workInProgressRootRecoverableErrors,\n              queuedErrors\n            ),\n        (hydrationErrors = null));\n      return queuedErrors;\n    }\n    function queueHydrationError(error) {\n      null === hydrationErrors\n        ? (hydrationErrors = [error])\n        : hydrationErrors.push(error);\n    }\n    function emitPendingHydrationWarnings() {\n      var diffRoot = hydrationDiffRootDEV;\n      if (null !== diffRoot) {\n        hydrationDiffRootDEV = null;\n        for (var diff = describeDiff(diffRoot); 0 < diffRoot.children.length; )\n          diffRoot = diffRoot.children[0];\n        runWithFiberInDEV(diffRoot.fiber, function () {\n          console.error(\n            \"A tree hydrated but some attributes of the server rendered HTML didn't match the client properties. This won't be patched up. This can happen if a SSR-ed Client Component used:\\n\\n- A server/client branch `if (typeof window !== 'undefined')`.\\n- Variable input such as `Date.now()` or `Math.random()` which changes each time it's called.\\n- Date formatting in a user's locale which doesn't match the server.\\n- External changing data without sending a snapshot of it along with the HTML.\\n- Invalid HTML tag nesting.\\n\\nIt can also happen if the client has a browser extension installed which messes with the HTML before React loaded.\\n\\n%s%s\",\n            \"https://react.dev/link/hydration-mismatch\",\n            diff\n          );\n        });\n      }\n    }\n    function resetContextDependencies() {\n      lastContextDependency = currentlyRenderingFiber$1 = null;\n      isDisallowedContextReadInDEV = !1;\n    }\n    function pushProvider(providerFiber, context, nextValue) {\n      push(valueCursor, context._currentValue, providerFiber);\n      context._currentValue = nextValue;\n      push(rendererCursorDEV, context._currentRenderer, providerFiber);\n      void 0 !== context._currentRenderer &&\n        null !== context._currentRenderer &&\n        context._currentRenderer !== rendererSigil &&\n        console.error(\n          \"Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported.\"\n        );\n      context._currentRenderer = rendererSigil;\n    }\n    function popProvider(context, providerFiber) {\n      context._currentValue = valueCursor.current;\n      var currentRenderer = rendererCursorDEV.current;\n      pop(rendererCursorDEV, providerFiber);\n      context._currentRenderer = currentRenderer;\n      pop(valueCursor, providerFiber);\n    }\n    function scheduleContextWorkOnParentPath(\n      parent,\n      renderLanes,\n      propagationRoot\n    ) {\n      for (; null !== parent; ) {\n        var alternate = parent.alternate;\n        (parent.childLanes & renderLanes) !== renderLanes\n          ? ((parent.childLanes |= renderLanes),\n            null !== alternate && (alternate.childLanes |= renderLanes))\n          : null !== alternate &&\n            (alternate.childLanes & renderLanes) !== renderLanes &&\n            (alternate.childLanes |= renderLanes);\n        if (parent === propagationRoot) break;\n        parent = parent.return;\n      }\n      parent !== propagationRoot &&\n        console.error(\n          \"Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue.\"\n        );\n    }\n    function propagateContextChanges(\n      workInProgress,\n      contexts,\n      renderLanes,\n      forcePropagateEntireTree\n    ) {\n      var fiber = workInProgress.child;\n      null !== fiber && (fiber.return = workInProgress);\n      for (; null !== fiber; ) {\n        var list = fiber.dependencies;\n        if (null !== list) {\n          var nextFiber = fiber.child;\n          list = list.firstContext;\n          a: for (; null !== list; ) {\n            var dependency = list;\n            list = fiber;\n            for (var i = 0; i < contexts.length; i++)\n              if (dependency.context === contexts[i]) {\n                list.lanes |= renderLanes;\n                dependency = list.alternate;\n                null !== dependency && (dependency.lanes |= renderLanes);\n                scheduleContextWorkOnParentPath(\n                  list.return,\n                  renderLanes,\n                  workInProgress\n                );\n                forcePropagateEntireTree || (nextFiber = null);\n                break a;\n              }\n            list = dependency.next;\n          }\n        } else if (18 === fiber.tag) {\n          nextFiber = fiber.return;\n          if (null === nextFiber)\n            throw Error(\n              \"We just came from a parent so we must have had a parent. This is a bug in React.\"\n            );\n          nextFiber.lanes |= renderLanes;\n          list = nextFiber.alternate;\n          null !== list && (list.lanes |= renderLanes);\n          scheduleContextWorkOnParentPath(\n            nextFiber,\n            renderLanes,\n            workInProgress\n          );\n          nextFiber = null;\n        } else nextFiber = fiber.child;\n        if (null !== nextFiber) nextFiber.return = fiber;\n        else\n          for (nextFiber = fiber; null !== nextFiber; ) {\n            if (nextFiber === workInProgress) {\n              nextFiber = null;\n              break;\n            }\n            fiber = nextFiber.sibling;\n            if (null !== fiber) {\n              fiber.return = nextFiber.return;\n              nextFiber = fiber;\n              break;\n            }\n            nextFiber = nextFiber.return;\n          }\n        fiber = nextFiber;\n      }\n    }\n    function propagateParentContextChanges(\n      current,\n      workInProgress,\n      renderLanes,\n      forcePropagateEntireTree\n    ) {\n      current = null;\n      for (\n        var parent = workInProgress, isInsidePropagationBailout = !1;\n        null !== parent;\n\n      ) {\n        if (!isInsidePropagationBailout)\n          if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0;\n          else if (0 !== (parent.flags & 262144)) break;\n        if (10 === parent.tag) {\n          var currentParent = parent.alternate;\n          if (null === currentParent)\n            throw Error(\"Should have a current fiber. This is a bug in React.\");\n          currentParent = currentParent.memoizedProps;\n          if (null !== currentParent) {\n            var context = parent.type;\n            objectIs(parent.pendingProps.value, currentParent.value) ||\n              (null !== current\n                ? current.push(context)\n                : (current = [context]));\n          }\n        } else if (parent === hostTransitionProviderCursor.current) {\n          currentParent = parent.alternate;\n          if (null === currentParent)\n            throw Error(\"Should have a current fiber. This is a bug in React.\");\n          currentParent.memoizedState.memoizedState !==\n            parent.memoizedState.memoizedState &&\n            (null !== current\n              ? current.push(HostTransitionContext)\n              : (current = [HostTransitionContext]));\n        }\n        parent = parent.return;\n      }\n      null !== current &&\n        propagateContextChanges(\n          workInProgress,\n          current,\n          renderLanes,\n          forcePropagateEntireTree\n        );\n      workInProgress.flags |= 262144;\n    }\n    function checkIfContextChanged(currentDependencies) {\n      for (\n        currentDependencies = currentDependencies.firstContext;\n        null !== currentDependencies;\n\n      ) {\n        if (\n          !objectIs(\n            currentDependencies.context._currentValue,\n            currentDependencies.memoizedValue\n          )\n        )\n          return !0;\n        currentDependencies = currentDependencies.next;\n      }\n      return !1;\n    }\n    function prepareToReadContext(workInProgress) {\n      currentlyRenderingFiber$1 = workInProgress;\n      lastContextDependency = null;\n      workInProgress = workInProgress.dependencies;\n      null !== workInProgress && (workInProgress.firstContext = null);\n    }\n    function readContext(context) {\n      isDisallowedContextReadInDEV &&\n        console.error(\n          \"Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().\"\n        );\n      return readContextForConsumer(currentlyRenderingFiber$1, context);\n    }\n    function readContextDuringReconciliation(consumer, context) {\n      null === currentlyRenderingFiber$1 && prepareToReadContext(consumer);\n      return readContextForConsumer(consumer, context);\n    }\n    function readContextForConsumer(consumer, context) {\n      var value = context._currentValue;\n      context = { context: context, memoizedValue: value, next: null };\n      if (null === lastContextDependency) {\n        if (null === consumer)\n          throw Error(\n            \"Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().\"\n          );\n        lastContextDependency = context;\n        consumer.dependencies = {\n          lanes: 0,\n          firstContext: context,\n          _debugThenableState: null\n        };\n        consumer.flags |= 524288;\n      } else lastContextDependency = lastContextDependency.next = context;\n      return value;\n    }\n    function createCache() {\n      return {\n        controller: new AbortControllerLocal(),\n        data: new Map(),\n        refCount: 0\n      };\n    }\n    function retainCache(cache) {\n      cache.controller.signal.aborted &&\n        console.warn(\n          \"A cache instance was retained after it was already freed. This likely indicates a bug in React.\"\n        );\n      cache.refCount++;\n    }\n    function releaseCache(cache) {\n      cache.refCount--;\n      0 > cache.refCount &&\n        console.warn(\n          \"A cache instance was released after it was already freed. This likely indicates a bug in React.\"\n        );\n      0 === cache.refCount &&\n        scheduleCallback$2(NormalPriority, function () {\n          cache.controller.abort();\n        });\n    }\n    function startUpdateTimerByLane(lane, method, fiber) {\n      if (0 !== (lane & 127))\n        0 > blockingUpdateTime &&\n          ((blockingUpdateTime = now()),\n          (blockingUpdateTask = createTask(method)),\n          (blockingUpdateMethodName = method),\n          null != fiber &&\n            (blockingUpdateComponentName = getComponentNameFromFiber(fiber)),\n          (executionContext & (RenderContext | CommitContext)) !== NoContext &&\n            ((componentEffectSpawnedUpdate = !0),\n            (blockingUpdateType = SPAWNED_UPDATE)),\n          (lane = resolveEventTimeStamp()),\n          (method = resolveEventType()),\n          lane !== blockingEventRepeatTime || method !== blockingEventType\n            ? (blockingEventRepeatTime = -1.1)\n            : null !== method && (blockingUpdateType = SPAWNED_UPDATE),\n          (blockingEventTime = lane),\n          (blockingEventType = method));\n      else if (\n        0 !== (lane & 4194048) &&\n        0 > transitionUpdateTime &&\n        ((transitionUpdateTime = now()),\n        (transitionUpdateTask = createTask(method)),\n        (transitionUpdateMethodName = method),\n        null != fiber &&\n          (transitionUpdateComponentName = getComponentNameFromFiber(fiber)),\n        0 > transitionStartTime)\n      ) {\n        lane = resolveEventTimeStamp();\n        method = resolveEventType();\n        if (\n          lane !== transitionEventRepeatTime ||\n          method !== transitionEventType\n        )\n          transitionEventRepeatTime = -1.1;\n        transitionEventTime = lane;\n        transitionEventType = method;\n      }\n    }\n    function startHostActionTimer(fiber) {\n      if (0 > blockingUpdateTime) {\n        blockingUpdateTime = now();\n        blockingUpdateTask = null != fiber._debugTask ? fiber._debugTask : null;\n        (executionContext & (RenderContext | CommitContext)) !== NoContext &&\n          (blockingUpdateType = SPAWNED_UPDATE);\n        var newEventTime = resolveEventTimeStamp(),\n          newEventType = resolveEventType();\n        newEventTime !== blockingEventRepeatTime ||\n        newEventType !== blockingEventType\n          ? (blockingEventRepeatTime = -1.1)\n          : null !== newEventType && (blockingUpdateType = SPAWNED_UPDATE);\n        blockingEventTime = newEventTime;\n        blockingEventType = newEventType;\n      }\n      if (\n        0 > transitionUpdateTime &&\n        ((transitionUpdateTime = now()),\n        (transitionUpdateTask =\n          null != fiber._debugTask ? fiber._debugTask : null),\n        0 > transitionStartTime)\n      ) {\n        fiber = resolveEventTimeStamp();\n        newEventTime = resolveEventType();\n        if (\n          fiber !== transitionEventRepeatTime ||\n          newEventTime !== transitionEventType\n        )\n          transitionEventRepeatTime = -1.1;\n        transitionEventTime = fiber;\n        transitionEventType = newEventTime;\n      }\n    }\n    function pushNestedEffectDurations() {\n      var prevEffectDuration = profilerEffectDuration;\n      profilerEffectDuration = 0;\n      return prevEffectDuration;\n    }\n    function popNestedEffectDurations(prevEffectDuration) {\n      var elapsedTime = profilerEffectDuration;\n      profilerEffectDuration = prevEffectDuration;\n      return elapsedTime;\n    }\n    function bubbleNestedEffectDurations(prevEffectDuration) {\n      var elapsedTime = profilerEffectDuration;\n      profilerEffectDuration += prevEffectDuration;\n      return elapsedTime;\n    }\n    function resetComponentEffectTimers() {\n      componentEffectEndTime = componentEffectStartTime = -1.1;\n    }\n    function pushComponentEffectStart() {\n      var prevEffectStart = componentEffectStartTime;\n      componentEffectStartTime = -1.1;\n      return prevEffectStart;\n    }\n    function popComponentEffectStart(prevEffectStart) {\n      0 <= prevEffectStart && (componentEffectStartTime = prevEffectStart);\n    }\n    function pushComponentEffectDuration() {\n      var prevEffectDuration = componentEffectDuration;\n      componentEffectDuration = -0;\n      return prevEffectDuration;\n    }\n    function popComponentEffectDuration(prevEffectDuration) {\n      0 <= prevEffectDuration && (componentEffectDuration = prevEffectDuration);\n    }\n    function pushComponentEffectErrors() {\n      var prevErrors = componentEffectErrors;\n      componentEffectErrors = null;\n      return prevErrors;\n    }\n    function pushComponentEffectDidSpawnUpdate() {\n      var prev = componentEffectSpawnedUpdate;\n      componentEffectSpawnedUpdate = !1;\n      return prev;\n    }\n    function startProfilerTimer(fiber) {\n      profilerStartTime = now();\n      0 > fiber.actualStartTime && (fiber.actualStartTime = profilerStartTime);\n    }\n    function stopProfilerTimerIfRunningAndRecordDuration(fiber) {\n      if (0 <= profilerStartTime) {\n        var elapsedTime = now() - profilerStartTime;\n        fiber.actualDuration += elapsedTime;\n        fiber.selfBaseDuration = elapsedTime;\n        profilerStartTime = -1;\n      }\n    }\n    function stopProfilerTimerIfRunningAndRecordIncompleteDuration(fiber) {\n      if (0 <= profilerStartTime) {\n        var elapsedTime = now() - profilerStartTime;\n        fiber.actualDuration += elapsedTime;\n        profilerStartTime = -1;\n      }\n    }\n    function recordEffectDuration() {\n      if (0 <= profilerStartTime) {\n        var endTime = now(),\n          elapsedTime = endTime - profilerStartTime;\n        profilerStartTime = -1;\n        profilerEffectDuration += elapsedTime;\n        componentEffectDuration += elapsedTime;\n        componentEffectEndTime = endTime;\n      }\n    }\n    function recordEffectError(errorInfo) {\n      null === componentEffectErrors && (componentEffectErrors = []);\n      componentEffectErrors.push(errorInfo);\n      null === commitErrors && (commitErrors = []);\n      commitErrors.push(errorInfo);\n    }\n    function startEffectTimer() {\n      profilerStartTime = now();\n      0 > componentEffectStartTime &&\n        (componentEffectStartTime = profilerStartTime);\n    }\n    function transferActualDuration(fiber) {\n      for (var child = fiber.child; child; )\n        (fiber.actualDuration += child.actualDuration), (child = child.sibling);\n    }\n    function entangleAsyncAction(transition, thenable) {\n      if (null === currentEntangledListeners) {\n        var entangledListeners = (currentEntangledListeners = []);\n        currentEntangledPendingCount = 0;\n        currentEntangledLane = requestTransitionLane();\n        currentEntangledActionThenable = {\n          status: \"pending\",\n          value: void 0,\n          then: function (resolve) {\n            entangledListeners.push(resolve);\n          }\n        };\n      }\n      currentEntangledPendingCount++;\n      thenable.then(pingEngtangledActionScope, pingEngtangledActionScope);\n      return thenable;\n    }\n    function pingEngtangledActionScope() {\n      if (\n        0 === --currentEntangledPendingCount &&\n        (-1 < transitionUpdateTime || (transitionStartTime = -1.1),\n        null !== currentEntangledListeners)\n      ) {\n        null !== currentEntangledActionThenable &&\n          (currentEntangledActionThenable.status = \"fulfilled\");\n        var listeners = currentEntangledListeners;\n        currentEntangledListeners = null;\n        currentEntangledLane = 0;\n        currentEntangledActionThenable = null;\n        for (var i = 0; i < listeners.length; i++) (0, listeners[i])();\n      }\n    }\n    function chainThenableValue(thenable, result) {\n      var listeners = [],\n        thenableWithOverride = {\n          status: \"pending\",\n          value: null,\n          reason: null,\n          then: function (resolve) {\n            listeners.push(resolve);\n          }\n        };\n      thenable.then(\n        function () {\n          thenableWithOverride.status = \"fulfilled\";\n          thenableWithOverride.value = result;\n          for (var i = 0; i < listeners.length; i++) (0, listeners[i])(result);\n        },\n        function (error) {\n          thenableWithOverride.status = \"rejected\";\n          thenableWithOverride.reason = error;\n          for (error = 0; error < listeners.length; error++)\n            (0, listeners[error])(void 0);\n        }\n      );\n      return thenableWithOverride;\n    }\n    function peekCacheFromPool() {\n      var cacheResumedFromPreviousRender = resumedCache.current;\n      return null !== cacheResumedFromPreviousRender\n        ? cacheResumedFromPreviousRender\n        : workInProgressRoot.pooledCache;\n    }\n    function pushTransition(offscreenWorkInProgress, prevCachePool) {\n      null === prevCachePool\n        ? push(resumedCache, resumedCache.current, offscreenWorkInProgress)\n        : push(resumedCache, prevCachePool.pool, offscreenWorkInProgress);\n    }\n    function getSuspendedCache() {\n      var cacheFromPool = peekCacheFromPool();\n      return null === cacheFromPool\n        ? null\n        : { parent: CacheContext._currentValue, pool: cacheFromPool };\n    }\n    function createThenableState() {\n      return { didWarnAboutUncachedPromise: !1, thenables: [] };\n    }\n    function isThenableResolved(thenable) {\n      thenable = thenable.status;\n      return \"fulfilled\" === thenable || \"rejected\" === thenable;\n    }\n    function trackUsedThenable(thenableState, thenable, index) {\n      null !== ReactSharedInternals.actQueue &&\n        (ReactSharedInternals.didUsePromise = !0);\n      var trackedThenables = thenableState.thenables;\n      index = trackedThenables[index];\n      void 0 === index\n        ? trackedThenables.push(thenable)\n        : index !== thenable &&\n          (thenableState.didWarnAboutUncachedPromise ||\n            ((thenableState.didWarnAboutUncachedPromise = !0),\n            console.error(\n              \"A component was suspended by an uncached promise. Creating promises inside a Client Component or hook is not yet supported, except via a Suspense-compatible library or framework.\"\n            )),\n          thenable.then(noop$1, noop$1),\n          (thenable = index));\n      if (void 0 === thenable._debugInfo) {\n        thenableState = performance.now();\n        trackedThenables = thenable.displayName;\n        var ioInfo = {\n          name:\n            \"string\" === typeof trackedThenables ? trackedThenables : \"Promise\",\n          start: thenableState,\n          end: thenableState,\n          value: thenable\n        };\n        thenable._debugInfo = [{ awaited: ioInfo }];\n        \"fulfilled\" !== thenable.status &&\n          \"rejected\" !== thenable.status &&\n          ((thenableState = function () {\n            ioInfo.end = performance.now();\n          }),\n          thenable.then(thenableState, thenableState));\n      }\n      switch (thenable.status) {\n        case \"fulfilled\":\n          return thenable.value;\n        case \"rejected\":\n          throw (\n            ((thenableState = thenable.reason),\n            checkIfUseWrappedInAsyncCatch(thenableState),\n            thenableState)\n          );\n        default:\n          if (\"string\" === typeof thenable.status)\n            thenable.then(noop$1, noop$1);\n          else {\n            thenableState = workInProgressRoot;\n            if (\n              null !== thenableState &&\n              100 < thenableState.shellSuspendCounter\n            )\n              throw Error(\n                \"An unknown Component is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.\"\n              );\n            thenableState = thenable;\n            thenableState.status = \"pending\";\n            thenableState.then(\n              function (fulfilledValue) {\n                if (\"pending\" === thenable.status) {\n                  var fulfilledThenable = thenable;\n                  fulfilledThenable.status = \"fulfilled\";\n                  fulfilledThenable.value = fulfilledValue;\n                }\n              },\n              function (error) {\n                if (\"pending\" === thenable.status) {\n                  var rejectedThenable = thenable;\n                  rejectedThenable.status = \"rejected\";\n                  rejectedThenable.reason = error;\n                }\n              }\n            );\n          }\n          switch (thenable.status) {\n            case \"fulfilled\":\n              return thenable.value;\n            case \"rejected\":\n              throw (\n                ((thenableState = thenable.reason),\n                checkIfUseWrappedInAsyncCatch(thenableState),\n                thenableState)\n              );\n          }\n          suspendedThenable = thenable;\n          needsToResetSuspendedThenableDEV = !0;\n          throw SuspenseException;\n      }\n    }\n    function resolveLazy(lazyType) {\n      try {\n        return callLazyInitInDEV(lazyType);\n      } catch (x) {\n        if (null !== x && \"object\" === typeof x && \"function\" === typeof x.then)\n          throw (\n            ((suspendedThenable = x),\n            (needsToResetSuspendedThenableDEV = !0),\n            SuspenseException)\n          );\n        throw x;\n      }\n    }\n    function getSuspendedThenable() {\n      if (null === suspendedThenable)\n        throw Error(\n          \"Expected a suspended thenable. This is a bug in React. Please file an issue.\"\n        );\n      var thenable = suspendedThenable;\n      suspendedThenable = null;\n      needsToResetSuspendedThenableDEV = !1;\n      return thenable;\n    }\n    function checkIfUseWrappedInAsyncCatch(rejectedReason) {\n      if (\n        rejectedReason === SuspenseException ||\n        rejectedReason === SuspenseActionException\n      )\n        throw Error(\n          \"Hooks are not supported inside an async component. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.\"\n        );\n    }\n    function pushDebugInfo(debugInfo) {\n      var previousDebugInfo = currentDebugInfo;\n      null != debugInfo &&\n        (currentDebugInfo =\n          null === previousDebugInfo\n            ? debugInfo\n            : previousDebugInfo.concat(debugInfo));\n      return previousDebugInfo;\n    }\n    function getCurrentDebugTask() {\n      var debugInfo = currentDebugInfo;\n      if (null != debugInfo)\n        for (var i = debugInfo.length - 1; 0 <= i; i--)\n          if (null != debugInfo[i].name) {\n            var debugTask = debugInfo[i].debugTask;\n            if (null != debugTask) return debugTask;\n          }\n      return null;\n    }\n    function validateFragmentProps(element, fiber, returnFiber) {\n      for (var keys = Object.keys(element.props), i = 0; i < keys.length; i++) {\n        var key = keys[i];\n        if (\"children\" !== key && \"key\" !== key) {\n          null === fiber &&\n            ((fiber = createFiberFromElement(element, returnFiber.mode, 0)),\n            (fiber._debugInfo = currentDebugInfo),\n            (fiber.return = returnFiber));\n          runWithFiberInDEV(\n            fiber,\n            function (erroredKey) {\n              console.error(\n                \"Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.\",\n                erroredKey\n              );\n            },\n            key\n          );\n          break;\n        }\n      }\n    }\n    function unwrapThenable(thenable) {\n      var index = thenableIndexCounter$1;\n      thenableIndexCounter$1 += 1;\n      null === thenableState$1 && (thenableState$1 = createThenableState());\n      return trackUsedThenable(thenableState$1, thenable, index);\n    }\n    function coerceRef(workInProgress, element) {\n      element = element.props.ref;\n      workInProgress.ref = void 0 !== element ? element : null;\n    }\n    function throwOnInvalidObjectTypeImpl(returnFiber, newChild) {\n      if (newChild.$$typeof === REACT_LEGACY_ELEMENT_TYPE)\n        throw Error(\n          'A React Element from an older version of React was rendered. This is not supported. It can happen if:\\n- Multiple copies of the \"react\" package is used.\\n- A library pre-bundled an old copy of \"react\" or \"react/jsx-runtime\".\\n- A compiler tries to \"inline\" JSX instead of using the runtime.'\n        );\n      returnFiber = Object.prototype.toString.call(newChild);\n      throw Error(\n        \"Objects are not valid as a React child (found: \" +\n          (\"[object Object]\" === returnFiber\n            ? \"object with keys {\" + Object.keys(newChild).join(\", \") + \"}\"\n            : returnFiber) +\n          \"). If you meant to render a collection of children, use an array instead.\"\n      );\n    }\n    function throwOnInvalidObjectType(returnFiber, newChild) {\n      var debugTask = getCurrentDebugTask();\n      null !== debugTask\n        ? debugTask.run(\n            throwOnInvalidObjectTypeImpl.bind(null, returnFiber, newChild)\n          )\n        : throwOnInvalidObjectTypeImpl(returnFiber, newChild);\n    }\n    function warnOnFunctionTypeImpl(returnFiber, invalidChild) {\n      var parentName = getComponentNameFromFiber(returnFiber) || \"Component\";\n      ownerHasFunctionTypeWarning[parentName] ||\n        ((ownerHasFunctionTypeWarning[parentName] = !0),\n        (invalidChild =\n          invalidChild.displayName || invalidChild.name || \"Component\"),\n        3 === returnFiber.tag\n          ? console.error(\n              \"Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.\\n  root.render(%s)\",\n              invalidChild,\n              invalidChild,\n              invalidChild\n            )\n          : console.error(\n              \"Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.\\n  <%s>{%s}</%s>\",\n              invalidChild,\n              invalidChild,\n              parentName,\n              invalidChild,\n              parentName\n            ));\n    }\n    function warnOnFunctionType(returnFiber, invalidChild) {\n      var debugTask = getCurrentDebugTask();\n      null !== debugTask\n        ? debugTask.run(\n            warnOnFunctionTypeImpl.bind(null, returnFiber, invalidChild)\n          )\n        : warnOnFunctionTypeImpl(returnFiber, invalidChild);\n    }\n    function warnOnSymbolTypeImpl(returnFiber, invalidChild) {\n      var parentName = getComponentNameFromFiber(returnFiber) || \"Component\";\n      ownerHasSymbolTypeWarning[parentName] ||\n        ((ownerHasSymbolTypeWarning[parentName] = !0),\n        (invalidChild = String(invalidChild)),\n        3 === returnFiber.tag\n          ? console.error(\n              \"Symbols are not valid as a React child.\\n  root.render(%s)\",\n              invalidChild\n            )\n          : console.error(\n              \"Symbols are not valid as a React child.\\n  <%s>%s</%s>\",\n              parentName,\n              invalidChild,\n              parentName\n            ));\n    }\n    function warnOnSymbolType(returnFiber, invalidChild) {\n      var debugTask = getCurrentDebugTask();\n      null !== debugTask\n        ? debugTask.run(\n            warnOnSymbolTypeImpl.bind(null, returnFiber, invalidChild)\n          )\n        : warnOnSymbolTypeImpl(returnFiber, invalidChild);\n    }\n    function createChildReconciler(shouldTrackSideEffects) {\n      function deleteChild(returnFiber, childToDelete) {\n        if (shouldTrackSideEffects) {\n          var deletions = returnFiber.deletions;\n          null === deletions\n            ? ((returnFiber.deletions = [childToDelete]),\n              (returnFiber.flags |= 16))\n            : deletions.push(childToDelete);\n        }\n      }\n      function deleteRemainingChildren(returnFiber, currentFirstChild) {\n        if (!shouldTrackSideEffects) return null;\n        for (; null !== currentFirstChild; )\n          deleteChild(returnFiber, currentFirstChild),\n            (currentFirstChild = currentFirstChild.sibling);\n        return null;\n      }\n      function mapRemainingChildren(currentFirstChild) {\n        for (var existingChildren = new Map(); null !== currentFirstChild; )\n          null !== currentFirstChild.key\n            ? existingChildren.set(currentFirstChild.key, currentFirstChild)\n            : existingChildren.set(currentFirstChild.index, currentFirstChild),\n            (currentFirstChild = currentFirstChild.sibling);\n        return existingChildren;\n      }\n      function useFiber(fiber, pendingProps) {\n        fiber = createWorkInProgress(fiber, pendingProps);\n        fiber.index = 0;\n        fiber.sibling = null;\n        return fiber;\n      }\n      function placeChild(newFiber, lastPlacedIndex, newIndex) {\n        newFiber.index = newIndex;\n        if (!shouldTrackSideEffects)\n          return (newFiber.flags |= 1048576), lastPlacedIndex;\n        newIndex = newFiber.alternate;\n        if (null !== newIndex)\n          return (\n            (newIndex = newIndex.index),\n            newIndex < lastPlacedIndex\n              ? ((newFiber.flags |= 67108866), lastPlacedIndex)\n              : newIndex\n          );\n        newFiber.flags |= 67108866;\n        return lastPlacedIndex;\n      }\n      function placeSingleChild(newFiber) {\n        shouldTrackSideEffects &&\n          null === newFiber.alternate &&\n          (newFiber.flags |= 67108866);\n        return newFiber;\n      }\n      function updateTextNode(returnFiber, current, textContent, lanes) {\n        if (null === current || 6 !== current.tag)\n          return (\n            (current = createFiberFromText(\n              textContent,\n              returnFiber.mode,\n              lanes\n            )),\n            (current.return = returnFiber),\n            (current._debugOwner = returnFiber),\n            (current._debugTask = returnFiber._debugTask),\n            (current._debugInfo = currentDebugInfo),\n            current\n          );\n        current = useFiber(current, textContent);\n        current.return = returnFiber;\n        current._debugInfo = currentDebugInfo;\n        return current;\n      }\n      function updateElement(returnFiber, current, element, lanes) {\n        var elementType = element.type;\n        if (elementType === REACT_FRAGMENT_TYPE)\n          return (\n            (current = updateFragment(\n              returnFiber,\n              current,\n              element.props.children,\n              lanes,\n              element.key\n            )),\n            validateFragmentProps(element, current, returnFiber),\n            current\n          );\n        if (\n          null !== current &&\n          (current.elementType === elementType ||\n            isCompatibleFamilyForHotReloading(current, element) ||\n            (\"object\" === typeof elementType &&\n              null !== elementType &&\n              elementType.$$typeof === REACT_LAZY_TYPE &&\n              resolveLazy(elementType) === current.type))\n        )\n          return (\n            (current = useFiber(current, element.props)),\n            coerceRef(current, element),\n            (current.return = returnFiber),\n            (current._debugOwner = element._owner),\n            (current._debugInfo = currentDebugInfo),\n            current\n          );\n        current = createFiberFromElement(element, returnFiber.mode, lanes);\n        coerceRef(current, element);\n        current.return = returnFiber;\n        current._debugInfo = currentDebugInfo;\n        return current;\n      }\n      function updatePortal(returnFiber, current, portal, lanes) {\n        if (\n          null === current ||\n          4 !== current.tag ||\n          current.stateNode.containerInfo !== portal.containerInfo ||\n          current.stateNode.implementation !== portal.implementation\n        )\n          return (\n            (current = createFiberFromPortal(portal, returnFiber.mode, lanes)),\n            (current.return = returnFiber),\n            (current._debugInfo = currentDebugInfo),\n            current\n          );\n        current = useFiber(current, portal.children || []);\n        current.return = returnFiber;\n        current._debugInfo = currentDebugInfo;\n        return current;\n      }\n      function updateFragment(returnFiber, current, fragment, lanes, key) {\n        if (null === current || 7 !== current.tag)\n          return (\n            (current = createFiberFromFragment(\n              fragment,\n              returnFiber.mode,\n              lanes,\n              key\n            )),\n            (current.return = returnFiber),\n            (current._debugOwner = returnFiber),\n            (current._debugTask = returnFiber._debugTask),\n            (current._debugInfo = currentDebugInfo),\n            current\n          );\n        current = useFiber(current, fragment);\n        current.return = returnFiber;\n        current._debugInfo = currentDebugInfo;\n        return current;\n      }\n      function createChild(returnFiber, newChild, lanes) {\n        if (\n          (\"string\" === typeof newChild && \"\" !== newChild) ||\n          \"number\" === typeof newChild ||\n          \"bigint\" === typeof newChild\n        )\n          return (\n            (newChild = createFiberFromText(\n              \"\" + newChild,\n              returnFiber.mode,\n              lanes\n            )),\n            (newChild.return = returnFiber),\n            (newChild._debugOwner = returnFiber),\n            (newChild._debugTask = returnFiber._debugTask),\n            (newChild._debugInfo = currentDebugInfo),\n            newChild\n          );\n        if (\"object\" === typeof newChild && null !== newChild) {\n          switch (newChild.$$typeof) {\n            case REACT_ELEMENT_TYPE:\n              return (\n                (lanes = createFiberFromElement(\n                  newChild,\n                  returnFiber.mode,\n                  lanes\n                )),\n                coerceRef(lanes, newChild),\n                (lanes.return = returnFiber),\n                (returnFiber = pushDebugInfo(newChild._debugInfo)),\n                (lanes._debugInfo = currentDebugInfo),\n                (currentDebugInfo = returnFiber),\n                lanes\n              );\n            case REACT_PORTAL_TYPE:\n              return (\n                (newChild = createFiberFromPortal(\n                  newChild,\n                  returnFiber.mode,\n                  lanes\n                )),\n                (newChild.return = returnFiber),\n                (newChild._debugInfo = currentDebugInfo),\n                newChild\n              );\n            case REACT_LAZY_TYPE:\n              var _prevDebugInfo = pushDebugInfo(newChild._debugInfo);\n              newChild = resolveLazy(newChild);\n              returnFiber = createChild(returnFiber, newChild, lanes);\n              currentDebugInfo = _prevDebugInfo;\n              return returnFiber;\n          }\n          if (isArrayImpl(newChild) || getIteratorFn(newChild))\n            return (\n              (lanes = createFiberFromFragment(\n                newChild,\n                returnFiber.mode,\n                lanes,\n                null\n              )),\n              (lanes.return = returnFiber),\n              (lanes._debugOwner = returnFiber),\n              (lanes._debugTask = returnFiber._debugTask),\n              (returnFiber = pushDebugInfo(newChild._debugInfo)),\n              (lanes._debugInfo = currentDebugInfo),\n              (currentDebugInfo = returnFiber),\n              lanes\n            );\n          if (\"function\" === typeof newChild.then)\n            return (\n              (_prevDebugInfo = pushDebugInfo(newChild._debugInfo)),\n              (returnFiber = createChild(\n                returnFiber,\n                unwrapThenable(newChild),\n                lanes\n              )),\n              (currentDebugInfo = _prevDebugInfo),\n              returnFiber\n            );\n          if (newChild.$$typeof === REACT_CONTEXT_TYPE)\n            return createChild(\n              returnFiber,\n              readContextDuringReconciliation(returnFiber, newChild),\n              lanes\n            );\n          throwOnInvalidObjectType(returnFiber, newChild);\n        }\n        \"function\" === typeof newChild &&\n          warnOnFunctionType(returnFiber, newChild);\n        \"symbol\" === typeof newChild && warnOnSymbolType(returnFiber, newChild);\n        return null;\n      }\n      function updateSlot(returnFiber, oldFiber, newChild, lanes) {\n        var key = null !== oldFiber ? oldFiber.key : null;\n        if (\n          (\"string\" === typeof newChild && \"\" !== newChild) ||\n          \"number\" === typeof newChild ||\n          \"bigint\" === typeof newChild\n        )\n          return null !== key\n            ? null\n            : updateTextNode(returnFiber, oldFiber, \"\" + newChild, lanes);\n        if (\"object\" === typeof newChild && null !== newChild) {\n          switch (newChild.$$typeof) {\n            case REACT_ELEMENT_TYPE:\n              return newChild.key === key\n                ? ((key = pushDebugInfo(newChild._debugInfo)),\n                  (returnFiber = updateElement(\n                    returnFiber,\n                    oldFiber,\n                    newChild,\n                    lanes\n                  )),\n                  (currentDebugInfo = key),\n                  returnFiber)\n                : null;\n            case REACT_PORTAL_TYPE:\n              return newChild.key === key\n                ? updatePortal(returnFiber, oldFiber, newChild, lanes)\n                : null;\n            case REACT_LAZY_TYPE:\n              return (\n                (key = pushDebugInfo(newChild._debugInfo)),\n                (newChild = resolveLazy(newChild)),\n                (returnFiber = updateSlot(\n                  returnFiber,\n                  oldFiber,\n                  newChild,\n                  lanes\n                )),\n                (currentDebugInfo = key),\n                returnFiber\n              );\n          }\n          if (isArrayImpl(newChild) || getIteratorFn(newChild)) {\n            if (null !== key) return null;\n            key = pushDebugInfo(newChild._debugInfo);\n            returnFiber = updateFragment(\n              returnFiber,\n              oldFiber,\n              newChild,\n              lanes,\n              null\n            );\n            currentDebugInfo = key;\n            return returnFiber;\n          }\n          if (\"function\" === typeof newChild.then)\n            return (\n              (key = pushDebugInfo(newChild._debugInfo)),\n              (returnFiber = updateSlot(\n                returnFiber,\n                oldFiber,\n                unwrapThenable(newChild),\n                lanes\n              )),\n              (currentDebugInfo = key),\n              returnFiber\n            );\n          if (newChild.$$typeof === REACT_CONTEXT_TYPE)\n            return updateSlot(\n              returnFiber,\n              oldFiber,\n              readContextDuringReconciliation(returnFiber, newChild),\n              lanes\n            );\n          throwOnInvalidObjectType(returnFiber, newChild);\n        }\n        \"function\" === typeof newChild &&\n          warnOnFunctionType(returnFiber, newChild);\n        \"symbol\" === typeof newChild && warnOnSymbolType(returnFiber, newChild);\n        return null;\n      }\n      function updateFromMap(\n        existingChildren,\n        returnFiber,\n        newIdx,\n        newChild,\n        lanes\n      ) {\n        if (\n          (\"string\" === typeof newChild && \"\" !== newChild) ||\n          \"number\" === typeof newChild ||\n          \"bigint\" === typeof newChild\n        )\n          return (\n            (existingChildren = existingChildren.get(newIdx) || null),\n            updateTextNode(returnFiber, existingChildren, \"\" + newChild, lanes)\n          );\n        if (\"object\" === typeof newChild && null !== newChild) {\n          switch (newChild.$$typeof) {\n            case REACT_ELEMENT_TYPE:\n              return (\n                (newIdx =\n                  existingChildren.get(\n                    null === newChild.key ? newIdx : newChild.key\n                  ) || null),\n                (existingChildren = pushDebugInfo(newChild._debugInfo)),\n                (returnFiber = updateElement(\n                  returnFiber,\n                  newIdx,\n                  newChild,\n                  lanes\n                )),\n                (currentDebugInfo = existingChildren),\n                returnFiber\n              );\n            case REACT_PORTAL_TYPE:\n              return (\n                (existingChildren =\n                  existingChildren.get(\n                    null === newChild.key ? newIdx : newChild.key\n                  ) || null),\n                updatePortal(returnFiber, existingChildren, newChild, lanes)\n              );\n            case REACT_LAZY_TYPE:\n              var _prevDebugInfo7 = pushDebugInfo(newChild._debugInfo);\n              newChild = resolveLazy(newChild);\n              returnFiber = updateFromMap(\n                existingChildren,\n                returnFiber,\n                newIdx,\n                newChild,\n                lanes\n              );\n              currentDebugInfo = _prevDebugInfo7;\n              return returnFiber;\n          }\n          if (isArrayImpl(newChild) || getIteratorFn(newChild))\n            return (\n              (newIdx = existingChildren.get(newIdx) || null),\n              (existingChildren = pushDebugInfo(newChild._debugInfo)),\n              (returnFiber = updateFragment(\n                returnFiber,\n                newIdx,\n                newChild,\n                lanes,\n                null\n              )),\n              (currentDebugInfo = existingChildren),\n              returnFiber\n            );\n          if (\"function\" === typeof newChild.then)\n            return (\n              (_prevDebugInfo7 = pushDebugInfo(newChild._debugInfo)),\n              (returnFiber = updateFromMap(\n                existingChildren,\n                returnFiber,\n                newIdx,\n                unwrapThenable(newChild),\n                lanes\n              )),\n              (currentDebugInfo = _prevDebugInfo7),\n              returnFiber\n            );\n          if (newChild.$$typeof === REACT_CONTEXT_TYPE)\n            return updateFromMap(\n              existingChildren,\n              returnFiber,\n              newIdx,\n              readContextDuringReconciliation(returnFiber, newChild),\n              lanes\n            );\n          throwOnInvalidObjectType(returnFiber, newChild);\n        }\n        \"function\" === typeof newChild &&\n          warnOnFunctionType(returnFiber, newChild);\n        \"symbol\" === typeof newChild && warnOnSymbolType(returnFiber, newChild);\n        return null;\n      }\n      function warnOnInvalidKey(returnFiber, workInProgress, child, knownKeys) {\n        if (\"object\" !== typeof child || null === child) return knownKeys;\n        switch (child.$$typeof) {\n          case REACT_ELEMENT_TYPE:\n          case REACT_PORTAL_TYPE:\n            warnForMissingKey(returnFiber, workInProgress, child);\n            var key = child.key;\n            if (\"string\" !== typeof key) break;\n            if (null === knownKeys) {\n              knownKeys = new Set();\n              knownKeys.add(key);\n              break;\n            }\n            if (!knownKeys.has(key)) {\n              knownKeys.add(key);\n              break;\n            }\n            runWithFiberInDEV(workInProgress, function () {\n              console.error(\n                \"Encountered two children with the same key, `%s`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted \\u2014 the behavior is unsupported and could change in a future version.\",\n                key\n              );\n            });\n            break;\n          case REACT_LAZY_TYPE:\n            (child = resolveLazy(child)),\n              warnOnInvalidKey(returnFiber, workInProgress, child, knownKeys);\n        }\n        return knownKeys;\n      }\n      function reconcileChildrenArray(\n        returnFiber,\n        currentFirstChild,\n        newChildren,\n        lanes\n      ) {\n        for (\n          var knownKeys = null,\n            resultingFirstChild = null,\n            previousNewFiber = null,\n            oldFiber = currentFirstChild,\n            newIdx = (currentFirstChild = 0),\n            nextOldFiber = null;\n          null !== oldFiber && newIdx < newChildren.length;\n          newIdx++\n        ) {\n          oldFiber.index > newIdx\n            ? ((nextOldFiber = oldFiber), (oldFiber = null))\n            : (nextOldFiber = oldFiber.sibling);\n          var newFiber = updateSlot(\n            returnFiber,\n            oldFiber,\n            newChildren[newIdx],\n            lanes\n          );\n          if (null === newFiber) {\n            null === oldFiber && (oldFiber = nextOldFiber);\n            break;\n          }\n          knownKeys = warnOnInvalidKey(\n            returnFiber,\n            newFiber,\n            newChildren[newIdx],\n            knownKeys\n          );\n          shouldTrackSideEffects &&\n            oldFiber &&\n            null === newFiber.alternate &&\n            deleteChild(returnFiber, oldFiber);\n          currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx);\n          null === previousNewFiber\n            ? (resultingFirstChild = newFiber)\n            : (previousNewFiber.sibling = newFiber);\n          previousNewFiber = newFiber;\n          oldFiber = nextOldFiber;\n        }\n        if (newIdx === newChildren.length)\n          return (\n            deleteRemainingChildren(returnFiber, oldFiber),\n            isHydrating && pushTreeFork(returnFiber, newIdx),\n            resultingFirstChild\n          );\n        if (null === oldFiber) {\n          for (; newIdx < newChildren.length; newIdx++)\n            (oldFiber = createChild(returnFiber, newChildren[newIdx], lanes)),\n              null !== oldFiber &&\n                ((knownKeys = warnOnInvalidKey(\n                  returnFiber,\n                  oldFiber,\n                  newChildren[newIdx],\n                  knownKeys\n                )),\n                (currentFirstChild = placeChild(\n                  oldFiber,\n                  currentFirstChild,\n                  newIdx\n                )),\n                null === previousNewFiber\n                  ? (resultingFirstChild = oldFiber)\n                  : (previousNewFiber.sibling = oldFiber),\n                (previousNewFiber = oldFiber));\n          isHydrating && pushTreeFork(returnFiber, newIdx);\n          return resultingFirstChild;\n        }\n        for (\n          oldFiber = mapRemainingChildren(oldFiber);\n          newIdx < newChildren.length;\n          newIdx++\n        )\n          (nextOldFiber = updateFromMap(\n            oldFiber,\n            returnFiber,\n            newIdx,\n            newChildren[newIdx],\n            lanes\n          )),\n            null !== nextOldFiber &&\n              ((knownKeys = warnOnInvalidKey(\n                returnFiber,\n                nextOldFiber,\n                newChildren[newIdx],\n                knownKeys\n              )),\n              shouldTrackSideEffects &&\n                null !== nextOldFiber.alternate &&\n                oldFiber.delete(\n                  null === nextOldFiber.key ? newIdx : nextOldFiber.key\n                ),\n              (currentFirstChild = placeChild(\n                nextOldFiber,\n                currentFirstChild,\n                newIdx\n              )),\n              null === previousNewFiber\n                ? (resultingFirstChild = nextOldFiber)\n                : (previousNewFiber.sibling = nextOldFiber),\n              (previousNewFiber = nextOldFiber));\n        shouldTrackSideEffects &&\n          oldFiber.forEach(function (child) {\n            return deleteChild(returnFiber, child);\n          });\n        isHydrating && pushTreeFork(returnFiber, newIdx);\n        return resultingFirstChild;\n      }\n      function reconcileChildrenIterator(\n        returnFiber,\n        currentFirstChild,\n        newChildren,\n        lanes\n      ) {\n        if (null == newChildren)\n          throw Error(\"An iterable object provided no iterator.\");\n        for (\n          var resultingFirstChild = null,\n            previousNewFiber = null,\n            oldFiber = currentFirstChild,\n            newIdx = (currentFirstChild = 0),\n            nextOldFiber = null,\n            knownKeys = null,\n            step = newChildren.next();\n          null !== oldFiber && !step.done;\n          newIdx++, step = newChildren.next()\n        ) {\n          oldFiber.index > newIdx\n            ? ((nextOldFiber = oldFiber), (oldFiber = null))\n            : (nextOldFiber = oldFiber.sibling);\n          var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);\n          if (null === newFiber) {\n            null === oldFiber && (oldFiber = nextOldFiber);\n            break;\n          }\n          knownKeys = warnOnInvalidKey(\n            returnFiber,\n            newFiber,\n            step.value,\n            knownKeys\n          );\n          shouldTrackSideEffects &&\n            oldFiber &&\n            null === newFiber.alternate &&\n            deleteChild(returnFiber, oldFiber);\n          currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx);\n          null === previousNewFiber\n            ? (resultingFirstChild = newFiber)\n            : (previousNewFiber.sibling = newFiber);\n          previousNewFiber = newFiber;\n          oldFiber = nextOldFiber;\n        }\n        if (step.done)\n          return (\n            deleteRemainingChildren(returnFiber, oldFiber),\n            isHydrating && pushTreeFork(returnFiber, newIdx),\n            resultingFirstChild\n          );\n        if (null === oldFiber) {\n          for (; !step.done; newIdx++, step = newChildren.next())\n            (oldFiber = createChild(returnFiber, step.value, lanes)),\n              null !== oldFiber &&\n                ((knownKeys = warnOnInvalidKey(\n                  returnFiber,\n                  oldFiber,\n                  step.value,\n                  knownKeys\n                )),\n                (currentFirstChild = placeChild(\n                  oldFiber,\n                  currentFirstChild,\n                  newIdx\n                )),\n                null === previousNewFiber\n                  ? (resultingFirstChild = oldFiber)\n                  : (previousNewFiber.sibling = oldFiber),\n                (previousNewFiber = oldFiber));\n          isHydrating && pushTreeFork(returnFiber, newIdx);\n          return resultingFirstChild;\n        }\n        for (\n          oldFiber = mapRemainingChildren(oldFiber);\n          !step.done;\n          newIdx++, step = newChildren.next()\n        )\n          (nextOldFiber = updateFromMap(\n            oldFiber,\n            returnFiber,\n            newIdx,\n            step.value,\n            lanes\n          )),\n            null !== nextOldFiber &&\n              ((knownKeys = warnOnInvalidKey(\n                returnFiber,\n                nextOldFiber,\n                step.value,\n                knownKeys\n              )),\n              shouldTrackSideEffects &&\n                null !== nextOldFiber.alternate &&\n                oldFiber.delete(\n                  null === nextOldFiber.key ? newIdx : nextOldFiber.key\n                ),\n              (currentFirstChild = placeChild(\n                nextOldFiber,\n                currentFirstChild,\n                newIdx\n              )),\n              null === previousNewFiber\n                ? (resultingFirstChild = nextOldFiber)\n                : (previousNewFiber.sibling = nextOldFiber),\n              (previousNewFiber = nextOldFiber));\n        shouldTrackSideEffects &&\n          oldFiber.forEach(function (child) {\n            return deleteChild(returnFiber, child);\n          });\n        isHydrating && pushTreeFork(returnFiber, newIdx);\n        return resultingFirstChild;\n      }\n      function reconcileChildFibersImpl(\n        returnFiber,\n        currentFirstChild,\n        newChild,\n        lanes\n      ) {\n        \"object\" === typeof newChild &&\n          null !== newChild &&\n          newChild.type === REACT_FRAGMENT_TYPE &&\n          null === newChild.key &&\n          (validateFragmentProps(newChild, null, returnFiber),\n          (newChild = newChild.props.children));\n        if (\"object\" === typeof newChild && null !== newChild) {\n          switch (newChild.$$typeof) {\n            case REACT_ELEMENT_TYPE:\n              var prevDebugInfo = pushDebugInfo(newChild._debugInfo);\n              a: {\n                for (var key = newChild.key; null !== currentFirstChild; ) {\n                  if (currentFirstChild.key === key) {\n                    key = newChild.type;\n                    if (key === REACT_FRAGMENT_TYPE) {\n                      if (7 === currentFirstChild.tag) {\n                        deleteRemainingChildren(\n                          returnFiber,\n                          currentFirstChild.sibling\n                        );\n                        lanes = useFiber(\n                          currentFirstChild,\n                          newChild.props.children\n                        );\n                        lanes.return = returnFiber;\n                        lanes._debugOwner = newChild._owner;\n                        lanes._debugInfo = currentDebugInfo;\n                        validateFragmentProps(newChild, lanes, returnFiber);\n                        returnFiber = lanes;\n                        break a;\n                      }\n                    } else if (\n                      currentFirstChild.elementType === key ||\n                      isCompatibleFamilyForHotReloading(\n                        currentFirstChild,\n                        newChild\n                      ) ||\n                      (\"object\" === typeof key &&\n                        null !== key &&\n                        key.$$typeof === REACT_LAZY_TYPE &&\n                        resolveLazy(key) === currentFirstChild.type)\n                    ) {\n                      deleteRemainingChildren(\n                        returnFiber,\n                        currentFirstChild.sibling\n                      );\n                      lanes = useFiber(currentFirstChild, newChild.props);\n                      coerceRef(lanes, newChild);\n                      lanes.return = returnFiber;\n                      lanes._debugOwner = newChild._owner;\n                      lanes._debugInfo = currentDebugInfo;\n                      returnFiber = lanes;\n                      break a;\n                    }\n                    deleteRemainingChildren(returnFiber, currentFirstChild);\n                    break;\n                  } else deleteChild(returnFiber, currentFirstChild);\n                  currentFirstChild = currentFirstChild.sibling;\n                }\n                newChild.type === REACT_FRAGMENT_TYPE\n                  ? ((lanes = createFiberFromFragment(\n                      newChild.props.children,\n                      returnFiber.mode,\n                      lanes,\n                      newChild.key\n                    )),\n                    (lanes.return = returnFiber),\n                    (lanes._debugOwner = returnFiber),\n                    (lanes._debugTask = returnFiber._debugTask),\n                    (lanes._debugInfo = currentDebugInfo),\n                    validateFragmentProps(newChild, lanes, returnFiber),\n                    (returnFiber = lanes))\n                  : ((lanes = createFiberFromElement(\n                      newChild,\n                      returnFiber.mode,\n                      lanes\n                    )),\n                    coerceRef(lanes, newChild),\n                    (lanes.return = returnFiber),\n                    (lanes._debugInfo = currentDebugInfo),\n                    (returnFiber = lanes));\n              }\n              returnFiber = placeSingleChild(returnFiber);\n              currentDebugInfo = prevDebugInfo;\n              return returnFiber;\n            case REACT_PORTAL_TYPE:\n              a: {\n                prevDebugInfo = newChild;\n                for (\n                  newChild = prevDebugInfo.key;\n                  null !== currentFirstChild;\n\n                ) {\n                  if (currentFirstChild.key === newChild)\n                    if (\n                      4 === currentFirstChild.tag &&\n                      currentFirstChild.stateNode.containerInfo ===\n                        prevDebugInfo.containerInfo &&\n                      currentFirstChild.stateNode.implementation ===\n                        prevDebugInfo.implementation\n                    ) {\n                      deleteRemainingChildren(\n                        returnFiber,\n                        currentFirstChild.sibling\n                      );\n                      lanes = useFiber(\n                        currentFirstChild,\n                        prevDebugInfo.children || []\n                      );\n                      lanes.return = returnFiber;\n                      returnFiber = lanes;\n                      break a;\n                    } else {\n                      deleteRemainingChildren(returnFiber, currentFirstChild);\n                      break;\n                    }\n                  else deleteChild(returnFiber, currentFirstChild);\n                  currentFirstChild = currentFirstChild.sibling;\n                }\n                lanes = createFiberFromPortal(\n                  prevDebugInfo,\n                  returnFiber.mode,\n                  lanes\n                );\n                lanes.return = returnFiber;\n                returnFiber = lanes;\n              }\n              return placeSingleChild(returnFiber);\n            case REACT_LAZY_TYPE:\n              return (\n                (prevDebugInfo = pushDebugInfo(newChild._debugInfo)),\n                (newChild = resolveLazy(newChild)),\n                (returnFiber = reconcileChildFibersImpl(\n                  returnFiber,\n                  currentFirstChild,\n                  newChild,\n                  lanes\n                )),\n                (currentDebugInfo = prevDebugInfo),\n                returnFiber\n              );\n          }\n          if (isArrayImpl(newChild))\n            return (\n              (prevDebugInfo = pushDebugInfo(newChild._debugInfo)),\n              (returnFiber = reconcileChildrenArray(\n                returnFiber,\n                currentFirstChild,\n                newChild,\n                lanes\n              )),\n              (currentDebugInfo = prevDebugInfo),\n              returnFiber\n            );\n          if (getIteratorFn(newChild)) {\n            prevDebugInfo = pushDebugInfo(newChild._debugInfo);\n            key = getIteratorFn(newChild);\n            if (\"function\" !== typeof key)\n              throw Error(\n                \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\"\n              );\n            var newChildren = key.call(newChild);\n            if (newChildren === newChild) {\n              if (\n                0 !== returnFiber.tag ||\n                \"[object GeneratorFunction]\" !==\n                  Object.prototype.toString.call(returnFiber.type) ||\n                \"[object Generator]\" !==\n                  Object.prototype.toString.call(newChildren)\n              )\n                didWarnAboutGenerators ||\n                  console.error(\n                    \"Using Iterators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. You can also use an Iterable that can iterate multiple times over the same items.\"\n                  ),\n                  (didWarnAboutGenerators = !0);\n            } else\n              newChild.entries !== key ||\n                didWarnAboutMaps ||\n                (console.error(\n                  \"Using Maps as children is not supported. Use an array of keyed ReactElements instead.\"\n                ),\n                (didWarnAboutMaps = !0));\n            returnFiber = reconcileChildrenIterator(\n              returnFiber,\n              currentFirstChild,\n              newChildren,\n              lanes\n            );\n            currentDebugInfo = prevDebugInfo;\n            return returnFiber;\n          }\n          if (\"function\" === typeof newChild.then)\n            return (\n              (prevDebugInfo = pushDebugInfo(newChild._debugInfo)),\n              (returnFiber = reconcileChildFibersImpl(\n                returnFiber,\n                currentFirstChild,\n                unwrapThenable(newChild),\n                lanes\n              )),\n              (currentDebugInfo = prevDebugInfo),\n              returnFiber\n            );\n          if (newChild.$$typeof === REACT_CONTEXT_TYPE)\n            return reconcileChildFibersImpl(\n              returnFiber,\n              currentFirstChild,\n              readContextDuringReconciliation(returnFiber, newChild),\n              lanes\n            );\n          throwOnInvalidObjectType(returnFiber, newChild);\n        }\n        if (\n          (\"string\" === typeof newChild && \"\" !== newChild) ||\n          \"number\" === typeof newChild ||\n          \"bigint\" === typeof newChild\n        )\n          return (\n            (prevDebugInfo = \"\" + newChild),\n            null !== currentFirstChild && 6 === currentFirstChild.tag\n              ? (deleteRemainingChildren(\n                  returnFiber,\n                  currentFirstChild.sibling\n                ),\n                (lanes = useFiber(currentFirstChild, prevDebugInfo)),\n                (lanes.return = returnFiber),\n                (returnFiber = lanes))\n              : (deleteRemainingChildren(returnFiber, currentFirstChild),\n                (lanes = createFiberFromText(\n                  prevDebugInfo,\n                  returnFiber.mode,\n                  lanes\n                )),\n                (lanes.return = returnFiber),\n                (lanes._debugOwner = returnFiber),\n                (lanes._debugTask = returnFiber._debugTask),\n                (lanes._debugInfo = currentDebugInfo),\n                (returnFiber = lanes)),\n            placeSingleChild(returnFiber)\n          );\n        \"function\" === typeof newChild &&\n          warnOnFunctionType(returnFiber, newChild);\n        \"symbol\" === typeof newChild && warnOnSymbolType(returnFiber, newChild);\n        return deleteRemainingChildren(returnFiber, currentFirstChild);\n      }\n      return function (returnFiber, currentFirstChild, newChild, lanes) {\n        var prevDebugInfo = currentDebugInfo;\n        currentDebugInfo = null;\n        try {\n          thenableIndexCounter$1 = 0;\n          var firstChildFiber = reconcileChildFibersImpl(\n            returnFiber,\n            currentFirstChild,\n            newChild,\n            lanes\n          );\n          thenableState$1 = null;\n          return firstChildFiber;\n        } catch (x) {\n          if (x === SuspenseException || x === SuspenseActionException) throw x;\n          var fiber = createFiber(29, x, null, returnFiber.mode);\n          fiber.lanes = lanes;\n          fiber.return = returnFiber;\n          var debugInfo = (fiber._debugInfo = currentDebugInfo);\n          fiber._debugOwner = returnFiber._debugOwner;\n          fiber._debugTask = returnFiber._debugTask;\n          if (null != debugInfo)\n            for (var i = debugInfo.length - 1; 0 <= i; i--)\n              if (\"string\" === typeof debugInfo[i].stack) {\n                fiber._debugOwner = debugInfo[i];\n                fiber._debugTask = debugInfo[i].debugTask;\n                break;\n              }\n          return fiber;\n        } finally {\n          currentDebugInfo = prevDebugInfo;\n        }\n      };\n    }\n    function validateSuspenseListNestedChild(childSlot, index) {\n      var isAnArray = isArrayImpl(childSlot);\n      childSlot = !isAnArray && \"function\" === typeof getIteratorFn(childSlot);\n      return isAnArray || childSlot\n        ? ((isAnArray = isAnArray ? \"array\" : \"iterable\"),\n          console.error(\n            \"A nested %s was passed to row #%s in <SuspenseList />. Wrap it in an additional SuspenseList to configure its revealOrder: <SuspenseList revealOrder=...> ... <SuspenseList revealOrder=...>{%s}</SuspenseList> ... </SuspenseList>\",\n            isAnArray,\n            index,\n            isAnArray\n          ),\n          !1)\n        : !0;\n    }\n    function initializeUpdateQueue(fiber) {\n      fiber.updateQueue = {\n        baseState: fiber.memoizedState,\n        firstBaseUpdate: null,\n        lastBaseUpdate: null,\n        shared: { pending: null, lanes: 0, hiddenCallbacks: null },\n        callbacks: null\n      };\n    }\n    function cloneUpdateQueue(current, workInProgress) {\n      current = current.updateQueue;\n      workInProgress.updateQueue === current &&\n        (workInProgress.updateQueue = {\n          baseState: current.baseState,\n          firstBaseUpdate: current.firstBaseUpdate,\n          lastBaseUpdate: current.lastBaseUpdate,\n          shared: current.shared,\n          callbacks: null\n        });\n    }\n    function createUpdate(lane) {\n      return {\n        lane: lane,\n        tag: UpdateState,\n        payload: null,\n        callback: null,\n        next: null\n      };\n    }\n    function enqueueUpdate(fiber, update, lane) {\n      var updateQueue = fiber.updateQueue;\n      if (null === updateQueue) return null;\n      updateQueue = updateQueue.shared;\n      if (\n        currentlyProcessingQueue === updateQueue &&\n        !didWarnUpdateInsideUpdate\n      ) {\n        var componentName = getComponentNameFromFiber(fiber);\n        console.error(\n          \"An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback.\\n\\nPlease update the following component: %s\",\n          componentName\n        );\n        didWarnUpdateInsideUpdate = !0;\n      }\n      if ((executionContext & RenderContext) !== NoContext)\n        return (\n          (componentName = updateQueue.pending),\n          null === componentName\n            ? (update.next = update)\n            : ((update.next = componentName.next),\n              (componentName.next = update)),\n          (updateQueue.pending = update),\n          (update = getRootForUpdatedFiber(fiber)),\n          markUpdateLaneFromFiberToRoot(fiber, null, lane),\n          update\n        );\n      enqueueUpdate$1(fiber, updateQueue, update, lane);\n      return getRootForUpdatedFiber(fiber);\n    }\n    function entangleTransitions(root, fiber, lane) {\n      fiber = fiber.updateQueue;\n      if (null !== fiber && ((fiber = fiber.shared), 0 !== (lane & 4194048))) {\n        var queueLanes = fiber.lanes;\n        queueLanes &= root.pendingLanes;\n        lane |= queueLanes;\n        fiber.lanes = lane;\n        markRootEntangled(root, lane);\n      }\n    }\n    function enqueueCapturedUpdate(workInProgress, capturedUpdate) {\n      var queue = workInProgress.updateQueue,\n        current = workInProgress.alternate;\n      if (\n        null !== current &&\n        ((current = current.updateQueue), queue === current)\n      ) {\n        var newFirst = null,\n          newLast = null;\n        queue = queue.firstBaseUpdate;\n        if (null !== queue) {\n          do {\n            var clone = {\n              lane: queue.lane,\n              tag: queue.tag,\n              payload: queue.payload,\n              callback: null,\n              next: null\n            };\n            null === newLast\n              ? (newFirst = newLast = clone)\n              : (newLast = newLast.next = clone);\n            queue = queue.next;\n          } while (null !== queue);\n          null === newLast\n            ? (newFirst = newLast = capturedUpdate)\n            : (newLast = newLast.next = capturedUpdate);\n        } else newFirst = newLast = capturedUpdate;\n        queue = {\n          baseState: current.baseState,\n          firstBaseUpdate: newFirst,\n          lastBaseUpdate: newLast,\n          shared: current.shared,\n          callbacks: current.callbacks\n        };\n        workInProgress.updateQueue = queue;\n        return;\n      }\n      workInProgress = queue.lastBaseUpdate;\n      null === workInProgress\n        ? (queue.firstBaseUpdate = capturedUpdate)\n        : (workInProgress.next = capturedUpdate);\n      queue.lastBaseUpdate = capturedUpdate;\n    }\n    function suspendIfUpdateReadFromEntangledAsyncAction() {\n      if (didReadFromEntangledAsyncAction) {\n        var entangledActionThenable = currentEntangledActionThenable;\n        if (null !== entangledActionThenable) throw entangledActionThenable;\n      }\n    }\n    function processUpdateQueue(\n      workInProgress,\n      props,\n      instance$jscomp$0,\n      renderLanes\n    ) {\n      didReadFromEntangledAsyncAction = !1;\n      var queue = workInProgress.updateQueue;\n      hasForceUpdate = !1;\n      currentlyProcessingQueue = queue.shared;\n      var firstBaseUpdate = queue.firstBaseUpdate,\n        lastBaseUpdate = queue.lastBaseUpdate,\n        pendingQueue = queue.shared.pending;\n      if (null !== pendingQueue) {\n        queue.shared.pending = null;\n        var lastPendingUpdate = pendingQueue,\n          firstPendingUpdate = lastPendingUpdate.next;\n        lastPendingUpdate.next = null;\n        null === lastBaseUpdate\n          ? (firstBaseUpdate = firstPendingUpdate)\n          : (lastBaseUpdate.next = firstPendingUpdate);\n        lastBaseUpdate = lastPendingUpdate;\n        var current = workInProgress.alternate;\n        null !== current &&\n          ((current = current.updateQueue),\n          (pendingQueue = current.lastBaseUpdate),\n          pendingQueue !== lastBaseUpdate &&\n            (null === pendingQueue\n              ? (current.firstBaseUpdate = firstPendingUpdate)\n              : (pendingQueue.next = firstPendingUpdate),\n            (current.lastBaseUpdate = lastPendingUpdate)));\n      }\n      if (null !== firstBaseUpdate) {\n        var newState = queue.baseState;\n        lastBaseUpdate = 0;\n        current = firstPendingUpdate = lastPendingUpdate = null;\n        pendingQueue = firstBaseUpdate;\n        do {\n          var updateLane = pendingQueue.lane & -536870913,\n            isHiddenUpdate = updateLane !== pendingQueue.lane;\n          if (\n            isHiddenUpdate\n              ? (workInProgressRootRenderLanes & updateLane) === updateLane\n              : (renderLanes & updateLane) === updateLane\n          ) {\n            0 !== updateLane &&\n              updateLane === currentEntangledLane &&\n              (didReadFromEntangledAsyncAction = !0);\n            null !== current &&\n              (current = current.next =\n                {\n                  lane: 0,\n                  tag: pendingQueue.tag,\n                  payload: pendingQueue.payload,\n                  callback: null,\n                  next: null\n                });\n            a: {\n              updateLane = workInProgress;\n              var partialState = pendingQueue;\n              var nextProps = props,\n                instance = instance$jscomp$0;\n              switch (partialState.tag) {\n                case ReplaceState:\n                  partialState = partialState.payload;\n                  if (\"function\" === typeof partialState) {\n                    isDisallowedContextReadInDEV = !0;\n                    var nextState = partialState.call(\n                      instance,\n                      newState,\n                      nextProps\n                    );\n                    if (updateLane.mode & StrictLegacyMode) {\n                      setIsStrictModeForDevtools(!0);\n                      try {\n                        partialState.call(instance, newState, nextProps);\n                      } finally {\n                        setIsStrictModeForDevtools(!1);\n                      }\n                    }\n                    isDisallowedContextReadInDEV = !1;\n                    newState = nextState;\n                    break a;\n                  }\n                  newState = partialState;\n                  break a;\n                case CaptureUpdate:\n                  updateLane.flags = (updateLane.flags & -65537) | 128;\n                case UpdateState:\n                  nextState = partialState.payload;\n                  if (\"function\" === typeof nextState) {\n                    isDisallowedContextReadInDEV = !0;\n                    partialState = nextState.call(\n                      instance,\n                      newState,\n                      nextProps\n                    );\n                    if (updateLane.mode & StrictLegacyMode) {\n                      setIsStrictModeForDevtools(!0);\n                      try {\n                        nextState.call(instance, newState, nextProps);\n                      } finally {\n                        setIsStrictModeForDevtools(!1);\n                      }\n                    }\n                    isDisallowedContextReadInDEV = !1;\n                  } else partialState = nextState;\n                  if (null === partialState || void 0 === partialState) break a;\n                  newState = assign({}, newState, partialState);\n                  break a;\n                case ForceUpdate:\n                  hasForceUpdate = !0;\n              }\n            }\n            updateLane = pendingQueue.callback;\n            null !== updateLane &&\n              ((workInProgress.flags |= 64),\n              isHiddenUpdate && (workInProgress.flags |= 8192),\n              (isHiddenUpdate = queue.callbacks),\n              null === isHiddenUpdate\n                ? (queue.callbacks = [updateLane])\n                : isHiddenUpdate.push(updateLane));\n          } else\n            (isHiddenUpdate = {\n              lane: updateLane,\n              tag: pendingQueue.tag,\n              payload: pendingQueue.payload,\n              callback: pendingQueue.callback,\n              next: null\n            }),\n              null === current\n                ? ((firstPendingUpdate = current = isHiddenUpdate),\n                  (lastPendingUpdate = newState))\n                : (current = current.next = isHiddenUpdate),\n              (lastBaseUpdate |= updateLane);\n          pendingQueue = pendingQueue.next;\n          if (null === pendingQueue)\n            if (((pendingQueue = queue.shared.pending), null === pendingQueue))\n              break;\n            else\n              (isHiddenUpdate = pendingQueue),\n                (pendingQueue = isHiddenUpdate.next),\n                (isHiddenUpdate.next = null),\n                (queue.lastBaseUpdate = isHiddenUpdate),\n                (queue.shared.pending = null);\n        } while (1);\n        null === current && (lastPendingUpdate = newState);\n        queue.baseState = lastPendingUpdate;\n        queue.firstBaseUpdate = firstPendingUpdate;\n        queue.lastBaseUpdate = current;\n        null === firstBaseUpdate && (queue.shared.lanes = 0);\n        workInProgressRootSkippedLanes |= lastBaseUpdate;\n        workInProgress.lanes = lastBaseUpdate;\n        workInProgress.memoizedState = newState;\n      }\n      currentlyProcessingQueue = null;\n    }\n    function callCallback(callback, context) {\n      if (\"function\" !== typeof callback)\n        throw Error(\n          \"Invalid argument passed as callback. Expected a function. Instead received: \" +\n            callback\n        );\n      callback.call(context);\n    }\n    function commitHiddenCallbacks(updateQueue, context) {\n      var hiddenCallbacks = updateQueue.shared.hiddenCallbacks;\n      if (null !== hiddenCallbacks)\n        for (\n          updateQueue.shared.hiddenCallbacks = null, updateQueue = 0;\n          updateQueue < hiddenCallbacks.length;\n          updateQueue++\n        )\n          callCallback(hiddenCallbacks[updateQueue], context);\n    }\n    function commitCallbacks(updateQueue, context) {\n      var callbacks = updateQueue.callbacks;\n      if (null !== callbacks)\n        for (\n          updateQueue.callbacks = null, updateQueue = 0;\n          updateQueue < callbacks.length;\n          updateQueue++\n        )\n          callCallback(callbacks[updateQueue], context);\n    }\n    function pushHiddenContext(fiber, context) {\n      var prevEntangledRenderLanes = entangledRenderLanes;\n      push(prevEntangledRenderLanesCursor, prevEntangledRenderLanes, fiber);\n      push(currentTreeHiddenStackCursor, context, fiber);\n      entangledRenderLanes = prevEntangledRenderLanes | context.baseLanes;\n    }\n    function reuseHiddenContextOnStack(fiber) {\n      push(prevEntangledRenderLanesCursor, entangledRenderLanes, fiber);\n      push(\n        currentTreeHiddenStackCursor,\n        currentTreeHiddenStackCursor.current,\n        fiber\n      );\n    }\n    function popHiddenContext(fiber) {\n      entangledRenderLanes = prevEntangledRenderLanesCursor.current;\n      pop(currentTreeHiddenStackCursor, fiber);\n      pop(prevEntangledRenderLanesCursor, fiber);\n    }\n    function pushPrimaryTreeSuspenseHandler(handler) {\n      var current = handler.alternate;\n      push(\n        suspenseStackCursor,\n        suspenseStackCursor.current & SubtreeSuspenseContextMask,\n        handler\n      );\n      push(suspenseHandlerStackCursor, handler, handler);\n      null === shellBoundary &&\n        (null === current || null !== currentTreeHiddenStackCursor.current\n          ? (shellBoundary = handler)\n          : null !== current.memoizedState && (shellBoundary = handler));\n    }\n    function pushDehydratedActivitySuspenseHandler(fiber) {\n      push(suspenseStackCursor, suspenseStackCursor.current, fiber);\n      push(suspenseHandlerStackCursor, fiber, fiber);\n      null === shellBoundary && (shellBoundary = fiber);\n    }\n    function pushOffscreenSuspenseHandler(fiber) {\n      22 === fiber.tag\n        ? (push(suspenseStackCursor, suspenseStackCursor.current, fiber),\n          push(suspenseHandlerStackCursor, fiber, fiber),\n          null === shellBoundary && (shellBoundary = fiber))\n        : reuseSuspenseHandlerOnStack(fiber);\n    }\n    function reuseSuspenseHandlerOnStack(fiber) {\n      push(suspenseStackCursor, suspenseStackCursor.current, fiber);\n      push(\n        suspenseHandlerStackCursor,\n        suspenseHandlerStackCursor.current,\n        fiber\n      );\n    }\n    function popSuspenseHandler(fiber) {\n      pop(suspenseHandlerStackCursor, fiber);\n      shellBoundary === fiber && (shellBoundary = null);\n      pop(suspenseStackCursor, fiber);\n    }\n    function findFirstSuspended(row) {\n      for (var node = row; null !== node; ) {\n        if (13 === node.tag) {\n          var state = node.memoizedState;\n          if (\n            null !== state &&\n            ((state = state.dehydrated),\n            null === state ||\n              isSuspenseInstancePending(state) ||\n              isSuspenseInstanceFallback(state))\n          )\n            return node;\n        } else if (\n          19 === node.tag &&\n          (\"forwards\" === node.memoizedProps.revealOrder ||\n            \"backwards\" === node.memoizedProps.revealOrder ||\n            \"unstable_legacy-backwards\" === node.memoizedProps.revealOrder ||\n            \"together\" === node.memoizedProps.revealOrder)\n        ) {\n          if (0 !== (node.flags & 128)) return node;\n        } else if (null !== node.child) {\n          node.child.return = node;\n          node = node.child;\n          continue;\n        }\n        if (node === row) break;\n        for (; null === node.sibling; ) {\n          if (null === node.return || node.return === row) return null;\n          node = node.return;\n        }\n        node.sibling.return = node.return;\n        node = node.sibling;\n      }\n      return null;\n    }\n    function mountHookTypesDev() {\n      var hookName = currentHookNameInDev;\n      null === hookTypesDev\n        ? (hookTypesDev = [hookName])\n        : hookTypesDev.push(hookName);\n    }\n    function updateHookTypesDev() {\n      var hookName = currentHookNameInDev;\n      if (\n        null !== hookTypesDev &&\n        (hookTypesUpdateIndexDev++,\n        hookTypesDev[hookTypesUpdateIndexDev] !== hookName)\n      ) {\n        var componentName = getComponentNameFromFiber(currentlyRenderingFiber);\n        if (\n          !didWarnAboutMismatchedHooksForComponent.has(componentName) &&\n          (didWarnAboutMismatchedHooksForComponent.add(componentName),\n          null !== hookTypesDev)\n        ) {\n          for (var table = \"\", i = 0; i <= hookTypesUpdateIndexDev; i++) {\n            var oldHookName = hookTypesDev[i],\n              newHookName =\n                i === hookTypesUpdateIndexDev ? hookName : oldHookName;\n            for (\n              oldHookName = i + 1 + \". \" + oldHookName;\n              30 > oldHookName.length;\n\n            )\n              oldHookName += \" \";\n            oldHookName += newHookName + \"\\n\";\n            table += oldHookName;\n          }\n          console.error(\n            \"React has detected a change in the order of Hooks called by %s. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://react.dev/link/rules-of-hooks\\n\\n   Previous render            Next render\\n   ------------------------------------------------------\\n%s   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n\",\n            componentName,\n            table\n          );\n        }\n      }\n    }\n    function checkDepsAreArrayDev(deps) {\n      void 0 === deps ||\n        null === deps ||\n        isArrayImpl(deps) ||\n        console.error(\n          \"%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.\",\n          currentHookNameInDev,\n          typeof deps\n        );\n    }\n    function warnOnUseFormStateInDev() {\n      var componentName = getComponentNameFromFiber(currentlyRenderingFiber);\n      didWarnAboutUseFormState.has(componentName) ||\n        (didWarnAboutUseFormState.add(componentName),\n        console.error(\n          \"ReactDOM.useFormState has been renamed to React.useActionState. Please update %s to use React.useActionState.\",\n          componentName\n        ));\n    }\n    function throwInvalidHookError() {\n      throw Error(\n        \"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\\n1. You might have mismatching versions of React and the renderer (such as React DOM)\\n2. You might be breaking the Rules of Hooks\\n3. You might have more than one copy of React in the same app\\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.\"\n      );\n    }\n    function areHookInputsEqual(nextDeps, prevDeps) {\n      if (ignorePreviousDependencies) return !1;\n      if (null === prevDeps)\n        return (\n          console.error(\n            \"%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.\",\n            currentHookNameInDev\n          ),\n          !1\n        );\n      nextDeps.length !== prevDeps.length &&\n        console.error(\n          \"The final argument passed to %s changed size between renders. The order and size of this array must remain constant.\\n\\nPrevious: %s\\nIncoming: %s\",\n          currentHookNameInDev,\n          \"[\" + prevDeps.join(\", \") + \"]\",\n          \"[\" + nextDeps.join(\", \") + \"]\"\n        );\n      for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++)\n        if (!objectIs(nextDeps[i], prevDeps[i])) return !1;\n      return !0;\n    }\n    function renderWithHooks(\n      current,\n      workInProgress,\n      Component,\n      props,\n      secondArg,\n      nextRenderLanes\n    ) {\n      renderLanes = nextRenderLanes;\n      currentlyRenderingFiber = workInProgress;\n      hookTypesDev = null !== current ? current._debugHookTypes : null;\n      hookTypesUpdateIndexDev = -1;\n      ignorePreviousDependencies =\n        null !== current && current.type !== workInProgress.type;\n      if (\n        \"[object AsyncFunction]\" ===\n          Object.prototype.toString.call(Component) ||\n        \"[object AsyncGeneratorFunction]\" ===\n          Object.prototype.toString.call(Component)\n      )\n        (nextRenderLanes = getComponentNameFromFiber(currentlyRenderingFiber)),\n          didWarnAboutAsyncClientComponent.has(nextRenderLanes) ||\n            (didWarnAboutAsyncClientComponent.add(nextRenderLanes),\n            console.error(\n              \"%s is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.\",\n              null === nextRenderLanes\n                ? \"An unknown Component\"\n                : \"<\" + nextRenderLanes + \">\"\n            ));\n      workInProgress.memoizedState = null;\n      workInProgress.updateQueue = null;\n      workInProgress.lanes = 0;\n      ReactSharedInternals.H =\n        null !== current && null !== current.memoizedState\n          ? HooksDispatcherOnUpdateInDEV\n          : null !== hookTypesDev\n            ? HooksDispatcherOnMountWithHookTypesInDEV\n            : HooksDispatcherOnMountInDEV;\n      shouldDoubleInvokeUserFnsInHooksDEV = nextRenderLanes =\n        (workInProgress.mode & StrictLegacyMode) !== NoMode;\n      var children = callComponentInDEV(Component, props, secondArg);\n      shouldDoubleInvokeUserFnsInHooksDEV = !1;\n      didScheduleRenderPhaseUpdateDuringThisPass &&\n        (children = renderWithHooksAgain(\n          workInProgress,\n          Component,\n          props,\n          secondArg\n        ));\n      if (nextRenderLanes) {\n        setIsStrictModeForDevtools(!0);\n        try {\n          children = renderWithHooksAgain(\n            workInProgress,\n            Component,\n            props,\n            secondArg\n          );\n        } finally {\n          setIsStrictModeForDevtools(!1);\n        }\n      }\n      finishRenderingHooks(current, workInProgress);\n      return children;\n    }\n    function finishRenderingHooks(current, workInProgress) {\n      workInProgress._debugHookTypes = hookTypesDev;\n      null === workInProgress.dependencies\n        ? null !== thenableState &&\n          (workInProgress.dependencies = {\n            lanes: 0,\n            firstContext: null,\n            _debugThenableState: thenableState\n          })\n        : (workInProgress.dependencies._debugThenableState = thenableState);\n      ReactSharedInternals.H = ContextOnlyDispatcher;\n      var didRenderTooFewHooks =\n        null !== currentHook && null !== currentHook.next;\n      renderLanes = 0;\n      hookTypesDev =\n        currentHookNameInDev =\n        workInProgressHook =\n        currentHook =\n        currentlyRenderingFiber =\n          null;\n      hookTypesUpdateIndexDev = -1;\n      null !== current &&\n        (current.flags & 65011712) !== (workInProgress.flags & 65011712) &&\n        console.error(\n          \"Internal React error: Expected static flag was missing. Please notify the React team.\"\n        );\n      didScheduleRenderPhaseUpdate = !1;\n      thenableIndexCounter = 0;\n      thenableState = null;\n      if (didRenderTooFewHooks)\n        throw Error(\n          \"Rendered fewer hooks than expected. This may be caused by an accidental early return statement.\"\n        );\n      null === current ||\n        didReceiveUpdate ||\n        ((current = current.dependencies),\n        null !== current &&\n          checkIfContextChanged(current) &&\n          (didReceiveUpdate = !0));\n      needsToResetSuspendedThenableDEV\n        ? ((needsToResetSuspendedThenableDEV = !1), (current = !0))\n        : (current = !1);\n      current &&\n        ((workInProgress =\n          getComponentNameFromFiber(workInProgress) || \"Unknown\"),\n        didWarnAboutUseWrappedInTryCatch.has(workInProgress) ||\n          didWarnAboutAsyncClientComponent.has(workInProgress) ||\n          (didWarnAboutUseWrappedInTryCatch.add(workInProgress),\n          console.error(\n            \"`use` was called from inside a try/catch block. This is not allowed and can lead to unexpected behavior. To handle errors triggered by `use`, wrap your component in a error boundary.\"\n          )));\n    }\n    function renderWithHooksAgain(workInProgress, Component, props, secondArg) {\n      currentlyRenderingFiber = workInProgress;\n      var numberOfReRenders = 0;\n      do {\n        didScheduleRenderPhaseUpdateDuringThisPass && (thenableState = null);\n        thenableIndexCounter = 0;\n        didScheduleRenderPhaseUpdateDuringThisPass = !1;\n        if (numberOfReRenders >= RE_RENDER_LIMIT)\n          throw Error(\n            \"Too many re-renders. React limits the number of renders to prevent an infinite loop.\"\n          );\n        numberOfReRenders += 1;\n        ignorePreviousDependencies = !1;\n        workInProgressHook = currentHook = null;\n        if (null != workInProgress.updateQueue) {\n          var children = workInProgress.updateQueue;\n          children.lastEffect = null;\n          children.events = null;\n          children.stores = null;\n          null != children.memoCache && (children.memoCache.index = 0);\n        }\n        hookTypesUpdateIndexDev = -1;\n        ReactSharedInternals.H = HooksDispatcherOnRerenderInDEV;\n        children = callComponentInDEV(Component, props, secondArg);\n      } while (didScheduleRenderPhaseUpdateDuringThisPass);\n      return children;\n    }\n    function TransitionAwareHostComponent() {\n      var dispatcher = ReactSharedInternals.H,\n        maybeThenable = dispatcher.useState()[0];\n      maybeThenable =\n        \"function\" === typeof maybeThenable.then\n          ? useThenable(maybeThenable)\n          : maybeThenable;\n      dispatcher = dispatcher.useState()[0];\n      (null !== currentHook ? currentHook.memoizedState : null) !==\n        dispatcher && (currentlyRenderingFiber.flags |= 1024);\n      return maybeThenable;\n    }\n    function checkDidRenderIdHook() {\n      var didRenderIdHook = 0 !== localIdCounter;\n      localIdCounter = 0;\n      return didRenderIdHook;\n    }\n    function bailoutHooks(current, workInProgress, lanes) {\n      workInProgress.updateQueue = current.updateQueue;\n      workInProgress.flags =\n        (workInProgress.mode & StrictEffectsMode) !== NoMode\n          ? workInProgress.flags & -402655237\n          : workInProgress.flags & -2053;\n      current.lanes &= ~lanes;\n    }\n    function resetHooksOnUnwind(workInProgress) {\n      if (didScheduleRenderPhaseUpdate) {\n        for (\n          workInProgress = workInProgress.memoizedState;\n          null !== workInProgress;\n\n        ) {\n          var queue = workInProgress.queue;\n          null !== queue && (queue.pending = null);\n          workInProgress = workInProgress.next;\n        }\n        didScheduleRenderPhaseUpdate = !1;\n      }\n      renderLanes = 0;\n      hookTypesDev =\n        workInProgressHook =\n        currentHook =\n        currentlyRenderingFiber =\n          null;\n      hookTypesUpdateIndexDev = -1;\n      currentHookNameInDev = null;\n      didScheduleRenderPhaseUpdateDuringThisPass = !1;\n      thenableIndexCounter = localIdCounter = 0;\n      thenableState = null;\n    }\n    function mountWorkInProgressHook() {\n      var hook = {\n        memoizedState: null,\n        baseState: null,\n        baseQueue: null,\n        queue: null,\n        next: null\n      };\n      null === workInProgressHook\n        ? (currentlyRenderingFiber.memoizedState = workInProgressHook = hook)\n        : (workInProgressHook = workInProgressHook.next = hook);\n      return workInProgressHook;\n    }\n    function updateWorkInProgressHook() {\n      if (null === currentHook) {\n        var nextCurrentHook = currentlyRenderingFiber.alternate;\n        nextCurrentHook =\n          null !== nextCurrentHook ? nextCurrentHook.memoizedState : null;\n      } else nextCurrentHook = currentHook.next;\n      var nextWorkInProgressHook =\n        null === workInProgressHook\n          ? currentlyRenderingFiber.memoizedState\n          : workInProgressHook.next;\n      if (null !== nextWorkInProgressHook)\n        (workInProgressHook = nextWorkInProgressHook),\n          (currentHook = nextCurrentHook);\n      else {\n        if (null === nextCurrentHook) {\n          if (null === currentlyRenderingFiber.alternate)\n            throw Error(\n              \"Update hook called on initial render. This is likely a bug in React. Please file an issue.\"\n            );\n          throw Error(\"Rendered more hooks than during the previous render.\");\n        }\n        currentHook = nextCurrentHook;\n        nextCurrentHook = {\n          memoizedState: currentHook.memoizedState,\n          baseState: currentHook.baseState,\n          baseQueue: currentHook.baseQueue,\n          queue: currentHook.queue,\n          next: null\n        };\n        null === workInProgressHook\n          ? (currentlyRenderingFiber.memoizedState = workInProgressHook =\n              nextCurrentHook)\n          : (workInProgressHook = workInProgressHook.next = nextCurrentHook);\n      }\n      return workInProgressHook;\n    }\n    function createFunctionComponentUpdateQueue() {\n      return { lastEffect: null, events: null, stores: null, memoCache: null };\n    }\n    function useThenable(thenable) {\n      var index = thenableIndexCounter;\n      thenableIndexCounter += 1;\n      null === thenableState && (thenableState = createThenableState());\n      thenable = trackUsedThenable(thenableState, thenable, index);\n      index = currentlyRenderingFiber;\n      null ===\n        (null === workInProgressHook\n          ? index.memoizedState\n          : workInProgressHook.next) &&\n        ((index = index.alternate),\n        (ReactSharedInternals.H =\n          null !== index && null !== index.memoizedState\n            ? HooksDispatcherOnUpdateInDEV\n            : HooksDispatcherOnMountInDEV));\n      return thenable;\n    }\n    function use(usable) {\n      if (null !== usable && \"object\" === typeof usable) {\n        if (\"function\" === typeof usable.then) return useThenable(usable);\n        if (usable.$$typeof === REACT_CONTEXT_TYPE) return readContext(usable);\n      }\n      throw Error(\"An unsupported type was passed to use(): \" + String(usable));\n    }\n    function useMemoCache(size) {\n      var memoCache = null,\n        updateQueue = currentlyRenderingFiber.updateQueue;\n      null !== updateQueue && (memoCache = updateQueue.memoCache);\n      if (null == memoCache) {\n        var current = currentlyRenderingFiber.alternate;\n        null !== current &&\n          ((current = current.updateQueue),\n          null !== current &&\n            ((current = current.memoCache),\n            null != current &&\n              (memoCache = {\n                data: current.data.map(function (array) {\n                  return array.slice();\n                }),\n                index: 0\n              })));\n      }\n      null == memoCache && (memoCache = { data: [], index: 0 });\n      null === updateQueue &&\n        ((updateQueue = createFunctionComponentUpdateQueue()),\n        (currentlyRenderingFiber.updateQueue = updateQueue));\n      updateQueue.memoCache = memoCache;\n      updateQueue = memoCache.data[memoCache.index];\n      if (void 0 === updateQueue || ignorePreviousDependencies)\n        for (\n          updateQueue = memoCache.data[memoCache.index] = Array(size),\n            current = 0;\n          current < size;\n          current++\n        )\n          updateQueue[current] = REACT_MEMO_CACHE_SENTINEL;\n      else\n        updateQueue.length !== size &&\n          console.error(\n            \"Expected a constant size argument for each invocation of useMemoCache. The previous cache was allocated with size %s but size %s was requested.\",\n            updateQueue.length,\n            size\n          );\n      memoCache.index++;\n      return updateQueue;\n    }\n    function basicStateReducer(state, action) {\n      return \"function\" === typeof action ? action(state) : action;\n    }\n    function mountReducer(reducer, initialArg, init) {\n      var hook = mountWorkInProgressHook();\n      if (void 0 !== init) {\n        var initialState = init(initialArg);\n        if (shouldDoubleInvokeUserFnsInHooksDEV) {\n          setIsStrictModeForDevtools(!0);\n          try {\n            init(initialArg);\n          } finally {\n            setIsStrictModeForDevtools(!1);\n          }\n        }\n      } else initialState = initialArg;\n      hook.memoizedState = hook.baseState = initialState;\n      reducer = {\n        pending: null,\n        lanes: 0,\n        dispatch: null,\n        lastRenderedReducer: reducer,\n        lastRenderedState: initialState\n      };\n      hook.queue = reducer;\n      reducer = reducer.dispatch = dispatchReducerAction.bind(\n        null,\n        currentlyRenderingFiber,\n        reducer\n      );\n      return [hook.memoizedState, reducer];\n    }\n    function updateReducer(reducer) {\n      var hook = updateWorkInProgressHook();\n      return updateReducerImpl(hook, currentHook, reducer);\n    }\n    function updateReducerImpl(hook, current, reducer) {\n      var queue = hook.queue;\n      if (null === queue)\n        throw Error(\n          \"Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)\"\n        );\n      queue.lastRenderedReducer = reducer;\n      var baseQueue = hook.baseQueue,\n        pendingQueue = queue.pending;\n      if (null !== pendingQueue) {\n        if (null !== baseQueue) {\n          var baseFirst = baseQueue.next;\n          baseQueue.next = pendingQueue.next;\n          pendingQueue.next = baseFirst;\n        }\n        current.baseQueue !== baseQueue &&\n          console.error(\n            \"Internal error: Expected work-in-progress queue to be a clone. This is a bug in React.\"\n          );\n        current.baseQueue = baseQueue = pendingQueue;\n        queue.pending = null;\n      }\n      pendingQueue = hook.baseState;\n      if (null === baseQueue) hook.memoizedState = pendingQueue;\n      else {\n        current = baseQueue.next;\n        var newBaseQueueFirst = (baseFirst = null),\n          newBaseQueueLast = null,\n          update = current,\n          didReadFromEntangledAsyncAction = !1;\n        do {\n          var updateLane = update.lane & -536870913;\n          if (\n            updateLane !== update.lane\n              ? (workInProgressRootRenderLanes & updateLane) === updateLane\n              : (renderLanes & updateLane) === updateLane\n          ) {\n            var revertLane = update.revertLane;\n            if (0 === revertLane)\n              null !== newBaseQueueLast &&\n                (newBaseQueueLast = newBaseQueueLast.next =\n                  {\n                    lane: 0,\n                    revertLane: 0,\n                    gesture: null,\n                    action: update.action,\n                    hasEagerState: update.hasEagerState,\n                    eagerState: update.eagerState,\n                    next: null\n                  }),\n                updateLane === currentEntangledLane &&\n                  (didReadFromEntangledAsyncAction = !0);\n            else if ((renderLanes & revertLane) === revertLane) {\n              update = update.next;\n              revertLane === currentEntangledLane &&\n                (didReadFromEntangledAsyncAction = !0);\n              continue;\n            } else\n              (updateLane = {\n                lane: 0,\n                revertLane: update.revertLane,\n                gesture: null,\n                action: update.action,\n                hasEagerState: update.hasEagerState,\n                eagerState: update.eagerState,\n                next: null\n              }),\n                null === newBaseQueueLast\n                  ? ((newBaseQueueFirst = newBaseQueueLast = updateLane),\n                    (baseFirst = pendingQueue))\n                  : (newBaseQueueLast = newBaseQueueLast.next = updateLane),\n                (currentlyRenderingFiber.lanes |= revertLane),\n                (workInProgressRootSkippedLanes |= revertLane);\n            updateLane = update.action;\n            shouldDoubleInvokeUserFnsInHooksDEV &&\n              reducer(pendingQueue, updateLane);\n            pendingQueue = update.hasEagerState\n              ? update.eagerState\n              : reducer(pendingQueue, updateLane);\n          } else\n            (revertLane = {\n              lane: updateLane,\n              revertLane: update.revertLane,\n              gesture: update.gesture,\n              action: update.action,\n              hasEagerState: update.hasEagerState,\n              eagerState: update.eagerState,\n              next: null\n            }),\n              null === newBaseQueueLast\n                ? ((newBaseQueueFirst = newBaseQueueLast = revertLane),\n                  (baseFirst = pendingQueue))\n                : (newBaseQueueLast = newBaseQueueLast.next = revertLane),\n              (currentlyRenderingFiber.lanes |= updateLane),\n              (workInProgressRootSkippedLanes |= updateLane);\n          update = update.next;\n        } while (null !== update && update !== current);\n        null === newBaseQueueLast\n          ? (baseFirst = pendingQueue)\n          : (newBaseQueueLast.next = newBaseQueueFirst);\n        if (\n          !objectIs(pendingQueue, hook.memoizedState) &&\n          ((didReceiveUpdate = !0),\n          didReadFromEntangledAsyncAction &&\n            ((reducer = currentEntangledActionThenable), null !== reducer))\n        )\n          throw reducer;\n        hook.memoizedState = pendingQueue;\n        hook.baseState = baseFirst;\n        hook.baseQueue = newBaseQueueLast;\n        queue.lastRenderedState = pendingQueue;\n      }\n      null === baseQueue && (queue.lanes = 0);\n      return [hook.memoizedState, queue.dispatch];\n    }\n    function rerenderReducer(reducer) {\n      var hook = updateWorkInProgressHook(),\n        queue = hook.queue;\n      if (null === queue)\n        throw Error(\n          \"Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)\"\n        );\n      queue.lastRenderedReducer = reducer;\n      var dispatch = queue.dispatch,\n        lastRenderPhaseUpdate = queue.pending,\n        newState = hook.memoizedState;\n      if (null !== lastRenderPhaseUpdate) {\n        queue.pending = null;\n        var update = (lastRenderPhaseUpdate = lastRenderPhaseUpdate.next);\n        do\n          (newState = reducer(newState, update.action)), (update = update.next);\n        while (update !== lastRenderPhaseUpdate);\n        objectIs(newState, hook.memoizedState) || (didReceiveUpdate = !0);\n        hook.memoizedState = newState;\n        null === hook.baseQueue && (hook.baseState = newState);\n        queue.lastRenderedState = newState;\n      }\n      return [newState, dispatch];\n    }\n    function mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {\n      var fiber = currentlyRenderingFiber,\n        hook = mountWorkInProgressHook();\n      if (isHydrating) {\n        if (void 0 === getServerSnapshot)\n          throw Error(\n            \"Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.\"\n          );\n        var nextSnapshot = getServerSnapshot();\n        didWarnUncachedGetSnapshot ||\n          nextSnapshot === getServerSnapshot() ||\n          (console.error(\n            \"The result of getServerSnapshot should be cached to avoid an infinite loop\"\n          ),\n          (didWarnUncachedGetSnapshot = !0));\n      } else {\n        nextSnapshot = getSnapshot();\n        didWarnUncachedGetSnapshot ||\n          ((getServerSnapshot = getSnapshot()),\n          objectIs(nextSnapshot, getServerSnapshot) ||\n            (console.error(\n              \"The result of getSnapshot should be cached to avoid an infinite loop\"\n            ),\n            (didWarnUncachedGetSnapshot = !0)));\n        if (null === workInProgressRoot)\n          throw Error(\n            \"Expected a work-in-progress root. This is a bug in React. Please file an issue.\"\n          );\n        0 !== (workInProgressRootRenderLanes & 127) ||\n          pushStoreConsistencyCheck(fiber, getSnapshot, nextSnapshot);\n      }\n      hook.memoizedState = nextSnapshot;\n      getServerSnapshot = { value: nextSnapshot, getSnapshot: getSnapshot };\n      hook.queue = getServerSnapshot;\n      mountEffect(\n        subscribeToStore.bind(null, fiber, getServerSnapshot, subscribe),\n        [subscribe]\n      );\n      fiber.flags |= 2048;\n      pushSimpleEffect(\n        HasEffect | Passive,\n        { destroy: void 0 },\n        updateStoreInstance.bind(\n          null,\n          fiber,\n          getServerSnapshot,\n          nextSnapshot,\n          getSnapshot\n        ),\n        null\n      );\n      return nextSnapshot;\n    }\n    function updateSyncExternalStore(\n      subscribe,\n      getSnapshot,\n      getServerSnapshot\n    ) {\n      var fiber = currentlyRenderingFiber,\n        hook = updateWorkInProgressHook(),\n        isHydrating$jscomp$0 = isHydrating;\n      if (isHydrating$jscomp$0) {\n        if (void 0 === getServerSnapshot)\n          throw Error(\n            \"Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.\"\n          );\n        getServerSnapshot = getServerSnapshot();\n      } else if (\n        ((getServerSnapshot = getSnapshot()), !didWarnUncachedGetSnapshot)\n      ) {\n        var cachedSnapshot = getSnapshot();\n        objectIs(getServerSnapshot, cachedSnapshot) ||\n          (console.error(\n            \"The result of getSnapshot should be cached to avoid an infinite loop\"\n          ),\n          (didWarnUncachedGetSnapshot = !0));\n      }\n      if (\n        (cachedSnapshot = !objectIs(\n          (currentHook || hook).memoizedState,\n          getServerSnapshot\n        ))\n      )\n        (hook.memoizedState = getServerSnapshot), (didReceiveUpdate = !0);\n      hook = hook.queue;\n      var create = subscribeToStore.bind(null, fiber, hook, subscribe);\n      updateEffectImpl(2048, Passive, create, [subscribe]);\n      if (\n        hook.getSnapshot !== getSnapshot ||\n        cachedSnapshot ||\n        (null !== workInProgressHook &&\n          workInProgressHook.memoizedState.tag & HasEffect)\n      ) {\n        fiber.flags |= 2048;\n        pushSimpleEffect(\n          HasEffect | Passive,\n          { destroy: void 0 },\n          updateStoreInstance.bind(\n            null,\n            fiber,\n            hook,\n            getServerSnapshot,\n            getSnapshot\n          ),\n          null\n        );\n        if (null === workInProgressRoot)\n          throw Error(\n            \"Expected a work-in-progress root. This is a bug in React. Please file an issue.\"\n          );\n        isHydrating$jscomp$0 ||\n          0 !== (renderLanes & 127) ||\n          pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot);\n      }\n      return getServerSnapshot;\n    }\n    function pushStoreConsistencyCheck(fiber, getSnapshot, renderedSnapshot) {\n      fiber.flags |= 16384;\n      fiber = { getSnapshot: getSnapshot, value: renderedSnapshot };\n      getSnapshot = currentlyRenderingFiber.updateQueue;\n      null === getSnapshot\n        ? ((getSnapshot = createFunctionComponentUpdateQueue()),\n          (currentlyRenderingFiber.updateQueue = getSnapshot),\n          (getSnapshot.stores = [fiber]))\n        : ((renderedSnapshot = getSnapshot.stores),\n          null === renderedSnapshot\n            ? (getSnapshot.stores = [fiber])\n            : renderedSnapshot.push(fiber));\n    }\n    function updateStoreInstance(fiber, inst, nextSnapshot, getSnapshot) {\n      inst.value = nextSnapshot;\n      inst.getSnapshot = getSnapshot;\n      checkIfSnapshotChanged(inst) && forceStoreRerender(fiber);\n    }\n    function subscribeToStore(fiber, inst, subscribe) {\n      return subscribe(function () {\n        checkIfSnapshotChanged(inst) &&\n          (startUpdateTimerByLane(2, \"updateSyncExternalStore()\", fiber),\n          forceStoreRerender(fiber));\n      });\n    }\n    function checkIfSnapshotChanged(inst) {\n      var latestGetSnapshot = inst.getSnapshot;\n      inst = inst.value;\n      try {\n        var nextValue = latestGetSnapshot();\n        return !objectIs(inst, nextValue);\n      } catch (error) {\n        return !0;\n      }\n    }\n    function forceStoreRerender(fiber) {\n      var root = enqueueConcurrentRenderForLane(fiber, 2);\n      null !== root && scheduleUpdateOnFiber(root, fiber, 2);\n    }\n    function mountStateImpl(initialState) {\n      var hook = mountWorkInProgressHook();\n      if (\"function\" === typeof initialState) {\n        var initialStateInitializer = initialState;\n        initialState = initialStateInitializer();\n        if (shouldDoubleInvokeUserFnsInHooksDEV) {\n          setIsStrictModeForDevtools(!0);\n          try {\n            initialStateInitializer();\n          } finally {\n            setIsStrictModeForDevtools(!1);\n          }\n        }\n      }\n      hook.memoizedState = hook.baseState = initialState;\n      hook.queue = {\n        pending: null,\n        lanes: 0,\n        dispatch: null,\n        lastRenderedReducer: basicStateReducer,\n        lastRenderedState: initialState\n      };\n      return hook;\n    }\n    function mountState(initialState) {\n      initialState = mountStateImpl(initialState);\n      var queue = initialState.queue,\n        dispatch = dispatchSetState.bind(null, currentlyRenderingFiber, queue);\n      queue.dispatch = dispatch;\n      return [initialState.memoizedState, dispatch];\n    }\n    function mountOptimistic(passthrough) {\n      var hook = mountWorkInProgressHook();\n      hook.memoizedState = hook.baseState = passthrough;\n      var queue = {\n        pending: null,\n        lanes: 0,\n        dispatch: null,\n        lastRenderedReducer: null,\n        lastRenderedState: null\n      };\n      hook.queue = queue;\n      hook = dispatchOptimisticSetState.bind(\n        null,\n        currentlyRenderingFiber,\n        !0,\n        queue\n      );\n      queue.dispatch = hook;\n      return [passthrough, hook];\n    }\n    function updateOptimistic(passthrough, reducer) {\n      var hook = updateWorkInProgressHook();\n      return updateOptimisticImpl(hook, currentHook, passthrough, reducer);\n    }\n    function updateOptimisticImpl(hook, current, passthrough, reducer) {\n      hook.baseState = passthrough;\n      return updateReducerImpl(\n        hook,\n        currentHook,\n        \"function\" === typeof reducer ? reducer : basicStateReducer\n      );\n    }\n    function rerenderOptimistic(passthrough, reducer) {\n      var hook = updateWorkInProgressHook();\n      if (null !== currentHook)\n        return updateOptimisticImpl(hook, currentHook, passthrough, reducer);\n      hook.baseState = passthrough;\n      return [passthrough, hook.queue.dispatch];\n    }\n    function dispatchActionState(\n      fiber,\n      actionQueue,\n      setPendingState,\n      setState,\n      payload\n    ) {\n      if (isRenderPhaseUpdate(fiber))\n        throw Error(\"Cannot update form state while rendering.\");\n      fiber = actionQueue.action;\n      if (null !== fiber) {\n        var actionNode = {\n          payload: payload,\n          action: fiber,\n          next: null,\n          isTransition: !0,\n          status: \"pending\",\n          value: null,\n          reason: null,\n          listeners: [],\n          then: function (listener) {\n            actionNode.listeners.push(listener);\n          }\n        };\n        null !== ReactSharedInternals.T\n          ? setPendingState(!0)\n          : (actionNode.isTransition = !1);\n        setState(actionNode);\n        setPendingState = actionQueue.pending;\n        null === setPendingState\n          ? ((actionNode.next = actionQueue.pending = actionNode),\n            runActionStateAction(actionQueue, actionNode))\n          : ((actionNode.next = setPendingState.next),\n            (actionQueue.pending = setPendingState.next = actionNode));\n      }\n    }\n    function runActionStateAction(actionQueue, node) {\n      var action = node.action,\n        payload = node.payload,\n        prevState = actionQueue.state;\n      if (node.isTransition) {\n        var prevTransition = ReactSharedInternals.T,\n          currentTransition = {};\n        currentTransition._updatedFibers = new Set();\n        ReactSharedInternals.T = currentTransition;\n        try {\n          var returnValue = action(prevState, payload),\n            onStartTransitionFinish = ReactSharedInternals.S;\n          null !== onStartTransitionFinish &&\n            onStartTransitionFinish(currentTransition, returnValue);\n          handleActionReturnValue(actionQueue, node, returnValue);\n        } catch (error) {\n          onActionError(actionQueue, node, error);\n        } finally {\n          null !== prevTransition &&\n            null !== currentTransition.types &&\n            (null !== prevTransition.types &&\n              prevTransition.types !== currentTransition.types &&\n              console.error(\n                \"We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React.\"\n              ),\n            (prevTransition.types = currentTransition.types)),\n            (ReactSharedInternals.T = prevTransition),\n            null === prevTransition &&\n              currentTransition._updatedFibers &&\n              ((actionQueue = currentTransition._updatedFibers.size),\n              currentTransition._updatedFibers.clear(),\n              10 < actionQueue &&\n                console.warn(\n                  \"Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.\"\n                ));\n        }\n      } else\n        try {\n          (currentTransition = action(prevState, payload)),\n            handleActionReturnValue(actionQueue, node, currentTransition);\n        } catch (error$4) {\n          onActionError(actionQueue, node, error$4);\n        }\n    }\n    function handleActionReturnValue(actionQueue, node, returnValue) {\n      null !== returnValue &&\n      \"object\" === typeof returnValue &&\n      \"function\" === typeof returnValue.then\n        ? (ReactSharedInternals.asyncTransitions++,\n          returnValue.then(releaseAsyncTransition, releaseAsyncTransition),\n          returnValue.then(\n            function (nextState) {\n              onActionSuccess(actionQueue, node, nextState);\n            },\n            function (error) {\n              return onActionError(actionQueue, node, error);\n            }\n          ),\n          node.isTransition ||\n            console.error(\n              \"An async function with useActionState was called outside of a transition. This is likely not what you intended (for example, isPending will not update correctly). Either call the returned function inside startTransition, or pass it to an `action` or `formAction` prop.\"\n            ))\n        : onActionSuccess(actionQueue, node, returnValue);\n    }\n    function onActionSuccess(actionQueue, actionNode, nextState) {\n      actionNode.status = \"fulfilled\";\n      actionNode.value = nextState;\n      notifyActionListeners(actionNode);\n      actionQueue.state = nextState;\n      actionNode = actionQueue.pending;\n      null !== actionNode &&\n        ((nextState = actionNode.next),\n        nextState === actionNode\n          ? (actionQueue.pending = null)\n          : ((nextState = nextState.next),\n            (actionNode.next = nextState),\n            runActionStateAction(actionQueue, nextState)));\n    }\n    function onActionError(actionQueue, actionNode, error) {\n      var last = actionQueue.pending;\n      actionQueue.pending = null;\n      if (null !== last) {\n        last = last.next;\n        do\n          (actionNode.status = \"rejected\"),\n            (actionNode.reason = error),\n            notifyActionListeners(actionNode),\n            (actionNode = actionNode.next);\n        while (actionNode !== last);\n      }\n      actionQueue.action = null;\n    }\n    function notifyActionListeners(actionNode) {\n      actionNode = actionNode.listeners;\n      for (var i = 0; i < actionNode.length; i++) (0, actionNode[i])();\n    }\n    function actionStateReducer(oldState, newState) {\n      return newState;\n    }\n    function mountActionState(action, initialStateProp) {\n      if (isHydrating) {\n        var ssrFormState = workInProgressRoot.formState;\n        if (null !== ssrFormState) {\n          a: {\n            var isMatching = currentlyRenderingFiber;\n            if (isHydrating) {\n              if (nextHydratableInstance) {\n                b: {\n                  var markerInstance = nextHydratableInstance;\n                  for (\n                    var inRootOrSingleton = rootOrSingletonContext;\n                    8 !== markerInstance.nodeType;\n\n                  ) {\n                    if (!inRootOrSingleton) {\n                      markerInstance = null;\n                      break b;\n                    }\n                    markerInstance = getNextHydratable(\n                      markerInstance.nextSibling\n                    );\n                    if (null === markerInstance) {\n                      markerInstance = null;\n                      break b;\n                    }\n                  }\n                  inRootOrSingleton = markerInstance.data;\n                  markerInstance =\n                    inRootOrSingleton === FORM_STATE_IS_MATCHING ||\n                    inRootOrSingleton === FORM_STATE_IS_NOT_MATCHING\n                      ? markerInstance\n                      : null;\n                }\n                if (markerInstance) {\n                  nextHydratableInstance = getNextHydratable(\n                    markerInstance.nextSibling\n                  );\n                  isMatching = markerInstance.data === FORM_STATE_IS_MATCHING;\n                  break a;\n                }\n              }\n              throwOnHydrationMismatch(isMatching);\n            }\n            isMatching = !1;\n          }\n          isMatching && (initialStateProp = ssrFormState[0]);\n        }\n      }\n      ssrFormState = mountWorkInProgressHook();\n      ssrFormState.memoizedState = ssrFormState.baseState = initialStateProp;\n      isMatching = {\n        pending: null,\n        lanes: 0,\n        dispatch: null,\n        lastRenderedReducer: actionStateReducer,\n        lastRenderedState: initialStateProp\n      };\n      ssrFormState.queue = isMatching;\n      ssrFormState = dispatchSetState.bind(\n        null,\n        currentlyRenderingFiber,\n        isMatching\n      );\n      isMatching.dispatch = ssrFormState;\n      isMatching = mountStateImpl(!1);\n      inRootOrSingleton = dispatchOptimisticSetState.bind(\n        null,\n        currentlyRenderingFiber,\n        !1,\n        isMatching.queue\n      );\n      isMatching = mountWorkInProgressHook();\n      markerInstance = {\n        state: initialStateProp,\n        dispatch: null,\n        action: action,\n        pending: null\n      };\n      isMatching.queue = markerInstance;\n      ssrFormState = dispatchActionState.bind(\n        null,\n        currentlyRenderingFiber,\n        markerInstance,\n        inRootOrSingleton,\n        ssrFormState\n      );\n      markerInstance.dispatch = ssrFormState;\n      isMatching.memoizedState = action;\n      return [initialStateProp, ssrFormState, !1];\n    }\n    function updateActionState(action) {\n      var stateHook = updateWorkInProgressHook();\n      return updateActionStateImpl(stateHook, currentHook, action);\n    }\n    function updateActionStateImpl(stateHook, currentStateHook, action) {\n      currentStateHook = updateReducerImpl(\n        stateHook,\n        currentStateHook,\n        actionStateReducer\n      )[0];\n      stateHook = updateReducer(basicStateReducer)[0];\n      if (\n        \"object\" === typeof currentStateHook &&\n        null !== currentStateHook &&\n        \"function\" === typeof currentStateHook.then\n      )\n        try {\n          var state = useThenable(currentStateHook);\n        } catch (x) {\n          if (x === SuspenseException) throw SuspenseActionException;\n          throw x;\n        }\n      else state = currentStateHook;\n      currentStateHook = updateWorkInProgressHook();\n      var actionQueue = currentStateHook.queue,\n        dispatch = actionQueue.dispatch;\n      action !== currentStateHook.memoizedState &&\n        ((currentlyRenderingFiber.flags |= 2048),\n        pushSimpleEffect(\n          HasEffect | Passive,\n          { destroy: void 0 },\n          actionStateActionEffect.bind(null, actionQueue, action),\n          null\n        ));\n      return [state, dispatch, stateHook];\n    }\n    function actionStateActionEffect(actionQueue, action) {\n      actionQueue.action = action;\n    }\n    function rerenderActionState(action) {\n      var stateHook = updateWorkInProgressHook(),\n        currentStateHook = currentHook;\n      if (null !== currentStateHook)\n        return updateActionStateImpl(stateHook, currentStateHook, action);\n      updateWorkInProgressHook();\n      stateHook = stateHook.memoizedState;\n      currentStateHook = updateWorkInProgressHook();\n      var dispatch = currentStateHook.queue.dispatch;\n      currentStateHook.memoizedState = action;\n      return [stateHook, dispatch, !1];\n    }\n    function pushSimpleEffect(tag, inst, create, deps) {\n      tag = { tag: tag, create: create, deps: deps, inst: inst, next: null };\n      inst = currentlyRenderingFiber.updateQueue;\n      null === inst &&\n        ((inst = createFunctionComponentUpdateQueue()),\n        (currentlyRenderingFiber.updateQueue = inst));\n      create = inst.lastEffect;\n      null === create\n        ? (inst.lastEffect = tag.next = tag)\n        : ((deps = create.next),\n          (create.next = tag),\n          (tag.next = deps),\n          (inst.lastEffect = tag));\n      return tag;\n    }\n    function mountRef(initialValue) {\n      var hook = mountWorkInProgressHook();\n      initialValue = { current: initialValue };\n      return (hook.memoizedState = initialValue);\n    }\n    function mountEffectImpl(fiberFlags, hookFlags, create, deps) {\n      var hook = mountWorkInProgressHook();\n      currentlyRenderingFiber.flags |= fiberFlags;\n      hook.memoizedState = pushSimpleEffect(\n        HasEffect | hookFlags,\n        { destroy: void 0 },\n        create,\n        void 0 === deps ? null : deps\n      );\n    }\n    function updateEffectImpl(fiberFlags, hookFlags, create, deps) {\n      var hook = updateWorkInProgressHook();\n      deps = void 0 === deps ? null : deps;\n      var inst = hook.memoizedState.inst;\n      null !== currentHook &&\n      null !== deps &&\n      areHookInputsEqual(deps, currentHook.memoizedState.deps)\n        ? (hook.memoizedState = pushSimpleEffect(hookFlags, inst, create, deps))\n        : ((currentlyRenderingFiber.flags |= fiberFlags),\n          (hook.memoizedState = pushSimpleEffect(\n            HasEffect | hookFlags,\n            inst,\n            create,\n            deps\n          )));\n    }\n    function mountEffect(create, deps) {\n      (currentlyRenderingFiber.mode & StrictEffectsMode) !== NoMode\n        ? mountEffectImpl(276826112, Passive, create, deps)\n        : mountEffectImpl(8390656, Passive, create, deps);\n    }\n    function useEffectEventImpl(payload) {\n      currentlyRenderingFiber.flags |= 4;\n      var componentUpdateQueue = currentlyRenderingFiber.updateQueue;\n      if (null === componentUpdateQueue)\n        (componentUpdateQueue = createFunctionComponentUpdateQueue()),\n          (currentlyRenderingFiber.updateQueue = componentUpdateQueue),\n          (componentUpdateQueue.events = [payload]);\n      else {\n        var events = componentUpdateQueue.events;\n        null === events\n          ? (componentUpdateQueue.events = [payload])\n          : events.push(payload);\n      }\n    }\n    function mountEvent(callback) {\n      var hook = mountWorkInProgressHook(),\n        ref = { impl: callback };\n      hook.memoizedState = ref;\n      return function () {\n        if ((executionContext & RenderContext) !== NoContext)\n          throw Error(\n            \"A function wrapped in useEffectEvent can't be called during rendering.\"\n          );\n        return ref.impl.apply(void 0, arguments);\n      };\n    }\n    function updateEvent(callback) {\n      var ref = updateWorkInProgressHook().memoizedState;\n      useEffectEventImpl({ ref: ref, nextImpl: callback });\n      return function () {\n        if ((executionContext & RenderContext) !== NoContext)\n          throw Error(\n            \"A function wrapped in useEffectEvent can't be called during rendering.\"\n          );\n        return ref.impl.apply(void 0, arguments);\n      };\n    }\n    function mountLayoutEffect(create, deps) {\n      var fiberFlags = 4194308;\n      (currentlyRenderingFiber.mode & StrictEffectsMode) !== NoMode &&\n        (fiberFlags |= 134217728);\n      return mountEffectImpl(fiberFlags, Layout, create, deps);\n    }\n    function imperativeHandleEffect(create, ref) {\n      if (\"function\" === typeof ref) {\n        create = create();\n        var refCleanup = ref(create);\n        return function () {\n          \"function\" === typeof refCleanup ? refCleanup() : ref(null);\n        };\n      }\n      if (null !== ref && void 0 !== ref)\n        return (\n          ref.hasOwnProperty(\"current\") ||\n            console.error(\n              \"Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.\",\n              \"an object with keys {\" + Object.keys(ref).join(\", \") + \"}\"\n            ),\n          (create = create()),\n          (ref.current = create),\n          function () {\n            ref.current = null;\n          }\n        );\n    }\n    function mountImperativeHandle(ref, create, deps) {\n      \"function\" !== typeof create &&\n        console.error(\n          \"Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.\",\n          null !== create ? typeof create : \"null\"\n        );\n      deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;\n      var fiberFlags = 4194308;\n      (currentlyRenderingFiber.mode & StrictEffectsMode) !== NoMode &&\n        (fiberFlags |= 134217728);\n      mountEffectImpl(\n        fiberFlags,\n        Layout,\n        imperativeHandleEffect.bind(null, create, ref),\n        deps\n      );\n    }\n    function updateImperativeHandle(ref, create, deps) {\n      \"function\" !== typeof create &&\n        console.error(\n          \"Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.\",\n          null !== create ? typeof create : \"null\"\n        );\n      deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;\n      updateEffectImpl(\n        4,\n        Layout,\n        imperativeHandleEffect.bind(null, create, ref),\n        deps\n      );\n    }\n    function mountCallback(callback, deps) {\n      mountWorkInProgressHook().memoizedState = [\n        callback,\n        void 0 === deps ? null : deps\n      ];\n      return callback;\n    }\n    function updateCallback(callback, deps) {\n      var hook = updateWorkInProgressHook();\n      deps = void 0 === deps ? null : deps;\n      var prevState = hook.memoizedState;\n      if (null !== deps && areHookInputsEqual(deps, prevState[1]))\n        return prevState[0];\n      hook.memoizedState = [callback, deps];\n      return callback;\n    }\n    function mountMemo(nextCreate, deps) {\n      var hook = mountWorkInProgressHook();\n      deps = void 0 === deps ? null : deps;\n      var nextValue = nextCreate();\n      if (shouldDoubleInvokeUserFnsInHooksDEV) {\n        setIsStrictModeForDevtools(!0);\n        try {\n          nextCreate();\n        } finally {\n          setIsStrictModeForDevtools(!1);\n        }\n      }\n      hook.memoizedState = [nextValue, deps];\n      return nextValue;\n    }\n    function updateMemo(nextCreate, deps) {\n      var hook = updateWorkInProgressHook();\n      deps = void 0 === deps ? null : deps;\n      var prevState = hook.memoizedState;\n      if (null !== deps && areHookInputsEqual(deps, prevState[1]))\n        return prevState[0];\n      prevState = nextCreate();\n      if (shouldDoubleInvokeUserFnsInHooksDEV) {\n        setIsStrictModeForDevtools(!0);\n        try {\n          nextCreate();\n        } finally {\n          setIsStrictModeForDevtools(!1);\n        }\n      }\n      hook.memoizedState = [prevState, deps];\n      return prevState;\n    }\n    function mountDeferredValue(value, initialValue) {\n      var hook = mountWorkInProgressHook();\n      return mountDeferredValueImpl(hook, value, initialValue);\n    }\n    function updateDeferredValue(value, initialValue) {\n      var hook = updateWorkInProgressHook();\n      return updateDeferredValueImpl(\n        hook,\n        currentHook.memoizedState,\n        value,\n        initialValue\n      );\n    }\n    function rerenderDeferredValue(value, initialValue) {\n      var hook = updateWorkInProgressHook();\n      return null === currentHook\n        ? mountDeferredValueImpl(hook, value, initialValue)\n        : updateDeferredValueImpl(\n            hook,\n            currentHook.memoizedState,\n            value,\n            initialValue\n          );\n    }\n    function mountDeferredValueImpl(hook, value, initialValue) {\n      if (\n        void 0 === initialValue ||\n        (0 !== (renderLanes & 1073741824) &&\n          0 === (workInProgressRootRenderLanes & 261930))\n      )\n        return (hook.memoizedState = value);\n      hook.memoizedState = initialValue;\n      hook = requestDeferredLane();\n      currentlyRenderingFiber.lanes |= hook;\n      workInProgressRootSkippedLanes |= hook;\n      return initialValue;\n    }\n    function updateDeferredValueImpl(hook, prevValue, value, initialValue) {\n      if (objectIs(value, prevValue)) return value;\n      if (null !== currentTreeHiddenStackCursor.current)\n        return (\n          (hook = mountDeferredValueImpl(hook, value, initialValue)),\n          objectIs(hook, prevValue) || (didReceiveUpdate = !0),\n          hook\n        );\n      if (\n        0 === (renderLanes & 42) ||\n        (0 !== (renderLanes & 1073741824) &&\n          0 === (workInProgressRootRenderLanes & 261930))\n      )\n        return (didReceiveUpdate = !0), (hook.memoizedState = value);\n      hook = requestDeferredLane();\n      currentlyRenderingFiber.lanes |= hook;\n      workInProgressRootSkippedLanes |= hook;\n      return prevValue;\n    }\n    function releaseAsyncTransition() {\n      ReactSharedInternals.asyncTransitions--;\n    }\n    function startTransition(\n      fiber,\n      queue,\n      pendingState,\n      finishedState,\n      callback\n    ) {\n      var previousPriority = ReactDOMSharedInternals.p;\n      ReactDOMSharedInternals.p =\n        0 !== previousPriority && previousPriority < ContinuousEventPriority\n          ? previousPriority\n          : ContinuousEventPriority;\n      var prevTransition = ReactSharedInternals.T,\n        currentTransition = {};\n      currentTransition._updatedFibers = new Set();\n      ReactSharedInternals.T = currentTransition;\n      dispatchOptimisticSetState(fiber, !1, queue, pendingState);\n      try {\n        var returnValue = callback(),\n          onStartTransitionFinish = ReactSharedInternals.S;\n        null !== onStartTransitionFinish &&\n          onStartTransitionFinish(currentTransition, returnValue);\n        if (\n          null !== returnValue &&\n          \"object\" === typeof returnValue &&\n          \"function\" === typeof returnValue.then\n        ) {\n          ReactSharedInternals.asyncTransitions++;\n          returnValue.then(releaseAsyncTransition, releaseAsyncTransition);\n          var thenableForFinishedState = chainThenableValue(\n            returnValue,\n            finishedState\n          );\n          dispatchSetStateInternal(\n            fiber,\n            queue,\n            thenableForFinishedState,\n            requestUpdateLane(fiber)\n          );\n        } else\n          dispatchSetStateInternal(\n            fiber,\n            queue,\n            finishedState,\n            requestUpdateLane(fiber)\n          );\n      } catch (error) {\n        dispatchSetStateInternal(\n          fiber,\n          queue,\n          { then: function () {}, status: \"rejected\", reason: error },\n          requestUpdateLane(fiber)\n        );\n      } finally {\n        (ReactDOMSharedInternals.p = previousPriority),\n          null !== prevTransition &&\n            null !== currentTransition.types &&\n            (null !== prevTransition.types &&\n              prevTransition.types !== currentTransition.types &&\n              console.error(\n                \"We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React.\"\n              ),\n            (prevTransition.types = currentTransition.types)),\n          (ReactSharedInternals.T = prevTransition),\n          null === prevTransition &&\n            currentTransition._updatedFibers &&\n            ((fiber = currentTransition._updatedFibers.size),\n            currentTransition._updatedFibers.clear(),\n            10 < fiber &&\n              console.warn(\n                \"Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.\"\n              ));\n      }\n    }\n    function startHostTransition(formFiber, pendingState, action, formData) {\n      if (5 !== formFiber.tag)\n        throw Error(\n          \"Expected the form instance to be a HostComponent. This is a bug in React.\"\n        );\n      var queue = ensureFormComponentIsStateful(formFiber).queue;\n      startHostActionTimer(formFiber);\n      startTransition(\n        formFiber,\n        queue,\n        pendingState,\n        NotPendingTransition,\n        null === action\n          ? noop\n          : function () {\n              requestFormReset$1(formFiber);\n              return action(formData);\n            }\n      );\n    }\n    function ensureFormComponentIsStateful(formFiber) {\n      var existingStateHook = formFiber.memoizedState;\n      if (null !== existingStateHook) return existingStateHook;\n      existingStateHook = {\n        memoizedState: NotPendingTransition,\n        baseState: NotPendingTransition,\n        baseQueue: null,\n        queue: {\n          pending: null,\n          lanes: 0,\n          dispatch: null,\n          lastRenderedReducer: basicStateReducer,\n          lastRenderedState: NotPendingTransition\n        },\n        next: null\n      };\n      var initialResetState = {};\n      existingStateHook.next = {\n        memoizedState: initialResetState,\n        baseState: initialResetState,\n        baseQueue: null,\n        queue: {\n          pending: null,\n          lanes: 0,\n          dispatch: null,\n          lastRenderedReducer: basicStateReducer,\n          lastRenderedState: initialResetState\n        },\n        next: null\n      };\n      formFiber.memoizedState = existingStateHook;\n      formFiber = formFiber.alternate;\n      null !== formFiber && (formFiber.memoizedState = existingStateHook);\n      return existingStateHook;\n    }\n    function requestFormReset$1(formFiber) {\n      null === ReactSharedInternals.T &&\n        console.error(\n          \"requestFormReset was called outside a transition or action. To fix, move to an action, or wrap with startTransition.\"\n        );\n      var stateHook = ensureFormComponentIsStateful(formFiber);\n      null === stateHook.next &&\n        (stateHook = formFiber.alternate.memoizedState);\n      dispatchSetStateInternal(\n        formFiber,\n        stateHook.next.queue,\n        {},\n        requestUpdateLane(formFiber)\n      );\n    }\n    function mountTransition() {\n      var stateHook = mountStateImpl(!1);\n      stateHook = startTransition.bind(\n        null,\n        currentlyRenderingFiber,\n        stateHook.queue,\n        !0,\n        !1\n      );\n      mountWorkInProgressHook().memoizedState = stateHook;\n      return [!1, stateHook];\n    }\n    function updateTransition() {\n      var booleanOrThenable = updateReducer(basicStateReducer)[0],\n        start = updateWorkInProgressHook().memoizedState;\n      return [\n        \"boolean\" === typeof booleanOrThenable\n          ? booleanOrThenable\n          : useThenable(booleanOrThenable),\n        start\n      ];\n    }\n    function rerenderTransition() {\n      var booleanOrThenable = rerenderReducer(basicStateReducer)[0],\n        start = updateWorkInProgressHook().memoizedState;\n      return [\n        \"boolean\" === typeof booleanOrThenable\n          ? booleanOrThenable\n          : useThenable(booleanOrThenable),\n        start\n      ];\n    }\n    function useHostTransitionStatus() {\n      return readContext(HostTransitionContext);\n    }\n    function mountId() {\n      var hook = mountWorkInProgressHook(),\n        identifierPrefix = workInProgressRoot.identifierPrefix;\n      if (isHydrating) {\n        var treeId = treeContextOverflow;\n        var idWithLeadingBit = treeContextId;\n        treeId =\n          (\n            idWithLeadingBit & ~(1 << (32 - clz32(idWithLeadingBit) - 1))\n          ).toString(32) + treeId;\n        identifierPrefix = \"_\" + identifierPrefix + \"R_\" + treeId;\n        treeId = localIdCounter++;\n        0 < treeId && (identifierPrefix += \"H\" + treeId.toString(32));\n        identifierPrefix += \"_\";\n      } else\n        (treeId = globalClientIdCounter++),\n          (identifierPrefix =\n            \"_\" + identifierPrefix + \"r_\" + treeId.toString(32) + \"_\");\n      return (hook.memoizedState = identifierPrefix);\n    }\n    function mountRefresh() {\n      return (mountWorkInProgressHook().memoizedState = refreshCache.bind(\n        null,\n        currentlyRenderingFiber\n      ));\n    }\n    function refreshCache(fiber, seedKey) {\n      for (var provider = fiber.return; null !== provider; ) {\n        switch (provider.tag) {\n          case 24:\n          case 3:\n            var lane = requestUpdateLane(provider),\n              refreshUpdate = createUpdate(lane),\n              root = enqueueUpdate(provider, refreshUpdate, lane);\n            null !== root &&\n              (startUpdateTimerByLane(lane, \"refresh()\", fiber),\n              scheduleUpdateOnFiber(root, provider, lane),\n              entangleTransitions(root, provider, lane));\n            fiber = createCache();\n            null !== seedKey &&\n              void 0 !== seedKey &&\n              null !== root &&\n              console.error(\n                \"The seed argument is not enabled outside experimental channels.\"\n              );\n            refreshUpdate.payload = { cache: fiber };\n            return;\n        }\n        provider = provider.return;\n      }\n    }\n    function dispatchReducerAction(fiber, queue, action) {\n      var args = arguments;\n      \"function\" === typeof args[3] &&\n        console.error(\n          \"State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect().\"\n        );\n      args = requestUpdateLane(fiber);\n      var update = {\n        lane: args,\n        revertLane: 0,\n        gesture: null,\n        action: action,\n        hasEagerState: !1,\n        eagerState: null,\n        next: null\n      };\n      isRenderPhaseUpdate(fiber)\n        ? enqueueRenderPhaseUpdate(queue, update)\n        : ((update = enqueueConcurrentHookUpdate(fiber, queue, update, args)),\n          null !== update &&\n            (startUpdateTimerByLane(args, \"dispatch()\", fiber),\n            scheduleUpdateOnFiber(update, fiber, args),\n            entangleTransitionUpdate(update, queue, args)));\n    }\n    function dispatchSetState(fiber, queue, action) {\n      var args = arguments;\n      \"function\" === typeof args[3] &&\n        console.error(\n          \"State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect().\"\n        );\n      args = requestUpdateLane(fiber);\n      dispatchSetStateInternal(fiber, queue, action, args) &&\n        startUpdateTimerByLane(args, \"setState()\", fiber);\n    }\n    function dispatchSetStateInternal(fiber, queue, action, lane) {\n      var update = {\n        lane: lane,\n        revertLane: 0,\n        gesture: null,\n        action: action,\n        hasEagerState: !1,\n        eagerState: null,\n        next: null\n      };\n      if (isRenderPhaseUpdate(fiber)) enqueueRenderPhaseUpdate(queue, update);\n      else {\n        var alternate = fiber.alternate;\n        if (\n          0 === fiber.lanes &&\n          (null === alternate || 0 === alternate.lanes) &&\n          ((alternate = queue.lastRenderedReducer), null !== alternate)\n        ) {\n          var prevDispatcher = ReactSharedInternals.H;\n          ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;\n          try {\n            var currentState = queue.lastRenderedState,\n              eagerState = alternate(currentState, action);\n            update.hasEagerState = !0;\n            update.eagerState = eagerState;\n            if (objectIs(eagerState, currentState))\n              return (\n                enqueueUpdate$1(fiber, queue, update, 0),\n                null === workInProgressRoot &&\n                  finishQueueingConcurrentUpdates(),\n                !1\n              );\n          } catch (error) {\n          } finally {\n            ReactSharedInternals.H = prevDispatcher;\n          }\n        }\n        action = enqueueConcurrentHookUpdate(fiber, queue, update, lane);\n        if (null !== action)\n          return (\n            scheduleUpdateOnFiber(action, fiber, lane),\n            entangleTransitionUpdate(action, queue, lane),\n            !0\n          );\n      }\n      return !1;\n    }\n    function dispatchOptimisticSetState(\n      fiber,\n      throwIfDuringRender,\n      queue,\n      action\n    ) {\n      null === ReactSharedInternals.T &&\n        0 === currentEntangledLane &&\n        console.error(\n          \"An optimistic state update occurred outside a transition or action. To fix, move the update to an action, or wrap with startTransition.\"\n        );\n      action = {\n        lane: 2,\n        revertLane: requestTransitionLane(),\n        gesture: null,\n        action: action,\n        hasEagerState: !1,\n        eagerState: null,\n        next: null\n      };\n      if (isRenderPhaseUpdate(fiber)) {\n        if (throwIfDuringRender)\n          throw Error(\"Cannot update optimistic state while rendering.\");\n        console.error(\"Cannot call startTransition while rendering.\");\n      } else\n        (throwIfDuringRender = enqueueConcurrentHookUpdate(\n          fiber,\n          queue,\n          action,\n          2\n        )),\n          null !== throwIfDuringRender &&\n            (startUpdateTimerByLane(2, \"setOptimistic()\", fiber),\n            scheduleUpdateOnFiber(throwIfDuringRender, fiber, 2));\n    }\n    function isRenderPhaseUpdate(fiber) {\n      var alternate = fiber.alternate;\n      return (\n        fiber === currentlyRenderingFiber ||\n        (null !== alternate && alternate === currentlyRenderingFiber)\n      );\n    }\n    function enqueueRenderPhaseUpdate(queue, update) {\n      didScheduleRenderPhaseUpdateDuringThisPass =\n        didScheduleRenderPhaseUpdate = !0;\n      var pending = queue.pending;\n      null === pending\n        ? (update.next = update)\n        : ((update.next = pending.next), (pending.next = update));\n      queue.pending = update;\n    }\n    function entangleTransitionUpdate(root, queue, lane) {\n      if (0 !== (lane & 4194048)) {\n        var queueLanes = queue.lanes;\n        queueLanes &= root.pendingLanes;\n        lane |= queueLanes;\n        queue.lanes = lane;\n        markRootEntangled(root, lane);\n      }\n    }\n    function warnOnInvalidCallback(callback) {\n      if (null !== callback && \"function\" !== typeof callback) {\n        var key = String(callback);\n        didWarnOnInvalidCallback.has(key) ||\n          (didWarnOnInvalidCallback.add(key),\n          console.error(\n            \"Expected the last optional `callback` argument to be a function. Instead received: %s.\",\n            callback\n          ));\n      }\n    }\n    function applyDerivedStateFromProps(\n      workInProgress,\n      ctor,\n      getDerivedStateFromProps,\n      nextProps\n    ) {\n      var prevState = workInProgress.memoizedState,\n        partialState = getDerivedStateFromProps(nextProps, prevState);\n      if (workInProgress.mode & StrictLegacyMode) {\n        setIsStrictModeForDevtools(!0);\n        try {\n          partialState = getDerivedStateFromProps(nextProps, prevState);\n        } finally {\n          setIsStrictModeForDevtools(!1);\n        }\n      }\n      void 0 === partialState &&\n        ((ctor = getComponentNameFromType(ctor) || \"Component\"),\n        didWarnAboutUndefinedDerivedState.has(ctor) ||\n          (didWarnAboutUndefinedDerivedState.add(ctor),\n          console.error(\n            \"%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.\",\n            ctor\n          )));\n      prevState =\n        null === partialState || void 0 === partialState\n          ? prevState\n          : assign({}, prevState, partialState);\n      workInProgress.memoizedState = prevState;\n      0 === workInProgress.lanes &&\n        (workInProgress.updateQueue.baseState = prevState);\n    }\n    function checkShouldComponentUpdate(\n      workInProgress,\n      ctor,\n      oldProps,\n      newProps,\n      oldState,\n      newState,\n      nextContext\n    ) {\n      var instance = workInProgress.stateNode;\n      if (\"function\" === typeof instance.shouldComponentUpdate) {\n        oldProps = instance.shouldComponentUpdate(\n          newProps,\n          newState,\n          nextContext\n        );\n        if (workInProgress.mode & StrictLegacyMode) {\n          setIsStrictModeForDevtools(!0);\n          try {\n            oldProps = instance.shouldComponentUpdate(\n              newProps,\n              newState,\n              nextContext\n            );\n          } finally {\n            setIsStrictModeForDevtools(!1);\n          }\n        }\n        void 0 === oldProps &&\n          console.error(\n            \"%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.\",\n            getComponentNameFromType(ctor) || \"Component\"\n          );\n        return oldProps;\n      }\n      return ctor.prototype && ctor.prototype.isPureReactComponent\n        ? !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState)\n        : !0;\n    }\n    function callComponentWillReceiveProps(\n      workInProgress,\n      instance,\n      newProps,\n      nextContext\n    ) {\n      var oldState = instance.state;\n      \"function\" === typeof instance.componentWillReceiveProps &&\n        instance.componentWillReceiveProps(newProps, nextContext);\n      \"function\" === typeof instance.UNSAFE_componentWillReceiveProps &&\n        instance.UNSAFE_componentWillReceiveProps(newProps, nextContext);\n      instance.state !== oldState &&\n        ((workInProgress =\n          getComponentNameFromFiber(workInProgress) || \"Component\"),\n        didWarnAboutStateAssignmentForComponent.has(workInProgress) ||\n          (didWarnAboutStateAssignmentForComponent.add(workInProgress),\n          console.error(\n            \"%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.\",\n            workInProgress\n          )),\n        classComponentUpdater.enqueueReplaceState(\n          instance,\n          instance.state,\n          null\n        ));\n    }\n    function resolveClassComponentProps(Component, baseProps) {\n      var newProps = baseProps;\n      if (\"ref\" in baseProps) {\n        newProps = {};\n        for (var propName in baseProps)\n          \"ref\" !== propName && (newProps[propName] = baseProps[propName]);\n      }\n      if ((Component = Component.defaultProps)) {\n        newProps === baseProps && (newProps = assign({}, newProps));\n        for (var _propName in Component)\n          void 0 === newProps[_propName] &&\n            (newProps[_propName] = Component[_propName]);\n      }\n      return newProps;\n    }\n    function defaultOnUncaughtError(error) {\n      reportGlobalError(error);\n      console.warn(\n        \"%s\\n\\n%s\\n\",\n        componentName\n          ? \"An error occurred in the <\" + componentName + \"> component.\"\n          : \"An error occurred in one of your React components.\",\n        \"Consider adding an error boundary to your tree to customize error handling behavior.\\nVisit https://react.dev/link/error-boundaries to learn more about error boundaries.\"\n      );\n    }\n    function defaultOnCaughtError(error) {\n      var componentNameMessage = componentName\n          ? \"The above error occurred in the <\" + componentName + \"> component.\"\n          : \"The above error occurred in one of your React components.\",\n        recreateMessage =\n          \"React will try to recreate this component tree from scratch using the error boundary you provided, \" +\n          ((errorBoundaryName || \"Anonymous\") + \".\");\n      if (\n        \"object\" === typeof error &&\n        null !== error &&\n        \"string\" === typeof error.environmentName\n      ) {\n        var JSCompiler_inline_result = error.environmentName;\n        error = [\n          \"%o\\n\\n%s\\n\\n%s\\n\",\n          error,\n          componentNameMessage,\n          recreateMessage\n        ].slice(0);\n        \"string\" === typeof error[0]\n          ? error.splice(\n              0,\n              1,\n              badgeFormat + \" \" + error[0],\n              badgeStyle,\n              pad + JSCompiler_inline_result + pad,\n              resetStyle\n            )\n          : error.splice(\n              0,\n              0,\n              badgeFormat,\n              badgeStyle,\n              pad + JSCompiler_inline_result + pad,\n              resetStyle\n            );\n        error.unshift(console);\n        JSCompiler_inline_result = bind.apply(console.error, error);\n        JSCompiler_inline_result();\n      } else\n        console.error(\n          \"%o\\n\\n%s\\n\\n%s\\n\",\n          error,\n          componentNameMessage,\n          recreateMessage\n        );\n    }\n    function defaultOnRecoverableError(error) {\n      reportGlobalError(error);\n    }\n    function logUncaughtError(root, errorInfo) {\n      try {\n        componentName = errorInfo.source\n          ? getComponentNameFromFiber(errorInfo.source)\n          : null;\n        errorBoundaryName = null;\n        var error = errorInfo.value;\n        if (null !== ReactSharedInternals.actQueue)\n          ReactSharedInternals.thrownErrors.push(error);\n        else {\n          var onUncaughtError = root.onUncaughtError;\n          onUncaughtError(error, { componentStack: errorInfo.stack });\n        }\n      } catch (e$5) {\n        setTimeout(function () {\n          throw e$5;\n        });\n      }\n    }\n    function logCaughtError(root, boundary, errorInfo) {\n      try {\n        componentName = errorInfo.source\n          ? getComponentNameFromFiber(errorInfo.source)\n          : null;\n        errorBoundaryName = getComponentNameFromFiber(boundary);\n        var onCaughtError = root.onCaughtError;\n        onCaughtError(errorInfo.value, {\n          componentStack: errorInfo.stack,\n          errorBoundary: 1 === boundary.tag ? boundary.stateNode : null\n        });\n      } catch (e$6) {\n        setTimeout(function () {\n          throw e$6;\n        });\n      }\n    }\n    function createRootErrorUpdate(root, errorInfo, lane) {\n      lane = createUpdate(lane);\n      lane.tag = CaptureUpdate;\n      lane.payload = { element: null };\n      lane.callback = function () {\n        runWithFiberInDEV(errorInfo.source, logUncaughtError, root, errorInfo);\n      };\n      return lane;\n    }\n    function createClassErrorUpdate(lane) {\n      lane = createUpdate(lane);\n      lane.tag = CaptureUpdate;\n      return lane;\n    }\n    function initializeClassErrorUpdate(update, root, fiber, errorInfo) {\n      var getDerivedStateFromError = fiber.type.getDerivedStateFromError;\n      if (\"function\" === typeof getDerivedStateFromError) {\n        var error = errorInfo.value;\n        update.payload = function () {\n          return getDerivedStateFromError(error);\n        };\n        update.callback = function () {\n          markFailedErrorBoundaryForHotReloading(fiber);\n          runWithFiberInDEV(\n            errorInfo.source,\n            logCaughtError,\n            root,\n            fiber,\n            errorInfo\n          );\n        };\n      }\n      var inst = fiber.stateNode;\n      null !== inst &&\n        \"function\" === typeof inst.componentDidCatch &&\n        (update.callback = function () {\n          markFailedErrorBoundaryForHotReloading(fiber);\n          runWithFiberInDEV(\n            errorInfo.source,\n            logCaughtError,\n            root,\n            fiber,\n            errorInfo\n          );\n          \"function\" !== typeof getDerivedStateFromError &&\n            (null === legacyErrorBoundariesThatAlreadyFailed\n              ? (legacyErrorBoundariesThatAlreadyFailed = new Set([this]))\n              : legacyErrorBoundariesThatAlreadyFailed.add(this));\n          callComponentDidCatchInDEV(this, errorInfo);\n          \"function\" === typeof getDerivedStateFromError ||\n            (0 === (fiber.lanes & 2) &&\n              console.error(\n                \"%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.\",\n                getComponentNameFromFiber(fiber) || \"Unknown\"\n              ));\n        });\n    }\n    function throwException(\n      root,\n      returnFiber,\n      sourceFiber,\n      value,\n      rootRenderLanes\n    ) {\n      sourceFiber.flags |= 32768;\n      isDevToolsPresent && restorePendingUpdaters(root, rootRenderLanes);\n      if (\n        null !== value &&\n        \"object\" === typeof value &&\n        \"function\" === typeof value.then\n      ) {\n        returnFiber = sourceFiber.alternate;\n        null !== returnFiber &&\n          propagateParentContextChanges(\n            returnFiber,\n            sourceFiber,\n            rootRenderLanes,\n            !0\n          );\n        isHydrating && (didSuspendOrErrorDEV = !0);\n        sourceFiber = suspenseHandlerStackCursor.current;\n        if (null !== sourceFiber) {\n          switch (sourceFiber.tag) {\n            case 31:\n            case 13:\n              return (\n                null === shellBoundary\n                  ? renderDidSuspendDelayIfPossible()\n                  : null === sourceFiber.alternate &&\n                    workInProgressRootExitStatus === RootInProgress &&\n                    (workInProgressRootExitStatus = RootSuspended),\n                (sourceFiber.flags &= -257),\n                (sourceFiber.flags |= 65536),\n                (sourceFiber.lanes = rootRenderLanes),\n                value === noopSuspenseyCommitThenable\n                  ? (sourceFiber.flags |= 16384)\n                  : ((returnFiber = sourceFiber.updateQueue),\n                    null === returnFiber\n                      ? (sourceFiber.updateQueue = new Set([value]))\n                      : returnFiber.add(value),\n                    attachPingListener(root, value, rootRenderLanes)),\n                !1\n              );\n            case 22:\n              return (\n                (sourceFiber.flags |= 65536),\n                value === noopSuspenseyCommitThenable\n                  ? (sourceFiber.flags |= 16384)\n                  : ((returnFiber = sourceFiber.updateQueue),\n                    null === returnFiber\n                      ? ((returnFiber = {\n                          transitions: null,\n                          markerInstances: null,\n                          retryQueue: new Set([value])\n                        }),\n                        (sourceFiber.updateQueue = returnFiber))\n                      : ((sourceFiber = returnFiber.retryQueue),\n                        null === sourceFiber\n                          ? (returnFiber.retryQueue = new Set([value]))\n                          : sourceFiber.add(value)),\n                    attachPingListener(root, value, rootRenderLanes)),\n                !1\n              );\n          }\n          throw Error(\n            \"Unexpected Suspense handler tag (\" +\n              sourceFiber.tag +\n              \"). This is a bug in React.\"\n          );\n        }\n        attachPingListener(root, value, rootRenderLanes);\n        renderDidSuspendDelayIfPossible();\n        return !1;\n      }\n      if (isHydrating)\n        return (\n          (didSuspendOrErrorDEV = !0),\n          (returnFiber = suspenseHandlerStackCursor.current),\n          null !== returnFiber\n            ? (0 === (returnFiber.flags & 65536) && (returnFiber.flags |= 256),\n              (returnFiber.flags |= 65536),\n              (returnFiber.lanes = rootRenderLanes),\n              value !== HydrationMismatchException &&\n                queueHydrationError(\n                  createCapturedValueAtFiber(\n                    Error(\n                      \"There was an error while hydrating but React was able to recover by instead client rendering from the nearest Suspense boundary.\",\n                      { cause: value }\n                    ),\n                    sourceFiber\n                  )\n                ))\n            : (value !== HydrationMismatchException &&\n                queueHydrationError(\n                  createCapturedValueAtFiber(\n                    Error(\n                      \"There was an error while hydrating but React was able to recover by instead client rendering the entire root.\",\n                      { cause: value }\n                    ),\n                    sourceFiber\n                  )\n                ),\n              (root = root.current.alternate),\n              (root.flags |= 65536),\n              (rootRenderLanes &= -rootRenderLanes),\n              (root.lanes |= rootRenderLanes),\n              (value = createCapturedValueAtFiber(value, sourceFiber)),\n              (rootRenderLanes = createRootErrorUpdate(\n                root.stateNode,\n                value,\n                rootRenderLanes\n              )),\n              enqueueCapturedUpdate(root, rootRenderLanes),\n              workInProgressRootExitStatus !== RootSuspendedWithDelay &&\n                (workInProgressRootExitStatus = RootErrored)),\n          !1\n        );\n      var error = createCapturedValueAtFiber(\n        Error(\n          \"There was an error during concurrent rendering but React was able to recover by instead synchronously rendering the entire root.\",\n          { cause: value }\n        ),\n        sourceFiber\n      );\n      null === workInProgressRootConcurrentErrors\n        ? (workInProgressRootConcurrentErrors = [error])\n        : workInProgressRootConcurrentErrors.push(error);\n      workInProgressRootExitStatus !== RootSuspendedWithDelay &&\n        (workInProgressRootExitStatus = RootErrored);\n      if (null === returnFiber) return !0;\n      value = createCapturedValueAtFiber(value, sourceFiber);\n      sourceFiber = returnFiber;\n      do {\n        switch (sourceFiber.tag) {\n          case 3:\n            return (\n              (sourceFiber.flags |= 65536),\n              (root = rootRenderLanes & -rootRenderLanes),\n              (sourceFiber.lanes |= root),\n              (root = createRootErrorUpdate(\n                sourceFiber.stateNode,\n                value,\n                root\n              )),\n              enqueueCapturedUpdate(sourceFiber, root),\n              !1\n            );\n          case 1:\n            if (\n              ((returnFiber = sourceFiber.type),\n              (error = sourceFiber.stateNode),\n              0 === (sourceFiber.flags & 128) &&\n                (\"function\" === typeof returnFiber.getDerivedStateFromError ||\n                  (null !== error &&\n                    \"function\" === typeof error.componentDidCatch &&\n                    (null === legacyErrorBoundariesThatAlreadyFailed ||\n                      !legacyErrorBoundariesThatAlreadyFailed.has(error)))))\n            )\n              return (\n                (sourceFiber.flags |= 65536),\n                (rootRenderLanes &= -rootRenderLanes),\n                (sourceFiber.lanes |= rootRenderLanes),\n                (rootRenderLanes = createClassErrorUpdate(rootRenderLanes)),\n                initializeClassErrorUpdate(\n                  rootRenderLanes,\n                  root,\n                  sourceFiber,\n                  value\n                ),\n                enqueueCapturedUpdate(sourceFiber, rootRenderLanes),\n                !1\n              );\n        }\n        sourceFiber = sourceFiber.return;\n      } while (null !== sourceFiber);\n      return !1;\n    }\n    function reconcileChildren(\n      current,\n      workInProgress,\n      nextChildren,\n      renderLanes\n    ) {\n      workInProgress.child =\n        null === current\n          ? mountChildFibers(workInProgress, null, nextChildren, renderLanes)\n          : reconcileChildFibers(\n              workInProgress,\n              current.child,\n              nextChildren,\n              renderLanes\n            );\n    }\n    function updateForwardRef(\n      current,\n      workInProgress,\n      Component,\n      nextProps,\n      renderLanes\n    ) {\n      Component = Component.render;\n      var ref = workInProgress.ref;\n      if (\"ref\" in nextProps) {\n        var propsWithoutRef = {};\n        for (var key in nextProps)\n          \"ref\" !== key && (propsWithoutRef[key] = nextProps[key]);\n      } else propsWithoutRef = nextProps;\n      prepareToReadContext(workInProgress);\n      nextProps = renderWithHooks(\n        current,\n        workInProgress,\n        Component,\n        propsWithoutRef,\n        ref,\n        renderLanes\n      );\n      key = checkDidRenderIdHook();\n      if (null !== current && !didReceiveUpdate)\n        return (\n          bailoutHooks(current, workInProgress, renderLanes),\n          bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes)\n        );\n      isHydrating && key && pushMaterializedTreeId(workInProgress);\n      workInProgress.flags |= 1;\n      reconcileChildren(current, workInProgress, nextProps, renderLanes);\n      return workInProgress.child;\n    }\n    function updateMemoComponent(\n      current,\n      workInProgress,\n      Component,\n      nextProps,\n      renderLanes\n    ) {\n      if (null === current) {\n        var type = Component.type;\n        if (\n          \"function\" === typeof type &&\n          !shouldConstruct(type) &&\n          void 0 === type.defaultProps &&\n          null === Component.compare\n        )\n          return (\n            (Component = resolveFunctionForHotReloading(type)),\n            (workInProgress.tag = 15),\n            (workInProgress.type = Component),\n            validateFunctionComponentInDev(workInProgress, type),\n            updateSimpleMemoComponent(\n              current,\n              workInProgress,\n              Component,\n              nextProps,\n              renderLanes\n            )\n          );\n        current = createFiberFromTypeAndProps(\n          Component.type,\n          null,\n          nextProps,\n          workInProgress,\n          workInProgress.mode,\n          renderLanes\n        );\n        current.ref = workInProgress.ref;\n        current.return = workInProgress;\n        return (workInProgress.child = current);\n      }\n      type = current.child;\n      if (!checkScheduledUpdateOrContext(current, renderLanes)) {\n        var prevProps = type.memoizedProps;\n        Component = Component.compare;\n        Component = null !== Component ? Component : shallowEqual;\n        if (\n          Component(prevProps, nextProps) &&\n          current.ref === workInProgress.ref\n        )\n          return bailoutOnAlreadyFinishedWork(\n            current,\n            workInProgress,\n            renderLanes\n          );\n      }\n      workInProgress.flags |= 1;\n      current = createWorkInProgress(type, nextProps);\n      current.ref = workInProgress.ref;\n      current.return = workInProgress;\n      return (workInProgress.child = current);\n    }\n    function updateSimpleMemoComponent(\n      current,\n      workInProgress,\n      Component,\n      nextProps,\n      renderLanes\n    ) {\n      if (null !== current) {\n        var prevProps = current.memoizedProps;\n        if (\n          shallowEqual(prevProps, nextProps) &&\n          current.ref === workInProgress.ref &&\n          workInProgress.type === current.type\n        )\n          if (\n            ((didReceiveUpdate = !1),\n            (workInProgress.pendingProps = nextProps = prevProps),\n            checkScheduledUpdateOrContext(current, renderLanes))\n          )\n            0 !== (current.flags & 131072) && (didReceiveUpdate = !0);\n          else\n            return (\n              (workInProgress.lanes = current.lanes),\n              bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes)\n            );\n      }\n      return updateFunctionComponent(\n        current,\n        workInProgress,\n        Component,\n        nextProps,\n        renderLanes\n      );\n    }\n    function updateOffscreenComponent(\n      current,\n      workInProgress,\n      renderLanes,\n      nextProps\n    ) {\n      var nextChildren = nextProps.children,\n        prevState = null !== current ? current.memoizedState : null;\n      null === current &&\n        null === workInProgress.stateNode &&\n        (workInProgress.stateNode = {\n          _visibility: OffscreenVisible,\n          _pendingMarkers: null,\n          _retryCache: null,\n          _transitions: null\n        });\n      if (\"hidden\" === nextProps.mode) {\n        if (0 !== (workInProgress.flags & 128)) {\n          prevState =\n            null !== prevState\n              ? prevState.baseLanes | renderLanes\n              : renderLanes;\n          if (null !== current) {\n            nextProps = workInProgress.child = current.child;\n            for (nextChildren = 0; null !== nextProps; )\n              (nextChildren =\n                nextChildren | nextProps.lanes | nextProps.childLanes),\n                (nextProps = nextProps.sibling);\n            nextProps = nextChildren & ~prevState;\n          } else (nextProps = 0), (workInProgress.child = null);\n          return deferHiddenOffscreenComponent(\n            current,\n            workInProgress,\n            prevState,\n            renderLanes,\n            nextProps\n          );\n        }\n        if (0 !== (renderLanes & 536870912))\n          (workInProgress.memoizedState = { baseLanes: 0, cachePool: null }),\n            null !== current &&\n              pushTransition(\n                workInProgress,\n                null !== prevState ? prevState.cachePool : null\n              ),\n            null !== prevState\n              ? pushHiddenContext(workInProgress, prevState)\n              : reuseHiddenContextOnStack(workInProgress),\n            pushOffscreenSuspenseHandler(workInProgress);\n        else\n          return (\n            (nextProps = workInProgress.lanes = 536870912),\n            deferHiddenOffscreenComponent(\n              current,\n              workInProgress,\n              null !== prevState\n                ? prevState.baseLanes | renderLanes\n                : renderLanes,\n              renderLanes,\n              nextProps\n            )\n          );\n      } else\n        null !== prevState\n          ? (pushTransition(workInProgress, prevState.cachePool),\n            pushHiddenContext(workInProgress, prevState),\n            reuseSuspenseHandlerOnStack(workInProgress),\n            (workInProgress.memoizedState = null))\n          : (null !== current && pushTransition(workInProgress, null),\n            reuseHiddenContextOnStack(workInProgress),\n            reuseSuspenseHandlerOnStack(workInProgress));\n      reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n      return workInProgress.child;\n    }\n    function bailoutOffscreenComponent(current, workInProgress) {\n      (null !== current && 22 === current.tag) ||\n        null !== workInProgress.stateNode ||\n        (workInProgress.stateNode = {\n          _visibility: OffscreenVisible,\n          _pendingMarkers: null,\n          _retryCache: null,\n          _transitions: null\n        });\n      return workInProgress.sibling;\n    }\n    function deferHiddenOffscreenComponent(\n      current,\n      workInProgress,\n      nextBaseLanes,\n      renderLanes,\n      remainingChildLanes\n    ) {\n      var JSCompiler_inline_result = peekCacheFromPool();\n      JSCompiler_inline_result =\n        null === JSCompiler_inline_result\n          ? null\n          : {\n              parent: CacheContext._currentValue,\n              pool: JSCompiler_inline_result\n            };\n      workInProgress.memoizedState = {\n        baseLanes: nextBaseLanes,\n        cachePool: JSCompiler_inline_result\n      };\n      null !== current && pushTransition(workInProgress, null);\n      reuseHiddenContextOnStack(workInProgress);\n      pushOffscreenSuspenseHandler(workInProgress);\n      null !== current &&\n        propagateParentContextChanges(current, workInProgress, renderLanes, !0);\n      workInProgress.childLanes = remainingChildLanes;\n      return null;\n    }\n    function mountActivityChildren(workInProgress, nextProps) {\n      var hiddenProp = nextProps.hidden;\n      void 0 !== hiddenProp &&\n        console.error(\n          '<Activity> doesn\\'t accept a hidden prop. Use mode=\"hidden\" instead.\\n- <Activity %s>\\n+ <Activity %s>',\n          !0 === hiddenProp\n            ? \"hidden\"\n            : !1 === hiddenProp\n              ? \"hidden={false}\"\n              : \"hidden={...}\",\n          hiddenProp ? 'mode=\"hidden\"' : 'mode=\"visible\"'\n        );\n      nextProps = mountWorkInProgressOffscreenFiber(\n        { mode: nextProps.mode, children: nextProps.children },\n        workInProgress.mode\n      );\n      nextProps.ref = workInProgress.ref;\n      workInProgress.child = nextProps;\n      nextProps.return = workInProgress;\n      return nextProps;\n    }\n    function retryActivityComponentWithoutHydrating(\n      current,\n      workInProgress,\n      renderLanes\n    ) {\n      reconcileChildFibers(workInProgress, current.child, null, renderLanes);\n      current = mountActivityChildren(\n        workInProgress,\n        workInProgress.pendingProps\n      );\n      current.flags |= 2;\n      popSuspenseHandler(workInProgress);\n      workInProgress.memoizedState = null;\n      return current;\n    }\n    function updateActivityComponent(current, workInProgress, renderLanes) {\n      var nextProps = workInProgress.pendingProps,\n        didSuspend = 0 !== (workInProgress.flags & 128);\n      workInProgress.flags &= -129;\n      if (null === current) {\n        if (isHydrating) {\n          if (\"hidden\" === nextProps.mode)\n            return (\n              (current = mountActivityChildren(workInProgress, nextProps)),\n              (workInProgress.lanes = 536870912),\n              bailoutOffscreenComponent(null, current)\n            );\n          pushDehydratedActivitySuspenseHandler(workInProgress);\n          (current = nextHydratableInstance)\n            ? ((renderLanes = canHydrateHydrationBoundary(\n                current,\n                rootOrSingletonContext\n              )),\n              (renderLanes =\n                null !== renderLanes && renderLanes.data === ACTIVITY_START_DATA\n                  ? renderLanes\n                  : null),\n              null !== renderLanes &&\n                ((nextProps = {\n                  dehydrated: renderLanes,\n                  treeContext: getSuspendedTreeContext(),\n                  retryLane: 536870912,\n                  hydrationErrors: null\n                }),\n                (workInProgress.memoizedState = nextProps),\n                (nextProps = createFiberFromDehydratedFragment(renderLanes)),\n                (nextProps.return = workInProgress),\n                (workInProgress.child = nextProps),\n                (hydrationParentFiber = workInProgress),\n                (nextHydratableInstance = null)))\n            : (renderLanes = null);\n          if (null === renderLanes)\n            throw (\n              (warnNonHydratedInstance(workInProgress, current),\n              throwOnHydrationMismatch(workInProgress))\n            );\n          workInProgress.lanes = 536870912;\n          return null;\n        }\n        return mountActivityChildren(workInProgress, nextProps);\n      }\n      var prevState = current.memoizedState;\n      if (null !== prevState) {\n        var activityInstance = prevState.dehydrated;\n        pushDehydratedActivitySuspenseHandler(workInProgress);\n        if (didSuspend)\n          if (workInProgress.flags & 256)\n            (workInProgress.flags &= -257),\n              (workInProgress = retryActivityComponentWithoutHydrating(\n                current,\n                workInProgress,\n                renderLanes\n              ));\n          else if (null !== workInProgress.memoizedState)\n            (workInProgress.child = current.child),\n              (workInProgress.flags |= 128),\n              (workInProgress = null);\n          else\n            throw Error(\n              \"Client rendering an Activity suspended it again. This is a bug in React.\"\n            );\n        else if (\n          (warnIfHydrating(),\n          0 !== (renderLanes & 536870912) &&\n            markRenderDerivedCause(workInProgress),\n          didReceiveUpdate ||\n            propagateParentContextChanges(\n              current,\n              workInProgress,\n              renderLanes,\n              !1\n            ),\n          (didSuspend = 0 !== (renderLanes & current.childLanes)),\n          didReceiveUpdate || didSuspend)\n        ) {\n          nextProps = workInProgressRoot;\n          if (\n            null !== nextProps &&\n            ((activityInstance = getBumpedLaneForHydration(\n              nextProps,\n              renderLanes\n            )),\n            0 !== activityInstance && activityInstance !== prevState.retryLane)\n          )\n            throw (\n              ((prevState.retryLane = activityInstance),\n              enqueueConcurrentRenderForLane(current, activityInstance),\n              scheduleUpdateOnFiber(nextProps, current, activityInstance),\n              SelectiveHydrationException)\n            );\n          renderDidSuspendDelayIfPossible();\n          workInProgress = retryActivityComponentWithoutHydrating(\n            current,\n            workInProgress,\n            renderLanes\n          );\n        } else\n          (current = prevState.treeContext),\n            (nextHydratableInstance = getNextHydratable(\n              activityInstance.nextSibling\n            )),\n            (hydrationParentFiber = workInProgress),\n            (isHydrating = !0),\n            (hydrationErrors = null),\n            (didSuspendOrErrorDEV = !1),\n            (hydrationDiffRootDEV = null),\n            (rootOrSingletonContext = !1),\n            null !== current &&\n              restoreSuspendedTreeContext(workInProgress, current),\n            (workInProgress = mountActivityChildren(workInProgress, nextProps)),\n            (workInProgress.flags |= 4096);\n        return workInProgress;\n      }\n      prevState = current.child;\n      nextProps = { mode: nextProps.mode, children: nextProps.children };\n      0 !== (renderLanes & 536870912) &&\n        0 !== (renderLanes & current.lanes) &&\n        markRenderDerivedCause(workInProgress);\n      current = createWorkInProgress(prevState, nextProps);\n      current.ref = workInProgress.ref;\n      workInProgress.child = current;\n      current.return = workInProgress;\n      return current;\n    }\n    function markRef(current, workInProgress) {\n      var ref = workInProgress.ref;\n      if (null === ref)\n        null !== current &&\n          null !== current.ref &&\n          (workInProgress.flags |= 4194816);\n      else {\n        if (\"function\" !== typeof ref && \"object\" !== typeof ref)\n          throw Error(\n            \"Expected ref to be a function, an object returned by React.createRef(), or undefined/null.\"\n          );\n        if (null === current || current.ref !== ref)\n          workInProgress.flags |= 4194816;\n      }\n    }\n    function updateFunctionComponent(\n      current,\n      workInProgress,\n      Component,\n      nextProps,\n      renderLanes\n    ) {\n      if (\n        Component.prototype &&\n        \"function\" === typeof Component.prototype.render\n      ) {\n        var componentName = getComponentNameFromType(Component) || \"Unknown\";\n        didWarnAboutBadClass[componentName] ||\n          (console.error(\n            \"The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.\",\n            componentName,\n            componentName\n          ),\n          (didWarnAboutBadClass[componentName] = !0));\n      }\n      workInProgress.mode & StrictLegacyMode &&\n        ReactStrictModeWarnings.recordLegacyContextWarning(\n          workInProgress,\n          null\n        );\n      null === current &&\n        (validateFunctionComponentInDev(workInProgress, workInProgress.type),\n        Component.contextTypes &&\n          ((componentName = getComponentNameFromType(Component) || \"Unknown\"),\n          didWarnAboutContextTypes[componentName] ||\n            ((didWarnAboutContextTypes[componentName] = !0),\n            console.error(\n              \"%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with React.useContext() instead. (https://react.dev/link/legacy-context)\",\n              componentName\n            ))));\n      prepareToReadContext(workInProgress);\n      Component = renderWithHooks(\n        current,\n        workInProgress,\n        Component,\n        nextProps,\n        void 0,\n        renderLanes\n      );\n      nextProps = checkDidRenderIdHook();\n      if (null !== current && !didReceiveUpdate)\n        return (\n          bailoutHooks(current, workInProgress, renderLanes),\n          bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes)\n        );\n      isHydrating && nextProps && pushMaterializedTreeId(workInProgress);\n      workInProgress.flags |= 1;\n      reconcileChildren(current, workInProgress, Component, renderLanes);\n      return workInProgress.child;\n    }\n    function replayFunctionComponent(\n      current,\n      workInProgress,\n      nextProps,\n      Component,\n      secondArg,\n      renderLanes\n    ) {\n      prepareToReadContext(workInProgress);\n      hookTypesUpdateIndexDev = -1;\n      ignorePreviousDependencies =\n        null !== current && current.type !== workInProgress.type;\n      workInProgress.updateQueue = null;\n      nextProps = renderWithHooksAgain(\n        workInProgress,\n        Component,\n        nextProps,\n        secondArg\n      );\n      finishRenderingHooks(current, workInProgress);\n      Component = checkDidRenderIdHook();\n      if (null !== current && !didReceiveUpdate)\n        return (\n          bailoutHooks(current, workInProgress, renderLanes),\n          bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes)\n        );\n      isHydrating && Component && pushMaterializedTreeId(workInProgress);\n      workInProgress.flags |= 1;\n      reconcileChildren(current, workInProgress, nextProps, renderLanes);\n      return workInProgress.child;\n    }\n    function updateClassComponent(\n      current,\n      workInProgress,\n      Component,\n      nextProps,\n      renderLanes\n    ) {\n      switch (shouldErrorImpl(workInProgress)) {\n        case !1:\n          var _instance = workInProgress.stateNode,\n            state = new workInProgress.type(\n              workInProgress.memoizedProps,\n              _instance.context\n            ).state;\n          _instance.updater.enqueueSetState(_instance, state, null);\n          break;\n        case !0:\n          workInProgress.flags |= 128;\n          workInProgress.flags |= 65536;\n          _instance = Error(\"Simulated error coming from DevTools\");\n          var lane = renderLanes & -renderLanes;\n          workInProgress.lanes |= lane;\n          state = workInProgressRoot;\n          if (null === state)\n            throw Error(\n              \"Expected a work-in-progress root. This is a bug in React. Please file an issue.\"\n            );\n          lane = createClassErrorUpdate(lane);\n          initializeClassErrorUpdate(\n            lane,\n            state,\n            workInProgress,\n            createCapturedValueAtFiber(_instance, workInProgress)\n          );\n          enqueueCapturedUpdate(workInProgress, lane);\n      }\n      prepareToReadContext(workInProgress);\n      if (null === workInProgress.stateNode) {\n        state = emptyContextObject;\n        _instance = Component.contextType;\n        \"contextType\" in Component &&\n          null !== _instance &&\n          (void 0 === _instance || _instance.$$typeof !== REACT_CONTEXT_TYPE) &&\n          !didWarnAboutInvalidateContextType.has(Component) &&\n          (didWarnAboutInvalidateContextType.add(Component),\n          (lane =\n            void 0 === _instance\n              ? \" However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file.\"\n              : \"object\" !== typeof _instance\n                ? \" However, it is set to a \" + typeof _instance + \".\"\n                : _instance.$$typeof === REACT_CONSUMER_TYPE\n                  ? \" Did you accidentally pass the Context.Consumer instead?\"\n                  : \" However, it is set to an object with keys {\" +\n                    Object.keys(_instance).join(\", \") +\n                    \"}.\"),\n          console.error(\n            \"%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s\",\n            getComponentNameFromType(Component) || \"Component\",\n            lane\n          ));\n        \"object\" === typeof _instance &&\n          null !== _instance &&\n          (state = readContext(_instance));\n        _instance = new Component(nextProps, state);\n        if (workInProgress.mode & StrictLegacyMode) {\n          setIsStrictModeForDevtools(!0);\n          try {\n            _instance = new Component(nextProps, state);\n          } finally {\n            setIsStrictModeForDevtools(!1);\n          }\n        }\n        state = workInProgress.memoizedState =\n          null !== _instance.state && void 0 !== _instance.state\n            ? _instance.state\n            : null;\n        _instance.updater = classComponentUpdater;\n        workInProgress.stateNode = _instance;\n        _instance._reactInternals = workInProgress;\n        _instance._reactInternalInstance = fakeInternalInstance;\n        \"function\" === typeof Component.getDerivedStateFromProps &&\n          null === state &&\n          ((state = getComponentNameFromType(Component) || \"Component\"),\n          didWarnAboutUninitializedState.has(state) ||\n            (didWarnAboutUninitializedState.add(state),\n            console.error(\n              \"`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.\",\n              state,\n              null === _instance.state ? \"null\" : \"undefined\",\n              state\n            )));\n        if (\n          \"function\" === typeof Component.getDerivedStateFromProps ||\n          \"function\" === typeof _instance.getSnapshotBeforeUpdate\n        ) {\n          var foundWillUpdateName = (lane = state = null);\n          \"function\" === typeof _instance.componentWillMount &&\n          !0 !== _instance.componentWillMount.__suppressDeprecationWarning\n            ? (state = \"componentWillMount\")\n            : \"function\" === typeof _instance.UNSAFE_componentWillMount &&\n              (state = \"UNSAFE_componentWillMount\");\n          \"function\" === typeof _instance.componentWillReceiveProps &&\n          !0 !==\n            _instance.componentWillReceiveProps.__suppressDeprecationWarning\n            ? (lane = \"componentWillReceiveProps\")\n            : \"function\" ===\n                typeof _instance.UNSAFE_componentWillReceiveProps &&\n              (lane = \"UNSAFE_componentWillReceiveProps\");\n          \"function\" === typeof _instance.componentWillUpdate &&\n          !0 !== _instance.componentWillUpdate.__suppressDeprecationWarning\n            ? (foundWillUpdateName = \"componentWillUpdate\")\n            : \"function\" === typeof _instance.UNSAFE_componentWillUpdate &&\n              (foundWillUpdateName = \"UNSAFE_componentWillUpdate\");\n          if (null !== state || null !== lane || null !== foundWillUpdateName) {\n            _instance = getComponentNameFromType(Component) || \"Component\";\n            var newApiName =\n              \"function\" === typeof Component.getDerivedStateFromProps\n                ? \"getDerivedStateFromProps()\"\n                : \"getSnapshotBeforeUpdate()\";\n            didWarnAboutLegacyLifecyclesAndDerivedState.has(_instance) ||\n              (didWarnAboutLegacyLifecyclesAndDerivedState.add(_instance),\n              console.error(\n                \"Unsafe legacy lifecycles will not be called for components using new component APIs.\\n\\n%s uses %s but also contains the following legacy lifecycles:%s%s%s\\n\\nThe above lifecycles should be removed. Learn more about this warning here:\\nhttps://react.dev/link/unsafe-component-lifecycles\",\n                _instance,\n                newApiName,\n                null !== state ? \"\\n  \" + state : \"\",\n                null !== lane ? \"\\n  \" + lane : \"\",\n                null !== foundWillUpdateName ? \"\\n  \" + foundWillUpdateName : \"\"\n              ));\n          }\n        }\n        _instance = workInProgress.stateNode;\n        state = getComponentNameFromType(Component) || \"Component\";\n        _instance.render ||\n          (Component.prototype &&\n          \"function\" === typeof Component.prototype.render\n            ? console.error(\n                \"No `render` method found on the %s instance: did you accidentally return an object from the constructor?\",\n                state\n              )\n            : console.error(\n                \"No `render` method found on the %s instance: you may have forgotten to define `render`.\",\n                state\n              ));\n        !_instance.getInitialState ||\n          _instance.getInitialState.isReactClassApproved ||\n          _instance.state ||\n          console.error(\n            \"getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?\",\n            state\n          );\n        _instance.getDefaultProps &&\n          !_instance.getDefaultProps.isReactClassApproved &&\n          console.error(\n            \"getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.\",\n            state\n          );\n        _instance.contextType &&\n          console.error(\n            \"contextType was defined as an instance property on %s. Use a static property to define contextType instead.\",\n            state\n          );\n        Component.childContextTypes &&\n          !didWarnAboutChildContextTypes.has(Component) &&\n          (didWarnAboutChildContextTypes.add(Component),\n          console.error(\n            \"%s uses the legacy childContextTypes API which was removed in React 19. Use React.createContext() instead. (https://react.dev/link/legacy-context)\",\n            state\n          ));\n        Component.contextTypes &&\n          !didWarnAboutContextTypes$1.has(Component) &&\n          (didWarnAboutContextTypes$1.add(Component),\n          console.error(\n            \"%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with static contextType instead. (https://react.dev/link/legacy-context)\",\n            state\n          ));\n        \"function\" === typeof _instance.componentShouldUpdate &&\n          console.error(\n            \"%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.\",\n            state\n          );\n        Component.prototype &&\n          Component.prototype.isPureReactComponent &&\n          \"undefined\" !== typeof _instance.shouldComponentUpdate &&\n          console.error(\n            \"%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.\",\n            getComponentNameFromType(Component) || \"A pure component\"\n          );\n        \"function\" === typeof _instance.componentDidUnmount &&\n          console.error(\n            \"%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?\",\n            state\n          );\n        \"function\" === typeof _instance.componentDidReceiveProps &&\n          console.error(\n            \"%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().\",\n            state\n          );\n        \"function\" === typeof _instance.componentWillRecieveProps &&\n          console.error(\n            \"%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?\",\n            state\n          );\n        \"function\" === typeof _instance.UNSAFE_componentWillRecieveProps &&\n          console.error(\n            \"%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?\",\n            state\n          );\n        lane = _instance.props !== nextProps;\n        void 0 !== _instance.props &&\n          lane &&\n          console.error(\n            \"When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.\",\n            state\n          );\n        _instance.defaultProps &&\n          console.error(\n            \"Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.\",\n            state,\n            state\n          );\n        \"function\" !== typeof _instance.getSnapshotBeforeUpdate ||\n          \"function\" === typeof _instance.componentDidUpdate ||\n          didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(Component) ||\n          (didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(Component),\n          console.error(\n            \"%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.\",\n            getComponentNameFromType(Component)\n          ));\n        \"function\" === typeof _instance.getDerivedStateFromProps &&\n          console.error(\n            \"%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.\",\n            state\n          );\n        \"function\" === typeof _instance.getDerivedStateFromError &&\n          console.error(\n            \"%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.\",\n            state\n          );\n        \"function\" === typeof Component.getSnapshotBeforeUpdate &&\n          console.error(\n            \"%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.\",\n            state\n          );\n        (lane = _instance.state) &&\n          (\"object\" !== typeof lane || isArrayImpl(lane)) &&\n          console.error(\"%s.state: must be set to an object or null\", state);\n        \"function\" === typeof _instance.getChildContext &&\n          \"object\" !== typeof Component.childContextTypes &&\n          console.error(\n            \"%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().\",\n            state\n          );\n        _instance = workInProgress.stateNode;\n        _instance.props = nextProps;\n        _instance.state = workInProgress.memoizedState;\n        _instance.refs = {};\n        initializeUpdateQueue(workInProgress);\n        state = Component.contextType;\n        _instance.context =\n          \"object\" === typeof state && null !== state\n            ? readContext(state)\n            : emptyContextObject;\n        _instance.state === nextProps &&\n          ((state = getComponentNameFromType(Component) || \"Component\"),\n          didWarnAboutDirectlyAssigningPropsToState.has(state) ||\n            (didWarnAboutDirectlyAssigningPropsToState.add(state),\n            console.error(\n              \"%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.\",\n              state\n            )));\n        workInProgress.mode & StrictLegacyMode &&\n          ReactStrictModeWarnings.recordLegacyContextWarning(\n            workInProgress,\n            _instance\n          );\n        ReactStrictModeWarnings.recordUnsafeLifecycleWarnings(\n          workInProgress,\n          _instance\n        );\n        _instance.state = workInProgress.memoizedState;\n        state = Component.getDerivedStateFromProps;\n        \"function\" === typeof state &&\n          (applyDerivedStateFromProps(\n            workInProgress,\n            Component,\n            state,\n            nextProps\n          ),\n          (_instance.state = workInProgress.memoizedState));\n        \"function\" === typeof Component.getDerivedStateFromProps ||\n          \"function\" === typeof _instance.getSnapshotBeforeUpdate ||\n          (\"function\" !== typeof _instance.UNSAFE_componentWillMount &&\n            \"function\" !== typeof _instance.componentWillMount) ||\n          ((state = _instance.state),\n          \"function\" === typeof _instance.componentWillMount &&\n            _instance.componentWillMount(),\n          \"function\" === typeof _instance.UNSAFE_componentWillMount &&\n            _instance.UNSAFE_componentWillMount(),\n          state !== _instance.state &&\n            (console.error(\n              \"%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.\",\n              getComponentNameFromFiber(workInProgress) || \"Component\"\n            ),\n            classComponentUpdater.enqueueReplaceState(\n              _instance,\n              _instance.state,\n              null\n            )),\n          processUpdateQueue(workInProgress, nextProps, _instance, renderLanes),\n          suspendIfUpdateReadFromEntangledAsyncAction(),\n          (_instance.state = workInProgress.memoizedState));\n        \"function\" === typeof _instance.componentDidMount &&\n          (workInProgress.flags |= 4194308);\n        (workInProgress.mode & StrictEffectsMode) !== NoMode &&\n          (workInProgress.flags |= 134217728);\n        _instance = !0;\n      } else if (null === current) {\n        _instance = workInProgress.stateNode;\n        var unresolvedOldProps = workInProgress.memoizedProps;\n        lane = resolveClassComponentProps(Component, unresolvedOldProps);\n        _instance.props = lane;\n        var oldContext = _instance.context;\n        foundWillUpdateName = Component.contextType;\n        state = emptyContextObject;\n        \"object\" === typeof foundWillUpdateName &&\n          null !== foundWillUpdateName &&\n          (state = readContext(foundWillUpdateName));\n        newApiName = Component.getDerivedStateFromProps;\n        foundWillUpdateName =\n          \"function\" === typeof newApiName ||\n          \"function\" === typeof _instance.getSnapshotBeforeUpdate;\n        unresolvedOldProps = workInProgress.pendingProps !== unresolvedOldProps;\n        foundWillUpdateName ||\n          (\"function\" !== typeof _instance.UNSAFE_componentWillReceiveProps &&\n            \"function\" !== typeof _instance.componentWillReceiveProps) ||\n          ((unresolvedOldProps || oldContext !== state) &&\n            callComponentWillReceiveProps(\n              workInProgress,\n              _instance,\n              nextProps,\n              state\n            ));\n        hasForceUpdate = !1;\n        var oldState = workInProgress.memoizedState;\n        _instance.state = oldState;\n        processUpdateQueue(workInProgress, nextProps, _instance, renderLanes);\n        suspendIfUpdateReadFromEntangledAsyncAction();\n        oldContext = workInProgress.memoizedState;\n        unresolvedOldProps || oldState !== oldContext || hasForceUpdate\n          ? (\"function\" === typeof newApiName &&\n              (applyDerivedStateFromProps(\n                workInProgress,\n                Component,\n                newApiName,\n                nextProps\n              ),\n              (oldContext = workInProgress.memoizedState)),\n            (lane =\n              hasForceUpdate ||\n              checkShouldComponentUpdate(\n                workInProgress,\n                Component,\n                lane,\n                nextProps,\n                oldState,\n                oldContext,\n                state\n              ))\n              ? (foundWillUpdateName ||\n                  (\"function\" !== typeof _instance.UNSAFE_componentWillMount &&\n                    \"function\" !== typeof _instance.componentWillMount) ||\n                  (\"function\" === typeof _instance.componentWillMount &&\n                    _instance.componentWillMount(),\n                  \"function\" === typeof _instance.UNSAFE_componentWillMount &&\n                    _instance.UNSAFE_componentWillMount()),\n                \"function\" === typeof _instance.componentDidMount &&\n                  (workInProgress.flags |= 4194308),\n                (workInProgress.mode & StrictEffectsMode) !== NoMode &&\n                  (workInProgress.flags |= 134217728))\n              : (\"function\" === typeof _instance.componentDidMount &&\n                  (workInProgress.flags |= 4194308),\n                (workInProgress.mode & StrictEffectsMode) !== NoMode &&\n                  (workInProgress.flags |= 134217728),\n                (workInProgress.memoizedProps = nextProps),\n                (workInProgress.memoizedState = oldContext)),\n            (_instance.props = nextProps),\n            (_instance.state = oldContext),\n            (_instance.context = state),\n            (_instance = lane))\n          : (\"function\" === typeof _instance.componentDidMount &&\n              (workInProgress.flags |= 4194308),\n            (workInProgress.mode & StrictEffectsMode) !== NoMode &&\n              (workInProgress.flags |= 134217728),\n            (_instance = !1));\n      } else {\n        _instance = workInProgress.stateNode;\n        cloneUpdateQueue(current, workInProgress);\n        state = workInProgress.memoizedProps;\n        foundWillUpdateName = resolveClassComponentProps(Component, state);\n        _instance.props = foundWillUpdateName;\n        newApiName = workInProgress.pendingProps;\n        oldState = _instance.context;\n        oldContext = Component.contextType;\n        lane = emptyContextObject;\n        \"object\" === typeof oldContext &&\n          null !== oldContext &&\n          (lane = readContext(oldContext));\n        unresolvedOldProps = Component.getDerivedStateFromProps;\n        (oldContext =\n          \"function\" === typeof unresolvedOldProps ||\n          \"function\" === typeof _instance.getSnapshotBeforeUpdate) ||\n          (\"function\" !== typeof _instance.UNSAFE_componentWillReceiveProps &&\n            \"function\" !== typeof _instance.componentWillReceiveProps) ||\n          ((state !== newApiName || oldState !== lane) &&\n            callComponentWillReceiveProps(\n              workInProgress,\n              _instance,\n              nextProps,\n              lane\n            ));\n        hasForceUpdate = !1;\n        oldState = workInProgress.memoizedState;\n        _instance.state = oldState;\n        processUpdateQueue(workInProgress, nextProps, _instance, renderLanes);\n        suspendIfUpdateReadFromEntangledAsyncAction();\n        var newState = workInProgress.memoizedState;\n        state !== newApiName ||\n        oldState !== newState ||\n        hasForceUpdate ||\n        (null !== current &&\n          null !== current.dependencies &&\n          checkIfContextChanged(current.dependencies))\n          ? (\"function\" === typeof unresolvedOldProps &&\n              (applyDerivedStateFromProps(\n                workInProgress,\n                Component,\n                unresolvedOldProps,\n                nextProps\n              ),\n              (newState = workInProgress.memoizedState)),\n            (foundWillUpdateName =\n              hasForceUpdate ||\n              checkShouldComponentUpdate(\n                workInProgress,\n                Component,\n                foundWillUpdateName,\n                nextProps,\n                oldState,\n                newState,\n                lane\n              ) ||\n              (null !== current &&\n                null !== current.dependencies &&\n                checkIfContextChanged(current.dependencies)))\n              ? (oldContext ||\n                  (\"function\" !== typeof _instance.UNSAFE_componentWillUpdate &&\n                    \"function\" !== typeof _instance.componentWillUpdate) ||\n                  (\"function\" === typeof _instance.componentWillUpdate &&\n                    _instance.componentWillUpdate(nextProps, newState, lane),\n                  \"function\" === typeof _instance.UNSAFE_componentWillUpdate &&\n                    _instance.UNSAFE_componentWillUpdate(\n                      nextProps,\n                      newState,\n                      lane\n                    )),\n                \"function\" === typeof _instance.componentDidUpdate &&\n                  (workInProgress.flags |= 4),\n                \"function\" === typeof _instance.getSnapshotBeforeUpdate &&\n                  (workInProgress.flags |= 1024))\n              : (\"function\" !== typeof _instance.componentDidUpdate ||\n                  (state === current.memoizedProps &&\n                    oldState === current.memoizedState) ||\n                  (workInProgress.flags |= 4),\n                \"function\" !== typeof _instance.getSnapshotBeforeUpdate ||\n                  (state === current.memoizedProps &&\n                    oldState === current.memoizedState) ||\n                  (workInProgress.flags |= 1024),\n                (workInProgress.memoizedProps = nextProps),\n                (workInProgress.memoizedState = newState)),\n            (_instance.props = nextProps),\n            (_instance.state = newState),\n            (_instance.context = lane),\n            (_instance = foundWillUpdateName))\n          : (\"function\" !== typeof _instance.componentDidUpdate ||\n              (state === current.memoizedProps &&\n                oldState === current.memoizedState) ||\n              (workInProgress.flags |= 4),\n            \"function\" !== typeof _instance.getSnapshotBeforeUpdate ||\n              (state === current.memoizedProps &&\n                oldState === current.memoizedState) ||\n              (workInProgress.flags |= 1024),\n            (_instance = !1));\n      }\n      lane = _instance;\n      markRef(current, workInProgress);\n      state = 0 !== (workInProgress.flags & 128);\n      if (lane || state) {\n        lane = workInProgress.stateNode;\n        setCurrentFiber(workInProgress);\n        if (state && \"function\" !== typeof Component.getDerivedStateFromError)\n          (Component = null), (profilerStartTime = -1);\n        else if (\n          ((Component = callRenderInDEV(lane)),\n          workInProgress.mode & StrictLegacyMode)\n        ) {\n          setIsStrictModeForDevtools(!0);\n          try {\n            callRenderInDEV(lane);\n          } finally {\n            setIsStrictModeForDevtools(!1);\n          }\n        }\n        workInProgress.flags |= 1;\n        null !== current && state\n          ? ((workInProgress.child = reconcileChildFibers(\n              workInProgress,\n              current.child,\n              null,\n              renderLanes\n            )),\n            (workInProgress.child = reconcileChildFibers(\n              workInProgress,\n              null,\n              Component,\n              renderLanes\n            )))\n          : reconcileChildren(current, workInProgress, Component, renderLanes);\n        workInProgress.memoizedState = lane.state;\n        current = workInProgress.child;\n      } else\n        current = bailoutOnAlreadyFinishedWork(\n          current,\n          workInProgress,\n          renderLanes\n        );\n      renderLanes = workInProgress.stateNode;\n      _instance &&\n        renderLanes.props !== nextProps &&\n        (didWarnAboutReassigningProps ||\n          console.error(\n            \"It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.\",\n            getComponentNameFromFiber(workInProgress) || \"a component\"\n          ),\n        (didWarnAboutReassigningProps = !0));\n      return current;\n    }\n    function mountHostRootWithoutHydrating(\n      current,\n      workInProgress,\n      nextChildren,\n      renderLanes\n    ) {\n      resetHydrationState();\n      workInProgress.flags |= 256;\n      reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n      return workInProgress.child;\n    }\n    function validateFunctionComponentInDev(workInProgress, Component) {\n      Component &&\n        Component.childContextTypes &&\n        console.error(\n          \"childContextTypes cannot be defined on a function component.\\n  %s.childContextTypes = ...\",\n          Component.displayName || Component.name || \"Component\"\n        );\n      \"function\" === typeof Component.getDerivedStateFromProps &&\n        ((workInProgress = getComponentNameFromType(Component) || \"Unknown\"),\n        didWarnAboutGetDerivedStateOnFunctionComponent[workInProgress] ||\n          (console.error(\n            \"%s: Function components do not support getDerivedStateFromProps.\",\n            workInProgress\n          ),\n          (didWarnAboutGetDerivedStateOnFunctionComponent[workInProgress] =\n            !0)));\n      \"object\" === typeof Component.contextType &&\n        null !== Component.contextType &&\n        ((Component = getComponentNameFromType(Component) || \"Unknown\"),\n        didWarnAboutContextTypeOnFunctionComponent[Component] ||\n          (console.error(\n            \"%s: Function components do not support contextType.\",\n            Component\n          ),\n          (didWarnAboutContextTypeOnFunctionComponent[Component] = !0)));\n    }\n    function mountSuspenseOffscreenState(renderLanes) {\n      return { baseLanes: renderLanes, cachePool: getSuspendedCache() };\n    }\n    function getRemainingWorkInPrimaryTree(\n      current,\n      primaryTreeDidDefer,\n      renderLanes\n    ) {\n      current = null !== current ? current.childLanes & ~renderLanes : 0;\n      primaryTreeDidDefer && (current |= workInProgressDeferredLane);\n      return current;\n    }\n    function updateSuspenseComponent(current, workInProgress, renderLanes) {\n      var JSCompiler_object_inline_digest_2724;\n      var JSCompiler_object_inline_stack_2725 = workInProgress.pendingProps;\n      shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128);\n      var JSCompiler_object_inline_message_2723 = !1;\n      var didSuspend = 0 !== (workInProgress.flags & 128);\n      (JSCompiler_object_inline_digest_2724 = didSuspend) ||\n        (JSCompiler_object_inline_digest_2724 =\n          null !== current && null === current.memoizedState\n            ? !1\n            : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback));\n      JSCompiler_object_inline_digest_2724 &&\n        ((JSCompiler_object_inline_message_2723 = !0),\n        (workInProgress.flags &= -129));\n      JSCompiler_object_inline_digest_2724 = 0 !== (workInProgress.flags & 32);\n      workInProgress.flags &= -33;\n      if (null === current) {\n        if (isHydrating) {\n          JSCompiler_object_inline_message_2723\n            ? pushPrimaryTreeSuspenseHandler(workInProgress)\n            : reuseSuspenseHandlerOnStack(workInProgress);\n          (current = nextHydratableInstance)\n            ? ((renderLanes = canHydrateHydrationBoundary(\n                current,\n                rootOrSingletonContext\n              )),\n              (renderLanes =\n                null !== renderLanes && renderLanes.data !== ACTIVITY_START_DATA\n                  ? renderLanes\n                  : null),\n              null !== renderLanes &&\n                ((JSCompiler_object_inline_digest_2724 = {\n                  dehydrated: renderLanes,\n                  treeContext: getSuspendedTreeContext(),\n                  retryLane: 536870912,\n                  hydrationErrors: null\n                }),\n                (workInProgress.memoizedState =\n                  JSCompiler_object_inline_digest_2724),\n                (JSCompiler_object_inline_digest_2724 =\n                  createFiberFromDehydratedFragment(renderLanes)),\n                (JSCompiler_object_inline_digest_2724.return = workInProgress),\n                (workInProgress.child = JSCompiler_object_inline_digest_2724),\n                (hydrationParentFiber = workInProgress),\n                (nextHydratableInstance = null)))\n            : (renderLanes = null);\n          if (null === renderLanes)\n            throw (\n              (warnNonHydratedInstance(workInProgress, current),\n              throwOnHydrationMismatch(workInProgress))\n            );\n          isSuspenseInstanceFallback(renderLanes)\n            ? (workInProgress.lanes = 32)\n            : (workInProgress.lanes = 536870912);\n          return null;\n        }\n        var nextPrimaryChildren = JSCompiler_object_inline_stack_2725.children;\n        JSCompiler_object_inline_stack_2725 =\n          JSCompiler_object_inline_stack_2725.fallback;\n        if (JSCompiler_object_inline_message_2723) {\n          reuseSuspenseHandlerOnStack(workInProgress);\n          var mode = workInProgress.mode;\n          nextPrimaryChildren = mountWorkInProgressOffscreenFiber(\n            { mode: \"hidden\", children: nextPrimaryChildren },\n            mode\n          );\n          JSCompiler_object_inline_stack_2725 = createFiberFromFragment(\n            JSCompiler_object_inline_stack_2725,\n            mode,\n            renderLanes,\n            null\n          );\n          nextPrimaryChildren.return = workInProgress;\n          JSCompiler_object_inline_stack_2725.return = workInProgress;\n          nextPrimaryChildren.sibling = JSCompiler_object_inline_stack_2725;\n          workInProgress.child = nextPrimaryChildren;\n          JSCompiler_object_inline_stack_2725 = workInProgress.child;\n          JSCompiler_object_inline_stack_2725.memoizedState =\n            mountSuspenseOffscreenState(renderLanes);\n          JSCompiler_object_inline_stack_2725.childLanes =\n            getRemainingWorkInPrimaryTree(\n              current,\n              JSCompiler_object_inline_digest_2724,\n              renderLanes\n            );\n          workInProgress.memoizedState = SUSPENDED_MARKER;\n          return bailoutOffscreenComponent(\n            null,\n            JSCompiler_object_inline_stack_2725\n          );\n        }\n        pushPrimaryTreeSuspenseHandler(workInProgress);\n        return mountSuspensePrimaryChildren(\n          workInProgress,\n          nextPrimaryChildren\n        );\n      }\n      var prevState = current.memoizedState;\n      if (null !== prevState) {\n        var JSCompiler_object_inline_componentStack_2726 = prevState.dehydrated;\n        if (null !== JSCompiler_object_inline_componentStack_2726) {\n          if (didSuspend)\n            workInProgress.flags & 256\n              ? (pushPrimaryTreeSuspenseHandler(workInProgress),\n                (workInProgress.flags &= -257),\n                (workInProgress = retrySuspenseComponentWithoutHydrating(\n                  current,\n                  workInProgress,\n                  renderLanes\n                )))\n              : null !== workInProgress.memoizedState\n                ? (reuseSuspenseHandlerOnStack(workInProgress),\n                  (workInProgress.child = current.child),\n                  (workInProgress.flags |= 128),\n                  (workInProgress = null))\n                : (reuseSuspenseHandlerOnStack(workInProgress),\n                  (nextPrimaryChildren =\n                    JSCompiler_object_inline_stack_2725.fallback),\n                  (mode = workInProgress.mode),\n                  (JSCompiler_object_inline_stack_2725 =\n                    mountWorkInProgressOffscreenFiber(\n                      {\n                        mode: \"visible\",\n                        children: JSCompiler_object_inline_stack_2725.children\n                      },\n                      mode\n                    )),\n                  (nextPrimaryChildren = createFiberFromFragment(\n                    nextPrimaryChildren,\n                    mode,\n                    renderLanes,\n                    null\n                  )),\n                  (nextPrimaryChildren.flags |= 2),\n                  (JSCompiler_object_inline_stack_2725.return = workInProgress),\n                  (nextPrimaryChildren.return = workInProgress),\n                  (JSCompiler_object_inline_stack_2725.sibling =\n                    nextPrimaryChildren),\n                  (workInProgress.child = JSCompiler_object_inline_stack_2725),\n                  reconcileChildFibers(\n                    workInProgress,\n                    current.child,\n                    null,\n                    renderLanes\n                  ),\n                  (JSCompiler_object_inline_stack_2725 = workInProgress.child),\n                  (JSCompiler_object_inline_stack_2725.memoizedState =\n                    mountSuspenseOffscreenState(renderLanes)),\n                  (JSCompiler_object_inline_stack_2725.childLanes =\n                    getRemainingWorkInPrimaryTree(\n                      current,\n                      JSCompiler_object_inline_digest_2724,\n                      renderLanes\n                    )),\n                  (workInProgress.memoizedState = SUSPENDED_MARKER),\n                  (workInProgress = bailoutOffscreenComponent(\n                    null,\n                    JSCompiler_object_inline_stack_2725\n                  )));\n          else if (\n            (pushPrimaryTreeSuspenseHandler(workInProgress),\n            warnIfHydrating(),\n            0 !== (renderLanes & 536870912) &&\n              markRenderDerivedCause(workInProgress),\n            isSuspenseInstanceFallback(\n              JSCompiler_object_inline_componentStack_2726\n            ))\n          ) {\n            JSCompiler_object_inline_digest_2724 =\n              JSCompiler_object_inline_componentStack_2726.nextSibling &&\n              JSCompiler_object_inline_componentStack_2726.nextSibling.dataset;\n            if (JSCompiler_object_inline_digest_2724) {\n              nextPrimaryChildren = JSCompiler_object_inline_digest_2724.dgst;\n              var message = JSCompiler_object_inline_digest_2724.msg;\n              mode = JSCompiler_object_inline_digest_2724.stck;\n              var componentStack = JSCompiler_object_inline_digest_2724.cstck;\n            }\n            JSCompiler_object_inline_message_2723 = message;\n            JSCompiler_object_inline_digest_2724 = nextPrimaryChildren;\n            JSCompiler_object_inline_stack_2725 = mode;\n            JSCompiler_object_inline_componentStack_2726 = componentStack;\n            nextPrimaryChildren = JSCompiler_object_inline_message_2723;\n            mode = JSCompiler_object_inline_componentStack_2726;\n            nextPrimaryChildren = nextPrimaryChildren\n              ? Error(nextPrimaryChildren)\n              : Error(\n                  \"The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering.\"\n                );\n            nextPrimaryChildren.stack =\n              JSCompiler_object_inline_stack_2725 || \"\";\n            nextPrimaryChildren.digest = JSCompiler_object_inline_digest_2724;\n            JSCompiler_object_inline_digest_2724 =\n              void 0 === mode ? null : mode;\n            JSCompiler_object_inline_stack_2725 = {\n              value: nextPrimaryChildren,\n              source: null,\n              stack: JSCompiler_object_inline_digest_2724\n            };\n            \"string\" === typeof JSCompiler_object_inline_digest_2724 &&\n              CapturedStacks.set(\n                nextPrimaryChildren,\n                JSCompiler_object_inline_stack_2725\n              );\n            queueHydrationError(JSCompiler_object_inline_stack_2725);\n            workInProgress = retrySuspenseComponentWithoutHydrating(\n              current,\n              workInProgress,\n              renderLanes\n            );\n          } else if (\n            (didReceiveUpdate ||\n              propagateParentContextChanges(\n                current,\n                workInProgress,\n                renderLanes,\n                !1\n              ),\n            (JSCompiler_object_inline_digest_2724 =\n              0 !== (renderLanes & current.childLanes)),\n            didReceiveUpdate || JSCompiler_object_inline_digest_2724)\n          ) {\n            JSCompiler_object_inline_digest_2724 = workInProgressRoot;\n            if (\n              null !== JSCompiler_object_inline_digest_2724 &&\n              ((JSCompiler_object_inline_stack_2725 = getBumpedLaneForHydration(\n                JSCompiler_object_inline_digest_2724,\n                renderLanes\n              )),\n              0 !== JSCompiler_object_inline_stack_2725 &&\n                JSCompiler_object_inline_stack_2725 !== prevState.retryLane)\n            )\n              throw (\n                ((prevState.retryLane = JSCompiler_object_inline_stack_2725),\n                enqueueConcurrentRenderForLane(\n                  current,\n                  JSCompiler_object_inline_stack_2725\n                ),\n                scheduleUpdateOnFiber(\n                  JSCompiler_object_inline_digest_2724,\n                  current,\n                  JSCompiler_object_inline_stack_2725\n                ),\n                SelectiveHydrationException)\n              );\n            isSuspenseInstancePending(\n              JSCompiler_object_inline_componentStack_2726\n            ) || renderDidSuspendDelayIfPossible();\n            workInProgress = retrySuspenseComponentWithoutHydrating(\n              current,\n              workInProgress,\n              renderLanes\n            );\n          } else\n            isSuspenseInstancePending(\n              JSCompiler_object_inline_componentStack_2726\n            )\n              ? ((workInProgress.flags |= 192),\n                (workInProgress.child = current.child),\n                (workInProgress = null))\n              : ((current = prevState.treeContext),\n                (nextHydratableInstance = getNextHydratable(\n                  JSCompiler_object_inline_componentStack_2726.nextSibling\n                )),\n                (hydrationParentFiber = workInProgress),\n                (isHydrating = !0),\n                (hydrationErrors = null),\n                (didSuspendOrErrorDEV = !1),\n                (hydrationDiffRootDEV = null),\n                (rootOrSingletonContext = !1),\n                null !== current &&\n                  restoreSuspendedTreeContext(workInProgress, current),\n                (workInProgress = mountSuspensePrimaryChildren(\n                  workInProgress,\n                  JSCompiler_object_inline_stack_2725.children\n                )),\n                (workInProgress.flags |= 4096));\n          return workInProgress;\n        }\n      }\n      if (JSCompiler_object_inline_message_2723)\n        return (\n          reuseSuspenseHandlerOnStack(workInProgress),\n          (nextPrimaryChildren = JSCompiler_object_inline_stack_2725.fallback),\n          (mode = workInProgress.mode),\n          (componentStack = current.child),\n          (JSCompiler_object_inline_componentStack_2726 =\n            componentStack.sibling),\n          (JSCompiler_object_inline_stack_2725 = createWorkInProgress(\n            componentStack,\n            {\n              mode: \"hidden\",\n              children: JSCompiler_object_inline_stack_2725.children\n            }\n          )),\n          (JSCompiler_object_inline_stack_2725.subtreeFlags =\n            componentStack.subtreeFlags & 65011712),\n          null !== JSCompiler_object_inline_componentStack_2726\n            ? (nextPrimaryChildren = createWorkInProgress(\n                JSCompiler_object_inline_componentStack_2726,\n                nextPrimaryChildren\n              ))\n            : ((nextPrimaryChildren = createFiberFromFragment(\n                nextPrimaryChildren,\n                mode,\n                renderLanes,\n                null\n              )),\n              (nextPrimaryChildren.flags |= 2)),\n          (nextPrimaryChildren.return = workInProgress),\n          (JSCompiler_object_inline_stack_2725.return = workInProgress),\n          (JSCompiler_object_inline_stack_2725.sibling = nextPrimaryChildren),\n          (workInProgress.child = JSCompiler_object_inline_stack_2725),\n          bailoutOffscreenComponent(null, JSCompiler_object_inline_stack_2725),\n          (JSCompiler_object_inline_stack_2725 = workInProgress.child),\n          (nextPrimaryChildren = current.child.memoizedState),\n          null === nextPrimaryChildren\n            ? (nextPrimaryChildren = mountSuspenseOffscreenState(renderLanes))\n            : ((mode = nextPrimaryChildren.cachePool),\n              null !== mode\n                ? ((componentStack = CacheContext._currentValue),\n                  (mode =\n                    mode.parent !== componentStack\n                      ? { parent: componentStack, pool: componentStack }\n                      : mode))\n                : (mode = getSuspendedCache()),\n              (nextPrimaryChildren = {\n                baseLanes: nextPrimaryChildren.baseLanes | renderLanes,\n                cachePool: mode\n              })),\n          (JSCompiler_object_inline_stack_2725.memoizedState =\n            nextPrimaryChildren),\n          (JSCompiler_object_inline_stack_2725.childLanes =\n            getRemainingWorkInPrimaryTree(\n              current,\n              JSCompiler_object_inline_digest_2724,\n              renderLanes\n            )),\n          (workInProgress.memoizedState = SUSPENDED_MARKER),\n          bailoutOffscreenComponent(\n            current.child,\n            JSCompiler_object_inline_stack_2725\n          )\n        );\n      null !== prevState &&\n        (renderLanes & 62914560) === renderLanes &&\n        0 !== (renderLanes & current.lanes) &&\n        markRenderDerivedCause(workInProgress);\n      pushPrimaryTreeSuspenseHandler(workInProgress);\n      renderLanes = current.child;\n      current = renderLanes.sibling;\n      renderLanes = createWorkInProgress(renderLanes, {\n        mode: \"visible\",\n        children: JSCompiler_object_inline_stack_2725.children\n      });\n      renderLanes.return = workInProgress;\n      renderLanes.sibling = null;\n      null !== current &&\n        ((JSCompiler_object_inline_digest_2724 = workInProgress.deletions),\n        null === JSCompiler_object_inline_digest_2724\n          ? ((workInProgress.deletions = [current]),\n            (workInProgress.flags |= 16))\n          : JSCompiler_object_inline_digest_2724.push(current));\n      workInProgress.child = renderLanes;\n      workInProgress.memoizedState = null;\n      return renderLanes;\n    }\n    function mountSuspensePrimaryChildren(workInProgress, primaryChildren) {\n      primaryChildren = mountWorkInProgressOffscreenFiber(\n        { mode: \"visible\", children: primaryChildren },\n        workInProgress.mode\n      );\n      primaryChildren.return = workInProgress;\n      return (workInProgress.child = primaryChildren);\n    }\n    function mountWorkInProgressOffscreenFiber(offscreenProps, mode) {\n      offscreenProps = createFiber(22, offscreenProps, null, mode);\n      offscreenProps.lanes = 0;\n      return offscreenProps;\n    }\n    function retrySuspenseComponentWithoutHydrating(\n      current,\n      workInProgress,\n      renderLanes\n    ) {\n      reconcileChildFibers(workInProgress, current.child, null, renderLanes);\n      current = mountSuspensePrimaryChildren(\n        workInProgress,\n        workInProgress.pendingProps.children\n      );\n      current.flags |= 2;\n      workInProgress.memoizedState = null;\n      return current;\n    }\n    function scheduleSuspenseWorkOnFiber(fiber, renderLanes, propagationRoot) {\n      fiber.lanes |= renderLanes;\n      var alternate = fiber.alternate;\n      null !== alternate && (alternate.lanes |= renderLanes);\n      scheduleContextWorkOnParentPath(\n        fiber.return,\n        renderLanes,\n        propagationRoot\n      );\n    }\n    function initSuspenseListRenderState(\n      workInProgress,\n      isBackwards,\n      tail,\n      lastContentRow,\n      tailMode,\n      treeForkCount\n    ) {\n      var renderState = workInProgress.memoizedState;\n      null === renderState\n        ? (workInProgress.memoizedState = {\n            isBackwards: isBackwards,\n            rendering: null,\n            renderingStartTime: 0,\n            last: lastContentRow,\n            tail: tail,\n            tailMode: tailMode,\n            treeForkCount: treeForkCount\n          })\n        : ((renderState.isBackwards = isBackwards),\n          (renderState.rendering = null),\n          (renderState.renderingStartTime = 0),\n          (renderState.last = lastContentRow),\n          (renderState.tail = tail),\n          (renderState.tailMode = tailMode),\n          (renderState.treeForkCount = treeForkCount));\n    }\n    function updateSuspenseListComponent(current, workInProgress, renderLanes) {\n      var nextProps = workInProgress.pendingProps,\n        revealOrder = nextProps.revealOrder,\n        tailMode = nextProps.tail,\n        newChildren = nextProps.children,\n        suspenseContext = suspenseStackCursor.current;\n      (nextProps = 0 !== (suspenseContext & ForceSuspenseFallback))\n        ? ((suspenseContext =\n            (suspenseContext & SubtreeSuspenseContextMask) |\n            ForceSuspenseFallback),\n          (workInProgress.flags |= 128))\n        : (suspenseContext &= SubtreeSuspenseContextMask);\n      push(suspenseStackCursor, suspenseContext, workInProgress);\n      suspenseContext = null == revealOrder ? \"null\" : revealOrder;\n      if (\n        \"forwards\" !== revealOrder &&\n        \"unstable_legacy-backwards\" !== revealOrder &&\n        \"together\" !== revealOrder &&\n        \"independent\" !== revealOrder &&\n        !didWarnAboutRevealOrder[suspenseContext]\n      )\n        if (\n          ((didWarnAboutRevealOrder[suspenseContext] = !0), null == revealOrder)\n        )\n          console.error(\n            'The default for the <SuspenseList revealOrder=\"...\"> prop is changing. To be future compatible you must explictly specify either \"independent\" (the current default), \"together\", \"forwards\" or \"legacy_unstable-backwards\".'\n          );\n        else if (\"backwards\" === revealOrder)\n          console.error(\n            'The rendering order of <SuspenseList revealOrder=\"backwards\"> is changing. To be future compatible you must specify revealOrder=\"legacy_unstable-backwards\" instead.'\n          );\n        else if (\"string\" === typeof revealOrder)\n          switch (revealOrder.toLowerCase()) {\n            case \"together\":\n            case \"forwards\":\n            case \"backwards\":\n            case \"independent\":\n              console.error(\n                '\"%s\" is not a valid value for revealOrder on <SuspenseList />. Use lowercase \"%s\" instead.',\n                revealOrder,\n                revealOrder.toLowerCase()\n              );\n              break;\n            case \"forward\":\n            case \"backward\":\n              console.error(\n                '\"%s\" is not a valid value for revealOrder on <SuspenseList />. React uses the -s suffix in the spelling. Use \"%ss\" instead.',\n                revealOrder,\n                revealOrder.toLowerCase()\n              );\n              break;\n            default:\n              console.error(\n                '\"%s\" is not a supported revealOrder on <SuspenseList />. Did you mean \"independent\", \"together\", \"forwards\" or \"backwards\"?',\n                revealOrder\n              );\n          }\n        else\n          console.error(\n            '%s is not a supported value for revealOrder on <SuspenseList />. Did you mean \"independent\", \"together\", \"forwards\" or \"backwards\"?',\n            revealOrder\n          );\n      suspenseContext = null == tailMode ? \"null\" : tailMode;\n      if (!didWarnAboutTailOptions[suspenseContext])\n        if (null == tailMode) {\n          if (\n            \"forwards\" === revealOrder ||\n            \"backwards\" === revealOrder ||\n            \"unstable_legacy-backwards\" === revealOrder\n          )\n            (didWarnAboutTailOptions[suspenseContext] = !0),\n              console.error(\n                'The default for the <SuspenseList tail=\"...\"> prop is changing. To be future compatible you must explictly specify either \"visible\" (the current default), \"collapsed\" or \"hidden\".'\n              );\n        } else\n          \"visible\" !== tailMode &&\n          \"collapsed\" !== tailMode &&\n          \"hidden\" !== tailMode\n            ? ((didWarnAboutTailOptions[suspenseContext] = !0),\n              console.error(\n                '\"%s\" is not a supported value for tail on <SuspenseList />. Did you mean \"visible\", \"collapsed\" or \"hidden\"?',\n                tailMode\n              ))\n            : \"forwards\" !== revealOrder &&\n              \"backwards\" !== revealOrder &&\n              \"unstable_legacy-backwards\" !== revealOrder &&\n              ((didWarnAboutTailOptions[suspenseContext] = !0),\n              console.error(\n                '<SuspenseList tail=\"%s\" /> is only valid if revealOrder is \"forwards\" or \"backwards\". Did you mean to specify revealOrder=\"forwards\"?',\n                tailMode\n              ));\n      a: if (\n        (\"forwards\" === revealOrder ||\n          \"backwards\" === revealOrder ||\n          \"unstable_legacy-backwards\" === revealOrder) &&\n        void 0 !== newChildren &&\n        null !== newChildren &&\n        !1 !== newChildren\n      )\n        if (isArrayImpl(newChildren))\n          for (\n            suspenseContext = 0;\n            suspenseContext < newChildren.length;\n            suspenseContext++\n          ) {\n            if (\n              !validateSuspenseListNestedChild(\n                newChildren[suspenseContext],\n                suspenseContext\n              )\n            )\n              break a;\n          }\n        else if (\n          ((suspenseContext = getIteratorFn(newChildren)),\n          \"function\" === typeof suspenseContext)\n        ) {\n          if ((suspenseContext = suspenseContext.call(newChildren)))\n            for (\n              var step = suspenseContext.next(), _i = 0;\n              !step.done;\n              step = suspenseContext.next()\n            ) {\n              if (!validateSuspenseListNestedChild(step.value, _i)) break a;\n              _i++;\n            }\n        } else\n          console.error(\n            'A single row was passed to a <SuspenseList revealOrder=\"%s\" />. This is not useful since it needs multiple rows. Did you mean to pass multiple children or an array?',\n            revealOrder\n          );\n      reconcileChildren(current, workInProgress, newChildren, renderLanes);\n      isHydrating\n        ? (warnIfNotHydrating(), (newChildren = treeForkCount))\n        : (newChildren = 0);\n      if (!nextProps && null !== current && 0 !== (current.flags & 128))\n        a: for (current = workInProgress.child; null !== current; ) {\n          if (13 === current.tag)\n            null !== current.memoizedState &&\n              scheduleSuspenseWorkOnFiber(current, renderLanes, workInProgress);\n          else if (19 === current.tag)\n            scheduleSuspenseWorkOnFiber(current, renderLanes, workInProgress);\n          else if (null !== current.child) {\n            current.child.return = current;\n            current = current.child;\n            continue;\n          }\n          if (current === workInProgress) break a;\n          for (; null === current.sibling; ) {\n            if (null === current.return || current.return === workInProgress)\n              break a;\n            current = current.return;\n          }\n          current.sibling.return = current.return;\n          current = current.sibling;\n        }\n      switch (revealOrder) {\n        case \"forwards\":\n          renderLanes = workInProgress.child;\n          for (revealOrder = null; null !== renderLanes; )\n            (current = renderLanes.alternate),\n              null !== current &&\n                null === findFirstSuspended(current) &&\n                (revealOrder = renderLanes),\n              (renderLanes = renderLanes.sibling);\n          renderLanes = revealOrder;\n          null === renderLanes\n            ? ((revealOrder = workInProgress.child),\n              (workInProgress.child = null))\n            : ((revealOrder = renderLanes.sibling),\n              (renderLanes.sibling = null));\n          initSuspenseListRenderState(\n            workInProgress,\n            !1,\n            revealOrder,\n            renderLanes,\n            tailMode,\n            newChildren\n          );\n          break;\n        case \"backwards\":\n        case \"unstable_legacy-backwards\":\n          renderLanes = null;\n          revealOrder = workInProgress.child;\n          for (workInProgress.child = null; null !== revealOrder; ) {\n            current = revealOrder.alternate;\n            if (null !== current && null === findFirstSuspended(current)) {\n              workInProgress.child = revealOrder;\n              break;\n            }\n            current = revealOrder.sibling;\n            revealOrder.sibling = renderLanes;\n            renderLanes = revealOrder;\n            revealOrder = current;\n          }\n          initSuspenseListRenderState(\n            workInProgress,\n            !0,\n            renderLanes,\n            null,\n            tailMode,\n            newChildren\n          );\n          break;\n        case \"together\":\n          initSuspenseListRenderState(\n            workInProgress,\n            !1,\n            null,\n            null,\n            void 0,\n            newChildren\n          );\n          break;\n        default:\n          workInProgress.memoizedState = null;\n      }\n      return workInProgress.child;\n    }\n    function bailoutOnAlreadyFinishedWork(\n      current,\n      workInProgress,\n      renderLanes\n    ) {\n      null !== current && (workInProgress.dependencies = current.dependencies);\n      profilerStartTime = -1;\n      workInProgressRootSkippedLanes |= workInProgress.lanes;\n      if (0 === (renderLanes & workInProgress.childLanes))\n        if (null !== current) {\n          if (\n            (propagateParentContextChanges(\n              current,\n              workInProgress,\n              renderLanes,\n              !1\n            ),\n            0 === (renderLanes & workInProgress.childLanes))\n          )\n            return null;\n        } else return null;\n      if (null !== current && workInProgress.child !== current.child)\n        throw Error(\"Resuming work not yet implemented.\");\n      if (null !== workInProgress.child) {\n        current = workInProgress.child;\n        renderLanes = createWorkInProgress(current, current.pendingProps);\n        workInProgress.child = renderLanes;\n        for (renderLanes.return = workInProgress; null !== current.sibling; )\n          (current = current.sibling),\n            (renderLanes = renderLanes.sibling =\n              createWorkInProgress(current, current.pendingProps)),\n            (renderLanes.return = workInProgress);\n        renderLanes.sibling = null;\n      }\n      return workInProgress.child;\n    }\n    function checkScheduledUpdateOrContext(current, renderLanes) {\n      if (0 !== (current.lanes & renderLanes)) return !0;\n      current = current.dependencies;\n      return null !== current && checkIfContextChanged(current) ? !0 : !1;\n    }\n    function attemptEarlyBailoutIfNoScheduledUpdate(\n      current,\n      workInProgress,\n      renderLanes\n    ) {\n      switch (workInProgress.tag) {\n        case 3:\n          pushHostContainer(\n            workInProgress,\n            workInProgress.stateNode.containerInfo\n          );\n          pushProvider(\n            workInProgress,\n            CacheContext,\n            current.memoizedState.cache\n          );\n          resetHydrationState();\n          break;\n        case 27:\n        case 5:\n          pushHostContext(workInProgress);\n          break;\n        case 4:\n          pushHostContainer(\n            workInProgress,\n            workInProgress.stateNode.containerInfo\n          );\n          break;\n        case 10:\n          pushProvider(\n            workInProgress,\n            workInProgress.type,\n            workInProgress.memoizedProps.value\n          );\n          break;\n        case 12:\n          0 !== (renderLanes & workInProgress.childLanes) &&\n            (workInProgress.flags |= 4);\n          workInProgress.flags |= 2048;\n          var stateNode = workInProgress.stateNode;\n          stateNode.effectDuration = -0;\n          stateNode.passiveEffectDuration = -0;\n          break;\n        case 31:\n          if (null !== workInProgress.memoizedState)\n            return (\n              (workInProgress.flags |= 128),\n              pushDehydratedActivitySuspenseHandler(workInProgress),\n              null\n            );\n          break;\n        case 13:\n          stateNode = workInProgress.memoizedState;\n          if (null !== stateNode) {\n            if (null !== stateNode.dehydrated)\n              return (\n                pushPrimaryTreeSuspenseHandler(workInProgress),\n                (workInProgress.flags |= 128),\n                null\n              );\n            if (0 !== (renderLanes & workInProgress.child.childLanes))\n              return updateSuspenseComponent(\n                current,\n                workInProgress,\n                renderLanes\n              );\n            pushPrimaryTreeSuspenseHandler(workInProgress);\n            current = bailoutOnAlreadyFinishedWork(\n              current,\n              workInProgress,\n              renderLanes\n            );\n            return null !== current ? current.sibling : null;\n          }\n          pushPrimaryTreeSuspenseHandler(workInProgress);\n          break;\n        case 19:\n          var didSuspendBefore = 0 !== (current.flags & 128);\n          stateNode = 0 !== (renderLanes & workInProgress.childLanes);\n          stateNode ||\n            (propagateParentContextChanges(\n              current,\n              workInProgress,\n              renderLanes,\n              !1\n            ),\n            (stateNode = 0 !== (renderLanes & workInProgress.childLanes)));\n          if (didSuspendBefore) {\n            if (stateNode)\n              return updateSuspenseListComponent(\n                current,\n                workInProgress,\n                renderLanes\n              );\n            workInProgress.flags |= 128;\n          }\n          didSuspendBefore = workInProgress.memoizedState;\n          null !== didSuspendBefore &&\n            ((didSuspendBefore.rendering = null),\n            (didSuspendBefore.tail = null),\n            (didSuspendBefore.lastEffect = null));\n          push(\n            suspenseStackCursor,\n            suspenseStackCursor.current,\n            workInProgress\n          );\n          if (stateNode) break;\n          else return null;\n        case 22:\n          return (\n            (workInProgress.lanes = 0),\n            updateOffscreenComponent(\n              current,\n              workInProgress,\n              renderLanes,\n              workInProgress.pendingProps\n            )\n          );\n        case 24:\n          pushProvider(\n            workInProgress,\n            CacheContext,\n            current.memoizedState.cache\n          );\n      }\n      return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n    }\n    function beginWork(current, workInProgress, renderLanes) {\n      if (workInProgress._debugNeedsRemount && null !== current) {\n        renderLanes = createFiberFromTypeAndProps(\n          workInProgress.type,\n          workInProgress.key,\n          workInProgress.pendingProps,\n          workInProgress._debugOwner || null,\n          workInProgress.mode,\n          workInProgress.lanes\n        );\n        renderLanes._debugStack = workInProgress._debugStack;\n        renderLanes._debugTask = workInProgress._debugTask;\n        var returnFiber = workInProgress.return;\n        if (null === returnFiber) throw Error(\"Cannot swap the root fiber.\");\n        current.alternate = null;\n        workInProgress.alternate = null;\n        renderLanes.index = workInProgress.index;\n        renderLanes.sibling = workInProgress.sibling;\n        renderLanes.return = workInProgress.return;\n        renderLanes.ref = workInProgress.ref;\n        renderLanes._debugInfo = workInProgress._debugInfo;\n        if (workInProgress === returnFiber.child)\n          returnFiber.child = renderLanes;\n        else {\n          var prevSibling = returnFiber.child;\n          if (null === prevSibling)\n            throw Error(\"Expected parent to have a child.\");\n          for (; prevSibling.sibling !== workInProgress; )\n            if (((prevSibling = prevSibling.sibling), null === prevSibling))\n              throw Error(\"Expected to find the previous sibling.\");\n          prevSibling.sibling = renderLanes;\n        }\n        workInProgress = returnFiber.deletions;\n        null === workInProgress\n          ? ((returnFiber.deletions = [current]), (returnFiber.flags |= 16))\n          : workInProgress.push(current);\n        renderLanes.flags |= 2;\n        return renderLanes;\n      }\n      if (null !== current)\n        if (\n          current.memoizedProps !== workInProgress.pendingProps ||\n          workInProgress.type !== current.type\n        )\n          didReceiveUpdate = !0;\n        else {\n          if (\n            !checkScheduledUpdateOrContext(current, renderLanes) &&\n            0 === (workInProgress.flags & 128)\n          )\n            return (\n              (didReceiveUpdate = !1),\n              attemptEarlyBailoutIfNoScheduledUpdate(\n                current,\n                workInProgress,\n                renderLanes\n              )\n            );\n          didReceiveUpdate = 0 !== (current.flags & 131072) ? !0 : !1;\n        }\n      else {\n        didReceiveUpdate = !1;\n        if ((returnFiber = isHydrating))\n          warnIfNotHydrating(),\n            (returnFiber = 0 !== (workInProgress.flags & 1048576));\n        returnFiber &&\n          ((returnFiber = workInProgress.index),\n          warnIfNotHydrating(),\n          pushTreeId(workInProgress, treeForkCount, returnFiber));\n      }\n      workInProgress.lanes = 0;\n      switch (workInProgress.tag) {\n        case 16:\n          a: if (\n            ((returnFiber = workInProgress.pendingProps),\n            (current = resolveLazy(workInProgress.elementType)),\n            (workInProgress.type = current),\n            \"function\" === typeof current)\n          )\n            shouldConstruct(current)\n              ? ((returnFiber = resolveClassComponentProps(\n                  current,\n                  returnFiber\n                )),\n                (workInProgress.tag = 1),\n                (workInProgress.type = current =\n                  resolveFunctionForHotReloading(current)),\n                (workInProgress = updateClassComponent(\n                  null,\n                  workInProgress,\n                  current,\n                  returnFiber,\n                  renderLanes\n                )))\n              : ((workInProgress.tag = 0),\n                validateFunctionComponentInDev(workInProgress, current),\n                (workInProgress.type = current =\n                  resolveFunctionForHotReloading(current)),\n                (workInProgress = updateFunctionComponent(\n                  null,\n                  workInProgress,\n                  current,\n                  returnFiber,\n                  renderLanes\n                )));\n          else {\n            if (void 0 !== current && null !== current)\n              if (\n                ((prevSibling = current.$$typeof),\n                prevSibling === REACT_FORWARD_REF_TYPE)\n              ) {\n                workInProgress.tag = 11;\n                workInProgress.type = current =\n                  resolveForwardRefForHotReloading(current);\n                workInProgress = updateForwardRef(\n                  null,\n                  workInProgress,\n                  current,\n                  returnFiber,\n                  renderLanes\n                );\n                break a;\n              } else if (prevSibling === REACT_MEMO_TYPE) {\n                workInProgress.tag = 14;\n                workInProgress = updateMemoComponent(\n                  null,\n                  workInProgress,\n                  current,\n                  returnFiber,\n                  renderLanes\n                );\n                break a;\n              }\n            workInProgress = \"\";\n            null !== current &&\n              \"object\" === typeof current &&\n              current.$$typeof === REACT_LAZY_TYPE &&\n              (workInProgress =\n                \" Did you wrap a component in React.lazy() more than once?\");\n            renderLanes = getComponentNameFromType(current) || current;\n            throw Error(\n              \"Element type is invalid. Received a promise that resolves to: \" +\n                renderLanes +\n                \". Lazy element type must resolve to a class or function.\" +\n                workInProgress\n            );\n          }\n          return workInProgress;\n        case 0:\n          return updateFunctionComponent(\n            current,\n            workInProgress,\n            workInProgress.type,\n            workInProgress.pendingProps,\n            renderLanes\n          );\n        case 1:\n          return (\n            (returnFiber = workInProgress.type),\n            (prevSibling = resolveClassComponentProps(\n              returnFiber,\n              workInProgress.pendingProps\n            )),\n            updateClassComponent(\n              current,\n              workInProgress,\n              returnFiber,\n              prevSibling,\n              renderLanes\n            )\n          );\n        case 3:\n          a: {\n            pushHostContainer(\n              workInProgress,\n              workInProgress.stateNode.containerInfo\n            );\n            if (null === current)\n              throw Error(\n                \"Should have a current fiber. This is a bug in React.\"\n              );\n            returnFiber = workInProgress.pendingProps;\n            var prevState = workInProgress.memoizedState;\n            prevSibling = prevState.element;\n            cloneUpdateQueue(current, workInProgress);\n            processUpdateQueue(workInProgress, returnFiber, null, renderLanes);\n            var nextState = workInProgress.memoizedState;\n            returnFiber = nextState.cache;\n            pushProvider(workInProgress, CacheContext, returnFiber);\n            returnFiber !== prevState.cache &&\n              propagateContextChanges(\n                workInProgress,\n                [CacheContext],\n                renderLanes,\n                !0\n              );\n            suspendIfUpdateReadFromEntangledAsyncAction();\n            returnFiber = nextState.element;\n            if (prevState.isDehydrated)\n              if (\n                ((prevState = {\n                  element: returnFiber,\n                  isDehydrated: !1,\n                  cache: nextState.cache\n                }),\n                (workInProgress.updateQueue.baseState = prevState),\n                (workInProgress.memoizedState = prevState),\n                workInProgress.flags & 256)\n              ) {\n                workInProgress = mountHostRootWithoutHydrating(\n                  current,\n                  workInProgress,\n                  returnFiber,\n                  renderLanes\n                );\n                break a;\n              } else if (returnFiber !== prevSibling) {\n                prevSibling = createCapturedValueAtFiber(\n                  Error(\n                    \"This root received an early update, before anything was able hydrate. Switched the entire root to client rendering.\"\n                  ),\n                  workInProgress\n                );\n                queueHydrationError(prevSibling);\n                workInProgress = mountHostRootWithoutHydrating(\n                  current,\n                  workInProgress,\n                  returnFiber,\n                  renderLanes\n                );\n                break a;\n              } else {\n                current = workInProgress.stateNode.containerInfo;\n                switch (current.nodeType) {\n                  case 9:\n                    current = current.body;\n                    break;\n                  default:\n                    current =\n                      \"HTML\" === current.nodeName\n                        ? current.ownerDocument.body\n                        : current;\n                }\n                nextHydratableInstance = getNextHydratable(current.firstChild);\n                hydrationParentFiber = workInProgress;\n                isHydrating = !0;\n                hydrationErrors = null;\n                didSuspendOrErrorDEV = !1;\n                hydrationDiffRootDEV = null;\n                rootOrSingletonContext = !0;\n                renderLanes = mountChildFibers(\n                  workInProgress,\n                  null,\n                  returnFiber,\n                  renderLanes\n                );\n                for (workInProgress.child = renderLanes; renderLanes; )\n                  (renderLanes.flags = (renderLanes.flags & -3) | 4096),\n                    (renderLanes = renderLanes.sibling);\n              }\n            else {\n              resetHydrationState();\n              if (returnFiber === prevSibling) {\n                workInProgress = bailoutOnAlreadyFinishedWork(\n                  current,\n                  workInProgress,\n                  renderLanes\n                );\n                break a;\n              }\n              reconcileChildren(\n                current,\n                workInProgress,\n                returnFiber,\n                renderLanes\n              );\n            }\n            workInProgress = workInProgress.child;\n          }\n          return workInProgress;\n        case 26:\n          return (\n            markRef(current, workInProgress),\n            null === current\n              ? (renderLanes = getResource(\n                  workInProgress.type,\n                  null,\n                  workInProgress.pendingProps,\n                  null\n                ))\n                ? (workInProgress.memoizedState = renderLanes)\n                : isHydrating ||\n                  ((renderLanes = workInProgress.type),\n                  (current = workInProgress.pendingProps),\n                  (returnFiber = requiredContext(\n                    rootInstanceStackCursor.current\n                  )),\n                  (returnFiber =\n                    getOwnerDocumentFromRootContainer(\n                      returnFiber\n                    ).createElement(renderLanes)),\n                  (returnFiber[internalInstanceKey] = workInProgress),\n                  (returnFiber[internalPropsKey] = current),\n                  setInitialProperties(returnFiber, renderLanes, current),\n                  markNodeAsHoistable(returnFiber),\n                  (workInProgress.stateNode = returnFiber))\n              : (workInProgress.memoizedState = getResource(\n                  workInProgress.type,\n                  current.memoizedProps,\n                  workInProgress.pendingProps,\n                  current.memoizedState\n                )),\n            null\n          );\n        case 27:\n          return (\n            pushHostContext(workInProgress),\n            null === current &&\n              isHydrating &&\n              ((returnFiber = requiredContext(rootInstanceStackCursor.current)),\n              (prevSibling = getHostContext()),\n              (returnFiber = workInProgress.stateNode =\n                resolveSingletonInstance(\n                  workInProgress.type,\n                  workInProgress.pendingProps,\n                  returnFiber,\n                  prevSibling,\n                  !1\n                )),\n              didSuspendOrErrorDEV ||\n                ((prevSibling = diffHydratedProperties(\n                  returnFiber,\n                  workInProgress.type,\n                  workInProgress.pendingProps,\n                  prevSibling\n                )),\n                null !== prevSibling &&\n                  (buildHydrationDiffNode(workInProgress, 0).serverProps =\n                    prevSibling)),\n              (hydrationParentFiber = workInProgress),\n              (rootOrSingletonContext = !0),\n              (prevSibling = nextHydratableInstance),\n              isSingletonScope(workInProgress.type)\n                ? ((previousHydratableOnEnteringScopedSingleton = prevSibling),\n                  (nextHydratableInstance = getNextHydratable(\n                    returnFiber.firstChild\n                  )))\n                : (nextHydratableInstance = prevSibling)),\n            reconcileChildren(\n              current,\n              workInProgress,\n              workInProgress.pendingProps.children,\n              renderLanes\n            ),\n            markRef(current, workInProgress),\n            null === current && (workInProgress.flags |= 4194304),\n            workInProgress.child\n          );\n        case 5:\n          return (\n            null === current &&\n              isHydrating &&\n              ((prevState = getHostContext()),\n              (returnFiber = validateDOMNesting(\n                workInProgress.type,\n                prevState.ancestorInfo\n              )),\n              (prevSibling = nextHydratableInstance),\n              (nextState = !prevSibling) ||\n                ((nextState = canHydrateInstance(\n                  prevSibling,\n                  workInProgress.type,\n                  workInProgress.pendingProps,\n                  rootOrSingletonContext\n                )),\n                null !== nextState\n                  ? ((workInProgress.stateNode = nextState),\n                    didSuspendOrErrorDEV ||\n                      ((prevState = diffHydratedProperties(\n                        nextState,\n                        workInProgress.type,\n                        workInProgress.pendingProps,\n                        prevState\n                      )),\n                      null !== prevState &&\n                        (buildHydrationDiffNode(workInProgress, 0).serverProps =\n                          prevState)),\n                    (hydrationParentFiber = workInProgress),\n                    (nextHydratableInstance = getNextHydratable(\n                      nextState.firstChild\n                    )),\n                    (rootOrSingletonContext = !1),\n                    (prevState = !0))\n                  : (prevState = !1),\n                (nextState = !prevState)),\n              nextState &&\n                (returnFiber &&\n                  warnNonHydratedInstance(workInProgress, prevSibling),\n                throwOnHydrationMismatch(workInProgress))),\n            pushHostContext(workInProgress),\n            (prevSibling = workInProgress.type),\n            (prevState = workInProgress.pendingProps),\n            (nextState = null !== current ? current.memoizedProps : null),\n            (returnFiber = prevState.children),\n            shouldSetTextContent(prevSibling, prevState)\n              ? (returnFiber = null)\n              : null !== nextState &&\n                shouldSetTextContent(prevSibling, nextState) &&\n                (workInProgress.flags |= 32),\n            null !== workInProgress.memoizedState &&\n              ((prevSibling = renderWithHooks(\n                current,\n                workInProgress,\n                TransitionAwareHostComponent,\n                null,\n                null,\n                renderLanes\n              )),\n              (HostTransitionContext._currentValue = prevSibling)),\n            markRef(current, workInProgress),\n            reconcileChildren(\n              current,\n              workInProgress,\n              returnFiber,\n              renderLanes\n            ),\n            workInProgress.child\n          );\n        case 6:\n          return (\n            null === current &&\n              isHydrating &&\n              ((renderLanes = workInProgress.pendingProps),\n              (current = getHostContext()),\n              (returnFiber = current.ancestorInfo.current),\n              (renderLanes =\n                null != returnFiber\n                  ? validateTextNesting(\n                      renderLanes,\n                      returnFiber.tag,\n                      current.ancestorInfo.implicitRootScope\n                    )\n                  : !0),\n              (current = nextHydratableInstance),\n              (returnFiber = !current) ||\n                ((returnFiber = canHydrateTextInstance(\n                  current,\n                  workInProgress.pendingProps,\n                  rootOrSingletonContext\n                )),\n                null !== returnFiber\n                  ? ((workInProgress.stateNode = returnFiber),\n                    (hydrationParentFiber = workInProgress),\n                    (nextHydratableInstance = null),\n                    (returnFiber = !0))\n                  : (returnFiber = !1),\n                (returnFiber = !returnFiber)),\n              returnFiber &&\n                (renderLanes &&\n                  warnNonHydratedInstance(workInProgress, current),\n                throwOnHydrationMismatch(workInProgress))),\n            null\n          );\n        case 13:\n          return updateSuspenseComponent(current, workInProgress, renderLanes);\n        case 4:\n          return (\n            pushHostContainer(\n              workInProgress,\n              workInProgress.stateNode.containerInfo\n            ),\n            (returnFiber = workInProgress.pendingProps),\n            null === current\n              ? (workInProgress.child = reconcileChildFibers(\n                  workInProgress,\n                  null,\n                  returnFiber,\n                  renderLanes\n                ))\n              : reconcileChildren(\n                  current,\n                  workInProgress,\n                  returnFiber,\n                  renderLanes\n                ),\n            workInProgress.child\n          );\n        case 11:\n          return updateForwardRef(\n            current,\n            workInProgress,\n            workInProgress.type,\n            workInProgress.pendingProps,\n            renderLanes\n          );\n        case 7:\n          return (\n            reconcileChildren(\n              current,\n              workInProgress,\n              workInProgress.pendingProps,\n              renderLanes\n            ),\n            workInProgress.child\n          );\n        case 8:\n          return (\n            reconcileChildren(\n              current,\n              workInProgress,\n              workInProgress.pendingProps.children,\n              renderLanes\n            ),\n            workInProgress.child\n          );\n        case 12:\n          return (\n            (workInProgress.flags |= 4),\n            (workInProgress.flags |= 2048),\n            (returnFiber = workInProgress.stateNode),\n            (returnFiber.effectDuration = -0),\n            (returnFiber.passiveEffectDuration = -0),\n            reconcileChildren(\n              current,\n              workInProgress,\n              workInProgress.pendingProps.children,\n              renderLanes\n            ),\n            workInProgress.child\n          );\n        case 10:\n          return (\n            (returnFiber = workInProgress.type),\n            (prevSibling = workInProgress.pendingProps),\n            (prevState = prevSibling.value),\n            \"value\" in prevSibling ||\n              hasWarnedAboutUsingNoValuePropOnContextProvider ||\n              ((hasWarnedAboutUsingNoValuePropOnContextProvider = !0),\n              console.error(\n                \"The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?\"\n              )),\n            pushProvider(workInProgress, returnFiber, prevState),\n            reconcileChildren(\n              current,\n              workInProgress,\n              prevSibling.children,\n              renderLanes\n            ),\n            workInProgress.child\n          );\n        case 9:\n          return (\n            (prevSibling = workInProgress.type._context),\n            (returnFiber = workInProgress.pendingProps.children),\n            \"function\" !== typeof returnFiber &&\n              console.error(\n                \"A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it.\"\n              ),\n            prepareToReadContext(workInProgress),\n            (prevSibling = readContext(prevSibling)),\n            (returnFiber = callComponentInDEV(\n              returnFiber,\n              prevSibling,\n              void 0\n            )),\n            (workInProgress.flags |= 1),\n            reconcileChildren(\n              current,\n              workInProgress,\n              returnFiber,\n              renderLanes\n            ),\n            workInProgress.child\n          );\n        case 14:\n          return updateMemoComponent(\n            current,\n            workInProgress,\n            workInProgress.type,\n            workInProgress.pendingProps,\n            renderLanes\n          );\n        case 15:\n          return updateSimpleMemoComponent(\n            current,\n            workInProgress,\n            workInProgress.type,\n            workInProgress.pendingProps,\n            renderLanes\n          );\n        case 19:\n          return updateSuspenseListComponent(\n            current,\n            workInProgress,\n            renderLanes\n          );\n        case 31:\n          return updateActivityComponent(current, workInProgress, renderLanes);\n        case 22:\n          return updateOffscreenComponent(\n            current,\n            workInProgress,\n            renderLanes,\n            workInProgress.pendingProps\n          );\n        case 24:\n          return (\n            prepareToReadContext(workInProgress),\n            (returnFiber = readContext(CacheContext)),\n            null === current\n              ? ((prevSibling = peekCacheFromPool()),\n                null === prevSibling &&\n                  ((prevSibling = workInProgressRoot),\n                  (prevState = createCache()),\n                  (prevSibling.pooledCache = prevState),\n                  retainCache(prevState),\n                  null !== prevState &&\n                    (prevSibling.pooledCacheLanes |= renderLanes),\n                  (prevSibling = prevState)),\n                (workInProgress.memoizedState = {\n                  parent: returnFiber,\n                  cache: prevSibling\n                }),\n                initializeUpdateQueue(workInProgress),\n                pushProvider(workInProgress, CacheContext, prevSibling))\n              : (0 !== (current.lanes & renderLanes) &&\n                  (cloneUpdateQueue(current, workInProgress),\n                  processUpdateQueue(workInProgress, null, null, renderLanes),\n                  suspendIfUpdateReadFromEntangledAsyncAction()),\n                (prevSibling = current.memoizedState),\n                (prevState = workInProgress.memoizedState),\n                prevSibling.parent !== returnFiber\n                  ? ((prevSibling = {\n                      parent: returnFiber,\n                      cache: returnFiber\n                    }),\n                    (workInProgress.memoizedState = prevSibling),\n                    0 === workInProgress.lanes &&\n                      (workInProgress.memoizedState =\n                        workInProgress.updateQueue.baseState =\n                          prevSibling),\n                    pushProvider(workInProgress, CacheContext, returnFiber))\n                  : ((returnFiber = prevState.cache),\n                    pushProvider(workInProgress, CacheContext, returnFiber),\n                    returnFiber !== prevSibling.cache &&\n                      propagateContextChanges(\n                        workInProgress,\n                        [CacheContext],\n                        renderLanes,\n                        !0\n                      ))),\n            reconcileChildren(\n              current,\n              workInProgress,\n              workInProgress.pendingProps.children,\n              renderLanes\n            ),\n            workInProgress.child\n          );\n        case 29:\n          throw workInProgress.pendingProps;\n      }\n      throw Error(\n        \"Unknown unit of work tag (\" +\n          workInProgress.tag +\n          \"). This error is likely caused by a bug in React. Please file an issue.\"\n      );\n    }\n    function markUpdate(workInProgress) {\n      workInProgress.flags |= 4;\n    }\n    function preloadInstanceAndSuspendIfNeeded(\n      workInProgress,\n      type,\n      oldProps,\n      newProps,\n      renderLanes\n    ) {\n      if ((type = (workInProgress.mode & SuspenseyImagesMode) !== NoMode))\n        type = !1;\n      if (type) {\n        if (\n          ((workInProgress.flags |= 16777216),\n          (renderLanes & 335544128) === renderLanes)\n        )\n          if (workInProgress.stateNode.complete) workInProgress.flags |= 8192;\n          else if (shouldRemainOnPreviousScreen()) workInProgress.flags |= 8192;\n          else\n            throw (\n              ((suspendedThenable = noopSuspenseyCommitThenable),\n              SuspenseyCommitException)\n            );\n      } else workInProgress.flags &= -16777217;\n    }\n    function preloadResourceAndSuspendIfNeeded(workInProgress, resource) {\n      if (\n        \"stylesheet\" !== resource.type ||\n        (resource.state.loading & Inserted) !== NotLoaded\n      )\n        workInProgress.flags &= -16777217;\n      else if (((workInProgress.flags |= 16777216), !preloadResource(resource)))\n        if (shouldRemainOnPreviousScreen()) workInProgress.flags |= 8192;\n        else\n          throw (\n            ((suspendedThenable = noopSuspenseyCommitThenable),\n            SuspenseyCommitException)\n          );\n    }\n    function scheduleRetryEffect(workInProgress, retryQueue) {\n      null !== retryQueue && (workInProgress.flags |= 4);\n      workInProgress.flags & 16384 &&\n        ((retryQueue =\n          22 !== workInProgress.tag ? claimNextRetryLane() : 536870912),\n        (workInProgress.lanes |= retryQueue),\n        (workInProgressSuspendedRetryLanes |= retryQueue));\n    }\n    function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {\n      if (!isHydrating)\n        switch (renderState.tailMode) {\n          case \"hidden\":\n            hasRenderedATailFallback = renderState.tail;\n            for (var lastTailNode = null; null !== hasRenderedATailFallback; )\n              null !== hasRenderedATailFallback.alternate &&\n                (lastTailNode = hasRenderedATailFallback),\n                (hasRenderedATailFallback = hasRenderedATailFallback.sibling);\n            null === lastTailNode\n              ? (renderState.tail = null)\n              : (lastTailNode.sibling = null);\n            break;\n          case \"collapsed\":\n            lastTailNode = renderState.tail;\n            for (var _lastTailNode = null; null !== lastTailNode; )\n              null !== lastTailNode.alternate && (_lastTailNode = lastTailNode),\n                (lastTailNode = lastTailNode.sibling);\n            null === _lastTailNode\n              ? hasRenderedATailFallback || null === renderState.tail\n                ? (renderState.tail = null)\n                : (renderState.tail.sibling = null)\n              : (_lastTailNode.sibling = null);\n        }\n    }\n    function bubbleProperties(completedWork) {\n      var didBailout =\n          null !== completedWork.alternate &&\n          completedWork.alternate.child === completedWork.child,\n        newChildLanes = 0,\n        subtreeFlags = 0;\n      if (didBailout)\n        if ((completedWork.mode & ProfileMode) !== NoMode) {\n          for (\n            var _treeBaseDuration = completedWork.selfBaseDuration,\n              _child2 = completedWork.child;\n            null !== _child2;\n\n          )\n            (newChildLanes |= _child2.lanes | _child2.childLanes),\n              (subtreeFlags |= _child2.subtreeFlags & 65011712),\n              (subtreeFlags |= _child2.flags & 65011712),\n              (_treeBaseDuration += _child2.treeBaseDuration),\n              (_child2 = _child2.sibling);\n          completedWork.treeBaseDuration = _treeBaseDuration;\n        } else\n          for (\n            _treeBaseDuration = completedWork.child;\n            null !== _treeBaseDuration;\n\n          )\n            (newChildLanes |=\n              _treeBaseDuration.lanes | _treeBaseDuration.childLanes),\n              (subtreeFlags |= _treeBaseDuration.subtreeFlags & 65011712),\n              (subtreeFlags |= _treeBaseDuration.flags & 65011712),\n              (_treeBaseDuration.return = completedWork),\n              (_treeBaseDuration = _treeBaseDuration.sibling);\n      else if ((completedWork.mode & ProfileMode) !== NoMode) {\n        _treeBaseDuration = completedWork.actualDuration;\n        _child2 = completedWork.selfBaseDuration;\n        for (var child = completedWork.child; null !== child; )\n          (newChildLanes |= child.lanes | child.childLanes),\n            (subtreeFlags |= child.subtreeFlags),\n            (subtreeFlags |= child.flags),\n            (_treeBaseDuration += child.actualDuration),\n            (_child2 += child.treeBaseDuration),\n            (child = child.sibling);\n        completedWork.actualDuration = _treeBaseDuration;\n        completedWork.treeBaseDuration = _child2;\n      } else\n        for (\n          _treeBaseDuration = completedWork.child;\n          null !== _treeBaseDuration;\n\n        )\n          (newChildLanes |=\n            _treeBaseDuration.lanes | _treeBaseDuration.childLanes),\n            (subtreeFlags |= _treeBaseDuration.subtreeFlags),\n            (subtreeFlags |= _treeBaseDuration.flags),\n            (_treeBaseDuration.return = completedWork),\n            (_treeBaseDuration = _treeBaseDuration.sibling);\n      completedWork.subtreeFlags |= subtreeFlags;\n      completedWork.childLanes = newChildLanes;\n      return didBailout;\n    }\n    function completeWork(current, workInProgress, renderLanes) {\n      var newProps = workInProgress.pendingProps;\n      popTreeContext(workInProgress);\n      switch (workInProgress.tag) {\n        case 16:\n        case 15:\n        case 0:\n        case 11:\n        case 7:\n        case 8:\n        case 12:\n        case 9:\n        case 14:\n          return bubbleProperties(workInProgress), null;\n        case 1:\n          return bubbleProperties(workInProgress), null;\n        case 3:\n          renderLanes = workInProgress.stateNode;\n          newProps = null;\n          null !== current && (newProps = current.memoizedState.cache);\n          workInProgress.memoizedState.cache !== newProps &&\n            (workInProgress.flags |= 2048);\n          popProvider(CacheContext, workInProgress);\n          popHostContainer(workInProgress);\n          renderLanes.pendingContext &&\n            ((renderLanes.context = renderLanes.pendingContext),\n            (renderLanes.pendingContext = null));\n          if (null === current || null === current.child)\n            popHydrationState(workInProgress)\n              ? (emitPendingHydrationWarnings(), markUpdate(workInProgress))\n              : null === current ||\n                (current.memoizedState.isDehydrated &&\n                  0 === (workInProgress.flags & 256)) ||\n                ((workInProgress.flags |= 1024),\n                upgradeHydrationErrorsToRecoverable());\n          bubbleProperties(workInProgress);\n          return null;\n        case 26:\n          var type = workInProgress.type,\n            nextResource = workInProgress.memoizedState;\n          null === current\n            ? (markUpdate(workInProgress),\n              null !== nextResource\n                ? (bubbleProperties(workInProgress),\n                  preloadResourceAndSuspendIfNeeded(\n                    workInProgress,\n                    nextResource\n                  ))\n                : (bubbleProperties(workInProgress),\n                  preloadInstanceAndSuspendIfNeeded(\n                    workInProgress,\n                    type,\n                    null,\n                    newProps,\n                    renderLanes\n                  )))\n            : nextResource\n              ? nextResource !== current.memoizedState\n                ? (markUpdate(workInProgress),\n                  bubbleProperties(workInProgress),\n                  preloadResourceAndSuspendIfNeeded(\n                    workInProgress,\n                    nextResource\n                  ))\n                : (bubbleProperties(workInProgress),\n                  (workInProgress.flags &= -16777217))\n              : ((current = current.memoizedProps),\n                current !== newProps && markUpdate(workInProgress),\n                bubbleProperties(workInProgress),\n                preloadInstanceAndSuspendIfNeeded(\n                  workInProgress,\n                  type,\n                  current,\n                  newProps,\n                  renderLanes\n                ));\n          return null;\n        case 27:\n          popHostContext(workInProgress);\n          renderLanes = requiredContext(rootInstanceStackCursor.current);\n          type = workInProgress.type;\n          if (null !== current && null != workInProgress.stateNode)\n            current.memoizedProps !== newProps && markUpdate(workInProgress);\n          else {\n            if (!newProps) {\n              if (null === workInProgress.stateNode)\n                throw Error(\n                  \"We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.\"\n                );\n              bubbleProperties(workInProgress);\n              return null;\n            }\n            current = getHostContext();\n            popHydrationState(workInProgress)\n              ? prepareToHydrateHostInstance(workInProgress, current)\n              : ((current = resolveSingletonInstance(\n                  type,\n                  newProps,\n                  renderLanes,\n                  current,\n                  !0\n                )),\n                (workInProgress.stateNode = current),\n                markUpdate(workInProgress));\n          }\n          bubbleProperties(workInProgress);\n          return null;\n        case 5:\n          popHostContext(workInProgress);\n          type = workInProgress.type;\n          if (null !== current && null != workInProgress.stateNode)\n            current.memoizedProps !== newProps && markUpdate(workInProgress);\n          else {\n            if (!newProps) {\n              if (null === workInProgress.stateNode)\n                throw Error(\n                  \"We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.\"\n                );\n              bubbleProperties(workInProgress);\n              return null;\n            }\n            var _currentHostContext = getHostContext();\n            if (popHydrationState(workInProgress))\n              prepareToHydrateHostInstance(workInProgress, _currentHostContext);\n            else {\n              nextResource = requiredContext(rootInstanceStackCursor.current);\n              validateDOMNesting(type, _currentHostContext.ancestorInfo);\n              _currentHostContext = _currentHostContext.context;\n              nextResource = getOwnerDocumentFromRootContainer(nextResource);\n              switch (_currentHostContext) {\n                case HostContextNamespaceSvg:\n                  nextResource = nextResource.createElementNS(\n                    SVG_NAMESPACE,\n                    type\n                  );\n                  break;\n                case HostContextNamespaceMath:\n                  nextResource = nextResource.createElementNS(\n                    MATH_NAMESPACE,\n                    type\n                  );\n                  break;\n                default:\n                  switch (type) {\n                    case \"svg\":\n                      nextResource = nextResource.createElementNS(\n                        SVG_NAMESPACE,\n                        type\n                      );\n                      break;\n                    case \"math\":\n                      nextResource = nextResource.createElementNS(\n                        MATH_NAMESPACE,\n                        type\n                      );\n                      break;\n                    case \"script\":\n                      nextResource = nextResource.createElement(\"div\");\n                      nextResource.innerHTML = \"<script>\\x3c/script>\";\n                      nextResource = nextResource.removeChild(\n                        nextResource.firstChild\n                      );\n                      break;\n                    case \"select\":\n                      nextResource =\n                        \"string\" === typeof newProps.is\n                          ? nextResource.createElement(\"select\", {\n                              is: newProps.is\n                            })\n                          : nextResource.createElement(\"select\");\n                      newProps.multiple\n                        ? (nextResource.multiple = !0)\n                        : newProps.size && (nextResource.size = newProps.size);\n                      break;\n                    default:\n                      (nextResource =\n                        \"string\" === typeof newProps.is\n                          ? nextResource.createElement(type, {\n                              is: newProps.is\n                            })\n                          : nextResource.createElement(type)),\n                        -1 === type.indexOf(\"-\") &&\n                          (type !== type.toLowerCase() &&\n                            console.error(\n                              \"<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.\",\n                              type\n                            ),\n                          \"[object HTMLUnknownElement]\" !==\n                            Object.prototype.toString.call(nextResource) ||\n                            hasOwnProperty.call(warnedUnknownTags, type) ||\n                            ((warnedUnknownTags[type] = !0),\n                            console.error(\n                              \"The tag <%s> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.\",\n                              type\n                            )));\n                  }\n              }\n              nextResource[internalInstanceKey] = workInProgress;\n              nextResource[internalPropsKey] = newProps;\n              a: for (\n                _currentHostContext = workInProgress.child;\n                null !== _currentHostContext;\n\n              ) {\n                if (\n                  5 === _currentHostContext.tag ||\n                  6 === _currentHostContext.tag\n                )\n                  nextResource.appendChild(_currentHostContext.stateNode);\n                else if (\n                  4 !== _currentHostContext.tag &&\n                  27 !== _currentHostContext.tag &&\n                  null !== _currentHostContext.child\n                ) {\n                  _currentHostContext.child.return = _currentHostContext;\n                  _currentHostContext = _currentHostContext.child;\n                  continue;\n                }\n                if (_currentHostContext === workInProgress) break a;\n                for (; null === _currentHostContext.sibling; ) {\n                  if (\n                    null === _currentHostContext.return ||\n                    _currentHostContext.return === workInProgress\n                  )\n                    break a;\n                  _currentHostContext = _currentHostContext.return;\n                }\n                _currentHostContext.sibling.return = _currentHostContext.return;\n                _currentHostContext = _currentHostContext.sibling;\n              }\n              workInProgress.stateNode = nextResource;\n              a: switch (\n                (setInitialProperties(nextResource, type, newProps), type)\n              ) {\n                case \"button\":\n                case \"input\":\n                case \"select\":\n                case \"textarea\":\n                  newProps = !!newProps.autoFocus;\n                  break a;\n                case \"img\":\n                  newProps = !0;\n                  break a;\n                default:\n                  newProps = !1;\n              }\n              newProps && markUpdate(workInProgress);\n            }\n          }\n          bubbleProperties(workInProgress);\n          preloadInstanceAndSuspendIfNeeded(\n            workInProgress,\n            workInProgress.type,\n            null === current ? null : current.memoizedProps,\n            workInProgress.pendingProps,\n            renderLanes\n          );\n          return null;\n        case 6:\n          if (current && null != workInProgress.stateNode)\n            current.memoizedProps !== newProps && markUpdate(workInProgress);\n          else {\n            if (\n              \"string\" !== typeof newProps &&\n              null === workInProgress.stateNode\n            )\n              throw Error(\n                \"We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.\"\n              );\n            current = requiredContext(rootInstanceStackCursor.current);\n            renderLanes = getHostContext();\n            if (popHydrationState(workInProgress)) {\n              current = workInProgress.stateNode;\n              renderLanes = workInProgress.memoizedProps;\n              type = !didSuspendOrErrorDEV;\n              newProps = null;\n              nextResource = hydrationParentFiber;\n              if (null !== nextResource)\n                switch (nextResource.tag) {\n                  case 3:\n                    type &&\n                      ((type = diffHydratedTextForDevWarnings(\n                        current,\n                        renderLanes,\n                        newProps\n                      )),\n                      null !== type &&\n                        (buildHydrationDiffNode(workInProgress, 0).serverProps =\n                          type));\n                    break;\n                  case 27:\n                  case 5:\n                    (newProps = nextResource.memoizedProps),\n                      type &&\n                        ((type = diffHydratedTextForDevWarnings(\n                          current,\n                          renderLanes,\n                          newProps\n                        )),\n                        null !== type &&\n                          (buildHydrationDiffNode(\n                            workInProgress,\n                            0\n                          ).serverProps = type));\n                }\n              current[internalInstanceKey] = workInProgress;\n              current =\n                current.nodeValue === renderLanes ||\n                (null !== newProps &&\n                  !0 === newProps.suppressHydrationWarning) ||\n                checkForUnmatchedText(current.nodeValue, renderLanes)\n                  ? !0\n                  : !1;\n              current || throwOnHydrationMismatch(workInProgress, !0);\n            } else\n              (type = renderLanes.ancestorInfo.current),\n                null != type &&\n                  validateTextNesting(\n                    newProps,\n                    type.tag,\n                    renderLanes.ancestorInfo.implicitRootScope\n                  ),\n                (current =\n                  getOwnerDocumentFromRootContainer(current).createTextNode(\n                    newProps\n                  )),\n                (current[internalInstanceKey] = workInProgress),\n                (workInProgress.stateNode = current);\n          }\n          bubbleProperties(workInProgress);\n          return null;\n        case 31:\n          renderLanes = workInProgress.memoizedState;\n          if (null === current || null !== current.memoizedState) {\n            newProps = popHydrationState(workInProgress);\n            if (null !== renderLanes) {\n              if (null === current) {\n                if (!newProps)\n                  throw Error(\n                    \"A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.\"\n                  );\n                current = workInProgress.memoizedState;\n                current = null !== current ? current.dehydrated : null;\n                if (!current)\n                  throw Error(\n                    \"Expected to have a hydrated activity instance. This error is likely caused by a bug in React. Please file an issue.\"\n                  );\n                current[internalInstanceKey] = workInProgress;\n                bubbleProperties(workInProgress);\n                (workInProgress.mode & ProfileMode) !== NoMode &&\n                  null !== renderLanes &&\n                  ((current = workInProgress.child),\n                  null !== current &&\n                    (workInProgress.treeBaseDuration -=\n                      current.treeBaseDuration));\n              } else\n                emitPendingHydrationWarnings(),\n                  resetHydrationState(),\n                  0 === (workInProgress.flags & 128) &&\n                    (renderLanes = workInProgress.memoizedState = null),\n                  (workInProgress.flags |= 4),\n                  bubbleProperties(workInProgress),\n                  (workInProgress.mode & ProfileMode) !== NoMode &&\n                    null !== renderLanes &&\n                    ((current = workInProgress.child),\n                    null !== current &&\n                      (workInProgress.treeBaseDuration -=\n                        current.treeBaseDuration));\n              current = !1;\n            } else\n              (renderLanes = upgradeHydrationErrorsToRecoverable()),\n                null !== current &&\n                  null !== current.memoizedState &&\n                  (current.memoizedState.hydrationErrors = renderLanes),\n                (current = !0);\n            if (!current) {\n              if (workInProgress.flags & 256)\n                return popSuspenseHandler(workInProgress), workInProgress;\n              popSuspenseHandler(workInProgress);\n              return null;\n            }\n            if (0 !== (workInProgress.flags & 128))\n              throw Error(\n                \"Client rendering an Activity suspended it again. This is a bug in React.\"\n              );\n          }\n          bubbleProperties(workInProgress);\n          return null;\n        case 13:\n          newProps = workInProgress.memoizedState;\n          if (\n            null === current ||\n            (null !== current.memoizedState &&\n              null !== current.memoizedState.dehydrated)\n          ) {\n            type = newProps;\n            nextResource = popHydrationState(workInProgress);\n            if (null !== type && null !== type.dehydrated) {\n              if (null === current) {\n                if (!nextResource)\n                  throw Error(\n                    \"A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.\"\n                  );\n                nextResource = workInProgress.memoizedState;\n                nextResource =\n                  null !== nextResource ? nextResource.dehydrated : null;\n                if (!nextResource)\n                  throw Error(\n                    \"Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.\"\n                  );\n                nextResource[internalInstanceKey] = workInProgress;\n                bubbleProperties(workInProgress);\n                (workInProgress.mode & ProfileMode) !== NoMode &&\n                  null !== type &&\n                  ((type = workInProgress.child),\n                  null !== type &&\n                    (workInProgress.treeBaseDuration -= type.treeBaseDuration));\n              } else\n                emitPendingHydrationWarnings(),\n                  resetHydrationState(),\n                  0 === (workInProgress.flags & 128) &&\n                    (type = workInProgress.memoizedState = null),\n                  (workInProgress.flags |= 4),\n                  bubbleProperties(workInProgress),\n                  (workInProgress.mode & ProfileMode) !== NoMode &&\n                    null !== type &&\n                    ((type = workInProgress.child),\n                    null !== type &&\n                      (workInProgress.treeBaseDuration -=\n                        type.treeBaseDuration));\n              type = !1;\n            } else\n              (type = upgradeHydrationErrorsToRecoverable()),\n                null !== current &&\n                  null !== current.memoizedState &&\n                  (current.memoizedState.hydrationErrors = type),\n                (type = !0);\n            if (!type) {\n              if (workInProgress.flags & 256)\n                return popSuspenseHandler(workInProgress), workInProgress;\n              popSuspenseHandler(workInProgress);\n              return null;\n            }\n          }\n          popSuspenseHandler(workInProgress);\n          if (0 !== (workInProgress.flags & 128))\n            return (\n              (workInProgress.lanes = renderLanes),\n              (workInProgress.mode & ProfileMode) !== NoMode &&\n                transferActualDuration(workInProgress),\n              workInProgress\n            );\n          renderLanes = null !== newProps;\n          current = null !== current && null !== current.memoizedState;\n          renderLanes &&\n            ((newProps = workInProgress.child),\n            (type = null),\n            null !== newProps.alternate &&\n              null !== newProps.alternate.memoizedState &&\n              null !== newProps.alternate.memoizedState.cachePool &&\n              (type = newProps.alternate.memoizedState.cachePool.pool),\n            (nextResource = null),\n            null !== newProps.memoizedState &&\n              null !== newProps.memoizedState.cachePool &&\n              (nextResource = newProps.memoizedState.cachePool.pool),\n            nextResource !== type && (newProps.flags |= 2048));\n          renderLanes !== current &&\n            renderLanes &&\n            (workInProgress.child.flags |= 8192);\n          scheduleRetryEffect(workInProgress, workInProgress.updateQueue);\n          bubbleProperties(workInProgress);\n          (workInProgress.mode & ProfileMode) !== NoMode &&\n            renderLanes &&\n            ((current = workInProgress.child),\n            null !== current &&\n              (workInProgress.treeBaseDuration -= current.treeBaseDuration));\n          return null;\n        case 4:\n          return (\n            popHostContainer(workInProgress),\n            null === current &&\n              listenToAllSupportedEvents(\n                workInProgress.stateNode.containerInfo\n              ),\n            bubbleProperties(workInProgress),\n            null\n          );\n        case 10:\n          return (\n            popProvider(workInProgress.type, workInProgress),\n            bubbleProperties(workInProgress),\n            null\n          );\n        case 19:\n          pop(suspenseStackCursor, workInProgress);\n          newProps = workInProgress.memoizedState;\n          if (null === newProps) return bubbleProperties(workInProgress), null;\n          type = 0 !== (workInProgress.flags & 128);\n          nextResource = newProps.rendering;\n          if (null === nextResource)\n            if (type) cutOffTailIfNeeded(newProps, !1);\n            else {\n              if (\n                workInProgressRootExitStatus !== RootInProgress ||\n                (null !== current && 0 !== (current.flags & 128))\n              )\n                for (current = workInProgress.child; null !== current; ) {\n                  nextResource = findFirstSuspended(current);\n                  if (null !== nextResource) {\n                    workInProgress.flags |= 128;\n                    cutOffTailIfNeeded(newProps, !1);\n                    current = nextResource.updateQueue;\n                    workInProgress.updateQueue = current;\n                    scheduleRetryEffect(workInProgress, current);\n                    workInProgress.subtreeFlags = 0;\n                    current = renderLanes;\n                    for (\n                      renderLanes = workInProgress.child;\n                      null !== renderLanes;\n\n                    )\n                      resetWorkInProgress(renderLanes, current),\n                        (renderLanes = renderLanes.sibling);\n                    push(\n                      suspenseStackCursor,\n                      (suspenseStackCursor.current &\n                        SubtreeSuspenseContextMask) |\n                        ForceSuspenseFallback,\n                      workInProgress\n                    );\n                    isHydrating &&\n                      pushTreeFork(workInProgress, newProps.treeForkCount);\n                    return workInProgress.child;\n                  }\n                  current = current.sibling;\n                }\n              null !== newProps.tail &&\n                now$1() > workInProgressRootRenderTargetTime &&\n                ((workInProgress.flags |= 128),\n                (type = !0),\n                cutOffTailIfNeeded(newProps, !1),\n                (workInProgress.lanes = 4194304));\n            }\n          else {\n            if (!type)\n              if (\n                ((current = findFirstSuspended(nextResource)), null !== current)\n              ) {\n                if (\n                  ((workInProgress.flags |= 128),\n                  (type = !0),\n                  (current = current.updateQueue),\n                  (workInProgress.updateQueue = current),\n                  scheduleRetryEffect(workInProgress, current),\n                  cutOffTailIfNeeded(newProps, !0),\n                  null === newProps.tail &&\n                    \"hidden\" === newProps.tailMode &&\n                    !nextResource.alternate &&\n                    !isHydrating)\n                )\n                  return bubbleProperties(workInProgress), null;\n              } else\n                2 * now$1() - newProps.renderingStartTime >\n                  workInProgressRootRenderTargetTime &&\n                  536870912 !== renderLanes &&\n                  ((workInProgress.flags |= 128),\n                  (type = !0),\n                  cutOffTailIfNeeded(newProps, !1),\n                  (workInProgress.lanes = 4194304));\n            newProps.isBackwards\n              ? ((nextResource.sibling = workInProgress.child),\n                (workInProgress.child = nextResource))\n              : ((current = newProps.last),\n                null !== current\n                  ? (current.sibling = nextResource)\n                  : (workInProgress.child = nextResource),\n                (newProps.last = nextResource));\n          }\n          if (null !== newProps.tail)\n            return (\n              (current = newProps.tail),\n              (newProps.rendering = current),\n              (newProps.tail = current.sibling),\n              (newProps.renderingStartTime = now$1()),\n              (current.sibling = null),\n              (renderLanes = suspenseStackCursor.current),\n              (renderLanes = type\n                ? (renderLanes & SubtreeSuspenseContextMask) |\n                  ForceSuspenseFallback\n                : renderLanes & SubtreeSuspenseContextMask),\n              push(suspenseStackCursor, renderLanes, workInProgress),\n              isHydrating &&\n                pushTreeFork(workInProgress, newProps.treeForkCount),\n              current\n            );\n          bubbleProperties(workInProgress);\n          return null;\n        case 22:\n        case 23:\n          return (\n            popSuspenseHandler(workInProgress),\n            popHiddenContext(workInProgress),\n            (newProps = null !== workInProgress.memoizedState),\n            null !== current\n              ? (null !== current.memoizedState) !== newProps &&\n                (workInProgress.flags |= 8192)\n              : newProps && (workInProgress.flags |= 8192),\n            newProps\n              ? 0 !== (renderLanes & 536870912) &&\n                0 === (workInProgress.flags & 128) &&\n                (bubbleProperties(workInProgress),\n                workInProgress.subtreeFlags & 6 &&\n                  (workInProgress.flags |= 8192))\n              : bubbleProperties(workInProgress),\n            (renderLanes = workInProgress.updateQueue),\n            null !== renderLanes &&\n              scheduleRetryEffect(workInProgress, renderLanes.retryQueue),\n            (renderLanes = null),\n            null !== current &&\n              null !== current.memoizedState &&\n              null !== current.memoizedState.cachePool &&\n              (renderLanes = current.memoizedState.cachePool.pool),\n            (newProps = null),\n            null !== workInProgress.memoizedState &&\n              null !== workInProgress.memoizedState.cachePool &&\n              (newProps = workInProgress.memoizedState.cachePool.pool),\n            newProps !== renderLanes && (workInProgress.flags |= 2048),\n            null !== current && pop(resumedCache, workInProgress),\n            null\n          );\n        case 24:\n          return (\n            (renderLanes = null),\n            null !== current && (renderLanes = current.memoizedState.cache),\n            workInProgress.memoizedState.cache !== renderLanes &&\n              (workInProgress.flags |= 2048),\n            popProvider(CacheContext, workInProgress),\n            bubbleProperties(workInProgress),\n            null\n          );\n        case 25:\n          return null;\n        case 30:\n          return null;\n      }\n      throw Error(\n        \"Unknown unit of work tag (\" +\n          workInProgress.tag +\n          \"). This error is likely caused by a bug in React. Please file an issue.\"\n      );\n    }\n    function unwindWork(current, workInProgress) {\n      popTreeContext(workInProgress);\n      switch (workInProgress.tag) {\n        case 1:\n          return (\n            (current = workInProgress.flags),\n            current & 65536\n              ? ((workInProgress.flags = (current & -65537) | 128),\n                (workInProgress.mode & ProfileMode) !== NoMode &&\n                  transferActualDuration(workInProgress),\n                workInProgress)\n              : null\n          );\n        case 3:\n          return (\n            popProvider(CacheContext, workInProgress),\n            popHostContainer(workInProgress),\n            (current = workInProgress.flags),\n            0 !== (current & 65536) && 0 === (current & 128)\n              ? ((workInProgress.flags = (current & -65537) | 128),\n                workInProgress)\n              : null\n          );\n        case 26:\n        case 27:\n        case 5:\n          return popHostContext(workInProgress), null;\n        case 31:\n          if (null !== workInProgress.memoizedState) {\n            popSuspenseHandler(workInProgress);\n            if (null === workInProgress.alternate)\n              throw Error(\n                \"Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.\"\n              );\n            resetHydrationState();\n          }\n          current = workInProgress.flags;\n          return current & 65536\n            ? ((workInProgress.flags = (current & -65537) | 128),\n              (workInProgress.mode & ProfileMode) !== NoMode &&\n                transferActualDuration(workInProgress),\n              workInProgress)\n            : null;\n        case 13:\n          popSuspenseHandler(workInProgress);\n          current = workInProgress.memoizedState;\n          if (null !== current && null !== current.dehydrated) {\n            if (null === workInProgress.alternate)\n              throw Error(\n                \"Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.\"\n              );\n            resetHydrationState();\n          }\n          current = workInProgress.flags;\n          return current & 65536\n            ? ((workInProgress.flags = (current & -65537) | 128),\n              (workInProgress.mode & ProfileMode) !== NoMode &&\n                transferActualDuration(workInProgress),\n              workInProgress)\n            : null;\n        case 19:\n          return pop(suspenseStackCursor, workInProgress), null;\n        case 4:\n          return popHostContainer(workInProgress), null;\n        case 10:\n          return popProvider(workInProgress.type, workInProgress), null;\n        case 22:\n        case 23:\n          return (\n            popSuspenseHandler(workInProgress),\n            popHiddenContext(workInProgress),\n            null !== current && pop(resumedCache, workInProgress),\n            (current = workInProgress.flags),\n            current & 65536\n              ? ((workInProgress.flags = (current & -65537) | 128),\n                (workInProgress.mode & ProfileMode) !== NoMode &&\n                  transferActualDuration(workInProgress),\n                workInProgress)\n              : null\n          );\n        case 24:\n          return popProvider(CacheContext, workInProgress), null;\n        case 25:\n          return null;\n        default:\n          return null;\n      }\n    }\n    function unwindInterruptedWork(current, interruptedWork) {\n      popTreeContext(interruptedWork);\n      switch (interruptedWork.tag) {\n        case 3:\n          popProvider(CacheContext, interruptedWork);\n          popHostContainer(interruptedWork);\n          break;\n        case 26:\n        case 27:\n        case 5:\n          popHostContext(interruptedWork);\n          break;\n        case 4:\n          popHostContainer(interruptedWork);\n          break;\n        case 31:\n          null !== interruptedWork.memoizedState &&\n            popSuspenseHandler(interruptedWork);\n          break;\n        case 13:\n          popSuspenseHandler(interruptedWork);\n          break;\n        case 19:\n          pop(suspenseStackCursor, interruptedWork);\n          break;\n        case 10:\n          popProvider(interruptedWork.type, interruptedWork);\n          break;\n        case 22:\n        case 23:\n          popSuspenseHandler(interruptedWork);\n          popHiddenContext(interruptedWork);\n          null !== current && pop(resumedCache, interruptedWork);\n          break;\n        case 24:\n          popProvider(CacheContext, interruptedWork);\n      }\n    }\n    function shouldProfile(current) {\n      return (current.mode & ProfileMode) !== NoMode;\n    }\n    function commitHookLayoutEffects(finishedWork, hookFlags) {\n      shouldProfile(finishedWork)\n        ? (startEffectTimer(),\n          commitHookEffectListMount(hookFlags, finishedWork),\n          recordEffectDuration())\n        : commitHookEffectListMount(hookFlags, finishedWork);\n    }\n    function commitHookLayoutUnmountEffects(\n      finishedWork,\n      nearestMountedAncestor,\n      hookFlags\n    ) {\n      shouldProfile(finishedWork)\n        ? (startEffectTimer(),\n          commitHookEffectListUnmount(\n            hookFlags,\n            finishedWork,\n            nearestMountedAncestor\n          ),\n          recordEffectDuration())\n        : commitHookEffectListUnmount(\n            hookFlags,\n            finishedWork,\n            nearestMountedAncestor\n          );\n    }\n    function commitHookEffectListMount(flags, finishedWork) {\n      try {\n        var updateQueue = finishedWork.updateQueue,\n          lastEffect = null !== updateQueue ? updateQueue.lastEffect : null;\n        if (null !== lastEffect) {\n          var firstEffect = lastEffect.next;\n          updateQueue = firstEffect;\n          do {\n            if (\n              (updateQueue.tag & flags) === flags &&\n              ((lastEffect = void 0),\n              (flags & Insertion) !== NoFlags &&\n                (isRunningInsertionEffect = !0),\n              (lastEffect = runWithFiberInDEV(\n                finishedWork,\n                callCreateInDEV,\n                updateQueue\n              )),\n              (flags & Insertion) !== NoFlags &&\n                (isRunningInsertionEffect = !1),\n              void 0 !== lastEffect && \"function\" !== typeof lastEffect)\n            ) {\n              var hookName = void 0;\n              hookName =\n                0 !== (updateQueue.tag & Layout)\n                  ? \"useLayoutEffect\"\n                  : 0 !== (updateQueue.tag & Insertion)\n                    ? \"useInsertionEffect\"\n                    : \"useEffect\";\n              var addendum = void 0;\n              addendum =\n                null === lastEffect\n                  ? \" You returned null. If your effect does not require clean up, return undefined (or nothing).\"\n                  : \"function\" === typeof lastEffect.then\n                    ? \"\\n\\nIt looks like you wrote \" +\n                      hookName +\n                      \"(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately:\\n\\n\" +\n                      hookName +\n                      \"(() => {\\n  async function fetchData() {\\n    // You can await here\\n    const response = await MyAPI.getData(someId);\\n    // ...\\n  }\\n  fetchData();\\n}, [someId]); // Or [] if effect doesn't need props or state\\n\\nLearn more about data fetching with Hooks: https://react.dev/link/hooks-data-fetching\"\n                    : \" You returned: \" + lastEffect;\n              runWithFiberInDEV(\n                finishedWork,\n                function (n, a) {\n                  console.error(\n                    \"%s must not return anything besides a function, which is used for clean-up.%s\",\n                    n,\n                    a\n                  );\n                },\n                hookName,\n                addendum\n              );\n            }\n            updateQueue = updateQueue.next;\n          } while (updateQueue !== firstEffect);\n        }\n      } catch (error) {\n        captureCommitPhaseError(finishedWork, finishedWork.return, error);\n      }\n    }\n    function commitHookEffectListUnmount(\n      flags,\n      finishedWork,\n      nearestMountedAncestor\n    ) {\n      try {\n        var updateQueue = finishedWork.updateQueue,\n          lastEffect = null !== updateQueue ? updateQueue.lastEffect : null;\n        if (null !== lastEffect) {\n          var firstEffect = lastEffect.next;\n          updateQueue = firstEffect;\n          do {\n            if ((updateQueue.tag & flags) === flags) {\n              var inst = updateQueue.inst,\n                destroy = inst.destroy;\n              void 0 !== destroy &&\n                ((inst.destroy = void 0),\n                (flags & Insertion) !== NoFlags &&\n                  (isRunningInsertionEffect = !0),\n                (lastEffect = finishedWork),\n                runWithFiberInDEV(\n                  lastEffect,\n                  callDestroyInDEV,\n                  lastEffect,\n                  nearestMountedAncestor,\n                  destroy\n                ),\n                (flags & Insertion) !== NoFlags &&\n                  (isRunningInsertionEffect = !1));\n            }\n            updateQueue = updateQueue.next;\n          } while (updateQueue !== firstEffect);\n        }\n      } catch (error) {\n        captureCommitPhaseError(finishedWork, finishedWork.return, error);\n      }\n    }\n    function commitHookPassiveMountEffects(finishedWork, hookFlags) {\n      shouldProfile(finishedWork)\n        ? (startEffectTimer(),\n          commitHookEffectListMount(hookFlags, finishedWork),\n          recordEffectDuration())\n        : commitHookEffectListMount(hookFlags, finishedWork);\n    }\n    function commitHookPassiveUnmountEffects(\n      finishedWork,\n      nearestMountedAncestor,\n      hookFlags\n    ) {\n      shouldProfile(finishedWork)\n        ? (startEffectTimer(),\n          commitHookEffectListUnmount(\n            hookFlags,\n            finishedWork,\n            nearestMountedAncestor\n          ),\n          recordEffectDuration())\n        : commitHookEffectListUnmount(\n            hookFlags,\n            finishedWork,\n            nearestMountedAncestor\n          );\n    }\n    function commitClassCallbacks(finishedWork) {\n      var updateQueue = finishedWork.updateQueue;\n      if (null !== updateQueue) {\n        var instance = finishedWork.stateNode;\n        finishedWork.type.defaultProps ||\n          \"ref\" in finishedWork.memoizedProps ||\n          didWarnAboutReassigningProps ||\n          (instance.props !== finishedWork.memoizedProps &&\n            console.error(\n              \"Expected %s props to match memoized props before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.\",\n              getComponentNameFromFiber(finishedWork) || \"instance\"\n            ),\n          instance.state !== finishedWork.memoizedState &&\n            console.error(\n              \"Expected %s state to match memoized state before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.\",\n              getComponentNameFromFiber(finishedWork) || \"instance\"\n            ));\n        try {\n          runWithFiberInDEV(\n            finishedWork,\n            commitCallbacks,\n            updateQueue,\n            instance\n          );\n        } catch (error) {\n          captureCommitPhaseError(finishedWork, finishedWork.return, error);\n        }\n      }\n    }\n    function callGetSnapshotBeforeUpdates(instance, prevProps, prevState) {\n      return instance.getSnapshotBeforeUpdate(prevProps, prevState);\n    }\n    function commitClassSnapshot(finishedWork, current) {\n      var prevProps = current.memoizedProps,\n        prevState = current.memoizedState;\n      current = finishedWork.stateNode;\n      finishedWork.type.defaultProps ||\n        \"ref\" in finishedWork.memoizedProps ||\n        didWarnAboutReassigningProps ||\n        (current.props !== finishedWork.memoizedProps &&\n          console.error(\n            \"Expected %s props to match memoized props before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.\",\n            getComponentNameFromFiber(finishedWork) || \"instance\"\n          ),\n        current.state !== finishedWork.memoizedState &&\n          console.error(\n            \"Expected %s state to match memoized state before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.\",\n            getComponentNameFromFiber(finishedWork) || \"instance\"\n          ));\n      try {\n        var resolvedPrevProps = resolveClassComponentProps(\n          finishedWork.type,\n          prevProps\n        );\n        var snapshot = runWithFiberInDEV(\n          finishedWork,\n          callGetSnapshotBeforeUpdates,\n          current,\n          resolvedPrevProps,\n          prevState\n        );\n        prevProps = didWarnAboutUndefinedSnapshotBeforeUpdate;\n        void 0 !== snapshot ||\n          prevProps.has(finishedWork.type) ||\n          (prevProps.add(finishedWork.type),\n          runWithFiberInDEV(finishedWork, function () {\n            console.error(\n              \"%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.\",\n              getComponentNameFromFiber(finishedWork)\n            );\n          }));\n        current.__reactInternalSnapshotBeforeUpdate = snapshot;\n      } catch (error) {\n        captureCommitPhaseError(finishedWork, finishedWork.return, error);\n      }\n    }\n    function safelyCallComponentWillUnmount(\n      current,\n      nearestMountedAncestor,\n      instance\n    ) {\n      instance.props = resolveClassComponentProps(\n        current.type,\n        current.memoizedProps\n      );\n      instance.state = current.memoizedState;\n      shouldProfile(current)\n        ? (startEffectTimer(),\n          runWithFiberInDEV(\n            current,\n            callComponentWillUnmountInDEV,\n            current,\n            nearestMountedAncestor,\n            instance\n          ),\n          recordEffectDuration())\n        : runWithFiberInDEV(\n            current,\n            callComponentWillUnmountInDEV,\n            current,\n            nearestMountedAncestor,\n            instance\n          );\n    }\n    function commitAttachRef(finishedWork) {\n      var ref = finishedWork.ref;\n      if (null !== ref) {\n        switch (finishedWork.tag) {\n          case 26:\n          case 27:\n          case 5:\n            var instanceToUse = finishedWork.stateNode;\n            break;\n          case 30:\n            instanceToUse = finishedWork.stateNode;\n            break;\n          default:\n            instanceToUse = finishedWork.stateNode;\n        }\n        if (\"function\" === typeof ref)\n          if (shouldProfile(finishedWork))\n            try {\n              startEffectTimer(),\n                (finishedWork.refCleanup = ref(instanceToUse));\n            } finally {\n              recordEffectDuration();\n            }\n          else finishedWork.refCleanup = ref(instanceToUse);\n        else\n          \"string\" === typeof ref\n            ? console.error(\"String refs are no longer supported.\")\n            : ref.hasOwnProperty(\"current\") ||\n              console.error(\n                \"Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().\",\n                getComponentNameFromFiber(finishedWork)\n              ),\n            (ref.current = instanceToUse);\n      }\n    }\n    function safelyAttachRef(current, nearestMountedAncestor) {\n      try {\n        runWithFiberInDEV(current, commitAttachRef, current);\n      } catch (error) {\n        captureCommitPhaseError(current, nearestMountedAncestor, error);\n      }\n    }\n    function safelyDetachRef(current, nearestMountedAncestor) {\n      var ref = current.ref,\n        refCleanup = current.refCleanup;\n      if (null !== ref)\n        if (\"function\" === typeof refCleanup)\n          try {\n            if (shouldProfile(current))\n              try {\n                startEffectTimer(), runWithFiberInDEV(current, refCleanup);\n              } finally {\n                recordEffectDuration(current);\n              }\n            else runWithFiberInDEV(current, refCleanup);\n          } catch (error) {\n            captureCommitPhaseError(current, nearestMountedAncestor, error);\n          } finally {\n            (current.refCleanup = null),\n              (current = current.alternate),\n              null != current && (current.refCleanup = null);\n          }\n        else if (\"function\" === typeof ref)\n          try {\n            if (shouldProfile(current))\n              try {\n                startEffectTimer(), runWithFiberInDEV(current, ref, null);\n              } finally {\n                recordEffectDuration(current);\n              }\n            else runWithFiberInDEV(current, ref, null);\n          } catch (error$7) {\n            captureCommitPhaseError(current, nearestMountedAncestor, error$7);\n          }\n        else ref.current = null;\n    }\n    function commitProfiler(\n      finishedWork,\n      current,\n      commitStartTime,\n      effectDuration\n    ) {\n      var _finishedWork$memoize = finishedWork.memoizedProps,\n        id = _finishedWork$memoize.id,\n        onCommit = _finishedWork$memoize.onCommit;\n      _finishedWork$memoize = _finishedWork$memoize.onRender;\n      current = null === current ? \"mount\" : \"update\";\n      currentUpdateIsNested && (current = \"nested-update\");\n      \"function\" === typeof _finishedWork$memoize &&\n        _finishedWork$memoize(\n          id,\n          current,\n          finishedWork.actualDuration,\n          finishedWork.treeBaseDuration,\n          finishedWork.actualStartTime,\n          commitStartTime\n        );\n      \"function\" === typeof onCommit &&\n        onCommit(id, current, effectDuration, commitStartTime);\n    }\n    function commitProfilerPostCommitImpl(\n      finishedWork,\n      current,\n      commitStartTime,\n      passiveEffectDuration\n    ) {\n      var _finishedWork$memoize2 = finishedWork.memoizedProps;\n      finishedWork = _finishedWork$memoize2.id;\n      _finishedWork$memoize2 = _finishedWork$memoize2.onPostCommit;\n      current = null === current ? \"mount\" : \"update\";\n      currentUpdateIsNested && (current = \"nested-update\");\n      \"function\" === typeof _finishedWork$memoize2 &&\n        _finishedWork$memoize2(\n          finishedWork,\n          current,\n          passiveEffectDuration,\n          commitStartTime\n        );\n    }\n    function commitHostMount(finishedWork) {\n      var type = finishedWork.type,\n        props = finishedWork.memoizedProps,\n        instance = finishedWork.stateNode;\n      try {\n        runWithFiberInDEV(\n          finishedWork,\n          commitMount,\n          instance,\n          type,\n          props,\n          finishedWork\n        );\n      } catch (error) {\n        captureCommitPhaseError(finishedWork, finishedWork.return, error);\n      }\n    }\n    function commitHostUpdate(finishedWork, newProps, oldProps) {\n      try {\n        runWithFiberInDEV(\n          finishedWork,\n          commitUpdate,\n          finishedWork.stateNode,\n          finishedWork.type,\n          oldProps,\n          newProps,\n          finishedWork\n        );\n      } catch (error) {\n        captureCommitPhaseError(finishedWork, finishedWork.return, error);\n      }\n    }\n    function isHostParent(fiber) {\n      return (\n        5 === fiber.tag ||\n        3 === fiber.tag ||\n        26 === fiber.tag ||\n        (27 === fiber.tag && isSingletonScope(fiber.type)) ||\n        4 === fiber.tag\n      );\n    }\n    function getHostSibling(fiber) {\n      a: for (;;) {\n        for (; null === fiber.sibling; ) {\n          if (null === fiber.return || isHostParent(fiber.return)) return null;\n          fiber = fiber.return;\n        }\n        fiber.sibling.return = fiber.return;\n        for (\n          fiber = fiber.sibling;\n          5 !== fiber.tag && 6 !== fiber.tag && 18 !== fiber.tag;\n\n        ) {\n          if (27 === fiber.tag && isSingletonScope(fiber.type)) continue a;\n          if (fiber.flags & 2) continue a;\n          if (null === fiber.child || 4 === fiber.tag) continue a;\n          else (fiber.child.return = fiber), (fiber = fiber.child);\n        }\n        if (!(fiber.flags & 2)) return fiber.stateNode;\n      }\n    }\n    function insertOrAppendPlacementNodeIntoContainer(node, before, parent) {\n      var tag = node.tag;\n      if (5 === tag || 6 === tag)\n        (node = node.stateNode),\n          before\n            ? (warnForReactChildrenConflict(parent),\n              (9 === parent.nodeType\n                ? parent.body\n                : \"HTML\" === parent.nodeName\n                  ? parent.ownerDocument.body\n                  : parent\n              ).insertBefore(node, before))\n            : (warnForReactChildrenConflict(parent),\n              (before =\n                9 === parent.nodeType\n                  ? parent.body\n                  : \"HTML\" === parent.nodeName\n                    ? parent.ownerDocument.body\n                    : parent),\n              before.appendChild(node),\n              (parent = parent._reactRootContainer),\n              (null !== parent && void 0 !== parent) ||\n                null !== before.onclick ||\n                (before.onclick = noop$1));\n      else if (\n        4 !== tag &&\n        (27 === tag &&\n          isSingletonScope(node.type) &&\n          ((parent = node.stateNode), (before = null)),\n        (node = node.child),\n        null !== node)\n      )\n        for (\n          insertOrAppendPlacementNodeIntoContainer(node, before, parent),\n            node = node.sibling;\n          null !== node;\n\n        )\n          insertOrAppendPlacementNodeIntoContainer(node, before, parent),\n            (node = node.sibling);\n    }\n    function insertOrAppendPlacementNode(node, before, parent) {\n      var tag = node.tag;\n      if (5 === tag || 6 === tag)\n        (node = node.stateNode),\n          before ? parent.insertBefore(node, before) : parent.appendChild(node);\n      else if (\n        4 !== tag &&\n        (27 === tag && isSingletonScope(node.type) && (parent = node.stateNode),\n        (node = node.child),\n        null !== node)\n      )\n        for (\n          insertOrAppendPlacementNode(node, before, parent),\n            node = node.sibling;\n          null !== node;\n\n        )\n          insertOrAppendPlacementNode(node, before, parent),\n            (node = node.sibling);\n    }\n    function commitPlacement(finishedWork) {\n      for (\n        var hostParentFiber, parentFiber = finishedWork.return;\n        null !== parentFiber;\n\n      ) {\n        if (isHostParent(parentFiber)) {\n          hostParentFiber = parentFiber;\n          break;\n        }\n        parentFiber = parentFiber.return;\n      }\n      if (null == hostParentFiber)\n        throw Error(\n          \"Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.\"\n        );\n      switch (hostParentFiber.tag) {\n        case 27:\n          hostParentFiber = hostParentFiber.stateNode;\n          parentFiber = getHostSibling(finishedWork);\n          insertOrAppendPlacementNode(\n            finishedWork,\n            parentFiber,\n            hostParentFiber\n          );\n          break;\n        case 5:\n          parentFiber = hostParentFiber.stateNode;\n          hostParentFiber.flags & 32 &&\n            (resetTextContent(parentFiber), (hostParentFiber.flags &= -33));\n          hostParentFiber = getHostSibling(finishedWork);\n          insertOrAppendPlacementNode(\n            finishedWork,\n            hostParentFiber,\n            parentFiber\n          );\n          break;\n        case 3:\n        case 4:\n          hostParentFiber = hostParentFiber.stateNode.containerInfo;\n          parentFiber = getHostSibling(finishedWork);\n          insertOrAppendPlacementNodeIntoContainer(\n            finishedWork,\n            parentFiber,\n            hostParentFiber\n          );\n          break;\n        default:\n          throw Error(\n            \"Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.\"\n          );\n      }\n    }\n    function commitHostSingletonAcquisition(finishedWork) {\n      var singleton = finishedWork.stateNode,\n        props = finishedWork.memoizedProps;\n      try {\n        runWithFiberInDEV(\n          finishedWork,\n          acquireSingletonInstance,\n          finishedWork.type,\n          props,\n          singleton,\n          finishedWork\n        );\n      } catch (error) {\n        captureCommitPhaseError(finishedWork, finishedWork.return, error);\n      }\n    }\n    function isHydratingParent(current, finishedWork) {\n      return 31 === finishedWork.tag\n        ? ((finishedWork = finishedWork.memoizedState),\n          null !== current.memoizedState && null === finishedWork)\n        : 13 === finishedWork.tag\n          ? ((current = current.memoizedState),\n            (finishedWork = finishedWork.memoizedState),\n            null !== current &&\n              null !== current.dehydrated &&\n              (null === finishedWork || null === finishedWork.dehydrated))\n          : 3 === finishedWork.tag\n            ? current.memoizedState.isDehydrated &&\n              0 === (finishedWork.flags & 256)\n            : !1;\n    }\n    function commitBeforeMutationEffects(root, firstChild) {\n      root = root.containerInfo;\n      eventsEnabled = _enabled;\n      root = getActiveElementDeep(root);\n      if (hasSelectionCapabilities(root)) {\n        if (\"selectionStart\" in root)\n          var JSCompiler_temp = {\n            start: root.selectionStart,\n            end: root.selectionEnd\n          };\n        else\n          a: {\n            JSCompiler_temp =\n              ((JSCompiler_temp = root.ownerDocument) &&\n                JSCompiler_temp.defaultView) ||\n              window;\n            var selection =\n              JSCompiler_temp.getSelection && JSCompiler_temp.getSelection();\n            if (selection && 0 !== selection.rangeCount) {\n              JSCompiler_temp = selection.anchorNode;\n              var anchorOffset = selection.anchorOffset,\n                focusNode = selection.focusNode;\n              selection = selection.focusOffset;\n              try {\n                JSCompiler_temp.nodeType, focusNode.nodeType;\n              } catch (e$2) {\n                JSCompiler_temp = null;\n                break a;\n              }\n              var length = 0,\n                start = -1,\n                end = -1,\n                indexWithinAnchor = 0,\n                indexWithinFocus = 0,\n                node = root,\n                parentNode = null;\n              b: for (;;) {\n                for (var next; ; ) {\n                  node !== JSCompiler_temp ||\n                    (0 !== anchorOffset && 3 !== node.nodeType) ||\n                    (start = length + anchorOffset);\n                  node !== focusNode ||\n                    (0 !== selection && 3 !== node.nodeType) ||\n                    (end = length + selection);\n                  3 === node.nodeType && (length += node.nodeValue.length);\n                  if (null === (next = node.firstChild)) break;\n                  parentNode = node;\n                  node = next;\n                }\n                for (;;) {\n                  if (node === root) break b;\n                  parentNode === JSCompiler_temp &&\n                    ++indexWithinAnchor === anchorOffset &&\n                    (start = length);\n                  parentNode === focusNode &&\n                    ++indexWithinFocus === selection &&\n                    (end = length);\n                  if (null !== (next = node.nextSibling)) break;\n                  node = parentNode;\n                  parentNode = node.parentNode;\n                }\n                node = next;\n              }\n              JSCompiler_temp =\n                -1 === start || -1 === end ? null : { start: start, end: end };\n            } else JSCompiler_temp = null;\n          }\n        JSCompiler_temp = JSCompiler_temp || { start: 0, end: 0 };\n      } else JSCompiler_temp = null;\n      selectionInformation = {\n        focusedElem: root,\n        selectionRange: JSCompiler_temp\n      };\n      _enabled = !1;\n      for (nextEffect = firstChild; null !== nextEffect; )\n        if (\n          ((firstChild = nextEffect),\n          (root = firstChild.child),\n          0 !== (firstChild.subtreeFlags & 1028) && null !== root)\n        )\n          (root.return = firstChild), (nextEffect = root);\n        else\n          for (; null !== nextEffect; ) {\n            root = firstChild = nextEffect;\n            JSCompiler_temp = root.alternate;\n            anchorOffset = root.flags;\n            switch (root.tag) {\n              case 0:\n                if (\n                  0 !== (anchorOffset & 4) &&\n                  ((root = root.updateQueue),\n                  (root = null !== root ? root.events : null),\n                  null !== root)\n                )\n                  for (\n                    JSCompiler_temp = 0;\n                    JSCompiler_temp < root.length;\n                    JSCompiler_temp++\n                  )\n                    (anchorOffset = root[JSCompiler_temp]),\n                      (anchorOffset.ref.impl = anchorOffset.nextImpl);\n                break;\n              case 11:\n              case 15:\n                break;\n              case 1:\n                0 !== (anchorOffset & 1024) &&\n                  null !== JSCompiler_temp &&\n                  commitClassSnapshot(root, JSCompiler_temp);\n                break;\n              case 3:\n                if (0 !== (anchorOffset & 1024))\n                  if (\n                    ((root = root.stateNode.containerInfo),\n                    (JSCompiler_temp = root.nodeType),\n                    9 === JSCompiler_temp)\n                  )\n                    clearContainerSparingly(root);\n                  else if (1 === JSCompiler_temp)\n                    switch (root.nodeName) {\n                      case \"HEAD\":\n                      case \"HTML\":\n                      case \"BODY\":\n                        clearContainerSparingly(root);\n                        break;\n                      default:\n                        root.textContent = \"\";\n                    }\n                break;\n              case 5:\n              case 26:\n              case 27:\n              case 6:\n              case 4:\n              case 17:\n                break;\n              default:\n                if (0 !== (anchorOffset & 1024))\n                  throw Error(\n                    \"This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.\"\n                  );\n            }\n            root = firstChild.sibling;\n            if (null !== root) {\n              root.return = firstChild.return;\n              nextEffect = root;\n              break;\n            }\n            nextEffect = firstChild.return;\n          }\n    }\n    function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) {\n      var prevEffectStart = pushComponentEffectStart(),\n        prevEffectDuration = pushComponentEffectDuration(),\n        prevEffectErrors = pushComponentEffectErrors(),\n        prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate(),\n        flags = finishedWork.flags;\n      switch (finishedWork.tag) {\n        case 0:\n        case 11:\n        case 15:\n          recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n          flags & 4 &&\n            commitHookLayoutEffects(finishedWork, Layout | HasEffect);\n          break;\n        case 1:\n          recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n          if (flags & 4)\n            if (((finishedRoot = finishedWork.stateNode), null === current))\n              finishedWork.type.defaultProps ||\n                \"ref\" in finishedWork.memoizedProps ||\n                didWarnAboutReassigningProps ||\n                (finishedRoot.props !== finishedWork.memoizedProps &&\n                  console.error(\n                    \"Expected %s props to match memoized props before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.\",\n                    getComponentNameFromFiber(finishedWork) || \"instance\"\n                  ),\n                finishedRoot.state !== finishedWork.memoizedState &&\n                  console.error(\n                    \"Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.\",\n                    getComponentNameFromFiber(finishedWork) || \"instance\"\n                  )),\n                shouldProfile(finishedWork)\n                  ? (startEffectTimer(),\n                    runWithFiberInDEV(\n                      finishedWork,\n                      callComponentDidMountInDEV,\n                      finishedWork,\n                      finishedRoot\n                    ),\n                    recordEffectDuration())\n                  : runWithFiberInDEV(\n                      finishedWork,\n                      callComponentDidMountInDEV,\n                      finishedWork,\n                      finishedRoot\n                    );\n            else {\n              var prevProps = resolveClassComponentProps(\n                finishedWork.type,\n                current.memoizedProps\n              );\n              current = current.memoizedState;\n              finishedWork.type.defaultProps ||\n                \"ref\" in finishedWork.memoizedProps ||\n                didWarnAboutReassigningProps ||\n                (finishedRoot.props !== finishedWork.memoizedProps &&\n                  console.error(\n                    \"Expected %s props to match memoized props before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.\",\n                    getComponentNameFromFiber(finishedWork) || \"instance\"\n                  ),\n                finishedRoot.state !== finishedWork.memoizedState &&\n                  console.error(\n                    \"Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.\",\n                    getComponentNameFromFiber(finishedWork) || \"instance\"\n                  ));\n              shouldProfile(finishedWork)\n                ? (startEffectTimer(),\n                  runWithFiberInDEV(\n                    finishedWork,\n                    callComponentDidUpdateInDEV,\n                    finishedWork,\n                    finishedRoot,\n                    prevProps,\n                    current,\n                    finishedRoot.__reactInternalSnapshotBeforeUpdate\n                  ),\n                  recordEffectDuration())\n                : runWithFiberInDEV(\n                    finishedWork,\n                    callComponentDidUpdateInDEV,\n                    finishedWork,\n                    finishedRoot,\n                    prevProps,\n                    current,\n                    finishedRoot.__reactInternalSnapshotBeforeUpdate\n                  );\n            }\n          flags & 64 && commitClassCallbacks(finishedWork);\n          flags & 512 && safelyAttachRef(finishedWork, finishedWork.return);\n          break;\n        case 3:\n          current = pushNestedEffectDurations();\n          recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n          if (\n            flags & 64 &&\n            ((flags = finishedWork.updateQueue), null !== flags)\n          ) {\n            prevProps = null;\n            if (null !== finishedWork.child)\n              switch (finishedWork.child.tag) {\n                case 27:\n                case 5:\n                  prevProps = finishedWork.child.stateNode;\n                  break;\n                case 1:\n                  prevProps = finishedWork.child.stateNode;\n              }\n            try {\n              runWithFiberInDEV(\n                finishedWork,\n                commitCallbacks,\n                flags,\n                prevProps\n              );\n            } catch (error) {\n              captureCommitPhaseError(finishedWork, finishedWork.return, error);\n            }\n          }\n          finishedRoot.effectDuration += popNestedEffectDurations(current);\n          break;\n        case 27:\n          null === current &&\n            flags & 4 &&\n            commitHostSingletonAcquisition(finishedWork);\n        case 26:\n        case 5:\n          recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n          if (null === current)\n            if (flags & 4) commitHostMount(finishedWork);\n            else if (flags & 64) {\n              finishedRoot = finishedWork.type;\n              current = finishedWork.memoizedProps;\n              prevProps = finishedWork.stateNode;\n              try {\n                runWithFiberInDEV(\n                  finishedWork,\n                  commitHydratedInstance,\n                  prevProps,\n                  finishedRoot,\n                  current,\n                  finishedWork\n                );\n              } catch (error) {\n                captureCommitPhaseError(\n                  finishedWork,\n                  finishedWork.return,\n                  error\n                );\n              }\n            }\n          flags & 512 && safelyAttachRef(finishedWork, finishedWork.return);\n          break;\n        case 12:\n          if (flags & 4) {\n            flags = pushNestedEffectDurations();\n            recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n            finishedRoot = finishedWork.stateNode;\n            finishedRoot.effectDuration += bubbleNestedEffectDurations(flags);\n            try {\n              runWithFiberInDEV(\n                finishedWork,\n                commitProfiler,\n                finishedWork,\n                current,\n                commitStartTime,\n                finishedRoot.effectDuration\n              );\n            } catch (error) {\n              captureCommitPhaseError(finishedWork, finishedWork.return, error);\n            }\n          } else recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n          break;\n        case 31:\n          recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n          flags & 4 &&\n            commitActivityHydrationCallbacks(finishedRoot, finishedWork);\n          break;\n        case 13:\n          recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n          flags & 4 &&\n            commitSuspenseHydrationCallbacks(finishedRoot, finishedWork);\n          flags & 64 &&\n            ((finishedRoot = finishedWork.memoizedState),\n            null !== finishedRoot &&\n              ((finishedRoot = finishedRoot.dehydrated),\n              null !== finishedRoot &&\n                ((flags = retryDehydratedSuspenseBoundary.bind(\n                  null,\n                  finishedWork\n                )),\n                registerSuspenseInstanceRetry(finishedRoot, flags))));\n          break;\n        case 22:\n          flags =\n            null !== finishedWork.memoizedState || offscreenSubtreeIsHidden;\n          if (!flags) {\n            current =\n              (null !== current && null !== current.memoizedState) ||\n              offscreenSubtreeWasHidden;\n            prevProps = offscreenSubtreeIsHidden;\n            var prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden;\n            offscreenSubtreeIsHidden = flags;\n            (offscreenSubtreeWasHidden = current) &&\n            !prevOffscreenSubtreeWasHidden\n              ? (recursivelyTraverseReappearLayoutEffects(\n                  finishedRoot,\n                  finishedWork,\n                  0 !== (finishedWork.subtreeFlags & 8772)\n                ),\n                (finishedWork.mode & ProfileMode) !== NoMode &&\n                  0 <= componentEffectStartTime &&\n                  0 <= componentEffectEndTime &&\n                  0.05 < componentEffectEndTime - componentEffectStartTime &&\n                  logComponentReappeared(\n                    finishedWork,\n                    componentEffectStartTime,\n                    componentEffectEndTime\n                  ))\n              : recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n            offscreenSubtreeIsHidden = prevProps;\n            offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;\n          }\n          break;\n        case 30:\n          break;\n        default:\n          recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n      }\n      (finishedWork.mode & ProfileMode) !== NoMode &&\n        0 <= componentEffectStartTime &&\n        0 <= componentEffectEndTime &&\n        ((componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) &&\n          logComponentEffect(\n            finishedWork,\n            componentEffectStartTime,\n            componentEffectEndTime,\n            componentEffectDuration,\n            componentEffectErrors\n          ),\n        null === finishedWork.alternate &&\n          null !== finishedWork.return &&\n          null !== finishedWork.return.alternate &&\n          0.05 < componentEffectEndTime - componentEffectStartTime &&\n          (isHydratingParent(\n            finishedWork.return.alternate,\n            finishedWork.return\n          ) ||\n            logComponentTrigger(\n              finishedWork,\n              componentEffectStartTime,\n              componentEffectEndTime,\n              \"Mount\"\n            )));\n      popComponentEffectStart(prevEffectStart);\n      popComponentEffectDuration(prevEffectDuration);\n      componentEffectErrors = prevEffectErrors;\n      componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;\n    }\n    function detachFiberAfterEffects(fiber) {\n      var alternate = fiber.alternate;\n      null !== alternate &&\n        ((fiber.alternate = null), detachFiberAfterEffects(alternate));\n      fiber.child = null;\n      fiber.deletions = null;\n      fiber.sibling = null;\n      5 === fiber.tag &&\n        ((alternate = fiber.stateNode),\n        null !== alternate && detachDeletedInstance(alternate));\n      fiber.stateNode = null;\n      fiber._debugOwner = null;\n      fiber.return = null;\n      fiber.dependencies = null;\n      fiber.memoizedProps = null;\n      fiber.memoizedState = null;\n      fiber.pendingProps = null;\n      fiber.stateNode = null;\n      fiber.updateQueue = null;\n    }\n    function recursivelyTraverseDeletionEffects(\n      finishedRoot,\n      nearestMountedAncestor,\n      parent\n    ) {\n      for (parent = parent.child; null !== parent; )\n        commitDeletionEffectsOnFiber(\n          finishedRoot,\n          nearestMountedAncestor,\n          parent\n        ),\n          (parent = parent.sibling);\n    }\n    function commitDeletionEffectsOnFiber(\n      finishedRoot,\n      nearestMountedAncestor,\n      deletedFiber\n    ) {\n      if (\n        injectedHook &&\n        \"function\" === typeof injectedHook.onCommitFiberUnmount\n      )\n        try {\n          injectedHook.onCommitFiberUnmount(rendererID, deletedFiber);\n        } catch (err) {\n          hasLoggedError ||\n            ((hasLoggedError = !0),\n            console.error(\n              \"React instrumentation encountered an error: %o\",\n              err\n            ));\n        }\n      var prevEffectStart = pushComponentEffectStart(),\n        prevEffectDuration = pushComponentEffectDuration(),\n        prevEffectErrors = pushComponentEffectErrors(),\n        prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate();\n      switch (deletedFiber.tag) {\n        case 26:\n          offscreenSubtreeWasHidden ||\n            safelyDetachRef(deletedFiber, nearestMountedAncestor);\n          recursivelyTraverseDeletionEffects(\n            finishedRoot,\n            nearestMountedAncestor,\n            deletedFiber\n          );\n          deletedFiber.memoizedState\n            ? deletedFiber.memoizedState.count--\n            : deletedFiber.stateNode &&\n              ((finishedRoot = deletedFiber.stateNode),\n              finishedRoot.parentNode.removeChild(finishedRoot));\n          break;\n        case 27:\n          offscreenSubtreeWasHidden ||\n            safelyDetachRef(deletedFiber, nearestMountedAncestor);\n          var prevHostParent = hostParent,\n            prevHostParentIsContainer = hostParentIsContainer;\n          isSingletonScope(deletedFiber.type) &&\n            ((hostParent = deletedFiber.stateNode),\n            (hostParentIsContainer = !1));\n          recursivelyTraverseDeletionEffects(\n            finishedRoot,\n            nearestMountedAncestor,\n            deletedFiber\n          );\n          runWithFiberInDEV(\n            deletedFiber,\n            releaseSingletonInstance,\n            deletedFiber.stateNode\n          );\n          hostParent = prevHostParent;\n          hostParentIsContainer = prevHostParentIsContainer;\n          break;\n        case 5:\n          offscreenSubtreeWasHidden ||\n            safelyDetachRef(deletedFiber, nearestMountedAncestor);\n        case 6:\n          prevHostParent = hostParent;\n          prevHostParentIsContainer = hostParentIsContainer;\n          hostParent = null;\n          recursivelyTraverseDeletionEffects(\n            finishedRoot,\n            nearestMountedAncestor,\n            deletedFiber\n          );\n          hostParent = prevHostParent;\n          hostParentIsContainer = prevHostParentIsContainer;\n          if (null !== hostParent)\n            if (hostParentIsContainer)\n              try {\n                runWithFiberInDEV(\n                  deletedFiber,\n                  removeChildFromContainer,\n                  hostParent,\n                  deletedFiber.stateNode\n                );\n              } catch (error) {\n                captureCommitPhaseError(\n                  deletedFiber,\n                  nearestMountedAncestor,\n                  error\n                );\n              }\n            else\n              try {\n                runWithFiberInDEV(\n                  deletedFiber,\n                  removeChild,\n                  hostParent,\n                  deletedFiber.stateNode\n                );\n              } catch (error) {\n                captureCommitPhaseError(\n                  deletedFiber,\n                  nearestMountedAncestor,\n                  error\n                );\n              }\n          break;\n        case 18:\n          null !== hostParent &&\n            (hostParentIsContainer\n              ? ((finishedRoot = hostParent),\n                clearHydrationBoundary(\n                  9 === finishedRoot.nodeType\n                    ? finishedRoot.body\n                    : \"HTML\" === finishedRoot.nodeName\n                      ? finishedRoot.ownerDocument.body\n                      : finishedRoot,\n                  deletedFiber.stateNode\n                ),\n                retryIfBlockedOn(finishedRoot))\n              : clearHydrationBoundary(hostParent, deletedFiber.stateNode));\n          break;\n        case 4:\n          prevHostParent = hostParent;\n          prevHostParentIsContainer = hostParentIsContainer;\n          hostParent = deletedFiber.stateNode.containerInfo;\n          hostParentIsContainer = !0;\n          recursivelyTraverseDeletionEffects(\n            finishedRoot,\n            nearestMountedAncestor,\n            deletedFiber\n          );\n          hostParent = prevHostParent;\n          hostParentIsContainer = prevHostParentIsContainer;\n          break;\n        case 0:\n        case 11:\n        case 14:\n        case 15:\n          commitHookEffectListUnmount(\n            Insertion,\n            deletedFiber,\n            nearestMountedAncestor\n          );\n          offscreenSubtreeWasHidden ||\n            commitHookLayoutUnmountEffects(\n              deletedFiber,\n              nearestMountedAncestor,\n              Layout\n            );\n          recursivelyTraverseDeletionEffects(\n            finishedRoot,\n            nearestMountedAncestor,\n            deletedFiber\n          );\n          break;\n        case 1:\n          offscreenSubtreeWasHidden ||\n            (safelyDetachRef(deletedFiber, nearestMountedAncestor),\n            (prevHostParent = deletedFiber.stateNode),\n            \"function\" === typeof prevHostParent.componentWillUnmount &&\n              safelyCallComponentWillUnmount(\n                deletedFiber,\n                nearestMountedAncestor,\n                prevHostParent\n              ));\n          recursivelyTraverseDeletionEffects(\n            finishedRoot,\n            nearestMountedAncestor,\n            deletedFiber\n          );\n          break;\n        case 21:\n          recursivelyTraverseDeletionEffects(\n            finishedRoot,\n            nearestMountedAncestor,\n            deletedFiber\n          );\n          break;\n        case 22:\n          offscreenSubtreeWasHidden =\n            (prevHostParent = offscreenSubtreeWasHidden) ||\n            null !== deletedFiber.memoizedState;\n          recursivelyTraverseDeletionEffects(\n            finishedRoot,\n            nearestMountedAncestor,\n            deletedFiber\n          );\n          offscreenSubtreeWasHidden = prevHostParent;\n          break;\n        default:\n          recursivelyTraverseDeletionEffects(\n            finishedRoot,\n            nearestMountedAncestor,\n            deletedFiber\n          );\n      }\n      (deletedFiber.mode & ProfileMode) !== NoMode &&\n        0 <= componentEffectStartTime &&\n        0 <= componentEffectEndTime &&\n        (componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) &&\n        logComponentEffect(\n          deletedFiber,\n          componentEffectStartTime,\n          componentEffectEndTime,\n          componentEffectDuration,\n          componentEffectErrors\n        );\n      popComponentEffectStart(prevEffectStart);\n      popComponentEffectDuration(prevEffectDuration);\n      componentEffectErrors = prevEffectErrors;\n      componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;\n    }\n    function commitActivityHydrationCallbacks(finishedRoot, finishedWork) {\n      if (\n        null === finishedWork.memoizedState &&\n        ((finishedRoot = finishedWork.alternate),\n        null !== finishedRoot &&\n          ((finishedRoot = finishedRoot.memoizedState), null !== finishedRoot))\n      ) {\n        finishedRoot = finishedRoot.dehydrated;\n        try {\n          runWithFiberInDEV(\n            finishedWork,\n            commitHydratedActivityInstance,\n            finishedRoot\n          );\n        } catch (error) {\n          captureCommitPhaseError(finishedWork, finishedWork.return, error);\n        }\n      }\n    }\n    function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) {\n      if (\n        null === finishedWork.memoizedState &&\n        ((finishedRoot = finishedWork.alternate),\n        null !== finishedRoot &&\n          ((finishedRoot = finishedRoot.memoizedState),\n          null !== finishedRoot &&\n            ((finishedRoot = finishedRoot.dehydrated), null !== finishedRoot)))\n      )\n        try {\n          runWithFiberInDEV(\n            finishedWork,\n            commitHydratedSuspenseInstance,\n            finishedRoot\n          );\n        } catch (error) {\n          captureCommitPhaseError(finishedWork, finishedWork.return, error);\n        }\n    }\n    function getRetryCache(finishedWork) {\n      switch (finishedWork.tag) {\n        case 31:\n        case 13:\n        case 19:\n          var retryCache = finishedWork.stateNode;\n          null === retryCache &&\n            (retryCache = finishedWork.stateNode = new PossiblyWeakSet());\n          return retryCache;\n        case 22:\n          return (\n            (finishedWork = finishedWork.stateNode),\n            (retryCache = finishedWork._retryCache),\n            null === retryCache &&\n              (retryCache = finishedWork._retryCache = new PossiblyWeakSet()),\n            retryCache\n          );\n        default:\n          throw Error(\n            \"Unexpected Suspense handler tag (\" +\n              finishedWork.tag +\n              \"). This is a bug in React.\"\n          );\n      }\n    }\n    function attachSuspenseRetryListeners(finishedWork, wakeables) {\n      var retryCache = getRetryCache(finishedWork);\n      wakeables.forEach(function (wakeable) {\n        if (!retryCache.has(wakeable)) {\n          retryCache.add(wakeable);\n          if (isDevToolsPresent)\n            if (null !== inProgressLanes && null !== inProgressRoot)\n              restorePendingUpdaters(inProgressRoot, inProgressLanes);\n            else\n              throw Error(\n                \"Expected finished root and lanes to be set. This is a bug in React.\"\n              );\n          var retry = resolveRetryWakeable.bind(null, finishedWork, wakeable);\n          wakeable.then(retry, retry);\n        }\n      });\n    }\n    function recursivelyTraverseMutationEffects(root$jscomp$0, parentFiber) {\n      var deletions = parentFiber.deletions;\n      if (null !== deletions)\n        for (var i = 0; i < deletions.length; i++) {\n          var root = root$jscomp$0,\n            returnFiber = parentFiber,\n            deletedFiber = deletions[i],\n            prevEffectStart = pushComponentEffectStart(),\n            parent = returnFiber;\n          a: for (; null !== parent; ) {\n            switch (parent.tag) {\n              case 27:\n                if (isSingletonScope(parent.type)) {\n                  hostParent = parent.stateNode;\n                  hostParentIsContainer = !1;\n                  break a;\n                }\n                break;\n              case 5:\n                hostParent = parent.stateNode;\n                hostParentIsContainer = !1;\n                break a;\n              case 3:\n              case 4:\n                hostParent = parent.stateNode.containerInfo;\n                hostParentIsContainer = !0;\n                break a;\n            }\n            parent = parent.return;\n          }\n          if (null === hostParent)\n            throw Error(\n              \"Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.\"\n            );\n          commitDeletionEffectsOnFiber(root, returnFiber, deletedFiber);\n          hostParent = null;\n          hostParentIsContainer = !1;\n          (deletedFiber.mode & ProfileMode) !== NoMode &&\n            0 <= componentEffectStartTime &&\n            0 <= componentEffectEndTime &&\n            0.05 < componentEffectEndTime - componentEffectStartTime &&\n            logComponentTrigger(\n              deletedFiber,\n              componentEffectStartTime,\n              componentEffectEndTime,\n              \"Unmount\"\n            );\n          popComponentEffectStart(prevEffectStart);\n          root = deletedFiber;\n          returnFiber = root.alternate;\n          null !== returnFiber && (returnFiber.return = null);\n          root.return = null;\n        }\n      if (parentFiber.subtreeFlags & 13886)\n        for (parentFiber = parentFiber.child; null !== parentFiber; )\n          commitMutationEffectsOnFiber(parentFiber, root$jscomp$0),\n            (parentFiber = parentFiber.sibling);\n    }\n    function commitMutationEffectsOnFiber(finishedWork, root) {\n      var prevEffectStart = pushComponentEffectStart(),\n        prevEffectDuration = pushComponentEffectDuration(),\n        prevEffectErrors = pushComponentEffectErrors(),\n        prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate(),\n        current = finishedWork.alternate,\n        flags = finishedWork.flags;\n      switch (finishedWork.tag) {\n        case 0:\n        case 11:\n        case 14:\n        case 15:\n          recursivelyTraverseMutationEffects(root, finishedWork);\n          commitReconciliationEffects(finishedWork);\n          flags & 4 &&\n            (commitHookEffectListUnmount(\n              Insertion | HasEffect,\n              finishedWork,\n              finishedWork.return\n            ),\n            commitHookEffectListMount(Insertion | HasEffect, finishedWork),\n            commitHookLayoutUnmountEffects(\n              finishedWork,\n              finishedWork.return,\n              Layout | HasEffect\n            ));\n          break;\n        case 1:\n          recursivelyTraverseMutationEffects(root, finishedWork);\n          commitReconciliationEffects(finishedWork);\n          flags & 512 &&\n            (offscreenSubtreeWasHidden ||\n              null === current ||\n              safelyDetachRef(current, current.return));\n          if (\n            flags & 64 &&\n            offscreenSubtreeIsHidden &&\n            ((flags = finishedWork.updateQueue),\n            null !== flags && ((current = flags.callbacks), null !== current))\n          ) {\n            var existingHiddenCallbacks = flags.shared.hiddenCallbacks;\n            flags.shared.hiddenCallbacks =\n              null === existingHiddenCallbacks\n                ? current\n                : existingHiddenCallbacks.concat(current);\n          }\n          break;\n        case 26:\n          existingHiddenCallbacks = currentHoistableRoot;\n          recursivelyTraverseMutationEffects(root, finishedWork);\n          commitReconciliationEffects(finishedWork);\n          flags & 512 &&\n            (offscreenSubtreeWasHidden ||\n              null === current ||\n              safelyDetachRef(current, current.return));\n          if (flags & 4) {\n            var currentResource =\n              null !== current ? current.memoizedState : null;\n            flags = finishedWork.memoizedState;\n            if (null === current)\n              if (null === flags)\n                if (null === finishedWork.stateNode) {\n                  a: {\n                    flags = finishedWork.type;\n                    current = finishedWork.memoizedProps;\n                    existingHiddenCallbacks =\n                      existingHiddenCallbacks.ownerDocument ||\n                      existingHiddenCallbacks;\n                    b: switch (flags) {\n                      case \"title\":\n                        currentResource =\n                          existingHiddenCallbacks.getElementsByTagName(\n                            \"title\"\n                          )[0];\n                        if (\n                          !currentResource ||\n                          currentResource[internalHoistableMarker] ||\n                          currentResource[internalInstanceKey] ||\n                          currentResource.namespaceURI === SVG_NAMESPACE ||\n                          currentResource.hasAttribute(\"itemprop\")\n                        )\n                          (currentResource =\n                            existingHiddenCallbacks.createElement(flags)),\n                            existingHiddenCallbacks.head.insertBefore(\n                              currentResource,\n                              existingHiddenCallbacks.querySelector(\n                                \"head > title\"\n                              )\n                            );\n                        setInitialProperties(currentResource, flags, current);\n                        currentResource[internalInstanceKey] = finishedWork;\n                        markNodeAsHoistable(currentResource);\n                        flags = currentResource;\n                        break a;\n                      case \"link\":\n                        var maybeNodes = getHydratableHoistableCache(\n                          \"link\",\n                          \"href\",\n                          existingHiddenCallbacks\n                        ).get(flags + (current.href || \"\"));\n                        if (maybeNodes)\n                          for (var i = 0; i < maybeNodes.length; i++)\n                            if (\n                              ((currentResource = maybeNodes[i]),\n                              currentResource.getAttribute(\"href\") ===\n                                (null == current.href || \"\" === current.href\n                                  ? null\n                                  : current.href) &&\n                                currentResource.getAttribute(\"rel\") ===\n                                  (null == current.rel ? null : current.rel) &&\n                                currentResource.getAttribute(\"title\") ===\n                                  (null == current.title\n                                    ? null\n                                    : current.title) &&\n                                currentResource.getAttribute(\"crossorigin\") ===\n                                  (null == current.crossOrigin\n                                    ? null\n                                    : current.crossOrigin))\n                            ) {\n                              maybeNodes.splice(i, 1);\n                              break b;\n                            }\n                        currentResource =\n                          existingHiddenCallbacks.createElement(flags);\n                        setInitialProperties(currentResource, flags, current);\n                        existingHiddenCallbacks.head.appendChild(\n                          currentResource\n                        );\n                        break;\n                      case \"meta\":\n                        if (\n                          (maybeNodes = getHydratableHoistableCache(\n                            \"meta\",\n                            \"content\",\n                            existingHiddenCallbacks\n                          ).get(flags + (current.content || \"\")))\n                        )\n                          for (i = 0; i < maybeNodes.length; i++)\n                            if (\n                              ((currentResource = maybeNodes[i]),\n                              checkAttributeStringCoercion(\n                                current.content,\n                                \"content\"\n                              ),\n                              currentResource.getAttribute(\"content\") ===\n                                (null == current.content\n                                  ? null\n                                  : \"\" + current.content) &&\n                                currentResource.getAttribute(\"name\") ===\n                                  (null == current.name\n                                    ? null\n                                    : current.name) &&\n                                currentResource.getAttribute(\"property\") ===\n                                  (null == current.property\n                                    ? null\n                                    : current.property) &&\n                                currentResource.getAttribute(\"http-equiv\") ===\n                                  (null == current.httpEquiv\n                                    ? null\n                                    : current.httpEquiv) &&\n                                currentResource.getAttribute(\"charset\") ===\n                                  (null == current.charSet\n                                    ? null\n                                    : current.charSet))\n                            ) {\n                              maybeNodes.splice(i, 1);\n                              break b;\n                            }\n                        currentResource =\n                          existingHiddenCallbacks.createElement(flags);\n                        setInitialProperties(currentResource, flags, current);\n                        existingHiddenCallbacks.head.appendChild(\n                          currentResource\n                        );\n                        break;\n                      default:\n                        throw Error(\n                          'getNodesForType encountered a type it did not expect: \"' +\n                            flags +\n                            '\". This is a bug in React.'\n                        );\n                    }\n                    currentResource[internalInstanceKey] = finishedWork;\n                    markNodeAsHoistable(currentResource);\n                    flags = currentResource;\n                  }\n                  finishedWork.stateNode = flags;\n                } else\n                  mountHoistable(\n                    existingHiddenCallbacks,\n                    finishedWork.type,\n                    finishedWork.stateNode\n                  );\n              else\n                finishedWork.stateNode = acquireResource(\n                  existingHiddenCallbacks,\n                  flags,\n                  finishedWork.memoizedProps\n                );\n            else\n              currentResource !== flags\n                ? (null === currentResource\n                    ? null !== current.stateNode &&\n                      ((current = current.stateNode),\n                      current.parentNode.removeChild(current))\n                    : currentResource.count--,\n                  null === flags\n                    ? mountHoistable(\n                        existingHiddenCallbacks,\n                        finishedWork.type,\n                        finishedWork.stateNode\n                      )\n                    : acquireResource(\n                        existingHiddenCallbacks,\n                        flags,\n                        finishedWork.memoizedProps\n                      ))\n                : null === flags &&\n                  null !== finishedWork.stateNode &&\n                  commitHostUpdate(\n                    finishedWork,\n                    finishedWork.memoizedProps,\n                    current.memoizedProps\n                  );\n          }\n          break;\n        case 27:\n          recursivelyTraverseMutationEffects(root, finishedWork);\n          commitReconciliationEffects(finishedWork);\n          flags & 512 &&\n            (offscreenSubtreeWasHidden ||\n              null === current ||\n              safelyDetachRef(current, current.return));\n          null !== current &&\n            flags & 4 &&\n            commitHostUpdate(\n              finishedWork,\n              finishedWork.memoizedProps,\n              current.memoizedProps\n            );\n          break;\n        case 5:\n          recursivelyTraverseMutationEffects(root, finishedWork);\n          commitReconciliationEffects(finishedWork);\n          flags & 512 &&\n            (offscreenSubtreeWasHidden ||\n              null === current ||\n              safelyDetachRef(current, current.return));\n          if (finishedWork.flags & 32) {\n            existingHiddenCallbacks = finishedWork.stateNode;\n            try {\n              runWithFiberInDEV(\n                finishedWork,\n                resetTextContent,\n                existingHiddenCallbacks\n              );\n            } catch (error) {\n              captureCommitPhaseError(finishedWork, finishedWork.return, error);\n            }\n          }\n          flags & 4 &&\n            null != finishedWork.stateNode &&\n            ((existingHiddenCallbacks = finishedWork.memoizedProps),\n            commitHostUpdate(\n              finishedWork,\n              existingHiddenCallbacks,\n              null !== current ? current.memoizedProps : existingHiddenCallbacks\n            ));\n          flags & 1024 &&\n            ((needsFormReset = !0),\n            \"form\" !== finishedWork.type &&\n              console.error(\n                \"Unexpected host component type. Expected a form. This is a bug in React.\"\n              ));\n          break;\n        case 6:\n          recursivelyTraverseMutationEffects(root, finishedWork);\n          commitReconciliationEffects(finishedWork);\n          if (flags & 4) {\n            if (null === finishedWork.stateNode)\n              throw Error(\n                \"This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.\"\n              );\n            flags = finishedWork.memoizedProps;\n            current = null !== current ? current.memoizedProps : flags;\n            existingHiddenCallbacks = finishedWork.stateNode;\n            try {\n              runWithFiberInDEV(\n                finishedWork,\n                commitTextUpdate,\n                existingHiddenCallbacks,\n                current,\n                flags\n              );\n            } catch (error) {\n              captureCommitPhaseError(finishedWork, finishedWork.return, error);\n            }\n          }\n          break;\n        case 3:\n          existingHiddenCallbacks = pushNestedEffectDurations();\n          tagCaches = null;\n          currentResource = currentHoistableRoot;\n          currentHoistableRoot = getHoistableRoot(root.containerInfo);\n          recursivelyTraverseMutationEffects(root, finishedWork);\n          currentHoistableRoot = currentResource;\n          commitReconciliationEffects(finishedWork);\n          if (\n            flags & 4 &&\n            null !== current &&\n            current.memoizedState.isDehydrated\n          )\n            try {\n              runWithFiberInDEV(\n                finishedWork,\n                commitHydratedContainer,\n                root.containerInfo\n              );\n            } catch (error) {\n              captureCommitPhaseError(finishedWork, finishedWork.return, error);\n            }\n          needsFormReset &&\n            ((needsFormReset = !1), recursivelyResetForms(finishedWork));\n          root.effectDuration += popNestedEffectDurations(\n            existingHiddenCallbacks\n          );\n          break;\n        case 4:\n          flags = currentHoistableRoot;\n          currentHoistableRoot = getHoistableRoot(\n            finishedWork.stateNode.containerInfo\n          );\n          recursivelyTraverseMutationEffects(root, finishedWork);\n          commitReconciliationEffects(finishedWork);\n          currentHoistableRoot = flags;\n          break;\n        case 12:\n          flags = pushNestedEffectDurations();\n          recursivelyTraverseMutationEffects(root, finishedWork);\n          commitReconciliationEffects(finishedWork);\n          finishedWork.stateNode.effectDuration +=\n            bubbleNestedEffectDurations(flags);\n          break;\n        case 31:\n          recursivelyTraverseMutationEffects(root, finishedWork);\n          commitReconciliationEffects(finishedWork);\n          flags & 4 &&\n            ((flags = finishedWork.updateQueue),\n            null !== flags &&\n              ((finishedWork.updateQueue = null),\n              attachSuspenseRetryListeners(finishedWork, flags)));\n          break;\n        case 13:\n          recursivelyTraverseMutationEffects(root, finishedWork);\n          commitReconciliationEffects(finishedWork);\n          finishedWork.child.flags & 8192 &&\n            (null !== finishedWork.memoizedState) !==\n              (null !== current && null !== current.memoizedState) &&\n            (globalMostRecentFallbackTime = now$1());\n          flags & 4 &&\n            ((flags = finishedWork.updateQueue),\n            null !== flags &&\n              ((finishedWork.updateQueue = null),\n              attachSuspenseRetryListeners(finishedWork, flags)));\n          break;\n        case 22:\n          existingHiddenCallbacks = null !== finishedWork.memoizedState;\n          var wasHidden = null !== current && null !== current.memoizedState,\n            prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden,\n            prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden;\n          offscreenSubtreeIsHidden =\n            prevOffscreenSubtreeIsHidden || existingHiddenCallbacks;\n          offscreenSubtreeWasHidden =\n            prevOffscreenSubtreeWasHidden || wasHidden;\n          recursivelyTraverseMutationEffects(root, finishedWork);\n          offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;\n          offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden;\n          wasHidden &&\n            !existingHiddenCallbacks &&\n            !prevOffscreenSubtreeIsHidden &&\n            !prevOffscreenSubtreeWasHidden &&\n            (finishedWork.mode & ProfileMode) !== NoMode &&\n            0 <= componentEffectStartTime &&\n            0 <= componentEffectEndTime &&\n            0.05 < componentEffectEndTime - componentEffectStartTime &&\n            logComponentReappeared(\n              finishedWork,\n              componentEffectStartTime,\n              componentEffectEndTime\n            );\n          commitReconciliationEffects(finishedWork);\n          if (flags & 8192)\n            a: for (\n              root = finishedWork.stateNode,\n                root._visibility = existingHiddenCallbacks\n                  ? root._visibility & ~OffscreenVisible\n                  : root._visibility | OffscreenVisible,\n                !existingHiddenCallbacks ||\n                  null === current ||\n                  wasHidden ||\n                  offscreenSubtreeIsHidden ||\n                  offscreenSubtreeWasHidden ||\n                  (recursivelyTraverseDisappearLayoutEffects(finishedWork),\n                  (finishedWork.mode & ProfileMode) !== NoMode &&\n                    0 <= componentEffectStartTime &&\n                    0 <= componentEffectEndTime &&\n                    0.05 < componentEffectEndTime - componentEffectStartTime &&\n                    logComponentTrigger(\n                      finishedWork,\n                      componentEffectStartTime,\n                      componentEffectEndTime,\n                      \"Disconnect\"\n                    )),\n                current = null,\n                root = finishedWork;\n              ;\n\n            ) {\n              if (5 === root.tag || 26 === root.tag) {\n                if (null === current) {\n                  wasHidden = current = root;\n                  try {\n                    (currentResource = wasHidden.stateNode),\n                      existingHiddenCallbacks\n                        ? runWithFiberInDEV(\n                            wasHidden,\n                            hideInstance,\n                            currentResource\n                          )\n                        : runWithFiberInDEV(\n                            wasHidden,\n                            unhideInstance,\n                            wasHidden.stateNode,\n                            wasHidden.memoizedProps\n                          );\n                  } catch (error) {\n                    captureCommitPhaseError(wasHidden, wasHidden.return, error);\n                  }\n                }\n              } else if (6 === root.tag) {\n                if (null === current) {\n                  wasHidden = root;\n                  try {\n                    (maybeNodes = wasHidden.stateNode),\n                      existingHiddenCallbacks\n                        ? runWithFiberInDEV(\n                            wasHidden,\n                            hideTextInstance,\n                            maybeNodes\n                          )\n                        : runWithFiberInDEV(\n                            wasHidden,\n                            unhideTextInstance,\n                            maybeNodes,\n                            wasHidden.memoizedProps\n                          );\n                  } catch (error) {\n                    captureCommitPhaseError(wasHidden, wasHidden.return, error);\n                  }\n                }\n              } else if (18 === root.tag) {\n                if (null === current) {\n                  wasHidden = root;\n                  try {\n                    (i = wasHidden.stateNode),\n                      existingHiddenCallbacks\n                        ? runWithFiberInDEV(\n                            wasHidden,\n                            hideDehydratedBoundary,\n                            i\n                          )\n                        : runWithFiberInDEV(\n                            wasHidden,\n                            unhideDehydratedBoundary,\n                            wasHidden.stateNode\n                          );\n                  } catch (error) {\n                    captureCommitPhaseError(wasHidden, wasHidden.return, error);\n                  }\n                }\n              } else if (\n                ((22 !== root.tag && 23 !== root.tag) ||\n                  null === root.memoizedState ||\n                  root === finishedWork) &&\n                null !== root.child\n              ) {\n                root.child.return = root;\n                root = root.child;\n                continue;\n              }\n              if (root === finishedWork) break a;\n              for (; null === root.sibling; ) {\n                if (null === root.return || root.return === finishedWork)\n                  break a;\n                current === root && (current = null);\n                root = root.return;\n              }\n              current === root && (current = null);\n              root.sibling.return = root.return;\n              root = root.sibling;\n            }\n          flags & 4 &&\n            ((flags = finishedWork.updateQueue),\n            null !== flags &&\n              ((current = flags.retryQueue),\n              null !== current &&\n                ((flags.retryQueue = null),\n                attachSuspenseRetryListeners(finishedWork, current))));\n          break;\n        case 19:\n          recursivelyTraverseMutationEffects(root, finishedWork);\n          commitReconciliationEffects(finishedWork);\n          flags & 4 &&\n            ((flags = finishedWork.updateQueue),\n            null !== flags &&\n              ((finishedWork.updateQueue = null),\n              attachSuspenseRetryListeners(finishedWork, flags)));\n          break;\n        case 30:\n          break;\n        case 21:\n          break;\n        default:\n          recursivelyTraverseMutationEffects(root, finishedWork),\n            commitReconciliationEffects(finishedWork);\n      }\n      (finishedWork.mode & ProfileMode) !== NoMode &&\n        0 <= componentEffectStartTime &&\n        0 <= componentEffectEndTime &&\n        ((componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) &&\n          logComponentEffect(\n            finishedWork,\n            componentEffectStartTime,\n            componentEffectEndTime,\n            componentEffectDuration,\n            componentEffectErrors\n          ),\n        null === finishedWork.alternate &&\n          null !== finishedWork.return &&\n          null !== finishedWork.return.alternate &&\n          0.05 < componentEffectEndTime - componentEffectStartTime &&\n          (isHydratingParent(\n            finishedWork.return.alternate,\n            finishedWork.return\n          ) ||\n            logComponentTrigger(\n              finishedWork,\n              componentEffectStartTime,\n              componentEffectEndTime,\n              \"Mount\"\n            )));\n      popComponentEffectStart(prevEffectStart);\n      popComponentEffectDuration(prevEffectDuration);\n      componentEffectErrors = prevEffectErrors;\n      componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;\n    }\n    function commitReconciliationEffects(finishedWork) {\n      var flags = finishedWork.flags;\n      if (flags & 2) {\n        try {\n          runWithFiberInDEV(finishedWork, commitPlacement, finishedWork);\n        } catch (error) {\n          captureCommitPhaseError(finishedWork, finishedWork.return, error);\n        }\n        finishedWork.flags &= -3;\n      }\n      flags & 4096 && (finishedWork.flags &= -4097);\n    }\n    function recursivelyResetForms(parentFiber) {\n      if (parentFiber.subtreeFlags & 1024)\n        for (parentFiber = parentFiber.child; null !== parentFiber; ) {\n          var fiber = parentFiber;\n          recursivelyResetForms(fiber);\n          5 === fiber.tag && fiber.flags & 1024 && fiber.stateNode.reset();\n          parentFiber = parentFiber.sibling;\n        }\n    }\n    function recursivelyTraverseLayoutEffects(root, parentFiber) {\n      if (parentFiber.subtreeFlags & 8772)\n        for (parentFiber = parentFiber.child; null !== parentFiber; )\n          commitLayoutEffectOnFiber(root, parentFiber.alternate, parentFiber),\n            (parentFiber = parentFiber.sibling);\n    }\n    function disappearLayoutEffects(finishedWork) {\n      var prevEffectStart = pushComponentEffectStart(),\n        prevEffectDuration = pushComponentEffectDuration(),\n        prevEffectErrors = pushComponentEffectErrors(),\n        prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate();\n      switch (finishedWork.tag) {\n        case 0:\n        case 11:\n        case 14:\n        case 15:\n          commitHookLayoutUnmountEffects(\n            finishedWork,\n            finishedWork.return,\n            Layout\n          );\n          recursivelyTraverseDisappearLayoutEffects(finishedWork);\n          break;\n        case 1:\n          safelyDetachRef(finishedWork, finishedWork.return);\n          var instance = finishedWork.stateNode;\n          \"function\" === typeof instance.componentWillUnmount &&\n            safelyCallComponentWillUnmount(\n              finishedWork,\n              finishedWork.return,\n              instance\n            );\n          recursivelyTraverseDisappearLayoutEffects(finishedWork);\n          break;\n        case 27:\n          runWithFiberInDEV(\n            finishedWork,\n            releaseSingletonInstance,\n            finishedWork.stateNode\n          );\n        case 26:\n        case 5:\n          safelyDetachRef(finishedWork, finishedWork.return);\n          recursivelyTraverseDisappearLayoutEffects(finishedWork);\n          break;\n        case 22:\n          null === finishedWork.memoizedState &&\n            recursivelyTraverseDisappearLayoutEffects(finishedWork);\n          break;\n        case 30:\n          recursivelyTraverseDisappearLayoutEffects(finishedWork);\n          break;\n        default:\n          recursivelyTraverseDisappearLayoutEffects(finishedWork);\n      }\n      (finishedWork.mode & ProfileMode) !== NoMode &&\n        0 <= componentEffectStartTime &&\n        0 <= componentEffectEndTime &&\n        (componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) &&\n        logComponentEffect(\n          finishedWork,\n          componentEffectStartTime,\n          componentEffectEndTime,\n          componentEffectDuration,\n          componentEffectErrors\n        );\n      popComponentEffectStart(prevEffectStart);\n      popComponentEffectDuration(prevEffectDuration);\n      componentEffectErrors = prevEffectErrors;\n      componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;\n    }\n    function recursivelyTraverseDisappearLayoutEffects(parentFiber) {\n      for (parentFiber = parentFiber.child; null !== parentFiber; )\n        disappearLayoutEffects(parentFiber),\n          (parentFiber = parentFiber.sibling);\n    }\n    function reappearLayoutEffects(\n      finishedRoot,\n      current,\n      finishedWork,\n      includeWorkInProgressEffects\n    ) {\n      var prevEffectStart = pushComponentEffectStart(),\n        prevEffectDuration = pushComponentEffectDuration(),\n        prevEffectErrors = pushComponentEffectErrors(),\n        prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate(),\n        flags = finishedWork.flags;\n      switch (finishedWork.tag) {\n        case 0:\n        case 11:\n        case 15:\n          recursivelyTraverseReappearLayoutEffects(\n            finishedRoot,\n            finishedWork,\n            includeWorkInProgressEffects\n          );\n          commitHookLayoutEffects(finishedWork, Layout);\n          break;\n        case 1:\n          recursivelyTraverseReappearLayoutEffects(\n            finishedRoot,\n            finishedWork,\n            includeWorkInProgressEffects\n          );\n          current = finishedWork.stateNode;\n          \"function\" === typeof current.componentDidMount &&\n            runWithFiberInDEV(\n              finishedWork,\n              callComponentDidMountInDEV,\n              finishedWork,\n              current\n            );\n          current = finishedWork.updateQueue;\n          if (null !== current) {\n            finishedRoot = finishedWork.stateNode;\n            try {\n              runWithFiberInDEV(\n                finishedWork,\n                commitHiddenCallbacks,\n                current,\n                finishedRoot\n              );\n            } catch (error) {\n              captureCommitPhaseError(finishedWork, finishedWork.return, error);\n            }\n          }\n          includeWorkInProgressEffects &&\n            flags & 64 &&\n            commitClassCallbacks(finishedWork);\n          safelyAttachRef(finishedWork, finishedWork.return);\n          break;\n        case 27:\n          commitHostSingletonAcquisition(finishedWork);\n        case 26:\n        case 5:\n          recursivelyTraverseReappearLayoutEffects(\n            finishedRoot,\n            finishedWork,\n            includeWorkInProgressEffects\n          );\n          includeWorkInProgressEffects &&\n            null === current &&\n            flags & 4 &&\n            commitHostMount(finishedWork);\n          safelyAttachRef(finishedWork, finishedWork.return);\n          break;\n        case 12:\n          if (includeWorkInProgressEffects && flags & 4) {\n            flags = pushNestedEffectDurations();\n            recursivelyTraverseReappearLayoutEffects(\n              finishedRoot,\n              finishedWork,\n              includeWorkInProgressEffects\n            );\n            includeWorkInProgressEffects = finishedWork.stateNode;\n            includeWorkInProgressEffects.effectDuration +=\n              bubbleNestedEffectDurations(flags);\n            try {\n              runWithFiberInDEV(\n                finishedWork,\n                commitProfiler,\n                finishedWork,\n                current,\n                commitStartTime,\n                includeWorkInProgressEffects.effectDuration\n              );\n            } catch (error) {\n              captureCommitPhaseError(finishedWork, finishedWork.return, error);\n            }\n          } else\n            recursivelyTraverseReappearLayoutEffects(\n              finishedRoot,\n              finishedWork,\n              includeWorkInProgressEffects\n            );\n          break;\n        case 31:\n          recursivelyTraverseReappearLayoutEffects(\n            finishedRoot,\n            finishedWork,\n            includeWorkInProgressEffects\n          );\n          includeWorkInProgressEffects &&\n            flags & 4 &&\n            commitActivityHydrationCallbacks(finishedRoot, finishedWork);\n          break;\n        case 13:\n          recursivelyTraverseReappearLayoutEffects(\n            finishedRoot,\n            finishedWork,\n            includeWorkInProgressEffects\n          );\n          includeWorkInProgressEffects &&\n            flags & 4 &&\n            commitSuspenseHydrationCallbacks(finishedRoot, finishedWork);\n          break;\n        case 22:\n          null === finishedWork.memoizedState &&\n            recursivelyTraverseReappearLayoutEffects(\n              finishedRoot,\n              finishedWork,\n              includeWorkInProgressEffects\n            );\n          safelyAttachRef(finishedWork, finishedWork.return);\n          break;\n        case 30:\n          break;\n        default:\n          recursivelyTraverseReappearLayoutEffects(\n            finishedRoot,\n            finishedWork,\n            includeWorkInProgressEffects\n          );\n      }\n      (finishedWork.mode & ProfileMode) !== NoMode &&\n        0 <= componentEffectStartTime &&\n        0 <= componentEffectEndTime &&\n        (componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) &&\n        logComponentEffect(\n          finishedWork,\n          componentEffectStartTime,\n          componentEffectEndTime,\n          componentEffectDuration,\n          componentEffectErrors\n        );\n      popComponentEffectStart(prevEffectStart);\n      popComponentEffectDuration(prevEffectDuration);\n      componentEffectErrors = prevEffectErrors;\n      componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;\n    }\n    function recursivelyTraverseReappearLayoutEffects(\n      finishedRoot,\n      parentFiber,\n      includeWorkInProgressEffects\n    ) {\n      includeWorkInProgressEffects =\n        includeWorkInProgressEffects && 0 !== (parentFiber.subtreeFlags & 8772);\n      for (parentFiber = parentFiber.child; null !== parentFiber; )\n        reappearLayoutEffects(\n          finishedRoot,\n          parentFiber.alternate,\n          parentFiber,\n          includeWorkInProgressEffects\n        ),\n          (parentFiber = parentFiber.sibling);\n    }\n    function commitOffscreenPassiveMountEffects(current, finishedWork) {\n      var previousCache = null;\n      null !== current &&\n        null !== current.memoizedState &&\n        null !== current.memoizedState.cachePool &&\n        (previousCache = current.memoizedState.cachePool.pool);\n      current = null;\n      null !== finishedWork.memoizedState &&\n        null !== finishedWork.memoizedState.cachePool &&\n        (current = finishedWork.memoizedState.cachePool.pool);\n      current !== previousCache &&\n        (null != current && retainCache(current),\n        null != previousCache && releaseCache(previousCache));\n    }\n    function commitCachePassiveMountEffect(current, finishedWork) {\n      current = null;\n      null !== finishedWork.alternate &&\n        (current = finishedWork.alternate.memoizedState.cache);\n      finishedWork = finishedWork.memoizedState.cache;\n      finishedWork !== current &&\n        (retainCache(finishedWork), null != current && releaseCache(current));\n    }\n    function recursivelyTraversePassiveMountEffects(\n      root,\n      parentFiber,\n      committedLanes,\n      committedTransitions,\n      endTime\n    ) {\n      if (\n        parentFiber.subtreeFlags & 10256 ||\n        (0 !== parentFiber.actualDuration &&\n          (null === parentFiber.alternate ||\n            parentFiber.alternate.child !== parentFiber.child))\n      )\n        for (parentFiber = parentFiber.child; null !== parentFiber; ) {\n          var nextSibling = parentFiber.sibling;\n          commitPassiveMountOnFiber(\n            root,\n            parentFiber,\n            committedLanes,\n            committedTransitions,\n            null !== nextSibling ? nextSibling.actualStartTime : endTime\n          );\n          parentFiber = nextSibling;\n        }\n    }\n    function commitPassiveMountOnFiber(\n      finishedRoot,\n      finishedWork,\n      committedLanes,\n      committedTransitions,\n      endTime\n    ) {\n      var prevEffectStart = pushComponentEffectStart(),\n        prevEffectDuration = pushComponentEffectDuration(),\n        prevEffectErrors = pushComponentEffectErrors(),\n        prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate(),\n        prevDeepEquality = alreadyWarnedForDeepEquality,\n        flags = finishedWork.flags;\n      switch (finishedWork.tag) {\n        case 0:\n        case 11:\n        case 15:\n          (finishedWork.mode & ProfileMode) !== NoMode &&\n            0 < finishedWork.actualStartTime &&\n            0 !== (finishedWork.flags & 1) &&\n            logComponentRender(\n              finishedWork,\n              finishedWork.actualStartTime,\n              endTime,\n              inHydratedSubtree,\n              committedLanes\n            );\n          recursivelyTraversePassiveMountEffects(\n            finishedRoot,\n            finishedWork,\n            committedLanes,\n            committedTransitions,\n            endTime\n          );\n          flags & 2048 &&\n            commitHookPassiveMountEffects(finishedWork, Passive | HasEffect);\n          break;\n        case 1:\n          (finishedWork.mode & ProfileMode) !== NoMode &&\n            0 < finishedWork.actualStartTime &&\n            (0 !== (finishedWork.flags & 128)\n              ? logComponentErrored(\n                  finishedWork,\n                  finishedWork.actualStartTime,\n                  endTime,\n                  []\n                )\n              : 0 !== (finishedWork.flags & 1) &&\n                logComponentRender(\n                  finishedWork,\n                  finishedWork.actualStartTime,\n                  endTime,\n                  inHydratedSubtree,\n                  committedLanes\n                ));\n          recursivelyTraversePassiveMountEffects(\n            finishedRoot,\n            finishedWork,\n            committedLanes,\n            committedTransitions,\n            endTime\n          );\n          break;\n        case 3:\n          var prevProfilerEffectDuration = pushNestedEffectDurations(),\n            wasInHydratedSubtree = inHydratedSubtree;\n          inHydratedSubtree =\n            null !== finishedWork.alternate &&\n            finishedWork.alternate.memoizedState.isDehydrated &&\n            0 === (finishedWork.flags & 256);\n          recursivelyTraversePassiveMountEffects(\n            finishedRoot,\n            finishedWork,\n            committedLanes,\n            committedTransitions,\n            endTime\n          );\n          inHydratedSubtree = wasInHydratedSubtree;\n          flags & 2048 &&\n            ((committedLanes = null),\n            null !== finishedWork.alternate &&\n              (committedLanes = finishedWork.alternate.memoizedState.cache),\n            (committedTransitions = finishedWork.memoizedState.cache),\n            committedTransitions !== committedLanes &&\n              (retainCache(committedTransitions),\n              null != committedLanes && releaseCache(committedLanes)));\n          finishedRoot.passiveEffectDuration += popNestedEffectDurations(\n            prevProfilerEffectDuration\n          );\n          break;\n        case 12:\n          if (flags & 2048) {\n            flags = pushNestedEffectDurations();\n            recursivelyTraversePassiveMountEffects(\n              finishedRoot,\n              finishedWork,\n              committedLanes,\n              committedTransitions,\n              endTime\n            );\n            finishedRoot = finishedWork.stateNode;\n            finishedRoot.passiveEffectDuration +=\n              bubbleNestedEffectDurations(flags);\n            try {\n              runWithFiberInDEV(\n                finishedWork,\n                commitProfilerPostCommitImpl,\n                finishedWork,\n                finishedWork.alternate,\n                commitStartTime,\n                finishedRoot.passiveEffectDuration\n              );\n            } catch (error) {\n              captureCommitPhaseError(finishedWork, finishedWork.return, error);\n            }\n          } else\n            recursivelyTraversePassiveMountEffects(\n              finishedRoot,\n              finishedWork,\n              committedLanes,\n              committedTransitions,\n              endTime\n            );\n          break;\n        case 31:\n          flags = inHydratedSubtree;\n          prevProfilerEffectDuration =\n            null !== finishedWork.alternate\n              ? finishedWork.alternate.memoizedState\n              : null;\n          wasInHydratedSubtree = finishedWork.memoizedState;\n          null !== prevProfilerEffectDuration && null === wasInHydratedSubtree\n            ? ((wasInHydratedSubtree = finishedWork.deletions),\n              null !== wasInHydratedSubtree &&\n              0 < wasInHydratedSubtree.length &&\n              18 === wasInHydratedSubtree[0].tag\n                ? ((inHydratedSubtree = !1),\n                  (prevProfilerEffectDuration =\n                    prevProfilerEffectDuration.hydrationErrors),\n                  null !== prevProfilerEffectDuration &&\n                    logComponentErrored(\n                      finishedWork,\n                      finishedWork.actualStartTime,\n                      endTime,\n                      prevProfilerEffectDuration\n                    ))\n                : (inHydratedSubtree = !0))\n            : (inHydratedSubtree = !1);\n          recursivelyTraversePassiveMountEffects(\n            finishedRoot,\n            finishedWork,\n            committedLanes,\n            committedTransitions,\n            endTime\n          );\n          inHydratedSubtree = flags;\n          break;\n        case 13:\n          flags = inHydratedSubtree;\n          prevProfilerEffectDuration =\n            null !== finishedWork.alternate\n              ? finishedWork.alternate.memoizedState\n              : null;\n          wasInHydratedSubtree = finishedWork.memoizedState;\n          null === prevProfilerEffectDuration ||\n          null === prevProfilerEffectDuration.dehydrated ||\n          (null !== wasInHydratedSubtree &&\n            null !== wasInHydratedSubtree.dehydrated)\n            ? (inHydratedSubtree = !1)\n            : ((wasInHydratedSubtree = finishedWork.deletions),\n              null !== wasInHydratedSubtree &&\n              0 < wasInHydratedSubtree.length &&\n              18 === wasInHydratedSubtree[0].tag\n                ? ((inHydratedSubtree = !1),\n                  (prevProfilerEffectDuration =\n                    prevProfilerEffectDuration.hydrationErrors),\n                  null !== prevProfilerEffectDuration &&\n                    logComponentErrored(\n                      finishedWork,\n                      finishedWork.actualStartTime,\n                      endTime,\n                      prevProfilerEffectDuration\n                    ))\n                : (inHydratedSubtree = !0));\n          recursivelyTraversePassiveMountEffects(\n            finishedRoot,\n            finishedWork,\n            committedLanes,\n            committedTransitions,\n            endTime\n          );\n          inHydratedSubtree = flags;\n          break;\n        case 23:\n          break;\n        case 22:\n          wasInHydratedSubtree = finishedWork.stateNode;\n          prevProfilerEffectDuration = finishedWork.alternate;\n          null !== finishedWork.memoizedState\n            ? wasInHydratedSubtree._visibility &\n              OffscreenPassiveEffectsConnected\n              ? recursivelyTraversePassiveMountEffects(\n                  finishedRoot,\n                  finishedWork,\n                  committedLanes,\n                  committedTransitions,\n                  endTime\n                )\n              : recursivelyTraverseAtomicPassiveEffects(\n                  finishedRoot,\n                  finishedWork,\n                  committedLanes,\n                  committedTransitions,\n                  endTime\n                )\n            : wasInHydratedSubtree._visibility &\n                OffscreenPassiveEffectsConnected\n              ? recursivelyTraversePassiveMountEffects(\n                  finishedRoot,\n                  finishedWork,\n                  committedLanes,\n                  committedTransitions,\n                  endTime\n                )\n              : ((wasInHydratedSubtree._visibility |=\n                  OffscreenPassiveEffectsConnected),\n                recursivelyTraverseReconnectPassiveEffects(\n                  finishedRoot,\n                  finishedWork,\n                  committedLanes,\n                  committedTransitions,\n                  0 !== (finishedWork.subtreeFlags & 10256) ||\n                    (0 !== finishedWork.actualDuration &&\n                      (null === finishedWork.alternate ||\n                        finishedWork.alternate.child !== finishedWork.child)),\n                  endTime\n                ),\n                (finishedWork.mode & ProfileMode) === NoMode ||\n                  inHydratedSubtree ||\n                  ((finishedRoot = finishedWork.actualStartTime),\n                  0 <= finishedRoot &&\n                    0.05 < endTime - finishedRoot &&\n                    logComponentReappeared(finishedWork, finishedRoot, endTime),\n                  0 <= componentEffectStartTime &&\n                    0 <= componentEffectEndTime &&\n                    0.05 < componentEffectEndTime - componentEffectStartTime &&\n                    logComponentReappeared(\n                      finishedWork,\n                      componentEffectStartTime,\n                      componentEffectEndTime\n                    )));\n          flags & 2048 &&\n            commitOffscreenPassiveMountEffects(\n              prevProfilerEffectDuration,\n              finishedWork\n            );\n          break;\n        case 24:\n          recursivelyTraversePassiveMountEffects(\n            finishedRoot,\n            finishedWork,\n            committedLanes,\n            committedTransitions,\n            endTime\n          );\n          flags & 2048 &&\n            commitCachePassiveMountEffect(finishedWork.alternate, finishedWork);\n          break;\n        default:\n          recursivelyTraversePassiveMountEffects(\n            finishedRoot,\n            finishedWork,\n            committedLanes,\n            committedTransitions,\n            endTime\n          );\n      }\n      if ((finishedWork.mode & ProfileMode) !== NoMode) {\n        if (\n          (finishedRoot =\n            !inHydratedSubtree &&\n            null === finishedWork.alternate &&\n            null !== finishedWork.return &&\n            null !== finishedWork.return.alternate)\n        )\n          (committedLanes = finishedWork.actualStartTime),\n            0 <= committedLanes &&\n              0.05 < endTime - committedLanes &&\n              logComponentTrigger(\n                finishedWork,\n                committedLanes,\n                endTime,\n                \"Mount\"\n              );\n        0 <= componentEffectStartTime &&\n          0 <= componentEffectEndTime &&\n          ((componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) &&\n            logComponentEffect(\n              finishedWork,\n              componentEffectStartTime,\n              componentEffectEndTime,\n              componentEffectDuration,\n              componentEffectErrors\n            ),\n          finishedRoot &&\n            0.05 < componentEffectEndTime - componentEffectStartTime &&\n            logComponentTrigger(\n              finishedWork,\n              componentEffectStartTime,\n              componentEffectEndTime,\n              \"Mount\"\n            ));\n      }\n      popComponentEffectStart(prevEffectStart);\n      popComponentEffectDuration(prevEffectDuration);\n      componentEffectErrors = prevEffectErrors;\n      componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;\n      alreadyWarnedForDeepEquality = prevDeepEquality;\n    }\n    function recursivelyTraverseReconnectPassiveEffects(\n      finishedRoot,\n      parentFiber,\n      committedLanes,\n      committedTransitions,\n      includeWorkInProgressEffects,\n      endTime\n    ) {\n      includeWorkInProgressEffects =\n        includeWorkInProgressEffects &&\n        (0 !== (parentFiber.subtreeFlags & 10256) ||\n          (0 !== parentFiber.actualDuration &&\n            (null === parentFiber.alternate ||\n              parentFiber.alternate.child !== parentFiber.child)));\n      for (parentFiber = parentFiber.child; null !== parentFiber; ) {\n        var nextSibling = parentFiber.sibling;\n        reconnectPassiveEffects(\n          finishedRoot,\n          parentFiber,\n          committedLanes,\n          committedTransitions,\n          includeWorkInProgressEffects,\n          null !== nextSibling ? nextSibling.actualStartTime : endTime\n        );\n        parentFiber = nextSibling;\n      }\n    }\n    function reconnectPassiveEffects(\n      finishedRoot,\n      finishedWork,\n      committedLanes,\n      committedTransitions,\n      includeWorkInProgressEffects,\n      endTime\n    ) {\n      var prevEffectStart = pushComponentEffectStart(),\n        prevEffectDuration = pushComponentEffectDuration(),\n        prevEffectErrors = pushComponentEffectErrors(),\n        prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate(),\n        prevDeepEquality = alreadyWarnedForDeepEquality;\n      includeWorkInProgressEffects &&\n        (finishedWork.mode & ProfileMode) !== NoMode &&\n        0 < finishedWork.actualStartTime &&\n        0 !== (finishedWork.flags & 1) &&\n        logComponentRender(\n          finishedWork,\n          finishedWork.actualStartTime,\n          endTime,\n          inHydratedSubtree,\n          committedLanes\n        );\n      var flags = finishedWork.flags;\n      switch (finishedWork.tag) {\n        case 0:\n        case 11:\n        case 15:\n          recursivelyTraverseReconnectPassiveEffects(\n            finishedRoot,\n            finishedWork,\n            committedLanes,\n            committedTransitions,\n            includeWorkInProgressEffects,\n            endTime\n          );\n          commitHookPassiveMountEffects(finishedWork, Passive);\n          break;\n        case 23:\n          break;\n        case 22:\n          var _instance2 = finishedWork.stateNode;\n          null !== finishedWork.memoizedState\n            ? _instance2._visibility & OffscreenPassiveEffectsConnected\n              ? recursivelyTraverseReconnectPassiveEffects(\n                  finishedRoot,\n                  finishedWork,\n                  committedLanes,\n                  committedTransitions,\n                  includeWorkInProgressEffects,\n                  endTime\n                )\n              : recursivelyTraverseAtomicPassiveEffects(\n                  finishedRoot,\n                  finishedWork,\n                  committedLanes,\n                  committedTransitions,\n                  endTime\n                )\n            : ((_instance2._visibility |= OffscreenPassiveEffectsConnected),\n              recursivelyTraverseReconnectPassiveEffects(\n                finishedRoot,\n                finishedWork,\n                committedLanes,\n                committedTransitions,\n                includeWorkInProgressEffects,\n                endTime\n              ));\n          includeWorkInProgressEffects &&\n            flags & 2048 &&\n            commitOffscreenPassiveMountEffects(\n              finishedWork.alternate,\n              finishedWork\n            );\n          break;\n        case 24:\n          recursivelyTraverseReconnectPassiveEffects(\n            finishedRoot,\n            finishedWork,\n            committedLanes,\n            committedTransitions,\n            includeWorkInProgressEffects,\n            endTime\n          );\n          includeWorkInProgressEffects &&\n            flags & 2048 &&\n            commitCachePassiveMountEffect(finishedWork.alternate, finishedWork);\n          break;\n        default:\n          recursivelyTraverseReconnectPassiveEffects(\n            finishedRoot,\n            finishedWork,\n            committedLanes,\n            committedTransitions,\n            includeWorkInProgressEffects,\n            endTime\n          );\n      }\n      (finishedWork.mode & ProfileMode) !== NoMode &&\n        0 <= componentEffectStartTime &&\n        0 <= componentEffectEndTime &&\n        (componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) &&\n        logComponentEffect(\n          finishedWork,\n          componentEffectStartTime,\n          componentEffectEndTime,\n          componentEffectDuration,\n          componentEffectErrors\n        );\n      popComponentEffectStart(prevEffectStart);\n      popComponentEffectDuration(prevEffectDuration);\n      componentEffectErrors = prevEffectErrors;\n      componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;\n      alreadyWarnedForDeepEquality = prevDeepEquality;\n    }\n    function recursivelyTraverseAtomicPassiveEffects(\n      finishedRoot$jscomp$0,\n      parentFiber,\n      committedLanes$jscomp$0,\n      committedTransitions$jscomp$0,\n      endTime$jscomp$0\n    ) {\n      if (\n        parentFiber.subtreeFlags & 10256 ||\n        (0 !== parentFiber.actualDuration &&\n          (null === parentFiber.alternate ||\n            parentFiber.alternate.child !== parentFiber.child))\n      )\n        for (var child = parentFiber.child; null !== child; ) {\n          parentFiber = child.sibling;\n          var finishedRoot = finishedRoot$jscomp$0,\n            committedLanes = committedLanes$jscomp$0,\n            committedTransitions = committedTransitions$jscomp$0,\n            endTime =\n              null !== parentFiber\n                ? parentFiber.actualStartTime\n                : endTime$jscomp$0,\n            prevDeepEquality = alreadyWarnedForDeepEquality;\n          (child.mode & ProfileMode) !== NoMode &&\n            0 < child.actualStartTime &&\n            0 !== (child.flags & 1) &&\n            logComponentRender(\n              child,\n              child.actualStartTime,\n              endTime,\n              inHydratedSubtree,\n              committedLanes\n            );\n          var flags = child.flags;\n          switch (child.tag) {\n            case 22:\n              recursivelyTraverseAtomicPassiveEffects(\n                finishedRoot,\n                child,\n                committedLanes,\n                committedTransitions,\n                endTime\n              );\n              flags & 2048 &&\n                commitOffscreenPassiveMountEffects(child.alternate, child);\n              break;\n            case 24:\n              recursivelyTraverseAtomicPassiveEffects(\n                finishedRoot,\n                child,\n                committedLanes,\n                committedTransitions,\n                endTime\n              );\n              flags & 2048 &&\n                commitCachePassiveMountEffect(child.alternate, child);\n              break;\n            default:\n              recursivelyTraverseAtomicPassiveEffects(\n                finishedRoot,\n                child,\n                committedLanes,\n                committedTransitions,\n                endTime\n              );\n          }\n          alreadyWarnedForDeepEquality = prevDeepEquality;\n          child = parentFiber;\n        }\n    }\n    function recursivelyAccumulateSuspenseyCommit(\n      parentFiber,\n      committedLanes,\n      suspendedState\n    ) {\n      if (parentFiber.subtreeFlags & suspenseyCommitFlag)\n        for (parentFiber = parentFiber.child; null !== parentFiber; )\n          accumulateSuspenseyCommitOnFiber(\n            parentFiber,\n            committedLanes,\n            suspendedState\n          ),\n            (parentFiber = parentFiber.sibling);\n    }\n    function accumulateSuspenseyCommitOnFiber(\n      fiber,\n      committedLanes,\n      suspendedState\n    ) {\n      switch (fiber.tag) {\n        case 26:\n          recursivelyAccumulateSuspenseyCommit(\n            fiber,\n            committedLanes,\n            suspendedState\n          );\n          fiber.flags & suspenseyCommitFlag &&\n            null !== fiber.memoizedState &&\n            suspendResource(\n              suspendedState,\n              currentHoistableRoot,\n              fiber.memoizedState,\n              fiber.memoizedProps\n            );\n          break;\n        case 5:\n          recursivelyAccumulateSuspenseyCommit(\n            fiber,\n            committedLanes,\n            suspendedState\n          );\n          break;\n        case 3:\n        case 4:\n          var previousHoistableRoot = currentHoistableRoot;\n          currentHoistableRoot = getHoistableRoot(\n            fiber.stateNode.containerInfo\n          );\n          recursivelyAccumulateSuspenseyCommit(\n            fiber,\n            committedLanes,\n            suspendedState\n          );\n          currentHoistableRoot = previousHoistableRoot;\n          break;\n        case 22:\n          null === fiber.memoizedState &&\n            ((previousHoistableRoot = fiber.alternate),\n            null !== previousHoistableRoot &&\n            null !== previousHoistableRoot.memoizedState\n              ? ((previousHoistableRoot = suspenseyCommitFlag),\n                (suspenseyCommitFlag = 16777216),\n                recursivelyAccumulateSuspenseyCommit(\n                  fiber,\n                  committedLanes,\n                  suspendedState\n                ),\n                (suspenseyCommitFlag = previousHoistableRoot))\n              : recursivelyAccumulateSuspenseyCommit(\n                  fiber,\n                  committedLanes,\n                  suspendedState\n                ));\n          break;\n        default:\n          recursivelyAccumulateSuspenseyCommit(\n            fiber,\n            committedLanes,\n            suspendedState\n          );\n      }\n    }\n    function detachAlternateSiblings(parentFiber) {\n      var previousFiber = parentFiber.alternate;\n      if (\n        null !== previousFiber &&\n        ((parentFiber = previousFiber.child), null !== parentFiber)\n      ) {\n        previousFiber.child = null;\n        do\n          (previousFiber = parentFiber.sibling),\n            (parentFiber.sibling = null),\n            (parentFiber = previousFiber);\n        while (null !== parentFiber);\n      }\n    }\n    function recursivelyTraversePassiveUnmountEffects(parentFiber) {\n      var deletions = parentFiber.deletions;\n      if (0 !== (parentFiber.flags & 16)) {\n        if (null !== deletions)\n          for (var i = 0; i < deletions.length; i++) {\n            var childToDelete = deletions[i],\n              prevEffectStart = pushComponentEffectStart();\n            nextEffect = childToDelete;\n            commitPassiveUnmountEffectsInsideOfDeletedTree_begin(\n              childToDelete,\n              parentFiber\n            );\n            (childToDelete.mode & ProfileMode) !== NoMode &&\n              0 <= componentEffectStartTime &&\n              0 <= componentEffectEndTime &&\n              0.05 < componentEffectEndTime - componentEffectStartTime &&\n              logComponentTrigger(\n                childToDelete,\n                componentEffectStartTime,\n                componentEffectEndTime,\n                \"Unmount\"\n              );\n            popComponentEffectStart(prevEffectStart);\n          }\n        detachAlternateSiblings(parentFiber);\n      }\n      if (parentFiber.subtreeFlags & 10256)\n        for (parentFiber = parentFiber.child; null !== parentFiber; )\n          commitPassiveUnmountOnFiber(parentFiber),\n            (parentFiber = parentFiber.sibling);\n    }\n    function commitPassiveUnmountOnFiber(finishedWork) {\n      var prevEffectStart = pushComponentEffectStart(),\n        prevEffectDuration = pushComponentEffectDuration(),\n        prevEffectErrors = pushComponentEffectErrors(),\n        prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate();\n      switch (finishedWork.tag) {\n        case 0:\n        case 11:\n        case 15:\n          recursivelyTraversePassiveUnmountEffects(finishedWork);\n          finishedWork.flags & 2048 &&\n            commitHookPassiveUnmountEffects(\n              finishedWork,\n              finishedWork.return,\n              Passive | HasEffect\n            );\n          break;\n        case 3:\n          var prevProfilerEffectDuration = pushNestedEffectDurations();\n          recursivelyTraversePassiveUnmountEffects(finishedWork);\n          finishedWork.stateNode.passiveEffectDuration +=\n            popNestedEffectDurations(prevProfilerEffectDuration);\n          break;\n        case 12:\n          prevProfilerEffectDuration = pushNestedEffectDurations();\n          recursivelyTraversePassiveUnmountEffects(finishedWork);\n          finishedWork.stateNode.passiveEffectDuration +=\n            bubbleNestedEffectDurations(prevProfilerEffectDuration);\n          break;\n        case 22:\n          prevProfilerEffectDuration = finishedWork.stateNode;\n          null !== finishedWork.memoizedState &&\n          prevProfilerEffectDuration._visibility &\n            OffscreenPassiveEffectsConnected &&\n          (null === finishedWork.return || 13 !== finishedWork.return.tag)\n            ? ((prevProfilerEffectDuration._visibility &=\n                ~OffscreenPassiveEffectsConnected),\n              recursivelyTraverseDisconnectPassiveEffects(finishedWork),\n              (finishedWork.mode & ProfileMode) !== NoMode &&\n                0 <= componentEffectStartTime &&\n                0 <= componentEffectEndTime &&\n                0.05 < componentEffectEndTime - componentEffectStartTime &&\n                logComponentTrigger(\n                  finishedWork,\n                  componentEffectStartTime,\n                  componentEffectEndTime,\n                  \"Disconnect\"\n                ))\n            : recursivelyTraversePassiveUnmountEffects(finishedWork);\n          break;\n        default:\n          recursivelyTraversePassiveUnmountEffects(finishedWork);\n      }\n      (finishedWork.mode & ProfileMode) !== NoMode &&\n        0 <= componentEffectStartTime &&\n        0 <= componentEffectEndTime &&\n        (componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) &&\n        logComponentEffect(\n          finishedWork,\n          componentEffectStartTime,\n          componentEffectEndTime,\n          componentEffectDuration,\n          componentEffectErrors\n        );\n      popComponentEffectStart(prevEffectStart);\n      popComponentEffectDuration(prevEffectDuration);\n      componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;\n      componentEffectErrors = prevEffectErrors;\n    }\n    function recursivelyTraverseDisconnectPassiveEffects(parentFiber) {\n      var deletions = parentFiber.deletions;\n      if (0 !== (parentFiber.flags & 16)) {\n        if (null !== deletions)\n          for (var i = 0; i < deletions.length; i++) {\n            var childToDelete = deletions[i],\n              prevEffectStart = pushComponentEffectStart();\n            nextEffect = childToDelete;\n            commitPassiveUnmountEffectsInsideOfDeletedTree_begin(\n              childToDelete,\n              parentFiber\n            );\n            (childToDelete.mode & ProfileMode) !== NoMode &&\n              0 <= componentEffectStartTime &&\n              0 <= componentEffectEndTime &&\n              0.05 < componentEffectEndTime - componentEffectStartTime &&\n              logComponentTrigger(\n                childToDelete,\n                componentEffectStartTime,\n                componentEffectEndTime,\n                \"Unmount\"\n              );\n            popComponentEffectStart(prevEffectStart);\n          }\n        detachAlternateSiblings(parentFiber);\n      }\n      for (parentFiber = parentFiber.child; null !== parentFiber; )\n        disconnectPassiveEffect(parentFiber),\n          (parentFiber = parentFiber.sibling);\n    }\n    function disconnectPassiveEffect(finishedWork) {\n      var prevEffectStart = pushComponentEffectStart(),\n        prevEffectDuration = pushComponentEffectDuration(),\n        prevEffectErrors = pushComponentEffectErrors(),\n        prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate();\n      switch (finishedWork.tag) {\n        case 0:\n        case 11:\n        case 15:\n          commitHookPassiveUnmountEffects(\n            finishedWork,\n            finishedWork.return,\n            Passive\n          );\n          recursivelyTraverseDisconnectPassiveEffects(finishedWork);\n          break;\n        case 22:\n          var instance = finishedWork.stateNode;\n          instance._visibility & OffscreenPassiveEffectsConnected &&\n            ((instance._visibility &= ~OffscreenPassiveEffectsConnected),\n            recursivelyTraverseDisconnectPassiveEffects(finishedWork));\n          break;\n        default:\n          recursivelyTraverseDisconnectPassiveEffects(finishedWork);\n      }\n      (finishedWork.mode & ProfileMode) !== NoMode &&\n        0 <= componentEffectStartTime &&\n        0 <= componentEffectEndTime &&\n        (componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) &&\n        logComponentEffect(\n          finishedWork,\n          componentEffectStartTime,\n          componentEffectEndTime,\n          componentEffectDuration,\n          componentEffectErrors\n        );\n      popComponentEffectStart(prevEffectStart);\n      popComponentEffectDuration(prevEffectDuration);\n      componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;\n      componentEffectErrors = prevEffectErrors;\n    }\n    function commitPassiveUnmountEffectsInsideOfDeletedTree_begin(\n      deletedSubtreeRoot,\n      nearestMountedAncestor$jscomp$0\n    ) {\n      for (; null !== nextEffect; ) {\n        var fiber = nextEffect,\n          current = fiber,\n          nearestMountedAncestor = nearestMountedAncestor$jscomp$0,\n          prevEffectStart = pushComponentEffectStart(),\n          prevEffectDuration = pushComponentEffectDuration(),\n          prevEffectErrors = pushComponentEffectErrors(),\n          prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate();\n        switch (current.tag) {\n          case 0:\n          case 11:\n          case 15:\n            commitHookPassiveUnmountEffects(\n              current,\n              nearestMountedAncestor,\n              Passive\n            );\n            break;\n          case 23:\n          case 22:\n            null !== current.memoizedState &&\n              null !== current.memoizedState.cachePool &&\n              ((nearestMountedAncestor = current.memoizedState.cachePool.pool),\n              null != nearestMountedAncestor &&\n                retainCache(nearestMountedAncestor));\n            break;\n          case 24:\n            releaseCache(current.memoizedState.cache);\n        }\n        (current.mode & ProfileMode) !== NoMode &&\n          0 <= componentEffectStartTime &&\n          0 <= componentEffectEndTime &&\n          (componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) &&\n          logComponentEffect(\n            current,\n            componentEffectStartTime,\n            componentEffectEndTime,\n            componentEffectDuration,\n            componentEffectErrors\n          );\n        popComponentEffectStart(prevEffectStart);\n        popComponentEffectDuration(prevEffectDuration);\n        componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;\n        componentEffectErrors = prevEffectErrors;\n        current = fiber.child;\n        if (null !== current) (current.return = fiber), (nextEffect = current);\n        else\n          a: for (fiber = deletedSubtreeRoot; null !== nextEffect; ) {\n            current = nextEffect;\n            prevEffectStart = current.sibling;\n            prevEffectDuration = current.return;\n            detachFiberAfterEffects(current);\n            if (current === fiber) {\n              nextEffect = null;\n              break a;\n            }\n            if (null !== prevEffectStart) {\n              prevEffectStart.return = prevEffectDuration;\n              nextEffect = prevEffectStart;\n              break a;\n            }\n            nextEffect = prevEffectDuration;\n          }\n      }\n    }\n    function onCommitRoot() {\n      commitHooks.forEach(function (commitHook) {\n        return commitHook();\n      });\n    }\n    function isConcurrentActEnvironment() {\n      var isReactActEnvironmentGlobal =\n        \"undefined\" !== typeof IS_REACT_ACT_ENVIRONMENT\n          ? IS_REACT_ACT_ENVIRONMENT\n          : void 0;\n      isReactActEnvironmentGlobal ||\n        null === ReactSharedInternals.actQueue ||\n        console.error(\n          \"The current testing environment is not configured to support act(...)\"\n        );\n      return isReactActEnvironmentGlobal;\n    }\n    function requestUpdateLane(fiber) {\n      if (\n        (executionContext & RenderContext) !== NoContext &&\n        0 !== workInProgressRootRenderLanes\n      )\n        return workInProgressRootRenderLanes & -workInProgressRootRenderLanes;\n      var transition = ReactSharedInternals.T;\n      return null !== transition\n        ? (transition._updatedFibers || (transition._updatedFibers = new Set()),\n          transition._updatedFibers.add(fiber),\n          requestTransitionLane())\n        : resolveUpdatePriority();\n    }\n    function requestDeferredLane() {\n      if (0 === workInProgressDeferredLane)\n        if (0 === (workInProgressRootRenderLanes & 536870912) || isHydrating) {\n          var lane = nextTransitionDeferredLane;\n          nextTransitionDeferredLane <<= 1;\n          0 === (nextTransitionDeferredLane & 3932160) &&\n            (nextTransitionDeferredLane = 262144);\n          workInProgressDeferredLane = lane;\n        } else workInProgressDeferredLane = 536870912;\n      lane = suspenseHandlerStackCursor.current;\n      null !== lane && (lane.flags |= 32);\n      return workInProgressDeferredLane;\n    }\n    function scheduleUpdateOnFiber(root, fiber, lane) {\n      isRunningInsertionEffect &&\n        console.error(\"useInsertionEffect must not schedule updates.\");\n      isFlushingPassiveEffects && (didScheduleUpdateDuringPassiveEffects = !0);\n      if (\n        (root === workInProgressRoot &&\n          (workInProgressSuspendedReason === SuspendedOnData ||\n            workInProgressSuspendedReason === SuspendedOnAction)) ||\n        null !== root.cancelPendingCommit\n      )\n        prepareFreshStack(root, 0),\n          markRootSuspended(\n            root,\n            workInProgressRootRenderLanes,\n            workInProgressDeferredLane,\n            !1\n          );\n      markRootUpdated$1(root, lane);\n      if (\n        (executionContext & RenderContext) !== NoContext &&\n        root === workInProgressRoot\n      ) {\n        if (isRendering)\n          switch (fiber.tag) {\n            case 0:\n            case 11:\n            case 15:\n              root =\n                (workInProgress && getComponentNameFromFiber(workInProgress)) ||\n                \"Unknown\";\n              didWarnAboutUpdateInRenderForAnotherComponent.has(root) ||\n                (didWarnAboutUpdateInRenderForAnotherComponent.add(root),\n                (fiber = getComponentNameFromFiber(fiber) || \"Unknown\"),\n                console.error(\n                  \"Cannot update a component (`%s`) while rendering a different component (`%s`). To locate the bad setState() call inside `%s`, follow the stack trace as described in https://react.dev/link/setstate-in-render\",\n                  fiber,\n                  root,\n                  root\n                ));\n              break;\n            case 1:\n              didWarnAboutUpdateInRender ||\n                (console.error(\n                  \"Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state.\"\n                ),\n                (didWarnAboutUpdateInRender = !0));\n          }\n      } else\n        isDevToolsPresent && addFiberToLanesMap(root, fiber, lane),\n          warnIfUpdatesNotWrappedWithActDEV(fiber),\n          root === workInProgressRoot &&\n            ((executionContext & RenderContext) === NoContext &&\n              (workInProgressRootInterleavedUpdatedLanes |= lane),\n            workInProgressRootExitStatus === RootSuspendedWithDelay &&\n              markRootSuspended(\n                root,\n                workInProgressRootRenderLanes,\n                workInProgressDeferredLane,\n                !1\n              )),\n          ensureRootIsScheduled(root);\n    }\n    function performWorkOnRoot(root, lanes, forceSync) {\n      if ((executionContext & (RenderContext | CommitContext)) !== NoContext)\n        throw Error(\"Should not already be working.\");\n      if (0 !== workInProgressRootRenderLanes && null !== workInProgress) {\n        var yieldedFiber = workInProgress,\n          yieldEndTime = now$1();\n        switch (yieldReason) {\n          case SuspendedOnImmediate:\n          case SuspendedOnData:\n            var startTime = yieldStartTime;\n            supportsUserTiming &&\n              ((yieldedFiber = yieldedFiber._debugTask)\n                ? yieldedFiber.run(\n                    console.timeStamp.bind(\n                      console,\n                      \"Suspended\",\n                      startTime,\n                      yieldEndTime,\n                      COMPONENTS_TRACK,\n                      void 0,\n                      \"primary-light\"\n                    )\n                  )\n                : console.timeStamp(\n                    \"Suspended\",\n                    startTime,\n                    yieldEndTime,\n                    COMPONENTS_TRACK,\n                    void 0,\n                    \"primary-light\"\n                  ));\n            break;\n          case SuspendedOnAction:\n            startTime = yieldStartTime;\n            supportsUserTiming &&\n              ((yieldedFiber = yieldedFiber._debugTask)\n                ? yieldedFiber.run(\n                    console.timeStamp.bind(\n                      console,\n                      \"Action\",\n                      startTime,\n                      yieldEndTime,\n                      COMPONENTS_TRACK,\n                      void 0,\n                      \"primary-light\"\n                    )\n                  )\n                : console.timeStamp(\n                    \"Action\",\n                    startTime,\n                    yieldEndTime,\n                    COMPONENTS_TRACK,\n                    void 0,\n                    \"primary-light\"\n                  ));\n            break;\n          default:\n            supportsUserTiming &&\n              ((yieldedFiber = yieldEndTime - yieldStartTime),\n              3 > yieldedFiber ||\n                console.timeStamp(\n                  \"Blocked\",\n                  yieldStartTime,\n                  yieldEndTime,\n                  COMPONENTS_TRACK,\n                  void 0,\n                  5 > yieldedFiber\n                    ? \"primary-light\"\n                    : 10 > yieldedFiber\n                      ? \"primary\"\n                      : 100 > yieldedFiber\n                        ? \"primary-dark\"\n                        : \"error\"\n                ));\n        }\n      }\n      startTime = (forceSync =\n        (!forceSync &&\n          0 === (lanes & 127) &&\n          0 === (lanes & root.expiredLanes)) ||\n        checkIfRootIsPrerendering(root, lanes))\n        ? renderRootConcurrent(root, lanes)\n        : renderRootSync(root, lanes, !0);\n      var renderWasConcurrent = forceSync;\n      do {\n        if (startTime === RootInProgress) {\n          workInProgressRootIsPrerendering &&\n            !forceSync &&\n            markRootSuspended(root, lanes, 0, !1);\n          lanes = workInProgressSuspendedReason;\n          yieldStartTime = now();\n          yieldReason = lanes;\n          break;\n        } else {\n          yieldedFiber = now$1();\n          yieldEndTime = root.current.alternate;\n          if (\n            renderWasConcurrent &&\n            !isRenderConsistentWithExternalStores(yieldEndTime)\n          ) {\n            setCurrentTrackFromLanes(lanes);\n            yieldEndTime = renderStartTime;\n            startTime = yieldedFiber;\n            !supportsUserTiming ||\n              startTime <= yieldEndTime ||\n              (workInProgressUpdateTask\n                ? workInProgressUpdateTask.run(\n                    console.timeStamp.bind(\n                      console,\n                      \"Teared Render\",\n                      yieldEndTime,\n                      startTime,\n                      currentTrack,\n                      LANES_TRACK_GROUP,\n                      \"error\"\n                    )\n                  )\n                : console.timeStamp(\n                    \"Teared Render\",\n                    yieldEndTime,\n                    startTime,\n                    currentTrack,\n                    LANES_TRACK_GROUP,\n                    \"error\"\n                  ));\n            finalizeRender(lanes, yieldedFiber);\n            startTime = renderRootSync(root, lanes, !1);\n            renderWasConcurrent = !1;\n            continue;\n          }\n          if (startTime === RootErrored) {\n            renderWasConcurrent = lanes;\n            if (root.errorRecoveryDisabledLanes & renderWasConcurrent)\n              var errorRetryLanes = 0;\n            else\n              (errorRetryLanes = root.pendingLanes & -536870913),\n                (errorRetryLanes =\n                  0 !== errorRetryLanes\n                    ? errorRetryLanes\n                    : errorRetryLanes & 536870912\n                      ? 536870912\n                      : 0);\n            if (0 !== errorRetryLanes) {\n              setCurrentTrackFromLanes(lanes);\n              logErroredRenderPhase(\n                renderStartTime,\n                yieldedFiber,\n                lanes,\n                workInProgressUpdateTask\n              );\n              finalizeRender(lanes, yieldedFiber);\n              lanes = errorRetryLanes;\n              a: {\n                yieldedFiber = root;\n                startTime = renderWasConcurrent;\n                renderWasConcurrent = workInProgressRootConcurrentErrors;\n                var wasRootDehydrated =\n                  yieldedFiber.current.memoizedState.isDehydrated;\n                wasRootDehydrated &&\n                  (prepareFreshStack(yieldedFiber, errorRetryLanes).flags |=\n                    256);\n                errorRetryLanes = renderRootSync(\n                  yieldedFiber,\n                  errorRetryLanes,\n                  !1\n                );\n                if (errorRetryLanes !== RootErrored) {\n                  if (\n                    workInProgressRootDidAttachPingListener &&\n                    !wasRootDehydrated\n                  ) {\n                    yieldedFiber.errorRecoveryDisabledLanes |= startTime;\n                    workInProgressRootInterleavedUpdatedLanes |= startTime;\n                    startTime = RootSuspendedWithDelay;\n                    break a;\n                  }\n                  yieldedFiber = workInProgressRootRecoverableErrors;\n                  workInProgressRootRecoverableErrors = renderWasConcurrent;\n                  null !== yieldedFiber &&\n                    (null === workInProgressRootRecoverableErrors\n                      ? (workInProgressRootRecoverableErrors = yieldedFiber)\n                      : workInProgressRootRecoverableErrors.push.apply(\n                          workInProgressRootRecoverableErrors,\n                          yieldedFiber\n                        ));\n                }\n                startTime = errorRetryLanes;\n              }\n              renderWasConcurrent = !1;\n              if (startTime !== RootErrored) continue;\n              else yieldedFiber = now$1();\n            }\n          }\n          if (startTime === RootFatalErrored) {\n            setCurrentTrackFromLanes(lanes);\n            logErroredRenderPhase(\n              renderStartTime,\n              yieldedFiber,\n              lanes,\n              workInProgressUpdateTask\n            );\n            finalizeRender(lanes, yieldedFiber);\n            prepareFreshStack(root, 0);\n            markRootSuspended(root, lanes, 0, !0);\n            break;\n          }\n          a: {\n            forceSync = root;\n            switch (startTime) {\n              case RootInProgress:\n              case RootFatalErrored:\n                throw Error(\"Root did not complete. This is a bug in React.\");\n              case RootSuspendedWithDelay:\n                if ((lanes & 4194048) !== lanes) break;\n              case RootSuspendedAtTheShell:\n                setCurrentTrackFromLanes(lanes);\n                logSuspendedRenderPhase(\n                  renderStartTime,\n                  yieldedFiber,\n                  lanes,\n                  workInProgressUpdateTask\n                );\n                finalizeRender(lanes, yieldedFiber);\n                yieldEndTime = lanes;\n                0 !== (yieldEndTime & 127)\n                  ? (blockingSuspendedTime = yieldedFiber)\n                  : 0 !== (yieldEndTime & 4194048) &&\n                    (transitionSuspendedTime = yieldedFiber);\n                markRootSuspended(\n                  forceSync,\n                  lanes,\n                  workInProgressDeferredLane,\n                  !workInProgressRootDidSkipSuspendedSiblings\n                );\n                break a;\n              case RootErrored:\n                workInProgressRootRecoverableErrors = null;\n                break;\n              case RootSuspended:\n              case RootCompleted:\n                break;\n              default:\n                throw Error(\"Unknown root exit status.\");\n            }\n            if (null !== ReactSharedInternals.actQueue)\n              commitRoot(\n                forceSync,\n                yieldEndTime,\n                lanes,\n                workInProgressRootRecoverableErrors,\n                workInProgressTransitions,\n                workInProgressRootDidIncludeRecursiveRenderUpdate,\n                workInProgressDeferredLane,\n                workInProgressRootInterleavedUpdatedLanes,\n                workInProgressSuspendedRetryLanes,\n                startTime,\n                null,\n                null,\n                renderStartTime,\n                yieldedFiber\n              );\n            else {\n              if (\n                (lanes & 62914560) === lanes &&\n                ((renderWasConcurrent =\n                  globalMostRecentFallbackTime +\n                  FALLBACK_THROTTLE_MS -\n                  now$1()),\n                10 < renderWasConcurrent)\n              ) {\n                markRootSuspended(\n                  forceSync,\n                  lanes,\n                  workInProgressDeferredLane,\n                  !workInProgressRootDidSkipSuspendedSiblings\n                );\n                if (0 !== getNextLanes(forceSync, 0, !0)) break a;\n                pendingEffectsLanes = lanes;\n                forceSync.timeoutHandle = scheduleTimeout(\n                  commitRootWhenReady.bind(\n                    null,\n                    forceSync,\n                    yieldEndTime,\n                    workInProgressRootRecoverableErrors,\n                    workInProgressTransitions,\n                    workInProgressRootDidIncludeRecursiveRenderUpdate,\n                    lanes,\n                    workInProgressDeferredLane,\n                    workInProgressRootInterleavedUpdatedLanes,\n                    workInProgressSuspendedRetryLanes,\n                    workInProgressRootDidSkipSuspendedSiblings,\n                    startTime,\n                    \"Throttled\",\n                    renderStartTime,\n                    yieldedFiber\n                  ),\n                  renderWasConcurrent\n                );\n                break a;\n              }\n              commitRootWhenReady(\n                forceSync,\n                yieldEndTime,\n                workInProgressRootRecoverableErrors,\n                workInProgressTransitions,\n                workInProgressRootDidIncludeRecursiveRenderUpdate,\n                lanes,\n                workInProgressDeferredLane,\n                workInProgressRootInterleavedUpdatedLanes,\n                workInProgressSuspendedRetryLanes,\n                workInProgressRootDidSkipSuspendedSiblings,\n                startTime,\n                null,\n                renderStartTime,\n                yieldedFiber\n              );\n            }\n          }\n        }\n        break;\n      } while (1);\n      ensureRootIsScheduled(root);\n    }\n    function commitRootWhenReady(\n      root,\n      finishedWork,\n      recoverableErrors,\n      transitions,\n      didIncludeRenderPhaseUpdate,\n      lanes,\n      spawnedLane,\n      updatedLanes,\n      suspendedRetryLanes,\n      didSkipSuspendedSiblings,\n      exitStatus,\n      suspendedCommitReason,\n      completedRenderStartTime,\n      completedRenderEndTime\n    ) {\n      root.timeoutHandle = noTimeout;\n      var subtreeFlags = finishedWork.subtreeFlags,\n        suspendedState = null;\n      if (subtreeFlags & 8192 || 16785408 === (subtreeFlags & 16785408))\n        if (\n          ((suspendedState = {\n            stylesheets: null,\n            count: 0,\n            imgCount: 0,\n            imgBytes: 0,\n            suspenseyImages: [],\n            waitingForImages: !0,\n            waitingForViewTransition: !1,\n            unsuspend: noop$1\n          }),\n          accumulateSuspenseyCommitOnFiber(finishedWork, lanes, suspendedState),\n          (subtreeFlags =\n            (lanes & 62914560) === lanes\n              ? globalMostRecentFallbackTime - now$1()\n              : (lanes & 4194048) === lanes\n                ? globalMostRecentTransitionTime - now$1()\n                : 0),\n          (subtreeFlags = waitForCommitToBeReady(suspendedState, subtreeFlags)),\n          null !== subtreeFlags)\n        ) {\n          pendingEffectsLanes = lanes;\n          root.cancelPendingCommit = subtreeFlags(\n            commitRoot.bind(\n              null,\n              root,\n              finishedWork,\n              lanes,\n              recoverableErrors,\n              transitions,\n              didIncludeRenderPhaseUpdate,\n              spawnedLane,\n              updatedLanes,\n              suspendedRetryLanes,\n              exitStatus,\n              suspendedState,\n              suspendedState.waitingForViewTransition\n                ? \"Waiting for the previous Animation\"\n                : 0 < suspendedState.count\n                  ? 0 < suspendedState.imgCount\n                    ? \"Suspended on CSS and Images\"\n                    : \"Suspended on CSS\"\n                  : 1 === suspendedState.imgCount\n                    ? \"Suspended on an Image\"\n                    : 0 < suspendedState.imgCount\n                      ? \"Suspended on Images\"\n                      : null,\n              completedRenderStartTime,\n              completedRenderEndTime\n            )\n          );\n          markRootSuspended(\n            root,\n            lanes,\n            spawnedLane,\n            !didSkipSuspendedSiblings\n          );\n          return;\n        }\n      commitRoot(\n        root,\n        finishedWork,\n        lanes,\n        recoverableErrors,\n        transitions,\n        didIncludeRenderPhaseUpdate,\n        spawnedLane,\n        updatedLanes,\n        suspendedRetryLanes,\n        exitStatus,\n        suspendedState,\n        suspendedCommitReason,\n        completedRenderStartTime,\n        completedRenderEndTime\n      );\n    }\n    function isRenderConsistentWithExternalStores(finishedWork) {\n      for (var node = finishedWork; ; ) {\n        var tag = node.tag;\n        if (\n          (0 === tag || 11 === tag || 15 === tag) &&\n          node.flags & 16384 &&\n          ((tag = node.updateQueue),\n          null !== tag && ((tag = tag.stores), null !== tag))\n        )\n          for (var i = 0; i < tag.length; i++) {\n            var check = tag[i],\n              getSnapshot = check.getSnapshot;\n            check = check.value;\n            try {\n              if (!objectIs(getSnapshot(), check)) return !1;\n            } catch (error) {\n              return !1;\n            }\n          }\n        tag = node.child;\n        if (node.subtreeFlags & 16384 && null !== tag)\n          (tag.return = node), (node = tag);\n        else {\n          if (node === finishedWork) break;\n          for (; null === node.sibling; ) {\n            if (null === node.return || node.return === finishedWork) return !0;\n            node = node.return;\n          }\n          node.sibling.return = node.return;\n          node = node.sibling;\n        }\n      }\n      return !0;\n    }\n    function markRootSuspended(\n      root,\n      suspendedLanes,\n      spawnedLane,\n      didAttemptEntireTree\n    ) {\n      suspendedLanes &= ~workInProgressRootPingedLanes;\n      suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes;\n      root.suspendedLanes |= suspendedLanes;\n      root.pingedLanes &= ~suspendedLanes;\n      didAttemptEntireTree && (root.warmLanes |= suspendedLanes);\n      didAttemptEntireTree = root.expirationTimes;\n      for (var lanes = suspendedLanes; 0 < lanes; ) {\n        var index = 31 - clz32(lanes),\n          lane = 1 << index;\n        didAttemptEntireTree[index] = -1;\n        lanes &= ~lane;\n      }\n      0 !== spawnedLane &&\n        markSpawnedDeferredLane(root, spawnedLane, suspendedLanes);\n    }\n    function flushSyncWork$1() {\n      return (executionContext & (RenderContext | CommitContext)) === NoContext\n        ? (flushSyncWorkAcrossRoots_impl(0, !1), !1)\n        : !0;\n    }\n    function resetWorkInProgressStack() {\n      if (null !== workInProgress) {\n        if (workInProgressSuspendedReason === NotSuspended)\n          var interruptedWork = workInProgress.return;\n        else\n          (interruptedWork = workInProgress),\n            resetContextDependencies(),\n            resetHooksOnUnwind(interruptedWork),\n            (thenableState$1 = null),\n            (thenableIndexCounter$1 = 0),\n            (interruptedWork = workInProgress);\n        for (; null !== interruptedWork; )\n          unwindInterruptedWork(interruptedWork.alternate, interruptedWork),\n            (interruptedWork = interruptedWork.return);\n        workInProgress = null;\n      }\n    }\n    function finalizeRender(lanes, finalizationTime) {\n      0 !== (lanes & 127) && (blockingClampTime = finalizationTime);\n      0 !== (lanes & 4194048) && (transitionClampTime = finalizationTime);\n      0 !== (lanes & 62914560) && (retryClampTime = finalizationTime);\n      0 !== (lanes & 2080374784) && (idleClampTime = finalizationTime);\n    }\n    function prepareFreshStack(root, lanes) {\n      supportsUserTiming &&\n        (console.timeStamp(\n          \"Blocking Track\",\n          0.003,\n          0.003,\n          \"Blocking\",\n          LANES_TRACK_GROUP,\n          \"primary-light\"\n        ),\n        console.timeStamp(\n          \"Transition Track\",\n          0.003,\n          0.003,\n          \"Transition\",\n          LANES_TRACK_GROUP,\n          \"primary-light\"\n        ),\n        console.timeStamp(\n          \"Suspense Track\",\n          0.003,\n          0.003,\n          \"Suspense\",\n          LANES_TRACK_GROUP,\n          \"primary-light\"\n        ),\n        console.timeStamp(\n          \"Idle Track\",\n          0.003,\n          0.003,\n          \"Idle\",\n          LANES_TRACK_GROUP,\n          \"primary-light\"\n        ));\n      var previousRenderStartTime = renderStartTime;\n      renderStartTime = now();\n      if (0 !== workInProgressRootRenderLanes && 0 < previousRenderStartTime) {\n        setCurrentTrackFromLanes(workInProgressRootRenderLanes);\n        if (\n          workInProgressRootExitStatus === RootSuspended ||\n          workInProgressRootExitStatus === RootSuspendedWithDelay\n        )\n          logSuspendedRenderPhase(\n            previousRenderStartTime,\n            renderStartTime,\n            lanes,\n            workInProgressUpdateTask\n          );\n        else {\n          var endTime = renderStartTime,\n            debugTask = workInProgressUpdateTask;\n          if (supportsUserTiming && !(endTime <= previousRenderStartTime)) {\n            var color =\n                (lanes & 738197653) === lanes\n                  ? \"tertiary-dark\"\n                  : \"primary-dark\",\n              label =\n                (lanes & 536870912) === lanes\n                  ? \"Prewarm\"\n                  : (lanes & 201326741) === lanes\n                    ? \"Interrupted Hydration\"\n                    : \"Interrupted Render\";\n            debugTask\n              ? debugTask.run(\n                  console.timeStamp.bind(\n                    console,\n                    label,\n                    previousRenderStartTime,\n                    endTime,\n                    currentTrack,\n                    LANES_TRACK_GROUP,\n                    color\n                  )\n                )\n              : console.timeStamp(\n                  label,\n                  previousRenderStartTime,\n                  endTime,\n                  currentTrack,\n                  LANES_TRACK_GROUP,\n                  color\n                );\n          }\n        }\n        finalizeRender(workInProgressRootRenderLanes, renderStartTime);\n      }\n      previousRenderStartTime = workInProgressUpdateTask;\n      workInProgressUpdateTask = null;\n      if (0 !== (lanes & 127)) {\n        workInProgressUpdateTask = blockingUpdateTask;\n        debugTask =\n          0 <= blockingUpdateTime && blockingUpdateTime < blockingClampTime\n            ? blockingClampTime\n            : blockingUpdateTime;\n        endTime =\n          0 <= blockingEventTime && blockingEventTime < blockingClampTime\n            ? blockingClampTime\n            : blockingEventTime;\n        color =\n          0 <= endTime ? endTime : 0 <= debugTask ? debugTask : renderStartTime;\n        0 <= blockingSuspendedTime\n          ? (setCurrentTrackFromLanes(2),\n            logSuspendedWithDelayPhase(\n              blockingSuspendedTime,\n              color,\n              lanes,\n              previousRenderStartTime\n            ))\n          : 0 !== (animatingLanes & 127) &&\n            (setCurrentTrackFromLanes(2),\n            logAnimatingPhase(blockingClampTime, color, animatingTask));\n        previousRenderStartTime = debugTask;\n        var eventTime = endTime,\n          eventType = blockingEventType,\n          eventIsRepeat = 0 < blockingEventRepeatTime,\n          isSpawnedUpdate = blockingUpdateType === SPAWNED_UPDATE,\n          isPingedUpdate = blockingUpdateType === PINGED_UPDATE;\n        debugTask = renderStartTime;\n        endTime = blockingUpdateTask;\n        color = blockingUpdateMethodName;\n        label = blockingUpdateComponentName;\n        if (supportsUserTiming) {\n          currentTrack = \"Blocking\";\n          0 < previousRenderStartTime\n            ? previousRenderStartTime > debugTask &&\n              (previousRenderStartTime = debugTask)\n            : (previousRenderStartTime = debugTask);\n          0 < eventTime\n            ? eventTime > previousRenderStartTime &&\n              (eventTime = previousRenderStartTime)\n            : (eventTime = previousRenderStartTime);\n          if (null !== eventType && previousRenderStartTime > eventTime) {\n            var color$jscomp$0 = eventIsRepeat ? \"secondary-light\" : \"warning\";\n            endTime\n              ? endTime.run(\n                  console.timeStamp.bind(\n                    console,\n                    eventIsRepeat ? \"Consecutive\" : \"Event: \" + eventType,\n                    eventTime,\n                    previousRenderStartTime,\n                    currentTrack,\n                    LANES_TRACK_GROUP,\n                    color$jscomp$0\n                  )\n                )\n              : console.timeStamp(\n                  eventIsRepeat ? \"Consecutive\" : \"Event: \" + eventType,\n                  eventTime,\n                  previousRenderStartTime,\n                  currentTrack,\n                  LANES_TRACK_GROUP,\n                  color$jscomp$0\n                );\n          }\n          debugTask > previousRenderStartTime &&\n            ((eventTime = isSpawnedUpdate\n              ? \"error\"\n              : (lanes & 738197653) === lanes\n                ? \"tertiary-light\"\n                : \"primary-light\"),\n            (isSpawnedUpdate = isPingedUpdate\n              ? \"Promise Resolved\"\n              : isSpawnedUpdate\n                ? \"Cascading Update\"\n                : 5 < debugTask - previousRenderStartTime\n                  ? \"Update Blocked\"\n                  : \"Update\"),\n            (isPingedUpdate = []),\n            null != label && isPingedUpdate.push([\"Component name\", label]),\n            null != color && isPingedUpdate.push([\"Method name\", color]),\n            (previousRenderStartTime = {\n              start: previousRenderStartTime,\n              end: debugTask,\n              detail: {\n                devtools: {\n                  properties: isPingedUpdate,\n                  track: currentTrack,\n                  trackGroup: LANES_TRACK_GROUP,\n                  color: eventTime\n                }\n              }\n            }),\n            endTime\n              ? endTime.run(\n                  performance.measure.bind(\n                    performance,\n                    isSpawnedUpdate,\n                    previousRenderStartTime\n                  )\n                )\n              : performance.measure(isSpawnedUpdate, previousRenderStartTime));\n        }\n        blockingUpdateTime = -1.1;\n        blockingUpdateType = 0;\n        blockingUpdateComponentName = blockingUpdateMethodName = null;\n        blockingSuspendedTime = -1.1;\n        blockingEventRepeatTime = blockingEventTime;\n        blockingEventTime = -1.1;\n        blockingClampTime = now();\n      }\n      0 !== (lanes & 4194048) &&\n        ((workInProgressUpdateTask = transitionUpdateTask),\n        (debugTask =\n          0 <= transitionStartTime && transitionStartTime < transitionClampTime\n            ? transitionClampTime\n            : transitionStartTime),\n        (previousRenderStartTime =\n          0 <= transitionUpdateTime &&\n          transitionUpdateTime < transitionClampTime\n            ? transitionClampTime\n            : transitionUpdateTime),\n        (endTime =\n          0 <= transitionEventTime && transitionEventTime < transitionClampTime\n            ? transitionClampTime\n            : transitionEventTime),\n        (color =\n          0 <= endTime\n            ? endTime\n            : 0 <= previousRenderStartTime\n              ? previousRenderStartTime\n              : renderStartTime),\n        0 <= transitionSuspendedTime\n          ? (setCurrentTrackFromLanes(256),\n            logSuspendedWithDelayPhase(\n              transitionSuspendedTime,\n              color,\n              lanes,\n              workInProgressUpdateTask\n            ))\n          : 0 !== (animatingLanes & 4194048) &&\n            (setCurrentTrackFromLanes(256),\n            logAnimatingPhase(transitionClampTime, color, animatingTask)),\n        (isPingedUpdate = endTime),\n        (eventTime = transitionEventType),\n        (eventType = 0 < transitionEventRepeatTime),\n        (eventIsRepeat = transitionUpdateType === PINGED_UPDATE),\n        (color = renderStartTime),\n        (endTime = transitionUpdateTask),\n        (label = transitionUpdateMethodName),\n        (isSpawnedUpdate = transitionUpdateComponentName),\n        supportsUserTiming &&\n          ((currentTrack = \"Transition\"),\n          0 < previousRenderStartTime\n            ? previousRenderStartTime > color &&\n              (previousRenderStartTime = color)\n            : (previousRenderStartTime = color),\n          0 < debugTask\n            ? debugTask > previousRenderStartTime &&\n              (debugTask = previousRenderStartTime)\n            : (debugTask = previousRenderStartTime),\n          0 < isPingedUpdate\n            ? isPingedUpdate > debugTask && (isPingedUpdate = debugTask)\n            : (isPingedUpdate = debugTask),\n          debugTask > isPingedUpdate &&\n            null !== eventTime &&\n            ((color$jscomp$0 = eventType ? \"secondary-light\" : \"warning\"),\n            endTime\n              ? endTime.run(\n                  console.timeStamp.bind(\n                    console,\n                    eventType ? \"Consecutive\" : \"Event: \" + eventTime,\n                    isPingedUpdate,\n                    debugTask,\n                    currentTrack,\n                    LANES_TRACK_GROUP,\n                    color$jscomp$0\n                  )\n                )\n              : console.timeStamp(\n                  eventType ? \"Consecutive\" : \"Event: \" + eventTime,\n                  isPingedUpdate,\n                  debugTask,\n                  currentTrack,\n                  LANES_TRACK_GROUP,\n                  color$jscomp$0\n                )),\n          previousRenderStartTime > debugTask &&\n            (endTime\n              ? endTime.run(\n                  console.timeStamp.bind(\n                    console,\n                    \"Action\",\n                    debugTask,\n                    previousRenderStartTime,\n                    currentTrack,\n                    LANES_TRACK_GROUP,\n                    \"primary-dark\"\n                  )\n                )\n              : console.timeStamp(\n                  \"Action\",\n                  debugTask,\n                  previousRenderStartTime,\n                  currentTrack,\n                  LANES_TRACK_GROUP,\n                  \"primary-dark\"\n                )),\n          color > previousRenderStartTime &&\n            ((debugTask = eventIsRepeat\n              ? \"Promise Resolved\"\n              : 5 < color - previousRenderStartTime\n                ? \"Update Blocked\"\n                : \"Update\"),\n            (isPingedUpdate = []),\n            null != isSpawnedUpdate &&\n              isPingedUpdate.push([\"Component name\", isSpawnedUpdate]),\n            null != label && isPingedUpdate.push([\"Method name\", label]),\n            (previousRenderStartTime = {\n              start: previousRenderStartTime,\n              end: color,\n              detail: {\n                devtools: {\n                  properties: isPingedUpdate,\n                  track: currentTrack,\n                  trackGroup: LANES_TRACK_GROUP,\n                  color: \"primary-light\"\n                }\n              }\n            }),\n            endTime\n              ? endTime.run(\n                  performance.measure.bind(\n                    performance,\n                    debugTask,\n                    previousRenderStartTime\n                  )\n                )\n              : performance.measure(debugTask, previousRenderStartTime))),\n        (transitionUpdateTime = transitionStartTime = -1.1),\n        (transitionUpdateType = 0),\n        (transitionSuspendedTime = -1.1),\n        (transitionEventRepeatTime = transitionEventTime),\n        (transitionEventTime = -1.1),\n        (transitionClampTime = now()));\n      0 !== (lanes & 62914560) &&\n        0 !== (animatingLanes & 62914560) &&\n        (setCurrentTrackFromLanes(4194304),\n        logAnimatingPhase(retryClampTime, renderStartTime, animatingTask));\n      0 !== (lanes & 2080374784) &&\n        0 !== (animatingLanes & 2080374784) &&\n        (setCurrentTrackFromLanes(268435456),\n        logAnimatingPhase(idleClampTime, renderStartTime, animatingTask));\n      previousRenderStartTime = root.timeoutHandle;\n      previousRenderStartTime !== noTimeout &&\n        ((root.timeoutHandle = noTimeout),\n        cancelTimeout(previousRenderStartTime));\n      previousRenderStartTime = root.cancelPendingCommit;\n      null !== previousRenderStartTime &&\n        ((root.cancelPendingCommit = null), previousRenderStartTime());\n      pendingEffectsLanes = 0;\n      resetWorkInProgressStack();\n      workInProgressRoot = root;\n      workInProgress = previousRenderStartTime = createWorkInProgress(\n        root.current,\n        null\n      );\n      workInProgressRootRenderLanes = lanes;\n      workInProgressSuspendedReason = NotSuspended;\n      workInProgressThrownValue = null;\n      workInProgressRootDidSkipSuspendedSiblings = !1;\n      workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root, lanes);\n      workInProgressRootDidAttachPingListener = !1;\n      workInProgressRootExitStatus = RootInProgress;\n      workInProgressSuspendedRetryLanes =\n        workInProgressDeferredLane =\n        workInProgressRootPingedLanes =\n        workInProgressRootInterleavedUpdatedLanes =\n        workInProgressRootSkippedLanes =\n          0;\n      workInProgressRootRecoverableErrors = workInProgressRootConcurrentErrors =\n        null;\n      workInProgressRootDidIncludeRecursiveRenderUpdate = !1;\n      0 !== (lanes & 8) && (lanes |= lanes & 32);\n      endTime = root.entangledLanes;\n      if (0 !== endTime)\n        for (root = root.entanglements, endTime &= lanes; 0 < endTime; )\n          (debugTask = 31 - clz32(endTime)),\n            (color = 1 << debugTask),\n            (lanes |= root[debugTask]),\n            (endTime &= ~color);\n      entangledRenderLanes = lanes;\n      finishQueueingConcurrentUpdates();\n      root = getCurrentTime();\n      1e3 < root - lastResetTime &&\n        ((ReactSharedInternals.recentlyCreatedOwnerStacks = 0),\n        (lastResetTime = root));\n      ReactStrictModeWarnings.discardPendingWarnings();\n      return previousRenderStartTime;\n    }\n    function handleThrow(root, thrownValue) {\n      currentlyRenderingFiber = null;\n      ReactSharedInternals.H = ContextOnlyDispatcher;\n      ReactSharedInternals.getCurrentStack = null;\n      isRendering = !1;\n      current = null;\n      thrownValue === SuspenseException ||\n      thrownValue === SuspenseActionException\n        ? ((thrownValue = getSuspendedThenable()),\n          (workInProgressSuspendedReason = SuspendedOnImmediate))\n        : thrownValue === SuspenseyCommitException\n          ? ((thrownValue = getSuspendedThenable()),\n            (workInProgressSuspendedReason = SuspendedOnInstance))\n          : (workInProgressSuspendedReason =\n              thrownValue === SelectiveHydrationException\n                ? SuspendedOnHydration\n                : null !== thrownValue &&\n                    \"object\" === typeof thrownValue &&\n                    \"function\" === typeof thrownValue.then\n                  ? SuspendedOnDeprecatedThrowPromise\n                  : SuspendedOnError);\n      workInProgressThrownValue = thrownValue;\n      var erroredWork = workInProgress;\n      null === erroredWork\n        ? ((workInProgressRootExitStatus = RootFatalErrored),\n          logUncaughtError(\n            root,\n            createCapturedValueAtFiber(thrownValue, root.current)\n          ))\n        : erroredWork.mode & ProfileMode &&\n          stopProfilerTimerIfRunningAndRecordDuration(erroredWork);\n    }\n    function shouldRemainOnPreviousScreen() {\n      var handler = suspenseHandlerStackCursor.current;\n      return null === handler\n        ? !0\n        : (workInProgressRootRenderLanes & 4194048) ===\n            workInProgressRootRenderLanes\n          ? null === shellBoundary\n            ? !0\n            : !1\n          : (workInProgressRootRenderLanes & 62914560) ===\n                workInProgressRootRenderLanes ||\n              0 !== (workInProgressRootRenderLanes & 536870912)\n            ? handler === shellBoundary\n            : !1;\n    }\n    function pushDispatcher() {\n      var prevDispatcher = ReactSharedInternals.H;\n      ReactSharedInternals.H = ContextOnlyDispatcher;\n      return null === prevDispatcher ? ContextOnlyDispatcher : prevDispatcher;\n    }\n    function pushAsyncDispatcher() {\n      var prevAsyncDispatcher = ReactSharedInternals.A;\n      ReactSharedInternals.A = DefaultAsyncDispatcher;\n      return prevAsyncDispatcher;\n    }\n    function markRenderDerivedCause(fiber) {\n      null === workInProgressUpdateTask &&\n        (workInProgressUpdateTask =\n          null == fiber._debugTask ? null : fiber._debugTask);\n    }\n    function renderDidSuspendDelayIfPossible() {\n      workInProgressRootExitStatus = RootSuspendedWithDelay;\n      workInProgressRootDidSkipSuspendedSiblings ||\n        ((workInProgressRootRenderLanes & 4194048) !==\n          workInProgressRootRenderLanes &&\n          null !== suspenseHandlerStackCursor.current) ||\n        (workInProgressRootIsPrerendering = !0);\n      (0 === (workInProgressRootSkippedLanes & 134217727) &&\n        0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) ||\n        null === workInProgressRoot ||\n        markRootSuspended(\n          workInProgressRoot,\n          workInProgressRootRenderLanes,\n          workInProgressDeferredLane,\n          !1\n        );\n    }\n    function renderRootSync(root, lanes, shouldYieldForPrerendering) {\n      var prevExecutionContext = executionContext;\n      executionContext |= RenderContext;\n      var prevDispatcher = pushDispatcher(),\n        prevAsyncDispatcher = pushAsyncDispatcher();\n      if (\n        workInProgressRoot !== root ||\n        workInProgressRootRenderLanes !== lanes\n      ) {\n        if (isDevToolsPresent) {\n          var memoizedUpdaters = root.memoizedUpdaters;\n          0 < memoizedUpdaters.size &&\n            (restorePendingUpdaters(root, workInProgressRootRenderLanes),\n            memoizedUpdaters.clear());\n          movePendingFibersToMemoized(root, lanes);\n        }\n        workInProgressTransitions = null;\n        prepareFreshStack(root, lanes);\n      }\n      lanes = !1;\n      memoizedUpdaters = workInProgressRootExitStatus;\n      a: do\n        try {\n          if (\n            workInProgressSuspendedReason !== NotSuspended &&\n            null !== workInProgress\n          ) {\n            var unitOfWork = workInProgress,\n              thrownValue = workInProgressThrownValue;\n            switch (workInProgressSuspendedReason) {\n              case SuspendedOnHydration:\n                resetWorkInProgressStack();\n                memoizedUpdaters = RootSuspendedAtTheShell;\n                break a;\n              case SuspendedOnImmediate:\n              case SuspendedOnData:\n              case SuspendedOnAction:\n              case SuspendedOnDeprecatedThrowPromise:\n                null === suspenseHandlerStackCursor.current && (lanes = !0);\n                var reason = workInProgressSuspendedReason;\n                workInProgressSuspendedReason = NotSuspended;\n                workInProgressThrownValue = null;\n                throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason);\n                if (\n                  shouldYieldForPrerendering &&\n                  workInProgressRootIsPrerendering\n                ) {\n                  memoizedUpdaters = RootInProgress;\n                  break a;\n                }\n                break;\n              default:\n                (reason = workInProgressSuspendedReason),\n                  (workInProgressSuspendedReason = NotSuspended),\n                  (workInProgressThrownValue = null),\n                  throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason);\n            }\n          }\n          workLoopSync();\n          memoizedUpdaters = workInProgressRootExitStatus;\n          break;\n        } catch (thrownValue$8) {\n          handleThrow(root, thrownValue$8);\n        }\n      while (1);\n      lanes && root.shellSuspendCounter++;\n      resetContextDependencies();\n      executionContext = prevExecutionContext;\n      ReactSharedInternals.H = prevDispatcher;\n      ReactSharedInternals.A = prevAsyncDispatcher;\n      null === workInProgress &&\n        ((workInProgressRoot = null),\n        (workInProgressRootRenderLanes = 0),\n        finishQueueingConcurrentUpdates());\n      return memoizedUpdaters;\n    }\n    function workLoopSync() {\n      for (; null !== workInProgress; ) performUnitOfWork(workInProgress);\n    }\n    function renderRootConcurrent(root, lanes) {\n      var prevExecutionContext = executionContext;\n      executionContext |= RenderContext;\n      var prevDispatcher = pushDispatcher(),\n        prevAsyncDispatcher = pushAsyncDispatcher();\n      if (\n        workInProgressRoot !== root ||\n        workInProgressRootRenderLanes !== lanes\n      ) {\n        if (isDevToolsPresent) {\n          var memoizedUpdaters = root.memoizedUpdaters;\n          0 < memoizedUpdaters.size &&\n            (restorePendingUpdaters(root, workInProgressRootRenderLanes),\n            memoizedUpdaters.clear());\n          movePendingFibersToMemoized(root, lanes);\n        }\n        workInProgressTransitions = null;\n        workInProgressRootRenderTargetTime = now$1() + RENDER_TIMEOUT_MS;\n        prepareFreshStack(root, lanes);\n      } else\n        workInProgressRootIsPrerendering = checkIfRootIsPrerendering(\n          root,\n          lanes\n        );\n      a: do\n        try {\n          if (\n            workInProgressSuspendedReason !== NotSuspended &&\n            null !== workInProgress\n          )\n            b: switch (\n              ((lanes = workInProgress),\n              (memoizedUpdaters = workInProgressThrownValue),\n              workInProgressSuspendedReason)\n            ) {\n              case SuspendedOnError:\n                workInProgressSuspendedReason = NotSuspended;\n                workInProgressThrownValue = null;\n                throwAndUnwindWorkLoop(\n                  root,\n                  lanes,\n                  memoizedUpdaters,\n                  SuspendedOnError\n                );\n                break;\n              case SuspendedOnData:\n              case SuspendedOnAction:\n                if (isThenableResolved(memoizedUpdaters)) {\n                  workInProgressSuspendedReason = NotSuspended;\n                  workInProgressThrownValue = null;\n                  replaySuspendedUnitOfWork(lanes);\n                  break;\n                }\n                lanes = function () {\n                  (workInProgressSuspendedReason !== SuspendedOnData &&\n                    workInProgressSuspendedReason !== SuspendedOnAction) ||\n                    workInProgressRoot !== root ||\n                    (workInProgressSuspendedReason =\n                      SuspendedAndReadyToContinue);\n                  ensureRootIsScheduled(root);\n                };\n                memoizedUpdaters.then(lanes, lanes);\n                break a;\n              case SuspendedOnImmediate:\n                workInProgressSuspendedReason = SuspendedAndReadyToContinue;\n                break a;\n              case SuspendedOnInstance:\n                workInProgressSuspendedReason =\n                  SuspendedOnInstanceAndReadyToContinue;\n                break a;\n              case SuspendedAndReadyToContinue:\n                isThenableResolved(memoizedUpdaters)\n                  ? ((workInProgressSuspendedReason = NotSuspended),\n                    (workInProgressThrownValue = null),\n                    replaySuspendedUnitOfWork(lanes))\n                  : ((workInProgressSuspendedReason = NotSuspended),\n                    (workInProgressThrownValue = null),\n                    throwAndUnwindWorkLoop(\n                      root,\n                      lanes,\n                      memoizedUpdaters,\n                      SuspendedAndReadyToContinue\n                    ));\n                break;\n              case SuspendedOnInstanceAndReadyToContinue:\n                var resource = null;\n                switch (workInProgress.tag) {\n                  case 26:\n                    resource = workInProgress.memoizedState;\n                  case 5:\n                  case 27:\n                    var hostFiber = workInProgress;\n                    if (\n                      resource\n                        ? preloadResource(resource)\n                        : hostFiber.stateNode.complete\n                    ) {\n                      workInProgressSuspendedReason = NotSuspended;\n                      workInProgressThrownValue = null;\n                      var sibling = hostFiber.sibling;\n                      if (null !== sibling) workInProgress = sibling;\n                      else {\n                        var returnFiber = hostFiber.return;\n                        null !== returnFiber\n                          ? ((workInProgress = returnFiber),\n                            completeUnitOfWork(returnFiber))\n                          : (workInProgress = null);\n                      }\n                      break b;\n                    }\n                    break;\n                  default:\n                    console.error(\n                      \"Unexpected type of fiber triggered a suspensey commit. This is a bug in React.\"\n                    );\n                }\n                workInProgressSuspendedReason = NotSuspended;\n                workInProgressThrownValue = null;\n                throwAndUnwindWorkLoop(\n                  root,\n                  lanes,\n                  memoizedUpdaters,\n                  SuspendedOnInstanceAndReadyToContinue\n                );\n                break;\n              case SuspendedOnDeprecatedThrowPromise:\n                workInProgressSuspendedReason = NotSuspended;\n                workInProgressThrownValue = null;\n                throwAndUnwindWorkLoop(\n                  root,\n                  lanes,\n                  memoizedUpdaters,\n                  SuspendedOnDeprecatedThrowPromise\n                );\n                break;\n              case SuspendedOnHydration:\n                resetWorkInProgressStack();\n                workInProgressRootExitStatus = RootSuspendedAtTheShell;\n                break a;\n              default:\n                throw Error(\n                  \"Unexpected SuspendedReason. This is a bug in React.\"\n                );\n            }\n          null !== ReactSharedInternals.actQueue\n            ? workLoopSync()\n            : workLoopConcurrentByScheduler();\n          break;\n        } catch (thrownValue$9) {\n          handleThrow(root, thrownValue$9);\n        }\n      while (1);\n      resetContextDependencies();\n      ReactSharedInternals.H = prevDispatcher;\n      ReactSharedInternals.A = prevAsyncDispatcher;\n      executionContext = prevExecutionContext;\n      if (null !== workInProgress) return RootInProgress;\n      workInProgressRoot = null;\n      workInProgressRootRenderLanes = 0;\n      finishQueueingConcurrentUpdates();\n      return workInProgressRootExitStatus;\n    }\n    function workLoopConcurrentByScheduler() {\n      for (; null !== workInProgress && !shouldYield(); )\n        performUnitOfWork(workInProgress);\n    }\n    function performUnitOfWork(unitOfWork) {\n      var current = unitOfWork.alternate;\n      (unitOfWork.mode & ProfileMode) !== NoMode\n        ? (startProfilerTimer(unitOfWork),\n          (current = runWithFiberInDEV(\n            unitOfWork,\n            beginWork,\n            current,\n            unitOfWork,\n            entangledRenderLanes\n          )),\n          stopProfilerTimerIfRunningAndRecordDuration(unitOfWork))\n        : (current = runWithFiberInDEV(\n            unitOfWork,\n            beginWork,\n            current,\n            unitOfWork,\n            entangledRenderLanes\n          ));\n      unitOfWork.memoizedProps = unitOfWork.pendingProps;\n      null === current\n        ? completeUnitOfWork(unitOfWork)\n        : (workInProgress = current);\n    }\n    function replaySuspendedUnitOfWork(unitOfWork) {\n      var next = runWithFiberInDEV(unitOfWork, replayBeginWork, unitOfWork);\n      unitOfWork.memoizedProps = unitOfWork.pendingProps;\n      null === next ? completeUnitOfWork(unitOfWork) : (workInProgress = next);\n    }\n    function replayBeginWork(unitOfWork) {\n      var current = unitOfWork.alternate,\n        isProfilingMode = (unitOfWork.mode & ProfileMode) !== NoMode;\n      isProfilingMode && startProfilerTimer(unitOfWork);\n      switch (unitOfWork.tag) {\n        case 15:\n        case 0:\n          current = replayFunctionComponent(\n            current,\n            unitOfWork,\n            unitOfWork.pendingProps,\n            unitOfWork.type,\n            void 0,\n            workInProgressRootRenderLanes\n          );\n          break;\n        case 11:\n          current = replayFunctionComponent(\n            current,\n            unitOfWork,\n            unitOfWork.pendingProps,\n            unitOfWork.type.render,\n            unitOfWork.ref,\n            workInProgressRootRenderLanes\n          );\n          break;\n        case 5:\n          resetHooksOnUnwind(unitOfWork);\n        default:\n          unwindInterruptedWork(current, unitOfWork),\n            (unitOfWork = workInProgress =\n              resetWorkInProgress(unitOfWork, entangledRenderLanes)),\n            (current = beginWork(current, unitOfWork, entangledRenderLanes));\n      }\n      isProfilingMode &&\n        stopProfilerTimerIfRunningAndRecordDuration(unitOfWork);\n      return current;\n    }\n    function throwAndUnwindWorkLoop(\n      root,\n      unitOfWork,\n      thrownValue,\n      suspendedReason\n    ) {\n      resetContextDependencies();\n      resetHooksOnUnwind(unitOfWork);\n      thenableState$1 = null;\n      thenableIndexCounter$1 = 0;\n      var returnFiber = unitOfWork.return;\n      try {\n        if (\n          throwException(\n            root,\n            returnFiber,\n            unitOfWork,\n            thrownValue,\n            workInProgressRootRenderLanes\n          )\n        ) {\n          workInProgressRootExitStatus = RootFatalErrored;\n          logUncaughtError(\n            root,\n            createCapturedValueAtFiber(thrownValue, root.current)\n          );\n          workInProgress = null;\n          return;\n        }\n      } catch (error) {\n        if (null !== returnFiber) throw ((workInProgress = returnFiber), error);\n        workInProgressRootExitStatus = RootFatalErrored;\n        logUncaughtError(\n          root,\n          createCapturedValueAtFiber(thrownValue, root.current)\n        );\n        workInProgress = null;\n        return;\n      }\n      if (unitOfWork.flags & 32768) {\n        if (isHydrating || suspendedReason === SuspendedOnError) root = !0;\n        else if (\n          workInProgressRootIsPrerendering ||\n          0 !== (workInProgressRootRenderLanes & 536870912)\n        )\n          root = !1;\n        else if (\n          ((workInProgressRootDidSkipSuspendedSiblings = root = !0),\n          suspendedReason === SuspendedOnData ||\n            suspendedReason === SuspendedOnAction ||\n            suspendedReason === SuspendedOnImmediate ||\n            suspendedReason === SuspendedOnDeprecatedThrowPromise)\n        )\n          (suspendedReason = suspenseHandlerStackCursor.current),\n            null !== suspendedReason &&\n              13 === suspendedReason.tag &&\n              (suspendedReason.flags |= 16384);\n        unwindUnitOfWork(unitOfWork, root);\n      } else completeUnitOfWork(unitOfWork);\n    }\n    function completeUnitOfWork(unitOfWork) {\n      var completedWork = unitOfWork;\n      do {\n        if (0 !== (completedWork.flags & 32768)) {\n          unwindUnitOfWork(\n            completedWork,\n            workInProgressRootDidSkipSuspendedSiblings\n          );\n          return;\n        }\n        var current = completedWork.alternate;\n        unitOfWork = completedWork.return;\n        startProfilerTimer(completedWork);\n        current = runWithFiberInDEV(\n          completedWork,\n          completeWork,\n          current,\n          completedWork,\n          entangledRenderLanes\n        );\n        (completedWork.mode & ProfileMode) !== NoMode &&\n          stopProfilerTimerIfRunningAndRecordIncompleteDuration(completedWork);\n        if (null !== current) {\n          workInProgress = current;\n          return;\n        }\n        completedWork = completedWork.sibling;\n        if (null !== completedWork) {\n          workInProgress = completedWork;\n          return;\n        }\n        workInProgress = completedWork = unitOfWork;\n      } while (null !== completedWork);\n      workInProgressRootExitStatus === RootInProgress &&\n        (workInProgressRootExitStatus = RootCompleted);\n    }\n    function unwindUnitOfWork(unitOfWork, skipSiblings) {\n      do {\n        var next = unwindWork(unitOfWork.alternate, unitOfWork);\n        if (null !== next) {\n          next.flags &= 32767;\n          workInProgress = next;\n          return;\n        }\n        if ((unitOfWork.mode & ProfileMode) !== NoMode) {\n          stopProfilerTimerIfRunningAndRecordIncompleteDuration(unitOfWork);\n          next = unitOfWork.actualDuration;\n          for (var child = unitOfWork.child; null !== child; )\n            (next += child.actualDuration), (child = child.sibling);\n          unitOfWork.actualDuration = next;\n        }\n        next = unitOfWork.return;\n        null !== next &&\n          ((next.flags |= 32768),\n          (next.subtreeFlags = 0),\n          (next.deletions = null));\n        if (\n          !skipSiblings &&\n          ((unitOfWork = unitOfWork.sibling), null !== unitOfWork)\n        ) {\n          workInProgress = unitOfWork;\n          return;\n        }\n        workInProgress = unitOfWork = next;\n      } while (null !== unitOfWork);\n      workInProgressRootExitStatus = RootSuspendedAtTheShell;\n      workInProgress = null;\n    }\n    function commitRoot(\n      root,\n      finishedWork,\n      lanes,\n      recoverableErrors,\n      transitions,\n      didIncludeRenderPhaseUpdate,\n      spawnedLane,\n      updatedLanes,\n      suspendedRetryLanes,\n      exitStatus,\n      suspendedState,\n      suspendedCommitReason,\n      completedRenderStartTime,\n      completedRenderEndTime\n    ) {\n      root.cancelPendingCommit = null;\n      do flushPendingEffects();\n      while (pendingEffectsStatus !== NO_PENDING_EFFECTS);\n      ReactStrictModeWarnings.flushLegacyContextWarning();\n      ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings();\n      if ((executionContext & (RenderContext | CommitContext)) !== NoContext)\n        throw Error(\"Should not already be working.\");\n      setCurrentTrackFromLanes(lanes);\n      exitStatus === RootErrored\n        ? logErroredRenderPhase(\n            completedRenderStartTime,\n            completedRenderEndTime,\n            lanes,\n            workInProgressUpdateTask\n          )\n        : null !== recoverableErrors\n          ? logRecoveredRenderPhase(\n              completedRenderStartTime,\n              completedRenderEndTime,\n              lanes,\n              recoverableErrors,\n              null !== finishedWork &&\n                null !== finishedWork.alternate &&\n                finishedWork.alternate.memoizedState.isDehydrated &&\n                0 !== (finishedWork.flags & 256),\n              workInProgressUpdateTask\n            )\n          : logRenderPhase(\n              completedRenderStartTime,\n              completedRenderEndTime,\n              lanes,\n              workInProgressUpdateTask\n            );\n      if (null !== finishedWork) {\n        0 === lanes &&\n          console.error(\n            \"finishedLanes should not be empty during a commit. This is a bug in React.\"\n          );\n        if (finishedWork === root.current)\n          throw Error(\n            \"Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.\"\n          );\n        didIncludeRenderPhaseUpdate =\n          finishedWork.lanes | finishedWork.childLanes;\n        didIncludeRenderPhaseUpdate |= concurrentlyUpdatedLanes;\n        markRootFinished(\n          root,\n          lanes,\n          didIncludeRenderPhaseUpdate,\n          spawnedLane,\n          updatedLanes,\n          suspendedRetryLanes\n        );\n        root === workInProgressRoot &&\n          ((workInProgress = workInProgressRoot = null),\n          (workInProgressRootRenderLanes = 0));\n        pendingFinishedWork = finishedWork;\n        pendingEffectsRoot = root;\n        pendingEffectsLanes = lanes;\n        pendingEffectsRemainingLanes = didIncludeRenderPhaseUpdate;\n        pendingPassiveTransitions = transitions;\n        pendingRecoverableErrors = recoverableErrors;\n        pendingEffectsRenderEndTime = completedRenderEndTime;\n        pendingSuspendedCommitReason = suspendedCommitReason;\n        pendingDelayedCommitReason = IMMEDIATE_COMMIT;\n        pendingSuspendedViewTransitionReason = null;\n        0 !== finishedWork.actualDuration ||\n        0 !== (finishedWork.subtreeFlags & 10256) ||\n        0 !== (finishedWork.flags & 10256)\n          ? ((root.callbackNode = null),\n            (root.callbackPriority = 0),\n            scheduleCallback$1(NormalPriority$1, function () {\n              schedulerEvent = window.event;\n              pendingDelayedCommitReason === IMMEDIATE_COMMIT &&\n                (pendingDelayedCommitReason = DELAYED_PASSIVE_COMMIT);\n              flushPassiveEffects();\n              return null;\n            }))\n          : ((root.callbackNode = null), (root.callbackPriority = 0));\n        commitErrors = null;\n        commitStartTime = now();\n        null !== suspendedCommitReason &&\n          logSuspendedCommitPhase(\n            completedRenderEndTime,\n            commitStartTime,\n            suspendedCommitReason,\n            workInProgressUpdateTask\n          );\n        recoverableErrors = 0 !== (finishedWork.flags & 13878);\n        if (0 !== (finishedWork.subtreeFlags & 13878) || recoverableErrors) {\n          recoverableErrors = ReactSharedInternals.T;\n          ReactSharedInternals.T = null;\n          transitions = ReactDOMSharedInternals.p;\n          ReactDOMSharedInternals.p = DiscreteEventPriority;\n          spawnedLane = executionContext;\n          executionContext |= CommitContext;\n          try {\n            commitBeforeMutationEffects(root, finishedWork, lanes);\n          } finally {\n            (executionContext = spawnedLane),\n              (ReactDOMSharedInternals.p = transitions),\n              (ReactSharedInternals.T = recoverableErrors);\n          }\n        }\n        pendingEffectsStatus = PENDING_MUTATION_PHASE;\n        flushMutationEffects();\n        flushLayoutEffects();\n        flushSpawnedWork();\n      }\n    }\n    function flushMutationEffects() {\n      if (pendingEffectsStatus === PENDING_MUTATION_PHASE) {\n        pendingEffectsStatus = NO_PENDING_EFFECTS;\n        var root = pendingEffectsRoot,\n          finishedWork = pendingFinishedWork,\n          lanes = pendingEffectsLanes,\n          rootMutationHasEffect = 0 !== (finishedWork.flags & 13878);\n        if (\n          0 !== (finishedWork.subtreeFlags & 13878) ||\n          rootMutationHasEffect\n        ) {\n          rootMutationHasEffect = ReactSharedInternals.T;\n          ReactSharedInternals.T = null;\n          var previousPriority = ReactDOMSharedInternals.p;\n          ReactDOMSharedInternals.p = DiscreteEventPriority;\n          var prevExecutionContext = executionContext;\n          executionContext |= CommitContext;\n          try {\n            inProgressLanes = lanes;\n            inProgressRoot = root;\n            resetComponentEffectTimers();\n            commitMutationEffectsOnFiber(finishedWork, root);\n            inProgressRoot = inProgressLanes = null;\n            lanes = selectionInformation;\n            var curFocusedElem = getActiveElementDeep(root.containerInfo),\n              priorFocusedElem = lanes.focusedElem,\n              priorSelectionRange = lanes.selectionRange;\n            if (\n              curFocusedElem !== priorFocusedElem &&\n              priorFocusedElem &&\n              priorFocusedElem.ownerDocument &&\n              containsNode(\n                priorFocusedElem.ownerDocument.documentElement,\n                priorFocusedElem\n              )\n            ) {\n              if (\n                null !== priorSelectionRange &&\n                hasSelectionCapabilities(priorFocusedElem)\n              ) {\n                var start = priorSelectionRange.start,\n                  end = priorSelectionRange.end;\n                void 0 === end && (end = start);\n                if (\"selectionStart\" in priorFocusedElem)\n                  (priorFocusedElem.selectionStart = start),\n                    (priorFocusedElem.selectionEnd = Math.min(\n                      end,\n                      priorFocusedElem.value.length\n                    ));\n                else {\n                  var doc = priorFocusedElem.ownerDocument || document,\n                    win = (doc && doc.defaultView) || window;\n                  if (win.getSelection) {\n                    var selection = win.getSelection(),\n                      length = priorFocusedElem.textContent.length,\n                      start$jscomp$0 = Math.min(\n                        priorSelectionRange.start,\n                        length\n                      ),\n                      end$jscomp$0 =\n                        void 0 === priorSelectionRange.end\n                          ? start$jscomp$0\n                          : Math.min(priorSelectionRange.end, length);\n                    !selection.extend &&\n                      start$jscomp$0 > end$jscomp$0 &&\n                      ((curFocusedElem = end$jscomp$0),\n                      (end$jscomp$0 = start$jscomp$0),\n                      (start$jscomp$0 = curFocusedElem));\n                    var startMarker = getNodeForCharacterOffset(\n                        priorFocusedElem,\n                        start$jscomp$0\n                      ),\n                      endMarker = getNodeForCharacterOffset(\n                        priorFocusedElem,\n                        end$jscomp$0\n                      );\n                    if (\n                      startMarker &&\n                      endMarker &&\n                      (1 !== selection.rangeCount ||\n                        selection.anchorNode !== startMarker.node ||\n                        selection.anchorOffset !== startMarker.offset ||\n                        selection.focusNode !== endMarker.node ||\n                        selection.focusOffset !== endMarker.offset)\n                    ) {\n                      var range = doc.createRange();\n                      range.setStart(startMarker.node, startMarker.offset);\n                      selection.removeAllRanges();\n                      start$jscomp$0 > end$jscomp$0\n                        ? (selection.addRange(range),\n                          selection.extend(endMarker.node, endMarker.offset))\n                        : (range.setEnd(endMarker.node, endMarker.offset),\n                          selection.addRange(range));\n                    }\n                  }\n                }\n              }\n              doc = [];\n              for (\n                selection = priorFocusedElem;\n                (selection = selection.parentNode);\n\n              )\n                1 === selection.nodeType &&\n                  doc.push({\n                    element: selection,\n                    left: selection.scrollLeft,\n                    top: selection.scrollTop\n                  });\n              \"function\" === typeof priorFocusedElem.focus &&\n                priorFocusedElem.focus();\n              for (\n                priorFocusedElem = 0;\n                priorFocusedElem < doc.length;\n                priorFocusedElem++\n              ) {\n                var info = doc[priorFocusedElem];\n                info.element.scrollLeft = info.left;\n                info.element.scrollTop = info.top;\n              }\n            }\n            _enabled = !!eventsEnabled;\n            selectionInformation = eventsEnabled = null;\n          } finally {\n            (executionContext = prevExecutionContext),\n              (ReactDOMSharedInternals.p = previousPriority),\n              (ReactSharedInternals.T = rootMutationHasEffect);\n          }\n        }\n        root.current = finishedWork;\n        pendingEffectsStatus = PENDING_LAYOUT_PHASE;\n      }\n    }\n    function flushLayoutEffects() {\n      if (pendingEffectsStatus === PENDING_LAYOUT_PHASE) {\n        pendingEffectsStatus = NO_PENDING_EFFECTS;\n        var suspendedViewTransitionReason =\n          pendingSuspendedViewTransitionReason;\n        if (null !== suspendedViewTransitionReason) {\n          commitStartTime = now();\n          var startTime = commitEndTime,\n            endTime = commitStartTime;\n          !supportsUserTiming ||\n            endTime <= startTime ||\n            (animatingTask\n              ? animatingTask.run(\n                  console.timeStamp.bind(\n                    console,\n                    suspendedViewTransitionReason,\n                    startTime,\n                    endTime,\n                    currentTrack,\n                    LANES_TRACK_GROUP,\n                    \"secondary-light\"\n                  )\n                )\n              : console.timeStamp(\n                  suspendedViewTransitionReason,\n                  startTime,\n                  endTime,\n                  currentTrack,\n                  LANES_TRACK_GROUP,\n                  \"secondary-light\"\n                ));\n        }\n        suspendedViewTransitionReason = pendingEffectsRoot;\n        startTime = pendingFinishedWork;\n        endTime = pendingEffectsLanes;\n        var rootHasLayoutEffect = 0 !== (startTime.flags & 8772);\n        if (0 !== (startTime.subtreeFlags & 8772) || rootHasLayoutEffect) {\n          rootHasLayoutEffect = ReactSharedInternals.T;\n          ReactSharedInternals.T = null;\n          var _previousPriority = ReactDOMSharedInternals.p;\n          ReactDOMSharedInternals.p = DiscreteEventPriority;\n          var _prevExecutionContext = executionContext;\n          executionContext |= CommitContext;\n          try {\n            (inProgressLanes = endTime),\n              (inProgressRoot = suspendedViewTransitionReason),\n              resetComponentEffectTimers(),\n              commitLayoutEffectOnFiber(\n                suspendedViewTransitionReason,\n                startTime.alternate,\n                startTime\n              ),\n              (inProgressRoot = inProgressLanes = null);\n          } finally {\n            (executionContext = _prevExecutionContext),\n              (ReactDOMSharedInternals.p = _previousPriority),\n              (ReactSharedInternals.T = rootHasLayoutEffect);\n          }\n        }\n        suspendedViewTransitionReason = pendingEffectsRenderEndTime;\n        startTime = pendingSuspendedCommitReason;\n        commitEndTime = now();\n        suspendedViewTransitionReason =\n          null === startTime ? suspendedViewTransitionReason : commitStartTime;\n        startTime = commitEndTime;\n        endTime = pendingDelayedCommitReason === ABORTED_VIEW_TRANSITION_COMMIT;\n        rootHasLayoutEffect = workInProgressUpdateTask;\n        null !== commitErrors\n          ? logCommitErrored(\n              suspendedViewTransitionReason,\n              startTime,\n              commitErrors,\n              !1,\n              rootHasLayoutEffect\n            )\n          : !supportsUserTiming ||\n            startTime <= suspendedViewTransitionReason ||\n            (rootHasLayoutEffect\n              ? rootHasLayoutEffect.run(\n                  console.timeStamp.bind(\n                    console,\n                    endTime ? \"Commit Interrupted View Transition\" : \"Commit\",\n                    suspendedViewTransitionReason,\n                    startTime,\n                    currentTrack,\n                    LANES_TRACK_GROUP,\n                    endTime ? \"error\" : \"secondary-dark\"\n                  )\n                )\n              : console.timeStamp(\n                  endTime ? \"Commit Interrupted View Transition\" : \"Commit\",\n                  suspendedViewTransitionReason,\n                  startTime,\n                  currentTrack,\n                  LANES_TRACK_GROUP,\n                  endTime ? \"error\" : \"secondary-dark\"\n                ));\n        pendingEffectsStatus = PENDING_AFTER_MUTATION_PHASE;\n      }\n    }\n    function flushSpawnedWork() {\n      if (\n        pendingEffectsStatus === PENDING_SPAWNED_WORK ||\n        pendingEffectsStatus === PENDING_AFTER_MUTATION_PHASE\n      ) {\n        if (pendingEffectsStatus === PENDING_SPAWNED_WORK) {\n          var startViewTransitionStartTime = commitEndTime;\n          commitEndTime = now();\n          var endTime = commitEndTime,\n            abortedViewTransition =\n              pendingDelayedCommitReason === ABORTED_VIEW_TRANSITION_COMMIT;\n          !supportsUserTiming ||\n            endTime <= startViewTransitionStartTime ||\n            (animatingTask\n              ? animatingTask.run(\n                  console.timeStamp.bind(\n                    console,\n                    abortedViewTransition\n                      ? \"Interrupted View Transition\"\n                      : \"Starting Animation\",\n                    startViewTransitionStartTime,\n                    endTime,\n                    currentTrack,\n                    LANES_TRACK_GROUP,\n                    abortedViewTransition ? \"error\" : \"secondary-light\"\n                  )\n                )\n              : console.timeStamp(\n                  abortedViewTransition\n                    ? \"Interrupted View Transition\"\n                    : \"Starting Animation\",\n                  startViewTransitionStartTime,\n                  endTime,\n                  currentTrack,\n                  LANES_TRACK_GROUP,\n                  abortedViewTransition ? \" error\" : \"secondary-light\"\n                ));\n          pendingDelayedCommitReason !== ABORTED_VIEW_TRANSITION_COMMIT &&\n            (pendingDelayedCommitReason = ANIMATION_STARTED_COMMIT);\n        }\n        pendingEffectsStatus = NO_PENDING_EFFECTS;\n        requestPaint();\n        startViewTransitionStartTime = pendingEffectsRoot;\n        var finishedWork = pendingFinishedWork;\n        endTime = pendingEffectsLanes;\n        abortedViewTransition = pendingRecoverableErrors;\n        var rootDidHavePassiveEffects =\n          0 !== finishedWork.actualDuration ||\n          0 !== (finishedWork.subtreeFlags & 10256) ||\n          0 !== (finishedWork.flags & 10256);\n        rootDidHavePassiveEffects\n          ? (pendingEffectsStatus = PENDING_PASSIVE_PHASE)\n          : ((pendingEffectsStatus = NO_PENDING_EFFECTS),\n            (pendingFinishedWork = pendingEffectsRoot = null),\n            releaseRootPooledCache(\n              startViewTransitionStartTime,\n              startViewTransitionStartTime.pendingLanes\n            ),\n            (nestedPassiveUpdateCount = 0),\n            (rootWithPassiveNestedUpdates = null));\n        var remainingLanes = startViewTransitionStartTime.pendingLanes;\n        0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null);\n        rootDidHavePassiveEffects ||\n          commitDoubleInvokeEffectsInDEV(startViewTransitionStartTime);\n        remainingLanes = lanesToEventPriority(endTime);\n        finishedWork = finishedWork.stateNode;\n        if (\n          injectedHook &&\n          \"function\" === typeof injectedHook.onCommitFiberRoot\n        )\n          try {\n            var didError = 128 === (finishedWork.current.flags & 128);\n            switch (remainingLanes) {\n              case DiscreteEventPriority:\n                var schedulerPriority = ImmediatePriority;\n                break;\n              case ContinuousEventPriority:\n                schedulerPriority = UserBlockingPriority;\n                break;\n              case DefaultEventPriority:\n                schedulerPriority = NormalPriority$1;\n                break;\n              case IdleEventPriority:\n                schedulerPriority = IdlePriority;\n                break;\n              default:\n                schedulerPriority = NormalPriority$1;\n            }\n            injectedHook.onCommitFiberRoot(\n              rendererID,\n              finishedWork,\n              schedulerPriority,\n              didError\n            );\n          } catch (err) {\n            hasLoggedError ||\n              ((hasLoggedError = !0),\n              console.error(\n                \"React instrumentation encountered an error: %o\",\n                err\n              ));\n          }\n        isDevToolsPresent &&\n          startViewTransitionStartTime.memoizedUpdaters.clear();\n        onCommitRoot();\n        if (null !== abortedViewTransition) {\n          didError = ReactSharedInternals.T;\n          schedulerPriority = ReactDOMSharedInternals.p;\n          ReactDOMSharedInternals.p = DiscreteEventPriority;\n          ReactSharedInternals.T = null;\n          try {\n            var onRecoverableError =\n              startViewTransitionStartTime.onRecoverableError;\n            for (\n              finishedWork = 0;\n              finishedWork < abortedViewTransition.length;\n              finishedWork++\n            ) {\n              var recoverableError = abortedViewTransition[finishedWork],\n                errorInfo = makeErrorInfo(recoverableError.stack);\n              runWithFiberInDEV(\n                recoverableError.source,\n                onRecoverableError,\n                recoverableError.value,\n                errorInfo\n              );\n            }\n          } finally {\n            (ReactSharedInternals.T = didError),\n              (ReactDOMSharedInternals.p = schedulerPriority);\n          }\n        }\n        0 !== (pendingEffectsLanes & 3) && flushPendingEffects();\n        ensureRootIsScheduled(startViewTransitionStartTime);\n        remainingLanes = startViewTransitionStartTime.pendingLanes;\n        0 !== (endTime & 261930) && 0 !== (remainingLanes & 42)\n          ? ((nestedUpdateScheduled = !0),\n            startViewTransitionStartTime === rootWithNestedUpdates\n              ? nestedUpdateCount++\n              : ((nestedUpdateCount = 0),\n                (rootWithNestedUpdates = startViewTransitionStartTime)))\n          : (nestedUpdateCount = 0);\n        rootDidHavePassiveEffects || finalizeRender(endTime, commitEndTime);\n        flushSyncWorkAcrossRoots_impl(0, !1);\n      }\n    }\n    function makeErrorInfo(componentStack) {\n      componentStack = { componentStack: componentStack };\n      Object.defineProperty(componentStack, \"digest\", {\n        get: function () {\n          console.error(\n            'You are accessing \"digest\" from the errorInfo object passed to onRecoverableError. This property is no longer provided as part of errorInfo but can be accessed as a property of the Error instance itself.'\n          );\n        }\n      });\n      return componentStack;\n    }\n    function releaseRootPooledCache(root, remainingLanes) {\n      0 === (root.pooledCacheLanes &= remainingLanes) &&\n        ((remainingLanes = root.pooledCache),\n        null != remainingLanes &&\n          ((root.pooledCache = null), releaseCache(remainingLanes)));\n    }\n    function flushPendingEffects() {\n      flushMutationEffects();\n      flushLayoutEffects();\n      flushSpawnedWork();\n      return flushPassiveEffects();\n    }\n    function flushPassiveEffects() {\n      if (pendingEffectsStatus !== PENDING_PASSIVE_PHASE) return !1;\n      var root = pendingEffectsRoot,\n        remainingLanes = pendingEffectsRemainingLanes;\n      pendingEffectsRemainingLanes = 0;\n      var renderPriority = lanesToEventPriority(pendingEffectsLanes),\n        priority =\n          0 === DefaultEventPriority || DefaultEventPriority > renderPriority\n            ? DefaultEventPriority\n            : renderPriority;\n      renderPriority = ReactSharedInternals.T;\n      var previousPriority = ReactDOMSharedInternals.p;\n      try {\n        ReactDOMSharedInternals.p = priority;\n        ReactSharedInternals.T = null;\n        var transitions = pendingPassiveTransitions;\n        pendingPassiveTransitions = null;\n        priority = pendingEffectsRoot;\n        var lanes = pendingEffectsLanes;\n        pendingEffectsStatus = NO_PENDING_EFFECTS;\n        pendingFinishedWork = pendingEffectsRoot = null;\n        pendingEffectsLanes = 0;\n        if ((executionContext & (RenderContext | CommitContext)) !== NoContext)\n          throw Error(\"Cannot flush passive effects while already rendering.\");\n        setCurrentTrackFromLanes(lanes);\n        isFlushingPassiveEffects = !0;\n        didScheduleUpdateDuringPassiveEffects = !1;\n        var passiveEffectStartTime = 0;\n        commitErrors = null;\n        passiveEffectStartTime = now$1();\n        if (pendingDelayedCommitReason === ANIMATION_STARTED_COMMIT)\n          logAnimatingPhase(\n            commitEndTime,\n            passiveEffectStartTime,\n            animatingTask\n          );\n        else {\n          var startTime = commitEndTime,\n            endTime = passiveEffectStartTime,\n            delayedUntilPaint =\n              pendingDelayedCommitReason === DELAYED_PASSIVE_COMMIT;\n          !supportsUserTiming ||\n            endTime <= startTime ||\n            (workInProgressUpdateTask\n              ? workInProgressUpdateTask.run(\n                  console.timeStamp.bind(\n                    console,\n                    delayedUntilPaint ? \"Waiting for Paint\" : \"Waiting\",\n                    startTime,\n                    endTime,\n                    currentTrack,\n                    LANES_TRACK_GROUP,\n                    \"secondary-light\"\n                  )\n                )\n              : console.timeStamp(\n                  delayedUntilPaint ? \"Waiting for Paint\" : \"Waiting\",\n                  startTime,\n                  endTime,\n                  currentTrack,\n                  LANES_TRACK_GROUP,\n                  \"secondary-light\"\n                ));\n        }\n        startTime = executionContext;\n        executionContext |= CommitContext;\n        var finishedWork = priority.current;\n        resetComponentEffectTimers();\n        commitPassiveUnmountOnFiber(finishedWork);\n        var finishedWork$jscomp$0 = priority.current;\n        finishedWork = pendingEffectsRenderEndTime;\n        resetComponentEffectTimers();\n        commitPassiveMountOnFiber(\n          priority,\n          finishedWork$jscomp$0,\n          lanes,\n          transitions,\n          finishedWork\n        );\n        commitDoubleInvokeEffectsInDEV(priority);\n        executionContext = startTime;\n        var passiveEffectsEndTime = now$1();\n        finishedWork$jscomp$0 = passiveEffectStartTime;\n        finishedWork = workInProgressUpdateTask;\n        null !== commitErrors\n          ? logCommitErrored(\n              finishedWork$jscomp$0,\n              passiveEffectsEndTime,\n              commitErrors,\n              !0,\n              finishedWork\n            )\n          : !supportsUserTiming ||\n            passiveEffectsEndTime <= finishedWork$jscomp$0 ||\n            (finishedWork\n              ? finishedWork.run(\n                  console.timeStamp.bind(\n                    console,\n                    \"Remaining Effects\",\n                    finishedWork$jscomp$0,\n                    passiveEffectsEndTime,\n                    currentTrack,\n                    LANES_TRACK_GROUP,\n                    \"secondary-dark\"\n                  )\n                )\n              : console.timeStamp(\n                  \"Remaining Effects\",\n                  finishedWork$jscomp$0,\n                  passiveEffectsEndTime,\n                  currentTrack,\n                  LANES_TRACK_GROUP,\n                  \"secondary-dark\"\n                ));\n        finalizeRender(lanes, passiveEffectsEndTime);\n        flushSyncWorkAcrossRoots_impl(0, !1);\n        didScheduleUpdateDuringPassiveEffects\n          ? priority === rootWithPassiveNestedUpdates\n            ? nestedPassiveUpdateCount++\n            : ((nestedPassiveUpdateCount = 0),\n              (rootWithPassiveNestedUpdates = priority))\n          : (nestedPassiveUpdateCount = 0);\n        didScheduleUpdateDuringPassiveEffects = isFlushingPassiveEffects = !1;\n        if (\n          injectedHook &&\n          \"function\" === typeof injectedHook.onPostCommitFiberRoot\n        )\n          try {\n            injectedHook.onPostCommitFiberRoot(rendererID, priority);\n          } catch (err) {\n            hasLoggedError ||\n              ((hasLoggedError = !0),\n              console.error(\n                \"React instrumentation encountered an error: %o\",\n                err\n              ));\n          }\n        var stateNode = priority.current.stateNode;\n        stateNode.effectDuration = 0;\n        stateNode.passiveEffectDuration = 0;\n        return !0;\n      } finally {\n        (ReactDOMSharedInternals.p = previousPriority),\n          (ReactSharedInternals.T = renderPriority),\n          releaseRootPooledCache(root, remainingLanes);\n      }\n    }\n    function captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) {\n      sourceFiber = createCapturedValueAtFiber(error, sourceFiber);\n      recordEffectError(sourceFiber);\n      sourceFiber = createRootErrorUpdate(rootFiber.stateNode, sourceFiber, 2);\n      rootFiber = enqueueUpdate(rootFiber, sourceFiber, 2);\n      null !== rootFiber &&\n        (markRootUpdated$1(rootFiber, 2), ensureRootIsScheduled(rootFiber));\n    }\n    function captureCommitPhaseError(\n      sourceFiber,\n      nearestMountedAncestor,\n      error\n    ) {\n      isRunningInsertionEffect = !1;\n      if (3 === sourceFiber.tag)\n        captureCommitPhaseErrorOnRoot(sourceFiber, sourceFiber, error);\n      else {\n        for (; null !== nearestMountedAncestor; ) {\n          if (3 === nearestMountedAncestor.tag) {\n            captureCommitPhaseErrorOnRoot(\n              nearestMountedAncestor,\n              sourceFiber,\n              error\n            );\n            return;\n          }\n          if (1 === nearestMountedAncestor.tag) {\n            var instance = nearestMountedAncestor.stateNode;\n            if (\n              \"function\" ===\n                typeof nearestMountedAncestor.type.getDerivedStateFromError ||\n              (\"function\" === typeof instance.componentDidCatch &&\n                (null === legacyErrorBoundariesThatAlreadyFailed ||\n                  !legacyErrorBoundariesThatAlreadyFailed.has(instance)))\n            ) {\n              sourceFiber = createCapturedValueAtFiber(error, sourceFiber);\n              recordEffectError(sourceFiber);\n              error = createClassErrorUpdate(2);\n              instance = enqueueUpdate(nearestMountedAncestor, error, 2);\n              null !== instance &&\n                (initializeClassErrorUpdate(\n                  error,\n                  instance,\n                  nearestMountedAncestor,\n                  sourceFiber\n                ),\n                markRootUpdated$1(instance, 2),\n                ensureRootIsScheduled(instance));\n              return;\n            }\n          }\n          nearestMountedAncestor = nearestMountedAncestor.return;\n        }\n        console.error(\n          \"Internal React error: Attempted to capture a commit phase error inside a detached tree. This indicates a bug in React. Potential causes include deleting the same fiber more than once, committing an already-finished tree, or an inconsistent return pointer.\\n\\nError message:\\n\\n%s\",\n          error\n        );\n      }\n    }\n    function attachPingListener(root, wakeable, lanes) {\n      var pingCache = root.pingCache;\n      if (null === pingCache) {\n        pingCache = root.pingCache = new PossiblyWeakMap();\n        var threadIDs = new Set();\n        pingCache.set(wakeable, threadIDs);\n      } else\n        (threadIDs = pingCache.get(wakeable)),\n          void 0 === threadIDs &&\n            ((threadIDs = new Set()), pingCache.set(wakeable, threadIDs));\n      threadIDs.has(lanes) ||\n        ((workInProgressRootDidAttachPingListener = !0),\n        threadIDs.add(lanes),\n        (pingCache = pingSuspendedRoot.bind(null, root, wakeable, lanes)),\n        isDevToolsPresent && restorePendingUpdaters(root, lanes),\n        wakeable.then(pingCache, pingCache));\n    }\n    function pingSuspendedRoot(root, wakeable, pingedLanes) {\n      var pingCache = root.pingCache;\n      null !== pingCache && pingCache.delete(wakeable);\n      root.pingedLanes |= root.suspendedLanes & pingedLanes;\n      root.warmLanes &= ~pingedLanes;\n      0 !== (pingedLanes & 127)\n        ? 0 > blockingUpdateTime &&\n          ((blockingClampTime = blockingUpdateTime = now()),\n          (blockingUpdateTask = createTask(\"Promise Resolved\")),\n          (blockingUpdateType = PINGED_UPDATE))\n        : 0 !== (pingedLanes & 4194048) &&\n          0 > transitionUpdateTime &&\n          ((transitionClampTime = transitionUpdateTime = now()),\n          (transitionUpdateTask = createTask(\"Promise Resolved\")),\n          (transitionUpdateType = PINGED_UPDATE));\n      isConcurrentActEnvironment() &&\n        null === ReactSharedInternals.actQueue &&\n        console.error(\n          \"A suspended resource finished loading inside a test, but the event was not wrapped in act(...).\\n\\nWhen testing, code that resolves suspended data should be wrapped into act(...):\\n\\nact(() => {\\n  /* finish loading suspended data */\\n});\\n/* assert on the output */\\n\\nThis ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act\"\n        );\n      workInProgressRoot === root &&\n        (workInProgressRootRenderLanes & pingedLanes) === pingedLanes &&\n        (workInProgressRootExitStatus === RootSuspendedWithDelay ||\n        (workInProgressRootExitStatus === RootSuspended &&\n          (workInProgressRootRenderLanes & 62914560) ===\n            workInProgressRootRenderLanes &&\n          now$1() - globalMostRecentFallbackTime < FALLBACK_THROTTLE_MS)\n          ? (executionContext & RenderContext) === NoContext &&\n            prepareFreshStack(root, 0)\n          : (workInProgressRootPingedLanes |= pingedLanes),\n        workInProgressSuspendedRetryLanes === workInProgressRootRenderLanes &&\n          (workInProgressSuspendedRetryLanes = 0));\n      ensureRootIsScheduled(root);\n    }\n    function retryTimedOutBoundary(boundaryFiber, retryLane) {\n      0 === retryLane && (retryLane = claimNextRetryLane());\n      boundaryFiber = enqueueConcurrentRenderForLane(boundaryFiber, retryLane);\n      null !== boundaryFiber &&\n        (markRootUpdated$1(boundaryFiber, retryLane),\n        ensureRootIsScheduled(boundaryFiber));\n    }\n    function retryDehydratedSuspenseBoundary(boundaryFiber) {\n      var suspenseState = boundaryFiber.memoizedState,\n        retryLane = 0;\n      null !== suspenseState && (retryLane = suspenseState.retryLane);\n      retryTimedOutBoundary(boundaryFiber, retryLane);\n    }\n    function resolveRetryWakeable(boundaryFiber, wakeable) {\n      var retryLane = 0;\n      switch (boundaryFiber.tag) {\n        case 31:\n        case 13:\n          var retryCache = boundaryFiber.stateNode;\n          var suspenseState = boundaryFiber.memoizedState;\n          null !== suspenseState && (retryLane = suspenseState.retryLane);\n          break;\n        case 19:\n          retryCache = boundaryFiber.stateNode;\n          break;\n        case 22:\n          retryCache = boundaryFiber.stateNode._retryCache;\n          break;\n        default:\n          throw Error(\n            \"Pinged unknown suspense boundary type. This is probably a bug in React.\"\n          );\n      }\n      null !== retryCache && retryCache.delete(wakeable);\n      retryTimedOutBoundary(boundaryFiber, retryLane);\n    }\n    function recursivelyTraverseAndDoubleInvokeEffectsInDEV(\n      root$jscomp$0,\n      parentFiber,\n      isInStrictMode\n    ) {\n      if (0 !== (parentFiber.subtreeFlags & 67117056))\n        for (parentFiber = parentFiber.child; null !== parentFiber; ) {\n          var root = root$jscomp$0,\n            fiber = parentFiber,\n            isStrictModeFiber = fiber.type === REACT_STRICT_MODE_TYPE;\n          isStrictModeFiber = isInStrictMode || isStrictModeFiber;\n          22 !== fiber.tag\n            ? fiber.flags & 67108864\n              ? isStrictModeFiber &&\n                runWithFiberInDEV(\n                  fiber,\n                  doubleInvokeEffectsOnFiber,\n                  root,\n                  fiber\n                )\n              : recursivelyTraverseAndDoubleInvokeEffectsInDEV(\n                  root,\n                  fiber,\n                  isStrictModeFiber\n                )\n            : null === fiber.memoizedState &&\n              (isStrictModeFiber && fiber.flags & 8192\n                ? runWithFiberInDEV(\n                    fiber,\n                    doubleInvokeEffectsOnFiber,\n                    root,\n                    fiber\n                  )\n                : fiber.subtreeFlags & 67108864 &&\n                  runWithFiberInDEV(\n                    fiber,\n                    recursivelyTraverseAndDoubleInvokeEffectsInDEV,\n                    root,\n                    fiber,\n                    isStrictModeFiber\n                  ));\n          parentFiber = parentFiber.sibling;\n        }\n    }\n    function doubleInvokeEffectsOnFiber(root, fiber) {\n      setIsStrictModeForDevtools(!0);\n      try {\n        disappearLayoutEffects(fiber),\n          disconnectPassiveEffect(fiber),\n          reappearLayoutEffects(root, fiber.alternate, fiber, !1),\n          reconnectPassiveEffects(root, fiber, 0, null, !1, 0);\n      } finally {\n        setIsStrictModeForDevtools(!1);\n      }\n    }\n    function commitDoubleInvokeEffectsInDEV(root) {\n      var doubleInvokeEffects = !0;\n      root.current.mode & (StrictLegacyMode | StrictEffectsMode) ||\n        (doubleInvokeEffects = !1);\n      recursivelyTraverseAndDoubleInvokeEffectsInDEV(\n        root,\n        root.current,\n        doubleInvokeEffects\n      );\n    }\n    function warnAboutUpdateOnNotYetMountedFiberInDEV(fiber) {\n      if ((executionContext & RenderContext) === NoContext) {\n        var tag = fiber.tag;\n        if (\n          3 === tag ||\n          1 === tag ||\n          0 === tag ||\n          11 === tag ||\n          14 === tag ||\n          15 === tag\n        ) {\n          tag = getComponentNameFromFiber(fiber) || \"ReactComponent\";\n          if (null !== didWarnStateUpdateForNotYetMountedComponent) {\n            if (didWarnStateUpdateForNotYetMountedComponent.has(tag)) return;\n            didWarnStateUpdateForNotYetMountedComponent.add(tag);\n          } else didWarnStateUpdateForNotYetMountedComponent = new Set([tag]);\n          runWithFiberInDEV(fiber, function () {\n            console.error(\n              \"Can't perform a React state update on a component that hasn't mounted yet. This indicates that you have a side-effect in your render function that asynchronously tries to update the component. Move this work to useEffect instead.\"\n            );\n          });\n        }\n      }\n    }\n    function restorePendingUpdaters(root, lanes) {\n      isDevToolsPresent &&\n        root.memoizedUpdaters.forEach(function (schedulingFiber) {\n          addFiberToLanesMap(root, schedulingFiber, lanes);\n        });\n    }\n    function scheduleCallback$1(priorityLevel, callback) {\n      var actQueue = ReactSharedInternals.actQueue;\n      return null !== actQueue\n        ? (actQueue.push(callback), fakeActCallbackNode$1)\n        : scheduleCallback$3(priorityLevel, callback);\n    }\n    function warnIfUpdatesNotWrappedWithActDEV(fiber) {\n      isConcurrentActEnvironment() &&\n        null === ReactSharedInternals.actQueue &&\n        runWithFiberInDEV(fiber, function () {\n          console.error(\n            \"An update to %s inside a test was not wrapped in act(...).\\n\\nWhen testing, code that causes React state updates should be wrapped into act(...):\\n\\nact(() => {\\n  /* fire events that update state */\\n});\\n/* assert on the output */\\n\\nThis ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act\",\n            getComponentNameFromFiber(fiber)\n          );\n        });\n    }\n    function ensureRootIsScheduled(root) {\n      root !== lastScheduledRoot &&\n        null === root.next &&\n        (null === lastScheduledRoot\n          ? (firstScheduledRoot = lastScheduledRoot = root)\n          : (lastScheduledRoot = lastScheduledRoot.next = root));\n      mightHavePendingSyncWork = !0;\n      null !== ReactSharedInternals.actQueue\n        ? didScheduleMicrotask_act ||\n          ((didScheduleMicrotask_act = !0), scheduleImmediateRootScheduleTask())\n        : didScheduleMicrotask ||\n          ((didScheduleMicrotask = !0), scheduleImmediateRootScheduleTask());\n    }\n    function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) {\n      if (!isFlushingWork && mightHavePendingSyncWork) {\n        isFlushingWork = !0;\n        do {\n          var didPerformSomeWork = !1;\n          for (var root = firstScheduledRoot; null !== root; ) {\n            if (!onlyLegacy)\n              if (0 !== syncTransitionLanes) {\n                var pendingLanes = root.pendingLanes;\n                if (0 === pendingLanes) var nextLanes = 0;\n                else {\n                  var suspendedLanes = root.suspendedLanes,\n                    pingedLanes = root.pingedLanes;\n                  nextLanes =\n                    (1 << (31 - clz32(42 | syncTransitionLanes) + 1)) - 1;\n                  nextLanes &= pendingLanes & ~(suspendedLanes & ~pingedLanes);\n                  nextLanes =\n                    nextLanes & 201326741\n                      ? (nextLanes & 201326741) | 1\n                      : nextLanes\n                        ? nextLanes | 2\n                        : 0;\n                }\n                0 !== nextLanes &&\n                  ((didPerformSomeWork = !0),\n                  performSyncWorkOnRoot(root, nextLanes));\n              } else\n                (nextLanes = workInProgressRootRenderLanes),\n                  (nextLanes = getNextLanes(\n                    root,\n                    root === workInProgressRoot ? nextLanes : 0,\n                    null !== root.cancelPendingCommit ||\n                      root.timeoutHandle !== noTimeout\n                  )),\n                  0 === (nextLanes & 3) ||\n                    checkIfRootIsPrerendering(root, nextLanes) ||\n                    ((didPerformSomeWork = !0),\n                    performSyncWorkOnRoot(root, nextLanes));\n            root = root.next;\n          }\n        } while (didPerformSomeWork);\n        isFlushingWork = !1;\n      }\n    }\n    function processRootScheduleInImmediateTask() {\n      schedulerEvent = window.event;\n      processRootScheduleInMicrotask();\n    }\n    function processRootScheduleInMicrotask() {\n      mightHavePendingSyncWork =\n        didScheduleMicrotask_act =\n        didScheduleMicrotask =\n          !1;\n      var syncTransitionLanes = 0;\n      0 !== currentEventTransitionLane &&\n        shouldAttemptEagerTransition() &&\n        (syncTransitionLanes = currentEventTransitionLane);\n      for (\n        var currentTime = now$1(), prev = null, root = firstScheduledRoot;\n        null !== root;\n\n      ) {\n        var next = root.next,\n          nextLanes = scheduleTaskForRootDuringMicrotask(root, currentTime);\n        if (0 === nextLanes)\n          (root.next = null),\n            null === prev ? (firstScheduledRoot = next) : (prev.next = next),\n            null === next && (lastScheduledRoot = prev);\n        else if (\n          ((prev = root), 0 !== syncTransitionLanes || 0 !== (nextLanes & 3))\n        )\n          mightHavePendingSyncWork = !0;\n        root = next;\n      }\n      (pendingEffectsStatus !== NO_PENDING_EFFECTS &&\n        pendingEffectsStatus !== PENDING_PASSIVE_PHASE) ||\n        flushSyncWorkAcrossRoots_impl(syncTransitionLanes, !1);\n      0 !== currentEventTransitionLane && (currentEventTransitionLane = 0);\n    }\n    function scheduleTaskForRootDuringMicrotask(root, currentTime) {\n      for (\n        var suspendedLanes = root.suspendedLanes,\n          pingedLanes = root.pingedLanes,\n          expirationTimes = root.expirationTimes,\n          lanes = root.pendingLanes & -62914561;\n        0 < lanes;\n\n      ) {\n        var index = 31 - clz32(lanes),\n          lane = 1 << index,\n          expirationTime = expirationTimes[index];\n        if (-1 === expirationTime) {\n          if (0 === (lane & suspendedLanes) || 0 !== (lane & pingedLanes))\n            expirationTimes[index] = computeExpirationTime(lane, currentTime);\n        } else expirationTime <= currentTime && (root.expiredLanes |= lane);\n        lanes &= ~lane;\n      }\n      currentTime = workInProgressRoot;\n      suspendedLanes = workInProgressRootRenderLanes;\n      suspendedLanes = getNextLanes(\n        root,\n        root === currentTime ? suspendedLanes : 0,\n        null !== root.cancelPendingCommit || root.timeoutHandle !== noTimeout\n      );\n      pingedLanes = root.callbackNode;\n      if (\n        0 === suspendedLanes ||\n        (root === currentTime &&\n          (workInProgressSuspendedReason === SuspendedOnData ||\n            workInProgressSuspendedReason === SuspendedOnAction)) ||\n        null !== root.cancelPendingCommit\n      )\n        return (\n          null !== pingedLanes && cancelCallback(pingedLanes),\n          (root.callbackNode = null),\n          (root.callbackPriority = 0)\n        );\n      if (\n        0 === (suspendedLanes & 3) ||\n        checkIfRootIsPrerendering(root, suspendedLanes)\n      ) {\n        currentTime = suspendedLanes & -suspendedLanes;\n        if (\n          currentTime !== root.callbackPriority ||\n          (null !== ReactSharedInternals.actQueue &&\n            pingedLanes !== fakeActCallbackNode)\n        )\n          cancelCallback(pingedLanes);\n        else return currentTime;\n        switch (lanesToEventPriority(suspendedLanes)) {\n          case DiscreteEventPriority:\n          case ContinuousEventPriority:\n            suspendedLanes = UserBlockingPriority;\n            break;\n          case DefaultEventPriority:\n            suspendedLanes = NormalPriority$1;\n            break;\n          case IdleEventPriority:\n            suspendedLanes = IdlePriority;\n            break;\n          default:\n            suspendedLanes = NormalPriority$1;\n        }\n        pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root);\n        null !== ReactSharedInternals.actQueue\n          ? (ReactSharedInternals.actQueue.push(pingedLanes),\n            (suspendedLanes = fakeActCallbackNode))\n          : (suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes));\n        root.callbackPriority = currentTime;\n        root.callbackNode = suspendedLanes;\n        return currentTime;\n      }\n      null !== pingedLanes && cancelCallback(pingedLanes);\n      root.callbackPriority = 2;\n      root.callbackNode = null;\n      return 2;\n    }\n    function performWorkOnRootViaSchedulerTask(root, didTimeout) {\n      nestedUpdateScheduled = currentUpdateIsNested = !1;\n      schedulerEvent = window.event;\n      if (\n        pendingEffectsStatus !== NO_PENDING_EFFECTS &&\n        pendingEffectsStatus !== PENDING_PASSIVE_PHASE\n      )\n        return (root.callbackNode = null), (root.callbackPriority = 0), null;\n      var originalCallbackNode = root.callbackNode;\n      pendingDelayedCommitReason === IMMEDIATE_COMMIT &&\n        (pendingDelayedCommitReason = DELAYED_PASSIVE_COMMIT);\n      if (flushPendingEffects() && root.callbackNode !== originalCallbackNode)\n        return null;\n      var workInProgressRootRenderLanes$jscomp$0 =\n        workInProgressRootRenderLanes;\n      workInProgressRootRenderLanes$jscomp$0 = getNextLanes(\n        root,\n        root === workInProgressRoot\n          ? workInProgressRootRenderLanes$jscomp$0\n          : 0,\n        null !== root.cancelPendingCommit || root.timeoutHandle !== noTimeout\n      );\n      if (0 === workInProgressRootRenderLanes$jscomp$0) return null;\n      performWorkOnRoot(\n        root,\n        workInProgressRootRenderLanes$jscomp$0,\n        didTimeout\n      );\n      scheduleTaskForRootDuringMicrotask(root, now$1());\n      return null != root.callbackNode &&\n        root.callbackNode === originalCallbackNode\n        ? performWorkOnRootViaSchedulerTask.bind(null, root)\n        : null;\n    }\n    function performSyncWorkOnRoot(root, lanes) {\n      if (flushPendingEffects()) return null;\n      currentUpdateIsNested = nestedUpdateScheduled;\n      nestedUpdateScheduled = !1;\n      performWorkOnRoot(root, lanes, !0);\n    }\n    function cancelCallback(callbackNode) {\n      callbackNode !== fakeActCallbackNode &&\n        null !== callbackNode &&\n        cancelCallback$1(callbackNode);\n    }\n    function scheduleImmediateRootScheduleTask() {\n      null !== ReactSharedInternals.actQueue &&\n        ReactSharedInternals.actQueue.push(function () {\n          processRootScheduleInMicrotask();\n          return null;\n        });\n      scheduleMicrotask(function () {\n        (executionContext & (RenderContext | CommitContext)) !== NoContext\n          ? scheduleCallback$3(\n              ImmediatePriority,\n              processRootScheduleInImmediateTask\n            )\n          : processRootScheduleInMicrotask();\n      });\n    }\n    function requestTransitionLane() {\n      if (0 === currentEventTransitionLane) {\n        var actionScopeLane = currentEntangledLane;\n        0 === actionScopeLane &&\n          ((actionScopeLane = nextTransitionUpdateLane),\n          (nextTransitionUpdateLane <<= 1),\n          0 === (nextTransitionUpdateLane & 261888) &&\n            (nextTransitionUpdateLane = 256));\n        currentEventTransitionLane = actionScopeLane;\n      }\n      return currentEventTransitionLane;\n    }\n    function coerceFormActionProp(actionProp) {\n      if (\n        null == actionProp ||\n        \"symbol\" === typeof actionProp ||\n        \"boolean\" === typeof actionProp\n      )\n        return null;\n      if (\"function\" === typeof actionProp) return actionProp;\n      checkAttributeStringCoercion(actionProp, \"action\");\n      return sanitizeURL(\"\" + actionProp);\n    }\n    function createFormDataWithSubmitter(form, submitter) {\n      var temp = submitter.ownerDocument.createElement(\"input\");\n      temp.name = submitter.name;\n      temp.value = submitter.value;\n      form.id && temp.setAttribute(\"form\", form.id);\n      submitter.parentNode.insertBefore(temp, submitter);\n      form = new FormData(form);\n      temp.parentNode.removeChild(temp);\n      return form;\n    }\n    function extractEvents$1(\n      dispatchQueue,\n      domEventName,\n      maybeTargetInst,\n      nativeEvent,\n      nativeEventTarget\n    ) {\n      if (\n        \"submit\" === domEventName &&\n        maybeTargetInst &&\n        maybeTargetInst.stateNode === nativeEventTarget\n      ) {\n        var action = coerceFormActionProp(\n            (nativeEventTarget[internalPropsKey] || null).action\n          ),\n          submitter = nativeEvent.submitter;\n        submitter &&\n          ((domEventName = (domEventName = submitter[internalPropsKey] || null)\n            ? coerceFormActionProp(domEventName.formAction)\n            : submitter.getAttribute(\"formAction\")),\n          null !== domEventName &&\n            ((action = domEventName), (submitter = null)));\n        var event = new SyntheticEvent(\n          \"action\",\n          \"action\",\n          null,\n          nativeEvent,\n          nativeEventTarget\n        );\n        dispatchQueue.push({\n          event: event,\n          listeners: [\n            {\n              instance: null,\n              listener: function () {\n                if (nativeEvent.defaultPrevented) {\n                  if (0 !== currentEventTransitionLane) {\n                    var formData = submitter\n                        ? createFormDataWithSubmitter(\n                            nativeEventTarget,\n                            submitter\n                          )\n                        : new FormData(nativeEventTarget),\n                      pendingState = {\n                        pending: !0,\n                        data: formData,\n                        method: nativeEventTarget.method,\n                        action: action\n                      };\n                    Object.freeze(pendingState);\n                    startHostTransition(\n                      maybeTargetInst,\n                      pendingState,\n                      null,\n                      formData\n                    );\n                  }\n                } else\n                  \"function\" === typeof action &&\n                    (event.preventDefault(),\n                    (formData = submitter\n                      ? createFormDataWithSubmitter(\n                          nativeEventTarget,\n                          submitter\n                        )\n                      : new FormData(nativeEventTarget)),\n                    (pendingState = {\n                      pending: !0,\n                      data: formData,\n                      method: nativeEventTarget.method,\n                      action: action\n                    }),\n                    Object.freeze(pendingState),\n                    startHostTransition(\n                      maybeTargetInst,\n                      pendingState,\n                      action,\n                      formData\n                    ));\n              },\n              currentTarget: nativeEventTarget\n            }\n          ]\n        });\n      }\n    }\n    function executeDispatch(event, listener, currentTarget) {\n      event.currentTarget = currentTarget;\n      try {\n        listener(event);\n      } catch (error) {\n        reportGlobalError(error);\n      }\n      event.currentTarget = null;\n    }\n    function processDispatchQueue(dispatchQueue, eventSystemFlags) {\n      eventSystemFlags = 0 !== (eventSystemFlags & 4);\n      for (var i = 0; i < dispatchQueue.length; i++) {\n        var _dispatchQueue$i = dispatchQueue[i];\n        a: {\n          var previousInstance = void 0,\n            event = _dispatchQueue$i.event;\n          _dispatchQueue$i = _dispatchQueue$i.listeners;\n          if (eventSystemFlags)\n            for (\n              var i$jscomp$0 = _dispatchQueue$i.length - 1;\n              0 <= i$jscomp$0;\n              i$jscomp$0--\n            ) {\n              var _dispatchListeners$i = _dispatchQueue$i[i$jscomp$0],\n                instance = _dispatchListeners$i.instance,\n                currentTarget = _dispatchListeners$i.currentTarget;\n              _dispatchListeners$i = _dispatchListeners$i.listener;\n              if (instance !== previousInstance && event.isPropagationStopped())\n                break a;\n              null !== instance\n                ? runWithFiberInDEV(\n                    instance,\n                    executeDispatch,\n                    event,\n                    _dispatchListeners$i,\n                    currentTarget\n                  )\n                : executeDispatch(event, _dispatchListeners$i, currentTarget);\n              previousInstance = instance;\n            }\n          else\n            for (\n              i$jscomp$0 = 0;\n              i$jscomp$0 < _dispatchQueue$i.length;\n              i$jscomp$0++\n            ) {\n              _dispatchListeners$i = _dispatchQueue$i[i$jscomp$0];\n              instance = _dispatchListeners$i.instance;\n              currentTarget = _dispatchListeners$i.currentTarget;\n              _dispatchListeners$i = _dispatchListeners$i.listener;\n              if (instance !== previousInstance && event.isPropagationStopped())\n                break a;\n              null !== instance\n                ? runWithFiberInDEV(\n                    instance,\n                    executeDispatch,\n                    event,\n                    _dispatchListeners$i,\n                    currentTarget\n                  )\n                : executeDispatch(event, _dispatchListeners$i, currentTarget);\n              previousInstance = instance;\n            }\n        }\n      }\n    }\n    function listenToNonDelegatedEvent(domEventName, targetElement) {\n      nonDelegatedEvents.has(domEventName) ||\n        console.error(\n          'Did not expect a listenToNonDelegatedEvent() call for \"%s\". This is a bug in React. Please file an issue.',\n          domEventName\n        );\n      var listenerSet = targetElement[internalEventHandlersKey];\n      void 0 === listenerSet &&\n        (listenerSet = targetElement[internalEventHandlersKey] = new Set());\n      var listenerSetKey = domEventName + \"__bubble\";\n      listenerSet.has(listenerSetKey) ||\n        (addTrappedEventListener(targetElement, domEventName, 2, !1),\n        listenerSet.add(listenerSetKey));\n    }\n    function listenToNativeEvent(domEventName, isCapturePhaseListener, target) {\n      nonDelegatedEvents.has(domEventName) &&\n        !isCapturePhaseListener &&\n        console.error(\n          'Did not expect a listenToNativeEvent() call for \"%s\" in the bubble phase. This is a bug in React. Please file an issue.',\n          domEventName\n        );\n      var eventSystemFlags = 0;\n      isCapturePhaseListener && (eventSystemFlags |= 4);\n      addTrappedEventListener(\n        target,\n        domEventName,\n        eventSystemFlags,\n        isCapturePhaseListener\n      );\n    }\n    function listenToAllSupportedEvents(rootContainerElement) {\n      if (!rootContainerElement[listeningMarker]) {\n        rootContainerElement[listeningMarker] = !0;\n        allNativeEvents.forEach(function (domEventName) {\n          \"selectionchange\" !== domEventName &&\n            (nonDelegatedEvents.has(domEventName) ||\n              listenToNativeEvent(domEventName, !1, rootContainerElement),\n            listenToNativeEvent(domEventName, !0, rootContainerElement));\n        });\n        var ownerDocument =\n          9 === rootContainerElement.nodeType\n            ? rootContainerElement\n            : rootContainerElement.ownerDocument;\n        null === ownerDocument ||\n          ownerDocument[listeningMarker] ||\n          ((ownerDocument[listeningMarker] = !0),\n          listenToNativeEvent(\"selectionchange\", !1, ownerDocument));\n      }\n    }\n    function addTrappedEventListener(\n      targetContainer,\n      domEventName,\n      eventSystemFlags,\n      isCapturePhaseListener\n    ) {\n      switch (getEventPriority(domEventName)) {\n        case DiscreteEventPriority:\n          var listenerWrapper = dispatchDiscreteEvent;\n          break;\n        case ContinuousEventPriority:\n          listenerWrapper = dispatchContinuousEvent;\n          break;\n        default:\n          listenerWrapper = dispatchEvent;\n      }\n      eventSystemFlags = listenerWrapper.bind(\n        null,\n        domEventName,\n        eventSystemFlags,\n        targetContainer\n      );\n      listenerWrapper = void 0;\n      !passiveBrowserEventsSupported ||\n        (\"touchstart\" !== domEventName &&\n          \"touchmove\" !== domEventName &&\n          \"wheel\" !== domEventName) ||\n        (listenerWrapper = !0);\n      isCapturePhaseListener\n        ? void 0 !== listenerWrapper\n          ? targetContainer.addEventListener(domEventName, eventSystemFlags, {\n              capture: !0,\n              passive: listenerWrapper\n            })\n          : targetContainer.addEventListener(domEventName, eventSystemFlags, !0)\n        : void 0 !== listenerWrapper\n          ? targetContainer.addEventListener(domEventName, eventSystemFlags, {\n              passive: listenerWrapper\n            })\n          : targetContainer.addEventListener(\n              domEventName,\n              eventSystemFlags,\n              !1\n            );\n    }\n    function dispatchEventForPluginEventSystem(\n      domEventName,\n      eventSystemFlags,\n      nativeEvent,\n      targetInst$jscomp$0,\n      targetContainer\n    ) {\n      var ancestorInst = targetInst$jscomp$0;\n      if (\n        0 === (eventSystemFlags & 1) &&\n        0 === (eventSystemFlags & 2) &&\n        null !== targetInst$jscomp$0\n      )\n        a: for (;;) {\n          if (null === targetInst$jscomp$0) return;\n          var nodeTag = targetInst$jscomp$0.tag;\n          if (3 === nodeTag || 4 === nodeTag) {\n            var container = targetInst$jscomp$0.stateNode.containerInfo;\n            if (container === targetContainer) break;\n            if (4 === nodeTag)\n              for (nodeTag = targetInst$jscomp$0.return; null !== nodeTag; ) {\n                var grandTag = nodeTag.tag;\n                if (\n                  (3 === grandTag || 4 === grandTag) &&\n                  nodeTag.stateNode.containerInfo === targetContainer\n                )\n                  return;\n                nodeTag = nodeTag.return;\n              }\n            for (; null !== container; ) {\n              nodeTag = getClosestInstanceFromNode(container);\n              if (null === nodeTag) return;\n              grandTag = nodeTag.tag;\n              if (\n                5 === grandTag ||\n                6 === grandTag ||\n                26 === grandTag ||\n                27 === grandTag\n              ) {\n                targetInst$jscomp$0 = ancestorInst = nodeTag;\n                continue a;\n              }\n              container = container.parentNode;\n            }\n          }\n          targetInst$jscomp$0 = targetInst$jscomp$0.return;\n        }\n      batchedUpdates$1(function () {\n        var targetInst = ancestorInst,\n          nativeEventTarget = getEventTarget(nativeEvent),\n          dispatchQueue = [];\n        a: {\n          var reactName = topLevelEventsToReactNames.get(domEventName);\n          if (void 0 !== reactName) {\n            var SyntheticEventCtor = SyntheticEvent,\n              reactEventType = domEventName;\n            switch (domEventName) {\n              case \"keypress\":\n                if (0 === getEventCharCode(nativeEvent)) break a;\n              case \"keydown\":\n              case \"keyup\":\n                SyntheticEventCtor = SyntheticKeyboardEvent;\n                break;\n              case \"focusin\":\n                reactEventType = \"focus\";\n                SyntheticEventCtor = SyntheticFocusEvent;\n                break;\n              case \"focusout\":\n                reactEventType = \"blur\";\n                SyntheticEventCtor = SyntheticFocusEvent;\n                break;\n              case \"beforeblur\":\n              case \"afterblur\":\n                SyntheticEventCtor = SyntheticFocusEvent;\n                break;\n              case \"click\":\n                if (2 === nativeEvent.button) break a;\n              case \"auxclick\":\n              case \"dblclick\":\n              case \"mousedown\":\n              case \"mousemove\":\n              case \"mouseup\":\n              case \"mouseout\":\n              case \"mouseover\":\n              case \"contextmenu\":\n                SyntheticEventCtor = SyntheticMouseEvent;\n                break;\n              case \"drag\":\n              case \"dragend\":\n              case \"dragenter\":\n              case \"dragexit\":\n              case \"dragleave\":\n              case \"dragover\":\n              case \"dragstart\":\n              case \"drop\":\n                SyntheticEventCtor = SyntheticDragEvent;\n                break;\n              case \"touchcancel\":\n              case \"touchend\":\n              case \"touchmove\":\n              case \"touchstart\":\n                SyntheticEventCtor = SyntheticTouchEvent;\n                break;\n              case ANIMATION_END:\n              case ANIMATION_ITERATION:\n              case ANIMATION_START:\n                SyntheticEventCtor = SyntheticAnimationEvent;\n                break;\n              case TRANSITION_END:\n                SyntheticEventCtor = SyntheticTransitionEvent;\n                break;\n              case \"scroll\":\n              case \"scrollend\":\n                SyntheticEventCtor = SyntheticUIEvent;\n                break;\n              case \"wheel\":\n                SyntheticEventCtor = SyntheticWheelEvent;\n                break;\n              case \"copy\":\n              case \"cut\":\n              case \"paste\":\n                SyntheticEventCtor = SyntheticClipboardEvent;\n                break;\n              case \"gotpointercapture\":\n              case \"lostpointercapture\":\n              case \"pointercancel\":\n              case \"pointerdown\":\n              case \"pointermove\":\n              case \"pointerout\":\n              case \"pointerover\":\n              case \"pointerup\":\n                SyntheticEventCtor = SyntheticPointerEvent;\n                break;\n              case \"toggle\":\n              case \"beforetoggle\":\n                SyntheticEventCtor = SyntheticToggleEvent;\n            }\n            var inCapturePhase = 0 !== (eventSystemFlags & 4),\n              accumulateTargetOnly =\n                !inCapturePhase &&\n                (\"scroll\" === domEventName || \"scrollend\" === domEventName),\n              reactEventName = inCapturePhase\n                ? null !== reactName\n                  ? reactName + \"Capture\"\n                  : null\n                : reactName;\n            inCapturePhase = [];\n            for (\n              var instance = targetInst, lastHostComponent;\n              null !== instance;\n\n            ) {\n              var _instance2 = instance;\n              lastHostComponent = _instance2.stateNode;\n              _instance2 = _instance2.tag;\n              (5 !== _instance2 && 26 !== _instance2 && 27 !== _instance2) ||\n                null === lastHostComponent ||\n                null === reactEventName ||\n                ((_instance2 = getListener(instance, reactEventName)),\n                null != _instance2 &&\n                  inCapturePhase.push(\n                    createDispatchListener(\n                      instance,\n                      _instance2,\n                      lastHostComponent\n                    )\n                  ));\n              if (accumulateTargetOnly) break;\n              instance = instance.return;\n            }\n            0 < inCapturePhase.length &&\n              ((reactName = new SyntheticEventCtor(\n                reactName,\n                reactEventType,\n                null,\n                nativeEvent,\n                nativeEventTarget\n              )),\n              dispatchQueue.push({\n                event: reactName,\n                listeners: inCapturePhase\n              }));\n          }\n        }\n        if (0 === (eventSystemFlags & 7)) {\n          a: {\n            reactName =\n              \"mouseover\" === domEventName || \"pointerover\" === domEventName;\n            SyntheticEventCtor =\n              \"mouseout\" === domEventName || \"pointerout\" === domEventName;\n            if (\n              reactName &&\n              nativeEvent !== currentReplayingEvent &&\n              (reactEventType =\n                nativeEvent.relatedTarget || nativeEvent.fromElement) &&\n              (getClosestInstanceFromNode(reactEventType) ||\n                reactEventType[internalContainerInstanceKey])\n            )\n              break a;\n            if (SyntheticEventCtor || reactName) {\n              reactName =\n                nativeEventTarget.window === nativeEventTarget\n                  ? nativeEventTarget\n                  : (reactName = nativeEventTarget.ownerDocument)\n                    ? reactName.defaultView || reactName.parentWindow\n                    : window;\n              if (SyntheticEventCtor) {\n                if (\n                  ((reactEventType =\n                    nativeEvent.relatedTarget || nativeEvent.toElement),\n                  (SyntheticEventCtor = targetInst),\n                  (reactEventType = reactEventType\n                    ? getClosestInstanceFromNode(reactEventType)\n                    : null),\n                  null !== reactEventType &&\n                    ((accumulateTargetOnly =\n                      getNearestMountedFiber(reactEventType)),\n                    (inCapturePhase = reactEventType.tag),\n                    reactEventType !== accumulateTargetOnly ||\n                      (5 !== inCapturePhase &&\n                        27 !== inCapturePhase &&\n                        6 !== inCapturePhase)))\n                )\n                  reactEventType = null;\n              } else (SyntheticEventCtor = null), (reactEventType = targetInst);\n              if (SyntheticEventCtor !== reactEventType) {\n                inCapturePhase = SyntheticMouseEvent;\n                _instance2 = \"onMouseLeave\";\n                reactEventName = \"onMouseEnter\";\n                instance = \"mouse\";\n                if (\n                  \"pointerout\" === domEventName ||\n                  \"pointerover\" === domEventName\n                )\n                  (inCapturePhase = SyntheticPointerEvent),\n                    (_instance2 = \"onPointerLeave\"),\n                    (reactEventName = \"onPointerEnter\"),\n                    (instance = \"pointer\");\n                accumulateTargetOnly =\n                  null == SyntheticEventCtor\n                    ? reactName\n                    : getNodeFromInstance(SyntheticEventCtor);\n                lastHostComponent =\n                  null == reactEventType\n                    ? reactName\n                    : getNodeFromInstance(reactEventType);\n                reactName = new inCapturePhase(\n                  _instance2,\n                  instance + \"leave\",\n                  SyntheticEventCtor,\n                  nativeEvent,\n                  nativeEventTarget\n                );\n                reactName.target = accumulateTargetOnly;\n                reactName.relatedTarget = lastHostComponent;\n                _instance2 = null;\n                getClosestInstanceFromNode(nativeEventTarget) === targetInst &&\n                  ((inCapturePhase = new inCapturePhase(\n                    reactEventName,\n                    instance + \"enter\",\n                    reactEventType,\n                    nativeEvent,\n                    nativeEventTarget\n                  )),\n                  (inCapturePhase.target = lastHostComponent),\n                  (inCapturePhase.relatedTarget = accumulateTargetOnly),\n                  (_instance2 = inCapturePhase));\n                accumulateTargetOnly = _instance2;\n                if (SyntheticEventCtor && reactEventType)\n                  b: {\n                    inCapturePhase = getParent;\n                    reactEventName = SyntheticEventCtor;\n                    instance = reactEventType;\n                    lastHostComponent = 0;\n                    for (\n                      _instance2 = reactEventName;\n                      _instance2;\n                      _instance2 = inCapturePhase(_instance2)\n                    )\n                      lastHostComponent++;\n                    _instance2 = 0;\n                    for (\n                      var tempB = instance;\n                      tempB;\n                      tempB = inCapturePhase(tempB)\n                    )\n                      _instance2++;\n                    for (; 0 < lastHostComponent - _instance2; )\n                      (reactEventName = inCapturePhase(reactEventName)),\n                        lastHostComponent--;\n                    for (; 0 < _instance2 - lastHostComponent; )\n                      (instance = inCapturePhase(instance)), _instance2--;\n                    for (; lastHostComponent--; ) {\n                      if (\n                        reactEventName === instance ||\n                        (null !== instance &&\n                          reactEventName === instance.alternate)\n                      ) {\n                        inCapturePhase = reactEventName;\n                        break b;\n                      }\n                      reactEventName = inCapturePhase(reactEventName);\n                      instance = inCapturePhase(instance);\n                    }\n                    inCapturePhase = null;\n                  }\n                else inCapturePhase = null;\n                null !== SyntheticEventCtor &&\n                  accumulateEnterLeaveListenersForEvent(\n                    dispatchQueue,\n                    reactName,\n                    SyntheticEventCtor,\n                    inCapturePhase,\n                    !1\n                  );\n                null !== reactEventType &&\n                  null !== accumulateTargetOnly &&\n                  accumulateEnterLeaveListenersForEvent(\n                    dispatchQueue,\n                    accumulateTargetOnly,\n                    reactEventType,\n                    inCapturePhase,\n                    !0\n                  );\n              }\n            }\n          }\n          a: {\n            reactName = targetInst ? getNodeFromInstance(targetInst) : window;\n            SyntheticEventCtor =\n              reactName.nodeName && reactName.nodeName.toLowerCase();\n            if (\n              \"select\" === SyntheticEventCtor ||\n              (\"input\" === SyntheticEventCtor && \"file\" === reactName.type)\n            )\n              var getTargetInstFunc = getTargetInstForChangeEvent;\n            else if (isTextInputElement(reactName))\n              if (isInputEventSupported)\n                getTargetInstFunc = getTargetInstForInputOrChangeEvent;\n              else {\n                getTargetInstFunc = getTargetInstForInputEventPolyfill;\n                var handleEventFunc = handleEventsForInputEventPolyfill;\n              }\n            else\n              (SyntheticEventCtor = reactName.nodeName),\n                !SyntheticEventCtor ||\n                \"input\" !== SyntheticEventCtor.toLowerCase() ||\n                (\"checkbox\" !== reactName.type && \"radio\" !== reactName.type)\n                  ? targetInst &&\n                    isCustomElement(targetInst.elementType) &&\n                    (getTargetInstFunc = getTargetInstForChangeEvent)\n                  : (getTargetInstFunc = getTargetInstForClickEvent);\n            if (\n              getTargetInstFunc &&\n              (getTargetInstFunc = getTargetInstFunc(domEventName, targetInst))\n            ) {\n              createAndAccumulateChangeEvent(\n                dispatchQueue,\n                getTargetInstFunc,\n                nativeEvent,\n                nativeEventTarget\n              );\n              break a;\n            }\n            handleEventFunc &&\n              handleEventFunc(domEventName, reactName, targetInst);\n            \"focusout\" === domEventName &&\n              targetInst &&\n              \"number\" === reactName.type &&\n              null != targetInst.memoizedProps.value &&\n              setDefaultValue(reactName, \"number\", reactName.value);\n          }\n          handleEventFunc = targetInst\n            ? getNodeFromInstance(targetInst)\n            : window;\n          switch (domEventName) {\n            case \"focusin\":\n              if (\n                isTextInputElement(handleEventFunc) ||\n                \"true\" === handleEventFunc.contentEditable\n              )\n                (activeElement = handleEventFunc),\n                  (activeElementInst = targetInst),\n                  (lastSelection = null);\n              break;\n            case \"focusout\":\n              lastSelection = activeElementInst = activeElement = null;\n              break;\n            case \"mousedown\":\n              mouseDown = !0;\n              break;\n            case \"contextmenu\":\n            case \"mouseup\":\n            case \"dragend\":\n              mouseDown = !1;\n              constructSelectEvent(\n                dispatchQueue,\n                nativeEvent,\n                nativeEventTarget\n              );\n              break;\n            case \"selectionchange\":\n              if (skipSelectionChangeEvent) break;\n            case \"keydown\":\n            case \"keyup\":\n              constructSelectEvent(\n                dispatchQueue,\n                nativeEvent,\n                nativeEventTarget\n              );\n          }\n          var fallbackData;\n          if (canUseCompositionEvent)\n            b: {\n              switch (domEventName) {\n                case \"compositionstart\":\n                  var eventType = \"onCompositionStart\";\n                  break b;\n                case \"compositionend\":\n                  eventType = \"onCompositionEnd\";\n                  break b;\n                case \"compositionupdate\":\n                  eventType = \"onCompositionUpdate\";\n                  break b;\n              }\n              eventType = void 0;\n            }\n          else\n            isComposing\n              ? isFallbackCompositionEnd(domEventName, nativeEvent) &&\n                (eventType = \"onCompositionEnd\")\n              : \"keydown\" === domEventName &&\n                nativeEvent.keyCode === START_KEYCODE &&\n                (eventType = \"onCompositionStart\");\n          eventType &&\n            (useFallbackCompositionData &&\n              \"ko\" !== nativeEvent.locale &&\n              (isComposing || \"onCompositionStart\" !== eventType\n                ? \"onCompositionEnd\" === eventType &&\n                  isComposing &&\n                  (fallbackData = getData())\n                : ((root = nativeEventTarget),\n                  (startText = \"value\" in root ? root.value : root.textContent),\n                  (isComposing = !0))),\n            (handleEventFunc = accumulateTwoPhaseListeners(\n              targetInst,\n              eventType\n            )),\n            0 < handleEventFunc.length &&\n              ((eventType = new SyntheticCompositionEvent(\n                eventType,\n                domEventName,\n                null,\n                nativeEvent,\n                nativeEventTarget\n              )),\n              dispatchQueue.push({\n                event: eventType,\n                listeners: handleEventFunc\n              }),\n              fallbackData\n                ? (eventType.data = fallbackData)\n                : ((fallbackData = getDataFromCustomEvent(nativeEvent)),\n                  null !== fallbackData && (eventType.data = fallbackData))));\n          if (\n            (fallbackData = canUseTextInputEvent\n              ? getNativeBeforeInputChars(domEventName, nativeEvent)\n              : getFallbackBeforeInputChars(domEventName, nativeEvent))\n          )\n            (eventType = accumulateTwoPhaseListeners(\n              targetInst,\n              \"onBeforeInput\"\n            )),\n              0 < eventType.length &&\n                ((handleEventFunc = new SyntheticInputEvent(\n                  \"onBeforeInput\",\n                  \"beforeinput\",\n                  null,\n                  nativeEvent,\n                  nativeEventTarget\n                )),\n                dispatchQueue.push({\n                  event: handleEventFunc,\n                  listeners: eventType\n                }),\n                (handleEventFunc.data = fallbackData));\n          extractEvents$1(\n            dispatchQueue,\n            domEventName,\n            targetInst,\n            nativeEvent,\n            nativeEventTarget\n          );\n        }\n        processDispatchQueue(dispatchQueue, eventSystemFlags);\n      });\n    }\n    function createDispatchListener(instance, listener, currentTarget) {\n      return {\n        instance: instance,\n        listener: listener,\n        currentTarget: currentTarget\n      };\n    }\n    function accumulateTwoPhaseListeners(targetFiber, reactName) {\n      for (\n        var captureName = reactName + \"Capture\", listeners = [];\n        null !== targetFiber;\n\n      ) {\n        var _instance3 = targetFiber,\n          stateNode = _instance3.stateNode;\n        _instance3 = _instance3.tag;\n        (5 !== _instance3 && 26 !== _instance3 && 27 !== _instance3) ||\n          null === stateNode ||\n          ((_instance3 = getListener(targetFiber, captureName)),\n          null != _instance3 &&\n            listeners.unshift(\n              createDispatchListener(targetFiber, _instance3, stateNode)\n            ),\n          (_instance3 = getListener(targetFiber, reactName)),\n          null != _instance3 &&\n            listeners.push(\n              createDispatchListener(targetFiber, _instance3, stateNode)\n            ));\n        if (3 === targetFiber.tag) return listeners;\n        targetFiber = targetFiber.return;\n      }\n      return [];\n    }\n    function getParent(inst) {\n      if (null === inst) return null;\n      do inst = inst.return;\n      while (inst && 5 !== inst.tag && 27 !== inst.tag);\n      return inst ? inst : null;\n    }\n    function accumulateEnterLeaveListenersForEvent(\n      dispatchQueue,\n      event,\n      target,\n      common,\n      inCapturePhase\n    ) {\n      for (\n        var registrationName = event._reactName, listeners = [];\n        null !== target && target !== common;\n\n      ) {\n        var _instance4 = target,\n          alternate = _instance4.alternate,\n          stateNode = _instance4.stateNode;\n        _instance4 = _instance4.tag;\n        if (null !== alternate && alternate === common) break;\n        (5 !== _instance4 && 26 !== _instance4 && 27 !== _instance4) ||\n          null === stateNode ||\n          ((alternate = stateNode),\n          inCapturePhase\n            ? ((stateNode = getListener(target, registrationName)),\n              null != stateNode &&\n                listeners.unshift(\n                  createDispatchListener(target, stateNode, alternate)\n                ))\n            : inCapturePhase ||\n              ((stateNode = getListener(target, registrationName)),\n              null != stateNode &&\n                listeners.push(\n                  createDispatchListener(target, stateNode, alternate)\n                )));\n        target = target.return;\n      }\n      0 !== listeners.length &&\n        dispatchQueue.push({ event: event, listeners: listeners });\n    }\n    function validatePropertiesInDevelopment(type, props) {\n      validateProperties$2(type, props);\n      (\"input\" !== type && \"textarea\" !== type && \"select\" !== type) ||\n        null == props ||\n        null !== props.value ||\n        didWarnValueNull ||\n        ((didWarnValueNull = !0),\n        \"select\" === type && props.multiple\n          ? console.error(\n              \"`value` prop on `%s` should not be null. Consider using an empty array when `multiple` is set to `true` to clear the component or `undefined` for uncontrolled components.\",\n              type\n            )\n          : console.error(\n              \"`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.\",\n              type\n            ));\n      var eventRegistry = {\n        registrationNameDependencies: registrationNameDependencies,\n        possibleRegistrationNames: possibleRegistrationNames\n      };\n      isCustomElement(type) ||\n        \"string\" === typeof props.is ||\n        warnUnknownProperties(type, props, eventRegistry);\n      props.contentEditable &&\n        !props.suppressContentEditableWarning &&\n        null != props.children &&\n        console.error(\n          \"A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional.\"\n        );\n    }\n    function warnForPropDifference(\n      propName,\n      serverValue,\n      clientValue,\n      serverDifferences\n    ) {\n      serverValue !== clientValue &&\n        ((clientValue = normalizeMarkupForTextOrAttribute(clientValue)),\n        normalizeMarkupForTextOrAttribute(serverValue) !== clientValue &&\n          (serverDifferences[propName] = serverValue));\n    }\n    function warnForExtraAttributes(\n      domElement,\n      attributeNames,\n      serverDifferences\n    ) {\n      attributeNames.forEach(function (attributeName) {\n        serverDifferences[getPropNameFromAttributeName(attributeName)] =\n          \"style\" === attributeName\n            ? getStylesObjectFromElement(domElement)\n            : domElement.getAttribute(attributeName);\n      });\n    }\n    function warnForInvalidEventListener(registrationName, listener) {\n      !1 === listener\n        ? console.error(\n            \"Expected `%s` listener to be a function, instead got `false`.\\n\\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.\",\n            registrationName,\n            registrationName,\n            registrationName\n          )\n        : console.error(\n            \"Expected `%s` listener to be a function, instead got a value of `%s` type.\",\n            registrationName,\n            typeof listener\n          );\n    }\n    function normalizeHTML(parent, html) {\n      parent =\n        parent.namespaceURI === MATH_NAMESPACE ||\n        parent.namespaceURI === SVG_NAMESPACE\n          ? parent.ownerDocument.createElementNS(\n              parent.namespaceURI,\n              parent.tagName\n            )\n          : parent.ownerDocument.createElement(parent.tagName);\n      parent.innerHTML = html;\n      return parent.innerHTML;\n    }\n    function normalizeMarkupForTextOrAttribute(markup) {\n      willCoercionThrow(markup) &&\n        (console.error(\n          \"The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before using it here.\",\n          typeName(markup)\n        ),\n        testStringCoercion(markup));\n      return (\"string\" === typeof markup ? markup : \"\" + markup)\n        .replace(NORMALIZE_NEWLINES_REGEX, \"\\n\")\n        .replace(NORMALIZE_NULL_AND_REPLACEMENT_REGEX, \"\");\n    }\n    function checkForUnmatchedText(serverText, clientText) {\n      clientText = normalizeMarkupForTextOrAttribute(clientText);\n      return normalizeMarkupForTextOrAttribute(serverText) === clientText\n        ? !0\n        : !1;\n    }\n    function setProp(domElement, tag, key, value, props, prevValue) {\n      switch (key) {\n        case \"children\":\n          if (\"string\" === typeof value)\n            validateTextNesting(value, tag, !1),\n              \"body\" === tag ||\n                (\"textarea\" === tag && \"\" === value) ||\n                setTextContent(domElement, value);\n          else if (\"number\" === typeof value || \"bigint\" === typeof value)\n            validateTextNesting(\"\" + value, tag, !1),\n              \"body\" !== tag && setTextContent(domElement, \"\" + value);\n          break;\n        case \"className\":\n          setValueForKnownAttribute(domElement, \"class\", value);\n          break;\n        case \"tabIndex\":\n          setValueForKnownAttribute(domElement, \"tabindex\", value);\n          break;\n        case \"dir\":\n        case \"role\":\n        case \"viewBox\":\n        case \"width\":\n        case \"height\":\n          setValueForKnownAttribute(domElement, key, value);\n          break;\n        case \"style\":\n          setValueForStyles(domElement, value, prevValue);\n          break;\n        case \"data\":\n          if (\"object\" !== tag) {\n            setValueForKnownAttribute(domElement, \"data\", value);\n            break;\n          }\n        case \"src\":\n        case \"href\":\n          if (\"\" === value && (\"a\" !== tag || \"href\" !== key)) {\n            \"src\" === key\n              ? console.error(\n                  'An empty string (\"\") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',\n                  key,\n                  key\n                )\n              : console.error(\n                  'An empty string (\"\") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',\n                  key,\n                  key\n                );\n            domElement.removeAttribute(key);\n            break;\n          }\n          if (\n            null == value ||\n            \"function\" === typeof value ||\n            \"symbol\" === typeof value ||\n            \"boolean\" === typeof value\n          ) {\n            domElement.removeAttribute(key);\n            break;\n          }\n          checkAttributeStringCoercion(value, key);\n          value = sanitizeURL(\"\" + value);\n          domElement.setAttribute(key, value);\n          break;\n        case \"action\":\n        case \"formAction\":\n          null != value &&\n            (\"form\" === tag\n              ? \"formAction\" === key\n                ? console.error(\n                    \"You can only pass the formAction prop to <input> or <button>. Use the action prop on <form>.\"\n                  )\n                : \"function\" === typeof value &&\n                  ((null == props.encType && null == props.method) ||\n                    didWarnFormActionMethod ||\n                    ((didWarnFormActionMethod = !0),\n                    console.error(\n                      \"Cannot specify a encType or method for a form that specifies a function as the action. React provides those automatically. They will get overridden.\"\n                    )),\n                  null == props.target ||\n                    didWarnFormActionTarget ||\n                    ((didWarnFormActionTarget = !0),\n                    console.error(\n                      \"Cannot specify a target for a form that specifies a function as the action. The function will always be executed in the same window.\"\n                    )))\n              : \"input\" === tag || \"button\" === tag\n                ? \"action\" === key\n                  ? console.error(\n                      \"You can only pass the action prop to <form>. Use the formAction prop on <input> or <button>.\"\n                    )\n                  : \"input\" !== tag ||\n                      \"submit\" === props.type ||\n                      \"image\" === props.type ||\n                      didWarnFormActionType\n                    ? \"button\" !== tag ||\n                      null == props.type ||\n                      \"submit\" === props.type ||\n                      didWarnFormActionType\n                      ? \"function\" === typeof value &&\n                        (null == props.name ||\n                          didWarnFormActionName ||\n                          ((didWarnFormActionName = !0),\n                          console.error(\n                            'Cannot specify a \"name\" prop for a button that specifies a function as a formAction. React needs it to encode which action should be invoked. It will get overridden.'\n                          )),\n                        (null == props.formEncType &&\n                          null == props.formMethod) ||\n                          didWarnFormActionMethod ||\n                          ((didWarnFormActionMethod = !0),\n                          console.error(\n                            \"Cannot specify a formEncType or formMethod for a button that specifies a function as a formAction. React provides those automatically. They will get overridden.\"\n                          )),\n                        null == props.formTarget ||\n                          didWarnFormActionTarget ||\n                          ((didWarnFormActionTarget = !0),\n                          console.error(\n                            \"Cannot specify a formTarget for a button that specifies a function as a formAction. The function will always be executed in the same window.\"\n                          )))\n                      : ((didWarnFormActionType = !0),\n                        console.error(\n                          'A button can only specify a formAction along with type=\"submit\" or no type.'\n                        ))\n                    : ((didWarnFormActionType = !0),\n                      console.error(\n                        'An input can only specify a formAction along with type=\"submit\" or type=\"image\".'\n                      ))\n                : \"action\" === key\n                  ? console.error(\n                      \"You can only pass the action prop to <form>.\"\n                    )\n                  : console.error(\n                      \"You can only pass the formAction prop to <input> or <button>.\"\n                    ));\n          if (\"function\" === typeof value) {\n            domElement.setAttribute(\n              key,\n              \"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')\"\n            );\n            break;\n          } else\n            \"function\" === typeof prevValue &&\n              (\"formAction\" === key\n                ? (\"input\" !== tag &&\n                    setProp(domElement, tag, \"name\", props.name, props, null),\n                  setProp(\n                    domElement,\n                    tag,\n                    \"formEncType\",\n                    props.formEncType,\n                    props,\n                    null\n                  ),\n                  setProp(\n                    domElement,\n                    tag,\n                    \"formMethod\",\n                    props.formMethod,\n                    props,\n                    null\n                  ),\n                  setProp(\n                    domElement,\n                    tag,\n                    \"formTarget\",\n                    props.formTarget,\n                    props,\n                    null\n                  ))\n                : (setProp(\n                    domElement,\n                    tag,\n                    \"encType\",\n                    props.encType,\n                    props,\n                    null\n                  ),\n                  setProp(domElement, tag, \"method\", props.method, props, null),\n                  setProp(\n                    domElement,\n                    tag,\n                    \"target\",\n                    props.target,\n                    props,\n                    null\n                  )));\n          if (\n            null == value ||\n            \"symbol\" === typeof value ||\n            \"boolean\" === typeof value\n          ) {\n            domElement.removeAttribute(key);\n            break;\n          }\n          checkAttributeStringCoercion(value, key);\n          value = sanitizeURL(\"\" + value);\n          domElement.setAttribute(key, value);\n          break;\n        case \"onClick\":\n          null != value &&\n            (\"function\" !== typeof value &&\n              warnForInvalidEventListener(key, value),\n            (domElement.onclick = noop$1));\n          break;\n        case \"onScroll\":\n          null != value &&\n            (\"function\" !== typeof value &&\n              warnForInvalidEventListener(key, value),\n            listenToNonDelegatedEvent(\"scroll\", domElement));\n          break;\n        case \"onScrollEnd\":\n          null != value &&\n            (\"function\" !== typeof value &&\n              warnForInvalidEventListener(key, value),\n            listenToNonDelegatedEvent(\"scrollend\", domElement));\n          break;\n        case \"dangerouslySetInnerHTML\":\n          if (null != value) {\n            if (\"object\" !== typeof value || !(\"__html\" in value))\n              throw Error(\n                \"`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.\"\n              );\n            key = value.__html;\n            if (null != key) {\n              if (null != props.children)\n                throw Error(\n                  \"Can only set one of `children` or `props.dangerouslySetInnerHTML`.\"\n                );\n              domElement.innerHTML = key;\n            }\n          }\n          break;\n        case \"multiple\":\n          domElement.multiple =\n            value && \"function\" !== typeof value && \"symbol\" !== typeof value;\n          break;\n        case \"muted\":\n          domElement.muted =\n            value && \"function\" !== typeof value && \"symbol\" !== typeof value;\n          break;\n        case \"suppressContentEditableWarning\":\n        case \"suppressHydrationWarning\":\n        case \"defaultValue\":\n        case \"defaultChecked\":\n        case \"innerHTML\":\n        case \"ref\":\n          break;\n        case \"autoFocus\":\n          break;\n        case \"xlinkHref\":\n          if (\n            null == value ||\n            \"function\" === typeof value ||\n            \"boolean\" === typeof value ||\n            \"symbol\" === typeof value\n          ) {\n            domElement.removeAttribute(\"xlink:href\");\n            break;\n          }\n          checkAttributeStringCoercion(value, key);\n          key = sanitizeURL(\"\" + value);\n          domElement.setAttributeNS(xlinkNamespace, \"xlink:href\", key);\n          break;\n        case \"contentEditable\":\n        case \"spellCheck\":\n        case \"draggable\":\n        case \"value\":\n        case \"autoReverse\":\n        case \"externalResourcesRequired\":\n        case \"focusable\":\n        case \"preserveAlpha\":\n          null != value &&\n          \"function\" !== typeof value &&\n          \"symbol\" !== typeof value\n            ? (checkAttributeStringCoercion(value, key),\n              domElement.setAttribute(key, \"\" + value))\n            : domElement.removeAttribute(key);\n          break;\n        case \"inert\":\n          \"\" !== value ||\n            didWarnForNewBooleanPropsWithEmptyValue[key] ||\n            ((didWarnForNewBooleanPropsWithEmptyValue[key] = !0),\n            console.error(\n              \"Received an empty string for a boolean attribute `%s`. This will treat the attribute as if it were false. Either pass `false` to silence this warning, or pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.\",\n              key\n            ));\n        case \"allowFullScreen\":\n        case \"async\":\n        case \"autoPlay\":\n        case \"controls\":\n        case \"default\":\n        case \"defer\":\n        case \"disabled\":\n        case \"disablePictureInPicture\":\n        case \"disableRemotePlayback\":\n        case \"formNoValidate\":\n        case \"hidden\":\n        case \"loop\":\n        case \"noModule\":\n        case \"noValidate\":\n        case \"open\":\n        case \"playsInline\":\n        case \"readOnly\":\n        case \"required\":\n        case \"reversed\":\n        case \"scoped\":\n        case \"seamless\":\n        case \"itemScope\":\n          value && \"function\" !== typeof value && \"symbol\" !== typeof value\n            ? domElement.setAttribute(key, \"\")\n            : domElement.removeAttribute(key);\n          break;\n        case \"capture\":\n        case \"download\":\n          !0 === value\n            ? domElement.setAttribute(key, \"\")\n            : !1 !== value &&\n                null != value &&\n                \"function\" !== typeof value &&\n                \"symbol\" !== typeof value\n              ? (checkAttributeStringCoercion(value, key),\n                domElement.setAttribute(key, value))\n              : domElement.removeAttribute(key);\n          break;\n        case \"cols\":\n        case \"rows\":\n        case \"size\":\n        case \"span\":\n          null != value &&\n          \"function\" !== typeof value &&\n          \"symbol\" !== typeof value &&\n          !isNaN(value) &&\n          1 <= value\n            ? (checkAttributeStringCoercion(value, key),\n              domElement.setAttribute(key, value))\n            : domElement.removeAttribute(key);\n          break;\n        case \"rowSpan\":\n        case \"start\":\n          null == value ||\n          \"function\" === typeof value ||\n          \"symbol\" === typeof value ||\n          isNaN(value)\n            ? domElement.removeAttribute(key)\n            : (checkAttributeStringCoercion(value, key),\n              domElement.setAttribute(key, value));\n          break;\n        case \"popover\":\n          listenToNonDelegatedEvent(\"beforetoggle\", domElement);\n          listenToNonDelegatedEvent(\"toggle\", domElement);\n          setValueForAttribute(domElement, \"popover\", value);\n          break;\n        case \"xlinkActuate\":\n          setValueForNamespacedAttribute(\n            domElement,\n            xlinkNamespace,\n            \"xlink:actuate\",\n            value\n          );\n          break;\n        case \"xlinkArcrole\":\n          setValueForNamespacedAttribute(\n            domElement,\n            xlinkNamespace,\n            \"xlink:arcrole\",\n            value\n          );\n          break;\n        case \"xlinkRole\":\n          setValueForNamespacedAttribute(\n            domElement,\n            xlinkNamespace,\n            \"xlink:role\",\n            value\n          );\n          break;\n        case \"xlinkShow\":\n          setValueForNamespacedAttribute(\n            domElement,\n            xlinkNamespace,\n            \"xlink:show\",\n            value\n          );\n          break;\n        case \"xlinkTitle\":\n          setValueForNamespacedAttribute(\n            domElement,\n            xlinkNamespace,\n            \"xlink:title\",\n            value\n          );\n          break;\n        case \"xlinkType\":\n          setValueForNamespacedAttribute(\n            domElement,\n            xlinkNamespace,\n            \"xlink:type\",\n            value\n          );\n          break;\n        case \"xmlBase\":\n          setValueForNamespacedAttribute(\n            domElement,\n            xmlNamespace,\n            \"xml:base\",\n            value\n          );\n          break;\n        case \"xmlLang\":\n          setValueForNamespacedAttribute(\n            domElement,\n            xmlNamespace,\n            \"xml:lang\",\n            value\n          );\n          break;\n        case \"xmlSpace\":\n          setValueForNamespacedAttribute(\n            domElement,\n            xmlNamespace,\n            \"xml:space\",\n            value\n          );\n          break;\n        case \"is\":\n          null != prevValue &&\n            console.error(\n              'Cannot update the \"is\" prop after it has been initialized.'\n            );\n          setValueForAttribute(domElement, \"is\", value);\n          break;\n        case \"innerText\":\n        case \"textContent\":\n          break;\n        case \"popoverTarget\":\n          didWarnPopoverTargetObject ||\n            null == value ||\n            \"object\" !== typeof value ||\n            ((didWarnPopoverTargetObject = !0),\n            console.error(\n              \"The `popoverTarget` prop expects the ID of an Element as a string. Received %s instead.\",\n              value\n            ));\n        default:\n          !(2 < key.length) ||\n          (\"o\" !== key[0] && \"O\" !== key[0]) ||\n          (\"n\" !== key[1] && \"N\" !== key[1])\n            ? ((key = getAttributeAlias(key)),\n              setValueForAttribute(domElement, key, value))\n            : registrationNameDependencies.hasOwnProperty(key) &&\n              null != value &&\n              \"function\" !== typeof value &&\n              warnForInvalidEventListener(key, value);\n      }\n    }\n    function setPropOnCustomElement(\n      domElement,\n      tag,\n      key,\n      value,\n      props,\n      prevValue\n    ) {\n      switch (key) {\n        case \"style\":\n          setValueForStyles(domElement, value, prevValue);\n          break;\n        case \"dangerouslySetInnerHTML\":\n          if (null != value) {\n            if (\"object\" !== typeof value || !(\"__html\" in value))\n              throw Error(\n                \"`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.\"\n              );\n            key = value.__html;\n            if (null != key) {\n              if (null != props.children)\n                throw Error(\n                  \"Can only set one of `children` or `props.dangerouslySetInnerHTML`.\"\n                );\n              domElement.innerHTML = key;\n            }\n          }\n          break;\n        case \"children\":\n          \"string\" === typeof value\n            ? setTextContent(domElement, value)\n            : (\"number\" === typeof value || \"bigint\" === typeof value) &&\n              setTextContent(domElement, \"\" + value);\n          break;\n        case \"onScroll\":\n          null != value &&\n            (\"function\" !== typeof value &&\n              warnForInvalidEventListener(key, value),\n            listenToNonDelegatedEvent(\"scroll\", domElement));\n          break;\n        case \"onScrollEnd\":\n          null != value &&\n            (\"function\" !== typeof value &&\n              warnForInvalidEventListener(key, value),\n            listenToNonDelegatedEvent(\"scrollend\", domElement));\n          break;\n        case \"onClick\":\n          null != value &&\n            (\"function\" !== typeof value &&\n              warnForInvalidEventListener(key, value),\n            (domElement.onclick = noop$1));\n          break;\n        case \"suppressContentEditableWarning\":\n        case \"suppressHydrationWarning\":\n        case \"innerHTML\":\n        case \"ref\":\n          break;\n        case \"innerText\":\n        case \"textContent\":\n          break;\n        default:\n          if (registrationNameDependencies.hasOwnProperty(key))\n            null != value &&\n              \"function\" !== typeof value &&\n              warnForInvalidEventListener(key, value);\n          else\n            a: {\n              if (\n                \"o\" === key[0] &&\n                \"n\" === key[1] &&\n                ((props = key.endsWith(\"Capture\")),\n                (tag = key.slice(2, props ? key.length - 7 : void 0)),\n                (prevValue = domElement[internalPropsKey] || null),\n                (prevValue = null != prevValue ? prevValue[key] : null),\n                \"function\" === typeof prevValue &&\n                  domElement.removeEventListener(tag, prevValue, props),\n                \"function\" === typeof value)\n              ) {\n                \"function\" !== typeof prevValue &&\n                  null !== prevValue &&\n                  (key in domElement\n                    ? (domElement[key] = null)\n                    : domElement.hasAttribute(key) &&\n                      domElement.removeAttribute(key));\n                domElement.addEventListener(tag, value, props);\n                break a;\n              }\n              key in domElement\n                ? (domElement[key] = value)\n                : !0 === value\n                  ? domElement.setAttribute(key, \"\")\n                  : setValueForAttribute(domElement, key, value);\n            }\n      }\n    }\n    function setInitialProperties(domElement, tag, props) {\n      validatePropertiesInDevelopment(tag, props);\n      switch (tag) {\n        case \"div\":\n        case \"span\":\n        case \"svg\":\n        case \"path\":\n        case \"a\":\n        case \"g\":\n        case \"p\":\n        case \"li\":\n          break;\n        case \"img\":\n          listenToNonDelegatedEvent(\"error\", domElement);\n          listenToNonDelegatedEvent(\"load\", domElement);\n          var hasSrc = !1,\n            hasSrcSet = !1,\n            propKey;\n          for (propKey in props)\n            if (props.hasOwnProperty(propKey)) {\n              var propValue = props[propKey];\n              if (null != propValue)\n                switch (propKey) {\n                  case \"src\":\n                    hasSrc = !0;\n                    break;\n                  case \"srcSet\":\n                    hasSrcSet = !0;\n                    break;\n                  case \"children\":\n                  case \"dangerouslySetInnerHTML\":\n                    throw Error(\n                      tag +\n                        \" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.\"\n                    );\n                  default:\n                    setProp(domElement, tag, propKey, propValue, props, null);\n                }\n            }\n          hasSrcSet &&\n            setProp(domElement, tag, \"srcSet\", props.srcSet, props, null);\n          hasSrc && setProp(domElement, tag, \"src\", props.src, props, null);\n          return;\n        case \"input\":\n          checkControlledValueProps(\"input\", props);\n          listenToNonDelegatedEvent(\"invalid\", domElement);\n          var defaultValue = (propKey = propValue = hasSrcSet = null),\n            checked = null,\n            defaultChecked = null;\n          for (hasSrc in props)\n            if (props.hasOwnProperty(hasSrc)) {\n              var _propValue = props[hasSrc];\n              if (null != _propValue)\n                switch (hasSrc) {\n                  case \"name\":\n                    hasSrcSet = _propValue;\n                    break;\n                  case \"type\":\n                    propValue = _propValue;\n                    break;\n                  case \"checked\":\n                    checked = _propValue;\n                    break;\n                  case \"defaultChecked\":\n                    defaultChecked = _propValue;\n                    break;\n                  case \"value\":\n                    propKey = _propValue;\n                    break;\n                  case \"defaultValue\":\n                    defaultValue = _propValue;\n                    break;\n                  case \"children\":\n                  case \"dangerouslySetInnerHTML\":\n                    if (null != _propValue)\n                      throw Error(\n                        tag +\n                          \" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.\"\n                      );\n                    break;\n                  default:\n                    setProp(domElement, tag, hasSrc, _propValue, props, null);\n                }\n            }\n          validateInputProps(domElement, props);\n          initInput(\n            domElement,\n            propKey,\n            defaultValue,\n            checked,\n            defaultChecked,\n            propValue,\n            hasSrcSet,\n            !1\n          );\n          return;\n        case \"select\":\n          checkControlledValueProps(\"select\", props);\n          listenToNonDelegatedEvent(\"invalid\", domElement);\n          hasSrc = propValue = propKey = null;\n          for (hasSrcSet in props)\n            if (\n              props.hasOwnProperty(hasSrcSet) &&\n              ((defaultValue = props[hasSrcSet]), null != defaultValue)\n            )\n              switch (hasSrcSet) {\n                case \"value\":\n                  propKey = defaultValue;\n                  break;\n                case \"defaultValue\":\n                  propValue = defaultValue;\n                  break;\n                case \"multiple\":\n                  hasSrc = defaultValue;\n                default:\n                  setProp(\n                    domElement,\n                    tag,\n                    hasSrcSet,\n                    defaultValue,\n                    props,\n                    null\n                  );\n              }\n          validateSelectProps(domElement, props);\n          tag = propKey;\n          props = propValue;\n          domElement.multiple = !!hasSrc;\n          null != tag\n            ? updateOptions(domElement, !!hasSrc, tag, !1)\n            : null != props && updateOptions(domElement, !!hasSrc, props, !0);\n          return;\n        case \"textarea\":\n          checkControlledValueProps(\"textarea\", props);\n          listenToNonDelegatedEvent(\"invalid\", domElement);\n          propKey = hasSrcSet = hasSrc = null;\n          for (propValue in props)\n            if (\n              props.hasOwnProperty(propValue) &&\n              ((defaultValue = props[propValue]), null != defaultValue)\n            )\n              switch (propValue) {\n                case \"value\":\n                  hasSrc = defaultValue;\n                  break;\n                case \"defaultValue\":\n                  hasSrcSet = defaultValue;\n                  break;\n                case \"children\":\n                  propKey = defaultValue;\n                  break;\n                case \"dangerouslySetInnerHTML\":\n                  if (null != defaultValue)\n                    throw Error(\n                      \"`dangerouslySetInnerHTML` does not make sense on <textarea>.\"\n                    );\n                  break;\n                default:\n                  setProp(\n                    domElement,\n                    tag,\n                    propValue,\n                    defaultValue,\n                    props,\n                    null\n                  );\n              }\n          validateTextareaProps(domElement, props);\n          initTextarea(domElement, hasSrc, hasSrcSet, propKey);\n          return;\n        case \"option\":\n          validateOptionProps(domElement, props);\n          for (checked in props)\n            if (\n              props.hasOwnProperty(checked) &&\n              ((hasSrc = props[checked]), null != hasSrc)\n            )\n              switch (checked) {\n                case \"selected\":\n                  domElement.selected =\n                    hasSrc &&\n                    \"function\" !== typeof hasSrc &&\n                    \"symbol\" !== typeof hasSrc;\n                  break;\n                default:\n                  setProp(domElement, tag, checked, hasSrc, props, null);\n              }\n          return;\n        case \"dialog\":\n          listenToNonDelegatedEvent(\"beforetoggle\", domElement);\n          listenToNonDelegatedEvent(\"toggle\", domElement);\n          listenToNonDelegatedEvent(\"cancel\", domElement);\n          listenToNonDelegatedEvent(\"close\", domElement);\n          break;\n        case \"iframe\":\n        case \"object\":\n          listenToNonDelegatedEvent(\"load\", domElement);\n          break;\n        case \"video\":\n        case \"audio\":\n          for (hasSrc = 0; hasSrc < mediaEventTypes.length; hasSrc++)\n            listenToNonDelegatedEvent(mediaEventTypes[hasSrc], domElement);\n          break;\n        case \"image\":\n          listenToNonDelegatedEvent(\"error\", domElement);\n          listenToNonDelegatedEvent(\"load\", domElement);\n          break;\n        case \"details\":\n          listenToNonDelegatedEvent(\"toggle\", domElement);\n          break;\n        case \"embed\":\n        case \"source\":\n        case \"link\":\n          listenToNonDelegatedEvent(\"error\", domElement),\n            listenToNonDelegatedEvent(\"load\", domElement);\n        case \"area\":\n        case \"base\":\n        case \"br\":\n        case \"col\":\n        case \"hr\":\n        case \"keygen\":\n        case \"meta\":\n        case \"param\":\n        case \"track\":\n        case \"wbr\":\n        case \"menuitem\":\n          for (defaultChecked in props)\n            if (\n              props.hasOwnProperty(defaultChecked) &&\n              ((hasSrc = props[defaultChecked]), null != hasSrc)\n            )\n              switch (defaultChecked) {\n                case \"children\":\n                case \"dangerouslySetInnerHTML\":\n                  throw Error(\n                    tag +\n                      \" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.\"\n                  );\n                default:\n                  setProp(domElement, tag, defaultChecked, hasSrc, props, null);\n              }\n          return;\n        default:\n          if (isCustomElement(tag)) {\n            for (_propValue in props)\n              props.hasOwnProperty(_propValue) &&\n                ((hasSrc = props[_propValue]),\n                void 0 !== hasSrc &&\n                  setPropOnCustomElement(\n                    domElement,\n                    tag,\n                    _propValue,\n                    hasSrc,\n                    props,\n                    void 0\n                  ));\n            return;\n          }\n      }\n      for (defaultValue in props)\n        props.hasOwnProperty(defaultValue) &&\n          ((hasSrc = props[defaultValue]),\n          null != hasSrc &&\n            setProp(domElement, tag, defaultValue, hasSrc, props, null));\n    }\n    function updateProperties(domElement, tag, lastProps, nextProps) {\n      validatePropertiesInDevelopment(tag, nextProps);\n      switch (tag) {\n        case \"div\":\n        case \"span\":\n        case \"svg\":\n        case \"path\":\n        case \"a\":\n        case \"g\":\n        case \"p\":\n        case \"li\":\n          break;\n        case \"input\":\n          var name = null,\n            type = null,\n            value = null,\n            defaultValue = null,\n            lastDefaultValue = null,\n            checked = null,\n            defaultChecked = null;\n          for (propKey in lastProps) {\n            var lastProp = lastProps[propKey];\n            if (lastProps.hasOwnProperty(propKey) && null != lastProp)\n              switch (propKey) {\n                case \"checked\":\n                  break;\n                case \"value\":\n                  break;\n                case \"defaultValue\":\n                  lastDefaultValue = lastProp;\n                default:\n                  nextProps.hasOwnProperty(propKey) ||\n                    setProp(\n                      domElement,\n                      tag,\n                      propKey,\n                      null,\n                      nextProps,\n                      lastProp\n                    );\n              }\n          }\n          for (var _propKey8 in nextProps) {\n            var propKey = nextProps[_propKey8];\n            lastProp = lastProps[_propKey8];\n            if (\n              nextProps.hasOwnProperty(_propKey8) &&\n              (null != propKey || null != lastProp)\n            )\n              switch (_propKey8) {\n                case \"type\":\n                  type = propKey;\n                  break;\n                case \"name\":\n                  name = propKey;\n                  break;\n                case \"checked\":\n                  checked = propKey;\n                  break;\n                case \"defaultChecked\":\n                  defaultChecked = propKey;\n                  break;\n                case \"value\":\n                  value = propKey;\n                  break;\n                case \"defaultValue\":\n                  defaultValue = propKey;\n                  break;\n                case \"children\":\n                case \"dangerouslySetInnerHTML\":\n                  if (null != propKey)\n                    throw Error(\n                      tag +\n                        \" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.\"\n                    );\n                  break;\n                default:\n                  propKey !== lastProp &&\n                    setProp(\n                      domElement,\n                      tag,\n                      _propKey8,\n                      propKey,\n                      nextProps,\n                      lastProp\n                    );\n              }\n          }\n          tag =\n            \"checkbox\" === lastProps.type || \"radio\" === lastProps.type\n              ? null != lastProps.checked\n              : null != lastProps.value;\n          nextProps =\n            \"checkbox\" === nextProps.type || \"radio\" === nextProps.type\n              ? null != nextProps.checked\n              : null != nextProps.value;\n          tag ||\n            !nextProps ||\n            didWarnUncontrolledToControlled ||\n            (console.error(\n              \"A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://react.dev/link/controlled-components\"\n            ),\n            (didWarnUncontrolledToControlled = !0));\n          !tag ||\n            nextProps ||\n            didWarnControlledToUncontrolled ||\n            (console.error(\n              \"A component is changing a controlled input to be uncontrolled. This is likely caused by the value changing from a defined to undefined, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://react.dev/link/controlled-components\"\n            ),\n            (didWarnControlledToUncontrolled = !0));\n          updateInput(\n            domElement,\n            value,\n            defaultValue,\n            lastDefaultValue,\n            checked,\n            defaultChecked,\n            type,\n            name\n          );\n          return;\n        case \"select\":\n          propKey = value = defaultValue = _propKey8 = null;\n          for (type in lastProps)\n            if (\n              ((lastDefaultValue = lastProps[type]),\n              lastProps.hasOwnProperty(type) && null != lastDefaultValue)\n            )\n              switch (type) {\n                case \"value\":\n                  break;\n                case \"multiple\":\n                  propKey = lastDefaultValue;\n                default:\n                  nextProps.hasOwnProperty(type) ||\n                    setProp(\n                      domElement,\n                      tag,\n                      type,\n                      null,\n                      nextProps,\n                      lastDefaultValue\n                    );\n              }\n          for (name in nextProps)\n            if (\n              ((type = nextProps[name]),\n              (lastDefaultValue = lastProps[name]),\n              nextProps.hasOwnProperty(name) &&\n                (null != type || null != lastDefaultValue))\n            )\n              switch (name) {\n                case \"value\":\n                  _propKey8 = type;\n                  break;\n                case \"defaultValue\":\n                  defaultValue = type;\n                  break;\n                case \"multiple\":\n                  value = type;\n                default:\n                  type !== lastDefaultValue &&\n                    setProp(\n                      domElement,\n                      tag,\n                      name,\n                      type,\n                      nextProps,\n                      lastDefaultValue\n                    );\n              }\n          nextProps = defaultValue;\n          tag = value;\n          lastProps = propKey;\n          null != _propKey8\n            ? updateOptions(domElement, !!tag, _propKey8, !1)\n            : !!lastProps !== !!tag &&\n              (null != nextProps\n                ? updateOptions(domElement, !!tag, nextProps, !0)\n                : updateOptions(domElement, !!tag, tag ? [] : \"\", !1));\n          return;\n        case \"textarea\":\n          propKey = _propKey8 = null;\n          for (defaultValue in lastProps)\n            if (\n              ((name = lastProps[defaultValue]),\n              lastProps.hasOwnProperty(defaultValue) &&\n                null != name &&\n                !nextProps.hasOwnProperty(defaultValue))\n            )\n              switch (defaultValue) {\n                case \"value\":\n                  break;\n                case \"children\":\n                  break;\n                default:\n                  setProp(domElement, tag, defaultValue, null, nextProps, name);\n              }\n          for (value in nextProps)\n            if (\n              ((name = nextProps[value]),\n              (type = lastProps[value]),\n              nextProps.hasOwnProperty(value) && (null != name || null != type))\n            )\n              switch (value) {\n                case \"value\":\n                  _propKey8 = name;\n                  break;\n                case \"defaultValue\":\n                  propKey = name;\n                  break;\n                case \"children\":\n                  break;\n                case \"dangerouslySetInnerHTML\":\n                  if (null != name)\n                    throw Error(\n                      \"`dangerouslySetInnerHTML` does not make sense on <textarea>.\"\n                    );\n                  break;\n                default:\n                  name !== type &&\n                    setProp(domElement, tag, value, name, nextProps, type);\n              }\n          updateTextarea(domElement, _propKey8, propKey);\n          return;\n        case \"option\":\n          for (var _propKey13 in lastProps)\n            if (\n              ((_propKey8 = lastProps[_propKey13]),\n              lastProps.hasOwnProperty(_propKey13) &&\n                null != _propKey8 &&\n                !nextProps.hasOwnProperty(_propKey13))\n            )\n              switch (_propKey13) {\n                case \"selected\":\n                  domElement.selected = !1;\n                  break;\n                default:\n                  setProp(\n                    domElement,\n                    tag,\n                    _propKey13,\n                    null,\n                    nextProps,\n                    _propKey8\n                  );\n              }\n          for (lastDefaultValue in nextProps)\n            if (\n              ((_propKey8 = nextProps[lastDefaultValue]),\n              (propKey = lastProps[lastDefaultValue]),\n              nextProps.hasOwnProperty(lastDefaultValue) &&\n                _propKey8 !== propKey &&\n                (null != _propKey8 || null != propKey))\n            )\n              switch (lastDefaultValue) {\n                case \"selected\":\n                  domElement.selected =\n                    _propKey8 &&\n                    \"function\" !== typeof _propKey8 &&\n                    \"symbol\" !== typeof _propKey8;\n                  break;\n                default:\n                  setProp(\n                    domElement,\n                    tag,\n                    lastDefaultValue,\n                    _propKey8,\n                    nextProps,\n                    propKey\n                  );\n              }\n          return;\n        case \"img\":\n        case \"link\":\n        case \"area\":\n        case \"base\":\n        case \"br\":\n        case \"col\":\n        case \"embed\":\n        case \"hr\":\n        case \"keygen\":\n        case \"meta\":\n        case \"param\":\n        case \"source\":\n        case \"track\":\n        case \"wbr\":\n        case \"menuitem\":\n          for (var _propKey15 in lastProps)\n            (_propKey8 = lastProps[_propKey15]),\n              lastProps.hasOwnProperty(_propKey15) &&\n                null != _propKey8 &&\n                !nextProps.hasOwnProperty(_propKey15) &&\n                setProp(\n                  domElement,\n                  tag,\n                  _propKey15,\n                  null,\n                  nextProps,\n                  _propKey8\n                );\n          for (checked in nextProps)\n            if (\n              ((_propKey8 = nextProps[checked]),\n              (propKey = lastProps[checked]),\n              nextProps.hasOwnProperty(checked) &&\n                _propKey8 !== propKey &&\n                (null != _propKey8 || null != propKey))\n            )\n              switch (checked) {\n                case \"children\":\n                case \"dangerouslySetInnerHTML\":\n                  if (null != _propKey8)\n                    throw Error(\n                      tag +\n                        \" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.\"\n                    );\n                  break;\n                default:\n                  setProp(\n                    domElement,\n                    tag,\n                    checked,\n                    _propKey8,\n                    nextProps,\n                    propKey\n                  );\n              }\n          return;\n        default:\n          if (isCustomElement(tag)) {\n            for (var _propKey17 in lastProps)\n              (_propKey8 = lastProps[_propKey17]),\n                lastProps.hasOwnProperty(_propKey17) &&\n                  void 0 !== _propKey8 &&\n                  !nextProps.hasOwnProperty(_propKey17) &&\n                  setPropOnCustomElement(\n                    domElement,\n                    tag,\n                    _propKey17,\n                    void 0,\n                    nextProps,\n                    _propKey8\n                  );\n            for (defaultChecked in nextProps)\n              (_propKey8 = nextProps[defaultChecked]),\n                (propKey = lastProps[defaultChecked]),\n                !nextProps.hasOwnProperty(defaultChecked) ||\n                  _propKey8 === propKey ||\n                  (void 0 === _propKey8 && void 0 === propKey) ||\n                  setPropOnCustomElement(\n                    domElement,\n                    tag,\n                    defaultChecked,\n                    _propKey8,\n                    nextProps,\n                    propKey\n                  );\n            return;\n          }\n      }\n      for (var _propKey19 in lastProps)\n        (_propKey8 = lastProps[_propKey19]),\n          lastProps.hasOwnProperty(_propKey19) &&\n            null != _propKey8 &&\n            !nextProps.hasOwnProperty(_propKey19) &&\n            setProp(domElement, tag, _propKey19, null, nextProps, _propKey8);\n      for (lastProp in nextProps)\n        (_propKey8 = nextProps[lastProp]),\n          (propKey = lastProps[lastProp]),\n          !nextProps.hasOwnProperty(lastProp) ||\n            _propKey8 === propKey ||\n            (null == _propKey8 && null == propKey) ||\n            setProp(domElement, tag, lastProp, _propKey8, nextProps, propKey);\n    }\n    function getPropNameFromAttributeName(attrName) {\n      switch (attrName) {\n        case \"class\":\n          return \"className\";\n        case \"for\":\n          return \"htmlFor\";\n        default:\n          return attrName;\n      }\n    }\n    function getStylesObjectFromElement(domElement) {\n      var serverValueInObjectForm = {};\n      domElement = domElement.style;\n      for (var i = 0; i < domElement.length; i++) {\n        var styleName = domElement[i];\n        serverValueInObjectForm[styleName] =\n          domElement.getPropertyValue(styleName);\n      }\n      return serverValueInObjectForm;\n    }\n    function diffHydratedStyles(domElement, value$jscomp$0, serverDifferences) {\n      if (null != value$jscomp$0 && \"object\" !== typeof value$jscomp$0)\n        console.error(\n          \"The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.\"\n        );\n      else {\n        var clientValue;\n        var delimiter = (clientValue = \"\"),\n          styleName;\n        for (styleName in value$jscomp$0)\n          if (value$jscomp$0.hasOwnProperty(styleName)) {\n            var value = value$jscomp$0[styleName];\n            null != value &&\n              \"boolean\" !== typeof value &&\n              \"\" !== value &&\n              (0 === styleName.indexOf(\"--\")\n                ? (checkCSSPropertyStringCoercion(value, styleName),\n                  (clientValue +=\n                    delimiter + styleName + \":\" + (\"\" + value).trim()))\n                : \"number\" !== typeof value ||\n                    0 === value ||\n                    unitlessNumbers.has(styleName)\n                  ? (checkCSSPropertyStringCoercion(value, styleName),\n                    (clientValue +=\n                      delimiter +\n                      styleName\n                        .replace(uppercasePattern, \"-$1\")\n                        .toLowerCase()\n                        .replace(msPattern$1, \"-ms-\") +\n                      \":\" +\n                      (\"\" + value).trim()))\n                  : (clientValue +=\n                      delimiter +\n                      styleName\n                        .replace(uppercasePattern, \"-$1\")\n                        .toLowerCase()\n                        .replace(msPattern$1, \"-ms-\") +\n                      \":\" +\n                      value +\n                      \"px\"),\n              (delimiter = \";\"));\n          }\n        clientValue = clientValue || null;\n        value$jscomp$0 = domElement.getAttribute(\"style\");\n        value$jscomp$0 !== clientValue &&\n          ((clientValue = normalizeMarkupForTextOrAttribute(clientValue)),\n          normalizeMarkupForTextOrAttribute(value$jscomp$0) !== clientValue &&\n            (serverDifferences.style = getStylesObjectFromElement(domElement)));\n      }\n    }\n    function hydrateAttribute(\n      domElement,\n      propKey,\n      attributeName,\n      value,\n      extraAttributes,\n      serverDifferences\n    ) {\n      extraAttributes.delete(attributeName);\n      domElement = domElement.getAttribute(attributeName);\n      if (null === domElement)\n        switch (typeof value) {\n          case \"undefined\":\n          case \"function\":\n          case \"symbol\":\n          case \"boolean\":\n            return;\n        }\n      else if (null != value)\n        switch (typeof value) {\n          case \"function\":\n          case \"symbol\":\n          case \"boolean\":\n            break;\n          default:\n            if (\n              (checkAttributeStringCoercion(value, propKey),\n              domElement === \"\" + value)\n            )\n              return;\n        }\n      warnForPropDifference(propKey, domElement, value, serverDifferences);\n    }\n    function hydrateBooleanAttribute(\n      domElement,\n      propKey,\n      attributeName,\n      value,\n      extraAttributes,\n      serverDifferences\n    ) {\n      extraAttributes.delete(attributeName);\n      domElement = domElement.getAttribute(attributeName);\n      if (null === domElement) {\n        switch (typeof value) {\n          case \"function\":\n          case \"symbol\":\n            return;\n        }\n        if (!value) return;\n      } else\n        switch (typeof value) {\n          case \"function\":\n          case \"symbol\":\n            break;\n          default:\n            if (value) return;\n        }\n      warnForPropDifference(propKey, domElement, value, serverDifferences);\n    }\n    function hydrateBooleanishAttribute(\n      domElement,\n      propKey,\n      attributeName,\n      value,\n      extraAttributes,\n      serverDifferences\n    ) {\n      extraAttributes.delete(attributeName);\n      domElement = domElement.getAttribute(attributeName);\n      if (null === domElement)\n        switch (typeof value) {\n          case \"undefined\":\n          case \"function\":\n          case \"symbol\":\n            return;\n        }\n      else if (null != value)\n        switch (typeof value) {\n          case \"function\":\n          case \"symbol\":\n            break;\n          default:\n            if (\n              (checkAttributeStringCoercion(value, attributeName),\n              domElement === \"\" + value)\n            )\n              return;\n        }\n      warnForPropDifference(propKey, domElement, value, serverDifferences);\n    }\n    function hydrateNumericAttribute(\n      domElement,\n      propKey,\n      attributeName,\n      value,\n      extraAttributes,\n      serverDifferences\n    ) {\n      extraAttributes.delete(attributeName);\n      domElement = domElement.getAttribute(attributeName);\n      if (null === domElement)\n        switch (typeof value) {\n          case \"undefined\":\n          case \"function\":\n          case \"symbol\":\n          case \"boolean\":\n            return;\n          default:\n            if (isNaN(value)) return;\n        }\n      else if (null != value)\n        switch (typeof value) {\n          case \"function\":\n          case \"symbol\":\n          case \"boolean\":\n            break;\n          default:\n            if (\n              !isNaN(value) &&\n              (checkAttributeStringCoercion(value, propKey),\n              domElement === \"\" + value)\n            )\n              return;\n        }\n      warnForPropDifference(propKey, domElement, value, serverDifferences);\n    }\n    function hydrateSanitizedAttribute(\n      domElement,\n      propKey,\n      attributeName,\n      value,\n      extraAttributes,\n      serverDifferences\n    ) {\n      extraAttributes.delete(attributeName);\n      domElement = domElement.getAttribute(attributeName);\n      if (null === domElement)\n        switch (typeof value) {\n          case \"undefined\":\n          case \"function\":\n          case \"symbol\":\n          case \"boolean\":\n            return;\n        }\n      else if (null != value)\n        switch (typeof value) {\n          case \"function\":\n          case \"symbol\":\n          case \"boolean\":\n            break;\n          default:\n            if (\n              (checkAttributeStringCoercion(value, propKey),\n              (attributeName = sanitizeURL(\"\" + value)),\n              domElement === attributeName)\n            )\n              return;\n        }\n      warnForPropDifference(propKey, domElement, value, serverDifferences);\n    }\n    function diffHydratedProperties(domElement, tag, props, hostContext) {\n      for (\n        var serverDifferences = {},\n          extraAttributes = new Set(),\n          attributes = domElement.attributes,\n          i = 0;\n        i < attributes.length;\n        i++\n      )\n        switch (attributes[i].name.toLowerCase()) {\n          case \"value\":\n            break;\n          case \"checked\":\n            break;\n          case \"selected\":\n            break;\n          default:\n            extraAttributes.add(attributes[i].name);\n        }\n      if (isCustomElement(tag))\n        for (var propKey in props) {\n          if (props.hasOwnProperty(propKey)) {\n            var value = props[propKey];\n            if (null != value)\n              if (registrationNameDependencies.hasOwnProperty(propKey))\n                \"function\" !== typeof value &&\n                  warnForInvalidEventListener(propKey, value);\n              else if (!0 !== props.suppressHydrationWarning)\n                switch (propKey) {\n                  case \"children\":\n                    (\"string\" !== typeof value && \"number\" !== typeof value) ||\n                      warnForPropDifference(\n                        \"children\",\n                        domElement.textContent,\n                        value,\n                        serverDifferences\n                      );\n                    continue;\n                  case \"suppressContentEditableWarning\":\n                  case \"suppressHydrationWarning\":\n                  case \"defaultValue\":\n                  case \"defaultChecked\":\n                  case \"innerHTML\":\n                  case \"ref\":\n                    continue;\n                  case \"dangerouslySetInnerHTML\":\n                    attributes = domElement.innerHTML;\n                    value = value ? value.__html : void 0;\n                    null != value &&\n                      ((value = normalizeHTML(domElement, value)),\n                      warnForPropDifference(\n                        propKey,\n                        attributes,\n                        value,\n                        serverDifferences\n                      ));\n                    continue;\n                  case \"style\":\n                    extraAttributes.delete(propKey);\n                    diffHydratedStyles(domElement, value, serverDifferences);\n                    continue;\n                  case \"offsetParent\":\n                  case \"offsetTop\":\n                  case \"offsetLeft\":\n                  case \"offsetWidth\":\n                  case \"offsetHeight\":\n                  case \"isContentEditable\":\n                  case \"outerText\":\n                  case \"outerHTML\":\n                    extraAttributes.delete(propKey.toLowerCase());\n                    console.error(\n                      \"Assignment to read-only property will result in a no-op: `%s`\",\n                      propKey\n                    );\n                    continue;\n                  case \"className\":\n                    extraAttributes.delete(\"class\");\n                    attributes = getValueForAttributeOnCustomComponent(\n                      domElement,\n                      \"class\",\n                      value\n                    );\n                    warnForPropDifference(\n                      \"className\",\n                      attributes,\n                      value,\n                      serverDifferences\n                    );\n                    continue;\n                  default:\n                    hostContext.context === HostContextNamespaceNone &&\n                    \"svg\" !== tag &&\n                    \"math\" !== tag\n                      ? extraAttributes.delete(propKey.toLowerCase())\n                      : extraAttributes.delete(propKey),\n                      (attributes = getValueForAttributeOnCustomComponent(\n                        domElement,\n                        propKey,\n                        value\n                      )),\n                      warnForPropDifference(\n                        propKey,\n                        attributes,\n                        value,\n                        serverDifferences\n                      );\n                }\n          }\n        }\n      else\n        for (value in props)\n          if (\n            props.hasOwnProperty(value) &&\n            ((propKey = props[value]), null != propKey)\n          )\n            if (registrationNameDependencies.hasOwnProperty(value))\n              \"function\" !== typeof propKey &&\n                warnForInvalidEventListener(value, propKey);\n            else if (!0 !== props.suppressHydrationWarning)\n              switch (value) {\n                case \"children\":\n                  (\"string\" !== typeof propKey &&\n                    \"number\" !== typeof propKey) ||\n                    warnForPropDifference(\n                      \"children\",\n                      domElement.textContent,\n                      propKey,\n                      serverDifferences\n                    );\n                  continue;\n                case \"suppressContentEditableWarning\":\n                case \"suppressHydrationWarning\":\n                case \"value\":\n                case \"checked\":\n                case \"selected\":\n                case \"defaultValue\":\n                case \"defaultChecked\":\n                case \"innerHTML\":\n                case \"ref\":\n                  continue;\n                case \"dangerouslySetInnerHTML\":\n                  attributes = domElement.innerHTML;\n                  propKey = propKey ? propKey.__html : void 0;\n                  null != propKey &&\n                    ((propKey = normalizeHTML(domElement, propKey)),\n                    attributes !== propKey &&\n                      (serverDifferences[value] = { __html: attributes }));\n                  continue;\n                case \"className\":\n                  hydrateAttribute(\n                    domElement,\n                    value,\n                    \"class\",\n                    propKey,\n                    extraAttributes,\n                    serverDifferences\n                  );\n                  continue;\n                case \"tabIndex\":\n                  hydrateAttribute(\n                    domElement,\n                    value,\n                    \"tabindex\",\n                    propKey,\n                    extraAttributes,\n                    serverDifferences\n                  );\n                  continue;\n                case \"style\":\n                  extraAttributes.delete(value);\n                  diffHydratedStyles(domElement, propKey, serverDifferences);\n                  continue;\n                case \"multiple\":\n                  extraAttributes.delete(value);\n                  warnForPropDifference(\n                    value,\n                    domElement.multiple,\n                    propKey,\n                    serverDifferences\n                  );\n                  continue;\n                case \"muted\":\n                  extraAttributes.delete(value);\n                  warnForPropDifference(\n                    value,\n                    domElement.muted,\n                    propKey,\n                    serverDifferences\n                  );\n                  continue;\n                case \"autoFocus\":\n                  extraAttributes.delete(\"autofocus\");\n                  warnForPropDifference(\n                    value,\n                    domElement.autofocus,\n                    propKey,\n                    serverDifferences\n                  );\n                  continue;\n                case \"data\":\n                  if (\"object\" !== tag) {\n                    extraAttributes.delete(value);\n                    attributes = domElement.getAttribute(\"data\");\n                    warnForPropDifference(\n                      value,\n                      attributes,\n                      propKey,\n                      serverDifferences\n                    );\n                    continue;\n                  }\n                case \"src\":\n                case \"href\":\n                  if (\n                    !(\n                      \"\" !== propKey ||\n                      (\"a\" === tag && \"href\" === value) ||\n                      (\"object\" === tag && \"data\" === value)\n                    )\n                  ) {\n                    \"src\" === value\n                      ? console.error(\n                          'An empty string (\"\") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',\n                          value,\n                          value\n                        )\n                      : console.error(\n                          'An empty string (\"\") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',\n                          value,\n                          value\n                        );\n                    continue;\n                  }\n                  hydrateSanitizedAttribute(\n                    domElement,\n                    value,\n                    value,\n                    propKey,\n                    extraAttributes,\n                    serverDifferences\n                  );\n                  continue;\n                case \"action\":\n                case \"formAction\":\n                  attributes = domElement.getAttribute(value);\n                  if (\"function\" === typeof propKey) {\n                    extraAttributes.delete(value.toLowerCase());\n                    \"formAction\" === value\n                      ? (extraAttributes.delete(\"name\"),\n                        extraAttributes.delete(\"formenctype\"),\n                        extraAttributes.delete(\"formmethod\"),\n                        extraAttributes.delete(\"formtarget\"))\n                      : (extraAttributes.delete(\"enctype\"),\n                        extraAttributes.delete(\"method\"),\n                        extraAttributes.delete(\"target\"));\n                    continue;\n                  } else if (attributes === EXPECTED_FORM_ACTION_URL) {\n                    extraAttributes.delete(value.toLowerCase());\n                    warnForPropDifference(\n                      value,\n                      \"function\",\n                      propKey,\n                      serverDifferences\n                    );\n                    continue;\n                  }\n                  hydrateSanitizedAttribute(\n                    domElement,\n                    value,\n                    value.toLowerCase(),\n                    propKey,\n                    extraAttributes,\n                    serverDifferences\n                  );\n                  continue;\n                case \"xlinkHref\":\n                  hydrateSanitizedAttribute(\n                    domElement,\n                    value,\n                    \"xlink:href\",\n                    propKey,\n                    extraAttributes,\n                    serverDifferences\n                  );\n                  continue;\n                case \"contentEditable\":\n                  hydrateBooleanishAttribute(\n                    domElement,\n                    value,\n                    \"contenteditable\",\n                    propKey,\n                    extraAttributes,\n                    serverDifferences\n                  );\n                  continue;\n                case \"spellCheck\":\n                  hydrateBooleanishAttribute(\n                    domElement,\n                    value,\n                    \"spellcheck\",\n                    propKey,\n                    extraAttributes,\n                    serverDifferences\n                  );\n                  continue;\n                case \"draggable\":\n                case \"autoReverse\":\n                case \"externalResourcesRequired\":\n                case \"focusable\":\n                case \"preserveAlpha\":\n                  hydrateBooleanishAttribute(\n                    domElement,\n                    value,\n                    value,\n                    propKey,\n                    extraAttributes,\n                    serverDifferences\n                  );\n                  continue;\n                case \"allowFullScreen\":\n                case \"async\":\n                case \"autoPlay\":\n                case \"controls\":\n                case \"default\":\n                case \"defer\":\n                case \"disabled\":\n                case \"disablePictureInPicture\":\n                case \"disableRemotePlayback\":\n                case \"formNoValidate\":\n                case \"hidden\":\n                case \"loop\":\n                case \"noModule\":\n                case \"noValidate\":\n                case \"open\":\n                case \"playsInline\":\n                case \"readOnly\":\n                case \"required\":\n                case \"reversed\":\n                case \"scoped\":\n                case \"seamless\":\n                case \"itemScope\":\n                  hydrateBooleanAttribute(\n                    domElement,\n                    value,\n                    value.toLowerCase(),\n                    propKey,\n                    extraAttributes,\n                    serverDifferences\n                  );\n                  continue;\n                case \"capture\":\n                case \"download\":\n                  a: {\n                    i = domElement;\n                    var attributeName = (attributes = value),\n                      serverDifferences$jscomp$0 = serverDifferences;\n                    extraAttributes.delete(attributeName);\n                    i = i.getAttribute(attributeName);\n                    if (null === i)\n                      switch (typeof propKey) {\n                        case \"undefined\":\n                        case \"function\":\n                        case \"symbol\":\n                          break a;\n                        default:\n                          if (!1 === propKey) break a;\n                      }\n                    else if (null != propKey)\n                      switch (typeof propKey) {\n                        case \"function\":\n                        case \"symbol\":\n                          break;\n                        case \"boolean\":\n                          if (!0 === propKey && \"\" === i) break a;\n                          break;\n                        default:\n                          if (\n                            (checkAttributeStringCoercion(propKey, attributes),\n                            i === \"\" + propKey)\n                          )\n                            break a;\n                      }\n                    warnForPropDifference(\n                      attributes,\n                      i,\n                      propKey,\n                      serverDifferences$jscomp$0\n                    );\n                  }\n                  continue;\n                case \"cols\":\n                case \"rows\":\n                case \"size\":\n                case \"span\":\n                  a: {\n                    i = domElement;\n                    attributeName = attributes = value;\n                    serverDifferences$jscomp$0 = serverDifferences;\n                    extraAttributes.delete(attributeName);\n                    i = i.getAttribute(attributeName);\n                    if (null === i)\n                      switch (typeof propKey) {\n                        case \"undefined\":\n                        case \"function\":\n                        case \"symbol\":\n                        case \"boolean\":\n                          break a;\n                        default:\n                          if (isNaN(propKey) || 1 > propKey) break a;\n                      }\n                    else if (null != propKey)\n                      switch (typeof propKey) {\n                        case \"function\":\n                        case \"symbol\":\n                        case \"boolean\":\n                          break;\n                        default:\n                          if (\n                            !(isNaN(propKey) || 1 > propKey) &&\n                            (checkAttributeStringCoercion(propKey, attributes),\n                            i === \"\" + propKey)\n                          )\n                            break a;\n                      }\n                    warnForPropDifference(\n                      attributes,\n                      i,\n                      propKey,\n                      serverDifferences$jscomp$0\n                    );\n                  }\n                  continue;\n                case \"rowSpan\":\n                  hydrateNumericAttribute(\n                    domElement,\n                    value,\n                    \"rowspan\",\n                    propKey,\n                    extraAttributes,\n                    serverDifferences\n                  );\n                  continue;\n                case \"start\":\n                  hydrateNumericAttribute(\n                    domElement,\n                    value,\n                    value,\n                    propKey,\n                    extraAttributes,\n                    serverDifferences\n                  );\n                  continue;\n                case \"xHeight\":\n                  hydrateAttribute(\n                    domElement,\n                    value,\n                    \"x-height\",\n                    propKey,\n                    extraAttributes,\n                    serverDifferences\n                  );\n                  continue;\n                case \"xlinkActuate\":\n                  hydrateAttribute(\n                    domElement,\n                    value,\n                    \"xlink:actuate\",\n                    propKey,\n                    extraAttributes,\n                    serverDifferences\n                  );\n                  continue;\n                case \"xlinkArcrole\":\n                  hydrateAttribute(\n                    domElement,\n                    value,\n                    \"xlink:arcrole\",\n                    propKey,\n                    extraAttributes,\n                    serverDifferences\n                  );\n                  continue;\n                case \"xlinkRole\":\n                  hydrateAttribute(\n                    domElement,\n                    value,\n                    \"xlink:role\",\n                    propKey,\n                    extraAttributes,\n                    serverDifferences\n                  );\n                  continue;\n                case \"xlinkShow\":\n                  hydrateAttribute(\n                    domElement,\n                    value,\n                    \"xlink:show\",\n                    propKey,\n                    extraAttributes,\n                    serverDifferences\n                  );\n                  continue;\n                case \"xlinkTitle\":\n                  hydrateAttribute(\n                    domElement,\n                    value,\n                    \"xlink:title\",\n                    propKey,\n                    extraAttributes,\n                    serverDifferences\n                  );\n                  continue;\n                case \"xlinkType\":\n                  hydrateAttribute(\n                    domElement,\n                    value,\n                    \"xlink:type\",\n                    propKey,\n                    extraAttributes,\n                    serverDifferences\n                  );\n                  continue;\n                case \"xmlBase\":\n                  hydrateAttribute(\n                    domElement,\n                    value,\n                    \"xml:base\",\n                    propKey,\n                    extraAttributes,\n                    serverDifferences\n                  );\n                  continue;\n                case \"xmlLang\":\n                  hydrateAttribute(\n                    domElement,\n                    value,\n                    \"xml:lang\",\n                    propKey,\n                    extraAttributes,\n                    serverDifferences\n                  );\n                  continue;\n                case \"xmlSpace\":\n                  hydrateAttribute(\n                    domElement,\n                    value,\n                    \"xml:space\",\n                    propKey,\n                    extraAttributes,\n                    serverDifferences\n                  );\n                  continue;\n                case \"inert\":\n                  \"\" !== propKey ||\n                    didWarnForNewBooleanPropsWithEmptyValue[value] ||\n                    ((didWarnForNewBooleanPropsWithEmptyValue[value] = !0),\n                    console.error(\n                      \"Received an empty string for a boolean attribute `%s`. This will treat the attribute as if it were false. Either pass `false` to silence this warning, or pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.\",\n                      value\n                    ));\n                  hydrateBooleanAttribute(\n                    domElement,\n                    value,\n                    value,\n                    propKey,\n                    extraAttributes,\n                    serverDifferences\n                  );\n                  continue;\n                default:\n                  if (\n                    !(2 < value.length) ||\n                    (\"o\" !== value[0] && \"O\" !== value[0]) ||\n                    (\"n\" !== value[1] && \"N\" !== value[1])\n                  ) {\n                    i = getAttributeAlias(value);\n                    attributes = !1;\n                    hostContext.context === HostContextNamespaceNone &&\n                    \"svg\" !== tag &&\n                    \"math\" !== tag\n                      ? extraAttributes.delete(i.toLowerCase())\n                      : ((attributeName = value.toLowerCase()),\n                        (attributeName = possibleStandardNames.hasOwnProperty(\n                          attributeName\n                        )\n                          ? possibleStandardNames[attributeName] || null\n                          : null),\n                        null !== attributeName &&\n                          attributeName !== value &&\n                          ((attributes = !0),\n                          extraAttributes.delete(attributeName)),\n                        extraAttributes.delete(i));\n                    a: if (\n                      ((attributeName = domElement),\n                      (serverDifferences$jscomp$0 = i),\n                      (i = propKey),\n                      isAttributeNameSafe(serverDifferences$jscomp$0))\n                    )\n                      if (\n                        attributeName.hasAttribute(serverDifferences$jscomp$0)\n                      )\n                        (attributeName = attributeName.getAttribute(\n                          serverDifferences$jscomp$0\n                        )),\n                          checkAttributeStringCoercion(\n                            i,\n                            serverDifferences$jscomp$0\n                          ),\n                          (i = attributeName === \"\" + i ? i : attributeName);\n                      else {\n                        switch (typeof i) {\n                          case \"function\":\n                          case \"symbol\":\n                            break a;\n                          case \"boolean\":\n                            if (\n                              ((attributeName = serverDifferences$jscomp$0\n                                .toLowerCase()\n                                .slice(0, 5)),\n                              \"data-\" !== attributeName &&\n                                \"aria-\" !== attributeName)\n                            )\n                              break a;\n                        }\n                        i = void 0 === i ? void 0 : null;\n                      }\n                    else i = void 0;\n                    attributes ||\n                      warnForPropDifference(\n                        value,\n                        i,\n                        propKey,\n                        serverDifferences\n                      );\n                  }\n              }\n      0 < extraAttributes.size &&\n        !0 !== props.suppressHydrationWarning &&\n        warnForExtraAttributes(domElement, extraAttributes, serverDifferences);\n      return 0 === Object.keys(serverDifferences).length\n        ? null\n        : serverDifferences;\n    }\n    function propNamesListJoin(list, combinator) {\n      switch (list.length) {\n        case 0:\n          return \"\";\n        case 1:\n          return list[0];\n        case 2:\n          return list[0] + \" \" + combinator + \" \" + list[1];\n        default:\n          return (\n            list.slice(0, -1).join(\", \") +\n            \", \" +\n            combinator +\n            \" \" +\n            list[list.length - 1]\n          );\n      }\n    }\n    function isLikelyStaticResource(initiatorType) {\n      switch (initiatorType) {\n        case \"css\":\n        case \"script\":\n        case \"font\":\n        case \"img\":\n        case \"image\":\n        case \"input\":\n        case \"link\":\n          return !0;\n        default:\n          return !1;\n      }\n    }\n    function estimateBandwidth() {\n      if (\"function\" === typeof performance.getEntriesByType) {\n        for (\n          var count = 0,\n            bits = 0,\n            resourceEntries = performance.getEntriesByType(\"resource\"),\n            i = 0;\n          i < resourceEntries.length;\n          i++\n        ) {\n          var entry = resourceEntries[i],\n            transferSize = entry.transferSize,\n            initiatorType = entry.initiatorType,\n            duration = entry.duration;\n          if (\n            transferSize &&\n            duration &&\n            isLikelyStaticResource(initiatorType)\n          ) {\n            initiatorType = 0;\n            duration = entry.responseEnd;\n            for (i += 1; i < resourceEntries.length; i++) {\n              var overlapEntry = resourceEntries[i],\n                overlapStartTime = overlapEntry.startTime;\n              if (overlapStartTime > duration) break;\n              var overlapTransferSize = overlapEntry.transferSize,\n                overlapInitiatorType = overlapEntry.initiatorType;\n              overlapTransferSize &&\n                isLikelyStaticResource(overlapInitiatorType) &&\n                ((overlapEntry = overlapEntry.responseEnd),\n                (initiatorType +=\n                  overlapTransferSize *\n                  (overlapEntry < duration\n                    ? 1\n                    : (duration - overlapStartTime) /\n                      (overlapEntry - overlapStartTime))));\n            }\n            --i;\n            bits +=\n              (8 * (transferSize + initiatorType)) / (entry.duration / 1e3);\n            count++;\n            if (10 < count) break;\n          }\n        }\n        if (0 < count) return bits / count / 1e6;\n      }\n      return navigator.connection &&\n        ((count = navigator.connection.downlink), \"number\" === typeof count)\n        ? count\n        : 5;\n    }\n    function getOwnerDocumentFromRootContainer(rootContainerElement) {\n      return 9 === rootContainerElement.nodeType\n        ? rootContainerElement\n        : rootContainerElement.ownerDocument;\n    }\n    function getOwnHostContext(namespaceURI) {\n      switch (namespaceURI) {\n        case SVG_NAMESPACE:\n          return HostContextNamespaceSvg;\n        case MATH_NAMESPACE:\n          return HostContextNamespaceMath;\n        default:\n          return HostContextNamespaceNone;\n      }\n    }\n    function getChildHostContextProd(parentNamespace, type) {\n      if (parentNamespace === HostContextNamespaceNone)\n        switch (type) {\n          case \"svg\":\n            return HostContextNamespaceSvg;\n          case \"math\":\n            return HostContextNamespaceMath;\n          default:\n            return HostContextNamespaceNone;\n        }\n      return parentNamespace === HostContextNamespaceSvg &&\n        \"foreignObject\" === type\n        ? HostContextNamespaceNone\n        : parentNamespace;\n    }\n    function shouldSetTextContent(type, props) {\n      return (\n        \"textarea\" === type ||\n        \"noscript\" === type ||\n        \"string\" === typeof props.children ||\n        \"number\" === typeof props.children ||\n        \"bigint\" === typeof props.children ||\n        (\"object\" === typeof props.dangerouslySetInnerHTML &&\n          null !== props.dangerouslySetInnerHTML &&\n          null != props.dangerouslySetInnerHTML.__html)\n      );\n    }\n    function shouldAttemptEagerTransition() {\n      var event = window.event;\n      if (event && \"popstate\" === event.type) {\n        if (event === currentPopstateTransitionEvent) return !1;\n        currentPopstateTransitionEvent = event;\n        return !0;\n      }\n      currentPopstateTransitionEvent = null;\n      return !1;\n    }\n    function resolveEventType() {\n      var event = window.event;\n      return event && event !== schedulerEvent ? event.type : null;\n    }\n    function resolveEventTimeStamp() {\n      var event = window.event;\n      return event && event !== schedulerEvent ? event.timeStamp : -1.1;\n    }\n    function handleErrorInNextTick(error) {\n      setTimeout(function () {\n        throw error;\n      });\n    }\n    function commitMount(domElement, type, newProps) {\n      switch (type) {\n        case \"button\":\n        case \"input\":\n        case \"select\":\n        case \"textarea\":\n          newProps.autoFocus && domElement.focus();\n          break;\n        case \"img\":\n          newProps.src\n            ? (domElement.src = newProps.src)\n            : newProps.srcSet && (domElement.srcset = newProps.srcSet);\n      }\n    }\n    function commitHydratedInstance() {}\n    function commitUpdate(domElement, type, oldProps, newProps) {\n      updateProperties(domElement, type, oldProps, newProps);\n      domElement[internalPropsKey] = newProps;\n    }\n    function resetTextContent(domElement) {\n      setTextContent(domElement, \"\");\n    }\n    function commitTextUpdate(textInstance, oldText, newText) {\n      textInstance.nodeValue = newText;\n    }\n    function warnForReactChildrenConflict(container) {\n      if (!container.__reactWarnedAboutChildrenConflict) {\n        var props = container[internalPropsKey] || null;\n        if (null !== props) {\n          var fiber = getInstanceFromNode(container);\n          null !== fiber &&\n            (\"string\" === typeof props.children ||\n            \"number\" === typeof props.children\n              ? ((container.__reactWarnedAboutChildrenConflict = !0),\n                runWithFiberInDEV(fiber, function () {\n                  console.error(\n                    'Cannot use a ref on a React element as a container to `createRoot` or `createPortal` if that element also sets \"children\" text content using React. It should be a leaf with no children. Otherwise it\\'s ambiguous which children should be used.'\n                  );\n                }))\n              : null != props.dangerouslySetInnerHTML &&\n                ((container.__reactWarnedAboutChildrenConflict = !0),\n                runWithFiberInDEV(fiber, function () {\n                  console.error(\n                    'Cannot use a ref on a React element as a container to `createRoot` or `createPortal` if that element also sets \"dangerouslySetInnerHTML\" using React. It should be a leaf with no children. Otherwise it\\'s ambiguous which children should be used.'\n                  );\n                })));\n        }\n      }\n    }\n    function isSingletonScope(type) {\n      return \"head\" === type;\n    }\n    function removeChild(parentInstance, child) {\n      parentInstance.removeChild(child);\n    }\n    function removeChildFromContainer(container, child) {\n      (9 === container.nodeType\n        ? container.body\n        : \"HTML\" === container.nodeName\n          ? container.ownerDocument.body\n          : container\n      ).removeChild(child);\n    }\n    function clearHydrationBoundary(parentInstance, hydrationInstance) {\n      var node = hydrationInstance,\n        depth = 0;\n      do {\n        var nextNode = node.nextSibling;\n        parentInstance.removeChild(node);\n        if (nextNode && 8 === nextNode.nodeType)\n          if (\n            ((node = nextNode.data),\n            node === SUSPENSE_END_DATA || node === ACTIVITY_END_DATA)\n          ) {\n            if (0 === depth) {\n              parentInstance.removeChild(nextNode);\n              retryIfBlockedOn(hydrationInstance);\n              return;\n            }\n            depth--;\n          } else if (\n            node === SUSPENSE_START_DATA ||\n            node === SUSPENSE_PENDING_START_DATA ||\n            node === SUSPENSE_QUEUED_START_DATA ||\n            node === SUSPENSE_FALLBACK_START_DATA ||\n            node === ACTIVITY_START_DATA\n          )\n            depth++;\n          else if (node === PREAMBLE_CONTRIBUTION_HTML)\n            releaseSingletonInstance(\n              parentInstance.ownerDocument.documentElement\n            );\n          else if (node === PREAMBLE_CONTRIBUTION_HEAD) {\n            node = parentInstance.ownerDocument.head;\n            releaseSingletonInstance(node);\n            for (var node$jscomp$0 = node.firstChild; node$jscomp$0; ) {\n              var nextNode$jscomp$0 = node$jscomp$0.nextSibling,\n                nodeName = node$jscomp$0.nodeName;\n              node$jscomp$0[internalHoistableMarker] ||\n                \"SCRIPT\" === nodeName ||\n                \"STYLE\" === nodeName ||\n                (\"LINK\" === nodeName &&\n                  \"stylesheet\" === node$jscomp$0.rel.toLowerCase()) ||\n                node.removeChild(node$jscomp$0);\n              node$jscomp$0 = nextNode$jscomp$0;\n            }\n          } else\n            node === PREAMBLE_CONTRIBUTION_BODY &&\n              releaseSingletonInstance(parentInstance.ownerDocument.body);\n        node = nextNode;\n      } while (node);\n      retryIfBlockedOn(hydrationInstance);\n    }\n    function hideOrUnhideDehydratedBoundary(suspenseInstance, isHidden) {\n      var node = suspenseInstance;\n      suspenseInstance = 0;\n      do {\n        var nextNode = node.nextSibling;\n        1 === node.nodeType\n          ? isHidden\n            ? ((node._stashedDisplay = node.style.display),\n              (node.style.display = \"none\"))\n            : ((node.style.display = node._stashedDisplay || \"\"),\n              \"\" === node.getAttribute(\"style\") &&\n                node.removeAttribute(\"style\"))\n          : 3 === node.nodeType &&\n            (isHidden\n              ? ((node._stashedText = node.nodeValue), (node.nodeValue = \"\"))\n              : (node.nodeValue = node._stashedText || \"\"));\n        if (nextNode && 8 === nextNode.nodeType)\n          if (((node = nextNode.data), node === SUSPENSE_END_DATA))\n            if (0 === suspenseInstance) break;\n            else suspenseInstance--;\n          else\n            (node !== SUSPENSE_START_DATA &&\n              node !== SUSPENSE_PENDING_START_DATA &&\n              node !== SUSPENSE_QUEUED_START_DATA &&\n              node !== SUSPENSE_FALLBACK_START_DATA) ||\n              suspenseInstance++;\n        node = nextNode;\n      } while (node);\n    }\n    function hideDehydratedBoundary(suspenseInstance) {\n      hideOrUnhideDehydratedBoundary(suspenseInstance, !0);\n    }\n    function hideInstance(instance) {\n      instance = instance.style;\n      \"function\" === typeof instance.setProperty\n        ? instance.setProperty(\"display\", \"none\", \"important\")\n        : (instance.display = \"none\");\n    }\n    function hideTextInstance(textInstance) {\n      textInstance.nodeValue = \"\";\n    }\n    function unhideDehydratedBoundary(dehydratedInstance) {\n      hideOrUnhideDehydratedBoundary(dehydratedInstance, !1);\n    }\n    function unhideInstance(instance, props) {\n      props = props[STYLE];\n      props =\n        void 0 !== props && null !== props && props.hasOwnProperty(\"display\")\n          ? props.display\n          : null;\n      instance.style.display =\n        null == props || \"boolean\" === typeof props ? \"\" : (\"\" + props).trim();\n    }\n    function unhideTextInstance(textInstance, text) {\n      textInstance.nodeValue = text;\n    }\n    function clearContainerSparingly(container) {\n      var nextNode = container.firstChild;\n      nextNode && 10 === nextNode.nodeType && (nextNode = nextNode.nextSibling);\n      for (; nextNode; ) {\n        var node = nextNode;\n        nextNode = nextNode.nextSibling;\n        switch (node.nodeName) {\n          case \"HTML\":\n          case \"HEAD\":\n          case \"BODY\":\n            clearContainerSparingly(node);\n            detachDeletedInstance(node);\n            continue;\n          case \"SCRIPT\":\n          case \"STYLE\":\n            continue;\n          case \"LINK\":\n            if (\"stylesheet\" === node.rel.toLowerCase()) continue;\n        }\n        container.removeChild(node);\n      }\n    }\n    function canHydrateInstance(instance, type, props, inRootOrSingleton) {\n      for (; 1 === instance.nodeType; ) {\n        var anyProps = props;\n        if (instance.nodeName.toLowerCase() !== type.toLowerCase()) {\n          if (\n            !inRootOrSingleton &&\n            (\"INPUT\" !== instance.nodeName || \"hidden\" !== instance.type)\n          )\n            break;\n        } else if (!inRootOrSingleton)\n          if (\"input\" === type && \"hidden\" === instance.type) {\n            checkAttributeStringCoercion(anyProps.name, \"name\");\n            var name = null == anyProps.name ? null : \"\" + anyProps.name;\n            if (\n              \"hidden\" === anyProps.type &&\n              instance.getAttribute(\"name\") === name\n            )\n              return instance;\n          } else return instance;\n        else if (!instance[internalHoistableMarker])\n          switch (type) {\n            case \"meta\":\n              if (!instance.hasAttribute(\"itemprop\")) break;\n              return instance;\n            case \"link\":\n              name = instance.getAttribute(\"rel\");\n              if (\n                \"stylesheet\" === name &&\n                instance.hasAttribute(\"data-precedence\")\n              )\n                break;\n              else if (\n                name !== anyProps.rel ||\n                instance.getAttribute(\"href\") !==\n                  (null == anyProps.href || \"\" === anyProps.href\n                    ? null\n                    : anyProps.href) ||\n                instance.getAttribute(\"crossorigin\") !==\n                  (null == anyProps.crossOrigin\n                    ? null\n                    : anyProps.crossOrigin) ||\n                instance.getAttribute(\"title\") !==\n                  (null == anyProps.title ? null : anyProps.title)\n              )\n                break;\n              return instance;\n            case \"style\":\n              if (instance.hasAttribute(\"data-precedence\")) break;\n              return instance;\n            case \"script\":\n              name = instance.getAttribute(\"src\");\n              if (\n                (name !== (null == anyProps.src ? null : anyProps.src) ||\n                  instance.getAttribute(\"type\") !==\n                    (null == anyProps.type ? null : anyProps.type) ||\n                  instance.getAttribute(\"crossorigin\") !==\n                    (null == anyProps.crossOrigin\n                      ? null\n                      : anyProps.crossOrigin)) &&\n                name &&\n                instance.hasAttribute(\"async\") &&\n                !instance.hasAttribute(\"itemprop\")\n              )\n                break;\n              return instance;\n            default:\n              return instance;\n          }\n        instance = getNextHydratable(instance.nextSibling);\n        if (null === instance) break;\n      }\n      return null;\n    }\n    function canHydrateTextInstance(instance, text, inRootOrSingleton) {\n      if (\"\" === text) return null;\n      for (; 3 !== instance.nodeType; ) {\n        if (\n          (1 !== instance.nodeType ||\n            \"INPUT\" !== instance.nodeName ||\n            \"hidden\" !== instance.type) &&\n          !inRootOrSingleton\n        )\n          return null;\n        instance = getNextHydratable(instance.nextSibling);\n        if (null === instance) return null;\n      }\n      return instance;\n    }\n    function canHydrateHydrationBoundary(instance, inRootOrSingleton) {\n      for (; 8 !== instance.nodeType; ) {\n        if (\n          (1 !== instance.nodeType ||\n            \"INPUT\" !== instance.nodeName ||\n            \"hidden\" !== instance.type) &&\n          !inRootOrSingleton\n        )\n          return null;\n        instance = getNextHydratable(instance.nextSibling);\n        if (null === instance) return null;\n      }\n      return instance;\n    }\n    function isSuspenseInstancePending(instance) {\n      return (\n        instance.data === SUSPENSE_PENDING_START_DATA ||\n        instance.data === SUSPENSE_QUEUED_START_DATA\n      );\n    }\n    function isSuspenseInstanceFallback(instance) {\n      return (\n        instance.data === SUSPENSE_FALLBACK_START_DATA ||\n        (instance.data === SUSPENSE_PENDING_START_DATA &&\n          instance.ownerDocument.readyState !== DOCUMENT_READY_STATE_LOADING)\n      );\n    }\n    function registerSuspenseInstanceRetry(instance, callback) {\n      var ownerDocument = instance.ownerDocument;\n      if (instance.data === SUSPENSE_QUEUED_START_DATA)\n        instance._reactRetry = callback;\n      else if (\n        instance.data !== SUSPENSE_PENDING_START_DATA ||\n        ownerDocument.readyState !== DOCUMENT_READY_STATE_LOADING\n      )\n        callback();\n      else {\n        var listener = function () {\n          callback();\n          ownerDocument.removeEventListener(\"DOMContentLoaded\", listener);\n        };\n        ownerDocument.addEventListener(\"DOMContentLoaded\", listener);\n        instance._reactRetry = listener;\n      }\n    }\n    function getNextHydratable(node) {\n      for (; null != node; node = node.nextSibling) {\n        var nodeType = node.nodeType;\n        if (1 === nodeType || 3 === nodeType) break;\n        if (8 === nodeType) {\n          nodeType = node.data;\n          if (\n            nodeType === SUSPENSE_START_DATA ||\n            nodeType === SUSPENSE_FALLBACK_START_DATA ||\n            nodeType === SUSPENSE_PENDING_START_DATA ||\n            nodeType === SUSPENSE_QUEUED_START_DATA ||\n            nodeType === ACTIVITY_START_DATA ||\n            nodeType === FORM_STATE_IS_MATCHING ||\n            nodeType === FORM_STATE_IS_NOT_MATCHING\n          )\n            break;\n          if (nodeType === SUSPENSE_END_DATA || nodeType === ACTIVITY_END_DATA)\n            return null;\n        }\n      }\n      return node;\n    }\n    function describeHydratableInstanceForDevWarnings(instance) {\n      if (1 === instance.nodeType) {\n        for (\n          var JSCompiler_temp_const = instance.nodeName.toLowerCase(),\n            serverDifferences = {},\n            attributes = instance.attributes,\n            i = 0;\n          i < attributes.length;\n          i++\n        ) {\n          var attr = attributes[i];\n          serverDifferences[getPropNameFromAttributeName(attr.name)] =\n            \"style\" === attr.name.toLowerCase()\n              ? getStylesObjectFromElement(instance)\n              : attr.value;\n        }\n        return { type: JSCompiler_temp_const, props: serverDifferences };\n      }\n      return 8 === instance.nodeType\n        ? instance.data === ACTIVITY_START_DATA\n          ? { type: \"Activity\", props: {} }\n          : { type: \"Suspense\", props: {} }\n        : instance.nodeValue;\n    }\n    function diffHydratedTextForDevWarnings(textInstance, text, parentProps) {\n      return null === parentProps ||\n        !0 !== parentProps[SUPPRESS_HYDRATION_WARNING]\n        ? (textInstance.nodeValue === text\n            ? (textInstance = null)\n            : ((text = normalizeMarkupForTextOrAttribute(text)),\n              (textInstance =\n                normalizeMarkupForTextOrAttribute(textInstance.nodeValue) ===\n                text\n                  ? null\n                  : textInstance.nodeValue)),\n          textInstance)\n        : null;\n    }\n    function getNextHydratableInstanceAfterHydrationBoundary(\n      hydrationInstance\n    ) {\n      hydrationInstance = hydrationInstance.nextSibling;\n      for (var depth = 0; hydrationInstance; ) {\n        if (8 === hydrationInstance.nodeType) {\n          var data = hydrationInstance.data;\n          if (data === SUSPENSE_END_DATA || data === ACTIVITY_END_DATA) {\n            if (0 === depth)\n              return getNextHydratable(hydrationInstance.nextSibling);\n            depth--;\n          } else\n            (data !== SUSPENSE_START_DATA &&\n              data !== SUSPENSE_FALLBACK_START_DATA &&\n              data !== SUSPENSE_PENDING_START_DATA &&\n              data !== SUSPENSE_QUEUED_START_DATA &&\n              data !== ACTIVITY_START_DATA) ||\n              depth++;\n        }\n        hydrationInstance = hydrationInstance.nextSibling;\n      }\n      return null;\n    }\n    function getParentHydrationBoundary(targetInstance) {\n      targetInstance = targetInstance.previousSibling;\n      for (var depth = 0; targetInstance; ) {\n        if (8 === targetInstance.nodeType) {\n          var data = targetInstance.data;\n          if (\n            data === SUSPENSE_START_DATA ||\n            data === SUSPENSE_FALLBACK_START_DATA ||\n            data === SUSPENSE_PENDING_START_DATA ||\n            data === SUSPENSE_QUEUED_START_DATA ||\n            data === ACTIVITY_START_DATA\n          ) {\n            if (0 === depth) return targetInstance;\n            depth--;\n          } else\n            (data !== SUSPENSE_END_DATA && data !== ACTIVITY_END_DATA) ||\n              depth++;\n        }\n        targetInstance = targetInstance.previousSibling;\n      }\n      return null;\n    }\n    function commitHydratedContainer(container) {\n      retryIfBlockedOn(container);\n    }\n    function commitHydratedActivityInstance(activityInstance) {\n      retryIfBlockedOn(activityInstance);\n    }\n    function commitHydratedSuspenseInstance(suspenseInstance) {\n      retryIfBlockedOn(suspenseInstance);\n    }\n    function resolveSingletonInstance(\n      type,\n      props,\n      rootContainerInstance,\n      hostContext,\n      validateDOMNestingDev\n    ) {\n      validateDOMNestingDev &&\n        validateDOMNesting(type, hostContext.ancestorInfo);\n      props = getOwnerDocumentFromRootContainer(rootContainerInstance);\n      switch (type) {\n        case \"html\":\n          type = props.documentElement;\n          if (!type)\n            throw Error(\n              \"React expected an <html> element (document.documentElement) to exist in the Document but one was not found. React never removes the documentElement for any Document it renders into so the cause is likely in some other script running on this page.\"\n            );\n          return type;\n        case \"head\":\n          type = props.head;\n          if (!type)\n            throw Error(\n              \"React expected a <head> element (document.head) to exist in the Document but one was not found. React never removes the head for any Document it renders into so the cause is likely in some other script running on this page.\"\n            );\n          return type;\n        case \"body\":\n          type = props.body;\n          if (!type)\n            throw Error(\n              \"React expected a <body> element (document.body) to exist in the Document but one was not found. React never removes the body for any Document it renders into so the cause is likely in some other script running on this page.\"\n            );\n          return type;\n        default:\n          throw Error(\n            \"resolveSingletonInstance was called with an element type that is not supported. This is a bug in React.\"\n          );\n      }\n    }\n    function acquireSingletonInstance(\n      type,\n      props,\n      instance,\n      internalInstanceHandle\n    ) {\n      if (\n        !instance[internalContainerInstanceKey] &&\n        getInstanceFromNode(instance)\n      ) {\n        var tagName = instance.tagName.toLowerCase();\n        console.error(\n          \"You are mounting a new %s component when a previous one has not first unmounted. It is an error to render more than one %s component at a time and attributes and children of these components will likely fail in unpredictable ways. Please only render a single instance of <%s> and if you need to mount a new one, ensure any previous ones have unmounted first.\",\n          tagName,\n          tagName,\n          tagName\n        );\n      }\n      switch (type) {\n        case \"html\":\n        case \"head\":\n        case \"body\":\n          break;\n        default:\n          console.error(\n            \"acquireSingletonInstance was called with an element type that is not supported. This is a bug in React.\"\n          );\n      }\n      for (tagName = instance.attributes; tagName.length; )\n        instance.removeAttributeNode(tagName[0]);\n      setInitialProperties(instance, type, props);\n      instance[internalInstanceKey] = internalInstanceHandle;\n      instance[internalPropsKey] = props;\n    }\n    function releaseSingletonInstance(instance) {\n      for (var attributes = instance.attributes; attributes.length; )\n        instance.removeAttributeNode(attributes[0]);\n      detachDeletedInstance(instance);\n    }\n    function getHoistableRoot(container) {\n      return \"function\" === typeof container.getRootNode\n        ? container.getRootNode()\n        : 9 === container.nodeType\n          ? container\n          : container.ownerDocument;\n    }\n    function preconnectAs(rel, href, crossOrigin) {\n      var ownerDocument = globalDocument;\n      if (ownerDocument && \"string\" === typeof href && href) {\n        var limitedEscapedHref =\n          escapeSelectorAttributeValueInsideDoubleQuotes(href);\n        limitedEscapedHref =\n          'link[rel=\"' + rel + '\"][href=\"' + limitedEscapedHref + '\"]';\n        \"string\" === typeof crossOrigin &&\n          (limitedEscapedHref += '[crossorigin=\"' + crossOrigin + '\"]');\n        preconnectsSet.has(limitedEscapedHref) ||\n          (preconnectsSet.add(limitedEscapedHref),\n          (rel = { rel: rel, crossOrigin: crossOrigin, href: href }),\n          null === ownerDocument.querySelector(limitedEscapedHref) &&\n            ((href = ownerDocument.createElement(\"link\")),\n            setInitialProperties(href, \"link\", rel),\n            markNodeAsHoistable(href),\n            ownerDocument.head.appendChild(href)));\n      }\n    }\n    function getResource(type, currentProps, pendingProps, currentResource) {\n      var resourceRoot = (resourceRoot = rootInstanceStackCursor.current)\n        ? getHoistableRoot(resourceRoot)\n        : null;\n      if (!resourceRoot)\n        throw Error(\n          '\"resourceRoot\" was expected to exist. This is a bug in React.'\n        );\n      switch (type) {\n        case \"meta\":\n        case \"title\":\n          return null;\n        case \"style\":\n          return \"string\" === typeof pendingProps.precedence &&\n            \"string\" === typeof pendingProps.href\n            ? ((pendingProps = getStyleKey(pendingProps.href)),\n              (currentProps =\n                getResourcesFromRoot(resourceRoot).hoistableStyles),\n              (currentResource = currentProps.get(pendingProps)),\n              currentResource ||\n                ((currentResource = {\n                  type: \"style\",\n                  instance: null,\n                  count: 0,\n                  state: null\n                }),\n                currentProps.set(pendingProps, currentResource)),\n              currentResource)\n            : { type: \"void\", instance: null, count: 0, state: null };\n        case \"link\":\n          if (\n            \"stylesheet\" === pendingProps.rel &&\n            \"string\" === typeof pendingProps.href &&\n            \"string\" === typeof pendingProps.precedence\n          ) {\n            type = getStyleKey(pendingProps.href);\n            var _styles = getResourcesFromRoot(resourceRoot).hoistableStyles,\n              _resource = _styles.get(type);\n            if (\n              !_resource &&\n              ((resourceRoot = resourceRoot.ownerDocument || resourceRoot),\n              (_resource = {\n                type: \"stylesheet\",\n                instance: null,\n                count: 0,\n                state: { loading: NotLoaded, preload: null }\n              }),\n              _styles.set(type, _resource),\n              (_styles = resourceRoot.querySelector(\n                getStylesheetSelectorFromKey(type)\n              )) &&\n                !_styles._p &&\n                ((_resource.instance = _styles),\n                (_resource.state.loading = Loaded | Inserted)),\n              !preloadPropsMap.has(type))\n            ) {\n              var preloadProps = {\n                rel: \"preload\",\n                as: \"style\",\n                href: pendingProps.href,\n                crossOrigin: pendingProps.crossOrigin,\n                integrity: pendingProps.integrity,\n                media: pendingProps.media,\n                hrefLang: pendingProps.hrefLang,\n                referrerPolicy: pendingProps.referrerPolicy\n              };\n              preloadPropsMap.set(type, preloadProps);\n              _styles ||\n                preloadStylesheet(\n                  resourceRoot,\n                  type,\n                  preloadProps,\n                  _resource.state\n                );\n            }\n            if (currentProps && null === currentResource)\n              throw (\n                ((pendingProps =\n                  \"\\n\\n  - \" +\n                  describeLinkForResourceErrorDEV(currentProps) +\n                  \"\\n  + \" +\n                  describeLinkForResourceErrorDEV(pendingProps)),\n                Error(\n                  \"Expected <link> not to update to be updated to a stylesheet with precedence. Check the `rel`, `href`, and `precedence` props of this component. Alternatively, check whether two different <link> components render in the same slot or share the same key.\" +\n                    pendingProps\n                ))\n              );\n            return _resource;\n          }\n          if (currentProps && null !== currentResource)\n            throw (\n              ((pendingProps =\n                \"\\n\\n  - \" +\n                describeLinkForResourceErrorDEV(currentProps) +\n                \"\\n  + \" +\n                describeLinkForResourceErrorDEV(pendingProps)),\n              Error(\n                \"Expected stylesheet with precedence to not be updated to a different kind of <link>. Check the `rel`, `href`, and `precedence` props of this component. Alternatively, check whether two different <link> components render in the same slot or share the same key.\" +\n                  pendingProps\n              ))\n            );\n          return null;\n        case \"script\":\n          return (\n            (currentProps = pendingProps.async),\n            (pendingProps = pendingProps.src),\n            \"string\" === typeof pendingProps &&\n            currentProps &&\n            \"function\" !== typeof currentProps &&\n            \"symbol\" !== typeof currentProps\n              ? ((pendingProps = getScriptKey(pendingProps)),\n                (currentProps =\n                  getResourcesFromRoot(resourceRoot).hoistableScripts),\n                (currentResource = currentProps.get(pendingProps)),\n                currentResource ||\n                  ((currentResource = {\n                    type: \"script\",\n                    instance: null,\n                    count: 0,\n                    state: null\n                  }),\n                  currentProps.set(pendingProps, currentResource)),\n                currentResource)\n              : { type: \"void\", instance: null, count: 0, state: null }\n          );\n        default:\n          throw Error(\n            'getResource encountered a type it did not expect: \"' +\n              type +\n              '\". this is a bug in React.'\n          );\n      }\n    }\n    function describeLinkForResourceErrorDEV(props) {\n      var describedProps = 0,\n        description = \"<link\";\n      \"string\" === typeof props.rel\n        ? (describedProps++, (description += ' rel=\"' + props.rel + '\"'))\n        : hasOwnProperty.call(props, \"rel\") &&\n          (describedProps++,\n          (description +=\n            ' rel=\"' +\n            (null === props.rel ? \"null\" : \"invalid type \" + typeof props.rel) +\n            '\"'));\n      \"string\" === typeof props.href\n        ? (describedProps++, (description += ' href=\"' + props.href + '\"'))\n        : hasOwnProperty.call(props, \"href\") &&\n          (describedProps++,\n          (description +=\n            ' href=\"' +\n            (null === props.href\n              ? \"null\"\n              : \"invalid type \" + typeof props.href) +\n            '\"'));\n      \"string\" === typeof props.precedence\n        ? (describedProps++,\n          (description += ' precedence=\"' + props.precedence + '\"'))\n        : hasOwnProperty.call(props, \"precedence\") &&\n          (describedProps++,\n          (description +=\n            \" precedence={\" +\n            (null === props.precedence\n              ? \"null\"\n              : \"invalid type \" + typeof props.precedence) +\n            \"}\"));\n      Object.getOwnPropertyNames(props).length > describedProps &&\n        (description += \" ...\");\n      return description + \" />\";\n    }\n    function getStyleKey(href) {\n      return (\n        'href=\"' + escapeSelectorAttributeValueInsideDoubleQuotes(href) + '\"'\n      );\n    }\n    function getStylesheetSelectorFromKey(key) {\n      return 'link[rel=\"stylesheet\"][' + key + \"]\";\n    }\n    function stylesheetPropsFromRawProps(rawProps) {\n      return assign({}, rawProps, {\n        \"data-precedence\": rawProps.precedence,\n        precedence: null\n      });\n    }\n    function preloadStylesheet(ownerDocument, key, preloadProps, state) {\n      ownerDocument.querySelector(\n        'link[rel=\"preload\"][as=\"style\"][' + key + \"]\"\n      )\n        ? (state.loading = Loaded)\n        : ((key = ownerDocument.createElement(\"link\")),\n          (state.preload = key),\n          key.addEventListener(\"load\", function () {\n            return (state.loading |= Loaded);\n          }),\n          key.addEventListener(\"error\", function () {\n            return (state.loading |= Errored);\n          }),\n          setInitialProperties(key, \"link\", preloadProps),\n          markNodeAsHoistable(key),\n          ownerDocument.head.appendChild(key));\n    }\n    function getScriptKey(src) {\n      return (\n        '[src=\"' + escapeSelectorAttributeValueInsideDoubleQuotes(src) + '\"]'\n      );\n    }\n    function getScriptSelectorFromKey(key) {\n      return \"script[async]\" + key;\n    }\n    function acquireResource(hoistableRoot, resource, props) {\n      resource.count++;\n      if (null === resource.instance)\n        switch (resource.type) {\n          case \"style\":\n            var instance = hoistableRoot.querySelector(\n              'style[data-href~=\"' +\n                escapeSelectorAttributeValueInsideDoubleQuotes(props.href) +\n                '\"]'\n            );\n            if (instance)\n              return (\n                (resource.instance = instance),\n                markNodeAsHoistable(instance),\n                instance\n              );\n            var styleProps = assign({}, props, {\n              \"data-href\": props.href,\n              \"data-precedence\": props.precedence,\n              href: null,\n              precedence: null\n            });\n            instance = (\n              hoistableRoot.ownerDocument || hoistableRoot\n            ).createElement(\"style\");\n            markNodeAsHoistable(instance);\n            setInitialProperties(instance, \"style\", styleProps);\n            insertStylesheet(instance, props.precedence, hoistableRoot);\n            return (resource.instance = instance);\n          case \"stylesheet\":\n            styleProps = getStyleKey(props.href);\n            var _instance = hoistableRoot.querySelector(\n              getStylesheetSelectorFromKey(styleProps)\n            );\n            if (_instance)\n              return (\n                (resource.state.loading |= Inserted),\n                (resource.instance = _instance),\n                markNodeAsHoistable(_instance),\n                _instance\n              );\n            instance = stylesheetPropsFromRawProps(props);\n            (styleProps = preloadPropsMap.get(styleProps)) &&\n              adoptPreloadPropsForStylesheet(instance, styleProps);\n            _instance = (\n              hoistableRoot.ownerDocument || hoistableRoot\n            ).createElement(\"link\");\n            markNodeAsHoistable(_instance);\n            var linkInstance = _instance;\n            linkInstance._p = new Promise(function (resolve, reject) {\n              linkInstance.onload = resolve;\n              linkInstance.onerror = reject;\n            });\n            setInitialProperties(_instance, \"link\", instance);\n            resource.state.loading |= Inserted;\n            insertStylesheet(_instance, props.precedence, hoistableRoot);\n            return (resource.instance = _instance);\n          case \"script\":\n            _instance = getScriptKey(props.src);\n            if (\n              (styleProps = hoistableRoot.querySelector(\n                getScriptSelectorFromKey(_instance)\n              ))\n            )\n              return (\n                (resource.instance = styleProps),\n                markNodeAsHoistable(styleProps),\n                styleProps\n              );\n            instance = props;\n            if ((styleProps = preloadPropsMap.get(_instance)))\n              (instance = assign({}, props)),\n                adoptPreloadPropsForScript(instance, styleProps);\n            hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot;\n            styleProps = hoistableRoot.createElement(\"script\");\n            markNodeAsHoistable(styleProps);\n            setInitialProperties(styleProps, \"link\", instance);\n            hoistableRoot.head.appendChild(styleProps);\n            return (resource.instance = styleProps);\n          case \"void\":\n            return null;\n          default:\n            throw Error(\n              'acquireResource encountered a resource type it did not expect: \"' +\n                resource.type +\n                '\". this is a bug in React.'\n            );\n        }\n      else\n        \"stylesheet\" === resource.type &&\n          (resource.state.loading & Inserted) === NotLoaded &&\n          ((instance = resource.instance),\n          (resource.state.loading |= Inserted),\n          insertStylesheet(instance, props.precedence, hoistableRoot));\n      return resource.instance;\n    }\n    function insertStylesheet(instance, precedence, root) {\n      for (\n        var nodes = root.querySelectorAll(\n            'link[rel=\"stylesheet\"][data-precedence],style[data-precedence]'\n          ),\n          last = nodes.length ? nodes[nodes.length - 1] : null,\n          prior = last,\n          i = 0;\n        i < nodes.length;\n        i++\n      ) {\n        var node = nodes[i];\n        if (node.dataset.precedence === precedence) prior = node;\n        else if (prior !== last) break;\n      }\n      prior\n        ? prior.parentNode.insertBefore(instance, prior.nextSibling)\n        : ((precedence = 9 === root.nodeType ? root.head : root),\n          precedence.insertBefore(instance, precedence.firstChild));\n    }\n    function adoptPreloadPropsForStylesheet(stylesheetProps, preloadProps) {\n      null == stylesheetProps.crossOrigin &&\n        (stylesheetProps.crossOrigin = preloadProps.crossOrigin);\n      null == stylesheetProps.referrerPolicy &&\n        (stylesheetProps.referrerPolicy = preloadProps.referrerPolicy);\n      null == stylesheetProps.title &&\n        (stylesheetProps.title = preloadProps.title);\n    }\n    function adoptPreloadPropsForScript(scriptProps, preloadProps) {\n      null == scriptProps.crossOrigin &&\n        (scriptProps.crossOrigin = preloadProps.crossOrigin);\n      null == scriptProps.referrerPolicy &&\n        (scriptProps.referrerPolicy = preloadProps.referrerPolicy);\n      null == scriptProps.integrity &&\n        (scriptProps.integrity = preloadProps.integrity);\n    }\n    function getHydratableHoistableCache(type, keyAttribute, ownerDocument) {\n      if (null === tagCaches) {\n        var cache = new Map();\n        var caches = (tagCaches = new Map());\n        caches.set(ownerDocument, cache);\n      } else\n        (caches = tagCaches),\n          (cache = caches.get(ownerDocument)),\n          cache || ((cache = new Map()), caches.set(ownerDocument, cache));\n      if (cache.has(type)) return cache;\n      cache.set(type, null);\n      ownerDocument = ownerDocument.getElementsByTagName(type);\n      for (caches = 0; caches < ownerDocument.length; caches++) {\n        var node = ownerDocument[caches];\n        if (\n          !(\n            node[internalHoistableMarker] ||\n            node[internalInstanceKey] ||\n            (\"link\" === type && \"stylesheet\" === node.getAttribute(\"rel\"))\n          ) &&\n          node.namespaceURI !== SVG_NAMESPACE\n        ) {\n          var nodeKey = node.getAttribute(keyAttribute) || \"\";\n          nodeKey = type + nodeKey;\n          var existing = cache.get(nodeKey);\n          existing ? existing.push(node) : cache.set(nodeKey, [node]);\n        }\n      }\n      return cache;\n    }\n    function mountHoistable(hoistableRoot, type, instance) {\n      hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot;\n      hoistableRoot.head.insertBefore(\n        instance,\n        \"title\" === type ? hoistableRoot.querySelector(\"head > title\") : null\n      );\n    }\n    function isHostHoistableType(type, props, hostContext) {\n      var outsideHostContainerContext =\n        !hostContext.ancestorInfo.containerTagInScope;\n      if (\n        hostContext.context === HostContextNamespaceSvg ||\n        null != props.itemProp\n      )\n        return (\n          !outsideHostContainerContext ||\n            null == props.itemProp ||\n            (\"meta\" !== type &&\n              \"title\" !== type &&\n              \"style\" !== type &&\n              \"link\" !== type &&\n              \"script\" !== type) ||\n            console.error(\n              \"Cannot render a <%s> outside the main document if it has an `itemProp` prop. `itemProp` suggests the tag belongs to an `itemScope` which can appear anywhere in the DOM. If you were intending for React to hoist this <%s> remove the `itemProp` prop. Otherwise, try moving this tag into the <head> or <body> of the Document.\",\n              type,\n              type\n            ),\n          !1\n        );\n      switch (type) {\n        case \"meta\":\n        case \"title\":\n          return !0;\n        case \"style\":\n          if (\n            \"string\" !== typeof props.precedence ||\n            \"string\" !== typeof props.href ||\n            \"\" === props.href\n          ) {\n            outsideHostContainerContext &&\n              console.error(\n                'Cannot render a <style> outside the main document without knowing its precedence and a unique href key. React can hoist and deduplicate <style> tags if you provide a `precedence` prop along with an `href` prop that does not conflict with the `href` values used in any other hoisted <style> or <link rel=\"stylesheet\" ...> tags.  Note that hoisting <style> tags is considered an advanced feature that most will not use directly. Consider moving the <style> tag to the <head> or consider adding a `precedence=\"default\"` and `href=\"some unique resource identifier\"`.'\n              );\n            break;\n          }\n          return !0;\n        case \"link\":\n          if (\n            \"string\" !== typeof props.rel ||\n            \"string\" !== typeof props.href ||\n            \"\" === props.href ||\n            props.onLoad ||\n            props.onError\n          ) {\n            if (\n              \"stylesheet\" === props.rel &&\n              \"string\" === typeof props.precedence\n            ) {\n              type = props.href;\n              var onError = props.onError,\n                disabled = props.disabled;\n              hostContext = [];\n              props.onLoad && hostContext.push(\"`onLoad`\");\n              onError && hostContext.push(\"`onError`\");\n              null != disabled && hostContext.push(\"`disabled`\");\n              onError = propNamesListJoin(hostContext, \"and\");\n              onError += 1 === hostContext.length ? \" prop\" : \" props\";\n              disabled =\n                1 === hostContext.length ? \"an \" + onError : \"the \" + onError;\n              hostContext.length &&\n                console.error(\n                  'React encountered a <link rel=\"stylesheet\" href=\"%s\" ... /> with a `precedence` prop that also included %s. The presence of loading and error handlers indicates an intent to manage the stylesheet loading state from your from your Component code and React will not hoist or deduplicate this stylesheet. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop remove the %s, otherwise remove the `precedence` prop.',\n                  type,\n                  disabled,\n                  onError\n                );\n            }\n            outsideHostContainerContext &&\n              (\"string\" !== typeof props.rel ||\n              \"string\" !== typeof props.href ||\n              \"\" === props.href\n                ? console.error(\n                    \"Cannot render a <link> outside the main document without a `rel` and `href` prop. Try adding a `rel` and/or `href` prop to this <link> or moving the link into the <head> tag\"\n                  )\n                : (props.onError || props.onLoad) &&\n                  console.error(\n                    \"Cannot render a <link> with onLoad or onError listeners outside the main document. Try removing onLoad={...} and onError={...} or moving it into the root <head> tag or somewhere in the <body>.\"\n                  ));\n            break;\n          }\n          switch (props.rel) {\n            case \"stylesheet\":\n              return (\n                (type = props.precedence),\n                (props = props.disabled),\n                \"string\" !== typeof type &&\n                  outsideHostContainerContext &&\n                  console.error(\n                    'Cannot render a <link rel=\"stylesheet\" /> outside the main document without knowing its precedence. Consider adding precedence=\"default\" or moving it into the root <head> tag.'\n                  ),\n                \"string\" === typeof type && null == props\n              );\n            default:\n              return !0;\n          }\n        case \"script\":\n          type =\n            props.async &&\n            \"function\" !== typeof props.async &&\n            \"symbol\" !== typeof props.async;\n          if (\n            !type ||\n            props.onLoad ||\n            props.onError ||\n            !props.src ||\n            \"string\" !== typeof props.src\n          ) {\n            outsideHostContainerContext &&\n              (type\n                ? props.onLoad || props.onError\n                  ? console.error(\n                      \"Cannot render a <script> with onLoad or onError listeners outside the main document. Try removing onLoad={...} and onError={...} or moving it into the root <head> tag or somewhere in the <body>.\"\n                    )\n                  : console.error(\n                      \"Cannot render a <script> outside the main document without `async={true}` and a non-empty `src` prop. Ensure there is a valid `src` and either make the script async or move it into the root <head> tag or somewhere in the <body>.\"\n                    )\n                : console.error(\n                    'Cannot render a sync or defer <script> outside the main document without knowing its order. Try adding async=\"\" or moving it into the root <head> tag.'\n                  ));\n            break;\n          }\n          return !0;\n        case \"noscript\":\n        case \"template\":\n          outsideHostContainerContext &&\n            console.error(\n              \"Cannot render <%s> outside the main document. Try moving it into the root <head> tag.\",\n              type\n            );\n      }\n      return !1;\n    }\n    function preloadResource(resource) {\n      return \"stylesheet\" === resource.type &&\n        (resource.state.loading & Settled) === NotLoaded\n        ? !1\n        : !0;\n    }\n    function suspendResource(state, hoistableRoot, resource, props) {\n      if (\n        \"stylesheet\" === resource.type &&\n        (\"string\" !== typeof props.media ||\n          !1 !== matchMedia(props.media).matches) &&\n        (resource.state.loading & Inserted) === NotLoaded\n      ) {\n        if (null === resource.instance) {\n          var key = getStyleKey(props.href),\n            instance = hoistableRoot.querySelector(\n              getStylesheetSelectorFromKey(key)\n            );\n          if (instance) {\n            hoistableRoot = instance._p;\n            null !== hoistableRoot &&\n              \"object\" === typeof hoistableRoot &&\n              \"function\" === typeof hoistableRoot.then &&\n              (state.count++,\n              (state = onUnsuspend.bind(state)),\n              hoistableRoot.then(state, state));\n            resource.state.loading |= Inserted;\n            resource.instance = instance;\n            markNodeAsHoistable(instance);\n            return;\n          }\n          instance = hoistableRoot.ownerDocument || hoistableRoot;\n          props = stylesheetPropsFromRawProps(props);\n          (key = preloadPropsMap.get(key)) &&\n            adoptPreloadPropsForStylesheet(props, key);\n          instance = instance.createElement(\"link\");\n          markNodeAsHoistable(instance);\n          var linkInstance = instance;\n          linkInstance._p = new Promise(function (resolve, reject) {\n            linkInstance.onload = resolve;\n            linkInstance.onerror = reject;\n          });\n          setInitialProperties(instance, \"link\", props);\n          resource.instance = instance;\n        }\n        null === state.stylesheets && (state.stylesheets = new Map());\n        state.stylesheets.set(resource, hoistableRoot);\n        (hoistableRoot = resource.state.preload) &&\n          (resource.state.loading & Settled) === NotLoaded &&\n          (state.count++,\n          (resource = onUnsuspend.bind(state)),\n          hoistableRoot.addEventListener(\"load\", resource),\n          hoistableRoot.addEventListener(\"error\", resource));\n      }\n    }\n    function waitForCommitToBeReady(state, timeoutOffset) {\n      state.stylesheets &&\n        0 === state.count &&\n        insertSuspendedStylesheets(state, state.stylesheets);\n      return 0 < state.count || 0 < state.imgCount\n        ? function (commit) {\n            var stylesheetTimer = setTimeout(function () {\n              state.stylesheets &&\n                insertSuspendedStylesheets(state, state.stylesheets);\n              if (state.unsuspend) {\n                var unsuspend = state.unsuspend;\n                state.unsuspend = null;\n                unsuspend();\n              }\n            }, SUSPENSEY_STYLESHEET_TIMEOUT + timeoutOffset);\n            0 < state.imgBytes &&\n              0 === estimatedBytesWithinLimit &&\n              (estimatedBytesWithinLimit =\n                125 * estimateBandwidth() * SUSPENSEY_IMAGE_TIME_ESTIMATE);\n            var imgTimer = setTimeout(\n              function () {\n                state.waitingForImages = !1;\n                if (\n                  0 === state.count &&\n                  (state.stylesheets &&\n                    insertSuspendedStylesheets(state, state.stylesheets),\n                  state.unsuspend)\n                ) {\n                  var unsuspend = state.unsuspend;\n                  state.unsuspend = null;\n                  unsuspend();\n                }\n              },\n              (state.imgBytes > estimatedBytesWithinLimit\n                ? 50\n                : SUSPENSEY_IMAGE_TIMEOUT) + timeoutOffset\n            );\n            state.unsuspend = commit;\n            return function () {\n              state.unsuspend = null;\n              clearTimeout(stylesheetTimer);\n              clearTimeout(imgTimer);\n            };\n          }\n        : null;\n    }\n    function onUnsuspend() {\n      this.count--;\n      if (0 === this.count && (0 === this.imgCount || !this.waitingForImages))\n        if (this.stylesheets)\n          insertSuspendedStylesheets(this, this.stylesheets);\n        else if (this.unsuspend) {\n          var unsuspend = this.unsuspend;\n          this.unsuspend = null;\n          unsuspend();\n        }\n    }\n    function insertSuspendedStylesheets(state, resources) {\n      state.stylesheets = null;\n      null !== state.unsuspend &&\n        (state.count++,\n        (precedencesByRoot = new Map()),\n        resources.forEach(insertStylesheetIntoRoot, state),\n        (precedencesByRoot = null),\n        onUnsuspend.call(state));\n    }\n    function insertStylesheetIntoRoot(root, resource) {\n      if (!(resource.state.loading & Inserted)) {\n        var precedences = precedencesByRoot.get(root);\n        if (precedences) var last = precedences.get(LAST_PRECEDENCE);\n        else {\n          precedences = new Map();\n          precedencesByRoot.set(root, precedences);\n          for (\n            var nodes = root.querySelectorAll(\n                \"link[data-precedence],style[data-precedence]\"\n              ),\n              i = 0;\n            i < nodes.length;\n            i++\n          ) {\n            var node = nodes[i];\n            if (\n              \"LINK\" === node.nodeName ||\n              \"not all\" !== node.getAttribute(\"media\")\n            )\n              precedences.set(node.dataset.precedence, node), (last = node);\n          }\n          last && precedences.set(LAST_PRECEDENCE, last);\n        }\n        nodes = resource.instance;\n        node = nodes.getAttribute(\"data-precedence\");\n        i = precedences.get(node) || last;\n        i === last && precedences.set(LAST_PRECEDENCE, nodes);\n        precedences.set(node, nodes);\n        this.count++;\n        last = onUnsuspend.bind(this);\n        nodes.addEventListener(\"load\", last);\n        nodes.addEventListener(\"error\", last);\n        i\n          ? i.parentNode.insertBefore(nodes, i.nextSibling)\n          : ((root = 9 === root.nodeType ? root.head : root),\n            root.insertBefore(nodes, root.firstChild));\n        resource.state.loading |= Inserted;\n      }\n    }\n    function FiberRootNode(\n      containerInfo,\n      tag,\n      hydrate,\n      identifierPrefix,\n      onUncaughtError,\n      onCaughtError,\n      onRecoverableError,\n      onDefaultTransitionIndicator,\n      formState\n    ) {\n      this.tag = 1;\n      this.containerInfo = containerInfo;\n      this.pingCache = this.current = this.pendingChildren = null;\n      this.timeoutHandle = noTimeout;\n      this.callbackNode =\n        this.next =\n        this.pendingContext =\n        this.context =\n        this.cancelPendingCommit =\n          null;\n      this.callbackPriority = 0;\n      this.expirationTimes = createLaneMap(-1);\n      this.entangledLanes =\n        this.shellSuspendCounter =\n        this.errorRecoveryDisabledLanes =\n        this.expiredLanes =\n        this.warmLanes =\n        this.pingedLanes =\n        this.suspendedLanes =\n        this.pendingLanes =\n          0;\n      this.entanglements = createLaneMap(0);\n      this.hiddenUpdates = createLaneMap(null);\n      this.identifierPrefix = identifierPrefix;\n      this.onUncaughtError = onUncaughtError;\n      this.onCaughtError = onCaughtError;\n      this.onRecoverableError = onRecoverableError;\n      this.pooledCache = null;\n      this.pooledCacheLanes = 0;\n      this.formState = formState;\n      this.incompleteTransitions = new Map();\n      this.passiveEffectDuration = this.effectDuration = -0;\n      this.memoizedUpdaters = new Set();\n      containerInfo = this.pendingUpdatersLaneMap = [];\n      for (tag = 0; 31 > tag; tag++) containerInfo.push(new Set());\n      this._debugRootType = hydrate ? \"hydrateRoot()\" : \"createRoot()\";\n    }\n    function createFiberRoot(\n      containerInfo,\n      tag,\n      hydrate,\n      initialChildren,\n      hydrationCallbacks,\n      isStrictMode,\n      identifierPrefix,\n      formState,\n      onUncaughtError,\n      onCaughtError,\n      onRecoverableError,\n      onDefaultTransitionIndicator\n    ) {\n      containerInfo = new FiberRootNode(\n        containerInfo,\n        tag,\n        hydrate,\n        identifierPrefix,\n        onUncaughtError,\n        onCaughtError,\n        onRecoverableError,\n        onDefaultTransitionIndicator,\n        formState\n      );\n      tag = ConcurrentMode;\n      !0 === isStrictMode && (tag |= StrictLegacyMode | StrictEffectsMode);\n      tag |= ProfileMode;\n      isStrictMode = createFiber(3, null, null, tag);\n      containerInfo.current = isStrictMode;\n      isStrictMode.stateNode = containerInfo;\n      tag = createCache();\n      retainCache(tag);\n      containerInfo.pooledCache = tag;\n      retainCache(tag);\n      isStrictMode.memoizedState = {\n        element: initialChildren,\n        isDehydrated: hydrate,\n        cache: tag\n      };\n      initializeUpdateQueue(isStrictMode);\n      return containerInfo;\n    }\n    function getContextForSubtree(parentComponent) {\n      if (!parentComponent) return emptyContextObject;\n      parentComponent = emptyContextObject;\n      return parentComponent;\n    }\n    function updateContainerImpl(\n      rootFiber,\n      lane,\n      element,\n      container,\n      parentComponent,\n      callback\n    ) {\n      if (\n        injectedHook &&\n        \"function\" === typeof injectedHook.onScheduleFiberRoot\n      )\n        try {\n          injectedHook.onScheduleFiberRoot(rendererID, container, element);\n        } catch (err) {\n          hasLoggedError ||\n            ((hasLoggedError = !0),\n            console.error(\n              \"React instrumentation encountered an error: %o\",\n              err\n            ));\n        }\n      parentComponent = getContextForSubtree(parentComponent);\n      null === container.context\n        ? (container.context = parentComponent)\n        : (container.pendingContext = parentComponent);\n      isRendering &&\n        null !== current &&\n        !didWarnAboutNestedUpdates &&\n        ((didWarnAboutNestedUpdates = !0),\n        console.error(\n          \"Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate.\\n\\nCheck the render method of %s.\",\n          getComponentNameFromFiber(current) || \"Unknown\"\n        ));\n      container = createUpdate(lane);\n      container.payload = { element: element };\n      callback = void 0 === callback ? null : callback;\n      null !== callback &&\n        (\"function\" !== typeof callback &&\n          console.error(\n            \"Expected the last optional `callback` argument to be a function. Instead received: %s.\",\n            callback\n          ),\n        (container.callback = callback));\n      element = enqueueUpdate(rootFiber, container, lane);\n      null !== element &&\n        (startUpdateTimerByLane(lane, \"root.render()\", null),\n        scheduleUpdateOnFiber(element, rootFiber, lane),\n        entangleTransitions(element, rootFiber, lane));\n    }\n    function markRetryLaneImpl(fiber, retryLane) {\n      fiber = fiber.memoizedState;\n      if (null !== fiber && null !== fiber.dehydrated) {\n        var a = fiber.retryLane;\n        fiber.retryLane = 0 !== a && a < retryLane ? a : retryLane;\n      }\n    }\n    function markRetryLaneIfNotHydrated(fiber, retryLane) {\n      markRetryLaneImpl(fiber, retryLane);\n      (fiber = fiber.alternate) && markRetryLaneImpl(fiber, retryLane);\n    }\n    function attemptContinuousHydration(fiber) {\n      if (13 === fiber.tag || 31 === fiber.tag) {\n        var root = enqueueConcurrentRenderForLane(fiber, 67108864);\n        null !== root && scheduleUpdateOnFiber(root, fiber, 67108864);\n        markRetryLaneIfNotHydrated(fiber, 67108864);\n      }\n    }\n    function attemptHydrationAtCurrentPriority(fiber) {\n      if (13 === fiber.tag || 31 === fiber.tag) {\n        var lane = requestUpdateLane(fiber);\n        lane = getBumpedLaneForHydrationByLane(lane);\n        var root = enqueueConcurrentRenderForLane(fiber, lane);\n        null !== root && scheduleUpdateOnFiber(root, fiber, lane);\n        markRetryLaneIfNotHydrated(fiber, lane);\n      }\n    }\n    function getCurrentFiberForDevTools() {\n      return current;\n    }\n    function dispatchDiscreteEvent(\n      domEventName,\n      eventSystemFlags,\n      container,\n      nativeEvent\n    ) {\n      var prevTransition = ReactSharedInternals.T;\n      ReactSharedInternals.T = null;\n      var previousPriority = ReactDOMSharedInternals.p;\n      try {\n        (ReactDOMSharedInternals.p = DiscreteEventPriority),\n          dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent);\n      } finally {\n        (ReactDOMSharedInternals.p = previousPriority),\n          (ReactSharedInternals.T = prevTransition);\n      }\n    }\n    function dispatchContinuousEvent(\n      domEventName,\n      eventSystemFlags,\n      container,\n      nativeEvent\n    ) {\n      var prevTransition = ReactSharedInternals.T;\n      ReactSharedInternals.T = null;\n      var previousPriority = ReactDOMSharedInternals.p;\n      try {\n        (ReactDOMSharedInternals.p = ContinuousEventPriority),\n          dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent);\n      } finally {\n        (ReactDOMSharedInternals.p = previousPriority),\n          (ReactSharedInternals.T = prevTransition);\n      }\n    }\n    function dispatchEvent(\n      domEventName,\n      eventSystemFlags,\n      targetContainer,\n      nativeEvent\n    ) {\n      if (_enabled) {\n        var blockedOn = findInstanceBlockingEvent(nativeEvent);\n        if (null === blockedOn)\n          dispatchEventForPluginEventSystem(\n            domEventName,\n            eventSystemFlags,\n            nativeEvent,\n            return_targetInst,\n            targetContainer\n          ),\n            clearIfContinuousEvent(domEventName, nativeEvent);\n        else if (\n          queueIfContinuousEvent(\n            blockedOn,\n            domEventName,\n            eventSystemFlags,\n            targetContainer,\n            nativeEvent\n          )\n        )\n          nativeEvent.stopPropagation();\n        else if (\n          (clearIfContinuousEvent(domEventName, nativeEvent),\n          eventSystemFlags & 4 &&\n            -1 < discreteReplayableEvents.indexOf(domEventName))\n        ) {\n          for (; null !== blockedOn; ) {\n            var fiber = getInstanceFromNode(blockedOn);\n            if (null !== fiber)\n              switch (fiber.tag) {\n                case 3:\n                  fiber = fiber.stateNode;\n                  if (fiber.current.memoizedState.isDehydrated) {\n                    var lanes = getHighestPriorityLanes(fiber.pendingLanes);\n                    if (0 !== lanes) {\n                      var root = fiber;\n                      root.pendingLanes |= 2;\n                      for (root.entangledLanes |= 2; lanes; ) {\n                        var lane = 1 << (31 - clz32(lanes));\n                        root.entanglements[1] |= lane;\n                        lanes &= ~lane;\n                      }\n                      ensureRootIsScheduled(fiber);\n                      (executionContext & (RenderContext | CommitContext)) ===\n                        NoContext &&\n                        ((workInProgressRootRenderTargetTime =\n                          now$1() + RENDER_TIMEOUT_MS),\n                        flushSyncWorkAcrossRoots_impl(0, !1));\n                    }\n                  }\n                  break;\n                case 31:\n                case 13:\n                  (root = enqueueConcurrentRenderForLane(fiber, 2)),\n                    null !== root && scheduleUpdateOnFiber(root, fiber, 2),\n                    flushSyncWork$1(),\n                    markRetryLaneIfNotHydrated(fiber, 2);\n              }\n            fiber = findInstanceBlockingEvent(nativeEvent);\n            null === fiber &&\n              dispatchEventForPluginEventSystem(\n                domEventName,\n                eventSystemFlags,\n                nativeEvent,\n                return_targetInst,\n                targetContainer\n              );\n            if (fiber === blockedOn) break;\n            blockedOn = fiber;\n          }\n          null !== blockedOn && nativeEvent.stopPropagation();\n        } else\n          dispatchEventForPluginEventSystem(\n            domEventName,\n            eventSystemFlags,\n            nativeEvent,\n            null,\n            targetContainer\n          );\n      }\n    }\n    function findInstanceBlockingEvent(nativeEvent) {\n      nativeEvent = getEventTarget(nativeEvent);\n      return findInstanceBlockingTarget(nativeEvent);\n    }\n    function findInstanceBlockingTarget(targetNode) {\n      return_targetInst = null;\n      targetNode = getClosestInstanceFromNode(targetNode);\n      if (null !== targetNode) {\n        var nearestMounted = getNearestMountedFiber(targetNode);\n        if (null === nearestMounted) targetNode = null;\n        else {\n          var tag = nearestMounted.tag;\n          if (13 === tag) {\n            targetNode = getSuspenseInstanceFromFiber(nearestMounted);\n            if (null !== targetNode) return targetNode;\n            targetNode = null;\n          } else if (31 === tag) {\n            targetNode = getActivityInstanceFromFiber(nearestMounted);\n            if (null !== targetNode) return targetNode;\n            targetNode = null;\n          } else if (3 === tag) {\n            if (nearestMounted.stateNode.current.memoizedState.isDehydrated)\n              return 3 === nearestMounted.tag\n                ? nearestMounted.stateNode.containerInfo\n                : null;\n            targetNode = null;\n          } else nearestMounted !== targetNode && (targetNode = null);\n        }\n      }\n      return_targetInst = targetNode;\n      return null;\n    }\n    function getEventPriority(domEventName) {\n      switch (domEventName) {\n        case \"beforetoggle\":\n        case \"cancel\":\n        case \"click\":\n        case \"close\":\n        case \"contextmenu\":\n        case \"copy\":\n        case \"cut\":\n        case \"auxclick\":\n        case \"dblclick\":\n        case \"dragend\":\n        case \"dragstart\":\n        case \"drop\":\n        case \"focusin\":\n        case \"focusout\":\n        case \"input\":\n        case \"invalid\":\n        case \"keydown\":\n        case \"keypress\":\n        case \"keyup\":\n        case \"mousedown\":\n        case \"mouseup\":\n        case \"paste\":\n        case \"pause\":\n        case \"play\":\n        case \"pointercancel\":\n        case \"pointerdown\":\n        case \"pointerup\":\n        case \"ratechange\":\n        case \"reset\":\n        case \"resize\":\n        case \"seeked\":\n        case \"submit\":\n        case \"toggle\":\n        case \"touchcancel\":\n        case \"touchend\":\n        case \"touchstart\":\n        case \"volumechange\":\n        case \"change\":\n        case \"selectionchange\":\n        case \"textInput\":\n        case \"compositionstart\":\n        case \"compositionend\":\n        case \"compositionupdate\":\n        case \"beforeblur\":\n        case \"afterblur\":\n        case \"beforeinput\":\n        case \"blur\":\n        case \"fullscreenchange\":\n        case \"focus\":\n        case \"hashchange\":\n        case \"popstate\":\n        case \"select\":\n        case \"selectstart\":\n          return DiscreteEventPriority;\n        case \"drag\":\n        case \"dragenter\":\n        case \"dragexit\":\n        case \"dragleave\":\n        case \"dragover\":\n        case \"mousemove\":\n        case \"mouseout\":\n        case \"mouseover\":\n        case \"pointermove\":\n        case \"pointerout\":\n        case \"pointerover\":\n        case \"scroll\":\n        case \"touchmove\":\n        case \"wheel\":\n        case \"mouseenter\":\n        case \"mouseleave\":\n        case \"pointerenter\":\n        case \"pointerleave\":\n          return ContinuousEventPriority;\n        case \"message\":\n          switch (getCurrentPriorityLevel()) {\n            case ImmediatePriority:\n              return DiscreteEventPriority;\n            case UserBlockingPriority:\n              return ContinuousEventPriority;\n            case NormalPriority$1:\n            case LowPriority:\n              return DefaultEventPriority;\n            case IdlePriority:\n              return IdleEventPriority;\n            default:\n              return DefaultEventPriority;\n          }\n        default:\n          return DefaultEventPriority;\n      }\n    }\n    function clearIfContinuousEvent(domEventName, nativeEvent) {\n      switch (domEventName) {\n        case \"focusin\":\n        case \"focusout\":\n          queuedFocus = null;\n          break;\n        case \"dragenter\":\n        case \"dragleave\":\n          queuedDrag = null;\n          break;\n        case \"mouseover\":\n        case \"mouseout\":\n          queuedMouse = null;\n          break;\n        case \"pointerover\":\n        case \"pointerout\":\n          queuedPointers.delete(nativeEvent.pointerId);\n          break;\n        case \"gotpointercapture\":\n        case \"lostpointercapture\":\n          queuedPointerCaptures.delete(nativeEvent.pointerId);\n      }\n    }\n    function accumulateOrCreateContinuousQueuedReplayableEvent(\n      existingQueuedEvent,\n      blockedOn,\n      domEventName,\n      eventSystemFlags,\n      targetContainer,\n      nativeEvent\n    ) {\n      if (\n        null === existingQueuedEvent ||\n        existingQueuedEvent.nativeEvent !== nativeEvent\n      )\n        return (\n          (existingQueuedEvent = {\n            blockedOn: blockedOn,\n            domEventName: domEventName,\n            eventSystemFlags: eventSystemFlags,\n            nativeEvent: nativeEvent,\n            targetContainers: [targetContainer]\n          }),\n          null !== blockedOn &&\n            ((blockedOn = getInstanceFromNode(blockedOn)),\n            null !== blockedOn && attemptContinuousHydration(blockedOn)),\n          existingQueuedEvent\n        );\n      existingQueuedEvent.eventSystemFlags |= eventSystemFlags;\n      blockedOn = existingQueuedEvent.targetContainers;\n      null !== targetContainer &&\n        -1 === blockedOn.indexOf(targetContainer) &&\n        blockedOn.push(targetContainer);\n      return existingQueuedEvent;\n    }\n    function queueIfContinuousEvent(\n      blockedOn,\n      domEventName,\n      eventSystemFlags,\n      targetContainer,\n      nativeEvent\n    ) {\n      switch (domEventName) {\n        case \"focusin\":\n          return (\n            (queuedFocus = accumulateOrCreateContinuousQueuedReplayableEvent(\n              queuedFocus,\n              blockedOn,\n              domEventName,\n              eventSystemFlags,\n              targetContainer,\n              nativeEvent\n            )),\n            !0\n          );\n        case \"dragenter\":\n          return (\n            (queuedDrag = accumulateOrCreateContinuousQueuedReplayableEvent(\n              queuedDrag,\n              blockedOn,\n              domEventName,\n              eventSystemFlags,\n              targetContainer,\n              nativeEvent\n            )),\n            !0\n          );\n        case \"mouseover\":\n          return (\n            (queuedMouse = accumulateOrCreateContinuousQueuedReplayableEvent(\n              queuedMouse,\n              blockedOn,\n              domEventName,\n              eventSystemFlags,\n              targetContainer,\n              nativeEvent\n            )),\n            !0\n          );\n        case \"pointerover\":\n          var pointerId = nativeEvent.pointerId;\n          queuedPointers.set(\n            pointerId,\n            accumulateOrCreateContinuousQueuedReplayableEvent(\n              queuedPointers.get(pointerId) || null,\n              blockedOn,\n              domEventName,\n              eventSystemFlags,\n              targetContainer,\n              nativeEvent\n            )\n          );\n          return !0;\n        case \"gotpointercapture\":\n          return (\n            (pointerId = nativeEvent.pointerId),\n            queuedPointerCaptures.set(\n              pointerId,\n              accumulateOrCreateContinuousQueuedReplayableEvent(\n                queuedPointerCaptures.get(pointerId) || null,\n                blockedOn,\n                domEventName,\n                eventSystemFlags,\n                targetContainer,\n                nativeEvent\n              )\n            ),\n            !0\n          );\n      }\n      return !1;\n    }\n    function attemptExplicitHydrationTarget(queuedTarget) {\n      var targetInst = getClosestInstanceFromNode(queuedTarget.target);\n      if (null !== targetInst) {\n        var nearestMounted = getNearestMountedFiber(targetInst);\n        if (null !== nearestMounted)\n          if (((targetInst = nearestMounted.tag), 13 === targetInst)) {\n            if (\n              ((targetInst = getSuspenseInstanceFromFiber(nearestMounted)),\n              null !== targetInst)\n            ) {\n              queuedTarget.blockedOn = targetInst;\n              runWithPriority(queuedTarget.priority, function () {\n                attemptHydrationAtCurrentPriority(nearestMounted);\n              });\n              return;\n            }\n          } else if (31 === targetInst) {\n            if (\n              ((targetInst = getActivityInstanceFromFiber(nearestMounted)),\n              null !== targetInst)\n            ) {\n              queuedTarget.blockedOn = targetInst;\n              runWithPriority(queuedTarget.priority, function () {\n                attemptHydrationAtCurrentPriority(nearestMounted);\n              });\n              return;\n            }\n          } else if (\n            3 === targetInst &&\n            nearestMounted.stateNode.current.memoizedState.isDehydrated\n          ) {\n            queuedTarget.blockedOn =\n              3 === nearestMounted.tag\n                ? nearestMounted.stateNode.containerInfo\n                : null;\n            return;\n          }\n      }\n      queuedTarget.blockedOn = null;\n    }\n    function attemptReplayContinuousQueuedEvent(queuedEvent) {\n      if (null !== queuedEvent.blockedOn) return !1;\n      for (\n        var targetContainers = queuedEvent.targetContainers;\n        0 < targetContainers.length;\n\n      ) {\n        var nextBlockedOn = findInstanceBlockingEvent(queuedEvent.nativeEvent);\n        if (null === nextBlockedOn) {\n          nextBlockedOn = queuedEvent.nativeEvent;\n          var nativeEventClone = new nextBlockedOn.constructor(\n              nextBlockedOn.type,\n              nextBlockedOn\n            ),\n            event = nativeEventClone;\n          null !== currentReplayingEvent &&\n            console.error(\n              \"Expected currently replaying event to be null. This error is likely caused by a bug in React. Please file an issue.\"\n            );\n          currentReplayingEvent = event;\n          nextBlockedOn.target.dispatchEvent(nativeEventClone);\n          null === currentReplayingEvent &&\n            console.error(\n              \"Expected currently replaying event to not be null. This error is likely caused by a bug in React. Please file an issue.\"\n            );\n          currentReplayingEvent = null;\n        } else\n          return (\n            (targetContainers = getInstanceFromNode(nextBlockedOn)),\n            null !== targetContainers &&\n              attemptContinuousHydration(targetContainers),\n            (queuedEvent.blockedOn = nextBlockedOn),\n            !1\n          );\n        targetContainers.shift();\n      }\n      return !0;\n    }\n    function attemptReplayContinuousQueuedEventInMap(queuedEvent, key, map) {\n      attemptReplayContinuousQueuedEvent(queuedEvent) && map.delete(key);\n    }\n    function replayUnblockedEvents() {\n      hasScheduledReplayAttempt = !1;\n      null !== queuedFocus &&\n        attemptReplayContinuousQueuedEvent(queuedFocus) &&\n        (queuedFocus = null);\n      null !== queuedDrag &&\n        attemptReplayContinuousQueuedEvent(queuedDrag) &&\n        (queuedDrag = null);\n      null !== queuedMouse &&\n        attemptReplayContinuousQueuedEvent(queuedMouse) &&\n        (queuedMouse = null);\n      queuedPointers.forEach(attemptReplayContinuousQueuedEventInMap);\n      queuedPointerCaptures.forEach(attemptReplayContinuousQueuedEventInMap);\n    }\n    function scheduleCallbackIfUnblocked(queuedEvent, unblocked) {\n      queuedEvent.blockedOn === unblocked &&\n        ((queuedEvent.blockedOn = null),\n        hasScheduledReplayAttempt ||\n          ((hasScheduledReplayAttempt = !0),\n          Scheduler.unstable_scheduleCallback(\n            Scheduler.unstable_NormalPriority,\n            replayUnblockedEvents\n          )));\n    }\n    function scheduleReplayQueueIfNeeded(formReplayingQueue) {\n      lastScheduledReplayQueue !== formReplayingQueue &&\n        ((lastScheduledReplayQueue = formReplayingQueue),\n        Scheduler.unstable_scheduleCallback(\n          Scheduler.unstable_NormalPriority,\n          function () {\n            lastScheduledReplayQueue === formReplayingQueue &&\n              (lastScheduledReplayQueue = null);\n            for (var i = 0; i < formReplayingQueue.length; i += 3) {\n              var form = formReplayingQueue[i],\n                submitterOrAction = formReplayingQueue[i + 1],\n                formData = formReplayingQueue[i + 2];\n              if (\"function\" !== typeof submitterOrAction)\n                if (\n                  null === findInstanceBlockingTarget(submitterOrAction || form)\n                )\n                  continue;\n                else break;\n              var formInst = getInstanceFromNode(form);\n              null !== formInst &&\n                (formReplayingQueue.splice(i, 3),\n                (i -= 3),\n                (form = {\n                  pending: !0,\n                  data: formData,\n                  method: form.method,\n                  action: submitterOrAction\n                }),\n                Object.freeze(form),\n                startHostTransition(\n                  formInst,\n                  form,\n                  submitterOrAction,\n                  formData\n                ));\n            }\n          }\n        ));\n    }\n    function retryIfBlockedOn(unblocked) {\n      function unblock(queuedEvent) {\n        return scheduleCallbackIfUnblocked(queuedEvent, unblocked);\n      }\n      null !== queuedFocus &&\n        scheduleCallbackIfUnblocked(queuedFocus, unblocked);\n      null !== queuedDrag && scheduleCallbackIfUnblocked(queuedDrag, unblocked);\n      null !== queuedMouse &&\n        scheduleCallbackIfUnblocked(queuedMouse, unblocked);\n      queuedPointers.forEach(unblock);\n      queuedPointerCaptures.forEach(unblock);\n      for (var i = 0; i < queuedExplicitHydrationTargets.length; i++) {\n        var queuedTarget = queuedExplicitHydrationTargets[i];\n        queuedTarget.blockedOn === unblocked && (queuedTarget.blockedOn = null);\n      }\n      for (\n        ;\n        0 < queuedExplicitHydrationTargets.length &&\n        ((i = queuedExplicitHydrationTargets[0]), null === i.blockedOn);\n\n      )\n        attemptExplicitHydrationTarget(i),\n          null === i.blockedOn && queuedExplicitHydrationTargets.shift();\n      i = (unblocked.ownerDocument || unblocked).$$reactFormReplay;\n      if (null != i)\n        for (queuedTarget = 0; queuedTarget < i.length; queuedTarget += 3) {\n          var form = i[queuedTarget],\n            submitterOrAction = i[queuedTarget + 1],\n            formProps = form[internalPropsKey] || null;\n          if (\"function\" === typeof submitterOrAction)\n            formProps || scheduleReplayQueueIfNeeded(i);\n          else if (formProps) {\n            var action = null;\n            if (\n              submitterOrAction &&\n              submitterOrAction.hasAttribute(\"formAction\")\n            )\n              if (\n                ((form = submitterOrAction),\n                (formProps = submitterOrAction[internalPropsKey] || null))\n              )\n                action = formProps.formAction;\n              else {\n                if (null !== findInstanceBlockingTarget(form)) continue;\n              }\n            else action = formProps.action;\n            \"function\" === typeof action\n              ? (i[queuedTarget + 1] = action)\n              : (i.splice(queuedTarget, 3), (queuedTarget -= 3));\n            scheduleReplayQueueIfNeeded(i);\n          }\n        }\n    }\n    function defaultOnDefaultTransitionIndicator() {\n      function handleNavigate(event) {\n        event.canIntercept &&\n          \"react-transition\" === event.info &&\n          event.intercept({\n            handler: function () {\n              return new Promise(function (resolve) {\n                return (pendingResolve = resolve);\n              });\n            },\n            focusReset: \"manual\",\n            scroll: \"manual\"\n          });\n      }\n      function handleNavigateComplete() {\n        null !== pendingResolve && (pendingResolve(), (pendingResolve = null));\n        isCancelled || setTimeout(startFakeNavigation, 20);\n      }\n      function startFakeNavigation() {\n        if (!isCancelled && !navigation.transition) {\n          var currentEntry = navigation.currentEntry;\n          currentEntry &&\n            null != currentEntry.url &&\n            navigation.navigate(currentEntry.url, {\n              state: currentEntry.getState(),\n              info: \"react-transition\",\n              history: \"replace\"\n            });\n        }\n      }\n      if (\"object\" === typeof navigation) {\n        var isCancelled = !1,\n          pendingResolve = null;\n        navigation.addEventListener(\"navigate\", handleNavigate);\n        navigation.addEventListener(\"navigatesuccess\", handleNavigateComplete);\n        navigation.addEventListener(\"navigateerror\", handleNavigateComplete);\n        setTimeout(startFakeNavigation, 100);\n        return function () {\n          isCancelled = !0;\n          navigation.removeEventListener(\"navigate\", handleNavigate);\n          navigation.removeEventListener(\n            \"navigatesuccess\",\n            handleNavigateComplete\n          );\n          navigation.removeEventListener(\n            \"navigateerror\",\n            handleNavigateComplete\n          );\n          null !== pendingResolve &&\n            (pendingResolve(), (pendingResolve = null));\n        };\n      }\n    }\n    function ReactDOMRoot(internalRoot) {\n      this._internalRoot = internalRoot;\n    }\n    function ReactDOMHydrationRoot(internalRoot) {\n      this._internalRoot = internalRoot;\n    }\n    function warnIfReactDOMContainerInDEV(container) {\n      container[internalContainerInstanceKey] &&\n        (container._reactRootContainer\n          ? console.error(\n              \"You are calling ReactDOMClient.createRoot() on a container that was previously passed to ReactDOM.render(). This is not supported.\"\n            )\n          : console.error(\n              \"You are calling ReactDOMClient.createRoot() on a container that has already been passed to createRoot() before. Instead, call root.render() on the existing root instead if you want to update it.\"\n            ));\n    }\n    \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n      \"function\" ===\n        typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&\n      __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());\n    var Scheduler = require(\"scheduler\"),\n      React = require(\"react\"),\n      ReactDOM = require(\"react-dom\"),\n      assign = Object.assign,\n      REACT_LEGACY_ELEMENT_TYPE = Symbol.for(\"react.element\"),\n      REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n      REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n      REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n      REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n      REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n      REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n      REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n      REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n      REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n      REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n      REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n      REACT_LAZY_TYPE = Symbol.for(\"react.lazy\");\n    Symbol.for(\"react.scope\");\n    var REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\");\n    Symbol.for(\"react.legacy_hidden\");\n    Symbol.for(\"react.tracing_marker\");\n    var REACT_MEMO_CACHE_SENTINEL = Symbol.for(\"react.memo_cache_sentinel\");\n    Symbol.for(\"react.view_transition\");\n    var MAYBE_ITERATOR_SYMBOL = Symbol.iterator,\n      REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\"),\n      isArrayImpl = Array.isArray,\n      ReactSharedInternals =\n        React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,\n      ReactDOMSharedInternals =\n        ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,\n      NotPending = Object.freeze({\n        pending: !1,\n        data: null,\n        method: null,\n        action: null\n      }),\n      valueStack = [];\n    var fiberStack = [];\n    var index$jscomp$0 = -1,\n      contextStackCursor = createCursor(null),\n      contextFiberStackCursor = createCursor(null),\n      rootInstanceStackCursor = createCursor(null),\n      hostTransitionProviderCursor = createCursor(null),\n      disabledDepth = 0,\n      prevLog,\n      prevInfo,\n      prevWarn,\n      prevError,\n      prevGroup,\n      prevGroupCollapsed,\n      prevGroupEnd;\n    disabledLog.__reactDisabledLog = !0;\n    var prefix,\n      suffix,\n      reentry = !1;\n    var componentFrameCache = new (\n      \"function\" === typeof WeakMap ? WeakMap : Map\n    )();\n    var current = null,\n      isRendering = !1,\n      hasOwnProperty = Object.prototype.hasOwnProperty,\n      scheduleCallback$3 = Scheduler.unstable_scheduleCallback,\n      cancelCallback$1 = Scheduler.unstable_cancelCallback,\n      shouldYield = Scheduler.unstable_shouldYield,\n      requestPaint = Scheduler.unstable_requestPaint,\n      now$1 = Scheduler.unstable_now,\n      getCurrentPriorityLevel = Scheduler.unstable_getCurrentPriorityLevel,\n      ImmediatePriority = Scheduler.unstable_ImmediatePriority,\n      UserBlockingPriority = Scheduler.unstable_UserBlockingPriority,\n      NormalPriority$1 = Scheduler.unstable_NormalPriority,\n      LowPriority = Scheduler.unstable_LowPriority,\n      IdlePriority = Scheduler.unstable_IdlePriority,\n      log$1 = Scheduler.log,\n      unstable_setDisableYieldValue = Scheduler.unstable_setDisableYieldValue,\n      rendererID = null,\n      injectedHook = null,\n      hasLoggedError = !1,\n      isDevToolsPresent = \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__,\n      clz32 = Math.clz32 ? Math.clz32 : clz32Fallback,\n      log = Math.log,\n      LN2 = Math.LN2,\n      nextTransitionUpdateLane = 256,\n      nextTransitionDeferredLane = 262144,\n      nextRetryLane = 4194304,\n      DiscreteEventPriority = 2,\n      ContinuousEventPriority = 8,\n      DefaultEventPriority = 32,\n      IdleEventPriority = 268435456,\n      randomKey = Math.random().toString(36).slice(2),\n      internalInstanceKey = \"__reactFiber$\" + randomKey,\n      internalPropsKey = \"__reactProps$\" + randomKey,\n      internalContainerInstanceKey = \"__reactContainer$\" + randomKey,\n      internalEventHandlersKey = \"__reactEvents$\" + randomKey,\n      internalEventHandlerListenersKey = \"__reactListeners$\" + randomKey,\n      internalEventHandlesSetKey = \"__reactHandles$\" + randomKey,\n      internalRootNodeResourcesKey = \"__reactResources$\" + randomKey,\n      internalHoistableMarker = \"__reactMarker$\" + randomKey,\n      allNativeEvents = new Set(),\n      registrationNameDependencies = {},\n      possibleRegistrationNames = {},\n      hasReadOnlyValue = {\n        button: !0,\n        checkbox: !0,\n        image: !0,\n        hidden: !0,\n        radio: !0,\n        reset: !0,\n        submit: !0\n      },\n      VALID_ATTRIBUTE_NAME_REGEX = RegExp(\n        \"^[:A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD][:A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040]*$\"\n      ),\n      illegalAttributeNameCache = {},\n      validatedAttributeNameCache = {},\n      escapeSelectorAttributeValueInsideDoubleQuotesRegex = /[\\n\"\\\\]/g,\n      didWarnValueDefaultValue$1 = !1,\n      didWarnCheckedDefaultChecked = !1,\n      didWarnSelectedSetOnOption = !1,\n      didWarnInvalidChild = !1,\n      didWarnInvalidInnerHTML = !1;\n    var didWarnValueDefaultValue = !1;\n    var valuePropNames = [\"value\", \"defaultValue\"],\n      didWarnValDefaultVal = !1,\n      needsEscaping = /[\"'&<>\\n\\t]|^\\s|\\s$/,\n      specialTags =\n        \"address applet area article aside base basefont bgsound blockquote body br button caption center col colgroup dd details dir div dl dt embed fieldset figcaption figure footer form frame frameset h1 h2 h3 h4 h5 h6 head header hgroup hr html iframe img input isindex li link listing main marquee menu menuitem meta nav noembed noframes noscript object ol p param plaintext pre script section select source style summary table tbody td template textarea tfoot th thead title tr track ul wbr xmp\".split(\n          \" \"\n        ),\n      inScopeTags =\n        \"applet caption html table td th marquee object template foreignObject desc title\".split(\n          \" \"\n        ),\n      buttonScopeTags = inScopeTags.concat([\"button\"]),\n      impliedEndTags = \"dd dt li option optgroup p rp rt\".split(\" \"),\n      emptyAncestorInfoDev = {\n        current: null,\n        formTag: null,\n        aTagInScope: null,\n        buttonTagInScope: null,\n        nobrTagInScope: null,\n        pTagInButtonScope: null,\n        listItemTagAutoclosing: null,\n        dlItemTagAutoclosing: null,\n        containerTagInScope: null,\n        implicitRootScope: !1\n      },\n      didWarn = {},\n      shorthandToLonghand = {\n        animation:\n          \"animationDelay animationDirection animationDuration animationFillMode animationIterationCount animationName animationPlayState animationTimingFunction\".split(\n            \" \"\n          ),\n        background:\n          \"backgroundAttachment backgroundClip backgroundColor backgroundImage backgroundOrigin backgroundPositionX backgroundPositionY backgroundRepeat backgroundSize\".split(\n            \" \"\n          ),\n        backgroundPosition: [\"backgroundPositionX\", \"backgroundPositionY\"],\n        border:\n          \"borderBottomColor borderBottomStyle borderBottomWidth borderImageOutset borderImageRepeat borderImageSlice borderImageSource borderImageWidth borderLeftColor borderLeftStyle borderLeftWidth borderRightColor borderRightStyle borderRightWidth borderTopColor borderTopStyle borderTopWidth\".split(\n            \" \"\n          ),\n        borderBlockEnd: [\n          \"borderBlockEndColor\",\n          \"borderBlockEndStyle\",\n          \"borderBlockEndWidth\"\n        ],\n        borderBlockStart: [\n          \"borderBlockStartColor\",\n          \"borderBlockStartStyle\",\n          \"borderBlockStartWidth\"\n        ],\n        borderBottom: [\n          \"borderBottomColor\",\n          \"borderBottomStyle\",\n          \"borderBottomWidth\"\n        ],\n        borderColor: [\n          \"borderBottomColor\",\n          \"borderLeftColor\",\n          \"borderRightColor\",\n          \"borderTopColor\"\n        ],\n        borderImage: [\n          \"borderImageOutset\",\n          \"borderImageRepeat\",\n          \"borderImageSlice\",\n          \"borderImageSource\",\n          \"borderImageWidth\"\n        ],\n        borderInlineEnd: [\n          \"borderInlineEndColor\",\n          \"borderInlineEndStyle\",\n          \"borderInlineEndWidth\"\n        ],\n        borderInlineStart: [\n          \"borderInlineStartColor\",\n          \"borderInlineStartStyle\",\n          \"borderInlineStartWidth\"\n        ],\n        borderLeft: [\"borderLeftColor\", \"borderLeftStyle\", \"borderLeftWidth\"],\n        borderRadius: [\n          \"borderBottomLeftRadius\",\n          \"borderBottomRightRadius\",\n          \"borderTopLeftRadius\",\n          \"borderTopRightRadius\"\n        ],\n        borderRight: [\n          \"borderRightColor\",\n          \"borderRightStyle\",\n          \"borderRightWidth\"\n        ],\n        borderStyle: [\n          \"borderBottomStyle\",\n          \"borderLeftStyle\",\n          \"borderRightStyle\",\n          \"borderTopStyle\"\n        ],\n        borderTop: [\"borderTopColor\", \"borderTopStyle\", \"borderTopWidth\"],\n        borderWidth: [\n          \"borderBottomWidth\",\n          \"borderLeftWidth\",\n          \"borderRightWidth\",\n          \"borderTopWidth\"\n        ],\n        columnRule: [\"columnRuleColor\", \"columnRuleStyle\", \"columnRuleWidth\"],\n        columns: [\"columnCount\", \"columnWidth\"],\n        flex: [\"flexBasis\", \"flexGrow\", \"flexShrink\"],\n        flexFlow: [\"flexDirection\", \"flexWrap\"],\n        font: \"fontFamily fontFeatureSettings fontKerning fontLanguageOverride fontSize fontSizeAdjust fontStretch fontStyle fontVariant fontVariantAlternates fontVariantCaps fontVariantEastAsian fontVariantLigatures fontVariantNumeric fontVariantPosition fontWeight lineHeight\".split(\n          \" \"\n        ),\n        fontVariant:\n          \"fontVariantAlternates fontVariantCaps fontVariantEastAsian fontVariantLigatures fontVariantNumeric fontVariantPosition\".split(\n            \" \"\n          ),\n        gap: [\"columnGap\", \"rowGap\"],\n        grid: \"gridAutoColumns gridAutoFlow gridAutoRows gridTemplateAreas gridTemplateColumns gridTemplateRows\".split(\n          \" \"\n        ),\n        gridArea: [\n          \"gridColumnEnd\",\n          \"gridColumnStart\",\n          \"gridRowEnd\",\n          \"gridRowStart\"\n        ],\n        gridColumn: [\"gridColumnEnd\", \"gridColumnStart\"],\n        gridColumnGap: [\"columnGap\"],\n        gridGap: [\"columnGap\", \"rowGap\"],\n        gridRow: [\"gridRowEnd\", \"gridRowStart\"],\n        gridRowGap: [\"rowGap\"],\n        gridTemplate: [\n          \"gridTemplateAreas\",\n          \"gridTemplateColumns\",\n          \"gridTemplateRows\"\n        ],\n        listStyle: [\"listStyleImage\", \"listStylePosition\", \"listStyleType\"],\n        margin: [\"marginBottom\", \"marginLeft\", \"marginRight\", \"marginTop\"],\n        marker: [\"markerEnd\", \"markerMid\", \"markerStart\"],\n        mask: \"maskClip maskComposite maskImage maskMode maskOrigin maskPositionX maskPositionY maskRepeat maskSize\".split(\n          \" \"\n        ),\n        maskPosition: [\"maskPositionX\", \"maskPositionY\"],\n        outline: [\"outlineColor\", \"outlineStyle\", \"outlineWidth\"],\n        overflow: [\"overflowX\", \"overflowY\"],\n        padding: [\"paddingBottom\", \"paddingLeft\", \"paddingRight\", \"paddingTop\"],\n        placeContent: [\"alignContent\", \"justifyContent\"],\n        placeItems: [\"alignItems\", \"justifyItems\"],\n        placeSelf: [\"alignSelf\", \"justifySelf\"],\n        textDecoration: [\n          \"textDecorationColor\",\n          \"textDecorationLine\",\n          \"textDecorationStyle\"\n        ],\n        textEmphasis: [\"textEmphasisColor\", \"textEmphasisStyle\"],\n        transition: [\n          \"transitionDelay\",\n          \"transitionDuration\",\n          \"transitionProperty\",\n          \"transitionTimingFunction\"\n        ],\n        wordWrap: [\"overflowWrap\"]\n      },\n      uppercasePattern = /([A-Z])/g,\n      msPattern$1 = /^ms-/,\n      badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/,\n      msPattern = /^-ms-/,\n      hyphenPattern = /-(.)/g,\n      badStyleValueWithSemicolonPattern = /;\\s*$/,\n      warnedStyleNames = {},\n      warnedStyleValues = {},\n      warnedForNaNValue = !1,\n      warnedForInfinityValue = !1,\n      unitlessNumbers = new Set(\n        \"animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp\".split(\n          \" \"\n        )\n      ),\n      MATH_NAMESPACE = \"http://www.w3.org/1998/Math/MathML\",\n      SVG_NAMESPACE = \"http://www.w3.org/2000/svg\",\n      aliases = new Map([\n        [\"acceptCharset\", \"accept-charset\"],\n        [\"htmlFor\", \"for\"],\n        [\"httpEquiv\", \"http-equiv\"],\n        [\"crossOrigin\", \"crossorigin\"],\n        [\"accentHeight\", \"accent-height\"],\n        [\"alignmentBaseline\", \"alignment-baseline\"],\n        [\"arabicForm\", \"arabic-form\"],\n        [\"baselineShift\", \"baseline-shift\"],\n        [\"capHeight\", \"cap-height\"],\n        [\"clipPath\", \"clip-path\"],\n        [\"clipRule\", \"clip-rule\"],\n        [\"colorInterpolation\", \"color-interpolation\"],\n        [\"colorInterpolationFilters\", \"color-interpolation-filters\"],\n        [\"colorProfile\", \"color-profile\"],\n        [\"colorRendering\", \"color-rendering\"],\n        [\"dominantBaseline\", \"dominant-baseline\"],\n        [\"enableBackground\", \"enable-background\"],\n        [\"fillOpacity\", \"fill-opacity\"],\n        [\"fillRule\", \"fill-rule\"],\n        [\"floodColor\", \"flood-color\"],\n        [\"floodOpacity\", \"flood-opacity\"],\n        [\"fontFamily\", \"font-family\"],\n        [\"fontSize\", \"font-size\"],\n        [\"fontSizeAdjust\", \"font-size-adjust\"],\n        [\"fontStretch\", \"font-stretch\"],\n        [\"fontStyle\", \"font-style\"],\n        [\"fontVariant\", \"font-variant\"],\n        [\"fontWeight\", \"font-weight\"],\n        [\"glyphName\", \"glyph-name\"],\n        [\"glyphOrientationHorizontal\", \"glyph-orientation-horizontal\"],\n        [\"glyphOrientationVertical\", \"glyph-orientation-vertical\"],\n        [\"horizAdvX\", \"horiz-adv-x\"],\n        [\"horizOriginX\", \"horiz-origin-x\"],\n        [\"imageRendering\", \"image-rendering\"],\n        [\"letterSpacing\", \"letter-spacing\"],\n        [\"lightingColor\", \"lighting-color\"],\n        [\"markerEnd\", \"marker-end\"],\n        [\"markerMid\", \"marker-mid\"],\n        [\"markerStart\", \"marker-start\"],\n        [\"overlinePosition\", \"overline-position\"],\n        [\"overlineThickness\", \"overline-thickness\"],\n        [\"paintOrder\", \"paint-order\"],\n        [\"panose-1\", \"panose-1\"],\n        [\"pointerEvents\", \"pointer-events\"],\n        [\"renderingIntent\", \"rendering-intent\"],\n        [\"shapeRendering\", \"shape-rendering\"],\n        [\"stopColor\", \"stop-color\"],\n        [\"stopOpacity\", \"stop-opacity\"],\n        [\"strikethroughPosition\", \"strikethrough-position\"],\n        [\"strikethroughThickness\", \"strikethrough-thickness\"],\n        [\"strokeDasharray\", \"stroke-dasharray\"],\n        [\"strokeDashoffset\", \"stroke-dashoffset\"],\n        [\"strokeLinecap\", \"stroke-linecap\"],\n        [\"strokeLinejoin\", \"stroke-linejoin\"],\n        [\"strokeMiterlimit\", \"stroke-miterlimit\"],\n        [\"strokeOpacity\", \"stroke-opacity\"],\n        [\"strokeWidth\", \"stroke-width\"],\n        [\"textAnchor\", \"text-anchor\"],\n        [\"textDecoration\", \"text-decoration\"],\n        [\"textRendering\", \"text-rendering\"],\n        [\"transformOrigin\", \"transform-origin\"],\n        [\"underlinePosition\", \"underline-position\"],\n        [\"underlineThickness\", \"underline-thickness\"],\n        [\"unicodeBidi\", \"unicode-bidi\"],\n        [\"unicodeRange\", \"unicode-range\"],\n        [\"unitsPerEm\", \"units-per-em\"],\n        [\"vAlphabetic\", \"v-alphabetic\"],\n        [\"vHanging\", \"v-hanging\"],\n        [\"vIdeographic\", \"v-ideographic\"],\n        [\"vMathematical\", \"v-mathematical\"],\n        [\"vectorEffect\", \"vector-effect\"],\n        [\"vertAdvY\", \"vert-adv-y\"],\n        [\"vertOriginX\", \"vert-origin-x\"],\n        [\"vertOriginY\", \"vert-origin-y\"],\n        [\"wordSpacing\", \"word-spacing\"],\n        [\"writingMode\", \"writing-mode\"],\n        [\"xmlnsXlink\", \"xmlns:xlink\"],\n        [\"xHeight\", \"x-height\"]\n      ]),\n      possibleStandardNames = {\n        accept: \"accept\",\n        acceptcharset: \"acceptCharset\",\n        \"accept-charset\": \"acceptCharset\",\n        accesskey: \"accessKey\",\n        action: \"action\",\n        allowfullscreen: \"allowFullScreen\",\n        alt: \"alt\",\n        as: \"as\",\n        async: \"async\",\n        autocapitalize: \"autoCapitalize\",\n        autocomplete: \"autoComplete\",\n        autocorrect: \"autoCorrect\",\n        autofocus: \"autoFocus\",\n        autoplay: \"autoPlay\",\n        autosave: \"autoSave\",\n        capture: \"capture\",\n        cellpadding: \"cellPadding\",\n        cellspacing: \"cellSpacing\",\n        challenge: \"challenge\",\n        charset: \"charSet\",\n        checked: \"checked\",\n        children: \"children\",\n        cite: \"cite\",\n        class: \"className\",\n        classid: \"classID\",\n        classname: \"className\",\n        cols: \"cols\",\n        colspan: \"colSpan\",\n        content: \"content\",\n        contenteditable: \"contentEditable\",\n        contextmenu: \"contextMenu\",\n        controls: \"controls\",\n        controlslist: \"controlsList\",\n        coords: \"coords\",\n        crossorigin: \"crossOrigin\",\n        dangerouslysetinnerhtml: \"dangerouslySetInnerHTML\",\n        data: \"data\",\n        datetime: \"dateTime\",\n        default: \"default\",\n        defaultchecked: \"defaultChecked\",\n        defaultvalue: \"defaultValue\",\n        defer: \"defer\",\n        dir: \"dir\",\n        disabled: \"disabled\",\n        disablepictureinpicture: \"disablePictureInPicture\",\n        disableremoteplayback: \"disableRemotePlayback\",\n        download: \"download\",\n        draggable: \"draggable\",\n        enctype: \"encType\",\n        enterkeyhint: \"enterKeyHint\",\n        fetchpriority: \"fetchPriority\",\n        for: \"htmlFor\",\n        form: \"form\",\n        formmethod: \"formMethod\",\n        formaction: \"formAction\",\n        formenctype: \"formEncType\",\n        formnovalidate: \"formNoValidate\",\n        formtarget: \"formTarget\",\n        frameborder: \"frameBorder\",\n        headers: \"headers\",\n        height: \"height\",\n        hidden: \"hidden\",\n        high: \"high\",\n        href: \"href\",\n        hreflang: \"hrefLang\",\n        htmlfor: \"htmlFor\",\n        httpequiv: \"httpEquiv\",\n        \"http-equiv\": \"httpEquiv\",\n        icon: \"icon\",\n        id: \"id\",\n        imagesizes: \"imageSizes\",\n        imagesrcset: \"imageSrcSet\",\n        inert: \"inert\",\n        innerhtml: \"innerHTML\",\n        inputmode: \"inputMode\",\n        integrity: \"integrity\",\n        is: \"is\",\n        itemid: \"itemID\",\n        itemprop: \"itemProp\",\n        itemref: \"itemRef\",\n        itemscope: \"itemScope\",\n        itemtype: \"itemType\",\n        keyparams: \"keyParams\",\n        keytype: \"keyType\",\n        kind: \"kind\",\n        label: \"label\",\n        lang: \"lang\",\n        list: \"list\",\n        loop: \"loop\",\n        low: \"low\",\n        manifest: \"manifest\",\n        marginwidth: \"marginWidth\",\n        marginheight: \"marginHeight\",\n        max: \"max\",\n        maxlength: \"maxLength\",\n        media: \"media\",\n        mediagroup: \"mediaGroup\",\n        method: \"method\",\n        min: \"min\",\n        minlength: \"minLength\",\n        multiple: \"multiple\",\n        muted: \"muted\",\n        name: \"name\",\n        nomodule: \"noModule\",\n        nonce: \"nonce\",\n        novalidate: \"noValidate\",\n        open: \"open\",\n        optimum: \"optimum\",\n        pattern: \"pattern\",\n        placeholder: \"placeholder\",\n        playsinline: \"playsInline\",\n        poster: \"poster\",\n        preload: \"preload\",\n        profile: \"profile\",\n        radiogroup: \"radioGroup\",\n        readonly: \"readOnly\",\n        referrerpolicy: \"referrerPolicy\",\n        rel: \"rel\",\n        required: \"required\",\n        reversed: \"reversed\",\n        role: \"role\",\n        rows: \"rows\",\n        rowspan: \"rowSpan\",\n        sandbox: \"sandbox\",\n        scope: \"scope\",\n        scoped: \"scoped\",\n        scrolling: \"scrolling\",\n        seamless: \"seamless\",\n        selected: \"selected\",\n        shape: \"shape\",\n        size: \"size\",\n        sizes: \"sizes\",\n        span: \"span\",\n        spellcheck: \"spellCheck\",\n        src: \"src\",\n        srcdoc: \"srcDoc\",\n        srclang: \"srcLang\",\n        srcset: \"srcSet\",\n        start: \"start\",\n        step: \"step\",\n        style: \"style\",\n        summary: \"summary\",\n        tabindex: \"tabIndex\",\n        target: \"target\",\n        title: \"title\",\n        type: \"type\",\n        usemap: \"useMap\",\n        value: \"value\",\n        width: \"width\",\n        wmode: \"wmode\",\n        wrap: \"wrap\",\n        about: \"about\",\n        accentheight: \"accentHeight\",\n        \"accent-height\": \"accentHeight\",\n        accumulate: \"accumulate\",\n        additive: \"additive\",\n        alignmentbaseline: \"alignmentBaseline\",\n        \"alignment-baseline\": \"alignmentBaseline\",\n        allowreorder: \"allowReorder\",\n        alphabetic: \"alphabetic\",\n        amplitude: \"amplitude\",\n        arabicform: \"arabicForm\",\n        \"arabic-form\": \"arabicForm\",\n        ascent: \"ascent\",\n        attributename: \"attributeName\",\n        attributetype: \"attributeType\",\n        autoreverse: \"autoReverse\",\n        azimuth: \"azimuth\",\n        basefrequency: \"baseFrequency\",\n        baselineshift: \"baselineShift\",\n        \"baseline-shift\": \"baselineShift\",\n        baseprofile: \"baseProfile\",\n        bbox: \"bbox\",\n        begin: \"begin\",\n        bias: \"bias\",\n        by: \"by\",\n        calcmode: \"calcMode\",\n        capheight: \"capHeight\",\n        \"cap-height\": \"capHeight\",\n        clip: \"clip\",\n        clippath: \"clipPath\",\n        \"clip-path\": \"clipPath\",\n        clippathunits: \"clipPathUnits\",\n        cliprule: \"clipRule\",\n        \"clip-rule\": \"clipRule\",\n        color: \"color\",\n        colorinterpolation: \"colorInterpolation\",\n        \"color-interpolation\": \"colorInterpolation\",\n        colorinterpolationfilters: \"colorInterpolationFilters\",\n        \"color-interpolation-filters\": \"colorInterpolationFilters\",\n        colorprofile: \"colorProfile\",\n        \"color-profile\": \"colorProfile\",\n        colorrendering: \"colorRendering\",\n        \"color-rendering\": \"colorRendering\",\n        contentscripttype: \"contentScriptType\",\n        contentstyletype: \"contentStyleType\",\n        cursor: \"cursor\",\n        cx: \"cx\",\n        cy: \"cy\",\n        d: \"d\",\n        datatype: \"datatype\",\n        decelerate: \"decelerate\",\n        descent: \"descent\",\n        diffuseconstant: \"diffuseConstant\",\n        direction: \"direction\",\n        display: \"display\",\n        divisor: \"divisor\",\n        dominantbaseline: \"dominantBaseline\",\n        \"dominant-baseline\": \"dominantBaseline\",\n        dur: \"dur\",\n        dx: \"dx\",\n        dy: \"dy\",\n        edgemode: \"edgeMode\",\n        elevation: \"elevation\",\n        enablebackground: \"enableBackground\",\n        \"enable-background\": \"enableBackground\",\n        end: \"end\",\n        exponent: \"exponent\",\n        externalresourcesrequired: \"externalResourcesRequired\",\n        fill: \"fill\",\n        fillopacity: \"fillOpacity\",\n        \"fill-opacity\": \"fillOpacity\",\n        fillrule: \"fillRule\",\n        \"fill-rule\": \"fillRule\",\n        filter: \"filter\",\n        filterres: \"filterRes\",\n        filterunits: \"filterUnits\",\n        floodopacity: \"floodOpacity\",\n        \"flood-opacity\": \"floodOpacity\",\n        floodcolor: \"floodColor\",\n        \"flood-color\": \"floodColor\",\n        focusable: \"focusable\",\n        fontfamily: \"fontFamily\",\n        \"font-family\": \"fontFamily\",\n        fontsize: \"fontSize\",\n        \"font-size\": \"fontSize\",\n        fontsizeadjust: \"fontSizeAdjust\",\n        \"font-size-adjust\": \"fontSizeAdjust\",\n        fontstretch: \"fontStretch\",\n        \"font-stretch\": \"fontStretch\",\n        fontstyle: \"fontStyle\",\n        \"font-style\": \"fontStyle\",\n        fontvariant: \"fontVariant\",\n        \"font-variant\": \"fontVariant\",\n        fontweight: \"fontWeight\",\n        \"font-weight\": \"fontWeight\",\n        format: \"format\",\n        from: \"from\",\n        fx: \"fx\",\n        fy: \"fy\",\n        g1: \"g1\",\n        g2: \"g2\",\n        glyphname: \"glyphName\",\n        \"glyph-name\": \"glyphName\",\n        glyphorientationhorizontal: \"glyphOrientationHorizontal\",\n        \"glyph-orientation-horizontal\": \"glyphOrientationHorizontal\",\n        glyphorientationvertical: \"glyphOrientationVertical\",\n        \"glyph-orientation-vertical\": \"glyphOrientationVertical\",\n        glyphref: \"glyphRef\",\n        gradienttransform: \"gradientTransform\",\n        gradientunits: \"gradientUnits\",\n        hanging: \"hanging\",\n        horizadvx: \"horizAdvX\",\n        \"horiz-adv-x\": \"horizAdvX\",\n        horizoriginx: \"horizOriginX\",\n        \"horiz-origin-x\": \"horizOriginX\",\n        ideographic: \"ideographic\",\n        imagerendering: \"imageRendering\",\n        \"image-rendering\": \"imageRendering\",\n        in2: \"in2\",\n        in: \"in\",\n        inlist: \"inlist\",\n        intercept: \"intercept\",\n        k1: \"k1\",\n        k2: \"k2\",\n        k3: \"k3\",\n        k4: \"k4\",\n        k: \"k\",\n        kernelmatrix: \"kernelMatrix\",\n        kernelunitlength: \"kernelUnitLength\",\n        kerning: \"kerning\",\n        keypoints: \"keyPoints\",\n        keysplines: \"keySplines\",\n        keytimes: \"keyTimes\",\n        lengthadjust: \"lengthAdjust\",\n        letterspacing: \"letterSpacing\",\n        \"letter-spacing\": \"letterSpacing\",\n        lightingcolor: \"lightingColor\",\n        \"lighting-color\": \"lightingColor\",\n        limitingconeangle: \"limitingConeAngle\",\n        local: \"local\",\n        markerend: \"markerEnd\",\n        \"marker-end\": \"markerEnd\",\n        markerheight: \"markerHeight\",\n        markermid: \"markerMid\",\n        \"marker-mid\": \"markerMid\",\n        markerstart: \"markerStart\",\n        \"marker-start\": \"markerStart\",\n        markerunits: \"markerUnits\",\n        markerwidth: \"markerWidth\",\n        mask: \"mask\",\n        maskcontentunits: \"maskContentUnits\",\n        maskunits: \"maskUnits\",\n        mathematical: \"mathematical\",\n        mode: \"mode\",\n        numoctaves: \"numOctaves\",\n        offset: \"offset\",\n        opacity: \"opacity\",\n        operator: \"operator\",\n        order: \"order\",\n        orient: \"orient\",\n        orientation: \"orientation\",\n        origin: \"origin\",\n        overflow: \"overflow\",\n        overlineposition: \"overlinePosition\",\n        \"overline-position\": \"overlinePosition\",\n        overlinethickness: \"overlineThickness\",\n        \"overline-thickness\": \"overlineThickness\",\n        paintorder: \"paintOrder\",\n        \"paint-order\": \"paintOrder\",\n        panose1: \"panose1\",\n        \"panose-1\": \"panose1\",\n        pathlength: \"pathLength\",\n        patterncontentunits: \"patternContentUnits\",\n        patterntransform: \"patternTransform\",\n        patternunits: \"patternUnits\",\n        pointerevents: \"pointerEvents\",\n        \"pointer-events\": \"pointerEvents\",\n        points: \"points\",\n        pointsatx: \"pointsAtX\",\n        pointsaty: \"pointsAtY\",\n        pointsatz: \"pointsAtZ\",\n        popover: \"popover\",\n        popovertarget: \"popoverTarget\",\n        popovertargetaction: \"popoverTargetAction\",\n        prefix: \"prefix\",\n        preservealpha: \"preserveAlpha\",\n        preserveaspectratio: \"preserveAspectRatio\",\n        primitiveunits: \"primitiveUnits\",\n        property: \"property\",\n        r: \"r\",\n        radius: \"radius\",\n        refx: \"refX\",\n        refy: \"refY\",\n        renderingintent: \"renderingIntent\",\n        \"rendering-intent\": \"renderingIntent\",\n        repeatcount: \"repeatCount\",\n        repeatdur: \"repeatDur\",\n        requiredextensions: \"requiredExtensions\",\n        requiredfeatures: \"requiredFeatures\",\n        resource: \"resource\",\n        restart: \"restart\",\n        result: \"result\",\n        results: \"results\",\n        rotate: \"rotate\",\n        rx: \"rx\",\n        ry: \"ry\",\n        scale: \"scale\",\n        security: \"security\",\n        seed: \"seed\",\n        shaperendering: \"shapeRendering\",\n        \"shape-rendering\": \"shapeRendering\",\n        slope: \"slope\",\n        spacing: \"spacing\",\n        specularconstant: \"specularConstant\",\n        specularexponent: \"specularExponent\",\n        speed: \"speed\",\n        spreadmethod: \"spreadMethod\",\n        startoffset: \"startOffset\",\n        stddeviation: \"stdDeviation\",\n        stemh: \"stemh\",\n        stemv: \"stemv\",\n        stitchtiles: \"stitchTiles\",\n        stopcolor: \"stopColor\",\n        \"stop-color\": \"stopColor\",\n        stopopacity: \"stopOpacity\",\n        \"stop-opacity\": \"stopOpacity\",\n        strikethroughposition: \"strikethroughPosition\",\n        \"strikethrough-position\": \"strikethroughPosition\",\n        strikethroughthickness: \"strikethroughThickness\",\n        \"strikethrough-thickness\": \"strikethroughThickness\",\n        string: \"string\",\n        stroke: \"stroke\",\n        strokedasharray: \"strokeDasharray\",\n        \"stroke-dasharray\": \"strokeDasharray\",\n        strokedashoffset: \"strokeDashoffset\",\n        \"stroke-dashoffset\": \"strokeDashoffset\",\n        strokelinecap: \"strokeLinecap\",\n        \"stroke-linecap\": \"strokeLinecap\",\n        strokelinejoin: \"strokeLinejoin\",\n        \"stroke-linejoin\": \"strokeLinejoin\",\n        strokemiterlimit: \"strokeMiterlimit\",\n        \"stroke-miterlimit\": \"strokeMiterlimit\",\n        strokewidth: \"strokeWidth\",\n        \"stroke-width\": \"strokeWidth\",\n        strokeopacity: \"strokeOpacity\",\n        \"stroke-opacity\": \"strokeOpacity\",\n        suppresscontenteditablewarning: \"suppressContentEditableWarning\",\n        suppresshydrationwarning: \"suppressHydrationWarning\",\n        surfacescale: \"surfaceScale\",\n        systemlanguage: \"systemLanguage\",\n        tablevalues: \"tableValues\",\n        targetx: \"targetX\",\n        targety: \"targetY\",\n        textanchor: \"textAnchor\",\n        \"text-anchor\": \"textAnchor\",\n        textdecoration: \"textDecoration\",\n        \"text-decoration\": \"textDecoration\",\n        textlength: \"textLength\",\n        textrendering: \"textRendering\",\n        \"text-rendering\": \"textRendering\",\n        to: \"to\",\n        transform: \"transform\",\n        transformorigin: \"transformOrigin\",\n        \"transform-origin\": \"transformOrigin\",\n        typeof: \"typeof\",\n        u1: \"u1\",\n        u2: \"u2\",\n        underlineposition: \"underlinePosition\",\n        \"underline-position\": \"underlinePosition\",\n        underlinethickness: \"underlineThickness\",\n        \"underline-thickness\": \"underlineThickness\",\n        unicode: \"unicode\",\n        unicodebidi: \"unicodeBidi\",\n        \"unicode-bidi\": \"unicodeBidi\",\n        unicoderange: \"unicodeRange\",\n        \"unicode-range\": \"unicodeRange\",\n        unitsperem: \"unitsPerEm\",\n        \"units-per-em\": \"unitsPerEm\",\n        unselectable: \"unselectable\",\n        valphabetic: \"vAlphabetic\",\n        \"v-alphabetic\": \"vAlphabetic\",\n        values: \"values\",\n        vectoreffect: \"vectorEffect\",\n        \"vector-effect\": \"vectorEffect\",\n        version: \"version\",\n        vertadvy: \"vertAdvY\",\n        \"vert-adv-y\": \"vertAdvY\",\n        vertoriginx: \"vertOriginX\",\n        \"vert-origin-x\": \"vertOriginX\",\n        vertoriginy: \"vertOriginY\",\n        \"vert-origin-y\": \"vertOriginY\",\n        vhanging: \"vHanging\",\n        \"v-hanging\": \"vHanging\",\n        videographic: \"vIdeographic\",\n        \"v-ideographic\": \"vIdeographic\",\n        viewbox: \"viewBox\",\n        viewtarget: \"viewTarget\",\n        visibility: \"visibility\",\n        vmathematical: \"vMathematical\",\n        \"v-mathematical\": \"vMathematical\",\n        vocab: \"vocab\",\n        widths: \"widths\",\n        wordspacing: \"wordSpacing\",\n        \"word-spacing\": \"wordSpacing\",\n        writingmode: \"writingMode\",\n        \"writing-mode\": \"writingMode\",\n        x1: \"x1\",\n        x2: \"x2\",\n        x: \"x\",\n        xchannelselector: \"xChannelSelector\",\n        xheight: \"xHeight\",\n        \"x-height\": \"xHeight\",\n        xlinkactuate: \"xlinkActuate\",\n        \"xlink:actuate\": \"xlinkActuate\",\n        xlinkarcrole: \"xlinkArcrole\",\n        \"xlink:arcrole\": \"xlinkArcrole\",\n        xlinkhref: \"xlinkHref\",\n        \"xlink:href\": \"xlinkHref\",\n        xlinkrole: \"xlinkRole\",\n        \"xlink:role\": \"xlinkRole\",\n        xlinkshow: \"xlinkShow\",\n        \"xlink:show\": \"xlinkShow\",\n        xlinktitle: \"xlinkTitle\",\n        \"xlink:title\": \"xlinkTitle\",\n        xlinktype: \"xlinkType\",\n        \"xlink:type\": \"xlinkType\",\n        xmlbase: \"xmlBase\",\n        \"xml:base\": \"xmlBase\",\n        xmllang: \"xmlLang\",\n        \"xml:lang\": \"xmlLang\",\n        xmlns: \"xmlns\",\n        \"xml:space\": \"xmlSpace\",\n        xmlnsxlink: \"xmlnsXlink\",\n        \"xmlns:xlink\": \"xmlnsXlink\",\n        xmlspace: \"xmlSpace\",\n        y1: \"y1\",\n        y2: \"y2\",\n        y: \"y\",\n        ychannelselector: \"yChannelSelector\",\n        z: \"z\",\n        zoomandpan: \"zoomAndPan\"\n      },\n      ariaProperties = {\n        \"aria-current\": 0,\n        \"aria-description\": 0,\n        \"aria-details\": 0,\n        \"aria-disabled\": 0,\n        \"aria-hidden\": 0,\n        \"aria-invalid\": 0,\n        \"aria-keyshortcuts\": 0,\n        \"aria-label\": 0,\n        \"aria-roledescription\": 0,\n        \"aria-autocomplete\": 0,\n        \"aria-checked\": 0,\n        \"aria-expanded\": 0,\n        \"aria-haspopup\": 0,\n        \"aria-level\": 0,\n        \"aria-modal\": 0,\n        \"aria-multiline\": 0,\n        \"aria-multiselectable\": 0,\n        \"aria-orientation\": 0,\n        \"aria-placeholder\": 0,\n        \"aria-pressed\": 0,\n        \"aria-readonly\": 0,\n        \"aria-required\": 0,\n        \"aria-selected\": 0,\n        \"aria-sort\": 0,\n        \"aria-valuemax\": 0,\n        \"aria-valuemin\": 0,\n        \"aria-valuenow\": 0,\n        \"aria-valuetext\": 0,\n        \"aria-atomic\": 0,\n        \"aria-busy\": 0,\n        \"aria-live\": 0,\n        \"aria-relevant\": 0,\n        \"aria-dropeffect\": 0,\n        \"aria-grabbed\": 0,\n        \"aria-activedescendant\": 0,\n        \"aria-colcount\": 0,\n        \"aria-colindex\": 0,\n        \"aria-colspan\": 0,\n        \"aria-controls\": 0,\n        \"aria-describedby\": 0,\n        \"aria-errormessage\": 0,\n        \"aria-flowto\": 0,\n        \"aria-labelledby\": 0,\n        \"aria-owns\": 0,\n        \"aria-posinset\": 0,\n        \"aria-rowcount\": 0,\n        \"aria-rowindex\": 0,\n        \"aria-rowspan\": 0,\n        \"aria-setsize\": 0,\n        \"aria-braillelabel\": 0,\n        \"aria-brailleroledescription\": 0,\n        \"aria-colindextext\": 0,\n        \"aria-rowindextext\": 0\n      },\n      warnedProperties$1 = {},\n      rARIA$1 = RegExp(\n        \"^(aria)-[:A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040]*$\"\n      ),\n      rARIACamel$1 = RegExp(\n        \"^(aria)[A-Z][:A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040]*$\"\n      ),\n      didWarnValueNull = !1,\n      warnedProperties = {},\n      EVENT_NAME_REGEX = /^on./,\n      INVALID_EVENT_NAME_REGEX = /^on[^A-Z]/,\n      rARIA = RegExp(\n        \"^(aria)-[:A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040]*$\"\n      ),\n      rARIACamel = RegExp(\n        \"^(aria)[A-Z][:A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040]*$\"\n      ),\n      isJavaScriptProtocol =\n        /^[\\u0000-\\u001F ]*j[\\r\\n\\t]*a[\\r\\n\\t]*v[\\r\\n\\t]*a[\\r\\n\\t]*s[\\r\\n\\t]*c[\\r\\n\\t]*r[\\r\\n\\t]*i[\\r\\n\\t]*p[\\r\\n\\t]*t[\\r\\n\\t]*:/i,\n      currentReplayingEvent = null,\n      restoreTarget = null,\n      restoreQueue = null,\n      isInsideEventHandler = !1,\n      canUseDOM = !(\n        \"undefined\" === typeof window ||\n        \"undefined\" === typeof window.document ||\n        \"undefined\" === typeof window.document.createElement\n      ),\n      passiveBrowserEventsSupported = !1;\n    if (canUseDOM)\n      try {\n        var options$jscomp$0 = {};\n        Object.defineProperty(options$jscomp$0, \"passive\", {\n          get: function () {\n            passiveBrowserEventsSupported = !0;\n          }\n        });\n        window.addEventListener(\"test\", options$jscomp$0, options$jscomp$0);\n        window.removeEventListener(\"test\", options$jscomp$0, options$jscomp$0);\n      } catch (e) {\n        passiveBrowserEventsSupported = !1;\n      }\n    var root = null,\n      startText = null,\n      fallbackText = null,\n      EventInterface = {\n        eventPhase: 0,\n        bubbles: 0,\n        cancelable: 0,\n        timeStamp: function (event) {\n          return event.timeStamp || Date.now();\n        },\n        defaultPrevented: 0,\n        isTrusted: 0\n      },\n      SyntheticEvent = createSyntheticEvent(EventInterface),\n      UIEventInterface = assign({}, EventInterface, { view: 0, detail: 0 }),\n      SyntheticUIEvent = createSyntheticEvent(UIEventInterface),\n      lastMovementX,\n      lastMovementY,\n      lastMouseEvent,\n      MouseEventInterface = assign({}, UIEventInterface, {\n        screenX: 0,\n        screenY: 0,\n        clientX: 0,\n        clientY: 0,\n        pageX: 0,\n        pageY: 0,\n        ctrlKey: 0,\n        shiftKey: 0,\n        altKey: 0,\n        metaKey: 0,\n        getModifierState: getEventModifierState,\n        button: 0,\n        buttons: 0,\n        relatedTarget: function (event) {\n          return void 0 === event.relatedTarget\n            ? event.fromElement === event.srcElement\n              ? event.toElement\n              : event.fromElement\n            : event.relatedTarget;\n        },\n        movementX: function (event) {\n          if (\"movementX\" in event) return event.movementX;\n          event !== lastMouseEvent &&\n            (lastMouseEvent && \"mousemove\" === event.type\n              ? ((lastMovementX = event.screenX - lastMouseEvent.screenX),\n                (lastMovementY = event.screenY - lastMouseEvent.screenY))\n              : (lastMovementY = lastMovementX = 0),\n            (lastMouseEvent = event));\n          return lastMovementX;\n        },\n        movementY: function (event) {\n          return \"movementY\" in event ? event.movementY : lastMovementY;\n        }\n      }),\n      SyntheticMouseEvent = createSyntheticEvent(MouseEventInterface),\n      DragEventInterface = assign({}, MouseEventInterface, { dataTransfer: 0 }),\n      SyntheticDragEvent = createSyntheticEvent(DragEventInterface),\n      FocusEventInterface = assign({}, UIEventInterface, { relatedTarget: 0 }),\n      SyntheticFocusEvent = createSyntheticEvent(FocusEventInterface),\n      AnimationEventInterface = assign({}, EventInterface, {\n        animationName: 0,\n        elapsedTime: 0,\n        pseudoElement: 0\n      }),\n      SyntheticAnimationEvent = createSyntheticEvent(AnimationEventInterface),\n      ClipboardEventInterface = assign({}, EventInterface, {\n        clipboardData: function (event) {\n          return \"clipboardData\" in event\n            ? event.clipboardData\n            : window.clipboardData;\n        }\n      }),\n      SyntheticClipboardEvent = createSyntheticEvent(ClipboardEventInterface),\n      CompositionEventInterface = assign({}, EventInterface, { data: 0 }),\n      SyntheticCompositionEvent = createSyntheticEvent(\n        CompositionEventInterface\n      ),\n      SyntheticInputEvent = SyntheticCompositionEvent,\n      normalizeKey = {\n        Esc: \"Escape\",\n        Spacebar: \" \",\n        Left: \"ArrowLeft\",\n        Up: \"ArrowUp\",\n        Right: \"ArrowRight\",\n        Down: \"ArrowDown\",\n        Del: \"Delete\",\n        Win: \"OS\",\n        Menu: \"ContextMenu\",\n        Apps: \"ContextMenu\",\n        Scroll: \"ScrollLock\",\n        MozPrintableKey: \"Unidentified\"\n      },\n      translateToKey = {\n        8: \"Backspace\",\n        9: \"Tab\",\n        12: \"Clear\",\n        13: \"Enter\",\n        16: \"Shift\",\n        17: \"Control\",\n        18: \"Alt\",\n        19: \"Pause\",\n        20: \"CapsLock\",\n        27: \"Escape\",\n        32: \" \",\n        33: \"PageUp\",\n        34: \"PageDown\",\n        35: \"End\",\n        36: \"Home\",\n        37: \"ArrowLeft\",\n        38: \"ArrowUp\",\n        39: \"ArrowRight\",\n        40: \"ArrowDown\",\n        45: \"Insert\",\n        46: \"Delete\",\n        112: \"F1\",\n        113: \"F2\",\n        114: \"F3\",\n        115: \"F4\",\n        116: \"F5\",\n        117: \"F6\",\n        118: \"F7\",\n        119: \"F8\",\n        120: \"F9\",\n        121: \"F10\",\n        122: \"F11\",\n        123: \"F12\",\n        144: \"NumLock\",\n        145: \"ScrollLock\",\n        224: \"Meta\"\n      },\n      modifierKeyToProp = {\n        Alt: \"altKey\",\n        Control: \"ctrlKey\",\n        Meta: \"metaKey\",\n        Shift: \"shiftKey\"\n      },\n      KeyboardEventInterface = assign({}, UIEventInterface, {\n        key: function (nativeEvent) {\n          if (nativeEvent.key) {\n            var key = normalizeKey[nativeEvent.key] || nativeEvent.key;\n            if (\"Unidentified\" !== key) return key;\n          }\n          return \"keypress\" === nativeEvent.type\n            ? ((nativeEvent = getEventCharCode(nativeEvent)),\n              13 === nativeEvent ? \"Enter\" : String.fromCharCode(nativeEvent))\n            : \"keydown\" === nativeEvent.type || \"keyup\" === nativeEvent.type\n              ? translateToKey[nativeEvent.keyCode] || \"Unidentified\"\n              : \"\";\n        },\n        code: 0,\n        location: 0,\n        ctrlKey: 0,\n        shiftKey: 0,\n        altKey: 0,\n        metaKey: 0,\n        repeat: 0,\n        locale: 0,\n        getModifierState: getEventModifierState,\n        charCode: function (event) {\n          return \"keypress\" === event.type ? getEventCharCode(event) : 0;\n        },\n        keyCode: function (event) {\n          return \"keydown\" === event.type || \"keyup\" === event.type\n            ? event.keyCode\n            : 0;\n        },\n        which: function (event) {\n          return \"keypress\" === event.type\n            ? getEventCharCode(event)\n            : \"keydown\" === event.type || \"keyup\" === event.type\n              ? event.keyCode\n              : 0;\n        }\n      }),\n      SyntheticKeyboardEvent = createSyntheticEvent(KeyboardEventInterface),\n      PointerEventInterface = assign({}, MouseEventInterface, {\n        pointerId: 0,\n        width: 0,\n        height: 0,\n        pressure: 0,\n        tangentialPressure: 0,\n        tiltX: 0,\n        tiltY: 0,\n        twist: 0,\n        pointerType: 0,\n        isPrimary: 0\n      }),\n      SyntheticPointerEvent = createSyntheticEvent(PointerEventInterface),\n      TouchEventInterface = assign({}, UIEventInterface, {\n        touches: 0,\n        targetTouches: 0,\n        changedTouches: 0,\n        altKey: 0,\n        metaKey: 0,\n        ctrlKey: 0,\n        shiftKey: 0,\n        getModifierState: getEventModifierState\n      }),\n      SyntheticTouchEvent = createSyntheticEvent(TouchEventInterface),\n      TransitionEventInterface = assign({}, EventInterface, {\n        propertyName: 0,\n        elapsedTime: 0,\n        pseudoElement: 0\n      }),\n      SyntheticTransitionEvent = createSyntheticEvent(TransitionEventInterface),\n      WheelEventInterface = assign({}, MouseEventInterface, {\n        deltaX: function (event) {\n          return \"deltaX\" in event\n            ? event.deltaX\n            : \"wheelDeltaX\" in event\n              ? -event.wheelDeltaX\n              : 0;\n        },\n        deltaY: function (event) {\n          return \"deltaY\" in event\n            ? event.deltaY\n            : \"wheelDeltaY\" in event\n              ? -event.wheelDeltaY\n              : \"wheelDelta\" in event\n                ? -event.wheelDelta\n                : 0;\n        },\n        deltaZ: 0,\n        deltaMode: 0\n      }),\n      SyntheticWheelEvent = createSyntheticEvent(WheelEventInterface),\n      ToggleEventInterface = assign({}, EventInterface, {\n        newState: 0,\n        oldState: 0\n      }),\n      SyntheticToggleEvent = createSyntheticEvent(ToggleEventInterface),\n      END_KEYCODES = [9, 13, 27, 32],\n      START_KEYCODE = 229,\n      canUseCompositionEvent = canUseDOM && \"CompositionEvent\" in window,\n      documentMode = null;\n    canUseDOM &&\n      \"documentMode\" in document &&\n      (documentMode = document.documentMode);\n    var canUseTextInputEvent =\n        canUseDOM && \"TextEvent\" in window && !documentMode,\n      useFallbackCompositionData =\n        canUseDOM &&\n        (!canUseCompositionEvent ||\n          (documentMode && 8 < documentMode && 11 >= documentMode)),\n      SPACEBAR_CODE = 32,\n      SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE),\n      hasSpaceKeypress = !1,\n      isComposing = !1,\n      supportedInputTypes = {\n        color: !0,\n        date: !0,\n        datetime: !0,\n        \"datetime-local\": !0,\n        email: !0,\n        month: !0,\n        number: !0,\n        password: !0,\n        range: !0,\n        search: !0,\n        tel: !0,\n        text: !0,\n        time: !0,\n        url: !0,\n        week: !0\n      },\n      activeElement$1 = null,\n      activeElementInst$1 = null,\n      isInputEventSupported = !1;\n    canUseDOM &&\n      (isInputEventSupported =\n        isEventSupported(\"input\") &&\n        (!document.documentMode || 9 < document.documentMode));\n    var objectIs = \"function\" === typeof Object.is ? Object.is : is,\n      skipSelectionChangeEvent =\n        canUseDOM && \"documentMode\" in document && 11 >= document.documentMode,\n      activeElement = null,\n      activeElementInst = null,\n      lastSelection = null,\n      mouseDown = !1,\n      vendorPrefixes = {\n        animationend: makePrefixMap(\"Animation\", \"AnimationEnd\"),\n        animationiteration: makePrefixMap(\"Animation\", \"AnimationIteration\"),\n        animationstart: makePrefixMap(\"Animation\", \"AnimationStart\"),\n        transitionrun: makePrefixMap(\"Transition\", \"TransitionRun\"),\n        transitionstart: makePrefixMap(\"Transition\", \"TransitionStart\"),\n        transitioncancel: makePrefixMap(\"Transition\", \"TransitionCancel\"),\n        transitionend: makePrefixMap(\"Transition\", \"TransitionEnd\")\n      },\n      prefixedEventNames = {},\n      style = {};\n    canUseDOM &&\n      ((style = document.createElement(\"div\").style),\n      \"AnimationEvent\" in window ||\n        (delete vendorPrefixes.animationend.animation,\n        delete vendorPrefixes.animationiteration.animation,\n        delete vendorPrefixes.animationstart.animation),\n      \"TransitionEvent\" in window ||\n        delete vendorPrefixes.transitionend.transition);\n    var ANIMATION_END = getVendorPrefixedEventName(\"animationend\"),\n      ANIMATION_ITERATION = getVendorPrefixedEventName(\"animationiteration\"),\n      ANIMATION_START = getVendorPrefixedEventName(\"animationstart\"),\n      TRANSITION_RUN = getVendorPrefixedEventName(\"transitionrun\"),\n      TRANSITION_START = getVendorPrefixedEventName(\"transitionstart\"),\n      TRANSITION_CANCEL = getVendorPrefixedEventName(\"transitioncancel\"),\n      TRANSITION_END = getVendorPrefixedEventName(\"transitionend\"),\n      topLevelEventsToReactNames = new Map(),\n      simpleEventPluginEvents =\n        \"abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel\".split(\n          \" \"\n        );\n    simpleEventPluginEvents.push(\"scrollEnd\");\n    var lastResetTime = 0;\n    if (\n      \"object\" === typeof performance &&\n      \"function\" === typeof performance.now\n    ) {\n      var localPerformance = performance;\n      var getCurrentTime = function () {\n        return localPerformance.now();\n      };\n    } else {\n      var localDate = Date;\n      getCurrentTime = function () {\n        return localDate.now();\n      };\n    }\n    var reportGlobalError =\n        \"function\" === typeof reportError\n          ? reportError\n          : function (error) {\n              if (\n                \"object\" === typeof window &&\n                \"function\" === typeof window.ErrorEvent\n              ) {\n                var event = new window.ErrorEvent(\"error\", {\n                  bubbles: !0,\n                  cancelable: !0,\n                  message:\n                    \"object\" === typeof error &&\n                    null !== error &&\n                    \"string\" === typeof error.message\n                      ? String(error.message)\n                      : String(error),\n                  error: error\n                });\n                if (!window.dispatchEvent(event)) return;\n              } else if (\n                \"object\" === typeof process &&\n                \"function\" === typeof process.emit\n              ) {\n                process.emit(\"uncaughtException\", error);\n                return;\n              }\n              console.error(error);\n            },\n      OMITTED_PROP_ERROR =\n        \"This object has been omitted by React in the console log to avoid sending too much data from the server. Try logging smaller or more specific objects.\",\n      EMPTY_ARRAY = 0,\n      COMPLEX_ARRAY = 1,\n      PRIMITIVE_ARRAY = 2,\n      ENTRIES_ARRAY = 3,\n      REMOVED = \"\\u2013\\u00a0\",\n      ADDED = \"+\\u00a0\",\n      UNCHANGED = \"\\u2007\\u00a0\",\n      supportsUserTiming =\n        \"undefined\" !== typeof console &&\n        \"function\" === typeof console.timeStamp &&\n        \"undefined\" !== typeof performance &&\n        \"function\" === typeof performance.measure,\n      COMPONENTS_TRACK = \"Components \\u269b\",\n      LANES_TRACK_GROUP = \"Scheduler \\u269b\",\n      currentTrack = \"Blocking\",\n      alreadyWarnedForDeepEquality = !1,\n      reusableComponentDevToolDetails = {\n        color: \"primary\",\n        properties: null,\n        tooltipText: \"\",\n        track: COMPONENTS_TRACK\n      },\n      reusableComponentOptions = {\n        start: -0,\n        end: -0,\n        detail: { devtools: reusableComponentDevToolDetails }\n      },\n      resuableChangedPropsEntry = [\"Changed Props\", \"\"],\n      DEEP_EQUALITY_WARNING =\n        \"This component received deeply equal props. It might benefit from useMemo or the React Compiler in its owner.\",\n      reusableDeeplyEqualPropsEntry = [\"Changed Props\", DEEP_EQUALITY_WARNING],\n      OffscreenVisible = 1,\n      OffscreenPassiveEffectsConnected = 2,\n      concurrentQueues = [],\n      concurrentQueuesIndex = 0,\n      concurrentlyUpdatedLanes = 0,\n      emptyContextObject = {};\n    Object.freeze(emptyContextObject);\n    var resolveFamily = null,\n      failedBoundaries = null,\n      NoMode = 0,\n      ConcurrentMode = 1,\n      ProfileMode = 2,\n      StrictLegacyMode = 8,\n      StrictEffectsMode = 16,\n      SuspenseyImagesMode = 32;\n    var hasBadMapPolyfill = !1;\n    try {\n      var nonExtensibleObject = Object.preventExtensions({});\n      new Map([[nonExtensibleObject, null]]);\n      new Set([nonExtensibleObject]);\n    } catch (e$3) {\n      hasBadMapPolyfill = !0;\n    }\n    var CapturedStacks = new WeakMap(),\n      forkStack = [],\n      forkStackIndex = 0,\n      treeForkProvider = null,\n      treeForkCount = 0,\n      idStack = [],\n      idStackIndex = 0,\n      treeContextProvider = null,\n      treeContextId = 1,\n      treeContextOverflow = \"\",\n      hydrationParentFiber = null,\n      nextHydratableInstance = null,\n      isHydrating = !1,\n      didSuspendOrErrorDEV = !1,\n      hydrationDiffRootDEV = null,\n      hydrationErrors = null,\n      rootOrSingletonContext = !1,\n      HydrationMismatchException = Error(\n        \"Hydration Mismatch Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React.\"\n      ),\n      valueCursor = createCursor(null);\n    var rendererCursorDEV = createCursor(null);\n    var rendererSigil = {};\n    var currentlyRenderingFiber$1 = null,\n      lastContextDependency = null,\n      isDisallowedContextReadInDEV = !1,\n      AbortControllerLocal =\n        \"undefined\" !== typeof AbortController\n          ? AbortController\n          : function () {\n              var listeners = [],\n                signal = (this.signal = {\n                  aborted: !1,\n                  addEventListener: function (type, listener) {\n                    listeners.push(listener);\n                  }\n                });\n              this.abort = function () {\n                signal.aborted = !0;\n                listeners.forEach(function (listener) {\n                  return listener();\n                });\n              };\n            },\n      scheduleCallback$2 = Scheduler.unstable_scheduleCallback,\n      NormalPriority = Scheduler.unstable_NormalPriority,\n      CacheContext = {\n        $$typeof: REACT_CONTEXT_TYPE,\n        Consumer: null,\n        Provider: null,\n        _currentValue: null,\n        _currentValue2: null,\n        _threadCount: 0,\n        _currentRenderer: null,\n        _currentRenderer2: null\n      },\n      now = Scheduler.unstable_now,\n      createTask = console.createTask\n        ? console.createTask\n        : function () {\n            return null;\n          },\n      SPAWNED_UPDATE = 1,\n      PINGED_UPDATE = 2,\n      renderStartTime = -0,\n      commitStartTime = -0,\n      commitEndTime = -0,\n      commitErrors = null,\n      profilerStartTime = -1.1,\n      profilerEffectDuration = -0,\n      componentEffectDuration = -0,\n      componentEffectStartTime = -1.1,\n      componentEffectEndTime = -1.1,\n      componentEffectErrors = null,\n      componentEffectSpawnedUpdate = !1,\n      blockingClampTime = -0,\n      blockingUpdateTime = -1.1,\n      blockingUpdateTask = null,\n      blockingUpdateType = 0,\n      blockingUpdateMethodName = null,\n      blockingUpdateComponentName = null,\n      blockingEventTime = -1.1,\n      blockingEventType = null,\n      blockingEventRepeatTime = -1.1,\n      blockingSuspendedTime = -1.1,\n      transitionClampTime = -0,\n      transitionStartTime = -1.1,\n      transitionUpdateTime = -1.1,\n      transitionUpdateType = 0,\n      transitionUpdateTask = null,\n      transitionUpdateMethodName = null,\n      transitionUpdateComponentName = null,\n      transitionEventTime = -1.1,\n      transitionEventType = null,\n      transitionEventRepeatTime = -1.1,\n      transitionSuspendedTime = -1.1,\n      retryClampTime = -0,\n      idleClampTime = -0,\n      animatingLanes = 0,\n      animatingTask = null,\n      yieldReason = 0,\n      yieldStartTime = -1.1,\n      currentUpdateIsNested = !1,\n      nestedUpdateScheduled = !1,\n      currentEntangledListeners = null,\n      currentEntangledPendingCount = 0,\n      currentEntangledLane = 0,\n      currentEntangledActionThenable = null,\n      prevOnStartTransitionFinish = ReactSharedInternals.S;\n    ReactSharedInternals.S = function (transition, returnValue) {\n      globalMostRecentTransitionTime = now$1();\n      if (\n        \"object\" === typeof returnValue &&\n        null !== returnValue &&\n        \"function\" === typeof returnValue.then\n      ) {\n        if (0 > transitionStartTime && 0 > transitionUpdateTime) {\n          transitionStartTime = now();\n          var newEventTime = resolveEventTimeStamp(),\n            newEventType = resolveEventType();\n          if (\n            newEventTime !== transitionEventRepeatTime ||\n            newEventType !== transitionEventType\n          )\n            transitionEventRepeatTime = -1.1;\n          transitionEventTime = newEventTime;\n          transitionEventType = newEventType;\n        }\n        entangleAsyncAction(transition, returnValue);\n      }\n      null !== prevOnStartTransitionFinish &&\n        prevOnStartTransitionFinish(transition, returnValue);\n    };\n    var resumedCache = createCursor(null),\n      ReactStrictModeWarnings = {\n        recordUnsafeLifecycleWarnings: function () {},\n        flushPendingUnsafeLifecycleWarnings: function () {},\n        recordLegacyContextWarning: function () {},\n        flushLegacyContextWarning: function () {},\n        discardPendingWarnings: function () {}\n      },\n      pendingComponentWillMountWarnings = [],\n      pendingUNSAFE_ComponentWillMountWarnings = [],\n      pendingComponentWillReceivePropsWarnings = [],\n      pendingUNSAFE_ComponentWillReceivePropsWarnings = [],\n      pendingComponentWillUpdateWarnings = [],\n      pendingUNSAFE_ComponentWillUpdateWarnings = [],\n      didWarnAboutUnsafeLifecycles = new Set();\n    ReactStrictModeWarnings.recordUnsafeLifecycleWarnings = function (\n      fiber,\n      instance\n    ) {\n      didWarnAboutUnsafeLifecycles.has(fiber.type) ||\n        (\"function\" === typeof instance.componentWillMount &&\n          !0 !== instance.componentWillMount.__suppressDeprecationWarning &&\n          pendingComponentWillMountWarnings.push(fiber),\n        fiber.mode & StrictLegacyMode &&\n          \"function\" === typeof instance.UNSAFE_componentWillMount &&\n          pendingUNSAFE_ComponentWillMountWarnings.push(fiber),\n        \"function\" === typeof instance.componentWillReceiveProps &&\n          !0 !==\n            instance.componentWillReceiveProps.__suppressDeprecationWarning &&\n          pendingComponentWillReceivePropsWarnings.push(fiber),\n        fiber.mode & StrictLegacyMode &&\n          \"function\" === typeof instance.UNSAFE_componentWillReceiveProps &&\n          pendingUNSAFE_ComponentWillReceivePropsWarnings.push(fiber),\n        \"function\" === typeof instance.componentWillUpdate &&\n          !0 !== instance.componentWillUpdate.__suppressDeprecationWarning &&\n          pendingComponentWillUpdateWarnings.push(fiber),\n        fiber.mode & StrictLegacyMode &&\n          \"function\" === typeof instance.UNSAFE_componentWillUpdate &&\n          pendingUNSAFE_ComponentWillUpdateWarnings.push(fiber));\n    };\n    ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings = function () {\n      var componentWillMountUniqueNames = new Set();\n      0 < pendingComponentWillMountWarnings.length &&\n        (pendingComponentWillMountWarnings.forEach(function (fiber) {\n          componentWillMountUniqueNames.add(\n            getComponentNameFromFiber(fiber) || \"Component\"\n          );\n          didWarnAboutUnsafeLifecycles.add(fiber.type);\n        }),\n        (pendingComponentWillMountWarnings = []));\n      var UNSAFE_componentWillMountUniqueNames = new Set();\n      0 < pendingUNSAFE_ComponentWillMountWarnings.length &&\n        (pendingUNSAFE_ComponentWillMountWarnings.forEach(function (fiber) {\n          UNSAFE_componentWillMountUniqueNames.add(\n            getComponentNameFromFiber(fiber) || \"Component\"\n          );\n          didWarnAboutUnsafeLifecycles.add(fiber.type);\n        }),\n        (pendingUNSAFE_ComponentWillMountWarnings = []));\n      var componentWillReceivePropsUniqueNames = new Set();\n      0 < pendingComponentWillReceivePropsWarnings.length &&\n        (pendingComponentWillReceivePropsWarnings.forEach(function (fiber) {\n          componentWillReceivePropsUniqueNames.add(\n            getComponentNameFromFiber(fiber) || \"Component\"\n          );\n          didWarnAboutUnsafeLifecycles.add(fiber.type);\n        }),\n        (pendingComponentWillReceivePropsWarnings = []));\n      var UNSAFE_componentWillReceivePropsUniqueNames = new Set();\n      0 < pendingUNSAFE_ComponentWillReceivePropsWarnings.length &&\n        (pendingUNSAFE_ComponentWillReceivePropsWarnings.forEach(\n          function (fiber) {\n            UNSAFE_componentWillReceivePropsUniqueNames.add(\n              getComponentNameFromFiber(fiber) || \"Component\"\n            );\n            didWarnAboutUnsafeLifecycles.add(fiber.type);\n          }\n        ),\n        (pendingUNSAFE_ComponentWillReceivePropsWarnings = []));\n      var componentWillUpdateUniqueNames = new Set();\n      0 < pendingComponentWillUpdateWarnings.length &&\n        (pendingComponentWillUpdateWarnings.forEach(function (fiber) {\n          componentWillUpdateUniqueNames.add(\n            getComponentNameFromFiber(fiber) || \"Component\"\n          );\n          didWarnAboutUnsafeLifecycles.add(fiber.type);\n        }),\n        (pendingComponentWillUpdateWarnings = []));\n      var UNSAFE_componentWillUpdateUniqueNames = new Set();\n      0 < pendingUNSAFE_ComponentWillUpdateWarnings.length &&\n        (pendingUNSAFE_ComponentWillUpdateWarnings.forEach(function (fiber) {\n          UNSAFE_componentWillUpdateUniqueNames.add(\n            getComponentNameFromFiber(fiber) || \"Component\"\n          );\n          didWarnAboutUnsafeLifecycles.add(fiber.type);\n        }),\n        (pendingUNSAFE_ComponentWillUpdateWarnings = []));\n      if (0 < UNSAFE_componentWillMountUniqueNames.size) {\n        var sortedNames = setToSortedString(\n          UNSAFE_componentWillMountUniqueNames\n        );\n        console.error(\n          \"Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.\\n\\n* Move code with side effects to componentDidMount, and set initial state in the constructor.\\n\\nPlease update the following components: %s\",\n          sortedNames\n        );\n      }\n      0 < UNSAFE_componentWillReceivePropsUniqueNames.size &&\n        ((sortedNames = setToSortedString(\n          UNSAFE_componentWillReceivePropsUniqueNames\n        )),\n        console.error(\n          \"Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.\\n\\n* Move data fetching code or side effects to componentDidUpdate.\\n* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://react.dev/link/derived-state\\n\\nPlease update the following components: %s\",\n          sortedNames\n        ));\n      0 < UNSAFE_componentWillUpdateUniqueNames.size &&\n        ((sortedNames = setToSortedString(\n          UNSAFE_componentWillUpdateUniqueNames\n        )),\n        console.error(\n          \"Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.\\n\\n* Move data fetching code or side effects to componentDidUpdate.\\n\\nPlease update the following components: %s\",\n          sortedNames\n        ));\n      0 < componentWillMountUniqueNames.size &&\n        ((sortedNames = setToSortedString(componentWillMountUniqueNames)),\n        console.warn(\n          \"componentWillMount has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.\\n\\n* Move code with side effects to componentDidMount, and set initial state in the constructor.\\n* Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.\\n\\nPlease update the following components: %s\",\n          sortedNames\n        ));\n      0 < componentWillReceivePropsUniqueNames.size &&\n        ((sortedNames = setToSortedString(\n          componentWillReceivePropsUniqueNames\n        )),\n        console.warn(\n          \"componentWillReceiveProps has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.\\n\\n* Move data fetching code or side effects to componentDidUpdate.\\n* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://react.dev/link/derived-state\\n* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.\\n\\nPlease update the following components: %s\",\n          sortedNames\n        ));\n      0 < componentWillUpdateUniqueNames.size &&\n        ((sortedNames = setToSortedString(componentWillUpdateUniqueNames)),\n        console.warn(\n          \"componentWillUpdate has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.\\n\\n* Move data fetching code or side effects to componentDidUpdate.\\n* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.\\n\\nPlease update the following components: %s\",\n          sortedNames\n        ));\n    };\n    var pendingLegacyContextWarning = new Map(),\n      didWarnAboutLegacyContext = new Set();\n    ReactStrictModeWarnings.recordLegacyContextWarning = function (\n      fiber,\n      instance\n    ) {\n      var strictRoot = null;\n      for (var node = fiber; null !== node; )\n        node.mode & StrictLegacyMode && (strictRoot = node),\n          (node = node.return);\n      null === strictRoot\n        ? console.error(\n            \"Expected to find a StrictMode component in a strict mode tree. This error is likely caused by a bug in React. Please file an issue.\"\n          )\n        : !didWarnAboutLegacyContext.has(fiber.type) &&\n          ((node = pendingLegacyContextWarning.get(strictRoot)),\n          null != fiber.type.contextTypes ||\n            null != fiber.type.childContextTypes ||\n            (null !== instance &&\n              \"function\" === typeof instance.getChildContext)) &&\n          (void 0 === node &&\n            ((node = []), pendingLegacyContextWarning.set(strictRoot, node)),\n          node.push(fiber));\n    };\n    ReactStrictModeWarnings.flushLegacyContextWarning = function () {\n      pendingLegacyContextWarning.forEach(function (fiberArray) {\n        if (0 !== fiberArray.length) {\n          var firstFiber = fiberArray[0],\n            uniqueNames = new Set();\n          fiberArray.forEach(function (fiber) {\n            uniqueNames.add(getComponentNameFromFiber(fiber) || \"Component\");\n            didWarnAboutLegacyContext.add(fiber.type);\n          });\n          var sortedNames = setToSortedString(uniqueNames);\n          runWithFiberInDEV(firstFiber, function () {\n            console.error(\n              \"Legacy context API has been detected within a strict-mode tree.\\n\\nThe old API will be supported in all 16.x releases, but applications using it should migrate to the new version.\\n\\nPlease update the following components: %s\\n\\nLearn more about this warning here: https://react.dev/link/legacy-context\",\n              sortedNames\n            );\n          });\n        }\n      });\n    };\n    ReactStrictModeWarnings.discardPendingWarnings = function () {\n      pendingComponentWillMountWarnings = [];\n      pendingUNSAFE_ComponentWillMountWarnings = [];\n      pendingComponentWillReceivePropsWarnings = [];\n      pendingUNSAFE_ComponentWillReceivePropsWarnings = [];\n      pendingComponentWillUpdateWarnings = [];\n      pendingUNSAFE_ComponentWillUpdateWarnings = [];\n      pendingLegacyContextWarning = new Map();\n    };\n    var callComponent = {\n        react_stack_bottom_frame: function (Component, props, secondArg) {\n          var wasRendering = isRendering;\n          isRendering = !0;\n          try {\n            return Component(props, secondArg);\n          } finally {\n            isRendering = wasRendering;\n          }\n        }\n      },\n      callComponentInDEV =\n        callComponent.react_stack_bottom_frame.bind(callComponent),\n      callRender = {\n        react_stack_bottom_frame: function (instance) {\n          var wasRendering = isRendering;\n          isRendering = !0;\n          try {\n            return instance.render();\n          } finally {\n            isRendering = wasRendering;\n          }\n        }\n      },\n      callRenderInDEV = callRender.react_stack_bottom_frame.bind(callRender),\n      callComponentDidMount = {\n        react_stack_bottom_frame: function (finishedWork, instance) {\n          try {\n            instance.componentDidMount();\n          } catch (error) {\n            captureCommitPhaseError(finishedWork, finishedWork.return, error);\n          }\n        }\n      },\n      callComponentDidMountInDEV =\n        callComponentDidMount.react_stack_bottom_frame.bind(\n          callComponentDidMount\n        ),\n      callComponentDidUpdate = {\n        react_stack_bottom_frame: function (\n          finishedWork,\n          instance,\n          prevProps,\n          prevState,\n          snapshot\n        ) {\n          try {\n            instance.componentDidUpdate(prevProps, prevState, snapshot);\n          } catch (error) {\n            captureCommitPhaseError(finishedWork, finishedWork.return, error);\n          }\n        }\n      },\n      callComponentDidUpdateInDEV =\n        callComponentDidUpdate.react_stack_bottom_frame.bind(\n          callComponentDidUpdate\n        ),\n      callComponentDidCatch = {\n        react_stack_bottom_frame: function (instance, errorInfo) {\n          var stack = errorInfo.stack;\n          instance.componentDidCatch(errorInfo.value, {\n            componentStack: null !== stack ? stack : \"\"\n          });\n        }\n      },\n      callComponentDidCatchInDEV =\n        callComponentDidCatch.react_stack_bottom_frame.bind(\n          callComponentDidCatch\n        ),\n      callComponentWillUnmount = {\n        react_stack_bottom_frame: function (\n          current,\n          nearestMountedAncestor,\n          instance\n        ) {\n          try {\n            instance.componentWillUnmount();\n          } catch (error) {\n            captureCommitPhaseError(current, nearestMountedAncestor, error);\n          }\n        }\n      },\n      callComponentWillUnmountInDEV =\n        callComponentWillUnmount.react_stack_bottom_frame.bind(\n          callComponentWillUnmount\n        ),\n      callCreate = {\n        react_stack_bottom_frame: function (effect) {\n          var create = effect.create;\n          effect = effect.inst;\n          create = create();\n          return (effect.destroy = create);\n        }\n      },\n      callCreateInDEV = callCreate.react_stack_bottom_frame.bind(callCreate),\n      callDestroy = {\n        react_stack_bottom_frame: function (\n          current,\n          nearestMountedAncestor,\n          destroy\n        ) {\n          try {\n            destroy();\n          } catch (error) {\n            captureCommitPhaseError(current, nearestMountedAncestor, error);\n          }\n        }\n      },\n      callDestroyInDEV = callDestroy.react_stack_bottom_frame.bind(callDestroy),\n      callLazyInit = {\n        react_stack_bottom_frame: function (lazy) {\n          var init = lazy._init;\n          return init(lazy._payload);\n        }\n      },\n      callLazyInitInDEV =\n        callLazyInit.react_stack_bottom_frame.bind(callLazyInit),\n      SuspenseException = Error(\n        \"Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\\n\\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`.\"\n      ),\n      SuspenseyCommitException = Error(\n        \"Suspense Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React.\"\n      ),\n      SuspenseActionException = Error(\n        \"Suspense Exception: This is not a real error! It's an implementation detail of `useActionState` to interrupt the current render. You must either rethrow it immediately, or move the `useActionState` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\\n\\nTo handle async errors, wrap your component in an error boundary.\"\n      ),\n      noopSuspenseyCommitThenable = {\n        then: function () {\n          console.error(\n            'Internal React error: A listener was unexpectedly attached to a \"noop\" thenable. This is a bug in React. Please file an issue.'\n          );\n        }\n      },\n      suspendedThenable = null,\n      needsToResetSuspendedThenableDEV = !1,\n      thenableState$1 = null,\n      thenableIndexCounter$1 = 0,\n      currentDebugInfo = null,\n      didWarnAboutMaps;\n    var didWarnAboutGenerators = (didWarnAboutMaps = !1);\n    var ownerHasKeyUseWarning = {};\n    var ownerHasFunctionTypeWarning = {};\n    var ownerHasSymbolTypeWarning = {};\n    warnForMissingKey = function (returnFiber, workInProgress, child) {\n      if (\n        null !== child &&\n        \"object\" === typeof child &&\n        child._store &&\n        ((!child._store.validated && null == child.key) ||\n          2 === child._store.validated)\n      ) {\n        if (\"object\" !== typeof child._store)\n          throw Error(\n            \"React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.\"\n          );\n        child._store.validated = 1;\n        var componentName = getComponentNameFromFiber(returnFiber),\n          componentKey = componentName || \"null\";\n        if (!ownerHasKeyUseWarning[componentKey]) {\n          ownerHasKeyUseWarning[componentKey] = !0;\n          child = child._owner;\n          returnFiber = returnFiber._debugOwner;\n          var currentComponentErrorInfo = \"\";\n          returnFiber &&\n            \"number\" === typeof returnFiber.tag &&\n            (componentKey = getComponentNameFromFiber(returnFiber)) &&\n            (currentComponentErrorInfo =\n              \"\\n\\nCheck the render method of `\" + componentKey + \"`.\");\n          currentComponentErrorInfo ||\n            (componentName &&\n              (currentComponentErrorInfo =\n                \"\\n\\nCheck the top-level render call using <\" +\n                componentName +\n                \">.\"));\n          var childOwnerAppendix = \"\";\n          null != child &&\n            returnFiber !== child &&\n            ((componentName = null),\n            \"number\" === typeof child.tag\n              ? (componentName = getComponentNameFromFiber(child))\n              : \"string\" === typeof child.name && (componentName = child.name),\n            componentName &&\n              (childOwnerAppendix =\n                \" It was passed a child from \" + componentName + \".\"));\n          runWithFiberInDEV(workInProgress, function () {\n            console.error(\n              'Each child in a list should have a unique \"key\" prop.%s%s See https://react.dev/link/warning-keys for more information.',\n              currentComponentErrorInfo,\n              childOwnerAppendix\n            );\n          });\n        }\n      }\n    };\n    var reconcileChildFibers = createChildReconciler(!0),\n      mountChildFibers = createChildReconciler(!1),\n      UpdateState = 0,\n      ReplaceState = 1,\n      ForceUpdate = 2,\n      CaptureUpdate = 3,\n      hasForceUpdate = !1;\n    var didWarnUpdateInsideUpdate = !1;\n    var currentlyProcessingQueue = null;\n    var didReadFromEntangledAsyncAction = !1,\n      currentTreeHiddenStackCursor = createCursor(null),\n      prevEntangledRenderLanesCursor = createCursor(0),\n      suspenseHandlerStackCursor = createCursor(null),\n      shellBoundary = null,\n      SubtreeSuspenseContextMask = 1,\n      ForceSuspenseFallback = 2,\n      suspenseStackCursor = createCursor(0),\n      NoFlags = 0,\n      HasEffect = 1,\n      Insertion = 2,\n      Layout = 4,\n      Passive = 8,\n      didWarnUncachedGetSnapshot;\n    var didWarnAboutMismatchedHooksForComponent = new Set();\n    var didWarnAboutUseWrappedInTryCatch = new Set();\n    var didWarnAboutAsyncClientComponent = new Set();\n    var didWarnAboutUseFormState = new Set();\n    var renderLanes = 0,\n      currentlyRenderingFiber = null,\n      currentHook = null,\n      workInProgressHook = null,\n      didScheduleRenderPhaseUpdate = !1,\n      didScheduleRenderPhaseUpdateDuringThisPass = !1,\n      shouldDoubleInvokeUserFnsInHooksDEV = !1,\n      localIdCounter = 0,\n      thenableIndexCounter = 0,\n      thenableState = null,\n      globalClientIdCounter = 0,\n      RE_RENDER_LIMIT = 25,\n      currentHookNameInDev = null,\n      hookTypesDev = null,\n      hookTypesUpdateIndexDev = -1,\n      ignorePreviousDependencies = !1,\n      ContextOnlyDispatcher = {\n        readContext: readContext,\n        use: use,\n        useCallback: throwInvalidHookError,\n        useContext: throwInvalidHookError,\n        useEffect: throwInvalidHookError,\n        useImperativeHandle: throwInvalidHookError,\n        useLayoutEffect: throwInvalidHookError,\n        useInsertionEffect: throwInvalidHookError,\n        useMemo: throwInvalidHookError,\n        useReducer: throwInvalidHookError,\n        useRef: throwInvalidHookError,\n        useState: throwInvalidHookError,\n        useDebugValue: throwInvalidHookError,\n        useDeferredValue: throwInvalidHookError,\n        useTransition: throwInvalidHookError,\n        useSyncExternalStore: throwInvalidHookError,\n        useId: throwInvalidHookError,\n        useHostTransitionStatus: throwInvalidHookError,\n        useFormState: throwInvalidHookError,\n        useActionState: throwInvalidHookError,\n        useOptimistic: throwInvalidHookError,\n        useMemoCache: throwInvalidHookError,\n        useCacheRefresh: throwInvalidHookError\n      };\n    ContextOnlyDispatcher.useEffectEvent = throwInvalidHookError;\n    var HooksDispatcherOnMountInDEV = null,\n      HooksDispatcherOnMountWithHookTypesInDEV = null,\n      HooksDispatcherOnUpdateInDEV = null,\n      HooksDispatcherOnRerenderInDEV = null,\n      InvalidNestedHooksDispatcherOnMountInDEV = null,\n      InvalidNestedHooksDispatcherOnUpdateInDEV = null,\n      InvalidNestedHooksDispatcherOnRerenderInDEV = null;\n    HooksDispatcherOnMountInDEV = {\n      readContext: function (context) {\n        return readContext(context);\n      },\n      use: use,\n      useCallback: function (callback, deps) {\n        currentHookNameInDev = \"useCallback\";\n        mountHookTypesDev();\n        checkDepsAreArrayDev(deps);\n        return mountCallback(callback, deps);\n      },\n      useContext: function (context) {\n        currentHookNameInDev = \"useContext\";\n        mountHookTypesDev();\n        return readContext(context);\n      },\n      useEffect: function (create, deps) {\n        currentHookNameInDev = \"useEffect\";\n        mountHookTypesDev();\n        checkDepsAreArrayDev(deps);\n        return mountEffect(create, deps);\n      },\n      useImperativeHandle: function (ref, create, deps) {\n        currentHookNameInDev = \"useImperativeHandle\";\n        mountHookTypesDev();\n        checkDepsAreArrayDev(deps);\n        return mountImperativeHandle(ref, create, deps);\n      },\n      useInsertionEffect: function (create, deps) {\n        currentHookNameInDev = \"useInsertionEffect\";\n        mountHookTypesDev();\n        checkDepsAreArrayDev(deps);\n        mountEffectImpl(4, Insertion, create, deps);\n      },\n      useLayoutEffect: function (create, deps) {\n        currentHookNameInDev = \"useLayoutEffect\";\n        mountHookTypesDev();\n        checkDepsAreArrayDev(deps);\n        return mountLayoutEffect(create, deps);\n      },\n      useMemo: function (create, deps) {\n        currentHookNameInDev = \"useMemo\";\n        mountHookTypesDev();\n        checkDepsAreArrayDev(deps);\n        var prevDispatcher = ReactSharedInternals.H;\n        ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;\n        try {\n          return mountMemo(create, deps);\n        } finally {\n          ReactSharedInternals.H = prevDispatcher;\n        }\n      },\n      useReducer: function (reducer, initialArg, init) {\n        currentHookNameInDev = \"useReducer\";\n        mountHookTypesDev();\n        var prevDispatcher = ReactSharedInternals.H;\n        ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;\n        try {\n          return mountReducer(reducer, initialArg, init);\n        } finally {\n          ReactSharedInternals.H = prevDispatcher;\n        }\n      },\n      useRef: function (initialValue) {\n        currentHookNameInDev = \"useRef\";\n        mountHookTypesDev();\n        return mountRef(initialValue);\n      },\n      useState: function (initialState) {\n        currentHookNameInDev = \"useState\";\n        mountHookTypesDev();\n        var prevDispatcher = ReactSharedInternals.H;\n        ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;\n        try {\n          return mountState(initialState);\n        } finally {\n          ReactSharedInternals.H = prevDispatcher;\n        }\n      },\n      useDebugValue: function () {\n        currentHookNameInDev = \"useDebugValue\";\n        mountHookTypesDev();\n      },\n      useDeferredValue: function (value, initialValue) {\n        currentHookNameInDev = \"useDeferredValue\";\n        mountHookTypesDev();\n        return mountDeferredValue(value, initialValue);\n      },\n      useTransition: function () {\n        currentHookNameInDev = \"useTransition\";\n        mountHookTypesDev();\n        return mountTransition();\n      },\n      useSyncExternalStore: function (\n        subscribe,\n        getSnapshot,\n        getServerSnapshot\n      ) {\n        currentHookNameInDev = \"useSyncExternalStore\";\n        mountHookTypesDev();\n        return mountSyncExternalStore(\n          subscribe,\n          getSnapshot,\n          getServerSnapshot\n        );\n      },\n      useId: function () {\n        currentHookNameInDev = \"useId\";\n        mountHookTypesDev();\n        return mountId();\n      },\n      useFormState: function (action, initialState) {\n        currentHookNameInDev = \"useFormState\";\n        mountHookTypesDev();\n        warnOnUseFormStateInDev();\n        return mountActionState(action, initialState);\n      },\n      useActionState: function (action, initialState) {\n        currentHookNameInDev = \"useActionState\";\n        mountHookTypesDev();\n        return mountActionState(action, initialState);\n      },\n      useOptimistic: function (passthrough) {\n        currentHookNameInDev = \"useOptimistic\";\n        mountHookTypesDev();\n        return mountOptimistic(passthrough);\n      },\n      useHostTransitionStatus: useHostTransitionStatus,\n      useMemoCache: useMemoCache,\n      useCacheRefresh: function () {\n        currentHookNameInDev = \"useCacheRefresh\";\n        mountHookTypesDev();\n        return mountRefresh();\n      },\n      useEffectEvent: function (callback) {\n        currentHookNameInDev = \"useEffectEvent\";\n        mountHookTypesDev();\n        return mountEvent(callback);\n      }\n    };\n    HooksDispatcherOnMountWithHookTypesInDEV = {\n      readContext: function (context) {\n        return readContext(context);\n      },\n      use: use,\n      useCallback: function (callback, deps) {\n        currentHookNameInDev = \"useCallback\";\n        updateHookTypesDev();\n        return mountCallback(callback, deps);\n      },\n      useContext: function (context) {\n        currentHookNameInDev = \"useContext\";\n        updateHookTypesDev();\n        return readContext(context);\n      },\n      useEffect: function (create, deps) {\n        currentHookNameInDev = \"useEffect\";\n        updateHookTypesDev();\n        return mountEffect(create, deps);\n      },\n      useImperativeHandle: function (ref, create, deps) {\n        currentHookNameInDev = \"useImperativeHandle\";\n        updateHookTypesDev();\n        return mountImperativeHandle(ref, create, deps);\n      },\n      useInsertionEffect: function (create, deps) {\n        currentHookNameInDev = \"useInsertionEffect\";\n        updateHookTypesDev();\n        mountEffectImpl(4, Insertion, create, deps);\n      },\n      useLayoutEffect: function (create, deps) {\n        currentHookNameInDev = \"useLayoutEffect\";\n        updateHookTypesDev();\n        return mountLayoutEffect(create, deps);\n      },\n      useMemo: function (create, deps) {\n        currentHookNameInDev = \"useMemo\";\n        updateHookTypesDev();\n        var prevDispatcher = ReactSharedInternals.H;\n        ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;\n        try {\n          return mountMemo(create, deps);\n        } finally {\n          ReactSharedInternals.H = prevDispatcher;\n        }\n      },\n      useReducer: function (reducer, initialArg, init) {\n        currentHookNameInDev = \"useReducer\";\n        updateHookTypesDev();\n        var prevDispatcher = ReactSharedInternals.H;\n        ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;\n        try {\n          return mountReducer(reducer, initialArg, init);\n        } finally {\n          ReactSharedInternals.H = prevDispatcher;\n        }\n      },\n      useRef: function (initialValue) {\n        currentHookNameInDev = \"useRef\";\n        updateHookTypesDev();\n        return mountRef(initialValue);\n      },\n      useState: function (initialState) {\n        currentHookNameInDev = \"useState\";\n        updateHookTypesDev();\n        var prevDispatcher = ReactSharedInternals.H;\n        ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;\n        try {\n          return mountState(initialState);\n        } finally {\n          ReactSharedInternals.H = prevDispatcher;\n        }\n      },\n      useDebugValue: function () {\n        currentHookNameInDev = \"useDebugValue\";\n        updateHookTypesDev();\n      },\n      useDeferredValue: function (value, initialValue) {\n        currentHookNameInDev = \"useDeferredValue\";\n        updateHookTypesDev();\n        return mountDeferredValue(value, initialValue);\n      },\n      useTransition: function () {\n        currentHookNameInDev = \"useTransition\";\n        updateHookTypesDev();\n        return mountTransition();\n      },\n      useSyncExternalStore: function (\n        subscribe,\n        getSnapshot,\n        getServerSnapshot\n      ) {\n        currentHookNameInDev = \"useSyncExternalStore\";\n        updateHookTypesDev();\n        return mountSyncExternalStore(\n          subscribe,\n          getSnapshot,\n          getServerSnapshot\n        );\n      },\n      useId: function () {\n        currentHookNameInDev = \"useId\";\n        updateHookTypesDev();\n        return mountId();\n      },\n      useActionState: function (action, initialState) {\n        currentHookNameInDev = \"useActionState\";\n        updateHookTypesDev();\n        return mountActionState(action, initialState);\n      },\n      useFormState: function (action, initialState) {\n        currentHookNameInDev = \"useFormState\";\n        updateHookTypesDev();\n        warnOnUseFormStateInDev();\n        return mountActionState(action, initialState);\n      },\n      useOptimistic: function (passthrough) {\n        currentHookNameInDev = \"useOptimistic\";\n        updateHookTypesDev();\n        return mountOptimistic(passthrough);\n      },\n      useHostTransitionStatus: useHostTransitionStatus,\n      useMemoCache: useMemoCache,\n      useCacheRefresh: function () {\n        currentHookNameInDev = \"useCacheRefresh\";\n        updateHookTypesDev();\n        return mountRefresh();\n      },\n      useEffectEvent: function (callback) {\n        currentHookNameInDev = \"useEffectEvent\";\n        updateHookTypesDev();\n        return mountEvent(callback);\n      }\n    };\n    HooksDispatcherOnUpdateInDEV = {\n      readContext: function (context) {\n        return readContext(context);\n      },\n      use: use,\n      useCallback: function (callback, deps) {\n        currentHookNameInDev = \"useCallback\";\n        updateHookTypesDev();\n        return updateCallback(callback, deps);\n      },\n      useContext: function (context) {\n        currentHookNameInDev = \"useContext\";\n        updateHookTypesDev();\n        return readContext(context);\n      },\n      useEffect: function (create, deps) {\n        currentHookNameInDev = \"useEffect\";\n        updateHookTypesDev();\n        updateEffectImpl(2048, Passive, create, deps);\n      },\n      useImperativeHandle: function (ref, create, deps) {\n        currentHookNameInDev = \"useImperativeHandle\";\n        updateHookTypesDev();\n        return updateImperativeHandle(ref, create, deps);\n      },\n      useInsertionEffect: function (create, deps) {\n        currentHookNameInDev = \"useInsertionEffect\";\n        updateHookTypesDev();\n        return updateEffectImpl(4, Insertion, create, deps);\n      },\n      useLayoutEffect: function (create, deps) {\n        currentHookNameInDev = \"useLayoutEffect\";\n        updateHookTypesDev();\n        return updateEffectImpl(4, Layout, create, deps);\n      },\n      useMemo: function (create, deps) {\n        currentHookNameInDev = \"useMemo\";\n        updateHookTypesDev();\n        var prevDispatcher = ReactSharedInternals.H;\n        ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;\n        try {\n          return updateMemo(create, deps);\n        } finally {\n          ReactSharedInternals.H = prevDispatcher;\n        }\n      },\n      useReducer: function (reducer, initialArg, init) {\n        currentHookNameInDev = \"useReducer\";\n        updateHookTypesDev();\n        var prevDispatcher = ReactSharedInternals.H;\n        ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;\n        try {\n          return updateReducer(reducer, initialArg, init);\n        } finally {\n          ReactSharedInternals.H = prevDispatcher;\n        }\n      },\n      useRef: function () {\n        currentHookNameInDev = \"useRef\";\n        updateHookTypesDev();\n        return updateWorkInProgressHook().memoizedState;\n      },\n      useState: function () {\n        currentHookNameInDev = \"useState\";\n        updateHookTypesDev();\n        var prevDispatcher = ReactSharedInternals.H;\n        ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;\n        try {\n          return updateReducer(basicStateReducer);\n        } finally {\n          ReactSharedInternals.H = prevDispatcher;\n        }\n      },\n      useDebugValue: function () {\n        currentHookNameInDev = \"useDebugValue\";\n        updateHookTypesDev();\n      },\n      useDeferredValue: function (value, initialValue) {\n        currentHookNameInDev = \"useDeferredValue\";\n        updateHookTypesDev();\n        return updateDeferredValue(value, initialValue);\n      },\n      useTransition: function () {\n        currentHookNameInDev = \"useTransition\";\n        updateHookTypesDev();\n        return updateTransition();\n      },\n      useSyncExternalStore: function (\n        subscribe,\n        getSnapshot,\n        getServerSnapshot\n      ) {\n        currentHookNameInDev = \"useSyncExternalStore\";\n        updateHookTypesDev();\n        return updateSyncExternalStore(\n          subscribe,\n          getSnapshot,\n          getServerSnapshot\n        );\n      },\n      useId: function () {\n        currentHookNameInDev = \"useId\";\n        updateHookTypesDev();\n        return updateWorkInProgressHook().memoizedState;\n      },\n      useFormState: function (action) {\n        currentHookNameInDev = \"useFormState\";\n        updateHookTypesDev();\n        warnOnUseFormStateInDev();\n        return updateActionState(action);\n      },\n      useActionState: function (action) {\n        currentHookNameInDev = \"useActionState\";\n        updateHookTypesDev();\n        return updateActionState(action);\n      },\n      useOptimistic: function (passthrough, reducer) {\n        currentHookNameInDev = \"useOptimistic\";\n        updateHookTypesDev();\n        return updateOptimistic(passthrough, reducer);\n      },\n      useHostTransitionStatus: useHostTransitionStatus,\n      useMemoCache: useMemoCache,\n      useCacheRefresh: function () {\n        currentHookNameInDev = \"useCacheRefresh\";\n        updateHookTypesDev();\n        return updateWorkInProgressHook().memoizedState;\n      },\n      useEffectEvent: function (callback) {\n        currentHookNameInDev = \"useEffectEvent\";\n        updateHookTypesDev();\n        return updateEvent(callback);\n      }\n    };\n    HooksDispatcherOnRerenderInDEV = {\n      readContext: function (context) {\n        return readContext(context);\n      },\n      use: use,\n      useCallback: function (callback, deps) {\n        currentHookNameInDev = \"useCallback\";\n        updateHookTypesDev();\n        return updateCallback(callback, deps);\n      },\n      useContext: function (context) {\n        currentHookNameInDev = \"useContext\";\n        updateHookTypesDev();\n        return readContext(context);\n      },\n      useEffect: function (create, deps) {\n        currentHookNameInDev = \"useEffect\";\n        updateHookTypesDev();\n        updateEffectImpl(2048, Passive, create, deps);\n      },\n      useImperativeHandle: function (ref, create, deps) {\n        currentHookNameInDev = \"useImperativeHandle\";\n        updateHookTypesDev();\n        return updateImperativeHandle(ref, create, deps);\n      },\n      useInsertionEffect: function (create, deps) {\n        currentHookNameInDev = \"useInsertionEffect\";\n        updateHookTypesDev();\n        return updateEffectImpl(4, Insertion, create, deps);\n      },\n      useLayoutEffect: function (create, deps) {\n        currentHookNameInDev = \"useLayoutEffect\";\n        updateHookTypesDev();\n        return updateEffectImpl(4, Layout, create, deps);\n      },\n      useMemo: function (create, deps) {\n        currentHookNameInDev = \"useMemo\";\n        updateHookTypesDev();\n        var prevDispatcher = ReactSharedInternals.H;\n        ReactSharedInternals.H = InvalidNestedHooksDispatcherOnRerenderInDEV;\n        try {\n          return updateMemo(create, deps);\n        } finally {\n          ReactSharedInternals.H = prevDispatcher;\n        }\n      },\n      useReducer: function (reducer, initialArg, init) {\n        currentHookNameInDev = \"useReducer\";\n        updateHookTypesDev();\n        var prevDispatcher = ReactSharedInternals.H;\n        ReactSharedInternals.H = InvalidNestedHooksDispatcherOnRerenderInDEV;\n        try {\n          return rerenderReducer(reducer, initialArg, init);\n        } finally {\n          ReactSharedInternals.H = prevDispatcher;\n        }\n      },\n      useRef: function () {\n        currentHookNameInDev = \"useRef\";\n        updateHookTypesDev();\n        return updateWorkInProgressHook().memoizedState;\n      },\n      useState: function () {\n        currentHookNameInDev = \"useState\";\n        updateHookTypesDev();\n        var prevDispatcher = ReactSharedInternals.H;\n        ReactSharedInternals.H = InvalidNestedHooksDispatcherOnRerenderInDEV;\n        try {\n          return rerenderReducer(basicStateReducer);\n        } finally {\n          ReactSharedInternals.H = prevDispatcher;\n        }\n      },\n      useDebugValue: function () {\n        currentHookNameInDev = \"useDebugValue\";\n        updateHookTypesDev();\n      },\n      useDeferredValue: function (value, initialValue) {\n        currentHookNameInDev = \"useDeferredValue\";\n        updateHookTypesDev();\n        return rerenderDeferredValue(value, initialValue);\n      },\n      useTransition: function () {\n        currentHookNameInDev = \"useTransition\";\n        updateHookTypesDev();\n        return rerenderTransition();\n      },\n      useSyncExternalStore: function (\n        subscribe,\n        getSnapshot,\n        getServerSnapshot\n      ) {\n        currentHookNameInDev = \"useSyncExternalStore\";\n        updateHookTypesDev();\n        return updateSyncExternalStore(\n          subscribe,\n          getSnapshot,\n          getServerSnapshot\n        );\n      },\n      useId: function () {\n        currentHookNameInDev = \"useId\";\n        updateHookTypesDev();\n        return updateWorkInProgressHook().memoizedState;\n      },\n      useFormState: function (action) {\n        currentHookNameInDev = \"useFormState\";\n        updateHookTypesDev();\n        warnOnUseFormStateInDev();\n        return rerenderActionState(action);\n      },\n      useActionState: function (action) {\n        currentHookNameInDev = \"useActionState\";\n        updateHookTypesDev();\n        return rerenderActionState(action);\n      },\n      useOptimistic: function (passthrough, reducer) {\n        currentHookNameInDev = \"useOptimistic\";\n        updateHookTypesDev();\n        return rerenderOptimistic(passthrough, reducer);\n      },\n      useHostTransitionStatus: useHostTransitionStatus,\n      useMemoCache: useMemoCache,\n      useCacheRefresh: function () {\n        currentHookNameInDev = \"useCacheRefresh\";\n        updateHookTypesDev();\n        return updateWorkInProgressHook().memoizedState;\n      },\n      useEffectEvent: function (callback) {\n        currentHookNameInDev = \"useEffectEvent\";\n        updateHookTypesDev();\n        return updateEvent(callback);\n      }\n    };\n    InvalidNestedHooksDispatcherOnMountInDEV = {\n      readContext: function (context) {\n        warnInvalidContextAccess();\n        return readContext(context);\n      },\n      use: function (usable) {\n        warnInvalidHookAccess();\n        return use(usable);\n      },\n      useCallback: function (callback, deps) {\n        currentHookNameInDev = \"useCallback\";\n        warnInvalidHookAccess();\n        mountHookTypesDev();\n        return mountCallback(callback, deps);\n      },\n      useContext: function (context) {\n        currentHookNameInDev = \"useContext\";\n        warnInvalidHookAccess();\n        mountHookTypesDev();\n        return readContext(context);\n      },\n      useEffect: function (create, deps) {\n        currentHookNameInDev = \"useEffect\";\n        warnInvalidHookAccess();\n        mountHookTypesDev();\n        return mountEffect(create, deps);\n      },\n      useImperativeHandle: function (ref, create, deps) {\n        currentHookNameInDev = \"useImperativeHandle\";\n        warnInvalidHookAccess();\n        mountHookTypesDev();\n        return mountImperativeHandle(ref, create, deps);\n      },\n      useInsertionEffect: function (create, deps) {\n        currentHookNameInDev = \"useInsertionEffect\";\n        warnInvalidHookAccess();\n        mountHookTypesDev();\n        mountEffectImpl(4, Insertion, create, deps);\n      },\n      useLayoutEffect: function (create, deps) {\n        currentHookNameInDev = \"useLayoutEffect\";\n        warnInvalidHookAccess();\n        mountHookTypesDev();\n        return mountLayoutEffect(create, deps);\n      },\n      useMemo: function (create, deps) {\n        currentHookNameInDev = \"useMemo\";\n        warnInvalidHookAccess();\n        mountHookTypesDev();\n        var prevDispatcher = ReactSharedInternals.H;\n        ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;\n        try {\n          return mountMemo(create, deps);\n        } finally {\n          ReactSharedInternals.H = prevDispatcher;\n        }\n      },\n      useReducer: function (reducer, initialArg, init) {\n        currentHookNameInDev = \"useReducer\";\n        warnInvalidHookAccess();\n        mountHookTypesDev();\n        var prevDispatcher = ReactSharedInternals.H;\n        ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;\n        try {\n          return mountReducer(reducer, initialArg, init);\n        } finally {\n          ReactSharedInternals.H = prevDispatcher;\n        }\n      },\n      useRef: function (initialValue) {\n        currentHookNameInDev = \"useRef\";\n        warnInvalidHookAccess();\n        mountHookTypesDev();\n        return mountRef(initialValue);\n      },\n      useState: function (initialState) {\n        currentHookNameInDev = \"useState\";\n        warnInvalidHookAccess();\n        mountHookTypesDev();\n        var prevDispatcher = ReactSharedInternals.H;\n        ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;\n        try {\n          return mountState(initialState);\n        } finally {\n          ReactSharedInternals.H = prevDispatcher;\n        }\n      },\n      useDebugValue: function () {\n        currentHookNameInDev = \"useDebugValue\";\n        warnInvalidHookAccess();\n        mountHookTypesDev();\n      },\n      useDeferredValue: function (value, initialValue) {\n        currentHookNameInDev = \"useDeferredValue\";\n        warnInvalidHookAccess();\n        mountHookTypesDev();\n        return mountDeferredValue(value, initialValue);\n      },\n      useTransition: function () {\n        currentHookNameInDev = \"useTransition\";\n        warnInvalidHookAccess();\n        mountHookTypesDev();\n        return mountTransition();\n      },\n      useSyncExternalStore: function (\n        subscribe,\n        getSnapshot,\n        getServerSnapshot\n      ) {\n        currentHookNameInDev = \"useSyncExternalStore\";\n        warnInvalidHookAccess();\n        mountHookTypesDev();\n        return mountSyncExternalStore(\n          subscribe,\n          getSnapshot,\n          getServerSnapshot\n        );\n      },\n      useId: function () {\n        currentHookNameInDev = \"useId\";\n        warnInvalidHookAccess();\n        mountHookTypesDev();\n        return mountId();\n      },\n      useFormState: function (action, initialState) {\n        currentHookNameInDev = \"useFormState\";\n        warnInvalidHookAccess();\n        mountHookTypesDev();\n        return mountActionState(action, initialState);\n      },\n      useActionState: function (action, initialState) {\n        currentHookNameInDev = \"useActionState\";\n        warnInvalidHookAccess();\n        mountHookTypesDev();\n        return mountActionState(action, initialState);\n      },\n      useOptimistic: function (passthrough) {\n        currentHookNameInDev = \"useOptimistic\";\n        warnInvalidHookAccess();\n        mountHookTypesDev();\n        return mountOptimistic(passthrough);\n      },\n      useMemoCache: function (size) {\n        warnInvalidHookAccess();\n        return useMemoCache(size);\n      },\n      useHostTransitionStatus: useHostTransitionStatus,\n      useCacheRefresh: function () {\n        currentHookNameInDev = \"useCacheRefresh\";\n        mountHookTypesDev();\n        return mountRefresh();\n      },\n      useEffectEvent: function (callback) {\n        currentHookNameInDev = \"useEffectEvent\";\n        warnInvalidHookAccess();\n        mountHookTypesDev();\n        return mountEvent(callback);\n      }\n    };\n    InvalidNestedHooksDispatcherOnUpdateInDEV = {\n      readContext: function (context) {\n        warnInvalidContextAccess();\n        return readContext(context);\n      },\n      use: function (usable) {\n        warnInvalidHookAccess();\n        return use(usable);\n      },\n      useCallback: function (callback, deps) {\n        currentHookNameInDev = \"useCallback\";\n        warnInvalidHookAccess();\n        updateHookTypesDev();\n        return updateCallback(callback, deps);\n      },\n      useContext: function (context) {\n        currentHookNameInDev = \"useContext\";\n        warnInvalidHookAccess();\n        updateHookTypesDev();\n        return readContext(context);\n      },\n      useEffect: function (create, deps) {\n        currentHookNameInDev = \"useEffect\";\n        warnInvalidHookAccess();\n        updateHookTypesDev();\n        updateEffectImpl(2048, Passive, create, deps);\n      },\n      useImperativeHandle: function (ref, create, deps) {\n        currentHookNameInDev = \"useImperativeHandle\";\n        warnInvalidHookAccess();\n        updateHookTypesDev();\n        return updateImperativeHandle(ref, create, deps);\n      },\n      useInsertionEffect: function (create, deps) {\n        currentHookNameInDev = \"useInsertionEffect\";\n        warnInvalidHookAccess();\n        updateHookTypesDev();\n        return updateEffectImpl(4, Insertion, create, deps);\n      },\n      useLayoutEffect: function (create, deps) {\n        currentHookNameInDev = \"useLayoutEffect\";\n        warnInvalidHookAccess();\n        updateHookTypesDev();\n        return updateEffectImpl(4, Layout, create, deps);\n      },\n      useMemo: function (create, deps) {\n        currentHookNameInDev = \"useMemo\";\n        warnInvalidHookAccess();\n        updateHookTypesDev();\n        var prevDispatcher = ReactSharedInternals.H;\n        ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;\n        try {\n          return updateMemo(create, deps);\n        } finally {\n          ReactSharedInternals.H = prevDispatcher;\n        }\n      },\n      useReducer: function (reducer, initialArg, init) {\n        currentHookNameInDev = \"useReducer\";\n        warnInvalidHookAccess();\n        updateHookTypesDev();\n        var prevDispatcher = ReactSharedInternals.H;\n        ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;\n        try {\n          return updateReducer(reducer, initialArg, init);\n        } finally {\n          ReactSharedInternals.H = prevDispatcher;\n        }\n      },\n      useRef: function () {\n        currentHookNameInDev = \"useRef\";\n        warnInvalidHookAccess();\n        updateHookTypesDev();\n        return updateWorkInProgressHook().memoizedState;\n      },\n      useState: function () {\n        currentHookNameInDev = \"useState\";\n        warnInvalidHookAccess();\n        updateHookTypesDev();\n        var prevDispatcher = ReactSharedInternals.H;\n        ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;\n        try {\n          return updateReducer(basicStateReducer);\n        } finally {\n          ReactSharedInternals.H = prevDispatcher;\n        }\n      },\n      useDebugValue: function () {\n        currentHookNameInDev = \"useDebugValue\";\n        warnInvalidHookAccess();\n        updateHookTypesDev();\n      },\n      useDeferredValue: function (value, initialValue) {\n        currentHookNameInDev = \"useDeferredValue\";\n        warnInvalidHookAccess();\n        updateHookTypesDev();\n        return updateDeferredValue(value, initialValue);\n      },\n      useTransition: function () {\n        currentHookNameInDev = \"useTransition\";\n        warnInvalidHookAccess();\n        updateHookTypesDev();\n        return updateTransition();\n      },\n      useSyncExternalStore: function (\n        subscribe,\n        getSnapshot,\n        getServerSnapshot\n      ) {\n        currentHookNameInDev = \"useSyncExternalStore\";\n        warnInvalidHookAccess();\n        updateHookTypesDev();\n        return updateSyncExternalStore(\n          subscribe,\n          getSnapshot,\n          getServerSnapshot\n        );\n      },\n      useId: function () {\n        currentHookNameInDev = \"useId\";\n        warnInvalidHookAccess();\n        updateHookTypesDev();\n        return updateWorkInProgressHook().memoizedState;\n      },\n      useFormState: function (action) {\n        currentHookNameInDev = \"useFormState\";\n        warnInvalidHookAccess();\n        updateHookTypesDev();\n        return updateActionState(action);\n      },\n      useActionState: function (action) {\n        currentHookNameInDev = \"useActionState\";\n        warnInvalidHookAccess();\n        updateHookTypesDev();\n        return updateActionState(action);\n      },\n      useOptimistic: function (passthrough, reducer) {\n        currentHookNameInDev = \"useOptimistic\";\n        warnInvalidHookAccess();\n        updateHookTypesDev();\n        return updateOptimistic(passthrough, reducer);\n      },\n      useMemoCache: function (size) {\n        warnInvalidHookAccess();\n        return useMemoCache(size);\n      },\n      useHostTransitionStatus: useHostTransitionStatus,\n      useCacheRefresh: function () {\n        currentHookNameInDev = \"useCacheRefresh\";\n        updateHookTypesDev();\n        return updateWorkInProgressHook().memoizedState;\n      },\n      useEffectEvent: function (callback) {\n        currentHookNameInDev = \"useEffectEvent\";\n        warnInvalidHookAccess();\n        updateHookTypesDev();\n        return updateEvent(callback);\n      }\n    };\n    InvalidNestedHooksDispatcherOnRerenderInDEV = {\n      readContext: function (context) {\n        warnInvalidContextAccess();\n        return readContext(context);\n      },\n      use: function (usable) {\n        warnInvalidHookAccess();\n        return use(usable);\n      },\n      useCallback: function (callback, deps) {\n        currentHookNameInDev = \"useCallback\";\n        warnInvalidHookAccess();\n        updateHookTypesDev();\n        return updateCallback(callback, deps);\n      },\n      useContext: function (context) {\n        currentHookNameInDev = \"useContext\";\n        warnInvalidHookAccess();\n        updateHookTypesDev();\n        return readContext(context);\n      },\n      useEffect: function (create, deps) {\n        currentHookNameInDev = \"useEffect\";\n        warnInvalidHookAccess();\n        updateHookTypesDev();\n        updateEffectImpl(2048, Passive, create, deps);\n      },\n      useImperativeHandle: function (ref, create, deps) {\n        currentHookNameInDev = \"useImperativeHandle\";\n        warnInvalidHookAccess();\n        updateHookTypesDev();\n        return updateImperativeHandle(ref, create, deps);\n      },\n      useInsertionEffect: function (create, deps) {\n        currentHookNameInDev = \"useInsertionEffect\";\n        warnInvalidHookAccess();\n        updateHookTypesDev();\n        return updateEffectImpl(4, Insertion, create, deps);\n      },\n      useLayoutEffect: function (create, deps) {\n        currentHookNameInDev = \"useLayoutEffect\";\n        warnInvalidHookAccess();\n        updateHookTypesDev();\n        return updateEffectImpl(4, Layout, create, deps);\n      },\n      useMemo: function (create, deps) {\n        currentHookNameInDev = \"useMemo\";\n        warnInvalidHookAccess();\n        updateHookTypesDev();\n        var prevDispatcher = ReactSharedInternals.H;\n        ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;\n        try {\n          return updateMemo(create, deps);\n        } finally {\n          ReactSharedInternals.H = prevDispatcher;\n        }\n      },\n      useReducer: function (reducer, initialArg, init) {\n        currentHookNameInDev = \"useReducer\";\n        warnInvalidHookAccess();\n        updateHookTypesDev();\n        var prevDispatcher = ReactSharedInternals.H;\n        ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;\n        try {\n          return rerenderReducer(reducer, initialArg, init);\n        } finally {\n          ReactSharedInternals.H = prevDispatcher;\n        }\n      },\n      useRef: function () {\n        currentHookNameInDev = \"useRef\";\n        warnInvalidHookAccess();\n        updateHookTypesDev();\n        return updateWorkInProgressHook().memoizedState;\n      },\n      useState: function () {\n        currentHookNameInDev = \"useState\";\n        warnInvalidHookAccess();\n        updateHookTypesDev();\n        var prevDispatcher = ReactSharedInternals.H;\n        ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;\n        try {\n          return rerenderReducer(basicStateReducer);\n        } finally {\n          ReactSharedInternals.H = prevDispatcher;\n        }\n      },\n      useDebugValue: function () {\n        currentHookNameInDev = \"useDebugValue\";\n        warnInvalidHookAccess();\n        updateHookTypesDev();\n      },\n      useDeferredValue: function (value, initialValue) {\n        currentHookNameInDev = \"useDeferredValue\";\n        warnInvalidHookAccess();\n        updateHookTypesDev();\n        return rerenderDeferredValue(value, initialValue);\n      },\n      useTransition: function () {\n        currentHookNameInDev = \"useTransition\";\n        warnInvalidHookAccess();\n        updateHookTypesDev();\n        return rerenderTransition();\n      },\n      useSyncExternalStore: function (\n        subscribe,\n        getSnapshot,\n        getServerSnapshot\n      ) {\n        currentHookNameInDev = \"useSyncExternalStore\";\n        warnInvalidHookAccess();\n        updateHookTypesDev();\n        return updateSyncExternalStore(\n          subscribe,\n          getSnapshot,\n          getServerSnapshot\n        );\n      },\n      useId: function () {\n        currentHookNameInDev = \"useId\";\n        warnInvalidHookAccess();\n        updateHookTypesDev();\n        return updateWorkInProgressHook().memoizedState;\n      },\n      useFormState: function (action) {\n        currentHookNameInDev = \"useFormState\";\n        warnInvalidHookAccess();\n        updateHookTypesDev();\n        return rerenderActionState(action);\n      },\n      useActionState: function (action) {\n        currentHookNameInDev = \"useActionState\";\n        warnInvalidHookAccess();\n        updateHookTypesDev();\n        return rerenderActionState(action);\n      },\n      useOptimistic: function (passthrough, reducer) {\n        currentHookNameInDev = \"useOptimistic\";\n        warnInvalidHookAccess();\n        updateHookTypesDev();\n        return rerenderOptimistic(passthrough, reducer);\n      },\n      useMemoCache: function (size) {\n        warnInvalidHookAccess();\n        return useMemoCache(size);\n      },\n      useHostTransitionStatus: useHostTransitionStatus,\n      useCacheRefresh: function () {\n        currentHookNameInDev = \"useCacheRefresh\";\n        updateHookTypesDev();\n        return updateWorkInProgressHook().memoizedState;\n      },\n      useEffectEvent: function (callback) {\n        currentHookNameInDev = \"useEffectEvent\";\n        warnInvalidHookAccess();\n        updateHookTypesDev();\n        return updateEvent(callback);\n      }\n    };\n    var fakeInternalInstance = {};\n    var didWarnAboutStateAssignmentForComponent = new Set();\n    var didWarnAboutUninitializedState = new Set();\n    var didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate = new Set();\n    var didWarnAboutLegacyLifecyclesAndDerivedState = new Set();\n    var didWarnAboutDirectlyAssigningPropsToState = new Set();\n    var didWarnAboutUndefinedDerivedState = new Set();\n    var didWarnAboutContextTypes$1 = new Set();\n    var didWarnAboutChildContextTypes = new Set();\n    var didWarnAboutInvalidateContextType = new Set();\n    var didWarnOnInvalidCallback = new Set();\n    Object.freeze(fakeInternalInstance);\n    var classComponentUpdater = {\n        enqueueSetState: function (inst, payload, callback) {\n          inst = inst._reactInternals;\n          var lane = requestUpdateLane(inst),\n            update = createUpdate(lane);\n          update.payload = payload;\n          void 0 !== callback &&\n            null !== callback &&\n            (warnOnInvalidCallback(callback), (update.callback = callback));\n          payload = enqueueUpdate(inst, update, lane);\n          null !== payload &&\n            (startUpdateTimerByLane(lane, \"this.setState()\", inst),\n            scheduleUpdateOnFiber(payload, inst, lane),\n            entangleTransitions(payload, inst, lane));\n        },\n        enqueueReplaceState: function (inst, payload, callback) {\n          inst = inst._reactInternals;\n          var lane = requestUpdateLane(inst),\n            update = createUpdate(lane);\n          update.tag = ReplaceState;\n          update.payload = payload;\n          void 0 !== callback &&\n            null !== callback &&\n            (warnOnInvalidCallback(callback), (update.callback = callback));\n          payload = enqueueUpdate(inst, update, lane);\n          null !== payload &&\n            (startUpdateTimerByLane(lane, \"this.replaceState()\", inst),\n            scheduleUpdateOnFiber(payload, inst, lane),\n            entangleTransitions(payload, inst, lane));\n        },\n        enqueueForceUpdate: function (inst, callback) {\n          inst = inst._reactInternals;\n          var lane = requestUpdateLane(inst),\n            update = createUpdate(lane);\n          update.tag = ForceUpdate;\n          void 0 !== callback &&\n            null !== callback &&\n            (warnOnInvalidCallback(callback), (update.callback = callback));\n          callback = enqueueUpdate(inst, update, lane);\n          null !== callback &&\n            (startUpdateTimerByLane(lane, \"this.forceUpdate()\", inst),\n            scheduleUpdateOnFiber(callback, inst, lane),\n            entangleTransitions(callback, inst, lane));\n        }\n      },\n      componentName = null,\n      errorBoundaryName = null,\n      SelectiveHydrationException = Error(\n        \"This is not a real error. It's an implementation detail of React's selective hydration feature. If this leaks into userspace, it's a bug in React. Please file an issue.\"\n      ),\n      didReceiveUpdate = !1;\n    var didWarnAboutBadClass = {};\n    var didWarnAboutContextTypeOnFunctionComponent = {};\n    var didWarnAboutContextTypes = {};\n    var didWarnAboutGetDerivedStateOnFunctionComponent = {};\n    var didWarnAboutReassigningProps = !1;\n    var didWarnAboutRevealOrder = {};\n    var didWarnAboutTailOptions = {};\n    var SUSPENDED_MARKER = {\n        dehydrated: null,\n        treeContext: null,\n        retryLane: 0,\n        hydrationErrors: null\n      },\n      hasWarnedAboutUsingNoValuePropOnContextProvider = !1,\n      didWarnAboutUndefinedSnapshotBeforeUpdate = null;\n    didWarnAboutUndefinedSnapshotBeforeUpdate = new Set();\n    var offscreenSubtreeIsHidden = !1,\n      offscreenSubtreeWasHidden = !1,\n      needsFormReset = !1,\n      PossiblyWeakSet = \"function\" === typeof WeakSet ? WeakSet : Set,\n      nextEffect = null,\n      inProgressLanes = null,\n      inProgressRoot = null,\n      hostParent = null,\n      hostParentIsContainer = !1,\n      currentHoistableRoot = null,\n      inHydratedSubtree = !1,\n      suspenseyCommitFlag = 8192,\n      DefaultAsyncDispatcher = {\n        getCacheForType: function (resourceType) {\n          var cache = readContext(CacheContext),\n            cacheForType = cache.data.get(resourceType);\n          void 0 === cacheForType &&\n            ((cacheForType = resourceType()),\n            cache.data.set(resourceType, cacheForType));\n          return cacheForType;\n        },\n        cacheSignal: function () {\n          return readContext(CacheContext).controller.signal;\n        },\n        getOwner: function () {\n          return current;\n        }\n      };\n    if (\"function\" === typeof Symbol && Symbol.for) {\n      var symbolFor = Symbol.for;\n      symbolFor(\"selector.component\");\n      symbolFor(\"selector.has_pseudo_class\");\n      symbolFor(\"selector.role\");\n      symbolFor(\"selector.test_id\");\n      symbolFor(\"selector.text\");\n    }\n    var commitHooks = [],\n      PossiblyWeakMap = \"function\" === typeof WeakMap ? WeakMap : Map,\n      NoContext = 0,\n      RenderContext = 2,\n      CommitContext = 4,\n      RootInProgress = 0,\n      RootFatalErrored = 1,\n      RootErrored = 2,\n      RootSuspended = 3,\n      RootSuspendedWithDelay = 4,\n      RootSuspendedAtTheShell = 6,\n      RootCompleted = 5,\n      executionContext = NoContext,\n      workInProgressRoot = null,\n      workInProgress = null,\n      workInProgressRootRenderLanes = 0,\n      NotSuspended = 0,\n      SuspendedOnError = 1,\n      SuspendedOnData = 2,\n      SuspendedOnImmediate = 3,\n      SuspendedOnInstance = 4,\n      SuspendedOnInstanceAndReadyToContinue = 5,\n      SuspendedOnDeprecatedThrowPromise = 6,\n      SuspendedAndReadyToContinue = 7,\n      SuspendedOnHydration = 8,\n      SuspendedOnAction = 9,\n      workInProgressSuspendedReason = NotSuspended,\n      workInProgressThrownValue = null,\n      workInProgressRootDidSkipSuspendedSiblings = !1,\n      workInProgressRootIsPrerendering = !1,\n      workInProgressRootDidAttachPingListener = !1,\n      entangledRenderLanes = 0,\n      workInProgressRootExitStatus = RootInProgress,\n      workInProgressRootSkippedLanes = 0,\n      workInProgressRootInterleavedUpdatedLanes = 0,\n      workInProgressRootPingedLanes = 0,\n      workInProgressDeferredLane = 0,\n      workInProgressSuspendedRetryLanes = 0,\n      workInProgressRootConcurrentErrors = null,\n      workInProgressRootRecoverableErrors = null,\n      workInProgressRootDidIncludeRecursiveRenderUpdate = !1,\n      globalMostRecentFallbackTime = 0,\n      globalMostRecentTransitionTime = 0,\n      FALLBACK_THROTTLE_MS = 300,\n      workInProgressRootRenderTargetTime = Infinity,\n      RENDER_TIMEOUT_MS = 500,\n      workInProgressTransitions = null,\n      workInProgressUpdateTask = null,\n      legacyErrorBoundariesThatAlreadyFailed = null,\n      IMMEDIATE_COMMIT = 0,\n      ABORTED_VIEW_TRANSITION_COMMIT = 1,\n      DELAYED_PASSIVE_COMMIT = 2,\n      ANIMATION_STARTED_COMMIT = 3,\n      NO_PENDING_EFFECTS = 0,\n      PENDING_MUTATION_PHASE = 1,\n      PENDING_LAYOUT_PHASE = 2,\n      PENDING_AFTER_MUTATION_PHASE = 3,\n      PENDING_SPAWNED_WORK = 4,\n      PENDING_PASSIVE_PHASE = 5,\n      pendingEffectsStatus = 0,\n      pendingEffectsRoot = null,\n      pendingFinishedWork = null,\n      pendingEffectsLanes = 0,\n      pendingEffectsRemainingLanes = 0,\n      pendingEffectsRenderEndTime = -0,\n      pendingPassiveTransitions = null,\n      pendingRecoverableErrors = null,\n      pendingSuspendedCommitReason = null,\n      pendingDelayedCommitReason = IMMEDIATE_COMMIT,\n      pendingSuspendedViewTransitionReason = null,\n      NESTED_UPDATE_LIMIT = 50,\n      nestedUpdateCount = 0,\n      rootWithNestedUpdates = null,\n      isFlushingPassiveEffects = !1,\n      didScheduleUpdateDuringPassiveEffects = !1,\n      NESTED_PASSIVE_UPDATE_LIMIT = 50,\n      nestedPassiveUpdateCount = 0,\n      rootWithPassiveNestedUpdates = null,\n      isRunningInsertionEffect = !1,\n      didWarnStateUpdateForNotYetMountedComponent = null,\n      didWarnAboutUpdateInRender = !1;\n    var didWarnAboutUpdateInRenderForAnotherComponent = new Set();\n    var fakeActCallbackNode$1 = {},\n      firstScheduledRoot = null,\n      lastScheduledRoot = null,\n      didScheduleMicrotask = !1,\n      didScheduleMicrotask_act = !1,\n      mightHavePendingSyncWork = !1,\n      isFlushingWork = !1,\n      currentEventTransitionLane = 0,\n      fakeActCallbackNode = {};\n    (function () {\n      for (var i = 0; i < simpleEventPluginEvents.length; i++) {\n        var eventName = simpleEventPluginEvents[i],\n          domEventName = eventName.toLowerCase();\n        eventName = eventName[0].toUpperCase() + eventName.slice(1);\n        registerSimpleEvent(domEventName, \"on\" + eventName);\n      }\n      registerSimpleEvent(ANIMATION_END, \"onAnimationEnd\");\n      registerSimpleEvent(ANIMATION_ITERATION, \"onAnimationIteration\");\n      registerSimpleEvent(ANIMATION_START, \"onAnimationStart\");\n      registerSimpleEvent(\"dblclick\", \"onDoubleClick\");\n      registerSimpleEvent(\"focusin\", \"onFocus\");\n      registerSimpleEvent(\"focusout\", \"onBlur\");\n      registerSimpleEvent(TRANSITION_RUN, \"onTransitionRun\");\n      registerSimpleEvent(TRANSITION_START, \"onTransitionStart\");\n      registerSimpleEvent(TRANSITION_CANCEL, \"onTransitionCancel\");\n      registerSimpleEvent(TRANSITION_END, \"onTransitionEnd\");\n    })();\n    registerDirectEvent(\"onMouseEnter\", [\"mouseout\", \"mouseover\"]);\n    registerDirectEvent(\"onMouseLeave\", [\"mouseout\", \"mouseover\"]);\n    registerDirectEvent(\"onPointerEnter\", [\"pointerout\", \"pointerover\"]);\n    registerDirectEvent(\"onPointerLeave\", [\"pointerout\", \"pointerover\"]);\n    registerTwoPhaseEvent(\n      \"onChange\",\n      \"change click focusin focusout input keydown keyup selectionchange\".split(\n        \" \"\n      )\n    );\n    registerTwoPhaseEvent(\n      \"onSelect\",\n      \"focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange\".split(\n        \" \"\n      )\n    );\n    registerTwoPhaseEvent(\"onBeforeInput\", [\n      \"compositionend\",\n      \"keypress\",\n      \"textInput\",\n      \"paste\"\n    ]);\n    registerTwoPhaseEvent(\n      \"onCompositionEnd\",\n      \"compositionend focusout keydown keypress keyup mousedown\".split(\" \")\n    );\n    registerTwoPhaseEvent(\n      \"onCompositionStart\",\n      \"compositionstart focusout keydown keypress keyup mousedown\".split(\" \")\n    );\n    registerTwoPhaseEvent(\n      \"onCompositionUpdate\",\n      \"compositionupdate focusout keydown keypress keyup mousedown\".split(\" \")\n    );\n    var mediaEventTypes =\n        \"abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting\".split(\n          \" \"\n        ),\n      nonDelegatedEvents = new Set(\n        \"beforetoggle cancel close invalid load scroll scrollend toggle\"\n          .split(\" \")\n          .concat(mediaEventTypes)\n      ),\n      listeningMarker = \"_reactListening\" + Math.random().toString(36).slice(2),\n      didWarnControlledToUncontrolled = !1,\n      didWarnUncontrolledToControlled = !1,\n      didWarnFormActionType = !1,\n      didWarnFormActionName = !1,\n      didWarnFormActionTarget = !1,\n      didWarnFormActionMethod = !1,\n      didWarnPopoverTargetObject = !1;\n    var didWarnForNewBooleanPropsWithEmptyValue = {};\n    var NORMALIZE_NEWLINES_REGEX = /\\r\\n?/g,\n      NORMALIZE_NULL_AND_REPLACEMENT_REGEX = /\\u0000|\\uFFFD/g,\n      xlinkNamespace = \"http://www.w3.org/1999/xlink\",\n      xmlNamespace = \"http://www.w3.org/XML/1998/namespace\",\n      EXPECTED_FORM_ACTION_URL =\n        \"javascript:throw new Error('React form unexpectedly submitted.')\",\n      SUPPRESS_HYDRATION_WARNING = \"suppressHydrationWarning\",\n      ACTIVITY_START_DATA = \"&\",\n      ACTIVITY_END_DATA = \"/&\",\n      SUSPENSE_START_DATA = \"$\",\n      SUSPENSE_END_DATA = \"/$\",\n      SUSPENSE_PENDING_START_DATA = \"$?\",\n      SUSPENSE_QUEUED_START_DATA = \"$~\",\n      SUSPENSE_FALLBACK_START_DATA = \"$!\",\n      PREAMBLE_CONTRIBUTION_HTML = \"html\",\n      PREAMBLE_CONTRIBUTION_BODY = \"body\",\n      PREAMBLE_CONTRIBUTION_HEAD = \"head\",\n      FORM_STATE_IS_MATCHING = \"F!\",\n      FORM_STATE_IS_NOT_MATCHING = \"F\",\n      DOCUMENT_READY_STATE_LOADING = \"loading\",\n      STYLE = \"style\",\n      HostContextNamespaceNone = 0,\n      HostContextNamespaceSvg = 1,\n      HostContextNamespaceMath = 2,\n      eventsEnabled = null,\n      selectionInformation = null,\n      warnedUnknownTags = { dialog: !0, webview: !0 },\n      currentPopstateTransitionEvent = null,\n      schedulerEvent = void 0,\n      scheduleTimeout = \"function\" === typeof setTimeout ? setTimeout : void 0,\n      cancelTimeout =\n        \"function\" === typeof clearTimeout ? clearTimeout : void 0,\n      noTimeout = -1,\n      localPromise = \"function\" === typeof Promise ? Promise : void 0,\n      scheduleMicrotask =\n        \"function\" === typeof queueMicrotask\n          ? queueMicrotask\n          : \"undefined\" !== typeof localPromise\n            ? function (callback) {\n                return localPromise\n                  .resolve(null)\n                  .then(callback)\n                  .catch(handleErrorInNextTick);\n              }\n            : scheduleTimeout,\n      previousHydratableOnEnteringScopedSingleton = null,\n      NotLoaded = 0,\n      Loaded = 1,\n      Errored = 2,\n      Settled = 3,\n      Inserted = 4,\n      preloadPropsMap = new Map(),\n      preconnectsSet = new Set(),\n      previousDispatcher = ReactDOMSharedInternals.d;\n    ReactDOMSharedInternals.d = {\n      f: function () {\n        var previousWasRendering = previousDispatcher.f(),\n          wasRendering = flushSyncWork$1();\n        return previousWasRendering || wasRendering;\n      },\n      r: function (form) {\n        var formInst = getInstanceFromNode(form);\n        null !== formInst && 5 === formInst.tag && \"form\" === formInst.type\n          ? requestFormReset$1(formInst)\n          : previousDispatcher.r(form);\n      },\n      D: function (href) {\n        previousDispatcher.D(href);\n        preconnectAs(\"dns-prefetch\", href, null);\n      },\n      C: function (href, crossOrigin) {\n        previousDispatcher.C(href, crossOrigin);\n        preconnectAs(\"preconnect\", href, crossOrigin);\n      },\n      L: function (href, as, options) {\n        previousDispatcher.L(href, as, options);\n        var ownerDocument = globalDocument;\n        if (ownerDocument && href && as) {\n          var preloadSelector =\n            'link[rel=\"preload\"][as=\"' +\n            escapeSelectorAttributeValueInsideDoubleQuotes(as) +\n            '\"]';\n          \"image\" === as\n            ? options && options.imageSrcSet\n              ? ((preloadSelector +=\n                  '[imagesrcset=\"' +\n                  escapeSelectorAttributeValueInsideDoubleQuotes(\n                    options.imageSrcSet\n                  ) +\n                  '\"]'),\n                \"string\" === typeof options.imageSizes &&\n                  (preloadSelector +=\n                    '[imagesizes=\"' +\n                    escapeSelectorAttributeValueInsideDoubleQuotes(\n                      options.imageSizes\n                    ) +\n                    '\"]'))\n              : (preloadSelector +=\n                  '[href=\"' +\n                  escapeSelectorAttributeValueInsideDoubleQuotes(href) +\n                  '\"]')\n            : (preloadSelector +=\n                '[href=\"' +\n                escapeSelectorAttributeValueInsideDoubleQuotes(href) +\n                '\"]');\n          var key = preloadSelector;\n          switch (as) {\n            case \"style\":\n              key = getStyleKey(href);\n              break;\n            case \"script\":\n              key = getScriptKey(href);\n          }\n          preloadPropsMap.has(key) ||\n            ((href = assign(\n              {\n                rel: \"preload\",\n                href:\n                  \"image\" === as && options && options.imageSrcSet\n                    ? void 0\n                    : href,\n                as: as\n              },\n              options\n            )),\n            preloadPropsMap.set(key, href),\n            null !== ownerDocument.querySelector(preloadSelector) ||\n              (\"style\" === as &&\n                ownerDocument.querySelector(\n                  getStylesheetSelectorFromKey(key)\n                )) ||\n              (\"script\" === as &&\n                ownerDocument.querySelector(getScriptSelectorFromKey(key))) ||\n              ((as = ownerDocument.createElement(\"link\")),\n              setInitialProperties(as, \"link\", href),\n              markNodeAsHoistable(as),\n              ownerDocument.head.appendChild(as)));\n        }\n      },\n      m: function (href, options) {\n        previousDispatcher.m(href, options);\n        var ownerDocument = globalDocument;\n        if (ownerDocument && href) {\n          var as =\n              options && \"string\" === typeof options.as ? options.as : \"script\",\n            preloadSelector =\n              'link[rel=\"modulepreload\"][as=\"' +\n              escapeSelectorAttributeValueInsideDoubleQuotes(as) +\n              '\"][href=\"' +\n              escapeSelectorAttributeValueInsideDoubleQuotes(href) +\n              '\"]',\n            key = preloadSelector;\n          switch (as) {\n            case \"audioworklet\":\n            case \"paintworklet\":\n            case \"serviceworker\":\n            case \"sharedworker\":\n            case \"worker\":\n            case \"script\":\n              key = getScriptKey(href);\n          }\n          if (\n            !preloadPropsMap.has(key) &&\n            ((href = assign({ rel: \"modulepreload\", href: href }, options)),\n            preloadPropsMap.set(key, href),\n            null === ownerDocument.querySelector(preloadSelector))\n          ) {\n            switch (as) {\n              case \"audioworklet\":\n              case \"paintworklet\":\n              case \"serviceworker\":\n              case \"sharedworker\":\n              case \"worker\":\n              case \"script\":\n                if (ownerDocument.querySelector(getScriptSelectorFromKey(key)))\n                  return;\n            }\n            as = ownerDocument.createElement(\"link\");\n            setInitialProperties(as, \"link\", href);\n            markNodeAsHoistable(as);\n            ownerDocument.head.appendChild(as);\n          }\n        }\n      },\n      X: function (src, options) {\n        previousDispatcher.X(src, options);\n        var ownerDocument = globalDocument;\n        if (ownerDocument && src) {\n          var scripts = getResourcesFromRoot(ownerDocument).hoistableScripts,\n            key = getScriptKey(src),\n            resource = scripts.get(key);\n          resource ||\n            ((resource = ownerDocument.querySelector(\n              getScriptSelectorFromKey(key)\n            )),\n            resource ||\n              ((src = assign({ src: src, async: !0 }, options)),\n              (options = preloadPropsMap.get(key)) &&\n                adoptPreloadPropsForScript(src, options),\n              (resource = ownerDocument.createElement(\"script\")),\n              markNodeAsHoistable(resource),\n              setInitialProperties(resource, \"link\", src),\n              ownerDocument.head.appendChild(resource)),\n            (resource = {\n              type: \"script\",\n              instance: resource,\n              count: 1,\n              state: null\n            }),\n            scripts.set(key, resource));\n        }\n      },\n      S: function (href, precedence, options) {\n        previousDispatcher.S(href, precedence, options);\n        var ownerDocument = globalDocument;\n        if (ownerDocument && href) {\n          var styles = getResourcesFromRoot(ownerDocument).hoistableStyles,\n            key = getStyleKey(href);\n          precedence = precedence || \"default\";\n          var resource = styles.get(key);\n          if (!resource) {\n            var state = { loading: NotLoaded, preload: null };\n            if (\n              (resource = ownerDocument.querySelector(\n                getStylesheetSelectorFromKey(key)\n              ))\n            )\n              state.loading = Loaded | Inserted;\n            else {\n              href = assign(\n                {\n                  rel: \"stylesheet\",\n                  href: href,\n                  \"data-precedence\": precedence\n                },\n                options\n              );\n              (options = preloadPropsMap.get(key)) &&\n                adoptPreloadPropsForStylesheet(href, options);\n              var link = (resource = ownerDocument.createElement(\"link\"));\n              markNodeAsHoistable(link);\n              setInitialProperties(link, \"link\", href);\n              link._p = new Promise(function (resolve, reject) {\n                link.onload = resolve;\n                link.onerror = reject;\n              });\n              link.addEventListener(\"load\", function () {\n                state.loading |= Loaded;\n              });\n              link.addEventListener(\"error\", function () {\n                state.loading |= Errored;\n              });\n              state.loading |= Inserted;\n              insertStylesheet(resource, precedence, ownerDocument);\n            }\n            resource = {\n              type: \"stylesheet\",\n              instance: resource,\n              count: 1,\n              state: state\n            };\n            styles.set(key, resource);\n          }\n        }\n      },\n      M: function (src, options) {\n        previousDispatcher.M(src, options);\n        var ownerDocument = globalDocument;\n        if (ownerDocument && src) {\n          var scripts = getResourcesFromRoot(ownerDocument).hoistableScripts,\n            key = getScriptKey(src),\n            resource = scripts.get(key);\n          resource ||\n            ((resource = ownerDocument.querySelector(\n              getScriptSelectorFromKey(key)\n            )),\n            resource ||\n              ((src = assign({ src: src, async: !0, type: \"module\" }, options)),\n              (options = preloadPropsMap.get(key)) &&\n                adoptPreloadPropsForScript(src, options),\n              (resource = ownerDocument.createElement(\"script\")),\n              markNodeAsHoistable(resource),\n              setInitialProperties(resource, \"link\", src),\n              ownerDocument.head.appendChild(resource)),\n            (resource = {\n              type: \"script\",\n              instance: resource,\n              count: 1,\n              state: null\n            }),\n            scripts.set(key, resource));\n        }\n      }\n    };\n    var globalDocument = \"undefined\" === typeof document ? null : document,\n      tagCaches = null,\n      SUSPENSEY_STYLESHEET_TIMEOUT = 6e4,\n      SUSPENSEY_IMAGE_TIMEOUT = 800,\n      SUSPENSEY_IMAGE_TIME_ESTIMATE = 500,\n      estimatedBytesWithinLimit = 0,\n      LAST_PRECEDENCE = null,\n      precedencesByRoot = null,\n      NotPendingTransition = NotPending,\n      HostTransitionContext = {\n        $$typeof: REACT_CONTEXT_TYPE,\n        Provider: null,\n        Consumer: null,\n        _currentValue: NotPendingTransition,\n        _currentValue2: NotPendingTransition,\n        _threadCount: 0\n      },\n      badgeFormat = \"%c%s%c\",\n      badgeStyle =\n        \"background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px\",\n      resetStyle = \"\",\n      pad = \" \",\n      bind = Function.prototype.bind;\n    var didWarnAboutNestedUpdates = !1;\n    var overrideHookState = null,\n      overrideHookStateDeletePath = null,\n      overrideHookStateRenamePath = null,\n      overrideProps = null,\n      overridePropsDeletePath = null,\n      overridePropsRenamePath = null,\n      scheduleUpdate = null,\n      scheduleRetry = null,\n      setErrorHandler = null,\n      setSuspenseHandler = null;\n    overrideHookState = function (fiber, id, path, value) {\n      id = findHook(fiber, id);\n      null !== id &&\n        ((path = copyWithSetImpl(id.memoizedState, path, 0, value)),\n        (id.memoizedState = path),\n        (id.baseState = path),\n        (fiber.memoizedProps = assign({}, fiber.memoizedProps)),\n        (path = enqueueConcurrentRenderForLane(fiber, 2)),\n        null !== path && scheduleUpdateOnFiber(path, fiber, 2));\n    };\n    overrideHookStateDeletePath = function (fiber, id, path) {\n      id = findHook(fiber, id);\n      null !== id &&\n        ((path = copyWithDeleteImpl(id.memoizedState, path, 0)),\n        (id.memoizedState = path),\n        (id.baseState = path),\n        (fiber.memoizedProps = assign({}, fiber.memoizedProps)),\n        (path = enqueueConcurrentRenderForLane(fiber, 2)),\n        null !== path && scheduleUpdateOnFiber(path, fiber, 2));\n    };\n    overrideHookStateRenamePath = function (fiber, id, oldPath, newPath) {\n      id = findHook(fiber, id);\n      null !== id &&\n        ((oldPath = copyWithRename(id.memoizedState, oldPath, newPath)),\n        (id.memoizedState = oldPath),\n        (id.baseState = oldPath),\n        (fiber.memoizedProps = assign({}, fiber.memoizedProps)),\n        (oldPath = enqueueConcurrentRenderForLane(fiber, 2)),\n        null !== oldPath && scheduleUpdateOnFiber(oldPath, fiber, 2));\n    };\n    overrideProps = function (fiber, path, value) {\n      fiber.pendingProps = copyWithSetImpl(fiber.memoizedProps, path, 0, value);\n      fiber.alternate && (fiber.alternate.pendingProps = fiber.pendingProps);\n      path = enqueueConcurrentRenderForLane(fiber, 2);\n      null !== path && scheduleUpdateOnFiber(path, fiber, 2);\n    };\n    overridePropsDeletePath = function (fiber, path) {\n      fiber.pendingProps = copyWithDeleteImpl(fiber.memoizedProps, path, 0);\n      fiber.alternate && (fiber.alternate.pendingProps = fiber.pendingProps);\n      path = enqueueConcurrentRenderForLane(fiber, 2);\n      null !== path && scheduleUpdateOnFiber(path, fiber, 2);\n    };\n    overridePropsRenamePath = function (fiber, oldPath, newPath) {\n      fiber.pendingProps = copyWithRename(\n        fiber.memoizedProps,\n        oldPath,\n        newPath\n      );\n      fiber.alternate && (fiber.alternate.pendingProps = fiber.pendingProps);\n      oldPath = enqueueConcurrentRenderForLane(fiber, 2);\n      null !== oldPath && scheduleUpdateOnFiber(oldPath, fiber, 2);\n    };\n    scheduleUpdate = function (fiber) {\n      var root = enqueueConcurrentRenderForLane(fiber, 2);\n      null !== root && scheduleUpdateOnFiber(root, fiber, 2);\n    };\n    scheduleRetry = function (fiber) {\n      var lane = claimNextRetryLane(),\n        root = enqueueConcurrentRenderForLane(fiber, lane);\n      null !== root && scheduleUpdateOnFiber(root, fiber, lane);\n    };\n    setErrorHandler = function (newShouldErrorImpl) {\n      shouldErrorImpl = newShouldErrorImpl;\n    };\n    setSuspenseHandler = function (newShouldSuspendImpl) {\n      shouldSuspendImpl = newShouldSuspendImpl;\n    };\n    var _enabled = !0,\n      return_targetInst = null,\n      hasScheduledReplayAttempt = !1,\n      queuedFocus = null,\n      queuedDrag = null,\n      queuedMouse = null,\n      queuedPointers = new Map(),\n      queuedPointerCaptures = new Map(),\n      queuedExplicitHydrationTargets = [],\n      discreteReplayableEvents =\n        \"mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset\".split(\n          \" \"\n        ),\n      lastScheduledReplayQueue = null;\n    ReactDOMHydrationRoot.prototype.render = ReactDOMRoot.prototype.render =\n      function (children) {\n        var root = this._internalRoot;\n        if (null === root) throw Error(\"Cannot update an unmounted root.\");\n        var args = arguments;\n        \"function\" === typeof args[1]\n          ? console.error(\n              \"does not support the second callback argument. To execute a side effect after rendering, declare it in a component body with useEffect().\"\n            )\n          : isValidContainer(args[1])\n            ? console.error(\n                \"You passed a container to the second argument of root.render(...). You don't need to pass it again since you already passed it to create the root.\"\n              )\n            : \"undefined\" !== typeof args[1] &&\n              console.error(\n                \"You passed a second argument to root.render(...) but it only accepts one argument.\"\n              );\n        args = children;\n        var current = root.current,\n          lane = requestUpdateLane(current);\n        updateContainerImpl(current, lane, args, root, null, null);\n      };\n    ReactDOMHydrationRoot.prototype.unmount = ReactDOMRoot.prototype.unmount =\n      function () {\n        var args = arguments;\n        \"function\" === typeof args[0] &&\n          console.error(\n            \"does not support a callback argument. To execute a side effect after rendering, declare it in a component body with useEffect().\"\n          );\n        args = this._internalRoot;\n        if (null !== args) {\n          this._internalRoot = null;\n          var container = args.containerInfo;\n          (executionContext & (RenderContext | CommitContext)) !== NoContext &&\n            console.error(\n              \"Attempted to synchronously unmount a root while React was already rendering. React cannot finish unmounting the root until the current render has completed, which may lead to a race condition.\"\n            );\n          updateContainerImpl(args.current, 2, null, args, null, null);\n          flushSyncWork$1();\n          container[internalContainerInstanceKey] = null;\n        }\n      };\n    ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (\n      target\n    ) {\n      if (target) {\n        var updatePriority = resolveUpdatePriority();\n        target = { blockedOn: null, target: target, priority: updatePriority };\n        for (\n          var i = 0;\n          i < queuedExplicitHydrationTargets.length &&\n          0 !== updatePriority &&\n          updatePriority < queuedExplicitHydrationTargets[i].priority;\n          i++\n        );\n        queuedExplicitHydrationTargets.splice(i, 0, target);\n        0 === i && attemptExplicitHydrationTarget(target);\n      }\n    };\n    (function () {\n      var isomorphicReactPackageVersion = React.version;\n      if (\"19.2.8\" !== isomorphicReactPackageVersion)\n        throw Error(\n          'Incompatible React versions: The \"react\" and \"react-dom\" packages must have the exact same version. Instead got:\\n  - react:      ' +\n            (isomorphicReactPackageVersion +\n              \"\\n  - react-dom:  19.2.8\\nLearn more: https://react.dev/warnings/version-mismatch\")\n        );\n    })();\n    (\"function\" === typeof Map &&\n      null != Map.prototype &&\n      \"function\" === typeof Map.prototype.forEach &&\n      \"function\" === typeof Set &&\n      null != Set.prototype &&\n      \"function\" === typeof Set.prototype.clear &&\n      \"function\" === typeof Set.prototype.forEach) ||\n      console.error(\n        \"React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://react.dev/link/react-polyfills\"\n      );\n    ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {\n      var fiber = componentOrElement._reactInternals;\n      if (void 0 === fiber) {\n        if (\"function\" === typeof componentOrElement.render)\n          throw Error(\"Unable to find node on an unmounted component.\");\n        componentOrElement = Object.keys(componentOrElement).join(\",\");\n        throw Error(\n          \"Argument appears to not be a ReactComponent. Keys: \" +\n            componentOrElement\n        );\n      }\n      componentOrElement = findCurrentFiberUsingSlowPath(fiber);\n      componentOrElement =\n        null !== componentOrElement\n          ? findCurrentHostFiberImpl(componentOrElement)\n          : null;\n      componentOrElement =\n        null === componentOrElement ? null : componentOrElement.stateNode;\n      return componentOrElement;\n    };\n    if (\n      !(function () {\n        var internals = {\n          bundleType: 1,\n          version: \"19.2.8\",\n          rendererPackageName: \"react-dom\",\n          currentDispatcherRef: ReactSharedInternals,\n          reconcilerVersion: \"19.2.8\"\n        };\n        internals.overrideHookState = overrideHookState;\n        internals.overrideHookStateDeletePath = overrideHookStateDeletePath;\n        internals.overrideHookStateRenamePath = overrideHookStateRenamePath;\n        internals.overrideProps = overrideProps;\n        internals.overridePropsDeletePath = overridePropsDeletePath;\n        internals.overridePropsRenamePath = overridePropsRenamePath;\n        internals.scheduleUpdate = scheduleUpdate;\n        internals.scheduleRetry = scheduleRetry;\n        internals.setErrorHandler = setErrorHandler;\n        internals.setSuspenseHandler = setSuspenseHandler;\n        internals.scheduleRefresh = scheduleRefresh;\n        internals.scheduleRoot = scheduleRoot;\n        internals.setRefreshHandler = setRefreshHandler;\n        internals.getCurrentFiber = getCurrentFiberForDevTools;\n        return injectInternals(internals);\n      })() &&\n      canUseDOM &&\n      window.top === window.self &&\n      ((-1 < navigator.userAgent.indexOf(\"Chrome\") &&\n        -1 === navigator.userAgent.indexOf(\"Edge\")) ||\n        -1 < navigator.userAgent.indexOf(\"Firefox\"))\n    ) {\n      var protocol = window.location.protocol;\n      /^(https?|file):$/.test(protocol) &&\n        console.info(\n          \"%cDownload the React DevTools for a better development experience: https://react.dev/link/react-devtools\" +\n            (\"file:\" === protocol\n              ? \"\\nYou might need to use a local HTTP server (instead of file://): https://react.dev/link/react-devtools-faq\"\n              : \"\"),\n          \"font-weight:bold\"\n        );\n    }\n    exports.createRoot = function (container, options) {\n      if (!isValidContainer(container))\n        throw Error(\"Target container is not a DOM element.\");\n      warnIfReactDOMContainerInDEV(container);\n      var isStrictMode = !1,\n        identifierPrefix = \"\",\n        onUncaughtError = defaultOnUncaughtError,\n        onCaughtError = defaultOnCaughtError,\n        onRecoverableError = defaultOnRecoverableError;\n      null !== options &&\n        void 0 !== options &&\n        (options.hydrate\n          ? console.warn(\n              \"hydrate through createRoot is deprecated. Use ReactDOMClient.hydrateRoot(container, <App />) instead.\"\n            )\n          : \"object\" === typeof options &&\n            null !== options &&\n            options.$$typeof === REACT_ELEMENT_TYPE &&\n            console.error(\n              \"You passed a JSX element to createRoot. You probably meant to call root.render instead. Example usage:\\n\\n  let root = createRoot(domContainer);\\n  root.render(<App />);\"\n            ),\n        !0 === options.unstable_strictMode && (isStrictMode = !0),\n        void 0 !== options.identifierPrefix &&\n          (identifierPrefix = options.identifierPrefix),\n        void 0 !== options.onUncaughtError &&\n          (onUncaughtError = options.onUncaughtError),\n        void 0 !== options.onCaughtError &&\n          (onCaughtError = options.onCaughtError),\n        void 0 !== options.onRecoverableError &&\n          (onRecoverableError = options.onRecoverableError));\n      options = createFiberRoot(\n        container,\n        1,\n        !1,\n        null,\n        null,\n        isStrictMode,\n        identifierPrefix,\n        null,\n        onUncaughtError,\n        onCaughtError,\n        onRecoverableError,\n        defaultOnDefaultTransitionIndicator\n      );\n      container[internalContainerInstanceKey] = options.current;\n      listenToAllSupportedEvents(container);\n      return new ReactDOMRoot(options);\n    };\n    exports.hydrateRoot = function (container, initialChildren, options) {\n      if (!isValidContainer(container))\n        throw Error(\"Target container is not a DOM element.\");\n      warnIfReactDOMContainerInDEV(container);\n      void 0 === initialChildren &&\n        console.error(\n          \"Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)\"\n        );\n      var isStrictMode = !1,\n        identifierPrefix = \"\",\n        onUncaughtError = defaultOnUncaughtError,\n        onCaughtError = defaultOnCaughtError,\n        onRecoverableError = defaultOnRecoverableError,\n        formState = null;\n      null !== options &&\n        void 0 !== options &&\n        (!0 === options.unstable_strictMode && (isStrictMode = !0),\n        void 0 !== options.identifierPrefix &&\n          (identifierPrefix = options.identifierPrefix),\n        void 0 !== options.onUncaughtError &&\n          (onUncaughtError = options.onUncaughtError),\n        void 0 !== options.onCaughtError &&\n          (onCaughtError = options.onCaughtError),\n        void 0 !== options.onRecoverableError &&\n          (onRecoverableError = options.onRecoverableError),\n        void 0 !== options.formState && (formState = options.formState));\n      initialChildren = createFiberRoot(\n        container,\n        1,\n        !0,\n        initialChildren,\n        null != options ? options : null,\n        isStrictMode,\n        identifierPrefix,\n        formState,\n        onUncaughtError,\n        onCaughtError,\n        onRecoverableError,\n        defaultOnDefaultTransitionIndicator\n      );\n      initialChildren.context = getContextForSubtree(null);\n      options = initialChildren.current;\n      isStrictMode = requestUpdateLane(options);\n      isStrictMode = getBumpedLaneForHydrationByLane(isStrictMode);\n      identifierPrefix = createUpdate(isStrictMode);\n      identifierPrefix.callback = null;\n      enqueueUpdate(options, identifierPrefix, isStrictMode);\n      startUpdateTimerByLane(isStrictMode, \"hydrateRoot()\", null);\n      options = isStrictMode;\n      initialChildren.current.lanes = options;\n      markRootUpdated$1(initialChildren, options);\n      ensureRootIsScheduled(initialChildren);\n      container[internalContainerInstanceKey] = initialChildren.current;\n      listenToAllSupportedEvents(container);\n      return new ReactDOMHydrationRoot(initialChildren);\n    };\n    exports.version = \"19.2.8\";\n    \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n      \"function\" ===\n        typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&\n      __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());\n  })();\n", "'use strict';\n\nfunction checkDCE() {\n  /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\n  if (\n    typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' ||\n    typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function'\n  ) {\n    return;\n  }\n  if (process.env.NODE_ENV !== 'production') {\n    // This branch is unreachable because this function is only called\n    // in production, but the condition is true only in development.\n    // Therefore if the branch is still here, dead code elimination wasn't\n    // properly applied.\n    // Don't change the message. React DevTools relies on it. Also make sure\n    // this message doesn't occur elsewhere in this function, or it will cause\n    // a false positive.\n    throw new Error('^_^');\n  }\n  try {\n    // Verify that the code above has been dead code eliminated (DCE'd).\n    __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);\n  } catch (err) {\n    // DevTools shouldn't crash React, no matter what.\n    // We should still report in case we break this code.\n    console.error(err);\n  }\n}\n\nif (process.env.NODE_ENV === 'production') {\n  // DCE check should happen before ReactDOM bundle executes so that\n  // DevTools can report bad minification during injection.\n  checkDCE();\n  module.exports = require('./cjs/react-dom-client.production.js');\n} else {\n  module.exports = require('./cjs/react-dom-client.development.js');\n}\n", "/** @license React v16.13.1\n * react-is.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n\n\nif (process.env.NODE_ENV !== \"production\") {\n  (function() {\n'use strict';\n\n// The Symbol used to tag the ReactElement-like types. If there is no native Symbol\n// nor polyfill, then a plain number is used for performance.\nvar hasSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;\nvar REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;\nvar REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;\nvar REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;\nvar REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;\nvar REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;\nvar REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary\n// (unstable) APIs that have been removed. Can we remove the symbols?\n\nvar REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;\nvar REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;\nvar REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;\nvar REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;\nvar REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;\nvar REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;\nvar REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;\nvar REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;\nvar REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;\nvar REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;\nvar REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;\n\nfunction isValidElementType(type) {\n  return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.\n  type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);\n}\n\nfunction typeOf(object) {\n  if (typeof object === 'object' && object !== null) {\n    var $$typeof = object.$$typeof;\n\n    switch ($$typeof) {\n      case REACT_ELEMENT_TYPE:\n        var type = object.type;\n\n        switch (type) {\n          case REACT_ASYNC_MODE_TYPE:\n          case REACT_CONCURRENT_MODE_TYPE:\n          case REACT_FRAGMENT_TYPE:\n          case REACT_PROFILER_TYPE:\n          case REACT_STRICT_MODE_TYPE:\n          case REACT_SUSPENSE_TYPE:\n            return type;\n\n          default:\n            var $$typeofType = type && type.$$typeof;\n\n            switch ($$typeofType) {\n              case REACT_CONTEXT_TYPE:\n              case REACT_FORWARD_REF_TYPE:\n              case REACT_LAZY_TYPE:\n              case REACT_MEMO_TYPE:\n              case REACT_PROVIDER_TYPE:\n                return $$typeofType;\n\n              default:\n                return $$typeof;\n            }\n\n        }\n\n      case REACT_PORTAL_TYPE:\n        return $$typeof;\n    }\n  }\n\n  return undefined;\n} // AsyncMode is deprecated along with isAsyncMode\n\nvar AsyncMode = REACT_ASYNC_MODE_TYPE;\nvar ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;\nvar ContextConsumer = REACT_CONTEXT_TYPE;\nvar ContextProvider = REACT_PROVIDER_TYPE;\nvar Element = REACT_ELEMENT_TYPE;\nvar ForwardRef = REACT_FORWARD_REF_TYPE;\nvar Fragment = REACT_FRAGMENT_TYPE;\nvar Lazy = REACT_LAZY_TYPE;\nvar Memo = REACT_MEMO_TYPE;\nvar Portal = REACT_PORTAL_TYPE;\nvar Profiler = REACT_PROFILER_TYPE;\nvar StrictMode = REACT_STRICT_MODE_TYPE;\nvar Suspense = REACT_SUSPENSE_TYPE;\nvar hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated\n\nfunction isAsyncMode(object) {\n  {\n    if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n      hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint\n\n      console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n    }\n  }\n\n  return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}\nfunction isConcurrentMode(object) {\n  return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;\n}\nfunction isContextConsumer(object) {\n  return typeOf(object) === REACT_CONTEXT_TYPE;\n}\nfunction isContextProvider(object) {\n  return typeOf(object) === REACT_PROVIDER_TYPE;\n}\nfunction isElement(object) {\n  return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n}\nfunction isForwardRef(object) {\n  return typeOf(object) === REACT_FORWARD_REF_TYPE;\n}\nfunction isFragment(object) {\n  return typeOf(object) === REACT_FRAGMENT_TYPE;\n}\nfunction isLazy(object) {\n  return typeOf(object) === REACT_LAZY_TYPE;\n}\nfunction isMemo(object) {\n  return typeOf(object) === REACT_MEMO_TYPE;\n}\nfunction isPortal(object) {\n  return typeOf(object) === REACT_PORTAL_TYPE;\n}\nfunction isProfiler(object) {\n  return typeOf(object) === REACT_PROFILER_TYPE;\n}\nfunction isStrictMode(object) {\n  return typeOf(object) === REACT_STRICT_MODE_TYPE;\n}\nfunction isSuspense(object) {\n  return typeOf(object) === REACT_SUSPENSE_TYPE;\n}\n\nexports.AsyncMode = AsyncMode;\nexports.ConcurrentMode = ConcurrentMode;\nexports.ContextConsumer = ContextConsumer;\nexports.ContextProvider = ContextProvider;\nexports.Element = Element;\nexports.ForwardRef = ForwardRef;\nexports.Fragment = Fragment;\nexports.Lazy = Lazy;\nexports.Memo = Memo;\nexports.Portal = Portal;\nexports.Profiler = Profiler;\nexports.StrictMode = StrictMode;\nexports.Suspense = Suspense;\nexports.isAsyncMode = isAsyncMode;\nexports.isConcurrentMode = isConcurrentMode;\nexports.isContextConsumer = isContextConsumer;\nexports.isContextProvider = isContextProvider;\nexports.isElement = isElement;\nexports.isForwardRef = isForwardRef;\nexports.isFragment = isFragment;\nexports.isLazy = isLazy;\nexports.isMemo = isMemo;\nexports.isPortal = isPortal;\nexports.isProfiler = isProfiler;\nexports.isStrictMode = isStrictMode;\nexports.isSuspense = isSuspense;\nexports.isValidElementType = isValidElementType;\nexports.typeOf = typeOf;\n  })();\n}\n", "'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n  module.exports = require('./cjs/react-is.production.min.js');\n} else {\n  module.exports = require('./cjs/react-is.development.js');\n}\n", "/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc');  // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n", "/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n", "module.exports = Function.call.bind(Object.prototype.hasOwnProperty);\n", "/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar printWarning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n  var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n  var loggedTypeFailures = {};\n  var has = require('./lib/has');\n\n  printWarning = function(text) {\n    var message = 'Warning: ' + text;\n    if (typeof console !== 'undefined') {\n      console.error(message);\n    }\n    try {\n      // --- Welcome to debugging React ---\n      // This error was thrown as a convenience so that you can use this stack\n      // to find the callsite that caused this warning to fire.\n      throw new Error(message);\n    } catch (x) { /**/ }\n  };\n}\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n * @private\n */\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n  if (process.env.NODE_ENV !== 'production') {\n    for (var typeSpecName in typeSpecs) {\n      if (has(typeSpecs, typeSpecName)) {\n        var error;\n        // Prop type validation may throw. In case they do, we don't want to\n        // fail the render phase where it didn't fail before. So we log it.\n        // After these have been cleaned up, we'll let them throw.\n        try {\n          // This is intentionally an invariant that gets caught. It's the same\n          // behavior as without this statement except with a better message.\n          if (typeof typeSpecs[typeSpecName] !== 'function') {\n            var err = Error(\n              (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +\n              'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +\n              'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'\n            );\n            err.name = 'Invariant Violation';\n            throw err;\n          }\n          error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n        } catch (ex) {\n          error = ex;\n        }\n        if (error && !(error instanceof Error)) {\n          printWarning(\n            (componentName || 'React class') + ': type specification of ' +\n            location + ' `' + typeSpecName + '` is invalid; the type checker ' +\n            'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +\n            'You may have forgotten to pass an argument to the type checker ' +\n            'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +\n            'shape all require an argument).'\n          );\n        }\n        if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n          // Only monitor this failure once because there tends to be a lot of the\n          // same error.\n          loggedTypeFailures[error.message] = true;\n\n          var stack = getStack ? getStack() : '';\n\n          printWarning(\n            'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')\n          );\n        }\n      }\n    }\n  }\n}\n\n/**\n * Resets warning cache when testing.\n *\n * @private\n */\ncheckPropTypes.resetWarningCache = function() {\n  if (process.env.NODE_ENV !== 'production') {\n    loggedTypeFailures = {};\n  }\n}\n\nmodule.exports = checkPropTypes;\n", "/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactIs = require('react-is');\nvar assign = require('object-assign');\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\nvar has = require('./lib/has');\nvar checkPropTypes = require('./checkPropTypes');\n\nvar printWarning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n  printWarning = function(text) {\n    var message = 'Warning: ' + text;\n    if (typeof console !== 'undefined') {\n      console.error(message);\n    }\n    try {\n      // --- Welcome to debugging React ---\n      // This error was thrown as a convenience so that you can use this stack\n      // to find the callsite that caused this warning to fire.\n      throw new Error(message);\n    } catch (x) {}\n  };\n}\n\nfunction emptyFunctionThatReturnsNull() {\n  return null;\n}\n\nmodule.exports = function(isValidElement, throwOnDirectAccess) {\n  /* global Symbol */\n  var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n  var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n  /**\n   * Returns the iterator method function contained on the iterable object.\n   *\n   * Be sure to invoke the function with the iterable as context:\n   *\n   *     var iteratorFn = getIteratorFn(myIterable);\n   *     if (iteratorFn) {\n   *       var iterator = iteratorFn.call(myIterable);\n   *       ...\n   *     }\n   *\n   * @param {?object} maybeIterable\n   * @return {?function}\n   */\n  function getIteratorFn(maybeIterable) {\n    var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n    if (typeof iteratorFn === 'function') {\n      return iteratorFn;\n    }\n  }\n\n  /**\n   * Collection of methods that allow declaration and validation of props that are\n   * supplied to React components. Example usage:\n   *\n   *   var Props = require('ReactPropTypes');\n   *   var MyArticle = React.createClass({\n   *     propTypes: {\n   *       // An optional string prop named \"description\".\n   *       description: Props.string,\n   *\n   *       // A required enum prop named \"category\".\n   *       category: Props.oneOf(['News','Photos']).isRequired,\n   *\n   *       // A prop named \"dialog\" that requires an instance of Dialog.\n   *       dialog: Props.instanceOf(Dialog).isRequired\n   *     },\n   *     render: function() { ... }\n   *   });\n   *\n   * A more formal specification of how these methods are used:\n   *\n   *   type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n   *   decl := ReactPropTypes.{type}(.isRequired)?\n   *\n   * Each and every declaration produces a function with the same signature. This\n   * allows the creation of custom validation functions. For example:\n   *\n   *  var MyLink = React.createClass({\n   *    propTypes: {\n   *      // An optional string or URI prop named \"href\".\n   *      href: function(props, propName, componentName) {\n   *        var propValue = props[propName];\n   *        if (propValue != null && typeof propValue !== 'string' &&\n   *            !(propValue instanceof URI)) {\n   *          return new Error(\n   *            'Expected a string or an URI for ' + propName + ' in ' +\n   *            componentName\n   *          );\n   *        }\n   *      }\n   *    },\n   *    render: function() {...}\n   *  });\n   *\n   * @internal\n   */\n\n  var ANONYMOUS = '<<anonymous>>';\n\n  // Important!\n  // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n  var ReactPropTypes = {\n    array: createPrimitiveTypeChecker('array'),\n    bigint: createPrimitiveTypeChecker('bigint'),\n    bool: createPrimitiveTypeChecker('boolean'),\n    func: createPrimitiveTypeChecker('function'),\n    number: createPrimitiveTypeChecker('number'),\n    object: createPrimitiveTypeChecker('object'),\n    string: createPrimitiveTypeChecker('string'),\n    symbol: createPrimitiveTypeChecker('symbol'),\n\n    any: createAnyTypeChecker(),\n    arrayOf: createArrayOfTypeChecker,\n    element: createElementTypeChecker(),\n    elementType: createElementTypeTypeChecker(),\n    instanceOf: createInstanceTypeChecker,\n    node: createNodeChecker(),\n    objectOf: createObjectOfTypeChecker,\n    oneOf: createEnumTypeChecker,\n    oneOfType: createUnionTypeChecker,\n    shape: createShapeTypeChecker,\n    exact: createStrictShapeTypeChecker,\n  };\n\n  /**\n   * inlined Object.is polyfill to avoid requiring consumers ship their own\n   * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n   */\n  /*eslint-disable no-self-compare*/\n  function is(x, y) {\n    // SameValue algorithm\n    if (x === y) {\n      // Steps 1-5, 7-10\n      // Steps 6.b-6.e: +0 != -0\n      return x !== 0 || 1 / x === 1 / y;\n    } else {\n      // Step 6.a: NaN == NaN\n      return x !== x && y !== y;\n    }\n  }\n  /*eslint-enable no-self-compare*/\n\n  /**\n   * We use an Error-like object for backward compatibility as people may call\n   * PropTypes directly and inspect their output. However, we don't use real\n   * Errors anymore. We don't inspect their stack anyway, and creating them\n   * is prohibitively expensive if they are created too often, such as what\n   * happens in oneOfType() for any type before the one that matched.\n   */\n  function PropTypeError(message, data) {\n    this.message = message;\n    this.data = data && typeof data === 'object' ? data: {};\n    this.stack = '';\n  }\n  // Make `instanceof Error` still work for returned errors.\n  PropTypeError.prototype = Error.prototype;\n\n  function createChainableTypeChecker(validate) {\n    if (process.env.NODE_ENV !== 'production') {\n      var manualPropTypeCallCache = {};\n      var manualPropTypeWarningCount = 0;\n    }\n    function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n      componentName = componentName || ANONYMOUS;\n      propFullName = propFullName || propName;\n\n      if (secret !== ReactPropTypesSecret) {\n        if (throwOnDirectAccess) {\n          // New behavior only for users of `prop-types` package\n          var err = new Error(\n            'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n            'Use `PropTypes.checkPropTypes()` to call them. ' +\n            'Read more at http://fb.me/use-check-prop-types'\n          );\n          err.name = 'Invariant Violation';\n          throw err;\n        } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {\n          // Old behavior for people using React.PropTypes\n          var cacheKey = componentName + ':' + propName;\n          if (\n            !manualPropTypeCallCache[cacheKey] &&\n            // Avoid spamming the console because they are often not actionable except for lib authors\n            manualPropTypeWarningCount < 3\n          ) {\n            printWarning(\n              'You are manually calling a React.PropTypes validation ' +\n              'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +\n              'and will throw in the standalone `prop-types` package. ' +\n              'You may be seeing this warning due to a third-party PropTypes ' +\n              'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'\n            );\n            manualPropTypeCallCache[cacheKey] = true;\n            manualPropTypeWarningCount++;\n          }\n        }\n      }\n      if (props[propName] == null) {\n        if (isRequired) {\n          if (props[propName] === null) {\n            return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n          }\n          return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n        }\n        return null;\n      } else {\n        return validate(props, propName, componentName, location, propFullName);\n      }\n    }\n\n    var chainedCheckType = checkType.bind(null, false);\n    chainedCheckType.isRequired = checkType.bind(null, true);\n\n    return chainedCheckType;\n  }\n\n  function createPrimitiveTypeChecker(expectedType) {\n    function validate(props, propName, componentName, location, propFullName, secret) {\n      var propValue = props[propName];\n      var propType = getPropType(propValue);\n      if (propType !== expectedType) {\n        // `propValue` being instance of, say, date/regexp, pass the 'object'\n        // check, but we can offer a more precise error message here rather than\n        // 'of type `object`'.\n        var preciseType = getPreciseType(propValue);\n\n        return new PropTypeError(\n          'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),\n          {expectedType: expectedType}\n        );\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createAnyTypeChecker() {\n    return createChainableTypeChecker(emptyFunctionThatReturnsNull);\n  }\n\n  function createArrayOfTypeChecker(typeChecker) {\n    function validate(props, propName, componentName, location, propFullName) {\n      if (typeof typeChecker !== 'function') {\n        return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n      }\n      var propValue = props[propName];\n      if (!Array.isArray(propValue)) {\n        var propType = getPropType(propValue);\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n      }\n      for (var i = 0; i < propValue.length; i++) {\n        var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n        if (error instanceof Error) {\n          return error;\n        }\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createElementTypeChecker() {\n    function validate(props, propName, componentName, location, propFullName) {\n      var propValue = props[propName];\n      if (!isValidElement(propValue)) {\n        var propType = getPropType(propValue);\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createElementTypeTypeChecker() {\n    function validate(props, propName, componentName, location, propFullName) {\n      var propValue = props[propName];\n      if (!ReactIs.isValidElementType(propValue)) {\n        var propType = getPropType(propValue);\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createInstanceTypeChecker(expectedClass) {\n    function validate(props, propName, componentName, location, propFullName) {\n      if (!(props[propName] instanceof expectedClass)) {\n        var expectedClassName = expectedClass.name || ANONYMOUS;\n        var actualClassName = getClassName(props[propName]);\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createEnumTypeChecker(expectedValues) {\n    if (!Array.isArray(expectedValues)) {\n      if (process.env.NODE_ENV !== 'production') {\n        if (arguments.length > 1) {\n          printWarning(\n            'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +\n            'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'\n          );\n        } else {\n          printWarning('Invalid argument supplied to oneOf, expected an array.');\n        }\n      }\n      return emptyFunctionThatReturnsNull;\n    }\n\n    function validate(props, propName, componentName, location, propFullName) {\n      var propValue = props[propName];\n      for (var i = 0; i < expectedValues.length; i++) {\n        if (is(propValue, expectedValues[i])) {\n          return null;\n        }\n      }\n\n      var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {\n        var type = getPreciseType(value);\n        if (type === 'symbol') {\n          return String(value);\n        }\n        return value;\n      });\n      return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createObjectOfTypeChecker(typeChecker) {\n    function validate(props, propName, componentName, location, propFullName) {\n      if (typeof typeChecker !== 'function') {\n        return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n      }\n      var propValue = props[propName];\n      var propType = getPropType(propValue);\n      if (propType !== 'object') {\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n      }\n      for (var key in propValue) {\n        if (has(propValue, key)) {\n          var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n          if (error instanceof Error) {\n            return error;\n          }\n        }\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createUnionTypeChecker(arrayOfTypeCheckers) {\n    if (!Array.isArray(arrayOfTypeCheckers)) {\n      process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;\n      return emptyFunctionThatReturnsNull;\n    }\n\n    for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n      var checker = arrayOfTypeCheckers[i];\n      if (typeof checker !== 'function') {\n        printWarning(\n          'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +\n          'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'\n        );\n        return emptyFunctionThatReturnsNull;\n      }\n    }\n\n    function validate(props, propName, componentName, location, propFullName) {\n      var expectedTypes = [];\n      for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n        var checker = arrayOfTypeCheckers[i];\n        var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);\n        if (checkerResult == null) {\n          return null;\n        }\n        if (checkerResult.data && has(checkerResult.data, 'expectedType')) {\n          expectedTypes.push(checkerResult.data.expectedType);\n        }\n      }\n      var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';\n      return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createNodeChecker() {\n    function validate(props, propName, componentName, location, propFullName) {\n      if (!isNode(props[propName])) {\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function invalidValidatorError(componentName, location, propFullName, key, type) {\n    return new PropTypeError(\n      (componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +\n      'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'\n    );\n  }\n\n  function createShapeTypeChecker(shapeTypes) {\n    function validate(props, propName, componentName, location, propFullName) {\n      var propValue = props[propName];\n      var propType = getPropType(propValue);\n      if (propType !== 'object') {\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n      }\n      for (var key in shapeTypes) {\n        var checker = shapeTypes[key];\n        if (typeof checker !== 'function') {\n          return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));\n        }\n        var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n        if (error) {\n          return error;\n        }\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createStrictShapeTypeChecker(shapeTypes) {\n    function validate(props, propName, componentName, location, propFullName) {\n      var propValue = props[propName];\n      var propType = getPropType(propValue);\n      if (propType !== 'object') {\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n      }\n      // We need to check all keys in case some are required but missing from props.\n      var allKeys = assign({}, props[propName], shapeTypes);\n      for (var key in allKeys) {\n        var checker = shapeTypes[key];\n        if (has(shapeTypes, key) && typeof checker !== 'function') {\n          return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));\n        }\n        if (!checker) {\n          return new PropTypeError(\n            'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +\n            '\\nBad object: ' + JSON.stringify(props[propName], null, '  ') +\n            '\\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, '  ')\n          );\n        }\n        var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n        if (error) {\n          return error;\n        }\n      }\n      return null;\n    }\n\n    return createChainableTypeChecker(validate);\n  }\n\n  function isNode(propValue) {\n    switch (typeof propValue) {\n      case 'number':\n      case 'string':\n      case 'undefined':\n        return true;\n      case 'boolean':\n        return !propValue;\n      case 'object':\n        if (Array.isArray(propValue)) {\n          return propValue.every(isNode);\n        }\n        if (propValue === null || isValidElement(propValue)) {\n          return true;\n        }\n\n        var iteratorFn = getIteratorFn(propValue);\n        if (iteratorFn) {\n          var iterator = iteratorFn.call(propValue);\n          var step;\n          if (iteratorFn !== propValue.entries) {\n            while (!(step = iterator.next()).done) {\n              if (!isNode(step.value)) {\n                return false;\n              }\n            }\n          } else {\n            // Iterator will provide entry [k,v] tuples rather than values.\n            while (!(step = iterator.next()).done) {\n              var entry = step.value;\n              if (entry) {\n                if (!isNode(entry[1])) {\n                  return false;\n                }\n              }\n            }\n          }\n        } else {\n          return false;\n        }\n\n        return true;\n      default:\n        return false;\n    }\n  }\n\n  function isSymbol(propType, propValue) {\n    // Native Symbol.\n    if (propType === 'symbol') {\n      return true;\n    }\n\n    // falsy value can't be a Symbol\n    if (!propValue) {\n      return false;\n    }\n\n    // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n    if (propValue['@@toStringTag'] === 'Symbol') {\n      return true;\n    }\n\n    // Fallback for non-spec compliant Symbols which are polyfilled.\n    if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n      return true;\n    }\n\n    return false;\n  }\n\n  // Equivalent of `typeof` but with special handling for array and regexp.\n  function getPropType(propValue) {\n    var propType = typeof propValue;\n    if (Array.isArray(propValue)) {\n      return 'array';\n    }\n    if (propValue instanceof RegExp) {\n      // Old webkits (at least until Android 4.0) return 'function' rather than\n      // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n      // passes PropTypes.object.\n      return 'object';\n    }\n    if (isSymbol(propType, propValue)) {\n      return 'symbol';\n    }\n    return propType;\n  }\n\n  // This handles more types than `getPropType`. Only used for error messages.\n  // See `createPrimitiveTypeChecker`.\n  function getPreciseType(propValue) {\n    if (typeof propValue === 'undefined' || propValue === null) {\n      return '' + propValue;\n    }\n    var propType = getPropType(propValue);\n    if (propType === 'object') {\n      if (propValue instanceof Date) {\n        return 'date';\n      } else if (propValue instanceof RegExp) {\n        return 'regexp';\n      }\n    }\n    return propType;\n  }\n\n  // Returns a string that is postfixed to a warning about an invalid type.\n  // For example, \"undefined\" or \"of type array\"\n  function getPostfixForTypeWarning(value) {\n    var type = getPreciseType(value);\n    switch (type) {\n      case 'array':\n      case 'object':\n        return 'an ' + type;\n      case 'boolean':\n      case 'date':\n      case 'regexp':\n        return 'a ' + type;\n      default:\n        return type;\n    }\n  }\n\n  // Returns class name of the object, if any.\n  function getClassName(propValue) {\n    if (!propValue.constructor || !propValue.constructor.name) {\n      return ANONYMOUS;\n    }\n    return propValue.constructor.name;\n  }\n\n  ReactPropTypes.checkPropTypes = checkPropTypes;\n  ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;\n  ReactPropTypes.PropTypes = ReactPropTypes;\n\n  return ReactPropTypes;\n};\n", "/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n  var ReactIs = require('react-is');\n\n  // By explicitly using `prop-types` you are opting into new development behavior.\n  // http://fb.me/prop-types-in-prod\n  var throwOnDirectAccess = true;\n  module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n  // By explicitly using `prop-types` you are opting into new production behavior.\n  // http://fb.me/prop-types-in-prod\n  module.exports = require('./factoryWithThrowingShims')();\n}\n", "//! moment.js\n//! version : 2.30.1\n//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n//! license : MIT\n//! momentjs.com\n\n;(function (global, factory) {\n    typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n    typeof define === 'function' && define.amd ? define(factory) :\n    global.moment = factory()\n}(this, (function () { 'use strict';\n\n    var hookCallback;\n\n    function hooks() {\n        return hookCallback.apply(null, arguments);\n    }\n\n    // This is done to register the method called with moment()\n    // without creating circular dependencies.\n    function setHookCallback(callback) {\n        hookCallback = callback;\n    }\n\n    function isArray(input) {\n        return (\n            input instanceof Array ||\n            Object.prototype.toString.call(input) === '[object Array]'\n        );\n    }\n\n    function isObject(input) {\n        // IE8 will treat undefined and null as object if it wasn't for\n        // input != null\n        return (\n            input != null &&\n            Object.prototype.toString.call(input) === '[object Object]'\n        );\n    }\n\n    function hasOwnProp(a, b) {\n        return Object.prototype.hasOwnProperty.call(a, b);\n    }\n\n    function isObjectEmpty(obj) {\n        if (Object.getOwnPropertyNames) {\n            return Object.getOwnPropertyNames(obj).length === 0;\n        } else {\n            var k;\n            for (k in obj) {\n                if (hasOwnProp(obj, k)) {\n                    return false;\n                }\n            }\n            return true;\n        }\n    }\n\n    function isUndefined(input) {\n        return input === void 0;\n    }\n\n    function isNumber(input) {\n        return (\n            typeof input === 'number' ||\n            Object.prototype.toString.call(input) === '[object Number]'\n        );\n    }\n\n    function isDate(input) {\n        return (\n            input instanceof Date ||\n            Object.prototype.toString.call(input) === '[object Date]'\n        );\n    }\n\n    function map(arr, fn) {\n        var res = [],\n            i,\n            arrLen = arr.length;\n        for (i = 0; i < arrLen; ++i) {\n            res.push(fn(arr[i], i));\n        }\n        return res;\n    }\n\n    function extend(a, b) {\n        for (var i in b) {\n            if (hasOwnProp(b, i)) {\n                a[i] = b[i];\n            }\n        }\n\n        if (hasOwnProp(b, 'toString')) {\n            a.toString = b.toString;\n        }\n\n        if (hasOwnProp(b, 'valueOf')) {\n            a.valueOf = b.valueOf;\n        }\n\n        return a;\n    }\n\n    function createUTC(input, format, locale, strict) {\n        return createLocalOrUTC(input, format, locale, strict, true).utc();\n    }\n\n    function defaultParsingFlags() {\n        // We need to deep clone this object.\n        return {\n            empty: false,\n            unusedTokens: [],\n            unusedInput: [],\n            overflow: -2,\n            charsLeftOver: 0,\n            nullInput: false,\n            invalidEra: null,\n            invalidMonth: null,\n            invalidFormat: false,\n            userInvalidated: false,\n            iso: false,\n            parsedDateParts: [],\n            era: null,\n            meridiem: null,\n            rfc2822: false,\n            weekdayMismatch: false,\n        };\n    }\n\n    function getParsingFlags(m) {\n        if (m._pf == null) {\n            m._pf = defaultParsingFlags();\n        }\n        return m._pf;\n    }\n\n    var some;\n    if (Array.prototype.some) {\n        some = Array.prototype.some;\n    } else {\n        some = function (fun) {\n            var t = Object(this),\n                len = t.length >>> 0,\n                i;\n\n            for (i = 0; i < len; i++) {\n                if (i in t && fun.call(this, t[i], i, t)) {\n                    return true;\n                }\n            }\n\n            return false;\n        };\n    }\n\n    function isValid(m) {\n        var flags = null,\n            parsedParts = false,\n            isNowValid = m._d && !isNaN(m._d.getTime());\n        if (isNowValid) {\n            flags = getParsingFlags(m);\n            parsedParts = some.call(flags.parsedDateParts, function (i) {\n                return i != null;\n            });\n            isNowValid =\n                flags.overflow < 0 &&\n                !flags.empty &&\n                !flags.invalidEra &&\n                !flags.invalidMonth &&\n                !flags.invalidWeekday &&\n                !flags.weekdayMismatch &&\n                !flags.nullInput &&\n                !flags.invalidFormat &&\n                !flags.userInvalidated &&\n                (!flags.meridiem || (flags.meridiem && parsedParts));\n            if (m._strict) {\n                isNowValid =\n                    isNowValid &&\n                    flags.charsLeftOver === 0 &&\n                    flags.unusedTokens.length === 0 &&\n                    flags.bigHour === undefined;\n            }\n        }\n        if (Object.isFrozen == null || !Object.isFrozen(m)) {\n            m._isValid = isNowValid;\n        } else {\n            return isNowValid;\n        }\n        return m._isValid;\n    }\n\n    function createInvalid(flags) {\n        var m = createUTC(NaN);\n        if (flags != null) {\n            extend(getParsingFlags(m), flags);\n        } else {\n            getParsingFlags(m).userInvalidated = true;\n        }\n\n        return m;\n    }\n\n    // Plugins that add properties should also add the key here (null value),\n    // so we can properly clone ourselves.\n    var momentProperties = (hooks.momentProperties = []),\n        updateInProgress = false;\n\n    function copyConfig(to, from) {\n        var i,\n            prop,\n            val,\n            momentPropertiesLen = momentProperties.length;\n\n        if (!isUndefined(from._isAMomentObject)) {\n            to._isAMomentObject = from._isAMomentObject;\n        }\n        if (!isUndefined(from._i)) {\n            to._i = from._i;\n        }\n        if (!isUndefined(from._f)) {\n            to._f = from._f;\n        }\n        if (!isUndefined(from._l)) {\n            to._l = from._l;\n        }\n        if (!isUndefined(from._strict)) {\n            to._strict = from._strict;\n        }\n        if (!isUndefined(from._tzm)) {\n            to._tzm = from._tzm;\n        }\n        if (!isUndefined(from._isUTC)) {\n            to._isUTC = from._isUTC;\n        }\n        if (!isUndefined(from._offset)) {\n            to._offset = from._offset;\n        }\n        if (!isUndefined(from._pf)) {\n            to._pf = getParsingFlags(from);\n        }\n        if (!isUndefined(from._locale)) {\n            to._locale = from._locale;\n        }\n\n        if (momentPropertiesLen > 0) {\n            for (i = 0; i < momentPropertiesLen; i++) {\n                prop = momentProperties[i];\n                val = from[prop];\n                if (!isUndefined(val)) {\n                    to[prop] = val;\n                }\n            }\n        }\n\n        return to;\n    }\n\n    // Moment prototype object\n    function Moment(config) {\n        copyConfig(this, config);\n        this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n        if (!this.isValid()) {\n            this._d = new Date(NaN);\n        }\n        // Prevent infinite loop in case updateOffset creates new moment\n        // objects.\n        if (updateInProgress === false) {\n            updateInProgress = true;\n            hooks.updateOffset(this);\n            updateInProgress = false;\n        }\n    }\n\n    function isMoment(obj) {\n        return (\n            obj instanceof Moment || (obj != null && obj._isAMomentObject != null)\n        );\n    }\n\n    function warn(msg) {\n        if (\n            hooks.suppressDeprecationWarnings === false &&\n            typeof console !== 'undefined' &&\n            console.warn\n        ) {\n            console.warn('Deprecation warning: ' + msg);\n        }\n    }\n\n    function deprecate(msg, fn) {\n        var firstTime = true;\n\n        return extend(function () {\n            if (hooks.deprecationHandler != null) {\n                hooks.deprecationHandler(null, msg);\n            }\n            if (firstTime) {\n                var args = [],\n                    arg,\n                    i,\n                    key,\n                    argLen = arguments.length;\n                for (i = 0; i < argLen; i++) {\n                    arg = '';\n                    if (typeof arguments[i] === 'object') {\n                        arg += '\\n[' + i + '] ';\n                        for (key in arguments[0]) {\n                            if (hasOwnProp(arguments[0], key)) {\n                                arg += key + ': ' + arguments[0][key] + ', ';\n                            }\n                        }\n                        arg = arg.slice(0, -2); // Remove trailing comma and space\n                    } else {\n                        arg = arguments[i];\n                    }\n                    args.push(arg);\n                }\n                warn(\n                    msg +\n                        '\\nArguments: ' +\n                        Array.prototype.slice.call(args).join('') +\n                        '\\n' +\n                        new Error().stack\n                );\n                firstTime = false;\n            }\n            return fn.apply(this, arguments);\n        }, fn);\n    }\n\n    var deprecations = {};\n\n    function deprecateSimple(name, msg) {\n        if (hooks.deprecationHandler != null) {\n            hooks.deprecationHandler(name, msg);\n        }\n        if (!deprecations[name]) {\n            warn(msg);\n            deprecations[name] = true;\n        }\n    }\n\n    hooks.suppressDeprecationWarnings = false;\n    hooks.deprecationHandler = null;\n\n    function isFunction(input) {\n        return (\n            (typeof Function !== 'undefined' && input instanceof Function) ||\n            Object.prototype.toString.call(input) === '[object Function]'\n        );\n    }\n\n    function set(config) {\n        var prop, i;\n        for (i in config) {\n            if (hasOwnProp(config, i)) {\n                prop = config[i];\n                if (isFunction(prop)) {\n                    this[i] = prop;\n                } else {\n                    this['_' + i] = prop;\n                }\n            }\n        }\n        this._config = config;\n        // Lenient ordinal parsing accepts just a number in addition to\n        // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n        // TODO: Remove \"ordinalParse\" fallback in next major release.\n        this._dayOfMonthOrdinalParseLenient = new RegExp(\n            (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +\n                '|' +\n                /\\d{1,2}/.source\n        );\n    }\n\n    function mergeConfigs(parentConfig, childConfig) {\n        var res = extend({}, parentConfig),\n            prop;\n        for (prop in childConfig) {\n            if (hasOwnProp(childConfig, prop)) {\n                if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n                    res[prop] = {};\n                    extend(res[prop], parentConfig[prop]);\n                    extend(res[prop], childConfig[prop]);\n                } else if (childConfig[prop] != null) {\n                    res[prop] = childConfig[prop];\n                } else {\n                    delete res[prop];\n                }\n            }\n        }\n        for (prop in parentConfig) {\n            if (\n                hasOwnProp(parentConfig, prop) &&\n                !hasOwnProp(childConfig, prop) &&\n                isObject(parentConfig[prop])\n            ) {\n                // make sure changes to properties don't modify parent config\n                res[prop] = extend({}, res[prop]);\n            }\n        }\n        return res;\n    }\n\n    function Locale(config) {\n        if (config != null) {\n            this.set(config);\n        }\n    }\n\n    var keys;\n\n    if (Object.keys) {\n        keys = Object.keys;\n    } else {\n        keys = function (obj) {\n            var i,\n                res = [];\n            for (i in obj) {\n                if (hasOwnProp(obj, i)) {\n                    res.push(i);\n                }\n            }\n            return res;\n        };\n    }\n\n    var defaultCalendar = {\n        sameDay: '[Today at] LT',\n        nextDay: '[Tomorrow at] LT',\n        nextWeek: 'dddd [at] LT',\n        lastDay: '[Yesterday at] LT',\n        lastWeek: '[Last] dddd [at] LT',\n        sameElse: 'L',\n    };\n\n    function calendar(key, mom, now) {\n        var output = this._calendar[key] || this._calendar['sameElse'];\n        return isFunction(output) ? output.call(mom, now) : output;\n    }\n\n    function zeroFill(number, targetLength, forceSign) {\n        var absNumber = '' + Math.abs(number),\n            zerosToFill = targetLength - absNumber.length,\n            sign = number >= 0;\n        return (\n            (sign ? (forceSign ? '+' : '') : '-') +\n            Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +\n            absNumber\n        );\n    }\n\n    var formattingTokens =\n            /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,\n        localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,\n        formatFunctions = {},\n        formatTokenFunctions = {};\n\n    // token:    'M'\n    // padded:   ['MM', 2]\n    // ordinal:  'Mo'\n    // callback: function () { this.month() + 1 }\n    function addFormatToken(token, padded, ordinal, callback) {\n        var func = callback;\n        if (typeof callback === 'string') {\n            func = function () {\n                return this[callback]();\n            };\n        }\n        if (token) {\n            formatTokenFunctions[token] = func;\n        }\n        if (padded) {\n            formatTokenFunctions[padded[0]] = function () {\n                return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n            };\n        }\n        if (ordinal) {\n            formatTokenFunctions[ordinal] = function () {\n                return this.localeData().ordinal(\n                    func.apply(this, arguments),\n                    token\n                );\n            };\n        }\n    }\n\n    function removeFormattingTokens(input) {\n        if (input.match(/\\[[\\s\\S]/)) {\n            return input.replace(/^\\[|\\]$/g, '');\n        }\n        return input.replace(/\\\\/g, '');\n    }\n\n    function makeFormatFunction(format) {\n        var array = format.match(formattingTokens),\n            i,\n            length;\n\n        for (i = 0, length = array.length; i < length; i++) {\n            if (formatTokenFunctions[array[i]]) {\n                array[i] = formatTokenFunctions[array[i]];\n            } else {\n                array[i] = removeFormattingTokens(array[i]);\n            }\n        }\n\n        return function (mom) {\n            var output = '',\n                i;\n            for (i = 0; i < length; i++) {\n                output += isFunction(array[i])\n                    ? array[i].call(mom, format)\n                    : array[i];\n            }\n            return output;\n        };\n    }\n\n    // format date using native date object\n    function formatMoment(m, format) {\n        if (!m.isValid()) {\n            return m.localeData().invalidDate();\n        }\n\n        format = expandFormat(format, m.localeData());\n        formatFunctions[format] =\n            formatFunctions[format] || makeFormatFunction(format);\n\n        return formatFunctions[format](m);\n    }\n\n    function expandFormat(format, locale) {\n        var i = 5;\n\n        function replaceLongDateFormatTokens(input) {\n            return locale.longDateFormat(input) || input;\n        }\n\n        localFormattingTokens.lastIndex = 0;\n        while (i >= 0 && localFormattingTokens.test(format)) {\n            format = format.replace(\n                localFormattingTokens,\n                replaceLongDateFormatTokens\n            );\n            localFormattingTokens.lastIndex = 0;\n            i -= 1;\n        }\n\n        return format;\n    }\n\n    var defaultLongDateFormat = {\n        LTS: 'h:mm:ss A',\n        LT: 'h:mm A',\n        L: 'MM/DD/YYYY',\n        LL: 'MMMM D, YYYY',\n        LLL: 'MMMM D, YYYY h:mm A',\n        LLLL: 'dddd, MMMM D, YYYY h:mm A',\n    };\n\n    function longDateFormat(key) {\n        var format = this._longDateFormat[key],\n            formatUpper = this._longDateFormat[key.toUpperCase()];\n\n        if (format || !formatUpper) {\n            return format;\n        }\n\n        this._longDateFormat[key] = formatUpper\n            .match(formattingTokens)\n            .map(function (tok) {\n                if (\n                    tok === 'MMMM' ||\n                    tok === 'MM' ||\n                    tok === 'DD' ||\n                    tok === 'dddd'\n                ) {\n                    return tok.slice(1);\n                }\n                return tok;\n            })\n            .join('');\n\n        return this._longDateFormat[key];\n    }\n\n    var defaultInvalidDate = 'Invalid date';\n\n    function invalidDate() {\n        return this._invalidDate;\n    }\n\n    var defaultOrdinal = '%d',\n        defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\n    function ordinal(number) {\n        return this._ordinal.replace('%d', number);\n    }\n\n    var defaultRelativeTime = {\n        future: 'in %s',\n        past: '%s ago',\n        s: 'a few seconds',\n        ss: '%d seconds',\n        m: 'a minute',\n        mm: '%d minutes',\n        h: 'an hour',\n        hh: '%d hours',\n        d: 'a day',\n        dd: '%d days',\n        w: 'a week',\n        ww: '%d weeks',\n        M: 'a month',\n        MM: '%d months',\n        y: 'a year',\n        yy: '%d years',\n    };\n\n    function relativeTime(number, withoutSuffix, string, isFuture) {\n        var output = this._relativeTime[string];\n        return isFunction(output)\n            ? output(number, withoutSuffix, string, isFuture)\n            : output.replace(/%d/i, number);\n    }\n\n    function pastFuture(diff, output) {\n        var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n        return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n    }\n\n    var aliases = {\n        D: 'date',\n        dates: 'date',\n        date: 'date',\n        d: 'day',\n        days: 'day',\n        day: 'day',\n        e: 'weekday',\n        weekdays: 'weekday',\n        weekday: 'weekday',\n        E: 'isoWeekday',\n        isoweekdays: 'isoWeekday',\n        isoweekday: 'isoWeekday',\n        DDD: 'dayOfYear',\n        dayofyears: 'dayOfYear',\n        dayofyear: 'dayOfYear',\n        h: 'hour',\n        hours: 'hour',\n        hour: 'hour',\n        ms: 'millisecond',\n        milliseconds: 'millisecond',\n        millisecond: 'millisecond',\n        m: 'minute',\n        minutes: 'minute',\n        minute: 'minute',\n        M: 'month',\n        months: 'month',\n        month: 'month',\n        Q: 'quarter',\n        quarters: 'quarter',\n        quarter: 'quarter',\n        s: 'second',\n        seconds: 'second',\n        second: 'second',\n        gg: 'weekYear',\n        weekyears: 'weekYear',\n        weekyear: 'weekYear',\n        GG: 'isoWeekYear',\n        isoweekyears: 'isoWeekYear',\n        isoweekyear: 'isoWeekYear',\n        w: 'week',\n        weeks: 'week',\n        week: 'week',\n        W: 'isoWeek',\n        isoweeks: 'isoWeek',\n        isoweek: 'isoWeek',\n        y: 'year',\n        years: 'year',\n        year: 'year',\n    };\n\n    function normalizeUnits(units) {\n        return typeof units === 'string'\n            ? aliases[units] || aliases[units.toLowerCase()]\n            : undefined;\n    }\n\n    function normalizeObjectUnits(inputObject) {\n        var normalizedInput = {},\n            normalizedProp,\n            prop;\n\n        for (prop in inputObject) {\n            if (hasOwnProp(inputObject, prop)) {\n                normalizedProp = normalizeUnits(prop);\n                if (normalizedProp) {\n                    normalizedInput[normalizedProp] = inputObject[prop];\n                }\n            }\n        }\n\n        return normalizedInput;\n    }\n\n    var priorities = {\n        date: 9,\n        day: 11,\n        weekday: 11,\n        isoWeekday: 11,\n        dayOfYear: 4,\n        hour: 13,\n        millisecond: 16,\n        minute: 14,\n        month: 8,\n        quarter: 7,\n        second: 15,\n        weekYear: 1,\n        isoWeekYear: 1,\n        week: 5,\n        isoWeek: 5,\n        year: 1,\n    };\n\n    function getPrioritizedUnits(unitsObj) {\n        var units = [],\n            u;\n        for (u in unitsObj) {\n            if (hasOwnProp(unitsObj, u)) {\n                units.push({ unit: u, priority: priorities[u] });\n            }\n        }\n        units.sort(function (a, b) {\n            return a.priority - b.priority;\n        });\n        return units;\n    }\n\n    var match1 = /\\d/, //       0 - 9\n        match2 = /\\d\\d/, //      00 - 99\n        match3 = /\\d{3}/, //     000 - 999\n        match4 = /\\d{4}/, //    0000 - 9999\n        match6 = /[+-]?\\d{6}/, // -999999 - 999999\n        match1to2 = /\\d\\d?/, //       0 - 99\n        match3to4 = /\\d\\d\\d\\d?/, //     999 - 9999\n        match5to6 = /\\d\\d\\d\\d\\d\\d?/, //   99999 - 999999\n        match1to3 = /\\d{1,3}/, //       0 - 999\n        match1to4 = /\\d{1,4}/, //       0 - 9999\n        match1to6 = /[+-]?\\d{1,6}/, // -999999 - 999999\n        matchUnsigned = /\\d+/, //       0 - inf\n        matchSigned = /[+-]?\\d+/, //    -inf - inf\n        matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi, // +00:00 -00:00 +0000 -0000 or Z\n        matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n        matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/, // 123456789 123456789.123\n        // any word (or two) characters or numbers including two/three word month in arabic.\n        // includes scottish gaelic two word and hyphenated months\n        matchWord =\n            /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,\n        match1to2NoLeadingZero = /^[1-9]\\d?/, //         1-99\n        match1to2HasZero = /^([1-9]\\d|\\d)/, //           0-99\n        regexes;\n\n    regexes = {};\n\n    function addRegexToken(token, regex, strictRegex) {\n        regexes[token] = isFunction(regex)\n            ? regex\n            : function (isStrict, localeData) {\n                  return isStrict && strictRegex ? strictRegex : regex;\n              };\n    }\n\n    function getParseRegexForToken(token, config) {\n        if (!hasOwnProp(regexes, token)) {\n            return new RegExp(unescapeFormat(token));\n        }\n\n        return regexes[token](config._strict, config._locale);\n    }\n\n    // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\n    function unescapeFormat(s) {\n        return regexEscape(\n            s\n                .replace('\\\\', '')\n                .replace(\n                    /\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g,\n                    function (matched, p1, p2, p3, p4) {\n                        return p1 || p2 || p3 || p4;\n                    }\n                )\n        );\n    }\n\n    function regexEscape(s) {\n        return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n    }\n\n    function absFloor(number) {\n        if (number < 0) {\n            // -0 -> 0\n            return Math.ceil(number) || 0;\n        } else {\n            return Math.floor(number);\n        }\n    }\n\n    function toInt(argumentForCoercion) {\n        var coercedNumber = +argumentForCoercion,\n            value = 0;\n\n        if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n            value = absFloor(coercedNumber);\n        }\n\n        return value;\n    }\n\n    var tokens = {};\n\n    function addParseToken(token, callback) {\n        var i,\n            func = callback,\n            tokenLen;\n        if (typeof token === 'string') {\n            token = [token];\n        }\n        if (isNumber(callback)) {\n            func = function (input, array) {\n                array[callback] = toInt(input);\n            };\n        }\n        tokenLen = token.length;\n        for (i = 0; i < tokenLen; i++) {\n            tokens[token[i]] = func;\n        }\n    }\n\n    function addWeekParseToken(token, callback) {\n        addParseToken(token, function (input, array, config, token) {\n            config._w = config._w || {};\n            callback(input, config._w, config, token);\n        });\n    }\n\n    function addTimeToArrayFromToken(token, input, config) {\n        if (input != null && hasOwnProp(tokens, token)) {\n            tokens[token](input, config._a, config, token);\n        }\n    }\n\n    function isLeapYear(year) {\n        return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n    }\n\n    var YEAR = 0,\n        MONTH = 1,\n        DATE = 2,\n        HOUR = 3,\n        MINUTE = 4,\n        SECOND = 5,\n        MILLISECOND = 6,\n        WEEK = 7,\n        WEEKDAY = 8;\n\n    // FORMATTING\n\n    addFormatToken('Y', 0, 0, function () {\n        var y = this.year();\n        return y <= 9999 ? zeroFill(y, 4) : '+' + y;\n    });\n\n    addFormatToken(0, ['YY', 2], 0, function () {\n        return this.year() % 100;\n    });\n\n    addFormatToken(0, ['YYYY', 4], 0, 'year');\n    addFormatToken(0, ['YYYYY', 5], 0, 'year');\n    addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n    // PARSING\n\n    addRegexToken('Y', matchSigned);\n    addRegexToken('YY', match1to2, match2);\n    addRegexToken('YYYY', match1to4, match4);\n    addRegexToken('YYYYY', match1to6, match6);\n    addRegexToken('YYYYYY', match1to6, match6);\n\n    addParseToken(['YYYYY', 'YYYYYY'], YEAR);\n    addParseToken('YYYY', function (input, array) {\n        array[YEAR] =\n            input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n    });\n    addParseToken('YY', function (input, array) {\n        array[YEAR] = hooks.parseTwoDigitYear(input);\n    });\n    addParseToken('Y', function (input, array) {\n        array[YEAR] = parseInt(input, 10);\n    });\n\n    // HELPERS\n\n    function daysInYear(year) {\n        return isLeapYear(year) ? 366 : 365;\n    }\n\n    // HOOKS\n\n    hooks.parseTwoDigitYear = function (input) {\n        return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n    };\n\n    // MOMENTS\n\n    var getSetYear = makeGetSet('FullYear', true);\n\n    function getIsLeapYear() {\n        return isLeapYear(this.year());\n    }\n\n    function makeGetSet(unit, keepTime) {\n        return function (value) {\n            if (value != null) {\n                set$1(this, unit, value);\n                hooks.updateOffset(this, keepTime);\n                return this;\n            } else {\n                return get(this, unit);\n            }\n        };\n    }\n\n    function get(mom, unit) {\n        if (!mom.isValid()) {\n            return NaN;\n        }\n\n        var d = mom._d,\n            isUTC = mom._isUTC;\n\n        switch (unit) {\n            case 'Milliseconds':\n                return isUTC ? d.getUTCMilliseconds() : d.getMilliseconds();\n            case 'Seconds':\n                return isUTC ? d.getUTCSeconds() : d.getSeconds();\n            case 'Minutes':\n                return isUTC ? d.getUTCMinutes() : d.getMinutes();\n            case 'Hours':\n                return isUTC ? d.getUTCHours() : d.getHours();\n            case 'Date':\n                return isUTC ? d.getUTCDate() : d.getDate();\n            case 'Day':\n                return isUTC ? d.getUTCDay() : d.getDay();\n            case 'Month':\n                return isUTC ? d.getUTCMonth() : d.getMonth();\n            case 'FullYear':\n                return isUTC ? d.getUTCFullYear() : d.getFullYear();\n            default:\n                return NaN; // Just in case\n        }\n    }\n\n    function set$1(mom, unit, value) {\n        var d, isUTC, year, month, date;\n\n        if (!mom.isValid() || isNaN(value)) {\n            return;\n        }\n\n        d = mom._d;\n        isUTC = mom._isUTC;\n\n        switch (unit) {\n            case 'Milliseconds':\n                return void (isUTC\n                    ? d.setUTCMilliseconds(value)\n                    : d.setMilliseconds(value));\n            case 'Seconds':\n                return void (isUTC ? d.setUTCSeconds(value) : d.setSeconds(value));\n            case 'Minutes':\n                return void (isUTC ? d.setUTCMinutes(value) : d.setMinutes(value));\n            case 'Hours':\n                return void (isUTC ? d.setUTCHours(value) : d.setHours(value));\n            case 'Date':\n                return void (isUTC ? d.setUTCDate(value) : d.setDate(value));\n            // case 'Day': // Not real\n            //    return void (isUTC ? d.setUTCDay(value) : d.setDay(value));\n            // case 'Month': // Not used because we need to pass two variables\n            //     return void (isUTC ? d.setUTCMonth(value) : d.setMonth(value));\n            case 'FullYear':\n                break; // See below ...\n            default:\n                return; // Just in case\n        }\n\n        year = value;\n        month = mom.month();\n        date = mom.date();\n        date = date === 29 && month === 1 && !isLeapYear(year) ? 28 : date;\n        void (isUTC\n            ? d.setUTCFullYear(year, month, date)\n            : d.setFullYear(year, month, date));\n    }\n\n    // MOMENTS\n\n    function stringGet(units) {\n        units = normalizeUnits(units);\n        if (isFunction(this[units])) {\n            return this[units]();\n        }\n        return this;\n    }\n\n    function stringSet(units, value) {\n        if (typeof units === 'object') {\n            units = normalizeObjectUnits(units);\n            var prioritized = getPrioritizedUnits(units),\n                i,\n                prioritizedLen = prioritized.length;\n            for (i = 0; i < prioritizedLen; i++) {\n                this[prioritized[i].unit](units[prioritized[i].unit]);\n            }\n        } else {\n            units = normalizeUnits(units);\n            if (isFunction(this[units])) {\n                return this[units](value);\n            }\n        }\n        return this;\n    }\n\n    function mod(n, x) {\n        return ((n % x) + x) % x;\n    }\n\n    var indexOf;\n\n    if (Array.prototype.indexOf) {\n        indexOf = Array.prototype.indexOf;\n    } else {\n        indexOf = function (o) {\n            // I know\n            var i;\n            for (i = 0; i < this.length; ++i) {\n                if (this[i] === o) {\n                    return i;\n                }\n            }\n            return -1;\n        };\n    }\n\n    function daysInMonth(year, month) {\n        if (isNaN(year) || isNaN(month)) {\n            return NaN;\n        }\n        var modMonth = mod(month, 12);\n        year += (month - modMonth) / 12;\n        return modMonth === 1\n            ? isLeapYear(year)\n                ? 29\n                : 28\n            : 31 - ((modMonth % 7) % 2);\n    }\n\n    // FORMATTING\n\n    addFormatToken('M', ['MM', 2], 'Mo', function () {\n        return this.month() + 1;\n    });\n\n    addFormatToken('MMM', 0, 0, function (format) {\n        return this.localeData().monthsShort(this, format);\n    });\n\n    addFormatToken('MMMM', 0, 0, function (format) {\n        return this.localeData().months(this, format);\n    });\n\n    // PARSING\n\n    addRegexToken('M', match1to2, match1to2NoLeadingZero);\n    addRegexToken('MM', match1to2, match2);\n    addRegexToken('MMM', function (isStrict, locale) {\n        return locale.monthsShortRegex(isStrict);\n    });\n    addRegexToken('MMMM', function (isStrict, locale) {\n        return locale.monthsRegex(isStrict);\n    });\n\n    addParseToken(['M', 'MM'], function (input, array) {\n        array[MONTH] = toInt(input) - 1;\n    });\n\n    addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n        var month = config._locale.monthsParse(input, token, config._strict);\n        // if we didn't find a month name, mark the date as invalid.\n        if (month != null) {\n            array[MONTH] = month;\n        } else {\n            getParsingFlags(config).invalidMonth = input;\n        }\n    });\n\n    // LOCALES\n\n    var defaultLocaleMonths =\n            'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n                '_'\n            ),\n        defaultLocaleMonthsShort =\n            'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n        MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/,\n        defaultMonthsShortRegex = matchWord,\n        defaultMonthsRegex = matchWord;\n\n    function localeMonths(m, format) {\n        if (!m) {\n            return isArray(this._months)\n                ? this._months\n                : this._months['standalone'];\n        }\n        return isArray(this._months)\n            ? this._months[m.month()]\n            : this._months[\n                  (this._months.isFormat || MONTHS_IN_FORMAT).test(format)\n                      ? 'format'\n                      : 'standalone'\n              ][m.month()];\n    }\n\n    function localeMonthsShort(m, format) {\n        if (!m) {\n            return isArray(this._monthsShort)\n                ? this._monthsShort\n                : this._monthsShort['standalone'];\n        }\n        return isArray(this._monthsShort)\n            ? this._monthsShort[m.month()]\n            : this._monthsShort[\n                  MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'\n              ][m.month()];\n    }\n\n    function handleStrictParse(monthName, format, strict) {\n        var i,\n            ii,\n            mom,\n            llc = monthName.toLocaleLowerCase();\n        if (!this._monthsParse) {\n            // this is not used\n            this._monthsParse = [];\n            this._longMonthsParse = [];\n            this._shortMonthsParse = [];\n            for (i = 0; i < 12; ++i) {\n                mom = createUTC([2000, i]);\n                this._shortMonthsParse[i] = this.monthsShort(\n                    mom,\n                    ''\n                ).toLocaleLowerCase();\n                this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n            }\n        }\n\n        if (strict) {\n            if (format === 'MMM') {\n                ii = indexOf.call(this._shortMonthsParse, llc);\n                return ii !== -1 ? ii : null;\n            } else {\n                ii = indexOf.call(this._longMonthsParse, llc);\n                return ii !== -1 ? ii : null;\n            }\n        } else {\n            if (format === 'MMM') {\n                ii = indexOf.call(this._shortMonthsParse, llc);\n                if (ii !== -1) {\n                    return ii;\n                }\n                ii = indexOf.call(this._longMonthsParse, llc);\n                return ii !== -1 ? ii : null;\n            } else {\n                ii = indexOf.call(this._longMonthsParse, llc);\n                if (ii !== -1) {\n                    return ii;\n                }\n                ii = indexOf.call(this._shortMonthsParse, llc);\n                return ii !== -1 ? ii : null;\n            }\n        }\n    }\n\n    function localeMonthsParse(monthName, format, strict) {\n        var i, mom, regex;\n\n        if (this._monthsParseExact) {\n            return handleStrictParse.call(this, monthName, format, strict);\n        }\n\n        if (!this._monthsParse) {\n            this._monthsParse = [];\n            this._longMonthsParse = [];\n            this._shortMonthsParse = [];\n        }\n\n        // TODO: add sorting\n        // Sorting makes sure if one month (or abbr) is a prefix of another\n        // see sorting in computeMonthsParse\n        for (i = 0; i < 12; i++) {\n            // make the regex if we don't have it already\n            mom = createUTC([2000, i]);\n            if (strict && !this._longMonthsParse[i]) {\n                this._longMonthsParse[i] = new RegExp(\n                    '^' + this.months(mom, '').replace('.', '') + '$',\n                    'i'\n                );\n                this._shortMonthsParse[i] = new RegExp(\n                    '^' + this.monthsShort(mom, '').replace('.', '') + '$',\n                    'i'\n                );\n            }\n            if (!strict && !this._monthsParse[i]) {\n                regex =\n                    '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n                this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n            }\n            // test the regex\n            if (\n                strict &&\n                format === 'MMMM' &&\n                this._longMonthsParse[i].test(monthName)\n            ) {\n                return i;\n            } else if (\n                strict &&\n                format === 'MMM' &&\n                this._shortMonthsParse[i].test(monthName)\n            ) {\n                return i;\n            } else if (!strict && this._monthsParse[i].test(monthName)) {\n                return i;\n            }\n        }\n    }\n\n    // MOMENTS\n\n    function setMonth(mom, value) {\n        if (!mom.isValid()) {\n            // No op\n            return mom;\n        }\n\n        if (typeof value === 'string') {\n            if (/^\\d+$/.test(value)) {\n                value = toInt(value);\n            } else {\n                value = mom.localeData().monthsParse(value);\n                // TODO: Another silent failure?\n                if (!isNumber(value)) {\n                    return mom;\n                }\n            }\n        }\n\n        var month = value,\n            date = mom.date();\n\n        date = date < 29 ? date : Math.min(date, daysInMonth(mom.year(), month));\n        void (mom._isUTC\n            ? mom._d.setUTCMonth(month, date)\n            : mom._d.setMonth(month, date));\n        return mom;\n    }\n\n    function getSetMonth(value) {\n        if (value != null) {\n            setMonth(this, value);\n            hooks.updateOffset(this, true);\n            return this;\n        } else {\n            return get(this, 'Month');\n        }\n    }\n\n    function getDaysInMonth() {\n        return daysInMonth(this.year(), this.month());\n    }\n\n    function monthsShortRegex(isStrict) {\n        if (this._monthsParseExact) {\n            if (!hasOwnProp(this, '_monthsRegex')) {\n                computeMonthsParse.call(this);\n            }\n            if (isStrict) {\n                return this._monthsShortStrictRegex;\n            } else {\n                return this._monthsShortRegex;\n            }\n        } else {\n            if (!hasOwnProp(this, '_monthsShortRegex')) {\n                this._monthsShortRegex = defaultMonthsShortRegex;\n            }\n            return this._monthsShortStrictRegex && isStrict\n                ? this._monthsShortStrictRegex\n                : this._monthsShortRegex;\n        }\n    }\n\n    function monthsRegex(isStrict) {\n        if (this._monthsParseExact) {\n            if (!hasOwnProp(this, '_monthsRegex')) {\n                computeMonthsParse.call(this);\n            }\n            if (isStrict) {\n                return this._monthsStrictRegex;\n            } else {\n                return this._monthsRegex;\n            }\n        } else {\n            if (!hasOwnProp(this, '_monthsRegex')) {\n                this._monthsRegex = defaultMonthsRegex;\n            }\n            return this._monthsStrictRegex && isStrict\n                ? this._monthsStrictRegex\n                : this._monthsRegex;\n        }\n    }\n\n    function computeMonthsParse() {\n        function cmpLenRev(a, b) {\n            return b.length - a.length;\n        }\n\n        var shortPieces = [],\n            longPieces = [],\n            mixedPieces = [],\n            i,\n            mom,\n            shortP,\n            longP;\n        for (i = 0; i < 12; i++) {\n            // make the regex if we don't have it already\n            mom = createUTC([2000, i]);\n            shortP = regexEscape(this.monthsShort(mom, ''));\n            longP = regexEscape(this.months(mom, ''));\n            shortPieces.push(shortP);\n            longPieces.push(longP);\n            mixedPieces.push(longP);\n            mixedPieces.push(shortP);\n        }\n        // Sorting makes sure if one month (or abbr) is a prefix of another it\n        // will match the longer piece.\n        shortPieces.sort(cmpLenRev);\n        longPieces.sort(cmpLenRev);\n        mixedPieces.sort(cmpLenRev);\n\n        this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n        this._monthsShortRegex = this._monthsRegex;\n        this._monthsStrictRegex = new RegExp(\n            '^(' + longPieces.join('|') + ')',\n            'i'\n        );\n        this._monthsShortStrictRegex = new RegExp(\n            '^(' + shortPieces.join('|') + ')',\n            'i'\n        );\n    }\n\n    function createDate(y, m, d, h, M, s, ms) {\n        // can't just apply() to create a date:\n        // https://stackoverflow.com/q/181348\n        var date;\n        // the date constructor remaps years 0-99 to 1900-1999\n        if (y < 100 && y >= 0) {\n            // preserve leap years using a full 400 year cycle, then reset\n            date = new Date(y + 400, m, d, h, M, s, ms);\n            if (isFinite(date.getFullYear())) {\n                date.setFullYear(y);\n            }\n        } else {\n            date = new Date(y, m, d, h, M, s, ms);\n        }\n\n        return date;\n    }\n\n    function createUTCDate(y) {\n        var date, args;\n        // the Date.UTC function remaps years 0-99 to 1900-1999\n        if (y < 100 && y >= 0) {\n            args = Array.prototype.slice.call(arguments);\n            // preserve leap years using a full 400 year cycle, then reset\n            args[0] = y + 400;\n            date = new Date(Date.UTC.apply(null, args));\n            if (isFinite(date.getUTCFullYear())) {\n                date.setUTCFullYear(y);\n            }\n        } else {\n            date = new Date(Date.UTC.apply(null, arguments));\n        }\n\n        return date;\n    }\n\n    // start-of-first-week - start-of-year\n    function firstWeekOffset(year, dow, doy) {\n        var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n            fwd = 7 + dow - doy,\n            // first-week day local weekday -- which local weekday is fwd\n            fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n\n        return -fwdlw + fwd - 1;\n    }\n\n    // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\n    function dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n        var localWeekday = (7 + weekday - dow) % 7,\n            weekOffset = firstWeekOffset(year, dow, doy),\n            dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n            resYear,\n            resDayOfYear;\n\n        if (dayOfYear <= 0) {\n            resYear = year - 1;\n            resDayOfYear = daysInYear(resYear) + dayOfYear;\n        } else if (dayOfYear > daysInYear(year)) {\n            resYear = year + 1;\n            resDayOfYear = dayOfYear - daysInYear(year);\n        } else {\n            resYear = year;\n            resDayOfYear = dayOfYear;\n        }\n\n        return {\n            year: resYear,\n            dayOfYear: resDayOfYear,\n        };\n    }\n\n    function weekOfYear(mom, dow, doy) {\n        var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n            week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n            resWeek,\n            resYear;\n\n        if (week < 1) {\n            resYear = mom.year() - 1;\n            resWeek = week + weeksInYear(resYear, dow, doy);\n        } else if (week > weeksInYear(mom.year(), dow, doy)) {\n            resWeek = week - weeksInYear(mom.year(), dow, doy);\n            resYear = mom.year() + 1;\n        } else {\n            resYear = mom.year();\n            resWeek = week;\n        }\n\n        return {\n            week: resWeek,\n            year: resYear,\n        };\n    }\n\n    function weeksInYear(year, dow, doy) {\n        var weekOffset = firstWeekOffset(year, dow, doy),\n            weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n        return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n    }\n\n    // FORMATTING\n\n    addFormatToken('w', ['ww', 2], 'wo', 'week');\n    addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n    // PARSING\n\n    addRegexToken('w', match1to2, match1to2NoLeadingZero);\n    addRegexToken('ww', match1to2, match2);\n    addRegexToken('W', match1to2, match1to2NoLeadingZero);\n    addRegexToken('WW', match1to2, match2);\n\n    addWeekParseToken(\n        ['w', 'ww', 'W', 'WW'],\n        function (input, week, config, token) {\n            week[token.substr(0, 1)] = toInt(input);\n        }\n    );\n\n    // HELPERS\n\n    // LOCALES\n\n    function localeWeek(mom) {\n        return weekOfYear(mom, this._week.dow, this._week.doy).week;\n    }\n\n    var defaultLocaleWeek = {\n        dow: 0, // Sunday is the first day of the week.\n        doy: 6, // The week that contains Jan 6th is the first week of the year.\n    };\n\n    function localeFirstDayOfWeek() {\n        return this._week.dow;\n    }\n\n    function localeFirstDayOfYear() {\n        return this._week.doy;\n    }\n\n    // MOMENTS\n\n    function getSetWeek(input) {\n        var week = this.localeData().week(this);\n        return input == null ? week : this.add((input - week) * 7, 'd');\n    }\n\n    function getSetISOWeek(input) {\n        var week = weekOfYear(this, 1, 4).week;\n        return input == null ? week : this.add((input - week) * 7, 'd');\n    }\n\n    // FORMATTING\n\n    addFormatToken('d', 0, 'do', 'day');\n\n    addFormatToken('dd', 0, 0, function (format) {\n        return this.localeData().weekdaysMin(this, format);\n    });\n\n    addFormatToken('ddd', 0, 0, function (format) {\n        return this.localeData().weekdaysShort(this, format);\n    });\n\n    addFormatToken('dddd', 0, 0, function (format) {\n        return this.localeData().weekdays(this, format);\n    });\n\n    addFormatToken('e', 0, 0, 'weekday');\n    addFormatToken('E', 0, 0, 'isoWeekday');\n\n    // PARSING\n\n    addRegexToken('d', match1to2);\n    addRegexToken('e', match1to2);\n    addRegexToken('E', match1to2);\n    addRegexToken('dd', function (isStrict, locale) {\n        return locale.weekdaysMinRegex(isStrict);\n    });\n    addRegexToken('ddd', function (isStrict, locale) {\n        return locale.weekdaysShortRegex(isStrict);\n    });\n    addRegexToken('dddd', function (isStrict, locale) {\n        return locale.weekdaysRegex(isStrict);\n    });\n\n    addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n        var weekday = config._locale.weekdaysParse(input, token, config._strict);\n        // if we didn't get a weekday name, mark the date as invalid\n        if (weekday != null) {\n            week.d = weekday;\n        } else {\n            getParsingFlags(config).invalidWeekday = input;\n        }\n    });\n\n    addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n        week[token] = toInt(input);\n    });\n\n    // HELPERS\n\n    function parseWeekday(input, locale) {\n        if (typeof input !== 'string') {\n            return input;\n        }\n\n        if (!isNaN(input)) {\n            return parseInt(input, 10);\n        }\n\n        input = locale.weekdaysParse(input);\n        if (typeof input === 'number') {\n            return input;\n        }\n\n        return null;\n    }\n\n    function parseIsoWeekday(input, locale) {\n        if (typeof input === 'string') {\n            return locale.weekdaysParse(input) % 7 || 7;\n        }\n        return isNaN(input) ? null : input;\n    }\n\n    // LOCALES\n    function shiftWeekdays(ws, n) {\n        return ws.slice(n, 7).concat(ws.slice(0, n));\n    }\n\n    var defaultLocaleWeekdays =\n            'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n        defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n        defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n        defaultWeekdaysRegex = matchWord,\n        defaultWeekdaysShortRegex = matchWord,\n        defaultWeekdaysMinRegex = matchWord;\n\n    function localeWeekdays(m, format) {\n        var weekdays = isArray(this._weekdays)\n            ? this._weekdays\n            : this._weekdays[\n                  m && m !== true && this._weekdays.isFormat.test(format)\n                      ? 'format'\n                      : 'standalone'\n              ];\n        return m === true\n            ? shiftWeekdays(weekdays, this._week.dow)\n            : m\n              ? weekdays[m.day()]\n              : weekdays;\n    }\n\n    function localeWeekdaysShort(m) {\n        return m === true\n            ? shiftWeekdays(this._weekdaysShort, this._week.dow)\n            : m\n              ? this._weekdaysShort[m.day()]\n              : this._weekdaysShort;\n    }\n\n    function localeWeekdaysMin(m) {\n        return m === true\n            ? shiftWeekdays(this._weekdaysMin, this._week.dow)\n            : m\n              ? this._weekdaysMin[m.day()]\n              : this._weekdaysMin;\n    }\n\n    function handleStrictParse$1(weekdayName, format, strict) {\n        var i,\n            ii,\n            mom,\n            llc = weekdayName.toLocaleLowerCase();\n        if (!this._weekdaysParse) {\n            this._weekdaysParse = [];\n            this._shortWeekdaysParse = [];\n            this._minWeekdaysParse = [];\n\n            for (i = 0; i < 7; ++i) {\n                mom = createUTC([2000, 1]).day(i);\n                this._minWeekdaysParse[i] = this.weekdaysMin(\n                    mom,\n                    ''\n                ).toLocaleLowerCase();\n                this._shortWeekdaysParse[i] = this.weekdaysShort(\n                    mom,\n                    ''\n                ).toLocaleLowerCase();\n                this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n            }\n        }\n\n        if (strict) {\n            if (format === 'dddd') {\n                ii = indexOf.call(this._weekdaysParse, llc);\n                return ii !== -1 ? ii : null;\n            } else if (format === 'ddd') {\n                ii = indexOf.call(this._shortWeekdaysParse, llc);\n                return ii !== -1 ? ii : null;\n            } else {\n                ii = indexOf.call(this._minWeekdaysParse, llc);\n                return ii !== -1 ? ii : null;\n            }\n        } else {\n            if (format === 'dddd') {\n                ii = indexOf.call(this._weekdaysParse, llc);\n                if (ii !== -1) {\n                    return ii;\n                }\n                ii = indexOf.call(this._shortWeekdaysParse, llc);\n                if (ii !== -1) {\n                    return ii;\n                }\n                ii = indexOf.call(this._minWeekdaysParse, llc);\n                return ii !== -1 ? ii : null;\n            } else if (format === 'ddd') {\n                ii = indexOf.call(this._shortWeekdaysParse, llc);\n                if (ii !== -1) {\n                    return ii;\n                }\n                ii = indexOf.call(this._weekdaysParse, llc);\n                if (ii !== -1) {\n                    return ii;\n                }\n                ii = indexOf.call(this._minWeekdaysParse, llc);\n                return ii !== -1 ? ii : null;\n            } else {\n                ii = indexOf.call(this._minWeekdaysParse, llc);\n                if (ii !== -1) {\n                    return ii;\n                }\n                ii = indexOf.call(this._weekdaysParse, llc);\n                if (ii !== -1) {\n                    return ii;\n                }\n                ii = indexOf.call(this._shortWeekdaysParse, llc);\n                return ii !== -1 ? ii : null;\n            }\n        }\n    }\n\n    function localeWeekdaysParse(weekdayName, format, strict) {\n        var i, mom, regex;\n\n        if (this._weekdaysParseExact) {\n            return handleStrictParse$1.call(this, weekdayName, format, strict);\n        }\n\n        if (!this._weekdaysParse) {\n            this._weekdaysParse = [];\n            this._minWeekdaysParse = [];\n            this._shortWeekdaysParse = [];\n            this._fullWeekdaysParse = [];\n        }\n\n        for (i = 0; i < 7; i++) {\n            // make the regex if we don't have it already\n\n            mom = createUTC([2000, 1]).day(i);\n            if (strict && !this._fullWeekdaysParse[i]) {\n                this._fullWeekdaysParse[i] = new RegExp(\n                    '^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$',\n                    'i'\n                );\n                this._shortWeekdaysParse[i] = new RegExp(\n                    '^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$',\n                    'i'\n                );\n                this._minWeekdaysParse[i] = new RegExp(\n                    '^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$',\n                    'i'\n                );\n            }\n            if (!this._weekdaysParse[i]) {\n                regex =\n                    '^' +\n                    this.weekdays(mom, '') +\n                    '|^' +\n                    this.weekdaysShort(mom, '') +\n                    '|^' +\n                    this.weekdaysMin(mom, '');\n                this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n            }\n            // test the regex\n            if (\n                strict &&\n                format === 'dddd' &&\n                this._fullWeekdaysParse[i].test(weekdayName)\n            ) {\n                return i;\n            } else if (\n                strict &&\n                format === 'ddd' &&\n                this._shortWeekdaysParse[i].test(weekdayName)\n            ) {\n                return i;\n            } else if (\n                strict &&\n                format === 'dd' &&\n                this._minWeekdaysParse[i].test(weekdayName)\n            ) {\n                return i;\n            } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n                return i;\n            }\n        }\n    }\n\n    // MOMENTS\n\n    function getSetDayOfWeek(input) {\n        if (!this.isValid()) {\n            return input != null ? this : NaN;\n        }\n\n        var day = get(this, 'Day');\n        if (input != null) {\n            input = parseWeekday(input, this.localeData());\n            return this.add(input - day, 'd');\n        } else {\n            return day;\n        }\n    }\n\n    function getSetLocaleDayOfWeek(input) {\n        if (!this.isValid()) {\n            return input != null ? this : NaN;\n        }\n        var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n        return input == null ? weekday : this.add(input - weekday, 'd');\n    }\n\n    function getSetISODayOfWeek(input) {\n        if (!this.isValid()) {\n            return input != null ? this : NaN;\n        }\n\n        // behaves the same as moment#day except\n        // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n        // as a setter, sunday should belong to the previous week.\n\n        if (input != null) {\n            var weekday = parseIsoWeekday(input, this.localeData());\n            return this.day(this.day() % 7 ? weekday : weekday - 7);\n        } else {\n            return this.day() || 7;\n        }\n    }\n\n    function weekdaysRegex(isStrict) {\n        if (this._weekdaysParseExact) {\n            if (!hasOwnProp(this, '_weekdaysRegex')) {\n                computeWeekdaysParse.call(this);\n            }\n            if (isStrict) {\n                return this._weekdaysStrictRegex;\n            } else {\n                return this._weekdaysRegex;\n            }\n        } else {\n            if (!hasOwnProp(this, '_weekdaysRegex')) {\n                this._weekdaysRegex = defaultWeekdaysRegex;\n            }\n            return this._weekdaysStrictRegex && isStrict\n                ? this._weekdaysStrictRegex\n                : this._weekdaysRegex;\n        }\n    }\n\n    function weekdaysShortRegex(isStrict) {\n        if (this._weekdaysParseExact) {\n            if (!hasOwnProp(this, '_weekdaysRegex')) {\n                computeWeekdaysParse.call(this);\n            }\n            if (isStrict) {\n                return this._weekdaysShortStrictRegex;\n            } else {\n                return this._weekdaysShortRegex;\n            }\n        } else {\n            if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n                this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n            }\n            return this._weekdaysShortStrictRegex && isStrict\n                ? this._weekdaysShortStrictRegex\n                : this._weekdaysShortRegex;\n        }\n    }\n\n    function weekdaysMinRegex(isStrict) {\n        if (this._weekdaysParseExact) {\n            if (!hasOwnProp(this, '_weekdaysRegex')) {\n                computeWeekdaysParse.call(this);\n            }\n            if (isStrict) {\n                return this._weekdaysMinStrictRegex;\n            } else {\n                return this._weekdaysMinRegex;\n            }\n        } else {\n            if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n                this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n            }\n            return this._weekdaysMinStrictRegex && isStrict\n                ? this._weekdaysMinStrictRegex\n                : this._weekdaysMinRegex;\n        }\n    }\n\n    function computeWeekdaysParse() {\n        function cmpLenRev(a, b) {\n            return b.length - a.length;\n        }\n\n        var minPieces = [],\n            shortPieces = [],\n            longPieces = [],\n            mixedPieces = [],\n            i,\n            mom,\n            minp,\n            shortp,\n            longp;\n        for (i = 0; i < 7; i++) {\n            // make the regex if we don't have it already\n            mom = createUTC([2000, 1]).day(i);\n            minp = regexEscape(this.weekdaysMin(mom, ''));\n            shortp = regexEscape(this.weekdaysShort(mom, ''));\n            longp = regexEscape(this.weekdays(mom, ''));\n            minPieces.push(minp);\n            shortPieces.push(shortp);\n            longPieces.push(longp);\n            mixedPieces.push(minp);\n            mixedPieces.push(shortp);\n            mixedPieces.push(longp);\n        }\n        // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n        // will match the longer piece.\n        minPieces.sort(cmpLenRev);\n        shortPieces.sort(cmpLenRev);\n        longPieces.sort(cmpLenRev);\n        mixedPieces.sort(cmpLenRev);\n\n        this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n        this._weekdaysShortRegex = this._weekdaysRegex;\n        this._weekdaysMinRegex = this._weekdaysRegex;\n\n        this._weekdaysStrictRegex = new RegExp(\n            '^(' + longPieces.join('|') + ')',\n            'i'\n        );\n        this._weekdaysShortStrictRegex = new RegExp(\n            '^(' + shortPieces.join('|') + ')',\n            'i'\n        );\n        this._weekdaysMinStrictRegex = new RegExp(\n            '^(' + minPieces.join('|') + ')',\n            'i'\n        );\n    }\n\n    // FORMATTING\n\n    function hFormat() {\n        return this.hours() % 12 || 12;\n    }\n\n    function kFormat() {\n        return this.hours() || 24;\n    }\n\n    addFormatToken('H', ['HH', 2], 0, 'hour');\n    addFormatToken('h', ['hh', 2], 0, hFormat);\n    addFormatToken('k', ['kk', 2], 0, kFormat);\n\n    addFormatToken('hmm', 0, 0, function () {\n        return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n    });\n\n    addFormatToken('hmmss', 0, 0, function () {\n        return (\n            '' +\n            hFormat.apply(this) +\n            zeroFill(this.minutes(), 2) +\n            zeroFill(this.seconds(), 2)\n        );\n    });\n\n    addFormatToken('Hmm', 0, 0, function () {\n        return '' + this.hours() + zeroFill(this.minutes(), 2);\n    });\n\n    addFormatToken('Hmmss', 0, 0, function () {\n        return (\n            '' +\n            this.hours() +\n            zeroFill(this.minutes(), 2) +\n            zeroFill(this.seconds(), 2)\n        );\n    });\n\n    function meridiem(token, lowercase) {\n        addFormatToken(token, 0, 0, function () {\n            return this.localeData().meridiem(\n                this.hours(),\n                this.minutes(),\n                lowercase\n            );\n        });\n    }\n\n    meridiem('a', true);\n    meridiem('A', false);\n\n    // PARSING\n\n    function matchMeridiem(isStrict, locale) {\n        return locale._meridiemParse;\n    }\n\n    addRegexToken('a', matchMeridiem);\n    addRegexToken('A', matchMeridiem);\n    addRegexToken('H', match1to2, match1to2HasZero);\n    addRegexToken('h', match1to2, match1to2NoLeadingZero);\n    addRegexToken('k', match1to2, match1to2NoLeadingZero);\n    addRegexToken('HH', match1to2, match2);\n    addRegexToken('hh', match1to2, match2);\n    addRegexToken('kk', match1to2, match2);\n\n    addRegexToken('hmm', match3to4);\n    addRegexToken('hmmss', match5to6);\n    addRegexToken('Hmm', match3to4);\n    addRegexToken('Hmmss', match5to6);\n\n    addParseToken(['H', 'HH'], HOUR);\n    addParseToken(['k', 'kk'], function (input, array, config) {\n        var kInput = toInt(input);\n        array[HOUR] = kInput === 24 ? 0 : kInput;\n    });\n    addParseToken(['a', 'A'], function (input, array, config) {\n        config._isPm = config._locale.isPM(input);\n        config._meridiem = input;\n    });\n    addParseToken(['h', 'hh'], function (input, array, config) {\n        array[HOUR] = toInt(input);\n        getParsingFlags(config).bigHour = true;\n    });\n    addParseToken('hmm', function (input, array, config) {\n        var pos = input.length - 2;\n        array[HOUR] = toInt(input.substr(0, pos));\n        array[MINUTE] = toInt(input.substr(pos));\n        getParsingFlags(config).bigHour = true;\n    });\n    addParseToken('hmmss', function (input, array, config) {\n        var pos1 = input.length - 4,\n            pos2 = input.length - 2;\n        array[HOUR] = toInt(input.substr(0, pos1));\n        array[MINUTE] = toInt(input.substr(pos1, 2));\n        array[SECOND] = toInt(input.substr(pos2));\n        getParsingFlags(config).bigHour = true;\n    });\n    addParseToken('Hmm', function (input, array, config) {\n        var pos = input.length - 2;\n        array[HOUR] = toInt(input.substr(0, pos));\n        array[MINUTE] = toInt(input.substr(pos));\n    });\n    addParseToken('Hmmss', function (input, array, config) {\n        var pos1 = input.length - 4,\n            pos2 = input.length - 2;\n        array[HOUR] = toInt(input.substr(0, pos1));\n        array[MINUTE] = toInt(input.substr(pos1, 2));\n        array[SECOND] = toInt(input.substr(pos2));\n    });\n\n    // LOCALES\n\n    function localeIsPM(input) {\n        // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n        // Using charAt should be more compatible.\n        return (input + '').toLowerCase().charAt(0) === 'p';\n    }\n\n    var defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i,\n        // Setting the hour should keep the time, because the user explicitly\n        // specified which hour they want. So trying to maintain the same hour (in\n        // a new timezone) makes sense. Adding/subtracting hours does not follow\n        // this rule.\n        getSetHour = makeGetSet('Hours', true);\n\n    function localeMeridiem(hours, minutes, isLower) {\n        if (hours > 11) {\n            return isLower ? 'pm' : 'PM';\n        } else {\n            return isLower ? 'am' : 'AM';\n        }\n    }\n\n    var baseConfig = {\n        calendar: defaultCalendar,\n        longDateFormat: defaultLongDateFormat,\n        invalidDate: defaultInvalidDate,\n        ordinal: defaultOrdinal,\n        dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n        relativeTime: defaultRelativeTime,\n\n        months: defaultLocaleMonths,\n        monthsShort: defaultLocaleMonthsShort,\n\n        week: defaultLocaleWeek,\n\n        weekdays: defaultLocaleWeekdays,\n        weekdaysMin: defaultLocaleWeekdaysMin,\n        weekdaysShort: defaultLocaleWeekdaysShort,\n\n        meridiemParse: defaultLocaleMeridiemParse,\n    };\n\n    // internal storage for locale config files\n    var locales = {},\n        localeFamilies = {},\n        globalLocale;\n\n    function commonPrefix(arr1, arr2) {\n        var i,\n            minl = Math.min(arr1.length, arr2.length);\n        for (i = 0; i < minl; i += 1) {\n            if (arr1[i] !== arr2[i]) {\n                return i;\n            }\n        }\n        return minl;\n    }\n\n    function normalizeLocale(key) {\n        return key ? key.toLowerCase().replace('_', '-') : key;\n    }\n\n    // pick the locale from the array\n    // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n    // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\n    function chooseLocale(names) {\n        var i = 0,\n            j,\n            next,\n            locale,\n            split;\n\n        while (i < names.length) {\n            split = normalizeLocale(names[i]).split('-');\n            j = split.length;\n            next = normalizeLocale(names[i + 1]);\n            next = next ? next.split('-') : null;\n            while (j > 0) {\n                locale = loadLocale(split.slice(0, j).join('-'));\n                if (locale) {\n                    return locale;\n                }\n                if (\n                    next &&\n                    next.length >= j &&\n                    commonPrefix(split, next) >= j - 1\n                ) {\n                    //the next array item is better than a shallower substring of this one\n                    break;\n                }\n                j--;\n            }\n            i++;\n        }\n        return globalLocale;\n    }\n\n    function isLocaleNameSane(name) {\n        // Prevent names that look like filesystem paths, i.e contain '/' or '\\'\n        // Ensure name is available and function returns boolean\n        return !!(name && name.match('^[^/\\\\\\\\]*$'));\n    }\n\n    function loadLocale(name) {\n        var oldLocale = null,\n            aliasedRequire;\n        // TODO: Find a better way to register and load all the locales in Node\n        if (\n            locales[name] === undefined &&\n            typeof module !== 'undefined' &&\n            module &&\n            module.exports &&\n            isLocaleNameSane(name)\n        ) {\n            try {\n                oldLocale = globalLocale._abbr;\n                aliasedRequire = require;\n                aliasedRequire('./locale/' + name);\n                getSetGlobalLocale(oldLocale);\n            } catch (e) {\n                // mark as not found to avoid repeating expensive file require call causing high CPU\n                // when trying to find en-US, en_US, en-us for every format call\n                locales[name] = null; // null means not found\n            }\n        }\n        return locales[name];\n    }\n\n    // This function will load locale and then set the global locale.  If\n    // no arguments are passed in, it will simply return the current global\n    // locale key.\n    function getSetGlobalLocale(key, values) {\n        var data;\n        if (key) {\n            if (isUndefined(values)) {\n                data = getLocale(key);\n            } else {\n                data = defineLocale(key, values);\n            }\n\n            if (data) {\n                // moment.duration._locale = moment._locale = data;\n                globalLocale = data;\n            } else {\n                if (typeof console !== 'undefined' && console.warn) {\n                    //warn user if arguments are passed but the locale could not be set\n                    console.warn(\n                        'Locale ' + key + ' not found. Did you forget to load it?'\n                    );\n                }\n            }\n        }\n\n        return globalLocale._abbr;\n    }\n\n    function defineLocale(name, config) {\n        if (config !== null) {\n            var locale,\n                parentConfig = baseConfig;\n            config.abbr = name;\n            if (locales[name] != null) {\n                deprecateSimple(\n                    'defineLocaleOverride',\n                    'use moment.updateLocale(localeName, config) to change ' +\n                        'an existing locale. moment.defineLocale(localeName, ' +\n                        'config) should only be used for creating a new locale ' +\n                        'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'\n                );\n                parentConfig = locales[name]._config;\n            } else if (config.parentLocale != null) {\n                if (locales[config.parentLocale] != null) {\n                    parentConfig = locales[config.parentLocale]._config;\n                } else {\n                    locale = loadLocale(config.parentLocale);\n                    if (locale != null) {\n                        parentConfig = locale._config;\n                    } else {\n                        if (!localeFamilies[config.parentLocale]) {\n                            localeFamilies[config.parentLocale] = [];\n                        }\n                        localeFamilies[config.parentLocale].push({\n                            name: name,\n                            config: config,\n                        });\n                        return null;\n                    }\n                }\n            }\n            locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n            if (localeFamilies[name]) {\n                localeFamilies[name].forEach(function (x) {\n                    defineLocale(x.name, x.config);\n                });\n            }\n\n            // backwards compat for now: also set the locale\n            // make sure we set the locale AFTER all child locales have been\n            // created, so we won't end up with the child locale set.\n            getSetGlobalLocale(name);\n\n            return locales[name];\n        } else {\n            // useful for testing\n            delete locales[name];\n            return null;\n        }\n    }\n\n    function updateLocale(name, config) {\n        if (config != null) {\n            var locale,\n                tmpLocale,\n                parentConfig = baseConfig;\n\n            if (locales[name] != null && locales[name].parentLocale != null) {\n                // Update existing child locale in-place to avoid memory-leaks\n                locales[name].set(mergeConfigs(locales[name]._config, config));\n            } else {\n                // MERGE\n                tmpLocale = loadLocale(name);\n                if (tmpLocale != null) {\n                    parentConfig = tmpLocale._config;\n                }\n                config = mergeConfigs(parentConfig, config);\n                if (tmpLocale == null) {\n                    // updateLocale is called for creating a new locale\n                    // Set abbr so it will have a name (getters return\n                    // undefined otherwise).\n                    config.abbr = name;\n                }\n                locale = new Locale(config);\n                locale.parentLocale = locales[name];\n                locales[name] = locale;\n            }\n\n            // backwards compat for now: also set the locale\n            getSetGlobalLocale(name);\n        } else {\n            // pass null for config to unupdate, useful for tests\n            if (locales[name] != null) {\n                if (locales[name].parentLocale != null) {\n                    locales[name] = locales[name].parentLocale;\n                    if (name === getSetGlobalLocale()) {\n                        getSetGlobalLocale(name);\n                    }\n                } else if (locales[name] != null) {\n                    delete locales[name];\n                }\n            }\n        }\n        return locales[name];\n    }\n\n    // returns locale data\n    function getLocale(key) {\n        var locale;\n\n        if (key && key._locale && key._locale._abbr) {\n            key = key._locale._abbr;\n        }\n\n        if (!key) {\n            return globalLocale;\n        }\n\n        if (!isArray(key)) {\n            //short-circuit everything else\n            locale = loadLocale(key);\n            if (locale) {\n                return locale;\n            }\n            key = [key];\n        }\n\n        return chooseLocale(key);\n    }\n\n    function listLocales() {\n        return keys(locales);\n    }\n\n    function checkOverflow(m) {\n        var overflow,\n            a = m._a;\n\n        if (a && getParsingFlags(m).overflow === -2) {\n            overflow =\n                a[MONTH] < 0 || a[MONTH] > 11\n                    ? MONTH\n                    : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])\n                      ? DATE\n                      : a[HOUR] < 0 ||\n                          a[HOUR] > 24 ||\n                          (a[HOUR] === 24 &&\n                              (a[MINUTE] !== 0 ||\n                                  a[SECOND] !== 0 ||\n                                  a[MILLISECOND] !== 0))\n                        ? HOUR\n                        : a[MINUTE] < 0 || a[MINUTE] > 59\n                          ? MINUTE\n                          : a[SECOND] < 0 || a[SECOND] > 59\n                            ? SECOND\n                            : a[MILLISECOND] < 0 || a[MILLISECOND] > 999\n                              ? MILLISECOND\n                              : -1;\n\n            if (\n                getParsingFlags(m)._overflowDayOfYear &&\n                (overflow < YEAR || overflow > DATE)\n            ) {\n                overflow = DATE;\n            }\n            if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n                overflow = WEEK;\n            }\n            if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n                overflow = WEEKDAY;\n            }\n\n            getParsingFlags(m).overflow = overflow;\n        }\n\n        return m;\n    }\n\n    // iso 8601 regex\n    // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\n    var extendedIsoRegex =\n            /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n        basicIsoRegex =\n            /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d|))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n        tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/,\n        isoDates = [\n            ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/],\n            ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/],\n            ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/],\n            ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false],\n            ['YYYY-DDD', /\\d{4}-\\d{3}/],\n            ['YYYY-MM', /\\d{4}-\\d\\d/, false],\n            ['YYYYYYMMDD', /[+-]\\d{10}/],\n            ['YYYYMMDD', /\\d{8}/],\n            ['GGGG[W]WWE', /\\d{4}W\\d{3}/],\n            ['GGGG[W]WW', /\\d{4}W\\d{2}/, false],\n            ['YYYYDDD', /\\d{7}/],\n            ['YYYYMM', /\\d{6}/, false],\n            ['YYYY', /\\d{4}/, false],\n        ],\n        // iso time formats and regexes\n        isoTimes = [\n            ['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n            ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/],\n            ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/],\n            ['HH:mm', /\\d\\d:\\d\\d/],\n            ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/],\n            ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/],\n            ['HHmmss', /\\d\\d\\d\\d\\d\\d/],\n            ['HHmm', /\\d\\d\\d\\d/],\n            ['HH', /\\d\\d/],\n        ],\n        aspNetJsonRegex = /^\\/?Date\\((-?\\d+)/i,\n        // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n        rfc2822 =\n            /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,\n        obsOffsets = {\n            UT: 0,\n            GMT: 0,\n            EDT: -4 * 60,\n            EST: -5 * 60,\n            CDT: -5 * 60,\n            CST: -6 * 60,\n            MDT: -6 * 60,\n            MST: -7 * 60,\n            PDT: -7 * 60,\n            PST: -8 * 60,\n        };\n\n    // date from iso format\n    function configFromISO(config) {\n        var i,\n            l,\n            string = config._i,\n            match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n            allowTime,\n            dateFormat,\n            timeFormat,\n            tzFormat,\n            isoDatesLen = isoDates.length,\n            isoTimesLen = isoTimes.length;\n\n        if (match) {\n            getParsingFlags(config).iso = true;\n            for (i = 0, l = isoDatesLen; i < l; i++) {\n                if (isoDates[i][1].exec(match[1])) {\n                    dateFormat = isoDates[i][0];\n                    allowTime = isoDates[i][2] !== false;\n                    break;\n                }\n            }\n            if (dateFormat == null) {\n                config._isValid = false;\n                return;\n            }\n            if (match[3]) {\n                for (i = 0, l = isoTimesLen; i < l; i++) {\n                    if (isoTimes[i][1].exec(match[3])) {\n                        // match[2] should be 'T' or space\n                        timeFormat = (match[2] || ' ') + isoTimes[i][0];\n                        break;\n                    }\n                }\n                if (timeFormat == null) {\n                    config._isValid = false;\n                    return;\n                }\n            }\n            if (!allowTime && timeFormat != null) {\n                config._isValid = false;\n                return;\n            }\n            if (match[4]) {\n                if (tzRegex.exec(match[4])) {\n                    tzFormat = 'Z';\n                } else {\n                    config._isValid = false;\n                    return;\n                }\n            }\n            config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n            configFromStringAndFormat(config);\n        } else {\n            config._isValid = false;\n        }\n    }\n\n    function extractFromRFC2822Strings(\n        yearStr,\n        monthStr,\n        dayStr,\n        hourStr,\n        minuteStr,\n        secondStr\n    ) {\n        var result = [\n            untruncateYear(yearStr),\n            defaultLocaleMonthsShort.indexOf(monthStr),\n            parseInt(dayStr, 10),\n            parseInt(hourStr, 10),\n            parseInt(minuteStr, 10),\n        ];\n\n        if (secondStr) {\n            result.push(parseInt(secondStr, 10));\n        }\n\n        return result;\n    }\n\n    function untruncateYear(yearStr) {\n        var year = parseInt(yearStr, 10);\n        if (year <= 49) {\n            return 2000 + year;\n        } else if (year <= 999) {\n            return 1900 + year;\n        }\n        return year;\n    }\n\n    function preprocessRFC2822(s) {\n        // Remove comments and folding whitespace and replace multiple-spaces with a single space\n        return s\n            .replace(/\\([^()]*\\)|[\\n\\t]/g, ' ')\n            .replace(/(\\s\\s+)/g, ' ')\n            .replace(/^\\s\\s*/, '')\n            .replace(/\\s\\s*$/, '');\n    }\n\n    function checkWeekday(weekdayStr, parsedInput, config) {\n        if (weekdayStr) {\n            // TODO: Replace the vanilla JS Date object with an independent day-of-week check.\n            var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n                weekdayActual = new Date(\n                    parsedInput[0],\n                    parsedInput[1],\n                    parsedInput[2]\n                ).getDay();\n            if (weekdayProvided !== weekdayActual) {\n                getParsingFlags(config).weekdayMismatch = true;\n                config._isValid = false;\n                return false;\n            }\n        }\n        return true;\n    }\n\n    function calculateOffset(obsOffset, militaryOffset, numOffset) {\n        if (obsOffset) {\n            return obsOffsets[obsOffset];\n        } else if (militaryOffset) {\n            // the only allowed military tz is Z\n            return 0;\n        } else {\n            var hm = parseInt(numOffset, 10),\n                m = hm % 100,\n                h = (hm - m) / 100;\n            return h * 60 + m;\n        }\n    }\n\n    // date and time from ref 2822 format\n    function configFromRFC2822(config) {\n        var match = rfc2822.exec(preprocessRFC2822(config._i)),\n            parsedArray;\n        if (match) {\n            parsedArray = extractFromRFC2822Strings(\n                match[4],\n                match[3],\n                match[2],\n                match[5],\n                match[6],\n                match[7]\n            );\n            if (!checkWeekday(match[1], parsedArray, config)) {\n                return;\n            }\n\n            config._a = parsedArray;\n            config._tzm = calculateOffset(match[8], match[9], match[10]);\n\n            config._d = createUTCDate.apply(null, config._a);\n            config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n            getParsingFlags(config).rfc2822 = true;\n        } else {\n            config._isValid = false;\n        }\n    }\n\n    // date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict\n    function configFromString(config) {\n        var matched = aspNetJsonRegex.exec(config._i);\n        if (matched !== null) {\n            config._d = new Date(+matched[1]);\n            return;\n        }\n\n        configFromISO(config);\n        if (config._isValid === false) {\n            delete config._isValid;\n        } else {\n            return;\n        }\n\n        configFromRFC2822(config);\n        if (config._isValid === false) {\n            delete config._isValid;\n        } else {\n            return;\n        }\n\n        if (config._strict) {\n            config._isValid = false;\n        } else {\n            // Final attempt, use Input Fallback\n            hooks.createFromInputFallback(config);\n        }\n    }\n\n    hooks.createFromInputFallback = deprecate(\n        'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +\n            'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +\n            'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',\n        function (config) {\n            config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n        }\n    );\n\n    // Pick the first defined of two or three arguments.\n    function defaults(a, b, c) {\n        if (a != null) {\n            return a;\n        }\n        if (b != null) {\n            return b;\n        }\n        return c;\n    }\n\n    function currentDateArray(config) {\n        // hooks is actually the exported moment object\n        var nowValue = new Date(hooks.now());\n        if (config._useUTC) {\n            return [\n                nowValue.getUTCFullYear(),\n                nowValue.getUTCMonth(),\n                nowValue.getUTCDate(),\n            ];\n        }\n        return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n    }\n\n    // convert an array to a date.\n    // the array should mirror the parameters below\n    // note: all values past the year are optional and will default to the lowest possible value.\n    // [year, month, day , hour, minute, second, millisecond]\n    function configFromArray(config) {\n        var i,\n            date,\n            input = [],\n            currentDate,\n            expectedWeekday,\n            yearToUse;\n\n        if (config._d) {\n            return;\n        }\n\n        currentDate = currentDateArray(config);\n\n        //compute day of the year from weeks and weekdays\n        if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n            dayOfYearFromWeekInfo(config);\n        }\n\n        //if the day of the year is set, figure out what it is\n        if (config._dayOfYear != null) {\n            yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n            if (\n                config._dayOfYear > daysInYear(yearToUse) ||\n                config._dayOfYear === 0\n            ) {\n                getParsingFlags(config)._overflowDayOfYear = true;\n            }\n\n            date = createUTCDate(yearToUse, 0, config._dayOfYear);\n            config._a[MONTH] = date.getUTCMonth();\n            config._a[DATE] = date.getUTCDate();\n        }\n\n        // Default to current date.\n        // * if no year, month, day of month are given, default to today\n        // * if day of month is given, default month and year\n        // * if month is given, default only year\n        // * if year is given, don't default anything\n        for (i = 0; i < 3 && config._a[i] == null; ++i) {\n            config._a[i] = input[i] = currentDate[i];\n        }\n\n        // Zero out whatever was not defaulted, including time\n        for (; i < 7; i++) {\n            config._a[i] = input[i] =\n                config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];\n        }\n\n        // Check for 24:00:00.000\n        if (\n            config._a[HOUR] === 24 &&\n            config._a[MINUTE] === 0 &&\n            config._a[SECOND] === 0 &&\n            config._a[MILLISECOND] === 0\n        ) {\n            config._nextDay = true;\n            config._a[HOUR] = 0;\n        }\n\n        config._d = (config._useUTC ? createUTCDate : createDate).apply(\n            null,\n            input\n        );\n        expectedWeekday = config._useUTC\n            ? config._d.getUTCDay()\n            : config._d.getDay();\n\n        // Apply timezone offset from input. The actual utcOffset can be changed\n        // with parseZone.\n        if (config._tzm != null) {\n            config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n        }\n\n        if (config._nextDay) {\n            config._a[HOUR] = 24;\n        }\n\n        // check for mismatching day of week\n        if (\n            config._w &&\n            typeof config._w.d !== 'undefined' &&\n            config._w.d !== expectedWeekday\n        ) {\n            getParsingFlags(config).weekdayMismatch = true;\n        }\n    }\n\n    function dayOfYearFromWeekInfo(config) {\n        var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;\n\n        w = config._w;\n        if (w.GG != null || w.W != null || w.E != null) {\n            dow = 1;\n            doy = 4;\n\n            // TODO: We need to take the current isoWeekYear, but that depends on\n            // how we interpret now (local, utc, fixed offset). So create\n            // a now version of current config (take local/utc/offset flags, and\n            // create now).\n            weekYear = defaults(\n                w.GG,\n                config._a[YEAR],\n                weekOfYear(createLocal(), 1, 4).year\n            );\n            week = defaults(w.W, 1);\n            weekday = defaults(w.E, 1);\n            if (weekday < 1 || weekday > 7) {\n                weekdayOverflow = true;\n            }\n        } else {\n            dow = config._locale._week.dow;\n            doy = config._locale._week.doy;\n\n            curWeek = weekOfYear(createLocal(), dow, doy);\n\n            weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);\n\n            // Default to current week.\n            week = defaults(w.w, curWeek.week);\n\n            if (w.d != null) {\n                // weekday -- low day numbers are considered next week\n                weekday = w.d;\n                if (weekday < 0 || weekday > 6) {\n                    weekdayOverflow = true;\n                }\n            } else if (w.e != null) {\n                // local weekday -- counting starts from beginning of week\n                weekday = w.e + dow;\n                if (w.e < 0 || w.e > 6) {\n                    weekdayOverflow = true;\n                }\n            } else {\n                // default to beginning of week\n                weekday = dow;\n            }\n        }\n        if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n            getParsingFlags(config)._overflowWeeks = true;\n        } else if (weekdayOverflow != null) {\n            getParsingFlags(config)._overflowWeekday = true;\n        } else {\n            temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n            config._a[YEAR] = temp.year;\n            config._dayOfYear = temp.dayOfYear;\n        }\n    }\n\n    // constant that refers to the ISO standard\n    hooks.ISO_8601 = function () {};\n\n    // constant that refers to the RFC 2822 form\n    hooks.RFC_2822 = function () {};\n\n    // date from string and format string\n    function configFromStringAndFormat(config) {\n        // TODO: Move this to another part of the creation flow to prevent circular deps\n        if (config._f === hooks.ISO_8601) {\n            configFromISO(config);\n            return;\n        }\n        if (config._f === hooks.RFC_2822) {\n            configFromRFC2822(config);\n            return;\n        }\n        config._a = [];\n        getParsingFlags(config).empty = true;\n\n        // This array is used to make a Date, either with `new Date` or `Date.UTC`\n        var string = '' + config._i,\n            i,\n            parsedInput,\n            tokens,\n            token,\n            skipped,\n            stringLength = string.length,\n            totalParsedInputLength = 0,\n            era,\n            tokenLen;\n\n        tokens =\n            expandFormat(config._f, config._locale).match(formattingTokens) || [];\n        tokenLen = tokens.length;\n        for (i = 0; i < tokenLen; i++) {\n            token = tokens[i];\n            parsedInput = (string.match(getParseRegexForToken(token, config)) ||\n                [])[0];\n            if (parsedInput) {\n                skipped = string.substr(0, string.indexOf(parsedInput));\n                if (skipped.length > 0) {\n                    getParsingFlags(config).unusedInput.push(skipped);\n                }\n                string = string.slice(\n                    string.indexOf(parsedInput) + parsedInput.length\n                );\n                totalParsedInputLength += parsedInput.length;\n            }\n            // don't parse if it's not a known token\n            if (formatTokenFunctions[token]) {\n                if (parsedInput) {\n                    getParsingFlags(config).empty = false;\n                } else {\n                    getParsingFlags(config).unusedTokens.push(token);\n                }\n                addTimeToArrayFromToken(token, parsedInput, config);\n            } else if (config._strict && !parsedInput) {\n                getParsingFlags(config).unusedTokens.push(token);\n            }\n        }\n\n        // add remaining unparsed input length to the string\n        getParsingFlags(config).charsLeftOver =\n            stringLength - totalParsedInputLength;\n        if (string.length > 0) {\n            getParsingFlags(config).unusedInput.push(string);\n        }\n\n        // clear _12h flag if hour is <= 12\n        if (\n            config._a[HOUR] <= 12 &&\n            getParsingFlags(config).bigHour === true &&\n            config._a[HOUR] > 0\n        ) {\n            getParsingFlags(config).bigHour = undefined;\n        }\n\n        getParsingFlags(config).parsedDateParts = config._a.slice(0);\n        getParsingFlags(config).meridiem = config._meridiem;\n        // handle meridiem\n        config._a[HOUR] = meridiemFixWrap(\n            config._locale,\n            config._a[HOUR],\n            config._meridiem\n        );\n\n        // handle era\n        era = getParsingFlags(config).era;\n        if (era !== null) {\n            config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);\n        }\n\n        configFromArray(config);\n        checkOverflow(config);\n    }\n\n    function meridiemFixWrap(locale, hour, meridiem) {\n        var isPm;\n\n        if (meridiem == null) {\n            // nothing to do\n            return hour;\n        }\n        if (locale.meridiemHour != null) {\n            return locale.meridiemHour(hour, meridiem);\n        } else if (locale.isPM != null) {\n            // Fallback\n            isPm = locale.isPM(meridiem);\n            if (isPm && hour < 12) {\n                hour += 12;\n            }\n            if (!isPm && hour === 12) {\n                hour = 0;\n            }\n            return hour;\n        } else {\n            // this is not supposed to happen\n            return hour;\n        }\n    }\n\n    // date from string and array of format strings\n    function configFromStringAndArray(config) {\n        var tempConfig,\n            bestMoment,\n            scoreToBeat,\n            i,\n            currentScore,\n            validFormatFound,\n            bestFormatIsValid = false,\n            configfLen = config._f.length;\n\n        if (configfLen === 0) {\n            getParsingFlags(config).invalidFormat = true;\n            config._d = new Date(NaN);\n            return;\n        }\n\n        for (i = 0; i < configfLen; i++) {\n            currentScore = 0;\n            validFormatFound = false;\n            tempConfig = copyConfig({}, config);\n            if (config._useUTC != null) {\n                tempConfig._useUTC = config._useUTC;\n            }\n            tempConfig._f = config._f[i];\n            configFromStringAndFormat(tempConfig);\n\n            if (isValid(tempConfig)) {\n                validFormatFound = true;\n            }\n\n            // if there is any input that was not parsed add a penalty for that format\n            currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n            //or tokens\n            currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n            getParsingFlags(tempConfig).score = currentScore;\n\n            if (!bestFormatIsValid) {\n                if (\n                    scoreToBeat == null ||\n                    currentScore < scoreToBeat ||\n                    validFormatFound\n                ) {\n                    scoreToBeat = currentScore;\n                    bestMoment = tempConfig;\n                    if (validFormatFound) {\n                        bestFormatIsValid = true;\n                    }\n                }\n            } else {\n                if (currentScore < scoreToBeat) {\n                    scoreToBeat = currentScore;\n                    bestMoment = tempConfig;\n                }\n            }\n        }\n\n        extend(config, bestMoment || tempConfig);\n    }\n\n    function configFromObject(config) {\n        if (config._d) {\n            return;\n        }\n\n        var i = normalizeObjectUnits(config._i),\n            dayOrDate = i.day === undefined ? i.date : i.day;\n        config._a = map(\n            [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],\n            function (obj) {\n                return obj && parseInt(obj, 10);\n            }\n        );\n\n        configFromArray(config);\n    }\n\n    function createFromConfig(config) {\n        var res = new Moment(checkOverflow(prepareConfig(config)));\n        if (res._nextDay) {\n            // Adding is smart enough around DST\n            res.add(1, 'd');\n            res._nextDay = undefined;\n        }\n\n        return res;\n    }\n\n    function prepareConfig(config) {\n        var input = config._i,\n            format = config._f;\n\n        config._locale = config._locale || getLocale(config._l);\n\n        if (input === null || (format === undefined && input === '')) {\n            return createInvalid({ nullInput: true });\n        }\n\n        if (typeof input === 'string') {\n            config._i = input = config._locale.preparse(input);\n        }\n\n        if (isMoment(input)) {\n            return new Moment(checkOverflow(input));\n        } else if (isDate(input)) {\n            config._d = input;\n        } else if (isArray(format)) {\n            configFromStringAndArray(config);\n        } else if (format) {\n            configFromStringAndFormat(config);\n        } else {\n            configFromInput(config);\n        }\n\n        if (!isValid(config)) {\n            config._d = null;\n        }\n\n        return config;\n    }\n\n    function configFromInput(config) {\n        var input = config._i;\n        if (isUndefined(input)) {\n            config._d = new Date(hooks.now());\n        } else if (isDate(input)) {\n            config._d = new Date(input.valueOf());\n        } else if (typeof input === 'string') {\n            configFromString(config);\n        } else if (isArray(input)) {\n            config._a = map(input.slice(0), function (obj) {\n                return parseInt(obj, 10);\n            });\n            configFromArray(config);\n        } else if (isObject(input)) {\n            configFromObject(config);\n        } else if (isNumber(input)) {\n            // from milliseconds\n            config._d = new Date(input);\n        } else {\n            hooks.createFromInputFallback(config);\n        }\n    }\n\n    function createLocalOrUTC(input, format, locale, strict, isUTC) {\n        var c = {};\n\n        if (format === true || format === false) {\n            strict = format;\n            format = undefined;\n        }\n\n        if (locale === true || locale === false) {\n            strict = locale;\n            locale = undefined;\n        }\n\n        if (\n            (isObject(input) && isObjectEmpty(input)) ||\n            (isArray(input) && input.length === 0)\n        ) {\n            input = undefined;\n        }\n        // object construction must be done this way.\n        // https://github.com/moment/moment/issues/1423\n        c._isAMomentObject = true;\n        c._useUTC = c._isUTC = isUTC;\n        c._l = locale;\n        c._i = input;\n        c._f = format;\n        c._strict = strict;\n\n        return createFromConfig(c);\n    }\n\n    function createLocal(input, format, locale, strict) {\n        return createLocalOrUTC(input, format, locale, strict, false);\n    }\n\n    var prototypeMin = deprecate(\n            'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',\n            function () {\n                var other = createLocal.apply(null, arguments);\n                if (this.isValid() && other.isValid()) {\n                    return other < this ? this : other;\n                } else {\n                    return createInvalid();\n                }\n            }\n        ),\n        prototypeMax = deprecate(\n            'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',\n            function () {\n                var other = createLocal.apply(null, arguments);\n                if (this.isValid() && other.isValid()) {\n                    return other > this ? this : other;\n                } else {\n                    return createInvalid();\n                }\n            }\n        );\n\n    // Pick a moment m from moments so that m[fn](other) is true for all\n    // other. This relies on the function fn to be transitive.\n    //\n    // moments should either be an array of moment objects or an array, whose\n    // first element is an array of moment objects.\n    function pickBy(fn, moments) {\n        var res, i;\n        if (moments.length === 1 && isArray(moments[0])) {\n            moments = moments[0];\n        }\n        if (!moments.length) {\n            return createLocal();\n        }\n        res = moments[0];\n        for (i = 1; i < moments.length; ++i) {\n            if (!moments[i].isValid() || moments[i][fn](res)) {\n                res = moments[i];\n            }\n        }\n        return res;\n    }\n\n    // TODO: Use [].sort instead?\n    function min() {\n        var args = [].slice.call(arguments, 0);\n\n        return pickBy('isBefore', args);\n    }\n\n    function max() {\n        var args = [].slice.call(arguments, 0);\n\n        return pickBy('isAfter', args);\n    }\n\n    var now = function () {\n        return Date.now ? Date.now() : +new Date();\n    };\n\n    var ordering = [\n        'year',\n        'quarter',\n        'month',\n        'week',\n        'day',\n        'hour',\n        'minute',\n        'second',\n        'millisecond',\n    ];\n\n    function isDurationValid(m) {\n        var key,\n            unitHasDecimal = false,\n            i,\n            orderLen = ordering.length;\n        for (key in m) {\n            if (\n                hasOwnProp(m, key) &&\n                !(\n                    indexOf.call(ordering, key) !== -1 &&\n                    (m[key] == null || !isNaN(m[key]))\n                )\n            ) {\n                return false;\n            }\n        }\n\n        for (i = 0; i < orderLen; ++i) {\n            if (m[ordering[i]]) {\n                if (unitHasDecimal) {\n                    return false; // only allow non-integers for smallest unit\n                }\n                if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n                    unitHasDecimal = true;\n                }\n            }\n        }\n\n        return true;\n    }\n\n    function isValid$1() {\n        return this._isValid;\n    }\n\n    function createInvalid$1() {\n        return createDuration(NaN);\n    }\n\n    function Duration(duration) {\n        var normalizedInput = normalizeObjectUnits(duration),\n            years = normalizedInput.year || 0,\n            quarters = normalizedInput.quarter || 0,\n            months = normalizedInput.month || 0,\n            weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n            days = normalizedInput.day || 0,\n            hours = normalizedInput.hour || 0,\n            minutes = normalizedInput.minute || 0,\n            seconds = normalizedInput.second || 0,\n            milliseconds = normalizedInput.millisecond || 0;\n\n        this._isValid = isDurationValid(normalizedInput);\n\n        // representation for dateAddRemove\n        this._milliseconds =\n            +milliseconds +\n            seconds * 1e3 + // 1000\n            minutes * 6e4 + // 1000 * 60\n            hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n        // Because of dateAddRemove treats 24 hours as different from a\n        // day when working around DST, we need to store them separately\n        this._days = +days + weeks * 7;\n        // It is impossible to translate months into days without knowing\n        // which months you are are talking about, so we have to store\n        // it separately.\n        this._months = +months + quarters * 3 + years * 12;\n\n        this._data = {};\n\n        this._locale = getLocale();\n\n        this._bubble();\n    }\n\n    function isDuration(obj) {\n        return obj instanceof Duration;\n    }\n\n    function absRound(number) {\n        if (number < 0) {\n            return Math.round(-1 * number) * -1;\n        } else {\n            return Math.round(number);\n        }\n    }\n\n    // compare two arrays, return the number of differences\n    function compareArrays(array1, array2, dontConvert) {\n        var len = Math.min(array1.length, array2.length),\n            lengthDiff = Math.abs(array1.length - array2.length),\n            diffs = 0,\n            i;\n        for (i = 0; i < len; i++) {\n            if (\n                (dontConvert && array1[i] !== array2[i]) ||\n                (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))\n            ) {\n                diffs++;\n            }\n        }\n        return diffs + lengthDiff;\n    }\n\n    // FORMATTING\n\n    function offset(token, separator) {\n        addFormatToken(token, 0, 0, function () {\n            var offset = this.utcOffset(),\n                sign = '+';\n            if (offset < 0) {\n                offset = -offset;\n                sign = '-';\n            }\n            return (\n                sign +\n                zeroFill(~~(offset / 60), 2) +\n                separator +\n                zeroFill(~~offset % 60, 2)\n            );\n        });\n    }\n\n    offset('Z', ':');\n    offset('ZZ', '');\n\n    // PARSING\n\n    addRegexToken('Z', matchShortOffset);\n    addRegexToken('ZZ', matchShortOffset);\n    addParseToken(['Z', 'ZZ'], function (input, array, config) {\n        config._useUTC = true;\n        config._tzm = offsetFromString(matchShortOffset, input);\n    });\n\n    // HELPERS\n\n    // timezone chunker\n    // '+10:00' > ['10',  '00']\n    // '-1530'  > ['-15', '30']\n    var chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\n    function offsetFromString(matcher, string) {\n        var matches = (string || '').match(matcher),\n            chunk,\n            parts,\n            minutes;\n\n        if (matches === null) {\n            return null;\n        }\n\n        chunk = matches[matches.length - 1] || [];\n        parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n        minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n        return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;\n    }\n\n    // Return a moment from input, that is local/utc/zone equivalent to model.\n    function cloneWithOffset(input, model) {\n        var res, diff;\n        if (model._isUTC) {\n            res = model.clone();\n            diff =\n                (isMoment(input) || isDate(input)\n                    ? input.valueOf()\n                    : createLocal(input).valueOf()) - res.valueOf();\n            // Use low-level api, because this fn is low-level api.\n            res._d.setTime(res._d.valueOf() + diff);\n            hooks.updateOffset(res, false);\n            return res;\n        } else {\n            return createLocal(input).local();\n        }\n    }\n\n    function getDateOffset(m) {\n        // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n        // https://github.com/moment/moment/pull/1871\n        return -Math.round(m._d.getTimezoneOffset());\n    }\n\n    // HOOKS\n\n    // This function will be called whenever a moment is mutated.\n    // It is intended to keep the offset in sync with the timezone.\n    hooks.updateOffset = function () {};\n\n    // MOMENTS\n\n    // keepLocalTime = true means only change the timezone, without\n    // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n    // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n    // +0200, so we adjust the time as needed, to be valid.\n    //\n    // Keeping the time actually adds/subtracts (one hour)\n    // from the actual represented time. That is why we call updateOffset\n    // a second time. In case it wants us to change the offset again\n    // _changeInProgress == true case, then we have to adjust, because\n    // there is no such time in the given timezone.\n    function getSetOffset(input, keepLocalTime, keepMinutes) {\n        var offset = this._offset || 0,\n            localAdjust;\n        if (!this.isValid()) {\n            return input != null ? this : NaN;\n        }\n        if (input != null) {\n            if (typeof input === 'string') {\n                input = offsetFromString(matchShortOffset, input);\n                if (input === null) {\n                    return this;\n                }\n            } else if (Math.abs(input) < 16 && !keepMinutes) {\n                input = input * 60;\n            }\n            if (!this._isUTC && keepLocalTime) {\n                localAdjust = getDateOffset(this);\n            }\n            this._offset = input;\n            this._isUTC = true;\n            if (localAdjust != null) {\n                this.add(localAdjust, 'm');\n            }\n            if (offset !== input) {\n                if (!keepLocalTime || this._changeInProgress) {\n                    addSubtract(\n                        this,\n                        createDuration(input - offset, 'm'),\n                        1,\n                        false\n                    );\n                } else if (!this._changeInProgress) {\n                    this._changeInProgress = true;\n                    hooks.updateOffset(this, true);\n                    this._changeInProgress = null;\n                }\n            }\n            return this;\n        } else {\n            return this._isUTC ? offset : getDateOffset(this);\n        }\n    }\n\n    function getSetZone(input, keepLocalTime) {\n        if (input != null) {\n            if (typeof input !== 'string') {\n                input = -input;\n            }\n\n            this.utcOffset(input, keepLocalTime);\n\n            return this;\n        } else {\n            return -this.utcOffset();\n        }\n    }\n\n    function setOffsetToUTC(keepLocalTime) {\n        return this.utcOffset(0, keepLocalTime);\n    }\n\n    function setOffsetToLocal(keepLocalTime) {\n        if (this._isUTC) {\n            this.utcOffset(0, keepLocalTime);\n            this._isUTC = false;\n\n            if (keepLocalTime) {\n                this.subtract(getDateOffset(this), 'm');\n            }\n        }\n        return this;\n    }\n\n    function setOffsetToParsedOffset() {\n        if (this._tzm != null) {\n            this.utcOffset(this._tzm, false, true);\n        } else if (typeof this._i === 'string') {\n            var tZone = offsetFromString(matchOffset, this._i);\n            if (tZone != null) {\n                this.utcOffset(tZone);\n            } else {\n                this.utcOffset(0, true);\n            }\n        }\n        return this;\n    }\n\n    function hasAlignedHourOffset(input) {\n        if (!this.isValid()) {\n            return false;\n        }\n        input = input ? createLocal(input).utcOffset() : 0;\n\n        return (this.utcOffset() - input) % 60 === 0;\n    }\n\n    function isDaylightSavingTime() {\n        return (\n            this.utcOffset() > this.clone().month(0).utcOffset() ||\n            this.utcOffset() > this.clone().month(5).utcOffset()\n        );\n    }\n\n    function isDaylightSavingTimeShifted() {\n        if (!isUndefined(this._isDSTShifted)) {\n            return this._isDSTShifted;\n        }\n\n        var c = {},\n            other;\n\n        copyConfig(c, this);\n        c = prepareConfig(c);\n\n        if (c._a) {\n            other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n            this._isDSTShifted =\n                this.isValid() && compareArrays(c._a, other.toArray()) > 0;\n        } else {\n            this._isDSTShifted = false;\n        }\n\n        return this._isDSTShifted;\n    }\n\n    function isLocal() {\n        return this.isValid() ? !this._isUTC : false;\n    }\n\n    function isUtcOffset() {\n        return this.isValid() ? this._isUTC : false;\n    }\n\n    function isUtc() {\n        return this.isValid() ? this._isUTC && this._offset === 0 : false;\n    }\n\n    // ASP.NET json date format regex\n    var aspNetRegex = /^(-|\\+)?(?:(\\d*)[. ])?(\\d+):(\\d+)(?::(\\d+)(\\.\\d*)?)?$/,\n        // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n        // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n        // and further modified to allow for strings containing both week and day\n        isoRegex =\n            /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\n    function createDuration(input, key) {\n        var duration = input,\n            // matching against regexp is expensive, do it on demand\n            match = null,\n            sign,\n            ret,\n            diffRes;\n\n        if (isDuration(input)) {\n            duration = {\n                ms: input._milliseconds,\n                d: input._days,\n                M: input._months,\n            };\n        } else if (isNumber(input) || !isNaN(+input)) {\n            duration = {};\n            if (key) {\n                duration[key] = +input;\n            } else {\n                duration.milliseconds = +input;\n            }\n        } else if ((match = aspNetRegex.exec(input))) {\n            sign = match[1] === '-' ? -1 : 1;\n            duration = {\n                y: 0,\n                d: toInt(match[DATE]) * sign,\n                h: toInt(match[HOUR]) * sign,\n                m: toInt(match[MINUTE]) * sign,\n                s: toInt(match[SECOND]) * sign,\n                ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match\n            };\n        } else if ((match = isoRegex.exec(input))) {\n            sign = match[1] === '-' ? -1 : 1;\n            duration = {\n                y: parseIso(match[2], sign),\n                M: parseIso(match[3], sign),\n                w: parseIso(match[4], sign),\n                d: parseIso(match[5], sign),\n                h: parseIso(match[6], sign),\n                m: parseIso(match[7], sign),\n                s: parseIso(match[8], sign),\n            };\n        } else if (duration == null) {\n            // checks for null or undefined\n            duration = {};\n        } else if (\n            typeof duration === 'object' &&\n            ('from' in duration || 'to' in duration)\n        ) {\n            diffRes = momentsDifference(\n                createLocal(duration.from),\n                createLocal(duration.to)\n            );\n\n            duration = {};\n            duration.ms = diffRes.milliseconds;\n            duration.M = diffRes.months;\n        }\n\n        ret = new Duration(duration);\n\n        if (isDuration(input) && hasOwnProp(input, '_locale')) {\n            ret._locale = input._locale;\n        }\n\n        if (isDuration(input) && hasOwnProp(input, '_isValid')) {\n            ret._isValid = input._isValid;\n        }\n\n        return ret;\n    }\n\n    createDuration.fn = Duration.prototype;\n    createDuration.invalid = createInvalid$1;\n\n    function parseIso(inp, sign) {\n        // We'd normally use ~~inp for this, but unfortunately it also\n        // converts floats to ints.\n        // inp may be undefined, so careful calling replace on it.\n        var res = inp && parseFloat(inp.replace(',', '.'));\n        // apply sign while we're at it\n        return (isNaN(res) ? 0 : res) * sign;\n    }\n\n    function positiveMomentsDifference(base, other) {\n        var res = {};\n\n        res.months =\n            other.month() - base.month() + (other.year() - base.year()) * 12;\n        if (base.clone().add(res.months, 'M').isAfter(other)) {\n            --res.months;\n        }\n\n        res.milliseconds = +other - +base.clone().add(res.months, 'M');\n\n        return res;\n    }\n\n    function momentsDifference(base, other) {\n        var res;\n        if (!(base.isValid() && other.isValid())) {\n            return { milliseconds: 0, months: 0 };\n        }\n\n        other = cloneWithOffset(other, base);\n        if (base.isBefore(other)) {\n            res = positiveMomentsDifference(base, other);\n        } else {\n            res = positiveMomentsDifference(other, base);\n            res.milliseconds = -res.milliseconds;\n            res.months = -res.months;\n        }\n\n        return res;\n    }\n\n    // TODO: remove 'name' arg after deprecation is removed\n    function createAdder(direction, name) {\n        return function (val, period) {\n            var dur, tmp;\n            //invert the arguments, but complain about it\n            if (period !== null && !isNaN(+period)) {\n                deprecateSimple(\n                    name,\n                    'moment().' +\n                        name +\n                        '(period, number) is deprecated. Please use moment().' +\n                        name +\n                        '(number, period). ' +\n                        'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n                );\n                tmp = val;\n                val = period;\n                period = tmp;\n            }\n\n            dur = createDuration(val, period);\n            addSubtract(this, dur, direction);\n            return this;\n        };\n    }\n\n    function addSubtract(mom, duration, isAdding, updateOffset) {\n        var milliseconds = duration._milliseconds,\n            days = absRound(duration._days),\n            months = absRound(duration._months);\n\n        if (!mom.isValid()) {\n            // No op\n            return;\n        }\n\n        updateOffset = updateOffset == null ? true : updateOffset;\n\n        if (months) {\n            setMonth(mom, get(mom, 'Month') + months * isAdding);\n        }\n        if (days) {\n            set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n        }\n        if (milliseconds) {\n            mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n        }\n        if (updateOffset) {\n            hooks.updateOffset(mom, days || months);\n        }\n    }\n\n    var add = createAdder(1, 'add'),\n        subtract = createAdder(-1, 'subtract');\n\n    function isString(input) {\n        return typeof input === 'string' || input instanceof String;\n    }\n\n    // type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined\n    function isMomentInput(input) {\n        return (\n            isMoment(input) ||\n            isDate(input) ||\n            isString(input) ||\n            isNumber(input) ||\n            isNumberOrStringArray(input) ||\n            isMomentInputObject(input) ||\n            input === null ||\n            input === undefined\n        );\n    }\n\n    function isMomentInputObject(input) {\n        var objectTest = isObject(input) && !isObjectEmpty(input),\n            propertyTest = false,\n            properties = [\n                'years',\n                'year',\n                'y',\n                'months',\n                'month',\n                'M',\n                'days',\n                'day',\n                'd',\n                'dates',\n                'date',\n                'D',\n                'hours',\n                'hour',\n                'h',\n                'minutes',\n                'minute',\n                'm',\n                'seconds',\n                'second',\n                's',\n                'milliseconds',\n                'millisecond',\n                'ms',\n            ],\n            i,\n            property,\n            propertyLen = properties.length;\n\n        for (i = 0; i < propertyLen; i += 1) {\n            property = properties[i];\n            propertyTest = propertyTest || hasOwnProp(input, property);\n        }\n\n        return objectTest && propertyTest;\n    }\n\n    function isNumberOrStringArray(input) {\n        var arrayTest = isArray(input),\n            dataTypeTest = false;\n        if (arrayTest) {\n            dataTypeTest =\n                input.filter(function (item) {\n                    return !isNumber(item) && isString(input);\n                }).length === 0;\n        }\n        return arrayTest && dataTypeTest;\n    }\n\n    function isCalendarSpec(input) {\n        var objectTest = isObject(input) && !isObjectEmpty(input),\n            propertyTest = false,\n            properties = [\n                'sameDay',\n                'nextDay',\n                'lastDay',\n                'nextWeek',\n                'lastWeek',\n                'sameElse',\n            ],\n            i,\n            property;\n\n        for (i = 0; i < properties.length; i += 1) {\n            property = properties[i];\n            propertyTest = propertyTest || hasOwnProp(input, property);\n        }\n\n        return objectTest && propertyTest;\n    }\n\n    function getCalendarFormat(myMoment, now) {\n        var diff = myMoment.diff(now, 'days', true);\n        return diff < -6\n            ? 'sameElse'\n            : diff < -1\n              ? 'lastWeek'\n              : diff < 0\n                ? 'lastDay'\n                : diff < 1\n                  ? 'sameDay'\n                  : diff < 2\n                    ? 'nextDay'\n                    : diff < 7\n                      ? 'nextWeek'\n                      : 'sameElse';\n    }\n\n    function calendar$1(time, formats) {\n        // Support for single parameter, formats only overload to the calendar function\n        if (arguments.length === 1) {\n            if (!arguments[0]) {\n                time = undefined;\n                formats = undefined;\n            } else if (isMomentInput(arguments[0])) {\n                time = arguments[0];\n                formats = undefined;\n            } else if (isCalendarSpec(arguments[0])) {\n                formats = arguments[0];\n                time = undefined;\n            }\n        }\n        // We want to compare the start of today, vs this.\n        // Getting start-of-today depends on whether we're local/utc/offset or not.\n        var now = time || createLocal(),\n            sod = cloneWithOffset(now, this).startOf('day'),\n            format = hooks.calendarFormat(this, sod) || 'sameElse',\n            output =\n                formats &&\n                (isFunction(formats[format])\n                    ? formats[format].call(this, now)\n                    : formats[format]);\n\n        return this.format(\n            output || this.localeData().calendar(format, this, createLocal(now))\n        );\n    }\n\n    function clone() {\n        return new Moment(this);\n    }\n\n    function isAfter(input, units) {\n        var localInput = isMoment(input) ? input : createLocal(input);\n        if (!(this.isValid() && localInput.isValid())) {\n            return false;\n        }\n        units = normalizeUnits(units) || 'millisecond';\n        if (units === 'millisecond') {\n            return this.valueOf() > localInput.valueOf();\n        } else {\n            return localInput.valueOf() < this.clone().startOf(units).valueOf();\n        }\n    }\n\n    function isBefore(input, units) {\n        var localInput = isMoment(input) ? input : createLocal(input);\n        if (!(this.isValid() && localInput.isValid())) {\n            return false;\n        }\n        units = normalizeUnits(units) || 'millisecond';\n        if (units === 'millisecond') {\n            return this.valueOf() < localInput.valueOf();\n        } else {\n            return this.clone().endOf(units).valueOf() < localInput.valueOf();\n        }\n    }\n\n    function isBetween(from, to, units, inclusivity) {\n        var localFrom = isMoment(from) ? from : createLocal(from),\n            localTo = isMoment(to) ? to : createLocal(to);\n        if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n            return false;\n        }\n        inclusivity = inclusivity || '()';\n        return (\n            (inclusivity[0] === '('\n                ? this.isAfter(localFrom, units)\n                : !this.isBefore(localFrom, units)) &&\n            (inclusivity[1] === ')'\n                ? this.isBefore(localTo, units)\n                : !this.isAfter(localTo, units))\n        );\n    }\n\n    function isSame(input, units) {\n        var localInput = isMoment(input) ? input : createLocal(input),\n            inputMs;\n        if (!(this.isValid() && localInput.isValid())) {\n            return false;\n        }\n        units = normalizeUnits(units) || 'millisecond';\n        if (units === 'millisecond') {\n            return this.valueOf() === localInput.valueOf();\n        } else {\n            inputMs = localInput.valueOf();\n            return (\n                this.clone().startOf(units).valueOf() <= inputMs &&\n                inputMs <= this.clone().endOf(units).valueOf()\n            );\n        }\n    }\n\n    function isSameOrAfter(input, units) {\n        return this.isSame(input, units) || this.isAfter(input, units);\n    }\n\n    function isSameOrBefore(input, units) {\n        return this.isSame(input, units) || this.isBefore(input, units);\n    }\n\n    function diff(input, units, asFloat) {\n        var that, zoneDelta, output;\n\n        if (!this.isValid()) {\n            return NaN;\n        }\n\n        that = cloneWithOffset(input, this);\n\n        if (!that.isValid()) {\n            return NaN;\n        }\n\n        zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n\n        units = normalizeUnits(units);\n\n        switch (units) {\n            case 'year':\n                output = monthDiff(this, that) / 12;\n                break;\n            case 'month':\n                output = monthDiff(this, that);\n                break;\n            case 'quarter':\n                output = monthDiff(this, that) / 3;\n                break;\n            case 'second':\n                output = (this - that) / 1e3;\n                break; // 1000\n            case 'minute':\n                output = (this - that) / 6e4;\n                break; // 1000 * 60\n            case 'hour':\n                output = (this - that) / 36e5;\n                break; // 1000 * 60 * 60\n            case 'day':\n                output = (this - that - zoneDelta) / 864e5;\n                break; // 1000 * 60 * 60 * 24, negate dst\n            case 'week':\n                output = (this - that - zoneDelta) / 6048e5;\n                break; // 1000 * 60 * 60 * 24 * 7, negate dst\n            default:\n                output = this - that;\n        }\n\n        return asFloat ? output : absFloor(output);\n    }\n\n    function monthDiff(a, b) {\n        if (a.date() < b.date()) {\n            // end-of-month calculations work correct when the start month has more\n            // days than the end month.\n            return -monthDiff(b, a);\n        }\n        // difference in months\n        var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),\n            // b is in (anchor - 1 month, anchor + 1 month)\n            anchor = a.clone().add(wholeMonthDiff, 'months'),\n            anchor2,\n            adjust;\n\n        if (b - anchor < 0) {\n            anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n            // linear across the month\n            adjust = (b - anchor) / (anchor - anchor2);\n        } else {\n            anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n            // linear across the month\n            adjust = (b - anchor) / (anchor2 - anchor);\n        }\n\n        //check for negative zero, return zero if negative zero\n        return -(wholeMonthDiff + adjust) || 0;\n    }\n\n    hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\n    hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\n    function toString() {\n        return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n    }\n\n    function toISOString(keepOffset) {\n        if (!this.isValid()) {\n            return null;\n        }\n        var utc = keepOffset !== true,\n            m = utc ? this.clone().utc() : this;\n        if (m.year() < 0 || m.year() > 9999) {\n            return formatMoment(\n                m,\n                utc\n                    ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'\n                    : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'\n            );\n        }\n        if (isFunction(Date.prototype.toISOString)) {\n            // native implementation is ~50x faster, use it when we can\n            if (utc) {\n                return this.toDate().toISOString();\n            } else {\n                return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)\n                    .toISOString()\n                    .replace('Z', formatMoment(m, 'Z'));\n            }\n        }\n        return formatMoment(\n            m,\n            utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'\n        );\n    }\n\n    /**\n     * Return a human readable representation of a moment that can\n     * also be evaluated to get a new moment which is the same\n     *\n     * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n     */\n    function inspect() {\n        if (!this.isValid()) {\n            return 'moment.invalid(/* ' + this._i + ' */)';\n        }\n        var func = 'moment',\n            zone = '',\n            prefix,\n            year,\n            datetime,\n            suffix;\n        if (!this.isLocal()) {\n            func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n            zone = 'Z';\n        }\n        prefix = '[' + func + '(\"]';\n        year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';\n        datetime = '-MM-DD[T]HH:mm:ss.SSS';\n        suffix = zone + '[\")]';\n\n        return this.format(prefix + year + datetime + suffix);\n    }\n\n    function format(inputString) {\n        if (!inputString) {\n            inputString = this.isUtc()\n                ? hooks.defaultFormatUtc\n                : hooks.defaultFormat;\n        }\n        var output = formatMoment(this, inputString);\n        return this.localeData().postformat(output);\n    }\n\n    function from(time, withoutSuffix) {\n        if (\n            this.isValid() &&\n            ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n        ) {\n            return createDuration({ to: this, from: time })\n                .locale(this.locale())\n                .humanize(!withoutSuffix);\n        } else {\n            return this.localeData().invalidDate();\n        }\n    }\n\n    function fromNow(withoutSuffix) {\n        return this.from(createLocal(), withoutSuffix);\n    }\n\n    function to(time, withoutSuffix) {\n        if (\n            this.isValid() &&\n            ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n        ) {\n            return createDuration({ from: this, to: time })\n                .locale(this.locale())\n                .humanize(!withoutSuffix);\n        } else {\n            return this.localeData().invalidDate();\n        }\n    }\n\n    function toNow(withoutSuffix) {\n        return this.to(createLocal(), withoutSuffix);\n    }\n\n    // If passed a locale key, it will set the locale for this\n    // instance.  Otherwise, it will return the locale configuration\n    // variables for this instance.\n    function locale(key) {\n        var newLocaleData;\n\n        if (key === undefined) {\n            return this._locale._abbr;\n        } else {\n            newLocaleData = getLocale(key);\n            if (newLocaleData != null) {\n                this._locale = newLocaleData;\n            }\n            return this;\n        }\n    }\n\n    var lang = deprecate(\n        'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n        function (key) {\n            if (key === undefined) {\n                return this.localeData();\n            } else {\n                return this.locale(key);\n            }\n        }\n    );\n\n    function localeData() {\n        return this._locale;\n    }\n\n    var MS_PER_SECOND = 1000,\n        MS_PER_MINUTE = 60 * MS_PER_SECOND,\n        MS_PER_HOUR = 60 * MS_PER_MINUTE,\n        MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;\n\n    // actual modulo - handles negative numbers (for dates before 1970):\n    function mod$1(dividend, divisor) {\n        return ((dividend % divisor) + divisor) % divisor;\n    }\n\n    function localStartOfDate(y, m, d) {\n        // the date constructor remaps years 0-99 to 1900-1999\n        if (y < 100 && y >= 0) {\n            // preserve leap years using a full 400 year cycle, then reset\n            return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n        } else {\n            return new Date(y, m, d).valueOf();\n        }\n    }\n\n    function utcStartOfDate(y, m, d) {\n        // Date.UTC remaps years 0-99 to 1900-1999\n        if (y < 100 && y >= 0) {\n            // preserve leap years using a full 400 year cycle, then reset\n            return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n        } else {\n            return Date.UTC(y, m, d);\n        }\n    }\n\n    function startOf(units) {\n        var time, startOfDate;\n        units = normalizeUnits(units);\n        if (units === undefined || units === 'millisecond' || !this.isValid()) {\n            return this;\n        }\n\n        startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n        switch (units) {\n            case 'year':\n                time = startOfDate(this.year(), 0, 1);\n                break;\n            case 'quarter':\n                time = startOfDate(\n                    this.year(),\n                    this.month() - (this.month() % 3),\n                    1\n                );\n                break;\n            case 'month':\n                time = startOfDate(this.year(), this.month(), 1);\n                break;\n            case 'week':\n                time = startOfDate(\n                    this.year(),\n                    this.month(),\n                    this.date() - this.weekday()\n                );\n                break;\n            case 'isoWeek':\n                time = startOfDate(\n                    this.year(),\n                    this.month(),\n                    this.date() - (this.isoWeekday() - 1)\n                );\n                break;\n            case 'day':\n            case 'date':\n                time = startOfDate(this.year(), this.month(), this.date());\n                break;\n            case 'hour':\n                time = this._d.valueOf();\n                time -= mod$1(\n                    time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n                    MS_PER_HOUR\n                );\n                break;\n            case 'minute':\n                time = this._d.valueOf();\n                time -= mod$1(time, MS_PER_MINUTE);\n                break;\n            case 'second':\n                time = this._d.valueOf();\n                time -= mod$1(time, MS_PER_SECOND);\n                break;\n        }\n\n        this._d.setTime(time);\n        hooks.updateOffset(this, true);\n        return this;\n    }\n\n    function endOf(units) {\n        var time, startOfDate;\n        units = normalizeUnits(units);\n        if (units === undefined || units === 'millisecond' || !this.isValid()) {\n            return this;\n        }\n\n        startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n        switch (units) {\n            case 'year':\n                time = startOfDate(this.year() + 1, 0, 1) - 1;\n                break;\n            case 'quarter':\n                time =\n                    startOfDate(\n                        this.year(),\n                        this.month() - (this.month() % 3) + 3,\n                        1\n                    ) - 1;\n                break;\n            case 'month':\n                time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n                break;\n            case 'week':\n                time =\n                    startOfDate(\n                        this.year(),\n                        this.month(),\n                        this.date() - this.weekday() + 7\n                    ) - 1;\n                break;\n            case 'isoWeek':\n                time =\n                    startOfDate(\n                        this.year(),\n                        this.month(),\n                        this.date() - (this.isoWeekday() - 1) + 7\n                    ) - 1;\n                break;\n            case 'day':\n            case 'date':\n                time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n                break;\n            case 'hour':\n                time = this._d.valueOf();\n                time +=\n                    MS_PER_HOUR -\n                    mod$1(\n                        time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n                        MS_PER_HOUR\n                    ) -\n                    1;\n                break;\n            case 'minute':\n                time = this._d.valueOf();\n                time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n                break;\n            case 'second':\n                time = this._d.valueOf();\n                time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n                break;\n        }\n\n        this._d.setTime(time);\n        hooks.updateOffset(this, true);\n        return this;\n    }\n\n    function valueOf() {\n        return this._d.valueOf() - (this._offset || 0) * 60000;\n    }\n\n    function unix() {\n        return Math.floor(this.valueOf() / 1000);\n    }\n\n    function toDate() {\n        return new Date(this.valueOf());\n    }\n\n    function toArray() {\n        var m = this;\n        return [\n            m.year(),\n            m.month(),\n            m.date(),\n            m.hour(),\n            m.minute(),\n            m.second(),\n            m.millisecond(),\n        ];\n    }\n\n    function toObject() {\n        var m = this;\n        return {\n            years: m.year(),\n            months: m.month(),\n            date: m.date(),\n            hours: m.hours(),\n            minutes: m.minutes(),\n            seconds: m.seconds(),\n            milliseconds: m.milliseconds(),\n        };\n    }\n\n    function toJSON() {\n        // new Date(NaN).toJSON() === null\n        return this.isValid() ? this.toISOString() : null;\n    }\n\n    function isValid$2() {\n        return isValid(this);\n    }\n\n    function parsingFlags() {\n        return extend({}, getParsingFlags(this));\n    }\n\n    function invalidAt() {\n        return getParsingFlags(this).overflow;\n    }\n\n    function creationData() {\n        return {\n            input: this._i,\n            format: this._f,\n            locale: this._locale,\n            isUTC: this._isUTC,\n            strict: this._strict,\n        };\n    }\n\n    addFormatToken('N', 0, 0, 'eraAbbr');\n    addFormatToken('NN', 0, 0, 'eraAbbr');\n    addFormatToken('NNN', 0, 0, 'eraAbbr');\n    addFormatToken('NNNN', 0, 0, 'eraName');\n    addFormatToken('NNNNN', 0, 0, 'eraNarrow');\n\n    addFormatToken('y', ['y', 1], 'yo', 'eraYear');\n    addFormatToken('y', ['yy', 2], 0, 'eraYear');\n    addFormatToken('y', ['yyy', 3], 0, 'eraYear');\n    addFormatToken('y', ['yyyy', 4], 0, 'eraYear');\n\n    addRegexToken('N', matchEraAbbr);\n    addRegexToken('NN', matchEraAbbr);\n    addRegexToken('NNN', matchEraAbbr);\n    addRegexToken('NNNN', matchEraName);\n    addRegexToken('NNNNN', matchEraNarrow);\n\n    addParseToken(\n        ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'],\n        function (input, array, config, token) {\n            var era = config._locale.erasParse(input, token, config._strict);\n            if (era) {\n                getParsingFlags(config).era = era;\n            } else {\n                getParsingFlags(config).invalidEra = input;\n            }\n        }\n    );\n\n    addRegexToken('y', matchUnsigned);\n    addRegexToken('yy', matchUnsigned);\n    addRegexToken('yyy', matchUnsigned);\n    addRegexToken('yyyy', matchUnsigned);\n    addRegexToken('yo', matchEraYearOrdinal);\n\n    addParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);\n    addParseToken(['yo'], function (input, array, config, token) {\n        var match;\n        if (config._locale._eraYearOrdinalRegex) {\n            match = input.match(config._locale._eraYearOrdinalRegex);\n        }\n\n        if (config._locale.eraYearOrdinalParse) {\n            array[YEAR] = config._locale.eraYearOrdinalParse(input, match);\n        } else {\n            array[YEAR] = parseInt(input, 10);\n        }\n    });\n\n    function localeEras(m, format) {\n        var i,\n            l,\n            date,\n            eras = this._eras || getLocale('en')._eras;\n        for (i = 0, l = eras.length; i < l; ++i) {\n            switch (typeof eras[i].since) {\n                case 'string':\n                    // truncate time\n                    date = hooks(eras[i].since).startOf('day');\n                    eras[i].since = date.valueOf();\n                    break;\n            }\n\n            switch (typeof eras[i].until) {\n                case 'undefined':\n                    eras[i].until = +Infinity;\n                    break;\n                case 'string':\n                    // truncate time\n                    date = hooks(eras[i].until).startOf('day').valueOf();\n                    eras[i].until = date.valueOf();\n                    break;\n            }\n        }\n        return eras;\n    }\n\n    function localeErasParse(eraName, format, strict) {\n        var i,\n            l,\n            eras = this.eras(),\n            name,\n            abbr,\n            narrow;\n        eraName = eraName.toUpperCase();\n\n        for (i = 0, l = eras.length; i < l; ++i) {\n            name = eras[i].name.toUpperCase();\n            abbr = eras[i].abbr.toUpperCase();\n            narrow = eras[i].narrow.toUpperCase();\n\n            if (strict) {\n                switch (format) {\n                    case 'N':\n                    case 'NN':\n                    case 'NNN':\n                        if (abbr === eraName) {\n                            return eras[i];\n                        }\n                        break;\n\n                    case 'NNNN':\n                        if (name === eraName) {\n                            return eras[i];\n                        }\n                        break;\n\n                    case 'NNNNN':\n                        if (narrow === eraName) {\n                            return eras[i];\n                        }\n                        break;\n                }\n            } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {\n                return eras[i];\n            }\n        }\n    }\n\n    function localeErasConvertYear(era, year) {\n        var dir = era.since <= era.until ? +1 : -1;\n        if (year === undefined) {\n            return hooks(era.since).year();\n        } else {\n            return hooks(era.since).year() + (year - era.offset) * dir;\n        }\n    }\n\n    function getEraName() {\n        var i,\n            l,\n            val,\n            eras = this.localeData().eras();\n        for (i = 0, l = eras.length; i < l; ++i) {\n            // truncate time\n            val = this.clone().startOf('day').valueOf();\n\n            if (eras[i].since <= val && val <= eras[i].until) {\n                return eras[i].name;\n            }\n            if (eras[i].until <= val && val <= eras[i].since) {\n                return eras[i].name;\n            }\n        }\n\n        return '';\n    }\n\n    function getEraNarrow() {\n        var i,\n            l,\n            val,\n            eras = this.localeData().eras();\n        for (i = 0, l = eras.length; i < l; ++i) {\n            // truncate time\n            val = this.clone().startOf('day').valueOf();\n\n            if (eras[i].since <= val && val <= eras[i].until) {\n                return eras[i].narrow;\n            }\n            if (eras[i].until <= val && val <= eras[i].since) {\n                return eras[i].narrow;\n            }\n        }\n\n        return '';\n    }\n\n    function getEraAbbr() {\n        var i,\n            l,\n            val,\n            eras = this.localeData().eras();\n        for (i = 0, l = eras.length; i < l; ++i) {\n            // truncate time\n            val = this.clone().startOf('day').valueOf();\n\n            if (eras[i].since <= val && val <= eras[i].until) {\n                return eras[i].abbr;\n            }\n            if (eras[i].until <= val && val <= eras[i].since) {\n                return eras[i].abbr;\n            }\n        }\n\n        return '';\n    }\n\n    function getEraYear() {\n        var i,\n            l,\n            dir,\n            val,\n            eras = this.localeData().eras();\n        for (i = 0, l = eras.length; i < l; ++i) {\n            dir = eras[i].since <= eras[i].until ? +1 : -1;\n\n            // truncate time\n            val = this.clone().startOf('day').valueOf();\n\n            if (\n                (eras[i].since <= val && val <= eras[i].until) ||\n                (eras[i].until <= val && val <= eras[i].since)\n            ) {\n                return (\n                    (this.year() - hooks(eras[i].since).year()) * dir +\n                    eras[i].offset\n                );\n            }\n        }\n\n        return this.year();\n    }\n\n    function erasNameRegex(isStrict) {\n        if (!hasOwnProp(this, '_erasNameRegex')) {\n            computeErasParse.call(this);\n        }\n        return isStrict ? this._erasNameRegex : this._erasRegex;\n    }\n\n    function erasAbbrRegex(isStrict) {\n        if (!hasOwnProp(this, '_erasAbbrRegex')) {\n            computeErasParse.call(this);\n        }\n        return isStrict ? this._erasAbbrRegex : this._erasRegex;\n    }\n\n    function erasNarrowRegex(isStrict) {\n        if (!hasOwnProp(this, '_erasNarrowRegex')) {\n            computeErasParse.call(this);\n        }\n        return isStrict ? this._erasNarrowRegex : this._erasRegex;\n    }\n\n    function matchEraAbbr(isStrict, locale) {\n        return locale.erasAbbrRegex(isStrict);\n    }\n\n    function matchEraName(isStrict, locale) {\n        return locale.erasNameRegex(isStrict);\n    }\n\n    function matchEraNarrow(isStrict, locale) {\n        return locale.erasNarrowRegex(isStrict);\n    }\n\n    function matchEraYearOrdinal(isStrict, locale) {\n        return locale._eraYearOrdinalRegex || matchUnsigned;\n    }\n\n    function computeErasParse() {\n        var abbrPieces = [],\n            namePieces = [],\n            narrowPieces = [],\n            mixedPieces = [],\n            i,\n            l,\n            erasName,\n            erasAbbr,\n            erasNarrow,\n            eras = this.eras();\n\n        for (i = 0, l = eras.length; i < l; ++i) {\n            erasName = regexEscape(eras[i].name);\n            erasAbbr = regexEscape(eras[i].abbr);\n            erasNarrow = regexEscape(eras[i].narrow);\n\n            namePieces.push(erasName);\n            abbrPieces.push(erasAbbr);\n            narrowPieces.push(erasNarrow);\n            mixedPieces.push(erasName);\n            mixedPieces.push(erasAbbr);\n            mixedPieces.push(erasNarrow);\n        }\n\n        this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n        this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');\n        this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');\n        this._erasNarrowRegex = new RegExp(\n            '^(' + narrowPieces.join('|') + ')',\n            'i'\n        );\n    }\n\n    // FORMATTING\n\n    addFormatToken(0, ['gg', 2], 0, function () {\n        return this.weekYear() % 100;\n    });\n\n    addFormatToken(0, ['GG', 2], 0, function () {\n        return this.isoWeekYear() % 100;\n    });\n\n    function addWeekYearFormatToken(token, getter) {\n        addFormatToken(0, [token, token.length], 0, getter);\n    }\n\n    addWeekYearFormatToken('gggg', 'weekYear');\n    addWeekYearFormatToken('ggggg', 'weekYear');\n    addWeekYearFormatToken('GGGG', 'isoWeekYear');\n    addWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n    // ALIASES\n\n    // PARSING\n\n    addRegexToken('G', matchSigned);\n    addRegexToken('g', matchSigned);\n    addRegexToken('GG', match1to2, match2);\n    addRegexToken('gg', match1to2, match2);\n    addRegexToken('GGGG', match1to4, match4);\n    addRegexToken('gggg', match1to4, match4);\n    addRegexToken('GGGGG', match1to6, match6);\n    addRegexToken('ggggg', match1to6, match6);\n\n    addWeekParseToken(\n        ['gggg', 'ggggg', 'GGGG', 'GGGGG'],\n        function (input, week, config, token) {\n            week[token.substr(0, 2)] = toInt(input);\n        }\n    );\n\n    addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n        week[token] = hooks.parseTwoDigitYear(input);\n    });\n\n    // MOMENTS\n\n    function getSetWeekYear(input) {\n        return getSetWeekYearHelper.call(\n            this,\n            input,\n            this.week(),\n            this.weekday() + this.localeData()._week.dow,\n            this.localeData()._week.dow,\n            this.localeData()._week.doy\n        );\n    }\n\n    function getSetISOWeekYear(input) {\n        return getSetWeekYearHelper.call(\n            this,\n            input,\n            this.isoWeek(),\n            this.isoWeekday(),\n            1,\n            4\n        );\n    }\n\n    function getISOWeeksInYear() {\n        return weeksInYear(this.year(), 1, 4);\n    }\n\n    function getISOWeeksInISOWeekYear() {\n        return weeksInYear(this.isoWeekYear(), 1, 4);\n    }\n\n    function getWeeksInYear() {\n        var weekInfo = this.localeData()._week;\n        return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n    }\n\n    function getWeeksInWeekYear() {\n        var weekInfo = this.localeData()._week;\n        return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);\n    }\n\n    function getSetWeekYearHelper(input, week, weekday, dow, doy) {\n        var weeksTarget;\n        if (input == null) {\n            return weekOfYear(this, dow, doy).year;\n        } else {\n            weeksTarget = weeksInYear(input, dow, doy);\n            if (week > weeksTarget) {\n                week = weeksTarget;\n            }\n            return setWeekAll.call(this, input, week, weekday, dow, doy);\n        }\n    }\n\n    function setWeekAll(weekYear, week, weekday, dow, doy) {\n        var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n            date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n\n        this.year(date.getUTCFullYear());\n        this.month(date.getUTCMonth());\n        this.date(date.getUTCDate());\n        return this;\n    }\n\n    // FORMATTING\n\n    addFormatToken('Q', 0, 'Qo', 'quarter');\n\n    // PARSING\n\n    addRegexToken('Q', match1);\n    addParseToken('Q', function (input, array) {\n        array[MONTH] = (toInt(input) - 1) * 3;\n    });\n\n    // MOMENTS\n\n    function getSetQuarter(input) {\n        return input == null\n            ? Math.ceil((this.month() + 1) / 3)\n            : this.month((input - 1) * 3 + (this.month() % 3));\n    }\n\n    // FORMATTING\n\n    addFormatToken('D', ['DD', 2], 'Do', 'date');\n\n    // PARSING\n\n    addRegexToken('D', match1to2, match1to2NoLeadingZero);\n    addRegexToken('DD', match1to2, match2);\n    addRegexToken('Do', function (isStrict, locale) {\n        // TODO: Remove \"ordinalParse\" fallback in next major release.\n        return isStrict\n            ? locale._dayOfMonthOrdinalParse || locale._ordinalParse\n            : locale._dayOfMonthOrdinalParseLenient;\n    });\n\n    addParseToken(['D', 'DD'], DATE);\n    addParseToken('Do', function (input, array) {\n        array[DATE] = toInt(input.match(match1to2)[0]);\n    });\n\n    // MOMENTS\n\n    var getSetDayOfMonth = makeGetSet('Date', true);\n\n    // FORMATTING\n\n    addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n    // PARSING\n\n    addRegexToken('DDD', match1to3);\n    addRegexToken('DDDD', match3);\n    addParseToken(['DDD', 'DDDD'], function (input, array, config) {\n        config._dayOfYear = toInt(input);\n    });\n\n    // HELPERS\n\n    // MOMENTS\n\n    function getSetDayOfYear(input) {\n        var dayOfYear =\n            Math.round(\n                (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5\n            ) + 1;\n        return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');\n    }\n\n    // FORMATTING\n\n    addFormatToken('m', ['mm', 2], 0, 'minute');\n\n    // PARSING\n\n    addRegexToken('m', match1to2, match1to2HasZero);\n    addRegexToken('mm', match1to2, match2);\n    addParseToken(['m', 'mm'], MINUTE);\n\n    // MOMENTS\n\n    var getSetMinute = makeGetSet('Minutes', false);\n\n    // FORMATTING\n\n    addFormatToken('s', ['ss', 2], 0, 'second');\n\n    // PARSING\n\n    addRegexToken('s', match1to2, match1to2HasZero);\n    addRegexToken('ss', match1to2, match2);\n    addParseToken(['s', 'ss'], SECOND);\n\n    // MOMENTS\n\n    var getSetSecond = makeGetSet('Seconds', false);\n\n    // FORMATTING\n\n    addFormatToken('S', 0, 0, function () {\n        return ~~(this.millisecond() / 100);\n    });\n\n    addFormatToken(0, ['SS', 2], 0, function () {\n        return ~~(this.millisecond() / 10);\n    });\n\n    addFormatToken(0, ['SSS', 3], 0, 'millisecond');\n    addFormatToken(0, ['SSSS', 4], 0, function () {\n        return this.millisecond() * 10;\n    });\n    addFormatToken(0, ['SSSSS', 5], 0, function () {\n        return this.millisecond() * 100;\n    });\n    addFormatToken(0, ['SSSSSS', 6], 0, function () {\n        return this.millisecond() * 1000;\n    });\n    addFormatToken(0, ['SSSSSSS', 7], 0, function () {\n        return this.millisecond() * 10000;\n    });\n    addFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n        return this.millisecond() * 100000;\n    });\n    addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n        return this.millisecond() * 1000000;\n    });\n\n    // PARSING\n\n    addRegexToken('S', match1to3, match1);\n    addRegexToken('SS', match1to3, match2);\n    addRegexToken('SSS', match1to3, match3);\n\n    var token, getSetMillisecond;\n    for (token = 'SSSS'; token.length <= 9; token += 'S') {\n        addRegexToken(token, matchUnsigned);\n    }\n\n    function parseMs(input, array) {\n        array[MILLISECOND] = toInt(('0.' + input) * 1000);\n    }\n\n    for (token = 'S'; token.length <= 9; token += 'S') {\n        addParseToken(token, parseMs);\n    }\n\n    getSetMillisecond = makeGetSet('Milliseconds', false);\n\n    // FORMATTING\n\n    addFormatToken('z', 0, 0, 'zoneAbbr');\n    addFormatToken('zz', 0, 0, 'zoneName');\n\n    // MOMENTS\n\n    function getZoneAbbr() {\n        return this._isUTC ? 'UTC' : '';\n    }\n\n    function getZoneName() {\n        return this._isUTC ? 'Coordinated Universal Time' : '';\n    }\n\n    var proto = Moment.prototype;\n\n    proto.add = add;\n    proto.calendar = calendar$1;\n    proto.clone = clone;\n    proto.diff = diff;\n    proto.endOf = endOf;\n    proto.format = format;\n    proto.from = from;\n    proto.fromNow = fromNow;\n    proto.to = to;\n    proto.toNow = toNow;\n    proto.get = stringGet;\n    proto.invalidAt = invalidAt;\n    proto.isAfter = isAfter;\n    proto.isBefore = isBefore;\n    proto.isBetween = isBetween;\n    proto.isSame = isSame;\n    proto.isSameOrAfter = isSameOrAfter;\n    proto.isSameOrBefore = isSameOrBefore;\n    proto.isValid = isValid$2;\n    proto.lang = lang;\n    proto.locale = locale;\n    proto.localeData = localeData;\n    proto.max = prototypeMax;\n    proto.min = prototypeMin;\n    proto.parsingFlags = parsingFlags;\n    proto.set = stringSet;\n    proto.startOf = startOf;\n    proto.subtract = subtract;\n    proto.toArray = toArray;\n    proto.toObject = toObject;\n    proto.toDate = toDate;\n    proto.toISOString = toISOString;\n    proto.inspect = inspect;\n    if (typeof Symbol !== 'undefined' && Symbol.for != null) {\n        proto[Symbol.for('nodejs.util.inspect.custom')] = function () {\n            return 'Moment<' + this.format() + '>';\n        };\n    }\n    proto.toJSON = toJSON;\n    proto.toString = toString;\n    proto.unix = unix;\n    proto.valueOf = valueOf;\n    proto.creationData = creationData;\n    proto.eraName = getEraName;\n    proto.eraNarrow = getEraNarrow;\n    proto.eraAbbr = getEraAbbr;\n    proto.eraYear = getEraYear;\n    proto.year = getSetYear;\n    proto.isLeapYear = getIsLeapYear;\n    proto.weekYear = getSetWeekYear;\n    proto.isoWeekYear = getSetISOWeekYear;\n    proto.quarter = proto.quarters = getSetQuarter;\n    proto.month = getSetMonth;\n    proto.daysInMonth = getDaysInMonth;\n    proto.week = proto.weeks = getSetWeek;\n    proto.isoWeek = proto.isoWeeks = getSetISOWeek;\n    proto.weeksInYear = getWeeksInYear;\n    proto.weeksInWeekYear = getWeeksInWeekYear;\n    proto.isoWeeksInYear = getISOWeeksInYear;\n    proto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;\n    proto.date = getSetDayOfMonth;\n    proto.day = proto.days = getSetDayOfWeek;\n    proto.weekday = getSetLocaleDayOfWeek;\n    proto.isoWeekday = getSetISODayOfWeek;\n    proto.dayOfYear = getSetDayOfYear;\n    proto.hour = proto.hours = getSetHour;\n    proto.minute = proto.minutes = getSetMinute;\n    proto.second = proto.seconds = getSetSecond;\n    proto.millisecond = proto.milliseconds = getSetMillisecond;\n    proto.utcOffset = getSetOffset;\n    proto.utc = setOffsetToUTC;\n    proto.local = setOffsetToLocal;\n    proto.parseZone = setOffsetToParsedOffset;\n    proto.hasAlignedHourOffset = hasAlignedHourOffset;\n    proto.isDST = isDaylightSavingTime;\n    proto.isLocal = isLocal;\n    proto.isUtcOffset = isUtcOffset;\n    proto.isUtc = isUtc;\n    proto.isUTC = isUtc;\n    proto.zoneAbbr = getZoneAbbr;\n    proto.zoneName = getZoneName;\n    proto.dates = deprecate(\n        'dates accessor is deprecated. Use date instead.',\n        getSetDayOfMonth\n    );\n    proto.months = deprecate(\n        'months accessor is deprecated. Use month instead',\n        getSetMonth\n    );\n    proto.years = deprecate(\n        'years accessor is deprecated. Use year instead',\n        getSetYear\n    );\n    proto.zone = deprecate(\n        'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',\n        getSetZone\n    );\n    proto.isDSTShifted = deprecate(\n        'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',\n        isDaylightSavingTimeShifted\n    );\n\n    function createUnix(input) {\n        return createLocal(input * 1000);\n    }\n\n    function createInZone() {\n        return createLocal.apply(null, arguments).parseZone();\n    }\n\n    function preParsePostFormat(string) {\n        return string;\n    }\n\n    var proto$1 = Locale.prototype;\n\n    proto$1.calendar = calendar;\n    proto$1.longDateFormat = longDateFormat;\n    proto$1.invalidDate = invalidDate;\n    proto$1.ordinal = ordinal;\n    proto$1.preparse = preParsePostFormat;\n    proto$1.postformat = preParsePostFormat;\n    proto$1.relativeTime = relativeTime;\n    proto$1.pastFuture = pastFuture;\n    proto$1.set = set;\n    proto$1.eras = localeEras;\n    proto$1.erasParse = localeErasParse;\n    proto$1.erasConvertYear = localeErasConvertYear;\n    proto$1.erasAbbrRegex = erasAbbrRegex;\n    proto$1.erasNameRegex = erasNameRegex;\n    proto$1.erasNarrowRegex = erasNarrowRegex;\n\n    proto$1.months = localeMonths;\n    proto$1.monthsShort = localeMonthsShort;\n    proto$1.monthsParse = localeMonthsParse;\n    proto$1.monthsRegex = monthsRegex;\n    proto$1.monthsShortRegex = monthsShortRegex;\n    proto$1.week = localeWeek;\n    proto$1.firstDayOfYear = localeFirstDayOfYear;\n    proto$1.firstDayOfWeek = localeFirstDayOfWeek;\n\n    proto$1.weekdays = localeWeekdays;\n    proto$1.weekdaysMin = localeWeekdaysMin;\n    proto$1.weekdaysShort = localeWeekdaysShort;\n    proto$1.weekdaysParse = localeWeekdaysParse;\n\n    proto$1.weekdaysRegex = weekdaysRegex;\n    proto$1.weekdaysShortRegex = weekdaysShortRegex;\n    proto$1.weekdaysMinRegex = weekdaysMinRegex;\n\n    proto$1.isPM = localeIsPM;\n    proto$1.meridiem = localeMeridiem;\n\n    function get$1(format, index, field, setter) {\n        var locale = getLocale(),\n            utc = createUTC().set(setter, index);\n        return locale[field](utc, format);\n    }\n\n    function listMonthsImpl(format, index, field) {\n        if (isNumber(format)) {\n            index = format;\n            format = undefined;\n        }\n\n        format = format || '';\n\n        if (index != null) {\n            return get$1(format, index, field, 'month');\n        }\n\n        var i,\n            out = [];\n        for (i = 0; i < 12; i++) {\n            out[i] = get$1(format, i, field, 'month');\n        }\n        return out;\n    }\n\n    // ()\n    // (5)\n    // (fmt, 5)\n    // (fmt)\n    // (true)\n    // (true, 5)\n    // (true, fmt, 5)\n    // (true, fmt)\n    function listWeekdaysImpl(localeSorted, format, index, field) {\n        if (typeof localeSorted === 'boolean') {\n            if (isNumber(format)) {\n                index = format;\n                format = undefined;\n            }\n\n            format = format || '';\n        } else {\n            format = localeSorted;\n            index = format;\n            localeSorted = false;\n\n            if (isNumber(format)) {\n                index = format;\n                format = undefined;\n            }\n\n            format = format || '';\n        }\n\n        var locale = getLocale(),\n            shift = localeSorted ? locale._week.dow : 0,\n            i,\n            out = [];\n\n        if (index != null) {\n            return get$1(format, (index + shift) % 7, field, 'day');\n        }\n\n        for (i = 0; i < 7; i++) {\n            out[i] = get$1(format, (i + shift) % 7, field, 'day');\n        }\n        return out;\n    }\n\n    function listMonths(format, index) {\n        return listMonthsImpl(format, index, 'months');\n    }\n\n    function listMonthsShort(format, index) {\n        return listMonthsImpl(format, index, 'monthsShort');\n    }\n\n    function listWeekdays(localeSorted, format, index) {\n        return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n    }\n\n    function listWeekdaysShort(localeSorted, format, index) {\n        return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n    }\n\n    function listWeekdaysMin(localeSorted, format, index) {\n        return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n    }\n\n    getSetGlobalLocale('en', {\n        eras: [\n            {\n                since: '0001-01-01',\n                until: +Infinity,\n                offset: 1,\n                name: 'Anno Domini',\n                narrow: 'AD',\n                abbr: 'AD',\n            },\n            {\n                since: '0000-12-31',\n                until: -Infinity,\n                offset: 1,\n                name: 'Before Christ',\n                narrow: 'BC',\n                abbr: 'BC',\n            },\n        ],\n        dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n        ordinal: function (number) {\n            var b = number % 10,\n                output =\n                    toInt((number % 100) / 10) === 1\n                        ? 'th'\n                        : b === 1\n                          ? 'st'\n                          : b === 2\n                            ? 'nd'\n                            : b === 3\n                              ? 'rd'\n                              : 'th';\n            return number + output;\n        },\n    });\n\n    // Side effect imports\n\n    hooks.lang = deprecate(\n        'moment.lang is deprecated. Use moment.locale instead.',\n        getSetGlobalLocale\n    );\n    hooks.langData = deprecate(\n        'moment.langData is deprecated. Use moment.localeData instead.',\n        getLocale\n    );\n\n    var mathAbs = Math.abs;\n\n    function abs() {\n        var data = this._data;\n\n        this._milliseconds = mathAbs(this._milliseconds);\n        this._days = mathAbs(this._days);\n        this._months = mathAbs(this._months);\n\n        data.milliseconds = mathAbs(data.milliseconds);\n        data.seconds = mathAbs(data.seconds);\n        data.minutes = mathAbs(data.minutes);\n        data.hours = mathAbs(data.hours);\n        data.months = mathAbs(data.months);\n        data.years = mathAbs(data.years);\n\n        return this;\n    }\n\n    function addSubtract$1(duration, input, value, direction) {\n        var other = createDuration(input, value);\n\n        duration._milliseconds += direction * other._milliseconds;\n        duration._days += direction * other._days;\n        duration._months += direction * other._months;\n\n        return duration._bubble();\n    }\n\n    // supports only 2.0-style add(1, 's') or add(duration)\n    function add$1(input, value) {\n        return addSubtract$1(this, input, value, 1);\n    }\n\n    // supports only 2.0-style subtract(1, 's') or subtract(duration)\n    function subtract$1(input, value) {\n        return addSubtract$1(this, input, value, -1);\n    }\n\n    function absCeil(number) {\n        if (number < 0) {\n            return Math.floor(number);\n        } else {\n            return Math.ceil(number);\n        }\n    }\n\n    function bubble() {\n        var milliseconds = this._milliseconds,\n            days = this._days,\n            months = this._months,\n            data = this._data,\n            seconds,\n            minutes,\n            hours,\n            years,\n            monthsFromDays;\n\n        // if we have a mix of positive and negative values, bubble down first\n        // check: https://github.com/moment/moment/issues/2166\n        if (\n            !(\n                (milliseconds >= 0 && days >= 0 && months >= 0) ||\n                (milliseconds <= 0 && days <= 0 && months <= 0)\n            )\n        ) {\n            milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n            days = 0;\n            months = 0;\n        }\n\n        // The following code bubbles up values, see the tests for\n        // examples of what that means.\n        data.milliseconds = milliseconds % 1000;\n\n        seconds = absFloor(milliseconds / 1000);\n        data.seconds = seconds % 60;\n\n        minutes = absFloor(seconds / 60);\n        data.minutes = minutes % 60;\n\n        hours = absFloor(minutes / 60);\n        data.hours = hours % 24;\n\n        days += absFloor(hours / 24);\n\n        // convert days to months\n        monthsFromDays = absFloor(daysToMonths(days));\n        months += monthsFromDays;\n        days -= absCeil(monthsToDays(monthsFromDays));\n\n        // 12 months -> 1 year\n        years = absFloor(months / 12);\n        months %= 12;\n\n        data.days = days;\n        data.months = months;\n        data.years = years;\n\n        return this;\n    }\n\n    function daysToMonths(days) {\n        // 400 years have 146097 days (taking into account leap year rules)\n        // 400 years have 12 months === 4800\n        return (days * 4800) / 146097;\n    }\n\n    function monthsToDays(months) {\n        // the reverse of daysToMonths\n        return (months * 146097) / 4800;\n    }\n\n    function as(units) {\n        if (!this.isValid()) {\n            return NaN;\n        }\n        var days,\n            months,\n            milliseconds = this._milliseconds;\n\n        units = normalizeUnits(units);\n\n        if (units === 'month' || units === 'quarter' || units === 'year') {\n            days = this._days + milliseconds / 864e5;\n            months = this._months + daysToMonths(days);\n            switch (units) {\n                case 'month':\n                    return months;\n                case 'quarter':\n                    return months / 3;\n                case 'year':\n                    return months / 12;\n            }\n        } else {\n            // handle milliseconds separately because of floating point math errors (issue #1867)\n            days = this._days + Math.round(monthsToDays(this._months));\n            switch (units) {\n                case 'week':\n                    return days / 7 + milliseconds / 6048e5;\n                case 'day':\n                    return days + milliseconds / 864e5;\n                case 'hour':\n                    return days * 24 + milliseconds / 36e5;\n                case 'minute':\n                    return days * 1440 + milliseconds / 6e4;\n                case 'second':\n                    return days * 86400 + milliseconds / 1000;\n                // Math.floor prevents floating point math errors here\n                case 'millisecond':\n                    return Math.floor(days * 864e5) + milliseconds;\n                default:\n                    throw new Error('Unknown unit ' + units);\n            }\n        }\n    }\n\n    function makeAs(alias) {\n        return function () {\n            return this.as(alias);\n        };\n    }\n\n    var asMilliseconds = makeAs('ms'),\n        asSeconds = makeAs('s'),\n        asMinutes = makeAs('m'),\n        asHours = makeAs('h'),\n        asDays = makeAs('d'),\n        asWeeks = makeAs('w'),\n        asMonths = makeAs('M'),\n        asQuarters = makeAs('Q'),\n        asYears = makeAs('y'),\n        valueOf$1 = asMilliseconds;\n\n    function clone$1() {\n        return createDuration(this);\n    }\n\n    function get$2(units) {\n        units = normalizeUnits(units);\n        return this.isValid() ? this[units + 's']() : NaN;\n    }\n\n    function makeGetter(name) {\n        return function () {\n            return this.isValid() ? this._data[name] : NaN;\n        };\n    }\n\n    var milliseconds = makeGetter('milliseconds'),\n        seconds = makeGetter('seconds'),\n        minutes = makeGetter('minutes'),\n        hours = makeGetter('hours'),\n        days = makeGetter('days'),\n        months = makeGetter('months'),\n        years = makeGetter('years');\n\n    function weeks() {\n        return absFloor(this.days() / 7);\n    }\n\n    var round = Math.round,\n        thresholds = {\n            ss: 44, // a few seconds to seconds\n            s: 45, // seconds to minute\n            m: 45, // minutes to hour\n            h: 22, // hours to day\n            d: 26, // days to month/week\n            w: null, // weeks to month\n            M: 11, // months to year\n        };\n\n    // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\n    function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n        return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n    }\n\n    function relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {\n        var duration = createDuration(posNegDuration).abs(),\n            seconds = round(duration.as('s')),\n            minutes = round(duration.as('m')),\n            hours = round(duration.as('h')),\n            days = round(duration.as('d')),\n            months = round(duration.as('M')),\n            weeks = round(duration.as('w')),\n            years = round(duration.as('y')),\n            a =\n                (seconds <= thresholds.ss && ['s', seconds]) ||\n                (seconds < thresholds.s && ['ss', seconds]) ||\n                (minutes <= 1 && ['m']) ||\n                (minutes < thresholds.m && ['mm', minutes]) ||\n                (hours <= 1 && ['h']) ||\n                (hours < thresholds.h && ['hh', hours]) ||\n                (days <= 1 && ['d']) ||\n                (days < thresholds.d && ['dd', days]);\n\n        if (thresholds.w != null) {\n            a =\n                a ||\n                (weeks <= 1 && ['w']) ||\n                (weeks < thresholds.w && ['ww', weeks]);\n        }\n        a = a ||\n            (months <= 1 && ['M']) ||\n            (months < thresholds.M && ['MM', months]) ||\n            (years <= 1 && ['y']) || ['yy', years];\n\n        a[2] = withoutSuffix;\n        a[3] = +posNegDuration > 0;\n        a[4] = locale;\n        return substituteTimeAgo.apply(null, a);\n    }\n\n    // This function allows you to set the rounding function for relative time strings\n    function getSetRelativeTimeRounding(roundingFunction) {\n        if (roundingFunction === undefined) {\n            return round;\n        }\n        if (typeof roundingFunction === 'function') {\n            round = roundingFunction;\n            return true;\n        }\n        return false;\n    }\n\n    // This function allows you to set a threshold for relative time strings\n    function getSetRelativeTimeThreshold(threshold, limit) {\n        if (thresholds[threshold] === undefined) {\n            return false;\n        }\n        if (limit === undefined) {\n            return thresholds[threshold];\n        }\n        thresholds[threshold] = limit;\n        if (threshold === 's') {\n            thresholds.ss = limit - 1;\n        }\n        return true;\n    }\n\n    function humanize(argWithSuffix, argThresholds) {\n        if (!this.isValid()) {\n            return this.localeData().invalidDate();\n        }\n\n        var withSuffix = false,\n            th = thresholds,\n            locale,\n            output;\n\n        if (typeof argWithSuffix === 'object') {\n            argThresholds = argWithSuffix;\n            argWithSuffix = false;\n        }\n        if (typeof argWithSuffix === 'boolean') {\n            withSuffix = argWithSuffix;\n        }\n        if (typeof argThresholds === 'object') {\n            th = Object.assign({}, thresholds, argThresholds);\n            if (argThresholds.s != null && argThresholds.ss == null) {\n                th.ss = argThresholds.s - 1;\n            }\n        }\n\n        locale = this.localeData();\n        output = relativeTime$1(this, !withSuffix, th, locale);\n\n        if (withSuffix) {\n            output = locale.pastFuture(+this, output);\n        }\n\n        return locale.postformat(output);\n    }\n\n    var abs$1 = Math.abs;\n\n    function sign(x) {\n        return (x > 0) - (x < 0) || +x;\n    }\n\n    function toISOString$1() {\n        // for ISO strings we do not use the normal bubbling rules:\n        //  * milliseconds bubble up until they become hours\n        //  * days do not bubble at all\n        //  * months bubble up until they become years\n        // This is because there is no context-free conversion between hours and days\n        // (think of clock changes)\n        // and also not between days and months (28-31 days per month)\n        if (!this.isValid()) {\n            return this.localeData().invalidDate();\n        }\n\n        var seconds = abs$1(this._milliseconds) / 1000,\n            days = abs$1(this._days),\n            months = abs$1(this._months),\n            minutes,\n            hours,\n            years,\n            s,\n            total = this.asSeconds(),\n            totalSign,\n            ymSign,\n            daysSign,\n            hmsSign;\n\n        if (!total) {\n            // this is the same as C#'s (Noda) and python (isodate)...\n            // but not other JS (goog.date)\n            return 'P0D';\n        }\n\n        // 3600 seconds -> 60 minutes -> 1 hour\n        minutes = absFloor(seconds / 60);\n        hours = absFloor(minutes / 60);\n        seconds %= 60;\n        minutes %= 60;\n\n        // 12 months -> 1 year\n        years = absFloor(months / 12);\n        months %= 12;\n\n        // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n        s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n\n        totalSign = total < 0 ? '-' : '';\n        ymSign = sign(this._months) !== sign(total) ? '-' : '';\n        daysSign = sign(this._days) !== sign(total) ? '-' : '';\n        hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n\n        return (\n            totalSign +\n            'P' +\n            (years ? ymSign + years + 'Y' : '') +\n            (months ? ymSign + months + 'M' : '') +\n            (days ? daysSign + days + 'D' : '') +\n            (hours || minutes || seconds ? 'T' : '') +\n            (hours ? hmsSign + hours + 'H' : '') +\n            (minutes ? hmsSign + minutes + 'M' : '') +\n            (seconds ? hmsSign + s + 'S' : '')\n        );\n    }\n\n    var proto$2 = Duration.prototype;\n\n    proto$2.isValid = isValid$1;\n    proto$2.abs = abs;\n    proto$2.add = add$1;\n    proto$2.subtract = subtract$1;\n    proto$2.as = as;\n    proto$2.asMilliseconds = asMilliseconds;\n    proto$2.asSeconds = asSeconds;\n    proto$2.asMinutes = asMinutes;\n    proto$2.asHours = asHours;\n    proto$2.asDays = asDays;\n    proto$2.asWeeks = asWeeks;\n    proto$2.asMonths = asMonths;\n    proto$2.asQuarters = asQuarters;\n    proto$2.asYears = asYears;\n    proto$2.valueOf = valueOf$1;\n    proto$2._bubble = bubble;\n    proto$2.clone = clone$1;\n    proto$2.get = get$2;\n    proto$2.milliseconds = milliseconds;\n    proto$2.seconds = seconds;\n    proto$2.minutes = minutes;\n    proto$2.hours = hours;\n    proto$2.days = days;\n    proto$2.weeks = weeks;\n    proto$2.months = months;\n    proto$2.years = years;\n    proto$2.humanize = humanize;\n    proto$2.toISOString = toISOString$1;\n    proto$2.toString = toISOString$1;\n    proto$2.toJSON = toISOString$1;\n    proto$2.locale = locale;\n    proto$2.localeData = localeData;\n\n    proto$2.toIsoString = deprecate(\n        'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',\n        toISOString$1\n    );\n    proto$2.lang = lang;\n\n    // FORMATTING\n\n    addFormatToken('X', 0, 0, 'unix');\n    addFormatToken('x', 0, 0, 'valueOf');\n\n    // PARSING\n\n    addRegexToken('x', matchSigned);\n    addRegexToken('X', matchTimestamp);\n    addParseToken('X', function (input, array, config) {\n        config._d = new Date(parseFloat(input) * 1000);\n    });\n    addParseToken('x', function (input, array, config) {\n        config._d = new Date(toInt(input));\n    });\n\n    //! moment.js\n\n    hooks.version = '2.30.1';\n\n    setHookCallback(createLocal);\n\n    hooks.fn = proto;\n    hooks.min = min;\n    hooks.max = max;\n    hooks.now = now;\n    hooks.utc = createUTC;\n    hooks.unix = createUnix;\n    hooks.months = listMonths;\n    hooks.isDate = isDate;\n    hooks.locale = getSetGlobalLocale;\n    hooks.invalid = createInvalid;\n    hooks.duration = createDuration;\n    hooks.isMoment = isMoment;\n    hooks.weekdays = listWeekdays;\n    hooks.parseZone = createInZone;\n    hooks.localeData = getLocale;\n    hooks.isDuration = isDuration;\n    hooks.monthsShort = listMonthsShort;\n    hooks.weekdaysMin = listWeekdaysMin;\n    hooks.defineLocale = defineLocale;\n    hooks.updateLocale = updateLocale;\n    hooks.locales = listLocales;\n    hooks.weekdaysShort = listWeekdaysShort;\n    hooks.normalizeUnits = normalizeUnits;\n    hooks.relativeTimeRounding = getSetRelativeTimeRounding;\n    hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\n    hooks.calendarFormat = getCalendarFormat;\n    hooks.prototype = proto;\n\n    // currently HTML5 input type only supports 24-hour formats\n    hooks.HTML5_FMT = {\n        DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // <input type=\"datetime-local\" />\n        DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // <input type=\"datetime-local\" step=\"1\" />\n        DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // <input type=\"datetime-local\" step=\"0.001\" />\n        DATE: 'YYYY-MM-DD', // <input type=\"date\" />\n        TIME: 'HH:mm', // <input type=\"time\" />\n        TIME_SECONDS: 'HH:mm:ss', // <input type=\"time\" step=\"1\" />\n        TIME_MS: 'HH:mm:ss.SSS', // <input type=\"time\" step=\"0.001\" />\n        WEEK: 'GGGG-[W]WW', // <input type=\"week\" />\n        MONTH: 'YYYY-MM', // <input type=\"month\" />\n    };\n\n    return hooks;\n\n})));\n", "/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n  switch (args.length) {\n    case 0: return func.call(thisArg);\n    case 1: return func.call(thisArg, args[0]);\n    case 2: return func.call(thisArg, args[0], args[1]);\n    case 3: return func.call(thisArg, args[0], args[1], args[2]);\n  }\n  return func.apply(thisArg, args);\n}\n\nmodule.exports = apply;\n", "var apply = require('./_apply');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n  start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n  return function() {\n    var args = arguments,\n        index = -1,\n        length = nativeMax(args.length - start, 0),\n        array = Array(length);\n\n    while (++index < length) {\n      array[index] = args[start + index];\n    }\n    index = -1;\n    var otherArgs = Array(start + 1);\n    while (++index < start) {\n      otherArgs[index] = args[index];\n    }\n    otherArgs[start] = transform(array);\n    return apply(func, this, otherArgs);\n  };\n}\n\nmodule.exports = overRest;\n", "/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n  return function() {\n    return value;\n  };\n}\n\nmodule.exports = constant;\n", "var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n  try {\n    var func = getNative(Object, 'defineProperty');\n    func({}, '', {});\n    return func;\n  } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n", "var constant = require('./constant'),\n    defineProperty = require('./_defineProperty'),\n    identity = require('./identity');\n\n/**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar baseSetToString = !defineProperty ? identity : function(func, string) {\n  return defineProperty(func, 'toString', {\n    'configurable': true,\n    'enumerable': false,\n    'value': constant(string),\n    'writable': true\n  });\n};\n\nmodule.exports = baseSetToString;\n", "/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT = 800,\n    HOT_SPAN = 16;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeNow = Date.now;\n\n/**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\nfunction shortOut(func) {\n  var count = 0,\n      lastCalled = 0;\n\n  return function() {\n    var stamp = nativeNow(),\n        remaining = HOT_SPAN - (stamp - lastCalled);\n\n    lastCalled = stamp;\n    if (remaining > 0) {\n      if (++count >= HOT_COUNT) {\n        return arguments[0];\n      }\n    } else {\n      count = 0;\n    }\n    return func.apply(undefined, arguments);\n  };\n}\n\nmodule.exports = shortOut;\n", "var baseSetToString = require('./_baseSetToString'),\n    shortOut = require('./_shortOut');\n\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar setToString = shortOut(baseSetToString);\n\nmodule.exports = setToString;\n", "var identity = require('./identity'),\n    overRest = require('./_overRest'),\n    setToString = require('./_setToString');\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n  return setToString(overRest(func, start, identity), func + '');\n}\n\nmodule.exports = baseRest;\n", "var isArrayLike = require('./isArrayLike'),\n    isObjectLike = require('./isObjectLike');\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n *  else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n  return isObjectLike(value) && isArrayLike(value);\n}\n\nmodule.exports = isArrayLikeObject;\n", "var arrayFilter = require('./_arrayFilter'),\n    arrayMap = require('./_arrayMap'),\n    baseProperty = require('./_baseProperty'),\n    baseTimes = require('./_baseTimes'),\n    isArrayLikeObject = require('./isArrayLikeObject');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * This method is like `_.zip` except that it accepts an array of grouped\n * elements and creates an array regrouping the elements to their pre-zip\n * configuration.\n *\n * @static\n * @memberOf _\n * @since 1.2.0\n * @category Array\n * @param {Array} array The array of grouped elements to process.\n * @returns {Array} Returns the new array of regrouped elements.\n * @example\n *\n * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);\n * // => [['a', 1, true], ['b', 2, false]]\n *\n * _.unzip(zipped);\n * // => [['a', 'b'], [1, 2], [true, false]]\n */\nfunction unzip(array) {\n  if (!(array && array.length)) {\n    return [];\n  }\n  var length = 0;\n  array = arrayFilter(array, function(group) {\n    if (isArrayLikeObject(group)) {\n      length = nativeMax(group.length, length);\n      return true;\n    }\n  });\n  return baseTimes(length, function(index) {\n    return arrayMap(array, baseProperty(index));\n  });\n}\n\nmodule.exports = unzip;\n", "var baseRest = require('./_baseRest'),\n    unzip = require('./unzip');\n\n/**\n * Creates an array of grouped elements, the first of which contains the\n * first elements of the given arrays, the second of which contains the\n * second elements of the given arrays, and so on.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to process.\n * @returns {Array} Returns the new array of grouped elements.\n * @example\n *\n * _.zip(['a', 'b'], [1, 2], [true, false]);\n * // => [['a', 1, true], ['b', 2, false]]\n */\nvar zip = baseRest(unzip);\n\nmodule.exports = zip;\n", "/**\n * The base implementation of `_.slice` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\nfunction baseSlice(array, start, end) {\n  var index = -1,\n      length = array.length;\n\n  if (start < 0) {\n    start = -start > length ? 0 : (length + start);\n  }\n  end = end > length ? length : end;\n  if (end < 0) {\n    end += length;\n  }\n  length = start > end ? 0 : ((end - start) >>> 0);\n  start >>>= 0;\n\n  var result = Array(length);\n  while (++index < length) {\n    result[index] = array[index + start];\n  }\n  return result;\n}\n\nmodule.exports = baseSlice;\n", "var eq = require('./eq'),\n    isArrayLike = require('./isArrayLike'),\n    isIndex = require('./_isIndex'),\n    isObject = require('./isObject');\n\n/**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n *  else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n  if (!isObject(object)) {\n    return false;\n  }\n  var type = typeof index;\n  if (type == 'number'\n        ? (isArrayLike(object) && isIndex(index, object.length))\n        : (type == 'string' && index in object)\n      ) {\n    return eq(object[index], value);\n  }\n  return false;\n}\n\nmodule.exports = isIterateeCall;\n", "var toNumber = require('./toNumber');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0,\n    MAX_INTEGER = 1.7976931348623157e+308;\n\n/**\n * Converts `value` to a finite number.\n *\n * @static\n * @memberOf _\n * @since 4.12.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted number.\n * @example\n *\n * _.toFinite(3.2);\n * // => 3.2\n *\n * _.toFinite(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toFinite(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toFinite('3.2');\n * // => 3.2\n */\nfunction toFinite(value) {\n  if (!value) {\n    return value === 0 ? value : 0;\n  }\n  value = toNumber(value);\n  if (value === INFINITY || value === -INFINITY) {\n    var sign = (value < 0 ? -1 : 1);\n    return sign * MAX_INTEGER;\n  }\n  return value === value ? value : 0;\n}\n\nmodule.exports = toFinite;\n", "var toFinite = require('./toFinite');\n\n/**\n * Converts `value` to an integer.\n *\n * **Note:** This method is loosely based on\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toInteger(3.2);\n * // => 3\n *\n * _.toInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toInteger(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toInteger('3.2');\n * // => 3\n */\nfunction toInteger(value) {\n  var result = toFinite(value),\n      remainder = result % 1;\n\n  return result === result ? (remainder ? result - remainder : result) : 0;\n}\n\nmodule.exports = toInteger;\n", "var baseSlice = require('./_baseSlice'),\n    isIterateeCall = require('./_isIterateeCall'),\n    toInteger = require('./toInteger');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeCeil = Math.ceil,\n    nativeMax = Math.max;\n\n/**\n * Creates an array of elements split into groups the length of `size`.\n * If `array` can't be split evenly, the final chunk will be the remaining\n * elements.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to process.\n * @param {number} [size=1] The length of each chunk\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the new array of chunks.\n * @example\n *\n * _.chunk(['a', 'b', 'c', 'd'], 2);\n * // => [['a', 'b'], ['c', 'd']]\n *\n * _.chunk(['a', 'b', 'c', 'd'], 3);\n * // => [['a', 'b', 'c'], ['d']]\n */\nfunction chunk(array, size, guard) {\n  if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {\n    size = 1;\n  } else {\n    size = nativeMax(toInteger(size), 0);\n  }\n  var length = array == null ? 0 : array.length;\n  if (!length || size < 1) {\n    return [];\n  }\n  var index = 0,\n      resIndex = 0,\n      result = Array(nativeCeil(length / size));\n\n  while (index < length) {\n    result[resIndex++] = baseSlice(array, index, (index += size));\n  }\n  return result;\n}\n\nmodule.exports = chunk;\n", "const ZONE_1 = \"1\";\nconst ZONE_2 = \"2\";\nconst ZONE_2E = \"2e\";\nconst ZONE_2N = \"2n\";\nconst ZONE_2R = \"2r\";\nconst ZONE_3 = \"3\";\nconst ZONE_3E = \"3e\";\nconst ZONE_3R = \"3r\";\n\nconst ZONES = [ZONE_1, ZONE_2, ZONE_2E, ZONE_2N, ZONE_2R, ZONE_3, ZONE_3E, ZONE_3R];\n\nconst ZONES_710 = [ZONE_1, ZONE_2, ZONE_3];\nconst ZONES_716_GABLE = [ZONE_1, ZONE_2E, ZONE_2N, ZONE_2R, ZONE_3E, ZONE_3R];\nconst ZONES_716_HIP = [ZONE_1, ZONE_2E, ZONE_2R, ZONE_3];\n\nconst MODULE_POSITION_N = \"N\";\nconst MODULE_POSITION_EXP = \"EXP\";\nconst MODULE_POSITION_EDG = \"EDG\";\nconst MODULE_POSITION_EDGN = \"EDGN\";\nconst MODULE_POSITION_EDGS = \"EDGS\";\nconst MODULE_POSITIONS = [\n  MODULE_POSITION_N,\n  MODULE_POSITION_EXP,\n  MODULE_POSITION_EDG,\n  MODULE_POSITION_EDGN,\n  MODULE_POSITION_EDGS,\n];\n\nconst DEFAULT_ZONE_MODULE_POSITION = `${ZONE_1}:${MODULE_POSITION_N}`;\n\nconst ZONES_MODULE_POSITIONS = [];\nZONES.forEach((zone) => {\n  MODULE_POSITIONS.forEach((modulePosition) => {\n    ZONES_MODULE_POSITIONS.push(`${zone}:${modulePosition}`);\n  });\n});\n\nmodule.exports = {\n  ZONE_1,\n  ZONE_2,\n  ZONE_2E,\n  ZONE_2N,\n  ZONE_2R,\n  ZONE_3,\n  ZONE_3E,\n  ZONE_3R,\n  ZONES,\n  ZONES_710,\n  ZONES_716_GABLE,\n  ZONES_716_HIP,\n  MODULE_POSITION_N,\n  MODULE_POSITION_EXP,\n  MODULE_POSITION_EDG,\n  MODULE_POSITION_EDGN,\n  MODULE_POSITION_EDGS,\n  MODULE_POSITIONS,\n  DEFAULT_ZONE_MODULE_POSITION,\n  ZONES_MODULE_POSITIONS,\n};\n", "var Symbol = require('./_Symbol'),\n    isArguments = require('./isArguments'),\n    isArray = require('./isArray');\n\n/** Built-in value references. */\nvar spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;\n\n/**\n * Checks if `value` is a flattenable `arguments` object or array.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n */\nfunction isFlattenable(value) {\n  return isArray(value) || isArguments(value) ||\n    !!(spreadableSymbol && value && value[spreadableSymbol]);\n}\n\nmodule.exports = isFlattenable;\n", "var arrayPush = require('./_arrayPush'),\n    isFlattenable = require('./_isFlattenable');\n\n/**\n * The base implementation of `_.flatten` with support for restricting flattening.\n *\n * @private\n * @param {Array} array The array to flatten.\n * @param {number} depth The maximum recursion depth.\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n * @param {Array} [result=[]] The initial result value.\n * @returns {Array} Returns the new flattened array.\n */\nfunction baseFlatten(array, depth, predicate, isStrict, result) {\n  var index = -1,\n      length = array.length;\n\n  predicate || (predicate = isFlattenable);\n  result || (result = []);\n\n  while (++index < length) {\n    var value = array[index];\n    if (depth > 0 && predicate(value)) {\n      if (depth > 1) {\n        // Recursively flatten arrays (susceptible to call stack limits).\n        baseFlatten(value, depth - 1, predicate, isStrict, result);\n      } else {\n        arrayPush(result, value);\n      }\n    } else if (!isStrict) {\n      result[result.length] = value;\n    }\n  }\n  return result;\n}\n\nmodule.exports = baseFlatten;\n", "/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n  return function(object, iteratee, keysFunc) {\n    var index = -1,\n        iterable = Object(object),\n        props = keysFunc(object),\n        length = props.length;\n\n    while (length--) {\n      var key = props[fromRight ? length : ++index];\n      if (iteratee(iterable[key], key, iterable) === false) {\n        break;\n      }\n    }\n    return object;\n  };\n}\n\nmodule.exports = createBaseFor;\n", "var createBaseFor = require('./_createBaseFor');\n\n/**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\nmodule.exports = baseFor;\n", "var baseFor = require('./_baseFor'),\n    keys = require('./keys');\n\n/**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\nfunction baseForOwn(object, iteratee) {\n  return object && baseFor(object, iteratee, keys);\n}\n\nmodule.exports = baseForOwn;\n", "var isArrayLike = require('./isArrayLike');\n\n/**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseEach(eachFunc, fromRight) {\n  return function(collection, iteratee) {\n    if (collection == null) {\n      return collection;\n    }\n    if (!isArrayLike(collection)) {\n      return eachFunc(collection, iteratee);\n    }\n    var length = collection.length,\n        index = fromRight ? length : -1,\n        iterable = Object(collection);\n\n    while ((fromRight ? index-- : ++index < length)) {\n      if (iteratee(iterable[index], index, iterable) === false) {\n        break;\n      }\n    }\n    return collection;\n  };\n}\n\nmodule.exports = createBaseEach;\n", "var baseForOwn = require('./_baseForOwn'),\n    createBaseEach = require('./_createBaseEach');\n\n/**\n * The base implementation of `_.forEach` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\nvar baseEach = createBaseEach(baseForOwn);\n\nmodule.exports = baseEach;\n", "var baseEach = require('./_baseEach'),\n    isArrayLike = require('./isArrayLike');\n\n/**\n * The base implementation of `_.map` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction baseMap(collection, iteratee) {\n  var index = -1,\n      result = isArrayLike(collection) ? Array(collection.length) : [];\n\n  baseEach(collection, function(value, key, collection) {\n    result[++index] = iteratee(value, key, collection);\n  });\n  return result;\n}\n\nmodule.exports = baseMap;\n", "/**\n * The base implementation of `_.sortBy` which uses `comparer` to define the\n * sort order of `array` and replaces criteria objects with their corresponding\n * values.\n *\n * @private\n * @param {Array} array The array to sort.\n * @param {Function} comparer The function to define sort order.\n * @returns {Array} Returns `array`.\n */\nfunction baseSortBy(array, comparer) {\n  var length = array.length;\n\n  array.sort(comparer);\n  while (length--) {\n    array[length] = array[length].value;\n  }\n  return array;\n}\n\nmodule.exports = baseSortBy;\n", "var isSymbol = require('./isSymbol');\n\n/**\n * Compares values to sort them in ascending order.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {number} Returns the sort order indicator for `value`.\n */\nfunction compareAscending(value, other) {\n  if (value !== other) {\n    var valIsDefined = value !== undefined,\n        valIsNull = value === null,\n        valIsReflexive = value === value,\n        valIsSymbol = isSymbol(value);\n\n    var othIsDefined = other !== undefined,\n        othIsNull = other === null,\n        othIsReflexive = other === other,\n        othIsSymbol = isSymbol(other);\n\n    if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||\n        (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||\n        (valIsNull && othIsDefined && othIsReflexive) ||\n        (!valIsDefined && othIsReflexive) ||\n        !valIsReflexive) {\n      return 1;\n    }\n    if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||\n        (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||\n        (othIsNull && valIsDefined && valIsReflexive) ||\n        (!othIsDefined && valIsReflexive) ||\n        !othIsReflexive) {\n      return -1;\n    }\n  }\n  return 0;\n}\n\nmodule.exports = compareAscending;\n", "var compareAscending = require('./_compareAscending');\n\n/**\n * Used by `_.orderBy` to compare multiple properties of a value to another\n * and stable sort them.\n *\n * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,\n * specify an order of \"desc\" for descending or \"asc\" for ascending sort order\n * of corresponding values.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {boolean[]|string[]} orders The order to sort by for each property.\n * @returns {number} Returns the sort order indicator for `object`.\n */\nfunction compareMultiple(object, other, orders) {\n  var index = -1,\n      objCriteria = object.criteria,\n      othCriteria = other.criteria,\n      length = objCriteria.length,\n      ordersLength = orders.length;\n\n  while (++index < length) {\n    var result = compareAscending(objCriteria[index], othCriteria[index]);\n    if (result) {\n      if (index >= ordersLength) {\n        return result;\n      }\n      var order = orders[index];\n      return result * (order == 'desc' ? -1 : 1);\n    }\n  }\n  // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications\n  // that causes it, under certain circumstances, to provide the same value for\n  // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247\n  // for more details.\n  //\n  // This also ensures a stable sort in V8 and other engines.\n  // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.\n  return object.index - other.index;\n}\n\nmodule.exports = compareMultiple;\n", "var arrayMap = require('./_arrayMap'),\n    baseGet = require('./_baseGet'),\n    baseIteratee = require('./_baseIteratee'),\n    baseMap = require('./_baseMap'),\n    baseSortBy = require('./_baseSortBy'),\n    baseUnary = require('./_baseUnary'),\n    compareMultiple = require('./_compareMultiple'),\n    identity = require('./identity'),\n    isArray = require('./isArray');\n\n/**\n * The base implementation of `_.orderBy` without param guards.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.\n * @param {string[]} orders The sort orders of `iteratees`.\n * @returns {Array} Returns the new sorted array.\n */\nfunction baseOrderBy(collection, iteratees, orders) {\n  if (iteratees.length) {\n    iteratees = arrayMap(iteratees, function(iteratee) {\n      if (isArray(iteratee)) {\n        return function(value) {\n          return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);\n        };\n      }\n      return iteratee;\n    });\n  } else {\n    iteratees = [identity];\n  }\n\n  var index = -1;\n  iteratees = arrayMap(iteratees, baseUnary(baseIteratee));\n\n  var result = baseMap(collection, function(value, key, collection) {\n    var criteria = arrayMap(iteratees, function(iteratee) {\n      return iteratee(value);\n    });\n    return { 'criteria': criteria, 'index': ++index, 'value': value };\n  });\n\n  return baseSortBy(result, function(object, other) {\n    return compareMultiple(object, other, orders);\n  });\n}\n\nmodule.exports = baseOrderBy;\n", "var baseFlatten = require('./_baseFlatten'),\n    baseOrderBy = require('./_baseOrderBy'),\n    baseRest = require('./_baseRest'),\n    isIterateeCall = require('./_isIterateeCall');\n\n/**\n * Creates an array of elements, sorted in ascending order by the results of\n * running each element in a collection thru each iteratee. This method\n * performs a stable sort, that is, it preserves the original sort order of\n * equal elements. The iteratees are invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {...(Function|Function[])} [iteratees=[_.identity]]\n *  The iteratees to sort by.\n * @returns {Array} Returns the new sorted array.\n * @example\n *\n * var users = [\n *   { 'user': 'fred',   'age': 48 },\n *   { 'user': 'barney', 'age': 36 },\n *   { 'user': 'fred',   'age': 30 },\n *   { 'user': 'barney', 'age': 34 }\n * ];\n *\n * _.sortBy(users, [function(o) { return o.user; }]);\n * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]\n *\n * _.sortBy(users, ['user', 'age']);\n * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]\n */\nvar sortBy = baseRest(function(collection, iteratees) {\n  if (collection == null) {\n    return [];\n  }\n  var length = iteratees.length;\n  if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {\n    iteratees = [];\n  } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {\n    iteratees = [iteratees[0]];\n  }\n  return baseOrderBy(collection, baseFlatten(iteratees, 1), []);\n});\n\nmodule.exports = sortBy;\n", "!function(t,i){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=i():\"function\"==typeof define&&define.amd?define(i):(t=t||self).RBush=i()}(this,function(){\"use strict\";function t(t,r,e,a,h){!function t(n,r,e,a,h){for(;a>e;){if(a-e>600){var o=a-e+1,s=r-e+1,l=Math.log(o),f=.5*Math.exp(2*l/3),u=.5*Math.sqrt(l*f*(o-f)/o)*(s-o/2<0?-1:1),m=Math.max(e,Math.floor(r-s*f/o+u)),c=Math.min(a,Math.floor(r+(o-s)*f/o+u));t(n,r,m,c,h)}var p=n[r],d=e,x=a;for(i(n,e,r),h(n[a],p)>0&&i(n,e,a);d<x;){for(i(n,d,x),d++,x--;h(n[d],p)<0;)d++;for(;h(n[x],p)>0;)x--}0===h(n[e],p)?i(n,e,x):i(n,++x,a),x<=r&&(e=x+1),r<=x&&(a=x-1)}}(t,r,e||0,a||t.length-1,h||n)}function i(t,i,n){var r=t[i];t[i]=t[n],t[n]=r}function n(t,i){return t<i?-1:t>i?1:0}var r=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function e(t,i,n){if(!n)return i.indexOf(t);for(var r=0;r<i.length;r++)if(n(t,i[r]))return r;return-1}function a(t,i){h(t,0,t.children.length,i,t)}function h(t,i,n,r,e){e||(e=p(null)),e.minX=1/0,e.minY=1/0,e.maxX=-1/0,e.maxY=-1/0;for(var a=i;a<n;a++){var h=t.children[a];o(e,t.leaf?r(h):h)}return e}function o(t,i){return t.minX=Math.min(t.minX,i.minX),t.minY=Math.min(t.minY,i.minY),t.maxX=Math.max(t.maxX,i.maxX),t.maxY=Math.max(t.maxY,i.maxY),t}function s(t,i){return t.minX-i.minX}function l(t,i){return t.minY-i.minY}function f(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function u(t){return t.maxX-t.minX+(t.maxY-t.minY)}function m(t,i){return t.minX<=i.minX&&t.minY<=i.minY&&i.maxX<=t.maxX&&i.maxY<=t.maxY}function c(t,i){return i.minX<=t.maxX&&i.minY<=t.maxY&&i.maxX>=t.minX&&i.maxY>=t.minY}function p(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function d(i,n,r,e,a){for(var h=[n,r];h.length;)if(!((r=h.pop())-(n=h.pop())<=e)){var o=n+Math.ceil((r-n)/e/2)*e;t(i,o,n,r,a),h.push(n,o,o,r)}}return r.prototype.all=function(){return this._all(this.data,[])},r.prototype.search=function(t){var i=this.data,n=[];if(!c(t,i))return n;for(var r=this.toBBox,e=[];i;){for(var a=0;a<i.children.length;a++){var h=i.children[a],o=i.leaf?r(h):h;c(t,o)&&(i.leaf?n.push(h):m(t,o)?this._all(h,n):e.push(h))}i=e.pop()}return n},r.prototype.collides=function(t){var i=this.data;if(!c(t,i))return!1;for(var n=[];i;){for(var r=0;r<i.children.length;r++){var e=i.children[r],a=i.leaf?this.toBBox(e):e;if(c(t,a)){if(i.leaf||m(t,a))return!0;n.push(e)}}i=n.pop()}return!1},r.prototype.load=function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var i=0;i<t.length;i++)this.insert(t[i]);return this}var n=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var r=this.data;this.data=n,n=r}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;return this},r.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},r.prototype.clear=function(){return this.data=p([]),this},r.prototype.remove=function(t,i){if(!t)return this;for(var n,r,a,h=this.data,o=this.toBBox(t),s=[],l=[];h||s.length;){if(h||(h=s.pop(),r=s[s.length-1],n=l.pop(),a=!0),h.leaf){var f=e(t,h.children,i);if(-1!==f)return h.children.splice(f,1),s.push(h),this._condense(s),this}a||h.leaf||!m(h,o)?r?(n++,h=r.children[n],a=!1):h=null:(s.push(h),l.push(n),n=0,r=h,h=h.children[0])}return this},r.prototype.toBBox=function(t){return t},r.prototype.compareMinX=function(t,i){return t.minX-i.minX},r.prototype.compareMinY=function(t,i){return t.minY-i.minY},r.prototype.toJSON=function(){return this.data},r.prototype.fromJSON=function(t){return this.data=t,this},r.prototype._all=function(t,i){for(var n=[];t;)t.leaf?i.push.apply(i,t.children):n.push.apply(n,t.children),t=n.pop();return i},r.prototype._build=function(t,i,n,r){var e,h=n-i+1,o=this._maxEntries;if(h<=o)return a(e=p(t.slice(i,n+1)),this.toBBox),e;r||(r=Math.ceil(Math.log(h)/Math.log(o)),o=Math.ceil(h/Math.pow(o,r-1))),(e=p([])).leaf=!1,e.height=r;var s=Math.ceil(h/o),l=s*Math.ceil(Math.sqrt(o));d(t,i,n,l,this.compareMinX);for(var f=i;f<=n;f+=l){var u=Math.min(f+l-1,n);d(t,f,u,s,this.compareMinY);for(var m=f;m<=u;m+=s){var c=Math.min(m+s-1,u);e.children.push(this._build(t,m,c,r-1))}}return a(e,this.toBBox),e},r.prototype._chooseSubtree=function(t,i,n,r){for(;r.push(i),!i.leaf&&r.length-1!==n;){for(var e=1/0,a=1/0,h=void 0,o=0;o<i.children.length;o++){var s=i.children[o],l=f(s),u=(m=t,c=s,(Math.max(c.maxX,m.maxX)-Math.min(c.minX,m.minX))*(Math.max(c.maxY,m.maxY)-Math.min(c.minY,m.minY))-l);u<a?(a=u,e=l<e?l:e,h=s):u===a&&l<e&&(e=l,h=s)}i=h||i.children[0]}var m,c;return i},r.prototype._insert=function(t,i,n){var r=n?t:this.toBBox(t),e=[],a=this._chooseSubtree(r,this.data,i,e);for(a.children.push(t),o(a,r);i>=0&&e[i].children.length>this._maxEntries;)this._split(e,i),i--;this._adjustParentBBoxes(r,e,i)},r.prototype._split=function(t,i){var n=t[i],r=n.children.length,e=this._minEntries;this._chooseSplitAxis(n,e,r);var h=this._chooseSplitIndex(n,e,r),o=p(n.children.splice(h,n.children.length-h));o.height=n.height,o.leaf=n.leaf,a(n,this.toBBox),a(o,this.toBBox),i?t[i-1].children.push(o):this._splitRoot(n,o)},r.prototype._splitRoot=function(t,i){this.data=p([t,i]),this.data.height=t.height+1,this.data.leaf=!1,a(this.data,this.toBBox)},r.prototype._chooseSplitIndex=function(t,i,n){for(var r,e,a,o,s,l,u,m=1/0,c=1/0,p=i;p<=n-i;p++){var d=h(t,0,p,this.toBBox),x=h(t,p,n,this.toBBox),v=(e=d,a=x,o=void 0,s=void 0,l=void 0,u=void 0,o=Math.max(e.minX,a.minX),s=Math.max(e.minY,a.minY),l=Math.min(e.maxX,a.maxX),u=Math.min(e.maxY,a.maxY),Math.max(0,l-o)*Math.max(0,u-s)),M=f(d)+f(x);v<m?(m=v,r=p,c=M<c?M:c):v===m&&M<c&&(c=M,r=p)}return r||n-i},r.prototype._chooseSplitAxis=function(t,i,n){var r=t.leaf?this.compareMinX:s,e=t.leaf?this.compareMinY:l;this._allDistMargin(t,i,n,r)<this._allDistMargin(t,i,n,e)&&t.children.sort(r)},r.prototype._allDistMargin=function(t,i,n,r){t.children.sort(r);for(var e=this.toBBox,a=h(t,0,i,e),s=h(t,n-i,n,e),l=u(a)+u(s),f=i;f<n-i;f++){var m=t.children[f];o(a,t.leaf?e(m):m),l+=u(a)}for(var c=n-i-1;c>=i;c--){var p=t.children[c];o(s,t.leaf?e(p):p),l+=u(s)}return l},r.prototype._adjustParentBBoxes=function(t,i,n){for(var r=n;r>=0;r--)o(i[r],t)},r.prototype._condense=function(t){for(var i=t.length-1,n=void 0;i>=0;i--)0===t[i].children.length?i>0?(n=t[i-1].children).splice(n.indexOf(t[i]),1):this.clear():a(t[i],this.toBBox)},r});\n", "(function (global, factory) {\ntypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\ntypeof define === 'function' && define.amd ? define(factory) :\n(global = global || self, global.TinyQueue = factory());\n}(this, function () { 'use strict';\n\nvar TinyQueue = function TinyQueue(data, compare) {\n    if ( data === void 0 ) data = [];\n    if ( compare === void 0 ) compare = defaultCompare;\n\n    this.data = data;\n    this.length = this.data.length;\n    this.compare = compare;\n\n    if (this.length > 0) {\n        for (var i = (this.length >> 1) - 1; i >= 0; i--) { this._down(i); }\n    }\n};\n\nTinyQueue.prototype.push = function push (item) {\n    this.data.push(item);\n    this.length++;\n    this._up(this.length - 1);\n};\n\nTinyQueue.prototype.pop = function pop () {\n    if (this.length === 0) { return undefined; }\n\n    var top = this.data[0];\n    var bottom = this.data.pop();\n    this.length--;\n\n    if (this.length > 0) {\n        this.data[0] = bottom;\n        this._down(0);\n    }\n\n    return top;\n};\n\nTinyQueue.prototype.peek = function peek () {\n    return this.data[0];\n};\n\nTinyQueue.prototype._up = function _up (pos) {\n    var ref = this;\n        var data = ref.data;\n        var compare = ref.compare;\n    var item = data[pos];\n\n    while (pos > 0) {\n        var parent = (pos - 1) >> 1;\n        var current = data[parent];\n        if (compare(item, current) >= 0) { break; }\n        data[pos] = current;\n        pos = parent;\n    }\n\n    data[pos] = item;\n};\n\nTinyQueue.prototype._down = function _down (pos) {\n    var ref = this;\n        var data = ref.data;\n        var compare = ref.compare;\n    var halfLength = this.length >> 1;\n    var item = data[pos];\n\n    while (pos < halfLength) {\n        var left = (pos << 1) + 1;\n        var best = data[left];\n        var right = left + 1;\n\n        if (right < this.length && compare(data[right], best) < 0) {\n            left = right;\n            best = data[right];\n        }\n        if (compare(best, item) >= 0) { break; }\n\n        data[pos] = best;\n        pos = left;\n    }\n\n    data[pos] = item;\n};\n\nfunction defaultCompare(a, b) {\n    return a < b ? -1 : a > b ? 1 : 0;\n}\n\nreturn TinyQueue;\n\n}));\n", "module.exports = function pointInPolygonFlat (point, vs, start, end) {\n    var x = point[0], y = point[1];\n    var inside = false;\n    if (start === undefined) start = 0;\n    if (end === undefined) end = vs.length;\n    var len = (end-start)/2;\n    for (var i = 0, j = len - 1; i < len; j = i++) {\n        var xi = vs[start+i*2+0], yi = vs[start+i*2+1];\n        var xj = vs[start+j*2+0], yj = vs[start+j*2+1];\n        var intersect = ((yi > y) !== (yj > y))\n            && (x < (xj - xi) * (y - yi) / (yj - yi) + xi);\n        if (intersect) inside = !inside;\n    }\n    return inside;\n};\n", "// ray-casting algorithm based on\n// https://wrf.ecse.rpi.edu/Research/Short_Notes/pnpoly.html\n\nmodule.exports = function pointInPolygonNested (point, vs, start, end) {\n    var x = point[0], y = point[1];\n    var inside = false;\n    if (start === undefined) start = 0;\n    if (end === undefined) end = vs.length;\n    var len = end - start;\n    for (var i = 0, j = len - 1; i < len; j = i++) {\n        var xi = vs[i+start][0], yi = vs[i+start][1];\n        var xj = vs[j+start][0], yj = vs[j+start][1];\n        var intersect = ((yi > y) !== (yj > y))\n            && (x < (xj - xi) * (y - yi) / (yj - yi) + xi);\n        if (intersect) inside = !inside;\n    }\n    return inside;\n};\n", "var pointInPolygonFlat = require('./flat.js')\nvar pointInPolygonNested = require('./nested.js')\n\nmodule.exports = function pointInPolygon (point, vs, start, end) {\n    if (vs.length > 0 && Array.isArray(vs[0])) {\n        return pointInPolygonNested(point, vs, start, end);\n    } else {\n        return pointInPolygonFlat(point, vs, start, end);\n    }\n}\nmodule.exports.nested = pointInPolygonNested\nmodule.exports.flat = pointInPolygonFlat\n", "!function(t,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?e(exports):\"function\"==typeof define&&define.amd?define([\"exports\"],e):e((t=t||self).predicates={})}(this,function(t){\"use strict\";const e=134217729,n=33306690738754706e-32;function r(t,e,n,r,o){let f,i,u,c,s=e[0],a=r[0],d=0,l=0;a>s==a>-s?(f=s,s=e[++d]):(f=a,a=r[++l]);let p=0;if(d<t&&l<n)for(a>s==a>-s?(u=f-((i=s+f)-s),s=e[++d]):(u=f-((i=a+f)-a),a=r[++l]),f=i,0!==u&&(o[p++]=u);d<t&&l<n;)a>s==a>-s?(u=f-((i=f+s)-(c=i-f))+(s-c),s=e[++d]):(u=f-((i=f+a)-(c=i-f))+(a-c),a=r[++l]),f=i,0!==u&&(o[p++]=u);for(;d<t;)u=f-((i=f+s)-(c=i-f))+(s-c),s=e[++d],f=i,0!==u&&(o[p++]=u);for(;l<n;)u=f-((i=f+a)-(c=i-f))+(a-c),a=r[++l],f=i,0!==u&&(o[p++]=u);return 0===f&&0!==p||(o[p++]=f),p}function o(t){return new Float64Array(t)}const f=33306690738754716e-32,i=22204460492503146e-32,u=11093356479670487e-47,c=o(4),s=o(8),a=o(12),d=o(16),l=o(4);t.orient2d=function(t,o,p,b,y,h){const M=(o-h)*(p-y),x=(t-y)*(b-h),j=M-x;if(0===M||0===x||M>0!=x>0)return j;const m=Math.abs(M+x);return Math.abs(j)>=f*m?j:-function(t,o,f,p,b,y,h){let M,x,j,m,_,v,w,A,F,O,P,g,k,q,z,B,C,D;const E=t-b,G=f-b,H=o-y,I=p-y;_=(z=(A=E-(w=(v=e*E)-(v-E)))*(O=I-(F=(v=e*I)-(v-I)))-((q=E*I)-w*F-A*F-w*O))-(P=z-(C=(A=H-(w=(v=e*H)-(v-H)))*(O=G-(F=(v=e*G)-(v-G)))-((B=H*G)-w*F-A*F-w*O))),c[0]=z-(P+_)+(_-C),_=(k=q-((g=q+P)-(_=g-q))+(P-_))-(P=k-B),c[1]=k-(P+_)+(_-B),_=(D=g+P)-g,c[2]=g-(D-_)+(P-_),c[3]=D;let J=function(t,e){let n=e[0];for(let r=1;r<t;r++)n+=e[r];return n}(4,c),K=i*h;if(J>=K||-J>=K)return J;if(M=t-(E+(_=t-E))+(_-b),j=f-(G+(_=f-G))+(_-b),x=o-(H+(_=o-H))+(_-y),m=p-(I+(_=p-I))+(_-y),0===M&&0===x&&0===j&&0===m)return J;if(K=u*h+n*Math.abs(J),(J+=E*m+I*M-(H*j+G*x))>=K||-J>=K)return J;_=(z=(A=M-(w=(v=e*M)-(v-M)))*(O=I-(F=(v=e*I)-(v-I)))-((q=M*I)-w*F-A*F-w*O))-(P=z-(C=(A=x-(w=(v=e*x)-(v-x)))*(O=G-(F=(v=e*G)-(v-G)))-((B=x*G)-w*F-A*F-w*O))),l[0]=z-(P+_)+(_-C),_=(k=q-((g=q+P)-(_=g-q))+(P-_))-(P=k-B),l[1]=k-(P+_)+(_-B),_=(D=g+P)-g,l[2]=g-(D-_)+(P-_),l[3]=D;const L=r(4,c,4,l,s);_=(z=(A=E-(w=(v=e*E)-(v-E)))*(O=m-(F=(v=e*m)-(v-m)))-((q=E*m)-w*F-A*F-w*O))-(P=z-(C=(A=H-(w=(v=e*H)-(v-H)))*(O=j-(F=(v=e*j)-(v-j)))-((B=H*j)-w*F-A*F-w*O))),l[0]=z-(P+_)+(_-C),_=(k=q-((g=q+P)-(_=g-q))+(P-_))-(P=k-B),l[1]=k-(P+_)+(_-B),_=(D=g+P)-g,l[2]=g-(D-_)+(P-_),l[3]=D;const N=r(L,s,4,l,a);_=(z=(A=M-(w=(v=e*M)-(v-M)))*(O=m-(F=(v=e*m)-(v-m)))-((q=M*m)-w*F-A*F-w*O))-(P=z-(C=(A=x-(w=(v=e*x)-(v-x)))*(O=j-(F=(v=e*j)-(v-j)))-((B=x*j)-w*F-A*F-w*O))),l[0]=z-(P+_)+(_-C),_=(k=q-((g=q+P)-(_=g-q))+(P-_))-(P=k-B),l[1]=k-(P+_)+(_-B),_=(D=g+P)-g,l[2]=g-(D-_)+(P-_),l[3]=D;const Q=r(N,a,4,l,d);return d[Q-1]}(t,o,p,b,y,h,m)},t.orient2dfast=function(t,e,n,r,o,f){return(e-f)*(n-o)-(t-o)*(r-f)},Object.defineProperty(t,\"__esModule\",{value:!0})});\n", "'use strict';\n\nvar RBush = require('rbush');\nvar Queue = require('tinyqueue');\nvar pointInPolygon = require('point-in-polygon');\nvar orient = require('robust-predicates/umd/orient2d.min.js').orient2d;\n\n// Fix for require issue in webpack https://github.com/mapbox/concaveman/issues/18\nif (Queue.default) {\n    Queue = Queue.default;\n}\n\nmodule.exports = concaveman;\nmodule.exports.default = concaveman;\n\nfunction concaveman(points, concavity, lengthThreshold) {\n    // a relative measure of concavity; higher value means simpler hull\n    concavity = Math.max(0, concavity === undefined ? 2 : concavity);\n\n    // when a segment goes below this length threshold, it won't be drilled down further\n    lengthThreshold = lengthThreshold || 0;\n\n    // start with a convex hull of the points\n    var hull = fastConvexHull(points);\n\n    // index the points with an R-tree\n    var tree = new RBush(16);\n    tree.toBBox = function (a) {\n        return {\n            minX: a[0],\n            minY: a[1],\n            maxX: a[0],\n            maxY: a[1]\n        };\n    };\n    tree.compareMinX = function (a, b) { return a[0] - b[0]; };\n    tree.compareMinY = function (a, b) { return a[1] - b[1]; };\n\n    tree.load(points);\n\n    // turn the convex hull into a linked list and populate the initial edge queue with the nodes\n    var queue = [];\n    for (var i = 0, last; i < hull.length; i++) {\n        var p = hull[i];\n        tree.remove(p);\n        last = insertNode(p, last);\n        queue.push(last);\n    }\n\n    // index the segments with an R-tree (for intersection checks)\n    var segTree = new RBush(16);\n    for (i = 0; i < queue.length; i++) segTree.insert(updateBBox(queue[i]));\n\n    var sqConcavity = concavity * concavity;\n    var sqLenThreshold = lengthThreshold * lengthThreshold;\n\n    // process edges one by one\n    while (queue.length) {\n        var node = queue.shift();\n        var a = node.p;\n        var b = node.next.p;\n\n        // skip the edge if it's already short enough\n        var sqLen = getSqDist(a, b);\n        if (sqLen < sqLenThreshold) continue;\n\n        var maxSqLen = sqLen / sqConcavity;\n\n        // find the best connection point for the current edge to flex inward to\n        p = findCandidate(tree, node.prev.p, a, b, node.next.next.p, maxSqLen, segTree);\n\n        // if we found a connection and it satisfies our concavity measure\n        if (p && Math.min(getSqDist(p, a), getSqDist(p, b)) <= maxSqLen) {\n            // connect the edge endpoints through this point and add 2 new edges to the queue\n            queue.push(node);\n            queue.push(insertNode(p, node));\n\n            // update point and segment indexes\n            tree.remove(p);\n            segTree.remove(node);\n            segTree.insert(updateBBox(node));\n            segTree.insert(updateBBox(node.next));\n        }\n    }\n\n    // convert the resulting hull linked list to an array of points\n    node = last;\n    var concave = [];\n    do {\n        concave.push(node.p);\n        node = node.next;\n    } while (node !== last);\n\n    concave.push(node.p);\n\n    return concave;\n}\n\nfunction findCandidate(tree, a, b, c, d, maxDist, segTree) {\n    var queue = new Queue([], compareDist);\n    var node = tree.data;\n\n    // search through the point R-tree with a depth-first search using a priority queue\n    // in the order of distance to the edge (b, c)\n    while (node) {\n        for (var i = 0; i < node.children.length; i++) {\n            var child = node.children[i];\n\n            var dist = node.leaf ? sqSegDist(child, b, c) : sqSegBoxDist(b, c, child);\n            if (dist > maxDist) continue; // skip the node if it's farther than we ever need\n\n            queue.push({\n                node: child,\n                dist: dist\n            });\n        }\n\n        while (queue.length && !queue.peek().node.children) {\n            var item = queue.pop();\n            var p = item.node;\n\n            // skip all points that are as close to adjacent edges (a,b) and (c,d),\n            // and points that would introduce self-intersections when connected\n            var d0 = sqSegDist(p, a, b);\n            var d1 = sqSegDist(p, c, d);\n            if (item.dist < d0 && item.dist < d1 &&\n                noIntersections(b, p, segTree) &&\n                noIntersections(c, p, segTree)) return p;\n        }\n\n        node = queue.pop();\n        if (node) node = node.node;\n    }\n\n    return null;\n}\n\nfunction compareDist(a, b) {\n    return a.dist - b.dist;\n}\n\n// square distance from a segment bounding box to the given one\nfunction sqSegBoxDist(a, b, bbox) {\n    if (inside(a, bbox) || inside(b, bbox)) return 0;\n    var d1 = sqSegSegDist(a[0], a[1], b[0], b[1], bbox.minX, bbox.minY, bbox.maxX, bbox.minY);\n    if (d1 === 0) return 0;\n    var d2 = sqSegSegDist(a[0], a[1], b[0], b[1], bbox.minX, bbox.minY, bbox.minX, bbox.maxY);\n    if (d2 === 0) return 0;\n    var d3 = sqSegSegDist(a[0], a[1], b[0], b[1], bbox.maxX, bbox.minY, bbox.maxX, bbox.maxY);\n    if (d3 === 0) return 0;\n    var d4 = sqSegSegDist(a[0], a[1], b[0], b[1], bbox.minX, bbox.maxY, bbox.maxX, bbox.maxY);\n    if (d4 === 0) return 0;\n    return Math.min(d1, d2, d3, d4);\n}\n\nfunction inside(a, bbox) {\n    return a[0] >= bbox.minX &&\n           a[0] <= bbox.maxX &&\n           a[1] >= bbox.minY &&\n           a[1] <= bbox.maxY;\n}\n\n// check if the edge (a,b) doesn't intersect any other edges\nfunction noIntersections(a, b, segTree) {\n    var minX = Math.min(a[0], b[0]);\n    var minY = Math.min(a[1], b[1]);\n    var maxX = Math.max(a[0], b[0]);\n    var maxY = Math.max(a[1], b[1]);\n\n    var edges = segTree.search({minX: minX, minY: minY, maxX: maxX, maxY: maxY});\n    for (var i = 0; i < edges.length; i++) {\n        if (intersects(edges[i].p, edges[i].next.p, a, b)) return false;\n    }\n    return true;\n}\n\nfunction cross(p1, p2, p3) {\n    return orient(p1[0], p1[1], p2[0], p2[1], p3[0], p3[1]);\n}\n\n// check if the edges (p1,q1) and (p2,q2) intersect\nfunction intersects(p1, q1, p2, q2) {\n    return p1 !== q2 && q1 !== p2 &&\n        cross(p1, q1, p2) > 0 !== cross(p1, q1, q2) > 0 &&\n        cross(p2, q2, p1) > 0 !== cross(p2, q2, q1) > 0;\n}\n\n// update the bounding box of a node's edge\nfunction updateBBox(node) {\n    var p1 = node.p;\n    var p2 = node.next.p;\n    node.minX = Math.min(p1[0], p2[0]);\n    node.minY = Math.min(p1[1], p2[1]);\n    node.maxX = Math.max(p1[0], p2[0]);\n    node.maxY = Math.max(p1[1], p2[1]);\n    return node;\n}\n\n// speed up convex hull by filtering out points inside quadrilateral formed by 4 extreme points\nfunction fastConvexHull(points) {\n    var left = points[0];\n    var top = points[0];\n    var right = points[0];\n    var bottom = points[0];\n\n    // find the leftmost, rightmost, topmost and bottommost points\n    for (var i = 0; i < points.length; i++) {\n        var p = points[i];\n        if (p[0] < left[0]) left = p;\n        if (p[0] > right[0]) right = p;\n        if (p[1] < top[1]) top = p;\n        if (p[1] > bottom[1]) bottom = p;\n    }\n\n    // filter out points that are inside the resulting quadrilateral\n    var cull = [left, top, right, bottom];\n    var filtered = cull.slice();\n    for (i = 0; i < points.length; i++) {\n        if (!pointInPolygon(points[i], cull)) filtered.push(points[i]);\n    }\n\n    // get convex hull around the filtered points\n    return convexHull(filtered);\n}\n\n// create a new node in a doubly linked list\nfunction insertNode(p, prev) {\n    var node = {\n        p: p,\n        prev: null,\n        next: null,\n        minX: 0,\n        minY: 0,\n        maxX: 0,\n        maxY: 0\n    };\n\n    if (!prev) {\n        node.prev = node;\n        node.next = node;\n\n    } else {\n        node.next = prev.next;\n        node.prev = prev;\n        prev.next.prev = node;\n        prev.next = node;\n    }\n    return node;\n}\n\n// square distance between 2 points\nfunction getSqDist(p1, p2) {\n\n    var dx = p1[0] - p2[0],\n        dy = p1[1] - p2[1];\n\n    return dx * dx + dy * dy;\n}\n\n// square distance from a point to a segment\nfunction sqSegDist(p, p1, p2) {\n\n    var x = p1[0],\n        y = p1[1],\n        dx = p2[0] - x,\n        dy = p2[1] - y;\n\n    if (dx !== 0 || dy !== 0) {\n\n        var t = ((p[0] - x) * dx + (p[1] - y) * dy) / (dx * dx + dy * dy);\n\n        if (t > 1) {\n            x = p2[0];\n            y = p2[1];\n\n        } else if (t > 0) {\n            x += dx * t;\n            y += dy * t;\n        }\n    }\n\n    dx = p[0] - x;\n    dy = p[1] - y;\n\n    return dx * dx + dy * dy;\n}\n\n// segment to segment distance, ported from http://geomalgorithms.com/a07-_distance.html by Dan Sunday\nfunction sqSegSegDist(x0, y0, x1, y1, x2, y2, x3, y3) {\n    var ux = x1 - x0;\n    var uy = y1 - y0;\n    var vx = x3 - x2;\n    var vy = y3 - y2;\n    var wx = x0 - x2;\n    var wy = y0 - y2;\n    var a = ux * ux + uy * uy;\n    var b = ux * vx + uy * vy;\n    var c = vx * vx + vy * vy;\n    var d = ux * wx + uy * wy;\n    var e = vx * wx + vy * wy;\n    var D = a * c - b * b;\n\n    var sc, sN, tc, tN;\n    var sD = D;\n    var tD = D;\n\n    if (D === 0) {\n        sN = 0;\n        sD = 1;\n        tN = e;\n        tD = c;\n    } else {\n        sN = b * e - c * d;\n        tN = a * e - b * d;\n        if (sN < 0) {\n            sN = 0;\n            tN = e;\n            tD = c;\n        } else if (sN > sD) {\n            sN = sD;\n            tN = e + b;\n            tD = c;\n        }\n    }\n\n    if (tN < 0.0) {\n        tN = 0.0;\n        if (-d < 0.0) sN = 0.0;\n        else if (-d > a) sN = sD;\n        else {\n            sN = -d;\n            sD = a;\n        }\n    } else if (tN > tD) {\n        tN = tD;\n        if ((-d + b) < 0.0) sN = 0;\n        else if (-d + b > a) sN = sD;\n        else {\n            sN = -d + b;\n            sD = a;\n        }\n    }\n\n    sc = sN === 0 ? 0 : sN / sD;\n    tc = tN === 0 ? 0 : tN / tD;\n\n    var cx = (1 - sc) * x0 + sc * x1;\n    var cy = (1 - sc) * y0 + sc * y1;\n    var cx2 = (1 - tc) * x2 + tc * x3;\n    var cy2 = (1 - tc) * y2 + tc * y3;\n    var dx = cx2 - cx;\n    var dy = cy2 - cy;\n\n    return dx * dx + dy * dy;\n}\n\nfunction compareByX(a, b) {\n    return a[0] === b[0] ? a[1] - b[1] : a[0] - b[0];\n}\n\nfunction convexHull(points) {\n    points.sort(compareByX);\n\n    var lower = [];\n    for (var i = 0; i < points.length; i++) {\n        while (lower.length >= 2 && cross(lower[lower.length - 2], lower[lower.length - 1], points[i]) <= 0) {\n            lower.pop();\n        }\n        lower.push(points[i]);\n    }\n\n    var upper = [];\n    for (var ii = points.length - 1; ii >= 0; ii--) {\n        while (upper.length >= 2 && cross(upper[upper.length - 2], upper[upper.length - 1], points[ii]) <= 0) {\n            upper.pop();\n        }\n        upper.push(points[ii]);\n    }\n\n    upper.pop();\n    lower.pop();\n    return lower.concat(upper);\n}\n", "/**\n * Based on Kendo UI Core expression code <https://github.com/telerik/kendo-ui-core#license-information>\n */\n'use strict'\n\nfunction Cache(maxSize) {\n  this._maxSize = maxSize\n  this.clear()\n}\nCache.prototype.clear = function () {\n  this._size = 0\n  this._values = Object.create(null)\n}\nCache.prototype.get = function (key) {\n  return this._values[key]\n}\nCache.prototype.set = function (key, value) {\n  this._size >= this._maxSize && this.clear()\n  if (!(key in this._values)) this._size++\n\n  return (this._values[key] = value)\n}\n\nvar SPLIT_REGEX = /[^.^\\]^[]+|(?=\\[\\]|\\.\\.)/g,\n  DIGIT_REGEX = /^\\d+$/,\n  LEAD_DIGIT_REGEX = /^\\d/,\n  SPEC_CHAR_REGEX = /[~`!#$%\\^&*+=\\-\\[\\]\\\\';,/{}|\\\\\":<>\\?]/g,\n  CLEAN_QUOTES_REGEX = /^\\s*(['\"]?)(.*?)(\\1)\\s*$/,\n  MAX_CACHE_SIZE = 512\n\nvar pathCache = new Cache(MAX_CACHE_SIZE),\n  setCache = new Cache(MAX_CACHE_SIZE),\n  getCache = new Cache(MAX_CACHE_SIZE)\n\nvar config\n\nmodule.exports = {\n  Cache: Cache,\n\n  split: split,\n\n  normalizePath: normalizePath,\n\n  setter: function (path) {\n    var parts = normalizePath(path)\n\n    return (\n      setCache.get(path) ||\n      setCache.set(path, function setter(obj, value) {\n        var index = 0\n        var len = parts.length\n        var data = obj\n\n        while (index < len - 1) {\n          var part = parts[index]\n          if (\n            part === '__proto__' ||\n            part === 'constructor' ||\n            part === 'prototype'\n          ) {\n            return obj\n          }\n\n          data = data[parts[index++]]\n        }\n        data[parts[index]] = value\n      })\n    )\n  },\n\n  getter: function (path, safe) {\n    var parts = normalizePath(path)\n    return (\n      getCache.get(path) ||\n      getCache.set(path, function getter(data) {\n        var index = 0,\n          len = parts.length\n        while (index < len) {\n          if (data != null || !safe) data = data[parts[index++]]\n          else return\n        }\n        return data\n      })\n    )\n  },\n\n  join: function (segments) {\n    return segments.reduce(function (path, part) {\n      return (\n        path +\n        (isQuoted(part) || DIGIT_REGEX.test(part)\n          ? '[' + part + ']'\n          : (path ? '.' : '') + part)\n      )\n    }, '')\n  },\n\n  forEach: function (path, cb, thisArg) {\n    forEach(Array.isArray(path) ? path : split(path), cb, thisArg)\n  },\n}\n\nfunction normalizePath(path) {\n  return (\n    pathCache.get(path) ||\n    pathCache.set(\n      path,\n      split(path).map(function (part) {\n        return part.replace(CLEAN_QUOTES_REGEX, '$2')\n      })\n    )\n  )\n}\n\nfunction split(path) {\n  return path.match(SPLIT_REGEX) || ['']\n}\n\nfunction forEach(parts, iter, thisArg) {\n  var len = parts.length,\n    part,\n    idx,\n    isArray,\n    isBracket\n\n  for (idx = 0; idx < len; idx++) {\n    part = parts[idx]\n\n    if (part) {\n      if (shouldBeQuoted(part)) {\n        part = '\"' + part + '\"'\n      }\n\n      isBracket = isQuoted(part)\n      isArray = !isBracket && /^\\d+$/.test(part)\n\n      iter.call(thisArg, part, isBracket, isArray, idx, parts)\n    }\n  }\n}\n\nfunction isQuoted(str) {\n  return (\n    typeof str === 'string' && str && [\"'\", '\"'].indexOf(str.charAt(0)) !== -1\n  )\n}\n\nfunction hasLeadingNumber(part) {\n  return part.match(LEAD_DIGIT_REGEX) && !part.match(DIGIT_REGEX)\n}\n\nfunction hasSpecialChars(part) {\n  return SPEC_CHAR_REGEX.test(part)\n}\n\nfunction shouldBeQuoted(part) {\n  return !isQuoted(part) && (hasLeadingNumber(part) || hasSpecialChars(part))\n}\n", "const reWords = /[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?:['\u2019](?:d|ll|m|re|s|t|ve))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde]|$)|(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde](?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])|$)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?(?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:d|ll|m|re|s|t|ve))?|[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?|\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])|\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])|\\d+|(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?)*/g\n\nconst words = (str) => str.match(reWords) || []\n\nconst upperFirst = (str) => str[0].toUpperCase() + str.slice(1)\n\nconst join = (str, d) => words(str).join(d).toLowerCase()\n\nconst camelCase = (str) =>\n  words(str).reduce(\n    (acc, next) =>\n      `${acc}${\n        !acc\n          ? next.toLowerCase()\n          : next[0].toUpperCase() + next.slice(1).toLowerCase()\n      }`,\n    '',\n  )\n\nconst pascalCase = (str) => upperFirst(camelCase(str))\n\nconst snakeCase = (str) => join(str, '_')\n\nconst kebabCase = (str) => join(str, '-')\n\nconst sentenceCase = (str) => upperFirst(join(str, ' '))\n\nconst titleCase = (str) => words(str).map(upperFirst).join(' ')\n\nmodule.exports = {\n  words,\n  upperFirst,\n  camelCase,\n  pascalCase,\n  snakeCase,\n  kebabCase,\n  sentenceCase,\n  titleCase,\n}\n", "\n/**\n * Topological sorting function\n *\n * @param {Array} edges\n * @returns {Array}\n */\n\nmodule.exports = function(edges) {\n  return toposort(uniqueNodes(edges), edges)\n}\n\nmodule.exports.array = toposort\n\nfunction toposort(nodes, edges) {\n  var cursor = nodes.length\n    , sorted = new Array(cursor)\n    , visited = {}\n    , i = cursor\n    // Better data structures make algorithm much faster.\n    , outgoingEdges = makeOutgoingEdges(edges)\n    , nodesHash = makeNodesHash(nodes)\n\n  // check for unknown nodes\n  edges.forEach(function(edge) {\n    if (!nodesHash.has(edge[0]) || !nodesHash.has(edge[1])) {\n      throw new Error('Unknown node. There is an unknown node in the supplied edges.')\n    }\n  })\n\n  while (i--) {\n    if (!visited[i]) visit(nodes[i], i, new Set())\n  }\n\n  return sorted\n\n  function visit(node, i, predecessors) {\n    if(predecessors.has(node)) {\n      var nodeRep\n      try {\n        nodeRep = \", node was:\" + JSON.stringify(node)\n      } catch(e) {\n        nodeRep = \"\"\n      }\n      throw new Error('Cyclic dependency' + nodeRep)\n    }\n\n    if (!nodesHash.has(node)) {\n      throw new Error('Found unknown node. Make sure to provided all involved nodes. Unknown node: '+JSON.stringify(node))\n    }\n\n    if (visited[i]) return;\n    visited[i] = true\n\n    var outgoing = outgoingEdges.get(node) || new Set()\n    outgoing = Array.from(outgoing)\n\n    if (i = outgoing.length) {\n      predecessors.add(node)\n      do {\n        var child = outgoing[--i]\n        visit(child, nodesHash.get(child), predecessors)\n      } while (i)\n      predecessors.delete(node)\n    }\n\n    sorted[--cursor] = node\n  }\n}\n\nfunction uniqueNodes(arr){\n  var res = new Set()\n  for (var i = 0, len = arr.length; i < len; i++) {\n    var edge = arr[i]\n    res.add(edge[0])\n    res.add(edge[1])\n  }\n  return Array.from(res)\n}\n\nfunction makeOutgoingEdges(arr){\n  var edges = new Map()\n  for (var i = 0, len = arr.length; i < len; i++) {\n    var edge = arr[i]\n    if (!edges.has(edge[0])) edges.set(edge[0], new Set())\n    if (!edges.has(edge[1])) edges.set(edge[1], new Set())\n    edges.get(edge[0]).add(edge[1])\n  }\n  return edges\n}\n\nfunction makeNodesHash(arr){\n  var res = new Map()\n  for (var i = 0, len = arr.length; i < len; i++) {\n    res.set(arr[i], i)\n  }\n  return res\n}\n", "export const attachmentSelector = \"[data-trix-attachment]\"\n\nconst attachments = {\n  preview: {\n    presentation: \"gallery\",\n    caption: {\n      name: true,\n      size: true,\n    },\n  },\n  file: {\n    caption: {\n      size: true,\n    },\n  },\n}\nexport default attachments\n", "const attributes = {\n  default: {\n    tagName: \"div\",\n    parse: false,\n  },\n  quote: {\n    tagName: \"blockquote\",\n    nestable: true,\n  },\n  heading1: {\n    tagName: \"h1\",\n    terminal: true,\n    breakOnReturn: true,\n    group: false,\n  },\n  code: {\n    tagName: \"pre\",\n    terminal: true,\n    htmlAttributes: [ \"language\" ],\n    text: {\n      plaintext: true,\n    },\n  },\n  bulletList: {\n    tagName: \"ul\",\n    parse: false,\n  },\n  bullet: {\n    tagName: \"li\",\n    listAttribute: \"bulletList\",\n    group: false,\n    nestable: true,\n    test(element) {\n      return tagName(element.parentNode) === attributes[this.listAttribute].tagName\n    },\n  },\n  numberList: {\n    tagName: \"ol\",\n    parse: false,\n  },\n  number: {\n    tagName: \"li\",\n    listAttribute: \"numberList\",\n    group: false,\n    nestable: true,\n    test(element) {\n      return tagName(element.parentNode) === attributes[this.listAttribute].tagName\n    },\n  },\n  attachmentGallery: {\n    tagName: \"div\",\n    exclusive: true,\n    terminal: true,\n    parse: false,\n    group: false,\n  },\n}\n\nconst tagName = (element) => element?.tagName?.toLowerCase()\n\nexport default attributes\n", "const androidVersionMatch = navigator.userAgent.match(/android\\s([0-9]+.*Chrome)/i)\nconst androidVersion = androidVersionMatch && parseInt(androidVersionMatch[1])\n\nexport default {\n  // Android emits composition events when moving the cursor through existing text\n  // Introduced in Chrome 65: https://bugs.chromium.org/p/chromium/issues/detail?id=764439#c9\n  composesExistingText: /Android.*Chrome/.test(navigator.userAgent),\n\n  // Android 13, especially on Samsung keyboards, emits extra compositionend and beforeinput events\n  // that can make the input handler lose the current selection or enter an infinite input -> render -> input\n  // loop.\n  recentAndroid: androidVersion && androidVersion > 12,\n  samsungAndroid: androidVersion && navigator.userAgent.match(/Android.*SM-/),\n\n  // IE 11 activates resizing handles on editable elements that have \"layout\"\n  forcesObjectResizing: /Trident.*rv:11/.test(navigator.userAgent),\n  // https://www.w3.org/TR/input-events-1/ + https://www.w3.org/TR/input-events-2/\n  supportsInputEvents: typeof InputEvent !== \"undefined\" &&\n    [ \"data\", \"getTargetRanges\", \"inputType\" ].every(prop => prop in InputEvent.prototype),\n}\n", "export default {\n  ADD_ATTR: [ \"language\" ],\n  SAFE_FOR_XML: false,\n  RETURN_DOM: true\n}\n", "export default {\n  attachFiles: \"Attach Files\",\n  bold: \"Bold\",\n  bullets: \"Bullets\",\n  byte: \"Byte\",\n  bytes: \"Bytes\",\n  captionPlaceholder: \"Add a caption…\",\n  code: \"Code\",\n  heading1: \"Heading\",\n  indent: \"Increase Level\",\n  italic: \"Italic\",\n  link: \"Link\",\n  numbers: \"Numbers\",\n  outdent: \"Decrease Level\",\n  quote: \"Quote\",\n  redo: \"Redo\",\n  remove: \"Remove\",\n  strike: \"Strikethrough\",\n  undo: \"Undo\",\n  unlink: \"Unlink\",\n  url: \"URL\",\n  urlPlaceholder: \"Enter a URL…\",\n  GB: \"GB\",\n  KB: \"KB\",\n  MB: \"MB\",\n  PB: \"PB\",\n  TB: \"TB\",\n}\n", "/* eslint-disable\n    no-case-declarations,\n*/\nimport lang from \"trix/config/lang\"\n\nconst sizes = [ lang.bytes, lang.KB, lang.MB, lang.GB, lang.TB, lang.PB ]\n\nexport default {\n  prefix: \"IEC\",\n  precision: 2,\n\n  formatter(number) {\n    switch (number) {\n      case 0:\n        return `0 ${lang.bytes}`\n      case 1:\n        return `1 ${lang.byte}`\n      default:\n        let base\n\n        if (this.prefix === \"SI\") {\n          base = 1000\n        } else if (this.prefix === \"IEC\") {\n          base = 1024\n        }\n\n        const exp = Math.floor(Math.log(number) / Math.log(base))\n        const humanSize = number / Math.pow(base, exp)\n        const string = humanSize.toFixed(this.precision)\n        const withoutInsignificantZeros = string.replace(/0*$/, \"\").replace(/\\.$/, \"\")\n        return `${withoutInsignificantZeros} ${sizes[exp]}`\n    }\n  },\n}\n", "export const ZERO_WIDTH_SPACE = \"\\uFEFF\"\nexport const NON_BREAKING_SPACE = \"\\u00A0\"\nexport const OBJECT_REPLACEMENT_CHARACTER = \"\\uFFFC\"\n", "export const extend = function(properties) {\n  for (const key in properties) {\n    const value = properties[key]\n    this[key] = value\n  }\n  return this\n}\n", "import blockAttributes from \"trix/config/block_attributes\"\nimport { ZERO_WIDTH_SPACE } from \"trix/constants\"\nimport { extend } from \"./extend\"\nimport { attachmentSelector } from \"trix/config/attachments\"\n\nconst html = document.documentElement\nconst match = html.matches\n\nexport const handleEvent = function(eventName, { onElement, matchingSelector, withCallback, inPhase, preventDefault, times } = {}) {\n  const element = onElement ? onElement : html\n  const selector = matchingSelector\n  const useCapture = inPhase === \"capturing\"\n\n  const handler = function(event) {\n    if (times != null && --times === 0) {\n      handler.destroy()\n    }\n    const target = findClosestElementFromNode(event.target, { matchingSelector: selector })\n    if (target != null) {\n      withCallback?.call(target, event, target)\n      if (preventDefault) {\n        event.preventDefault()\n      }\n    }\n  }\n\n  handler.destroy = () => element.removeEventListener(eventName, handler, useCapture)\n\n  element.addEventListener(eventName, handler, useCapture)\n  return handler\n}\n\nexport const handleEventOnce = function(eventName, options = {}) {\n  options.times = 1\n  return handleEvent(eventName, options)\n}\n\nexport const createEvent = function(eventName, { bubbles, cancelable, attributes } = {}) {\n  bubbles = bubbles !== false\n  cancelable = cancelable !== false\n\n  const event = document.createEvent(\"Events\")\n  event.initEvent(eventName, bubbles, cancelable)\n  if (attributes != null) {\n    extend.call(event, attributes)\n  }\n  return event\n}\n\nexport const triggerEvent = function(eventName, { onElement, bubbles, cancelable, attributes } = {}) {\n  const element = onElement != null ? onElement : html\n  const event = createEvent(eventName, { bubbles, cancelable, attributes })\n  return element.dispatchEvent(event)\n}\n\nexport const elementMatchesSelector = function(element, selector) {\n  if (element?.nodeType === 1) {\n    return match.call(element, selector)\n  }\n}\n\nexport const findClosestElementFromNode = function(node, { matchingSelector, untilNode } = {}) {\n  while (node && node.nodeType !== Node.ELEMENT_NODE) {\n    node = node.parentNode\n  }\n  if (node == null) {\n    return\n  }\n\n  if (matchingSelector != null) {\n    if (node.closest && untilNode == null) {\n      return node.closest(matchingSelector)\n    } else {\n      while (node && node !== untilNode) {\n        if (elementMatchesSelector(node, matchingSelector)) {\n          return node\n        }\n        node = node.parentNode\n      }\n    }\n  } else {\n    return node\n  }\n}\n\nexport const findInnerElement = function(element) {\n  while (element?.firstElementChild) {\n    element = element.firstElementChild\n  }\n  return element\n}\n\nexport const innerElementIsActive = (element) =>\n  document.activeElement !== element && elementContainsNode(element, document.activeElement)\n\nexport const elementContainsNode = function(element, node) {\n  if (!element || !node) {\n    return\n  }\n  while (node) {\n    if (node === element) {\n      return true\n    }\n    node = node.parentNode\n  }\n}\n\nexport const findNodeFromContainerAndOffset = function(container, offset) {\n  if (!container) {\n    return\n  }\n  if (container.nodeType === Node.TEXT_NODE) {\n    return container\n  } else if (offset === 0) {\n    return container.firstChild != null ? container.firstChild : container\n  } else {\n    return container.childNodes.item(offset - 1)\n  }\n}\n\nexport const findElementFromContainerAndOffset = function(container, offset) {\n  const node = findNodeFromContainerAndOffset(container, offset)\n  return findClosestElementFromNode(node)\n}\n\nexport const findChildIndexOfNode = function(node) {\n  if (!node?.parentNode) {\n    return\n  }\n  let childIndex = 0\n  node = node.previousSibling\n  while (node) {\n    childIndex++\n    node = node.previousSibling\n  }\n  return childIndex\n}\n\nexport const removeNode = (node) => node?.parentNode?.removeChild(node)\n\nexport const walkTree = function(tree, { onlyNodesOfType, usingFilter, expandEntityReferences } = {}) {\n  const whatToShow = (() => {\n    switch (onlyNodesOfType) {\n      case \"element\":\n        return NodeFilter.SHOW_ELEMENT\n      case \"text\":\n        return NodeFilter.SHOW_TEXT\n      case \"comment\":\n        return NodeFilter.SHOW_COMMENT\n      default:\n        return NodeFilter.SHOW_ALL\n    }\n  })()\n\n  return document.createTreeWalker(\n    tree,\n    whatToShow,\n    usingFilter != null ? usingFilter : null,\n    expandEntityReferences === true\n  )\n}\n\nexport const tagName = (element) => element?.tagName?.toLowerCase()\n\nexport const makeElement = function(tag, options = {}) {\n  let key, value\n  if (typeof tag === \"object\") {\n    options = tag\n    tag = options.tagName\n  } else {\n    options = { attributes: options }\n  }\n\n  const element = document.createElement(tag)\n\n  if (options.editable != null) {\n    if (options.attributes == null) {\n      options.attributes = {}\n    }\n    options.attributes.contenteditable = options.editable\n  }\n\n  if (options.attributes) {\n    for (key in options.attributes) {\n      value = options.attributes[key]\n      element.setAttribute(key, value)\n    }\n  }\n\n  if (options.style) {\n    for (key in options.style) {\n      value = options.style[key]\n      element.style[key] = value\n    }\n  }\n\n  if (options.data) {\n    for (key in options.data) {\n      value = options.data[key]\n      element.dataset[key] = value\n    }\n  }\n\n  if (options.className) {\n    options.className.split(\" \").forEach((className) => {\n      element.classList.add(className)\n    })\n  }\n\n  if (options.textContent) {\n    element.textContent = options.textContent\n  }\n\n  if (options.childNodes) {\n    [].concat(options.childNodes).forEach((childNode) => {\n      element.appendChild(childNode)\n    })\n  }\n\n  return element\n}\n\nlet blockTagNames = undefined\n\nexport const getBlockTagNames = function() {\n  if (blockTagNames != null) {\n    return blockTagNames\n  }\n\n  blockTagNames = []\n  for (const key in blockAttributes) {\n    const attributes = blockAttributes[key]\n    if (attributes.tagName) {\n      blockTagNames.push(attributes.tagName)\n    }\n  }\n\n  return blockTagNames\n}\n\nexport const nodeIsBlockContainer = (node) => nodeIsBlockStartComment(node?.firstChild)\n\nexport const nodeProbablyIsBlockContainer = function(node) {\n  return getBlockTagNames().includes(tagName(node)) && !getBlockTagNames().includes(tagName(node.firstChild))\n}\n\nexport const nodeIsBlockStart = function(node, { strict } = { strict: true }) {\n  if (strict) {\n    return nodeIsBlockStartComment(node)\n  } else {\n    return (\n      nodeIsBlockStartComment(node) || !nodeIsBlockStartComment(node.firstChild) && nodeProbablyIsBlockContainer(node)\n    )\n  }\n}\n\nexport const nodeIsBlockStartComment = (node) => nodeIsCommentNode(node) && node?.data === \"block\"\n\nexport const nodeIsCommentNode = (node) => node?.nodeType === Node.COMMENT_NODE\n\nexport const nodeIsCursorTarget = function(node, { name } = {}) {\n  if (!node) {\n    return\n  }\n  if (nodeIsTextNode(node)) {\n    if (node.data === ZERO_WIDTH_SPACE) {\n      if (name) {\n        return node.parentNode.dataset.trixCursorTarget === name\n      } else {\n        return true\n      }\n    }\n  } else {\n    return nodeIsCursorTarget(node.firstChild)\n  }\n}\n\nexport const nodeIsAttachmentElement = (node) => elementMatchesSelector(node, attachmentSelector)\n\nexport const nodeIsEmptyTextNode = (node) => nodeIsTextNode(node) && node?.data === \"\"\n\nexport const nodeIsTextNode = (node) => node?.nodeType === Node.TEXT_NODE\n", "import browser from \"trix/config/browser\"\nimport { makeElement, removeNode } from \"trix/core/helpers/dom\"\n\nconst input = {\n  level2Enabled: true,\n\n  getLevel() {\n    if (this.level2Enabled && browser.supportsInputEvents) {\n      return 2\n    } else {\n      return 0\n    }\n  },\n  pickFiles(callback) {\n    const input = makeElement(\"input\", { type: \"file\", multiple: true, hidden: true, id: this.fileInputId })\n\n    input.addEventListener(\"change\", () => {\n      callback(input.files)\n      removeNode(input)\n    })\n\n    removeNode(document.getElementById(this.fileInputId))\n    document.body.appendChild(input)\n    input.click()\n  }\n}\n\nexport default input\n", "export default {\n  8: \"backspace\",\n  9: \"tab\",\n  13: \"return\",\n  27: \"escape\",\n  37: \"left\",\n  39: \"right\",\n  46: \"delete\",\n  68: \"d\",\n  72: \"h\",\n  79: \"o\",\n}\n", "export default {\n  removeBlankTableCells: false,\n  tableCellSeparator: \" | \",\n  tableRowSeparator: \"\\n\",\n}\n", "import { attachmentSelector } from \"trix/config/attachments\"\n\nexport default {\n  bold: {\n    tagName: \"strong\",\n    inheritable: true,\n    parser(element) {\n      const style = window.getComputedStyle(element)\n      return style.fontWeight === \"bold\" || style.fontWeight >= 600\n    },\n  },\n  italic: {\n    tagName: \"em\",\n    inheritable: true,\n    parser(element) {\n      const style = window.getComputedStyle(element)\n      return style.fontStyle === \"italic\"\n    },\n  },\n  href: {\n    groupTagName: \"a\",\n    parser(element) {\n      const matchingSelector = `a:not(${attachmentSelector})`\n      const link = element.closest(matchingSelector)\n      if (link) {\n        return link.getAttribute(\"href\")\n      }\n    },\n  },\n  strike: {\n    tagName: \"del\",\n    inheritable: true,\n  },\n  frozen: {\n    style: { backgroundColor: \"highlight\" },\n  },\n}\n", "import lang from \"trix/config/lang\"\n\nexport default {\n  getDefaultHTML() {\n    return `<div class=\"trix-button-row\">\n      <span class=\"trix-button-group trix-button-group--text-tools\" data-trix-button-group=\"text-tools\">\n        <button type=\"button\" class=\"trix-button trix-button--icon trix-button--icon-bold\" data-trix-attribute=\"bold\" data-trix-key=\"b\" title=\"${lang.bold}\" tabindex=\"-1\">${lang.bold}</button>\n        <button type=\"button\" class=\"trix-button trix-button--icon trix-button--icon-italic\" data-trix-attribute=\"italic\" data-trix-key=\"i\" title=\"${lang.italic}\" tabindex=\"-1\">${lang.italic}</button>\n        <button type=\"button\" class=\"trix-button trix-button--icon trix-button--icon-strike\" data-trix-attribute=\"strike\" title=\"${lang.strike}\" tabindex=\"-1\">${lang.strike}</button>\n        <button type=\"button\" class=\"trix-button trix-button--icon trix-button--icon-link\" data-trix-attribute=\"href\" data-trix-action=\"link\" data-trix-key=\"k\" title=\"${lang.link}\" tabindex=\"-1\">${lang.link}</button>\n      </span>\n\n      <span class=\"trix-button-group trix-button-group--block-tools\" data-trix-button-group=\"block-tools\">\n        <button type=\"button\" class=\"trix-button trix-button--icon trix-button--icon-heading-1\" data-trix-attribute=\"heading1\" title=\"${lang.heading1}\" tabindex=\"-1\">${lang.heading1}</button>\n        <button type=\"button\" class=\"trix-button trix-button--icon trix-button--icon-quote\" data-trix-attribute=\"quote\" title=\"${lang.quote}\" tabindex=\"-1\">${lang.quote}</button>\n        <button type=\"button\" class=\"trix-button trix-button--icon trix-button--icon-code\" data-trix-attribute=\"code\" title=\"${lang.code}\" tabindex=\"-1\">${lang.code}</button>\n        <button type=\"button\" class=\"trix-button trix-button--icon trix-button--icon-bullet-list\" data-trix-attribute=\"bullet\" title=\"${lang.bullets}\" tabindex=\"-1\">${lang.bullets}</button>\n        <button type=\"button\" class=\"trix-button trix-button--icon trix-button--icon-number-list\" data-trix-attribute=\"number\" title=\"${lang.numbers}\" tabindex=\"-1\">${lang.numbers}</button>\n        <button type=\"button\" class=\"trix-button trix-button--icon trix-button--icon-decrease-nesting-level\" data-trix-action=\"decreaseNestingLevel\" title=\"${lang.outdent}\" tabindex=\"-1\">${lang.outdent}</button>\n        <button type=\"button\" class=\"trix-button trix-button--icon trix-button--icon-increase-nesting-level\" data-trix-action=\"increaseNestingLevel\" title=\"${lang.indent}\" tabindex=\"-1\">${lang.indent}</button>\n      </span>\n\n      <span class=\"trix-button-group trix-button-group--file-tools\" data-trix-button-group=\"file-tools\">\n        <button type=\"button\" class=\"trix-button trix-button--icon trix-button--icon-attach\" data-trix-action=\"attachFiles\" title=\"${lang.attachFiles}\" tabindex=\"-1\">${lang.attachFiles}</button>\n      </span>\n\n      <span class=\"trix-button-group-spacer\"></span>\n\n      <span class=\"trix-button-group trix-button-group--history-tools\" data-trix-button-group=\"history-tools\">\n        <button type=\"button\" class=\"trix-button trix-button--icon trix-button--icon-undo\" data-trix-action=\"undo\" data-trix-key=\"z\" title=\"${lang.undo}\" tabindex=\"-1\">${lang.undo}</button>\n        <button type=\"button\" class=\"trix-button trix-button--icon trix-button--icon-redo\" data-trix-action=\"redo\" data-trix-key=\"shift+z\" title=\"${lang.redo}\" tabindex=\"-1\">${lang.redo}</button>\n      </span>\n    </div>\n\n    <div class=\"trix-dialogs\" data-trix-dialogs>\n      <div class=\"trix-dialog trix-dialog--link\" data-trix-dialog=\"href\" data-trix-dialog-attribute=\"href\">\n        <div class=\"trix-dialog__link-fields\">\n          <input type=\"url\" name=\"href\" class=\"trix-input trix-input--dialog\" placeholder=\"${lang.urlPlaceholder}\" aria-label=\"${lang.url}\" data-trix-validate-href required data-trix-input>\n          <div class=\"trix-button-group\">\n            <input type=\"button\" class=\"trix-button trix-button--dialog\" value=\"${lang.link}\" data-trix-method=\"setAttribute\">\n            <input type=\"button\" class=\"trix-button trix-button--dialog\" value=\"${lang.unlink}\" data-trix-method=\"removeAttribute\">\n          </div>\n        </div>\n      </div>\n    </div>`\n  },\n}\n", "const undo = { interval: 5000 }\nexport default undo\n", "export default {\n  attachment: \"attachment\",\n  attachmentCaption: \"attachment__caption\",\n  attachmentCaptionEditor: \"attachment__caption-editor\",\n  attachmentMetadata: \"attachment__metadata\",\n  attachmentMetadataContainer: \"attachment__metadata-container\",\n  attachmentName: \"attachment__name\",\n  attachmentProgress: \"attachment__progress\",\n  attachmentSize: \"attachment__size\",\n  attachmentToolbar: \"attachment__toolbar\",\n  attachmentGallery: \"attachment-gallery\",\n}\n", "export default class BasicObject {\n  static proxyMethod(expression) {\n    const { name, toMethod, toProperty, optional } = parseProxyMethodExpression(expression)\n\n    this.prototype[name] = function() {\n      let subject\n      let object\n\n      if (toMethod) {\n        if (optional) {\n          object = this[toMethod]?.()\n        } else {\n          object = this[toMethod]()\n        }\n      } else if (toProperty) {\n        object = this[toProperty]\n      }\n\n      if (optional) {\n        subject = object?.[name]\n        if (subject) {\n          return apply.call(subject, object, arguments)\n        }\n      } else {\n        subject = object[name]\n        return apply.call(subject, object, arguments)\n      }\n    }\n  }\n}\n\nconst parseProxyMethodExpression = function(expression) {\n  const match = expression.match(proxyMethodExpressionPattern)\n  if (!match) {\n    throw new Error(`can't parse @proxyMethod expression: ${expression}`)\n  }\n\n  const args = { name: match[4] }\n\n  if (match[2] != null) {\n    args.toMethod = match[1]\n  } else {\n    args.toProperty = match[1]\n  }\n\n  if (match[3] != null) {\n    args.optional = true\n  }\n\n  return args\n}\n\nconst { apply } = Function.prototype\n\nconst proxyMethodExpressionPattern = new RegExp(\"\\\n^\\\n(.+?)\\\n(\\\\(\\\\))?\\\n(\\\\?)?\\\n\\\\.\\\n(.+?)\\\n$\\\n\")\n", "import BasicObject from \"trix/core/basic_object\"\n\nexport default class UTF16String extends BasicObject {\n  static box(value = \"\") {\n    if (value instanceof this) {\n      return value\n    } else {\n      return this.fromUCS2String(value?.toString())\n    }\n  }\n\n  static fromUCS2String(ucs2String) {\n    return new this(ucs2String, ucs2decode(ucs2String))\n  }\n\n  static fromCodepoints(codepoints) {\n    return new this(ucs2encode(codepoints), codepoints)\n  }\n\n  constructor(ucs2String, codepoints) {\n    super(...arguments)\n    this.ucs2String = ucs2String\n    this.codepoints = codepoints\n    this.length = this.codepoints.length\n    this.ucs2Length = this.ucs2String.length\n  }\n\n  offsetToUCS2Offset(offset) {\n    return ucs2encode(this.codepoints.slice(0, Math.max(0, offset))).length\n  }\n\n  offsetFromUCS2Offset(ucs2Offset) {\n    return ucs2decode(this.ucs2String.slice(0, Math.max(0, ucs2Offset))).length\n  }\n\n  slice() {\n    return this.constructor.fromCodepoints(this.codepoints.slice(...arguments))\n  }\n\n  charAt(offset) {\n    return this.slice(offset, offset + 1)\n  }\n\n  isEqualTo(value) {\n    return this.constructor.box(value).ucs2String === this.ucs2String\n  }\n\n  toJSON() {\n    return this.ucs2String\n  }\n\n  getCacheKey() {\n    return this.ucs2String\n  }\n\n  toString() {\n    return this.ucs2String\n  }\n}\n\nconst hasArrayFrom = Array.from?.(\"\\ud83d\\udc7c\").length === 1\nconst hasStringCodePointAt = \" \".codePointAt?.(0) != null\nconst hasStringFromCodePoint = String.fromCodePoint?.(32, 128124) === \" \\ud83d\\udc7c\"\n\n// UCS-2 conversion helpers ported from Mathias Bynens' Punycode.js:\n// https://github.com/bestiejs/punycode.js#punycodeucs2\n\nlet ucs2decode, ucs2encode\n\n// Creates an array containing the numeric code points of each Unicode\n// character in the string. While JavaScript uses UCS-2 internally,\n// this function will convert a pair of surrogate halves (each of which\n// UCS-2 exposes as separate characters) into a single code point,\n// matching UTF-16.\nif (hasArrayFrom && hasStringCodePointAt) {\n  ucs2decode = (string) => Array.from(string).map((char) => char.codePointAt(0))\n} else {\n  ucs2decode = function(string) {\n    const output = []\n    let counter = 0\n    const { length } = string\n\n    while (counter < length) {\n      let value = string.charCodeAt(counter++)\n      if (0xd800 <= value && value <= 0xdbff && counter < length) {\n        // high surrogate, and there is a next character\n        const extra = string.charCodeAt(counter++)\n        if ((extra & 0xfc00) === 0xdc00) {\n          // low surrogate\n          value = ((value & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000\n        } else {\n          // unmatched surrogate; only append this code unit, in case the\n          // next code unit is the high surrogate of a surrogate pair\n          counter--\n        }\n      }\n      output.push(value)\n    }\n\n    return output\n  }\n}\n\n// Creates a string based on an array of numeric code points.\nif (hasStringFromCodePoint) {\n  ucs2encode = (array) => String.fromCodePoint(...Array.from(array || []))\n} else {\n  ucs2encode = function(array) {\n    const characters = (() => {\n      const result = []\n\n      Array.from(array).forEach((value) => {\n        let output = \"\"\n        if (value > 0xffff) {\n          value -= 0x10000\n          output += String.fromCharCode(value >>> 10 & 0x3ff | 0xd800)\n          value = 0xdc00 | value & 0x3ff\n        }\n        result.push(output + String.fromCharCode(value))\n      })\n\n      return result\n    })()\n\n    return characters.join(\"\")\n  }\n}\n", "import BasicObject from \"trix/core/basic_object\"\nimport UTF16String from \"trix/core/utilities/utf16_string\"\n\nlet id = 0\n\nexport default class TrixObject extends BasicObject {\n  static fromJSONString(jsonString) {\n    return this.fromJSON(JSON.parse(jsonString))\n  }\n\n  constructor() {\n    super(...arguments)\n    this.id = ++id\n  }\n\n  hasSameConstructorAs(object) {\n    return this.constructor === object?.constructor\n  }\n\n  isEqualTo(object) {\n    return this === object\n  }\n\n  inspect() {\n    const parts = []\n    const contents = this.contentsForInspection() || {}\n\n    for (const key in contents) {\n      const value = contents[key]\n      parts.push(`${key}=${value}`)\n    }\n\n    return `#<${this.constructor.name}:${this.id}${parts.length ? ` ${parts.join(\", \")}` : \"\"}>`\n  }\n\n  contentsForInspection() {}\n\n  toJSONString() {\n    return JSON.stringify(this)\n  }\n\n  toUTF16String() {\n    return UTF16String.box(this)\n  }\n\n  getCacheKey() {\n    return this.id.toString()\n  }\n}\n", "/* eslint-disable\n    id-length,\n*/\nexport const arraysAreEqual = function(a = [], b = []) {\n  if (a.length !== b.length) {\n    return false\n  }\n  for (let index = 0; index < a.length; index++) {\n    const value = a[index]\n    if (value !== b[index]) {\n      return false\n    }\n  }\n  return true\n}\n\nexport const arrayStartsWith = (a = [], b = []) => arraysAreEqual(a.slice(0, b.length), b)\n\nexport const spliceArray = function(array, ...args) {\n  const result = array.slice(0)\n  result.splice(...args)\n  return result\n}\n\nexport const summarizeArrayChange = function(oldArray = [], newArray = []) {\n  const added = []\n  const removed = []\n\n  const existingValues = new Set()\n\n  oldArray.forEach((value) => {\n    existingValues.add(value)\n  })\n\n  const currentValues = new Set()\n\n  newArray.forEach((value) => {\n    currentValues.add(value)\n    if (!existingValues.has(value)) {\n      added.push(value)\n    }\n  })\n\n  oldArray.forEach((value) => {\n    if (!currentValues.has(value)) {\n      removed.push(value)\n    }\n  })\n\n  return { added, removed }\n}\n", "import { makeElement } from \"trix/core/helpers/dom\"\n\n// https://github.com/mathiasbynens/unicode-2.1.8/blob/master/Bidi_Class/Right_To_Left/regex.js\nconst RTL_PATTERN =\n  /[\\u05BE\\u05C0\\u05C3\\u05D0-\\u05EA\\u05F0-\\u05F4\\u061B\\u061F\\u0621-\\u063A\\u0640-\\u064A\\u066D\\u0671-\\u06B7\\u06BA-\\u06BE\\u06C0-\\u06CE\\u06D0-\\u06D5\\u06E5\\u06E6\\u200F\\u202B\\u202E\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE72\\uFE74\\uFE76-\\uFEFC]/\n\nexport const getDirection = (function() {\n  const input = makeElement(\"input\", { dir: \"auto\", name: \"x\", dirName: \"x.dir\" })\n  const textArea = makeElement(\"textarea\", { dir: \"auto\", name: \"y\", dirName: \"y.dir\" })\n  const form = makeElement(\"form\")\n  form.appendChild(input)\n  form.appendChild(textArea)\n\n  const supportsDirName = (function() {\n    try {\n      return new FormData(form).has(textArea.dirName)\n    } catch (error) {\n      return false\n    }\n  })()\n\n  const supportsDirSelector = (function() {\n    try {\n      return input.matches(\":dir(ltr),:dir(rtl)\")\n    } catch (error) {\n      return false\n    }\n  })()\n\n  if (supportsDirName) {\n    return function(string) {\n      textArea.value = string\n      return new FormData(form).get(textArea.dirName)\n    }\n  } else if (supportsDirSelector) {\n    return function(string) {\n      input.value = string\n      if (input.matches(\":dir(rtl)\")) {\n        return \"rtl\"\n      } else {\n        return \"ltr\"\n      }\n    }\n  } else {\n    return function(string) {\n      const char = string.trim().charAt(0)\n      if (RTL_PATTERN.test(char)) {\n        return \"rtl\"\n      } else {\n        return \"ltr\"\n      }\n    }\n  }\n})()\n", "import * as config from \"trix/config\"\n\nlet allAttributeNames = null\nlet blockAttributeNames = null\nlet textAttributeNames = null\nlet listAttributeNames = null\n\nexport const getAllAttributeNames = () => {\n  if (!allAttributeNames) {\n    allAttributeNames = getTextAttributeNames().concat(getBlockAttributeNames())\n  }\n  return allAttributeNames\n}\n\nexport const getBlockConfig = (attributeName) => config.blockAttributes[attributeName]\n\nexport const getBlockAttributeNames = () => {\n  if (!blockAttributeNames) {\n    blockAttributeNames = Object.keys(config.blockAttributes)\n  }\n  return blockAttributeNames\n}\n\nexport const getTextConfig = (attributeName) => config.textAttributes[attributeName]\n\nexport const getTextAttributeNames = () => {\n  if (!textAttributeNames) {\n    textAttributeNames = Object.keys(config.textAttributes)\n  }\n  return textAttributeNames\n}\n\nexport const getListAttributeNames = () => {\n  if (!listAttributeNames) {\n    listAttributeNames = []\n    for (const key in config.blockAttributes) {\n      const { listAttribute } = config.blockAttributes[key]\n      if (listAttribute != null) {\n        listAttributeNames.push(listAttribute)\n      }\n    }\n  }\n  return listAttributeNames\n}\n", "/* eslint-disable\n*/\nexport const installDefaultCSSForTagName = function(tagName, defaultCSS) {\n  const styleElement = insertStyleElementForTagName(tagName)\n  styleElement.textContent = defaultCSS.replace(/%t/g, tagName)\n}\n\nconst insertStyleElementForTagName = function(tagName) {\n  const element = document.createElement(\"style\")\n  element.setAttribute(\"type\", \"text/css\")\n  element.setAttribute(\"data-tag-name\", tagName.toLowerCase())\n  const nonce = getCSPNonce()\n  if (nonce) {\n    element.setAttribute(\"nonce\", nonce)\n  }\n  document.head.insertBefore(element, document.head.firstChild)\n  return element\n}\n\nconst getCSPNonce = function() {\n  const element = getMetaElement(\"trix-csp-nonce\") || getMetaElement(\"csp-nonce\")\n  if (element) {\n    const { nonce, content } = element\n    return nonce == \"\" ? content : nonce\n  }\n}\n\nconst getMetaElement = (name) => document.head.querySelector(`meta[name=${name}]`)\n", "const testTransferData = { \"application/x-trix-feature-detection\": \"test\" }\n\nexport const dataTransferIsPlainText = function(dataTransfer) {\n  const text = dataTransfer.getData(\"text/plain\")\n  const html = dataTransfer.getData(\"text/html\")\n\n  if (text && html) {\n    const { body } = new DOMParser().parseFromString(html, \"text/html\")\n    if (body.textContent === text) {\n      return !body.querySelector(\"*\")\n    }\n  } else {\n    return text?.length\n  }\n}\n\nexport const dataTransferIsMsOfficePaste = ({ dataTransfer }) => {\n  return dataTransfer.types.includes(\"Files\") &&\n    dataTransfer.types.includes(\"text/html\") &&\n    dataTransfer.getData(\"text/html\").includes(\"urn:schemas-microsoft-com:office:office\")\n}\n\nexport const dataTransferIsWritable = function(dataTransfer) {\n  if (!dataTransfer?.setData) return false\n\n  for (const key in testTransferData) {\n    const value = testTransferData[key]\n\n    try {\n      dataTransfer.setData(key, value)\n      if (!dataTransfer.getData(key) === value) return false\n    } catch (error) {\n      return false\n    }\n  }\n  return true\n}\n\nexport const keyEventIsKeyboardCommand = (function() {\n  if (/Mac|^iP/.test(navigator.platform)) {\n    return (event) => event.metaKey\n  } else {\n    return (event) => event.ctrlKey\n  }\n})()\n\nexport function shouldRenderInmmediatelyToDealWithIOSDictation(inputEvent) {\n  if (/iPhone|iPad/.test(navigator.userAgent)) {\n    // Handle garbled content and duplicated newlines when using dictation on iOS 18+. Upon dictation completion, iOS sends\n    // the list of insertText / insertParagraph events in a quick sequence. If we don't render\n    // the editor synchronously, the internal range fails to update and results in garbled content or duplicated newlines.\n    //\n    // This workaround is necessary because iOS doesn't send composing events as expected while dictating:\n    // https://bugs.webkit.org/show_bug.cgi?id=261764\n    return !inputEvent.inputType || inputEvent.inputType === \"insertParagraph\"\n  } else {\n    return false\n  }\n}\n", "export const defer = (fn) => setTimeout(fn, 1)\n", "/* eslint-disable\n    id-length,\n*/\nexport const copyObject = function(object = {}) {\n  const result = {}\n  for (const key in object) {\n    const value = object[key]\n    result[key] = value\n  }\n  return result\n}\n\nexport const objectsAreEqual = function(a = {}, b = {}) {\n  if (Object.keys(a).length !== Object.keys(b).length) {\n    return false\n  }\n  for (const key in a) {\n    const value = a[key]\n    if (value !== b[key]) {\n      return false\n    }\n  }\n  return true\n}\n", "import { copyObject, objectsAreEqual } from \"trix/core/helpers/objects\"\n\nexport const normalizeRange = function(range) {\n  if (range == null) return\n\n  if (!Array.isArray(range)) {\n    range = [ range, range ]\n  }\n  return [ copyValue(range[0]), copyValue(range[1] != null ? range[1] : range[0]) ]\n}\n\nexport const rangeIsCollapsed = function(range) {\n  if (range == null) return\n\n  const [ start, end ] = normalizeRange(range)\n  return rangeValuesAreEqual(start, end)\n}\n\nexport const rangesAreEqual = function(leftRange, rightRange) {\n  if (leftRange == null || rightRange == null) return\n\n  const [ leftStart, leftEnd ] = normalizeRange(leftRange)\n  const [ rightStart, rightEnd ] = normalizeRange(rightRange)\n  return rangeValuesAreEqual(leftStart, rightStart) && rangeValuesAreEqual(leftEnd, rightEnd)\n}\n\nconst copyValue = function(value) {\n  if (typeof value === \"number\") {\n    return value\n  } else {\n    return copyObject(value)\n  }\n}\n\nconst rangeValuesAreEqual = function(left, right) {\n  if (typeof left === \"number\") {\n    return left === right\n  } else {\n    return objectsAreEqual(left, right)\n  }\n}\n", "import BasicObject from \"trix/core/basic_object\"\n\nexport default class SelectionChangeObserver extends BasicObject {\n  constructor() {\n    super(...arguments)\n    this.update = this.update.bind(this)\n    this.selectionManagers = []\n  }\n\n  start() {\n    if (!this.started) {\n      this.started = true\n      document.addEventListener(\"selectionchange\", this.update, true)\n    }\n  }\n\n  stop() {\n    if (this.started) {\n      this.started = false\n      return document.removeEventListener(\"selectionchange\", this.update, true)\n    }\n  }\n\n  registerSelectionManager(selectionManager) {\n    if (!this.selectionManagers.includes(selectionManager)) {\n      this.selectionManagers.push(selectionManager)\n      return this.start()\n    }\n  }\n\n  unregisterSelectionManager(selectionManager) {\n    this.selectionManagers = this.selectionManagers.filter((sm) => sm !== selectionManager)\n    if (this.selectionManagers.length === 0) {\n      return this.stop()\n    }\n  }\n\n  notifySelectionManagersOfSelectionChange() {\n    return this.selectionManagers.map((selectionManager) => selectionManager.selectionDidChange())\n  }\n\n  update() {\n    this.notifySelectionManagersOfSelectionChange()\n  }\n\n  reset() {\n    this.update()\n  }\n}\n\nexport const selectionChangeObserver = new SelectionChangeObserver()\n\nexport const getDOMSelection = function() {\n  const selection = window.getSelection()\n  if (selection.rangeCount > 0) {\n    return selection\n  }\n}\n\nexport const getDOMRange = function() {\n  const domRange = getDOMSelection()?.getRangeAt(0)\n  if (domRange) {\n    if (!domRangeIsPrivate(domRange)) {\n      return domRange\n    }\n  }\n}\n\nexport const setDOMRange = function(domRange) {\n  const selection = window.getSelection()\n  selection.removeAllRanges()\n  selection.addRange(domRange)\n  return selectionChangeObserver.update()\n}\n\n// In Firefox, clicking certain <input> elements changes the selection to a\n// private element used to draw its UI. Attempting to access properties of those\n// elements throws an error.\n// https://bugzilla.mozilla.org/show_bug.cgi?id=208427\nconst domRangeIsPrivate = (domRange) => nodeIsPrivate(domRange.startContainer) || nodeIsPrivate(domRange.endContainer)\n\nconst nodeIsPrivate = (node) => !Object.getPrototypeOf(node)\n", "/* eslint-disable\n    id-length,\n    no-useless-escape,\n*/\nimport { NON_BREAKING_SPACE, ZERO_WIDTH_SPACE } from \"trix/constants\"\nimport UTF16String from \"trix/core/utilities/utf16_string\"\n\nexport const normalizeSpaces = (string) =>\n  string.replace(new RegExp(`${ZERO_WIDTH_SPACE}`, \"g\"), \"\").replace(new RegExp(`${NON_BREAKING_SPACE}`, \"g\"), \" \")\n\nexport const normalizeNewlines = (string) => string.replace(/\\r\\n?/g, \"\\n\")\n\nexport const breakableWhitespacePattern = new RegExp(`[^\\\\S${NON_BREAKING_SPACE}]`)\n\nexport const squishBreakableWhitespace = (string) =>\n  string\n    // Replace all breakable whitespace characters with a space\n    .replace(new RegExp(`${breakableWhitespacePattern.source}`, \"g\"), \" \")\n    // Replace two or more spaces with a single space\n    .replace(/\\ {2,}/g, \" \")\n\nexport const summarizeStringChange = function(oldString, newString) {\n  let added, removed\n  oldString = UTF16String.box(oldString)\n  newString = UTF16String.box(newString)\n\n  if (newString.length < oldString.length) {\n    [ removed, added ] = utf16StringDifferences(oldString, newString)\n  } else {\n    [ added, removed ] = utf16StringDifferences(newString, oldString)\n  }\n\n  return { added, removed }\n}\n\nconst utf16StringDifferences = function(a, b) {\n  if (a.isEqualTo(b)) {\n    return [ \"\", \"\" ]\n  }\n\n  const diffA = utf16StringDifference(a, b)\n  const { length } = diffA.utf16String\n\n  let diffB\n\n  if (length) {\n    const { offset } = diffA\n    const codepoints = a.codepoints.slice(0, offset).concat(a.codepoints.slice(offset + length))\n    diffB = utf16StringDifference(b, UTF16String.fromCodepoints(codepoints))\n  } else {\n    diffB = utf16StringDifference(b, a)\n  }\n\n  return [ diffA.utf16String.toString(), diffB.utf16String.toString() ]\n}\n\nconst utf16StringDifference = function(a, b) {\n  let leftIndex = 0\n  let rightIndexA = a.length\n  let rightIndexB = b.length\n\n  while (leftIndex < rightIndexA && a.charAt(leftIndex).isEqualTo(b.charAt(leftIndex))) {\n    leftIndex++\n  }\n\n  while (rightIndexA > leftIndex + 1 && a.charAt(rightIndexA - 1).isEqualTo(b.charAt(rightIndexB - 1))) {\n    rightIndexA--\n    rightIndexB--\n  }\n\n  return {\n    utf16String: a.slice(leftIndex, rightIndexA),\n    offset: leftIndex,\n  }\n}\n", "import TrixObject from \"trix/core/object\" // Don't override window.Object\nimport { arraysAreEqual } from \"trix/core/helpers\"\n\nexport default class Hash extends TrixObject {\n  static fromCommonAttributesOfObjects(objects = []) {\n    if (!objects.length) {\n      return new this()\n    }\n    let hash = box(objects[0])\n    let keys = hash.getKeys()\n\n    objects.slice(1).forEach((object) => {\n      keys = hash.getKeysCommonToHash(box(object))\n      hash = hash.slice(keys)\n    })\n\n    return hash\n  }\n\n  static box(values) {\n    return box(values)\n  }\n\n  constructor(values = {}) {\n    super(...arguments)\n    this.values = copy(values)\n  }\n\n  add(key, value) {\n    return this.merge(object(key, value))\n  }\n\n  remove(key) {\n    return new Hash(copy(this.values, key))\n  }\n\n  get(key) {\n    return this.values[key]\n  }\n\n  has(key) {\n    return key in this.values\n  }\n\n  merge(values) {\n    return new Hash(merge(this.values, unbox(values)))\n  }\n\n  slice(keys) {\n    const values = {}\n\n    Array.from(keys).forEach((key) => {\n      if (this.has(key)) {\n        values[key] = this.values[key]\n      }\n    })\n\n    return new Hash(values)\n  }\n\n  getKeys() {\n    return Object.keys(this.values)\n  }\n\n  getKeysCommonToHash(hash) {\n    hash = box(hash)\n    return this.getKeys().filter((key) => this.values[key] === hash.values[key])\n  }\n\n  isEqualTo(values) {\n    return arraysAreEqual(this.toArray(), box(values).toArray())\n  }\n\n  isEmpty() {\n    return this.getKeys().length === 0\n  }\n\n  toArray() {\n    if (!this.array) {\n      const result = []\n      for (const key in this.values) {\n        const value = this.values[key]\n        result.push(result.push(key, value))\n      }\n      this.array = result.slice(0)\n    }\n\n    return this.array\n  }\n\n  toObject() {\n    return copy(this.values)\n  }\n\n  toJSON() {\n    return this.toObject()\n  }\n\n  contentsForInspection() {\n    return { values: JSON.stringify(this.values) }\n  }\n}\n\nconst object = function(key, value) {\n  const result = {}\n  result[key] = value\n  return result\n}\n\nconst merge = function(object, values) {\n  const result = copy(object)\n  for (const key in values) {\n    const value = values[key]\n    result[key] = value\n  }\n  return result\n}\n\nconst copy = function(object, keyToRemove) {\n  const result = {}\n  const sortedKeys = Object.keys(object).sort()\n\n  sortedKeys.forEach((key) => {\n    if (key !== keyToRemove) {\n      result[key] = object[key]\n    }\n  })\n\n  return result\n}\n\nconst box = function(object) {\n  if (object instanceof Hash) {\n    return object\n  } else {\n    return new Hash(object)\n  }\n}\n\nconst unbox = function(object) {\n  if (object instanceof Hash) {\n    return object.values\n  } else {\n    return object\n  }\n}\n", "export default class ObjectGroup {\n  static groupObjects(ungroupedObjects = [], { depth, asTree } = {}) {\n    let group\n    if (asTree) {\n      if (depth == null) {\n        depth = 0\n      }\n    }\n    const objects = []\n\n    Array.from(ungroupedObjects).forEach((object) => {\n      if (group) {\n        if (object.canBeGrouped?.(depth) && group[group.length - 1].canBeGroupedWith?.(object, depth)) {\n          group.push(object)\n          return\n        } else {\n          objects.push(new this(group, { depth, asTree }))\n          group = null\n        }\n      }\n\n      if (object.canBeGrouped?.(depth)) {\n        group = [ object ]\n      } else {\n        objects.push(object)\n      }\n    })\n\n    if (group) {\n      objects.push(new this(group, { depth, asTree }))\n    }\n    return objects\n  }\n\n  constructor(objects = [], { depth, asTree }) {\n    this.objects = objects\n    if (asTree) {\n      this.depth = depth\n      this.objects = this.constructor.groupObjects(this.objects, { asTree, depth: this.depth + 1 })\n    }\n  }\n\n  getObjects() {\n    return this.objects\n  }\n\n  getDepth() {\n    return this.depth\n  }\n\n  getCacheKey() {\n    const keys = [ \"objectGroup\" ]\n    Array.from(this.getObjects()).forEach((object) => {\n      keys.push(object.getCacheKey())\n    })\n    return keys.join(\"/\")\n  }\n}\n", "import BasicObject from \"trix/core/basic_object\"\n\nexport default class ObjectMap extends BasicObject {\n  constructor(objects = []) {\n    super(...arguments)\n    this.objects = {}\n\n    Array.from(objects).forEach((object) => {\n      const hash = JSON.stringify(object)\n      if (this.objects[hash] == null) {\n        this.objects[hash] = object\n      }\n    })\n  }\n\n  find(object) {\n    const hash = JSON.stringify(object)\n    return this.objects[hash]\n  }\n}\n", "export default class ElementStore {\n  constructor(elements) {\n    this.reset(elements)\n  }\n\n  add(element) {\n    const key = getKey(element)\n    this.elements[key] = element\n  }\n\n  remove(element) {\n    const key = getKey(element)\n    const value = this.elements[key]\n    if (value) {\n      delete this.elements[key]\n      return value\n    }\n  }\n\n  reset(elements = []) {\n    this.elements = {}\n    Array.from(elements).forEach((element) => {\n      this.add(element)\n    })\n    return elements\n  }\n}\n\nconst getKey = (element) => element.dataset.trixStoreKey\n", "import BasicObject from \"trix/core/basic_object\"\n\nexport default class Operation extends BasicObject {\n  isPerforming() {\n    return this.performing === true\n  }\n\n  hasPerformed() {\n    return this.performed === true\n  }\n\n  hasSucceeded() {\n    return this.performed && this.succeeded\n  }\n\n  hasFailed() {\n    return this.performed && !this.succeeded\n  }\n\n  getPromise() {\n    if (!this.promise) {\n      this.promise = new Promise((resolve, reject) => {\n        this.performing = true\n        return this.perform((succeeded, result) => {\n          this.succeeded = succeeded\n          this.performing = false\n          this.performed = true\n\n          if (this.succeeded) {\n            resolve(result)\n          } else {\n            reject(result)\n          }\n        })\n      })\n    }\n\n    return this.promise\n  }\n\n  perform(callback) {\n    return callback(false)\n  }\n\n  release() {\n    this.promise?.cancel?.()\n    this.promise = null\n    this.performing = null\n    this.performed = null\n    this.succeeded = null\n  }\n}\n\nOperation.proxyMethod(\"getPromise().then\")\nOperation.proxyMethod(\"getPromise().catch\")\n", "import BasicObject from \"trix/core/basic_object\"\nimport ObjectGroup from \"trix/core/collections/object_group\"\n\nexport default class ObjectView extends BasicObject {\n  constructor(object, options = {}) {\n    super(...arguments)\n    this.object = object\n    this.options = options\n    this.childViews = []\n    this.rootView = this\n  }\n\n  getNodes() {\n    if (!this.nodes) { this.nodes = this.createNodes() }\n    return this.nodes.map((node) => node.cloneNode(true))\n  }\n\n  invalidate() {\n    this.nodes = null\n    this.childViews = []\n    return this.parentView?.invalidate()\n  }\n\n  invalidateViewForObject(object) {\n    return this.findViewForObject(object)?.invalidate()\n  }\n\n  findOrCreateCachedChildView(viewClass, object, options) {\n    let view = this.getCachedViewForObject(object)\n    if (view) {\n      this.recordChildView(view)\n    } else {\n      view = this.createChildView(...arguments)\n      this.cacheViewForObject(view, object)\n    }\n    return view\n  }\n\n  createChildView(viewClass, object, options = {}) {\n    if (object instanceof ObjectGroup) {\n      options.viewClass = viewClass\n      viewClass = ObjectGroupView\n    }\n\n    const view = new viewClass(object, options)\n    return this.recordChildView(view)\n  }\n\n  recordChildView(view) {\n    view.parentView = this\n    view.rootView = this.rootView\n    this.childViews.push(view)\n    return view\n  }\n\n  getAllChildViews() {\n    let views = []\n\n    this.childViews.forEach((childView) => {\n      views.push(childView)\n      views = views.concat(childView.getAllChildViews())\n    })\n\n    return views\n  }\n\n  findElement() {\n    return this.findElementForObject(this.object)\n  }\n\n  findElementForObject(object) {\n    const id = object?.id\n    if (id) {\n      return this.rootView.element.querySelector(`[data-trix-id='${id}']`)\n    }\n  }\n\n  findViewForObject(object) {\n    for (const view of this.getAllChildViews()) {\n      if (view.object === object) {\n        return view\n      }\n    }\n  }\n\n  getViewCache() {\n    if (this.rootView === this) {\n      if (this.isViewCachingEnabled()) {\n        if (!this.viewCache) { this.viewCache = {} }\n        return this.viewCache\n      }\n    } else {\n      return this.rootView.getViewCache()\n    }\n  }\n\n  isViewCachingEnabled() {\n    return this.shouldCacheViews !== false\n  }\n\n  enableViewCaching() {\n    this.shouldCacheViews = true\n  }\n\n  disableViewCaching() {\n    this.shouldCacheViews = false\n  }\n\n  getCachedViewForObject(object) {\n    return this.getViewCache()?.[object.getCacheKey()]\n  }\n\n  cacheViewForObject(view, object) {\n    const cache = this.getViewCache()\n    if (cache) {\n      cache[object.getCacheKey()] = view\n    }\n  }\n\n  garbageCollectCachedViews() {\n    const cache = this.getViewCache()\n    if (cache) {\n      const views = this.getAllChildViews().concat(this)\n      const objectKeys = views.map((view) => view.object.getCacheKey())\n      for (const key in cache) {\n        if (!objectKeys.includes(key)) {\n          delete cache[key]\n        }\n      }\n    }\n  }\n}\n\nexport class ObjectGroupView extends ObjectView {\n  constructor() {\n    super(...arguments)\n    this.objectGroup = this.object\n    this.viewClass = this.options.viewClass\n    delete this.options.viewClass\n  }\n\n  getChildViews() {\n    if (!this.childViews.length) {\n      Array.from(this.objectGroup.getObjects()).forEach((object) => {\n        this.findOrCreateCachedChildView(this.viewClass, object, this.options)\n      })\n    }\n    return this.childViews\n  }\n\n  createNodes() {\n    const element = this.createContainerElement()\n\n    this.getChildViews().forEach((view) => {\n      Array.from(view.getNodes()).forEach((node) => {\n        element.appendChild(node)\n      })\n    })\n\n    return [ element ]\n  }\n\n  createContainerElement(depth = this.objectGroup.getDepth()) {\n    return this.getChildViews()[0].createContainerElement(depth)\n  }\n}\n", "/*! @license DOMPurify 3.4.2 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.2/LICENSE */\n\nconst {\n  entries,\n  setPrototypeOf,\n  isFrozen,\n  getPrototypeOf,\n  getOwnPropertyDescriptor\n} = Object;\nlet {\n  freeze,\n  seal,\n  create\n} = Object; // eslint-disable-line import/no-mutable-exports\nlet {\n  apply,\n  construct\n} = typeof Reflect !== 'undefined' && Reflect;\nif (!freeze) {\n  freeze = function freeze(x) {\n    return x;\n  };\n}\nif (!seal) {\n  seal = function seal(x) {\n    return x;\n  };\n}\nif (!apply) {\n  apply = function apply(func, thisArg) {\n    for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n      args[_key - 2] = arguments[_key];\n    }\n    return func.apply(thisArg, args);\n  };\n}\nif (!construct) {\n  construct = function construct(Func) {\n    for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n      args[_key2 - 1] = arguments[_key2];\n    }\n    return new Func(...args);\n  };\n}\nconst arrayForEach = unapply(Array.prototype.forEach);\nconst arrayLastIndexOf = unapply(Array.prototype.lastIndexOf);\nconst arrayPop = unapply(Array.prototype.pop);\nconst arrayPush = unapply(Array.prototype.push);\nconst arraySplice = unapply(Array.prototype.splice);\nconst arrayIsArray = Array.isArray;\nconst stringToLowerCase = unapply(String.prototype.toLowerCase);\nconst stringToString = unapply(String.prototype.toString);\nconst stringMatch = unapply(String.prototype.match);\nconst stringReplace = unapply(String.prototype.replace);\nconst stringIndexOf = unapply(String.prototype.indexOf);\nconst stringTrim = unapply(String.prototype.trim);\nconst numberToString = unapply(Number.prototype.toString);\nconst booleanToString = unapply(Boolean.prototype.toString);\nconst bigintToString = typeof BigInt === 'undefined' ? null : unapply(BigInt.prototype.toString);\nconst symbolToString = typeof Symbol === 'undefined' ? null : unapply(Symbol.prototype.toString);\nconst objectHasOwnProperty = unapply(Object.prototype.hasOwnProperty);\nconst objectToString = unapply(Object.prototype.toString);\nconst regExpTest = unapply(RegExp.prototype.test);\nconst typeErrorCreate = unconstruct(TypeError);\n/**\n * Creates a new function that calls the given function with a specified thisArg and arguments.\n *\n * @param func - The function to be wrapped and called.\n * @returns A new function that calls the given function with a specified thisArg and arguments.\n */\nfunction unapply(func) {\n  return function (thisArg) {\n    if (thisArg instanceof RegExp) {\n      thisArg.lastIndex = 0;\n    }\n    for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {\n      args[_key3 - 1] = arguments[_key3];\n    }\n    return apply(func, thisArg, args);\n  };\n}\n/**\n * Creates a new function that constructs an instance of the given constructor function with the provided arguments.\n *\n * @param func - The constructor function to be wrapped and called.\n * @returns A new function that constructs an instance of the given constructor function with the provided arguments.\n */\nfunction unconstruct(Func) {\n  return function () {\n    for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n      args[_key4] = arguments[_key4];\n    }\n    return construct(Func, args);\n  };\n}\n/**\n * Add properties to a lookup table\n *\n * @param set - The set to which elements will be added.\n * @param array - The array containing elements to be added to the set.\n * @param transformCaseFunc - An optional function to transform the case of each element before adding to the set.\n * @returns The modified set with added elements.\n */\nfunction addToSet(set, array) {\n  let transformCaseFunc = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : stringToLowerCase;\n  if (setPrototypeOf) {\n    // Make 'in' and truthy checks like Boolean(set.constructor)\n    // independent of any properties defined on Object.prototype.\n    // Prevent prototype setters from intercepting set as a this value.\n    setPrototypeOf(set, null);\n  }\n  if (!arrayIsArray(array)) {\n    return set;\n  }\n  let l = array.length;\n  while (l--) {\n    let element = array[l];\n    if (typeof element === 'string') {\n      const lcElement = transformCaseFunc(element);\n      if (lcElement !== element) {\n        // Config presets (e.g. tags.js, attrs.js) are immutable.\n        if (!isFrozen(array)) {\n          array[l] = lcElement;\n        }\n        element = lcElement;\n      }\n    }\n    set[element] = true;\n  }\n  return set;\n}\n/**\n * Clean up an array to harden against CSPP\n *\n * @param array - The array to be cleaned.\n * @returns The cleaned version of the array\n */\nfunction cleanArray(array) {\n  for (let index = 0; index < array.length; index++) {\n    const isPropertyExist = objectHasOwnProperty(array, index);\n    if (!isPropertyExist) {\n      array[index] = null;\n    }\n  }\n  return array;\n}\n/**\n * Shallow clone an object\n *\n * @param object - The object to be cloned.\n * @returns A new object that copies the original.\n */\nfunction clone(object) {\n  const newObject = create(null);\n  for (const [property, value] of entries(object)) {\n    const isPropertyExist = objectHasOwnProperty(object, property);\n    if (isPropertyExist) {\n      if (arrayIsArray(value)) {\n        newObject[property] = cleanArray(value);\n      } else if (value && typeof value === 'object' && value.constructor === Object) {\n        newObject[property] = clone(value);\n      } else {\n        newObject[property] = value;\n      }\n    }\n  }\n  return newObject;\n}\n/**\n * Convert non-node values into strings without depending on direct property access.\n *\n * @param value - The value to stringify.\n * @returns A string representation of the provided value.\n */\nfunction stringifyValue(value) {\n  switch (typeof value) {\n    case 'string':\n      {\n        return value;\n      }\n    case 'number':\n      {\n        return numberToString(value);\n      }\n    case 'boolean':\n      {\n        return booleanToString(value);\n      }\n    case 'bigint':\n      {\n        return bigintToString ? bigintToString(value) : '0';\n      }\n    case 'symbol':\n      {\n        return symbolToString ? symbolToString(value) : 'Symbol()';\n      }\n    case 'undefined':\n      {\n        return objectToString(value);\n      }\n    case 'function':\n    case 'object':\n      {\n        if (value === null) {\n          return objectToString(value);\n        }\n        const valueAsRecord = value;\n        const valueToString = lookupGetter(valueAsRecord, 'toString');\n        if (typeof valueToString === 'function') {\n          const stringified = valueToString(valueAsRecord);\n          return typeof stringified === 'string' ? stringified : objectToString(stringified);\n        }\n        return objectToString(value);\n      }\n    default:\n      {\n        return objectToString(value);\n      }\n  }\n}\n/**\n * This method automatically checks if the prop is function or getter and behaves accordingly.\n *\n * @param object - The object to look up the getter function in its prototype chain.\n * @param prop - The property name for which to find the getter function.\n * @returns The getter function found in the prototype chain or a fallback function.\n */\nfunction lookupGetter(object, prop) {\n  while (object !== null) {\n    const desc = getOwnPropertyDescriptor(object, prop);\n    if (desc) {\n      if (desc.get) {\n        return unapply(desc.get);\n      }\n      if (typeof desc.value === 'function') {\n        return unapply(desc.value);\n      }\n    }\n    object = getPrototypeOf(object);\n  }\n  function fallbackValue() {\n    return null;\n  }\n  return fallbackValue;\n}\nfunction isRegex(value) {\n  try {\n    regExpTest(value, '');\n    return true;\n  } catch (_unused) {\n    return false;\n  }\n}\n\nconst html$1 = freeze(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'search', 'section', 'select', 'shadow', 'slot', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']);\nconst svg$1 = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'enterkeyhint', 'exportparts', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'inputmode', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'part', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']);\nconst svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feDropShadow', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']);\n// List of SVG elements that are disallowed by default.\n// We still need to know them so that we can do namespace\n// checks properly in case one wants to add them to\n// allow-list.\nconst svgDisallowed = freeze(['animate', 'color-profile', 'cursor', 'discard', 'font-face', 'font-face-format', 'font-face-name', 'font-face-src', 'font-face-uri', 'foreignobject', 'hatch', 'hatchpath', 'mesh', 'meshgradient', 'meshpatch', 'meshrow', 'missing-glyph', 'script', 'set', 'solidcolor', 'unknown', 'use']);\nconst mathMl$1 = freeze(['math', 'menclose', 'merror', 'mfenced', 'mfrac', 'mglyph', 'mi', 'mlabeledtr', 'mmultiscripts', 'mn', 'mo', 'mover', 'mpadded', 'mphantom', 'mroot', 'mrow', 'ms', 'mspace', 'msqrt', 'mstyle', 'msub', 'msup', 'msubsup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder', 'munderover', 'mprescripts']);\n// Similarly to SVG, we want to know all MathML elements,\n// even those that we disallow by default.\nconst mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']);\nconst text = freeze(['#text']);\n\nconst html = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'exportparts', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inert', 'inputmode', 'integrity', 'ismap', 'kind', 'label', 'lang', 'list', 'loading', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'minlength', 'multiple', 'muted', 'name', 'nonce', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'part', 'pattern', 'placeholder', 'playsinline', 'popover', 'popovertarget', 'popovertargetaction', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'slot', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'wrap', 'xmlns']);\nconst svg = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'amplitude', 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency', 'baseline-shift', 'begin', 'bias', 'by', 'class', 'clip', 'clippathunits', 'clip-path', 'clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cx', 'cy', 'd', 'dx', 'dy', 'diffuseconstant', 'direction', 'display', 'divisor', 'dur', 'edgemode', 'elevation', 'end', 'exponent', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'filterunits', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'glyphref', 'gradientunits', 'gradienttransform', 'height', 'href', 'id', 'image-rendering', 'in', 'in2', 'intercept', 'k', 'k1', 'k2', 'k3', 'k4', 'kerning', 'keypoints', 'keysplines', 'keytimes', 'lang', 'lengthadjust', 'letter-spacing', 'kernelmatrix', 'kernelunitlength', 'lighting-color', 'local', 'marker-end', 'marker-mid', 'marker-start', 'markerheight', 'markerunits', 'markerwidth', 'maskcontentunits', 'maskunits', 'max', 'mask', 'mask-type', 'media', 'method', 'mode', 'min', 'name', 'numoctaves', 'offset', 'operator', 'opacity', 'order', 'orient', 'orientation', 'origin', 'overflow', 'paint-order', 'path', 'pathlength', 'patterncontentunits', 'patterntransform', 'patternunits', 'points', 'preservealpha', 'preserveaspectratio', 'primitiveunits', 'r', 'rx', 'ry', 'radius', 'refx', 'refy', 'repeatcount', 'repeatdur', 'restart', 'result', 'rotate', 'scale', 'seed', 'shape-rendering', 'slope', 'specularconstant', 'specularexponent', 'spreadmethod', 'startoffset', 'stddeviation', 'stitchtiles', 'stop-color', 'stop-opacity', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke', 'stroke-width', 'style', 'surfacescale', 'systemlanguage', 'tabindex', 'tablevalues', 'targetx', 'targety', 'transform', 'transform-origin', 'text-anchor', 'text-decoration', 'text-rendering', 'textlength', 'type', 'u1', 'u2', 'unicode', 'values', 'viewbox', 'visibility', 'version', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'width', 'word-spacing', 'wrap', 'writing-mode', 'xchannelselector', 'ychannelselector', 'x', 'x1', 'x2', 'xmlns', 'y', 'y1', 'y2', 'z', 'zoomandpan']);\nconst mathMl = freeze(['accent', 'accentunder', 'align', 'bevelled', 'close', 'columnalign', 'columnlines', 'columnspacing', 'columnspan', 'denomalign', 'depth', 'dir', 'display', 'displaystyle', 'encoding', 'fence', 'frame', 'height', 'href', 'id', 'largeop', 'length', 'linethickness', 'lquote', 'lspace', 'mathbackground', 'mathcolor', 'mathsize', 'mathvariant', 'maxsize', 'minsize', 'movablelimits', 'notation', 'numalign', 'open', 'rowalign', 'rowlines', 'rowspacing', 'rowspan', 'rspace', 'rquote', 'scriptlevel', 'scriptminsize', 'scriptsizemultiplier', 'selection', 'separator', 'separators', 'stretchy', 'subscriptshift', 'supscriptshift', 'symmetric', 'voffset', 'width', 'xmlns']);\nconst xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']);\n\n// eslint-disable-next-line unicorn/better-regex\nconst MUSTACHE_EXPR = seal(/\\{\\{[\\w\\W]*|[\\w\\W]*\\}\\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode\nconst ERB_EXPR = seal(/<%[\\w\\W]*|[\\w\\W]*%>/gm);\nconst TMPLIT_EXPR = seal(/\\$\\{[\\w\\W]*/gm); // eslint-disable-line unicorn/better-regex\nconst DATA_ATTR = seal(/^data-[\\-\\w.\\u00B7-\\uFFFF]+$/); // eslint-disable-line no-useless-escape\nconst ARIA_ATTR = seal(/^aria-[\\-\\w]+$/); // eslint-disable-line no-useless-escape\nconst IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\\-]+(?:[^a-z+.\\-:]|$))/i // eslint-disable-line no-useless-escape\n);\nconst IS_SCRIPT_OR_DATA = seal(/^(?:\\w+script|data):/i);\nconst ATTR_WHITESPACE = seal(/[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205F\\u3000]/g // eslint-disable-line no-control-regex\n);\nconst DOCTYPE_NAME = seal(/^html$/i);\nconst CUSTOM_ELEMENT = seal(/^[a-z][.\\w]*(-[.\\w]+)+$/i);\n\nvar EXPRESSIONS = /*#__PURE__*/Object.freeze({\n    __proto__: null,\n    ARIA_ATTR: ARIA_ATTR,\n    ATTR_WHITESPACE: ATTR_WHITESPACE,\n    CUSTOM_ELEMENT: CUSTOM_ELEMENT,\n    DATA_ATTR: DATA_ATTR,\n    DOCTYPE_NAME: DOCTYPE_NAME,\n    ERB_EXPR: ERB_EXPR,\n    IS_ALLOWED_URI: IS_ALLOWED_URI,\n    IS_SCRIPT_OR_DATA: IS_SCRIPT_OR_DATA,\n    MUSTACHE_EXPR: MUSTACHE_EXPR,\n    TMPLIT_EXPR: TMPLIT_EXPR\n});\n\n/* eslint-disable @typescript-eslint/indent */\n// https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType\nconst NODE_TYPE = {\n  element: 1,\n  text: 3,\n  // Deprecated\n  progressingInstruction: 7,\n  comment: 8,\n  document: 9};\nconst getGlobal = function getGlobal() {\n  return typeof window === 'undefined' ? null : window;\n};\n/**\n * Creates a no-op policy for internal use only.\n * Don't export this function outside this module!\n * @param trustedTypes The policy factory.\n * @param purifyHostElement The Script element used to load DOMPurify (to determine policy name suffix).\n * @return The policy created (or null, if Trusted Types\n * are not supported or creating the policy failed).\n */\nconst _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, purifyHostElement) {\n  if (typeof trustedTypes !== 'object' || typeof trustedTypes.createPolicy !== 'function') {\n    return null;\n  }\n  // Allow the callers to control the unique policy name\n  // by adding a data-tt-policy-suffix to the script element with the DOMPurify.\n  // Policy creation with duplicate names throws in Trusted Types.\n  let suffix = null;\n  const ATTR_NAME = 'data-tt-policy-suffix';\n  if (purifyHostElement && purifyHostElement.hasAttribute(ATTR_NAME)) {\n    suffix = purifyHostElement.getAttribute(ATTR_NAME);\n  }\n  const policyName = 'dompurify' + (suffix ? '#' + suffix : '');\n  try {\n    return trustedTypes.createPolicy(policyName, {\n      createHTML(html) {\n        return html;\n      },\n      createScriptURL(scriptUrl) {\n        return scriptUrl;\n      }\n    });\n  } catch (_) {\n    // Policy creation failed (most likely another DOMPurify script has\n    // already run). Skip creating the policy, as this will only cause errors\n    // if TT are enforced.\n    console.warn('TrustedTypes policy ' + policyName + ' could not be created.');\n    return null;\n  }\n};\nconst _createHooksMap = function _createHooksMap() {\n  return {\n    afterSanitizeAttributes: [],\n    afterSanitizeElements: [],\n    afterSanitizeShadowDOM: [],\n    beforeSanitizeAttributes: [],\n    beforeSanitizeElements: [],\n    beforeSanitizeShadowDOM: [],\n    uponSanitizeAttribute: [],\n    uponSanitizeElement: [],\n    uponSanitizeShadowNode: []\n  };\n};\nfunction createDOMPurify() {\n  let window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();\n  const DOMPurify = root => createDOMPurify(root);\n  DOMPurify.version = '3.4.2';\n  DOMPurify.removed = [];\n  if (!window || !window.document || window.document.nodeType !== NODE_TYPE.document || !window.Element) {\n    // Not running in a browser, provide a factory function\n    // so that you can pass your own Window\n    DOMPurify.isSupported = false;\n    return DOMPurify;\n  }\n  let {\n    document\n  } = window;\n  const originalDocument = document;\n  const currentScript = originalDocument.currentScript;\n  const {\n    DocumentFragment,\n    HTMLTemplateElement,\n    Node,\n    Element,\n    NodeFilter,\n    NamedNodeMap = window.NamedNodeMap || window.MozNamedAttrMap,\n    HTMLFormElement,\n    DOMParser,\n    trustedTypes\n  } = window;\n  const ElementPrototype = Element.prototype;\n  const cloneNode = lookupGetter(ElementPrototype, 'cloneNode');\n  const remove = lookupGetter(ElementPrototype, 'remove');\n  const getNextSibling = lookupGetter(ElementPrototype, 'nextSibling');\n  const getChildNodes = lookupGetter(ElementPrototype, 'childNodes');\n  const getParentNode = lookupGetter(ElementPrototype, 'parentNode');\n  // As per issue #47, the web-components registry is inherited by a\n  // new document created via createHTMLDocument. As per the spec\n  // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)\n  // a new empty registry is used when creating a template contents owner\n  // document, so we use that as our parent document to ensure nothing\n  // is inherited.\n  if (typeof HTMLTemplateElement === 'function') {\n    const template = document.createElement('template');\n    if (template.content && template.content.ownerDocument) {\n      document = template.content.ownerDocument;\n    }\n  }\n  let trustedTypesPolicy;\n  let emptyHTML = '';\n  const {\n    implementation,\n    createNodeIterator,\n    createDocumentFragment,\n    getElementsByTagName\n  } = document;\n  const {\n    importNode\n  } = originalDocument;\n  let hooks = _createHooksMap();\n  /**\n   * Expose whether this browser supports running the full DOMPurify.\n   */\n  DOMPurify.isSupported = typeof entries === 'function' && typeof getParentNode === 'function' && implementation && implementation.createHTMLDocument !== undefined;\n  const {\n    MUSTACHE_EXPR,\n    ERB_EXPR,\n    TMPLIT_EXPR,\n    DATA_ATTR,\n    ARIA_ATTR,\n    IS_SCRIPT_OR_DATA,\n    ATTR_WHITESPACE,\n    CUSTOM_ELEMENT\n  } = EXPRESSIONS;\n  let {\n    IS_ALLOWED_URI: IS_ALLOWED_URI$1\n  } = EXPRESSIONS;\n  /**\n   * We consider the elements and attributes below to be safe. Ideally\n   * don't add any new ones but feel free to remove unwanted ones.\n   */\n  /* allowed element names */\n  let ALLOWED_TAGS = null;\n  const DEFAULT_ALLOWED_TAGS = addToSet({}, [...html$1, ...svg$1, ...svgFilters, ...mathMl$1, ...text]);\n  /* Allowed attribute names */\n  let ALLOWED_ATTR = null;\n  const DEFAULT_ALLOWED_ATTR = addToSet({}, [...html, ...svg, ...mathMl, ...xml]);\n  /*\n   * Configure how DOMPurify should handle custom elements and their attributes as well as customized built-in elements.\n   * @property {RegExp|Function|null} tagNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any custom elements)\n   * @property {RegExp|Function|null} attributeNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any attributes not on the allow list)\n   * @property {boolean} allowCustomizedBuiltInElements allow custom elements derived from built-ins if they pass CUSTOM_ELEMENT_HANDLING.tagNameCheck. Default: `false`.\n   */\n  let CUSTOM_ELEMENT_HANDLING = Object.seal(create(null, {\n    tagNameCheck: {\n      writable: true,\n      configurable: false,\n      enumerable: true,\n      value: null\n    },\n    attributeNameCheck: {\n      writable: true,\n      configurable: false,\n      enumerable: true,\n      value: null\n    },\n    allowCustomizedBuiltInElements: {\n      writable: true,\n      configurable: false,\n      enumerable: true,\n      value: false\n    }\n  }));\n  /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */\n  let FORBID_TAGS = null;\n  /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */\n  let FORBID_ATTR = null;\n  /* Config object to store ADD_TAGS/ADD_ATTR functions (when used as functions) */\n  const EXTRA_ELEMENT_HANDLING = Object.seal(create(null, {\n    tagCheck: {\n      writable: true,\n      configurable: false,\n      enumerable: true,\n      value: null\n    },\n    attributeCheck: {\n      writable: true,\n      configurable: false,\n      enumerable: true,\n      value: null\n    }\n  }));\n  /* Decide if ARIA attributes are okay */\n  let ALLOW_ARIA_ATTR = true;\n  /* Decide if custom data attributes are okay */\n  let ALLOW_DATA_ATTR = true;\n  /* Decide if unknown protocols are okay */\n  let ALLOW_UNKNOWN_PROTOCOLS = false;\n  /* Decide if self-closing tags in attributes are allowed.\n   * Usually removed due to a mXSS issue in jQuery 3.0 */\n  let ALLOW_SELF_CLOSE_IN_ATTR = true;\n  /* Output should be safe for common template engines.\n   * This means, DOMPurify removes data attributes, mustaches and ERB\n   */\n  let SAFE_FOR_TEMPLATES = false;\n  /* Output should be safe even for XML used within HTML and alike.\n   * This means, DOMPurify removes comments when containing risky content.\n   */\n  let SAFE_FOR_XML = true;\n  /* Decide if document with <html>... should be returned */\n  let WHOLE_DOCUMENT = false;\n  /* Track whether config is already set on this instance of DOMPurify. */\n  let SET_CONFIG = false;\n  /* Decide if all elements (e.g. style, script) must be children of\n   * document.body. By default, browsers might move them to document.head */\n  let FORCE_BODY = false;\n  /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html\n   * string (or a TrustedHTML object if Trusted Types are supported).\n   * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead\n   */\n  let RETURN_DOM = false;\n  /* Decide if a DOM `DocumentFragment` should be returned, instead of a html\n   * string  (or a TrustedHTML object if Trusted Types are supported) */\n  let RETURN_DOM_FRAGMENT = false;\n  /* Try to return a Trusted Type object instead of a string, return a string in\n   * case Trusted Types are not supported  */\n  let RETURN_TRUSTED_TYPE = false;\n  /* Output should be free from DOM clobbering attacks?\n   * This sanitizes markups named with colliding, clobberable built-in DOM APIs.\n   */\n  let SANITIZE_DOM = true;\n  /* Achieve full DOM Clobbering protection by isolating the namespace of named\n   * properties and JS variables, mitigating attacks that abuse the HTML/DOM spec rules.\n   *\n   * HTML/DOM spec rules that enable DOM Clobbering:\n   *   - Named Access on Window (§7.3.3)\n   *   - DOM Tree Accessors (§3.1.5)\n   *   - Form Element Parent-Child Relations (§4.10.3)\n   *   - Iframe srcdoc / Nested WindowProxies (§4.8.5)\n   *   - HTMLCollection (§4.2.10.2)\n   *\n   * Namespace isolation is implemented by prefixing `id` and `name` attributes\n   * with a constant string, i.e., `user-content-`\n   */\n  let SANITIZE_NAMED_PROPS = false;\n  const SANITIZE_NAMED_PROPS_PREFIX = 'user-content-';\n  /* Keep element content when removing element? */\n  let KEEP_CONTENT = true;\n  /* If a `Node` is passed to sanitize(), then performs sanitization in-place instead\n   * of importing it into a new Document and returning a sanitized copy */\n  let IN_PLACE = false;\n  /* Allow usage of profiles like html, svg and mathMl */\n  let USE_PROFILES = {};\n  /* Tags to ignore content of when KEEP_CONTENT is true */\n  let FORBID_CONTENTS = null;\n  const DEFAULT_FORBID_CONTENTS = addToSet({}, ['annotation-xml', 'audio', 'colgroup', 'desc', 'foreignobject', 'head', 'iframe', 'math', 'mi', 'mn', 'mo', 'ms', 'mtext', 'noembed', 'noframes', 'noscript', 'plaintext', 'script', 'style', 'svg', 'template', 'thead', 'title', 'video', 'xmp']);\n  /* Tags that are safe for data: URIs */\n  let DATA_URI_TAGS = null;\n  const DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']);\n  /* Attributes safe for values like \"javascript:\" */\n  let URI_SAFE_ATTRIBUTES = null;\n  const DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'role', 'summary', 'title', 'value', 'style', 'xmlns']);\n  const MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';\n  const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\n  const HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\n  /* Document namespace */\n  let NAMESPACE = HTML_NAMESPACE;\n  let IS_EMPTY_INPUT = false;\n  /* Allowed XHTML+XML namespaces */\n  let ALLOWED_NAMESPACES = null;\n  const DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [MATHML_NAMESPACE, SVG_NAMESPACE, HTML_NAMESPACE], stringToString);\n  let MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ['mi', 'mo', 'mn', 'ms', 'mtext']);\n  let HTML_INTEGRATION_POINTS = addToSet({}, ['annotation-xml']);\n  // Certain elements are allowed in both SVG and HTML\n  // namespace. We need to specify them explicitly\n  // so that they don't get erroneously deleted from\n  // HTML namespace.\n  const COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, ['title', 'style', 'font', 'a', 'script']);\n  /* Parsing of strict XHTML documents */\n  let PARSER_MEDIA_TYPE = null;\n  const SUPPORTED_PARSER_MEDIA_TYPES = ['application/xhtml+xml', 'text/html'];\n  const DEFAULT_PARSER_MEDIA_TYPE = 'text/html';\n  let transformCaseFunc = null;\n  /* Keep a reference to config to pass to hooks */\n  let CONFIG = null;\n  /* Ideally, do not touch anything below this line */\n  /* ______________________________________________ */\n  const formElement = document.createElement('form');\n  const isRegexOrFunction = function isRegexOrFunction(testValue) {\n    return testValue instanceof RegExp || testValue instanceof Function;\n  };\n  /**\n   * _parseConfig\n   *\n   * @param cfg optional config literal\n   */\n  // eslint-disable-next-line complexity\n  const _parseConfig = function _parseConfig() {\n    let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n    if (CONFIG && CONFIG === cfg) {\n      return;\n    }\n    /* Shield configuration object from tampering */\n    if (!cfg || typeof cfg !== 'object') {\n      cfg = {};\n    }\n    /* Shield configuration object from prototype pollution */\n    cfg = clone(cfg);\n    PARSER_MEDIA_TYPE =\n    // eslint-disable-next-line unicorn/prefer-includes\n    SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? DEFAULT_PARSER_MEDIA_TYPE : cfg.PARSER_MEDIA_TYPE;\n    // HTML tags and attributes are not case-sensitive, converting to lowercase. Keeping XHTML as is.\n    transformCaseFunc = PARSER_MEDIA_TYPE === 'application/xhtml+xml' ? stringToString : stringToLowerCase;\n    /* Set configuration parameters */\n    ALLOWED_TAGS = objectHasOwnProperty(cfg, 'ALLOWED_TAGS') && arrayIsArray(cfg.ALLOWED_TAGS) ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;\n    ALLOWED_ATTR = objectHasOwnProperty(cfg, 'ALLOWED_ATTR') && arrayIsArray(cfg.ALLOWED_ATTR) ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;\n    ALLOWED_NAMESPACES = objectHasOwnProperty(cfg, 'ALLOWED_NAMESPACES') && arrayIsArray(cfg.ALLOWED_NAMESPACES) ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES;\n    URI_SAFE_ATTRIBUTES = objectHasOwnProperty(cfg, 'ADD_URI_SAFE_ATTR') && arrayIsArray(cfg.ADD_URI_SAFE_ATTR) ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), cfg.ADD_URI_SAFE_ATTR, transformCaseFunc) : DEFAULT_URI_SAFE_ATTRIBUTES;\n    DATA_URI_TAGS = objectHasOwnProperty(cfg, 'ADD_DATA_URI_TAGS') && arrayIsArray(cfg.ADD_DATA_URI_TAGS) ? addToSet(clone(DEFAULT_DATA_URI_TAGS), cfg.ADD_DATA_URI_TAGS, transformCaseFunc) : DEFAULT_DATA_URI_TAGS;\n    FORBID_CONTENTS = objectHasOwnProperty(cfg, 'FORBID_CONTENTS') && arrayIsArray(cfg.FORBID_CONTENTS) ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;\n    FORBID_TAGS = objectHasOwnProperty(cfg, 'FORBID_TAGS') && arrayIsArray(cfg.FORBID_TAGS) ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : clone({});\n    FORBID_ATTR = objectHasOwnProperty(cfg, 'FORBID_ATTR') && arrayIsArray(cfg.FORBID_ATTR) ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : clone({});\n    USE_PROFILES = objectHasOwnProperty(cfg, 'USE_PROFILES') ? cfg.USE_PROFILES && typeof cfg.USE_PROFILES === 'object' ? clone(cfg.USE_PROFILES) : cfg.USE_PROFILES : false;\n    ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true\n    ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true\n    ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false\n    ALLOW_SELF_CLOSE_IN_ATTR = cfg.ALLOW_SELF_CLOSE_IN_ATTR !== false; // Default true\n    SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false\n    SAFE_FOR_XML = cfg.SAFE_FOR_XML !== false; // Default true\n    WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false\n    RETURN_DOM = cfg.RETURN_DOM || false; // Default false\n    RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false\n    RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false\n    FORCE_BODY = cfg.FORCE_BODY || false; // Default false\n    SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true\n    SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false; // Default false\n    KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true\n    IN_PLACE = cfg.IN_PLACE || false; // Default false\n    IS_ALLOWED_URI$1 = isRegex(cfg.ALLOWED_URI_REGEXP) ? cfg.ALLOWED_URI_REGEXP : IS_ALLOWED_URI; // Default regexp\n    NAMESPACE = typeof cfg.NAMESPACE === 'string' ? cfg.NAMESPACE : HTML_NAMESPACE; // Default HTML namespace\n    MATHML_TEXT_INTEGRATION_POINTS = objectHasOwnProperty(cfg, 'MATHML_TEXT_INTEGRATION_POINTS') && cfg.MATHML_TEXT_INTEGRATION_POINTS && typeof cfg.MATHML_TEXT_INTEGRATION_POINTS === 'object' ? clone(cfg.MATHML_TEXT_INTEGRATION_POINTS) : addToSet({}, ['mi', 'mo', 'mn', 'ms', 'mtext']); // Default built-in map\n    HTML_INTEGRATION_POINTS = objectHasOwnProperty(cfg, 'HTML_INTEGRATION_POINTS') && cfg.HTML_INTEGRATION_POINTS && typeof cfg.HTML_INTEGRATION_POINTS === 'object' ? clone(cfg.HTML_INTEGRATION_POINTS) : addToSet({}, ['annotation-xml']); // Default built-in map\n    const customElementHandling = objectHasOwnProperty(cfg, 'CUSTOM_ELEMENT_HANDLING') && cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING === 'object' ? clone(cfg.CUSTOM_ELEMENT_HANDLING) : create(null);\n    CUSTOM_ELEMENT_HANDLING = create(null);\n    if (objectHasOwnProperty(customElementHandling, 'tagNameCheck') && isRegexOrFunction(customElementHandling.tagNameCheck)) {\n      CUSTOM_ELEMENT_HANDLING.tagNameCheck = customElementHandling.tagNameCheck; // Default undefined\n    }\n    if (objectHasOwnProperty(customElementHandling, 'attributeNameCheck') && isRegexOrFunction(customElementHandling.attributeNameCheck)) {\n      CUSTOM_ELEMENT_HANDLING.attributeNameCheck = customElementHandling.attributeNameCheck; // Default undefined\n    }\n    if (objectHasOwnProperty(customElementHandling, 'allowCustomizedBuiltInElements') && typeof customElementHandling.allowCustomizedBuiltInElements === 'boolean') {\n      CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = customElementHandling.allowCustomizedBuiltInElements; // Default undefined\n    }\n    if (SAFE_FOR_TEMPLATES) {\n      ALLOW_DATA_ATTR = false;\n    }\n    if (RETURN_DOM_FRAGMENT) {\n      RETURN_DOM = true;\n    }\n    /* Parse profile info */\n    if (USE_PROFILES) {\n      ALLOWED_TAGS = addToSet({}, text);\n      ALLOWED_ATTR = create(null);\n      if (USE_PROFILES.html === true) {\n        addToSet(ALLOWED_TAGS, html$1);\n        addToSet(ALLOWED_ATTR, html);\n      }\n      if (USE_PROFILES.svg === true) {\n        addToSet(ALLOWED_TAGS, svg$1);\n        addToSet(ALLOWED_ATTR, svg);\n        addToSet(ALLOWED_ATTR, xml);\n      }\n      if (USE_PROFILES.svgFilters === true) {\n        addToSet(ALLOWED_TAGS, svgFilters);\n        addToSet(ALLOWED_ATTR, svg);\n        addToSet(ALLOWED_ATTR, xml);\n      }\n      if (USE_PROFILES.mathMl === true) {\n        addToSet(ALLOWED_TAGS, mathMl$1);\n        addToSet(ALLOWED_ATTR, mathMl);\n        addToSet(ALLOWED_ATTR, xml);\n      }\n    }\n    /* Always reset function-based ADD_TAGS / ADD_ATTR checks to prevent\n     * leaking across calls when switching from function to array config */\n    EXTRA_ELEMENT_HANDLING.tagCheck = null;\n    EXTRA_ELEMENT_HANDLING.attributeCheck = null;\n    /* Merge configuration parameters */\n    if (objectHasOwnProperty(cfg, 'ADD_TAGS')) {\n      if (typeof cfg.ADD_TAGS === 'function') {\n        EXTRA_ELEMENT_HANDLING.tagCheck = cfg.ADD_TAGS;\n      } else if (arrayIsArray(cfg.ADD_TAGS)) {\n        if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {\n          ALLOWED_TAGS = clone(ALLOWED_TAGS);\n        }\n        addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);\n      }\n    }\n    if (objectHasOwnProperty(cfg, 'ADD_ATTR')) {\n      if (typeof cfg.ADD_ATTR === 'function') {\n        EXTRA_ELEMENT_HANDLING.attributeCheck = cfg.ADD_ATTR;\n      } else if (arrayIsArray(cfg.ADD_ATTR)) {\n        if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {\n          ALLOWED_ATTR = clone(ALLOWED_ATTR);\n        }\n        addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);\n      }\n    }\n    if (objectHasOwnProperty(cfg, 'ADD_URI_SAFE_ATTR') && arrayIsArray(cfg.ADD_URI_SAFE_ATTR)) {\n      addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);\n    }\n    if (objectHasOwnProperty(cfg, 'FORBID_CONTENTS') && arrayIsArray(cfg.FORBID_CONTENTS)) {\n      if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {\n        FORBID_CONTENTS = clone(FORBID_CONTENTS);\n      }\n      addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);\n    }\n    if (objectHasOwnProperty(cfg, 'ADD_FORBID_CONTENTS') && arrayIsArray(cfg.ADD_FORBID_CONTENTS)) {\n      if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {\n        FORBID_CONTENTS = clone(FORBID_CONTENTS);\n      }\n      addToSet(FORBID_CONTENTS, cfg.ADD_FORBID_CONTENTS, transformCaseFunc);\n    }\n    /* Add #text in case KEEP_CONTENT is set to true */\n    if (KEEP_CONTENT) {\n      ALLOWED_TAGS['#text'] = true;\n    }\n    /* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */\n    if (WHOLE_DOCUMENT) {\n      addToSet(ALLOWED_TAGS, ['html', 'head', 'body']);\n    }\n    /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */\n    if (ALLOWED_TAGS.table) {\n      addToSet(ALLOWED_TAGS, ['tbody']);\n      delete FORBID_TAGS.tbody;\n    }\n    if (cfg.TRUSTED_TYPES_POLICY) {\n      if (typeof cfg.TRUSTED_TYPES_POLICY.createHTML !== 'function') {\n        throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.');\n      }\n      if (typeof cfg.TRUSTED_TYPES_POLICY.createScriptURL !== 'function') {\n        throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.');\n      }\n      // Overwrite existing TrustedTypes policy.\n      trustedTypesPolicy = cfg.TRUSTED_TYPES_POLICY;\n      // Sign local variables required by `sanitize`.\n      emptyHTML = trustedTypesPolicy.createHTML('');\n    } else {\n      // Uninitialized policy, attempt to initialize the internal dompurify policy.\n      if (trustedTypesPolicy === undefined) {\n        trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, currentScript);\n      }\n      // If creating the internal policy succeeded sign internal variables.\n      if (trustedTypesPolicy !== null && typeof emptyHTML === 'string') {\n        emptyHTML = trustedTypesPolicy.createHTML('');\n      }\n    }\n    // Prevent further manipulation of configuration.\n    // Not available in IE8, Safari 5, etc.\n    if (freeze) {\n      freeze(cfg);\n    }\n    CONFIG = cfg;\n  };\n  /* Keep track of all possible SVG and MathML tags\n   * so that we can perform the namespace checks\n   * correctly. */\n  const ALL_SVG_TAGS = addToSet({}, [...svg$1, ...svgFilters, ...svgDisallowed]);\n  const ALL_MATHML_TAGS = addToSet({}, [...mathMl$1, ...mathMlDisallowed]);\n  /**\n   * @param element a DOM element whose namespace is being checked\n   * @returns Return false if the element has a\n   *  namespace that a spec-compliant parser would never\n   *  return. Return true otherwise.\n   */\n  const _checkValidNamespace = function _checkValidNamespace(element) {\n    let parent = getParentNode(element);\n    // In JSDOM, if we're inside shadow DOM, then parentNode\n    // can be null. We just simulate parent in this case.\n    if (!parent || !parent.tagName) {\n      parent = {\n        namespaceURI: NAMESPACE,\n        tagName: 'template'\n      };\n    }\n    const tagName = stringToLowerCase(element.tagName);\n    const parentTagName = stringToLowerCase(parent.tagName);\n    if (!ALLOWED_NAMESPACES[element.namespaceURI]) {\n      return false;\n    }\n    if (element.namespaceURI === SVG_NAMESPACE) {\n      // The only way to switch from HTML namespace to SVG\n      // is via <svg>. If it happens via any other tag, then\n      // it should be killed.\n      if (parent.namespaceURI === HTML_NAMESPACE) {\n        return tagName === 'svg';\n      }\n      // The only way to switch from MathML to SVG is via`\n      // svg if parent is either <annotation-xml> or MathML\n      // text integration points.\n      if (parent.namespaceURI === MATHML_NAMESPACE) {\n        return tagName === 'svg' && (parentTagName === 'annotation-xml' || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);\n      }\n      // We only allow elements that are defined in SVG\n      // spec. All others are disallowed in SVG namespace.\n      return Boolean(ALL_SVG_TAGS[tagName]);\n    }\n    if (element.namespaceURI === MATHML_NAMESPACE) {\n      // The only way to switch from HTML namespace to MathML\n      // is via <math>. If it happens via any other tag, then\n      // it should be killed.\n      if (parent.namespaceURI === HTML_NAMESPACE) {\n        return tagName === 'math';\n      }\n      // The only way to switch from SVG to MathML is via\n      // <math> and HTML integration points\n      if (parent.namespaceURI === SVG_NAMESPACE) {\n        return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName];\n      }\n      // We only allow elements that are defined in MathML\n      // spec. All others are disallowed in MathML namespace.\n      return Boolean(ALL_MATHML_TAGS[tagName]);\n    }\n    if (element.namespaceURI === HTML_NAMESPACE) {\n      // The only way to switch from SVG to HTML is via\n      // HTML integration points, and from MathML to HTML\n      // is via MathML text integration points\n      if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) {\n        return false;\n      }\n      if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) {\n        return false;\n      }\n      // We disallow tags that are specific for MathML\n      // or SVG and should never appear in HTML namespace\n      return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);\n    }\n    // For XHTML and XML documents that support custom namespaces\n    if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && ALLOWED_NAMESPACES[element.namespaceURI]) {\n      return true;\n    }\n    // The code should never reach this place (this means\n    // that the element somehow got namespace that is not\n    // HTML, SVG, MathML or allowed via ALLOWED_NAMESPACES).\n    // Return false just in case.\n    return false;\n  };\n  /**\n   * _forceRemove\n   *\n   * @param node a DOM node\n   */\n  const _forceRemove = function _forceRemove(node) {\n    arrayPush(DOMPurify.removed, {\n      element: node\n    });\n    try {\n      // eslint-disable-next-line unicorn/prefer-dom-node-remove\n      getParentNode(node).removeChild(node);\n    } catch (_) {\n      remove(node);\n    }\n  };\n  /**\n   * _removeAttribute\n   *\n   * @param name an Attribute name\n   * @param element a DOM node\n   */\n  const _removeAttribute = function _removeAttribute(name, element) {\n    try {\n      arrayPush(DOMPurify.removed, {\n        attribute: element.getAttributeNode(name),\n        from: element\n      });\n    } catch (_) {\n      arrayPush(DOMPurify.removed, {\n        attribute: null,\n        from: element\n      });\n    }\n    element.removeAttribute(name);\n    // We void attribute values for unremovable \"is\" attributes\n    if (name === 'is') {\n      if (RETURN_DOM || RETURN_DOM_FRAGMENT) {\n        try {\n          _forceRemove(element);\n        } catch (_) {}\n      } else {\n        try {\n          element.setAttribute(name, '');\n        } catch (_) {}\n      }\n    }\n  };\n  /**\n   * _initDocument\n   *\n   * @param dirty - a string of dirty markup\n   * @return a DOM, filled with the dirty markup\n   */\n  const _initDocument = function _initDocument(dirty) {\n    /* Create a HTML document */\n    let doc = null;\n    let leadingWhitespace = null;\n    if (FORCE_BODY) {\n      dirty = '<remove></remove>' + dirty;\n    } else {\n      /* If FORCE_BODY isn't used, leading whitespace needs to be preserved manually */\n      const matches = stringMatch(dirty, /^[\\r\\n\\t ]+/);\n      leadingWhitespace = matches && matches[0];\n    }\n    if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && NAMESPACE === HTML_NAMESPACE) {\n      // Root of XHTML doc must contain xmlns declaration (see https://www.w3.org/TR/xhtml1/normative.html#strict)\n      dirty = '<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>' + dirty + '</body></html>';\n    }\n    const dirtyPayload = trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty;\n    /*\n     * Use the DOMParser API by default, fallback later if needs be\n     * DOMParser not work for svg when has multiple root element.\n     */\n    if (NAMESPACE === HTML_NAMESPACE) {\n      try {\n        doc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);\n      } catch (_) {}\n    }\n    /* Use createHTMLDocument in case DOMParser is not available */\n    if (!doc || !doc.documentElement) {\n      doc = implementation.createDocument(NAMESPACE, 'template', null);\n      try {\n        doc.documentElement.innerHTML = IS_EMPTY_INPUT ? emptyHTML : dirtyPayload;\n      } catch (_) {\n        // Syntax error if dirtyPayload is invalid xml\n      }\n    }\n    const body = doc.body || doc.documentElement;\n    if (dirty && leadingWhitespace) {\n      body.insertBefore(document.createTextNode(leadingWhitespace), body.childNodes[0] || null);\n    }\n    /* Work on whole document or just its body */\n    if (NAMESPACE === HTML_NAMESPACE) {\n      return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? 'html' : 'body')[0];\n    }\n    return WHOLE_DOCUMENT ? doc.documentElement : body;\n  };\n  /**\n   * Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.\n   *\n   * @param root The root element or node to start traversing on.\n   * @return The created NodeIterator\n   */\n  const _createNodeIterator = function _createNodeIterator(root) {\n    return createNodeIterator.call(root.ownerDocument || root, root,\n    // eslint-disable-next-line no-bitwise\n    NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT | NodeFilter.SHOW_PROCESSING_INSTRUCTION | NodeFilter.SHOW_CDATA_SECTION, null);\n  };\n  /**\n   * _isClobbered\n   *\n   * @param element element to check for clobbering attacks\n   * @return true if clobbered, false if safe\n   */\n  const _isClobbered = function _isClobbered(element) {\n    return element instanceof HTMLFormElement && (typeof element.nodeName !== 'string' || typeof element.textContent !== 'string' || typeof element.removeChild !== 'function' || !(element.attributes instanceof NamedNodeMap) || typeof element.removeAttribute !== 'function' || typeof element.setAttribute !== 'function' || typeof element.namespaceURI !== 'string' || typeof element.insertBefore !== 'function' || typeof element.hasChildNodes !== 'function');\n  };\n  /**\n   * Checks whether the given object is a DOM node.\n   *\n   * @param value object to check whether it's a DOM node\n   * @return true is object is a DOM node\n   */\n  const _isNode = function _isNode(value) {\n    return typeof Node === 'function' && value instanceof Node;\n  };\n  function _executeHooks(hooks, currentNode, data) {\n    arrayForEach(hooks, hook => {\n      hook.call(DOMPurify, currentNode, data, CONFIG);\n    });\n  }\n  /**\n   * _sanitizeElements\n   *\n   * @protect nodeName\n   * @protect textContent\n   * @protect removeChild\n   * @param currentNode to check for permission to exist\n   * @return true if node was killed, false if left alive\n   */\n  const _sanitizeElements = function _sanitizeElements(currentNode) {\n    let content = null;\n    /* Execute a hook if present */\n    _executeHooks(hooks.beforeSanitizeElements, currentNode, null);\n    /* Check if element is clobbered or can clobber */\n    if (_isClobbered(currentNode)) {\n      _forceRemove(currentNode);\n      return true;\n    }\n    /* Now let's check the element's type and name */\n    const tagName = transformCaseFunc(currentNode.nodeName);\n    /* Execute a hook if present */\n    _executeHooks(hooks.uponSanitizeElement, currentNode, {\n      tagName,\n      allowedTags: ALLOWED_TAGS\n    });\n    /* Detect mXSS attempts abusing namespace confusion */\n    if (SAFE_FOR_XML && currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(/<[/\\w!]/g, currentNode.innerHTML) && regExpTest(/<[/\\w!]/g, currentNode.textContent)) {\n      _forceRemove(currentNode);\n      return true;\n    }\n    /* Remove risky CSS construction leading to mXSS */\n    if (SAFE_FOR_XML && currentNode.namespaceURI === HTML_NAMESPACE && tagName === 'style' && _isNode(currentNode.firstElementChild)) {\n      _forceRemove(currentNode);\n      return true;\n    }\n    /* Remove any occurrence of processing instructions */\n    if (currentNode.nodeType === NODE_TYPE.progressingInstruction) {\n      _forceRemove(currentNode);\n      return true;\n    }\n    /* Remove any kind of possibly harmful comments */\n    if (SAFE_FOR_XML && currentNode.nodeType === NODE_TYPE.comment && regExpTest(/<[/\\w]/g, currentNode.data)) {\n      _forceRemove(currentNode);\n      return true;\n    }\n    /* Remove element if anything forbids its presence */\n    if (FORBID_TAGS[tagName] || !(EXTRA_ELEMENT_HANDLING.tagCheck instanceof Function && EXTRA_ELEMENT_HANDLING.tagCheck(tagName)) && !ALLOWED_TAGS[tagName]) {\n      /* Check if we have a custom element to handle */\n      if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) {\n        if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) {\n          return false;\n        }\n        if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(tagName)) {\n          return false;\n        }\n      }\n      /* Keep content except for bad-listed elements */\n      if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {\n        const parentNode = getParentNode(currentNode) || currentNode.parentNode;\n        const childNodes = getChildNodes(currentNode) || currentNode.childNodes;\n        if (childNodes && parentNode) {\n          const childCount = childNodes.length;\n          for (let i = childCount - 1; i >= 0; --i) {\n            const childClone = cloneNode(childNodes[i], true);\n            parentNode.insertBefore(childClone, getNextSibling(currentNode));\n          }\n        }\n      }\n      _forceRemove(currentNode);\n      return true;\n    }\n    /* Check whether element has a valid namespace */\n    if (currentNode instanceof Element && !_checkValidNamespace(currentNode)) {\n      _forceRemove(currentNode);\n      return true;\n    }\n    /* Make sure that older browsers don't get fallback-tag mXSS */\n    if ((tagName === 'noscript' || tagName === 'noembed' || tagName === 'noframes') && regExpTest(/<\\/no(script|embed|frames)/i, currentNode.innerHTML)) {\n      _forceRemove(currentNode);\n      return true;\n    }\n    /* Sanitize element content to be template-safe */\n    if (SAFE_FOR_TEMPLATES && currentNode.nodeType === NODE_TYPE.text) {\n      /* Get the element's text content */\n      content = currentNode.textContent;\n      arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {\n        content = stringReplace(content, expr, ' ');\n      });\n      if (currentNode.textContent !== content) {\n        arrayPush(DOMPurify.removed, {\n          element: currentNode.cloneNode()\n        });\n        currentNode.textContent = content;\n      }\n    }\n    /* Execute a hook if present */\n    _executeHooks(hooks.afterSanitizeElements, currentNode, null);\n    return false;\n  };\n  /**\n   * _isValidAttribute\n   *\n   * @param lcTag Lowercase tag name of containing element.\n   * @param lcName Lowercase attribute name.\n   * @param value Attribute value.\n   * @return Returns true if `value` is valid, otherwise false.\n   */\n  // eslint-disable-next-line complexity\n  const _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {\n    /* FORBID_ATTR must always win, even if ADD_ATTR predicate would allow it */\n    if (FORBID_ATTR[lcName]) {\n      return false;\n    }\n    /* Make sure attribute cannot clobber */\n    if (SANITIZE_DOM && (lcName === 'id' || lcName === 'name') && (value in document || value in formElement)) {\n      return false;\n    }\n    const nameIsPermitted = ALLOWED_ATTR[lcName] || EXTRA_ELEMENT_HANDLING.attributeCheck instanceof Function && EXTRA_ELEMENT_HANDLING.attributeCheck(lcName, lcTag);\n    /* Allow valid data-* attributes: At least one character after \"-\"\n        (https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes)\n        XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804)\n        We don't need to check the value; it's always URI safe. */\n    if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR, lcName)) ; else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR, lcName)) ; else if (!nameIsPermitted || FORBID_ATTR[lcName]) {\n      if (\n      // First condition does a very basic check if a) it's basically a valid custom element tagname AND\n      // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck\n      // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck\n      _isBasicCustomElement(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName, lcTag)) ||\n      // Alternative, second condition checks if it's an `is`-attribute, AND\n      // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck\n      lcName === 'is' && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(value))) ; else {\n        return false;\n      }\n      /* Check value is safe. First, is attr inert? If so, is safe */\n    } else if (URI_SAFE_ATTRIBUTES[lcName]) ; else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE, ''))) ; else if ((lcName === 'src' || lcName === 'xlink:href' || lcName === 'href') && lcTag !== 'script' && stringIndexOf(value, 'data:') === 0 && DATA_URI_TAGS[lcTag]) ; else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA, stringReplace(value, ATTR_WHITESPACE, ''))) ; else if (value) {\n      return false;\n    } else ;\n    return true;\n  };\n  /* Names the HTML spec reserves from valid-custom-element-name; these must\n   * never be treated as basic custom elements even when a permissive\n   * CUSTOM_ELEMENT_HANDLING.tagNameCheck is configured. */\n  const RESERVED_CUSTOM_ELEMENT_NAMES = addToSet({}, ['annotation-xml', 'color-profile', 'font-face', 'font-face-format', 'font-face-name', 'font-face-src', 'font-face-uri', 'missing-glyph']);\n  /**\n   * _isBasicCustomElement\n   * checks if at least one dash is included in tagName, and it's not the first char\n   * for more sophisticated checking see https://github.com/sindresorhus/validate-element-name\n   *\n   * @param tagName name of the tag of the node to sanitize\n   * @returns Returns true if the tag name meets the basic criteria for a custom element, otherwise false.\n   */\n  const _isBasicCustomElement = function _isBasicCustomElement(tagName) {\n    return !RESERVED_CUSTOM_ELEMENT_NAMES[stringToLowerCase(tagName)] && regExpTest(CUSTOM_ELEMENT, tagName);\n  };\n  /**\n   * _sanitizeAttributes\n   *\n   * @protect attributes\n   * @protect nodeName\n   * @protect removeAttribute\n   * @protect setAttribute\n   *\n   * @param currentNode to sanitize\n   */\n  const _sanitizeAttributes = function _sanitizeAttributes(currentNode) {\n    /* Execute a hook if present */\n    _executeHooks(hooks.beforeSanitizeAttributes, currentNode, null);\n    const {\n      attributes\n    } = currentNode;\n    /* Check if we have attributes; if not we might have a text node */\n    if (!attributes || _isClobbered(currentNode)) {\n      return;\n    }\n    const hookEvent = {\n      attrName: '',\n      attrValue: '',\n      keepAttr: true,\n      allowedAttributes: ALLOWED_ATTR,\n      forceKeepAttr: undefined\n    };\n    let l = attributes.length;\n    /* Go backwards over all attributes; safely remove bad ones */\n    while (l--) {\n      const attr = attributes[l];\n      const {\n        name,\n        namespaceURI,\n        value: attrValue\n      } = attr;\n      const lcName = transformCaseFunc(name);\n      const initValue = attrValue;\n      let value = name === 'value' ? initValue : stringTrim(initValue);\n      /* Execute a hook if present */\n      hookEvent.attrName = lcName;\n      hookEvent.attrValue = value;\n      hookEvent.keepAttr = true;\n      hookEvent.forceKeepAttr = undefined; // Allows developers to see this is a property they can set\n      _executeHooks(hooks.uponSanitizeAttribute, currentNode, hookEvent);\n      value = hookEvent.attrValue;\n      /* Full DOM Clobbering protection via namespace isolation,\n       * Prefix id and name attributes with `user-content-`\n       */\n      if (SANITIZE_NAMED_PROPS && (lcName === 'id' || lcName === 'name') && stringIndexOf(value, SANITIZE_NAMED_PROPS_PREFIX) !== 0) {\n        // Remove the attribute with this value\n        _removeAttribute(name, currentNode);\n        // Prefix the value and later re-create the attribute with the sanitized value\n        value = SANITIZE_NAMED_PROPS_PREFIX + value;\n      }\n      // Else: already prefixed, leave the attribute alone — the prefix is\n      // itself the clobbering protection, and re-applying it is incorrect.\n      /* Work around a security issue with comments inside attributes */\n      if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, value)) {\n        _removeAttribute(name, currentNode);\n        continue;\n      }\n      /* Make sure we cannot easily use animated hrefs, even if animations are allowed */\n      if (lcName === 'attributename' && stringMatch(value, 'href')) {\n        _removeAttribute(name, currentNode);\n        continue;\n      }\n      /* Did the hooks approve of the attribute? */\n      if (hookEvent.forceKeepAttr) {\n        continue;\n      }\n      /* Did the hooks approve of the attribute? */\n      if (!hookEvent.keepAttr) {\n        _removeAttribute(name, currentNode);\n        continue;\n      }\n      /* Work around a security issue in jQuery 3.0 */\n      if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(/\\/>/i, value)) {\n        _removeAttribute(name, currentNode);\n        continue;\n      }\n      /* Sanitize attribute content to be template-safe */\n      if (SAFE_FOR_TEMPLATES) {\n        arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {\n          value = stringReplace(value, expr, ' ');\n        });\n      }\n      /* Is `value` valid for this attribute? */\n      const lcTag = transformCaseFunc(currentNode.nodeName);\n      if (!_isValidAttribute(lcTag, lcName, value)) {\n        _removeAttribute(name, currentNode);\n        continue;\n      }\n      /* Handle attributes that require Trusted Types */\n      if (trustedTypesPolicy && typeof trustedTypes === 'object' && typeof trustedTypes.getAttributeType === 'function') {\n        if (namespaceURI) ; else {\n          switch (trustedTypes.getAttributeType(lcTag, lcName)) {\n            case 'TrustedHTML':\n              {\n                value = trustedTypesPolicy.createHTML(value);\n                break;\n              }\n            case 'TrustedScriptURL':\n              {\n                value = trustedTypesPolicy.createScriptURL(value);\n                break;\n              }\n          }\n        }\n      }\n      /* Handle invalid data-* attribute set by try-catching it */\n      if (value !== initValue) {\n        try {\n          if (namespaceURI) {\n            currentNode.setAttributeNS(namespaceURI, name, value);\n          } else {\n            /* Fallback to setAttribute() for browser-unrecognized namespaces e.g. \"x-schema\". */\n            currentNode.setAttribute(name, value);\n          }\n          if (_isClobbered(currentNode)) {\n            _forceRemove(currentNode);\n          } else {\n            arrayPop(DOMPurify.removed);\n          }\n        } catch (_) {\n          _removeAttribute(name, currentNode);\n        }\n      }\n    }\n    /* Execute a hook if present */\n    _executeHooks(hooks.afterSanitizeAttributes, currentNode, null);\n  };\n  /**\n   * _sanitizeShadowDOM\n   *\n   * @param fragment to iterate over recursively\n   */\n  const _sanitizeShadowDOM2 = function _sanitizeShadowDOM(fragment) {\n    let shadowNode = null;\n    const shadowIterator = _createNodeIterator(fragment);\n    /* Execute a hook if present */\n    _executeHooks(hooks.beforeSanitizeShadowDOM, fragment, null);\n    while (shadowNode = shadowIterator.nextNode()) {\n      /* Execute a hook if present */\n      _executeHooks(hooks.uponSanitizeShadowNode, shadowNode, null);\n      /* Sanitize tags and elements */\n      _sanitizeElements(shadowNode);\n      /* Check attributes next */\n      _sanitizeAttributes(shadowNode);\n      /* Deep shadow DOM detected */\n      if (shadowNode.content instanceof DocumentFragment) {\n        _sanitizeShadowDOM2(shadowNode.content);\n      }\n    }\n    /* Execute a hook if present */\n    _executeHooks(hooks.afterSanitizeShadowDOM, fragment, null);\n  };\n  // eslint-disable-next-line complexity\n  DOMPurify.sanitize = function (dirty) {\n    let cfg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    let body = null;\n    let importedNode = null;\n    let currentNode = null;\n    let returnNode = null;\n    /* Make sure we have a string to sanitize.\n      DO NOT return early, as this will return the wrong type if\n      the user has requested a DOM object rather than a string */\n    IS_EMPTY_INPUT = !dirty;\n    if (IS_EMPTY_INPUT) {\n      dirty = '<!-->';\n    }\n    /* Stringify, in case dirty is an object */\n    if (typeof dirty !== 'string' && !_isNode(dirty)) {\n      dirty = stringifyValue(dirty);\n      if (typeof dirty !== 'string') {\n        throw typeErrorCreate('dirty is not a string, aborting');\n      }\n    }\n    /* Return dirty HTML if DOMPurify cannot run */\n    if (!DOMPurify.isSupported) {\n      return dirty;\n    }\n    /* Assign config vars */\n    if (!SET_CONFIG) {\n      _parseConfig(cfg);\n    }\n    /* Clean up removed elements */\n    DOMPurify.removed = [];\n    /* Check if dirty is correctly typed for IN_PLACE */\n    if (typeof dirty === 'string') {\n      IN_PLACE = false;\n    }\n    if (IN_PLACE) {\n      /* Do some early pre-sanitization to avoid unsafe root nodes */\n      const nn = dirty.nodeName;\n      if (typeof nn === 'string') {\n        const tagName = transformCaseFunc(nn);\n        if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {\n          throw typeErrorCreate('root node is forbidden and cannot be sanitized in-place');\n        }\n      }\n    } else if (dirty instanceof Node) {\n      /* If dirty is a DOM element, append to an empty document to avoid\n         elements being stripped by the parser */\n      body = _initDocument('<!---->');\n      importedNode = body.ownerDocument.importNode(dirty, true);\n      if (importedNode.nodeType === NODE_TYPE.element && importedNode.nodeName === 'BODY') {\n        /* Node is already a body, use as is */\n        body = importedNode;\n      } else if (importedNode.nodeName === 'HTML') {\n        body = importedNode;\n      } else {\n        // eslint-disable-next-line unicorn/prefer-dom-node-append\n        body.appendChild(importedNode);\n      }\n    } else {\n      /* Exit directly if we have nothing to do */\n      if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT &&\n      // eslint-disable-next-line unicorn/prefer-includes\n      dirty.indexOf('<') === -1) {\n        return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(dirty) : dirty;\n      }\n      /* Initialize the document to work on */\n      body = _initDocument(dirty);\n      /* Check we have a DOM node from the data */\n      if (!body) {\n        return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : '';\n      }\n    }\n    /* Remove first element node (ours) if FORCE_BODY is set */\n    if (body && FORCE_BODY) {\n      _forceRemove(body.firstChild);\n    }\n    /* Get node iterator */\n    const nodeIterator = _createNodeIterator(IN_PLACE ? dirty : body);\n    /* Now start iterating over the created document */\n    while (currentNode = nodeIterator.nextNode()) {\n      /* Sanitize tags and elements */\n      _sanitizeElements(currentNode);\n      /* Check attributes next */\n      _sanitizeAttributes(currentNode);\n      /* Shadow DOM detected, sanitize it */\n      if (currentNode.content instanceof DocumentFragment) {\n        _sanitizeShadowDOM2(currentNode.content);\n      }\n    }\n    /* If we sanitized `dirty` in-place, return it. */\n    if (IN_PLACE) {\n      return dirty;\n    }\n    /* Return sanitized string or DOM */\n    if (RETURN_DOM) {\n      if (SAFE_FOR_TEMPLATES) {\n        body.normalize();\n        let html = body.innerHTML;\n        arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {\n          html = stringReplace(html, expr, ' ');\n        });\n        body.innerHTML = html;\n      }\n      if (RETURN_DOM_FRAGMENT) {\n        returnNode = createDocumentFragment.call(body.ownerDocument);\n        while (body.firstChild) {\n          // eslint-disable-next-line unicorn/prefer-dom-node-append\n          returnNode.appendChild(body.firstChild);\n        }\n      } else {\n        returnNode = body;\n      }\n      if (ALLOWED_ATTR.shadowroot || ALLOWED_ATTR.shadowrootmode) {\n        /*\n          AdoptNode() is not used because internal state is not reset\n          (e.g. the past names map of a HTMLFormElement), this is safe\n          in theory but we would rather not risk another attack vector.\n          The state that is cloned by importNode() is explicitly defined\n          by the specs.\n        */\n        returnNode = importNode.call(originalDocument, returnNode, true);\n      }\n      return returnNode;\n    }\n    let serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;\n    /* Serialize doctype if allowed */\n    if (WHOLE_DOCUMENT && ALLOWED_TAGS['!doctype'] && body.ownerDocument && body.ownerDocument.doctype && body.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, body.ownerDocument.doctype.name)) {\n      serializedHTML = '<!DOCTYPE ' + body.ownerDocument.doctype.name + '>\\n' + serializedHTML;\n    }\n    /* Sanitize final string template-safe */\n    if (SAFE_FOR_TEMPLATES) {\n      arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {\n        serializedHTML = stringReplace(serializedHTML, expr, ' ');\n      });\n    }\n    return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(serializedHTML) : serializedHTML;\n  };\n  DOMPurify.setConfig = function () {\n    let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n    _parseConfig(cfg);\n    SET_CONFIG = true;\n  };\n  DOMPurify.clearConfig = function () {\n    CONFIG = null;\n    SET_CONFIG = false;\n  };\n  DOMPurify.isValidAttribute = function (tag, attr, value) {\n    /* Initialize shared config vars if necessary. */\n    if (!CONFIG) {\n      _parseConfig({});\n    }\n    const lcTag = transformCaseFunc(tag);\n    const lcName = transformCaseFunc(attr);\n    return _isValidAttribute(lcTag, lcName, value);\n  };\n  DOMPurify.addHook = function (entryPoint, hookFunction) {\n    if (typeof hookFunction !== 'function') {\n      return;\n    }\n    arrayPush(hooks[entryPoint], hookFunction);\n  };\n  DOMPurify.removeHook = function (entryPoint, hookFunction) {\n    if (hookFunction !== undefined) {\n      const index = arrayLastIndexOf(hooks[entryPoint], hookFunction);\n      return index === -1 ? undefined : arraySplice(hooks[entryPoint], index, 1)[0];\n    }\n    return arrayPop(hooks[entryPoint]);\n  };\n  DOMPurify.removeHooks = function (entryPoint) {\n    hooks[entryPoint] = [];\n  };\n  DOMPurify.removeAllHooks = function () {\n    hooks = _createHooksMap();\n  };\n  return DOMPurify;\n}\nvar purify = createDOMPurify();\n\nexport { purify as default };\n//# sourceMappingURL=purify.es.mjs.map\n", "import BasicObject from \"trix/core/basic_object\"\n\nimport { nodeIsAttachmentElement, removeNode, tagName, walkTree } from \"trix/core/helpers\"\nimport DOMPurify from \"dompurify\"\nimport * as config from \"trix/config\"\n\nDOMPurify.addHook(\"uponSanitizeAttribute\", function (node, data) {\n  if (data.attrName === \"data-trix-serialized-attributes\") {\n    data.keepAttr = false\n    return\n  }\n\n  const allowedAttributePattern = /^data-trix-/\n  if (allowedAttributePattern.test(data.attrName)) {\n    data.forceKeepAttr = true\n  }\n})\n\nconst DEFAULT_ALLOWED_ATTRIBUTES = \"style href src width height language class\".split(\" \")\nconst DEFAULT_FORBIDDEN_PROTOCOLS = \"javascript:\".split(\" \")\nconst DEFAULT_FORBIDDEN_ELEMENTS = \"script iframe form noscript\".split(\" \")\n\nexport default class HTMLSanitizer extends BasicObject {\n  static setHTML(element, html, options) {\n    const sanitizedElement = new this(html, options).sanitize()\n    const sanitizedHtml = sanitizedElement.getHTML ? sanitizedElement.getHTML() : sanitizedElement.outerHTML\n    element.innerHTML = sanitizedHtml\n  }\n\n  static sanitize(html, options) {\n    const sanitizer = new this(html, options)\n    sanitizer.sanitize()\n    return sanitizer\n  }\n\n  constructor(html, { allowedAttributes, forbiddenProtocols, forbiddenElements, purifyOptions } = {}) {\n    super(...arguments)\n    this.allowedAttributes = allowedAttributes || DEFAULT_ALLOWED_ATTRIBUTES\n    this.forbiddenProtocols = forbiddenProtocols || DEFAULT_FORBIDDEN_PROTOCOLS\n    this.forbiddenElements = forbiddenElements || DEFAULT_FORBIDDEN_ELEMENTS\n    this.purifyOptions = purifyOptions || {}\n    this.body = createBodyElementForHTML(html)\n  }\n\n  sanitize() {\n    this.sanitizeElements()\n    this.normalizeListElementNesting()\n    const purifyConfig = Object.assign({}, config.dompurify, this.purifyOptions)\n    DOMPurify.setConfig(purifyConfig)\n    this.body = DOMPurify.sanitize(this.body)\n\n    return this.body\n  }\n\n  getHTML() {\n    return this.body.innerHTML\n  }\n\n  getBody() {\n    return this.body\n  }\n\n  // Private\n\n  sanitizeElements() {\n    const walker = walkTree(this.body)\n    const nodesToRemove = []\n\n    while (walker.nextNode()) {\n      const node = walker.currentNode\n      switch (node.nodeType) {\n        case Node.ELEMENT_NODE:\n          if (this.elementIsRemovable(node)) {\n            nodesToRemove.push(node)\n          } else {\n            this.sanitizeElement(node)\n          }\n          break\n        case Node.COMMENT_NODE:\n          nodesToRemove.push(node)\n          break\n      }\n    }\n\n    nodesToRemove.forEach((node) => removeNode(node))\n\n    return this.body\n  }\n\n  sanitizeElement(element) {\n    if (element.hasAttribute(\"href\")) {\n      if (this.forbiddenProtocols.includes(element.protocol)) {\n        element.removeAttribute(\"href\")\n      }\n    }\n\n    Array.from(element.attributes).forEach(({ name }) => {\n      if (!this.allowedAttributes.includes(name) && name.indexOf(\"data-trix\") !== 0) {\n        element.removeAttribute(name)\n      }\n    })\n\n    return element\n  }\n\n  normalizeListElementNesting() {\n    Array.from(this.body.querySelectorAll(\"ul,ol\")).forEach((listElement) => {\n      const previousElement = listElement.previousElementSibling\n      if (previousElement) {\n        if (tagName(previousElement) === \"li\") {\n          previousElement.appendChild(listElement)\n        }\n      }\n    })\n\n    return this.body\n  }\n\n  elementIsRemovable(element) {\n    if (element?.nodeType !== Node.ELEMENT_NODE) return\n    return this.elementIsForbidden(element) || this.elementIsntSerializable(element)\n  }\n\n  elementIsForbidden(element) {\n    return this.forbiddenElements.includes(tagName(element))\n  }\n\n  elementIsntSerializable(element) {\n    return element.getAttribute(\"data-trix-serialize\") === \"false\" && !nodeIsAttachmentElement(element)\n  }\n}\n\nconst createBodyElementForHTML = function(html = \"\") {\n  // Remove everything after </html>\n  html = html.replace(/<\\/html[^>]*>[^]*$/i, \"</html>\")\n  const doc = document.implementation.createHTMLDocument(\"\")\n  doc.documentElement.innerHTML = html\n\n  Array.from(doc.head.querySelectorAll(\"style\")).forEach((element) => {\n    doc.body.appendChild(element)\n  })\n\n  return doc.body\n}\n", "import * as config from \"trix/config\"\nimport { ZERO_WIDTH_SPACE } from \"trix/constants\"\nimport { copyObject, makeElement } from \"trix/core/helpers\"\nimport ObjectView from \"trix/views/object_view\"\nimport HTMLSanitizer from \"trix/models/html_sanitizer\"\nimport DOMPurify from \"dompurify\"\n\nconst { css } = config\n\nexport default class AttachmentView extends ObjectView {\n  constructor() {\n    super(...arguments)\n    this.attachment = this.object\n    this.attachment.uploadProgressDelegate = this\n    this.attachmentPiece = this.options.piece\n  }\n\n  createContentNodes() {\n    return []\n  }\n\n  createNodes() {\n    let innerElement\n    const figure = innerElement = makeElement({\n      tagName: \"figure\",\n      className: this.getClassName(),\n      data: this.getData(),\n      editable: false,\n    })\n\n    const href = this.getHref()\n    if (href) {\n      innerElement = makeElement({ tagName: \"a\", editable: false, attributes: { href, tabindex: -1 } })\n      figure.appendChild(innerElement)\n    }\n\n    if (this.attachment.hasContent()) {\n      HTMLSanitizer.setHTML(innerElement, this.attachment.getContent())\n    } else {\n      this.createContentNodes().forEach((node) => {\n        innerElement.appendChild(node)\n      })\n    }\n\n    innerElement.appendChild(this.createCaptionElement())\n\n    if (this.attachment.isPending()) {\n      this.progressElement = makeElement({\n        tagName: \"progress\",\n        attributes: {\n          class: css.attachmentProgress,\n          value: this.attachment.getUploadProgress(),\n          max: 100,\n        },\n        data: {\n          trixMutable: true,\n          trixStoreKey: [ \"progressElement\", this.attachment.id ].join(\"/\"),\n        },\n      })\n\n      figure.appendChild(this.progressElement)\n    }\n\n    return [ createCursorTarget(\"left\"), figure, createCursorTarget(\"right\") ]\n  }\n\n  createCaptionElement() {\n    const figcaption = makeElement({ tagName: \"figcaption\", className: css.attachmentCaption })\n    const caption = this.attachmentPiece.getCaption()\n    if (caption) {\n      figcaption.classList.add(`${css.attachmentCaption}--edited`)\n      figcaption.textContent = caption\n    } else {\n      let name, size\n      const captionConfig = this.getCaptionConfig()\n      if (captionConfig.name) {\n        name = this.attachment.getFilename()\n      }\n      if (captionConfig.size) {\n        size = this.attachment.getFormattedFilesize()\n      }\n\n      if (name) {\n        const nameElement = makeElement({ tagName: \"span\", className: css.attachmentName, textContent: name })\n        figcaption.appendChild(nameElement)\n      }\n\n      if (size) {\n        if (name) {\n          figcaption.appendChild(document.createTextNode(\" \"))\n        }\n        const sizeElement = makeElement({ tagName: \"span\", className: css.attachmentSize, textContent: size })\n        figcaption.appendChild(sizeElement)\n      }\n    }\n\n    return figcaption\n  }\n\n  getClassName() {\n    const names = [ css.attachment, `${css.attachment}--${this.attachment.getType()}` ]\n    const extension = this.attachment.getExtension()\n    if (extension) {\n      names.push(`${css.attachment}--${extension}`)\n    }\n    return names.join(\" \")\n  }\n\n  getData() {\n    const data = {\n      trixAttachment: JSON.stringify(this.attachment),\n      trixContentType: this.attachment.getContentType(),\n      trixId: this.attachment.id,\n    }\n\n    const { attributes } = this.attachmentPiece\n    if (!attributes.isEmpty()) {\n      data.trixAttributes = JSON.stringify(attributes)\n    }\n\n    if (this.attachment.isPending()) {\n      data.trixSerialize = false\n    }\n\n    return data\n  }\n\n  getHref() {\n    if (!htmlContainsTagName(this.attachment.getContent(), \"a\")) {\n      const href = this.attachment.getHref()\n      if (href && DOMPurify.isValidAttribute(\"a\", \"href\", href)) {\n        return href\n      }\n    }\n  }\n\n  getCaptionConfig() {\n    const type = this.attachment.getType()\n    const captionConfig = copyObject(config.attachments[type]?.caption)\n    if (type === \"file\") {\n      captionConfig.name = true\n    }\n    return captionConfig\n  }\n\n  findProgressElement() {\n    return this.findElement()?.querySelector(\"progress\")\n  }\n\n  // Attachment delegate\n\n  attachmentDidChangeUploadProgress() {\n    const value = this.attachment.getUploadProgress()\n    const progressElement = this.findProgressElement()\n    if (progressElement) {\n      progressElement.value = value\n    }\n  }\n}\n\nconst createCursorTarget = (name) =>\n  makeElement({\n    tagName: \"span\",\n    textContent: ZERO_WIDTH_SPACE,\n    data: {\n      trixCursorTarget: name,\n      trixSerialize: false,\n    },\n  })\n\nconst htmlContainsTagName = function(html, tagName) {\n  const div = makeElement(\"div\")\n  HTMLSanitizer.setHTML(div, html || \"\")\n  return div.querySelector(tagName)\n}\n", "import * as config from \"trix/config\"\nimport { makeElement } from \"trix/core/helpers\"\n\nimport AttachmentView from \"trix/views/attachment_view\"\n\nexport default class PreviewableAttachmentView extends AttachmentView {\n  constructor() {\n    super(...arguments)\n    this.attachment.previewDelegate = this\n  }\n\n  createContentNodes() {\n    this.image = makeElement({\n      tagName: \"img\",\n      attributes: {\n        src: \"\",\n      },\n      data: {\n        trixMutable: true,\n      },\n    })\n\n    this.refresh(this.image)\n    return [ this.image ]\n  }\n\n  createCaptionElement() {\n    const figcaption = super.createCaptionElement(...arguments)\n    if (!figcaption.textContent) {\n      figcaption.setAttribute(\"data-trix-placeholder\", config.lang.captionPlaceholder)\n    }\n    return figcaption\n  }\n\n  refresh(image) {\n    if (!image) { image = this.findElement()?.querySelector(\"img\") }\n    if (image) {\n      return this.updateAttributesForImage(image)\n    }\n  }\n\n  updateAttributesForImage(image) {\n    const url = this.attachment.getURL()\n    const previewURL = this.attachment.getPreviewURL()\n    image.src = previewURL || url\n\n    if (previewURL === url) {\n      image.removeAttribute(\"data-trix-serialized-attributes\")\n    } else {\n      const serializedAttributes = JSON.stringify({ src: url })\n      image.setAttribute(\"data-trix-serialized-attributes\", serializedAttributes)\n    }\n\n    const width = this.attachment.getWidth()\n    const height = this.attachment.getHeight()\n    const alt = this.attachment.getAttribute(\"alt\")\n\n    if (width != null) {\n      image.width = width\n    }\n    if (height != null) {\n      image.height = height\n    }\n    if (alt != null) {\n      image.alt = alt\n    }\n\n    const storeKey = [ \"imageElement\", this.attachment.id, image.src, image.width, image.height ].join(\"/\")\n    image.dataset.trixStoreKey = storeKey\n  }\n\n  // Attachment delegate\n\n  attachmentDidChangeAttributes() {\n    this.refresh(this.image)\n    return this.refresh()\n  }\n}\n", "/* eslint-disable\n    no-useless-escape,\n    no-var,\n*/\nimport { NON_BREAKING_SPACE } from \"trix/constants\"\n\nimport ObjectView from \"trix/views/object_view\"\nimport AttachmentView from \"trix/views/attachment_view\"\nimport PreviewableAttachmentView from \"trix/views/previewable_attachment_view\"\n\nimport { findInnerElement, getTextConfig, makeElement } from \"trix/core/helpers\"\n\nexport default class PieceView extends ObjectView {\n  constructor() {\n    super(...arguments)\n    this.piece = this.object\n    this.attributes = this.piece.getAttributes()\n    this.textConfig = this.options.textConfig\n    this.context = this.options.context\n\n    if (this.piece.attachment) {\n      this.attachment = this.piece.attachment\n    } else {\n      this.string = this.piece.toString()\n    }\n  }\n\n  createNodes() {\n    let nodes = this.attachment ? this.createAttachmentNodes() : this.createStringNodes()\n    const element = this.createElement()\n    if (element) {\n      const innerElement = findInnerElement(element)\n      Array.from(nodes).forEach((node) => {\n        innerElement.appendChild(node)\n      })\n      nodes = [ element ]\n    }\n    return nodes\n  }\n\n  createAttachmentNodes() {\n    const constructor = this.attachment.isPreviewable() ? PreviewableAttachmentView : AttachmentView\n\n    const view = this.createChildView(constructor, this.piece.attachment, { piece: this.piece })\n    return view.getNodes()\n  }\n\n  createStringNodes() {\n    if (this.textConfig?.plaintext) {\n      return [ document.createTextNode(this.string) ]\n    } else {\n      const nodes = []\n      const iterable = this.string.split(\"\\n\")\n      for (let index = 0; index < iterable.length; index++) {\n        const substring = iterable[index]\n        if (index > 0) {\n          const element = makeElement(\"br\")\n          nodes.push(element)\n        }\n\n        if (substring.length) {\n          const node = document.createTextNode(this.preserveSpaces(substring))\n          nodes.push(node)\n        }\n      }\n      return nodes\n    }\n  }\n\n  createElement() {\n    let element, key, value\n    const styles = {}\n\n    for (key in this.attributes) {\n      value = this.attributes[key]\n      const config = getTextConfig(key)\n      if (config) {\n        if (config.tagName) {\n          var innerElement\n          const pendingElement = makeElement(config.tagName)\n\n          if (innerElement) {\n            innerElement.appendChild(pendingElement)\n            innerElement = pendingElement\n          } else {\n            element = innerElement = pendingElement\n          }\n        }\n\n        if (config.styleProperty) {\n          styles[config.styleProperty] = value\n        }\n\n        if (config.style) {\n          for (key in config.style) {\n            value = config.style[key]\n            styles[key] = value\n          }\n        }\n      }\n    }\n\n    if (Object.keys(styles).length) {\n      if (!element) { element = makeElement(\"span\") }\n      for (key in styles) {\n        value = styles[key]\n        element.style[key] = value\n      }\n    }\n    return element\n  }\n\n  createContainerElement() {\n    for (const key in this.attributes) {\n      const value = this.attributes[key]\n      const config = getTextConfig(key)\n      if (config) {\n        if (config.groupTagName) {\n          const attributes = {}\n          attributes[key] = value\n          return makeElement(config.groupTagName, attributes)\n        }\n      }\n    }\n  }\n\n  preserveSpaces(string) {\n    if (this.context.isLast) {\n      string = string.replace(/\\ $/, NON_BREAKING_SPACE)\n    }\n\n    string = string\n      .replace(/(\\S)\\ {3}(\\S)/g, `$1 ${NON_BREAKING_SPACE} $2`)\n      .replace(/\\ {2}/g, `${NON_BREAKING_SPACE} `)\n      .replace(/\\ {2}/g, ` ${NON_BREAKING_SPACE}`)\n\n    if (this.context.isFirst || this.context.followsWhitespace) {\n      string = string.replace(/^\\ /, NON_BREAKING_SPACE)\n    }\n\n    return string\n  }\n}\n", "/* eslint-disable\n    no-var,\n*/\nimport ObjectView from \"trix/views/object_view\"\nimport ObjectGroup from \"trix/core/collections/object_group\"\nimport PieceView from \"trix/views/piece_view\"\n\nexport default class TextView extends ObjectView {\n  constructor() {\n    super(...arguments)\n    this.text = this.object\n    this.textConfig = this.options.textConfig\n  }\n\n  createNodes() {\n    const nodes = []\n    const pieces = ObjectGroup.groupObjects(this.getPieces())\n    const lastIndex = pieces.length - 1\n\n    for (let index = 0; index < pieces.length; index++) {\n      const piece = pieces[index]\n      const context = {}\n      if (index === 0) {\n        context.isFirst = true\n      }\n      if (index === lastIndex) {\n        context.isLast = true\n      }\n      if (endsWithWhitespace(previousPiece)) {\n        context.followsWhitespace = true\n      }\n\n      const view = this.findOrCreateCachedChildView(PieceView, piece, { textConfig: this.textConfig, context })\n      nodes.push(...Array.from(view.getNodes() || []))\n\n      var previousPiece = piece\n    }\n    return nodes\n  }\n\n  getPieces() {\n    return Array.from(this.text.getPieces()).filter((piece) => !piece.hasAttribute(\"blockBreak\"))\n  }\n}\n\nconst endsWithWhitespace = (piece) => /\\s$/.test(piece?.toString())\n", "import * as config from \"trix/config\"\nimport ObjectView from \"trix/views/object_view\"\nimport TextView from \"trix/views/text_view\"\n\nimport { getBlockConfig, makeElement } from \"trix/core/helpers\"\nconst { css } = config\n\nexport default class BlockView extends ObjectView {\n  constructor() {\n    super(...arguments)\n    this.block = this.object\n    this.attributes = this.block.getAttributes()\n  }\n\n  createNodes() {\n    const comment = document.createComment(\"block\")\n    const nodes = [ comment ]\n    if (this.block.isEmpty()) {\n      nodes.push(makeElement(\"br\"))\n    } else {\n      const textConfig = getBlockConfig(this.block.getLastAttribute())?.text\n      const textView = this.findOrCreateCachedChildView(TextView, this.block.text, { textConfig })\n      nodes.push(...Array.from(textView.getNodes() || []))\n      if (this.shouldAddExtraNewlineElement()) {\n        nodes.push(makeElement(\"br\"))\n      }\n    }\n\n    if (this.attributes.length) {\n      return nodes\n    } else {\n      let attributes\n      const { tagName } = config.blockAttributes.default\n      if (this.block.isRTL()) {\n        attributes = { dir: \"rtl\" }\n      }\n\n      const element = makeElement({ tagName, attributes })\n      nodes.forEach((node) => element.appendChild(node))\n      return [ element ]\n    }\n  }\n\n  createContainerElement(depth) {\n    const attributes = {}\n    let className\n    const attributeName = this.attributes[depth]\n\n    const { tagName, htmlAttributes = [] } = getBlockConfig(attributeName)\n\n    if (depth === 0 && this.block.isRTL()) {\n      Object.assign(attributes, { dir: \"rtl\" })\n    }\n\n    if (attributeName === \"attachmentGallery\") {\n      const size = this.block.getBlockBreakPosition()\n      className = `${css.attachmentGallery} ${css.attachmentGallery}--${size}`\n    }\n\n    Object.entries(this.block.htmlAttributes).forEach(([ name, value ]) => {\n      if (htmlAttributes.includes(name)) {\n        attributes[name] = value\n      }\n    })\n\n    return makeElement({ tagName, className, attributes })\n  }\n\n  // A single <br> at the end of a block element has no visual representation\n  // so add an extra one.\n  shouldAddExtraNewlineElement() {\n    return /\\n\\n$/.test(this.block.toString())\n  }\n}\n", "import { createEvent, makeElement } from \"trix/core/helpers\"\n\nimport ElementStore from \"trix/core/collections/element_store\"\nimport ObjectGroup from \"trix/core/collections/object_group\"\nimport ObjectView from \"trix/views/object_view\"\nimport BlockView from \"trix/views/block_view\"\n\nimport { defer } from \"trix/core/helpers\"\n\nexport default class DocumentView extends ObjectView {\n  static render(document) {\n    const element = makeElement(\"div\")\n    const view = new this(document, { element })\n    view.render()\n    view.sync()\n    return element\n  }\n\n  constructor() {\n    super(...arguments)\n    this.element = this.options.element\n    this.elementStore = new ElementStore()\n    this.setDocument(this.object)\n  }\n\n  setDocument(document) {\n    if (!document.isEqualTo(this.document)) {\n      this.document = this.object = document\n    }\n  }\n\n  render() {\n    this.childViews = []\n\n    this.shadowElement = makeElement(\"div\")\n\n    if (!this.document.isEmpty()) {\n      const objects = ObjectGroup.groupObjects(this.document.getBlocks(), { asTree: true })\n\n      Array.from(objects).forEach((object) => {\n        const view = this.findOrCreateCachedChildView(BlockView, object)\n        Array.from(view.getNodes()).map((node) => this.shadowElement.appendChild(node))\n      })\n    }\n  }\n\n  isSynced() {\n    return elementsHaveEqualHTML(this.shadowElement, this.element)\n  }\n\n  sync() {\n    const render = (element, documentFragment) => {\n      while (element.lastChild) {\n        element.removeChild(element.lastChild)\n      }\n      element.appendChild(documentFragment)\n    }\n\n    const event = createEvent(\"trix-before-render\", { cancelable: false, attributes: { render } })\n    this.element.dispatchEvent(event)\n\n    const fragment = this.createDocumentFragmentForSync()\n    event.render(this.element, fragment)\n    return this.didSync()\n  }\n\n  // Private\n\n  didSync() {\n    this.elementStore.reset(findStoredElements(this.element))\n    return defer(() => this.garbageCollectCachedViews())\n  }\n\n  createDocumentFragmentForSync() {\n    const fragment = document.createDocumentFragment()\n\n    Array.from(this.shadowElement.childNodes).forEach((node) => {\n      fragment.appendChild(node.cloneNode(true))\n    })\n\n    Array.from(findStoredElements(fragment)).forEach((element) => {\n      const storedElement = this.elementStore.remove(element)\n      if (storedElement) {\n        element.parentNode.replaceChild(storedElement, element)\n      }\n    })\n\n    return fragment\n  }\n}\n\nconst findStoredElements = (element) => element.querySelectorAll(\"[data-trix-store-key]\")\n\nconst elementsHaveEqualHTML = (element, otherElement) =>\n  ignoreSpaces(element.innerHTML) === ignoreSpaces(otherElement.innerHTML)\n\nconst ignoreSpaces = (html) => html.replace(/&nbsp;/g, \" \")\n", "import TrixObject from \"trix/core/object\" // Don't override window.Object\nimport Hash from \"trix/core/collections/hash\"\n\nexport default class Piece extends TrixObject {\n  static types = {}\n\n  static registerType(type, constructor) {\n    constructor.type = type\n    this.types[type] = constructor\n  }\n\n  static fromJSON(pieceJSON) {\n    const constructor = this.types[pieceJSON.type]\n    if (constructor) {\n      return constructor.fromJSON(pieceJSON)\n    }\n  }\n\n  constructor(value, attributes = {}) {\n    super(...arguments)\n    this.attributes = Hash.box(attributes)\n  }\n\n  copyWithAttributes(attributes) {\n    return new this.constructor(this.getValue(), attributes)\n  }\n\n  copyWithAdditionalAttributes(attributes) {\n    return this.copyWithAttributes(this.attributes.merge(attributes))\n  }\n\n  copyWithoutAttribute(attribute) {\n    return this.copyWithAttributes(this.attributes.remove(attribute))\n  }\n\n  copy() {\n    return this.copyWithAttributes(this.attributes)\n  }\n\n  getAttribute(attribute) {\n    return this.attributes.get(attribute)\n  }\n\n  getAttributesHash() {\n    return this.attributes\n  }\n\n  getAttributes() {\n    return this.attributes.toObject()\n  }\n\n  hasAttribute(attribute) {\n    return this.attributes.has(attribute)\n  }\n\n  hasSameStringValueAsPiece(piece) {\n    return piece && this.toString() === piece.toString()\n  }\n\n  hasSameAttributesAsPiece(piece) {\n    return piece && (this.attributes === piece.attributes || this.attributes.isEqualTo(piece.attributes))\n  }\n\n  isBlockBreak() {\n    return false\n  }\n\n  isEqualTo(piece) {\n    return (\n      super.isEqualTo(...arguments) ||\n      this.hasSameConstructorAs(piece) &&\n        this.hasSameStringValueAsPiece(piece) &&\n        this.hasSameAttributesAsPiece(piece)\n    )\n  }\n\n  isEmpty() {\n    return this.length === 0\n  }\n\n  isSerializable() {\n    return true\n  }\n\n  toJSON() {\n    return {\n      type: this.constructor.type,\n      attributes: this.getAttributes(),\n    }\n  }\n\n  contentsForInspection() {\n    return {\n      type: this.constructor.type,\n      attributes: this.attributes.inspect(),\n    }\n  }\n\n  // Grouping\n\n  canBeGrouped() {\n    return this.hasAttribute(\"href\")\n  }\n\n  canBeGroupedWith(piece) {\n    return this.getAttribute(\"href\") === piece.getAttribute(\"href\")\n  }\n\n  // Splittable\n\n  getLength() {\n    return this.length\n  }\n\n  canBeConsolidatedWith(piece) {\n    return false\n  }\n}\n", "import Operation from \"trix/core/utilities/operation\"\n\nexport default class ImagePreloadOperation extends Operation {\n  constructor(url) {\n    super(...arguments)\n    this.url = url\n  }\n\n  perform(callback) {\n    const image = new Image()\n\n    image.onload = () => {\n      image.width = this.width = image.naturalWidth\n      image.height = this.height = image.naturalHeight\n      return callback(true, image)\n    }\n\n    image.onerror = () => callback(false)\n\n    image.src = this.url\n  }\n}\n", "import * as config from \"trix/config\"\nimport TrixObject from \"trix/core/object\" // Don't override window.Object\nimport Hash from \"trix/core/collections/hash\"\nimport ImagePreloadOperation from \"trix/operations/image_preload_operation\"\n\nexport default class Attachment extends TrixObject {\n  static previewablePattern = /^image(\\/(gif|png|webp|jpe?g)|$)/\n\n  static attachmentForFile(file) {\n    const attributes = this.attributesForFile(file)\n    const attachment = new this(attributes)\n    attachment.setFile(file)\n    return attachment\n  }\n\n  static attributesForFile(file) {\n    return new Hash({\n      filename: file.name,\n      filesize: file.size,\n      contentType: file.type,\n    })\n  }\n\n  static fromJSON(attachmentJSON) {\n    return new this(attachmentJSON)\n  }\n\n  constructor(attributes = {}) {\n    super(attributes)\n    this.releaseFile = this.releaseFile.bind(this)\n    this.attributes = Hash.box(attributes)\n    this.didChangeAttributes()\n  }\n\n  setAttribute(attribute, value) {\n    this.setAttributes({ [attribute]: value })\n  }\n\n  getAttribute(attribute) {\n    return this.attributes.get(attribute)\n  }\n\n  hasAttribute(attribute) {\n    return this.attributes.has(attribute)\n  }\n\n  getAttributes() {\n    return this.attributes.toObject()\n  }\n\n  setAttributes(attributes = {}) {\n    const newAttributes = this.attributes.merge(attributes)\n    if (!this.attributes.isEqualTo(newAttributes)) {\n      this.attributes = newAttributes\n      this.didChangeAttributes()\n      this.previewDelegate?.attachmentDidChangeAttributes?.(this)\n      return this.delegate?.attachmentDidChangeAttributes?.(this)\n    }\n  }\n\n  didChangeAttributes() {\n    if (this.isPreviewable()) {\n      return this.preloadURL()\n    }\n  }\n\n  isPending() {\n    return this.file != null && !(this.getURL() || this.getHref())\n  }\n\n  isPreviewable() {\n    if (this.attributes.has(\"previewable\")) {\n      return this.attributes.get(\"previewable\")\n    } else {\n      return Attachment.previewablePattern.test(this.getContentType())\n    }\n  }\n\n  getType() {\n    if (this.hasContent()) {\n      return \"content\"\n    } else if (this.isPreviewable()) {\n      return \"preview\"\n    } else {\n      return \"file\"\n    }\n  }\n\n  getURL() {\n    return this.attributes.get(\"url\")\n  }\n\n  getHref() {\n    return this.attributes.get(\"href\")\n  }\n\n  getFilename() {\n    return this.attributes.get(\"filename\") || \"\"\n  }\n\n  getFilesize() {\n    return this.attributes.get(\"filesize\")\n  }\n\n  getFormattedFilesize() {\n    const filesize = this.attributes.get(\"filesize\")\n    if (typeof filesize === \"number\") {\n      return config.fileSize.formatter(filesize)\n    } else {\n      return \"\"\n    }\n  }\n\n  getExtension() {\n    return this.getFilename()\n      .match(/\\.(\\w+)$/)?.[1]\n      .toLowerCase()\n  }\n\n  getContentType() {\n    return this.attributes.get(\"contentType\")\n  }\n\n  hasContent() {\n    return this.attributes.has(\"content\")\n  }\n\n  getContent() {\n    return this.attributes.get(\"content\")\n  }\n\n  getWidth() {\n    return this.attributes.get(\"width\")\n  }\n\n  getHeight() {\n    return this.attributes.get(\"height\")\n  }\n\n  getFile() {\n    return this.file\n  }\n\n  setFile(file) {\n    this.file = file\n    if (this.isPreviewable()) {\n      return this.preloadFile()\n    }\n  }\n\n  releaseFile() {\n    this.releasePreloadedFile()\n    this.file = null\n  }\n\n  getUploadProgress() {\n    return this.uploadProgress != null ? this.uploadProgress : 0\n  }\n\n  setUploadProgress(value) {\n    if (this.uploadProgress !== value) {\n      this.uploadProgress = value\n      return this.uploadProgressDelegate?.attachmentDidChangeUploadProgress?.(this)\n    }\n  }\n\n  toJSON() {\n    return this.getAttributes()\n  }\n\n  getCacheKey() {\n    return [ super.getCacheKey(...arguments), this.attributes.getCacheKey(), this.getPreviewURL() ].join(\"/\")\n  }\n\n  // Previewable\n\n  getPreviewURL() {\n    return this.previewURL || this.preloadingURL\n  }\n\n  setPreviewURL(url) {\n    if (url !== this.getPreviewURL()) {\n      this.previewURL = url\n      this.previewDelegate?.attachmentDidChangeAttributes?.(this)\n      return this.delegate?.attachmentDidChangePreviewURL?.(this)\n    }\n  }\n\n  preloadURL() {\n    return this.preload(this.getURL(), this.releaseFile)\n  }\n\n  preloadFile() {\n    if (this.file) {\n      this.fileObjectURL = URL.createObjectURL(this.file)\n      return this.preload(this.fileObjectURL)\n    }\n  }\n\n  releasePreloadedFile() {\n    if (this.fileObjectURL) {\n      URL.revokeObjectURL(this.fileObjectURL)\n      this.fileObjectURL = null\n    }\n  }\n\n  preload(url, callback) {\n    if (url && url !== this.getPreviewURL()) {\n      this.preloadingURL = url\n      const operation = new ImagePreloadOperation(url)\n      return operation\n        .then(({ width, height }) => {\n          if (!this.getWidth() || !this.getHeight()) {\n            this.setAttributes({ width, height })\n          }\n          this.preloadingURL = null\n          this.setPreviewURL(url)\n          return callback?.()\n        })\n        .catch(() => {\n          this.preloadingURL = null\n          return callback?.()\n        })\n    }\n  }\n}\n", "import { OBJECT_REPLACEMENT_CHARACTER } from \"trix/constants\"\n\nimport Attachment from \"trix/models/attachment\"\nimport Piece from \"trix/models/piece\"\n\nexport default class AttachmentPiece extends Piece {\n  static permittedAttributes = [ \"caption\", \"presentation\" ]\n\n  static fromJSON(pieceJSON) {\n    return new this(Attachment.fromJSON(pieceJSON.attachment), pieceJSON.attributes)\n  }\n\n  constructor(attachment) {\n    super(...arguments)\n    this.attachment = attachment\n    this.length = 1\n    this.ensureAttachmentExclusivelyHasAttribute(\"href\")\n    if (!this.attachment.hasContent()) {\n      this.removeProhibitedAttributes()\n    }\n  }\n\n  ensureAttachmentExclusivelyHasAttribute(attribute) {\n    if (this.hasAttribute(attribute)) {\n      if (!this.attachment.hasAttribute(attribute)) {\n        this.attachment.setAttributes(this.attributes.slice([ attribute ]))\n      }\n      this.attributes = this.attributes.remove(attribute)\n    }\n  }\n\n  removeProhibitedAttributes() {\n    const attributes = this.attributes.slice(AttachmentPiece.permittedAttributes)\n    if (!attributes.isEqualTo(this.attributes)) {\n      this.attributes = attributes\n    }\n  }\n\n  getValue() {\n    return this.attachment\n  }\n\n  isSerializable() {\n    return !this.attachment.isPending()\n  }\n\n  getCaption() {\n    return this.attributes.get(\"caption\") || \"\"\n  }\n\n  isEqualTo(piece) {\n    return super.isEqualTo(piece) && this.attachment.id === piece?.attachment?.id\n  }\n\n  toString() {\n    return OBJECT_REPLACEMENT_CHARACTER\n  }\n\n  toJSON() {\n    const json = super.toJSON(...arguments)\n    json.attachment = this.attachment\n    return json\n  }\n\n  getCacheKey() {\n    return [ super.getCacheKey(...arguments), this.attachment.getCacheKey() ].join(\"/\")\n  }\n\n  toConsole() {\n    return JSON.stringify(this.toString())\n  }\n}\n\nPiece.registerType(\"attachment\", AttachmentPiece)\n", "import DOMPurify from \"dompurify\"\n\nimport Piece from \"trix/models/piece\"\n\nimport { normalizeNewlines } from \"trix/core/helpers\"\n\nexport default class StringPiece extends Piece {\n  static fromJSON(pieceJSON) {\n    const attributes = { ...pieceJSON.attributes }\n    if (attributes.href && !DOMPurify.isValidAttribute(\"a\", \"href\", attributes.href)) {\n      delete attributes.href\n    }\n    return new this(pieceJSON.string, attributes)\n  }\n\n  constructor(string) {\n    super(...arguments)\n    this.string = normalizeNewlines(string)\n    this.length = this.string.length\n  }\n\n  getValue() {\n    return this.string\n  }\n\n  toString() {\n    return this.string.toString()\n  }\n\n  isBlockBreak() {\n    return this.toString() === \"\\n\" && this.getAttribute(\"blockBreak\") === true\n  }\n\n  toJSON() {\n    const result = super.toJSON(...arguments)\n    result.string = this.string\n    return result\n  }\n\n  // Splittable\n\n  canBeConsolidatedWith(piece) {\n    return piece && this.hasSameConstructorAs(piece) && this.hasSameAttributesAsPiece(piece)\n  }\n\n  consolidateWith(piece) {\n    return new this.constructor(this.toString() + piece.toString(), this.attributes)\n  }\n\n  splitAtOffset(offset) {\n    let left, right\n    if (offset === 0) {\n      left = null\n      right = this\n    } else if (offset === this.length) {\n      left = this\n      right = null\n    } else {\n      left = new this.constructor(this.string.slice(0, offset), this.attributes)\n      right = new this.constructor(this.string.slice(offset), this.attributes)\n    }\n    return [ left, right ]\n  }\n\n  toConsole() {\n    let { string } = this\n    if (string.length > 15) {\n      string = string.slice(0, 14) + \"…\"\n    }\n    return JSON.stringify(string.toString())\n  }\n}\n\nPiece.registerType(\"string\", StringPiece)\n", "/* eslint-disable\n    prefer-const,\n*/\nimport TrixObject from \"trix/core/object\" // Don't override window.Object\n\nimport { spliceArray } from \"trix/core/helpers\"\n\nexport default class SplittableList extends TrixObject {\n  static box(objects) {\n    if (objects instanceof this) {\n      return objects\n    } else {\n      return new this(objects)\n    }\n  }\n\n  constructor(objects = []) {\n    super(...arguments)\n    this.objects = objects.slice(0)\n    this.length = this.objects.length\n  }\n\n  indexOf(object) {\n    return this.objects.indexOf(object)\n  }\n\n  splice(...args) {\n    return new this.constructor(spliceArray(this.objects, ...args))\n  }\n\n  eachObject(callback) {\n    return this.objects.map((object, index) => callback(object, index))\n  }\n\n  insertObjectAtIndex(object, index) {\n    return this.splice(index, 0, object)\n  }\n\n  insertSplittableListAtIndex(splittableList, index) {\n    return this.splice(index, 0, ...splittableList.objects)\n  }\n\n  insertSplittableListAtPosition(splittableList, position) {\n    const [ objects, index ] = this.splitObjectAtPosition(position)\n    return new this.constructor(objects).insertSplittableListAtIndex(splittableList, index)\n  }\n\n  editObjectAtIndex(index, callback) {\n    return this.replaceObjectAtIndex(callback(this.objects[index]), index)\n  }\n\n  replaceObjectAtIndex(object, index) {\n    return this.splice(index, 1, object)\n  }\n\n  removeObjectAtIndex(index) {\n    return this.splice(index, 1)\n  }\n\n  getObjectAtIndex(index) {\n    return this.objects[index]\n  }\n\n  getSplittableListInRange(range) {\n    const [ objects, leftIndex, rightIndex ] = this.splitObjectsAtRange(range)\n    return new this.constructor(objects.slice(leftIndex, rightIndex + 1))\n  }\n\n  selectSplittableList(test) {\n    const objects = this.objects.filter((object) => test(object))\n    return new this.constructor(objects)\n  }\n\n  removeObjectsInRange(range) {\n    const [ objects, leftIndex, rightIndex ] = this.splitObjectsAtRange(range)\n    return new this.constructor(objects).splice(leftIndex, rightIndex - leftIndex + 1)\n  }\n\n  transformObjectsInRange(range, transform) {\n    const [ objects, leftIndex, rightIndex ] = this.splitObjectsAtRange(range)\n    const transformedObjects = objects.map((object, index) =>\n      leftIndex <= index && index <= rightIndex ? transform(object) : object\n    )\n    return new this.constructor(transformedObjects)\n  }\n\n  splitObjectsAtRange(range) {\n    let rightOuterIndex\n    let [ objects, leftInnerIndex, offset ] = this.splitObjectAtPosition(startOfRange(range))\n    ;[ objects, rightOuterIndex ] = new this.constructor(objects).splitObjectAtPosition(endOfRange(range) + offset)\n\n    return [ objects, leftInnerIndex, rightOuterIndex - 1 ]\n  }\n\n  getObjectAtPosition(position) {\n    const { index } = this.findIndexAndOffsetAtPosition(position)\n    return this.objects[index]\n  }\n\n  splitObjectAtPosition(position) {\n    let splitIndex, splitOffset\n    const { index, offset } = this.findIndexAndOffsetAtPosition(position)\n    const objects = this.objects.slice(0)\n    if (index != null) {\n      if (offset === 0) {\n        splitIndex = index\n        splitOffset = 0\n      } else {\n        const object = this.getObjectAtIndex(index)\n        const [ leftObject, rightObject ] = object.splitAtOffset(offset)\n        objects.splice(index, 1, leftObject, rightObject)\n        splitIndex = index + 1\n        splitOffset = leftObject.getLength() - offset\n      }\n    } else {\n      splitIndex = objects.length\n      splitOffset = 0\n    }\n\n    return [ objects, splitIndex, splitOffset ]\n  }\n\n  consolidate() {\n    const objects = []\n    let pendingObject = this.objects[0]\n\n    this.objects.slice(1).forEach((object) => {\n      if (pendingObject.canBeConsolidatedWith?.(object)) {\n        pendingObject = pendingObject.consolidateWith(object)\n      } else {\n        objects.push(pendingObject)\n        pendingObject = object\n      }\n    })\n\n    if (pendingObject) {\n      objects.push(pendingObject)\n    }\n\n    return new this.constructor(objects)\n  }\n\n  consolidateFromIndexToIndex(startIndex, endIndex) {\n    const objects = this.objects.slice(0)\n    const objectsInRange = objects.slice(startIndex, endIndex + 1)\n    const consolidatedInRange = new this.constructor(objectsInRange).consolidate().toArray()\n    return this.splice(startIndex, objectsInRange.length, ...consolidatedInRange)\n  }\n\n  findIndexAndOffsetAtPosition(position) {\n    let index\n    let currentPosition = 0\n    for (index = 0; index < this.objects.length; index++) {\n      const object = this.objects[index]\n      const nextPosition = currentPosition + object.getLength()\n      if (currentPosition <= position && position < nextPosition) {\n        return { index, offset: position - currentPosition }\n      }\n      currentPosition = nextPosition\n    }\n    return { index: null, offset: null }\n  }\n\n  findPositionAtIndexAndOffset(index, offset) {\n    let position = 0\n    for (let currentIndex = 0; currentIndex < this.objects.length; currentIndex++) {\n      const object = this.objects[currentIndex]\n      if (currentIndex < index) {\n        position += object.getLength()\n      } else if (currentIndex === index) {\n        position += offset\n        break\n      }\n    }\n    return position\n  }\n\n  getEndPosition() {\n    if (this.endPosition == null) {\n      this.endPosition = 0\n      this.objects.forEach((object) => this.endPosition += object.getLength())\n    }\n\n    return this.endPosition\n  }\n\n  toString() {\n    return this.objects.join(\"\")\n  }\n\n  toArray() {\n    return this.objects.slice(0)\n  }\n\n  toJSON() {\n    return this.toArray()\n  }\n\n  isEqualTo(splittableList) {\n    return super.isEqualTo(...arguments) || objectArraysAreEqual(this.objects, splittableList?.objects)\n  }\n\n  contentsForInspection() {\n    return {\n      objects: `[${this.objects.map((object) => object.inspect()).join(\", \")}]`,\n    }\n  }\n}\n\nconst objectArraysAreEqual = function(left, right = []) {\n  if (left.length !== right.length) {\n    return false\n  }\n  let result = true\n  for (let index = 0; index < left.length; index++) {\n    const object = left[index]\n    if (result && !object.isEqualTo(right[index])) {\n      result = false\n    }\n  }\n  return result\n}\n\nconst startOfRange = (range) => range[0]\n\nconst endOfRange = (range) => range[1]\n", "import TrixObject from \"trix/core/object\" // Don't override window.Object\n\nimport { getDirection } from \"trix/core/helpers\"\n\nimport Piece from \"trix/models/piece\"\nimport AttachmentPiece from \"trix/models/attachment_piece\"\nimport StringPiece from \"trix/models/string_piece\"\nimport SplittableList from \"trix/models/splittable_list\"\n\nimport Hash from \"trix/core/collections/hash\"\n\nexport default class Text extends TrixObject {\n  static textForAttachmentWithAttributes(attachment, attributes) {\n    const piece = new AttachmentPiece(attachment, attributes)\n    return new this([ piece ])\n  }\n\n  static textForStringWithAttributes(string, attributes) {\n    const piece = new StringPiece(string, attributes)\n    return new this([ piece ])\n  }\n\n  static fromJSON(textJSON) {\n    const pieces = Array.from(textJSON).map((pieceJSON) => Piece.fromJSON(pieceJSON))\n    return new this(pieces)\n  }\n\n  constructor(pieces = []) {\n    super(...arguments)\n    const notEmpty = pieces.filter((piece) => !piece.isEmpty())\n    this.pieceList = new SplittableList(notEmpty)\n  }\n\n  copy() {\n    return this.copyWithPieceList(this.pieceList)\n  }\n\n  copyWithPieceList(pieceList) {\n    return new this.constructor(pieceList.consolidate().toArray())\n  }\n\n  copyUsingObjectMap(objectMap) {\n    const pieces = this.getPieces().map((piece) => objectMap.find(piece) || piece)\n    return new this.constructor(pieces)\n  }\n\n  appendText(text) {\n    return this.insertTextAtPosition(text, this.getLength())\n  }\n\n  insertTextAtPosition(text, position) {\n    return this.copyWithPieceList(this.pieceList.insertSplittableListAtPosition(text.pieceList, position))\n  }\n\n  removeTextAtRange(range) {\n    return this.copyWithPieceList(this.pieceList.removeObjectsInRange(range))\n  }\n\n  replaceTextAtRange(text, range) {\n    return this.removeTextAtRange(range).insertTextAtPosition(text, range[0])\n  }\n\n  moveTextFromRangeToPosition(range, position) {\n    if (range[0] <= position && position <= range[1]) return\n    const text = this.getTextAtRange(range)\n    const length = text.getLength()\n    if (range[0] < position) {\n      position -= length\n    }\n    return this.removeTextAtRange(range).insertTextAtPosition(text, position)\n  }\n\n  addAttributeAtRange(attribute, value, range) {\n    const attributes = {}\n    attributes[attribute] = value\n    return this.addAttributesAtRange(attributes, range)\n  }\n\n  addAttributesAtRange(attributes, range) {\n    return this.copyWithPieceList(\n      this.pieceList.transformObjectsInRange(range, (piece) => piece.copyWithAdditionalAttributes(attributes))\n    )\n  }\n\n  removeAttributeAtRange(attribute, range) {\n    return this.copyWithPieceList(\n      this.pieceList.transformObjectsInRange(range, (piece) => piece.copyWithoutAttribute(attribute))\n    )\n  }\n\n  setAttributesAtRange(attributes, range) {\n    return this.copyWithPieceList(\n      this.pieceList.transformObjectsInRange(range, (piece) => piece.copyWithAttributes(attributes))\n    )\n  }\n\n  getAttributesAtPosition(position) {\n    return this.pieceList.getObjectAtPosition(position)?.getAttributes() || {}\n  }\n\n  getCommonAttributes() {\n    const objects = Array.from(this.pieceList.toArray()).map((piece) => piece.getAttributes())\n    return Hash.fromCommonAttributesOfObjects(objects).toObject()\n  }\n\n  getCommonAttributesAtRange(range) {\n    return this.getTextAtRange(range).getCommonAttributes() || {}\n  }\n\n  getExpandedRangeForAttributeAtOffset(attributeName, offset) {\n    let right\n    let left = right = offset\n    const length = this.getLength()\n\n    while (left > 0 && this.getCommonAttributesAtRange([ left - 1, right ])[attributeName]) {\n      left--\n    }\n    while (right < length && this.getCommonAttributesAtRange([ offset, right + 1 ])[attributeName]) {\n      right++\n    }\n\n    return [ left, right ]\n  }\n\n  getTextAtRange(range) {\n    return this.copyWithPieceList(this.pieceList.getSplittableListInRange(range))\n  }\n\n  getStringAtRange(range) {\n    return this.pieceList.getSplittableListInRange(range).toString()\n  }\n\n  getStringAtPosition(position) {\n    return this.getStringAtRange([ position, position + 1 ])\n  }\n\n  startsWithString(string) {\n    return this.getStringAtRange([ 0, string.length ]) === string\n  }\n\n  endsWithString(string) {\n    const length = this.getLength()\n    return this.getStringAtRange([ length - string.length, length ]) === string\n  }\n\n  getAttachmentPieces() {\n    return this.pieceList.toArray().filter((piece) => !!piece.attachment)\n  }\n\n  getAttachments() {\n    return this.getAttachmentPieces().map((piece) => piece.attachment)\n  }\n\n  getAttachmentAndPositionById(attachmentId) {\n    let position = 0\n    for (const piece of this.pieceList.toArray()) {\n      if (piece.attachment?.id === attachmentId) {\n        return { attachment: piece.attachment, position }\n      }\n      position += piece.length\n    }\n    return { attachment: null, position: null }\n  }\n\n  getAttachmentById(attachmentId) {\n    const { attachment } = this.getAttachmentAndPositionById(attachmentId)\n    return attachment\n  }\n\n  getRangeOfAttachment(attachment) {\n    const attachmentAndPosition = this.getAttachmentAndPositionById(attachment.id)\n    const position = attachmentAndPosition.position\n    attachment = attachmentAndPosition.attachment\n    if (attachment) {\n      return [ position, position + 1 ]\n    }\n  }\n\n  updateAttributesForAttachment(attributes, attachment) {\n    const range = this.getRangeOfAttachment(attachment)\n    if (range) {\n      return this.addAttributesAtRange(attributes, range)\n    } else {\n      return this\n    }\n  }\n\n  getLength() {\n    return this.pieceList.getEndPosition()\n  }\n\n  isEmpty() {\n    return this.getLength() === 0\n  }\n\n  isEqualTo(text) {\n    return super.isEqualTo(text) || text?.pieceList?.isEqualTo(this.pieceList)\n  }\n\n  isBlockBreak() {\n    return this.getLength() === 1 && this.pieceList.getObjectAtIndex(0).isBlockBreak()\n  }\n\n  eachPiece(callback) {\n    return this.pieceList.eachObject(callback)\n  }\n\n  getPieces() {\n    return this.pieceList.toArray()\n  }\n\n  getPieceAtPosition(position) {\n    return this.pieceList.getObjectAtPosition(position)\n  }\n\n  contentsForInspection() {\n    return { pieceList: this.pieceList.inspect() }\n  }\n\n  toSerializableText() {\n    const pieceList = this.pieceList.selectSplittableList((piece) => piece.isSerializable())\n    return this.copyWithPieceList(pieceList)\n  }\n\n  toString() {\n    return this.pieceList.toString()\n  }\n\n  toJSON() {\n    return this.pieceList.toJSON()\n  }\n\n  toConsole() {\n    return JSON.stringify(this.pieceList.toArray().map((piece) => JSON.parse(piece.toConsole())))\n  }\n\n  // BIDI\n\n  getDirection() {\n    return getDirection(this.toString())\n  }\n\n  isRTL() {\n    return this.getDirection() === \"rtl\"\n  }\n}\n", "import TrixObject from \"trix/core/object\" // Don't override window.Object\nimport Text from \"trix/models/text\"\n\nimport {\n  arraysAreEqual,\n  getBlockConfig,\n  getListAttributeNames,\n  objectsAreEqual,\n  spliceArray,\n} from \"trix/core/helpers\"\n\nexport default class Block extends TrixObject {\n  static fromJSON(blockJSON) {\n    const text = Text.fromJSON(blockJSON.text)\n    return new this(text, blockJSON.attributes, blockJSON.htmlAttributes)\n  }\n\n  constructor(text, attributes, htmlAttributes) {\n    super(...arguments)\n    this.text = applyBlockBreakToText(text || new Text())\n    this.attributes = attributes || []\n    this.htmlAttributes = htmlAttributes || {}\n  }\n\n  isEmpty() {\n    return this.text.isBlockBreak()\n  }\n\n  isEqualTo(block) {\n    if (super.isEqualTo(block)) return true\n\n    return this.text.isEqualTo(block?.text) && arraysAreEqual(this.attributes, block?.attributes) && objectsAreEqual(this.htmlAttributes, block?.htmlAttributes)\n  }\n\n  copyWithText(text) {\n    return new Block(text, this.attributes, this.htmlAttributes)\n  }\n\n  copyWithoutText() {\n    return this.copyWithText(null)\n  }\n\n  copyWithAttributes(attributes) {\n    return new Block(this.text, attributes, this.htmlAttributes)\n  }\n\n  copyWithoutAttributes() {\n    return this.copyWithAttributes(null)\n  }\n\n  copyUsingObjectMap(objectMap) {\n    const mappedText = objectMap.find(this.text)\n    if (mappedText) {\n      return this.copyWithText(mappedText)\n    } else {\n      return this.copyWithText(this.text.copyUsingObjectMap(objectMap))\n    }\n  }\n\n  addAttribute(attribute) {\n    const attributes = this.attributes.concat(expandAttribute(attribute))\n    return this.copyWithAttributes(attributes)\n  }\n\n  addHTMLAttribute(attribute, value) {\n    const htmlAttributes = Object.assign({}, this.htmlAttributes, { [attribute]: value })\n    return new Block(this.text, this.attributes, htmlAttributes)\n  }\n\n  removeAttribute(attribute) {\n    const { listAttribute } = getBlockConfig(attribute)\n    const attributes = removeLastValue(removeLastValue(this.attributes, attribute), listAttribute)\n    return this.copyWithAttributes(attributes)\n  }\n\n  removeLastAttribute() {\n    return this.removeAttribute(this.getLastAttribute())\n  }\n\n  getLastAttribute() {\n    return getLastElement(this.attributes)\n  }\n\n  getAttributes() {\n    return this.attributes.slice(0)\n  }\n\n  getAttributeLevel() {\n    return this.attributes.length\n  }\n\n  getAttributeAtLevel(level) {\n    return this.attributes[level - 1]\n  }\n\n  hasAttribute(attributeName) {\n    return this.attributes.includes(attributeName)\n  }\n\n  hasAttributes() {\n    return this.getAttributeLevel() > 0\n  }\n\n  getLastNestableAttribute() {\n    return getLastElement(this.getNestableAttributes())\n  }\n\n  getNestableAttributes() {\n    return this.attributes.filter((attribute) => getBlockConfig(attribute).nestable)\n  }\n\n  getNestingLevel() {\n    return this.getNestableAttributes().length\n  }\n\n  decreaseNestingLevel() {\n    const attribute = this.getLastNestableAttribute()\n    if (attribute) {\n      return this.removeAttribute(attribute)\n    } else {\n      return this\n    }\n  }\n\n  increaseNestingLevel() {\n    const attribute = this.getLastNestableAttribute()\n    if (attribute) {\n      const index = this.attributes.lastIndexOf(attribute)\n      const attributes = spliceArray(this.attributes, index + 1, 0, ...expandAttribute(attribute))\n      return this.copyWithAttributes(attributes)\n    } else {\n      return this\n    }\n  }\n\n  getListItemAttributes() {\n    return this.attributes.filter((attribute) => getBlockConfig(attribute).listAttribute)\n  }\n\n  isListItem() {\n    return getBlockConfig(this.getLastAttribute())?.listAttribute\n  }\n\n  isTerminalBlock() {\n    return getBlockConfig(this.getLastAttribute())?.terminal\n  }\n\n  breaksOnReturn() {\n    return getBlockConfig(this.getLastAttribute())?.breakOnReturn\n  }\n\n  findLineBreakInDirectionFromPosition(direction, position) {\n    const string = this.toString()\n    let result\n    switch (direction) {\n      case \"forward\":\n        result = string.indexOf(\"\\n\", position)\n        break\n      case \"backward\":\n        result = string.slice(0, position).lastIndexOf(\"\\n\")\n    }\n\n    if (result !== -1) {\n      return result\n    }\n  }\n\n  contentsForInspection() {\n    return {\n      text: this.text.inspect(),\n      attributes: this.attributes,\n    }\n  }\n\n  toString() {\n    return this.text.toString()\n  }\n\n  toJSON() {\n    return {\n      text: this.text,\n      attributes: this.attributes,\n      htmlAttributes: this.htmlAttributes,\n    }\n  }\n\n  // BIDI\n\n  getDirection() {\n    return this.text.getDirection()\n  }\n\n  isRTL() {\n    return this.text.isRTL()\n  }\n\n  // Splittable\n\n  getLength() {\n    return this.text.getLength()\n  }\n\n  canBeConsolidatedWith(block) {\n    return !this.hasAttributes() && !block.hasAttributes() && this.getDirection() === block.getDirection()\n  }\n\n  consolidateWith(block) {\n    const newlineText = Text.textForStringWithAttributes(\"\\n\")\n    const text = this.getTextWithoutBlockBreak().appendText(newlineText)\n    return this.copyWithText(text.appendText(block.text))\n  }\n\n  splitAtOffset(offset) {\n    let left, right\n    if (offset === 0) {\n      left = null\n      right = this\n    } else if (offset === this.getLength()) {\n      left = this\n      right = null\n    } else {\n      left = this.copyWithText(this.text.getTextAtRange([ 0, offset ]))\n      right = this.copyWithText(this.text.getTextAtRange([ offset, this.getLength() ]))\n    }\n    return [ left, right ]\n  }\n\n  getBlockBreakPosition() {\n    return this.text.getLength() - 1\n  }\n\n  getTextWithoutBlockBreak() {\n    if (textEndsInBlockBreak(this.text)) {\n      return this.text.getTextAtRange([ 0, this.getBlockBreakPosition() ])\n    } else {\n      return this.text.copy()\n    }\n  }\n\n  // Grouping\n\n  canBeGrouped(depth) {\n    return this.attributes[depth]\n  }\n\n  canBeGroupedWith(otherBlock, depth) {\n    const otherAttributes = otherBlock.getAttributes()\n    const otherAttribute = otherAttributes[depth]\n    const attribute = this.attributes[depth]\n\n    return (\n      attribute === otherAttribute &&\n      !(getBlockConfig(attribute).group === false && !getListAttributeNames().includes(otherAttributes[depth + 1])) &&\n      (this.getDirection() === otherBlock.getDirection() || otherBlock.isEmpty())\n    )\n  }\n}\n\n// Block breaks\n\nconst applyBlockBreakToText = function(text) {\n  text = unmarkExistingInnerBlockBreaksInText(text)\n  text = addBlockBreakToText(text)\n  return text\n}\n\nconst unmarkExistingInnerBlockBreaksInText = function(text) {\n  let modified = false\n  const pieces = text.getPieces()\n\n  let innerPieces = pieces.slice(0, pieces.length - 1)\n  const lastPiece = pieces[pieces.length - 1]\n\n  if (!lastPiece) return text\n\n  innerPieces = innerPieces.map((piece) => {\n    if (piece.isBlockBreak()) {\n      modified = true\n      return unmarkBlockBreakPiece(piece)\n    } else {\n      return piece\n    }\n  })\n\n  if (modified) {\n    return new Text([ ...innerPieces, lastPiece ])\n  } else {\n    return text\n  }\n}\n\nconst blockBreakText = Text.textForStringWithAttributes(\"\\n\", { blockBreak: true })\n\nconst addBlockBreakToText = function(text) {\n  if (textEndsInBlockBreak(text)) {\n    return text\n  } else {\n    return text.appendText(blockBreakText)\n  }\n}\n\nconst textEndsInBlockBreak = function(text) {\n  const length = text.getLength()\n  if (length === 0) {\n    return false\n  }\n  const endText = text.getTextAtRange([ length - 1, length ])\n  return endText.isBlockBreak()\n}\n\nconst unmarkBlockBreakPiece = (piece) => piece.copyWithoutAttribute(\"blockBreak\")\n\n// Attributes\n\nconst expandAttribute = function(attribute) {\n  const { listAttribute } = getBlockConfig(attribute)\n  if (listAttribute) {\n    return [ listAttribute, attribute ]\n  } else {\n    return [ attribute ]\n  }\n}\n\n// Array helpers\n\nconst getLastElement = (array) => array.slice(-1)[0]\n\nconst removeLastValue = function(array, value) {\n  const index = array.lastIndexOf(value)\n  if (index === -1) {\n    return array\n  } else {\n    return spliceArray(array, index, 1)\n  }\n}\n", "import * as config from \"trix/config\"\nimport TrixObject from \"trix/core/object\" // Don't override window.Object\n\nimport Text from \"trix/models/text\"\nimport Block from \"trix/models/block\"\nimport SplittableList from \"trix/models/splittable_list\"\nimport Hash from \"trix/core/collections/hash\"\nimport ObjectMap from \"trix/core/collections/object_map\"\n\nimport { arraysAreEqual, getBlockConfig, normalizeRange, rangeIsCollapsed } from \"trix/core/helpers\"\n\nexport default class Document extends TrixObject {\n  static fromJSON(documentJSON) {\n    const blocks = Array.from(documentJSON).map((blockJSON) => Block.fromJSON(blockJSON))\n    return new this(blocks)\n  }\n\n  static fromString(string, textAttributes) {\n    const text = Text.textForStringWithAttributes(string, textAttributes)\n    return new this([ new Block(text) ])\n  }\n\n  constructor(blocks = []) {\n    super(...arguments)\n    if (blocks.length === 0) {\n      blocks = [ new Block() ]\n    }\n    this.blockList = SplittableList.box(blocks)\n  }\n\n  isEmpty() {\n    const block = this.getBlockAtIndex(0)\n    return this.blockList.length === 1 && block.isEmpty() && !block.hasAttributes()\n  }\n\n  copy(options = {}) {\n    const blocks = options.consolidateBlocks ? this.blockList.consolidate().toArray() : this.blockList.toArray()\n\n    return new this.constructor(blocks)\n  }\n\n  copyUsingObjectsFromDocument(sourceDocument) {\n    const objectMap = new ObjectMap(sourceDocument.getObjects())\n    return this.copyUsingObjectMap(objectMap)\n  }\n\n  copyUsingObjectMap(objectMap) {\n    const blocks = this.getBlocks().map((block) => {\n      const mappedBlock = objectMap.find(block)\n      return mappedBlock || block.copyUsingObjectMap(objectMap)\n    })\n    return new this.constructor(blocks)\n  }\n\n  copyWithBaseBlockAttributes(blockAttributes = []) {\n    const blocks = this.getBlocks().map((block) => {\n      const attributes = blockAttributes.concat(block.getAttributes())\n      return block.copyWithAttributes(attributes)\n    })\n\n    return new this.constructor(blocks)\n  }\n\n  replaceBlock(oldBlock, newBlock) {\n    const index = this.blockList.indexOf(oldBlock)\n    if (index === -1) {\n      return this\n    }\n    return new this.constructor(this.blockList.replaceObjectAtIndex(newBlock, index))\n  }\n\n  insertDocumentAtRange(document, range) {\n    const { blockList } = document\n    range = normalizeRange(range)\n    let [ position ] = range\n    const { index, offset } = this.locationFromPosition(position)\n\n    let result = this\n    const block = this.getBlockAtPosition(position)\n\n    if (rangeIsCollapsed(range) && block.isEmpty() && !block.hasAttributes()) {\n      result = new this.constructor(result.blockList.removeObjectAtIndex(index))\n    } else if (block.getBlockBreakPosition() === offset) {\n      position++\n    }\n\n    result = result.removeTextAtRange(range)\n    return new this.constructor(result.blockList.insertSplittableListAtPosition(blockList, position))\n  }\n\n  mergeDocumentAtRange(document, range) {\n    let formattedDocument, result\n    range = normalizeRange(range)\n    const [ startPosition ] = range\n    const startLocation = this.locationFromPosition(startPosition)\n    const blockAttributes = this.getBlockAtIndex(startLocation.index).getAttributes()\n    const baseBlockAttributes = document.getBaseBlockAttributes()\n    const trailingBlockAttributes = blockAttributes.slice(-baseBlockAttributes.length)\n\n    if (arraysAreEqual(baseBlockAttributes, trailingBlockAttributes)) {\n      const leadingBlockAttributes = blockAttributes.slice(0, -baseBlockAttributes.length)\n      formattedDocument = document.copyWithBaseBlockAttributes(leadingBlockAttributes)\n    } else {\n      formattedDocument = document.copy({ consolidateBlocks: true }).copyWithBaseBlockAttributes(blockAttributes)\n    }\n\n    const blockCount = formattedDocument.getBlockCount()\n    const firstBlock = formattedDocument.getBlockAtIndex(0)\n\n    if (arraysAreEqual(blockAttributes, firstBlock.getAttributes())) {\n      const firstText = firstBlock.getTextWithoutBlockBreak()\n      result = this.insertTextAtRange(firstText, range)\n\n      if (blockCount > 1) {\n        formattedDocument = new this.constructor(formattedDocument.getBlocks().slice(1))\n        const position = startPosition + firstText.getLength()\n        result = result.insertDocumentAtRange(formattedDocument, position)\n      }\n    } else {\n      result = this.insertDocumentAtRange(formattedDocument, range)\n    }\n\n    return result\n  }\n\n  insertTextAtRange(text, range) {\n    range = normalizeRange(range)\n    const [ startPosition ] = range\n    const { index, offset } = this.locationFromPosition(startPosition)\n\n    const document = this.removeTextAtRange(range)\n    return new this.constructor(\n      document.blockList.editObjectAtIndex(index, (block) =>\n        block.copyWithText(block.text.insertTextAtPosition(text, offset))\n      )\n    )\n  }\n\n  removeTextAtRange(range) {\n    let blocks\n    range = normalizeRange(range)\n    const [ leftPosition, rightPosition ] = range\n    if (rangeIsCollapsed(range)) {\n      return this\n    }\n    const [ leftLocation, rightLocation ] = Array.from(this.locationRangeFromRange(range))\n\n    const leftIndex = leftLocation.index\n    const leftOffset = leftLocation.offset\n    const leftBlock = this.getBlockAtIndex(leftIndex)\n\n    const rightIndex = rightLocation.index\n    const rightOffset = rightLocation.offset\n    const rightBlock = this.getBlockAtIndex(rightIndex)\n\n    const removeRightNewline =\n      rightPosition - leftPosition === 1 &&\n      leftBlock.getBlockBreakPosition() === leftOffset &&\n      rightBlock.getBlockBreakPosition() !== rightOffset &&\n      rightBlock.text.getStringAtPosition(rightOffset) === \"\\n\"\n\n    if (removeRightNewline) {\n      blocks = this.blockList.editObjectAtIndex(rightIndex, (block) =>\n        block.copyWithText(block.text.removeTextAtRange([ rightOffset, rightOffset + 1 ]))\n      )\n    } else {\n      let block\n      const leftText = leftBlock.text.getTextAtRange([ 0, leftOffset ])\n      const rightText = rightBlock.text.getTextAtRange([ rightOffset, rightBlock.getLength() ])\n      const text = leftText.appendText(rightText)\n\n      const removingLeftBlock = leftIndex !== rightIndex && leftOffset === 0\n      const useRightBlock = removingLeftBlock && leftBlock.getAttributeLevel() >= rightBlock.getAttributeLevel()\n\n      if (useRightBlock) {\n        block = rightBlock.copyWithText(text)\n      } else {\n        block = leftBlock.copyWithText(text)\n      }\n\n      const affectedBlockCount = rightIndex + 1 - leftIndex\n      blocks = this.blockList.splice(leftIndex, affectedBlockCount, block)\n    }\n\n    return new this.constructor(blocks)\n  }\n\n  moveTextFromRangeToPosition(range, position) {\n    let text\n    range = normalizeRange(range)\n    const [ startPosition, endPosition ] = range\n    if (startPosition <= position && position <= endPosition) {\n      return this\n    }\n\n    let document = this.getDocumentAtRange(range)\n    let result = this.removeTextAtRange(range)\n\n    const movingRightward = startPosition < position\n    if (movingRightward) {\n      position -= document.getLength()\n    }\n\n    const [ firstBlock, ...blocks ] = document.getBlocks()\n    if (blocks.length === 0) {\n      text = firstBlock.getTextWithoutBlockBreak()\n      if (movingRightward) {\n        position += 1\n      }\n    } else {\n      text = firstBlock.text\n    }\n\n    result = result.insertTextAtRange(text, position)\n    if (blocks.length === 0) {\n      return result\n    }\n\n    document = new this.constructor(blocks)\n    position += text.getLength()\n\n    return result.insertDocumentAtRange(document, position)\n  }\n\n  addAttributeAtRange(attribute, value, range) {\n    let { blockList } = this\n    this.eachBlockAtRange(\n      range,\n      (block, textRange, index) =>\n        blockList = blockList.editObjectAtIndex(index, function() {\n          if (getBlockConfig(attribute)) {\n            return block.addAttribute(attribute, value)\n          } else {\n            if (textRange[0] === textRange[1]) {\n              return block\n            } else {\n              return block.copyWithText(block.text.addAttributeAtRange(attribute, value, textRange))\n            }\n          }\n        })\n    )\n    return new this.constructor(blockList)\n  }\n\n  addAttribute(attribute, value) {\n    let { blockList } = this\n    this.eachBlock(\n      (block, index) => blockList = blockList.editObjectAtIndex(index, () => block.addAttribute(attribute, value))\n    )\n    return new this.constructor(blockList)\n  }\n\n  removeAttributeAtRange(attribute, range) {\n    let { blockList } = this\n    this.eachBlockAtRange(range, function(block, textRange, index) {\n      if (getBlockConfig(attribute)) {\n        blockList = blockList.editObjectAtIndex(index, () => block.removeAttribute(attribute))\n      } else if (textRange[0] !== textRange[1]) {\n        blockList = blockList.editObjectAtIndex(index, () =>\n          block.copyWithText(block.text.removeAttributeAtRange(attribute, textRange))\n        )\n      }\n    })\n    return new this.constructor(blockList)\n  }\n\n  updateAttributesForAttachment(attributes, attachment) {\n    const range = this.getRangeOfAttachment(attachment)\n    const [ startPosition ] = Array.from(range)\n    const { index } = this.locationFromPosition(startPosition)\n    const text = this.getTextAtIndex(index)\n\n    return new this.constructor(\n      this.blockList.editObjectAtIndex(index, (block) =>\n        block.copyWithText(text.updateAttributesForAttachment(attributes, attachment))\n      )\n    )\n  }\n\n  removeAttributeForAttachment(attribute, attachment) {\n    const range = this.getRangeOfAttachment(attachment)\n    return this.removeAttributeAtRange(attribute, range)\n  }\n\n  setHTMLAttributeAtPosition(position, name, value) {\n    const block = this.getBlockAtPosition(position)\n    const updatedBlock = block.addHTMLAttribute(name, value)\n    return this.replaceBlock(block, updatedBlock)\n  }\n\n  insertBlockBreakAtRange(range) {\n    let blocks\n    range = normalizeRange(range)\n    const [ startPosition ] = range\n    const { offset } = this.locationFromPosition(startPosition)\n\n    const document = this.removeTextAtRange(range)\n    if (offset === 0) {\n      blocks = [ new Block() ]\n    }\n    return new this.constructor(\n      document.blockList.insertSplittableListAtPosition(new SplittableList(blocks), startPosition)\n    )\n  }\n\n  applyBlockAttributeAtRange(attributeName, value, range) {\n    const expanded = this.expandRangeToLineBreaksAndSplitBlocks(range)\n    let document = expanded.document\n    range = expanded.range\n    const blockConfig = getBlockConfig(attributeName)\n\n    if (blockConfig.listAttribute) {\n      document = document.removeLastListAttributeAtRange(range, { exceptAttributeName: attributeName })\n      const converted = document.convertLineBreaksToBlockBreaksInRange(range)\n      document = converted.document\n      range = converted.range\n    } else if (blockConfig.exclusive) {\n      document = document.removeBlockAttributesAtRange(range)\n    } else if (blockConfig.terminal) {\n      document = document.removeLastTerminalAttributeAtRange(range)\n    } else {\n      document = document.consolidateBlocksAtRange(range)\n    }\n\n    return document.addAttributeAtRange(attributeName, value, range)\n  }\n\n  removeLastListAttributeAtRange(range, options = {}) {\n    let { blockList } = this\n    this.eachBlockAtRange(range, function(block, textRange, index) {\n      const lastAttributeName = block.getLastAttribute()\n      if (!lastAttributeName) {\n        return\n      }\n      if (!getBlockConfig(lastAttributeName).listAttribute) {\n        return\n      }\n      if (lastAttributeName === options.exceptAttributeName) {\n        return\n      }\n      blockList = blockList.editObjectAtIndex(index, () => block.removeAttribute(lastAttributeName))\n    })\n    return new this.constructor(blockList)\n  }\n\n  removeLastTerminalAttributeAtRange(range) {\n    let { blockList } = this\n    this.eachBlockAtRange(range, function(block, textRange, index) {\n      const lastAttributeName = block.getLastAttribute()\n      if (!lastAttributeName) {\n        return\n      }\n      if (!getBlockConfig(lastAttributeName).terminal) {\n        return\n      }\n      blockList = blockList.editObjectAtIndex(index, () => block.removeAttribute(lastAttributeName))\n    })\n    return new this.constructor(blockList)\n  }\n\n  removeBlockAttributesAtRange(range) {\n    let { blockList } = this\n    this.eachBlockAtRange(range, function(block, textRange, index) {\n      if (block.hasAttributes()) {\n        blockList = blockList.editObjectAtIndex(index, () => block.copyWithoutAttributes())\n      }\n    })\n    return new this.constructor(blockList)\n  }\n\n  expandRangeToLineBreaksAndSplitBlocks(range) {\n    let position\n    range = normalizeRange(range)\n    let [ startPosition, endPosition ] = range\n    const startLocation = this.locationFromPosition(startPosition)\n    const endLocation = this.locationFromPosition(endPosition)\n    let document = this\n\n    const startBlock = document.getBlockAtIndex(startLocation.index)\n    startLocation.offset = startBlock.findLineBreakInDirectionFromPosition(\"backward\", startLocation.offset)\n    if (startLocation.offset != null) {\n      position = document.positionFromLocation(startLocation)\n      document = document.insertBlockBreakAtRange([ position, position + 1 ])\n      endLocation.index += 1\n      endLocation.offset -= document.getBlockAtIndex(startLocation.index).getLength()\n      startLocation.index += 1\n    }\n    startLocation.offset = 0\n\n    if (endLocation.offset === 0 && endLocation.index > startLocation.index) {\n      endLocation.index -= 1\n      endLocation.offset = document.getBlockAtIndex(endLocation.index).getBlockBreakPosition()\n    } else {\n      const endBlock = document.getBlockAtIndex(endLocation.index)\n      if (endBlock.text.getStringAtRange([ endLocation.offset - 1, endLocation.offset ]) === \"\\n\") {\n        endLocation.offset -= 1\n      } else {\n        endLocation.offset = endBlock.findLineBreakInDirectionFromPosition(\"forward\", endLocation.offset)\n      }\n      if (endLocation.offset !== endBlock.getBlockBreakPosition()) {\n        position = document.positionFromLocation(endLocation)\n        document = document.insertBlockBreakAtRange([ position, position + 1 ])\n      }\n    }\n\n    startPosition = document.positionFromLocation(startLocation)\n    endPosition = document.positionFromLocation(endLocation)\n    range = normalizeRange([ startPosition, endPosition ])\n\n    return { document, range }\n  }\n\n  convertLineBreaksToBlockBreaksInRange(range) {\n    range = normalizeRange(range)\n    let [ position ] = range\n    const string = this.getStringAtRange(range).slice(0, -1)\n    let document = this\n\n    string.replace(/.*?\\n/g, function(match) {\n      position += match.length\n      document = document.insertBlockBreakAtRange([ position - 1, position ])\n    })\n\n    return { document, range }\n  }\n\n  consolidateBlocksAtRange(range) {\n    range = normalizeRange(range)\n    const [ startPosition, endPosition ] = range\n    const startIndex = this.locationFromPosition(startPosition).index\n    const endIndex = this.locationFromPosition(endPosition).index\n    return new this.constructor(this.blockList.consolidateFromIndexToIndex(startIndex, endIndex))\n  }\n\n  getDocumentAtRange(range) {\n    range = normalizeRange(range)\n    const blocks = this.blockList.getSplittableListInRange(range).toArray()\n    return new this.constructor(blocks)\n  }\n\n  getStringAtRange(range) {\n    let endIndex\n    const array = range = normalizeRange(range),\n      endPosition = array[array.length - 1]\n    if (endPosition !== this.getLength()) {\n      endIndex = -1\n    }\n    return this.getDocumentAtRange(range).toString().slice(0, endIndex)\n  }\n\n  getBlockAtIndex(index) {\n    return this.blockList.getObjectAtIndex(index)\n  }\n\n  getBlockAtPosition(position) {\n    const { index } = this.locationFromPosition(position)\n    return this.getBlockAtIndex(index)\n  }\n\n  getTextAtIndex(index) {\n    return this.getBlockAtIndex(index)?.text\n  }\n\n  getTextAtPosition(position) {\n    const { index } = this.locationFromPosition(position)\n    return this.getTextAtIndex(index)\n  }\n\n  getPieceAtPosition(position) {\n    const { index, offset } = this.locationFromPosition(position)\n    return this.getTextAtIndex(index).getPieceAtPosition(offset)\n  }\n\n  getCharacterAtPosition(position) {\n    const { index, offset } = this.locationFromPosition(position)\n    return this.getTextAtIndex(index).getStringAtRange([ offset, offset + 1 ])\n  }\n\n  getLength() {\n    return this.blockList.getEndPosition()\n  }\n\n  getBlocks() {\n    return this.blockList.toArray()\n  }\n\n  getBlockCount() {\n    return this.blockList.length\n  }\n\n  getEditCount() {\n    return this.editCount\n  }\n\n  eachBlock(callback) {\n    return this.blockList.eachObject(callback)\n  }\n\n  eachBlockAtRange(range, callback) {\n    let block, textRange\n    range = normalizeRange(range)\n    const [ startPosition, endPosition ] = range\n    const startLocation = this.locationFromPosition(startPosition)\n    const endLocation = this.locationFromPosition(endPosition)\n\n    if (startLocation.index === endLocation.index) {\n      block = this.getBlockAtIndex(startLocation.index)\n      textRange = [ startLocation.offset, endLocation.offset ]\n      return callback(block, textRange, startLocation.index)\n    } else {\n      for (let index = startLocation.index; index <= endLocation.index; index++) {\n        block = this.getBlockAtIndex(index)\n        if (block) {\n          switch (index) {\n            case startLocation.index:\n              textRange = [ startLocation.offset, block.text.getLength() ]\n              break\n            case endLocation.index:\n              textRange = [ 0, endLocation.offset ]\n              break\n            default:\n              textRange = [ 0, block.text.getLength() ]\n          }\n          callback(block, textRange, index)\n        }\n      }\n    }\n  }\n\n  getCommonAttributesAtRange(range) {\n    range = normalizeRange(range)\n    const [ startPosition ] = range\n    if (rangeIsCollapsed(range)) {\n      return this.getCommonAttributesAtPosition(startPosition)\n    } else {\n      const textAttributes = []\n      const blockAttributes = []\n\n      this.eachBlockAtRange(range, function(block, textRange) {\n        if (textRange[0] !== textRange[1]) {\n          textAttributes.push(block.text.getCommonAttributesAtRange(textRange))\n          return blockAttributes.push(attributesForBlock(block))\n        }\n      })\n\n      return Hash.fromCommonAttributesOfObjects(textAttributes)\n        .merge(Hash.fromCommonAttributesOfObjects(blockAttributes))\n        .toObject()\n    }\n  }\n\n  getCommonAttributesAtPosition(position) {\n    let key, value\n    const { index, offset } = this.locationFromPosition(position)\n    const block = this.getBlockAtIndex(index)\n    if (!block) {\n      return {}\n    }\n\n    const commonAttributes = attributesForBlock(block)\n    const attributes = block.text.getAttributesAtPosition(offset)\n    const attributesLeft = block.text.getAttributesAtPosition(offset - 1)\n    const inheritableAttributes = Object.keys(config.textAttributes).filter((key) => {\n      return config.textAttributes[key].inheritable\n    })\n\n    for (key in attributesLeft) {\n      value = attributesLeft[key]\n      if (value === attributes[key] || inheritableAttributes.includes(key)) {\n        commonAttributes[key] = value\n      }\n    }\n\n    return commonAttributes\n  }\n\n  getRangeOfCommonAttributeAtPosition(attributeName, position) {\n    const { index, offset } = this.locationFromPosition(position)\n    const text = this.getTextAtIndex(index)\n    const [ startOffset, endOffset ] = Array.from(text.getExpandedRangeForAttributeAtOffset(attributeName, offset))\n\n    const start = this.positionFromLocation({ index, offset: startOffset })\n    const end = this.positionFromLocation({ index, offset: endOffset })\n    return normalizeRange([ start, end ])\n  }\n\n  getBaseBlockAttributes() {\n    let baseBlockAttributes = this.getBlockAtIndex(0).getAttributes()\n\n    for (let blockIndex = 1; blockIndex < this.getBlockCount(); blockIndex++) {\n      const blockAttributes = this.getBlockAtIndex(blockIndex).getAttributes()\n      const lastAttributeIndex = Math.min(baseBlockAttributes.length, blockAttributes.length)\n\n      baseBlockAttributes = (() => {\n        const result = []\n        for (let index = 0; index < lastAttributeIndex; index++) {\n          if (blockAttributes[index] !== baseBlockAttributes[index]) {\n            break\n          }\n          result.push(blockAttributes[index])\n        }\n        return result\n      })()\n    }\n\n    return baseBlockAttributes\n  }\n\n  getAttachmentById(attachmentId) {\n    for (const attachment of this.getAttachments()) {\n      if (attachment.id === attachmentId) {\n        return attachment\n      }\n    }\n  }\n\n  getAttachmentPieces() {\n    let attachmentPieces = []\n    this.blockList.eachObject(({ text }) => attachmentPieces = attachmentPieces.concat(text.getAttachmentPieces()))\n    return attachmentPieces\n  }\n\n  getAttachments() {\n    return this.getAttachmentPieces().map((piece) => piece.attachment)\n  }\n\n  getRangeOfAttachment(attachment) {\n    let position = 0\n    const iterable = this.blockList.toArray()\n    for (let index = 0; index < iterable.length; index++) {\n      const { text } = iterable[index]\n      const textRange = text.getRangeOfAttachment(attachment)\n      if (textRange) {\n        return normalizeRange([ position + textRange[0], position + textRange[1] ])\n      }\n      position += text.getLength()\n    }\n  }\n\n  getLocationRangeOfAttachment(attachment) {\n    const range = this.getRangeOfAttachment(attachment)\n    return this.locationRangeFromRange(range)\n  }\n\n  getAttachmentPieceForAttachment(attachment) {\n    for (const piece of this.getAttachmentPieces()) {\n      if (piece.attachment === attachment) {\n        return piece\n      }\n    }\n  }\n\n  findRangesForBlockAttribute(attributeName) {\n    let position = 0\n    const ranges = []\n\n    this.getBlocks().forEach((block) => {\n      const length = block.getLength()\n      if (block.hasAttribute(attributeName)) {\n        ranges.push([ position, position + length ])\n      }\n      position += length\n    })\n\n    return ranges\n  }\n\n  findRangesForTextAttribute(attributeName, { withValue } = {}) {\n    let position = 0\n    let range = []\n    const ranges = []\n\n    const match = function(piece) {\n      if (withValue) {\n        return piece.getAttribute(attributeName) === withValue\n      } else {\n        return piece.hasAttribute(attributeName)\n      }\n    }\n\n    this.getPieces().forEach((piece) => {\n      const length = piece.getLength()\n      if (match(piece)) {\n        if (range[1] === position) {\n          range[1] = position + length\n        } else {\n          ranges.push(range = [ position, position + length ])\n        }\n      }\n      position += length\n    })\n\n    return ranges\n  }\n\n  locationFromPosition(position) {\n    const location = this.blockList.findIndexAndOffsetAtPosition(Math.max(0, position))\n    if (location.index != null) {\n      return location\n    } else {\n      const blocks = this.getBlocks()\n      return { index: blocks.length - 1, offset: blocks[blocks.length - 1].getLength() }\n    }\n  }\n\n  positionFromLocation(location) {\n    return this.blockList.findPositionAtIndexAndOffset(location.index, location.offset)\n  }\n\n  locationRangeFromPosition(position) {\n    return normalizeRange(this.locationFromPosition(position))\n  }\n\n  locationRangeFromRange(range) {\n    range = normalizeRange(range)\n    if (!range) return\n\n    const [ startPosition, endPosition ] = Array.from(range)\n    const startLocation = this.locationFromPosition(startPosition)\n    const endLocation = this.locationFromPosition(endPosition)\n    return normalizeRange([ startLocation, endLocation ])\n  }\n\n  rangeFromLocationRange(locationRange) {\n    let rightPosition\n    locationRange = normalizeRange(locationRange)\n    const leftPosition = this.positionFromLocation(locationRange[0])\n    if (!rangeIsCollapsed(locationRange)) {\n      rightPosition = this.positionFromLocation(locationRange[1])\n    }\n    return normalizeRange([ leftPosition, rightPosition ])\n  }\n\n  isEqualTo(document) {\n    return this.blockList.isEqualTo(document?.blockList)\n  }\n\n  getTexts() {\n    return this.getBlocks().map((block) => block.text)\n  }\n\n  getPieces() {\n    const pieces = []\n\n    Array.from(this.getTexts()).forEach((text) => {\n      pieces.push(...Array.from(text.getPieces() || []))\n    })\n\n    return pieces\n  }\n\n  getObjects() {\n    return this.getBlocks().concat(this.getTexts()).concat(this.getPieces())\n  }\n\n  toSerializableDocument() {\n    const blocks = []\n    this.blockList.eachObject((block) => blocks.push(block.copyWithText(block.text.toSerializableText())))\n    return new this.constructor(blocks)\n  }\n\n  toString() {\n    return this.blockList.toString()\n  }\n\n  toJSON() {\n    return this.blockList.toJSON()\n  }\n\n  toConsole() {\n    return JSON.stringify(this.blockList.toArray().map((block) => JSON.parse(block.text.toConsole())))\n  }\n}\n\nconst attributesForBlock = function(block) {\n  const attributes = {}\n  const attributeName = block.getLastAttribute()\n  if (attributeName) {\n    attributes[attributeName] = true\n  }\n  return attributes\n}\n", "/* eslint-disable\n    no-case-declarations,\n    no-irregular-whitespace,\n*/\nimport * as config from \"trix/config\"\nimport BasicObject from \"trix/core/basic_object\"\nimport Document from \"trix/models/document\"\nimport HTMLSanitizer from \"trix/models/html_sanitizer\"\n\nimport {\n  arraysAreEqual,\n  breakableWhitespacePattern,\n  elementContainsNode,\n  findClosestElementFromNode,\n  getBlockTagNames,\n  makeElement,\n  nodeIsAttachmentElement,\n  normalizeSpaces,\n  removeNode,\n  squishBreakableWhitespace,\n  tagName,\n  walkTree,\n} from \"trix/core/helpers\"\n\nconst pieceForString = (string, attributes = {}) => {\n  const type = \"string\"\n  string = normalizeSpaces(string)\n  return { string, attributes, type }\n}\n\nconst pieceForAttachment = (attachment, attributes = {}) => {\n  const type = \"attachment\"\n  return { attachment, attributes, type }\n}\n\nconst blockForAttributes = (attributes = {}, htmlAttributes = {}) => {\n  const text = []\n  return { text, attributes, htmlAttributes }\n}\n\nconst parseTrixDataAttribute = (element, name) => {\n  try {\n    return JSON.parse(element.getAttribute(`data-trix-${name}`))\n  } catch (error) {\n    return {}\n  }\n}\n\nconst getImageDimensions = (element) => {\n  const width = element.getAttribute(\"width\")\n  const height = element.getAttribute(\"height\")\n  const dimensions = {}\n  if (width) {\n    dimensions.width = parseInt(width, 10)\n  }\n  if (height) {\n    dimensions.height = parseInt(height, 10)\n  }\n  return dimensions\n}\n\nexport default class HTMLParser extends BasicObject {\n  static parse(html, options) {\n    const parser = new this(html, options)\n    parser.parse()\n    return parser\n  }\n\n  constructor(html, { referenceElement, purifyOptions } = {}) {\n    super(...arguments)\n    this.html = html\n    this.referenceElement = referenceElement\n    this.purifyOptions = purifyOptions\n    this.blocks = []\n    this.blockElements = []\n    this.processedElements = []\n  }\n\n  getDocument() {\n    return Document.fromJSON(this.blocks)\n  }\n\n  // HTML parsing\n\n  parse() {\n    try {\n      this.createHiddenContainer()\n      HTMLSanitizer.setHTML(this.containerElement, this.html, { purifyOptions: this.purifyOptions })\n      const walker = walkTree(this.containerElement, { usingFilter: nodeFilter })\n      while (walker.nextNode()) {\n        this.processNode(walker.currentNode)\n      }\n      return this.translateBlockElementMarginsToNewlines()\n    } finally {\n      this.removeHiddenContainer()\n    }\n  }\n\n  createHiddenContainer() {\n    if (this.referenceElement) {\n      this.containerElement = this.referenceElement.cloneNode(false)\n      this.containerElement.removeAttribute(\"id\")\n      this.containerElement.setAttribute(\"data-trix-internal\", \"\")\n      this.containerElement.style.display = \"none\"\n      return this.referenceElement.parentNode.insertBefore(this.containerElement, this.referenceElement.nextSibling)\n    } else {\n      this.containerElement = makeElement({ tagName: \"div\", style: { display: \"none\" } })\n      return document.body.appendChild(this.containerElement)\n    }\n  }\n\n  removeHiddenContainer() {\n    return removeNode(this.containerElement)\n  }\n\n  processNode(node) {\n    switch (node.nodeType) {\n      case Node.TEXT_NODE:\n        if (!this.isInsignificantTextNode(node)) {\n          this.appendBlockForTextNode(node)\n          return this.processTextNode(node)\n        }\n        break\n      case Node.ELEMENT_NODE:\n        this.appendBlockForElement(node)\n        return this.processElement(node)\n    }\n  }\n\n  appendBlockForTextNode(node) {\n    const element = node.parentNode\n    if (element === this.currentBlockElement && this.isBlockElement(node.previousSibling)) {\n      return this.appendStringWithAttributes(\"\\n\")\n    } else if (element === this.containerElement || this.isBlockElement(element)) {\n      const attributes = this.getBlockAttributes(element)\n      const htmlAttributes = this.getBlockHTMLAttributes(element)\n      if (!arraysAreEqual(attributes, this.currentBlock?.attributes)) {\n        this.currentBlock = this.appendBlockForAttributesWithElement(attributes, element, htmlAttributes)\n        this.currentBlockElement = element\n      }\n    }\n  }\n\n  appendBlockForElement(element) {\n    const elementIsBlockElement = this.isBlockElement(element)\n    const currentBlockContainsElement = elementContainsNode(this.currentBlockElement, element)\n\n    if (elementIsBlockElement && !this.isBlockElement(element.firstChild)) {\n      if (!this.isInsignificantTextNode(element.firstChild) || !this.isBlockElement(element.firstElementChild)) {\n        const attributes = this.getBlockAttributes(element)\n        const htmlAttributes = this.getBlockHTMLAttributes(element)\n        if (element.firstChild) {\n          if (!(currentBlockContainsElement && arraysAreEqual(attributes, this.currentBlock.attributes))) {\n            this.currentBlock = this.appendBlockForAttributesWithElement(attributes, element, htmlAttributes)\n            this.currentBlockElement = element\n          } else {\n            return this.appendStringWithAttributes(\"\\n\")\n          }\n        }\n      }\n    } else if (this.currentBlockElement && !currentBlockContainsElement && !elementIsBlockElement) {\n      const parentBlockElement = this.findParentBlockElement(element)\n      if (parentBlockElement) {\n        return this.appendBlockForElement(parentBlockElement)\n      } else {\n        this.currentBlock = this.appendEmptyBlock()\n        this.currentBlockElement = null\n      }\n    }\n  }\n\n  findParentBlockElement(element) {\n    let { parentElement } = element\n    while (parentElement && parentElement !== this.containerElement) {\n      if (this.isBlockElement(parentElement) && this.blockElements.includes(parentElement)) {\n        return parentElement\n      } else {\n        parentElement = parentElement.parentElement\n      }\n    }\n    return null\n  }\n\n  processTextNode(node) {\n    let string = node.data\n    if (!elementCanDisplayPreformattedText(node.parentNode)) {\n      string = squishBreakableWhitespace(string)\n      if (stringEndsWithWhitespace(node.previousSibling?.textContent)) {\n        string = leftTrimBreakableWhitespace(string)\n      }\n    }\n    return this.appendStringWithAttributes(string, this.getTextAttributes(node.parentNode))\n  }\n\n  processElement(element) {\n    let attributes\n    if (nodeIsAttachmentElement(element)) {\n      attributes = parseTrixDataAttribute(element, \"attachment\")\n      if (Object.keys(attributes).length) {\n        const textAttributes = this.getTextAttributes(element)\n        this.appendAttachmentWithAttributes(attributes, textAttributes)\n        // We have everything we need so avoid processing inner nodes\n        element.innerHTML = \"\"\n      }\n      return this.processedElements.push(element)\n    } else {\n      switch (tagName(element)) {\n        case \"br\":\n          if (!this.isExtraBR(element) && !this.isBlockElement(element.nextSibling)) {\n            this.appendStringWithAttributes(\"\\n\", this.getTextAttributes(element))\n          }\n          return this.processedElements.push(element)\n        case \"img\":\n          attributes = { url: element.getAttribute(\"src\"), contentType: \"image\" }\n          const object = getImageDimensions(element)\n          for (const key in object) {\n            const value = object[key]\n            attributes[key] = value\n          }\n          this.appendAttachmentWithAttributes(attributes, this.getTextAttributes(element))\n          return this.processedElements.push(element)\n        case \"tr\":\n          if (this.needsTableSeparator(element)) {\n            return this.appendStringWithAttributes(config.parser.tableRowSeparator)\n          }\n          break\n        case \"td\":\n          if (this.needsTableSeparator(element)) {\n            return this.appendStringWithAttributes(config.parser.tableCellSeparator)\n          }\n          break\n      }\n    }\n  }\n\n  // Document construction\n\n  appendBlockForAttributesWithElement(attributes, element, htmlAttributes = {}) {\n    this.blockElements.push(element)\n    const block = blockForAttributes(attributes, htmlAttributes)\n    this.blocks.push(block)\n    return block\n  }\n\n  appendEmptyBlock() {\n    return this.appendBlockForAttributesWithElement([], null)\n  }\n\n  appendStringWithAttributes(string, attributes) {\n    return this.appendPiece(pieceForString(string, attributes))\n  }\n\n  appendAttachmentWithAttributes(attachment, attributes) {\n    return this.appendPiece(pieceForAttachment(attachment, attributes))\n  }\n\n  appendPiece(piece) {\n    if (this.blocks.length === 0) {\n      this.appendEmptyBlock()\n    }\n    return this.blocks[this.blocks.length - 1].text.push(piece)\n  }\n\n  appendStringToTextAtIndex(string, index) {\n    const { text } = this.blocks[index]\n    const piece = text[text.length - 1]\n\n    if (piece?.type === \"string\") {\n      piece.string += string\n    } else {\n      return text.push(pieceForString(string))\n    }\n  }\n\n  prependStringToTextAtIndex(string, index) {\n    const { text } = this.blocks[index]\n    const piece = text[0]\n\n    if (piece?.type === \"string\") {\n      piece.string = string + piece.string\n    } else {\n      return text.unshift(pieceForString(string))\n    }\n  }\n\n  // Attribute parsing\n\n  getTextAttributes(element) {\n    let value\n    const attributes = {}\n    for (const attribute in config.textAttributes) {\n      const configAttr = config.textAttributes[attribute]\n      if (\n        configAttr.tagName &&\n        findClosestElementFromNode(element, {\n          matchingSelector: configAttr.tagName,\n          untilNode: this.containerElement,\n        })\n      ) {\n        attributes[attribute] = true\n      } else if (configAttr.parser) {\n        value = configAttr.parser(element)\n        if (value) {\n          let attributeInheritedFromBlock = false\n          for (const blockElement of this.findBlockElementAncestors(element)) {\n            if (configAttr.parser(blockElement) === value) {\n              attributeInheritedFromBlock = true\n              break\n            }\n          }\n          if (!attributeInheritedFromBlock) {\n            attributes[attribute] = value\n          }\n        }\n      } else if (configAttr.styleProperty) {\n        value = element.style[configAttr.styleProperty]\n        if (value) {\n          attributes[attribute] = value\n        }\n      }\n    }\n\n    if (nodeIsAttachmentElement(element)) {\n      const object = parseTrixDataAttribute(element, \"attributes\")\n      for (const key in object) {\n        value = object[key]\n        attributes[key] = value\n      }\n    }\n\n    return attributes\n  }\n\n  getBlockAttributes(element) {\n    const attributes = []\n    while (element && element !== this.containerElement) {\n      for (const attribute in config.blockAttributes) {\n        const attrConfig = config.blockAttributes[attribute]\n        if (attrConfig.parse !== false) {\n          if (tagName(element) === attrConfig.tagName) {\n            if (attrConfig.test?.(element) || !attrConfig.test) {\n              attributes.push(attribute)\n              if (attrConfig.listAttribute) {\n                attributes.push(attrConfig.listAttribute)\n              }\n            }\n          }\n        }\n      }\n      element = element.parentNode\n    }\n    return attributes.reverse()\n  }\n\n  getBlockHTMLAttributes(element) {\n    const attributes = {}\n    const blockConfig = Object.values(config.blockAttributes).find(settings => settings.tagName === tagName(element))\n    const allowedAttributes = blockConfig?.htmlAttributes || []\n\n    allowedAttributes.forEach((attribute) => {\n      if (element.hasAttribute(attribute)) {\n        attributes[attribute] = element.getAttribute(attribute)\n      }\n    })\n\n    return attributes\n  }\n\n  findBlockElementAncestors(element) {\n    const ancestors = []\n    while (element && element !== this.containerElement) {\n      const tag = tagName(element)\n      if (getBlockTagNames().includes(tag)) {\n        ancestors.push(element)\n      }\n      element = element.parentNode\n    }\n    return ancestors\n  }\n\n  // Element inspection\n\n  isBlockElement(element) {\n    if (element?.nodeType !== Node.ELEMENT_NODE) return\n    if (nodeIsAttachmentElement(element)) return\n    if (findClosestElementFromNode(element, { matchingSelector: \"td\", untilNode: this.containerElement })) return\n\n    return getBlockTagNames().includes(tagName(element)) ||\n      window.getComputedStyle(element).display === \"block\"\n  }\n\n  isInsignificantTextNode(node) {\n    if (node?.nodeType !== Node.TEXT_NODE) return\n    if (!stringIsAllBreakableWhitespace(node.data)) return\n    const { parentNode, previousSibling, nextSibling } = node\n    if (nodeEndsWithNonWhitespace(parentNode.previousSibling) && !this.isBlockElement(parentNode.previousSibling)) return\n    if (elementCanDisplayPreformattedText(parentNode)) return\n    return !previousSibling || this.isBlockElement(previousSibling) || !nextSibling || this.isBlockElement(nextSibling)\n  }\n\n  isExtraBR(element) {\n    return tagName(element) === \"br\" && this.isBlockElement(element.parentNode) && element.parentNode.lastChild === element\n  }\n\n  needsTableSeparator(element) {\n    if (config.parser.removeBlankTableCells) {\n      const content = element.previousSibling?.textContent\n      return content && /\\S/.test(content)\n    } else {\n      return element.previousSibling\n    }\n  }\n\n  // Margin translation\n\n  translateBlockElementMarginsToNewlines() {\n    const defaultMargin = this.getMarginOfDefaultBlockElement()\n\n    for (let index = 0; index < this.blocks.length; index++) {\n      const margin = this.getMarginOfBlockElementAtIndex(index)\n      if (margin) {\n        if (margin.top > defaultMargin.top * 2) {\n          this.prependStringToTextAtIndex(\"\\n\", index)\n        }\n\n        if (margin.bottom > defaultMargin.bottom * 2) {\n          this.appendStringToTextAtIndex(\"\\n\", index)\n        }\n      }\n    }\n  }\n\n  getMarginOfBlockElementAtIndex(index) {\n    const element = this.blockElements[index]\n    if (element) {\n      if (element.textContent) {\n        if (!getBlockTagNames().includes(tagName(element)) && !this.processedElements.includes(element)) {\n          return getBlockElementMargin(element)\n        }\n      }\n    }\n  }\n\n  getMarginOfDefaultBlockElement() {\n    const element = makeElement(config.blockAttributes.default.tagName)\n    this.containerElement.appendChild(element)\n    return getBlockElementMargin(element)\n  }\n}\n\n// Helpers\n\nconst elementCanDisplayPreformattedText = function(element) {\n  const { whiteSpace } = window.getComputedStyle(element)\n  return [ \"pre\", \"pre-wrap\", \"pre-line\" ].includes(whiteSpace)\n}\n\nconst nodeEndsWithNonWhitespace = (node) => node && !stringEndsWithWhitespace(node.textContent)\n\nconst getBlockElementMargin = function(element) {\n  const style = window.getComputedStyle(element)\n  if (style.display === \"block\") {\n    return { top: parseInt(style.marginTop), bottom: parseInt(style.marginBottom) }\n  }\n}\n\nconst nodeFilter = function(node) {\n  if (tagName(node) === \"style\") {\n    return NodeFilter.FILTER_REJECT\n  } else {\n    return NodeFilter.FILTER_ACCEPT\n  }\n}\n\n// Whitespace\n\nconst leftTrimBreakableWhitespace = (string) => string.replace(new RegExp(`^${breakableWhitespacePattern.source}+`), \"\")\n\nconst stringIsAllBreakableWhitespace = (string) => new RegExp(`^${breakableWhitespacePattern.source}*$`).test(string)\n\nconst stringEndsWithWhitespace = (string) => /\\s$/.test(string)\n", "/* eslint-disable\n    no-empty,\n*/\nimport { removeNode } from \"trix/core/helpers\"\n\nimport DocumentView from \"trix/views/document_view\"\nimport Document from \"trix/models/document\"\nimport HTMLParser from \"trix/models/html_parser\"\n\nconst unserializableElementSelector = \"[data-trix-serialize=false]\"\nconst unserializableAttributeNames = [\n  \"contenteditable\",\n  \"data-trix-id\",\n  \"data-trix-store-key\",\n  \"data-trix-mutable\",\n  \"data-trix-placeholder\",\n  \"tabindex\",\n]\nconst serializedAttributesAttribute = \"data-trix-serialized-attributes\"\nconst serializedAttributesSelector = `[${serializedAttributesAttribute}]`\n\nconst blockCommentPattern = new RegExp(\"<!--block-->\", \"g\")\n\nconst serializers = {\n  \"application/json\": function(serializable) {\n    let document\n    if (serializable instanceof Document) {\n      document = serializable\n    } else if (serializable instanceof HTMLElement) {\n      document = HTMLParser.parse(serializable.innerHTML).getDocument()\n    } else {\n      throw new Error(\"unserializable object\")\n    }\n\n    return document.toSerializableDocument().toJSONString()\n  },\n\n  \"text/html\": function(serializable) {\n    let element\n    if (serializable instanceof Document) {\n      element = DocumentView.render(serializable)\n    } else if (serializable instanceof HTMLElement) {\n      element = serializable.cloneNode(true)\n    } else {\n      throw new Error(\"unserializable object\")\n    }\n\n    // Remove unserializable elements\n    Array.from(element.querySelectorAll(unserializableElementSelector)).forEach((el) => {\n      removeNode(el)\n    })\n\n    // Remove unserializable attributes\n    unserializableAttributeNames.forEach((attribute) => {\n      Array.from(element.querySelectorAll(`[${attribute}]`)).forEach((el) => {\n        el.removeAttribute(attribute)\n      })\n    })\n\n    // Rewrite elements with serialized attribute overrides\n    Array.from(element.querySelectorAll(serializedAttributesSelector)).forEach((el) => {\n      try {\n        const attributes = JSON.parse(el.getAttribute(serializedAttributesAttribute))\n        el.removeAttribute(serializedAttributesAttribute)\n        for (const name in attributes) {\n          const value = attributes[name]\n          el.setAttribute(name, value)\n        }\n      } catch (error) {}\n    })\n\n    return element.innerHTML.replace(blockCommentPattern, \"\")\n  },\n}\n\nconst deserializers = {\n  \"application/json\": function(string) {\n    return Document.fromJSONString(string)\n  },\n\n  \"text/html\": function(string) {\n    return HTMLParser.parse(string).getDocument()\n  },\n}\n\nexport const serializeToContentType = function(serializable, contentType) {\n  const serializer = serializers[contentType]\n  if (serializer) {\n    return serializer(serializable)\n  } else {\n    throw new Error(`unknown content type: ${contentType}`)\n  }\n}\n\nexport const deserializeFromContentType = function(string, contentType) {\n  const deserializer = deserializers[contentType]\n  if (deserializer) {\n    return deserializer(string)\n  } else {\n    throw new Error(`unknown content type: ${contentType}`)\n  }\n}\n", "import \"trix/models/attachment\"\nimport BasicObject from \"trix/core/basic_object\"\n\nexport default class ManagedAttachment extends BasicObject {\n  constructor(attachmentManager, attachment) {\n    super(...arguments)\n    this.attachmentManager = attachmentManager\n    this.attachment = attachment\n    this.id = this.attachment.id\n    this.file = this.attachment.file\n  }\n\n  remove() {\n    return this.attachmentManager.requestRemovalOfAttachment(this.attachment)\n  }\n}\n\nManagedAttachment.proxyMethod(\"attachment.getAttribute\")\nManagedAttachment.proxyMethod(\"attachment.hasAttribute\")\nManagedAttachment.proxyMethod(\"attachment.setAttribute\")\nManagedAttachment.proxyMethod(\"attachment.getAttributes\")\nManagedAttachment.proxyMethod(\"attachment.setAttributes\")\nManagedAttachment.proxyMethod(\"attachment.isPending\")\nManagedAttachment.proxyMethod(\"attachment.isPreviewable\")\nManagedAttachment.proxyMethod(\"attachment.getURL\")\nManagedAttachment.proxyMethod(\"attachment.getPreviewURL\")\nManagedAttachment.proxyMethod(\"attachment.setPreviewURL\")\nManagedAttachment.proxyMethod(\"attachment.getHref\")\nManagedAttachment.proxyMethod(\"attachment.getFilename\")\nManagedAttachment.proxyMethod(\"attachment.getFilesize\")\nManagedAttachment.proxyMethod(\"attachment.getFormattedFilesize\")\nManagedAttachment.proxyMethod(\"attachment.getExtension\")\nManagedAttachment.proxyMethod(\"attachment.getContentType\")\nManagedAttachment.proxyMethod(\"attachment.getFile\")\nManagedAttachment.proxyMethod(\"attachment.setFile\")\nManagedAttachment.proxyMethod(\"attachment.releaseFile\")\nManagedAttachment.proxyMethod(\"attachment.getUploadProgress\")\nManagedAttachment.proxyMethod(\"attachment.setUploadProgress\")\n\n", "import ManagedAttachment from \"trix/models/managed_attachment\"\nimport BasicObject from \"trix/core/basic_object\"\n\nexport default class AttachmentManager extends BasicObject {\n  constructor(attachments = []) {\n    super(...arguments)\n    this.managedAttachments = {}\n    Array.from(attachments).forEach((attachment) => {\n      this.manageAttachment(attachment)\n    })\n  }\n\n  getAttachments() {\n    const result = []\n    for (const id in this.managedAttachments) {\n      const attachment = this.managedAttachments[id]\n      result.push(attachment)\n    }\n    return result\n  }\n\n  manageAttachment(attachment) {\n    if (!this.managedAttachments[attachment.id]) {\n      this.managedAttachments[attachment.id] = new ManagedAttachment(this, attachment)\n    }\n    return this.managedAttachments[attachment.id]\n  }\n\n  attachmentIsManaged(attachment) {\n    return attachment.id in this.managedAttachments\n  }\n\n  requestRemovalOfAttachment(attachment) {\n    if (this.attachmentIsManaged(attachment)) {\n      return this.delegate?.attachmentManagerDidRequestRemovalOfAttachment?.(attachment)\n    }\n  }\n\n  unmanageAttachment(attachment) {\n    const managedAttachment = this.managedAttachments[attachment.id]\n    delete this.managedAttachments[attachment.id]\n    return managedAttachment\n  }\n}\n", "export default class LineBreakInsertion {\n  constructor(composition) {\n    this.composition = composition\n    this.document = this.composition.document\n    const selectedRange = this.composition.getSelectedRange()\n    this.startPosition = selectedRange[0]\n    this.endPosition = selectedRange[1]\n\n    this.startLocation = this.document.locationFromPosition(this.startPosition)\n    this.endLocation = this.document.locationFromPosition(this.endPosition)\n\n    this.block = this.document.getBlockAtIndex(this.endLocation.index)\n    this.breaksOnReturn = this.block.breaksOnReturn()\n    this.previousCharacter = this.block.text.getStringAtPosition(this.endLocation.offset - 1)\n    this.nextCharacter = this.block.text.getStringAtPosition(this.endLocation.offset)\n  }\n\n  shouldInsertBlockBreak() {\n    if (this.block.hasAttributes() && this.block.isListItem() && !this.block.isEmpty()) {\n      return this.startLocation.offset !== 0\n    } else {\n      return this.breaksOnReturn && this.nextCharacter !== \"\\n\"\n    }\n  }\n\n  shouldBreakFormattedBlock() {\n    return (\n      this.block.hasAttributes() &&\n      !this.block.isListItem() &&\n      (this.breaksOnReturn && this.nextCharacter === \"\\n\" || this.previousCharacter === \"\\n\")\n    )\n  }\n\n  shouldDecreaseListLevel() {\n    return this.block.hasAttributes() && this.block.isListItem() && this.block.isEmpty()\n  }\n\n  shouldPrependListItem() {\n    return this.block.isListItem() && this.startLocation.offset === 0 && !this.block.isEmpty()\n  }\n\n  shouldRemoveLastBlockAttribute() {\n    return this.block.hasAttributes() && !this.block.isListItem() && this.block.isEmpty()\n  }\n}\n", "import * as config from \"trix/config\"\nimport { OBJECT_REPLACEMENT_CHARACTER } from \"trix/constants\"\n\nimport BasicObject from \"trix/core/basic_object\"\nimport Text from \"trix/models/text\"\nimport Block from \"trix/models/block\"\nimport Attachment from \"trix/models/attachment\"\nimport Document from \"trix/models/document\"\nimport HTMLParser from \"trix/models/html_parser\"\nimport LineBreakInsertion from \"trix/models/line_break_insertion\"\n\nimport {\n  arrayStartsWith,\n  extend,\n  getAllAttributeNames,\n  getBlockConfig,\n  getTextConfig,\n  normalizeRange,\n  objectsAreEqual,\n  rangeIsCollapsed,\n  rangesAreEqual,\n  summarizeArrayChange,\n} from \"trix/core/helpers\"\n\nconst PLACEHOLDER = \" \"\n\nexport default class Composition extends BasicObject {\n  constructor() {\n    super(...arguments)\n    this.document = new Document()\n    this.attachments = []\n    this.currentAttributes = {}\n    this.revision = 0\n  }\n\n  setDocument(document) {\n    if (!document.isEqualTo(this.document)) {\n      this.document = document\n      this.refreshAttachments()\n      this.revision++\n      return this.delegate?.compositionDidChangeDocument?.(document)\n    }\n  }\n\n  // Snapshots\n\n  getSnapshot() {\n    return {\n      document: this.document,\n      selectedRange: this.getSelectedRange(),\n    }\n  }\n\n  loadSnapshot({ document, selectedRange }) {\n    this.delegate?.compositionWillLoadSnapshot?.()\n    this.setDocument(document != null ? document : new Document())\n    this.setSelection(selectedRange != null ? selectedRange : [ 0, 0 ])\n    return this.delegate?.compositionDidLoadSnapshot?.()\n  }\n\n  // Responder protocol\n\n  insertText(text, { updatePosition } = { updatePosition: true }) {\n    const selectedRange = this.getSelectedRange()\n    this.setDocument(this.document.insertTextAtRange(text, selectedRange))\n\n    const startPosition = selectedRange[0]\n    const endPosition = startPosition + text.getLength()\n\n    if (updatePosition) {\n      this.setSelection(endPosition)\n    }\n    return this.notifyDelegateOfInsertionAtRange([ startPosition, endPosition ])\n  }\n\n  insertBlock(block = new Block()) {\n    const document = new Document([ block ])\n    return this.insertDocument(document)\n  }\n\n  insertDocument(document = new Document()) {\n    const selectedRange = this.getSelectedRange()\n    this.setDocument(this.document.insertDocumentAtRange(document, selectedRange))\n\n    const startPosition = selectedRange[0]\n    const endPosition = startPosition + document.getLength()\n\n    this.setSelection(endPosition)\n    return this.notifyDelegateOfInsertionAtRange([ startPosition, endPosition ])\n  }\n\n  insertString(string, options) {\n    const attributes = this.getCurrentTextAttributes()\n    const text = Text.textForStringWithAttributes(string, attributes)\n    return this.insertText(text, options)\n  }\n\n  insertBlockBreak() {\n    const selectedRange = this.getSelectedRange()\n    this.setDocument(this.document.insertBlockBreakAtRange(selectedRange))\n\n    const startPosition = selectedRange[0]\n    const endPosition = startPosition + 1\n\n    this.setSelection(endPosition)\n    return this.notifyDelegateOfInsertionAtRange([ startPosition, endPosition ])\n  }\n\n  insertLineBreak() {\n    const insertion = new LineBreakInsertion(this)\n\n    if (insertion.shouldDecreaseListLevel()) {\n      this.decreaseListLevel()\n      return this.setSelection(insertion.startPosition)\n    } else if (insertion.shouldPrependListItem()) {\n      const document = new Document([ insertion.block.copyWithoutText() ])\n      return this.insertDocument(document)\n    } else if (insertion.shouldInsertBlockBreak()) {\n      return this.insertBlockBreak()\n    } else if (insertion.shouldRemoveLastBlockAttribute()) {\n      return this.removeLastBlockAttribute()\n    } else if (insertion.shouldBreakFormattedBlock()) {\n      return this.breakFormattedBlock(insertion)\n    } else {\n      return this.insertString(\"\\n\")\n    }\n  }\n\n  insertHTML(html) {\n    const document = HTMLParser.parse(html, { purifyOptions: { SAFE_FOR_XML: true } }).getDocument()\n    const selectedRange = this.getSelectedRange()\n\n    this.setDocument(this.document.mergeDocumentAtRange(document, selectedRange))\n\n    const startPosition = selectedRange[0]\n    const endPosition = startPosition + document.getLength() - 1\n\n    this.setSelection(endPosition)\n    return this.notifyDelegateOfInsertionAtRange([ startPosition, endPosition ])\n  }\n\n  replaceHTML(html) {\n    const document = HTMLParser.parse(html).getDocument().copyUsingObjectsFromDocument(this.document)\n    const locationRange = this.getLocationRange({ strict: false })\n    const selectedRange = this.document.rangeFromLocationRange(locationRange)\n    this.setDocument(document)\n    return this.setSelection(selectedRange)\n  }\n\n  insertFile(file) {\n    return this.insertFiles([ file ])\n  }\n\n  insertFiles(files) {\n    const attachments = []\n\n    Array.from(files).forEach((file) => {\n      if (this.delegate?.compositionShouldAcceptFile(file)) {\n        const attachment = Attachment.attachmentForFile(file)\n        attachments.push(attachment)\n      }\n    })\n\n    return this.insertAttachments(attachments)\n  }\n\n  insertAttachment(attachment) {\n    return this.insertAttachments([ attachment ])\n  }\n\n  insertAttachments(attachments) {\n    let text = new Text()\n\n    Array.from(attachments).forEach((attachment) => {\n      const type = attachment.getType()\n      const presentation = config.attachments[type]?.presentation\n\n      const attributes = this.getCurrentTextAttributes()\n      if (presentation) {\n        attributes.presentation = presentation\n      }\n\n      const attachmentText = Text.textForAttachmentWithAttributes(attachment, attributes)\n      text = text.appendText(attachmentText)\n    })\n\n    return this.insertText(text)\n  }\n\n  shouldManageDeletingInDirection(direction) {\n    const locationRange = this.getLocationRange()\n    if (rangeIsCollapsed(locationRange)) {\n      if (direction === \"backward\" && locationRange[0].offset === 0) {\n        return true\n      }\n      if (this.shouldManageMovingCursorInDirection(direction)) {\n        return true\n      }\n    } else {\n      if (locationRange[0].index !== locationRange[1].index) {\n        return true\n      }\n    }\n    return false\n  }\n\n  deleteInDirection(direction, { length } = {}) {\n    let attachment, deletingIntoPreviousBlock, selectionSpansBlocks\n    const locationRange = this.getLocationRange()\n    let range = this.getSelectedRange()\n    const selectionIsCollapsed = rangeIsCollapsed(range)\n\n    if (selectionIsCollapsed) {\n      deletingIntoPreviousBlock = direction === \"backward\" && locationRange[0].offset === 0\n    } else {\n      selectionSpansBlocks = locationRange[0].index !== locationRange[1].index\n    }\n\n    if (deletingIntoPreviousBlock) {\n      if (this.canDecreaseBlockAttributeLevel()) {\n        const block = this.getBlock()\n\n        if (block.isListItem()) {\n          this.decreaseListLevel()\n        } else {\n          this.decreaseBlockAttributeLevel()\n        }\n\n        this.setSelection(range[0])\n        if (block.isEmpty()) {\n          return false\n        }\n      }\n    }\n\n    if (selectionIsCollapsed) {\n      range = this.getExpandedRangeInDirection(direction, { length })\n      if (direction === \"backward\") {\n        attachment = this.getAttachmentAtRange(range)\n      }\n    }\n\n    if (attachment) {\n      this.editAttachment(attachment)\n      return false\n    } else {\n      this.setDocument(this.document.removeTextAtRange(range))\n      this.setSelection(range[0])\n      if (deletingIntoPreviousBlock || selectionSpansBlocks) {\n        return false\n      }\n    }\n  }\n\n  moveTextFromRange(range) {\n    const [ position ] = Array.from(this.getSelectedRange())\n    this.setDocument(this.document.moveTextFromRangeToPosition(range, position))\n    return this.setSelection(position)\n  }\n\n  removeAttachment(attachment) {\n    const range = this.document.getRangeOfAttachment(attachment)\n    if (range) {\n      this.stopEditingAttachment()\n      this.setDocument(this.document.removeTextAtRange(range))\n      return this.setSelection(range[0])\n    }\n  }\n\n  removeLastBlockAttribute() {\n    const [ startPosition, endPosition ] = Array.from(this.getSelectedRange())\n    const block = this.document.getBlockAtPosition(endPosition)\n    this.removeCurrentAttribute(block.getLastAttribute())\n    return this.setSelection(startPosition)\n  }\n\n  insertPlaceholder() {\n    this.placeholderPosition = this.getPosition()\n    return this.insertString(PLACEHOLDER)\n  }\n\n  selectPlaceholder() {\n    if (this.placeholderPosition != null) {\n      this.setSelectedRange([ this.placeholderPosition, this.placeholderPosition + PLACEHOLDER.length ])\n      return this.getSelectedRange()\n    }\n  }\n\n  forgetPlaceholder() {\n    this.placeholderPosition = null\n  }\n\n  // Current attributes\n\n  hasCurrentAttribute(attributeName) {\n    const value = this.currentAttributes[attributeName]\n    return value != null && value !== false\n  }\n\n  toggleCurrentAttribute(attributeName) {\n    const value = !this.currentAttributes[attributeName]\n    if (value) {\n      return this.setCurrentAttribute(attributeName, value)\n    } else {\n      return this.removeCurrentAttribute(attributeName)\n    }\n  }\n\n  canSetCurrentAttribute(attributeName) {\n    if (getBlockConfig(attributeName)) {\n      return this.canSetCurrentBlockAttribute(attributeName)\n    } else {\n      return this.canSetCurrentTextAttribute(attributeName)\n    }\n  }\n\n  canSetCurrentTextAttribute(attributeName) {\n    const document = this.getSelectedDocument()\n    if (!document) return\n    for (const attachment of Array.from(document.getAttachments())) {\n      if (!attachment.hasContent()) {\n        return false\n      }\n    }\n    return true\n  }\n\n  canSetCurrentBlockAttribute(attributeName) {\n    const block = this.getBlock()\n    if (!block) return\n    return !block.isTerminalBlock()\n  }\n\n  setCurrentAttribute(attributeName, value) {\n    if (getBlockConfig(attributeName)) {\n      return this.setBlockAttribute(attributeName, value)\n    } else {\n      this.setTextAttribute(attributeName, value)\n      this.currentAttributes[attributeName] = value\n      return this.notifyDelegateOfCurrentAttributesChange()\n    }\n  }\n\n  setHTMLAtributeAtPosition(position, attributeName, value) {\n    const block = this.document.getBlockAtPosition(position)\n    const allowedHTMLAttributes = getBlockConfig(block.getLastAttribute())?.htmlAttributes\n\n    if (block && allowedHTMLAttributes?.includes(attributeName)) {\n      const newDocument = this.document.setHTMLAttributeAtPosition(position, attributeName, value)\n      this.setDocument(newDocument)\n    }\n  }\n\n  setTextAttribute(attributeName, value) {\n    const selectedRange = this.getSelectedRange()\n    if (!selectedRange) return\n\n    const [ startPosition, endPosition ] = Array.from(selectedRange)\n    if (startPosition === endPosition) {\n      if (attributeName === \"href\") {\n        const text = Text.textForStringWithAttributes(value, { href: value })\n        return this.insertText(text)\n      }\n    } else {\n      return this.setDocument(this.document.addAttributeAtRange(attributeName, value, selectedRange))\n    }\n  }\n\n  setBlockAttribute(attributeName, value) {\n    const selectedRange = this.getSelectedRange()\n    if (this.canSetCurrentAttribute(attributeName)) {\n      this.setDocument(this.document.applyBlockAttributeAtRange(attributeName, value, selectedRange))\n      return this.setSelection(selectedRange)\n    }\n  }\n\n  removeCurrentAttribute(attributeName) {\n    if (getBlockConfig(attributeName)) {\n      this.removeBlockAttribute(attributeName)\n      return this.updateCurrentAttributes()\n    } else {\n      this.removeTextAttribute(attributeName)\n      delete this.currentAttributes[attributeName]\n      return this.notifyDelegateOfCurrentAttributesChange()\n    }\n  }\n\n  removeTextAttribute(attributeName) {\n    const selectedRange = this.getSelectedRange()\n    if (!selectedRange) return\n    return this.setDocument(this.document.removeAttributeAtRange(attributeName, selectedRange))\n  }\n\n  removeBlockAttribute(attributeName) {\n    const selectedRange = this.getSelectedRange()\n    if (!selectedRange) return\n    return this.setDocument(this.document.removeAttributeAtRange(attributeName, selectedRange))\n  }\n\n  canDecreaseNestingLevel() {\n    return this.getBlock()?.getNestingLevel() > 0\n  }\n\n  canIncreaseNestingLevel() {\n    const block = this.getBlock()\n    if (!block) return\n    if (getBlockConfig(block.getLastNestableAttribute())?.listAttribute) {\n      const previousBlock = this.getPreviousBlock()\n      if (previousBlock) {\n        return arrayStartsWith(previousBlock.getListItemAttributes(), block.getListItemAttributes())\n      }\n    } else {\n      return block.getNestingLevel() > 0\n    }\n  }\n\n  decreaseNestingLevel() {\n    const block = this.getBlock()\n    if (!block) return\n    return this.setDocument(this.document.replaceBlock(block, block.decreaseNestingLevel()))\n  }\n\n  increaseNestingLevel() {\n    const block = this.getBlock()\n    if (!block) return\n    return this.setDocument(this.document.replaceBlock(block, block.increaseNestingLevel()))\n  }\n\n  canDecreaseBlockAttributeLevel() {\n    return this.getBlock()?.getAttributeLevel() > 0\n  }\n\n  decreaseBlockAttributeLevel() {\n    const attribute = this.getBlock()?.getLastAttribute()\n    if (attribute) {\n      return this.removeCurrentAttribute(attribute)\n    }\n  }\n\n  decreaseListLevel() {\n    let [ startPosition ] = Array.from(this.getSelectedRange())\n    const { index } = this.document.locationFromPosition(startPosition)\n    let endIndex = index\n    const attributeLevel = this.getBlock().getAttributeLevel()\n\n    let block = this.document.getBlockAtIndex(endIndex + 1)\n    while (block) {\n      if (!block.isListItem() || block.getAttributeLevel() <= attributeLevel) {\n        break\n      }\n      endIndex++\n      block = this.document.getBlockAtIndex(endIndex + 1)\n    }\n\n    startPosition = this.document.positionFromLocation({ index, offset: 0 })\n    const endPosition = this.document.positionFromLocation({ index: endIndex, offset: 0 })\n    return this.setDocument(this.document.removeLastListAttributeAtRange([ startPosition, endPosition ]))\n  }\n\n  updateCurrentAttributes() {\n    const selectedRange = this.getSelectedRange({ ignoreLock: true })\n    if (selectedRange) {\n      const currentAttributes = this.document.getCommonAttributesAtRange(selectedRange)\n\n      Array.from(getAllAttributeNames()).forEach((attributeName) => {\n        if (!currentAttributes[attributeName]) {\n          if (!this.canSetCurrentAttribute(attributeName)) {\n            currentAttributes[attributeName] = false\n          }\n        }\n      })\n\n      if (!objectsAreEqual(currentAttributes, this.currentAttributes)) {\n        this.currentAttributes = currentAttributes\n        return this.notifyDelegateOfCurrentAttributesChange()\n      }\n    }\n  }\n\n  getCurrentAttributes() {\n    return extend.call({}, this.currentAttributes)\n  }\n\n  getCurrentTextAttributes() {\n    const attributes = {}\n    for (const key in this.currentAttributes) {\n      const value = this.currentAttributes[key]\n      if (value !== false) {\n        if (getTextConfig(key)) {\n          attributes[key] = value\n        }\n      }\n    }\n    return attributes\n  }\n\n  // Selection freezing\n\n  freezeSelection() {\n    return this.setCurrentAttribute(\"frozen\", true)\n  }\n\n  thawSelection() {\n    return this.removeCurrentAttribute(\"frozen\")\n  }\n\n  hasFrozenSelection() {\n    return this.hasCurrentAttribute(\"frozen\")\n  }\n\n  setSelection(selectedRange) {\n    const locationRange = this.document.locationRangeFromRange(selectedRange)\n    return this.delegate?.compositionDidRequestChangingSelectionToLocationRange(locationRange)\n  }\n\n  getSelectedRange() {\n    const locationRange = this.getLocationRange()\n    if (locationRange) {\n      return this.document.rangeFromLocationRange(locationRange)\n    }\n  }\n\n  setSelectedRange(selectedRange) {\n    const locationRange = this.document.locationRangeFromRange(selectedRange)\n    return this.getSelectionManager().setLocationRange(locationRange)\n  }\n\n  getPosition() {\n    const locationRange = this.getLocationRange()\n    if (locationRange) {\n      return this.document.positionFromLocation(locationRange[0])\n    }\n  }\n\n  getLocationRange(options) {\n    if (this.targetLocationRange) {\n      return this.targetLocationRange\n    } else {\n      return this.getSelectionManager().getLocationRange(options) || normalizeRange({ index: 0, offset: 0 })\n    }\n  }\n\n  withTargetLocationRange(locationRange, fn) {\n    let result\n    this.targetLocationRange = locationRange\n    try {\n      result = fn()\n    } finally {\n      this.targetLocationRange = null\n    }\n    return result\n  }\n\n  withTargetRange(range, fn) {\n    const locationRange = this.document.locationRangeFromRange(range)\n    return this.withTargetLocationRange(locationRange, fn)\n  }\n\n  withTargetDOMRange(domRange, fn) {\n    const locationRange = this.createLocationRangeFromDOMRange(domRange, { strict: false })\n    return this.withTargetLocationRange(locationRange, fn)\n  }\n\n  getExpandedRangeInDirection(direction, { length } = {}) {\n    let [ startPosition, endPosition ] = Array.from(this.getSelectedRange())\n    if (direction === \"backward\") {\n      if (length) {\n        startPosition -= length\n      } else {\n        startPosition = this.translateUTF16PositionFromOffset(startPosition, -1)\n      }\n    } else {\n      if (length) {\n        endPosition += length\n      } else {\n        endPosition = this.translateUTF16PositionFromOffset(endPosition, 1)\n      }\n    }\n    return normalizeRange([ startPosition, endPosition ])\n  }\n\n  shouldManageMovingCursorInDirection(direction) {\n    if (this.editingAttachment) {\n      return true\n    }\n    const range = this.getExpandedRangeInDirection(direction)\n    return this.getAttachmentAtRange(range) != null\n  }\n\n  moveCursorInDirection(direction) {\n    let canEditAttachment, range\n    if (this.editingAttachment) {\n      range = this.document.getRangeOfAttachment(this.editingAttachment)\n    } else {\n      const selectedRange = this.getSelectedRange()\n      range = this.getExpandedRangeInDirection(direction)\n      canEditAttachment = !rangesAreEqual(selectedRange, range)\n    }\n\n    if (direction === \"backward\") {\n      this.setSelectedRange(range[0])\n    } else {\n      this.setSelectedRange(range[1])\n    }\n\n    if (canEditAttachment) {\n      const attachment = this.getAttachmentAtRange(range)\n      if (attachment) {\n        return this.editAttachment(attachment)\n      }\n    }\n  }\n\n  expandSelectionInDirection(direction, { length } = {}) {\n    const range = this.getExpandedRangeInDirection(direction, { length })\n    return this.setSelectedRange(range)\n  }\n\n  expandSelectionForEditing() {\n    if (this.hasCurrentAttribute(\"href\")) {\n      return this.expandSelectionAroundCommonAttribute(\"href\")\n    }\n  }\n\n  expandSelectionAroundCommonAttribute(attributeName) {\n    const position = this.getPosition()\n    const range = this.document.getRangeOfCommonAttributeAtPosition(attributeName, position)\n    return this.setSelectedRange(range)\n  }\n\n  selectionContainsAttachments() {\n    return this.getSelectedAttachments()?.length > 0\n  }\n\n  selectionIsInCursorTarget() {\n    return this.editingAttachment || this.positionIsCursorTarget(this.getPosition())\n  }\n\n  positionIsCursorTarget(position) {\n    const location = this.document.locationFromPosition(position)\n    if (location) {\n      return this.locationIsCursorTarget(location)\n    }\n  }\n\n  positionIsBlockBreak(position) {\n    return this.document.getPieceAtPosition(position)?.isBlockBreak()\n  }\n\n  getSelectedDocument() {\n    const selectedRange = this.getSelectedRange()\n    if (selectedRange) {\n      return this.document.getDocumentAtRange(selectedRange)\n    }\n  }\n\n  getSelectedAttachments() {\n    return this.getSelectedDocument()?.getAttachments()\n  }\n\n  // Attachments\n\n  getAttachments() {\n    return this.attachments.slice(0)\n  }\n\n  refreshAttachments() {\n    const attachments = this.document.getAttachments()\n    const { added, removed } = summarizeArrayChange(this.attachments, attachments)\n    this.attachments = attachments\n\n    Array.from(removed).forEach((attachment) => {\n      attachment.delegate = null\n      this.delegate?.compositionDidRemoveAttachment?.(attachment)\n    })\n\n    return (() => {\n      const result = []\n\n      Array.from(added).forEach((attachment) => {\n        attachment.delegate = this\n        result.push(this.delegate?.compositionDidAddAttachment?.(attachment))\n      })\n\n      return result\n    })()\n  }\n\n  // Attachment delegate\n\n  attachmentDidChangeAttributes(attachment) {\n    this.revision++\n    return this.delegate?.compositionDidEditAttachment?.(attachment)\n  }\n\n  attachmentDidChangePreviewURL(attachment) {\n    this.revision++\n    return this.delegate?.compositionDidChangeAttachmentPreviewURL?.(attachment)\n  }\n\n  // Attachment editing\n\n  editAttachment(attachment, options) {\n    if (attachment === this.editingAttachment) return\n    this.stopEditingAttachment()\n    this.editingAttachment = attachment\n    return this.delegate?.compositionDidStartEditingAttachment?.(this.editingAttachment, options)\n  }\n\n  stopEditingAttachment() {\n    if (!this.editingAttachment) return\n    this.delegate?.compositionDidStopEditingAttachment?.(this.editingAttachment)\n    this.editingAttachment = null\n  }\n\n  updateAttributesForAttachment(attributes, attachment) {\n    return this.setDocument(this.document.updateAttributesForAttachment(attributes, attachment))\n  }\n\n  removeAttributeForAttachment(attribute, attachment) {\n    return this.setDocument(this.document.removeAttributeForAttachment(attribute, attachment))\n  }\n\n  // Private\n\n  breakFormattedBlock(insertion) {\n    let { document } = insertion\n    const { block } = insertion\n    let position = insertion.startPosition\n    let range = [ position - 1, position ]\n\n    if (block.getBlockBreakPosition() === insertion.startLocation.offset) {\n      if (block.breaksOnReturn() && insertion.nextCharacter === \"\\n\") {\n        position += 1\n      } else {\n        document = document.removeTextAtRange(range)\n      }\n      range = [ position, position ]\n    } else if (insertion.nextCharacter === \"\\n\") {\n      if (insertion.previousCharacter === \"\\n\") {\n        range = [ position - 1, position + 1 ]\n      } else {\n        range = [ position, position + 1 ]\n        position += 1\n      }\n    } else if (insertion.startLocation.offset - 1 !== 0) {\n      position += 1\n    }\n\n    const newDocument = new Document([ block.removeLastAttribute().copyWithoutText() ])\n    this.setDocument(document.insertDocumentAtRange(newDocument, range))\n    return this.setSelection(position)\n  }\n\n  getPreviousBlock() {\n    const locationRange = this.getLocationRange()\n    if (locationRange) {\n      const { index } = locationRange[0]\n      if (index > 0) {\n        return this.document.getBlockAtIndex(index - 1)\n      }\n    }\n  }\n\n  getBlock() {\n    const locationRange = this.getLocationRange()\n    if (locationRange) {\n      return this.document.getBlockAtIndex(locationRange[0].index)\n    }\n  }\n\n  getAttachmentAtRange(range) {\n    const document = this.document.getDocumentAtRange(range)\n    if (document.toString() === `${OBJECT_REPLACEMENT_CHARACTER}\\n`) {\n      return document.getAttachments()[0]\n    }\n  }\n\n  notifyDelegateOfCurrentAttributesChange() {\n    return this.delegate?.compositionDidChangeCurrentAttributes?.(this.currentAttributes)\n  }\n\n  notifyDelegateOfInsertionAtRange(range) {\n    return this.delegate?.compositionDidPerformInsertionAtRange?.(range)\n  }\n\n  translateUTF16PositionFromOffset(position, offset) {\n    const utf16string = this.document.toUTF16String()\n    const utf16position = utf16string.offsetFromUCS2Offset(position)\n    return utf16string.offsetToUCS2Offset(utf16position + offset)\n  }\n}\n\nComposition.proxyMethod(\"getSelectionManager().getPointRange\")\nComposition.proxyMethod(\"getSelectionManager().setLocationRangeFromPointRange\")\nComposition.proxyMethod(\"getSelectionManager().createLocationRangeFromDOMRange\")\nComposition.proxyMethod(\"getSelectionManager().locationIsCursorTarget\")\nComposition.proxyMethod(\"getSelectionManager().selectionIsExpanded\")\nComposition.proxyMethod(\"delegate?.getSelectionManager\")\n", "import BasicObject from \"trix/core/basic_object\"\n\nexport default class UndoManager extends BasicObject {\n  constructor(composition) {\n    super(...arguments)\n    this.composition = composition\n    this.undoEntries = []\n    this.redoEntries = []\n  }\n\n  recordUndoEntry(description, { context, consolidatable } = {}) {\n    const previousEntry = this.undoEntries.slice(-1)[0]\n\n    if (!consolidatable || !entryHasDescriptionAndContext(previousEntry, description, context)) {\n      const undoEntry = this.createEntry({ description, context })\n      this.undoEntries.push(undoEntry)\n      this.redoEntries = []\n    }\n  }\n\n  undo() {\n    const undoEntry = this.undoEntries.pop()\n    if (undoEntry) {\n      const redoEntry = this.createEntry(undoEntry)\n      this.redoEntries.push(redoEntry)\n      return this.composition.loadSnapshot(undoEntry.snapshot)\n    }\n  }\n\n  redo() {\n    const redoEntry = this.redoEntries.pop()\n    if (redoEntry) {\n      const undoEntry = this.createEntry(redoEntry)\n      this.undoEntries.push(undoEntry)\n      return this.composition.loadSnapshot(redoEntry.snapshot)\n    }\n  }\n\n  canUndo() {\n    return this.undoEntries.length > 0\n  }\n\n  canRedo() {\n    return this.redoEntries.length > 0\n  }\n\n  // Private\n\n  createEntry({ description, context } = {}) {\n    return {\n      description: description?.toString(),\n      context: JSON.stringify(context),\n      snapshot: this.composition.getSnapshot(),\n    }\n  }\n}\n\nconst entryHasDescriptionAndContext = (entry, description, context) =>\n  entry?.description === description?.toString() && entry?.context === JSON.stringify(context)\n", "const BLOCK_ATTRIBUTE_NAME = \"attachmentGallery\"\nconst TEXT_ATTRIBUTE_NAME = \"presentation\"\nconst TEXT_ATTRIBUTE_VALUE = \"gallery\"\n\nexport default class Filter {\n  constructor(snapshot) {\n    this.document = snapshot.document\n    this.selectedRange = snapshot.selectedRange\n  }\n\n  perform() {\n    this.removeBlockAttribute()\n    return this.applyBlockAttribute()\n  }\n\n  getSnapshot() {\n    return { document: this.document, selectedRange: this.selectedRange }\n  }\n\n  // Private\n\n  removeBlockAttribute() {\n    return this.findRangesOfBlocks().map((range) => this.document = this.document.removeAttributeAtRange(BLOCK_ATTRIBUTE_NAME, range))\n  }\n\n  applyBlockAttribute() {\n    let offset = 0\n\n    this.findRangesOfPieces().forEach((range) => {\n      if (range[1] - range[0] > 1) {\n        range[0] += offset\n        range[1] += offset\n\n        if (this.document.getCharacterAtPosition(range[1]) !== \"\\n\") {\n          this.document = this.document.insertBlockBreakAtRange(range[1])\n          if (range[1] < this.selectedRange[1]) {\n            this.moveSelectedRangeForward()\n          }\n          range[1]++\n          offset++\n        }\n\n        if (range[0] !== 0) {\n          if (this.document.getCharacterAtPosition(range[0] - 1) !== \"\\n\") {\n            this.document = this.document.insertBlockBreakAtRange(range[0])\n            if (range[0] < this.selectedRange[0]) {\n              this.moveSelectedRangeForward()\n            }\n            range[0]++\n            offset++\n          }\n        }\n\n        this.document = this.document.applyBlockAttributeAtRange(BLOCK_ATTRIBUTE_NAME, true, range)\n      }\n    })\n  }\n\n  findRangesOfBlocks() {\n    return this.document.findRangesForBlockAttribute(BLOCK_ATTRIBUTE_NAME)\n  }\n\n  findRangesOfPieces() {\n    return this.document.findRangesForTextAttribute(TEXT_ATTRIBUTE_NAME, { withValue: TEXT_ATTRIBUTE_VALUE })\n  }\n\n  moveSelectedRangeForward() {\n    this.selectedRange[0] += 1\n    this.selectedRange[1] += 1\n  }\n}\n", "import Filter from \"./filter\"\n\nexport const attachmentGalleryFilter = function(snapshot) {\n  const filter = new Filter(snapshot)\n  filter.perform()\n  return filter.getSnapshot()\n}\n\n", "import Document from \"trix/models/document\"\nimport HTMLParser from \"trix/models/html_parser\"\n\nimport UndoManager from \"trix/models/undo_manager\"\nimport { attachmentGalleryFilter } from \"trix/filters/attachment_gallery_filter\"\nconst DEFAULT_FILTERS = [ attachmentGalleryFilter ]\n\nexport default class Editor {\n  constructor(composition, selectionManager, element) {\n    this.insertFiles = this.insertFiles.bind(this)\n    this.composition = composition\n    this.selectionManager = selectionManager\n    this.element = element\n    this.undoManager = new UndoManager(this.composition)\n    this.filters = DEFAULT_FILTERS.slice(0)\n  }\n\n  loadDocument(document) {\n    return this.loadSnapshot({ document, selectedRange: [ 0, 0 ] })\n  }\n\n  loadHTML(html = \"\") {\n    const document = HTMLParser.parse(html, { referenceElement: this.element }).getDocument()\n    return this.loadDocument(document)\n  }\n\n  loadJSON({ document, selectedRange }) {\n    document = Document.fromJSON(document)\n    return this.loadSnapshot({ document, selectedRange })\n  }\n\n  loadSnapshot(snapshot) {\n    this.undoManager = new UndoManager(this.composition)\n    return this.composition.loadSnapshot(snapshot)\n  }\n\n  getDocument() {\n    return this.composition.document\n  }\n\n  getSelectedDocument() {\n    return this.composition.getSelectedDocument()\n  }\n\n  getSnapshot() {\n    return this.composition.getSnapshot()\n  }\n\n  toJSON() {\n    return this.getSnapshot()\n  }\n\n  // Document manipulation\n\n  deleteInDirection(direction) {\n    return this.composition.deleteInDirection(direction)\n  }\n\n  insertAttachment(attachment) {\n    return this.composition.insertAttachment(attachment)\n  }\n\n  insertAttachments(attachments) {\n    return this.composition.insertAttachments(attachments)\n  }\n\n  insertDocument(document) {\n    return this.composition.insertDocument(document)\n  }\n\n  insertFile(file) {\n    return this.composition.insertFile(file)\n  }\n\n  insertFiles(files) {\n    return this.composition.insertFiles(files)\n  }\n\n  insertHTML(html) {\n    return this.composition.insertHTML(html)\n  }\n\n  insertString(string) {\n    return this.composition.insertString(string)\n  }\n\n  insertText(text) {\n    return this.composition.insertText(text)\n  }\n\n  insertLineBreak() {\n    return this.composition.insertLineBreak()\n  }\n\n  // Selection\n\n  getSelectedRange() {\n    return this.composition.getSelectedRange()\n  }\n\n  getPosition() {\n    return this.composition.getPosition()\n  }\n\n  getClientRectAtPosition(position) {\n    const locationRange = this.getDocument().locationRangeFromRange([ position, position + 1 ])\n    return this.selectionManager.getClientRectAtLocationRange(locationRange)\n  }\n\n  expandSelectionInDirection(direction) {\n    return this.composition.expandSelectionInDirection(direction)\n  }\n\n  moveCursorInDirection(direction) {\n    return this.composition.moveCursorInDirection(direction)\n  }\n\n  setSelectedRange(selectedRange) {\n    return this.composition.setSelectedRange(selectedRange)\n  }\n\n  // Attributes\n\n  activateAttribute(name, value = true) {\n    return this.composition.setCurrentAttribute(name, value)\n  }\n\n  attributeIsActive(name) {\n    return this.composition.hasCurrentAttribute(name)\n  }\n\n  canActivateAttribute(name) {\n    return this.composition.canSetCurrentAttribute(name)\n  }\n\n  deactivateAttribute(name) {\n    return this.composition.removeCurrentAttribute(name)\n  }\n\n  // HTML attributes\n  setHTMLAtributeAtPosition(position, name, value) {\n    this.composition.setHTMLAtributeAtPosition(position, name, value)\n  }\n\n  // Nesting level\n\n  canDecreaseNestingLevel() {\n    return this.composition.canDecreaseNestingLevel()\n  }\n\n  canIncreaseNestingLevel() {\n    return this.composition.canIncreaseNestingLevel()\n  }\n\n  decreaseNestingLevel() {\n    if (this.canDecreaseNestingLevel()) {\n      return this.composition.decreaseNestingLevel()\n    }\n  }\n\n  increaseNestingLevel() {\n    if (this.canIncreaseNestingLevel()) {\n      return this.composition.increaseNestingLevel()\n    }\n  }\n\n  // Undo/redo\n\n  canRedo() {\n    return this.undoManager.canRedo()\n  }\n\n  canUndo() {\n    return this.undoManager.canUndo()\n  }\n\n  recordUndoEntry(description, { context, consolidatable } = {}) {\n    return this.undoManager.recordUndoEntry(description, { context, consolidatable })\n  }\n\n  redo() {\n    if (this.canRedo()) {\n      return this.undoManager.redo()\n    }\n  }\n\n  undo() {\n    if (this.canUndo()) {\n      return this.undoManager.undo()\n    }\n  }\n}\n", "/* eslint-disable\n    no-var,\n    prefer-const,\n*/\nimport {\n  elementContainsNode,\n  findChildIndexOfNode,\n  nodeIsAttachmentElement,\n  nodeIsBlockContainer,\n  nodeIsBlockStart,\n  nodeIsBlockStartComment,\n  nodeIsCursorTarget,\n  nodeIsEmptyTextNode,\n  nodeIsTextNode,\n  tagName,\n  walkTree,\n} from \"trix/core/helpers\"\n\nexport default class LocationMapper {\n  constructor(element) {\n    this.element = element\n  }\n\n  findLocationFromContainerAndOffset(container, offset, { strict } = { strict: true }) {\n    let childIndex = 0\n    let foundBlock = false\n    const location = { index: 0, offset: 0 }\n    const attachmentElement = this.findAttachmentElementParentForNode(container)\n\n    if (attachmentElement) {\n      container = attachmentElement.parentNode\n      offset = findChildIndexOfNode(attachmentElement)\n    }\n\n    const walker = walkTree(this.element, { usingFilter: rejectAttachmentContents })\n\n    while (walker.nextNode()) {\n      const node = walker.currentNode\n\n      if (node === container && nodeIsTextNode(container)) {\n        if (!nodeIsCursorTarget(node)) {\n          location.offset += offset\n        }\n        break\n      } else {\n        if (node.parentNode === container) {\n          if (childIndex++ === offset) {\n            if (!strict && nodeIsBlockStart(node, { strict })) {\n              if (foundBlock) {\n                location.index++\n              }\n              location.offset = 0\n              foundBlock = true\n            }\n            break\n          }\n        } else if (!elementContainsNode(container, node)) {\n          if (childIndex > 0) {\n            break\n          }\n        }\n\n        if (nodeIsBlockStart(node, { strict })) {\n          if (foundBlock) {\n            location.index++\n          }\n          location.offset = 0\n          foundBlock = true\n        } else {\n          location.offset += nodeLength(node)\n        }\n      }\n    }\n\n    return location\n  }\n\n  findContainerAndOffsetFromLocation(location) {\n    let container, offset\n    if (location.index === 0 && location.offset === 0) {\n      container = this.element\n      offset = 0\n\n      while (container.firstChild) {\n        container = container.firstChild\n        if (nodeIsBlockContainer(container)) {\n          offset = 1\n          break\n        }\n      }\n\n      return [ container, offset ]\n    }\n\n    let [ node, nodeOffset ] = this.findNodeAndOffsetFromLocation(location)\n    if (!node) return\n\n    if (nodeIsTextNode(node)) {\n      if (nodeLength(node) === 0) {\n        container = node.parentNode.parentNode\n        offset = findChildIndexOfNode(node.parentNode)\n        if (nodeIsCursorTarget(node, { name: \"right\" })) {\n          offset++\n        }\n      } else {\n        container = node\n        offset = location.offset - nodeOffset\n      }\n    } else {\n      container = node.parentNode\n\n      if (!nodeIsBlockStart(node.previousSibling)) {\n        if (!nodeIsBlockContainer(container)) {\n          while (node === container.lastChild) {\n            node = container\n            container = container.parentNode\n            if (nodeIsBlockContainer(container)) {\n              break\n            }\n          }\n        }\n      }\n\n      offset = findChildIndexOfNode(node)\n      if (location.offset !== 0) {\n        offset++\n      }\n    }\n\n    return [ container, offset ]\n  }\n\n  findNodeAndOffsetFromLocation(location) {\n    let node, nodeOffset\n    let offset = 0\n\n    for (const currentNode of this.getSignificantNodesForIndex(location.index)) {\n      const length = nodeLength(currentNode)\n\n      if (location.offset <= offset + length) {\n        if (nodeIsTextNode(currentNode)) {\n          node = currentNode\n          nodeOffset = offset\n          if (location.offset === nodeOffset && nodeIsCursorTarget(node)) {\n            break\n          }\n        } else if (!node) {\n          node = currentNode\n          nodeOffset = offset\n        }\n      }\n\n      offset += length\n      if (offset > location.offset) {\n        break\n      }\n    }\n\n    return [ node, nodeOffset ]\n  }\n\n  // Private\n\n  findAttachmentElementParentForNode(node) {\n    while (node && node !== this.element) {\n      if (nodeIsAttachmentElement(node)) {\n        return node\n      }\n      node = node.parentNode\n    }\n  }\n\n  getSignificantNodesForIndex(index) {\n    const nodes = []\n    const walker = walkTree(this.element, { usingFilter: acceptSignificantNodes })\n    let recordingNodes = false\n\n    while (walker.nextNode()) {\n      const node = walker.currentNode\n      if (nodeIsBlockStartComment(node)) {\n        var blockIndex\n        if (blockIndex != null) {\n          blockIndex++\n        } else {\n          blockIndex = 0\n        }\n\n        if (blockIndex === index) {\n          recordingNodes = true\n        } else if (recordingNodes) {\n          break\n        }\n      } else if (recordingNodes) {\n        nodes.push(node)\n      }\n    }\n\n    return nodes\n  }\n}\n\nconst nodeLength = function(node) {\n  if (node.nodeType === Node.TEXT_NODE) {\n    if (nodeIsCursorTarget(node)) {\n      return 0\n    } else {\n      const string = node.textContent\n      return string.length\n    }\n  } else if (tagName(node) === \"br\" || nodeIsAttachmentElement(node)) {\n    return 1\n  } else {\n    return 0\n  }\n}\n\nconst acceptSignificantNodes = function(node) {\n  if (rejectEmptyTextNodes(node) === NodeFilter.FILTER_ACCEPT) {\n    return rejectAttachmentContents(node)\n  } else {\n    return NodeFilter.FILTER_REJECT\n  }\n}\n\nconst rejectEmptyTextNodes = function(node) {\n  if (nodeIsEmptyTextNode(node)) {\n    return NodeFilter.FILTER_REJECT\n  } else {\n    return NodeFilter.FILTER_ACCEPT\n  }\n}\n\nconst rejectAttachmentContents = function(node) {\n  if (nodeIsAttachmentElement(node.parentNode)) {\n    return NodeFilter.FILTER_REJECT\n  } else {\n    return NodeFilter.FILTER_ACCEPT\n  }\n}\n", "/* eslint-disable\n    id-length,\n    no-empty,\n*/\nimport { getDOMRange, setDOMRange } from \"trix/core/helpers\"\n\nexport default class PointMapper {\n  createDOMRangeFromPoint({ x, y }) {\n    let domRange\n    if (document.caretPositionFromPoint) {\n      const { offsetNode, offset } = document.caretPositionFromPoint(x, y)\n      domRange = document.createRange()\n      domRange.setStart(offsetNode, offset)\n      return domRange\n    } else if (document.caretRangeFromPoint) {\n      return document.caretRangeFromPoint(x, y)\n    } else if (document.body.createTextRange) {\n      const originalDOMRange = getDOMRange()\n      try {\n        // IE 11 throws \"Unspecified error\" when using moveToPoint\n        // during a drag-and-drop operation.\n        const textRange = document.body.createTextRange()\n        textRange.moveToPoint(x, y)\n        textRange.select()\n      } catch (error) {}\n      domRange = getDOMRange()\n      setDOMRange(originalDOMRange)\n      return domRange\n    }\n  }\n\n  getClientRectsForDOMRange(domRange) {\n    const array = Array.from(domRange.getClientRects())\n    const start = array[0]\n    const end = array[array.length - 1]\n\n    return [ start, end ]\n  }\n}\n", "/* eslint-disable\n*/\nimport BasicObject from \"trix/core/basic_object\"\n\nimport LocationMapper from \"trix/models/location_mapper\"\nimport PointMapper from \"trix/models/point_mapper\"\n\nimport {\n  elementContainsNode,\n  getDOMRange,\n  getDOMSelection,\n  handleEvent,\n  innerElementIsActive,\n  nodeIsCursorTarget,\n  normalizeRange,\n  rangeIsCollapsed,\n  rangesAreEqual,\n  setDOMRange,\n} from \"trix/core/helpers\"\n\nexport default class SelectionManager extends BasicObject {\n  constructor(element) {\n    super(...arguments)\n    this.didMouseDown = this.didMouseDown.bind(this)\n    this.selectionDidChange = this.selectionDidChange.bind(this)\n    this.element = element\n    this.locationMapper = new LocationMapper(this.element)\n    this.pointMapper = new PointMapper()\n    this.lockCount = 0\n    handleEvent(\"mousedown\", { onElement: this.element, withCallback: this.didMouseDown })\n  }\n\n  getLocationRange(options = {}) {\n    if (options.strict === false) {\n      return this.createLocationRangeFromDOMRange(getDOMRange())\n    } else if (options.ignoreLock) {\n      return this.currentLocationRange\n    } else if (this.lockedLocationRange) {\n      return this.lockedLocationRange\n    } else {\n      return this.currentLocationRange\n    }\n  }\n\n  setLocationRange(locationRange) {\n    if (this.lockedLocationRange) return\n    locationRange = normalizeRange(locationRange)\n\n    const domRange = this.createDOMRangeFromLocationRange(locationRange)\n    if (domRange) {\n      setDOMRange(domRange)\n      this.updateCurrentLocationRange(locationRange)\n    }\n  }\n\n  setLocationRangeFromPointRange(pointRange) {\n    pointRange = normalizeRange(pointRange)\n    const startLocation = this.getLocationAtPoint(pointRange[0])\n    const endLocation = this.getLocationAtPoint(pointRange[1])\n    this.setLocationRange([ startLocation, endLocation ])\n  }\n\n  getClientRectAtLocationRange(locationRange) {\n    const domRange = this.createDOMRangeFromLocationRange(locationRange)\n    if (domRange) {\n      return this.getClientRectsForDOMRange(domRange)[1]\n    }\n  }\n\n  locationIsCursorTarget(location) {\n    const node = Array.from(this.findNodeAndOffsetFromLocation(location))[0]\n    return nodeIsCursorTarget(node)\n  }\n\n  lock() {\n    if (this.lockCount++ === 0) {\n      this.updateCurrentLocationRange()\n      this.lockedLocationRange = this.getLocationRange()\n    }\n  }\n\n  unlock() {\n    if (--this.lockCount === 0) {\n      const { lockedLocationRange } = this\n      this.lockedLocationRange = null\n      if (lockedLocationRange != null) {\n        return this.setLocationRange(lockedLocationRange)\n      }\n    }\n  }\n\n  clearSelection() {\n    return getDOMSelection()?.removeAllRanges()\n  }\n\n  selectionIsCollapsed() {\n    return getDOMRange()?.collapsed === true\n  }\n\n  selectionIsExpanded() {\n    return !this.selectionIsCollapsed()\n  }\n\n  createLocationRangeFromDOMRange(domRange, options) {\n    if (domRange == null || !this.domRangeWithinElement(domRange)) return\n\n    const start = this.findLocationFromContainerAndOffset(domRange.startContainer, domRange.startOffset, options)\n    if (!start) return\n\n    const end = domRange.collapsed\n      ? undefined\n      : this.findLocationFromContainerAndOffset(domRange.endContainer, domRange.endOffset, options)\n\n    return normalizeRange([ start, end ])\n  }\n\n  didMouseDown() {\n    return this.pauseTemporarily()\n  }\n\n  pauseTemporarily() {\n    let resumeHandlers\n    this.paused = true\n\n    const resume = () => {\n      this.paused = false\n      clearTimeout(resumeTimeout)\n\n      Array.from(resumeHandlers).forEach((handler) => {\n        handler.destroy()\n      })\n\n      if (elementContainsNode(document, this.element)) {\n        return this.selectionDidChange()\n      }\n    }\n\n    const resumeTimeout = setTimeout(resume, 200)\n\n    resumeHandlers = [ \"mousemove\", \"keydown\" ].map((eventName) =>\n      handleEvent(eventName, { onElement: document, withCallback: resume })\n    )\n  }\n\n  selectionDidChange() {\n    if (!this.paused && !innerElementIsActive(this.element)) {\n      return this.updateCurrentLocationRange()\n    }\n  }\n\n  updateCurrentLocationRange(locationRange) {\n    if (locationRange != null ? locationRange : locationRange = this.createLocationRangeFromDOMRange(getDOMRange())) {\n      if (!rangesAreEqual(locationRange, this.currentLocationRange)) {\n        this.currentLocationRange = locationRange\n        return this.delegate?.locationRangeDidChange?.(this.currentLocationRange.slice(0))\n      }\n    }\n  }\n\n  createDOMRangeFromLocationRange(locationRange) {\n    const rangeStart = this.findContainerAndOffsetFromLocation(locationRange[0])\n    const rangeEnd = rangeIsCollapsed(locationRange)\n      ? rangeStart\n      : this.findContainerAndOffsetFromLocation(locationRange[1]) || rangeStart\n\n    if (rangeStart != null && rangeEnd != null) {\n      const domRange = document.createRange()\n      domRange.setStart(...Array.from(rangeStart || []))\n      domRange.setEnd(...Array.from(rangeEnd || []))\n      return domRange\n    }\n  }\n\n  getLocationAtPoint(point) {\n    const domRange = this.createDOMRangeFromPoint(point)\n    if (domRange) {\n      return this.createLocationRangeFromDOMRange(domRange)?.[0]\n    }\n  }\n\n  domRangeWithinElement(domRange) {\n    if (domRange.collapsed) {\n      return elementContainsNode(this.element, domRange.startContainer)\n    } else {\n      return (\n        elementContainsNode(this.element, domRange.startContainer) &&\n        elementContainsNode(this.element, domRange.endContainer)\n      )\n    }\n  }\n}\n\nSelectionManager.proxyMethod(\"locationMapper.findLocationFromContainerAndOffset\")\nSelectionManager.proxyMethod(\"locationMapper.findContainerAndOffsetFromLocation\")\nSelectionManager.proxyMethod(\"locationMapper.findNodeAndOffsetFromLocation\")\nSelectionManager.proxyMethod(\"pointMapper.createDOMRangeFromPoint\")\nSelectionManager.proxyMethod(\"pointMapper.getClientRectsForDOMRange\")\n\n", "import { removeNode } from \"trix/core/helpers\"\n\nimport * as config from \"trix/config\"\nimport BasicObject from \"trix/core/basic_object\"\n\nimport { defer, handleEvent, makeElement, tagName, triggerEvent } from \"trix/core/helpers\"\nconst { lang, css, keyNames } = config\n\nconst undoable = function(fn) {\n  return function() {\n    const commands = fn.apply(this, arguments)\n    commands.do()\n    if (!this.undos) {\n      this.undos = []\n    }\n    this.undos.push(commands.undo)\n  }\n}\n\nexport default class AttachmentEditorController extends BasicObject {\n  constructor(attachmentPiece, element, container, options = {}) {\n    super(...arguments)\n    this.didClickToolbar = this.didClickToolbar.bind(this)\n    this.didClickActionButton = this.didClickActionButton.bind(this)\n    this.didKeyDownCaption = this.didKeyDownCaption.bind(this)\n    this.didInputCaption = this.didInputCaption.bind(this)\n    this.didChangeCaption = this.didChangeCaption.bind(this)\n    this.didBlurCaption = this.didBlurCaption.bind(this)\n    this.attachmentPiece = attachmentPiece\n    this.element = element\n    this.container = container\n    this.options = options\n    this.attachment = this.attachmentPiece.attachment\n    if (tagName(this.element) === \"a\") {\n      this.element = this.element.firstChild\n    }\n    this.install()\n  }\n\n  install() {\n    this.makeElementMutable()\n    this.addToolbar()\n    if (this.attachment.isPreviewable()) {\n      this.installCaptionEditor()\n    }\n  }\n\n  uninstall() {\n    let undo = this.undos.pop()\n    this.savePendingCaption()\n    while (undo) {\n      undo()\n      undo = this.undos.pop()\n    }\n    this.delegate?.didUninstallAttachmentEditor(this)\n  }\n\n  // Private\n\n  savePendingCaption() {\n    if (this.pendingCaption != null) {\n      const caption = this.pendingCaption\n      this.pendingCaption = null\n      if (caption) {\n        this.delegate?.attachmentEditorDidRequestUpdatingAttributesForAttachment?.({ caption }, this.attachment)\n      } else {\n        this.delegate?.attachmentEditorDidRequestRemovingAttributeForAttachment?.(\"caption\", this.attachment)\n      }\n    }\n  }\n\n  // Installing and uninstalling\n\n  makeElementMutable = undoable(() => {\n    return {\n      do: () => {\n        this.element.dataset.trixMutable = true\n      },\n      undo: () => delete this.element.dataset.trixMutable,\n    }\n  })\n\n  addToolbar = undoable(() => {\n    // <div class=\"#{css.attachmentMetadataContainer}\" data-trix-mutable=\"true\">\n    //   <div class=\"trix-button-row\">\n    //     <span class=\"trix-button-group trix-button-group--actions\">\n    //       <button type=\"button\" class=\"trix-button trix-button--remove\" title=\"#{lang.remove}\" data-trix-action=\"remove\">#{lang.remove}</button>\n    //     </span>\n    //   </div>\n    // </div>\n    const element = makeElement({\n      tagName: \"div\",\n      className: css.attachmentToolbar,\n      data: { trixMutable: true },\n      childNodes: makeElement({\n        tagName: \"div\",\n        className: \"trix-button-row\",\n        childNodes: makeElement({\n          tagName: \"span\",\n          className: \"trix-button-group trix-button-group--actions\",\n          childNodes: makeElement({\n            tagName: \"button\",\n            className: \"trix-button trix-button--remove\",\n            textContent: lang.remove,\n            attributes: { title: lang.remove },\n            data: { trixAction: \"remove\" },\n          }),\n        }),\n      }),\n    })\n\n    if (this.attachment.isPreviewable()) {\n      // <div class=\"#{css.attachmentMetadataContainer}\">\n      //   <span class=\"#{css.attachmentMetadata}\">\n      //     <span class=\"#{css.attachmentName}\" title=\"#{name}\">#{name}</span>\n      //     <span class=\"#{css.attachmentSize}\">#{size}</span>\n      //   </span>\n      // </div>\n      element.appendChild(\n        makeElement({\n          tagName: \"div\",\n          className: css.attachmentMetadataContainer,\n          childNodes: makeElement({\n            tagName: \"span\",\n            className: css.attachmentMetadata,\n            childNodes: [\n              makeElement({\n                tagName: \"span\",\n                className: css.attachmentName,\n                textContent: this.attachment.getFilename(),\n                attributes: { title: this.attachment.getFilename() },\n              }),\n              makeElement({\n                tagName: \"span\",\n                className: css.attachmentSize,\n                textContent: this.attachment.getFormattedFilesize(),\n              }),\n            ],\n          }),\n        })\n      )\n    }\n\n    handleEvent(\"click\", { onElement: element, withCallback: this.didClickToolbar })\n    handleEvent(\"click\", {\n      onElement: element,\n      matchingSelector: \"[data-trix-action]\",\n      withCallback: this.didClickActionButton,\n    })\n\n    triggerEvent(\"trix-attachment-before-toolbar\", { onElement: this.element, attributes: { toolbar: element, attachment: this.attachment } })\n\n    return {\n      do: () => this.element.appendChild(element),\n      undo: () => removeNode(element),\n    }\n  })\n\n  installCaptionEditor = undoable(() => {\n    const textarea = makeElement({\n      tagName: \"textarea\",\n      className: css.attachmentCaptionEditor,\n      attributes: { placeholder: lang.captionPlaceholder },\n      data: { trixMutable: true },\n    })\n    textarea.value = this.attachmentPiece.getCaption()\n\n    const textareaClone = textarea.cloneNode()\n    textareaClone.classList.add(\"trix-autoresize-clone\")\n    textareaClone.tabIndex = -1\n\n    const autoresize = function() {\n      textareaClone.value = textarea.value\n      textarea.style.height = textareaClone.scrollHeight + \"px\"\n    }\n\n    handleEvent(\"input\", { onElement: textarea, withCallback: autoresize })\n    handleEvent(\"input\", { onElement: textarea, withCallback: this.didInputCaption })\n    handleEvent(\"keydown\", { onElement: textarea, withCallback: this.didKeyDownCaption })\n    handleEvent(\"change\", { onElement: textarea, withCallback: this.didChangeCaption })\n    handleEvent(\"blur\", { onElement: textarea, withCallback: this.didBlurCaption })\n\n    const figcaption = this.element.querySelector(\"figcaption\")\n    const editingFigcaption = figcaption.cloneNode()\n\n    return {\n      do: () => {\n        figcaption.style.display = \"none\"\n        editingFigcaption.appendChild(textarea)\n        editingFigcaption.appendChild(textareaClone)\n        editingFigcaption.classList.add(`${css.attachmentCaption}--editing`)\n        figcaption.parentElement.insertBefore(editingFigcaption, figcaption)\n        autoresize()\n        if (this.options.editCaption) {\n          return defer(() => textarea.focus())\n        }\n      },\n      undo() {\n        removeNode(editingFigcaption)\n        figcaption.style.display = null\n      },\n    }\n  })\n\n  // Event handlers\n\n  didClickToolbar(event) {\n    event.preventDefault()\n    return event.stopPropagation()\n  }\n\n  didClickActionButton(event) {\n    const action = event.target.getAttribute(\"data-trix-action\")\n    switch (action) {\n      case \"remove\":\n        return this.delegate?.attachmentEditorDidRequestRemovalOfAttachment(this.attachment)\n    }\n  }\n\n  didKeyDownCaption(event) {\n    if (keyNames[event.keyCode] === \"return\") {\n      event.preventDefault()\n      this.savePendingCaption()\n      return this.delegate?.attachmentEditorDidRequestDeselectingAttachment?.(this.attachment)\n    }\n  }\n\n  didInputCaption(event) {\n    this.pendingCaption = event.target.value.replace(/\\s/g, \" \").trim()\n  }\n\n  didChangeCaption(event) {\n    return this.savePendingCaption()\n  }\n\n  didBlurCaption(event) {\n    return this.savePendingCaption()\n  }\n}\n", "import BasicObject from \"trix/core/basic_object\"\nimport DocumentView from \"trix/views/document_view\"\nimport AttachmentEditorController from \"trix/controllers/attachment_editor_controller\"\n\nimport { defer, findClosestElementFromNode, handleEvent, innerElementIsActive } from \"trix/core/helpers\"\nimport { attachmentSelector } from \"trix/config/attachments\"\n\nexport default class CompositionController extends BasicObject {\n  constructor(element, composition) {\n    super(...arguments)\n    this.didFocus = this.didFocus.bind(this)\n    this.didBlur = this.didBlur.bind(this)\n    this.didClickAttachment = this.didClickAttachment.bind(this)\n\n    this.element = element\n    this.composition = composition\n    this.documentView = new DocumentView(this.composition.document, { element: this.element })\n\n    handleEvent(\"focus\", { onElement: this.element, withCallback: this.didFocus })\n    handleEvent(\"blur\", { onElement: this.element, withCallback: this.didBlur })\n    handleEvent(\"click\", {\n      onElement: this.element,\n      matchingSelector: \"a[contenteditable=false]\",\n      preventDefault: true,\n    })\n    handleEvent(\"mousedown\", {\n      onElement: this.element,\n      matchingSelector: attachmentSelector,\n      withCallback: this.didClickAttachment,\n    })\n    handleEvent(\"click\", { onElement: this.element, matchingSelector: `a${attachmentSelector}`, preventDefault: true })\n  }\n\n  didFocus(event) {\n    const perform = () => {\n      if (!this.focused) {\n        this.focused = true\n        return this.delegate?.compositionControllerDidFocus?.()\n      }\n    }\n\n    return this.blurPromise?.then(perform) || perform()\n  }\n\n  didBlur(event) {\n    this.blurPromise = new Promise((resolve) => {\n      return defer(() => {\n        if (!innerElementIsActive(this.element)) {\n          this.focused = null\n          this.delegate?.compositionControllerDidBlur?.()\n        }\n        this.blurPromise = null\n        return resolve()\n      })\n    })\n  }\n\n  didClickAttachment(event, target) {\n    const attachment = this.findAttachmentForElement(target)\n    const editCaption = !!findClosestElementFromNode(event.target, { matchingSelector: \"figcaption\" })\n    return this.delegate?.compositionControllerDidSelectAttachment?.(attachment, { editCaption })\n  }\n\n  getSerializableElement() {\n    if (this.isEditingAttachment()) {\n      return this.documentView.shadowElement\n    } else {\n      return this.element\n    }\n  }\n\n  render() {\n    if (this.revision !== this.composition.revision) {\n      this.documentView.setDocument(this.composition.document)\n      this.documentView.render()\n      this.revision = this.composition.revision\n    }\n\n    if (this.canSyncDocumentView() && !this.documentView.isSynced()) {\n      this.delegate?.compositionControllerWillSyncDocumentView?.()\n      this.documentView.sync()\n      this.delegate?.compositionControllerDidSyncDocumentView?.()\n    }\n\n    return this.delegate?.compositionControllerDidRender?.()\n  }\n\n  rerenderViewForObject(object) {\n    this.invalidateViewForObject(object)\n    return this.render()\n  }\n\n  invalidateViewForObject(object) {\n    return this.documentView.invalidateViewForObject(object)\n  }\n\n  isViewCachingEnabled() {\n    return this.documentView.isViewCachingEnabled()\n  }\n\n  enableViewCaching() {\n    return this.documentView.enableViewCaching()\n  }\n\n  disableViewCaching() {\n    return this.documentView.disableViewCaching()\n  }\n\n  refreshViewCache() {\n    return this.documentView.garbageCollectCachedViews()\n  }\n\n  // Attachment editor management\n\n  isEditingAttachment() {\n    return !!this.attachmentEditor\n  }\n\n  installAttachmentEditorForAttachment(attachment, options) {\n    if (this.attachmentEditor?.attachment === attachment) return\n    const element = this.documentView.findElementForObject(attachment)\n    if (!element) return\n\n    this.uninstallAttachmentEditor()\n    const attachmentPiece = this.composition.document.getAttachmentPieceForAttachment(attachment)\n    this.attachmentEditor = new AttachmentEditorController(attachmentPiece, element, this.element, options)\n    this.attachmentEditor.delegate = this\n  }\n\n  uninstallAttachmentEditor() {\n    return this.attachmentEditor?.uninstall()\n  }\n\n  // Attachment controller delegate\n\n  didUninstallAttachmentEditor() {\n    this.attachmentEditor = null\n    return this.render()\n  }\n\n  attachmentEditorDidRequestUpdatingAttributesForAttachment(attributes, attachment) {\n    this.delegate?.compositionControllerWillUpdateAttachment?.(attachment)\n    return this.composition.updateAttributesForAttachment(attributes, attachment)\n  }\n\n  attachmentEditorDidRequestRemovingAttributeForAttachment(attribute, attachment) {\n    this.delegate?.compositionControllerWillUpdateAttachment?.(attachment)\n    return this.composition.removeAttributeForAttachment(attribute, attachment)\n  }\n\n  attachmentEditorDidRequestRemovalOfAttachment(attachment) {\n    return this.delegate?.compositionControllerDidRequestRemovalOfAttachment?.(attachment)\n  }\n\n  attachmentEditorDidRequestDeselectingAttachment(attachment) {\n    return this.delegate?.compositionControllerDidRequestDeselectingAttachment?.(attachment)\n  }\n\n  // Private\n\n  canSyncDocumentView() {\n    return !this.isEditingAttachment()\n  }\n\n  findAttachmentForElement(element) {\n    return this.composition.document.getAttachmentById(parseInt(element.dataset.trixId, 10))\n  }\n}\n", "import \"trix/views/object_view\"\nimport BasicObject from \"trix/core/basic_object\"\n\nexport default class Controller extends BasicObject {}\n", "import BasicObject from \"trix/core/basic_object\"\n\nimport {\n  findClosestElementFromNode,\n  nodeIsBlockStartComment,\n  nodeIsEmptyTextNode,\n  normalizeSpaces,\n  summarizeStringChange,\n  tagName,\n} from \"trix/core/helpers\"\n\nconst mutableAttributeName = \"data-trix-mutable\"\nconst mutableSelector = `[${mutableAttributeName}]`\n\nconst options = {\n  attributes: true,\n  childList: true,\n  characterData: true,\n  characterDataOldValue: true,\n  subtree: true,\n}\n\nexport default class MutationObserver extends BasicObject {\n  constructor(element) {\n    super(element)\n    this.didMutate = this.didMutate.bind(this)\n    this.element = element\n    this.observer = new window.MutationObserver(this.didMutate)\n    this.start()\n  }\n\n  start() {\n    this.reset()\n    return this.observer.observe(this.element, options)\n  }\n\n  stop() {\n    return this.observer.disconnect()\n  }\n\n  didMutate(mutations) {\n    this.mutations.push(...Array.from(this.findSignificantMutations(mutations) || []))\n\n    if (this.mutations.length) {\n      this.delegate?.elementDidMutate?.(this.getMutationSummary())\n      return this.reset()\n    }\n  }\n\n  // Private\n\n  reset() {\n    this.mutations = []\n  }\n\n  findSignificantMutations(mutations) {\n    return mutations.filter((mutation) => {\n      return this.mutationIsSignificant(mutation)\n    })\n  }\n\n  mutationIsSignificant(mutation) {\n    if (this.nodeIsMutable(mutation.target)) {\n      return false\n    }\n    for (const node of Array.from(this.nodesModifiedByMutation(mutation))) {\n      if (this.nodeIsSignificant(node)) return true\n    }\n    return false\n  }\n\n  nodeIsSignificant(node) {\n    return node !== this.element && !this.nodeIsMutable(node) && !nodeIsEmptyTextNode(node)\n  }\n\n  nodeIsMutable(node) {\n    return findClosestElementFromNode(node, { matchingSelector: mutableSelector })\n  }\n\n  nodesModifiedByMutation(mutation) {\n    const nodes = []\n    switch (mutation.type) {\n      case \"attributes\":\n        if (mutation.attributeName !== mutableAttributeName) {\n          nodes.push(mutation.target)\n        }\n        break\n      case \"characterData\":\n        // Changes to text nodes should consider the parent element\n        nodes.push(mutation.target.parentNode)\n        nodes.push(mutation.target)\n        break\n      case \"childList\":\n        // Consider each added or removed node\n        nodes.push(...Array.from(mutation.addedNodes || []))\n        nodes.push(...Array.from(mutation.removedNodes || []))\n        break\n    }\n    return nodes\n  }\n\n  getMutationSummary() {\n    return this.getTextMutationSummary()\n  }\n\n  getTextMutationSummary() {\n    const { additions, deletions } = this.getTextChangesFromCharacterData()\n    const textChanges = this.getTextChangesFromChildList()\n\n    Array.from(textChanges.additions).forEach((addition) => {\n      if (!Array.from(additions).includes(addition)) {\n        additions.push(addition)\n      }\n    })\n\n    deletions.push(...Array.from(textChanges.deletions || []))\n\n    const summary = {}\n\n    const added = additions.join(\"\")\n    if (added) {\n      summary.textAdded = added\n    }\n\n    const deleted = deletions.join(\"\")\n    if (deleted) {\n      summary.textDeleted = deleted\n    }\n\n    return summary\n  }\n\n  getMutationsByType(type) {\n    return Array.from(this.mutations).filter((mutation) => mutation.type === type)\n  }\n\n  getTextChangesFromChildList() {\n    let textAdded, textRemoved\n    const addedNodes = []\n    const removedNodes = []\n\n    Array.from(this.getMutationsByType(\"childList\")).forEach((mutation) => {\n      addedNodes.push(...Array.from(mutation.addedNodes || []))\n      removedNodes.push(...Array.from(mutation.removedNodes || []))\n    })\n\n    const singleBlockCommentRemoved =\n      addedNodes.length === 0 && removedNodes.length === 1 && nodeIsBlockStartComment(removedNodes[0])\n\n    if (singleBlockCommentRemoved) {\n      textAdded = []\n      textRemoved = [ \"\\n\" ]\n    } else {\n      textAdded = getTextForNodes(addedNodes)\n      textRemoved = getTextForNodes(removedNodes)\n    }\n\n    const additions = textAdded.filter((text, index) => text !== textRemoved[index]).map(normalizeSpaces)\n    const deletions = textRemoved.filter((text, index) => text !== textAdded[index]).map(normalizeSpaces)\n\n    return { additions, deletions }\n  }\n\n  getTextChangesFromCharacterData() {\n    let added, removed\n    const characterMutations = this.getMutationsByType(\"characterData\")\n\n    if (characterMutations.length) {\n      const startMutation = characterMutations[0],\n        endMutation = characterMutations[characterMutations.length - 1]\n\n      const oldString = normalizeSpaces(startMutation.oldValue)\n      const newString = normalizeSpaces(endMutation.target.data)\n      const summarized = summarizeStringChange(oldString, newString)\n      added = summarized.added\n      removed = summarized.removed\n    }\n\n    return {\n      additions: added ? [ added ] : [],\n      deletions: removed ? [ removed ] : [],\n    }\n  }\n}\n\nconst getTextForNodes = function(nodes = []) {\n  const text = []\n  for (const node of Array.from(nodes)) {\n    switch (node.nodeType) {\n      case Node.TEXT_NODE:\n        text.push(node.data)\n        break\n      case Node.ELEMENT_NODE:\n        if (tagName(node) === \"br\") {\n          text.push(\"\\n\")\n        } else {\n          text.push(...Array.from(getTextForNodes(node.childNodes) || []))\n        }\n        break\n    }\n  }\n  return text\n}\n", "/* eslint-disable\n    no-empty,\n*/\nimport Operation from \"trix/core/utilities/operation\"\n\nexport default class FileVerificationOperation extends Operation {\n  constructor(file) {\n    super(...arguments)\n    this.file = file\n  }\n\n  perform(callback) {\n    const reader = new FileReader()\n\n    reader.onerror = () => callback(false)\n\n    reader.onload = () => {\n      reader.onerror = null\n      try {\n        reader.abort()\n      } catch (error) {}\n      return callback(true, this.file)\n    }\n\n    return reader.readAsArrayBuffer(this.file)\n  }\n}\n", "import * as config from \"trix/config\"\nimport { NON_BREAKING_SPACE, OBJECT_REPLACEMENT_CHARACTER, ZERO_WIDTH_SPACE } from \"trix/constants\"\n\n// Each software keyboard on Android emits its own set of events and some of them can be buggy.\n// This class detects when some buggy events are being emitted and lets know the input controller\n// that they should be ignored.\nexport default class FlakyAndroidKeyboardDetector {\n  constructor(element) {\n    this.element = element\n  }\n\n  shouldIgnore(event) {\n    if (!config.browser.samsungAndroid) return false\n\n    this.previousEvent = this.event\n    this.event = event\n\n    this.checkSamsungKeyboardBuggyModeStart()\n    this.checkSamsungKeyboardBuggyModeEnd()\n\n    return this.buggyMode\n  }\n\n  // private\n\n  // The Samsung keyboard on Android can enter a buggy state in which it emits a flurry of confused events that,\n  // if processed, corrupts the editor. The buggy mode always starts with an insertText event, right after a\n  // keydown event with for an \"Unidentified\" key, with the same text as the editor element, except for a few\n  // extra whitespace, or exotic utf8, characters.\n  checkSamsungKeyboardBuggyModeStart() {\n    if (this.insertingLongTextAfterUnidentifiedChar() && differsInWhitespace(this.element.innerText, this.event.data)) {\n      this.buggyMode = true\n      this.event.preventDefault()\n    }\n  }\n\n  // The flurry of buggy events are always insertText. If we see any other type, it means it's over.\n  checkSamsungKeyboardBuggyModeEnd() {\n    if (this.buggyMode && this.event.inputType !== \"insertText\") {\n      this.buggyMode = false\n    }\n  }\n\n  insertingLongTextAfterUnidentifiedChar() {\n    return this.isBeforeInputInsertText() && this.previousEventWasUnidentifiedKeydown() && this.event.data?.length > 50\n  }\n\n  isBeforeInputInsertText() {\n    return this.event.type === \"beforeinput\" && this.event.inputType === \"insertText\"\n  }\n\n  previousEventWasUnidentifiedKeydown() {\n    return this.previousEvent?.type === \"keydown\" && this.previousEvent?.key === \"Unidentified\"\n  }\n}\n\nconst differsInWhitespace = (text1, text2) => {\n  return normalize(text1) === normalize(text2)\n}\n\nconst whiteSpaceNormalizerRegexp = new RegExp(`(${OBJECT_REPLACEMENT_CHARACTER}|${ZERO_WIDTH_SPACE}|${NON_BREAKING_SPACE}|\\\\s)+`, \"g\")\nconst normalize = (text) => text.replace(whiteSpaceNormalizerRegexp, \" \").trim()\n", "import BasicObject from \"trix/core/basic_object\"\nimport MutationObserver from \"trix/observers/mutation_observer\"\nimport FileVerificationOperation from \"trix/operations/file_verification_operation\"\nimport FlakyAndroidKeyboardDetector from \"../models/flaky_android_keyboard_detector\"\n\nimport { handleEvent, innerElementIsActive } from \"trix/core/helpers\"\n\nexport default class InputController extends BasicObject {\n\n  static events = {}\n\n  constructor(element) {\n    super(...arguments)\n    this.element = element\n    this.mutationObserver = new MutationObserver(this.element)\n    this.mutationObserver.delegate = this\n    this.flakyKeyboardDetector = new FlakyAndroidKeyboardDetector(this.element)\n    for (const eventName in this.constructor.events) {\n      handleEvent(eventName, { onElement: this.element, withCallback: this.handlerFor(eventName) })\n    }\n  }\n\n  elementDidMutate(mutationSummary) {}\n\n  editorWillSyncDocumentView() {\n    return this.mutationObserver.stop()\n  }\n\n  editorDidSyncDocumentView() {\n    return this.mutationObserver.start()\n  }\n\n  requestRender() {\n    return this.delegate?.inputControllerDidRequestRender?.()\n  }\n\n  requestReparse() {\n    this.delegate?.inputControllerDidRequestReparse?.()\n    return this.requestRender()\n  }\n\n  attachFiles(files) {\n    const operations = Array.from(files).map((file) => new FileVerificationOperation(file))\n    return Promise.all(operations).then((files) => {\n      this.handleInput(function() {\n        this.delegate?.inputControllerWillAttachFiles()\n        this.responder?.insertFiles(files)\n        return this.requestRender()\n      })\n    })\n  }\n\n  // Private\n\n  handlerFor(eventName) {\n    return (event) => {\n      if (!event.defaultPrevented) {\n        this.handleInput(() => {\n          if (!innerElementIsActive(this.element)) {\n            if (this.flakyKeyboardDetector.shouldIgnore(event)) return\n\n            this.eventName = eventName\n            this.constructor.events[eventName].call(this, event)\n          }\n        })\n      }\n    }\n  }\n\n  handleInput(callback) {\n    try {\n      this.delegate?.inputControllerWillHandleInput()\n      callback.call(this)\n    } finally {\n      this.delegate?.inputControllerDidHandleInput()\n    }\n  }\n\n  createLinkHTML(href, text) {\n    const link = document.createElement(\"a\")\n    link.href = href\n    link.textContent = text ? text : href\n    return link.outerHTML\n  }\n}\n\n", "import * as config from \"trix/config\"\nimport UTF16String from \"trix/core/utilities/utf16_string\"\nimport BasicObject from \"trix/core/basic_object\"\nimport InputController from \"trix/controllers/input_controller\"\nimport DocumentView from \"trix/views/document_view\"\nimport Document from \"trix/models/document\"\n\nimport {\n  dataTransferIsPlainText,\n  dataTransferIsWritable,\n  keyEventIsKeyboardCommand,\n  makeElement,\n  objectsAreEqual,\n  removeNode,\n  squishBreakableWhitespace,\n} from \"trix/core/helpers\"\n\nimport { selectionChangeObserver } from \"trix/observers/selection_change_observer\"\n\nconst { browser, keyNames } = config\nlet pastedFileCount = 0\n\nexport default class Level0InputController extends InputController {\n\n  static events = {\n    keydown(event) {\n      if (!this.isComposing()) {\n        this.resetInputSummary()\n      }\n      this.inputSummary.didInput = true\n\n      const keyName = keyNames[event.keyCode]\n      if (keyName) {\n        let context = this.keys\n\n        ;[ \"ctrl\", \"alt\", \"shift\", \"meta\" ].forEach((modifier) => {\n          if (event[`${modifier}Key`]) {\n            if (modifier === \"ctrl\") {\n              modifier = \"control\"\n            }\n            context = context?.[modifier]\n          }\n        })\n\n        if (context?.[keyName] != null) {\n          this.setInputSummary({ keyName })\n          selectionChangeObserver.reset()\n          context[keyName].call(this, event)\n        }\n      }\n\n      if (keyEventIsKeyboardCommand(event)) {\n        const character = String.fromCharCode(event.keyCode).toLowerCase()\n        if (character) {\n          const keys = [ \"alt\", \"shift\" ].map((modifier) => {\n            if (event[`${modifier}Key`]) {\n              return modifier\n            }\n          }).filter(key => key)\n          keys.push(character)\n          if (this.delegate?.inputControllerDidReceiveKeyboardCommand(keys)) {\n            event.preventDefault()\n          }\n        }\n      }\n    },\n\n    keypress(event) {\n      if (this.inputSummary.eventName != null) return\n      if (event.metaKey) return\n      if (event.ctrlKey && !event.altKey) return\n\n      const string = stringFromKeyEvent(event)\n      if (string) {\n        this.delegate?.inputControllerWillPerformTyping()\n        this.responder?.insertString(string)\n        return this.setInputSummary({ textAdded: string, didDelete: this.selectionIsExpanded() })\n      }\n    },\n\n    textInput(event) {\n      // Handle autocapitalization\n      const { data } = event\n      const { textAdded } = this.inputSummary\n      if (textAdded && textAdded !== data && textAdded.toUpperCase() === data) {\n        const range = this.getSelectedRange()\n        this.setSelectedRange([ range[0], range[1] + textAdded.length ])\n        this.responder?.insertString(data)\n        this.setInputSummary({ textAdded: data })\n        return this.setSelectedRange(range)\n      }\n    },\n\n    dragenter(event) {\n      event.preventDefault()\n    },\n\n    dragstart(event) {\n      this.serializeSelectionToDataTransfer(event.dataTransfer)\n      this.draggedRange = this.getSelectedRange()\n      return this.delegate?.inputControllerDidStartDrag?.()\n    },\n\n    dragover(event) {\n      if (this.draggedRange || this.canAcceptDataTransfer(event.dataTransfer)) {\n        event.preventDefault()\n        const draggingPoint = { x: event.clientX, y: event.clientY }\n        if (!objectsAreEqual(draggingPoint, this.draggingPoint)) {\n          this.draggingPoint = draggingPoint\n          return this.delegate?.inputControllerDidReceiveDragOverPoint?.(this.draggingPoint)\n        }\n      }\n    },\n\n    dragend(event) {\n      this.delegate?.inputControllerDidCancelDrag?.()\n      this.draggedRange = null\n      this.draggingPoint = null\n    },\n\n    drop(event) {\n      event.preventDefault()\n      const files = event.dataTransfer?.files\n      const documentJSON = event.dataTransfer.getData(\"application/x-trix-document\")\n\n      const point = { x: event.clientX, y: event.clientY }\n      this.responder?.setLocationRangeFromPointRange(point)\n\n      if (files?.length) {\n        this.attachFiles(files)\n      } else if (this.draggedRange) {\n        this.delegate?.inputControllerWillMoveText()\n        this.responder?.moveTextFromRange(this.draggedRange)\n        this.draggedRange = null\n        this.requestRender()\n      } else if (documentJSON) {\n        const document = Document.fromJSONString(documentJSON)\n        this.responder?.insertDocument(document)\n        this.requestRender()\n      }\n\n      this.draggedRange = null\n      this.draggingPoint = null\n    },\n\n    cut(event) {\n      if (this.responder?.selectionIsExpanded()) {\n        if (this.serializeSelectionToDataTransfer(event.clipboardData)) {\n          event.preventDefault()\n        }\n\n        this.delegate?.inputControllerWillCutText()\n        this.deleteInDirection(\"backward\")\n        if (event.defaultPrevented) {\n          return this.requestRender()\n        }\n      }\n    },\n\n    copy(event) {\n      if (this.responder?.selectionIsExpanded()) {\n        if (this.serializeSelectionToDataTransfer(event.clipboardData)) {\n          event.preventDefault()\n        }\n      }\n    },\n\n    paste(event) {\n      const clipboard = event.clipboardData || event.testClipboardData\n      const paste = { clipboard }\n\n      if (!clipboard || pasteEventIsCrippledSafariHTMLPaste(event)) {\n        this.getPastedHTMLUsingHiddenElement((html) => {\n          paste.type = \"text/html\"\n          paste.html = html\n          this.delegate?.inputControllerWillPaste(paste)\n          this.responder?.insertHTML(paste.html)\n          this.requestRender()\n          return this.delegate?.inputControllerDidPaste(paste)\n        })\n        return\n      }\n\n      const href = clipboard.getData(\"URL\")\n      const html = clipboard.getData(\"text/html\")\n      const name = clipboard.getData(\"public.url-name\")\n\n      if (href) {\n        let string\n        paste.type = \"text/html\"\n        if (name) {\n          string = squishBreakableWhitespace(name).trim()\n        } else {\n          string = href\n        }\n        paste.html = this.createLinkHTML(href, string)\n        this.delegate?.inputControllerWillPaste(paste)\n        this.setInputSummary({ textAdded: string, didDelete: this.selectionIsExpanded() })\n        this.responder?.insertHTML(paste.html)\n        this.requestRender()\n        this.delegate?.inputControllerDidPaste(paste)\n      } else if (dataTransferIsPlainText(clipboard)) {\n        paste.type = \"text/plain\"\n        paste.string = clipboard.getData(\"text/plain\")\n        this.delegate?.inputControllerWillPaste(paste)\n        this.setInputSummary({ textAdded: paste.string, didDelete: this.selectionIsExpanded() })\n        this.responder?.insertString(paste.string)\n        this.requestRender()\n        this.delegate?.inputControllerDidPaste(paste)\n      } else if (html) {\n        paste.type = \"text/html\"\n        paste.html = html\n        this.delegate?.inputControllerWillPaste(paste)\n        this.responder?.insertHTML(paste.html)\n        this.requestRender()\n        this.delegate?.inputControllerDidPaste(paste)\n      } else if (Array.from(clipboard.types).includes(\"Files\")) {\n        const file = clipboard.items?.[0]?.getAsFile?.()\n        if (file) {\n          const extension = extensionForFile(file)\n          if (!file.name && extension) {\n            file.name = `pasted-file-${++pastedFileCount}.${extension}`\n          }\n          paste.type = \"File\"\n          paste.file = file\n          this.delegate?.inputControllerWillAttachFiles()\n          this.responder?.insertFile(paste.file)\n          this.requestRender()\n          this.delegate?.inputControllerDidPaste(paste)\n        }\n      }\n\n      event.preventDefault()\n    },\n\n    compositionstart(event) {\n      return this.getCompositionInput().start(event.data)\n    },\n\n    compositionupdate(event) {\n      return this.getCompositionInput().update(event.data)\n    },\n\n    compositionend(event) {\n      return this.getCompositionInput().end(event.data)\n    },\n\n    beforeinput(event) {\n      this.inputSummary.didInput = true\n    },\n\n    input(event) {\n      this.inputSummary.didInput = true\n      return event.stopPropagation()\n    },\n  }\n\n  static keys = {\n    backspace(event) {\n      this.delegate?.inputControllerWillPerformTyping()\n      return this.deleteInDirection(\"backward\", event)\n    },\n\n    delete(event) {\n      this.delegate?.inputControllerWillPerformTyping()\n      return this.deleteInDirection(\"forward\", event)\n    },\n\n    return(event) {\n      this.setInputSummary({ preferDocument: true })\n      this.delegate?.inputControllerWillPerformTyping()\n      return this.responder?.insertLineBreak()\n    },\n\n    tab(event) {\n      if (this.responder?.canIncreaseNestingLevel()) {\n        this.responder?.increaseNestingLevel()\n        this.requestRender()\n        event.preventDefault()\n      }\n    },\n\n    left(event) {\n      if (this.selectionIsInCursorTarget()) {\n        event.preventDefault()\n        return this.responder?.moveCursorInDirection(\"backward\")\n      }\n    },\n\n    right(event) {\n      if (this.selectionIsInCursorTarget()) {\n        event.preventDefault()\n        return this.responder?.moveCursorInDirection(\"forward\")\n      }\n    },\n\n    control: {\n      d(event) {\n        this.delegate?.inputControllerWillPerformTyping()\n        return this.deleteInDirection(\"forward\", event)\n      },\n\n      h(event) {\n        this.delegate?.inputControllerWillPerformTyping()\n        return this.deleteInDirection(\"backward\", event)\n      },\n\n      o(event) {\n        event.preventDefault()\n        this.delegate?.inputControllerWillPerformTyping()\n        this.responder?.insertString(\"\\n\", { updatePosition: false })\n        return this.requestRender()\n      },\n    },\n\n    shift: {\n      return(event) {\n        this.delegate?.inputControllerWillPerformTyping()\n        this.responder?.insertString(\"\\n\")\n        this.requestRender()\n        event.preventDefault()\n      },\n\n      tab(event) {\n        if (this.responder?.canDecreaseNestingLevel()) {\n          this.responder?.decreaseNestingLevel()\n          this.requestRender()\n          event.preventDefault()\n        }\n      },\n\n      left(event) {\n        if (this.selectionIsInCursorTarget()) {\n          event.preventDefault()\n          return this.expandSelectionInDirection(\"backward\")\n        }\n      },\n\n      right(event) {\n        if (this.selectionIsInCursorTarget()) {\n          event.preventDefault()\n          return this.expandSelectionInDirection(\"forward\")\n        }\n      },\n    },\n\n    alt: {\n      backspace(event) {\n        this.setInputSummary({ preferDocument: false })\n        return this.delegate?.inputControllerWillPerformTyping()\n      },\n    },\n\n    meta: {\n      backspace(event) {\n        this.setInputSummary({ preferDocument: false })\n        return this.delegate?.inputControllerWillPerformTyping()\n      },\n    },\n  }\n\n  constructor() {\n    super(...arguments)\n    this.resetInputSummary()\n  }\n\n  setInputSummary(summary = {}) {\n    this.inputSummary.eventName = this.eventName\n    for (const key in summary) {\n      const value = summary[key]\n      this.inputSummary[key] = value\n    }\n    return this.inputSummary\n  }\n\n  resetInputSummary() {\n    this.inputSummary = {}\n  }\n\n  reset() {\n    this.resetInputSummary()\n    return selectionChangeObserver.reset()\n  }\n\n  // Mutation observer delegate\n\n  elementDidMutate(mutationSummary) {\n    if (this.isComposing()) {\n      return this.delegate?.inputControllerDidAllowUnhandledInput?.()\n    } else {\n      return this.handleInput(function() {\n        if (this.mutationIsSignificant(mutationSummary)) {\n          if (this.mutationIsExpected(mutationSummary)) {\n            this.requestRender()\n          } else {\n            this.requestReparse()\n          }\n        }\n        return this.reset()\n      })\n    }\n  }\n\n  mutationIsExpected({ textAdded, textDeleted }) {\n    if (this.inputSummary.preferDocument) {\n      return true\n    }\n\n    const mutationAdditionMatchesSummary =\n      textAdded != null ? textAdded === this.inputSummary.textAdded : !this.inputSummary.textAdded\n    const mutationDeletionMatchesSummary =\n      textDeleted != null ? this.inputSummary.didDelete : !this.inputSummary.didDelete\n\n    const unexpectedNewlineAddition = [ \"\\n\", \" \\n\" ].includes(textAdded) && !mutationAdditionMatchesSummary\n    const unexpectedNewlineDeletion = textDeleted === \"\\n\" && !mutationDeletionMatchesSummary\n    const singleUnexpectedNewline =\n      unexpectedNewlineAddition && !unexpectedNewlineDeletion ||\n      unexpectedNewlineDeletion && !unexpectedNewlineAddition\n\n    if (singleUnexpectedNewline) {\n      const range = this.getSelectedRange()\n      if (range) {\n        const offset = unexpectedNewlineAddition ? textAdded.replace(/\\n$/, \"\").length || -1 : textAdded?.length || 1\n        if (this.responder?.positionIsBlockBreak(range[1] + offset)) {\n          return true\n        }\n      }\n    }\n\n    return mutationAdditionMatchesSummary && mutationDeletionMatchesSummary\n  }\n\n  mutationIsSignificant(mutationSummary) {\n    const textChanged = Object.keys(mutationSummary).length > 0\n    const composedEmptyString = this.compositionInput?.getEndData() === \"\"\n    return textChanged || !composedEmptyString\n  }\n\n  // Private\n\n  getCompositionInput() {\n    if (this.isComposing()) {\n      return this.compositionInput\n    } else {\n      this.compositionInput = new CompositionInput(this)\n    }\n  }\n\n  isComposing() {\n    return this.compositionInput && !this.compositionInput.isEnded()\n  }\n\n  deleteInDirection(direction, event) {\n    if (this.responder?.deleteInDirection(direction) === false) {\n      if (event) {\n        event.preventDefault()\n        return this.requestRender()\n      }\n    } else {\n      return this.setInputSummary({ didDelete: true })\n    }\n  }\n\n  serializeSelectionToDataTransfer(dataTransfer) {\n    if (!dataTransferIsWritable(dataTransfer)) return\n    const document = this.responder?.getSelectedDocument().toSerializableDocument()\n\n    dataTransfer.setData(\"application/x-trix-document\", JSON.stringify(document))\n    dataTransfer.setData(\"text/html\", DocumentView.render(document).innerHTML)\n    dataTransfer.setData(\"text/plain\", document.toString().replace(/\\n$/, \"\"))\n    return true\n  }\n\n  canAcceptDataTransfer(dataTransfer) {\n    const types = {}\n    Array.from(dataTransfer?.types || []).forEach((type) => {\n      types[type] = true\n    })\n    return types.Files || types[\"application/x-trix-document\"] || types[\"text/html\"] || types[\"text/plain\"]\n  }\n\n  getPastedHTMLUsingHiddenElement(callback) {\n    const selectedRange = this.getSelectedRange()\n\n    const style = {\n      position: \"absolute\",\n      left: `${window.pageXOffset}px`,\n      top: `${window.pageYOffset}px`,\n      opacity: 0,\n    }\n\n    const element = makeElement({ style, tagName: \"div\", editable: true })\n    document.body.appendChild(element)\n    element.focus()\n\n    return requestAnimationFrame(() => {\n      const html = element.innerHTML\n      removeNode(element)\n      this.setSelectedRange(selectedRange)\n      return callback(html)\n    })\n  }\n}\n\nLevel0InputController.proxyMethod(\"responder?.getSelectedRange\")\nLevel0InputController.proxyMethod(\"responder?.setSelectedRange\")\nLevel0InputController.proxyMethod(\"responder?.expandSelectionInDirection\")\nLevel0InputController.proxyMethod(\"responder?.selectionIsInCursorTarget\")\nLevel0InputController.proxyMethod(\"responder?.selectionIsExpanded\")\n\nconst extensionForFile = (file) => file.type?.match(/\\/(\\w+)$/)?.[1]\n\nconst hasStringCodePointAt = !!\" \".codePointAt?.(0)\n\nconst stringFromKeyEvent = function(event) {\n  if (event.key && hasStringCodePointAt && event.key.codePointAt(0) === event.keyCode) {\n    return event.key\n  } else {\n    let code\n    if (event.which === null) {\n      code = event.keyCode\n    } else if (event.which !== 0 && event.charCode !== 0) {\n      code = event.charCode\n    }\n\n    if (code != null && keyNames[code] !== \"escape\") {\n      return UTF16String.fromCodepoints([ code ]).toString()\n    }\n  }\n}\n\nconst pasteEventIsCrippledSafariHTMLPaste = function(event) {\n  const paste = event.clipboardData\n  if (paste) {\n    if (paste.types.includes(\"text/html\")) {\n      // Answer is yes if there's any possibility of Paste and Match Style in Safari,\n      // which is nearly impossible to detect confidently: https://bugs.webkit.org/show_bug.cgi?id=174165\n      for (const type of paste.types) {\n        const hasPasteboardFlavor = /^CorePasteboardFlavorType/.test(type)\n        const hasReadableDynamicData = /^dyn\\./.test(type) && paste.getData(type)\n        const mightBePasteAndMatchStyle = hasPasteboardFlavor || hasReadableDynamicData\n        if (mightBePasteAndMatchStyle) {\n          return true\n        }\n      }\n      return false\n    } else {\n      const isExternalHTMLPaste = paste.types.includes(\"com.apple.webarchive\")\n      const isExternalRichTextPaste = paste.types.includes(\"com.apple.flat-rtfd\")\n      return isExternalHTMLPaste || isExternalRichTextPaste\n    }\n  }\n}\n\nclass CompositionInput extends BasicObject {\n  constructor(inputController) {\n    super(...arguments)\n    this.inputController = inputController\n    this.responder = this.inputController.responder\n    this.delegate = this.inputController.delegate\n    this.inputSummary = this.inputController.inputSummary\n    this.data = {}\n  }\n\n  start(data) {\n    this.data.start = data\n\n    if (this.isSignificant()) {\n      if (this.inputSummary.eventName === \"keypress\" && this.inputSummary.textAdded) {\n        this.responder?.deleteInDirection(\"left\")\n      }\n\n      if (!this.selectionIsExpanded()) {\n        this.insertPlaceholder()\n        this.requestRender()\n      }\n\n      this.range = this.responder?.getSelectedRange()\n    }\n  }\n\n  update(data) {\n    this.data.update = data\n\n    if (this.isSignificant()) {\n      const range = this.selectPlaceholder()\n      if (range) {\n        this.forgetPlaceholder()\n        this.range = range\n      }\n    }\n  }\n\n  end(data) {\n    this.data.end = data\n\n    if (this.isSignificant()) {\n      this.forgetPlaceholder()\n\n      if (this.canApplyToDocument()) {\n        this.setInputSummary({ preferDocument: true, didInput: false })\n        this.delegate?.inputControllerWillPerformTyping()\n        this.responder?.setSelectedRange(this.range)\n        this.responder?.insertString(this.data.end)\n        return this.responder?.setSelectedRange(this.range[0] + this.data.end.length)\n      } else if (this.data.start != null || this.data.update != null) {\n        this.requestReparse()\n        return this.inputController.reset()\n      }\n    } else {\n      return this.inputController.reset()\n    }\n  }\n\n  getEndData() {\n    return this.data.end\n  }\n\n  isEnded() {\n    return this.getEndData() != null\n  }\n\n  isSignificant() {\n    if (browser.composesExistingText) {\n      return this.inputSummary.didInput\n    } else {\n      return true\n    }\n  }\n\n  // Private\n\n  canApplyToDocument() {\n    return this.data.start?.length === 0 && this.data.end?.length > 0 && this.range\n  }\n}\n\nCompositionInput.proxyMethod(\"inputController.setInputSummary\")\nCompositionInput.proxyMethod(\"inputController.requestRender\")\nCompositionInput.proxyMethod(\"inputController.requestReparse\")\nCompositionInput.proxyMethod(\"responder?.selectionIsExpanded\")\nCompositionInput.proxyMethod(\"responder?.insertPlaceholder\")\nCompositionInput.proxyMethod(\"responder?.selectPlaceholder\")\nCompositionInput.proxyMethod(\"responder?.forgetPlaceholder\")\n", "import { getAllAttributeNames, shouldRenderInmmediatelyToDealWithIOSDictation, squishBreakableWhitespace } from \"trix/core/helpers\"\nimport InputController from \"trix/controllers/input_controller\"\nimport * as config from \"trix/config\"\n\nimport { dataTransferIsMsOfficePaste, dataTransferIsPlainText, keyEventIsKeyboardCommand, objectsAreEqual } from \"trix/core/helpers\"\n\nimport { selectionChangeObserver } from \"trix/observers/selection_change_observer\"\n\nexport default class Level2InputController extends InputController {\n  constructor(...args) {\n    super(...args)\n    this.render = this.render.bind(this)\n  }\n\n  static events = {\n    keydown(event) {\n      if (keyEventIsKeyboardCommand(event)) {\n        const command = keyboardCommandFromKeyEvent(event)\n        if (this.delegate?.inputControllerDidReceiveKeyboardCommand(command)) {\n          event.preventDefault()\n        }\n      } else {\n        let name = event.key\n        if (event.altKey) {\n          name += \"+Alt\"\n        }\n        if (event.shiftKey) {\n          name += \"+Shift\"\n        }\n        const handler = this.constructor.keys[name]\n        if (handler) {\n          return this.withEvent(event, handler)\n        }\n      }\n    },\n\n    // Handle paste event to work around beforeinput.insertFromPaste browser bugs.\n    // Safe to remove each condition once fixed upstream.\n    paste(event) {\n      // https://bugs.webkit.org/show_bug.cgi?id=194921\n      let paste\n      const href = event.clipboardData?.getData(\"URL\")\n      if (pasteEventHasFilesOnly(event)) {\n        event.preventDefault()\n        return this.attachFiles(event.clipboardData.files)\n\n        // https://bugs.chromium.org/p/chromium/issues/detail?id=934448\n      } else if (pasteEventHasPlainTextOnly(event)) {\n        event.preventDefault()\n        paste = {\n          type: \"text/plain\",\n          string: event.clipboardData.getData(\"text/plain\"),\n        }\n        this.delegate?.inputControllerWillPaste(paste)\n        this.responder?.insertString(paste.string)\n        this.render()\n        return this.delegate?.inputControllerDidPaste(paste)\n\n        // https://bugs.webkit.org/show_bug.cgi?id=196702\n      } else if (href) {\n        event.preventDefault()\n        paste = {\n          type: \"text/html\",\n          html: this.createLinkHTML(href),\n        }\n        this.delegate?.inputControllerWillPaste(paste)\n        this.responder?.insertHTML(paste.html)\n        this.render()\n        return this.delegate?.inputControllerDidPaste(paste)\n      }\n    },\n\n    beforeinput(event) {\n      const handler = this.constructor.inputTypes[event.inputType]\n\n      const immmediateRender = shouldRenderInmmediatelyToDealWithIOSDictation(event)\n\n      if (handler) {\n        this.withEvent(event, handler)\n\n        if (!immmediateRender) {\n          this.scheduleRender()\n        }\n      }\n\n      if (immmediateRender) {\n        this.render()\n      }\n    },\n\n    input(event) {\n      selectionChangeObserver.reset()\n    },\n\n    dragstart(event) {\n      if (this.responder?.selectionContainsAttachments()) {\n        event.dataTransfer.setData(\"application/x-trix-dragging\", true)\n\n        this.dragging = {\n          range: this.responder?.getSelectedRange(),\n          point: pointFromEvent(event),\n        }\n      }\n    },\n\n    dragenter(event) {\n      if (dragEventHasFiles(event)) {\n        event.preventDefault()\n      }\n    },\n\n    dragover(event) {\n      if (this.dragging) {\n        event.preventDefault()\n        const point = pointFromEvent(event)\n        if (!objectsAreEqual(point, this.dragging.point)) {\n          this.dragging.point = point\n          return this.responder?.setLocationRangeFromPointRange(point)\n        }\n      } else if (dragEventHasFiles(event)) {\n        event.preventDefault()\n      }\n    },\n\n    drop(event) {\n      if (this.dragging) {\n        event.preventDefault()\n        this.delegate?.inputControllerWillMoveText()\n        this.responder?.moveTextFromRange(this.dragging.range)\n        this.dragging = null\n        return this.scheduleRender()\n      } else if (dragEventHasFiles(event)) {\n        event.preventDefault()\n        const point = pointFromEvent(event)\n        this.responder?.setLocationRangeFromPointRange(point)\n        return this.attachFiles(event.dataTransfer.files)\n      }\n    },\n\n    dragend() {\n      if (this.dragging) {\n        this.responder?.setSelectedRange(this.dragging.range)\n        this.dragging = null\n      }\n    },\n\n    compositionend(event) {\n      if (this.composing) {\n        this.composing = false\n        if (!config.browser.recentAndroid) this.scheduleRender()\n      }\n    },\n  }\n\n  static keys = {\n    ArrowLeft() {\n      if (this.responder?.shouldManageMovingCursorInDirection(\"backward\")) {\n        this.event.preventDefault()\n        return this.responder?.moveCursorInDirection(\"backward\")\n      }\n    },\n\n    ArrowRight() {\n      if (this.responder?.shouldManageMovingCursorInDirection(\"forward\")) {\n        this.event.preventDefault()\n        return this.responder?.moveCursorInDirection(\"forward\")\n      }\n    },\n\n    Backspace() {\n      if (this.responder?.shouldManageDeletingInDirection(\"backward\")) {\n        this.event.preventDefault()\n        this.delegate?.inputControllerWillPerformTyping()\n        this.responder?.deleteInDirection(\"backward\")\n        return this.render()\n      }\n    },\n\n    Tab() {\n      if (this.responder?.canIncreaseNestingLevel()) {\n        this.event.preventDefault()\n        this.responder?.increaseNestingLevel()\n        return this.render()\n      }\n    },\n\n    \"Tab+Shift\"() {\n      if (this.responder?.canDecreaseNestingLevel()) {\n        this.event.preventDefault()\n        this.responder?.decreaseNestingLevel()\n        return this.render()\n      }\n    },\n  }\n\n  static inputTypes = {\n    deleteByComposition() {\n      return this.deleteInDirection(\"backward\", { recordUndoEntry: false })\n    },\n\n    deleteByCut() {\n      return this.deleteInDirection(\"backward\")\n    },\n\n    deleteByDrag() {\n      this.event.preventDefault()\n      return this.withTargetDOMRange(function() {\n        this.deleteByDragRange = this.responder?.getSelectedRange()\n      })\n    },\n\n    deleteCompositionText() {\n      return this.deleteInDirection(\"backward\", { recordUndoEntry: false })\n    },\n\n    deleteContent() {\n      return this.deleteInDirection(\"backward\")\n    },\n\n    deleteContentBackward() {\n      return this.deleteInDirection(\"backward\")\n    },\n\n    deleteContentForward() {\n      return this.deleteInDirection(\"forward\")\n    },\n\n    deleteEntireSoftLine() {\n      return this.deleteInDirection(\"forward\")\n    },\n\n    deleteHardLineBackward() {\n      return this.deleteInDirection(\"backward\")\n    },\n\n    deleteHardLineForward() {\n      return this.deleteInDirection(\"forward\")\n    },\n\n    deleteSoftLineBackward() {\n      return this.deleteInDirection(\"backward\")\n    },\n\n    deleteSoftLineForward() {\n      return this.deleteInDirection(\"forward\")\n    },\n\n    deleteWordBackward() {\n      return this.deleteInDirection(\"backward\")\n    },\n\n    deleteWordForward() {\n      return this.deleteInDirection(\"forward\")\n    },\n\n    formatBackColor() {\n      return this.activateAttributeIfSupported(\"backgroundColor\", this.event.data)\n    },\n\n    formatBold() {\n      return this.toggleAttributeIfSupported(\"bold\")\n    },\n\n    formatFontColor() {\n      return this.activateAttributeIfSupported(\"color\", this.event.data)\n    },\n\n    formatFontName() {\n      return this.activateAttributeIfSupported(\"font\", this.event.data)\n    },\n\n    formatIndent() {\n      if (this.responder?.canIncreaseNestingLevel()) {\n        return this.withTargetDOMRange(function() {\n          return this.responder?.increaseNestingLevel()\n        })\n      }\n    },\n\n    formatItalic() {\n      return this.toggleAttributeIfSupported(\"italic\")\n    },\n\n    formatJustifyCenter() {\n      return this.toggleAttributeIfSupported(\"justifyCenter\")\n    },\n\n    formatJustifyFull() {\n      return this.toggleAttributeIfSupported(\"justifyFull\")\n    },\n\n    formatJustifyLeft() {\n      return this.toggleAttributeIfSupported(\"justifyLeft\")\n    },\n\n    formatJustifyRight() {\n      return this.toggleAttributeIfSupported(\"justifyRight\")\n    },\n\n    formatOutdent() {\n      if (this.responder?.canDecreaseNestingLevel()) {\n        return this.withTargetDOMRange(function() {\n          return this.responder?.decreaseNestingLevel()\n        })\n      }\n    },\n\n    formatRemove() {\n      this.withTargetDOMRange(function() {\n        for (const attributeName in this.responder?.getCurrentAttributes()) {\n          this.responder?.removeCurrentAttribute(attributeName)\n        }\n      })\n    },\n\n    formatSetBlockTextDirection() {\n      return this.activateAttributeIfSupported(\"blockDir\", this.event.data)\n    },\n\n    formatSetInlineTextDirection() {\n      return this.activateAttributeIfSupported(\"textDir\", this.event.data)\n    },\n\n    formatStrikeThrough() {\n      return this.toggleAttributeIfSupported(\"strike\")\n    },\n\n    formatSubscript() {\n      return this.toggleAttributeIfSupported(\"sub\")\n    },\n\n    formatSuperscript() {\n      return this.toggleAttributeIfSupported(\"sup\")\n    },\n\n    formatUnderline() {\n      return this.toggleAttributeIfSupported(\"underline\")\n    },\n\n    historyRedo() {\n      return this.delegate?.inputControllerWillPerformRedo()\n    },\n\n    historyUndo() {\n      return this.delegate?.inputControllerWillPerformUndo()\n    },\n\n    insertCompositionText() {\n      this.composing = true\n      return this.insertString(this.event.data)\n    },\n\n    insertFromComposition() {\n      this.composing = false\n      return this.insertString(this.event.data)\n    },\n\n    insertFromDrop() {\n      const range = this.deleteByDragRange\n      if (range) {\n        this.deleteByDragRange = null\n        this.delegate?.inputControllerWillMoveText()\n        return this.withTargetDOMRange(function() {\n          return this.responder?.moveTextFromRange(range)\n        })\n      }\n    },\n\n    insertFromPaste() {\n      const { dataTransfer } = this.event\n      const paste = { dataTransfer }\n\n      const href = dataTransfer.getData(\"URL\")\n      const html = dataTransfer.getData(\"text/html\")\n\n      if (href) {\n        let string\n        this.event.preventDefault()\n        paste.type = \"text/html\"\n        const name = dataTransfer.getData(\"public.url-name\")\n        if (name) {\n          string = squishBreakableWhitespace(name).trim()\n        } else {\n          string = href\n        }\n        paste.html = this.createLinkHTML(href, string)\n        this.delegate?.inputControllerWillPaste(paste)\n        this.withTargetDOMRange(function() {\n          return this.responder?.insertHTML(paste.html)\n        })\n        this.afterRender = () => {\n          return this.delegate?.inputControllerDidPaste(paste)\n        }\n      } else if (dataTransferIsPlainText(dataTransfer)) {\n        paste.type = \"text/plain\"\n        paste.string = dataTransfer.getData(\"text/plain\")\n        this.delegate?.inputControllerWillPaste(paste)\n        this.withTargetDOMRange(function() {\n          return this.responder?.insertString(paste.string)\n        })\n\n        this.afterRender = () => {\n          return this.delegate?.inputControllerDidPaste(paste)\n        }\n      } else if (processableFilePaste(this.event)) {\n        paste.type = \"File\"\n        paste.file = dataTransfer.files[0]\n        this.delegate?.inputControllerWillPaste(paste)\n        this.withTargetDOMRange(function() {\n          return this.responder?.insertFile(paste.file)\n        })\n\n        this.afterRender = () => {\n          return this.delegate?.inputControllerDidPaste(paste)\n        }\n      } else if (html) {\n        this.event.preventDefault()\n        paste.type = \"text/html\"\n        paste.html = html\n        this.delegate?.inputControllerWillPaste(paste)\n        this.withTargetDOMRange(function() {\n          return this.responder?.insertHTML(paste.html)\n        })\n        this.afterRender = () => {\n          return this.delegate?.inputControllerDidPaste(paste)\n        }\n      }\n    },\n\n    insertFromYank() {\n      return this.insertString(this.event.data)\n    },\n\n    insertLineBreak() {\n      return this.insertString(\"\\n\")\n    },\n\n    insertLink() {\n      return this.activateAttributeIfSupported(\"href\", this.event.data)\n    },\n\n    insertOrderedList() {\n      return this.toggleAttributeIfSupported(\"number\")\n    },\n\n    insertParagraph() {\n      this.delegate?.inputControllerWillPerformTyping()\n      return this.withTargetDOMRange(function() {\n        return this.responder?.insertLineBreak()\n      })\n    },\n\n    insertReplacementText() {\n      const replacement = this.event.dataTransfer.getData(\"text/plain\")\n      const domRange = this.event.getTargetRanges()[0]\n\n      this.withTargetDOMRange(domRange, () => {\n        this.insertString(replacement, { updatePosition: false })\n      })\n    },\n\n    insertText() {\n      return this.insertString(this.event.data || this.event.dataTransfer?.getData(\"text/plain\"))\n    },\n\n    insertTranspose() {\n      return this.insertString(this.event.data)\n    },\n\n    insertUnorderedList() {\n      return this.toggleAttributeIfSupported(\"bullet\")\n    },\n  }\n\n  elementDidMutate() {\n    if (this.scheduledRender) {\n      if (this.composing) {\n        return this.delegate?.inputControllerDidAllowUnhandledInput?.()\n      }\n    } else {\n      return this.reparse()\n    }\n  }\n\n  scheduleRender() {\n    return this.scheduledRender ? this.scheduledRender : this.scheduledRender = requestAnimationFrame(this.render)\n  }\n\n  render() {\n    cancelAnimationFrame(this.scheduledRender)\n    this.scheduledRender = null\n    if (!this.composing) {\n      this.delegate?.render()\n    }\n    this.afterRender?.()\n    this.afterRender = null\n  }\n\n  reparse() {\n    return this.delegate?.reparse()\n  }\n\n  // Responder helpers\n\n  insertString(string = \"\", options) {\n    this.delegate?.inputControllerWillPerformTyping()\n    return this.withTargetDOMRange(function() {\n      return this.responder?.insertString(string, options)\n    })\n  }\n\n  toggleAttributeIfSupported(attributeName) {\n    if (getAllAttributeNames().includes(attributeName)) {\n      this.delegate?.inputControllerWillPerformFormatting(attributeName)\n      return this.withTargetDOMRange(function() {\n        return this.responder?.toggleCurrentAttribute(attributeName)\n      })\n    }\n  }\n\n  activateAttributeIfSupported(attributeName, value) {\n    if (getAllAttributeNames().includes(attributeName)) {\n      this.delegate?.inputControllerWillPerformFormatting(attributeName)\n      return this.withTargetDOMRange(function() {\n        return this.responder?.setCurrentAttribute(attributeName, value)\n      })\n    }\n  }\n\n  deleteInDirection(direction, { recordUndoEntry } = { recordUndoEntry: true }) {\n    if (recordUndoEntry) {\n      this.delegate?.inputControllerWillPerformTyping()\n    }\n    const perform = () => this.responder?.deleteInDirection(direction)\n    const domRange = this.getTargetDOMRange({ minLength: this.composing ? 1 : 2 })\n    if (domRange) {\n      return this.withTargetDOMRange(domRange, perform)\n    } else {\n      return perform()\n    }\n  }\n\n  // Selection helpers\n\n  withTargetDOMRange(domRange, fn) {\n    if (typeof domRange === \"function\") {\n      fn = domRange\n      domRange = this.getTargetDOMRange()\n    }\n    if (domRange) {\n      return this.responder?.withTargetDOMRange(domRange, fn.bind(this))\n    } else {\n      selectionChangeObserver.reset()\n      return fn.call(this)\n    }\n  }\n\n  getTargetDOMRange({ minLength } = { minLength: 0 }) {\n    const targetRanges = this.event.getTargetRanges?.()\n    if (targetRanges) {\n      if (targetRanges.length) {\n        const domRange = staticRangeToRange(targetRanges[0])\n        if (minLength === 0 || domRange.toString().length >= minLength) {\n          return domRange\n        }\n      }\n    }\n  }\n\n  withEvent(event, fn) {\n    let result\n    this.event = event\n    try {\n      result = fn.call(this)\n    } finally {\n      this.event = null\n    }\n    return result\n  }\n}\n\nconst staticRangeToRange = function(staticRange) {\n  const range = document.createRange()\n  range.setStart(staticRange.startContainer, staticRange.startOffset)\n  range.setEnd(staticRange.endContainer, staticRange.endOffset)\n  return range\n}\n\n// Event helpers\n\nconst dragEventHasFiles = (event) => Array.from(event.dataTransfer?.types || []).includes(\"Files\")\n\nconst processableFilePaste = (event) => {\n  // Paste events that only have files are handled by the paste event handler,\n  // to work around Safari not supporting beforeinput.insertFromPaste for files.\n\n  // MS Office text pastes include a file with a screenshot of the text, but we should\n  // handle them as text pastes.\n  return event.dataTransfer.files?.[0] && !pasteEventHasFilesOnly(event) && !dataTransferIsMsOfficePaste(event)\n}\n\nconst pasteEventHasFilesOnly = function(event) {\n  const clipboard = event.clipboardData\n  if (clipboard) {\n    const fileTypes = Array.from(clipboard.types).filter((type) => type.match(/file/i)) // \"Files\", \"application/x-moz-file\"\n    return fileTypes.length === clipboard.types.length && clipboard.files.length >= 1\n  }\n}\n\nconst pasteEventHasPlainTextOnly = function(event) {\n  const clipboard = event.clipboardData\n  if (clipboard) {\n    return clipboard.types.includes(\"text/plain\") && clipboard.types.length === 1\n  }\n}\n\nconst keyboardCommandFromKeyEvent = function(event) {\n  const command = []\n  if (event.altKey) {\n    command.push(\"alt\")\n  }\n  if (event.shiftKey) {\n    command.push(\"shift\")\n  }\n  command.push(event.key)\n  return command\n}\n\nconst pointFromEvent = (event) => ({\n  x: event.clientX,\n  y: event.clientY,\n})\n", "import BasicObject from \"trix/core/basic_object\"\n\nimport { findClosestElementFromNode, handleEvent, triggerEvent } from \"trix/core/helpers\"\n\nimport DOMPurify from \"dompurify\"\n\nconst attributeButtonSelector = \"[data-trix-attribute]\"\nconst actionButtonSelector = \"[data-trix-action]\"\nconst toolbarButtonSelector = `${attributeButtonSelector}, ${actionButtonSelector}`\nconst dialogSelector = \"[data-trix-dialog]\"\nconst activeDialogSelector = `${dialogSelector}[data-trix-active]`\nconst dialogButtonSelector = `${dialogSelector} [data-trix-method]`\nconst dialogInputSelector = `${dialogSelector} [data-trix-input]`\nconst getInputForDialog = (element, attributeName) => {\n  if (!attributeName) { attributeName = getAttributeName(element) }\n  return element.querySelector(`[data-trix-input][name='${attributeName}']`)\n}\nconst getActionName = (element) => element.getAttribute(\"data-trix-action\")\nconst getAttributeName = (element) => {\n  return element.getAttribute(\"data-trix-attribute\") || element.getAttribute(\"data-trix-dialog-attribute\")\n}\nconst getDialogName = (element) => element.getAttribute(\"data-trix-dialog\")\n\nexport default class ToolbarController extends BasicObject {\n  constructor(element) {\n    super(element)\n    this.didClickActionButton = this.didClickActionButton.bind(this)\n    this.didClickAttributeButton = this.didClickAttributeButton.bind(this)\n    this.didClickDialogButton = this.didClickDialogButton.bind(this)\n    this.didKeyDownDialogInput = this.didKeyDownDialogInput.bind(this)\n    this.element = element\n    this.attributes = {}\n    this.actions = {}\n    this.resetDialogInputs()\n\n    handleEvent(\"mousedown\", {\n      onElement: this.element,\n      matchingSelector: actionButtonSelector,\n      withCallback: this.didClickActionButton,\n    })\n    handleEvent(\"mousedown\", {\n      onElement: this.element,\n      matchingSelector: attributeButtonSelector,\n      withCallback: this.didClickAttributeButton,\n    })\n    handleEvent(\"click\", { onElement: this.element, matchingSelector: toolbarButtonSelector, preventDefault: true })\n    handleEvent(\"click\", {\n      onElement: this.element,\n      matchingSelector: dialogButtonSelector,\n      withCallback: this.didClickDialogButton,\n    })\n    handleEvent(\"keydown\", {\n      onElement: this.element,\n      matchingSelector: dialogInputSelector,\n      withCallback: this.didKeyDownDialogInput,\n    })\n  }\n\n  // Event handlers\n\n  didClickActionButton(event, element) {\n    this.delegate?.toolbarDidClickButton()\n    event.preventDefault()\n    const actionName = getActionName(element)\n\n    if (this.getDialog(actionName)) {\n      return this.toggleDialog(actionName)\n    } else {\n      return this.delegate?.toolbarDidInvokeAction(actionName, element)\n    }\n  }\n\n  didClickAttributeButton(event, element) {\n    this.delegate?.toolbarDidClickButton()\n    event.preventDefault()\n    const attributeName = getAttributeName(element)\n\n    if (this.getDialog(attributeName)) {\n      this.toggleDialog(attributeName)\n    } else {\n      this.delegate?.toolbarDidToggleAttribute(attributeName)\n    }\n\n    return this.refreshAttributeButtons()\n  }\n\n  didClickDialogButton(event, element) {\n    const dialogElement = findClosestElementFromNode(element, { matchingSelector: dialogSelector })\n    const method = element.getAttribute(\"data-trix-method\")\n    return this[method].call(this, dialogElement)\n  }\n\n  didKeyDownDialogInput(event, element) {\n    if (event.keyCode === 13) {\n      // Enter key\n      event.preventDefault()\n      const attribute = element.getAttribute(\"name\")\n      const dialog = this.getDialog(attribute)\n      this.setAttribute(dialog)\n    }\n    if (event.keyCode === 27) {\n      // Escape key\n      event.preventDefault()\n      return this.hideDialog()\n    }\n  }\n\n  // Action buttons\n\n  updateActions(actions) {\n    this.actions = actions\n    return this.refreshActionButtons()\n  }\n\n  refreshActionButtons() {\n    return this.eachActionButton((element, actionName) => {\n      element.disabled = this.actions[actionName] === false\n    })\n  }\n\n  eachActionButton(callback) {\n    return Array.from(this.element.querySelectorAll(actionButtonSelector)).map((element) =>\n      callback(element, getActionName(element))\n    )\n  }\n\n  // Attribute buttons\n\n  updateAttributes(attributes) {\n    this.attributes = attributes\n    return this.refreshAttributeButtons()\n  }\n\n  refreshAttributeButtons() {\n    return this.eachAttributeButton((element, attributeName) => {\n      element.disabled = this.attributes[attributeName] === false\n      if (this.attributes[attributeName] || this.dialogIsVisible(attributeName)) {\n        element.setAttribute(\"data-trix-active\", \"\")\n        return element.classList.add(\"trix-active\")\n      } else {\n        element.removeAttribute(\"data-trix-active\")\n        return element.classList.remove(\"trix-active\")\n      }\n    })\n  }\n\n  eachAttributeButton(callback) {\n    return Array.from(this.element.querySelectorAll(attributeButtonSelector)).map((element) =>\n      callback(element, getAttributeName(element))\n    )\n  }\n\n  applyKeyboardCommand(keys) {\n    const keyString = JSON.stringify(keys.sort())\n    for (const button of Array.from(this.element.querySelectorAll(\"[data-trix-key]\"))) {\n      const buttonKeys = button.getAttribute(\"data-trix-key\").split(\"+\")\n      const buttonKeyString = JSON.stringify(buttonKeys.sort())\n      if (buttonKeyString === keyString) {\n        triggerEvent(\"mousedown\", { onElement: button })\n        return true\n      }\n    }\n    return false\n  }\n\n  // Dialogs\n\n  dialogIsVisible(dialogName) {\n    const element = this.getDialog(dialogName)\n    if (element) {\n      return element.hasAttribute(\"data-trix-active\")\n    }\n  }\n\n  toggleDialog(dialogName) {\n    if (this.dialogIsVisible(dialogName)) {\n      return this.hideDialog()\n    } else {\n      return this.showDialog(dialogName)\n    }\n  }\n\n  showDialog(dialogName) {\n    this.hideDialog()\n    this.delegate?.toolbarWillShowDialog()\n\n    const element = this.getDialog(dialogName)\n    element.setAttribute(\"data-trix-active\", \"\")\n    element.classList.add(\"trix-active\")\n\n    Array.from(element.querySelectorAll(\"input[disabled]\")).forEach((disabledInput) => {\n      disabledInput.removeAttribute(\"disabled\")\n    })\n\n    const attributeName = getAttributeName(element)\n    if (attributeName) {\n      const input = getInputForDialog(element, dialogName)\n      if (input) {\n        input.value = this.attributes[attributeName] || \"\"\n        input.select()\n      }\n    }\n\n    return this.delegate?.toolbarDidShowDialog(dialogName)\n  }\n\n  setAttribute(dialogElement) {\n    const attributeName = getAttributeName(dialogElement)\n    const input = getInputForDialog(dialogElement, attributeName)\n\n    if (input.willValidate) {\n      input.setCustomValidity(\"\")\n      if (!input.checkValidity() || !this.isSafeAttribute(input)) {\n        input.setCustomValidity(\"Invalid value\")\n        input.setAttribute(\"data-trix-validate\", \"\")\n        input.classList.add(\"trix-validate\")\n        return input.focus()\n      }\n    }\n    this.delegate?.toolbarDidUpdateAttribute(attributeName, input.value)\n    return this.hideDialog()\n  }\n\n  isSafeAttribute(input) {\n    if (input.hasAttribute(\"data-trix-validate-href\")) {\n      return DOMPurify.isValidAttribute(\"a\", \"href\", input.value)\n    } else {\n      return true\n    }\n  }\n\n  removeAttribute(dialogElement) {\n    const attributeName = getAttributeName(dialogElement)\n    this.delegate?.toolbarDidRemoveAttribute(attributeName)\n    return this.hideDialog()\n  }\n\n  hideDialog() {\n    const element = this.element.querySelector(activeDialogSelector)\n    if (element) {\n      element.removeAttribute(\"data-trix-active\")\n      element.classList.remove(\"trix-active\")\n      this.resetDialogInputs()\n      return this.delegate?.toolbarDidHideDialog(getDialogName(element))\n    }\n  }\n\n  resetDialogInputs() {\n    Array.from(this.element.querySelectorAll(dialogInputSelector)).forEach((input) => {\n      input.setAttribute(\"disabled\", \"disabled\")\n      input.removeAttribute(\"data-trix-validate\")\n      input.classList.remove(\"trix-validate\")\n    })\n  }\n\n  getDialog(dialogName) {\n    return this.element.querySelector(`[data-trix-dialog=${dialogName}]`)\n  }\n}\n", "/* eslint-disable\n    id-length,\n*/\nimport * as config from \"trix/config\"\n\nimport { serializeToContentType } from \"trix/core/serialization\"\n\nimport Controller from \"trix/controllers/controller\"\nimport Level0InputController from \"trix/controllers/level_0_input_controller\"\nimport Level2InputController from \"trix/controllers/level_2_input_controller\"\nimport CompositionController from \"trix/controllers/composition_controller\"\nimport ToolbarController from \"trix/controllers/toolbar_controller\"\nimport Composition from \"trix/models/composition\"\nimport Editor from \"trix/models/editor\"\nimport AttachmentManager from \"trix/models/attachment_manager\"\nimport SelectionManager from \"trix/models/selection_manager\"\n\nimport { getBlockConfig, objectsAreEqual, rangeIsCollapsed, rangesAreEqual } from \"trix/core/helpers\"\nimport { selectionChangeObserver } from \"trix/observers/selection_change_observer\"\n\nconst snapshotsAreEqual = (a, b) => rangesAreEqual(a.selectedRange, b.selectedRange) && a.document.isEqualTo(b.document)\n\nexport default class EditorController extends Controller {\n  static actions = {\n    undo: {\n      test() {\n        return this.editor.canUndo()\n      },\n      perform() {\n        return this.editor.undo()\n      },\n    },\n    redo: {\n      test() {\n        return this.editor.canRedo()\n      },\n      perform() {\n        return this.editor.redo()\n      },\n    },\n    link: {\n      test() {\n        return this.editor.canActivateAttribute(\"href\")\n      },\n    },\n    increaseNestingLevel: {\n      test() {\n        return this.editor.canIncreaseNestingLevel()\n      },\n      perform() {\n        return this.editor.increaseNestingLevel() && this.render()\n      },\n    },\n    decreaseNestingLevel: {\n      test() {\n        return this.editor.canDecreaseNestingLevel()\n      },\n      perform() {\n        return this.editor.decreaseNestingLevel() && this.render()\n      },\n    },\n    attachFiles: {\n      test() {\n        return true\n      },\n      perform() {\n        return config.input.pickFiles(this.editor.insertFiles)\n      },\n    },\n  }\n\n  constructor({ editorElement, document, html }) {\n    super(...arguments)\n    this.editorElement = editorElement\n    this.selectionManager = new SelectionManager(this.editorElement)\n    this.selectionManager.delegate = this\n\n    this.composition = new Composition()\n    this.composition.delegate = this\n\n    this.attachmentManager = new AttachmentManager(this.composition.getAttachments())\n    this.attachmentManager.delegate = this\n\n    this.inputController =\n      config.input.getLevel() === 2\n        ? new Level2InputController(this.editorElement)\n        : new Level0InputController(this.editorElement)\n\n    this.inputController.delegate = this\n    this.inputController.responder = this.composition\n\n    this.compositionController = new CompositionController(this.editorElement, this.composition)\n    this.compositionController.delegate = this\n\n    this.toolbarController = new ToolbarController(this.editorElement.toolbarElement)\n    this.toolbarController.delegate = this\n\n    this.editor = new Editor(this.composition, this.selectionManager, this.editorElement)\n    if (document) {\n      this.editor.loadDocument(document)\n    } else {\n      this.editor.loadHTML(html)\n    }\n  }\n\n  registerSelectionManager() {\n    return selectionChangeObserver.registerSelectionManager(this.selectionManager)\n  }\n\n  unregisterSelectionManager() {\n    return selectionChangeObserver.unregisterSelectionManager(this.selectionManager)\n  }\n\n  render() {\n    return this.compositionController.render()\n  }\n\n  reparse() {\n    return this.composition.replaceHTML(this.editorElement.innerHTML)\n  }\n\n  // Composition delegate\n\n  compositionDidChangeDocument(document) {\n    this.notifyEditorElement(\"document-change\")\n    if (!this.handlingInput) {\n      return this.render()\n    }\n  }\n\n  compositionDidChangeCurrentAttributes(currentAttributes) {\n    this.currentAttributes = currentAttributes\n    this.toolbarController.updateAttributes(this.currentAttributes)\n    this.updateCurrentActions()\n    return this.notifyEditorElement(\"attributes-change\", { attributes: this.currentAttributes })\n  }\n\n  compositionDidPerformInsertionAtRange(range) {\n    if (this.pasting) {\n      this.pastedRange = range\n    }\n  }\n\n  compositionShouldAcceptFile(file) {\n    return this.notifyEditorElement(\"file-accept\", { file })\n  }\n\n  compositionDidAddAttachment(attachment) {\n    const managedAttachment = this.attachmentManager.manageAttachment(attachment)\n    return this.notifyEditorElement(\"attachment-add\", { attachment: managedAttachment })\n  }\n\n  compositionDidEditAttachment(attachment) {\n    this.compositionController.rerenderViewForObject(attachment)\n    const managedAttachment = this.attachmentManager.manageAttachment(attachment)\n    this.notifyEditorElement(\"attachment-edit\", { attachment: managedAttachment })\n    return this.notifyEditorElement(\"change\")\n  }\n\n  compositionDidChangeAttachmentPreviewURL(attachment) {\n    this.compositionController.invalidateViewForObject(attachment)\n    return this.notifyEditorElement(\"change\")\n  }\n\n  compositionDidRemoveAttachment(attachment) {\n    const managedAttachment = this.attachmentManager.unmanageAttachment(attachment)\n    return this.notifyEditorElement(\"attachment-remove\", { attachment: managedAttachment })\n  }\n\n  compositionDidStartEditingAttachment(attachment, options) {\n    this.attachmentLocationRange = this.composition.document.getLocationRangeOfAttachment(attachment)\n    this.compositionController.installAttachmentEditorForAttachment(attachment, options)\n    return this.selectionManager.setLocationRange(this.attachmentLocationRange)\n  }\n\n  compositionDidStopEditingAttachment(attachment) {\n    this.compositionController.uninstallAttachmentEditor()\n    this.attachmentLocationRange = null\n  }\n\n  compositionDidRequestChangingSelectionToLocationRange(locationRange) {\n    if (this.loadingSnapshot && !this.isFocused()) return\n    this.requestedLocationRange = locationRange\n    this.compositionRevisionWhenLocationRangeRequested = this.composition.revision\n    if (!this.handlingInput) {\n      return this.render()\n    }\n  }\n\n  compositionWillLoadSnapshot() {\n    this.loadingSnapshot = true\n  }\n\n  compositionDidLoadSnapshot() {\n    this.compositionController.refreshViewCache()\n    this.render()\n    this.loadingSnapshot = false\n  }\n\n  getSelectionManager() {\n    return this.selectionManager\n  }\n\n  // Attachment manager delegate\n\n  attachmentManagerDidRequestRemovalOfAttachment(attachment) {\n    return this.removeAttachment(attachment)\n  }\n\n  // Document controller delegate\n\n  compositionControllerWillSyncDocumentView() {\n    this.inputController.editorWillSyncDocumentView()\n    this.selectionManager.lock()\n    return this.selectionManager.clearSelection()\n  }\n\n  compositionControllerDidSyncDocumentView() {\n    this.inputController.editorDidSyncDocumentView()\n    this.selectionManager.unlock()\n    this.updateCurrentActions()\n    return this.notifyEditorElement(\"sync\")\n  }\n\n  compositionControllerDidRender() {\n    if (this.requestedLocationRange) {\n      if (this.compositionRevisionWhenLocationRangeRequested === this.composition.revision) {\n        this.selectionManager.setLocationRange(this.requestedLocationRange)\n      }\n      this.requestedLocationRange = null\n      this.compositionRevisionWhenLocationRangeRequested = null\n    }\n\n    if (this.renderedCompositionRevision !== this.composition.revision) {\n      this.runEditorFilters()\n      this.composition.updateCurrentAttributes()\n      this.notifyEditorElement(\"render\")\n    }\n\n    this.renderedCompositionRevision = this.composition.revision\n  }\n\n  compositionControllerDidFocus() {\n    if (this.isFocusedInvisibly()) {\n      this.setLocationRange({ index: 0, offset: 0 })\n    }\n    this.toolbarController.hideDialog()\n    return this.notifyEditorElement(\"focus\")\n  }\n\n  compositionControllerDidBlur() {\n    return this.notifyEditorElement(\"blur\")\n  }\n\n  compositionControllerDidSelectAttachment(attachment, options) {\n    this.toolbarController.hideDialog()\n    return this.composition.editAttachment(attachment, options)\n  }\n\n  compositionControllerDidRequestDeselectingAttachment(attachment) {\n    const locationRange = this.attachmentLocationRange || this.composition.document.getLocationRangeOfAttachment(attachment)\n    return this.selectionManager.setLocationRange(locationRange[1])\n  }\n\n  compositionControllerWillUpdateAttachment(attachment) {\n    return this.editor.recordUndoEntry(\"Edit Attachment\", { context: attachment.id, consolidatable: true })\n  }\n\n  compositionControllerDidRequestRemovalOfAttachment(attachment) {\n    return this.removeAttachment(attachment)\n  }\n\n  // Input controller delegate\n\n  inputControllerWillHandleInput() {\n    this.handlingInput = true\n    this.requestedRender = false\n  }\n\n  inputControllerDidRequestRender() {\n    this.requestedRender = true\n  }\n\n  inputControllerDidHandleInput() {\n    this.handlingInput = false\n    if (this.requestedRender) {\n      this.requestedRender = false\n      return this.render()\n    }\n  }\n\n  inputControllerDidAllowUnhandledInput() {\n    return this.notifyEditorElement(\"change\")\n  }\n\n  inputControllerDidRequestReparse() {\n    return this.reparse()\n  }\n\n  inputControllerWillPerformTyping() {\n    return this.recordTypingUndoEntry()\n  }\n\n  inputControllerWillPerformFormatting(attributeName) {\n    return this.recordFormattingUndoEntry(attributeName)\n  }\n\n  inputControllerWillCutText() {\n    return this.editor.recordUndoEntry(\"Cut\")\n  }\n\n  inputControllerWillPaste(paste) {\n    this.editor.recordUndoEntry(\"Paste\")\n    this.pasting = true\n    return this.notifyEditorElement(\"before-paste\", { paste })\n  }\n\n  inputControllerDidPaste(paste) {\n    paste.range = this.pastedRange\n    this.pastedRange = null\n    this.pasting = null\n    return this.notifyEditorElement(\"paste\", { paste })\n  }\n\n  inputControllerWillMoveText() {\n    return this.editor.recordUndoEntry(\"Move\")\n  }\n\n  inputControllerWillAttachFiles() {\n    return this.editor.recordUndoEntry(\"Drop Files\")\n  }\n\n  inputControllerWillPerformUndo() {\n    return this.editor.undo()\n  }\n\n  inputControllerWillPerformRedo() {\n    return this.editor.redo()\n  }\n\n  inputControllerDidReceiveKeyboardCommand(keys) {\n    return this.toolbarController.applyKeyboardCommand(keys)\n  }\n\n  inputControllerDidStartDrag() {\n    this.locationRangeBeforeDrag = this.selectionManager.getLocationRange()\n  }\n\n  inputControllerDidReceiveDragOverPoint(point) {\n    return this.selectionManager.setLocationRangeFromPointRange(point)\n  }\n\n  inputControllerDidCancelDrag() {\n    this.selectionManager.setLocationRange(this.locationRangeBeforeDrag)\n    this.locationRangeBeforeDrag = null\n  }\n\n  // Selection manager delegate\n\n  locationRangeDidChange(locationRange) {\n    this.composition.updateCurrentAttributes()\n    this.updateCurrentActions()\n    if (this.attachmentLocationRange && !rangesAreEqual(this.attachmentLocationRange, locationRange)) {\n      this.composition.stopEditingAttachment()\n    }\n    return this.notifyEditorElement(\"selection-change\")\n  }\n\n  // Toolbar controller delegate\n\n  toolbarDidClickButton() {\n    if (!this.getLocationRange()) {\n      return this.setLocationRange({ index: 0, offset: 0 })\n    }\n  }\n\n  toolbarDidInvokeAction(actionName, invokingElement) {\n    return this.invokeAction(actionName, invokingElement)\n  }\n\n  toolbarDidToggleAttribute(attributeName) {\n    this.recordFormattingUndoEntry(attributeName)\n    this.composition.toggleCurrentAttribute(attributeName)\n    this.render()\n    if (!this.selectionFrozen) {\n      return this.editorElement.focus()\n    }\n  }\n\n  toolbarDidUpdateAttribute(attributeName, value) {\n    this.recordFormattingUndoEntry(attributeName)\n    this.composition.setCurrentAttribute(attributeName, value)\n    this.render()\n    if (!this.selectionFrozen) {\n      return this.editorElement.focus()\n    }\n  }\n\n  toolbarDidRemoveAttribute(attributeName) {\n    this.recordFormattingUndoEntry(attributeName)\n    this.composition.removeCurrentAttribute(attributeName)\n    this.render()\n    if (!this.selectionFrozen) {\n      return this.editorElement.focus()\n    }\n  }\n\n  toolbarWillShowDialog(dialogElement) {\n    this.composition.expandSelectionForEditing()\n    return this.freezeSelection()\n  }\n\n  toolbarDidShowDialog(dialogName) {\n    return this.notifyEditorElement(\"toolbar-dialog-show\", { dialogName })\n  }\n\n  toolbarDidHideDialog(dialogName) {\n    this.thawSelection()\n    this.editorElement.focus()\n    return this.notifyEditorElement(\"toolbar-dialog-hide\", { dialogName })\n  }\n\n  // Selection\n\n  freezeSelection() {\n    if (!this.selectionFrozen) {\n      this.selectionManager.lock()\n      this.composition.freezeSelection()\n      this.selectionFrozen = true\n      return this.render()\n    }\n  }\n\n  thawSelection() {\n    if (this.selectionFrozen) {\n      this.composition.thawSelection()\n      this.selectionManager.unlock()\n      this.selectionFrozen = false\n      return this.render()\n    }\n  }\n\n  canInvokeAction(actionName) {\n    if (this.actionIsExternal(actionName)) {\n      return true\n    } else {\n      return !!this.actions[actionName]?.test?.call(this)\n    }\n  }\n\n  invokeAction(actionName, invokingElement) {\n    if (this.actionIsExternal(actionName)) {\n      return this.notifyEditorElement(\"action-invoke\", { actionName, invokingElement })\n    } else {\n      return this.actions[actionName]?.perform?.call(this)\n    }\n  }\n\n  actionIsExternal(actionName) {\n    return /^x-./.test(actionName)\n  }\n\n  getCurrentActions() {\n    const result = {}\n    for (const actionName in this.actions) {\n      result[actionName] = this.canInvokeAction(actionName)\n    }\n    return result\n  }\n\n  updateCurrentActions() {\n    const currentActions = this.getCurrentActions()\n    if (!objectsAreEqual(currentActions, this.currentActions)) {\n      this.currentActions = currentActions\n      this.toolbarController.updateActions(this.currentActions)\n      return this.notifyEditorElement(\"actions-change\", { actions: this.currentActions })\n    }\n  }\n\n  // Editor filters\n\n  runEditorFilters() {\n    let snapshot = this.composition.getSnapshot()\n\n    Array.from(this.editor.filters).forEach((filter) => {\n      const { document, selectedRange } = snapshot\n      snapshot = filter.call(this.editor, snapshot) || {}\n      if (!snapshot.document) {\n        snapshot.document = document\n      }\n      if (!snapshot.selectedRange) {\n        snapshot.selectedRange = selectedRange\n      }\n    })\n\n    if (!snapshotsAreEqual(snapshot, this.composition.getSnapshot())) {\n      return this.composition.loadSnapshot(snapshot)\n    }\n  }\n\n  // Private\n\n  updateInputElement() {\n    const element = this.compositionController.getSerializableElement()\n    const value = serializeToContentType(element, \"text/html\")\n    return this.editorElement.setFormValue(value)\n  }\n\n  notifyEditorElement(message, data) {\n    switch (message) {\n      case \"document-change\":\n        this.documentChangedSinceLastRender = true\n        break\n      case \"render\":\n        if (this.documentChangedSinceLastRender) {\n          this.documentChangedSinceLastRender = false\n          this.notifyEditorElement(\"change\")\n        }\n        break\n      case \"change\":\n      case \"attachment-add\":\n      case \"attachment-edit\":\n      case \"attachment-remove\":\n        this.updateInputElement()\n        break\n    }\n\n    return this.editorElement.notify(message, data)\n  }\n\n  removeAttachment(attachment) {\n    this.editor.recordUndoEntry(\"Delete Attachment\")\n    this.composition.removeAttachment(attachment)\n    return this.render()\n  }\n\n  recordFormattingUndoEntry(attributeName) {\n    const blockConfig = getBlockConfig(attributeName)\n    const locationRange = this.selectionManager.getLocationRange()\n    if (blockConfig || !rangeIsCollapsed(locationRange)) {\n      return this.editor.recordUndoEntry(\"Formatting\", { context: this.getUndoContext(), consolidatable: true })\n    }\n  }\n\n  recordTypingUndoEntry() {\n    return this.editor.recordUndoEntry(\"Typing\", {\n      context: this.getUndoContext(this.currentAttributes),\n      consolidatable: true,\n    })\n  }\n\n  getUndoContext(...context) {\n    return [ this.getLocationContext(), this.getTimeContext(), ...Array.from(context) ]\n  }\n\n  getLocationContext() {\n    const locationRange = this.selectionManager.getLocationRange()\n    if (rangeIsCollapsed(locationRange)) {\n      return locationRange[0].index\n    } else {\n      return locationRange\n    }\n  }\n\n  getTimeContext() {\n    if (config.undo.interval > 0) {\n      return Math.floor(new Date().getTime() / config.undo.interval)\n    } else {\n      return 0\n    }\n  }\n\n  isFocused() {\n    return this.editorElement === this.editorElement.ownerDocument?.activeElement\n  }\n\n  // Detect \"Cursor disappears sporadically\" Firefox bug.\n  // - https://bugzilla.mozilla.org/show_bug.cgi?id=226301\n  isFocusedInvisibly() {\n    return this.isFocused() && !this.getLocationRange()\n  }\n\n  get actions() {\n    return this.constructor.actions\n  }\n}\n\nEditorController.proxyMethod(\"getSelectionManager().setLocationRange\")\nEditorController.proxyMethod(\"getSelectionManager().getLocationRange\")\n", "import * as config from \"trix/config\"\n\nimport { installDefaultCSSForTagName } from \"trix/core/helpers\"\n\ninstallDefaultCSSForTagName(\"trix-toolbar\", `\\\n%t {\n  display: block;\n}\n\n%t {\n  white-space: nowrap;\n}\n\n%t [data-trix-dialog] {\n  display: none;\n}\n\n%t [data-trix-dialog][data-trix-active] {\n  display: block;\n}\n\n%t [data-trix-dialog] [data-trix-validate]:invalid {\n  background-color: #ffdddd;\n}`)\n\nexport default class TrixToolbarElement extends HTMLElement {\n\n  // Element lifecycle\n\n  connectedCallback() {\n    if (this.innerHTML === \"\") {\n      this.innerHTML = config.toolbar.getDefaultHTML()\n    }\n  }\n\n  // Properties\n\n  get editorElements() {\n    if (this.id) {\n      const nodeList = this.ownerDocument?.querySelectorAll(`trix-editor[toolbar=\"${this.id}\"]`)\n\n      return Array.from(nodeList)\n    } else {\n      return []\n    }\n  }\n\n  get editorElement() {\n    const [ editorElement ] = this.editorElements\n\n    return editorElement\n  }\n}\n", "import * as config from \"trix/config\"\n\nimport {\n  findClosestElementFromNode,\n  handleEvent,\n  handleEventOnce,\n  installDefaultCSSForTagName,\n  makeElement,\n  triggerEvent,\n} from \"trix/core/helpers\"\n\nimport { attachmentSelector } from \"trix/config/attachments\"\nimport EditorController from \"trix/controllers/editor_controller\"\nimport \"trix/elements/trix_toolbar_element\"\n\nlet id = 0\n\n// Contenteditable support helpers\n\nconst autofocus = function(element) {\n  if (!document.querySelector(\":focus\")) {\n    if (element.hasAttribute(\"autofocus\") && document.querySelector(\"[autofocus]\") === element) {\n      return element.focus()\n    }\n  }\n}\n\nconst makeEditable = function(element) {\n  if (element.hasAttribute(\"contenteditable\")) {\n    return\n  }\n  element.toggleAttribute(\"contenteditable\", !element.disabled)\n  return handleEventOnce(\"focus\", {\n    onElement: element,\n    withCallback() {\n      return configureContentEditable(element)\n    },\n  })\n}\n\nconst configureContentEditable = function(element) {\n  disableObjectResizing(element)\n  return setDefaultParagraphSeparator(element)\n}\n\nconst disableObjectResizing = function(element) {\n  if (document.queryCommandSupported?.(\"enableObjectResizing\")) {\n    document.execCommand(\"enableObjectResizing\", false, false)\n    return handleEvent(\"mscontrolselect\", { onElement: element, preventDefault: true })\n  }\n}\n\nconst setDefaultParagraphSeparator = function(element) {\n  if (document.queryCommandSupported?.(\"DefaultParagraphSeparator\")) {\n    const { tagName } = config.blockAttributes.default\n    if ([ \"div\", \"p\" ].includes(tagName)) {\n      return document.execCommand(\"DefaultParagraphSeparator\", false, tagName)\n    }\n  }\n}\n\n// Accessibility helpers\n\nconst addAccessibilityRole = function(element) {\n  if (element.hasAttribute(\"role\")) {\n    return\n  }\n  return element.setAttribute(\"role\", \"textbox\")\n}\n\nconst ensureAriaLabel = function(element) {\n  if (element.hasAttribute(\"aria-label\") || element.hasAttribute(\"aria-labelledby\")) {\n    return\n  }\n\n  const update = function() {\n    const texts = Array.from(element.labels).map((label) => {\n      if (!label.contains(element)) return label.textContent\n    }).filter(text => text)\n\n    const text = texts.join(\" \")\n    if (text) {\n      return element.setAttribute(\"aria-label\", text)\n    } else {\n      return element.removeAttribute(\"aria-label\")\n    }\n  }\n  update()\n  return handleEvent(\"focus\", { onElement: element, withCallback: update })\n}\n\n// Style\n\nconst cursorTargetStyles = (function() {\n  if (config.browser.forcesObjectResizing) {\n    return {\n      display: \"inline\",\n      width: \"auto\",\n    }\n  } else {\n    return {\n      display: \"inline-block\",\n      width: \"1px\",\n    }\n  }\n})()\n\ninstallDefaultCSSForTagName(\"trix-editor\", `\\\n%t {\n    display: block;\n}\n\n%t:empty::before {\n    content: attr(placeholder);\n    color: graytext;\n    cursor: text;\n    pointer-events: none;\n    white-space: pre-line;\n}\n\n%t a[contenteditable=false] {\n    cursor: text;\n}\n\n%t img {\n    max-width: 100%;\n    height: auto;\n}\n\n%t ${attachmentSelector} figcaption textarea {\n    resize: none;\n}\n\n%t ${attachmentSelector} figcaption textarea.trix-autoresize-clone {\n    position: absolute;\n    left: -9999px;\n    max-height: 0px;\n}\n\n%t ${attachmentSelector} figcaption[data-trix-placeholder]:empty::before {\n    content: attr(data-trix-placeholder);\n    color: graytext;\n}\n\n%t [data-trix-cursor-target] {\n    display: ${cursorTargetStyles.display} !important;\n    width: ${cursorTargetStyles.width} !important;\n    padding: 0 !important;\n    margin: 0 !important;\n    border: none !important;\n}\n\n%t [data-trix-cursor-target=left] {\n    vertical-align: top !important;\n    margin-left: -1px !important;\n}\n\n%t [data-trix-cursor-target=right] {\n    vertical-align: bottom !important;\n    margin-right: -1px !important;\n}`)\n\nclass ElementInternalsDelegate {\n  value = \"\"\n  #internals\n  #formDisabled\n\n  constructor(element) {\n    this.element = element\n    this.#internals = element.attachInternals()\n    this.#formDisabled = false\n  }\n\n  connectedCallback() {\n    this.#validate()\n  }\n\n  disconnectedCallback() {\n  }\n\n  get form() {\n    return this.#internals.form\n  }\n\n  get name() {\n    return this.element.getAttribute(\"name\")\n  }\n\n  set name(value) {\n    this.element.setAttribute(\"name\", value)\n  }\n\n  get labels() {\n    return this.#internals.labels\n  }\n\n  get disabled() {\n    return this.#formDisabled || this.element.hasAttribute(\"disabled\")\n  }\n\n  set disabled(value) {\n    this.element.toggleAttribute(\"disabled\", value)\n  }\n\n  get required() {\n    return this.element.hasAttribute(\"required\")\n  }\n\n  set required(value) {\n    this.element.toggleAttribute(\"required\", value)\n    this.#validate()\n  }\n\n  get validity() {\n    return this.#internals.validity\n  }\n\n  get validationMessage() {\n    return this.#internals.validationMessage\n  }\n\n  get willValidate() {\n    return this.#internals.willValidate\n  }\n\n  formDisabledCallback(disabled) {\n    this.#formDisabled = disabled\n  }\n\n  setFormValue(value) {\n    this.value = value\n    this.#validate()\n    this.#internals.setFormValue(this.element.disabled ? undefined : this.value)\n  }\n\n  checkValidity() {\n    return this.#internals.checkValidity()\n  }\n\n  reportValidity() {\n    return this.#internals.reportValidity()\n  }\n\n  setCustomValidity(validationMessage) {\n    this.#validate(validationMessage)\n  }\n\n  #validate(customValidationMessage = \"\") {\n    const { required, value } = this.element\n    const valueMissing = required && !value\n    const customError = !!customValidationMessage\n    const input = makeElement(\"input\", { required })\n    const validationMessage = customValidationMessage || input.validationMessage\n\n    this.#internals.setValidity({ valueMissing, customError }, validationMessage)\n  }\n}\n\nclass LegacyDelegate {\n  #focusHandler\n\n  constructor(element) {\n    this.element = element\n  }\n\n  connectedCallback() {\n    this.#focusHandler = ensureAriaLabel(this.element)\n    window.addEventListener(\"reset\", this.#resetBubbled, false)\n    window.addEventListener(\"click\", this.#clickBubbled, false)\n  }\n\n  disconnectedCallback() {\n    this.#focusHandler?.destroy()\n    window.removeEventListener(\"reset\", this.#resetBubbled, false)\n    window.removeEventListener(\"click\", this.#clickBubbled, false)\n  }\n\n  get labels() {\n    const labels = []\n    if (this.element.id && this.element.ownerDocument) {\n      labels.push(...Array.from(this.element.ownerDocument.querySelectorAll(`label[for='${this.element.id}']`) || []))\n    }\n\n    const label = findClosestElementFromNode(this.element, { matchingSelector: \"label\" })\n    if (label) {\n      if ([ this.element, null ].includes(label.control)) {\n        labels.push(label)\n      }\n    }\n\n    return labels\n  }\n\n  get form() {\n    console.warn(\"This browser does not support the .form property for trix-editor elements.\")\n\n    return null\n  }\n\n  get name() {\n    console.warn(\"This browser does not support the .name property for trix-editor elements.\")\n\n    return null\n  }\n\n  set name(value) {\n    console.warn(\"This browser does not support the .name property for trix-editor elements.\")\n  }\n\n  get disabled() {\n    console.warn(\"This browser does not support the [disabled] attribute for trix-editor elements.\")\n\n    return false\n  }\n\n  set disabled(value) {\n    console.warn(\"This browser does not support the [disabled] attribute for trix-editor elements.\")\n  }\n\n  get required() {\n    console.warn(\"This browser does not support the [required] attribute for trix-editor elements.\")\n\n    return false\n  }\n\n  set required(value) {\n    console.warn(\"This browser does not support the [required] attribute for trix-editor elements.\")\n  }\n\n  get validity() {\n    console.warn(\"This browser does not support the validity property for trix-editor elements.\")\n    return null\n  }\n\n  get validationMessage() {\n    console.warn(\"This browser does not support the validationMessage property for trix-editor elements.\")\n\n    return \"\"\n  }\n\n  get willValidate() {\n    console.warn(\"This browser does not support the willValidate property for trix-editor elements.\")\n\n    return false\n  }\n\n  formDisabledCallback(value) {\n  }\n\n  setFormValue(value) {\n  }\n\n  checkValidity() {\n    console.warn(\"This browser does not support checkValidity() for trix-editor elements.\")\n\n    return true\n  }\n\n  reportValidity() {\n    console.warn(\"This browser does not support reportValidity() for trix-editor elements.\")\n\n    return true\n  }\n\n  setCustomValidity(validationMessage) {\n    console.warn(\"This browser does not support setCustomValidity(validationMessage) for trix-editor elements.\")\n  }\n\n  #resetBubbled = (event) => {\n    if (event.defaultPrevented) return\n    if (event.target !== this.element.form) return\n    this.element.reset()\n  }\n\n  #clickBubbled = (event) => {\n    if (event.defaultPrevented) return\n    if (this.element.contains(event.target)) return\n\n    const label = findClosestElementFromNode(event.target, { matchingSelector: \"label\" })\n    if (!label) return\n\n    if (!Array.from(this.labels).includes(label)) return\n\n    this.element.focus()\n  }\n}\n\nexport default class TrixEditorElement extends HTMLElement {\n  static formAssociated = \"ElementInternals\" in window\n\n  static observedAttributes = [ \"connected\" ]\n\n  #delegate\n\n  constructor() {\n    super()\n    this.willCreateInput = true\n    this.#delegate = this.constructor.formAssociated ?\n      new ElementInternalsDelegate(this) :\n      new LegacyDelegate(this)\n  }\n\n  // Properties\n\n  get trixId() {\n    if (this.hasAttribute(\"trix-id\")) {\n      return this.getAttribute(\"trix-id\")\n    } else {\n      this.setAttribute(\"trix-id\", ++id)\n      return this.trixId\n    }\n  }\n\n  get labels() {\n    return this.#delegate.labels\n  }\n\n  get disabled() {\n    const { inputElement } = this\n\n    if (inputElement) {\n      return inputElement.disabled\n    } else {\n      return this.#delegate.disabled\n    }\n  }\n\n  set disabled(value) {\n    const { inputElement } = this\n\n    if (inputElement) {\n      inputElement.disabled = value\n    }\n    this.#delegate.disabled = value\n  }\n\n  get required() {\n    return this.#delegate.required\n  }\n\n  set required(value) {\n    this.#delegate.required = value\n  }\n\n  get validity() {\n    return this.#delegate.validity\n  }\n\n  get validationMessage() {\n    return this.#delegate.validationMessage\n  }\n\n  get willValidate() {\n    return this.#delegate.willValidate\n  }\n\n  get type() {\n    return this.localName\n  }\n\n  get toolbarElement() {\n    if (this.hasAttribute(\"toolbar\")) {\n      return this.ownerDocument?.getElementById(this.getAttribute(\"toolbar\"))\n    } else if (this.parentNode) {\n      const toolbarId = `trix-toolbar-${this.trixId}`\n      this.setAttribute(\"toolbar\", toolbarId)\n      this.internalToolbar = makeElement(\"trix-toolbar\", { id: toolbarId })\n      this.parentNode.insertBefore(this.internalToolbar, this)\n      return this.internalToolbar\n    } else {\n      return undefined\n    }\n  }\n\n  get form() {\n    const { inputElement } = this\n\n    if (inputElement) {\n      return inputElement.form\n    } else {\n      return this.#delegate.form\n    }\n  }\n\n  get inputElement() {\n    if (this.hasAttribute(\"input\")) {\n      return this.ownerDocument?.getElementById(this.getAttribute(\"input\"))\n    } else {\n      return undefined\n    }\n  }\n\n  get editor() {\n    return this.editorController?.editor\n  }\n\n  get name() {\n    const { inputElement } = this\n\n    if (inputElement) {\n      return inputElement.name\n    } else {\n      return this.#delegate.name\n    }\n  }\n\n  set name(value) {\n    const { inputElement } = this\n\n    if (inputElement) {\n      inputElement.name = value\n    } else {\n      this.#delegate.name = value\n    }\n  }\n\n  get value() {\n    const { inputElement } = this\n\n    if (inputElement) {\n      return inputElement.value\n    } else {\n      return this.#delegate.value\n    }\n  }\n\n  set value(defaultValue) {\n    this.defaultValue = defaultValue\n    this.editor?.loadHTML(this.defaultValue)\n  }\n\n  // Element callbacks\n\n  attributeChangedCallback(name, oldValue, newValue) {\n    if (name === \"connected\" && this.isConnected && oldValue != null && oldValue !== newValue) {\n      requestAnimationFrame(() => this.reconnect())\n    }\n  }\n\n  // Controller delegate methods\n\n  notify(message, data) {\n    if (this.editorController) {\n      return triggerEvent(`trix-${message}`, { onElement: this, attributes: data })\n    }\n  }\n\n  setFormValue(value) {\n    const { inputElement } = this\n\n    if (inputElement) {\n      inputElement.value = value\n    }\n    this.#delegate.setFormValue(value)\n  }\n\n  // Element lifecycle\n\n  connectedCallback() {\n    if (!this.hasAttribute(\"data-trix-internal\")) {\n      makeEditable(this)\n      addAccessibilityRole(this)\n\n      if (!this.editorController) {\n        triggerEvent(\"trix-before-initialize\", { onElement: this })\n        this.defaultValue = this.inputElement ? this.inputElement.value : this.innerHTML\n        if (!this.hasAttribute(\"input\") && this.parentNode && this.willCreateInput) {\n          const inputId = `trix-input-${this.trixId}`\n          this.setAttribute(\"input\", inputId)\n          const element = makeElement(\"input\", { type: \"hidden\", id: inputId })\n          this.parentNode.insertBefore(element, this.nextElementSibling)\n        }\n        this.editorController = new EditorController({\n          editorElement: this,\n          html: this.defaultValue\n        })\n        requestAnimationFrame(() => triggerEvent(\"trix-initialize\", { onElement: this }))\n      }\n      this.editorController.registerSelectionManager()\n      this.#delegate.connectedCallback()\n\n      this.toggleAttribute(\"connected\", true)\n      autofocus(this)\n    }\n  }\n\n  disconnectedCallback() {\n    this.editorController?.unregisterSelectionManager()\n    this.#delegate.disconnectedCallback()\n    this.toggleAttribute(\"connected\", false)\n  }\n\n  reconnect() {\n    this.removeInternalToolbar()\n    this.disconnectedCallback()\n    this.connectedCallback()\n  }\n\n  removeInternalToolbar() {\n    this.internalToolbar?.remove()\n    this.internalToolbar = null\n  }\n\n  // Form support\n\n  checkValidity() {\n    return this.#delegate.checkValidity()\n  }\n\n  reportValidity() {\n    return this.#delegate.reportValidity()\n  }\n\n  setCustomValidity(validationMessage) {\n    this.#delegate.setCustomValidity(validationMessage)\n  }\n\n  formDisabledCallback(disabled) {\n    const { inputElement } = this\n\n    if (inputElement) {\n      inputElement.disabled = disabled\n    }\n    this.toggleAttribute(\"contenteditable\", !disabled)\n    this.#delegate.formDisabledCallback(disabled)\n  }\n\n  formResetCallback() {\n    this.reset()\n  }\n\n  reset() {\n    this.value = this.defaultValue\n  }\n}\n", "import { version } from \"../../package.json\"\n\nimport * as config from \"trix/config\"\nimport * as core from \"trix/core\"\nimport * as models from \"trix/models\"\nimport * as views from \"trix/views\"\nimport * as controllers from \"trix/controllers\"\nimport * as observers from \"trix/observers\"\nimport * as operations from \"trix/operations\"\nimport * as elements from \"trix/elements\"\nimport * as filters from \"trix/filters\"\n\nconst Trix = {\n  VERSION: version,\n  config,\n  core,\n  models,\n  views,\n  controllers,\n  observers,\n  operations,\n  elements,\n  filters\n}\n\n// Expose models under the Trix constant for compatibility with v1\nObject.assign(Trix, models)\n\nfunction start() {\n  if (!customElements.get(\"trix-toolbar\")) {\n    customElements.define(\"trix-toolbar\", elements.TrixToolbarElement)\n  }\n\n  if (!customElements.get(\"trix-editor\")) {\n    customElements.define(\"trix-editor\", elements.TrixEditorElement)\n  }\n}\n\nwindow.Trix = Trix\nsetTimeout(start, 0)\n\nexport default Trix\n", "// Suppress React DevTools message - implemented in polyfills for earliest possible execution\nif (typeof window !== \"undefined\") {\n  // Create a completely mocked DevTools hook that does nothing\n  window.__REACT_DEVTOOLS_GLOBAL_HOOK__ = {\n    isDisabled: true,\n    supportsFiber: true,\n    inject: function () {},\n    onCommitFiberRoot: function () {\n      return true;\n    },\n    onCommitFiberUnmount: function () {},\n  };\n}\n", "import \"./config/suppress-react-devtools-message\";\nimport \"core-js/stable\";\nimport \"regenerator-runtime/runtime\";\n\nimport \"./polyfills\";\nimport \"./config/sentry\";\nimport \"./helpers/da-globals\";\nimport { onDevelopment } from \"./helpers/app\";\n\ntry {\n  // try/catch is meant to deal with a recurring error: https://github.com/basecamp/trix/issues/247\n  require(\"trix\");\n} catch (e) {}\n\nimport \"@rails/actiontext\";\n\n// Rails UJS\nimport RailsUjs from \"@rails/ujs\";\nif (!window._rails_loaded) RailsUjs.start();\n\n// Turbo\nimport { Turbo } from \"@hotwired/turbo-rails\";\nTurbo.start();\nwindow.Turbo = Turbo;\nimport \"./support/turbo-stream-actions\";\n\n// Stimulus\nimport \"./controllers\";\nimport { flashlight } from \"./helpers/animate\";\n\n// Delayed scroll\ndocument.addEventListener(\"turbo:load\", () => {\n  if (!window.location.hash.startsWith(\"#ds--\")) return;\n\n  const anchorName = window.location.hash.replace(\"#ds--\", \"\");\n  const anchor = document.querySelector(`a#${anchorName}`);\n  setTimeout(() => anchor.scrollIntoView({ block: \"center\" }), 250);\n});\n\n// Page load flashlight\ndocument.addEventListener(\"turbo:load\", () => {\n  const params = new URL(window.location).searchParams;\n\n  const flashlightElemId = params.get(\"flashlight\");\n  if (flashlightElemId) pageLoadFlashlight(flashlightElemId, \"flashlight\");\n\n  const flashlightContentBoxElemId = params.get(\"flashlight_ir_content_box\");\n  if (flashlightContentBoxElemId) flashlight(`#${flashlightContentBoxElemId}`, \"flashlight-ir-content-box\");\n});\n\nfunction pageLoadFlashlight(flashlightElemId, flashlightClass) {\n  const flashlightElem = document.querySelector(`#${flashlightElemId}`);\n\n  if (!flashlightElem && onDevelopment()) throw `Flashlight element not found: ${flashlight}`;\n  if (!flashlightElem) return;\n\n  flashlightElem.classList.add(flashlightClass);\n}\n", "import \"core-js/stable\";\nimport \"regenerator-runtime/runtime\";\n\nimport \"./childnode-after\";\nimport \"./childnode-append\";\nimport \"./childnode-before\";\nimport \"./childnode-remove\";\nimport \"./childnode-replace-with\";\nimport \"./custom-event\";\nimport \"./element-class-list\";\nimport \"./element-closest\";\nimport \"./element-matches\";\nimport \"./element-toggle-attribute\";\nimport \"./nodelist-for-each\";\nimport \"./parent-node-prepend\";\n\nimport smoothscroll from \"smoothscroll-polyfill\";\n\nsmoothscroll.polyfill();\n", "// https://developer.mozilla.org/en-US/docs/Web/API/ChildNode/after\n// from: https://github.com/jserz/js_piece/blob/master/DOM/ChildNode/after()/after().md\n(function (arr) {\n  arr.forEach(function (item) {\n    if (item.hasOwnProperty(\"after\")) {\n      return;\n    }\n    Object.defineProperty(item, \"after\", {\n      configurable: true,\n      enumerable: true,\n      writable: true,\n      value: function after() {\n        var argArr = Array.prototype.slice.call(arguments),\n          docFrag = document.createDocumentFragment();\n\n        argArr.forEach(function (argItem) {\n          var isNode = argItem instanceof Node;\n          docFrag.appendChild(isNode ? argItem : document.createTextNode(String(argItem)));\n        });\n\n        this.parentNode.insertBefore(docFrag, this.nextSibling);\n      },\n    });\n  });\n})([Element.prototype, CharacterData.prototype, DocumentType.prototype]);\n", "// https://developer.mozilla.org/en-US/docs/Web/API/ParentNode/append\n// from: https://github.com/jserz/js_piece/blob/master/DOM/ParentNode/append()/append().md\n(function (arr) {\n  arr.forEach(function (item) {\n    if (item.hasOwnProperty(\"append\")) {\n      return;\n    }\n    Object.defineProperty(item, \"append\", {\n      configurable: true,\n      enumerable: true,\n      writable: true,\n      value: function append() {\n        var argArr = Array.prototype.slice.call(arguments),\n          docFrag = document.createDocumentFragment();\n\n        argArr.forEach(function (argItem) {\n          var isNode = argItem instanceof Node;\n          docFrag.appendChild(isNode ? argItem : document.createTextNode(String(argItem)));\n        });\n\n        this.appendChild(docFrag);\n      },\n    });\n  });\n})([Element.prototype, Document.prototype, DocumentFragment.prototype]);\n", "// https://developer.mozilla.org/en-US/docs/Web/API/ChildNode/before\n// from: https://github.com/jserz/js_piece/blob/master/DOM/ChildNode/before()/before().md\n(function (arr) {\n  arr.forEach(function (item) {\n    if (item.hasOwnProperty(\"before\")) {\n      return;\n    }\n    Object.defineProperty(item, \"before\", {\n      configurable: true,\n      enumerable: true,\n      writable: true,\n      value: function before() {\n        var argArr = Array.prototype.slice.call(arguments),\n          docFrag = document.createDocumentFragment();\n\n        argArr.forEach(function (argItem) {\n          var isNode = argItem instanceof Node;\n          docFrag.appendChild(isNode ? argItem : document.createTextNode(String(argItem)));\n        });\n\n        this.parentNode.insertBefore(docFrag, this);\n      },\n    });\n  });\n})([Element.prototype, CharacterData.prototype, DocumentType.prototype]);\n", "// https://developer.mozilla.org/en-US/docs/Web/API/ChildNode/remove\n// from: https://github.com/jserz/js_piece/blob/master/DOM/ChildNode/remove()/remove().md\n(function (arr) {\n  arr.forEach(function (item) {\n    if (item.hasOwnProperty(\"remove\")) {\n      return;\n    }\n    Object.defineProperty(item, \"remove\", {\n      configurable: true,\n      enumerable: true,\n      writable: true,\n      value: function remove() {\n        if (this.parentNode === null) {\n          return;\n        }\n        this.parentNode.removeChild(this);\n      },\n    });\n  });\n})([Element.prototype, CharacterData.prototype, DocumentType.prototype]);\n", "// https://developer.mozilla.org/en-US/docs/Web/API/ChildNode/replaceWith\nfunction ReplaceWithPolyfill() {\n  \"use-strict\"; // For safari, and IE > 10\n  var parent = this.parentNode,\n    i = arguments.length,\n    currentNode;\n  if (!parent) return;\n  if (!i)\n    // if there are no arguments\n    parent.removeChild(this);\n  while (i--) {\n    // i-- decrements i and returns the value of i before the decrement\n    currentNode = arguments[i];\n    if (typeof currentNode !== \"object\") {\n      currentNode = this.ownerDocument.createTextNode(currentNode);\n    } else if (currentNode.parentNode) {\n      currentNode.parentNode.removeChild(currentNode);\n    }\n    // the value of \"i\" below is after the decrement\n    if (!i)\n      // if currentNode is the first argument (currentNode === arguments[0])\n      parent.replaceChild(currentNode, this);\n    // if currentNode isn't the first\n    else parent.insertBefore(currentNode, this.previousSibling);\n  }\n}\nif (!Element.prototype.replaceWith) Element.prototype.replaceWith = ReplaceWithPolyfill;\nif (!CharacterData.prototype.replaceWith) CharacterData.prototype.replaceWith = ReplaceWithPolyfill;\nif (!DocumentType.prototype.replaceWith) DocumentType.prototype.replaceWith = ReplaceWithPolyfill;\n", "(function () {\n  if (typeof window.CustomEvent === \"function\") return false;\n\n  function CustomEvent(event, params) {\n    params = params || { bubbles: false, cancelable: false, detail: null };\n    var evt = document.createEvent(\"CustomEvent\");\n    evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);\n    return evt;\n  }\n\n  CustomEvent.prototype = window.Event.prototype;\n\n  window.CustomEvent = CustomEvent;\n})();\n", "// https://developer.mozilla.org/en-US/docs/Web/API/Element/classList\n// 1. String.prototype.trim polyfill\nif (!\"\".trim)\n  String.prototype.trim = function () {\n    return this.replace(/^[\\s\uFEFF]+|[\\s\uFEFF]+$/g, \"\");\n  };\n(function (window) {\n  \"use strict\"; // prevent global namespace pollution\n  if (!window.DOMException)\n    (DOMException = function (reason) {\n      this.message = reason;\n    }).prototype = new Error();\n  var wsRE = /[\\11\\12\\14\\15\\40]/,\n    wsIndex = 0,\n    checkIfValidClassListEntry = function (O, V) {\n      if (V === \"\")\n        throw new DOMException(\n          \"Failed to execute '\" + O + \"' on 'DOMTokenList': The token provided must not be empty.\",\n        );\n      if ((wsIndex = V.search(wsRE)) !== -1)\n        throw new DOMException(\n          \"Failed to execute '\" +\n            O +\n            \"' on 'DOMTokenList': \" +\n            \"The token provided ('\" +\n            V[wsIndex] +\n            \"') contains HTML space characters, which are not valid in tokens.\",\n        );\n    };\n  // 2. Implement the barebones DOMTokenList livelyness polyfill\n  if (typeof DOMTokenList !== \"function\")\n    (function (window) {\n      var document = window.document,\n        Object = window.Object,\n        hasOwnProp = Object.prototype.hasOwnProperty;\n      var defineProperty = Object.defineProperty,\n        allowTokenListConstruction = 0,\n        skipPropChange = 0;\n      function DOMTokenList() {\n        if (!allowTokenListConstruction) throw TypeError(\"Illegal constructor\"); // internally let it through\n      }\n      DOMTokenList.prototype.toString = DOMTokenList.prototype.toLocaleString = function () {\n        return this.value;\n      };\n      DOMTokenList.prototype.add = function () {\n        a: for (\n          var v = 0, argLen = arguments.length, val = \"\", ele = this[\" uCL\"], proto = ele[\" uCLp\"];\n          v !== argLen;\n          ++v\n        ) {\n          ((val = arguments[v] + \"\"), checkIfValidClassListEntry(\"add\", val));\n          for (var i = 0, Len = proto.length, resStr = val; i !== Len; ++i)\n            if (this[i] === val) continue a;\n            else resStr += \" \" + this[i];\n          ((this[Len] = val), (proto.length += 1), (proto.value = resStr));\n        }\n        ((skipPropChange = 1), (ele.className = proto.value), (skipPropChange = 0));\n      };\n      DOMTokenList.prototype.remove = function () {\n        for (\n          var v = 0, argLen = arguments.length, val = \"\", ele = this[\" uCL\"], proto = ele[\" uCLp\"];\n          v !== argLen;\n          ++v\n        ) {\n          ((val = arguments[v] + \"\"), checkIfValidClassListEntry(\"remove\", val));\n          for (var i = 0, Len = proto.length, resStr = \"\", is = 0; i !== Len; ++i)\n            if (is) {\n              this[i - 1] = this[i];\n            } else {\n              if (this[i] !== val) {\n                resStr += this[i] + \" \";\n              } else {\n                is = 1;\n              }\n            }\n          if (!is) continue;\n          (delete this[Len], (proto.length -= 1), (proto.value = resStr));\n        }\n        ((skipPropChange = 1), (ele.className = proto.value), (skipPropChange = 0));\n      };\n      window.DOMTokenList = DOMTokenList;\n      function whenPropChanges() {\n        var evt = window.event,\n          prop = evt.propertyName;\n        if (!skipPropChange && (prop === \"className\" || (prop === \"classList\" && !defineProperty))) {\n          var target = evt.srcElement,\n            protoObjProto = target[\" uCLp\"],\n            strval = \"\" + target[prop];\n          var tokens = strval.trim().split(wsRE),\n            resTokenList = target[prop === \"classList\" ? \" uCL\" : \"classList\"];\n          var oldLen = protoObjProto.length;\n          a: for (var cI = 0, cLen = (protoObjProto.length = tokens.length), sub = 0; cI !== cLen; ++cI) {\n            for (var innerI = 0; innerI !== cI; ++innerI)\n              if (tokens[innerI] === tokens[cI]) {\n                sub++;\n                continue a;\n              }\n            resTokenList[cI - sub] = tokens[cI];\n          }\n          for (var i = cLen - sub; i < oldLen; ++i) delete resTokenList[i]; //remove trailing indexs\n          if (prop !== \"classList\") return;\n          ((skipPropChange = 1), (target.classList = resTokenList), (target.className = strval));\n          ((skipPropChange = 0), (resTokenList.length = tokens.length - sub));\n        }\n      }\n      function polyfillClassList(ele) {\n        if (!ele || !(\"innerHTML\" in ele)) throw TypeError(\"Illegal invocation\");\n        ele.detachEvent(\"onpropertychange\", whenPropChanges); // prevent duplicate handler infinite loop\n        allowTokenListConstruction = 1;\n        try {\n          function protoObj() {}\n          protoObj.prototype = new DOMTokenList();\n        } finally {\n          allowTokenListConstruction = 0;\n        }\n        var protoObjProto = protoObj.prototype,\n          resTokenList = new protoObj();\n        a: for (var toks = ele.className.trim().split(wsRE), cI = 0, cLen = toks.length, sub = 0; cI !== cLen; ++cI) {\n          for (var innerI = 0; innerI !== cI; ++innerI)\n            if (toks[innerI] === toks[cI]) {\n              sub++;\n              continue a;\n            }\n          this[cI - sub] = toks[cI];\n        }\n        ((protoObjProto.length = cLen - sub), (protoObjProto.value = ele.className), (protoObjProto[\" uCL\"] = ele));\n        if (defineProperty) {\n          defineProperty(ele, \"classList\", {\n            // IE8 & IE9 allow defineProperty on the DOM\n            enumerable: 1,\n            get: function () {\n              return resTokenList;\n            },\n            configurable: 0,\n            set: function (newVal) {\n              ((skipPropChange = 1), (ele.className = protoObjProto.value = newVal += \"\"), (skipPropChange = 0));\n              var toks = newVal.trim().split(wsRE),\n                oldLen = protoObjProto.length;\n              a: for (var cI = 0, cLen = (protoObjProto.length = toks.length), sub = 0; cI !== cLen; ++cI) {\n                for (var innerI = 0; innerI !== cI; ++innerI)\n                  if (toks[innerI] === toks[cI]) {\n                    sub++;\n                    continue a;\n                  }\n                resTokenList[cI - sub] = toks[cI];\n              }\n              for (var i = cLen - sub; i < oldLen; ++i) delete resTokenList[i]; //remove trailing indexs\n            },\n          });\n          defineProperty(ele, \" uCLp\", {\n            // for accessing the hidden prototype\n            enumerable: 0,\n            configurable: 0,\n            writeable: 0,\n            value: protoObj.prototype,\n          });\n          defineProperty(protoObjProto, \" uCL\", {\n            enumerable: 0,\n            configurable: 0,\n            writeable: 0,\n            value: ele,\n          });\n        } else {\n          ((ele.classList = resTokenList), (ele[\" uCL\"] = resTokenList), (ele[\" uCLp\"] = protoObj.prototype));\n        }\n        ele.attachEvent(\"onpropertychange\", whenPropChanges);\n      }\n      try {\n        // Much faster & cleaner version for IE8 & IE9:\n        // Should work in IE8 because Element.prototype instanceof Node is true according to the specs\n        window.Object.defineProperty(window.Element.prototype, \"classList\", {\n          enumerable: 1,\n          get: function (val) {\n            if (!hasOwnProp.call(this, \"classList\")) polyfillClassList(this);\n            return this.classList;\n          },\n          configurable: 0,\n          set: function (val) {\n            this.className = val;\n          },\n        });\n      } catch (e) {\n        // Less performant fallback for older browsers (IE 6-8):\n        window[\" uCL\"] = polyfillClassList;\n        // the below code ensures polyfillClassList is applied to all current and future elements in the doc.\n        document.documentElement.firstChild.appendChild(document.createElement(\"style\")).styleSheet.cssText =\n          '_*{x-uCLp:expression(!this.hasOwnProperty(\"classList\")&&window[\" uCL\"](this))}' + //  IE6\n          '[class]{x-uCLp/**/:expression(!this.hasOwnProperty(\"classList\")&&window[\" uCL\"](this))}'; //IE7-8\n      }\n    })(window);\n  // 3. Patch in unsupported methods in DOMTokenList\n  (function (DOMTokenListProto, testClass) {\n    if (!DOMTokenListProto.item)\n      DOMTokenListProto.item = function (i) {\n        function NullCheck(n) {\n          return n === void 0 ? null : n;\n        }\n        return NullCheck(this[i]);\n      };\n    if (!DOMTokenListProto.toggle || testClass.toggle(\"a\", 0) !== false)\n      DOMTokenListProto.toggle = function (val) {\n        if (arguments.length > 1) return (this[arguments[1] ? \"add\" : \"remove\"](val), !!arguments[1]);\n        var oldValue = this.value;\n        return (this.remove(oldValue), oldValue === this.value && (this.add(val), true)); /*|| false*/\n      };\n    if (!DOMTokenListProto.replace || typeof testClass.replace(\"a\", \"b\") !== \"boolean\")\n      DOMTokenListProto.replace = function (oldToken, newToken) {\n        (checkIfValidClassListEntry(\"replace\", oldToken), checkIfValidClassListEntry(\"replace\", newToken));\n        var oldValue = this.value;\n        return (this.remove(oldToken), this.value !== oldValue && (this.add(newToken), true));\n      };\n    if (!DOMTokenListProto.contains)\n      DOMTokenListProto.contains = function (value) {\n        for (var i = 0, Len = this.length; i !== Len; ++i) if (this[i] === value) return true;\n        return false;\n      };\n    if (!DOMTokenListProto.forEach)\n      DOMTokenListProto.forEach = function (f) {\n        if (arguments.length === 1) for (var i = 0, Len = this.length; i !== Len; ++i) f(this[i], i, this);\n        else for (var i = 0, Len = this.length, tArg = arguments[1]; i !== Len; ++i) f.call(tArg, this[i], i, this);\n      };\n    if (!DOMTokenListProto.entries)\n      DOMTokenListProto.entries = function () {\n        var nextIndex = 0,\n          that = this;\n        return {\n          next: function () {\n            return nextIndex < that.length ? { value: [nextIndex, that[nextIndex]], done: false } : { done: true };\n          },\n        };\n      };\n    if (!DOMTokenListProto.values)\n      DOMTokenListProto.values = function () {\n        var nextIndex = 0,\n          that = this;\n        return {\n          next: function () {\n            return nextIndex < that.length ? { value: that[nextIndex], done: false } : { done: true };\n          },\n        };\n      };\n    if (!DOMTokenListProto.keys)\n      DOMTokenListProto.keys = function () {\n        var nextIndex = 0,\n          that = this;\n        return {\n          next: function () {\n            return nextIndex < that.length ? { value: nextIndex, done: false } : { done: true };\n          },\n        };\n      };\n  })(window.DOMTokenList.prototype, window.document.createElement(\"div\").classList);\n})(window);\n", "// https://developer.mozilla.org/en-US/docs/Web/API/Element/closest\nif (!Element.prototype.matches) {\n  Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;\n}\n\nif (!Element.prototype.closest) {\n  Element.prototype.closest = function (s) {\n    var el = this;\n\n    do {\n      if (el.matches(s)) return el;\n      el = el.parentElement || el.parentNode;\n    } while (el !== null && el.nodeType === 1);\n    return null;\n  };\n}\n", "// https://developer.mozilla.org/en-US/docs/Web/API/Element/matches\nif (!Element.prototype.matches) {\n  Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;\n}\n", "// https://developer.mozilla.org/en-US/docs/Web/API/Element/toggleAttribute\nif (!Element.prototype.toggleAttribute) {\n  Element.prototype.toggleAttribute = function (name, force) {\n    if (force !== void 0) force = !!force;\n\n    if (this.hasAttribute(name)) {\n      if (force) return true;\n\n      this.removeAttribute(name);\n      return false;\n    }\n    if (force === false) return false;\n\n    this.setAttribute(name, \"\");\n    return true;\n  };\n}\n", "// https://developer.mozilla.org/en-US/docs/Web/API/NodeList/forEach\nif (window.NodeList && !NodeList.prototype.forEach) {\n  NodeList.prototype.forEach = function (callback, thisArg) {\n    thisArg = thisArg || window;\n    for (var i = 0; i < this.length; i++) {\n      callback.call(thisArg, this[i], i, this);\n    }\n  };\n}\n", "// https://developer.mozilla.org/en-US/docs/Web/API/ParentNode/prepend\n// Source: https://github.com/jserz/js_piece/blob/master/DOM/ParentNode/prepend()/prepend().md\n(function (arr) {\n  arr.forEach(function (item) {\n    if (item.hasOwnProperty(\"prepend\")) {\n      return;\n    }\n    Object.defineProperty(item, \"prepend\", {\n      configurable: true,\n      enumerable: true,\n      writable: true,\n      value: function prepend() {\n        var argArr = Array.prototype.slice.call(arguments),\n          docFrag = document.createDocumentFragment();\n\n        argArr.forEach(function (argItem) {\n          var isNode = argItem instanceof Node;\n          docFrag.appendChild(isNode ? argItem : document.createTextNode(String(argItem)));\n        });\n\n        this.insertBefore(docFrag, this.firstChild);\n      },\n    });\n  });\n})([Element.prototype, Document.prototype, DocumentFragment.prototype]);\n", "export { feedbackAsyncIntegration } from './feedbackAsync.js';\nexport { feedbackSyncIntegration as feedbackIntegration, feedbackSyncIntegration } from './feedbackSync.js';\nexport { MULTIPLEXED_TRANSPORT_EXTRA_KEY, SDK_VERSION, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, Scope, addBreadcrumb, addEventProcessor, addIntegration, bindScopeToEmitter, captureConsoleIntegration, captureEvent, captureException, captureFeedback, captureMessage, captureSession, close, consoleLoggingIntegration, continueTrace, createConsolaReporter, createLangChainCallbackHandler, createTransport, dedupeIntegration, endSession, eventFiltersIntegration, extraErrorDataIntegration, featureFlagsIntegration, flush, functionToStringIntegration, getActiveSpan, getClient, getCurrentScope, getGlobalScope, getIsolationScope, getRootSpan, getSpanDescendants, getSpanStatusFromHttpCode, getTraceData, inboundFiltersIntegration, instrumentAnthropicAiClient, instrumentCreateReactAgent, instrumentGoogleGenAIClient, instrumentLangChainEmbeddings, instrumentLangGraph, instrumentOpenAiClient, instrumentStateGraph, instrumentSupabaseClient, isEnabled, isInitialized, lastEventId, logger, makeMultiplexedTransport, metrics, moduleMetadataIntegration, parameterize, registerSpanErrorInstrumentation, rewriteFramesIntegration, setAttribute, setAttributes, setContext, setConversationId, setCurrentClient, setExtra, setExtras, setHttpStatus, setMeasurement, setTag, setTags, setUser, spanToBaggageHeader, spanToJSON, spanToTraceHeader, startInactiveSpan, startNewTrace, startSession, startSpan, startSpanManual, supabaseIntegration, suppressTracing, thirdPartyErrorFilterIntegration, updateSpanName, withActiveSpan, withIsolationScope, withScope, withStreamedSpan, zodErrorsIntegration } from '@sentry/core/browser';\nexport { WINDOW } from './helpers.js';\nexport { BrowserClient } from './client.js';\nexport { makeFetchTransport } from './transports/fetch.js';\nexport { uiProfiler } from './profiling/index.js';\nexport { chromeStackLineParser, defaultStackLineParsers, defaultStackParser, geckoStackLineParser, opera10StackLineParser, opera11StackLineParser, winjsStackLineParser } from './stack-parsers.js';\nexport { eventFromException, eventFromMessage, exceptionFromError } from './eventbuilder.js';\nexport { createUserFeedbackEnvelope } from './userfeedback.js';\nexport { forceLoad, getDefaultIntegrations, init, onLoad } from './sdk.js';\nexport { showReportDialog } from './report-dialog.js';\nexport { breadcrumbsIntegration } from './integrations/breadcrumbs.js';\nexport { globalHandlersIntegration } from './integrations/globalhandlers.js';\nexport { httpContextIntegration } from './integrations/httpcontext.js';\nexport { linkedErrorsIntegration } from './integrations/linkederrors.js';\nexport { browserApiErrorsIntegration } from './integrations/browserapierrors.js';\nexport { browserSessionIntegration } from './integrations/browsersession.js';\nexport { lazyLoadIntegration } from './utils/lazyLoadIntegration.js';\nexport { reportingObserverIntegration } from './integrations/reportingobserver.js';\nexport { httpClientIntegration } from './integrations/httpclient.js';\nexport { contextLinesIntegration } from './integrations/contextlines.js';\nexport { graphqlClientIntegration } from './integrations/graphqlClient.js';\nexport { viewHierarchyIntegration } from './integrations/view-hierarchy.js';\nexport { getReplay, replayIntegration } from '@sentry/replay';\nexport { replayCanvasIntegration } from '@sentry/replay-canvas';\nexport { getFeedback, sendFeedback } from '@sentry/feedback';\nexport { defaultRequestInstrumentationOptions, instrumentOutgoingRequests } from './tracing/request.js';\nexport { browserTracingIntegration, isBotUserAgent, startBrowserTracingNavigationSpan, startBrowserTracingPageLoadSpan } from './tracing/browserTracingIntegration.js';\nexport { elementTimingIntegration, getAbsoluteUrl } from '@sentry/browser-utils';\nexport { normalizeStringifyValue } from './normalizeStringifyValue.js';\nexport { reportPageLoaded } from './tracing/reportPageLoaded.js';\nexport { setActiveSpanInBrowser } from './tracing/setActiveSpan.js';\nexport { spanStreamingIntegration } from './integrations/spanstreaming.js';\nexport { fetchStreamPerformanceIntegration } from './integrations/fetchStreamPerformance.js';\nexport { webVitalsIntegration } from './integrations/webVitals.js';\nexport { makeBrowserOfflineTransport } from './transports/offline.js';\nexport { browserProfilingIntegration } from './profiling/integration.js';\nexport { spotlightBrowserIntegration } from './integrations/spotlight.js';\nexport { cultureContextIntegration } from './integrations/culturecontext.js';\nexport { buildLaunchDarklyFlagUsedHandler, launchDarklyIntegration } from './integrations/featureFlags/launchdarkly/integration.js';\nexport { OpenFeatureIntegrationHook, openFeatureIntegration } from './integrations/featureFlags/openfeature/integration.js';\nexport { unleashIntegration } from './integrations/featureFlags/unleash/integration.js';\nexport { growthbookIntegration } from './integrations/featureFlags/growthbook/integration.js';\nexport { statsigIntegration } from './integrations/featureFlags/statsig/integration.js';\nexport { diagnoseSdkConnectivity } from './diagnose-sdk.js';\nexport { registerWebWorker, webWorkerIntegration } from './integrations/webWorker.js';\n//# sourceMappingURL=index.js.map\n", "declare const __DEBUG_BUILD__: boolean;\n\n/**\n * This serves as a build time flag that will be true by default, but false in non-debug builds or if users replace `__SENTRY_DEBUG__` in their generated code.\n *\n * ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking.\n */\nexport const DEBUG_BUILD = __DEBUG_BUILD__;\n", "/**\n * NOTE: In order to avoid circular dependencies, if you add a function to this module and it needs to print something,\n * you must either a) use `console.log` rather than the `debug` singleton, or b) put your function elsewhere.\n *\n * Note: This file was originally called `global.ts`, but was changed to unblock users which might be doing\n * string replaces with bundlers like Vite for `global` (would break imports that rely on importing from utils/src/global).\n *\n * Why worldwide?\n *\n * Why not?\n */\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport type { Integration } from '../types/integration';\nimport type { Carrier } from '../carrier';\nimport type { SdkSource } from './env';\n\n/** Internal global with common properties and Sentry extensions  */\nexport type InternalGlobal = {\n  navigator?: { userAgent?: string; maxTouchPoints?: number };\n  console: Console;\n  PerformanceObserver?: any;\n  Sentry?: any;\n  onerror?: {\n    (event: object | string, source?: string, lineno?: number, colno?: number, error?: Error): any;\n    __SENTRY_INSTRUMENTED__?: true;\n  };\n  onunhandledrejection?: {\n    (event: unknown): boolean;\n    __SENTRY_INSTRUMENTED__?: true;\n  };\n  SENTRY_ENVIRONMENT?: string;\n  SENTRY_DSN?: string;\n  SENTRY_RELEASE?: {\n    id?: string;\n  };\n  SENTRY_SDK_SOURCE?: SdkSource;\n  /**\n   * Debug IDs are indirectly injected by Sentry CLI or bundler plugins to directly reference a particular source map\n   * for resolving of a source file. The injected code will place an entry into the record for each loaded bundle/JS\n   * file.\n   */\n  _sentryDebugIds?: Record<string, string>;\n  /**\n   * Native debug IDs implementation (e.g., from Vercel).\n   * This uses the same format as _sentryDebugIds but with a different global name.\n   * Keys are `error.stack` strings, values are debug IDs.\n   */\n  _debugIds?: Record<string, string>;\n  /**\n   * Raw module metadata that is injected by bundler plugins.\n   *\n   * Keys are `error.stack` strings, values are the metadata.\n   */\n  _sentryModuleMetadata?: Record<string, any>;\n  _sentryEsmLoaderHookRegistered?: boolean;\n  _sentryWrappedDepth?: number;\n  /**\n   * Orchestrion bundler and runtime detection.\n   */\n  __SENTRY_ORCHESTRION__?: {\n    /** Empty array signifies runtime hooked */\n    runtime?: string[];\n    /** Empty array signifies bundler plugin ran */\n    bundler?: string[];\n    /**\n     * Channel-subscriber integration factories a bundler plugin's\n     * subscribe-injection stored here, keyed by export name (one per instrumented\n     * package actually bundled; the key dedupes packages split across several\n     * files). A bundler-only SDK (e.g. `@sentry/cloudflare`) reads these at\n     * `init()` and instantiates them.\n     */\n    integrations?: Map<string, () => Integration>;\n  };\n} & Carrier;\n\n/** Get's the global object for the current JavaScript runtime */\nexport const GLOBAL_OBJ = globalThis as unknown as InternalGlobal;\n", "// This is a magic string replaced by rollup\ndeclare const __SENTRY_SDK_VERSION__: string;\n\nexport const SDK_VERSION = typeof __SENTRY_SDK_VERSION__ === 'string' ? __SENTRY_SDK_VERSION__ : '0.0.0-unknown.0';\n", "import type { AsyncContextStack } from './asyncContext/stackStrategy';\nimport type { AsyncContextStrategy } from './asyncContext/types';\nimport type { Client } from './client';\nimport type { Scope } from './scope';\nimport type { SegmentSpanCaptureStrategy } from './tracing/segmentSpanCaptureStrategy';\nimport type { SerializedLog } from './types/log';\nimport type { SerializedMetric } from './types/metric';\nimport { SDK_VERSION } from './utils/version';\nimport { GLOBAL_OBJ } from './utils/worldwide';\n\n/**\n * An object that contains globally accessible properties and maintains a scope stack.\n * @hidden\n */\nexport interface Carrier {\n  __SENTRY__?: VersionedCarrier;\n}\n\ntype VersionedCarrier = {\n  version?: string;\n} & Record<Exclude<string, 'version'>, SentryCarrier>;\n\nexport interface SentryCarrier {\n  acs?: AsyncContextStrategy;\n  stack?: AsyncContextStack;\n\n  globalScope?: Scope;\n  defaultIsolationScope?: Scope;\n  defaultCurrentScope?: Scope;\n  loggerSettings?: { enabled: boolean };\n  /**\n   * A map of Sentry clients to their log buffers.\n   * This is used to store logs that are sent to Sentry.\n   */\n  clientToLogBufferMap?: WeakMap<Client, Array<SerializedLog>>;\n\n  /**\n   * A map of Sentry clients to their metric buffers.\n   * This is used to store metrics that are sent to Sentry.\n   */\n  clientToMetricBufferMap?: WeakMap<Client, Array<SerializedMetric>>;\n\n  /** Strategy for assembling segment spans into transactions; set by SDKs that defer capture. */\n  segmentSpanCaptureStrategy?: SegmentSpanCaptureStrategy;\n\n  /** Overwrites TextEncoder used in `@sentry/core`, need for `react-native@0.73` and older */\n  encodePolyfill?: (input: string) => Uint8Array;\n  /** Overwrites TextDecoder used in `@sentry/core`, need for `react-native@0.73` and older */\n  decodePolyfill?: (input: Uint8Array) => string;\n}\n\n/**\n * Returns the global shim registry.\n *\n * FIXME: This function is problematic, because despite always returning a valid Carrier,\n * it has an optional `__SENTRY__` property, which then in turn requires us to always perform an unnecessary check\n * at the call-site. We always access the carrier through this function, so we can guarantee that `__SENTRY__` is there.\n **/\nexport function getMainCarrier(): Carrier {\n  // This ensures a Sentry carrier exists\n  getSentryCarrier(GLOBAL_OBJ);\n  return GLOBAL_OBJ;\n}\n\n/** Will either get the existing sentry carrier, or create a new one. */\nexport function getSentryCarrier(carrier: Carrier): SentryCarrier {\n  const __SENTRY__ = (carrier.__SENTRY__ = carrier.__SENTRY__ || {});\n\n  // For now: First SDK that sets the .version property wins\n  __SENTRY__.version = __SENTRY__.version || SDK_VERSION;\n\n  // Intentionally populating and returning the version of \"this\" SDK instance\n  // rather than what's set in .version so that \"this\" SDK always gets its carrier\n  return (__SENTRY__[SDK_VERSION] = __SENTRY__[SDK_VERSION] || {});\n}\n\n/**\n * Returns a global singleton contained in the global `__SENTRY__[]` object.\n *\n * If the singleton doesn't already exist in `__SENTRY__`, it will be created using the given factory\n * function and added to the `__SENTRY__` object.\n *\n * @param name name of the global singleton on __SENTRY__\n * @param creator creator Factory function to create the singleton if it doesn't already exist on `__SENTRY__`\n * @param obj (Optional) The global object on which to look for `__SENTRY__`, if not `GLOBAL_OBJ`'s return value\n * @returns the singleton\n */\nexport function getGlobalSingleton<Prop extends keyof SentryCarrier>(\n  name: Prop,\n  creator: () => NonNullable<SentryCarrier[Prop]>,\n  obj = GLOBAL_OBJ,\n): NonNullable<SentryCarrier[Prop]> {\n  const __SENTRY__ = (obj.__SENTRY__ = obj.__SENTRY__ || {});\n  const carrier = (__SENTRY__[SDK_VERSION] = __SENTRY__[SDK_VERSION] || {});\n  // Note: We do not want to set `carrier.version` here, as this may be called before any `init` is called, e.g. for the default scopes\n  return carrier[name] || (carrier[name] = creator());\n}\n", "import { getGlobalSingleton } from '../carrier';\nimport { DEBUG_BUILD } from '../debug-build';\nimport type { ConsoleLevel } from '../types/instrument';\nimport { GLOBAL_OBJ } from './worldwide';\n\nexport interface SentryDebugLogger {\n  disable(): void;\n  enable(): void;\n  isEnabled(): boolean;\n  log(...args: Parameters<typeof console.log>): void;\n  warn(...args: Parameters<typeof console.warn>): void;\n  error(...args: Parameters<typeof console.error>): void;\n}\n\nexport const CONSOLE_LEVELS: readonly ConsoleLevel[] = [\n  'debug',\n  'info',\n  'warn',\n  'error',\n  'log',\n  'assert',\n  'trace',\n] as const;\n\n/** Prefix for logging strings */\nconst PREFIX = 'Sentry Logger ';\n\n/** This may be mutated by the console instrumentation. */\nexport const originalConsoleMethods: Partial<{\n  log(...args: Parameters<typeof console.log>): void;\n  info(...args: Parameters<typeof console.info>): void;\n  warn(...args: Parameters<typeof console.warn>): void;\n  error(...args: Parameters<typeof console.error>): void;\n  debug(...args: Parameters<typeof console.debug>): void;\n  assert(...args: Parameters<typeof console.assert>): void;\n  trace(...args: Parameters<typeof console.trace>): void;\n}> = {};\n\n/**\n * Temporarily disable sentry console instrumentations.\n *\n * @param callback The function to run against the original `console` messages\n * @returns The results of the callback\n */\nexport function consoleSandbox<T>(callback: () => T): T {\n  if (!('console' in GLOBAL_OBJ)) {\n    return callback();\n  }\n\n  const console = GLOBAL_OBJ.console;\n  const wrappedFuncs: Partial<Record<ConsoleLevel, (...args: unknown[]) => void>> = {};\n\n  const wrappedLevels = Object.keys(originalConsoleMethods) as ConsoleLevel[];\n\n  // Restore all wrapped console methods\n  wrappedLevels.forEach(level => {\n    const originalConsoleMethod = originalConsoleMethods[level];\n    wrappedFuncs[level] = console[level] as (...args: unknown[]) => void;\n    console[level] = originalConsoleMethod as (...args: unknown[]) => void;\n  });\n\n  try {\n    return callback();\n  } finally {\n    // Revert restoration to wrapped state\n    wrappedLevels.forEach(level => {\n      console[level] = wrappedFuncs[level] as (...args: unknown[]) => void;\n    });\n  }\n}\n\nfunction enable(): void {\n  _getLoggerSettings().enabled = true;\n}\n\nfunction disable(): void {\n  _getLoggerSettings().enabled = false;\n}\n\nfunction isEnabled(): boolean {\n  return _getLoggerSettings().enabled;\n}\n\nfunction log(...args: Parameters<typeof console.log>): void {\n  _maybeLog('log', ...args);\n}\n\nfunction warn(...args: Parameters<typeof console.warn>): void {\n  _maybeLog('warn', ...args);\n}\n\nfunction error(...args: Parameters<typeof console.error>): void {\n  _maybeLog('error', ...args);\n}\n\nfunction _maybeLog(level: ConsoleLevel, ...args: Parameters<(typeof console)[typeof level]>): void {\n  if (!DEBUG_BUILD) {\n    return;\n  }\n\n  if (isEnabled()) {\n    consoleSandbox(() => {\n      GLOBAL_OBJ.console[level](`${PREFIX}[${level}]:`, ...args);\n    });\n  }\n}\n\nfunction _getLoggerSettings(): { enabled: boolean } {\n  if (!DEBUG_BUILD) {\n    return { enabled: false };\n  }\n\n  return getGlobalSingleton('loggerSettings', () => ({ enabled: false }));\n}\n\n/**\n * This is a logger singleton which either logs things or no-ops if logging is not enabled.\n */\nexport const debug = {\n  /** Enable logging. */\n  enable,\n  /** Disable logging. */\n  disable,\n  /** Check if logging is enabled. */\n  isEnabled,\n  /** Log a message. */\n  log,\n  /** Log a warning. */\n  warn,\n  /** Log an error. */\n  error,\n} satisfies SentryDebugLogger;\n", "import type { Event } from '../types/event';\nimport type { StackFrame } from '../types/stackframe';\nimport type { StackLineParser, StackParser } from '../types/stacktrace';\nimport type { VNode, VueViewModel } from '../types/vue';\n\nconst STACKTRACE_FRAME_LIMIT = 50;\nexport const UNKNOWN_FUNCTION = '?';\n// Used to sanitize webpack (error: *) wrapped stack errors\nconst WEBPACK_ERROR_REGEXP = /\\(error: (.*)\\)/;\nconst STRIP_FRAME_REGEXP = /captureMessage|captureException/;\n\n/**\n * Creates a stack parser with the supplied line parsers\n *\n * StackFrames are returned in the correct order for Sentry Exception\n * frames and with Sentry SDK internal frames removed from the top and bottom\n *\n */\nexport function createStackParser(...parsers: StackLineParser[]): StackParser {\n  const sortedParsers = parsers.sort((a, b) => a[0] - b[0]).map(p => p[1]);\n\n  return (stack: string, skipFirstLines: number = 0, framesToPop: number = 0): StackFrame[] => {\n    const frames: StackFrame[] = [];\n    const lines = stack.split('\\n');\n\n    for (let i = skipFirstLines; i < lines.length; i++) {\n      let line = lines[i] as string;\n      // Truncate lines over 1kb because many of the regular expressions use\n      // backtracking which results in run time that increases exponentially\n      // with input size. Huge strings can result in hangs/Denial of Service:\n      // https://github.com/getsentry/sentry-javascript/issues/2286\n      if (line.length > 1024) {\n        line = line.slice(0, 1024);\n      }\n\n      // https://github.com/getsentry/sentry-javascript/issues/5459\n      // Remove webpack (error: *) wrappers\n      const cleanedLine = WEBPACK_ERROR_REGEXP.test(line) ? line.replace(WEBPACK_ERROR_REGEXP, '$1') : line;\n\n      // https://github.com/getsentry/sentry-javascript/issues/7813\n      // Skip Error: lines\n      // Using includes() instead of a regex to avoid O(n²) backtracking on long lines\n      // https://github.com/getsentry/sentry-javascript/issues/20052\n      if (cleanedLine.includes('Error: ')) {\n        continue;\n      }\n\n      for (const parser of sortedParsers) {\n        const frame = parser(cleanedLine);\n\n        if (frame) {\n          frames.push(frame);\n          break;\n        }\n      }\n\n      if (frames.length >= STACKTRACE_FRAME_LIMIT + framesToPop) {\n        break;\n      }\n    }\n\n    return stripSentryFramesAndReverse(frames.slice(framesToPop));\n  };\n}\n\n/**\n * Gets a stack parser implementation from Options.stackParser\n * @see Options\n *\n * If options contains an array of line parsers, it is converted into a parser\n */\nexport function stackParserFromStackParserOptions(stackParser: StackParser | StackLineParser[]): StackParser {\n  if (Array.isArray(stackParser)) {\n    return createStackParser(...stackParser);\n  }\n  return stackParser;\n}\n\n/**\n * Removes Sentry frames from the top and bottom of the stack if present and enforces a limit of max number of frames.\n * Assumes stack input is ordered from top to bottom and returns the reverse representation so call site of the\n * function that caused the crash is the last frame in the array.\n * @hidden\n */\nexport function stripSentryFramesAndReverse(stack: ReadonlyArray<StackFrame>): StackFrame[] {\n  if (!stack.length) {\n    return [];\n  }\n\n  const localStack = Array.from(stack);\n\n  // If stack starts with one of our API calls, remove it (starts, meaning it's the top of the stack - aka last call)\n  if (/sentryWrapped/.test(getLastStackFrame(localStack).function || '')) {\n    localStack.pop();\n  }\n\n  // Reversing in the middle of the procedure allows us to just pop the values off the stack\n  localStack.reverse();\n\n  // If stack ends with one of our internal API calls, remove it (ends, meaning it's the bottom of the stack - aka top-most call)\n  if (STRIP_FRAME_REGEXP.test(getLastStackFrame(localStack).function || '')) {\n    localStack.pop();\n\n    // When using synthetic events, we will have a 2 levels deep stack, as `new Error('Sentry syntheticException')`\n    // is produced within the scope itself, making it:\n    //\n    //   Sentry.captureException()\n    //   scope.captureException()\n    //\n    // instead of just the top `Sentry` call itself.\n    // This forces us to possibly strip an additional frame in the exact same was as above.\n    if (STRIP_FRAME_REGEXP.test(getLastStackFrame(localStack).function || '')) {\n      localStack.pop();\n    }\n  }\n\n  return localStack.slice(0, STACKTRACE_FRAME_LIMIT).map(frame => ({\n    ...frame,\n    filename: frame.filename || getLastStackFrame(localStack).filename,\n    function: frame.function || UNKNOWN_FUNCTION,\n  }));\n}\n\nfunction getLastStackFrame(arr: StackFrame[]): StackFrame {\n  return arr[arr.length - 1] || {};\n}\n\nconst defaultFunctionName = '<anonymous>';\n\n/**\n * Safely extract function name from itself\n */\nexport function getFunctionName(fn: unknown): string {\n  try {\n    if (!fn || typeof fn !== 'function') {\n      return defaultFunctionName;\n    }\n    return fn.name || defaultFunctionName;\n  } catch {\n    // Just accessing custom props in some Selenium environments\n    // can cause a \"Permission denied\" exception (see raven-js#495).\n    return defaultFunctionName;\n  }\n}\n\n/**\n * Get's stack frames from an event without needing to check for undefined properties.\n */\nexport function getFramesFromEvent(event: Event): StackFrame[] | undefined {\n  const exception = event.exception;\n\n  if (exception) {\n    const frames: StackFrame[] = [];\n    try {\n      // @ts-expect-error Object could be undefined\n      exception.values.forEach(value => {\n        // @ts-expect-error Value could be undefined\n        if (value.stacktrace.frames) {\n          // @ts-expect-error Value could be undefined\n          frames.push(...value.stacktrace.frames);\n        }\n      });\n      return frames;\n    } catch {\n      return undefined;\n    }\n  }\n  return undefined;\n}\n\n/**\n * Get the internal name of an internal Vue value, to represent it in a stacktrace.\n *\n * @param value The value to get the internal name of.\n * @deprecated This is Vue-specific and will be removed from `@sentry/core` in a future major version.\n * The `@sentry/vue` SDK inlines its own equivalent — there's no replacement export from core.\n */\nexport function getVueInternalName(value: VueViewModel | VNode): string {\n  // Check if it's a VNode (has __v_isVNode) or a component instance (has _isVue/__isVue)\n  const isVNode = '__v_isVNode' in value && value.__v_isVNode;\n\n  return isVNode ? '[VueVNode]' : '[VueViewModel]';\n}\n\n/**\n * Normalizes stack line paths by removing file:// prefix and leading slashes for Windows paths\n */\nexport function normalizeStackTracePath(path: string | undefined): string | undefined {\n  let filename = path?.startsWith('file://') ? path.slice(7) : path;\n  // If it's a Windows path, trim the leading slash so that `/C:/foo` becomes `C:/foo`\n  if (filename?.match(/\\/[A-Z]:/)) {\n    filename = filename.slice(1);\n  }\n  return filename;\n}\n", "import { DEBUG_BUILD } from '../debug-build';\nimport { debug } from '../utils/debug-logger';\nimport { getFunctionName } from '../utils/stacktrace';\n\nexport type InstrumentHandlerType =\n  | 'console'\n  | 'dom'\n  | 'fetch'\n  | 'fetch-body-resolved'\n  | 'history'\n  | 'xhr'\n  | 'error'\n  | 'unhandledrejection';\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type InstrumentHandlerCallback = (data: any) => void;\n\n// We keep the handlers globally\nconst handlers: { [key in InstrumentHandlerType]?: InstrumentHandlerCallback[] } = {};\nconst instrumented: { [key in InstrumentHandlerType]?: boolean } = {};\n\n/** Add a handler function. Returns a function to remove the handler. */\nexport function addHandler(type: InstrumentHandlerType, handler: InstrumentHandlerCallback): () => void {\n  handlers[type] = handlers[type] || [];\n  handlers[type].push(handler);\n\n  return () => {\n    const typeHandlers = handlers[type];\n    if (typeHandlers) {\n      const index = typeHandlers.indexOf(handler);\n      if (index !== -1) {\n        typeHandlers.splice(index, 1);\n      }\n    }\n  };\n}\n\n/**\n * Reset all instrumentation handlers.\n * This can be used by tests to ensure we have a clean slate of instrumentation handlers.\n */\nexport function resetInstrumentationHandlers(): void {\n  Object.keys(handlers).forEach(key => {\n    handlers[key as InstrumentHandlerType] = undefined;\n  });\n}\n\n/** Maybe run an instrumentation function, unless it was already called. */\nexport function maybeInstrument(type: InstrumentHandlerType, instrumentFn: () => void): void {\n  if (!instrumented[type]) {\n    instrumented[type] = true;\n    try {\n      instrumentFn();\n    } catch (e) {\n      DEBUG_BUILD && debug.error(`Error while instrumenting ${type}`, e);\n    }\n  }\n}\n\n/** Trigger handlers for a given instrumentation type. */\nexport function triggerHandlers(type: InstrumentHandlerType, data: unknown): void {\n  const typeHandlers = type && handlers[type];\n  if (!typeHandlers) {\n    return;\n  }\n\n  for (const handler of typeHandlers) {\n    try {\n      handler(data);\n    } catch (e) {\n      DEBUG_BUILD &&\n        debug.error(\n          `Error while triggering instrumentation handler.\\nType: ${type}\\nName: ${getFunctionName(handler)}\\nError:`,\n          e,\n        );\n    }\n  }\n}\n", "import type { HandlerDataError } from '../types/instrument';\nimport { GLOBAL_OBJ } from '../utils/worldwide';\nimport { addHandler, maybeInstrument, triggerHandlers } from './handlers';\n\nlet _oldOnErrorHandler: (typeof GLOBAL_OBJ)['onerror'] | null = null;\n\n/**\n * Add an instrumentation handler for when an error is captured by the global error handler.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nexport function addGlobalErrorInstrumentationHandler(handler: (data: HandlerDataError) => void): void {\n  const type = 'error';\n  addHandler(type, handler);\n  maybeInstrument(type, instrumentError);\n}\n\nfunction instrumentError(): void {\n  _oldOnErrorHandler = GLOBAL_OBJ.onerror;\n\n  // Note: The reason we are doing window.onerror instead of window.addEventListener('error')\n  // is that we are using this handler in the Loader Script, to handle buffered errors consistently\n  GLOBAL_OBJ.onerror = function (\n    msg: string | object,\n    url?: string,\n    line?: number,\n    column?: number,\n    error?: Error,\n  ): boolean {\n    const handlerData: HandlerDataError = {\n      column,\n      error,\n      line,\n      msg,\n      url,\n    };\n    triggerHandlers('error', handlerData);\n\n    if (_oldOnErrorHandler) {\n      // eslint-disable-next-line prefer-rest-params\n      return _oldOnErrorHandler.apply(this, arguments);\n    }\n\n    return false;\n  };\n\n  GLOBAL_OBJ.onerror.__SENTRY_INSTRUMENTED__ = true;\n}\n", "import type { HandlerDataUnhandledRejection } from '../types/instrument';\nimport { GLOBAL_OBJ } from '../utils/worldwide';\nimport { addHandler, maybeInstrument, triggerHandlers } from './handlers';\n\nlet _oldOnUnhandledRejectionHandler: (typeof GLOBAL_OBJ)['onunhandledrejection'] | null = null;\n\n/**\n * Add an instrumentation handler for when an unhandled promise rejection is captured.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nexport function addGlobalUnhandledRejectionInstrumentationHandler(\n  handler: (data: HandlerDataUnhandledRejection) => void,\n): void {\n  const type = 'unhandledrejection';\n  addHandler(type, handler);\n  maybeInstrument(type, instrumentUnhandledRejection);\n}\n\nfunction instrumentUnhandledRejection(): void {\n  _oldOnUnhandledRejectionHandler = GLOBAL_OBJ.onunhandledrejection;\n\n  // Note: The reason we are doing window.onunhandledrejection instead of window.addEventListener('unhandledrejection')\n  // is that we are using this handler in the Loader Script, to handle buffered rejections consistently\n  GLOBAL_OBJ.onunhandledrejection = function (e: unknown): boolean {\n    const handlerData: HandlerDataUnhandledRejection = e;\n    triggerHandlers('unhandledrejection', handlerData);\n\n    if (_oldOnUnhandledRejectionHandler) {\n      // eslint-disable-next-line prefer-rest-params\n      return _oldOnUnhandledRejectionHandler.apply(this, arguments);\n    }\n\n    return true;\n  };\n\n  GLOBAL_OBJ.onunhandledrejection.__SENTRY_INSTRUMENTED__ = true;\n}\n", "/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport type { Primitive } from '../types/misc';\nimport type { ParameterizedString } from '../types/parameterize';\nimport type { PolymorphicEvent } from '../types/polymorphics';\nimport type { VNode, VueViewModel } from '../types/vue';\n\n// eslint-disable-next-line @typescript-eslint/unbound-method\nconst objectToString = Object.prototype.toString;\n\n/**\n * Checks whether given value's type is one of a few Error or Error-like\n * {@link isError}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isError(wat: unknown): wat is Error {\n  switch (objectToString.call(wat)) {\n    case '[object Error]':\n    case '[object Exception]':\n    case '[object DOMException]':\n    case '[object WebAssembly.Exception]':\n      return true;\n    default:\n      return isInstanceOf(wat, Error);\n  }\n}\n/**\n * Checks whether given value is an instance of the given built-in class.\n *\n * @param wat The value to be checked\n * @param className\n * @returns A boolean representing the result.\n */\nfunction isBuiltin(wat: unknown, className: string): boolean {\n  return objectToString.call(wat) === `[object ${className}]`;\n}\n\n/**\n * Checks whether given value's type is ErrorEvent\n * {@link isErrorEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isErrorEvent(wat: unknown): boolean {\n  return isBuiltin(wat, 'ErrorEvent');\n}\n\n/**\n * Checks whether given value's type is DOMError\n * {@link isDOMError}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isDOMError(wat: unknown): boolean {\n  return isBuiltin(wat, 'DOMError');\n}\n\n/**\n * Checks whether given value's type is DOMException\n * {@link isDOMException}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isDOMException(wat: unknown): boolean {\n  return isBuiltin(wat, 'DOMException');\n}\n\n/**\n * Checks whether given value's type is a string\n * {@link isString}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isString(wat: unknown): wat is string {\n  return isBuiltin(wat, 'String');\n}\n\n/**\n * Checks whether given string is parameterized\n * {@link isParameterizedString}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isParameterizedString(wat: unknown): wat is ParameterizedString {\n  return (\n    typeof wat === 'object' &&\n    wat !== null &&\n    '__sentry_template_string__' in wat &&\n    '__sentry_template_values__' in wat\n  );\n}\n\n/**\n * Checks whether given value is a primitive (undefined, null, number, boolean, string, bigint, symbol)\n * {@link isPrimitive}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isPrimitive(wat: unknown): wat is Primitive {\n  return wat === null || isParameterizedString(wat) || (typeof wat !== 'object' && typeof wat !== 'function');\n}\n\n/**\n * Checks whether given value's type is an object literal, or a class instance.\n * {@link isPlainObject}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isPlainObject(wat: unknown): wat is Record<string, unknown> {\n  return isBuiltin(wat, 'Object');\n}\n\n/**\n * Checks whether given value is a non-null object (i.e. `typeof` is `'object'` and it is not `null`).\n * Unlike {@link isPlainObject}, this also accepts arrays and class instances - it only rules out\n * `null`, primitives, and functions.\n * {@link isObjectLike}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isObjectLike(wat: unknown): wat is Record<PropertyKey, unknown> {\n  return typeof wat === 'object' && wat !== null;\n}\n\n/**\n * Checks whether given value's type is an Event instance\n * {@link isEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isEvent(wat: unknown): wat is PolymorphicEvent {\n  return typeof Event !== 'undefined' && isInstanceOf(wat, Event);\n}\n\n/**\n * Checks whether given value's type is an Element instance\n * {@link isElement}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n * @deprecated This is browser-specific and will be removed from `@sentry/core` in a future major version.\n * Import `isElement` from `@sentry/browser-utils` instead.\n */\nexport function isElement(wat: unknown): boolean {\n  return typeof Element !== 'undefined' && isInstanceOf(wat, Element);\n}\n\n/**\n * Checks whether given value's type is an regexp\n * {@link isRegExp}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isRegExp(wat: unknown): wat is RegExp {\n  return isBuiltin(wat, 'RegExp');\n}\n\n/**\n * Checks whether given value has a then function.\n * @param wat A value to be checked.\n */\nexport function isThenable(wat: any): wat is PromiseLike<any> {\n  // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n  return Boolean(wat?.then && typeof wat.then === 'function');\n}\n\n/**\n * Checks whether given value's type is a React SyntheticEvent\n * {@link isSyntheticEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n * @deprecated This is React-specific and will be removed from `@sentry/core` in a future major version.\n * Use the equivalent helper that ships with `@sentry/react` instead.\n */\nexport function isSyntheticEvent(wat: unknown): boolean {\n  return isPlainObject(wat) && 'nativeEvent' in wat && 'preventDefault' in wat && 'stopPropagation' in wat;\n}\n\n/**\n * Checks whether given value's type is an instance of provided constructor.\n * {@link isInstanceOf}.\n *\n * @param wat A value to be checked.\n * @param base A constructor to be used in a check.\n * @returns A boolean representing the result.\n */\n// TODO: fix in v11, convert any to unknown\n// export function isInstanceOf<T>(wat: unknown, base: { new (...args: any[]): T }): wat is T {\nexport function isInstanceOf<T>(wat: any, base: any): wat is T {\n  try {\n    return wat instanceof base;\n  } catch {\n    return false;\n  }\n}\n\n/**\n * Checks whether given value's type is a Vue ViewModel or a VNode.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n * @deprecated This is Vue-specific and will be removed from `@sentry/core` in a future major version.\n * Use the equivalent helper that ships with `@sentry/vue` instead.\n */\nexport function isVueViewModel(wat: unknown): wat is VueViewModel | VNode {\n  // Not using Object.prototype.toString because in Vue 3 it would read the instance's Symbol(Symbol.toStringTag) property.\n  // We also need to check for __v_isVNode because Vue 3 component render instances have an internal __v_isVNode property.\n  return !!(\n    typeof wat === 'object' &&\n    wat !== null &&\n    ((wat as VueViewModel).__isVue || (wat as VueViewModel)._isVue || (wat as { __v_isVNode?: boolean }).__v_isVNode)\n  );\n}\n\n/**\n * Checks whether the given parameter is a Standard Web API Request instance.\n *\n * Returns false if Request is not available in the current runtime.\n */\nexport function isRequest(request: unknown): request is Request {\n  return typeof Request !== 'undefined' && isInstanceOf(request, Request);\n}\n", "/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { DEBUG_BUILD } from '../debug-build';\nimport type { WrappedFunction } from '../types/wrappedfunction';\nimport { debug } from './debug-logger';\nimport { isError, isEvent, isObjectLike, isPrimitive } from './is';\n\n/**\n * Replace a method in an object with a wrapped version of itself.\n *\n * If the method on the passed object is not a function, the wrapper will not be applied.\n *\n * @param source An object that contains a method to be wrapped.\n * @param name The name of the method to be wrapped.\n * @param replacementFactory A higher-order function that takes the original version of the given method and returns a\n * wrapped version. Note: The function returned by `replacementFactory` needs to be a non-arrow function, in order to\n * preserve the correct value of `this`, and the original method must be called using `origMethod.call(this, <other\n * args>)` or `origMethod.apply(this, [<other args>])` (rather than being called directly), again to preserve `this`.\n * @returns void\n */\n\nexport function fill(source: { [key: string]: any }, name: string, replacementFactory: (...args: any[]) => any): void {\n  if (!(name in source)) {\n    return;\n  }\n\n  // explicitly casting to unknown because we don't know the type of the method initially at all\n  const original = source[name] as unknown;\n\n  if (typeof original !== 'function') {\n    return;\n  }\n\n  const wrapped = replacementFactory(original) as WrappedFunction;\n\n  // Make sure it's a function first, as we need to attach an empty prototype for `defineProperties` to work\n  // otherwise it'll throw \"TypeError: Object.defineProperties called on non-object\"\n  if (typeof wrapped === 'function') {\n    markFunctionWrapped(wrapped, original);\n  }\n\n  try {\n    source[name] = wrapped;\n  } catch {\n    DEBUG_BUILD && debug.log(`Failed to replace method \"${name}\" in object`, source);\n  }\n}\n\n/**\n * Defines a non-enumerable property on the given object.\n *\n * @param obj The object on which to set the property\n * @param name The name of the property to be set\n * @param value The value to which to set the property\n */\nexport function addNonEnumerableProperty(obj: object, name: string | symbol, value: unknown): void {\n  try {\n    Object.defineProperty(obj, name, {\n      // enumerable: false, // the default, so we can save on bundle size by not explicitly setting it\n      value,\n      writable: true,\n      configurable: true,\n    });\n  } catch {\n    DEBUG_BUILD && debug.log(`Failed to add non-enumerable property \"${String(name)}\" to object`, obj);\n  }\n}\n\n/**\n * Remembers the original function on the wrapped function and\n * patches up the prototype.\n *\n * @param wrapped the wrapper function\n * @param original the original function that gets wrapped\n */\nexport function markFunctionWrapped(wrapped: WrappedFunction, original: WrappedFunction): void {\n  try {\n    const proto = original.prototype || {};\n    wrapped.prototype = original.prototype = proto;\n    addNonEnumerableProperty(wrapped, '__sentry_original__', original);\n  } catch {} // eslint-disable-line no-empty\n}\n\n/**\n * Wrap a method on an object by name, only if it is not already wrapped.\n *\n * Note: to set the wrapped method as a non-enumerable property, pass\n * false as the `enumerable` argument. This could be detected, but only\n * by either walking up the prototype chain, or iterating over all fields\n * in a `for(in)` loop. Neither are an acceptable performance impact for\n * the rare case where we might patch a non-enumerable method.\n */\nexport function wrapMethod<O extends {}, T extends string & keyof O>(\n  obj: O,\n  field: T,\n  wrapped: WrappedFunction,\n  enumerable: boolean = true,\n): void {\n  const original = obj[field];\n  if (typeof original !== 'function') {\n    throw new Error(`Cannot wrap method: ${field} is not a function`);\n  }\n  if (getOriginalFunction(original)) {\n    throw new Error(`Attempting to wrap method ${field} multiple times`);\n  }\n  markFunctionWrapped(wrapped, original);\n  Object.defineProperty(obj, field, {\n    writable: true,\n    configurable: true,\n    enumerable,\n    value: wrapped,\n  });\n}\n\n/**\n * This extracts the original function if available.  See\n * `markFunctionWrapped` for more information.\n *\n * @param func the function to unwrap\n * @returns the unwrapped version of the function if available.\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport function getOriginalFunction<T extends Function>(func: WrappedFunction<T>): T | undefined {\n  return func.__sentry_original__;\n}\n\n/**\n * Transforms any `Error` or `Event` into a plain object with all of their enumerable properties, and some of their\n * non-enumerable properties attached.\n *\n * @param value Initial source that we have to transform in order for it to be usable by the serializer\n * @returns An Event or Error turned into an object - or the value argument itself, when value is neither an Event nor\n *  an Error.\n */\nexport function convertToPlainObject<V>(value: V): Record<string, unknown> | V {\n  if (isError(value)) {\n    return {\n      message: value.message,\n      name: value.name,\n      stack: value.stack,\n      ...getOwnProperties(value),\n    };\n  }\n\n  // This handles browser events specifically, where certain properties are non-enumerable and need to be unpacked.\n  if (isEvent(value)) {\n    const { type, target, currentTarget, detail } = value;\n    return {\n      type,\n      target,\n      currentTarget,\n      ...(detail ? { detail } : {}),\n      ...getOwnProperties(value),\n    };\n  }\n\n  return value;\n}\n\n/** Filters out all but an object's own properties */\nfunction getOwnProperties(obj: unknown): { [key: string]: unknown } {\n  if (isObjectLike(obj)) {\n    return Object.fromEntries(Object.entries(obj));\n  }\n  return {};\n}\n\n/**\n * Given any captured exception, extract its keys and create a sorted\n * and truncated list that will be used inside the event message.\n * eg. `Non-error exception captured with keys: foo, bar, baz`\n */\nexport function extractExceptionKeysForMessage(exception: Record<string, unknown>): string {\n  const keys = Object.keys(convertToPlainObject(exception));\n  keys.sort();\n\n  return !keys[0] ? '[object has no keys]' : keys.join(', ');\n}\n\n/**\n * Given any object, return a new object having removed all fields whose value was `undefined`.\n * Works recursively on objects and arrays.\n *\n * Attention: This function keeps circular references in the returned object.\n *\n * @deprecated This function is no longer used by the SDK and will be removed in a future major version.\n */\nexport function dropUndefinedKeys<T>(inputValue: T): T {\n  // This map keeps track of what already visited nodes map to.\n  // Our Set - based memoBuilder doesn't work here because we want to the output object to have the same circular\n  // references as the input object.\n  const memoizationMap = new Map<unknown, unknown>();\n\n  // This function just proxies `_dropUndefinedKeys` to keep the `memoBuilder` out of this function's API\n  return _dropUndefinedKeys(inputValue, memoizationMap);\n}\n\nfunction _dropUndefinedKeys<T>(inputValue: T, memoizationMap: Map<unknown, unknown>): T {\n  // Early return for primitive values\n  if (inputValue === null || typeof inputValue !== 'object') {\n    return inputValue;\n  }\n\n  // Check memo map first for all object types\n  const memoVal = memoizationMap.get(inputValue);\n  if (memoVal !== undefined) {\n    return memoVal as T;\n  }\n\n  // handle arrays\n  if (Array.isArray(inputValue)) {\n    const returnValue: unknown[] = [];\n    // Store mapping to handle circular references\n    memoizationMap.set(inputValue, returnValue);\n\n    inputValue.forEach(value => {\n      returnValue.push(_dropUndefinedKeys(value, memoizationMap));\n    });\n\n    return returnValue as unknown as T;\n  }\n\n  if (isPojo(inputValue)) {\n    const returnValue: { [key: string]: unknown } = {};\n    // Store mapping to handle circular references\n    memoizationMap.set(inputValue, returnValue);\n\n    const keys = Object.keys(inputValue);\n\n    keys.forEach(key => {\n      const val = inputValue[key];\n      if (val !== undefined) {\n        returnValue[key] = _dropUndefinedKeys(val, memoizationMap);\n      }\n    });\n\n    return returnValue as T;\n  }\n\n  // For other object types, return as is\n  return inputValue;\n}\n\nfunction isPojo(input: unknown): input is Record<string, unknown> {\n  // Plain objects have Object as constructor or no constructor\n  const constructor = (input as object).constructor;\n  return constructor === Object || constructor === undefined;\n}\n\n/**\n * Ensure that something is an object.\n *\n * Turns `undefined` and `null` into `String`s and all other primitives into instances of their respective wrapper\n * classes (String, Boolean, Number, etc.). Acts as the identity function on non-primitives.\n *\n * @param wat The subject of the objectification\n * @returns A version of `wat` which can safely be used with `Object` class methods\n */\nexport function objectify(wat: unknown): typeof Object {\n  let objectified;\n  switch (true) {\n    // this will catch both undefined and null\n    case wat == undefined:\n      objectified = new String(wat);\n      break;\n\n    // Though symbols and bigints do have wrapper classes (`Symbol` and `BigInt`, respectively), for whatever reason\n    // those classes don't have constructors which can be used with the `new` keyword. We therefore need to cast each as\n    // an object in order to wrap it.\n    case typeof wat === 'symbol' || typeof wat === 'bigint':\n      objectified = Object(wat);\n      break;\n\n    // this will catch the remaining primitives: `String`, `Number`, and `Boolean`\n    case isPrimitive(wat):\n      // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n      objectified = new (wat as any).constructor(wat);\n      break;\n\n    // by process of elimination, at this point we know that `wat` must already be an object\n    default:\n      objectified = wat;\n      break;\n  }\n  return objectified;\n}\n", "import { GLOBAL_OBJ } from './worldwide';\n\nexport type RandomSafeContextRunner = <T>(callback: () => T) => T;\n\n// undefined = not yet resolved, null = no runner found, function = runner found\nlet RESOLVED_RUNNER: RandomSafeContextRunner | null | undefined;\n\n/**\n * Simple wrapper that allows SDKs to *secretly* set context wrapper to generate safe random IDs in cache components contexts\n */\nexport function withRandomSafeContext<T>(cb: () => T): T {\n  // Skips future symbol lookups if we've already resolved (or attempted to resolve) the runner once\n  if (RESOLVED_RUNNER !== undefined) {\n    return RESOLVED_RUNNER ? RESOLVED_RUNNER(cb) : cb();\n  }\n\n  const sym = Symbol.for('__SENTRY_SAFE_RANDOM_ID_WRAPPER__');\n  const globalWithSymbol: typeof GLOBAL_OBJ & { [sym]?: RandomSafeContextRunner } = GLOBAL_OBJ;\n\n  if (sym in globalWithSymbol && typeof globalWithSymbol[sym] === 'function') {\n    RESOLVED_RUNNER = globalWithSymbol[sym];\n    return RESOLVED_RUNNER(cb);\n  }\n\n  RESOLVED_RUNNER = null;\n  return cb();\n}\n\n/**\n * Identical to Math.random() but wrapped in withRandomSafeContext\n * to ensure safe random number generation in certain contexts (e.g., Next.js Cache Components).\n */\nexport function safeMathRandom(): number {\n  return withRandomSafeContext(() => Math.random());\n}\n\n/**\n * Identical to Date.now() but wrapped in withRandomSafeContext\n * to ensure safe time value generation in certain contexts (e.g., Next.js Cache Components).\n */\nexport function safeDateNow(): number {\n  return withRandomSafeContext(() => Date.now());\n}\n", "import { addNonEnumerableProperty } from './object';\n\n/**\n * Internal symbols for normalization behavior. JSON and other structured user payloads cannot\n * carry these keys, so they cannot spoof SDK-only normalization hints.\n * We use Symbol.for to ensure that the symbols are the same across different modules/files.\n */\nconst SENTRY_SKIP_NORMALIZATION = Symbol.for('sentry.skipNormalization');\nconst SENTRY_OVERRIDE_NORMALIZATION_DEPTH = Symbol.for('sentry.overrideNormalizationDepth');\n\n/** Marks an object so `normalize` returns it unchanged (already-normalized SDK data). */\nexport function setSkipNormalizationHint(obj: object): void {\n  addNonEnumerableProperty(obj, SENTRY_SKIP_NORMALIZATION, true);\n}\n\n/** Overrides remaining normalization depth from this object downward (e.g. Redux / Pinia state). */\nexport function setNormalizationDepthOverrideHint(obj: object, depth: number): void {\n  addNonEnumerableProperty(obj, SENTRY_OVERRIDE_NORMALIZATION_DEPTH, depth);\n}\n\n/** @internal */\nexport function hasSkipNormalizationHint(value: object) {\n  return Boolean((value as Record<symbol, unknown>)[SENTRY_SKIP_NORMALIZATION]);\n}\n\n/** @internal */\nexport function getNormalizationDepthOverrideHint(value: object): number | undefined {\n  const v = (value as Record<symbol, unknown>)[SENTRY_OVERRIDE_NORMALIZATION_DEPTH];\n  return typeof v === 'number' ? v : undefined;\n}\n", "import type { Primitive } from '../types/misc';\nimport { getNormalizationDepthOverrideHint, hasSkipNormalizationHint } from './normalizationHints';\nimport { convertToPlainObject } from './object';\nimport { getFunctionName } from './stacktrace';\n\ntype Stringifier = (value: Exclude<unknown, string | number | boolean | null>) => string | undefined;\n\n// We store a custom stringifier in module scope, which is not bullet proof\n// however, we currently only really use this for browser-specific values, where this should work just fine, generally.\nlet stringifier: Stringifier | undefined;\n\n/**\n * Set a custom stringifier for the normalize function.\n * If this returns a non-empty string, it will be used instead of the default stringification.\n * Return undefined to fall back to the generic behavior.\n */\nexport function setNormalizeStringifier(newStringifier: Stringifier | undefined): void {\n  stringifier = newStringifier;\n}\n\ntype Prototype = { constructor?: (...args: unknown[]) => unknown };\n// This is a hack to placate TS, relying on the fact that technically, arrays are objects with integer keys. Normally we\n// think of those keys as actual numbers, but `arr['0']` turns out to work just as well as `arr[0]`, and doing it this\n// way lets us use a single type in the places where behave as if we are only dealing with objects, even if some of them\n// might be arrays.\ntype ObjOrArray<T> = { [key: string]: T };\n\ntype MemoFunc = [\n  // memoize\n  (obj: object) => boolean,\n  // unmemoize\n  (obj: object) => void,\n];\n\n/**\n * Recursively normalizes the given object.\n *\n * - Creates a copy to prevent original input mutation\n * - Skips non-enumerable properties\n * - When stringifying, calls `toJSON` if implemented\n * - Removes circular references\n * - Translates non-serializable values (`undefined`/`NaN`/functions) to serializable format\n * - Translates known global objects/classes to a string representations\n * - Takes care of `Error` object serialization\n * - Optionally limits depth of final output\n * - Optionally limits number of properties/elements included in any single object/array\n *\n * @param input The object to be normalized.\n * @param depth The max depth to which to normalize the object. (Anything deeper stringified whole.)\n * @param maxProperties The max number of elements or properties to be included in any single array or\n * object in the normalized output.\n * @returns A normalized version of the object, or `\"**non-serializable**\"` if any errors are thrown during normalization.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function normalize(input: unknown, depth: number = 100, maxProperties: number = +Infinity): any {\n  try {\n    // since we're at the outermost level, we don't provide a key\n    return visit('', input, depth, maxProperties);\n  } catch (err) {\n    return { ERROR: `**non-serializable** (${err})` };\n  }\n}\n\n/** JSDoc */\nexport function normalizeToSize<T>(\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  object: { [key: string]: any },\n  // Default Node.js REPL depth\n  depth: number = 3,\n  // 100kB, as 200kB is max payload size, so half sounds reasonable\n  maxSize: number = 100 * 1024,\n): T {\n  const normalized = normalize(object, depth);\n\n  if (jsonSize(normalized) > maxSize) {\n    return normalizeToSize(object, depth - 1, maxSize);\n  }\n\n  return normalized as T;\n}\n\n/**\n * Visits a node to perform normalization on it\n *\n * @param key The key corresponding to the given node\n * @param value The node to be visited\n * @param depth Optional number indicating the maximum recursion depth\n * @param maxProperties Optional maximum number of properties/elements included in any single object/array\n * @param memo Optional Memo class handling decycling\n */\nfunction visit(\n  key: string,\n  value: unknown,\n  depth: number = +Infinity,\n  maxProperties: number = +Infinity,\n  memo = memoBuilder(),\n): Primitive | ObjOrArray<unknown> {\n  const [memoize, unmemoize] = memo;\n\n  // Get the simple cases out of the way first\n  if (\n    value == null || // this matches null and undefined -> eqeq not eqeqeq\n    ['boolean', 'string'].includes(typeof value) ||\n    (typeof value === 'number' && Number.isFinite(value))\n  ) {\n    return value as Primitive;\n  }\n\n  const stringified = stringifyValue(key, value);\n\n  // Anything we could potentially dig into more (objects or arrays) will have come back as `\"[object XXXX]\"`.\n  // Everything else will have already been serialized, so if we don't see that pattern, we're done.\n  if (!stringified.startsWith('[object ')) {\n    return stringified;\n  }\n\n  // From here on, we can assert that `value` is either an object or an array.\n\n  // Do not normalize objects that we know have already been normalized. Hints use internal symbols\n  // (see normalizationHints.ts) so user-controlled JSON cannot spoof them.\n  if (hasSkipNormalizationHint(value)) {\n    return value as ObjOrArray<unknown>;\n  }\n\n  // Override remaining depth from this node (e.g. Redux / Pinia state). Set via setNormalizationDepthOverrideHint.\n  const overrideDepth = getNormalizationDepthOverrideHint(value);\n  const remainingDepth = overrideDepth !== undefined ? overrideDepth : depth;\n\n  // We're also done if we've reached the max depth\n  if (remainingDepth === 0) {\n    // At this point we know `serialized` is a string of the form `\"[object XXXX]\"`. Clean it up so it's just `\"[XXXX]\"`.\n    return stringified.replace('object ', '');\n  }\n\n  // If we've already visited this branch, bail out, as it's circular reference. If not, note that we're seeing it now.\n  if (memoize(value)) {\n    return '[Circular ~]';\n  }\n\n  // If the value has a `toJSON` method, we call it to extract more information\n  const valueWithToJSON = value as unknown & { toJSON?: () => unknown };\n  if (valueWithToJSON && typeof valueWithToJSON.toJSON === 'function') {\n    try {\n      const jsonValue = valueWithToJSON.toJSON();\n      // We need to normalize the return value of `.toJSON()` in case it has circular references\n      return visit('', jsonValue, remainingDepth - 1, maxProperties, memo);\n    } catch {\n      // pass (The built-in `toJSON` failed, but we can still try to do it ourselves)\n    }\n  }\n\n  // At this point we know we either have an object or an array, we haven't seen it before, and we're going to recurse\n  // because we haven't yet reached the max depth. Create an accumulator to hold the results of visiting each\n  // property/entry, and keep track of the number of items we add to it.\n  const normalized = (Array.isArray(value) ? [] : {}) as ObjOrArray<unknown>;\n  let numAdded = 0;\n\n  // Before we begin, convert`Error` and`Event` instances into plain objects, since some of each of their relevant\n  // properties are non-enumerable and otherwise would get missed.\n  const visitable = convertToPlainObject(value as ObjOrArray<unknown>);\n\n  for (const visitKey in visitable) {\n    // Avoid iterating over fields in the prototype if they've somehow been exposed to enumeration.\n    if (!Object.prototype.hasOwnProperty.call(visitable, visitKey)) {\n      continue;\n    }\n\n    if (numAdded >= maxProperties) {\n      normalized[visitKey] = '[MaxProperties ~]';\n      break;\n    }\n\n    // Recursively visit all the child nodes\n    const visitValue = visitable[visitKey];\n    normalized[visitKey] = visit(visitKey, visitValue, remainingDepth - 1, maxProperties, memo);\n\n    numAdded++;\n  }\n\n  // Once we've visited all the branches, remove the parent from memo storage\n  unmemoize(value);\n\n  // Return accumulated values\n  return normalized;\n}\n\n/* eslint-disable complexity */\n/**\n * Stringify the given value. Handles various known special values and types.\n *\n * Not meant to be used on simple primitives which already have a string representation, as it will, for example, turn\n * the number 1231 into \"[Object Number]\", nor on `null`, as it will throw.\n *\n * @param value The value to stringify\n * @returns A stringified representation of the given value\n */\nexport function stringifyValue(\n  key: unknown,\n  // this type is a tiny bit of a cheat, since this function does handle NaN (which is technically a number), but for\n  // our internal use, it'll do\n  value: Exclude<unknown, string | number | boolean | null>,\n): string {\n  try {\n    // Runtime-specific stringifications (browser, framework integrations) are registered on the\n    // async-context strategy. Consult them before the universal fallbacks below.\n    if (stringifier) {\n      const stringified = stringifier(value);\n      // Safe to ignore empty strings here as well, we wont stringify to this\n      if (stringified) {\n        return stringified;\n      }\n    }\n\n    if (typeof global !== 'undefined' && value === global) {\n      return '[Global]';\n    }\n\n    if (typeof value === 'number' && !Number.isFinite(value)) {\n      return `[${value}]`;\n    }\n\n    if (typeof value === 'function') {\n      return `[Function: ${getFunctionName(value)}]`;\n    }\n\n    if (typeof value === 'symbol') {\n      return `[${String(value)}]`;\n    }\n\n    // stringified BigInts are indistinguishable from regular numbers, so we need to label them to avoid confusion\n    if (typeof value === 'bigint') {\n      return `[BigInt: ${String(value)}]`;\n    }\n\n    // Now that we've knocked out all the special cases and the primitives, all we have left are objects. Simply casting\n    // them to strings means that instances of classes which haven't defined their `toStringTag` will just come out as\n    // `\"[object Object]\"`. If we instead look at the constructor's name (which is the same as the name of the class),\n    // we can make sure that only plain objects come out that way.\n    const objName = getConstructorName(value);\n\n    return `[object ${objName}]`;\n  } catch (err) {\n    return `**non-serializable** (${err})`;\n  }\n}\n/* eslint-enable complexity */\n\nfunction getConstructorName(value: unknown): string {\n  const prototype: Prototype | null = Object.getPrototypeOf(value);\n\n  return prototype?.constructor ? prototype.constructor.name : 'null prototype';\n}\n\n/** Calculates bytes size of input string */\nfunction utf8Length(value: string): number {\n  // eslint-disable-next-line no-bitwise\n  return ~-encodeURI(value).split(/%..|./).length;\n}\n\n/** Calculates bytes size of input object */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction jsonSize(value: any): number {\n  return utf8Length(JSON.stringify(value));\n}\n\n/**\n * Normalizes URLs in exceptions and stacktraces to a base path so Sentry can fingerprint\n * across platforms and working directory.\n *\n * @param url The URL to be normalized.\n * @param basePath The application base path.\n * @returns The normalized URL.\n */\nexport function normalizeUrlToBase(url: string, basePath: string): string {\n  const escapedBase = basePath\n    // Backslash to forward\n    .replace(/\\\\/g, '/')\n    // Escape RegExp special characters\n    .replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&');\n\n  let newUrl = url;\n  try {\n    newUrl = decodeURI(url);\n  } catch {\n    // Sometime this breaks\n  }\n  return (\n    newUrl\n      .replace(/\\\\/g, '/')\n      .replace(/webpack:\\/?/g, '') // Remove intermediate base path\n      // oxlint-disable-next-line sdk/no-regexp-constructor\n      .replace(new RegExp(`(file://)?/*${escapedBase}/*`, 'ig'), 'app:///')\n  );\n}\n\n/**\n * Helper to decycle json objects\n */\nfunction memoBuilder(): MemoFunc {\n  const inner = new WeakSet<object>();\n  function memoize(obj: object): boolean {\n    if (inner.has(obj)) {\n      return true;\n    }\n    inner.add(obj);\n    return false;\n  }\n\n  function unmemoize(obj: object): void {\n    inner.delete(obj);\n  }\n  return [memoize, unmemoize];\n}\n", "import { isPrimitive, isRegExp, isString } from './is';\nimport { stringifyValue } from './normalize';\n\nexport { escapeStringForRegex } from '../vendor/escapeStringForRegex';\n\n/**\n * Coerce a value to a string without ever throwing. Strings pass through unchanged (so an\n * already-serialized value isn't double-encoded and a plain string isn't wrapped in quotes);\n * anything else is `JSON.stringify`-ed, falling back to `fallback` if that throws (e.g. on\n * circular references or `BigInt`). Returns `undefined` for values `JSON.stringify` itself drops\n * (top-level `undefined`, functions, symbols), matching `JSON.stringify`'s own runtime behavior.\n *\n * @param value the value to stringify\n * @param fallback returned when serialization throws, or, if a function, called with `value` to\n *   produce the fallback. Defaults to `'[unserializable]'`.\n */\nexport function stringify(\n  value: unknown,\n  fallback: string | ((value: unknown) => string) = '[unserializable]',\n): string | undefined {\n  if (typeof value === 'string') {\n    return value;\n  }\n  try {\n    return JSON.stringify(value);\n  } catch {\n    return typeof fallback === 'function' ? fallback(value) : fallback;\n  }\n}\n\n/**\n * Truncates given string to the maximum characters count\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string (0 = unlimited)\n * @returns string Encoded\n */\nexport function truncate(str: string, max: number = 0): string {\n  if (typeof str !== 'string' || max === 0) {\n    return str;\n  }\n  return str.length <= max ? str : `${str.slice(0, max)}...`;\n}\n\n/**\n * This is basically just `trim_line` from\n * https://github.com/getsentry/sentry/blob/master/src/sentry/lang/javascript/processor.py#L67\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string\n * @returns string Encoded\n */\nexport function snipLine(line: string, colno: number): string {\n  let newLine = line;\n  const lineLength = newLine.length;\n  if (lineLength <= 150) {\n    return newLine;\n  }\n  if (colno > lineLength) {\n    // eslint-disable-next-line no-param-reassign\n    colno = lineLength;\n  }\n\n  let start = Math.max(colno - 60, 0);\n  if (start < 5) {\n    start = 0;\n  }\n\n  let end = Math.min(start + 140, lineLength);\n  if (end > lineLength - 5) {\n    end = lineLength;\n  }\n  if (end === lineLength) {\n    start = Math.max(end - 140, 0);\n  }\n\n  newLine = newLine.slice(start, end);\n  if (start > 0) {\n    newLine = `'{snip} ${newLine}`;\n  }\n  if (end < lineLength) {\n    newLine += ' {snip}';\n  }\n\n  return newLine;\n}\n\n/**\n * Join values in array\n * @param input array of values to be joined together\n * @param delimiter string to be placed in-between values\n * @returns Joined values\n */\nexport function safeJoin(input: unknown[], delimiter?: string): string {\n  if (!Array.isArray(input)) {\n    return '';\n  }\n\n  const output = [];\n  // eslint-disable-next-line typescript/prefer-for-of\n  for (let i = 0; i < input.length; i++) {\n    const value = input[i];\n    if (isPrimitive(value)) {\n      output.push(String(value));\n    } else if (value instanceof Error) {\n      // While stringifyValue does not special-case errors, because we later handle them specifically based on the [object XXX] fallback,\n      // in this method we want to render them more nicely\n      output.push(value.message ? `${value.name}: ${value.message}` : value.name);\n    } else {\n      output.push(stringifyValue(undefined, value));\n    }\n  }\n\n  return output.join(delimiter);\n}\n\n/**\n * Checks if the given value matches a regex or string\n *\n * @param value The string to test\n * @param pattern Either a regex or a string against which `value` will be matched\n * @param requireExactStringMatch If true, `value` must match `pattern` exactly. If false, `value` will match\n * `pattern` if it contains `pattern`. Only applies to string-type patterns.\n */\nexport function isMatchingPattern(\n  value: string,\n  pattern: RegExp | string | ((value: string) => boolean),\n  requireExactStringMatch: boolean = false,\n): boolean {\n  if (!isString(value)) {\n    return false;\n  }\n\n  if (isRegExp(pattern)) {\n    return pattern.test(value);\n  }\n  if (isString(pattern)) {\n    return requireExactStringMatch ? value === pattern : value.includes(pattern);\n  }\n  if (typeof pattern === 'function') {\n    return pattern(value);\n  }\n\n  return false;\n}\n\n/**\n * Test the given string against an array of strings and regexes. By default, string matching is done on a\n * substring-inclusion basis rather than a strict equality basis\n *\n * @param testString The string to test\n * @param patterns The patterns against which to test the string\n * @param requireExactStringMatch If true, `testString` must match one of the given string patterns exactly in order to\n * count. If false, `testString` will match a string pattern if it contains that pattern.\n * @returns\n */\nexport function stringMatchesSomePattern(\n  testString: string,\n  patterns:\n    | Array<string | RegExp | ((value: string) => boolean)>\n    | Set<string | RegExp | ((value: string) => boolean)> = [],\n  requireExactStringMatch: boolean = false,\n): boolean {\n  for (const pattern of patterns) {\n    if (isMatchingPattern(testString, pattern, requireExactStringMatch)) {\n      return true;\n    }\n  }\n  return false;\n}\n", "import type { Event } from '../types/event';\nimport type { Exception } from '../types/exception';\nimport type { Mechanism } from '../types/mechanism';\nimport type { StackFrame } from '../types/stackframe';\nimport { addNonEnumerableProperty } from './object';\nimport { safeMathRandom, withRandomSafeContext } from './randomSafeContext';\nimport { snipLine } from './string';\nimport { GLOBAL_OBJ } from './worldwide';\n\ninterface CryptoInternal {\n  randomUUID?(): string;\n}\n\n/** An interface for common properties on global */\ninterface CryptoGlobal {\n  msCrypto?: CryptoInternal;\n  crypto?: CryptoInternal;\n}\n\nfunction getCrypto(): CryptoInternal | undefined {\n  const gbl = GLOBAL_OBJ as typeof GLOBAL_OBJ & CryptoGlobal;\n  return gbl.crypto || gbl.msCrypto;\n}\n\nlet emptyUuid: string | undefined;\n\nfunction getRandomByte(): number {\n  return safeMathRandom() * 16;\n}\n\n/**\n * UUID4 generator\n * @param crypto Object that provides the crypto API.\n * @returns string Generated UUID4.\n */\nexport function uuid4(crypto = getCrypto()): string {\n  try {\n    if (crypto?.randomUUID) {\n      // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n      return withRandomSafeContext(() => crypto.randomUUID!()).replace(/-/g, '');\n    }\n  } catch {\n    // some runtimes can crash invoking crypto\n    // https://github.com/getsentry/sentry-javascript/issues/8935\n  }\n\n  if (!emptyUuid) {\n    // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523\n    // Concatenating the following numbers as strings results in '10000000100040008000100000000000'\n    emptyUuid = ([1e7] as unknown as string) + 1e3 + 4e3 + 8e3 + 1e11;\n  }\n\n  return emptyUuid.replace(/[018]/g, c =>\n    // eslint-disable-next-line no-bitwise\n    ((c as unknown as number) ^ ((getRandomByte() & 15) >> ((c as unknown as number) / 4))).toString(16),\n  );\n}\n\nfunction getFirstException(event: Event): Exception | undefined {\n  return event.exception?.values?.[0];\n}\n\n/**\n * Extracts either message or type+value from an event that can be used for user-facing logs\n * @returns event's description\n */\nexport function getEventDescription(event: Event): string {\n  const { message, event_id: eventId } = event;\n  if (message) {\n    return message;\n  }\n\n  const firstException = getFirstException(event);\n  if (firstException) {\n    if (firstException.type && firstException.value) {\n      return `${firstException.type}: ${firstException.value}`;\n    }\n    return firstException.type || firstException.value || eventId || '<unknown>';\n  }\n  return eventId || '<unknown>';\n}\n\n/**\n * Adds exception values, type and value to an synthetic Exception.\n * @param event The event to modify.\n * @param value Value of the exception.\n * @param type Type of the exception.\n * @hidden\n */\nexport function addExceptionTypeValue(event: Event, value?: string, type?: string): void {\n  const exception = (event.exception = event.exception || {});\n  const values = (exception.values = exception.values || []);\n  const firstException = (values[0] = values[0] || {});\n  if (!firstException.value) {\n    firstException.value = value || '';\n  }\n  if (!firstException.type) {\n    firstException.type = type || 'Error';\n  }\n}\n\n/**\n * Adds exception mechanism data to a given event. Uses defaults if the second parameter is not passed.\n *\n * @param event The event to modify.\n * @param newMechanism Mechanism data to add to the event.\n * @hidden\n */\nexport function addExceptionMechanism(event: Event, newMechanism?: Partial<Mechanism>): void {\n  const firstException = getFirstException(event);\n  if (!firstException) {\n    return;\n  }\n\n  const defaultMechanism = { type: 'generic', handled: true };\n  const currentMechanism = firstException.mechanism;\n  firstException.mechanism = { ...defaultMechanism, ...currentMechanism, ...newMechanism };\n\n  if (newMechanism && 'data' in newMechanism) {\n    const mergedData = { ...currentMechanism?.data, ...newMechanism.data };\n    firstException.mechanism.data = mergedData;\n  }\n}\n\n// https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\nconst SEMVER_REGEXP =\n  /^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$/;\n\n/**\n * Represents Semantic Versioning object\n */\ninterface SemVer {\n  major?: number;\n  minor?: number;\n  patch?: number;\n  prerelease?: string;\n  buildmetadata?: string;\n}\n\nfunction _parseInt(input: string | undefined): number {\n  return parseInt(input || '', 10);\n}\n\n/**\n * Parses input into a SemVer interface\n * @param input string representation of a semver version\n */\nexport function parseSemver(input: string): SemVer {\n  const match = input.match(SEMVER_REGEXP) || [];\n  const major = _parseInt(match[1]);\n  const minor = _parseInt(match[2]);\n  const patch = _parseInt(match[3]);\n  return {\n    buildmetadata: match[5],\n    major: isNaN(major) ? undefined : major,\n    minor: isNaN(minor) ? undefined : minor,\n    patch: isNaN(patch) ? undefined : patch,\n    prerelease: match[4],\n  };\n}\n\n/**\n * This function adds context (pre/post/line) lines to the provided frame\n *\n * @param lines string[] containing all lines\n * @param frame StackFrame that will be mutated\n * @param linesOfContext number of context lines we want to add pre/post\n */\nexport function addContextToFrame(lines: string[], frame: StackFrame, linesOfContext: number = 5): void {\n  // When there is no line number in the frame, attaching context is nonsensical and will even break grouping\n  if (frame.lineno === undefined) {\n    return;\n  }\n\n  const maxLines = lines.length;\n  const sourceLine = Math.max(Math.min(maxLines - 1, frame.lineno - 1), 0);\n\n  frame.pre_context = lines\n    .slice(Math.max(0, sourceLine - linesOfContext), sourceLine)\n    .map((line: string) => snipLine(line, 0));\n\n  // We guard here to ensure this is not larger than the existing number of lines\n  const lineIndex = Math.min(maxLines - 1, sourceLine);\n\n  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n  frame.context_line = snipLine(lines[lineIndex]!, frame.colno || 0);\n\n  frame.post_context = lines\n    .slice(Math.min(sourceLine + 1, maxLines), sourceLine + 1 + linesOfContext)\n    .map((line: string) => snipLine(line, 0));\n}\n\n/**\n * Checks whether or not we've already captured the given exception (note: not an identical exception - the very object\n * in question), and marks it captured if not.\n *\n * This is useful because it's possible for an error to get captured by more than one mechanism. After we intercept and\n * record an error, we rethrow it (assuming we've intercepted it before it's reached the top-level global handlers), so\n * that we don't interfere with whatever effects the error might have had were the SDK not there. At that point, because\n * the error has been rethrown, it's possible for it to bubble up to some other code we've instrumented. If it's not\n * caught after that, it will bubble all the way up to the global handlers (which of course we also instrument). This\n * function helps us ensure that even if we encounter the same error more than once, we only record it the first time we\n * see it.\n *\n * Note: It will ignore primitives (always return `false` and not mark them as seen), as properties can't be set on\n * them. {@link: Object.objectify} can be used on exceptions to convert any that are primitives into their equivalent\n * object wrapper forms so that this check will always work. However, because we need to flag the exact object which\n * will get rethrown, and because that rethrowing happens outside of the event processing pipeline, the objectification\n * must be done before the exception captured.\n *\n * @param A thrown exception to check or flag as having been seen\n * @returns `true` if the exception has already been captured, `false` if not (with the side effect of marking it seen)\n */\nexport function checkOrSetAlreadyCaught(exception: unknown): boolean {\n  if (isAlreadyCaptured(exception)) {\n    return true;\n  }\n\n  try {\n    // set it this way rather than by assignment so that it's not ennumerable and therefore isn't recorded by the\n    // `ExtraErrorData` integration\n    addNonEnumerableProperty(exception as { [key: string]: unknown }, '__sentry_captured__', true);\n  } catch {\n    // `exception` is a primitive, so we can't mark it seen\n  }\n\n  return false;\n}\n\n/**\n * Checks whether we've already captured the given exception (note: not an identical exception - the very object).\n * It is considered already captured if it has the `__sentry_captured__` property set to `true`.\n *\n * @internal Only considered for internal usage\n */\nexport function isAlreadyCaptured(exception: unknown): boolean | void {\n  try {\n    return (exception as { __sentry_captured__?: boolean }).__sentry_captured__;\n  } catch {} // eslint-disable-line no-empty\n}\n", "import { safeDateNow, withRandomSafeContext } from './randomSafeContext';\nimport { GLOBAL_OBJ } from './worldwide';\n\nconst ONE_SECOND_IN_MS = 1000;\n\n/**\n * A partial definition of the [Performance Web API]{@link https://developer.mozilla.org/en-US/docs/Web/API/Performance}\n * for accessing a high-resolution monotonic clock.\n */\ninterface Performance {\n  /**\n   * The millisecond timestamp at which measurement began, measured in Unix time.\n   */\n  timeOrigin: number;\n  /**\n   * Returns the current millisecond timestamp, where 0 represents the start of measurement.\n   */\n  now(): number;\n}\n\n/**\n * Returns a timestamp in seconds since the UNIX epoch using the Date API.\n */\nexport function dateTimestampInSeconds(): number {\n  return safeDateNow() / ONE_SECOND_IN_MS;\n}\n\n/**\n * Returns a wrapper around the native Performance API browser implementation, or undefined for browsers that do not\n * support the API.\n *\n * Wrapping the native API works around differences in behavior from different browsers.\n */\nfunction createUnixTimestampInSecondsFunc(): () => number {\n  const { performance } = GLOBAL_OBJ as typeof GLOBAL_OBJ & { performance?: Performance };\n  // Some browser and environments don't have a performance or timeOrigin, so we fallback to\n  // using Date.now() to compute the starting time.\n  if (!performance?.now || !performance.timeOrigin) {\n    return dateTimestampInSeconds;\n  }\n\n  const timeOrigin = performance.timeOrigin;\n\n  // performance.now() is a monotonic clock, which means it starts at 0 when the process begins. To get the current\n  // wall clock time (actual UNIX timestamp), we need to add the starting time origin and the current time elapsed.\n  //\n  // TODO: This does not account for the case where the monotonic clock that powers performance.now() drifts from the\n  // wall clock time, which causes the returned timestamp to be inaccurate. We should investigate how to detect and\n  // correct for this.\n  // See: https://github.com/getsentry/sentry-javascript/issues/2590\n  // See: https://github.com/mdn/content/issues/4713\n  // See: https://dev.to/noamr/when-a-millisecond-is-not-a-millisecond-3h6\n  return () => {\n    return (timeOrigin + withRandomSafeContext(() => performance.now())) / ONE_SECOND_IN_MS;\n  };\n}\n\nlet _cachedTimestampInSeconds: (() => number) | undefined;\n\n/**\n * Returns a timestamp in seconds since the UNIX epoch using either the Performance or Date APIs, depending on the\n * availability of the Performance API.\n *\n * BUG: Note that because of how browsers implement the Performance API, the clock might stop when the computer is\n * asleep. This creates a skew between `dateTimestampInSeconds` and `timestampInSeconds`. The\n * skew can grow to arbitrary amounts like days, weeks or months.\n * See https://github.com/getsentry/sentry-javascript/issues/2590.\n */\nexport function timestampInSeconds(): number {\n  // We store this in a closure so that we don't have to create a new function every time this is called.\n  const func = _cachedTimestampInSeconds ?? (_cachedTimestampInSeconds = createUnixTimestampInSecondsFunc());\n  return func();\n}\n\n/**\n * Cached result of getBrowserTimeOrigin.\n */\nlet cachedTimeOrigin: number | null | undefined = null;\n\n/**\n * Gets the time origin and the mode used to determine it.\n *\n * Unfortunately browsers may report an inaccurate time origin data, through either performance.timeOrigin or\n * performance.timing.navigationStart, which results in poor results in performance data. We only treat time origin\n * data as reliable if they are within a reasonable threshold of the current time.\n *\n * TODO: move to `@sentry/browser-utils` package.\n */\nfunction getBrowserTimeOrigin(): number | undefined {\n  const { performance } = GLOBAL_OBJ as typeof GLOBAL_OBJ & Window;\n  if (!performance?.now) {\n    return undefined;\n  }\n\n  const threshold = 300_000; // 5 minutes in milliseconds\n  const performanceNow = withRandomSafeContext(() => performance.now());\n  const dateNow = safeDateNow();\n\n  const timeOrigin = performance.timeOrigin;\n  if (typeof timeOrigin === 'number') {\n    const timeOriginDelta = Math.abs(timeOrigin + performanceNow - dateNow);\n    if (timeOriginDelta < threshold) {\n      return timeOrigin;\n    }\n  }\n\n  // TODO: Remove all code related to `performance.timing.navigationStart` once we drop support for Safari 14.\n  // `performance.timeSince` is available in Safari 15.\n  // see: https://caniuse.com/mdn-api_performance_timeorigin\n\n  // While performance.timing.navigationStart is deprecated in favor of performance.timeOrigin, performance.timeOrigin\n  // is not as widely supported. Namely, performance.timeOrigin is undefined in Safari as of writing.\n  // Also as of writing, performance.timing is not available in Web Workers in mainstream browsers, so it is not always\n  // a valid fallback. In the absence of an initial time provided by the browser, fallback to the current time from the\n  // Date API.\n  // eslint-disable-next-line typescript/no-deprecated\n  const navigationStart = performance.timing?.navigationStart;\n  if (typeof navigationStart === 'number') {\n    const navigationStartDelta = Math.abs(navigationStart + performanceNow - dateNow);\n    if (navigationStartDelta < threshold) {\n      return navigationStart;\n    }\n  }\n\n  // Either both timeOrigin and navigationStart are skewed or neither is available, fallback to subtracting\n  // `performance.now()` from `Date.now()`.\n  return dateNow - performanceNow;\n}\n\n/**\n * The number of milliseconds since the UNIX epoch. This value is only usable in a browser, and only when the\n * performance API is available.\n */\nexport function browserPerformanceTimeOrigin(): number | undefined {\n  if (cachedTimeOrigin === null) {\n    cachedTimeOrigin = getBrowserTimeOrigin();\n  }\n\n  return cachedTimeOrigin;\n}\n", "import type { SerializedSession, Session, SessionContext, SessionStatus } from './types/session';\nimport { uuid4 } from './utils/misc';\nimport { timestampInSeconds } from './utils/time';\n\n/**\n * Creates a new `Session` object by setting certain default parameters. If optional @param context\n * is passed, the passed properties are applied to the session object.\n *\n * @param context (optional) additional properties to be applied to the returned session object\n *\n * @returns a new `Session` object\n */\nexport function makeSession(context?: Omit<SessionContext, 'started' | 'status'>): Session {\n  // Both timestamp and started are in seconds since the UNIX epoch.\n  const startingTime = timestampInSeconds();\n\n  const session: Session = {\n    sid: uuid4(),\n    init: true,\n    timestamp: startingTime,\n    started: startingTime,\n    duration: 0,\n    status: 'ok',\n    errors: 0,\n    ignoreDuration: false,\n    toJSON: () => sessionToJSON(session),\n  };\n\n  if (context) {\n    updateSession(session, context);\n  }\n\n  return session;\n}\n\n/**\n * Updates a session object with the properties passed in the context.\n *\n * Note that this function mutates the passed object and returns void.\n * (Had to do this instead of returning a new and updated session because closing and sending a session\n * makes an update to the session after it was passed to the sending logic.\n * @see Client.captureSession )\n *\n * @param session the `Session` to update\n * @param context the `SessionContext` holding the properties that should be updated in @param session\n */\n// eslint-disable-next-line complexity\nexport function updateSession(session: Session, context: SessionContext = {}): void {\n  if (context.user) {\n    if (!session.ipAddress && context.user.ip_address) {\n      session.ipAddress = context.user.ip_address;\n    }\n\n    if (!session.did && !context.did) {\n      session.did = context.user.id || context.user.email || context.user.username;\n    }\n  }\n\n  session.timestamp = context.timestamp || timestampInSeconds();\n\n  if (context.abnormal_mechanism) {\n    session.abnormal_mechanism = context.abnormal_mechanism;\n  }\n\n  if (context.ignoreDuration) {\n    session.ignoreDuration = context.ignoreDuration;\n  }\n  if (context.sid) {\n    // Good enough uuid validation. — Kamil\n    session.sid = context.sid.length === 32 ? context.sid : uuid4();\n  }\n  if (context.init !== undefined) {\n    session.init = context.init;\n  }\n  if (!session.did && context.did) {\n    session.did = `${context.did}`;\n  }\n  if (typeof context.started === 'number') {\n    session.started = context.started;\n  }\n  if (session.ignoreDuration) {\n    session.duration = undefined;\n  } else if (typeof context.duration === 'number') {\n    session.duration = context.duration;\n  } else {\n    const duration = session.timestamp - session.started;\n    session.duration = duration >= 0 ? duration : 0;\n  }\n  if (context.release) {\n    session.release = context.release;\n  }\n  if (context.environment) {\n    session.environment = context.environment;\n  }\n  if (!session.ipAddress && context.ipAddress) {\n    session.ipAddress = context.ipAddress;\n  }\n  if (!session.userAgent && context.userAgent) {\n    session.userAgent = context.userAgent;\n  }\n  if (typeof context.errors === 'number') {\n    session.errors = context.errors;\n  }\n  if (context.status) {\n    session.status = context.status;\n  }\n}\n\n/**\n * Closes a session by setting its status and updating the session object with it.\n * Internally calls `updateSession` to update the passed session object.\n *\n * Note that this function mutates the passed session (@see updateSession for explanation).\n *\n * @param session the `Session` object to be closed\n * @param status the `SessionStatus` with which the session was closed. If you don't pass a status,\n *               this function will keep the previously set status, unless it was `'ok'` in which case\n *               it is changed to `'exited'`.\n */\nexport function closeSession(session: Session, status?: Exclude<SessionStatus, 'ok'>): void {\n  let context = {};\n  if (status) {\n    context = { status };\n  } else if (session.status === 'ok') {\n    context = { status: 'exited' };\n  }\n\n  updateSession(session, context);\n}\n\n/**\n * Serializes a passed session object to a JSON object with a slightly different structure.\n * This is necessary because the Sentry backend requires a slightly different schema of a session\n * than the one the JS SDKs use internally.\n *\n * @param session the session to be converted\n *\n * @returns a JSON object of the passed session\n */\nfunction sessionToJSON(session: Session): SerializedSession {\n  return {\n    sid: `${session.sid}`,\n    init: session.init,\n    // Make sure that sec is converted to ms for date constructor\n    started: new Date(session.started * 1000).toISOString(),\n    timestamp: new Date(session.timestamp * 1000).toISOString(),\n    status: session.status,\n    errors: session.errors,\n    did: typeof session.did === 'number' || typeof session.did === 'string' ? `${session.did}` : undefined,\n    duration: session.duration,\n    abnormal_mechanism: session.abnormal_mechanism,\n    attrs: {\n      release: session.release,\n      environment: session.environment,\n      ip_address: session.ipAddress,\n      user_agent: session.userAgent,\n    },\n  };\n}\n", "/**\n * Shallow merge two objects.\n * Does not mutate the passed in objects.\n * Undefined/empty values in the merge object will overwrite existing values.\n *\n * By default, this merges 2 levels deep.\n */\nexport function merge<T>(initialObj: T, mergeObj: T, levels = 2): T {\n  // If the merge value is not an object, or we have no merge levels left,\n  // we just set the value to the merge value\n  if (!mergeObj || typeof mergeObj !== 'object' || levels <= 0) {\n    return mergeObj;\n  }\n\n  // If the merge object is an empty object, and the initial object is not undefined, we return the initial object\n  if (initialObj && Object.keys(mergeObj).length === 0) {\n    return initialObj;\n  }\n\n  // Clone object\n  const output = { ...initialObj };\n\n  // Merge values into output, resursively\n  for (const key in mergeObj) {\n    if (Object.prototype.hasOwnProperty.call(mergeObj, key)) {\n      output[key] = merge(output[key], mergeObj[key], levels - 1);\n    }\n  }\n\n  return output;\n}\n", "import { uuid4 } from './misc';\n\n/**\n * Generate a random, valid trace ID.\n */\nexport function generateTraceId(): string {\n  return uuid4();\n}\n\n/**\n * Generate a random, valid span ID.\n */\nexport function generateSpanId(): string {\n  return uuid4().substring(16);\n}\n", "import { GLOBAL_OBJ } from './worldwide';\n\n/**\n * Interface representing a weak reference to an object.\n * This matches the standard WeakRef interface but is defined here\n * because WeakRef is not available in ES2020 type definitions.\n */\ninterface WeakRefLike<T extends object> {\n  deref(): T | undefined;\n}\n\n/**\n * A wrapper type that represents either a WeakRef-like object or a direct reference.\n * Used for optional weak referencing in environments where WeakRef may not be available.\n */\nexport type MaybeWeakRef<T extends object> = WeakRefLike<T> | T;\n\n/**\n * Creates a weak reference to an object if WeakRef is available,\n * otherwise returns the object directly.\n *\n * This is useful for breaking circular references while maintaining\n * compatibility with environments that don't support WeakRef (e.g., older browsers).\n *\n * @param value - The object to create a weak reference to\n * @returns A WeakRef wrapper if available, or the original object as fallback\n */\nexport function makeWeakRef<T extends object>(value: T): MaybeWeakRef<T> {\n  try {\n    // @ts-expect-error - WeakRef may not be in the type definitions for older TS targets\n    const WeakRefImpl = GLOBAL_OBJ.WeakRef;\n    if (typeof WeakRefImpl === 'function') {\n      return new WeakRefImpl(value);\n    }\n  } catch {\n    // WeakRef not available or construction failed\n  }\n  return value;\n}\n\n/**\n * Resolves a potentially weak reference, returning the underlying object\n * or undefined if the reference has been garbage collected.\n *\n * @param ref - A MaybeWeakRef or undefined\n * @returns The referenced object, or undefined if GC'd or ref was undefined\n */\nexport function derefWeakRef<T extends object>(ref: MaybeWeakRef<T> | undefined): T | undefined {\n  if (!ref) {\n    return undefined;\n  }\n\n  // Check if this is a WeakRef (has deref method)\n  if (typeof ref === 'object' && 'deref' in ref && typeof ref.deref === 'function') {\n    try {\n      return ref.deref();\n    } catch {\n      // deref() failed - treat as GC'd\n      return undefined;\n    }\n  }\n\n  // Direct reference fallback\n  return ref as T;\n}\n", "import type { Scope } from '../scope';\nimport type { Span } from '../types/span';\nimport { addNonEnumerableProperty } from '../utils/object';\nimport { derefWeakRef, makeWeakRef, type MaybeWeakRef } from './weakRef';\n\nconst SCOPE_SPAN_FIELD = '_sentrySpan';\n\ntype ScopeWithMaybeSpan = Scope & {\n  [SCOPE_SPAN_FIELD]?: MaybeWeakRef<Span>;\n};\n\n/**\n * Set the active span for a given scope.\n * NOTE: This should NOT be used directly, but is only used internally by the trace methods.\n */\nexport function _setSpanForScope(scope: Scope, span: Span | undefined): void {\n  if (span) {\n    // Use WeakRef to avoid circular reference with span holding scope\n    addNonEnumerableProperty(scope as ScopeWithMaybeSpan, SCOPE_SPAN_FIELD, makeWeakRef(span));\n  } else {\n    // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n    delete (scope as ScopeWithMaybeSpan)[SCOPE_SPAN_FIELD];\n  }\n}\n\n/**\n * Get the active span for a given scope.\n * NOTE: This should NOT be used directly, but is only used internally by the trace methods.\n */\nexport function _getSpanForScope(scope: ScopeWithMaybeSpan): Span | undefined {\n  return derefWeakRef(scope[SCOPE_SPAN_FIELD]);\n}\n", "/* eslint-disable max-lines */\nimport type { AttributeObject, RawAttribute, RawAttributes } from './attributes';\nimport type { Client } from './client';\nimport { DEBUG_BUILD } from './debug-build';\nimport { updateSession } from './session';\nimport type { Attachment } from './types/attachment';\nimport type { Breadcrumb } from './types/breadcrumb';\nimport type { Context, Contexts } from './types/context';\nimport type { DynamicSamplingContext } from './types/envelope';\nimport type { Event, EventHint } from './types/event';\nimport type { EventProcessor } from './types/eventprocessor';\nimport type { Extra, Extras } from './types/extra';\nimport type { Primitive } from './types/misc';\nimport type { RequestEventData } from './types/request';\nimport type { Session } from './types/session';\nimport type { SeverityLevel } from './types/severity';\nimport type { Span } from './types/span';\nimport type { PropagationContext } from './types/tracing';\nimport type { User } from './types/user';\nimport { debug } from './utils/debug-logger';\nimport { isPlainObject } from './utils/is';\nimport { merge } from './utils/merge';\nimport { uuid4 } from './utils/misc';\nimport { generateTraceId } from './utils/propagationContext';\nimport { safeMathRandom } from './utils/randomSafeContext';\nimport { _getSpanForScope, _setSpanForScope } from './utils/spanOnScope';\nimport { truncate } from './utils/string';\nimport { dateTimestampInSeconds } from './utils/time';\n\n/**\n * Default value for maximum number of breadcrumbs added to an event.\n */\nconst DEFAULT_MAX_BREADCRUMBS = 100;\n\n/**\n * A context to be used for capturing an event.\n * This can either be a Scope, or a partial ScopeContext,\n * or a callback that receives the current scope and returns a new scope to use.\n */\nexport type CaptureContext = Scope | Partial<ScopeContext> | ((scope: Scope) => Scope);\n\n/**\n * Data that can be converted to a Scope.\n */\nexport interface ScopeContext {\n  user: User;\n  level: SeverityLevel;\n  extra: Extras;\n  contexts: Contexts;\n  tags: { [key: string]: Primitive };\n  attributes?: RawAttributes<Record<string, unknown>>;\n  fingerprint: string[];\n  propagationContext: PropagationContext;\n  conversationId?: string;\n}\n\nexport interface SdkProcessingMetadata {\n  [key: string]: unknown;\n  requestSession?: {\n    status: 'ok' | 'errored' | 'crashed';\n  };\n  normalizedRequest?: RequestEventData;\n  dynamicSamplingContext?: Partial<DynamicSamplingContext>;\n  capturedSpanScope?: Scope;\n  capturedSpanIsolationScope?: Scope;\n  spanCountBeforeProcessing?: number;\n  ipAddress?: string;\n}\n\n/**\n * Normalized data of the Scope, ready to be used.\n */\nexport interface ScopeData {\n  eventProcessors: EventProcessor[];\n  breadcrumbs: Breadcrumb[];\n  user: User;\n  tags: { [key: string]: Primitive };\n  // TODO(v11): Make this a required field (could be subtly breaking if we did it today)\n  attributes?: RawAttributes<Record<string, unknown>>;\n  extra: Extras;\n  contexts: Contexts;\n  attachments: Attachment[];\n  propagationContext: PropagationContext;\n  sdkProcessingMetadata: SdkProcessingMetadata;\n  fingerprint: string[];\n  level?: SeverityLevel;\n  transactionName?: string;\n  span?: Span;\n  conversationId?: string;\n}\n\n/**\n * Holds additional event information.\n */\nexport class Scope {\n  /** Flag if notifying is happening. */\n  protected _notifyingListeners: boolean;\n\n  /** Callback for client to receive scope changes. */\n  protected _scopeListeners: Array<(scope: Scope) => void>;\n\n  /** Callback list that will be called during event processing. */\n  protected _eventProcessors: EventProcessor[];\n\n  /** Array of breadcrumbs. */\n  protected _breadcrumbs: Breadcrumb[];\n\n  /** User */\n  protected _user: User;\n\n  /** Tags */\n  protected _tags: { [key: string]: Primitive };\n\n  /** Attributes */\n  protected _attributes: RawAttributes<Record<string, unknown>>;\n\n  /** Extra */\n  protected _extra: Extras;\n\n  /** Contexts */\n  protected _contexts: Contexts;\n\n  /** Attachments */\n  protected _attachments: Attachment[];\n\n  /** Propagation Context for distributed tracing */\n  protected _propagationContext: PropagationContext;\n\n  /**\n   * A place to stash data which is needed at some point in the SDK's event processing pipeline but which shouldn't get\n   * sent to Sentry\n   */\n  protected _sdkProcessingMetadata: SdkProcessingMetadata;\n\n  /** Fingerprint */\n  protected _fingerprint?: string[];\n\n  /** Severity */\n  protected _level?: SeverityLevel;\n\n  /**\n   * Transaction Name\n   *\n   * IMPORTANT: The transaction name on the scope has nothing to do with root spans/transaction objects.\n   * It's purpose is to assign a transaction to the scope that's added to non-transaction events.\n   */\n  protected _transactionName?: string;\n\n  /** Session */\n  protected _session?: Session;\n\n  /** The client on this scope */\n  protected _client?: Client;\n\n  /** Contains the last event id of a captured event.  */\n  protected _lastEventId?: string;\n\n  /** Conversation ID */\n  protected _conversationId?: string;\n\n  // NOTE: Any field which gets added here should get added not only to the constructor but also to the `clone` method.\n\n  public constructor() {\n    this._notifyingListeners = false;\n    this._scopeListeners = [];\n    this._eventProcessors = [];\n    this._breadcrumbs = [];\n    this._attachments = [];\n    this._user = {};\n    this._tags = {};\n    this._attributes = {};\n    this._extra = {};\n    this._contexts = {};\n    this._sdkProcessingMetadata = {};\n    this._propagationContext = {\n      traceId: generateTraceId(),\n      sampleRand: safeMathRandom(),\n    };\n  }\n\n  /**\n   * Clone all data from this scope into a new scope.\n   */\n  public clone(): Scope {\n    const newScope = new Scope();\n    newScope._breadcrumbs = [...this._breadcrumbs];\n    newScope._tags = { ...this._tags };\n    newScope._attributes = { ...this._attributes };\n    newScope._extra = { ...this._extra };\n    newScope._contexts = { ...this._contexts };\n    if (this._contexts.flags) {\n      // We need to copy the `values` array so insertions on a cloned scope\n      // won't affect the original array.\n      newScope._contexts.flags = {\n        values: [...this._contexts.flags.values],\n      };\n    }\n\n    newScope._user = this._user;\n    newScope._level = this._level;\n    newScope._session = this._session;\n    newScope._transactionName = this._transactionName;\n    newScope._fingerprint = this._fingerprint;\n    newScope._eventProcessors = [...this._eventProcessors];\n    newScope._attachments = [...this._attachments];\n    newScope._sdkProcessingMetadata = { ...this._sdkProcessingMetadata };\n    newScope._propagationContext = { ...this._propagationContext };\n    newScope._client = this._client;\n    newScope._lastEventId = this._lastEventId;\n    newScope._conversationId = this._conversationId;\n\n    _setSpanForScope(newScope, _getSpanForScope(this));\n\n    return newScope;\n  }\n\n  /**\n   * Update the client assigned to this scope.\n   * Note that not every scope will have a client assigned - isolation scopes & the global scope will generally not have a client,\n   * as well as manually created scopes.\n   */\n  public setClient(client: Client | undefined): void {\n    this._client = client;\n  }\n\n  /**\n   * Set the ID of the last captured error event.\n   * This is generally only captured on the isolation scope.\n   */\n  public setLastEventId(lastEventId: string | undefined): void {\n    this._lastEventId = lastEventId;\n  }\n\n  /**\n   * Get the client assigned to this scope.\n   */\n  public getClient<C extends Client>(): C | undefined {\n    return this._client as C | undefined;\n  }\n\n  /**\n   * Get the ID of the last captured error event.\n   * This is generally only available on the isolation scope.\n   */\n  public lastEventId(): string | undefined {\n    return this._lastEventId;\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public addScopeListener(callback: (scope: Scope) => void): void {\n    this._scopeListeners.push(callback);\n  }\n\n  /**\n   * Add an event processor that will be called before an event is sent.\n   */\n  public addEventProcessor(callback: EventProcessor): this {\n    this._eventProcessors.push(callback);\n    return this;\n  }\n\n  /**\n   * Set the user for this scope.\n   * Set to `null` to unset the user.\n   */\n  public setUser(user: User | null): this {\n    // If null is passed we want to unset everything, but still define keys,\n    // so that later down in the pipeline any existing values are cleared.\n    this._user = user || {\n      email: undefined,\n      id: undefined,\n      ip_address: undefined,\n      username: undefined,\n    };\n\n    if (this._session) {\n      updateSession(this._session, { user });\n    }\n\n    this._notifyScopeListeners();\n    return this;\n  }\n\n  /**\n   * Get the user from this scope.\n   */\n  public getUser(): User | undefined {\n    return this._user;\n  }\n\n  /**\n   * Set the conversation ID for this scope.\n   * Set to `null` to unset the conversation ID.\n   */\n  public setConversationId(conversationId: string | null | undefined): this {\n    this._conversationId = conversationId || undefined;\n    this._notifyScopeListeners();\n    return this;\n  }\n\n  /**\n   * Set an object that will be merged into existing tags on the scope,\n   * and will be sent as tags data with the event.\n   */\n  public setTags(tags: { [key: string]: Primitive }): this {\n    this._tags = {\n      ...this._tags,\n      ...tags,\n    };\n    this._notifyScopeListeners();\n    return this;\n  }\n\n  /**\n   * Set a single tag that will be sent as tags data with the event.\n   */\n  public setTag(key: string, value: Primitive): this {\n    return this.setTags({ [key]: value });\n  }\n\n  /**\n   * Sets attributes onto the scope.\n   *\n   * These attributes are applied to logs, metrics and streamed spans.\n   *\n   * Supported attribute value types are `string`, `number`, `boolean`, `string[]`, `number[]` and `boolean[]`.\n   *\n   * @param newAttributes - The attributes to set on the scope, as key-value pairs.\n   *\n   * @example\n   * ```typescript\n   * scope.setAttributes({\n   *   is_admin: true,\n   *   payment_selection: 'credit_card',\n   *   render_duration: 150,\n   * });\n   * ```\n   */\n  public setAttributes<T extends Record<string, unknown>>(newAttributes: RawAttributes<T>): this {\n    this._attributes = {\n      ...this._attributes,\n      ...newAttributes,\n    };\n\n    this._notifyScopeListeners();\n    return this;\n  }\n\n  /**\n   * Sets an attribute onto the scope.\n   *\n   * These attributes are applied to logs, metrics and streamed spans.\n   *\n   * Supported attribute value types are `string`, `number`, `boolean`, `string[]`, `number[]` and `boolean[]`.\n   *\n   * @param key - The attribute key.\n   * @param value - The attribute value.\n   *\n   * @example\n   * ```typescript\n   * scope.setAttribute('is_admin', true);\n   * scope.setAttribute('render_duration', 150);\n   * ```\n   */\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  public setAttribute<T extends RawAttribute<T> extends { value: any } | { unit: any } ? AttributeObject : unknown>(\n    key: string,\n    value: RawAttribute<T>,\n  ): this {\n    return this.setAttributes({ [key]: value });\n  }\n\n  /**\n   * Removes the attribute with the given key from the scope.\n   *\n   * @param key - The attribute key.\n   *\n   * @example\n   * ```typescript\n   * scope.removeAttribute('is_admin');\n   * ```\n   */\n  public removeAttribute(key: string): this {\n    if (key in this._attributes) {\n      // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n      delete this._attributes[key];\n      this._notifyScopeListeners();\n    }\n    return this;\n  }\n\n  /**\n   * Set an object that will be merged into existing extra on the scope,\n   * and will be sent as extra data with the event.\n   */\n  public setExtras(extras: Extras): this {\n    this._extra = {\n      ...this._extra,\n      ...extras,\n    };\n    this._notifyScopeListeners();\n    return this;\n  }\n\n  /**\n   * Set a single key:value extra entry that will be sent as extra data with the event.\n   */\n  public setExtra(key: string, extra: Extra): this {\n    this._extra = { ...this._extra, [key]: extra };\n    this._notifyScopeListeners();\n    return this;\n  }\n\n  /**\n   * Sets the fingerprint on the scope to send with the events.\n   * @param {string[]} fingerprint Fingerprint to group events in Sentry.\n   */\n  public setFingerprint(fingerprint: string[]): this {\n    this._fingerprint = fingerprint;\n    this._notifyScopeListeners();\n    return this;\n  }\n\n  /**\n   * Sets the level on the scope for future events.\n   */\n  public setLevel(level: SeverityLevel): this {\n    this._level = level;\n    this._notifyScopeListeners();\n    return this;\n  }\n\n  /**\n   * Sets the transaction name on the scope so that the name of e.g. taken server route or\n   * the page location is attached to future events.\n   *\n   * IMPORTANT: Calling this function does NOT change the name of the currently active\n   * root span. If you want to change the name of the active root span, use\n   * `Sentry.updateSpanName(rootSpan, 'new name')` instead.\n   *\n   * By default, the SDK updates the scope's transaction name automatically on sensible\n   * occasions, such as a page navigation or when handling a new request on the server.\n   */\n  public setTransactionName(name?: string): this {\n    this._transactionName = name;\n    this._notifyScopeListeners();\n    return this;\n  }\n\n  /**\n   * Sets context data with the given name.\n   * Data passed as context will be normalized. You can also pass `null` to unset the context.\n   * Note that context data will not be merged - calling `setContext` will overwrite an existing context with the same key.\n   */\n  public setContext(key: string, context: Context | null): this {\n    if (context === null) {\n      // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n      delete this._contexts[key];\n    } else {\n      this._contexts[key] = context;\n    }\n\n    this._notifyScopeListeners();\n    return this;\n  }\n\n  /**\n   * Set the session for the scope.\n   */\n  public setSession(session?: Session): this {\n    if (!session) {\n      delete this._session;\n    } else {\n      this._session = session;\n    }\n    this._notifyScopeListeners();\n    return this;\n  }\n\n  /**\n   * Get the session from the scope.\n   */\n  public getSession(): Session | undefined {\n    return this._session;\n  }\n\n  /**\n   * Updates the scope with provided data. Can work in three variations:\n   * - plain object containing updatable attributes\n   * - Scope instance that'll extract the attributes from\n   * - callback function that'll receive the current scope as an argument and allow for modifications\n   */\n  public update(captureContext?: CaptureContext): this {\n    if (!captureContext) {\n      return this;\n    }\n\n    const scopeToMerge = typeof captureContext === 'function' ? captureContext(this) : captureContext;\n\n    const scopeInstance =\n      scopeToMerge instanceof Scope\n        ? scopeToMerge.getScopeData()\n        : isPlainObject(scopeToMerge)\n          ? (captureContext as ScopeContext)\n          : undefined;\n\n    const {\n      tags,\n      attributes,\n      extra,\n      user,\n      contexts,\n      level,\n      fingerprint = [],\n      propagationContext,\n      conversationId,\n    } = scopeInstance || {};\n\n    this._tags = { ...this._tags, ...tags };\n    this._attributes = { ...this._attributes, ...attributes };\n    this._extra = { ...this._extra, ...extra };\n    this._contexts = { ...this._contexts, ...contexts };\n\n    if (user && Object.keys(user).length) {\n      this._user = user;\n    }\n\n    if (level) {\n      this._level = level;\n    }\n\n    if (fingerprint.length) {\n      this._fingerprint = fingerprint;\n    }\n\n    if (propagationContext) {\n      this._propagationContext = propagationContext;\n    }\n\n    if (conversationId) {\n      this._conversationId = conversationId;\n    }\n\n    return this;\n  }\n\n  /**\n   * Clears the current scope and resets its properties.\n   * Note: The client will not be cleared.\n   *\n   * @deprecated This method will be removed in v11. To reset scope state, re-initialize the SDK or run\n   * your code in a fresh scope via `withScope` instead.\n   */\n  public clear(): this {\n    // client is not cleared here on purpose!\n    this._breadcrumbs = [];\n    this._tags = {};\n    this._attributes = {};\n    this._extra = {};\n    this._user = {};\n    this._contexts = {};\n    this._level = undefined;\n    this._transactionName = undefined;\n    this._fingerprint = undefined;\n    this._session = undefined;\n    this._conversationId = undefined;\n    _setSpanForScope(this, undefined);\n    this._attachments = [];\n    this.setPropagationContext({\n      traceId: generateTraceId(),\n      sampleRand: safeMathRandom(),\n    });\n\n    this._notifyScopeListeners();\n    return this;\n  }\n\n  /**\n   * Adds a breadcrumb to the scope.\n   * By default, the last 100 breadcrumbs are kept.\n   */\n  public addBreadcrumb(breadcrumb: Breadcrumb, maxBreadcrumbs?: number): this {\n    const maxCrumbs = typeof maxBreadcrumbs === 'number' ? maxBreadcrumbs : DEFAULT_MAX_BREADCRUMBS;\n\n    // No data has been changed, so don't notify scope listeners\n    if (maxCrumbs <= 0) {\n      return this;\n    }\n\n    const mergedBreadcrumb: Breadcrumb = {\n      timestamp: dateTimestampInSeconds(),\n      ...breadcrumb,\n      // Breadcrumb messages can theoretically be infinitely large and they're held in memory so we truncate them not to leak (too much) memory\n      message: breadcrumb.message ? truncate(breadcrumb.message, 2048) : breadcrumb.message,\n    };\n\n    this._breadcrumbs.push(mergedBreadcrumb);\n    if (this._breadcrumbs.length > maxCrumbs) {\n      this._breadcrumbs = this._breadcrumbs.slice(-maxCrumbs);\n      this._client?.recordDroppedEvent('buffer_overflow', 'log_item');\n    }\n\n    this._notifyScopeListeners();\n\n    return this;\n  }\n\n  /**\n   * Get the last breadcrumb of the scope.\n   */\n  public getLastBreadcrumb(): Breadcrumb | undefined {\n    return this._breadcrumbs[this._breadcrumbs.length - 1];\n  }\n\n  /**\n   * Clear all breadcrumbs from the scope.\n   */\n  public clearBreadcrumbs(): this {\n    this._breadcrumbs = [];\n    this._notifyScopeListeners();\n    return this;\n  }\n\n  /**\n   * Add an attachment to the scope.\n   */\n  public addAttachment(attachment: Attachment): this {\n    this._attachments.push(attachment);\n    return this;\n  }\n\n  /**\n   * Clear all attachments from the scope.\n   */\n  public clearAttachments(): this {\n    this._attachments = [];\n    return this;\n  }\n\n  /**\n   * Get the data of this scope, which should be applied to an event during processing.\n   */\n  public getScopeData(): ScopeData {\n    return {\n      breadcrumbs: this._breadcrumbs,\n      attachments: this._attachments,\n      contexts: this._contexts,\n      tags: this._tags,\n      attributes: this._attributes,\n      extra: this._extra,\n      user: this._user,\n      level: this._level,\n      fingerprint: this._fingerprint || [],\n      eventProcessors: this._eventProcessors,\n      propagationContext: this._propagationContext,\n      sdkProcessingMetadata: this._sdkProcessingMetadata,\n      transactionName: this._transactionName,\n      span: _getSpanForScope(this),\n      conversationId: this._conversationId,\n    };\n  }\n\n  /**\n   * Add data which will be accessible during event processing but won't get sent to Sentry.\n   */\n  public setSDKProcessingMetadata(newData: SdkProcessingMetadata): this {\n    this._sdkProcessingMetadata = merge(this._sdkProcessingMetadata, newData, 2);\n    return this;\n  }\n\n  /**\n   * Add propagation context to the scope, used for distributed tracing\n   */\n  public setPropagationContext(context: PropagationContext): this {\n    this._propagationContext = context;\n    return this;\n  }\n\n  /**\n   * Get propagation context from the scope, used for distributed tracing\n   */\n  public getPropagationContext(): PropagationContext {\n    return this._propagationContext;\n  }\n\n  /**\n   * Capture an exception for this scope.\n   *\n   * @returns {string} The id of the captured Sentry event.\n   */\n  public captureException(exception: unknown, hint?: EventHint): string {\n    const eventId = hint?.event_id || uuid4();\n\n    if (!this._client) {\n      DEBUG_BUILD && debug.warn('No client configured on scope - will not capture exception!');\n      return eventId;\n    }\n\n    const syntheticException = new Error('Sentry syntheticException');\n\n    this._client.captureException(\n      exception,\n      {\n        originalException: exception,\n        syntheticException,\n        ...hint,\n        event_id: eventId,\n      },\n      this,\n    );\n\n    return eventId;\n  }\n\n  /**\n   * Capture a message for this scope.\n   *\n   * @returns {string} The id of the captured message.\n   */\n  public captureMessage(message: string, level?: SeverityLevel, hint?: EventHint): string {\n    const eventId = hint?.event_id || uuid4();\n\n    if (!this._client) {\n      DEBUG_BUILD && debug.warn('No client configured on scope - will not capture message!');\n      return eventId;\n    }\n\n    const syntheticException = hint?.syntheticException ?? new Error(message);\n\n    this._client.captureMessage(\n      message,\n      level,\n      {\n        originalException: message,\n        syntheticException,\n        ...hint,\n        event_id: eventId,\n      },\n      this,\n    );\n\n    return eventId;\n  }\n\n  /**\n   * Capture a Sentry event for this scope.\n   *\n   * @returns {string} The id of the captured event.\n   */\n  public captureEvent(event: Event, hint?: EventHint): string {\n    const eventId = event.event_id || hint?.event_id || uuid4();\n\n    if (!this._client) {\n      DEBUG_BUILD && debug.warn('No client configured on scope - will not capture event!');\n      return eventId;\n    }\n\n    this._client.captureEvent(event, { ...hint, event_id: eventId }, this);\n\n    return eventId;\n  }\n\n  /**\n   * This will be called on every set call.\n   */\n  protected _notifyScopeListeners(): void {\n    // We need this check for this._notifyingListeners to be able to work on scope during updates\n    // If this check is not here we'll produce endless recursion when something is done with the scope\n    // during the callback.\n    if (!this._notifyingListeners) {\n      this._notifyingListeners = true;\n      this._scopeListeners.forEach(callback => {\n        callback(this);\n      });\n      this._notifyingListeners = false;\n    }\n  }\n}\n", "import { getGlobalSingleton } from './carrier';\nimport { Scope } from './scope';\n\n/** Get the default current scope. */\nexport function getDefaultCurrentScope(): Scope {\n  return getGlobalSingleton('defaultCurrentScope', () => new Scope());\n}\n\n/** Get the default isolation scope. */\nexport function getDefaultIsolationScope(): Scope {\n  return getGlobalSingleton('defaultIsolationScope', () => new Scope());\n}\n", "const isActualPromise = (p: unknown) =>\n  p instanceof Promise && !(p as unknown as ChainedPromiseLike<unknown>)[kChainedCopy];\n\ntype ChainedPromiseLike<T> = PromiseLike<T> & {\n  [kChainedCopy]: true;\n};\nconst kChainedCopy = Symbol('chained PromiseLike');\n\n/**\n * Copy the properties from a decorated promiselike object onto its chained\n * actual promise.\n */\nexport const chainAndCopyPromiseLike = <V, T extends PromiseLike<V>>(\n  original: T,\n  onSuccess: (value: V) => void,\n  onError: (e: unknown) => void,\n): T => {\n  const chained = original.then(\n    value => {\n      onSuccess(value);\n      return value;\n    },\n    err => {\n      onError(err);\n      throw err;\n    },\n  ) as T;\n\n  // if we're just dealing with \"normal\" Promise objects, return the chain\n  return isActualPromise(chained) && isActualPromise(original) ? chained : copyProps(original, chained);\n};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst copyProps = <T extends Record<string, any>>(original: T, chained: T): T => {\n  if (!chained) return original;\n  let mutated = false;\n  //oxlint-disable-next-line guard-for-in\n  for (const key in original) {\n    if (key in chained) continue;\n    mutated = true;\n    const value = original[key];\n    if (typeof value === 'function') {\n      Object.defineProperty(chained, key, {\n        value: (...args: unknown[]) => value.apply(original, args),\n        enumerable: true,\n        configurable: true,\n        writable: true,\n      });\n    } else {\n      (chained as Record<string, unknown>)[key] = value;\n    }\n  }\n\n  if (mutated) Object.assign(chained, { [kChainedCopy]: true });\n  return chained;\n};\n", "import type { Client } from '../client';\nimport { getDefaultCurrentScope, getDefaultIsolationScope } from '../defaultScopes';\nimport { Scope } from '../scope';\nimport { chainAndCopyPromiseLike } from '../utils/chain-and-copy-promiselike';\nimport { isThenable } from '../utils/is';\nimport { getMainCarrier, getSentryCarrier } from './../carrier';\nimport type { AsyncContextStrategy } from './types';\n\ninterface Layer {\n  client?: Client;\n  scope: Scope;\n}\n\n/**\n * This is an object that holds a stack of scopes.\n */\nexport class AsyncContextStack {\n  private readonly _stack: [Layer, ...Layer[]];\n  private _isolationScope: Scope;\n\n  public constructor(scope?: Scope, isolationScope?: Scope) {\n    let assignedScope;\n    if (!scope) {\n      assignedScope = new Scope();\n    } else {\n      assignedScope = scope;\n    }\n\n    let assignedIsolationScope;\n    if (!isolationScope) {\n      assignedIsolationScope = new Scope();\n    } else {\n      assignedIsolationScope = isolationScope;\n    }\n\n    // scope stack for domains or the process\n    this._stack = [{ scope: assignedScope }];\n    this._isolationScope = assignedIsolationScope;\n  }\n\n  /**\n   * Fork a scope for the stack.\n   */\n  public withScope<T>(callback: (scope: Scope) => T): T {\n    const scope = this._pushScope();\n\n    let maybePromiseResult: T;\n    try {\n      maybePromiseResult = callback(scope);\n    } catch (e) {\n      this._popScope();\n      throw e;\n    }\n\n    if (isThenable(maybePromiseResult)) {\n      return chainAndCopyPromiseLike(\n        maybePromiseResult as PromiseLike<Awaited<typeof maybePromiseResult>> & Record<string, unknown>,\n        () => this._popScope(),\n        () => this._popScope(),\n      ) as T;\n    }\n\n    this._popScope();\n    return maybePromiseResult;\n  }\n\n  /**\n   * Get the client of the stack.\n   */\n  public getClient<C extends Client>(): C | undefined {\n    return this.getStackTop().client as C;\n  }\n\n  /**\n   * Returns the scope of the top stack.\n   */\n  public getScope(): Scope {\n    return this.getStackTop().scope;\n  }\n\n  /**\n   * Get the isolation scope for the stack.\n   */\n  public getIsolationScope(): Scope {\n    return this._isolationScope;\n  }\n\n  /**\n   * Returns the topmost scope layer in the order domain > local > process.\n   */\n  public getStackTop(): Layer {\n    return this._stack[this._stack.length - 1] as Layer;\n  }\n\n  /**\n   * Push a scope to the stack.\n   */\n  private _pushScope(): Scope {\n    // We want to clone the content of prev scope\n    const scope = this.getScope().clone();\n    this._stack.push({\n      client: this.getClient(),\n      scope,\n    });\n    return scope;\n  }\n\n  /**\n   * Pop a scope from the stack.\n   */\n  private _popScope(): boolean {\n    if (this._stack.length <= 1) return false;\n    return !!this._stack.pop();\n  }\n}\n\n/**\n * Get the global async context stack.\n * This will be removed during the v8 cycle and is only here to make migration easier.\n */\nfunction getAsyncContextStack(): AsyncContextStack {\n  const registry = getMainCarrier();\n  const sentry = getSentryCarrier(registry);\n\n  return (sentry.stack = sentry.stack || new AsyncContextStack(getDefaultCurrentScope(), getDefaultIsolationScope()));\n}\n\nfunction withScope<T>(callback: (scope: Scope) => T): T {\n  return getAsyncContextStack().withScope(callback);\n}\n\nfunction withSetScope<T>(scope: Scope, callback: (scope: Scope) => T): T {\n  const stack = getAsyncContextStack();\n  return stack.withScope(() => {\n    stack.getStackTop().scope = scope;\n    return callback(scope);\n  });\n}\n\nfunction withIsolationScope<T>(callback: (isolationScope: Scope) => T): T {\n  return getAsyncContextStack().withScope(() => {\n    return callback(getAsyncContextStack().getIsolationScope());\n  });\n}\n\n/**\n * Get the stack-based async context strategy.\n */\nexport function getStackAsyncContextStrategy(): AsyncContextStrategy {\n  return {\n    withIsolationScope,\n    withScope,\n    withSetScope,\n    withSetIsolationScope: <T>(_isolationScope: Scope, callback: (isolationScope: Scope) => T) => {\n      return withIsolationScope(callback);\n    },\n    getCurrentScope: () => getAsyncContextStack().getScope(),\n    getIsolationScope: () => getAsyncContextStack().getIsolationScope(),\n  };\n}\n", "import type { Carrier } from './../carrier';\nimport { getMainCarrier, getSentryCarrier } from './../carrier';\nimport { getStackAsyncContextStrategy } from './stackStrategy';\nimport type { AsyncContextStrategy } from './types';\n\n/**\n * @private Private API with no semver guarantees!\n *\n * Sets the global async context strategy\n */\nexport function setAsyncContextStrategy(strategy: AsyncContextStrategy | undefined): void {\n  // Get main carrier (global for every environment)\n  const registry = getMainCarrier();\n  const sentry = getSentryCarrier(registry);\n  sentry.acs = strategy;\n}\n\n/**\n * Get the current async context strategy.\n * If none has been setup, the default will be used.\n */\nexport function getAsyncContextStrategy(carrier: Carrier): AsyncContextStrategy {\n  const sentry = getSentryCarrier(carrier);\n\n  if (sentry.acs) {\n    return sentry.acs;\n  }\n\n  // Otherwise, use the default one (stack)\n  return getStackAsyncContextStrategy();\n}\n", "import type { DurationUnit, FractionUnit, InformationUnit } from './types/measurement';\nimport type { Primitive } from './types/misc';\nimport { isPrimitive } from './utils/is';\n\nexport type RawAttributes<T> = T & ValidatedAttributes<T>;\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type RawAttribute<T> = T extends { value: any } | { unit: any } ? AttributeObject : T;\n\nexport type Attributes = Record<string, TypedAttributeValue>;\n\nexport type AttributeValueType = string | number | boolean | Array<string> | Array<number> | Array<boolean>;\n\ntype AttributeTypeMap = {\n  string: string;\n  integer: number;\n  double: number;\n  boolean: boolean;\n  array: Array<string> | Array<number> | Array<boolean>;\n};\n\n/* Generates a type from the AttributeTypeMap like:\n  | { value: string; type: 'string' }\n  | { value: number; type: 'integer' }\n  | { value: number; type: 'double' }\n */\ntype AttributeUnion = {\n  [K in keyof AttributeTypeMap]: {\n    value: AttributeTypeMap[K];\n    type: K;\n  };\n}[keyof AttributeTypeMap];\n\nexport type TypedAttributeValue = AttributeUnion & { unit?: AttributeUnit };\n\nexport type AttributeObject = {\n  value: unknown;\n  unit?: AttributeUnit;\n};\n\n// Unfortunately, we loose type safety if we did something like Exclude<MeasurementUnit, string>\n// so therefore we unionize between the three supported unit categories.\ntype AttributeUnit = DurationUnit | InformationUnit | FractionUnit;\n\n/* If an attribute has either a 'value' or 'unit' property, we use the ValidAttributeObject type. */\nexport type ValidatedAttributes<T> = {\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  [K in keyof T]: T[K] extends { value: any } | { unit: any } ? AttributeObject : unknown;\n};\n\n/**\n * Type-guard: The attribute object has the shape the official attribute object (value, type, unit).\n * https://develop.sentry.dev/sdk/telemetry/scopes/#setting-attributes\n */\nexport function isAttributeObject(maybeObj: unknown): maybeObj is AttributeObject {\n  return (\n    typeof maybeObj === 'object' &&\n    maybeObj != null &&\n    !Array.isArray(maybeObj) &&\n    Object.keys(maybeObj).includes('value')\n  );\n}\n\n/**\n * Converts an attribute value to a typed attribute value.\n *\n * For now, we support primitive values and arrays, either raw or inside attribute objects.\n * If @param useFallback is true, we stringify other non-primitive values to a string attribute\n * value. Otherwise we return `undefined` for unsupported values.\n *\n * @param value - The value of the passed attribute.\n * @param useFallback - If true, unsupported values will be stringified to a string attribute value.\n *                      Defaults to false. In this case, `undefined` is returned for unsupported values.\n * @returns The typed attribute.\n */\nexport function attributeValueToTypedAttributeValue(\n  rawValue: unknown,\n  useFallback?: boolean | 'skip-undefined',\n): TypedAttributeValue | void {\n  const { value, unit } = isAttributeObject(rawValue) ? rawValue : { value: rawValue, unit: undefined };\n  const attributeValue = getTypedAttributeValue(value);\n  const checkedUnit = unit && typeof unit === 'string' ? { unit } : {};\n  if (attributeValue) {\n    return { ...attributeValue, ...checkedUnit };\n  }\n\n  if (!useFallback || (useFallback === 'skip-undefined' && value === undefined)) {\n    return;\n  }\n\n  // Fallback: stringify the value\n  // TODO(v11): be smarter here and use String constructor if stringify fails\n  // (this is a breaking change for already existing attribute values)\n  let stringValue = '';\n  try {\n    stringValue = JSON.stringify(value) ?? '';\n  } catch {\n    // Do nothing\n  }\n  return {\n    value: stringValue,\n    type: 'string',\n    ...checkedUnit,\n  };\n}\n\n/**\n * Serializes raw attributes to typed attributes as expected in our envelopes.\n *\n * @param attributes The raw attributes to serialize.\n * @param fallback   If true, unsupported values will be stringified to a string attribute value.\n *                   Defaults to false. In this case, `undefined` is returned for unsupported values.\n *\n * @returns The serialized attributes.\n */\nexport function serializeAttributes<T>(\n  attributes: RawAttributes<T> | undefined,\n  fallback: boolean | 'skip-undefined' = false,\n): Attributes {\n  const serializedAttributes: Attributes = {};\n  for (const [key, value] of Object.entries(attributes ?? {})) {\n    const typedValue = attributeValueToTypedAttributeValue(value, fallback);\n    if (typedValue) {\n      serializedAttributes[key] = typedValue;\n    }\n  }\n  return serializedAttributes;\n}\n\n/**\n * Estimates the serialized byte size of {@link Attributes},\n * with a couple of heuristics for performance.\n */\nexport function estimateTypedAttributesSizeInBytes(attributes: Attributes | undefined): number {\n  if (!attributes) {\n    return 0;\n  }\n  let weight = 0;\n  for (const [key, attr] of Object.entries(attributes)) {\n    weight += key.length * 2;\n    weight += attr.type.length * 2;\n    weight += (attr.unit?.length ?? 0) * 2;\n    const val = attr.value;\n\n    if (Array.isArray(val)) {\n      // Assumption: Individual array items have the same type and roughly the same size\n      // probably not always true but allows us to cut down on runtime\n      weight += estimatePrimitiveSizeInBytes(val[0]) * val.length;\n    } else if (isPrimitive(val)) {\n      weight += estimatePrimitiveSizeInBytes(val);\n    } else {\n      // default fallback for anything else (objects)\n      weight += 100;\n    }\n  }\n  return weight;\n}\n\nfunction estimatePrimitiveSizeInBytes(value: Primitive): number {\n  if (typeof value === 'string') {\n    return value.length * 2;\n  } else if (typeof value === 'boolean') {\n    return 4;\n  } else if (typeof value === 'number') {\n    return 8;\n  }\n  return 0;\n}\n\n/**\n * NOTE: We return typed attributes for primitives and arrays:\n *  - Relay currently only supports arrays consisting of primitive values. Attributes with non-conforming arrays are dropped by Relay, so runtime type validation in the SDK is unnecessary.\n *  - Objects are not supported yet and product support is still TBD.\n */\nfunction getTypedAttributeValue(value: unknown): TypedAttributeValue | void {\n  if (Array.isArray(value)) {\n    return { value, type: 'array' };\n  }\n\n  const primitiveType =\n    typeof value === 'string'\n      ? 'string'\n      : typeof value === 'boolean'\n        ? 'boolean'\n        : typeof value === 'number' && !Number.isNaN(value)\n          ? Number.isInteger(value)\n            ? 'integer'\n            : 'double'\n          : null;\n  if (primitiveType) {\n    // @ts-expect-error - TS complains because {@link TypedAttributeValue} is strictly typed to\n    // avoid setting the wrong `type` on the attribute value.\n    // In this case, getPrimitiveType already does the check but TS doesn't know that.\n    // The \"clean\" alternative is to return an object per `typeof value` case\n    // but that would require more bundle size\n    // Therefore, we ignore it.\n    return { value, type: primitiveType };\n  }\n}\n", "import { getAsyncContextStrategy } from './asyncContext';\nimport { getGlobalSingleton, getMainCarrier } from './carrier';\nimport type { Client } from './client';\nimport { Scope } from './scope';\nimport type { TraceContext } from './types/context';\nimport { generateSpanId } from './utils/propagationContext';\n\nlet _externalPropagationContextProvider: (() => { traceId: string; spanId: string } | undefined) | undefined;\n\n/**\n * Register an external propagation context provider function.\n * When registered, trace context will be read from the external source (e.g. OpenTelemetry)\n * instead of from the Sentry scope's propagation context.\n */\nexport function registerExternalPropagationContext(fn: () => { traceId: string; spanId: string } | undefined): void {\n  _externalPropagationContextProvider = fn;\n}\n\n/**\n * Get the external propagation context, if a provider has been registered.\n */\nexport function getExternalPropagationContext(): { traceId: string; spanId: string } | undefined {\n  return _externalPropagationContextProvider?.();\n}\n\n/**\n * Check if an external propagation context provider has been registered.\n */\nexport function hasExternalPropagationContext(): boolean {\n  return _externalPropagationContextProvider !== undefined;\n}\n\n/**\n * Get the currently active scope.\n */\nexport function getCurrentScope(): Scope {\n  const carrier = getMainCarrier();\n  const acs = getAsyncContextStrategy(carrier);\n  return acs.getCurrentScope();\n}\n\n/**\n * Get the currently active isolation scope.\n * The isolation scope is active for the current execution context.\n */\nexport function getIsolationScope(): Scope {\n  const carrier = getMainCarrier();\n  const acs = getAsyncContextStrategy(carrier);\n  return acs.getIsolationScope();\n}\n\n/**\n * Get the global scope.\n * This scope is applied to _all_ events.\n */\nexport function getGlobalScope(): Scope {\n  return getGlobalSingleton('globalScope', () => new Scope());\n}\n\n/**\n * Creates a new scope with and executes the given operation within.\n * The scope is automatically removed once the operation\n * finishes or throws.\n */\nexport function withScope<T>(callback: (scope: Scope) => T): T;\n/**\n * Set the given scope as the active scope in the callback.\n */\nexport function withScope<T>(scope: Scope | undefined, callback: (scope: Scope) => T): T;\n/**\n * Either creates a new active scope, or sets the given scope as active scope in the given callback.\n */\nexport function withScope<T>(\n  ...rest: [callback: (scope: Scope) => T] | [scope: Scope | undefined, callback: (scope: Scope) => T]\n): T {\n  const carrier = getMainCarrier();\n  const acs = getAsyncContextStrategy(carrier);\n\n  // If a scope is defined, we want to make this the active scope instead of the default one\n  if (rest.length === 2) {\n    const [scope, callback] = rest;\n\n    if (!scope) {\n      return acs.withScope(callback);\n    }\n\n    return acs.withSetScope(scope, callback);\n  }\n\n  return acs.withScope(rest[0]);\n}\n\n/**\n * Attempts to fork the current isolation scope and the current scope based on the current async context strategy. If no\n * async context strategy is set, the isolation scope and the current scope will not be forked (this is currently the\n * case, for example, in the browser).\n *\n * Usage of this function in environments without async context strategy is discouraged and may lead to unexpected behaviour.\n *\n * This function is intended for Sentry SDK and SDK integration development. It is not recommended to be used in \"normal\"\n * applications directly because it comes with pitfalls. Use at your own risk!\n */\nexport function withIsolationScope<T>(callback: (isolationScope: Scope) => T): T;\n/**\n * Set the provided isolation scope as active in the given callback. If no\n * async context strategy is set, the isolation scope and the current scope will not be forked (this is currently the\n * case, for example, in the browser).\n *\n * Usage of this function in environments without async context strategy is discouraged and may lead to unexpected behaviour.\n *\n * This function is intended for Sentry SDK and SDK integration development. It is not recommended to be used in \"normal\"\n * applications directly because it comes with pitfalls. Use at your own risk!\n *\n * If you pass in `undefined` as a scope, it will fork a new isolation scope, the same as if no scope is passed.\n */\nexport function withIsolationScope<T>(isolationScope: Scope | undefined, callback: (isolationScope: Scope) => T): T;\n/**\n * Either creates a new active isolation scope, or sets the given isolation scope as active scope in the given callback.\n */\nexport function withIsolationScope<T>(\n  ...rest:\n    | [callback: (isolationScope: Scope) => T]\n    | [isolationScope: Scope | undefined, callback: (isolationScope: Scope) => T]\n): T {\n  const carrier = getMainCarrier();\n  const acs = getAsyncContextStrategy(carrier);\n\n  // If a scope is defined, we want to make this the active scope instead of the default one\n  if (rest.length === 2) {\n    const [isolationScope, callback] = rest;\n\n    if (!isolationScope) {\n      return acs.withIsolationScope(callback);\n    }\n\n    return acs.withSetIsolationScope(isolationScope, callback);\n  }\n\n  return acs.withIsolationScope(rest[0]);\n}\n\n/**\n * Get the currently active client.\n */\nexport function getClient<C extends Client>(): C | undefined {\n  return getCurrentScope().getClient<C>();\n}\n\n/**\n * Get a trace context for the given scope.\n */\nexport function getTraceContextFromScope(scope: Scope): TraceContext {\n  const externalContext = getExternalPropagationContext();\n  if (externalContext) {\n    return { trace_id: externalContext.traceId, span_id: externalContext.spanId };\n  }\n\n  const propagationContext = scope.getPropagationContext();\n\n  const { traceId, parentSpanId, propagationSpanId } = propagationContext;\n\n  const traceContext: TraceContext = {\n    trace_id: traceId,\n    span_id: propagationSpanId || generateSpanId(),\n  };\n\n  if (parentSpanId) {\n    traceContext.parent_span_id = parentSpanId;\n  }\n\n  return traceContext;\n}\n", "/**\n * Use this attribute to represent the source of a span name.\n * Must be one of: custom, url, route, view, component, task\n * TODO(v11): remove this export\n */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_SOURCE = 'sentry.source';\n\n/**\n * Attributes that holds the sample rate that was locally applied to a span.\n * If this attribute is not defined, it means that the span inherited a sampling decision.\n *\n * NOTE: Is only defined on root spans.\n */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE = 'sentry.sample_rate';\n\n/**\n * Attribute holding the sample rate of the previous trace.\n * This is used to sample consistently across subsequent traces in the browser SDK.\n *\n * Note: Only defined on root spans, if opted into consistent sampling\n */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_PREVIOUS_TRACE_SAMPLE_RATE = 'sentry.previous_trace_sample_rate';\n\n/**\n * Use this attribute to represent the operation of a span.\n */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_OP = 'sentry.op';\n\n/**\n * Use this attribute to represent the origin of a span.\n */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = 'sentry.origin';\n\n/**\n * Holds the human-readable span status message (e.g. set via\n * `span.setStatus({ code, message })`).\n *\n * Streamed (v2) span statuses are reduced to `ok`/`error`, so we preserve the\n * message as an attribute instead of dropping it. This mirrors the attribute\n * Sentry's OTLP ingestion uses for the same purpose.\n */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_STATUS_MESSAGE = 'sentry.status.message';\n\n/** The reason why an idle span finished. */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON = 'sentry.idle_span_finish_reason';\n\n/** The unit of a measurement, which may be stored as a TimedEvent. */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT = 'sentry.measurement_unit';\n\n/** The value of a measurement, which may be stored as a TimedEvent. */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE = 'sentry.measurement_value';\n\n/** The release version of the application */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_RELEASE = 'sentry.release';\n/** The environment name (e.g., \"production\", \"staging\", \"development\") */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_ENVIRONMENT = 'sentry.environment';\n/**\n * The segment name (e.g., \"GET /users\")\n * @deprecated Use `SENTRY_SEGMENT_NAME` `@sentry/conventions/attributes` instead.\n */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_SEGMENT_NAME = 'sentry.segment.name';\n/**\n * The id of the segment that this span belongs to.\n * @deprecated Use `SENTRY_SEGMENT_ID` `@sentry/conventions/attributes` instead.\n */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_SEGMENT_ID = 'sentry.segment.id';\n/**\n * The name of the Sentry SDK (e.g., \"sentry.php\", \"sentry.javascript\")\n * @deprecated Use `SENTRY_SDK_NAME` `@sentry/conventions/attributes` instead.\n */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_SDK_NAME = 'sentry.sdk.name';\n/**\n * The version of the Sentry SDK\n * @deprecated Use `SENTRY_SDK_VERSION` `@sentry/conventions/attributes` instead.\n */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_SDK_VERSION = 'sentry.sdk.version';\n/** The list of integrations enabled in the Sentry SDK (e.g., [\"InboundFilters\", \"BrowserTracing\"]) */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_SDK_INTEGRATIONS = 'sentry.sdk.integrations';\n\n/** The user ID */\nexport const SEMANTIC_ATTRIBUTE_USER_ID = 'user.id';\n/** The user email */\nexport const SEMANTIC_ATTRIBUTE_USER_EMAIL = 'user.email';\n/** The user IP address */\nexport const SEMANTIC_ATTRIBUTE_USER_IP_ADDRESS = 'user.ip_address';\n/** The user username */\nexport const SEMANTIC_ATTRIBUTE_USER_USERNAME = 'user.name';\n\n/**\n * A custom span name set by users guaranteed to be taken over any automatically\n * inferred name. This attribute is removed before the span is sent.\n *\n * @internal only meant for internal SDK usage\n * @hidden\n */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME = 'sentry.custom_span_name';\n\n/**\n * The id of the profile that this span occurred in.\n */\nexport const SEMANTIC_ATTRIBUTE_PROFILE_ID = 'sentry.profile_id';\n\nexport const SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME = 'sentry.exclusive_time';\n\nexport const SEMANTIC_ATTRIBUTE_CACHE_HIT = 'cache.hit';\n\nexport const SEMANTIC_ATTRIBUTE_CACHE_KEY = 'cache.key';\n\nexport const SEMANTIC_ATTRIBUTE_CACHE_ITEM_SIZE = 'cache.item_size';\n\n/** TODO: Remove these once we update to latest semantic conventions */\nexport const SEMANTIC_ATTRIBUTE_HTTP_REQUEST_METHOD = 'http.request.method';\n/**\n * @deprecated Use `URL_FULL` `@sentry/conventions/attributes` instead.\n */\nexport const SEMANTIC_ATTRIBUTE_URL_FULL = 'url.full';\n\n/**\n * A span link attribute to mark the link as a special span link.\n *\n * Known values:\n * - `previous_trace`: The span links to the frontend root span of the previous trace.\n * - `next_trace`: The span links to the frontend root span of the next trace. (Not set by the SDK)\n *\n * Other values may be set as appropriate.\n * @see https://develop.sentry.dev/sdk/telemetry/traces/span-links/#link-types\n */\nexport const SEMANTIC_LINK_ATTRIBUTE_LINK_TYPE = 'sentry.link.type';\n\n/**\n * =============================================================================\n * GEN AI ATTRIBUTES\n * Based on OpenTelemetry Semantic Conventions for Generative AI\n * @see https://opentelemetry.io/docs/specs/semconv/gen-ai/\n * =============================================================================\n */\n\n/**\n * The conversation ID for linking messages across API calls.\n * For OpenAI Assistants API: thread_id\n * For LangGraph: configurable.thread_id\n */\nexport const GEN_AI_CONVERSATION_ID_ATTRIBUTE = 'gen_ai.conversation.id';\n", "import type { Span } from '../types/span';\nimport type { SpanStatus } from '../types/spanStatus';\n\nexport const SPAN_STATUS_UNSET = 0;\nexport const SPAN_STATUS_OK = 1;\nexport const SPAN_STATUS_ERROR = 2;\n\n/**\n * Converts a HTTP status code into a sentry status with a message.\n *\n * @param httpStatus The HTTP response status code.\n * @returns The span status or internal_error.\n */\n// https://develop.sentry.dev/sdk/event-payloads/span/\nexport function getSpanStatusFromHttpCode(httpStatus: number): SpanStatus {\n  if (httpStatus < 400 && httpStatus >= 100) {\n    return { code: SPAN_STATUS_OK };\n  }\n\n  if (httpStatus >= 400 && httpStatus < 500) {\n    switch (httpStatus) {\n      case 401:\n        return { code: SPAN_STATUS_ERROR, message: 'unauthenticated' };\n      case 403:\n        return { code: SPAN_STATUS_ERROR, message: 'permission_denied' };\n      case 404:\n        return { code: SPAN_STATUS_ERROR, message: 'not_found' };\n      case 409:\n        return { code: SPAN_STATUS_ERROR, message: 'already_exists' };\n      case 413:\n        return { code: SPAN_STATUS_ERROR, message: 'failed_precondition' };\n      case 429:\n        return { code: SPAN_STATUS_ERROR, message: 'resource_exhausted' };\n      case 499:\n        return { code: SPAN_STATUS_ERROR, message: 'cancelled' };\n      default:\n        return { code: SPAN_STATUS_ERROR, message: 'invalid_argument' };\n    }\n  }\n\n  if (httpStatus >= 500 && httpStatus < 600) {\n    switch (httpStatus) {\n      case 501:\n        return { code: SPAN_STATUS_ERROR, message: 'unimplemented' };\n      case 503:\n        return { code: SPAN_STATUS_ERROR, message: 'unavailable' };\n      case 504:\n        return { code: SPAN_STATUS_ERROR, message: 'deadline_exceeded' };\n      default:\n        return { code: SPAN_STATUS_ERROR, message: 'internal_error' };\n    }\n  }\n\n  return { code: SPAN_STATUS_ERROR, message: 'internal_error' };\n}\n\n/**\n * Sets the Http status attributes on the current span based on the http code.\n * Additionally, the span's status is updated, depending on the http code.\n */\nexport function setHttpStatus(span: Span, httpStatus: number): void {\n  span.setAttribute('http.response.status_code', httpStatus);\n\n  const spanStatus = getSpanStatusFromHttpCode(httpStatus);\n  if (spanStatus.message !== 'unknown_error') {\n    span.setStatus(spanStatus);\n  }\n}\n", "import type { Scope } from '../scope';\nimport type { Span } from '../types/span';\nimport { addNonEnumerableProperty } from '../utils/object';\nimport { derefWeakRef, makeWeakRef, type MaybeWeakRef } from '../utils/weakRef';\n\nconst SCOPE_ON_START_SPAN_FIELD = '_sentryScope';\nconst ISOLATION_SCOPE_ON_START_SPAN_FIELD = '_sentryIsolationScope';\n\n// Brand marking a span whose `sentry.source` should be inferred OTel-style at span end (by\n// `applyOtelSpanData`) rather than pinned. `SentryTraceProvider` sets it on the spans it creates\n// so they behave like OTel SDK spans, which carry no Sentry source concept. We use `Symbol.for`\n// so the key is shared across duplicated copies of `@sentry/core`.\nconst OTEL_SOURCE_INFERENCE_SPAN_FIELD = Symbol.for('sentry.otelSourceInference');\n\n// Brand marking a span (otherwise subject to OTel-style source inference, see above) whose\n// `sentry.source` was explicitly set by user code after creation, so `applyOtelSpanData` stops\n// inferring and respects the chosen source and name. This is what tells a user-set `custom` source\n// apart from the default `custom` that `_startRootSpan` stamps on every root span.\nconst OTEL_SOURCE_EXPLICITLY_SET_SPAN_FIELD = Symbol.for('sentry.otelSourceExplicitlySet');\n\n// Brand marking a span created by the `SentryTracerProvider` (i.e. via the OTel tracer) rather than\n// directly through the core span API. Such a span is handed to OTel instrumentations as an OTel span,\n// so it must become immutable after `end()` like a real OTel SDK span (see `SentrySpan.end()`). Spans\n// created directly through core (e.g. the browser SDK) are not branded and stay mutable.\nconst TRACER_PROVIDER_SPAN_FIELD = Symbol.for('sentry.tracerProviderSpan');\n\ntype SpanWithScopes = Span & {\n  [SCOPE_ON_START_SPAN_FIELD]?: Scope;\n  [ISOLATION_SCOPE_ON_START_SPAN_FIELD]?: MaybeWeakRef<Scope>;\n};\n\ntype SpanWithOtelSourceInference = Span & {\n  [OTEL_SOURCE_INFERENCE_SPAN_FIELD]?: boolean;\n  [OTEL_SOURCE_EXPLICITLY_SET_SPAN_FIELD]?: boolean;\n};\n\ntype SpanWithTracerProviderBrand = Span & {\n  [TRACER_PROVIDER_SPAN_FIELD]?: boolean;\n};\n\n/** Store the scope & isolation scope for a span, which can the be used when it is finished. */\nexport function setCapturedScopesOnSpan(span: Span | undefined, scope: Scope, isolationScope: Scope): void {\n  if (span) {\n    addNonEnumerableProperty(span, ISOLATION_SCOPE_ON_START_SPAN_FIELD, makeWeakRef(isolationScope));\n    // We don't wrap the scope with a WeakRef here because webkit aggressively garbage collects\n    // and scopes are not held in memory for long periods of time.\n    addNonEnumerableProperty(span, SCOPE_ON_START_SPAN_FIELD, scope);\n  }\n}\n\n/**\n * Grabs the scope and isolation scope off a span that were active when the span was started.\n * If WeakRef was used and scopes have been garbage collected, returns undefined for those scopes.\n */\nexport function getCapturedScopesOnSpan(span: Span): { scope?: Scope; isolationScope?: Scope } {\n  const spanWithScopes = span as SpanWithScopes;\n\n  return {\n    scope: spanWithScopes[SCOPE_ON_START_SPAN_FIELD],\n    isolationScope: derefWeakRef(spanWithScopes[ISOLATION_SCOPE_ON_START_SPAN_FIELD]),\n  };\n}\n\n/**\n * Mark a span as eligible for OTel-style `sentry.source` inference at span end.\n * Set by `SentryTraceProvider` on the spans it creates; read by `SentrySpan.updateName()` and\n * `applyOtelSpanData()`.\n */\nexport function markSpanForOtelSourceInference(span: Span): void {\n  addNonEnumerableProperty(span, OTEL_SOURCE_INFERENCE_SPAN_FIELD, true);\n}\n\n/** Whether a span is marked for OTel-style `sentry.source` inference (see {@link markSpanForOtelSourceInference}). */\nexport function spanShouldInferOtelSource(span: Span): boolean {\n  return (span as SpanWithOtelSourceInference)[OTEL_SOURCE_INFERENCE_SPAN_FIELD] === true;\n}\n\n/**\n * Mark that user code explicitly set `sentry.source` on a span subject to OTel-style inference, so\n * `applyOtelSpanData` keeps that source (and name) instead of overriding it. Set by `SentrySpan`\n * when `setAttribute` writes the source on an already-branded span (the default `custom` source is\n * stamped at construction, before the brand, so it doesn't trip this).\n */\nexport function markSpanSourceAsExplicit(span: Span): void {\n  addNonEnumerableProperty(span, OTEL_SOURCE_EXPLICITLY_SET_SPAN_FIELD, true);\n}\n\n/** Whether user code explicitly set `sentry.source` on a span (see {@link markSpanSourceAsExplicit}). */\nexport function spanSourceWasExplicitlySet(span: Span): boolean {\n  return (span as SpanWithOtelSourceInference)[OTEL_SOURCE_EXPLICITLY_SET_SPAN_FIELD] === true;\n}\n\n/**\n * Mark a span as created by the `SentryTracerProvider` (via the OTel tracer). Set by `SentryTracer`\n * on every span it creates; read by `SentrySpan.end()` to seal the span against further writes once\n * it has ended, mirroring OTel SDK spans (which are immutable after `end()`).\n */\nexport function markSpanAsTracerProviderSpan(span: Span): void {\n  addNonEnumerableProperty(span, TRACER_PROVIDER_SPAN_FIELD, true);\n}\n\n/** Whether a span was created by the `SentryTracerProvider` (see {@link markSpanAsTracerProviderSpan}). */\nexport function spanIsTracerProviderSpan(span: Span): boolean {\n  return (span as SpanWithTracerProviderBrand)[TRACER_PROVIDER_SPAN_FIELD] === true;\n}\n", "import { DEBUG_BUILD } from '../debug-build';\nimport type { DynamicSamplingContext } from '../types/envelope';\nimport { debug } from './debug-logger';\nimport { isString } from './is';\n\nexport const SENTRY_BAGGAGE_KEY_PREFIX = 'sentry-';\n\nexport const SENTRY_BAGGAGE_KEY_PREFIX_REGEX = /^sentry-/;\n\n/**\n * Max length of a serialized baggage string\n *\n * https://www.w3.org/TR/baggage/#limits\n */\nexport const MAX_BAGGAGE_STRING_LENGTH = 8192;\n\n/**\n * Takes a baggage header and turns it into Dynamic Sampling Context, by extracting all the \"sentry-\" prefixed values\n * from it.\n *\n * @param baggageHeader A very bread definition of a baggage header as it might appear in various frameworks.\n * @returns The Dynamic Sampling Context that was found on `baggageHeader`, if there was any, `undefined` otherwise.\n */\nexport function baggageHeaderToDynamicSamplingContext(\n  // Very liberal definition of what any incoming header might look like\n  baggageHeader: string | string[] | number | null | undefined | boolean,\n): Partial<DynamicSamplingContext> | undefined {\n  const baggageObject = parseBaggageHeader(baggageHeader);\n\n  if (!baggageObject) {\n    return undefined;\n  }\n\n  // Read all \"sentry-\" prefixed values out of the baggage object and put it onto a dynamic sampling context object.\n  const dynamicSamplingContext = Object.entries(baggageObject).reduce<Record<string, string>>((acc, [key, value]) => {\n    if (key.startsWith(SENTRY_BAGGAGE_KEY_PREFIX)) {\n      const nonPrefixedKey = key.slice(SENTRY_BAGGAGE_KEY_PREFIX.length);\n      acc[nonPrefixedKey] = value;\n    }\n    return acc;\n  }, {});\n\n  // Only return a dynamic sampling context object if there are keys in it.\n  // A keyless object means there were no sentry values on the header, which means that there is no DSC.\n  if (Object.keys(dynamicSamplingContext).length > 0) {\n    return dynamicSamplingContext as Partial<DynamicSamplingContext>;\n  } else {\n    return undefined;\n  }\n}\n\n/**\n * Turns a Dynamic Sampling Object into a baggage header by prefixing all the keys on the object with \"sentry-\".\n *\n * @param dynamicSamplingContext The Dynamic Sampling Context to turn into a header. For convenience and compatibility\n * with the `getDynamicSamplingContext` method on the Transaction class ,this argument can also be `undefined`. If it is\n * `undefined` the function will return `undefined`.\n * @returns a baggage header, created from `dynamicSamplingContext`, or `undefined` either if `dynamicSamplingContext`\n * was `undefined`, or if `dynamicSamplingContext` didn't contain any values.\n */\nexport function dynamicSamplingContextToSentryBaggageHeader(\n  // this also takes undefined for convenience and bundle size in other places\n  dynamicSamplingContext?: Partial<DynamicSamplingContext>,\n): string | undefined {\n  if (!dynamicSamplingContext) {\n    return undefined;\n  }\n\n  // Prefix all DSC keys with \"sentry-\" and put them into a new object\n  const sentryPrefixedDSC = Object.entries(dynamicSamplingContext).reduce<Record<string, string>>(\n    (acc, [dscKey, dscValue]) => {\n      if (dscValue) {\n        acc[`${SENTRY_BAGGAGE_KEY_PREFIX}${dscKey}`] = dscValue;\n      }\n      return acc;\n    },\n    {},\n  );\n\n  return objectToBaggageHeader(sentryPrefixedDSC);\n}\n\n/**\n * Take a baggage header and parse it into an object.\n */\nexport function parseBaggageHeader(\n  baggageHeader: string | string[] | number | null | undefined | boolean,\n): Record<string, string> | undefined {\n  if (!baggageHeader || (!isString(baggageHeader) && !Array.isArray(baggageHeader))) {\n    return undefined;\n  }\n\n  if (Array.isArray(baggageHeader)) {\n    // Combine all baggage headers into one object containing the baggage values so we can later read the Sentry-DSC-values from it\n    return baggageHeader.reduce<Record<string, string>>((acc, curr) => {\n      const currBaggageObject = baggageHeaderToObject(curr);\n      Object.entries(currBaggageObject).forEach(([key, value]) => {\n        acc[key] = value;\n      });\n      return acc;\n    }, {});\n  }\n\n  return baggageHeaderToObject(baggageHeader);\n}\n\n/**\n * Will parse a baggage header, which is a simple key-value map, into a flat object.\n *\n * @param baggageHeader The baggage header to parse.\n * @returns a flat object containing all the key-value pairs from `baggageHeader`.\n */\nfunction baggageHeaderToObject(baggageHeader: string): Record<string, string> {\n  return baggageHeader\n    .split(',')\n    .map(baggageEntry => {\n      const eqIdx = baggageEntry.indexOf('=');\n      if (eqIdx === -1) {\n        // Likely an invalid entry\n        return [];\n      }\n      const key = baggageEntry.slice(0, eqIdx);\n      const value = baggageEntry.slice(eqIdx + 1);\n      return [key, value].map(keyOrValue => {\n        try {\n          return decodeURIComponent(keyOrValue.trim());\n        } catch {\n          // We ignore errors here, e.g. if the value cannot be URL decoded.\n          // This will then be skipped in the next step\n          return;\n        }\n      });\n    })\n    .reduce<Record<string, string>>((acc, [key, value]) => {\n      if (key && value) {\n        acc[key] = value;\n      }\n      return acc;\n    }, {});\n}\n\n/**\n * Turns a flat object (key-value pairs) into a baggage header, which is also just key-value pairs.\n *\n * @param object The object to turn into a baggage header.\n * @returns a baggage header string, or `undefined` if the object didn't have any values, since an empty baggage header\n * is not spec compliant.\n */\nexport function objectToBaggageHeader(object: Record<string, string>): string | undefined {\n  if (Object.keys(object).length === 0) {\n    // An empty baggage header is not spec compliant: We return undefined.\n    return undefined;\n  }\n\n  return Object.entries(object).reduce((baggageHeader, [objectKey, objectValue], currentIndex) => {\n    const baggageEntry = `${encodeURIComponent(objectKey)}=${encodeURIComponent(objectValue)}`;\n    const newBaggageHeader = currentIndex === 0 ? baggageEntry : `${baggageHeader},${baggageEntry}`;\n    if (newBaggageHeader.length > MAX_BAGGAGE_STRING_LENGTH) {\n      DEBUG_BUILD &&\n        debug.warn(\n          `Not adding key: ${objectKey} with val: ${objectValue} to baggage header due to exceeding baggage size limits.`,\n        );\n      return baggageHeader;\n    } else {\n      return newBaggageHeader;\n    }\n  }, '');\n}\n\n/**\n * Merge two baggage headers into one.\n * - Sentry-specific entries (keys starting with \"sentry-\") from the new\n *   baggage take precedence\n * - Non-Sentry entries from existing baggage take precedence\n *\n * The order of the existing baggage will be preserved, and new entries will\n * be added to the end.\n *\n * This matches the behavior of OTEL's propagation.inject() which uses\n * `baggage.setEntry()`  to overwrite existing entries with the same key.\n */\nexport function mergeBaggageHeaders<Existing extends string | string[] | number | undefined>(\n  existing: Existing,\n  incoming: string,\n): string | undefined | Existing {\n  if (!existing) {\n    return incoming;\n  }\n\n  const existingEntries = parseBaggageHeader(existing);\n  const incomingEntries = parseBaggageHeader(incoming);\n\n  if (!incomingEntries) {\n    return existing;\n  }\n\n  // 1. All non-sentry entries from existing are kept\n  // 2. All sentry- entries from the new baggage are retained\n  // 3. If sentry- entries present in new, ignore from old, else keep from old.\n  // 4. Non-sentry entries from new are only kept if not in existing.\n\n  const merged: Record<string, string> = {};\n\n  // partition incoming entries into sentry and non-sentry prefixed\n  let hasNewSentryEntries = false;\n  const newSentryEntries: Record<string, string> = {};\n  const newNonSentryEntries: Record<string, string> = {};\n  for (const [key, value] of Object.entries(incomingEntries)) {\n    if (key.startsWith(SENTRY_BAGGAGE_KEY_PREFIX)) {\n      newSentryEntries[key] = value;\n      hasNewSentryEntries = true;\n    } else {\n      newNonSentryEntries[key] = value;\n    }\n  }\n\n  // If new baggage contains at least one sentry- value, we remove all old\n  // sentry- values otherwise, we keep old sentry- values. If we don't remove\n  // old sentry- values, we end up with an inconsistent dynamic sampling\n  // context propagation.\n  if (existingEntries) {\n    for (const [key, value] of Object.entries(existingEntries)) {\n      if (!hasNewSentryEntries || !key.startsWith(SENTRY_BAGGAGE_KEY_PREFIX)) {\n        merged[key] = value;\n      }\n    }\n  }\n\n  // Assign new sentry fields.\n  if (hasNewSentryEntries) {\n    Object.assign(merged, newSentryEntries);\n  }\n\n  // assign new non-sentry fields not found on existing object.\n  for (const [key, value] of Object.entries(newNonSentryEntries)) {\n    merged[key] ??= value;\n  }\n\n  return objectToBaggageHeader(merged);\n}\n", "import type { Client } from '../client';\nimport { DEBUG_BUILD } from '../debug-build';\nimport type { DsnComponents, DsnLike, DsnProtocol } from '../types/dsn';\nimport { consoleSandbox, debug } from './debug-logger';\n\n/** Regular expression used to extract org ID from a DSN host. */\nconst ORG_ID_REGEX = /^o(\\d+)\\./;\n\n/** Regular expression used to parse a Dsn. */\nconst DSN_REGEX = /^(?:(\\w+):)\\/\\/(?:(\\w+)(?::(\\w+)?)?@)((?:\\[[:.%\\w]+\\]|[\\w.-]+))(?::(\\d+))?\\/(.+)/;\n\nfunction isValidProtocol(protocol?: string): protocol is DsnProtocol {\n  return protocol === 'http' || protocol === 'https';\n}\n\n/**\n * Renders the string representation of this Dsn.\n *\n * By default, this will render the public representation without the password\n * component. To get the deprecated private representation, set `withPassword`\n * to true.\n *\n * @param withPassword When set to true, the password will be included.\n */\nexport function dsnToString(dsn: DsnComponents, withPassword: boolean = false): string {\n  const { host, path, pass, port, projectId, protocol, publicKey } = dsn;\n  return (\n    `${protocol}://${publicKey}${withPassword && pass ? `:${pass}` : ''}` +\n    `@${host}${port ? `:${port}` : ''}/${path ? `${path}/` : path}${projectId}`\n  );\n}\n\n/**\n * Parses a Dsn from a given string.\n *\n * @param str A Dsn as string\n * @returns Dsn as DsnComponents or undefined if @param str is not a valid DSN string\n */\nexport function dsnFromString(str: string): DsnComponents | undefined {\n  const match = DSN_REGEX.exec(str);\n\n  if (!match) {\n    // This should be logged to the console\n    consoleSandbox(() => {\n      // eslint-disable-next-line no-console\n      console.error(`Invalid Sentry Dsn: ${str}`);\n    });\n    return undefined;\n  }\n\n  const [protocol, publicKey, pass = '', host = '', port = '', lastPath = ''] = match.slice(1);\n  let path = '';\n  let projectId = lastPath;\n\n  const split = projectId.split('/');\n  if (split.length > 1) {\n    path = split.slice(0, -1).join('/');\n    projectId = split.pop() as string;\n  }\n\n  if (projectId) {\n    const projectMatch = projectId.match(/^\\d+/);\n    if (projectMatch) {\n      projectId = projectMatch[0];\n    }\n  }\n\n  return dsnFromComponents({ host, pass, path, projectId, port, protocol: protocol as DsnProtocol, publicKey });\n}\n\nfunction dsnFromComponents(components: DsnComponents): DsnComponents {\n  return {\n    protocol: components.protocol,\n    publicKey: components.publicKey || '',\n    pass: components.pass || '',\n    host: components.host,\n    port: components.port || '',\n    path: components.path || '',\n    projectId: components.projectId,\n  };\n}\n\nfunction validateDsn(dsn: DsnComponents): boolean {\n  if (!DEBUG_BUILD) {\n    return true;\n  }\n\n  const { port, projectId, protocol } = dsn;\n\n  const requiredComponents: ReadonlyArray<keyof DsnComponents> = ['protocol', 'publicKey', 'host', 'projectId'];\n  const hasMissingRequiredComponent = requiredComponents.find(component => {\n    if (!dsn[component]) {\n      debug.error(`Invalid Sentry Dsn: ${component} missing`);\n      return true;\n    }\n    return false;\n  });\n\n  if (hasMissingRequiredComponent) {\n    return false;\n  }\n\n  if (!projectId.match(/^\\d+$/)) {\n    debug.error(`Invalid Sentry Dsn: Invalid projectId ${projectId}`);\n    return false;\n  }\n\n  if (!isValidProtocol(protocol)) {\n    debug.error(`Invalid Sentry Dsn: Invalid protocol ${protocol}`);\n    return false;\n  }\n\n  if (port && isNaN(parseInt(port, 10))) {\n    debug.error(`Invalid Sentry Dsn: Invalid port ${port}`);\n    return false;\n  }\n\n  return true;\n}\n\n/**\n * Extract the org ID from a DSN host.\n *\n * @param host The host from a DSN\n * @returns The org ID if found, undefined otherwise\n */\nexport function extractOrgIdFromDsnHost(host: string): string | undefined {\n  const match = host.match(ORG_ID_REGEX);\n\n  return match?.[1];\n}\n\n/**\n *  Returns the organization ID of the client.\n *\n *  The organization ID is extracted from the DSN. If the client options include a `orgId`, this will always take precedence.\n */\nexport function extractOrgIdFromClient(client: Client): string | undefined {\n  const options = client.getOptions();\n\n  const { host } = client.getDsn() || {};\n\n  let org_id: string | undefined;\n\n  if (options.orgId) {\n    org_id = String(options.orgId);\n  } else if (host) {\n    org_id = extractOrgIdFromDsnHost(host);\n  }\n\n  return org_id;\n}\n\n/**\n * Creates a valid Sentry Dsn object, identifying a Sentry instance and project.\n * @returns a valid DsnComponents object or `undefined` if @param from is an invalid DSN source\n */\nexport function makeDsn(from: DsnLike): DsnComponents | undefined {\n  const components = typeof from === 'string' ? dsnFromString(from) : dsnFromComponents(from);\n  if (!components || !validateDsn(components)) {\n    return undefined;\n  }\n  return components;\n}\n", "/**\n * Parse a sample rate from a given value.\n * This will either return a boolean or number sample rate, if the sample rate is valid (between 0 and 1).\n * If a string is passed, we try to convert it to a number.\n *\n * Any invalid sample rate will return `undefined`.\n */\nexport function parseSampleRate(sampleRate: unknown): number | undefined {\n  if (typeof sampleRate === 'boolean') {\n    return Number(sampleRate);\n  }\n\n  const rate = typeof sampleRate === 'string' ? parseFloat(sampleRate) : sampleRate;\n  if (typeof rate !== 'number' || isNaN(rate) || rate < 0 || rate > 1) {\n    return undefined;\n  }\n\n  return rate;\n}\n", "import type { Client } from '../client';\nimport type { DynamicSamplingContext } from '../types/envelope';\nimport type { PropagationContext } from '../types/tracing';\nimport type { TraceparentData } from '../types/transaction';\nimport { debug } from '../utils/debug-logger';\nimport { baggageHeaderToDynamicSamplingContext } from './baggage';\nimport { extractOrgIdFromClient } from './dsn';\nimport { parseSampleRate } from './parseSampleRate';\nimport { generateSpanId, generateTraceId } from './propagationContext';\nimport { safeMathRandom } from './randomSafeContext';\n\n// oxlint-disable-next-line sdk/no-regexp-constructor -- RegExp is used for readability here\nexport const TRACEPARENT_REGEXP = new RegExp(\n  '^[ \\\\t]*' + // whitespace\n    '([0-9a-f]{32})?' + // trace_id\n    '-?([0-9a-f]{16})?' + // span_id\n    '-?([01])?' + // sampled\n    '[ \\\\t]*$', // whitespace\n);\n\n/**\n * Extract transaction context data from a `sentry-trace` header.\n *\n * This is terrible naming but the function has nothing to do with the W3C traceparent header.\n * It can only parse the `sentry-trace` header and extract the \"trace parent\" data.\n *\n * @param traceparent Traceparent string\n *\n * @returns Object containing data from the header, or undefined if traceparent string is malformed\n */\nexport function extractTraceparentData(traceparent?: string): TraceparentData | undefined {\n  if (!traceparent) {\n    return undefined;\n  }\n\n  const matches = traceparent.match(TRACEPARENT_REGEXP);\n  if (!matches) {\n    return undefined;\n  }\n\n  let parentSampled: boolean | undefined;\n  if (matches[3] === '1') {\n    parentSampled = true;\n  } else if (matches[3] === '0') {\n    parentSampled = false;\n  }\n\n  return {\n    traceId: matches[1],\n    parentSampled,\n    parentSpanId: matches[2],\n  };\n}\n\n/**\n * Create a propagation context from incoming headers or\n * creates a minimal new one if the headers are undefined.\n */\nexport function propagationContextFromHeaders(\n  sentryTrace: string | undefined,\n  baggage: string | number | boolean | string[] | null | undefined,\n): PropagationContext {\n  const traceparentData = extractTraceparentData(sentryTrace);\n  const dynamicSamplingContext = baggageHeaderToDynamicSamplingContext(baggage);\n\n  if (!traceparentData?.traceId) {\n    return {\n      traceId: generateTraceId(),\n      sampleRand: safeMathRandom(),\n    };\n  }\n\n  const sampleRand = getSampleRandFromTraceparentAndDsc(traceparentData, dynamicSamplingContext);\n\n  // The sample_rand on the DSC needs to be generated based on traceparent + baggage.\n  if (dynamicSamplingContext) {\n    dynamicSamplingContext.sample_rand = sampleRand.toString();\n  }\n\n  const { traceId, parentSpanId, parentSampled } = traceparentData;\n\n  return {\n    traceId,\n    parentSpanId,\n    sampled: parentSampled,\n    dsc: dynamicSamplingContext || {}, // If we have traceparent data but no DSC it means we are not head of trace and we must freeze it\n    sampleRand,\n  };\n}\n\n/**\n * Create sentry-trace header from span context values.\n */\nexport function generateSentryTraceHeader(\n  traceId: string | undefined = generateTraceId(),\n  spanId: string | undefined = generateSpanId(),\n  sampled?: boolean,\n): string {\n  let sampledString = '';\n  if (sampled !== undefined) {\n    sampledString = sampled ? '-1' : '-0';\n  }\n  return `${traceId}-${spanId}${sampledString}`;\n}\n\n/**\n * Creates a W3C traceparent header from the given trace and span ids.\n */\nexport function generateTraceparentHeader(\n  traceId: string | undefined = generateTraceId(),\n  spanId: string | undefined = generateSpanId(),\n  sampled?: boolean,\n): string {\n  return `00-${traceId}-${spanId}-${sampled ? '01' : '00'}`;\n}\n\n/**\n * Given any combination of an incoming trace, generate a sample rand based on its defined semantics.\n *\n * Read more: https://develop.sentry.dev/sdk/telemetry/traces/#propagated-random-value\n */\nfunction getSampleRandFromTraceparentAndDsc(\n  traceparentData: TraceparentData | undefined,\n  dsc: Partial<DynamicSamplingContext> | undefined,\n): number {\n  // When there is an incoming sample rand use it.\n  const parsedSampleRand = parseSampleRate(dsc?.sample_rand);\n  if (parsedSampleRand !== undefined) {\n    return parsedSampleRand;\n  }\n\n  // Otherwise, if there is an incoming sampling decision + sample rate, generate a sample rand that would lead to the same sampling decision.\n  const parsedSampleRate = parseSampleRate(dsc?.sample_rate);\n  if (parsedSampleRate && traceparentData?.parentSampled !== undefined) {\n    return traceparentData.parentSampled\n      ? // Returns a sample rand with positive sampling decision [0, sampleRate)\n        safeMathRandom() * parsedSampleRate\n      : // Returns a sample rand with negative sampling decision [sampleRate, 1)\n        parsedSampleRate + safeMathRandom() * (1 - parsedSampleRate);\n  } else {\n    // If nothing applies, return a random sample rand.\n    return safeMathRandom();\n  }\n}\n\n/**\n * Determines whether a new trace should be continued based on the provided baggage org ID and the client's `strictTraceContinuation` option.\n * If the trace should not be continued, a new trace will be started.\n *\n * The result is dependent on the `strictTraceContinuation` option in the client.\n * See https://develop.sentry.dev/sdk/telemetry/traces/#stricttracecontinuation\n */\nexport function shouldContinueTrace(client: Client, baggageOrgId?: string): boolean {\n  const clientOrgId = extractOrgIdFromClient(client);\n\n  // Case: baggage orgID and Client orgID don't match - always start new trace\n  if (baggageOrgId && clientOrgId && baggageOrgId !== clientOrgId) {\n    debug.log(\n      `Won't continue trace because org IDs don't match (incoming baggage: ${baggageOrgId}, SDK options: ${clientOrgId})`,\n    );\n    return false;\n  }\n\n  const strictTraceContinuation = client.getOptions().strictTraceContinuation || false; // default for `strictTraceContinuation` is `false`\n\n  if (strictTraceContinuation) {\n    // With strict continuation enabled, don't continue trace if:\n    // - Baggage has orgID, but Client doesn't have one\n    // - Client has orgID, but baggage doesn't have one\n    if ((baggageOrgId && !clientOrgId) || (!baggageOrgId && clientOrgId)) {\n      debug.log(\n        `Starting a new trace because strict trace continuation is enabled but one org ID is missing (incoming baggage: ${baggageOrgId}, Sentry client: ${clientOrgId})`,\n      );\n      return false;\n    }\n  }\n\n  return true;\n}\n", "// oxlint-disable max-lines\nimport { getAsyncContextStrategy } from '../asyncContext';\nimport type { RawAttributes } from '../attributes';\nimport { serializeAttributes } from '../attributes';\nimport { getMainCarrier } from '../carrier';\nimport { getCurrentScope } from '../currentScopes';\nimport {\n  SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME,\n  SEMANTIC_ATTRIBUTE_SENTRY_OP,\n  SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n  SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,\n  SEMANTIC_ATTRIBUTE_SENTRY_STATUS_MESSAGE,\n} from '../semanticAttributes';\nimport type { SentrySpan } from '../tracing/sentrySpan';\nimport { SPAN_STATUS_OK, SPAN_STATUS_UNSET } from '../tracing/spanstatus';\nimport { getCapturedScopesOnSpan } from '../tracing/utils';\nimport type { TraceContext } from '../types/context';\nimport type { SpanLink, SpanLinkJSON } from '../types/link';\nimport type {\n  SerializedStreamedSpan,\n  Span,\n  SpanAttributes,\n  SpanJSON,\n  SpanOrigin,\n  SpanTimeInput,\n  StreamedSpanJSON,\n} from '../types/span';\nimport type { SpanStatus } from '../types/spanStatus';\nimport { addNonEnumerableProperty } from '../utils/object';\nimport { generateSpanId } from '../utils/propagationContext';\nimport { timestampInSeconds } from '../utils/time';\nimport { generateSentryTraceHeader, generateTraceparentHeader } from '../utils/tracing';\nimport { consoleSandbox } from './debug-logger';\nimport { _getSpanForScope } from './spanOnScope';\n\n// These are aligned with OpenTelemetry trace flags\nexport const TRACE_FLAG_NONE = 0x0;\nexport const TRACE_FLAG_SAMPLED = 0x1;\n\nlet hasShownSpanDropWarning = false;\n\n/**\n * Convert a span to a trace context, which can be sent as the `trace` context in an event.\n * By default, this will only include trace_id, span_id & parent_span_id.\n * If `includeAllData` is true, it will also include data, op, status & origin.\n */\nexport function spanToTransactionTraceContext(span: Span): TraceContext {\n  const { spanId: span_id, traceId: trace_id } = span.spanContext();\n  const { data, op, parent_span_id, status, origin, links } = spanToJSON(span);\n\n  return {\n    parent_span_id,\n    span_id,\n    trace_id,\n    data,\n    op,\n    status,\n    origin,\n    links,\n  };\n}\n\n/**\n * Convert a span to a trace context, which can be sent as the `trace` context in a non-transaction event.\n */\nexport function spanToTraceContext(span: Span): TraceContext {\n  const { spanId, traceId: trace_id, isRemote } = span.spanContext();\n\n  // If the span is remote, we use a random/virtual span as span_id to the trace context,\n  // and the remote span as parent_span_id\n  const parent_span_id = isRemote ? spanId : spanToJSON(span).parent_span_id;\n  const scope = getCapturedScopesOnSpan(span).scope;\n\n  const span_id = isRemote ? scope?.getPropagationContext().propagationSpanId || generateSpanId() : spanId;\n\n  return {\n    parent_span_id,\n    span_id,\n    trace_id,\n  };\n}\n\n/**\n * Convert a Span to a Sentry trace header.\n */\nexport function spanToTraceHeader(span: Span): string {\n  const { traceId, spanId } = span.spanContext();\n  const sampled = spanIsSampled(span);\n  return generateSentryTraceHeader(traceId, spanId, sampled);\n}\n\n/**\n * Convert a Span to a W3C traceparent header.\n */\nexport function spanToTraceparentHeader(span: Span): string {\n  const { traceId, spanId } = span.spanContext();\n  const sampled = spanIsSampled(span);\n  return generateTraceparentHeader(traceId, spanId, sampled);\n}\n\n/**\n *  Converts the span links array to a flattened version to be sent within an envelope.\n *\n *  If the links array is empty, it returns `undefined` so the empty value can be dropped before it's sent.\n */\nexport function convertSpanLinksForEnvelope(links?: SpanLink[]): SpanLinkJSON[] | undefined {\n  if (links && links.length > 0) {\n    return links.map(({ context: { spanId, traceId, traceFlags, ...restContext }, attributes }) => ({\n      span_id: spanId,\n      trace_id: traceId,\n      sampled: traceFlags === TRACE_FLAG_SAMPLED,\n      attributes,\n      ...restContext,\n    }));\n  } else {\n    return undefined;\n  }\n}\n\n/**\n * Converts the span links array to a flattened version with serialized attributes for V2 spans.\n *\n * If the links array is empty, it returns `undefined` so the empty value can be dropped before it's sent.\n */\nexport function getStreamedSpanLinks(\n  links?: SpanLink[],\n): SpanLinkJSON<RawAttributes<Record<string, unknown>>>[] | undefined {\n  if (links?.length) {\n    return links.map(({ context: { spanId, traceId, traceFlags }, attributes }) => ({\n      span_id: spanId,\n      trace_id: traceId,\n      sampled: traceFlags === TRACE_FLAG_SAMPLED,\n      attributes,\n    }));\n  } else {\n    return undefined;\n  }\n}\n\n/**\n * Convert a span time input into a timestamp in seconds.\n */\nexport function spanTimeInputToSeconds(input: SpanTimeInput | undefined): number {\n  if (typeof input === 'number') {\n    return ensureTimestampInSeconds(input);\n  }\n\n  if (Array.isArray(input)) {\n    // See {@link HrTime} for the array-based time format\n    return input[0] + input[1] / 1e9;\n  }\n\n  if (input instanceof Date) {\n    return ensureTimestampInSeconds(input.getTime());\n  }\n\n  return timestampInSeconds();\n}\n\n/**\n * Converts a timestamp to second, if it was in milliseconds, or keeps it as second.\n */\nfunction ensureTimestampInSeconds(timestamp: number): number {\n  const isMs = timestamp > 9999999999;\n  return isMs ? timestamp / 1000 : timestamp;\n}\n\n/**\n * Convert a span to a JSON representation.\n */\n// Note: Because of this, we currently have a circular type dependency (which we opted out of in package.json).\n// This is not avoidable as we need `spanToJSON` in `spanUtils.ts`, which in turn is needed by `span.ts` for backwards compatibility.\n// And `spanToJSON` needs the Span class from `span.ts` to check here.\nexport function spanToJSON(span: Span): SpanJSON {\n  if (spanIsSentrySpan(span)) {\n    return span.getSpanJSON();\n  }\n\n  const { spanId: span_id, traceId: trace_id } = span.spanContext();\n\n  // Handle a span from @opentelemetry/sdk-base-trace's `Span` class\n  if (spanIsOpenTelemetrySdkTraceBaseSpan(span)) {\n    const { attributes, startTime, name, endTime, status, links } = span;\n\n    return {\n      span_id,\n      trace_id,\n      data: attributes,\n      description: name,\n      parent_span_id: getOtelParentSpanId(span),\n      start_timestamp: spanTimeInputToSeconds(startTime),\n      // This is [0,0] by default in OTEL, in which case we want to interpret this as no end time\n      timestamp: spanTimeInputToSeconds(endTime) || undefined,\n      status: getStatusMessage(status),\n      op: attributes[SEMANTIC_ATTRIBUTE_SENTRY_OP],\n      origin: attributes[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN] as SpanOrigin | undefined,\n      links: convertSpanLinksForEnvelope(links),\n    };\n  }\n\n  // Finally, at least we have `spanContext()`....\n  // This should not actually happen in reality, but we need to handle it for type safety.\n  return {\n    span_id,\n    trace_id,\n    start_timestamp: 0,\n    data: {},\n  };\n}\n\n/**\n * Convert a span to the intermediate {@link StreamedSpanJSON} representation.\n */\nexport function spanToStreamedSpanJSON(span: Span): StreamedSpanJSON {\n  if (spanIsSentrySpan(span)) {\n    return span.getStreamedSpanJSON();\n  }\n\n  const { spanId: span_id, traceId: trace_id } = span.spanContext();\n\n  // Handle a span from @opentelemetry/sdk-base-trace's `Span` class\n  if (spanIsOpenTelemetrySdkTraceBaseSpan(span)) {\n    const { attributes, startTime, name, endTime, status, links } = span;\n\n    return {\n      name,\n      span_id,\n      trace_id,\n      parent_span_id: getOtelParentSpanId(span),\n      start_timestamp: spanTimeInputToSeconds(startTime),\n      end_timestamp: spanTimeInputToSeconds(endTime),\n      is_segment: span === INTERNAL_getSegmentSpan(span),\n      status: getSimpleStatus(status),\n      attributes: addStatusMessageAttribute(attributes, status),\n      links: getStreamedSpanLinks(links),\n    };\n  }\n\n  // Finally, as a fallback, at least we have `spanContext()`....\n  // This should not actually happen in reality, but we need to handle it for type safety.\n  return {\n    span_id,\n    trace_id,\n    start_timestamp: 0,\n    name: '',\n    end_timestamp: 0,\n    status: 'ok',\n    is_segment: span === INTERNAL_getSegmentSpan(span),\n  };\n}\n\n/**\n * In preparation for the next major of OpenTelemetry, we want to support\n * looking up the parent span id according to the new API\n * In OTel v1, the parent span id is accessed as `parentSpanId`\n * In OTel v2, the parent span id is accessed as `spanId` on the `parentSpanContext`\n */\nfunction getOtelParentSpanId(span: OpenTelemetrySdkTraceBaseSpan): string | undefined {\n  return 'parentSpanId' in span\n    ? span.parentSpanId\n    : 'parentSpanContext' in span\n      ? (span.parentSpanContext as { spanId?: string } | undefined)?.spanId\n      : undefined;\n}\n\n/**\n * Converts a {@link StreamedSpanJSON} to a {@link SerializedSpan}.\n * This is the final serialized span format that is sent to Sentry.\n * The returned serilaized spans must not be consumed by users or SDK integrations.\n */\nexport function streamedSpanJsonToSerializedSpan(spanJson: StreamedSpanJSON): SerializedStreamedSpan {\n  return {\n    ...spanJson,\n    attributes: serializeAttributes(spanJson.attributes),\n    links: spanJson.links?.map(link => ({\n      ...link,\n      attributes: serializeAttributes(link.attributes),\n    })),\n  };\n}\n\nfunction spanIsOpenTelemetrySdkTraceBaseSpan(span: Span): span is OpenTelemetrySdkTraceBaseSpan {\n  const castSpan = span as Partial<OpenTelemetrySdkTraceBaseSpan>;\n  return !!castSpan.attributes && !!castSpan.startTime && !!castSpan.name && !!castSpan.endTime && !!castSpan.status;\n}\n\n/** Exported only for tests. */\nexport interface OpenTelemetrySdkTraceBaseSpan extends Span {\n  attributes: SpanAttributes;\n  startTime: SpanTimeInput;\n  name: string;\n  status: SpanStatus;\n  endTime: SpanTimeInput;\n  parentSpanId?: string;\n  links?: SpanLink[];\n}\n\n/**\n * Sadly, due to circular dependency checks we cannot actually import the Span class here and check for instanceof.\n * :( So instead we approximate this by checking if it has the `getSpanJSON` method.\n */\nexport function spanIsSentrySpan(span: Span): span is SentrySpan {\n  return typeof (span as SentrySpan).getSpanJSON === 'function';\n}\n\n/**\n * Returns true if a span is sampled.\n * In most cases, you should just use `span.isRecording()` instead.\n * However, this has a slightly different semantic, as it also returns false if the span is finished.\n * So in the case where this distinction is important, use this method.\n */\nexport function spanIsSampled(span: Span): boolean {\n  // We align our trace flags with the ones OpenTelemetry use\n  // So we also check for sampled the same way they do.\n  const { traceFlags } = span.spanContext();\n  return traceFlags === TRACE_FLAG_SAMPLED;\n}\n\n/** Get the status message to use for a JSON representation of a span. */\nexport function getStatusMessage(status: SpanStatus | undefined): string | undefined {\n  if (!status || status.code === SPAN_STATUS_UNSET) {\n    return undefined;\n  }\n\n  if (status.code === SPAN_STATUS_OK) {\n    return 'ok';\n  }\n\n  return status.message || 'internal_error';\n}\n\n/**\n * Convert the various statuses to the simple ones expected by Sentry for streamed spans ('ok' is default).\n */\nexport function getSimpleStatus(status: SpanStatus | undefined): 'ok' | 'error' {\n  return !status ||\n    status.code === SPAN_STATUS_OK ||\n    status.code === SPAN_STATUS_UNSET ||\n    status.message === 'cancelled'\n    ? 'ok'\n    : 'error';\n}\n\n/**\n * Returns the span's attributes with the SEMANTIC_ATTRIBUTE_SENTRY_STATUS_MESSAGE attribute added\n * if the span has an error status message worth preserving.\n *\n * An explicitly set attribute is never overwritten.\n */\nexport function addStatusMessageAttribute(\n  attributes: SpanAttributes,\n  status: SpanStatus | undefined,\n): RawAttributes<Record<string, unknown>> {\n  const statusMessage = getSimpleStatus(status) === 'error' ? status?.message : undefined;\n  return {\n    ...(statusMessage && { [SEMANTIC_ATTRIBUTE_SENTRY_STATUS_MESSAGE]: statusMessage }),\n    ...attributes,\n  };\n}\n\nconst CHILD_SPANS_FIELD = '_sentryChildSpans';\nconst ROOT_SPAN_FIELD = '_sentryRootSpan';\n\ntype SpanWithPotentialChildren = Span & {\n  [CHILD_SPANS_FIELD]?: Set<Span>;\n  [ROOT_SPAN_FIELD]?: Span;\n};\n\n/**\n * Adds an opaque child span reference to a span.\n */\nexport function addChildSpanToSpan(span: SpanWithPotentialChildren, childSpan: Span): void {\n  // We store the root span reference on the child span\n  // We need this for `getRootSpan()` to work\n  const rootSpan = span[ROOT_SPAN_FIELD] || span;\n  addNonEnumerableProperty(childSpan as SpanWithPotentialChildren, ROOT_SPAN_FIELD, rootSpan);\n\n  // `_sentryChildSpans` exists only so `getSpanDescendants()` can walk the tree when the segment span\n  // is sent, and that walk stops at an unsampled span without ever visiting its children. So a child\n  // tracked here would be held for the parent's lifetime and never read.\n  if (!spanIsSampled(span)) {\n    return;\n  }\n\n  // Once the segment span stopped recording, the tree has been read for the last time, and a child\n  // starting now belongs to whatever segment comes next: it is re-emitted on its own instead. Tracking\n  // it here would pin it for as long as the parent lives, which for a span left active in an async\n  // context (e.g. a framework boot span captured by a queue consumer) is the rest of the process. Only\n  // a parent that is itself still recording keeps tracking, so a late child that outlives its segment\n  // still collects the subtree it is re-emitted with.\n  if (!span.isRecording() && !rootSpan.isRecording()) {\n    return;\n  }\n\n  // We store a list of child spans on the parent span\n  // We need this for `getSpanDescendants()` to work\n  if (span[CHILD_SPANS_FIELD]) {\n    span[CHILD_SPANS_FIELD].add(childSpan);\n  } else {\n    addNonEnumerableProperty(span, CHILD_SPANS_FIELD, new Set([childSpan]));\n  }\n}\n\n/** This is only used internally by Idle Spans. */\nexport function removeChildSpanFromSpan(span: SpanWithPotentialChildren, childSpan: Span): void {\n  if (span[CHILD_SPANS_FIELD]) {\n    span[CHILD_SPANS_FIELD].delete(childSpan);\n  }\n}\n\n/**\n * Returns an array of the given span and all of its descendants.\n */\nexport function getSpanDescendants(span: SpanWithPotentialChildren): Span[] {\n  const resultSet = new Set<Span>();\n\n  function addSpanChildren(span: SpanWithPotentialChildren): void {\n    // This exit condition is required to not infinitely loop in case of a circular dependency.\n    if (resultSet.has(span)) {\n      return;\n      // We want to ignore unsampled spans (e.g. non recording spans)\n    } else if (spanIsSampled(span)) {\n      resultSet.add(span);\n      const childSpans = span[CHILD_SPANS_FIELD] ? Array.from(span[CHILD_SPANS_FIELD]) : [];\n      for (const childSpan of childSpans) {\n        addSpanChildren(childSpan);\n      }\n    }\n  }\n\n  addSpanChildren(span);\n\n  return Array.from(resultSet);\n}\n\n/**\n * Returns the root span of a given span.\n */\nexport const getRootSpan = INTERNAL_getSegmentSpan;\n\n/**\n * Returns the segment span of a given span.\n */\nexport function INTERNAL_getSegmentSpan(span: SpanWithPotentialChildren): Span {\n  return span[ROOT_SPAN_FIELD] || span;\n}\n\n/**\n * Returns the currently active span.\n */\nexport function getActiveSpan(): Span | undefined {\n  const carrier = getMainCarrier();\n  const acs = getAsyncContextStrategy(carrier);\n  if (acs.getActiveSpan) {\n    return acs.getActiveSpan();\n  }\n\n  return _getSpanForScope(getCurrentScope());\n}\n\n/**\n * Logs a warning once if `beforeSendSpan` is used to drop spans.\n */\nexport function showSpanDropWarning(): void {\n  if (!hasShownSpanDropWarning) {\n    consoleSandbox(() => {\n      // eslint-disable-next-line no-console\n      console.warn(\n        '[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.',\n      );\n    });\n    hasShownSpanDropWarning = true;\n  }\n}\n\n/**\n * Updates the name of the given span and ensures that the span name is not\n * overwritten by the Sentry SDK.\n *\n * Use this function instead of `span.updateName()` if you want to make sure that\n * your name is kept. For some spans, for example root `http.server` spans the\n * Sentry SDK would otherwise overwrite the span name with a high-quality name\n * it infers when the span ends.\n *\n * Use this function in server code or when your span is started on the server\n * and on the client (browser). If you only update a span name on the client,\n * you can also use `span.updateName()` the SDK does not overwrite the name.\n *\n * @param span - The span to update the name of.\n * @param name - The name to set on the span.\n */\nexport function updateSpanName(span: Span, name: string): void {\n  span.updateName(name);\n  span.setAttributes({\n    [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'custom',\n    [SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME]: name,\n  });\n}\n", "import { DEBUG_BUILD } from '../debug-build';\nimport { addGlobalErrorInstrumentationHandler } from '../instrument/globalError';\nimport { addGlobalUnhandledRejectionInstrumentationHandler } from '../instrument/globalUnhandledRejection';\nimport { debug } from '../utils/debug-logger';\nimport { getActiveSpan, getRootSpan } from '../utils/spanUtils';\nimport { SPAN_STATUS_ERROR } from './spanstatus';\n\nlet errorsInstrumented = false;\n\n/**  Only exposed for testing */\nexport function _resetErrorsInstrumented(): void {\n  errorsInstrumented = false;\n}\n\n/**\n * Ensure that global errors automatically set the active span status.\n */\nexport function registerSpanErrorInstrumentation(): void {\n  if (errorsInstrumented) {\n    return;\n  }\n\n  /**\n   * If an error or unhandled promise occurs, we mark the active root span as failed\n   */\n  function errorCallback(): void {\n    const activeSpan = getActiveSpan();\n    const rootSpan = activeSpan && getRootSpan(activeSpan);\n    if (rootSpan) {\n      const message = 'internal_error';\n      DEBUG_BUILD && debug.log(`[Tracing] Root span: ${message} -> Global error occurred`);\n      rootSpan.setStatus({ code: SPAN_STATUS_ERROR, message });\n    }\n  }\n\n  errorsInstrumented = true;\n  addGlobalErrorInstrumentationHandler(errorCallback);\n  addGlobalUnhandledRejectionInstrumentationHandler(errorCallback);\n}\n", "import { getClient } from '../currentScopes';\nimport type { CoreOptions } from '../types/options';\n\n// Treeshakable guard to remove all code related to tracing\ndeclare const __SENTRY_TRACING__: boolean | undefined;\n\n/**\n * Determines if span recording is currently enabled.\n *\n * Spans are recorded when at least one of `tracesSampleRate` and `tracesSampler`\n * is defined in the SDK config. This function does not make any assumption about\n * sampling decisions, it only checks if the SDK is configured to record spans.\n *\n * Important: This function only determines if span recording is enabled. Trace\n * continuation and propagation is separately controlled and not covered by this function.\n * If this function returns `false`, traces can still be propagated (which is what\n * we refer to by \"Tracing without Performance\")\n * @see https://develop.sentry.dev/sdk/telemetry/traces/tracing-without-performance/\n *\n * @param maybeOptions An SDK options object to be passed to this function.\n * If this option is not provided, the function will use the current client's options.\n */\nexport function hasSpansEnabled(\n  maybeOptions?: Pick<CoreOptions, 'tracesSampleRate' | 'tracesSampler'> | undefined,\n): boolean {\n  if (typeof __SENTRY_TRACING__ === 'boolean' && !__SENTRY_TRACING__) {\n    return false;\n  }\n\n  const options = maybeOptions || getClient()?.getOptions();\n  return (\n    !!options &&\n    // Note: This check is `!= null`, meaning \"nullish\". `0` is not \"nullish\", `undefined` and `null` are. (This comment was brought to you by 15 minutes of questioning life)\n    (options.tracesSampleRate != null || !!options.tracesSampler)\n  );\n}\n", "import { DEBUG_BUILD } from '../debug-build';\nimport type { ClientOptions, IgnoreSpanAttributeValue } from '../types/options';\nimport type { SpanJSON } from '../types/span';\nimport { debug } from './debug-logger';\nimport { isMatchingPattern } from './string';\n\nfunction logIgnoredSpan(droppedSpan: Pick<SpanJSON, 'description' | 'op'>): void {\n  debug.log(`Ignoring span ${droppedSpan.op} - ${droppedSpan.description} because it matches \\`ignoreSpans\\`.`);\n}\n\n/**\n * Check if a span should be ignored based on the ignoreSpans configuration.\n */\nexport function shouldIgnoreSpan(\n  span: Pick<SpanJSON, 'description' | 'op'> & { attributes?: Record<string, unknown> },\n  ignoreSpans: Required<ClientOptions>['ignoreSpans'],\n): boolean {\n  if (!ignoreSpans?.length) {\n    return false;\n  }\n\n  for (const pattern of ignoreSpans) {\n    if (isStringOrRegExp(pattern)) {\n      if (span.description && isMatchingPattern(span.description, pattern)) {\n        DEBUG_BUILD && logIgnoredSpan(span);\n        return true;\n      }\n      continue;\n    }\n\n    const hasAttributes = !!pattern.attributes && Object.keys(pattern.attributes).length > 0;\n    if (!pattern.name && !pattern.op && !hasAttributes) {\n      continue;\n    }\n\n    const nameMatches = pattern.name ? span.description && isMatchingPattern(span.description, pattern.name) : true;\n    const opMatches = pattern.op ? span.op && isMatchingPattern(span.op, pattern.op) : true;\n    const attrsMatch = pattern.attributes\n      ? Object.entries(pattern.attributes).every(([key, valuePattern]) =>\n          _matchesAttributeValue(span.attributes?.[key], valuePattern),\n        )\n      : true;\n\n    // This check here is only correct because we can guarantee that we ran `isMatchingPattern`\n    // for at least one of `nameMatches`, `opMatches`, or `attrsMatch`. So in contrary to how this looks,\n    // not all of op, name, and attributes actually have to match. This is the most efficient way to check\n    // for all combinations of name, op, and attribute patterns.\n    if (nameMatches && opMatches && attrsMatch) {\n      DEBUG_BUILD && logIgnoredSpan(span);\n      return true;\n    }\n  }\n\n  return false;\n}\n\nfunction _matchesAttributeValue(actual: unknown, pat: IgnoreSpanAttributeValue): boolean {\n  // String values support pattern matching\n  if (typeof actual === 'string' && (typeof pat === 'string' || pat instanceof RegExp)) {\n    return isMatchingPattern(actual, pat);\n  }\n  // Arrays: element-wise strict equality\n  if (Array.isArray(actual) && Array.isArray(pat)) {\n    return actual.length === pat.length && actual.every((v, i) => v === pat[i]);\n  }\n  // Primitives: strict equality\n  return actual === pat;\n}\n\n/**\n * Takes a list of spans, and a span that was dropped, and re-parents the child spans of the dropped span to the parent of the dropped span, if possible.\n * This mutates the spans array in place!\n */\nexport function reparentChildSpans(spans: SpanJSON[], dropSpan: SpanJSON): void {\n  const droppedSpanParentId = dropSpan.parent_span_id;\n  const droppedSpanId = dropSpan.span_id;\n\n  // This should generally not happen, as we do not apply this on root spans\n  // but to be safe, we just bail in this case\n  if (!droppedSpanParentId) {\n    return;\n  }\n\n  for (const span of spans) {\n    if (span.parent_span_id === droppedSpanId) {\n      span.parent_span_id = droppedSpanParentId;\n    }\n  }\n}\n\nfunction isStringOrRegExp(value: unknown): value is string | RegExp {\n  return typeof value === 'string' || value instanceof RegExp;\n}\n", "import type { EventDropReason } from '../types/clientreport';\nimport type {\n  SentrySpanArguments,\n  Span,\n  SpanAttributes,\n  SpanAttributeValue,\n  SpanContextData,\n  SpanTimeInput,\n} from '../types/span';\nimport type { SpanStatus } from '../types/spanStatus';\nimport { addNonEnumerableProperty } from '../utils/object';\nimport { generateSpanId, generateTraceId } from '../utils/propagationContext';\nimport { TRACE_FLAG_NONE } from '../utils/spanUtils';\n\ninterface SentryNonRecordingSpanArguments extends SentrySpanArguments {\n  dropReason?: EventDropReason;\n}\n\n// Brand used to detect non-recording spans via {@link spanIsNonRecordingSpan} without `instanceof`,\n// which is brittle when `@sentry/core` is duplicated across packages. We use `Symbol.for` so the key\n// is shared across copies of the module, and so user payloads (e.g. JSON) cannot spoof the marker.\nconst NON_RECORDING_SPAN_FIELD = Symbol.for('sentry.nonRecordingSpan');\n\n/**\n * A Sentry Span that is non-recording, meaning it will not be sent to Sentry.\n */\nexport class SentryNonRecordingSpan implements Span {\n  private _traceId: string;\n  private _spanId: string;\n\n  /**\n   * Reason why this span was dropped, if applicable ('ignored' or 'sample_rate').\n   * Used to propagate the correct client report outcome to descendant spans\n   * when span streaming is enabled.\n   */\n  public dropReason?: EventDropReason;\n\n  public constructor(spanContext: SentryNonRecordingSpanArguments = {}) {\n    this._traceId = spanContext.traceId || generateTraceId();\n    this._spanId = spanContext.spanId || generateSpanId();\n    this.dropReason = spanContext.dropReason;\n    addNonEnumerableProperty(this, NON_RECORDING_SPAN_FIELD, true);\n  }\n\n  /** @inheritdoc */\n  public spanContext(): SpanContextData {\n    return {\n      spanId: this._spanId,\n      traceId: this._traceId,\n      traceFlags: TRACE_FLAG_NONE,\n    };\n  }\n\n  /** @inheritdoc */\n  public end(_timestamp?: SpanTimeInput): void {}\n\n  /** @inheritdoc */\n  public setAttribute(_key: string, _value: SpanAttributeValue | undefined): this {\n    return this;\n  }\n\n  /** @inheritdoc */\n  public setAttributes(_values: SpanAttributes): this {\n    return this;\n  }\n\n  /** @inheritdoc */\n  public setStatus(_status: SpanStatus): this {\n    return this;\n  }\n\n  /** @inheritdoc */\n  public updateName(_name: string): this {\n    return this;\n  }\n\n  /** @inheritdoc */\n  public isRecording(): boolean {\n    return false;\n  }\n\n  /** @inheritdoc */\n  public addEvent(\n    _name: string,\n    _attributesOrStartTime?: SpanAttributes | SpanTimeInput,\n    _startTime?: SpanTimeInput,\n  ): this {\n    return this;\n  }\n\n  /** @inheritDoc */\n  public addLink(_link: unknown): this {\n    return this;\n  }\n\n  /** @inheritDoc */\n  public addLinks(_links: unknown[]): this {\n    return this;\n  }\n\n  /**\n   * This should generally not be used,\n   * but we need it for being compliant with the OTEL Span interface.\n   *\n   * @hidden\n   * @internal\n   */\n  public recordException(_exception: unknown, _time?: SpanTimeInput | undefined): void {\n    // noop\n  }\n}\n\n/**\n * Whether the given span is a {@link SentryNonRecordingSpan}.\n */\nexport function spanIsNonRecordingSpan(span: Span | undefined): span is SentryNonRecordingSpan {\n  return !!span && (span as { [NON_RECORDING_SPAN_FIELD]?: boolean })[NON_RECORDING_SPAN_FIELD] === true;\n}\n", "export const DEFAULT_ENVIRONMENT = 'production';\nexport const DEV_ENVIRONMENT = 'development';\n", "import type { Client } from '../client';\nimport { DEFAULT_ENVIRONMENT } from '../constants';\nimport { getClient } from '../currentScopes';\nimport type { Scope } from '../scope';\nimport {\n  SEMANTIC_ATTRIBUTE_SENTRY_PREVIOUS_TRACE_SAMPLE_RATE,\n  SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,\n  SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,\n} from '../semanticAttributes';\nimport type { DynamicSamplingContext } from '../types/envelope';\nimport type { Span } from '../types/span';\nimport { baggageHeaderToDynamicSamplingContext, dynamicSamplingContextToSentryBaggageHeader } from '../utils/baggage';\nimport { extractOrgIdFromClient } from '../utils/dsn';\nimport { hasSpansEnabled } from '../utils/hasSpansEnabled';\nimport { addNonEnumerableProperty } from '../utils/object';\nimport { getRootSpan, spanIsSampled, spanToJSON } from '../utils/spanUtils';\nimport { spanIsNonRecordingSpan } from './sentryNonRecordingSpan';\nimport { getCapturedScopesOnSpan } from './utils';\n\n/**\n * If you change this value, also update the terser plugin config to\n * avoid minification of the object property!\n */\nconst FROZEN_DSC_FIELD = '_frozenDsc';\n\ntype SpanWithMaybeDsc = Span & {\n  [FROZEN_DSC_FIELD]?: Partial<DynamicSamplingContext> | undefined;\n};\n\n/**\n * Freeze the given DSC on the given span.\n */\nexport function freezeDscOnSpan(span: Span, dsc: Partial<DynamicSamplingContext>): void {\n  const spanWithMaybeDsc = span as SpanWithMaybeDsc;\n  addNonEnumerableProperty(spanWithMaybeDsc, FROZEN_DSC_FIELD, dsc);\n}\n\n/**\n * Creates a dynamic sampling context from a client.\n *\n * Dispatches the `createDsc` lifecycle hook as a side effect.\n */\nexport function getDynamicSamplingContextFromClient(trace_id: string, client: Client): DynamicSamplingContext {\n  const options = client.getOptions();\n\n  const { publicKey: public_key } = client.getDsn() || {};\n\n  // Instead of conditionally adding non-undefined values, we add them and then remove them if needed\n  // otherwise, the order of baggage entries changes, which \"breaks\" a bunch of tests etc.\n  const dsc: DynamicSamplingContext = {\n    environment: options.environment || DEFAULT_ENVIRONMENT,\n    release: options.release,\n    public_key,\n    trace_id,\n    org_id: extractOrgIdFromClient(client),\n  };\n\n  client.emit('createDsc', dsc);\n\n  return dsc;\n}\n\n/**\n * Get the dynamic sampling context for the currently active scopes.\n */\nexport function getDynamicSamplingContextFromScope(client: Client, scope: Scope): Partial<DynamicSamplingContext> {\n  const propagationContext = scope.getPropagationContext();\n  return propagationContext.dsc || getDynamicSamplingContextFromClient(propagationContext.traceId, client);\n}\n\n/**\n * Creates a dynamic sampling context from a span (and client and scope)\n *\n * @param span the span from which a few values like the root span name and sample rate are extracted.\n *\n * @returns a dynamic sampling context\n */\nexport function getDynamicSamplingContextFromSpan(span: Span): Readonly<Partial<DynamicSamplingContext>> {\n  const client = getClient();\n  if (!client) {\n    return {};\n  }\n\n  const rootSpan = getRootSpan(span);\n  const rootSpanJson = spanToJSON(rootSpan);\n  const rootSpanAttributes = rootSpanJson.data;\n  const traceState = rootSpan.spanContext().traceState;\n\n  // The span sample rate that was locally applied to the root span should also always be applied to the DSC, even if the DSC is frozen.\n  // This is so that the downstream traces/services can use parentSampleRate in their `tracesSampler` to make consistent sampling decisions across the entire trace.\n  const rootSpanSampleRate =\n    traceState?.get('sentry.sample_rate') ??\n    rootSpanAttributes[SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE] ??\n    rootSpanAttributes[SEMANTIC_ATTRIBUTE_SENTRY_PREVIOUS_TRACE_SAMPLE_RATE];\n\n  function applyLocalSampleRateToDsc(dsc: Partial<DynamicSamplingContext>): Partial<DynamicSamplingContext> {\n    if (typeof rootSpanSampleRate === 'number' || typeof rootSpanSampleRate === 'string') {\n      dsc.sample_rate = `${rootSpanSampleRate}`;\n    }\n    return dsc;\n  }\n\n  // For core implementation, we freeze the DSC onto the span as a non-enumerable property\n  const frozenDsc = (rootSpan as SpanWithMaybeDsc)[FROZEN_DSC_FIELD];\n  if (frozenDsc) {\n    return applyLocalSampleRateToDsc(frozenDsc);\n  }\n\n  // For a non-recording placeholder in Tracing without Performance (TwP) mode or an ignored segment,\n  // the DSC is not carried on the span; the scope is the source of truth. Resolve it from the span's\n  // captured scope so continued traces keep their incoming DSC.\n  //\n  // We gate this on `!hasSpansEnabled()` so it mirrors the `sentry-trace` source in `getTraceData`:\n  // with tracing enabled, other non-recording spans (e.g. an `onlyIfParent` placeholder) keep deriving\n  // their DSC from the span/client. Ignored segments are an explicit exception: they preserve the\n  // incoming DSC but override its sampling decision to agree with the propagated `sentry-trace`.\n  //\n  // We spread into a new object so applying the local sample rate can't mutate the scope's DSC.\n  const isNonRecordingRoot = spanIsNonRecordingSpan(rootSpan);\n  const isIgnoredRoot = isNonRecordingRoot && rootSpan.dropReason === 'ignored';\n  if (isNonRecordingRoot && (!hasSpansEnabled(client.getOptions()) || isIgnoredRoot)) {\n    const capturedScope = getCapturedScopesOnSpan(rootSpan).scope;\n    if (capturedScope) {\n      const dsc = { ...getDynamicSamplingContextFromScope(client, capturedScope) };\n      if (isIgnoredRoot) {\n        dsc.sampled = 'false';\n      }\n      return applyLocalSampleRateToDsc(dsc);\n    }\n  }\n\n  // For OpenTelemetry, we freeze the DSC on the trace state\n  const traceStateDsc = traceState?.get('sentry.dsc');\n\n  // If the span has a DSC, we want it to take precedence\n  const dscOnTraceState = traceStateDsc && baggageHeaderToDynamicSamplingContext(traceStateDsc);\n\n  if (dscOnTraceState) {\n    return applyLocalSampleRateToDsc(dscOnTraceState);\n  }\n\n  // Else, we generate it from the span\n  const dsc = getDynamicSamplingContextFromClient(span.spanContext().traceId, client);\n\n  // We don't want to have a transaction name in the DSC if the source is \"url\" because URLs might contain PII\n  // TODO(v11): Only read `SENTRY_SEGMENT_NAME_SOURCE` once we removed `SEMANTIC_ATTRIBUTE_SENTRY_SOURCE`\n  const source =\n    rootSpanAttributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] ?? rootSpanAttributes['sentry.segment.name.source'];\n\n  // after JSON conversion, txn.name becomes jsonSpan.description\n  const name = rootSpanJson.description;\n  if (source !== 'url' && name) {\n    dsc.transaction = name;\n  }\n\n  // How can we even land here with hasSpansEnabled() returning false?\n  // Otel creates a Non-recording span in Tracing Without Performance mode when handling incoming requests\n  // So we end up with an active span that is not sampled (neither positively nor negatively)\n  if (hasSpansEnabled()) {\n    dsc.sampled = String(spanIsSampled(rootSpan));\n    dsc.sample_rand =\n      // In OTEL we store the sample rand on the trace state because we cannot access scopes for NonRecordingSpans\n      // The Sentry OTEL SpanSampler takes care of writing the sample rand on the root span\n      traceState?.get('sentry.sample_rand') ??\n      // On all other platforms we can actually get the scopes from a root span (we use this as a fallback)\n      getCapturedScopesOnSpan(rootSpan).scope?.getPropagationContext().sampleRand.toString();\n  }\n\n  applyLocalSampleRateToDsc(dsc);\n\n  client.emit('createDsc', dsc, rootSpan);\n\n  return dsc;\n}\n\n/**\n * Convert a Span to a baggage header.\n */\nexport function spanToBaggageHeader(span: Span): string | undefined {\n  const dsc = getDynamicSamplingContextFromSpan(span);\n  return dynamicSamplingContextToSentryBaggageHeader(dsc);\n}\n", "import type { CoreOptions } from '../../types/options';\nimport type { BeforeSendStreamedSpanCallback } from '../../types/options';\nimport type { StreamedSpanJSON } from '../../types/span';\nimport { addNonEnumerableProperty } from '../../utils/object';\n\ntype StaticBeforeSendSpanCallback = CoreOptions['beforeSendSpan'];\n\n/**\n * A wrapper to use the new span format in your `beforeSendSpan` callback.\n *\n * When using `traceLifecycle: 'stream'`, wrap your callback with this function\n * to receive and return {@link StreamedSpanJSON} instead of the standard {@link SpanJSON}.\n *\n * @example\n *\n * Sentry.init({\n *   traceLifecycle: 'stream',\n *   beforeSendSpan: withStreamedSpan((span) => {\n *     // span is of type StreamedSpanJSON\n *     return span;\n *   }),\n * });\n *\n * @param callback - The callback function that receives and returns a {@link StreamedSpanJSON}.\n * @returns A callback that is compatible with the `beforeSendSpan` option when using `traceLifecycle: 'stream'`.\n */\nexport function withStreamedSpan(\n  callback: (span: StreamedSpanJSON) => StreamedSpanJSON,\n): StaticBeforeSendSpanCallback & { _streamed: true } {\n  addNonEnumerableProperty(callback, '_streamed', true);\n  return callback as unknown as StaticBeforeSendSpanCallback & { _streamed: true };\n}\n\n/**\n * Typesafe check to identify if a `beforeSendSpan` callback expects the streamed span JSON format.\n *\n * @param callback - The `beforeSendSpan` callback to check.\n * @returns `true` if the callback was wrapped with {@link withStreamedSpan}.\n */\nexport function isStreamedBeforeSendSpanCallback(callback: unknown): callback is BeforeSendStreamedSpanCallback {\n  return !!callback && typeof callback === 'function' && '_streamed' in callback && !!callback._streamed;\n}\n", "import { getSentryCarrier } from '../carrier';\nimport type { Attachment } from '../types/attachment';\nimport type { DataCategory } from '../types/datacategory';\nimport type { DsnComponents } from '../types/dsn';\nimport type {\n  AttachmentItem,\n  BaseEnvelopeHeaders,\n  BaseEnvelopeItemHeaders,\n  Envelope,\n  EnvelopeItemType,\n  EventEnvelopeHeaders,\n  SpanItem,\n} from '../types/envelope';\nimport type { Event } from '../types/event';\nimport type { SdkInfo } from '../types/sdkinfo';\nimport type { SdkMetadata } from '../types/sdkmetadata';\nimport type { SpanJSON } from '../types/span';\nimport { dsnToString } from './dsn';\nimport { normalize } from './normalize';\nimport { safeDateNow } from './randomSafeContext';\nimport { GLOBAL_OBJ } from './worldwide';\n\n/**\n * Creates an envelope.\n * Make sure to always explicitly provide the generic to this function\n * so that the envelope types resolve correctly.\n */\nexport function createEnvelope<E extends Envelope>(headers: E[0], items: E[1] = []): E {\n  return [headers, items] as E;\n}\n\n/**\n * Add an item to an envelope.\n * Make sure to always explicitly provide the generic to this function\n * so that the envelope types resolve correctly.\n */\nexport function addItemToEnvelope<E extends Envelope>(envelope: E, newItem: E[1][number]): E {\n  const [headers, items] = envelope;\n  return [headers, [...items, newItem]] as unknown as E;\n}\n\n/**\n * Convenience function to loop through the items and item types of an envelope.\n * (This function was mostly created because working with envelope types is painful at the moment)\n *\n * If the callback returns true, the rest of the items will be skipped.\n */\nexport function forEachEnvelopeItem<E extends Envelope>(\n  envelope: Envelope,\n  callback: (envelopeItem: E[1][number], envelopeItemType: E[1][number][0]['type']) => boolean | void,\n): boolean {\n  const envelopeItems = envelope[1];\n\n  for (const envelopeItem of envelopeItems) {\n    const envelopeItemType = envelopeItem[0].type;\n    const result = callback(envelopeItem, envelopeItemType);\n\n    if (result) {\n      return true;\n    }\n  }\n\n  return false;\n}\n\n/**\n * Returns true if the envelope contains any of the given envelope item types\n */\nexport function envelopeContainsItemType(envelope: Envelope, types: EnvelopeItemType[]): boolean {\n  return forEachEnvelopeItem(envelope, (_, type) => types.includes(type));\n}\n\n/**\n * Encode a string to UTF8 array.\n */\nfunction encodeUTF8(input: string): Uint8Array {\n  const carrier = getSentryCarrier(GLOBAL_OBJ);\n  return carrier.encodePolyfill ? carrier.encodePolyfill(input) : new TextEncoder().encode(input);\n}\n\n/**\n * Decode a UTF8 array to string.\n */\nfunction decodeUTF8(input: Uint8Array): string {\n  const carrier = getSentryCarrier(GLOBAL_OBJ);\n  return carrier.decodePolyfill ? carrier.decodePolyfill(input) : new TextDecoder().decode(input);\n}\n\n/**\n * Serializes an envelope.\n */\nexport function serializeEnvelope(envelope: Envelope): string | Uint8Array {\n  const [envHeaders, items] = envelope;\n  // Initially we construct our envelope as a string and only convert to binary chunks if we encounter binary data\n  let parts: string | Uint8Array[] = JSON.stringify(envHeaders);\n\n  function append(next: string | Uint8Array): void {\n    if (typeof parts === 'string') {\n      parts = typeof next === 'string' ? parts + next : [encodeUTF8(parts), next];\n    } else {\n      parts.push(typeof next === 'string' ? encodeUTF8(next) : next);\n    }\n  }\n\n  for (const item of items) {\n    const [itemHeaders, payload] = item;\n\n    append(`\\n${JSON.stringify(itemHeaders)}\\n`);\n\n    if (typeof payload === 'string' || payload instanceof Uint8Array) {\n      append(payload);\n    } else {\n      let stringifiedPayload: string;\n      try {\n        stringifiedPayload = JSON.stringify(payload);\n      } catch {\n        // In case, despite all our efforts to keep `payload` circular-dependency-free, `JSON.stringify()` still\n        // fails, we try again after normalizing it again with infinite normalization depth. This of course has a\n        // performance impact but in this case a performance hit is better than throwing.\n        stringifiedPayload = JSON.stringify(normalize(payload));\n      }\n      append(stringifiedPayload);\n    }\n  }\n\n  return typeof parts === 'string' ? parts : concatBuffers(parts);\n}\n\nfunction concatBuffers(buffers: Uint8Array[]): Uint8Array {\n  const totalLength = buffers.reduce((acc, buf) => acc + buf.length, 0);\n\n  const merged = new Uint8Array(totalLength);\n  let offset = 0;\n  for (const buffer of buffers) {\n    merged.set(buffer, offset);\n    offset += buffer.length;\n  }\n\n  return merged;\n}\n\n/**\n * Parses an envelope\n */\nexport function parseEnvelope(env: string | Uint8Array): Envelope {\n  let buffer = typeof env === 'string' ? encodeUTF8(env) : env;\n\n  function readBinary(length: number): Uint8Array {\n    const bin = buffer.subarray(0, length);\n    // Replace the buffer with the remaining data excluding trailing newline\n    buffer = buffer.subarray(length + 1);\n    return bin;\n  }\n\n  function readJson<T>(): T {\n    let i = buffer.indexOf(0xa);\n    // If we couldn't find a newline, we must have found the end of the buffer\n    if (i < 0) {\n      i = buffer.length;\n    }\n\n    return JSON.parse(decodeUTF8(readBinary(i))) as T;\n  }\n\n  const envelopeHeader = readJson<BaseEnvelopeHeaders>();\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  const items: [any, any][] = [];\n\n  while (buffer.length) {\n    const itemHeader = readJson<BaseEnvelopeItemHeaders>();\n    const binaryLength = typeof itemHeader.length === 'number' ? itemHeader.length : undefined;\n\n    items.push([itemHeader, binaryLength ? readBinary(binaryLength) : readJson()]);\n  }\n\n  return [envelopeHeader, items];\n}\n\n/**\n * Creates envelope item for a single span\n */\nexport function createSpanEnvelopeItem(spanJson: Partial<SpanJSON>): SpanItem {\n  const spanHeaders: SpanItem[0] = {\n    type: 'span',\n  };\n\n  return [spanHeaders, spanJson];\n}\n\n/**\n * Creates attachment envelope items\n */\nexport function createAttachmentEnvelopeItem(attachment: Attachment): AttachmentItem {\n  const buffer = typeof attachment.data === 'string' ? encodeUTF8(attachment.data) : attachment.data;\n\n  return [\n    {\n      type: 'attachment',\n      length: buffer.length,\n      filename: attachment.filename,\n      content_type: attachment.contentType,\n      attachment_type: attachment.attachmentType,\n    },\n    buffer,\n  ];\n}\n\ntype OverriddenItemType = Exclude<EnvelopeItemType, DataCategory>;\n\n// Map of envelope item types to data categories where the category differs from the type.\n// Types that map to themselves (session, attachment, transaction, profile, feedback, span, metric) fall through.\nconst DATA_CATEGORY_OVERRIDES: Record<OverriddenItemType, DataCategory> = {\n  sessions: 'session',\n  event: 'error',\n  client_report: 'internal',\n  user_report: 'default',\n  profile_chunk: 'profile',\n  replay_event: 'replay',\n  replay_recording: 'replay',\n  check_in: 'monitor',\n  raw_security: 'security',\n  log: 'log_item',\n  trace_metric: 'metric',\n};\n\nfunction _isOverriddenType(type: EnvelopeItemType): type is OverriddenItemType {\n  return type in DATA_CATEGORY_OVERRIDES;\n}\n\n/**\n * Maps the type of an envelope item to a data category.\n */\nexport function envelopeItemTypeToDataCategory(type: EnvelopeItemType): DataCategory {\n  return _isOverriddenType(type) ? DATA_CATEGORY_OVERRIDES[type] : type;\n}\n\n/** Extracts the minimal SDK info from the metadata or an events */\nexport function getSdkMetadataForEnvelopeHeader(metadataOrEvent?: SdkMetadata | Event): SdkInfo | undefined {\n  if (!metadataOrEvent?.sdk) {\n    return;\n  }\n  const { name, version } = metadataOrEvent.sdk;\n  return { name, version };\n}\n\n/**\n * Creates event envelope headers, based on event, sdk info and tunnel\n * Note: This function was extracted from the core package to make it available in Replay\n */\nexport function createEventEnvelopeHeaders(\n  event: Event,\n  sdkInfo: SdkInfo | undefined,\n  tunnel: string | undefined,\n  dsn?: DsnComponents,\n): EventEnvelopeHeaders {\n  const dynamicSamplingContext = event.sdkProcessingMetadata?.dynamicSamplingContext;\n  return {\n    event_id: event.event_id as string,\n    sent_at: new Date(safeDateNow()).toISOString(),\n    ...(sdkInfo && { sdk: sdkInfo }),\n    ...(!!tunnel && dsn && { dsn: dsnToString(dsn) }),\n    ...(dynamicSamplingContext && {\n      trace: dynamicSamplingContext,\n    }),\n  };\n}\n", "import type { Client } from './client';\nimport { getDynamicSamplingContextFromSpan } from './tracing/dynamicSamplingContext';\nimport type { SentrySpan } from './tracing/sentrySpan';\nimport { isStreamedBeforeSendSpanCallback } from './tracing/spans/beforeSendSpan';\nimport type { LegacyCSPReport } from './types/csp';\nimport type { DsnComponents } from './types/dsn';\nimport type {\n  DynamicSamplingContext,\n  EventEnvelope,\n  EventItem,\n  RawSecurityEnvelope,\n  RawSecurityItem,\n  SessionEnvelope,\n  SessionItem,\n  SpanEnvelope,\n  SpanItem,\n} from './types/envelope';\nimport type { Event } from './types/event';\nimport type { SdkInfo } from './types/sdkinfo';\nimport type { SdkMetadata } from './types/sdkmetadata';\nimport type { Session, SessionAggregates } from './types/session';\nimport { dsnToString } from './utils/dsn';\nimport {\n  createEnvelope,\n  createEventEnvelopeHeaders,\n  createSpanEnvelopeItem,\n  getSdkMetadataForEnvelopeHeader,\n} from './utils/envelope';\nimport { uuid4 } from './utils/misc';\nimport { safeDateNow } from './utils/randomSafeContext';\nimport { shouldIgnoreSpan } from './utils/should-ignore-span';\nimport { showSpanDropWarning, spanToJSON } from './utils/spanUtils';\n\n/**\n * Apply SdkInfo (name, version, packages, integrations) to the corresponding event key.\n * Merge with existing data if any.\n *\n * @internal, exported only for testing\n **/\nexport function _enhanceEventWithSdkInfo(event: Event, newSdkInfo?: SdkInfo): Event {\n  if (!newSdkInfo) {\n    return event;\n  }\n\n  const eventSdkInfo = event.sdk || {};\n\n  event.sdk = {\n    ...eventSdkInfo,\n    name: eventSdkInfo.name || newSdkInfo.name,\n    version: eventSdkInfo.version || newSdkInfo.version,\n    integrations: [...(event.sdk?.integrations || []), ...(newSdkInfo.integrations || [])],\n    packages: [...(event.sdk?.packages || []), ...(newSdkInfo.packages || [])],\n    settings:\n      event.sdk?.settings || newSdkInfo.settings\n        ? {\n            ...event.sdk?.settings,\n            ...newSdkInfo.settings,\n          }\n        : undefined,\n  };\n\n  return event;\n}\n\n/** Creates an envelope from a Session */\nexport function createSessionEnvelope(\n  session: Session | SessionAggregates,\n  dsn?: DsnComponents,\n  metadata?: SdkMetadata,\n  tunnel?: string,\n): SessionEnvelope {\n  const sdkInfo = getSdkMetadataForEnvelopeHeader(metadata);\n  const envelopeHeaders = {\n    sent_at: new Date(safeDateNow()).toISOString(),\n    ...(sdkInfo && { sdk: sdkInfo }),\n    ...(!!tunnel && dsn && { dsn: dsnToString(dsn) }),\n  };\n\n  const envelopeItem: SessionItem =\n    'aggregates' in session ? [{ type: 'sessions' }, session] : [{ type: 'session' }, session.toJSON()];\n\n  return createEnvelope<SessionEnvelope>(envelopeHeaders, [envelopeItem]);\n}\n\n/**\n * Create an Envelope from an event.\n */\nexport function createEventEnvelope(\n  event: Event,\n  dsn?: DsnComponents,\n  metadata?: SdkMetadata,\n  tunnel?: string,\n): EventEnvelope {\n  const sdkInfo = getSdkMetadataForEnvelopeHeader(metadata);\n\n  /*\n    Note: Due to TS, event.type may be `replay_event`, theoretically.\n    In practice, we never call `createEventEnvelope` with `replay_event` type,\n    and we'd have to adjust a looot of types to make this work properly.\n    We want to avoid casting this around, as that could lead to bugs (e.g. when we add another type)\n    So the safe choice is to really guard against the replay_event type here.\n  */\n  const eventType = event.type && event.type !== 'replay_event' ? event.type : 'event';\n\n  _enhanceEventWithSdkInfo(event, metadata?.sdk);\n\n  const envelopeHeaders = createEventEnvelopeHeaders(event, sdkInfo, tunnel, dsn);\n\n  // Prevent this data (which, if it exists, was used in earlier steps in the processing pipeline) from being sent to\n  // sentry. (Note: Our use of this property comes and goes with whatever we might be debugging, whatever hacks we may\n  // have temporarily added, etc. Even if we don't happen to be using it at some point in the future, let's not get rid\n  // of this `delete`, lest we miss putting it back in the next time the property is in use.)\n  delete event.sdkProcessingMetadata;\n\n  const eventItem: EventItem = [{ type: eventType }, event];\n  return createEnvelope<EventEnvelope>(envelopeHeaders, [eventItem]);\n}\n\n/**\n * Create envelope from Span item.\n *\n * Takes an optional client and runs spans through `beforeSendSpan` if available.\n */\nexport function createSpanEnvelope(spans: [SentrySpan, ...SentrySpan[]], client?: Client): SpanEnvelope {\n  function dscHasRequiredProps(dsc: Partial<DynamicSamplingContext>): dsc is DynamicSamplingContext {\n    return !!dsc.trace_id && !!dsc.public_key;\n  }\n\n  // For the moment we'll obtain the DSC from the first span in the array\n  // This might need to be changed if we permit sending multiple spans from\n  // different segments in one envelope\n  const dsc = getDynamicSamplingContextFromSpan(spans[0]);\n\n  const dsn = client?.getDsn();\n  const tunnel = client?.getOptions().tunnel;\n\n  const headers: SpanEnvelope[0] = {\n    sent_at: new Date(safeDateNow()).toISOString(),\n    ...(dscHasRequiredProps(dsc) && { trace: dsc }),\n    ...(!!tunnel && dsn && { dsn: dsnToString(dsn) }),\n  };\n\n  const { beforeSendSpan, ignoreSpans } = client?.getOptions() || {};\n\n  const filteredSpans = ignoreSpans?.length\n    ? spans.filter(span => {\n        const json = spanToJSON(span);\n        return !shouldIgnoreSpan({ description: json.description, op: json.op, attributes: json.data }, ignoreSpans);\n      })\n    : spans;\n  const droppedSpans = spans.length - filteredSpans.length;\n\n  if (droppedSpans) {\n    client?.recordDroppedEvent('before_send', 'span', droppedSpans);\n  }\n\n  const convertToSpanJSON = beforeSendSpan\n    ? (span: SentrySpan) => {\n        const spanJson = spanToJSON(span);\n        const processedSpan = !isStreamedBeforeSendSpanCallback(beforeSendSpan) ? beforeSendSpan(spanJson) : spanJson;\n\n        if (!processedSpan) {\n          showSpanDropWarning();\n          return spanJson;\n        }\n\n        return processedSpan;\n      }\n    : spanToJSON;\n\n  const items: SpanItem[] = [];\n  for (const span of filteredSpans) {\n    const spanJson = convertToSpanJSON(span);\n    if (spanJson) {\n      items.push(createSpanEnvelopeItem(spanJson));\n    }\n  }\n\n  return createEnvelope<SpanEnvelope>(headers, items);\n}\n\n/**\n * Create an Envelope from a CSP report.\n */\nexport function createRawSecurityEnvelope(\n  report: LegacyCSPReport,\n  dsn: DsnComponents,\n  tunnel?: string,\n  release?: string,\n  environment?: string,\n): RawSecurityEnvelope {\n  const envelopeHeaders = {\n    event_id: uuid4(),\n    ...(!!tunnel && dsn && { dsn: dsnToString(dsn) }),\n  };\n\n  const eventItem: RawSecurityItem = [\n    { type: 'raw_security', sentry_release: release, sentry_environment: environment },\n    report,\n  ];\n\n  return createEnvelope<RawSecurityEnvelope>(envelopeHeaders, [eventItem]);\n}\n", "import { DEBUG_BUILD } from '../debug-build';\nimport type { Span } from '../types/span';\nimport { debug } from '../utils/debug-logger';\nimport { getRootSpan, spanIsSampled, spanToJSON } from '../utils/spanUtils';\n\n/**\n * Print a log message for a started span.\n */\nexport function logSpanStart(span: Span): void {\n  if (!DEBUG_BUILD) return;\n\n  const { description = '< unknown name >', op = '< unknown op >', parent_span_id: parentSpanId } = spanToJSON(span);\n  const { spanId } = span.spanContext();\n\n  const sampled = spanIsSampled(span);\n  const rootSpan = getRootSpan(span);\n  const isRootSpan = rootSpan === span;\n\n  const header = `[Tracing] Starting ${sampled ? 'sampled' : 'unsampled'} ${isRootSpan ? 'root ' : ''}span`;\n\n  const infoParts: string[] = [`op: ${op}`, `name: ${description}`, `ID: ${spanId}`];\n\n  if (parentSpanId) {\n    infoParts.push(`parent ID: ${parentSpanId}`);\n  }\n\n  if (!isRootSpan) {\n    const { op, description } = spanToJSON(rootSpan);\n    infoParts.push(`root ID: ${rootSpan.spanContext().spanId}`);\n    if (op) {\n      infoParts.push(`root op: ${op}`);\n    }\n    if (description) {\n      infoParts.push(`root description: ${description}`);\n    }\n  }\n\n  debug.log(`${header}\n  ${infoParts.join('\\n  ')}`);\n}\n\n/**\n * Print a log message for an ended span.\n */\nexport function logSpanEnd(span: Span): void {\n  if (!DEBUG_BUILD) return;\n\n  const { description = '< unknown name >', op = '< unknown op >' } = spanToJSON(span);\n  const { spanId } = span.spanContext();\n  const rootSpan = getRootSpan(span);\n  const isRootSpan = rootSpan === span;\n\n  const msg = `[Tracing] Finishing \"${op}\" ${isRootSpan ? 'root ' : ''}span \"${description}\" with ID ${spanId}`;\n  debug.log(msg);\n}\n", "import { DEBUG_BUILD } from '../debug-build';\nimport {\n  SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT,\n  SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE,\n} from '../semanticAttributes';\nimport type { Measurements, MeasurementUnit } from '../types/measurement';\nimport type { TimedEvent } from '../types/timedEvent';\nimport { debug } from '../utils/debug-logger';\nimport { getActiveSpan, getRootSpan } from '../utils/spanUtils';\n\n/**\n * Adds a measurement to the active transaction on the current global scope. You can optionally pass in a different span\n * as the 4th parameter.\n */\nexport function setMeasurement(name: string, value: number, unit: MeasurementUnit, activeSpan = getActiveSpan()): void {\n  const rootSpan = activeSpan && getRootSpan(activeSpan);\n\n  if (rootSpan) {\n    DEBUG_BUILD && debug.log(`[Measurement] Setting measurement on root span: ${name} = ${value} ${unit}`);\n    rootSpan.addEvent(name, {\n      [SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE]: value,\n      [SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT]: unit as string,\n    });\n  }\n}\n\n/**\n * Convert timed events to measurements.\n */\nexport function timedEventsToMeasurements(events: TimedEvent[]): Measurements | undefined {\n  if (!events || events.length === 0) {\n    return undefined;\n  }\n\n  const measurements: Measurements = {};\n  events.forEach(event => {\n    const attributes = event.attributes || {};\n    const unit = attributes[SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT] as MeasurementUnit | undefined;\n    const value = attributes[SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE] as number | undefined;\n\n    if (typeof unit === 'string' && typeof value === 'number') {\n      measurements[event.name] = { value, unit };\n    }\n  });\n\n  return measurements;\n}\n", "import { getMainCarrier, getSentryCarrier } from '../carrier';\nimport type { Scope } from '../scope';\nimport type { TransactionEvent } from '../types/event';\nimport type { Span } from '../types/span';\n\n/**\n * Callbacks the deferred-capture strategy hands to `_convertSpanToTransaction` when assembling a\n * transaction. The synchronous (browser) path calls the converter with no options, so neither runs.\n */\nexport interface SegmentSpanCaptureConvertOptions {\n  /** Skip a descendant already sent in an earlier transaction, so it isn't sent twice. */\n  isSpanAlreadyCaptured?: (span: Span) => boolean;\n  /** Record each span included here, so a child that ends after the snapshot can be emitted as an orphan. */\n  onSpanCaptured?: (span: Span) => void;\n}\n\nexport type SegmentSpanConverter = (options?: SegmentSpanCaptureConvertOptions) => TransactionEvent | undefined;\n\n/**\n * Assembles segment spans into transactions. Registered by SDKs that defer capture (see\n * `_INTERNAL_setDeferSegmentSpanCapture`); when unset, `SentrySpan` captures synchronously. Living\n * behind this seam tree-shakes the deferral machinery out of SDKs that never register one (e.g. browser).\n */\nexport interface SegmentSpanCaptureStrategy {\n  /** Assemble and capture a segment (root or standalone-root) span's transaction through its captured scope. */\n  onSegmentSpanEnded(convert: SegmentSpanConverter, scope: Scope): void;\n  /** Consider a child that ended after its segment for emission as its own orphan transaction. */\n  onChildSpanEnded(span: Span, rootSpan: Span, convert: SegmentSpanConverter, scope: Scope): void;\n}\n\n/**\n * @private Private API with no semver guarantees!\n *\n * Set the global segment-span capture strategy (or clear it with `undefined`).\n */\nexport function setSegmentSpanCaptureStrategy(strategy: SegmentSpanCaptureStrategy | undefined): void {\n  getSentryCarrier(getMainCarrier()).segmentSpanCaptureStrategy = strategy;\n}\n\n/** Get the global segment-span capture strategy, or `undefined` when none is registered. */\nexport function getSegmentSpanCaptureStrategy(): SegmentSpanCaptureStrategy | undefined {\n  return getSentryCarrier(getMainCarrier()).segmentSpanCaptureStrategy;\n}\n", "import type { Client } from '../../client';\n\n/**\n * Determines if span streaming is enabled for the given client\n */\nexport function hasSpanStreamingEnabled(client: Client): boolean {\n  return client.getOptions().traceLifecycle === 'stream';\n}\n", "/* eslint-disable max-lines */\nimport { getClient, getCurrentScope } from '../currentScopes';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { createSpanEnvelope } from '../envelope';\nimport {\n  SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME,\n  SEMANTIC_ATTRIBUTE_PROFILE_ID,\n  SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME,\n  SEMANTIC_ATTRIBUTE_SENTRY_OP,\n  SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n  SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,\n} from '../semanticAttributes';\nimport type { SpanEnvelope } from '../types/envelope';\nimport type { TransactionEvent } from '../types/event';\nimport type { SpanLink } from '../types/link';\nimport type {\n  SentrySpanArguments,\n  Span,\n  SpanAttributes,\n  SpanAttributeValue,\n  SpanContextData,\n  SpanJSON,\n  SpanOrigin,\n  SpanTimeInput,\n  StreamedSpanJSON,\n} from '../types/span';\nimport type { SpanStatus } from '../types/spanStatus';\nimport type { TimedEvent } from '../types/timedEvent';\nimport { debug } from '../utils/debug-logger';\nimport { generateSpanId, generateTraceId } from '../utils/propagationContext';\nimport {\n  addStatusMessageAttribute,\n  convertSpanLinksForEnvelope,\n  getRootSpan,\n  getSimpleStatus,\n  getSpanDescendants,\n  getStatusMessage,\n  getStreamedSpanLinks,\n  spanTimeInputToSeconds,\n  spanToJSON,\n  spanToTransactionTraceContext,\n  TRACE_FLAG_NONE,\n  TRACE_FLAG_SAMPLED,\n} from '../utils/spanUtils';\nimport { timestampInSeconds } from '../utils/time';\nimport { getDynamicSamplingContextFromSpan } from './dynamicSamplingContext';\nimport { logSpanEnd } from './logSpans';\nimport { timedEventsToMeasurements } from './measurement';\nimport { getSegmentSpanCaptureStrategy, type SegmentSpanCaptureConvertOptions } from './segmentSpanCaptureStrategy';\nimport { hasSpanStreamingEnabled } from './spans/hasSpanStreamingEnabled';\nimport {\n  getCapturedScopesOnSpan,\n  markSpanSourceAsExplicit,\n  spanIsTracerProviderSpan,\n  spanShouldInferOtelSource,\n} from './utils';\n\nconst MAX_SPAN_COUNT = 1000;\n\n/**\n * Span contains all data about a span\n */\nexport class SentrySpan implements Span {\n  protected _traceId: string;\n  protected _spanId: string;\n  protected _parentSpanId?: string | undefined;\n  protected _sampled: boolean | undefined;\n  protected _name?: string | undefined;\n  protected _attributes: SpanAttributes;\n  protected _links?: SpanLink[];\n  /** Epoch timestamp in seconds when the span started. */\n  protected _startTime: number;\n  /** Epoch timestamp in seconds when the span ended. */\n  protected _endTime?: number | undefined;\n  /** Internal keeper of the status */\n  protected _status?: SpanStatus;\n  /** The timed events added to this span. */\n  protected _events: TimedEvent[];\n\n  /** if true, treat span as a standalone span (not part of a transaction) */\n  private _isStandaloneSpan?: boolean;\n\n  /** if true, the span is sealed and ignores further mutations (set after end for tracer-provider spans) */\n  private _frozen?: boolean;\n\n  /**\n   * You should never call the constructor manually, always use `Sentry.startSpan()`\n   * or other span methods.\n   * @internal\n   * @hideconstructor\n   * @hidden\n   */\n  public constructor(spanContext: SentrySpanArguments = {}) {\n    this._traceId = spanContext.traceId || generateTraceId();\n    this._spanId = spanContext.spanId || generateSpanId();\n    this._startTime = spanContext.startTimestamp || timestampInSeconds();\n    this._links = spanContext.links;\n\n    this._attributes = {};\n    this.setAttributes({\n      [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'manual',\n      [SEMANTIC_ATTRIBUTE_SENTRY_OP]: spanContext.op,\n      ...spanContext.attributes,\n    });\n\n    this._name = spanContext.name;\n\n    if (spanContext.parentSpanId) {\n      this._parentSpanId = spanContext.parentSpanId;\n    }\n    // We want to include booleans as well here\n    if ('sampled' in spanContext) {\n      this._sampled = spanContext.sampled;\n    }\n    if (spanContext.endTimestamp) {\n      this._endTime = spanContext.endTimestamp;\n    }\n\n    this._events = [];\n\n    this._isStandaloneSpan = spanContext.isStandalone;\n\n    // If the span is already ended, ensure we finalize the span immediately\n    if (this._endTime) {\n      this._onSpanEnded();\n    }\n  }\n\n  /** @inheritDoc */\n  public addLink(link: SpanLink): this {\n    if (this._frozen) {\n      return this;\n    }\n    if (this._links) {\n      this._links.push(link);\n    } else {\n      this._links = [link];\n    }\n    return this;\n  }\n\n  /** @inheritDoc */\n  public addLinks(links: SpanLink[]): this {\n    if (this._frozen) {\n      return this;\n    }\n    if (this._links) {\n      this._links.push(...links);\n    } else {\n      this._links = links;\n    }\n    return this;\n  }\n\n  /**\n   * This should generally not be used,\n   * but it is needed for being compliant with the OTEL Span interface.\n   *\n   * @hidden\n   * @internal\n   */\n  public recordException(_exception: unknown, _time?: SpanTimeInput | undefined): void {\n    // noop\n  }\n\n  /** @inheritdoc */\n  public spanContext(): SpanContextData {\n    const { _spanId: spanId, _traceId: traceId, _sampled: sampled } = this;\n    return {\n      spanId,\n      traceId,\n      traceFlags: sampled ? TRACE_FLAG_SAMPLED : TRACE_FLAG_NONE,\n    };\n  }\n\n  /** @inheritdoc */\n  public setAttribute(key: string, value: SpanAttributeValue | undefined): this {\n    if (this._frozen) {\n      return this;\n    }\n\n    if (value === undefined) {\n      // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n      delete this._attributes[key];\n    } else {\n      this._attributes[key] = value;\n    }\n\n    // Setting the source on a span branded for OTel-style inference means user code is choosing it\n    // explicitly, so flag it to keep `applyOtelSpanData` from overriding it with an inferred source.\n    if (key === SEMANTIC_ATTRIBUTE_SENTRY_SOURCE && value !== undefined && spanShouldInferOtelSource(this)) {\n      markSpanSourceAsExplicit(this);\n    }\n\n    return this;\n  }\n\n  /** @inheritdoc */\n  public setAttributes(attributes: SpanAttributes): this {\n    Object.keys(attributes).forEach(key => this.setAttribute(key, attributes[key]));\n    return this;\n  }\n\n  /**\n   * This should generally not be used,\n   * but we need it for browser tracing where we want to adjust the start time afterwards.\n   * USE THIS WITH CAUTION!\n   *\n   * @hidden\n   * @internal\n   */\n  public updateStartTime(timeInput: SpanTimeInput): void {\n    if (this._frozen) {\n      return;\n    }\n    this._startTime = spanTimeInputToSeconds(timeInput);\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public setStatus(value: SpanStatus): this {\n    if (this._frozen) {\n      return this;\n    }\n    this._status = value;\n    return this;\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public updateName(name: string): this {\n    if (this._frozen) {\n      return this;\n    }\n    this._name = name;\n    // Renaming a span marks its name as explicitly chosen, so we stamp `custom`.\n    // The exception is spans created by SentryTraceProvider: those are branded for\n    // OTel-style source inference at span end (mirroring OTel SDK spans, which have\n    // no Sentry source concept), so instrumentations renaming them must not pin\n    // `custom` — applyOtelSpanData infers the correct source (e.g. 'route', 'task').\n    if (!spanShouldInferOtelSource(this)) {\n      this.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, 'custom');\n    }\n    return this;\n  }\n\n  /** @inheritdoc */\n  public end(endTimestamp?: SpanTimeInput): void {\n    // If already ended, skip the end-of-span processing, but still seal a tracer-provider span. The\n    // seal at the bottom of this method is skipped on this early return, and `_endTime` may have been\n    // set before this first `end()` call (e.g. via the constructor's `endTimestamp`), which would\n    // otherwise leave the span mutable after `end()`. End-of-span processing already ran in that case.\n    if (this._endTime) {\n      this._frozen = spanIsTracerProviderSpan(this);\n      return;\n    }\n\n    this._endTime = spanTimeInputToSeconds(endTimestamp);\n    logSpanEnd(this);\n\n    this._onSpanEnded();\n\n    // A span created by the SentryTracerProvider is handed to OTel instrumentations as an OTel span,\n    // so once end-of-span processing is done (including the `spanEnd` hook where `applyOtelSpanData`\n    // finalizes status/source) it is sealed against further writes — mirroring the OpenTelemetry SDK,\n    // where setters no-op after a span has ended. Without this, an instrumentation that sets\n    // status/attributes after `end()` (e.g. Next.js on a render error) would overwrite the finalized\n    // values, and the deferred capture would then serialize those late writes. Spans created directly\n    // through the core API (e.g. the browser SDK, which backfills resource-timing attributes after a\n    // span ends) are not tracer-provider spans and stay mutable.\n    this._frozen = spanIsTracerProviderSpan(this);\n  }\n\n  /**\n   * Get JSON representation of this span.\n   *\n   * @hidden\n   * @internal This method is purely for internal purposes and should not be used outside\n   * of SDK code. If you need to get a JSON representation of a span,\n   * use `spanToJSON(span)` instead.\n   */\n  public getSpanJSON(): SpanJSON {\n    return {\n      data: this._attributes,\n      description: this._name,\n      op: this._attributes[SEMANTIC_ATTRIBUTE_SENTRY_OP],\n      parent_span_id: this._parentSpanId,\n      span_id: this._spanId,\n      start_timestamp: this._startTime,\n      status: getStatusMessage(this._status),\n      timestamp: this._endTime,\n      trace_id: this._traceId,\n      origin: this._attributes[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN] as SpanOrigin | undefined,\n      profile_id: this._attributes[SEMANTIC_ATTRIBUTE_PROFILE_ID] as string | undefined,\n      exclusive_time: this._attributes[SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME] as number | undefined,\n      measurements: timedEventsToMeasurements(this._events),\n      is_segment: (this._isStandaloneSpan && getRootSpan(this) === this) || undefined,\n      segment_id: this._isStandaloneSpan ? getRootSpan(this).spanContext().spanId : undefined,\n      links: convertSpanLinksForEnvelope(this._links),\n    };\n  }\n\n  /**\n   * Get {@link StreamedSpanJSON} representation of this span.\n   *\n   * @hidden\n   * @internal This method is purely for internal purposes and should not be used outside\n   * of SDK code. If you need to get a JSON representation of a span,\n   * use `spanToStreamedSpanJSON(span)` instead.\n   */\n  public getStreamedSpanJSON(): StreamedSpanJSON {\n    return {\n      name: this._name ?? '',\n      span_id: this._spanId,\n      trace_id: this._traceId,\n      parent_span_id: this._parentSpanId,\n      start_timestamp: this._startTime,\n      // just in case _endTime is not set, we use the start time (i.e. duration 0)\n      end_timestamp: this._endTime ?? this._startTime,\n      is_segment: this._isStandaloneSpan || this === getRootSpan(this),\n      status: getSimpleStatus(this._status),\n      attributes: addStatusMessageAttribute(this._attributes, this._status),\n      links: getStreamedSpanLinks(this._links),\n    };\n  }\n\n  /** @inheritdoc */\n  public isRecording(): boolean {\n    return !this._endTime && !!this._sampled;\n  }\n\n  /**\n   * @inheritdoc\n   */\n  public addEvent(\n    name: string,\n    attributesOrStartTime?: SpanAttributes | SpanTimeInput,\n    startTime?: SpanTimeInput,\n  ): this {\n    if (this._frozen) {\n      return this;\n    }\n    DEBUG_BUILD && debug.log('[Tracing] Adding an event to span:', name);\n\n    const time = isSpanTimeInput(attributesOrStartTime) ? attributesOrStartTime : startTime || timestampInSeconds();\n    const attributes = isSpanTimeInput(attributesOrStartTime) ? {} : attributesOrStartTime || {};\n\n    const event: TimedEvent = {\n      name,\n      time: spanTimeInputToSeconds(time),\n      attributes,\n    };\n\n    this._events.push(event);\n\n    return this;\n  }\n\n  /**\n   * This method should generally not be used,\n   * but for now we need a way to publicly check if the `_isStandaloneSpan` flag is set.\n   * USE THIS WITH CAUTION!\n   * @internal\n   * @hidden\n   * @experimental\n   */\n  public isStandaloneSpan(): boolean {\n    return !!this._isStandaloneSpan;\n  }\n\n  /** Emit `spanEnd` when the span is ended. */\n  private _onSpanEnded(): void {\n    const client = getClient();\n    if (client) {\n      client.emit('spanEnd', this);\n      // Guarding sending standalone v1 spans as v2 streamed spans for now.\n      // Otherwise they'd be sent once as v1 spans and again as streamed spans.\n      // We'll migrate CLS and LCP spans to streamed spans in a later PR and\n      // INP spans in the next major of the SDK. At that point, we can fully remove\n      // standalone v1 spans <3\n      if (!this._isStandaloneSpan) {\n        client.emit('afterSpanEnd', this);\n      }\n    }\n\n    // A segment span is basically the root span of a local span tree.\n    // So for now, this is either what we previously refer to as the root span,\n    // or a standalone span.\n    const rootSpan = getRootSpan(this);\n    const isSegmentSpan = this._isStandaloneSpan || this === rootSpan;\n\n    // if this is a standalone span, we send it immediately\n    if (this._isStandaloneSpan) {\n      if (this._sampled) {\n        sendSpanEnvelope(createSpanEnvelope([this], client));\n      } else {\n        DEBUG_BUILD &&\n          debug.log('[Tracing] Discarding standalone span because its trace was not chosen to be sampled.');\n        if (client) {\n          client.recordDroppedEvent('sample_rate', 'span');\n        }\n      }\n      return;\n    }\n\n    // Non-segment children aren't captured on their own. A registered strategy may re-emit a late child\n    // as its own orphan transaction; without one, it's dropped.\n    if (!isSegmentSpan) {\n      const strategy = getSegmentSpanCaptureStrategy();\n      if (strategy) {\n        const scope = getCapturedScopesOnSpan(this).scope || getCurrentScope();\n        strategy.onChildSpanEnded(this, rootSpan, options => this._convertSpanToTransaction(options), scope);\n      }\n      return;\n    }\n\n    if (client && hasSpanStreamingEnabled(client)) {\n      // TODO (spans): Remove standalone span custom logic in favor of sending simple v2 web vital spans\n      client.emit('afterSegmentSpanEnd', this);\n      return;\n    }\n\n    // A registered strategy defers the snapshot so children closing just after the segment still land\n    // (and late ones can orphan); without one, assemble synchronously from the live tree.\n    const scope = getCapturedScopesOnSpan(this).scope || getCurrentScope();\n    const strategy = getSegmentSpanCaptureStrategy();\n    if (strategy) {\n      strategy.onSegmentSpanEnded(options => this._convertSpanToTransaction(options), scope);\n    } else {\n      const transactionEvent = this._convertSpanToTransaction();\n      if (transactionEvent) {\n        scope.captureEvent(transactionEvent);\n      }\n    }\n  }\n\n  /**\n   * Finish the transaction & prepare the event to send to Sentry.\n   */\n  private _convertSpanToTransaction(options: SegmentSpanCaptureConvertOptions = {}): TransactionEvent | undefined {\n    // We can only convert finished spans\n    if (!isFullFinishedSpan(spanToJSON(this))) {\n      return undefined;\n    }\n\n    if (!this._name) {\n      DEBUG_BUILD && debug.warn('Transaction has no name, falling back to `<unlabeled transaction>`.');\n      this._name = '<unlabeled transaction>';\n    }\n\n    const { scope: capturedSpanScope, isolationScope: capturedSpanIsolationScope } = getCapturedScopesOnSpan(this);\n\n    const normalizedRequest = capturedSpanScope?.getScopeData().sdkProcessingMetadata?.normalizedRequest;\n\n    if (this._sampled !== true) {\n      return undefined;\n    }\n\n    // Skip the span itself, standalone spans, and (when a strategy tracks it) spans already sent. The\n    // synchronous default passes no hooks, so this bookkeeping stays out of SDKs that don't defer.\n    options.onSpanCaptured?.(this);\n    const spans: SpanJSON[] = [];\n    for (const descendant of getSpanDescendants(this)) {\n      if (descendant === this || isStandaloneSpan(descendant) || options.isSpanAlreadyCaptured?.(descendant)) {\n        continue;\n      }\n      const spanJSON = spanToJSON(descendant);\n      if (!isFullFinishedSpan(spanJSON)) {\n        continue;\n      }\n      options.onSpanCaptured?.(descendant);\n      spans.push(spanJSON);\n    }\n\n    const source = this._attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE];\n\n    // remove internal root span attributes we don't need to send.\n    /* eslint-disable @typescript-eslint/no-dynamic-delete */\n    delete this._attributes[SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME];\n    let hasGenAiSpans = false;\n    spans.forEach(span => {\n      delete span.data[SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME];\n      if (span.op?.startsWith('gen_ai.')) {\n        hasGenAiSpans = true;\n      }\n    });\n    // eslint-enabled-next-line @typescript-eslint/no-dynamic-delete\n\n    const transaction: TransactionEvent = {\n      contexts: {\n        trace: spanToTransactionTraceContext(this),\n      },\n      spans:\n        // spans.sort() mutates the array, but `spans` is already a copy so we can safely do this here\n        // we do not use spans anymore after this point\n        spans.length > MAX_SPAN_COUNT\n          ? spans.sort((a, b) => a.start_timestamp - b.start_timestamp).slice(0, MAX_SPAN_COUNT)\n          : spans,\n      start_timestamp: this._startTime,\n      timestamp: this._endTime,\n      transaction: this._name,\n      type: 'transaction',\n      sdkProcessingMetadata: {\n        capturedSpanScope,\n        capturedSpanIsolationScope,\n        dynamicSamplingContext: getDynamicSamplingContextFromSpan(this),\n        hasGenAiSpans,\n      },\n      request: normalizedRequest,\n      ...(source && {\n        transaction_info: {\n          source,\n        },\n      }),\n    };\n\n    const measurements = timedEventsToMeasurements(this._events);\n    const hasMeasurements = measurements && Object.keys(measurements).length;\n\n    if (hasMeasurements) {\n      DEBUG_BUILD &&\n        debug.log(\n          '[Measurements] Adding measurements to transaction event',\n          JSON.stringify(measurements, undefined, 2),\n        );\n      transaction.measurements = measurements;\n    }\n\n    return transaction;\n  }\n}\n\nfunction isSpanTimeInput(value: undefined | SpanAttributes | SpanTimeInput): value is SpanTimeInput {\n  return (value && typeof value === 'number') || value instanceof Date || Array.isArray(value);\n}\n\n// We want to filter out any incomplete SpanJSON objects\nfunction isFullFinishedSpan(input: Partial<SpanJSON>): input is SpanJSON {\n  return !!input.start_timestamp && !!input.timestamp && !!input.span_id && !!input.trace_id;\n}\n\n/** `SentrySpan`s can be sent as a standalone span rather than belonging to a transaction */\nfunction isStandaloneSpan(span: Span): boolean {\n  return span instanceof SentrySpan && span.isStandaloneSpan();\n}\n\n/**\n * Sends a `SpanEnvelope`.\n *\n * Note: If the envelope's spans are dropped, e.g. via `beforeSendSpan`,\n * the envelope will not be sent either.\n */\nfunction sendSpanEnvelope(envelope: SpanEnvelope): void {\n  const client = getClient();\n  if (!client) {\n    return;\n  }\n\n  const spanItems = envelope[1];\n  if (!spanItems || spanItems.length === 0) {\n    client.recordDroppedEvent('before_send', 'span');\n    return;\n  }\n\n  // sendEnvelope should not throw\n  // eslint-disable-next-line @typescript-eslint/no-floating-promises\n  client.sendEnvelope(envelope);\n}\n", "import { chainAndCopyPromiseLike } from '../utils/chain-and-copy-promiselike';\nimport { isThenable } from '../utils/is';\n\n/* eslint-disable */\n// Vendor \"Awaited\" in to be TS 3.8 compatible\ntype AwaitedPromise<T> = T extends null | undefined\n  ? T // special case for `null | undefined` when not in `--strictNullChecks` mode\n  : T extends object & { then(onfulfilled: infer F, ...args: infer _): any } // `await` only unwraps object types with a callable `then`. Non-object types are not unwrapped\n    ? F extends (value: infer V, ...args: infer _) => any // if the argument to `then` is callable, extracts the first argument\n      ? V // normally this would recursively unwrap, but this is not possible in TS3.8\n      : never // the argument to `then` was not callable\n    : T; // non-object or non-thenable\n/* eslint-enable */\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function handleCallbackErrors<Fn extends () => Promise<any>, PromiseValue = AwaitedPromise<ReturnType<Fn>>>(\n  fn: Fn,\n  onError: (error: unknown) => void,\n  onFinally?: () => void,\n  onSuccess?: (result: PromiseValue) => void,\n): ReturnType<Fn>;\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function handleCallbackErrors<Fn extends () => any>(\n  fn: Fn,\n  onError: (error: unknown) => void,\n  onFinally?: () => void,\n  onSuccess?: (result: ReturnType<Fn>) => void,\n): ReturnType<Fn>;\n/**\n * Wrap a callback function with error handling.\n * If an error is thrown, it will be passed to the `onError` callback and re-thrown.\n *\n * If the return value of the function is a promise, it will be handled with `maybeHandlePromiseRejection`.\n *\n * If an `onFinally` callback is provided, this will be called when the callback has finished\n * - so if it returns a promise, once the promise resolved/rejected,\n * else once the callback has finished executing.\n * The `onFinally` callback will _always_ be called, no matter if an error was thrown or not.\n */\nexport function handleCallbackErrors<\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  Fn extends () => any,\n  ValueType = ReturnType<Fn>,\n>(\n  fn: Fn,\n  onError: (error: unknown) => void,\n  onFinally: () => void = () => {},\n  onSuccess: (result: ValueType | AwaitedPromise<ValueType>) => void = () => {},\n): ValueType {\n  let maybePromiseResult: ReturnType<Fn>;\n  try {\n    maybePromiseResult = fn();\n  } catch (e) {\n    onError(e);\n    onFinally();\n    throw e;\n  }\n\n  return maybeHandlePromiseRejection(maybePromiseResult, onError, onFinally, onSuccess);\n}\n\n/**\n * Maybe handle a promise rejection.\n * This expects to be given a value that _may_ be a promise, or any other value.\n * If it is a promise, and it rejects, it will call the `onError` callback.\n *\n * For thenable objects with extra methods (like jQuery's jqXHR),\n * this function preserves those methods by wrapping the original thenable in a Proxy\n * that intercepts .then() calls to apply error handling while forwarding all other\n * properties to the original object.\n * This allows code like `startSpan(() => $.ajax(...)).abort()` to work correctly.\n */\nfunction maybeHandlePromiseRejection<MaybePromise>(\n  value: MaybePromise,\n  onError: (error: unknown) => void,\n  onFinally: () => void,\n  onSuccess: (result: MaybePromise | AwaitedPromise<MaybePromise>) => void,\n): MaybePromise {\n  if (isThenable(value)) {\n    return chainAndCopyPromiseLike(\n      value as MaybePromise & PromiseLike<Awaited<typeof value>> & Record<string, unknown>,\n      result => {\n        onFinally();\n        onSuccess(result as Awaited<MaybePromise>);\n      },\n      err => {\n        onError(err);\n        onFinally();\n      },\n    ) as MaybePromise;\n  }\n  // Non-thenable value - call callbacks immediately and return as-is\n  onFinally();\n  onSuccess(value);\n  return value;\n}\n", "import { DEBUG_BUILD } from '../debug-build';\nimport type { CoreOptions } from '../types/options';\nimport type { SamplingContext } from '../types/samplingcontext';\nimport { debug } from '../utils/debug-logger';\nimport { hasSpansEnabled } from '../utils/hasSpansEnabled';\nimport { parseSampleRate } from '../utils/parseSampleRate';\n\n/**\n * Makes a sampling decision for the given options.\n *\n * Called every time a root span is created. Only root spans which emerge with a `sampled` value of `true` will be\n * sent to Sentry.\n */\nexport function sampleSpan(\n  options: Pick<CoreOptions, 'tracesSampleRate' | 'tracesSampler'>,\n  samplingContext: SamplingContext,\n  sampleRand: number,\n): [sampled: boolean, sampleRate?: number, localSampleRateWasApplied?: boolean] {\n  // nothing to do if span recording is not enabled\n  if (!hasSpansEnabled(options)) {\n    return [false];\n  }\n\n  let localSampleRateWasApplied = undefined;\n\n  // we would have bailed already if neither `tracesSampler` nor `tracesSampleRate` were defined, so one of these should\n  // work; prefer the hook if so\n  let sampleRate;\n  if (typeof options.tracesSampler === 'function') {\n    sampleRate = options.tracesSampler({\n      ...samplingContext,\n      inheritOrSampleWith: fallbackSampleRate => {\n        // If we have an incoming parent sample rate, we'll just use that one.\n        // The sampling decision will be inherited because of the sample_rand that was generated when the trace reached the incoming boundaries of the SDK.\n        if (typeof samplingContext.parentSampleRate === 'number') {\n          return samplingContext.parentSampleRate;\n        }\n\n        // Fallback if parent sample rate is not on the incoming trace (e.g. if there is no baggage)\n        // This is to provide backwards compatibility if there are incoming traces from older SDKs that don't send a parent sample rate or a sample rand. In these cases we just want to force either a sampling decision on the downstream traces via the sample rate.\n        if (typeof samplingContext.parentSampled === 'boolean') {\n          return Number(samplingContext.parentSampled);\n        }\n\n        return fallbackSampleRate;\n      },\n    });\n    localSampleRateWasApplied = true;\n  } else if (samplingContext.parentSampled !== undefined) {\n    sampleRate = samplingContext.parentSampled;\n  } else if (typeof options.tracesSampleRate !== 'undefined') {\n    sampleRate = options.tracesSampleRate;\n    localSampleRateWasApplied = true;\n  }\n\n  // Since this is coming from the user (or from a function provided by the user), who knows what we might get.\n  // (The only valid values are booleans or numbers between 0 and 1.)\n  const parsedSampleRate = parseSampleRate(sampleRate);\n\n  if (parsedSampleRate === undefined) {\n    DEBUG_BUILD &&\n      debug.warn(\n        `[Tracing] Discarding root span because of invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(\n          sampleRate,\n        )} of type ${JSON.stringify(typeof sampleRate)}.`,\n      );\n    return [false];\n  }\n\n  // if the function returned 0 (or false), or if `tracesSampleRate` is 0, it's a sign the transaction should be dropped\n  if (!parsedSampleRate) {\n    DEBUG_BUILD &&\n      debug.log(\n        `[Tracing] Discarding transaction because ${\n          typeof options.tracesSampler === 'function'\n            ? 'tracesSampler returned 0 or false'\n            : 'a negative sampling decision was inherited or tracesSampleRate is set to 0'\n        }`,\n      );\n    return [false, parsedSampleRate, localSampleRateWasApplied];\n  }\n\n  // We always compare the sample rand for the current execution context against the chosen sample rate.\n  // Read more: https://develop.sentry.dev/sdk/telemetry/traces/#propagated-random-value\n  const shouldSample = sampleRand < parsedSampleRate;\n\n  // if we're not going to keep it, we're done\n  if (!shouldSample) {\n    DEBUG_BUILD &&\n      debug.log(\n        `[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(\n          sampleRate,\n        )})`,\n      );\n  }\n\n  return [shouldSample, parsedSampleRate, localSampleRateWasApplied];\n}\n", "/* eslint-disable max-lines */\n\nimport { getAsyncContextStrategy } from '../asyncContext';\nimport type { AsyncContextStrategy } from '../asyncContext/types';\nimport { getMainCarrier } from '../carrier';\nimport { getClient, getCurrentScope, getIsolationScope, withScope } from '../currentScopes';\nimport { DEBUG_BUILD } from '../debug-build';\nimport type { Scope } from '../scope';\nimport {\n  SEMANTIC_ATTRIBUTE_SENTRY_OP,\n  SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,\n  SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,\n} from '../semanticAttributes';\nimport type { ClientOptions } from '../types/options';\nimport type { SentrySpanArguments, Span, SpanTimeInput } from '../types/span';\nimport type { StartSpanOptions } from '../types/startSpanOptions';\nimport { baggageHeaderToDynamicSamplingContext } from '../utils/baggage';\nimport { debug } from '../utils/debug-logger';\nimport { handleCallbackErrors } from '../utils/handleCallbackErrors';\nimport { hasSpansEnabled } from '../utils/hasSpansEnabled';\nimport { shouldIgnoreSpan } from '../utils/should-ignore-span';\nimport { hasSpanStreamingEnabled } from './spans/hasSpanStreamingEnabled';\nimport { parseSampleRate } from '../utils/parseSampleRate';\nimport { generateTraceId } from '../utils/propagationContext';\nimport { safeMathRandom } from '../utils/randomSafeContext';\nimport { _getSpanForScope, _setSpanForScope } from '../utils/spanOnScope';\nimport { addChildSpanToSpan, getRootSpan, spanIsSampled, spanTimeInputToSeconds, spanToJSON } from '../utils/spanUtils';\nimport { propagationContextFromHeaders, shouldContinueTrace } from '../utils/tracing';\nimport { freezeDscOnSpan, getDynamicSamplingContextFromSpan } from './dynamicSamplingContext';\nimport { logSpanStart } from './logSpans';\nimport { sampleSpan } from './sampling';\nimport { SentryNonRecordingSpan, spanIsNonRecordingSpan } from './sentryNonRecordingSpan';\nimport { SentrySpan } from './sentrySpan';\nimport { SPAN_STATUS_ERROR } from './spanstatus';\nimport { setCapturedScopesOnSpan } from './utils';\nimport type { Client } from '../client';\n\nexport const SUPPRESS_TRACING_KEY = '__SENTRY_SUPPRESS_TRACING__';\n\n/**\n * Wraps a function with a transaction/span and finishes the span after the function is done.\n * The created span is the active span and will be used as parent by other spans created inside the function\n * and can be accessed via `Sentry.getActiveSpan()`, as long as the function is executed while the scope is active.\n *\n * If you want to create a span that is not set as active, use {@link startInactiveSpan}.\n *\n * You'll always get a span passed to the callback,\n * it may just be a non-recording span if the span is not sampled or if tracing is disabled.\n */\nexport function startSpan<T>(options: StartSpanOptions, callback: (span: Span) => T): T {\n  const acs = getAcs();\n  if (acs.startSpan) {\n    return acs.startSpan(options, callback);\n  }\n\n  const spanArguments = parseSentrySpanArguments(options);\n  const { forceTransaction, parentSpan: customParentSpan, scope: customScope } = options;\n\n  // We still need to fork a potentially passed scope, as we set the active span on it\n  // and we need to ensure that it is cleaned up properly once the span ends.\n  const customForkedScope = customScope?.clone();\n\n  return withScope(customForkedScope, () => {\n    // If `options.parentSpan` is defined, we want to wrap the callback in `withActiveSpan`\n    const wrapper = getActiveSpanWrapper<T>(customParentSpan);\n\n    return wrapper(() => {\n      const scope = getCurrentScope();\n      const parentSpan = getParentSpan(scope, customParentSpan);\n      const client = getClient();\n\n      const missingRequiredParent = options.onlyIfParent && !parentSpan;\n      const activeSpan = missingRequiredParent\n        ? startMissingRequiredParentSpan(scope, client)\n        : createChildOrRootSpan({\n            parentSpan,\n            spanArguments,\n            forceTransaction,\n            scope,\n          });\n\n      // Ignored root spans still need to be set on scope so that `getActiveSpan()` returns them\n      // and descendants are also non-recording. Ignored child spans don't need this because\n      // the parent span is already on scope.\n      if (!spanIsIgnored(activeSpan) || !parentSpan) {\n        _setSpanForScope(scope, activeSpan);\n      }\n\n      return handleCallbackErrors(\n        () => callback(activeSpan),\n        () => {\n          // Only update the span status if it hasn't been changed yet, and the span is not yet finished\n          const { status } = spanToJSON(activeSpan);\n          if (activeSpan.isRecording() && (!status || status === 'ok')) {\n            activeSpan.setStatus({ code: SPAN_STATUS_ERROR, message: 'internal_error' });\n          }\n        },\n        () => {\n          activeSpan.end();\n        },\n      );\n    });\n  });\n}\n\n/**\n * Similar to `Sentry.startSpan`. Wraps a function with a transaction/span, but does not finish the span\n * after the function is done automatically. Use `span.end()` to end the span.\n *\n * The created span is the active span and will be used as parent by other spans created inside the function\n * and can be accessed via `Sentry.getActiveSpan()`, as long as the function is executed while the scope is active.\n *\n * You'll always get a span passed to the callback,\n * it may just be a non-recording span if the span is not sampled or if tracing is disabled.\n */\nexport function startSpanManual<T>(options: StartSpanOptions, callback: (span: Span, finish: () => void) => T): T {\n  const acs = getAcs();\n  if (acs.startSpanManual) {\n    return acs.startSpanManual(options, callback);\n  }\n\n  const spanArguments = parseSentrySpanArguments(options);\n  const { forceTransaction, parentSpan: customParentSpan, scope: customScope } = options;\n\n  const customForkedScope = customScope?.clone();\n\n  return withScope(customForkedScope, () => {\n    // If `options.parentSpan` is defined, we want to wrap the callback in `withActiveSpan`\n    const wrapper = getActiveSpanWrapper<T>(customParentSpan);\n\n    return wrapper(() => {\n      const scope = getCurrentScope();\n      const parentSpan = getParentSpan(scope, customParentSpan);\n\n      const missingRequiredParent = options.onlyIfParent && !parentSpan;\n      const activeSpan = missingRequiredParent\n        ? startMissingRequiredParentSpan(scope, getClient())\n        : createChildOrRootSpan({\n            parentSpan,\n            spanArguments,\n            forceTransaction,\n            scope,\n          });\n\n      // We don't set ignored child spans onto the scope because there likely is an active,\n      // unignored span on the scope already.\n      if (!spanIsIgnored(activeSpan) || !parentSpan) {\n        _setSpanForScope(scope, activeSpan);\n      }\n\n      return handleCallbackErrors(\n        // We pass the `finish` function to the callback, so the user can finish the span manually\n        // this is mainly here for historic purposes because previously, we instructed users to call\n        // `finish` instead of `span.end()` to also clean up the scope. Nowadays, calling `span.end()`\n        // or `finish` has the same effect and we simply leave it here to avoid breaking user code.\n        () => callback(activeSpan, () => activeSpan.end()),\n        () => {\n          // Only update the span status if it hasn't been changed yet, and the span is not yet finished\n          const { status } = spanToJSON(activeSpan);\n          if (activeSpan.isRecording() && (!status || status === 'ok')) {\n            activeSpan.setStatus({ code: SPAN_STATUS_ERROR, message: 'internal_error' });\n          }\n        },\n      );\n    });\n  });\n}\n\n/**\n * Creates a span. This span is not set as active, so will not get automatic instrumentation spans\n * as children or be able to be accessed via `Sentry.getActiveSpan()`.\n *\n * If you want to create a span that is set as active, use {@link startSpan}.\n *\n * This function will always return a span,\n * it may just be a non-recording span if the span is not sampled or if tracing is disabled.\n */\nexport function startInactiveSpan(options: StartSpanOptions): Span {\n  const acs = getAcs();\n  if (acs.startInactiveSpan) {\n    return acs.startInactiveSpan(options);\n  }\n\n  return _startInactiveSpanImpl(options);\n}\n\n/**\n * Internal version of startInactiveSpan that bypasses the ACS check.\n * Used by SentryTracerProvider to create spans without triggering recursion\n * through ACS overrides.\n * @hidden\n */\nexport function _INTERNAL_startInactiveSpan(options: StartSpanOptions): Span {\n  return _startInactiveSpanImpl(options);\n}\n\nfunction _startInactiveSpanImpl(options: StartSpanOptions): Span {\n  const spanArguments = parseSentrySpanArguments(options);\n  const { forceTransaction, parentSpan: customParentSpan } = options;\n\n  // If `options.scope` is defined, we use this as as a wrapper,\n  // If `options.parentSpan` is defined, we want to wrap the callback in `withActiveSpan`\n  const wrapper = options.scope\n    ? (callback: () => Span) => withScope(options.scope, callback)\n    : customParentSpan !== undefined\n      ? (callback: () => Span) => withActiveSpan(customParentSpan, callback)\n      : (callback: () => Span) => callback();\n\n  return wrapper(() => {\n    const scope = getCurrentScope();\n    const parentSpan = getParentSpan(scope, customParentSpan);\n    const client = getClient();\n\n    const missingRequiredParent = options.onlyIfParent && !parentSpan;\n\n    if (missingRequiredParent) {\n      return startMissingRequiredParentSpan(scope, client);\n    }\n\n    return createChildOrRootSpan({\n      parentSpan,\n      spanArguments,\n      forceTransaction,\n      scope,\n    });\n  });\n}\n\n/**\n * Continue a trace from `sentry-trace` and `baggage` values.\n * These values can be obtained from incoming request headers, or in the browser from `<meta name=\"sentry-trace\">`\n * and `<meta name=\"baggage\">` HTML tags.\n *\n * Spans started with `startSpan`, `startSpanManual` and `startInactiveSpan`, within the callback will automatically\n * be attached to the incoming trace.\n */\nexport const continueTrace = <V>(\n  options: {\n    sentryTrace: Parameters<typeof propagationContextFromHeaders>[0];\n    baggage: Parameters<typeof propagationContextFromHeaders>[1];\n  },\n  callback: () => V,\n): V => {\n  const carrier = getMainCarrier();\n  const acs = getAsyncContextStrategy(carrier);\n  if (acs.continueTrace) {\n    return acs.continueTrace(options, callback);\n  }\n\n  const { sentryTrace, baggage } = options;\n\n  const client = getClient();\n  const incomingDsc = baggageHeaderToDynamicSamplingContext(baggage);\n  if (client && !shouldContinueTrace(client, incomingDsc?.org_id)) {\n    return startNewTrace(callback);\n  }\n\n  return withScope(scope => {\n    const propagationContext = propagationContextFromHeaders(sentryTrace, baggage);\n    scope.setPropagationContext(propagationContext);\n    _setSpanForScope(scope, undefined);\n    return callback();\n  });\n};\n\n/**\n * Forks the current scope and sets the provided span as active span in the context of the provided callback. Can be\n * passed `null` to start an entirely new span tree.\n *\n * @param span Spans started in the context of the provided callback will be children of this span. If `null` is passed,\n * spans started within the callback will not be attached to a parent span.\n * @param callback Execution context in which the provided span will be active. Is passed the newly forked scope.\n * @returns the value returned from the provided callback function.\n */\nexport function withActiveSpan<T>(span: Span | null, callback: (scope: Scope) => T): T {\n  const acs = getAcs();\n  if (acs.withActiveSpan) {\n    return acs.withActiveSpan(span, callback);\n  }\n\n  return withScope(scope => {\n    _setSpanForScope(scope, span || undefined);\n    return callback(scope);\n  });\n}\n\n/** Suppress tracing in the given callback, ensuring no spans are generated inside of it. */\nexport function suppressTracing<T>(callback: () => T): T {\n  const acs = getAcs();\n\n  if (acs.suppressTracing) {\n    return acs.suppressTracing(callback);\n  }\n\n  return withScope(scope => {\n    // Note: We do not wait for the callback to finish before we reset the metadata\n    // the reason for this is that otherwise, in the browser this can lead to very weird behavior\n    // as there is only a single top scope, if the callback takes longer to finish,\n    // other, unrelated spans may also be suppressed, which we do not want\n    // so instead, we only suppress tracing synchronoysly in the browser\n    scope.setSDKProcessingMetadata({ [SUPPRESS_TRACING_KEY]: true });\n    const res = callback();\n    scope.setSDKProcessingMetadata({ [SUPPRESS_TRACING_KEY]: undefined });\n    return res;\n  });\n}\n\n/** Check if tracing is suppressed. */\nexport function isTracingSuppressed(scope = getCurrentScope()): boolean {\n  const acs = getAcs();\n\n  if (acs.isTracingSuppressed) {\n    return acs.isTracingSuppressed(scope);\n  }\n\n  return scope.getScopeData().sdkProcessingMetadata[SUPPRESS_TRACING_KEY] === true;\n}\n\n/**\n * Starts a new trace for the duration of the provided callback. Spans started within the\n * callback will be part of the new trace instead of a potentially previously started trace.\n *\n * Important: Only use this function if you want to override the default trace lifetime and\n * propagation mechanism of the SDK for the duration and scope of the provided callback.\n * The newly created trace will also be the root of a new distributed trace, for example if\n * you make http requests within the callback.\n * This function might be useful if the operation you want to instrument should not be part\n * of a potentially ongoing trace.\n *\n * Default behavior:\n * - Server-side: A new trace is started for each incoming request.\n * - Browser: A new trace is started for each page our route. Navigating to a new route\n *            or page will automatically create a new trace.\n */\nexport function startNewTrace<T>(callback: () => T): T {\n  const acs = getAcs();\n  if (acs.startNewTrace) {\n    return acs.startNewTrace(callback);\n  }\n\n  return withScope(scope => {\n    scope.setPropagationContext({\n      traceId: generateTraceId(),\n      sampleRand: safeMathRandom(),\n    });\n    DEBUG_BUILD && debug.log(`Starting a new trace with id ${scope.getPropagationContext().traceId}`);\n    return withActiveSpan(null, callback);\n  });\n}\n\n/**\n * The placeholder returned from `startSpan*` when `onlyIfParent` is set but there is no parent span.\n * It carries the current trace id and captured scopes so the trace data it propagates (and any nested\n * span that resolves it as its root via `getRootSpan`) reads its DSC from the scope, preserving a\n * continued trace's DSC instead of fabricating a fresh client one. Also records the dropped-span outcome.\n */\nfunction startMissingRequiredParentSpan(scope: Scope, client: Client | undefined): SentryNonRecordingSpan {\n  client?.recordDroppedEvent('no_parent_span', 'span');\n  const span = new SentryNonRecordingSpan({ traceId: scope.getPropagationContext().traceId });\n  setCapturedScopesOnSpan(span, scope, getIsolationScope());\n  return span;\n}\n\nfunction createChildOrRootSpan({\n  parentSpan,\n  spanArguments,\n  forceTransaction,\n  scope,\n}: {\n  parentSpan: SentrySpan | undefined;\n  spanArguments: SentrySpanArguments;\n  forceTransaction?: boolean;\n  scope: Scope;\n}): Span {\n  const isolationScope = getIsolationScope();\n\n  if (!hasSpansEnabled()) {\n    const scopePropagationContext = { ...isolationScope.getPropagationContext(), ...scope.getPropagationContext() };\n    const traceId = parentSpan ? parentSpan.spanContext().traceId : scopePropagationContext.traceId;\n\n    // The placeholder is a thin marker; it carries no sampling decision or DSC. Both are read from\n    // the scope: the sampling decision in `getTraceData`, the DSC in `getDynamicSamplingContextFromSpan`.\n    const span = new SentryNonRecordingSpan({ traceId });\n\n    // Nested placeholders link to their parent so `getRootSpan` resolves to the root placeholder,\n    // whose captured scope is the source of truth. Root/forced placeholders are their own root.\n    if (parentSpan && !forceTransaction) {\n      addChildSpanToSpan(parentSpan, span);\n    }\n\n    // Capture scopes so consumers (e.g. SentryTraceProvider) can read them and so the DSC can be\n    // resolved from the scope by `getDynamicSamplingContextFromSpan`. Consistent with `startIdleSpan`.\n    setCapturedScopesOnSpan(span, scope, isolationScope);\n\n    return span;\n  }\n\n  const client = getClient();\n  if (_shouldIgnoreStreamedSpan(client, spanArguments)) {\n    if (!isTracingSuppressed(scope)) {\n      // if tracing is actively suppressed (Sentry.suppressTracing(...)),\n      // we don't want to record a client outcome for the ignored span\n      client?.recordDroppedEvent('ignored', 'span');\n    }\n\n    const ignoredSpan = new SentryNonRecordingSpan({\n      dropReason: 'ignored',\n      traceId: parentSpan?.spanContext().traceId ?? scope.getPropagationContext().traceId,\n    });\n    if (parentSpan && !forceTransaction) {\n      // Preserve the root relationship so async context strategies can distinguish\n      // ignored children from ignored segments and keep the parent active.\n      addChildSpanToSpan(parentSpan, ignoredSpan);\n    }\n    setCapturedScopesOnSpan(ignoredSpan, scope, isolationScope);\n\n    return ignoredSpan;\n  }\n\n  let span: Span;\n  if (parentSpan && !forceTransaction) {\n    span = _startChildSpan(parentSpan, scope, spanArguments, isolationScope);\n    addChildSpanToSpan(parentSpan, span);\n  } else if (parentSpan) {\n    // If we forced a transaction but have a parent span, make sure to continue from the parent span, not the scope\n    const dsc = getDynamicSamplingContextFromSpan(parentSpan);\n    const { traceId, spanId: parentSpanId } = parentSpan.spanContext();\n    const parentSampled = spanIsSampled(parentSpan);\n\n    span = _startRootSpan(\n      {\n        traceId,\n        parentSpanId,\n        ...spanArguments,\n      },\n      scope,\n      isolationScope,\n      parentSampled,\n    );\n\n    freezeDscOnSpan(span, dsc);\n  } else {\n    const {\n      traceId,\n      dsc,\n      parentSpanId,\n      sampled: parentSampled,\n    } = {\n      ...isolationScope.getPropagationContext(),\n      ...scope.getPropagationContext(),\n    };\n\n    span = _startRootSpan(\n      {\n        traceId,\n        parentSpanId,\n        ...spanArguments,\n      },\n      scope,\n      isolationScope,\n      parentSampled,\n    );\n\n    if (dsc) {\n      freezeDscOnSpan(span, dsc);\n    }\n  }\n\n  logSpanStart(span);\n\n  return span;\n}\n\n/**\n * This converts StartSpanOptions to SentrySpanArguments.\n * For the most part (for now) we accept the same options,\n * but some of them need to be transformed.\n */\nfunction parseSentrySpanArguments(options: StartSpanOptions): SentrySpanArguments {\n  const exp = options.experimental || {};\n  const initialCtx: SentrySpanArguments = {\n    isStandalone: exp.standalone,\n    ...options,\n  };\n\n  if (options.startTime) {\n    const ctx: SentrySpanArguments & { startTime?: SpanTimeInput } = { ...initialCtx };\n    ctx.startTimestamp = spanTimeInputToSeconds(options.startTime);\n    delete ctx.startTime;\n    return ctx;\n  }\n\n  return initialCtx;\n}\n\nfunction getAcs(): AsyncContextStrategy {\n  const carrier = getMainCarrier();\n  return getAsyncContextStrategy(carrier);\n}\n\nfunction _startRootSpan(\n  spanArguments: SentrySpanArguments,\n  scope: Scope,\n  isolationScope: Scope,\n  parentSampled?: boolean,\n): SentrySpan {\n  const client = getClient();\n  const options: Partial<ClientOptions> = client?.getOptions() || {};\n\n  const { name = '' } = spanArguments;\n\n  const mutableSpanSamplingData = { spanAttributes: { ...spanArguments.attributes }, spanName: name, parentSampled };\n\n  // we don't care about the decision for the moment; this is just a placeholder\n  client?.emit('beforeSampling', mutableSpanSamplingData, { decision: false });\n\n  // If hook consumers override the parentSampled flag, we will use that value instead of the actual one\n  const finalParentSampled = mutableSpanSamplingData.parentSampled ?? parentSampled;\n  const finalAttributes = mutableSpanSamplingData.spanAttributes;\n\n  const currentPropagationContext = scope.getPropagationContext();\n  const _isTracingSuppressed = isTracingSuppressed(scope);\n\n  const [sampled, sampleRate, localSampleRateWasApplied] = _isTracingSuppressed\n    ? [false]\n    : sampleSpan(\n        options,\n        {\n          name,\n          parentSampled: finalParentSampled,\n          attributes: finalAttributes,\n          normalizedRequest: isolationScope.getScopeData().sdkProcessingMetadata.normalizedRequest,\n          parentSampleRate: parseSampleRate(currentPropagationContext.dsc?.sample_rate),\n        },\n        currentPropagationContext.sampleRand,\n      );\n\n  const rootSpan = new SentrySpan({\n    ...spanArguments,\n    attributes: {\n      [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'custom',\n      [SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE]:\n        sampleRate !== undefined && localSampleRateWasApplied ? sampleRate : undefined,\n      ...finalAttributes,\n    },\n    sampled,\n  });\n\n  if (!sampled && client && !_isTracingSuppressed) {\n    DEBUG_BUILD && debug.log('[Tracing] Discarding root span because its trace was not chosen to be sampled.');\n    client.recordDroppedEvent('sample_rate', hasSpanStreamingEnabled(client) ? 'span' : 'transaction');\n  }\n\n  setCapturedScopesOnSpan(rootSpan, scope, isolationScope);\n\n  if (client) {\n    client.emit('spanStart', rootSpan);\n  }\n\n  return rootSpan;\n}\n\n/**\n * Creates a new `Span` while setting the current `Span.id` as `parentSpanId`.\n * This inherits the sampling decision from the parent span.\n */\nfunction _startChildSpan(\n  parentSpan: Span,\n  scope: Scope,\n  spanArguments: SentrySpanArguments,\n  isolationScope: Scope,\n): Span {\n  const { spanId, traceId } = parentSpan.spanContext();\n  const _isTracingSuppressed = isTracingSuppressed(scope);\n  const sampled = _isTracingSuppressed ? false : spanIsSampled(parentSpan);\n\n  const childSpan = sampled\n    ? new SentrySpan({\n        ...spanArguments,\n        parentSpanId: spanId,\n        traceId,\n        sampled,\n      })\n    : new SentryNonRecordingSpan({ traceId });\n\n  addChildSpanToSpan(parentSpan, childSpan);\n\n  setCapturedScopesOnSpan(childSpan, scope, isolationScope);\n\n  const client = getClient();\n\n  if (!client) {\n    return childSpan;\n  }\n\n  if (hasSpanStreamingEnabled(client) && spanIsNonRecordingSpan(childSpan)) {\n    if (spanIsNonRecordingSpan(parentSpan) && parentSpan.dropReason) {\n      // We land here if the parent span was a segment span that was ignored (`ignoreSpans`).\n      // In this case, the child was also ignored (see `sampled` above) but we need to\n      // record a client outcome for the child.\n      childSpan.dropReason = parentSpan.dropReason;\n      client.recordDroppedEvent(parentSpan.dropReason, 'span');\n    } else if (!_isTracingSuppressed) {\n      // Otherwise, the child is not sampled due to sampling of the parent span,\n      // hence we record a sample_rate client outcome for the child.\n      childSpan.dropReason = 'sample_rate';\n      client.recordDroppedEvent('sample_rate', 'span');\n    }\n  }\n\n  client.emit('spanStart', childSpan);\n  // If it has an endTimestamp, it's already ended\n  if (spanArguments.endTimestamp) {\n    client.emit('spanEnd', childSpan);\n    client.emit('afterSpanEnd', childSpan);\n  }\n\n  return childSpan;\n}\n\nfunction getParentSpan(scope: Scope, customParentSpan: Span | null | undefined): SentrySpan | undefined {\n  // always use the passed in span directly\n  if (customParentSpan) {\n    return customParentSpan as SentrySpan;\n  }\n\n  // This is different from `undefined` as it means the user explicitly wants no parent span\n  if (customParentSpan === null) {\n    return undefined;\n  }\n\n  const span = _getSpanForScope(scope) as SentrySpan | undefined;\n\n  if (!span) {\n    return undefined;\n  }\n\n  const client = getClient();\n  const options: Partial<ClientOptions> = client ? client.getOptions() : {};\n  if (options.parentSpanIsAlwaysRootSpan) {\n    return getRootSpan(span) as SentrySpan;\n  }\n\n  return span;\n}\n\nfunction getActiveSpanWrapper<T>(parentSpan: Span | undefined | null): (callback: () => T) => T {\n  return parentSpan !== undefined\n    ? (callback: () => T) => {\n        return withActiveSpan(parentSpan, callback);\n      }\n    : (callback: () => T) => callback();\n}\n\n/* Checks if `ignoreSpans` applies (extracted for bundle size)*/\nfunction _shouldIgnoreStreamedSpan(client: Client | undefined, spanArguments: SentrySpanArguments): boolean {\n  const ignoreSpans = client?.getOptions().ignoreSpans;\n\n  if (!client || !hasSpanStreamingEnabled(client) || !ignoreSpans?.length) {\n    return false;\n  }\n\n  return shouldIgnoreSpan(\n    {\n      description: spanArguments.name || '',\n      op: spanArguments.attributes?.[SEMANTIC_ATTRIBUTE_SENTRY_OP] || spanArguments.op,\n      attributes: spanArguments.attributes,\n    },\n    ignoreSpans,\n  );\n}\n\n/**\n * Whether a span is an ignored (`ignoreSpans`) placeholder. Such a span must not be set as the active\n * span when it has a parent, so its children attach to that parent and get re-parented rather than\n * dropped with it. Shared with the OTel-based provider so both span pipelines apply the same rule.\n */\nexport function spanIsIgnored(span: Span): span is SentryNonRecordingSpan {\n  return spanIsNonRecordingSpan(span) && span.dropReason === 'ignored';\n}\n", "import { getClient, getCurrentScope, getIsolationScope } from '../currentScopes';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON } from '../semanticAttributes';\nimport type { Span } from '../types/span';\nimport type { StartSpanOptions } from '../types/startSpanOptions';\nimport { debug } from '../utils/debug-logger';\nimport { hasSpansEnabled } from '../utils/hasSpansEnabled';\nimport { shouldIgnoreSpan } from '../utils/should-ignore-span';\nimport { _setSpanForScope } from '../utils/spanOnScope';\nimport {\n  getActiveSpan,\n  getSpanDescendants,\n  removeChildSpanFromSpan,\n  spanTimeInputToSeconds,\n  spanToJSON,\n} from '../utils/spanUtils';\nimport { timestampInSeconds } from '../utils/time';\nimport { SentryNonRecordingSpan, spanIsNonRecordingSpan } from './sentryNonRecordingSpan';\nimport { SentrySpan } from './sentrySpan';\nimport { SPAN_STATUS_ERROR, SPAN_STATUS_OK } from './spanstatus';\nimport { startInactiveSpan } from './trace';\nimport { setCapturedScopesOnSpan } from './utils';\n\nexport const TRACING_DEFAULTS = {\n  idleTimeout: 1_000,\n  finalTimeout: 30_000,\n  childSpanTimeout: 15_000,\n};\n\nconst FINISH_REASON_HEARTBEAT_FAILED = 'heartbeatFailed';\nconst FINISH_REASON_IDLE_TIMEOUT = 'idleTimeout';\nconst FINISH_REASON_FINAL_TIMEOUT = 'finalTimeout';\nconst FINISH_REASON_EXTERNAL_FINISH = 'externalFinish';\nconst FINISH_REASON_CANCELLED = 'cancelled';\n\n// unused\nconst FINISH_REASON_DOCUMENT_HIDDEN = 'documentHidden';\n\n// unused in this file, but used in BrowserTracing\nconst FINISH_REASON_INTERRUPTED = 'interactionInterrupted';\n\ntype IdleSpanFinishReason =\n  | typeof FINISH_REASON_CANCELLED\n  | typeof FINISH_REASON_DOCUMENT_HIDDEN\n  | typeof FINISH_REASON_EXTERNAL_FINISH\n  | typeof FINISH_REASON_FINAL_TIMEOUT\n  | typeof FINISH_REASON_HEARTBEAT_FAILED\n  | typeof FINISH_REASON_IDLE_TIMEOUT\n  | typeof FINISH_REASON_INTERRUPTED;\n\ninterface IdleSpanOptions {\n  /**\n   * The time that has to pass without any span being created.\n   * If this time is exceeded, the idle span will finish.\n   */\n  idleTimeout: number;\n  /**\n   * The max. time an idle span may run.\n   * If this time is exceeded, the idle span will finish no matter what.\n   */\n  finalTimeout: number;\n  /**\n   * The max. time a child span may run.\n   * If the time since the last span was started exceeds this time, the idle span will finish.\n   */\n  childSpanTimeout?: number;\n  /**\n   * When set to `true`, will disable the idle timeout and child timeout\n   * until the `idleSpanEnableAutoFinish` hook is emitted for the idle span.\n   * The final timeout mechanism will not be affected by this option,\n   * meaning the idle span will definitely be finished when the final timeout is\n   * reached, no matter what this option is configured to.\n   *\n   * Defaults to `false`.\n   */\n  disableAutoFinish?: boolean;\n\n  /** Allows to configure a hook that is called when the idle span is ended, before it is processed. */\n  beforeSpanEnd?: (span: Span) => void;\n\n  /**\n   * If set to `true`, the idle span will be trimmed to the latest span end timestamp of its children.\n   *\n   * @default `true`.\n   */\n  trimIdleSpanEndTimestamp?: boolean;\n}\n\n/**\n * An idle span is a span that automatically finishes. It does this by tracking child spans as activities.\n * An idle span is always the active span.\n */\nexport function startIdleSpan(startSpanOptions: StartSpanOptions, options: Partial<IdleSpanOptions> = {}): Span {\n  // Activities store a list of active spans\n  const activities = new Map<string, boolean>();\n\n  // We should not use heartbeat if we finished a span\n  let _finished = false;\n\n  // Timer that tracks idleTimeout\n  let _idleTimeoutID: ReturnType<typeof setTimeout> | undefined;\n\n  // Timer that tracks maxSpanTime for child spans\n  let _childSpanTimeoutID: ReturnType<typeof setTimeout> | undefined;\n\n  // The reason why the span was finished\n  let _finishReason: IdleSpanFinishReason = FINISH_REASON_EXTERNAL_FINISH;\n\n  let _autoFinishAllowed: boolean = !options.disableAutoFinish;\n\n  const _cleanupHooks: (() => void)[] = [];\n\n  const {\n    idleTimeout = TRACING_DEFAULTS.idleTimeout,\n    finalTimeout = TRACING_DEFAULTS.finalTimeout,\n    childSpanTimeout = TRACING_DEFAULTS.childSpanTimeout,\n    beforeSpanEnd,\n    trimIdleSpanEndTimestamp = true,\n  } = options;\n\n  const client = getClient();\n  const scope = getCurrentScope();\n\n  if (!client || !hasSpansEnabled()) {\n    // The placeholder is a thin marker; it carries no sampling decision or DSC. Both are read from\n    // the scope: the sampling decision in `getTraceData`, the DSC in `getDynamicSamplingContextFromSpan`.\n    const span = new SentryNonRecordingSpan({ traceId: scope.getPropagationContext().traceId });\n\n    // Capture scopes so consumers (e.g. SentryTraceProvider) can read them and so the DSC can be\n    // resolved from the scope by `getDynamicSamplingContextFromSpan`.\n    setCapturedScopesOnSpan(span, scope, getIsolationScope());\n\n    return span;\n  }\n\n  const previousActiveSpan = getActiveSpan();\n  const span = _startIdleSpan(startSpanOptions);\n\n  // We patch span.end to ensure we can run some things before the span is ended\n  // eslint-disable-next-line @typescript-eslint/unbound-method\n  span.end = new Proxy(span.end, {\n    apply(target, thisArg, args: Parameters<Span['end']>) {\n      if (beforeSpanEnd) {\n        beforeSpanEnd(span);\n      }\n\n      // If the span is non-recording, nothing more to do here...\n      // This is the case if tracing is enabled but this specific span was not sampled\n      if (spanIsNonRecordingSpan(thisArg)) {\n        return;\n      }\n\n      // Just ensuring that this keeps working, even if we ever have more arguments here\n      const [definedEndTimestamp, ...rest] = args;\n      const timestamp = definedEndTimestamp || timestampInSeconds();\n      const spanEndTimestamp = spanTimeInputToSeconds(timestamp);\n\n      // Ensure we end with the last span timestamp, if possible\n      const spans = getSpanDescendants(span).filter(child => child !== span);\n\n      const spanJson = spanToJSON(span);\n\n      // If we have no spans, we just end, nothing else to do here\n      // Likewise, if users explicitly ended the span, we simply end the span without timestamp adjustment\n      if (!spans.length || !trimIdleSpanEndTimestamp) {\n        onIdleSpanEnded(spanEndTimestamp);\n        return Reflect.apply(target, thisArg, [spanEndTimestamp, ...rest]);\n      }\n\n      const ignoreSpans = client.getOptions().ignoreSpans;\n\n      const latestSpanEndTimestamp = spans?.reduce((acc: number | undefined, current) => {\n        const currentSpanJson = spanToJSON(current);\n        if (!currentSpanJson.timestamp) {\n          return acc;\n        }\n        // Ignored spans will get dropped later (in the client) but since we already adjust\n        // the idle span end timestamp here, we can already take to-be-ignored spans out of\n        // the calculation here.\n        if (\n          ignoreSpans &&\n          shouldIgnoreSpan(\n            { description: currentSpanJson.description, op: currentSpanJson.op, attributes: currentSpanJson.data },\n            ignoreSpans,\n          )\n        ) {\n          return acc;\n        }\n        return acc ? Math.max(acc, currentSpanJson.timestamp) : currentSpanJson.timestamp;\n      }, undefined);\n\n      // In reality this should always exist here, but type-wise it may be undefined...\n      const spanStartTimestamp = spanJson.start_timestamp;\n\n      // The final endTimestamp should:\n      // * Never be before the span start timestamp\n      // * Be the latestSpanEndTimestamp, if there is one, and it is smaller than the passed span end timestamp\n      // * Otherwise be the passed end timestamp\n      // Final timestamp can never be after finalTimeout\n      const endTimestamp = Math.min(\n        spanStartTimestamp ? spanStartTimestamp + finalTimeout / 1000 : Infinity,\n        Math.max(spanStartTimestamp || -Infinity, Math.min(spanEndTimestamp, latestSpanEndTimestamp || Infinity)),\n      );\n\n      onIdleSpanEnded(endTimestamp);\n      return Reflect.apply(target, thisArg, [endTimestamp, ...rest]);\n    },\n  });\n\n  /**\n   * Cancels the existing idle timeout, if there is one.\n   */\n  function _cancelIdleTimeout(): void {\n    if (_idleTimeoutID) {\n      clearTimeout(_idleTimeoutID);\n      _idleTimeoutID = undefined;\n    }\n  }\n\n  /**\n   * Cancels the existing child span timeout, if there is one.\n   */\n  function _cancelChildSpanTimeout(): void {\n    if (_childSpanTimeoutID) {\n      clearTimeout(_childSpanTimeoutID);\n      _childSpanTimeoutID = undefined;\n    }\n  }\n\n  /**\n   * Restarts idle timeout, if there is no running idle timeout it will start one.\n   */\n  function _restartIdleTimeout(endTimestamp?: number): void {\n    _cancelIdleTimeout();\n    _idleTimeoutID = setTimeout(() => {\n      if (!_finished && activities.size === 0 && _autoFinishAllowed) {\n        _finishReason = FINISH_REASON_IDLE_TIMEOUT;\n        span.end(endTimestamp);\n      }\n    }, idleTimeout);\n  }\n\n  /**\n   * Restarts child span timeout, if there is none running it will start one.\n   */\n  function _restartChildSpanTimeout(endTimestamp?: number): void {\n    _cancelChildSpanTimeout();\n    _childSpanTimeoutID = setTimeout(() => {\n      if (!_finished && _autoFinishAllowed) {\n        _finishReason = FINISH_REASON_HEARTBEAT_FAILED;\n        span.end(endTimestamp);\n      }\n    }, childSpanTimeout);\n  }\n\n  /**\n   * Start tracking a specific activity.\n   * @param spanId The span id that represents the activity\n   */\n  function _pushActivity(spanId: string): void {\n    _cancelIdleTimeout();\n    activities.set(spanId, true);\n\n    const endTimestamp = timestampInSeconds();\n    // We need to add the timeout here to have the real endtimestamp of the idle span\n    // Remember timestampInSeconds is in seconds, timeout is in ms\n    _restartChildSpanTimeout(endTimestamp + childSpanTimeout / 1000);\n  }\n\n  /**\n   * Remove an activity from usage\n   * @param spanId The span id that represents the activity\n   */\n  function _popActivity(spanId: string): void {\n    if (activities.has(spanId)) {\n      activities.delete(spanId);\n    }\n\n    if (activities.size === 0) {\n      const endTimestamp = timestampInSeconds();\n      // We need to add the timeout here to have the real endtimestamp of the idle span\n      // Remember timestampInSeconds is in seconds, timeout is in ms\n      _restartIdleTimeout(endTimestamp + idleTimeout / 1000);\n      _cancelChildSpanTimeout();\n    }\n  }\n\n  function onIdleSpanEnded(endTimestamp: number): void {\n    _finished = true;\n    activities.clear();\n\n    _cleanupHooks.forEach(cleanup => cleanup());\n\n    _setSpanForScope(scope, previousActiveSpan);\n\n    const spanJSON = spanToJSON(span);\n\n    const { start_timestamp: startTimestamp } = spanJSON;\n    // This should never happen, but to make TS happy...\n    if (!startTimestamp) {\n      return;\n    }\n\n    const attributes = spanJSON.data;\n    if (!attributes[SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON]) {\n      span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON, _finishReason);\n    }\n\n    // Set span status to 'ok' if it hasn't been explicitly set to an error status\n    const currentStatus = spanJSON.status;\n    if (!currentStatus || currentStatus === 'unknown') {\n      span.setStatus({ code: SPAN_STATUS_OK });\n    }\n\n    debug.log(`[Tracing] Idle span \"${spanJSON.op}\" finished`);\n\n    const childSpans = getSpanDescendants(span).filter(child => child !== span);\n\n    let discardedSpans = 0;\n    childSpans.forEach(childSpan => {\n      // We cancel all pending spans with status \"cancelled\" to indicate the idle span was finished early\n      if (childSpan.isRecording()) {\n        childSpan.setStatus({ code: SPAN_STATUS_ERROR, message: 'cancelled' });\n        childSpan.end(endTimestamp);\n        DEBUG_BUILD &&\n          debug.log('[Tracing] Cancelling span since span ended early', JSON.stringify(childSpan, undefined, 2));\n      }\n\n      const childSpanJSON = spanToJSON(childSpan);\n      const { timestamp: childEndTimestamp = 0, start_timestamp: childStartTimestamp = 0 } = childSpanJSON;\n\n      const spanStartedBeforeIdleSpanEnd = childStartTimestamp <= endTimestamp;\n\n      // Add a delta with idle timeout so that we prevent false positives\n      const timeoutWithMarginOfError = (finalTimeout + idleTimeout) / 1000;\n      const spanEndedBeforeFinalTimeout = childEndTimestamp - childStartTimestamp <= timeoutWithMarginOfError;\n\n      if (DEBUG_BUILD) {\n        const stringifiedSpan = JSON.stringify(childSpan, undefined, 2);\n        if (!spanStartedBeforeIdleSpanEnd) {\n          debug.log('[Tracing] Discarding span since it happened after idle span was finished', stringifiedSpan);\n        } else if (!spanEndedBeforeFinalTimeout) {\n          debug.log('[Tracing] Discarding span since it finished after idle span final timeout', stringifiedSpan);\n        }\n      }\n\n      if (!spanEndedBeforeFinalTimeout || !spanStartedBeforeIdleSpanEnd) {\n        removeChildSpanFromSpan(span, childSpan);\n        discardedSpans++;\n      }\n    });\n\n    if (discardedSpans > 0) {\n      span.setAttribute('sentry.idle_span_discarded_spans', discardedSpans);\n    }\n  }\n\n  _cleanupHooks.push(\n    client.on('spanStart', startedSpan => {\n      // If we already finished the idle span,\n      // or if this is the idle span itself being started,\n      // or if the started span has already been closed,\n      // we don't care about it for activity\n      if (\n        _finished ||\n        startedSpan === span ||\n        !!spanToJSON(startedSpan).timestamp ||\n        (startedSpan instanceof SentrySpan && startedSpan.isStandaloneSpan())\n      ) {\n        return;\n      }\n\n      const allSpans = getSpanDescendants(span);\n\n      // If the span that was just started is a child of the idle span, we should track it\n      if (allSpans.includes(startedSpan)) {\n        _pushActivity(startedSpan.spanContext().spanId);\n      }\n    }),\n  );\n\n  _cleanupHooks.push(\n    client.on('spanEnd', endedSpan => {\n      if (_finished) {\n        return;\n      }\n\n      _popActivity(endedSpan.spanContext().spanId);\n    }),\n  );\n\n  _cleanupHooks.push(\n    client.on('idleSpanEnableAutoFinish', spanToAllowAutoFinish => {\n      if (spanToAllowAutoFinish === span) {\n        _autoFinishAllowed = true;\n        _restartIdleTimeout();\n\n        if (activities.size) {\n          _restartChildSpanTimeout();\n        }\n      }\n    }),\n  );\n\n  // We only start the initial idle timeout if we are not delaying the auto finish\n  if (!options.disableAutoFinish) {\n    _restartIdleTimeout();\n  }\n\n  setTimeout(() => {\n    if (!_finished) {\n      span.setStatus({ code: SPAN_STATUS_ERROR, message: 'deadline_exceeded' });\n      _finishReason = FINISH_REASON_FINAL_TIMEOUT;\n      span.end();\n    }\n  }, finalTimeout);\n\n  return span;\n}\n\nfunction _startIdleSpan(options: StartSpanOptions): Span {\n  const span = startInactiveSpan(options);\n\n  _setSpanForScope(getCurrentScope(), span);\n\n  DEBUG_BUILD && debug.log('[Tracing] Started span is an idle span');\n\n  return span;\n}\n", "type DebouncedCallback = {\n  (): void | unknown;\n  flush: () => void | unknown;\n  cancel: () => void;\n};\ntype CallbackFunction = () => unknown;\ntype DebounceOptions = {\n  /** The max. time in ms to wait for the callback to be invoked. */\n  maxWait?: number;\n  /** This can be overwritten to use a different setTimeout implementation, e.g. to avoid triggering change detection in Angular  */\n  setTimeoutImpl?: typeof setTimeout;\n};\n\n/**\n * Heavily simplified debounce function based on lodash.debounce.\n *\n * This function takes a callback function (@param fun) and delays its invocation\n * by @param wait milliseconds. Optionally, a maxWait can be specified in @param options,\n * which ensures that the callback is invoked at least once after the specified max. wait time.\n *\n * @param func the function whose invocation is to be debounced\n * @param wait the minimum time until the function is invoked after it was called once\n * @param options the options object, which can contain the `maxWait` property\n *\n * @returns the debounced version of the function, which needs to be called at least once to start the\n *          debouncing process. Subsequent calls will reset the debouncing timer and, in case @paramfunc\n *          was already invoked in the meantime, return @param func's return value.\n *          The debounced function has two additional properties:\n *          - `flush`: Invokes the debounced function immediately and returns its return value\n *          - `cancel`: Cancels the debouncing process and resets the debouncing timer\n */\nexport function debounce(func: CallbackFunction, wait: number, options?: DebounceOptions): DebouncedCallback {\n  let callbackReturnValue: unknown;\n\n  let timerId: ReturnType<typeof setTimeout> | undefined;\n  let maxTimerId: ReturnType<typeof setTimeout> | undefined;\n\n  const maxWait = options?.maxWait ? Math.max(options.maxWait, wait) : 0;\n  const setTimeoutImpl = options?.setTimeoutImpl || setTimeout;\n\n  function invokeFunc(): unknown {\n    cancelTimers();\n    callbackReturnValue = func();\n    return callbackReturnValue;\n  }\n\n  function cancelTimers(): void {\n    timerId !== undefined && clearTimeout(timerId);\n    maxTimerId !== undefined && clearTimeout(maxTimerId);\n    timerId = maxTimerId = undefined;\n  }\n\n  function flush(): unknown {\n    if (timerId !== undefined || maxTimerId !== undefined) {\n      return invokeFunc();\n    }\n    return callbackReturnValue;\n  }\n\n  function debounced(): unknown {\n    if (timerId) {\n      clearTimeout(timerId);\n    }\n    timerId = setTimeoutImpl(invokeFunc, wait);\n\n    if (maxWait && maxTimerId === undefined) {\n      maxTimerId = setTimeoutImpl(invokeFunc, maxWait);\n    }\n\n    return callbackReturnValue;\n  }\n\n  debounced.cancel = cancelTimers;\n  debounced.flush = flush;\n  return debounced;\n}\n", "import { getCurrentScope, withScope } from '../currentScopes';\nimport type { Scope } from '../scope';\n\ntype BoundListener = (...args: unknown[]) => unknown;\n\n/**\n * Per-event map from a user-provided listener to its single scope-bound wrapper. We reuse one stable\n * wrapper per listener (rather than minting a new one per registration) and let the underlying\n * emitter/target handle repeat registrations:\n * - Node's `EventEmitter` allows duplicates and counts them, so registering the same wrapper N times\n *   fires N times and `removeListener` removes one instance per call — no orphaned wrappers.\n * - the DOM `EventTarget` dedupes by `(type, callback, capture)`, so reusing the wrapper preserves\n *   that idempotency; a fresh wrapper per call would defeat it and fire the listener repeatedly.\n */\ntype ListenerPatchMap = Map<string, WeakMap<BoundListener, BoundListener>>;\n\n// We patch both Node.js `EventEmitter` registration methods (`on`, `addListener`, ...) and the DOM\n// `EventTarget.addEventListener`, so this works for Node emitters and browser-native event targets.\n\n/** Listener-registration methods we patch so listeners inherit the bound scope. */\nconst ADD_LISTENER_METHODS = [\n  'addListener',\n  'on',\n  'once',\n  'prependListener',\n  'prependOnceListener',\n  'addEventListener',\n] as const;\n/** Listener-removal methods we patch so removals find the scope-bound wrapper. */\nconst REMOVE_LISTENER_METHODS = ['removeListener', 'off', 'removeEventListener'] as const;\n\n/** Symbol under which the patch map is stashed on a bound emitter. */\nconst SCOPE_BOUND_LISTENERS = Symbol('SentryScopeBoundListeners');\n\n/**\n * Minimal structural type for a Node.js-style `EventEmitter` or DOM `EventTarget`. We intentionally\n * avoid importing `node:events` so this stays usable in non-Node environments — objects without any\n * of these methods simply pass through untouched.\n */\ntype EventEmitterLike = Record<string, unknown>;\n\n// Tracks the scope-bound wrapper currently being registered. Node's `once`/`prependOnceListener`\n// synchronously re-enter `on`/`prependListener`, passing an internal \"once wrapper\" whose `.listener`\n// is our wrapper; that re-entry must not be wrapped again. We scope the guard to that exact wrapper\n// rather than using a blanket flag for the whole registration, so unrelated listeners added in the same\n// synchronous window — e.g. from a Node `newListener` handler, or on another bound emitter — are still\n// wrapped and keep their scope. Binding is synchronous, so a module-level value (with save/restore for\n// nesting) is safe here.\nlet registeringWrapper: BoundListener | undefined;\n\n// True when `listener` is the wrapper we're mid-registering, or a Node once-wrapper around it (Node sets\n// `.listener` on the once-wrapper to the function we passed). These are the only re-entrant adds to skip.\nfunction isReentrantWrapperRegistration(listener: BoundListener): boolean {\n  return (\n    registeringWrapper !== undefined &&\n    (listener === registeringWrapper || (listener as { listener?: unknown }).listener === registeringWrapper)\n  );\n}\n\n/**\n * Binds a scope to the given event emitter, so that any listener added to it runs with that scope\n * (and therefore the active span) active — even if the listener fires later, in a different async\n * context.\n *\n * By default the currently active scope is bound, captured at the time this function is called.\n * Pass an explicit `scope` to bind a different one.\n *\n * This is useful when instrumenting APIs that hand back an event emitter (e.g. a streamed database\n * query) whose `'data'` / `'error'` / `'end'` listeners would otherwise lose the trace context.\n *\n * Works with both Node.js `EventEmitter`s (`on`, `addListener`, ...) and DOM `EventTarget`s\n * (`addEventListener`). Objects exposing none of these methods are returned untouched.\n *\n * The isolation scope is intentionally not captured — it is carried along by the active async\n * context. This mirrors the event-emitter behavior of OpenTelemetry's `ContextManager.bind`.\n */\nexport function bindScopeToEmitter<T extends object>(emitter: T, scope: Scope = getCurrentScope()): T {\n  const ee = emitter as EventEmitterLike;\n\n  // Already bound -> nothing to do.\n  if (getPatchMap(ee)) {\n    return emitter;\n  }\n\n  createPatchMap(ee);\n\n  for (const methodName of ADD_LISTENER_METHODS) {\n    if (typeof ee[methodName] !== 'function') {\n      continue;\n    }\n    ee[methodName] = patchAddListener(ee, ee[methodName] as BoundListener, scope);\n  }\n\n  for (const methodName of REMOVE_LISTENER_METHODS) {\n    if (typeof ee[methodName] !== 'function') {\n      continue;\n    }\n    ee[methodName] = patchRemoveListener(ee, ee[methodName] as BoundListener);\n  }\n\n  if (typeof ee.removeAllListeners === 'function') {\n    ee.removeAllListeners = patchRemoveAllListeners(ee, ee.removeAllListeners as BoundListener);\n  }\n\n  return emitter;\n}\n\n/** Wraps a listener so it runs with the given scope active. */\nfunction bindListenerToScope(listener: BoundListener, scope: Scope): BoundListener {\n  return function (this: unknown, ...args: unknown[]) {\n    return withScope(scope, () => listener.apply(this, args));\n  };\n}\n\nfunction isBoundListener(listener: unknown): listener is BoundListener {\n  return typeof listener === 'function';\n}\n\nfunction patchAddListener(ee: EventEmitterLike, original: BoundListener, scope: Scope): BoundListener {\n  return function (this: unknown, ...args: unknown[]) {\n    const event = args[0] as string;\n    const listener = args[1];\n    // Extra args (e.g. the `options` argument of `addEventListener`) must be forwarded verbatim.\n    const rest = args.slice(2);\n\n    // Pass through what we must not wrap: non-function listeners (e.g. `EventListener` objects passed to\n    // `addEventListener`) and the re-entrant once-wrapper registration. Anything else is wrapped, even\n    // when added synchronously mid-registration.\n    if (!isBoundListener(listener) || isReentrantWrapperRegistration(listener)) {\n      return original.apply(this, args);\n    }\n\n    const map = getPatchMap(ee) || createPatchMap(ee);\n    let listeners = map.get(event);\n    if (!listeners) {\n      listeners = new WeakMap();\n      map.set(event, listeners);\n    }\n\n    // Reuse one stable wrapper per listener so repeat registrations are handled correctly by the\n    // underlying emitter/target (Node counts duplicates; the DOM dedupes by `(callback, capture)`).\n    let boundListener = listeners.get(listener);\n    if (!boundListener) {\n      boundListener = bindListenerToScope(listener, scope);\n      listeners.set(listener, boundListener);\n    }\n\n    const previous = registeringWrapper;\n    registeringWrapper = boundListener;\n    try {\n      return original.call(this, event, boundListener, ...rest);\n    } finally {\n      registeringWrapper = previous;\n    }\n  };\n}\n\n// Unlike `patchRemoveAllListeners`, this intentionally leaves the map entry in place: Node counts\n// duplicate registrations, so the same wrapper may still be registered after removing one instance,\n// and later `removeListener` calls need the mapping to find it. The entry is in a `WeakMap` keyed by\n// the user listener, so it is GC'd once the user drops their reference — no manual cleanup needed.\nfunction patchRemoveListener(ee: EventEmitterLike, original: BoundListener): BoundListener {\n  return function (this: unknown, ...args: unknown[]) {\n    const event = args[0] as string;\n    const listener = args[1];\n    const rest = args.slice(2);\n\n    const boundListener = isBoundListener(listener) ? getPatchMap(ee)?.get(event)?.get(listener) : undefined;\n    if (!boundListener) {\n      return original.apply(this, args);\n    }\n    // Pass the same stable wrapper and forward the caller's extra args (e.g. the `capture` option of\n    // `removeEventListener`) unchanged, so the emitter/target matches the right registration itself.\n    return original.call(this, event, boundListener, ...rest);\n  };\n}\n\n// Safe to drop map entries here (unlike `patchRemoveListener`): this removes *every* listener for the\n// event at once, so no registration referencing those wrappers remains. It also reclaims keys from the\n// strong outer `Map` (keyed by event-name strings), which would otherwise accumulate indefinitely.\nfunction patchRemoveAllListeners(ee: EventEmitterLike, original: BoundListener): BoundListener {\n  return function (this: unknown, ...args: unknown[]) {\n    const map = getPatchMap(ee);\n    if (map) {\n      if (args.length === 0) {\n        // `removeAllListeners()` with no event clears everything -> reset the map.\n        createPatchMap(ee);\n      } else {\n        const event = args[0] as string;\n        map.delete(event);\n      }\n    }\n    return original.apply(this, args);\n  };\n}\n\nfunction createPatchMap(ee: EventEmitterLike): ListenerPatchMap {\n  const map: ListenerPatchMap = new Map();\n  (ee as Record<symbol, ListenerPatchMap>)[SCOPE_BOUND_LISTENERS] = map;\n  return map;\n}\n\nfunction getPatchMap(ee: EventEmitterLike): ListenerPatchMap | undefined {\n  return (ee as Record<symbol, ListenerPatchMap | undefined>)[SCOPE_BOUND_LISTENERS];\n}\n", "import { getGlobalScope } from '../currentScopes';\nimport type { Scope, ScopeData } from '../scope';\nimport { getDynamicSamplingContextFromSpan } from '../tracing/dynamicSamplingContext';\nimport type { Breadcrumb } from '../types/breadcrumb';\nimport type { Event } from '../types/event';\nimport type { Span } from '../types/span';\nimport { merge } from './merge';\nimport { getRootSpan, spanToJSON, spanToTraceContext } from './spanUtils';\n\n/**\n * Applies data from the scope to the event and runs all event processors on it.\n */\nexport function applyScopeDataToEvent(event: Event, data: ScopeData): void {\n  const { fingerprint, span, breadcrumbs, sdkProcessingMetadata } = data;\n\n  // Apply general data\n  applyDataToEvent(event, data);\n\n  // We want to set the trace context for normal events only if there isn't already\n  // a trace context on the event. There is a product feature in place where we link\n  // errors with transaction and it relies on that.\n  if (span) {\n    applySpanToEvent(event, span);\n  }\n\n  applyFingerprintToEvent(event, fingerprint);\n  applyBreadcrumbsToEvent(event, breadcrumbs);\n  applySdkMetadataToEvent(event, sdkProcessingMetadata);\n}\n\n/** Merge data of two scopes together. */\nexport function mergeScopeData(data: ScopeData, mergeData: ScopeData): void {\n  const {\n    extra,\n    tags,\n    attributes,\n    user,\n    contexts,\n    level,\n    sdkProcessingMetadata,\n    breadcrumbs,\n    fingerprint,\n    eventProcessors,\n    attachments,\n    propagationContext,\n    transactionName,\n    span,\n  } = mergeData;\n\n  mergeAndOverwriteScopeData(data, 'extra', extra);\n  mergeAndOverwriteScopeData(data, 'tags', tags);\n  mergeAndOverwriteScopeData(data, 'attributes', attributes);\n  mergeAndOverwriteScopeData(data, 'user', user);\n  mergeAndOverwriteScopeData(data, 'contexts', contexts);\n\n  data.sdkProcessingMetadata = merge(data.sdkProcessingMetadata, sdkProcessingMetadata, 2);\n\n  if (level) {\n    data.level = level;\n  }\n\n  if (transactionName) {\n    data.transactionName = transactionName;\n  }\n\n  if (span) {\n    data.span = span;\n  }\n\n  if (breadcrumbs.length) {\n    data.breadcrumbs = [...data.breadcrumbs, ...breadcrumbs];\n  }\n\n  if (fingerprint.length) {\n    data.fingerprint = [...data.fingerprint, ...fingerprint];\n  }\n\n  if (eventProcessors.length) {\n    data.eventProcessors = [...data.eventProcessors, ...eventProcessors];\n  }\n\n  if (attachments.length) {\n    data.attachments = [...data.attachments, ...attachments];\n  }\n\n  data.propagationContext = { ...data.propagationContext, ...propagationContext };\n}\n\n/**\n * Merges certain scope data. Undefined values will overwrite any existing values.\n * Exported only for tests.\n */\nexport function mergeAndOverwriteScopeData<\n  Prop extends 'extra' | 'tags' | 'attributes' | 'user' | 'contexts' | 'sdkProcessingMetadata',\n  Data extends ScopeData,\n>(data: Data, prop: Prop, mergeVal: Data[Prop]): void {\n  data[prop] = merge(data[prop], mergeVal, 1);\n}\n\n/** Exported only for tests */\nexport function mergeArray<Prop extends 'breadcrumbs' | 'fingerprint'>(\n  event: Event,\n  prop: Prop,\n  mergeVal: ScopeData[Prop],\n): void {\n  const prevVal = event[prop];\n  // If we are not merging any new values,\n  // we only need to proceed if there was an empty array before (as we want to replace it with undefined)\n  if (!mergeVal.length && (!prevVal || prevVal.length)) {\n    return;\n  }\n\n  const merged = [...(prevVal || []), ...mergeVal] as ScopeData[Prop];\n  event[prop] = merged.length ? merged : undefined;\n}\n\n/**\n * Get the scope data for the current scope after merging with the\n * global scope and isolation scope.\n *\n * @param currentScope - The current scope.\n * @returns The scope data.\n */\nexport function getCombinedScopeData(isolationScope: Scope | undefined, currentScope: Scope | undefined): ScopeData {\n  const scopeData = getGlobalScope().getScopeData();\n  isolationScope && mergeScopeData(scopeData, isolationScope.getScopeData());\n  currentScope && mergeScopeData(scopeData, currentScope.getScopeData());\n  return scopeData;\n}\n\nfunction applyDataToEvent(event: Event, data: ScopeData): void {\n  const { extra, tags, user, contexts, level, transactionName } = data;\n\n  if (Object.keys(extra).length) {\n    event.extra = { ...extra, ...event.extra };\n  }\n\n  if (Object.keys(tags).length) {\n    event.tags = { ...tags, ...event.tags };\n  }\n\n  if (Object.keys(user).length) {\n    event.user = { ...user, ...event.user };\n  }\n\n  if (Object.keys(contexts).length) {\n    event.contexts = { ...contexts, ...event.contexts };\n  }\n\n  if (level) {\n    event.level = level;\n  }\n\n  // transaction events get their `transaction` from the root span name\n  if (transactionName && event.type !== 'transaction') {\n    event.transaction = transactionName;\n  }\n}\n\nfunction applyBreadcrumbsToEvent(event: Event, breadcrumbs: Breadcrumb[]): void {\n  const mergedBreadcrumbs = [...(event.breadcrumbs || []), ...breadcrumbs];\n  event.breadcrumbs = mergedBreadcrumbs.length ? mergedBreadcrumbs : undefined;\n}\n\nfunction applySdkMetadataToEvent(event: Event, sdkProcessingMetadata: ScopeData['sdkProcessingMetadata']): void {\n  event.sdkProcessingMetadata = {\n    ...event.sdkProcessingMetadata,\n    ...sdkProcessingMetadata,\n  };\n}\n\nfunction applySpanToEvent(event: Event, span: Span): void {\n  event.contexts = {\n    trace: spanToTraceContext(span),\n    ...event.contexts,\n  };\n\n  event.sdkProcessingMetadata = {\n    dynamicSamplingContext: getDynamicSamplingContextFromSpan(span),\n    ...event.sdkProcessingMetadata,\n  };\n\n  const rootSpan = getRootSpan(span);\n  const transactionName = spanToJSON(rootSpan).description;\n  if (transactionName && !event.transaction && event.type === 'transaction') {\n    event.transaction = transactionName;\n  }\n}\n\n/**\n * Applies fingerprint from the scope to the event if there's one,\n * uses message if there's one instead or get rid of empty fingerprint\n */\nfunction applyFingerprintToEvent(event: Event, fingerprint: ScopeData['fingerprint'] | undefined): void {\n  // Make sure it's an array first and we actually have something in place\n  event.fingerprint = event.fingerprint\n    ? Array.isArray(event.fingerprint)\n      ? event.fingerprint\n      : [event.fingerprint]\n    : [];\n\n  // If we have something on the scope, then merge it with event\n  if (fingerprint) {\n    event.fingerprint = event.fingerprint.concat(fingerprint);\n  }\n\n  // If we have no data at all, remove empty array default\n  if (!event.fingerprint.length) {\n    delete event.fingerprint;\n  }\n}\n", "import type { Contexts } from '../../types/context';\n\n/**\n * Convert known scope contexts set by SDK integrations to span attributes.\n * Only maps context keys that are relevant to browser SDKs.\n * Server-only contexts (aws, gcp, missing_instrumentation, trpc) are handled\n * by processSegmentSpan hooks in their respective packages.\n */\nexport function scopeContextsToSpanAttributes(contexts: Contexts): Record<string, unknown> {\n  const attrs: Record<string, unknown> = {};\n\n  const { response, profile, cloud_resource, culture, state } = contexts;\n\n  if (response) {\n    if (response.status_code != null) {\n      attrs['http.response.status_code'] = response.status_code;\n    }\n    if (response.body_size != null) {\n      attrs['http.response.body.size'] = response.body_size;\n    }\n  }\n\n  if (profile) {\n    if (profile.profile_id) {\n      attrs['sentry.profile_id'] = profile.profile_id;\n    }\n    if (profile.profiler_id) {\n      attrs['sentry.profiler_id'] = profile.profiler_id;\n    }\n  }\n\n  // CloudResourceContext keys are already in dot-notation (OTel resource conventions)\n  if (cloud_resource) {\n    for (const [key, value] of Object.entries(cloud_resource)) {\n      if (value != null) {\n        attrs[key] = value;\n      }\n    }\n  }\n\n  if (culture) {\n    if (culture.locale) {\n      attrs['culture.locale'] = culture.locale;\n    }\n    if (culture.timezone) {\n      attrs['culture.timezone'] = culture.timezone;\n    }\n  }\n\n  if (state?.state && typeof state.state.type === 'string') {\n    attrs['state.type'] = state.state.type;\n  }\n\n  // Framework version contexts\n  const angular = contexts['angular'];\n  if (angular) {\n    const version = angular['version'];\n    if (typeof version === 'string' || typeof version === 'number') {\n      attrs['angular.version'] = version;\n    }\n  }\n\n  const react = contexts['react'];\n  if (react) {\n    const version = react['version'];\n    if (typeof version === 'string' || typeof version === 'number') {\n      attrs['react.version'] = version;\n    }\n  }\n\n  return attrs;\n}\n", "// This is an auto-generated file. Do not edit!\n\n// Path: model/attributes/ai/ai__citations.json\n\n/**\n * References or sources cited by the AI model in its response. `ai.citations`\n *\n * Attribute Value Type: `Array<string>` {@link AI_CITATIONS_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @deprecated\n * @example [\"Citation 1\",\"Citation 2\"]\n */\nexport const AI_CITATIONS = 'ai.citations';\n\n/**\n * Type for {@link AI_CITATIONS} ai.citations\n */\nexport type AI_CITATIONS_TYPE = Array<string>;\n\n// Path: model/attributes/ai/ai__completion_tokens__used.json\n\n/**\n * The number of tokens used to respond to the message. `ai.completion_tokens.used`\n *\n * Attribute Value Type: `number` {@link AI_COMPLETION_TOKENS_USED_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link GEN_AI_USAGE_OUTPUT_TOKENS} `gen_ai.usage.output_tokens`, {@link GEN_AI_USAGE_COMPLETION_TOKENS} `gen_ai.usage.completion_tokens`\n *\n * @deprecated Use {@link GEN_AI_USAGE_OUTPUT_TOKENS} (gen_ai.usage.output_tokens) instead\n * @example 10\n */\nexport const AI_COMPLETION_TOKENS_USED = 'ai.completion_tokens.used';\n\n/**\n * Type for {@link AI_COMPLETION_TOKENS_USED} ai.completion_tokens.used\n */\nexport type AI_COMPLETION_TOKENS_USED_TYPE = number;\n\n// Path: model/attributes/ai/ai__documents.json\n\n/**\n * Documents or content chunks used as context for the AI model. `ai.documents`\n *\n * Attribute Value Type: `Array<string>` {@link AI_DOCUMENTS_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @deprecated\n * @example [\"document1.txt\",\"document2.pdf\"]\n */\nexport const AI_DOCUMENTS = 'ai.documents';\n\n/**\n * Type for {@link AI_DOCUMENTS} ai.documents\n */\nexport type AI_DOCUMENTS_TYPE = Array<string>;\n\n// Path: model/attributes/ai/ai__finish_reason.json\n\n/**\n * The reason why the model stopped generating. `ai.finish_reason`\n *\n * Attribute Value Type: `string` {@link AI_FINISH_REASON_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link GEN_AI_RESPONSE_FINISH_REASONS} `gen_ai.response.finish_reasons`\n *\n * @deprecated Use {@link GEN_AI_RESPONSE_FINISH_REASONS} (gen_ai.response.finish_reasons) instead\n * @example \"COMPLETE\"\n */\nexport const AI_FINISH_REASON = 'ai.finish_reason';\n\n/**\n * Type for {@link AI_FINISH_REASON} ai.finish_reason\n */\nexport type AI_FINISH_REASON_TYPE = string;\n\n// Path: model/attributes/ai/ai__frequency_penalty.json\n\n/**\n * Used to reduce repetitiveness of generated tokens. The higher the value, the stronger a penalty is applied to previously present tokens, proportional to how many times they have already appeared in the prompt or prior generation. `ai.frequency_penalty`\n *\n * Attribute Value Type: `number` {@link AI_FREQUENCY_PENALTY_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link GEN_AI_REQUEST_FREQUENCY_PENALTY} `gen_ai.request.frequency_penalty`\n *\n * @deprecated Use {@link GEN_AI_REQUEST_FREQUENCY_PENALTY} (gen_ai.request.frequency_penalty) instead\n * @example 0.5\n */\nexport const AI_FREQUENCY_PENALTY = 'ai.frequency_penalty';\n\n/**\n * Type for {@link AI_FREQUENCY_PENALTY} ai.frequency_penalty\n */\nexport type AI_FREQUENCY_PENALTY_TYPE = number;\n\n// Path: model/attributes/ai/ai__function_call.json\n\n/**\n * For an AI model call, the function that was called. This is deprecated for OpenAI, and replaced by tool_calls `ai.function_call`\n *\n * Attribute Value Type: `string` {@link AI_FUNCTION_CALL_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link GEN_AI_TOOL_NAME} `gen_ai.tool.name`, {@link MCP_TOOL_NAME} `mcp.tool.name`\n *\n * @deprecated Use {@link GEN_AI_TOOL_NAME} (gen_ai.tool.name) instead\n * @example \"function_name\"\n */\nexport const AI_FUNCTION_CALL = 'ai.function_call';\n\n/**\n * Type for {@link AI_FUNCTION_CALL} ai.function_call\n */\nexport type AI_FUNCTION_CALL_TYPE = string;\n\n// Path: model/attributes/ai/ai__generation_id.json\n\n/**\n * Unique identifier for the completion. `ai.generation_id`\n *\n * Attribute Value Type: `string` {@link AI_GENERATION_ID_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link GEN_AI_RESPONSE_ID} `gen_ai.response.id`\n *\n * @deprecated Use {@link GEN_AI_RESPONSE_ID} (gen_ai.response.id) instead\n * @example \"gen_123abc\"\n */\nexport const AI_GENERATION_ID = 'ai.generation_id';\n\n/**\n * Type for {@link AI_GENERATION_ID} ai.generation_id\n */\nexport type AI_GENERATION_ID_TYPE = string;\n\n// Path: model/attributes/ai/ai__input_messages.json\n\n/**\n * The input messages sent to the model `ai.input_messages`\n *\n * Attribute Value Type: `string` {@link AI_INPUT_MESSAGES_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link GEN_AI_REQUEST_MESSAGES} `gen_ai.request.messages`\n *\n * @deprecated Use {@link GEN_AI_INPUT_MESSAGES} (gen_ai.input.messages) instead\n * @example \"[{\\\"role\\\": \\\"user\\\", \\\"message\\\": \\\"hello\\\"}]\"\n */\nexport const AI_INPUT_MESSAGES = 'ai.input_messages';\n\n/**\n * Type for {@link AI_INPUT_MESSAGES} ai.input_messages\n */\nexport type AI_INPUT_MESSAGES_TYPE = string;\n\n// Path: model/attributes/ai/ai__is_search_required.json\n\n/**\n * Boolean indicating if the model needs to perform a search. `ai.is_search_required`\n *\n * Attribute Value Type: `boolean` {@link AI_IS_SEARCH_REQUIRED_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @deprecated\n * @example false\n */\nexport const AI_IS_SEARCH_REQUIRED = 'ai.is_search_required';\n\n/**\n * Type for {@link AI_IS_SEARCH_REQUIRED} ai.is_search_required\n */\nexport type AI_IS_SEARCH_REQUIRED_TYPE = boolean;\n\n// Path: model/attributes/ai/ai__metadata.json\n\n/**\n * Extra metadata passed to an AI pipeline step. `ai.metadata`\n *\n * Attribute Value Type: `string` {@link AI_METADATA_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @deprecated\n * @example \"{\\\"user_id\\\": 123, \\\"session_id\\\": \\\"abc123\\\"}\"\n */\nexport const AI_METADATA = 'ai.metadata';\n\n/**\n * Type for {@link AI_METADATA} ai.metadata\n */\nexport type AI_METADATA_TYPE = string;\n\n// Path: model/attributes/ai/ai__model_id.json\n\n/**\n * The vendor-specific ID of the model used. `ai.model_id`\n *\n * Attribute Value Type: `string` {@link AI_MODEL_ID_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link GEN_AI_RESPONSE_MODEL} `gen_ai.response.model`\n *\n * @deprecated Use {@link GEN_AI_RESPONSE_MODEL} (gen_ai.response.model) instead\n * @example \"gpt-4\"\n */\nexport const AI_MODEL_ID = 'ai.model_id';\n\n/**\n * Type for {@link AI_MODEL_ID} ai.model_id\n */\nexport type AI_MODEL_ID_TYPE = string;\n\n// Path: model/attributes/ai/ai__model__provider.json\n\n/**\n * The provider of the model. `ai.model.provider`\n *\n * Attribute Value Type: `string` {@link AI_MODEL_PROVIDER_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link GEN_AI_PROVIDER_NAME} `gen_ai.provider.name`, {@link GEN_AI_SYSTEM} `gen_ai.system`\n *\n * @deprecated Use {@link GEN_AI_PROVIDER_NAME} (gen_ai.provider.name) instead\n * @example \"openai\"\n */\nexport const AI_MODEL_PROVIDER = 'ai.model.provider';\n\n/**\n * Type for {@link AI_MODEL_PROVIDER} ai.model.provider\n */\nexport type AI_MODEL_PROVIDER_TYPE = string;\n\n// Path: model/attributes/ai/ai__pipeline__name.json\n\n/**\n * The name of the AI pipeline. `ai.pipeline.name`\n *\n * Attribute Value Type: `string` {@link AI_PIPELINE_NAME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link GEN_AI_PIPELINE_NAME} `gen_ai.pipeline.name`\n *\n * @deprecated Use {@link GEN_AI_PIPELINE_NAME} (gen_ai.pipeline.name) instead\n * @example \"Autofix Pipeline\"\n */\nexport const AI_PIPELINE_NAME = 'ai.pipeline.name';\n\n/**\n * Type for {@link AI_PIPELINE_NAME} ai.pipeline.name\n */\nexport type AI_PIPELINE_NAME_TYPE = string;\n\n// Path: model/attributes/ai/ai__preamble.json\n\n/**\n * For an AI model call, the preamble parameter. Preambles are a part of the prompt used to adjust the model's overall behavior and conversation style. `ai.preamble`\n *\n * Attribute Value Type: `string` {@link AI_PREAMBLE_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link GEN_AI_SYSTEM_INSTRUCTIONS} `gen_ai.system_instructions`\n *\n * @deprecated Use {@link GEN_AI_SYSTEM_INSTRUCTIONS} (gen_ai.system_instructions) instead\n * @example \"You are now a clown.\"\n */\nexport const AI_PREAMBLE = 'ai.preamble';\n\n/**\n * Type for {@link AI_PREAMBLE} ai.preamble\n */\nexport type AI_PREAMBLE_TYPE = string;\n\n// Path: model/attributes/ai/ai__presence_penalty.json\n\n/**\n * Used to reduce repetitiveness of generated tokens. Similar to frequency_penalty, except that this penalty is applied equally to all tokens that have already appeared, regardless of their exact frequencies. `ai.presence_penalty`\n *\n * Attribute Value Type: `number` {@link AI_PRESENCE_PENALTY_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link GEN_AI_REQUEST_PRESENCE_PENALTY} `gen_ai.request.presence_penalty`\n *\n * @deprecated Use {@link GEN_AI_REQUEST_PRESENCE_PENALTY} (gen_ai.request.presence_penalty) instead\n * @example 0.5\n */\nexport const AI_PRESENCE_PENALTY = 'ai.presence_penalty';\n\n/**\n * Type for {@link AI_PRESENCE_PENALTY} ai.presence_penalty\n */\nexport type AI_PRESENCE_PENALTY_TYPE = number;\n\n// Path: model/attributes/ai/ai__prompt_tokens__used.json\n\n/**\n * The number of tokens used to process just the prompt. `ai.prompt_tokens.used`\n *\n * Attribute Value Type: `number` {@link AI_PROMPT_TOKENS_USED_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link GEN_AI_USAGE_PROMPT_TOKENS} `gen_ai.usage.prompt_tokens`, {@link GEN_AI_USAGE_INPUT_TOKENS} `gen_ai.usage.input_tokens`\n *\n * @deprecated Use {@link GEN_AI_USAGE_INPUT_TOKENS} (gen_ai.usage.input_tokens) instead\n * @example 20\n */\nexport const AI_PROMPT_TOKENS_USED = 'ai.prompt_tokens.used';\n\n/**\n * Type for {@link AI_PROMPT_TOKENS_USED} ai.prompt_tokens.used\n */\nexport type AI_PROMPT_TOKENS_USED_TYPE = number;\n\n// Path: model/attributes/ai/ai__raw_prompting.json\n\n/**\n * When enabled, the user’s prompt will be sent to the model without any pre-processing. `ai.raw_prompting`\n *\n * Attribute Value Type: `boolean` {@link AI_RAW_PROMPTING_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @deprecated\n * @example true\n */\nexport const AI_RAW_PROMPTING = 'ai.raw_prompting';\n\n/**\n * Type for {@link AI_RAW_PROMPTING} ai.raw_prompting\n */\nexport type AI_RAW_PROMPTING_TYPE = boolean;\n\n// Path: model/attributes/ai/ai__responses.json\n\n/**\n * The response messages sent back by the AI model. `ai.responses`\n *\n * Attribute Value Type: `Array<string>` {@link AI_RESPONSES_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @deprecated Use {@link GEN_AI_OUTPUT_MESSAGES} (gen_ai.output.messages) instead\n * @example [\"hello\",\"world\"]\n */\nexport const AI_RESPONSES = 'ai.responses';\n\n/**\n * Type for {@link AI_RESPONSES} ai.responses\n */\nexport type AI_RESPONSES_TYPE = Array<string>;\n\n// Path: model/attributes/ai/ai__response_format.json\n\n/**\n * For an AI model call, the format of the response `ai.response_format`\n *\n * Attribute Value Type: `string` {@link AI_RESPONSE_FORMAT_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @deprecated\n * @example \"json_object\"\n */\nexport const AI_RESPONSE_FORMAT = 'ai.response_format';\n\n/**\n * Type for {@link AI_RESPONSE_FORMAT} ai.response_format\n */\nexport type AI_RESPONSE_FORMAT_TYPE = string;\n\n// Path: model/attributes/ai/ai__search_queries.json\n\n/**\n * Queries used to search for relevant context or documents. `ai.search_queries`\n *\n * Attribute Value Type: `Array<string>` {@link AI_SEARCH_QUERIES_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @deprecated\n * @example [\"climate change effects\",\"renewable energy\"]\n */\nexport const AI_SEARCH_QUERIES = 'ai.search_queries';\n\n/**\n * Type for {@link AI_SEARCH_QUERIES} ai.search_queries\n */\nexport type AI_SEARCH_QUERIES_TYPE = Array<string>;\n\n// Path: model/attributes/ai/ai__search_results.json\n\n/**\n * Results returned from search queries for context. `ai.search_results`\n *\n * Attribute Value Type: `Array<string>` {@link AI_SEARCH_RESULTS_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @deprecated\n * @example [\"search_result_1, search_result_2\"]\n */\nexport const AI_SEARCH_RESULTS = 'ai.search_results';\n\n/**\n * Type for {@link AI_SEARCH_RESULTS} ai.search_results\n */\nexport type AI_SEARCH_RESULTS_TYPE = Array<string>;\n\n// Path: model/attributes/ai/ai__seed.json\n\n/**\n * The seed, ideally models given the same seed and same other parameters will produce the exact same output. `ai.seed`\n *\n * Attribute Value Type: `string` {@link AI_SEED_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link GEN_AI_REQUEST_SEED} `gen_ai.request.seed`\n *\n * @deprecated Use {@link GEN_AI_REQUEST_SEED} (gen_ai.request.seed) instead\n * @example \"1234567890\"\n */\nexport const AI_SEED = 'ai.seed';\n\n/**\n * Type for {@link AI_SEED} ai.seed\n */\nexport type AI_SEED_TYPE = string;\n\n// Path: model/attributes/ai/ai__streaming.json\n\n/**\n * Whether the request was streamed back. `ai.streaming`\n *\n * Attribute Value Type: `boolean` {@link AI_STREAMING_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link GEN_AI_RESPONSE_STREAMING} `gen_ai.response.streaming`\n *\n * @deprecated Use {@link GEN_AI_RESPONSE_STREAMING} (gen_ai.response.streaming) instead\n * @example true\n */\nexport const AI_STREAMING = 'ai.streaming';\n\n/**\n * Type for {@link AI_STREAMING} ai.streaming\n */\nexport type AI_STREAMING_TYPE = boolean;\n\n// Path: model/attributes/ai/ai__tags.json\n\n/**\n * Tags that describe an AI pipeline step. `ai.tags`\n *\n * Attribute Value Type: `string` {@link AI_TAGS_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @deprecated\n * @example \"{\\\"executed_function\\\": \\\"add_integers\\\"}\"\n */\nexport const AI_TAGS = 'ai.tags';\n\n/**\n * Type for {@link AI_TAGS} ai.tags\n */\nexport type AI_TAGS_TYPE = string;\n\n// Path: model/attributes/ai/ai__temperature.json\n\n/**\n * For an AI model call, the temperature parameter. Temperature essentially means how random the output will be. `ai.temperature`\n *\n * Attribute Value Type: `number` {@link AI_TEMPERATURE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link GEN_AI_REQUEST_TEMPERATURE} `gen_ai.request.temperature`\n *\n * @deprecated Use {@link GEN_AI_REQUEST_TEMPERATURE} (gen_ai.request.temperature) instead\n * @example 0.1\n */\nexport const AI_TEMPERATURE = 'ai.temperature';\n\n/**\n * Type for {@link AI_TEMPERATURE} ai.temperature\n */\nexport type AI_TEMPERATURE_TYPE = number;\n\n// Path: model/attributes/ai/ai__texts.json\n\n/**\n * Raw text inputs provided to the model. `ai.texts`\n *\n * Attribute Value Type: `Array<string>` {@link AI_TEXTS_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link GEN_AI_INPUT_MESSAGES} `gen_ai.input.messages`\n *\n * @deprecated Use {@link GEN_AI_INPUT_MESSAGES} (gen_ai.input.messages) instead\n * @example [\"Hello, how are you?\",\"What is the capital of France?\"]\n */\nexport const AI_TEXTS = 'ai.texts';\n\n/**\n * Type for {@link AI_TEXTS} ai.texts\n */\nexport type AI_TEXTS_TYPE = Array<string>;\n\n// Path: model/attributes/ai/ai__tools.json\n\n/**\n * For an AI model call, the functions that are available `ai.tools`\n *\n * Attribute Value Type: `Array<string>` {@link AI_TOOLS_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @deprecated Use {@link GEN_AI_TOOL_DEFINITIONS} (gen_ai.tool.definitions) instead\n * @example [\"function_1\",\"function_2\"]\n */\nexport const AI_TOOLS = 'ai.tools';\n\n/**\n * Type for {@link AI_TOOLS} ai.tools\n */\nexport type AI_TOOLS_TYPE = Array<string>;\n\n// Path: model/attributes/ai/ai__tool_calls.json\n\n/**\n * For an AI model call, the tool calls that were made. `ai.tool_calls`\n *\n * Attribute Value Type: `Array<string>` {@link AI_TOOL_CALLS_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @deprecated Use {@link GEN_AI_OUTPUT_MESSAGES} (gen_ai.output.messages) instead\n * @example [\"tool_call_1\",\"tool_call_2\"]\n */\nexport const AI_TOOL_CALLS = 'ai.tool_calls';\n\n/**\n * Type for {@link AI_TOOL_CALLS} ai.tool_calls\n */\nexport type AI_TOOL_CALLS_TYPE = Array<string>;\n\n// Path: model/attributes/ai/ai__top_k.json\n\n/**\n * Limits the model to only consider the K most likely next tokens, where K is an integer (e.g., top_k=20 means only the 20 highest probability tokens are considered). `ai.top_k`\n *\n * Attribute Value Type: `number` {@link AI_TOP_K_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link GEN_AI_REQUEST_TOP_K} `gen_ai.request.top_k`\n *\n * @deprecated Use {@link GEN_AI_REQUEST_TOP_K} (gen_ai.request.top_k) instead\n * @example 35\n */\nexport const AI_TOP_K = 'ai.top_k';\n\n/**\n * Type for {@link AI_TOP_K} ai.top_k\n */\nexport type AI_TOP_K_TYPE = number;\n\n// Path: model/attributes/ai/ai__top_p.json\n\n/**\n * Limits the model to only consider tokens whose cumulative probability mass adds up to p, where p is a float between 0 and 1 (e.g., top_p=0.7 means only tokens that sum up to 70% of the probability mass are considered). `ai.top_p`\n *\n * Attribute Value Type: `number` {@link AI_TOP_P_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link GEN_AI_REQUEST_TOP_P} `gen_ai.request.top_p`\n *\n * @deprecated Use {@link GEN_AI_REQUEST_TOP_P} (gen_ai.request.top_p) instead\n * @example 0.7\n */\nexport const AI_TOP_P = 'ai.top_p';\n\n/**\n * Type for {@link AI_TOP_P} ai.top_p\n */\nexport type AI_TOP_P_TYPE = number;\n\n// Path: model/attributes/ai/ai__total_cost.json\n\n/**\n * The total cost for the tokens used. `ai.total_cost`\n *\n * Attribute Value Type: `number` {@link AI_TOTAL_COST_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link GEN_AI_COST_TOTAL_TOKENS} `gen_ai.cost.total_tokens`\n *\n * @deprecated Use {@link GEN_AI_COST_TOTAL_TOKENS} (gen_ai.cost.total_tokens) instead\n * @example 12.34\n */\nexport const AI_TOTAL_COST = 'ai.total_cost';\n\n/**\n * Type for {@link AI_TOTAL_COST} ai.total_cost\n */\nexport type AI_TOTAL_COST_TYPE = number;\n\n// Path: model/attributes/ai/ai__total_tokens__used.json\n\n/**\n * The total number of tokens used to process the prompt. `ai.total_tokens.used`\n *\n * Attribute Value Type: `number` {@link AI_TOTAL_TOKENS_USED_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link GEN_AI_USAGE_TOTAL_TOKENS} `gen_ai.usage.total_tokens`\n *\n * @deprecated Use {@link GEN_AI_USAGE_TOTAL_TOKENS} (gen_ai.usage.total_tokens) instead\n * @example 30\n */\nexport const AI_TOTAL_TOKENS_USED = 'ai.total_tokens.used';\n\n/**\n * Type for {@link AI_TOTAL_TOKENS_USED} ai.total_tokens.used\n */\nexport type AI_TOTAL_TOKENS_USED_TYPE = number;\n\n// Path: model/attributes/ai/ai__warnings.json\n\n/**\n * Warning messages generated during model execution. `ai.warnings`\n *\n * Attribute Value Type: `Array<string>` {@link AI_WARNINGS_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @deprecated\n * @example [\"Token limit exceeded\"]\n */\nexport const AI_WARNINGS = 'ai.warnings';\n\n/**\n * Type for {@link AI_WARNINGS} ai.warnings\n */\nexport type AI_WARNINGS_TYPE = Array<string>;\n\n// Path: model/attributes/angular/angular__version.json\n\n/**\n * The version of the Angular framework `angular.version`\n *\n * Attribute Value Type: `string` {@link ANGULAR_VERSION_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"17.1.0\"\n */\nexport const ANGULAR_VERSION = 'angular.version';\n\n/**\n * Type for {@link ANGULAR_VERSION} angular.version\n */\nexport type ANGULAR_VERSION_TYPE = string;\n\n// Path: model/attributes/app/app__app_build.json\n\n/**\n * Internal build identifier, as it appears on the platform. `app.app_build`\n *\n * Attribute Value Type: `string` {@link APP_APP_BUILD_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link APP_BUILD} `app.build`\n *\n * @deprecated Use {@link APP_BUILD} (app.build) instead - Deprecated in favor of app.build\n * @example \"1\"\n */\nexport const APP_APP_BUILD = 'app.app_build';\n\n/**\n * Type for {@link APP_APP_BUILD} app.app_build\n */\nexport type APP_APP_BUILD_TYPE = string;\n\n// Path: model/attributes/app/app__app_identifier.json\n\n/**\n * Version-independent application identifier, often a dotted bundle ID. `app.app_identifier`\n *\n * Attribute Value Type: `string` {@link APP_APP_IDENTIFIER_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link APP_IDENTIFIER} `app.identifier`\n *\n * @deprecated Use {@link APP_IDENTIFIER} (app.identifier) instead - Deprecated in favor of app.identifier\n * @example \"com.example.myapp\"\n */\nexport const APP_APP_IDENTIFIER = 'app.app_identifier';\n\n/**\n * Type for {@link APP_APP_IDENTIFIER} app.app_identifier\n */\nexport type APP_APP_IDENTIFIER_TYPE = string;\n\n// Path: model/attributes/app/app__app_name.json\n\n/**\n * Human readable application name, as it appears on the platform. `app.app_name`\n *\n * Attribute Value Type: `string` {@link APP_APP_NAME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link APP_NAME} `app.name`\n *\n * @deprecated Use {@link APP_NAME} (app.name) instead - Deprecated in favor of app.name\n * @example \"My App\"\n */\nexport const APP_APP_NAME = 'app.app_name';\n\n/**\n * Type for {@link APP_APP_NAME} app.app_name\n */\nexport type APP_APP_NAME_TYPE = string;\n\n// Path: model/attributes/app/app__app_start_time.json\n\n/**\n * Formatted UTC timestamp when the user started the application. `app.app_start_time`\n *\n * Attribute Value Type: `string` {@link APP_APP_START_TIME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link APP_START_TIME} `app.start_time`\n *\n * @deprecated Use {@link APP_START_TIME} (app.start_time) instead - Deprecated in favor of app.start_time\n * @example \"2025-01-01T00:00:00.000Z\"\n */\nexport const APP_APP_START_TIME = 'app.app_start_time';\n\n/**\n * Type for {@link APP_APP_START_TIME} app.app_start_time\n */\nexport type APP_APP_START_TIME_TYPE = string;\n\n// Path: model/attributes/app/app__app_version.json\n\n/**\n * Human readable application version, as it appears on the platform. `app.app_version`\n *\n * Attribute Value Type: `string` {@link APP_APP_VERSION_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link APP_VERSION} `app.version`\n *\n * @deprecated Use {@link APP_VERSION} (app.version) instead - Deprecated in favor of app.version\n * @example \"1.0.0\"\n */\nexport const APP_APP_VERSION = 'app.app_version';\n\n/**\n * Type for {@link APP_APP_VERSION} app.app_version\n */\nexport type APP_APP_VERSION_TYPE = string;\n\n// Path: model/attributes/app/app__build.json\n\n/**\n * Internal build identifier, as it appears on the platform. `app.build`\n *\n * Attribute Value Type: `string` {@link APP_BUILD_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link APP_APP_BUILD} `app.app_build`\n *\n * @example \"1\"\n */\nexport const APP_BUILD = 'app.build';\n\n/**\n * Type for {@link APP_BUILD} app.build\n */\nexport type APP_BUILD_TYPE = string;\n\n// Path: model/attributes/app/app__identifier.json\n\n/**\n * Version-independent application identifier, often a dotted bundle ID. `app.identifier`\n *\n * Attribute Value Type: `string` {@link APP_IDENTIFIER_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link APP_APP_IDENTIFIER} `app.app_identifier`\n *\n * @example \"com.example.myapp\"\n */\nexport const APP_IDENTIFIER = 'app.identifier';\n\n/**\n * Type for {@link APP_IDENTIFIER} app.identifier\n */\nexport type APP_IDENTIFIER_TYPE = string;\n\n// Path: model/attributes/app/app__in_foreground.json\n\n/**\n * Whether the application is currently in the foreground. `app.in_foreground`\n *\n * Attribute Value Type: `boolean` {@link APP_IN_FOREGROUND_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example true\n */\nexport const APP_IN_FOREGROUND = 'app.in_foreground';\n\n/**\n * Type for {@link APP_IN_FOREGROUND} app.in_foreground\n */\nexport type APP_IN_FOREGROUND_TYPE = boolean;\n\n// Path: model/attributes/app/app__name.json\n\n/**\n * Human readable application name, as it appears on the platform. `app.name`\n *\n * Attribute Value Type: `string` {@link APP_NAME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link APP_APP_NAME} `app.app_name`\n *\n * @example \"My App\"\n */\nexport const APP_NAME = 'app.name';\n\n/**\n * Type for {@link APP_NAME} app.name\n */\nexport type APP_NAME_TYPE = string;\n\n// Path: model/attributes/app_start_cold.json\n\n/**\n * The duration of a cold app start in milliseconds `app_start_cold`\n *\n * Attribute Value Type: `number` {@link APP_START_COLD_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link APP_VITALS_START_COLD_VALUE} `app.vitals.start.cold.value`\n *\n * @deprecated Use {@link APP_VITALS_START_COLD_VALUE} (app.vitals.start.cold.value) instead - Replaced by app.vitals.start.cold.value to align with the app.vitals.* namespace for mobile performance attributes\n * @example 1234.56\n */\nexport const APP_START_COLD = 'app_start_cold';\n\n/**\n * Type for {@link APP_START_COLD} app_start_cold\n */\nexport type APP_START_COLD_TYPE = number;\n\n// Path: model/attributes/app/app__start_time.json\n\n/**\n * Formatted UTC timestamp when the user started the application. `app.start_time`\n *\n * Attribute Value Type: `string` {@link APP_START_TIME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link APP_APP_START_TIME} `app.app_start_time`\n *\n * @example \"2025-01-01T00:00:00.000Z\"\n */\nexport const APP_START_TIME = 'app.start_time';\n\n/**\n * Type for {@link APP_START_TIME} app.start_time\n */\nexport type APP_START_TIME_TYPE = string;\n\n// Path: model/attributes/app_start_type.json\n\n/**\n * Mobile app start variant. Either cold or warm. `app_start_type`\n *\n * Attribute Value Type: `string` {@link APP_START_TYPE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link APP_VITALS_START_TYPE} `app.vitals.start.type`\n *\n * @deprecated Use {@link APP_VITALS_START_TYPE} (app.vitals.start.type) instead - Replaced by app.vitals.start.type to align with the app.vitals.* namespace for mobile performance attributes\n * @example \"cold\"\n */\nexport const APP_START_TYPE = 'app_start_type';\n\n/**\n * Type for {@link APP_START_TYPE} app_start_type\n */\nexport type APP_START_TYPE_TYPE = string;\n\n// Path: model/attributes/app_start_warm.json\n\n/**\n * The duration of a warm app start in milliseconds `app_start_warm`\n *\n * Attribute Value Type: `number` {@link APP_START_WARM_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link APP_VITALS_START_WARM_VALUE} `app.vitals.start.warm.value`\n *\n * @deprecated Use {@link APP_VITALS_START_WARM_VALUE} (app.vitals.start.warm.value) instead - Replaced by app.vitals.start.warm.value to align with the app.vitals.* namespace for mobile performance attributes\n * @example 1234.56\n */\nexport const APP_START_WARM = 'app_start_warm';\n\n/**\n * Type for {@link APP_START_WARM} app_start_warm\n */\nexport type APP_START_WARM_TYPE = number;\n\n// Path: model/attributes/app/app__version.json\n\n/**\n * Human readable application version, as it appears on the platform. `app.version`\n *\n * Attribute Value Type: `string` {@link APP_VERSION_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link APP_APP_VERSION} `app.app_version`\n *\n * @example \"1.0.0\"\n */\nexport const APP_VERSION = 'app.version';\n\n/**\n * Type for {@link APP_VERSION} app.version\n */\nexport type APP_VERSION_TYPE = string;\n\n// Path: model/attributes/app/app__vitals__frames__delay__value.json\n\n/**\n * The sum of all delayed frame durations in seconds during the lifetime of the span. For more information see [frames delay](https://develop.sentry.dev/sdk/performance/frames-delay/). `app.vitals.frames.delay.value`\n *\n * Attribute Value Type: `number` {@link APP_VITALS_FRAMES_DELAY_VALUE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link FRAMES_DELAY} `frames.delay`\n *\n * @example 5\n */\nexport const APP_VITALS_FRAMES_DELAY_VALUE = 'app.vitals.frames.delay.value';\n\n/**\n * Type for {@link APP_VITALS_FRAMES_DELAY_VALUE} app.vitals.frames.delay.value\n */\nexport type APP_VITALS_FRAMES_DELAY_VALUE_TYPE = number;\n\n// Path: model/attributes/app/app__vitals__frames__frozen__count.json\n\n/**\n * The number of frozen frames rendered during the lifetime of the span. `app.vitals.frames.frozen.count`\n *\n * Attribute Value Type: `number` {@link APP_VITALS_FRAMES_FROZEN_COUNT_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link FRAMES_FROZEN} `frames.frozen`\n *\n * @example 3\n */\nexport const APP_VITALS_FRAMES_FROZEN_COUNT = 'app.vitals.frames.frozen.count';\n\n/**\n * Type for {@link APP_VITALS_FRAMES_FROZEN_COUNT} app.vitals.frames.frozen.count\n */\nexport type APP_VITALS_FRAMES_FROZEN_COUNT_TYPE = number;\n\n// Path: model/attributes/app/app__vitals__frames__slow__count.json\n\n/**\n * The number of slow frames rendered during the lifetime of the span. `app.vitals.frames.slow.count`\n *\n * Attribute Value Type: `number` {@link APP_VITALS_FRAMES_SLOW_COUNT_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link FRAMES_SLOW} `frames.slow`\n *\n * @example 1\n */\nexport const APP_VITALS_FRAMES_SLOW_COUNT = 'app.vitals.frames.slow.count';\n\n/**\n * Type for {@link APP_VITALS_FRAMES_SLOW_COUNT} app.vitals.frames.slow.count\n */\nexport type APP_VITALS_FRAMES_SLOW_COUNT_TYPE = number;\n\n// Path: model/attributes/app/app__vitals__frames__total__count.json\n\n/**\n * The number of total frames rendered during the lifetime of the span. `app.vitals.frames.total.count`\n *\n * Attribute Value Type: `number` {@link APP_VITALS_FRAMES_TOTAL_COUNT_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link FRAMES_TOTAL} `frames.total`\n *\n * @example 60\n */\nexport const APP_VITALS_FRAMES_TOTAL_COUNT = 'app.vitals.frames.total.count';\n\n/**\n * Type for {@link APP_VITALS_FRAMES_TOTAL_COUNT} app.vitals.frames.total.count\n */\nexport type APP_VITALS_FRAMES_TOTAL_COUNT_TYPE = number;\n\n// Path: model/attributes/app/app__vitals__start__cold__value.json\n\n/**\n * The duration of a cold app start in milliseconds `app.vitals.start.cold.value`\n *\n * Attribute Value Type: `number` {@link APP_VITALS_START_COLD_VALUE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link APP_START_COLD} `app_start_cold`\n *\n * @example 1234.56\n */\nexport const APP_VITALS_START_COLD_VALUE = 'app.vitals.start.cold.value';\n\n/**\n * Type for {@link APP_VITALS_START_COLD_VALUE} app.vitals.start.cold.value\n */\nexport type APP_VITALS_START_COLD_VALUE_TYPE = number;\n\n// Path: model/attributes/app/app__vitals__start__prewarmed.json\n\n/**\n * Whether the app start was prewarmed. `app.vitals.start.prewarmed`\n *\n * Attribute Value Type: `boolean` {@link APP_VITALS_START_PREWARMED_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example true\n */\nexport const APP_VITALS_START_PREWARMED = 'app.vitals.start.prewarmed';\n\n/**\n * Type for {@link APP_VITALS_START_PREWARMED} app.vitals.start.prewarmed\n */\nexport type APP_VITALS_START_PREWARMED_TYPE = boolean;\n\n// Path: model/attributes/app/app__vitals__start__reason.json\n\n/**\n * The reason that triggered the app start. `app.vitals.start.reason`\n *\n * Attribute Value Type: `string` {@link APP_VITALS_START_REASON_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"push\"\n */\nexport const APP_VITALS_START_REASON = 'app.vitals.start.reason';\n\n/**\n * Type for {@link APP_VITALS_START_REASON} app.vitals.start.reason\n */\nexport type APP_VITALS_START_REASON_TYPE = string;\n\n// Path: model/attributes/app/app__vitals__start__screen.json\n\n/**\n * The screen that is rendered when the app start is complete. This is the screen the user first sees and can interact with after launch. The absence of this attribute on the app start span indicates a background app start where no UI was rendered. `app.vitals.start.screen`\n *\n * Attribute Value Type: `string` {@link APP_VITALS_START_SCREEN_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"MainActivity\"\n */\nexport const APP_VITALS_START_SCREEN = 'app.vitals.start.screen';\n\n/**\n * Type for {@link APP_VITALS_START_SCREEN} app.vitals.start.screen\n */\nexport type APP_VITALS_START_SCREEN_TYPE = string;\n\n// Path: model/attributes/app/app__vitals__start__type.json\n\n/**\n * The type of app start, for example `cold` or `warm` `app.vitals.start.type`\n *\n * Attribute Value Type: `string` {@link APP_VITALS_START_TYPE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link APP_START_TYPE} `app_start_type`\n *\n * @example \"cold\"\n */\nexport const APP_VITALS_START_TYPE = 'app.vitals.start.type';\n\n/**\n * Type for {@link APP_VITALS_START_TYPE} app.vitals.start.type\n */\nexport type APP_VITALS_START_TYPE_TYPE = string;\n\n// Path: model/attributes/app/app__vitals__start__warm__value.json\n\n/**\n * The duration of a warm app start in milliseconds `app.vitals.start.warm.value`\n *\n * Attribute Value Type: `number` {@link APP_VITALS_START_WARM_VALUE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link APP_START_WARM} `app_start_warm`\n *\n * @example 1234.56\n */\nexport const APP_VITALS_START_WARM_VALUE = 'app.vitals.start.warm.value';\n\n/**\n * Type for {@link APP_VITALS_START_WARM_VALUE} app.vitals.start.warm.value\n */\nexport type APP_VITALS_START_WARM_VALUE_TYPE = number;\n\n// Path: model/attributes/app/app__vitals__ttfd__value.json\n\n/**\n * The duration of time to full display in milliseconds `app.vitals.ttfd.value`\n *\n * Attribute Value Type: `number` {@link APP_VITALS_TTFD_VALUE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link TIME_TO_FULL_DISPLAY} `time_to_full_display`\n *\n * @example 1234.56\n */\nexport const APP_VITALS_TTFD_VALUE = 'app.vitals.ttfd.value';\n\n/**\n * Type for {@link APP_VITALS_TTFD_VALUE} app.vitals.ttfd.value\n */\nexport type APP_VITALS_TTFD_VALUE_TYPE = number;\n\n// Path: model/attributes/app/app__vitals__ttid__value.json\n\n/**\n * The duration of time to initial display in milliseconds `app.vitals.ttid.value`\n *\n * Attribute Value Type: `number` {@link APP_VITALS_TTID_VALUE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link TIME_TO_INITIAL_DISPLAY} `time_to_initial_display`\n *\n * @example 1234.56\n */\nexport const APP_VITALS_TTID_VALUE = 'app.vitals.ttid.value';\n\n/**\n * Type for {@link APP_VITALS_TTID_VALUE} app.vitals.ttid.value\n */\nexport type APP_VITALS_TTID_VALUE_TYPE = number;\n\n// Path: model/attributes/art/art__gc__blocking_count.json\n\n/**\n * Total number of blocking (stop-the-world) garbage collections performed by the Android Runtime `art.gc.blocking_count`\n *\n * Attribute Value Type: `number` {@link ART_GC_BLOCKING_COUNT_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 1\n */\nexport const ART_GC_BLOCKING_COUNT = 'art.gc.blocking_count';\n\n/**\n * Type for {@link ART_GC_BLOCKING_COUNT} art.gc.blocking_count\n */\nexport type ART_GC_BLOCKING_COUNT_TYPE = number;\n\n// Path: model/attributes/art/art__gc__blocking_time.json\n\n/**\n * Total time spent in blocking (stop-the-world) garbage collections by the Android Runtime, in milliseconds `art.gc.blocking_time`\n *\n * Attribute Value Type: `number` {@link ART_GC_BLOCKING_TIME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 11.873\n */\nexport const ART_GC_BLOCKING_TIME = 'art.gc.blocking_time';\n\n/**\n * Type for {@link ART_GC_BLOCKING_TIME} art.gc.blocking_time\n */\nexport type ART_GC_BLOCKING_TIME_TYPE = number;\n\n// Path: model/attributes/art/art__gc__pre_oome_count.json\n\n/**\n * Total number of garbage collections triggered as a last resort before an OutOfMemoryError by the Android Runtime `art.gc.pre_oome_count`\n *\n * Attribute Value Type: `number` {@link ART_GC_PRE_OOME_COUNT_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 0\n */\nexport const ART_GC_PRE_OOME_COUNT = 'art.gc.pre_oome_count';\n\n/**\n * Type for {@link ART_GC_PRE_OOME_COUNT} art.gc.pre_oome_count\n */\nexport type ART_GC_PRE_OOME_COUNT_TYPE = number;\n\n// Path: model/attributes/art/art__gc__total_count.json\n\n/**\n * Total number of garbage collections performed by the Android Runtime `art.gc.total_count`\n *\n * Attribute Value Type: `number` {@link ART_GC_TOTAL_COUNT_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 1\n */\nexport const ART_GC_TOTAL_COUNT = 'art.gc.total_count';\n\n/**\n * Type for {@link ART_GC_TOTAL_COUNT} art.gc.total_count\n */\nexport type ART_GC_TOTAL_COUNT_TYPE = number;\n\n// Path: model/attributes/art/art__gc__total_time.json\n\n/**\n * Total time spent in garbage collection by the Android Runtime, in milliseconds `art.gc.total_time`\n *\n * Attribute Value Type: `number` {@link ART_GC_TOTAL_TIME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 11.807\n */\nexport const ART_GC_TOTAL_TIME = 'art.gc.total_time';\n\n/**\n * Type for {@link ART_GC_TOTAL_TIME} art.gc.total_time\n */\nexport type ART_GC_TOTAL_TIME_TYPE = number;\n\n// Path: model/attributes/art/art__gc__waiting_time.json\n\n/**\n * Total time threads spent waiting for garbage collection to complete in the Android Runtime, in milliseconds `art.gc.waiting_time`\n *\n * Attribute Value Type: `number` {@link ART_GC_WAITING_TIME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 8.054\n */\nexport const ART_GC_WAITING_TIME = 'art.gc.waiting_time';\n\n/**\n * Type for {@link ART_GC_WAITING_TIME} art.gc.waiting_time\n */\nexport type ART_GC_WAITING_TIME_TYPE = number;\n\n// Path: model/attributes/art/art__memory__free.json\n\n/**\n * Free memory available to the process as reported by the Android Runtime, in bytes `art.memory.free`\n *\n * Attribute Value Type: `number` {@link ART_MEMORY_FREE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 3181568\n */\nexport const ART_MEMORY_FREE = 'art.memory.free';\n\n/**\n * Type for {@link ART_MEMORY_FREE} art.memory.free\n */\nexport type ART_MEMORY_FREE_TYPE = number;\n\n// Path: model/attributes/art/art__memory__free_until_gc.json\n\n/**\n * Free memory available before a garbage collection would be triggered by the Android Runtime, in bytes `art.memory.free_until_gc`\n *\n * Attribute Value Type: `number` {@link ART_MEMORY_FREE_UNTIL_GC_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 3181568\n */\nexport const ART_MEMORY_FREE_UNTIL_GC = 'art.memory.free_until_gc';\n\n/**\n * Type for {@link ART_MEMORY_FREE_UNTIL_GC} art.memory.free_until_gc\n */\nexport type ART_MEMORY_FREE_UNTIL_GC_TYPE = number;\n\n// Path: model/attributes/art/art__memory__free_until_oome.json\n\n/**\n * Free memory available before an OutOfMemoryError would be thrown by the Android Runtime, in bytes `art.memory.free_until_oome`\n *\n * Attribute Value Type: `number` {@link ART_MEMORY_FREE_UNTIL_OOME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 196083712\n */\nexport const ART_MEMORY_FREE_UNTIL_OOME = 'art.memory.free_until_oome';\n\n/**\n * Type for {@link ART_MEMORY_FREE_UNTIL_OOME} art.memory.free_until_oome\n */\nexport type ART_MEMORY_FREE_UNTIL_OOME_TYPE = number;\n\n// Path: model/attributes/art/art__memory__max.json\n\n/**\n * Maximum memory the process is allowed to use as reported by the Android Runtime, in bytes `art.memory.max`\n *\n * Attribute Value Type: `number` {@link ART_MEMORY_MAX_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 201326592\n */\nexport const ART_MEMORY_MAX = 'art.memory.max';\n\n/**\n * Type for {@link ART_MEMORY_MAX} art.memory.max\n */\nexport type ART_MEMORY_MAX_TYPE = number;\n\n// Path: model/attributes/art/art__memory__total.json\n\n/**\n * Total memory currently allocated to the process by the Android Runtime, in bytes `art.memory.total`\n *\n * Attribute Value Type: `number` {@link ART_MEMORY_TOTAL_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 7774208\n */\nexport const ART_MEMORY_TOTAL = 'art.memory.total';\n\n/**\n * Type for {@link ART_MEMORY_TOTAL} art.memory.total\n */\nexport type ART_MEMORY_TOTAL_TYPE = number;\n\n// Path: model/attributes/aws/aws__cloudwatch__logs__log_group.json\n\n/**\n * The name of the CloudWatch Logs log group `aws.cloudwatch.logs.log_group`\n *\n * Attribute Value Type: `string` {@link AWS_CLOUDWATCH_LOGS_LOG_GROUP_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"/aws/lambda/my-function\"\n */\nexport const AWS_CLOUDWATCH_LOGS_LOG_GROUP = 'aws.cloudwatch.logs.log_group';\n\n/**\n * Type for {@link AWS_CLOUDWATCH_LOGS_LOG_GROUP} aws.cloudwatch.logs.log_group\n */\nexport type AWS_CLOUDWATCH_LOGS_LOG_GROUP_TYPE = string;\n\n// Path: model/attributes/aws/aws__cloudwatch__logs__log_stream.json\n\n/**\n * The name of the CloudWatch Logs log stream `aws.cloudwatch.logs.log_stream`\n *\n * Attribute Value Type: `string` {@link AWS_CLOUDWATCH_LOGS_LOG_STREAM_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"2024/01/01/[$LATEST]abcdef1234567890\"\n */\nexport const AWS_CLOUDWATCH_LOGS_LOG_STREAM = 'aws.cloudwatch.logs.log_stream';\n\n/**\n * Type for {@link AWS_CLOUDWATCH_LOGS_LOG_STREAM} aws.cloudwatch.logs.log_stream\n */\nexport type AWS_CLOUDWATCH_LOGS_LOG_STREAM_TYPE = string;\n\n// Path: model/attributes/aws/aws__cloudwatch__logs__url.json\n\n/**\n * The URL to the CloudWatch Logs log group `aws.cloudwatch.logs.url`\n *\n * Attribute Value Type: `string` {@link AWS_CLOUDWATCH_LOGS_URL_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"https://console.aws.amazon.com/cloudwatch/home?region=us-east-1#logsV2:log-groups/log-group/my-log-group\"\n */\nexport const AWS_CLOUDWATCH_LOGS_URL = 'aws.cloudwatch.logs.url';\n\n/**\n * Type for {@link AWS_CLOUDWATCH_LOGS_URL} aws.cloudwatch.logs.url\n */\nexport type AWS_CLOUDWATCH_LOGS_URL_TYPE = string;\n\n// Path: model/attributes/aws/aws__dynamodb__attribute_definitions.json\n\n/**\n * The JSON-serialized value of each item in the `AttributeDefinitions` request field. `aws.dynamodb.attribute_definitions`\n *\n * Attribute Value Type: `Array<string>` {@link AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example [\"{ \\\"AttributeName\\\": \\\"string\\\", \\\"AttributeType\\\": \\\"string\\\" }\"]\n */\nexport const AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS = 'aws.dynamodb.attribute_definitions';\n\n/**\n * Type for {@link AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS} aws.dynamodb.attribute_definitions\n */\nexport type AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS_TYPE = Array<string>;\n\n// Path: model/attributes/aws/aws__dynamodb__consistent_read.json\n\n/**\n * The value of the `ConsistentRead` request parameter. `aws.dynamodb.consistent_read`\n *\n * Attribute Value Type: `boolean` {@link AWS_DYNAMODB_CONSISTENT_READ_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example true\n */\nexport const AWS_DYNAMODB_CONSISTENT_READ = 'aws.dynamodb.consistent_read';\n\n/**\n * Type for {@link AWS_DYNAMODB_CONSISTENT_READ} aws.dynamodb.consistent_read\n */\nexport type AWS_DYNAMODB_CONSISTENT_READ_TYPE = boolean;\n\n// Path: model/attributes/aws/aws__dynamodb__consumed_capacity.json\n\n/**\n * The JSON-serialized value of each item in the `ConsumedCapacity` response field. `aws.dynamodb.consumed_capacity`\n *\n * Attribute Value Type: `Array<string>` {@link AWS_DYNAMODB_CONSUMED_CAPACITY_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example [\"{ \\\"CapacityUnits\\\": number, \\\"GlobalSecondaryIndexes\\\": { \\\"string\\\" : { \\\"CapacityUnits\\\": number, \\\"ReadCapacityUnits\\\": number, \\\"WriteCapacityUnits\\\": number } }, \\\"LocalSecondaryIndexes\\\": { \\\"string\\\" : { \\\"CapacityUnits\\\": number, \\\"ReadCapacityUnits\\\": number, \\\"WriteCapacityUnits\\\": number } }, \\\"ReadCapacityUnits\\\": number, \\\"Table\\\": { \\\"CapacityUnits\\\": number, \\\"ReadCapacityUnits\\\": number, \\\"WriteCapacityUnits\\\": number }, \\\"TableName\\\": \\\"string\\\", \\\"WriteCapacityUnits\\\": number }\"]\n */\nexport const AWS_DYNAMODB_CONSUMED_CAPACITY = 'aws.dynamodb.consumed_capacity';\n\n/**\n * Type for {@link AWS_DYNAMODB_CONSUMED_CAPACITY} aws.dynamodb.consumed_capacity\n */\nexport type AWS_DYNAMODB_CONSUMED_CAPACITY_TYPE = Array<string>;\n\n// Path: model/attributes/aws/aws__dynamodb__count.json\n\n/**\n * The value of the `Count` response parameter. `aws.dynamodb.count`\n *\n * Attribute Value Type: `number` {@link AWS_DYNAMODB_COUNT_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example 10\n */\nexport const AWS_DYNAMODB_COUNT = 'aws.dynamodb.count';\n\n/**\n * Type for {@link AWS_DYNAMODB_COUNT} aws.dynamodb.count\n */\nexport type AWS_DYNAMODB_COUNT_TYPE = number;\n\n// Path: model/attributes/aws/aws__dynamodb__exclusive_start_table.json\n\n/**\n * The value of the `ExclusiveStartTableName` request parameter. `aws.dynamodb.exclusive_start_table`\n *\n * Attribute Value Type: `string` {@link AWS_DYNAMODB_EXCLUSIVE_START_TABLE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"Users\"\n */\nexport const AWS_DYNAMODB_EXCLUSIVE_START_TABLE = 'aws.dynamodb.exclusive_start_table';\n\n/**\n * Type for {@link AWS_DYNAMODB_EXCLUSIVE_START_TABLE} aws.dynamodb.exclusive_start_table\n */\nexport type AWS_DYNAMODB_EXCLUSIVE_START_TABLE_TYPE = string;\n\n// Path: model/attributes/aws/aws__dynamodb__global_secondary_indexes.json\n\n/**\n * The JSON-serialized value of each item of the `GlobalSecondaryIndexes` request field. `aws.dynamodb.global_secondary_indexes`\n *\n * Attribute Value Type: `Array<string>` {@link AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example [\"{ \\\"IndexName\\\": \\\"string\\\", \\\"KeySchema\\\": [ { \\\"AttributeName\\\": \\\"string\\\", \\\"KeyType\\\": \\\"string\\\" } ], \\\"Projection\\\": { \\\"NonKeyAttributes\\\": [ \\\"string\\\" ], \\\"ProjectionType\\\": \\\"string\\\" }, \\\"ProvisionedThroughput\\\": { \\\"ReadCapacityUnits\\\": number, \\\"WriteCapacityUnits\\\": number } }\"]\n */\nexport const AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES = 'aws.dynamodb.global_secondary_indexes';\n\n/**\n * Type for {@link AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES} aws.dynamodb.global_secondary_indexes\n */\nexport type AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES_TYPE = Array<string>;\n\n// Path: model/attributes/aws/aws__dynamodb__global_secondary_index_updates.json\n\n/**\n * The JSON-serialized value of each item in the `GlobalSecondaryIndexUpdates` request field. `aws.dynamodb.global_secondary_index_updates`\n *\n * Attribute Value Type: `Array<string>` {@link AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example [\"{ \\\"Create\\\": { \\\"IndexName\\\": \\\"string\\\", \\\"KeySchema\\\": [ { \\\"AttributeName\\\": \\\"string\\\", \\\"KeyType\\\": \\\"string\\\" } ], \\\"Projection\\\": { \\\"NonKeyAttributes\\\": [ \\\"string\\\" ], \\\"ProjectionType\\\": \\\"string\\\" }, \\\"ProvisionedThroughput\\\": { \\\"ReadCapacityUnits\\\": number, \\\"WriteCapacityUnits\\\": number } }\"]\n */\nexport const AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES = 'aws.dynamodb.global_secondary_index_updates';\n\n/**\n * Type for {@link AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES} aws.dynamodb.global_secondary_index_updates\n */\nexport type AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES_TYPE = Array<string>;\n\n// Path: model/attributes/aws/aws__dynamodb__index_name.json\n\n/**\n * The value of the `IndexName` request parameter. `aws.dynamodb.index_name`\n *\n * Attribute Value Type: `string` {@link AWS_DYNAMODB_INDEX_NAME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"name_to_group\"\n */\nexport const AWS_DYNAMODB_INDEX_NAME = 'aws.dynamodb.index_name';\n\n/**\n * Type for {@link AWS_DYNAMODB_INDEX_NAME} aws.dynamodb.index_name\n */\nexport type AWS_DYNAMODB_INDEX_NAME_TYPE = string;\n\n// Path: model/attributes/aws/aws__dynamodb__item_collection_metrics.json\n\n/**\n * The JSON-serialized value of the `ItemCollectionMetrics` response field. `aws.dynamodb.item_collection_metrics`\n *\n * Attribute Value Type: `string` {@link AWS_DYNAMODB_ITEM_COLLECTION_METRICS_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"{ \\\"string\\\" : [ { \\\"ItemCollectionKey\\\": { \\\"string\\\" : { \\\"B\\\": blob, \\\"BOOL\\\": boolean, \\\"BS\\\": [ blob ], \\\"L\\\": [ \\\"AttributeValue\\\" ], \\\"M\\\": { \\\"string\\\" : \\\"AttributeValue\\\" }, \\\"N\\\": \\\"string\\\", \\\"NS\\\": [ \\\"string\\\" ], \\\"NULL\\\": boolean, \\\"S\\\": \\\"string\\\", \\\"SS\\\": [ \\\"string\\\" ] } }, \\\"SizeEstimateRangeGB\\\": [ number ] } ] }\"\n */\nexport const AWS_DYNAMODB_ITEM_COLLECTION_METRICS = 'aws.dynamodb.item_collection_metrics';\n\n/**\n * Type for {@link AWS_DYNAMODB_ITEM_COLLECTION_METRICS} aws.dynamodb.item_collection_metrics\n */\nexport type AWS_DYNAMODB_ITEM_COLLECTION_METRICS_TYPE = string;\n\n// Path: model/attributes/aws/aws__dynamodb__limit.json\n\n/**\n * The value of the `Limit` request parameter. `aws.dynamodb.limit`\n *\n * Attribute Value Type: `number` {@link AWS_DYNAMODB_LIMIT_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example 10\n */\nexport const AWS_DYNAMODB_LIMIT = 'aws.dynamodb.limit';\n\n/**\n * Type for {@link AWS_DYNAMODB_LIMIT} aws.dynamodb.limit\n */\nexport type AWS_DYNAMODB_LIMIT_TYPE = number;\n\n// Path: model/attributes/aws/aws__dynamodb__local_secondary_indexes.json\n\n/**\n * The JSON-serialized value of each item of the `LocalSecondaryIndexes` request field. `aws.dynamodb.local_secondary_indexes`\n *\n * Attribute Value Type: `Array<string>` {@link AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example [\"{ \\\"IndexArn\\\": \\\"string\\\", \\\"IndexName\\\": \\\"string\\\", \\\"IndexSizeBytes\\\": number, \\\"ItemCount\\\": number, \\\"KeySchema\\\": [ { \\\"AttributeName\\\": \\\"string\\\", \\\"KeyType\\\": \\\"string\\\" } ], \\\"Projection\\\": { \\\"NonKeyAttributes\\\": [ \\\"string\\\" ], \\\"ProjectionType\\\": \\\"string\\\" } }\"]\n */\nexport const AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES = 'aws.dynamodb.local_secondary_indexes';\n\n/**\n * Type for {@link AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES} aws.dynamodb.local_secondary_indexes\n */\nexport type AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES_TYPE = Array<string>;\n\n// Path: model/attributes/aws/aws__dynamodb__projection.json\n\n/**\n * The value of the `ProjectionExpression` request parameter. `aws.dynamodb.projection`\n *\n * Attribute Value Type: `string` {@link AWS_DYNAMODB_PROJECTION_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"Title, Price, Color\"\n */\nexport const AWS_DYNAMODB_PROJECTION = 'aws.dynamodb.projection';\n\n/**\n * Type for {@link AWS_DYNAMODB_PROJECTION} aws.dynamodb.projection\n */\nexport type AWS_DYNAMODB_PROJECTION_TYPE = string;\n\n// Path: model/attributes/aws/aws__dynamodb__provisioned_read_capacity.json\n\n/**\n * The value of the `ProvisionedThroughput.ReadCapacityUnits` request parameter. `aws.dynamodb.provisioned_read_capacity`\n *\n * Attribute Value Type: `number` {@link AWS_DYNAMODB_PROVISIONED_READ_CAPACITY_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example 1\n */\nexport const AWS_DYNAMODB_PROVISIONED_READ_CAPACITY = 'aws.dynamodb.provisioned_read_capacity';\n\n/**\n * Type for {@link AWS_DYNAMODB_PROVISIONED_READ_CAPACITY} aws.dynamodb.provisioned_read_capacity\n */\nexport type AWS_DYNAMODB_PROVISIONED_READ_CAPACITY_TYPE = number;\n\n// Path: model/attributes/aws/aws__dynamodb__provisioned_write_capacity.json\n\n/**\n * The value of the `ProvisionedThroughput.WriteCapacityUnits` request parameter. `aws.dynamodb.provisioned_write_capacity`\n *\n * Attribute Value Type: `number` {@link AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example 2\n */\nexport const AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY = 'aws.dynamodb.provisioned_write_capacity';\n\n/**\n * Type for {@link AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY} aws.dynamodb.provisioned_write_capacity\n */\nexport type AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY_TYPE = number;\n\n// Path: model/attributes/aws/aws__dynamodb__scanned_count.json\n\n/**\n * The value of the `ScannedCount` response parameter. `aws.dynamodb.scanned_count`\n *\n * Attribute Value Type: `number` {@link AWS_DYNAMODB_SCANNED_COUNT_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example 50\n */\nexport const AWS_DYNAMODB_SCANNED_COUNT = 'aws.dynamodb.scanned_count';\n\n/**\n * Type for {@link AWS_DYNAMODB_SCANNED_COUNT} aws.dynamodb.scanned_count\n */\nexport type AWS_DYNAMODB_SCANNED_COUNT_TYPE = number;\n\n// Path: model/attributes/aws/aws__dynamodb__scan_forward.json\n\n/**\n * The value of the `ScanIndexForward` request parameter. `aws.dynamodb.scan_forward`\n *\n * Attribute Value Type: `boolean` {@link AWS_DYNAMODB_SCAN_FORWARD_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example true\n */\nexport const AWS_DYNAMODB_SCAN_FORWARD = 'aws.dynamodb.scan_forward';\n\n/**\n * Type for {@link AWS_DYNAMODB_SCAN_FORWARD} aws.dynamodb.scan_forward\n */\nexport type AWS_DYNAMODB_SCAN_FORWARD_TYPE = boolean;\n\n// Path: model/attributes/aws/aws__dynamodb__segment.json\n\n/**\n * The value of the `Segment` request parameter. `aws.dynamodb.segment`\n *\n * Attribute Value Type: `number` {@link AWS_DYNAMODB_SEGMENT_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example 10\n */\nexport const AWS_DYNAMODB_SEGMENT = 'aws.dynamodb.segment';\n\n/**\n * Type for {@link AWS_DYNAMODB_SEGMENT} aws.dynamodb.segment\n */\nexport type AWS_DYNAMODB_SEGMENT_TYPE = number;\n\n// Path: model/attributes/aws/aws__dynamodb__select.json\n\n/**\n * The value of the `Select` request parameter. `aws.dynamodb.select`\n *\n * Attribute Value Type: `string` {@link AWS_DYNAMODB_SELECT_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"ALL_ATTRIBUTES\"\n */\nexport const AWS_DYNAMODB_SELECT = 'aws.dynamodb.select';\n\n/**\n * Type for {@link AWS_DYNAMODB_SELECT} aws.dynamodb.select\n */\nexport type AWS_DYNAMODB_SELECT_TYPE = string;\n\n// Path: model/attributes/aws/aws__dynamodb__table_count.json\n\n/**\n * The number of items in the `TableNames` response parameter. `aws.dynamodb.table_count`\n *\n * Attribute Value Type: `number` {@link AWS_DYNAMODB_TABLE_COUNT_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example 20\n */\nexport const AWS_DYNAMODB_TABLE_COUNT = 'aws.dynamodb.table_count';\n\n/**\n * Type for {@link AWS_DYNAMODB_TABLE_COUNT} aws.dynamodb.table_count\n */\nexport type AWS_DYNAMODB_TABLE_COUNT_TYPE = number;\n\n// Path: model/attributes/aws/aws__dynamodb__table_names.json\n\n/**\n * The keys in the `RequestItems` object field. `aws.dynamodb.table_names`\n *\n * Attribute Value Type: `Array<string>` {@link AWS_DYNAMODB_TABLE_NAMES_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example [\"Users\",\"Cats\"]\n */\nexport const AWS_DYNAMODB_TABLE_NAMES = 'aws.dynamodb.table_names';\n\n/**\n * Type for {@link AWS_DYNAMODB_TABLE_NAMES} aws.dynamodb.table_names\n */\nexport type AWS_DYNAMODB_TABLE_NAMES_TYPE = Array<string>;\n\n// Path: model/attributes/aws/aws__dynamodb__total_segments.json\n\n/**\n * The value of the `TotalSegments` request parameter. `aws.dynamodb.total_segments`\n *\n * Attribute Value Type: `number` {@link AWS_DYNAMODB_TOTAL_SEGMENTS_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example 100\n */\nexport const AWS_DYNAMODB_TOTAL_SEGMENTS = 'aws.dynamodb.total_segments';\n\n/**\n * Type for {@link AWS_DYNAMODB_TOTAL_SEGMENTS} aws.dynamodb.total_segments\n */\nexport type AWS_DYNAMODB_TOTAL_SEGMENTS_TYPE = number;\n\n// Path: model/attributes/aws/aws__extended_request_id.json\n\n/**\n * The AWS extended request ID as returned in the response headers. `aws.extended_request_id`\n *\n * Attribute Value Type: `string` {@link AWS_EXTENDED_REQUEST_ID_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link AWS_REQUEST_EXTENDED_ID} `aws.request.extended_id`\n *\n * @example \"wzHcyEWfmOGDIE5QOhTAqFDoDWP3y8IUvpNINCwL9N4TEHbUw0/gZJ+VZTmCNCWR7fezEN3eCiQ=\"\n */\nexport const AWS_EXTENDED_REQUEST_ID = 'aws.extended_request_id';\n\n/**\n * Type for {@link AWS_EXTENDED_REQUEST_ID} aws.extended_request_id\n */\nexport type AWS_EXTENDED_REQUEST_ID_TYPE = string;\n\n// Path: model/attributes/aws/aws__kinesis__stream_name.json\n\n/**\n * The name of the AWS Kinesis stream the request refers to. `aws.kinesis.stream_name`\n *\n * Attribute Value Type: `string` {@link AWS_KINESIS_STREAM_NAME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link _AWS_KINESIS_STREAM_NAME} `aws.kinesis.stream.name`\n *\n * @example \"some-stream-name\"\n */\nexport const AWS_KINESIS_STREAM_NAME = 'aws.kinesis.stream_name';\n\n/**\n * Type for {@link AWS_KINESIS_STREAM_NAME} aws.kinesis.stream_name\n */\nexport type AWS_KINESIS_STREAM_NAME_TYPE = string;\n\n// Path: model/attributes/aws/aws__kinesis__stream__name.json\n\n/**\n * The name of the AWS Kinesis stream the request refers to. `aws.kinesis.stream.name`\n *\n * Attribute Value Type: `string` {@link _AWS_KINESIS_STREAM_NAME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link AWS_KINESIS_STREAM_NAME} `aws.kinesis.stream_name`\n *\n * @deprecated Use {@link AWS_KINESIS_STREAM_NAME} (aws.kinesis.stream_name) instead - This attribute is being deprecated in favor of aws.kinesis.stream_name, which is the OTel-aligned replacement.\n * @example \"some-stream-name\"\n */\nexport const _AWS_KINESIS_STREAM_NAME = 'aws.kinesis.stream.name';\n\n/**\n * Type for {@link _AWS_KINESIS_STREAM_NAME} aws.kinesis.stream.name\n */\nexport type _AWS_KINESIS_STREAM_NAME_TYPE = string;\n\n// Path: model/attributes/aws/aws__lambda__aws_request_id.json\n\n/**\n * The AWS request ID as received by the Lambda function runtime `aws.lambda.aws_request_id`\n *\n * Attribute Value Type: `string` {@link AWS_LAMBDA_AWS_REQUEST_ID_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link FAAS_INVOCATION_ID} `faas.invocation_id`, {@link FAAS_EXECUTION} `faas.execution`\n *\n * @deprecated Use {@link FAAS_INVOCATION_ID} (faas.invocation_id) instead - This attribute is being deprecated in favor of faas.invocation_id\n * @example \"8476a536-e9f4-11e8-9739-2dfe598c3fcd\"\n */\nexport const AWS_LAMBDA_AWS_REQUEST_ID = 'aws.lambda.aws_request_id';\n\n/**\n * Type for {@link AWS_LAMBDA_AWS_REQUEST_ID} aws.lambda.aws_request_id\n */\nexport type AWS_LAMBDA_AWS_REQUEST_ID_TYPE = string;\n\n// Path: model/attributes/aws/aws__lambda__execution_duration_in_millis.json\n\n/**\n * The execution duration of the Lambda function invocation in milliseconds `aws.lambda.execution_duration_in_millis`\n *\n * Attribute Value Type: `number` {@link AWS_LAMBDA_EXECUTION_DURATION_IN_MILLIS_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 1234.56\n */\nexport const AWS_LAMBDA_EXECUTION_DURATION_IN_MILLIS = 'aws.lambda.execution_duration_in_millis';\n\n/**\n * Type for {@link AWS_LAMBDA_EXECUTION_DURATION_IN_MILLIS} aws.lambda.execution_duration_in_millis\n */\nexport type AWS_LAMBDA_EXECUTION_DURATION_IN_MILLIS_TYPE = number;\n\n// Path: model/attributes/aws/aws__lambda__function_name.json\n\n/**\n * The name of the Lambda function `aws.lambda.function_name`\n *\n * Attribute Value Type: `string` {@link AWS_LAMBDA_FUNCTION_NAME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link FAAS_NAME} `faas.name`\n *\n * @deprecated Use {@link FAAS_NAME} (faas.name) instead - Use the OTel-aligned faas.name attribute instead\n * @example \"my-function\"\n */\nexport const AWS_LAMBDA_FUNCTION_NAME = 'aws.lambda.function_name';\n\n/**\n * Type for {@link AWS_LAMBDA_FUNCTION_NAME} aws.lambda.function_name\n */\nexport type AWS_LAMBDA_FUNCTION_NAME_TYPE = string;\n\n// Path: model/attributes/aws/aws__lambda__function_version.json\n\n/**\n * The version of the Lambda function `aws.lambda.function_version`\n *\n * Attribute Value Type: `string` {@link AWS_LAMBDA_FUNCTION_VERSION_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link FAAS_VERSION} `faas.version`\n *\n * @deprecated Use {@link FAAS_VERSION} (faas.version) instead - Use the OTel-aligned faas.version attribute instead\n * @example \"$LATEST\"\n */\nexport const AWS_LAMBDA_FUNCTION_VERSION = 'aws.lambda.function_version';\n\n/**\n * Type for {@link AWS_LAMBDA_FUNCTION_VERSION} aws.lambda.function_version\n */\nexport type AWS_LAMBDA_FUNCTION_VERSION_TYPE = string;\n\n// Path: model/attributes/aws/aws__lambda__invoked_arn.json\n\n/**\n * The full ARN of the Lambda function that was invoked `aws.lambda.invoked_arn`\n *\n * Attribute Value Type: `string` {@link AWS_LAMBDA_INVOKED_ARN_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link AWS_LAMBDA_INVOKED_FUNCTION_ARN} `aws.lambda.invoked_function_arn`\n *\n * @example \"arn:aws:lambda:us-east-1:123456789012:function:my-function\"\n */\nexport const AWS_LAMBDA_INVOKED_ARN = 'aws.lambda.invoked_arn';\n\n/**\n * Type for {@link AWS_LAMBDA_INVOKED_ARN} aws.lambda.invoked_arn\n */\nexport type AWS_LAMBDA_INVOKED_ARN_TYPE = string;\n\n// Path: model/attributes/aws/aws__lambda__invoked_function_arn.json\n\n/**\n * The full ARN of the Lambda function that was invoked `aws.lambda.invoked_function_arn`\n *\n * Attribute Value Type: `string` {@link AWS_LAMBDA_INVOKED_FUNCTION_ARN_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link AWS_LAMBDA_INVOKED_ARN} `aws.lambda.invoked_arn`\n *\n * @deprecated Use {@link AWS_LAMBDA_INVOKED_ARN} (aws.lambda.invoked_arn) instead - This attribute is being deprecated in favor of aws.lambda.invoked_arn\n * @example \"arn:aws:lambda:us-east-1:123456789012:function:my-function\"\n */\nexport const AWS_LAMBDA_INVOKED_FUNCTION_ARN = 'aws.lambda.invoked_function_arn';\n\n/**\n * Type for {@link AWS_LAMBDA_INVOKED_FUNCTION_ARN} aws.lambda.invoked_function_arn\n */\nexport type AWS_LAMBDA_INVOKED_FUNCTION_ARN_TYPE = string;\n\n// Path: model/attributes/aws/aws__lambda__remaining_time_in_millis.json\n\n/**\n * The remaining time in milliseconds before the Lambda function times out `aws.lambda.remaining_time_in_millis`\n *\n * Attribute Value Type: `number` {@link AWS_LAMBDA_REMAINING_TIME_IN_MILLIS_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 5000\n */\nexport const AWS_LAMBDA_REMAINING_TIME_IN_MILLIS = 'aws.lambda.remaining_time_in_millis';\n\n/**\n * Type for {@link AWS_LAMBDA_REMAINING_TIME_IN_MILLIS} aws.lambda.remaining_time_in_millis\n */\nexport type AWS_LAMBDA_REMAINING_TIME_IN_MILLIS_TYPE = number;\n\n// Path: model/attributes/aws/aws__log__group__names.json\n\n/**\n * The name(s) of the AWS log group(s) an application is writing to. `aws.log.group.names`\n *\n * Attribute Value Type: `Array<string>` {@link AWS_LOG_GROUP_NAMES_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example [\"/aws/lambda/my-function\",\"opentelemetry-service\"]\n */\nexport const AWS_LOG_GROUP_NAMES = 'aws.log.group.names';\n\n/**\n * Type for {@link AWS_LOG_GROUP_NAMES} aws.log.group.names\n */\nexport type AWS_LOG_GROUP_NAMES_TYPE = Array<string>;\n\n// Path: model/attributes/aws/aws__log__stream__names.json\n\n/**\n * The name(s) of the AWS log stream(s) an application is writing to. `aws.log.stream.names`\n *\n * Attribute Value Type: `Array<string>` {@link AWS_LOG_STREAM_NAMES_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example [\"logs/main/10838bed-421f-43ef-870a-f43feacbbb5b\"]\n */\nexport const AWS_LOG_STREAM_NAMES = 'aws.log.stream.names';\n\n/**\n * Type for {@link AWS_LOG_STREAM_NAMES} aws.log.stream.names\n */\nexport type AWS_LOG_STREAM_NAMES_TYPE = Array<string>;\n\n// Path: model/attributes/aws/aws__request__extended_id.json\n\n/**\n * The AWS extended request ID as returned in the response headers. `aws.request.extended_id`\n *\n * Attribute Value Type: `string` {@link AWS_REQUEST_EXTENDED_ID_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link AWS_EXTENDED_REQUEST_ID} `aws.extended_request_id`\n *\n * @deprecated Use {@link AWS_EXTENDED_REQUEST_ID} (aws.extended_request_id) instead - This attribute is being deprecated in favor of aws.extended_request_id, which is the OTel-aligned replacement.\n * @example \"wzHcyEWfmOGDIE5QOhTAqFDoDWP3y8IUvpNINCwL9N4TEHbUw0/gZJ+VZTmCNCWR7fezEN3eCiQ=\"\n */\nexport const AWS_REQUEST_EXTENDED_ID = 'aws.request.extended_id';\n\n/**\n * Type for {@link AWS_REQUEST_EXTENDED_ID} aws.request.extended_id\n */\nexport type AWS_REQUEST_EXTENDED_ID_TYPE = string;\n\n// Path: model/attributes/aws/aws__request_id.json\n\n/**\n * The AWS request ID as returned in the response headers. `aws.request_id`\n *\n * Attribute Value Type: `string` {@link AWS_REQUEST_ID_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link _AWS_REQUEST_ID} `aws.request.id`\n *\n * @example \"79b9da39-b7ae-508a-a6bc-864b2829c622\"\n */\nexport const AWS_REQUEST_ID = 'aws.request_id';\n\n/**\n * Type for {@link AWS_REQUEST_ID} aws.request_id\n */\nexport type AWS_REQUEST_ID_TYPE = string;\n\n// Path: model/attributes/aws/aws__request__id.json\n\n/**\n * The AWS request ID as returned in the response headers. `aws.request.id`\n *\n * Attribute Value Type: `string` {@link _AWS_REQUEST_ID_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link AWS_REQUEST_ID} `aws.request_id`\n *\n * @deprecated Use {@link AWS_REQUEST_ID} (aws.request_id) instead - This attribute is being deprecated in favor of aws.request_id, which is the OTel-aligned replacement.\n * @example \"79b9da39-b7ae-508a-a6bc-864b2829c622\"\n */\nexport const _AWS_REQUEST_ID = 'aws.request.id';\n\n/**\n * Type for {@link _AWS_REQUEST_ID} aws.request.id\n */\nexport type _AWS_REQUEST_ID_TYPE = string;\n\n// Path: model/attributes/aws/aws__s3__bucket.json\n\n/**\n * The S3 bucket name the request refers to. `aws.s3.bucket`\n *\n * Attribute Value Type: `string` {@link AWS_S3_BUCKET_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"ot-demo-test\"\n */\nexport const AWS_S3_BUCKET = 'aws.s3.bucket';\n\n/**\n * Type for {@link AWS_S3_BUCKET} aws.s3.bucket\n */\nexport type AWS_S3_BUCKET_TYPE = string;\n\n// Path: model/attributes/aws/aws__secretsmanager__secret__arn.json\n\n/**\n * The ARN of the Secret stored in Secrets Manager. `aws.secretsmanager.secret.arn`\n *\n * Attribute Value Type: `string` {@link AWS_SECRETSMANAGER_SECRET_ARN_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"arn:aws:secretsmanager:us-east-1:123456789012:secret:SecretName-6RandomCharacters\"\n */\nexport const AWS_SECRETSMANAGER_SECRET_ARN = 'aws.secretsmanager.secret.arn';\n\n/**\n * Type for {@link AWS_SECRETSMANAGER_SECRET_ARN} aws.secretsmanager.secret.arn\n */\nexport type AWS_SECRETSMANAGER_SECRET_ARN_TYPE = string;\n\n// Path: model/attributes/aws/aws__sns__topic__arn.json\n\n/**\n * The ARN of the AWS SNS Topic. An Amazon SNS topic is a logical access point that acts as a communication channel. `aws.sns.topic.arn`\n *\n * Attribute Value Type: `string` {@link AWS_SNS_TOPIC_ARN_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"arn:aws:sns:us-east-1:123456789012:mystack-mytopic-NZJ5JSMVGFIE\"\n */\nexport const AWS_SNS_TOPIC_ARN = 'aws.sns.topic.arn';\n\n/**\n * Type for {@link AWS_SNS_TOPIC_ARN} aws.sns.topic.arn\n */\nexport type AWS_SNS_TOPIC_ARN_TYPE = string;\n\n// Path: model/attributes/aws/aws__step_functions__activity__arn.json\n\n/**\n * The ARN of the AWS Step Functions Activity. `aws.step_functions.activity.arn`\n *\n * Attribute Value Type: `string` {@link AWS_STEP_FUNCTIONS_ACTIVITY_ARN_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"arn:aws:states:us-east-1:123456789012:activity:get-greeting\"\n */\nexport const AWS_STEP_FUNCTIONS_ACTIVITY_ARN = 'aws.step_functions.activity.arn';\n\n/**\n * Type for {@link AWS_STEP_FUNCTIONS_ACTIVITY_ARN} aws.step_functions.activity.arn\n */\nexport type AWS_STEP_FUNCTIONS_ACTIVITY_ARN_TYPE = string;\n\n// Path: model/attributes/aws/aws__step_functions__state_machine__arn.json\n\n/**\n * The ARN of the AWS Step Functions State Machine. `aws.step_functions.state_machine.arn`\n *\n * Attribute Value Type: `string` {@link AWS_STEP_FUNCTIONS_STATE_MACHINE_ARN_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"arn:aws:states:us-east-1:123456789012:stateMachine:myStateMachine:1\"\n */\nexport const AWS_STEP_FUNCTIONS_STATE_MACHINE_ARN = 'aws.step_functions.state_machine.arn';\n\n/**\n * Type for {@link AWS_STEP_FUNCTIONS_STATE_MACHINE_ARN} aws.step_functions.state_machine.arn\n */\nexport type AWS_STEP_FUNCTIONS_STATE_MACHINE_ARN_TYPE = string;\n\n// Path: model/attributes/blocked_main_thread.json\n\n/**\n * Whether the main thread was blocked by the span. `blocked_main_thread`\n *\n * Attribute Value Type: `boolean` {@link BLOCKED_MAIN_THREAD_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example true\n */\nexport const BLOCKED_MAIN_THREAD = 'blocked_main_thread';\n\n/**\n * Type for {@link BLOCKED_MAIN_THREAD} blocked_main_thread\n */\nexport type BLOCKED_MAIN_THREAD_TYPE = boolean;\n\n// Path: model/attributes/browser/browser__name.json\n\n/**\n * The name of the browser. `browser.name`\n *\n * Attribute Value Type: `string` {@link BROWSER_NAME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link SENTRY_BROWSER_NAME} `sentry.browser.name`\n *\n * @example \"Chrome\"\n */\nexport const BROWSER_NAME = 'browser.name';\n\n/**\n * Type for {@link BROWSER_NAME} browser.name\n */\nexport type BROWSER_NAME_TYPE = string;\n\n// Path: model/attributes/browser/browser__performance__navigation__activation_start.json\n\n/**\n * The time between initiating a navigation to a page and the browser activating the page `browser.performance.navigation.activation_start`\n *\n * Attribute Value Type: `number` {@link BROWSER_PERFORMANCE_NAVIGATION_ACTIVATION_START_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link PERFORMANCE_ACTIVATIONSTART} `performance.activationStart`\n *\n * @example 1.983\n */\nexport const BROWSER_PERFORMANCE_NAVIGATION_ACTIVATION_START = 'browser.performance.navigation.activation_start';\n\n/**\n * Type for {@link BROWSER_PERFORMANCE_NAVIGATION_ACTIVATION_START} browser.performance.navigation.activation_start\n */\nexport type BROWSER_PERFORMANCE_NAVIGATION_ACTIVATION_START_TYPE = number;\n\n// Path: model/attributes/browser/browser__performance__time_origin.json\n\n/**\n * The browser's performance.timeOrigin timestamp representing the time when the pageload was initiated `browser.performance.time_origin`\n *\n * Attribute Value Type: `number` {@link BROWSER_PERFORMANCE_TIME_ORIGIN_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link PERFORMANCE_TIMEORIGIN} `performance.timeOrigin`\n *\n * @example 1776185678.886\n */\nexport const BROWSER_PERFORMANCE_TIME_ORIGIN = 'browser.performance.time_origin';\n\n/**\n * Type for {@link BROWSER_PERFORMANCE_TIME_ORIGIN} browser.performance.time_origin\n */\nexport type BROWSER_PERFORMANCE_TIME_ORIGIN_TYPE = number;\n\n// Path: model/attributes/browser/browser__report__type.json\n\n/**\n * A browser report sent via reporting API.. `browser.report.type`\n *\n * Attribute Value Type: `string` {@link BROWSER_REPORT_TYPE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"network-error\"\n */\nexport const BROWSER_REPORT_TYPE = 'browser.report.type';\n\n/**\n * Type for {@link BROWSER_REPORT_TYPE} browser.report.type\n */\nexport type BROWSER_REPORT_TYPE_TYPE = string;\n\n// Path: model/attributes/browser/browser__script__invoker.json\n\n/**\n * How a script was called in the browser. `browser.script.invoker`\n *\n * Attribute Value Type: `string` {@link BROWSER_SCRIPT_INVOKER_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"Window.requestAnimationFrame\"\n */\nexport const BROWSER_SCRIPT_INVOKER = 'browser.script.invoker';\n\n/**\n * Type for {@link BROWSER_SCRIPT_INVOKER} browser.script.invoker\n */\nexport type BROWSER_SCRIPT_INVOKER_TYPE = string;\n\n// Path: model/attributes/browser/browser__script__invoker_type.json\n\n/**\n * Browser script entry point type. `browser.script.invoker_type`\n *\n * Attribute Value Type: `string` {@link BROWSER_SCRIPT_INVOKER_TYPE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"event-listener\"\n */\nexport const BROWSER_SCRIPT_INVOKER_TYPE = 'browser.script.invoker_type';\n\n/**\n * Type for {@link BROWSER_SCRIPT_INVOKER_TYPE} browser.script.invoker_type\n */\nexport type BROWSER_SCRIPT_INVOKER_TYPE_TYPE = string;\n\n// Path: model/attributes/browser/browser__script__source_char_position.json\n\n/**\n * A number representing the script character position of the script. `browser.script.source_char_position`\n *\n * Attribute Value Type: `number` {@link BROWSER_SCRIPT_SOURCE_CHAR_POSITION_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 678\n */\nexport const BROWSER_SCRIPT_SOURCE_CHAR_POSITION = 'browser.script.source_char_position';\n\n/**\n * Type for {@link BROWSER_SCRIPT_SOURCE_CHAR_POSITION} browser.script.source_char_position\n */\nexport type BROWSER_SCRIPT_SOURCE_CHAR_POSITION_TYPE = number;\n\n// Path: model/attributes/browser/browser__version.json\n\n/**\n * The version of the browser. `browser.version`\n *\n * Attribute Value Type: `string` {@link BROWSER_VERSION_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link SENTRY_BROWSER_VERSION} `sentry.browser.version`\n *\n * @example \"120.0.6099.130\"\n */\nexport const BROWSER_VERSION = 'browser.version';\n\n/**\n * Type for {@link BROWSER_VERSION} browser.version\n */\nexport type BROWSER_VERSION_TYPE = string;\n\n// Path: model/attributes/browser/browser__web_vital__cls__report_event.json\n\n/**\n * The event that caused the SDK to report CLS (pagehide or navigation) `browser.web_vital.cls.report_event`\n *\n * Attribute Value Type: `string` {@link BROWSER_WEB_VITAL_CLS_REPORT_EVENT_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"navigation\"\n */\nexport const BROWSER_WEB_VITAL_CLS_REPORT_EVENT = 'browser.web_vital.cls.report_event';\n\n/**\n * Type for {@link BROWSER_WEB_VITAL_CLS_REPORT_EVENT} browser.web_vital.cls.report_event\n */\nexport type BROWSER_WEB_VITAL_CLS_REPORT_EVENT_TYPE = string;\n\n// Path: model/attributes/browser/browser__web_vital__cls__source__[key].json\n\n/**\n * The HTML elements or components responsible for the layout shift. <key> is a numeric index from 1 to N `browser.web_vital.cls.source.<key>`\n *\n * Attribute Value Type: `string` {@link BROWSER_WEB_VITAL_CLS_SOURCE_KEY_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Has Dynamic Suffix: true\n *\n * Aliases: {@link CLS_SOURCE_KEY} `cls.source.<key>`\n *\n * @example \"body > div#app\"\n */\nexport const BROWSER_WEB_VITAL_CLS_SOURCE_KEY = 'browser.web_vital.cls.source.<key>';\n\n/**\n * Base key for {@link BROWSER_WEB_VITAL_CLS_SOURCE_KEY}. Use with a dynamic suffix, e.g. `${BROWSER_WEB_VITAL_CLS_SOURCE_KEY_BASE}.${key}`.\n */\nexport const BROWSER_WEB_VITAL_CLS_SOURCE_KEY_BASE = 'browser.web_vital.cls.source';\n\n/**\n * Type for {@link BROWSER_WEB_VITAL_CLS_SOURCE_KEY} browser.web_vital.cls.source.<key>\n */\nexport type BROWSER_WEB_VITAL_CLS_SOURCE_KEY_TYPE = string;\n\n// Path: model/attributes/browser/browser__web_vital__cls__value.json\n\n/**\n * The value of the recorded Cumulative Layout Shift (CLS) web vital `browser.web_vital.cls.value`\n *\n * Attribute Value Type: `number` {@link BROWSER_WEB_VITAL_CLS_VALUE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link CLS} `cls`\n *\n * @example 0.2361\n */\nexport const BROWSER_WEB_VITAL_CLS_VALUE = 'browser.web_vital.cls.value';\n\n/**\n * Type for {@link BROWSER_WEB_VITAL_CLS_VALUE} browser.web_vital.cls.value\n */\nexport type BROWSER_WEB_VITAL_CLS_VALUE_TYPE = number;\n\n// Path: model/attributes/browser/browser__web_vital__fcp__value.json\n\n/**\n * The time it takes for the browser to render the first piece of meaningful content on the screen `browser.web_vital.fcp.value`\n *\n * Attribute Value Type: `number` {@link BROWSER_WEB_VITAL_FCP_VALUE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link FCP} `fcp`\n *\n * @example 547.6951\n */\nexport const BROWSER_WEB_VITAL_FCP_VALUE = 'browser.web_vital.fcp.value';\n\n/**\n * Type for {@link BROWSER_WEB_VITAL_FCP_VALUE} browser.web_vital.fcp.value\n */\nexport type BROWSER_WEB_VITAL_FCP_VALUE_TYPE = number;\n\n// Path: model/attributes/browser/browser__web_vital__fp__value.json\n\n/**\n * The time in milliseconds it takes for the browser to render the first pixel on the screen `browser.web_vital.fp.value`\n *\n * Attribute Value Type: `number` {@link BROWSER_WEB_VITAL_FP_VALUE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link FP} `fp`\n *\n * @example 477.1926\n */\nexport const BROWSER_WEB_VITAL_FP_VALUE = 'browser.web_vital.fp.value';\n\n/**\n * Type for {@link BROWSER_WEB_VITAL_FP_VALUE} browser.web_vital.fp.value\n */\nexport type BROWSER_WEB_VITAL_FP_VALUE_TYPE = number;\n\n// Path: model/attributes/browser/browser__web_vital__inp__value.json\n\n/**\n * The value of the recorded Interaction to Next Paint (INP) web vital `browser.web_vital.inp.value`\n *\n * Attribute Value Type: `number` {@link BROWSER_WEB_VITAL_INP_VALUE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link INP} `inp`\n *\n * @example 200\n */\nexport const BROWSER_WEB_VITAL_INP_VALUE = 'browser.web_vital.inp.value';\n\n/**\n * Type for {@link BROWSER_WEB_VITAL_INP_VALUE} browser.web_vital.inp.value\n */\nexport type BROWSER_WEB_VITAL_INP_VALUE_TYPE = number;\n\n// Path: model/attributes/browser/browser__web_vital__lcp__element.json\n\n/**\n * The HTML element selector or component name for which LCP was reported `browser.web_vital.lcp.element`\n *\n * Attribute Value Type: `string` {@link BROWSER_WEB_VITAL_LCP_ELEMENT_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link LCP_ELEMENT} `lcp.element`\n *\n * @example \"body > div#app > div#container > div\"\n */\nexport const BROWSER_WEB_VITAL_LCP_ELEMENT = 'browser.web_vital.lcp.element';\n\n/**\n * Type for {@link BROWSER_WEB_VITAL_LCP_ELEMENT} browser.web_vital.lcp.element\n */\nexport type BROWSER_WEB_VITAL_LCP_ELEMENT_TYPE = string;\n\n// Path: model/attributes/browser/browser__web_vital__lcp__id.json\n\n/**\n * The id of the dom element responsible for the largest contentful paint `browser.web_vital.lcp.id`\n *\n * Attribute Value Type: `string` {@link BROWSER_WEB_VITAL_LCP_ID_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link LCP_ID} `lcp.id`\n *\n * @example \"#gero\"\n */\nexport const BROWSER_WEB_VITAL_LCP_ID = 'browser.web_vital.lcp.id';\n\n/**\n * Type for {@link BROWSER_WEB_VITAL_LCP_ID} browser.web_vital.lcp.id\n */\nexport type BROWSER_WEB_VITAL_LCP_ID_TYPE = string;\n\n// Path: model/attributes/browser/browser__web_vital__lcp__load_time.json\n\n/**\n * The time it took for the LCP element to be loaded `browser.web_vital.lcp.load_time`\n *\n * Attribute Value Type: `number` {@link BROWSER_WEB_VITAL_LCP_LOAD_TIME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link LCP_LOADTIME} `lcp.loadTime`\n *\n * @example 1402\n */\nexport const BROWSER_WEB_VITAL_LCP_LOAD_TIME = 'browser.web_vital.lcp.load_time';\n\n/**\n * Type for {@link BROWSER_WEB_VITAL_LCP_LOAD_TIME} browser.web_vital.lcp.load_time\n */\nexport type BROWSER_WEB_VITAL_LCP_LOAD_TIME_TYPE = number;\n\n// Path: model/attributes/browser/browser__web_vital__lcp__render_time.json\n\n/**\n * The time it took for the LCP element to be rendered `browser.web_vital.lcp.render_time`\n *\n * Attribute Value Type: `number` {@link BROWSER_WEB_VITAL_LCP_RENDER_TIME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link LCP_RENDERTIME} `lcp.renderTime`\n *\n * @example 1685\n */\nexport const BROWSER_WEB_VITAL_LCP_RENDER_TIME = 'browser.web_vital.lcp.render_time';\n\n/**\n * Type for {@link BROWSER_WEB_VITAL_LCP_RENDER_TIME} browser.web_vital.lcp.render_time\n */\nexport type BROWSER_WEB_VITAL_LCP_RENDER_TIME_TYPE = number;\n\n// Path: model/attributes/browser/browser__web_vital__lcp__report_event.json\n\n/**\n * The event that caused the SDK to report LCP (pagehide or navigation) `browser.web_vital.lcp.report_event`\n *\n * Attribute Value Type: `string` {@link BROWSER_WEB_VITAL_LCP_REPORT_EVENT_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"pagehide\"\n */\nexport const BROWSER_WEB_VITAL_LCP_REPORT_EVENT = 'browser.web_vital.lcp.report_event';\n\n/**\n * Type for {@link BROWSER_WEB_VITAL_LCP_REPORT_EVENT} browser.web_vital.lcp.report_event\n */\nexport type BROWSER_WEB_VITAL_LCP_REPORT_EVENT_TYPE = string;\n\n// Path: model/attributes/browser/browser__web_vital__lcp__size.json\n\n/**\n * The size of the largest contentful paint element `browser.web_vital.lcp.size`\n *\n * Attribute Value Type: `number` {@link BROWSER_WEB_VITAL_LCP_SIZE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link LCP_SIZE} `lcp.size`\n *\n * @example 1024\n */\nexport const BROWSER_WEB_VITAL_LCP_SIZE = 'browser.web_vital.lcp.size';\n\n/**\n * Type for {@link BROWSER_WEB_VITAL_LCP_SIZE} browser.web_vital.lcp.size\n */\nexport type BROWSER_WEB_VITAL_LCP_SIZE_TYPE = number;\n\n// Path: model/attributes/browser/browser__web_vital__lcp__url.json\n\n/**\n * The url of the dom element responsible for the largest contentful paint `browser.web_vital.lcp.url`\n *\n * Attribute Value Type: `string` {@link BROWSER_WEB_VITAL_LCP_URL_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link LCP_URL} `lcp.url`\n *\n * @example \"https://example.com/static/img.png\"\n */\nexport const BROWSER_WEB_VITAL_LCP_URL = 'browser.web_vital.lcp.url';\n\n/**\n * Type for {@link BROWSER_WEB_VITAL_LCP_URL} browser.web_vital.lcp.url\n */\nexport type BROWSER_WEB_VITAL_LCP_URL_TYPE = string;\n\n// Path: model/attributes/browser/browser__web_vital__lcp__value.json\n\n/**\n * The value of the recorded Largest Contentful Paint (LCP) web vital `browser.web_vital.lcp.value`\n *\n * Attribute Value Type: `number` {@link BROWSER_WEB_VITAL_LCP_VALUE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link LCP} `lcp`\n *\n * @example 2500\n */\nexport const BROWSER_WEB_VITAL_LCP_VALUE = 'browser.web_vital.lcp.value';\n\n/**\n * Type for {@link BROWSER_WEB_VITAL_LCP_VALUE} browser.web_vital.lcp.value\n */\nexport type BROWSER_WEB_VITAL_LCP_VALUE_TYPE = number;\n\n// Path: model/attributes/browser/browser__web_vital__ttfb__request_time.json\n\n/**\n * The time it takes for the server to process the initial request and send the first byte of a response to the user's browser `browser.web_vital.ttfb.request_time`\n *\n * Attribute Value Type: `number` {@link BROWSER_WEB_VITAL_TTFB_REQUEST_TIME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link TTFB_REQUESTTIME} `ttfb.requestTime`\n *\n * @example 1554.5814\n */\nexport const BROWSER_WEB_VITAL_TTFB_REQUEST_TIME = 'browser.web_vital.ttfb.request_time';\n\n/**\n * Type for {@link BROWSER_WEB_VITAL_TTFB_REQUEST_TIME} browser.web_vital.ttfb.request_time\n */\nexport type BROWSER_WEB_VITAL_TTFB_REQUEST_TIME_TYPE = number;\n\n// Path: model/attributes/browser/browser__web_vital__ttfb__value.json\n\n/**\n * The value of the recorded Time To First Byte (TTFB) web vital in Milliseconds `browser.web_vital.ttfb.value`\n *\n * Attribute Value Type: `number` {@link BROWSER_WEB_VITAL_TTFB_VALUE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link TTFB} `ttfb`\n *\n * @example 194.3322\n */\nexport const BROWSER_WEB_VITAL_TTFB_VALUE = 'browser.web_vital.ttfb.value';\n\n/**\n * Type for {@link BROWSER_WEB_VITAL_TTFB_VALUE} browser.web_vital.ttfb.value\n */\nexport type BROWSER_WEB_VITAL_TTFB_VALUE_TYPE = number;\n\n// Path: model/attributes/cache/cache__hit.json\n\n/**\n * If the cache was hit during this span. `cache.hit`\n *\n * Attribute Value Type: `boolean` {@link CACHE_HIT_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example true\n */\nexport const CACHE_HIT = 'cache.hit';\n\n/**\n * Type for {@link CACHE_HIT} cache.hit\n */\nexport type CACHE_HIT_TYPE = boolean;\n\n// Path: model/attributes/cache/cache__item_size.json\n\n/**\n * The size of the requested item in the cache. In bytes. `cache.item_size`\n *\n * Attribute Value Type: `number` {@link CACHE_ITEM_SIZE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 58\n */\nexport const CACHE_ITEM_SIZE = 'cache.item_size';\n\n/**\n * Type for {@link CACHE_ITEM_SIZE} cache.item_size\n */\nexport type CACHE_ITEM_SIZE_TYPE = number;\n\n// Path: model/attributes/cache/cache__key.json\n\n/**\n * The key of the cache accessed. `cache.key`\n *\n * Attribute Value Type: `Array<string>` {@link CACHE_KEY_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example [\"my-cache-key\",\"my-other-cache-key\"]\n */\nexport const CACHE_KEY = 'cache.key';\n\n/**\n * Type for {@link CACHE_KEY} cache.key\n */\nexport type CACHE_KEY_TYPE = Array<string>;\n\n// Path: model/attributes/cache/cache__operation.json\n\n/**\n * The operation being performed on the cache. `cache.operation`\n *\n * Attribute Value Type: `string` {@link CACHE_OPERATION_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"get\"\n */\nexport const CACHE_OPERATION = 'cache.operation';\n\n/**\n * Type for {@link CACHE_OPERATION} cache.operation\n */\nexport type CACHE_OPERATION_TYPE = string;\n\n// Path: model/attributes/cache/cache__ttl.json\n\n/**\n * The ttl of the cache in seconds `cache.ttl`\n *\n * Attribute Value Type: `number` {@link CACHE_TTL_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 120\n */\nexport const CACHE_TTL = 'cache.ttl';\n\n/**\n * Type for {@link CACHE_TTL} cache.ttl\n */\nexport type CACHE_TTL_TYPE = number;\n\n// Path: model/attributes/cache/cache__write.json\n\n/**\n * If the cache operation resulted in a write to the cache. `cache.write`\n *\n * Attribute Value Type: `boolean` {@link CACHE_WRITE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example true\n */\nexport const CACHE_WRITE = 'cache.write';\n\n/**\n * Type for {@link CACHE_WRITE} cache.write\n */\nexport type CACHE_WRITE_TYPE = boolean;\n\n// Path: model/attributes/channel.json\n\n/**\n * The channel name that is being used. `channel`\n *\n * Attribute Value Type: `string` {@link CHANNEL_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"mail\"\n */\nexport const CHANNEL = 'channel';\n\n/**\n * Type for {@link CHANNEL} channel\n */\nexport type CHANNEL_TYPE = string;\n\n// Path: model/attributes/client/client__address.json\n\n/**\n * Client address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. `client.address`\n *\n * Attribute Value Type: `string` {@link CLIENT_ADDRESS_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link HTTP_CLIENT_IP} `http.client_ip`\n *\n * @example \"example.com\"\n */\nexport const CLIENT_ADDRESS = 'client.address';\n\n/**\n * Type for {@link CLIENT_ADDRESS} client.address\n */\nexport type CLIENT_ADDRESS_TYPE = string;\n\n// Path: model/attributes/client/client__port.json\n\n/**\n * Client port number. `client.port`\n *\n * Attribute Value Type: `number` {@link CLIENT_PORT_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example 5432\n */\nexport const CLIENT_PORT = 'client.port';\n\n/**\n * Type for {@link CLIENT_PORT} client.port\n */\nexport type CLIENT_PORT_TYPE = number;\n\n// Path: model/attributes/cloudflare/cloudflare__d1__duration.json\n\n/**\n * The duration of a Cloudflare D1 operation. `cloudflare.d1.duration`\n *\n * Attribute Value Type: `number` {@link CLOUDFLARE_D1_DURATION_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 543\n */\nexport const CLOUDFLARE_D1_DURATION = 'cloudflare.d1.duration';\n\n/**\n * Type for {@link CLOUDFLARE_D1_DURATION} cloudflare.d1.duration\n */\nexport type CLOUDFLARE_D1_DURATION_TYPE = number;\n\n// Path: model/attributes/cloudflare/cloudflare__d1__query_type.json\n\n/**\n * The type of query executed in a Cloudflare D1 operation `cloudflare.d1.query_type`\n *\n * Attribute Value Type: `string` {@link CLOUDFLARE_D1_QUERY_TYPE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link DB_OPERATION_NAME} `db.operation.name`, {@link DB_OPERATION} `db.operation`\n *\n * @deprecated Use {@link DB_OPERATION_NAME} (db.operation.name) instead\n * @example \"run\"\n */\nexport const CLOUDFLARE_D1_QUERY_TYPE = 'cloudflare.d1.query_type';\n\n/**\n * Type for {@link CLOUDFLARE_D1_QUERY_TYPE} cloudflare.d1.query_type\n */\nexport type CLOUDFLARE_D1_QUERY_TYPE_TYPE = string;\n\n// Path: model/attributes/cloudflare/cloudflare__d1__rows_read.json\n\n/**\n * The number of rows read in a Cloudflare D1 operation. `cloudflare.d1.rows_read`\n *\n * Attribute Value Type: `number` {@link CLOUDFLARE_D1_ROWS_READ_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 12\n */\nexport const CLOUDFLARE_D1_ROWS_READ = 'cloudflare.d1.rows_read';\n\n/**\n * Type for {@link CLOUDFLARE_D1_ROWS_READ} cloudflare.d1.rows_read\n */\nexport type CLOUDFLARE_D1_ROWS_READ_TYPE = number;\n\n// Path: model/attributes/cloudflare/cloudflare__d1__rows_written.json\n\n/**\n * The number of rows written in a Cloudflare D1 operation. `cloudflare.d1.rows_written`\n *\n * Attribute Value Type: `number` {@link CLOUDFLARE_D1_ROWS_WRITTEN_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 12\n */\nexport const CLOUDFLARE_D1_ROWS_WRITTEN = 'cloudflare.d1.rows_written';\n\n/**\n * Type for {@link CLOUDFLARE_D1_ROWS_WRITTEN} cloudflare.d1.rows_written\n */\nexport type CLOUDFLARE_D1_ROWS_WRITTEN_TYPE = number;\n\n// Path: model/attributes/cloudflare/cloudflare__durable_object__query__bindings.json\n\n/**\n * The number of bound parameters passed to the SQL exec call. `cloudflare.durable_object.query.bindings`\n *\n * Attribute Value Type: `number` {@link CLOUDFLARE_DURABLE_OBJECT_QUERY_BINDINGS_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 2\n */\nexport const CLOUDFLARE_DURABLE_OBJECT_QUERY_BINDINGS = 'cloudflare.durable_object.query.bindings';\n\n/**\n * Type for {@link CLOUDFLARE_DURABLE_OBJECT_QUERY_BINDINGS} cloudflare.durable_object.query.bindings\n */\nexport type CLOUDFLARE_DURABLE_OBJECT_QUERY_BINDINGS_TYPE = number;\n\n// Path: model/attributes/cloudflare/cloudflare__durable_object__response__rows_read.json\n\n/**\n * The number of rows read by a Cloudflare Durable Object SQL operation. `cloudflare.durable_object.response.rows_read`\n *\n * Attribute Value Type: `number` {@link CLOUDFLARE_DURABLE_OBJECT_RESPONSE_ROWS_READ_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 12\n */\nexport const CLOUDFLARE_DURABLE_OBJECT_RESPONSE_ROWS_READ = 'cloudflare.durable_object.response.rows_read';\n\n/**\n * Type for {@link CLOUDFLARE_DURABLE_OBJECT_RESPONSE_ROWS_READ} cloudflare.durable_object.response.rows_read\n */\nexport type CLOUDFLARE_DURABLE_OBJECT_RESPONSE_ROWS_READ_TYPE = number;\n\n// Path: model/attributes/cloudflare/cloudflare__durable_object__response__rows_written.json\n\n/**\n * The number of rows written by a Cloudflare Durable Object SQL operation. `cloudflare.durable_object.response.rows_written`\n *\n * Attribute Value Type: `number` {@link CLOUDFLARE_DURABLE_OBJECT_RESPONSE_ROWS_WRITTEN_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 1\n */\nexport const CLOUDFLARE_DURABLE_OBJECT_RESPONSE_ROWS_WRITTEN = 'cloudflare.durable_object.response.rows_written';\n\n/**\n * Type for {@link CLOUDFLARE_DURABLE_OBJECT_RESPONSE_ROWS_WRITTEN} cloudflare.durable_object.response.rows_written\n */\nexport type CLOUDFLARE_DURABLE_OBJECT_RESPONSE_ROWS_WRITTEN_TYPE = number;\n\n// Path: model/attributes/cloudflare/cloudflare__r2__bucket.json\n\n/**\n * The name of the Cloudflare R2 bucket binding `cloudflare.r2.bucket`\n *\n * Attribute Value Type: `string` {@link CLOUDFLARE_R2_BUCKET_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"MY_BUCKET\"\n */\nexport const CLOUDFLARE_R2_BUCKET = 'cloudflare.r2.bucket';\n\n/**\n * Type for {@link CLOUDFLARE_R2_BUCKET} cloudflare.r2.bucket\n */\nexport type CLOUDFLARE_R2_BUCKET_TYPE = string;\n\n// Path: model/attributes/cloudflare/cloudflare__r2__operation.json\n\n/**\n * The R2 API operation being performed `cloudflare.r2.operation`\n *\n * Attribute Value Type: `string` {@link CLOUDFLARE_R2_OPERATION_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"GetObject\"\n */\nexport const CLOUDFLARE_R2_OPERATION = 'cloudflare.r2.operation';\n\n/**\n * Type for {@link CLOUDFLARE_R2_OPERATION} cloudflare.r2.operation\n */\nexport type CLOUDFLARE_R2_OPERATION_TYPE = string;\n\n// Path: model/attributes/cloudflare/cloudflare__r2__request__delimiter.json\n\n/**\n * The delimiter used to group objects in an R2 list operation `cloudflare.r2.request.delimiter`\n *\n * Attribute Value Type: `string` {@link CLOUDFLARE_R2_REQUEST_DELIMITER_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"/\"\n */\nexport const CLOUDFLARE_R2_REQUEST_DELIMITER = 'cloudflare.r2.request.delimiter';\n\n/**\n * Type for {@link CLOUDFLARE_R2_REQUEST_DELIMITER} cloudflare.r2.request.delimiter\n */\nexport type CLOUDFLARE_R2_REQUEST_DELIMITER_TYPE = string;\n\n// Path: model/attributes/cloudflare/cloudflare__r2__request__key.json\n\n/**\n * The object key used in the R2 operation `cloudflare.r2.request.key`\n *\n * Attribute Value Type: `string` {@link CLOUDFLARE_R2_REQUEST_KEY_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"my-file.txt\"\n */\nexport const CLOUDFLARE_R2_REQUEST_KEY = 'cloudflare.r2.request.key';\n\n/**\n * Type for {@link CLOUDFLARE_R2_REQUEST_KEY} cloudflare.r2.request.key\n */\nexport type CLOUDFLARE_R2_REQUEST_KEY_TYPE = string;\n\n// Path: model/attributes/cloudflare/cloudflare__r2__request__part_number.json\n\n/**\n * The part number in a multipart upload operation `cloudflare.r2.request.part_number`\n *\n * Attribute Value Type: `number` {@link CLOUDFLARE_R2_REQUEST_PART_NUMBER_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 1\n */\nexport const CLOUDFLARE_R2_REQUEST_PART_NUMBER = 'cloudflare.r2.request.part_number';\n\n/**\n * Type for {@link CLOUDFLARE_R2_REQUEST_PART_NUMBER} cloudflare.r2.request.part_number\n */\nexport type CLOUDFLARE_R2_REQUEST_PART_NUMBER_TYPE = number;\n\n// Path: model/attributes/cloudflare/cloudflare__r2__request__prefix.json\n\n/**\n * The prefix used to filter objects in an R2 list operation `cloudflare.r2.request.prefix`\n *\n * Attribute Value Type: `string` {@link CLOUDFLARE_R2_REQUEST_PREFIX_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"images/\"\n */\nexport const CLOUDFLARE_R2_REQUEST_PREFIX = 'cloudflare.r2.request.prefix';\n\n/**\n * Type for {@link CLOUDFLARE_R2_REQUEST_PREFIX} cloudflare.r2.request.prefix\n */\nexport type CLOUDFLARE_R2_REQUEST_PREFIX_TYPE = string;\n\n// Path: model/attributes/cloudflare/cloudflare__workflow__attempt.json\n\n/**\n * The current attempt number for a Cloudflare Workflow step `cloudflare.workflow.attempt`\n *\n * Attribute Value Type: `number` {@link CLOUDFLARE_WORKFLOW_ATTEMPT_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 1\n */\nexport const CLOUDFLARE_WORKFLOW_ATTEMPT = 'cloudflare.workflow.attempt';\n\n/**\n * Type for {@link CLOUDFLARE_WORKFLOW_ATTEMPT} cloudflare.workflow.attempt\n */\nexport type CLOUDFLARE_WORKFLOW_ATTEMPT_TYPE = number;\n\n// Path: model/attributes/cloudflare/cloudflare__workflow__retries__backoff.json\n\n/**\n * The backoff strategy for Cloudflare Workflow step retries `cloudflare.workflow.retries.backoff`\n *\n * Attribute Value Type: `string` {@link CLOUDFLARE_WORKFLOW_RETRIES_BACKOFF_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"exponential\"\n */\nexport const CLOUDFLARE_WORKFLOW_RETRIES_BACKOFF = 'cloudflare.workflow.retries.backoff';\n\n/**\n * Type for {@link CLOUDFLARE_WORKFLOW_RETRIES_BACKOFF} cloudflare.workflow.retries.backoff\n */\nexport type CLOUDFLARE_WORKFLOW_RETRIES_BACKOFF_TYPE = string;\n\n// Path: model/attributes/cloudflare/cloudflare__workflow__retries__delay.json\n\n/**\n * The delay between Cloudflare Workflow step retries `cloudflare.workflow.retries.delay`\n *\n * Attribute Value Type: `string` {@link CLOUDFLARE_WORKFLOW_RETRIES_DELAY_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"5 seconds\"\n */\nexport const CLOUDFLARE_WORKFLOW_RETRIES_DELAY = 'cloudflare.workflow.retries.delay';\n\n/**\n * Type for {@link CLOUDFLARE_WORKFLOW_RETRIES_DELAY} cloudflare.workflow.retries.delay\n */\nexport type CLOUDFLARE_WORKFLOW_RETRIES_DELAY_TYPE = string;\n\n// Path: model/attributes/cloudflare/cloudflare__workflow__retries__limit.json\n\n/**\n * The maximum number of retries for a Cloudflare Workflow step `cloudflare.workflow.retries.limit`\n *\n * Attribute Value Type: `number` {@link CLOUDFLARE_WORKFLOW_RETRIES_LIMIT_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 3\n */\nexport const CLOUDFLARE_WORKFLOW_RETRIES_LIMIT = 'cloudflare.workflow.retries.limit';\n\n/**\n * Type for {@link CLOUDFLARE_WORKFLOW_RETRIES_LIMIT} cloudflare.workflow.retries.limit\n */\nexport type CLOUDFLARE_WORKFLOW_RETRIES_LIMIT_TYPE = number;\n\n// Path: model/attributes/cloudflare/cloudflare__workflow__timeout.json\n\n/**\n * The timeout duration for a Cloudflare Workflow step `cloudflare.workflow.timeout`\n *\n * Attribute Value Type: `string` {@link CLOUDFLARE_WORKFLOW_TIMEOUT_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"1 minute\"\n */\nexport const CLOUDFLARE_WORKFLOW_TIMEOUT = 'cloudflare.workflow.timeout';\n\n/**\n * Type for {@link CLOUDFLARE_WORKFLOW_TIMEOUT} cloudflare.workflow.timeout\n */\nexport type CLOUDFLARE_WORKFLOW_TIMEOUT_TYPE = string;\n\n// Path: model/attributes/cloud/cloud__account__id.json\n\n/**\n * The cloud account ID the resource is assigned to `cloud.account.id`\n *\n * Attribute Value Type: `string` {@link CLOUD_ACCOUNT_ID_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"123456789012\"\n */\nexport const CLOUD_ACCOUNT_ID = 'cloud.account.id';\n\n/**\n * Type for {@link CLOUD_ACCOUNT_ID} cloud.account.id\n */\nexport type CLOUD_ACCOUNT_ID_TYPE = string;\n\n// Path: model/attributes/cloud/cloud__availability_zone.json\n\n/**\n * Cloud regions often have multiple, isolated locations known as zones to increase availability `cloud.availability_zone`\n *\n * Attribute Value Type: `string` {@link CLOUD_AVAILABILITY_ZONE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"us-east-1c\"\n */\nexport const CLOUD_AVAILABILITY_ZONE = 'cloud.availability_zone';\n\n/**\n * Type for {@link CLOUD_AVAILABILITY_ZONE} cloud.availability_zone\n */\nexport type CLOUD_AVAILABILITY_ZONE_TYPE = string;\n\n// Path: model/attributes/cloud/cloud__platform.json\n\n/**\n * The cloud platform in use `cloud.platform`\n *\n * Attribute Value Type: `string` {@link CLOUD_PLATFORM_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"aws_lambda\"\n */\nexport const CLOUD_PLATFORM = 'cloud.platform';\n\n/**\n * Type for {@link CLOUD_PLATFORM} cloud.platform\n */\nexport type CLOUD_PLATFORM_TYPE = string;\n\n// Path: model/attributes/cloud/cloud__provider.json\n\n/**\n * Name of the cloud provider `cloud.provider`\n *\n * Attribute Value Type: `string` {@link CLOUD_PROVIDER_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"aws\"\n */\nexport const CLOUD_PROVIDER = 'cloud.provider';\n\n/**\n * Type for {@link CLOUD_PROVIDER} cloud.provider\n */\nexport type CLOUD_PROVIDER_TYPE = string;\n\n// Path: model/attributes/cloud/cloud__region.json\n\n/**\n * The geographical region the resource is running `cloud.region`\n *\n * Attribute Value Type: `string` {@link CLOUD_REGION_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"us-east-1\"\n */\nexport const CLOUD_REGION = 'cloud.region';\n\n/**\n * Type for {@link CLOUD_REGION} cloud.region\n */\nexport type CLOUD_REGION_TYPE = string;\n\n// Path: model/attributes/cloud/cloud__resource_id.json\n\n/**\n * Cloud provider-specific native identifier of the monitored cloud resource `cloud.resource_id`\n *\n * Attribute Value Type: `string` {@link CLOUD_RESOURCE_ID_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link FAAS_ID} `faas.id`\n *\n * @example \"arn:aws:lambda:REGION:ACCOUNT_ID:function:my-function\"\n */\nexport const CLOUD_RESOURCE_ID = 'cloud.resource_id';\n\n/**\n * Type for {@link CLOUD_RESOURCE_ID} cloud.resource_id\n */\nexport type CLOUD_RESOURCE_ID_TYPE = string;\n\n// Path: model/attributes/cls.json\n\n/**\n * The value of the recorded Cumulative Layout Shift (CLS) web vital `cls`\n *\n * Attribute Value Type: `number` {@link CLS_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link BROWSER_WEB_VITAL_CLS_VALUE} `browser.web_vital.cls.value`\n *\n * @deprecated Use {@link BROWSER_WEB_VITAL_CLS_VALUE} (browser.web_vital.cls.value) instead - The CLS web vital is now recorded as a browser.web_vital.cls.value attribute.\n * @example 0.2361\n */\nexport const CLS = 'cls';\n\n/**\n * Type for {@link CLS} cls\n */\nexport type CLS_TYPE = number;\n\n// Path: model/attributes/cls/cls__source__[key].json\n\n/**\n * The HTML elements or components responsible for the layout shift. <key> is a numeric index from 1 to N `cls.source.<key>`\n *\n * Attribute Value Type: `string` {@link CLS_SOURCE_KEY_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Has Dynamic Suffix: true\n *\n * Aliases: {@link BROWSER_WEB_VITAL_CLS_SOURCE_KEY} `browser.web_vital.cls.source.<key>`\n *\n * @deprecated Use {@link BROWSER_WEB_VITAL_CLS_SOURCE_KEY} (browser.web_vital.cls.source.<key>) instead - The CLS source is now recorded as a browser.web_vital.cls.source.<key> attribute.\n * @example \"body > div#app\"\n */\nexport const CLS_SOURCE_KEY = 'cls.source.<key>';\n\n/**\n * Base key for {@link CLS_SOURCE_KEY}. Use with a dynamic suffix, e.g. `${CLS_SOURCE_KEY_BASE}.${key}`.\n *\n * @deprecated Use {@link BROWSER_WEB_VITAL_CLS_SOURCE_KEY_BASE} (browser.web_vital.cls.source) instead - The CLS source is now recorded as a browser.web_vital.cls.source.<key> attribute.\n */\nexport const CLS_SOURCE_KEY_BASE = 'cls.source';\n\n/**\n * Type for {@link CLS_SOURCE_KEY} cls.source.<key>\n */\nexport type CLS_SOURCE_KEY_TYPE = string;\n\n// Path: model/attributes/code/code__filepath.json\n\n/**\n * The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path). `code.filepath`\n *\n * Attribute Value Type: `string` {@link CODE_FILEPATH_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link CODE_FILE_PATH} `code.file.path`\n *\n * @deprecated Use {@link CODE_FILE_PATH} (code.file.path) instead\n * @example \"/app/myapplication/http/handler/server.py\"\n */\nexport const CODE_FILEPATH = 'code.filepath';\n\n/**\n * Type for {@link CODE_FILEPATH} code.filepath\n */\nexport type CODE_FILEPATH_TYPE = string;\n\n// Path: model/attributes/code/code__file__path.json\n\n/**\n * The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path). `code.file.path`\n *\n * Attribute Value Type: `string` {@link CODE_FILE_PATH_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link CODE_FILEPATH} `code.filepath`\n *\n * @example \"/app/myapplication/http/handler/server.py\"\n */\nexport const CODE_FILE_PATH = 'code.file.path';\n\n/**\n * Type for {@link CODE_FILE_PATH} code.file.path\n */\nexport type CODE_FILE_PATH_TYPE = string;\n\n// Path: model/attributes/code/code__function.json\n\n/**\n * The method or function name, or equivalent (usually rightmost part of the code unit's name). `code.function`\n *\n * Attribute Value Type: `string` {@link CODE_FUNCTION_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link CODE_FUNCTION_NAME} `code.function.name`\n *\n * @example \"server_request\"\n */\nexport const CODE_FUNCTION = 'code.function';\n\n/**\n * Type for {@link CODE_FUNCTION} code.function\n */\nexport type CODE_FUNCTION_TYPE = string;\n\n// Path: model/attributes/code/code__function__name.json\n\n/**\n * The method or function fully-qualified name without arguments. `code.function.name`\n *\n * Attribute Value Type: `string` {@link CODE_FUNCTION_NAME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link CODE_FUNCTION} `code.function`\n *\n * @example \"server_request\"\n */\nexport const CODE_FUNCTION_NAME = 'code.function.name';\n\n/**\n * Type for {@link CODE_FUNCTION_NAME} code.function.name\n */\nexport type CODE_FUNCTION_NAME_TYPE = string;\n\n// Path: model/attributes/code/code__lineno.json\n\n/**\n * The line number in code.filepath best representing the operation. It SHOULD point within the code unit named in code.function `code.lineno`\n *\n * Attribute Value Type: `number` {@link CODE_LINENO_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link CODE_LINE_NUMBER} `code.line.number`\n *\n * @deprecated Use {@link CODE_LINE_NUMBER} (code.line.number) instead\n * @example 42\n */\nexport const CODE_LINENO = 'code.lineno';\n\n/**\n * Type for {@link CODE_LINENO} code.lineno\n */\nexport type CODE_LINENO_TYPE = number;\n\n// Path: model/attributes/code/code__line__number.json\n\n/**\n * The line number in code.filepath best representing the operation. It SHOULD point within the code unit named in code.function `code.line.number`\n *\n * Attribute Value Type: `number` {@link CODE_LINE_NUMBER_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link CODE_LINENO} `code.lineno`\n *\n * @example 42\n */\nexport const CODE_LINE_NUMBER = 'code.line.number';\n\n/**\n * Type for {@link CODE_LINE_NUMBER} code.line.number\n */\nexport type CODE_LINE_NUMBER_TYPE = number;\n\n// Path: model/attributes/code/code__namespace.json\n\n/**\n * The 'namespace' within which code.function is defined. Usually the qualified class or module name, such that code.namespace + some separator + code.function form a unique identifier for the code unit. `code.namespace`\n *\n * Attribute Value Type: `string` {@link CODE_NAMESPACE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"http.handler\"\n */\nexport const CODE_NAMESPACE = 'code.namespace';\n\n/**\n * Type for {@link CODE_NAMESPACE} code.namespace\n */\nexport type CODE_NAMESPACE_TYPE = string;\n\n// Path: model/attributes/connectionType.json\n\n/**\n * Specifies the type of the current connection (e.g. wifi, ethernet, cellular , etc). `connectionType`\n *\n * Attribute Value Type: `string` {@link CONNECTIONTYPE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link NETWORK_CONNECTION_TYPE} `network.connection.type`, {@link DEVICE_CONNECTION_TYPE} `device.connection_type`\n *\n * @deprecated Use {@link NETWORK_CONNECTION_TYPE} (network.connection.type) instead - Old namespace-less attribute, to be replaced with network.connection.type for span-first future\n * @example \"wifi\"\n */\nexport const CONNECTIONTYPE = 'connectionType';\n\n/**\n * Type for {@link CONNECTIONTYPE} connectionType\n */\nexport type CONNECTIONTYPE_TYPE = string;\n\n// Path: model/attributes/connection/connection__rtt.json\n\n/**\n * Specifies the estimated effective round-trip time of the current connection, in milliseconds. `connection.rtt`\n *\n * Attribute Value Type: `number` {@link CONNECTION_RTT_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link NETWORK_CONNECTION_RTT} `network.connection.rtt`\n *\n * @deprecated Use {@link NETWORK_CONNECTION_RTT} (network.connection.rtt) instead - Old attribute name (no official namespace), to be replaced with network.connection.rtt for span-first future\n * @example 100\n */\nexport const CONNECTION_RTT = 'connection.rtt';\n\n/**\n * Type for {@link CONNECTION_RTT} connection.rtt\n */\nexport type CONNECTION_RTT_TYPE = number;\n\n// Path: model/attributes/culture/culture__calendar.json\n\n/**\n * The calendar system used by the culture. `culture.calendar`\n *\n * Attribute Value Type: `string` {@link CULTURE_CALENDAR_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"GregorianCalendar\"\n */\nexport const CULTURE_CALENDAR = 'culture.calendar';\n\n/**\n * Type for {@link CULTURE_CALENDAR} culture.calendar\n */\nexport type CULTURE_CALENDAR_TYPE = string;\n\n// Path: model/attributes/culture/culture__display_name.json\n\n/**\n * Human readable name of the culture. `culture.display_name`\n *\n * Attribute Value Type: `string` {@link CULTURE_DISPLAY_NAME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"English (United States)\"\n */\nexport const CULTURE_DISPLAY_NAME = 'culture.display_name';\n\n/**\n * Type for {@link CULTURE_DISPLAY_NAME} culture.display_name\n */\nexport type CULTURE_DISPLAY_NAME_TYPE = string;\n\n// Path: model/attributes/culture/culture__is_24_hour_format.json\n\n/**\n * Whether the culture uses 24-hour time format. `culture.is_24_hour_format`\n *\n * Attribute Value Type: `boolean` {@link CULTURE_IS_24_HOUR_FORMAT_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example true\n */\nexport const CULTURE_IS_24_HOUR_FORMAT = 'culture.is_24_hour_format';\n\n/**\n * Type for {@link CULTURE_IS_24_HOUR_FORMAT} culture.is_24_hour_format\n */\nexport type CULTURE_IS_24_HOUR_FORMAT_TYPE = boolean;\n\n// Path: model/attributes/culture/culture__locale.json\n\n/**\n * The locale identifier following RFC 4646. `culture.locale`\n *\n * Attribute Value Type: `string` {@link CULTURE_LOCALE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"en-US\"\n */\nexport const CULTURE_LOCALE = 'culture.locale';\n\n/**\n * Type for {@link CULTURE_LOCALE} culture.locale\n */\nexport type CULTURE_LOCALE_TYPE = string;\n\n// Path: model/attributes/culture/culture__timezone.json\n\n/**\n * The timezone of the culture, as a geographic timezone identifier. `culture.timezone`\n *\n * Attribute Value Type: `string` {@link CULTURE_TIMEZONE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"Europe/Vienna\"\n */\nexport const CULTURE_TIMEZONE = 'culture.timezone';\n\n/**\n * Type for {@link CULTURE_TIMEZONE} culture.timezone\n */\nexport type CULTURE_TIMEZONE_TYPE = string;\n\n// Path: model/attributes/db/db__collection__name.json\n\n/**\n * The name of a collection (table, container) within the database. `db.collection.name`\n *\n * Attribute Value Type: `string` {@link DB_COLLECTION_NAME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"users\"\n */\nexport const DB_COLLECTION_NAME = 'db.collection.name';\n\n/**\n * Type for {@link DB_COLLECTION_NAME} db.collection.name\n */\nexport type DB_COLLECTION_NAME_TYPE = string;\n\n// Path: model/attributes/db/db__driver__name.json\n\n/**\n * The name of the driver used for the database connection. `db.driver.name`\n *\n * Attribute Value Type: `string` {@link DB_DRIVER_NAME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"psycopg2\"\n */\nexport const DB_DRIVER_NAME = 'db.driver.name';\n\n/**\n * Type for {@link DB_DRIVER_NAME} db.driver.name\n */\nexport type DB_DRIVER_NAME_TYPE = string;\n\n// Path: model/attributes/db/db__name.json\n\n/**\n * The name of the database being accessed. `db.name`\n *\n * Attribute Value Type: `string` {@link DB_NAME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link DB_NAMESPACE} `db.namespace`\n *\n * @deprecated Use {@link DB_NAMESPACE} (db.namespace) instead\n * @example \"customers\"\n */\nexport const DB_NAME = 'db.name';\n\n/**\n * Type for {@link DB_NAME} db.name\n */\nexport type DB_NAME_TYPE = string;\n\n// Path: model/attributes/db/db__namespace.json\n\n/**\n * The name of the database being accessed. `db.namespace`\n *\n * Attribute Value Type: `string` {@link DB_NAMESPACE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link DB_NAME} `db.name`\n *\n * @example \"customers\"\n */\nexport const DB_NAMESPACE = 'db.namespace';\n\n/**\n * Type for {@link DB_NAMESPACE} db.namespace\n */\nexport type DB_NAMESPACE_TYPE = string;\n\n// Path: model/attributes/db/db__operation.json\n\n/**\n * The name of the operation being executed. `db.operation`\n *\n * Attribute Value Type: `string` {@link DB_OPERATION_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link DB_OPERATION_NAME} `db.operation.name`, {@link CLOUDFLARE_D1_QUERY_TYPE} `cloudflare.d1.query_type`\n *\n * @deprecated Use {@link DB_OPERATION_NAME} (db.operation.name) instead\n * @example \"SELECT\"\n */\nexport const DB_OPERATION = 'db.operation';\n\n/**\n * Type for {@link DB_OPERATION} db.operation\n */\nexport type DB_OPERATION_TYPE = string;\n\n// Path: model/attributes/db/db__operation__batch__size.json\n\n/**\n * The number of queries included in a batch operation. Operations are only considered batches when they contain two or more operations, and so db.operation.batch.size SHOULD never be 1. `db.operation.batch.size`\n *\n * Attribute Value Type: `number` {@link DB_OPERATION_BATCH_SIZE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example 3\n */\nexport const DB_OPERATION_BATCH_SIZE = 'db.operation.batch.size';\n\n/**\n * Type for {@link DB_OPERATION_BATCH_SIZE} db.operation.batch.size\n */\nexport type DB_OPERATION_BATCH_SIZE_TYPE = number;\n\n// Path: model/attributes/db/db__operation__name.json\n\n/**\n * The name of the operation being executed. `db.operation.name`\n *\n * Attribute Value Type: `string` {@link DB_OPERATION_NAME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link DB_OPERATION} `db.operation`, {@link CLOUDFLARE_D1_QUERY_TYPE} `cloudflare.d1.query_type`\n *\n * @example \"SELECT\"\n */\nexport const DB_OPERATION_NAME = 'db.operation.name';\n\n/**\n * Type for {@link DB_OPERATION_NAME} db.operation.name\n */\nexport type DB_OPERATION_NAME_TYPE = string;\n\n// Path: model/attributes/db/db__query__parameter__[key].json\n\n/**\n * A query parameter used in db.query.text, with <key> being the parameter name, and the attribute value being a string representation of the parameter value. `db.query.parameter.<key>`\n *\n * Attribute Value Type: `string` {@link DB_QUERY_PARAMETER_KEY_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Has Dynamic Suffix: true\n *\n * @example \"db.query.parameter.foo='123'\"\n */\nexport const DB_QUERY_PARAMETER_KEY = 'db.query.parameter.<key>';\n\n/**\n * Base key for {@link DB_QUERY_PARAMETER_KEY}. Use with a dynamic suffix, e.g. `${DB_QUERY_PARAMETER_KEY_BASE}.${key}`.\n */\nexport const DB_QUERY_PARAMETER_KEY_BASE = 'db.query.parameter';\n\n/**\n * Type for {@link DB_QUERY_PARAMETER_KEY} db.query.parameter.<key>\n */\nexport type DB_QUERY_PARAMETER_KEY_TYPE = string;\n\n// Path: model/attributes/db/db__query__summary.json\n\n/**\n * A shortened representation of operation(s) in the full query. This attribute must be low-cardinality and should only contain the operation table names. `db.query.summary`\n *\n * Attribute Value Type: `string` {@link DB_QUERY_SUMMARY_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"SELECT users\"\n */\nexport const DB_QUERY_SUMMARY = 'db.query.summary';\n\n/**\n * Type for {@link DB_QUERY_SUMMARY} db.query.summary\n */\nexport type DB_QUERY_SUMMARY_TYPE = string;\n\n// Path: model/attributes/db/db__query__text.json\n\n/**\n * The database parameterized query being executed. Any parameter values (filters, insertion values, etc) should be replaced with parameter placeholders. If applicable, use `db.query.parameter.<key>` to add the parameter value. `db.query.text`\n *\n * Attribute Value Type: `string` {@link DB_QUERY_TEXT_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link DB_STATEMENT} `db.statement`\n *\n * @example \"SELECT * FROM users WHERE id = $1\"\n */\nexport const DB_QUERY_TEXT = 'db.query.text';\n\n/**\n * Type for {@link DB_QUERY_TEXT} db.query.text\n */\nexport type DB_QUERY_TEXT_TYPE = string;\n\n// Path: model/attributes/db/db__redis__connection.json\n\n/**\n * The redis connection name. `db.redis.connection`\n *\n * Attribute Value Type: `string` {@link DB_REDIS_CONNECTION_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"my-redis-instance\"\n */\nexport const DB_REDIS_CONNECTION = 'db.redis.connection';\n\n/**\n * Type for {@link DB_REDIS_CONNECTION} db.redis.connection\n */\nexport type DB_REDIS_CONNECTION_TYPE = string;\n\n// Path: model/attributes/db/db__redis__key.json\n\n/**\n * The key the Redis command is operating on. `db.redis.key`\n *\n * Attribute Value Type: `string` {@link DB_REDIS_KEY_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"user:2047:city\"\n */\nexport const DB_REDIS_KEY = 'db.redis.key';\n\n/**\n * Type for {@link DB_REDIS_KEY} db.redis.key\n */\nexport type DB_REDIS_KEY_TYPE = string;\n\n// Path: model/attributes/db/db__redis__parameters.json\n\n/**\n * The array of command parameters given to a redis command. `db.redis.parameters`\n *\n * Attribute Value Type: `Array<string>` {@link DB_REDIS_PARAMETERS_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example [\"test\",\"*\"]\n */\nexport const DB_REDIS_PARAMETERS = 'db.redis.parameters';\n\n/**\n * Type for {@link DB_REDIS_PARAMETERS} db.redis.parameters\n */\nexport type DB_REDIS_PARAMETERS_TYPE = Array<string>;\n\n// Path: model/attributes/db/db__response__status_code.json\n\n/**\n * Database response status code. The status code returned by the database. Usually it represents an error code, but may also represent partial success, warning, or differentiate between various types of successful outcomes. `db.response.status_code`\n *\n * Attribute Value Type: `string` {@link DB_RESPONSE_STATUS_CODE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"ORA-17002\"\n */\nexport const DB_RESPONSE_STATUS_CODE = 'db.response.status_code';\n\n/**\n * Type for {@link DB_RESPONSE_STATUS_CODE} db.response.status_code\n */\nexport type DB_RESPONSE_STATUS_CODE_TYPE = string;\n\n// Path: model/attributes/db/db__sql__bindings.json\n\n/**\n * The array of query bindings. `db.sql.bindings`\n *\n * Attribute Value Type: `Array<string>` {@link DB_SQL_BINDINGS_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @deprecated Use {@link DB_QUERY_PARAMETER_KEY} (db.query.parameter.<key>) instead - Instead of adding every binding in the db.sql.bindings attribute, add them as individual entires with db.query.parameter.<key>.\n * @example [\"1\",\"foo\"]\n */\nexport const DB_SQL_BINDINGS = 'db.sql.bindings';\n\n/**\n * Type for {@link DB_SQL_BINDINGS} db.sql.bindings\n */\nexport type DB_SQL_BINDINGS_TYPE = Array<string>;\n\n// Path: model/attributes/db/db__statement.json\n\n/**\n * The database statement being executed. `db.statement`\n *\n * Attribute Value Type: `string` {@link DB_STATEMENT_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link DB_QUERY_TEXT} `db.query.text`\n *\n * @deprecated Use {@link DB_QUERY_TEXT} (db.query.text) instead\n * @example \"SELECT * FROM users\"\n */\nexport const DB_STATEMENT = 'db.statement';\n\n/**\n * Type for {@link DB_STATEMENT} db.statement\n */\nexport type DB_STATEMENT_TYPE = string;\n\n// Path: model/attributes/db/db__stored_procedure__name.json\n\n/**\n * The name of a stored procedure being called. `db.stored_procedure.name`\n *\n * Attribute Value Type: `string` {@link DB_STORED_PROCEDURE_NAME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"GetUserById\"\n */\nexport const DB_STORED_PROCEDURE_NAME = 'db.stored_procedure.name';\n\n/**\n * Type for {@link DB_STORED_PROCEDURE_NAME} db.stored_procedure.name\n */\nexport type DB_STORED_PROCEDURE_NAME_TYPE = string;\n\n// Path: model/attributes/db/db__system.json\n\n/**\n * An identifier for the database management system (DBMS) product being used. See [OpenTelemetry docs](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/database/database-spans.md#notes-and-well-known-identifiers-for-dbsystem) for a list of well-known identifiers. `db.system`\n *\n * Attribute Value Type: `string` {@link DB_SYSTEM_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link DB_SYSTEM_NAME} `db.system.name`\n *\n * @deprecated Use {@link DB_SYSTEM_NAME} (db.system.name) instead\n * @example \"postgresql\"\n */\nexport const DB_SYSTEM = 'db.system';\n\n/**\n * Type for {@link DB_SYSTEM} db.system\n */\nexport type DB_SYSTEM_TYPE = string;\n\n// Path: model/attributes/db/db__system__name.json\n\n/**\n * An identifier for the database management system (DBMS) product being used. See [OpenTelemetry docs](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/database/database-spans.md#notes-and-well-known-identifiers-for-dbsystem) for a list of well-known identifiers. `db.system.name`\n *\n * Attribute Value Type: `string` {@link DB_SYSTEM_NAME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link DB_SYSTEM} `db.system`\n *\n * @example \"postgresql\"\n */\nexport const DB_SYSTEM_NAME = 'db.system.name';\n\n/**\n * Type for {@link DB_SYSTEM_NAME} db.system.name\n */\nexport type DB_SYSTEM_NAME_TYPE = string;\n\n// Path: model/attributes/db/db__user.json\n\n/**\n * The database user. `db.user`\n *\n * Attribute Value Type: `string` {@link DB_USER_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"fancy_user\"\n */\nexport const DB_USER = 'db.user';\n\n/**\n * Type for {@link DB_USER} db.user\n */\nexport type DB_USER_TYPE = string;\n\n// Path: model/attributes/deviceMemory.json\n\n/**\n * The estimated total memory capacity of the device, only a rough estimation in gigabytes. `deviceMemory`\n *\n * Attribute Value Type: `string` {@link DEVICEMEMORY_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link DEVICE_MEMORY_ESTIMATED_CAPACITY} `device.memory.estimated_capacity`\n *\n * @deprecated Use {@link DEVICE_MEMORY_ESTIMATED_CAPACITY} (device.memory.estimated_capacity) instead - Old namespace-less attribute, to be replaced with device.memory.estimated_capacity for span-first future\n * @example \"8 GB\"\n */\nexport const DEVICEMEMORY = 'deviceMemory';\n\n/**\n * Type for {@link DEVICEMEMORY} deviceMemory\n */\nexport type DEVICEMEMORY_TYPE = string;\n\n// Path: model/attributes/device/device__archs.json\n\n/**\n * The CPU architectures of the device. `device.archs`\n *\n * Attribute Value Type: `Array<string>` {@link DEVICE_ARCHS_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example [\"arm64-v8a\",\"armeabi-v7a\",\"armeabi\"]\n */\nexport const DEVICE_ARCHS = 'device.archs';\n\n/**\n * Type for {@link DEVICE_ARCHS} device.archs\n */\nexport type DEVICE_ARCHS_TYPE = Array<string>;\n\n// Path: model/attributes/device/device__battery_level.json\n\n/**\n * The battery level of the device as a percentage (0-100). `device.battery_level`\n *\n * Attribute Value Type: `number` {@link DEVICE_BATTERY_LEVEL_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 100\n */\nexport const DEVICE_BATTERY_LEVEL = 'device.battery_level';\n\n/**\n * Type for {@link DEVICE_BATTERY_LEVEL} device.battery_level\n */\nexport type DEVICE_BATTERY_LEVEL_TYPE = number;\n\n// Path: model/attributes/device/device__battery_temperature.json\n\n/**\n * The battery temperature of the device in Celsius. `device.battery_temperature`\n *\n * Attribute Value Type: `number` {@link DEVICE_BATTERY_TEMPERATURE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 25\n */\nexport const DEVICE_BATTERY_TEMPERATURE = 'device.battery_temperature';\n\n/**\n * Type for {@link DEVICE_BATTERY_TEMPERATURE} device.battery_temperature\n */\nexport type DEVICE_BATTERY_TEMPERATURE_TYPE = number;\n\n// Path: model/attributes/device/device__boot_time.json\n\n/**\n * A formatted UTC timestamp when the system was booted. `device.boot_time`\n *\n * Attribute Value Type: `string` {@link DEVICE_BOOT_TIME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"2018-02-08T12:52:12Z\"\n */\nexport const DEVICE_BOOT_TIME = 'device.boot_time';\n\n/**\n * Type for {@link DEVICE_BOOT_TIME} device.boot_time\n */\nexport type DEVICE_BOOT_TIME_TYPE = string;\n\n// Path: model/attributes/device/device__brand.json\n\n/**\n * The brand of the device. `device.brand`\n *\n * Attribute Value Type: `string` {@link DEVICE_BRAND_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"Apple\"\n */\nexport const DEVICE_BRAND = 'device.brand';\n\n/**\n * Type for {@link DEVICE_BRAND} device.brand\n */\nexport type DEVICE_BRAND_TYPE = string;\n\n// Path: model/attributes/device/device__charging.json\n\n/**\n * Whether the device was charging or not. `device.charging`\n *\n * Attribute Value Type: `boolean` {@link DEVICE_CHARGING_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example false\n */\nexport const DEVICE_CHARGING = 'device.charging';\n\n/**\n * Type for {@link DEVICE_CHARGING} device.charging\n */\nexport type DEVICE_CHARGING_TYPE = boolean;\n\n// Path: model/attributes/device/device__chipset.json\n\n/**\n * The chipset of the device. `device.chipset`\n *\n * Attribute Value Type: `string` {@link DEVICE_CHIPSET_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"Qualcomm SM8550\"\n */\nexport const DEVICE_CHIPSET = 'device.chipset';\n\n/**\n * Type for {@link DEVICE_CHIPSET} device.chipset\n */\nexport type DEVICE_CHIPSET_TYPE = string;\n\n// Path: model/attributes/device/device__class.json\n\n/**\n * The classification of the device. For example, `low`, `medium`, or `high`. Typically inferred by Relay - SDKs generally do not need to set this directly. `device.class`\n *\n * Attribute Value Type: `string` {@link DEVICE_CLASS_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"medium\"\n */\nexport const DEVICE_CLASS = 'device.class';\n\n/**\n * Type for {@link DEVICE_CLASS} device.class\n */\nexport type DEVICE_CLASS_TYPE = string;\n\n// Path: model/attributes/device/device__connection_type.json\n\n/**\n * The internet connection type currently being used by the device. `device.connection_type`\n *\n * Attribute Value Type: `string` {@link DEVICE_CONNECTION_TYPE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link NETWORK_CONNECTION_TYPE} `network.connection.type`, {@link CONNECTIONTYPE} `connectionType`\n *\n * @deprecated Use {@link NETWORK_CONNECTION_TYPE} (network.connection.type) instead - This attribute is being deprecated in favor of network.connection.type\n * @example \"wifi\"\n */\nexport const DEVICE_CONNECTION_TYPE = 'device.connection_type';\n\n/**\n * Type for {@link DEVICE_CONNECTION_TYPE} device.connection_type\n */\nexport type DEVICE_CONNECTION_TYPE_TYPE = string;\n\n// Path: model/attributes/device/device__cpu_description.json\n\n/**\n * A description of the CPU of the device. `device.cpu_description`\n *\n * Attribute Value Type: `string` {@link DEVICE_CPU_DESCRIPTION_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz\"\n */\nexport const DEVICE_CPU_DESCRIPTION = 'device.cpu_description';\n\n/**\n * Type for {@link DEVICE_CPU_DESCRIPTION} device.cpu_description\n */\nexport type DEVICE_CPU_DESCRIPTION_TYPE = string;\n\n// Path: model/attributes/device/device__external_free_storage.json\n\n/**\n * External storage free size in bytes. `device.external_free_storage`\n *\n * Attribute Value Type: `number` {@link DEVICE_EXTERNAL_FREE_STORAGE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 67108864000\n */\nexport const DEVICE_EXTERNAL_FREE_STORAGE = 'device.external_free_storage';\n\n/**\n * Type for {@link DEVICE_EXTERNAL_FREE_STORAGE} device.external_free_storage\n */\nexport type DEVICE_EXTERNAL_FREE_STORAGE_TYPE = number;\n\n// Path: model/attributes/device/device__external_storage_size.json\n\n/**\n * External storage total size in bytes. `device.external_storage_size`\n *\n * Attribute Value Type: `number` {@link DEVICE_EXTERNAL_STORAGE_SIZE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 134217728000\n */\nexport const DEVICE_EXTERNAL_STORAGE_SIZE = 'device.external_storage_size';\n\n/**\n * Type for {@link DEVICE_EXTERNAL_STORAGE_SIZE} device.external_storage_size\n */\nexport type DEVICE_EXTERNAL_STORAGE_SIZE_TYPE = number;\n\n// Path: model/attributes/device/device__family.json\n\n/**\n * The family of the device. `device.family`\n *\n * Attribute Value Type: `string` {@link DEVICE_FAMILY_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"iPhone\"\n */\nexport const DEVICE_FAMILY = 'device.family';\n\n/**\n * Type for {@link DEVICE_FAMILY} device.family\n */\nexport type DEVICE_FAMILY_TYPE = string;\n\n// Path: model/attributes/device/device__free_memory.json\n\n/**\n * Free system memory in bytes. `device.free_memory`\n *\n * Attribute Value Type: `number` {@link DEVICE_FREE_MEMORY_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 2147483648\n */\nexport const DEVICE_FREE_MEMORY = 'device.free_memory';\n\n/**\n * Type for {@link DEVICE_FREE_MEMORY} device.free_memory\n */\nexport type DEVICE_FREE_MEMORY_TYPE = number;\n\n// Path: model/attributes/device/device__free_storage.json\n\n/**\n * Free device storage in bytes. `device.free_storage`\n *\n * Attribute Value Type: `number` {@link DEVICE_FREE_STORAGE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 107374182400\n */\nexport const DEVICE_FREE_STORAGE = 'device.free_storage';\n\n/**\n * Type for {@link DEVICE_FREE_STORAGE} device.free_storage\n */\nexport type DEVICE_FREE_STORAGE_TYPE = number;\n\n// Path: model/attributes/device/device__id.json\n\n/**\n * Unique device identifier. `device.id`\n *\n * Attribute Value Type: `string` {@link DEVICE_ID_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\"\n */\nexport const DEVICE_ID = 'device.id';\n\n/**\n * Type for {@link DEVICE_ID} device.id\n */\nexport type DEVICE_ID_TYPE = string;\n\n// Path: model/attributes/device/device__locale.json\n\n/**\n * The locale of the device. `device.locale`\n *\n * Attribute Value Type: `string` {@link DEVICE_LOCALE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"en-US\"\n */\nexport const DEVICE_LOCALE = 'device.locale';\n\n/**\n * Type for {@link DEVICE_LOCALE} device.locale\n */\nexport type DEVICE_LOCALE_TYPE = string;\n\n// Path: model/attributes/device/device__low_memory.json\n\n/**\n * Whether the device was low on memory. `device.low_memory`\n *\n * Attribute Value Type: `boolean` {@link DEVICE_LOW_MEMORY_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example false\n */\nexport const DEVICE_LOW_MEMORY = 'device.low_memory';\n\n/**\n * Type for {@link DEVICE_LOW_MEMORY} device.low_memory\n */\nexport type DEVICE_LOW_MEMORY_TYPE = boolean;\n\n// Path: model/attributes/device/device__low_power_mode.json\n\n/**\n * Whether the device is in Low Power Mode. `device.low_power_mode`\n *\n * Attribute Value Type: `boolean` {@link DEVICE_LOW_POWER_MODE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example true\n */\nexport const DEVICE_LOW_POWER_MODE = 'device.low_power_mode';\n\n/**\n * Type for {@link DEVICE_LOW_POWER_MODE} device.low_power_mode\n */\nexport type DEVICE_LOW_POWER_MODE_TYPE = boolean;\n\n// Path: model/attributes/device/device__manufacturer.json\n\n/**\n * The manufacturer of the device. `device.manufacturer`\n *\n * Attribute Value Type: `string` {@link DEVICE_MANUFACTURER_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"Google\"\n */\nexport const DEVICE_MANUFACTURER = 'device.manufacturer';\n\n/**\n * Type for {@link DEVICE_MANUFACTURER} device.manufacturer\n */\nexport type DEVICE_MANUFACTURER_TYPE = string;\n\n// Path: model/attributes/device/device__memory__estimated_capacity.json\n\n/**\n * The estimated total memory capacity of the device, only a rough estimation in gigabytes. Browsers report estimations in buckets of powers of 2, mostly capped at 8 GB `device.memory.estimated_capacity`\n *\n * Attribute Value Type: `number` {@link DEVICE_MEMORY_ESTIMATED_CAPACITY_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link DEVICEMEMORY} `deviceMemory`\n *\n * @example 8\n */\nexport const DEVICE_MEMORY_ESTIMATED_CAPACITY = 'device.memory.estimated_capacity';\n\n/**\n * Type for {@link DEVICE_MEMORY_ESTIMATED_CAPACITY} device.memory.estimated_capacity\n */\nexport type DEVICE_MEMORY_ESTIMATED_CAPACITY_TYPE = number;\n\n// Path: model/attributes/device/device__memory_size.json\n\n/**\n * Total system memory available in bytes. `device.memory_size`\n *\n * Attribute Value Type: `number` {@link DEVICE_MEMORY_SIZE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 17179869184\n */\nexport const DEVICE_MEMORY_SIZE = 'device.memory_size';\n\n/**\n * Type for {@link DEVICE_MEMORY_SIZE} device.memory_size\n */\nexport type DEVICE_MEMORY_SIZE_TYPE = number;\n\n// Path: model/attributes/device/device__model.json\n\n/**\n * The model of the device. `device.model`\n *\n * Attribute Value Type: `string` {@link DEVICE_MODEL_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"iPhone 15 Pro Max\"\n */\nexport const DEVICE_MODEL = 'device.model';\n\n/**\n * Type for {@link DEVICE_MODEL} device.model\n */\nexport type DEVICE_MODEL_TYPE = string;\n\n// Path: model/attributes/device/device__model_id.json\n\n/**\n * An internal hardware revision to identify the device exactly. `device.model_id`\n *\n * Attribute Value Type: `string` {@link DEVICE_MODEL_ID_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"N861AP\"\n */\nexport const DEVICE_MODEL_ID = 'device.model_id';\n\n/**\n * Type for {@link DEVICE_MODEL_ID} device.model_id\n */\nexport type DEVICE_MODEL_ID_TYPE = string;\n\n// Path: model/attributes/device/device__name.json\n\n/**\n * The name of the device. On mobile, this is the user-assigned device name. On servers and desktops, this is typically the hostname. `device.name`\n *\n * Attribute Value Type: `string` {@link DEVICE_NAME_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"localhost\"\n */\nexport const DEVICE_NAME = 'device.name';\n\n/**\n * Type for {@link DEVICE_NAME} device.name\n */\nexport type DEVICE_NAME_TYPE = string;\n\n// Path: model/attributes/device/device__online.json\n\n/**\n * Whether the device was online or not. `device.online`\n *\n * Attribute Value Type: `boolean` {@link DEVICE_ONLINE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example true\n */\nexport const DEVICE_ONLINE = 'device.online';\n\n/**\n * Type for {@link DEVICE_ONLINE} device.online\n */\nexport type DEVICE_ONLINE_TYPE = boolean;\n\n// Path: model/attributes/device/device__orientation.json\n\n/**\n * The orientation of the device, either \"portrait\" or \"landscape\". `device.orientation`\n *\n * Attribute Value Type: `string` {@link DEVICE_ORIENTATION_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"portrait\"\n */\nexport const DEVICE_ORIENTATION = 'device.orientation';\n\n/**\n * Type for {@link DEVICE_ORIENTATION} device.orientation\n */\nexport type DEVICE_ORIENTATION_TYPE = string;\n\n// Path: model/attributes/device/device__processor_count.json\n\n/**\n * Number of \"logical processors\". `device.processor_count`\n *\n * Attribute Value Type: `number` {@link DEVICE_PROCESSOR_COUNT_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link HARDWARECONCURRENCY} `hardwareConcurrency`\n *\n * @example 8\n */\nexport const DEVICE_PROCESSOR_COUNT = 'device.processor_count';\n\n/**\n * Type for {@link DEVICE_PROCESSOR_COUNT} device.processor_count\n */\nexport type DEVICE_PROCESSOR_COUNT_TYPE = number;\n\n// Path: model/attributes/device/device__processor_frequency.json\n\n/**\n * Processor frequency in MHz. `device.processor_frequency`\n *\n * Attribute Value Type: `number` {@link DEVICE_PROCESSOR_FREQUENCY_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 2400\n */\nexport const DEVICE_PROCESSOR_FREQUENCY = 'device.processor_frequency';\n\n/**\n * Type for {@link DEVICE_PROCESSOR_FREQUENCY} device.processor_frequency\n */\nexport type DEVICE_PROCESSOR_FREQUENCY_TYPE = number;\n\n// Path: model/attributes/device/device__screen_density.json\n\n/**\n * The screen density of the device. `device.screen_density`\n *\n * Attribute Value Type: `number` {@link DEVICE_SCREEN_DENSITY_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 2.625\n */\nexport const DEVICE_SCREEN_DENSITY = 'device.screen_density';\n\n/**\n * Type for {@link DEVICE_SCREEN_DENSITY} device.screen_density\n */\nexport type DEVICE_SCREEN_DENSITY_TYPE = number;\n\n// Path: model/attributes/device/device__screen_dpi.json\n\n/**\n * The screen density in dots-per-inch (DPI) of the device. `device.screen_dpi`\n *\n * Attribute Value Type: `number` {@link DEVICE_SCREEN_DPI_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 420\n */\nexport const DEVICE_SCREEN_DPI = 'device.screen_dpi';\n\n/**\n * Type for {@link DEVICE_SCREEN_DPI} device.screen_dpi\n */\nexport type DEVICE_SCREEN_DPI_TYPE = number;\n\n// Path: model/attributes/device/device__screen_height_pixels.json\n\n/**\n * The height of the device screen in pixels. `device.screen_height_pixels`\n *\n * Attribute Value Type: `number` {@link DEVICE_SCREEN_HEIGHT_PIXELS_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 2400\n */\nexport const DEVICE_SCREEN_HEIGHT_PIXELS = 'device.screen_height_pixels';\n\n/**\n * Type for {@link DEVICE_SCREEN_HEIGHT_PIXELS} device.screen_height_pixels\n */\nexport type DEVICE_SCREEN_HEIGHT_PIXELS_TYPE = number;\n\n// Path: model/attributes/device/device__screen_width_pixels.json\n\n/**\n * The width of the device screen in pixels. `device.screen_width_pixels`\n *\n * Attribute Value Type: `number` {@link DEVICE_SCREEN_WIDTH_PIXELS_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 1080\n */\nexport const DEVICE_SCREEN_WIDTH_PIXELS = 'device.screen_width_pixels';\n\n/**\n * Type for {@link DEVICE_SCREEN_WIDTH_PIXELS} device.screen_width_pixels\n */\nexport type DEVICE_SCREEN_WIDTH_PIXELS_TYPE = number;\n\n// Path: model/attributes/device/device__simulator.json\n\n/**\n * Whether the device is a simulator or an actual device. `device.simulator`\n *\n * Attribute Value Type: `boolean` {@link DEVICE_SIMULATOR_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example false\n */\nexport const DEVICE_SIMULATOR = 'device.simulator';\n\n/**\n * Type for {@link DEVICE_SIMULATOR} device.simulator\n */\nexport type DEVICE_SIMULATOR_TYPE = boolean;\n\n// Path: model/attributes/device/device__storage_size.json\n\n/**\n * Total device storage in bytes. `device.storage_size`\n *\n * Attribute Value Type: `number` {@link DEVICE_STORAGE_SIZE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 274877906944\n */\nexport const DEVICE_STORAGE_SIZE = 'device.storage_size';\n\n/**\n * Type for {@link DEVICE_STORAGE_SIZE} device.storage_size\n */\nexport type DEVICE_STORAGE_SIZE_TYPE = number;\n\n// Path: model/attributes/device/device__thermal_state.json\n\n/**\n * The thermal state of the device. Based on Apple's `ProcessInfo.ThermalState` enum: `nominal`, `fair`, `serious`, or `critical`. `device.thermal_state`\n *\n * Attribute Value Type: `string` {@link DEVICE_THERMAL_STATE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"nominal\"\n */\nexport const DEVICE_THERMAL_STATE = 'device.thermal_state';\n\n/**\n * Type for {@link DEVICE_THERMAL_STATE} device.thermal_state\n */\nexport type DEVICE_THERMAL_STATE_TYPE = string;\n\n// Path: model/attributes/device/device__timezone.json\n\n/**\n * The timezone of the device. `device.timezone`\n *\n * Attribute Value Type: `string` {@link DEVICE_TIMEZONE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"Europe/Vienna\"\n */\nexport const DEVICE_TIMEZONE = 'device.timezone';\n\n/**\n * Type for {@link DEVICE_TIMEZONE} device.timezone\n */\nexport type DEVICE_TIMEZONE_TYPE = string;\n\n// Path: model/attributes/device/device__usable_memory.json\n\n/**\n * Memory usable for the app in bytes. `device.usable_memory`\n *\n * Attribute Value Type: `number` {@link DEVICE_USABLE_MEMORY_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 2147483648\n */\nexport const DEVICE_USABLE_MEMORY = 'device.usable_memory';\n\n/**\n * Type for {@link DEVICE_USABLE_MEMORY} device.usable_memory\n */\nexport type DEVICE_USABLE_MEMORY_TYPE = number;\n\n// Path: model/attributes/dist.json\n\n/**\n * The sentry dist. `dist`\n *\n * Attribute Value Type: `string` {@link DIST_TYPE}\n *\n * Apply Scrubbing: never\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link SENTRY_DIST} `sentry.dist`\n *\n * @deprecated Use {@link SENTRY_DIST} (sentry.dist) instead - This attribute is being deprecated in favor of sentry.dist.\n * @example \"1.0\"\n */\nexport const DIST = 'dist';\n\n/**\n * Type for {@link DIST} dist\n */\nexport type DIST_TYPE = string;\n\n// Path: model/attributes/effectiveConnectionType.json\n\n/**\n * Specifies the estimated effective type of the current connection (e.g. slow-2g, 2g, 3g, 4g). `effectiveConnectionType`\n *\n * Attribute Value Type: `string` {@link EFFECTIVECONNECTIONTYPE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link NETWORK_CONNECTION_EFFECTIVE_TYPE} `network.connection.effective_type`\n *\n * @deprecated Use {@link NETWORK_CONNECTION_EFFECTIVE_TYPE} (network.connection.effective_type) instead - Old namespace-less attribute, to be replaced with network.connection.effective_type for span-first future\n * @example \"4g\"\n */\nexport const EFFECTIVECONNECTIONTYPE = 'effectiveConnectionType';\n\n/**\n * Type for {@link EFFECTIVECONNECTIONTYPE} effectiveConnectionType\n */\nexport type EFFECTIVECONNECTIONTYPE_TYPE = string;\n\n// Path: model/attributes/environment.json\n\n/**\n * The sentry environment. `environment`\n *\n * Attribute Value Type: `string` {@link ENVIRONMENT_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link SENTRY_ENVIRONMENT} `sentry.environment`\n *\n * @deprecated Use {@link SENTRY_ENVIRONMENT} (sentry.environment) instead\n * @example \"production\"\n */\nexport const ENVIRONMENT = 'environment';\n\n/**\n * Type for {@link ENVIRONMENT} environment\n */\nexport type ENVIRONMENT_TYPE = string;\n\n// Path: model/attributes/error/error__type.json\n\n/**\n * Describes a class of error the operation ended with. `error.type`\n *\n * Attribute Value Type: `string` {@link ERROR_TYPE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"timeout\"\n */\nexport const ERROR_TYPE = 'error.type';\n\n/**\n * Type for {@link ERROR_TYPE} error.type\n */\nexport type ERROR_TYPE_TYPE = string;\n\n// Path: model/attributes/event/event__id.json\n\n/**\n * The unique identifier for this event (log record) `event.id`\n *\n * Attribute Value Type: `number` {@link EVENT_ID_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 1234567890\n */\nexport const EVENT_ID = 'event.id';\n\n/**\n * Type for {@link EVENT_ID} event.id\n */\nexport type EVENT_ID_TYPE = number;\n\n// Path: model/attributes/event/event__name.json\n\n/**\n * The name that uniquely identifies this event (log record) `event.name`\n *\n * Attribute Value Type: `string` {@link EVENT_NAME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"Process Payload\"\n */\nexport const EVENT_NAME = 'event.name';\n\n/**\n * Type for {@link EVENT_NAME} event.name\n */\nexport type EVENT_NAME_TYPE = string;\n\n// Path: model/attributes/exception/exception__escaped.json\n\n/**\n * SHOULD be set to true if the exception event is recorded at a point where it is known that the exception is escaping the scope of the span. `exception.escaped`\n *\n * Attribute Value Type: `boolean` {@link EXCEPTION_ESCAPED_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example true\n */\nexport const EXCEPTION_ESCAPED = 'exception.escaped';\n\n/**\n * Type for {@link EXCEPTION_ESCAPED} exception.escaped\n */\nexport type EXCEPTION_ESCAPED_TYPE = boolean;\n\n// Path: model/attributes/exception/exception__message.json\n\n/**\n * The error message. `exception.message`\n *\n * Attribute Value Type: `string` {@link EXCEPTION_MESSAGE_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"ENOENT: no such file or directory\"\n */\nexport const EXCEPTION_MESSAGE = 'exception.message';\n\n/**\n * Type for {@link EXCEPTION_MESSAGE} exception.message\n */\nexport type EXCEPTION_MESSAGE_TYPE = string;\n\n// Path: model/attributes/exception/exception__stacktrace.json\n\n/**\n * A stacktrace as a string in the natural representation for the language runtime. The representation is to be determined and documented by each language SIG. `exception.stacktrace`\n *\n * Attribute Value Type: `string` {@link EXCEPTION_STACKTRACE_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"Exception in thread \\\"main\\\" java.lang.RuntimeException: Test exception\\n at com.example.GenerateTrace.methodB(GenerateTrace.java:13)\\n at com.example.GenerateTrace.methodA(GenerateTrace.java:9)\\n at com.example.GenerateTrace.main(GenerateTrace.java:5)\"\n */\nexport const EXCEPTION_STACKTRACE = 'exception.stacktrace';\n\n/**\n * Type for {@link EXCEPTION_STACKTRACE} exception.stacktrace\n */\nexport type EXCEPTION_STACKTRACE_TYPE = string;\n\n// Path: model/attributes/exception/exception__type.json\n\n/**\n * The type of the exception (its fully-qualified class name, if applicable). The dynamic type of the exception should be preferred over the static type in languages that support it. `exception.type`\n *\n * Attribute Value Type: `string` {@link EXCEPTION_TYPE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"OSError\"\n */\nexport const EXCEPTION_TYPE = 'exception.type';\n\n/**\n * Type for {@link EXCEPTION_TYPE} exception.type\n */\nexport type EXCEPTION_TYPE_TYPE = string;\n\n// Path: model/attributes/faas/faas__coldstart.json\n\n/**\n * A boolean that is true if the serverless function is executed for the first time (aka cold-start). `faas.coldstart`\n *\n * Attribute Value Type: `boolean` {@link FAAS_COLDSTART_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example true\n */\nexport const FAAS_COLDSTART = 'faas.coldstart';\n\n/**\n * Type for {@link FAAS_COLDSTART} faas.coldstart\n */\nexport type FAAS_COLDSTART_TYPE = boolean;\n\n// Path: model/attributes/faas/faas__cron.json\n\n/**\n * A string containing the schedule period as Cron Expression. `faas.cron`\n *\n * Attribute Value Type: `string` {@link FAAS_CRON_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"0/5 * * * ? *\"\n */\nexport const FAAS_CRON = 'faas.cron';\n\n/**\n * Type for {@link FAAS_CRON} faas.cron\n */\nexport type FAAS_CRON_TYPE = string;\n\n// Path: model/attributes/faas/faas__duration_in_ms.json\n\n/**\n * The duration a function took to run, in milliseconds. `faas.duration_in_ms`\n *\n * Attribute Value Type: `number` {@link FAAS_DURATION_IN_MS_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 120\n */\nexport const FAAS_DURATION_IN_MS = 'faas.duration_in_ms';\n\n/**\n * Type for {@link FAAS_DURATION_IN_MS} faas.duration_in_ms\n */\nexport type FAAS_DURATION_IN_MS_TYPE = number;\n\n// Path: model/attributes/faas/faas__entry_point.json\n\n/**\n * The code that's run when the cloud provider invokes your function. `faas.entry_point`\n *\n * Attribute Value Type: `string` {@link FAAS_ENTRY_POINT_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"my_main_function\"\n */\nexport const FAAS_ENTRY_POINT = 'faas.entry_point';\n\n/**\n * Type for {@link FAAS_ENTRY_POINT} faas.entry_point\n */\nexport type FAAS_ENTRY_POINT_TYPE = string;\n\n// Path: model/attributes/faas/faas__execution.json\n\n/**\n * The execution ID of the current function execution. `faas.execution`\n *\n * Attribute Value Type: `string` {@link FAAS_EXECUTION_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link FAAS_INVOCATION_ID} `faas.invocation_id`, {@link AWS_LAMBDA_AWS_REQUEST_ID} `aws.lambda.aws_request_id`\n *\n * @deprecated Use {@link FAAS_INVOCATION_ID} (faas.invocation_id) instead - This attribute is being deprecated in favor of faas.invocation_id, which is the OTel-aligned replacement.\n * @example \"af9d5aa4-a685-4c5f-a22b-444f80b3cc28\"\n */\nexport const FAAS_EXECUTION = 'faas.execution';\n\n/**\n * Type for {@link FAAS_EXECUTION} faas.execution\n */\nexport type FAAS_EXECUTION_TYPE = string;\n\n// Path: model/attributes/faas/faas__id.json\n\n/**\n * The unique ID of the single function that this runtime instance executes. `faas.id`\n *\n * Attribute Value Type: `string` {@link FAAS_ID_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link CLOUD_RESOURCE_ID} `cloud.resource_id`\n *\n * @deprecated Use {@link CLOUD_RESOURCE_ID} (cloud.resource_id) instead - This attribute is being deprecated in favor of cloud.resource_id, which is the OTel-aligned replacement (renamed in OTel semantic conventions v1.19.0).\n * @example \"arn:aws:lambda:REGION:ACCOUNT_ID:function:my-function\"\n */\nexport const FAAS_ID = 'faas.id';\n\n/**\n * Type for {@link FAAS_ID} faas.id\n */\nexport type FAAS_ID_TYPE = string;\n\n// Path: model/attributes/faas/faas__identity.json\n\n/**\n * The Service Account (GCP), IAM Execution Role (AWS), or Managed Identity (Azure) used by the serverless function when interacting with other cloud services `faas.identity`\n *\n * Attribute Value Type: `string` {@link FAAS_IDENTITY_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"name@project.iam.gserviceaccount.com (GCP), arn:aws:iam::123456789012:role/role-name (AWS), 00000000-0000-0000-0000-000000000000 (Azure)\"\n */\nexport const FAAS_IDENTITY = 'faas.identity';\n\n/**\n * Type for {@link FAAS_IDENTITY} faas.identity\n */\nexport type FAAS_IDENTITY_TYPE = string;\n\n// Path: model/attributes/faas/faas__invocation_id.json\n\n/**\n * The invocation ID of the current function invocation. `faas.invocation_id`\n *\n * Attribute Value Type: `string` {@link FAAS_INVOCATION_ID_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link AWS_LAMBDA_AWS_REQUEST_ID} `aws.lambda.aws_request_id`, {@link FAAS_EXECUTION} `faas.execution`\n *\n * @example \"af9d5aa4-a685-4c5f-a22b-444f80b3cc28\"\n */\nexport const FAAS_INVOCATION_ID = 'faas.invocation_id';\n\n/**\n * Type for {@link FAAS_INVOCATION_ID} faas.invocation_id\n */\nexport type FAAS_INVOCATION_ID_TYPE = string;\n\n// Path: model/attributes/faas/faas__invoked_name.json\n\n/**\n * The name of the invoked function. `faas.invoked_name`\n *\n * Attribute Value Type: `string` {@link FAAS_INVOKED_NAME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"my-function\"\n */\nexport const FAAS_INVOKED_NAME = 'faas.invoked_name';\n\n/**\n * Type for {@link FAAS_INVOKED_NAME} faas.invoked_name\n */\nexport type FAAS_INVOKED_NAME_TYPE = string;\n\n// Path: model/attributes/faas/faas__invoked_provider.json\n\n/**\n * The cloud provider of the invoked function. `faas.invoked_provider`\n *\n * Attribute Value Type: `string` {@link FAAS_INVOKED_PROVIDER_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"aws\"\n */\nexport const FAAS_INVOKED_PROVIDER = 'faas.invoked_provider';\n\n/**\n * Type for {@link FAAS_INVOKED_PROVIDER} faas.invoked_provider\n */\nexport type FAAS_INVOKED_PROVIDER_TYPE = string;\n\n// Path: model/attributes/faas/faas__invoked_region.json\n\n/**\n * The cloud region of the invoked function. `faas.invoked_region`\n *\n * Attribute Value Type: `string` {@link FAAS_INVOKED_REGION_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"eu-central-1\"\n */\nexport const FAAS_INVOKED_REGION = 'faas.invoked_region';\n\n/**\n * Type for {@link FAAS_INVOKED_REGION} faas.invoked_region\n */\nexport type FAAS_INVOKED_REGION_TYPE = string;\n\n// Path: model/attributes/faas/faas__name.json\n\n/**\n * The name of the serverless function `faas.name`\n *\n * Attribute Value Type: `string` {@link FAAS_NAME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link AWS_LAMBDA_FUNCTION_NAME} `aws.lambda.function_name`\n *\n * @example \"my_function\"\n */\nexport const FAAS_NAME = 'faas.name';\n\n/**\n * Type for {@link FAAS_NAME} faas.name\n */\nexport type FAAS_NAME_TYPE = string;\n\n// Path: model/attributes/faas/faas__time.json\n\n/**\n * A string containing the function invocation time in the ISO 8601 format expressed in UTC. `faas.time`\n *\n * Attribute Value Type: `string` {@link FAAS_TIME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"2020-01-23T13:47:06Z\"\n */\nexport const FAAS_TIME = 'faas.time';\n\n/**\n * Type for {@link FAAS_TIME} faas.time\n */\nexport type FAAS_TIME_TYPE = string;\n\n// Path: model/attributes/faas/faas__trigger.json\n\n/**\n * Type of the trigger which caused this function invocation. `faas.trigger`\n *\n * Attribute Value Type: `string` {@link FAAS_TRIGGER_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"timer\"\n */\nexport const FAAS_TRIGGER = 'faas.trigger';\n\n/**\n * Type for {@link FAAS_TRIGGER} faas.trigger\n */\nexport type FAAS_TRIGGER_TYPE = string;\n\n// Path: model/attributes/faas/faas__version.json\n\n/**\n * The version of the function that was invoked `faas.version`\n *\n * Attribute Value Type: `string` {@link FAAS_VERSION_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link AWS_LAMBDA_FUNCTION_VERSION} `aws.lambda.function_version`\n *\n * @example \"$LATEST\"\n */\nexport const FAAS_VERSION = 'faas.version';\n\n/**\n * Type for {@link FAAS_VERSION} faas.version\n */\nexport type FAAS_VERSION_TYPE = string;\n\n// Path: model/attributes/fcp.json\n\n/**\n * The time it takes for the browser to render the first piece of meaningful content on the screen `fcp`\n *\n * Attribute Value Type: `number` {@link FCP_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link BROWSER_WEB_VITAL_FCP_VALUE} `browser.web_vital.fcp.value`\n *\n * @deprecated Use {@link BROWSER_WEB_VITAL_FCP_VALUE} (browser.web_vital.fcp.value) instead - This attribute is being deprecated in favor of browser.web_vital.fcp.value\n * @example 547.6951\n */\nexport const FCP = 'fcp';\n\n/**\n * Type for {@link FCP} fcp\n */\nexport type FCP_TYPE = number;\n\n// Path: model/attributes/flag/flag__evaluation__[key].json\n\n/**\n * An instance of a feature flag evaluation. The value of this attribute is the boolean representing the evaluation result. The <key> suffix is the name of the feature flag. `flag.evaluation.<key>`\n *\n * Attribute Value Type: `boolean` {@link FLAG_EVALUATION_KEY_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Has Dynamic Suffix: true\n *\n * @example \"flag.evaluation.is_new_ui=true\"\n */\nexport const FLAG_EVALUATION_KEY = 'flag.evaluation.<key>';\n\n/**\n * Base key for {@link FLAG_EVALUATION_KEY}. Use with a dynamic suffix, e.g. `${FLAG_EVALUATION_KEY_BASE}.${key}`.\n */\nexport const FLAG_EVALUATION_KEY_BASE = 'flag.evaluation';\n\n/**\n * Type for {@link FLAG_EVALUATION_KEY} flag.evaluation.<key>\n */\nexport type FLAG_EVALUATION_KEY_TYPE = boolean;\n\n// Path: model/attributes/fp.json\n\n/**\n * The time it takes for the browser to render the first pixel on the screen `fp`\n *\n * Attribute Value Type: `number` {@link FP_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link BROWSER_WEB_VITAL_FP_VALUE} `browser.web_vital.fp.value`\n *\n * @deprecated Use {@link BROWSER_WEB_VITAL_FP_VALUE} (browser.web_vital.fp.value) instead - This attribute is being deprecated in favor of browser.web_vital.fp.value\n * @example 477.1926\n */\nexport const FP = 'fp';\n\n/**\n * Type for {@link FP} fp\n */\nexport type FP_TYPE = number;\n\n// Path: model/attributes/frames/frames__delay.json\n\n/**\n * The sum of all delayed frame durations in seconds during the lifetime of the span. For more information see [frames delay](https://develop.sentry.dev/sdk/performance/frames-delay/). `frames.delay`\n *\n * Attribute Value Type: `number` {@link FRAMES_DELAY_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link APP_VITALS_FRAMES_DELAY_VALUE} `app.vitals.frames.delay.value`\n *\n * @deprecated Use {@link APP_VITALS_FRAMES_DELAY_VALUE} (app.vitals.frames.delay.value) instead - Replaced by app.vitals.frames.delay.value to align with the app.vitals.* namespace for mobile performance attributes\n * @example 5\n */\nexport const FRAMES_DELAY = 'frames.delay';\n\n/**\n * Type for {@link FRAMES_DELAY} frames.delay\n */\nexport type FRAMES_DELAY_TYPE = number;\n\n// Path: model/attributes/frames/frames__frozen.json\n\n/**\n * The number of frozen frames rendered during the lifetime of the span. `frames.frozen`\n *\n * Attribute Value Type: `number` {@link FRAMES_FROZEN_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link APP_VITALS_FRAMES_FROZEN_COUNT} `app.vitals.frames.frozen.count`\n *\n * @deprecated Use {@link APP_VITALS_FRAMES_FROZEN_COUNT} (app.vitals.frames.frozen.count) instead - Replaced by app.vitals.frames.frozen.count to align with the app.vitals.* namespace for mobile performance attributes\n * @example 3\n */\nexport const FRAMES_FROZEN = 'frames.frozen';\n\n/**\n * Type for {@link FRAMES_FROZEN} frames.frozen\n */\nexport type FRAMES_FROZEN_TYPE = number;\n\n// Path: model/attributes/frames_frozen_rate.json\n\n/**\n * The rate of frozen frames, or `app_vitals.frames.frozen.count` divided by `app_vitals.frames.total.count`. This is computed by Relay. `frames_frozen_rate`\n *\n * Attribute Value Type: `number` {@link FRAMES_FROZEN_RATE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n */\nexport const FRAMES_FROZEN_RATE = 'frames_frozen_rate';\n\n/**\n * Type for {@link FRAMES_FROZEN_RATE} frames_frozen_rate\n */\nexport type FRAMES_FROZEN_RATE_TYPE = number;\n\n// Path: model/attributes/frames/frames__slow.json\n\n/**\n * The number of slow frames rendered during the lifetime of the span. `frames.slow`\n *\n * Attribute Value Type: `number` {@link FRAMES_SLOW_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link APP_VITALS_FRAMES_SLOW_COUNT} `app.vitals.frames.slow.count`\n *\n * @deprecated Use {@link APP_VITALS_FRAMES_SLOW_COUNT} (app.vitals.frames.slow.count) instead - Replaced by app.vitals.frames.slow.count to align with the app.vitals.* namespace for mobile performance attributes\n * @example 1\n */\nexport const FRAMES_SLOW = 'frames.slow';\n\n/**\n * Type for {@link FRAMES_SLOW} frames.slow\n */\nexport type FRAMES_SLOW_TYPE = number;\n\n// Path: model/attributes/frames_slow_rate.json\n\n/**\n * The rate of slow frames, or `app_vitals.frames.slow.count` divided by `app_vitals.frames.total.count`. This is computed by Relay. `frames_slow_rate`\n *\n * Attribute Value Type: `number` {@link FRAMES_SLOW_RATE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n */\nexport const FRAMES_SLOW_RATE = 'frames_slow_rate';\n\n/**\n * Type for {@link FRAMES_SLOW_RATE} frames_slow_rate\n */\nexport type FRAMES_SLOW_RATE_TYPE = number;\n\n// Path: model/attributes/frames/frames__total.json\n\n/**\n * The number of total frames rendered during the lifetime of the span. `frames.total`\n *\n * Attribute Value Type: `number` {@link FRAMES_TOTAL_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link APP_VITALS_FRAMES_TOTAL_COUNT} `app.vitals.frames.total.count`\n *\n * @deprecated Use {@link APP_VITALS_FRAMES_TOTAL_COUNT} (app.vitals.frames.total.count) instead - Replaced by app.vitals.frames.total.count to align with the app.vitals.* namespace for mobile performance attributes\n * @example 60\n */\nexport const FRAMES_TOTAL = 'frames.total';\n\n/**\n * Type for {@link FRAMES_TOTAL} frames.total\n */\nexport type FRAMES_TOTAL_TYPE = number;\n\n// Path: model/attributes/fs_error.json\n\n/**\n * The error message of a file system error. `fs_error`\n *\n * Attribute Value Type: `string` {@link FS_ERROR_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @deprecated Use {@link ERROR_TYPE} (error.type) instead - This attribute is not part of the OpenTelemetry specification and error.type fits much better.\n * @example \"ENOENT: no such file or directory\"\n */\nexport const FS_ERROR = 'fs_error';\n\n/**\n * Type for {@link FS_ERROR} fs_error\n */\nexport type FS_ERROR_TYPE = string;\n\n// Path: model/attributes/gcp/gcp__function__context__event_id.json\n\n/**\n * The event ID from the legacy GCP Cloud Function context (1st gen) `gcp.function.context.event_id`\n *\n * Attribute Value Type: `string` {@link GCP_FUNCTION_CONTEXT_EVENT_ID_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"1234567890\"\n */\nexport const GCP_FUNCTION_CONTEXT_EVENT_ID = 'gcp.function.context.event_id';\n\n/**\n * Type for {@link GCP_FUNCTION_CONTEXT_EVENT_ID} gcp.function.context.event_id\n */\nexport type GCP_FUNCTION_CONTEXT_EVENT_ID_TYPE = string;\n\n// Path: model/attributes/gcp/gcp__function__context__event_type.json\n\n/**\n * The type of the GCP Cloud Function event `gcp.function.context.event_type`\n *\n * Attribute Value Type: `string` {@link GCP_FUNCTION_CONTEXT_EVENT_TYPE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"google.pubsub.topic.publish\"\n */\nexport const GCP_FUNCTION_CONTEXT_EVENT_TYPE = 'gcp.function.context.event_type';\n\n/**\n * Type for {@link GCP_FUNCTION_CONTEXT_EVENT_TYPE} gcp.function.context.event_type\n */\nexport type GCP_FUNCTION_CONTEXT_EVENT_TYPE_TYPE = string;\n\n// Path: model/attributes/gcp/gcp__function__context__id.json\n\n/**\n * The unique event ID from the GCP CloudEvents context (2nd gen Cloud Functions) `gcp.function.context.id`\n *\n * Attribute Value Type: `string` {@link GCP_FUNCTION_CONTEXT_ID_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"1234567890\"\n */\nexport const GCP_FUNCTION_CONTEXT_ID = 'gcp.function.context.id';\n\n/**\n * Type for {@link GCP_FUNCTION_CONTEXT_ID} gcp.function.context.id\n */\nexport type GCP_FUNCTION_CONTEXT_ID_TYPE = string;\n\n// Path: model/attributes/gcp/gcp__function__context__resource.json\n\n/**\n * The resource that triggered the GCP Cloud Function event `gcp.function.context.resource`\n *\n * Attribute Value Type: `string` {@link GCP_FUNCTION_CONTEXT_RESOURCE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"projects/my-project/topics/my-topic\"\n */\nexport const GCP_FUNCTION_CONTEXT_RESOURCE = 'gcp.function.context.resource';\n\n/**\n * Type for {@link GCP_FUNCTION_CONTEXT_RESOURCE} gcp.function.context.resource\n */\nexport type GCP_FUNCTION_CONTEXT_RESOURCE_TYPE = string;\n\n// Path: model/attributes/gcp/gcp__function__context__source.json\n\n/**\n * The source of the GCP Cloud Function event `gcp.function.context.source`\n *\n * Attribute Value Type: `string` {@link GCP_FUNCTION_CONTEXT_SOURCE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"//pubsub.googleapis.com/projects/my-project/topics/my-topic\"\n */\nexport const GCP_FUNCTION_CONTEXT_SOURCE = 'gcp.function.context.source';\n\n/**\n * Type for {@link GCP_FUNCTION_CONTEXT_SOURCE} gcp.function.context.source\n */\nexport type GCP_FUNCTION_CONTEXT_SOURCE_TYPE = string;\n\n// Path: model/attributes/gcp/gcp__function__context__specversion.json\n\n/**\n * The CloudEvents specification version of the GCP Cloud Function event `gcp.function.context.specversion`\n *\n * Attribute Value Type: `string` {@link GCP_FUNCTION_CONTEXT_SPECVERSION_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"1.0\"\n */\nexport const GCP_FUNCTION_CONTEXT_SPECVERSION = 'gcp.function.context.specversion';\n\n/**\n * Type for {@link GCP_FUNCTION_CONTEXT_SPECVERSION} gcp.function.context.specversion\n */\nexport type GCP_FUNCTION_CONTEXT_SPECVERSION_TYPE = string;\n\n// Path: model/attributes/gcp/gcp__function__context__time.json\n\n/**\n * The timestamp of the GCP Cloud Function event `gcp.function.context.time`\n *\n * Attribute Value Type: `string` {@link GCP_FUNCTION_CONTEXT_TIME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"2024-01-01T00:00:00.000Z\"\n */\nexport const GCP_FUNCTION_CONTEXT_TIME = 'gcp.function.context.time';\n\n/**\n * Type for {@link GCP_FUNCTION_CONTEXT_TIME} gcp.function.context.time\n */\nexport type GCP_FUNCTION_CONTEXT_TIME_TYPE = string;\n\n// Path: model/attributes/gcp/gcp__function__context__timestamp.json\n\n/**\n * The legacy timestamp of the GCP Cloud Function event `gcp.function.context.timestamp`\n *\n * Attribute Value Type: `string` {@link GCP_FUNCTION_CONTEXT_TIMESTAMP_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"2024-01-01T00:00:00.000Z\"\n */\nexport const GCP_FUNCTION_CONTEXT_TIMESTAMP = 'gcp.function.context.timestamp';\n\n/**\n * Type for {@link GCP_FUNCTION_CONTEXT_TIMESTAMP} gcp.function.context.timestamp\n */\nexport type GCP_FUNCTION_CONTEXT_TIMESTAMP_TYPE = string;\n\n// Path: model/attributes/gcp/gcp__function__context__type.json\n\n/**\n * The type of the GCP Cloud Function event context `gcp.function.context.type`\n *\n * Attribute Value Type: `string` {@link GCP_FUNCTION_CONTEXT_TYPE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"cloud_functions.context\"\n */\nexport const GCP_FUNCTION_CONTEXT_TYPE = 'gcp.function.context.type';\n\n/**\n * Type for {@link GCP_FUNCTION_CONTEXT_TYPE} gcp.function.context.type\n */\nexport type GCP_FUNCTION_CONTEXT_TYPE_TYPE = string;\n\n// Path: model/attributes/gcp/gcp__project__id.json\n\n/**\n * The ID of the project in GCP that this resource is associated with `gcp.project.id`\n *\n * Attribute Value Type: `string` {@link GCP_PROJECT_ID_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"my-project-123\"\n */\nexport const GCP_PROJECT_ID = 'gcp.project.id';\n\n/**\n * Type for {@link GCP_PROJECT_ID} gcp.project.id\n */\nexport type GCP_PROJECT_ID_TYPE = string;\n\n// Path: model/attributes/gen_ai/gen_ai__agent__name.json\n\n/**\n * The name of the agent being used. `gen_ai.agent.name`\n *\n * Attribute Value Type: `string` {@link GEN_AI_AGENT_NAME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"ResearchAssistant\"\n */\nexport const GEN_AI_AGENT_NAME = 'gen_ai.agent.name';\n\n/**\n * Type for {@link GEN_AI_AGENT_NAME} gen_ai.agent.name\n */\nexport type GEN_AI_AGENT_NAME_TYPE = string;\n\n// Path: model/attributes/gen_ai/gen_ai__context__utilization.json\n\n/**\n * The fraction of the model context window utilized by this generation. `gen_ai.context.utilization`\n *\n * Attribute Value Type: `number` {@link GEN_AI_CONTEXT_UTILIZATION_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 0.75\n */\nexport const GEN_AI_CONTEXT_UTILIZATION = 'gen_ai.context.utilization';\n\n/**\n * Type for {@link GEN_AI_CONTEXT_UTILIZATION} gen_ai.context.utilization\n */\nexport type GEN_AI_CONTEXT_UTILIZATION_TYPE = number;\n\n// Path: model/attributes/gen_ai/gen_ai__context__window_size.json\n\n/**\n * The maximum context window size supported by the model for this generation. `gen_ai.context.window_size`\n *\n * Attribute Value Type: `number` {@link GEN_AI_CONTEXT_WINDOW_SIZE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 128000\n */\nexport const GEN_AI_CONTEXT_WINDOW_SIZE = 'gen_ai.context.window_size';\n\n/**\n * Type for {@link GEN_AI_CONTEXT_WINDOW_SIZE} gen_ai.context.window_size\n */\nexport type GEN_AI_CONTEXT_WINDOW_SIZE_TYPE = number;\n\n// Path: model/attributes/gen_ai/gen_ai__conversation__id.json\n\n/**\n * The unique identifier for a conversation (session, thread), used to store and correlate messages within this conversation. `gen_ai.conversation.id`\n *\n * Attribute Value Type: `string` {@link GEN_AI_CONVERSATION_ID_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"conv_5j66UpCpwteGg4YSxUnt7lPY\"\n */\nexport const GEN_AI_CONVERSATION_ID = 'gen_ai.conversation.id';\n\n/**\n * Type for {@link GEN_AI_CONVERSATION_ID} gen_ai.conversation.id\n */\nexport type GEN_AI_CONVERSATION_ID_TYPE = string;\n\n// Path: model/attributes/gen_ai/gen_ai__cost__cache_creation__input_tokens.json\n\n/**\n * The cost of input tokens written to cache in USD. `gen_ai.cost.cache_creation.input_tokens`\n *\n * Attribute Value Type: `number` {@link GEN_AI_COST_CACHE_CREATION_INPUT_TOKENS_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 12.34\n */\nexport const GEN_AI_COST_CACHE_CREATION_INPUT_TOKENS = 'gen_ai.cost.cache_creation.input_tokens';\n\n/**\n * Type for {@link GEN_AI_COST_CACHE_CREATION_INPUT_TOKENS} gen_ai.cost.cache_creation.input_tokens\n */\nexport type GEN_AI_COST_CACHE_CREATION_INPUT_TOKENS_TYPE = number;\n\n// Path: model/attributes/gen_ai/gen_ai__cost__cache_read__input_tokens.json\n\n/**\n * The cost of cached input tokens in USD. `gen_ai.cost.cache_read.input_tokens`\n *\n * Attribute Value Type: `number` {@link GEN_AI_COST_CACHE_READ_INPUT_TOKENS_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 12.34\n */\nexport const GEN_AI_COST_CACHE_READ_INPUT_TOKENS = 'gen_ai.cost.cache_read.input_tokens';\n\n/**\n * Type for {@link GEN_AI_COST_CACHE_READ_INPUT_TOKENS} gen_ai.cost.cache_read.input_tokens\n */\nexport type GEN_AI_COST_CACHE_READ_INPUT_TOKENS_TYPE = number;\n\n// Path: model/attributes/gen_ai/gen_ai__cost__input_tokens.json\n\n/**\n * The total cost of all input tokens in USD (includes cached and cache creation tokens). `gen_ai.cost.input_tokens`\n *\n * Attribute Value Type: `number` {@link GEN_AI_COST_INPUT_TOKENS_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 123.45\n */\nexport const GEN_AI_COST_INPUT_TOKENS = 'gen_ai.cost.input_tokens';\n\n/**\n * Type for {@link GEN_AI_COST_INPUT_TOKENS} gen_ai.cost.input_tokens\n */\nexport type GEN_AI_COST_INPUT_TOKENS_TYPE = number;\n\n// Path: model/attributes/gen_ai/gen_ai__cost__output_tokens.json\n\n/**\n * The total cost of all output tokens in USD (includes reasoning tokens). `gen_ai.cost.output_tokens`\n *\n * Attribute Value Type: `number` {@link GEN_AI_COST_OUTPUT_TOKENS_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 123.45\n */\nexport const GEN_AI_COST_OUTPUT_TOKENS = 'gen_ai.cost.output_tokens';\n\n/**\n * Type for {@link GEN_AI_COST_OUTPUT_TOKENS} gen_ai.cost.output_tokens\n */\nexport type GEN_AI_COST_OUTPUT_TOKENS_TYPE = number;\n\n// Path: model/attributes/gen_ai/gen_ai__cost__reasoning__output_tokens.json\n\n/**\n * The cost of reasoning output tokens in USD. `gen_ai.cost.reasoning.output_tokens`\n *\n * Attribute Value Type: `number` {@link GEN_AI_COST_REASONING_OUTPUT_TOKENS_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 12.34\n */\nexport const GEN_AI_COST_REASONING_OUTPUT_TOKENS = 'gen_ai.cost.reasoning.output_tokens';\n\n/**\n * Type for {@link GEN_AI_COST_REASONING_OUTPUT_TOKENS} gen_ai.cost.reasoning.output_tokens\n */\nexport type GEN_AI_COST_REASONING_OUTPUT_TOKENS_TYPE = number;\n\n// Path: model/attributes/gen_ai/gen_ai__cost__total_tokens.json\n\n/**\n * The total cost for the tokens used. `gen_ai.cost.total_tokens`\n *\n * Attribute Value Type: `number` {@link GEN_AI_COST_TOTAL_TOKENS_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link AI_TOTAL_COST} `ai.total_cost`\n *\n * @example 12.34\n */\nexport const GEN_AI_COST_TOTAL_TOKENS = 'gen_ai.cost.total_tokens';\n\n/**\n * Type for {@link GEN_AI_COST_TOTAL_TOKENS} gen_ai.cost.total_tokens\n */\nexport type GEN_AI_COST_TOTAL_TOKENS_TYPE = number;\n\n// Path: model/attributes/gen_ai/gen_ai__embeddings__input.json\n\n/**\n * The input to the embeddings model. `gen_ai.embeddings.input`\n *\n * Attribute Value Type: `string` {@link GEN_AI_EMBEDDINGS_INPUT_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"What's the weather in Paris?\"\n */\nexport const GEN_AI_EMBEDDINGS_INPUT = 'gen_ai.embeddings.input';\n\n/**\n * Type for {@link GEN_AI_EMBEDDINGS_INPUT} gen_ai.embeddings.input\n */\nexport type GEN_AI_EMBEDDINGS_INPUT_TYPE = string;\n\n// Path: model/attributes/gen_ai/gen_ai__function_id.json\n\n/**\n * Framework-specific tracing label for the execution of a function or other unit of execution in a generative AI system. `gen_ai.function_id`\n *\n * Attribute Value Type: `string` {@link GEN_AI_FUNCTION_ID_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"my-awesome-function\"\n */\nexport const GEN_AI_FUNCTION_ID = 'gen_ai.function_id';\n\n/**\n * Type for {@link GEN_AI_FUNCTION_ID} gen_ai.function_id\n */\nexport type GEN_AI_FUNCTION_ID_TYPE = string;\n\n// Path: model/attributes/gen_ai/gen_ai__input__messages.json\n\n/**\n * The messages passed to the model. It has to be a stringified version of an array of objects. The `role` attribute of each object must be `\"user\"`, `\"assistant\"`, `\"tool\"`, or `\"system\"`. For messages of the role `\"tool\"`, the `content` can be a string or an arbitrary object with information about the tool call. For other messages the `content` can be either a string or a list of objects in the format `{type: \"text\", text:\"...\"}`. `gen_ai.input.messages`\n *\n * Attribute Value Type: `string` {@link GEN_AI_INPUT_MESSAGES_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link AI_TEXTS} `ai.texts`\n *\n * @example \"[{\\\"role\\\": \\\"user\\\", \\\"parts\\\": [{\\\"type\\\": \\\"text\\\", \\\"content\\\": \\\"Weather in Paris?\\\"}]}, {\\\"role\\\": \\\"assistant\\\", \\\"parts\\\": [{\\\"type\\\": \\\"tool_call\\\", \\\"id\\\": \\\"call_VSPygqKTWdrhaFErNvMV18Yl\\\", \\\"name\\\": \\\"get_weather\\\", \\\"arguments\\\": {\\\"location\\\": \\\"Paris\\\"}}]}, {\\\"role\\\": \\\"tool\\\", \\\"parts\\\": [{\\\"type\\\": \\\"tool_call_response\\\", \\\"id\\\": \\\"call_VSPygqKTWdrhaFErNvMV18Yl\\\", \\\"result\\\": \\\"rainy, 57°F\\\"}]}]\"\n */\nexport const GEN_AI_INPUT_MESSAGES = 'gen_ai.input.messages';\n\n/**\n * Type for {@link GEN_AI_INPUT_MESSAGES} gen_ai.input.messages\n */\nexport type GEN_AI_INPUT_MESSAGES_TYPE = string;\n\n// Path: model/attributes/gen_ai/gen_ai__operation__name.json\n\n/**\n * The name of the operation being performed. It has the following list of well-known values: 'chat', 'create_agent', 'embeddings', 'execute_tool', 'generate_content', 'invoke_agent', 'text_completion'. If one of them applies, then that value MUST be used. Otherwise a custom value MAY be used. `gen_ai.operation.name`\n *\n * Attribute Value Type: `string` {@link GEN_AI_OPERATION_NAME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"chat\"\n */\nexport const GEN_AI_OPERATION_NAME = 'gen_ai.operation.name';\n\n/**\n * Type for {@link GEN_AI_OPERATION_NAME} gen_ai.operation.name\n */\nexport type GEN_AI_OPERATION_NAME_TYPE = string;\n\n// Path: model/attributes/gen_ai/gen_ai__operation__type.json\n\n/**\n * The type of AI operation. Must be one of 'agent' (invoke_agent and create_agent spans), 'ai_client' (any LLM call), 'tool' (execute_tool spans), 'handoff' (handoff spans), 'other' (input and output processors, skill loading, guardrails etc.) . Added during ingestion based on span.op and gen_ai.operation.type. Used to filter and aggregate data in the UI `gen_ai.operation.type`\n *\n * Attribute Value Type: `string` {@link GEN_AI_OPERATION_TYPE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"tool\"\n */\nexport const GEN_AI_OPERATION_TYPE = 'gen_ai.operation.type';\n\n/**\n * Type for {@link GEN_AI_OPERATION_TYPE} gen_ai.operation.type\n */\nexport type GEN_AI_OPERATION_TYPE_TYPE = string;\n\n// Path: model/attributes/gen_ai/gen_ai__output__messages.json\n\n/**\n * The model's response messages. It has to be a stringified version of an array of message objects, which can include text responses and tool calls. `gen_ai.output.messages`\n *\n * Attribute Value Type: `string` {@link GEN_AI_OUTPUT_MESSAGES_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"[{\\\"role\\\": \\\"assistant\\\", \\\"parts\\\": [{\\\"type\\\": \\\"text\\\", \\\"content\\\": \\\"The weather in Paris is currently rainy with a temperature of 57°F.\\\"}], \\\"finish_reason\\\": \\\"stop\\\"}]\"\n */\nexport const GEN_AI_OUTPUT_MESSAGES = 'gen_ai.output.messages';\n\n/**\n * Type for {@link GEN_AI_OUTPUT_MESSAGES} gen_ai.output.messages\n */\nexport type GEN_AI_OUTPUT_MESSAGES_TYPE = string;\n\n// Path: model/attributes/gen_ai/gen_ai__pipeline__name.json\n\n/**\n * Name of the AI pipeline or chain being executed. `gen_ai.pipeline.name`\n *\n * Attribute Value Type: `string` {@link GEN_AI_PIPELINE_NAME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link AI_PIPELINE_NAME} `ai.pipeline.name`\n *\n * @example \"Autofix Pipeline\"\n */\nexport const GEN_AI_PIPELINE_NAME = 'gen_ai.pipeline.name';\n\n/**\n * Type for {@link GEN_AI_PIPELINE_NAME} gen_ai.pipeline.name\n */\nexport type GEN_AI_PIPELINE_NAME_TYPE = string;\n\n// Path: model/attributes/gen_ai/gen_ai__prompt.json\n\n/**\n * The input messages sent to the model `gen_ai.prompt`\n *\n * Attribute Value Type: `string` {@link GEN_AI_PROMPT_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @deprecated  - Deprecated from OTEL, use gen_ai.input.messages with the new format instead.\n * @example \"[{\\\"role\\\": \\\"user\\\", \\\"message\\\": \\\"hello\\\"}]\"\n */\nexport const GEN_AI_PROMPT = 'gen_ai.prompt';\n\n/**\n * Type for {@link GEN_AI_PROMPT} gen_ai.prompt\n */\nexport type GEN_AI_PROMPT_TYPE = string;\n\n// Path: model/attributes/gen_ai/gen_ai__prompt__name.json\n\n/**\n * The name of the prompt that uniquely identifies it. `gen_ai.prompt.name`\n *\n * Attribute Value Type: `string` {@link GEN_AI_PROMPT_NAME_TYPE}\n *\n * Apply Scrubbing: manual - Prompt names may reveal user behavior patterns or sensitive operations\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link MCP_PROMPT_NAME} `mcp.prompt.name`\n *\n * @example \"summarize_text\"\n */\nexport const GEN_AI_PROMPT_NAME = 'gen_ai.prompt.name';\n\n/**\n * Type for {@link GEN_AI_PROMPT_NAME} gen_ai.prompt.name\n */\nexport type GEN_AI_PROMPT_NAME_TYPE = string;\n\n// Path: model/attributes/gen_ai/gen_ai__provider__name.json\n\n/**\n * The Generative AI provider as identified by the client or server instrumentation. `gen_ai.provider.name`\n *\n * Attribute Value Type: `string` {@link GEN_AI_PROVIDER_NAME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link AI_MODEL_PROVIDER} `ai.model.provider`, {@link GEN_AI_SYSTEM} `gen_ai.system`\n *\n * @example \"openai\"\n */\nexport const GEN_AI_PROVIDER_NAME = 'gen_ai.provider.name';\n\n/**\n * Type for {@link GEN_AI_PROVIDER_NAME} gen_ai.provider.name\n */\nexport type GEN_AI_PROVIDER_NAME_TYPE = string;\n\n// Path: model/attributes/gen_ai/gen_ai__request__available_tools.json\n\n/**\n * The available tools for the model. It has to be a stringified version of an array of objects. `gen_ai.request.available_tools`\n *\n * Attribute Value Type: `string` {@link GEN_AI_REQUEST_AVAILABLE_TOOLS_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @deprecated Use {@link GEN_AI_TOOL_DEFINITIONS} (gen_ai.tool.definitions) instead\n * @example \"[{\\\"name\\\": \\\"get_weather\\\", \\\"description\\\": \\\"Get the weather for a given location\\\"}, {\\\"name\\\": \\\"get_news\\\", \\\"description\\\": \\\"Get the news for a given topic\\\"}]\"\n */\nexport const GEN_AI_REQUEST_AVAILABLE_TOOLS = 'gen_ai.request.available_tools';\n\n/**\n * Type for {@link GEN_AI_REQUEST_AVAILABLE_TOOLS} gen_ai.request.available_tools\n */\nexport type GEN_AI_REQUEST_AVAILABLE_TOOLS_TYPE = string;\n\n// Path: model/attributes/gen_ai/gen_ai__request__frequency_penalty.json\n\n/**\n * Used to reduce repetitiveness of generated tokens. The higher the value, the stronger a penalty is applied to previously present tokens, proportional to how many times they have already appeared in the prompt or prior generation. `gen_ai.request.frequency_penalty`\n *\n * Attribute Value Type: `number` {@link GEN_AI_REQUEST_FREQUENCY_PENALTY_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link AI_FREQUENCY_PENALTY} `ai.frequency_penalty`\n *\n * @example 0.5\n */\nexport const GEN_AI_REQUEST_FREQUENCY_PENALTY = 'gen_ai.request.frequency_penalty';\n\n/**\n * Type for {@link GEN_AI_REQUEST_FREQUENCY_PENALTY} gen_ai.request.frequency_penalty\n */\nexport type GEN_AI_REQUEST_FREQUENCY_PENALTY_TYPE = number;\n\n// Path: model/attributes/gen_ai/gen_ai__request__max_tokens.json\n\n/**\n * The maximum number of tokens to generate in the response. `gen_ai.request.max_tokens`\n *\n * Attribute Value Type: `number` {@link GEN_AI_REQUEST_MAX_TOKENS_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example 2048\n */\nexport const GEN_AI_REQUEST_MAX_TOKENS = 'gen_ai.request.max_tokens';\n\n/**\n * Type for {@link GEN_AI_REQUEST_MAX_TOKENS} gen_ai.request.max_tokens\n */\nexport type GEN_AI_REQUEST_MAX_TOKENS_TYPE = number;\n\n// Path: model/attributes/gen_ai/gen_ai__request__messages.json\n\n/**\n * The messages passed to the model. It has to be a stringified version of an array of objects. The `role` attribute of each object must be `\"user\"`, `\"assistant\"`, `\"tool\"`, or `\"system\"`. For messages of the role `\"tool\"`, the `content` can be a string or an arbitrary object with information about the tool call. For other messages the `content` can be either a string or a list of objects in the format `{type: \"text\", text:\"...\"}`. `gen_ai.request.messages`\n *\n * Attribute Value Type: `string` {@link GEN_AI_REQUEST_MESSAGES_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link AI_INPUT_MESSAGES} `ai.input_messages`\n *\n * @deprecated Use {@link GEN_AI_INPUT_MESSAGES} (gen_ai.input.messages) instead\n * @example \"[{\\\"role\\\": \\\"system\\\", \\\"content\\\": \\\"Generate a random number.\\\"}, {\\\"role\\\": \\\"user\\\", \\\"content\\\": [{\\\"text\\\": \\\"Generate a random number between 0 and 10.\\\", \\\"type\\\": \\\"text\\\"}]}, {\\\"role\\\": \\\"tool\\\", \\\"content\\\": {\\\"toolCallId\\\": \\\"1\\\", \\\"toolName\\\": \\\"Weather\\\", \\\"output\\\": \\\"rainy\\\"}}]\"\n */\nexport const GEN_AI_REQUEST_MESSAGES = 'gen_ai.request.messages';\n\n/**\n * Type for {@link GEN_AI_REQUEST_MESSAGES} gen_ai.request.messages\n */\nexport type GEN_AI_REQUEST_MESSAGES_TYPE = string;\n\n// Path: model/attributes/gen_ai/gen_ai__request__model.json\n\n/**\n * The model identifier being used for the request. `gen_ai.request.model`\n *\n * Attribute Value Type: `string` {@link GEN_AI_REQUEST_MODEL_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"gpt-4-turbo-preview\"\n */\nexport const GEN_AI_REQUEST_MODEL = 'gen_ai.request.model';\n\n/**\n * Type for {@link GEN_AI_REQUEST_MODEL} gen_ai.request.model\n */\nexport type GEN_AI_REQUEST_MODEL_TYPE = string;\n\n// Path: model/attributes/gen_ai/gen_ai__request__presence_penalty.json\n\n/**\n * Used to reduce repetitiveness of generated tokens. Similar to frequency_penalty, except that this penalty is applied equally to all tokens that have already appeared, regardless of their exact frequencies. `gen_ai.request.presence_penalty`\n *\n * Attribute Value Type: `number` {@link GEN_AI_REQUEST_PRESENCE_PENALTY_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link AI_PRESENCE_PENALTY} `ai.presence_penalty`\n *\n * @example 0.5\n */\nexport const GEN_AI_REQUEST_PRESENCE_PENALTY = 'gen_ai.request.presence_penalty';\n\n/**\n * Type for {@link GEN_AI_REQUEST_PRESENCE_PENALTY} gen_ai.request.presence_penalty\n */\nexport type GEN_AI_REQUEST_PRESENCE_PENALTY_TYPE = number;\n\n// Path: model/attributes/gen_ai/gen_ai__request__reasoning_effort.json\n\n/**\n * Constrains the effort on reasoning for reasoning models. Supported values vary by provider. `gen_ai.request.reasoning_effort`\n *\n * Attribute Value Type: `string` {@link GEN_AI_REQUEST_REASONING_EFFORT_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"high\"\n */\nexport const GEN_AI_REQUEST_REASONING_EFFORT = 'gen_ai.request.reasoning_effort';\n\n/**\n * Type for {@link GEN_AI_REQUEST_REASONING_EFFORT} gen_ai.request.reasoning_effort\n */\nexport type GEN_AI_REQUEST_REASONING_EFFORT_TYPE = string;\n\n// Path: model/attributes/gen_ai/gen_ai__request__seed.json\n\n/**\n * The seed, ideally models given the same seed and same other parameters will produce the exact same output. `gen_ai.request.seed`\n *\n * Attribute Value Type: `string` {@link GEN_AI_REQUEST_SEED_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link AI_SEED} `ai.seed`\n *\n * @example \"1234567890\"\n */\nexport const GEN_AI_REQUEST_SEED = 'gen_ai.request.seed';\n\n/**\n * Type for {@link GEN_AI_REQUEST_SEED} gen_ai.request.seed\n */\nexport type GEN_AI_REQUEST_SEED_TYPE = string;\n\n// Path: model/attributes/gen_ai/gen_ai__request__stop_sequences.json\n\n/**\n * List of sequences that the model will use to stop generating further tokens. `gen_ai.request.stop_sequences`\n *\n * Attribute Value Type: `Array<string>` {@link GEN_AI_REQUEST_STOP_SEQUENCES_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example [\"forest\",\"lived\"]\n */\nexport const GEN_AI_REQUEST_STOP_SEQUENCES = 'gen_ai.request.stop_sequences';\n\n/**\n * Type for {@link GEN_AI_REQUEST_STOP_SEQUENCES} gen_ai.request.stop_sequences\n */\nexport type GEN_AI_REQUEST_STOP_SEQUENCES_TYPE = Array<string>;\n\n// Path: model/attributes/gen_ai/gen_ai__request__temperature.json\n\n/**\n * For an AI model call, the temperature parameter. Temperature essentially means how random the output will be. `gen_ai.request.temperature`\n *\n * Attribute Value Type: `number` {@link GEN_AI_REQUEST_TEMPERATURE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link AI_TEMPERATURE} `ai.temperature`\n *\n * @example 0.1\n */\nexport const GEN_AI_REQUEST_TEMPERATURE = 'gen_ai.request.temperature';\n\n/**\n * Type for {@link GEN_AI_REQUEST_TEMPERATURE} gen_ai.request.temperature\n */\nexport type GEN_AI_REQUEST_TEMPERATURE_TYPE = number;\n\n// Path: model/attributes/gen_ai/gen_ai__request__top_k.json\n\n/**\n * Limits the model to only consider the K most likely next tokens, where K is an integer (e.g., top_k=20 means only the 20 highest probability tokens are considered). `gen_ai.request.top_k`\n *\n * Attribute Value Type: `number` {@link GEN_AI_REQUEST_TOP_K_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link AI_TOP_K} `ai.top_k`\n *\n * @example 35\n */\nexport const GEN_AI_REQUEST_TOP_K = 'gen_ai.request.top_k';\n\n/**\n * Type for {@link GEN_AI_REQUEST_TOP_K} gen_ai.request.top_k\n */\nexport type GEN_AI_REQUEST_TOP_K_TYPE = number;\n\n// Path: model/attributes/gen_ai/gen_ai__request__top_p.json\n\n/**\n * Limits the model to only consider tokens whose cumulative probability mass adds up to p, where p is a float between 0 and 1 (e.g., top_p=0.7 means only tokens that sum up to 70% of the probability mass are considered). `gen_ai.request.top_p`\n *\n * Attribute Value Type: `number` {@link GEN_AI_REQUEST_TOP_P_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link AI_TOP_P} `ai.top_p`\n *\n * @example 0.7\n */\nexport const GEN_AI_REQUEST_TOP_P = 'gen_ai.request.top_p';\n\n/**\n * Type for {@link GEN_AI_REQUEST_TOP_P} gen_ai.request.top_p\n */\nexport type GEN_AI_REQUEST_TOP_P_TYPE = number;\n\n// Path: model/attributes/gen_ai/gen_ai__response__finish_reasons.json\n\n/**\n * The reason why the model stopped generating. `gen_ai.response.finish_reasons`\n *\n * Attribute Value Type: `string` {@link GEN_AI_RESPONSE_FINISH_REASONS_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link AI_FINISH_REASON} `ai.finish_reason`\n *\n * @example \"COMPLETE\"\n */\nexport const GEN_AI_RESPONSE_FINISH_REASONS = 'gen_ai.response.finish_reasons';\n\n/**\n * Type for {@link GEN_AI_RESPONSE_FINISH_REASONS} gen_ai.response.finish_reasons\n */\nexport type GEN_AI_RESPONSE_FINISH_REASONS_TYPE = string;\n\n// Path: model/attributes/gen_ai/gen_ai__response__id.json\n\n/**\n * Unique identifier for the completion. `gen_ai.response.id`\n *\n * Attribute Value Type: `string` {@link GEN_AI_RESPONSE_ID_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link AI_GENERATION_ID} `ai.generation_id`\n *\n * @example \"gen_123abc\"\n */\nexport const GEN_AI_RESPONSE_ID = 'gen_ai.response.id';\n\n/**\n * Type for {@link GEN_AI_RESPONSE_ID} gen_ai.response.id\n */\nexport type GEN_AI_RESPONSE_ID_TYPE = string;\n\n// Path: model/attributes/gen_ai/gen_ai__response__model.json\n\n/**\n * The vendor-specific ID of the model used. `gen_ai.response.model`\n *\n * Attribute Value Type: `string` {@link GEN_AI_RESPONSE_MODEL_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link AI_MODEL_ID} `ai.model_id`\n *\n * @example \"gpt-4\"\n */\nexport const GEN_AI_RESPONSE_MODEL = 'gen_ai.response.model';\n\n/**\n * Type for {@link GEN_AI_RESPONSE_MODEL} gen_ai.response.model\n */\nexport type GEN_AI_RESPONSE_MODEL_TYPE = string;\n\n// Path: model/attributes/gen_ai/gen_ai__response__streaming.json\n\n/**\n * Whether or not the AI model call's response was streamed back asynchronously `gen_ai.response.streaming`\n *\n * Attribute Value Type: `boolean` {@link GEN_AI_RESPONSE_STREAMING_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link AI_STREAMING} `ai.streaming`\n *\n * @example true\n */\nexport const GEN_AI_RESPONSE_STREAMING = 'gen_ai.response.streaming';\n\n/**\n * Type for {@link GEN_AI_RESPONSE_STREAMING} gen_ai.response.streaming\n */\nexport type GEN_AI_RESPONSE_STREAMING_TYPE = boolean;\n\n// Path: model/attributes/gen_ai/gen_ai__response__text.json\n\n/**\n * The model's response text messages. It has to be a stringified version of an array of response text messages. `gen_ai.response.text`\n *\n * Attribute Value Type: `string` {@link GEN_AI_RESPONSE_TEXT_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @deprecated Use {@link GEN_AI_OUTPUT_MESSAGES} (gen_ai.output.messages) instead\n * @example \"[\\\"The weather in Paris is rainy and overcast, with temperatures around 57°F\\\", \\\"The weather in London is sunny and warm, with temperatures around 65°F\\\"]\"\n */\nexport const GEN_AI_RESPONSE_TEXT = 'gen_ai.response.text';\n\n/**\n * Type for {@link GEN_AI_RESPONSE_TEXT} gen_ai.response.text\n */\nexport type GEN_AI_RESPONSE_TEXT_TYPE = string;\n\n// Path: model/attributes/gen_ai/gen_ai__response__time_to_first_chunk.json\n\n/**\n * Time in seconds when the first response content chunk arrived in streaming responses. `gen_ai.response.time_to_first_chunk`\n *\n * Attribute Value Type: `number` {@link GEN_AI_RESPONSE_TIME_TO_FIRST_CHUNK_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link GEN_AI_RESPONSE_TIME_TO_FIRST_TOKEN} `gen_ai.response.time_to_first_token`\n *\n * @example 0.6853435\n */\nexport const GEN_AI_RESPONSE_TIME_TO_FIRST_CHUNK = 'gen_ai.response.time_to_first_chunk';\n\n/**\n * Type for {@link GEN_AI_RESPONSE_TIME_TO_FIRST_CHUNK} gen_ai.response.time_to_first_chunk\n */\nexport type GEN_AI_RESPONSE_TIME_TO_FIRST_CHUNK_TYPE = number;\n\n// Path: model/attributes/gen_ai/gen_ai__response__time_to_first_token.json\n\n/**\n * Time in seconds when the first response content chunk arrived in streaming responses. `gen_ai.response.time_to_first_token`\n *\n * Attribute Value Type: `number` {@link GEN_AI_RESPONSE_TIME_TO_FIRST_TOKEN_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link GEN_AI_RESPONSE_TIME_TO_FIRST_CHUNK} `gen_ai.response.time_to_first_chunk`\n *\n * @deprecated Use {@link GEN_AI_RESPONSE_TIME_TO_FIRST_CHUNK} (gen_ai.response.time_to_first_chunk) instead\n * @example 0.6853435\n */\nexport const GEN_AI_RESPONSE_TIME_TO_FIRST_TOKEN = 'gen_ai.response.time_to_first_token';\n\n/**\n * Type for {@link GEN_AI_RESPONSE_TIME_TO_FIRST_TOKEN} gen_ai.response.time_to_first_token\n */\nexport type GEN_AI_RESPONSE_TIME_TO_FIRST_TOKEN_TYPE = number;\n\n// Path: model/attributes/gen_ai/gen_ai__response__tokens_per_second.json\n\n/**\n * The total output tokens per seconds throughput `gen_ai.response.tokens_per_second`\n *\n * Attribute Value Type: `number` {@link GEN_AI_RESPONSE_TOKENS_PER_SECOND_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 12345.67\n */\nexport const GEN_AI_RESPONSE_TOKENS_PER_SECOND = 'gen_ai.response.tokens_per_second';\n\n/**\n * Type for {@link GEN_AI_RESPONSE_TOKENS_PER_SECOND} gen_ai.response.tokens_per_second\n */\nexport type GEN_AI_RESPONSE_TOKENS_PER_SECOND_TYPE = number;\n\n// Path: model/attributes/gen_ai/gen_ai__response__tool_calls.json\n\n/**\n * The tool calls in the model's response. It has to be a stringified version of an array of objects. `gen_ai.response.tool_calls`\n *\n * Attribute Value Type: `string` {@link GEN_AI_RESPONSE_TOOL_CALLS_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @deprecated Use {@link GEN_AI_OUTPUT_MESSAGES} (gen_ai.output.messages) instead\n * @example \"[{\\\"name\\\": \\\"get_weather\\\", \\\"arguments\\\": {\\\"location\\\": \\\"Paris\\\"}}]\"\n */\nexport const GEN_AI_RESPONSE_TOOL_CALLS = 'gen_ai.response.tool_calls';\n\n/**\n * Type for {@link GEN_AI_RESPONSE_TOOL_CALLS} gen_ai.response.tool_calls\n */\nexport type GEN_AI_RESPONSE_TOOL_CALLS_TYPE = string;\n\n// Path: model/attributes/gen_ai/gen_ai__system.json\n\n/**\n * The provider of the model. `gen_ai.system`\n *\n * Attribute Value Type: `string` {@link GEN_AI_SYSTEM_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link AI_MODEL_PROVIDER} `ai.model.provider`, {@link GEN_AI_PROVIDER_NAME} `gen_ai.provider.name`\n *\n * @deprecated Use {@link GEN_AI_PROVIDER_NAME} (gen_ai.provider.name) instead\n * @example \"openai\"\n */\nexport const GEN_AI_SYSTEM = 'gen_ai.system';\n\n/**\n * Type for {@link GEN_AI_SYSTEM} gen_ai.system\n */\nexport type GEN_AI_SYSTEM_TYPE = string;\n\n// Path: model/attributes/gen_ai/gen_ai__system_instructions.json\n\n/**\n * The system instructions passed to the model. `gen_ai.system_instructions`\n *\n * Attribute Value Type: `string` {@link GEN_AI_SYSTEM_INSTRUCTIONS_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link AI_PREAMBLE} `ai.preamble`\n *\n * @example \"You are a helpful assistant\"\n */\nexport const GEN_AI_SYSTEM_INSTRUCTIONS = 'gen_ai.system_instructions';\n\n/**\n * Type for {@link GEN_AI_SYSTEM_INSTRUCTIONS} gen_ai.system_instructions\n */\nexport type GEN_AI_SYSTEM_INSTRUCTIONS_TYPE = string;\n\n// Path: model/attributes/gen_ai/gen_ai__system__message.json\n\n/**\n * The system instructions passed to the model. `gen_ai.system.message`\n *\n * Attribute Value Type: `string` {@link GEN_AI_SYSTEM_MESSAGE_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @deprecated Use {@link GEN_AI_SYSTEM_INSTRUCTIONS} (gen_ai.system_instructions) instead\n * @example \"You are a helpful assistant\"\n */\nexport const GEN_AI_SYSTEM_MESSAGE = 'gen_ai.system.message';\n\n/**\n * Type for {@link GEN_AI_SYSTEM_MESSAGE} gen_ai.system.message\n */\nexport type GEN_AI_SYSTEM_MESSAGE_TYPE = string;\n\n// Path: model/attributes/gen_ai/gen_ai__tool__call__arguments.json\n\n/**\n * The arguments of the tool call. It has to be a stringified version of the arguments to the tool. `gen_ai.tool.call.arguments`\n *\n * Attribute Value Type: `string` {@link GEN_AI_TOOL_CALL_ARGUMENTS_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link GEN_AI_TOOL_INPUT} `gen_ai.tool.input`\n *\n * @example \"{\\\"location\\\": \\\"Paris\\\"}\"\n */\nexport const GEN_AI_TOOL_CALL_ARGUMENTS = 'gen_ai.tool.call.arguments';\n\n/**\n * Type for {@link GEN_AI_TOOL_CALL_ARGUMENTS} gen_ai.tool.call.arguments\n */\nexport type GEN_AI_TOOL_CALL_ARGUMENTS_TYPE = string;\n\n// Path: model/attributes/gen_ai/gen_ai__tool__call__result.json\n\n/**\n * The result of the tool call. It has to be a stringified version of the result of the tool. `gen_ai.tool.call.result`\n *\n * Attribute Value Type: `string` {@link GEN_AI_TOOL_CALL_RESULT_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link GEN_AI_TOOL_OUTPUT} `gen_ai.tool.output`, {@link GEN_AI_TOOL_MESSAGE} `gen_ai.tool.message`, {@link MCP_TOOL_RESULT_CONTENT} `mcp.tool.result.content`\n *\n * @example \"rainy, 57°F\"\n */\nexport const GEN_AI_TOOL_CALL_RESULT = 'gen_ai.tool.call.result';\n\n/**\n * Type for {@link GEN_AI_TOOL_CALL_RESULT} gen_ai.tool.call.result\n */\nexport type GEN_AI_TOOL_CALL_RESULT_TYPE = string;\n\n// Path: model/attributes/gen_ai/gen_ai__tool__definitions.json\n\n/**\n * The list of source system tool definitions available to the GenAI agent or model. `gen_ai.tool.definitions`\n *\n * Attribute Value Type: `string` {@link GEN_AI_TOOL_DEFINITIONS_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"[{\\\"type\\\": \\\"function\\\", \\\"name\\\": \\\"get_current_weather\\\", \\\"description\\\": \\\"Get the current weather in a given location\\\", \\\"parameters\\\": {\\\"type\\\": \\\"object\\\", \\\"properties\\\": {\\\"location\\\": {\\\"type\\\": \\\"string\\\", \\\"description\\\": \\\"The city and state, e.g. San Francisco, CA\\\"}, \\\"unit\\\": {\\\"type\\\": \\\"string\\\", \\\"enum\\\": [\\\"celsius\\\", \\\"fahrenheit\\\"]}}, \\\"required\\\": [\\\"location\\\", \\\"unit\\\"]}}]\"\n */\nexport const GEN_AI_TOOL_DEFINITIONS = 'gen_ai.tool.definitions';\n\n/**\n * Type for {@link GEN_AI_TOOL_DEFINITIONS} gen_ai.tool.definitions\n */\nexport type GEN_AI_TOOL_DEFINITIONS_TYPE = string;\n\n// Path: model/attributes/gen_ai/gen_ai__tool__description.json\n\n/**\n * The description of the tool being used. `gen_ai.tool.description`\n *\n * Attribute Value Type: `string` {@link GEN_AI_TOOL_DESCRIPTION_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"Searches the web for current information about a topic\"\n */\nexport const GEN_AI_TOOL_DESCRIPTION = 'gen_ai.tool.description';\n\n/**\n * Type for {@link GEN_AI_TOOL_DESCRIPTION} gen_ai.tool.description\n */\nexport type GEN_AI_TOOL_DESCRIPTION_TYPE = string;\n\n// Path: model/attributes/gen_ai/gen_ai__tool__input.json\n\n/**\n * The input of the tool being used. It has to be a stringified version of the input to the tool. `gen_ai.tool.input`\n *\n * Attribute Value Type: `string` {@link GEN_AI_TOOL_INPUT_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link GEN_AI_TOOL_CALL_ARGUMENTS} `gen_ai.tool.call.arguments`\n *\n * @deprecated Use {@link GEN_AI_TOOL_CALL_ARGUMENTS} (gen_ai.tool.call.arguments) instead\n * @example \"{\\\"location\\\": \\\"Paris\\\"}\"\n */\nexport const GEN_AI_TOOL_INPUT = 'gen_ai.tool.input';\n\n/**\n * Type for {@link GEN_AI_TOOL_INPUT} gen_ai.tool.input\n */\nexport type GEN_AI_TOOL_INPUT_TYPE = string;\n\n// Path: model/attributes/gen_ai/gen_ai__tool__message.json\n\n/**\n * The response from a tool or function call passed to the model. `gen_ai.tool.message`\n *\n * Attribute Value Type: `string` {@link GEN_AI_TOOL_MESSAGE_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link GEN_AI_TOOL_CALL_RESULT} `gen_ai.tool.call.result`, {@link GEN_AI_TOOL_OUTPUT} `gen_ai.tool.output`, {@link MCP_TOOL_RESULT_CONTENT} `mcp.tool.result.content`\n *\n * @deprecated Use {@link GEN_AI_TOOL_CALL_RESULT} (gen_ai.tool.call.result) instead\n * @example \"rainy, 57°F\"\n */\nexport const GEN_AI_TOOL_MESSAGE = 'gen_ai.tool.message';\n\n/**\n * Type for {@link GEN_AI_TOOL_MESSAGE} gen_ai.tool.message\n */\nexport type GEN_AI_TOOL_MESSAGE_TYPE = string;\n\n// Path: model/attributes/gen_ai/gen_ai__tool__name.json\n\n/**\n * Name of the tool utilized by the agent. `gen_ai.tool.name`\n *\n * Attribute Value Type: `string` {@link GEN_AI_TOOL_NAME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link AI_FUNCTION_CALL} `ai.function_call`, {@link MCP_TOOL_NAME} `mcp.tool.name`\n *\n * @example \"Flights\"\n */\nexport const GEN_AI_TOOL_NAME = 'gen_ai.tool.name';\n\n/**\n * Type for {@link GEN_AI_TOOL_NAME} gen_ai.tool.name\n */\nexport type GEN_AI_TOOL_NAME_TYPE = string;\n\n// Path: model/attributes/gen_ai/gen_ai__tool__output.json\n\n/**\n * The output of the tool being used. It has to be a stringified version of the output of the tool. `gen_ai.tool.output`\n *\n * Attribute Value Type: `string` {@link GEN_AI_TOOL_OUTPUT_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link GEN_AI_TOOL_CALL_RESULT} `gen_ai.tool.call.result`, {@link GEN_AI_TOOL_MESSAGE} `gen_ai.tool.message`, {@link MCP_TOOL_RESULT_CONTENT} `mcp.tool.result.content`\n *\n * @deprecated Use {@link GEN_AI_TOOL_CALL_RESULT} (gen_ai.tool.call.result) instead\n * @example \"rainy, 57°F\"\n */\nexport const GEN_AI_TOOL_OUTPUT = 'gen_ai.tool.output';\n\n/**\n * Type for {@link GEN_AI_TOOL_OUTPUT} gen_ai.tool.output\n */\nexport type GEN_AI_TOOL_OUTPUT_TYPE = string;\n\n// Path: model/attributes/gen_ai/gen_ai__tool__type.json\n\n/**\n * The type of tool being used. `gen_ai.tool.type`\n *\n * Attribute Value Type: `string` {@link GEN_AI_TOOL_TYPE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @deprecated  - The gen_ai.tool.type attribute is deprecated and should no longer be set.\n * @example \"function\"\n */\nexport const GEN_AI_TOOL_TYPE = 'gen_ai.tool.type';\n\n/**\n * Type for {@link GEN_AI_TOOL_TYPE} gen_ai.tool.type\n */\nexport type GEN_AI_TOOL_TYPE_TYPE = string;\n\n// Path: model/attributes/gen_ai/gen_ai__usage__cache_creation__input_tokens.json\n\n/**\n * The number of tokens written to the cache when processing the AI input (prompt). `gen_ai.usage.cache_creation.input_tokens`\n *\n * Attribute Value Type: `number` {@link GEN_AI_USAGE_CACHE_CREATION_INPUT_TOKENS_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link GEN_AI_USAGE_INPUT_TOKENS_CACHE_WRITE} `gen_ai.usage.input_tokens.cache_write`\n *\n * @example 100\n */\nexport const GEN_AI_USAGE_CACHE_CREATION_INPUT_TOKENS = 'gen_ai.usage.cache_creation.input_tokens';\n\n/**\n * Type for {@link GEN_AI_USAGE_CACHE_CREATION_INPUT_TOKENS} gen_ai.usage.cache_creation.input_tokens\n */\nexport type GEN_AI_USAGE_CACHE_CREATION_INPUT_TOKENS_TYPE = number;\n\n// Path: model/attributes/gen_ai/gen_ai__usage__cache_read__input_tokens.json\n\n/**\n * The number of cached tokens used to process the AI input (prompt). `gen_ai.usage.cache_read.input_tokens`\n *\n * Attribute Value Type: `number` {@link GEN_AI_USAGE_CACHE_READ_INPUT_TOKENS_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link GEN_AI_USAGE_INPUT_TOKENS_CACHED} `gen_ai.usage.input_tokens.cached`\n *\n * @example 50\n */\nexport const GEN_AI_USAGE_CACHE_READ_INPUT_TOKENS = 'gen_ai.usage.cache_read.input_tokens';\n\n/**\n * Type for {@link GEN_AI_USAGE_CACHE_READ_INPUT_TOKENS} gen_ai.usage.cache_read.input_tokens\n */\nexport type GEN_AI_USAGE_CACHE_READ_INPUT_TOKENS_TYPE = number;\n\n// Path: model/attributes/gen_ai/gen_ai__usage__completion_tokens.json\n\n/**\n * The number of tokens used in the GenAI response (completion). `gen_ai.usage.completion_tokens`\n *\n * Attribute Value Type: `number` {@link GEN_AI_USAGE_COMPLETION_TOKENS_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link AI_COMPLETION_TOKENS_USED} `ai.completion_tokens.used`, {@link GEN_AI_USAGE_OUTPUT_TOKENS} `gen_ai.usage.output_tokens`\n *\n * @deprecated Use {@link GEN_AI_USAGE_OUTPUT_TOKENS} (gen_ai.usage.output_tokens) instead\n * @example 10\n */\nexport const GEN_AI_USAGE_COMPLETION_TOKENS = 'gen_ai.usage.completion_tokens';\n\n/**\n * Type for {@link GEN_AI_USAGE_COMPLETION_TOKENS} gen_ai.usage.completion_tokens\n */\nexport type GEN_AI_USAGE_COMPLETION_TOKENS_TYPE = number;\n\n// Path: model/attributes/gen_ai/gen_ai__usage__input_tokens.json\n\n/**\n * The number of tokens used to process the AI input (prompt) including cached input tokens. `gen_ai.usage.input_tokens`\n *\n * Attribute Value Type: `number` {@link GEN_AI_USAGE_INPUT_TOKENS_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link AI_PROMPT_TOKENS_USED} `ai.prompt_tokens.used`, {@link GEN_AI_USAGE_PROMPT_TOKENS} `gen_ai.usage.prompt_tokens`\n *\n * @example 10\n */\nexport const GEN_AI_USAGE_INPUT_TOKENS = 'gen_ai.usage.input_tokens';\n\n/**\n * Type for {@link GEN_AI_USAGE_INPUT_TOKENS} gen_ai.usage.input_tokens\n */\nexport type GEN_AI_USAGE_INPUT_TOKENS_TYPE = number;\n\n// Path: model/attributes/gen_ai/gen_ai__usage__input_tokens__cached.json\n\n/**\n * The number of cached tokens used to process the AI input (prompt). `gen_ai.usage.input_tokens.cached`\n *\n * Attribute Value Type: `number` {@link GEN_AI_USAGE_INPUT_TOKENS_CACHED_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link GEN_AI_USAGE_CACHE_READ_INPUT_TOKENS} `gen_ai.usage.cache_read.input_tokens`\n *\n * @deprecated Use {@link GEN_AI_USAGE_CACHE_READ_INPUT_TOKENS} (gen_ai.usage.cache_read.input_tokens) instead\n * @example 50\n */\nexport const GEN_AI_USAGE_INPUT_TOKENS_CACHED = 'gen_ai.usage.input_tokens.cached';\n\n/**\n * Type for {@link GEN_AI_USAGE_INPUT_TOKENS_CACHED} gen_ai.usage.input_tokens.cached\n */\nexport type GEN_AI_USAGE_INPUT_TOKENS_CACHED_TYPE = number;\n\n// Path: model/attributes/gen_ai/gen_ai__usage__input_tokens__cache_write.json\n\n/**\n * The number of tokens written to the cache when processing the AI input (prompt). `gen_ai.usage.input_tokens.cache_write`\n *\n * Attribute Value Type: `number` {@link GEN_AI_USAGE_INPUT_TOKENS_CACHE_WRITE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link GEN_AI_USAGE_CACHE_CREATION_INPUT_TOKENS} `gen_ai.usage.cache_creation.input_tokens`\n *\n * @deprecated Use {@link GEN_AI_USAGE_CACHE_CREATION_INPUT_TOKENS} (gen_ai.usage.cache_creation.input_tokens) instead\n * @example 100\n */\nexport const GEN_AI_USAGE_INPUT_TOKENS_CACHE_WRITE = 'gen_ai.usage.input_tokens.cache_write';\n\n/**\n * Type for {@link GEN_AI_USAGE_INPUT_TOKENS_CACHE_WRITE} gen_ai.usage.input_tokens.cache_write\n */\nexport type GEN_AI_USAGE_INPUT_TOKENS_CACHE_WRITE_TYPE = number;\n\n// Path: model/attributes/gen_ai/gen_ai__usage__output_tokens.json\n\n/**\n * The number of tokens used for creating the AI output (including reasoning tokens). `gen_ai.usage.output_tokens`\n *\n * Attribute Value Type: `number` {@link GEN_AI_USAGE_OUTPUT_TOKENS_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link AI_COMPLETION_TOKENS_USED} `ai.completion_tokens.used`, {@link GEN_AI_USAGE_COMPLETION_TOKENS} `gen_ai.usage.completion_tokens`\n *\n * @example 10\n */\nexport const GEN_AI_USAGE_OUTPUT_TOKENS = 'gen_ai.usage.output_tokens';\n\n/**\n * Type for {@link GEN_AI_USAGE_OUTPUT_TOKENS} gen_ai.usage.output_tokens\n */\nexport type GEN_AI_USAGE_OUTPUT_TOKENS_TYPE = number;\n\n// Path: model/attributes/gen_ai/gen_ai__usage__output_tokens__reasoning.json\n\n/**\n * The number of tokens used for reasoning to create the AI output. `gen_ai.usage.output_tokens.reasoning`\n *\n * Attribute Value Type: `number` {@link GEN_AI_USAGE_OUTPUT_TOKENS_REASONING_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link GEN_AI_USAGE_REASONING_OUTPUT_TOKENS} `gen_ai.usage.reasoning.output_tokens`\n *\n * @deprecated Use {@link GEN_AI_USAGE_REASONING_OUTPUT_TOKENS} (gen_ai.usage.reasoning.output_tokens) instead\n * @example 75\n */\nexport const GEN_AI_USAGE_OUTPUT_TOKENS_REASONING = 'gen_ai.usage.output_tokens.reasoning';\n\n/**\n * Type for {@link GEN_AI_USAGE_OUTPUT_TOKENS_REASONING} gen_ai.usage.output_tokens.reasoning\n */\nexport type GEN_AI_USAGE_OUTPUT_TOKENS_REASONING_TYPE = number;\n\n// Path: model/attributes/gen_ai/gen_ai__usage__prompt_tokens.json\n\n/**\n * The number of tokens used in the GenAI input (prompt). `gen_ai.usage.prompt_tokens`\n *\n * Attribute Value Type: `number` {@link GEN_AI_USAGE_PROMPT_TOKENS_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link AI_PROMPT_TOKENS_USED} `ai.prompt_tokens.used`, {@link GEN_AI_USAGE_INPUT_TOKENS} `gen_ai.usage.input_tokens`\n *\n * @deprecated Use {@link GEN_AI_USAGE_INPUT_TOKENS} (gen_ai.usage.input_tokens) instead\n * @example 20\n */\nexport const GEN_AI_USAGE_PROMPT_TOKENS = 'gen_ai.usage.prompt_tokens';\n\n/**\n * Type for {@link GEN_AI_USAGE_PROMPT_TOKENS} gen_ai.usage.prompt_tokens\n */\nexport type GEN_AI_USAGE_PROMPT_TOKENS_TYPE = number;\n\n// Path: model/attributes/gen_ai/gen_ai__usage__reasoning__output_tokens.json\n\n/**\n * The number of tokens used for reasoning to create the AI output. `gen_ai.usage.reasoning.output_tokens`\n *\n * Attribute Value Type: `number` {@link GEN_AI_USAGE_REASONING_OUTPUT_TOKENS_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link GEN_AI_USAGE_OUTPUT_TOKENS_REASONING} `gen_ai.usage.output_tokens.reasoning`\n *\n * @example 75\n */\nexport const GEN_AI_USAGE_REASONING_OUTPUT_TOKENS = 'gen_ai.usage.reasoning.output_tokens';\n\n/**\n * Type for {@link GEN_AI_USAGE_REASONING_OUTPUT_TOKENS} gen_ai.usage.reasoning.output_tokens\n */\nexport type GEN_AI_USAGE_REASONING_OUTPUT_TOKENS_TYPE = number;\n\n// Path: model/attributes/gen_ai/gen_ai__usage__total_tokens.json\n\n/**\n * The total number of tokens used to process the prompt. (input tokens plus output todkens) `gen_ai.usage.total_tokens`\n *\n * Attribute Value Type: `number` {@link GEN_AI_USAGE_TOTAL_TOKENS_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link AI_TOTAL_TOKENS_USED} `ai.total_tokens.used`\n *\n * @example 20\n */\nexport const GEN_AI_USAGE_TOTAL_TOKENS = 'gen_ai.usage.total_tokens';\n\n/**\n * Type for {@link GEN_AI_USAGE_TOTAL_TOKENS} gen_ai.usage.total_tokens\n */\nexport type GEN_AI_USAGE_TOTAL_TOKENS_TYPE = number;\n\n// Path: model/attributes/graphql/graphql__document.json\n\n/**\n * The GraphQL document being executed. `graphql.document`\n *\n * Attribute Value Type: `string` {@link GRAPHQL_DOCUMENT_TYPE}\n *\n * Apply Scrubbing: auto - The document may contain sensitive information in arguments or variables. Instrumentation should redact sensitive information when possible.\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"query findBookById { bookById(id: ?) { name } }\"\n */\nexport const GRAPHQL_DOCUMENT = 'graphql.document';\n\n/**\n * Type for {@link GRAPHQL_DOCUMENT} graphql.document\n */\nexport type GRAPHQL_DOCUMENT_TYPE = string;\n\n// Path: model/attributes/graphql/graphql__operation__name.json\n\n/**\n * The name of the operation being executed. `graphql.operation.name`\n *\n * Attribute Value Type: `string` {@link GRAPHQL_OPERATION_NAME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"findBookById\"\n */\nexport const GRAPHQL_OPERATION_NAME = 'graphql.operation.name';\n\n/**\n * Type for {@link GRAPHQL_OPERATION_NAME} graphql.operation.name\n */\nexport type GRAPHQL_OPERATION_NAME_TYPE = string;\n\n// Path: model/attributes/graphql/graphql__operation__type.json\n\n/**\n * The type of the operation being executed. `graphql.operation.type`\n *\n * Attribute Value Type: `string` {@link GRAPHQL_OPERATION_TYPE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"query\"\n */\nexport const GRAPHQL_OPERATION_TYPE = 'graphql.operation.type';\n\n/**\n * Type for {@link GRAPHQL_OPERATION_TYPE} graphql.operation.type\n */\nexport type GRAPHQL_OPERATION_TYPE_TYPE = string;\n\n// Path: model/attributes/hardwareConcurrency.json\n\n/**\n * The number of logical CPU cores available. `hardwareConcurrency`\n *\n * Attribute Value Type: `string` {@link HARDWARECONCURRENCY_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link DEVICE_PROCESSOR_COUNT} `device.processor_count`\n *\n * @deprecated Use {@link DEVICE_PROCESSOR_COUNT} (device.processor_count) instead - Old namespace-less attribute, to be replaced with device.processor_count for span-first future\n * @example \"14\"\n */\nexport const HARDWARECONCURRENCY = 'hardwareConcurrency';\n\n/**\n * Type for {@link HARDWARECONCURRENCY} hardwareConcurrency\n */\nexport type HARDWARECONCURRENCY_TYPE = string;\n\n// Path: model/attributes/http/http__client_ip.json\n\n/**\n * Client address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. `http.client_ip`\n *\n * Attribute Value Type: `string` {@link HTTP_CLIENT_IP_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link CLIENT_ADDRESS} `client.address`\n *\n * @deprecated Use {@link CLIENT_ADDRESS} (client.address) instead\n * @example \"example.com\"\n */\nexport const HTTP_CLIENT_IP = 'http.client_ip';\n\n/**\n * Type for {@link HTTP_CLIENT_IP} http.client_ip\n */\nexport type HTTP_CLIENT_IP_TYPE = string;\n\n// Path: model/attributes/http/http__decoded_response_content_length.json\n\n/**\n * The decoded body size of the response (in bytes). `http.decoded_response_content_length`\n *\n * Attribute Value Type: `number` {@link HTTP_DECODED_RESPONSE_CONTENT_LENGTH_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 456\n */\nexport const HTTP_DECODED_RESPONSE_CONTENT_LENGTH = 'http.decoded_response_content_length';\n\n/**\n * Type for {@link HTTP_DECODED_RESPONSE_CONTENT_LENGTH} http.decoded_response_content_length\n */\nexport type HTTP_DECODED_RESPONSE_CONTENT_LENGTH_TYPE = number;\n\n// Path: model/attributes/http/http__flavor.json\n\n/**\n * The actual version of the protocol used for network communication. `http.flavor`\n *\n * Attribute Value Type: `string` {@link HTTP_FLAVOR_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link NETWORK_PROTOCOL_VERSION} `network.protocol.version`, {@link NET_PROTOCOL_VERSION} `net.protocol.version`\n *\n * @deprecated Use {@link NETWORK_PROTOCOL_VERSION} (network.protocol.version) instead\n * @example \"1.1\"\n */\nexport const HTTP_FLAVOR = 'http.flavor';\n\n/**\n * Type for {@link HTTP_FLAVOR} http.flavor\n */\nexport type HTTP_FLAVOR_TYPE = string;\n\n// Path: model/attributes/http/http__fragment.json\n\n/**\n * The fragments present in the URI. Note that this contains the leading # character, while the `url.fragment` attribute does not. `http.fragment`\n *\n * Attribute Value Type: `string` {@link HTTP_FRAGMENT_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"#details\"\n */\nexport const HTTP_FRAGMENT = 'http.fragment';\n\n/**\n * Type for {@link HTTP_FRAGMENT} http.fragment\n */\nexport type HTTP_FRAGMENT_TYPE = string;\n\n// Path: model/attributes/http/http__host.json\n\n/**\n * The domain name. `http.host`\n *\n * Attribute Value Type: `string` {@link HTTP_HOST_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link SERVER_ADDRESS} `server.address`, {@link CLIENT_ADDRESS} `client.address`, {@link HTTP_SERVER_NAME} `http.server_name`, {@link NET_HOST_NAME} `net.host.name`, {@link SERVER_NAME} `server_name`\n *\n * @deprecated Use {@link SERVER_ADDRESS} (server.address) instead - Deprecated, use one of `server.address` or `client.address`, depending on the usage\n * @example \"example.com\"\n */\nexport const HTTP_HOST = 'http.host';\n\n/**\n * Type for {@link HTTP_HOST} http.host\n */\nexport type HTTP_HOST_TYPE = string;\n\n// Path: model/attributes/http/http__method.json\n\n/**\n * The HTTP method used. `http.method`\n *\n * Attribute Value Type: `string` {@link HTTP_METHOD_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link HTTP_REQUEST_METHOD} `http.request.method`, {@link _HTTP_REQUEST_METHOD} `http.request_method`, {@link METHOD} `method`\n *\n * @deprecated Use {@link HTTP_REQUEST_METHOD} (http.request.method) instead\n * @example \"GET\"\n */\nexport const HTTP_METHOD = 'http.method';\n\n/**\n * Type for {@link HTTP_METHOD} http.method\n */\nexport type HTTP_METHOD_TYPE = string;\n\n// Path: model/attributes/http/http__query.json\n\n/**\n * The query string present in the URL. Note that this contains the leading ? character, while the `url.query` attribute does not. `http.query`\n *\n * Attribute Value Type: `string` {@link HTTP_QUERY_TYPE}\n *\n * Apply Scrubbing: auto - Query string values can contain sensitive information. Clients should attempt to scrub parameters that might contain sensitive information.\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"?foo=bar&bar=baz\"\n */\nexport const HTTP_QUERY = 'http.query';\n\n/**\n * Type for {@link HTTP_QUERY} http.query\n */\nexport type HTTP_QUERY_TYPE = string;\n\n// Path: model/attributes/http/http__request__body__data.json\n\n/**\n * HTTP request body data. Can be given as string or structural data of any format. `http.request.body.data`\n *\n * Attribute Value Type: `string` {@link HTTP_REQUEST_BODY_DATA_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"[{\\\"role\\\": \\\"user\\\", \\\"message\\\": \\\"hello\\\"}]\"\n */\nexport const HTTP_REQUEST_BODY_DATA = 'http.request.body.data';\n\n/**\n * Type for {@link HTTP_REQUEST_BODY_DATA} http.request.body.data\n */\nexport type HTTP_REQUEST_BODY_DATA_TYPE = string;\n\n// Path: model/attributes/http/http__request__connection_end.json\n\n/**\n * The UNIX timestamp representing the time immediately after the browser finishes establishing the connection to the server to retrieve the resource. The timestamp value includes the time interval to establish the transport connection, as well as other time intervals such as TLS handshake and SOCKS authentication. `http.request.connection_end`\n *\n * Attribute Value Type: `number` {@link HTTP_REQUEST_CONNECTION_END_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 1732829555.15\n */\nexport const HTTP_REQUEST_CONNECTION_END = 'http.request.connection_end';\n\n/**\n * Type for {@link HTTP_REQUEST_CONNECTION_END} http.request.connection_end\n */\nexport type HTTP_REQUEST_CONNECTION_END_TYPE = number;\n\n// Path: model/attributes/http/http__request__connect_start.json\n\n/**\n * The UNIX timestamp representing the time immediately before the user agent starts establishing the connection to the server to retrieve the resource. `http.request.connect_start`\n *\n * Attribute Value Type: `number` {@link HTTP_REQUEST_CONNECT_START_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 1732829555.111\n */\nexport const HTTP_REQUEST_CONNECT_START = 'http.request.connect_start';\n\n/**\n * Type for {@link HTTP_REQUEST_CONNECT_START} http.request.connect_start\n */\nexport type HTTP_REQUEST_CONNECT_START_TYPE = number;\n\n// Path: model/attributes/http/http__request__domain_lookup_end.json\n\n/**\n * The UNIX timestamp representing the time immediately after the browser finishes the domain-name lookup for the resource. `http.request.domain_lookup_end`\n *\n * Attribute Value Type: `number` {@link HTTP_REQUEST_DOMAIN_LOOKUP_END_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 1732829555.201\n */\nexport const HTTP_REQUEST_DOMAIN_LOOKUP_END = 'http.request.domain_lookup_end';\n\n/**\n * Type for {@link HTTP_REQUEST_DOMAIN_LOOKUP_END} http.request.domain_lookup_end\n */\nexport type HTTP_REQUEST_DOMAIN_LOOKUP_END_TYPE = number;\n\n// Path: model/attributes/http/http__request__domain_lookup_start.json\n\n/**\n * The UNIX timestamp representing the time immediately before the browser starts the domain name lookup for the resource. `http.request.domain_lookup_start`\n *\n * Attribute Value Type: `number` {@link HTTP_REQUEST_DOMAIN_LOOKUP_START_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 1732829555.322\n */\nexport const HTTP_REQUEST_DOMAIN_LOOKUP_START = 'http.request.domain_lookup_start';\n\n/**\n * Type for {@link HTTP_REQUEST_DOMAIN_LOOKUP_START} http.request.domain_lookup_start\n */\nexport type HTTP_REQUEST_DOMAIN_LOOKUP_START_TYPE = number;\n\n// Path: model/attributes/http/http__request__fetch_start.json\n\n/**\n * The UNIX timestamp representing the time immediately before the browser starts to fetch the resource. `http.request.fetch_start`\n *\n * Attribute Value Type: `number` {@link HTTP_REQUEST_FETCH_START_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 1732829555.389\n */\nexport const HTTP_REQUEST_FETCH_START = 'http.request.fetch_start';\n\n/**\n * Type for {@link HTTP_REQUEST_FETCH_START} http.request.fetch_start\n */\nexport type HTTP_REQUEST_FETCH_START_TYPE = number;\n\n// Path: model/attributes/http/http__request__header__[key].json\n\n/**\n * HTTP request headers, <key> being the normalized HTTP Header name (lowercase), the value being the header values. `http.request.header.<key>`\n *\n * Attribute Value Type: `Array<string>` {@link HTTP_REQUEST_HEADER_KEY_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Has Dynamic Suffix: true\n *\n * @example \"http.request.header.custom-header=['foo', 'bar']\"\n */\nexport const HTTP_REQUEST_HEADER_KEY = 'http.request.header.<key>';\n\n/**\n * Base key for {@link HTTP_REQUEST_HEADER_KEY}. Use with a dynamic suffix, e.g. `${HTTP_REQUEST_HEADER_KEY_BASE}.${key}`.\n */\nexport const HTTP_REQUEST_HEADER_KEY_BASE = 'http.request.header';\n\n/**\n * Type for {@link HTTP_REQUEST_HEADER_KEY} http.request.header.<key>\n */\nexport type HTTP_REQUEST_HEADER_KEY_TYPE = Array<string>;\n\n// Path: model/attributes/http/http__request__method.json\n\n/**\n * The HTTP method used. `http.request.method`\n *\n * Attribute Value Type: `string` {@link HTTP_REQUEST_METHOD_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link METHOD} `method`, {@link HTTP_METHOD} `http.method`, {@link _HTTP_REQUEST_METHOD} `http.request_method`\n *\n * @example \"GET\"\n */\nexport const HTTP_REQUEST_METHOD = 'http.request.method';\n\n/**\n * Type for {@link HTTP_REQUEST_METHOD} http.request.method\n */\nexport type HTTP_REQUEST_METHOD_TYPE = string;\n\n// Path: model/attributes/http/http__request_method.json\n\n/**\n * The HTTP method used. `http.request_method`\n *\n * Attribute Value Type: `string` {@link _HTTP_REQUEST_METHOD_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link METHOD} `method`, {@link HTTP_METHOD} `http.method`, {@link HTTP_REQUEST_METHOD} `http.request.method`\n *\n * @deprecated Use {@link HTTP_REQUEST_METHOD} (http.request.method) instead\n * @example \"GET\"\n */\nexport const _HTTP_REQUEST_METHOD = 'http.request_method';\n\n/**\n * Type for {@link _HTTP_REQUEST_METHOD} http.request_method\n */\nexport type _HTTP_REQUEST_METHOD_TYPE = string;\n\n// Path: model/attributes/http/http__request__redirect_end.json\n\n/**\n * The UNIX timestamp representing the timestamp immediately after receiving the last byte of the response of the last redirect `http.request.redirect_end`\n *\n * Attribute Value Type: `number` {@link HTTP_REQUEST_REDIRECT_END_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 1732829558.502\n */\nexport const HTTP_REQUEST_REDIRECT_END = 'http.request.redirect_end';\n\n/**\n * Type for {@link HTTP_REQUEST_REDIRECT_END} http.request.redirect_end\n */\nexport type HTTP_REQUEST_REDIRECT_END_TYPE = number;\n\n// Path: model/attributes/http/http__request__redirect_start.json\n\n/**\n * The UNIX timestamp representing the start time of the fetch which that initiates the redirect. `http.request.redirect_start`\n *\n * Attribute Value Type: `number` {@link HTTP_REQUEST_REDIRECT_START_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 1732829555.495\n */\nexport const HTTP_REQUEST_REDIRECT_START = 'http.request.redirect_start';\n\n/**\n * Type for {@link HTTP_REQUEST_REDIRECT_START} http.request.redirect_start\n */\nexport type HTTP_REQUEST_REDIRECT_START_TYPE = number;\n\n// Path: model/attributes/http/http__request__request_start.json\n\n/**\n * The UNIX timestamp representing the time immediately before the browser starts requesting the resource from the server, cache, or local resource. If the transport connection fails and the browser retires the request, the value returned will be the start of the retry request. `http.request.request_start`\n *\n * Attribute Value Type: `number` {@link HTTP_REQUEST_REQUEST_START_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 1732829555.51\n */\nexport const HTTP_REQUEST_REQUEST_START = 'http.request.request_start';\n\n/**\n * Type for {@link HTTP_REQUEST_REQUEST_START} http.request.request_start\n */\nexport type HTTP_REQUEST_REQUEST_START_TYPE = number;\n\n// Path: model/attributes/http/http__request__resend_count.json\n\n/**\n * The ordinal number of request resending attempt (for any reason, including redirects). `http.request.resend_count`\n *\n * Attribute Value Type: `number` {@link HTTP_REQUEST_RESEND_COUNT_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 2\n */\nexport const HTTP_REQUEST_RESEND_COUNT = 'http.request.resend_count';\n\n/**\n * Type for {@link HTTP_REQUEST_RESEND_COUNT} http.request.resend_count\n */\nexport type HTTP_REQUEST_RESEND_COUNT_TYPE = number;\n\n// Path: model/attributes/http/http__request__response_end.json\n\n/**\n * The UNIX timestamp representing the time immediately after the browser receives the last byte of the resource or immediately before the transport connection is closed, whichever comes first. `http.request.response_end`\n *\n * Attribute Value Type: `number` {@link HTTP_REQUEST_RESPONSE_END_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 1732829555.89\n */\nexport const HTTP_REQUEST_RESPONSE_END = 'http.request.response_end';\n\n/**\n * Type for {@link HTTP_REQUEST_RESPONSE_END} http.request.response_end\n */\nexport type HTTP_REQUEST_RESPONSE_END_TYPE = number;\n\n// Path: model/attributes/http/http__request__response_start.json\n\n/**\n * The UNIX timestamp representing the time immediately before the browser starts requesting the resource from the server, cache, or local resource. If the transport connection fails and the browser retires the request, the value returned will be the start of the retry request. `http.request.response_start`\n *\n * Attribute Value Type: `number` {@link HTTP_REQUEST_RESPONSE_START_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 1732829555.7\n */\nexport const HTTP_REQUEST_RESPONSE_START = 'http.request.response_start';\n\n/**\n * Type for {@link HTTP_REQUEST_RESPONSE_START} http.request.response_start\n */\nexport type HTTP_REQUEST_RESPONSE_START_TYPE = number;\n\n// Path: model/attributes/http/http__request__same_origin.json\n\n/**\n * Indicates that a URL has the same origin as the current page's origin in the browser. `http.request.same_origin`\n *\n * Attribute Value Type: `boolean` {@link HTTP_REQUEST_SAME_ORIGIN_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link URL_SAME_ORIGIN} `url.same_origin`\n *\n * @example true\n */\nexport const HTTP_REQUEST_SAME_ORIGIN = 'http.request.same_origin';\n\n/**\n * Type for {@link HTTP_REQUEST_SAME_ORIGIN} http.request.same_origin\n */\nexport type HTTP_REQUEST_SAME_ORIGIN_TYPE = boolean;\n\n// Path: model/attributes/http/http__request__secure_connection_start.json\n\n/**\n * The UNIX timestamp representing the time immediately before the browser starts the handshake process to secure the current connection. If a secure connection is not used, the property returns zero. `http.request.secure_connection_start`\n *\n * Attribute Value Type: `number` {@link HTTP_REQUEST_SECURE_CONNECTION_START_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 1732829555.73\n */\nexport const HTTP_REQUEST_SECURE_CONNECTION_START = 'http.request.secure_connection_start';\n\n/**\n * Type for {@link HTTP_REQUEST_SECURE_CONNECTION_START} http.request.secure_connection_start\n */\nexport type HTTP_REQUEST_SECURE_CONNECTION_START_TYPE = number;\n\n// Path: model/attributes/http/http__request__time_to_first_byte.json\n\n/**\n * The time in seconds from the browser's timeorigin to when the first byte of the request's response was received. See https://web.dev/articles/ttfb#measure-resource-requests `http.request.time_to_first_byte`\n *\n * Attribute Value Type: `number` {@link HTTP_REQUEST_TIME_TO_FIRST_BYTE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 1.032\n */\nexport const HTTP_REQUEST_TIME_TO_FIRST_BYTE = 'http.request.time_to_first_byte';\n\n/**\n * Type for {@link HTTP_REQUEST_TIME_TO_FIRST_BYTE} http.request.time_to_first_byte\n */\nexport type HTTP_REQUEST_TIME_TO_FIRST_BYTE_TYPE = number;\n\n// Path: model/attributes/http/http__request__worker_start.json\n\n/**\n * The UNIX timestamp representing the timestamp immediately before dispatching the FetchEvent if a Service Worker thread is already running, or immediately before starting the Service Worker thread if it is not already running. `http.request.worker_start`\n *\n * Attribute Value Type: `number` {@link HTTP_REQUEST_WORKER_START_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 1732829553.68\n */\nexport const HTTP_REQUEST_WORKER_START = 'http.request.worker_start';\n\n/**\n * Type for {@link HTTP_REQUEST_WORKER_START} http.request.worker_start\n */\nexport type HTTP_REQUEST_WORKER_START_TYPE = number;\n\n// Path: model/attributes/http/http__response__body__size.json\n\n/**\n * The encoded body size of the response (in bytes). `http.response.body.size`\n *\n * Attribute Value Type: `number` {@link HTTP_RESPONSE_BODY_SIZE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link HTTP_RESPONSE_CONTENT_LENGTH} `http.response_content_length`, {@link HTTP_RESPONSE_HEADER_CONTENT_LENGTH} `http.response.header.content-length`\n *\n * @example 123\n */\nexport const HTTP_RESPONSE_BODY_SIZE = 'http.response.body.size';\n\n/**\n * Type for {@link HTTP_RESPONSE_BODY_SIZE} http.response.body.size\n */\nexport type HTTP_RESPONSE_BODY_SIZE_TYPE = number;\n\n// Path: model/attributes/http/http__response_content_length.json\n\n/**\n * The encoded body size of the response (in bytes). `http.response_content_length`\n *\n * Attribute Value Type: `number` {@link HTTP_RESPONSE_CONTENT_LENGTH_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link HTTP_RESPONSE_BODY_SIZE} `http.response.body.size`, {@link HTTP_RESPONSE_HEADER_CONTENT_LENGTH} `http.response.header.content-length`\n *\n * @deprecated Use {@link HTTP_RESPONSE_BODY_SIZE} (http.response.body.size) instead\n * @example 123\n */\nexport const HTTP_RESPONSE_CONTENT_LENGTH = 'http.response_content_length';\n\n/**\n * Type for {@link HTTP_RESPONSE_CONTENT_LENGTH} http.response_content_length\n */\nexport type HTTP_RESPONSE_CONTENT_LENGTH_TYPE = number;\n\n// Path: model/attributes/http/http__response__header__content-length.json\n\n/**\n * The size of the message body sent to the recipient (in bytes) `http.response.header.content-length`\n *\n * Attribute Value Type: `string` {@link HTTP_RESPONSE_HEADER_CONTENT_LENGTH_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link HTTP_RESPONSE_CONTENT_LENGTH} `http.response_content_length`, {@link HTTP_RESPONSE_BODY_SIZE} `http.response.body.size`\n *\n * @example \"http.response.header.custom-header=['foo', 'bar']\"\n */\nexport const HTTP_RESPONSE_HEADER_CONTENT_LENGTH = 'http.response.header.content-length';\n\n/**\n * Type for {@link HTTP_RESPONSE_HEADER_CONTENT_LENGTH} http.response.header.content-length\n */\nexport type HTTP_RESPONSE_HEADER_CONTENT_LENGTH_TYPE = string;\n\n// Path: model/attributes/http/http__response__header__[key].json\n\n/**\n * HTTP response headers, <key> being the normalized HTTP Header name (lowercase), the value being the header values. `http.response.header.<key>`\n *\n * Attribute Value Type: `Array<string>` {@link HTTP_RESPONSE_HEADER_KEY_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Has Dynamic Suffix: true\n *\n * @example \"http.response.header.custom-header=['foo', 'bar']\"\n */\nexport const HTTP_RESPONSE_HEADER_KEY = 'http.response.header.<key>';\n\n/**\n * Base key for {@link HTTP_RESPONSE_HEADER_KEY}. Use with a dynamic suffix, e.g. `${HTTP_RESPONSE_HEADER_KEY_BASE}.${key}`.\n */\nexport const HTTP_RESPONSE_HEADER_KEY_BASE = 'http.response.header';\n\n/**\n * Type for {@link HTTP_RESPONSE_HEADER_KEY} http.response.header.<key>\n */\nexport type HTTP_RESPONSE_HEADER_KEY_TYPE = Array<string>;\n\n// Path: model/attributes/http/http__response__size.json\n\n/**\n * The transfer size of the response (in bytes). `http.response.size`\n *\n * Attribute Value Type: `number` {@link HTTP_RESPONSE_SIZE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link HTTP_RESPONSE_TRANSFER_SIZE} `http.response_transfer_size`\n *\n * @example 456\n */\nexport const HTTP_RESPONSE_SIZE = 'http.response.size';\n\n/**\n * Type for {@link HTTP_RESPONSE_SIZE} http.response.size\n */\nexport type HTTP_RESPONSE_SIZE_TYPE = number;\n\n// Path: model/attributes/http/http__response__status_code.json\n\n/**\n * The status code of the HTTP response. `http.response.status_code`\n *\n * Attribute Value Type: `number` {@link HTTP_RESPONSE_STATUS_CODE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link HTTP_STATUS_CODE} `http.status_code`\n *\n * @example 404\n */\nexport const HTTP_RESPONSE_STATUS_CODE = 'http.response.status_code';\n\n/**\n * Type for {@link HTTP_RESPONSE_STATUS_CODE} http.response.status_code\n */\nexport type HTTP_RESPONSE_STATUS_CODE_TYPE = number;\n\n// Path: model/attributes/http/http__response_transfer_size.json\n\n/**\n * The transfer size of the response (in bytes). `http.response_transfer_size`\n *\n * Attribute Value Type: `number` {@link HTTP_RESPONSE_TRANSFER_SIZE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link HTTP_RESPONSE_SIZE} `http.response.size`\n *\n * @deprecated Use {@link HTTP_RESPONSE_SIZE} (http.response.size) instead\n * @example 456\n */\nexport const HTTP_RESPONSE_TRANSFER_SIZE = 'http.response_transfer_size';\n\n/**\n * Type for {@link HTTP_RESPONSE_TRANSFER_SIZE} http.response_transfer_size\n */\nexport type HTTP_RESPONSE_TRANSFER_SIZE_TYPE = number;\n\n// Path: model/attributes/http/http__route.json\n\n/**\n * The matched route, that is, the path template in the format used by the respective server framework. `http.route`\n *\n * Attribute Value Type: `string` {@link HTTP_ROUTE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link URL_TEMPLATE} `url.template`\n *\n * @example \"/users/:id\"\n */\nexport const HTTP_ROUTE = 'http.route';\n\n/**\n * Type for {@link HTTP_ROUTE} http.route\n */\nexport type HTTP_ROUTE_TYPE = string;\n\n// Path: model/attributes/http/http__scheme.json\n\n/**\n * The URI scheme component identifying the used protocol. `http.scheme`\n *\n * Attribute Value Type: `string` {@link HTTP_SCHEME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link URL_SCHEME} `url.scheme`\n *\n * @deprecated Use {@link URL_SCHEME} (url.scheme) instead\n * @example \"https\"\n */\nexport const HTTP_SCHEME = 'http.scheme';\n\n/**\n * Type for {@link HTTP_SCHEME} http.scheme\n */\nexport type HTTP_SCHEME_TYPE = string;\n\n// Path: model/attributes/http/http__server_name.json\n\n/**\n * The server domain name `http.server_name`\n *\n * Attribute Value Type: `string` {@link HTTP_SERVER_NAME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link SERVER_ADDRESS} `server.address`, {@link NET_HOST_NAME} `net.host.name`, {@link HTTP_HOST} `http.host`, {@link SERVER_NAME} `server_name`\n *\n * @deprecated Use {@link SERVER_ADDRESS} (server.address) instead\n * @example \"example.com\"\n */\nexport const HTTP_SERVER_NAME = 'http.server_name';\n\n/**\n * Type for {@link HTTP_SERVER_NAME} http.server_name\n */\nexport type HTTP_SERVER_NAME_TYPE = string;\n\n// Path: model/attributes/http/http__server__request__time_in_queue.json\n\n/**\n * The time in milliseconds the request spent in the server queue before processing began. Measured from the X-Request-Start header set by reverse proxies (e.g., Nginx, HAProxy, Heroku) to when the application started handling the request. `http.server.request.time_in_queue`\n *\n * Attribute Value Type: `number` {@link HTTP_SERVER_REQUEST_TIME_IN_QUEUE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 50\n */\nexport const HTTP_SERVER_REQUEST_TIME_IN_QUEUE = 'http.server.request.time_in_queue';\n\n/**\n * Type for {@link HTTP_SERVER_REQUEST_TIME_IN_QUEUE} http.server.request.time_in_queue\n */\nexport type HTTP_SERVER_REQUEST_TIME_IN_QUEUE_TYPE = number;\n\n// Path: model/attributes/http/http__status_code.json\n\n/**\n * The status code of the HTTP response. `http.status_code`\n *\n * Attribute Value Type: `number` {@link HTTP_STATUS_CODE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link HTTP_RESPONSE_STATUS_CODE} `http.response.status_code`\n *\n * @deprecated Use {@link HTTP_RESPONSE_STATUS_CODE} (http.response.status_code) instead\n * @example 404\n */\nexport const HTTP_STATUS_CODE = 'http.status_code';\n\n/**\n * Type for {@link HTTP_STATUS_CODE} http.status_code\n */\nexport type HTTP_STATUS_CODE_TYPE = number;\n\n// Path: model/attributes/http/http__target.json\n\n/**\n * The pathname and query string of the URL. `http.target`\n *\n * Attribute Value Type: `string` {@link HTTP_TARGET_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @deprecated Use {@link URL_PATH} (url.path) instead - This attribute is being deprecated in favor of url.path and url.query\n * @example \"/test?foo=bar#buzz\"\n */\nexport const HTTP_TARGET = 'http.target';\n\n/**\n * Type for {@link HTTP_TARGET} http.target\n */\nexport type HTTP_TARGET_TYPE = string;\n\n// Path: model/attributes/http/http__url.json\n\n/**\n * The URL of the resource that was fetched. `http.url`\n *\n * Attribute Value Type: `string` {@link HTTP_URL_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link URL_FULL} `url.full`, {@link URL} `url`\n *\n * @deprecated Use {@link URL_FULL} (url.full) instead\n * @example \"https://example.com/test?foo=bar#buzz\"\n */\nexport const HTTP_URL = 'http.url';\n\n/**\n * Type for {@link HTTP_URL} http.url\n */\nexport type HTTP_URL_TYPE = string;\n\n// Path: model/attributes/http/http__user_agent.json\n\n/**\n * Value of the HTTP User-Agent header sent by the client. `http.user_agent`\n *\n * Attribute Value Type: `string` {@link HTTP_USER_AGENT_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link USER_AGENT_ORIGINAL} `user_agent.original`\n *\n * @deprecated Use {@link USER_AGENT_ORIGINAL} (user_agent.original) instead\n * @example \"Mozilla/5.0 (iPhone; CPU iPhone OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Mobile/15E148 Safari/604.1\"\n */\nexport const HTTP_USER_AGENT = 'http.user_agent';\n\n/**\n * Type for {@link HTTP_USER_AGENT} http.user_agent\n */\nexport type HTTP_USER_AGENT_TYPE = string;\n\n// Path: model/attributes/id.json\n\n/**\n * A unique identifier for the span. `id`\n *\n * Attribute Value Type: `string` {@link ID_TYPE}\n *\n * Apply Scrubbing: never\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"f47ac10b58cc4372a5670e02b2c3d479\"\n */\nexport const ID = 'id';\n\n/**\n * Type for {@link ID} id\n */\nexport type ID_TYPE = string;\n\n// Path: model/attributes/inp.json\n\n/**\n * The value of the recorded Interaction to Next Paint (INP) web vital `inp`\n *\n * Attribute Value Type: `number` {@link INP_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link BROWSER_WEB_VITAL_INP_VALUE} `browser.web_vital.inp.value`\n *\n * @deprecated Use {@link BROWSER_WEB_VITAL_INP_VALUE} (browser.web_vital.inp.value) instead - The INP web vital is now recorded as a browser.web_vital.inp.value attribute.\n * @example 200\n */\nexport const INP = 'inp';\n\n/**\n * Type for {@link INP} inp\n */\nexport type INP_TYPE = number;\n\n// Path: model/attributes/jsonrpc/jsonrpc__protocol__version.json\n\n/**\n * The version of the JSON-RPC protocol used. `jsonrpc.protocol.version`\n *\n * Attribute Value Type: `string` {@link JSONRPC_PROTOCOL_VERSION_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"2.0\"\n */\nexport const JSONRPC_PROTOCOL_VERSION = 'jsonrpc.protocol.version';\n\n/**\n * Type for {@link JSONRPC_PROTOCOL_VERSION} jsonrpc.protocol.version\n */\nexport type JSONRPC_PROTOCOL_VERSION_TYPE = string;\n\n// Path: model/attributes/jsonrpc/jsonrpc__request__id.json\n\n/**\n * The JSON-RPC request identifier. Unique within the session. `jsonrpc.request.id`\n *\n * Attribute Value Type: `string` {@link JSONRPC_REQUEST_ID_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link MCP_REQUEST_ID} `mcp.request.id`\n *\n * @example \"1\"\n */\nexport const JSONRPC_REQUEST_ID = 'jsonrpc.request.id';\n\n/**\n * Type for {@link JSONRPC_REQUEST_ID} jsonrpc.request.id\n */\nexport type JSONRPC_REQUEST_ID_TYPE = string;\n\n// Path: model/attributes/jvm/jvm__gc__action.json\n\n/**\n * Name of the garbage collector action. `jvm.gc.action`\n *\n * Attribute Value Type: `string` {@link JVM_GC_ACTION_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"end of minor GC\"\n */\nexport const JVM_GC_ACTION = 'jvm.gc.action';\n\n/**\n * Type for {@link JVM_GC_ACTION} jvm.gc.action\n */\nexport type JVM_GC_ACTION_TYPE = string;\n\n// Path: model/attributes/jvm/jvm__gc__name.json\n\n/**\n * Name of the garbage collector. `jvm.gc.name`\n *\n * Attribute Value Type: `string` {@link JVM_GC_NAME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"G1 Young Generation\"\n */\nexport const JVM_GC_NAME = 'jvm.gc.name';\n\n/**\n * Type for {@link JVM_GC_NAME} jvm.gc.name\n */\nexport type JVM_GC_NAME_TYPE = string;\n\n// Path: model/attributes/jvm/jvm__memory__pool__name.json\n\n/**\n * Name of the memory pool. `jvm.memory.pool.name`\n *\n * Attribute Value Type: `string` {@link JVM_MEMORY_POOL_NAME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"G1 Old Gen\"\n */\nexport const JVM_MEMORY_POOL_NAME = 'jvm.memory.pool.name';\n\n/**\n * Type for {@link JVM_MEMORY_POOL_NAME} jvm.memory.pool.name\n */\nexport type JVM_MEMORY_POOL_NAME_TYPE = string;\n\n// Path: model/attributes/jvm/jvm__memory__type.json\n\n/**\n * Name of the memory pool. `jvm.memory.type`\n *\n * Attribute Value Type: `string` {@link JVM_MEMORY_TYPE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"G1 Old Gen\"\n */\nexport const JVM_MEMORY_TYPE = 'jvm.memory.type';\n\n/**\n * Type for {@link JVM_MEMORY_TYPE} jvm.memory.type\n */\nexport type JVM_MEMORY_TYPE_TYPE = string;\n\n// Path: model/attributes/jvm/jvm__thread__daemon.json\n\n/**\n * Whether the thread is daemon or not. `jvm.thread.daemon`\n *\n * Attribute Value Type: `boolean` {@link JVM_THREAD_DAEMON_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example true\n */\nexport const JVM_THREAD_DAEMON = 'jvm.thread.daemon';\n\n/**\n * Type for {@link JVM_THREAD_DAEMON} jvm.thread.daemon\n */\nexport type JVM_THREAD_DAEMON_TYPE = boolean;\n\n// Path: model/attributes/jvm/jvm__thread__state.json\n\n/**\n * State of the thread. `jvm.thread.state`\n *\n * Attribute Value Type: `string` {@link JVM_THREAD_STATE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"blocked\"\n */\nexport const JVM_THREAD_STATE = 'jvm.thread.state';\n\n/**\n * Type for {@link JVM_THREAD_STATE} jvm.thread.state\n */\nexport type JVM_THREAD_STATE_TYPE = string;\n\n// Path: model/attributes/koa/koa__name.json\n\n/**\n * The name of the Koa middleware or matched route that handled the request. `koa.name`\n *\n * Attribute Value Type: `string` {@link KOA_NAME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @deprecated  - No single replacement. SDKs should use http.route for router layers and code.function.name for middleware layers instead.\n * @example \"/users/:id\"\n */\nexport const KOA_NAME = 'koa.name';\n\n/**\n * Type for {@link KOA_NAME} koa.name\n */\nexport type KOA_NAME_TYPE = string;\n\n// Path: model/attributes/koa/koa__type.json\n\n/**\n * The type of the Koa layer that handled the request. `koa.type`\n *\n * Attribute Value Type: `string` {@link KOA_TYPE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"router\"\n */\nexport const KOA_TYPE = 'koa.type';\n\n/**\n * Type for {@link KOA_TYPE} koa.type\n */\nexport type KOA_TYPE_TYPE = string;\n\n// Path: model/attributes/lcp.json\n\n/**\n * The value of the recorded Largest Contentful Paint (LCP) web vital `lcp`\n *\n * Attribute Value Type: `number` {@link LCP_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link BROWSER_WEB_VITAL_LCP_VALUE} `browser.web_vital.lcp.value`\n *\n * @deprecated Use {@link BROWSER_WEB_VITAL_LCP_VALUE} (browser.web_vital.lcp.value) instead - The LCP web vital is now recorded as a browser.web_vital.lcp.value attribute.\n * @example 2500\n */\nexport const LCP = 'lcp';\n\n/**\n * Type for {@link LCP} lcp\n */\nexport type LCP_TYPE = number;\n\n// Path: model/attributes/lcp/lcp__element.json\n\n/**\n * The dom element responsible for the largest contentful paint. `lcp.element`\n *\n * Attribute Value Type: `string` {@link LCP_ELEMENT_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link BROWSER_WEB_VITAL_LCP_ELEMENT} `browser.web_vital.lcp.element`\n *\n * @deprecated Use {@link BROWSER_WEB_VITAL_LCP_ELEMENT} (browser.web_vital.lcp.element) instead - The LCP element is now recorded as a browser.web_vital.lcp.element attribute.\n * @example \"img\"\n */\nexport const LCP_ELEMENT = 'lcp.element';\n\n/**\n * Type for {@link LCP_ELEMENT} lcp.element\n */\nexport type LCP_ELEMENT_TYPE = string;\n\n// Path: model/attributes/lcp/lcp__id.json\n\n/**\n * The id of the dom element responsible for the largest contentful paint. `lcp.id`\n *\n * Attribute Value Type: `string` {@link LCP_ID_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link BROWSER_WEB_VITAL_LCP_ID} `browser.web_vital.lcp.id`\n *\n * @deprecated Use {@link BROWSER_WEB_VITAL_LCP_ID} (browser.web_vital.lcp.id) instead - The LCP id is now recorded as a browser.web_vital.lcp.id attribute.\n * @example \"#hero\"\n */\nexport const LCP_ID = 'lcp.id';\n\n/**\n * Type for {@link LCP_ID} lcp.id\n */\nexport type LCP_ID_TYPE = string;\n\n// Path: model/attributes/lcp/lcp__loadTime.json\n\n/**\n * The time it took for the LCP element to be loaded `lcp.loadTime`\n *\n * Attribute Value Type: `number` {@link LCP_LOADTIME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link BROWSER_WEB_VITAL_LCP_LOAD_TIME} `browser.web_vital.lcp.load_time`\n *\n * @deprecated Use {@link BROWSER_WEB_VITAL_LCP_LOAD_TIME} (browser.web_vital.lcp.load_time) instead - The LCP load time is now recorded as a browser.web_vital.lcp.load_time attribute.\n * @example 1402\n */\nexport const LCP_LOADTIME = 'lcp.loadTime';\n\n/**\n * Type for {@link LCP_LOADTIME} lcp.loadTime\n */\nexport type LCP_LOADTIME_TYPE = number;\n\n// Path: model/attributes/lcp/lcp__renderTime.json\n\n/**\n * The time it took for the LCP element to be rendered `lcp.renderTime`\n *\n * Attribute Value Type: `number` {@link LCP_RENDERTIME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link BROWSER_WEB_VITAL_LCP_RENDER_TIME} `browser.web_vital.lcp.render_time`\n *\n * @deprecated Use {@link BROWSER_WEB_VITAL_LCP_RENDER_TIME} (browser.web_vital.lcp.render_time) instead - The LCP render time is now recorded as a browser.web_vital.lcp.render_time attribute.\n * @example 1685\n */\nexport const LCP_RENDERTIME = 'lcp.renderTime';\n\n/**\n * Type for {@link LCP_RENDERTIME} lcp.renderTime\n */\nexport type LCP_RENDERTIME_TYPE = number;\n\n// Path: model/attributes/lcp/lcp__size.json\n\n/**\n * The size of the largest contentful paint element. `lcp.size`\n *\n * Attribute Value Type: `number` {@link LCP_SIZE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link BROWSER_WEB_VITAL_LCP_SIZE} `browser.web_vital.lcp.size`\n *\n * @deprecated Use {@link BROWSER_WEB_VITAL_LCP_SIZE} (browser.web_vital.lcp.size) instead - The LCP size is now recorded as a browser.web_vital.lcp.size attribute.\n * @example 1234\n */\nexport const LCP_SIZE = 'lcp.size';\n\n/**\n * Type for {@link LCP_SIZE} lcp.size\n */\nexport type LCP_SIZE_TYPE = number;\n\n// Path: model/attributes/lcp/lcp__url.json\n\n/**\n * The url of the dom element responsible for the largest contentful paint. `lcp.url`\n *\n * Attribute Value Type: `string` {@link LCP_URL_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link BROWSER_WEB_VITAL_LCP_URL} `browser.web_vital.lcp.url`\n *\n * @deprecated Use {@link BROWSER_WEB_VITAL_LCP_URL} (browser.web_vital.lcp.url) instead - The LCP url is now recorded as a browser.web_vital.lcp.url attribute.\n * @example \"https://example.com\"\n */\nexport const LCP_URL = 'lcp.url';\n\n/**\n * Type for {@link LCP_URL} lcp.url\n */\nexport type LCP_URL_TYPE = string;\n\n// Path: model/attributes/logger/logger__name.json\n\n/**\n * The name of the logger that generated this event. `logger.name`\n *\n * Attribute Value Type: `string` {@link LOGGER_NAME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"myLogger\"\n */\nexport const LOGGER_NAME = 'logger.name';\n\n/**\n * Type for {@link LOGGER_NAME} logger.name\n */\nexport type LOGGER_NAME_TYPE = string;\n\n// Path: model/attributes/mcp/mcp__cancelled__reason.json\n\n/**\n * Reason for the cancellation of an MCP operation. `mcp.cancelled.reason`\n *\n * Attribute Value Type: `string` {@link MCP_CANCELLED_REASON_TYPE}\n *\n * Apply Scrubbing: manual - Cancellation reasons may contain user-specific or sensitive information\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"User cancelled the request\"\n */\nexport const MCP_CANCELLED_REASON = 'mcp.cancelled.reason';\n\n/**\n * Type for {@link MCP_CANCELLED_REASON} mcp.cancelled.reason\n */\nexport type MCP_CANCELLED_REASON_TYPE = string;\n\n// Path: model/attributes/mcp/mcp__cancelled__request_id.json\n\n/**\n * Request ID of the cancelled MCP operation. `mcp.cancelled.request_id`\n *\n * Attribute Value Type: `string` {@link MCP_CANCELLED_REQUEST_ID_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"123\"\n */\nexport const MCP_CANCELLED_REQUEST_ID = 'mcp.cancelled.request_id';\n\n/**\n * Type for {@link MCP_CANCELLED_REQUEST_ID} mcp.cancelled.request_id\n */\nexport type MCP_CANCELLED_REQUEST_ID_TYPE = string;\n\n// Path: model/attributes/mcp/mcp__client__name.json\n\n/**\n * Name of the MCP client application. `mcp.client.name`\n *\n * Attribute Value Type: `string` {@link MCP_CLIENT_NAME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"claude-desktop\"\n */\nexport const MCP_CLIENT_NAME = 'mcp.client.name';\n\n/**\n * Type for {@link MCP_CLIENT_NAME} mcp.client.name\n */\nexport type MCP_CLIENT_NAME_TYPE = string;\n\n// Path: model/attributes/mcp/mcp__client__title.json\n\n/**\n * Display title of the MCP client application. `mcp.client.title`\n *\n * Attribute Value Type: `string` {@link MCP_CLIENT_TITLE_TYPE}\n *\n * Apply Scrubbing: manual - Client titles may reveal user-specific application configurations or custom setups\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"Claude Desktop\"\n */\nexport const MCP_CLIENT_TITLE = 'mcp.client.title';\n\n/**\n * Type for {@link MCP_CLIENT_TITLE} mcp.client.title\n */\nexport type MCP_CLIENT_TITLE_TYPE = string;\n\n// Path: model/attributes/mcp/mcp__client__version.json\n\n/**\n * Version of the MCP client application. `mcp.client.version`\n *\n * Attribute Value Type: `string` {@link MCP_CLIENT_VERSION_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"1.0.0\"\n */\nexport const MCP_CLIENT_VERSION = 'mcp.client.version';\n\n/**\n * Type for {@link MCP_CLIENT_VERSION} mcp.client.version\n */\nexport type MCP_CLIENT_VERSION_TYPE = string;\n\n// Path: model/attributes/mcp/mcp__lifecycle__phase.json\n\n/**\n * Lifecycle phase indicator for MCP operations. `mcp.lifecycle.phase`\n *\n * Attribute Value Type: `string` {@link MCP_LIFECYCLE_PHASE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"initialization_complete\"\n */\nexport const MCP_LIFECYCLE_PHASE = 'mcp.lifecycle.phase';\n\n/**\n * Type for {@link MCP_LIFECYCLE_PHASE} mcp.lifecycle.phase\n */\nexport type MCP_LIFECYCLE_PHASE_TYPE = string;\n\n// Path: model/attributes/mcp/mcp__logging__data_type.json\n\n/**\n * Data type of the logged message content. `mcp.logging.data_type`\n *\n * Attribute Value Type: `string` {@link MCP_LOGGING_DATA_TYPE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"string\"\n */\nexport const MCP_LOGGING_DATA_TYPE = 'mcp.logging.data_type';\n\n/**\n * Type for {@link MCP_LOGGING_DATA_TYPE} mcp.logging.data_type\n */\nexport type MCP_LOGGING_DATA_TYPE_TYPE = string;\n\n// Path: model/attributes/mcp/mcp__logging__level.json\n\n/**\n * Log level for MCP logging operations. `mcp.logging.level`\n *\n * Attribute Value Type: `string` {@link MCP_LOGGING_LEVEL_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"info\"\n */\nexport const MCP_LOGGING_LEVEL = 'mcp.logging.level';\n\n/**\n * Type for {@link MCP_LOGGING_LEVEL} mcp.logging.level\n */\nexport type MCP_LOGGING_LEVEL_TYPE = string;\n\n// Path: model/attributes/mcp/mcp__logging__logger.json\n\n/**\n * Logger name for MCP logging operations. `mcp.logging.logger`\n *\n * Attribute Value Type: `string` {@link MCP_LOGGING_LOGGER_TYPE}\n *\n * Apply Scrubbing: manual - Logger names may be user-defined and could contain sensitive information\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"mcp_server\"\n */\nexport const MCP_LOGGING_LOGGER = 'mcp.logging.logger';\n\n/**\n * Type for {@link MCP_LOGGING_LOGGER} mcp.logging.logger\n */\nexport type MCP_LOGGING_LOGGER_TYPE = string;\n\n// Path: model/attributes/mcp/mcp__logging__message.json\n\n/**\n * Log message content from MCP logging operations. `mcp.logging.message`\n *\n * Attribute Value Type: `string` {@link MCP_LOGGING_MESSAGE_TYPE}\n *\n * Apply Scrubbing: auto - Log messages can contain user data\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"Tool execution completed successfully\"\n */\nexport const MCP_LOGGING_MESSAGE = 'mcp.logging.message';\n\n/**\n * Type for {@link MCP_LOGGING_MESSAGE} mcp.logging.message\n */\nexport type MCP_LOGGING_MESSAGE_TYPE = string;\n\n// Path: model/attributes/mcp/mcp__method__name.json\n\n/**\n * The name of the MCP request or notification method being called. `mcp.method.name`\n *\n * Attribute Value Type: `string` {@link MCP_METHOD_NAME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"tools/call\"\n */\nexport const MCP_METHOD_NAME = 'mcp.method.name';\n\n/**\n * Type for {@link MCP_METHOD_NAME} mcp.method.name\n */\nexport type MCP_METHOD_NAME_TYPE = string;\n\n// Path: model/attributes/mcp/mcp__progress__current.json\n\n/**\n * Current progress value of an MCP operation. `mcp.progress.current`\n *\n * Attribute Value Type: `number` {@link MCP_PROGRESS_CURRENT_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 50\n */\nexport const MCP_PROGRESS_CURRENT = 'mcp.progress.current';\n\n/**\n * Type for {@link MCP_PROGRESS_CURRENT} mcp.progress.current\n */\nexport type MCP_PROGRESS_CURRENT_TYPE = number;\n\n// Path: model/attributes/mcp/mcp__progress__message.json\n\n/**\n * Progress message describing the current state of an MCP operation. `mcp.progress.message`\n *\n * Attribute Value Type: `string` {@link MCP_PROGRESS_MESSAGE_TYPE}\n *\n * Apply Scrubbing: manual - Progress messages may contain user-specific or sensitive information\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"Processing 50 of 100 items\"\n */\nexport const MCP_PROGRESS_MESSAGE = 'mcp.progress.message';\n\n/**\n * Type for {@link MCP_PROGRESS_MESSAGE} mcp.progress.message\n */\nexport type MCP_PROGRESS_MESSAGE_TYPE = string;\n\n// Path: model/attributes/mcp/mcp__progress__percentage.json\n\n/**\n * Calculated progress percentage of an MCP operation. Computed from current/total * 100. `mcp.progress.percentage`\n *\n * Attribute Value Type: `number` {@link MCP_PROGRESS_PERCENTAGE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 50\n */\nexport const MCP_PROGRESS_PERCENTAGE = 'mcp.progress.percentage';\n\n/**\n * Type for {@link MCP_PROGRESS_PERCENTAGE} mcp.progress.percentage\n */\nexport type MCP_PROGRESS_PERCENTAGE_TYPE = number;\n\n// Path: model/attributes/mcp/mcp__progress__token.json\n\n/**\n * Token for tracking progress of an MCP operation. `mcp.progress.token`\n *\n * Attribute Value Type: `string` {@link MCP_PROGRESS_TOKEN_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"progress-token-123\"\n */\nexport const MCP_PROGRESS_TOKEN = 'mcp.progress.token';\n\n/**\n * Type for {@link MCP_PROGRESS_TOKEN} mcp.progress.token\n */\nexport type MCP_PROGRESS_TOKEN_TYPE = string;\n\n// Path: model/attributes/mcp/mcp__progress__total.json\n\n/**\n * Total progress target value of an MCP operation. `mcp.progress.total`\n *\n * Attribute Value Type: `number` {@link MCP_PROGRESS_TOTAL_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 100\n */\nexport const MCP_PROGRESS_TOTAL = 'mcp.progress.total';\n\n/**\n * Type for {@link MCP_PROGRESS_TOTAL} mcp.progress.total\n */\nexport type MCP_PROGRESS_TOTAL_TYPE = number;\n\n// Path: model/attributes/mcp/mcp__prompt__name.json\n\n/**\n * Name of the MCP prompt template being used. `mcp.prompt.name`\n *\n * Attribute Value Type: `string` {@link MCP_PROMPT_NAME_TYPE}\n *\n * Apply Scrubbing: manual - Prompt names may reveal user behavior patterns or sensitive operations\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link GEN_AI_PROMPT_NAME} `gen_ai.prompt.name`\n *\n * @deprecated Use {@link GEN_AI_PROMPT_NAME} (gen_ai.prompt.name) instead - OTel uses gen_ai.prompt.name for MCP prompt names\n * @example \"summarize\"\n */\nexport const MCP_PROMPT_NAME = 'mcp.prompt.name';\n\n/**\n * Type for {@link MCP_PROMPT_NAME} mcp.prompt.name\n */\nexport type MCP_PROMPT_NAME_TYPE = string;\n\n// Path: model/attributes/mcp/mcp__prompt__result__description.json\n\n/**\n * Description of the prompt result. `mcp.prompt.result.description`\n *\n * Attribute Value Type: `string` {@link MCP_PROMPT_RESULT_DESCRIPTION_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"A summary of the requested information\"\n */\nexport const MCP_PROMPT_RESULT_DESCRIPTION = 'mcp.prompt.result.description';\n\n/**\n * Type for {@link MCP_PROMPT_RESULT_DESCRIPTION} mcp.prompt.result.description\n */\nexport type MCP_PROMPT_RESULT_DESCRIPTION_TYPE = string;\n\n// Path: model/attributes/mcp/mcp__prompt__result__message_content.json\n\n/**\n * Content of the message in the prompt result. Used for single message results only. `mcp.prompt.result.message_content`\n *\n * Attribute Value Type: `string` {@link MCP_PROMPT_RESULT_MESSAGE_CONTENT_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"Please provide a summary of the document\"\n */\nexport const MCP_PROMPT_RESULT_MESSAGE_CONTENT = 'mcp.prompt.result.message_content';\n\n/**\n * Type for {@link MCP_PROMPT_RESULT_MESSAGE_CONTENT} mcp.prompt.result.message_content\n */\nexport type MCP_PROMPT_RESULT_MESSAGE_CONTENT_TYPE = string;\n\n// Path: model/attributes/mcp/mcp__prompt__result__message_count.json\n\n/**\n * Number of messages in the prompt result. `mcp.prompt.result.message_count`\n *\n * Attribute Value Type: `number` {@link MCP_PROMPT_RESULT_MESSAGE_COUNT_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 3\n */\nexport const MCP_PROMPT_RESULT_MESSAGE_COUNT = 'mcp.prompt.result.message_count';\n\n/**\n * Type for {@link MCP_PROMPT_RESULT_MESSAGE_COUNT} mcp.prompt.result.message_count\n */\nexport type MCP_PROMPT_RESULT_MESSAGE_COUNT_TYPE = number;\n\n// Path: model/attributes/mcp/mcp__prompt__result__message_role.json\n\n/**\n * Role of the message in the prompt result. Used for single message results only. `mcp.prompt.result.message_role`\n *\n * Attribute Value Type: `string` {@link MCP_PROMPT_RESULT_MESSAGE_ROLE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"user\"\n */\nexport const MCP_PROMPT_RESULT_MESSAGE_ROLE = 'mcp.prompt.result.message_role';\n\n/**\n * Type for {@link MCP_PROMPT_RESULT_MESSAGE_ROLE} mcp.prompt.result.message_role\n */\nexport type MCP_PROMPT_RESULT_MESSAGE_ROLE_TYPE = string;\n\n// Path: model/attributes/mcp/mcp__protocol__ready.json\n\n/**\n * Protocol readiness indicator for MCP session. Non-zero value indicates the protocol is ready. `mcp.protocol.ready`\n *\n * Attribute Value Type: `number` {@link MCP_PROTOCOL_READY_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 1\n */\nexport const MCP_PROTOCOL_READY = 'mcp.protocol.ready';\n\n/**\n * Type for {@link MCP_PROTOCOL_READY} mcp.protocol.ready\n */\nexport type MCP_PROTOCOL_READY_TYPE = number;\n\n// Path: model/attributes/mcp/mcp__protocol__version.json\n\n/**\n * MCP protocol version used in the session. `mcp.protocol.version`\n *\n * Attribute Value Type: `string` {@link MCP_PROTOCOL_VERSION_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"2024-11-05\"\n */\nexport const MCP_PROTOCOL_VERSION = 'mcp.protocol.version';\n\n/**\n * Type for {@link MCP_PROTOCOL_VERSION} mcp.protocol.version\n */\nexport type MCP_PROTOCOL_VERSION_TYPE = string;\n\n// Path: model/attributes/mcp/mcp__request__argument__[key].json\n\n/**\n * MCP request argument with dynamic key suffix. The <key> is replaced with the actual argument name. The value is a JSON-stringified representation of the argument value. `mcp.request.argument.<key>`\n *\n * Attribute Value Type: `string` {@link MCP_REQUEST_ARGUMENT_KEY_TYPE}\n *\n * Apply Scrubbing: auto - Arguments contain user input\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Has Dynamic Suffix: true\n *\n * @example \"mcp.request.argument.query='weather in Paris'\"\n */\nexport const MCP_REQUEST_ARGUMENT_KEY = 'mcp.request.argument.<key>';\n\n/**\n * Base key for {@link MCP_REQUEST_ARGUMENT_KEY}. Use with a dynamic suffix, e.g. `${MCP_REQUEST_ARGUMENT_KEY_BASE}.${key}`.\n */\nexport const MCP_REQUEST_ARGUMENT_KEY_BASE = 'mcp.request.argument';\n\n/**\n * Type for {@link MCP_REQUEST_ARGUMENT_KEY} mcp.request.argument.<key>\n */\nexport type MCP_REQUEST_ARGUMENT_KEY_TYPE = string;\n\n// Path: model/attributes/mcp/mcp__request__argument__name.json\n\n/**\n * Name argument from prompts/get MCP request. `mcp.request.argument.name`\n *\n * Attribute Value Type: `string` {@link MCP_REQUEST_ARGUMENT_NAME_TYPE}\n *\n * Apply Scrubbing: auto - Prompt names can contain user input\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"summarize\"\n */\nexport const MCP_REQUEST_ARGUMENT_NAME = 'mcp.request.argument.name';\n\n/**\n * Type for {@link MCP_REQUEST_ARGUMENT_NAME} mcp.request.argument.name\n */\nexport type MCP_REQUEST_ARGUMENT_NAME_TYPE = string;\n\n// Path: model/attributes/mcp/mcp__request__argument__uri.json\n\n/**\n * URI argument from resources/read MCP request. `mcp.request.argument.uri`\n *\n * Attribute Value Type: `string` {@link MCP_REQUEST_ARGUMENT_URI_TYPE}\n *\n * Apply Scrubbing: auto - URIs can contain user file paths\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"file:///path/to/resource\"\n */\nexport const MCP_REQUEST_ARGUMENT_URI = 'mcp.request.argument.uri';\n\n/**\n * Type for {@link MCP_REQUEST_ARGUMENT_URI} mcp.request.argument.uri\n */\nexport type MCP_REQUEST_ARGUMENT_URI_TYPE = string;\n\n// Path: model/attributes/mcp/mcp__request__id.json\n\n/**\n * JSON-RPC request identifier for the MCP request. Unique within the MCP session. `mcp.request.id`\n *\n * Attribute Value Type: `string` {@link MCP_REQUEST_ID_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link JSONRPC_REQUEST_ID} `jsonrpc.request.id`\n *\n * @deprecated Use {@link JSONRPC_REQUEST_ID} (jsonrpc.request.id) instead - OTel models MCP as JSON-RPC, uses jsonrpc.request.id\n * @example \"1\"\n */\nexport const MCP_REQUEST_ID = 'mcp.request.id';\n\n/**\n * Type for {@link MCP_REQUEST_ID} mcp.request.id\n */\nexport type MCP_REQUEST_ID_TYPE = string;\n\n// Path: model/attributes/mcp/mcp__resource__protocol.json\n\n/**\n * Protocol of the resource URI being accessed, extracted from the URI. `mcp.resource.protocol`\n *\n * Attribute Value Type: `string` {@link MCP_RESOURCE_PROTOCOL_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link NETWORK_PROTOCOL_NAME} `network.protocol.name`, {@link NET_PROTOCOL_NAME} `net.protocol.name`\n *\n * @deprecated Use {@link NETWORK_PROTOCOL_NAME} (network.protocol.name) instead - OTel uses the generic network.protocol.name attribute\n * @example \"file\"\n */\nexport const MCP_RESOURCE_PROTOCOL = 'mcp.resource.protocol';\n\n/**\n * Type for {@link MCP_RESOURCE_PROTOCOL} mcp.resource.protocol\n */\nexport type MCP_RESOURCE_PROTOCOL_TYPE = string;\n\n// Path: model/attributes/mcp/mcp__resource__uri.json\n\n/**\n * The resource URI being accessed in an MCP operation. `mcp.resource.uri`\n *\n * Attribute Value Type: `string` {@link MCP_RESOURCE_URI_TYPE}\n *\n * Apply Scrubbing: auto - URIs can contain sensitive file paths\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"file:///path/to/file.txt\"\n */\nexport const MCP_RESOURCE_URI = 'mcp.resource.uri';\n\n/**\n * Type for {@link MCP_RESOURCE_URI} mcp.resource.uri\n */\nexport type MCP_RESOURCE_URI_TYPE = string;\n\n// Path: model/attributes/mcp/mcp__server__name.json\n\n/**\n * Name of the MCP server application. `mcp.server.name`\n *\n * Attribute Value Type: `string` {@link MCP_SERVER_NAME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"sentry-mcp-server\"\n */\nexport const MCP_SERVER_NAME = 'mcp.server.name';\n\n/**\n * Type for {@link MCP_SERVER_NAME} mcp.server.name\n */\nexport type MCP_SERVER_NAME_TYPE = string;\n\n// Path: model/attributes/mcp/mcp__server__title.json\n\n/**\n * Display title of the MCP server application. `mcp.server.title`\n *\n * Attribute Value Type: `string` {@link MCP_SERVER_TITLE_TYPE}\n *\n * Apply Scrubbing: manual - Server titles may reveal user-specific application configurations or custom setups\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"Sentry MCP Server\"\n */\nexport const MCP_SERVER_TITLE = 'mcp.server.title';\n\n/**\n * Type for {@link MCP_SERVER_TITLE} mcp.server.title\n */\nexport type MCP_SERVER_TITLE_TYPE = string;\n\n// Path: model/attributes/mcp/mcp__server__version.json\n\n/**\n * Version of the MCP server application. `mcp.server.version`\n *\n * Attribute Value Type: `string` {@link MCP_SERVER_VERSION_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"0.1.0\"\n */\nexport const MCP_SERVER_VERSION = 'mcp.server.version';\n\n/**\n * Type for {@link MCP_SERVER_VERSION} mcp.server.version\n */\nexport type MCP_SERVER_VERSION_TYPE = string;\n\n// Path: model/attributes/mcp/mcp__session__id.json\n\n/**\n * Identifier for the MCP session. `mcp.session.id`\n *\n * Attribute Value Type: `string` {@link MCP_SESSION_ID_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"550e8400-e29b-41d4-a716-446655440000\"\n */\nexport const MCP_SESSION_ID = 'mcp.session.id';\n\n/**\n * Type for {@link MCP_SESSION_ID} mcp.session.id\n */\nexport type MCP_SESSION_ID_TYPE = string;\n\n// Path: model/attributes/mcp/mcp__tool__name.json\n\n/**\n * Name of the MCP tool being called. `mcp.tool.name`\n *\n * Attribute Value Type: `string` {@link MCP_TOOL_NAME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link GEN_AI_TOOL_NAME} `gen_ai.tool.name`, {@link AI_FUNCTION_CALL} `ai.function_call`\n *\n * @deprecated Use {@link GEN_AI_TOOL_NAME} (gen_ai.tool.name) instead - OTel uses gen_ai.tool.name for MCP tool names\n * @example \"calculator\"\n */\nexport const MCP_TOOL_NAME = 'mcp.tool.name';\n\n/**\n * Type for {@link MCP_TOOL_NAME} mcp.tool.name\n */\nexport type MCP_TOOL_NAME_TYPE = string;\n\n// Path: model/attributes/mcp/mcp__tool__result__content.json\n\n/**\n * The content of the tool result. `mcp.tool.result.content`\n *\n * Attribute Value Type: `string` {@link MCP_TOOL_RESULT_CONTENT_TYPE}\n *\n * Apply Scrubbing: auto - Tool results can contain user data\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link GEN_AI_TOOL_CALL_RESULT} `gen_ai.tool.call.result`, {@link GEN_AI_TOOL_MESSAGE} `gen_ai.tool.message`, {@link GEN_AI_TOOL_OUTPUT} `gen_ai.tool.output`\n *\n * @deprecated Use {@link GEN_AI_TOOL_CALL_RESULT} (gen_ai.tool.call.result) instead - OTel uses gen_ai.tool.call.result for MCP tool results\n * @example \"{\\\"output\\\": \\\"rainy\\\", \\\"toolCallId\\\": \\\"1\\\"}\"\n */\nexport const MCP_TOOL_RESULT_CONTENT = 'mcp.tool.result.content';\n\n/**\n * Type for {@link MCP_TOOL_RESULT_CONTENT} mcp.tool.result.content\n */\nexport type MCP_TOOL_RESULT_CONTENT_TYPE = string;\n\n// Path: model/attributes/mcp/mcp__tool__result__content_count.json\n\n/**\n * Number of content items in the tool result. `mcp.tool.result.content_count`\n *\n * Attribute Value Type: `number` {@link MCP_TOOL_RESULT_CONTENT_COUNT_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 1\n */\nexport const MCP_TOOL_RESULT_CONTENT_COUNT = 'mcp.tool.result.content_count';\n\n/**\n * Type for {@link MCP_TOOL_RESULT_CONTENT_COUNT} mcp.tool.result.content_count\n */\nexport type MCP_TOOL_RESULT_CONTENT_COUNT_TYPE = number;\n\n// Path: model/attributes/mcp/mcp__tool__result__is_error.json\n\n/**\n * Whether a tool execution resulted in an error. `mcp.tool.result.is_error`\n *\n * Attribute Value Type: `boolean` {@link MCP_TOOL_RESULT_IS_ERROR_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @deprecated Use {@link ERROR_TYPE} (error.type) instead - OTel uses error.type set to 'tool_error' when isError is true. Cannot be automatically backfilled due to type mismatch (boolean vs string).\n * @example false\n */\nexport const MCP_TOOL_RESULT_IS_ERROR = 'mcp.tool.result.is_error';\n\n/**\n * Type for {@link MCP_TOOL_RESULT_IS_ERROR} mcp.tool.result.is_error\n */\nexport type MCP_TOOL_RESULT_IS_ERROR_TYPE = boolean;\n\n// Path: model/attributes/mcp/mcp__transport.json\n\n/**\n * Transport method used for MCP communication. `mcp.transport`\n *\n * Attribute Value Type: `string` {@link MCP_TRANSPORT_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link NETWORK_TRANSPORT} `network.transport`, {@link NET_TRANSPORT} `net.transport`\n *\n * @deprecated Use {@link NETWORK_TRANSPORT} (network.transport) instead - OTel uses the generic network.transport attribute\n * @example \"stdio\"\n */\nexport const MCP_TRANSPORT = 'mcp.transport';\n\n/**\n * Type for {@link MCP_TRANSPORT} mcp.transport\n */\nexport type MCP_TRANSPORT_TYPE = string;\n\n// Path: model/attributes/mdc/mdc__[key].json\n\n/**\n * Attributes from the Mapped Diagnostic Context (MDC) present at the moment the log record was created. The MDC is supported by all the most popular logging solutions in the Java ecosystem, and it's usually implemented as a thread-local map that stores context for e.g. a specific request. `mdc.<key>`\n *\n * Attribute Value Type: `string` {@link MDC_KEY_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Has Dynamic Suffix: true\n *\n * @example \"mdc.some_key='some_value'\"\n */\nexport const MDC_KEY = 'mdc.<key>';\n\n/**\n * Base key for {@link MDC_KEY}. Use with a dynamic suffix, e.g. `${MDC_KEY_BASE}.${key}`.\n */\nexport const MDC_KEY_BASE = 'mdc';\n\n/**\n * Type for {@link MDC_KEY} mdc.<key>\n */\nexport type MDC_KEY_TYPE = string;\n\n// Path: model/attributes/messaging/messaging__batch__message_count.json\n\n/**\n * The number of messages sent, received, or processed in the scope of the batching operation. `messaging.batch.message_count`\n *\n * Attribute Value Type: `number` {@link MESSAGING_BATCH_MESSAGE_COUNT_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example 10\n */\nexport const MESSAGING_BATCH_MESSAGE_COUNT = 'messaging.batch.message_count';\n\n/**\n * Type for {@link MESSAGING_BATCH_MESSAGE_COUNT} messaging.batch.message_count\n */\nexport type MESSAGING_BATCH_MESSAGE_COUNT_TYPE = number;\n\n// Path: model/attributes/messaging/messaging__destination.json\n\n/**\n * The message destination name. `messaging.destination`\n *\n * Attribute Value Type: `string` {@link MESSAGING_DESTINATION_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link MESSAGING_DESTINATION_NAME} `messaging.destination.name`\n *\n * @deprecated Use {@link MESSAGING_DESTINATION_NAME} (messaging.destination.name) instead - This attribute is being deprecated in favor of messaging.destination.name, which is the OTel-aligned replacement.\n * @example \"BestTopic\"\n */\nexport const MESSAGING_DESTINATION = 'messaging.destination';\n\n/**\n * Type for {@link MESSAGING_DESTINATION} messaging.destination\n */\nexport type MESSAGING_DESTINATION_TYPE = string;\n\n// Path: model/attributes/messaging/messaging__destination__connection.json\n\n/**\n * The message destination connection. `messaging.destination.connection`\n *\n * Attribute Value Type: `string` {@link MESSAGING_DESTINATION_CONNECTION_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"BestTopic\"\n */\nexport const MESSAGING_DESTINATION_CONNECTION = 'messaging.destination.connection';\n\n/**\n * Type for {@link MESSAGING_DESTINATION_CONNECTION} messaging.destination.connection\n */\nexport type MESSAGING_DESTINATION_CONNECTION_TYPE = string;\n\n// Path: model/attributes/messaging/messaging__destination__name.json\n\n/**\n * The message destination name. `messaging.destination.name`\n *\n * Attribute Value Type: `string` {@link MESSAGING_DESTINATION_NAME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link MESSAGING_DESTINATION} `messaging.destination`\n *\n * @example \"BestTopic\"\n */\nexport const MESSAGING_DESTINATION_NAME = 'messaging.destination.name';\n\n/**\n * Type for {@link MESSAGING_DESTINATION_NAME} messaging.destination.name\n */\nexport type MESSAGING_DESTINATION_NAME_TYPE = string;\n\n// Path: model/attributes/messaging/messaging__message__body__size.json\n\n/**\n * The size of the message body in bytes. `messaging.message.body.size`\n *\n * Attribute Value Type: `number` {@link MESSAGING_MESSAGE_BODY_SIZE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example 839\n */\nexport const MESSAGING_MESSAGE_BODY_SIZE = 'messaging.message.body.size';\n\n/**\n * Type for {@link MESSAGING_MESSAGE_BODY_SIZE} messaging.message.body.size\n */\nexport type MESSAGING_MESSAGE_BODY_SIZE_TYPE = number;\n\n// Path: model/attributes/messaging/messaging__message__conversation_id.json\n\n/**\n * The conversation ID identifying the conversation to which the message belongs, represented as a string. Sometimes called \"Correlation ID\". `messaging.message.conversation_id`\n *\n * Attribute Value Type: `string` {@link MESSAGING_MESSAGE_CONVERSATION_ID_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"MyConversationId\"\n */\nexport const MESSAGING_MESSAGE_CONVERSATION_ID = 'messaging.message.conversation_id';\n\n/**\n * Type for {@link MESSAGING_MESSAGE_CONVERSATION_ID} messaging.message.conversation_id\n */\nexport type MESSAGING_MESSAGE_CONVERSATION_ID_TYPE = string;\n\n// Path: model/attributes/messaging/messaging__message__envelope__size.json\n\n/**\n * The size of the message body and metadata in bytes. `messaging.message.envelope.size`\n *\n * Attribute Value Type: `number` {@link MESSAGING_MESSAGE_ENVELOPE_SIZE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example 1045\n */\nexport const MESSAGING_MESSAGE_ENVELOPE_SIZE = 'messaging.message.envelope.size';\n\n/**\n * Type for {@link MESSAGING_MESSAGE_ENVELOPE_SIZE} messaging.message.envelope.size\n */\nexport type MESSAGING_MESSAGE_ENVELOPE_SIZE_TYPE = number;\n\n// Path: model/attributes/messaging/messaging__message__id.json\n\n/**\n * A value used by the messaging system as an identifier for the message, represented as a string. `messaging.message.id`\n *\n * Attribute Value Type: `string` {@link MESSAGING_MESSAGE_ID_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"f47ac10b58cc4372a5670e02b2c3d479\"\n */\nexport const MESSAGING_MESSAGE_ID = 'messaging.message.id';\n\n/**\n * Type for {@link MESSAGING_MESSAGE_ID} messaging.message.id\n */\nexport type MESSAGING_MESSAGE_ID_TYPE = string;\n\n// Path: model/attributes/messaging/messaging__message__receive__latency.json\n\n/**\n * The latency between when the message was published and received. `messaging.message.receive.latency`\n *\n * Attribute Value Type: `number` {@link MESSAGING_MESSAGE_RECEIVE_LATENCY_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 1732847252\n */\nexport const MESSAGING_MESSAGE_RECEIVE_LATENCY = 'messaging.message.receive.latency';\n\n/**\n * Type for {@link MESSAGING_MESSAGE_RECEIVE_LATENCY} messaging.message.receive.latency\n */\nexport type MESSAGING_MESSAGE_RECEIVE_LATENCY_TYPE = number;\n\n// Path: model/attributes/messaging/messaging__message__retry__count.json\n\n/**\n * The amount of attempts to send the message. `messaging.message.retry.count`\n *\n * Attribute Value Type: `number` {@link MESSAGING_MESSAGE_RETRY_COUNT_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 2\n */\nexport const MESSAGING_MESSAGE_RETRY_COUNT = 'messaging.message.retry.count';\n\n/**\n * Type for {@link MESSAGING_MESSAGE_RETRY_COUNT} messaging.message.retry.count\n */\nexport type MESSAGING_MESSAGE_RETRY_COUNT_TYPE = number;\n\n// Path: model/attributes/messaging/messaging__operation__name.json\n\n/**\n * The name of the messaging operation being performed `messaging.operation.name`\n *\n * Attribute Value Type: `string` {@link MESSAGING_OPERATION_NAME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"send\"\n */\nexport const MESSAGING_OPERATION_NAME = 'messaging.operation.name';\n\n/**\n * Type for {@link MESSAGING_OPERATION_NAME} messaging.operation.name\n */\nexport type MESSAGING_OPERATION_NAME_TYPE = string;\n\n// Path: model/attributes/messaging/messaging__operation__type.json\n\n/**\n * A string identifying the type of the messaging operation `messaging.operation.type`\n *\n * Attribute Value Type: `string` {@link MESSAGING_OPERATION_TYPE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"create\"\n */\nexport const MESSAGING_OPERATION_TYPE = 'messaging.operation.type';\n\n/**\n * Type for {@link MESSAGING_OPERATION_TYPE} messaging.operation.type\n */\nexport type MESSAGING_OPERATION_TYPE_TYPE = string;\n\n// Path: model/attributes/messaging/messaging__rabbitmq__destination__routing_key.json\n\n/**\n * RabbitMQ message routing key. `messaging.rabbitmq.destination.routing_key`\n *\n * Attribute Value Type: `string` {@link MESSAGING_RABBITMQ_DESTINATION_ROUTING_KEY_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"myKey\"\n */\nexport const MESSAGING_RABBITMQ_DESTINATION_ROUTING_KEY = 'messaging.rabbitmq.destination.routing_key';\n\n/**\n * Type for {@link MESSAGING_RABBITMQ_DESTINATION_ROUTING_KEY} messaging.rabbitmq.destination.routing_key\n */\nexport type MESSAGING_RABBITMQ_DESTINATION_ROUTING_KEY_TYPE = string;\n\n// Path: model/attributes/messaging/messaging__system.json\n\n/**\n * The messaging system as identified by the client instrumentation. `messaging.system`\n *\n * Attribute Value Type: `string` {@link MESSAGING_SYSTEM_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"activemq\"\n */\nexport const MESSAGING_SYSTEM = 'messaging.system';\n\n/**\n * Type for {@link MESSAGING_SYSTEM} messaging.system\n */\nexport type MESSAGING_SYSTEM_TYPE = string;\n\n// Path: model/attributes/method.json\n\n/**\n * The HTTP method used. `method`\n *\n * Attribute Value Type: `string` {@link METHOD_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link HTTP_REQUEST_METHOD} `http.request.method`, {@link _HTTP_REQUEST_METHOD} `http.request_method`, {@link HTTP_METHOD} `http.method`\n *\n * @deprecated Use {@link HTTP_REQUEST_METHOD} (http.request.method) instead\n * @example \"GET\"\n */\nexport const METHOD = 'method';\n\n/**\n * Type for {@link METHOD} method\n */\nexport type METHOD_TYPE = string;\n\n// Path: model/attributes/middleware/middleware__name.json\n\n/**\n * The name of the middleware. `middleware.name`\n *\n * Attribute Value Type: `string` {@link MIDDLEWARE_NAME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"AuthenticationMiddleware\"\n */\nexport const MIDDLEWARE_NAME = 'middleware.name';\n\n/**\n * Type for {@link MIDDLEWARE_NAME} middleware.name\n */\nexport type MIDDLEWARE_NAME_TYPE = string;\n\n// Path: model/attributes/navigation/navigation__origin.json\n\n/**\n * The origin of the navigation (usually client side router navigations). Should preferrably parameterized template (like url.template) or a URL path otherwise. `navigation.origin`\n *\n * Attribute Value Type: `string` {@link NAVIGATION_ORIGIN_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link SENTRY_SVELTEKIT_NAVIGATION_FROM} `sentry.sveltekit.navigation.from`\n *\n * @example \"/users/:id\"\n */\nexport const NAVIGATION_ORIGIN = 'navigation.origin';\n\n/**\n * Type for {@link NAVIGATION_ORIGIN} navigation.origin\n */\nexport type NAVIGATION_ORIGIN_TYPE = string;\n\n// Path: model/attributes/navigation/navigation__route__id.json\n\n/**\n * The identifier of the matched client-side route, as assigned by the routing framework (e.g., vue-router name, react-router id). `navigation.route.id`\n *\n * Attribute Value Type: `string` {@link NAVIGATION_ROUTE_ID_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"AboutView\"\n */\nexport const NAVIGATION_ROUTE_ID = 'navigation.route.id';\n\n/**\n * Type for {@link NAVIGATION_ROUTE_ID} navigation.route.id\n */\nexport type NAVIGATION_ROUTE_ID_TYPE = string;\n\n// Path: model/attributes/navigation/navigation__type.json\n\n/**\n * The type of navigation done by a client-side router. `navigation.type`\n *\n * Attribute Value Type: `string` {@link NAVIGATION_TYPE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link SENTRY_SVELTEKIT_NAVIGATION_TYPE} `sentry.sveltekit.navigation.type`\n *\n * @example \"router.push\"\n */\nexport const NAVIGATION_TYPE = 'navigation.type';\n\n/**\n * Type for {@link NAVIGATION_TYPE} navigation.type\n */\nexport type NAVIGATION_TYPE_TYPE = string;\n\n// Path: model/attributes/nel/nel__elapsed_time.json\n\n/**\n * The elapsed number of milliseconds between the start of the resource fetch and when it was completed or aborted by the user agent. `nel.elapsed_time`\n *\n * Attribute Value Type: `number` {@link NEL_ELAPSED_TIME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 100\n */\nexport const NEL_ELAPSED_TIME = 'nel.elapsed_time';\n\n/**\n * Type for {@link NEL_ELAPSED_TIME} nel.elapsed_time\n */\nexport type NEL_ELAPSED_TIME_TYPE = number;\n\n// Path: model/attributes/nel/nel__phase.json\n\n/**\n * If request failed, the phase of its network error. If request succeeded, \"application\". `nel.phase`\n *\n * Attribute Value Type: `string` {@link NEL_PHASE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"application\"\n */\nexport const NEL_PHASE = 'nel.phase';\n\n/**\n * Type for {@link NEL_PHASE} nel.phase\n */\nexport type NEL_PHASE_TYPE = string;\n\n// Path: model/attributes/nel/nel__referrer.json\n\n/**\n * request's referrer, as determined by the referrer policy associated with its client. `nel.referrer`\n *\n * Attribute Value Type: `string` {@link NEL_REFERRER_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"https://example.com/foo?bar=baz\"\n */\nexport const NEL_REFERRER = 'nel.referrer';\n\n/**\n * Type for {@link NEL_REFERRER} nel.referrer\n */\nexport type NEL_REFERRER_TYPE = string;\n\n// Path: model/attributes/nel/nel__sampling_function.json\n\n/**\n * The sampling function used to determine if the request should be sampled. `nel.sampling_function`\n *\n * Attribute Value Type: `number` {@link NEL_SAMPLING_FUNCTION_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 0.5\n */\nexport const NEL_SAMPLING_FUNCTION = 'nel.sampling_function';\n\n/**\n * Type for {@link NEL_SAMPLING_FUNCTION} nel.sampling_function\n */\nexport type NEL_SAMPLING_FUNCTION_TYPE = number;\n\n// Path: model/attributes/nel/nel__type.json\n\n/**\n * If request failed, the type of its network error. If request succeeded, \"ok\". `nel.type`\n *\n * Attribute Value Type: `string` {@link NEL_TYPE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"dns.unreachable\"\n */\nexport const NEL_TYPE = 'nel.type';\n\n/**\n * Type for {@link NEL_TYPE} nel.type\n */\nexport type NEL_TYPE_TYPE = string;\n\n// Path: model/attributes/network/network__connection__effective_type.json\n\n/**\n * Specifies the effective type of the current connection (e.g. slow-2g, 2g, 3g, 4g). `network.connection.effective_type`\n *\n * Attribute Value Type: `string` {@link NETWORK_CONNECTION_EFFECTIVE_TYPE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link EFFECTIVECONNECTIONTYPE} `effectiveConnectionType`\n *\n * @example \"4g\"\n */\nexport const NETWORK_CONNECTION_EFFECTIVE_TYPE = 'network.connection.effective_type';\n\n/**\n * Type for {@link NETWORK_CONNECTION_EFFECTIVE_TYPE} network.connection.effective_type\n */\nexport type NETWORK_CONNECTION_EFFECTIVE_TYPE_TYPE = string;\n\n// Path: model/attributes/network/network__connection__rtt.json\n\n/**\n * Specifies the estimated effective round-trip time of the current connection, in milliseconds. `network.connection.rtt`\n *\n * Attribute Value Type: `number` {@link NETWORK_CONNECTION_RTT_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link CONNECTION_RTT} `connection.rtt`\n *\n * @example 100\n */\nexport const NETWORK_CONNECTION_RTT = 'network.connection.rtt';\n\n/**\n * Type for {@link NETWORK_CONNECTION_RTT} network.connection.rtt\n */\nexport type NETWORK_CONNECTION_RTT_TYPE = number;\n\n// Path: model/attributes/network/network__connection__type.json\n\n/**\n * Specifies the type of the current connection (e.g. wifi, ethernet, cellular , etc). `network.connection.type`\n *\n * Attribute Value Type: `string` {@link NETWORK_CONNECTION_TYPE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link DEVICE_CONNECTION_TYPE} `device.connection_type`, {@link CONNECTIONTYPE} `connectionType`\n *\n * @example \"wifi\"\n */\nexport const NETWORK_CONNECTION_TYPE = 'network.connection.type';\n\n/**\n * Type for {@link NETWORK_CONNECTION_TYPE} network.connection.type\n */\nexport type NETWORK_CONNECTION_TYPE_TYPE = string;\n\n// Path: model/attributes/network/network__local__address.json\n\n/**\n * Local address of the network connection - IP address or Unix domain socket name. `network.local.address`\n *\n * Attribute Value Type: `string` {@link NETWORK_LOCAL_ADDRESS_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link NET_HOST_IP} `net.host.ip`, {@link NET_SOCK_HOST_ADDR} `net.sock.host.addr`\n *\n * @example \"10.1.2.80\"\n */\nexport const NETWORK_LOCAL_ADDRESS = 'network.local.address';\n\n/**\n * Type for {@link NETWORK_LOCAL_ADDRESS} network.local.address\n */\nexport type NETWORK_LOCAL_ADDRESS_TYPE = string;\n\n// Path: model/attributes/network/network__local__port.json\n\n/**\n * Local port number of the network connection. `network.local.port`\n *\n * Attribute Value Type: `number` {@link NETWORK_LOCAL_PORT_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link NET_SOCK_HOST_PORT} `net.sock.host.port`\n *\n * @example 65400\n */\nexport const NETWORK_LOCAL_PORT = 'network.local.port';\n\n/**\n * Type for {@link NETWORK_LOCAL_PORT} network.local.port\n */\nexport type NETWORK_LOCAL_PORT_TYPE = number;\n\n// Path: model/attributes/network/network__peer__address.json\n\n/**\n * Peer address of the network connection - IP address or Unix domain socket name. `network.peer.address`\n *\n * Attribute Value Type: `string` {@link NETWORK_PEER_ADDRESS_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link NET_PEER_IP} `net.peer.ip`, {@link NET_SOCK_PEER_ADDR} `net.sock.peer.addr`\n *\n * @example \"10.1.2.80\"\n */\nexport const NETWORK_PEER_ADDRESS = 'network.peer.address';\n\n/**\n * Type for {@link NETWORK_PEER_ADDRESS} network.peer.address\n */\nexport type NETWORK_PEER_ADDRESS_TYPE = string;\n\n// Path: model/attributes/network/network__peer__port.json\n\n/**\n * Peer port number of the network connection. `network.peer.port`\n *\n * Attribute Value Type: `number` {@link NETWORK_PEER_PORT_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example 65400\n */\nexport const NETWORK_PEER_PORT = 'network.peer.port';\n\n/**\n * Type for {@link NETWORK_PEER_PORT} network.peer.port\n */\nexport type NETWORK_PEER_PORT_TYPE = number;\n\n// Path: model/attributes/network/network__protocol__name.json\n\n/**\n * OSI application layer or non-OSI equivalent. `network.protocol.name`\n *\n * Attribute Value Type: `string` {@link NETWORK_PROTOCOL_NAME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link NET_PROTOCOL_NAME} `net.protocol.name`, {@link MCP_RESOURCE_PROTOCOL} `mcp.resource.protocol`\n *\n * @example \"http\"\n */\nexport const NETWORK_PROTOCOL_NAME = 'network.protocol.name';\n\n/**\n * Type for {@link NETWORK_PROTOCOL_NAME} network.protocol.name\n */\nexport type NETWORK_PROTOCOL_NAME_TYPE = string;\n\n// Path: model/attributes/network/network__protocol__version.json\n\n/**\n * The actual version of the protocol used for network communication. `network.protocol.version`\n *\n * Attribute Value Type: `string` {@link NETWORK_PROTOCOL_VERSION_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link HTTP_FLAVOR} `http.flavor`, {@link NET_PROTOCOL_VERSION} `net.protocol.version`\n *\n * @example \"1.1\"\n */\nexport const NETWORK_PROTOCOL_VERSION = 'network.protocol.version';\n\n/**\n * Type for {@link NETWORK_PROTOCOL_VERSION} network.protocol.version\n */\nexport type NETWORK_PROTOCOL_VERSION_TYPE = string;\n\n// Path: model/attributes/network/network__transport.json\n\n/**\n * OSI transport layer or inter-process communication method. `network.transport`\n *\n * Attribute Value Type: `string` {@link NETWORK_TRANSPORT_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link NET_TRANSPORT} `net.transport`, {@link MCP_TRANSPORT} `mcp.transport`\n *\n * @example \"tcp\"\n */\nexport const NETWORK_TRANSPORT = 'network.transport';\n\n/**\n * Type for {@link NETWORK_TRANSPORT} network.transport\n */\nexport type NETWORK_TRANSPORT_TYPE = string;\n\n// Path: model/attributes/network/network__type.json\n\n/**\n * OSI network layer or non-OSI equivalent. `network.type`\n *\n * Attribute Value Type: `string` {@link NETWORK_TYPE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"ipv4\"\n */\nexport const NETWORK_TYPE = 'network.type';\n\n/**\n * Type for {@link NETWORK_TYPE} network.type\n */\nexport type NETWORK_TYPE_TYPE = string;\n\n// Path: model/attributes/net/net__host__ip.json\n\n/**\n * Local address of the network connection - IP address or Unix domain socket name. `net.host.ip`\n *\n * Attribute Value Type: `string` {@link NET_HOST_IP_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link NETWORK_LOCAL_ADDRESS} `network.local.address`, {@link NET_SOCK_HOST_ADDR} `net.sock.host.addr`\n *\n * @deprecated Use {@link NETWORK_LOCAL_ADDRESS} (network.local.address) instead\n * @example \"192.168.0.1\"\n */\nexport const NET_HOST_IP = 'net.host.ip';\n\n/**\n * Type for {@link NET_HOST_IP} net.host.ip\n */\nexport type NET_HOST_IP_TYPE = string;\n\n// Path: model/attributes/net/net__host__name.json\n\n/**\n * Server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. `net.host.name`\n *\n * Attribute Value Type: `string` {@link NET_HOST_NAME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link SERVER_ADDRESS} `server.address`, {@link HTTP_SERVER_NAME} `http.server_name`, {@link HTTP_HOST} `http.host`, {@link SERVER_NAME} `server_name`\n *\n * @deprecated Use {@link SERVER_ADDRESS} (server.address) instead\n * @example \"example.com\"\n */\nexport const NET_HOST_NAME = 'net.host.name';\n\n/**\n * Type for {@link NET_HOST_NAME} net.host.name\n */\nexport type NET_HOST_NAME_TYPE = string;\n\n// Path: model/attributes/net/net__host__port.json\n\n/**\n * Server port number. `net.host.port`\n *\n * Attribute Value Type: `number` {@link NET_HOST_PORT_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link SERVER_PORT} `server.port`\n *\n * @deprecated Use {@link SERVER_PORT} (server.port) instead\n * @example 1337\n */\nexport const NET_HOST_PORT = 'net.host.port';\n\n/**\n * Type for {@link NET_HOST_PORT} net.host.port\n */\nexport type NET_HOST_PORT_TYPE = number;\n\n// Path: model/attributes/net/net__peer__ip.json\n\n/**\n * Peer address of the network connection - IP address or Unix domain socket name. `net.peer.ip`\n *\n * Attribute Value Type: `string` {@link NET_PEER_IP_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link NETWORK_PEER_ADDRESS} `network.peer.address`, {@link NET_SOCK_PEER_ADDR} `net.sock.peer.addr`\n *\n * @deprecated Use {@link NETWORK_PEER_ADDRESS} (network.peer.address) instead\n * @example \"192.168.0.1\"\n */\nexport const NET_PEER_IP = 'net.peer.ip';\n\n/**\n * Type for {@link NET_PEER_IP} net.peer.ip\n */\nexport type NET_PEER_IP_TYPE = string;\n\n// Path: model/attributes/net/net__peer__name.json\n\n/**\n * Server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. `net.peer.name`\n *\n * Attribute Value Type: `string` {@link NET_PEER_NAME_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @deprecated Use {@link SERVER_ADDRESS} (server.address) instead - Deprecated, use server.address on client spans and client.address on server spans.\n * @example \"example.com\"\n */\nexport const NET_PEER_NAME = 'net.peer.name';\n\n/**\n * Type for {@link NET_PEER_NAME} net.peer.name\n */\nexport type NET_PEER_NAME_TYPE = string;\n\n// Path: model/attributes/net/net__peer__port.json\n\n/**\n * Peer port number. `net.peer.port`\n *\n * Attribute Value Type: `number` {@link NET_PEER_PORT_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @deprecated Use {@link SERVER_PORT} (server.port) instead - Deprecated, use server.port on client spans and client.port on server spans.\n * @example 1337\n */\nexport const NET_PEER_PORT = 'net.peer.port';\n\n/**\n * Type for {@link NET_PEER_PORT} net.peer.port\n */\nexport type NET_PEER_PORT_TYPE = number;\n\n// Path: model/attributes/net/net__protocol__name.json\n\n/**\n * OSI application layer or non-OSI equivalent. `net.protocol.name`\n *\n * Attribute Value Type: `string` {@link NET_PROTOCOL_NAME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link NETWORK_PROTOCOL_NAME} `network.protocol.name`, {@link MCP_RESOURCE_PROTOCOL} `mcp.resource.protocol`\n *\n * @deprecated Use {@link NETWORK_PROTOCOL_NAME} (network.protocol.name) instead\n * @example \"http\"\n */\nexport const NET_PROTOCOL_NAME = 'net.protocol.name';\n\n/**\n * Type for {@link NET_PROTOCOL_NAME} net.protocol.name\n */\nexport type NET_PROTOCOL_NAME_TYPE = string;\n\n// Path: model/attributes/net/net__protocol__version.json\n\n/**\n * The actual version of the protocol used for network communication. `net.protocol.version`\n *\n * Attribute Value Type: `string` {@link NET_PROTOCOL_VERSION_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link NETWORK_PROTOCOL_VERSION} `network.protocol.version`, {@link HTTP_FLAVOR} `http.flavor`\n *\n * @deprecated Use {@link NETWORK_PROTOCOL_VERSION} (network.protocol.version) instead\n * @example \"1.1\"\n */\nexport const NET_PROTOCOL_VERSION = 'net.protocol.version';\n\n/**\n * Type for {@link NET_PROTOCOL_VERSION} net.protocol.version\n */\nexport type NET_PROTOCOL_VERSION_TYPE = string;\n\n// Path: model/attributes/net/net__sock__family.json\n\n/**\n * OSI transport and network layer `net.sock.family`\n *\n * Attribute Value Type: `string` {@link NET_SOCK_FAMILY_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @deprecated Use {@link NETWORK_TRANSPORT} (network.transport) instead - Deprecated, use network.transport and network.type.\n * @example \"inet\"\n */\nexport const NET_SOCK_FAMILY = 'net.sock.family';\n\n/**\n * Type for {@link NET_SOCK_FAMILY} net.sock.family\n */\nexport type NET_SOCK_FAMILY_TYPE = string;\n\n// Path: model/attributes/net/net__sock__host__addr.json\n\n/**\n * Local address of the network connection mapping to Unix domain socket name. `net.sock.host.addr`\n *\n * Attribute Value Type: `string` {@link NET_SOCK_HOST_ADDR_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link NETWORK_LOCAL_ADDRESS} `network.local.address`, {@link NET_HOST_IP} `net.host.ip`\n *\n * @deprecated Use {@link NETWORK_LOCAL_ADDRESS} (network.local.address) instead\n * @example \"/var/my.sock\"\n */\nexport const NET_SOCK_HOST_ADDR = 'net.sock.host.addr';\n\n/**\n * Type for {@link NET_SOCK_HOST_ADDR} net.sock.host.addr\n */\nexport type NET_SOCK_HOST_ADDR_TYPE = string;\n\n// Path: model/attributes/net/net__sock__host__port.json\n\n/**\n * Local port number of the network connection. `net.sock.host.port`\n *\n * Attribute Value Type: `number` {@link NET_SOCK_HOST_PORT_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link NETWORK_LOCAL_PORT} `network.local.port`\n *\n * @deprecated Use {@link NETWORK_LOCAL_PORT} (network.local.port) instead\n * @example 8080\n */\nexport const NET_SOCK_HOST_PORT = 'net.sock.host.port';\n\n/**\n * Type for {@link NET_SOCK_HOST_PORT} net.sock.host.port\n */\nexport type NET_SOCK_HOST_PORT_TYPE = number;\n\n// Path: model/attributes/net/net__sock__peer__addr.json\n\n/**\n * Peer address of the network connection - IP address `net.sock.peer.addr`\n *\n * Attribute Value Type: `string` {@link NET_SOCK_PEER_ADDR_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link NETWORK_PEER_ADDRESS} `network.peer.address`, {@link NET_PEER_IP} `net.peer.ip`\n *\n * @deprecated Use {@link NETWORK_PEER_ADDRESS} (network.peer.address) instead\n * @example \"192.168.0.1\"\n */\nexport const NET_SOCK_PEER_ADDR = 'net.sock.peer.addr';\n\n/**\n * Type for {@link NET_SOCK_PEER_ADDR} net.sock.peer.addr\n */\nexport type NET_SOCK_PEER_ADDR_TYPE = string;\n\n// Path: model/attributes/net/net__sock__peer__name.json\n\n/**\n * Peer address of the network connection - Unix domain socket name `net.sock.peer.name`\n *\n * Attribute Value Type: `string` {@link NET_SOCK_PEER_NAME_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @deprecated  - Deprecated from OTEL, no replacement at this time\n * @example \"/var/my.sock\"\n */\nexport const NET_SOCK_PEER_NAME = 'net.sock.peer.name';\n\n/**\n * Type for {@link NET_SOCK_PEER_NAME} net.sock.peer.name\n */\nexport type NET_SOCK_PEER_NAME_TYPE = string;\n\n// Path: model/attributes/net/net__sock__peer__port.json\n\n/**\n * Peer port number of the network connection. `net.sock.peer.port`\n *\n * Attribute Value Type: `number` {@link NET_SOCK_PEER_PORT_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @deprecated Use {@link NETWORK_PEER_PORT} (network.peer.port) instead\n * @example 8080\n */\nexport const NET_SOCK_PEER_PORT = 'net.sock.peer.port';\n\n/**\n * Type for {@link NET_SOCK_PEER_PORT} net.sock.peer.port\n */\nexport type NET_SOCK_PEER_PORT_TYPE = number;\n\n// Path: model/attributes/net/net__transport.json\n\n/**\n * OSI transport layer or inter-process communication method. `net.transport`\n *\n * Attribute Value Type: `string` {@link NET_TRANSPORT_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link NETWORK_TRANSPORT} `network.transport`, {@link MCP_TRANSPORT} `mcp.transport`\n *\n * @deprecated Use {@link NETWORK_TRANSPORT} (network.transport) instead\n * @example \"tcp\"\n */\nexport const NET_TRANSPORT = 'net.transport';\n\n/**\n * Type for {@link NET_TRANSPORT} net.transport\n */\nexport type NET_TRANSPORT_TYPE = string;\n\n// Path: model/attributes/os/os__build.json\n\n/**\n * The build ID of the operating system. `os.build`\n *\n * Attribute Value Type: `string` {@link OS_BUILD_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link OS_BUILD_ID} `os.build_id`\n *\n * @deprecated Use {@link OS_BUILD_ID} (os.build_id) instead\n * @example \"1234567890\"\n */\nexport const OS_BUILD = 'os.build';\n\n/**\n * Type for {@link OS_BUILD} os.build\n */\nexport type OS_BUILD_TYPE = string;\n\n// Path: model/attributes/os/os__build_id.json\n\n/**\n * The build ID of the operating system. `os.build_id`\n *\n * Attribute Value Type: `string` {@link OS_BUILD_ID_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link OS_BUILD} `os.build`\n *\n * @example \"1234567890\"\n */\nexport const OS_BUILD_ID = 'os.build_id';\n\n/**\n * Type for {@link OS_BUILD_ID} os.build_id\n */\nexport type OS_BUILD_ID_TYPE = string;\n\n// Path: model/attributes/os/os__description.json\n\n/**\n * Human readable (not intended to be parsed) OS version information, like e.g. reported by ver or lsb_release -a commands. `os.description`\n *\n * Attribute Value Type: `string` {@link OS_DESCRIPTION_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"Ubuntu 18.04.1 LTS\"\n */\nexport const OS_DESCRIPTION = 'os.description';\n\n/**\n * Type for {@link OS_DESCRIPTION} os.description\n */\nexport type OS_DESCRIPTION_TYPE = string;\n\n// Path: model/attributes/os/os__kernel_version.json\n\n/**\n * An independent kernel version string. Typically the entire output of the `uname` syscall. `os.kernel_version`\n *\n * Attribute Value Type: `string` {@link OS_KERNEL_VERSION_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"20.2.0\"\n */\nexport const OS_KERNEL_VERSION = 'os.kernel_version';\n\n/**\n * Type for {@link OS_KERNEL_VERSION} os.kernel_version\n */\nexport type OS_KERNEL_VERSION_TYPE = string;\n\n// Path: model/attributes/os/os__name.json\n\n/**\n * Human readable operating system name. `os.name`\n *\n * Attribute Value Type: `string` {@link OS_NAME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"Ubuntu\"\n */\nexport const OS_NAME = 'os.name';\n\n/**\n * Type for {@link OS_NAME} os.name\n */\nexport type OS_NAME_TYPE = string;\n\n// Path: model/attributes/os/os__raw_description.json\n\n/**\n * An unprocessed description string obtained by the operating system. For some well-known runtimes, Sentry will attempt to parse `name` and `version` from this string, if they are not explicitly given. `os.raw_description`\n *\n * Attribute Value Type: `string` {@link OS_RAW_DESCRIPTION_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"Ubuntu 22.04.4 LTS (Jammy Jellyfish)\"\n */\nexport const OS_RAW_DESCRIPTION = 'os.raw_description';\n\n/**\n * Type for {@link OS_RAW_DESCRIPTION} os.raw_description\n */\nexport type OS_RAW_DESCRIPTION_TYPE = string;\n\n// Path: model/attributes/os/os__rooted.json\n\n/**\n * Whether the operating system has been jailbroken or rooted. `os.rooted`\n *\n * Attribute Value Type: `boolean` {@link OS_ROOTED_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example true\n */\nexport const OS_ROOTED = 'os.rooted';\n\n/**\n * Type for {@link OS_ROOTED} os.rooted\n */\nexport type OS_ROOTED_TYPE = boolean;\n\n// Path: model/attributes/os/os__theme.json\n\n/**\n * Whether the OS runs in dark mode or light mode. `os.theme`\n *\n * Attribute Value Type: `string` {@link OS_THEME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"dark\"\n */\nexport const OS_THEME = 'os.theme';\n\n/**\n * Type for {@link OS_THEME} os.theme\n */\nexport type OS_THEME_TYPE = string;\n\n// Path: model/attributes/os/os__type.json\n\n/**\n * The operating system type. `os.type`\n *\n * Attribute Value Type: `string` {@link OS_TYPE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"linux\"\n */\nexport const OS_TYPE = 'os.type';\n\n/**\n * Type for {@link OS_TYPE} os.type\n */\nexport type OS_TYPE_TYPE = string;\n\n// Path: model/attributes/os/os__version.json\n\n/**\n * The version of the operating system. `os.version`\n *\n * Attribute Value Type: `string` {@link OS_VERSION_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"18.04.2\"\n */\nexport const OS_VERSION = 'os.version';\n\n/**\n * Type for {@link OS_VERSION} os.version\n */\nexport type OS_VERSION_TYPE = string;\n\n// Path: model/attributes/otel/otel__kind.json\n\n/**\n * The span kind (https://opentelemetry.io/docs/concepts/signals/traces/#span-kind). Deprecated, use `sentry.kind` instead. `otel.kind`\n *\n * Attribute Value Type: `string` {@link OTEL_KIND_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link SENTRY_KIND} `sentry.kind`\n *\n * @deprecated Use {@link SENTRY_KIND} (sentry.kind) instead - Deprecated in favor of sentry.kind\n * @example \"SERVER\"\n */\nexport const OTEL_KIND = 'otel.kind';\n\n/**\n * Type for {@link OTEL_KIND} otel.kind\n */\nexport type OTEL_KIND_TYPE = string;\n\n// Path: model/attributes/otel/otel__scope__name.json\n\n/**\n * The name of the instrumentation scope - (InstrumentationScope.Name in OTLP). `otel.scope.name`\n *\n * Attribute Value Type: `string` {@link OTEL_SCOPE_NAME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"io.opentelemetry.contrib.mongodb\"\n */\nexport const OTEL_SCOPE_NAME = 'otel.scope.name';\n\n/**\n * Type for {@link OTEL_SCOPE_NAME} otel.scope.name\n */\nexport type OTEL_SCOPE_NAME_TYPE = string;\n\n// Path: model/attributes/otel/otel__scope__version.json\n\n/**\n * The version of the instrumentation scope - (InstrumentationScope.Version in OTLP). `otel.scope.version`\n *\n * Attribute Value Type: `string` {@link OTEL_SCOPE_VERSION_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"2.4.5\"\n */\nexport const OTEL_SCOPE_VERSION = 'otel.scope.version';\n\n/**\n * Type for {@link OTEL_SCOPE_VERSION} otel.scope.version\n */\nexport type OTEL_SCOPE_VERSION_TYPE = string;\n\n// Path: model/attributes/otel/otel__status_code.json\n\n/**\n * Name of the code, either “OK” or “ERROR”. MUST NOT be set if the status code is UNSET. `otel.status_code`\n *\n * Attribute Value Type: `string` {@link OTEL_STATUS_CODE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"OK\"\n */\nexport const OTEL_STATUS_CODE = 'otel.status_code';\n\n/**\n * Type for {@link OTEL_STATUS_CODE} otel.status_code\n */\nexport type OTEL_STATUS_CODE_TYPE = string;\n\n// Path: model/attributes/otel/otel__status_description.json\n\n/**\n * Description of the Status if it has a value, otherwise not set. `otel.status_description`\n *\n * Attribute Value Type: `string` {@link OTEL_STATUS_DESCRIPTION_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"resource not found\"\n */\nexport const OTEL_STATUS_DESCRIPTION = 'otel.status_description';\n\n/**\n * Type for {@link OTEL_STATUS_DESCRIPTION} otel.status_description\n */\nexport type OTEL_STATUS_DESCRIPTION_TYPE = string;\n\n// Path: model/attributes/params/params__[key].json\n\n/**\n * Decoded parameters extracted from a URL path. Usually added by client-side routing frameworks like vue-router. `params.<key>`\n *\n * Attribute Value Type: `string` {@link PARAMS_KEY_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Has Dynamic Suffix: true\n *\n * Aliases: {@link URL_PATH_PARAMETER_KEY} `url.path.parameter.<key>`\n *\n * @example \"params.id='123'\"\n */\nexport const PARAMS_KEY = 'params.<key>';\n\n/**\n * Base key for {@link PARAMS_KEY}. Use with a dynamic suffix, e.g. `${PARAMS_KEY_BASE}.${key}`.\n */\nexport const PARAMS_KEY_BASE = 'params';\n\n/**\n * Type for {@link PARAMS_KEY} params.<key>\n */\nexport type PARAMS_KEY_TYPE = string;\n\n// Path: model/attributes/performance/performance__activationStart.json\n\n/**\n * The time between initiating a navigation to a page and the browser activating the page `performance.activationStart`\n *\n * Attribute Value Type: `number` {@link PERFORMANCE_ACTIVATIONSTART_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link BROWSER_PERFORMANCE_NAVIGATION_ACTIVATION_START} `browser.performance.navigation.activation_start`\n *\n * @deprecated Use {@link BROWSER_PERFORMANCE_NAVIGATION_ACTIVATION_START} (browser.performance.navigation.activation_start) instead - The activationStart is now recorded as the browser.performance.navigation.activation_start attribute.\n * @example 1.983\n */\nexport const PERFORMANCE_ACTIVATIONSTART = 'performance.activationStart';\n\n/**\n * Type for {@link PERFORMANCE_ACTIVATIONSTART} performance.activationStart\n */\nexport type PERFORMANCE_ACTIVATIONSTART_TYPE = number;\n\n// Path: model/attributes/performance/performance__timeOrigin.json\n\n/**\n * The browser's performance.timeOrigin timestamp representing the time when the pageload was initiated `performance.timeOrigin`\n *\n * Attribute Value Type: `number` {@link PERFORMANCE_TIMEORIGIN_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link BROWSER_PERFORMANCE_TIME_ORIGIN} `browser.performance.time_origin`\n *\n * @deprecated Use {@link BROWSER_PERFORMANCE_TIME_ORIGIN} (browser.performance.time_origin) instead - The timeOrigin is now recorded as the browser.performance.time_origin attribute.\n * @example 1776185678.886\n */\nexport const PERFORMANCE_TIMEORIGIN = 'performance.timeOrigin';\n\n/**\n * Type for {@link PERFORMANCE_TIMEORIGIN} performance.timeOrigin\n */\nexport type PERFORMANCE_TIMEORIGIN_TYPE = number;\n\n// Path: model/attributes/previous_route.json\n\n/**\n * Also used by mobile SDKs to indicate the previous route in the application. `previous_route`\n *\n * Attribute Value Type: `string` {@link PREVIOUS_ROUTE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"HomeScreen\"\n */\nexport const PREVIOUS_ROUTE = 'previous_route';\n\n/**\n * Type for {@link PREVIOUS_ROUTE} previous_route\n */\nexport type PREVIOUS_ROUTE_TYPE = string;\n\n// Path: model/attributes/process/process__command_args.json\n\n/**\n * All the command arguments (including the command/executable itself) as received by the process. `process.command_args`\n *\n * Attribute Value Type: `Array<string>` {@link PROCESS_COMMAND_ARGS_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example [\"cmd/otecol\",\"--config=config.yaml\"]\n */\nexport const PROCESS_COMMAND_ARGS = 'process.command_args';\n\n/**\n * Type for {@link PROCESS_COMMAND_ARGS} process.command_args\n */\nexport type PROCESS_COMMAND_ARGS_TYPE = Array<string>;\n\n// Path: model/attributes/process/process__executable__name.json\n\n/**\n * The name of the executable that started the process. `process.executable.name`\n *\n * Attribute Value Type: `string` {@link PROCESS_EXECUTABLE_NAME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"getsentry\"\n */\nexport const PROCESS_EXECUTABLE_NAME = 'process.executable.name';\n\n/**\n * Type for {@link PROCESS_EXECUTABLE_NAME} process.executable.name\n */\nexport type PROCESS_EXECUTABLE_NAME_TYPE = string;\n\n// Path: model/attributes/process/process__pid.json\n\n/**\n * The process ID of the running process. `process.pid`\n *\n * Attribute Value Type: `number` {@link PROCESS_PID_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example 12345\n */\nexport const PROCESS_PID = 'process.pid';\n\n/**\n * Type for {@link PROCESS_PID} process.pid\n */\nexport type PROCESS_PID_TYPE = number;\n\n// Path: model/attributes/process/process__runtime__description.json\n\n/**\n * An additional description about the runtime of the process, for example a specific vendor customization of the runtime environment. Equivalent to `raw_description` in the Sentry runtime context. `process.runtime.description`\n *\n * Attribute Value Type: `string` {@link PROCESS_RUNTIME_DESCRIPTION_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link RUNTIME_RAW_DESCRIPTION} `runtime.raw_description`\n *\n * @example \"Eclipse OpenJ9 VM openj9-0.21.0\"\n */\nexport const PROCESS_RUNTIME_DESCRIPTION = 'process.runtime.description';\n\n/**\n * Type for {@link PROCESS_RUNTIME_DESCRIPTION} process.runtime.description\n */\nexport type PROCESS_RUNTIME_DESCRIPTION_TYPE = string;\n\n// Path: model/attributes/process/process__runtime__engine__name.json\n\n/**\n * The name of the runtime engine. `process.runtime.engine.name`\n *\n * Attribute Value Type: `string` {@link PROCESS_RUNTIME_ENGINE_NAME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"v8\"\n */\nexport const PROCESS_RUNTIME_ENGINE_NAME = 'process.runtime.engine.name';\n\n/**\n * Type for {@link PROCESS_RUNTIME_ENGINE_NAME} process.runtime.engine.name\n */\nexport type PROCESS_RUNTIME_ENGINE_NAME_TYPE = string;\n\n// Path: model/attributes/process/process__runtime__engine__version.json\n\n/**\n * The version of the runtime engine. `process.runtime.engine.version`\n *\n * Attribute Value Type: `string` {@link PROCESS_RUNTIME_ENGINE_VERSION_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"12.9.202.13-rusty\"\n */\nexport const PROCESS_RUNTIME_ENGINE_VERSION = 'process.runtime.engine.version';\n\n/**\n * Type for {@link PROCESS_RUNTIME_ENGINE_VERSION} process.runtime.engine.version\n */\nexport type PROCESS_RUNTIME_ENGINE_VERSION_TYPE = string;\n\n// Path: model/attributes/process/process__runtime__name.json\n\n/**\n * The name of the runtime. Equivalent to `name` in the Sentry runtime context. `process.runtime.name`\n *\n * Attribute Value Type: `string` {@link PROCESS_RUNTIME_NAME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link RUNTIME_NAME} `runtime.name`\n *\n * @example \"node\"\n */\nexport const PROCESS_RUNTIME_NAME = 'process.runtime.name';\n\n/**\n * Type for {@link PROCESS_RUNTIME_NAME} process.runtime.name\n */\nexport type PROCESS_RUNTIME_NAME_TYPE = string;\n\n// Path: model/attributes/process/process__runtime__version.json\n\n/**\n * The version of the runtime of this process, as returned by the runtime without modification. Equivalent to `version` in the Sentry runtime context. `process.runtime.version`\n *\n * Attribute Value Type: `string` {@link PROCESS_RUNTIME_VERSION_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link RUNTIME_VERSION} `runtime.version`\n *\n * @example \"18.04.2\"\n */\nexport const PROCESS_RUNTIME_VERSION = 'process.runtime.version';\n\n/**\n * Type for {@link PROCESS_RUNTIME_VERSION} process.runtime.version\n */\nexport type PROCESS_RUNTIME_VERSION_TYPE = string;\n\n// Path: model/attributes/query/query__[key].json\n\n/**\n * An item in a query string. Usually added by client-side routing frameworks like vue-router. `query.<key>`\n *\n * Attribute Value Type: `string` {@link QUERY_KEY_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Has Dynamic Suffix: true\n *\n * @deprecated Use {@link URL_QUERY} (url.query) instead - Instead of sending items individually in query.<key>, they should be sent all together with url.query.\n * @example \"query.id='123'\"\n */\nexport const QUERY_KEY = 'query.<key>';\n\n/**\n * Base key for {@link QUERY_KEY}. Use with a dynamic suffix, e.g. `${QUERY_KEY_BASE}.${key}`.\n *\n * @deprecated Use {@link URL_QUERY} (url.query) instead - Instead of sending items individually in query.<key>, they should be sent all together with url.query.\n */\nexport const QUERY_KEY_BASE = 'query';\n\n/**\n * Type for {@link QUERY_KEY} query.<key>\n */\nexport type QUERY_KEY_TYPE = string;\n\n// Path: model/attributes/react/react__version.json\n\n/**\n * The version of the React framework `react.version`\n *\n * Attribute Value Type: `string` {@link REACT_VERSION_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"18.2.0\"\n */\nexport const REACT_VERSION = 'react.version';\n\n/**\n * Type for {@link REACT_VERSION} react.version\n */\nexport type REACT_VERSION_TYPE = string;\n\n// Path: model/attributes/release.json\n\n/**\n * The sentry release. `release`\n *\n * Attribute Value Type: `string` {@link RELEASE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link SENTRY_RELEASE} `sentry.release`\n *\n * @deprecated Use {@link SENTRY_RELEASE} (sentry.release) instead\n * @example \"production\"\n */\nexport const RELEASE = 'release';\n\n/**\n * Type for {@link RELEASE} release\n */\nexport type RELEASE_TYPE = string;\n\n// Path: model/attributes/remix/remix__action_form_data__[key].json\n\n/**\n * Remix form data, <key> being the form data key, the value being the form data value. `remix.action_form_data.<key>`\n *\n * Attribute Value Type: `string` {@link REMIX_ACTION_FORM_DATA_KEY_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Has Dynamic Suffix: true\n *\n * @example \"http.response.header.text='test'\"\n */\nexport const REMIX_ACTION_FORM_DATA_KEY = 'remix.action_form_data.<key>';\n\n/**\n * Base key for {@link REMIX_ACTION_FORM_DATA_KEY}. Use with a dynamic suffix, e.g. `${REMIX_ACTION_FORM_DATA_KEY_BASE}.${key}`.\n */\nexport const REMIX_ACTION_FORM_DATA_KEY_BASE = 'remix.action_form_data';\n\n/**\n * Type for {@link REMIX_ACTION_FORM_DATA_KEY} remix.action_form_data.<key>\n */\nexport type REMIX_ACTION_FORM_DATA_KEY_TYPE = string;\n\n// Path: model/attributes/replay_id.json\n\n/**\n * The id of the sentry replay. `replay_id`\n *\n * Attribute Value Type: `string` {@link REPLAY_ID_TYPE}\n *\n * Apply Scrubbing: never\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link SENTRY_REPLAY_ID} `sentry.replay_id`\n *\n * @deprecated Use {@link SENTRY_REPLAY_ID} (sentry.replay_id) instead\n * @example \"123e4567e89b12d3a456426614174000\"\n */\nexport const REPLAY_ID = 'replay_id';\n\n/**\n * Type for {@link REPLAY_ID} replay_id\n */\nexport type REPLAY_ID_TYPE = string;\n\n// Path: model/attributes/resource/resource__deployment__environment.json\n\n/**\n * The software deployment environment name. `resource.deployment.environment`\n *\n * Attribute Value Type: `string` {@link RESOURCE_DEPLOYMENT_ENVIRONMENT_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @deprecated Use {@link SENTRY_ENVIRONMENT} (sentry.environment) instead\n * @example \"production\"\n */\nexport const RESOURCE_DEPLOYMENT_ENVIRONMENT = 'resource.deployment.environment';\n\n/**\n * Type for {@link RESOURCE_DEPLOYMENT_ENVIRONMENT} resource.deployment.environment\n */\nexport type RESOURCE_DEPLOYMENT_ENVIRONMENT_TYPE = string;\n\n// Path: model/attributes/resource/resource__deployment__environment__name.json\n\n/**\n * The software deployment environment name. `resource.deployment.environment.name`\n *\n * Attribute Value Type: `string` {@link RESOURCE_DEPLOYMENT_ENVIRONMENT_NAME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @deprecated Use {@link SENTRY_ENVIRONMENT} (sentry.environment) instead\n * @example \"production\"\n */\nexport const RESOURCE_DEPLOYMENT_ENVIRONMENT_NAME = 'resource.deployment.environment.name';\n\n/**\n * Type for {@link RESOURCE_DEPLOYMENT_ENVIRONMENT_NAME} resource.deployment.environment.name\n */\nexport type RESOURCE_DEPLOYMENT_ENVIRONMENT_NAME_TYPE = string;\n\n// Path: model/attributes/resource/resource__render_blocking_status.json\n\n/**\n * The render blocking status of the resource. `resource.render_blocking_status`\n *\n * Attribute Value Type: `string` {@link RESOURCE_RENDER_BLOCKING_STATUS_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"non-blocking\"\n */\nexport const RESOURCE_RENDER_BLOCKING_STATUS = 'resource.render_blocking_status';\n\n/**\n * Type for {@link RESOURCE_RENDER_BLOCKING_STATUS} resource.render_blocking_status\n */\nexport type RESOURCE_RENDER_BLOCKING_STATUS_TYPE = string;\n\n// Path: model/attributes/route.json\n\n/**\n * The matched route, that is, the path template in the format used by the respective server framework. Also used by mobile SDKs to indicate the current route in the application. `route`\n *\n * Attribute Value Type: `string` {@link ROUTE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link HTTP_ROUTE} `http.route`\n *\n * @deprecated Use {@link HTTP_ROUTE} (http.route) instead\n * @example \"App\\\\Controller::indexAction\"\n */\nexport const ROUTE = 'route';\n\n/**\n * Type for {@link ROUTE} route\n */\nexport type ROUTE_TYPE = string;\n\n// Path: model/attributes/rpc/rpc__grpc__status_code.json\n\n/**\n * The numeric status code of the gRPC request. `rpc.grpc.status_code`\n *\n * Attribute Value Type: `number` {@link RPC_GRPC_STATUS_CODE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example 2\n */\nexport const RPC_GRPC_STATUS_CODE = 'rpc.grpc.status_code';\n\n/**\n * Type for {@link RPC_GRPC_STATUS_CODE} rpc.grpc.status_code\n */\nexport type RPC_GRPC_STATUS_CODE_TYPE = number;\n\n// Path: model/attributes/rpc/rpc__method.json\n\n/**\n * The fully-qualified logical name of the method from the RPC interface perspective. `rpc.method`\n *\n * Attribute Value Type: `string` {@link RPC_METHOD_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"com.example.ExampleService/exampleMethod\"\n */\nexport const RPC_METHOD = 'rpc.method';\n\n/**\n * Type for {@link RPC_METHOD} rpc.method\n */\nexport type RPC_METHOD_TYPE = string;\n\n// Path: model/attributes/rpc/rpc__response__status_code.json\n\n/**\n * Status code of the RPC returned by the RPC server or generated by the client. `rpc.response.status_code`\n *\n * Attribute Value Type: `string` {@link RPC_RESPONSE_STATUS_CODE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"DEADLINE_EXCEEDED\"\n */\nexport const RPC_RESPONSE_STATUS_CODE = 'rpc.response.status_code';\n\n/**\n * Type for {@link RPC_RESPONSE_STATUS_CODE} rpc.response.status_code\n */\nexport type RPC_RESPONSE_STATUS_CODE_TYPE = string;\n\n// Path: model/attributes/rpc/rpc__service.json\n\n/**\n * The full (logical) name of the service being called, including its package name, if applicable. `rpc.service`\n *\n * Attribute Value Type: `string` {@link RPC_SERVICE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"myService.BestService\"\n */\nexport const RPC_SERVICE = 'rpc.service';\n\n/**\n * Type for {@link RPC_SERVICE} rpc.service\n */\nexport type RPC_SERVICE_TYPE = string;\n\n// Path: model/attributes/rpc/rpc__system.json\n\n/**\n * A string identifying the remoting system. `rpc.system`\n *\n * Attribute Value Type: `string` {@link RPC_SYSTEM_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link RPC_SYSTEM_NAME} `rpc.system.name`\n *\n * @deprecated Use {@link RPC_SYSTEM_NAME} (rpc.system.name) instead - This attribute is being deprecated in favor of rpc.system.name, which is the OTel-aligned replacement.\n * @example \"aws-api\"\n */\nexport const RPC_SYSTEM = 'rpc.system';\n\n/**\n * Type for {@link RPC_SYSTEM} rpc.system\n */\nexport type RPC_SYSTEM_TYPE = string;\n\n// Path: model/attributes/rpc/rpc__system__name.json\n\n/**\n * A string identifying the remoting system. `rpc.system.name`\n *\n * Attribute Value Type: `string` {@link RPC_SYSTEM_NAME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link RPC_SYSTEM} `rpc.system`\n *\n * @example \"aws-api\"\n */\nexport const RPC_SYSTEM_NAME = 'rpc.system.name';\n\n/**\n * Type for {@link RPC_SYSTEM_NAME} rpc.system.name\n */\nexport type RPC_SYSTEM_NAME_TYPE = string;\n\n// Path: model/attributes/runtime/runtime__build.json\n\n/**\n * The application build string, when it is separate from the version. `runtime.build`\n *\n * Attribute Value Type: `string` {@link RUNTIME_BUILD_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @deprecated  - The runtime.* namespace is deprecated in favor of process.runtime.*. No direct OTel equivalent exists for this attribute.\n * @example \"stable\"\n */\nexport const RUNTIME_BUILD = 'runtime.build';\n\n/**\n * Type for {@link RUNTIME_BUILD} runtime.build\n */\nexport type RUNTIME_BUILD_TYPE = string;\n\n// Path: model/attributes/runtime/runtime__name.json\n\n/**\n * The name of the runtime. For example node, CPython, or rustc. `runtime.name`\n *\n * Attribute Value Type: `string` {@link RUNTIME_NAME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link PROCESS_RUNTIME_NAME} `process.runtime.name`\n *\n * @deprecated Use {@link PROCESS_RUNTIME_NAME} (process.runtime.name) instead - Prefer OTel-aligned process.runtime.name\n * @example \"node\"\n */\nexport const RUNTIME_NAME = 'runtime.name';\n\n/**\n * Type for {@link RUNTIME_NAME} runtime.name\n */\nexport type RUNTIME_NAME_TYPE = string;\n\n// Path: model/attributes/runtime/runtime__raw_description.json\n\n/**\n * Unprocessed description string as obtained from the runtime. Used to extract name and version for well-known runtimes. `runtime.raw_description`\n *\n * Attribute Value Type: `string` {@link RUNTIME_RAW_DESCRIPTION_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link PROCESS_RUNTIME_DESCRIPTION} `process.runtime.description`\n *\n * @deprecated Use {@link PROCESS_RUNTIME_DESCRIPTION} (process.runtime.description) instead - Prefer OTel-aligned process.runtime.description\n * @example \"Eclipse OpenJ9 VM openj9-0.21.0\"\n */\nexport const RUNTIME_RAW_DESCRIPTION = 'runtime.raw_description';\n\n/**\n * Type for {@link RUNTIME_RAW_DESCRIPTION} runtime.raw_description\n */\nexport type RUNTIME_RAW_DESCRIPTION_TYPE = string;\n\n// Path: model/attributes/runtime/runtime__version.json\n\n/**\n * The version of the runtime. `runtime.version`\n *\n * Attribute Value Type: `string` {@link RUNTIME_VERSION_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link PROCESS_RUNTIME_VERSION} `process.runtime.version`\n *\n * @deprecated Use {@link PROCESS_RUNTIME_VERSION} (process.runtime.version) instead - Prefer OTel-aligned process.runtime.version\n * @example \"18.04.2\"\n */\nexport const RUNTIME_VERSION = 'runtime.version';\n\n/**\n * Type for {@link RUNTIME_VERSION} runtime.version\n */\nexport type RUNTIME_VERSION_TYPE = string;\n\n// Path: model/attributes/score/score__[key].json\n\n/**\n * The weighted performance score for a web vital. This is defined as `score.weight.<key>` * `score.ratio.<key>`. `score.<key>`\n *\n * Attribute Value Type: `number` {@link SCORE_KEY_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Has Dynamic Suffix: true\n *\n * @example \"score.cls=0.1723\"\n */\nexport const SCORE_KEY = 'score.<key>';\n\n/**\n * Base key for {@link SCORE_KEY}. Use with a dynamic suffix, e.g. `${SCORE_KEY_BASE}.${key}`.\n */\nexport const SCORE_KEY_BASE = 'score';\n\n/**\n * Type for {@link SCORE_KEY} score.<key>\n */\nexport type SCORE_KEY_TYPE = number;\n\n// Path: model/attributes/score/score__ratio__[key].json\n\n/**\n * The score for a web vital, normalized to a number between 0 and 1. `score.ratio.<key>`\n *\n * Attribute Value Type: `number` {@link SCORE_RATIO_KEY_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Has Dynamic Suffix: true\n *\n * @example \"score.ratio.inp=0.7748\"\n */\nexport const SCORE_RATIO_KEY = 'score.ratio.<key>';\n\n/**\n * Base key for {@link SCORE_RATIO_KEY}. Use with a dynamic suffix, e.g. `${SCORE_RATIO_KEY_BASE}.${key}`.\n */\nexport const SCORE_RATIO_KEY_BASE = 'score.ratio';\n\n/**\n * Type for {@link SCORE_RATIO_KEY} score.ratio.<key>\n */\nexport type SCORE_RATIO_KEY_TYPE = number;\n\n// Path: model/attributes/score/score__total.json\n\n/**\n * The total performance score of a span. This is the sum of individual weighted web vital scores (see `score.<key>`). `score.total`\n *\n * Attribute Value Type: `number` {@link SCORE_TOTAL_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n */\nexport const SCORE_TOTAL = 'score.total';\n\n/**\n * Type for {@link SCORE_TOTAL} score.total\n */\nexport type SCORE_TOTAL_TYPE = number;\n\n// Path: model/attributes/score/score__weight__[key].json\n\n/**\n * The relative weight of a web vital in a span's performance score. `score.weight.<key>`\n *\n * Attribute Value Type: `number` {@link SCORE_WEIGHT_KEY_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Has Dynamic Suffix: true\n *\n * @example \"score.weight.fcp=0.25\"\n */\nexport const SCORE_WEIGHT_KEY = 'score.weight.<key>';\n\n/**\n * Base key for {@link SCORE_WEIGHT_KEY}. Use with a dynamic suffix, e.g. `${SCORE_WEIGHT_KEY_BASE}.${key}`.\n */\nexport const SCORE_WEIGHT_KEY_BASE = 'score.weight';\n\n/**\n * Type for {@link SCORE_WEIGHT_KEY} score.weight.<key>\n */\nexport type SCORE_WEIGHT_KEY_TYPE = number;\n\n// Path: model/attributes/sentry/sentry__action.json\n\n/**\n * Used as a generic attribute representing the action depending on the type of span. For instance, this is the database query operation for DB spans, and the request method for HTTP spans. `sentry.action`\n *\n * Attribute Value Type: `string` {@link SENTRY_ACTION_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"SELECT\"\n */\nexport const SENTRY_ACTION = 'sentry.action';\n\n/**\n * Type for {@link SENTRY_ACTION} sentry.action\n */\nexport type SENTRY_ACTION_TYPE = string;\n\n// Path: model/attributes/sentry/sentry__browser__name.json\n\n/**\n * The name of the browser. `sentry.browser.name`\n *\n * Attribute Value Type: `string` {@link SENTRY_BROWSER_NAME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link BROWSER_NAME} `browser.name`\n *\n * @deprecated Use {@link BROWSER_NAME} (browser.name) instead\n * @example \"Chrome\"\n */\nexport const SENTRY_BROWSER_NAME = 'sentry.browser.name';\n\n/**\n * Type for {@link SENTRY_BROWSER_NAME} sentry.browser.name\n */\nexport type SENTRY_BROWSER_NAME_TYPE = string;\n\n// Path: model/attributes/sentry/sentry__browser__version.json\n\n/**\n * The version of the browser. `sentry.browser.version`\n *\n * Attribute Value Type: `string` {@link SENTRY_BROWSER_VERSION_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link BROWSER_VERSION} `browser.version`\n *\n * @deprecated Use {@link BROWSER_VERSION} (browser.version) instead\n * @example \"120.0.6099.130\"\n */\nexport const SENTRY_BROWSER_VERSION = 'sentry.browser.version';\n\n/**\n * Type for {@link SENTRY_BROWSER_VERSION} sentry.browser.version\n */\nexport type SENTRY_BROWSER_VERSION_TYPE = string;\n\n// Path: model/attributes/sentry/sentry__cancellation_reason.json\n\n/**\n * The reason why a span ended early. `sentry.cancellation_reason`\n *\n * Attribute Value Type: `string` {@link SENTRY_CANCELLATION_REASON_TYPE}\n *\n * Apply Scrubbing: never\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"document.hidden\"\n */\nexport const SENTRY_CANCELLATION_REASON = 'sentry.cancellation_reason';\n\n/**\n * Type for {@link SENTRY_CANCELLATION_REASON} sentry.cancellation_reason\n */\nexport type SENTRY_CANCELLATION_REASON_TYPE = string;\n\n// Path: model/attributes/sentry/sentry__category.json\n\n/**\n * The high-level category of a span, derived from the span operation or span attributes. This categorizes spans by their general purpose (e.g., database, HTTP, UI). Known values include: 'ai', 'ai.pipeline', 'app', 'browser', 'cache', 'console', 'db', 'event', 'file', 'function.aws', 'function.azure', 'function.gcp', 'function.nextjs', 'function.remix', 'graphql', 'grpc', 'http', 'measure', 'middleware', 'navigation', 'pageload', 'queue', 'resource', 'rpc', 'serialize', 'subprocess', 'template', 'topic', 'ui', 'ui.angular', 'ui.ember', 'ui.react', 'ui.svelte', 'ui.vue', 'view', 'websocket'. `sentry.category`\n *\n * Attribute Value Type: `string` {@link SENTRY_CATEGORY_TYPE}\n *\n * Apply Scrubbing: never\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"db\"\n */\nexport const SENTRY_CATEGORY = 'sentry.category';\n\n/**\n * Type for {@link SENTRY_CATEGORY} sentry.category\n */\nexport type SENTRY_CATEGORY_TYPE = string;\n\n// Path: model/attributes/sentry/sentry__client_sample_rate.json\n\n/**\n * Rate at which a span was sampled in the SDK. `sentry.client_sample_rate`\n *\n * Attribute Value Type: `number` {@link SENTRY_CLIENT_SAMPLE_RATE_TYPE}\n *\n * Apply Scrubbing: never\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 0.5\n */\nexport const SENTRY_CLIENT_SAMPLE_RATE = 'sentry.client_sample_rate';\n\n/**\n * Type for {@link SENTRY_CLIENT_SAMPLE_RATE} sentry.client_sample_rate\n */\nexport type SENTRY_CLIENT_SAMPLE_RATE_TYPE = number;\n\n// Path: model/attributes/sentry/sentry__description.json\n\n/**\n * The human-readable description of a span. `sentry.description`\n *\n * Attribute Value Type: `string` {@link SENTRY_DESCRIPTION_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"index view query\"\n */\nexport const SENTRY_DESCRIPTION = 'sentry.description';\n\n/**\n * Type for {@link SENTRY_DESCRIPTION} sentry.description\n */\nexport type SENTRY_DESCRIPTION_TYPE = string;\n\n// Path: model/attributes/sentry/sentry__dist.json\n\n/**\n * The sentry dist. `sentry.dist`\n *\n * Attribute Value Type: `string` {@link SENTRY_DIST_TYPE}\n *\n * Apply Scrubbing: never\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link DIST} `dist`\n *\n * @example \"1.0\"\n */\nexport const SENTRY_DIST = 'sentry.dist';\n\n/**\n * Type for {@link SENTRY_DIST} sentry.dist\n */\nexport type SENTRY_DIST_TYPE = string;\n\n// Path: model/attributes/sentry/sentry__domain.json\n\n/**\n * Used as a generic attribute representing the domain depending on the type of span. For instance, this is the collection/table name for database spans, and the server address for HTTP spans. `sentry.domain`\n *\n * Attribute Value Type: `string` {@link SENTRY_DOMAIN_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"example.com\"\n */\nexport const SENTRY_DOMAIN = 'sentry.domain';\n\n/**\n * Type for {@link SENTRY_DOMAIN} sentry.domain\n */\nexport type SENTRY_DOMAIN_TYPE = string;\n\n// Path: model/attributes/sentry/sentry__dsc__environment.json\n\n/**\n * The environment from the dynamic sampling context. `sentry.dsc.environment`\n *\n * Attribute Value Type: `string` {@link SENTRY_DSC_ENVIRONMENT_TYPE}\n *\n * Apply Scrubbing: never\n *\n * Attribute defined in OTEL: No\n * Visibility: internal\n *\n * @example \"prod\"\n */\nexport const SENTRY_DSC_ENVIRONMENT = 'sentry.dsc.environment';\n\n/**\n * Type for {@link SENTRY_DSC_ENVIRONMENT} sentry.dsc.environment\n */\nexport type SENTRY_DSC_ENVIRONMENT_TYPE = string;\n\n// Path: model/attributes/sentry/sentry__dsc__project_id.json\n\n/**\n * The ID of the project where the trace originated (i.e. the project of the SDK that started the trace). Propagated through the dynamic sampling context and set by Relay during ingestion. `sentry.dsc.project_id`\n *\n * Attribute Value Type: `string` {@link SENTRY_DSC_PROJECT_ID_TYPE}\n *\n * Apply Scrubbing: never\n *\n * Attribute defined in OTEL: No\n * Visibility: internal\n *\n * @example \"12345\"\n */\nexport const SENTRY_DSC_PROJECT_ID = 'sentry.dsc.project_id';\n\n/**\n * Type for {@link SENTRY_DSC_PROJECT_ID} sentry.dsc.project_id\n */\nexport type SENTRY_DSC_PROJECT_ID_TYPE = string;\n\n// Path: model/attributes/sentry/sentry__dsc__public_key.json\n\n/**\n * The public key from the dynamic sampling context. `sentry.dsc.public_key`\n *\n * Attribute Value Type: `string` {@link SENTRY_DSC_PUBLIC_KEY_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: internal\n *\n * @example \"c51734c603c4430eb57cb0a5728a479d\"\n */\nexport const SENTRY_DSC_PUBLIC_KEY = 'sentry.dsc.public_key';\n\n/**\n * Type for {@link SENTRY_DSC_PUBLIC_KEY} sentry.dsc.public_key\n */\nexport type SENTRY_DSC_PUBLIC_KEY_TYPE = string;\n\n// Path: model/attributes/sentry/sentry__dsc__release.json\n\n/**\n * The release identifier from the dynamic sampling context. `sentry.dsc.release`\n *\n * Attribute Value Type: `string` {@link SENTRY_DSC_RELEASE_TYPE}\n *\n * Apply Scrubbing: never\n *\n * Attribute defined in OTEL: No\n * Visibility: internal\n *\n * @example \"frontend@e8211be71b214afab5b85de4b4c54be3714952bb\"\n */\nexport const SENTRY_DSC_RELEASE = 'sentry.dsc.release';\n\n/**\n * Type for {@link SENTRY_DSC_RELEASE} sentry.dsc.release\n */\nexport type SENTRY_DSC_RELEASE_TYPE = string;\n\n// Path: model/attributes/sentry/sentry__dsc__sampled.json\n\n/**\n * Whether the event was sampled according to the dynamic sampling context. `sentry.dsc.sampled`\n *\n * Attribute Value Type: `boolean` {@link SENTRY_DSC_SAMPLED_TYPE}\n *\n * Apply Scrubbing: never\n *\n * Attribute defined in OTEL: No\n * Visibility: internal\n *\n * @example true\n */\nexport const SENTRY_DSC_SAMPLED = 'sentry.dsc.sampled';\n\n/**\n * Type for {@link SENTRY_DSC_SAMPLED} sentry.dsc.sampled\n */\nexport type SENTRY_DSC_SAMPLED_TYPE = boolean;\n\n// Path: model/attributes/sentry/sentry__dsc__sample_rate.json\n\n/**\n * The sample rate from the dynamic sampling context. `sentry.dsc.sample_rate`\n *\n * Attribute Value Type: `string` {@link SENTRY_DSC_SAMPLE_RATE_TYPE}\n *\n * Apply Scrubbing: never\n *\n * Attribute defined in OTEL: No\n * Visibility: internal\n *\n * @example \"1.0\"\n */\nexport const SENTRY_DSC_SAMPLE_RATE = 'sentry.dsc.sample_rate';\n\n/**\n * Type for {@link SENTRY_DSC_SAMPLE_RATE} sentry.dsc.sample_rate\n */\nexport type SENTRY_DSC_SAMPLE_RATE_TYPE = string;\n\n// Path: model/attributes/sentry/sentry__dsc__trace_id.json\n\n/**\n * The trace ID from the dynamic sampling context. `sentry.dsc.trace_id`\n *\n * Attribute Value Type: `string` {@link SENTRY_DSC_TRACE_ID_TYPE}\n *\n * Apply Scrubbing: never\n *\n * Attribute defined in OTEL: No\n * Visibility: internal\n *\n * @example \"047372980460430cbc78d9779df33a46\"\n */\nexport const SENTRY_DSC_TRACE_ID = 'sentry.dsc.trace_id';\n\n/**\n * Type for {@link SENTRY_DSC_TRACE_ID} sentry.dsc.trace_id\n */\nexport type SENTRY_DSC_TRACE_ID_TYPE = string;\n\n// Path: model/attributes/sentry/sentry__dsc__transaction.json\n\n/**\n * The transaction name from the dynamic sampling context. `sentry.dsc.transaction`\n *\n * Attribute Value Type: `string` {@link SENTRY_DSC_TRANSACTION_TYPE}\n *\n * Apply Scrubbing: never\n *\n * Attribute defined in OTEL: No\n * Visibility: internal\n *\n * @example \"/issues/errors-outages/\"\n */\nexport const SENTRY_DSC_TRANSACTION = 'sentry.dsc.transaction';\n\n/**\n * Type for {@link SENTRY_DSC_TRANSACTION} sentry.dsc.transaction\n */\nexport type SENTRY_DSC_TRANSACTION_TYPE = string;\n\n// Path: model/attributes/sentry/sentry__environment.json\n\n/**\n * The sentry environment. `sentry.environment`\n *\n * Attribute Value Type: `string` {@link SENTRY_ENVIRONMENT_TYPE}\n *\n * Apply Scrubbing: never\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link ENVIRONMENT} `environment`\n *\n * @example \"production\"\n */\nexport const SENTRY_ENVIRONMENT = 'sentry.environment';\n\n/**\n * Type for {@link SENTRY_ENVIRONMENT} sentry.environment\n */\nexport type SENTRY_ENVIRONMENT_TYPE = string;\n\n// Path: model/attributes/sentry/sentry__exclusive_time.json\n\n/**\n * The exclusive time duration of the span in milliseconds. `sentry.exclusive_time`\n *\n * Attribute Value Type: `number` {@link SENTRY_EXCLUSIVE_TIME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 1234\n */\nexport const SENTRY_EXCLUSIVE_TIME = 'sentry.exclusive_time';\n\n/**\n * Type for {@link SENTRY_EXCLUSIVE_TIME} sentry.exclusive_time\n */\nexport type SENTRY_EXCLUSIVE_TIME_TYPE = number;\n\n// Path: model/attributes/sentry/sentry__graphql__operation.json\n\n/**\n * Indicates the type of graphql operation, emitted by the Javascript SDK. `sentry.graphql.operation`\n *\n * Attribute Value Type: `string` {@link SENTRY_GRAPHQL_OPERATION_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"getUserById\"\n */\nexport const SENTRY_GRAPHQL_OPERATION = 'sentry.graphql.operation';\n\n/**\n * Type for {@link SENTRY_GRAPHQL_OPERATION} sentry.graphql.operation\n */\nexport type SENTRY_GRAPHQL_OPERATION_TYPE = string;\n\n// Path: model/attributes/sentry/sentry__group.json\n\n/**\n * Stores the hash of `sentry.normalized_description`. This is primarily used for grouping spans in the product end. `sentry.group`\n *\n * Attribute Value Type: `string` {@link SENTRY_GROUP_TYPE}\n *\n * Apply Scrubbing: never\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n */\nexport const SENTRY_GROUP = 'sentry.group';\n\n/**\n * Type for {@link SENTRY_GROUP} sentry.group\n */\nexport type SENTRY_GROUP_TYPE = string;\n\n// Path: model/attributes/sentry/sentry__http__prefetch.json\n\n/**\n * If an http request was a prefetch request. `sentry.http.prefetch`\n *\n * Attribute Value Type: `boolean` {@link SENTRY_HTTP_PREFETCH_TYPE}\n *\n * Apply Scrubbing: never\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example true\n */\nexport const SENTRY_HTTP_PREFETCH = 'sentry.http.prefetch';\n\n/**\n * Type for {@link SENTRY_HTTP_PREFETCH} sentry.http.prefetch\n */\nexport type SENTRY_HTTP_PREFETCH_TYPE = boolean;\n\n// Path: model/attributes/sentry/sentry__idle_span_finish_reason.json\n\n/**\n * The reason why an idle span ended early. `sentry.idle_span_finish_reason`\n *\n * Attribute Value Type: `string` {@link SENTRY_IDLE_SPAN_FINISH_REASON_TYPE}\n *\n * Apply Scrubbing: never\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"idleTimeout\"\n */\nexport const SENTRY_IDLE_SPAN_FINISH_REASON = 'sentry.idle_span_finish_reason';\n\n/**\n * Type for {@link SENTRY_IDLE_SPAN_FINISH_REASON} sentry.idle_span_finish_reason\n */\nexport type SENTRY_IDLE_SPAN_FINISH_REASON_TYPE = string;\n\n// Path: model/attributes/sentry/sentry__is_remote.json\n\n/**\n * Indicates whether a span's parent is remote. `sentry.is_remote`\n *\n * Attribute Value Type: `boolean` {@link SENTRY_IS_REMOTE_TYPE}\n *\n * Apply Scrubbing: never\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example true\n */\nexport const SENTRY_IS_REMOTE = 'sentry.is_remote';\n\n/**\n * Type for {@link SENTRY_IS_REMOTE} sentry.is_remote\n */\nexport type SENTRY_IS_REMOTE_TYPE = boolean;\n\n// Path: model/attributes/sentry/sentry__kind.json\n\n/**\n * Used to clarify the relationship between parents and children, or to distinguish between spans, e.g. a `server` and `client` span with the same name. `sentry.kind`\n *\n * Attribute Value Type: `string` {@link SENTRY_KIND_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link OTEL_KIND} `otel.kind`\n *\n * @example \"server\"\n */\nexport const SENTRY_KIND = 'sentry.kind';\n\n/**\n * Type for {@link SENTRY_KIND} sentry.kind\n */\nexport type SENTRY_KIND_TYPE = string;\n\n// Path: model/attributes/sentry/sentry__main_thread.json\n\n/**\n * Whether the span or event occurred on the main thread. Computed by Relay and should not be set by SDKs. `sentry.main_thread`\n *\n * Attribute Value Type: `boolean` {@link SENTRY_MAIN_THREAD_TYPE}\n *\n * Apply Scrubbing: never\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example true\n */\nexport const SENTRY_MAIN_THREAD = 'sentry.main_thread';\n\n/**\n * Type for {@link SENTRY_MAIN_THREAD} sentry.main_thread\n */\nexport type SENTRY_MAIN_THREAD_TYPE = boolean;\n\n// Path: model/attributes/sentry/sentry__message__parameter__[key].json\n\n/**\n * A parameter used in the message template. <key> can either be the number that represent the parameter's position in the template string (sentry.message.parameter.0, sentry.message.parameter.1, etc) or the parameter's name (sentry.message.parameter.item_id, sentry.message.parameter.user_id, etc) `sentry.message.parameter.<key>`\n *\n * Attribute Value Type: `string` {@link SENTRY_MESSAGE_PARAMETER_KEY_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"sentry.message.parameter.0='123'\"\n */\nexport const SENTRY_MESSAGE_PARAMETER_KEY = 'sentry.message.parameter.<key>';\n\n/**\n * Type for {@link SENTRY_MESSAGE_PARAMETER_KEY} sentry.message.parameter.<key>\n */\nexport type SENTRY_MESSAGE_PARAMETER_KEY_TYPE = string;\n\n// Path: model/attributes/sentry/sentry__message__template.json\n\n/**\n * The parameterized template string. `sentry.message.template`\n *\n * Attribute Value Type: `string` {@link SENTRY_MESSAGE_TEMPLATE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"Hello, {name}!\"\n */\nexport const SENTRY_MESSAGE_TEMPLATE = 'sentry.message.template';\n\n/**\n * Type for {@link SENTRY_MESSAGE_TEMPLATE} sentry.message.template\n */\nexport type SENTRY_MESSAGE_TEMPLATE_TYPE = string;\n\n// Path: model/attributes/sentry/sentry__metric__source.json\n\n/**\n * The provenance of a metric.  For example, this can be set to indicate if a metric was generated by Relay from a span. `sentry.metric.source`\n *\n * Attribute Value Type: `string` {@link SENTRY_METRIC_SOURCE_TYPE}\n *\n * Apply Scrubbing: never\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"span\"\n */\nexport const SENTRY_METRIC_SOURCE = 'sentry.metric.source';\n\n/**\n * Type for {@link SENTRY_METRIC_SOURCE} sentry.metric.source\n */\nexport type SENTRY_METRIC_SOURCE_TYPE = string;\n\n// Path: model/attributes/sentry/sentry__mobile.json\n\n/**\n * Whether the application is using a mobile SDK. Computed by Relay and should not be set by SDKs. `sentry.mobile`\n *\n * Attribute Value Type: `boolean` {@link SENTRY_MOBILE_TYPE}\n *\n * Apply Scrubbing: never\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example true\n */\nexport const SENTRY_MOBILE = 'sentry.mobile';\n\n/**\n * Type for {@link SENTRY_MOBILE} sentry.mobile\n */\nexport type SENTRY_MOBILE_TYPE = boolean;\n\n// Path: model/attributes/sentry/sentry__module__[key].json\n\n/**\n * A module that was loaded in the process. The key is the name of the module. `sentry.module.<key>`\n *\n * Attribute Value Type: `string` {@link SENTRY_MODULE_KEY_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Has Dynamic Suffix: true\n *\n * @example \"sentry.module.brianium/paratest='v7.7.0'\"\n */\nexport const SENTRY_MODULE_KEY = 'sentry.module.<key>';\n\n/**\n * Base key for {@link SENTRY_MODULE_KEY}. Use with a dynamic suffix, e.g. `${SENTRY_MODULE_KEY_BASE}.${key}`.\n */\nexport const SENTRY_MODULE_KEY_BASE = 'sentry.module';\n\n/**\n * Type for {@link SENTRY_MODULE_KEY} sentry.module.<key>\n */\nexport type SENTRY_MODULE_KEY_TYPE = string;\n\n// Path: model/attributes/sentry/sentry__nextjs__ssr__function__route.json\n\n/**\n * A parameterized route for a function in Next.js that contributes to Server-Side Rendering. Should be present on spans that track such functions when the file location of the function is known. `sentry.nextjs.ssr.function.route`\n *\n * Attribute Value Type: `string` {@link SENTRY_NEXTJS_SSR_FUNCTION_ROUTE_TYPE}\n *\n * Apply Scrubbing: never\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"/posts/[id]/layout\"\n */\nexport const SENTRY_NEXTJS_SSR_FUNCTION_ROUTE = 'sentry.nextjs.ssr.function.route';\n\n/**\n * Type for {@link SENTRY_NEXTJS_SSR_FUNCTION_ROUTE} sentry.nextjs.ssr.function.route\n */\nexport type SENTRY_NEXTJS_SSR_FUNCTION_ROUTE_TYPE = string;\n\n// Path: model/attributes/sentry/sentry__nextjs__ssr__function__type.json\n\n/**\n * A descriptor for a for a function in Next.js that contributes to Server-Side Rendering. Should be present on spans that track such functions. `sentry.nextjs.ssr.function.type`\n *\n * Attribute Value Type: `string` {@link SENTRY_NEXTJS_SSR_FUNCTION_TYPE_TYPE}\n *\n * Apply Scrubbing: never\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"generateMetadata\"\n */\nexport const SENTRY_NEXTJS_SSR_FUNCTION_TYPE = 'sentry.nextjs.ssr.function.type';\n\n/**\n * Type for {@link SENTRY_NEXTJS_SSR_FUNCTION_TYPE} sentry.nextjs.ssr.function.type\n */\nexport type SENTRY_NEXTJS_SSR_FUNCTION_TYPE_TYPE = string;\n\n// Path: model/attributes/sentry/sentry__normalized_db_query.json\n\n/**\n * The normalized version of `db.query.text`. `sentry.normalized_db_query`\n *\n * Attribute Value Type: `string` {@link SENTRY_NORMALIZED_DB_QUERY_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"SELECT .. FROM sentry_project WHERE (project_id = %s)\"\n */\nexport const SENTRY_NORMALIZED_DB_QUERY = 'sentry.normalized_db_query';\n\n/**\n * Type for {@link SENTRY_NORMALIZED_DB_QUERY} sentry.normalized_db_query\n */\nexport type SENTRY_NORMALIZED_DB_QUERY_TYPE = string;\n\n// Path: model/attributes/sentry/sentry__normalized_db_query__hash.json\n\n/**\n * The hash of `sentry.normalized_db_query`. `sentry.normalized_db_query.hash`\n *\n * Attribute Value Type: `string` {@link SENTRY_NORMALIZED_DB_QUERY_HASH_TYPE}\n *\n * Apply Scrubbing: never\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n */\nexport const SENTRY_NORMALIZED_DB_QUERY_HASH = 'sentry.normalized_db_query.hash';\n\n/**\n * Type for {@link SENTRY_NORMALIZED_DB_QUERY_HASH} sentry.normalized_db_query.hash\n */\nexport type SENTRY_NORMALIZED_DB_QUERY_HASH_TYPE = string;\n\n// Path: model/attributes/sentry/sentry__normalized_description.json\n\n/**\n * Used as a generic attribute representing the normalized `sentry.description`. This refers to the legacy use case of `sentry.description` where it holds relevant data depending on the type of span (e.g. database query, resource url, http request description, etc). `sentry.normalized_description`\n *\n * Attribute Value Type: `string` {@link SENTRY_NORMALIZED_DESCRIPTION_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"SELECT .. FROM sentry_project WHERE (project_id = %s)\"\n */\nexport const SENTRY_NORMALIZED_DESCRIPTION = 'sentry.normalized_description';\n\n/**\n * Type for {@link SENTRY_NORMALIZED_DESCRIPTION} sentry.normalized_description\n */\nexport type SENTRY_NORMALIZED_DESCRIPTION_TYPE = string;\n\n// Path: model/attributes/sentry/sentry__observed_timestamp_nanos.json\n\n/**\n * The timestamp at which an envelope was received by Relay, in nanoseconds. `sentry.observed_timestamp_nanos`\n *\n * Attribute Value Type: `string` {@link SENTRY_OBSERVED_TIMESTAMP_NANOS_TYPE}\n *\n * Apply Scrubbing: never\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"1544712660300000000\"\n */\nexport const SENTRY_OBSERVED_TIMESTAMP_NANOS = 'sentry.observed_timestamp_nanos';\n\n/**\n * Type for {@link SENTRY_OBSERVED_TIMESTAMP_NANOS} sentry.observed_timestamp_nanos\n */\nexport type SENTRY_OBSERVED_TIMESTAMP_NANOS_TYPE = string;\n\n// Path: model/attributes/sentry/sentry__op.json\n\n/**\n * The operation of a span. `sentry.op`\n *\n * Attribute Value Type: `string` {@link SENTRY_OP_TYPE}\n *\n * Apply Scrubbing: never\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"http.client\"\n */\nexport const SENTRY_OP = 'sentry.op';\n\n/**\n * Type for {@link SENTRY_OP} sentry.op\n */\nexport type SENTRY_OP_TYPE = string;\n\n// Path: model/attributes/sentry/sentry__origin.json\n\n/**\n * The origin of the instrumentation (e.g. span, log, etc.) `sentry.origin`\n *\n * Attribute Value Type: `string` {@link SENTRY_ORIGIN_TYPE}\n *\n * Apply Scrubbing: never\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"auto.http.otel.fastify\"\n */\nexport const SENTRY_ORIGIN = 'sentry.origin';\n\n/**\n * Type for {@link SENTRY_ORIGIN} sentry.origin\n */\nexport type SENTRY_ORIGIN_TYPE = string;\n\n// Path: model/attributes/sentry/sentry__platform.json\n\n/**\n * The sdk platform that generated the event. `sentry.platform`\n *\n * Attribute Value Type: `string` {@link SENTRY_PLATFORM_TYPE}\n *\n * Apply Scrubbing: never\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"php\"\n */\nexport const SENTRY_PLATFORM = 'sentry.platform';\n\n/**\n * Type for {@link SENTRY_PLATFORM} sentry.platform\n */\nexport type SENTRY_PLATFORM_TYPE = string;\n\n// Path: model/attributes/sentry/sentry__profiler_id.json\n\n/**\n * The id of the currently running profiler (continuous profiling) `sentry.profiler_id`\n *\n * Attribute Value Type: `string` {@link SENTRY_PROFILER_ID_TYPE}\n *\n * Apply Scrubbing: never\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"18779b64dd35d1a538e7ce2dd2d3fad3\"\n */\nexport const SENTRY_PROFILER_ID = 'sentry.profiler_id';\n\n/**\n * Type for {@link SENTRY_PROFILER_ID} sentry.profiler_id\n */\nexport type SENTRY_PROFILER_ID_TYPE = string;\n\n// Path: model/attributes/sentry/sentry__profile_id.json\n\n/**\n * The ID of the Sentry profile the span is associated with. This is only meaningful for transaction-based profiling. `sentry.profile_id`\n *\n * Attribute Value Type: `string` {@link SENTRY_PROFILE_ID_TYPE}\n *\n * Apply Scrubbing: never\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"123e4567e89b12d3a456426614174000\"\n */\nexport const SENTRY_PROFILE_ID = 'sentry.profile_id';\n\n/**\n * Type for {@link SENTRY_PROFILE_ID} sentry.profile_id\n */\nexport type SENTRY_PROFILE_ID_TYPE = string;\n\n// Path: model/attributes/sentry/sentry__release.json\n\n/**\n * The sentry release. `sentry.release`\n *\n * Attribute Value Type: `string` {@link SENTRY_RELEASE_TYPE}\n *\n * Apply Scrubbing: never\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link SERVICE_VERSION} `service.version`, {@link RELEASE} `release`\n *\n * @example \"7.0.0\"\n */\nexport const SENTRY_RELEASE = 'sentry.release';\n\n/**\n * Type for {@link SENTRY_RELEASE} sentry.release\n */\nexport type SENTRY_RELEASE_TYPE = string;\n\n// Path: model/attributes/sentry/sentry__replay_id.json\n\n/**\n * The id of the sentry replay. `sentry.replay_id`\n *\n * Attribute Value Type: `string` {@link SENTRY_REPLAY_ID_TYPE}\n *\n * Apply Scrubbing: never\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link REPLAY_ID} `replay_id`\n *\n * @example \"123e4567e89b12d3a456426614174000\"\n */\nexport const SENTRY_REPLAY_ID = 'sentry.replay_id';\n\n/**\n * Type for {@link SENTRY_REPLAY_ID} sentry.replay_id\n */\nexport type SENTRY_REPLAY_ID_TYPE = string;\n\n// Path: model/attributes/sentry/sentry__replay_is_buffering.json\n\n/**\n * A sentinel attribute on log events indicating whether the current Session Replay is being buffered (onErrorSampleRate). `sentry.replay_is_buffering`\n *\n * Attribute Value Type: `boolean` {@link SENTRY_REPLAY_IS_BUFFERING_TYPE}\n *\n * Apply Scrubbing: never\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example true\n */\nexport const SENTRY_REPLAY_IS_BUFFERING = 'sentry.replay_is_buffering';\n\n/**\n * Type for {@link SENTRY_REPLAY_IS_BUFFERING} sentry.replay_is_buffering\n */\nexport type SENTRY_REPLAY_IS_BUFFERING_TYPE = boolean;\n\n// Path: model/attributes/sentry/sentry__report_event.json\n\n/**\n * (Deprecated) The event that caused the SDK to report CLS or LCP (pagehide or navigation) `sentry.report_event`\n *\n * Attribute Value Type: `string` {@link SENTRY_REPORT_EVENT_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @deprecated  - The report event is now recorded as a browser.web_vital.lcp.report_event or browser.web_vital.cls.report_event attribute. No backfill required.\n * @example \"pagehide\"\n */\nexport const SENTRY_REPORT_EVENT = 'sentry.report_event';\n\n/**\n * Type for {@link SENTRY_REPORT_EVENT} sentry.report_event\n */\nexport type SENTRY_REPORT_EVENT_TYPE = string;\n\n// Path: model/attributes/sentry/sentry__sdk__integrations.json\n\n/**\n * A list of names identifying enabled integrations. The list shouldhave all enabled integrations, including default integrations. Defaultintegrations are included because different SDK releases may contain differentdefault integrations. `sentry.sdk.integrations`\n *\n * Attribute Value Type: `Array<string>` {@link SENTRY_SDK_INTEGRATIONS_TYPE}\n *\n * Apply Scrubbing: never\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example [\"InboundFilters\",\"FunctionToString\",\"BrowserApiErrors\",\"Breadcrumbs\"]\n */\nexport const SENTRY_SDK_INTEGRATIONS = 'sentry.sdk.integrations';\n\n/**\n * Type for {@link SENTRY_SDK_INTEGRATIONS} sentry.sdk.integrations\n */\nexport type SENTRY_SDK_INTEGRATIONS_TYPE = Array<string>;\n\n// Path: model/attributes/sentry/sentry__sdk__name.json\n\n/**\n * The sentry sdk name. `sentry.sdk.name`\n *\n * Attribute Value Type: `string` {@link SENTRY_SDK_NAME_TYPE}\n *\n * Apply Scrubbing: never\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"@sentry/react\"\n */\nexport const SENTRY_SDK_NAME = 'sentry.sdk.name';\n\n/**\n * Type for {@link SENTRY_SDK_NAME} sentry.sdk.name\n */\nexport type SENTRY_SDK_NAME_TYPE = string;\n\n// Path: model/attributes/sentry/sentry__sdk__version.json\n\n/**\n * The sentry sdk version. `sentry.sdk.version`\n *\n * Attribute Value Type: `string` {@link SENTRY_SDK_VERSION_TYPE}\n *\n * Apply Scrubbing: never\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"7.0.0\"\n */\nexport const SENTRY_SDK_VERSION = 'sentry.sdk.version';\n\n/**\n * Type for {@link SENTRY_SDK_VERSION} sentry.sdk.version\n */\nexport type SENTRY_SDK_VERSION_TYPE = string;\n\n// Path: model/attributes/sentry/sentry__segment__id.json\n\n/**\n * The segment ID of a span `sentry.segment.id`\n *\n * Attribute Value Type: `string` {@link SENTRY_SEGMENT_ID_TYPE}\n *\n * Apply Scrubbing: never\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link _SENTRY_SEGMENT_ID} `sentry.segment_id`\n *\n * @example \"051581bf3cb55c13\"\n */\nexport const SENTRY_SEGMENT_ID = 'sentry.segment.id';\n\n/**\n * Type for {@link SENTRY_SEGMENT_ID} sentry.segment.id\n */\nexport type SENTRY_SEGMENT_ID_TYPE = string;\n\n// Path: model/attributes/sentry/sentry__segment_id.json\n\n/**\n * The segment ID of a span `sentry.segment_id`\n *\n * Attribute Value Type: `string` {@link _SENTRY_SEGMENT_ID_TYPE}\n *\n * Apply Scrubbing: never\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link SENTRY_SEGMENT_ID} `sentry.segment.id`\n *\n * @deprecated Use {@link SENTRY_SEGMENT_ID} (sentry.segment.id) instead\n * @example \"051581bf3cb55c13\"\n */\nexport const _SENTRY_SEGMENT_ID = 'sentry.segment_id';\n\n/**\n * Type for {@link _SENTRY_SEGMENT_ID} sentry.segment_id\n */\nexport type _SENTRY_SEGMENT_ID_TYPE = string;\n\n// Path: model/attributes/sentry/sentry__segment__name.json\n\n/**\n * The segment name of a span `sentry.segment.name`\n *\n * Attribute Value Type: `string` {@link SENTRY_SEGMENT_NAME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link SENTRY_TRANSACTION} `sentry.transaction`, {@link TRANSACTION} `transaction`\n *\n * @example \"GET /user\"\n */\nexport const SENTRY_SEGMENT_NAME = 'sentry.segment.name';\n\n/**\n * Type for {@link SENTRY_SEGMENT_NAME} sentry.segment.name\n */\nexport type SENTRY_SEGMENT_NAME_TYPE = string;\n\n// Path: model/attributes/sentry/sentry__server_sample_rate.json\n\n/**\n * Rate at which a span was sampled in Relay. `sentry.server_sample_rate`\n *\n * Attribute Value Type: `number` {@link SENTRY_SERVER_SAMPLE_RATE_TYPE}\n *\n * Apply Scrubbing: never\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 0.5\n */\nexport const SENTRY_SERVER_SAMPLE_RATE = 'sentry.server_sample_rate';\n\n/**\n * Type for {@link SENTRY_SERVER_SAMPLE_RATE} sentry.server_sample_rate\n */\nexport type SENTRY_SERVER_SAMPLE_RATE_TYPE = number;\n\n// Path: model/attributes/sentry/sentry__source.json\n\n/**\n * The source of a span, also referred to as transaction source. Known values are:  `'custom'`, `'url'`, `'route'`, `'component'`, `'view'`, `'task'`. '`source`' describes a parametrized route, while `'url'` describes the full URL, potentially containing identifiers. `sentry.source`\n *\n * Attribute Value Type: `string` {@link SENTRY_SOURCE_TYPE}\n *\n * Apply Scrubbing: never\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @deprecated Use {@link SENTRY_SPAN_SOURCE} (sentry.span.source) instead - This attribute is being deprecated in favor of sentry.span.source\n * @example \"route\"\n */\nexport const SENTRY_SOURCE = 'sentry.source';\n\n/**\n * Type for {@link SENTRY_SOURCE} sentry.source\n */\nexport type SENTRY_SOURCE_TYPE = string;\n\n// Path: model/attributes/sentry/sentry__span__source.json\n\n/**\n * The source of a span, also referred to as transaction source. Known values are:  `'custom'`, `'url'`, `'route'`, `'component'`, `'view'`, `'task'`. '`source`' describes a parametrized route, while `'url'` describes the full URL, potentially containing identifiers. `sentry.span.source`\n *\n * Attribute Value Type: `string` {@link SENTRY_SPAN_SOURCE_TYPE}\n *\n * Apply Scrubbing: never\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"route\"\n */\nexport const SENTRY_SPAN_SOURCE = 'sentry.span.source';\n\n/**\n * Type for {@link SENTRY_SPAN_SOURCE} sentry.span.source\n */\nexport type SENTRY_SPAN_SOURCE_TYPE = string;\n\n// Path: model/attributes/sentry/sentry__status.json\n\n/**\n * The span's status (either \"ok\" or \"error\"). Older SDKs may set this to a more specific error, but this behaviour is deprecated. `sentry.status`\n *\n * Attribute Value Type: `string` {@link SENTRY_STATUS_TYPE}\n *\n * Apply Scrubbing: never\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"ok\"\n */\nexport const SENTRY_STATUS = 'sentry.status';\n\n/**\n * Type for {@link SENTRY_STATUS} sentry.status\n */\nexport type SENTRY_STATUS_TYPE = string;\n\n// Path: model/attributes/sentry/sentry__status_code.json\n\n/**\n * The HTTP status code used in Sentry Insights. Typically set by Sentry during ingestion, rather than by clients. `sentry.status_code`\n *\n * Attribute Value Type: `number` {@link SENTRY_STATUS_CODE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 200\n */\nexport const SENTRY_STATUS_CODE = 'sentry.status_code';\n\n/**\n * Type for {@link SENTRY_STATUS_CODE} sentry.status_code\n */\nexport type SENTRY_STATUS_CODE_TYPE = number;\n\n// Path: model/attributes/sentry/sentry__status__message.json\n\n/**\n * The from OTLP extracted status message. `sentry.status.message`\n *\n * Attribute Value Type: `string` {@link SENTRY_STATUS_MESSAGE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"foobar\"\n */\nexport const SENTRY_STATUS_MESSAGE = 'sentry.status.message';\n\n/**\n * Type for {@link SENTRY_STATUS_MESSAGE} sentry.status.message\n */\nexport type SENTRY_STATUS_MESSAGE_TYPE = string;\n\n// Path: model/attributes/sentry/sentry__sveltekit__navigation__from.json\n\n/**\n * the navigation origin (sveltekit router) `sentry.sveltekit.navigation.from`\n *\n * Attribute Value Type: `string` {@link SENTRY_SVELTEKIT_NAVIGATION_FROM_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link NAVIGATION_ORIGIN} `navigation.origin`\n *\n * @deprecated Use {@link NAVIGATION_ORIGIN} (navigation.origin) instead - Use the more generic attribute instead\n * @example \"/home\"\n */\nexport const SENTRY_SVELTEKIT_NAVIGATION_FROM = 'sentry.sveltekit.navigation.from';\n\n/**\n * Type for {@link SENTRY_SVELTEKIT_NAVIGATION_FROM} sentry.sveltekit.navigation.from\n */\nexport type SENTRY_SVELTEKIT_NAVIGATION_FROM_TYPE = string;\n\n// Path: model/attributes/sentry/sentry__sveltekit__navigation__to.json\n\n/**\n * the navigation destination `sentry.sveltekit.navigation.to`\n *\n * Attribute Value Type: `string` {@link SENTRY_SVELTEKIT_NAVIGATION_TO_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @deprecated  - the navigation destination is already covered by url.* attributes\n * @example \"/users/:id\"\n */\nexport const SENTRY_SVELTEKIT_NAVIGATION_TO = 'sentry.sveltekit.navigation.to';\n\n/**\n * Type for {@link SENTRY_SVELTEKIT_NAVIGATION_TO} sentry.sveltekit.navigation.to\n */\nexport type SENTRY_SVELTEKIT_NAVIGATION_TO_TYPE = string;\n\n// Path: model/attributes/sentry/sentry__sveltekit__navigation__type.json\n\n/**\n * The type of navigation event emitted from the sveltekit client router `sentry.sveltekit.navigation.type`\n *\n * Attribute Value Type: `string` {@link SENTRY_SVELTEKIT_NAVIGATION_TYPE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link NAVIGATION_TYPE} `navigation.type`\n *\n * @deprecated Use {@link NAVIGATION_TYPE} (navigation.type) instead - Use the more generic attribute instead\n * @example \"link\"\n */\nexport const SENTRY_SVELTEKIT_NAVIGATION_TYPE = 'sentry.sveltekit.navigation.type';\n\n/**\n * Type for {@link SENTRY_SVELTEKIT_NAVIGATION_TYPE} sentry.sveltekit.navigation.type\n */\nexport type SENTRY_SVELTEKIT_NAVIGATION_TYPE_TYPE = string;\n\n// Path: model/attributes/sentry/sentry__thread__id.json\n\n/**\n * Current “managed” thread ID. `sentry.thread.id`\n *\n * Attribute Value Type: `number` {@link SENTRY_THREAD_ID_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @deprecated Use {@link THREAD_ID} (thread.id) instead - This attribute is being deprecated in favor of the OTel-standard thread.id\n * @example 56\n */\nexport const SENTRY_THREAD_ID = 'sentry.thread.id';\n\n/**\n * Type for {@link SENTRY_THREAD_ID} sentry.thread.id\n */\nexport type SENTRY_THREAD_ID_TYPE = number;\n\n// Path: model/attributes/sentry/sentry__timestamp__sequence.json\n\n/**\n * A sequencing counter for deterministic ordering of logs or metrics when timestamps share the same integer millisecond. Starts at 0 on SDK initialization, increments by 1 for each captured item, and resets to 0 when the integer millisecond of the current item differs from the previous one. `sentry.timestamp.sequence`\n *\n * Attribute Value Type: `number` {@link SENTRY_TIMESTAMP_SEQUENCE_TYPE}\n *\n * Apply Scrubbing: never\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 0\n */\nexport const SENTRY_TIMESTAMP_SEQUENCE = 'sentry.timestamp.sequence';\n\n/**\n * Type for {@link SENTRY_TIMESTAMP_SEQUENCE} sentry.timestamp.sequence\n */\nexport type SENTRY_TIMESTAMP_SEQUENCE_TYPE = number;\n\n// Path: model/attributes/sentry/sentry__trace_lifecycle.json\n\n/**\n * Indicates the chosen trace lifecycle mode of the SDK (stream or static) `sentry.trace_lifecycle`\n *\n * Attribute Value Type: `string` {@link SENTRY_TRACE_LIFECYCLE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"stream\"\n */\nexport const SENTRY_TRACE_LIFECYCLE = 'sentry.trace_lifecycle';\n\n/**\n * Type for {@link SENTRY_TRACE_LIFECYCLE} sentry.trace_lifecycle\n */\nexport type SENTRY_TRACE_LIFECYCLE_TYPE = string;\n\n// Path: model/attributes/sentry/sentry__trace__parent_span_id.json\n\n/**\n * The span id of the span that was active when the log was collected. This should not be set if there was no active span. `sentry.trace.parent_span_id`\n *\n * Attribute Value Type: `string` {@link SENTRY_TRACE_PARENT_SPAN_ID_TYPE}\n *\n * Apply Scrubbing: never\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @deprecated\n * @example \"b0e6f15b45c36b12\"\n */\nexport const SENTRY_TRACE_PARENT_SPAN_ID = 'sentry.trace.parent_span_id';\n\n/**\n * Type for {@link SENTRY_TRACE_PARENT_SPAN_ID} sentry.trace.parent_span_id\n */\nexport type SENTRY_TRACE_PARENT_SPAN_ID_TYPE = string;\n\n// Path: model/attributes/sentry/sentry__trace__status.json\n\n/**\n * The segment's status (either \"ok\" or \"error\"). Older SDKs may set this to a more specific error, but this behaviour is deprecated. `sentry.trace.status`\n *\n * Attribute Value Type: `string` {@link SENTRY_TRACE_STATUS_TYPE}\n *\n * Apply Scrubbing: never\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"ok\"\n */\nexport const SENTRY_TRACE_STATUS = 'sentry.trace.status';\n\n/**\n * Type for {@link SENTRY_TRACE_STATUS} sentry.trace.status\n */\nexport type SENTRY_TRACE_STATUS_TYPE = string;\n\n// Path: model/attributes/sentry/sentry__transaction.json\n\n/**\n * The sentry transaction (segment name). `sentry.transaction`\n *\n * Attribute Value Type: `string` {@link SENTRY_TRANSACTION_TYPE}\n *\n * Apply Scrubbing: never\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link SENTRY_SEGMENT_NAME} `sentry.segment.name`, {@link TRANSACTION} `transaction`\n *\n * @deprecated Use {@link SENTRY_SEGMENT_NAME} (sentry.segment.name) instead - This attribute is being deprecated in favor of sentry.segment.name\n * @example \"GET /\"\n */\nexport const SENTRY_TRANSACTION = 'sentry.transaction';\n\n/**\n * Type for {@link SENTRY_TRANSACTION} sentry.transaction\n */\nexport type SENTRY_TRANSACTION_TYPE = string;\n\n// Path: model/attributes/sentry/sentry__user__email.json\n\n/**\n * User email address. `sentry.user.email`\n *\n * Attribute Value Type: `string` {@link SENTRY_USER_EMAIL_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link USER_EMAIL} `user.email`\n *\n * @deprecated Use {@link USER_EMAIL} (user.email) instead\n */\nexport const SENTRY_USER_EMAIL = 'sentry.user.email';\n\n/**\n * Type for {@link SENTRY_USER_EMAIL} sentry.user.email\n */\nexport type SENTRY_USER_EMAIL_TYPE = string;\n\n// Path: model/attributes/sentry/sentry__user__geo__city.json\n\n/**\n * Human readable city name. `sentry.user.geo.city`\n *\n * Attribute Value Type: `string` {@link SENTRY_USER_GEO_CITY_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link USER_GEO_CITY} `user.geo.city`\n *\n * @deprecated Use {@link USER_GEO_CITY} (user.geo.city) instead\n */\nexport const SENTRY_USER_GEO_CITY = 'sentry.user.geo.city';\n\n/**\n * Type for {@link SENTRY_USER_GEO_CITY} sentry.user.geo.city\n */\nexport type SENTRY_USER_GEO_CITY_TYPE = string;\n\n// Path: model/attributes/sentry/sentry__user__geo__country_code.json\n\n/**\n * Two-letter country code (ISO 3166-1 alpha-2). `sentry.user.geo.country_code`\n *\n * Attribute Value Type: `string` {@link SENTRY_USER_GEO_COUNTRY_CODE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link USER_GEO_COUNTRY_CODE} `user.geo.country_code`\n *\n * @deprecated Use {@link USER_GEO_COUNTRY_CODE} (user.geo.country_code) instead\n */\nexport const SENTRY_USER_GEO_COUNTRY_CODE = 'sentry.user.geo.country_code';\n\n/**\n * Type for {@link SENTRY_USER_GEO_COUNTRY_CODE} sentry.user.geo.country_code\n */\nexport type SENTRY_USER_GEO_COUNTRY_CODE_TYPE = string;\n\n// Path: model/attributes/sentry/sentry__user__geo__region.json\n\n/**\n * Human readable region name or code. `sentry.user.geo.region`\n *\n * Attribute Value Type: `string` {@link SENTRY_USER_GEO_REGION_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link USER_GEO_REGION} `user.geo.region`\n *\n * @deprecated Use {@link USER_GEO_REGION} (user.geo.region) instead\n */\nexport const SENTRY_USER_GEO_REGION = 'sentry.user.geo.region';\n\n/**\n * Type for {@link SENTRY_USER_GEO_REGION} sentry.user.geo.region\n */\nexport type SENTRY_USER_GEO_REGION_TYPE = string;\n\n// Path: model/attributes/sentry/sentry__user__geo__subdivision.json\n\n/**\n * Human readable subdivision name. `sentry.user.geo.subdivision`\n *\n * Attribute Value Type: `string` {@link SENTRY_USER_GEO_SUBDIVISION_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link USER_GEO_SUBDIVISION} `user.geo.subdivision`\n *\n * @deprecated Use {@link USER_GEO_SUBDIVISION} (user.geo.subdivision) instead\n */\nexport const SENTRY_USER_GEO_SUBDIVISION = 'sentry.user.geo.subdivision';\n\n/**\n * Type for {@link SENTRY_USER_GEO_SUBDIVISION} sentry.user.geo.subdivision\n */\nexport type SENTRY_USER_GEO_SUBDIVISION_TYPE = string;\n\n// Path: model/attributes/sentry/sentry__user__id.json\n\n/**\n * Unique identifier of the user. `sentry.user.id`\n *\n * Attribute Value Type: `string` {@link SENTRY_USER_ID_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link USER_ID} `user.id`\n *\n * @deprecated Use {@link USER_ID} (user.id) instead\n */\nexport const SENTRY_USER_ID = 'sentry.user.id';\n\n/**\n * Type for {@link SENTRY_USER_ID} sentry.user.id\n */\nexport type SENTRY_USER_ID_TYPE = string;\n\n// Path: model/attributes/sentry/sentry__user__ip.json\n\n/**\n * The IP address of the user. `sentry.user.ip`\n *\n * Attribute Value Type: `string` {@link SENTRY_USER_IP_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link USER_IP_ADDRESS} `user.ip_address`\n *\n * @deprecated Use {@link USER_IP_ADDRESS} (user.ip_address) instead\n */\nexport const SENTRY_USER_IP = 'sentry.user.ip';\n\n/**\n * Type for {@link SENTRY_USER_IP} sentry.user.ip\n */\nexport type SENTRY_USER_IP_TYPE = string;\n\n// Path: model/attributes/sentry/sentry__user__username.json\n\n/**\n * Short name or login/username of the user. `sentry.user.username`\n *\n * Attribute Value Type: `string` {@link SENTRY_USER_USERNAME_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link USER_NAME} `user.name`\n *\n * @deprecated Use {@link USER_NAME} (user.name) instead\n */\nexport const SENTRY_USER_USERNAME = 'sentry.user.username';\n\n/**\n * Type for {@link SENTRY_USER_USERNAME} sentry.user.username\n */\nexport type SENTRY_USER_USERNAME_TYPE = string;\n\n// Path: model/attributes/server/server__address.json\n\n/**\n * Server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. `server.address`\n *\n * Attribute Value Type: `string` {@link SERVER_ADDRESS_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link HTTP_SERVER_NAME} `http.server_name`, {@link NET_HOST_NAME} `net.host.name`, {@link HTTP_HOST} `http.host`, {@link SERVER_NAME} `server_name`\n *\n * @example \"example.com\"\n */\nexport const SERVER_ADDRESS = 'server.address';\n\n/**\n * Type for {@link SERVER_ADDRESS} server.address\n */\nexport type SERVER_ADDRESS_TYPE = string;\n\n// Path: model/attributes/server_name.json\n\n/**\n * Server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. `server_name`\n *\n * Attribute Value Type: `string` {@link SERVER_NAME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link SERVER_ADDRESS} `server.address`, {@link HTTP_SERVER_NAME} `http.server_name`, {@link NET_HOST_NAME} `net.host.name`, {@link HTTP_HOST} `http.host`\n *\n * @deprecated Use {@link SERVER_ADDRESS} (server.address) instead - This attribute is being deprecated in favor of server.address, which is the OTel-aligned replacement.\n * @example \"example.com\"\n */\nexport const SERVER_NAME = 'server_name';\n\n/**\n * Type for {@link SERVER_NAME} server_name\n */\nexport type SERVER_NAME_TYPE = string;\n\n// Path: model/attributes/server/server__port.json\n\n/**\n * Server port number. `server.port`\n *\n * Attribute Value Type: `number` {@link SERVER_PORT_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link NET_HOST_PORT} `net.host.port`\n *\n * @example 1337\n */\nexport const SERVER_PORT = 'server.port';\n\n/**\n * Type for {@link SERVER_PORT} server.port\n */\nexport type SERVER_PORT_TYPE = number;\n\n// Path: model/attributes/service/service__name.json\n\n/**\n * Logical name of the service. `service.name`\n *\n * Attribute Value Type: `string` {@link SERVICE_NAME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"omegastar\"\n */\nexport const SERVICE_NAME = 'service.name';\n\n/**\n * Type for {@link SERVICE_NAME} service.name\n */\nexport type SERVICE_NAME_TYPE = string;\n\n// Path: model/attributes/service/service__version.json\n\n/**\n * The version string of the service API or implementation. The format is not defined by these conventions. `service.version`\n *\n * Attribute Value Type: `string` {@link SERVICE_VERSION_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link SENTRY_RELEASE} `sentry.release`\n *\n * @example \"5.0.0\"\n */\nexport const SERVICE_VERSION = 'service.version';\n\n/**\n * Type for {@link SERVICE_VERSION} service.version\n */\nexport type SERVICE_VERSION_TYPE = string;\n\n// Path: model/attributes/session/session__id.json\n\n/**\n * A unique id identifying the active session at the time of setting this attribute `session.id`\n *\n * Attribute Value Type: `string` {@link SESSION_ID_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"00112233-4455-6677-8899-aabbccddeeff\"\n */\nexport const SESSION_ID = 'session.id';\n\n/**\n * Type for {@link SESSION_ID} session.id\n */\nexport type SESSION_ID_TYPE = string;\n\n// Path: model/attributes/stall_percentage.json\n\n/**\n * The fraction of time the app was stalled. Only applies to React Native. This is computed by Relay. `stall_percentage`\n *\n * Attribute Value Type: `number` {@link STALL_PERCENTAGE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n */\nexport const STALL_PERCENTAGE = 'stall_percentage';\n\n/**\n * Type for {@link STALL_PERCENTAGE} stall_percentage\n */\nexport type STALL_PERCENTAGE_TYPE = number;\n\n// Path: model/attributes/stall_total_time.json\n\n/**\n * The combined duration of all stalls in milliseconds. Only applies to React Native. This is computed by Relay. `stall_total_time`\n *\n * Attribute Value Type: `number` {@link STALL_TOTAL_TIME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n */\nexport const STALL_TOTAL_TIME = 'stall_total_time';\n\n/**\n * Type for {@link STALL_TOTAL_TIME} stall_total_time\n */\nexport type STALL_TOTAL_TIME_TYPE = number;\n\n// Path: model/attributes/state/state__type.json\n\n/**\n * The type of state management library `state.type`\n *\n * Attribute Value Type: `string` {@link STATE_TYPE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"redux\"\n */\nexport const STATE_TYPE = 'state.type';\n\n/**\n * Type for {@link STATE_TYPE} state.type\n */\nexport type STATE_TYPE_TYPE = string;\n\n// Path: model/attributes/thread/thread__id.json\n\n/**\n * Current “managed” thread ID. `thread.id`\n *\n * Attribute Value Type: `number` {@link THREAD_ID_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example 56\n */\nexport const THREAD_ID = 'thread.id';\n\n/**\n * Type for {@link THREAD_ID} thread.id\n */\nexport type THREAD_ID_TYPE = number;\n\n// Path: model/attributes/thread/thread__name.json\n\n/**\n * Current thread name. `thread.name`\n *\n * Attribute Value Type: `string` {@link THREAD_NAME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"main\"\n */\nexport const THREAD_NAME = 'thread.name';\n\n/**\n * Type for {@link THREAD_NAME} thread.name\n */\nexport type THREAD_NAME_TYPE = string;\n\n// Path: model/attributes/timber/timber__tag.json\n\n/**\n * The log tag provided by the timber logging framework. `timber.tag`\n *\n * Attribute Value Type: `string` {@link TIMBER_TAG_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"MyTag\"\n */\nexport const TIMBER_TAG = 'timber.tag';\n\n/**\n * Type for {@link TIMBER_TAG} timber.tag\n */\nexport type TIMBER_TAG_TYPE = string;\n\n// Path: model/attributes/time_to_full_display.json\n\n/**\n * The duration of time to full display in milliseconds `time_to_full_display`\n *\n * Attribute Value Type: `number` {@link TIME_TO_FULL_DISPLAY_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link APP_VITALS_TTFD_VALUE} `app.vitals.ttfd.value`\n *\n * @deprecated Use {@link APP_VITALS_TTFD_VALUE} (app.vitals.ttfd.value) instead - Replaced by app.vitals.ttfd.value to align with the app.vitals.* namespace for mobile performance attributes\n * @example 1234.56\n */\nexport const TIME_TO_FULL_DISPLAY = 'time_to_full_display';\n\n/**\n * Type for {@link TIME_TO_FULL_DISPLAY} time_to_full_display\n */\nexport type TIME_TO_FULL_DISPLAY_TYPE = number;\n\n// Path: model/attributes/time_to_initial_display.json\n\n/**\n * The duration of time to initial display in milliseconds `time_to_initial_display`\n *\n * Attribute Value Type: `number` {@link TIME_TO_INITIAL_DISPLAY_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link APP_VITALS_TTID_VALUE} `app.vitals.ttid.value`\n *\n * @deprecated Use {@link APP_VITALS_TTID_VALUE} (app.vitals.ttid.value) instead - Replaced by app.vitals.ttid.value to align with the app.vitals.* namespace for mobile performance attributes\n * @example 1234.56\n */\nexport const TIME_TO_INITIAL_DISPLAY = 'time_to_initial_display';\n\n/**\n * Type for {@link TIME_TO_INITIAL_DISPLAY} time_to_initial_display\n */\nexport type TIME_TO_INITIAL_DISPLAY_TYPE = number;\n\n// Path: model/attributes/transaction.json\n\n/**\n * The sentry transaction (segment name). `transaction`\n *\n * Attribute Value Type: `string` {@link TRANSACTION_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link SENTRY_SEGMENT_NAME} `sentry.segment.name`, {@link SENTRY_TRANSACTION} `sentry.transaction`\n *\n * @deprecated Use {@link SENTRY_SEGMENT_NAME} (sentry.segment.name) instead\n * @example \"GET /\"\n */\nexport const TRANSACTION = 'transaction';\n\n/**\n * Type for {@link TRANSACTION} transaction\n */\nexport type TRANSACTION_TYPE = string;\n\n// Path: model/attributes/trpc/trpc__procedure_path.json\n\n/**\n * The path of the tRPC procedure being called `trpc.procedure_path`\n *\n * Attribute Value Type: `string` {@link TRPC_PROCEDURE_PATH_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"user.getById\"\n */\nexport const TRPC_PROCEDURE_PATH = 'trpc.procedure_path';\n\n/**\n * Type for {@link TRPC_PROCEDURE_PATH} trpc.procedure_path\n */\nexport type TRPC_PROCEDURE_PATH_TYPE = string;\n\n// Path: model/attributes/trpc/trpc__procedure_type.json\n\n/**\n * The type of the tRPC procedure `trpc.procedure_type`\n *\n * Attribute Value Type: `string` {@link TRPC_PROCEDURE_TYPE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"query\"\n */\nexport const TRPC_PROCEDURE_TYPE = 'trpc.procedure_type';\n\n/**\n * Type for {@link TRPC_PROCEDURE_TYPE} trpc.procedure_type\n */\nexport type TRPC_PROCEDURE_TYPE_TYPE = string;\n\n// Path: model/attributes/ttfb.json\n\n/**\n * The value of the recorded Time To First Byte (TTFB) web vital in milliseconds `ttfb`\n *\n * Attribute Value Type: `number` {@link TTFB_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link BROWSER_WEB_VITAL_TTFB_VALUE} `browser.web_vital.ttfb.value`\n *\n * @deprecated Use {@link BROWSER_WEB_VITAL_TTFB_VALUE} (browser.web_vital.ttfb.value) instead - This attribute is being deprecated in favor of browser.web_vital.ttfb.value\n * @example 194\n */\nexport const TTFB = 'ttfb';\n\n/**\n * Type for {@link TTFB} ttfb\n */\nexport type TTFB_TYPE = number;\n\n// Path: model/attributes/ttfb/ttfb__requestTime.json\n\n/**\n * The time it takes for the server to process the initial request and send the first byte of a response to the user's browser `ttfb.requestTime`\n *\n * Attribute Value Type: `number` {@link TTFB_REQUESTTIME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link BROWSER_WEB_VITAL_TTFB_REQUEST_TIME} `browser.web_vital.ttfb.request_time`\n *\n * @deprecated Use {@link BROWSER_WEB_VITAL_TTFB_REQUEST_TIME} (browser.web_vital.ttfb.request_time) instead - This attribute is being deprecated in favor of browser.web_vital.ttfb.request_time\n * @example 1554.5814\n */\nexport const TTFB_REQUESTTIME = 'ttfb.requestTime';\n\n/**\n * Type for {@link TTFB_REQUESTTIME} ttfb.requestTime\n */\nexport type TTFB_REQUESTTIME_TYPE = number;\n\n// Path: model/attributes/type.json\n\n/**\n * More granular type of the operation happening. `type`\n *\n * Attribute Value Type: `string` {@link TYPE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"fetch\"\n */\nexport const TYPE = 'type';\n\n/**\n * Type for {@link TYPE} type\n */\nexport type TYPE_TYPE = string;\n\n// Path: model/attributes/ui/ui__component_name.json\n\n/**\n * The name of the associated component. `ui.component_name`\n *\n * Attribute Value Type: `string` {@link UI_COMPONENT_NAME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"HomeButton\"\n */\nexport const UI_COMPONENT_NAME = 'ui.component_name';\n\n/**\n * Type for {@link UI_COMPONENT_NAME} ui.component_name\n */\nexport type UI_COMPONENT_NAME_TYPE = string;\n\n// Path: model/attributes/ui/ui__contributes_to_ttfd.json\n\n/**\n * Whether the span execution contributed to the TTFD (time to fully drawn) metric. `ui.contributes_to_ttfd`\n *\n * Attribute Value Type: `boolean` {@link UI_CONTRIBUTES_TO_TTFD_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example true\n */\nexport const UI_CONTRIBUTES_TO_TTFD = 'ui.contributes_to_ttfd';\n\n/**\n * Type for {@link UI_CONTRIBUTES_TO_TTFD} ui.contributes_to_ttfd\n */\nexport type UI_CONTRIBUTES_TO_TTFD_TYPE = boolean;\n\n// Path: model/attributes/ui/ui__contributes_to_ttid.json\n\n/**\n * Whether the span execution contributed to the TTID (time to initial display) metric. `ui.contributes_to_ttid`\n *\n * Attribute Value Type: `boolean` {@link UI_CONTRIBUTES_TO_TTID_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example true\n */\nexport const UI_CONTRIBUTES_TO_TTID = 'ui.contributes_to_ttid';\n\n/**\n * Type for {@link UI_CONTRIBUTES_TO_TTID} ui.contributes_to_ttid\n */\nexport type UI_CONTRIBUTES_TO_TTID_TYPE = boolean;\n\n// Path: model/attributes/ui/ui__element__height.json\n\n/**\n * The height of the UI element (for Html in pixels) `ui.element.height`\n *\n * Attribute Value Type: `number` {@link UI_ELEMENT_HEIGHT_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 256\n */\nexport const UI_ELEMENT_HEIGHT = 'ui.element.height';\n\n/**\n * Type for {@link UI_ELEMENT_HEIGHT} ui.element.height\n */\nexport type UI_ELEMENT_HEIGHT_TYPE = number;\n\n// Path: model/attributes/ui/ui__element__id.json\n\n/**\n * The id of the UI element `ui.element.id`\n *\n * Attribute Value Type: `string` {@link UI_ELEMENT_ID_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"btn-login\"\n */\nexport const UI_ELEMENT_ID = 'ui.element.id';\n\n/**\n * Type for {@link UI_ELEMENT_ID} ui.element.id\n */\nexport type UI_ELEMENT_ID_TYPE = string;\n\n// Path: model/attributes/ui/ui__element__identifier.json\n\n/**\n * The identifier used to measure the UI element timing `ui.element.identifier`\n *\n * Attribute Value Type: `string` {@link UI_ELEMENT_IDENTIFIER_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"heroImage\"\n */\nexport const UI_ELEMENT_IDENTIFIER = 'ui.element.identifier';\n\n/**\n * Type for {@link UI_ELEMENT_IDENTIFIER} ui.element.identifier\n */\nexport type UI_ELEMENT_IDENTIFIER_TYPE = string;\n\n// Path: model/attributes/ui/ui__element__load_time.json\n\n/**\n * The loading time of a UI element (from time origin to finished loading) `ui.element.load_time`\n *\n * Attribute Value Type: `number` {@link UI_ELEMENT_LOAD_TIME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 998.2234\n */\nexport const UI_ELEMENT_LOAD_TIME = 'ui.element.load_time';\n\n/**\n * Type for {@link UI_ELEMENT_LOAD_TIME} ui.element.load_time\n */\nexport type UI_ELEMENT_LOAD_TIME_TYPE = number;\n\n// Path: model/attributes/ui/ui__element__paint_type.json\n\n/**\n * The type of element paint. Can either be 'image-paint' or 'text-paint' `ui.element.paint_type`\n *\n * Attribute Value Type: `string` {@link UI_ELEMENT_PAINT_TYPE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"image-paint\"\n */\nexport const UI_ELEMENT_PAINT_TYPE = 'ui.element.paint_type';\n\n/**\n * Type for {@link UI_ELEMENT_PAINT_TYPE} ui.element.paint_type\n */\nexport type UI_ELEMENT_PAINT_TYPE_TYPE = string;\n\n// Path: model/attributes/ui/ui__element__render_time.json\n\n/**\n * The rendering time of the UI element (from time origin to finished rendering) `ui.element.render_time`\n *\n * Attribute Value Type: `number` {@link UI_ELEMENT_RENDER_TIME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 1023.1124\n */\nexport const UI_ELEMENT_RENDER_TIME = 'ui.element.render_time';\n\n/**\n * Type for {@link UI_ELEMENT_RENDER_TIME} ui.element.render_time\n */\nexport type UI_ELEMENT_RENDER_TIME_TYPE = number;\n\n// Path: model/attributes/ui/ui__element__type.json\n\n/**\n * type of the UI element `ui.element.type`\n *\n * Attribute Value Type: `string` {@link UI_ELEMENT_TYPE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"img\"\n */\nexport const UI_ELEMENT_TYPE = 'ui.element.type';\n\n/**\n * Type for {@link UI_ELEMENT_TYPE} ui.element.type\n */\nexport type UI_ELEMENT_TYPE_TYPE = string;\n\n// Path: model/attributes/ui/ui__element__url.json\n\n/**\n * The URL of the UI element (e.g. an img src) `ui.element.url`\n *\n * Attribute Value Type: `string` {@link UI_ELEMENT_URL_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"https://assets.myapp.com/hero.png\"\n */\nexport const UI_ELEMENT_URL = 'ui.element.url';\n\n/**\n * Type for {@link UI_ELEMENT_URL} ui.element.url\n */\nexport type UI_ELEMENT_URL_TYPE = string;\n\n// Path: model/attributes/ui/ui__element__width.json\n\n/**\n * The width of the UI element (for HTML in pixels) `ui.element.width`\n *\n * Attribute Value Type: `number` {@link UI_ELEMENT_WIDTH_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 512\n */\nexport const UI_ELEMENT_WIDTH = 'ui.element.width';\n\n/**\n * Type for {@link UI_ELEMENT_WIDTH} ui.element.width\n */\nexport type UI_ELEMENT_WIDTH_TYPE = number;\n\n// Path: model/attributes/url.json\n\n/**\n * The URL of the resource that was fetched. `url`\n *\n * Attribute Value Type: `string` {@link URL_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link URL_FULL} `url.full`, {@link HTTP_URL} `http.url`\n *\n * @deprecated Use {@link URL_FULL} (url.full) instead\n * @example \"https://example.com/test?foo=bar#buzz\"\n */\nexport const URL = 'url';\n\n/**\n * Type for {@link URL} url\n */\nexport type URL_TYPE = string;\n\n// Path: model/attributes/url/url__domain.json\n\n/**\n * Server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. `url.domain`\n *\n * Attribute Value Type: `string` {@link URL_DOMAIN_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"example.com\"\n */\nexport const URL_DOMAIN = 'url.domain';\n\n/**\n * Type for {@link URL_DOMAIN} url.domain\n */\nexport type URL_DOMAIN_TYPE = string;\n\n// Path: model/attributes/url/url__fragment.json\n\n/**\n * The fragments present in the URI. Note that this does not contain the leading # character, while the `http.fragment` attribute does. `url.fragment`\n *\n * Attribute Value Type: `string` {@link URL_FRAGMENT_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"details\"\n */\nexport const URL_FRAGMENT = 'url.fragment';\n\n/**\n * Type for {@link URL_FRAGMENT} url.fragment\n */\nexport type URL_FRAGMENT_TYPE = string;\n\n// Path: model/attributes/url/url__full.json\n\n/**\n * The URL of the resource that was fetched. `url.full`\n *\n * Attribute Value Type: `string` {@link URL_FULL_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link HTTP_URL} `http.url`, {@link URL} `url`\n *\n * @example \"https://example.com/test?foo=bar#buzz\"\n */\nexport const URL_FULL = 'url.full';\n\n/**\n * Type for {@link URL_FULL} url.full\n */\nexport type URL_FULL_TYPE = string;\n\n// Path: model/attributes/url/url__path.json\n\n/**\n * The URI path component. `url.path`\n *\n * Attribute Value Type: `string` {@link URL_PATH_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"/foo\"\n */\nexport const URL_PATH = 'url.path';\n\n/**\n * Type for {@link URL_PATH} url.path\n */\nexport type URL_PATH_TYPE = string;\n\n// Path: model/attributes/url/url__path__parameter__[key].json\n\n/**\n * Decoded parameters extracted from a URL path. Usually added by client-side routing frameworks like vue-router. `url.path.parameter.<key>`\n *\n * Attribute Value Type: `string` {@link URL_PATH_PARAMETER_KEY_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Has Dynamic Suffix: true\n *\n * Aliases: {@link PARAMS_KEY} `params.<key>`\n *\n * @example \"url.path.parameter.id='123'\"\n */\nexport const URL_PATH_PARAMETER_KEY = 'url.path.parameter.<key>';\n\n/**\n * Base key for {@link URL_PATH_PARAMETER_KEY}. Use with a dynamic suffix, e.g. `${URL_PATH_PARAMETER_KEY_BASE}.${key}`.\n */\nexport const URL_PATH_PARAMETER_KEY_BASE = 'url.path.parameter';\n\n/**\n * Type for {@link URL_PATH_PARAMETER_KEY} url.path.parameter.<key>\n */\nexport type URL_PATH_PARAMETER_KEY_TYPE = string;\n\n// Path: model/attributes/url/url__port.json\n\n/**\n * Server port number. `url.port`\n *\n * Attribute Value Type: `number` {@link URL_PORT_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example 1337\n */\nexport const URL_PORT = 'url.port';\n\n/**\n * Type for {@link URL_PORT} url.port\n */\nexport type URL_PORT_TYPE = number;\n\n// Path: model/attributes/url/url__query.json\n\n/**\n * The query string present in the URL. Note that this does not contain the leading ? character, while the `http.query` attribute does. `url.query`\n *\n * Attribute Value Type: `string` {@link URL_QUERY_TYPE}\n *\n * Apply Scrubbing: auto - Query string values can contain sensitive information. Clients should attempt to scrub parameters that might contain sensitive information.\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"foo=bar&bar=baz\"\n */\nexport const URL_QUERY = 'url.query';\n\n/**\n * Type for {@link URL_QUERY} url.query\n */\nexport type URL_QUERY_TYPE = string;\n\n// Path: model/attributes/url/url__same_origin.json\n\n/**\n * Indicates that a URL has the same origin as the current page's origin in the browser. `url.same_origin`\n *\n * Attribute Value Type: `boolean` {@link URL_SAME_ORIGIN_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link HTTP_REQUEST_SAME_ORIGIN} `http.request.same_origin`\n *\n * @deprecated Use {@link HTTP_REQUEST_SAME_ORIGIN} (http.request.same_origin) instead - This attribute is being deprecated in favor of http.request.same_origin.\n * @example true\n */\nexport const URL_SAME_ORIGIN = 'url.same_origin';\n\n/**\n * Type for {@link URL_SAME_ORIGIN} url.same_origin\n */\nexport type URL_SAME_ORIGIN_TYPE = boolean;\n\n// Path: model/attributes/url/url__scheme.json\n\n/**\n * The URI scheme component identifying the used protocol. `url.scheme`\n *\n * Attribute Value Type: `string` {@link URL_SCHEME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link HTTP_SCHEME} `http.scheme`\n *\n * @example \"https\"\n */\nexport const URL_SCHEME = 'url.scheme';\n\n/**\n * Type for {@link URL_SCHEME} url.scheme\n */\nexport type URL_SCHEME_TYPE = string;\n\n// Path: model/attributes/url/url__template.json\n\n/**\n * The low-cardinality template of an absolute path reference. `url.template`\n *\n * Attribute Value Type: `string` {@link URL_TEMPLATE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link HTTP_ROUTE} `http.route`\n *\n * @example \"/users/:id\"\n */\nexport const URL_TEMPLATE = 'url.template';\n\n/**\n * Type for {@link URL_TEMPLATE} url.template\n */\nexport type URL_TEMPLATE_TYPE = string;\n\n// Path: model/attributes/user_agent/user_agent__original.json\n\n/**\n * Value of the HTTP User-Agent header sent by the client. `user_agent.original`\n *\n * Attribute Value Type: `string` {@link USER_AGENT_ORIGINAL_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link HTTP_USER_AGENT} `http.user_agent`\n *\n * @example \"Mozilla/5.0 (iPhone; CPU iPhone OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Mobile/15E148 Safari/604.1\"\n */\nexport const USER_AGENT_ORIGINAL = 'user_agent.original';\n\n/**\n * Type for {@link USER_AGENT_ORIGINAL} user_agent.original\n */\nexport type USER_AGENT_ORIGINAL_TYPE = string;\n\n// Path: model/attributes/user/user__email.json\n\n/**\n * User email address. `user.email`\n *\n * Attribute Value Type: `string` {@link USER_EMAIL_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link SENTRY_USER_EMAIL} `sentry.user.email`\n *\n * @example \"test@example.com\"\n */\nexport const USER_EMAIL = 'user.email';\n\n/**\n * Type for {@link USER_EMAIL} user.email\n */\nexport type USER_EMAIL_TYPE = string;\n\n// Path: model/attributes/user/user__full_name.json\n\n/**\n * User's full name. `user.full_name`\n *\n * Attribute Value Type: `string` {@link USER_FULL_NAME_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"John Smith\"\n */\nexport const USER_FULL_NAME = 'user.full_name';\n\n/**\n * Type for {@link USER_FULL_NAME} user.full_name\n */\nexport type USER_FULL_NAME_TYPE = string;\n\n// Path: model/attributes/user/user__geo__city.json\n\n/**\n * Human readable city name. `user.geo.city`\n *\n * Attribute Value Type: `string` {@link USER_GEO_CITY_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link SENTRY_USER_GEO_CITY} `sentry.user.geo.city`\n *\n * @example \"Toronto\"\n */\nexport const USER_GEO_CITY = 'user.geo.city';\n\n/**\n * Type for {@link USER_GEO_CITY} user.geo.city\n */\nexport type USER_GEO_CITY_TYPE = string;\n\n// Path: model/attributes/user/user__geo__country_code.json\n\n/**\n * Two-letter country code (ISO 3166-1 alpha-2). `user.geo.country_code`\n *\n * Attribute Value Type: `string` {@link USER_GEO_COUNTRY_CODE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link SENTRY_USER_GEO_COUNTRY_CODE} `sentry.user.geo.country_code`\n *\n * @example \"CA\"\n */\nexport const USER_GEO_COUNTRY_CODE = 'user.geo.country_code';\n\n/**\n * Type for {@link USER_GEO_COUNTRY_CODE} user.geo.country_code\n */\nexport type USER_GEO_COUNTRY_CODE_TYPE = string;\n\n// Path: model/attributes/user/user__geo__region.json\n\n/**\n * Human readable region name or code. `user.geo.region`\n *\n * Attribute Value Type: `string` {@link USER_GEO_REGION_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link SENTRY_USER_GEO_REGION} `sentry.user.geo.region`\n *\n * @example \"Canada\"\n */\nexport const USER_GEO_REGION = 'user.geo.region';\n\n/**\n * Type for {@link USER_GEO_REGION} user.geo.region\n */\nexport type USER_GEO_REGION_TYPE = string;\n\n// Path: model/attributes/user/user__geo__subdivision.json\n\n/**\n * Human readable subdivision name. `user.geo.subdivision`\n *\n * Attribute Value Type: `string` {@link USER_GEO_SUBDIVISION_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link SENTRY_USER_GEO_SUBDIVISION} `sentry.user.geo.subdivision`\n *\n * @example \"Ontario\"\n */\nexport const USER_GEO_SUBDIVISION = 'user.geo.subdivision';\n\n/**\n * Type for {@link USER_GEO_SUBDIVISION} user.geo.subdivision\n */\nexport type USER_GEO_SUBDIVISION_TYPE = string;\n\n// Path: model/attributes/user/user__hash.json\n\n/**\n * Unique user hash to correlate information for a user in anonymized form. `user.hash`\n *\n * Attribute Value Type: `string` {@link USER_HASH_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example \"8ae4c2993e0f4f3b8b2d1b1f3b5e8f4d\"\n */\nexport const USER_HASH = 'user.hash';\n\n/**\n * Type for {@link USER_HASH} user.hash\n */\nexport type USER_HASH_TYPE = string;\n\n// Path: model/attributes/user/user__id.json\n\n/**\n * Unique identifier of the user. `user.id`\n *\n * Attribute Value Type: `string` {@link USER_ID_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link SENTRY_USER_ID} `sentry.user.id`\n *\n * @example \"S-1-5-21-202424912787-2692429404-2351956786-1000\"\n */\nexport const USER_ID = 'user.id';\n\n/**\n * Type for {@link USER_ID} user.id\n */\nexport type USER_ID_TYPE = string;\n\n// Path: model/attributes/user/user__ip_address.json\n\n/**\n * The IP address of the user. `user.ip_address`\n *\n * Attribute Value Type: `string` {@link USER_IP_ADDRESS_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * Aliases: {@link SENTRY_USER_IP} `sentry.user.ip`\n *\n * @example \"192.168.1.1\"\n */\nexport const USER_IP_ADDRESS = 'user.ip_address';\n\n/**\n * Type for {@link USER_IP_ADDRESS} user.ip_address\n */\nexport type USER_IP_ADDRESS_TYPE = string;\n\n// Path: model/attributes/user/user__name.json\n\n/**\n * Short name or login/username of the user. `user.name`\n *\n * Attribute Value Type: `string` {@link USER_NAME_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * Aliases: {@link SENTRY_USER_USERNAME} `sentry.user.username`\n *\n * @example \"j.smith\"\n */\nexport const USER_NAME = 'user.name';\n\n/**\n * Type for {@link USER_NAME} user.name\n */\nexport type USER_NAME_TYPE = string;\n\n// Path: model/attributes/user/user__roles.json\n\n/**\n * Array of user roles at the time of the event. `user.roles`\n *\n * Attribute Value Type: `Array<string>` {@link USER_ROLES_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: Yes\n * Visibility: public\n *\n * @example [\"admin\",\"editor\"]\n */\nexport const USER_ROLES = 'user.roles';\n\n/**\n * Type for {@link USER_ROLES} user.roles\n */\nexport type USER_ROLES_TYPE = Array<string>;\n\n// Path: model/attributes/vercel/vercel__branch.json\n\n/**\n * Git branch name for Vercel project `vercel.branch`\n *\n * Attribute Value Type: `string` {@link VERCEL_BRANCH_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"main\"\n */\nexport const VERCEL_BRANCH = 'vercel.branch';\n\n/**\n * Type for {@link VERCEL_BRANCH} vercel.branch\n */\nexport type VERCEL_BRANCH_TYPE = string;\n\n// Path: model/attributes/vercel/vercel__build_id.json\n\n/**\n * Identifier for the Vercel build (only present on build logs) `vercel.build_id`\n *\n * Attribute Value Type: `string` {@link VERCEL_BUILD_ID_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"bld_cotnkcr76\"\n */\nexport const VERCEL_BUILD_ID = 'vercel.build_id';\n\n/**\n * Type for {@link VERCEL_BUILD_ID} vercel.build_id\n */\nexport type VERCEL_BUILD_ID_TYPE = string;\n\n// Path: model/attributes/vercel/vercel__deployment_id.json\n\n/**\n * Identifier for the Vercel deployment `vercel.deployment_id`\n *\n * Attribute Value Type: `string` {@link VERCEL_DEPLOYMENT_ID_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"dpl_233NRGRjVZX1caZrXWtz5g1TAksD\"\n */\nexport const VERCEL_DEPLOYMENT_ID = 'vercel.deployment_id';\n\n/**\n * Type for {@link VERCEL_DEPLOYMENT_ID} vercel.deployment_id\n */\nexport type VERCEL_DEPLOYMENT_ID_TYPE = string;\n\n// Path: model/attributes/vercel/vercel__destination.json\n\n/**\n * Origin of the external content in Vercel (only on external logs) `vercel.destination`\n *\n * Attribute Value Type: `string` {@link VERCEL_DESTINATION_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"https://vitals.vercel-insights.com/v1\"\n */\nexport const VERCEL_DESTINATION = 'vercel.destination';\n\n/**\n * Type for {@link VERCEL_DESTINATION} vercel.destination\n */\nexport type VERCEL_DESTINATION_TYPE = string;\n\n// Path: model/attributes/vercel/vercel__edge_type.json\n\n/**\n * Type of edge runtime in Vercel `vercel.edge_type`\n *\n * Attribute Value Type: `string` {@link VERCEL_EDGE_TYPE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"edge-function\"\n */\nexport const VERCEL_EDGE_TYPE = 'vercel.edge_type';\n\n/**\n * Type for {@link VERCEL_EDGE_TYPE} vercel.edge_type\n */\nexport type VERCEL_EDGE_TYPE_TYPE = string;\n\n// Path: model/attributes/vercel/vercel__entrypoint.json\n\n/**\n * Entrypoint for the request in Vercel `vercel.entrypoint`\n *\n * Attribute Value Type: `string` {@link VERCEL_ENTRYPOINT_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"api/index.js\"\n */\nexport const VERCEL_ENTRYPOINT = 'vercel.entrypoint';\n\n/**\n * Type for {@link VERCEL_ENTRYPOINT} vercel.entrypoint\n */\nexport type VERCEL_ENTRYPOINT_TYPE = string;\n\n// Path: model/attributes/vercel/vercel__execution_region.json\n\n/**\n * Region where the request is executed `vercel.execution_region`\n *\n * Attribute Value Type: `string` {@link VERCEL_EXECUTION_REGION_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"sfo1\"\n */\nexport const VERCEL_EXECUTION_REGION = 'vercel.execution_region';\n\n/**\n * Type for {@link VERCEL_EXECUTION_REGION} vercel.execution_region\n */\nexport type VERCEL_EXECUTION_REGION_TYPE = string;\n\n// Path: model/attributes/vercel/vercel__id.json\n\n/**\n * Unique identifier for the log entry in Vercel `vercel.id`\n *\n * Attribute Value Type: `string` {@link VERCEL_ID_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"1573817187330377061717300000\"\n */\nexport const VERCEL_ID = 'vercel.id';\n\n/**\n * Type for {@link VERCEL_ID} vercel.id\n */\nexport type VERCEL_ID_TYPE = string;\n\n// Path: model/attributes/vercel/vercel__ja3_digest.json\n\n/**\n * JA3 fingerprint digest of Vercel request `vercel.ja3_digest`\n *\n * Attribute Value Type: `string` {@link VERCEL_JA3_DIGEST_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"769,47-53-5-10-49161-49162-49171-49172-50-56-19-4,0-10-11,23-24-25,0\"\n */\nexport const VERCEL_JA3_DIGEST = 'vercel.ja3_digest';\n\n/**\n * Type for {@link VERCEL_JA3_DIGEST} vercel.ja3_digest\n */\nexport type VERCEL_JA3_DIGEST_TYPE = string;\n\n// Path: model/attributes/vercel/vercel__ja4_digest.json\n\n/**\n * JA4 fingerprint digest `vercel.ja4_digest`\n *\n * Attribute Value Type: `string` {@link VERCEL_JA4_DIGEST_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"t13d1516h2_8daaf6152771_02713d6af862\"\n */\nexport const VERCEL_JA4_DIGEST = 'vercel.ja4_digest';\n\n/**\n * Type for {@link VERCEL_JA4_DIGEST} vercel.ja4_digest\n */\nexport type VERCEL_JA4_DIGEST_TYPE = string;\n\n// Path: model/attributes/vercel/vercel__log_type.json\n\n/**\n * Vercel log output type `vercel.log_type`\n *\n * Attribute Value Type: `string` {@link VERCEL_LOG_TYPE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"stdout\"\n */\nexport const VERCEL_LOG_TYPE = 'vercel.log_type';\n\n/**\n * Type for {@link VERCEL_LOG_TYPE} vercel.log_type\n */\nexport type VERCEL_LOG_TYPE_TYPE = string;\n\n// Path: model/attributes/vercel/vercel__path.json\n\n/**\n * Function or dynamic path of the request in Vercel. `vercel.path`\n *\n * Attribute Value Type: `string` {@link VERCEL_PATH_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"/dynamic/[route].json\"\n */\nexport const VERCEL_PATH = 'vercel.path';\n\n/**\n * Type for {@link VERCEL_PATH} vercel.path\n */\nexport type VERCEL_PATH_TYPE = string;\n\n// Path: model/attributes/vercel/vercel__project_id.json\n\n/**\n * Identifier for the Vercel project `vercel.project_id`\n *\n * Attribute Value Type: `string` {@link VERCEL_PROJECT_ID_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"gdufoJxB6b9b1fEqr1jUtFkyavUU\"\n */\nexport const VERCEL_PROJECT_ID = 'vercel.project_id';\n\n/**\n * Type for {@link VERCEL_PROJECT_ID} vercel.project_id\n */\nexport type VERCEL_PROJECT_ID_TYPE = string;\n\n// Path: model/attributes/vercel/vercel__project_name.json\n\n/**\n * Name of the Vercel project `vercel.project_name`\n *\n * Attribute Value Type: `string` {@link VERCEL_PROJECT_NAME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"my-app\"\n */\nexport const VERCEL_PROJECT_NAME = 'vercel.project_name';\n\n/**\n * Type for {@link VERCEL_PROJECT_NAME} vercel.project_name\n */\nexport type VERCEL_PROJECT_NAME_TYPE = string;\n\n// Path: model/attributes/vercel/vercel__proxy__cache_id.json\n\n/**\n * Original request ID when request is served from cache `vercel.proxy.cache_id`\n *\n * Attribute Value Type: `string` {@link VERCEL_PROXY_CACHE_ID_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"pdx1::v8g4b-1744143786684-93dafbc0f70d\"\n */\nexport const VERCEL_PROXY_CACHE_ID = 'vercel.proxy.cache_id';\n\n/**\n * Type for {@link VERCEL_PROXY_CACHE_ID} vercel.proxy.cache_id\n */\nexport type VERCEL_PROXY_CACHE_ID_TYPE = string;\n\n// Path: model/attributes/vercel/vercel__proxy__client_ip.json\n\n/**\n * Client IP address `vercel.proxy.client_ip`\n *\n * Attribute Value Type: `string` {@link VERCEL_PROXY_CLIENT_IP_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"120.75.16.101\"\n */\nexport const VERCEL_PROXY_CLIENT_IP = 'vercel.proxy.client_ip';\n\n/**\n * Type for {@link VERCEL_PROXY_CLIENT_IP} vercel.proxy.client_ip\n */\nexport type VERCEL_PROXY_CLIENT_IP_TYPE = string;\n\n// Path: model/attributes/vercel/vercel__proxy__host.json\n\n/**\n * Hostname of the request `vercel.proxy.host`\n *\n * Attribute Value Type: `string` {@link VERCEL_PROXY_HOST_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"test.vercel.app\"\n */\nexport const VERCEL_PROXY_HOST = 'vercel.proxy.host';\n\n/**\n * Type for {@link VERCEL_PROXY_HOST} vercel.proxy.host\n */\nexport type VERCEL_PROXY_HOST_TYPE = string;\n\n// Path: model/attributes/vercel/vercel__proxy__lambda_region.json\n\n/**\n * Region where lambda function executed `vercel.proxy.lambda_region`\n *\n * Attribute Value Type: `string` {@link VERCEL_PROXY_LAMBDA_REGION_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"sfo1\"\n */\nexport const VERCEL_PROXY_LAMBDA_REGION = 'vercel.proxy.lambda_region';\n\n/**\n * Type for {@link VERCEL_PROXY_LAMBDA_REGION} vercel.proxy.lambda_region\n */\nexport type VERCEL_PROXY_LAMBDA_REGION_TYPE = string;\n\n// Path: model/attributes/vercel/vercel__proxy__method.json\n\n/**\n * HTTP method of the request `vercel.proxy.method`\n *\n * Attribute Value Type: `string` {@link VERCEL_PROXY_METHOD_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"GET\"\n */\nexport const VERCEL_PROXY_METHOD = 'vercel.proxy.method';\n\n/**\n * Type for {@link VERCEL_PROXY_METHOD} vercel.proxy.method\n */\nexport type VERCEL_PROXY_METHOD_TYPE = string;\n\n// Path: model/attributes/vercel/vercel__proxy__path.json\n\n/**\n * Request path with query parameters `vercel.proxy.path`\n *\n * Attribute Value Type: `string` {@link VERCEL_PROXY_PATH_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"/dynamic/some-value.json?route=some-value\"\n */\nexport const VERCEL_PROXY_PATH = 'vercel.proxy.path';\n\n/**\n * Type for {@link VERCEL_PROXY_PATH} vercel.proxy.path\n */\nexport type VERCEL_PROXY_PATH_TYPE = string;\n\n// Path: model/attributes/vercel/vercel__proxy__path_type.json\n\n/**\n * How the request was served based on its path and project configuration `vercel.proxy.path_type`\n *\n * Attribute Value Type: `string` {@link VERCEL_PROXY_PATH_TYPE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"func\"\n */\nexport const VERCEL_PROXY_PATH_TYPE = 'vercel.proxy.path_type';\n\n/**\n * Type for {@link VERCEL_PROXY_PATH_TYPE} vercel.proxy.path_type\n */\nexport type VERCEL_PROXY_PATH_TYPE_TYPE = string;\n\n// Path: model/attributes/vercel/vercel__proxy__path_type_variant.json\n\n/**\n * Variant of the path type `vercel.proxy.path_type_variant`\n *\n * Attribute Value Type: `string` {@link VERCEL_PROXY_PATH_TYPE_VARIANT_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"api\"\n */\nexport const VERCEL_PROXY_PATH_TYPE_VARIANT = 'vercel.proxy.path_type_variant';\n\n/**\n * Type for {@link VERCEL_PROXY_PATH_TYPE_VARIANT} vercel.proxy.path_type_variant\n */\nexport type VERCEL_PROXY_PATH_TYPE_VARIANT_TYPE = string;\n\n// Path: model/attributes/vercel/vercel__proxy__referer.json\n\n/**\n * Referer of the request `vercel.proxy.referer`\n *\n * Attribute Value Type: `string` {@link VERCEL_PROXY_REFERER_TYPE}\n *\n * Apply Scrubbing: auto\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"*.vercel.app\"\n */\nexport const VERCEL_PROXY_REFERER = 'vercel.proxy.referer';\n\n/**\n * Type for {@link VERCEL_PROXY_REFERER} vercel.proxy.referer\n */\nexport type VERCEL_PROXY_REFERER_TYPE = string;\n\n// Path: model/attributes/vercel/vercel__proxy__region.json\n\n/**\n * Region where the request is processed `vercel.proxy.region`\n *\n * Attribute Value Type: `string` {@link VERCEL_PROXY_REGION_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"sfo1\"\n */\nexport const VERCEL_PROXY_REGION = 'vercel.proxy.region';\n\n/**\n * Type for {@link VERCEL_PROXY_REGION} vercel.proxy.region\n */\nexport type VERCEL_PROXY_REGION_TYPE = string;\n\n// Path: model/attributes/vercel/vercel__proxy__response_byte_size.json\n\n/**\n * Size of the response in bytes `vercel.proxy.response_byte_size`\n *\n * Attribute Value Type: `number` {@link VERCEL_PROXY_RESPONSE_BYTE_SIZE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 1024\n */\nexport const VERCEL_PROXY_RESPONSE_BYTE_SIZE = 'vercel.proxy.response_byte_size';\n\n/**\n * Type for {@link VERCEL_PROXY_RESPONSE_BYTE_SIZE} vercel.proxy.response_byte_size\n */\nexport type VERCEL_PROXY_RESPONSE_BYTE_SIZE_TYPE = number;\n\n// Path: model/attributes/vercel/vercel__proxy__scheme.json\n\n/**\n * Protocol of the request `vercel.proxy.scheme`\n *\n * Attribute Value Type: `string` {@link VERCEL_PROXY_SCHEME_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"https\"\n */\nexport const VERCEL_PROXY_SCHEME = 'vercel.proxy.scheme';\n\n/**\n * Type for {@link VERCEL_PROXY_SCHEME} vercel.proxy.scheme\n */\nexport type VERCEL_PROXY_SCHEME_TYPE = string;\n\n// Path: model/attributes/vercel/vercel__proxy__status_code.json\n\n/**\n * HTTP status code of the proxy request `vercel.proxy.status_code`\n *\n * Attribute Value Type: `number` {@link VERCEL_PROXY_STATUS_CODE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 200\n */\nexport const VERCEL_PROXY_STATUS_CODE = 'vercel.proxy.status_code';\n\n/**\n * Type for {@link VERCEL_PROXY_STATUS_CODE} vercel.proxy.status_code\n */\nexport type VERCEL_PROXY_STATUS_CODE_TYPE = number;\n\n// Path: model/attributes/vercel/vercel__proxy__timestamp.json\n\n/**\n * Unix timestamp when the proxy request was made `vercel.proxy.timestamp`\n *\n * Attribute Value Type: `number` {@link VERCEL_PROXY_TIMESTAMP_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 1573817250172\n */\nexport const VERCEL_PROXY_TIMESTAMP = 'vercel.proxy.timestamp';\n\n/**\n * Type for {@link VERCEL_PROXY_TIMESTAMP} vercel.proxy.timestamp\n */\nexport type VERCEL_PROXY_TIMESTAMP_TYPE = number;\n\n// Path: model/attributes/vercel/vercel__proxy__user_agent.json\n\n/**\n * User agent strings of the request `vercel.proxy.user_agent`\n *\n * Attribute Value Type: `Array<string>` {@link VERCEL_PROXY_USER_AGENT_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example [\"Mozilla/5.0...\"]\n */\nexport const VERCEL_PROXY_USER_AGENT = 'vercel.proxy.user_agent';\n\n/**\n * Type for {@link VERCEL_PROXY_USER_AGENT} vercel.proxy.user_agent\n */\nexport type VERCEL_PROXY_USER_AGENT_TYPE = Array<string>;\n\n// Path: model/attributes/vercel/vercel__proxy__vercel_cache.json\n\n/**\n * Cache status sent to the browser `vercel.proxy.vercel_cache`\n *\n * Attribute Value Type: `string` {@link VERCEL_PROXY_VERCEL_CACHE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"REVALIDATED\"\n */\nexport const VERCEL_PROXY_VERCEL_CACHE = 'vercel.proxy.vercel_cache';\n\n/**\n * Type for {@link VERCEL_PROXY_VERCEL_CACHE} vercel.proxy.vercel_cache\n */\nexport type VERCEL_PROXY_VERCEL_CACHE_TYPE = string;\n\n// Path: model/attributes/vercel/vercel__proxy__vercel_id.json\n\n/**\n * Vercel-specific identifier `vercel.proxy.vercel_id`\n *\n * Attribute Value Type: `string` {@link VERCEL_PROXY_VERCEL_ID_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"sfo1::abc123\"\n */\nexport const VERCEL_PROXY_VERCEL_ID = 'vercel.proxy.vercel_id';\n\n/**\n * Type for {@link VERCEL_PROXY_VERCEL_ID} vercel.proxy.vercel_id\n */\nexport type VERCEL_PROXY_VERCEL_ID_TYPE = string;\n\n// Path: model/attributes/vercel/vercel__proxy__waf_action.json\n\n/**\n * Action taken by firewall rules `vercel.proxy.waf_action`\n *\n * Attribute Value Type: `string` {@link VERCEL_PROXY_WAF_ACTION_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"deny\"\n */\nexport const VERCEL_PROXY_WAF_ACTION = 'vercel.proxy.waf_action';\n\n/**\n * Type for {@link VERCEL_PROXY_WAF_ACTION} vercel.proxy.waf_action\n */\nexport type VERCEL_PROXY_WAF_ACTION_TYPE = string;\n\n// Path: model/attributes/vercel/vercel__proxy__waf_rule_id.json\n\n/**\n * ID of the firewall rule that matched `vercel.proxy.waf_rule_id`\n *\n * Attribute Value Type: `string` {@link VERCEL_PROXY_WAF_RULE_ID_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"rule_gAHz8jtSB1Gy\"\n */\nexport const VERCEL_PROXY_WAF_RULE_ID = 'vercel.proxy.waf_rule_id';\n\n/**\n * Type for {@link VERCEL_PROXY_WAF_RULE_ID} vercel.proxy.waf_rule_id\n */\nexport type VERCEL_PROXY_WAF_RULE_ID_TYPE = string;\n\n// Path: model/attributes/vercel/vercel__request_id.json\n\n/**\n * Identifier of the Vercel request `vercel.request_id`\n *\n * Attribute Value Type: `string` {@link VERCEL_REQUEST_ID_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"643af4e3-975a-4cc7-9e7a-1eda11539d90\"\n */\nexport const VERCEL_REQUEST_ID = 'vercel.request_id';\n\n/**\n * Type for {@link VERCEL_REQUEST_ID} vercel.request_id\n */\nexport type VERCEL_REQUEST_ID_TYPE = string;\n\n// Path: model/attributes/vercel/vercel__source.json\n\n/**\n * Origin of the Vercel log (build, edge, lambda, static, external, or firewall) `vercel.source`\n *\n * Attribute Value Type: `string` {@link VERCEL_SOURCE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example \"build\"\n */\nexport const VERCEL_SOURCE = 'vercel.source';\n\n/**\n * Type for {@link VERCEL_SOURCE} vercel.source\n */\nexport type VERCEL_SOURCE_TYPE = string;\n\n// Path: model/attributes/vercel/vercel__status_code.json\n\n/**\n * HTTP status code of the request (-1 means no response returned and the lambda crashed) `vercel.status_code`\n *\n * Attribute Value Type: `number` {@link VERCEL_STATUS_CODE_TYPE}\n *\n * Apply Scrubbing: manual\n *\n * Attribute defined in OTEL: No\n * Visibility: public\n *\n * @example 200\n */\nexport const VERCEL_STATUS_CODE = 'vercel.status_code';\n\n/**\n * Type for {@link VERCEL_STATUS_CODE} vercel.status_code\n */\nexport type VERCEL_STATUS_CODE_TYPE = number;\n\nexport type AttributeType =\n  | 'string'\n  | 'boolean'\n  | 'integer'\n  | 'double'\n  | 'string[]'\n  | 'boolean[]'\n  | 'integer[]'\n  | 'double[]'\n  | 'any';\n\nexport type ApplyScrubbing = 'auto' | 'manual' | 'never';\n\nexport type AttributeVisibility = 'public' | 'internal';\n\nexport interface ApplyScrubbingInfo {\n  /** How PII scrubbing should be applied to the attribute value */\n  key: ApplyScrubbing;\n  /** Reason why this scrubbing mode applies */\n  reason?: string;\n}\n\nexport interface DeprecationInfo {\n  /** What this attribute was replaced with */\n  replacement?: string;\n  /** Reason for deprecation */\n  reason?: string;\n}\n\nexport interface ChangelogEntry {\n  /** The sentry-conventions release version */\n  version: string;\n  /** GitHub PR numbers */\n  prs?: number[];\n  /** Optional description of what changed */\n  description?: string;\n}\n\nexport interface AttributeMetadata {\n  /** A description of the attribute */\n  brief: string;\n  /** The type of the attribute value */\n  type: AttributeType;\n  /** How PII scrubbing should be applied to the attribute value */\n  applyScrubbing: ApplyScrubbingInfo;\n  /** Whether the attribute is defined in OpenTelemetry Semantic Conventions */\n  isInOtel: boolean;\n  /** Whether the attribute is public or internal to Sentry */\n  visibility: AttributeVisibility;\n  /** If an attribute has a dynamic suffix */\n  hasDynamicSuffix?: boolean;\n  /** An example value of the attribute */\n  example?: AttributeValue;\n  /** If an attribute was deprecated, and what it was replaced with */\n  deprecation?: DeprecationInfo;\n  /** If there are attributes that alias to this attribute */\n  aliases?: AttributeName[];\n  /** Changelog entries tracking how this attribute has changed across versions */\n  changelog?: ChangelogEntry[];\n  /** A list of freeform notes providing additional context about how this attribute behaves, common pitfalls, or query-time nuances */\n  additionalContext?: string[];\n}\n\nexport const ATTRIBUTE_TYPE: Record<string, AttributeType> = {\n  'ai.citations': 'string[]',\n  'ai.completion_tokens.used': 'integer',\n  'ai.documents': 'string[]',\n  'ai.finish_reason': 'string',\n  'ai.frequency_penalty': 'double',\n  'ai.function_call': 'string',\n  'ai.generation_id': 'string',\n  'ai.input_messages': 'string',\n  'ai.is_search_required': 'boolean',\n  'ai.metadata': 'string',\n  'ai.model_id': 'string',\n  'ai.model.provider': 'string',\n  'ai.pipeline.name': 'string',\n  'ai.preamble': 'string',\n  'ai.presence_penalty': 'double',\n  'ai.prompt_tokens.used': 'integer',\n  'ai.raw_prompting': 'boolean',\n  'ai.responses': 'string[]',\n  'ai.response_format': 'string',\n  'ai.search_queries': 'string[]',\n  'ai.search_results': 'string[]',\n  'ai.seed': 'string',\n  'ai.streaming': 'boolean',\n  'ai.tags': 'string',\n  'ai.temperature': 'double',\n  'ai.texts': 'string[]',\n  'ai.tools': 'string[]',\n  'ai.tool_calls': 'string[]',\n  'ai.top_k': 'integer',\n  'ai.top_p': 'double',\n  'ai.total_cost': 'double',\n  'ai.total_tokens.used': 'integer',\n  'ai.warnings': 'string[]',\n  'angular.version': 'string',\n  'app.app_build': 'string',\n  'app.app_identifier': 'string',\n  'app.app_name': 'string',\n  'app.app_start_time': 'string',\n  'app.app_version': 'string',\n  'app.build': 'string',\n  'app.identifier': 'string',\n  'app.in_foreground': 'boolean',\n  'app.name': 'string',\n  app_start_cold: 'double',\n  'app.start_time': 'string',\n  app_start_type: 'string',\n  app_start_warm: 'double',\n  'app.version': 'string',\n  'app.vitals.frames.delay.value': 'integer',\n  'app.vitals.frames.frozen.count': 'integer',\n  'app.vitals.frames.slow.count': 'integer',\n  'app.vitals.frames.total.count': 'integer',\n  'app.vitals.start.cold.value': 'double',\n  'app.vitals.start.prewarmed': 'boolean',\n  'app.vitals.start.reason': 'string',\n  'app.vitals.start.screen': 'string',\n  'app.vitals.start.type': 'string',\n  'app.vitals.start.warm.value': 'double',\n  'app.vitals.ttfd.value': 'double',\n  'app.vitals.ttid.value': 'double',\n  'art.gc.blocking_count': 'integer',\n  'art.gc.blocking_time': 'double',\n  'art.gc.pre_oome_count': 'integer',\n  'art.gc.total_count': 'integer',\n  'art.gc.total_time': 'double',\n  'art.gc.waiting_time': 'double',\n  'art.memory.free': 'integer',\n  'art.memory.free_until_gc': 'integer',\n  'art.memory.free_until_oome': 'integer',\n  'art.memory.max': 'integer',\n  'art.memory.total': 'integer',\n  'aws.cloudwatch.logs.log_group': 'string',\n  'aws.cloudwatch.logs.log_stream': 'string',\n  'aws.cloudwatch.logs.url': 'string',\n  'aws.dynamodb.attribute_definitions': 'string[]',\n  'aws.dynamodb.consistent_read': 'boolean',\n  'aws.dynamodb.consumed_capacity': 'string[]',\n  'aws.dynamodb.count': 'integer',\n  'aws.dynamodb.exclusive_start_table': 'string',\n  'aws.dynamodb.global_secondary_indexes': 'string[]',\n  'aws.dynamodb.global_secondary_index_updates': 'string[]',\n  'aws.dynamodb.index_name': 'string',\n  'aws.dynamodb.item_collection_metrics': 'string',\n  'aws.dynamodb.limit': 'integer',\n  'aws.dynamodb.local_secondary_indexes': 'string[]',\n  'aws.dynamodb.projection': 'string',\n  'aws.dynamodb.provisioned_read_capacity': 'double',\n  'aws.dynamodb.provisioned_write_capacity': 'double',\n  'aws.dynamodb.scanned_count': 'integer',\n  'aws.dynamodb.scan_forward': 'boolean',\n  'aws.dynamodb.segment': 'integer',\n  'aws.dynamodb.select': 'string',\n  'aws.dynamodb.table_count': 'integer',\n  'aws.dynamodb.table_names': 'string[]',\n  'aws.dynamodb.total_segments': 'integer',\n  'aws.extended_request_id': 'string',\n  'aws.kinesis.stream_name': 'string',\n  'aws.kinesis.stream.name': 'string',\n  'aws.lambda.aws_request_id': 'string',\n  'aws.lambda.execution_duration_in_millis': 'double',\n  'aws.lambda.function_name': 'string',\n  'aws.lambda.function_version': 'string',\n  'aws.lambda.invoked_arn': 'string',\n  'aws.lambda.invoked_function_arn': 'string',\n  'aws.lambda.remaining_time_in_millis': 'double',\n  'aws.log.group.names': 'string[]',\n  'aws.log.stream.names': 'string[]',\n  'aws.request.extended_id': 'string',\n  'aws.request_id': 'string',\n  'aws.request.id': 'string',\n  'aws.s3.bucket': 'string',\n  'aws.secretsmanager.secret.arn': 'string',\n  'aws.sns.topic.arn': 'string',\n  'aws.step_functions.activity.arn': 'string',\n  'aws.step_functions.state_machine.arn': 'string',\n  blocked_main_thread: 'boolean',\n  'browser.name': 'string',\n  'browser.performance.navigation.activation_start': 'double',\n  'browser.performance.time_origin': 'double',\n  'browser.report.type': 'string',\n  'browser.script.invoker': 'string',\n  'browser.script.invoker_type': 'string',\n  'browser.script.source_char_position': 'integer',\n  'browser.version': 'string',\n  'browser.web_vital.cls.report_event': 'string',\n  'browser.web_vital.cls.source.<key>': 'string',\n  'browser.web_vital.cls.value': 'double',\n  'browser.web_vital.fcp.value': 'double',\n  'browser.web_vital.fp.value': 'double',\n  'browser.web_vital.inp.value': 'double',\n  'browser.web_vital.lcp.element': 'string',\n  'browser.web_vital.lcp.id': 'string',\n  'browser.web_vital.lcp.load_time': 'integer',\n  'browser.web_vital.lcp.render_time': 'integer',\n  'browser.web_vital.lcp.report_event': 'string',\n  'browser.web_vital.lcp.size': 'integer',\n  'browser.web_vital.lcp.url': 'string',\n  'browser.web_vital.lcp.value': 'double',\n  'browser.web_vital.ttfb.request_time': 'double',\n  'browser.web_vital.ttfb.value': 'double',\n  'cache.hit': 'boolean',\n  'cache.item_size': 'integer',\n  'cache.key': 'string[]',\n  'cache.operation': 'string',\n  'cache.ttl': 'integer',\n  'cache.write': 'boolean',\n  channel: 'string',\n  'client.address': 'string',\n  'client.port': 'integer',\n  'cloudflare.d1.duration': 'integer',\n  'cloudflare.d1.query_type': 'string',\n  'cloudflare.d1.rows_read': 'integer',\n  'cloudflare.d1.rows_written': 'integer',\n  'cloudflare.durable_object.query.bindings': 'integer',\n  'cloudflare.durable_object.response.rows_read': 'integer',\n  'cloudflare.durable_object.response.rows_written': 'integer',\n  'cloudflare.r2.bucket': 'string',\n  'cloudflare.r2.operation': 'string',\n  'cloudflare.r2.request.delimiter': 'string',\n  'cloudflare.r2.request.key': 'string',\n  'cloudflare.r2.request.part_number': 'integer',\n  'cloudflare.r2.request.prefix': 'string',\n  'cloudflare.workflow.attempt': 'integer',\n  'cloudflare.workflow.retries.backoff': 'string',\n  'cloudflare.workflow.retries.delay': 'string',\n  'cloudflare.workflow.retries.limit': 'integer',\n  'cloudflare.workflow.timeout': 'string',\n  'cloud.account.id': 'string',\n  'cloud.availability_zone': 'string',\n  'cloud.platform': 'string',\n  'cloud.provider': 'string',\n  'cloud.region': 'string',\n  'cloud.resource_id': 'string',\n  cls: 'double',\n  'cls.source.<key>': 'string',\n  'code.filepath': 'string',\n  'code.file.path': 'string',\n  'code.function': 'string',\n  'code.function.name': 'string',\n  'code.lineno': 'integer',\n  'code.line.number': 'integer',\n  'code.namespace': 'string',\n  connectionType: 'string',\n  'connection.rtt': 'integer',\n  'culture.calendar': 'string',\n  'culture.display_name': 'string',\n  'culture.is_24_hour_format': 'boolean',\n  'culture.locale': 'string',\n  'culture.timezone': 'string',\n  'db.collection.name': 'string',\n  'db.driver.name': 'string',\n  'db.name': 'string',\n  'db.namespace': 'string',\n  'db.operation': 'string',\n  'db.operation.batch.size': 'integer',\n  'db.operation.name': 'string',\n  'db.query.parameter.<key>': 'string',\n  'db.query.summary': 'string',\n  'db.query.text': 'string',\n  'db.redis.connection': 'string',\n  'db.redis.key': 'string',\n  'db.redis.parameters': 'string[]',\n  'db.response.status_code': 'string',\n  'db.sql.bindings': 'string[]',\n  'db.statement': 'string',\n  'db.stored_procedure.name': 'string',\n  'db.system': 'string',\n  'db.system.name': 'string',\n  'db.user': 'string',\n  deviceMemory: 'string',\n  'device.archs': 'string[]',\n  'device.battery_level': 'double',\n  'device.battery_temperature': 'double',\n  'device.boot_time': 'string',\n  'device.brand': 'string',\n  'device.charging': 'boolean',\n  'device.chipset': 'string',\n  'device.class': 'string',\n  'device.connection_type': 'string',\n  'device.cpu_description': 'string',\n  'device.external_free_storage': 'integer',\n  'device.external_storage_size': 'integer',\n  'device.family': 'string',\n  'device.free_memory': 'integer',\n  'device.free_storage': 'integer',\n  'device.id': 'string',\n  'device.locale': 'string',\n  'device.low_memory': 'boolean',\n  'device.low_power_mode': 'boolean',\n  'device.manufacturer': 'string',\n  'device.memory.estimated_capacity': 'integer',\n  'device.memory_size': 'integer',\n  'device.model': 'string',\n  'device.model_id': 'string',\n  'device.name': 'string',\n  'device.online': 'boolean',\n  'device.orientation': 'string',\n  'device.processor_count': 'integer',\n  'device.processor_frequency': 'double',\n  'device.screen_density': 'double',\n  'device.screen_dpi': 'integer',\n  'device.screen_height_pixels': 'integer',\n  'device.screen_width_pixels': 'integer',\n  'device.simulator': 'boolean',\n  'device.storage_size': 'integer',\n  'device.thermal_state': 'string',\n  'device.timezone': 'string',\n  'device.usable_memory': 'integer',\n  dist: 'string',\n  effectiveConnectionType: 'string',\n  environment: 'string',\n  'error.type': 'string',\n  'event.id': 'integer',\n  'event.name': 'string',\n  'exception.escaped': 'boolean',\n  'exception.message': 'string',\n  'exception.stacktrace': 'string',\n  'exception.type': 'string',\n  'faas.coldstart': 'boolean',\n  'faas.cron': 'string',\n  'faas.duration_in_ms': 'integer',\n  'faas.entry_point': 'string',\n  'faas.execution': 'string',\n  'faas.id': 'string',\n  'faas.identity': 'string',\n  'faas.invocation_id': 'string',\n  'faas.invoked_name': 'string',\n  'faas.invoked_provider': 'string',\n  'faas.invoked_region': 'string',\n  'faas.name': 'string',\n  'faas.time': 'string',\n  'faas.trigger': 'string',\n  'faas.version': 'string',\n  fcp: 'double',\n  'flag.evaluation.<key>': 'boolean',\n  fp: 'double',\n  'frames.delay': 'integer',\n  'frames.frozen': 'integer',\n  frames_frozen_rate: 'double',\n  'frames.slow': 'integer',\n  frames_slow_rate: 'double',\n  'frames.total': 'integer',\n  fs_error: 'string',\n  'gcp.function.context.event_id': 'string',\n  'gcp.function.context.event_type': 'string',\n  'gcp.function.context.id': 'string',\n  'gcp.function.context.resource': 'string',\n  'gcp.function.context.source': 'string',\n  'gcp.function.context.specversion': 'string',\n  'gcp.function.context.time': 'string',\n  'gcp.function.context.timestamp': 'string',\n  'gcp.function.context.type': 'string',\n  'gcp.project.id': 'string',\n  'gen_ai.agent.name': 'string',\n  'gen_ai.context.utilization': 'double',\n  'gen_ai.context.window_size': 'integer',\n  'gen_ai.conversation.id': 'string',\n  'gen_ai.cost.cache_creation.input_tokens': 'double',\n  'gen_ai.cost.cache_read.input_tokens': 'double',\n  'gen_ai.cost.input_tokens': 'double',\n  'gen_ai.cost.output_tokens': 'double',\n  'gen_ai.cost.reasoning.output_tokens': 'double',\n  'gen_ai.cost.total_tokens': 'double',\n  'gen_ai.embeddings.input': 'string',\n  'gen_ai.function_id': 'string',\n  'gen_ai.input.messages': 'string',\n  'gen_ai.operation.name': 'string',\n  'gen_ai.operation.type': 'string',\n  'gen_ai.output.messages': 'string',\n  'gen_ai.pipeline.name': 'string',\n  'gen_ai.prompt': 'string',\n  'gen_ai.prompt.name': 'string',\n  'gen_ai.provider.name': 'string',\n  'gen_ai.request.available_tools': 'string',\n  'gen_ai.request.frequency_penalty': 'double',\n  'gen_ai.request.max_tokens': 'integer',\n  'gen_ai.request.messages': 'string',\n  'gen_ai.request.model': 'string',\n  'gen_ai.request.presence_penalty': 'double',\n  'gen_ai.request.reasoning_effort': 'string',\n  'gen_ai.request.seed': 'string',\n  'gen_ai.request.stop_sequences': 'string[]',\n  'gen_ai.request.temperature': 'double',\n  'gen_ai.request.top_k': 'integer',\n  'gen_ai.request.top_p': 'double',\n  'gen_ai.response.finish_reasons': 'string',\n  'gen_ai.response.id': 'string',\n  'gen_ai.response.model': 'string',\n  'gen_ai.response.streaming': 'boolean',\n  'gen_ai.response.text': 'string',\n  'gen_ai.response.time_to_first_chunk': 'double',\n  'gen_ai.response.time_to_first_token': 'double',\n  'gen_ai.response.tokens_per_second': 'double',\n  'gen_ai.response.tool_calls': 'string',\n  'gen_ai.system': 'string',\n  'gen_ai.system_instructions': 'string',\n  'gen_ai.system.message': 'string',\n  'gen_ai.tool.call.arguments': 'string',\n  'gen_ai.tool.call.result': 'string',\n  'gen_ai.tool.definitions': 'string',\n  'gen_ai.tool.description': 'string',\n  'gen_ai.tool.input': 'string',\n  'gen_ai.tool.message': 'string',\n  'gen_ai.tool.name': 'string',\n  'gen_ai.tool.output': 'string',\n  'gen_ai.tool.type': 'string',\n  'gen_ai.usage.cache_creation.input_tokens': 'integer',\n  'gen_ai.usage.cache_read.input_tokens': 'integer',\n  'gen_ai.usage.completion_tokens': 'integer',\n  'gen_ai.usage.input_tokens': 'integer',\n  'gen_ai.usage.input_tokens.cached': 'integer',\n  'gen_ai.usage.input_tokens.cache_write': 'integer',\n  'gen_ai.usage.output_tokens': 'integer',\n  'gen_ai.usage.output_tokens.reasoning': 'integer',\n  'gen_ai.usage.prompt_tokens': 'integer',\n  'gen_ai.usage.reasoning.output_tokens': 'integer',\n  'gen_ai.usage.total_tokens': 'integer',\n  'graphql.document': 'string',\n  'graphql.operation.name': 'string',\n  'graphql.operation.type': 'string',\n  hardwareConcurrency: 'string',\n  'http.client_ip': 'string',\n  'http.decoded_response_content_length': 'integer',\n  'http.flavor': 'string',\n  'http.fragment': 'string',\n  'http.host': 'string',\n  'http.method': 'string',\n  'http.query': 'string',\n  'http.request.body.data': 'string',\n  'http.request.connection_end': 'double',\n  'http.request.connect_start': 'double',\n  'http.request.domain_lookup_end': 'double',\n  'http.request.domain_lookup_start': 'double',\n  'http.request.fetch_start': 'double',\n  'http.request.header.<key>': 'string[]',\n  'http.request.method': 'string',\n  'http.request_method': 'string',\n  'http.request.redirect_end': 'double',\n  'http.request.redirect_start': 'double',\n  'http.request.request_start': 'double',\n  'http.request.resend_count': 'integer',\n  'http.request.response_end': 'double',\n  'http.request.response_start': 'double',\n  'http.request.same_origin': 'boolean',\n  'http.request.secure_connection_start': 'double',\n  'http.request.time_to_first_byte': 'double',\n  'http.request.worker_start': 'double',\n  'http.response.body.size': 'integer',\n  'http.response_content_length': 'integer',\n  'http.response.header.content-length': 'string',\n  'http.response.header.<key>': 'string[]',\n  'http.response.size': 'integer',\n  'http.response.status_code': 'integer',\n  'http.response_transfer_size': 'integer',\n  'http.route': 'string',\n  'http.scheme': 'string',\n  'http.server_name': 'string',\n  'http.server.request.time_in_queue': 'double',\n  'http.status_code': 'integer',\n  'http.target': 'string',\n  'http.url': 'string',\n  'http.user_agent': 'string',\n  id: 'string',\n  inp: 'double',\n  'jsonrpc.protocol.version': 'string',\n  'jsonrpc.request.id': 'string',\n  'jvm.gc.action': 'string',\n  'jvm.gc.name': 'string',\n  'jvm.memory.pool.name': 'string',\n  'jvm.memory.type': 'string',\n  'jvm.thread.daemon': 'boolean',\n  'jvm.thread.state': 'string',\n  'koa.name': 'string',\n  'koa.type': 'string',\n  lcp: 'double',\n  'lcp.element': 'string',\n  'lcp.id': 'string',\n  'lcp.loadTime': 'integer',\n  'lcp.renderTime': 'integer',\n  'lcp.size': 'integer',\n  'lcp.url': 'string',\n  'logger.name': 'string',\n  'mcp.cancelled.reason': 'string',\n  'mcp.cancelled.request_id': 'string',\n  'mcp.client.name': 'string',\n  'mcp.client.title': 'string',\n  'mcp.client.version': 'string',\n  'mcp.lifecycle.phase': 'string',\n  'mcp.logging.data_type': 'string',\n  'mcp.logging.level': 'string',\n  'mcp.logging.logger': 'string',\n  'mcp.logging.message': 'string',\n  'mcp.method.name': 'string',\n  'mcp.progress.current': 'integer',\n  'mcp.progress.message': 'string',\n  'mcp.progress.percentage': 'double',\n  'mcp.progress.token': 'string',\n  'mcp.progress.total': 'integer',\n  'mcp.prompt.name': 'string',\n  'mcp.prompt.result.description': 'string',\n  'mcp.prompt.result.message_content': 'string',\n  'mcp.prompt.result.message_count': 'integer',\n  'mcp.prompt.result.message_role': 'string',\n  'mcp.protocol.ready': 'integer',\n  'mcp.protocol.version': 'string',\n  'mcp.request.argument.<key>': 'string',\n  'mcp.request.argument.name': 'string',\n  'mcp.request.argument.uri': 'string',\n  'mcp.request.id': 'string',\n  'mcp.resource.protocol': 'string',\n  'mcp.resource.uri': 'string',\n  'mcp.server.name': 'string',\n  'mcp.server.title': 'string',\n  'mcp.server.version': 'string',\n  'mcp.session.id': 'string',\n  'mcp.tool.name': 'string',\n  'mcp.tool.result.content': 'string',\n  'mcp.tool.result.content_count': 'integer',\n  'mcp.tool.result.is_error': 'boolean',\n  'mcp.transport': 'string',\n  'mdc.<key>': 'string',\n  'messaging.batch.message_count': 'integer',\n  'messaging.destination': 'string',\n  'messaging.destination.connection': 'string',\n  'messaging.destination.name': 'string',\n  'messaging.message.body.size': 'integer',\n  'messaging.message.conversation_id': 'string',\n  'messaging.message.envelope.size': 'integer',\n  'messaging.message.id': 'string',\n  'messaging.message.receive.latency': 'integer',\n  'messaging.message.retry.count': 'integer',\n  'messaging.operation.name': 'string',\n  'messaging.operation.type': 'string',\n  'messaging.rabbitmq.destination.routing_key': 'string',\n  'messaging.system': 'string',\n  method: 'string',\n  'middleware.name': 'string',\n  'navigation.origin': 'string',\n  'navigation.route.id': 'string',\n  'navigation.type': 'string',\n  'nel.elapsed_time': 'integer',\n  'nel.phase': 'string',\n  'nel.referrer': 'string',\n  'nel.sampling_function': 'double',\n  'nel.type': 'string',\n  'network.connection.effective_type': 'string',\n  'network.connection.rtt': 'integer',\n  'network.connection.type': 'string',\n  'network.local.address': 'string',\n  'network.local.port': 'integer',\n  'network.peer.address': 'string',\n  'network.peer.port': 'integer',\n  'network.protocol.name': 'string',\n  'network.protocol.version': 'string',\n  'network.transport': 'string',\n  'network.type': 'string',\n  'net.host.ip': 'string',\n  'net.host.name': 'string',\n  'net.host.port': 'integer',\n  'net.peer.ip': 'string',\n  'net.peer.name': 'string',\n  'net.peer.port': 'integer',\n  'net.protocol.name': 'string',\n  'net.protocol.version': 'string',\n  'net.sock.family': 'string',\n  'net.sock.host.addr': 'string',\n  'net.sock.host.port': 'integer',\n  'net.sock.peer.addr': 'string',\n  'net.sock.peer.name': 'string',\n  'net.sock.peer.port': 'integer',\n  'net.transport': 'string',\n  'os.build': 'string',\n  'os.build_id': 'string',\n  'os.description': 'string',\n  'os.kernel_version': 'string',\n  'os.name': 'string',\n  'os.raw_description': 'string',\n  'os.rooted': 'boolean',\n  'os.theme': 'string',\n  'os.type': 'string',\n  'os.version': 'string',\n  'otel.kind': 'string',\n  'otel.scope.name': 'string',\n  'otel.scope.version': 'string',\n  'otel.status_code': 'string',\n  'otel.status_description': 'string',\n  'params.<key>': 'string',\n  'performance.activationStart': 'double',\n  'performance.timeOrigin': 'double',\n  previous_route: 'string',\n  'process.command_args': 'string[]',\n  'process.executable.name': 'string',\n  'process.pid': 'integer',\n  'process.runtime.description': 'string',\n  'process.runtime.engine.name': 'string',\n  'process.runtime.engine.version': 'string',\n  'process.runtime.name': 'string',\n  'process.runtime.version': 'string',\n  'query.<key>': 'string',\n  'react.version': 'string',\n  release: 'string',\n  'remix.action_form_data.<key>': 'string',\n  replay_id: 'string',\n  'resource.deployment.environment': 'string',\n  'resource.deployment.environment.name': 'string',\n  'resource.render_blocking_status': 'string',\n  route: 'string',\n  'rpc.grpc.status_code': 'integer',\n  'rpc.method': 'string',\n  'rpc.response.status_code': 'string',\n  'rpc.service': 'string',\n  'rpc.system': 'string',\n  'rpc.system.name': 'string',\n  'runtime.build': 'string',\n  'runtime.name': 'string',\n  'runtime.raw_description': 'string',\n  'runtime.version': 'string',\n  'score.<key>': 'double',\n  'score.ratio.<key>': 'double',\n  'score.total': 'double',\n  'score.weight.<key>': 'double',\n  'sentry.action': 'string',\n  'sentry.browser.name': 'string',\n  'sentry.browser.version': 'string',\n  'sentry.cancellation_reason': 'string',\n  'sentry.category': 'string',\n  'sentry.client_sample_rate': 'double',\n  'sentry.description': 'string',\n  'sentry.dist': 'string',\n  'sentry.domain': 'string',\n  'sentry.dsc.environment': 'string',\n  'sentry.dsc.project_id': 'string',\n  'sentry.dsc.public_key': 'string',\n  'sentry.dsc.release': 'string',\n  'sentry.dsc.sampled': 'boolean',\n  'sentry.dsc.sample_rate': 'string',\n  'sentry.dsc.trace_id': 'string',\n  'sentry.dsc.transaction': 'string',\n  'sentry.environment': 'string',\n  'sentry.exclusive_time': 'double',\n  'sentry.graphql.operation': 'string',\n  'sentry.group': 'string',\n  'sentry.http.prefetch': 'boolean',\n  'sentry.idle_span_finish_reason': 'string',\n  'sentry.is_remote': 'boolean',\n  'sentry.kind': 'string',\n  'sentry.main_thread': 'boolean',\n  'sentry.message.parameter.<key>': 'string',\n  'sentry.message.template': 'string',\n  'sentry.metric.source': 'string',\n  'sentry.mobile': 'boolean',\n  'sentry.module.<key>': 'string',\n  'sentry.nextjs.ssr.function.route': 'string',\n  'sentry.nextjs.ssr.function.type': 'string',\n  'sentry.normalized_db_query': 'string',\n  'sentry.normalized_db_query.hash': 'string',\n  'sentry.normalized_description': 'string',\n  'sentry.observed_timestamp_nanos': 'string',\n  'sentry.op': 'string',\n  'sentry.origin': 'string',\n  'sentry.platform': 'string',\n  'sentry.profiler_id': 'string',\n  'sentry.profile_id': 'string',\n  'sentry.release': 'string',\n  'sentry.replay_id': 'string',\n  'sentry.replay_is_buffering': 'boolean',\n  'sentry.report_event': 'string',\n  'sentry.sdk.integrations': 'string[]',\n  'sentry.sdk.name': 'string',\n  'sentry.sdk.version': 'string',\n  'sentry.segment.id': 'string',\n  'sentry.segment_id': 'string',\n  'sentry.segment.name': 'string',\n  'sentry.server_sample_rate': 'double',\n  'sentry.source': 'string',\n  'sentry.span.source': 'string',\n  'sentry.status': 'string',\n  'sentry.status_code': 'integer',\n  'sentry.status.message': 'string',\n  'sentry.sveltekit.navigation.from': 'string',\n  'sentry.sveltekit.navigation.to': 'string',\n  'sentry.sveltekit.navigation.type': 'string',\n  'sentry.thread.id': 'integer',\n  'sentry.timestamp.sequence': 'integer',\n  'sentry.trace_lifecycle': 'string',\n  'sentry.trace.parent_span_id': 'string',\n  'sentry.trace.status': 'string',\n  'sentry.transaction': 'string',\n  'sentry.user.email': 'string',\n  'sentry.user.geo.city': 'string',\n  'sentry.user.geo.country_code': 'string',\n  'sentry.user.geo.region': 'string',\n  'sentry.user.geo.subdivision': 'string',\n  'sentry.user.id': 'string',\n  'sentry.user.ip': 'string',\n  'sentry.user.username': 'string',\n  'server.address': 'string',\n  server_name: 'string',\n  'server.port': 'integer',\n  'service.name': 'string',\n  'service.version': 'string',\n  'session.id': 'string',\n  stall_percentage: 'double',\n  stall_total_time: 'double',\n  'state.type': 'string',\n  'thread.id': 'integer',\n  'thread.name': 'string',\n  'timber.tag': 'string',\n  time_to_full_display: 'double',\n  time_to_initial_display: 'double',\n  transaction: 'string',\n  'trpc.procedure_path': 'string',\n  'trpc.procedure_type': 'string',\n  ttfb: 'double',\n  'ttfb.requestTime': 'double',\n  type: 'string',\n  'ui.component_name': 'string',\n  'ui.contributes_to_ttfd': 'boolean',\n  'ui.contributes_to_ttid': 'boolean',\n  'ui.element.height': 'integer',\n  'ui.element.id': 'string',\n  'ui.element.identifier': 'string',\n  'ui.element.load_time': 'double',\n  'ui.element.paint_type': 'string',\n  'ui.element.render_time': 'double',\n  'ui.element.type': 'string',\n  'ui.element.url': 'string',\n  'ui.element.width': 'integer',\n  url: 'string',\n  'url.domain': 'string',\n  'url.fragment': 'string',\n  'url.full': 'string',\n  'url.path': 'string',\n  'url.path.parameter.<key>': 'string',\n  'url.port': 'integer',\n  'url.query': 'string',\n  'url.same_origin': 'boolean',\n  'url.scheme': 'string',\n  'url.template': 'string',\n  'user_agent.original': 'string',\n  'user.email': 'string',\n  'user.full_name': 'string',\n  'user.geo.city': 'string',\n  'user.geo.country_code': 'string',\n  'user.geo.region': 'string',\n  'user.geo.subdivision': 'string',\n  'user.hash': 'string',\n  'user.id': 'string',\n  'user.ip_address': 'string',\n  'user.name': 'string',\n  'user.roles': 'string[]',\n  'vercel.branch': 'string',\n  'vercel.build_id': 'string',\n  'vercel.deployment_id': 'string',\n  'vercel.destination': 'string',\n  'vercel.edge_type': 'string',\n  'vercel.entrypoint': 'string',\n  'vercel.execution_region': 'string',\n  'vercel.id': 'string',\n  'vercel.ja3_digest': 'string',\n  'vercel.ja4_digest': 'string',\n  'vercel.log_type': 'string',\n  'vercel.path': 'string',\n  'vercel.project_id': 'string',\n  'vercel.project_name': 'string',\n  'vercel.proxy.cache_id': 'string',\n  'vercel.proxy.client_ip': 'string',\n  'vercel.proxy.host': 'string',\n  'vercel.proxy.lambda_region': 'string',\n  'vercel.proxy.method': 'string',\n  'vercel.proxy.path': 'string',\n  'vercel.proxy.path_type': 'string',\n  'vercel.proxy.path_type_variant': 'string',\n  'vercel.proxy.referer': 'string',\n  'vercel.proxy.region': 'string',\n  'vercel.proxy.response_byte_size': 'integer',\n  'vercel.proxy.scheme': 'string',\n  'vercel.proxy.status_code': 'integer',\n  'vercel.proxy.timestamp': 'integer',\n  'vercel.proxy.user_agent': 'string[]',\n  'vercel.proxy.vercel_cache': 'string',\n  'vercel.proxy.vercel_id': 'string',\n  'vercel.proxy.waf_action': 'string',\n  'vercel.proxy.waf_rule_id': 'string',\n  'vercel.request_id': 'string',\n  'vercel.source': 'string',\n  'vercel.status_code': 'integer',\n};\n\nexport type AttributeName =\n  | typeof AI_CITATIONS\n  | typeof AI_COMPLETION_TOKENS_USED\n  | typeof AI_DOCUMENTS\n  | typeof AI_FINISH_REASON\n  | typeof AI_FREQUENCY_PENALTY\n  | typeof AI_FUNCTION_CALL\n  | typeof AI_GENERATION_ID\n  | typeof AI_INPUT_MESSAGES\n  | typeof AI_IS_SEARCH_REQUIRED\n  | typeof AI_METADATA\n  | typeof AI_MODEL_ID\n  | typeof AI_MODEL_PROVIDER\n  | typeof AI_PIPELINE_NAME\n  | typeof AI_PREAMBLE\n  | typeof AI_PRESENCE_PENALTY\n  | typeof AI_PROMPT_TOKENS_USED\n  | typeof AI_RAW_PROMPTING\n  | typeof AI_RESPONSES\n  | typeof AI_RESPONSE_FORMAT\n  | typeof AI_SEARCH_QUERIES\n  | typeof AI_SEARCH_RESULTS\n  | typeof AI_SEED\n  | typeof AI_STREAMING\n  | typeof AI_TAGS\n  | typeof AI_TEMPERATURE\n  | typeof AI_TEXTS\n  | typeof AI_TOOLS\n  | typeof AI_TOOL_CALLS\n  | typeof AI_TOP_K\n  | typeof AI_TOP_P\n  | typeof AI_TOTAL_COST\n  | typeof AI_TOTAL_TOKENS_USED\n  | typeof AI_WARNINGS\n  | typeof ANGULAR_VERSION\n  | typeof APP_APP_BUILD\n  | typeof APP_APP_IDENTIFIER\n  | typeof APP_APP_NAME\n  | typeof APP_APP_START_TIME\n  | typeof APP_APP_VERSION\n  | typeof APP_BUILD\n  | typeof APP_IDENTIFIER\n  | typeof APP_IN_FOREGROUND\n  | typeof APP_NAME\n  | typeof APP_START_COLD\n  | typeof APP_START_TIME\n  | typeof APP_START_TYPE\n  | typeof APP_START_WARM\n  | typeof APP_VERSION\n  | typeof APP_VITALS_FRAMES_DELAY_VALUE\n  | typeof APP_VITALS_FRAMES_FROZEN_COUNT\n  | typeof APP_VITALS_FRAMES_SLOW_COUNT\n  | typeof APP_VITALS_FRAMES_TOTAL_COUNT\n  | typeof APP_VITALS_START_COLD_VALUE\n  | typeof APP_VITALS_START_PREWARMED\n  | typeof APP_VITALS_START_REASON\n  | typeof APP_VITALS_START_SCREEN\n  | typeof APP_VITALS_START_TYPE\n  | typeof APP_VITALS_START_WARM_VALUE\n  | typeof APP_VITALS_TTFD_VALUE\n  | typeof APP_VITALS_TTID_VALUE\n  | typeof ART_GC_BLOCKING_COUNT\n  | typeof ART_GC_BLOCKING_TIME\n  | typeof ART_GC_PRE_OOME_COUNT\n  | typeof ART_GC_TOTAL_COUNT\n  | typeof ART_GC_TOTAL_TIME\n  | typeof ART_GC_WAITING_TIME\n  | typeof ART_MEMORY_FREE\n  | typeof ART_MEMORY_FREE_UNTIL_GC\n  | typeof ART_MEMORY_FREE_UNTIL_OOME\n  | typeof ART_MEMORY_MAX\n  | typeof ART_MEMORY_TOTAL\n  | typeof AWS_CLOUDWATCH_LOGS_LOG_GROUP\n  | typeof AWS_CLOUDWATCH_LOGS_LOG_STREAM\n  | typeof AWS_CLOUDWATCH_LOGS_URL\n  | typeof AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS\n  | typeof AWS_DYNAMODB_CONSISTENT_READ\n  | typeof AWS_DYNAMODB_CONSUMED_CAPACITY\n  | typeof AWS_DYNAMODB_COUNT\n  | typeof AWS_DYNAMODB_EXCLUSIVE_START_TABLE\n  | typeof AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES\n  | typeof AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES\n  | typeof AWS_DYNAMODB_INDEX_NAME\n  | typeof AWS_DYNAMODB_ITEM_COLLECTION_METRICS\n  | typeof AWS_DYNAMODB_LIMIT\n  | typeof AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES\n  | typeof AWS_DYNAMODB_PROJECTION\n  | typeof AWS_DYNAMODB_PROVISIONED_READ_CAPACITY\n  | typeof AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY\n  | typeof AWS_DYNAMODB_SCANNED_COUNT\n  | typeof AWS_DYNAMODB_SCAN_FORWARD\n  | typeof AWS_DYNAMODB_SEGMENT\n  | typeof AWS_DYNAMODB_SELECT\n  | typeof AWS_DYNAMODB_TABLE_COUNT\n  | typeof AWS_DYNAMODB_TABLE_NAMES\n  | typeof AWS_DYNAMODB_TOTAL_SEGMENTS\n  | typeof AWS_EXTENDED_REQUEST_ID\n  | typeof AWS_KINESIS_STREAM_NAME\n  | typeof _AWS_KINESIS_STREAM_NAME\n  | typeof AWS_LAMBDA_AWS_REQUEST_ID\n  | typeof AWS_LAMBDA_EXECUTION_DURATION_IN_MILLIS\n  | typeof AWS_LAMBDA_FUNCTION_NAME\n  | typeof AWS_LAMBDA_FUNCTION_VERSION\n  | typeof AWS_LAMBDA_INVOKED_ARN\n  | typeof AWS_LAMBDA_INVOKED_FUNCTION_ARN\n  | typeof AWS_LAMBDA_REMAINING_TIME_IN_MILLIS\n  | typeof AWS_LOG_GROUP_NAMES\n  | typeof AWS_LOG_STREAM_NAMES\n  | typeof AWS_REQUEST_EXTENDED_ID\n  | typeof AWS_REQUEST_ID\n  | typeof _AWS_REQUEST_ID\n  | typeof AWS_S3_BUCKET\n  | typeof AWS_SECRETSMANAGER_SECRET_ARN\n  | typeof AWS_SNS_TOPIC_ARN\n  | typeof AWS_STEP_FUNCTIONS_ACTIVITY_ARN\n  | typeof AWS_STEP_FUNCTIONS_STATE_MACHINE_ARN\n  | typeof BLOCKED_MAIN_THREAD\n  | typeof BROWSER_NAME\n  | typeof BROWSER_PERFORMANCE_NAVIGATION_ACTIVATION_START\n  | typeof BROWSER_PERFORMANCE_TIME_ORIGIN\n  | typeof BROWSER_REPORT_TYPE\n  | typeof BROWSER_SCRIPT_INVOKER\n  | typeof BROWSER_SCRIPT_INVOKER_TYPE\n  | typeof BROWSER_SCRIPT_SOURCE_CHAR_POSITION\n  | typeof BROWSER_VERSION\n  | typeof BROWSER_WEB_VITAL_CLS_REPORT_EVENT\n  | typeof BROWSER_WEB_VITAL_CLS_SOURCE_KEY\n  | typeof BROWSER_WEB_VITAL_CLS_VALUE\n  | typeof BROWSER_WEB_VITAL_FCP_VALUE\n  | typeof BROWSER_WEB_VITAL_FP_VALUE\n  | typeof BROWSER_WEB_VITAL_INP_VALUE\n  | typeof BROWSER_WEB_VITAL_LCP_ELEMENT\n  | typeof BROWSER_WEB_VITAL_LCP_ID\n  | typeof BROWSER_WEB_VITAL_LCP_LOAD_TIME\n  | typeof BROWSER_WEB_VITAL_LCP_RENDER_TIME\n  | typeof BROWSER_WEB_VITAL_LCP_REPORT_EVENT\n  | typeof BROWSER_WEB_VITAL_LCP_SIZE\n  | typeof BROWSER_WEB_VITAL_LCP_URL\n  | typeof BROWSER_WEB_VITAL_LCP_VALUE\n  | typeof BROWSER_WEB_VITAL_TTFB_REQUEST_TIME\n  | typeof BROWSER_WEB_VITAL_TTFB_VALUE\n  | typeof CACHE_HIT\n  | typeof CACHE_ITEM_SIZE\n  | typeof CACHE_KEY\n  | typeof CACHE_OPERATION\n  | typeof CACHE_TTL\n  | typeof CACHE_WRITE\n  | typeof CHANNEL\n  | typeof CLIENT_ADDRESS\n  | typeof CLIENT_PORT\n  | typeof CLOUDFLARE_D1_DURATION\n  | typeof CLOUDFLARE_D1_QUERY_TYPE\n  | typeof CLOUDFLARE_D1_ROWS_READ\n  | typeof CLOUDFLARE_D1_ROWS_WRITTEN\n  | typeof CLOUDFLARE_DURABLE_OBJECT_QUERY_BINDINGS\n  | typeof CLOUDFLARE_DURABLE_OBJECT_RESPONSE_ROWS_READ\n  | typeof CLOUDFLARE_DURABLE_OBJECT_RESPONSE_ROWS_WRITTEN\n  | typeof CLOUDFLARE_R2_BUCKET\n  | typeof CLOUDFLARE_R2_OPERATION\n  | typeof CLOUDFLARE_R2_REQUEST_DELIMITER\n  | typeof CLOUDFLARE_R2_REQUEST_KEY\n  | typeof CLOUDFLARE_R2_REQUEST_PART_NUMBER\n  | typeof CLOUDFLARE_R2_REQUEST_PREFIX\n  | typeof CLOUDFLARE_WORKFLOW_ATTEMPT\n  | typeof CLOUDFLARE_WORKFLOW_RETRIES_BACKOFF\n  | typeof CLOUDFLARE_WORKFLOW_RETRIES_DELAY\n  | typeof CLOUDFLARE_WORKFLOW_RETRIES_LIMIT\n  | typeof CLOUDFLARE_WORKFLOW_TIMEOUT\n  | typeof CLOUD_ACCOUNT_ID\n  | typeof CLOUD_AVAILABILITY_ZONE\n  | typeof CLOUD_PLATFORM\n  | typeof CLOUD_PROVIDER\n  | typeof CLOUD_REGION\n  | typeof CLOUD_RESOURCE_ID\n  | typeof CLS\n  | typeof CLS_SOURCE_KEY\n  | typeof CODE_FILEPATH\n  | typeof CODE_FILE_PATH\n  | typeof CODE_FUNCTION\n  | typeof CODE_FUNCTION_NAME\n  | typeof CODE_LINENO\n  | typeof CODE_LINE_NUMBER\n  | typeof CODE_NAMESPACE\n  | typeof CONNECTIONTYPE\n  | typeof CONNECTION_RTT\n  | typeof CULTURE_CALENDAR\n  | typeof CULTURE_DISPLAY_NAME\n  | typeof CULTURE_IS_24_HOUR_FORMAT\n  | typeof CULTURE_LOCALE\n  | typeof CULTURE_TIMEZONE\n  | typeof DB_COLLECTION_NAME\n  | typeof DB_DRIVER_NAME\n  | typeof DB_NAME\n  | typeof DB_NAMESPACE\n  | typeof DB_OPERATION\n  | typeof DB_OPERATION_BATCH_SIZE\n  | typeof DB_OPERATION_NAME\n  | typeof DB_QUERY_PARAMETER_KEY\n  | typeof DB_QUERY_SUMMARY\n  | typeof DB_QUERY_TEXT\n  | typeof DB_REDIS_CONNECTION\n  | typeof DB_REDIS_KEY\n  | typeof DB_REDIS_PARAMETERS\n  | typeof DB_RESPONSE_STATUS_CODE\n  | typeof DB_SQL_BINDINGS\n  | typeof DB_STATEMENT\n  | typeof DB_STORED_PROCEDURE_NAME\n  | typeof DB_SYSTEM\n  | typeof DB_SYSTEM_NAME\n  | typeof DB_USER\n  | typeof DEVICEMEMORY\n  | typeof DEVICE_ARCHS\n  | typeof DEVICE_BATTERY_LEVEL\n  | typeof DEVICE_BATTERY_TEMPERATURE\n  | typeof DEVICE_BOOT_TIME\n  | typeof DEVICE_BRAND\n  | typeof DEVICE_CHARGING\n  | typeof DEVICE_CHIPSET\n  | typeof DEVICE_CLASS\n  | typeof DEVICE_CONNECTION_TYPE\n  | typeof DEVICE_CPU_DESCRIPTION\n  | typeof DEVICE_EXTERNAL_FREE_STORAGE\n  | typeof DEVICE_EXTERNAL_STORAGE_SIZE\n  | typeof DEVICE_FAMILY\n  | typeof DEVICE_FREE_MEMORY\n  | typeof DEVICE_FREE_STORAGE\n  | typeof DEVICE_ID\n  | typeof DEVICE_LOCALE\n  | typeof DEVICE_LOW_MEMORY\n  | typeof DEVICE_LOW_POWER_MODE\n  | typeof DEVICE_MANUFACTURER\n  | typeof DEVICE_MEMORY_ESTIMATED_CAPACITY\n  | typeof DEVICE_MEMORY_SIZE\n  | typeof DEVICE_MODEL\n  | typeof DEVICE_MODEL_ID\n  | typeof DEVICE_NAME\n  | typeof DEVICE_ONLINE\n  | typeof DEVICE_ORIENTATION\n  | typeof DEVICE_PROCESSOR_COUNT\n  | typeof DEVICE_PROCESSOR_FREQUENCY\n  | typeof DEVICE_SCREEN_DENSITY\n  | typeof DEVICE_SCREEN_DPI\n  | typeof DEVICE_SCREEN_HEIGHT_PIXELS\n  | typeof DEVICE_SCREEN_WIDTH_PIXELS\n  | typeof DEVICE_SIMULATOR\n  | typeof DEVICE_STORAGE_SIZE\n  | typeof DEVICE_THERMAL_STATE\n  | typeof DEVICE_TIMEZONE\n  | typeof DEVICE_USABLE_MEMORY\n  | typeof DIST\n  | typeof EFFECTIVECONNECTIONTYPE\n  | typeof ENVIRONMENT\n  | typeof ERROR_TYPE\n  | typeof EVENT_ID\n  | typeof EVENT_NAME\n  | typeof EXCEPTION_ESCAPED\n  | typeof EXCEPTION_MESSAGE\n  | typeof EXCEPTION_STACKTRACE\n  | typeof EXCEPTION_TYPE\n  | typeof FAAS_COLDSTART\n  | typeof FAAS_CRON\n  | typeof FAAS_DURATION_IN_MS\n  | typeof FAAS_ENTRY_POINT\n  | typeof FAAS_EXECUTION\n  | typeof FAAS_ID\n  | typeof FAAS_IDENTITY\n  | typeof FAAS_INVOCATION_ID\n  | typeof FAAS_INVOKED_NAME\n  | typeof FAAS_INVOKED_PROVIDER\n  | typeof FAAS_INVOKED_REGION\n  | typeof FAAS_NAME\n  | typeof FAAS_TIME\n  | typeof FAAS_TRIGGER\n  | typeof FAAS_VERSION\n  | typeof FCP\n  | typeof FLAG_EVALUATION_KEY\n  | typeof FP\n  | typeof FRAMES_DELAY\n  | typeof FRAMES_FROZEN\n  | typeof FRAMES_FROZEN_RATE\n  | typeof FRAMES_SLOW\n  | typeof FRAMES_SLOW_RATE\n  | typeof FRAMES_TOTAL\n  | typeof FS_ERROR\n  | typeof GCP_FUNCTION_CONTEXT_EVENT_ID\n  | typeof GCP_FUNCTION_CONTEXT_EVENT_TYPE\n  | typeof GCP_FUNCTION_CONTEXT_ID\n  | typeof GCP_FUNCTION_CONTEXT_RESOURCE\n  | typeof GCP_FUNCTION_CONTEXT_SOURCE\n  | typeof GCP_FUNCTION_CONTEXT_SPECVERSION\n  | typeof GCP_FUNCTION_CONTEXT_TIME\n  | typeof GCP_FUNCTION_CONTEXT_TIMESTAMP\n  | typeof GCP_FUNCTION_CONTEXT_TYPE\n  | typeof GCP_PROJECT_ID\n  | typeof GEN_AI_AGENT_NAME\n  | typeof GEN_AI_CONTEXT_UTILIZATION\n  | typeof GEN_AI_CONTEXT_WINDOW_SIZE\n  | typeof GEN_AI_CONVERSATION_ID\n  | typeof GEN_AI_COST_CACHE_CREATION_INPUT_TOKENS\n  | typeof GEN_AI_COST_CACHE_READ_INPUT_TOKENS\n  | typeof GEN_AI_COST_INPUT_TOKENS\n  | typeof GEN_AI_COST_OUTPUT_TOKENS\n  | typeof GEN_AI_COST_REASONING_OUTPUT_TOKENS\n  | typeof GEN_AI_COST_TOTAL_TOKENS\n  | typeof GEN_AI_EMBEDDINGS_INPUT\n  | typeof GEN_AI_FUNCTION_ID\n  | typeof GEN_AI_INPUT_MESSAGES\n  | typeof GEN_AI_OPERATION_NAME\n  | typeof GEN_AI_OPERATION_TYPE\n  | typeof GEN_AI_OUTPUT_MESSAGES\n  | typeof GEN_AI_PIPELINE_NAME\n  | typeof GEN_AI_PROMPT\n  | typeof GEN_AI_PROMPT_NAME\n  | typeof GEN_AI_PROVIDER_NAME\n  | typeof GEN_AI_REQUEST_AVAILABLE_TOOLS\n  | typeof GEN_AI_REQUEST_FREQUENCY_PENALTY\n  | typeof GEN_AI_REQUEST_MAX_TOKENS\n  | typeof GEN_AI_REQUEST_MESSAGES\n  | typeof GEN_AI_REQUEST_MODEL\n  | typeof GEN_AI_REQUEST_PRESENCE_PENALTY\n  | typeof GEN_AI_REQUEST_REASONING_EFFORT\n  | typeof GEN_AI_REQUEST_SEED\n  | typeof GEN_AI_REQUEST_STOP_SEQUENCES\n  | typeof GEN_AI_REQUEST_TEMPERATURE\n  | typeof GEN_AI_REQUEST_TOP_K\n  | typeof GEN_AI_REQUEST_TOP_P\n  | typeof GEN_AI_RESPONSE_FINISH_REASONS\n  | typeof GEN_AI_RESPONSE_ID\n  | typeof GEN_AI_RESPONSE_MODEL\n  | typeof GEN_AI_RESPONSE_STREAMING\n  | typeof GEN_AI_RESPONSE_TEXT\n  | typeof GEN_AI_RESPONSE_TIME_TO_FIRST_CHUNK\n  | typeof GEN_AI_RESPONSE_TIME_TO_FIRST_TOKEN\n  | typeof GEN_AI_RESPONSE_TOKENS_PER_SECOND\n  | typeof GEN_AI_RESPONSE_TOOL_CALLS\n  | typeof GEN_AI_SYSTEM\n  | typeof GEN_AI_SYSTEM_INSTRUCTIONS\n  | typeof GEN_AI_SYSTEM_MESSAGE\n  | typeof GEN_AI_TOOL_CALL_ARGUMENTS\n  | typeof GEN_AI_TOOL_CALL_RESULT\n  | typeof GEN_AI_TOOL_DEFINITIONS\n  | typeof GEN_AI_TOOL_DESCRIPTION\n  | typeof GEN_AI_TOOL_INPUT\n  | typeof GEN_AI_TOOL_MESSAGE\n  | typeof GEN_AI_TOOL_NAME\n  | typeof GEN_AI_TOOL_OUTPUT\n  | typeof GEN_AI_TOOL_TYPE\n  | typeof GEN_AI_USAGE_CACHE_CREATION_INPUT_TOKENS\n  | typeof GEN_AI_USAGE_CACHE_READ_INPUT_TOKENS\n  | typeof GEN_AI_USAGE_COMPLETION_TOKENS\n  | typeof GEN_AI_USAGE_INPUT_TOKENS\n  | typeof GEN_AI_USAGE_INPUT_TOKENS_CACHED\n  | typeof GEN_AI_USAGE_INPUT_TOKENS_CACHE_WRITE\n  | typeof GEN_AI_USAGE_OUTPUT_TOKENS\n  | typeof GEN_AI_USAGE_OUTPUT_TOKENS_REASONING\n  | typeof GEN_AI_USAGE_PROMPT_TOKENS\n  | typeof GEN_AI_USAGE_REASONING_OUTPUT_TOKENS\n  | typeof GEN_AI_USAGE_TOTAL_TOKENS\n  | typeof GRAPHQL_DOCUMENT\n  | typeof GRAPHQL_OPERATION_NAME\n  | typeof GRAPHQL_OPERATION_TYPE\n  | typeof HARDWARECONCURRENCY\n  | typeof HTTP_CLIENT_IP\n  | typeof HTTP_DECODED_RESPONSE_CONTENT_LENGTH\n  | typeof HTTP_FLAVOR\n  | typeof HTTP_FRAGMENT\n  | typeof HTTP_HOST\n  | typeof HTTP_METHOD\n  | typeof HTTP_QUERY\n  | typeof HTTP_REQUEST_BODY_DATA\n  | typeof HTTP_REQUEST_CONNECTION_END\n  | typeof HTTP_REQUEST_CONNECT_START\n  | typeof HTTP_REQUEST_DOMAIN_LOOKUP_END\n  | typeof HTTP_REQUEST_DOMAIN_LOOKUP_START\n  | typeof HTTP_REQUEST_FETCH_START\n  | typeof HTTP_REQUEST_HEADER_KEY\n  | typeof HTTP_REQUEST_METHOD\n  | typeof _HTTP_REQUEST_METHOD\n  | typeof HTTP_REQUEST_REDIRECT_END\n  | typeof HTTP_REQUEST_REDIRECT_START\n  | typeof HTTP_REQUEST_REQUEST_START\n  | typeof HTTP_REQUEST_RESEND_COUNT\n  | typeof HTTP_REQUEST_RESPONSE_END\n  | typeof HTTP_REQUEST_RESPONSE_START\n  | typeof HTTP_REQUEST_SAME_ORIGIN\n  | typeof HTTP_REQUEST_SECURE_CONNECTION_START\n  | typeof HTTP_REQUEST_TIME_TO_FIRST_BYTE\n  | typeof HTTP_REQUEST_WORKER_START\n  | typeof HTTP_RESPONSE_BODY_SIZE\n  | typeof HTTP_RESPONSE_CONTENT_LENGTH\n  | typeof HTTP_RESPONSE_HEADER_CONTENT_LENGTH\n  | typeof HTTP_RESPONSE_HEADER_KEY\n  | typeof HTTP_RESPONSE_SIZE\n  | typeof HTTP_RESPONSE_STATUS_CODE\n  | typeof HTTP_RESPONSE_TRANSFER_SIZE\n  | typeof HTTP_ROUTE\n  | typeof HTTP_SCHEME\n  | typeof HTTP_SERVER_NAME\n  | typeof HTTP_SERVER_REQUEST_TIME_IN_QUEUE\n  | typeof HTTP_STATUS_CODE\n  | typeof HTTP_TARGET\n  | typeof HTTP_URL\n  | typeof HTTP_USER_AGENT\n  | typeof ID\n  | typeof INP\n  | typeof JSONRPC_PROTOCOL_VERSION\n  | typeof JSONRPC_REQUEST_ID\n  | typeof JVM_GC_ACTION\n  | typeof JVM_GC_NAME\n  | typeof JVM_MEMORY_POOL_NAME\n  | typeof JVM_MEMORY_TYPE\n  | typeof JVM_THREAD_DAEMON\n  | typeof JVM_THREAD_STATE\n  | typeof KOA_NAME\n  | typeof KOA_TYPE\n  | typeof LCP\n  | typeof LCP_ELEMENT\n  | typeof LCP_ID\n  | typeof LCP_LOADTIME\n  | typeof LCP_RENDERTIME\n  | typeof LCP_SIZE\n  | typeof LCP_URL\n  | typeof LOGGER_NAME\n  | typeof MCP_CANCELLED_REASON\n  | typeof MCP_CANCELLED_REQUEST_ID\n  | typeof MCP_CLIENT_NAME\n  | typeof MCP_CLIENT_TITLE\n  | typeof MCP_CLIENT_VERSION\n  | typeof MCP_LIFECYCLE_PHASE\n  | typeof MCP_LOGGING_DATA_TYPE\n  | typeof MCP_LOGGING_LEVEL\n  | typeof MCP_LOGGING_LOGGER\n  | typeof MCP_LOGGING_MESSAGE\n  | typeof MCP_METHOD_NAME\n  | typeof MCP_PROGRESS_CURRENT\n  | typeof MCP_PROGRESS_MESSAGE\n  | typeof MCP_PROGRESS_PERCENTAGE\n  | typeof MCP_PROGRESS_TOKEN\n  | typeof MCP_PROGRESS_TOTAL\n  | typeof MCP_PROMPT_NAME\n  | typeof MCP_PROMPT_RESULT_DESCRIPTION\n  | typeof MCP_PROMPT_RESULT_MESSAGE_CONTENT\n  | typeof MCP_PROMPT_RESULT_MESSAGE_COUNT\n  | typeof MCP_PROMPT_RESULT_MESSAGE_ROLE\n  | typeof MCP_PROTOCOL_READY\n  | typeof MCP_PROTOCOL_VERSION\n  | typeof MCP_REQUEST_ARGUMENT_KEY\n  | typeof MCP_REQUEST_ARGUMENT_NAME\n  | typeof MCP_REQUEST_ARGUMENT_URI\n  | typeof MCP_REQUEST_ID\n  | typeof MCP_RESOURCE_PROTOCOL\n  | typeof MCP_RESOURCE_URI\n  | typeof MCP_SERVER_NAME\n  | typeof MCP_SERVER_TITLE\n  | typeof MCP_SERVER_VERSION\n  | typeof MCP_SESSION_ID\n  | typeof MCP_TOOL_NAME\n  | typeof MCP_TOOL_RESULT_CONTENT\n  | typeof MCP_TOOL_RESULT_CONTENT_COUNT\n  | typeof MCP_TOOL_RESULT_IS_ERROR\n  | typeof MCP_TRANSPORT\n  | typeof MDC_KEY\n  | typeof MESSAGING_BATCH_MESSAGE_COUNT\n  | typeof MESSAGING_DESTINATION\n  | typeof MESSAGING_DESTINATION_CONNECTION\n  | typeof MESSAGING_DESTINATION_NAME\n  | typeof MESSAGING_MESSAGE_BODY_SIZE\n  | typeof MESSAGING_MESSAGE_CONVERSATION_ID\n  | typeof MESSAGING_MESSAGE_ENVELOPE_SIZE\n  | typeof MESSAGING_MESSAGE_ID\n  | typeof MESSAGING_MESSAGE_RECEIVE_LATENCY\n  | typeof MESSAGING_MESSAGE_RETRY_COUNT\n  | typeof MESSAGING_OPERATION_NAME\n  | typeof MESSAGING_OPERATION_TYPE\n  | typeof MESSAGING_RABBITMQ_DESTINATION_ROUTING_KEY\n  | typeof MESSAGING_SYSTEM\n  | typeof METHOD\n  | typeof MIDDLEWARE_NAME\n  | typeof NAVIGATION_ORIGIN\n  | typeof NAVIGATION_ROUTE_ID\n  | typeof NAVIGATION_TYPE\n  | typeof NEL_ELAPSED_TIME\n  | typeof NEL_PHASE\n  | typeof NEL_REFERRER\n  | typeof NEL_SAMPLING_FUNCTION\n  | typeof NEL_TYPE\n  | typeof NETWORK_CONNECTION_EFFECTIVE_TYPE\n  | typeof NETWORK_CONNECTION_RTT\n  | typeof NETWORK_CONNECTION_TYPE\n  | typeof NETWORK_LOCAL_ADDRESS\n  | typeof NETWORK_LOCAL_PORT\n  | typeof NETWORK_PEER_ADDRESS\n  | typeof NETWORK_PEER_PORT\n  | typeof NETWORK_PROTOCOL_NAME\n  | typeof NETWORK_PROTOCOL_VERSION\n  | typeof NETWORK_TRANSPORT\n  | typeof NETWORK_TYPE\n  | typeof NET_HOST_IP\n  | typeof NET_HOST_NAME\n  | typeof NET_HOST_PORT\n  | typeof NET_PEER_IP\n  | typeof NET_PEER_NAME\n  | typeof NET_PEER_PORT\n  | typeof NET_PROTOCOL_NAME\n  | typeof NET_PROTOCOL_VERSION\n  | typeof NET_SOCK_FAMILY\n  | typeof NET_SOCK_HOST_ADDR\n  | typeof NET_SOCK_HOST_PORT\n  | typeof NET_SOCK_PEER_ADDR\n  | typeof NET_SOCK_PEER_NAME\n  | typeof NET_SOCK_PEER_PORT\n  | typeof NET_TRANSPORT\n  | typeof OS_BUILD\n  | typeof OS_BUILD_ID\n  | typeof OS_DESCRIPTION\n  | typeof OS_KERNEL_VERSION\n  | typeof OS_NAME\n  | typeof OS_RAW_DESCRIPTION\n  | typeof OS_ROOTED\n  | typeof OS_THEME\n  | typeof OS_TYPE\n  | typeof OS_VERSION\n  | typeof OTEL_KIND\n  | typeof OTEL_SCOPE_NAME\n  | typeof OTEL_SCOPE_VERSION\n  | typeof OTEL_STATUS_CODE\n  | typeof OTEL_STATUS_DESCRIPTION\n  | typeof PARAMS_KEY\n  | typeof PERFORMANCE_ACTIVATIONSTART\n  | typeof PERFORMANCE_TIMEORIGIN\n  | typeof PREVIOUS_ROUTE\n  | typeof PROCESS_COMMAND_ARGS\n  | typeof PROCESS_EXECUTABLE_NAME\n  | typeof PROCESS_PID\n  | typeof PROCESS_RUNTIME_DESCRIPTION\n  | typeof PROCESS_RUNTIME_ENGINE_NAME\n  | typeof PROCESS_RUNTIME_ENGINE_VERSION\n  | typeof PROCESS_RUNTIME_NAME\n  | typeof PROCESS_RUNTIME_VERSION\n  | typeof QUERY_KEY\n  | typeof REACT_VERSION\n  | typeof RELEASE\n  | typeof REMIX_ACTION_FORM_DATA_KEY\n  | typeof REPLAY_ID\n  | typeof RESOURCE_DEPLOYMENT_ENVIRONMENT\n  | typeof RESOURCE_DEPLOYMENT_ENVIRONMENT_NAME\n  | typeof RESOURCE_RENDER_BLOCKING_STATUS\n  | typeof ROUTE\n  | typeof RPC_GRPC_STATUS_CODE\n  | typeof RPC_METHOD\n  | typeof RPC_RESPONSE_STATUS_CODE\n  | typeof RPC_SERVICE\n  | typeof RPC_SYSTEM\n  | typeof RPC_SYSTEM_NAME\n  | typeof RUNTIME_BUILD\n  | typeof RUNTIME_NAME\n  | typeof RUNTIME_RAW_DESCRIPTION\n  | typeof RUNTIME_VERSION\n  | typeof SCORE_KEY\n  | typeof SCORE_RATIO_KEY\n  | typeof SCORE_TOTAL\n  | typeof SCORE_WEIGHT_KEY\n  | typeof SENTRY_ACTION\n  | typeof SENTRY_BROWSER_NAME\n  | typeof SENTRY_BROWSER_VERSION\n  | typeof SENTRY_CANCELLATION_REASON\n  | typeof SENTRY_CATEGORY\n  | typeof SENTRY_CLIENT_SAMPLE_RATE\n  | typeof SENTRY_DESCRIPTION\n  | typeof SENTRY_DIST\n  | typeof SENTRY_DOMAIN\n  | typeof SENTRY_DSC_ENVIRONMENT\n  | typeof SENTRY_DSC_PROJECT_ID\n  | typeof SENTRY_DSC_PUBLIC_KEY\n  | typeof SENTRY_DSC_RELEASE\n  | typeof SENTRY_DSC_SAMPLED\n  | typeof SENTRY_DSC_SAMPLE_RATE\n  | typeof SENTRY_DSC_TRACE_ID\n  | typeof SENTRY_DSC_TRANSACTION\n  | typeof SENTRY_ENVIRONMENT\n  | typeof SENTRY_EXCLUSIVE_TIME\n  | typeof SENTRY_GRAPHQL_OPERATION\n  | typeof SENTRY_GROUP\n  | typeof SENTRY_HTTP_PREFETCH\n  | typeof SENTRY_IDLE_SPAN_FINISH_REASON\n  | typeof SENTRY_IS_REMOTE\n  | typeof SENTRY_KIND\n  | typeof SENTRY_MAIN_THREAD\n  | typeof SENTRY_MESSAGE_PARAMETER_KEY\n  | typeof SENTRY_MESSAGE_TEMPLATE\n  | typeof SENTRY_METRIC_SOURCE\n  | typeof SENTRY_MOBILE\n  | typeof SENTRY_MODULE_KEY\n  | typeof SENTRY_NEXTJS_SSR_FUNCTION_ROUTE\n  | typeof SENTRY_NEXTJS_SSR_FUNCTION_TYPE\n  | typeof SENTRY_NORMALIZED_DB_QUERY\n  | typeof SENTRY_NORMALIZED_DB_QUERY_HASH\n  | typeof SENTRY_NORMALIZED_DESCRIPTION\n  | typeof SENTRY_OBSERVED_TIMESTAMP_NANOS\n  | typeof SENTRY_OP\n  | typeof SENTRY_ORIGIN\n  | typeof SENTRY_PLATFORM\n  | typeof SENTRY_PROFILER_ID\n  | typeof SENTRY_PROFILE_ID\n  | typeof SENTRY_RELEASE\n  | typeof SENTRY_REPLAY_ID\n  | typeof SENTRY_REPLAY_IS_BUFFERING\n  | typeof SENTRY_REPORT_EVENT\n  | typeof SENTRY_SDK_INTEGRATIONS\n  | typeof SENTRY_SDK_NAME\n  | typeof SENTRY_SDK_VERSION\n  | typeof SENTRY_SEGMENT_ID\n  | typeof _SENTRY_SEGMENT_ID\n  | typeof SENTRY_SEGMENT_NAME\n  | typeof SENTRY_SERVER_SAMPLE_RATE\n  | typeof SENTRY_SOURCE\n  | typeof SENTRY_SPAN_SOURCE\n  | typeof SENTRY_STATUS\n  | typeof SENTRY_STATUS_CODE\n  | typeof SENTRY_STATUS_MESSAGE\n  | typeof SENTRY_SVELTEKIT_NAVIGATION_FROM\n  | typeof SENTRY_SVELTEKIT_NAVIGATION_TO\n  | typeof SENTRY_SVELTEKIT_NAVIGATION_TYPE\n  | typeof SENTRY_THREAD_ID\n  | typeof SENTRY_TIMESTAMP_SEQUENCE\n  | typeof SENTRY_TRACE_LIFECYCLE\n  | typeof SENTRY_TRACE_PARENT_SPAN_ID\n  | typeof SENTRY_TRACE_STATUS\n  | typeof SENTRY_TRANSACTION\n  | typeof SENTRY_USER_EMAIL\n  | typeof SENTRY_USER_GEO_CITY\n  | typeof SENTRY_USER_GEO_COUNTRY_CODE\n  | typeof SENTRY_USER_GEO_REGION\n  | typeof SENTRY_USER_GEO_SUBDIVISION\n  | typeof SENTRY_USER_ID\n  | typeof SENTRY_USER_IP\n  | typeof SENTRY_USER_USERNAME\n  | typeof SERVER_ADDRESS\n  | typeof SERVER_NAME\n  | typeof SERVER_PORT\n  | typeof SERVICE_NAME\n  | typeof SERVICE_VERSION\n  | typeof SESSION_ID\n  | typeof STALL_PERCENTAGE\n  | typeof STALL_TOTAL_TIME\n  | typeof STATE_TYPE\n  | typeof THREAD_ID\n  | typeof THREAD_NAME\n  | typeof TIMBER_TAG\n  | typeof TIME_TO_FULL_DISPLAY\n  | typeof TIME_TO_INITIAL_DISPLAY\n  | typeof TRANSACTION\n  | typeof TRPC_PROCEDURE_PATH\n  | typeof TRPC_PROCEDURE_TYPE\n  | typeof TTFB\n  | typeof TTFB_REQUESTTIME\n  | typeof TYPE\n  | typeof UI_COMPONENT_NAME\n  | typeof UI_CONTRIBUTES_TO_TTFD\n  | typeof UI_CONTRIBUTES_TO_TTID\n  | typeof UI_ELEMENT_HEIGHT\n  | typeof UI_ELEMENT_ID\n  | typeof UI_ELEMENT_IDENTIFIER\n  | typeof UI_ELEMENT_LOAD_TIME\n  | typeof UI_ELEMENT_PAINT_TYPE\n  | typeof UI_ELEMENT_RENDER_TIME\n  | typeof UI_ELEMENT_TYPE\n  | typeof UI_ELEMENT_URL\n  | typeof UI_ELEMENT_WIDTH\n  | typeof URL\n  | typeof URL_DOMAIN\n  | typeof URL_FRAGMENT\n  | typeof URL_FULL\n  | typeof URL_PATH\n  | typeof URL_PATH_PARAMETER_KEY\n  | typeof URL_PORT\n  | typeof URL_QUERY\n  | typeof URL_SAME_ORIGIN\n  | typeof URL_SCHEME\n  | typeof URL_TEMPLATE\n  | typeof USER_AGENT_ORIGINAL\n  | typeof USER_EMAIL\n  | typeof USER_FULL_NAME\n  | typeof USER_GEO_CITY\n  | typeof USER_GEO_COUNTRY_CODE\n  | typeof USER_GEO_REGION\n  | typeof USER_GEO_SUBDIVISION\n  | typeof USER_HASH\n  | typeof USER_ID\n  | typeof USER_IP_ADDRESS\n  | typeof USER_NAME\n  | typeof USER_ROLES\n  | typeof VERCEL_BRANCH\n  | typeof VERCEL_BUILD_ID\n  | typeof VERCEL_DEPLOYMENT_ID\n  | typeof VERCEL_DESTINATION\n  | typeof VERCEL_EDGE_TYPE\n  | typeof VERCEL_ENTRYPOINT\n  | typeof VERCEL_EXECUTION_REGION\n  | typeof VERCEL_ID\n  | typeof VERCEL_JA3_DIGEST\n  | typeof VERCEL_JA4_DIGEST\n  | typeof VERCEL_LOG_TYPE\n  | typeof VERCEL_PATH\n  | typeof VERCEL_PROJECT_ID\n  | typeof VERCEL_PROJECT_NAME\n  | typeof VERCEL_PROXY_CACHE_ID\n  | typeof VERCEL_PROXY_CLIENT_IP\n  | typeof VERCEL_PROXY_HOST\n  | typeof VERCEL_PROXY_LAMBDA_REGION\n  | typeof VERCEL_PROXY_METHOD\n  | typeof VERCEL_PROXY_PATH\n  | typeof VERCEL_PROXY_PATH_TYPE\n  | typeof VERCEL_PROXY_PATH_TYPE_VARIANT\n  | typeof VERCEL_PROXY_REFERER\n  | typeof VERCEL_PROXY_REGION\n  | typeof VERCEL_PROXY_RESPONSE_BYTE_SIZE\n  | typeof VERCEL_PROXY_SCHEME\n  | typeof VERCEL_PROXY_STATUS_CODE\n  | typeof VERCEL_PROXY_TIMESTAMP\n  | typeof VERCEL_PROXY_USER_AGENT\n  | typeof VERCEL_PROXY_VERCEL_CACHE\n  | typeof VERCEL_PROXY_VERCEL_ID\n  | typeof VERCEL_PROXY_WAF_ACTION\n  | typeof VERCEL_PROXY_WAF_RULE_ID\n  | typeof VERCEL_REQUEST_ID\n  | typeof VERCEL_SOURCE\n  | typeof VERCEL_STATUS_CODE;\n\nexport const ATTRIBUTE_METADATA: Record<AttributeName, AttributeMetadata> = {\n  'ai.citations': {\n    brief: 'References or sources cited by the AI model in its response.',\n    type: 'string[]',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: ['Citation 1', 'Citation 2'],\n    deprecation: {},\n    changelog: [\n      { version: '0.5.0', prs: [264] },\n      { version: '0.1.0', prs: [55] },\n    ],\n  },\n  'ai.completion_tokens.used': {\n    brief: 'The number of tokens used to respond to the message.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 10,\n    deprecation: {\n      replacement: 'gen_ai.usage.output_tokens',\n    },\n    aliases: ['gen_ai.usage.output_tokens', 'gen_ai.usage.completion_tokens'],\n    changelog: [{ version: '0.4.0', prs: [228] }, { version: '0.1.0', prs: [57, 61] }, { version: '0.0.0' }],\n  },\n  'ai.documents': {\n    brief: 'Documents or content chunks used as context for the AI model.',\n    type: 'string[]',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: ['document1.txt', 'document2.pdf'],\n    deprecation: {},\n    changelog: [\n      { version: '0.5.0', prs: [264] },\n      { version: '0.1.0', prs: [55] },\n    ],\n  },\n  'ai.finish_reason': {\n    brief: 'The reason why the model stopped generating.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'COMPLETE',\n    deprecation: {\n      replacement: 'gen_ai.response.finish_reasons',\n    },\n    aliases: ['gen_ai.response.finish_reasons'],\n    changelog: [{ version: '0.1.0', prs: [55, 57, 61, 108, 127] }],\n  },\n  'ai.frequency_penalty': {\n    brief:\n      'Used to reduce repetitiveness of generated tokens. The higher the value, the stronger a penalty is applied to previously present tokens, proportional to how many times they have already appeared in the prompt or prior generation.',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 0.5,\n    deprecation: {\n      replacement: 'gen_ai.request.frequency_penalty',\n    },\n    aliases: ['gen_ai.request.frequency_penalty'],\n    changelog: [\n      { version: '0.4.0', prs: [228] },\n      { version: '0.1.0', prs: [55, 57, 61, 108] },\n    ],\n  },\n  'ai.function_call': {\n    brief:\n      'For an AI model call, the function that was called. This is deprecated for OpenAI, and replaced by tool_calls',\n    type: 'string',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'function_name',\n    deprecation: {\n      replacement: 'gen_ai.tool.name',\n    },\n    aliases: ['gen_ai.tool.name', 'mcp.tool.name'],\n    changelog: [{ version: '0.1.0', prs: [55, 57, 61, 108] }],\n  },\n  'ai.generation_id': {\n    brief: 'Unique identifier for the completion.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'gen_123abc',\n    deprecation: {\n      replacement: 'gen_ai.response.id',\n    },\n    aliases: ['gen_ai.response.id'],\n    changelog: [{ version: '0.1.0', prs: [55, 57, 61, 108, 127] }],\n  },\n  'ai.input_messages': {\n    brief: 'The input messages sent to the model',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '[{\"role\": \"user\", \"message\": \"hello\"}]',\n    deprecation: {\n      replacement: 'gen_ai.input.messages',\n    },\n    aliases: ['gen_ai.request.messages'],\n    changelog: [{ version: '0.1.0', prs: [65, 119] }, { version: '0.0.0' }],\n  },\n  'ai.is_search_required': {\n    brief: 'Boolean indicating if the model needs to perform a search.',\n    type: 'boolean',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: false,\n    deprecation: {},\n    changelog: [\n      { version: '0.5.0', prs: [264] },\n      { version: '0.1.0', prs: [55] },\n    ],\n  },\n  'ai.metadata': {\n    brief: 'Extra metadata passed to an AI pipeline step.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '{\"user_id\": 123, \"session_id\": \"abc123\"}',\n    deprecation: {},\n    changelog: [\n      { version: '0.5.0', prs: [264] },\n      { version: '0.1.0', prs: [55, 127] },\n    ],\n  },\n  'ai.model_id': {\n    brief: 'The vendor-specific ID of the model used.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'gpt-4',\n    deprecation: {\n      replacement: 'gen_ai.response.model',\n    },\n    aliases: ['gen_ai.response.model'],\n    changelog: [{ version: '0.1.0', prs: [57, 61, 127] }, { version: '0.0.0' }],\n  },\n  'ai.model.provider': {\n    brief: 'The provider of the model.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'openai',\n    deprecation: {\n      replacement: 'gen_ai.provider.name',\n    },\n    aliases: ['gen_ai.provider.name', 'gen_ai.system'],\n    changelog: [\n      { version: '0.4.0', prs: [253] },\n      { version: '0.1.0', prs: [57, 61, 108, 127] },\n    ],\n  },\n  'ai.pipeline.name': {\n    brief: 'The name of the AI pipeline.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'Autofix Pipeline',\n    deprecation: {\n      replacement: 'gen_ai.pipeline.name',\n    },\n    aliases: ['gen_ai.pipeline.name'],\n    changelog: [{ version: '0.1.0', prs: [53, 76, 108, 127] }],\n  },\n  'ai.preamble': {\n    brief:\n      \"For an AI model call, the preamble parameter. Preambles are a part of the prompt used to adjust the model's overall behavior and conversation style.\",\n    type: 'string',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'You are now a clown.',\n    deprecation: {\n      replacement: 'gen_ai.system_instructions',\n    },\n    aliases: ['gen_ai.system_instructions'],\n    changelog: [\n      { version: '0.5.0', prs: [264] },\n      { version: '0.1.0', prs: [55] },\n    ],\n  },\n  'ai.presence_penalty': {\n    brief:\n      'Used to reduce repetitiveness of generated tokens. Similar to frequency_penalty, except that this penalty is applied equally to all tokens that have already appeared, regardless of their exact frequencies.',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 0.5,\n    deprecation: {\n      replacement: 'gen_ai.request.presence_penalty',\n    },\n    aliases: ['gen_ai.request.presence_penalty'],\n    changelog: [\n      { version: '0.4.0', prs: [228] },\n      { version: '0.1.0', prs: [55, 57, 61, 108] },\n    ],\n  },\n  'ai.prompt_tokens.used': {\n    brief: 'The number of tokens used to process just the prompt.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 20,\n    deprecation: {\n      replacement: 'gen_ai.usage.input_tokens',\n    },\n    aliases: ['gen_ai.usage.prompt_tokens', 'gen_ai.usage.input_tokens'],\n    changelog: [{ version: '0.4.0', prs: [228] }, { version: '0.1.0', prs: [57, 61] }, { version: '0.0.0' }],\n  },\n  'ai.raw_prompting': {\n    brief: 'When enabled, the user’s prompt will be sent to the model without any pre-processing.',\n    type: 'boolean',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: true,\n    deprecation: {},\n    changelog: [\n      { version: '0.5.0', prs: [264] },\n      { version: '0.1.0', prs: [55] },\n    ],\n  },\n  'ai.responses': {\n    brief: 'The response messages sent back by the AI model.',\n    type: 'string[]',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: ['hello', 'world'],\n    deprecation: {\n      replacement: 'gen_ai.output.messages',\n    },\n    changelog: [{ version: '0.1.0', prs: [65, 127] }, { version: '0.0.0' }],\n  },\n  'ai.response_format': {\n    brief: 'For an AI model call, the format of the response',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'json_object',\n    deprecation: {},\n    changelog: [\n      { version: '0.5.0', prs: [264] },\n      { version: '0.1.0', prs: [55, 127] },\n    ],\n  },\n  'ai.search_queries': {\n    brief: 'Queries used to search for relevant context or documents.',\n    type: 'string[]',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: ['climate change effects', 'renewable energy'],\n    deprecation: {},\n    changelog: [\n      { version: '0.5.0', prs: [264] },\n      { version: '0.1.0', prs: [55] },\n    ],\n  },\n  'ai.search_results': {\n    brief: 'Results returned from search queries for context.',\n    type: 'string[]',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: ['search_result_1, search_result_2'],\n    deprecation: {},\n    changelog: [\n      { version: '0.5.0', prs: [264] },\n      { version: '0.1.0', prs: [55] },\n    ],\n  },\n  'ai.seed': {\n    brief: 'The seed, ideally models given the same seed and same other parameters will produce the exact same output.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '1234567890',\n    deprecation: {\n      replacement: 'gen_ai.request.seed',\n    },\n    aliases: ['gen_ai.request.seed'],\n    changelog: [{ version: '0.1.0', prs: [55, 57, 61, 108, 127] }],\n  },\n  'ai.streaming': {\n    brief: 'Whether the request was streamed back.',\n    type: 'boolean',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: true,\n    deprecation: {\n      replacement: 'gen_ai.response.streaming',\n    },\n    aliases: ['gen_ai.response.streaming'],\n    changelog: [{ version: '0.1.0', prs: [76, 108] }, { version: '0.0.0' }],\n  },\n  'ai.tags': {\n    brief: 'Tags that describe an AI pipeline step.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '{\"executed_function\": \"add_integers\"}',\n    deprecation: {},\n    changelog: [\n      { version: '0.5.0', prs: [264] },\n      { version: '0.1.0', prs: [55, 127] },\n    ],\n  },\n  'ai.temperature': {\n    brief:\n      'For an AI model call, the temperature parameter. Temperature essentially means how random the output will be.',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 0.1,\n    deprecation: {\n      replacement: 'gen_ai.request.temperature',\n    },\n    aliases: ['gen_ai.request.temperature'],\n    changelog: [\n      { version: '0.4.0', prs: [228] },\n      { version: '0.1.0', prs: [55, 57, 61, 108] },\n    ],\n  },\n  'ai.texts': {\n    brief: 'Raw text inputs provided to the model.',\n    type: 'string[]',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: ['Hello, how are you?', 'What is the capital of France?'],\n    deprecation: {\n      replacement: 'gen_ai.input.messages',\n    },\n    aliases: ['gen_ai.input.messages'],\n    changelog: [\n      { version: '0.5.0', prs: [264] },\n      { version: '0.1.0', prs: [55] },\n    ],\n  },\n  'ai.tools': {\n    brief: 'For an AI model call, the functions that are available',\n    type: 'string[]',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: ['function_1', 'function_2'],\n    deprecation: {\n      replacement: 'gen_ai.tool.definitions',\n    },\n    changelog: [{ version: '0.1.0', prs: [55, 65, 127] }],\n  },\n  'ai.tool_calls': {\n    brief: 'For an AI model call, the tool calls that were made.',\n    type: 'string[]',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: ['tool_call_1', 'tool_call_2'],\n    deprecation: {\n      replacement: 'gen_ai.output.messages',\n    },\n    changelog: [{ version: '0.1.0', prs: [55, 65] }],\n  },\n  'ai.top_k': {\n    brief:\n      'Limits the model to only consider the K most likely next tokens, where K is an integer (e.g., top_k=20 means only the 20 highest probability tokens are considered).',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 35,\n    deprecation: {\n      replacement: 'gen_ai.request.top_k',\n    },\n    aliases: ['gen_ai.request.top_k'],\n    changelog: [\n      { version: '0.4.0', prs: [228] },\n      { version: '0.1.0', prs: [55, 57, 61, 108] },\n    ],\n  },\n  'ai.top_p': {\n    brief:\n      'Limits the model to only consider tokens whose cumulative probability mass adds up to p, where p is a float between 0 and 1 (e.g., top_p=0.7 means only tokens that sum up to 70% of the probability mass are considered).',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 0.7,\n    deprecation: {\n      replacement: 'gen_ai.request.top_p',\n    },\n    aliases: ['gen_ai.request.top_p'],\n    changelog: [\n      { version: '0.4.0', prs: [228] },\n      { version: '0.1.0', prs: [55, 57, 61, 108] },\n    ],\n  },\n  'ai.total_cost': {\n    brief: 'The total cost for the tokens used.',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 12.34,\n    deprecation: {\n      replacement: 'gen_ai.cost.total_tokens',\n    },\n    aliases: ['gen_ai.cost.total_tokens'],\n    changelog: [\n      { version: '0.5.0', prs: [264] },\n      { version: '0.4.0', prs: [228] },\n      { version: '0.1.0', prs: [53] },\n    ],\n  },\n  'ai.total_tokens.used': {\n    brief: 'The total number of tokens used to process the prompt.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 30,\n    deprecation: {\n      replacement: 'gen_ai.usage.total_tokens',\n    },\n    aliases: ['gen_ai.usage.total_tokens'],\n    changelog: [{ version: '0.4.0', prs: [228] }, { version: '0.1.0', prs: [57, 61, 108] }, { version: '0.0.0' }],\n  },\n  'ai.warnings': {\n    brief: 'Warning messages generated during model execution.',\n    type: 'string[]',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: ['Token limit exceeded'],\n    deprecation: {},\n    changelog: [\n      { version: '0.5.0', prs: [264] },\n      { version: '0.1.0', prs: [55] },\n    ],\n  },\n  'angular.version': {\n    brief: 'The version of the Angular framework',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '17.1.0',\n    changelog: [{ version: '0.7.0', prs: [367], description: 'Added angular.version attribute' }],\n  },\n  'app.app_build': {\n    brief: 'Internal build identifier, as it appears on the platform.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '1',\n    deprecation: {\n      replacement: 'app.build',\n      reason: 'Deprecated in favor of app.build',\n    },\n    aliases: ['app.build'],\n    changelog: [\n      { version: '0.5.0', prs: [296], description: 'Added and deprecated app.app_build in favor of app.build' },\n    ],\n  },\n  'app.app_identifier': {\n    brief: 'Version-independent application identifier, often a dotted bundle ID.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'com.example.myapp',\n    deprecation: {\n      replacement: 'app.identifier',\n      reason: 'Deprecated in favor of app.identifier',\n    },\n    aliases: ['app.identifier'],\n    changelog: [\n      {\n        version: '0.5.0',\n        prs: [296],\n        description: 'Added and deprecated app.app_identifier in favor of app.identifier',\n      },\n    ],\n  },\n  'app.app_name': {\n    brief: 'Human readable application name, as it appears on the platform.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'My App',\n    deprecation: {\n      replacement: 'app.name',\n      reason: 'Deprecated in favor of app.name',\n    },\n    aliases: ['app.name'],\n    changelog: [\n      { version: '0.5.0', prs: [296], description: 'Added and deprecated app.app_name in favor of app.name' },\n    ],\n  },\n  'app.app_start_time': {\n    brief: 'Formatted UTC timestamp when the user started the application.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '2025-01-01T00:00:00.000Z',\n    deprecation: {\n      replacement: 'app.start_time',\n      reason: 'Deprecated in favor of app.start_time',\n    },\n    aliases: ['app.start_time'],\n    changelog: [\n      {\n        version: '0.5.0',\n        prs: [296],\n        description: 'Added and deprecated app.app_start_time in favor of app.start_time',\n      },\n    ],\n  },\n  'app.app_version': {\n    brief: 'Human readable application version, as it appears on the platform.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '1.0.0',\n    deprecation: {\n      replacement: 'app.version',\n      reason: 'Deprecated in favor of app.version',\n    },\n    aliases: ['app.version'],\n    changelog: [\n      { version: '0.5.0', prs: [296], description: 'Added and deprecated app.app_version in favor of app.version' },\n    ],\n  },\n  'app.build': {\n    brief: 'Internal build identifier, as it appears on the platform.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '1',\n    aliases: ['app.app_build'],\n    changelog: [{ version: '0.5.0', prs: [296], description: 'Added app.build attribute' }],\n  },\n  'app.identifier': {\n    brief: 'Version-independent application identifier, often a dotted bundle ID.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'com.example.myapp',\n    aliases: ['app.app_identifier'],\n    changelog: [{ version: '0.5.0', prs: [296], description: 'Added app.identifier attribute' }],\n  },\n  'app.in_foreground': {\n    brief: 'Whether the application is currently in the foreground.',\n    type: 'boolean',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: true,\n    changelog: [{ version: '0.5.0', prs: [296], description: 'Added app.in_foreground attribute' }],\n  },\n  'app.name': {\n    brief: 'Human readable application name, as it appears on the platform.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'My App',\n    aliases: ['app.app_name'],\n    changelog: [{ version: '0.5.0', prs: [296], description: 'Added app.name attribute' }],\n  },\n  app_start_cold: {\n    brief: 'The duration of a cold app start in milliseconds',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 1234.56,\n    deprecation: {\n      replacement: 'app.vitals.start.cold.value',\n      reason:\n        'Replaced by app.vitals.start.cold.value to align with the app.vitals.* namespace for mobile performance attributes',\n    },\n    aliases: ['app.vitals.start.cold.value'],\n    changelog: [\n      { version: '0.5.0', prs: [323], description: 'Added and deprecated in favor of app.vitals.start.cold.value' },\n    ],\n  },\n  'app.start_time': {\n    brief: 'Formatted UTC timestamp when the user started the application.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '2025-01-01T00:00:00.000Z',\n    aliases: ['app.app_start_time'],\n    changelog: [{ version: '0.5.0', prs: [296], description: 'Added app.start_time attribute' }],\n  },\n  app_start_type: {\n    brief: 'Mobile app start variant. Either cold or warm.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'cold',\n    deprecation: {\n      replacement: 'app.vitals.start.type',\n      reason:\n        'Replaced by app.vitals.start.type to align with the app.vitals.* namespace for mobile performance attributes',\n    },\n    aliases: ['app.vitals.start.type'],\n    changelog: [\n      { version: '0.5.0', prs: [313], description: 'Deprecated in favor of app.vitals.start.type' },\n      { version: '0.1.0', prs: [127] },\n      { version: '0.0.0' },\n    ],\n  },\n  app_start_warm: {\n    brief: 'The duration of a warm app start in milliseconds',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 1234.56,\n    deprecation: {\n      replacement: 'app.vitals.start.warm.value',\n      reason:\n        'Replaced by app.vitals.start.warm.value to align with the app.vitals.* namespace for mobile performance attributes',\n    },\n    aliases: ['app.vitals.start.warm.value'],\n    changelog: [\n      { version: '0.5.0', prs: [323], description: 'Added and deprecated in favor of app.vitals.start.warm.value' },\n    ],\n  },\n  'app.version': {\n    brief: 'Human readable application version, as it appears on the platform.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '1.0.0',\n    aliases: ['app.app_version'],\n    changelog: [{ version: '0.5.0', prs: [296], description: 'Added app.version attribute' }],\n  },\n  'app.vitals.frames.delay.value': {\n    brief:\n      'The sum of all delayed frame durations in seconds during the lifetime of the span. For more information see [frames delay](https://develop.sentry.dev/sdk/performance/frames-delay/).',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 5,\n    aliases: ['frames.delay'],\n    changelog: [\n      { version: '0.5.0', prs: [313], description: 'Added app.vitals.frames.delay.value to replace frames.delay' },\n    ],\n  },\n  'app.vitals.frames.frozen.count': {\n    brief: 'The number of frozen frames rendered during the lifetime of the span.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 3,\n    aliases: ['frames.frozen'],\n    changelog: [\n      { version: '0.5.0', prs: [313], description: 'Added app.vitals.frames.frozen.count to replace frames.frozen' },\n    ],\n  },\n  'app.vitals.frames.slow.count': {\n    brief: 'The number of slow frames rendered during the lifetime of the span.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 1,\n    aliases: ['frames.slow'],\n    changelog: [\n      { version: '0.5.0', prs: [313], description: 'Added app.vitals.frames.slow.count to replace frames.slow' },\n    ],\n  },\n  'app.vitals.frames.total.count': {\n    brief: 'The number of total frames rendered during the lifetime of the span.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 60,\n    aliases: ['frames.total'],\n    changelog: [\n      { version: '0.5.0', prs: [313], description: 'Added app.vitals.frames.total.count to replace frames.total' },\n    ],\n  },\n  'app.vitals.start.cold.value': {\n    brief: 'The duration of a cold app start in milliseconds',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 1234.56,\n    aliases: ['app_start_cold'],\n    changelog: [{ version: '0.5.0', prs: [313], description: 'Added app.vitals.start.cold.value attribute' }],\n  },\n  'app.vitals.start.prewarmed': {\n    brief: 'Whether the app start was prewarmed.',\n    type: 'boolean',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: true,\n    changelog: [{ version: '0.11.0', prs: [379], description: 'Added app.vitals.start.prewarmed attribute' }],\n  },\n  'app.vitals.start.reason': {\n    brief: 'The reason that triggered the app start.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'push',\n    changelog: [{ version: '0.7.0', prs: [353], description: 'Added app.vitals.start.reason attribute' }],\n  },\n  'app.vitals.start.screen': {\n    brief:\n      'The screen that is rendered when the app start is complete. This is the screen the user first sees and can interact with after launch. The absence of this attribute on the app start span indicates a background app start where no UI was rendered.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'MainActivity',\n    changelog: [{ version: '0.7.0', prs: [353], description: 'Added app.vitals.start.screen attribute' }],\n  },\n  'app.vitals.start.type': {\n    brief: 'The type of app start, for example `cold` or `warm`',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'cold',\n    aliases: ['app_start_type'],\n    changelog: [{ version: '0.5.0', prs: [313], description: 'Added app.vitals.start.type attribute' }],\n  },\n  'app.vitals.start.warm.value': {\n    brief: 'The duration of a warm app start in milliseconds',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 1234.56,\n    aliases: ['app_start_warm'],\n    changelog: [{ version: '0.5.0', prs: [313], description: 'Added app.vitals.start.warm.value attribute' }],\n  },\n  'app.vitals.ttfd.value': {\n    brief: 'The duration of time to full display in milliseconds',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 1234.56,\n    aliases: ['time_to_full_display'],\n    changelog: [{ version: '0.5.0', prs: [313], description: 'Added app.vitals.ttfd.value attribute' }],\n  },\n  'app.vitals.ttid.value': {\n    brief: 'The duration of time to initial display in milliseconds',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 1234.56,\n    aliases: ['time_to_initial_display'],\n    changelog: [{ version: '0.5.0', prs: [313], description: 'Added app.vitals.ttid.value attribute' }],\n  },\n  'art.gc.blocking_count': {\n    brief: 'Total number of blocking (stop-the-world) garbage collections performed by the Android Runtime',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 1,\n    changelog: [{ version: '0.11.0', prs: [382], description: 'Added art.gc.blocking_count attribute' }],\n  },\n  'art.gc.blocking_time': {\n    brief: 'Total time spent in blocking (stop-the-world) garbage collections by the Android Runtime, in milliseconds',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 11.873,\n    changelog: [{ version: '0.11.0', prs: [382], description: 'Added art.gc.blocking_time attribute' }],\n  },\n  'art.gc.pre_oome_count': {\n    brief:\n      'Total number of garbage collections triggered as a last resort before an OutOfMemoryError by the Android Runtime',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 0,\n    changelog: [{ version: '0.11.0', prs: [382], description: 'Added art.gc.pre_oome_count attribute' }],\n  },\n  'art.gc.total_count': {\n    brief: 'Total number of garbage collections performed by the Android Runtime',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 1,\n    changelog: [{ version: '0.11.0', prs: [382], description: 'Added art.gc.total_count attribute' }],\n  },\n  'art.gc.total_time': {\n    brief: 'Total time spent in garbage collection by the Android Runtime, in milliseconds',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 11.807,\n    changelog: [{ version: '0.11.0', prs: [382], description: 'Added art.gc.total_time attribute' }],\n  },\n  'art.gc.waiting_time': {\n    brief:\n      'Total time threads spent waiting for garbage collection to complete in the Android Runtime, in milliseconds',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 8.054,\n    changelog: [{ version: '0.11.0', prs: [382], description: 'Added art.gc.waiting_time attribute' }],\n  },\n  'art.memory.free': {\n    brief: 'Free memory available to the process as reported by the Android Runtime, in bytes',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 3181568,\n    changelog: [{ version: '0.11.0', prs: [382], description: 'Added art.memory.free attribute' }],\n  },\n  'art.memory.free_until_gc': {\n    brief: 'Free memory available before a garbage collection would be triggered by the Android Runtime, in bytes',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 3181568,\n    changelog: [{ version: '0.11.0', prs: [382], description: 'Added art.memory.free_until_gc attribute' }],\n  },\n  'art.memory.free_until_oome': {\n    brief: 'Free memory available before an OutOfMemoryError would be thrown by the Android Runtime, in bytes',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 196083712,\n    changelog: [{ version: '0.11.0', prs: [382], description: 'Added art.memory.free_until_oome attribute' }],\n  },\n  'art.memory.max': {\n    brief: 'Maximum memory the process is allowed to use as reported by the Android Runtime, in bytes',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 201326592,\n    changelog: [{ version: '0.11.0', prs: [382], description: 'Added art.memory.max attribute' }],\n  },\n  'art.memory.total': {\n    brief: 'Total memory currently allocated to the process by the Android Runtime, in bytes',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 7774208,\n    changelog: [{ version: '0.11.0', prs: [382], description: 'Added art.memory.total attribute' }],\n  },\n  'aws.cloudwatch.logs.log_group': {\n    brief: 'The name of the CloudWatch Logs log group',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '/aws/lambda/my-function',\n    changelog: [{ version: '0.7.0', prs: [369], description: 'Added aws.cloudwatch.logs.log_group attribute' }],\n  },\n  'aws.cloudwatch.logs.log_stream': {\n    brief: 'The name of the CloudWatch Logs log stream',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '2024/01/01/[$LATEST]abcdef1234567890',\n    changelog: [{ version: '0.7.0', prs: [369], description: 'Added aws.cloudwatch.logs.log_stream attribute' }],\n  },\n  'aws.cloudwatch.logs.url': {\n    brief: 'The URL to the CloudWatch Logs log group',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'https://console.aws.amazon.com/cloudwatch/home?region=us-east-1#logsV2:log-groups/log-group/my-log-group',\n    changelog: [{ version: '0.7.0', prs: [369], description: 'Added aws.cloudwatch.logs.url attribute' }],\n  },\n  'aws.dynamodb.attribute_definitions': {\n    brief: 'The JSON-serialized value of each item in the `AttributeDefinitions` request field.',\n    type: 'string[]',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: ['{ \"AttributeName\": \"string\", \"AttributeType\": \"string\" }'],\n    changelog: [{ version: '0.16.0', prs: [479], description: 'Added aws.dynamodb.attribute_definitions attribute' }],\n  },\n  'aws.dynamodb.consistent_read': {\n    brief: 'The value of the `ConsistentRead` request parameter.',\n    type: 'boolean',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: true,\n    changelog: [{ version: '0.16.0', prs: [479], description: 'Added aws.dynamodb.consistent_read attribute' }],\n  },\n  'aws.dynamodb.consumed_capacity': {\n    brief: 'The JSON-serialized value of each item in the `ConsumedCapacity` response field.',\n    type: 'string[]',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: [\n      '{ \"CapacityUnits\": number, \"GlobalSecondaryIndexes\": { \"string\" : { \"CapacityUnits\": number, \"ReadCapacityUnits\": number, \"WriteCapacityUnits\": number } }, \"LocalSecondaryIndexes\": { \"string\" : { \"CapacityUnits\": number, \"ReadCapacityUnits\": number, \"WriteCapacityUnits\": number } }, \"ReadCapacityUnits\": number, \"Table\": { \"CapacityUnits\": number, \"ReadCapacityUnits\": number, \"WriteCapacityUnits\": number }, \"TableName\": \"string\", \"WriteCapacityUnits\": number }',\n    ],\n    changelog: [{ version: '0.16.0', prs: [479], description: 'Added aws.dynamodb.consumed_capacity attribute' }],\n  },\n  'aws.dynamodb.count': {\n    brief: 'The value of the `Count` response parameter.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 10,\n    changelog: [{ version: '0.16.0', prs: [479], description: 'Added aws.dynamodb.count attribute' }],\n  },\n  'aws.dynamodb.exclusive_start_table': {\n    brief: 'The value of the `ExclusiveStartTableName` request parameter.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'Users',\n    changelog: [{ version: '0.16.0', prs: [479], description: 'Added aws.dynamodb.exclusive_start_table attribute' }],\n  },\n  'aws.dynamodb.global_secondary_indexes': {\n    brief: 'The JSON-serialized value of each item of the `GlobalSecondaryIndexes` request field.',\n    type: 'string[]',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: [\n      '{ \"IndexName\": \"string\", \"KeySchema\": [ { \"AttributeName\": \"string\", \"KeyType\": \"string\" } ], \"Projection\": { \"NonKeyAttributes\": [ \"string\" ], \"ProjectionType\": \"string\" }, \"ProvisionedThroughput\": { \"ReadCapacityUnits\": number, \"WriteCapacityUnits\": number } }',\n    ],\n    changelog: [\n      { version: '0.16.0', prs: [479], description: 'Added aws.dynamodb.global_secondary_indexes attribute' },\n    ],\n  },\n  'aws.dynamodb.global_secondary_index_updates': {\n    brief: 'The JSON-serialized value of each item in the `GlobalSecondaryIndexUpdates` request field.',\n    type: 'string[]',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: [\n      '{ \"Create\": { \"IndexName\": \"string\", \"KeySchema\": [ { \"AttributeName\": \"string\", \"KeyType\": \"string\" } ], \"Projection\": { \"NonKeyAttributes\": [ \"string\" ], \"ProjectionType\": \"string\" }, \"ProvisionedThroughput\": { \"ReadCapacityUnits\": number, \"WriteCapacityUnits\": number } }',\n    ],\n    changelog: [\n      { version: '0.16.0', prs: [479], description: 'Added aws.dynamodb.global_secondary_index_updates attribute' },\n    ],\n  },\n  'aws.dynamodb.index_name': {\n    brief: 'The value of the `IndexName` request parameter.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'name_to_group',\n    changelog: [{ version: '0.16.0', prs: [479], description: 'Added aws.dynamodb.index_name attribute' }],\n  },\n  'aws.dynamodb.item_collection_metrics': {\n    brief: 'The JSON-serialized value of the `ItemCollectionMetrics` response field.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example:\n      '{ \"string\" : [ { \"ItemCollectionKey\": { \"string\" : { \"B\": blob, \"BOOL\": boolean, \"BS\": [ blob ], \"L\": [ \"AttributeValue\" ], \"M\": { \"string\" : \"AttributeValue\" }, \"N\": \"string\", \"NS\": [ \"string\" ], \"NULL\": boolean, \"S\": \"string\", \"SS\": [ \"string\" ] } }, \"SizeEstimateRangeGB\": [ number ] } ] }',\n    changelog: [{ version: '0.16.0', prs: [479], description: 'Added aws.dynamodb.item_collection_metrics attribute' }],\n  },\n  'aws.dynamodb.limit': {\n    brief: 'The value of the `Limit` request parameter.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 10,\n    changelog: [{ version: '0.16.0', prs: [479], description: 'Added aws.dynamodb.limit attribute' }],\n  },\n  'aws.dynamodb.local_secondary_indexes': {\n    brief: 'The JSON-serialized value of each item of the `LocalSecondaryIndexes` request field.',\n    type: 'string[]',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: [\n      '{ \"IndexArn\": \"string\", \"IndexName\": \"string\", \"IndexSizeBytes\": number, \"ItemCount\": number, \"KeySchema\": [ { \"AttributeName\": \"string\", \"KeyType\": \"string\" } ], \"Projection\": { \"NonKeyAttributes\": [ \"string\" ], \"ProjectionType\": \"string\" } }',\n    ],\n    changelog: [{ version: '0.16.0', prs: [479], description: 'Added aws.dynamodb.local_secondary_indexes attribute' }],\n  },\n  'aws.dynamodb.projection': {\n    brief: 'The value of the `ProjectionExpression` request parameter.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'Title, Price, Color',\n    changelog: [{ version: '0.16.0', prs: [479], description: 'Added aws.dynamodb.projection attribute' }],\n  },\n  'aws.dynamodb.provisioned_read_capacity': {\n    brief: 'The value of the `ProvisionedThroughput.ReadCapacityUnits` request parameter.',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 1,\n    changelog: [\n      { version: '0.16.0', prs: [479], description: 'Added aws.dynamodb.provisioned_read_capacity attribute' },\n    ],\n  },\n  'aws.dynamodb.provisioned_write_capacity': {\n    brief: 'The value of the `ProvisionedThroughput.WriteCapacityUnits` request parameter.',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 2,\n    changelog: [\n      { version: '0.16.0', prs: [479], description: 'Added aws.dynamodb.provisioned_write_capacity attribute' },\n    ],\n  },\n  'aws.dynamodb.scanned_count': {\n    brief: 'The value of the `ScannedCount` response parameter.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 50,\n    changelog: [{ version: '0.16.0', prs: [479], description: 'Added aws.dynamodb.scanned_count attribute' }],\n  },\n  'aws.dynamodb.scan_forward': {\n    brief: 'The value of the `ScanIndexForward` request parameter.',\n    type: 'boolean',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: true,\n    changelog: [{ version: '0.16.0', prs: [479], description: 'Added aws.dynamodb.scan_forward attribute' }],\n  },\n  'aws.dynamodb.segment': {\n    brief: 'The value of the `Segment` request parameter.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 10,\n    changelog: [{ version: '0.16.0', prs: [479], description: 'Added aws.dynamodb.segment attribute' }],\n  },\n  'aws.dynamodb.select': {\n    brief: 'The value of the `Select` request parameter.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'ALL_ATTRIBUTES',\n    changelog: [{ version: '0.16.0', prs: [479], description: 'Added aws.dynamodb.select attribute' }],\n  },\n  'aws.dynamodb.table_count': {\n    brief: 'The number of items in the `TableNames` response parameter.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 20,\n    changelog: [{ version: '0.16.0', prs: [479], description: 'Added aws.dynamodb.table_count attribute' }],\n  },\n  'aws.dynamodb.table_names': {\n    brief: 'The keys in the `RequestItems` object field.',\n    type: 'string[]',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: ['Users', 'Cats'],\n    changelog: [{ version: '0.16.0', prs: [479], description: 'Added aws.dynamodb.table_names attribute' }],\n  },\n  'aws.dynamodb.total_segments': {\n    brief: 'The value of the `TotalSegments` request parameter.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 100,\n    changelog: [{ version: '0.16.0', prs: [479], description: 'Added aws.dynamodb.total_segments attribute' }],\n  },\n  'aws.extended_request_id': {\n    brief: 'The AWS extended request ID as returned in the response headers.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'wzHcyEWfmOGDIE5QOhTAqFDoDWP3y8IUvpNINCwL9N4TEHbUw0/gZJ+VZTmCNCWR7fezEN3eCiQ=',\n    aliases: ['aws.request.extended_id'],\n    changelog: [{ version: '0.16.0', prs: [480], description: 'Added aws.extended_request_id attribute' }],\n  },\n  'aws.kinesis.stream_name': {\n    brief: 'The name of the AWS Kinesis stream the request refers to.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'some-stream-name',\n    aliases: ['aws.kinesis.stream.name'],\n    changelog: [{ version: '0.16.0', prs: [480], description: 'Added aws.kinesis.stream_name attribute' }],\n  },\n  'aws.kinesis.stream.name': {\n    brief: 'The name of the AWS Kinesis stream the request refers to.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'some-stream-name',\n    deprecation: {\n      replacement: 'aws.kinesis.stream_name',\n      reason:\n        'This attribute is being deprecated in favor of aws.kinesis.stream_name, which is the OTel-aligned replacement.',\n    },\n    aliases: ['aws.kinesis.stream_name'],\n    changelog: [\n      {\n        version: '0.16.0',\n        prs: [480],\n        description: 'Added aws.kinesis.stream.name attribute, deprecated in favor of aws.kinesis.stream_name',\n      },\n    ],\n  },\n  'aws.lambda.aws_request_id': {\n    brief: 'The AWS request ID as received by the Lambda function runtime',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '8476a536-e9f4-11e8-9739-2dfe598c3fcd',\n    deprecation: {\n      replacement: 'faas.invocation_id',\n      reason: 'This attribute is being deprecated in favor of faas.invocation_id',\n    },\n    aliases: ['faas.invocation_id', 'faas.execution'],\n    changelog: [\n      { version: '0.16.0', prs: [473], description: 'Added faas.execution as an alias' },\n      {\n        version: '0.11.1',\n        prs: [414, 424],\n        description: 'Deprecated aws.lambda.aws_request_id in favor of faas.invocation_id',\n      },\n      { version: '0.7.0', prs: [369], description: 'Added aws.lambda.aws_request_id attribute' },\n    ],\n  },\n  'aws.lambda.execution_duration_in_millis': {\n    brief: 'The execution duration of the Lambda function invocation in milliseconds',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 1234.56,\n    changelog: [\n      { version: '0.7.0', prs: [369], description: 'Added aws.lambda.execution_duration_in_millis attribute' },\n    ],\n  },\n  'aws.lambda.function_name': {\n    brief: 'The name of the Lambda function',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'my-function',\n    deprecation: {\n      replacement: 'faas.name',\n      reason: 'Use the OTel-aligned faas.name attribute instead',\n    },\n    aliases: ['faas.name'],\n    changelog: [\n      { version: '0.11.1', prs: [414], description: 'Deprecated aws.lambda.function_name in favor of faas.name' },\n      { version: '0.7.0', prs: [369], description: 'Added aws.lambda.function_name attribute' },\n    ],\n  },\n  'aws.lambda.function_version': {\n    brief: 'The version of the Lambda function',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '$LATEST',\n    deprecation: {\n      replacement: 'faas.version',\n      reason: 'Use the OTel-aligned faas.version attribute instead',\n    },\n    aliases: ['faas.version'],\n    changelog: [\n      {\n        version: '0.11.1',\n        prs: [414, 424],\n        description: 'Deprecated aws.lambda.function_version in favor of faas.version',\n      },\n      { version: '0.7.0', prs: [369], description: 'Added aws.lambda.function_version attribute' },\n    ],\n  },\n  'aws.lambda.invoked_arn': {\n    brief: 'The full ARN of the Lambda function that was invoked',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'arn:aws:lambda:us-east-1:123456789012:function:my-function',\n    aliases: ['aws.lambda.invoked_function_arn'],\n    changelog: [{ version: '0.11.1', prs: [414] }],\n  },\n  'aws.lambda.invoked_function_arn': {\n    brief: 'The full ARN of the Lambda function that was invoked',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'arn:aws:lambda:us-east-1:123456789012:function:my-function',\n    deprecation: {\n      replacement: 'aws.lambda.invoked_arn',\n      reason: 'This attribute is being deprecated in favor of aws.lambda.invoked_arn',\n    },\n    aliases: ['aws.lambda.invoked_arn'],\n    changelog: [\n      {\n        version: '0.11.1',\n        prs: [414],\n        description: 'Deprecated aws.lambda.invoked_function_arn in favor of aws.lambda.invoked_arn',\n      },\n      { version: '0.7.0', prs: [369], description: 'Added aws.lambda.invoked_function_arn attribute' },\n    ],\n  },\n  'aws.lambda.remaining_time_in_millis': {\n    brief: 'The remaining time in milliseconds before the Lambda function times out',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 5000,\n    changelog: [{ version: '0.7.0', prs: [369], description: 'Added aws.lambda.remaining_time_in_millis attribute' }],\n  },\n  'aws.log.group.names': {\n    brief: 'The name(s) of the AWS log group(s) an application is writing to.',\n    type: 'string[]',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: ['/aws/lambda/my-function', 'opentelemetry-service'],\n    changelog: [{ version: '0.11.1', prs: [414] }],\n  },\n  'aws.log.stream.names': {\n    brief: 'The name(s) of the AWS log stream(s) an application is writing to.',\n    type: 'string[]',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: ['logs/main/10838bed-421f-43ef-870a-f43feacbbb5b'],\n    changelog: [{ version: '0.11.1', prs: [414] }],\n  },\n  'aws.request.extended_id': {\n    brief: 'The AWS extended request ID as returned in the response headers.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'wzHcyEWfmOGDIE5QOhTAqFDoDWP3y8IUvpNINCwL9N4TEHbUw0/gZJ+VZTmCNCWR7fezEN3eCiQ=',\n    deprecation: {\n      replacement: 'aws.extended_request_id',\n      reason:\n        'This attribute is being deprecated in favor of aws.extended_request_id, which is the OTel-aligned replacement.',\n    },\n    aliases: ['aws.extended_request_id'],\n    changelog: [\n      {\n        version: '0.16.0',\n        prs: [480],\n        description: 'Added aws.request.extended_id attribute, deprecated in favor of aws.extended_request_id',\n      },\n    ],\n  },\n  'aws.request_id': {\n    brief: 'The AWS request ID as returned in the response headers.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: '79b9da39-b7ae-508a-a6bc-864b2829c622',\n    aliases: ['aws.request.id'],\n    changelog: [{ version: '0.16.0', prs: [480], description: 'Added aws.request_id attribute' }],\n  },\n  'aws.request.id': {\n    brief: 'The AWS request ID as returned in the response headers.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '79b9da39-b7ae-508a-a6bc-864b2829c622',\n    deprecation: {\n      replacement: 'aws.request_id',\n      reason: 'This attribute is being deprecated in favor of aws.request_id, which is the OTel-aligned replacement.',\n    },\n    aliases: ['aws.request_id'],\n    changelog: [\n      {\n        version: '0.16.0',\n        prs: [480],\n        description: 'Added aws.request.id attribute, deprecated in favor of aws.request_id',\n      },\n    ],\n  },\n  'aws.s3.bucket': {\n    brief: 'The S3 bucket name the request refers to.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'ot-demo-test',\n    changelog: [{ version: '0.16.0', prs: [480], description: 'Added aws.s3.bucket attribute' }],\n  },\n  'aws.secretsmanager.secret.arn': {\n    brief: 'The ARN of the Secret stored in Secrets Manager.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'arn:aws:secretsmanager:us-east-1:123456789012:secret:SecretName-6RandomCharacters',\n    changelog: [{ version: '0.16.0', prs: [480], description: 'Added aws.secretsmanager.secret.arn attribute' }],\n  },\n  'aws.sns.topic.arn': {\n    brief:\n      'The ARN of the AWS SNS Topic. An Amazon SNS topic is a logical access point that acts as a communication channel.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'arn:aws:sns:us-east-1:123456789012:mystack-mytopic-NZJ5JSMVGFIE',\n    changelog: [{ version: '0.16.0', prs: [480], description: 'Added aws.sns.topic.arn attribute' }],\n  },\n  'aws.step_functions.activity.arn': {\n    brief: 'The ARN of the AWS Step Functions Activity.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'arn:aws:states:us-east-1:123456789012:activity:get-greeting',\n    changelog: [{ version: '0.16.0', prs: [480], description: 'Added aws.step_functions.activity.arn attribute' }],\n  },\n  'aws.step_functions.state_machine.arn': {\n    brief: 'The ARN of the AWS Step Functions State Machine.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'arn:aws:states:us-east-1:123456789012:stateMachine:myStateMachine:1',\n    changelog: [{ version: '0.16.0', prs: [480], description: 'Added aws.step_functions.state_machine.arn attribute' }],\n  },\n  blocked_main_thread: {\n    brief: 'Whether the main thread was blocked by the span.',\n    type: 'boolean',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: true,\n    changelog: [{ version: '0.0.0' }],\n  },\n  'browser.name': {\n    brief: 'The name of the browser.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'Chrome',\n    aliases: ['sentry.browser.name'],\n    changelog: [{ version: '0.1.0', prs: [127, 139] }, { version: '0.0.0' }],\n  },\n  'browser.performance.navigation.activation_start': {\n    brief: 'The time between initiating a navigation to a page and the browser activating the page',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 1.983,\n    aliases: ['performance.activationStart'],\n    changelog: [\n      { version: '0.5.0', prs: [321], description: 'Added browser.performance.navigation.activation_start attribute' },\n    ],\n  },\n  'browser.performance.time_origin': {\n    brief: \"The browser's performance.timeOrigin timestamp representing the time when the pageload was initiated\",\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 1776185678.886,\n    aliases: ['performance.timeOrigin'],\n    changelog: [\n      { version: '0.5.0', prs: [321], description: 'Added browser.performance.time_origin attribute attribute' },\n    ],\n  },\n  'browser.report.type': {\n    brief: 'A browser report sent via reporting API..',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'network-error',\n    changelog: [{ version: '0.1.0', prs: [68, 127] }],\n  },\n  'browser.script.invoker': {\n    brief: 'How a script was called in the browser.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'Window.requestAnimationFrame',\n    changelog: [{ version: '0.1.0', prs: [127] }, { version: '0.0.0' }],\n  },\n  'browser.script.invoker_type': {\n    brief: 'Browser script entry point type.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'event-listener',\n    changelog: [{ version: '0.1.0', prs: [127] }, { version: '0.0.0' }],\n  },\n  'browser.script.source_char_position': {\n    brief: 'A number representing the script character position of the script.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 678,\n    changelog: [{ version: '0.4.0', prs: [228] }, { version: '0.0.0' }],\n  },\n  'browser.version': {\n    brief: 'The version of the browser.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '120.0.6099.130',\n    aliases: ['sentry.browser.version'],\n    changelog: [{ version: '0.1.0', prs: [59, 127, 139] }],\n  },\n  'browser.web_vital.cls.report_event': {\n    brief: 'The event that caused the SDK to report CLS (pagehide or navigation)',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'navigation',\n    changelog: [{ version: '0.5.0', prs: [319], description: 'Added browser.web_vital.cls.report_event attribute' }],\n  },\n  'browser.web_vital.cls.source.<key>': {\n    brief: 'The HTML elements or components responsible for the layout shift. <key> is a numeric index from 1 to N',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    hasDynamicSuffix: true,\n    example: 'body > div#app',\n    aliases: ['cls.source.<key>'],\n    changelog: [{ version: '0.5.0', prs: [234] }],\n  },\n  'browser.web_vital.cls.value': {\n    brief: 'The value of the recorded Cumulative Layout Shift (CLS) web vital',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 0.2361,\n    aliases: ['cls'],\n    changelog: [{ version: '0.5.0', prs: [229], description: 'Added browser.web_vital.cls.value attribute' }],\n  },\n  'browser.web_vital.fcp.value': {\n    brief: 'The time it takes for the browser to render the first piece of meaningful content on the screen',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 547.6951,\n    aliases: ['fcp'],\n    changelog: [{ version: '0.5.0', prs: [235] }],\n  },\n  'browser.web_vital.fp.value': {\n    brief: 'The time in milliseconds it takes for the browser to render the first pixel on the screen',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 477.1926,\n    aliases: ['fp'],\n    changelog: [{ version: '0.5.0', prs: [235] }],\n  },\n  'browser.web_vital.inp.value': {\n    brief: 'The value of the recorded Interaction to Next Paint (INP) web vital',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 200,\n    aliases: ['inp'],\n    changelog: [{ version: '0.5.0', prs: [229], description: 'Added browser.web_vital.inp.value attribute' }],\n  },\n  'browser.web_vital.lcp.element': {\n    brief: 'The HTML element selector or component name for which LCP was reported',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'body > div#app > div#container > div',\n    aliases: ['lcp.element'],\n    changelog: [{ version: '0.5.0', prs: [233] }],\n  },\n  'browser.web_vital.lcp.id': {\n    brief: 'The id of the dom element responsible for the largest contentful paint',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '#gero',\n    aliases: ['lcp.id'],\n    changelog: [{ version: '0.5.0', prs: [233] }],\n  },\n  'browser.web_vital.lcp.load_time': {\n    brief: 'The time it took for the LCP element to be loaded',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 1402,\n    aliases: ['lcp.loadTime'],\n    changelog: [{ version: '0.5.0', prs: [233] }],\n  },\n  'browser.web_vital.lcp.render_time': {\n    brief: 'The time it took for the LCP element to be rendered',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 1685,\n    aliases: ['lcp.renderTime'],\n    changelog: [{ version: '0.5.0', prs: [233] }],\n  },\n  'browser.web_vital.lcp.report_event': {\n    brief: 'The event that caused the SDK to report LCP (pagehide or navigation)',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'pagehide',\n    changelog: [{ version: '0.5.0', prs: [319], description: 'Added browser.web_vital.lcp.report_event attribute' }],\n  },\n  'browser.web_vital.lcp.size': {\n    brief: 'The size of the largest contentful paint element',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 1024,\n    aliases: ['lcp.size'],\n    changelog: [{ version: '0.5.0', prs: [233] }],\n  },\n  'browser.web_vital.lcp.url': {\n    brief: 'The url of the dom element responsible for the largest contentful paint',\n    type: 'string',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'https://example.com/static/img.png',\n    aliases: ['lcp.url'],\n    changelog: [{ version: '0.5.0', prs: [233] }],\n  },\n  'browser.web_vital.lcp.value': {\n    brief: 'The value of the recorded Largest Contentful Paint (LCP) web vital',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 2500,\n    aliases: ['lcp'],\n    changelog: [{ version: '0.5.0', prs: [229], description: 'Added browser.web_vital.lcp.value attribute' }],\n  },\n  'browser.web_vital.ttfb.request_time': {\n    brief:\n      \"The time it takes for the server to process the initial request and send the first byte of a response to the user's browser\",\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 1554.5814,\n    aliases: ['ttfb.requestTime'],\n    changelog: [{ version: '0.5.0', prs: [235] }],\n  },\n  'browser.web_vital.ttfb.value': {\n    brief: 'The value of the recorded Time To First Byte (TTFB) web vital in Milliseconds',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 194.3322,\n    aliases: ['ttfb'],\n    changelog: [{ version: '0.5.0', prs: [235] }],\n  },\n  'cache.hit': {\n    brief: 'If the cache was hit during this span.',\n    type: 'boolean',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: true,\n    changelog: [{ version: '0.0.0' }],\n  },\n  'cache.item_size': {\n    brief: 'The size of the requested item in the cache. In bytes.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 58,\n    changelog: [{ version: '0.4.0', prs: [228] }, { version: '0.0.0' }],\n  },\n  'cache.key': {\n    brief: 'The key of the cache accessed.',\n    type: 'string[]',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: ['my-cache-key', 'my-other-cache-key'],\n    changelog: [{ version: '0.0.0' }],\n  },\n  'cache.operation': {\n    brief: 'The operation being performed on the cache.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'get',\n    changelog: [{ version: '0.1.0', prs: [127] }, { version: '0.0.0' }],\n  },\n  'cache.ttl': {\n    brief: 'The ttl of the cache in seconds',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 120,\n    changelog: [{ version: '0.4.0', prs: [228] }, { version: '0.0.0' }],\n  },\n  'cache.write': {\n    brief: 'If the cache operation resulted in a write to the cache.',\n    type: 'boolean',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: true,\n    changelog: [{ version: '0.5.0' }],\n  },\n  channel: {\n    brief: 'The channel name that is being used.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'mail',\n    changelog: [{ version: '0.1.0', prs: [127] }, { version: '0.0.0' }],\n  },\n  'client.address': {\n    brief:\n      'Client address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'example.com',\n    aliases: ['http.client_ip'],\n    changelog: [{ version: '0.1.0', prs: [106, 127] }, { version: '0.0.0' }],\n  },\n  'client.port': {\n    brief: 'Client port number.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 5432,\n    changelog: [{ version: '0.4.0', prs: [228] }, { version: '0.0.0' }],\n  },\n  'cloudflare.d1.duration': {\n    brief: 'The duration of a Cloudflare D1 operation.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 543,\n    changelog: [{ version: '0.4.0', prs: [228] }, { version: '0.0.0' }],\n  },\n  'cloudflare.d1.query_type': {\n    brief: 'The type of query executed in a Cloudflare D1 operation',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'run',\n    deprecation: {\n      replacement: 'db.operation.name',\n    },\n    aliases: ['db.operation.name', 'db.operation'],\n    changelog: [{ version: '0.11.0', prs: [392], description: 'Added cloudflare.d1.query_type attribute' }],\n  },\n  'cloudflare.d1.rows_read': {\n    brief: 'The number of rows read in a Cloudflare D1 operation.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 12,\n    changelog: [{ version: '0.4.0', prs: [228] }, { version: '0.0.0' }],\n  },\n  'cloudflare.d1.rows_written': {\n    brief: 'The number of rows written in a Cloudflare D1 operation.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 12,\n    changelog: [{ version: '0.4.0', prs: [228] }, { version: '0.0.0' }],\n  },\n  'cloudflare.durable_object.query.bindings': {\n    brief: 'The number of bound parameters passed to the SQL exec call.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 2,\n    changelog: [\n      { version: '0.13.0', prs: [435], description: 'Added cloudflare.durable_object.query.bindings attribute' },\n    ],\n  },\n  'cloudflare.durable_object.response.rows_read': {\n    brief: 'The number of rows read by a Cloudflare Durable Object SQL operation.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 12,\n    changelog: [\n      { version: '0.13.0', prs: [435], description: 'Added cloudflare.durable_object.response.rows_read attribute' },\n    ],\n  },\n  'cloudflare.durable_object.response.rows_written': {\n    brief: 'The number of rows written by a Cloudflare Durable Object SQL operation.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 1,\n    changelog: [\n      { version: '0.13.0', prs: [435], description: 'Added cloudflare.durable_object.response.rows_written attribute' },\n    ],\n  },\n  'cloudflare.r2.bucket': {\n    brief: 'The name of the Cloudflare R2 bucket binding',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'MY_BUCKET',\n    changelog: [{ version: '0.11.1', prs: [413], description: 'Added cloudflare.r2.bucket attribute' }],\n  },\n  'cloudflare.r2.operation': {\n    brief: 'The R2 API operation being performed',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'GetObject',\n    changelog: [{ version: '0.11.1', prs: [413], description: 'Added cloudflare.r2.operation attribute' }],\n  },\n  'cloudflare.r2.request.delimiter': {\n    brief: 'The delimiter used to group objects in an R2 list operation',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '/',\n    changelog: [{ version: '0.11.1', prs: [413], description: 'Added cloudflare.r2.request.delimiter attribute' }],\n  },\n  'cloudflare.r2.request.key': {\n    brief: 'The object key used in the R2 operation',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'my-file.txt',\n    changelog: [{ version: '0.11.1', prs: [413], description: 'Added cloudflare.r2.request.key attribute' }],\n  },\n  'cloudflare.r2.request.part_number': {\n    brief: 'The part number in a multipart upload operation',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 1,\n    changelog: [{ version: '0.11.1', prs: [413], description: 'Added cloudflare.r2.request.part_number attribute' }],\n  },\n  'cloudflare.r2.request.prefix': {\n    brief: 'The prefix used to filter objects in an R2 list operation',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'images/',\n    changelog: [{ version: '0.11.1', prs: [413], description: 'Added cloudflare.r2.request.prefix attribute' }],\n  },\n  'cloudflare.workflow.attempt': {\n    brief: 'The current attempt number for a Cloudflare Workflow step',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 1,\n    changelog: [{ version: '0.11.0', prs: [392], description: 'Added cloudflare.workflow.attempt attribute' }],\n  },\n  'cloudflare.workflow.retries.backoff': {\n    brief: 'The backoff strategy for Cloudflare Workflow step retries',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'exponential',\n    changelog: [{ version: '0.11.0', prs: [392], description: 'Added cloudflare.workflow.retries.backoff attribute' }],\n  },\n  'cloudflare.workflow.retries.delay': {\n    brief: 'The delay between Cloudflare Workflow step retries',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '5 seconds',\n    changelog: [{ version: '0.11.0', prs: [392], description: 'Added cloudflare.workflow.retries.delay attribute' }],\n  },\n  'cloudflare.workflow.retries.limit': {\n    brief: 'The maximum number of retries for a Cloudflare Workflow step',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 3,\n    changelog: [{ version: '0.11.0', prs: [392], description: 'Added cloudflare.workflow.retries.limit attribute' }],\n  },\n  'cloudflare.workflow.timeout': {\n    brief: 'The timeout duration for a Cloudflare Workflow step',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '1 minute',\n    changelog: [{ version: '0.11.0', prs: [392], description: 'Added cloudflare.workflow.timeout attribute' }],\n  },\n  'cloud.account.id': {\n    brief: 'The cloud account ID the resource is assigned to',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: '123456789012',\n    changelog: [{ version: '0.7.0', prs: [364], description: 'Added cloud.account.id attribute' }],\n  },\n  'cloud.availability_zone': {\n    brief: 'Cloud regions often have multiple, isolated locations known as zones to increase availability',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'us-east-1c',\n    changelog: [{ version: '0.7.0', prs: [364], description: 'Added cloud.availability_zone attribute' }],\n  },\n  'cloud.platform': {\n    brief: 'The cloud platform in use',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'aws_lambda',\n    changelog: [{ version: '0.7.0', prs: [364], description: 'Added cloud.platform attribute' }],\n  },\n  'cloud.provider': {\n    brief: 'Name of the cloud provider',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'aws',\n    changelog: [{ version: '0.7.0', prs: [364], description: 'Added cloud.provider attribute' }],\n  },\n  'cloud.region': {\n    brief: 'The geographical region the resource is running',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'us-east-1',\n    changelog: [{ version: '0.7.0', prs: [364], description: 'Added cloud.region attribute' }],\n  },\n  'cloud.resource_id': {\n    brief: 'Cloud provider-specific native identifier of the monitored cloud resource',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'arn:aws:lambda:REGION:ACCOUNT_ID:function:my-function',\n    aliases: ['faas.id'],\n    changelog: [\n      { version: '0.16.0', prs: [475], description: 'Added faas.id as an alias' },\n      { version: '0.11.1', prs: [414] },\n    ],\n    additionalContext: [\n      'This can be an identifier for a resource in AWS, GCP, or Azure. There may be some overlap in values found here with other attributes. For instance, an AWS lambda ARN may be found here as well as in `aws.lambda.invoked_arn`. OTEL recommends setting them alongside each other.',\n    ],\n  },\n  cls: {\n    brief: 'The value of the recorded Cumulative Layout Shift (CLS) web vital',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 0.2361,\n    deprecation: {\n      replacement: 'browser.web_vital.cls.value',\n      reason: 'The CLS web vital is now recorded as a browser.web_vital.cls.value attribute.',\n    },\n    aliases: ['browser.web_vital.cls.value'],\n    changelog: [\n      {\n        version: '0.5.0',\n        prs: [229],\n        description: \"Added and deprecated attribute to document JS SDK's current behaviour\",\n      },\n    ],\n  },\n  'cls.source.<key>': {\n    brief: 'The HTML elements or components responsible for the layout shift. <key> is a numeric index from 1 to N',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    hasDynamicSuffix: true,\n    example: 'body > div#app',\n    deprecation: {\n      replacement: 'browser.web_vital.cls.source.<key>',\n      reason: 'The CLS source is now recorded as a browser.web_vital.cls.source.<key> attribute.',\n    },\n    aliases: ['browser.web_vital.cls.source.<key>'],\n    changelog: [{ version: '0.5.0', prs: [234] }],\n  },\n  'code.filepath': {\n    brief:\n      'The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path).',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: '/app/myapplication/http/handler/server.py',\n    deprecation: {\n      replacement: 'code.file.path',\n    },\n    aliases: ['code.file.path'],\n    changelog: [{ version: '0.1.0', prs: [61] }, { version: '0.0.0' }],\n  },\n  'code.file.path': {\n    brief:\n      'The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path).',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: '/app/myapplication/http/handler/server.py',\n    aliases: ['code.filepath'],\n    changelog: [{ version: '0.0.0' }],\n  },\n  'code.function': {\n    brief: \"The method or function name, or equivalent (usually rightmost part of the code unit's name).\",\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'server_request',\n    aliases: ['code.function.name'],\n    changelog: [{ version: '0.1.0', prs: [61, 74] }, { version: '0.0.0' }],\n  },\n  'code.function.name': {\n    brief: 'The method or function fully-qualified name without arguments.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'server_request',\n    aliases: ['code.function'],\n    changelog: [{ version: '0.1.0', prs: [127] }, { version: '0.0.0' }],\n  },\n  'code.lineno': {\n    brief:\n      'The line number in code.filepath best representing the operation. It SHOULD point within the code unit named in code.function',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 42,\n    deprecation: {\n      replacement: 'code.line.number',\n    },\n    aliases: ['code.line.number'],\n    changelog: [{ version: '0.4.0', prs: [228] }, { version: '0.1.0', prs: [61, 108] }, { version: '0.0.0' }],\n  },\n  'code.line.number': {\n    brief:\n      'The line number in code.filepath best representing the operation. It SHOULD point within the code unit named in code.function',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 42,\n    aliases: ['code.lineno'],\n    changelog: [{ version: '0.4.0', prs: [228] }, { version: '0.0.0' }],\n  },\n  'code.namespace': {\n    brief:\n      \"The 'namespace' within which code.function is defined. Usually the qualified class or module name, such that code.namespace + some separator + code.function form a unique identifier for the code unit.\",\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'http.handler',\n    changelog: [{ version: '0.1.0', prs: [61, 74] }, { version: '0.0.0' }],\n  },\n  connectionType: {\n    brief: 'Specifies the type of the current connection (e.g. wifi, ethernet, cellular , etc).',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'wifi',\n    deprecation: {\n      replacement: 'network.connection.type',\n      reason: 'Old namespace-less attribute, to be replaced with network.connection.type for span-first future',\n    },\n    aliases: ['network.connection.type', 'device.connection_type'],\n    changelog: [\n      {\n        version: '0.5.0',\n        prs: [279],\n        description: \"Added and deprecated attribute to document JS SDK's current behaviour\",\n      },\n    ],\n  },\n  'connection.rtt': {\n    brief: 'Specifies the estimated effective round-trip time of the current connection, in milliseconds.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 100,\n    deprecation: {\n      replacement: 'network.connection.rtt',\n      reason:\n        'Old attribute name (no official namespace), to be replaced with network.connection.rtt for span-first future',\n    },\n    aliases: ['network.connection.rtt'],\n    changelog: [\n      {\n        version: '0.5.0',\n        prs: [279],\n        description: \"Added and deprecated attribute to document JS SDK's current behaviour\",\n      },\n    ],\n  },\n  'culture.calendar': {\n    brief: 'The calendar system used by the culture.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'GregorianCalendar',\n    changelog: [{ version: '0.4.0', prs: [243] }],\n  },\n  'culture.display_name': {\n    brief: 'Human readable name of the culture.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'English (United States)',\n    changelog: [{ version: '0.4.0', prs: [243] }],\n  },\n  'culture.is_24_hour_format': {\n    brief: 'Whether the culture uses 24-hour time format.',\n    type: 'boolean',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: true,\n    changelog: [{ version: '0.4.0', prs: [243] }],\n  },\n  'culture.locale': {\n    brief: 'The locale identifier following RFC 4646.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'en-US',\n    changelog: [{ version: '0.4.0', prs: [243] }],\n  },\n  'culture.timezone': {\n    brief: 'The timezone of the culture, as a geographic timezone identifier.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'Europe/Vienna',\n    changelog: [{ version: '0.4.0', prs: [243] }],\n  },\n  'db.collection.name': {\n    brief: 'The name of a collection (table, container) within the database.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'users',\n    changelog: [{ version: '0.1.0', prs: [106, 127] }, { version: '0.0.0' }],\n  },\n  'db.driver.name': {\n    brief: 'The name of the driver used for the database connection.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'psycopg2',\n    changelog: [{ version: '0.5.0', prs: [297], description: 'Added db.driver.name attribute' }],\n  },\n  'db.name': {\n    brief: 'The name of the database being accessed.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'customers',\n    deprecation: {\n      replacement: 'db.namespace',\n    },\n    aliases: ['db.namespace'],\n    changelog: [{ version: '0.1.0', prs: [61, 127] }, { version: '0.0.0' }],\n  },\n  'db.namespace': {\n    brief: 'The name of the database being accessed.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'customers',\n    aliases: ['db.name'],\n    changelog: [{ version: '0.1.0', prs: [127] }, { version: '0.0.0' }],\n  },\n  'db.operation': {\n    brief: 'The name of the operation being executed.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'SELECT',\n    deprecation: {\n      replacement: 'db.operation.name',\n    },\n    aliases: ['db.operation.name', 'cloudflare.d1.query_type'],\n    changelog: [{ version: '0.4.0', prs: [199] }, { version: '0.1.0', prs: [61, 127] }, { version: '0.0.0' }],\n  },\n  'db.operation.batch.size': {\n    brief:\n      'The number of queries included in a batch operation. Operations are only considered batches when they contain two or more operations, and so db.operation.batch.size SHOULD never be 1.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 3,\n    changelog: [{ version: '0.11.0', prs: [407], description: 'Added db.operation.batch.size attribute' }],\n  },\n  'db.operation.name': {\n    brief: 'The name of the operation being executed.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'SELECT',\n    aliases: ['db.operation', 'cloudflare.d1.query_type'],\n    changelog: [{ version: '0.1.0', prs: [127] }, { version: '0.0.0' }],\n  },\n  'db.query.parameter.<key>': {\n    brief:\n      'A query parameter used in db.query.text, with <key> being the parameter name, and the attribute value being a string representation of the parameter value.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    hasDynamicSuffix: true,\n    example: \"db.query.parameter.foo='123'\",\n    changelog: [{ version: '0.1.0', prs: [103, 127] }],\n  },\n  'db.query.summary': {\n    brief:\n      'A shortened representation of operation(s) in the full query. This attribute must be low-cardinality and should only contain the operation table names.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'SELECT users',\n    changelog: [{ version: '0.4.0', prs: [208] }, { version: '0.1.0', prs: [127] }, { version: '0.0.0' }],\n  },\n  'db.query.text': {\n    brief:\n      'The database parameterized query being executed. Any parameter values (filters, insertion values, etc) should be replaced with parameter placeholders. If applicable, use `db.query.parameter.<key>` to add the parameter value.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'SELECT * FROM users WHERE id = $1',\n    aliases: ['db.statement'],\n    changelog: [{ version: '0.4.0', prs: [208] }, { version: '0.1.0', prs: [127] }, { version: '0.0.0' }],\n  },\n  'db.redis.connection': {\n    brief: 'The redis connection name.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'my-redis-instance',\n    changelog: [{ version: '0.1.0', prs: [127] }, { version: '0.0.0' }],\n  },\n  'db.redis.key': {\n    brief: 'The key the Redis command is operating on.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'user:2047:city',\n    changelog: [{ version: '0.6.0', prs: [326], description: 'Added db.redis.key attribute' }],\n  },\n  'db.redis.parameters': {\n    brief: 'The array of command parameters given to a redis command.',\n    type: 'string[]',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: ['test', '*'],\n    changelog: [{ version: '0.0.0' }],\n  },\n  'db.response.status_code': {\n    brief:\n      'Database response status code. The status code returned by the database. Usually it represents an error code, but may also represent partial success, warning, or differentiate between various types of successful outcomes.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'ORA-17002',\n    changelog: [{ version: '0.16.0', prs: [462], description: 'Added db.response.status_code attribute' }],\n  },\n  'db.sql.bindings': {\n    brief: 'The array of query bindings.',\n    type: 'string[]',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: ['1', 'foo'],\n    deprecation: {\n      replacement: 'db.query.parameter.<key>',\n      reason:\n        'Instead of adding every binding in the db.sql.bindings attribute, add them as individual entires with db.query.parameter.<key>.',\n    },\n    changelog: [{ version: '0.1.0', prs: [61] }, { version: '0.0.0' }],\n  },\n  'db.statement': {\n    brief: 'The database statement being executed.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'SELECT * FROM users',\n    deprecation: {\n      replacement: 'db.query.text',\n    },\n    aliases: ['db.query.text'],\n    changelog: [{ version: '0.4.0', prs: [199] }, { version: '0.1.0', prs: [61, 127] }, { version: '0.0.0' }],\n  },\n  'db.stored_procedure.name': {\n    brief: 'The name of a stored procedure being called.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'GetUserById',\n    changelog: [{ version: '0.11.0', prs: [398] }],\n  },\n  'db.system': {\n    brief:\n      'An identifier for the database management system (DBMS) product being used. See [OpenTelemetry docs](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/database/database-spans.md#notes-and-well-known-identifiers-for-dbsystem) for a list of well-known identifiers.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'postgresql',\n    deprecation: {\n      replacement: 'db.system.name',\n    },\n    aliases: ['db.system.name'],\n    changelog: [{ version: '0.4.0', prs: [199, 224] }, { version: '0.1.0', prs: [61, 127] }, { version: '0.0.0' }],\n  },\n  'db.system.name': {\n    brief:\n      'An identifier for the database management system (DBMS) product being used. See [OpenTelemetry docs](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/database/database-spans.md#notes-and-well-known-identifiers-for-dbsystem) for a list of well-known identifiers.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'postgresql',\n    aliases: ['db.system'],\n    changelog: [{ version: '0.1.0', prs: [127] }, { version: '0.0.0' }],\n  },\n  'db.user': {\n    brief: 'The database user.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'fancy_user',\n    changelog: [{ version: '0.0.0' }],\n  },\n  deviceMemory: {\n    brief: 'The estimated total memory capacity of the device, only a rough estimation in gigabytes.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '8 GB',\n    deprecation: {\n      replacement: 'device.memory.estimated_capacity',\n      reason:\n        'Old namespace-less attribute, to be replaced with device.memory.estimated_capacity for span-first future',\n    },\n    aliases: ['device.memory.estimated_capacity'],\n    changelog: [\n      {\n        version: '0.5.0',\n        prs: [281],\n        description: \"Added and deprecated attribute to document JS SDK's current behaviour\",\n      },\n    ],\n  },\n  'device.archs': {\n    brief: 'The CPU architectures of the device.',\n    type: 'string[]',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: ['arm64-v8a', 'armeabi-v7a', 'armeabi'],\n    changelog: [{ version: '0.5.0', prs: [303], description: 'Added device.archs attribute' }],\n  },\n  'device.battery_level': {\n    brief: 'The battery level of the device as a percentage (0-100).',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 100,\n    changelog: [{ version: '0.5.0', prs: [303], description: 'Added device.battery_level attribute' }],\n  },\n  'device.battery_temperature': {\n    brief: 'The battery temperature of the device in Celsius.',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 25,\n    changelog: [{ version: '0.5.0', prs: [303], description: 'Added device.battery_temperature attribute' }],\n  },\n  'device.boot_time': {\n    brief: 'A formatted UTC timestamp when the system was booted.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '2018-02-08T12:52:12Z',\n    changelog: [{ version: '0.5.0', prs: [303], description: 'Added device.boot_time attribute' }],\n  },\n  'device.brand': {\n    brief: 'The brand of the device.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'Apple',\n    changelog: [{ version: '0.1.0', prs: [116, 127] }],\n  },\n  'device.charging': {\n    brief: 'Whether the device was charging or not.',\n    type: 'boolean',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: false,\n    changelog: [{ version: '0.5.0', prs: [303], description: 'Added device.charging attribute' }],\n  },\n  'device.chipset': {\n    brief: 'The chipset of the device.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'Qualcomm SM8550',\n    changelog: [{ version: '0.5.0', prs: [303], description: 'Added device.chipset attribute' }],\n  },\n  'device.class': {\n    brief:\n      'The classification of the device. For example, `low`, `medium`, or `high`. Typically inferred by Relay - SDKs generally do not need to set this directly.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'medium',\n    changelog: [{ version: '0.5.0', prs: [300], description: 'Added device.class attribute' }],\n  },\n  'device.connection_type': {\n    brief: 'The internet connection type currently being used by the device.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'wifi',\n    deprecation: {\n      replacement: 'network.connection.type',\n      reason: 'This attribute is being deprecated in favor of network.connection.type',\n    },\n    aliases: ['network.connection.type', 'connectionType'],\n    changelog: [\n      {\n        version: '0.5.0',\n        prs: [303],\n        description: 'Added and deprecated device.connection_type in favor of network.connection.type',\n      },\n    ],\n  },\n  'device.cpu_description': {\n    brief: 'A description of the CPU of the device.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz',\n    changelog: [{ version: '0.5.0', prs: [303], description: 'Added device.cpu_description attribute' }],\n  },\n  'device.external_free_storage': {\n    brief: 'External storage free size in bytes.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 67108864000,\n    changelog: [{ version: '0.5.0', prs: [303], description: 'Added device.external_free_storage attribute' }],\n  },\n  'device.external_storage_size': {\n    brief: 'External storage total size in bytes.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 134217728000,\n    changelog: [{ version: '0.5.0', prs: [303], description: 'Added device.external_storage_size attribute' }],\n  },\n  'device.family': {\n    brief: 'The family of the device.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'iPhone',\n    changelog: [{ version: '0.1.0', prs: [116, 127] }],\n  },\n  'device.free_memory': {\n    brief: 'Free system memory in bytes.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 2147483648,\n    changelog: [{ version: '0.5.0', prs: [300], description: 'Added device.free_memory attribute' }],\n  },\n  'device.free_storage': {\n    brief: 'Free device storage in bytes.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 107374182400,\n    changelog: [{ version: '0.5.0', prs: [303], description: 'Added device.free_storage attribute' }],\n  },\n  'device.id': {\n    brief: 'Unique device identifier.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',\n    changelog: [{ version: '0.5.0', prs: [303], description: 'Added device.id attribute' }],\n  },\n  'device.locale': {\n    brief: 'The locale of the device.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'en-US',\n    changelog: [{ version: '0.5.0', prs: [303], description: 'Added device.locale attribute' }],\n  },\n  'device.low_memory': {\n    brief: 'Whether the device was low on memory.',\n    type: 'boolean',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: false,\n    changelog: [{ version: '0.5.0', prs: [303], description: 'Added device.low_memory attribute' }],\n  },\n  'device.low_power_mode': {\n    brief: 'Whether the device is in Low Power Mode.',\n    type: 'boolean',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: true,\n    changelog: [{ version: '0.6.0', prs: [314], description: 'Added device.low_power_mode attribute' }],\n  },\n  'device.manufacturer': {\n    brief: 'The manufacturer of the device.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'Google',\n    changelog: [{ version: '0.5.0', prs: [303], description: 'Added device.manufacturer attribute' }],\n  },\n  'device.memory.estimated_capacity': {\n    brief:\n      'The estimated total memory capacity of the device, only a rough estimation in gigabytes. Browsers report estimations in buckets of powers of 2, mostly capped at 8 GB',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 8,\n    aliases: ['deviceMemory'],\n    changelog: [\n      {\n        version: '0.5.0',\n        prs: [281],\n        description: 'Added attribute device.memory.estimated_capacity to be used instead of deviceMemory',\n      },\n    ],\n  },\n  'device.memory_size': {\n    brief: 'Total system memory available in bytes.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 17179869184,\n    changelog: [{ version: '0.5.0', prs: [300], description: 'Added device.memory_size attribute' }],\n  },\n  'device.model': {\n    brief: 'The model of the device.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'iPhone 15 Pro Max',\n    changelog: [{ version: '0.1.0', prs: [116, 127] }],\n  },\n  'device.model_id': {\n    brief: 'An internal hardware revision to identify the device exactly.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'N861AP',\n    changelog: [{ version: '0.5.0', prs: [300], description: 'Added device.model_id attribute' }],\n  },\n  'device.name': {\n    brief:\n      'The name of the device. On mobile, this is the user-assigned device name. On servers and desktops, this is typically the hostname.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'localhost',\n    changelog: [{ version: '0.5.0', prs: [303], description: 'Added device.name attribute' }],\n  },\n  'device.online': {\n    brief: 'Whether the device was online or not.',\n    type: 'boolean',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: true,\n    changelog: [{ version: '0.5.0', prs: [303], description: 'Added device.online attribute' }],\n  },\n  'device.orientation': {\n    brief: 'The orientation of the device, either \"portrait\" or \"landscape\".',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'portrait',\n    changelog: [{ version: '0.5.0', prs: [303], description: 'Added device.orientation attribute' }],\n  },\n  'device.processor_count': {\n    brief: 'Number of \"logical processors\".',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 8,\n    aliases: ['hardwareConcurrency'],\n    changelog: [\n      {\n        version: '0.5.0',\n        prs: [300],\n        description: 'Added and deprecated attribute device.processor_count in favor of device.cpu.logical_core_count',\n      },\n    ],\n  },\n  'device.processor_frequency': {\n    brief: 'Processor frequency in MHz.',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 2400,\n    changelog: [{ version: '0.5.0', prs: [303], description: 'Added device.processor_frequency attribute' }],\n  },\n  'device.screen_density': {\n    brief: 'The screen density of the device.',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 2.625,\n    changelog: [{ version: '0.5.0', prs: [303], description: 'Added device.screen_density attribute' }],\n  },\n  'device.screen_dpi': {\n    brief: 'The screen density in dots-per-inch (DPI) of the device.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 420,\n    changelog: [{ version: '0.5.0', prs: [303], description: 'Added device.screen_dpi attribute' }],\n  },\n  'device.screen_height_pixels': {\n    brief: 'The height of the device screen in pixels.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 2400,\n    changelog: [{ version: '0.5.0', prs: [303], description: 'Added device.screen_height_pixels attribute' }],\n  },\n  'device.screen_width_pixels': {\n    brief: 'The width of the device screen in pixels.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 1080,\n    changelog: [{ version: '0.5.0', prs: [303], description: 'Added device.screen_width_pixels attribute' }],\n  },\n  'device.simulator': {\n    brief: 'Whether the device is a simulator or an actual device.',\n    type: 'boolean',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: false,\n    changelog: [{ version: '0.5.0', prs: [300], description: 'Added device.simulator attribute' }],\n  },\n  'device.storage_size': {\n    brief: 'Total device storage in bytes.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 274877906944,\n    changelog: [{ version: '0.5.0', prs: [303], description: 'Added device.storage_size attribute' }],\n  },\n  'device.thermal_state': {\n    brief:\n      \"The thermal state of the device. Based on Apple's `ProcessInfo.ThermalState` enum: `nominal`, `fair`, `serious`, or `critical`.\",\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'nominal',\n    changelog: [{ version: '0.5.0', prs: [303], description: 'Added device.thermal_state attribute' }],\n  },\n  'device.timezone': {\n    brief: 'The timezone of the device.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'Europe/Vienna',\n    changelog: [{ version: '0.5.0', prs: [303], description: 'Added device.timezone attribute' }],\n  },\n  'device.usable_memory': {\n    brief: 'Memory usable for the app in bytes.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 2147483648,\n    changelog: [{ version: '0.5.0', prs: [303], description: 'Added device.usable_memory attribute' }],\n  },\n  dist: {\n    brief: 'The sentry dist.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'never',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '1.0',\n    deprecation: {\n      replacement: 'sentry.dist',\n      reason: 'This attribute is being deprecated in favor of sentry.dist.',\n    },\n    aliases: ['sentry.dist'],\n    changelog: [{ version: '0.16.0', prs: [489], description: 'Added dist attribute' }],\n  },\n  effectiveConnectionType: {\n    brief: 'Specifies the estimated effective type of the current connection (e.g. slow-2g, 2g, 3g, 4g).',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '4g',\n    deprecation: {\n      replacement: 'network.connection.effective_type',\n      reason:\n        'Old namespace-less attribute, to be replaced with network.connection.effective_type for span-first future',\n    },\n    aliases: ['network.connection.effective_type'],\n    changelog: [\n      {\n        version: '0.5.0',\n        prs: [279],\n        description: \"Added and deprecated attribute to document JS SDK's current behaviour\",\n      },\n    ],\n  },\n  environment: {\n    brief: 'The sentry environment.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'production',\n    deprecation: {\n      replacement: 'sentry.environment',\n    },\n    aliases: ['sentry.environment'],\n    changelog: [{ version: '0.1.0', prs: [61, 127] }, { version: '0.0.0' }],\n  },\n  'error.type': {\n    brief: 'Describes a class of error the operation ended with.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'timeout',\n    changelog: [{ version: '0.1.0', prs: [127] }, { version: '0.0.0' }],\n  },\n  'event.id': {\n    brief: 'The unique identifier for this event (log record)',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 1234567890,\n    changelog: [{ version: '0.1.0', prs: [101] }],\n  },\n  'event.name': {\n    brief: 'The name that uniquely identifies this event (log record)',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'Process Payload',\n    changelog: [{ version: '0.1.0', prs: [101, 127] }],\n  },\n  'exception.escaped': {\n    brief:\n      'SHOULD be set to true if the exception event is recorded at a point where it is known that the exception is escaping the scope of the span.',\n    type: 'boolean',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: true,\n    changelog: [{ version: '0.0.0' }],\n  },\n  'exception.message': {\n    brief: 'The error message.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'ENOENT: no such file or directory',\n    changelog: [{ version: '0.1.0', prs: [127] }, { version: '0.0.0' }],\n  },\n  'exception.stacktrace': {\n    brief:\n      'A stacktrace as a string in the natural representation for the language runtime. The representation is to be determined and documented by each language SIG.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example:\n      'Exception in thread \"main\" java.lang.RuntimeException: Test exception\\n at com.example.GenerateTrace.methodB(GenerateTrace.java:13)\\n at com.example.GenerateTrace.methodA(GenerateTrace.java:9)\\n at com.example.GenerateTrace.main(GenerateTrace.java:5)',\n    changelog: [{ version: '0.1.0', prs: [127] }, { version: '0.0.0' }],\n  },\n  'exception.type': {\n    brief:\n      'The type of the exception (its fully-qualified class name, if applicable). The dynamic type of the exception should be preferred over the static type in languages that support it.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'OSError',\n    changelog: [{ version: '0.1.0', prs: [127] }, { version: '0.0.0' }],\n  },\n  'faas.coldstart': {\n    brief: 'A boolean that is true if the serverless function is executed for the first time (aka cold-start).',\n    type: 'boolean',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: true,\n    changelog: [{ version: '0.0.0' }],\n  },\n  'faas.cron': {\n    brief: 'A string containing the schedule period as Cron Expression.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: '0/5 * * * ? *',\n    changelog: [{ version: '0.1.0', prs: [127] }, { version: '0.0.0' }],\n  },\n  'faas.duration_in_ms': {\n    brief: 'The duration a function took to run, in milliseconds.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 120,\n    changelog: [{ version: '0.11.0', prs: [403] }],\n  },\n  'faas.entry_point': {\n    brief: \"The code that's run when the cloud provider invokes your function.\",\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'my_main_function',\n    changelog: [{ version: '0.11.0', prs: [403, 415] }],\n  },\n  'faas.execution': {\n    brief: 'The execution ID of the current function execution.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'af9d5aa4-a685-4c5f-a22b-444f80b3cc28',\n    deprecation: {\n      replacement: 'faas.invocation_id',\n      reason:\n        'This attribute is being deprecated in favor of faas.invocation_id, which is the OTel-aligned replacement.',\n    },\n    aliases: ['faas.invocation_id', 'aws.lambda.aws_request_id'],\n    changelog: [\n      {\n        version: '0.16.0',\n        prs: [473],\n        description: 'Added faas.execution attribute, deprecated in favor of faas.invocation_id',\n      },\n    ],\n  },\n  'faas.id': {\n    brief: 'The unique ID of the single function that this runtime instance executes.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'arn:aws:lambda:REGION:ACCOUNT_ID:function:my-function',\n    deprecation: {\n      replacement: 'cloud.resource_id',\n      reason:\n        'This attribute is being deprecated in favor of cloud.resource_id, which is the OTel-aligned replacement (renamed in OTel semantic conventions v1.19.0).',\n    },\n    aliases: ['cloud.resource_id'],\n    changelog: [\n      {\n        version: '0.16.0',\n        prs: [475],\n        description: 'Added faas.id attribute, deprecated in favor of cloud.resource_id',\n      },\n    ],\n  },\n  'faas.identity': {\n    brief:\n      'The Service Account (GCP), IAM Execution Role (AWS), or Managed Identity (Azure) used by the serverless function when interacting with other cloud services',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example:\n      'name@project.iam.gserviceaccount.com (GCP), arn:aws:iam::123456789012:role/role-name (AWS), 00000000-0000-0000-0000-000000000000 (Azure)',\n    changelog: [{ version: '0.11.0', prs: [403] }],\n  },\n  'faas.invocation_id': {\n    brief: 'The invocation ID of the current function invocation.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'af9d5aa4-a685-4c5f-a22b-444f80b3cc28',\n    aliases: ['aws.lambda.aws_request_id', 'faas.execution'],\n    changelog: [\n      { version: '0.16.0', prs: [473], description: 'Added faas.execution as an alias' },\n      { version: '0.11.1', prs: [414, 424] },\n    ],\n  },\n  'faas.invoked_name': {\n    brief: 'The name of the invoked function.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'my-function',\n    changelog: [{ version: '0.16.0', prs: [481], description: 'Added faas.invoked_name attribute' }],\n  },\n  'faas.invoked_provider': {\n    brief: 'The cloud provider of the invoked function.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'aws',\n    changelog: [{ version: '0.16.0', prs: [481], description: 'Added faas.invoked_provider attribute' }],\n  },\n  'faas.invoked_region': {\n    brief: 'The cloud region of the invoked function.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'eu-central-1',\n    changelog: [{ version: '0.16.0', prs: [481], description: 'Added faas.invoked_region attribute' }],\n  },\n  'faas.name': {\n    brief: 'The name of the serverless function',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'my_function',\n    aliases: ['aws.lambda.function_name'],\n    changelog: [{ version: '0.11.0', prs: [403, 415] }],\n  },\n  'faas.time': {\n    brief: 'A string containing the function invocation time in the ISO 8601 format expressed in UTC.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: '2020-01-23T13:47:06Z',\n    changelog: [{ version: '0.1.0', prs: [127] }, { version: '0.0.0' }],\n  },\n  'faas.trigger': {\n    brief: 'Type of the trigger which caused this function invocation.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'timer',\n    changelog: [{ version: '0.1.0', prs: [127] }, { version: '0.0.0' }],\n  },\n  'faas.version': {\n    brief: 'The version of the function that was invoked',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: '$LATEST',\n    aliases: ['aws.lambda.function_version'],\n    changelog: [{ version: '0.11.1', prs: [414, 424] }],\n  },\n  fcp: {\n    brief: 'The time it takes for the browser to render the first piece of meaningful content on the screen',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 547.6951,\n    deprecation: {\n      replacement: 'browser.web_vital.fcp.value',\n      reason: 'This attribute is being deprecated in favor of browser.web_vital.fcp.value',\n    },\n    aliases: ['browser.web_vital.fcp.value'],\n    changelog: [{ version: '0.5.0', prs: [235] }],\n  },\n  'flag.evaluation.<key>': {\n    brief:\n      'An instance of a feature flag evaluation. The value of this attribute is the boolean representing the evaluation result. The <key> suffix is the name of the feature flag.',\n    type: 'boolean',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    hasDynamicSuffix: true,\n    example: 'flag.evaluation.is_new_ui=true',\n    changelog: [{ version: '0.1.0', prs: [103] }],\n  },\n  fp: {\n    brief: 'The time it takes for the browser to render the first pixel on the screen',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 477.1926,\n    deprecation: {\n      replacement: 'browser.web_vital.fp.value',\n      reason: 'This attribute is being deprecated in favor of browser.web_vital.fp.value',\n    },\n    aliases: ['browser.web_vital.fp.value'],\n    changelog: [{ version: '0.5.0', prs: [235] }],\n  },\n  'frames.delay': {\n    brief:\n      'The sum of all delayed frame durations in seconds during the lifetime of the span. For more information see [frames delay](https://develop.sentry.dev/sdk/performance/frames-delay/).',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 5,\n    deprecation: {\n      replacement: 'app.vitals.frames.delay.value',\n      reason:\n        'Replaced by app.vitals.frames.delay.value to align with the app.vitals.* namespace for mobile performance attributes',\n    },\n    aliases: ['app.vitals.frames.delay.value'],\n    changelog: [\n      { version: '0.5.0', prs: [313], description: 'Deprecated in favor of app.vitals.frames.delay.value' },\n      { version: '0.4.0', prs: [228] },\n      { version: '0.0.0' },\n    ],\n  },\n  'frames.frozen': {\n    brief: 'The number of frozen frames rendered during the lifetime of the span.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 3,\n    deprecation: {\n      replacement: 'app.vitals.frames.frozen.count',\n      reason:\n        'Replaced by app.vitals.frames.frozen.count to align with the app.vitals.* namespace for mobile performance attributes',\n    },\n    aliases: ['app.vitals.frames.frozen.count'],\n    changelog: [\n      { version: '0.5.0', prs: [313], description: 'Deprecated in favor of app.vitals.frames.frozen.count' },\n      { version: '0.4.0', prs: [228] },\n      { version: '0.0.0' },\n    ],\n  },\n  frames_frozen_rate: {\n    brief:\n      'The rate of frozen frames, or `app_vitals.frames.frozen.count` divided by `app_vitals.frames.total.count`. This is computed by Relay.',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    changelog: [{ version: '0.7.0', prs: [362], description: 'Added frames_frozen_rate attribute' }],\n  },\n  'frames.slow': {\n    brief: 'The number of slow frames rendered during the lifetime of the span.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 1,\n    deprecation: {\n      replacement: 'app.vitals.frames.slow.count',\n      reason:\n        'Replaced by app.vitals.frames.slow.count to align with the app.vitals.* namespace for mobile performance attributes',\n    },\n    aliases: ['app.vitals.frames.slow.count'],\n    changelog: [\n      { version: '0.5.0', prs: [313], description: 'Deprecated in favor of app.vitals.frames.slow.count' },\n      { version: '0.4.0', prs: [228] },\n      { version: '0.0.0' },\n    ],\n  },\n  frames_slow_rate: {\n    brief:\n      'The rate of slow frames, or `app_vitals.frames.slow.count` divided by `app_vitals.frames.total.count`. This is computed by Relay.',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    changelog: [{ version: '0.7.0', prs: [362], description: 'Added frames_slow_rate attribute' }],\n  },\n  'frames.total': {\n    brief: 'The number of total frames rendered during the lifetime of the span.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 60,\n    deprecation: {\n      replacement: 'app.vitals.frames.total.count',\n      reason:\n        'Replaced by app.vitals.frames.total.count to align with the app.vitals.* namespace for mobile performance attributes',\n    },\n    aliases: ['app.vitals.frames.total.count'],\n    changelog: [\n      { version: '0.5.0', prs: [313], description: 'Deprecated in favor of app.vitals.frames.total.count' },\n      { version: '0.4.0', prs: [228] },\n      { version: '0.0.0' },\n    ],\n  },\n  fs_error: {\n    brief: 'The error message of a file system error.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'ENOENT: no such file or directory',\n    deprecation: {\n      replacement: 'error.type',\n      reason: 'This attribute is not part of the OpenTelemetry specification and error.type fits much better.',\n    },\n    changelog: [{ version: '0.1.0', prs: [61, 127] }, { version: '0.0.0' }],\n  },\n  'gcp.function.context.event_id': {\n    brief: 'The event ID from the legacy GCP Cloud Function context (1st gen)',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '1234567890',\n    changelog: [{ version: '0.7.0', prs: [371], description: 'Added gcp.function.context.event_id attribute' }],\n  },\n  'gcp.function.context.event_type': {\n    brief: 'The type of the GCP Cloud Function event',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'google.pubsub.topic.publish',\n    changelog: [{ version: '0.7.0', prs: [371], description: 'Added gcp.function.context.event_type attribute' }],\n  },\n  'gcp.function.context.id': {\n    brief: 'The unique event ID from the GCP CloudEvents context (2nd gen Cloud Functions)',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '1234567890',\n    changelog: [{ version: '0.7.0', prs: [371], description: 'Added gcp.function.context.id attribute' }],\n  },\n  'gcp.function.context.resource': {\n    brief: 'The resource that triggered the GCP Cloud Function event',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'projects/my-project/topics/my-topic',\n    changelog: [{ version: '0.7.0', prs: [371], description: 'Added gcp.function.context.resource attribute' }],\n  },\n  'gcp.function.context.source': {\n    brief: 'The source of the GCP Cloud Function event',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '//pubsub.googleapis.com/projects/my-project/topics/my-topic',\n    changelog: [{ version: '0.7.0', prs: [371], description: 'Added gcp.function.context.source attribute' }],\n  },\n  'gcp.function.context.specversion': {\n    brief: 'The CloudEvents specification version of the GCP Cloud Function event',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '1.0',\n    changelog: [{ version: '0.7.0', prs: [371], description: 'Added gcp.function.context.specversion attribute' }],\n  },\n  'gcp.function.context.time': {\n    brief: 'The timestamp of the GCP Cloud Function event',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '2024-01-01T00:00:00.000Z',\n    changelog: [{ version: '0.7.0', prs: [371], description: 'Added gcp.function.context.time attribute' }],\n  },\n  'gcp.function.context.timestamp': {\n    brief: 'The legacy timestamp of the GCP Cloud Function event',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '2024-01-01T00:00:00.000Z',\n    changelog: [{ version: '0.7.0', prs: [371], description: 'Added gcp.function.context.timestamp attribute' }],\n  },\n  'gcp.function.context.type': {\n    brief: 'The type of the GCP Cloud Function event context',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'cloud_functions.context',\n    changelog: [{ version: '0.7.0', prs: [371], description: 'Added gcp.function.context.type attribute' }],\n  },\n  'gcp.project.id': {\n    brief: 'The ID of the project in GCP that this resource is associated with',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'my-project-123',\n    changelog: [{ version: '0.11.0', prs: [403] }],\n  },\n  'gen_ai.agent.name': {\n    brief: 'The name of the agent being used.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'ResearchAssistant',\n    changelog: [{ version: '0.1.0', prs: [62, 127] }],\n  },\n  'gen_ai.context.utilization': {\n    brief: 'The fraction of the model context window utilized by this generation.',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 0.75,\n    changelog: [{ version: '0.5.0', prs: [315], description: 'Added gen_ai.context.utilization attribute' }],\n  },\n  'gen_ai.context.window_size': {\n    brief: 'The maximum context window size supported by the model for this generation.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 128000,\n    changelog: [{ version: '0.5.0', prs: [315], description: 'Added gen_ai.context.window_size attribute' }],\n  },\n  'gen_ai.conversation.id': {\n    brief:\n      'The unique identifier for a conversation (session, thread), used to store and correlate messages within this conversation.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'conv_5j66UpCpwteGg4YSxUnt7lPY',\n    changelog: [{ version: '0.4.0', prs: [250] }],\n  },\n  'gen_ai.cost.cache_creation.input_tokens': {\n    brief: 'The cost of input tokens written to cache in USD.',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 12.34,\n    changelog: [{ version: '0.16.0', description: 'Added gen_ai.cost.cache_creation.input_tokens attribute' }],\n    additionalContext: [\n      'This attribute appears on both agent parent spans (aggregated totals) and LLM child spans (per-call values). When using sum() to calculate total cost, filter to gen_ai.operation.type:ai_client to avoid double-counting hierarchical spans.',\n      \"Despite the name 'cost.cache_creation.input_tokens', this value is cost in USD, not a token count. For token counts, use gen_ai.usage.cache_creation.input_tokens.\",\n      'This is a subset of gen_ai.cost.input_tokens, not an independent cost. Do not sum this with gen_ai.cost.input_tokens — it is already included.',\n    ],\n  },\n  'gen_ai.cost.cache_read.input_tokens': {\n    brief: 'The cost of cached input tokens in USD.',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 12.34,\n    changelog: [{ version: '0.16.0', description: 'Added gen_ai.cost.cache_read.input_tokens attribute' }],\n    additionalContext: [\n      'This attribute appears on both agent parent spans (aggregated totals) and LLM child spans (per-call values). When using sum() to calculate total cost, filter to gen_ai.operation.type:ai_client to avoid double-counting hierarchical spans.',\n      \"Despite the name 'cost.cache_read.input_tokens', this value is cost in USD, not a token count. For token counts, use gen_ai.usage.cache_read.input_tokens.\",\n      'This is a subset of gen_ai.cost.input_tokens, not an independent cost. Do not sum this with gen_ai.cost.input_tokens — it is already included.',\n    ],\n  },\n  'gen_ai.cost.input_tokens': {\n    brief: 'The total cost of all input tokens in USD (includes cached and cache creation tokens).',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 123.45,\n    changelog: [\n      { version: '0.9.0', prs: [397], description: 'Add additional_context' },\n      { version: '0.4.0', prs: [228] },\n      { version: '0.1.0', prs: [112] },\n    ],\n    additionalContext: [\n      'This attribute appears on both agent parent spans (aggregated totals) and LLM child spans (per-call values). When using sum() to calculate total cost, filter to gen_ai.operation.type:ai_client to avoid double-counting hierarchical spans.',\n      \"Despite the name 'cost.input_tokens', this value is cost in USD, not a token count. For token counts, use gen_ai.usage.input_tokens.\",\n      'This is the total cost of all input tokens, including cached and cache creation tokens at their respective rates. For the cached portion, see gen_ai.cost.cache_read.input_tokens. For the cache creation portion, see gen_ai.cost.cache_creation.input_tokens.',\n    ],\n  },\n  'gen_ai.cost.output_tokens': {\n    brief: 'The total cost of all output tokens in USD (includes reasoning tokens).',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 123.45,\n    changelog: [\n      { version: '0.9.0', prs: [397], description: 'Add additional_context' },\n      { version: '0.4.0', prs: [228] },\n      { version: '0.1.0', prs: [112] },\n    ],\n    additionalContext: [\n      'This attribute appears on both agent parent spans (aggregated totals) and LLM child spans (per-call values). When using sum() to calculate total cost, filter to gen_ai.operation.type:ai_client to avoid double-counting hierarchical spans.',\n      \"Despite the name 'cost.output_tokens', this value is cost in USD, not a token count. For token counts, use gen_ai.usage.output_tokens.\",\n      'This is the total cost of all output tokens, including reasoning tokens at their respective rate. For the reasoning portion, see gen_ai.cost.reasoning.output_tokens.',\n    ],\n  },\n  'gen_ai.cost.reasoning.output_tokens': {\n    brief: 'The cost of reasoning output tokens in USD.',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 12.34,\n    changelog: [{ version: '0.16.0', description: 'Added gen_ai.cost.reasoning.output_tokens attribute' }],\n    additionalContext: [\n      'This attribute appears on both agent parent spans (aggregated totals) and LLM child spans (per-call values). When using sum() to calculate total cost, filter to gen_ai.operation.type:ai_client to avoid double-counting hierarchical spans.',\n      \"Despite the name 'cost.reasoning.output_tokens', this value is cost in USD, not a token count. For token counts, use gen_ai.usage.reasoning.output_tokens.\",\n      'This is a subset of gen_ai.cost.output_tokens, not an independent cost. Do not sum this with gen_ai.cost.output_tokens — it is already included.',\n    ],\n  },\n  'gen_ai.cost.total_tokens': {\n    brief: 'The total cost for the tokens used.',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 12.34,\n    aliases: ['ai.total_cost'],\n    changelog: [\n      { version: '0.9.0', prs: [397], description: 'Add additional_context' },\n      { version: '0.5.0', prs: [264] },\n      { version: '0.4.0', prs: [228] },\n      { version: '0.1.0', prs: [126] },\n    ],\n    additionalContext: [\n      'This attribute appears on both agent parent spans (aggregated totals) and LLM child spans (per-call values). When using sum() to calculate total cost, filter to gen_ai.operation.type:ai_client to avoid double-counting hierarchical spans.',\n      \"Despite the name 'cost.total_tokens', this value is cost in USD, not a token count. For token counts, use gen_ai.usage.total_tokens.\",\n    ],\n  },\n  'gen_ai.embeddings.input': {\n    brief: 'The input to the embeddings model.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: \"What's the weather in Paris?\",\n    changelog: [{ version: '0.3.1', prs: [195] }],\n  },\n  'gen_ai.function_id': {\n    brief:\n      'Framework-specific tracing label for the execution of a function or other unit of execution in a generative AI system.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'my-awesome-function',\n    changelog: [{ version: '0.5.0', prs: [308], description: 'Added gen_ai.function_id attribute' }],\n  },\n  'gen_ai.input.messages': {\n    brief:\n      'The messages passed to the model. It has to be a stringified version of an array of objects. The `role` attribute of each object must be `\"user\"`, `\"assistant\"`, `\"tool\"`, or `\"system\"`. For messages of the role `\"tool\"`, the `content` can be a string or an arbitrary object with information about the tool call. For other messages the `content` can be either a string or a list of objects in the format `{type: \"text\", text:\"...\"}`.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example:\n      '[{\"role\": \"user\", \"parts\": [{\"type\": \"text\", \"content\": \"Weather in Paris?\"}]}, {\"role\": \"assistant\", \"parts\": [{\"type\": \"tool_call\", \"id\": \"call_VSPygqKTWdrhaFErNvMV18Yl\", \"name\": \"get_weather\", \"arguments\": {\"location\": \"Paris\"}}]}, {\"role\": \"tool\", \"parts\": [{\"type\": \"tool_call_response\", \"id\": \"call_VSPygqKTWdrhaFErNvMV18Yl\", \"result\": \"rainy, 57°F\"}]}]',\n    aliases: ['ai.texts'],\n    changelog: [\n      { version: '0.5.0', prs: [264] },\n      { version: '0.4.0', prs: [221] },\n    ],\n  },\n  'gen_ai.operation.name': {\n    brief:\n      \"The name of the operation being performed. It has the following list of well-known values: 'chat', 'create_agent', 'embeddings', 'execute_tool', 'generate_content', 'invoke_agent', 'text_completion'. If one of them applies, then that value MUST be used. Otherwise a custom value MAY be used.\",\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'chat',\n    changelog: [\n      { version: '0.4.0', prs: [225] },\n      { version: '0.1.0', prs: [62, 127] },\n    ],\n  },\n  'gen_ai.operation.type': {\n    brief:\n      \"The type of AI operation. Must be one of 'agent' (invoke_agent and create_agent spans), 'ai_client' (any LLM call), 'tool' (execute_tool spans), 'handoff' (handoff spans), 'other' (input and output processors, skill loading, guardrails etc.) . Added during ingestion based on span.op and gen_ai.operation.type. Used to filter and aggregate data in the UI\",\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'tool',\n    changelog: [\n      { version: '0.4.0', prs: [257] },\n      { version: '0.1.0', prs: [113, 127] },\n    ],\n  },\n  'gen_ai.output.messages': {\n    brief:\n      \"The model's response messages. It has to be a stringified version of an array of message objects, which can include text responses and tool calls.\",\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example:\n      '[{\"role\": \"assistant\", \"parts\": [{\"type\": \"text\", \"content\": \"The weather in Paris is currently rainy with a temperature of 57°F.\"}], \"finish_reason\": \"stop\"}]',\n    changelog: [{ version: '0.4.0', prs: [221] }],\n  },\n  'gen_ai.pipeline.name': {\n    brief: 'Name of the AI pipeline or chain being executed.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'Autofix Pipeline',\n    aliases: ['ai.pipeline.name'],\n    changelog: [{ version: '0.1.0', prs: [76, 127] }],\n  },\n  'gen_ai.prompt': {\n    brief: 'The input messages sent to the model',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: '[{\"role\": \"user\", \"message\": \"hello\"}]',\n    deprecation: {\n      reason: 'Deprecated from OTEL, use gen_ai.input.messages with the new format instead.',\n    },\n    changelog: [{ version: '0.1.0', prs: [74, 108, 119] }, { version: '0.0.0' }],\n  },\n  'gen_ai.prompt.name': {\n    brief: 'The name of the prompt that uniquely identifies it.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n      reason: 'Prompt names may reveal user behavior patterns or sensitive operations',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'summarize_text',\n    aliases: ['mcp.prompt.name'],\n    changelog: [{ version: '0.12.0', prs: [420], description: 'Added gen_ai.prompt.name attribute' }],\n  },\n  'gen_ai.provider.name': {\n    brief: 'The Generative AI provider as identified by the client or server instrumentation.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'openai',\n    aliases: ['ai.model.provider', 'gen_ai.system'],\n    changelog: [{ version: '0.4.0', prs: [253] }],\n  },\n  'gen_ai.request.available_tools': {\n    brief: 'The available tools for the model. It has to be a stringified version of an array of objects.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example:\n      '[{\"name\": \"get_weather\", \"description\": \"Get the weather for a given location\"}, {\"name\": \"get_news\", \"description\": \"Get the news for a given topic\"}]',\n    deprecation: {\n      replacement: 'gen_ai.tool.definitions',\n    },\n    changelog: [\n      { version: '0.4.0', prs: [221] },\n      { version: '0.1.0', prs: [63, 127] },\n    ],\n  },\n  'gen_ai.request.frequency_penalty': {\n    brief:\n      'Used to reduce repetitiveness of generated tokens. The higher the value, the stronger a penalty is applied to previously present tokens, proportional to how many times they have already appeared in the prompt or prior generation.',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 0.5,\n    aliases: ['ai.frequency_penalty'],\n    changelog: [\n      { version: '0.4.0', prs: [228] },\n      { version: '0.1.0', prs: [57] },\n    ],\n  },\n  'gen_ai.request.max_tokens': {\n    brief: 'The maximum number of tokens to generate in the response.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 2048,\n    changelog: [\n      { version: '0.4.0', prs: [228] },\n      { version: '0.1.0', prs: [62] },\n    ],\n  },\n  'gen_ai.request.messages': {\n    brief:\n      'The messages passed to the model. It has to be a stringified version of an array of objects. The `role` attribute of each object must be `\"user\"`, `\"assistant\"`, `\"tool\"`, or `\"system\"`. For messages of the role `\"tool\"`, the `content` can be a string or an arbitrary object with information about the tool call. For other messages the `content` can be either a string or a list of objects in the format `{type: \"text\", text:\"...\"}`.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example:\n      '[{\"role\": \"system\", \"content\": \"Generate a random number.\"}, {\"role\": \"user\", \"content\": [{\"text\": \"Generate a random number between 0 and 10.\", \"type\": \"text\"}]}, {\"role\": \"tool\", \"content\": {\"toolCallId\": \"1\", \"toolName\": \"Weather\", \"output\": \"rainy\"}}]',\n    deprecation: {\n      replacement: 'gen_ai.input.messages',\n    },\n    aliases: ['ai.input_messages'],\n    changelog: [\n      { version: '0.4.0', prs: [221] },\n      { version: '0.1.0', prs: [63, 74, 108, 119, 122] },\n    ],\n  },\n  'gen_ai.request.model': {\n    brief: 'The model identifier being used for the request.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'gpt-4-turbo-preview',\n    changelog: [{ version: '0.1.0', prs: [62, 127] }],\n  },\n  'gen_ai.request.presence_penalty': {\n    brief:\n      'Used to reduce repetitiveness of generated tokens. Similar to frequency_penalty, except that this penalty is applied equally to all tokens that have already appeared, regardless of their exact frequencies.',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 0.5,\n    aliases: ['ai.presence_penalty'],\n    changelog: [\n      { version: '0.4.0', prs: [228] },\n      { version: '0.1.0', prs: [57] },\n    ],\n  },\n  'gen_ai.request.reasoning_effort': {\n    brief: 'Constrains the effort on reasoning for reasoning models. Supported values vary by provider.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'high',\n    changelog: [{ version: '0.13.0', prs: [334], description: 'Added gen_ai.request.reasoning_effort attribute' }],\n  },\n  'gen_ai.request.seed': {\n    brief: 'The seed, ideally models given the same seed and same other parameters will produce the exact same output.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: '1234567890',\n    aliases: ['ai.seed'],\n    changelog: [{ version: '0.1.0', prs: [57, 127] }],\n  },\n  'gen_ai.request.stop_sequences': {\n    brief: 'List of sequences that the model will use to stop generating further tokens.',\n    type: 'string[]',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: ['forest', 'lived'],\n    changelog: [{ version: '0.16.0', prs: [482], description: 'Added gen_ai.request.stop_sequences attribute' }],\n  },\n  'gen_ai.request.temperature': {\n    brief:\n      'For an AI model call, the temperature parameter. Temperature essentially means how random the output will be.',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 0.1,\n    aliases: ['ai.temperature'],\n    changelog: [\n      { version: '0.4.0', prs: [228] },\n      { version: '0.1.0', prs: [57] },\n    ],\n  },\n  'gen_ai.request.top_k': {\n    brief:\n      'Limits the model to only consider the K most likely next tokens, where K is an integer (e.g., top_k=20 means only the 20 highest probability tokens are considered).',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 35,\n    aliases: ['ai.top_k'],\n    changelog: [\n      { version: '0.4.0', prs: [228] },\n      { version: '0.1.0', prs: [57] },\n    ],\n  },\n  'gen_ai.request.top_p': {\n    brief:\n      'Limits the model to only consider tokens whose cumulative probability mass adds up to p, where p is a float between 0 and 1 (e.g., top_p=0.7 means only tokens that sum up to 70% of the probability mass are considered).',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 0.7,\n    aliases: ['ai.top_p'],\n    changelog: [\n      { version: '0.4.0', prs: [228] },\n      { version: '0.1.0', prs: [57] },\n    ],\n  },\n  'gen_ai.response.finish_reasons': {\n    brief: 'The reason why the model stopped generating.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'COMPLETE',\n    aliases: ['ai.finish_reason'],\n    changelog: [{ version: '0.1.0', prs: [57, 127] }],\n  },\n  'gen_ai.response.id': {\n    brief: 'Unique identifier for the completion.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'gen_123abc',\n    aliases: ['ai.generation_id'],\n    changelog: [{ version: '0.1.0', prs: [57, 127] }],\n  },\n  'gen_ai.response.model': {\n    brief: 'The vendor-specific ID of the model used.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'gpt-4',\n    aliases: ['ai.model_id'],\n    changelog: [{ version: '0.1.0', prs: [127] }, { version: '0.0.0' }],\n  },\n  'gen_ai.response.streaming': {\n    brief: \"Whether or not the AI model call's response was streamed back asynchronously\",\n    type: 'boolean',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: true,\n    aliases: ['ai.streaming'],\n    changelog: [{ version: '0.1.0', prs: [76] }],\n  },\n  'gen_ai.response.text': {\n    brief:\n      \"The model's response text messages. It has to be a stringified version of an array of response text messages.\",\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example:\n      '[\"The weather in Paris is rainy and overcast, with temperatures around 57°F\", \"The weather in London is sunny and warm, with temperatures around 65°F\"]',\n    deprecation: {\n      replacement: 'gen_ai.output.messages',\n    },\n    changelog: [\n      { version: '0.4.0', prs: [221] },\n      { version: '0.1.0', prs: [63, 74] },\n    ],\n  },\n  'gen_ai.response.time_to_first_chunk': {\n    brief: 'Time in seconds when the first response content chunk arrived in streaming responses.',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 0.6853435,\n    aliases: ['gen_ai.response.time_to_first_token'],\n    changelog: [{ version: '0.11.0', prs: [418], description: 'Added gen_ai.response.time_to_first_chunk attribute' }],\n  },\n  'gen_ai.response.time_to_first_token': {\n    brief: 'Time in seconds when the first response content chunk arrived in streaming responses.',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 0.6853435,\n    deprecation: {\n      replacement: 'gen_ai.response.time_to_first_chunk',\n    },\n    aliases: ['gen_ai.response.time_to_first_chunk'],\n    changelog: [\n      { version: '0.11.0', prs: [418], description: 'Deprecate in favor of gen_ai.response.time_to_first_chunk' },\n      { version: '0.4.0', prs: [227] },\n    ],\n  },\n  'gen_ai.response.tokens_per_second': {\n    brief: 'The total output tokens per seconds throughput',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 12345.67,\n    changelog: [\n      { version: '0.4.0', prs: [228] },\n      { version: '0.1.0', prs: [66] },\n    ],\n  },\n  'gen_ai.response.tool_calls': {\n    brief: \"The tool calls in the model's response. It has to be a stringified version of an array of objects.\",\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '[{\"name\": \"get_weather\", \"arguments\": {\"location\": \"Paris\"}}]',\n    deprecation: {\n      replacement: 'gen_ai.output.messages',\n    },\n    changelog: [\n      { version: '0.4.0', prs: [221] },\n      { version: '0.1.0', prs: [63, 74] },\n    ],\n  },\n  'gen_ai.system': {\n    brief: 'The provider of the model.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'openai',\n    deprecation: {\n      replacement: 'gen_ai.provider.name',\n    },\n    aliases: ['ai.model.provider', 'gen_ai.provider.name'],\n    changelog: [\n      { version: '0.4.0', prs: [253] },\n      { version: '0.1.0', prs: [57, 127] },\n    ],\n  },\n  'gen_ai.system_instructions': {\n    brief: 'The system instructions passed to the model.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'You are a helpful assistant',\n    aliases: ['ai.preamble'],\n    changelog: [\n      { version: '0.5.0', prs: [264] },\n      { version: '0.4.0', prs: [221] },\n    ],\n  },\n  'gen_ai.system.message': {\n    brief: 'The system instructions passed to the model.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'You are a helpful assistant',\n    deprecation: {\n      replacement: 'gen_ai.system_instructions',\n    },\n    changelog: [\n      { version: '0.4.0', prs: [221] },\n      { version: '0.1.0', prs: [62] },\n    ],\n  },\n  'gen_ai.tool.call.arguments': {\n    brief: 'The arguments of the tool call. It has to be a stringified version of the arguments to the tool.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: '{\"location\": \"Paris\"}',\n    aliases: ['gen_ai.tool.input'],\n    changelog: [\n      { version: '0.5.0', prs: [265] },\n      { version: '0.4.0', prs: [221] },\n    ],\n  },\n  'gen_ai.tool.call.result': {\n    brief: 'The result of the tool call. It has to be a stringified version of the result of the tool.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'rainy, 57°F',\n    aliases: ['gen_ai.tool.output', 'gen_ai.tool.message', 'mcp.tool.result.content'],\n    changelog: [\n      { version: '0.5.0', prs: [265] },\n      { version: '0.4.0', prs: [221] },\n    ],\n  },\n  'gen_ai.tool.definitions': {\n    brief: 'The list of source system tool definitions available to the GenAI agent or model.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example:\n      '[{\"type\": \"function\", \"name\": \"get_current_weather\", \"description\": \"Get the current weather in a given location\", \"parameters\": {\"type\": \"object\", \"properties\": {\"location\": {\"type\": \"string\", \"description\": \"The city and state, e.g. San Francisco, CA\"}, \"unit\": {\"type\": \"string\", \"enum\": [\"celsius\", \"fahrenheit\"]}}, \"required\": [\"location\", \"unit\"]}}]',\n    changelog: [{ version: '0.4.0', prs: [221] }],\n  },\n  'gen_ai.tool.description': {\n    brief: 'The description of the tool being used.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'Searches the web for current information about a topic',\n    changelog: [{ version: '0.1.0', prs: [62, 127] }],\n  },\n  'gen_ai.tool.input': {\n    brief: 'The input of the tool being used. It has to be a stringified version of the input to the tool.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '{\"location\": \"Paris\"}',\n    deprecation: {\n      replacement: 'gen_ai.tool.call.arguments',\n    },\n    aliases: ['gen_ai.tool.call.arguments'],\n    changelog: [\n      { version: '0.5.0', prs: [265] },\n      { version: '0.1.0', prs: [63, 74] },\n    ],\n  },\n  'gen_ai.tool.message': {\n    brief: 'The response from a tool or function call passed to the model.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'rainy, 57°F',\n    deprecation: {\n      replacement: 'gen_ai.tool.call.result',\n    },\n    aliases: ['gen_ai.tool.call.result', 'gen_ai.tool.output', 'mcp.tool.result.content'],\n    changelog: [\n      { version: '0.5.0', prs: [265] },\n      { version: '0.1.0', prs: [62] },\n    ],\n  },\n  'gen_ai.tool.name': {\n    brief: 'Name of the tool utilized by the agent.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'Flights',\n    aliases: ['ai.function_call', 'mcp.tool.name'],\n    changelog: [{ version: '0.1.0', prs: [57, 127] }],\n  },\n  'gen_ai.tool.output': {\n    brief: 'The output of the tool being used. It has to be a stringified version of the output of the tool.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'rainy, 57°F',\n    deprecation: {\n      replacement: 'gen_ai.tool.call.result',\n    },\n    aliases: ['gen_ai.tool.call.result', 'gen_ai.tool.message', 'mcp.tool.result.content'],\n    changelog: [\n      { version: '0.5.0', prs: [265] },\n      { version: '0.1.0', prs: [63, 74] },\n    ],\n  },\n  'gen_ai.tool.type': {\n    brief: 'The type of tool being used.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'function',\n    deprecation: {\n      reason: 'The gen_ai.tool.type attribute is deprecated and should no longer be set.',\n    },\n    changelog: [{ version: '0.1.0', prs: [62, 127] }],\n  },\n  'gen_ai.usage.cache_creation.input_tokens': {\n    brief: 'The number of tokens written to the cache when processing the AI input (prompt).',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 100,\n    aliases: ['gen_ai.usage.input_tokens.cache_write'],\n    changelog: [\n      { version: '0.11.0', prs: [418], description: 'Added gen_ai.usage.cache_creation.input_tokens attribute' },\n    ],\n    additionalContext: [\n      'This attribute appears on both agent parent spans (aggregated totals) and LLM child spans (per-call values). When using sum() to count tokens, filter to gen_ai.operation.type:ai_client to avoid double-counting hierarchical spans.',\n    ],\n  },\n  'gen_ai.usage.cache_read.input_tokens': {\n    brief: 'The number of cached tokens used to process the AI input (prompt).',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 50,\n    aliases: ['gen_ai.usage.input_tokens.cached'],\n    changelog: [{ version: '0.11.0', prs: [418], description: 'Added gen_ai.usage.cache_read.input_tokens attribute' }],\n    additionalContext: [\n      'This attribute appears on both agent parent spans (aggregated totals) and LLM child spans (per-call values). When using sum() to count tokens, filter to gen_ai.operation.type:ai_client to avoid double-counting hierarchical spans.',\n      'This is a subset of gen_ai.usage.input_tokens, not an independent count. Do not sum this with gen_ai.usage.input_tokens — it is already included.',\n    ],\n  },\n  'gen_ai.usage.completion_tokens': {\n    brief: 'The number of tokens used in the GenAI response (completion).',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 10,\n    deprecation: {\n      replacement: 'gen_ai.usage.output_tokens',\n    },\n    aliases: ['ai.completion_tokens.used', 'gen_ai.usage.output_tokens'],\n    changelog: [\n      { version: '0.9.0', prs: [397], description: 'Add additional_context' },\n      { version: '0.4.0', prs: [228] },\n      { version: '0.1.0', prs: [61] },\n      { version: '0.0.0' },\n    ],\n    additionalContext: [\n      'This attribute appears on both agent parent spans (aggregated totals) and LLM child spans (per-call values). When using sum() to count tokens, filter to gen_ai.operation.type:ai_client to avoid double-counting hierarchical spans.',\n    ],\n  },\n  'gen_ai.usage.input_tokens': {\n    brief: 'The number of tokens used to process the AI input (prompt) including cached input tokens.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 10,\n    aliases: ['ai.prompt_tokens.used', 'gen_ai.usage.prompt_tokens'],\n    changelog: [\n      {\n        version: '0.11.0',\n        prs: [418],\n        description: 'Update additional_context to reference gen_ai.usage.cache_read.input_tokens',\n      },\n      { version: '0.9.0', prs: [397], description: 'Add additional_context' },\n      { version: '0.5.0', prs: [261] },\n      { version: '0.4.0', prs: [228] },\n      { version: '0.1.0', prs: [112] },\n      { version: '0.0.0' },\n    ],\n    additionalContext: [\n      'This attribute appears on both agent parent spans (aggregated totals) and LLM child spans (per-call values). When using sum() to count tokens, filter to gen_ai.operation.type:ai_client to avoid double-counting hierarchical spans.',\n      'This count includes cached input tokens. gen_ai.usage.cache_read.input_tokens is a subset of this value, not an independent count — do not sum them together.',\n    ],\n  },\n  'gen_ai.usage.input_tokens.cached': {\n    brief: 'The number of cached tokens used to process the AI input (prompt).',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 50,\n    deprecation: {\n      replacement: 'gen_ai.usage.cache_read.input_tokens',\n    },\n    aliases: ['gen_ai.usage.cache_read.input_tokens'],\n    changelog: [\n      { version: '0.11.0', prs: [418], description: 'Deprecate in favor of gen_ai.usage.cache_read.input_tokens' },\n      { version: '0.9.0', prs: [397], description: 'Add additional_context' },\n      { version: '0.4.0', prs: [228] },\n      { version: '0.1.0', prs: [62, 112] },\n    ],\n    additionalContext: [\n      'This attribute appears on both agent parent spans (aggregated totals) and LLM child spans (per-call values). When using sum() to count tokens, filter to gen_ai.operation.type:ai_client to avoid double-counting hierarchical spans.',\n      'This is a subset of gen_ai.usage.input_tokens, not an independent count. Do not sum this with gen_ai.usage.input_tokens — it is already included.',\n    ],\n  },\n  'gen_ai.usage.input_tokens.cache_write': {\n    brief: 'The number of tokens written to the cache when processing the AI input (prompt).',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 100,\n    deprecation: {\n      replacement: 'gen_ai.usage.cache_creation.input_tokens',\n    },\n    aliases: ['gen_ai.usage.cache_creation.input_tokens'],\n    changelog: [\n      { version: '0.11.0', prs: [418], description: 'Deprecate in favor of gen_ai.usage.cache_creation.input_tokens' },\n      { version: '0.9.0', prs: [397], description: 'Add additional_context' },\n      { version: '0.4.0', prs: [217, 228] },\n    ],\n    additionalContext: [\n      'This attribute appears on both agent parent spans (aggregated totals) and LLM child spans (per-call values). When using sum() to count tokens, filter to gen_ai.operation.type:ai_client to avoid double-counting hierarchical spans.',\n    ],\n  },\n  'gen_ai.usage.output_tokens': {\n    brief: 'The number of tokens used for creating the AI output (including reasoning tokens).',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 10,\n    aliases: ['ai.completion_tokens.used', 'gen_ai.usage.completion_tokens'],\n    changelog: [\n      {\n        version: '0.11.0',\n        prs: [418],\n        description: 'Update additional_context to reference gen_ai.usage.reasoning.output_tokens',\n      },\n      { version: '0.9.0', prs: [397], description: 'Add additional_context' },\n      { version: '0.5.0', prs: [261] },\n      { version: '0.4.0', prs: [228] },\n      { version: '0.1.0', prs: [112] },\n      { version: '0.0.0' },\n    ],\n    additionalContext: [\n      'This attribute appears on both agent parent spans (aggregated totals) and LLM child spans (per-call values). When using sum() to count tokens, filter to gen_ai.operation.type:ai_client to avoid double-counting hierarchical spans.',\n      'This count includes reasoning tokens. gen_ai.usage.reasoning.output_tokens is a subset of this value, not an independent count — do not sum them together.',\n    ],\n  },\n  'gen_ai.usage.output_tokens.reasoning': {\n    brief: 'The number of tokens used for reasoning to create the AI output.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 75,\n    deprecation: {\n      replacement: 'gen_ai.usage.reasoning.output_tokens',\n    },\n    aliases: ['gen_ai.usage.reasoning.output_tokens'],\n    changelog: [\n      { version: '0.11.0', prs: [418], description: 'Deprecate in favor of gen_ai.usage.reasoning.output_tokens' },\n      { version: '0.9.0', prs: [397], description: 'Add additional_context' },\n      { version: '0.4.0', prs: [228] },\n      { version: '0.1.0', prs: [62, 112] },\n    ],\n    additionalContext: [\n      'This attribute appears on both agent parent spans (aggregated totals) and LLM child spans (per-call values). When using sum() to count tokens, filter to gen_ai.operation.type:ai_client to avoid double-counting hierarchical spans.',\n      'This is a subset of gen_ai.usage.output_tokens, not an independent count. Do not sum this with gen_ai.usage.output_tokens — it is already included.',\n    ],\n  },\n  'gen_ai.usage.prompt_tokens': {\n    brief: 'The number of tokens used in the GenAI input (prompt).',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 20,\n    deprecation: {\n      replacement: 'gen_ai.usage.input_tokens',\n    },\n    aliases: ['ai.prompt_tokens.used', 'gen_ai.usage.input_tokens'],\n    changelog: [\n      { version: '0.9.0', prs: [397], description: 'Add additional_context' },\n      { version: '0.4.0', prs: [228] },\n      { version: '0.1.0', prs: [61] },\n      { version: '0.0.0' },\n    ],\n    additionalContext: [\n      'This attribute appears on both agent parent spans (aggregated totals) and LLM child spans (per-call values). When using sum() to count tokens, filter to gen_ai.operation.type:ai_client to avoid double-counting hierarchical spans.',\n    ],\n  },\n  'gen_ai.usage.reasoning.output_tokens': {\n    brief: 'The number of tokens used for reasoning to create the AI output.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 75,\n    aliases: ['gen_ai.usage.output_tokens.reasoning'],\n    changelog: [{ version: '0.11.0', prs: [418], description: 'Added gen_ai.usage.reasoning.output_tokens attribute' }],\n    additionalContext: [\n      'This attribute appears on both agent parent spans (aggregated totals) and LLM child spans (per-call values). When using sum() to count tokens, filter to gen_ai.operation.type:ai_client to avoid double-counting hierarchical spans.',\n      'This is a subset of gen_ai.usage.output_tokens, not an independent count. Do not sum this with gen_ai.usage.output_tokens — it is already included.',\n    ],\n  },\n  'gen_ai.usage.total_tokens': {\n    brief: 'The total number of tokens used to process the prompt. (input tokens plus output todkens)',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 20,\n    aliases: ['ai.total_tokens.used'],\n    changelog: [\n      { version: '0.9.0', prs: [397], description: 'Add additional_context' },\n      { version: '0.4.0', prs: [228] },\n      { version: '0.1.0', prs: [57] },\n    ],\n    additionalContext: [\n      'This attribute appears on both agent parent spans (aggregated totals) and LLM child spans (per-call values). When using sum() to count tokens, filter to gen_ai.operation.type:ai_client to avoid double-counting hierarchical spans.',\n      'This is the sum of gen_ai.usage.input_tokens and gen_ai.usage.output_tokens. Do not sum this with either of them — they are already included.',\n    ],\n  },\n  'graphql.document': {\n    brief: 'The GraphQL document being executed.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'auto',\n      reason:\n        'The document may contain sensitive information in arguments or variables. Instrumentation should redact sensitive information when possible.',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'query findBookById { bookById(id: ?) { name } }',\n    changelog: [\n      {\n        version: '0.7.0',\n        description: 'Adds the `graphql.document` attribute to track the GraphQL document being executed.',\n      },\n    ],\n  },\n  'graphql.operation.name': {\n    brief: 'The name of the operation being executed.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'findBookById',\n    changelog: [{ version: '0.1.0', prs: [127] }, { version: '0.0.0' }],\n  },\n  'graphql.operation.type': {\n    brief: 'The type of the operation being executed.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'query',\n    changelog: [{ version: '0.1.0', prs: [127] }, { version: '0.0.0' }],\n  },\n  hardwareConcurrency: {\n    brief: 'The number of logical CPU cores available.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '14',\n    deprecation: {\n      replacement: 'device.processor_count',\n      reason: 'Old namespace-less attribute, to be replaced with device.processor_count for span-first future',\n    },\n    aliases: ['device.processor_count'],\n    changelog: [\n      {\n        version: '0.5.0',\n        prs: [281, 300],\n        description: \"Added and deprecated attribute to document JS SDK's current behaviour\",\n      },\n    ],\n  },\n  'http.client_ip': {\n    brief:\n      'Client address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'example.com',\n    deprecation: {\n      replacement: 'client.address',\n    },\n    aliases: ['client.address'],\n    changelog: [{ version: '0.1.0', prs: [61, 106, 127] }, { version: '0.0.0' }],\n  },\n  'http.decoded_response_content_length': {\n    brief: 'The decoded body size of the response (in bytes).',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 456,\n    changelog: [{ version: '0.4.0', prs: [228] }, { version: '0.0.0' }],\n  },\n  'http.flavor': {\n    brief: 'The actual version of the protocol used for network communication.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: '1.1',\n    deprecation: {\n      replacement: 'network.protocol.version',\n    },\n    aliases: ['network.protocol.version', 'net.protocol.version'],\n    changelog: [{ version: '0.1.0', prs: [61, 108, 127] }, { version: '0.0.0' }],\n  },\n  'http.fragment': {\n    brief:\n      'The fragments present in the URI. Note that this contains the leading # character, while the `url.fragment` attribute does not.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '#details',\n    changelog: [{ version: '0.0.0' }],\n  },\n  'http.host': {\n    brief: 'The domain name.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'example.com',\n    deprecation: {\n      replacement: 'server.address',\n      reason: 'Deprecated, use one of `server.address` or `client.address`, depending on the usage',\n    },\n    aliases: ['server.address', 'client.address', 'http.server_name', 'net.host.name', 'server_name'],\n    changelog: [{ version: '0.1.0', prs: [61, 108, 127] }, { version: '0.0.0' }],\n  },\n  'http.method': {\n    brief: 'The HTTP method used.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'GET',\n    deprecation: {\n      replacement: 'http.request.method',\n    },\n    aliases: ['http.request.method', 'http.request_method', 'method'],\n    changelog: [{ version: '0.1.0', prs: [61, 127] }, { version: '0.0.0' }],\n  },\n  'http.query': {\n    brief:\n      'The query string present in the URL. Note that this contains the leading ? character, while the `url.query` attribute does not.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'auto',\n      reason:\n        'Query string values can contain sensitive information. Clients should attempt to scrub parameters that might contain sensitive information.',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '?foo=bar&bar=baz',\n    changelog: [{ version: '0.0.0' }],\n  },\n  'http.request.body.data': {\n    brief: 'HTTP request body data. Can be given as string or structural data of any format.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '[{\"role\": \"user\", \"message\": \"hello\"}]',\n    changelog: [{ version: '0.6.0', prs: [336], description: 'Added http.request.body.data attribute' }],\n  },\n  'http.request.connection_end': {\n    brief:\n      'The UNIX timestamp representing the time immediately after the browser finishes establishing the connection to the server to retrieve the resource. The timestamp value includes the time interval to establish the transport connection, as well as other time intervals such as TLS handshake and SOCKS authentication.',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 1732829555.15,\n    changelog: [{ version: '0.4.0', prs: [228] }, { version: '0.1.0', prs: [134] }, { version: '0.0.0' }],\n  },\n  'http.request.connect_start': {\n    brief:\n      'The UNIX timestamp representing the time immediately before the user agent starts establishing the connection to the server to retrieve the resource.',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 1732829555.111,\n    changelog: [{ version: '0.4.0', prs: [228] }, { version: '0.1.0', prs: [134] }, { version: '0.0.0' }],\n  },\n  'http.request.domain_lookup_end': {\n    brief:\n      'The UNIX timestamp representing the time immediately after the browser finishes the domain-name lookup for the resource.',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 1732829555.201,\n    changelog: [{ version: '0.4.0', prs: [228] }, { version: '0.1.0', prs: [134] }, { version: '0.0.0' }],\n  },\n  'http.request.domain_lookup_start': {\n    brief:\n      'The UNIX timestamp representing the time immediately before the browser starts the domain name lookup for the resource.',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 1732829555.322,\n    changelog: [{ version: '0.4.0', prs: [228] }, { version: '0.1.0', prs: [134] }, { version: '0.0.0' }],\n  },\n  'http.request.fetch_start': {\n    brief: 'The UNIX timestamp representing the time immediately before the browser starts to fetch the resource.',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 1732829555.389,\n    changelog: [{ version: '0.4.0', prs: [228] }, { version: '0.1.0', prs: [134] }, { version: '0.0.0' }],\n  },\n  'http.request.header.<key>': {\n    brief:\n      'HTTP request headers, <key> being the normalized HTTP Header name (lowercase), the value being the header values.',\n    type: 'string[]',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    hasDynamicSuffix: true,\n    example: \"http.request.header.custom-header=['foo', 'bar']\",\n    changelog: [\n      { version: '0.4.0', prs: [201, 204] },\n      { version: '0.1.0', prs: [103] },\n    ],\n  },\n  'http.request.method': {\n    brief: 'The HTTP method used.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'GET',\n    aliases: ['method', 'http.method', 'http.request_method'],\n    changelog: [{ version: '0.1.0', prs: [127] }, { version: '0.0.0' }],\n  },\n  'http.request_method': {\n    brief: 'The HTTP method used.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'GET',\n    deprecation: {\n      replacement: 'http.request.method',\n    },\n    aliases: ['method', 'http.method', 'http.request.method'],\n    changelog: [{ version: '0.6.0', prs: [343], description: 'Added http.request_method attribute' }],\n  },\n  'http.request.redirect_end': {\n    brief:\n      'The UNIX timestamp representing the timestamp immediately after receiving the last byte of the response of the last redirect',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 1732829558.502,\n    changelog: [\n      { version: '0.4.0', prs: [228] },\n      { version: '0.1.0', prs: [130, 134] },\n    ],\n  },\n  'http.request.redirect_start': {\n    brief: 'The UNIX timestamp representing the start time of the fetch which that initiates the redirect.',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 1732829555.495,\n    changelog: [{ version: '0.4.0', prs: [228] }, { version: '0.1.0', prs: [134] }, { version: '0.0.0' }],\n  },\n  'http.request.request_start': {\n    brief:\n      'The UNIX timestamp representing the time immediately before the browser starts requesting the resource from the server, cache, or local resource. If the transport connection fails and the browser retires the request, the value returned will be the start of the retry request.',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 1732829555.51,\n    changelog: [{ version: '0.4.0', prs: [228] }, { version: '0.1.0', prs: [134] }, { version: '0.0.0' }],\n  },\n  'http.request.resend_count': {\n    brief: 'The ordinal number of request resending attempt (for any reason, including redirects).',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 2,\n    changelog: [{ version: '0.4.0', prs: [228] }, { version: '0.0.0' }],\n  },\n  'http.request.response_end': {\n    brief:\n      'The UNIX timestamp representing the time immediately after the browser receives the last byte of the resource or immediately before the transport connection is closed, whichever comes first.',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 1732829555.89,\n    changelog: [{ version: '0.4.0', prs: [228] }, { version: '0.1.0', prs: [134] }, { version: '0.0.0' }],\n  },\n  'http.request.response_start': {\n    brief:\n      'The UNIX timestamp representing the time immediately before the browser starts requesting the resource from the server, cache, or local resource. If the transport connection fails and the browser retires the request, the value returned will be the start of the retry request.',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 1732829555.7,\n    changelog: [{ version: '0.4.0', prs: [228] }, { version: '0.1.0', prs: [134] }, { version: '0.0.0' }],\n  },\n  'http.request.same_origin': {\n    brief: \"Indicates that a URL has the same origin as the current page's origin in the browser.\",\n    type: 'boolean',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: true,\n    aliases: ['url.same_origin'],\n    changelog: [{ version: '0.16.0', prs: [456], description: 'Added http.request.same_origin attribute' }],\n  },\n  'http.request.secure_connection_start': {\n    brief:\n      'The UNIX timestamp representing the time immediately before the browser starts the handshake process to secure the current connection. If a secure connection is not used, the property returns zero.',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 1732829555.73,\n    changelog: [{ version: '0.4.0', prs: [228] }, { version: '0.1.0', prs: [134] }, { version: '0.0.0' }],\n  },\n  'http.request.time_to_first_byte': {\n    brief:\n      \"The time in seconds from the browser's timeorigin to when the first byte of the request's response was received. See https://web.dev/articles/ttfb#measure-resource-requests\",\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 1.032,\n    changelog: [\n      { version: '0.4.0', prs: [228] },\n      { version: '0.1.0', prs: [131] },\n    ],\n  },\n  'http.request.worker_start': {\n    brief:\n      'The UNIX timestamp representing the timestamp immediately before dispatching the FetchEvent if a Service Worker thread is already running, or immediately before starting the Service Worker thread if it is not already running.',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 1732829553.68,\n    changelog: [\n      { version: '0.4.0', prs: [228] },\n      { version: '0.1.0', prs: [130, 134] },\n    ],\n  },\n  'http.response.body.size': {\n    brief: 'The encoded body size of the response (in bytes).',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 123,\n    aliases: ['http.response_content_length', 'http.response.header.content-length'],\n    changelog: [{ version: '0.4.0', prs: [228] }, { version: '0.1.0', prs: [106] }, { version: '0.0.0' }],\n  },\n  'http.response_content_length': {\n    brief: 'The encoded body size of the response (in bytes).',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 123,\n    deprecation: {\n      replacement: 'http.response.body.size',\n    },\n    aliases: ['http.response.body.size', 'http.response.header.content-length'],\n    changelog: [{ version: '0.4.0', prs: [228] }, { version: '0.1.0', prs: [61, 106] }, { version: '0.0.0' }],\n  },\n  'http.response.header.content-length': {\n    brief: 'The size of the message body sent to the recipient (in bytes)',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: \"http.response.header.custom-header=['foo', 'bar']\",\n    aliases: ['http.response_content_length', 'http.response.body.size'],\n    changelog: [{ version: '0.1.0', prs: [127] }, { version: '0.0.0' }],\n  },\n  'http.response.header.<key>': {\n    brief:\n      'HTTP response headers, <key> being the normalized HTTP Header name (lowercase), the value being the header values.',\n    type: 'string[]',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    hasDynamicSuffix: true,\n    example: \"http.response.header.custom-header=['foo', 'bar']\",\n    changelog: [\n      { version: '0.4.0', prs: [201, 204] },\n      { version: '0.1.0', prs: [103] },\n    ],\n  },\n  'http.response.size': {\n    brief: 'The transfer size of the response (in bytes).',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 456,\n    aliases: ['http.response_transfer_size'],\n    changelog: [{ version: '0.4.0', prs: [228] }, { version: '0.0.0' }],\n  },\n  'http.response.status_code': {\n    brief: 'The status code of the HTTP response.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 404,\n    aliases: ['http.status_code'],\n    changelog: [{ version: '0.4.0', prs: [228] }, { version: '0.0.0' }],\n  },\n  'http.response_transfer_size': {\n    brief: 'The transfer size of the response (in bytes).',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 456,\n    deprecation: {\n      replacement: 'http.response.size',\n    },\n    aliases: ['http.response.size'],\n    changelog: [{ version: '0.4.0', prs: [228] }, { version: '0.1.0', prs: [61] }, { version: '0.0.0' }],\n  },\n  'http.route': {\n    brief: 'The matched route, that is, the path template in the format used by the respective server framework.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: '/users/:id',\n    aliases: ['url.template'],\n    changelog: [{ version: '0.1.0', prs: [127] }, { version: '0.0.0' }],\n  },\n  'http.scheme': {\n    brief: 'The URI scheme component identifying the used protocol.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'https',\n    deprecation: {\n      replacement: 'url.scheme',\n    },\n    aliases: ['url.scheme'],\n    changelog: [{ version: '0.1.0', prs: [61, 127] }, { version: '0.0.0' }],\n  },\n  'http.server_name': {\n    brief: 'The server domain name',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'example.com',\n    deprecation: {\n      replacement: 'server.address',\n    },\n    aliases: ['server.address', 'net.host.name', 'http.host', 'server_name'],\n    changelog: [{ version: '0.1.0', prs: [61, 108, 127] }, { version: '0.0.0' }],\n  },\n  'http.server.request.time_in_queue': {\n    brief:\n      'The time in milliseconds the request spent in the server queue before processing began. Measured from the X-Request-Start header set by reverse proxies (e.g., Nginx, HAProxy, Heroku) to when the application started handling the request.',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 50,\n    changelog: [{ version: '0.5.0', prs: [267] }],\n  },\n  'http.status_code': {\n    brief: 'The status code of the HTTP response.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 404,\n    deprecation: {\n      replacement: 'http.response.status_code',\n    },\n    aliases: ['http.response.status_code'],\n    changelog: [{ version: '0.4.0', prs: [228] }, { version: '0.1.0', prs: [61] }, { version: '0.0.0' }],\n  },\n  'http.target': {\n    brief: 'The pathname and query string of the URL.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: '/test?foo=bar#buzz',\n    deprecation: {\n      replacement: 'url.path',\n      reason: 'This attribute is being deprecated in favor of url.path and url.query',\n    },\n    changelog: [{ version: '0.1.0', prs: [61] }, { version: '0.0.0' }],\n  },\n  'http.url': {\n    brief: 'The URL of the resource that was fetched.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'https://example.com/test?foo=bar#buzz',\n    deprecation: {\n      replacement: 'url.full',\n    },\n    aliases: ['url.full', 'url'],\n    changelog: [{ version: '0.1.0', prs: [61, 108] }, { version: '0.0.0' }],\n  },\n  'http.user_agent': {\n    brief: 'Value of the HTTP User-Agent header sent by the client.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example:\n      'Mozilla/5.0 (iPhone; CPU iPhone OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Mobile/15E148 Safari/604.1',\n    deprecation: {\n      replacement: 'user_agent.original',\n    },\n    aliases: ['user_agent.original'],\n    changelog: [{ version: '0.1.0', prs: [61, 127] }, { version: '0.0.0' }],\n  },\n  id: {\n    brief: 'A unique identifier for the span.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'never',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'f47ac10b58cc4372a5670e02b2c3d479',\n    changelog: [{ version: '0.0.0' }],\n  },\n  inp: {\n    brief: 'The value of the recorded Interaction to Next Paint (INP) web vital',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 200,\n    deprecation: {\n      replacement: 'browser.web_vital.inp.value',\n      reason: 'The INP web vital is now recorded as a browser.web_vital.inp.value attribute.',\n    },\n    aliases: ['browser.web_vital.inp.value'],\n    changelog: [\n      {\n        version: '0.5.0',\n        prs: [229],\n        description: \"Added and deprecated attribute to document JS SDK's current behaviour\",\n      },\n    ],\n  },\n  'jsonrpc.protocol.version': {\n    brief: 'The version of the JSON-RPC protocol used.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: '2.0',\n    changelog: [{ version: '0.12.0', prs: [420], description: 'Added jsonrpc.protocol.version attribute' }],\n  },\n  'jsonrpc.request.id': {\n    brief: 'The JSON-RPC request identifier. Unique within the session.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: '1',\n    aliases: ['mcp.request.id'],\n    changelog: [{ version: '0.12.0', prs: [420], description: 'Added jsonrpc.request.id attribute' }],\n  },\n  'jvm.gc.action': {\n    brief: 'Name of the garbage collector action.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'end of minor GC',\n    changelog: [{ version: '0.1.0', prs: [127] }, { version: '0.0.0' }],\n  },\n  'jvm.gc.name': {\n    brief: 'Name of the garbage collector.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'G1 Young Generation',\n    changelog: [{ version: '0.1.0', prs: [127] }, { version: '0.0.0' }],\n  },\n  'jvm.memory.pool.name': {\n    brief: 'Name of the memory pool.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'G1 Old Gen',\n    changelog: [{ version: '0.1.0', prs: [127] }, { version: '0.0.0' }],\n  },\n  'jvm.memory.type': {\n    brief: 'Name of the memory pool.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'G1 Old Gen',\n    changelog: [{ version: '0.1.0', prs: [127] }, { version: '0.0.0' }],\n  },\n  'jvm.thread.daemon': {\n    brief: 'Whether the thread is daemon or not.',\n    type: 'boolean',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: true,\n    changelog: [{ version: '0.0.0' }],\n  },\n  'jvm.thread.state': {\n    brief: 'State of the thread.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'blocked',\n    changelog: [{ version: '0.1.0', prs: [127] }, { version: '0.0.0' }],\n  },\n  'koa.name': {\n    brief: 'The name of the Koa middleware or matched route that handled the request.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '/users/:id',\n    deprecation: {\n      reason:\n        'No single replacement. SDKs should use http.route for router layers and code.function.name for middleware layers instead.',\n    },\n    changelog: [{ version: '0.16.0', prs: [490], description: 'Added koa.name attribute as deprecated' }],\n  },\n  'koa.type': {\n    brief: 'The type of the Koa layer that handled the request.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'router',\n    changelog: [{ version: '0.16.0', prs: [471], description: 'Added koa.type attribute' }],\n  },\n  lcp: {\n    brief: 'The value of the recorded Largest Contentful Paint (LCP) web vital',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 2500,\n    deprecation: {\n      replacement: 'browser.web_vital.lcp.value',\n      reason: 'The LCP web vital is now recorded as a browser.web_vital.lcp.value attribute.',\n    },\n    aliases: ['browser.web_vital.lcp.value'],\n    changelog: [\n      {\n        version: '0.5.0',\n        prs: [229],\n        description: \"Added and deprecated attribute to document JS SDK's current behaviour\",\n      },\n    ],\n  },\n  'lcp.element': {\n    brief: 'The dom element responsible for the largest contentful paint.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'img',\n    deprecation: {\n      replacement: 'browser.web_vital.lcp.element',\n      reason: 'The LCP element is now recorded as a browser.web_vital.lcp.element attribute.',\n    },\n    aliases: ['browser.web_vital.lcp.element'],\n    changelog: [{ version: '0.5.0', prs: [233] }, { version: '0.1.0', prs: [127] }, { version: '0.0.0' }],\n  },\n  'lcp.id': {\n    brief: 'The id of the dom element responsible for the largest contentful paint.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '#hero',\n    deprecation: {\n      replacement: 'browser.web_vital.lcp.id',\n      reason: 'The LCP id is now recorded as a browser.web_vital.lcp.id attribute.',\n    },\n    aliases: ['browser.web_vital.lcp.id'],\n    changelog: [{ version: '0.5.0', prs: [233] }, { version: '0.1.0', prs: [127] }, { version: '0.0.0' }],\n  },\n  'lcp.loadTime': {\n    brief: 'The time it took for the LCP element to be loaded',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 1402,\n    deprecation: {\n      replacement: 'browser.web_vital.lcp.load_time',\n      reason: 'The LCP load time is now recorded as a browser.web_vital.lcp.load_time attribute.',\n    },\n    aliases: ['browser.web_vital.lcp.load_time'],\n    changelog: [{ version: '0.5.0', prs: [233] }],\n  },\n  'lcp.renderTime': {\n    brief: 'The time it took for the LCP element to be rendered',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 1685,\n    deprecation: {\n      replacement: 'browser.web_vital.lcp.render_time',\n      reason: 'The LCP render time is now recorded as a browser.web_vital.lcp.render_time attribute.',\n    },\n    aliases: ['browser.web_vital.lcp.render_time'],\n    changelog: [{ version: '0.5.0', prs: [233] }],\n  },\n  'lcp.size': {\n    brief: 'The size of the largest contentful paint element.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 1234,\n    deprecation: {\n      replacement: 'browser.web_vital.lcp.size',\n      reason: 'The LCP size is now recorded as a browser.web_vital.lcp.size attribute.',\n    },\n    aliases: ['browser.web_vital.lcp.size'],\n    changelog: [{ version: '0.5.0', prs: [233] }, { version: '0.4.0', prs: [228] }, { version: '0.0.0' }],\n  },\n  'lcp.url': {\n    brief: 'The url of the dom element responsible for the largest contentful paint.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'https://example.com',\n    deprecation: {\n      replacement: 'browser.web_vital.lcp.url',\n      reason: 'The LCP url is now recorded as a browser.web_vital.lcp.url attribute.',\n    },\n    aliases: ['browser.web_vital.lcp.url'],\n    changelog: [{ version: '0.5.0', prs: [233] }, { version: '0.1.0', prs: [127] }, { version: '0.0.0' }],\n  },\n  'logger.name': {\n    brief: 'The name of the logger that generated this event.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'myLogger',\n    changelog: [{ version: '0.1.0', prs: [127] }, { version: '0.0.0' }],\n  },\n  'mcp.cancelled.reason': {\n    brief: 'Reason for the cancellation of an MCP operation.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n      reason: 'Cancellation reasons may contain user-specific or sensitive information',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'User cancelled the request',\n    changelog: [{ version: '0.3.0', prs: [171] }],\n  },\n  'mcp.cancelled.request_id': {\n    brief: 'Request ID of the cancelled MCP operation.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '123',\n    changelog: [{ version: '0.3.0', prs: [171] }],\n  },\n  'mcp.client.name': {\n    brief: 'Name of the MCP client application.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'claude-desktop',\n    changelog: [{ version: '0.3.0', prs: [171] }],\n  },\n  'mcp.client.title': {\n    brief: 'Display title of the MCP client application.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n      reason: 'Client titles may reveal user-specific application configurations or custom setups',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'Claude Desktop',\n    changelog: [{ version: '0.3.0', prs: [171] }],\n  },\n  'mcp.client.version': {\n    brief: 'Version of the MCP client application.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '1.0.0',\n    changelog: [{ version: '0.3.0', prs: [171] }],\n  },\n  'mcp.lifecycle.phase': {\n    brief: 'Lifecycle phase indicator for MCP operations.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'initialization_complete',\n    changelog: [{ version: '0.3.0', prs: [171] }],\n  },\n  'mcp.logging.data_type': {\n    brief: 'Data type of the logged message content.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'string',\n    changelog: [{ version: '0.3.0', prs: [171] }],\n  },\n  'mcp.logging.level': {\n    brief: 'Log level for MCP logging operations.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'info',\n    changelog: [{ version: '0.3.0', prs: [171] }],\n  },\n  'mcp.logging.logger': {\n    brief: 'Logger name for MCP logging operations.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n      reason: 'Logger names may be user-defined and could contain sensitive information',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'mcp_server',\n    changelog: [{ version: '0.3.0', prs: [171] }],\n  },\n  'mcp.logging.message': {\n    brief: 'Log message content from MCP logging operations.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'auto',\n      reason: 'Log messages can contain user data',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'Tool execution completed successfully',\n    changelog: [{ version: '0.3.0', prs: [171] }],\n  },\n  'mcp.method.name': {\n    brief: 'The name of the MCP request or notification method being called.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'tools/call',\n    changelog: [\n      { version: '0.12.0', prs: [420], description: 'Set is_in_otel=true, attribute exists in OTel MCP registry' },\n      { version: '0.3.0', prs: [171] },\n    ],\n  },\n  'mcp.progress.current': {\n    brief: 'Current progress value of an MCP operation.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 50,\n    changelog: [\n      { version: '0.4.0', prs: [228] },\n      { version: '0.3.0', prs: [171] },\n    ],\n  },\n  'mcp.progress.message': {\n    brief: 'Progress message describing the current state of an MCP operation.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n      reason: 'Progress messages may contain user-specific or sensitive information',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'Processing 50 of 100 items',\n    changelog: [{ version: '0.3.0', prs: [171] }],\n  },\n  'mcp.progress.percentage': {\n    brief: 'Calculated progress percentage of an MCP operation. Computed from current/total * 100.',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 50,\n    changelog: [\n      { version: '0.4.0', prs: [228] },\n      { version: '0.3.0', prs: [171] },\n    ],\n  },\n  'mcp.progress.token': {\n    brief: 'Token for tracking progress of an MCP operation.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'progress-token-123',\n    changelog: [{ version: '0.3.0', prs: [171] }],\n  },\n  'mcp.progress.total': {\n    brief: 'Total progress target value of an MCP operation.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 100,\n    changelog: [\n      { version: '0.4.0', prs: [228] },\n      { version: '0.3.0', prs: [171] },\n    ],\n  },\n  'mcp.prompt.name': {\n    brief: 'Name of the MCP prompt template being used.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n      reason: 'Prompt names may reveal user behavior patterns or sensitive operations',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'summarize',\n    deprecation: {\n      replacement: 'gen_ai.prompt.name',\n      reason: 'OTel uses gen_ai.prompt.name for MCP prompt names',\n    },\n    aliases: ['gen_ai.prompt.name'],\n    changelog: [\n      { version: '0.12.0', prs: [420], description: 'Deprecated in favor of gen_ai.prompt.name' },\n      { version: '0.3.0', prs: [171] },\n    ],\n  },\n  'mcp.prompt.result.description': {\n    brief: 'Description of the prompt result.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'A summary of the requested information',\n    changelog: [{ version: '0.3.0', prs: [171] }],\n  },\n  'mcp.prompt.result.message_content': {\n    brief: 'Content of the message in the prompt result. Used for single message results only.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'Please provide a summary of the document',\n    changelog: [{ version: '0.3.0', prs: [171] }],\n  },\n  'mcp.prompt.result.message_count': {\n    brief: 'Number of messages in the prompt result.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 3,\n    changelog: [\n      { version: '0.4.0', prs: [228] },\n      { version: '0.3.0', prs: [171] },\n    ],\n  },\n  'mcp.prompt.result.message_role': {\n    brief: 'Role of the message in the prompt result. Used for single message results only.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'user',\n    changelog: [{ version: '0.3.0', prs: [171] }],\n  },\n  'mcp.protocol.ready': {\n    brief: 'Protocol readiness indicator for MCP session. Non-zero value indicates the protocol is ready.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 1,\n    changelog: [\n      { version: '0.4.0', prs: [228] },\n      { version: '0.3.0', prs: [171] },\n    ],\n  },\n  'mcp.protocol.version': {\n    brief: 'MCP protocol version used in the session.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: '2024-11-05',\n    changelog: [\n      { version: '0.12.0', prs: [420], description: 'Set is_in_otel=true, attribute exists in OTel MCP registry' },\n      { version: '0.3.0', prs: [171] },\n    ],\n  },\n  'mcp.request.argument.<key>': {\n    brief:\n      'MCP request argument with dynamic key suffix. The <key> is replaced with the actual argument name. The value is a JSON-stringified representation of the argument value.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'auto',\n      reason: 'Arguments contain user input',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    hasDynamicSuffix: true,\n    example: \"mcp.request.argument.query='weather in Paris'\",\n    changelog: [{ version: '0.3.0', prs: [176] }],\n  },\n  'mcp.request.argument.name': {\n    brief: 'Name argument from prompts/get MCP request.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'auto',\n      reason: 'Prompt names can contain user input',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'summarize',\n    changelog: [{ version: '0.3.0', prs: [171] }],\n  },\n  'mcp.request.argument.uri': {\n    brief: 'URI argument from resources/read MCP request.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'auto',\n      reason: 'URIs can contain user file paths',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'file:///path/to/resource',\n    changelog: [{ version: '0.3.0', prs: [171] }],\n  },\n  'mcp.request.id': {\n    brief: 'JSON-RPC request identifier for the MCP request. Unique within the MCP session.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '1',\n    deprecation: {\n      replacement: 'jsonrpc.request.id',\n      reason: 'OTel models MCP as JSON-RPC, uses jsonrpc.request.id',\n    },\n    aliases: ['jsonrpc.request.id'],\n    changelog: [\n      { version: '0.12.0', prs: [420], description: 'Deprecated in favor of jsonrpc.request.id' },\n      { version: '0.3.0', prs: [171] },\n    ],\n  },\n  'mcp.resource.protocol': {\n    brief: 'Protocol of the resource URI being accessed, extracted from the URI.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'file',\n    deprecation: {\n      replacement: 'network.protocol.name',\n      reason: 'OTel uses the generic network.protocol.name attribute',\n    },\n    aliases: ['network.protocol.name', 'net.protocol.name'],\n    changelog: [\n      { version: '0.12.0', prs: [420], description: 'Deprecated in favor of network.protocol.name' },\n      { version: '0.3.0', prs: [171] },\n    ],\n  },\n  'mcp.resource.uri': {\n    brief: 'The resource URI being accessed in an MCP operation.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'auto',\n      reason: 'URIs can contain sensitive file paths',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'file:///path/to/file.txt',\n    changelog: [\n      { version: '0.12.0', prs: [420], description: 'Set is_in_otel=true, attribute exists in OTel MCP registry' },\n      { version: '0.3.0', prs: [171] },\n    ],\n  },\n  'mcp.server.name': {\n    brief: 'Name of the MCP server application.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'sentry-mcp-server',\n    changelog: [{ version: '0.3.0', prs: [171] }],\n  },\n  'mcp.server.title': {\n    brief: 'Display title of the MCP server application.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n      reason: 'Server titles may reveal user-specific application configurations or custom setups',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'Sentry MCP Server',\n    changelog: [{ version: '0.3.0', prs: [171] }],\n  },\n  'mcp.server.version': {\n    brief: 'Version of the MCP server application.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '0.1.0',\n    changelog: [{ version: '0.3.0', prs: [171] }],\n  },\n  'mcp.session.id': {\n    brief: 'Identifier for the MCP session.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: '550e8400-e29b-41d4-a716-446655440000',\n    changelog: [\n      { version: '0.12.0', prs: [420], description: 'Set is_in_otel=true, attribute exists in OTel MCP registry' },\n      { version: '0.3.0', prs: [171] },\n    ],\n  },\n  'mcp.tool.name': {\n    brief: 'Name of the MCP tool being called.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'calculator',\n    deprecation: {\n      replacement: 'gen_ai.tool.name',\n      reason: 'OTel uses gen_ai.tool.name for MCP tool names',\n    },\n    aliases: ['gen_ai.tool.name', 'ai.function_call'],\n    changelog: [\n      { version: '0.12.0', prs: [420], description: 'Deprecated in favor of gen_ai.tool.name' },\n      { version: '0.3.0', prs: [171] },\n    ],\n  },\n  'mcp.tool.result.content': {\n    brief: 'The content of the tool result.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'auto',\n      reason: 'Tool results can contain user data',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '{\"output\": \"rainy\", \"toolCallId\": \"1\"}',\n    deprecation: {\n      replacement: 'gen_ai.tool.call.result',\n      reason: 'OTel uses gen_ai.tool.call.result for MCP tool results',\n    },\n    aliases: ['gen_ai.tool.call.result', 'gen_ai.tool.message', 'gen_ai.tool.output'],\n    changelog: [\n      { version: '0.12.0', prs: [420], description: 'Deprecated in favor of gen_ai.tool.call.result' },\n      { version: '0.3.0', prs: [171] },\n      { version: '0.2.0', prs: [164] },\n    ],\n  },\n  'mcp.tool.result.content_count': {\n    brief: 'Number of content items in the tool result.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 1,\n    changelog: [\n      { version: '0.4.0', prs: [228] },\n      { version: '0.3.0', prs: [171] },\n    ],\n  },\n  'mcp.tool.result.is_error': {\n    brief: 'Whether a tool execution resulted in an error.',\n    type: 'boolean',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: false,\n    deprecation: {\n      replacement: 'error.type',\n      reason:\n        \"OTel uses error.type set to 'tool_error' when isError is true. Cannot be automatically backfilled due to type mismatch (boolean vs string).\",\n    },\n    changelog: [\n      { version: '0.12.0', prs: [420], description: 'Deprecated in favor of error.type' },\n      { version: '0.3.0', prs: [171] },\n    ],\n  },\n  'mcp.transport': {\n    brief: 'Transport method used for MCP communication.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'stdio',\n    deprecation: {\n      replacement: 'network.transport',\n      reason: 'OTel uses the generic network.transport attribute',\n    },\n    aliases: ['network.transport', 'net.transport'],\n    changelog: [\n      { version: '0.12.0', prs: [420], description: 'Deprecated in favor of network.transport' },\n      { version: '0.3.0', prs: [171] },\n    ],\n  },\n  'mdc.<key>': {\n    brief:\n      \"Attributes from the Mapped Diagnostic Context (MDC) present at the moment the log record was created. The MDC is supported by all the most popular logging solutions in the Java ecosystem, and it's usually implemented as a thread-local map that stores context for e.g. a specific request.\",\n    type: 'string',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    hasDynamicSuffix: true,\n    example: \"mdc.some_key='some_value'\",\n    changelog: [{ version: '0.3.0', prs: [176] }],\n  },\n  'messaging.batch.message_count': {\n    brief: 'The number of messages sent, received, or processed in the scope of the batching operation.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 10,\n    changelog: [{ version: '0.6.0', prs: [341], description: 'Added messaging.batch.message_count attribute' }],\n  },\n  'messaging.destination': {\n    brief: 'The message destination name.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'BestTopic',\n    deprecation: {\n      replacement: 'messaging.destination.name',\n      reason:\n        'This attribute is being deprecated in favor of messaging.destination.name, which is the OTel-aligned replacement.',\n    },\n    aliases: ['messaging.destination.name'],\n    changelog: [\n      {\n        version: '0.16.0',\n        prs: [482],\n        description: 'Added messaging.destination attribute, deprecated in favor of messaging.destination.name',\n      },\n    ],\n  },\n  'messaging.destination.connection': {\n    brief: 'The message destination connection.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'BestTopic',\n    changelog: [{ version: '0.1.0', prs: [127] }, { version: '0.0.0' }],\n  },\n  'messaging.destination.name': {\n    brief: 'The message destination name.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'BestTopic',\n    aliases: ['messaging.destination'],\n    changelog: [\n      { version: '0.16.0', prs: [482], description: 'Added messaging.destination as an alias' },\n      { version: '0.1.0', prs: [127] },\n      { version: '0.0.0' },\n    ],\n  },\n  'messaging.message.body.size': {\n    brief: 'The size of the message body in bytes.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 839,\n    changelog: [{ version: '0.4.0', prs: [228] }, { version: '0.0.0' }],\n  },\n  'messaging.message.conversation_id': {\n    brief:\n      'The conversation ID identifying the conversation to which the message belongs, represented as a string. Sometimes called \"Correlation ID\".',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'MyConversationId',\n    changelog: [{ version: '0.16.0', prs: [468], description: 'Added messaging.message.conversation_id attribute' }],\n  },\n  'messaging.message.envelope.size': {\n    brief: 'The size of the message body and metadata in bytes.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 1045,\n    changelog: [{ version: '0.4.0', prs: [228] }, { version: '0.0.0' }],\n  },\n  'messaging.message.id': {\n    brief: 'A value used by the messaging system as an identifier for the message, represented as a string.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'f47ac10b58cc4372a5670e02b2c3d479',\n    changelog: [{ version: '0.1.0', prs: [127] }, { version: '0.0.0' }],\n  },\n  'messaging.message.receive.latency': {\n    brief: 'The latency between when the message was published and received.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 1732847252,\n    changelog: [{ version: '0.4.0', prs: [228] }, { version: '0.0.0' }],\n  },\n  'messaging.message.retry.count': {\n    brief: 'The amount of attempts to send the message.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 2,\n    changelog: [{ version: '0.4.0', prs: [228] }, { version: '0.0.0' }],\n  },\n  'messaging.operation.name': {\n    brief: 'The name of the messaging operation being performed',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'send',\n    changelog: [{ version: '0.11.0', prs: [392], description: 'Added messaging.operation.name attribute' }],\n  },\n  'messaging.operation.type': {\n    brief: 'A string identifying the type of the messaging operation',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'create',\n    changelog: [{ version: '0.1.0', prs: [51, 127] }],\n  },\n  'messaging.rabbitmq.destination.routing_key': {\n    brief: 'RabbitMQ message routing key.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'myKey',\n    changelog: [\n      { version: '0.16.0', prs: [468], description: 'Added messaging.rabbitmq.destination.routing_key attribute' },\n    ],\n  },\n  'messaging.system': {\n    brief: 'The messaging system as identified by the client instrumentation.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'activemq',\n    changelog: [{ version: '0.1.0', prs: [127] }, { version: '0.0.0' }],\n  },\n  method: {\n    brief: 'The HTTP method used.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'GET',\n    deprecation: {\n      replacement: 'http.request.method',\n    },\n    aliases: ['http.request.method', 'http.request_method', 'http.method'],\n    changelog: [{ version: '0.1.0', prs: [61, 127] }, { version: '0.0.0' }],\n  },\n  'middleware.name': {\n    brief: 'The name of the middleware.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'AuthenticationMiddleware',\n    changelog: [{ version: '0.6.0', prs: [336], description: 'Added middleware.name attribute' }],\n  },\n  'navigation.origin': {\n    brief:\n      'The origin of the navigation (usually client side router navigations). Should preferrably parameterized template (like url.template) or a URL path otherwise.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '/users/:id',\n    aliases: ['sentry.sveltekit.navigation.from'],\n    changelog: [{ version: '0.16.0', prs: [467], description: 'Added navigation.origin attribute' }],\n  },\n  'navigation.route.id': {\n    brief:\n      'The identifier of the matched client-side route, as assigned by the routing framework (e.g., vue-router name, react-router id).',\n    type: 'string',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'AboutView',\n    changelog: [{ version: '0.16.0', prs: [468], description: 'Added navigation.route.id attribute' }],\n  },\n  'navigation.type': {\n    brief: 'The type of navigation done by a client-side router.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'router.push',\n    aliases: ['sentry.sveltekit.navigation.type'],\n    changelog: [\n      { version: '0.16.0', prs: [467], description: 'Added new deprecated alias' },\n      { version: '0.1.0', prs: [127] },\n      { version: '0.0.0' },\n    ],\n  },\n  'nel.elapsed_time': {\n    brief:\n      'The elapsed number of milliseconds between the start of the resource fetch and when it was completed or aborted by the user agent.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 100,\n    changelog: [\n      { version: '0.4.0', prs: [228] },\n      { version: '0.1.0', prs: [68] },\n    ],\n  },\n  'nel.phase': {\n    brief: 'If request failed, the phase of its network error. If request succeeded, \"application\".',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'application',\n    changelog: [{ version: '0.1.0', prs: [68, 127] }],\n  },\n  'nel.referrer': {\n    brief: \"request's referrer, as determined by the referrer policy associated with its client.\",\n    type: 'string',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'https://example.com/foo?bar=baz',\n    changelog: [{ version: '0.1.0', prs: [68, 127] }],\n  },\n  'nel.sampling_function': {\n    brief: 'The sampling function used to determine if the request should be sampled.',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 0.5,\n    changelog: [\n      { version: '0.4.0', prs: [228] },\n      { version: '0.1.0', prs: [68] },\n    ],\n  },\n  'nel.type': {\n    brief: 'If request failed, the type of its network error. If request succeeded, \"ok\".',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'dns.unreachable',\n    changelog: [{ version: '0.1.0', prs: [68, 127] }],\n  },\n  'network.connection.effective_type': {\n    brief: 'Specifies the effective type of the current connection (e.g. slow-2g, 2g, 3g, 4g).',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '4g',\n    aliases: ['effectiveConnectionType'],\n    changelog: [\n      {\n        version: '0.5.0',\n        prs: [279],\n        description: 'Added attribute network.connection.effective_type to be used instead of effectiveConnectionType',\n      },\n    ],\n  },\n  'network.connection.rtt': {\n    brief: 'Specifies the estimated effective round-trip time of the current connection, in milliseconds.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 100,\n    aliases: ['connection.rtt'],\n    changelog: [\n      {\n        version: '0.5.0',\n        prs: [279],\n        description: 'Added attribute network.connection.rtt to be used instead of connection.rtt',\n      },\n    ],\n  },\n  'network.connection.type': {\n    brief: 'Specifies the type of the current connection (e.g. wifi, ethernet, cellular , etc).',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'wifi',\n    aliases: ['device.connection_type', 'connectionType'],\n    changelog: [\n      {\n        version: '0.5.0',\n        prs: [279],\n        description: 'Added attribute network.connection.type to be used instead of connectionType',\n      },\n    ],\n  },\n  'network.local.address': {\n    brief: 'Local address of the network connection - IP address or Unix domain socket name.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: '10.1.2.80',\n    aliases: ['net.host.ip', 'net.sock.host.addr'],\n    changelog: [{ version: '0.1.0', prs: [127] }, { version: '0.0.0' }],\n  },\n  'network.local.port': {\n    brief: 'Local port number of the network connection.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 65400,\n    aliases: ['net.sock.host.port'],\n    changelog: [{ version: '0.4.0', prs: [228] }, { version: '0.0.0' }],\n  },\n  'network.peer.address': {\n    brief: 'Peer address of the network connection - IP address or Unix domain socket name.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: '10.1.2.80',\n    aliases: ['net.peer.ip', 'net.sock.peer.addr'],\n    changelog: [{ version: '0.1.0', prs: [108, 127] }, { version: '0.0.0' }],\n  },\n  'network.peer.port': {\n    brief: 'Peer port number of the network connection.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 65400,\n    changelog: [{ version: '0.4.0', prs: [228] }, { version: '0.0.0' }],\n  },\n  'network.protocol.name': {\n    brief: 'OSI application layer or non-OSI equivalent.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'http',\n    aliases: ['net.protocol.name', 'mcp.resource.protocol'],\n    changelog: [{ version: '0.1.0', prs: [127] }, { version: '0.0.0' }],\n  },\n  'network.protocol.version': {\n    brief: 'The actual version of the protocol used for network communication.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: '1.1',\n    aliases: ['http.flavor', 'net.protocol.version'],\n    changelog: [{ version: '0.1.0', prs: [127] }, { version: '0.0.0' }],\n  },\n  'network.transport': {\n    brief: 'OSI transport layer or inter-process communication method.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'tcp',\n    aliases: ['net.transport', 'mcp.transport'],\n    changelog: [{ version: '0.1.0', prs: [127] }, { version: '0.0.0' }],\n  },\n  'network.type': {\n    brief: 'OSI network layer or non-OSI equivalent.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'ipv4',\n    changelog: [{ version: '0.1.0', prs: [127] }, { version: '0.0.0' }],\n  },\n  'net.host.ip': {\n    brief: 'Local address of the network connection - IP address or Unix domain socket name.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: '192.168.0.1',\n    deprecation: {\n      replacement: 'network.local.address',\n    },\n    aliases: ['network.local.address', 'net.sock.host.addr'],\n    changelog: [{ version: '0.1.0', prs: [61, 108, 127] }, { version: '0.0.0' }],\n  },\n  'net.host.name': {\n    brief:\n      'Server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'example.com',\n    deprecation: {\n      replacement: 'server.address',\n    },\n    aliases: ['server.address', 'http.server_name', 'http.host', 'server_name'],\n    changelog: [{ version: '0.1.0', prs: [61, 108, 127] }, { version: '0.0.0' }],\n  },\n  'net.host.port': {\n    brief: 'Server port number.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 1337,\n    deprecation: {\n      replacement: 'server.port',\n    },\n    aliases: ['server.port'],\n    changelog: [{ version: '0.4.0', prs: [228] }, { version: '0.1.0', prs: [61] }, { version: '0.0.0' }],\n  },\n  'net.peer.ip': {\n    brief: 'Peer address of the network connection - IP address or Unix domain socket name.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: '192.168.0.1',\n    deprecation: {\n      replacement: 'network.peer.address',\n    },\n    aliases: ['network.peer.address', 'net.sock.peer.addr'],\n    changelog: [{ version: '0.1.0', prs: [61, 108, 127] }, { version: '0.0.0' }],\n  },\n  'net.peer.name': {\n    brief:\n      'Server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'example.com',\n    deprecation: {\n      replacement: 'server.address',\n      reason: 'Deprecated, use server.address on client spans and client.address on server spans.',\n    },\n    changelog: [{ version: '0.1.0', prs: [61, 127] }, { version: '0.0.0' }],\n  },\n  'net.peer.port': {\n    brief: 'Peer port number.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 1337,\n    deprecation: {\n      replacement: 'server.port',\n      reason: 'Deprecated, use server.port on client spans and client.port on server spans.',\n    },\n    changelog: [{ version: '0.4.0', prs: [228] }, { version: '0.1.0', prs: [61] }, { version: '0.0.0' }],\n  },\n  'net.protocol.name': {\n    brief: 'OSI application layer or non-OSI equivalent.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'http',\n    deprecation: {\n      replacement: 'network.protocol.name',\n    },\n    aliases: ['network.protocol.name', 'mcp.resource.protocol'],\n    changelog: [{ version: '0.1.0', prs: [61, 127] }, { version: '0.0.0' }],\n  },\n  'net.protocol.version': {\n    brief: 'The actual version of the protocol used for network communication.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: '1.1',\n    deprecation: {\n      replacement: 'network.protocol.version',\n    },\n    aliases: ['network.protocol.version', 'http.flavor'],\n    changelog: [{ version: '0.1.0', prs: [61, 108, 127] }, { version: '0.0.0' }],\n  },\n  'net.sock.family': {\n    brief: 'OSI transport and network layer',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'inet',\n    deprecation: {\n      replacement: 'network.transport',\n      reason: 'Deprecated, use network.transport and network.type.',\n    },\n    changelog: [{ version: '0.1.0', prs: [61, 127] }, { version: '0.0.0' }],\n  },\n  'net.sock.host.addr': {\n    brief: 'Local address of the network connection mapping to Unix domain socket name.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: '/var/my.sock',\n    deprecation: {\n      replacement: 'network.local.address',\n    },\n    aliases: ['network.local.address', 'net.host.ip'],\n    changelog: [{ version: '0.1.0', prs: [61, 108, 127] }, { version: '0.0.0' }],\n  },\n  'net.sock.host.port': {\n    brief: 'Local port number of the network connection.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 8080,\n    deprecation: {\n      replacement: 'network.local.port',\n    },\n    aliases: ['network.local.port'],\n    changelog: [{ version: '0.4.0', prs: [228] }, { version: '0.1.0', prs: [61] }, { version: '0.0.0' }],\n  },\n  'net.sock.peer.addr': {\n    brief: 'Peer address of the network connection - IP address',\n    type: 'string',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: '192.168.0.1',\n    deprecation: {\n      replacement: 'network.peer.address',\n    },\n    aliases: ['network.peer.address', 'net.peer.ip'],\n    changelog: [{ version: '0.1.0', prs: [61, 108, 127] }, { version: '0.0.0' }],\n  },\n  'net.sock.peer.name': {\n    brief: 'Peer address of the network connection - Unix domain socket name',\n    type: 'string',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: '/var/my.sock',\n    deprecation: {\n      reason: 'Deprecated from OTEL, no replacement at this time',\n    },\n    changelog: [{ version: '0.1.0', prs: [61, 119, 127] }, { version: '0.0.0' }],\n  },\n  'net.sock.peer.port': {\n    brief: 'Peer port number of the network connection.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 8080,\n    deprecation: {\n      replacement: 'network.peer.port',\n    },\n    changelog: [{ version: '0.4.0', prs: [228] }, { version: '0.1.0', prs: [61] }, { version: '0.0.0' }],\n  },\n  'net.transport': {\n    brief: 'OSI transport layer or inter-process communication method.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'tcp',\n    deprecation: {\n      replacement: 'network.transport',\n    },\n    aliases: ['network.transport', 'mcp.transport'],\n    changelog: [{ version: '0.1.0', prs: [61, 127] }, { version: '0.0.0' }],\n  },\n  'os.build': {\n    brief: 'The build ID of the operating system.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '1234567890',\n    deprecation: {\n      replacement: 'os.build_id',\n    },\n    aliases: ['os.build_id'],\n    changelog: [\n      { version: '0.5.0', prs: [301], description: 'Added os.build attribute, deprecated in favor of os.build_id' },\n    ],\n  },\n  'os.build_id': {\n    brief: 'The build ID of the operating system.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: '1234567890',\n    aliases: ['os.build'],\n    changelog: [\n      { version: '0.5.0', prs: [301], description: 'Added os.build as alias' },\n      { version: '0.1.0', prs: [127] },\n      { version: '0.0.0' },\n    ],\n  },\n  'os.description': {\n    brief:\n      'Human readable (not intended to be parsed) OS version information, like e.g. reported by ver or lsb_release -a commands.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'Ubuntu 18.04.1 LTS',\n    changelog: [{ version: '0.1.0', prs: [127] }, { version: '0.0.0' }],\n  },\n  'os.kernel_version': {\n    brief: 'An independent kernel version string. Typically the entire output of the `uname` syscall.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '20.2.0',\n    changelog: [{ version: '0.5.0', prs: [301], description: 'Added os.kernel_version attribute' }],\n  },\n  'os.name': {\n    brief: 'Human readable operating system name.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'Ubuntu',\n    changelog: [{ version: '0.1.0', prs: [127] }, { version: '0.0.0' }],\n  },\n  'os.raw_description': {\n    brief:\n      'An unprocessed description string obtained by the operating system. For some well-known runtimes, Sentry will attempt to parse `name` and `version` from this string, if they are not explicitly given.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'Ubuntu 22.04.4 LTS (Jammy Jellyfish)',\n    changelog: [{ version: '0.5.0', prs: [301], description: 'Added os.raw_description attribute' }],\n  },\n  'os.rooted': {\n    brief: 'Whether the operating system has been jailbroken or rooted.',\n    type: 'boolean',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: true,\n    changelog: [{ version: '0.5.0', prs: [301], description: 'Added os.rooted attribute' }],\n  },\n  'os.theme': {\n    brief: 'Whether the OS runs in dark mode or light mode.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'dark',\n    changelog: [{ version: '0.5.0', prs: [301], description: 'Added os.theme attribute' }],\n  },\n  'os.type': {\n    brief: 'The operating system type.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'linux',\n    changelog: [{ version: '0.1.0', prs: [127] }, { version: '0.0.0' }],\n  },\n  'os.version': {\n    brief: 'The version of the operating system.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: '18.04.2',\n    changelog: [{ version: '0.1.0', prs: [127] }, { version: '0.0.0' }],\n  },\n  'otel.kind': {\n    brief:\n      'The span kind (https://opentelemetry.io/docs/concepts/signals/traces/#span-kind). Deprecated, use `sentry.kind` instead.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'SERVER',\n    deprecation: {\n      replacement: 'sentry.kind',\n      reason: 'Deprecated in favor of sentry.kind',\n    },\n    aliases: ['sentry.kind'],\n    changelog: [{ version: '0.13.0', prs: [440], description: 'Added otel.kind attribute' }],\n  },\n  'otel.scope.name': {\n    brief: 'The name of the instrumentation scope - (InstrumentationScope.Name in OTLP).',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'io.opentelemetry.contrib.mongodb',\n    changelog: [{ version: '0.1.0', prs: [127] }, { version: '0.0.0' }],\n  },\n  'otel.scope.version': {\n    brief: 'The version of the instrumentation scope - (InstrumentationScope.Version in OTLP).',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: '2.4.5',\n    changelog: [{ version: '0.1.0', prs: [127] }, { version: '0.0.0' }],\n  },\n  'otel.status_code': {\n    brief: 'Name of the code, either “OK” or “ERROR”. MUST NOT be set if the status code is UNSET.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'OK',\n    changelog: [{ version: '0.1.0', prs: [127] }, { version: '0.0.0' }],\n  },\n  'otel.status_description': {\n    brief: 'Description of the Status if it has a value, otherwise not set.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'resource not found',\n    changelog: [{ version: '0.1.0', prs: [127] }, { version: '0.0.0' }],\n  },\n  'params.<key>': {\n    brief:\n      'Decoded parameters extracted from a URL path. Usually added by client-side routing frameworks like vue-router.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    hasDynamicSuffix: true,\n    example: \"params.id='123'\",\n    aliases: ['url.path.parameter.<key>'],\n    changelog: [{ version: '0.1.0', prs: [103] }],\n  },\n  'performance.activationStart': {\n    brief: 'The time between initiating a navigation to a page and the browser activating the page',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 1.983,\n    deprecation: {\n      replacement: 'browser.performance.navigation.activation_start',\n      reason: 'The activationStart is now recorded as the browser.performance.navigation.activation_start attribute.',\n    },\n    aliases: ['browser.performance.navigation.activation_start'],\n    changelog: [{ version: '0.5.0', prs: [321], description: 'Added performance.activationStart attribute' }],\n  },\n  'performance.timeOrigin': {\n    brief: \"The browser's performance.timeOrigin timestamp representing the time when the pageload was initiated\",\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 1776185678.886,\n    deprecation: {\n      replacement: 'browser.performance.time_origin',\n      reason: 'The timeOrigin is now recorded as the browser.performance.time_origin attribute.',\n    },\n    aliases: ['browser.performance.time_origin'],\n    changelog: [{ version: '0.5.0', prs: [321], description: 'Added performance.timeOrigin attribute' }],\n  },\n  previous_route: {\n    brief: 'Also used by mobile SDKs to indicate the previous route in the application.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'HomeScreen',\n    changelog: [{ version: '0.1.0', prs: [74] }, { version: '0.0.0' }],\n  },\n  'process.command_args': {\n    brief: 'All the command arguments (including the command/executable itself) as received by the process.',\n    type: 'string[]',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: ['cmd/otecol', '--config=config.yaml'],\n    changelog: [{ version: '0.6.0', prs: [327], description: 'Added process.command_args attribute' }],\n  },\n  'process.executable.name': {\n    brief: 'The name of the executable that started the process.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'getsentry',\n    changelog: [{ version: '0.1.0', prs: [127] }, { version: '0.0.0' }],\n  },\n  'process.pid': {\n    brief: 'The process ID of the running process.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 12345,\n    changelog: [{ version: '0.4.0', prs: [228] }, { version: '0.0.0' }],\n  },\n  'process.runtime.description': {\n    brief:\n      'An additional description about the runtime of the process, for example a specific vendor customization of the runtime environment. Equivalent to `raw_description` in the Sentry runtime context.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'Eclipse OpenJ9 VM openj9-0.21.0',\n    aliases: ['runtime.raw_description'],\n    changelog: [{ version: '0.1.0', prs: [127] }, { version: '0.0.0' }],\n  },\n  'process.runtime.engine.name': {\n    brief: 'The name of the runtime engine.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'v8',\n    changelog: [{ version: '0.0.0' }],\n  },\n  'process.runtime.engine.version': {\n    brief: 'The version of the runtime engine.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '12.9.202.13-rusty',\n    changelog: [{ version: '0.0.0' }],\n  },\n  'process.runtime.name': {\n    brief: 'The name of the runtime. Equivalent to `name` in the Sentry runtime context.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'node',\n    aliases: ['runtime.name'],\n    changelog: [{ version: '0.1.0', prs: [127] }, { version: '0.0.0' }],\n  },\n  'process.runtime.version': {\n    brief:\n      'The version of the runtime of this process, as returned by the runtime without modification. Equivalent to `version` in the Sentry runtime context.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: '18.04.2',\n    aliases: ['runtime.version'],\n    changelog: [{ version: '0.1.0', prs: [127] }, { version: '0.0.0' }],\n  },\n  'query.<key>': {\n    brief: 'An item in a query string. Usually added by client-side routing frameworks like vue-router.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    hasDynamicSuffix: true,\n    example: \"query.id='123'\",\n    deprecation: {\n      replacement: 'url.query',\n      reason: 'Instead of sending items individually in query.<key>, they should be sent all together with url.query.',\n    },\n    changelog: [{ version: '0.1.0', prs: [103] }],\n  },\n  'react.version': {\n    brief: 'The version of the React framework',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '18.2.0',\n    changelog: [{ version: '0.7.0', prs: [368], description: 'Added react.version attribute' }],\n  },\n  release: {\n    brief: 'The sentry release.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'production',\n    deprecation: {\n      replacement: 'sentry.release',\n    },\n    aliases: ['sentry.release'],\n    changelog: [{ version: '0.1.0', prs: [61, 127] }, { version: '0.0.0' }],\n  },\n  'remix.action_form_data.<key>': {\n    brief: 'Remix form data, <key> being the form data key, the value being the form data value.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    hasDynamicSuffix: true,\n    example: \"http.response.header.text='test'\",\n    changelog: [{ version: '0.1.0', prs: [103] }],\n  },\n  replay_id: {\n    brief: 'The id of the sentry replay.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'never',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '123e4567e89b12d3a456426614174000',\n    deprecation: {\n      replacement: 'sentry.replay_id',\n    },\n    aliases: ['sentry.replay_id'],\n    changelog: [{ version: '0.1.0', prs: [61] }, { version: '0.0.0' }],\n  },\n  'resource.deployment.environment': {\n    brief: 'The software deployment environment name.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'production',\n    deprecation: {\n      replacement: 'sentry.environment',\n    },\n    changelog: [{ version: '0.5.0', prs: [266] }],\n  },\n  'resource.deployment.environment.name': {\n    brief: 'The software deployment environment name.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'production',\n    deprecation: {\n      replacement: 'sentry.environment',\n    },\n    changelog: [{ version: '0.3.1', prs: [196] }],\n  },\n  'resource.render_blocking_status': {\n    brief: 'The render blocking status of the resource.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'non-blocking',\n    changelog: [{ version: '0.1.0', prs: [127] }, { version: '0.0.0' }],\n  },\n  route: {\n    brief:\n      'The matched route, that is, the path template in the format used by the respective server framework. Also used by mobile SDKs to indicate the current route in the application.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'App\\\\Controller::indexAction',\n    deprecation: {\n      replacement: 'http.route',\n    },\n    aliases: ['http.route'],\n    changelog: [{ version: '0.1.0', prs: [61, 74] }, { version: '0.0.0' }],\n  },\n  'rpc.grpc.status_code': {\n    brief: 'The numeric status code of the gRPC request.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 2,\n    changelog: [{ version: '0.4.0', prs: [228] }, { version: '0.0.0' }],\n  },\n  'rpc.method': {\n    brief: 'The fully-qualified logical name of the method from the RPC interface perspective.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'com.example.ExampleService/exampleMethod',\n    changelog: [{ version: '0.7.0', prs: [351], description: 'Added rpc.method attribute' }],\n  },\n  'rpc.response.status_code': {\n    brief: 'Status code of the RPC returned by the RPC server or generated by the client.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'DEADLINE_EXCEEDED',\n    changelog: [{ version: '0.7.0', prs: [352], description: 'Added rpc.response.status_code attribute' }],\n  },\n  'rpc.service': {\n    brief: 'The full (logical) name of the service being called, including its package name, if applicable.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'myService.BestService',\n    changelog: [{ version: '0.1.0', prs: [127] }, { version: '0.0.0' }],\n  },\n  'rpc.system': {\n    brief: 'A string identifying the remoting system.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'aws-api',\n    deprecation: {\n      replacement: 'rpc.system.name',\n      reason: 'This attribute is being deprecated in favor of rpc.system.name, which is the OTel-aligned replacement.',\n    },\n    aliases: ['rpc.system.name'],\n    changelog: [\n      {\n        version: '0.16.0',\n        prs: [482],\n        description: 'Added rpc.system attribute, deprecated in favor of rpc.system.name',\n      },\n    ],\n  },\n  'rpc.system.name': {\n    brief: 'A string identifying the remoting system.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'aws-api',\n    aliases: ['rpc.system'],\n    changelog: [{ version: '0.16.0', prs: [482], description: 'Added rpc.system.name attribute' }],\n  },\n  'runtime.build': {\n    brief: 'The application build string, when it is separate from the version.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'stable',\n    deprecation: {\n      reason:\n        'The runtime.* namespace is deprecated in favor of process.runtime.*. No direct OTel equivalent exists for this attribute.',\n    },\n    changelog: [{ version: '0.11.0', prs: [383], description: 'Added and deprecated runtime.build attribute' }],\n  },\n  'runtime.name': {\n    brief: 'The name of the runtime. For example node, CPython, or rustc.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'node',\n    deprecation: {\n      replacement: 'process.runtime.name',\n      reason: 'Prefer OTel-aligned process.runtime.name',\n    },\n    aliases: ['process.runtime.name'],\n    changelog: [\n      {\n        version: '0.11.0',\n        prs: [383],\n        description: 'Added and deprecated runtime.name attribute in favor of process.runtime.name',\n      },\n    ],\n  },\n  'runtime.raw_description': {\n    brief:\n      'Unprocessed description string as obtained from the runtime. Used to extract name and version for well-known runtimes.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'Eclipse OpenJ9 VM openj9-0.21.0',\n    deprecation: {\n      replacement: 'process.runtime.description',\n      reason: 'Prefer OTel-aligned process.runtime.description',\n    },\n    aliases: ['process.runtime.description'],\n    changelog: [\n      {\n        version: '0.11.0',\n        prs: [383],\n        description: 'Added and deprecated runtime.raw_description attribute in favor of process.runtime.description',\n      },\n    ],\n  },\n  'runtime.version': {\n    brief: 'The version of the runtime.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '18.04.2',\n    deprecation: {\n      replacement: 'process.runtime.version',\n      reason: 'Prefer OTel-aligned process.runtime.version',\n    },\n    aliases: ['process.runtime.version'],\n    changelog: [\n      {\n        version: '0.11.0',\n        prs: [383],\n        description: 'Added and deprecated runtime.version attribute in favor of process.runtime.version',\n      },\n    ],\n  },\n  'score.<key>': {\n    brief:\n      'The weighted performance score for a web vital. This is defined as `score.weight.<key>` * `score.ratio.<key>`.',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    hasDynamicSuffix: true,\n    example: 'score.cls=0.1723',\n    changelog: [{ version: '0.7.0', prs: [355], description: 'Added score.<key> attribute' }],\n  },\n  'score.ratio.<key>': {\n    brief: 'The score for a web vital, normalized to a number between 0 and 1.',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    hasDynamicSuffix: true,\n    example: 'score.ratio.inp=0.7748',\n    changelog: [{ version: '0.7.0', prs: [355], description: 'Added score.ratio.<key> attribute' }],\n  },\n  'score.total': {\n    brief:\n      'The total performance score of a span. This is the sum of individual weighted web vital scores (see `score.<key>`).',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    changelog: [{ version: '0.7.0', prs: [355], description: 'Added score.total attribute' }],\n  },\n  'score.weight.<key>': {\n    brief: \"The relative weight of a web vital in a span's performance score.\",\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    hasDynamicSuffix: true,\n    example: 'score.weight.fcp=0.25',\n    changelog: [{ version: '0.7.0', prs: [355], description: 'Added score.weight.<key> attribute' }],\n  },\n  'sentry.action': {\n    brief:\n      'Used as a generic attribute representing the action depending on the type of span. For instance, this is the database query operation for DB spans, and the request method for HTTP spans.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'SELECT',\n    changelog: [{ version: '0.4.0', prs: [212] }],\n  },\n  'sentry.browser.name': {\n    brief: 'The name of the browser.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'Chrome',\n    deprecation: {\n      replacement: 'browser.name',\n    },\n    aliases: ['browser.name'],\n    changelog: [{ version: '0.1.0', prs: [139] }],\n  },\n  'sentry.browser.version': {\n    brief: 'The version of the browser.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '120.0.6099.130',\n    deprecation: {\n      replacement: 'browser.version',\n    },\n    aliases: ['browser.version'],\n    changelog: [{ version: '0.1.0', prs: [139] }],\n  },\n  'sentry.cancellation_reason': {\n    brief: 'The reason why a span ended early.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'never',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'document.hidden',\n    changelog: [{ version: '0.0.0' }],\n  },\n  'sentry.category': {\n    brief:\n      \"The high-level category of a span, derived from the span operation or span attributes. This categorizes spans by their general purpose (e.g., database, HTTP, UI). Known values include: 'ai', 'ai.pipeline', 'app', 'browser', 'cache', 'console', 'db', 'event', 'file', 'function.aws', 'function.azure', 'function.gcp', 'function.nextjs', 'function.remix', 'graphql', 'grpc', 'http', 'measure', 'middleware', 'navigation', 'pageload', 'queue', 'resource', 'rpc', 'serialize', 'subprocess', 'template', 'topic', 'ui', 'ui.angular', 'ui.ember', 'ui.react', 'ui.svelte', 'ui.vue', 'view', 'websocket'.\",\n    type: 'string',\n    applyScrubbing: {\n      key: 'never',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'db',\n    changelog: [{ version: '0.4.0', prs: [218] }],\n  },\n  'sentry.client_sample_rate': {\n    brief: 'Rate at which a span was sampled in the SDK.',\n    type: 'double',\n    applyScrubbing: {\n      key: 'never',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 0.5,\n    changelog: [{ version: '0.1.0', prs: [102] }],\n  },\n  'sentry.description': {\n    brief: 'The human-readable description of a span.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'index view query',\n    changelog: [{ version: '0.1.0', prs: [135] }],\n  },\n  'sentry.dist': {\n    brief: 'The sentry dist.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'never',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '1.0',\n    aliases: ['dist'],\n    changelog: [{ version: '0.16.0', prs: [489], description: 'Added dist as an alias' }, { version: '0.0.0' }],\n  },\n  'sentry.domain': {\n    brief:\n      'Used as a generic attribute representing the domain depending on the type of span. For instance, this is the collection/table name for database spans, and the server address for HTTP spans.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'example.com',\n    changelog: [{ version: '0.4.0', prs: [212] }],\n  },\n  'sentry.dsc.environment': {\n    brief: 'The environment from the dynamic sampling context.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'never',\n    },\n    isInOtel: false,\n    visibility: 'internal',\n    example: 'prod',\n    changelog: [{ version: '0.3.0', prs: [185] }],\n  },\n  'sentry.dsc.project_id': {\n    brief:\n      'The ID of the project where the trace originated (i.e. the project of the SDK that started the trace). Propagated through the dynamic sampling context and set by Relay during ingestion.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'never',\n    },\n    isInOtel: false,\n    visibility: 'internal',\n    example: '12345',\n    changelog: [{ version: '0.7.0', prs: [358], description: 'Add sentry.dsc.project_id as an attribute' }],\n  },\n  'sentry.dsc.public_key': {\n    brief: 'The public key from the dynamic sampling context.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'internal',\n    example: 'c51734c603c4430eb57cb0a5728a479d',\n    changelog: [{ version: '0.3.0', prs: [185] }],\n  },\n  'sentry.dsc.release': {\n    brief: 'The release identifier from the dynamic sampling context.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'never',\n    },\n    isInOtel: false,\n    visibility: 'internal',\n    example: 'frontend@e8211be71b214afab5b85de4b4c54be3714952bb',\n    changelog: [{ version: '0.3.0', prs: [185] }],\n  },\n  'sentry.dsc.sampled': {\n    brief: 'Whether the event was sampled according to the dynamic sampling context.',\n    type: 'boolean',\n    applyScrubbing: {\n      key: 'never',\n    },\n    isInOtel: false,\n    visibility: 'internal',\n    example: true,\n    changelog: [{ version: '0.3.0', prs: [185] }],\n  },\n  'sentry.dsc.sample_rate': {\n    brief: 'The sample rate from the dynamic sampling context.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'never',\n    },\n    isInOtel: false,\n    visibility: 'internal',\n    example: '1.0',\n    changelog: [{ version: '0.3.0', prs: [185] }],\n  },\n  'sentry.dsc.trace_id': {\n    brief: 'The trace ID from the dynamic sampling context.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'never',\n    },\n    isInOtel: false,\n    visibility: 'internal',\n    example: '047372980460430cbc78d9779df33a46',\n    changelog: [{ version: '0.3.0', prs: [185] }],\n  },\n  'sentry.dsc.transaction': {\n    brief: 'The transaction name from the dynamic sampling context.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'never',\n    },\n    isInOtel: false,\n    visibility: 'internal',\n    example: '/issues/errors-outages/',\n    changelog: [{ version: '0.3.0', prs: [185] }],\n  },\n  'sentry.environment': {\n    brief: 'The sentry environment.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'never',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'production',\n    aliases: ['environment'],\n    changelog: [{ version: '0.0.0' }],\n  },\n  'sentry.exclusive_time': {\n    brief: 'The exclusive time duration of the span in milliseconds.',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 1234,\n    changelog: [{ version: '0.4.0', prs: [228] }, { version: '0.3.0', prs: [160] }, { version: '0.0.0' }],\n  },\n  'sentry.graphql.operation': {\n    brief: 'Indicates the type of graphql operation, emitted by the Javascript SDK.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'getUserById',\n    changelog: [{ version: '0.3.1', prs: [190] }],\n  },\n  'sentry.group': {\n    brief:\n      'Stores the hash of `sentry.normalized_description`. This is primarily used for grouping spans in the product end.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'never',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    changelog: [{ version: '0.4.0', prs: [212] }],\n  },\n  'sentry.http.prefetch': {\n    brief: 'If an http request was a prefetch request.',\n    type: 'boolean',\n    applyScrubbing: {\n      key: 'never',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: true,\n    changelog: [{ version: '0.0.0' }],\n  },\n  'sentry.idle_span_finish_reason': {\n    brief: 'The reason why an idle span ended early.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'never',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'idleTimeout',\n    changelog: [{ version: '0.0.0' }],\n  },\n  'sentry.is_remote': {\n    brief: \"Indicates whether a span's parent is remote.\",\n    type: 'boolean',\n    applyScrubbing: {\n      key: 'never',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: true,\n    changelog: [{ version: '0.3.1', prs: [190] }],\n  },\n  'sentry.kind': {\n    brief:\n      'Used to clarify the relationship between parents and children, or to distinguish between spans, e.g. a `server` and `client` span with the same name.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'server',\n    aliases: ['otel.kind'],\n    changelog: [{ version: '0.3.1', prs: [190] }],\n  },\n  'sentry.main_thread': {\n    brief: 'Whether the span or event occurred on the main thread. Computed by Relay and should not be set by SDKs.',\n    type: 'boolean',\n    applyScrubbing: {\n      key: 'never',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: true,\n    changelog: [{ version: '0.5.0' }],\n  },\n  'sentry.message.parameter.<key>': {\n    brief:\n      \"A parameter used in the message template. <key> can either be the number that represent the parameter's position in the template string (sentry.message.parameter.0, sentry.message.parameter.1, etc) or the parameter's name (sentry.message.parameter.item_id, sentry.message.parameter.user_id, etc)\",\n    type: 'string',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: \"sentry.message.parameter.0='123'\",\n    changelog: [{ version: '0.1.0', prs: [116] }],\n  },\n  'sentry.message.template': {\n    brief: 'The parameterized template string.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'Hello, {name}!',\n    changelog: [{ version: '0.1.0', prs: [116] }],\n  },\n  'sentry.metric.source': {\n    brief:\n      'The provenance of a metric.  For example, this can be set to indicate if a metric was generated by Relay from a span.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'never',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'span',\n    changelog: [{ version: '0.16.0', prs: [476], description: 'Added sentry.metric.source attribute' }],\n  },\n  'sentry.mobile': {\n    brief: 'Whether the application is using a mobile SDK. Computed by Relay and should not be set by SDKs.',\n    type: 'boolean',\n    applyScrubbing: {\n      key: 'never',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: true,\n    changelog: [{ version: '0.5.0' }],\n  },\n  'sentry.module.<key>': {\n    brief: 'A module that was loaded in the process. The key is the name of the module.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    hasDynamicSuffix: true,\n    example: \"sentry.module.brianium/paratest='v7.7.0'\",\n    changelog: [{ version: '0.1.0', prs: [103] }],\n  },\n  'sentry.nextjs.ssr.function.route': {\n    brief:\n      'A parameterized route for a function in Next.js that contributes to Server-Side Rendering. Should be present on spans that track such functions when the file location of the function is known.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'never',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '/posts/[id]/layout',\n    changelog: [{ version: '0.1.0', prs: [54, 106] }],\n  },\n  'sentry.nextjs.ssr.function.type': {\n    brief:\n      'A descriptor for a for a function in Next.js that contributes to Server-Side Rendering. Should be present on spans that track such functions.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'never',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'generateMetadata',\n    changelog: [{ version: '0.1.0', prs: [54, 106] }],\n  },\n  'sentry.normalized_db_query': {\n    brief: 'The normalized version of `db.query.text`.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'SELECT .. FROM sentry_project WHERE (project_id = %s)',\n    changelog: [{ version: '0.3.1', prs: [194] }],\n  },\n  'sentry.normalized_db_query.hash': {\n    brief: 'The hash of `sentry.normalized_db_query`.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'never',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    changelog: [{ version: '0.4.0', prs: [200] }],\n  },\n  'sentry.normalized_description': {\n    brief:\n      'Used as a generic attribute representing the normalized `sentry.description`. This refers to the legacy use case of `sentry.description` where it holds relevant data depending on the type of span (e.g. database query, resource url, http request description, etc).',\n    type: 'string',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'SELECT .. FROM sentry_project WHERE (project_id = %s)',\n    changelog: [{ version: '0.4.0', prs: [212] }],\n  },\n  'sentry.observed_timestamp_nanos': {\n    brief: 'The timestamp at which an envelope was received by Relay, in nanoseconds.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'never',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '1544712660300000000',\n    changelog: [\n      { version: '0.3.0', prs: [174] },\n      { version: '0.2.0', prs: [137] },\n    ],\n  },\n  'sentry.op': {\n    brief: 'The operation of a span.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'never',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'http.client',\n    changelog: [{ version: '0.0.0' }],\n  },\n  'sentry.origin': {\n    brief: 'The origin of the instrumentation (e.g. span, log, etc.)',\n    type: 'string',\n    applyScrubbing: {\n      key: 'never',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'auto.http.otel.fastify',\n    changelog: [{ version: '0.1.0', prs: [68] }, { version: '0.0.0' }],\n  },\n  'sentry.platform': {\n    brief: 'The sdk platform that generated the event.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'never',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'php',\n    changelog: [{ version: '0.0.0' }],\n  },\n  'sentry.profiler_id': {\n    brief: 'The id of the currently running profiler (continuous profiling)',\n    type: 'string',\n    applyScrubbing: {\n      key: 'never',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '18779b64dd35d1a538e7ce2dd2d3fad3',\n    changelog: [{ version: '0.4.0', prs: [242] }],\n  },\n  'sentry.profile_id': {\n    brief:\n      'The ID of the Sentry profile the span is associated with. This is only meaningful for transaction-based profiling.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'never',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '123e4567e89b12d3a456426614174000',\n    changelog: [{ version: '0.6.0', prs: [344], description: 'Added sentry.profile_id attribute' }],\n  },\n  'sentry.release': {\n    brief: 'The sentry release.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'never',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '7.0.0',\n    aliases: ['service.version', 'release'],\n    changelog: [{ version: '0.0.0' }],\n  },\n  'sentry.replay_id': {\n    brief: 'The id of the sentry replay.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'never',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '123e4567e89b12d3a456426614174000',\n    aliases: ['replay_id'],\n    changelog: [{ version: '0.0.0' }],\n  },\n  'sentry.replay_is_buffering': {\n    brief:\n      'A sentinel attribute on log events indicating whether the current Session Replay is being buffered (onErrorSampleRate).',\n    type: 'boolean',\n    applyScrubbing: {\n      key: 'never',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: true,\n    changelog: [{ version: '0.3.0', prs: [185] }],\n  },\n  'sentry.report_event': {\n    brief: '(Deprecated) The event that caused the SDK to report CLS or LCP (pagehide or navigation)',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'pagehide',\n    deprecation: {\n      reason:\n        'The report event is now recorded as a browser.web_vital.lcp.report_event or browser.web_vital.cls.report_event attribute. No backfill required.',\n    },\n    changelog: [{ version: '0.5.0', prs: [320], description: 'Added sentry.report_event attribute' }],\n  },\n  'sentry.sdk.integrations': {\n    brief:\n      'A list of names identifying enabled integrations. The list shouldhave all enabled integrations, including default integrations. Defaultintegrations are included because different SDK releases may contain differentdefault integrations.',\n    type: 'string[]',\n    applyScrubbing: {\n      key: 'never',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: ['InboundFilters', 'FunctionToString', 'BrowserApiErrors', 'Breadcrumbs'],\n    changelog: [{ version: '0.0.0', prs: [42] }],\n  },\n  'sentry.sdk.name': {\n    brief: 'The sentry sdk name.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'never',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '@sentry/react',\n    changelog: [{ version: '0.0.0' }],\n  },\n  'sentry.sdk.version': {\n    brief: 'The sentry sdk version.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'never',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '7.0.0',\n    changelog: [{ version: '0.0.0' }],\n  },\n  'sentry.segment.id': {\n    brief: 'The segment ID of a span',\n    type: 'string',\n    applyScrubbing: {\n      key: 'never',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '051581bf3cb55c13',\n    aliases: ['sentry.segment_id'],\n    changelog: [{ version: '0.1.0', prs: [107, 124] }],\n  },\n  'sentry.segment_id': {\n    brief: 'The segment ID of a span',\n    type: 'string',\n    applyScrubbing: {\n      key: 'never',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '051581bf3cb55c13',\n    deprecation: {\n      replacement: 'sentry.segment.id',\n    },\n    aliases: ['sentry.segment.id'],\n    changelog: [{ version: '0.1.0', prs: [124] }],\n  },\n  'sentry.segment.name': {\n    brief: 'The segment name of a span',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'GET /user',\n    aliases: ['sentry.transaction', 'transaction'],\n    changelog: [\n      { version: '0.6.0', prs: [345], description: 'Added sentry.transaction and transaction aliases' },\n      { version: '0.1.0', prs: [104] },\n    ],\n  },\n  'sentry.server_sample_rate': {\n    brief: 'Rate at which a span was sampled in Relay.',\n    type: 'double',\n    applyScrubbing: {\n      key: 'never',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 0.5,\n    changelog: [{ version: '0.1.0', prs: [102] }],\n  },\n  'sentry.source': {\n    brief:\n      \"The source of a span, also referred to as transaction source. Known values are:  `'custom'`, `'url'`, `'route'`, `'component'`, `'view'`, `'task'`. '`source`' describes a parametrized route, while `'url'` describes the full URL, potentially containing identifiers.\",\n    type: 'string',\n    applyScrubbing: {\n      key: 'never',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'route',\n    deprecation: {\n      replacement: 'sentry.span.source',\n      reason: 'This attribute is being deprecated in favor of sentry.span.source',\n    },\n    changelog: [{ version: '0.5.0' }],\n  },\n  'sentry.span.source': {\n    brief:\n      \"The source of a span, also referred to as transaction source. Known values are:  `'custom'`, `'url'`, `'route'`, `'component'`, `'view'`, `'task'`. '`source`' describes a parametrized route, while `'url'` describes the full URL, potentially containing identifiers.\",\n    type: 'string',\n    applyScrubbing: {\n      key: 'never',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'route',\n    changelog: [{ version: '0.4.0', prs: [214] }, { version: '0.0.0' }],\n  },\n  'sentry.status': {\n    brief:\n      'The span\\'s status (either \"ok\" or \"error\"). Older SDKs may set this to a more specific error, but this behaviour is deprecated.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'never',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'ok',\n    changelog: [{ version: '0.14.0', prs: [453] }],\n  },\n  'sentry.status_code': {\n    brief:\n      'The HTTP status code used in Sentry Insights. Typically set by Sentry during ingestion, rather than by clients.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 200,\n    changelog: [{ version: '0.4.0', prs: [223, 228] }],\n  },\n  'sentry.status.message': {\n    brief: 'The from OTLP extracted status message.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'foobar',\n    changelog: [{ version: '0.3.1', prs: [190] }],\n  },\n  'sentry.sveltekit.navigation.from': {\n    brief: 'the navigation origin (sveltekit router)',\n    type: 'string',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '/home',\n    deprecation: {\n      replacement: 'navigation.origin',\n      reason: 'Use the more generic attribute instead',\n    },\n    aliases: ['navigation.origin'],\n    changelog: [{ version: '0.16.0', prs: [467], description: 'Added sentry.sveltekit.navigation.from attribute' }],\n  },\n  'sentry.sveltekit.navigation.to': {\n    brief: 'the navigation destination',\n    type: 'string',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '/users/:id',\n    deprecation: {\n      reason: 'the navigation destination is already covered by url.* attributes',\n    },\n    changelog: [{ version: '0.16.0', prs: [467], description: 'Added sentry.sveltekit.navigation.to attribute' }],\n  },\n  'sentry.sveltekit.navigation.type': {\n    brief: 'The type of navigation event emitted from the sveltekit client router',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'link',\n    deprecation: {\n      replacement: 'navigation.type',\n      reason: 'Use the more generic attribute instead',\n    },\n    aliases: ['navigation.type'],\n    changelog: [{ version: '0.16.0', prs: [467], description: 'Added sentry.sveltekit.navigation.type attribute' }],\n  },\n  'sentry.thread.id': {\n    brief: 'Current “managed” thread ID.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 56,\n    deprecation: {\n      replacement: 'thread.id',\n      reason: 'This attribute is being deprecated in favor of the OTel-standard thread.id',\n    },\n    changelog: [{ version: '0.13.0', prs: [451] }],\n  },\n  'sentry.timestamp.sequence': {\n    brief:\n      'A sequencing counter for deterministic ordering of logs or metrics when timestamps share the same integer millisecond. Starts at 0 on SDK initialization, increments by 1 for each captured item, and resets to 0 when the integer millisecond of the current item differs from the previous one.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'never',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 0,\n    changelog: [{ version: '0.5.0', prs: [262] }],\n  },\n  'sentry.trace_lifecycle': {\n    brief: 'Indicates the chosen trace lifecycle mode of the SDK (stream or static)',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'stream',\n    changelog: [{ version: '0.13.0', prs: [442], description: 'Added sentry.trace_lifecycle attribute' }],\n  },\n  'sentry.trace.parent_span_id': {\n    brief:\n      'The span id of the span that was active when the log was collected. This should not be set if there was no active span.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'never',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'b0e6f15b45c36b12',\n    deprecation: {},\n    changelog: [\n      { version: '0.5.0', prs: [287], description: 'Deprecate `sentry.trace.parent_span_id`' },\n      { version: '0.1.0', prs: [116] },\n    ],\n  },\n  'sentry.trace.status': {\n    brief:\n      'The segment\\'s status (either \"ok\" or \"error\"). Older SDKs may set this to a more specific error, but this behaviour is deprecated.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'never',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'ok',\n    changelog: [{ version: '0.14.0', prs: [453] }],\n  },\n  'sentry.transaction': {\n    brief: 'The sentry transaction (segment name).',\n    type: 'string',\n    applyScrubbing: {\n      key: 'never',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'GET /',\n    deprecation: {\n      replacement: 'sentry.segment.name',\n      reason: 'This attribute is being deprecated in favor of sentry.segment.name',\n    },\n    aliases: ['sentry.segment.name', 'transaction'],\n    changelog: [\n      { version: '0.6.0', prs: [345], description: 'Deprecated sentry.transaction in favor of sentry.segment.name' },\n      { version: '0.0.0' },\n    ],\n  },\n  'sentry.user.email': {\n    brief: 'User email address.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    deprecation: {\n      replacement: 'user.email',\n    },\n    aliases: ['user.email'],\n    changelog: [{ version: '0.10.0', prs: [406] }],\n  },\n  'sentry.user.geo.city': {\n    brief: 'Human readable city name.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    deprecation: {\n      replacement: 'user.geo.city',\n    },\n    aliases: ['user.geo.city'],\n    changelog: [{ version: '0.10.0', prs: [406] }],\n  },\n  'sentry.user.geo.country_code': {\n    brief: 'Two-letter country code (ISO 3166-1 alpha-2).',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    deprecation: {\n      replacement: 'user.geo.country_code',\n    },\n    aliases: ['user.geo.country_code'],\n    changelog: [{ version: '0.10.0', prs: [406] }],\n  },\n  'sentry.user.geo.region': {\n    brief: 'Human readable region name or code.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    deprecation: {\n      replacement: 'user.geo.region',\n    },\n    aliases: ['user.geo.region'],\n    changelog: [{ version: '0.10.0', prs: [406] }],\n  },\n  'sentry.user.geo.subdivision': {\n    brief: 'Human readable subdivision name.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    deprecation: {\n      replacement: 'user.geo.subdivision',\n    },\n    aliases: ['user.geo.subdivision'],\n    changelog: [{ version: '0.10.0', prs: [406] }],\n  },\n  'sentry.user.id': {\n    brief: 'Unique identifier of the user.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    deprecation: {\n      replacement: 'user.id',\n    },\n    aliases: ['user.id'],\n    changelog: [{ version: '0.10.0', prs: [406] }],\n  },\n  'sentry.user.ip': {\n    brief: 'The IP address of the user.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    deprecation: {\n      replacement: 'user.ip_address',\n    },\n    aliases: ['user.ip_address'],\n    changelog: [{ version: '0.10.0', prs: [406] }],\n  },\n  'sentry.user.username': {\n    brief: 'Short name or login/username of the user.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    deprecation: {\n      replacement: 'user.name',\n    },\n    aliases: ['user.name'],\n    changelog: [{ version: '0.10.0', prs: [406] }],\n  },\n  'server.address': {\n    brief:\n      'Server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'example.com',\n    aliases: ['http.server_name', 'net.host.name', 'http.host', 'server_name'],\n    changelog: [{ version: '0.1.0', prs: [108, 127] }, { version: '0.0.0' }],\n  },\n  server_name: {\n    brief:\n      'Server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'example.com',\n    deprecation: {\n      replacement: 'server.address',\n      reason: 'This attribute is being deprecated in favor of server.address, which is the OTel-aligned replacement.',\n    },\n    aliases: ['server.address', 'http.server_name', 'net.host.name', 'http.host'],\n    changelog: [\n      {\n        version: '0.16.0',\n        prs: [477],\n        description: 'Added server_name attribute, deprecated in favor of server.address',\n      },\n    ],\n  },\n  'server.port': {\n    brief: 'Server port number.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 1337,\n    aliases: ['net.host.port'],\n    changelog: [{ version: '0.4.0', prs: [228] }, { version: '0.0.0' }],\n  },\n  'service.name': {\n    brief: 'Logical name of the service.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'omegastar',\n    changelog: [{ version: '0.1.0', prs: [127] }, { version: '0.0.0' }],\n  },\n  'service.version': {\n    brief: 'The version string of the service API or implementation. The format is not defined by these conventions.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: '5.0.0',\n    aliases: ['sentry.release'],\n    changelog: [{ version: '0.1.0', prs: [127] }, { version: '0.0.0' }],\n  },\n  'session.id': {\n    brief: 'A unique id identifying the active session at the time of setting this attribute',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: '00112233-4455-6677-8899-aabbccddeeff',\n    changelog: [{ version: '0.11.0', prs: [412], description: 'Added session.id attribute' }],\n  },\n  stall_percentage: {\n    brief: 'The fraction of time the app was stalled. Only applies to React Native. This is computed by Relay.',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    changelog: [{ version: '0.7.0', prs: [362], description: 'Added stall_percentage attribute' }],\n  },\n  stall_total_time: {\n    brief:\n      'The combined duration of all stalls in milliseconds. Only applies to React Native. This is computed by Relay.',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    changelog: [{ version: '0.7.0', prs: [362], description: 'Added stall_total_time attribute' }],\n  },\n  'state.type': {\n    brief: 'The type of state management library',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'redux',\n    changelog: [{ version: '0.7.0', prs: [365], description: 'Added state.type attribute' }],\n  },\n  'thread.id': {\n    brief: 'Current “managed” thread ID.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 56,\n    changelog: [{ version: '0.0.0' }],\n  },\n  'thread.name': {\n    brief: 'Current thread name.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'main',\n    changelog: [{ version: '0.1.0', prs: [127] }, { version: '0.0.0' }],\n  },\n  'timber.tag': {\n    brief: 'The log tag provided by the timber logging framework.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'MyTag',\n    changelog: [{ version: '0.3.0', prs: [183] }],\n  },\n  time_to_full_display: {\n    brief: 'The duration of time to full display in milliseconds',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 1234.56,\n    deprecation: {\n      replacement: 'app.vitals.ttfd.value',\n      reason:\n        'Replaced by app.vitals.ttfd.value to align with the app.vitals.* namespace for mobile performance attributes',\n    },\n    aliases: ['app.vitals.ttfd.value'],\n    changelog: [\n      { version: '0.5.0', prs: [313], description: 'Added and deprecated in favor of app.vitals.ttfd.value' },\n    ],\n  },\n  time_to_initial_display: {\n    brief: 'The duration of time to initial display in milliseconds',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 1234.56,\n    deprecation: {\n      replacement: 'app.vitals.ttid.value',\n      reason:\n        'Replaced by app.vitals.ttid.value to align with the app.vitals.* namespace for mobile performance attributes',\n    },\n    aliases: ['app.vitals.ttid.value'],\n    changelog: [\n      { version: '0.5.0', prs: [313], description: 'Added and deprecated in favor of app.vitals.ttid.value' },\n    ],\n  },\n  transaction: {\n    brief: 'The sentry transaction (segment name).',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'GET /',\n    deprecation: {\n      replacement: 'sentry.segment.name',\n    },\n    aliases: ['sentry.segment.name', 'sentry.transaction'],\n    changelog: [\n      {\n        version: '0.6.0',\n        prs: [345],\n        description: 'Updated transaction deprecation replacement to sentry.segment.name',\n      },\n      { version: '0.1.0', prs: [61, 127] },\n      { version: '0.0.0' },\n    ],\n  },\n  'trpc.procedure_path': {\n    brief: 'The path of the tRPC procedure being called',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'user.getById',\n    changelog: [{ version: '0.7.0', prs: [370], description: 'Added trpc.procedure_path attribute' }],\n  },\n  'trpc.procedure_type': {\n    brief: 'The type of the tRPC procedure',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'query',\n    changelog: [{ version: '0.7.0', prs: [370], description: 'Added trpc.procedure_type attribute' }],\n  },\n  ttfb: {\n    brief: 'The value of the recorded Time To First Byte (TTFB) web vital in milliseconds',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 194,\n    deprecation: {\n      replacement: 'browser.web_vital.ttfb.value',\n      reason: 'This attribute is being deprecated in favor of browser.web_vital.ttfb.value',\n    },\n    aliases: ['browser.web_vital.ttfb.value'],\n    changelog: [{ version: '0.5.0', prs: [235] }],\n  },\n  'ttfb.requestTime': {\n    brief:\n      \"The time it takes for the server to process the initial request and send the first byte of a response to the user's browser\",\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 1554.5814,\n    deprecation: {\n      replacement: 'browser.web_vital.ttfb.request_time',\n      reason: 'This attribute is being deprecated in favor of browser.web_vital.ttfb.request_time',\n    },\n    aliases: ['browser.web_vital.ttfb.request_time'],\n    changelog: [{ version: '0.5.0', prs: [235] }],\n  },\n  type: {\n    brief: 'More granular type of the operation happening.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'fetch',\n    changelog: [{ version: '0.0.0' }],\n  },\n  'ui.component_name': {\n    brief: 'The name of the associated component.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'HomeButton',\n    changelog: [{ version: '0.1.0', prs: [127] }, { version: '0.0.0' }],\n  },\n  'ui.contributes_to_ttfd': {\n    brief: 'Whether the span execution contributed to the TTFD (time to fully drawn) metric.',\n    type: 'boolean',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: true,\n    changelog: [{ version: '0.0.0' }],\n  },\n  'ui.contributes_to_ttid': {\n    brief: 'Whether the span execution contributed to the TTID (time to initial display) metric.',\n    type: 'boolean',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: true,\n    changelog: [{ version: '0.0.0' }],\n  },\n  'ui.element.height': {\n    brief: 'The height of the UI element (for Html in pixels)',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 256,\n    changelog: [{ version: '0.5.0', prs: [284], description: 'Added ui.element.height attribute' }],\n  },\n  'ui.element.id': {\n    brief: 'The id of the UI element',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'btn-login',\n    changelog: [{ version: '0.5.0', prs: [284], description: 'Added ui.element.id attribute' }],\n  },\n  'ui.element.identifier': {\n    brief: 'The identifier used to measure the UI element timing',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'heroImage',\n    changelog: [{ version: '0.5.0', prs: [284], description: 'Added ui.element.identifier attribute' }],\n  },\n  'ui.element.load_time': {\n    brief: 'The loading time of a UI element (from time origin to finished loading)',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 998.2234,\n    changelog: [{ version: '0.5.0', prs: [284], description: 'Added ui.element.load_time attribute' }],\n  },\n  'ui.element.paint_type': {\n    brief: \"The type of element paint. Can either be 'image-paint' or 'text-paint'\",\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'image-paint',\n    changelog: [{ version: '0.5.0', prs: [284], description: 'Added ui.element.paint_type attribute' }],\n  },\n  'ui.element.render_time': {\n    brief: 'The rendering time of the UI element (from time origin to finished rendering)',\n    type: 'double',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 1023.1124,\n    changelog: [{ version: '0.5.0', prs: [284], description: 'Added ui.element.render_time attribute' }],\n  },\n  'ui.element.type': {\n    brief: 'type of the UI element',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'img',\n    changelog: [{ version: '0.5.0', prs: [284], description: 'Added ui.element.type attribute' }],\n  },\n  'ui.element.url': {\n    brief: 'The URL of the UI element (e.g. an img src)',\n    type: 'string',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'https://assets.myapp.com/hero.png',\n    changelog: [{ version: '0.5.0', prs: [284], description: 'Added ui.element.url attribute' }],\n  },\n  'ui.element.width': {\n    brief: 'The width of the UI element (for HTML in pixels)',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 512,\n    changelog: [{ version: '0.5.0', prs: [284], description: 'Added ui.element.width attribute' }],\n  },\n  url: {\n    brief: 'The URL of the resource that was fetched.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'https://example.com/test?foo=bar#buzz',\n    deprecation: {\n      replacement: 'url.full',\n    },\n    aliases: ['url.full', 'http.url'],\n    changelog: [{ version: '0.1.0', prs: [61] }, { version: '0.0.0' }],\n  },\n  'url.domain': {\n    brief:\n      'Server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'example.com',\n    changelog: [{ version: '0.1.0', prs: [127] }, { version: '0.0.0' }],\n  },\n  'url.fragment': {\n    brief:\n      'The fragments present in the URI. Note that this does not contain the leading # character, while the `http.fragment` attribute does.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'details',\n    changelog: [{ version: '0.0.0' }],\n  },\n  'url.full': {\n    brief: 'The URL of the resource that was fetched.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'https://example.com/test?foo=bar#buzz',\n    aliases: ['http.url', 'url'],\n    changelog: [{ version: '0.1.0', prs: [108] }, { version: '0.0.0' }],\n  },\n  'url.path': {\n    brief: 'The URI path component.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: '/foo',\n    changelog: [{ version: '0.0.0' }],\n  },\n  'url.path.parameter.<key>': {\n    brief:\n      'Decoded parameters extracted from a URL path. Usually added by client-side routing frameworks like vue-router.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    hasDynamicSuffix: true,\n    example: \"url.path.parameter.id='123'\",\n    aliases: ['params.<key>'],\n    changelog: [{ version: '0.1.0', prs: [103] }],\n  },\n  'url.port': {\n    brief: 'Server port number.',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 1337,\n    changelog: [{ version: '0.4.0', prs: [228] }, { version: '0.0.0' }],\n  },\n  'url.query': {\n    brief:\n      'The query string present in the URL. Note that this does not contain the leading ? character, while the `http.query` attribute does.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'auto',\n      reason:\n        'Query string values can contain sensitive information. Clients should attempt to scrub parameters that might contain sensitive information.',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'foo=bar&bar=baz',\n    changelog: [{ version: '0.0.0' }],\n  },\n  'url.same_origin': {\n    brief: \"Indicates that a URL has the same origin as the current page's origin in the browser.\",\n    type: 'boolean',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: true,\n    deprecation: {\n      replacement: 'http.request.same_origin',\n      reason: 'This attribute is being deprecated in favor of http.request.same_origin.',\n    },\n    aliases: ['http.request.same_origin'],\n    changelog: [\n      {\n        version: '0.16.0',\n        prs: [456],\n        description: 'Added url.same_origin attribute, deprecated in favor of http.request.same_origin',\n      },\n    ],\n  },\n  'url.scheme': {\n    brief: 'The URI scheme component identifying the used protocol.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'https',\n    aliases: ['http.scheme'],\n    changelog: [{ version: '0.1.0', prs: [127] }, { version: '0.0.0' }],\n  },\n  'url.template': {\n    brief: 'The low-cardinality template of an absolute path reference.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: '/users/:id',\n    aliases: ['http.route'],\n    changelog: [{ version: '0.1.0', prs: [127] }, { version: '0.0.0' }],\n  },\n  'user_agent.original': {\n    brief: 'Value of the HTTP User-Agent header sent by the client.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example:\n      'Mozilla/5.0 (iPhone; CPU iPhone OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Mobile/15E148 Safari/604.1',\n    aliases: ['http.user_agent'],\n    changelog: [{ version: '0.1.0', prs: [127] }, { version: '0.0.0' }],\n  },\n  'user.email': {\n    brief: 'User email address.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'test@example.com',\n    aliases: ['sentry.user.email'],\n    changelog: [{ version: '0.0.0' }],\n  },\n  'user.full_name': {\n    brief: \"User's full name.\",\n    type: 'string',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'John Smith',\n    changelog: [{ version: '0.0.0' }],\n  },\n  'user.geo.city': {\n    brief: 'Human readable city name.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'Toronto',\n    aliases: ['sentry.user.geo.city'],\n    changelog: [{ version: '0.0.0' }],\n  },\n  'user.geo.country_code': {\n    brief: 'Two-letter country code (ISO 3166-1 alpha-2).',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'CA',\n    aliases: ['sentry.user.geo.country_code'],\n    changelog: [{ version: '0.0.0' }],\n  },\n  'user.geo.region': {\n    brief: 'Human readable region name or code.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'Canada',\n    aliases: ['sentry.user.geo.region'],\n    changelog: [{ version: '0.0.0' }],\n  },\n  'user.geo.subdivision': {\n    brief: 'Human readable subdivision name.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'Ontario',\n    aliases: ['sentry.user.geo.subdivision'],\n    changelog: [{ version: '0.0.0' }],\n  },\n  'user.hash': {\n    brief: 'Unique user hash to correlate information for a user in anonymized form.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: '8ae4c2993e0f4f3b8b2d1b1f3b5e8f4d',\n    changelog: [{ version: '0.0.0' }],\n  },\n  'user.id': {\n    brief: 'Unique identifier of the user.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'S-1-5-21-202424912787-2692429404-2351956786-1000',\n    aliases: ['sentry.user.id'],\n    changelog: [{ version: '0.0.0' }],\n  },\n  'user.ip_address': {\n    brief: 'The IP address of the user.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '192.168.1.1',\n    aliases: ['sentry.user.ip'],\n    changelog: [{ version: '0.1.0', prs: [75] }],\n  },\n  'user.name': {\n    brief: 'Short name or login/username of the user.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: 'j.smith',\n    aliases: ['sentry.user.username'],\n    changelog: [{ version: '0.0.0' }],\n  },\n  'user.roles': {\n    brief: 'Array of user roles at the time of the event.',\n    type: 'string[]',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: true,\n    visibility: 'public',\n    example: ['admin', 'editor'],\n    changelog: [{ version: '0.0.0' }],\n  },\n  'vercel.branch': {\n    brief: 'Git branch name for Vercel project',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'main',\n    changelog: [{ version: '0.2.0', prs: [163] }],\n  },\n  'vercel.build_id': {\n    brief: 'Identifier for the Vercel build (only present on build logs)',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'bld_cotnkcr76',\n    changelog: [{ version: '0.2.0', prs: [163] }],\n  },\n  'vercel.deployment_id': {\n    brief: 'Identifier for the Vercel deployment',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'dpl_233NRGRjVZX1caZrXWtz5g1TAksD',\n    changelog: [{ version: '0.2.0', prs: [163] }],\n  },\n  'vercel.destination': {\n    brief: 'Origin of the external content in Vercel (only on external logs)',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'https://vitals.vercel-insights.com/v1',\n    changelog: [{ version: '0.2.0', prs: [163] }],\n  },\n  'vercel.edge_type': {\n    brief: 'Type of edge runtime in Vercel',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'edge-function',\n    changelog: [{ version: '0.2.0', prs: [163] }],\n  },\n  'vercel.entrypoint': {\n    brief: 'Entrypoint for the request in Vercel',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'api/index.js',\n    changelog: [{ version: '0.2.0', prs: [163] }],\n  },\n  'vercel.execution_region': {\n    brief: 'Region where the request is executed',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'sfo1',\n    changelog: [{ version: '0.2.0', prs: [163] }],\n  },\n  'vercel.id': {\n    brief: 'Unique identifier for the log entry in Vercel',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '1573817187330377061717300000',\n    changelog: [{ version: '0.2.0', prs: [163] }],\n  },\n  'vercel.ja3_digest': {\n    brief: 'JA3 fingerprint digest of Vercel request',\n    type: 'string',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '769,47-53-5-10-49161-49162-49171-49172-50-56-19-4,0-10-11,23-24-25,0',\n    changelog: [{ version: '0.2.0', prs: [163] }],\n  },\n  'vercel.ja4_digest': {\n    brief: 'JA4 fingerprint digest',\n    type: 'string',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 't13d1516h2_8daaf6152771_02713d6af862',\n    changelog: [{ version: '0.2.0', prs: [163] }],\n  },\n  'vercel.log_type': {\n    brief: 'Vercel log output type',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'stdout',\n    changelog: [{ version: '0.2.0', prs: [163] }],\n  },\n  'vercel.path': {\n    brief: 'Function or dynamic path of the request in Vercel.',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '/dynamic/[route].json',\n    changelog: [{ version: '0.6.0', prs: [349], description: 'Added vercel.path attribute' }],\n  },\n  'vercel.project_id': {\n    brief: 'Identifier for the Vercel project',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'gdufoJxB6b9b1fEqr1jUtFkyavUU',\n    changelog: [{ version: '0.2.0', prs: [163] }],\n  },\n  'vercel.project_name': {\n    brief: 'Name of the Vercel project',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'my-app',\n    changelog: [{ version: '0.2.0', prs: [163] }],\n  },\n  'vercel.proxy.cache_id': {\n    brief: 'Original request ID when request is served from cache',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'pdx1::v8g4b-1744143786684-93dafbc0f70d',\n    changelog: [{ version: '0.2.0', prs: [163] }],\n  },\n  'vercel.proxy.client_ip': {\n    brief: 'Client IP address',\n    type: 'string',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '120.75.16.101',\n    changelog: [{ version: '0.2.0', prs: [163] }],\n  },\n  'vercel.proxy.host': {\n    brief: 'Hostname of the request',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'test.vercel.app',\n    changelog: [{ version: '0.2.0', prs: [163] }],\n  },\n  'vercel.proxy.lambda_region': {\n    brief: 'Region where lambda function executed',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'sfo1',\n    changelog: [{ version: '0.2.0', prs: [163] }],\n  },\n  'vercel.proxy.method': {\n    brief: 'HTTP method of the request',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'GET',\n    changelog: [{ version: '0.2.0', prs: [163] }],\n  },\n  'vercel.proxy.path': {\n    brief: 'Request path with query parameters',\n    type: 'string',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '/dynamic/some-value.json?route=some-value',\n    changelog: [{ version: '0.2.0', prs: [163] }],\n  },\n  'vercel.proxy.path_type': {\n    brief: 'How the request was served based on its path and project configuration',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'func',\n    changelog: [{ version: '0.2.0', prs: [163] }],\n  },\n  'vercel.proxy.path_type_variant': {\n    brief: 'Variant of the path type',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'api',\n    changelog: [{ version: '0.2.0', prs: [163] }],\n  },\n  'vercel.proxy.referer': {\n    brief: 'Referer of the request',\n    type: 'string',\n    applyScrubbing: {\n      key: 'auto',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '*.vercel.app',\n    changelog: [{ version: '0.2.0', prs: [163] }],\n  },\n  'vercel.proxy.region': {\n    brief: 'Region where the request is processed',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'sfo1',\n    changelog: [{ version: '0.2.0', prs: [163] }],\n  },\n  'vercel.proxy.response_byte_size': {\n    brief: 'Size of the response in bytes',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 1024,\n    changelog: [\n      { version: '0.4.0', prs: [228] },\n      { version: '0.2.0', prs: [163] },\n    ],\n  },\n  'vercel.proxy.scheme': {\n    brief: 'Protocol of the request',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'https',\n    changelog: [{ version: '0.2.0', prs: [163] }],\n  },\n  'vercel.proxy.status_code': {\n    brief: 'HTTP status code of the proxy request',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 200,\n    changelog: [\n      { version: '0.4.0', prs: [228] },\n      { version: '0.2.0', prs: [163] },\n    ],\n  },\n  'vercel.proxy.timestamp': {\n    brief: 'Unix timestamp when the proxy request was made',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 1573817250172,\n    changelog: [\n      { version: '0.4.0', prs: [228] },\n      { version: '0.2.0', prs: [163] },\n    ],\n  },\n  'vercel.proxy.user_agent': {\n    brief: 'User agent strings of the request',\n    type: 'string[]',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: ['Mozilla/5.0...'],\n    changelog: [{ version: '0.2.0', prs: [163] }],\n  },\n  'vercel.proxy.vercel_cache': {\n    brief: 'Cache status sent to the browser',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'REVALIDATED',\n    changelog: [{ version: '0.2.0', prs: [163] }],\n  },\n  'vercel.proxy.vercel_id': {\n    brief: 'Vercel-specific identifier',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'sfo1::abc123',\n    changelog: [{ version: '0.2.0', prs: [163] }],\n  },\n  'vercel.proxy.waf_action': {\n    brief: 'Action taken by firewall rules',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'deny',\n    changelog: [{ version: '0.2.0', prs: [163] }],\n  },\n  'vercel.proxy.waf_rule_id': {\n    brief: 'ID of the firewall rule that matched',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'rule_gAHz8jtSB1Gy',\n    changelog: [{ version: '0.2.0', prs: [163] }],\n  },\n  'vercel.request_id': {\n    brief: 'Identifier of the Vercel request',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: '643af4e3-975a-4cc7-9e7a-1eda11539d90',\n    changelog: [{ version: '0.2.0', prs: [163] }],\n  },\n  'vercel.source': {\n    brief: 'Origin of the Vercel log (build, edge, lambda, static, external, or firewall)',\n    type: 'string',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 'build',\n    changelog: [{ version: '0.2.0', prs: [163] }],\n  },\n  'vercel.status_code': {\n    brief: 'HTTP status code of the request (-1 means no response returned and the lambda crashed)',\n    type: 'integer',\n    applyScrubbing: {\n      key: 'manual',\n    },\n    isInOtel: false,\n    visibility: 'public',\n    example: 200,\n    changelog: [\n      { version: '0.4.0', prs: [228] },\n      { version: '0.2.0', prs: [163] },\n    ],\n  },\n};\n\nexport type AttributeValue = string | number | boolean | Array<string> | Array<number> | Array<boolean>;\n\nexport type Attributes = {\n  [AI_CITATIONS]?: AI_CITATIONS_TYPE;\n  [AI_COMPLETION_TOKENS_USED]?: AI_COMPLETION_TOKENS_USED_TYPE;\n  [AI_DOCUMENTS]?: AI_DOCUMENTS_TYPE;\n  [AI_FINISH_REASON]?: AI_FINISH_REASON_TYPE;\n  [AI_FREQUENCY_PENALTY]?: AI_FREQUENCY_PENALTY_TYPE;\n  [AI_FUNCTION_CALL]?: AI_FUNCTION_CALL_TYPE;\n  [AI_GENERATION_ID]?: AI_GENERATION_ID_TYPE;\n  [AI_INPUT_MESSAGES]?: AI_INPUT_MESSAGES_TYPE;\n  [AI_IS_SEARCH_REQUIRED]?: AI_IS_SEARCH_REQUIRED_TYPE;\n  [AI_METADATA]?: AI_METADATA_TYPE;\n  [AI_MODEL_ID]?: AI_MODEL_ID_TYPE;\n  [AI_MODEL_PROVIDER]?: AI_MODEL_PROVIDER_TYPE;\n  [AI_PIPELINE_NAME]?: AI_PIPELINE_NAME_TYPE;\n  [AI_PREAMBLE]?: AI_PREAMBLE_TYPE;\n  [AI_PRESENCE_PENALTY]?: AI_PRESENCE_PENALTY_TYPE;\n  [AI_PROMPT_TOKENS_USED]?: AI_PROMPT_TOKENS_USED_TYPE;\n  [AI_RAW_PROMPTING]?: AI_RAW_PROMPTING_TYPE;\n  [AI_RESPONSES]?: AI_RESPONSES_TYPE;\n  [AI_RESPONSE_FORMAT]?: AI_RESPONSE_FORMAT_TYPE;\n  [AI_SEARCH_QUERIES]?: AI_SEARCH_QUERIES_TYPE;\n  [AI_SEARCH_RESULTS]?: AI_SEARCH_RESULTS_TYPE;\n  [AI_SEED]?: AI_SEED_TYPE;\n  [AI_STREAMING]?: AI_STREAMING_TYPE;\n  [AI_TAGS]?: AI_TAGS_TYPE;\n  [AI_TEMPERATURE]?: AI_TEMPERATURE_TYPE;\n  [AI_TEXTS]?: AI_TEXTS_TYPE;\n  [AI_TOOLS]?: AI_TOOLS_TYPE;\n  [AI_TOOL_CALLS]?: AI_TOOL_CALLS_TYPE;\n  [AI_TOP_K]?: AI_TOP_K_TYPE;\n  [AI_TOP_P]?: AI_TOP_P_TYPE;\n  [AI_TOTAL_COST]?: AI_TOTAL_COST_TYPE;\n  [AI_TOTAL_TOKENS_USED]?: AI_TOTAL_TOKENS_USED_TYPE;\n  [AI_WARNINGS]?: AI_WARNINGS_TYPE;\n  [ANGULAR_VERSION]?: ANGULAR_VERSION_TYPE;\n  [APP_APP_BUILD]?: APP_APP_BUILD_TYPE;\n  [APP_APP_IDENTIFIER]?: APP_APP_IDENTIFIER_TYPE;\n  [APP_APP_NAME]?: APP_APP_NAME_TYPE;\n  [APP_APP_START_TIME]?: APP_APP_START_TIME_TYPE;\n  [APP_APP_VERSION]?: APP_APP_VERSION_TYPE;\n  [APP_BUILD]?: APP_BUILD_TYPE;\n  [APP_IDENTIFIER]?: APP_IDENTIFIER_TYPE;\n  [APP_IN_FOREGROUND]?: APP_IN_FOREGROUND_TYPE;\n  [APP_NAME]?: APP_NAME_TYPE;\n  [APP_START_COLD]?: APP_START_COLD_TYPE;\n  [APP_START_TIME]?: APP_START_TIME_TYPE;\n  [APP_START_TYPE]?: APP_START_TYPE_TYPE;\n  [APP_START_WARM]?: APP_START_WARM_TYPE;\n  [APP_VERSION]?: APP_VERSION_TYPE;\n  [APP_VITALS_FRAMES_DELAY_VALUE]?: APP_VITALS_FRAMES_DELAY_VALUE_TYPE;\n  [APP_VITALS_FRAMES_FROZEN_COUNT]?: APP_VITALS_FRAMES_FROZEN_COUNT_TYPE;\n  [APP_VITALS_FRAMES_SLOW_COUNT]?: APP_VITALS_FRAMES_SLOW_COUNT_TYPE;\n  [APP_VITALS_FRAMES_TOTAL_COUNT]?: APP_VITALS_FRAMES_TOTAL_COUNT_TYPE;\n  [APP_VITALS_START_COLD_VALUE]?: APP_VITALS_START_COLD_VALUE_TYPE;\n  [APP_VITALS_START_PREWARMED]?: APP_VITALS_START_PREWARMED_TYPE;\n  [APP_VITALS_START_REASON]?: APP_VITALS_START_REASON_TYPE;\n  [APP_VITALS_START_SCREEN]?: APP_VITALS_START_SCREEN_TYPE;\n  [APP_VITALS_START_TYPE]?: APP_VITALS_START_TYPE_TYPE;\n  [APP_VITALS_START_WARM_VALUE]?: APP_VITALS_START_WARM_VALUE_TYPE;\n  [APP_VITALS_TTFD_VALUE]?: APP_VITALS_TTFD_VALUE_TYPE;\n  [APP_VITALS_TTID_VALUE]?: APP_VITALS_TTID_VALUE_TYPE;\n  [ART_GC_BLOCKING_COUNT]?: ART_GC_BLOCKING_COUNT_TYPE;\n  [ART_GC_BLOCKING_TIME]?: ART_GC_BLOCKING_TIME_TYPE;\n  [ART_GC_PRE_OOME_COUNT]?: ART_GC_PRE_OOME_COUNT_TYPE;\n  [ART_GC_TOTAL_COUNT]?: ART_GC_TOTAL_COUNT_TYPE;\n  [ART_GC_TOTAL_TIME]?: ART_GC_TOTAL_TIME_TYPE;\n  [ART_GC_WAITING_TIME]?: ART_GC_WAITING_TIME_TYPE;\n  [ART_MEMORY_FREE]?: ART_MEMORY_FREE_TYPE;\n  [ART_MEMORY_FREE_UNTIL_GC]?: ART_MEMORY_FREE_UNTIL_GC_TYPE;\n  [ART_MEMORY_FREE_UNTIL_OOME]?: ART_MEMORY_FREE_UNTIL_OOME_TYPE;\n  [ART_MEMORY_MAX]?: ART_MEMORY_MAX_TYPE;\n  [ART_MEMORY_TOTAL]?: ART_MEMORY_TOTAL_TYPE;\n  [AWS_CLOUDWATCH_LOGS_LOG_GROUP]?: AWS_CLOUDWATCH_LOGS_LOG_GROUP_TYPE;\n  [AWS_CLOUDWATCH_LOGS_LOG_STREAM]?: AWS_CLOUDWATCH_LOGS_LOG_STREAM_TYPE;\n  [AWS_CLOUDWATCH_LOGS_URL]?: AWS_CLOUDWATCH_LOGS_URL_TYPE;\n  [AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS]?: AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS_TYPE;\n  [AWS_DYNAMODB_CONSISTENT_READ]?: AWS_DYNAMODB_CONSISTENT_READ_TYPE;\n  [AWS_DYNAMODB_CONSUMED_CAPACITY]?: AWS_DYNAMODB_CONSUMED_CAPACITY_TYPE;\n  [AWS_DYNAMODB_COUNT]?: AWS_DYNAMODB_COUNT_TYPE;\n  [AWS_DYNAMODB_EXCLUSIVE_START_TABLE]?: AWS_DYNAMODB_EXCLUSIVE_START_TABLE_TYPE;\n  [AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES]?: AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES_TYPE;\n  [AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES]?: AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES_TYPE;\n  [AWS_DYNAMODB_INDEX_NAME]?: AWS_DYNAMODB_INDEX_NAME_TYPE;\n  [AWS_DYNAMODB_ITEM_COLLECTION_METRICS]?: AWS_DYNAMODB_ITEM_COLLECTION_METRICS_TYPE;\n  [AWS_DYNAMODB_LIMIT]?: AWS_DYNAMODB_LIMIT_TYPE;\n  [AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES]?: AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES_TYPE;\n  [AWS_DYNAMODB_PROJECTION]?: AWS_DYNAMODB_PROJECTION_TYPE;\n  [AWS_DYNAMODB_PROVISIONED_READ_CAPACITY]?: AWS_DYNAMODB_PROVISIONED_READ_CAPACITY_TYPE;\n  [AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY]?: AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY_TYPE;\n  [AWS_DYNAMODB_SCANNED_COUNT]?: AWS_DYNAMODB_SCANNED_COUNT_TYPE;\n  [AWS_DYNAMODB_SCAN_FORWARD]?: AWS_DYNAMODB_SCAN_FORWARD_TYPE;\n  [AWS_DYNAMODB_SEGMENT]?: AWS_DYNAMODB_SEGMENT_TYPE;\n  [AWS_DYNAMODB_SELECT]?: AWS_DYNAMODB_SELECT_TYPE;\n  [AWS_DYNAMODB_TABLE_COUNT]?: AWS_DYNAMODB_TABLE_COUNT_TYPE;\n  [AWS_DYNAMODB_TABLE_NAMES]?: AWS_DYNAMODB_TABLE_NAMES_TYPE;\n  [AWS_DYNAMODB_TOTAL_SEGMENTS]?: AWS_DYNAMODB_TOTAL_SEGMENTS_TYPE;\n  [AWS_EXTENDED_REQUEST_ID]?: AWS_EXTENDED_REQUEST_ID_TYPE;\n  [AWS_KINESIS_STREAM_NAME]?: AWS_KINESIS_STREAM_NAME_TYPE;\n  [_AWS_KINESIS_STREAM_NAME]?: _AWS_KINESIS_STREAM_NAME_TYPE;\n  [AWS_LAMBDA_AWS_REQUEST_ID]?: AWS_LAMBDA_AWS_REQUEST_ID_TYPE;\n  [AWS_LAMBDA_EXECUTION_DURATION_IN_MILLIS]?: AWS_LAMBDA_EXECUTION_DURATION_IN_MILLIS_TYPE;\n  [AWS_LAMBDA_FUNCTION_NAME]?: AWS_LAMBDA_FUNCTION_NAME_TYPE;\n  [AWS_LAMBDA_FUNCTION_VERSION]?: AWS_LAMBDA_FUNCTION_VERSION_TYPE;\n  [AWS_LAMBDA_INVOKED_ARN]?: AWS_LAMBDA_INVOKED_ARN_TYPE;\n  [AWS_LAMBDA_INVOKED_FUNCTION_ARN]?: AWS_LAMBDA_INVOKED_FUNCTION_ARN_TYPE;\n  [AWS_LAMBDA_REMAINING_TIME_IN_MILLIS]?: AWS_LAMBDA_REMAINING_TIME_IN_MILLIS_TYPE;\n  [AWS_LOG_GROUP_NAMES]?: AWS_LOG_GROUP_NAMES_TYPE;\n  [AWS_LOG_STREAM_NAMES]?: AWS_LOG_STREAM_NAMES_TYPE;\n  [AWS_REQUEST_EXTENDED_ID]?: AWS_REQUEST_EXTENDED_ID_TYPE;\n  [AWS_REQUEST_ID]?: AWS_REQUEST_ID_TYPE;\n  [_AWS_REQUEST_ID]?: _AWS_REQUEST_ID_TYPE;\n  [AWS_S3_BUCKET]?: AWS_S3_BUCKET_TYPE;\n  [AWS_SECRETSMANAGER_SECRET_ARN]?: AWS_SECRETSMANAGER_SECRET_ARN_TYPE;\n  [AWS_SNS_TOPIC_ARN]?: AWS_SNS_TOPIC_ARN_TYPE;\n  [AWS_STEP_FUNCTIONS_ACTIVITY_ARN]?: AWS_STEP_FUNCTIONS_ACTIVITY_ARN_TYPE;\n  [AWS_STEP_FUNCTIONS_STATE_MACHINE_ARN]?: AWS_STEP_FUNCTIONS_STATE_MACHINE_ARN_TYPE;\n  [BLOCKED_MAIN_THREAD]?: BLOCKED_MAIN_THREAD_TYPE;\n  [BROWSER_NAME]?: BROWSER_NAME_TYPE;\n  [BROWSER_PERFORMANCE_NAVIGATION_ACTIVATION_START]?: BROWSER_PERFORMANCE_NAVIGATION_ACTIVATION_START_TYPE;\n  [BROWSER_PERFORMANCE_TIME_ORIGIN]?: BROWSER_PERFORMANCE_TIME_ORIGIN_TYPE;\n  [BROWSER_REPORT_TYPE]?: BROWSER_REPORT_TYPE_TYPE;\n  [BROWSER_SCRIPT_INVOKER]?: BROWSER_SCRIPT_INVOKER_TYPE;\n  [BROWSER_SCRIPT_INVOKER_TYPE]?: BROWSER_SCRIPT_INVOKER_TYPE_TYPE;\n  [BROWSER_SCRIPT_SOURCE_CHAR_POSITION]?: BROWSER_SCRIPT_SOURCE_CHAR_POSITION_TYPE;\n  [BROWSER_VERSION]?: BROWSER_VERSION_TYPE;\n  [BROWSER_WEB_VITAL_CLS_REPORT_EVENT]?: BROWSER_WEB_VITAL_CLS_REPORT_EVENT_TYPE;\n  [BROWSER_WEB_VITAL_CLS_SOURCE_KEY]?: BROWSER_WEB_VITAL_CLS_SOURCE_KEY_TYPE;\n  [BROWSER_WEB_VITAL_CLS_VALUE]?: BROWSER_WEB_VITAL_CLS_VALUE_TYPE;\n  [BROWSER_WEB_VITAL_FCP_VALUE]?: BROWSER_WEB_VITAL_FCP_VALUE_TYPE;\n  [BROWSER_WEB_VITAL_FP_VALUE]?: BROWSER_WEB_VITAL_FP_VALUE_TYPE;\n  [BROWSER_WEB_VITAL_INP_VALUE]?: BROWSER_WEB_VITAL_INP_VALUE_TYPE;\n  [BROWSER_WEB_VITAL_LCP_ELEMENT]?: BROWSER_WEB_VITAL_LCP_ELEMENT_TYPE;\n  [BROWSER_WEB_VITAL_LCP_ID]?: BROWSER_WEB_VITAL_LCP_ID_TYPE;\n  [BROWSER_WEB_VITAL_LCP_LOAD_TIME]?: BROWSER_WEB_VITAL_LCP_LOAD_TIME_TYPE;\n  [BROWSER_WEB_VITAL_LCP_RENDER_TIME]?: BROWSER_WEB_VITAL_LCP_RENDER_TIME_TYPE;\n  [BROWSER_WEB_VITAL_LCP_REPORT_EVENT]?: BROWSER_WEB_VITAL_LCP_REPORT_EVENT_TYPE;\n  [BROWSER_WEB_VITAL_LCP_SIZE]?: BROWSER_WEB_VITAL_LCP_SIZE_TYPE;\n  [BROWSER_WEB_VITAL_LCP_URL]?: BROWSER_WEB_VITAL_LCP_URL_TYPE;\n  [BROWSER_WEB_VITAL_LCP_VALUE]?: BROWSER_WEB_VITAL_LCP_VALUE_TYPE;\n  [BROWSER_WEB_VITAL_TTFB_REQUEST_TIME]?: BROWSER_WEB_VITAL_TTFB_REQUEST_TIME_TYPE;\n  [BROWSER_WEB_VITAL_TTFB_VALUE]?: BROWSER_WEB_VITAL_TTFB_VALUE_TYPE;\n  [CACHE_HIT]?: CACHE_HIT_TYPE;\n  [CACHE_ITEM_SIZE]?: CACHE_ITEM_SIZE_TYPE;\n  [CACHE_KEY]?: CACHE_KEY_TYPE;\n  [CACHE_OPERATION]?: CACHE_OPERATION_TYPE;\n  [CACHE_TTL]?: CACHE_TTL_TYPE;\n  [CACHE_WRITE]?: CACHE_WRITE_TYPE;\n  [CHANNEL]?: CHANNEL_TYPE;\n  [CLIENT_ADDRESS]?: CLIENT_ADDRESS_TYPE;\n  [CLIENT_PORT]?: CLIENT_PORT_TYPE;\n  [CLOUDFLARE_D1_DURATION]?: CLOUDFLARE_D1_DURATION_TYPE;\n  [CLOUDFLARE_D1_QUERY_TYPE]?: CLOUDFLARE_D1_QUERY_TYPE_TYPE;\n  [CLOUDFLARE_D1_ROWS_READ]?: CLOUDFLARE_D1_ROWS_READ_TYPE;\n  [CLOUDFLARE_D1_ROWS_WRITTEN]?: CLOUDFLARE_D1_ROWS_WRITTEN_TYPE;\n  [CLOUDFLARE_DURABLE_OBJECT_QUERY_BINDINGS]?: CLOUDFLARE_DURABLE_OBJECT_QUERY_BINDINGS_TYPE;\n  [CLOUDFLARE_DURABLE_OBJECT_RESPONSE_ROWS_READ]?: CLOUDFLARE_DURABLE_OBJECT_RESPONSE_ROWS_READ_TYPE;\n  [CLOUDFLARE_DURABLE_OBJECT_RESPONSE_ROWS_WRITTEN]?: CLOUDFLARE_DURABLE_OBJECT_RESPONSE_ROWS_WRITTEN_TYPE;\n  [CLOUDFLARE_R2_BUCKET]?: CLOUDFLARE_R2_BUCKET_TYPE;\n  [CLOUDFLARE_R2_OPERATION]?: CLOUDFLARE_R2_OPERATION_TYPE;\n  [CLOUDFLARE_R2_REQUEST_DELIMITER]?: CLOUDFLARE_R2_REQUEST_DELIMITER_TYPE;\n  [CLOUDFLARE_R2_REQUEST_KEY]?: CLOUDFLARE_R2_REQUEST_KEY_TYPE;\n  [CLOUDFLARE_R2_REQUEST_PART_NUMBER]?: CLOUDFLARE_R2_REQUEST_PART_NUMBER_TYPE;\n  [CLOUDFLARE_R2_REQUEST_PREFIX]?: CLOUDFLARE_R2_REQUEST_PREFIX_TYPE;\n  [CLOUDFLARE_WORKFLOW_ATTEMPT]?: CLOUDFLARE_WORKFLOW_ATTEMPT_TYPE;\n  [CLOUDFLARE_WORKFLOW_RETRIES_BACKOFF]?: CLOUDFLARE_WORKFLOW_RETRIES_BACKOFF_TYPE;\n  [CLOUDFLARE_WORKFLOW_RETRIES_DELAY]?: CLOUDFLARE_WORKFLOW_RETRIES_DELAY_TYPE;\n  [CLOUDFLARE_WORKFLOW_RETRIES_LIMIT]?: CLOUDFLARE_WORKFLOW_RETRIES_LIMIT_TYPE;\n  [CLOUDFLARE_WORKFLOW_TIMEOUT]?: CLOUDFLARE_WORKFLOW_TIMEOUT_TYPE;\n  [CLOUD_ACCOUNT_ID]?: CLOUD_ACCOUNT_ID_TYPE;\n  [CLOUD_AVAILABILITY_ZONE]?: CLOUD_AVAILABILITY_ZONE_TYPE;\n  [CLOUD_PLATFORM]?: CLOUD_PLATFORM_TYPE;\n  [CLOUD_PROVIDER]?: CLOUD_PROVIDER_TYPE;\n  [CLOUD_REGION]?: CLOUD_REGION_TYPE;\n  [CLOUD_RESOURCE_ID]?: CLOUD_RESOURCE_ID_TYPE;\n  [CLS]?: CLS_TYPE;\n  [CLS_SOURCE_KEY]?: CLS_SOURCE_KEY_TYPE;\n  [CODE_FILEPATH]?: CODE_FILEPATH_TYPE;\n  [CODE_FILE_PATH]?: CODE_FILE_PATH_TYPE;\n  [CODE_FUNCTION]?: CODE_FUNCTION_TYPE;\n  [CODE_FUNCTION_NAME]?: CODE_FUNCTION_NAME_TYPE;\n  [CODE_LINENO]?: CODE_LINENO_TYPE;\n  [CODE_LINE_NUMBER]?: CODE_LINE_NUMBER_TYPE;\n  [CODE_NAMESPACE]?: CODE_NAMESPACE_TYPE;\n  [CONNECTIONTYPE]?: CONNECTIONTYPE_TYPE;\n  [CONNECTION_RTT]?: CONNECTION_RTT_TYPE;\n  [CULTURE_CALENDAR]?: CULTURE_CALENDAR_TYPE;\n  [CULTURE_DISPLAY_NAME]?: CULTURE_DISPLAY_NAME_TYPE;\n  [CULTURE_IS_24_HOUR_FORMAT]?: CULTURE_IS_24_HOUR_FORMAT_TYPE;\n  [CULTURE_LOCALE]?: CULTURE_LOCALE_TYPE;\n  [CULTURE_TIMEZONE]?: CULTURE_TIMEZONE_TYPE;\n  [DB_COLLECTION_NAME]?: DB_COLLECTION_NAME_TYPE;\n  [DB_DRIVER_NAME]?: DB_DRIVER_NAME_TYPE;\n  [DB_NAME]?: DB_NAME_TYPE;\n  [DB_NAMESPACE]?: DB_NAMESPACE_TYPE;\n  [DB_OPERATION]?: DB_OPERATION_TYPE;\n  [DB_OPERATION_BATCH_SIZE]?: DB_OPERATION_BATCH_SIZE_TYPE;\n  [DB_OPERATION_NAME]?: DB_OPERATION_NAME_TYPE;\n  [DB_QUERY_PARAMETER_KEY]?: DB_QUERY_PARAMETER_KEY_TYPE;\n  [DB_QUERY_SUMMARY]?: DB_QUERY_SUMMARY_TYPE;\n  [DB_QUERY_TEXT]?: DB_QUERY_TEXT_TYPE;\n  [DB_REDIS_CONNECTION]?: DB_REDIS_CONNECTION_TYPE;\n  [DB_REDIS_KEY]?: DB_REDIS_KEY_TYPE;\n  [DB_REDIS_PARAMETERS]?: DB_REDIS_PARAMETERS_TYPE;\n  [DB_RESPONSE_STATUS_CODE]?: DB_RESPONSE_STATUS_CODE_TYPE;\n  [DB_SQL_BINDINGS]?: DB_SQL_BINDINGS_TYPE;\n  [DB_STATEMENT]?: DB_STATEMENT_TYPE;\n  [DB_STORED_PROCEDURE_NAME]?: DB_STORED_PROCEDURE_NAME_TYPE;\n  [DB_SYSTEM]?: DB_SYSTEM_TYPE;\n  [DB_SYSTEM_NAME]?: DB_SYSTEM_NAME_TYPE;\n  [DB_USER]?: DB_USER_TYPE;\n  [DEVICEMEMORY]?: DEVICEMEMORY_TYPE;\n  [DEVICE_ARCHS]?: DEVICE_ARCHS_TYPE;\n  [DEVICE_BATTERY_LEVEL]?: DEVICE_BATTERY_LEVEL_TYPE;\n  [DEVICE_BATTERY_TEMPERATURE]?: DEVICE_BATTERY_TEMPERATURE_TYPE;\n  [DEVICE_BOOT_TIME]?: DEVICE_BOOT_TIME_TYPE;\n  [DEVICE_BRAND]?: DEVICE_BRAND_TYPE;\n  [DEVICE_CHARGING]?: DEVICE_CHARGING_TYPE;\n  [DEVICE_CHIPSET]?: DEVICE_CHIPSET_TYPE;\n  [DEVICE_CLASS]?: DEVICE_CLASS_TYPE;\n  [DEVICE_CONNECTION_TYPE]?: DEVICE_CONNECTION_TYPE_TYPE;\n  [DEVICE_CPU_DESCRIPTION]?: DEVICE_CPU_DESCRIPTION_TYPE;\n  [DEVICE_EXTERNAL_FREE_STORAGE]?: DEVICE_EXTERNAL_FREE_STORAGE_TYPE;\n  [DEVICE_EXTERNAL_STORAGE_SIZE]?: DEVICE_EXTERNAL_STORAGE_SIZE_TYPE;\n  [DEVICE_FAMILY]?: DEVICE_FAMILY_TYPE;\n  [DEVICE_FREE_MEMORY]?: DEVICE_FREE_MEMORY_TYPE;\n  [DEVICE_FREE_STORAGE]?: DEVICE_FREE_STORAGE_TYPE;\n  [DEVICE_ID]?: DEVICE_ID_TYPE;\n  [DEVICE_LOCALE]?: DEVICE_LOCALE_TYPE;\n  [DEVICE_LOW_MEMORY]?: DEVICE_LOW_MEMORY_TYPE;\n  [DEVICE_LOW_POWER_MODE]?: DEVICE_LOW_POWER_MODE_TYPE;\n  [DEVICE_MANUFACTURER]?: DEVICE_MANUFACTURER_TYPE;\n  [DEVICE_MEMORY_ESTIMATED_CAPACITY]?: DEVICE_MEMORY_ESTIMATED_CAPACITY_TYPE;\n  [DEVICE_MEMORY_SIZE]?: DEVICE_MEMORY_SIZE_TYPE;\n  [DEVICE_MODEL]?: DEVICE_MODEL_TYPE;\n  [DEVICE_MODEL_ID]?: DEVICE_MODEL_ID_TYPE;\n  [DEVICE_NAME]?: DEVICE_NAME_TYPE;\n  [DEVICE_ONLINE]?: DEVICE_ONLINE_TYPE;\n  [DEVICE_ORIENTATION]?: DEVICE_ORIENTATION_TYPE;\n  [DEVICE_PROCESSOR_COUNT]?: DEVICE_PROCESSOR_COUNT_TYPE;\n  [DEVICE_PROCESSOR_FREQUENCY]?: DEVICE_PROCESSOR_FREQUENCY_TYPE;\n  [DEVICE_SCREEN_DENSITY]?: DEVICE_SCREEN_DENSITY_TYPE;\n  [DEVICE_SCREEN_DPI]?: DEVICE_SCREEN_DPI_TYPE;\n  [DEVICE_SCREEN_HEIGHT_PIXELS]?: DEVICE_SCREEN_HEIGHT_PIXELS_TYPE;\n  [DEVICE_SCREEN_WIDTH_PIXELS]?: DEVICE_SCREEN_WIDTH_PIXELS_TYPE;\n  [DEVICE_SIMULATOR]?: DEVICE_SIMULATOR_TYPE;\n  [DEVICE_STORAGE_SIZE]?: DEVICE_STORAGE_SIZE_TYPE;\n  [DEVICE_THERMAL_STATE]?: DEVICE_THERMAL_STATE_TYPE;\n  [DEVICE_TIMEZONE]?: DEVICE_TIMEZONE_TYPE;\n  [DEVICE_USABLE_MEMORY]?: DEVICE_USABLE_MEMORY_TYPE;\n  [DIST]?: DIST_TYPE;\n  [EFFECTIVECONNECTIONTYPE]?: EFFECTIVECONNECTIONTYPE_TYPE;\n  [ENVIRONMENT]?: ENVIRONMENT_TYPE;\n  [ERROR_TYPE]?: ERROR_TYPE_TYPE;\n  [EVENT_ID]?: EVENT_ID_TYPE;\n  [EVENT_NAME]?: EVENT_NAME_TYPE;\n  [EXCEPTION_ESCAPED]?: EXCEPTION_ESCAPED_TYPE;\n  [EXCEPTION_MESSAGE]?: EXCEPTION_MESSAGE_TYPE;\n  [EXCEPTION_STACKTRACE]?: EXCEPTION_STACKTRACE_TYPE;\n  [EXCEPTION_TYPE]?: EXCEPTION_TYPE_TYPE;\n  [FAAS_COLDSTART]?: FAAS_COLDSTART_TYPE;\n  [FAAS_CRON]?: FAAS_CRON_TYPE;\n  [FAAS_DURATION_IN_MS]?: FAAS_DURATION_IN_MS_TYPE;\n  [FAAS_ENTRY_POINT]?: FAAS_ENTRY_POINT_TYPE;\n  [FAAS_EXECUTION]?: FAAS_EXECUTION_TYPE;\n  [FAAS_ID]?: FAAS_ID_TYPE;\n  [FAAS_IDENTITY]?: FAAS_IDENTITY_TYPE;\n  [FAAS_INVOCATION_ID]?: FAAS_INVOCATION_ID_TYPE;\n  [FAAS_INVOKED_NAME]?: FAAS_INVOKED_NAME_TYPE;\n  [FAAS_INVOKED_PROVIDER]?: FAAS_INVOKED_PROVIDER_TYPE;\n  [FAAS_INVOKED_REGION]?: FAAS_INVOKED_REGION_TYPE;\n  [FAAS_NAME]?: FAAS_NAME_TYPE;\n  [FAAS_TIME]?: FAAS_TIME_TYPE;\n  [FAAS_TRIGGER]?: FAAS_TRIGGER_TYPE;\n  [FAAS_VERSION]?: FAAS_VERSION_TYPE;\n  [FCP]?: FCP_TYPE;\n  [FLAG_EVALUATION_KEY]?: FLAG_EVALUATION_KEY_TYPE;\n  [FP]?: FP_TYPE;\n  [FRAMES_DELAY]?: FRAMES_DELAY_TYPE;\n  [FRAMES_FROZEN]?: FRAMES_FROZEN_TYPE;\n  [FRAMES_FROZEN_RATE]?: FRAMES_FROZEN_RATE_TYPE;\n  [FRAMES_SLOW]?: FRAMES_SLOW_TYPE;\n  [FRAMES_SLOW_RATE]?: FRAMES_SLOW_RATE_TYPE;\n  [FRAMES_TOTAL]?: FRAMES_TOTAL_TYPE;\n  [FS_ERROR]?: FS_ERROR_TYPE;\n  [GCP_FUNCTION_CONTEXT_EVENT_ID]?: GCP_FUNCTION_CONTEXT_EVENT_ID_TYPE;\n  [GCP_FUNCTION_CONTEXT_EVENT_TYPE]?: GCP_FUNCTION_CONTEXT_EVENT_TYPE_TYPE;\n  [GCP_FUNCTION_CONTEXT_ID]?: GCP_FUNCTION_CONTEXT_ID_TYPE;\n  [GCP_FUNCTION_CONTEXT_RESOURCE]?: GCP_FUNCTION_CONTEXT_RESOURCE_TYPE;\n  [GCP_FUNCTION_CONTEXT_SOURCE]?: GCP_FUNCTION_CONTEXT_SOURCE_TYPE;\n  [GCP_FUNCTION_CONTEXT_SPECVERSION]?: GCP_FUNCTION_CONTEXT_SPECVERSION_TYPE;\n  [GCP_FUNCTION_CONTEXT_TIME]?: GCP_FUNCTION_CONTEXT_TIME_TYPE;\n  [GCP_FUNCTION_CONTEXT_TIMESTAMP]?: GCP_FUNCTION_CONTEXT_TIMESTAMP_TYPE;\n  [GCP_FUNCTION_CONTEXT_TYPE]?: GCP_FUNCTION_CONTEXT_TYPE_TYPE;\n  [GCP_PROJECT_ID]?: GCP_PROJECT_ID_TYPE;\n  [GEN_AI_AGENT_NAME]?: GEN_AI_AGENT_NAME_TYPE;\n  [GEN_AI_CONTEXT_UTILIZATION]?: GEN_AI_CONTEXT_UTILIZATION_TYPE;\n  [GEN_AI_CONTEXT_WINDOW_SIZE]?: GEN_AI_CONTEXT_WINDOW_SIZE_TYPE;\n  [GEN_AI_CONVERSATION_ID]?: GEN_AI_CONVERSATION_ID_TYPE;\n  [GEN_AI_COST_CACHE_CREATION_INPUT_TOKENS]?: GEN_AI_COST_CACHE_CREATION_INPUT_TOKENS_TYPE;\n  [GEN_AI_COST_CACHE_READ_INPUT_TOKENS]?: GEN_AI_COST_CACHE_READ_INPUT_TOKENS_TYPE;\n  [GEN_AI_COST_INPUT_TOKENS]?: GEN_AI_COST_INPUT_TOKENS_TYPE;\n  [GEN_AI_COST_OUTPUT_TOKENS]?: GEN_AI_COST_OUTPUT_TOKENS_TYPE;\n  [GEN_AI_COST_REASONING_OUTPUT_TOKENS]?: GEN_AI_COST_REASONING_OUTPUT_TOKENS_TYPE;\n  [GEN_AI_COST_TOTAL_TOKENS]?: GEN_AI_COST_TOTAL_TOKENS_TYPE;\n  [GEN_AI_EMBEDDINGS_INPUT]?: GEN_AI_EMBEDDINGS_INPUT_TYPE;\n  [GEN_AI_FUNCTION_ID]?: GEN_AI_FUNCTION_ID_TYPE;\n  [GEN_AI_INPUT_MESSAGES]?: GEN_AI_INPUT_MESSAGES_TYPE;\n  [GEN_AI_OPERATION_NAME]?: GEN_AI_OPERATION_NAME_TYPE;\n  [GEN_AI_OPERATION_TYPE]?: GEN_AI_OPERATION_TYPE_TYPE;\n  [GEN_AI_OUTPUT_MESSAGES]?: GEN_AI_OUTPUT_MESSAGES_TYPE;\n  [GEN_AI_PIPELINE_NAME]?: GEN_AI_PIPELINE_NAME_TYPE;\n  [GEN_AI_PROMPT]?: GEN_AI_PROMPT_TYPE;\n  [GEN_AI_PROMPT_NAME]?: GEN_AI_PROMPT_NAME_TYPE;\n  [GEN_AI_PROVIDER_NAME]?: GEN_AI_PROVIDER_NAME_TYPE;\n  [GEN_AI_REQUEST_AVAILABLE_TOOLS]?: GEN_AI_REQUEST_AVAILABLE_TOOLS_TYPE;\n  [GEN_AI_REQUEST_FREQUENCY_PENALTY]?: GEN_AI_REQUEST_FREQUENCY_PENALTY_TYPE;\n  [GEN_AI_REQUEST_MAX_TOKENS]?: GEN_AI_REQUEST_MAX_TOKENS_TYPE;\n  [GEN_AI_REQUEST_MESSAGES]?: GEN_AI_REQUEST_MESSAGES_TYPE;\n  [GEN_AI_REQUEST_MODEL]?: GEN_AI_REQUEST_MODEL_TYPE;\n  [GEN_AI_REQUEST_PRESENCE_PENALTY]?: GEN_AI_REQUEST_PRESENCE_PENALTY_TYPE;\n  [GEN_AI_REQUEST_REASONING_EFFORT]?: GEN_AI_REQUEST_REASONING_EFFORT_TYPE;\n  [GEN_AI_REQUEST_SEED]?: GEN_AI_REQUEST_SEED_TYPE;\n  [GEN_AI_REQUEST_STOP_SEQUENCES]?: GEN_AI_REQUEST_STOP_SEQUENCES_TYPE;\n  [GEN_AI_REQUEST_TEMPERATURE]?: GEN_AI_REQUEST_TEMPERATURE_TYPE;\n  [GEN_AI_REQUEST_TOP_K]?: GEN_AI_REQUEST_TOP_K_TYPE;\n  [GEN_AI_REQUEST_TOP_P]?: GEN_AI_REQUEST_TOP_P_TYPE;\n  [GEN_AI_RESPONSE_FINISH_REASONS]?: GEN_AI_RESPONSE_FINISH_REASONS_TYPE;\n  [GEN_AI_RESPONSE_ID]?: GEN_AI_RESPONSE_ID_TYPE;\n  [GEN_AI_RESPONSE_MODEL]?: GEN_AI_RESPONSE_MODEL_TYPE;\n  [GEN_AI_RESPONSE_STREAMING]?: GEN_AI_RESPONSE_STREAMING_TYPE;\n  [GEN_AI_RESPONSE_TEXT]?: GEN_AI_RESPONSE_TEXT_TYPE;\n  [GEN_AI_RESPONSE_TIME_TO_FIRST_CHUNK]?: GEN_AI_RESPONSE_TIME_TO_FIRST_CHUNK_TYPE;\n  [GEN_AI_RESPONSE_TIME_TO_FIRST_TOKEN]?: GEN_AI_RESPONSE_TIME_TO_FIRST_TOKEN_TYPE;\n  [GEN_AI_RESPONSE_TOKENS_PER_SECOND]?: GEN_AI_RESPONSE_TOKENS_PER_SECOND_TYPE;\n  [GEN_AI_RESPONSE_TOOL_CALLS]?: GEN_AI_RESPONSE_TOOL_CALLS_TYPE;\n  [GEN_AI_SYSTEM]?: GEN_AI_SYSTEM_TYPE;\n  [GEN_AI_SYSTEM_INSTRUCTIONS]?: GEN_AI_SYSTEM_INSTRUCTIONS_TYPE;\n  [GEN_AI_SYSTEM_MESSAGE]?: GEN_AI_SYSTEM_MESSAGE_TYPE;\n  [GEN_AI_TOOL_CALL_ARGUMENTS]?: GEN_AI_TOOL_CALL_ARGUMENTS_TYPE;\n  [GEN_AI_TOOL_CALL_RESULT]?: GEN_AI_TOOL_CALL_RESULT_TYPE;\n  [GEN_AI_TOOL_DEFINITIONS]?: GEN_AI_TOOL_DEFINITIONS_TYPE;\n  [GEN_AI_TOOL_DESCRIPTION]?: GEN_AI_TOOL_DESCRIPTION_TYPE;\n  [GEN_AI_TOOL_INPUT]?: GEN_AI_TOOL_INPUT_TYPE;\n  [GEN_AI_TOOL_MESSAGE]?: GEN_AI_TOOL_MESSAGE_TYPE;\n  [GEN_AI_TOOL_NAME]?: GEN_AI_TOOL_NAME_TYPE;\n  [GEN_AI_TOOL_OUTPUT]?: GEN_AI_TOOL_OUTPUT_TYPE;\n  [GEN_AI_TOOL_TYPE]?: GEN_AI_TOOL_TYPE_TYPE;\n  [GEN_AI_USAGE_CACHE_CREATION_INPUT_TOKENS]?: GEN_AI_USAGE_CACHE_CREATION_INPUT_TOKENS_TYPE;\n  [GEN_AI_USAGE_CACHE_READ_INPUT_TOKENS]?: GEN_AI_USAGE_CACHE_READ_INPUT_TOKENS_TYPE;\n  [GEN_AI_USAGE_COMPLETION_TOKENS]?: GEN_AI_USAGE_COMPLETION_TOKENS_TYPE;\n  [GEN_AI_USAGE_INPUT_TOKENS]?: GEN_AI_USAGE_INPUT_TOKENS_TYPE;\n  [GEN_AI_USAGE_INPUT_TOKENS_CACHED]?: GEN_AI_USAGE_INPUT_TOKENS_CACHED_TYPE;\n  [GEN_AI_USAGE_INPUT_TOKENS_CACHE_WRITE]?: GEN_AI_USAGE_INPUT_TOKENS_CACHE_WRITE_TYPE;\n  [GEN_AI_USAGE_OUTPUT_TOKENS]?: GEN_AI_USAGE_OUTPUT_TOKENS_TYPE;\n  [GEN_AI_USAGE_OUTPUT_TOKENS_REASONING]?: GEN_AI_USAGE_OUTPUT_TOKENS_REASONING_TYPE;\n  [GEN_AI_USAGE_PROMPT_TOKENS]?: GEN_AI_USAGE_PROMPT_TOKENS_TYPE;\n  [GEN_AI_USAGE_REASONING_OUTPUT_TOKENS]?: GEN_AI_USAGE_REASONING_OUTPUT_TOKENS_TYPE;\n  [GEN_AI_USAGE_TOTAL_TOKENS]?: GEN_AI_USAGE_TOTAL_TOKENS_TYPE;\n  [GRAPHQL_DOCUMENT]?: GRAPHQL_DOCUMENT_TYPE;\n  [GRAPHQL_OPERATION_NAME]?: GRAPHQL_OPERATION_NAME_TYPE;\n  [GRAPHQL_OPERATION_TYPE]?: GRAPHQL_OPERATION_TYPE_TYPE;\n  [HARDWARECONCURRENCY]?: HARDWARECONCURRENCY_TYPE;\n  [HTTP_CLIENT_IP]?: HTTP_CLIENT_IP_TYPE;\n  [HTTP_DECODED_RESPONSE_CONTENT_LENGTH]?: HTTP_DECODED_RESPONSE_CONTENT_LENGTH_TYPE;\n  [HTTP_FLAVOR]?: HTTP_FLAVOR_TYPE;\n  [HTTP_FRAGMENT]?: HTTP_FRAGMENT_TYPE;\n  [HTTP_HOST]?: HTTP_HOST_TYPE;\n  [HTTP_METHOD]?: HTTP_METHOD_TYPE;\n  [HTTP_QUERY]?: HTTP_QUERY_TYPE;\n  [HTTP_REQUEST_BODY_DATA]?: HTTP_REQUEST_BODY_DATA_TYPE;\n  [HTTP_REQUEST_CONNECTION_END]?: HTTP_REQUEST_CONNECTION_END_TYPE;\n  [HTTP_REQUEST_CONNECT_START]?: HTTP_REQUEST_CONNECT_START_TYPE;\n  [HTTP_REQUEST_DOMAIN_LOOKUP_END]?: HTTP_REQUEST_DOMAIN_LOOKUP_END_TYPE;\n  [HTTP_REQUEST_DOMAIN_LOOKUP_START]?: HTTP_REQUEST_DOMAIN_LOOKUP_START_TYPE;\n  [HTTP_REQUEST_FETCH_START]?: HTTP_REQUEST_FETCH_START_TYPE;\n  [HTTP_REQUEST_HEADER_KEY]?: HTTP_REQUEST_HEADER_KEY_TYPE;\n  [HTTP_REQUEST_METHOD]?: HTTP_REQUEST_METHOD_TYPE;\n  [_HTTP_REQUEST_METHOD]?: _HTTP_REQUEST_METHOD_TYPE;\n  [HTTP_REQUEST_REDIRECT_END]?: HTTP_REQUEST_REDIRECT_END_TYPE;\n  [HTTP_REQUEST_REDIRECT_START]?: HTTP_REQUEST_REDIRECT_START_TYPE;\n  [HTTP_REQUEST_REQUEST_START]?: HTTP_REQUEST_REQUEST_START_TYPE;\n  [HTTP_REQUEST_RESEND_COUNT]?: HTTP_REQUEST_RESEND_COUNT_TYPE;\n  [HTTP_REQUEST_RESPONSE_END]?: HTTP_REQUEST_RESPONSE_END_TYPE;\n  [HTTP_REQUEST_RESPONSE_START]?: HTTP_REQUEST_RESPONSE_START_TYPE;\n  [HTTP_REQUEST_SAME_ORIGIN]?: HTTP_REQUEST_SAME_ORIGIN_TYPE;\n  [HTTP_REQUEST_SECURE_CONNECTION_START]?: HTTP_REQUEST_SECURE_CONNECTION_START_TYPE;\n  [HTTP_REQUEST_TIME_TO_FIRST_BYTE]?: HTTP_REQUEST_TIME_TO_FIRST_BYTE_TYPE;\n  [HTTP_REQUEST_WORKER_START]?: HTTP_REQUEST_WORKER_START_TYPE;\n  [HTTP_RESPONSE_BODY_SIZE]?: HTTP_RESPONSE_BODY_SIZE_TYPE;\n  [HTTP_RESPONSE_CONTENT_LENGTH]?: HTTP_RESPONSE_CONTENT_LENGTH_TYPE;\n  [HTTP_RESPONSE_HEADER_CONTENT_LENGTH]?: HTTP_RESPONSE_HEADER_CONTENT_LENGTH_TYPE;\n  [HTTP_RESPONSE_HEADER_KEY]?: HTTP_RESPONSE_HEADER_KEY_TYPE;\n  [HTTP_RESPONSE_SIZE]?: HTTP_RESPONSE_SIZE_TYPE;\n  [HTTP_RESPONSE_STATUS_CODE]?: HTTP_RESPONSE_STATUS_CODE_TYPE;\n  [HTTP_RESPONSE_TRANSFER_SIZE]?: HTTP_RESPONSE_TRANSFER_SIZE_TYPE;\n  [HTTP_ROUTE]?: HTTP_ROUTE_TYPE;\n  [HTTP_SCHEME]?: HTTP_SCHEME_TYPE;\n  [HTTP_SERVER_NAME]?: HTTP_SERVER_NAME_TYPE;\n  [HTTP_SERVER_REQUEST_TIME_IN_QUEUE]?: HTTP_SERVER_REQUEST_TIME_IN_QUEUE_TYPE;\n  [HTTP_STATUS_CODE]?: HTTP_STATUS_CODE_TYPE;\n  [HTTP_TARGET]?: HTTP_TARGET_TYPE;\n  [HTTP_URL]?: HTTP_URL_TYPE;\n  [HTTP_USER_AGENT]?: HTTP_USER_AGENT_TYPE;\n  [ID]?: ID_TYPE;\n  [INP]?: INP_TYPE;\n  [JSONRPC_PROTOCOL_VERSION]?: JSONRPC_PROTOCOL_VERSION_TYPE;\n  [JSONRPC_REQUEST_ID]?: JSONRPC_REQUEST_ID_TYPE;\n  [JVM_GC_ACTION]?: JVM_GC_ACTION_TYPE;\n  [JVM_GC_NAME]?: JVM_GC_NAME_TYPE;\n  [JVM_MEMORY_POOL_NAME]?: JVM_MEMORY_POOL_NAME_TYPE;\n  [JVM_MEMORY_TYPE]?: JVM_MEMORY_TYPE_TYPE;\n  [JVM_THREAD_DAEMON]?: JVM_THREAD_DAEMON_TYPE;\n  [JVM_THREAD_STATE]?: JVM_THREAD_STATE_TYPE;\n  [KOA_NAME]?: KOA_NAME_TYPE;\n  [KOA_TYPE]?: KOA_TYPE_TYPE;\n  [LCP]?: LCP_TYPE;\n  [LCP_ELEMENT]?: LCP_ELEMENT_TYPE;\n  [LCP_ID]?: LCP_ID_TYPE;\n  [LCP_LOADTIME]?: LCP_LOADTIME_TYPE;\n  [LCP_RENDERTIME]?: LCP_RENDERTIME_TYPE;\n  [LCP_SIZE]?: LCP_SIZE_TYPE;\n  [LCP_URL]?: LCP_URL_TYPE;\n  [LOGGER_NAME]?: LOGGER_NAME_TYPE;\n  [MCP_CANCELLED_REASON]?: MCP_CANCELLED_REASON_TYPE;\n  [MCP_CANCELLED_REQUEST_ID]?: MCP_CANCELLED_REQUEST_ID_TYPE;\n  [MCP_CLIENT_NAME]?: MCP_CLIENT_NAME_TYPE;\n  [MCP_CLIENT_TITLE]?: MCP_CLIENT_TITLE_TYPE;\n  [MCP_CLIENT_VERSION]?: MCP_CLIENT_VERSION_TYPE;\n  [MCP_LIFECYCLE_PHASE]?: MCP_LIFECYCLE_PHASE_TYPE;\n  [MCP_LOGGING_DATA_TYPE]?: MCP_LOGGING_DATA_TYPE_TYPE;\n  [MCP_LOGGING_LEVEL]?: MCP_LOGGING_LEVEL_TYPE;\n  [MCP_LOGGING_LOGGER]?: MCP_LOGGING_LOGGER_TYPE;\n  [MCP_LOGGING_MESSAGE]?: MCP_LOGGING_MESSAGE_TYPE;\n  [MCP_METHOD_NAME]?: MCP_METHOD_NAME_TYPE;\n  [MCP_PROGRESS_CURRENT]?: MCP_PROGRESS_CURRENT_TYPE;\n  [MCP_PROGRESS_MESSAGE]?: MCP_PROGRESS_MESSAGE_TYPE;\n  [MCP_PROGRESS_PERCENTAGE]?: MCP_PROGRESS_PERCENTAGE_TYPE;\n  [MCP_PROGRESS_TOKEN]?: MCP_PROGRESS_TOKEN_TYPE;\n  [MCP_PROGRESS_TOTAL]?: MCP_PROGRESS_TOTAL_TYPE;\n  [MCP_PROMPT_NAME]?: MCP_PROMPT_NAME_TYPE;\n  [MCP_PROMPT_RESULT_DESCRIPTION]?: MCP_PROMPT_RESULT_DESCRIPTION_TYPE;\n  [MCP_PROMPT_RESULT_MESSAGE_CONTENT]?: MCP_PROMPT_RESULT_MESSAGE_CONTENT_TYPE;\n  [MCP_PROMPT_RESULT_MESSAGE_COUNT]?: MCP_PROMPT_RESULT_MESSAGE_COUNT_TYPE;\n  [MCP_PROMPT_RESULT_MESSAGE_ROLE]?: MCP_PROMPT_RESULT_MESSAGE_ROLE_TYPE;\n  [MCP_PROTOCOL_READY]?: MCP_PROTOCOL_READY_TYPE;\n  [MCP_PROTOCOL_VERSION]?: MCP_PROTOCOL_VERSION_TYPE;\n  [MCP_REQUEST_ARGUMENT_KEY]?: MCP_REQUEST_ARGUMENT_KEY_TYPE;\n  [MCP_REQUEST_ARGUMENT_NAME]?: MCP_REQUEST_ARGUMENT_NAME_TYPE;\n  [MCP_REQUEST_ARGUMENT_URI]?: MCP_REQUEST_ARGUMENT_URI_TYPE;\n  [MCP_REQUEST_ID]?: MCP_REQUEST_ID_TYPE;\n  [MCP_RESOURCE_PROTOCOL]?: MCP_RESOURCE_PROTOCOL_TYPE;\n  [MCP_RESOURCE_URI]?: MCP_RESOURCE_URI_TYPE;\n  [MCP_SERVER_NAME]?: MCP_SERVER_NAME_TYPE;\n  [MCP_SERVER_TITLE]?: MCP_SERVER_TITLE_TYPE;\n  [MCP_SERVER_VERSION]?: MCP_SERVER_VERSION_TYPE;\n  [MCP_SESSION_ID]?: MCP_SESSION_ID_TYPE;\n  [MCP_TOOL_NAME]?: MCP_TOOL_NAME_TYPE;\n  [MCP_TOOL_RESULT_CONTENT]?: MCP_TOOL_RESULT_CONTENT_TYPE;\n  [MCP_TOOL_RESULT_CONTENT_COUNT]?: MCP_TOOL_RESULT_CONTENT_COUNT_TYPE;\n  [MCP_TOOL_RESULT_IS_ERROR]?: MCP_TOOL_RESULT_IS_ERROR_TYPE;\n  [MCP_TRANSPORT]?: MCP_TRANSPORT_TYPE;\n  [MDC_KEY]?: MDC_KEY_TYPE;\n  [MESSAGING_BATCH_MESSAGE_COUNT]?: MESSAGING_BATCH_MESSAGE_COUNT_TYPE;\n  [MESSAGING_DESTINATION]?: MESSAGING_DESTINATION_TYPE;\n  [MESSAGING_DESTINATION_CONNECTION]?: MESSAGING_DESTINATION_CONNECTION_TYPE;\n  [MESSAGING_DESTINATION_NAME]?: MESSAGING_DESTINATION_NAME_TYPE;\n  [MESSAGING_MESSAGE_BODY_SIZE]?: MESSAGING_MESSAGE_BODY_SIZE_TYPE;\n  [MESSAGING_MESSAGE_CONVERSATION_ID]?: MESSAGING_MESSAGE_CONVERSATION_ID_TYPE;\n  [MESSAGING_MESSAGE_ENVELOPE_SIZE]?: MESSAGING_MESSAGE_ENVELOPE_SIZE_TYPE;\n  [MESSAGING_MESSAGE_ID]?: MESSAGING_MESSAGE_ID_TYPE;\n  [MESSAGING_MESSAGE_RECEIVE_LATENCY]?: MESSAGING_MESSAGE_RECEIVE_LATENCY_TYPE;\n  [MESSAGING_MESSAGE_RETRY_COUNT]?: MESSAGING_MESSAGE_RETRY_COUNT_TYPE;\n  [MESSAGING_OPERATION_NAME]?: MESSAGING_OPERATION_NAME_TYPE;\n  [MESSAGING_OPERATION_TYPE]?: MESSAGING_OPERATION_TYPE_TYPE;\n  [MESSAGING_RABBITMQ_DESTINATION_ROUTING_KEY]?: MESSAGING_RABBITMQ_DESTINATION_ROUTING_KEY_TYPE;\n  [MESSAGING_SYSTEM]?: MESSAGING_SYSTEM_TYPE;\n  [METHOD]?: METHOD_TYPE;\n  [MIDDLEWARE_NAME]?: MIDDLEWARE_NAME_TYPE;\n  [NAVIGATION_ORIGIN]?: NAVIGATION_ORIGIN_TYPE;\n  [NAVIGATION_ROUTE_ID]?: NAVIGATION_ROUTE_ID_TYPE;\n  [NAVIGATION_TYPE]?: NAVIGATION_TYPE_TYPE;\n  [NEL_ELAPSED_TIME]?: NEL_ELAPSED_TIME_TYPE;\n  [NEL_PHASE]?: NEL_PHASE_TYPE;\n  [NEL_REFERRER]?: NEL_REFERRER_TYPE;\n  [NEL_SAMPLING_FUNCTION]?: NEL_SAMPLING_FUNCTION_TYPE;\n  [NEL_TYPE]?: NEL_TYPE_TYPE;\n  [NETWORK_CONNECTION_EFFECTIVE_TYPE]?: NETWORK_CONNECTION_EFFECTIVE_TYPE_TYPE;\n  [NETWORK_CONNECTION_RTT]?: NETWORK_CONNECTION_RTT_TYPE;\n  [NETWORK_CONNECTION_TYPE]?: NETWORK_CONNECTION_TYPE_TYPE;\n  [NETWORK_LOCAL_ADDRESS]?: NETWORK_LOCAL_ADDRESS_TYPE;\n  [NETWORK_LOCAL_PORT]?: NETWORK_LOCAL_PORT_TYPE;\n  [NETWORK_PEER_ADDRESS]?: NETWORK_PEER_ADDRESS_TYPE;\n  [NETWORK_PEER_PORT]?: NETWORK_PEER_PORT_TYPE;\n  [NETWORK_PROTOCOL_NAME]?: NETWORK_PROTOCOL_NAME_TYPE;\n  [NETWORK_PROTOCOL_VERSION]?: NETWORK_PROTOCOL_VERSION_TYPE;\n  [NETWORK_TRANSPORT]?: NETWORK_TRANSPORT_TYPE;\n  [NETWORK_TYPE]?: NETWORK_TYPE_TYPE;\n  [NET_HOST_IP]?: NET_HOST_IP_TYPE;\n  [NET_HOST_NAME]?: NET_HOST_NAME_TYPE;\n  [NET_HOST_PORT]?: NET_HOST_PORT_TYPE;\n  [NET_PEER_IP]?: NET_PEER_IP_TYPE;\n  [NET_PEER_NAME]?: NET_PEER_NAME_TYPE;\n  [NET_PEER_PORT]?: NET_PEER_PORT_TYPE;\n  [NET_PROTOCOL_NAME]?: NET_PROTOCOL_NAME_TYPE;\n  [NET_PROTOCOL_VERSION]?: NET_PROTOCOL_VERSION_TYPE;\n  [NET_SOCK_FAMILY]?: NET_SOCK_FAMILY_TYPE;\n  [NET_SOCK_HOST_ADDR]?: NET_SOCK_HOST_ADDR_TYPE;\n  [NET_SOCK_HOST_PORT]?: NET_SOCK_HOST_PORT_TYPE;\n  [NET_SOCK_PEER_ADDR]?: NET_SOCK_PEER_ADDR_TYPE;\n  [NET_SOCK_PEER_NAME]?: NET_SOCK_PEER_NAME_TYPE;\n  [NET_SOCK_PEER_PORT]?: NET_SOCK_PEER_PORT_TYPE;\n  [NET_TRANSPORT]?: NET_TRANSPORT_TYPE;\n  [OS_BUILD]?: OS_BUILD_TYPE;\n  [OS_BUILD_ID]?: OS_BUILD_ID_TYPE;\n  [OS_DESCRIPTION]?: OS_DESCRIPTION_TYPE;\n  [OS_KERNEL_VERSION]?: OS_KERNEL_VERSION_TYPE;\n  [OS_NAME]?: OS_NAME_TYPE;\n  [OS_RAW_DESCRIPTION]?: OS_RAW_DESCRIPTION_TYPE;\n  [OS_ROOTED]?: OS_ROOTED_TYPE;\n  [OS_THEME]?: OS_THEME_TYPE;\n  [OS_TYPE]?: OS_TYPE_TYPE;\n  [OS_VERSION]?: OS_VERSION_TYPE;\n  [OTEL_KIND]?: OTEL_KIND_TYPE;\n  [OTEL_SCOPE_NAME]?: OTEL_SCOPE_NAME_TYPE;\n  [OTEL_SCOPE_VERSION]?: OTEL_SCOPE_VERSION_TYPE;\n  [OTEL_STATUS_CODE]?: OTEL_STATUS_CODE_TYPE;\n  [OTEL_STATUS_DESCRIPTION]?: OTEL_STATUS_DESCRIPTION_TYPE;\n  [PARAMS_KEY]?: PARAMS_KEY_TYPE;\n  [PERFORMANCE_ACTIVATIONSTART]?: PERFORMANCE_ACTIVATIONSTART_TYPE;\n  [PERFORMANCE_TIMEORIGIN]?: PERFORMANCE_TIMEORIGIN_TYPE;\n  [PREVIOUS_ROUTE]?: PREVIOUS_ROUTE_TYPE;\n  [PROCESS_COMMAND_ARGS]?: PROCESS_COMMAND_ARGS_TYPE;\n  [PROCESS_EXECUTABLE_NAME]?: PROCESS_EXECUTABLE_NAME_TYPE;\n  [PROCESS_PID]?: PROCESS_PID_TYPE;\n  [PROCESS_RUNTIME_DESCRIPTION]?: PROCESS_RUNTIME_DESCRIPTION_TYPE;\n  [PROCESS_RUNTIME_ENGINE_NAME]?: PROCESS_RUNTIME_ENGINE_NAME_TYPE;\n  [PROCESS_RUNTIME_ENGINE_VERSION]?: PROCESS_RUNTIME_ENGINE_VERSION_TYPE;\n  [PROCESS_RUNTIME_NAME]?: PROCESS_RUNTIME_NAME_TYPE;\n  [PROCESS_RUNTIME_VERSION]?: PROCESS_RUNTIME_VERSION_TYPE;\n  [QUERY_KEY]?: QUERY_KEY_TYPE;\n  [REACT_VERSION]?: REACT_VERSION_TYPE;\n  [RELEASE]?: RELEASE_TYPE;\n  [REMIX_ACTION_FORM_DATA_KEY]?: REMIX_ACTION_FORM_DATA_KEY_TYPE;\n  [REPLAY_ID]?: REPLAY_ID_TYPE;\n  [RESOURCE_DEPLOYMENT_ENVIRONMENT]?: RESOURCE_DEPLOYMENT_ENVIRONMENT_TYPE;\n  [RESOURCE_DEPLOYMENT_ENVIRONMENT_NAME]?: RESOURCE_DEPLOYMENT_ENVIRONMENT_NAME_TYPE;\n  [RESOURCE_RENDER_BLOCKING_STATUS]?: RESOURCE_RENDER_BLOCKING_STATUS_TYPE;\n  [ROUTE]?: ROUTE_TYPE;\n  [RPC_GRPC_STATUS_CODE]?: RPC_GRPC_STATUS_CODE_TYPE;\n  [RPC_METHOD]?: RPC_METHOD_TYPE;\n  [RPC_RESPONSE_STATUS_CODE]?: RPC_RESPONSE_STATUS_CODE_TYPE;\n  [RPC_SERVICE]?: RPC_SERVICE_TYPE;\n  [RPC_SYSTEM]?: RPC_SYSTEM_TYPE;\n  [RPC_SYSTEM_NAME]?: RPC_SYSTEM_NAME_TYPE;\n  [RUNTIME_BUILD]?: RUNTIME_BUILD_TYPE;\n  [RUNTIME_NAME]?: RUNTIME_NAME_TYPE;\n  [RUNTIME_RAW_DESCRIPTION]?: RUNTIME_RAW_DESCRIPTION_TYPE;\n  [RUNTIME_VERSION]?: RUNTIME_VERSION_TYPE;\n  [SCORE_KEY]?: SCORE_KEY_TYPE;\n  [SCORE_RATIO_KEY]?: SCORE_RATIO_KEY_TYPE;\n  [SCORE_TOTAL]?: SCORE_TOTAL_TYPE;\n  [SCORE_WEIGHT_KEY]?: SCORE_WEIGHT_KEY_TYPE;\n  [SENTRY_ACTION]?: SENTRY_ACTION_TYPE;\n  [SENTRY_BROWSER_NAME]?: SENTRY_BROWSER_NAME_TYPE;\n  [SENTRY_BROWSER_VERSION]?: SENTRY_BROWSER_VERSION_TYPE;\n  [SENTRY_CANCELLATION_REASON]?: SENTRY_CANCELLATION_REASON_TYPE;\n  [SENTRY_CATEGORY]?: SENTRY_CATEGORY_TYPE;\n  [SENTRY_CLIENT_SAMPLE_RATE]?: SENTRY_CLIENT_SAMPLE_RATE_TYPE;\n  [SENTRY_DESCRIPTION]?: SENTRY_DESCRIPTION_TYPE;\n  [SENTRY_DIST]?: SENTRY_DIST_TYPE;\n  [SENTRY_DOMAIN]?: SENTRY_DOMAIN_TYPE;\n  [SENTRY_DSC_ENVIRONMENT]?: SENTRY_DSC_ENVIRONMENT_TYPE;\n  [SENTRY_DSC_PROJECT_ID]?: SENTRY_DSC_PROJECT_ID_TYPE;\n  [SENTRY_DSC_PUBLIC_KEY]?: SENTRY_DSC_PUBLIC_KEY_TYPE;\n  [SENTRY_DSC_RELEASE]?: SENTRY_DSC_RELEASE_TYPE;\n  [SENTRY_DSC_SAMPLED]?: SENTRY_DSC_SAMPLED_TYPE;\n  [SENTRY_DSC_SAMPLE_RATE]?: SENTRY_DSC_SAMPLE_RATE_TYPE;\n  [SENTRY_DSC_TRACE_ID]?: SENTRY_DSC_TRACE_ID_TYPE;\n  [SENTRY_DSC_TRANSACTION]?: SENTRY_DSC_TRANSACTION_TYPE;\n  [SENTRY_ENVIRONMENT]?: SENTRY_ENVIRONMENT_TYPE;\n  [SENTRY_EXCLUSIVE_TIME]?: SENTRY_EXCLUSIVE_TIME_TYPE;\n  [SENTRY_GRAPHQL_OPERATION]?: SENTRY_GRAPHQL_OPERATION_TYPE;\n  [SENTRY_GROUP]?: SENTRY_GROUP_TYPE;\n  [SENTRY_HTTP_PREFETCH]?: SENTRY_HTTP_PREFETCH_TYPE;\n  [SENTRY_IDLE_SPAN_FINISH_REASON]?: SENTRY_IDLE_SPAN_FINISH_REASON_TYPE;\n  [SENTRY_IS_REMOTE]?: SENTRY_IS_REMOTE_TYPE;\n  [SENTRY_KIND]?: SENTRY_KIND_TYPE;\n  [SENTRY_MAIN_THREAD]?: SENTRY_MAIN_THREAD_TYPE;\n  [SENTRY_MESSAGE_PARAMETER_KEY]?: SENTRY_MESSAGE_PARAMETER_KEY_TYPE;\n  [SENTRY_MESSAGE_TEMPLATE]?: SENTRY_MESSAGE_TEMPLATE_TYPE;\n  [SENTRY_METRIC_SOURCE]?: SENTRY_METRIC_SOURCE_TYPE;\n  [SENTRY_MOBILE]?: SENTRY_MOBILE_TYPE;\n  [SENTRY_MODULE_KEY]?: SENTRY_MODULE_KEY_TYPE;\n  [SENTRY_NEXTJS_SSR_FUNCTION_ROUTE]?: SENTRY_NEXTJS_SSR_FUNCTION_ROUTE_TYPE;\n  [SENTRY_NEXTJS_SSR_FUNCTION_TYPE]?: SENTRY_NEXTJS_SSR_FUNCTION_TYPE_TYPE;\n  [SENTRY_NORMALIZED_DB_QUERY]?: SENTRY_NORMALIZED_DB_QUERY_TYPE;\n  [SENTRY_NORMALIZED_DB_QUERY_HASH]?: SENTRY_NORMALIZED_DB_QUERY_HASH_TYPE;\n  [SENTRY_NORMALIZED_DESCRIPTION]?: SENTRY_NORMALIZED_DESCRIPTION_TYPE;\n  [SENTRY_OBSERVED_TIMESTAMP_NANOS]?: SENTRY_OBSERVED_TIMESTAMP_NANOS_TYPE;\n  [SENTRY_OP]?: SENTRY_OP_TYPE;\n  [SENTRY_ORIGIN]?: SENTRY_ORIGIN_TYPE;\n  [SENTRY_PLATFORM]?: SENTRY_PLATFORM_TYPE;\n  [SENTRY_PROFILER_ID]?: SENTRY_PROFILER_ID_TYPE;\n  [SENTRY_PROFILE_ID]?: SENTRY_PROFILE_ID_TYPE;\n  [SENTRY_RELEASE]?: SENTRY_RELEASE_TYPE;\n  [SENTRY_REPLAY_ID]?: SENTRY_REPLAY_ID_TYPE;\n  [SENTRY_REPLAY_IS_BUFFERING]?: SENTRY_REPLAY_IS_BUFFERING_TYPE;\n  [SENTRY_REPORT_EVENT]?: SENTRY_REPORT_EVENT_TYPE;\n  [SENTRY_SDK_INTEGRATIONS]?: SENTRY_SDK_INTEGRATIONS_TYPE;\n  [SENTRY_SDK_NAME]?: SENTRY_SDK_NAME_TYPE;\n  [SENTRY_SDK_VERSION]?: SENTRY_SDK_VERSION_TYPE;\n  [SENTRY_SEGMENT_ID]?: SENTRY_SEGMENT_ID_TYPE;\n  [_SENTRY_SEGMENT_ID]?: _SENTRY_SEGMENT_ID_TYPE;\n  [SENTRY_SEGMENT_NAME]?: SENTRY_SEGMENT_NAME_TYPE;\n  [SENTRY_SERVER_SAMPLE_RATE]?: SENTRY_SERVER_SAMPLE_RATE_TYPE;\n  [SENTRY_SOURCE]?: SENTRY_SOURCE_TYPE;\n  [SENTRY_SPAN_SOURCE]?: SENTRY_SPAN_SOURCE_TYPE;\n  [SENTRY_STATUS]?: SENTRY_STATUS_TYPE;\n  [SENTRY_STATUS_CODE]?: SENTRY_STATUS_CODE_TYPE;\n  [SENTRY_STATUS_MESSAGE]?: SENTRY_STATUS_MESSAGE_TYPE;\n  [SENTRY_SVELTEKIT_NAVIGATION_FROM]?: SENTRY_SVELTEKIT_NAVIGATION_FROM_TYPE;\n  [SENTRY_SVELTEKIT_NAVIGATION_TO]?: SENTRY_SVELTEKIT_NAVIGATION_TO_TYPE;\n  [SENTRY_SVELTEKIT_NAVIGATION_TYPE]?: SENTRY_SVELTEKIT_NAVIGATION_TYPE_TYPE;\n  [SENTRY_THREAD_ID]?: SENTRY_THREAD_ID_TYPE;\n  [SENTRY_TIMESTAMP_SEQUENCE]?: SENTRY_TIMESTAMP_SEQUENCE_TYPE;\n  [SENTRY_TRACE_LIFECYCLE]?: SENTRY_TRACE_LIFECYCLE_TYPE;\n  [SENTRY_TRACE_PARENT_SPAN_ID]?: SENTRY_TRACE_PARENT_SPAN_ID_TYPE;\n  [SENTRY_TRACE_STATUS]?: SENTRY_TRACE_STATUS_TYPE;\n  [SENTRY_TRANSACTION]?: SENTRY_TRANSACTION_TYPE;\n  [SENTRY_USER_EMAIL]?: SENTRY_USER_EMAIL_TYPE;\n  [SENTRY_USER_GEO_CITY]?: SENTRY_USER_GEO_CITY_TYPE;\n  [SENTRY_USER_GEO_COUNTRY_CODE]?: SENTRY_USER_GEO_COUNTRY_CODE_TYPE;\n  [SENTRY_USER_GEO_REGION]?: SENTRY_USER_GEO_REGION_TYPE;\n  [SENTRY_USER_GEO_SUBDIVISION]?: SENTRY_USER_GEO_SUBDIVISION_TYPE;\n  [SENTRY_USER_ID]?: SENTRY_USER_ID_TYPE;\n  [SENTRY_USER_IP]?: SENTRY_USER_IP_TYPE;\n  [SENTRY_USER_USERNAME]?: SENTRY_USER_USERNAME_TYPE;\n  [SERVER_ADDRESS]?: SERVER_ADDRESS_TYPE;\n  [SERVER_NAME]?: SERVER_NAME_TYPE;\n  [SERVER_PORT]?: SERVER_PORT_TYPE;\n  [SERVICE_NAME]?: SERVICE_NAME_TYPE;\n  [SERVICE_VERSION]?: SERVICE_VERSION_TYPE;\n  [SESSION_ID]?: SESSION_ID_TYPE;\n  [STALL_PERCENTAGE]?: STALL_PERCENTAGE_TYPE;\n  [STALL_TOTAL_TIME]?: STALL_TOTAL_TIME_TYPE;\n  [STATE_TYPE]?: STATE_TYPE_TYPE;\n  [THREAD_ID]?: THREAD_ID_TYPE;\n  [THREAD_NAME]?: THREAD_NAME_TYPE;\n  [TIMBER_TAG]?: TIMBER_TAG_TYPE;\n  [TIME_TO_FULL_DISPLAY]?: TIME_TO_FULL_DISPLAY_TYPE;\n  [TIME_TO_INITIAL_DISPLAY]?: TIME_TO_INITIAL_DISPLAY_TYPE;\n  [TRANSACTION]?: TRANSACTION_TYPE;\n  [TRPC_PROCEDURE_PATH]?: TRPC_PROCEDURE_PATH_TYPE;\n  [TRPC_PROCEDURE_TYPE]?: TRPC_PROCEDURE_TYPE_TYPE;\n  [TTFB]?: TTFB_TYPE;\n  [TTFB_REQUESTTIME]?: TTFB_REQUESTTIME_TYPE;\n  [TYPE]?: TYPE_TYPE;\n  [UI_COMPONENT_NAME]?: UI_COMPONENT_NAME_TYPE;\n  [UI_CONTRIBUTES_TO_TTFD]?: UI_CONTRIBUTES_TO_TTFD_TYPE;\n  [UI_CONTRIBUTES_TO_TTID]?: UI_CONTRIBUTES_TO_TTID_TYPE;\n  [UI_ELEMENT_HEIGHT]?: UI_ELEMENT_HEIGHT_TYPE;\n  [UI_ELEMENT_ID]?: UI_ELEMENT_ID_TYPE;\n  [UI_ELEMENT_IDENTIFIER]?: UI_ELEMENT_IDENTIFIER_TYPE;\n  [UI_ELEMENT_LOAD_TIME]?: UI_ELEMENT_LOAD_TIME_TYPE;\n  [UI_ELEMENT_PAINT_TYPE]?: UI_ELEMENT_PAINT_TYPE_TYPE;\n  [UI_ELEMENT_RENDER_TIME]?: UI_ELEMENT_RENDER_TIME_TYPE;\n  [UI_ELEMENT_TYPE]?: UI_ELEMENT_TYPE_TYPE;\n  [UI_ELEMENT_URL]?: UI_ELEMENT_URL_TYPE;\n  [UI_ELEMENT_WIDTH]?: UI_ELEMENT_WIDTH_TYPE;\n  [URL]?: URL_TYPE;\n  [URL_DOMAIN]?: URL_DOMAIN_TYPE;\n  [URL_FRAGMENT]?: URL_FRAGMENT_TYPE;\n  [URL_FULL]?: URL_FULL_TYPE;\n  [URL_PATH]?: URL_PATH_TYPE;\n  [URL_PATH_PARAMETER_KEY]?: URL_PATH_PARAMETER_KEY_TYPE;\n  [URL_PORT]?: URL_PORT_TYPE;\n  [URL_QUERY]?: URL_QUERY_TYPE;\n  [URL_SAME_ORIGIN]?: URL_SAME_ORIGIN_TYPE;\n  [URL_SCHEME]?: URL_SCHEME_TYPE;\n  [URL_TEMPLATE]?: URL_TEMPLATE_TYPE;\n  [USER_AGENT_ORIGINAL]?: USER_AGENT_ORIGINAL_TYPE;\n  [USER_EMAIL]?: USER_EMAIL_TYPE;\n  [USER_FULL_NAME]?: USER_FULL_NAME_TYPE;\n  [USER_GEO_CITY]?: USER_GEO_CITY_TYPE;\n  [USER_GEO_COUNTRY_CODE]?: USER_GEO_COUNTRY_CODE_TYPE;\n  [USER_GEO_REGION]?: USER_GEO_REGION_TYPE;\n  [USER_GEO_SUBDIVISION]?: USER_GEO_SUBDIVISION_TYPE;\n  [USER_HASH]?: USER_HASH_TYPE;\n  [USER_ID]?: USER_ID_TYPE;\n  [USER_IP_ADDRESS]?: USER_IP_ADDRESS_TYPE;\n  [USER_NAME]?: USER_NAME_TYPE;\n  [USER_ROLES]?: USER_ROLES_TYPE;\n  [VERCEL_BRANCH]?: VERCEL_BRANCH_TYPE;\n  [VERCEL_BUILD_ID]?: VERCEL_BUILD_ID_TYPE;\n  [VERCEL_DEPLOYMENT_ID]?: VERCEL_DEPLOYMENT_ID_TYPE;\n  [VERCEL_DESTINATION]?: VERCEL_DESTINATION_TYPE;\n  [VERCEL_EDGE_TYPE]?: VERCEL_EDGE_TYPE_TYPE;\n  [VERCEL_ENTRYPOINT]?: VERCEL_ENTRYPOINT_TYPE;\n  [VERCEL_EXECUTION_REGION]?: VERCEL_EXECUTION_REGION_TYPE;\n  [VERCEL_ID]?: VERCEL_ID_TYPE;\n  [VERCEL_JA3_DIGEST]?: VERCEL_JA3_DIGEST_TYPE;\n  [VERCEL_JA4_DIGEST]?: VERCEL_JA4_DIGEST_TYPE;\n  [VERCEL_LOG_TYPE]?: VERCEL_LOG_TYPE_TYPE;\n  [VERCEL_PATH]?: VERCEL_PATH_TYPE;\n  [VERCEL_PROJECT_ID]?: VERCEL_PROJECT_ID_TYPE;\n  [VERCEL_PROJECT_NAME]?: VERCEL_PROJECT_NAME_TYPE;\n  [VERCEL_PROXY_CACHE_ID]?: VERCEL_PROXY_CACHE_ID_TYPE;\n  [VERCEL_PROXY_CLIENT_IP]?: VERCEL_PROXY_CLIENT_IP_TYPE;\n  [VERCEL_PROXY_HOST]?: VERCEL_PROXY_HOST_TYPE;\n  [VERCEL_PROXY_LAMBDA_REGION]?: VERCEL_PROXY_LAMBDA_REGION_TYPE;\n  [VERCEL_PROXY_METHOD]?: VERCEL_PROXY_METHOD_TYPE;\n  [VERCEL_PROXY_PATH]?: VERCEL_PROXY_PATH_TYPE;\n  [VERCEL_PROXY_PATH_TYPE]?: VERCEL_PROXY_PATH_TYPE_TYPE;\n  [VERCEL_PROXY_PATH_TYPE_VARIANT]?: VERCEL_PROXY_PATH_TYPE_VARIANT_TYPE;\n  [VERCEL_PROXY_REFERER]?: VERCEL_PROXY_REFERER_TYPE;\n  [VERCEL_PROXY_REGION]?: VERCEL_PROXY_REGION_TYPE;\n  [VERCEL_PROXY_RESPONSE_BYTE_SIZE]?: VERCEL_PROXY_RESPONSE_BYTE_SIZE_TYPE;\n  [VERCEL_PROXY_SCHEME]?: VERCEL_PROXY_SCHEME_TYPE;\n  [VERCEL_PROXY_STATUS_CODE]?: VERCEL_PROXY_STATUS_CODE_TYPE;\n  [VERCEL_PROXY_TIMESTAMP]?: VERCEL_PROXY_TIMESTAMP_TYPE;\n  [VERCEL_PROXY_USER_AGENT]?: VERCEL_PROXY_USER_AGENT_TYPE;\n  [VERCEL_PROXY_VERCEL_CACHE]?: VERCEL_PROXY_VERCEL_CACHE_TYPE;\n  [VERCEL_PROXY_VERCEL_ID]?: VERCEL_PROXY_VERCEL_ID_TYPE;\n  [VERCEL_PROXY_WAF_ACTION]?: VERCEL_PROXY_WAF_ACTION_TYPE;\n  [VERCEL_PROXY_WAF_RULE_ID]?: VERCEL_PROXY_WAF_RULE_ID_TYPE;\n  [VERCEL_REQUEST_ID]?: VERCEL_REQUEST_ID_TYPE;\n  [VERCEL_SOURCE]?: VERCEL_SOURCE_TYPE;\n  [VERCEL_STATUS_CODE]?: VERCEL_STATUS_CODE_TYPE;\n} & Record<string, AttributeValue | undefined>;\n", "import type { RawAttributes } from '../../attributes';\nimport type { Client } from '../../client';\nimport type { ScopeData } from '../../scope';\nimport {\n  SEMANTIC_ATTRIBUTE_SENTRY_ENVIRONMENT,\n  SEMANTIC_ATTRIBUTE_SENTRY_RELEASE,\n  SEMANTIC_ATTRIBUTE_SENTRY_SDK_INTEGRATIONS,\n  SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,\n  SEMANTIC_ATTRIBUTE_USER_EMAIL,\n  SEMANTIC_ATTRIBUTE_USER_ID,\n  SEMANTIC_ATTRIBUTE_USER_IP_ADDRESS,\n  SEMANTIC_ATTRIBUTE_USER_USERNAME,\n} from '../../semanticAttributes';\nimport type { SerializedStreamedSpan, Span, StreamedSpanJSON } from '../../types/span';\nimport { getCombinedScopeData } from '../../utils/scopeData';\nimport {\n  INTERNAL_getSegmentSpan,\n  showSpanDropWarning,\n  spanToStreamedSpanJSON,\n  streamedSpanJsonToSerializedSpan,\n} from '../../utils/spanUtils';\nimport { getCapturedScopesOnSpan } from '../utils';\nimport { isStreamedBeforeSendSpanCallback } from './beforeSendSpan';\nimport { scopeContextsToSpanAttributes } from './scopeContextAttributes';\nimport { DEFAULT_ENVIRONMENT } from '../../constants';\nimport {\n  SENTRY_SDK_NAME,\n  SENTRY_SDK_VERSION,\n  SENTRY_SEGMENT_ID,\n  SENTRY_SEGMENT_NAME,\n  SENTRY_TRACE_LIFECYCLE,\n} from '@sentry/conventions/attributes';\n\nexport type SerializedStreamedSpanWithSegmentSpan = SerializedStreamedSpan & {\n  _segmentSpan: Span;\n};\n\n/**\n * Captures a span and returns a JSON representation to be enqueued for sending.\n *\n * IMPORTANT: This function converts the span to JSON immediately to avoid writing\n * to an already-ended OTel span instance (which is blocked by the OTel Span class).\n *\n * @returns the final serialized span with a reference to its segment span. This reference\n * is needed later on to compute the DSC for the span envelope.\n */\nexport function captureSpan(span: Span, client: Client): SerializedStreamedSpanWithSegmentSpan {\n  // Convert to JSON FIRST - we cannot write to an already-ended span\n  const spanJSON = spanToStreamedSpanJSON(span);\n\n  const segmentSpan = INTERNAL_getSegmentSpan(span);\n  const serializedSegmentSpan = spanToStreamedSpanJSON(segmentSpan);\n\n  const { isolationScope: spanIsolationScope, scope: spanScope } = getCapturedScopesOnSpan(span);\n\n  const finalScopeData = getCombinedScopeData(spanIsolationScope, spanScope);\n\n  applyCommonSpanAttributes(spanJSON, serializedSegmentSpan, client, finalScopeData);\n\n  // Access `kind` via duck-typing — OTel span objects have this property but it's not on Sentry's Span type.\n  // It is forwarded to `preprocessSpan` subscribers (e.g. the OpenTelemetry SDK backfills op/source/name from it).\n  const spanKind = (span as { kind?: number }).kind;\n\n  // Preprocess the span JSON before any other hooks run, so that `processSpan`/`processSegmentSpan`\n  // subscribers (incl. integrations) and `beforeSendSpan` see fully inferred span data.\n  client.emit('preprocessSpan', spanJSON, { spanKind });\n\n  if (spanJSON.is_segment) {\n    applyScopeToSegmentSpan(spanJSON, finalScopeData);\n    applySdkMetadataToSegmentSpan(spanJSON, client);\n    // Allow hook subscribers to mutate the segment span JSON\n    // This also invokes the `processSegmentSpan` hook of all integrations\n    client.emit('processSegmentSpan', spanJSON);\n  }\n\n  // This allows hook subscribers to mutate the span JSON\n  // This also invokes the `processSpan` hook of all integrations\n  client.emit('processSpan', spanJSON);\n\n  const { beforeSendSpan } = client.getOptions();\n  const processedSpan =\n    beforeSendSpan && isStreamedBeforeSendSpanCallback(beforeSendSpan)\n      ? applyBeforeSendSpanCallback(spanJSON, beforeSendSpan)\n      : spanJSON;\n\n  const spanNameSource = processedSpan.attributes?.[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE];\n  if (spanJSON.is_segment && spanNameSource) {\n    // Backfill sentry.segment.name.source from sentry.source.\n    // TODO(v11): Remove this backfill once we removed setting SEMANTIC_ATTRIBUTE_SENTRY_SOURCE in favour of\n    // SENTRY_SEGMENT_NAME_SOURCE from @sentry/conventions/attributes only on segment spans.\n    safeSetSpanJSONAttributes(processedSpan, {\n      ['sentry.segment.name.source']: spanNameSource,\n    });\n  }\n\n  return {\n    ...streamedSpanJsonToSerializedSpan(processedSpan),\n    _segmentSpan: segmentSpan,\n  };\n}\n\nfunction applyScopeToSegmentSpan(segmentSpanJSON: StreamedSpanJSON, scopeData: ScopeData): void {\n  const contextAttributes = scopeContextsToSpanAttributes(scopeData.contexts);\n  safeSetSpanJSONAttributes(segmentSpanJSON, contextAttributes);\n}\n\n/**\n * Safely set attributes on a span JSON.\n * If an attribute already exists, it will not be overwritten.\n */\nexport function safeSetSpanJSONAttributes(\n  spanJSON: StreamedSpanJSON,\n  newAttributes: RawAttributes<Record<string, unknown>>,\n): void {\n  const originalAttributes = spanJSON.attributes ?? (spanJSON.attributes = {});\n\n  Object.entries(newAttributes).forEach(([key, value]) => {\n    if (value != null && !(key in originalAttributes)) {\n      originalAttributes[key] = value;\n    }\n  });\n}\n\nfunction applySdkMetadataToSegmentSpan(segmentSpanJSON: StreamedSpanJSON, client: Client): void {\n  const integrationNames = client.getIntegrationNames();\n  if (!integrationNames.length) return;\n\n  safeSetSpanJSONAttributes(segmentSpanJSON, {\n    [SEMANTIC_ATTRIBUTE_SENTRY_SDK_INTEGRATIONS]: integrationNames,\n  });\n}\n\nfunction applyCommonSpanAttributes(\n  spanJSON: StreamedSpanJSON,\n  serializedSegmentSpan: StreamedSpanJSON,\n  client: Client,\n  scopeData: ScopeData,\n): void {\n  const sdk = client.getSdkMetadata();\n  const { release, environment } = client.getOptions();\n\n  // avoid overwriting any previously set attributes (from users or potentially our SDK instrumentation)\n  safeSetSpanJSONAttributes(spanJSON, {\n    [SENTRY_TRACE_LIFECYCLE]: 'stream',\n    [SENTRY_SEGMENT_NAME]: serializedSegmentSpan.name,\n    [SENTRY_SEGMENT_ID]: serializedSegmentSpan.span_id,\n    [SENTRY_SDK_NAME]: sdk?.sdk?.name,\n    [SENTRY_SDK_VERSION]: sdk?.sdk?.version,\n    [SEMANTIC_ATTRIBUTE_SENTRY_RELEASE]: release,\n    [SEMANTIC_ATTRIBUTE_SENTRY_ENVIRONMENT]: environment || DEFAULT_ENVIRONMENT,\n    [SEMANTIC_ATTRIBUTE_USER_ID]: scopeData.user?.id,\n    [SEMANTIC_ATTRIBUTE_USER_EMAIL]: scopeData.user?.email,\n    [SEMANTIC_ATTRIBUTE_USER_IP_ADDRESS]: scopeData.user?.ip_address,\n    [SEMANTIC_ATTRIBUTE_USER_USERNAME]: scopeData.user?.username,\n    ...scopeData.attributes,\n  });\n}\n\n/**\n * Apply a user-provided beforeSendSpan callback to a span JSON.\n */\nexport function applyBeforeSendSpanCallback(\n  span: StreamedSpanJSON,\n  beforeSendSpan: (span: StreamedSpanJSON) => StreamedSpanJSON,\n): StreamedSpanJSON {\n  const modifedSpan = beforeSendSpan(span);\n  if (!modifedSpan) {\n    showSpanDropWarning();\n    return span;\n  }\n  return modifedSpan;\n}\n", "/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { isThenable } from './is';\n\n/** SyncPromise internal states */\nconst STATE_PENDING = 0;\nconst STATE_RESOLVED = 1;\nconst STATE_REJECTED = 2;\n\ntype State = typeof STATE_PENDING | typeof STATE_RESOLVED | typeof STATE_REJECTED;\n\n// Overloads so we can call resolvedSyncPromise without arguments and generic argument\nexport function resolvedSyncPromise(): PromiseLike<void>;\nexport function resolvedSyncPromise<T>(value: T | PromiseLike<T>): PromiseLike<T>;\n\n/**\n * Creates a resolved sync promise.\n *\n * @param value the value to resolve the promise with\n * @returns the resolved sync promise\n */\nexport function resolvedSyncPromise<T>(value?: T | PromiseLike<T>): PromiseLike<T> {\n  return new SyncPromise(resolve => {\n    resolve(value);\n  });\n}\n\n/**\n * Creates a rejected sync promise.\n *\n * @param value the value to reject the promise with\n * @returns the rejected sync promise\n */\nexport function rejectedSyncPromise<T = never>(reason?: any): PromiseLike<T> {\n  return new SyncPromise((_, reject) => {\n    reject(reason);\n  });\n}\n\ntype Executor<T> = (resolve: (value?: T | PromiseLike<T> | null) => void, reject: (reason?: any) => void) => void;\n\n/**\n * Thenable class that behaves like a Promise and follows it's interface\n * but is not async internally\n */\nexport class SyncPromise<T> implements PromiseLike<T> {\n  private _state: State;\n  private _handlers: Array<[boolean, (value: T) => void, (reason: any) => any]>;\n  private _value: any;\n\n  public constructor(executor: Executor<T>) {\n    this._state = STATE_PENDING;\n    this._handlers = [];\n\n    this._runExecutor(executor);\n  }\n\n  /** @inheritdoc */\n  public then<TResult1 = T, TResult2 = never>(\n    onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null,\n    onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null,\n  ): PromiseLike<TResult1 | TResult2> {\n    return new SyncPromise((resolve, reject) => {\n      this._handlers.push([\n        false,\n        result => {\n          if (!onfulfilled) {\n            // TODO: ¯\\_(ツ)_/¯\n            // TODO: FIXME\n            resolve(result as any);\n          } else {\n            try {\n              resolve(onfulfilled(result));\n            } catch (e) {\n              reject(e);\n            }\n          }\n        },\n        reason => {\n          if (!onrejected) {\n            reject(reason);\n          } else {\n            try {\n              resolve(onrejected(reason));\n            } catch (e) {\n              reject(e);\n            }\n          }\n        },\n      ]);\n      this._executeHandlers();\n    });\n  }\n\n  /** @inheritdoc */\n  public catch<TResult = never>(\n    onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null,\n  ): PromiseLike<T | TResult> {\n    return this.then(val => val, onrejected);\n  }\n\n  /** @inheritdoc */\n  public finally<TResult>(onfinally?: (() => void) | null): PromiseLike<TResult> {\n    return new SyncPromise<TResult>((resolve, reject) => {\n      let val: TResult | any;\n      let isRejected: boolean;\n\n      return this.then(\n        value => {\n          isRejected = false;\n          val = value;\n          if (onfinally) {\n            onfinally();\n          }\n        },\n        reason => {\n          isRejected = true;\n          val = reason;\n          if (onfinally) {\n            onfinally();\n          }\n        },\n      ).then(() => {\n        if (isRejected) {\n          reject(val);\n          return;\n        }\n\n        resolve(val as unknown as any);\n      });\n    });\n  }\n\n  /** Excute the resolve/reject handlers. */\n  private _executeHandlers(): void {\n    if (this._state === STATE_PENDING) {\n      return;\n    }\n\n    const cachedHandlers = this._handlers.slice();\n    this._handlers = [];\n\n    cachedHandlers.forEach(handler => {\n      if (handler[0]) {\n        return;\n      }\n\n      if (this._state === STATE_RESOLVED) {\n        handler[1](this._value as unknown as any);\n      }\n\n      if (this._state === STATE_REJECTED) {\n        handler[2](this._value);\n      }\n\n      handler[0] = true;\n    });\n  }\n\n  /** Run the executor for the SyncPromise. */\n  private _runExecutor(executor: Executor<T>): void {\n    const setResult = (state: State, value?: T | PromiseLike<T> | any): void => {\n      if (this._state !== STATE_PENDING) {\n        return;\n      }\n\n      if (isThenable(value)) {\n        void (value as PromiseLike<T>).then(resolve, reject);\n        return;\n      }\n\n      this._state = state;\n      this._value = value;\n\n      this._executeHandlers();\n    };\n\n    const resolve = (value: unknown): void => {\n      setResult(STATE_RESOLVED, value);\n    };\n\n    const reject = (reason: unknown): void => {\n      setResult(STATE_REJECTED, reason);\n    };\n\n    try {\n      executor(resolve, reject);\n    } catch (e) {\n      reject(e);\n    }\n  }\n}\n", "import { DEBUG_BUILD } from './debug-build';\nimport type { Event, EventHint } from './types/event';\nimport type { EventProcessor } from './types/eventprocessor';\nimport { debug } from './utils/debug-logger';\nimport { isThenable } from './utils/is';\nimport { rejectedSyncPromise, resolvedSyncPromise } from './utils/syncpromise';\n\n/**\n * Process an array of event processors, returning the processed event (or `null` if the event was dropped).\n */\nexport function notifyEventProcessors(\n  processors: EventProcessor[],\n  event: Event | null,\n  hint: EventHint,\n  index: number = 0,\n): PromiseLike<Event | null> {\n  try {\n    const result = _notifyEventProcessors(event, hint, processors, index);\n    return isThenable(result) ? result : resolvedSyncPromise(result);\n  } catch (error) {\n    return rejectedSyncPromise(error);\n  }\n}\n\nfunction _notifyEventProcessors(\n  event: Event | null,\n  hint: EventHint,\n  processors: EventProcessor[],\n  index: number,\n): Event | null | PromiseLike<Event | null> {\n  const processor = processors[index];\n\n  if (!event || !processor) {\n    return event;\n  }\n\n  const result = processor({ ...event }, hint);\n\n  DEBUG_BUILD && result === null && debug.log(`Event processor \"${processor.id || '?'}\" dropped event`);\n\n  if (isThenable(result)) {\n    return result.then(final => _notifyEventProcessors(final, hint, processors, index + 1));\n  }\n\n  return _notifyEventProcessors(result, hint, processors, index + 1);\n}\n", "import type { DebugImage } from '../types/debugMeta';\nimport type { StackParser } from '../types/stacktrace';\nimport { normalizeStackTracePath } from './stacktrace';\nimport { GLOBAL_OBJ } from './worldwide';\n\ntype StackString = string;\ntype CachedResult = [string, string];\n\nlet parsedStackResults: Record<StackString, CachedResult> | undefined;\nlet lastSentryKeysCount: number | undefined;\nlet lastNativeKeysCount: number | undefined;\nlet cachedFilenameDebugIds: Record<string, string> | undefined;\n\n/**\n * Clears the cached debug ID mappings.\n * Useful for testing or when the global debug ID state changes.\n */\nexport function clearDebugIdCache(): void {\n  parsedStackResults = undefined;\n  lastSentryKeysCount = undefined;\n  lastNativeKeysCount = undefined;\n  cachedFilenameDebugIds = undefined;\n}\n\n/**\n * Returns a map of filenames to debug identifiers.\n * Supports both proprietary _sentryDebugIds and native _debugIds (e.g., from Vercel) formats.\n */\nexport function getFilenameToDebugIdMap(stackParser: StackParser): Record<string, string> {\n  const sentryDebugIdMap = GLOBAL_OBJ._sentryDebugIds;\n  const nativeDebugIdMap = GLOBAL_OBJ._debugIds;\n\n  if (!sentryDebugIdMap && !nativeDebugIdMap) {\n    return {};\n  }\n\n  const sentryDebugIdKeys = sentryDebugIdMap ? Object.keys(sentryDebugIdMap) : [];\n  const nativeDebugIdKeys = nativeDebugIdMap ? Object.keys(nativeDebugIdMap) : [];\n\n  // If the count of registered globals hasn't changed since the last call, we\n  // can just return the cached result.\n  if (\n    cachedFilenameDebugIds &&\n    sentryDebugIdKeys.length === lastSentryKeysCount &&\n    nativeDebugIdKeys.length === lastNativeKeysCount\n  ) {\n    return cachedFilenameDebugIds;\n  }\n\n  lastSentryKeysCount = sentryDebugIdKeys.length;\n  lastNativeKeysCount = nativeDebugIdKeys.length;\n\n  // Build a map of filename -> debug_id from both sources\n  cachedFilenameDebugIds = {};\n\n  if (!parsedStackResults) {\n    parsedStackResults = {};\n  }\n\n  const processDebugIds = (debugIdKeys: string[], debugIdMap: Record<string, string>): void => {\n    for (const key of debugIdKeys) {\n      const debugId = debugIdMap[key];\n      const result = parsedStackResults?.[key];\n\n      if (result && cachedFilenameDebugIds && debugId) {\n        // Use cached filename but update with current debug ID\n        cachedFilenameDebugIds[result[0]] = debugId;\n        // Update cached result with new debug ID\n        if (parsedStackResults) {\n          parsedStackResults[key] = [result[0], debugId];\n        }\n      } else if (debugId) {\n        const parsedStack = stackParser(key);\n\n        for (let i = parsedStack.length - 1; i >= 0; i--) {\n          const stackFrame = parsedStack[i];\n          const filename = stackFrame?.filename;\n\n          if (filename && cachedFilenameDebugIds && parsedStackResults) {\n            cachedFilenameDebugIds[filename] = debugId;\n            parsedStackResults[key] = [filename, debugId];\n            break;\n          }\n        }\n      }\n    }\n  };\n\n  if (sentryDebugIdMap) {\n    processDebugIds(sentryDebugIdKeys, sentryDebugIdMap);\n  }\n\n  // Native _debugIds will override _sentryDebugIds if same file\n  if (nativeDebugIdMap) {\n    processDebugIds(nativeDebugIdKeys, nativeDebugIdMap);\n  }\n\n  return cachedFilenameDebugIds;\n}\n\n/**\n * Returns a list of debug images for the given resources.\n */\nexport function getDebugImagesForResources(\n  stackParser: StackParser,\n  resource_paths: ReadonlyArray<string>,\n): DebugImage[] {\n  const filenameDebugIdMap = getFilenameToDebugIdMap(stackParser);\n\n  if (!filenameDebugIdMap) {\n    return [];\n  }\n\n  const images: DebugImage[] = [];\n  for (const path of resource_paths) {\n    const normalizedPath = normalizeStackTracePath(path);\n    if (normalizedPath && filenameDebugIdMap[normalizedPath]) {\n      images.push({\n        type: 'sourcemap',\n        code_file: path,\n        debug_id: filenameDebugIdMap[normalizedPath],\n      });\n    }\n  }\n\n  return images;\n}\n", "import type { Client } from '../client';\nimport { DEFAULT_ENVIRONMENT } from '../constants';\nimport { notifyEventProcessors } from '../eventProcessors';\nimport type { CaptureContext, ScopeContext } from '../scope';\nimport { Scope } from '../scope';\nimport type { Event, EventHint } from '../types/event';\nimport type { ClientOptions } from '../types/options';\nimport type { StackParser } from '../types/stacktrace';\nimport { getFilenameToDebugIdMap } from './debug-ids';\nimport { addExceptionMechanism, uuid4 } from './misc';\nimport { normalize } from './normalize';\nimport { applyScopeDataToEvent, getCombinedScopeData } from './scopeData';\nimport { truncate } from './string';\nimport { resolvedSyncPromise } from './syncpromise';\nimport { dateTimestampInSeconds } from './time';\n\n/**\n * This type makes sure that we get either a CaptureContext, OR an EventHint.\n * It does not allow mixing them, which could lead to unexpected outcomes, e.g. this is disallowed:\n * { user: { id: '123' }, mechanism: { handled: false } }\n */\nexport type ExclusiveEventHintOrCaptureContext =\n  | (CaptureContext & Partial<{ [key in keyof EventHint]: never }>)\n  | (EventHint & Partial<{ [key in keyof ScopeContext]: never }>);\n\n/**\n * Adds common information to events.\n *\n * The information includes release and environment from `options`,\n * breadcrumbs and context (extra, tags and user) from the scope.\n *\n * Information that is already present in the event is never overwritten. For\n * nested objects, such as the context, keys are merged.\n *\n * @param event The original event.\n * @param hint May contain additional information about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A new event with more information.\n * @hidden\n */\nexport function prepareEvent(\n  options: ClientOptions,\n  event: Event,\n  hint: EventHint,\n  scope?: Scope,\n  client?: Client,\n  isolationScope?: Scope,\n): PromiseLike<Event | null> {\n  const { normalizeDepth = 3, normalizeMaxBreadth = 1_000 } = options;\n  const prepared: Event = {\n    ...event,\n    event_id: event.event_id || hint.event_id || uuid4(),\n    timestamp: event.timestamp || dateTimestampInSeconds(),\n  };\n  const integrations = hint.integrations || options.integrations.map(i => i.name);\n\n  applyClientOptions(prepared, options);\n  applyIntegrationsMetadata(prepared, integrations);\n\n  if (client) {\n    client.emit('applyFrameMetadata', event);\n  }\n\n  // Only put debug IDs onto frames for error events.\n  if (event.type === undefined) {\n    applyDebugIds(prepared, options.stackParser);\n  }\n\n  // If we have scope given to us, use it as the base for further modifications.\n  // This allows us to prevent unnecessary copying of data if `captureContext` is not provided.\n  const finalScope = getFinalScope(scope, hint.captureContext);\n\n  if (hint.mechanism) {\n    addExceptionMechanism(prepared, hint.mechanism);\n  }\n\n  const clientEventProcessors = client ? client.getEventProcessors() : [];\n\n  // This should be the last thing called, since we want that\n  // {@link Scope.addEventProcessor} gets the finished prepared event.\n  // Merge scope data together\n  const data = getCombinedScopeData(isolationScope, finalScope);\n\n  const attachments = [...(hint.attachments || []), ...data.attachments];\n  if (attachments.length) {\n    hint.attachments = attachments;\n  }\n\n  applyScopeDataToEvent(prepared, data);\n\n  const eventProcessors = [\n    ...clientEventProcessors,\n    // Run scope event processors _after_ all other processors\n    ...data.eventProcessors,\n  ];\n\n  // Skip event processors for internal exceptions to prevent recursion\n  // oxlint-disable-next-line typescript/prefer-optional-chain\n  const isInternalException = hint.data && (hint.data as { __sentry__: boolean }).__sentry__ === true;\n  const result = isInternalException\n    ? resolvedSyncPromise(prepared)\n    : notifyEventProcessors(eventProcessors, prepared, hint);\n\n  return result.then(evt => {\n    if (evt) {\n      // We apply the debug_meta field only after all event processors have ran, so that if any event processors modified\n      // file names (e.g.the RewriteFrames integration) the filename -> debug ID relationship isn't destroyed.\n      // This should not cause any PII issues, since we're only moving data that is already on the event and not adding\n      // any new data\n      applyDebugMeta(evt);\n    }\n\n    if (typeof normalizeDepth === 'number' && normalizeDepth > 0) {\n      return normalizeEvent(evt, normalizeDepth, normalizeMaxBreadth);\n    }\n    return evt;\n  });\n}\n\n/**\n * Enhances event using the client configuration.\n * It takes care of all \"static\" values like environment, release and `dist`,\n * as well as truncating overly long values.\n *\n * Only exported for tests.\n *\n * @param event event instance to be enhanced\n */\nexport function applyClientOptions(event: Event, options: ClientOptions): void {\n  const { environment, release, dist, maxValueLength } = options;\n\n  // empty strings do not make sense for environment, release, and dist\n  // so we handle them the same as if they were not provided\n  event.environment = event.environment || environment || DEFAULT_ENVIRONMENT;\n\n  if (!event.release && release) {\n    event.release = release;\n  }\n\n  if (!event.dist && dist) {\n    event.dist = dist;\n  }\n\n  const request = event.request;\n  if (request?.url && maxValueLength) {\n    request.url = truncate(request.url, maxValueLength);\n  }\n\n  if (maxValueLength) {\n    event.exception?.values?.forEach(exception => {\n      if (exception.value) {\n        // Truncates error messages\n        exception.value = truncate(exception.value, maxValueLength);\n      }\n    });\n  }\n}\n\n/**\n * Puts debug IDs into the stack frames of an error event.\n */\nexport function applyDebugIds(event: Event, stackParser: StackParser): void {\n  // Build a map of filename -> debug_id\n  const filenameDebugIdMap = getFilenameToDebugIdMap(stackParser);\n\n  event.exception?.values?.forEach(exception => {\n    exception.stacktrace?.frames?.forEach(frame => {\n      if (frame.filename) {\n        frame.debug_id = filenameDebugIdMap[frame.filename];\n      }\n    });\n  });\n}\n\n/**\n * Moves debug IDs from the stack frames of an error event into the debug_meta field.\n */\nexport function applyDebugMeta(event: Event): void {\n  // Extract debug IDs and filenames from the stack frames on the event.\n  const filenameDebugIdMap: Record<string, string> = {};\n  event.exception?.values?.forEach(exception => {\n    exception.stacktrace?.frames?.forEach(frame => {\n      if (frame.debug_id) {\n        if (frame.abs_path) {\n          filenameDebugIdMap[frame.abs_path] = frame.debug_id;\n        } else if (frame.filename) {\n          filenameDebugIdMap[frame.filename] = frame.debug_id;\n        }\n        delete frame.debug_id;\n      }\n    });\n  });\n\n  if (Object.keys(filenameDebugIdMap).length === 0) {\n    return;\n  }\n\n  // Fill debug_meta information\n  event.debug_meta = event.debug_meta || {};\n  event.debug_meta.images = event.debug_meta.images || [];\n  const images = event.debug_meta.images;\n  Object.entries(filenameDebugIdMap).forEach(([filename, debug_id]) => {\n    images.push({\n      type: 'sourcemap',\n      code_file: filename,\n      debug_id,\n    });\n  });\n}\n\n/**\n * This function adds all used integrations to the SDK info in the event.\n * @param event The event that will be filled with all integrations.\n */\nfunction applyIntegrationsMetadata(event: Event, integrationNames: string[]): void {\n  if (integrationNames.length > 0) {\n    event.sdk = event.sdk || {};\n    event.sdk.integrations = [...(event.sdk.integrations || []), ...integrationNames];\n  }\n}\n\n/**\n * Applies `normalize` function on necessary `Event` attributes to make them safe for serialization.\n * Normalized keys:\n * - `breadcrumbs.data`\n * - `user`\n * - `contexts`\n * - `extra`\n * @param event Event\n * @returns Normalized event\n */\nfunction normalizeEvent(event: Event | null, depth: number, maxBreadth: number): Event | null {\n  if (!event) {\n    return null;\n  }\n\n  const normalized: Event = {\n    ...event,\n    ...(event.breadcrumbs && {\n      breadcrumbs: event.breadcrumbs.map(b => ({\n        ...b,\n        ...(b.data && {\n          data: normalize(b.data, depth, maxBreadth),\n        }),\n      })),\n    }),\n    ...(event.user && {\n      user: normalize(event.user, depth, maxBreadth),\n    }),\n    ...(event.contexts && {\n      contexts: normalize(event.contexts, depth, maxBreadth),\n    }),\n    ...(event.extra && {\n      extra: normalize(event.extra, depth, maxBreadth),\n    }),\n  };\n\n  // event.contexts.trace stores information about a Transaction. Similarly,\n  // event.spans[] stores information about child Spans. Given that a\n  // Transaction is conceptually a Span, normalization should apply to both\n  // Transactions and Spans consistently.\n  // For now the decision is to skip normalization of Transactions and Spans,\n  // so this block overwrites the normalized event to add back the original\n  // Transaction information prior to normalization.\n  if (event.contexts?.trace && normalized.contexts) {\n    normalized.contexts.trace = event.contexts.trace;\n\n    // event.contexts.trace.data may contain circular/dangerous data so we need to normalize it\n    if (event.contexts.trace.data) {\n      normalized.contexts.trace.data = normalize(event.contexts.trace.data, depth, maxBreadth);\n    }\n  }\n\n  // event.spans[].data may contain circular/dangerous data so we need to normalize it\n  if (event.spans) {\n    normalized.spans = event.spans.map(span => {\n      return {\n        ...span,\n        ...(span.data && {\n          data: normalize(span.data, depth, maxBreadth),\n        }),\n      };\n    });\n  }\n\n  // event.contexts.flags (FeatureFlagContext) stores context for our feature\n  // flag integrations. It has a greater nesting depth than our other typed\n  // Contexts, so we re-normalize with a fixed depth of 3 here. We do not want\n  // to skip this in case of conflicting, user-provided context.\n  if (event.contexts?.flags && normalized.contexts) {\n    normalized.contexts.flags = normalize(event.contexts.flags, 3, maxBreadth);\n  }\n\n  return normalized;\n}\n\nfunction getFinalScope(scope: Scope | undefined, captureContext: CaptureContext | undefined): Scope | undefined {\n  if (!captureContext) {\n    return scope;\n  }\n\n  const finalScope = scope ? scope.clone() : new Scope();\n  finalScope.update(captureContext);\n  return finalScope;\n}\n\n/**\n * Parse either an `EventHint` directly, or convert a `CaptureContext` to an `EventHint`.\n * This is used to allow to update method signatures that used to accept a `CaptureContext` but should now accept an `EventHint`.\n */\nexport function parseEventHintOrCaptureContext(\n  hint: ExclusiveEventHintOrCaptureContext | undefined,\n): EventHint | undefined {\n  if (!hint) {\n    return undefined;\n  }\n\n  // If you pass a Scope or `() => Scope` as CaptureContext, we just return this as captureContext\n  if (hintIsScopeOrFunction(hint)) {\n    return { captureContext: hint };\n  }\n\n  if (hintIsScopeContext(hint)) {\n    return {\n      captureContext: hint,\n    };\n  }\n\n  return hint;\n}\n\nfunction hintIsScopeOrFunction(hint: CaptureContext | EventHint): hint is Scope | ((scope: Scope) => Scope) {\n  return hint instanceof Scope || typeof hint === 'function';\n}\n\ntype ScopeContextProperty = keyof ScopeContext;\nconst captureContextKeys: readonly ScopeContextProperty[] = [\n  'user',\n  'level',\n  'extra',\n  'contexts',\n  'tags',\n  'fingerprint',\n  'propagationContext',\n] as const;\n\nfunction hintIsScopeContext(hint: Partial<ScopeContext> | EventHint): hint is Partial<ScopeContext> {\n  return Object.keys(hint).some(key => captureContextKeys.includes(key as ScopeContextProperty));\n}\n", "import type { AttributeObject, RawAttribute, RawAttributes } from './attributes';\nimport { getClient, getCurrentScope, getIsolationScope, withIsolationScope } from './currentScopes';\nimport { DEBUG_BUILD } from './debug-build';\nimport type { CaptureContext } from './scope';\nimport { closeSession, makeSession, updateSession } from './session';\nimport { startNewTrace } from './tracing/trace';\nimport type { CheckIn, FinishedCheckIn, MonitorConfig } from './types/checkin';\nimport type { Event, EventHint } from './types/event';\nimport type { EventProcessor } from './types/eventprocessor';\nimport type { Extra, Extras } from './types/extra';\nimport type { Primitive } from './types/misc';\nimport type { Session, SessionContext } from './types/session';\nimport type { SeverityLevel } from './types/severity';\nimport type { User } from './types/user';\nimport { debug } from './utils/debug-logger';\nimport { isThenable } from './utils/is';\nimport { uuid4 } from './utils/misc';\nimport type { ExclusiveEventHintOrCaptureContext } from './utils/prepareEvent';\nimport { parseEventHintOrCaptureContext } from './utils/prepareEvent';\nimport { getCombinedScopeData } from './utils/scopeData';\nimport { timestampInSeconds } from './utils/time';\nimport { GLOBAL_OBJ } from './utils/worldwide';\n\n/**\n * Captures an exception event and sends it to Sentry.\n *\n * @param exception The exception to capture.\n * @param hint Optional additional data to attach to the Sentry event.\n * @returns the id of the captured Sentry event.\n */\nexport function captureException(exception: unknown, hint?: ExclusiveEventHintOrCaptureContext): string {\n  return getCurrentScope().captureException(exception, parseEventHintOrCaptureContext(hint));\n}\n\n/**\n * Captures a message event and sends it to Sentry.\n *\n * @param message The message to send to Sentry.\n * @param captureContext Define the level of the message or pass in additional data to attach to the message.\n * @returns the id of the captured message.\n */\nexport function captureMessage(message: string, captureContext?: CaptureContext | SeverityLevel): string {\n  // This is necessary to provide explicit scopes upgrade, without changing the original\n  // arity of the `captureMessage(message, level)` method.\n  const level = typeof captureContext === 'string' ? captureContext : undefined;\n  const hint = typeof captureContext !== 'string' ? { captureContext } : undefined;\n  return getCurrentScope().captureMessage(message, level, hint);\n}\n\n/**\n * Captures a manually created event and sends it to Sentry.\n *\n * @param event The event to send to Sentry.\n * @param hint Optional additional data to attach to the Sentry event.\n * @returns the id of the captured event.\n */\nexport function captureEvent(event: Event, hint?: EventHint): string {\n  return getCurrentScope().captureEvent(event, hint);\n}\n\n/**\n * Sets context data with the given name.\n * @param name of the context\n * @param context Any kind of data. This data will be normalized.\n */\nexport function setContext(name: string, context: { [key: string]: unknown } | null): void {\n  getIsolationScope().setContext(name, context);\n}\n\n/**\n * Set an object that will be merged sent as extra data with the event.\n * @param extras Extras object to merge into current context.\n */\nexport function setExtras(extras: Extras): void {\n  getIsolationScope().setExtras(extras);\n}\n\n/**\n * Set key:value that will be sent as extra data with the event.\n * @param key String of extra\n * @param extra Any kind of data. This data will be normalized.\n */\nexport function setExtra(key: string, extra: Extra): void {\n  getIsolationScope().setExtra(key, extra);\n}\n\n/**\n * Set an object that will be merged sent as tags data with the event.\n * @param tags Tags context object to merge into current context.\n */\nexport function setTags(tags: { [key: string]: Primitive }): void {\n  getIsolationScope().setTags(tags);\n}\n\n/**\n * Set key:value that will be sent as tags data with the event.\n *\n * Can also be used to unset a tag, by passing `undefined`.\n *\n * @param key String key of tag\n * @param value Value of tag\n */\nexport function setTag(key: string, value: Primitive): void {\n  getIsolationScope().setTag(key, value);\n}\n\n/**\n * Sets attributes on the isolation scope.\n *\n * These attributes are applied to logs, metrics and streamed spans.\n *\n * Supported attribute value types are `string`, `number`, `boolean`, `string[]`, `number[]` and `boolean[]`.\n *\n * @param attributes - The attributes to set on the scope, as key-value pairs.\n *\n * @example\n * ```typescript\n * Sentry.setAttributes({\n *   is_admin: true,\n *   payment_selection: 'credit_card',\n *   render_duration: 150,\n * });\n * ```\n */\nexport function setAttributes<T extends Record<string, unknown>>(attributes: RawAttributes<T>): void {\n  getIsolationScope().setAttributes(attributes);\n}\n\n/**\n * Sets an attribute on the isolation scope.\n *\n * These attributes are applied to logs, metrics and streamed spans.\n *\n * Supported attribute value types are `string`, `number`, `boolean`, `string[]`, `number[]` and `boolean[]`.\n *\n * @param key - The attribute key.\n * @param value - The attribute value.\n *\n * @example\n * ```typescript\n * Sentry.setAttribute('is_admin', true);\n * Sentry.setAttribute('render_duration', 150);\n * ```\n */\nexport function setAttribute<\n  // oxlint-disable-next-line typescript-eslint/no-explicit-any\n  T extends RawAttribute<T> extends { value: any } | { unit: any } ? AttributeObject : unknown,\n>(key: string, value: RawAttribute<T>): void {\n  getIsolationScope().setAttribute(key, value);\n}\n\n/**\n * Updates user context information for future events.\n *\n * @param user User context object to be set in the current context. Pass `null` to unset the user.\n */\nexport function setUser(user: User | null): void {\n  getIsolationScope().setUser(user);\n}\n\n/**\n * Sets the conversation ID for the current isolation scope.\n *\n * @param conversationId The conversation ID to set. Pass `null` or `undefined` to unset the conversation ID.\n */\nexport function setConversationId(conversationId: string | null | undefined): void {\n  getIsolationScope().setConversationId(conversationId);\n}\n\n/**\n * The last error event id of the isolation scope.\n *\n * Warning: This function really returns the last recorded error event id on the current\n * isolation scope. If you call this function after handling a certain error and another error\n * is captured in between, the last one is returned instead of the one you might expect.\n * Also, ids of events that were never sent to Sentry (for example because\n * they were dropped by sampling or `beforeSend`) could be returned.\n *\n * @returns The last event id of the isolation scope.\n */\nexport function lastEventId(): string | undefined {\n  return getIsolationScope().lastEventId();\n}\n\n/**\n * Create a cron monitor check in and send it to Sentry.\n *\n * @param checkIn An object that describes a check in.\n * @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want\n * to create a monitor automatically when sending a check in.\n */\nexport function captureCheckIn(checkIn: CheckIn, upsertMonitorConfig?: MonitorConfig): string {\n  const scope = getCurrentScope();\n  const client = getClient();\n  if (!client) {\n    DEBUG_BUILD && debug.warn('Cannot capture check-in. No client defined.');\n  } else if (!client.captureCheckIn) {\n    DEBUG_BUILD && debug.warn('Cannot capture check-in. Client does not support sending check-ins.');\n  } else {\n    return client.captureCheckIn(checkIn, upsertMonitorConfig, scope);\n  }\n\n  return uuid4();\n}\n\n/**\n * Wraps a callback with a cron monitor check in. The check in will be sent to Sentry when the callback finishes.\n *\n * @param monitorSlug The distinct slug of the monitor.\n * @param callback Callback to be monitored\n * @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want\n * to create a monitor automatically when sending a check in.\n */\nexport function withMonitor<T>(\n  monitorSlug: CheckIn['monitorSlug'],\n  callback: () => T,\n  upsertMonitorConfig?: MonitorConfig,\n): T {\n  function runCallback(): T {\n    const checkInId = captureCheckIn({ monitorSlug, status: 'in_progress' }, upsertMonitorConfig);\n    const now = timestampInSeconds();\n\n    function finishCheckIn(status: FinishedCheckIn['status']): void {\n      captureCheckIn({ monitorSlug, status, checkInId, duration: timestampInSeconds() - now });\n    }\n    // Default behavior without isolateTrace\n    let maybePromiseResult: T;\n    try {\n      maybePromiseResult = callback();\n    } catch (e) {\n      finishCheckIn('error');\n      throw e;\n    }\n\n    if (isThenable(maybePromiseResult)) {\n      return maybePromiseResult.then(\n        r => {\n          finishCheckIn('ok');\n          return r;\n        },\n        e => {\n          finishCheckIn('error');\n          throw e;\n        },\n      ) as T;\n    }\n    finishCheckIn('ok');\n\n    return maybePromiseResult;\n  }\n\n  return withIsolationScope(() => (upsertMonitorConfig?.isolateTrace ? startNewTrace(runCallback) : runCallback()));\n}\n\n/**\n * Call `flush()` on the current client, if there is one. See {@link Client.flush}.\n *\n * @param timeout Maximum time in ms the client should wait to flush its event queue. Omitting this parameter will cause\n * the client to wait until all events are sent before resolving the promise.\n * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it\n * doesn't (or if there's no client defined).\n */\nexport async function flush(timeout?: number): Promise<boolean> {\n  const client = getClient();\n  if (client) {\n    return client.flush(timeout);\n  }\n  DEBUG_BUILD && debug.warn('Cannot flush events. No client defined.');\n  return Promise.resolve(false);\n}\n\n/**\n * Call `close()` on the current client, if there is one. See {@link Client.close}.\n *\n * @param timeout Maximum time in ms the client should wait to flush its event queue before shutting down. Omitting this\n * parameter will cause the client to wait until all events are sent before disabling itself.\n * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it\n * doesn't (or if there's no client defined).\n */\nexport async function close(timeout?: number): Promise<boolean> {\n  const client = getClient();\n  if (client) {\n    return client.close(timeout);\n  }\n  DEBUG_BUILD && debug.warn('Cannot flush events and disable SDK. No client defined.');\n  return Promise.resolve(false);\n}\n\n/**\n * Returns true if Sentry has been properly initialized.\n */\nexport function isInitialized(): boolean {\n  return !!getClient();\n}\n\n/** If the SDK is initialized & enabled. */\nexport function isEnabled(): boolean {\n  const client = getClient();\n  return client?.getOptions().enabled !== false && !!client?.getTransport();\n}\n\n/**\n * Add an event processor.\n * This will be added to the current isolation scope, ensuring any event that is processed in the current execution\n * context will have the processor applied.\n */\nexport function addEventProcessor(callback: EventProcessor): void {\n  getIsolationScope().addEventProcessor(callback);\n}\n\n/**\n * Start a session on the current isolation scope.\n *\n * @param context (optional) additional properties to be applied to the returned session object\n *\n * @returns the new active session\n */\nexport function startSession(context?: SessionContext): Session {\n  const isolationScope = getIsolationScope();\n\n  const { user } = getCombinedScopeData(isolationScope, getCurrentScope());\n\n  // Will fetch userAgent if called from browser sdk\n  const { userAgent } = GLOBAL_OBJ.navigator || {};\n\n  const session = makeSession({\n    user,\n    ...(userAgent && { userAgent }),\n    ...context,\n  });\n\n  // End existing session if there's one\n  const currentSession = isolationScope.getSession();\n  if (currentSession?.status === 'ok') {\n    updateSession(currentSession, { status: 'exited' });\n  }\n\n  endSession();\n\n  // Afterwards we set the new session on the scope\n  isolationScope.setSession(session);\n\n  return session;\n}\n\n/**\n * End the session on the current isolation scope.\n */\nexport function endSession(): void {\n  const isolationScope = getIsolationScope();\n  const currentScope = getCurrentScope();\n\n  const session = currentScope.getSession() || isolationScope.getSession();\n  if (session) {\n    closeSession(session);\n  }\n  _sendSessionUpdate();\n\n  // the session is over; take it off of the scope\n  isolationScope.setSession();\n}\n\n/**\n * Sends the current Session on the scope\n */\nfunction _sendSessionUpdate(): void {\n  const isolationScope = getIsolationScope();\n  const client = getClient();\n  const session = isolationScope.getSession();\n  if (session && client) {\n    client.captureSession(session);\n  }\n}\n\n/**\n * Sends the current session on the scope to Sentry\n *\n * @param end If set the session will be marked as exited and removed from the scope.\n *            Defaults to `false`.\n */\nexport function captureSession(end: boolean = false): void {\n  // both send the update and pull the session from the scope\n  if (end) {\n    endSession();\n    return;\n  }\n\n  // only send the update\n  _sendSessionUpdate();\n}\n", "/**\n * Calls `unref` on a timer, if the method is available on @param timer.\n *\n * `unref()` is used to allow processes to exit immediately, even if the timer\n * is still running and hasn't resolved yet.\n *\n * Use this in places where code can run on browser or server, since browsers\n * do not support `unref`.\n */\nexport function safeUnref(timer: ReturnType<typeof setTimeout>): ReturnType<typeof setTimeout> {\n  if (typeof timer === 'object' && typeof timer.unref === 'function') {\n    timer.unref();\n  }\n  return timer;\n}\n", "import type { ReportDialogOptions } from './report-dialog';\nimport type { DsnComponents, DsnLike } from './types/dsn';\nimport type { SdkInfo } from './types/sdkinfo';\nimport { dsnToString, makeDsn } from './utils/dsn';\n\nexport const SENTRY_API_VERSION = '7';\n\n/** Returns the prefix to construct Sentry ingestion API endpoints. */\nfunction getBaseApiEndpoint(dsn: DsnComponents): string {\n  const protocol = dsn.protocol ? `${dsn.protocol}:` : '';\n  const port = dsn.port ? `:${dsn.port}` : '';\n  return `${protocol}//${dsn.host}${port}${dsn.path ? `/${dsn.path}` : ''}/api/`;\n}\n\n/** Returns the ingest API endpoint for target. */\nfunction _getIngestEndpoint(dsn: DsnComponents): string {\n  return `${getBaseApiEndpoint(dsn)}${dsn.projectId}/envelope/`;\n}\n\n/** Returns a URL-encoded string with auth config suitable for a query string. */\nfunction _encodedAuth(dsn: DsnComponents, sdkInfo: SdkInfo | undefined): string {\n  const params: Record<string, string> = {\n    sentry_version: SENTRY_API_VERSION,\n  };\n\n  if (dsn.publicKey) {\n    // We send only the minimum set of required information. See\n    // https://github.com/getsentry/sentry-javascript/issues/2572.\n    params.sentry_key = dsn.publicKey;\n  }\n\n  if (sdkInfo) {\n    params.sentry_client = `${sdkInfo.name}/${sdkInfo.version}`;\n  }\n\n  return new URLSearchParams(params).toString();\n}\n\n/**\n * Returns the envelope endpoint URL with auth in the query string.\n *\n * Sending auth as part of the query string and not as custom HTTP headers avoids CORS preflight requests.\n */\nexport function getEnvelopeEndpointWithUrlEncodedAuth(dsn: DsnComponents, tunnel?: string, sdkInfo?: SdkInfo): string {\n  return tunnel ? tunnel : `${_getIngestEndpoint(dsn)}?${_encodedAuth(dsn, sdkInfo)}`;\n}\n\n/** Returns the url to the report dialog endpoint. */\nexport function getReportDialogEndpoint(dsnLike: DsnLike, dialogOptions: ReportDialogOptions): string {\n  const dsn = makeDsn(dsnLike);\n  if (!dsn) {\n    return '';\n  }\n\n  const endpoint = `${getBaseApiEndpoint(dsn)}embed/error-page/`;\n\n  let encodedOptions = `dsn=${dsnToString(dsn)}`;\n  for (const key in dialogOptions) {\n    if (key === 'dsn') {\n      continue;\n    }\n\n    if (key === 'onClose') {\n      continue;\n    }\n\n    if (key === 'user') {\n      const user = dialogOptions.user;\n      if (!user) {\n        continue;\n      }\n      if (user.name) {\n        encodedOptions += `&name=${encodeURIComponent(user.name)}`;\n      }\n      if (user.email) {\n        encodedOptions += `&email=${encodeURIComponent(user.email)}`;\n      }\n    } else {\n      encodedOptions += `&${encodeURIComponent(key)}=${encodeURIComponent(dialogOptions[key] as string)}`;\n    }\n  }\n\n  return `${endpoint}?${encodedOptions}`;\n}\n", "import type { Client } from './client';\nimport { getClient } from './currentScopes';\nimport { DEBUG_BUILD } from './debug-build';\nimport type { Event, EventHint } from './types/event';\nimport type { Integration, IntegrationFn } from './types/integration';\nimport type { CoreOptions } from './types/options';\nimport type { StreamedSpanJSON } from './types/span';\nimport { debug } from './utils/debug-logger';\n\nexport const installedIntegrations: string[] = [];\n\n/** Map of integrations assigned to a client */\nexport type IntegrationIndex = {\n  [key: string]: Integration;\n};\n\ntype IntegrationWithDefaultInstance = Integration & { isDefaultInstance?: true };\n\n/**\n * Remove duplicates from the given array, preferring the last instance of any duplicate. Not guaranteed to\n * preserve the order of integrations in the array.\n *\n * @private\n */\nfunction filterDuplicates(integrations: Integration[]): Integration[] {\n  const integrationsByName: { [key: string]: Integration } = {};\n\n  integrations.forEach((currentInstance: IntegrationWithDefaultInstance) => {\n    const { name } = currentInstance;\n\n    const existingInstance: IntegrationWithDefaultInstance | undefined = integrationsByName[name];\n\n    // We want integrations later in the array to overwrite earlier ones of the same type, except that we never want a\n    // default instance to overwrite an existing user instance\n    if (existingInstance && !existingInstance.isDefaultInstance && currentInstance.isDefaultInstance) {\n      return;\n    }\n\n    integrationsByName[name] = currentInstance;\n  });\n\n  return Object.values(integrationsByName);\n}\n\n/** Gets integrations to install */\nexport function getIntegrationsToSetup(\n  options: Pick<CoreOptions, 'defaultIntegrations' | 'integrations'>,\n): Integration[] {\n  const defaultIntegrations = options.defaultIntegrations || [];\n  const userIntegrations = options.integrations;\n\n  // We flag default instances, so that later we can tell them apart from any user-created instances of the same class\n  defaultIntegrations.forEach((integration: IntegrationWithDefaultInstance) => {\n    integration.isDefaultInstance = true;\n  });\n\n  let integrations: Integration[];\n\n  if (Array.isArray(userIntegrations)) {\n    integrations = [...defaultIntegrations, ...userIntegrations];\n  } else if (typeof userIntegrations === 'function') {\n    const resolvedUserIntegrations = userIntegrations(defaultIntegrations);\n    integrations = Array.isArray(resolvedUserIntegrations) ? resolvedUserIntegrations : [resolvedUserIntegrations];\n  } else {\n    integrations = defaultIntegrations;\n  }\n\n  return filterDuplicates(integrations);\n}\n\n/**\n * Given a list of integration instances this installs them all. When `withDefaults` is set to `true` then all default\n * integrations are added unless they were already provided before.\n * @param integrations array of integration instances\n * @param withDefault should enable default integrations\n */\nexport function setupIntegrations(client: Client, integrations: Integration[]): IntegrationIndex {\n  const integrationIndex: IntegrationIndex = {};\n\n  integrations.forEach((integration: Integration | undefined) => {\n    if (integration?.beforeSetup) {\n      integration.beforeSetup(client);\n    }\n  });\n\n  integrations.forEach((integration: Integration | undefined) => {\n    // guard against empty provided integrations\n    if (integration) {\n      setupIntegration(client, integration, integrationIndex);\n    }\n  });\n\n  return integrationIndex;\n}\n\n/**\n * Execute the `afterAllSetup` hooks of the given integrations.\n */\nexport function afterSetupIntegrations(client: Client, integrations: Integration[]): void {\n  for (const integration of integrations) {\n    // guard against empty provided integrations\n    if (integration?.afterAllSetup) {\n      integration.afterAllSetup(client);\n    }\n  }\n}\n\n/** Setup a single integration.  */\nexport function setupIntegration(client: Client, integration: Integration, integrationIndex: IntegrationIndex): void {\n  if (integrationIndex[integration.name]) {\n    DEBUG_BUILD && debug.log(`Integration skipped because it was already installed: ${integration.name}`);\n    return;\n  }\n  integrationIndex[integration.name] = integration;\n\n  // `setupOnce` is only called the first time\n  if (!installedIntegrations.includes(integration.name) && typeof integration.setupOnce === 'function') {\n    integration.setupOnce();\n    installedIntegrations.push(integration.name);\n  }\n\n  // `setup` is run for each client\n  if (integration.setup && typeof integration.setup === 'function') {\n    integration.setup(client);\n  }\n\n  if (typeof integration.preprocessEvent === 'function') {\n    const callback = integration.preprocessEvent.bind(integration) as typeof integration.preprocessEvent;\n    client.on('preprocessEvent', (event, hint) => callback(event, hint, client));\n  }\n\n  if (typeof integration.processEvent === 'function') {\n    const callback = integration.processEvent.bind(integration) as typeof integration.processEvent;\n\n    const processor = Object.assign((event: Event, hint: EventHint) => callback(event, hint, client), {\n      id: integration.name,\n    });\n\n    client.addEventProcessor(processor);\n  }\n\n  (['processSpan', 'processSegmentSpan'] as const).forEach(hook => {\n    const callback = integration[hook];\n    if (typeof callback === 'function') {\n      // The cast is needed because TS can't resolve overloads when the discriminant is a union type.\n      // Both overloads have the same callback signature so this is safe.\n      client.on(hook as 'processSpan', (span: StreamedSpanJSON) => callback.call(integration, span, client));\n    }\n  });\n\n  DEBUG_BUILD && debug.log(`Integration installed: ${integration.name}`);\n}\n\n/** Add an integration to the current scope's client. */\nexport function addIntegration(integration: Integration): void {\n  const client = getClient();\n\n  if (!client) {\n    DEBUG_BUILD && debug.warn(`Cannot add integration \"${integration.name}\" because no SDK Client is available.`);\n    return;\n  }\n\n  client.addIntegration(integration);\n}\n\n/**\n * Define an integration function that can be used to create an integration instance.\n * Note that this by design hides the implementation details of the integration, as they are considered internal.\n */\nexport function defineIntegration<Fn extends IntegrationFn>(\n  fn: Fn,\n): (...args: Parameters<Fn>) => Integration & { name: ReturnType<Fn>['name'] } {\n  return fn;\n}\n\n// When  extending an integration, we allow other properties to be passed-through\ntype IntegrationWithOtherProperties = Record<string, unknown> & Integration;\ntype ExtendedIntegration<Base extends Integration, Extended extends Partial<IntegrationWithOtherProperties>> = Omit<\n  Base,\n  keyof Extended\n> &\n  Extended;\n\n/**\n * Wrap a parent integration with an extended integration.\n * Any passed integration function will call the parent integration function first, if it exists.\n *\n * Example usage:\n *\n * @example\n * ```typescript\n * const parentIntegration = defineIntegration(() => ({\n *   name: 'ParentIntegration',\n *   setupOnce: () => {\n *     console.log('ParentIntegration setupOnce');\n *   },\n * }));\n *\n * const extendedIntegration = extendIntegration(parentIntegration, {\n *   setupOnce: () => {\n *     console.log('ExtendedIntegration setupOnce');\n *   },\n * });\n * ```\n */\nexport function extendIntegration<Base extends Integration, Extended extends Partial<IntegrationWithOtherProperties>>(\n  integration: Base,\n  extendedIntegration: Extended,\n): ExtendedIntegration<Base, Extended> {\n  // The extension overrides the base for any shared key (object spread + the wrapping below), so the\n  // result type drops the overridden base keys rather than intersecting them — `Base & Extended` would\n  // wrongly intersect shared keys (e.g. a re-typed property collapses to `never`).\n  const wrappedIntegration = {\n    ...integration,\n    ...extendedIntegration,\n  } as ExtendedIntegration<Base, Extended>;\n\n  // Make sure that functions that are extended also call the base functions, if defined\n  // oxlint-disable-next-line guard-for-in\n  for (const key in extendedIntegration) {\n    const baseValue = integration[key as keyof Base];\n    const extendedValue = extendedIntegration[key];\n\n    type ValueType = typeof extendedValue;\n\n    if (typeof baseValue === 'function' && typeof extendedValue === 'function') {\n      const wrappedFunction = new Proxy(baseValue, {\n        apply: (target, thisArg, args) => {\n          Reflect.apply(target, thisArg, args);\n          return Reflect.apply(extendedValue, thisArg, args);\n        },\n      }) as ValueType;\n\n      // We know this is OK, but typescript does not properly narrow/infer types here\n      // so instead of casting the wrappedFunction to some complicated type, we just make clear that we simply overwrite this\n      (wrappedIntegration as Record<string, unknown>)[key] = wrappedFunction;\n    }\n  }\n\n  return wrappedIntegration;\n}\n", "const SEQUENCE_ATTR_KEY = 'sentry.timestamp.sequence';\n\nlet _sequenceNumber = 0;\nlet _previousTimestampMs: number | undefined;\n\n/**\n * Returns the `sentry.timestamp.sequence` attribute entry for a serialized telemetry item.\n *\n * The sequence number starts at 0 and increments by 1 for each item captured.\n * It resets to 0 when the current item's integer millisecond timestamp differs\n * from the previous item's integer millisecond timestamp.\n *\n * @param timestampInSeconds - The timestamp of the telemetry item in seconds.\n */\nexport function getSequenceAttribute(timestampInSeconds: number): {\n  key: string;\n  value: { value: number; type: 'integer' };\n} {\n  const nowMs = Math.floor(timestampInSeconds * 1000);\n\n  if (_previousTimestampMs !== undefined && nowMs !== _previousTimestampMs) {\n    _sequenceNumber = 0;\n  }\n\n  const value = _sequenceNumber;\n  _sequenceNumber++;\n  _previousTimestampMs = nowMs;\n\n  return {\n    key: SEQUENCE_ATTR_KEY,\n    value: { value, type: 'integer' },\n  };\n}\n\n/**\n * Resets the sequence number state. Only exported for testing purposes.\n */\nexport function _INTERNAL_resetSequenceNumber(): void {\n  _sequenceNumber = 0;\n  _previousTimestampMs = undefined;\n}\n", "import type { Client } from '../client';\nimport { getTraceContextFromScope, withScope } from '../currentScopes';\nimport type { Scope } from '../scope';\nimport {\n  getDynamicSamplingContextFromScope,\n  getDynamicSamplingContextFromSpan,\n} from '../tracing/dynamicSamplingContext';\nimport type { TraceContext } from '../types/context';\nimport type { DynamicSamplingContext } from '../types/envelope';\nimport { getActiveSpan, spanToTraceContext } from './spanUtils';\n\n/** Extract trace information from scope */\nexport function _getTraceInfoFromScope(\n  client: Client,\n  scope: Scope | undefined,\n): [dynamicSamplingContext: Partial<DynamicSamplingContext> | undefined, traceContext: TraceContext | undefined] {\n  if (!scope) {\n    return [undefined, undefined];\n  }\n\n  return withScope(scope, () => {\n    const span = getActiveSpan();\n    const traceContext = span ? spanToTraceContext(span) : getTraceContextFromScope(scope);\n    const dynamicSamplingContext = span\n      ? getDynamicSamplingContextFromSpan(span)\n      : getDynamicSamplingContextFromScope(client, scope);\n    return [dynamicSamplingContext, traceContext];\n  });\n}\n", "import type { LogSeverityLevel } from '../types/log';\n\n/**\n * Maps a log severity level to a log severity number.\n *\n * @see LogSeverityLevel\n */\nexport const SEVERITY_TEXT_TO_SEVERITY_NUMBER: Partial<Record<LogSeverityLevel, number>> = {\n  trace: 1,\n  debug: 5,\n  info: 9,\n  warn: 13,\n  error: 17,\n  fatal: 21,\n};\n", "/*\n * This module exists for optimizations in the build process through rollup and terser.  We define some global\n * constants, which can be overridden during build. By guarding certain pieces of code with functions that return these\n * constants, we can control whether or not they appear in the final bundle. (Any code guarded by a false condition will\n * never run, and will hence be dropped during treeshaking.) The two primary uses for this are stripping out calls to\n * `debug` and preventing node-related code from appearing in browser bundles.\n *\n * Attention:\n * This file should not be used to define constants/flags that are intended to be used for tree-shaking conducted by\n * users. These flags should live in their respective packages, as we identified user tooling (specifically webpack)\n * having issues tree-shaking these constants across package boundaries.\n * An example for this is the __SENTRY_DEBUG__ constant. It is declared in each package individually because we want\n * users to be able to shake away expressions that it guards.\n */\n\ndeclare const __SENTRY_BROWSER_BUNDLE__: boolean | undefined;\n\nexport type SdkSource = 'npm' | 'cdn' | 'loader' | 'aws-lambda-layer';\n\n/**\n * Figures out if we're building a browser bundle.\n *\n * @returns true if this is a browser bundle build.\n */\nexport function isBrowserBundle(): boolean {\n  return typeof __SENTRY_BROWSER_BUNDLE__ !== 'undefined' && !!__SENTRY_BROWSER_BUNDLE__;\n}\n\n/**\n * Get source of SDK.\n */\nexport function getSDKSource(): SdkSource {\n  // The `/*! ... */` marker is replaced by our CDN bundle build step with `return 'cdn';`.\n  // It uses the `/*!` legal-comment syntax specifically so it survives esbuild's transpile\n  // (which strips ordinary `/* ... */` block comments).\n  /*! __SENTRY_SDK_SOURCE__ */ return 'npm';\n}\n", "/**\n * NOTE: In order to avoid circular dependencies, if you add a function to this module and it needs to print something,\n * you must either a) use `console.log` rather than the `debug` singleton, or b) put your function elsewhere.\n */\n\nimport { isBrowserBundle } from './env';\n\n/**\n * Checks whether we're in the Node.js or Browser environment\n *\n * @returns Answer to given question\n */\nexport function isNodeEnv(): boolean {\n  // explicitly check for browser bundles as those can be optimized statically\n  // by terser/rollup.\n  return (\n    !isBrowserBundle() &&\n    Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]'\n  );\n}\n\n/**\n * Requires a module which is protected against bundler minification.\n *\n * @param request The module path to resolve\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction dynamicRequire(mod: any, request: string): any {\n  // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n  return mod.require(request);\n}\n\n/**\n * Helper for dynamically loading module that should work with linked dependencies.\n * The problem is that we _should_ be using `require(require.resolve(moduleName, { paths: [cwd()] }))`\n * However it's _not possible_ to do that with Webpack, as it has to know all the dependencies during\n * build time. `require.resolve` is also not available in any other way, so we cannot create,\n * a fake helper like we do with `dynamicRequire`.\n *\n * We always prefer to use local package, thus the value is not returned early from each `try/catch` block.\n * That is to mimic the behavior of `require.resolve` exactly.\n *\n * @param moduleName module name to require\n * @param existingModule module to use for requiring\n * @returns possibly required module\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function loadModule<T>(moduleName: string, existingModule: any = module): T | undefined {\n  let mod: T | undefined;\n\n  try {\n    mod = dynamicRequire(existingModule, moduleName);\n  } catch {\n    // no-empty\n  }\n\n  if (!mod) {\n    try {\n      const { cwd } = dynamicRequire(existingModule, 'process');\n      mod = dynamicRequire(existingModule, `${cwd()}/node_modules/${moduleName}`) as T;\n    } catch {\n      // no-empty\n    }\n  }\n\n  return mod;\n}\n", "import { isNodeEnv } from './node';\nimport { GLOBAL_OBJ } from './worldwide';\n\n/**\n * Returns true if we are in the browser.\n */\nexport function isBrowser(): boolean {\n  // eslint-disable-next-line no-restricted-globals\n  return typeof window !== 'undefined' && (!isNodeEnv() || isElectronNodeRenderer());\n}\n\ntype ElectronProcess = { type?: string };\n\n// Electron renderers with nodeIntegration enabled are detected as Node.js so we specifically test for them\nfunction isElectronNodeRenderer(): boolean {\n  const process = (GLOBAL_OBJ as typeof GLOBAL_OBJ & { process?: ElectronProcess }).process;\n  return process?.type === 'renderer';\n}\n", "import type { DsnComponents } from '../types/dsn';\nimport type { LogContainerItem, LogEnvelope } from '../types/envelope';\nimport type { SerializedLog } from '../types/log';\nimport type { SdkMetadata } from '../types/sdkmetadata';\nimport { dsnToString } from '../utils/dsn';\nimport { createEnvelope } from '../utils/envelope';\nimport { isBrowser } from '../utils/isBrowser';\n\n/**\n * Creates a log container envelope item for a list of logs.\n *\n * @param items - The logs to include in the envelope.\n * @param inferUserData - If true, tells Relay to infer the end-user IP and User-Agent from the incoming request.\n *                        Only emitted as `ingest_settings` in browser environments.\n * @returns The created log container envelope item.\n */\nexport function createLogContainerEnvelopeItem(items: Array<SerializedLog>, inferUserData?: boolean): LogContainerItem {\n  const inferSetting = inferUserData ? 'auto' : 'never';\n  return [\n    {\n      type: 'log',\n      item_count: items.length,\n      content_type: 'application/vnd.sentry.items.log+json',\n    },\n    {\n      version: 2,\n      ...(isBrowser() && {\n        ingest_settings: { infer_ip: inferSetting, infer_user_agent: inferSetting },\n      }),\n      items,\n    },\n  ];\n}\n\n/**\n * Creates an envelope for a list of logs.\n *\n * Logs from multiple traces can be included in the same envelope.\n *\n * @param logs - The logs to include in the envelope.\n * @param metadata - The metadata to include in the envelope.\n * @param tunnel - The tunnel to include in the envelope.\n * @param dsn - The DSN to include in the envelope.\n * @param inferUserData - If true, tells Relay to infer the end-user IP and User-Agent from the incoming request.\n * @returns The created envelope.\n */\nexport function createLogEnvelope(\n  logs: Array<SerializedLog>,\n  metadata?: SdkMetadata,\n  tunnel?: string,\n  dsn?: DsnComponents,\n  inferUserData?: boolean,\n): LogEnvelope {\n  const headers: LogEnvelope[0] = {};\n\n  if (metadata?.sdk) {\n    headers.sdk = {\n      name: metadata.sdk.name,\n      version: metadata.sdk.version,\n    };\n  }\n\n  if (!!tunnel && !!dsn) {\n    headers.dsn = dsnToString(dsn);\n  }\n\n  return createEnvelope<LogEnvelope>(headers, [createLogContainerEnvelopeItem(logs, inferUserData)]);\n}\n", "import type { Attributes } from '../attributes';\nimport { serializeAttributes } from '../attributes';\nimport { getGlobalSingleton } from '../carrier';\nimport type { Client } from '../client';\nimport { getClient, getCurrentScope, getIsolationScope } from '../currentScopes';\nimport { DEBUG_BUILD } from '../debug-build';\nimport type { Integration } from '../types/integration';\nimport type { Log, SerializedLog } from '../types/log';\nimport { consoleSandbox, debug } from '../utils/debug-logger';\nimport { isParameterizedString } from '../utils/is';\nimport { getCombinedScopeData } from '../utils/scopeData';\nimport { _getSpanForScope } from '../utils/spanOnScope';\nimport { timestampInSeconds } from '../utils/time';\nimport { getSequenceAttribute } from '../utils/timestampSequence';\nimport { _getTraceInfoFromScope } from '../utils/trace-info';\nimport { SEVERITY_TEXT_TO_SEVERITY_NUMBER } from './constants';\nimport { createLogEnvelope } from './envelope';\n\nconst MAX_LOG_BUFFER_SIZE = 100;\n\n/**\n * Sets a log attribute if the value exists and the attribute key is not already present.\n *\n * @param logAttributes - The log attributes object to modify.\n * @param key - The attribute key to set.\n * @param value - The value to set (only sets if truthy and key not present).\n * @param setEvenIfPresent - Whether to set the attribute if it is present. Defaults to true.\n */\nfunction setLogAttribute(\n  logAttributes: Record<string, unknown>,\n  key: string,\n  value: unknown,\n  setEvenIfPresent = true,\n): void {\n  if (value && (!logAttributes[key] || setEvenIfPresent)) {\n    logAttributes[key] = value;\n  }\n}\n\n/**\n * Captures a serialized log event and adds it to the log buffer for the given client.\n *\n * @param client - A client. Uses the current client if not provided.\n * @param serializedLog - The serialized log event to capture.\n *\n * @experimental This method will experience breaking changes. This is not yet part of\n * the stable Sentry SDK API and can be changed or removed without warning.\n */\nexport function _INTERNAL_captureSerializedLog(client: Client, serializedLog: SerializedLog): void {\n  const bufferMap = _getBufferMap();\n  const logBuffer = _INTERNAL_getLogBuffer(client);\n\n  if (logBuffer === undefined) {\n    bufferMap.set(client, [serializedLog]);\n  } else {\n    if (logBuffer.length >= MAX_LOG_BUFFER_SIZE) {\n      _INTERNAL_flushLogsBuffer(client, logBuffer);\n      bufferMap.set(client, [serializedLog]);\n    } else {\n      bufferMap.set(client, [...logBuffer, serializedLog]);\n    }\n  }\n}\n\n/**\n * Captures a log event and sends it to Sentry.\n *\n * @param log - The log event to capture.\n * @param scope - A scope. Uses the current scope if not provided.\n * @param client - A client. Uses the current client if not provided.\n * @param captureSerializedLog - A function to capture the serialized log.\n *\n * @experimental This method will experience breaking changes. This is not yet part of\n * the stable Sentry SDK API and can be changed or removed without warning.\n */\nexport function _INTERNAL_captureLog(\n  beforeLog: Log,\n  currentScope = getCurrentScope(),\n  captureSerializedLog: (client: Client, log: SerializedLog) => void = _INTERNAL_captureSerializedLog,\n): void {\n  const client = currentScope?.getClient() ?? getClient();\n  if (!client) {\n    DEBUG_BUILD && debug.warn('No client available to capture log.');\n    return;\n  }\n\n  const { release, environment, enableLogs = true, beforeSendLog } = client.getOptions();\n  if (!enableLogs) {\n    DEBUG_BUILD && debug.warn('logging option not enabled, log will not be captured.');\n    return;\n  }\n\n  const [, traceContext] = _getTraceInfoFromScope(client, currentScope);\n\n  const processedLogAttributes = {\n    ...beforeLog.attributes,\n  };\n\n  const {\n    user: { id, email, username },\n    attributes: scopeAttributes = {},\n  } = getCombinedScopeData(getIsolationScope(), currentScope);\n\n  setLogAttribute(processedLogAttributes, 'user.id', id, false);\n  setLogAttribute(processedLogAttributes, 'user.email', email, false);\n  setLogAttribute(processedLogAttributes, 'user.name', username, false);\n\n  setLogAttribute(processedLogAttributes, 'sentry.release', release);\n  setLogAttribute(processedLogAttributes, 'sentry.environment', environment);\n\n  const { name, version } = client.getSdkMetadata()?.sdk ?? {};\n  setLogAttribute(processedLogAttributes, 'sentry.sdk.name', name);\n  setLogAttribute(processedLogAttributes, 'sentry.sdk.version', version);\n\n  const replay = client.getIntegrationByName<\n    Integration & {\n      getReplayId: (onlyIfSampled?: boolean) => string;\n      getRecordingMode: () => 'session' | 'buffer' | undefined;\n    }\n  >('Replay');\n\n  const replayId = replay?.getReplayId(true);\n  setLogAttribute(processedLogAttributes, 'sentry.replay_id', replayId);\n\n  if (replayId && replay?.getRecordingMode() === 'buffer') {\n    // We send this so we can identify cases where the replayId is attached but the replay itself might not have been sent to Sentry\n    setLogAttribute(processedLogAttributes, 'sentry._internal.replay_is_buffering', true);\n  }\n\n  const beforeLogMessage = beforeLog.message;\n  if (isParameterizedString(beforeLogMessage)) {\n    const { __sentry_template_string__, __sentry_template_values__ = [] } = beforeLogMessage;\n    if (__sentry_template_values__?.length) {\n      processedLogAttributes['sentry.message.template'] = __sentry_template_string__;\n    }\n    __sentry_template_values__.forEach((param, index) => {\n      processedLogAttributes[`sentry.message.parameter.${index}`] = param;\n    });\n  }\n\n  const span = _getSpanForScope(currentScope);\n  // Add the parent span ID to the log attributes for trace context\n  setLogAttribute(processedLogAttributes, 'sentry.trace.parent_span_id', span?.spanContext().spanId);\n\n  const processedLog = { ...beforeLog, attributes: processedLogAttributes };\n\n  client.emit('beforeCaptureLog', processedLog);\n\n  // We need to wrap this in `consoleSandbox` to avoid recursive calls to `beforeSendLog`\n  const log = beforeSendLog ? consoleSandbox(() => beforeSendLog(processedLog)) : processedLog;\n  if (!log) {\n    client.recordDroppedEvent('before_send', 'log_item', 1);\n    DEBUG_BUILD && debug.warn('beforeSendLog returned null, log will not be captured.');\n    return;\n  }\n\n  const { level, message, attributes: logAttributes = {}, severityNumber } = log;\n\n  const timestamp = timestampInSeconds();\n  const sequenceAttr = getSequenceAttribute(timestamp);\n\n  const serializedLog: SerializedLog = {\n    timestamp,\n    level,\n    body: _removeLoneSurrogates(String(message)),\n    trace_id: traceContext?.trace_id,\n    severity_number: severityNumber ?? SEVERITY_TEXT_TO_SEVERITY_NUMBER[level],\n    attributes: sanitizeLogAttributes({\n      ...serializeAttributes(scopeAttributes),\n      ...serializeAttributes(logAttributes, true),\n      [sequenceAttr.key]: sequenceAttr.value,\n    }),\n  };\n\n  captureSerializedLog(client, serializedLog);\n\n  client.emit('afterCaptureLog', log);\n}\n\n/**\n * Flushes the logs buffer to Sentry.\n *\n * @param client - A client.\n * @param maybeLogBuffer - A log buffer. Uses the log buffer for the given client if not provided.\n *\n * @experimental This method will experience breaking changes. This is not yet part of\n * the stable Sentry SDK API and can be changed or removed without warning.\n */\nexport function _INTERNAL_flushLogsBuffer(client: Client, maybeLogBuffer?: Array<SerializedLog>): void {\n  const logBuffer = maybeLogBuffer ?? _INTERNAL_getLogBuffer(client) ?? [];\n  if (logBuffer.length === 0) {\n    return;\n  }\n\n  const clientOptions = client.getOptions();\n  const envelope = createLogEnvelope(\n    logBuffer,\n    clientOptions._metadata,\n    clientOptions.tunnel,\n    client.getDsn(),\n    client.getDataCollectionOptions().userInfo,\n  );\n\n  // Clear the log buffer after envelopes have been constructed.\n  _getBufferMap().set(client, []);\n\n  client.emit('flushLogs');\n\n  // sendEnvelope should not throw\n  // eslint-disable-next-line @typescript-eslint/no-floating-promises\n  client.sendEnvelope(envelope);\n}\n\n/**\n * Returns the log buffer for a given client.\n *\n * Exported for testing purposes.\n *\n * @param client - The client to get the log buffer for.\n * @returns The log buffer for the given client.\n */\nexport function _INTERNAL_getLogBuffer(client: Client): Array<SerializedLog> | undefined {\n  return _getBufferMap().get(client);\n}\n\nfunction _getBufferMap(): WeakMap<Client, Array<SerializedLog>> {\n  // The reference to the Client <> LogBuffer map is stored on the carrier to ensure it's always the same\n  return getGlobalSingleton('clientToLogBufferMap', () => new WeakMap<Client, Array<SerializedLog>>());\n}\n\n/**\n * Sanitizes serialized log attributes by replacing lone surrogates in both\n * keys and string values with U+FFFD.\n */\nfunction sanitizeLogAttributes(attributes: Attributes): Attributes {\n  const sanitized: Attributes = {};\n  for (const [key, attr] of Object.entries(attributes)) {\n    const sanitizedKey = _removeLoneSurrogates(key);\n    if (attr.type === 'string') {\n      sanitized[sanitizedKey] = { ...attr, value: _removeLoneSurrogates(attr.value) };\n    } else {\n      sanitized[sanitizedKey] = attr;\n    }\n  }\n  return sanitized;\n}\n\n/**\n * Replaces unpaired UTF-16 surrogates with U+FFFD (replacement character).\n *\n * Lone surrogates (U+D800–U+DFFF not part of a valid pair) cause `serde_json`\n * on the server to reject the entire log batch when they appear in\n * JSON-escaped form (e.g. `\\uD800`). Replacing them at the SDK level ensures\n * only the offending characters are lost instead of the whole payload.\n *\n * Uses the native `String.prototype.toWellFormed()` when available\n * (Node 20+, Chrome 111+, Safari 15.4+, Firefox 119+, Hermes).\n * On older runtimes without native support, returns the string as-is.\n *\n * Exported for testing\n */\nexport function _removeLoneSurrogates(str: string): string {\n  // isWellFormed/toWellFormed are ES2024 (not in our TS lib target), so we feature-detect via Object().\n  const strObj: Record<string, Function> = Object(str);\n  const isWellFormed = strObj['isWellFormed'];\n  const toWellFormed = strObj['toWellFormed'];\n  if (typeof isWellFormed === 'function' && typeof toWellFormed === 'function') {\n    return isWellFormed.call(str) ? str : toWellFormed.call(str);\n  }\n  return str;\n}\n", "import type { DsnComponents } from '../types/dsn';\nimport type { MetricContainerItem, MetricEnvelope } from '../types/envelope';\nimport type { SerializedMetric } from '../types/metric';\nimport type { SdkMetadata } from '../types/sdkmetadata';\nimport { dsnToString } from '../utils/dsn';\nimport { createEnvelope } from '../utils/envelope';\nimport { isBrowser } from '../utils/isBrowser';\n\n/**\n * Creates a metric container envelope item for a list of metrics.\n *\n * @param items - The metrics to include in the envelope.\n * @param inferUserData - If true, tells Relay to infer the end-user IP and User-Agent from the incoming request.\n *                        Only emitted as `ingest_settings` in browser environments.\n * @returns The created metric container envelope item.\n */\nexport function createMetricContainerEnvelopeItem(\n  items: Array<SerializedMetric>,\n  inferUserData?: boolean,\n): MetricContainerItem {\n  const inferSetting = inferUserData ? 'auto' : 'never';\n  return [\n    {\n      type: 'trace_metric',\n      item_count: items.length,\n      content_type: 'application/vnd.sentry.items.trace-metric+json',\n    } as MetricContainerItem[0],\n    {\n      version: 2,\n      ...(isBrowser() && {\n        ingest_settings: { infer_ip: inferSetting, infer_user_agent: inferSetting },\n      }),\n      items,\n    },\n  ];\n}\n\n/**\n * Creates an envelope for a list of metrics.\n *\n * Metrics from multiple traces can be included in the same envelope.\n *\n * @param metrics - The metrics to include in the envelope.\n * @param metadata - The metadata to include in the envelope.\n * @param tunnel - The tunnel to include in the envelope.\n * @param dsn - The DSN to include in the envelope.\n * @param inferUserData - If true, tells Relay to infer the end-user IP and User-Agent from the incoming request.\n * @returns The created envelope.\n */\nexport function createMetricEnvelope(\n  metrics: Array<SerializedMetric>,\n  metadata?: SdkMetadata,\n  tunnel?: string,\n  dsn?: DsnComponents,\n  inferUserData?: boolean,\n): MetricEnvelope {\n  const headers: MetricEnvelope[0] = {};\n\n  if (metadata?.sdk) {\n    headers.sdk = {\n      name: metadata.sdk.name,\n      version: metadata.sdk.version,\n    };\n  }\n\n  if (!!tunnel && !!dsn) {\n    headers.dsn = dsnToString(dsn);\n  }\n\n  return createEnvelope<MetricEnvelope>(headers, [createMetricContainerEnvelopeItem(metrics, inferUserData)]);\n}\n", "import { type RawAttributes, serializeAttributes } from '../attributes';\nimport { getGlobalSingleton } from '../carrier';\nimport type { Client } from '../client';\nimport { getClient, getCurrentScope, getIsolationScope } from '../currentScopes';\nimport { DEBUG_BUILD } from '../debug-build';\nimport type { Scope } from '../scope';\nimport type { Integration } from '../types/integration';\nimport type { Metric, SerializedMetric } from '../types/metric';\nimport type { User } from '../types/user';\nimport { debug } from '../utils/debug-logger';\nimport { getCombinedScopeData } from '../utils/scopeData';\nimport { _getSpanForScope } from '../utils/spanOnScope';\nimport { timestampInSeconds } from '../utils/time';\nimport { getSequenceAttribute } from '../utils/timestampSequence';\nimport { _getTraceInfoFromScope } from '../utils/trace-info';\nimport { createMetricEnvelope } from './envelope';\n\nconst MAX_METRIC_BUFFER_SIZE = 1000;\n\n/**\n * Sets a metric attribute if the value exists and the attribute key is not already present.\n *\n * @param metricAttributes - The metric attributes object to modify.\n * @param key - The attribute key to set.\n * @param value - The value to set (only sets if truthy and key not present).\n * @param setEvenIfPresent - Whether to set the attribute if it is present. Defaults to true.\n */\nfunction setMetricAttribute(\n  metricAttributes: Record<string, unknown>,\n  key: string,\n  value: unknown,\n  setEvenIfPresent = true,\n): void {\n  if (value && (setEvenIfPresent || !(key in metricAttributes))) {\n    metricAttributes[key] = value;\n  }\n}\n\n/**\n * Captures a serialized metric event and adds it to the metric buffer for the given client.\n *\n * @param client - A client. Uses the current client if not provided.\n * @param serializedMetric - The serialized metric event to capture.\n *\n * @experimental This method will experience breaking changes. This is not yet part of\n * the stable Sentry SDK API and can be changed or removed without warning.\n */\nexport function _INTERNAL_captureSerializedMetric(client: Client, serializedMetric: SerializedMetric): void {\n  const bufferMap = _getBufferMap();\n  const metricBuffer = _INTERNAL_getMetricBuffer(client);\n\n  if (metricBuffer === undefined) {\n    bufferMap.set(client, [serializedMetric]);\n  } else {\n    if (metricBuffer.length >= MAX_METRIC_BUFFER_SIZE) {\n      _INTERNAL_flushMetricsBuffer(client, metricBuffer);\n      bufferMap.set(client, [serializedMetric]);\n    } else {\n      bufferMap.set(client, [...metricBuffer, serializedMetric]);\n    }\n  }\n}\n\n/**\n * Options for capturing a metric internally.\n */\nexport interface InternalCaptureMetricOptions {\n  /**\n   * The scope to capture the metric with.\n   */\n  scope?: Scope;\n\n  /**\n   * A function to capture the serialized metric.\n   */\n  captureSerializedMetric?: (client: Client, metric: SerializedMetric) => void;\n}\n\n/**\n * Enriches metric with all contextual attributes (user, SDK metadata, replay, etc.)\n */\nfunction _enrichMetricAttributes(beforeMetric: Metric, client: Client, user: User): Metric {\n  const { release, environment } = client.getOptions();\n\n  const processedMetricAttributes = {\n    ...beforeMetric.attributes,\n  };\n\n  // Add user attributes\n  setMetricAttribute(processedMetricAttributes, 'user.id', user.id, false);\n  setMetricAttribute(processedMetricAttributes, 'user.email', user.email, false);\n  setMetricAttribute(processedMetricAttributes, 'user.name', user.username, false);\n\n  // Add Sentry metadata\n  setMetricAttribute(processedMetricAttributes, 'sentry.release', release);\n  setMetricAttribute(processedMetricAttributes, 'sentry.environment', environment);\n\n  // Add SDK metadata\n  const { name, version } = client.getSdkMetadata()?.sdk ?? {};\n  setMetricAttribute(processedMetricAttributes, 'sentry.sdk.name', name);\n  setMetricAttribute(processedMetricAttributes, 'sentry.sdk.version', version);\n\n  // Add replay metadata\n  const replay = client.getIntegrationByName<\n    Integration & {\n      getReplayId: (onlyIfSampled?: boolean) => string;\n      getRecordingMode: () => 'session' | 'buffer' | undefined;\n    }\n  >('Replay');\n\n  const replayId = replay?.getReplayId(true);\n  setMetricAttribute(processedMetricAttributes, 'sentry.replay_id', replayId);\n\n  if (replayId && replay?.getRecordingMode() === 'buffer') {\n    setMetricAttribute(processedMetricAttributes, 'sentry._internal.replay_is_buffering', true);\n  }\n\n  return {\n    ...beforeMetric,\n    attributes: processedMetricAttributes,\n  };\n}\n\n/**\n * Creates a serialized metric ready to be sent to Sentry.\n */\nfunction _buildSerializedMetric(\n  metric: Metric,\n  client: Client,\n  currentScope: Scope,\n  scopeAttributes: RawAttributes<Record<string, unknown>> | undefined,\n): SerializedMetric {\n  // Get trace context\n  const [, traceContext] = _getTraceInfoFromScope(client, currentScope);\n  const span = _getSpanForScope(currentScope);\n  const traceId = span ? span.spanContext().traceId : traceContext?.trace_id;\n  const spanId = span ? span.spanContext().spanId : undefined;\n\n  const timestamp = timestampInSeconds();\n  const sequenceAttr = getSequenceAttribute(timestamp);\n\n  return {\n    timestamp,\n    trace_id: traceId ?? '',\n    span_id: spanId,\n    name: metric.name,\n    type: metric.type,\n    unit: metric.unit,\n    value: metric.value,\n    attributes: {\n      ...serializeAttributes(scopeAttributes),\n      ...serializeAttributes(metric.attributes, 'skip-undefined'),\n      [sequenceAttr.key]: sequenceAttr.value,\n    },\n  };\n}\n\n/**\n * Captures a metric event and sends it to Sentry.\n *\n * @param metric - The metric event to capture.\n * @param options - Options for capturing the metric.\n *\n * @experimental This method will experience breaking changes. This is not yet part of\n * the stable Sentry SDK API and can be changed or removed without warning.\n */\nexport function _INTERNAL_captureMetric(beforeMetric: Metric, options?: InternalCaptureMetricOptions): void {\n  const currentScope = options?.scope ?? getCurrentScope();\n  const captureSerializedMetric = options?.captureSerializedMetric ?? _INTERNAL_captureSerializedMetric;\n  const client = currentScope?.getClient() ?? getClient();\n  if (!client) {\n    DEBUG_BUILD && debug.warn('No client available to capture metric.');\n    return;\n  }\n\n  const { _experiments, enableMetrics, beforeSendMetric } = client.getOptions();\n\n  // todo(v11): Remove the experimental flag\n  // eslint-disable-next-line typescript/no-deprecated\n  const metricsEnabled = enableMetrics ?? _experiments?.enableMetrics ?? true;\n\n  if (!metricsEnabled) {\n    DEBUG_BUILD && debug.warn('metrics option not enabled, metric will not be captured.');\n    return;\n  }\n\n  // Enrich metric with contextual attributes\n  const { user, attributes: scopeAttributes } = getCombinedScopeData(getIsolationScope(), currentScope);\n  const enrichedMetric = _enrichMetricAttributes(beforeMetric, client, user);\n\n  client.emit('processMetric', enrichedMetric);\n\n  // todo(v11): Remove the experimental `beforeSendMetric`\n  // eslint-disable-next-line typescript/no-deprecated\n  const beforeSendCallback = beforeSendMetric || _experiments?.beforeSendMetric;\n  const processedMetric = beforeSendCallback ? beforeSendCallback(enrichedMetric) : enrichedMetric;\n\n  if (!processedMetric) {\n    DEBUG_BUILD && debug.log('`beforeSendMetric` returned `null`, will not send metric.');\n    return;\n  }\n\n  const serializedMetric = _buildSerializedMetric(processedMetric, client, currentScope, scopeAttributes);\n\n  DEBUG_BUILD && debug.log('[Metric]', serializedMetric);\n\n  captureSerializedMetric(client, serializedMetric);\n\n  client.emit('afterCaptureMetric', processedMetric);\n}\n\n/**\n * Flushes the metrics buffer to Sentry.\n *\n * @param client - A client.\n * @param maybeMetricBuffer - A metric buffer. Uses the metric buffer for the given client if not provided.\n *\n * @experimental This method will experience breaking changes. This is not yet part of\n * the stable Sentry SDK API and can be changed or removed without warning.\n */\nexport function _INTERNAL_flushMetricsBuffer(client: Client, maybeMetricBuffer?: Array<SerializedMetric>): void {\n  const metricBuffer = maybeMetricBuffer ?? _INTERNAL_getMetricBuffer(client) ?? [];\n  if (metricBuffer.length === 0) {\n    return;\n  }\n\n  const clientOptions = client.getOptions();\n  const envelope = createMetricEnvelope(\n    metricBuffer,\n    clientOptions._metadata,\n    clientOptions.tunnel,\n    client.getDsn(),\n    client.getDataCollectionOptions().userInfo,\n  );\n\n  // Clear the metric buffer after envelopes have been constructed.\n  _getBufferMap().set(client, []);\n\n  client.emit('flushMetrics');\n\n  // sendEnvelope should not throw\n  // eslint-disable-next-line @typescript-eslint/no-floating-promises\n  client.sendEnvelope(envelope);\n}\n\n/**\n * Returns the metric buffer for a given client.\n *\n * Exported for testing purposes.\n *\n * @param client - The client to get the metric buffer for.\n * @returns The metric buffer for the given client.\n */\nexport function _INTERNAL_getMetricBuffer(client: Client): Array<SerializedMetric> | undefined {\n  return _getBufferMap().get(client);\n}\n\nfunction _getBufferMap(): WeakMap<Client, Array<SerializedMetric>> {\n  // The reference to the Client <> MetricBuffer map is stored on the carrier to ensure it's always the same\n  return getGlobalSingleton('clientToMetricBufferMap', () => new WeakMap<Client, Array<SerializedMetric>>());\n}\n", "import type { RawAttributes } from '../../attributes';\nimport type { SerializedStreamedSpan, SpanJSON, StreamedSpanJSON } from '../../types/span';\nimport { streamedSpanJsonToSerializedSpan } from '../../utils/spanUtils';\n\n/**\n * Converts a v1 SpanJSON (from a legacy transaction) to a serialized v2 StreamedSpan.\n */\nexport function spanJsonToSerializedStreamedSpan(span: SpanJSON): SerializedStreamedSpan {\n  const streamedSpan: StreamedSpanJSON = {\n    trace_id: span.trace_id,\n    span_id: span.span_id,\n    parent_span_id: span.parent_span_id,\n    name: span.description || '',\n    start_timestamp: span.start_timestamp,\n    end_timestamp: span.timestamp || span.start_timestamp,\n    status: !span.status || span.status === 'ok' || span.status === 'cancelled' ? 'ok' : 'error',\n    is_segment: false,\n    attributes: { ...(span.data as RawAttributes<Record<string, unknown>>) },\n    links: span.links,\n  };\n\n  return streamedSpanJsonToSerializedSpan(streamedSpan);\n}\n", "import type { Client } from '../../client';\nimport type { SpanContainerItem } from '../../types/envelope';\nimport type { Event } from '../../types/event';\nimport { isBrowser } from '../../utils/isBrowser';\nimport { hasSpanStreamingEnabled } from './hasSpanStreamingEnabled';\nimport { spanJsonToSerializedStreamedSpan } from './spanJsonToStreamedSpan';\n\n/**\n * Extracts gen_ai spans from a transaction event, converts them to span v2 format,\n * and returns them as a SpanContainerItem.\n *\n * Only applies to static mode (non-streaming) transactions.\n *\n * WARNING: This function mutates `event.spans` by removing the extracted gen_ai spans\n * from the array. Call this before creating the event envelope so the transaction\n * item does not include the extracted spans.\n */\nexport function extractGenAiSpansFromEvent(event: Event, client: Client): SpanContainerItem | undefined {\n  if (\n    event.type !== 'transaction' ||\n    !event.spans?.length ||\n    !event.sdkProcessingMetadata?.hasGenAiSpans ||\n    client.getOptions().streamGenAiSpans === false ||\n    hasSpanStreamingEnabled(client)\n  ) {\n    return undefined;\n  }\n\n  const genAiSpans = [];\n  const remainingSpans = [];\n\n  for (const span of event.spans) {\n    if (span.op?.startsWith('gen_ai.')) {\n      genAiSpans.push(spanJsonToSerializedStreamedSpan(span));\n    } else {\n      remainingSpans.push(span);\n    }\n  }\n\n  if (genAiSpans.length === 0) {\n    return undefined;\n  }\n\n  event.spans = remainingSpans;\n\n  const inferSetting = client.getDataCollectionOptions().userInfo ? 'auto' : 'never';\n\n  return [\n    { type: 'span', item_count: genAiSpans.length, content_type: 'application/vnd.sentry.items.span.v2+json' },\n    {\n      version: 2,\n      ...(isBrowser() && {\n        ingest_settings: { infer_ip: inferSetting, infer_user_agent: inferSetting },\n      }),\n      items: genAiSpans,\n    },\n  ];\n}\n", "import { rejectedSyncPromise, resolvedSyncPromise } from './syncpromise';\nimport { safeUnref } from './timer';\n\nexport interface PromiseBuffer<T> {\n  // exposes the internal array so tests can assert on the state of it.\n  // XXX: this really should not be public api.\n  $: PromiseLike<T>[];\n  add(taskProducer: () => PromiseLike<T>): PromiseLike<T>;\n  drain(timeout?: number): PromiseLike<boolean>;\n}\n\nexport const SENTRY_BUFFER_FULL_ERROR = Symbol.for('SentryBufferFullError');\n\n/**\n * Creates an new PromiseBuffer object with the specified limit\n * @param limit max number of promises that can be stored in the buffer\n */\nexport function makePromiseBuffer<T>(limit: number = 100): PromiseBuffer<T> {\n  const buffer: Set<PromiseLike<T>> = new Set();\n\n  function isReady(): boolean {\n    return buffer.size < limit;\n  }\n\n  /**\n   * Remove a promise from the queue.\n   *\n   * @param task Can be any PromiseLike<T>\n   * @returns Removed promise.\n   */\n  function remove(task: PromiseLike<T>): void {\n    buffer.delete(task);\n  }\n\n  /**\n   * Add a promise (representing an in-flight action) to the queue, and set it to remove itself on fulfillment.\n   *\n   * @param taskProducer A function producing any PromiseLike<T>; In previous versions this used to be `task:\n   *        PromiseLike<T>`, but under that model, Promises were instantly created on the call-site and their executor\n   *        functions therefore ran immediately. Thus, even if the buffer was full, the action still happened. By\n   *        requiring the promise to be wrapped in a function, we can defer promise creation until after the buffer\n   *        limit check.\n   * @returns The original promise.\n   */\n  function add(taskProducer: () => PromiseLike<T>): PromiseLike<T> {\n    if (!isReady()) {\n      return rejectedSyncPromise(SENTRY_BUFFER_FULL_ERROR);\n    }\n\n    // start the task and add its promise to the queue\n    const task = taskProducer();\n    buffer.add(task);\n    void task.then(\n      () => remove(task),\n      () => remove(task),\n    );\n    return task;\n  }\n\n  /**\n   * Wait for all promises in the queue to resolve or for timeout to expire, whichever comes first.\n   *\n   * @param timeout The time, in ms, after which to resolve to `false` if the queue is still non-empty. Passing `0` (or\n   * not passing anything) will make the promise wait as long as it takes for the queue to drain before resolving to\n   * `true`.\n   * @returns A promise which will resolve to `true` if the queue is already empty or drains before the timeout, and\n   * `false` otherwise\n   */\n  function drain(timeout?: number): PromiseLike<boolean> {\n    if (!buffer.size) {\n      return resolvedSyncPromise(true);\n    }\n\n    // We want to resolve even if one of the promises rejects\n    const drainPromise = Promise.allSettled(Array.from(buffer)).then(() => true);\n\n    if (!timeout) {\n      return drainPromise;\n    }\n\n    const promises = [\n      drainPromise,\n      new Promise<boolean>(resolve => safeUnref(setTimeout(() => resolve(false), timeout))),\n    ];\n\n    return Promise.race(promises);\n  }\n\n  return {\n    get $(): PromiseLike<T>[] {\n      return Array.from(buffer);\n    },\n    add,\n    drain,\n  };\n}\n", "import type { DataCategory } from '../types/datacategory';\nimport type { TransportMakeRequestResponse } from '../types/transport';\nimport { safeDateNow } from './randomSafeContext';\n\n// Intentionally keeping the key broad, as we don't know for sure what rate limit headers get returned from backend\nexport type RateLimits = Record<string, number>;\n\nexport const DEFAULT_RETRY_AFTER = 60 * 1000; // 60 seconds\n\n/**\n * Extracts Retry-After value from the request header or returns default value\n * @param header string representation of 'Retry-After' header\n * @param now current unix timestamp\n *\n */\nexport function parseRetryAfterHeader(header: string, now: number = safeDateNow()): number {\n  const headerDelay = parseInt(`${header}`, 10);\n  if (!isNaN(headerDelay)) {\n    return headerDelay * 1000;\n  }\n\n  const headerDate = Date.parse(`${header}`);\n  if (!isNaN(headerDate)) {\n    return headerDate - now;\n  }\n\n  return DEFAULT_RETRY_AFTER;\n}\n\n/**\n * Gets the time that the given category is disabled until for rate limiting.\n * In case no category-specific limit is set but a general rate limit across all categories is active,\n * that time is returned.\n *\n * @return the time in ms that the category is disabled until or 0 if there's no active rate limit.\n */\nexport function disabledUntil(limits: RateLimits, dataCategory: DataCategory): number {\n  return limits[dataCategory] || limits.all || 0;\n}\n\n/**\n * Checks if a category is rate limited\n */\nexport function isRateLimited(limits: RateLimits, dataCategory: DataCategory, now: number = safeDateNow()): boolean {\n  return disabledUntil(limits, dataCategory) > now;\n}\n\n/**\n * Update ratelimits from incoming headers.\n *\n * @return the updated RateLimits object.\n */\nexport function updateRateLimits(\n  limits: RateLimits,\n  { statusCode, headers }: TransportMakeRequestResponse,\n  now: number = safeDateNow(),\n): RateLimits {\n  const updatedRateLimits: RateLimits = {\n    ...limits,\n  };\n\n  // \"The name is case-insensitive.\"\n  // https://developer.mozilla.org/en-US/docs/Web/API/Headers/get\n  const rateLimitHeader = headers?.['x-sentry-rate-limits'];\n  const retryAfterHeader = headers?.['retry-after'];\n\n  if (rateLimitHeader) {\n    /**\n     * rate limit headers are of the form\n     *     <header>,<header>,..\n     * where each <header> is of the form\n     *     <retry_after>: <categories>: <scope>: <reason_code>: <namespaces>\n     * where\n     *     <retry_after> is a delay in seconds\n     *     <categories> is the event type(s) (error, transaction, etc) being rate limited and is of the form\n     *         <category>;<category>;...\n     *     <scope> is what's being limited (org, project, or key) - ignored by SDK\n     *     <reason_code> is an arbitrary string like \"org_quota\" - ignored by SDK\n     *     <namespaces> Semicolon-separated list of metric namespace identifiers. Defines which namespace(s) will be affected.\n     *         Only present if rate limit applies to the metric_bucket data category.\n     */\n    for (const limit of rateLimitHeader.trim().split(',')) {\n      const [retryAfter, categories, , , namespaces] = limit.split(':', 5) as [string, ...string[]];\n      const headerDelay = parseInt(retryAfter, 10);\n      const delay = (!isNaN(headerDelay) ? headerDelay : 60) * 1000; // 60sec default\n      if (!categories) {\n        updatedRateLimits.all = now + delay;\n      } else {\n        for (const category of categories.split(';')) {\n          if (category === 'metric_bucket') {\n            // namespaces will be present when category === 'metric_bucket'\n            if (!namespaces || namespaces.split(';').includes('custom')) {\n              updatedRateLimits[category] = now + delay;\n            }\n          } else {\n            updatedRateLimits[category] = now + delay;\n          }\n        }\n      }\n    }\n  } else if (retryAfterHeader) {\n    updatedRateLimits.all = now + parseRetryAfterHeader(retryAfterHeader, now);\n  } else if (statusCode === 429) {\n    updatedRateLimits.all = now + 60 * 1000;\n  }\n\n  return updatedRateLimits;\n}\n", "import { DEBUG_BUILD } from '../debug-build';\nimport type { EventDropReason } from '../types/clientreport';\nimport type { Envelope, EnvelopeItem } from '../types/envelope';\nimport type {\n  InternalBaseTransportOptions,\n  Transport,\n  TransportMakeRequestResponse,\n  TransportRequestExecutor,\n} from '../types/transport';\nimport { debug } from '../utils/debug-logger';\nimport {\n  createEnvelope,\n  envelopeContainsItemType,\n  envelopeItemTypeToDataCategory,\n  forEachEnvelopeItem,\n  serializeEnvelope,\n} from '../utils/envelope';\nimport { makePromiseBuffer, type PromiseBuffer, SENTRY_BUFFER_FULL_ERROR } from '../utils/promisebuffer';\nimport { isRateLimited, type RateLimits, updateRateLimits } from '../utils/ratelimit';\n\nexport const DEFAULT_TRANSPORT_BUFFER_SIZE = 64;\n\n/**\n * Creates an instance of a Sentry `Transport`\n *\n * @param options\n * @param makeRequest\n */\nexport function createTransport(\n  options: InternalBaseTransportOptions,\n  makeRequest: TransportRequestExecutor,\n  buffer: PromiseBuffer<TransportMakeRequestResponse> = makePromiseBuffer(\n    options.bufferSize || DEFAULT_TRANSPORT_BUFFER_SIZE,\n  ),\n): Transport {\n  let rateLimits: RateLimits = {};\n  const flush = (timeout?: number): PromiseLike<boolean> => buffer.drain(timeout);\n\n  function send(envelope: Envelope): PromiseLike<TransportMakeRequestResponse> {\n    const filteredEnvelopeItems: EnvelopeItem[] = [];\n\n    // Drop rate limited items from envelope\n    forEachEnvelopeItem(envelope, (item, type) => {\n      const dataCategory = envelopeItemTypeToDataCategory(type);\n      if (isRateLimited(rateLimits, dataCategory)) {\n        options.recordDroppedEvent('ratelimit_backoff', dataCategory);\n      } else {\n        filteredEnvelopeItems.push(item);\n      }\n    });\n\n    // Skip sending if envelope is empty after filtering out rate limited events\n    if (filteredEnvelopeItems.length === 0) {\n      return Promise.resolve({});\n    }\n\n    const filteredEnvelope: Envelope = createEnvelope(envelope[0], filteredEnvelopeItems as (typeof envelope)[1]);\n\n    // Creates client report for each item in an envelope\n    const recordEnvelopeLoss = (reason: EventDropReason): void => {\n      // Don't record outcomes for client reports - we don't want to create a feedback loop if client reports themselves fail to send\n      if (envelopeContainsItemType(filteredEnvelope, ['client_report'])) {\n        DEBUG_BUILD && debug.warn(`Dropping client report. Will not send outcomes (reason: ${reason}).`);\n        return;\n      }\n      forEachEnvelopeItem(filteredEnvelope, (item, type) => {\n        options.recordDroppedEvent(reason, envelopeItemTypeToDataCategory(type));\n      });\n    };\n\n    const requestTask = (): PromiseLike<TransportMakeRequestResponse> =>\n      makeRequest({ body: serializeEnvelope(filteredEnvelope) }).then(\n        response => {\n          // Handle 413 Content Too Large\n          // Loss of envelope content is expected so we record a send_error client report\n          // https://develop.sentry.dev/sdk/expected-features/#dealing-with-network-failures\n          if (response.statusCode === 413) {\n            DEBUG_BUILD &&\n              debug.error(\n                'Sentry responded with status code 413. Envelope was discarded due to exceeding size limits.',\n              );\n            recordEnvelopeLoss('send_error');\n            return response;\n          }\n\n          // We don't want to throw on NOK responses, but we want to at least log them\n          if (\n            DEBUG_BUILD &&\n            response.statusCode !== undefined &&\n            (response.statusCode < 200 || response.statusCode >= 300)\n          ) {\n            debug.warn(`Sentry responded with status code ${response.statusCode} to sent event.`);\n          }\n\n          rateLimits = updateRateLimits(rateLimits, response);\n          return response;\n        },\n        error => {\n          recordEnvelopeLoss('network_error');\n          DEBUG_BUILD && debug.error('Encountered error running transport request:', error);\n          throw error;\n        },\n      );\n\n    return buffer.add(requestTask).then(\n      result => result,\n      error => {\n        if (error === SENTRY_BUFFER_FULL_ERROR) {\n          DEBUG_BUILD && debug.error('Skipped sending event because buffer is full.');\n          recordEnvelopeLoss('queue_overflow');\n          return Promise.resolve({});\n        } else {\n          throw error;\n        }\n      },\n    );\n  }\n\n  return {\n    send,\n    flush,\n  };\n}\n", "import type { ClientReport } from '../types/clientreport';\nimport type { ClientReportEnvelope, ClientReportItem } from '../types/envelope';\nimport { createEnvelope } from './envelope';\nimport { dateTimestampInSeconds } from './time';\n\n/**\n * Creates client report envelope\n * @param discarded_events An array of discard events\n * @param dsn A DSN that can be set on the header. Optional.\n */\nexport function createClientReportEnvelope(\n  discarded_events: ClientReport['discarded_events'],\n  dsn?: string,\n  timestamp?: number,\n): ClientReportEnvelope {\n  const clientReportItem: ClientReportItem = [\n    { type: 'client_report' },\n    {\n      timestamp: timestamp || dateTimestampInSeconds(),\n      discarded_events,\n    },\n  ];\n  return createEnvelope<ClientReportEnvelope>(dsn ? { dsn } : {}, [clientReportItem]);\n}\n", "import type { Event } from '../types/event';\n\n/**\n * Get a list of possible event messages from a Sentry event.\n */\nexport function getPossibleEventMessages(event: Event): string[] {\n  const possibleMessages: string[] = [];\n\n  if (event.message) {\n    possibleMessages.push(event.message);\n  }\n\n  try {\n    // @ts-expect-error Try catching to save bundle size\n    const lastException = event.exception.values[event.exception.values.length - 1];\n    if (lastException?.value) {\n      possibleMessages.push(lastException.value);\n      if (lastException.type) {\n        possibleMessages.push(`${lastException.type}: ${lastException.value}`);\n      }\n    }\n  } catch {\n    // ignore errors here\n  }\n\n  return possibleMessages;\n}\n", "import { SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME, SEMANTIC_ATTRIBUTE_PROFILE_ID } from '../semanticAttributes';\nimport type { TransactionEvent } from '../types/event';\nimport type { SpanJSON } from '../types/span';\n\n/**\n * Converts a transaction event to a span JSON object.\n */\nexport function convertTransactionEventToSpanJson(event: TransactionEvent): SpanJSON {\n  const { trace_id, parent_span_id, span_id, status, origin, data, op } = event.contexts?.trace ?? {};\n\n  return {\n    data: data ?? {},\n    description: event.transaction,\n    op,\n    parent_span_id,\n    span_id: span_id ?? '',\n    start_timestamp: event.start_timestamp ?? 0,\n    status,\n    timestamp: event.timestamp,\n    trace_id: trace_id ?? '',\n    origin,\n    profile_id: data?.[SEMANTIC_ATTRIBUTE_PROFILE_ID] as string | undefined,\n    exclusive_time: data?.[SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME] as number | undefined,\n    measurements: event.measurements,\n    is_segment: true,\n  };\n}\n\n/**\n * Converts a span JSON object to a transaction event.\n */\nexport function convertSpanJsonToTransactionEvent(span: SpanJSON): TransactionEvent {\n  return {\n    type: 'transaction',\n    timestamp: span.timestamp,\n    start_timestamp: span.start_timestamp,\n    transaction: span.description,\n    contexts: {\n      trace: {\n        trace_id: span.trace_id,\n        span_id: span.span_id,\n        parent_span_id: span.parent_span_id,\n        op: span.op,\n        status: span.status,\n        origin: span.origin,\n        data: {\n          ...span.data,\n          ...(span.profile_id && { [SEMANTIC_ATTRIBUTE_PROFILE_ID]: span.profile_id }),\n          ...(span.exclusive_time && { [SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME]: span.exclusive_time }),\n        },\n      },\n    },\n    measurements: span.measurements,\n  };\n}\n", "export const FILTERED_VALUE = '[Filtered]';\n\nexport const PII_HEADER_SNIPPETS = ['forwarded', '-ip', 'remote-', 'via', '-user'];\n\nexport const SENSITIVE_KEY_SNIPPETS = [\n  'auth',\n  'token',\n  'secret',\n  'session', // for the user_session cookie\n  'password',\n  'passwd',\n  'pwd',\n  'key',\n  'jwt',\n  'bearer',\n  'sso',\n  'saml',\n  'csrf',\n  'xsrf',\n  'credentials',\n  'sid',\n  'identity',\n  // Always treat cookie headers as sensitive in case individual key-value cookie pairs cannot properly be extracted\n  'set-cookie',\n  'cookie',\n];\n\n/**\n * Extra substrings matched only against individual Cookie / Set-Cookie **names** (not header names),\n * so we can cover common session secrets that do not match {@link SENSITIVE_KEY_SNIPPETS}\n * (e.g. `connect.sid` does not contain `session`) without false positives on arbitrary HTTP headers.\n *\n * Cookie names are checked with the same `includes()` list as headers plus these entries; omit redundant\n * cookie-only snippets that are already implied by a header match (e.g. `oauth` → `auth`, `id_token` → `token`,\n * `next-auth` → `auth`).\n */\nexport const SENSITIVE_COOKIE_NAME_SNIPPETS = [\n  // Express / Connect default session cookie\n  '.sid',\n  // Opaque session ids (PHPSESSID, ASPSESSIONID*, BIGipServer*, *sessid*, …)\n  'sessid',\n  // Laravel etc. \"remember me\" tokens\n  'remember',\n  // OIDC / OAuth auxiliary (`oauth*` covered by header snippet `auth`)\n  'oidc',\n  'pkce',\n  'nonce',\n  // RFC 6265bis high-security cookie name prefixes\n  '__secure-',\n  '__host-',\n  // Load balancer / CDN sticky-session cookies (opaque routing tokens)\n  'awsalb',\n  'awselb',\n  'akamai',\n  // BaaS / IdP session cookies (names often omit \"session\")\n  '__stripe',\n  'cognito',\n  'firebase',\n  'supabase',\n  'sb-',\n  // Step-up / MFA cookies\n  'mfa',\n  '2fa',\n];\n", "import { PII_HEADER_SNIPPETS } from './filtering-snippets';\nimport type { ResolvedDataCollection } from '../../types/datacollection';\n\n/**\n * Helper function that maps the `sendDefaultPii` boolean flag to the corresponding `DataCollection` configuration.\n * Used as a backward-compatibility bridge when `dataCollection` is not set by the user.\n *\n * TODO(v11): Remove this function along with `sendDefaultPii`. Once `dataCollection` is the only API,\n * the DEFAULTS in `resolveDataCollectionOptions` (including `userInfo: true`) will always apply.\n */\nexport function defaultPiiToCollectionOptions(sendDefaultPii?: boolean): ResolvedDataCollection {\n  return sendDefaultPii === true\n    ? {\n        userInfo: true,\n        cookies: true,\n        httpHeaders: { request: true, response: true },\n        httpBodies: ['incomingRequest', 'outgoingRequest', 'incomingResponse', 'outgoingResponse'],\n        urlQueryParams: true,\n        graphQL: { document: true, variables: true },\n        genAI: { inputs: true, outputs: true },\n        databaseQueryData: true,\n        stackFrameVariables: true,\n        frameContextLines: 7, // default should be 5, but ContextLines integration uses 7\n      }\n    : {\n        userInfo: false,\n        cookies: { deny: PII_HEADER_SNIPPETS },\n        httpHeaders: { request: { deny: PII_HEADER_SNIPPETS }, response: { deny: PII_HEADER_SNIPPETS } },\n        httpBodies: [],\n        urlQueryParams: { deny: PII_HEADER_SNIPPETS },\n        // The GraphQL document has literal values redacted at collection time, so it was historically\n        // always attached regardless of `sendDefaultPii`; keep it on to preserve that behavior.\n        graphQL: { document: true, variables: true },\n        genAI: { inputs: false, outputs: false },\n        // Database query values were only sent with `sendDefaultPii: true` (e.g. Supabase gated on it),\n        // so map the legacy \"off\" state to `false`.\n        databaseQueryData: false,\n        stackFrameVariables: true,\n        frameContextLines: 7, // default should be 5, but ContextLines integration uses 7\n      };\n}\n", "import type { DataCollection, ResolvedDataCollection } from '../../types/datacollection';\nimport { defaultPiiToCollectionOptions } from './defaultPiiToCollectionOptions';\n\nconst DEFAULTS: ResolvedDataCollection = {\n  userInfo: true,\n  cookies: true,\n  httpHeaders: { request: true, response: true },\n  httpBodies: ['incomingRequest', 'outgoingRequest', 'incomingResponse', 'outgoingResponse'],\n  urlQueryParams: true,\n  graphQL: { document: true, variables: true },\n  genAI: { inputs: true, outputs: true },\n  databaseQueryData: true,\n  stackFrameVariables: true,\n  frameContextLines: 5,\n};\n\n/**\n * Resolves the effective `DataCollection` configuration from client options.\n *\n * Precedence:\n * 1. Fields explicitly set in `dataCollection`\n * 2. If `sendDefaultPii` is set and `dataCollection` is absent, bridge via `defaultPiiToCollectionOptions`\n * 3. Spec defaults\n *\n * TODO(v11): Remove `sendDefaultPii` support and always fall through to DEFAULTS so that `userInfo: true`\n * NOTE: In v10, DEFAULTS only apply when `dataCollection` is explicitly provided.\n * When `dataCollection` is absent, the legacy `sendDefaultPii` bridge is used, which defaults to\n * `userInfo: false` to preserve backward compatibility.\n */\nexport function resolveDataCollectionOptions(options: {\n  dataCollection?: DataCollection;\n  sendDefaultPii?: boolean;\n}): ResolvedDataCollection {\n  // TODO(v11): Remove the sendDefaultPii bridge and always use DEFAULTS.\n  const base = options.dataCollection != null ? DEFAULTS : defaultPiiToCollectionOptions(options.sendDefaultPii);\n\n  const dc = options.dataCollection ?? {};\n\n  return {\n    userInfo: dc.userInfo ?? base.userInfo,\n    cookies: dc.cookies ?? base.cookies,\n    httpHeaders: {\n      request: dc.httpHeaders?.request ?? base.httpHeaders.request,\n      response: dc.httpHeaders?.response ?? base.httpHeaders.response,\n    },\n    httpBodies: dc.httpBodies ?? base.httpBodies,\n    // oxlint-disable-next-line typescript/no-deprecated\n    urlQueryParams: dc.urlQueryParams ?? dc.queryParams ?? base.urlQueryParams,\n    graphQL: {\n      document: dc.graphQL?.document ?? base.graphQL.document,\n      variables: dc.graphQL?.variables ?? base.graphQL.variables,\n    },\n    genAI: {\n      inputs: dc.genAI?.inputs ?? base.genAI.inputs,\n      outputs: dc.genAI?.outputs ?? base.genAI.outputs,\n    },\n    databaseQueryData: dc.databaseQueryData ?? base.databaseQueryData,\n    stackFrameVariables: dc.stackFrameVariables ?? base.stackFrameVariables,\n    frameContextLines: dc.frameContextLines ?? base.frameContextLines,\n  };\n}\n", "/* eslint-disable max-lines */\nimport { getEnvelopeEndpointWithUrlEncodedAuth } from './api';\nimport { DEFAULT_ENVIRONMENT } from './constants';\nimport { getCurrentScope, getIsolationScope, getTraceContextFromScope } from './currentScopes';\nimport { DEBUG_BUILD } from './debug-build';\nimport { createEventEnvelope, createSessionEnvelope } from './envelope';\nimport type { IntegrationIndex } from './integration';\nimport { afterSetupIntegrations, setupIntegration, setupIntegrations } from './integration';\nimport { _INTERNAL_flushLogsBuffer } from './logs/internal';\nimport { _INTERNAL_flushMetricsBuffer } from './metrics/internal';\nimport type { Scope } from './scope';\nimport { updateSession } from './session';\nimport { getDynamicSamplingContextFromScope } from './tracing/dynamicSamplingContext';\nimport { isStreamedBeforeSendSpanCallback } from './tracing/spans/beforeSendSpan';\nimport { extractGenAiSpansFromEvent } from './tracing/spans/extractGenAiSpans';\nimport { DEFAULT_TRANSPORT_BUFFER_SIZE } from './transports/base';\nimport type { Breadcrumb, BreadcrumbHint, FetchBreadcrumbHint, XhrBreadcrumbHint } from './types/breadcrumb';\nimport type { CheckIn, MonitorConfig } from './types/checkin';\nimport type { EventDropReason, Outcome } from './types/clientreport';\nimport type { DataCategory } from './types/datacategory';\nimport type { DsnComponents } from './types/dsn';\nimport type { DynamicSamplingContext, Envelope } from './types/envelope';\nimport type { ErrorEvent, Event, EventHint, EventType, TransactionEvent } from './types/event';\nimport type { EventProcessor } from './types/eventprocessor';\nimport type { FeedbackEvent } from './types/feedback';\nimport type { Integration } from './types/integration';\nimport type { Log } from './types/log';\nimport type { Metric } from './types/metric';\nimport type { Primitive } from './types/misc';\nimport type { ClientOptions } from './types/options';\nimport type { ParameterizedString } from './types/parameterize';\nimport type { ReplayEndEvent, ReplayStartEvent } from './types/replay';\nimport type { RequestEventData } from './types/request';\nimport type { SdkMetadata } from './types/sdkmetadata';\nimport type { Session, SessionAggregates } from './types/session';\nimport type { SeverityLevel } from './types/severity';\nimport type { Span, SpanAttributes, SpanContextData, SpanJSON, StreamedSpanJSON } from './types/span';\nimport type { StartSpanOptions } from './types/startSpanOptions';\nimport type { Transport, TransportMakeRequestResponse } from './types/transport';\nimport type { ResolvedDataCollection } from './types/datacollection';\nimport { createClientReportEnvelope } from './utils/clientreport';\nimport { debug } from './utils/debug-logger';\nimport { dsnToString, makeDsn } from './utils/dsn';\nimport { addItemToEnvelope, createAttachmentEnvelopeItem } from './utils/envelope';\nimport { getPossibleEventMessages } from './utils/eventUtils';\nimport { isObjectLike, isParameterizedString, isPlainObject, isPrimitive, isThenable } from './utils/is';\nimport { merge } from './utils/merge';\nimport { checkOrSetAlreadyCaught, uuid4 } from './utils/misc';\nimport { parseSampleRate } from './utils/parseSampleRate';\nimport { prepareEvent } from './utils/prepareEvent';\nimport { makePromiseBuffer, type PromiseBuffer, SENTRY_BUFFER_FULL_ERROR } from './utils/promisebuffer';\nimport { safeMathRandom } from './utils/randomSafeContext';\nimport { reparentChildSpans, shouldIgnoreSpan } from './utils/should-ignore-span';\nimport { showSpanDropWarning } from './utils/spanUtils';\nimport { safeUnref } from './utils/timer';\nimport { convertSpanJsonToTransactionEvent, convertTransactionEventToSpanJson } from './utils/transactionEvent';\nimport { resolveDataCollectionOptions } from './utils/data-collection/resolveDataCollectionOptions';\n\nconst ALREADY_SEEN_ERROR = \"Not capturing exception because it's already been captured.\";\nconst MISSING_RELEASE_FOR_SESSION_ERROR = 'Discarded session because of missing or non-string release';\n\nconst INTERNAL_ERROR_SYMBOL = Symbol.for('SentryInternalError');\nconst DO_NOT_SEND_EVENT_SYMBOL = Symbol.for('SentryDoNotSendEventError');\n\n// Default interval for flushing logs and metrics (5 seconds)\nconst DEFAULT_FLUSH_INTERVAL = 5000;\n\ninterface InternalError {\n  message: string;\n  [INTERNAL_ERROR_SYMBOL]: true;\n}\n\ninterface DoNotSendEventError {\n  message: string;\n  [DO_NOT_SEND_EVENT_SYMBOL]: true;\n}\n\nfunction _makeInternalError(message: string): InternalError {\n  return {\n    message,\n    [INTERNAL_ERROR_SYMBOL]: true,\n  };\n}\n\nfunction _makeDoNotSendEventError(message: string): DoNotSendEventError {\n  return {\n    message,\n    [DO_NOT_SEND_EVENT_SYMBOL]: true,\n  };\n}\n\nfunction _isInternalError(error: unknown): error is InternalError {\n  return isObjectLike(error) && INTERNAL_ERROR_SYMBOL in error;\n}\n\nfunction _isDoNotSendEventError(error: unknown): error is DoNotSendEventError {\n  return isObjectLike(error) && DO_NOT_SEND_EVENT_SYMBOL in error;\n}\n\n/**\n * Sets up weight-based flushing for logs or metrics.\n * This helper function encapsulates the common pattern of:\n * 1. Tracking accumulated weight of items\n * 2. Flushing when weight exceeds threshold (800KB)\n * 3. Flushing after timeout period from the first item\n *\n * Uses closure variables to track weight and timeout state.\n */\nfunction setupWeightBasedFlushing<\n  T,\n  AfterCaptureHook extends 'afterCaptureLog' | 'afterCaptureMetric',\n  FlushHook extends 'flushLogs' | 'flushMetrics',\n>(\n  client: Client,\n  afterCaptureHook: AfterCaptureHook,\n  flushHook: FlushHook,\n  estimateSizeFn: (item: T) => number,\n  flushFn: (client: Client) => void,\n): void {\n  // Track weight and timeout in closure variables\n  let weight = 0;\n  let flushTimeout: ReturnType<typeof setTimeout> | undefined;\n  let isTimerActive = false;\n\n  // @ts-expect-error - TypeScript can't narrow generic hook types to match specific overloads, but we know this is type-safe\n  client.on(flushHook, () => {\n    weight = 0;\n    clearTimeout(flushTimeout);\n    isTimerActive = false;\n  });\n\n  // @ts-expect-error - TypeScript can't narrow generic hook types to match specific overloads, but we know this is type-safe\n  client.on(afterCaptureHook, (item: T) => {\n    weight += estimateSizeFn(item);\n\n    // We flush the buffer if it exceeds 0.8 MB\n    // The weight is a rough estimate, so we flush way before the payload gets too big.\n    if (weight >= 800_000) {\n      flushFn(client);\n    } else if (!isTimerActive) {\n      const flushInterval = client.getOptions()._flushInterval ?? DEFAULT_FLUSH_INTERVAL;\n      if (flushInterval > 0) {\n        // Only start timer if one isn't already running.\n        // This prevents flushing being delayed by items that arrive close to the timeout limit\n        // and thus resetting the flushing timeout and delaying items being flushed.\n        isTimerActive = true;\n        // Use safeUnref so the timer doesn't prevent the process from exiting\n        flushTimeout = safeUnref(\n          setTimeout(() => {\n            flushFn(client);\n            // Note: isTimerActive is reset by the flushHook handler above, not here,\n            // to avoid race conditions when new items arrive during the flush.\n          }, flushInterval),\n        );\n      }\n    }\n  });\n\n  client.on('flush', () => {\n    flushFn(client);\n  });\n}\n\n/**\n * Base implementation for all JavaScript SDK clients.\n *\n * Call the constructor with the corresponding options\n * specific to the client subclass. To access these options later, use\n * {@link Client.getOptions}.\n *\n * If a Dsn is specified in the options, it will be parsed and stored. Use\n * {@link Client.getDsn} to retrieve the Dsn at any moment. In case the Dsn is\n * invalid, the constructor will throw a {@link SentryException}. Note that\n * without a valid Dsn, the SDK will not send any events to Sentry.\n *\n * Before sending an event, it is passed through\n * {@link Client._prepareEvent} to add SDK information and scope data\n * (breadcrumbs and context). To add more custom information, override this\n * method and extend the resulting prepared event.\n *\n * To issue automatically created events (e.g. via instrumentation), use\n * {@link Client.captureEvent}. It will prepare the event and pass it through\n * the callback lifecycle. To issue auto-breadcrumbs, use\n * {@link Client.addBreadcrumb}.\n *\n * @example\n * class NodeClient extends Client<NodeOptions> {\n *   public constructor(options: NodeOptions) {\n *     super(options);\n *   }\n *\n *   // ...\n * }\n */\nexport abstract class Client<O extends ClientOptions = ClientOptions> {\n  /** Options passed to the SDK. */\n  protected readonly _options: O;\n\n  /** The client Dsn, if specified in options. Without this Dsn, the SDK will be disabled. */\n  protected readonly _dsn?: DsnComponents;\n\n  protected readonly _transport?: Transport;\n\n  /** Array of set up integrations. */\n  protected _integrations: IntegrationIndex;\n\n  /** Number of calls being processed */\n  protected _numProcessing: number;\n\n  protected _eventProcessors: EventProcessor[];\n\n  /** Holds flushable  */\n  protected _outcomes: { [key: string]: number };\n\n  // eslint-disable-next-line @typescript-eslint/ban-types\n  protected _hooks: Record<string, Set<Function>>;\n\n  protected _promiseBuffer: PromiseBuffer<unknown>;\n\n  protected readonly _dataCollection: ResolvedDataCollection;\n\n  /**\n   * Initializes this client instance.\n   *\n   * @param options Options for the client.\n   */\n  protected constructor(options: O) {\n    this._options = options;\n    this._integrations = {};\n    this._numProcessing = 0;\n    this._outcomes = {};\n    this._hooks = {};\n    this._eventProcessors = [];\n    this._promiseBuffer = makePromiseBuffer(options.transportOptions?.bufferSize ?? DEFAULT_TRANSPORT_BUFFER_SIZE);\n    this._dataCollection = resolveDataCollectionOptions(options);\n\n    if (options.dsn) {\n      this._dsn = makeDsn(options.dsn);\n    } else {\n      DEBUG_BUILD && debug.warn('No DSN provided, client will not send events.');\n    }\n\n    if (this._dsn) {\n      const url = getEnvelopeEndpointWithUrlEncodedAuth(\n        this._dsn,\n        options.tunnel,\n        options._metadata ? options._metadata.sdk : undefined,\n      );\n      this._transport = options.transport({\n        tunnel: this._options.tunnel,\n        recordDroppedEvent: this.recordDroppedEvent.bind(this),\n        ...options.transportOptions,\n        url,\n      });\n    }\n\n    // Backfill enableLogs option from _experiments.enableLogs\n    // todo(v11): Remove the experimental flag\n    // eslint-disable-next-line typescript/no-deprecated\n    this._options.enableLogs = this._options.enableLogs ?? this._options._experiments?.enableLogs ?? true;\n\n    // Setup log flushing with weight and timeout tracking\n    if (this._options.enableLogs) {\n      setupWeightBasedFlushing(this, 'afterCaptureLog', 'flushLogs', estimateLogSizeInBytes, _INTERNAL_flushLogsBuffer);\n    }\n\n    // todo(v11): Remove the experimental flag\n    // eslint-disable-next-line typescript/no-deprecated\n    const enableMetrics = this._options.enableMetrics ?? this._options._experiments?.enableMetrics ?? true;\n\n    // Setup metric flushing with weight and timeout tracking\n    if (enableMetrics) {\n      setupWeightBasedFlushing(\n        this,\n        'afterCaptureMetric',\n        'flushMetrics',\n        estimateMetricSizeInBytes,\n        _INTERNAL_flushMetricsBuffer,\n      );\n    }\n  }\n\n  /**\n   * Captures an exception event and sends it to Sentry.\n   *\n   * Unlike `captureException` exported from every SDK, this method requires that you pass it the current scope.\n   */\n  public captureException(exception: unknown, hint?: EventHint, scope?: Scope): string {\n    const eventId = uuid4();\n\n    // ensure we haven't captured this very object before\n    if (checkOrSetAlreadyCaught(exception)) {\n      DEBUG_BUILD && debug.log(ALREADY_SEEN_ERROR);\n      return eventId;\n    }\n\n    const hintWithEventId = {\n      event_id: eventId,\n      ...hint,\n    };\n\n    this._process(\n      () =>\n        this.eventFromException(exception, hintWithEventId)\n          .then(event => this._captureEvent(event, hintWithEventId, scope))\n          .then(res => res),\n      'error',\n    );\n\n    return hintWithEventId.event_id;\n  }\n\n  /**\n   * Captures a message event and sends it to Sentry.\n   *\n   * Unlike `captureMessage` exported from every SDK, this method requires that you pass it the current scope.\n   */\n  public captureMessage(\n    message: ParameterizedString,\n    level?: SeverityLevel,\n    hint?: EventHint,\n    currentScope?: Scope,\n  ): string {\n    const hintWithEventId = {\n      event_id: uuid4(),\n      ...hint,\n    };\n\n    const eventMessage = isParameterizedString(message) ? message : String(message);\n    const isMessage = isPrimitive(message);\n    const promisedEvent = isMessage\n      ? this.eventFromMessage(eventMessage, level, hintWithEventId)\n      : this.eventFromException(message, hintWithEventId);\n\n    this._process(\n      () => promisedEvent.then(event => this._captureEvent(event, hintWithEventId, currentScope)),\n      isMessage ? 'unknown' : 'error',\n    );\n\n    return hintWithEventId.event_id;\n  }\n\n  /**\n   * Captures a manually created event and sends it to Sentry.\n   *\n   * Unlike `captureEvent` exported from every SDK, this method requires that you pass it the current scope.\n   */\n  public captureEvent(event: Event, hint?: EventHint, currentScope?: Scope): string {\n    const eventId = uuid4();\n\n    // ensure we haven't captured this very object before\n    if (hint?.originalException && checkOrSetAlreadyCaught(hint.originalException)) {\n      DEBUG_BUILD && debug.log(ALREADY_SEEN_ERROR);\n      return eventId;\n    }\n\n    const hintWithEventId = {\n      event_id: eventId,\n      ...hint,\n    };\n\n    const sdkProcessingMetadata = event.sdkProcessingMetadata || {};\n    const capturedSpanScope: Scope | undefined = sdkProcessingMetadata.capturedSpanScope;\n    const capturedSpanIsolationScope: Scope | undefined = sdkProcessingMetadata.capturedSpanIsolationScope;\n    const dataCategory = getDataCategoryByType(event.type);\n\n    this._process(\n      () => this._captureEvent(event, hintWithEventId, capturedSpanScope || currentScope, capturedSpanIsolationScope),\n      dataCategory,\n    );\n\n    return hintWithEventId.event_id;\n  }\n\n  /**\n   * Captures a session.\n   */\n  public captureSession(session: Session): void {\n    this.sendSession(session);\n    // After sending, we set init false to indicate it's not the first occurrence\n    updateSession(session, { init: false });\n  }\n\n  /**\n   * Create a cron monitor check in and send it to Sentry. This method is not available on all clients.\n   *\n   * @param checkIn An object that describes a check in.\n   * @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want\n   * to create a monitor automatically when sending a check in.\n   * @param scope An optional scope containing event metadata.\n   * @returns A string representing the id of the check in.\n   */\n  public captureCheckIn?(checkIn: CheckIn, monitorConfig?: MonitorConfig, scope?: Scope): string;\n\n  /**\n   * Get the current Dsn.\n   */\n  public getDsn(): DsnComponents | undefined {\n    return this._dsn;\n  }\n\n  /**\n   * Get the current options.\n   */\n  public getOptions(): O {\n    return this._options;\n  }\n\n  /**\n   * Get the resolved data collection configuration.\n   */\n  public getDataCollectionOptions(): ResolvedDataCollection {\n    return this._dataCollection;\n  }\n\n  /**\n   * Get the SDK metadata.\n   * @see SdkMetadata\n   */\n  public getSdkMetadata(): SdkMetadata | undefined {\n    return this._options._metadata;\n  }\n\n  /**\n   * Returns the transport that is used by the client.\n   * Please note that the transport gets lazy initialized so it will only be there once the first event has been sent.\n   */\n  public getTransport(): Transport | undefined {\n    return this._transport;\n  }\n\n  /**\n   * Wait for all events to be sent or the timeout to expire, whichever comes first.\n   *\n   * @param timeout Maximum time in ms the client should wait for events to be flushed. Omitting this parameter will\n   *   cause the client to wait until all events are sent before resolving the promise.\n   * @returns A promise that will resolve with `true` if all events are sent before the timeout, or `false` if there are\n   * still events in the queue when the timeout is reached.\n   */\n  // @ts-expect-error - PromiseLike is a subset of Promise\n  public async flush(timeout?: number): PromiseLike<boolean> {\n    const transport = this._transport;\n\n    // Emit `flush` unconditionally so weight-based log/metric flushers drain\n    // their buffers and clear their idle timers, even when no transport is\n    // configured (e.g. no DSN).\n    this.emit('flush');\n\n    if (!transport) {\n      return true;\n    }\n\n    const clientFinished = await this._isClientDoneProcessing(timeout);\n    const transportFlushed = await transport.flush(timeout);\n\n    return clientFinished && transportFlushed;\n  }\n\n  /**\n   * Flush the event queue and set the client to `enabled = false`. See {@link Client.flush}.\n   *\n   * @param {number} timeout Maximum time in ms the client should wait before shutting down. Omitting this parameter will cause\n   *   the client to wait until all events are sent before disabling itself.\n   * @returns {Promise<boolean>} A promise which resolves to `true` if the flush completes successfully before the timeout, or `false` if\n   * it doesn't.\n   */\n  // @ts-expect-error - PromiseLike is a subset of Promise\n  public async close(timeout?: number): PromiseLike<boolean> {\n    const result = await this.flush(timeout);\n    this.getOptions().enabled = false;\n    this.emit('close');\n    return result;\n  }\n\n  /**\n   * Get all installed event processors.\n   */\n  public getEventProcessors(): EventProcessor[] {\n    return this._eventProcessors;\n  }\n\n  /**\n   * Adds an event processor that applies to any event processed by this client.\n   */\n  public addEventProcessor(eventProcessor: EventProcessor): void {\n    this._eventProcessors.push(eventProcessor);\n  }\n\n  /**\n   * Initialize this client.\n   * Call this after the client was set on a scope.\n   */\n  public init(): void {\n    if (\n      this._isEnabled() ||\n      // Force integrations to be setup even if no DSN was set when we have\n      // Spotlight enabled. This is particularly important for browser as we\n      // don't support the `spotlight` option there and rely on the users\n      // adding the `spotlightBrowserIntegration()` to their integrations which\n      // wouldn't get initialized with the check below when there's no DSN set.\n      this._options.integrations.some(({ name }) => name.startsWith('Spotlight'))\n    ) {\n      this._setupIntegrations();\n    }\n  }\n\n  /**\n   * Gets an installed integration by its name.\n   *\n   * @returns {Integration|undefined} The installed integration or `undefined` if no integration with that `name` was installed.\n   */\n  public getIntegrationByName<T extends Integration = Integration>(integrationName: string): T | undefined {\n    return this._integrations[integrationName] as T | undefined;\n  }\n\n  /**\n   * Returns the names of all installed integrations.\n   */\n  public getIntegrationNames(): string[] {\n    return Object.keys(this._integrations);\n  }\n\n  /**\n   * Add an integration to the client.\n   * This can be used to e.g. lazy load integrations.\n   * In most cases, this should not be necessary,\n   * and you're better off just passing the integrations via `integrations: []` at initialization time.\n   * However, if you find the need to conditionally load & add an integration, you can use `addIntegration` to do so.\n   */\n  public addIntegration(integration: Integration): void {\n    const isAlreadyInstalled = this._integrations[integration.name];\n\n    if (!isAlreadyInstalled && integration.beforeSetup) {\n      integration.beforeSetup(this);\n    }\n\n    // This hook takes care of only installing if not already installed\n    setupIntegration(this, integration, this._integrations);\n    // Here we need to check manually to make sure to not run this multiple times\n    if (!isAlreadyInstalled) {\n      afterSetupIntegrations(this, [integration]);\n    }\n  }\n\n  /**\n   * Send a fully prepared event to Sentry.\n   */\n  public sendEvent(event: Event, hint: EventHint = {}): void {\n    this.emit('beforeSendEvent', event, hint);\n\n    // Extract gen_ai spans from transaction and convert to span v2 format.\n    // This mutates event.spans to remove the extracted spans.\n    const genAiSpanItem = extractGenAiSpansFromEvent(event, this);\n\n    let env = createEventEnvelope(event, this._dsn, this._options._metadata, this._options.tunnel);\n\n    for (const attachment of hint.attachments || []) {\n      env = addItemToEnvelope(env, createAttachmentEnvelopeItem(attachment));\n    }\n\n    if (genAiSpanItem) {\n      env = addItemToEnvelope(env, genAiSpanItem);\n    }\n\n    // sendEnvelope should not throw\n    // eslint-disable-next-line @typescript-eslint/no-floating-promises\n    this.sendEnvelope(env).then(sendResponse => this.emit('afterSendEvent', event, sendResponse));\n  }\n\n  /**\n   * Send a session or session aggregrates to Sentry.\n   */\n  public sendSession(session: Session | SessionAggregates): void {\n    // Backfill release and environment on session\n    const { release: clientReleaseOption, environment: clientEnvironmentOption = DEFAULT_ENVIRONMENT } = this._options;\n    if ('aggregates' in session) {\n      const sessionAttrs = session.attrs || {};\n      if (!sessionAttrs.release && !clientReleaseOption) {\n        DEBUG_BUILD && debug.warn(MISSING_RELEASE_FOR_SESSION_ERROR);\n        return;\n      }\n      sessionAttrs.release = sessionAttrs.release || clientReleaseOption;\n      sessionAttrs.environment = sessionAttrs.environment || clientEnvironmentOption;\n      session.attrs = sessionAttrs;\n    } else {\n      if (!session.release && !clientReleaseOption) {\n        DEBUG_BUILD && debug.warn(MISSING_RELEASE_FOR_SESSION_ERROR);\n        return;\n      }\n      session.release = session.release || clientReleaseOption;\n      session.environment = session.environment || clientEnvironmentOption;\n    }\n\n    this.emit('beforeSendSession', session);\n\n    const env = createSessionEnvelope(session, this._dsn, this._options._metadata, this._options.tunnel);\n\n    // sendEnvelope should not throw\n    // eslint-disable-next-line @typescript-eslint/no-floating-promises\n    this.sendEnvelope(env);\n  }\n\n  /**\n   * Record on the client that an event got dropped (ie, an event that will not be sent to Sentry).\n   */\n  public recordDroppedEvent(reason: EventDropReason, category: DataCategory, count: number = 1): void {\n    if (this._options.sendClientReports) {\n      // We want to track each category (error, transaction, session, replay_event) separately\n      // but still keep the distinction between different type of outcomes.\n      // We could use nested maps, but it's much easier to read and type this way.\n      // A correct type for map-based implementation if we want to go that route\n      // would be `Partial<Record<SentryRequestType, Partial<Record<Outcome, number>>>>`\n      // With typescript 4.1 we could even use template literal types\n      const key = `${reason}:${category}`;\n      DEBUG_BUILD && debug.log(`Recording outcome: \"${key}\"${count > 1 ? ` (${count} times)` : ''}`);\n      this._outcomes[key] = (this._outcomes[key] || 0) + count;\n    }\n  }\n\n  /* eslint-disable @typescript-eslint/unified-signatures */\n  /**\n   * Register a callback for whenever a span is started.\n   * Receives the span as argument.\n   * @returns {() => void} A function that, when executed, removes the registered callback.\n   */\n  public on(hook: 'spanStart', callback: (span: Span) => void): () => void;\n\n  /**\n   * Register a callback before span sampling runs. Receives a `samplingDecision` object argument with a `decision`\n   * property that can be used to make a sampling decision that will be enforced, before any span sampling runs.\n   * @returns {() => void} A function that, when executed, removes the registered callback.\n   */\n  public on(\n    hook: 'beforeSampling',\n    callback: (\n      samplingData: {\n        spanAttributes: SpanAttributes;\n        spanName: string;\n        parentSampled?: boolean;\n        parentSampleRate?: number;\n        parentContext?: SpanContextData;\n      },\n      samplingDecision: { decision: boolean },\n    ) => void,\n  ): void;\n\n  /**\n   * Register a callback for after a span is ended.\n   * NOTE: The span cannot be mutated anymore in this callback.\n   * Receives the span as argument.\n   * @returns {() => void} A function that, when executed, removes the registered callback.\n   */\n  public on(hook: 'spanEnd', callback: (span: Span) => void): () => void;\n\n  /**\n   * Register a callback for after a span is ended and the `spanEnd` hook has run.\n   * NOTE: The span cannot be mutated anymore in this callback.\n   */\n  public on(hook: 'afterSpanEnd', callback: (immutableSegmentSpan: Readonly<Span>) => void): () => void;\n\n  /**\n   * Register a callback for after a segment span is ended and the `segmentSpanEnd` hook has run.\n   * NOTE: The segment span cannot be mutated anymore in this callback.\n   */\n  public on(hook: 'afterSegmentSpanEnd', callback: (immutableSegmentSpan: Readonly<Span>) => void): () => void;\n\n  /**\n   * Register a callback to preprocess a span JSON _before_ it is passed to the `processSpan` and\n   * `processSegmentSpan` hooks. Use this to backfill data that subsequent hooks rely on.\n   * The optional `hint` exposes additional context about the originating span (e.g. the OTel `spanKind`).\n   */\n  public on(\n    hook: 'preprocessSpan',\n    callback: (streamedSpanJSON: StreamedSpanJSON, hint?: { spanKind?: number }) => void,\n  ): () => void;\n\n  /**\n   * Register a callback for when a span JSON is processed, to add some data to the span JSON.\n   */\n  public on(hook: 'processSpan', callback: (streamedSpanJSON: StreamedSpanJSON) => void): () => void;\n\n  /**\n   * Register a callback for when a segment span JSON is processed, to add some data to the segment span JSON.\n   */\n  public on(hook: 'processSegmentSpan', callback: (streamedSpanJSON: StreamedSpanJSON) => void): () => void;\n\n  /**\n   * Register a callback for when an idle span is allowed to auto-finish.\n   * @returns {() => void} A function that, when executed, removes the registered callback.\n   */\n  public on(hook: 'idleSpanEnableAutoFinish', callback: (span: Span) => void): () => void;\n\n  /**\n   * Register a callback for transaction start and finish.\n   * @returns {() => void} A function that, when executed, removes the registered callback.\n   */\n  public on(hook: 'beforeEnvelope', callback: (envelope: Envelope) => void): () => void;\n\n  /**\n   * Register a callback that runs when stack frame metadata should be applied to an event.\n   * @returns {() => void} A function that, when executed, removes the registered callback.\n   */\n  public on(hook: 'applyFrameMetadata', callback: (event: Event) => void): () => void;\n\n  /**\n   * Register a callback for before sending an event.\n   * This is called right before an event is sent and should not be used to mutate the event.\n   * Receives an Event & EventHint as arguments.\n   * @returns {() => void} A function that, when executed, removes the registered callback.\n   */\n  public on(hook: 'beforeSendEvent', callback: (event: Event, hint?: EventHint | undefined) => void): () => void;\n\n  /**\n   * Register a callback for before sending a session or session aggregrates..\n   * Receives the session/aggregate as second argument.\n   * @returns {() => void} A function that, when executed, removes the registered callback.\n   */\n  public on(hook: 'beforeSendSession', callback: (session: Session | SessionAggregates) => void): () => void;\n\n  /**\n   * Register a callback for preprocessing an event,\n   * before it is passed to (global) event processors.\n   * Receives an Event & EventHint as arguments.\n   * @returns {() => void} A function that, when executed, removes the registered callback.\n   */\n  public on(hook: 'preprocessEvent', callback: (event: Event, hint?: EventHint | undefined) => void): () => void;\n\n  /**\n   * Register a callback for postprocessing an event,\n   * after it was passed to (global) event processors, before it is being sent.\n   * Receives an Event & EventHint as arguments.\n   * @returns {() => void} A function that, when executed, removes the registered callback.\n   */\n  public on(hook: 'postprocessEvent', callback: (event: Event, hint?: EventHint | undefined) => void): () => void;\n\n  /**\n   * Register a callback for when an event has been sent.\n   * @returns {() => void} A function that, when executed, removes the registered callback.\n   */\n  public on(\n    hook: 'afterSendEvent',\n    callback: (event: Event, sendResponse: TransportMakeRequestResponse) => void,\n  ): () => void;\n\n  /**\n   * Register a callback before a breadcrumb is added.\n   * @returns {() => void} A function that, when executed, removes the registered callback.\n   */\n  public on(hook: 'beforeAddBreadcrumb', callback: (breadcrumb: Breadcrumb, hint?: BreadcrumbHint) => void): () => void;\n\n  /**\n   * Register a callback when a DSC (Dynamic Sampling Context) is created.\n   * @returns {() => void} A function that, when executed, removes the registered callback.\n   */\n  public on(hook: 'createDsc', callback: (dsc: DynamicSamplingContext, rootSpan?: Span) => void): () => void;\n\n  /**\n   * Register a callback when a Feedback event has been prepared.\n   * This should be used to mutate the event. The options argument can hint\n   * about what kind of mutation it expects.\n   * @returns {() => void} A function that, when executed, removes the registered callback.\n   */\n  public on(\n    hook: 'beforeSendFeedback',\n    callback: (feedback: FeedbackEvent, options?: { includeReplay?: boolean }) => void,\n  ): () => void;\n\n  /**\n   * Register a callback when the feedback widget is opened in a user's browser\n   */\n  public on(hook: 'openFeedbackWidget', callback: () => void): () => void;\n\n  /**\n   * A hook that is called when a replay session starts recording (either session or buffer mode).\n   * @returns {() => void} A function that, when executed, removes the registered callback.\n   */\n  public on(hook: 'replayStart', callback: (event: ReplayStartEvent) => void): () => void;\n\n  /**\n   * A hook that is called when a replay session stops recording, either manually or due to an\n   * internal condition such as `maxReplayDuration` expiry, send failure, or mutation limit.\n   * @returns {() => void} A function that, when executed, removes the registered callback.\n   */\n  public on(hook: 'replayEnd', callback: (event: ReplayEndEvent) => void): () => void;\n\n  /**\n   * A hook for the browser tracing integrations to trigger a span start for a page load.\n   * @returns {() => void} A function that, when executed, removes the registered callback.\n   */\n  public on(\n    hook: 'startPageLoadSpan',\n    callback: (\n      options: StartSpanOptions,\n      traceOptions?: { sentryTrace?: string | undefined; baggage?: string | undefined },\n    ) => void,\n  ): () => void;\n\n  /**\n   * A hook for the browser tracing integrations to trigger the end of a page load span.\n   * @returns {() => void} A function that, when executed, removes the registered callback.\n   */\n  public on(hook: 'endPageloadSpan', callback: () => void): () => void;\n\n  /**\n   * A hook for the browser tracing integrations to trigger after the pageload span was started.\n   * @returns {() => void} A function that, when executed, removes the registered callback.\n   */\n  public on(hook: 'afterStartPageLoadSpan', callback: (span: Span) => void): () => void;\n\n  /**\n   * A hook for triggering right before a navigation span is started.\n   * @returns {() => void} A function that, when executed, removes the registered callback.\n   */\n  public on(\n    hook: 'beforeStartNavigationSpan',\n    callback: (options: StartSpanOptions, navigationOptions?: { isRedirect?: boolean; url?: string }) => void,\n  ): () => void;\n\n  /**\n   * A hook for browser tracing integrations to trigger a span for a navigation.\n   * @returns {() => void} A function that, when executed, removes the registered callback.\n   */\n  public on(\n    hook: 'startNavigationSpan',\n    callback: (options: StartSpanOptions, navigationOptions?: { isRedirect?: boolean; url?: string }) => void,\n  ): () => void;\n\n  /**\n   * A hook for GraphQL client integration to enhance a span with request data.\n   * @returns A function that, when executed, removes the registered callback.\n   */\n  public on(\n    hook: 'beforeOutgoingRequestSpan',\n    callback: (span: Span, hint: XhrBreadcrumbHint | FetchBreadcrumbHint) => void,\n  ): () => void;\n\n  /**\n   * A hook for GraphQL client integration to enhance a breadcrumb with request data.\n   * @returns A function that, when executed, removes the registered callback.\n   */\n  public on(\n    hook: 'beforeOutgoingRequestBreadcrumb',\n    callback: (breadcrumb: Breadcrumb, hint: XhrBreadcrumbHint | FetchBreadcrumbHint) => void,\n  ): () => void;\n\n  /**\n   * A hook that is called when the client is flushing\n   * @returns {() => void} A function that, when executed, removes the registered callback.\n   */\n  public on(hook: 'flush', callback: () => void): () => void;\n\n  /**\n   * A hook that is called when the client is closing\n   * @returns {() => void} A function that, when executed, removes the registered callback.\n   */\n  public on(hook: 'close', callback: () => void): () => void;\n\n  /**\n   * A hook that is called before a log is captured. This hooks runs before `beforeSendLog` is fired.\n   *\n   * @returns {() => void} A function that, when executed, removes the registered callback.\n   */\n  public on(hook: 'beforeCaptureLog', callback: (log: Log) => void): () => void;\n\n  /**\n   * A hook that is called after a log is captured\n   *\n   * @returns {() => void} A function that, when executed, removes the registered callback.\n   */\n  public on(hook: 'afterCaptureLog', callback: (log: Log) => void): () => void;\n\n  /**\n   * A hook that is called when the client is flushing logs\n   *\n   * @returns {() => void} A function that, when executed, removes the registered callback.\n   */\n  public on(hook: 'flushLogs', callback: () => void): () => void;\n\n  /**\n   * A hook that is called after capturing a metric. This hooks runs after `beforeSendMetric` is fired.\n   *\n   * @returns {() => void} A function that, when executed, removes the registered callback.\n   */\n  public on(hook: 'afterCaptureMetric', callback: (metric: Metric) => void): () => void;\n\n  /**\n   * A hook that is called when the client is flushing metrics\n   *\n   * @returns {() => void} A function that, when executed, removes the registered callback.\n   */\n  public on(hook: 'flushMetrics', callback: () => void): () => void;\n\n  /**\n   * A hook that is called when a metric is processed before it is captured and before the `beforeSendMetric` callback is fired.\n   *\n   * @returns {() => void} A function that, when executed, removes the registered callback.\n   */\n  public on(hook: 'processMetric', callback: (metric: Metric) => void): () => void;\n\n  /**\n   * A hook that is called when a http server request is started.\n   * This hook is called after request isolation, but before the request is processed.\n   *\n   * @returns {() => void} A function that, when executed, removes the registered callback.\n   */\n  public on(\n    hook: 'httpServerRequest',\n    callback: (request: unknown, response: unknown, normalizedRequest: RequestEventData) => void,\n  ): () => void;\n\n  /**\n   * A hook that is called when the UI Profiler should start profiling.\n   *\n   * This hook is called when running `Sentry.uiProfiler.startProfiler()`.\n   *\n   * @returns {() => void} A function that, when executed, removes the registered callback.\n   */\n  public on(hook: 'startUIProfiler', callback: () => void): () => void;\n\n  /**\n   * A hook that is called when the UI Profiler should stop profiling.\n   *\n   * This hook is called when running `Sentry.uiProfiler.stopProfiler()`.\n   *\n   * @returns {() => void} A function that, when executed, removes the registered callback.\n   */\n  public on(hook: 'stopUIProfiler', callback: () => void): () => void;\n\n  /**\n   * Register a hook on this client.\n   */\n  public on(hook: string, callback: unknown): () => void {\n    const hookCallbacks = (this._hooks[hook] = this._hooks[hook] || new Set());\n\n    // Wrap the callback in a function so that registering the same callback instance multiple\n    // times results in the callback being called multiple times.\n    // @ts-expect-error - The `callback` type is correct and must be a function due to the\n    // individual, specific overloads of this function.\n    // eslint-disable-next-line @typescript-eslint/ban-types\n    const uniqueCallback: Function = (...args: unknown[]) => callback(...args);\n\n    hookCallbacks.add(uniqueCallback);\n\n    // This function returns a callback execution handler that, when invoked,\n    // deregisters a callback. This is crucial for managing instances where callbacks\n    // need to be unregistered to prevent self-referencing in callback closures,\n    // ensuring proper garbage collection.\n    return () => {\n      hookCallbacks.delete(uniqueCallback);\n    };\n  }\n\n  /** Fire a hook whenever a span starts. */\n  public emit(hook: 'spanStart', span: Span): void;\n\n  /** A hook that is called every time before a span is sampled. */\n  public emit(\n    hook: 'beforeSampling',\n    samplingData: {\n      spanAttributes: SpanAttributes;\n      spanName: string;\n      parentSampled?: boolean;\n      parentSampleRate?: number;\n      parentContext?: SpanContextData;\n    },\n    samplingDecision: { decision: boolean },\n  ): void;\n\n  /** Fire a hook whenever a span ends. */\n  public emit(hook: 'spanEnd', span: Span): void;\n\n  /**\n   * Fire a hook event after a span ends and the `spanEnd` hook has run.\n   */\n  public emit(hook: 'afterSpanEnd', immutableSpan: Readonly<Span>): void;\n\n  /**\n   * Fire a hook event after a segment span ends and the `spanEnd` hook has run.\n   */\n  public emit(hook: 'afterSegmentSpanEnd', immutableSegmentSpan: Readonly<Span>): void;\n\n  /**\n   * Fire a hook event to preprocess a span JSON before the `processSpan` and `processSegmentSpan` hooks run.\n   */\n  public emit(hook: 'preprocessSpan', streamedSpanJSON: StreamedSpanJSON, hint?: { spanKind?: number }): void;\n\n  /**\n   * Fire a hook event when a span JSON is processed, to add some data to the span JSON.\n   */\n  public emit(hook: 'processSpan', streamedSpanJSON: StreamedSpanJSON): void;\n\n  /**\n   * Fire a hook event for when a segment span JSON is processed, to add some data to the segment span JSON.\n   */\n  public emit(hook: 'processSegmentSpan', streamedSpanJSON: StreamedSpanJSON): void;\n\n  /**\n   * Fire a hook indicating that an idle span is allowed to auto finish.\n   */\n  public emit(hook: 'idleSpanEnableAutoFinish', span: Span): void;\n\n  /**\n   * Fire a hook event for envelope creation and sending. Expects to be given an envelope as the\n   * second argument.\n   */\n  public emit(hook: 'beforeEnvelope', envelope: Envelope): void;\n\n  /**\n   * Fire a hook indicating that stack frame metadata should be applied to the event passed to the hook.\n   */\n  public emit(hook: 'applyFrameMetadata', event: Event): void;\n\n  /**\n   * Fire a hook event before sending an event.\n   * This is called right before an event is sent and should not be used to mutate the event.\n   * Expects to be given an Event & EventHint as the second/third argument.\n   */\n  public emit(hook: 'beforeSendEvent', event: Event, hint?: EventHint): void;\n\n  /**\n   * Fire a hook event before sending a session/aggregates.\n   * Expects to be given the prepared session/aggregates as second argument.\n   */\n  public emit(hook: 'beforeSendSession', session: Session | SessionAggregates): void;\n\n  /**\n   * Fire a hook event to process events before they are passed to (global) event processors.\n   * Expects to be given an Event & EventHint as the second/third argument.\n   */\n  public emit(hook: 'preprocessEvent', event: Event, hint?: EventHint): void;\n\n  /**\n   * Fire a hook event to process a user on an event before it is sent to Sentry, after all other processors have run.\n   * Expects to be given an Event & EventHint as the second/third argument.\n   */\n  public emit(hook: 'postprocessEvent', event: Event, hint?: EventHint): void;\n\n  /**\n   * Fire a hook event after sending an event. Expects to be given an Event as the\n   * second argument.\n   */\n  public emit(hook: 'afterSendEvent', event: Event, sendResponse: TransportMakeRequestResponse): void;\n\n  /**\n   * Fire a hook for when a breadcrumb is added. Expects the breadcrumb as second argument.\n   */\n  public emit(hook: 'beforeAddBreadcrumb', breadcrumb: Breadcrumb, hint?: BreadcrumbHint): void;\n\n  /**\n   * Fire a hook for when a DSC (Dynamic Sampling Context) is created. Expects the DSC as second argument.\n   */\n  public emit(hook: 'createDsc', dsc: DynamicSamplingContext, rootSpan?: Span): void;\n\n  /**\n   * Fire a hook event for after preparing a feedback event. Events to be given\n   * a feedback event as the second argument, and an optional options object as\n   * third argument.\n   */\n  public emit(hook: 'beforeSendFeedback', feedback: FeedbackEvent, options?: { includeReplay?: boolean }): void;\n\n  /**\n   * Fire a hook event for when the feedback widget is opened in a user's browser\n   */\n  public emit(hook: 'openFeedbackWidget'): void;\n\n  /**\n   * Fire a hook event when a replay session starts recording.\n   */\n  public emit(hook: 'replayStart', event: ReplayStartEvent): void;\n\n  /**\n   * Fire a hook event when a replay session stops recording.\n   */\n  public emit(hook: 'replayEnd', event: ReplayEndEvent): void;\n\n  /**\n   * Emit a hook event for browser tracing integrations to trigger a span start for a page load.\n   */\n  public emit(\n    hook: 'startPageLoadSpan',\n    options: StartSpanOptions,\n    traceOptions?: { sentryTrace?: string | undefined; baggage?: string | undefined },\n  ): void;\n\n  /**\n   * Emit a hook event for browser tracing integrations to trigger the end of a page load span.\n   */\n  public emit(hook: 'endPageloadSpan'): void;\n\n  /**\n   * Emit a hook event for browser tracing integrations to trigger after the pageload span was started.\n   */\n  public emit(hook: 'afterStartPageLoadSpan', span: Span): void;\n\n  /**\n   * Emit a hook event for triggering right before a navigation span is started.\n   */\n  public emit(\n    hook: 'beforeStartNavigationSpan',\n    options: StartSpanOptions,\n    navigationOptions?: { isRedirect?: boolean; url?: string },\n  ): void;\n\n  /**\n   * Emit a hook event for browser tracing integrations to trigger a span for a navigation.\n   */\n  public emit(\n    hook: 'startNavigationSpan',\n    options: StartSpanOptions,\n    navigationOptions?: { isRedirect?: boolean; url?: string },\n  ): void;\n\n  /**\n   * Emit a hook event for GraphQL client integration to enhance a span with request data.\n   */\n  public emit(hook: 'beforeOutgoingRequestSpan', span: Span, hint: XhrBreadcrumbHint | FetchBreadcrumbHint): void;\n\n  /**\n   * Emit a hook event for GraphQL client integration to enhance a breadcrumb with request data.\n   */\n  public emit(\n    hook: 'beforeOutgoingRequestBreadcrumb',\n    breadcrumb: Breadcrumb,\n    hint: XhrBreadcrumbHint | FetchBreadcrumbHint,\n  ): void;\n\n  /**\n   * Emit a hook event for client flush\n   */\n  public emit(hook: 'flush'): void;\n\n  /**\n   * Emit a hook event for client close\n   */\n  public emit(hook: 'close'): void;\n\n  /**\n   * Emit a hook event for client before capturing a log. This hooks runs before `beforeSendLog` is fired.\n   */\n  public emit(hook: 'beforeCaptureLog', log: Log): void;\n\n  /**\n   * Emit a hook event for client after capturing a log.\n   */\n  public emit(hook: 'afterCaptureLog', log: Log): void;\n\n  /**\n   * Emit a hook event for client flush logs\n   */\n  public emit(hook: 'flushLogs'): void;\n\n  /**\n   * Emit a hook event for client after capturing a metric.\n   */\n  public emit(hook: 'afterCaptureMetric', metric: Metric): void;\n\n  /**\n   * Emit a hook event for client flush metrics\n   */\n  public emit(hook: 'flushMetrics'): void;\n\n  /**\n   *\n   * Emit a hook event for client to process a metric before it is captured.\n   * This hook is called before the `beforeSendMetric` callback is fired.\n   */\n  public emit(hook: 'processMetric', metric: Metric): void;\n\n  /**\n   * Emit a hook event for client when a http server request is started.\n   * This hook is called after request isolation, but before the request is processed.\n   */\n  public emit(\n    hook: 'httpServerRequest',\n    request: unknown,\n    response: unknown,\n    normalizedRequest: RequestEventData,\n  ): void;\n\n  /**\n   * Emit a hook event for starting the UI Profiler.\n   */\n  public emit(hook: 'startUIProfiler'): void;\n\n  /**\n   * Emit a hook event for stopping the UI Profiler.\n   */\n  public emit(hook: 'stopUIProfiler'): void;\n\n  /**\n   * Emit a hook that was previously registered via `on()`.\n   */\n  public emit(hook: string, ...rest: unknown[]): void {\n    const callbacks = this._hooks[hook];\n    if (callbacks) {\n      callbacks.forEach(callback => callback(...rest));\n    }\n  }\n\n  /**\n   * Send an envelope to Sentry.\n   */\n  // @ts-expect-error - PromiseLike is a subset of Promise\n  public async sendEnvelope(envelope: Envelope): PromiseLike<TransportMakeRequestResponse> {\n    this.emit('beforeEnvelope', envelope);\n\n    if (this._isEnabled() && this._transport) {\n      try {\n        return await this._transport.send(envelope);\n      } catch (reason) {\n        DEBUG_BUILD && debug.error('Error while sending envelope:', reason);\n        return {};\n      }\n    }\n\n    DEBUG_BUILD && debug.error('Transport disabled');\n    return {};\n  }\n\n  /**\n   * Register a cleanup function to be called when the client is disposed.\n   * This is useful for integrations that need to clean up global state.\n   *\n   * NOTE: This is a no-op in the base `Client` class. Subclasses like `ServerRuntimeClient`\n   * override this method to actually register and execute cleanup callbacks.\n   */\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  public registerCleanup(callback: () => void): void {\n    // No-op in base class - subclasses override to implement cleanup registration\n  }\n\n  /**\n   * Disposes of the client and releases all resources.\n   *\n   * Subclasses should override this method to clean up their own resources, including invoking\n   * any callbacks registered via {@link Client.registerCleanup}. The base implementation is a\n   * no-op and does NOT execute registered cleanup callbacks.\n   *\n   * After calling dispose(), the client should not be used anymore.\n   */\n  public dispose(): void {\n    // Base class has no cleanup logic - subclasses implement their own\n  }\n\n  /* eslint-enable @typescript-eslint/unified-signatures */\n\n  /** Setup integrations for this client. */\n  protected _setupIntegrations(): void {\n    const { integrations } = this._options;\n    this._integrations = setupIntegrations(this, integrations);\n    afterSetupIntegrations(this, integrations);\n  }\n\n  /** Updates existing session based on the provided event */\n  protected _updateSessionFromEvent(session: Session, event: Event): void {\n    // initially, set `crashed` based on the event level and update from exceptions if there are any later on\n    let crashed = event.level === 'fatal';\n    let errored = false;\n    const exceptions = event.exception?.values;\n\n    if (exceptions) {\n      errored = true;\n      // reset crashed to false if there are exceptions, to ensure `mechanism.handled` is respected.\n      crashed = false;\n\n      for (const ex of exceptions) {\n        if (ex.mechanism?.handled === false) {\n          crashed = true;\n          break;\n        }\n      }\n    }\n\n    // A session is updated and that session update is sent in only one of the two following scenarios:\n    // 1. Session with non terminal status and 0 errors + an error occurred -> Will set error count to 1 and send update\n    // 2. Session with non terminal status and 1 error + a crash occurred -> Will set status crashed and send update\n    const sessionNonTerminal = session.status === 'ok';\n    const shouldUpdateAndSend = (sessionNonTerminal && session.errors === 0) || (sessionNonTerminal && crashed);\n\n    if (shouldUpdateAndSend) {\n      updateSession(session, {\n        ...(crashed && { status: 'crashed' }),\n        errors: session.errors || Number(errored || crashed),\n      });\n      this.captureSession(session);\n    }\n  }\n\n  /**\n   * Determine if the client is finished processing. Returns a promise because it will wait `timeout` ms before saying\n   * \"no\" (resolving to `false`) in order to give the client a chance to potentially finish first.\n   *\n   * @param timeout The time, in ms, after which to resolve to `false` if the client is still busy. Passing `0` (or not\n   * passing anything) will make the promise wait as long as it takes for processing to finish before resolving to\n   * `true`.\n   * @returns A promise which will resolve to `true` if processing is already done or finishes before the timeout, and\n   * `false` otherwise\n   */\n  protected async _isClientDoneProcessing(timeout?: number): Promise<boolean> {\n    let ticked = 0;\n\n    while (!timeout || ticked < timeout) {\n      await new Promise(resolve => setTimeout(resolve, 1));\n\n      if (!this._numProcessing) {\n        return true;\n      }\n      ticked++;\n    }\n\n    return false;\n  }\n\n  /** Determines whether this SDK is enabled and a transport is present. */\n  protected _isEnabled(): boolean {\n    return this.getOptions().enabled !== false && this._transport !== undefined;\n  }\n\n  /**\n   * Adds common information to events.\n   *\n   * The information includes release and environment from `options`,\n   * breadcrumbs and context (extra, tags and user) from the scope.\n   *\n   * Information that is already present in the event is never overwritten. For\n   * nested objects, such as the context, keys are merged.\n   *\n   * @param event The original event.\n   * @param hint May contain additional information about the original exception.\n   * @param currentScope A scope containing event metadata.\n   * @returns A new event with more information.\n   */\n  protected _prepareEvent(\n    event: Event,\n    hint: EventHint,\n    currentScope: Scope,\n    isolationScope: Scope,\n  ): PromiseLike<Event | null> {\n    const options = this.getOptions();\n    const integrations = this.getIntegrationNames();\n    if (!hint.integrations && integrations.length) {\n      hint.integrations = integrations;\n    }\n\n    this.emit('preprocessEvent', event, hint);\n\n    if (!event.type) {\n      isolationScope.setLastEventId(event.event_id || hint.event_id);\n    }\n\n    return prepareEvent(options, event, hint, currentScope, this, isolationScope).then(evt => {\n      if (evt === null) {\n        return evt;\n      }\n\n      this.emit('postprocessEvent', evt, hint);\n\n      evt.contexts = {\n        trace: { ...evt.contexts?.trace, ...getTraceContextFromScope(currentScope) },\n        ...evt.contexts,\n      };\n\n      const dynamicSamplingContext = getDynamicSamplingContextFromScope(this, currentScope);\n\n      evt.sdkProcessingMetadata = {\n        dynamicSamplingContext,\n        ...evt.sdkProcessingMetadata,\n      };\n\n      return evt;\n    });\n  }\n\n  /**\n   * Processes the event and logs an error in case of rejection\n   * @param event\n   * @param hint\n   * @param scope\n   */\n  protected _captureEvent(\n    event: Event,\n    hint: EventHint = {},\n    currentScope = getCurrentScope(),\n    isolationScope = getIsolationScope(),\n  ): PromiseLike<string | undefined> {\n    if (DEBUG_BUILD && isErrorEvent(event)) {\n      debug.log(`Captured error event \\`${getPossibleEventMessages(event)[0] || '<unknown>'}\\``);\n    }\n\n    return this._processEvent(event, hint, currentScope, isolationScope).then(\n      finalEvent => {\n        return finalEvent.event_id;\n      },\n      reason => {\n        if (DEBUG_BUILD) {\n          if (_isDoNotSendEventError(reason)) {\n            debug.log(reason.message);\n          } else if (_isInternalError(reason)) {\n            debug.warn(reason.message);\n          } else {\n            debug.warn(reason);\n          }\n        }\n        return undefined;\n      },\n    );\n  }\n\n  /**\n   * Processes an event (either error or message) and sends it to Sentry.\n   *\n   * This also adds breadcrumbs and context information to the event. However,\n   * platform specific meta data (such as the User's IP address) must be added\n   * by the SDK implementor.\n   *\n   *\n   * @param event The event to send to Sentry.\n   * @param hint May contain additional information about the original exception.\n   * @param currentScope A scope containing event metadata.\n   * @returns A SyncPromise that resolves with the event or rejects in case event was/will not be send.\n   */\n  protected _processEvent(\n    event: Event,\n    hint: EventHint,\n    currentScope: Scope,\n    isolationScope: Scope,\n  ): PromiseLike<Event> {\n    const options = this.getOptions();\n    const { sampleRate } = options;\n\n    const isTransaction = isTransactionEvent(event);\n    const isError = isErrorEvent(event);\n    const eventType = event.type || 'error';\n    const beforeSendLabel = `before send for type \\`${eventType}\\``;\n\n    // 1.0 === 100% events are sent\n    // 0.0 === 0% events are sent\n    // Sampling for transaction happens somewhere else\n    const parsedSampleRate = typeof sampleRate === 'undefined' ? undefined : parseSampleRate(sampleRate);\n    const dataCategory = getDataCategoryByType(event.type);\n\n    return this._prepareEvent(event, hint, currentScope, isolationScope)\n      .then(prepared => {\n        if (prepared === null) {\n          this.recordDroppedEvent('event_processor', dataCategory);\n          throw _makeDoNotSendEventError('An event processor returned `null`, will not send event.');\n        }\n\n        const isInternalException = (hint.data as { __sentry__: boolean })?.__sentry__ === true;\n        if (isInternalException) {\n          return prepared;\n        }\n\n        const result = processBeforeSend(this, options, prepared, hint);\n        return _validateBeforeSendResult(result, beforeSendLabel);\n      })\n      .then(processedEvent => {\n        if (processedEvent === null) {\n          this.recordDroppedEvent('before_send', dataCategory);\n          if (isTransaction) {\n            const spans = event.spans || [];\n            // the transaction itself counts as one span, plus all the child spans that are added\n            const spanCount = 1 + spans.length;\n            this.recordDroppedEvent('before_send', 'span', spanCount);\n          }\n          throw _makeDoNotSendEventError(`${beforeSendLabel} returned \\`null\\`, will not send event.`);\n        }\n\n        const session = currentScope.getSession() || isolationScope.getSession();\n        if (isError && session) {\n          this._updateSessionFromEvent(session, processedEvent);\n        }\n\n        if (isError && typeof parsedSampleRate === 'number' && safeMathRandom() > parsedSampleRate) {\n          this.recordDroppedEvent('sample_rate', 'error');\n          throw _makeDoNotSendEventError(\n            `Discarding event because it's not included in the random sample (sampling rate = ${sampleRate})`,\n          );\n        }\n\n        if (isTransaction) {\n          const spanCountBefore = processedEvent.sdkProcessingMetadata?.spanCountBeforeProcessing || 0;\n          const spanCountAfter = processedEvent.spans ? processedEvent.spans.length : 0;\n\n          const droppedSpanCount = spanCountBefore - spanCountAfter;\n          if (droppedSpanCount > 0) {\n            this.recordDroppedEvent('before_send', 'span', droppedSpanCount);\n          }\n        }\n\n        // None of the Sentry built event processor will update transaction name,\n        // so if the transaction name has been changed by an event processor, we know\n        // it has to come from custom event processor added by a user\n        const transactionInfo = processedEvent.transaction_info;\n        if (isTransaction && transactionInfo && processedEvent.transaction !== event.transaction) {\n          const source = 'custom';\n          processedEvent.transaction_info = {\n            ...transactionInfo,\n            source,\n          };\n        }\n\n        this.sendEvent(processedEvent, hint);\n        return processedEvent;\n      })\n      .then(null, reason => {\n        if (_isDoNotSendEventError(reason) || _isInternalError(reason)) {\n          throw reason;\n        }\n\n        this.captureException(reason, {\n          mechanism: {\n            handled: false,\n            type: 'internal',\n          },\n          data: {\n            __sentry__: true,\n          },\n          originalException: reason,\n        });\n        throw _makeInternalError(\n          `Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\\nReason: ${reason}`,\n        );\n      });\n  }\n\n  /**\n   * Occupies the client with processing and event\n   */\n  protected _process<T>(taskProducer: () => PromiseLike<T>, dataCategory: DataCategory): void {\n    this._numProcessing++;\n\n    void this._promiseBuffer.add(taskProducer).then(\n      value => {\n        this._numProcessing--;\n        return value;\n      },\n      reason => {\n        this._numProcessing--;\n\n        if (reason === SENTRY_BUFFER_FULL_ERROR) {\n          this.recordDroppedEvent('queue_overflow', dataCategory);\n        }\n\n        return reason;\n      },\n    );\n  }\n\n  /**\n   * Clears outcomes on this client and returns them.\n   */\n  protected _clearOutcomes(): Outcome[] {\n    const outcomes = this._outcomes;\n    this._outcomes = {};\n    return Object.entries(outcomes).map(([key, quantity]) => {\n      const [reason, category] = key.split(':') as [EventDropReason, DataCategory];\n      return {\n        reason,\n        category,\n        quantity,\n      };\n    });\n  }\n\n  /**\n   * Sends client reports as an envelope.\n   */\n  protected _flushOutcomes(): void {\n    DEBUG_BUILD && debug.log('Flushing outcomes...');\n\n    const outcomes = this._clearOutcomes();\n\n    if (outcomes.length === 0) {\n      DEBUG_BUILD && debug.log('No outcomes to send');\n      return;\n    }\n\n    // This is really the only place where we want to check for a DSN and only send outcomes then\n    if (!this._dsn) {\n      DEBUG_BUILD && debug.log('No dsn provided, will not send outcomes');\n      return;\n    }\n\n    DEBUG_BUILD && debug.log('Sending outcomes:', outcomes);\n\n    const envelope = createClientReportEnvelope(outcomes, this._options.tunnel && dsnToString(this._dsn));\n\n    // sendEnvelope should not throw\n    // eslint-disable-next-line @typescript-eslint/no-floating-promises\n    this.sendEnvelope(envelope);\n  }\n\n  /**\n   * Creates an {@link Event} from all inputs to `captureException` and non-primitive inputs to `captureMessage`.\n   */\n  public abstract eventFromException(_exception: unknown, _hint?: EventHint): PromiseLike<Event>;\n\n  /**\n   * Creates an {@link Event} from primitive inputs to `captureMessage`.\n   */\n  public abstract eventFromMessage(\n    _message: ParameterizedString,\n    _level?: SeverityLevel,\n    _hint?: EventHint,\n  ): PromiseLike<Event>;\n}\n\nfunction getDataCategoryByType(type: EventType | 'replay_event' | undefined): DataCategory {\n  return type === 'replay_event' ? 'replay' : type || 'error';\n}\n\n/**\n * Verifies that return value of configured `beforeSend` or `beforeSendTransaction` is of expected type, and returns the value if so.\n */\nfunction _validateBeforeSendResult(\n  beforeSendResult: PromiseLike<Event | null> | Event | null,\n  beforeSendLabel: string,\n): PromiseLike<Event | null> | Event | null {\n  const invalidValueError = `${beforeSendLabel} must return \\`null\\` or a valid event.`;\n  if (isThenable(beforeSendResult)) {\n    return beforeSendResult.then(\n      event => {\n        if (!isPlainObject(event) && event !== null) {\n          throw _makeInternalError(invalidValueError);\n        }\n        return event;\n      },\n      e => {\n        throw _makeInternalError(`${beforeSendLabel} rejected with ${e}`);\n      },\n    );\n  } else if (!isPlainObject(beforeSendResult) && beforeSendResult !== null) {\n    throw _makeInternalError(invalidValueError);\n  }\n  return beforeSendResult;\n}\n\n/**\n * Process the matching `beforeSendXXX` callback.\n */\nfunction processBeforeSend(\n  client: Client,\n  options: ClientOptions,\n  event: Event,\n  hint: EventHint,\n): PromiseLike<Event | null> | Event | null {\n  const { beforeSend, beforeSendTransaction, ignoreSpans } = options;\n  const beforeSendSpan = !isStreamedBeforeSendSpanCallback(options.beforeSendSpan) && options.beforeSendSpan;\n\n  let processedEvent = event;\n\n  if (isErrorEvent(processedEvent) && beforeSend) {\n    return beforeSend(processedEvent, hint);\n  }\n\n  if (isTransactionEvent(processedEvent)) {\n    // Avoid processing if we don't have to\n    if (beforeSendSpan || ignoreSpans) {\n      // 1. Process root span\n      const rootSpanJson = convertTransactionEventToSpanJson(processedEvent);\n\n      // 1.1 If the root span should be ignored, drop the whole transaction\n      if (\n        ignoreSpans?.length &&\n        shouldIgnoreSpan(\n          { description: rootSpanJson.description, op: rootSpanJson.op, attributes: rootSpanJson.data },\n          ignoreSpans,\n        )\n      ) {\n        // dropping the whole transaction!\n        return null;\n      }\n\n      // 1.2 If a `beforeSendSpan` callback is defined, process the root span\n      if (beforeSendSpan) {\n        const processedRootSpanJson = beforeSendSpan(rootSpanJson);\n        if (!processedRootSpanJson) {\n          showSpanDropWarning();\n        } else {\n          // update event with processed root span values\n          processedEvent = merge(event, convertSpanJsonToTransactionEvent(processedRootSpanJson));\n        }\n      }\n\n      // 2. Process child spans\n      if (processedEvent.spans) {\n        const processedSpans: SpanJSON[] = [];\n\n        const initialSpans = processedEvent.spans;\n\n        for (const span of initialSpans) {\n          // 2.a If the child span should be ignored, reparent it to the root span\n          if (\n            ignoreSpans?.length &&\n            shouldIgnoreSpan({ description: span.description, op: span.op, attributes: span.data }, ignoreSpans)\n          ) {\n            reparentChildSpans(initialSpans, span);\n            continue;\n          }\n\n          // 2.b If a `beforeSendSpan` callback is defined, process the child span\n          if (beforeSendSpan) {\n            const processedSpan = beforeSendSpan(span);\n            if (!processedSpan) {\n              showSpanDropWarning();\n              processedSpans.push(span);\n            } else {\n              processedSpans.push(processedSpan);\n            }\n          } else {\n            processedSpans.push(span);\n          }\n        }\n\n        const droppedSpans = processedEvent.spans.length - processedSpans.length;\n        if (droppedSpans) {\n          client.recordDroppedEvent('before_send', 'span', droppedSpans);\n        }\n\n        processedEvent.spans = processedSpans;\n      }\n    }\n\n    if (beforeSendTransaction) {\n      if (processedEvent.spans) {\n        // We store the # of spans before processing in SDK metadata,\n        // so we can compare it afterwards to determine how many spans were dropped\n        const spanCountBefore = processedEvent.spans.length;\n        processedEvent.sdkProcessingMetadata = {\n          ...event.sdkProcessingMetadata,\n          spanCountBeforeProcessing: spanCountBefore,\n        };\n      }\n      return beforeSendTransaction(processedEvent as TransactionEvent, hint);\n    }\n  }\n\n  return processedEvent;\n}\n\nfunction isErrorEvent(event: Event): event is ErrorEvent {\n  return event.type === undefined;\n}\n\nfunction isTransactionEvent(event: Event): event is TransactionEvent {\n  return event.type === 'transaction';\n}\n\n/**\n * Estimate the size of a metric in bytes.\n *\n * @param metric - The metric to estimate the size of.\n * @returns The estimated size of the metric in bytes.\n */\nfunction estimateMetricSizeInBytes(metric: Metric): number {\n  let weight = 0;\n\n  // Estimate byte size of 2 bytes per character. This is a rough estimate JS strings are stored as UTF-16.\n  if (metric.name) {\n    weight += metric.name.length * 2;\n  }\n\n  // Add weight for number\n  weight += 8;\n\n  return weight + estimateAttributesSizeInBytes(metric.attributes);\n}\n\n/**\n * Estimate the size of a log in bytes.\n *\n * @param log - The log to estimate the size of.\n * @returns The estimated size of the log in bytes.\n */\nfunction estimateLogSizeInBytes(log: Log): number {\n  let weight = 0;\n\n  // Estimate byte size of 2 bytes per character. This is a rough estimate JS strings are stored as UTF-16.\n  if (log.message) {\n    weight += log.message.length * 2;\n  }\n\n  return weight + estimateAttributesSizeInBytes(log.attributes);\n}\n\n/**\n * Estimate the size of attributes in bytes.\n *\n * @param attributes - The attributes object to estimate the size of.\n * @returns The estimated size of the attributes in bytes.\n */\nfunction estimateAttributesSizeInBytes(attributes: Record<string, unknown> | undefined): number {\n  if (!attributes) {\n    return 0;\n  }\n\n  let weight = 0;\n\n  Object.values(attributes).forEach(value => {\n    if (Array.isArray(value)) {\n      weight += value.length * estimatePrimitiveSizeInBytes(value[0]);\n    } else if (isPrimitive(value)) {\n      weight += estimatePrimitiveSizeInBytes(value);\n    } else {\n      // For objects values, we estimate the size of the object as 100 bytes\n      weight += 100;\n    }\n  });\n\n  return weight;\n}\n\nfunction estimatePrimitiveSizeInBytes(value: Primitive): number {\n  if (typeof value === 'string') {\n    return value.length * 2;\n  } else if (typeof value === 'number') {\n    return 8;\n  } else if (typeof value === 'boolean') {\n    return 4;\n  }\n\n  return 0;\n}\n", "import type { Client } from './client';\nimport { getCurrentScope } from './currentScopes';\nimport { DEBUG_BUILD } from './debug-build';\nimport type { ClientOptions } from './types/options';\nimport { consoleSandbox, debug } from './utils/debug-logger';\n\n/** A class object that can instantiate Client objects. */\nexport type ClientClass<F extends Client, O extends ClientOptions> = new (options: O) => F;\n\n/**\n * Internal function to create a new SDK client instance. The client is\n * installed and then bound to the current scope.\n *\n * @param clientClass The client class to instantiate.\n * @param options Options to pass to the client.\n */\nexport function initAndBind<F extends Client, O extends ClientOptions>(\n  clientClass: ClientClass<F, O>,\n  options: O,\n): Client {\n  if (options.debug === true) {\n    if (DEBUG_BUILD) {\n      debug.enable();\n    } else {\n      // use `console.warn` rather than `debug.warn` since by non-debug bundles have all `debug.x` statements stripped\n      consoleSandbox(() => {\n        // eslint-disable-next-line no-console\n        console.warn('[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.');\n      });\n    }\n  }\n  const scope = getCurrentScope();\n  scope.update(options.initialScope);\n\n  const client = new clientClass(options);\n  setCurrentClient(client);\n  client.init();\n  return client;\n}\n\n/**\n * Make the given client the current client.\n */\nexport function setCurrentClient(client: Client): void {\n  getCurrentScope().setClient(client);\n}\n", "import { DEBUG_BUILD } from '../debug-build';\nimport type { Envelope } from '../types/envelope';\nimport type { InternalBaseTransportOptions, Transport, TransportMakeRequestResponse } from '../types/transport';\nimport { debug } from '../utils/debug-logger';\nimport { envelopeContainsItemType } from '../utils/envelope';\nimport { safeDateNow } from '../utils/randomSafeContext';\nimport { parseRetryAfterHeader } from '../utils/ratelimit';\nimport { safeUnref } from '../utils/timer';\n\nexport const MIN_DELAY = 100; // 100 ms\nexport const START_DELAY = 5_000; // 5 seconds\nconst MAX_DELAY = 3.6e6; // 1 hour\n\nexport interface OfflineStore {\n  push(env: Envelope): Promise<void>;\n  unshift(env: Envelope): Promise<void>;\n  shift(): Promise<Envelope | undefined>;\n}\n\nexport type CreateOfflineStore = (options: OfflineTransportOptions) => OfflineStore;\n\nexport interface OfflineTransportOptions extends InternalBaseTransportOptions {\n  /**\n   * A function that creates the offline store instance.\n   */\n  createStore?: CreateOfflineStore;\n\n  /**\n   * Flush the offline store shortly after startup.\n   *\n   * Defaults: false\n   */\n  flushAtStartup?: boolean;\n\n  /**\n   * Called before an event is stored.\n   *\n   * Return false to drop the envelope rather than store it.\n   *\n   * @param envelope The envelope that failed to send.\n   * @param error The error that occurred.\n   * @param retryDelay The current retry delay in milliseconds.\n   * @returns Whether the envelope should be stored.\n   */\n  shouldStore?: (envelope: Envelope, error: Error, retryDelay: number) => boolean | Promise<boolean>;\n\n  /**\n   * Should an attempt be made to send the envelope to Sentry.\n   *\n   * If this function is supplied and returns false, `shouldStore` will be called to determine if the envelope should be stored.\n   *\n   * @param envelope The envelope that will be sent.\n   * @returns Whether we should attempt to send the envelope\n   */\n  shouldSend?: (envelope: Envelope) => boolean | Promise<boolean>;\n}\n\ntype Timer = number | { unref?: () => void };\n\n/**\n * Wraps a transport and stores and retries events when they fail to send.\n *\n * @param createTransport The transport to wrap.\n */\nexport function makeOfflineTransport<TO>(\n  createTransport: (options: TO) => Transport,\n): (options: TO & OfflineTransportOptions) => Transport {\n  function log(...args: unknown[]): void {\n    DEBUG_BUILD && debug.log('[Offline]:', ...args);\n  }\n\n  return options => {\n    const transport = createTransport(options);\n\n    if (!options.createStore) {\n      throw new Error('No `createStore` function was provided');\n    }\n\n    const store = options.createStore(options);\n\n    let retryDelay = START_DELAY;\n    let flushTimer: Timer | undefined;\n\n    function shouldQueue(env: Envelope, error: Error, retryDelay: number): boolean | Promise<boolean> {\n      // We want to drop client reports because they can be generated when we retry sending events while offline.\n      if (envelopeContainsItemType(env, ['client_report'])) {\n        return false;\n      }\n\n      if (options.shouldStore) {\n        return options.shouldStore(env, error, retryDelay);\n      }\n\n      return true;\n    }\n\n    function flushIn(delay: number): void {\n      if (flushTimer) {\n        clearTimeout(flushTimer as ReturnType<typeof setTimeout>);\n      }\n\n      // We need to unref the timer in node.js, otherwise the node process never exit.\n      flushTimer = safeUnref(\n        setTimeout(async () => {\n          flushTimer = undefined;\n\n          const found = await store.shift();\n          if (found) {\n            log('Attempting to send previously queued event');\n\n            // We should to update the sent_at timestamp to the current time.\n            found[0].sent_at = new Date(safeDateNow()).toISOString();\n\n            void send(found, true).catch(e => {\n              log('Failed to retry sending', e);\n            });\n          }\n        }, delay),\n      ) as Timer;\n    }\n\n    function flushWithBackOff(): void {\n      if (flushTimer) {\n        return;\n      }\n\n      flushIn(retryDelay);\n\n      retryDelay = Math.min(retryDelay * 2, MAX_DELAY);\n    }\n\n    async function send(envelope: Envelope, isRetry: boolean = false): Promise<TransportMakeRequestResponse> {\n      // We queue all replay envelopes to avoid multiple replay envelopes being sent at the same time. If one fails, we\n      // need to retry them in order.\n      if (!isRetry && envelopeContainsItemType(envelope, ['replay_event', 'replay_recording'])) {\n        await store.push(envelope);\n        flushIn(MIN_DELAY);\n        return {};\n      }\n\n      try {\n        if (options.shouldSend && (await options.shouldSend(envelope)) === false) {\n          throw new Error('Envelope not sent because `shouldSend` callback returned false');\n        }\n\n        const result = await transport.send(envelope);\n\n        let delay = MIN_DELAY;\n\n        if (result) {\n          // If there's a retry-after header, use that as the next delay.\n          if (result.headers?.['retry-after']) {\n            delay = parseRetryAfterHeader(result.headers['retry-after']);\n          } else if (result.headers?.['x-sentry-rate-limits']) {\n            delay = 60_000; // 60 seconds\n          } // If we have a server error, return now so we don't flush the queue.\n          else if ((result.statusCode || 0) >= 400) {\n            return result;\n          }\n        }\n\n        flushIn(delay);\n        retryDelay = START_DELAY;\n        return result;\n      } catch (e) {\n        if (await shouldQueue(envelope, e as Error, retryDelay)) {\n          // If this envelope was a retry, we want to add it to the front of the queue so it's retried again first.\n          if (isRetry) {\n            await store.unshift(envelope);\n          } else {\n            await store.push(envelope);\n          }\n          flushWithBackOff();\n          log('Error sending. Event queued.', e as Error);\n          return {};\n        } else {\n          throw e;\n        }\n      }\n    }\n\n    if (options.flushAtStartup) {\n      flushWithBackOff();\n    }\n\n    return {\n      send,\n      flush: timeout => {\n        // If there's no timeout, we should attempt to flush the offline queue.\n        if (timeout === undefined) {\n          retryDelay = START_DELAY;\n          flushIn(MIN_DELAY);\n        }\n\n        return transport.flush(timeout);\n      },\n    };\n  };\n}\n", "import { getEnvelopeEndpointWithUrlEncodedAuth } from '../api';\nimport type { Envelope, EnvelopeItemType, EventItem } from '../types/envelope';\nimport type { Event } from '../types/event';\nimport type { BaseTransportOptions, Transport, TransportMakeRequestResponse } from '../types/transport';\nimport { dsnFromString } from '../utils/dsn';\nimport { createEnvelope, forEachEnvelopeItem } from '../utils/envelope';\n\ninterface MatchParam {\n  /** The envelope to be sent */\n  envelope: Envelope;\n  /**\n   * A function that returns an event from the envelope if one exists. You can optionally pass an array of envelope item\n   * types to filter by - only envelopes matching the given types will be multiplexed.\n   * Allowed values are: 'event', 'transaction', 'profile', 'replay_event'\n   *\n   * @param types Defaults to ['event']\n   */\n  getEvent(types?: EnvelopeItemType[]): Event | undefined;\n}\n\ntype RouteTo = { dsn: string; release: string };\ntype Matcher = (param: MatchParam) => (string | RouteTo)[];\n\n/**\n * Key used in event.extra to provide routing information for the multiplexed transport.\n * Should contain an array of `{ dsn: string, release?: string }` objects.\n */\nexport const MULTIPLEXED_TRANSPORT_EXTRA_KEY = 'MULTIPLEXED_TRANSPORT_EXTRA_KEY';\n\n/**\n * Gets an event from an envelope.\n *\n * This is only exported for use in the tests\n */\nexport function eventFromEnvelope(env: Envelope, types: EnvelopeItemType[]): Event | undefined {\n  let event: Event | undefined;\n\n  forEachEnvelopeItem(env, (item, type) => {\n    if (types.includes(type)) {\n      event = Array.isArray(item) ? (item as EventItem)[1] : undefined;\n    }\n    // bail out if we found an event\n    return !!event;\n  });\n\n  return event;\n}\n\n/**\n * Creates a transport that overrides the release on all events.\n */\nfunction makeOverrideReleaseTransport<TO extends BaseTransportOptions>(\n  createTransport: (options: TO) => Transport,\n  release: string,\n): (options: TO) => Transport {\n  return options => {\n    const transport = createTransport(options);\n\n    return {\n      ...transport,\n      send: async (envelope: Envelope): Promise<TransportMakeRequestResponse> => {\n        const event = eventFromEnvelope(envelope, ['event', 'transaction', 'profile', 'replay_event']);\n\n        if (event) {\n          event.release = release;\n        }\n        return transport.send(envelope);\n      },\n    };\n  };\n}\n\n/** Overrides the DSN in the envelope header  */\nfunction overrideDsn(envelope: Envelope, dsn: string): Envelope {\n  return createEnvelope(\n    dsn\n      ? {\n          ...envelope[0],\n          dsn,\n        }\n      : envelope[0],\n    envelope[1],\n  );\n}\n\n/**\n * Creates a transport that can send events to different DSNs depending on the envelope contents.\n *\n * If no matcher is provided, the transport will look for routing information in\n * `event.extra[MULTIPLEXED_TRANSPORT_EXTRA_KEY]`, which should contain\n * an array of `{ dsn: string, release?: string }` objects.\n */\nexport function makeMultiplexedTransport<TO extends BaseTransportOptions>(\n  createTransport: (options: TO) => Transport,\n  matcher?: Matcher,\n): (options: TO) => Transport {\n  return options => {\n    const fallbackTransport = createTransport(options);\n    const otherTransports: Map<string, Transport> = new Map();\n\n    // Use provided matcher or default to simple multiplexed transport behavior\n    const actualMatcher: Matcher =\n      matcher ||\n      (args => {\n        const event = args.getEvent();\n        if (\n          event?.extra?.[MULTIPLEXED_TRANSPORT_EXTRA_KEY] &&\n          Array.isArray(event.extra[MULTIPLEXED_TRANSPORT_EXTRA_KEY])\n        ) {\n          return event.extra[MULTIPLEXED_TRANSPORT_EXTRA_KEY];\n        }\n        return [];\n      });\n\n    function getTransport(dsn: string, release: string | undefined): [string, Transport] | undefined {\n      // We create a transport for every unique dsn/release combination as there may be code from multiple releases in\n      // use at the same time\n      const key = release ? `${dsn}:${release}` : dsn;\n\n      let transport = otherTransports.get(key);\n\n      if (!transport) {\n        const validatedDsn = dsnFromString(dsn);\n        if (!validatedDsn) {\n          return undefined;\n        }\n        const url = getEnvelopeEndpointWithUrlEncodedAuth(validatedDsn, options.tunnel);\n\n        transport = release\n          ? makeOverrideReleaseTransport(createTransport, release)({ ...options, url })\n          : createTransport({ ...options, url });\n\n        otherTransports.set(key, transport);\n      }\n\n      return [dsn, transport];\n    }\n\n    async function send(envelope: Envelope): Promise<TransportMakeRequestResponse> {\n      function getEvent(types?: EnvelopeItemType[]): Event | undefined {\n        const eventTypes: EnvelopeItemType[] = types?.length ? types : ['event'];\n        return eventFromEnvelope(envelope, eventTypes);\n      }\n\n      const transports = actualMatcher({ envelope, getEvent })\n        .map(result => {\n          if (typeof result === 'string') {\n            return getTransport(result, undefined);\n          } else {\n            return getTransport(result.dsn, result.release);\n          }\n        })\n        .filter((t): t is [string, Transport] => !!t);\n\n      // If we have no transports to send to, use the fallback transport\n      // Don't override the DSN in the header for the fallback transport. '' is falsy\n      const transportsWithFallback: [string, Transport][] = transports.length ? transports : [['', fallbackTransport]];\n\n      const results = (await Promise.all(\n        transportsWithFallback.map(([dsn, transport]) => transport.send(overrideDsn(envelope, dsn))),\n      )) as [TransportMakeRequestResponse, ...TransportMakeRequestResponse[]];\n\n      return results[0];\n    }\n\n    async function flush(timeout: number | undefined): Promise<boolean> {\n      const allTransports = [...otherTransports.values(), fallbackTransport];\n      const results = await Promise.all(allTransports.map(transport => transport.flush(timeout)));\n      return results.every(r => r);\n    }\n\n    return {\n      send,\n      flush,\n    };\n  };\n}\n", "import type { CollectBehavior } from '../../types/datacollection';\nimport { FILTERED_VALUE as FILTERED, SENSITIVE_KEY_SNIPPETS } from './filtering-snippets';\n\nfunction isSensitiveKey(lower: string, denySnippets: string[]): boolean {\n  return denySnippets.some(snippet => lower.includes(snippet));\n}\n\n/**\n * Filters a key-value record according to a `CollectBehavior`.\n *\n * Key names are always preserved. Values are either kept, replaced with\n * `[Filtered]`, or the entire record is dropped (off mode).\n *\n * @param additionalDenyTerms - Additional sensitive snippets to check beyond the built-in denylist.\n */\nexport function filterKeyValueData<T>(\n  data: Record<string, T>,\n  behavior: CollectBehavior,\n  additionalDenyTerms?: string[],\n): Record<string, T | string> {\n  if (behavior === false) {\n    return {};\n  }\n\n  const denySnippets =\n    additionalDenyTerms != null ? [...SENSITIVE_KEY_SNIPPETS, ...additionalDenyTerms] : SENSITIVE_KEY_SNIPPETS;\n  const result: Record<string, T | string> = {};\n\n  if (behavior === true) {\n    for (const key of Object.keys(data)) {\n      result[key] = isSensitiveKey(key.toLowerCase(), denySnippets) ? FILTERED : data[key]!;\n    }\n    return result;\n  }\n\n  if ('deny' in behavior) {\n    const lowerTerms = behavior.deny.map(t => t.toLowerCase());\n    for (const key of Object.keys(data)) {\n      const lower = key.toLowerCase();\n      const isDenied = isSensitiveKey(lower, denySnippets) || lowerTerms.some(term => lower.includes(term));\n      result[key] = isDenied ? FILTERED : data[key]!;\n    }\n    return result;\n  }\n\n  // allowList mode\n  const lowerTerms = behavior.allow.map(t => t.toLowerCase());\n  for (const key of Object.keys(data)) {\n    const lower = key.toLowerCase();\n    if (isSensitiveKey(lower, denySnippets)) {\n      result[key] = FILTERED;\n    } else {\n      const isAllowed = lowerTerms.some(term => lower.includes(term));\n      result[key] = isAllowed ? data[key]! : FILTERED;\n    }\n  }\n  return result;\n}\n", "/**\n * This code was originally copied from the 'cookie` module at v0.5.0 and was simplified for our use case.\n * https://github.com/jshttp/cookie/blob/a0c84147aab6266bdb3996cf4062e93907c0b0fc/index.js\n * It had the following license:\n *\n * (The MIT License)\n *\n * Copyright (c) 2012-2014 Roman Shtylman <shtylman@gmail.com>\n * Copyright (c) 2015 Douglas Christopher Wilson <doug@somethingdoug.com>\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * 'Software'), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\n * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/**\n * Parses a cookie string\n */\nexport function parseCookie(str: string): Record<string, string> {\n  const obj: Record<string, string> = {};\n  let index = 0;\n\n  while (index < str.length) {\n    const eqIdx = str.indexOf('=', index);\n\n    // no more cookie pairs\n    if (eqIdx === -1) {\n      break;\n    }\n\n    let endIdx = str.indexOf(';', index);\n\n    if (endIdx === -1) {\n      endIdx = str.length;\n    } else if (endIdx < eqIdx) {\n      // backtrack on prior semicolon\n      index = str.lastIndexOf(';', eqIdx - 1) + 1;\n      continue;\n    }\n\n    const key = str.slice(index, eqIdx).trim();\n\n    // only assign once\n    if (undefined === obj[key]) {\n      let val = str.slice(eqIdx + 1, endIdx).trim();\n\n      // quoted values\n      if (val.charCodeAt(0) === 0x22) {\n        val = val.slice(1, -1);\n      }\n\n      try {\n        obj[key] = val.indexOf('%') !== -1 ? decodeURIComponent(val) : val;\n      } catch {\n        obj[key] = val;\n      }\n    }\n\n    index = endIdx + 1;\n  }\n\n  return obj;\n}\n", "import type { CollectBehavior } from '../../types/datacollection';\nimport { parseCookie } from '../cookie';\nimport { FILTERED_VALUE as FILTERED, SENSITIVE_COOKIE_NAME_SNIPPETS } from './filtering-snippets';\nimport { filterKeyValueData } from './filterKeyValueData';\n\n/**\n * Filters a cookie string according to a `CollectBehavior`.\n *\n * When individual cookies can be parsed, each key-value pair is filtered\n * independently. When parsing fails, the entire string is replaced with `[Filtered]`.\n */\nexport function filterCookies(cookieString: string, behavior: CollectBehavior): Record<string, string> | string {\n  if (behavior === false) {\n    return {};\n  }\n\n  try {\n    const parsed = parseCookie(cookieString);\n\n    if (Object.keys(parsed).length === 0) {\n      return {};\n    }\n\n    return filterKeyValueData(parsed, behavior, SENSITIVE_COOKIE_NAME_SNIPPETS);\n  } catch {\n    return FILTERED;\n  }\n}\n", "import { URL_FULL } from '@sentry/conventions/attributes';\nimport {\n  SEMANTIC_ATTRIBUTE_HTTP_REQUEST_METHOD,\n  SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n  SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,\n} from '../semanticAttributes';\nimport type { SpanAttributes } from '../types/span';\n\ntype PartialURL = {\n  host?: string;\n  path?: string;\n  protocol?: string;\n  relative?: string;\n  search?: string;\n  hash?: string;\n};\n\ninterface URLwithCanParse extends URL {\n  canParse: (url: string, base?: string | URL | undefined) => boolean;\n}\n\n// A subset of the URL object that is valid for relative URLs\n// The URL object cannot handle relative URLs, so we need to handle them separately\ntype RelativeURL = {\n  isRelative: true;\n  pathname: URL['pathname'];\n  search: URL['search'];\n  hash: URL['hash'];\n};\n\ntype URLObject = RelativeURL | URL;\n\n// Curious about `thismessage:/`? See: https://www.rfc-editor.org/rfc/rfc2557.html\n//  > When the methods above do not yield an absolute URI, a base URL\n//  > of \"thismessage:/\" MUST be employed. This base URL has been\n//  > defined for the sole purpose of resolving relative references\n//  > within a multipart/related structure when no other base URI is\n//  > specified.\n//\n// We need to provide a base URL to `parseStringToURLObject` because the fetch API gives us a\n// relative URL sometimes.\n//\n// This is the only case where we need to provide a base URL to `parseStringToURLObject`\n// because the relative URL is not valid on its own.\nconst DEFAULT_BASE_URL = 'thismessage:/';\n\n/**\n * Checks if the URL object is relative\n *\n * @param url - The URL object to check\n * @returns True if the URL object is relative, false otherwise\n */\nexport function isURLObjectRelative(url: URLObject): url is RelativeURL {\n  return 'isRelative' in url;\n}\n\n/**\n * Parses string to a URL object\n *\n * @param url - The URL to parse\n * @returns The parsed URL object or undefined if the URL is invalid\n */\nexport function parseStringToURLObject(url: string, urlBase?: string | URL | undefined): URLObject | undefined {\n  const isRelative = url.indexOf('://') <= 0 && url.indexOf('//') !== 0;\n  const base = urlBase ?? (isRelative ? DEFAULT_BASE_URL : undefined);\n  try {\n    // Use `canParse` to short-circuit the URL constructor if it's not a valid URL\n    // This is faster than trying to construct the URL and catching the error\n    // Node 20+, Chrome 120+, Firefox 115+, Safari 17+\n    if ('canParse' in URL && !(URL as unknown as URLwithCanParse).canParse(url, base)) {\n      return undefined;\n    }\n\n    const fullUrlObject = new URL(url, base);\n    if (isRelative) {\n      // Because we used a fake base URL, we need to return a relative URL object.\n      // We cannot return anything about the origin, host, etc. because it will refer to the fake base URL.\n      return {\n        isRelative,\n        pathname: fullUrlObject.pathname,\n        search: fullUrlObject.search,\n        hash: fullUrlObject.hash,\n      };\n    }\n    return fullUrlObject;\n  } catch {\n    // empty body\n  }\n\n  return undefined;\n}\n\n/**\n * Takes a URL object and returns a sanitized string which is safe to use as span name\n * see: https://develop.sentry.dev/sdk/data-handling/#structuring-data\n */\nexport function getSanitizedUrlStringFromUrlObject(url: URLObject): string {\n  if (isURLObjectRelative(url)) {\n    return url.pathname;\n  }\n\n  const newUrl = new URL(url);\n  newUrl.search = '';\n  newUrl.hash = '';\n  if (['80', '443'].includes(newUrl.port)) {\n    newUrl.port = '';\n  }\n  if (newUrl.password) {\n    newUrl.password = '%filtered%';\n  }\n  if (newUrl.username) {\n    newUrl.username = '%filtered%';\n  }\n\n  return newUrl.toString();\n}\n\ntype PartialRequest = {\n  method?: string;\n};\n\nfunction getHttpSpanNameFromUrlObject(\n  urlObject: URLObject | undefined,\n  kind: 'server' | 'client',\n  request?: PartialRequest,\n  routeName?: string,\n): string {\n  const method = request?.method?.toUpperCase() ?? 'GET';\n  const route = routeName\n    ? routeName\n    : urlObject\n      ? kind === 'client'\n        ? getSanitizedUrlStringFromUrlObject(urlObject)\n        : urlObject.pathname\n      : '/';\n\n  return `${method} ${route}`;\n}\n\n/**\n * Takes a parsed URL object and returns a set of attributes for the span\n * that represents the HTTP request for that url. This is used for both server\n * and client http spans.\n *\n * Follows https://opentelemetry.io/docs/specs/semconv/http/.\n *\n * @param urlObject - see {@link parseStringToURLObject}\n * @param kind - The type of HTTP operation (server or client)\n * @param spanOrigin - The origin of the span\n * @param request - The request object, see {@link PartialRequest}\n * @param routeName - The name of the route, must be low cardinality\n * @returns The span name and attributes for the HTTP operation\n */\nexport function getHttpSpanDetailsFromUrlObject(\n  urlObject: URLObject | undefined,\n  kind: 'server' | 'client',\n  spanOrigin: string,\n  request?: PartialRequest,\n  routeName?: string,\n): [name: string, attributes: SpanAttributes] {\n  const attributes: SpanAttributes = {\n    [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: spanOrigin,\n    [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'url',\n  };\n\n  if (routeName) {\n    // This is based on https://opentelemetry.io/docs/specs/semconv/http/http-spans/#name\n    attributes[kind === 'server' ? 'http.route' : 'url.template'] = routeName;\n    attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] = 'route';\n  }\n\n  if (request?.method) {\n    attributes[SEMANTIC_ATTRIBUTE_HTTP_REQUEST_METHOD] = request.method.toUpperCase();\n  }\n\n  if (urlObject) {\n    if (urlObject.search) {\n      attributes['url.query'] = urlObject.search;\n    }\n    if (urlObject.hash) {\n      attributes['url.fragment'] = urlObject.hash;\n    }\n    if (urlObject.pathname) {\n      attributes['url.path'] = urlObject.pathname;\n      if (urlObject.pathname === '/') {\n        attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] = 'route';\n      }\n    }\n\n    if (!isURLObjectRelative(urlObject)) {\n      attributes[URL_FULL] = urlObject.href;\n      if (urlObject.port) {\n        attributes['url.port'] = urlObject.port;\n      }\n      if (urlObject.protocol) {\n        attributes['url.scheme'] = urlObject.protocol;\n      }\n      if (urlObject.hostname) {\n        attributes[kind === 'server' ? 'server.address' : 'url.domain'] = urlObject.hostname;\n      }\n    }\n  }\n\n  return [getHttpSpanNameFromUrlObject(urlObject, kind, request, routeName), attributes];\n}\n\n/**\n * Parses string form of URL into an object\n * // borrowed from https://tools.ietf.org/html/rfc3986#appendix-B\n * // intentionally using regex and not <a/> href parsing trick because React Native and other\n * // environments where DOM might not be available\n * @returns parsed URL object\n */\nexport function parseUrl(url: string): PartialURL {\n  if (!url) {\n    return {};\n  }\n\n  const match = url.match(/^(([^:/?#]+):)?(\\/\\/([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$/);\n\n  if (!match) {\n    return {};\n  }\n\n  // coerce to undefined values to empty string so we don't get 'undefined'\n  const query = match[6] || '';\n  const fragment = match[8] || '';\n  return {\n    host: match[4],\n    path: match[5],\n    protocol: match[2],\n    search: query,\n    hash: fragment,\n    relative: match[5] + query + fragment, // everything minus origin\n  };\n}\n\n/**\n * Strip the query string and fragment off of a given URL or path (if present)\n *\n * @param urlPath Full URL or path, including possible query string and/or fragment\n * @returns URL or path without query string or fragment\n */\nexport function stripUrlQueryAndFragment(urlPath: string): string {\n  return (urlPath.split(/[?#]/, 1) as [string, ...string[]])[0];\n}\n\n/**\n * Takes a URL object and returns a sanitized string which is safe to use as span name\n * see: https://develop.sentry.dev/sdk/data-handling/#structuring-data\n */\nexport function getSanitizedUrlString(url: PartialURL): string {\n  const { protocol, host, path } = url;\n\n  const filteredHost =\n    host\n      // Always filter out authority\n      ?.replace(/^.*@/, '[filtered]:[filtered]@')\n      // Don't show standard :80 (http) and :443 (https) ports to reduce the noise\n      // TODO: Use new URL global if it exists\n      .replace(/(:80)$/, '')\n      .replace(/(:443)$/, '') || '';\n\n  return `${protocol ? `${protocol}://` : ''}${filteredHost}${path}`;\n}\n\n/**\n * Strips the content from a data URL, returning a placeholder with the MIME type.\n *\n * Data URLs can be very long (e.g. base64 encoded scripts for Web Workers),\n * with little valuable information, often leading to envelopes getting dropped due\n * to size limit violations. Therefore, we strip data URLs and replace them with a\n * placeholder.\n *\n * @param url - The URL to process\n * @param includeDataPrefix - If true, includes the first 10 characters of the data stream\n *                            for debugging (e.g., to identify magic bytes like WASM's AGFzbQ).\n *                            Defaults to true.\n * @returns For data URLs, returns a short format like `data:text/javascript;base64,SGVsbG8gV2... [truncated]`.\n *          For non-data URLs, returns the original URL unchanged.\n */\nexport function stripDataUrlContent(url: string, includeDataPrefix: boolean = true): string {\n  if (url.startsWith('data:')) {\n    // Match the MIME type (everything after 'data:' until the first ';' or ',')\n    const match = url.match(/^data:([^;,]+)/);\n    const mimeType = match ? match[1] : 'text/plain';\n    const isBase64 = url.includes(';base64,');\n\n    // Find where the actual data starts (after the comma)\n    const dataStart = url.indexOf(',');\n    let dataPrefix = '';\n    if (includeDataPrefix && dataStart !== -1) {\n      const data = url.slice(dataStart + 1);\n      // Include first 10 chars of data to help identify content (e.g., magic bytes)\n      dataPrefix = data.length > 10 ? `${data.slice(0, 10)}... [truncated]` : data;\n    }\n\n    return `data:${mimeType}${isBase64 ? ',base64' : ''}${dataPrefix ? `,${dataPrefix}` : ''}`;\n  }\n  return url;\n}\n", "import type { Client } from '../client';\nimport type { DsnComponents } from '../types/dsn';\nimport { isURLObjectRelative, parseStringToURLObject } from './url';\n\n/**\n * Checks whether given url points to Sentry server\n *\n * @param url url to verify\n */\nexport function isSentryRequestUrl(url: string, client: Client | undefined): boolean {\n  const dsn = client?.getDsn();\n  const tunnel = client?.getOptions().tunnel;\n  return checkDsn(url, dsn) || checkTunnel(url, tunnel);\n}\n\nfunction checkTunnel(url: string, tunnel: string | undefined): boolean {\n  if (!tunnel) {\n    return false;\n  }\n\n  return removeTrailingSlash(url) === removeTrailingSlash(tunnel);\n}\n\nfunction checkDsn(url: string, dsn: DsnComponents | undefined): boolean {\n  // Requests to Sentry's ingest endpoint must have a `sentry_key` in the query string\n  // This is equivalent to the public_key which is required in the DSN\n  // see https://develop.sentry.dev/sdk/overview/#parsing-the-dsn\n  // Therefore, a request to the same host and with a `sentry_key` in the query string\n  // can be considered a request to the ingest endpoint.\n  const urlParts = parseStringToURLObject(url);\n  if (!urlParts || isURLObjectRelative(urlParts)) {\n    return false;\n  }\n\n  if (!dsn) {\n    return false;\n  }\n\n  return hostnameMatchesDsnHost(urlParts.hostname, dsn.host) && /(^|&|\\?)sentry_key=/.test(urlParts.search);\n}\n\nfunction hostnameMatchesDsnHost(hostname: string, dsnHost: string): boolean {\n  return hostname === dsnHost || (dsnHost.length > 0 && hostname.endsWith(`.${dsnHost}`));\n}\n\nfunction removeTrailingSlash(str: string): string {\n  return str[str.length - 1] === '/' ? str.slice(0, -1) : str;\n}\n", "import type { ParameterizedString } from '../types/parameterize';\n\n/**\n * Tagged template function which returns parameterized representation of the message\n * For example: parameterize`This is a log statement with ${x} and ${y} params`, would return:\n * \"__sentry_template_string__\": 'This is a log statement with %s and %s params',\n * \"__sentry_template_values__\": ['first', 'second']\n *\n * @param strings An array of string values splitted between expressions\n * @param values Expressions extracted from template string\n *\n * @returns A `ParameterizedString` object that can be passed into `captureMessage` or Sentry.logger.X methods.\n */\nexport function parameterize(strings: TemplateStringsArray, ...values: unknown[]): ParameterizedString {\n  const formatted = new String(String.raw(strings, ...values)) as ParameterizedString;\n  formatted.__sentry_template_string__ = strings.join('\\x00').replace(/%/g, '%%').replace(/\\0/g, '%s');\n  formatted.__sentry_template_values__ = values;\n  return formatted;\n}\n\n/**\n * Tagged template function which returns parameterized representation of the message.\n *\n * @param strings An array of string values splitted between expressions\n * @param values Expressions extracted from template string\n * @returns A `ParameterizedString` object that can be passed into `captureMessage` or Sentry.logger.X methods.\n */\nexport const fmt = parameterize;\n", "import type { Session, SessionAggregates } from '../types/session';\nimport type { User } from '../types/user';\n\n// By default, we want to infer the IP address, unless this is explicitly set to `null`\n// We do this after all other processing is done\n// If `ip_address` is explicitly set to `null` or a value, we leave it as is\n\n/**\n * @internal\n * @deprecated -- set ip inferral via via SDK metadata options on client instead.\n */\nexport function addAutoIpAddressToUser(objWithMaybeUser: { user?: User | null }): void {\n  if (objWithMaybeUser.user?.ip_address === undefined) {\n    objWithMaybeUser.user = {\n      ...objWithMaybeUser.user,\n      ip_address: '{{auto}}',\n    };\n  }\n}\n\n/**\n * @internal\n */\nexport function addAutoIpAddressToSession(session: Session | SessionAggregates): void {\n  if ('aggregates' in session) {\n    if (session.attrs?.['ip_address'] === undefined) {\n      session.attrs = {\n        ...session.attrs,\n        ip_address: '{{auto}}',\n      };\n    }\n  } else {\n    if (session.ipAddress === undefined) {\n      session.ipAddress = '{{auto}}';\n    }\n  }\n}\n", "import type { CoreOptions } from '../types/options';\nimport { SDK_VERSION } from '../utils/version';\n\n/**\n * A builder for the SDK metadata in the options for the SDK initialization.\n *\n * Note: This function is identical to `buildMetadata` in Remix and NextJS and SvelteKit.\n * We don't extract it for bundle size reasons.\n * @see https://github.com/getsentry/sentry-javascript/pull/7404\n * @see https://github.com/getsentry/sentry-javascript/pull/4196\n *\n * If you make changes to this function consider updating the others as well.\n *\n * @param options SDK options object that gets mutated\n * @param names list of package names\n */\nexport function applySdkMetadata(options: CoreOptions, name: string, names = [name], source = 'npm'): void {\n  const sdk = ((options._metadata = options._metadata || {}).sdk = options._metadata.sdk || {});\n\n  if (!sdk.name) {\n    sdk.name = `sentry.javascript.${name}`;\n    sdk.packages = names.map(name => ({\n      name: `${source}:@sentry/${name}`,\n      version: SDK_VERSION,\n    }));\n    sdk.version = SDK_VERSION;\n  }\n}\n", "import { getAsyncContextStrategy } from '../asyncContext';\nimport { getMainCarrier } from '../carrier';\nimport type { Client } from '../client';\nimport { getClient, getCurrentScope, hasExternalPropagationContext } from '../currentScopes';\nimport { isEnabled } from '../exports';\nimport type { Scope } from '../scope';\nimport { getDynamicSamplingContextFromScope, getDynamicSamplingContextFromSpan } from '../tracing';\nimport { spanIsNonRecordingSpan } from '../tracing/sentryNonRecordingSpan';\nimport type { Span } from '../types/span';\nimport type { SerializedTraceData } from '../types/tracing';\nimport { dynamicSamplingContextToSentryBaggageHeader } from './baggage';\nimport { debug } from './debug-logger';\nimport { hasSpansEnabled } from './hasSpansEnabled';\nimport { getActiveSpan, spanToTraceHeader, spanToTraceparentHeader } from './spanUtils';\nimport { generateSentryTraceHeader, generateTraceparentHeader, TRACEPARENT_REGEXP } from './tracing';\n\n/**\n * Extracts trace propagation data from the current span or from the client's scope (via transaction or propagation\n * context) and serializes it to `sentry-trace` and `baggage` values. These values can be used to propagate\n * a trace via our tracing Http headers or Html `<meta>` tags.\n *\n * This function also applies some validation to the generated sentry-trace and baggage values to ensure that\n * only valid strings are returned.\n *\n * When an external propagation context is registered (e.g. via the OTLP integration) and there is no active\n * Sentry span, this function returns an empty object to defer outgoing request propagation to the external\n * propagator (e.g. an OpenTelemetry propagator).\n *\n * If (@param options.propagateTraceparent) is `true`, the function will also generate a `traceparent` value,\n * following the W3C traceparent header format.\n *\n * @returns an object with the tracing data values. The object keys are the name of the tracing key to be used as header\n * or meta tag name.\n */\nexport function getTraceData(\n  options: { span?: Span; scope?: Scope; client?: Client; propagateTraceparent?: boolean } = {},\n): SerializedTraceData {\n  const client = options.client || getClient();\n  if (!isEnabled() || !client) {\n    return {};\n  }\n\n  const carrier = getMainCarrier();\n  const acs = getAsyncContextStrategy(carrier);\n  if (acs.getTraceData) {\n    return acs.getTraceData(options);\n  }\n\n  const scope = options.scope || getCurrentScope();\n  const span = options.span || getActiveSpan();\n\n  // In Tracing-without-Performance (TwP) mode, spans are non-recording placeholders that carry no\n  // sampling decision of their own (it's deferred). The scope is the source of truth, so we read\n  // the trace headers from the scope. A non-recording span in *tracing* mode (e.g. an unsampled\n  // child or an ignored span) is different: it represents an explicit negative decision, which\n  // `spanToTraceHeader` correctly encodes as `-0`, so we keep reading those from the span.\n  const isTwpPlaceholder = spanIsNonRecordingSpan(span) && !hasSpansEnabled(client.getOptions());\n\n  // When there's no recording span and an external propagation context is registered (e.g. OTLP\n  // integration), return empty to let the external propagator handle outgoing request propagation.\n  if (!span && hasExternalPropagationContext()) {\n    return {};\n  }\n\n  const sentryTrace = span && !isTwpPlaceholder ? spanToTraceHeader(span) : scopeToTraceHeader(scope);\n  const dsc = span ? getDynamicSamplingContextFromSpan(span) : getDynamicSamplingContextFromScope(client, scope);\n  const baggage = dynamicSamplingContextToSentryBaggageHeader(dsc);\n\n  const isValidSentryTraceHeader = TRACEPARENT_REGEXP.test(sentryTrace);\n  if (!isValidSentryTraceHeader) {\n    debug.warn('Invalid sentry-trace data. Cannot generate trace data');\n    return {};\n  }\n\n  const traceData: SerializedTraceData = {\n    'sentry-trace': sentryTrace,\n    baggage,\n  };\n\n  if (options.propagateTraceparent) {\n    traceData.traceparent = span && !isTwpPlaceholder ? spanToTraceparentHeader(span) : scopeToTraceparentHeader(scope);\n  }\n\n  return traceData;\n}\n\n/**\n * Get a sentry-trace header value for the given scope.\n */\nfunction scopeToTraceHeader(scope: Scope): string {\n  const { traceId, sampled, propagationSpanId } = scope.getPropagationContext();\n  return generateSentryTraceHeader(traceId, propagationSpanId, sampled);\n}\n\nfunction scopeToTraceparentHeader(scope: Scope): string {\n  const { traceId, sampled, propagationSpanId } = scope.getPropagationContext();\n  return generateTraceparentHeader(traceId, propagationSpanId, sampled);\n}\n", "import { getClient, getIsolationScope } from './currentScopes';\nimport type { Breadcrumb, BreadcrumbHint } from './types/breadcrumb';\nimport { consoleSandbox } from './utils/debug-logger';\nimport { dateTimestampInSeconds } from './utils/time';\n\n/**\n * Default maximum number of breadcrumbs added to an event. Can be overwritten\n * with {@link Options.maxBreadcrumbs}.\n */\nconst DEFAULT_BREADCRUMBS = 100;\n\n/**\n * Records a new breadcrumb which will be attached to future events.\n *\n * Breadcrumbs will be added to subsequent events to provide more context on\n * user's actions prior to an error or crash.\n */\nexport function addBreadcrumb(breadcrumb: Breadcrumb, hint?: BreadcrumbHint): void {\n  const client = getClient();\n  const isolationScope = getIsolationScope();\n\n  if (!client) return;\n\n  const { beforeBreadcrumb = null, maxBreadcrumbs = DEFAULT_BREADCRUMBS } = client.getOptions();\n\n  if (maxBreadcrumbs <= 0) return;\n\n  const timestamp = dateTimestampInSeconds();\n  const mergedBreadcrumb = { timestamp, ...breadcrumb };\n  const finalBreadcrumb = beforeBreadcrumb\n    ? consoleSandbox(() => beforeBreadcrumb(mergedBreadcrumb, hint))\n    : mergedBreadcrumb;\n\n  if (finalBreadcrumb === null) return;\n\n  if (client.emit) {\n    client.emit('beforeAddBreadcrumb', finalBreadcrumb, hint);\n  }\n\n  isolationScope.addBreadcrumb(finalBreadcrumb, maxBreadcrumbs);\n}\n", "import type { Client } from '../client';\nimport { getClient } from '../currentScopes';\nimport { defineIntegration } from '../integration';\nimport type { IntegrationFn } from '../types/integration';\nimport type { WrappedFunction } from '../types/wrappedfunction';\nimport { getOriginalFunction } from '../utils/object';\n\nconst INTEGRATION_NAME = 'FunctionToString' as const;\n\nconst SETUP_CLIENTS = new WeakMap<Client, boolean>();\n\nconst _functionToStringIntegration = (() => {\n  return {\n    name: INTEGRATION_NAME,\n    setupOnce() {\n      // eslint-disable-next-line @typescript-eslint/unbound-method\n      const originalFunctionToString = Function.prototype.toString;\n\n      // intrinsics (like Function.prototype) might be immutable in some environments\n      // e.g. Node with --frozen-intrinsics, XS (an embedded JavaScript engine) or SES (a JavaScript proposal)\n      try {\n        Function.prototype.toString = function (this: WrappedFunction, ...args: unknown[]): string {\n          const originalFunction = getOriginalFunction(this);\n          let unwrappedFunction: WrappedFunction | undefined;\n\n          try {\n            if (SETUP_CLIENTS.has(getClient() as Client) && originalFunction !== undefined) {\n              unwrappedFunction = originalFunction;\n            }\n          } catch {\n            // Reading the Sentry carrier off `getClient()` can throw a `SecurityError` when `this` (or the global\n            // object) is a `WindowProxy` whose browsing context was navigated cross-origin. The native\n            // `toString` never throws here, so fall back to it to avoid turning harmless introspection into noise.\n          }\n\n          return originalFunctionToString.apply(unwrappedFunction ?? this, args);\n        };\n      } catch {\n        // ignore errors here, just don't patch this\n      }\n    },\n    setup(client) {\n      SETUP_CLIENTS.set(client, true);\n    },\n  };\n}) satisfies IntegrationFn;\n\n/**\n * Patch toString calls to return proper name for wrapped functions.\n *\n * ```js\n * Sentry.init({\n *   integrations: [\n *     functionToStringIntegration(),\n *   ],\n * });\n * ```\n */\nexport const functionToStringIntegration = defineIntegration(_functionToStringIntegration);\n", "import { DEBUG_BUILD } from '../debug-build';\nimport { defineIntegration } from '../integration';\nimport type { Event } from '../types/event';\nimport type { IntegrationFn } from '../types/integration';\nimport type { StackFrame } from '../types/stackframe';\nimport { debug } from '../utils/debug-logger';\nimport { getPossibleEventMessages } from '../utils/eventUtils';\nimport { getEventDescription } from '../utils/misc';\nimport { stringMatchesSomePattern } from '../utils/string';\n\n// \"Script error.\" is hard coded into browsers for errors that it can't read.\n// this is the result of a script being pulled in from an external domain and CORS.\nconst DEFAULT_IGNORE_ERRORS = [\n  /^Script error\\.?$/,\n  /^Javascript error: Script error\\.? on line 0$/,\n  /^ResizeObserver loop completed with undelivered notifications.$/, // The browser logs this when a ResizeObserver handler takes a bit longer. Usually this is not an actual issue though. It indicates slowness.\n  /^Cannot redefine property: googletag$/, // This is thrown when google tag manager is used in combination with an ad blocker\n  /^Can't find variable: gmo$/, // Error from Google Search App https://issuetracker.google.com/issues/396043331\n  /^undefined is not an object \\(evaluating 'a\\.[A-Z]'\\)$/, // Random error that happens but not actionable or noticeable to end-users.\n  /can't redefine non-configurable property \"solana\"/, // Probably a browser extension or custom browser (Brave) throwing this error\n  /vv\\(\\)\\.getRestrictions is not a function/, // Error thrown by GTM, seemingly not affecting end-users\n  /Can't find variable: _AutofillCallbackHandler/, // Unactionable error in instagram webview https://developers.facebook.com/community/threads/320013549791141/\n  /Object Not Found Matching Id:\\d+, MethodName:simulateEvent/, // unactionable error from CEFSharp, a .NET library that embeds chromium in .NET apps\n  /^Java exception was raised during method invocation$/, // error from Facebook Mobile browser (https://github.com/getsentry/sentry-javascript/issues/15065)\n];\n\n/** Options for the EventFilters integration */\nexport interface EventFiltersOptions {\n  allowUrls: Array<string | RegExp>;\n  denyUrls: Array<string | RegExp>;\n  ignoreErrors: Array<string | RegExp>;\n  ignoreTransactions: Array<string | RegExp>;\n  ignoreInternal: boolean;\n  disableErrorDefaults: boolean;\n}\n\nconst INTEGRATION_NAME = 'EventFilters' as const;\n\n/**\n * An integration that filters out events (errors and transactions) based on:\n *\n * - (Errors) A curated list of known low-value or irrelevant errors (see {@link DEFAULT_IGNORE_ERRORS})\n * - (Errors) A list of error messages or urls/filenames passed in via\n *   - Top level Sentry.init options (`ignoreErrors`, `denyUrls`, `allowUrls`)\n *   - The same options passed to the integration directly via @param options\n * - (Transactions/Spans) A list of root span (transaction) names passed in via\n *   - Top level Sentry.init option (`ignoreTransactions`)\n *   - The same option passed to the integration directly via @param options\n *\n * Events filtered by this integration will not be sent to Sentry.\n */\nexport const eventFiltersIntegration = defineIntegration((options: Partial<EventFiltersOptions> = {}) => {\n  let mergedOptions: Partial<EventFiltersOptions> | undefined;\n  return {\n    name: INTEGRATION_NAME,\n    setup(client) {\n      const clientOptions = client.getOptions();\n      mergedOptions = _mergeOptions(options, clientOptions);\n    },\n    processEvent(event, _hint, client) {\n      if (!mergedOptions) {\n        const clientOptions = client.getOptions();\n        mergedOptions = _mergeOptions(options, clientOptions);\n      }\n      return _shouldDropEvent(event, mergedOptions) ? null : event;\n    },\n  };\n});\n\n/**\n * An integration that filters out events (errors and transactions) based on:\n *\n * - (Errors) A curated list of known low-value or irrelevant errors (see {@link DEFAULT_IGNORE_ERRORS})\n * - (Errors) A list of error messages or urls/filenames passed in via\n *   - Top level Sentry.init options (`ignoreErrors`, `denyUrls`, `allowUrls`)\n *   - The same options passed to the integration directly via @param options\n * - (Transactions/Spans) A list of root span (transaction) names passed in via\n *   - Top level Sentry.init option (`ignoreTransactions`)\n *   - The same option passed to the integration directly via @param options\n *\n * Events filtered by this integration will not be sent to Sentry.\n *\n * @deprecated this integration was renamed and will be removed in a future major version.\n * Use `eventFiltersIntegration` instead.\n */\nexport const inboundFiltersIntegration = defineIntegration(((options: Partial<EventFiltersOptions> = {}) => {\n  return {\n    ...eventFiltersIntegration(options),\n    name: 'InboundFilters' as const,\n  };\n}) satisfies IntegrationFn);\n\nfunction _mergeOptions(\n  internalOptions: Partial<EventFiltersOptions> = {},\n  clientOptions: Partial<EventFiltersOptions> = {},\n): Partial<EventFiltersOptions> {\n  return {\n    allowUrls: [...(internalOptions.allowUrls || []), ...(clientOptions.allowUrls || [])],\n    denyUrls: [...(internalOptions.denyUrls || []), ...(clientOptions.denyUrls || [])],\n    ignoreErrors: [\n      ...(internalOptions.ignoreErrors || []),\n      ...(clientOptions.ignoreErrors || []),\n      ...(internalOptions.disableErrorDefaults ? [] : DEFAULT_IGNORE_ERRORS),\n    ],\n    ignoreTransactions: [...(internalOptions.ignoreTransactions || []), ...(clientOptions.ignoreTransactions || [])],\n  };\n}\n\nfunction _shouldDropEvent(event: Event, options: Partial<EventFiltersOptions>): boolean {\n  if (!event.type) {\n    // Filter errors\n    if (_isIgnoredError(event, options.ignoreErrors)) {\n      DEBUG_BUILD &&\n        debug.warn(\n          `Event dropped due to being matched by \\`ignoreErrors\\` option.\\nEvent: ${getEventDescription(event)}`,\n        );\n      return true;\n    }\n    if (_isUselessError(event)) {\n      DEBUG_BUILD &&\n        debug.warn(\n          `Event dropped due to not having an error message, error type or stacktrace.\\nEvent: ${getEventDescription(\n            event,\n          )}`,\n        );\n      return true;\n    }\n    if (_isDeniedUrl(event, options.denyUrls)) {\n      DEBUG_BUILD &&\n        debug.warn(\n          `Event dropped due to being matched by \\`denyUrls\\` option.\\nEvent: ${getEventDescription(\n            event,\n          )}.\\nUrl: ${_getEventFilterUrl(event)}`,\n        );\n      return true;\n    }\n    if (!_isAllowedUrl(event, options.allowUrls)) {\n      DEBUG_BUILD &&\n        debug.warn(\n          `Event dropped due to not being matched by \\`allowUrls\\` option.\\nEvent: ${getEventDescription(\n            event,\n          )}.\\nUrl: ${_getEventFilterUrl(event)}`,\n        );\n      return true;\n    }\n  } else if (event.type === 'transaction') {\n    // Filter transactions\n\n    if (_isIgnoredTransaction(event, options.ignoreTransactions)) {\n      DEBUG_BUILD &&\n        debug.warn(\n          `Event dropped due to being matched by \\`ignoreTransactions\\` option.\\nEvent: ${getEventDescription(event)}`,\n        );\n      return true;\n    }\n  }\n  return false;\n}\n\nfunction _isIgnoredError(event: Event, ignoreErrors?: Array<string | RegExp>): boolean {\n  if (!ignoreErrors?.length) {\n    return false;\n  }\n\n  return getPossibleEventMessages(event).some(message => stringMatchesSomePattern(message, ignoreErrors));\n}\n\nfunction _isIgnoredTransaction(event: Event, ignoreTransactions?: Array<string | RegExp>): boolean {\n  if (!ignoreTransactions?.length) {\n    return false;\n  }\n\n  const name = event.transaction;\n  return name ? stringMatchesSomePattern(name, ignoreTransactions) : false;\n}\n\nfunction _isDeniedUrl(event: Event, denyUrls?: Array<string | RegExp>): boolean {\n  if (!denyUrls?.length) {\n    return false;\n  }\n  const url = _getEventFilterUrl(event);\n  return !url ? false : stringMatchesSomePattern(url, denyUrls);\n}\n\nfunction _isAllowedUrl(event: Event, allowUrls?: Array<string | RegExp>): boolean {\n  if (!allowUrls?.length) {\n    return true;\n  }\n  const url = _getEventFilterUrl(event);\n  return !url ? true : stringMatchesSomePattern(url, allowUrls);\n}\n\nfunction _getLastValidUrl(frames: StackFrame[] = []): string | null {\n  for (let i = frames.length - 1; i >= 0; i--) {\n    const frame = frames[i];\n\n    if (frame && frame.filename !== '<anonymous>' && frame.filename !== '[native code]') {\n      return frame.filename || null;\n    }\n  }\n\n  return null;\n}\n\nfunction _getEventFilterUrl(event: Event): string | null {\n  try {\n    // If there are linked exceptions or exception aggregates we only want to match against the top frame of the \"root\" (the main exception)\n    // The root always comes last in linked exceptions\n    const rootException = [...(event.exception?.values ?? [])]\n      .reverse()\n      .find(value => value.mechanism?.parent_id === undefined && value.stacktrace?.frames?.length);\n    const frames = rootException?.stacktrace?.frames;\n    return frames ? _getLastValidUrl(frames) : null;\n  } catch {\n    DEBUG_BUILD && debug.error(`Cannot extract url for event ${getEventDescription(event)}`);\n    return null;\n  }\n}\n\nfunction _isUselessError(event: Event): boolean {\n  // We only want to consider events for dropping that actually have recorded exception values.\n  if (!event.exception?.values?.length) {\n    return false;\n  }\n\n  return (\n    // No top-level message\n    !event.message &&\n    // There are no exception values that have a stacktrace, a non-generic-Error type or value\n    !event.exception.values.some(value => value.stacktrace || (value.type && value.type !== 'Error') || value.value)\n  );\n}\n", "import type { ExtendedError } from '../types/error';\nimport type { Event, EventHint } from '../types/event';\nimport type { Exception } from '../types/exception';\nimport type { StackParser } from '../types/stacktrace';\nimport { isError } from './is';\n\n/**\n * Creates exceptions inside `event.exception.values` for errors that are nested on properties based on the `key` parameter.\n */\nexport function applyAggregateErrorsToEvent(\n  exceptionFromErrorImplementation: (stackParser: StackParser, ex: Error) => Exception,\n  parser: StackParser,\n  key: string,\n  limit: number,\n  event: Event,\n  hint?: EventHint,\n): void {\n  if (!event.exception?.values || !hint || !isError(hint.originalException)) {\n    return;\n  }\n\n  // Generally speaking the last item in `event.exception.values` is the exception originating from the original Error\n  const originalException: Exception | undefined =\n    event.exception.values.length > 0 ? event.exception.values[event.exception.values.length - 1] : undefined;\n\n  // We only create exception grouping if there is an exception in the event.\n  if (originalException) {\n    event.exception.values = aggregateExceptionsFromError(\n      exceptionFromErrorImplementation,\n      parser,\n      limit,\n      hint.originalException as ExtendedError,\n      key,\n      event.exception.values,\n      originalException,\n      0,\n    );\n  }\n}\n\nfunction aggregateExceptionsFromError(\n  exceptionFromErrorImplementation: (stackParser: StackParser, ex: Error) => Exception,\n  parser: StackParser,\n  limit: number,\n  error: ExtendedError,\n  key: string,\n  prevExceptions: Exception[],\n  exception: Exception,\n  exceptionId: number,\n): Exception[] {\n  if (prevExceptions.length >= limit + 1) {\n    return prevExceptions;\n  }\n\n  let newExceptions = [...prevExceptions];\n\n  // Recursively call this function in order to walk down a chain of errors\n  if (isError(error[key])) {\n    applyExceptionGroupFieldsForParentException(exception, exceptionId, error);\n    const newException = exceptionFromErrorImplementation(parser, error[key]);\n    const newExceptionId = newExceptions.length;\n    applyExceptionGroupFieldsForChildException(newException, key, newExceptionId, exceptionId);\n    newExceptions = aggregateExceptionsFromError(\n      exceptionFromErrorImplementation,\n      parser,\n      limit,\n      error[key] as ExtendedError,\n      key,\n      [newException, ...newExceptions],\n      newException,\n      newExceptionId,\n    );\n  }\n\n  // This will create exception grouping for AggregateErrors\n  // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/AggregateError\n  if (isExceptionGroup(error)) {\n    error.errors.forEach((childError, i) => {\n      if (isError(childError)) {\n        applyExceptionGroupFieldsForParentException(exception, exceptionId, error);\n        const newException = exceptionFromErrorImplementation(parser, childError);\n        const newExceptionId = newExceptions.length;\n        applyExceptionGroupFieldsForChildException(newException, `errors[${i}]`, newExceptionId, exceptionId);\n        newExceptions = aggregateExceptionsFromError(\n          exceptionFromErrorImplementation,\n          parser,\n          limit,\n          childError as ExtendedError,\n          key,\n          [newException, ...newExceptions],\n          newException,\n          newExceptionId,\n        );\n      }\n    });\n  }\n\n  return newExceptions;\n}\n\nfunction isExceptionGroup(error: ExtendedError): error is ExtendedError & { errors: unknown[] } {\n  return Array.isArray(error.errors);\n}\n\nfunction applyExceptionGroupFieldsForParentException(\n  exception: Exception,\n  exceptionId: number,\n  error: ExtendedError,\n): void {\n  exception.mechanism = {\n    handled: true,\n    type: 'auto.core.linked_errors',\n    ...(isExceptionGroup(error) && { is_exception_group: true }),\n    ...exception.mechanism,\n    exception_id: exceptionId,\n  };\n}\n\nfunction applyExceptionGroupFieldsForChildException(\n  exception: Exception,\n  source: string,\n  exceptionId: number,\n  parentId: number | undefined,\n): void {\n  exception.mechanism = {\n    handled: true,\n    ...exception.mechanism,\n    type: 'chained',\n    source,\n    exception_id: exceptionId,\n    parent_id: parentId,\n  };\n}\n", "import type { Client } from '../client';\nimport type { Event, EventHint } from '../types/event';\nimport type { Exception } from '../types/exception';\nimport type { Extras } from '../types/extra';\nimport type { Mechanism } from '../types/mechanism';\nimport type { ParameterizedString } from '../types/parameterize';\nimport type { SeverityLevel } from '../types/severity';\nimport type { StackFrame } from '../types/stackframe';\nimport type { StackParser } from '../types/stacktrace';\nimport { isError, isErrorEvent, isParameterizedString, isPlainObject } from './is';\nimport { addExceptionMechanism, addExceptionTypeValue } from './misc';\nimport { normalizeToSize } from './normalize';\nimport { extractExceptionKeysForMessage } from './object';\n\n/**\n * Extracts stack frames from the error.stack string\n */\nexport function parseStackFrames(stackParser: StackParser, error: Error): StackFrame[] {\n  return stackParser(error.stack || '', 1);\n}\n\nfunction hasSentryFetchUrlHost(error: unknown): error is Error & { __sentry_fetch_url_host__: string } {\n  return isError(error) && '__sentry_fetch_url_host__' in error && typeof error.__sentry_fetch_url_host__ === 'string';\n}\n\n/**\n * Enhances the error message with the hostname for better Sentry error reporting.\n * This allows third-party packages to still match on the original error message,\n * while Sentry gets the enhanced version with context.\n *\n * Only used internally\n * @hidden\n */\nexport function _enhanceErrorWithSentryInfo<T extends Error>(error: T): string {\n  // If the error has a __sentry_fetch_url_host__ property (added by fetch instrumentation),\n  // enhance the error message with the hostname.\n  if (hasSentryFetchUrlHost(error)) {\n    return `${error.message} (${error.__sentry_fetch_url_host__})`;\n  }\n\n  return error.message;\n}\n\n/**\n * Extracts stack frames from the error and builds a Sentry Exception\n */\nexport function exceptionFromError(stackParser: StackParser, error: Error): Exception {\n  const exception: Exception = {\n    type: error.name || error.constructor.name,\n    value: _enhanceErrorWithSentryInfo(error),\n  };\n\n  const frames = parseStackFrames(stackParser, error);\n  if (frames.length) {\n    exception.stacktrace = { frames };\n  }\n\n  return exception;\n}\n\n/** If a plain object has a property that is an `Error`, return this error. */\nfunction getErrorPropertyFromObject(obj: Record<string, unknown>): Error | undefined {\n  for (const prop in obj) {\n    if (Object.prototype.hasOwnProperty.call(obj, prop)) {\n      const value = obj[prop];\n      if (isError(value)) {\n        return value;\n      }\n    }\n  }\n\n  return undefined;\n}\n\nfunction getMessageForObject(exception: Record<string, unknown>): string {\n  if ('name' in exception && typeof exception.name === 'string') {\n    let message = `'${exception.name}' captured as exception`;\n\n    if ('message' in exception && typeof exception.message === 'string') {\n      message += ` with message '${exception.message}'`;\n    }\n\n    return message;\n  } else if ('message' in exception && typeof exception.message === 'string') {\n    return exception.message;\n  }\n\n  const keys = extractExceptionKeysForMessage(exception);\n\n  // Some ErrorEvent instances do not have an `error` property, which is why they are not handled before\n  // We still want to try to get a decent message for these cases\n  if (isErrorEvent(exception)) {\n    return `Event \\`ErrorEvent\\` captured as exception with message \\`${exception.message}\\``;\n  }\n\n  const className = getObjectClassName(exception);\n\n  return `${\n    className && className !== 'Object' ? `'${className}'` : 'Object'\n  } captured as exception with keys: ${keys}`;\n}\n\nfunction getObjectClassName(obj: unknown): string | undefined | void {\n  try {\n    const prototype: unknown | null = Object.getPrototypeOf(obj);\n    return prototype ? prototype.constructor.name : undefined;\n  } catch {\n    // ignore errors here\n  }\n}\n\nfunction getException(\n  client: Client,\n  mechanism: Mechanism,\n  exception: unknown,\n  hint?: EventHint,\n): [Error, Extras | undefined] {\n  if (isError(exception)) {\n    return [exception, undefined];\n  }\n\n  // Mutate this!\n  mechanism.synthetic = true;\n\n  if (isPlainObject(exception)) {\n    const normalizeDepth = client?.getOptions().normalizeDepth;\n    const extras = { ['__serialized__']: normalizeToSize(exception, normalizeDepth) };\n\n    const errorFromProp = getErrorPropertyFromObject(exception);\n    if (errorFromProp) {\n      return [errorFromProp, extras];\n    }\n\n    const message = getMessageForObject(exception);\n    const ex = hint?.syntheticException || new Error(message);\n    ex.message = message;\n\n    return [ex, extras];\n  }\n\n  // This handles when someone does: `throw \"something awesome\";`\n  // We use synthesized Error here so we can extract a (rough) stack trace.\n  const ex = hint?.syntheticException || new Error(exception as string);\n  ex.message = `${exception}`;\n\n  return [ex, undefined];\n}\n\n/**\n * Builds and Event from a Exception\n * @hidden\n */\nexport function eventFromUnknownInput(\n  client: Client,\n  stackParser: StackParser,\n  exception: unknown,\n  hint?: EventHint,\n): Event {\n  const providedMechanism: Mechanism | undefined = hint?.data && (hint.data as { mechanism: Mechanism }).mechanism;\n  const mechanism: Mechanism = providedMechanism || {\n    handled: true,\n    type: 'generic',\n  };\n\n  const [ex, extras] = getException(client, mechanism, exception, hint);\n\n  const event: Event = {\n    exception: {\n      values: [exceptionFromError(stackParser, ex)],\n    },\n  };\n\n  if (extras) {\n    event.extra = extras;\n  }\n\n  addExceptionTypeValue(event, undefined, undefined);\n  addExceptionMechanism(event, mechanism);\n\n  return {\n    ...event,\n    event_id: hint?.event_id,\n  };\n}\n\n/**\n * Builds and Event from a Message\n * @hidden\n */\nexport function eventFromMessage(\n  stackParser: StackParser,\n  message: ParameterizedString,\n  level: SeverityLevel = 'info',\n  hint?: EventHint,\n  attachStacktrace?: boolean,\n): Event {\n  const event: Event = {\n    event_id: hint?.event_id,\n    level,\n  };\n\n  if (attachStacktrace && hint?.syntheticException) {\n    const frames = parseStackFrames(stackParser, hint.syntheticException);\n    if (frames.length) {\n      event.exception = {\n        values: [\n          {\n            value: message,\n            stacktrace: { frames },\n          },\n        ],\n      };\n      addExceptionMechanism(event, { synthetic: true });\n    }\n  }\n\n  if (isParameterizedString(message)) {\n    const { __sentry_template_string__, __sentry_template_values__ } = message;\n\n    event.logentry = {\n      message: __sentry_template_string__,\n      params: __sentry_template_values__,\n    };\n    return event;\n  }\n\n  event.message = message;\n  return event;\n}\n", "import type { Event } from './types/event';\nimport type { StackParser } from './types/stacktrace';\nimport { GLOBAL_OBJ } from './utils/worldwide';\n\n/** Keys are source filename/url, values are metadata objects. */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst filenameMetadataMap = new Map<string, any>();\n/** Set of stack strings that have already been parsed. */\nconst parsedStacks = new Set<string>();\n\n/**\n * Builds a map of filenames to module metadata from the global _sentryModuleMetadata object.\n * This is useful for forwarding metadata from web workers to the main thread.\n *\n * @param parser - Stack parser to use for extracting filenames from stack traces\n * @returns A map of filename to metadata object\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function getFilenameToMetadataMap(parser: StackParser): Record<string, any> {\n  if (!GLOBAL_OBJ._sentryModuleMetadata) {\n    return {};\n  }\n\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  const filenameMap: Record<string, any> = {};\n\n  for (const stack of Object.keys(GLOBAL_OBJ._sentryModuleMetadata)) {\n    const metadata = GLOBAL_OBJ._sentryModuleMetadata[stack];\n    const frames = parser(stack);\n\n    for (const frame of frames.reverse()) {\n      if (frame.filename) {\n        filenameMap[frame.filename] = metadata;\n        break;\n      }\n    }\n  }\n\n  return filenameMap;\n}\n\nfunction ensureMetadataStacksAreParsed(parser: StackParser): void {\n  if (!GLOBAL_OBJ._sentryModuleMetadata) {\n    return;\n  }\n\n  for (const stack of Object.keys(GLOBAL_OBJ._sentryModuleMetadata)) {\n    const metadata = GLOBAL_OBJ._sentryModuleMetadata[stack];\n\n    if (parsedStacks.has(stack)) {\n      continue;\n    }\n\n    // Ensure this stack doesn't get parsed again\n    parsedStacks.add(stack);\n\n    const frames = parser(stack);\n\n    // Go through the frames starting from the top of the stack and find the first one with a filename\n    for (const frame of frames.reverse()) {\n      if (frame.filename) {\n        // Save the metadata for this filename\n        filenameMetadataMap.set(frame.filename, metadata);\n        break;\n      }\n    }\n  }\n}\n\n/**\n * Retrieve metadata for a specific JavaScript file URL.\n *\n * Metadata is injected by the Sentry bundler plugins using the `_experiments.moduleMetadata` config option.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function getMetadataForUrl(parser: StackParser, filename: string): any | undefined {\n  ensureMetadataStacksAreParsed(parser);\n  return filenameMetadataMap.get(filename);\n}\n\n/**\n * Adds metadata to stack frames.\n *\n * Metadata is injected by the Sentry bundler plugins using the `_experiments.moduleMetadata` config option.\n */\nexport function addMetadataToStackFrames(parser: StackParser, event: Event): void {\n  event.exception?.values?.forEach(exception => {\n    exception.stacktrace?.frames?.forEach(frame => {\n      if (!frame.filename || frame.module_metadata) {\n        return;\n      }\n\n      const metadata = getMetadataForUrl(parser, frame.filename);\n\n      if (metadata) {\n        frame.module_metadata = metadata;\n      }\n    });\n  });\n}\n\n/**\n * Strips metadata from stack frames.\n */\nexport function stripMetadataFromStackFrames(event: Event): void {\n  event.exception?.values?.forEach(exception => {\n    exception.stacktrace?.frames?.forEach(frame => {\n      delete frame.module_metadata;\n    });\n  });\n}\n", "import { defineIntegration } from '../integration';\nimport { addMetadataToStackFrames, stripMetadataFromStackFrames } from '../metadata';\nimport type { EventItem } from '../types/envelope';\nimport { forEachEnvelopeItem } from '../utils/envelope';\n\n/**\n * Adds module metadata to stack frames.\n *\n * Metadata can be injected by the Sentry bundler plugins using the `moduleMetadata` config option.\n *\n * When this integration is added, the metadata passed to the bundler plugin is added to the stack frames of all events\n * under the `module_metadata` property. This can be used to help in tagging or routing of events from different teams\n * our sources\n */\nexport const moduleMetadataIntegration = defineIntegration(() => {\n  return {\n    name: 'ModuleMetadata' as const,\n    setup(client) {\n      // We need to strip metadata from stack frames before sending them to Sentry since these are client side only.\n      client.on('beforeEnvelope', envelope => {\n        forEachEnvelopeItem(envelope, (item, type) => {\n          if (type === 'event') {\n            const event = Array.isArray(item) ? (item as EventItem)[1] : undefined;\n\n            if (event) {\n              stripMetadataFromStackFrames(event);\n              item[1] = event;\n            }\n          }\n        });\n      });\n\n      client.on('applyFrameMetadata', event => {\n        // Only apply stack frame metadata to error events\n        if (event.type) {\n          return;\n        }\n\n        const stackParser = client.getOptions().stackParser;\n        addMetadataToStackFrames(stackParser, event);\n      });\n    },\n  };\n});\n", "/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/ban-types */\nimport { DEBUG_BUILD } from '../debug-build';\nimport type { ConsoleLevel, HandlerDataConsole } from '../types/instrument';\nimport { CONSOLE_LEVELS, originalConsoleMethods } from '../utils/debug-logger';\nimport { fill } from '../utils/object';\nimport { stringMatchesSomePattern } from '../utils/string';\nimport { GLOBAL_OBJ } from '../utils/worldwide';\nimport { addHandler, maybeInstrument, triggerHandlers } from './handlers';\nimport { debug } from '../utils/debug-logger';\n\n/**\n * Filter out console messages that match the given strings or regular expressions.\n * These will neither be passed to the handler, and they will also not be logged to the user, unless they have debug enabled.\n * This is a set to avoid duplicate integration setups to add the same filter multiple times.\n */\nconst _filter = new Set<string | RegExp>([]);\n\n/**\n * Add an instrumentation handler for when a console.xxx method is called.\n * Returns a function to remove the handler.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nexport function addConsoleInstrumentationHandler(handler: (data: HandlerDataConsole) => void): () => void {\n  const type = 'console';\n  const removeHandler = addHandler(type, handler);\n  maybeInstrument(type, instrumentConsole);\n  return removeHandler;\n}\n\n/**\n * Add a filter to the console instrumentation to filter out console messages that match the given strings or regular expressions.\n * Returns a function to remove the filter.\n */\nexport function addConsoleInstrumentationFilter(filter: (string | RegExp)[]): () => void {\n  for (const f of filter) {\n    _filter.add(f);\n  }\n\n  return () => {\n    for (const f of filter) {\n      _filter.delete(f);\n    }\n  };\n}\n\n/** Only exported for tests. */\nexport function _INTERNAL_resetConsoleInstrumentationOptions(): void {\n  _filter.clear();\n}\n\n// The console levels *this* copy of the SDK has already wrapped. A copy must wrap each level at\n// most once: re-wrapping overwrites `originalConsoleMethods[level]` with a function that itself\n// reads `originalConsoleMethods[level]`, so calling through to the \"original\" (here and in\n// `consoleSandbox`) re-enters a wrapper indefinitely, ending in a `RangeError: Maximum call stack\n// size exceeded`. This can happen e.g. in React Native when instrumentation state is re-initialized\n// while the console stays wrapped. See getsentry/sentry-react-native SDK-CRASHES-REACT-NATIVE-5HZ.\n// We intentionally track this per copy rather than checking for the shared `__sentry_original__`\n// marker: a *different* SDK copy's wrapper (e.g. separate CDN bundles that each inline\n// `@sentry/core`) is safe to wrap since its call chain resolves down to the native method, and\n// skipping it would silently drop that copy's console handlers (breadcrumbs, `captureConsole`).\nconst instrumentedLevels = new Set<ConsoleLevel>();\n\n/** Only exported for tests. */\nexport function instrumentConsole(): void {\n  if (!('console' in GLOBAL_OBJ)) {\n    return;\n  }\n\n  CONSOLE_LEVELS.forEach(function (level: ConsoleLevel): void {\n    if (instrumentedLevels.has(level) || !(level in GLOBAL_OBJ.console)) {\n      return;\n    }\n\n    instrumentedLevels.add(level);\n\n    fill(GLOBAL_OBJ.console, level, function (originalConsoleMethod: () => any): Function {\n      originalConsoleMethods[level] = originalConsoleMethod;\n\n      return function (...args: any[]): void {\n        const firstArg = args[0];\n        const log = originalConsoleMethods[level];\n\n        const isFiltered = _filter.size && typeof firstArg === 'string' && stringMatchesSomePattern(firstArg, _filter);\n\n        // Only trigger handlers for non-filtered messages\n        if (!isFiltered) {\n          triggerHandlers('console', { args, level } as HandlerDataConsole);\n        }\n\n        // Only log filtered messages in debug mode\n        if (!isFiltered || (DEBUG_BUILD && debug.isEnabled())) {\n          // Call original console method\n          log?.apply(GLOBAL_OBJ.console, args);\n        }\n      };\n    });\n  });\n}\n", "import type { SeverityLevel } from '../types/severity';\n\n/**\n * Converts a string-based level into a `SeverityLevel`, normalizing it along the way.\n *\n * @param level String representation of desired `SeverityLevel`.\n * @returns The `SeverityLevel` corresponding to the given string, or 'log' if the string isn't a valid level.\n */\nexport function severityLevelFromString(level: SeverityLevel | string): SeverityLevel {\n  return (\n    level === 'warn' ? 'warning' : ['fatal', 'error', 'warning', 'log', 'info', 'debug'].includes(level) ? level : 'log'\n  ) as SeverityLevel;\n}\n", "import { getClient, withScope } from '../currentScopes';\nimport { captureException } from '../exports';\nimport { addConsoleInstrumentationHandler } from '../instrument/console';\nimport { defineIntegration } from '../integration';\nimport type { CaptureContext } from '../scope';\nimport type { IntegrationFn } from '../types/integration';\nimport { CONSOLE_LEVELS } from '../utils/debug-logger';\nimport { addExceptionMechanism } from '../utils/misc';\nimport { severityLevelFromString } from '../utils/severity';\nimport { safeJoin } from '../utils/string';\nimport { GLOBAL_OBJ } from '../utils/worldwide';\n\ninterface CaptureConsoleOptions {\n  levels?: string[];\n\n  /**\n   * By default, Sentry will mark captured console messages as handled.\n   * Set this to `false` if you want to mark them as unhandled instead.\n   *\n   * @default true\n   */\n  handled?: boolean;\n}\n\nconst INTEGRATION_NAME = 'CaptureConsole' as const;\n\nconst _captureConsoleIntegration = ((options: CaptureConsoleOptions = {}) => {\n  const levels = options.levels || CONSOLE_LEVELS;\n  const handled = options.handled ?? true;\n\n  return {\n    name: INTEGRATION_NAME,\n    setup(client) {\n      if (!('console' in GLOBAL_OBJ)) {\n        return;\n      }\n\n      addConsoleInstrumentationHandler(({ args, level }) => {\n        if (getClient() !== client || !levels.includes(level)) {\n          return;\n        }\n\n        consoleHandler(args, level, handled);\n      });\n    },\n  };\n}) satisfies IntegrationFn;\n\n/**\n * Send Console API calls as Sentry Events.\n */\nexport const captureConsoleIntegration = defineIntegration(_captureConsoleIntegration);\n\nfunction consoleHandler(args: unknown[], level: string, handled: boolean): void {\n  const severityLevel = severityLevelFromString(level);\n\n  /*\n    We create this error here already to attach a stack trace to captured messages,\n    if users set `attachStackTrace` to `true` in Sentry.init.\n    We do this here already because we want to minimize the number of Sentry SDK stack frames\n    within the error. Technically, Client.captureMessage will also do it but this happens several\n    stack frames deeper.\n  */\n  const syntheticException = new Error();\n\n  const captureContext: CaptureContext = {\n    level: severityLevelFromString(level),\n    extra: {\n      arguments: args,\n    },\n  };\n\n  withScope(scope => {\n    scope.addEventProcessor(event => {\n      event.logger = 'console';\n\n      addExceptionMechanism(event, {\n        handled,\n        type: 'auto.core.capture_console',\n      });\n\n      return event;\n    });\n\n    if (level === 'assert') {\n      if (!args[0]) {\n        const message = `Assertion failed: ${safeJoin(args.slice(1), ' ') || 'console.assert'}`;\n        scope.setExtra('arguments', args.slice(1));\n        scope.captureMessage(message, severityLevel, { captureContext, syntheticException });\n      }\n      return;\n    }\n\n    const error = args.find(arg => arg instanceof Error);\n    if (error) {\n      captureException(error, captureContext);\n      return;\n    }\n\n    const message = safeJoin(args, ' ');\n    scope.captureMessage(message, severityLevel, { captureContext, syntheticException });\n  });\n}\n", "import { DEBUG_BUILD } from '../debug-build';\nimport { defineIntegration } from '../integration';\nimport type { Event } from '../types/event';\nimport type { Exception } from '../types/exception';\nimport type { IntegrationFn } from '../types/integration';\nimport type { StackFrame } from '../types/stackframe';\nimport { debug } from '../utils/debug-logger';\nimport { getFramesFromEvent } from '../utils/stacktrace';\n\nconst INTEGRATION_NAME = 'Dedupe' as const;\n\nconst _dedupeIntegration = (() => {\n  let previousEvent: Event | undefined;\n\n  return {\n    name: INTEGRATION_NAME,\n    processEvent(currentEvent) {\n      // We want to ignore any non-error type events, e.g. transactions or replays\n      // These should never be deduped, and also not be compared against as _previousEvent.\n      if (currentEvent.type) {\n        return currentEvent;\n      }\n\n      // Juuust in case something goes wrong\n      try {\n        if (_shouldDropEvent(currentEvent, previousEvent)) {\n          DEBUG_BUILD && debug.warn('Event dropped due to being a duplicate of previously captured event.');\n          return null;\n        }\n      } catch {} // eslint-disable-line no-empty\n\n      return (previousEvent = currentEvent);\n    },\n  };\n}) satisfies IntegrationFn;\n\n/**\n * Deduplication filter.\n */\nexport const dedupeIntegration = defineIntegration(_dedupeIntegration);\n\n/** only exported for tests. */\nexport function _shouldDropEvent(currentEvent: Event, previousEvent?: Event): boolean {\n  if (!previousEvent) {\n    return false;\n  }\n\n  if (_isSameMessageEvent(currentEvent, previousEvent)) {\n    return true;\n  }\n\n  if (_isSameExceptionEvent(currentEvent, previousEvent)) {\n    return true;\n  }\n\n  return false;\n}\n\nfunction _isSameMessageEvent(currentEvent: Event, previousEvent: Event): boolean {\n  const currentMessage = currentEvent.message;\n  const previousMessage = previousEvent.message;\n\n  // If neither event has a message property, they were both exceptions, so bail out\n  if (!currentMessage && !previousMessage) {\n    return false;\n  }\n\n  // If only one event has a stacktrace, but not the other one, they are not the same\n  if ((currentMessage && !previousMessage) || (!currentMessage && previousMessage)) {\n    return false;\n  }\n\n  if (currentMessage !== previousMessage) {\n    return false;\n  }\n\n  if (!_isSameFingerprint(currentEvent, previousEvent)) {\n    return false;\n  }\n\n  if (!_isSameStacktrace(currentEvent, previousEvent)) {\n    return false;\n  }\n\n  return true;\n}\n\nfunction _isSameExceptionEvent(currentEvent: Event, previousEvent: Event): boolean {\n  const previousException = _getExceptionFromEvent(previousEvent);\n  const currentException = _getExceptionFromEvent(currentEvent);\n\n  if (!previousException || !currentException) {\n    return false;\n  }\n\n  if (previousException.type !== currentException.type || previousException.value !== currentException.value) {\n    return false;\n  }\n\n  if (!_isSameFingerprint(currentEvent, previousEvent)) {\n    return false;\n  }\n\n  if (!_isSameStacktrace(currentEvent, previousEvent)) {\n    return false;\n  }\n\n  return true;\n}\n\nfunction _isSameStacktrace(currentEvent: Event, previousEvent: Event): boolean {\n  let currentFrames = getFramesFromEvent(currentEvent);\n  let previousFrames = getFramesFromEvent(previousEvent);\n\n  // If neither event has a stacktrace, they are assumed to be the same\n  if (!currentFrames && !previousFrames) {\n    return true;\n  }\n\n  // If only one event has a stacktrace, but not the other one, they are not the same\n  if ((currentFrames && !previousFrames) || (!currentFrames && previousFrames)) {\n    return false;\n  }\n\n  currentFrames = currentFrames as StackFrame[];\n  previousFrames = previousFrames as StackFrame[];\n\n  // If number of frames differ, they are not the same\n  if (previousFrames.length !== currentFrames.length) {\n    return false;\n  }\n\n  // Otherwise, compare the two\n  for (let i = 0; i < previousFrames.length; i++) {\n    // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n    const frameA = previousFrames[i]!;\n    // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n    const frameB = currentFrames[i]!;\n\n    if (\n      frameA.filename !== frameB.filename ||\n      frameA.lineno !== frameB.lineno ||\n      frameA.colno !== frameB.colno ||\n      frameA.function !== frameB.function\n    ) {\n      return false;\n    }\n  }\n\n  return true;\n}\n\nfunction _isSameFingerprint(currentEvent: Event, previousEvent: Event): boolean {\n  let currentFingerprint = currentEvent.fingerprint;\n  let previousFingerprint = previousEvent.fingerprint;\n\n  // If neither event has a fingerprint, they are assumed to be the same\n  if (!currentFingerprint && !previousFingerprint) {\n    return true;\n  }\n\n  // If only one event has a fingerprint, but not the other one, they are not the same\n  if ((currentFingerprint && !previousFingerprint) || (!currentFingerprint && previousFingerprint)) {\n    return false;\n  }\n\n  currentFingerprint = currentFingerprint as string[];\n  previousFingerprint = previousFingerprint as string[];\n\n  // Otherwise, compare the two\n  try {\n    return !!(currentFingerprint.join('') === previousFingerprint.join(''));\n  } catch {\n    return false;\n  }\n}\n\nfunction _getExceptionFromEvent(event: Event): Exception | undefined {\n  return event.exception?.values?.[0];\n}\n", "import { DEBUG_BUILD } from '../debug-build';\nimport { defineIntegration } from '../integration';\nimport type { Contexts } from '../types/context';\nimport type { ExtendedError } from '../types/error';\nimport type { Event, EventHint } from '../types/event';\nimport type { IntegrationFn } from '../types/integration';\nimport { debug } from '../utils/debug-logger';\nimport { isError, isPlainObject } from '../utils/is';\nimport { normalize } from '../utils/normalize';\nimport { setSkipNormalizationHint } from '../utils/normalizationHints';\nimport { truncate } from '../utils/string';\n\nconst INTEGRATION_NAME = 'ExtraErrorData' as const;\n\ninterface ExtraErrorDataOptions {\n  /**\n   * The object depth up to which to capture data on error objects.\n   */\n  depth: number;\n\n  /**\n   * Whether to capture error causes. Defaults to true.\n   *\n   * More information: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause\n   */\n  captureErrorCause: boolean;\n}\n\n/**\n * Extract additional data for from original exceptions.\n */\nconst _extraErrorDataIntegration = ((options: Partial<ExtraErrorDataOptions> = {}) => {\n  const { depth = 3, captureErrorCause = true } = options;\n  return {\n    name: INTEGRATION_NAME,\n    processEvent(event, hint, client) {\n      const { maxValueLength } = client.getOptions();\n      return _enhanceEventWithErrorData(event, hint, depth, captureErrorCause, maxValueLength);\n    },\n  };\n}) satisfies IntegrationFn;\n\nexport const extraErrorDataIntegration = defineIntegration(_extraErrorDataIntegration);\n\nfunction _enhanceEventWithErrorData(\n  event: Event,\n  hint: EventHint = {},\n  depth: number,\n  captureErrorCause: boolean,\n  maxValueLength: number | undefined,\n): Event {\n  if (!hint.originalException || !isError(hint.originalException)) {\n    return event;\n  }\n  const exceptionName = (hint.originalException as ExtendedError).name || hint.originalException.constructor.name;\n\n  const errorData = _extractErrorData(hint.originalException as ExtendedError, captureErrorCause, maxValueLength);\n\n  if (errorData) {\n    const contexts: Contexts = {\n      ...event.contexts,\n    };\n\n    const normalizedErrorData = normalize(errorData, depth);\n\n    if (isPlainObject(normalizedErrorData)) {\n      // We mark the error data as \"already normalized\" here, because we don't want other normalization procedures to\n      // potentially truncate the data we just already normalized, with a certain depth setting.\n      setSkipNormalizationHint(normalizedErrorData);\n      contexts[exceptionName] = normalizedErrorData;\n    }\n\n    return {\n      ...event,\n      contexts,\n    };\n  }\n\n  return event;\n}\n\n/**\n * Extract extra information from the Error object\n */\nfunction _extractErrorData(\n  error: ExtendedError,\n  captureErrorCause: boolean,\n  maxValueLength: number | undefined,\n): Record<string, unknown> | null {\n  // We are trying to enhance already existing event, so no harm done if it won't succeed\n  try {\n    const nativeKeys = [\n      'name',\n      'message',\n      'stack',\n      'line',\n      'column',\n      'fileName',\n      'lineNumber',\n      'columnNumber',\n      'toJSON',\n    ];\n\n    const extraErrorInfo: Record<string, unknown> = {};\n\n    // We want only enumerable properties, thus `getOwnPropertyNames` is redundant here, as we filter keys anyway.\n    for (const key of Object.keys(error)) {\n      if (nativeKeys.indexOf(key) !== -1) {\n        continue;\n      }\n      const value = error[key];\n      extraErrorInfo[key] =\n        isError(value) || typeof value === 'string'\n          ? maxValueLength\n            ? truncate(`${value}`, maxValueLength)\n            : `${value}`\n          : value;\n    }\n\n    // Error.cause is a standard property that is non enumerable, we therefore need to access it separately.\n    // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause\n    if (captureErrorCause && error.cause !== undefined) {\n      if (isError(error.cause)) {\n        const errorName = error.cause.name || error.cause.constructor.name;\n        extraErrorInfo.cause = { [errorName]: _extractErrorData(error.cause as ExtendedError, false, maxValueLength) };\n      } else {\n        extraErrorInfo.cause = error.cause;\n      }\n    }\n\n    // Check if someone attached `toJSON` method to grab even more properties (eg. axios is doing that)\n    if (typeof error.toJSON === 'function') {\n      const serializedError = error.toJSON() as Record<string, unknown>;\n\n      for (const key of Object.keys(serializedError)) {\n        const value = serializedError[key];\n        extraErrorInfo[key] = isError(value) ? value.toString() : value;\n      }\n    }\n\n    return extraErrorInfo;\n  } catch (oO) {\n    DEBUG_BUILD && debug.error('Unable to extract extra data from the Error object:', oO);\n  }\n\n  return null;\n}\n", "// Slightly modified (no IE8 support, ES6) and transcribed to TypeScript\n// https://github.com/calvinmetcalf/rollup-plugin-node-builtins/blob/63ab8aacd013767445ca299e468d9a60a95328d7/src/es6/path.js\n//\n// Copyright Joyent, Inc.and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n/** JSDoc */\nfunction normalizeArray(parts: string[], allowAboveRoot?: boolean): string[] {\n  // if the path tries to go above the root, `up` ends up > 0\n  let up = 0;\n  for (let i = parts.length - 1; i >= 0; i--) {\n    const last = parts[i];\n    if (last === '.') {\n      parts.splice(i, 1);\n    } else if (last === '..') {\n      parts.splice(i, 1);\n      up++;\n    } else if (up) {\n      parts.splice(i, 1);\n      up--;\n    }\n  }\n\n  // if the path is allowed to go above the root, restore leading ..s\n  if (allowAboveRoot) {\n    for (; up--; up) {\n      parts.unshift('..');\n    }\n  }\n\n  return parts;\n}\n\n// Split a filename into [root, dir, basename, ext], unix version\n// 'root' is just a slash, or nothing.\nconst splitPathRe = /^(\\S+:\\\\|\\/?)([\\s\\S]*?)((?:\\.{1,2}|[^/\\\\]+?|)(\\.[^./\\\\]*|))(?:[/\\\\]*)$/;\n/** JSDoc */\nfunction splitPath(filename: string): string[] {\n  // Truncate files names greater than 1024 characters to avoid regex dos\n  // https://github.com/getsentry/sentry-javascript/pull/8737#discussion_r1285719172\n  const truncated = filename.length > 1024 ? `<truncated>${filename.slice(-1024)}` : filename;\n  const parts = splitPathRe.exec(truncated);\n  return parts ? parts.slice(1) : [];\n}\n\n// path.resolve([from ...], to)\n// posix version\n/** JSDoc */\nexport function resolve(...args: string[]): string {\n  let resolvedPath = '';\n  let resolvedAbsolute = false;\n\n  for (let i = args.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n    const path = i >= 0 ? args[i] : '/';\n\n    // Skip empty entries\n    if (!path) {\n      continue;\n    }\n\n    resolvedPath = `${path}/${resolvedPath}`;\n    resolvedAbsolute = path.charAt(0) === '/';\n  }\n\n  // At this point the path should be resolved to a full absolute path, but\n  // handle relative paths to be safe (might happen when process.cwd() fails)\n\n  // Normalize the path\n  resolvedPath = normalizeArray(\n    resolvedPath.split('/').filter(p => !!p),\n    !resolvedAbsolute,\n  ).join('/');\n\n  return (resolvedAbsolute ? '/' : '') + resolvedPath || '.';\n}\n\n/** JSDoc */\nfunction trim(arr: string[]): string[] {\n  let start = 0;\n  for (; start < arr.length; start++) {\n    if (arr[start] !== '') {\n      break;\n    }\n  }\n\n  let end = arr.length - 1;\n  for (; end >= 0; end--) {\n    if (arr[end] !== '') {\n      break;\n    }\n  }\n\n  if (start > end) {\n    return [];\n  }\n  return arr.slice(start, end - start + 1);\n}\n\n// path.relative(from, to)\n// posix version\n/** JSDoc */\nexport function relative(from: string, to: string): string {\n  /* eslint-disable no-param-reassign */\n  from = resolve(from).slice(1);\n  to = resolve(to).slice(1);\n  /* eslint-enable no-param-reassign */\n\n  const fromParts = trim(from.split('/'));\n  const toParts = trim(to.split('/'));\n\n  const length = Math.min(fromParts.length, toParts.length);\n  let samePartsLength = length;\n  for (let i = 0; i < length; i++) {\n    if (fromParts[i] !== toParts[i]) {\n      samePartsLength = i;\n      break;\n    }\n  }\n\n  let outputParts = [];\n  for (let i = samePartsLength; i < fromParts.length; i++) {\n    outputParts.push('..');\n  }\n\n  outputParts = outputParts.concat(toParts.slice(samePartsLength));\n\n  return outputParts.join('/');\n}\n\n// path.normalize(path)\n// posix version\n/** JSDoc */\nexport function normalizePath(path: string): string {\n  const isPathAbsolute = isAbsolute(path);\n  const trailingSlash = path.slice(-1) === '/';\n\n  // Normalize the path\n  let normalizedPath = normalizeArray(\n    path.split('/').filter(p => !!p),\n    !isPathAbsolute,\n  ).join('/');\n\n  if (!normalizedPath && !isPathAbsolute) {\n    normalizedPath = '.';\n  }\n  if (normalizedPath && trailingSlash) {\n    normalizedPath += '/';\n  }\n\n  return (isPathAbsolute ? '/' : '') + normalizedPath;\n}\n\n// posix version\n/** JSDoc */\nexport function isAbsolute(path: string): boolean {\n  return path.charAt(0) === '/';\n}\n\n// posix version\n/** JSDoc */\nexport function join(...args: string[]): string {\n  return normalizePath(args.join('/'));\n}\n\n/** JSDoc */\nexport function dirname(path: string): string {\n  const result = splitPath(path);\n  const root = result[0] || '';\n  let dir = result[1];\n\n  if (!root && !dir) {\n    // No dirname whatsoever\n    return '.';\n  }\n\n  if (dir) {\n    // It has a dirname, strip trailing slash\n    dir = dir.slice(0, dir.length - 1);\n  }\n\n  return root + dir;\n}\n\n/** JSDoc */\nexport function basename(path: string, ext?: string): string {\n  let f = splitPath(path)[2] || '';\n  if (ext && f.slice(ext.length * -1) === ext) {\n    f = f.slice(0, f.length - ext.length);\n  }\n  return f;\n}\n", "import { defineIntegration } from '../integration';\nimport type { Event } from '../types/event';\nimport type { StackFrame } from '../types/stackframe';\nimport type { Stacktrace } from '../types/stacktrace';\nimport { basename, relative } from '../utils/path';\nimport { GLOBAL_OBJ } from '../utils/worldwide';\n\ntype StackFrameIteratee = (frame: StackFrame) => StackFrame;\n\nconst INTEGRATION_NAME = 'RewriteFrames' as const;\n\ninterface RewriteFramesOptions {\n  /**\n   * Root path (the beginning of the path) that will be stripped from the frames' filename.\n   *\n   * This option has slightly different behaviour in the browser and on servers:\n   * - In the browser, the value you provide in `root` will be stripped from the beginning stack frames' paths (if the path started with the value).\n   * - On the server, the root value will only replace the beginning of stack frame filepaths, when the path is absolute. If no `root` value is provided and the path is absolute, the frame will be reduced to only the filename and the provided `prefix` option.\n   *\n   * Browser example:\n   * - Original frame: `'http://example.com/my/path/static/asset.js'`\n   * - `root: 'http://example.com/my/path'`\n   * - `assetPrefix: 'app://'`\n   * - Resulting frame: `'app:///static/asset.js'`\n   *\n   * Server example:\n   * - Original frame: `'/User/local/my/path/static/asset.js'`\n   * - `root: '/User/local/my/path'`\n   * - `assetPrefix: 'app://'`\n   * - Resulting frame: `'app:///static/asset.js'`\n   */\n  root?: string;\n\n  /**\n   * A custom prefix that stack frames will be prepended with.\n   *\n   * Default: `'app://'`\n   *\n   * This option has slightly different behaviour in the browser and on servers:\n   * - In the browser, the value you provide in `prefix` will prefix the resulting filename when the value you provided in `root` was applied. Effectively replacing whatever `root` matched in the beginning of the frame with `prefix`.\n   * - On the server, the prefix is applied to all stackframes with absolute paths. On Windows, the drive identifier (e.g. \"C://\") is replaced with the prefix.\n   */\n  prefix?: string;\n\n  /**\n   * Defines an iterator that is used to iterate through all of the stack frames for modification before being sent to Sentry.\n   * Setting this option will effectively disable both the `root` and the `prefix` options.\n   */\n  iteratee?: StackFrameIteratee;\n}\n\n/**\n * Rewrite event frames paths.\n */\nexport const rewriteFramesIntegration = defineIntegration((options: RewriteFramesOptions = {}) => {\n  const root = options.root;\n  const prefix = options.prefix || 'app:///';\n\n  const isBrowser = 'window' in GLOBAL_OBJ && !!GLOBAL_OBJ.window;\n\n  const iteratee: StackFrameIteratee = options.iteratee || generateIteratee({ isBrowser, root, prefix });\n\n  /** Process an exception event. */\n  function _processExceptionsEvent(event: Event): Event {\n    try {\n      return {\n        ...event,\n        exception: {\n          ...event.exception,\n          // The check for this is performed inside `process` call itself, safe to skip here\n          // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n          values: event.exception!.values!.map(value => ({\n            ...value,\n            ...(value.stacktrace && { stacktrace: _processStacktrace(value.stacktrace) }),\n          })),\n        },\n      };\n    } catch {\n      return event;\n    }\n  }\n\n  /** Process a stack trace. */\n  function _processStacktrace(stacktrace?: Stacktrace): Stacktrace {\n    return {\n      ...stacktrace,\n      frames: stacktrace?.frames?.map(f => iteratee(f)),\n    };\n  }\n\n  return {\n    name: INTEGRATION_NAME,\n    processEvent(originalEvent) {\n      let processedEvent = originalEvent;\n\n      if (originalEvent.exception && Array.isArray(originalEvent.exception.values)) {\n        processedEvent = _processExceptionsEvent(processedEvent);\n      }\n\n      return processedEvent;\n    },\n  };\n});\n\n/**\n * Exported only for tests.\n */\nexport function generateIteratee({\n  isBrowser,\n  root,\n  prefix,\n}: {\n  isBrowser: boolean;\n  root?: string;\n  prefix: string;\n}): StackFrameIteratee {\n  return (frame: StackFrame) => {\n    if (!frame.filename) {\n      return frame;\n    }\n\n    // Determine if this is a Windows frame by checking for a Windows-style prefix such as `C:\\`\n    const isWindowsFrame =\n      /^[a-zA-Z]:\\\\/.test(frame.filename) ||\n      // or the presence of a backslash without a forward slash (which are not allowed on Windows)\n      (frame.filename.includes('\\\\') && !frame.filename.includes('/'));\n\n    // Check if the frame filename begins with `/`\n    const startsWithSlash = /^\\//.test(frame.filename);\n\n    if (isBrowser) {\n      if (root) {\n        const oldFilename = frame.filename;\n        if (oldFilename.indexOf(root) === 0) {\n          frame.filename = oldFilename.replace(root, prefix);\n        }\n      }\n    } else {\n      if (isWindowsFrame || startsWithSlash) {\n        const filename = isWindowsFrame\n          ? frame.filename\n              .replace(/^[a-zA-Z]:/, '') // remove Windows-style prefix\n              .replace(/\\\\/g, '/') // replace all `\\\\` instances with `/`\n          : frame.filename;\n        const base = root ? relative(root, filename) : basename(filename);\n        frame.filename = `${prefix}${base}`;\n      }\n    }\n\n    return frame;\n  };\n}\n", "// Based on Kamil Ogórek's work on:\n// https://github.com/supabase-community/sentry-integration-js\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable max-lines */\nimport { addBreadcrumb } from '../breadcrumbs';\nimport { getClient } from '../currentScopes';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { captureException } from '../exports';\nimport { defineIntegration } from '../integration';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '../semanticAttributes';\nimport { setHttpStatus, SPAN_STATUS_ERROR, SPAN_STATUS_OK, startSpan } from '../tracing';\nimport type { IntegrationFn } from '../types/integration';\nimport type { WebFetchHeaders } from '../types/webfetchapi';\nimport { debug } from '../utils/debug-logger';\nimport { isObjectLike, isPlainObject } from '../utils/is';\nimport { addExceptionMechanism } from '../utils/misc';\n\nconst AUTH_OPERATIONS_TO_INSTRUMENT = [\n  'reauthenticate',\n  'signInAnonymously',\n  'signInWithOAuth',\n  'signInWithIdToken',\n  'signInWithOtp',\n  'signInWithPassword',\n  'signInWithSSO',\n  'signOut',\n  'signUp',\n  'verifyOtp',\n];\n\nconst AUTH_ADMIN_OPERATIONS_TO_INSTRUMENT = [\n  'createUser',\n  'deleteUser',\n  'listUsers',\n  'getUserById',\n  'updateUserById',\n  'inviteUserByEmail',\n];\n\nexport const FILTER_MAPPINGS = {\n  eq: 'eq',\n  neq: 'neq',\n  gt: 'gt',\n  gte: 'gte',\n  lt: 'lt',\n  lte: 'lte',\n  like: 'like',\n  'like(all)': 'likeAllOf',\n  'like(any)': 'likeAnyOf',\n  ilike: 'ilike',\n  'ilike(all)': 'ilikeAllOf',\n  'ilike(any)': 'ilikeAnyOf',\n  is: 'is',\n  in: 'in',\n  cs: 'contains',\n  cd: 'containedBy',\n  sr: 'rangeGt',\n  nxl: 'rangeGte',\n  sl: 'rangeLt',\n  nxr: 'rangeLte',\n  adj: 'rangeAdjacent',\n  ov: 'overlaps',\n  fts: '',\n  plfts: 'plain',\n  phfts: 'phrase',\n  wfts: 'websearch',\n  not: 'not',\n};\n\nexport const DB_OPERATIONS_TO_INSTRUMENT = ['select', 'insert', 'upsert', 'update', 'delete'];\n\ntype AuthOperationFn = (...args: unknown[]) => Promise<unknown>;\ntype AuthOperationName = (typeof AUTH_OPERATIONS_TO_INSTRUMENT)[number];\ntype AuthAdminOperationName = (typeof AUTH_ADMIN_OPERATIONS_TO_INSTRUMENT)[number];\ntype PostgRESTQueryOperationFn = (...args: unknown[]) => PostgRESTFilterBuilder;\n\nexport interface SupabaseClientInstance {\n  auth: {\n    admin: Record<AuthAdminOperationName, AuthOperationFn>;\n  } & Record<AuthOperationName, AuthOperationFn>;\n}\n\nexport interface PostgRESTQueryBuilder {\n  [key: string]: PostgRESTQueryOperationFn;\n}\n\n/**\n * `postgrest-js` stores the request headers as a plain object up to v1.19.x and as a `Headers`\n * instance from v2.74.0 on (shipped with `supabase-js` 2.74.0), so we have to handle both shapes.\n */\nexport type PostgRESTHeaders = Record<string, string> | WebFetchHeaders;\n\nexport interface PostgRESTFilterBuilder {\n  method: string;\n  headers: PostgRESTHeaders;\n  url: URL;\n  schema: string;\n  body: any;\n}\n\nexport interface SupabaseResponse {\n  status?: number;\n  error?: {\n    message: string;\n    code?: string;\n    details?: unknown;\n  };\n}\n\nexport interface SupabaseError extends Error {\n  code?: string;\n  details?: unknown;\n}\n\nexport interface SupabaseBreadcrumb {\n  type: string;\n  category: string;\n  message: string;\n  data?: {\n    query?: string[];\n    body?: Record<string, unknown>;\n  };\n}\n\nexport interface SupabaseClientConstructor {\n  prototype: {\n    from: (table: string) => PostgRESTQueryBuilder;\n  };\n}\n\nexport interface PostgRESTProtoThenable {\n  then: <T>(\n    onfulfilled?: ((value: T) => T | PromiseLike<T>) | null,\n    onrejected?: ((reason: any) => T | PromiseLike<T>) | null,\n  ) => Promise<T>;\n}\n\ntype SentryInstrumented<T> = T & {\n  __SENTRY_INSTRUMENTED__?: boolean;\n};\n\nfunction markAsInstrumented<T>(fn: T): void {\n  try {\n    (fn as SentryInstrumented<T>).__SENTRY_INSTRUMENTED__ = true;\n  } catch {\n    // ignore errors here\n  }\n}\n\nfunction isInstrumented<T>(fn: T): boolean | undefined {\n  try {\n    return (fn as SentryInstrumented<T>).__SENTRY_INSTRUMENTED__;\n  } catch {\n    return false;\n  }\n}\n\n/**\n * Plain-object bodies are copied into `plainBody`; array inserts (and other non-plain shapes) stay only on `rawBody`.\n * Returns a payload suitable for span attributes / breadcrumbs when operation data collection is enabled.\n */\nfunction getMutationBodyPayloadForTelemetry(rawBody: unknown, plainBody: Record<string, unknown>): unknown | undefined {\n  if (Object.keys(plainBody).length > 0) {\n    return plainBody;\n  }\n  if (Array.isArray(rawBody) && rawBody.length > 0) {\n    return rawBody;\n  }\n  return undefined;\n}\n\n/** True when the PostgREST builder carries a mutation body (for `insert(...)`, etc. in span descriptions). */\nfunction hasMutationBodyForDescription(rawBody: unknown, plainBody: Record<string, unknown>): boolean {\n  return getMutationBodyPayloadForTelemetry(rawBody, plainBody) !== undefined;\n}\n\n/**\n * Reads a header off a PostgREST builder, regardless of whether it holds a plain object or a\n * `Headers` instance. Lookup is case-insensitive because `Headers` lower-cases all of its keys.\n * @param headers - The request headers\n * @param name - The header name to look up\n * @returns The header value, or `undefined` if it is not set\n */\nexport function getHeader(headers: PostgRESTHeaders | undefined, name: string): string | undefined {\n  if (!headers) {\n    return undefined;\n  }\n\n  if (typeof (headers as WebFetchHeaders).get === 'function') {\n    return (headers as WebFetchHeaders).get(name) ?? undefined;\n  }\n\n  const plainHeaders = headers as Record<string, string>;\n  const lowerCaseName = name.toLowerCase();\n  const key = Object.keys(plainHeaders).find(headerName => headerName.toLowerCase() === lowerCaseName);\n\n  return key !== undefined ? plainHeaders[key] : undefined;\n}\n\n/**\n * Extracts the database operation type from the HTTP method and headers\n * @param method - The HTTP method of the request\n * @param headers - The request headers\n * @returns The database operation type ('select', 'insert', 'upsert', 'update', or 'delete')\n */\nexport function extractOperation(method: string, headers: PostgRESTHeaders = {}): string {\n  switch (method) {\n    case 'GET': {\n      return 'select';\n    }\n    case 'POST': {\n      if (getHeader(headers, 'Prefer')?.includes('resolution=')) {\n        return 'upsert';\n      } else {\n        return 'insert';\n      }\n    }\n    case 'PATCH': {\n      return 'update';\n    }\n    case 'DELETE': {\n      return 'delete';\n    }\n    default: {\n      return '<unknown-op>';\n    }\n  }\n}\n\n/**\n * Translates Supabase filter parameters into readable method names for tracing\n * @param key - The filter key from the URL search parameters\n * @param query - The filter value from the URL search parameters\n * @returns A string representation of the filter as a method call\n */\nexport function translateFiltersIntoMethods(key: string, query: string): string {\n  if (query === '' || query === '*') {\n    return 'select(*)';\n  }\n\n  if (key === 'select') {\n    return `select(${query})`;\n  }\n\n  if (key === 'or' || key.endsWith('.or')) {\n    return `${key}${query}`;\n  }\n\n  const [filter, ...value] = query.split('.');\n\n  let method;\n  // Handle optional `configPart` of the filter\n  if (filter?.startsWith('fts')) {\n    method = 'textSearch';\n  } else if (filter?.startsWith('plfts')) {\n    method = 'textSearch[plain]';\n  } else if (filter?.startsWith('phfts')) {\n    method = 'textSearch[phrase]';\n  } else if (filter?.startsWith('wfts')) {\n    method = 'textSearch[websearch]';\n  } else {\n    method = (filter && FILTER_MAPPINGS[filter as keyof typeof FILTER_MAPPINGS]) || 'filter';\n  }\n\n  return `${method}(${key}, ${value.join('.')})`;\n}\n\nfunction instrumentAuthOperation(operation: AuthOperationFn, isAdmin = false): AuthOperationFn {\n  return new Proxy(operation, {\n    apply(target, thisArg, argumentsList) {\n      return startSpan(\n        {\n          name: `auth ${isAdmin ? '(admin) ' : ''}${operation.name}`,\n          attributes: {\n            [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.db.supabase',\n            [SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'db',\n            'db.system': 'postgresql',\n            'db.operation': `auth.${isAdmin ? 'admin.' : ''}${operation.name}`,\n          },\n        },\n        span => {\n          return Reflect.apply(target, thisArg, argumentsList)\n            .then((res: unknown) => {\n              if (isObjectLike(res) && 'error' in res && res.error) {\n                span.setStatus({ code: SPAN_STATUS_ERROR });\n\n                captureException(res.error, {\n                  mechanism: {\n                    handled: false,\n                    type: 'auto.db.supabase.auth',\n                  },\n                });\n              } else {\n                span.setStatus({ code: SPAN_STATUS_OK });\n              }\n\n              span.end();\n              return res;\n            })\n            .catch((err: unknown) => {\n              span.setStatus({ code: SPAN_STATUS_ERROR });\n              span.end();\n\n              captureException(err, {\n                mechanism: {\n                  handled: false,\n                  type: 'auto.db.supabase.auth',\n                },\n              });\n\n              throw err;\n            })\n            .then(...argumentsList);\n        },\n      );\n    },\n  });\n}\n\nfunction instrumentSupabaseAuthClient(supabaseClientInstance: SupabaseClientInstance): void {\n  const auth = supabaseClientInstance.auth;\n\n  if (!auth || isInstrumented(supabaseClientInstance.auth)) {\n    return;\n  }\n\n  for (const operation of AUTH_OPERATIONS_TO_INSTRUMENT) {\n    const authOperation = auth[operation];\n\n    if (!authOperation) {\n      continue;\n    }\n\n    if (typeof supabaseClientInstance.auth[operation] === 'function') {\n      supabaseClientInstance.auth[operation] = instrumentAuthOperation(authOperation);\n    }\n  }\n\n  for (const operation of AUTH_ADMIN_OPERATIONS_TO_INSTRUMENT) {\n    const authOperation = auth.admin[operation];\n\n    if (!authOperation) {\n      continue;\n    }\n\n    if (typeof supabaseClientInstance.auth.admin[operation] === 'function') {\n      supabaseClientInstance.auth.admin[operation] = instrumentAuthOperation(authOperation, true);\n    }\n  }\n\n  markAsInstrumented(supabaseClientInstance.auth);\n}\n\nfunction instrumentSupabaseClientConstructor(SupabaseClient: unknown, _options: { sendOperationData?: boolean }): void {\n  if (isInstrumented((SupabaseClient as SupabaseClientConstructor).prototype.from)) {\n    return;\n  }\n\n  (SupabaseClient as SupabaseClientConstructor).prototype.from = new Proxy(\n    (SupabaseClient as SupabaseClientConstructor).prototype.from,\n    {\n      apply(target, thisArg, argumentsList) {\n        const rv = Reflect.apply(target, thisArg, argumentsList);\n        const PostgRESTQueryBuilder = (rv as PostgRESTQueryBuilder).constructor;\n\n        instrumentPostgRESTQueryBuilder(PostgRESTQueryBuilder as unknown as new () => PostgRESTQueryBuilder, _options);\n\n        return rv;\n      },\n    },\n  );\n\n  markAsInstrumented((SupabaseClient as SupabaseClientConstructor).prototype.from);\n}\n\nfunction instrumentPostgRESTFilterBuilder(\n  PostgRESTFilterBuilder: PostgRESTFilterBuilder['constructor'],\n  _options: { sendOperationData?: boolean },\n): void {\n  if (isInstrumented((PostgRESTFilterBuilder.prototype as unknown as PostgRESTProtoThenable).then)) {\n    return;\n  }\n\n  (PostgRESTFilterBuilder.prototype as unknown as PostgRESTProtoThenable).then = new Proxy(\n    (PostgRESTFilterBuilder.prototype as unknown as PostgRESTProtoThenable).then,\n    {\n      apply(target, thisArg, argumentsList) {\n        const operations = DB_OPERATIONS_TO_INSTRUMENT;\n        const typedThis = thisArg as PostgRESTFilterBuilder;\n        const operation = extractOperation(typedThis.method, typedThis.headers);\n\n        if (!operations.includes(operation)) {\n          return Reflect.apply(target, thisArg, argumentsList);\n        }\n\n        if (!typedThis?.url?.pathname || typeof typedThis.url.pathname !== 'string') {\n          return Reflect.apply(target, thisArg, argumentsList);\n        }\n\n        const pathParts = typedThis.url.pathname.split('/');\n        const table = pathParts.length > 0 ? pathParts[pathParts.length - 1] : '';\n\n        const queryItems: string[] = [];\n        for (const [key, value] of typedThis.url.searchParams.entries()) {\n          // It's possible to have multiple entries for the same key, eg. `id=eq.7&id=eq.3`,\n          // so we need to use array instead of object to collect them.\n          queryItems.push(translateFiltersIntoMethods(key, value));\n        }\n        const body: Record<string, unknown> = Object.create(null);\n        if (isPlainObject(typedThis.body)) {\n          for (const [key, value] of Object.entries(typedThis.body)) {\n            body[key] = value;\n          }\n        }\n\n        const client = getClient();\n        const shouldSendData =\n          _options.sendOperationData ?? client?.getDataCollectionOptions().databaseQueryData === true;\n        const bodyPayload = getMutationBodyPayloadForTelemetry(typedThis.body, body);\n\n        // Adding operation to the beginning of the description if it's not a `select` operation\n        // For example, it can be an `insert` or `update` operation but the query can be `select(...)`\n        // For `select` operations, we don't need repeat it in the description\n        const mutationPart =\n          operation === 'select'\n            ? ''\n            : `${operation}${hasMutationBodyForDescription(typedThis.body, body) ? '(...) ' : ''}`;\n        const queryPart = shouldSendData ? queryItems.join(' ') : queryItems.length > 0 ? '[redacted]' : '';\n        const descriptionMiddle = [mutationPart.trimEnd(), queryPart].filter(Boolean).join(' ');\n        const description = descriptionMiddle ? `${descriptionMiddle} from(${table})` : `from(${table})`;\n\n        const attributes: Record<string, any> = {\n          'db.table': table,\n          'db.schema': typedThis.schema,\n          'db.url': typedThis.url.origin,\n          'db.sdk': getHeader(typedThis.headers, 'X-Client-Info'),\n          'db.system': 'postgresql',\n          'db.operation': operation,\n          [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.db.supabase',\n          [SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'db',\n        };\n\n        if (queryItems.length && shouldSendData) {\n          attributes['db.query'] = queryItems;\n        }\n\n        if (bodyPayload !== undefined && shouldSendData) {\n          attributes['db.body'] = bodyPayload;\n        }\n\n        return startSpan(\n          {\n            name: description,\n            attributes,\n          },\n          span => {\n            return (Reflect.apply(target, thisArg, []) as Promise<SupabaseResponse>)\n              .then(\n                (res: SupabaseResponse) => {\n                  if (span) {\n                    if (res && typeof res === 'object' && 'status' in res) {\n                      setHttpStatus(span, res.status || 500);\n                    }\n                    span.end();\n                  }\n\n                  if (res?.error) {\n                    const err = new Error(res.error.message) as SupabaseError;\n                    if (res.error.code) {\n                      err.code = res.error.code;\n                    }\n                    if (res.error.details) {\n                      err.details = res.error.details;\n                    }\n\n                    const supabaseContext: Record<string, any> = {};\n                    if (queryItems.length && shouldSendData) {\n                      supabaseContext.query = queryItems;\n                    }\n                    if (bodyPayload !== undefined && shouldSendData) {\n                      supabaseContext.body = bodyPayload;\n                    }\n\n                    captureException(err, scope => {\n                      scope.addEventProcessor(e => {\n                        addExceptionMechanism(e, {\n                          handled: false,\n                          type: 'auto.db.supabase.postgres',\n                        });\n\n                        return e;\n                      });\n\n                      scope.setContext('supabase', supabaseContext);\n\n                      return scope;\n                    });\n                  }\n\n                  const breadcrumb: SupabaseBreadcrumb = {\n                    type: 'supabase',\n                    category: `db.${operation}`,\n                    message: description,\n                  };\n\n                  const data: Record<string, unknown> = {};\n\n                  if (queryItems.length && shouldSendData) {\n                    data.query = queryItems;\n                  }\n\n                  if (bodyPayload !== undefined && shouldSendData) {\n                    data.body = bodyPayload;\n                  }\n\n                  if (Object.keys(data).length) {\n                    breadcrumb.data = data;\n                  }\n\n                  addBreadcrumb(breadcrumb);\n\n                  return res;\n                },\n                (err: Error) => {\n                  // TODO: shouldn't we capture this error?\n                  if (span) {\n                    setHttpStatus(span, 500);\n                    span.end();\n                  }\n                  throw err;\n                },\n              )\n              .then(...argumentsList);\n          },\n        );\n      },\n    },\n  );\n\n  markAsInstrumented((PostgRESTFilterBuilder.prototype as unknown as PostgRESTProtoThenable).then);\n}\n\nfunction instrumentPostgRESTQueryBuilder(\n  PostgRESTQueryBuilder: new () => PostgRESTQueryBuilder,\n  _options: { sendOperationData?: boolean },\n): void {\n  // We need to wrap _all_ operations despite them sharing the same `PostgRESTFilterBuilder`\n  // constructor, as we don't know which method will be called first, and we don't want to miss any calls.\n  for (const operation of DB_OPERATIONS_TO_INSTRUMENT) {\n    if (isInstrumented((PostgRESTQueryBuilder.prototype as Record<string, any>)[operation])) {\n      continue;\n    }\n\n    type PostgRESTOperation = keyof Pick<PostgRESTQueryBuilder, 'select' | 'insert' | 'upsert' | 'update' | 'delete'>;\n    (PostgRESTQueryBuilder.prototype as Record<string, any>)[operation as PostgRESTOperation] = new Proxy(\n      (PostgRESTQueryBuilder.prototype as Record<string, any>)[operation as PostgRESTOperation],\n      {\n        apply(target, thisArg, argumentsList) {\n          const rv = Reflect.apply(target, thisArg, argumentsList);\n          const PostgRESTFilterBuilder = (rv as PostgRESTFilterBuilder).constructor;\n\n          DEBUG_BUILD && debug.log(`Instrumenting ${operation} operation's PostgRESTFilterBuilder`);\n\n          instrumentPostgRESTFilterBuilder(PostgRESTFilterBuilder, _options);\n\n          return rv;\n        },\n      },\n    );\n\n    markAsInstrumented((PostgRESTQueryBuilder.prototype as Record<string, any>)[operation]);\n  }\n}\n\nexport const instrumentSupabaseClient = (\n  supabaseClient: unknown,\n  options: { sendOperationData?: boolean } = {},\n): void => {\n  if (!supabaseClient) {\n    DEBUG_BUILD && debug.warn('Supabase integration was not installed because no Supabase client was provided.');\n    return;\n  }\n  const SupabaseClientConstructor =\n    supabaseClient.constructor === Function ? supabaseClient : supabaseClient.constructor;\n\n  instrumentSupabaseClientConstructor(SupabaseClientConstructor, options);\n  instrumentSupabaseAuthClient(supabaseClient as SupabaseClientInstance);\n};\n\ninterface SupabaseIntegrationOptions {\n  supabaseClient: any;\n  /**\n   * Whether to attach PostgREST query filters and mutation body payloads\n   * to Sentry telemetry.\n   *\n   * Falls back to `dataCollection.databaseQueryData` when not set.\n   * @default undefined\n   */\n  sendOperationData?: boolean;\n}\n\nconst INTEGRATION_NAME = 'Supabase' as const;\n\nconst _supabaseIntegration = ((supabaseClient: unknown, options: { sendOperationData?: boolean }) => {\n  return {\n    setupOnce() {\n      instrumentSupabaseClient(supabaseClient, options);\n    },\n    name: INTEGRATION_NAME,\n  };\n}) satisfies IntegrationFn;\n\nexport const supabaseIntegration = defineIntegration((options: SupabaseIntegrationOptions) => {\n  return _supabaseIntegration(options.supabaseClient, { sendOperationData: options.sendOperationData });\n}) satisfies IntegrationFn;\n", "import { defineIntegration } from '../integration';\nimport type { Event, EventHint } from '../types/event';\nimport type { IntegrationFn } from '../types/integration';\nimport { isError } from '../utils/is';\nimport { truncate } from '../utils/string';\n\ninterface ZodErrorsOptions {\n  key?: string;\n  /**\n   * Limits the number of Zod errors inlined in each Sentry event.\n   *\n   * @default 10\n   */\n  limit?: number;\n  /**\n   * Save full list of Zod issues as an attachment in Sentry\n   *\n   * @default false\n   */\n  saveZodIssuesAsAttachment?: boolean;\n}\n\nconst DEFAULT_LIMIT = 10;\nconst INTEGRATION_NAME = 'ZodErrors' as const;\n\n/**\n * Simplified ZodIssue type definition\n */\ninterface ZodIssue {\n  path: (string | number)[];\n  message?: string;\n  expected?: unknown;\n  received?: unknown;\n  unionErrors?: unknown[];\n  keys?: unknown[];\n  invalid_literal?: unknown;\n}\n\ninterface ZodError extends Error {\n  issues: ZodIssue[];\n}\n\nfunction originalExceptionIsZodError(originalException: unknown): originalException is ZodError {\n  return (\n    isError(originalException) &&\n    originalException.name === 'ZodError' &&\n    Array.isArray((originalException as ZodError).issues)\n  );\n}\n\ntype SingleLevelZodIssue<T extends ZodIssue> = {\n  [P in keyof T]: T[P] extends string | number | undefined\n    ? T[P]\n    : T[P] extends unknown[]\n      ? string | undefined\n      : unknown;\n};\n\n/**\n * Formats child objects or arrays to a string\n * that is preserved when sent to Sentry.\n *\n * Without this, we end up with something like this in Sentry:\n *\n * [\n *  [Object],\n *  [Object],\n *  [Object],\n *  [Object]\n * ]\n */\nexport function flattenIssue(issue: ZodIssue): SingleLevelZodIssue<ZodIssue> {\n  return {\n    ...issue,\n    path: 'path' in issue && Array.isArray(issue.path) ? issue.path.join('.') : undefined,\n    keys: 'keys' in issue ? JSON.stringify(issue.keys) : undefined,\n    unionErrors: 'unionErrors' in issue ? JSON.stringify(issue.unionErrors) : undefined,\n  };\n}\n\n/**\n * Takes ZodError issue path array and returns a flattened version as a string.\n * This makes it easier to display paths within a Sentry error message.\n *\n * Array indexes are normalized to reduce duplicate entries\n *\n * @param path ZodError issue path\n * @returns flattened path\n *\n * @example\n * flattenIssuePath([0, 'foo', 1, 'bar']) // -> '<array>.foo.<array>.bar'\n */\nexport function flattenIssuePath(path: Array<string | number>): string {\n  return path\n    .map(p => {\n      if (typeof p === 'number') {\n        return '<array>';\n      } else {\n        return p;\n      }\n    })\n    .join('.');\n}\n\n/**\n * Zod error message is a stringified version of ZodError.issues\n * This doesn't display well in the Sentry UI. Replace it with something shorter.\n */\nexport function formatIssueMessage(zodError: ZodError): string {\n  const errorKeyMap = new Set<string | number | symbol>();\n  for (const iss of zodError.issues) {\n    const issuePath = flattenIssuePath(iss.path);\n    if (issuePath.length > 0) {\n      errorKeyMap.add(issuePath);\n    }\n  }\n\n  const errorKeys = Array.from(errorKeyMap);\n  if (errorKeys.length === 0) {\n    // If there are no keys, then we're likely validating the root\n    // variable rather than a key within an object. This attempts\n    // to extract what type it was that failed to validate.\n    // For example, z.string().parse(123) would return \"string\" here.\n    let rootExpectedType = 'variable';\n    if (zodError.issues.length > 0) {\n      const iss = zodError.issues[0];\n      if (iss !== undefined && 'expected' in iss && typeof iss.expected === 'string') {\n        rootExpectedType = iss.expected;\n      }\n    }\n    return `Failed to validate ${rootExpectedType}`;\n  }\n  return `Failed to validate keys: ${truncate(errorKeys.join(', '), 100)}`;\n}\n\n/**\n * Applies ZodError issues to an event extra and replaces the error message\n */\nexport function applyZodErrorsToEvent(\n  limit: number,\n  saveZodIssuesAsAttachment: boolean = false,\n  event: Event,\n  hint: EventHint,\n): Event {\n  if (\n    !event.exception?.values ||\n    !hint.originalException ||\n    !originalExceptionIsZodError(hint.originalException) ||\n    hint.originalException.issues.length === 0\n  ) {\n    return event;\n  }\n\n  try {\n    const issuesToFlatten = saveZodIssuesAsAttachment\n      ? hint.originalException.issues\n      : hint.originalException.issues.slice(0, limit);\n    const flattenedIssues = issuesToFlatten.map(flattenIssue);\n\n    if (saveZodIssuesAsAttachment) {\n      // Sometimes having the full error details can be helpful.\n      // Attachments have much higher limits, so we can include the full list of issues.\n      if (!Array.isArray(hint.attachments)) {\n        hint.attachments = [];\n      }\n      hint.attachments.push({\n        filename: 'zod_issues.json',\n        data: JSON.stringify({\n          issues: flattenedIssues,\n        }),\n      });\n    }\n\n    return {\n      ...event,\n      exception: {\n        ...event.exception,\n        values: [\n          {\n            ...event.exception.values[0],\n            value: formatIssueMessage(hint.originalException),\n          },\n          ...event.exception.values.slice(1),\n        ],\n      },\n      extra: {\n        ...event.extra,\n        'zoderror.issues': flattenedIssues.slice(0, limit),\n      },\n    };\n  } catch (e) {\n    // Hopefully we never throw errors here, but record it\n    // with the event just in case.\n    return {\n      ...event,\n      extra: {\n        ...event.extra,\n        'zoderrors sentry integration parse error': {\n          message: 'an exception was thrown while processing ZodError within applyZodErrorsToEvent()',\n          error: e instanceof Error ? `${e.name}: ${e.message}\\n${e.stack}` : 'unknown',\n        },\n      },\n    };\n  }\n}\n\nconst _zodErrorsIntegration = ((options: ZodErrorsOptions = {}) => {\n  const limit = options.limit ?? DEFAULT_LIMIT;\n\n  return {\n    name: INTEGRATION_NAME,\n    processEvent(originalEvent, hint): Event {\n      const processedEvent = applyZodErrorsToEvent(limit, options.saveZodIssuesAsAttachment, originalEvent, hint);\n      return processedEvent;\n    },\n  };\n}) satisfies IntegrationFn;\n\n/**\n * Sentry integration to process Zod errors, making them easier to work with in Sentry.\n */\nexport const zodErrorsIntegration = defineIntegration(_zodErrorsIntegration);\n", "import { defineIntegration } from '../integration';\nimport { addMetadataToStackFrames, stripMetadataFromStackFrames } from '../metadata';\nimport type { EventItem } from '../types/envelope';\nimport type { Event } from '../types/event';\nimport type { StackFrame } from '../types/stackframe';\nimport { forEachEnvelopeItem } from '../utils/envelope';\nimport { getFramesFromEvent } from '../utils/stacktrace';\nimport { GLOBAL_OBJ } from '../utils/worldwide';\n\ninterface Options {\n  /**\n   * Keys that have been provided in the Sentry bundler plugin via the the `applicationKey` option, identifying your bundles.\n   *\n   * - Webpack plugin: https://www.npmjs.com/package/@sentry/webpack-plugin#applicationkey\n   * - Vite plugin: https://www.npmjs.com/package/@sentry/vite-plugin#applicationkey\n   * - Esbuild plugin: https://www.npmjs.com/package/@sentry/esbuild-plugin#applicationkey\n   * - Rollup plugin: https://www.npmjs.com/package/@sentry/rollup-plugin#applicationkey\n   */\n  filterKeys: string[];\n\n  /**\n   * Defines how the integration should behave. \"Third-Party Stack Frames\" are stack frames that did not come from files marked with a matching bundle key.\n   *\n   * You can define the behaviour with one of 4 modes:\n   * - `drop-error-if-contains-third-party-frames`: Drop error events that contain at least one third-party stack frame.\n   * - `drop-error-if-exclusively-contains-third-party-frames`: Drop error events that exclusively contain third-party stack frames.\n   * - `apply-tag-if-contains-third-party-frames`: Keep all error events, but apply a `third_party_code: true` tag in case the error contains at least one third-party stack frame.\n   * - `apply-tag-if-exclusively-contains-third-party-frames`: Keep all error events, but apply a `third_party_code: true` tag in case the error contains exclusively third-party stack frames.\n   *\n   * If you chose the mode to only apply tags, the tags can then be used in Sentry to filter your issue stream by entering `!third_party_code:True` in the search bar.\n   */\n  behaviour:\n    | 'drop-error-if-contains-third-party-frames'\n    | 'drop-error-if-exclusively-contains-third-party-frames'\n    | 'apply-tag-if-contains-third-party-frames'\n    | 'apply-tag-if-exclusively-contains-third-party-frames';\n\n  /**\n   * @experimental\n   * If set to true, the integration will ignore frames that are internal to the Sentry SDK from the third-party frame detection.\n   * Note that enabling this option might lead to errors being misclassified as third-party errors.\n   */\n  ignoreSentryInternalFrames?: boolean;\n}\n\n/**\n * This integration allows you to filter out, or tag error events that do not come from user code marked with a bundle key via the Sentry bundler plugins.\n */\nexport const thirdPartyErrorFilterIntegration = defineIntegration((options: Options) => {\n  return {\n    name: 'ThirdPartyErrorsFilter' as const,\n    setup(client) {\n      // We need to strip metadata from stack frames before sending them to Sentry since these are client side only.\n      client.on('beforeEnvelope', envelope => {\n        forEachEnvelopeItem(envelope, (item, type) => {\n          if (type === 'event') {\n            const event = Array.isArray(item) ? (item as EventItem)[1] : undefined;\n\n            if (event) {\n              stripMetadataFromStackFrames(event);\n              item[1] = event;\n            }\n          }\n        });\n      });\n\n      client.on('applyFrameMetadata', event => {\n        // Only apply stack frame metadata to error events\n        if (event.type) {\n          return;\n        }\n\n        const stackParser = client.getOptions().stackParser;\n        addMetadataToStackFrames(stackParser, event);\n      });\n    },\n\n    preprocessEvent(event) {\n      // Snapshot the depth counter onto the event before any event processors run.\n      // This is necessary because async event processors could cause the finally block\n      // in sentryWrapped to decrement the counter before processEvent reads it.\n      if (options.ignoreSentryInternalFrames && (GLOBAL_OBJ._sentryWrappedDepth ?? 0) > 0) {\n        event.sdkProcessingMetadata = {\n          ...event.sdkProcessingMetadata,\n          insideSentryWrapped: true,\n        };\n      }\n    },\n\n    processEvent(event) {\n      const insideSentryWrapped = options.ignoreSentryInternalFrames\n        ? event.sdkProcessingMetadata?.insideSentryWrapped === true && event.exception?.values?.length === 1\n        : false;\n      const frameKeys = getBundleKeysForAllFramesWithFilenames(\n        event,\n        options.ignoreSentryInternalFrames,\n        insideSentryWrapped,\n      );\n\n      if (frameKeys) {\n        const arrayMethod =\n          options.behaviour === 'drop-error-if-contains-third-party-frames' ||\n          options.behaviour === 'apply-tag-if-contains-third-party-frames'\n            ? 'some'\n            : 'every';\n\n        const behaviourApplies = frameKeys[arrayMethod](keys => !keys.some(key => options.filterKeys.includes(key)));\n\n        if (behaviourApplies) {\n          const shouldDrop =\n            options.behaviour === 'drop-error-if-contains-third-party-frames' ||\n            options.behaviour === 'drop-error-if-exclusively-contains-third-party-frames';\n          if (shouldDrop) {\n            return null;\n          } else {\n            event.tags = {\n              ...event.tags,\n              third_party_code: true,\n            };\n          }\n        }\n      }\n\n      return event;\n    },\n  };\n});\n\n/** Checks if a frame is Sentry-internal via runtime depth, function name, or source patterns. */\nfunction isSentryInternalFrame(frame: StackFrame, frameIndex: number, insideSentryWrapped: boolean): boolean {\n  // Only match the last frame (index 0 in reversed stack)\n  if (frameIndex !== 0) {\n    return false;\n  }\n\n  // When processEvent runs inside a sentryWrapped call and the frame looks minified,\n  // the outermost frame is the sentryWrapped function with a mangled name.\n  // We gate on minified shape to avoid false positives in non-minified builds\n  // where stripSentryFramesAndReverse already removed the sentryWrapped frame.\n  if (insideSentryWrapped && isLikelyMinifiedSentryWrappedFrame(frame)) {\n    return true;\n  }\n\n  // Match by function name (works when function names survive bundling but source patterns don't)\n  if (frame.function === 'sentryWrapped') {\n    return true;\n  }\n\n  if (!frame.context_line || !frame.filename) {\n    return false;\n  }\n\n  // Match by source code patterns (works in development / unbundled builds)\n  if (\n    !frame.filename.includes('sentry') ||\n    !frame.filename.includes('helpers') || // Filename would look something like this: 'node_modules/@sentry/browser/build/npm/esm/helpers.js'\n    !frame.context_line.includes(SENTRY_INTERNAL_FN_APPLY) // Must have context_line with the exact fn.apply pattern\n  ) {\n    return false;\n  }\n\n  // Check pre_context array for comment pattern\n  if (frame.pre_context) {\n    const len = frame.pre_context.length;\n    for (let i = 0; i < len; i++) {\n      if (frame.pre_context[i]?.includes(SENTRY_INTERNAL_COMMENT)) {\n        return true;\n      }\n    }\n  }\n\n  return false;\n}\n\nfunction getBundleKeysForAllFramesWithFilenames(\n  event: Event,\n  ignoreSentryInternalFrames?: boolean,\n  insideSentryWrapped?: boolean,\n): string[][] | undefined {\n  const frames = getFramesFromEvent(event);\n\n  if (!frames) {\n    return undefined;\n  }\n\n  return frames\n    .filter((frame, index) => {\n      // Exclude frames without a filename\n      if (!frame.filename) {\n        return false;\n      }\n      // Exclude frames without location info, since these are likely native code or built-ins.\n      // JS frames have lineno/colno, WASM frames have instruction_addr instead.\n      if (frame.lineno == null && frame.colno == null && frame.instruction_addr == null) {\n        return false;\n      }\n      // Optionally ignore Sentry internal frames\n      return !ignoreSentryInternalFrames || !isSentryInternalFrame(frame, index, !!insideSentryWrapped);\n    })\n    .map(frame => {\n      if (!frame.module_metadata) {\n        return [];\n      }\n      return Object.keys(frame.module_metadata)\n        .filter(key => key.startsWith(BUNDLER_PLUGIN_APP_KEY_PREFIX))\n        .map(key => key.slice(BUNDLER_PLUGIN_APP_KEY_PREFIX.length));\n    });\n}\n\nfunction isLikelyMinifiedSentryWrappedFrame(frame: StackFrame): boolean {\n  return !frame.context_line && !frame.pre_context && !!frame.function && frame.function.length <= 2;\n}\n\nconst BUNDLER_PLUGIN_APP_KEY_PREFIX = '_sentryBundlerPluginAppKey:';\nconst SENTRY_INTERNAL_COMMENT = 'Attempt to invoke user-land function';\nconst SENTRY_INTERNAL_FN_APPLY = 'fn.apply(this, wrappedArguments)';\n", "import { getCurrentScope } from '../currentScopes';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { type Event } from '../types/event';\nimport { debug } from './debug-logger';\nimport { getActiveSpan, spanToJSON } from './spanUtils';\n\n/**\n * Ordered LRU cache for storing feature flags in the scope context. The name\n * of each flag in the buffer is unique, and the output of getAll() is ordered\n * from oldest to newest.\n */\n\nexport type FeatureFlag = { readonly flag: string; readonly result: boolean };\n\n/**\n * Max size of the LRU flag buffer stored in Sentry scope and event contexts.\n */\nexport const _INTERNAL_FLAG_BUFFER_SIZE = 100;\n\n/**\n * Max number of flag evaluations to record per span.\n */\nexport const _INTERNAL_MAX_FLAGS_PER_SPAN = 10;\n\nconst SPAN_FLAG_ATTRIBUTE_PREFIX = 'flag.evaluation.';\n\n/**\n * Copies feature flags that are in current scope context to the event context\n */\nexport function _INTERNAL_copyFlagsFromScopeToEvent(event: Event): Event {\n  if (event.type) {\n    // No need to add the flags context to transaction events.\n    // Spans already get the flag.evaluation attributes.\n    return event;\n  }\n\n  const scope = getCurrentScope();\n  const flagContext = scope.getScopeData().contexts.flags;\n  const flagBuffer = flagContext ? flagContext.values : [];\n\n  if (!flagBuffer.length) {\n    return event;\n  }\n\n  if (event.contexts === undefined) {\n    event.contexts = {};\n  }\n  event.contexts.flags = { values: [...flagBuffer] };\n  return event;\n}\n\n/**\n * Inserts a flag into the current scope's context while maintaining ordered LRU properties.\n * Not thread-safe. After inserting:\n * - The flag buffer is sorted in order of recency, with the newest evaluation at the end.\n * - The names in the buffer are always unique.\n * - The length of the buffer never exceeds `maxSize`.\n *\n * @param name     Name of the feature flag to insert.\n * @param value    Value of the feature flag.\n * @param maxSize  Max number of flags the buffer should store. Default value should always be used in production.\n */\nexport function _INTERNAL_insertFlagToScope(\n  name: string,\n  value: unknown,\n  maxSize: number = _INTERNAL_FLAG_BUFFER_SIZE,\n): void {\n  const scopeContexts = getCurrentScope().getScopeData().contexts;\n  if (!scopeContexts.flags) {\n    scopeContexts.flags = { values: [] };\n  }\n  const flags = scopeContexts.flags.values;\n  _INTERNAL_insertToFlagBuffer(flags, name, value, maxSize);\n}\n\n/**\n * Exported for tests only. Currently only accepts boolean values (otherwise no-op).\n * Inserts a flag into a FeatureFlag array while maintaining the following properties:\n * - Flags are sorted in order of recency, with the newest evaluation at the end.\n * - The flag names are always unique.\n * - The length of the array never exceeds `maxSize`.\n *\n * @param flags      The buffer to insert the flag into.\n * @param name       Name of the feature flag to insert.\n * @param value      Value of the feature flag.\n * @param maxSize    Max number of flags the buffer should store. Default value should always be used in production.\n */\nexport function _INTERNAL_insertToFlagBuffer(\n  flags: FeatureFlag[],\n  name: string,\n  value: unknown,\n  maxSize: number,\n): void {\n  if (typeof value !== 'boolean') {\n    return;\n  }\n\n  if (flags.length > maxSize) {\n    DEBUG_BUILD && debug.error(`[Feature Flags] insertToFlagBuffer called on a buffer larger than maxSize=${maxSize}`);\n    return;\n  }\n\n  // Check if the flag is already in the buffer - O(n)\n  const index = flags.findIndex(f => f.flag === name);\n\n  if (index !== -1) {\n    // The flag was found, remove it from its current position - O(n)\n    flags.splice(index, 1);\n  }\n\n  if (flags.length === maxSize) {\n    // If at capacity, pop the earliest flag - O(n)\n    flags.shift();\n  }\n\n  // Push the flag to the end - O(1)\n  flags.push({\n    flag: name,\n    result: value,\n  });\n}\n\n/**\n * Records a feature flag evaluation for the active span. This is a no-op for non-boolean values.\n * The flag and its value is stored in span attributes with the `flag.evaluation` prefix. Once the\n * unique flags for a span reaches maxFlagsPerSpan, subsequent flags are dropped.\n *\n * @param name             Name of the feature flag.\n * @param value            Value of the feature flag. Non-boolean values are ignored.\n * @param maxFlagsPerSpan  Max number of flags a buffer should store. Default value should always be used in production.\n */\nexport function _INTERNAL_addFeatureFlagToActiveSpan(\n  name: string,\n  value: unknown,\n  maxFlagsPerSpan: number = _INTERNAL_MAX_FLAGS_PER_SPAN,\n): void {\n  if (typeof value !== 'boolean') {\n    return;\n  }\n\n  const span = getActiveSpan();\n  if (!span) {\n    return;\n  }\n\n  const attributes = spanToJSON(span).data;\n\n  // If the flag already exists, always update it\n  if (`${SPAN_FLAG_ATTRIBUTE_PREFIX}${name}` in attributes) {\n    span.setAttribute(`${SPAN_FLAG_ATTRIBUTE_PREFIX}${name}`, value);\n    return;\n  }\n\n  // Else, add the flag to the span if we have not reached the max number of flags\n  const numOfAddedFlags = Object.keys(attributes).filter(key => key.startsWith(SPAN_FLAG_ATTRIBUTE_PREFIX)).length;\n  if (numOfAddedFlags < maxFlagsPerSpan) {\n    span.setAttribute(`${SPAN_FLAG_ATTRIBUTE_PREFIX}${name}`, value);\n  }\n}\n", "import { type Client } from '../../client';\nimport { defineIntegration } from '../../integration';\nimport { type Event, type EventHint } from '../../types/event';\nimport { type Integration, type IntegrationFn } from '../../types/integration';\nimport {\n  _INTERNAL_addFeatureFlagToActiveSpan,\n  _INTERNAL_copyFlagsFromScopeToEvent,\n  _INTERNAL_insertFlagToScope,\n} from '../../utils/featureFlags';\n\nexport interface FeatureFlagsIntegration extends Integration {\n  addFeatureFlag: (name: string, value: unknown) => void;\n}\n\n/**\n * Sentry integration for buffering feature flag evaluations manually with an API, and\n * capturing them on error events and spans.\n *\n * See the [feature flag documentation](https://develop.sentry.dev/sdk/expected-features/#feature-flags) for more information.\n *\n * @example\n * ```\n * import * as Sentry from '@sentry/browser';\n * import { type FeatureFlagsIntegration } from '@sentry/browser';\n *\n * // Setup\n * Sentry.init(..., integrations: [Sentry.featureFlagsIntegration()])\n *\n * // Verify\n * const flagsIntegration = Sentry.getClient()?.getIntegrationByName<FeatureFlagsIntegration>('FeatureFlags');\n * if (flagsIntegration) {\n *   flagsIntegration.addFeatureFlag('my-flag', true);\n * } else {\n *   // check your setup\n * }\n * Sentry.captureException(Exception('broke')); // 'my-flag' should be captured to this Sentry event.\n * ```\n */\nexport const featureFlagsIntegration = defineIntegration(() => {\n  return {\n    name: 'FeatureFlags',\n\n    processEvent(event: Event, _hint: EventHint, _client: Client): Event {\n      return _INTERNAL_copyFlagsFromScopeToEvent(event);\n    },\n\n    addFeatureFlag(name: string, value: unknown): void {\n      _INTERNAL_insertFlagToScope(name, value);\n      _INTERNAL_addFeatureFlagToActiveSpan(name, value);\n    },\n  };\n}) as IntegrationFn<FeatureFlagsIntegration>;\n", "import type { Client } from '../../client';\nimport { defineIntegration } from '../../integration';\nimport type { Event, EventHint } from '../../types/event';\nimport type { IntegrationFn } from '../../types/integration';\nimport {\n  _INTERNAL_addFeatureFlagToActiveSpan,\n  _INTERNAL_copyFlagsFromScopeToEvent,\n  _INTERNAL_insertFlagToScope,\n} from '../../utils/featureFlags';\nimport { fill } from '../../utils/object';\n\ninterface GrowthBookLike {\n  isOn(this: GrowthBookLike, featureKey: string, ...rest: unknown[]): boolean;\n  getFeatureValue(this: GrowthBookLike, featureKey: string, defaultValue: unknown, ...rest: unknown[]): unknown;\n}\n\n// `unknown[]` is contravariantly incompatible with real constructors (e.g. GrowthBook's), so use `any[]`.\n// oxlint-disable-next-line typescript-eslint/no-explicit-any\nexport type GrowthBookClassLike = new (...args: any[]) => GrowthBookLike;\n\n/**\n * Sentry integration for capturing feature flag evaluations from GrowthBook.\n *\n * Only boolean results are captured at this time.\n *\n * @example\n * ```typescript\n * import { GrowthBook } from '@growthbook/growthbook';\n * import * as Sentry from '@sentry/browser'; // or '@sentry/node'\n *\n * Sentry.init({\n *   dsn: 'your-dsn',\n *   integrations: [\n *     Sentry.growthbookIntegration({ growthbookClass: GrowthBook })\n *   ]\n * });\n * ```\n */\nexport const growthbookIntegration: IntegrationFn = defineIntegration(\n  ({ growthbookClass }: { growthbookClass: GrowthBookClassLike }) => {\n    return {\n      name: 'GrowthBook' as const,\n\n      setupOnce() {\n        const proto = growthbookClass.prototype as GrowthBookLike;\n\n        // Type guard and wrap isOn\n        if (typeof proto.isOn === 'function') {\n          fill(proto, 'isOn', _wrapAndCaptureBooleanResult);\n        }\n\n        // Type guard and wrap getFeatureValue\n        if (typeof proto.getFeatureValue === 'function') {\n          fill(proto, 'getFeatureValue', _wrapAndCaptureBooleanResult);\n        }\n      },\n\n      processEvent(event: Event, _hint: EventHint, _client: Client): Event {\n        return _INTERNAL_copyFlagsFromScopeToEvent(event);\n      },\n    };\n  },\n);\n\nfunction _wrapAndCaptureBooleanResult(\n  original: (this: GrowthBookLike, ...args: unknown[]) => unknown,\n): (this: GrowthBookLike, ...args: unknown[]) => unknown {\n  return function (this: GrowthBookLike, ...args: unknown[]): unknown {\n    const flagName = args[0];\n    const result = original.apply(this, args);\n\n    if (typeof flagName === 'string' && typeof result === 'boolean') {\n      _INTERNAL_insertFlagToScope(flagName, result);\n      _INTERNAL_addFeatureFlagToActiveSpan(flagName, result);\n    }\n\n    return result;\n  };\n}\n", "import type { Client } from '../client';\nimport { getCurrentScope, getIsolationScope } from '../currentScopes';\nimport { defineIntegration } from '../integration';\nimport { GEN_AI_CONVERSATION_ID_ATTRIBUTE } from '../semanticAttributes';\nimport type { IntegrationFn } from '../types/integration';\nimport type { Span } from '../types/span';\nimport { spanToJSON } from '../utils/spanUtils';\n\nconst INTEGRATION_NAME = 'ConversationId' as const;\n\nconst _conversationIdIntegration = (() => {\n  return {\n    name: INTEGRATION_NAME,\n    setup(client: Client) {\n      client.on('spanStart', (span: Span) => {\n        const scopeData = getCurrentScope().getScopeData();\n        const isolationScopeData = getIsolationScope().getScopeData();\n\n        const conversationId = scopeData.conversationId || isolationScopeData.conversationId;\n\n        if (conversationId) {\n          const { op, data: attributes, description: name } = spanToJSON(span);\n\n          // Only apply conversation ID to gen_ai spans.\n          // We also check for Vercel AI spans (ai.operationId attribute or ai.* span name)\n          // because the Vercel AI integration sets the gen_ai.* op in its own spanStart handler\n          // which fires after this, so the op is not yet available at this point.\n          if (!op?.startsWith('gen_ai.') && !attributes['ai.operationId'] && !name?.startsWith('ai.')) {\n            return;\n          }\n\n          span.setAttribute(GEN_AI_CONVERSATION_ID_ATTRIBUTE, conversationId);\n        }\n      });\n    },\n  };\n}) satisfies IntegrationFn;\n\n/**\n * Automatically applies conversation ID from scope to spans.\n *\n * This integration reads the conversation ID from the current or isolation scope\n * and applies it to spans when they start. This ensures the conversation ID is\n * available for all AI-related operations.\n */\nexport const conversationIdIntegration = defineIntegration(_conversationIdIntegration);\n", "import { HTTP_URL, URL_FULL } from '@sentry/conventions/attributes';\nimport { getClient } from './currentScopes';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from './semanticAttributes';\nimport { setHttpStatus, SPAN_STATUS_ERROR, spanIsIgnored, startInactiveSpan } from './tracing';\nimport { SentryNonRecordingSpan } from './tracing/sentryNonRecordingSpan';\nimport { hasSpanStreamingEnabled } from './tracing/spans/hasSpanStreamingEnabled';\nimport type { FetchBreadcrumbHint } from './types/breadcrumb';\nimport type { HandlerDataFetch } from './types/instrument';\nimport type { ResponseHookInfo } from './types/request';\nimport type { Span, SpanAttributes, SpanOrigin } from './types/span';\nimport { SENTRY_BAGGAGE_KEY_PREFIX } from './utils/baggage';\nimport { hasSpansEnabled } from './utils/hasSpansEnabled';\nimport { isInstanceOf, isRequest } from './utils/is';\nimport { getActiveSpan } from './utils/spanUtils';\nimport { getTraceData } from './utils/traceData';\nimport {\n  getSanitizedUrlStringFromUrlObject,\n  isURLObjectRelative,\n  parseStringToURLObject,\n  stripDataUrlContent,\n} from './utils/url';\n\ntype PolymorphicRequestHeaders =\n  | Record<string, unknown>\n  | Array<[string, unknown]>\n  | Iterable<Iterable<unknown>>\n  // the below is not precisely the Header type used in Request, but it'll pass duck-typing\n  | {\n      append: (key: string, value: string) => void;\n      get: (key: string) => string | null | undefined;\n    };\n\ninterface InstrumentFetchRequestOptions {\n  spanOrigin?: SpanOrigin;\n  propagateTraceparent?: boolean;\n  onRequestSpanEnd?: (span: Span, responseInformation: ResponseHookInfo) => void;\n}\n\n/**\n * Create and track fetch request spans for usage in combination with `addFetchInstrumentationHandler`.\n *\n * @deprecated pass an options object instead of the spanOrigin parameter\n *\n * @returns Span if a span was created, otherwise void.\n */\nexport function instrumentFetchRequest(\n  handlerData: HandlerDataFetch,\n  shouldCreateSpan: (url: string) => boolean,\n  shouldAttachHeaders: (url: string) => boolean,\n  spans: Record<string, Span>,\n  spanOrigin: SpanOrigin,\n): Span | undefined;\n/**\n * Create and track fetch request spans for usage in combination with `addFetchInstrumentationHandler`.\n *\n * @returns Span if a span was created, otherwise void.\n */\nexport function instrumentFetchRequest(\n  handlerData: HandlerDataFetch,\n  shouldCreateSpan: (url: string) => boolean,\n  shouldAttachHeaders: (url: string) => boolean,\n  spans: Record<string, Span>,\n  // eslint-disable-next-line @typescript-eslint/unified-signatures -- needed because the other overload is deprecated\n  instrumentFetchRequestOptions: InstrumentFetchRequestOptions,\n): Span | undefined;\n\n/**\n * Create and track fetch request spans for usage in combination with `addFetchInstrumentationHandler`.\n *\n * @returns Span if a span was created, otherwise void.\n */\nexport function instrumentFetchRequest(\n  handlerData: HandlerDataFetch,\n  shouldCreateSpan: (url: string) => boolean,\n  shouldAttachHeaders: (url: string) => boolean,\n  spans: Record<string, Span>,\n  spanOriginOrOptions?: SpanOrigin | InstrumentFetchRequestOptions,\n): Span | undefined {\n  if (!handlerData.fetchData) {\n    return undefined;\n  }\n\n  const { method, url } = handlerData.fetchData;\n\n  const shouldCreateSpanResult = hasSpansEnabled() && shouldCreateSpan(url);\n\n  if (handlerData.endTimestamp) {\n    const spanId = handlerData.fetchData.__span;\n    if (!spanId) return;\n\n    const span = spans[spanId];\n\n    if (span) {\n      // Only end the span and call hooks if we're actually recording\n      if (shouldCreateSpanResult) {\n        endSpan(span, handlerData);\n        _callOnRequestSpanEnd(span, handlerData, spanOriginOrOptions);\n      }\n\n      // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n      delete spans[spanId];\n    }\n\n    return undefined;\n  }\n\n  // Backwards-compatible with the old signature. Needed to introduce the combined optional parameter\n  // to avoid API breakage for anyone calling this function with the optional spanOrigin parameter\n  // TODO (v11): remove this backwards-compatible code and only accept the options parameter\n  const { spanOrigin = 'auto.http.browser', propagateTraceparent = false } =\n    typeof spanOriginOrOptions === 'object' ? spanOriginOrOptions : { spanOrigin: spanOriginOrOptions };\n\n  const client = getClient();\n  const hasParent = !!getActiveSpan();\n  // With span streaming, we always emit http.client spans, even without a parent span\n  const shouldEmitSpan = hasParent || (!!client && hasSpanStreamingEnabled(client));\n\n  const span =\n    shouldCreateSpanResult && shouldEmitSpan\n      ? startInactiveSpan(getSpanStartOptions(url, method, spanOrigin))\n      : new SentryNonRecordingSpan();\n  const spanForTraceHeaders = spanIsIgnored(span) && hasParent ? undefined : span;\n\n  if (shouldCreateSpanResult && !shouldEmitSpan) {\n    client?.recordDroppedEvent('no_parent_span', 'span');\n  }\n\n  handlerData.fetchData.__span = span.spanContext().spanId;\n  spans[span.spanContext().spanId] = span;\n\n  if (shouldAttachHeaders(handlerData.fetchData.url)) {\n    const request: string | Request = handlerData.args[0];\n\n    // Shallow clone the options object to avoid mutating the original user-provided object\n    // Examples: users re-using same options object for multiple fetch calls, frozen objects\n    const options: { [key: string]: unknown } = { ...(handlerData.args[1] || {}) };\n\n    const headers = _INTERNAL_getTracingHeadersForFetchRequest(\n      request,\n      options,\n      // If performance is disabled (TWP) or there's no active root span (pageload/navigation/interaction),\n      // we do not want to use the span as base for the trace headers,\n      // which means that the headers will be generated from the scope and the sampling decision is deferred\n      hasSpansEnabled() && shouldEmitSpan ? spanForTraceHeaders : undefined,\n      propagateTraceparent,\n    );\n    if (headers) {\n      // Ensure this is actually set, if no options have been passed previously\n      handlerData.args[1] = options;\n      options.headers = headers;\n    }\n  }\n\n  if (client) {\n    const fetchHint = {\n      input: handlerData.args,\n      response: handlerData.response,\n      startTimestamp: handlerData.startTimestamp,\n      endTimestamp: handlerData.endTimestamp,\n    } satisfies FetchBreadcrumbHint;\n\n    client.emit('beforeOutgoingRequestSpan', span, fetchHint);\n  }\n\n  return span;\n}\n\n/**\n * Calls the onRequestSpanEnd callback if it is defined.\n */\nexport function _callOnRequestSpanEnd(\n  span: Span,\n  handlerData: HandlerDataFetch,\n  spanOriginOrOptions?: SpanOrigin | InstrumentFetchRequestOptions,\n): void {\n  const onRequestSpanEnd =\n    typeof spanOriginOrOptions === 'object' && spanOriginOrOptions !== null\n      ? spanOriginOrOptions.onRequestSpanEnd\n      : undefined;\n\n  onRequestSpanEnd?.(span, {\n    headers: handlerData.response?.headers,\n    error: handlerData.error,\n  });\n}\n\n/**\n * Builds merged fetch headers that include `sentry-trace` and `baggage` (and optionally `traceparent`)\n * for the given request and init, without mutating the original request or options.\n * Returns `undefined` when there is no `sentry-trace` value to attach.\n *\n * @internal Exported for cross-package instrumentation (for example Cloudflare Workers fetcher bindings)\n * and unit tests\n *\n * Baggage handling:\n * 1. No previous baggage header → include Sentry baggage\n * 2. Previous baggage has no Sentry entries → merge Sentry baggage in\n * 3. Previous baggage already has Sentry entries → leave as-is (may be user-defined)\n */\n// eslint-disable-next-line complexity -- yup it's this complicated :(\nexport function _INTERNAL_getTracingHeadersForFetchRequest(\n  request: string | URL | Request,\n  fetchOptionsObj: {\n    headers?:\n      | {\n          [key: string]: string[] | string | undefined;\n        }\n      | PolymorphicRequestHeaders;\n  },\n  span?: Span,\n  propagateTraceparent?: boolean,\n): PolymorphicRequestHeaders | undefined {\n  const traceHeaders = getTraceData({ span, propagateTraceparent });\n  const sentryTrace = traceHeaders['sentry-trace'];\n  const baggage = traceHeaders.baggage;\n  const traceparent = traceHeaders.traceparent;\n\n  // Nothing to do, when we return undefined here, the original headers will be used\n  if (!sentryTrace) {\n    return undefined;\n  }\n\n  const originalHeaders = fetchOptionsObj.headers || (isRequest(request) ? request.headers : undefined);\n\n  if (!originalHeaders) {\n    return {\n      'sentry-trace': sentryTrace,\n      ...(baggage && { baggage }),\n      ...(traceparent && { traceparent }),\n    };\n  } else if (isHeaders(originalHeaders)) {\n    const newHeaders = new Headers(originalHeaders);\n\n    // We don't want to override manually added sentry headers\n    if (!newHeaders.get('sentry-trace')) {\n      newHeaders.set('sentry-trace', sentryTrace);\n    }\n\n    if (propagateTraceparent && traceparent && !newHeaders.get('traceparent')) {\n      newHeaders.set('traceparent', traceparent);\n    }\n\n    if (baggage) {\n      const prevBaggageHeader = newHeaders.get('baggage');\n\n      if (!prevBaggageHeader) {\n        newHeaders.set('baggage', baggage);\n      } else if (!baggageHeaderHasSentryBaggageValues(prevBaggageHeader)) {\n        newHeaders.set('baggage', `${prevBaggageHeader},${baggage}`);\n      }\n    }\n\n    return newHeaders;\n  } else if (isHeadersInitTupleArray(originalHeaders)) {\n    const newHeaders = [...originalHeaders];\n\n    if (!newHeaders.find(header => header[0] === 'sentry-trace')) {\n      newHeaders.push(['sentry-trace', sentryTrace]);\n    }\n\n    if (propagateTraceparent && traceparent && !newHeaders.find(header => header[0] === 'traceparent')) {\n      newHeaders.push(['traceparent', traceparent]);\n    }\n\n    const prevBaggageHeaderWithSentryValues = originalHeaders.find(\n      header =>\n        header[0] === 'baggage' && typeof header[1] === 'string' && baggageHeaderHasSentryBaggageValues(header[1]),\n    );\n\n    if (baggage && !prevBaggageHeaderWithSentryValues) {\n      // If there are multiple entries with the same key, the browser will merge the values into a single request header.\n      // Its therefore safe to simply push a \"baggage\" entry, even though there might already be another baggage header.\n      newHeaders.push(['baggage', baggage]);\n    }\n\n    return newHeaders;\n  } else {\n    const existingSentryTraceHeader = 'sentry-trace' in originalHeaders ? originalHeaders['sentry-trace'] : undefined;\n    const existingTraceparentHeader = 'traceparent' in originalHeaders ? originalHeaders.traceparent : undefined;\n    const existingBaggageHeader = 'baggage' in originalHeaders ? originalHeaders.baggage : undefined;\n\n    const newBaggageHeaders: string[] = existingBaggageHeader\n      ? Array.isArray(existingBaggageHeader)\n        ? [...existingBaggageHeader]\n        : [existingBaggageHeader]\n      : [];\n\n    const prevBaggageHeaderWithSentryValues =\n      existingBaggageHeader &&\n      (Array.isArray(existingBaggageHeader)\n        ? existingBaggageHeader.find(headerItem => baggageHeaderHasSentryBaggageValues(headerItem))\n        : baggageHeaderHasSentryBaggageValues(existingBaggageHeader));\n\n    if (baggage && !prevBaggageHeaderWithSentryValues) {\n      newBaggageHeaders.push(baggage);\n    }\n\n    const newHeaders: {\n      'sentry-trace': string;\n      baggage?: string;\n      traceparent?: string;\n    } = Object.assign({}, originalHeaders, {\n      'sentry-trace': (existingSentryTraceHeader as string | undefined) ?? sentryTrace,\n      ...(newBaggageHeaders.length > 0 && { baggage: newBaggageHeaders.join(',') }),\n    });\n\n    if (propagateTraceparent && traceparent && !existingTraceparentHeader) {\n      newHeaders.traceparent = traceparent;\n    }\n\n    return newHeaders;\n  }\n}\n\nfunction endSpan(span: Span, handlerData: HandlerDataFetch): void {\n  if (handlerData.response) {\n    setHttpStatus(span, handlerData.response.status);\n\n    const contentLength = handlerData.response?.headers?.get('content-length');\n\n    if (contentLength) {\n      const contentLengthNum = parseInt(contentLength);\n      if (contentLengthNum > 0) {\n        span.setAttribute('http.response_content_length', contentLengthNum);\n      }\n    }\n  } else if (handlerData.error) {\n    span.setStatus({ code: SPAN_STATUS_ERROR, message: 'internal_error' });\n  }\n  span.end();\n}\n\nfunction baggageHeaderHasSentryBaggageValues(baggageHeader: unknown): boolean {\n  if (typeof baggageHeader !== 'string') {\n    return false;\n  }\n\n  return baggageHeader.split(',').some(baggageEntry => baggageEntry.trim().startsWith(SENTRY_BAGGAGE_KEY_PREFIX));\n}\n\nfunction isHeaders(headers: unknown): headers is Headers {\n  return typeof Headers !== 'undefined' && isInstanceOf(headers, Headers);\n}\n\n/** `HeadersInit` array form: each entry is a [name, value] pair of strings. */\nfunction isHeadersInitTupleArray(headers: unknown): headers is [string, unknown][] {\n  if (!Array.isArray(headers)) {\n    return false;\n  }\n\n  return headers.every(\n    (item): item is [string, unknown] => Array.isArray(item) && item.length === 2 && typeof item[0] === 'string',\n  );\n}\n\nfunction getSpanStartOptions(\n  url: string,\n  method: string,\n  spanOrigin: SpanOrigin,\n): Parameters<typeof startInactiveSpan>[0] {\n  // Data URLs need special handling because parseStringToURLObject treats them as \"relative\"\n  // (no \"://\"), causing getSanitizedUrlStringFromUrlObject to return just the pathname\n  // without the \"data:\" prefix, making later stripDataUrlContent calls ineffective.\n  // So for data URLs, we strip the content first and use that directly.\n  if (url.startsWith('data:')) {\n    const sanitizedUrl = stripDataUrlContent(url);\n    return {\n      name: `${method} ${sanitizedUrl}`,\n      attributes: getFetchSpanAttributes(url, undefined, method, spanOrigin),\n    };\n  }\n\n  const parsedUrl = parseStringToURLObject(url);\n  const sanitizedUrl = parsedUrl ? getSanitizedUrlStringFromUrlObject(parsedUrl) : url;\n  return {\n    name: `${method} ${sanitizedUrl}`,\n    attributes: getFetchSpanAttributes(url, parsedUrl, method, spanOrigin),\n  };\n}\n\nfunction getFetchSpanAttributes(\n  url: string,\n  parsedUrl: ReturnType<typeof parseStringToURLObject>,\n  method: string,\n  spanOrigin: SpanOrigin,\n): SpanAttributes {\n  const attributes: SpanAttributes = {\n    url: stripDataUrlContent(url),\n    type: 'fetch',\n    'http.method': method,\n    [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: spanOrigin,\n    [SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'http.client',\n  };\n  if (parsedUrl) {\n    if (!isURLObjectRelative(parsedUrl)) {\n      // oxlint-disable-next-line typescript/no-deprecated\n      attributes[HTTP_URL] = stripDataUrlContent(parsedUrl.href);\n      attributes[URL_FULL] = stripDataUrlContent(parsedUrl.href);\n      attributes['server.address'] = parsedUrl.host;\n    }\n    if (parsedUrl.search) {\n      attributes['http.query'] = parsedUrl.search;\n    }\n    if (parsedUrl.hash) {\n      attributes['http.fragment'] = parsedUrl.hash;\n    }\n  }\n  return attributes;\n}\n", "import { getClient, getCurrentScope } from './currentScopes';\nimport type { EventHint } from './types/event';\nimport type { FeedbackEvent, SendFeedbackParams } from './types/feedback';\n\n/**\n * Send user feedback to Sentry.\n */\nexport function captureFeedback(\n  params: SendFeedbackParams,\n  hint: EventHint & { includeReplay?: boolean } = {},\n  scope = getCurrentScope(),\n): string {\n  const { message, name, email, url, source, associatedEventId, tags } = params;\n\n  const feedbackEvent: FeedbackEvent = {\n    contexts: {\n      feedback: {\n        contact_email: email,\n        name,\n        message,\n        url,\n        source,\n        associated_event_id: associatedEventId,\n      },\n    },\n    type: 'feedback',\n    level: 'info',\n    tags,\n  };\n\n  const client = scope?.getClient() || getClient();\n\n  if (client) {\n    client.emit('beforeSendFeedback', feedbackEvent, hint);\n  }\n\n  const eventId = scope.captureEvent(feedbackEvent, hint);\n\n  return eventId;\n}\n", "import type { Scope } from '../scope';\nimport type { Log, LogSeverityLevel } from '../types/log';\nimport type { ParameterizedString } from '../types/parameterize';\nimport { _INTERNAL_captureLog } from './internal';\n\n/**\n * Capture a log with the given level.\n *\n * @param level - The level of the log.\n * @param message - The message to log.\n * @param attributes - Arbitrary structured data that stores information about the log - e.g., userId: 100.\n * @param scope - The scope to capture the log with.\n * @param severityNumber - The severity number of the log.\n */\nfunction captureLog(\n  level: LogSeverityLevel,\n  message: ParameterizedString,\n  attributes?: Log['attributes'],\n  scope?: Scope,\n  severityNumber?: Log['severityNumber'],\n): void {\n  _INTERNAL_captureLog({ level, message, attributes, severityNumber }, scope);\n}\n\n/**\n * Additional metadata to capture the log with.\n */\ninterface CaptureLogMetadata {\n  scope?: Scope;\n}\n\n/**\n * @summary Capture a log with the `trace` level.\n *\n * @param message - The message to log.\n * @param attributes - Arbitrary structured data that stores information about the log - e.g., { userId: 100, route: '/dashboard' }.\n * @param metadata - additional metadata to capture the log with.\n *\n * @example\n *\n * ```\n * Sentry.logger.trace('User clicked submit button', {\n *   buttonId: 'submit-form',\n *   formId: 'user-profile',\n *   timestamp: Date.now()\n * });\n * ```\n *\n * @example With template strings\n *\n * ```\n * Sentry.logger.trace(Sentry.logger.fmt`User ${user} navigated to ${page}`, {\n *   userId: '123',\n *   sessionId: 'abc-xyz'\n * });\n * ```\n */\nexport function trace(\n  message: ParameterizedString,\n  attributes?: Log['attributes'],\n  { scope }: CaptureLogMetadata = {},\n): void {\n  captureLog('trace', message, attributes, scope);\n}\n\n/**\n * @summary Capture a log with the `debug` level.\n *\n * @param message - The message to log.\n * @param attributes - Arbitrary structured data that stores information about the log - e.g., { component: 'Header', state: 'loading' }.\n * @param metadata - additional metadata to capture the log with.\n *\n * @example\n *\n * ```\n * Sentry.logger.debug('Component mounted', {\n *   component: 'UserProfile',\n *   props: { userId: 123 },\n *   renderTime: 150\n * });\n * ```\n *\n * @example With template strings\n *\n * ```\n * Sentry.logger.debug(Sentry.logger.fmt`API request to ${endpoint} failed`, {\n *   statusCode: 404,\n *   requestId: 'req-123',\n *   duration: 250\n * });\n * ```\n */\nexport function debug(\n  message: ParameterizedString,\n  attributes?: Log['attributes'],\n  { scope }: CaptureLogMetadata = {},\n): void {\n  captureLog('debug', message, attributes, scope);\n}\n\n/**\n * @summary Capture a log with the `info` level.\n *\n * @param message - The message to log.\n * @param attributes - Arbitrary structured data that stores information about the log - e.g., { feature: 'checkout', status: 'completed' }.\n * @param metadata - additional metadata to capture the log with.\n *\n * @example\n *\n * ```\n * Sentry.logger.info('User completed checkout', {\n *   orderId: 'order-123',\n *   amount: 99.99,\n *   paymentMethod: 'credit_card'\n * });\n * ```\n *\n * @example With template strings\n *\n * ```\n * Sentry.logger.info(Sentry.logger.fmt`User ${user} updated profile picture`, {\n *   userId: 'user-123',\n *   imageSize: '2.5MB',\n *   timestamp: Date.now()\n * });\n * ```\n */\nexport function info(\n  message: ParameterizedString,\n  attributes?: Log['attributes'],\n  { scope }: CaptureLogMetadata = {},\n): void {\n  captureLog('info', message, attributes, scope);\n}\n\n/**\n * @summary Capture a log with the `warn` level.\n *\n * @param message - The message to log.\n * @param attributes - Arbitrary structured data that stores information about the log - e.g., { browser: 'Chrome', version: '91.0' }.\n * @param metadata - additional metadata to capture the log with.\n *\n * @example\n *\n * ```\n * Sentry.logger.warn('Browser compatibility issue detected', {\n *   browser: 'Safari',\n *   version: '14.0',\n *   feature: 'WebRTC',\n *   fallback: 'enabled'\n * });\n * ```\n *\n * @example With template strings\n *\n * ```\n * Sentry.logger.warn(Sentry.logger.fmt`API endpoint ${endpoint} is deprecated`, {\n *   recommendedEndpoint: '/api/v2/users',\n *   sunsetDate: '2024-12-31',\n *   clientVersion: '1.2.3'\n * });\n * ```\n */\nexport function warn(\n  message: ParameterizedString,\n  attributes?: Log['attributes'],\n  { scope }: CaptureLogMetadata = {},\n): void {\n  captureLog('warn', message, attributes, scope);\n}\n\n/**\n * @summary Capture a log with the `error` level.\n *\n * @param message - The message to log.\n * @param attributes - Arbitrary structured data that stores information about the log - e.g., { error: 'NetworkError', url: '/api/data' }.\n * @param metadata - additional metadata to capture the log with.\n *\n * @example\n *\n * ```\n * Sentry.logger.error('Failed to load user data', {\n *   error: 'NetworkError',\n *   url: '/api/users/123',\n *   statusCode: 500,\n *   retryCount: 3\n * });\n * ```\n *\n * @example With template strings\n *\n * ```\n * Sentry.logger.error(Sentry.logger.fmt`Payment processing failed for order ${orderId}`, {\n *   error: 'InsufficientFunds',\n *   amount: 100.00,\n *   currency: 'USD',\n *   userId: 'user-456'\n * });\n * ```\n */\nexport function error(\n  message: ParameterizedString,\n  attributes?: Log['attributes'],\n  { scope }: CaptureLogMetadata = {},\n): void {\n  captureLog('error', message, attributes, scope);\n}\n\n/**\n * @summary Capture a log with the `fatal` level.\n *\n * @param message - The message to log.\n * @param attributes - Arbitrary structured data that stores information about the log - e.g., { appState: 'corrupted', sessionId: 'abc-123' }.\n * @param metadata - additional metadata to capture the log with.\n *\n * @example\n *\n * ```\n * Sentry.logger.fatal('Application state corrupted', {\n *   lastKnownState: 'authenticated',\n *   sessionId: 'session-123',\n *   timestamp: Date.now(),\n *   recoveryAttempted: true\n * });\n * ```\n *\n * @example With template strings\n *\n * ```\n * Sentry.logger.fatal(Sentry.logger.fmt`Critical system failure in ${service}`, {\n *   service: 'payment-processor',\n *   errorCode: 'CRITICAL_FAILURE',\n *   affectedUsers: 150,\n *   timestamp: Date.now()\n * });\n * ```\n */\nexport function fatal(\n  message: ParameterizedString,\n  attributes?: Log['attributes'],\n  { scope }: CaptureLogMetadata = {},\n): void {\n  captureLog('fatal', message, attributes, scope);\n}\n\nexport { fmt } from '../utils/parameterize';\n", "import { isPrimitive } from '../utils/is';\nimport { normalize } from '../utils/normalize';\nimport { GLOBAL_OBJ } from '../utils/worldwide';\n\ntype GlobalObjectWithUtil = typeof GLOBAL_OBJ & {\n  util: {\n    format: (...args: unknown[]) => string;\n  };\n};\n\n/**\n * Formats the given values into a string.\n *\n * @param values - The values to format.\n * @param normalizeDepth - The depth to normalize the values.\n * @param normalizeMaxBreadth - The max breadth to normalize the values.\n * @returns The formatted string.\n */\nexport function formatConsoleArgs(values: unknown[], normalizeDepth: number, normalizeMaxBreadth: number): string {\n  return 'util' in GLOBAL_OBJ && typeof (GLOBAL_OBJ as GlobalObjectWithUtil).util.format === 'function'\n    ? (GLOBAL_OBJ as GlobalObjectWithUtil).util.format(...values)\n    : safeJoinConsoleArgs(values, normalizeDepth, normalizeMaxBreadth);\n}\n\n/**\n * Joins the given values into a string.\n *\n * @param values - The values to join.\n * @param normalizeDepth - The depth to normalize the values.\n * @param normalizeMaxBreadth - The max breadth to normalize the values.\n * @returns The joined string.\n */\nexport function safeJoinConsoleArgs(values: unknown[], normalizeDepth: number, normalizeMaxBreadth: number): string {\n  return values\n    .map(value =>\n      isPrimitive(value) ? String(value) : JSON.stringify(normalize(value, normalizeDepth, normalizeMaxBreadth)),\n    )\n    .join(' ');\n}\n\n/**\n * Checks if a string contains console substitution patterns like %s, %d, %i, %f, %o, %O, %c.\n *\n * @param str - The string to check\n * @returns true if the string contains console substitution patterns\n */\nexport function hasConsoleSubstitutions(str: string): boolean {\n  // Match console substitution patterns: %s, %d, %i, %f, %o, %O, %c\n  return /%[sdifocO]/.test(str);\n}\n\n/**\n * Creates template attributes for multiple console arguments.\n *\n * @param args - The console arguments\n * @returns An object with template and parameter attributes\n */\nexport function createConsoleTemplateAttributes(firstArg: unknown, followingArgs: unknown[]): Record<string, unknown> {\n  const attributes: Record<string, unknown> = {};\n\n  // Create template with placeholders for each argument\n  const template = new Array(followingArgs.length).fill('{}').join(' ');\n  attributes['sentry.message.template'] = `${firstArg} ${template}`;\n\n  // Add each argument as a parameter\n  followingArgs.forEach((arg, index) => {\n    attributes[`sentry.message.parameter.${index}`] = arg;\n  });\n\n  return attributes;\n}\n", "import { getClient } from '../currentScopes';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { addConsoleInstrumentationHandler } from '../instrument/console';\nimport { defineIntegration } from '../integration';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '../semanticAttributes';\nimport type { ConsoleLevel } from '../types/instrument';\nimport type { IntegrationFn } from '../types/integration';\nimport { CONSOLE_LEVELS, debug } from '../utils/debug-logger';\nimport { isPlainObject } from '../utils/is';\nimport { normalize } from '../utils/normalize';\nimport { _INTERNAL_captureLog } from './internal';\nimport { createConsoleTemplateAttributes, formatConsoleArgs, hasConsoleSubstitutions } from './utils';\n\ninterface CaptureConsoleOptions {\n  levels: ConsoleLevel[];\n}\n\nconst INTEGRATION_NAME = 'ConsoleLogs' as const;\n\nconst DEFAULT_ATTRIBUTES = {\n  [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.log.console',\n};\n\nconst _consoleLoggingIntegration = ((options: Partial<CaptureConsoleOptions> = {}) => {\n  const levels = options.levels || CONSOLE_LEVELS;\n\n  return {\n    name: INTEGRATION_NAME,\n    setup(client) {\n      const { enableLogs, normalizeDepth = 3, normalizeMaxBreadth = 1_000 } = client.getOptions();\n      if (!enableLogs) {\n        DEBUG_BUILD && debug.warn('`enableLogs` is not enabled, ConsoleLogs integration disabled');\n        return;\n      }\n\n      const unsubscribe = addConsoleInstrumentationHandler(({ args, level }) => {\n        if (getClient() !== client || !levels.includes(level)) {\n          return;\n        }\n\n        const firstArg = args[0];\n        const followingArgs = args.slice(1);\n\n        if (level === 'assert') {\n          if (!firstArg) {\n            const assertionMessage =\n              followingArgs.length > 0\n                ? `Assertion failed: ${formatConsoleArgs(followingArgs, normalizeDepth, normalizeMaxBreadth)}`\n                : 'Assertion failed';\n            _INTERNAL_captureLog({ level: 'error', message: assertionMessage, attributes: DEFAULT_ATTRIBUTES });\n          }\n          return;\n        }\n\n        const isLevelLog = level === 'log';\n\n        const attributes: Record<string, unknown> = { ...DEFAULT_ATTRIBUTES };\n\n        if (isPlainObject(firstArg)) {\n          // Object-first: extract object keys as attributes, remaining args as parameters\n          Object.assign(attributes, normalize(firstArg, normalizeDepth, normalizeMaxBreadth));\n\n          const remainingArgsStartIndex = typeof args[1] === 'string' ? 2 : 1;\n          const remainingArgs = args.slice(remainingArgsStartIndex);\n\n          remainingArgs.forEach((arg, index) => {\n            attributes[`sentry.message.parameter.${index}`] = normalize(arg, normalizeDepth, normalizeMaxBreadth);\n          });\n        } else {\n          // Fallback: template + parameters when first arg is a string without substitutions\n          const shouldGenerateTemplate =\n            followingArgs.length > 0 && typeof firstArg === 'string' && !hasConsoleSubstitutions(firstArg);\n\n          if (shouldGenerateTemplate) {\n            const templateAttrs = createConsoleTemplateAttributes(firstArg, followingArgs);\n            for (const [key, value] of Object.entries(templateAttrs)) {\n              attributes[key] = key.startsWith('sentry.message.parameter.')\n                ? normalize(value, normalizeDepth, normalizeMaxBreadth)\n                : value;\n            }\n          }\n        }\n\n        _INTERNAL_captureLog({\n          level: isLevelLog ? 'info' : level,\n          message: formatConsoleArgs(args, normalizeDepth, normalizeMaxBreadth),\n          severityNumber: isLevelLog ? 10 : undefined,\n          attributes,\n        });\n      });\n\n      client.registerCleanup(unsubscribe);\n    },\n  };\n}) satisfies IntegrationFn;\n\n/**\n * Captures calls to the `console` API as logs in Sentry.\n *\n * @experimental This feature is experimental and may be changed or removed in future versions.\n *\n * By default the integration instruments `console.debug`, `console.info`, `console.warn`, `console.error`,\n * `console.log`, `console.trace`, and `console.assert`. You can use the `levels` option to customize which\n * levels are captured.\n *\n * @example\n *\n * ```ts\n * import * as Sentry from '@sentry/browser';\n *\n * Sentry.init({\n *   integrations: [Sentry.consoleLoggingIntegration({ levels: ['error', 'warn'] })],\n * });\n * ```\n */\nexport const consoleLoggingIntegration = defineIntegration(_consoleLoggingIntegration);\n", "import type { Scope } from '../scope';\nimport type { Metric, MetricType } from '../types/metric';\nimport { _INTERNAL_captureMetric } from './internal';\n\n/**\n * Options for capturing a metric.\n */\nexport interface MetricOptions {\n  /**\n   * The unit of the metric value.\n   */\n  unit?: string;\n\n  /**\n   * Arbitrary structured data that stores information about the metric.\n   */\n  attributes?: Metric['attributes'];\n\n  /**\n   * The scope to capture the metric with.\n   */\n  scope?: Scope;\n}\n\n/**\n * Capture a metric with the given type, name, and value.\n *\n * @param type - The type of the metric.\n * @param name - The name of the metric.\n * @param value - The value of the metric.\n * @param options - Options for capturing the metric.\n */\nfunction captureMetric(type: MetricType, name: string, value: number, options?: MetricOptions): void {\n  _INTERNAL_captureMetric(\n    { type, name, value, unit: options?.unit, attributes: options?.attributes },\n    { scope: options?.scope },\n  );\n}\n\n/**\n * @summary Increment a counter metric.\n *\n * @param name - The name of the counter metric.\n * @param value - The value to increment by (defaults to 1).\n * @param options - Options for capturing the metric.\n *\n * @example\n *\n * ```\n * Sentry.metrics.count('api.requests', 1, {\n *   attributes: {\n *     endpoint: '/api/users',\n *     method: 'GET',\n *     status: 200\n *   }\n * });\n * ```\n *\n * @example With custom value\n *\n * ```\n * Sentry.metrics.count('items.processed', 5, {\n *   attributes: {\n *     processor: 'batch-processor',\n *     queue: 'high-priority'\n *   }\n * });\n * ```\n */\nexport function count(name: string, value: number = 1, options?: MetricOptions): void {\n  captureMetric('counter', name, value, options);\n}\n\n/**\n * @summary Set a gauge metric to a specific value.\n *\n * @param name - The name of the gauge metric.\n * @param value - The current value of the gauge.\n * @param options - Options for capturing the metric.\n *\n * @example\n *\n * ```\n * Sentry.metrics.gauge('memory.usage', 1024, {\n *   unit: 'megabyte',\n *   attributes: {\n *     process: 'web-server',\n *     region: 'us-east-1'\n *   }\n * });\n * ```\n *\n * @example Without unit\n *\n * ```\n * Sentry.metrics.gauge('active.connections', 42, {\n *   attributes: {\n *     server: 'api-1',\n *     protocol: 'websocket'\n *   }\n * });\n * ```\n */\nexport function gauge(name: string, value: number, options?: MetricOptions): void {\n  captureMetric('gauge', name, value, options);\n}\n\n/**\n * @summary Record a value in a distribution metric.\n *\n * @param name - The name of the distribution metric.\n * @param value - The value to record in the distribution.\n * @param options - Options for capturing the metric.\n *\n * @example\n *\n * ```\n * Sentry.metrics.distribution('task.duration', 500, {\n *   unit: 'millisecond',\n *   attributes: {\n *     task: 'data-processing',\n *     priority: 'high'\n *   }\n * });\n * ```\n *\n * @example Without unit\n *\n * ```\n * Sentry.metrics.distribution('batch.size', 100, {\n *   attributes: {\n *     processor: 'batch-1',\n *     type: 'async'\n *   }\n * });\n * ```\n */\nexport function distribution(name: string, value: number, options?: MetricOptions): void {\n  captureMetric('distribution', name, value, options);\n}\n", "import type { Client } from '../client';\nimport { getClient } from '../currentScopes';\nimport { _INTERNAL_captureLog } from '../logs/internal';\nimport { createConsoleTemplateAttributes, formatConsoleArgs, hasConsoleSubstitutions } from '../logs/utils';\nimport type { LogSeverityLevel } from '../types/log';\nimport { isPlainObject } from '../utils/is';\nimport { normalize } from '../utils/normalize';\n\n/**\n * Result of extracting structured attributes from console arguments.\n */\ninterface ExtractAttributesResult {\n  /**\n   * The log message to use for the log entry, typically constructed from the console arguments.\n   */\n  message?: string;\n\n  /**\n   * The parameterized template string which is added as `sentry.message.template` attribute if applicable.\n   */\n  messageTemplate?: string;\n\n  /**\n   * Remaining arguments to process as attributes with keys like `sentry.message.parameter.0`, `sentry.message.parameter.1`, etc.\n   */\n  messageParameters?: unknown[];\n\n  /**\n   * Additional attributes to add to the log.\n   */\n  attributes?: Record<string, unknown>;\n}\n\n/**\n * Options for the Sentry Consola reporter.\n */\ninterface ConsolaReporterOptions {\n  /**\n   * Use this option to filter which levels should be captured. By default, all levels are captured.\n   *\n   * @example\n   * ```ts\n   * const sentryReporter = Sentry.createConsolaReporter({\n   *   // Only capture error and warn logs\n   *   levels: ['error', 'warn'],\n   * });\n   * consola.addReporter(sentryReporter);\n   * ```\n   */\n  levels?: Array<LogSeverityLevel>;\n\n  /**\n   * Optionally provide a specific Sentry client instance to use for capturing logs.\n   * If not provided, the current client will be retrieved using `getClient()`.\n   *\n   * This is useful when you want to use specific client options for log normalization\n   * or when working with multiple client instances.\n   *\n   * @example\n   * ```ts\n   * const sentryReporter = Sentry.createConsolaReporter({\n   *   client: myCustomClient,\n   * });\n   * ```\n   */\n  client?: Client;\n}\n\nexport interface ConsolaReporter {\n  log: (logObj: ConsolaLogObject) => void;\n}\n\n/**\n * Represents a log object that Consola reporters receive.\n *\n * This interface matches the structure of log objects passed to Consola reporters.\n * See: https://github.com/unjs/consola#custom-reporters\n *\n * @example\n * ```ts\n * const reporter = {\n *   log(logObj: ConsolaLogObject) {\n *     console.log(`[${logObj.type}] ${logObj.message || logObj.args?.join(' ')}`);\n *   }\n * };\n * consola.addReporter(reporter);\n * ```\n */\nexport interface ConsolaLogObject {\n  /**\n   * Allows additional custom properties to be set on the log object. These properties will be captured as log attributes.\n   *\n   * Additional properties are set when passing a single object with a `message` (`consola.[type]({ message: '', ... })`) or if the reporter is called directly\n   *\n   * @example\n   * ```ts\n   * const reporter = Sentry.createConsolaReporter();\n   * reporter.log({\n   *   type: 'info',\n   *   message: 'User action',\n   *   userId: 123,\n   *   sessionId: 'abc-123'\n   * });\n   * // Will create attributes: `userId` and `sessionId`\n   * ```\n   */\n  [key: string]: unknown;\n\n  /**\n   * The numeric log level (0-5) or null.\n   *\n   * Consola log levels:\n   * - 0: Fatal and Error\n   * - 1: Warnings\n   * - 2: Normal logs\n   * - 3: Informational logs, success, fail, ready, start, box, ...\n   * - 4: Debug logs\n   * - 5: Trace logs\n   * - null: Some special types like 'verbose'\n   *\n   * See: https://github.com/unjs/consola/blob/main/README.md#log-level\n   */\n  level?: number | null;\n\n  /**\n   * The log type/method name (e.g., 'error', 'warn', 'info', 'debug', 'trace', 'success', 'fail', etc.).\n   *\n   * Consola built-in types include:\n   * - Standard: silent, fatal, error, warn, log, info, success, fail, ready, start, box, debug, trace, verbose\n   * - Custom types can also be defined\n   *\n   * See: https://github.com/unjs/consola/blob/main/README.md#log-types\n   */\n  type?: string;\n\n  /**\n   * An optional tag/scope for the log entry.\n   *\n   * Tags are created using `consola.withTag('scope')` and help categorize logs.\n   *\n   * @example\n   * ```ts\n   * const scopedLogger = consola.withTag('auth');\n   * scopedLogger.info('User logged in'); // tag will be 'auth'\n   * ```\n   *\n   * See: https://github.com/unjs/consola/blob/main/README.md#withtagtag\n   */\n  tag?: string;\n\n  /**\n   * The raw arguments passed to the log method.\n   *\n   * These args are typically formatted into the final `message`. In Consola reporters, `message` is not provided. See: https://github.com/unjs/consola/issues/406#issuecomment-3684792551\n   *\n   * @example\n   * ```ts\n   * consola.info('Hello', 'world', { user: 'john' });\n   * // args = ['Hello', 'world', { user: 'john' }]\n   * ```\n   *\n   * @example\n   * ```ts\n   * // `message` is a reserved property in Consola\n   * consola.log({ message: 'Hello' });\n   * // args = ['Hello']\n   * ```\n   */\n  args?: unknown[];\n\n  /**\n   * The timestamp when the log was created.\n   *\n   * This is automatically set by Consola when the log is created.\n   */\n  date?: Date;\n\n  /**\n   * The formatted log message.\n   *\n   * When provided, this is the final formatted message. When not provided,\n   * the message should be constructed from the `args` array.\n   *\n   * Note: In reporters, `message` is typically undefined. It is primarily for\n   * `consola.[type]({ message: 'xxx' })` usage and is normalized into `args` before\n   * reporters receive the log object. See: https://github.com/unjs/consola/issues/406#issuecomment-3684792551\n   */\n  message?: string;\n}\n\nconst DEFAULT_CAPTURED_LEVELS: Array<LogSeverityLevel> = ['trace', 'debug', 'info', 'warn', 'error', 'fatal'];\n\n/**\n * Creates a new Sentry reporter for Consola that forwards logs to Sentry.\n *\n * **Note: This integration supports Consola v3.x only.** The reporter interface and log object structure\n * may differ in other versions of Consola.\n *\n * @param options - Configuration options for the reporter.\n * @returns A Consola reporter that can be added to consola instances.\n *\n * @example\n * ```ts\n * import * as Sentry from '@sentry/node';\n * import { consola } from 'consola';\n *\n * Sentry.init({\n *   dsn: '__DSN__',\n * });\n *\n * const sentryReporter = Sentry.createConsolaReporter({\n *   // Optional: filter levels to capture\n *   levels: ['error', 'warn', 'info'],\n * });\n *\n * consola.addReporter(sentryReporter);\n *\n * // Now consola logs will be captured by Sentry\n * consola.info('This will be sent to Sentry');\n * consola.error('This error will also be sent to Sentry');\n * ```\n */\nexport function createConsolaReporter(options: ConsolaReporterOptions = {}): ConsolaReporter {\n  const levels = new Set(options.levels ?? DEFAULT_CAPTURED_LEVELS);\n  const providedClient = options.client;\n\n  return {\n    log(logObj: ConsolaLogObject) {\n      // We need to exclude certain known properties from being added as additional attributes\n      // eslint-disable-next-line @typescript-eslint/no-unused-vars\n      const { type, level, message: consolaMessage, args, tag, date: _date, ...rest } = logObj;\n\n      // Get client - use provided client or current client\n      const client = providedClient || getClient();\n      if (!client) {\n        return;\n      }\n\n      // Determine the log severity level\n      const logSeverityLevel = getLogSeverityLevel(type, level);\n\n      // Early exit if this level should not be captured\n      if (!levels.has(logSeverityLevel)) {\n        return;\n      }\n\n      const { normalizeDepth = 3, normalizeMaxBreadth = 1_000 } = client.getOptions();\n\n      const attributes: Record<string, unknown> = {};\n\n      // Build attributes\n      for (const [key, value] of Object.entries(rest)) {\n        attributes[key] = normalize(value, normalizeDepth, normalizeMaxBreadth);\n      }\n\n      attributes['sentry.origin'] = 'auto.log.consola';\n\n      if (tag) {\n        attributes['consola.tag'] = tag;\n      }\n\n      if (type) {\n        attributes['consola.type'] = type;\n      }\n\n      // Only add level if it's a valid number (not null/undefined)\n      if (level != null && typeof level === 'number') {\n        attributes['consola.level'] = level;\n      }\n\n      const extractionResult = processExtractedAttributes(\n        defaultExtractAttributes(args, normalizeDepth, normalizeMaxBreadth),\n        normalizeDepth,\n        normalizeMaxBreadth,\n      );\n\n      if (extractionResult?.attributes) {\n        Object.assign(attributes, extractionResult.attributes);\n      }\n\n      _INTERNAL_captureLog({\n        level: logSeverityLevel,\n        message:\n          extractionResult?.message ||\n          consolaMessage ||\n          (args && formatConsoleArgs(args, normalizeDepth, normalizeMaxBreadth)) ||\n          '',\n        attributes,\n      });\n    },\n  };\n}\n\n// Mapping from consola log types to Sentry log severity levels\nconst CONSOLA_TYPE_TO_LOG_SEVERITY_LEVEL_MAP: Record<string, LogSeverityLevel> = {\n  // Consola built-in types\n  silent: 'trace',\n  fatal: 'fatal',\n  error: 'error',\n  warn: 'warn',\n  log: 'info',\n  info: 'info',\n  success: 'info',\n  fail: 'error',\n  ready: 'info',\n  start: 'info',\n  box: 'info',\n  debug: 'debug',\n  trace: 'trace',\n  verbose: 'debug',\n  // Custom types that might exist\n  critical: 'fatal',\n  notice: 'info',\n};\n\n// Mapping from consola log levels (numbers) to Sentry log severity levels\nconst CONSOLA_LEVEL_TO_LOG_SEVERITY_LEVEL_MAP: Record<number, LogSeverityLevel> = {\n  0: 'fatal', // Fatal and Error\n  1: 'warn', // Warnings\n  2: 'info', // Normal logs\n  3: 'info', // Informational logs, success, fail, ready, start, ...\n  4: 'debug', // Debug logs\n  5: 'trace', // Trace logs\n};\n\n/**\n * Determines the log severity level from Consola type and level.\n *\n * @param type - The Consola log type (e.g., 'error', 'warn', 'info')\n * @param level - The Consola numeric log level (0-5) or null for some types like 'verbose'\n * @returns The corresponding Sentry log severity level\n */\nfunction getLogSeverityLevel(type?: string, level?: number | null): LogSeverityLevel {\n  // Handle special case for verbose logs (level can be null with infinite level in Consola)\n  if (type === 'verbose') {\n    return 'debug';\n  }\n\n  // Handle silent logs - these should be at trace level\n  if (type === 'silent') {\n    return 'trace';\n  }\n\n  // First try to map by type (more specific)\n  if (type) {\n    const mappedLevel = CONSOLA_TYPE_TO_LOG_SEVERITY_LEVEL_MAP[type];\n    if (mappedLevel) {\n      return mappedLevel;\n    }\n  }\n\n  // Fallback to level mapping (handle null level)\n  if (typeof level === 'number') {\n    const mappedLevel = CONSOLA_LEVEL_TO_LOG_SEVERITY_LEVEL_MAP[level];\n    if (mappedLevel) {\n      return mappedLevel;\n    }\n  }\n\n  // Default fallback\n  return 'info';\n}\n\n/**\n * Extracts structured attributes from console arguments. If the first argument is a plain object, its properties are extracted as attributes.\n */\nfunction defaultExtractAttributes(\n  args: unknown[] | undefined,\n  normalizeDepth: number,\n  normalizeMaxBreadth: number,\n): ExtractAttributesResult {\n  if (!args?.length) {\n    return { message: '' };\n  }\n\n  // Message looks like how consola logs the message to the console (all args stringified and joined)\n  const message = formatConsoleArgs(args, normalizeDepth, normalizeMaxBreadth);\n\n  const firstArg = args[0];\n\n  if (isPlainObject(firstArg)) {\n    // Remaining args start from index 2 i f we used second arg as message, otherwise from index 1\n    const remainingArgsStartIndex = typeof args[1] === 'string' ? 2 : 1;\n    const remainingArgs = args.slice(remainingArgsStartIndex);\n\n    return {\n      message,\n      // Object content from first arg is added as attributes\n      attributes: firstArg,\n      // Add remaining args as message parameters\n      messageParameters: remainingArgs,\n    };\n  } else {\n    const followingArgs = args.slice(1);\n\n    const shouldAddTemplateAttr =\n      followingArgs.length > 0 && typeof firstArg === 'string' && !hasConsoleSubstitutions(firstArg);\n\n    return {\n      message,\n      messageTemplate: shouldAddTemplateAttr ? firstArg : undefined,\n      messageParameters: shouldAddTemplateAttr ? followingArgs : undefined,\n    };\n  }\n}\n\n/**\n * Processes extracted attributes by normalizing them and preparing message parameter attributes if a template is present.\n */\nfunction processExtractedAttributes(\n  extractionResult: ExtractAttributesResult,\n  normalizeDepth: number,\n  normalizeMaxBreadth: number,\n): { message: string | undefined; attributes: Record<string, unknown> } {\n  const { message, attributes, messageTemplate, messageParameters } = extractionResult;\n\n  const messageParamAttributes: Record<string, unknown> = {};\n\n  if (messageTemplate && messageParameters) {\n    const templateAttrs = createConsoleTemplateAttributes(messageTemplate, messageParameters);\n\n    for (const [key, value] of Object.entries(templateAttrs)) {\n      messageParamAttributes[key] = key.startsWith('sentry.message.parameter.')\n        ? normalize(value, normalizeDepth, normalizeMaxBreadth)\n        : value;\n    }\n  } else if (messageParameters && messageParameters.length > 0) {\n    messageParameters.forEach((arg, index) => {\n      messageParamAttributes[`sentry.message.parameter.${index}`] = normalize(arg, normalizeDepth, normalizeMaxBreadth);\n    });\n  }\n\n  return {\n    message: message,\n    attributes: {\n      ...normalize(attributes, normalizeDepth, normalizeMaxBreadth),\n      ...messageParamAttributes,\n    },\n  };\n}\n", "/**\n * OpenAI Integration Telemetry Attributes\n * Based on OpenTelemetry Semantic Conventions for Generative AI\n * @see https://opentelemetry.io/docs/specs/semconv/gen-ai/\n */\n\n// =============================================================================\n// OPENTELEMETRY SEMANTIC CONVENTIONS FOR GENAI\n// =============================================================================\n\n/**\n * The input messages sent to the model\n */\nexport const GEN_AI_PROMPT_ATTRIBUTE = 'gen_ai.prompt';\n\n/**\n * The Generative AI system being used\n * For OpenAI, this should always be \"openai\"\n */\nexport const GEN_AI_SYSTEM_ATTRIBUTE = 'gen_ai.system';\n\n/**\n * The name of the model as requested\n * Examples: \"gpt-4\", \"gpt-3.5-turbo\"\n */\nexport const GEN_AI_REQUEST_MODEL_ATTRIBUTE = 'gen_ai.request.model';\n\n/**\n * Whether streaming was enabled for the request\n */\nexport const GEN_AI_REQUEST_STREAM_ATTRIBUTE = 'gen_ai.request.stream';\n\n/**\n * The temperature setting for the model request\n */\nexport const GEN_AI_REQUEST_TEMPERATURE_ATTRIBUTE = 'gen_ai.request.temperature';\n\n/**\n * The maximum number of tokens requested\n */\nexport const GEN_AI_REQUEST_MAX_TOKENS_ATTRIBUTE = 'gen_ai.request.max_tokens';\n\n/**\n * The frequency penalty setting for the model request\n */\nexport const GEN_AI_REQUEST_FREQUENCY_PENALTY_ATTRIBUTE = 'gen_ai.request.frequency_penalty';\n\n/**\n * The presence penalty setting for the model request\n */\nexport const GEN_AI_REQUEST_PRESENCE_PENALTY_ATTRIBUTE = 'gen_ai.request.presence_penalty';\n\n/**\n * The top_p (nucleus sampling) setting for the model request\n */\nexport const GEN_AI_REQUEST_TOP_P_ATTRIBUTE = 'gen_ai.request.top_p';\n\n/**\n * The top_k setting for the model request\n */\nexport const GEN_AI_REQUEST_TOP_K_ATTRIBUTE = 'gen_ai.request.top_k';\n\n/**\n * Stop sequences for the model request\n */\nexport const GEN_AI_REQUEST_STOP_SEQUENCES_ATTRIBUTE = 'gen_ai.request.stop_sequences';\n\n/**\n * The encoding format for the model request\n */\nexport const GEN_AI_REQUEST_ENCODING_FORMAT_ATTRIBUTE = 'gen_ai.request.encoding_format';\n\n/**\n * The dimensions for the model request\n */\nexport const GEN_AI_REQUEST_DIMENSIONS_ATTRIBUTE = 'gen_ai.request.dimensions';\n\n/**\n * Array of reasons why the model stopped generating tokens\n */\nexport const GEN_AI_RESPONSE_FINISH_REASONS_ATTRIBUTE = 'gen_ai.response.finish_reasons';\n\n/**\n * The name of the model that generated the response\n */\nexport const GEN_AI_RESPONSE_MODEL_ATTRIBUTE = 'gen_ai.response.model';\n\n/**\n * The unique identifier for the response\n */\nexport const GEN_AI_RESPONSE_ID_ATTRIBUTE = 'gen_ai.response.id';\n\n/**\n * The reason why the model stopped generating tokens\n */\nexport const GEN_AI_RESPONSE_STOP_REASON_ATTRIBUTE = 'gen_ai.response.stop_reason';\n\n/**\n * The number of tokens used in the prompt\n */\nexport const GEN_AI_USAGE_INPUT_TOKENS_ATTRIBUTE = 'gen_ai.usage.input_tokens';\n\n/**\n * The number of tokens used in the response\n */\nexport const GEN_AI_USAGE_OUTPUT_TOKENS_ATTRIBUTE = 'gen_ai.usage.output_tokens';\n\n/**\n * The total number of tokens used (input + output)\n */\nexport const GEN_AI_USAGE_TOTAL_TOKENS_ATTRIBUTE = 'gen_ai.usage.total_tokens';\n\n/**\n * The operation name\n */\nexport const GEN_AI_OPERATION_NAME_ATTRIBUTE = 'gen_ai.operation.name';\n\n/**\n * Original length of messages array, used to indicate truncations had occured\n */\nexport const GEN_AI_INPUT_MESSAGES_ORIGINAL_LENGTH_ATTRIBUTE = 'sentry.sdk_meta.gen_ai.input.messages.original_length';\n\n/**\n * The prompt messages\n * Only recorded when recordInputs is enabled\n */\nexport const GEN_AI_INPUT_MESSAGES_ATTRIBUTE = 'gen_ai.input.messages';\n\n/**\n * The model's response messages including text and tool calls\n * Only recorded when recordOutputs is enabled\n * Format: stringified array of message objects with role, parts, and finish_reason\n * @see https://opentelemetry.io/docs/specs/semconv/registry/attributes/gen-ai/#gen-ai-output-messages\n */\nexport const GEN_AI_OUTPUT_MESSAGES_ATTRIBUTE = 'gen_ai.output.messages';\n\n/**\n * The system instructions extracted from system messages\n * Only recorded when recordInputs is enabled\n * According to OpenTelemetry spec: https://opentelemetry.io/docs/specs/semconv/registry/attributes/gen-ai/#gen-ai-system-instructions\n */\nexport const GEN_AI_SYSTEM_INSTRUCTIONS_ATTRIBUTE = 'gen_ai.system_instructions';\n\n/**\n * The response text\n * Only recorded when recordOutputs is enabled\n */\nexport const GEN_AI_RESPONSE_TEXT_ATTRIBUTE = 'gen_ai.response.text';\n\n/**\n * The available tools from incoming request\n * Only recorded when recordInputs is enabled\n */\nexport const GEN_AI_REQUEST_AVAILABLE_TOOLS_ATTRIBUTE = 'gen_ai.request.available_tools';\n\n/**\n * Whether the response is a streaming response\n */\nexport const GEN_AI_RESPONSE_STREAMING_ATTRIBUTE = 'gen_ai.response.streaming';\n\n/**\n * The tool calls from the response\n * Only recorded when recordOutputs is enabled\n */\nexport const GEN_AI_RESPONSE_TOOL_CALLS_ATTRIBUTE = 'gen_ai.response.tool_calls';\n\n/**\n * The agent name\n */\nexport const GEN_AI_AGENT_NAME_ATTRIBUTE = 'gen_ai.agent.name';\n\n/**\n * The pipeline name\n */\nexport const GEN_AI_PIPELINE_NAME_ATTRIBUTE = 'gen_ai.pipeline.name';\n\n/**\n * The conversation ID for linking messages across API calls\n * For OpenAI Assistants API: thread_id\n * For LangGraph: configurable.thread_id\n */\nexport const GEN_AI_CONVERSATION_ID_ATTRIBUTE = 'gen_ai.conversation.id';\n\n/**\n * The number of cache creation input tokens used\n */\nexport const GEN_AI_USAGE_CACHE_CREATION_INPUT_TOKENS_ATTRIBUTE = 'gen_ai.usage.cache_creation_input_tokens';\n\n/**\n * The number of cache read input tokens used\n */\nexport const GEN_AI_USAGE_CACHE_READ_INPUT_TOKENS_ATTRIBUTE = 'gen_ai.usage.cache_read_input_tokens';\n\n/**\n * The number of cache write input tokens used\n */\nexport const GEN_AI_USAGE_INPUT_TOKENS_CACHE_WRITE_ATTRIBUTE = 'gen_ai.usage.input_tokens.cache_write';\n\n/**\n * The number of cached input tokens that were used\n */\nexport const GEN_AI_USAGE_INPUT_TOKENS_CACHED_ATTRIBUTE = 'gen_ai.usage.input_tokens.cached';\n\n/**\n * The span operation name for invoking an agent\n */\nexport const GEN_AI_INVOKE_AGENT_OPERATION_ATTRIBUTE = 'gen_ai.invoke_agent';\n\n/**\n * The span operation name for generating content\n */\nexport const GEN_AI_GENERATE_CONTENT_OPERATION_ATTRIBUTE = 'gen_ai.generate_content';\n\n/**\n * The embeddings input\n * Only recorded when recordInputs is enabled\n */\nexport const GEN_AI_EMBEDDINGS_INPUT_ATTRIBUTE = 'gen_ai.embeddings.input';\n\n/**\n * The span operation for embeddings\n */\nexport const GEN_AI_EMBEDDINGS_OPERATION_ATTRIBUTE = 'gen_ai.embeddings';\n\n/**\n * The span operation name for reranking\n */\nexport const GEN_AI_RERANK_DO_RERANK_OPERATION_ATTRIBUTE = 'gen_ai.rerank';\n\n/**\n * The span operation name for executing a tool\n */\nexport const GEN_AI_EXECUTE_TOOL_OPERATION_ATTRIBUTE = 'gen_ai.execute_tool';\n\n/**\n * The tool name for tool call spans\n */\nexport const GEN_AI_TOOL_NAME_ATTRIBUTE = 'gen_ai.tool.name';\n\n/**\n * The tool call ID\n */\nexport const GEN_AI_TOOL_CALL_ID_ATTRIBUTE = 'gen_ai.tool.call.id';\n\n/**\n * The tool type (e.g., 'function')\n */\nexport const GEN_AI_TOOL_TYPE_ATTRIBUTE = 'gen_ai.tool.type';\n\n/**\n * The tool input/arguments\n */\nexport const GEN_AI_TOOL_INPUT_ATTRIBUTE = 'gen_ai.tool.input';\n\n/**\n * The tool output/result\n */\nexport const GEN_AI_TOOL_OUTPUT_ATTRIBUTE = 'gen_ai.tool.output';\n\n/**\n * The description of the tool being used\n * @see https://opentelemetry.io/docs/specs/semconv/registry/attributes/gen-ai/#gen-ai-tool-description\n */\nexport const GEN_AI_TOOL_DESCRIPTION_ATTRIBUTE = 'gen_ai.tool.description';\n", "/**\n * Inline media content source, with a potentially very large base64\n * blob or data: uri.\n */\nexport type ContentMedia = Record<string, unknown> &\n  (\n    | {\n        media_type: string;\n        data: string;\n      }\n    | {\n        image_url: `data:${string}`;\n      }\n    | {\n        image_url: { url: `data:${string}` };\n      }\n    | {\n        type: 'blob' | 'base64';\n        content: string;\n      }\n    | {\n        b64_json: string;\n      }\n    | {\n        uri: `data:${string}`;\n      }\n    | {\n        type: 'input_audio';\n        input_audio: { data: string };\n      }\n    | {\n        type: 'file';\n        file: { file_data?: string };\n      }\n  );\n\n/**\n * Check if a content part is an OpenAI/Anthropic media source\n */\nexport function isContentMedia(part: unknown): part is ContentMedia {\n  if (!part || typeof part !== 'object') return false;\n\n  return (\n    isContentMediaSource(part) ||\n    hasInlineData(part) ||\n    hasImageUrl(part) ||\n    hasInputAudio(part) ||\n    hasFileData(part) ||\n    hasMediaTypeData(part) ||\n    hasVercelFileData(part) ||\n    hasVercelImageData(part) ||\n    hasBlobOrBase64Type(part) ||\n    hasB64Json(part) ||\n    hasImageGenerationResult(part) ||\n    hasDataUri(part)\n  );\n}\n\nfunction hasImageUrl(part: NonNullable<unknown>): boolean {\n  if (!('image_url' in part)) return false;\n  if (typeof part.image_url === 'string') return part.image_url.startsWith('data:');\n  return hasNestedImageUrl(part);\n}\n\nfunction hasNestedImageUrl(part: NonNullable<unknown>): part is { image_url: { url: string } } {\n  return (\n    'image_url' in part &&\n    !!part.image_url &&\n    typeof part.image_url === 'object' &&\n    'url' in part.image_url &&\n    typeof part.image_url.url === 'string' &&\n    part.image_url.url.startsWith('data:')\n  );\n}\n\nfunction isContentMediaSource(part: NonNullable<unknown>): boolean {\n  return 'type' in part && typeof part.type === 'string' && 'source' in part && isContentMedia(part.source);\n}\n\nfunction hasInlineData(part: NonNullable<unknown>): part is { inlineData: { data?: string } } {\n  return (\n    'inlineData' in part &&\n    !!part.inlineData &&\n    typeof part.inlineData === 'object' &&\n    'data' in part.inlineData &&\n    typeof part.inlineData.data === 'string'\n  );\n}\n\nfunction hasInputAudio(part: NonNullable<unknown>): part is { type: 'input_audio'; input_audio: { data: string } } {\n  return (\n    'type' in part &&\n    part.type === 'input_audio' &&\n    'input_audio' in part &&\n    !!part.input_audio &&\n    typeof part.input_audio === 'object' &&\n    'data' in part.input_audio &&\n    typeof part.input_audio.data === 'string'\n  );\n}\n\nfunction hasFileData(part: NonNullable<unknown>): part is { type: 'file'; file: { file_data: string } } {\n  return (\n    'type' in part &&\n    part.type === 'file' &&\n    'file' in part &&\n    !!part.file &&\n    typeof part.file === 'object' &&\n    'file_data' in part.file &&\n    typeof part.file.file_data === 'string'\n  );\n}\n\nfunction hasMediaTypeData(part: NonNullable<unknown>): part is { media_type: string; data: string } {\n  return 'media_type' in part && typeof part.media_type === 'string' && 'data' in part;\n}\n\n/**\n * Check for Vercel AI SDK file format: { type: \"file\", mediaType: \"...\", data: \"...\" }\n * Only matches base64/binary data, not HTTP/HTTPS URLs (which should be preserved).\n */\nfunction hasVercelFileData(part: NonNullable<unknown>): part is { type: 'file'; mediaType: string; data: string } {\n  return (\n    'type' in part &&\n    part.type === 'file' &&\n    'mediaType' in part &&\n    typeof part.mediaType === 'string' &&\n    'data' in part &&\n    typeof part.data === 'string' &&\n    // Only strip base64/binary data, not HTTP/HTTPS URLs which should be preserved as references\n    !part.data.startsWith('http://') &&\n    !part.data.startsWith('https://')\n  );\n}\n\n/**\n * Check for Vercel AI SDK image format: { type: \"image\", image: \"base64...\", mimeType?: \"...\" }\n * Only matches base64/data URIs, not HTTP/HTTPS URLs (which should be preserved).\n * Note: mimeType is optional in Vercel AI SDK image parts.\n */\nfunction hasVercelImageData(part: NonNullable<unknown>): part is { type: 'image'; image: string; mimeType?: string } {\n  return (\n    'type' in part &&\n    part.type === 'image' &&\n    'image' in part &&\n    typeof part.image === 'string' &&\n    // Only strip base64/data URIs, not HTTP/HTTPS URLs which should be preserved as references\n    !part.image.startsWith('http://') &&\n    !part.image.startsWith('https://')\n  );\n}\n\nfunction hasBlobOrBase64Type(part: NonNullable<unknown>): part is { type: 'blob' | 'base64'; content: string } {\n  return 'type' in part && (part.type === 'blob' || part.type === 'base64');\n}\n\nfunction hasB64Json(part: NonNullable<unknown>): part is { b64_json: string } {\n  return 'b64_json' in part;\n}\n\nfunction hasImageGenerationResult(part: NonNullable<unknown>): part is { type: 'image_generation'; result: string } {\n  return 'type' in part && 'result' in part && part.type === 'image_generation';\n}\n\nfunction hasDataUri(part: NonNullable<unknown>): part is { uri: string } {\n  return 'uri' in part && typeof part.uri === 'string' && part.uri.startsWith('data:');\n}\n\nconst REMOVED_STRING = '[Blob substitute]';\n\nconst MEDIA_FIELDS = ['image_url', 'data', 'content', 'b64_json', 'result', 'uri', 'image'] as const;\n\n/**\n * Replace inline binary data in a single media content part with a placeholder.\n */\nexport function stripInlineMediaFromSingleMessage(part: ContentMedia): ContentMedia {\n  const strip = { ...part };\n  if (isContentMedia(strip.source)) {\n    strip.source = stripInlineMediaFromSingleMessage(strip.source);\n  }\n  if (hasInlineData(part)) {\n    strip.inlineData = { ...part.inlineData, data: REMOVED_STRING };\n  }\n  if (hasNestedImageUrl(part)) {\n    strip.image_url = { ...part.image_url, url: REMOVED_STRING };\n  }\n  if (hasInputAudio(part)) {\n    strip.input_audio = { ...part.input_audio, data: REMOVED_STRING };\n  }\n  if (hasFileData(part)) {\n    strip.file = { ...part.file, file_data: REMOVED_STRING };\n  }\n  for (const field of MEDIA_FIELDS) {\n    if (typeof strip[field] === 'string') strip[field] = REMOVED_STRING;\n  }\n  return strip;\n}\n", "import { isContentMedia, stripInlineMediaFromSingleMessage } from './mediaStripping';\n\n/**\n * Default maximum size in bytes for GenAI messages.\n * Messages exceeding this limit will be truncated.\n */\nexport const DEFAULT_GEN_AI_MESSAGES_BYTE_LIMIT = 20000;\n\n/**\n * Message format used by OpenAI and Anthropic APIs.\n */\ntype ContentMessage = {\n  [key: string]: unknown;\n  content: string;\n};\n\n/**\n * One block inside OpenAI / Anthropic `content: [...]` arrays (text, image_url, etc.).\n */\ntype ContentArrayBlock = {\n  [key: string]: unknown;\n  type: string;\n};\n\n/**\n * Message format used by OpenAI and Anthropic APIs for media.\n */\ntype ContentArrayMessage = {\n  [key: string]: unknown;\n  content: ContentArrayBlock[];\n};\n\n/**\n * Message format used by Google GenAI API.\n * Parts can be strings or objects with a text property.\n */\ntype PartsMessage = {\n  [key: string]: unknown;\n  parts: Array<TextPart | MediaPart>;\n};\n\n/**\n * A part in a Google GenAI message that contains text.\n */\ntype TextPart = string | { text: string };\n\n/**\n * A part in a Google GenAI that contains media.\n */\ntype MediaPart = {\n  type: string;\n  content: string;\n};\n\n/**\n * One element of an array-based message: OpenAI/Anthropic `content[]` or Google `parts`.\n */\ntype ArrayMessageItem = TextPart | MediaPart | ContentArrayBlock;\n\n/**\n * Calculate the UTF-8 byte length of a string.\n */\nconst utf8Bytes = (text: string): number => {\n  return new TextEncoder().encode(text).length;\n};\n\n/**\n * Calculate the UTF-8 byte length of a value's JSON representation.\n */\nconst jsonBytes = (value: unknown): number => {\n  return utf8Bytes(JSON.stringify(value));\n};\n\n/**\n * Truncate a string to fit within maxBytes (inclusive) when encoded as UTF-8.\n * Uses binary search for efficiency with multi-byte characters.\n *\n * @param text - The string to truncate\n * @param maxBytes - Maximum byte length (inclusive, UTF-8 encoded)\n * @returns Truncated string whose UTF-8 byte length is at most maxBytes\n */\nfunction truncateTextByBytes(text: string, maxBytes: number): string {\n  if (utf8Bytes(text) <= maxBytes) {\n    return text;\n  }\n\n  let low = 0;\n  let high = text.length;\n  let bestFit = '';\n\n  while (low <= high) {\n    const mid = Math.floor((low + high) / 2);\n    const candidate = text.slice(0, mid);\n    const byteSize = utf8Bytes(candidate);\n\n    if (byteSize <= maxBytes) {\n      bestFit = candidate;\n      low = mid + 1;\n    } else {\n      high = mid - 1;\n    }\n  }\n\n  return bestFit;\n}\n\n/**\n * Extract text content from a message item.\n * Handles plain strings and objects with a text property.\n *\n * @returns The text content\n */\nfunction getItemText(item: ArrayMessageItem): string {\n  if (typeof item === 'string') {\n    return item;\n  }\n  if ('text' in item && typeof item.text === 'string') {\n    return item.text;\n  }\n  return '';\n}\n\n/**\n * Create a new item with updated text content while preserving the original structure.\n *\n * @param item - Original item (string or object)\n * @param text - New text content\n * @returns New item with updated text\n */\nfunction withItemText(item: ArrayMessageItem, text: string): ArrayMessageItem {\n  if (typeof item === 'string') {\n    return text;\n  }\n  return { ...item, text };\n}\n\n/**\n * Check if a message has the OpenAI/Anthropic content format.\n */\nfunction isContentMessage(message: unknown): message is ContentMessage {\n  return (\n    message !== null &&\n    typeof message === 'object' &&\n    'content' in message &&\n    typeof (message as ContentMessage).content === 'string'\n  );\n}\n\n/**\n * Check if a message has the OpenAI/Anthropic content array format.\n */\nfunction isContentArrayMessage(message: unknown): message is ContentArrayMessage {\n  return message !== null && typeof message === 'object' && 'content' in message && Array.isArray(message.content);\n}\n\n/**\n * Check if a message has the Google GenAI parts format.\n */\nfunction isPartsMessage(message: unknown): message is PartsMessage {\n  return (\n    message !== null &&\n    typeof message === 'object' &&\n    'parts' in message &&\n    Array.isArray((message as PartsMessage).parts) &&\n    (message as PartsMessage).parts.length > 0\n  );\n}\n\n/**\n * Truncate a message with `content: string` format (OpenAI/Anthropic).\n *\n * @param message - Message with content property\n * @param maxBytes - Maximum byte limit\n * @returns Array with truncated message, or empty array if it doesn't fit\n */\nfunction truncateContentMessage(message: ContentMessage, maxBytes: number): unknown[] {\n  // Calculate overhead (message structure without content)\n  const emptyMessage = { ...message, content: '' };\n  const overhead = jsonBytes(emptyMessage);\n  const availableForContent = maxBytes - overhead;\n\n  if (availableForContent <= 0) {\n    return [];\n  }\n\n  const truncatedContent = truncateTextByBytes(message.content, availableForContent);\n  return [{ ...message, content: truncatedContent }];\n}\n\n/**\n * Extracts the array items and their key from an array-based message.\n * Returns `null` key if neither `parts` nor `content` is a valid array.\n */\nfunction getArrayItems(message: PartsMessage | ContentArrayMessage): {\n  key: 'parts' | 'content' | null;\n  items: ArrayMessageItem[];\n} {\n  if ('parts' in message && Array.isArray(message.parts)) {\n    return { key: 'parts', items: message.parts };\n  }\n  if ('content' in message && Array.isArray(message.content)) {\n    return { key: 'content', items: message.content };\n  }\n  return { key: null, items: [] };\n}\n\n/**\n * Truncate a message with an array-based format.\n * Handles both `parts: [...]` (Google GenAI) and `content: [...]` (OpenAI/Anthropic multimodal).\n * Keeps as many complete items as possible, only truncating the first item if needed.\n *\n * @param message - Message with parts or content array\n * @param maxBytes - Maximum byte limit\n * @returns Array with truncated message, or empty array if it doesn't fit\n */\nfunction truncateArrayMessage(message: PartsMessage | ContentArrayMessage, maxBytes: number): unknown[] {\n  const { key, items } = getArrayItems(message);\n\n  if (key === null || items.length === 0) {\n    return [];\n  }\n\n  // Calculate overhead by creating empty text items\n  const emptyItems = items.map(item => withItemText(item, ''));\n  const overhead = jsonBytes({ ...message, [key]: emptyItems });\n  let remainingBytes = maxBytes - overhead;\n\n  if (remainingBytes <= 0) {\n    return [];\n  }\n\n  // Include items until we run out of space\n  const includedItems: ArrayMessageItem[] = [];\n\n  for (const item of items) {\n    const text = getItemText(item);\n    const textSize = utf8Bytes(text);\n\n    if (textSize <= remainingBytes) {\n      // Item fits: include it as-is\n      includedItems.push(item);\n      remainingBytes -= textSize;\n    } else if (includedItems.length === 0) {\n      // First item doesn't fit: truncate it\n      const truncated = truncateTextByBytes(text, remainingBytes);\n      if (truncated) {\n        includedItems.push(withItemText(item, truncated));\n      }\n      break;\n    } else {\n      // Subsequent item doesn't fit: stop here\n      break;\n    }\n  }\n\n  /* c8 ignore start\n   * for type safety only, algorithm guarantees SOME text included */\n  if (includedItems.length <= 0) {\n    return [];\n  } else {\n    /* c8 ignore stop */\n    return [{ ...message, [key]: includedItems }];\n  }\n}\n\n/**\n * Truncate a single message to fit within maxBytes.\n *\n * Supports three message formats:\n * - OpenAI/Anthropic: `{ ..., content: string }`\n * - Vercel AI/OpenAI multimodal: `{ ..., content: Array<{type, text?, ...}> }`\n * - Google GenAI: `{ ..., parts: Array<string | {text: string} | non-text> }`\n *\n * @param message - The message to truncate\n * @param maxBytes - Maximum byte limit for the message\n * @returns Array containing the truncated message, or empty array if truncation fails\n */\nfunction truncateSingleMessage(message: unknown, maxBytes: number): unknown[] {\n  if (!message) return [];\n\n  // Handle plain strings (e.g., embeddings input)\n  if (typeof message === 'string') {\n    const truncated = truncateTextByBytes(message, maxBytes);\n    return truncated ? [truncated] : [];\n  }\n\n  if (typeof message !== 'object') {\n    return [];\n  }\n\n  if (isContentMessage(message)) {\n    return truncateContentMessage(message, maxBytes);\n  }\n\n  if (isContentArrayMessage(message) || isPartsMessage(message)) {\n    return truncateArrayMessage(message, maxBytes);\n  }\n\n  // Unknown message format: cannot truncate safely\n  return [];\n}\n\n/**\n * Strip the inline media from message arrays.\n *\n * This returns a stripped message. We do NOT want to mutate the data in place,\n * because of course we still want the actual API/client to handle the media.\n */\nfunction stripInlineMediaFromMessages(messages: unknown[]): unknown[] {\n  const stripped = messages.map(message => {\n    let newMessage: Record<string, unknown> | undefined = undefined;\n    if (!!message && typeof message === 'object') {\n      if (isContentArrayMessage(message)) {\n        newMessage = {\n          ...message,\n          content: stripInlineMediaFromMessages(message.content),\n        };\n      } else if ('content' in message && isContentMedia(message.content)) {\n        newMessage = {\n          ...message,\n          content: stripInlineMediaFromSingleMessage(message.content),\n        };\n      }\n      if (isPartsMessage(message)) {\n        newMessage = {\n          // might have to strip content AND parts\n          ...(newMessage ?? message),\n          parts: stripInlineMediaFromMessages(message.parts),\n        };\n      }\n      if (isContentMedia(newMessage)) {\n        newMessage = stripInlineMediaFromSingleMessage(newMessage);\n      } else if (isContentMedia(message)) {\n        newMessage = stripInlineMediaFromSingleMessage(message);\n      }\n    }\n    return newMessage ?? message;\n  });\n  return stripped;\n}\n\n/**\n * Truncate an array of messages to fit within a byte limit.\n *\n * Strategy:\n * - Always keeps only the last (newest) message\n * - Strips inline media from the message\n * - Truncates the message content if it exceeds the byte limit\n *\n * @param messages - Array of messages to truncate\n * @param maxBytes - Maximum total byte limit for the message\n * @returns Array containing only the last message (possibly truncated)\n *\n * @example\n * ```ts\n * const messages = [msg1, msg2, msg3, msg4]; // newest is msg4\n * const truncated = truncateMessagesByBytes(messages, 10000);\n * // Returns [msg4] (truncated if needed)\n * ```\n */\nfunction truncateMessagesByBytes(messages: unknown[], maxBytes: number): unknown[] {\n  // Early return for empty or invalid input\n  if (!Array.isArray(messages) || messages.length === 0) {\n    return messages;\n  }\n\n  // The result is always a single-element array that callers wrap with\n  // JSON.stringify([message]), so subtract the 2-byte array wrapper (\"[\"  and \"]\")\n  // to ensure the final serialized value stays under the limit.\n  const effectiveMaxBytes = maxBytes - 2;\n\n  // Always keep only the last message\n  const lastMessage = messages[messages.length - 1];\n\n  // Strip inline media from the single message\n  const stripped = stripInlineMediaFromMessages([lastMessage]);\n  const strippedMessage = stripped[0];\n\n  // Check if it fits\n  const messageBytes = jsonBytes(strippedMessage);\n  if (messageBytes <= effectiveMaxBytes) {\n    return stripped;\n  }\n\n  // Truncate the single message if needed\n  return truncateSingleMessage(strippedMessage, effectiveMaxBytes);\n}\n\n/**\n * Truncate GenAI messages using the default byte limit.\n *\n * Convenience wrapper around `truncateMessagesByBytes` with the default limit.\n *\n * @param messages - Array of messages to truncate\n * @returns Truncated array of messages\n */\nexport function truncateGenAiMessages(messages: unknown[]): unknown[] {\n  return truncateMessagesByBytes(messages, DEFAULT_GEN_AI_MESSAGES_BYTE_LIMIT);\n}\n\n/**\n * Truncate GenAI string input using the default byte limit.\n *\n * @param input - The string to truncate\n * @returns Truncated string\n */\nexport function truncateGenAiStringInput(input: string): string {\n  return truncateTextByBytes(input, DEFAULT_GEN_AI_MESSAGES_BYTE_LIMIT);\n}\n", "/**\n * Shared utils for AI integrations (OpenAI, Anthropic, Verce.AI, etc.)\n */\nimport { getClient } from '../../currentScopes';\nimport { hasSpanStreamingEnabled } from '../spans/hasSpanStreamingEnabled';\nimport type { Span } from '../../types/span';\nimport { isThenable } from '../../utils/is';\nimport {\n  GEN_AI_RESPONSE_FINISH_REASONS_ATTRIBUTE,\n  GEN_AI_RESPONSE_ID_ATTRIBUTE,\n  GEN_AI_RESPONSE_MODEL_ATTRIBUTE,\n  GEN_AI_RESPONSE_STREAMING_ATTRIBUTE,\n  GEN_AI_RESPONSE_TEXT_ATTRIBUTE,\n  GEN_AI_RESPONSE_TOOL_CALLS_ATTRIBUTE,\n  GEN_AI_USAGE_INPUT_TOKENS_ATTRIBUTE,\n  GEN_AI_USAGE_OUTPUT_TOKENS_ATTRIBUTE,\n  GEN_AI_USAGE_TOTAL_TOKENS_ATTRIBUTE,\n} from './gen-ai-attributes';\nimport { truncateGenAiMessages, truncateGenAiStringInput } from './messageTruncation';\n\nexport interface AIRecordingOptions {\n  recordInputs?: boolean;\n  recordOutputs?: boolean;\n}\n\n/**\n * A method registry entry describes a single instrumented method:\n * which gen_ai operation it maps to and whether it is intrinsically streaming.\n */\nexport interface InstrumentedMethodEntry {\n  /** Operation name (e.g. 'chat', 'embeddings', 'generate_content'). Omit for factory methods that only need result proxying. */\n  operation?: string;\n  /** True if the method itself is always streaming (not param-based) */\n  streaming?: boolean;\n  /** When set, the method's return value is re-proxied with this as the base path */\n  proxyResultPath?: string;\n}\n\n/**\n * Maps method paths to their registry entries.\n * Used by proxy-based AI client instrumentations to determine which methods\n * to instrument, what operation name to use, and whether they stream.\n */\nexport type InstrumentedMethodRegistry = Record<string, InstrumentedMethodEntry>;\n\n/**\n * Resolves AI recording options by falling back to the client's `dataCollection.genAI` settings.\n * Precedence: explicit option > dataCollection.genAI > sendDefaultPii > false\n */\nexport function resolveAIRecordingOptions<T extends AIRecordingOptions>(options?: T): T & Required<AIRecordingOptions> {\n  const genAI = getClient()?.getDataCollectionOptions().genAI;\n  return {\n    ...options,\n    recordInputs: options?.recordInputs ?? genAI?.inputs ?? false,\n    recordOutputs: options?.recordOutputs ?? genAI?.outputs ?? false,\n  } as T & Required<AIRecordingOptions>;\n}\n\n/**\n * Resolves whether truncation should be enabled.\n * If the user explicitly set `enableTruncation`, that value is used.\n * Otherwise, truncation is disabled whenever gen_ai spans are sent through the span streaming / v2\n * span path, i.e. full span streaming (`traceLifecycle: 'stream'`) or `streamGenAiSpans`. That path\n * is not subject to the transaction payload-size limits that truncation works around, so the full\n * message data can be retained. `streamGenAiSpans` is opt-out (on unless explicitly set to `false`).\n */\nexport function shouldEnableTruncation(enableTruncation: boolean | undefined): boolean {\n  if (enableTruncation !== undefined) {\n    return enableTruncation;\n  }\n\n  const client = getClient();\n  if (!client) {\n    return true;\n  }\n\n  return !hasSpanStreamingEnabled(client) && client.getOptions().streamGenAiSpans === false;\n}\n\n/**\n * Build method path from current traversal\n */\nexport function buildMethodPath(currentPath: string, prop: string): string {\n  return currentPath ? `${currentPath}.${prop}` : prop;\n}\n\n/**\n * Set token usage attributes\n * @param span - The span to add attributes to\n * @param promptTokens - The number of prompt tokens\n * @param completionTokens - The number of completion tokens\n * @param cachedInputTokens - The number of cached input tokens\n * @param cachedOutputTokens - The number of cached output tokens\n */\nexport function setTokenUsageAttributes(\n  span: Span,\n  promptTokens?: number,\n  completionTokens?: number,\n  cachedInputTokens?: number,\n  cachedOutputTokens?: number,\n): void {\n  if (promptTokens !== undefined) {\n    span.setAttributes({\n      [GEN_AI_USAGE_INPUT_TOKENS_ATTRIBUTE]: promptTokens,\n    });\n  }\n  if (completionTokens !== undefined) {\n    span.setAttributes({\n      [GEN_AI_USAGE_OUTPUT_TOKENS_ATTRIBUTE]: completionTokens,\n    });\n  }\n  if (\n    promptTokens !== undefined ||\n    completionTokens !== undefined ||\n    cachedInputTokens !== undefined ||\n    cachedOutputTokens !== undefined\n  ) {\n    /**\n     * Total input tokens in a request is the summation of `input_tokens`,\n     * `cache_creation_input_tokens`, and `cache_read_input_tokens`.\n     */\n    const totalTokens =\n      (promptTokens ?? 0) + (completionTokens ?? 0) + (cachedInputTokens ?? 0) + (cachedOutputTokens ?? 0);\n\n    span.setAttributes({\n      [GEN_AI_USAGE_TOTAL_TOKENS_ATTRIBUTE]: totalTokens,\n    });\n  }\n}\n\nexport interface StreamResponseState {\n  responseId?: string;\n  responseModel?: string;\n  finishReasons: string[];\n  responseTexts: string[];\n  toolCalls: unknown[];\n  promptTokens?: number;\n  completionTokens?: number;\n  totalTokens?: number;\n  cacheCreationInputTokens?: number;\n  cacheReadInputTokens?: number;\n}\n\n/**\n * Ends a streaming span by setting all accumulated response attributes and ending the span.\n * Shared across OpenAI, Anthropic, and Google GenAI streaming implementations.\n */\nexport function endStreamSpan(span: Span, state: StreamResponseState, recordOutputs: boolean): void {\n  if (!span.isRecording()) {\n    return;\n  }\n\n  const attrs: Record<string, string | number | boolean> = {\n    [GEN_AI_RESPONSE_STREAMING_ATTRIBUTE]: true,\n  };\n\n  if (state.responseId) attrs[GEN_AI_RESPONSE_ID_ATTRIBUTE] = state.responseId;\n  if (state.responseModel) attrs[GEN_AI_RESPONSE_MODEL_ATTRIBUTE] = state.responseModel;\n\n  if (state.promptTokens !== undefined) attrs[GEN_AI_USAGE_INPUT_TOKENS_ATTRIBUTE] = state.promptTokens;\n  if (state.completionTokens !== undefined) attrs[GEN_AI_USAGE_OUTPUT_TOKENS_ATTRIBUTE] = state.completionTokens;\n\n  // Use explicit total if provided (OpenAI, Google), otherwise compute from cache tokens (Anthropic)\n  if (state.totalTokens !== undefined) {\n    attrs[GEN_AI_USAGE_TOTAL_TOKENS_ATTRIBUTE] = state.totalTokens;\n  } else if (\n    state.promptTokens !== undefined ||\n    state.completionTokens !== undefined ||\n    state.cacheCreationInputTokens !== undefined ||\n    state.cacheReadInputTokens !== undefined\n  ) {\n    attrs[GEN_AI_USAGE_TOTAL_TOKENS_ATTRIBUTE] =\n      (state.promptTokens ?? 0) +\n      (state.completionTokens ?? 0) +\n      (state.cacheCreationInputTokens ?? 0) +\n      (state.cacheReadInputTokens ?? 0);\n  }\n\n  if (state.finishReasons.length) {\n    attrs[GEN_AI_RESPONSE_FINISH_REASONS_ATTRIBUTE] = JSON.stringify(state.finishReasons);\n  }\n  if (recordOutputs && state.responseTexts.length) {\n    attrs[GEN_AI_RESPONSE_TEXT_ATTRIBUTE] = state.responseTexts.join('');\n  }\n  if (recordOutputs && state.toolCalls.length) {\n    attrs[GEN_AI_RESPONSE_TOOL_CALLS_ATTRIBUTE] = JSON.stringify(state.toolCalls);\n  }\n\n  span.setAttributes(attrs);\n  span.end();\n}\n\n/**\n * Get the truncated JSON string for a string, an array of messages, or an object.\n *\n * @param value - The value to truncate and serialize\n * @returns The truncated JSON string\n */\nexport function getTruncatedJsonString<T>(value: T | T[]): string {\n  if (typeof value === 'string') {\n    // Some values are already JSON strings, so we don't need to duplicate the JSON parsing\n    return truncateGenAiStringInput(value);\n  }\n  // Both truncation (media stripping recurses the value) and `JSON.stringify` can throw on\n  // circular refs or non-serializable values (e.g. BigInt); never let that crash instrumentation.\n  try {\n    return JSON.stringify(Array.isArray(value) ? truncateGenAiMessages(value) : value);\n  } catch {\n    return '[unserializable]';\n  }\n}\n\n/**\n * Extract system instructions from messages array.\n * Finds the first system message and formats it according to OpenTelemetry semantic conventions.\n *\n * @param messages - Array of messages to extract system instructions from\n * @returns systemInstructions (JSON string) and filteredMessages (without system message)\n */\nexport function extractSystemInstructions(messages: unknown[] | unknown): {\n  systemInstructions: string | undefined;\n  filteredMessages: unknown[] | unknown;\n} {\n  if (!Array.isArray(messages)) {\n    return { systemInstructions: undefined, filteredMessages: messages };\n  }\n\n  const systemMessageIndex = messages.findIndex(\n    msg => msg && typeof msg === 'object' && 'role' in msg && (msg as { role: string }).role === 'system',\n  );\n\n  if (systemMessageIndex === -1) {\n    return { systemInstructions: undefined, filteredMessages: messages };\n  }\n\n  const systemMessage = messages[systemMessageIndex] as { role: string; content?: string | unknown };\n  const systemContent =\n    typeof systemMessage.content === 'string'\n      ? systemMessage.content\n      : systemMessage.content !== undefined\n        ? JSON.stringify(systemMessage.content)\n        : undefined;\n\n  if (!systemContent) {\n    return { systemInstructions: undefined, filteredMessages: messages };\n  }\n\n  const systemInstructions = JSON.stringify([{ type: 'text', content: systemContent }]);\n  const filteredMessages = [...messages.slice(0, systemMessageIndex), ...messages.slice(systemMessageIndex + 1)];\n\n  return { systemInstructions, filteredMessages };\n}\n\n/**\n * Creates a wrapped version of .withResponse() that replaces the data field\n * with the instrumented result while preserving metadata (response, request_id).\n */\nasync function createWithResponseWrapper<T>(\n  originalWithResponse: Promise<unknown>,\n  instrumentedPromise: Promise<T>,\n): Promise<unknown> {\n  // Awaited together rather than in sequence so both promises get a handler attached synchronously.\n  // Awaiting them one after the other leaves the second unobserved when the first rejects, which\n  // surfaces as an unhandled rejection.\n  const [instrumentedResult, originalWrapper] = await Promise.all([instrumentedPromise, originalWithResponse]);\n\n  // Combine instrumented result with original metadata\n  if (originalWrapper && typeof originalWrapper === 'object' && 'data' in originalWrapper) {\n    return {\n      ...originalWrapper,\n      data: instrumentedResult,\n    };\n  }\n  return instrumentedResult;\n}\n\n/**\n * Wraps a promise-like object to preserve additional methods (like .withResponse())\n * that AI SDK clients (OpenAI, Anthropic) attach to their APIPromise return values.\n *\n * Standard Promise methods (.then, .catch, .finally) are routed to the instrumented\n * promise to preserve Sentry's span instrumentation, while custom SDK methods are\n * forwarded to the original promise to maintain the SDK's API surface.\n */\nexport function wrapPromiseWithMethods<R>(\n  originalPromiseLike: Promise<R>,\n  instrumentedPromise: Promise<R>,\n): Promise<R> {\n  // If the original result is not thenable, return the instrumented promise\n  if (!isThenable(originalPromiseLike)) {\n    return instrumentedPromise;\n  }\n\n  // Create a proxy that forwards Promise methods to instrumentedPromise\n  // and preserves additional methods from the original result\n  return new Proxy(originalPromiseLike, {\n    get(target: object, prop: string | symbol): unknown {\n      // For standard Promise methods (.then, .catch, .finally, Symbol.toStringTag),\n      // use instrumentedPromise to preserve Sentry instrumentation.\n      // For custom methods (like .withResponse()), use the original target.\n      const useInstrumentedPromise = prop in Promise.prototype || prop === Symbol.toStringTag;\n      const source = useInstrumentedPromise ? instrumentedPromise : target;\n\n      const value = Reflect.get(source, prop) as unknown;\n\n      // Special handling for .withResponse() to preserve instrumentation\n      // .withResponse() returns { data: T, response: Response, request_id: string }\n      if (prop === 'withResponse' && typeof value === 'function') {\n        return function wrappedWithResponse(this: unknown): unknown {\n          const originalWithResponse = (value as (...args: unknown[]) => unknown).call(target);\n          return createWithResponseWrapper(originalWithResponse, instrumentedPromise);\n        };\n      }\n\n      return typeof value === 'function' ? value.bind(source) : value;\n    },\n  }) as Promise<R>;\n}\n", "import type { InstrumentedMethodRegistry } from '../ai/utils';\n\nexport const OPENAI_INTEGRATION_NAME = 'OpenAI' as const;\n\n// https://platform.openai.com/docs/quickstart?api-mode=responses\n// https://platform.openai.com/docs/quickstart?api-mode=chat\n// https://platform.openai.com/docs/api-reference/conversations\nexport const OPENAI_METHOD_REGISTRY = {\n  'responses.create': { operation: 'chat' },\n  'chat.completions.create': { operation: 'chat' },\n  'embeddings.create': { operation: 'embeddings' },\n  // Conversations API - for conversation state management\n  // https://platform.openai.com/docs/guides/conversation-state\n  'conversations.create': { operation: 'chat' },\n} as const satisfies InstrumentedMethodRegistry;\nexport const RESPONSES_TOOL_CALL_EVENT_TYPES = [\n  'response.output_item.added',\n  'response.function_call_arguments.delta',\n  'response.function_call_arguments.done',\n  'response.output_item.done',\n] as const;\nexport const RESPONSE_EVENT_TYPES = [\n  'response.created',\n  'response.in_progress',\n  'response.failed',\n  'response.completed',\n  'response.incomplete',\n  'response.queued',\n  'response.output_text.delta',\n  ...RESPONSES_TOOL_CALL_EVENT_TYPES,\n] as const;\n", "import type { Span } from '../../types/span';\nimport type { SpanAttributeValue } from '../../types/span';\nimport {\n  GEN_AI_CONVERSATION_ID_ATTRIBUTE,\n  GEN_AI_REQUEST_DIMENSIONS_ATTRIBUTE,\n  GEN_AI_REQUEST_ENCODING_FORMAT_ATTRIBUTE,\n  GEN_AI_REQUEST_FREQUENCY_PENALTY_ATTRIBUTE,\n  GEN_AI_REQUEST_MODEL_ATTRIBUTE,\n  GEN_AI_REQUEST_PRESENCE_PENALTY_ATTRIBUTE,\n  GEN_AI_REQUEST_STREAM_ATTRIBUTE,\n  GEN_AI_REQUEST_TEMPERATURE_ATTRIBUTE,\n  GEN_AI_REQUEST_TOP_P_ATTRIBUTE,\n  GEN_AI_RESPONSE_FINISH_REASONS_ATTRIBUTE,\n  GEN_AI_RESPONSE_ID_ATTRIBUTE,\n  GEN_AI_RESPONSE_MODEL_ATTRIBUTE,\n  GEN_AI_RESPONSE_TEXT_ATTRIBUTE,\n  GEN_AI_RESPONSE_TOOL_CALLS_ATTRIBUTE,\n  GEN_AI_USAGE_INPUT_TOKENS_ATTRIBUTE,\n  GEN_AI_USAGE_OUTPUT_TOKENS_ATTRIBUTE,\n  GEN_AI_USAGE_TOTAL_TOKENS_ATTRIBUTE,\n} from '../ai/gen-ai-attributes';\nimport type { ChatCompletionChunk, ResponseStreamingEvent } from './types';\n\n/**\n * Check if streaming event is from the Responses API\n */\nexport function isResponsesApiStreamEvent(event: unknown): event is ResponseStreamingEvent {\n  return (\n    event !== null &&\n    typeof event === 'object' &&\n    'type' in event &&\n    typeof (event as Record<string, unknown>).type === 'string' &&\n    ((event as Record<string, unknown>).type as string).startsWith('response.')\n  );\n}\n\n/**\n * Check if streaming event is a chat completion chunk\n */\nexport function isChatCompletionChunk(event: unknown): event is ChatCompletionChunk {\n  return (\n    event !== null &&\n    typeof event === 'object' &&\n    'object' in event &&\n    (event as Record<string, unknown>).object === 'chat.completion.chunk'\n  );\n}\n\n/**\n * Add response attributes to a span using duck-typing.\n * Works for Chat Completions, Responses API, Embeddings, and Conversations API responses.\n */\nexport function addResponseAttributes(span: Span, result: unknown, recordOutputs?: boolean): void {\n  if (!result || typeof result !== 'object') return;\n\n  const response = result as Record<string, unknown>;\n  const attrs: Record<string, SpanAttributeValue> = {};\n\n  // Response ID\n  if (typeof response.id === 'string') {\n    attrs[GEN_AI_RESPONSE_ID_ATTRIBUTE] = response.id;\n  }\n\n  // Response model\n  if (typeof response.model === 'string') {\n    attrs[GEN_AI_RESPONSE_MODEL_ATTRIBUTE] = response.model;\n  }\n\n  // Conversation ID (conversation objects use id as conversation link)\n  if (response.object === 'conversation' && typeof response.id === 'string') {\n    attrs[GEN_AI_CONVERSATION_ID_ATTRIBUTE] = response.id;\n  }\n\n  // Token usage — supports both naming conventions (chat: prompt_tokens/completion_tokens, responses: input_tokens/output_tokens)\n  if (response.usage && typeof response.usage === 'object') {\n    const usage = response.usage as Record<string, unknown>;\n\n    const inputTokens = usage.prompt_tokens ?? usage.input_tokens;\n    if (typeof inputTokens === 'number') {\n      attrs[GEN_AI_USAGE_INPUT_TOKENS_ATTRIBUTE] = inputTokens;\n    }\n\n    const outputTokens = usage.completion_tokens ?? usage.output_tokens;\n    if (typeof outputTokens === 'number') {\n      attrs[GEN_AI_USAGE_OUTPUT_TOKENS_ATTRIBUTE] = outputTokens;\n    }\n\n    if (typeof usage.total_tokens === 'number') {\n      attrs[GEN_AI_USAGE_TOTAL_TOKENS_ATTRIBUTE] = usage.total_tokens;\n    }\n  }\n\n  // Finish reasons from choices (chat completions)\n  if (Array.isArray(response.choices)) {\n    const choices = response.choices as Array<Record<string, unknown>>;\n    const finishReasons = choices\n      .map(choice => choice.finish_reason)\n      .filter((reason): reason is string => typeof reason === 'string');\n    if (finishReasons.length > 0) {\n      attrs[GEN_AI_RESPONSE_FINISH_REASONS_ATTRIBUTE] = JSON.stringify(finishReasons);\n    }\n\n    if (recordOutputs) {\n      // Response text from choices\n      const responseTexts = choices.map(choice => {\n        const message = choice.message as Record<string, unknown> | undefined;\n        return (message?.content as string) || '';\n      });\n      attrs[GEN_AI_RESPONSE_TEXT_ATTRIBUTE] = JSON.stringify(responseTexts);\n\n      // Tool calls from choices\n      const toolCalls = choices\n        .map(choice => {\n          const message = choice.message as Record<string, unknown> | undefined;\n          return message?.tool_calls;\n        })\n        .filter(calls => Array.isArray(calls) && calls.length > 0)\n        .flat();\n\n      if (toolCalls.length > 0) {\n        attrs[GEN_AI_RESPONSE_TOOL_CALLS_ATTRIBUTE] = JSON.stringify(toolCalls);\n      }\n    }\n  }\n\n  // Finish reason from status (responses API)\n  if (typeof response.status === 'string') {\n    // Only set if not already set from choices\n    if (!attrs[GEN_AI_RESPONSE_FINISH_REASONS_ATTRIBUTE]) {\n      attrs[GEN_AI_RESPONSE_FINISH_REASONS_ATTRIBUTE] = JSON.stringify([response.status]);\n    }\n  }\n\n  if (recordOutputs) {\n    // Response text from output_text (responses API)\n    if (typeof response.output_text === 'string' && !attrs[GEN_AI_RESPONSE_TEXT_ATTRIBUTE]) {\n      attrs[GEN_AI_RESPONSE_TEXT_ATTRIBUTE] = response.output_text;\n    }\n\n    // Tool calls from output array (responses API)\n    if (Array.isArray(response.output) && response.output.length > 0 && !attrs[GEN_AI_RESPONSE_TOOL_CALLS_ATTRIBUTE]) {\n      const functionCalls = (response.output as Array<Record<string, unknown>>).filter(\n        item => item?.type === 'function_call',\n      );\n      if (functionCalls.length > 0) {\n        attrs[GEN_AI_RESPONSE_TOOL_CALLS_ATTRIBUTE] = JSON.stringify(functionCalls);\n      }\n    }\n  }\n\n  span.setAttributes(attrs);\n}\n\n/**\n * Extract conversation ID from request parameters\n * Supports both Conversations API and previous_response_id chaining\n * @see https://platform.openai.com/docs/guides/conversation-state\n */\nfunction extractConversationId(params: Record<string, unknown>): string | undefined {\n  // Conversations API: conversation parameter (e.g., \"conv_...\")\n  if ('conversation' in params && typeof params.conversation === 'string') {\n    return params.conversation;\n  }\n  // Responses chaining: previous_response_id links to parent response\n  if ('previous_response_id' in params && typeof params.previous_response_id === 'string') {\n    return params.previous_response_id;\n  }\n  return undefined;\n}\n\n/**\n * Extract request parameters including model settings and conversation context\n */\nexport function extractRequestParameters(params: Record<string, unknown>): Record<string, unknown> {\n  const attributes: Record<string, unknown> = {\n    [GEN_AI_REQUEST_MODEL_ATTRIBUTE]: params.model ?? 'unknown',\n  };\n\n  if ('temperature' in params) attributes[GEN_AI_REQUEST_TEMPERATURE_ATTRIBUTE] = params.temperature;\n  if ('top_p' in params) attributes[GEN_AI_REQUEST_TOP_P_ATTRIBUTE] = params.top_p;\n  if ('frequency_penalty' in params) attributes[GEN_AI_REQUEST_FREQUENCY_PENALTY_ATTRIBUTE] = params.frequency_penalty;\n  if ('presence_penalty' in params) attributes[GEN_AI_REQUEST_PRESENCE_PENALTY_ATTRIBUTE] = params.presence_penalty;\n  if ('stream' in params) attributes[GEN_AI_REQUEST_STREAM_ATTRIBUTE] = params.stream;\n  if ('encoding_format' in params) attributes[GEN_AI_REQUEST_ENCODING_FORMAT_ATTRIBUTE] = params.encoding_format;\n  if ('dimensions' in params) attributes[GEN_AI_REQUEST_DIMENSIONS_ATTRIBUTE] = params.dimensions;\n\n  // Capture conversation ID for linking messages across API calls\n  const conversationId = extractConversationId(params);\n  if (conversationId) {\n    attributes[GEN_AI_CONVERSATION_ID_ATTRIBUTE] = conversationId;\n  }\n\n  return attributes;\n}\n", "import { captureException } from '../../exports';\nimport { SPAN_STATUS_ERROR } from '../../tracing';\nimport type { Span } from '../../types/span';\nimport { endStreamSpan } from '../ai/utils';\nimport { RESPONSE_EVENT_TYPES } from './constants';\nimport type {\n  ChatCompletionChunk,\n  ChatCompletionToolCall,\n  OpenAIResponseObject,\n  ResponseFunctionCall,\n  ResponseStreamingEvent,\n} from './types';\nimport { isChatCompletionChunk, isResponsesApiStreamEvent } from './utils';\n\n/**\n * State object used to accumulate information from a stream of OpenAI events/chunks.\n */\ninterface StreamingState {\n  /** Types of events encountered in the stream. */\n  eventTypes: string[];\n  /** Collected response text fragments (for output recording). */\n  responseTexts: string[];\n  /** Reasons for finishing the response, as reported by the API. */\n  finishReasons: string[];\n  /** The response ID. */\n  responseId: string;\n  /** The model name. */\n  responseModel: string;\n  /** Number of prompt/input tokens used. */\n  promptTokens: number | undefined;\n  /** Number of completion/output tokens used. */\n  completionTokens: number | undefined;\n  /** Total number of tokens used (prompt + completion). */\n  totalTokens: number | undefined;\n  /**\n   * Accumulated tool calls from Chat Completion streaming, indexed by tool call index.\n   * @see https://platform.openai.com/docs/guides/function-calling?api-mode=chat#streaming\n   */\n  chatCompletionToolCalls: Record<number, ChatCompletionToolCall>;\n  /**\n   * Accumulated function calls from Responses API streaming.\n   * @see https://platform.openai.com/docs/guides/function-calling?api-mode=responses#streaming\n   */\n  responsesApiToolCalls: Array<ResponseFunctionCall | unknown>;\n}\n\n/**\n * Processes tool calls from a chat completion chunk delta.\n * Follows the pattern: accumulate by index, then convert to array at the end.\n *\n * @param toolCalls - Array of tool calls from the delta.\n * @param state - The current streaming state to update.\n *\n *  @see https://platform.openai.com/docs/guides/function-calling#streaming\n */\nfunction processChatCompletionToolCalls(toolCalls: ChatCompletionToolCall[], state: StreamingState): void {\n  for (const toolCall of toolCalls) {\n    const index = toolCall.index;\n    if (index === undefined || !toolCall.function) continue;\n\n    // Initialize tool call if this is the first chunk for this index\n    if (!(index in state.chatCompletionToolCalls)) {\n      state.chatCompletionToolCalls[index] = {\n        ...toolCall,\n        function: {\n          name: toolCall.function.name,\n          arguments: toolCall.function.arguments || '',\n        },\n      };\n    } else {\n      // Accumulate function arguments from subsequent chunks\n      const existingToolCall = state.chatCompletionToolCalls[index];\n      if (toolCall.function.arguments && existingToolCall?.function) {\n        existingToolCall.function.arguments += toolCall.function.arguments;\n      }\n    }\n  }\n}\n\n/**\n * Processes a single OpenAI ChatCompletionChunk event, updating the streaming state.\n *\n * @param chunk - The ChatCompletionChunk event to process.\n * @param state - The current streaming state to update.\n * @param recordOutputs - Whether to record output text fragments.\n */\nfunction processChatCompletionChunk(chunk: ChatCompletionChunk, state: StreamingState, recordOutputs: boolean): void {\n  state.responseId = chunk.id ?? state.responseId;\n  state.responseModel = chunk.model ?? state.responseModel;\n\n  if (chunk.usage) {\n    // For stream responses, the input tokens remain constant across all events in the stream.\n    // Output tokens, however, are only finalized in the last event.\n    // Since we can't guarantee that the last event will include usage data or even be a typed event,\n    // we update the output token values on every event that includes them.\n    // This ensures that output token usage is always set, even if the final event lacks it.\n    state.promptTokens = chunk.usage.prompt_tokens;\n    state.completionTokens = chunk.usage.completion_tokens;\n    state.totalTokens = chunk.usage.total_tokens;\n  }\n\n  for (const choice of chunk.choices ?? []) {\n    if (recordOutputs) {\n      if (choice.delta?.content) {\n        state.responseTexts.push(choice.delta.content);\n      }\n\n      // Handle tool calls from delta\n      if (choice.delta?.tool_calls) {\n        processChatCompletionToolCalls(choice.delta.tool_calls, state);\n      }\n    }\n    if (choice.finish_reason) {\n      state.finishReasons.push(choice.finish_reason);\n    }\n  }\n}\n\n/**\n * Processes a single OpenAI Responses API streaming event, updating the streaming state and span.\n *\n * @param streamEvent - The event to process (may be an error or unknown object).\n * @param state - The current streaming state to update.\n * @param recordOutputs - Whether to record output text fragments.\n * @param span - The span to update with error status if needed.\n */\nfunction processResponsesApiEvent(\n  streamEvent: ResponseStreamingEvent | unknown | Error,\n  state: StreamingState,\n  recordOutputs: boolean,\n  span: Span,\n): void {\n  if (!(streamEvent && typeof streamEvent === 'object')) {\n    state.eventTypes.push('unknown:non-object');\n    return;\n  }\n  if (streamEvent instanceof Error) {\n    span.setStatus({ code: SPAN_STATUS_ERROR, message: 'internal_error' });\n    captureException(streamEvent, {\n      mechanism: {\n        handled: false,\n        type: 'auto.ai.openai.stream-response',\n      },\n    });\n    return;\n  }\n\n  if (!('type' in streamEvent)) return;\n  const event = streamEvent as ResponseStreamingEvent;\n\n  if (!RESPONSE_EVENT_TYPES.includes(event.type)) {\n    state.eventTypes.push(event.type);\n    return;\n  }\n\n  // Handle output text delta\n  if (recordOutputs) {\n    // Handle tool call events for Responses API\n    if (event.type === 'response.output_item.done' && 'item' in event) {\n      state.responsesApiToolCalls.push(event.item);\n    }\n\n    if (event.type === 'response.output_text.delta' && 'delta' in event && event.delta) {\n      state.responseTexts.push(event.delta);\n      return;\n    }\n  }\n\n  if ('response' in event) {\n    const { response } = event as { response: OpenAIResponseObject };\n    state.responseId = response.id ?? state.responseId;\n    state.responseModel = response.model ?? state.responseModel;\n\n    if (response.usage) {\n      // For stream responses, the input tokens remain constant across all events in the stream.\n      // Output tokens, however, are only finalized in the last event.\n      // Since we can't guarantee that the last event will include usage data or even be a typed event,\n      // we update the output token values on every event that includes them.\n      // This ensures that output token usage is always set, even if the final event lacks it.\n      state.promptTokens = response.usage.input_tokens;\n      state.completionTokens = response.usage.output_tokens;\n      state.totalTokens = response.usage.total_tokens;\n    }\n\n    if (response.status) {\n      state.finishReasons.push(response.status);\n    }\n\n    if (recordOutputs && response.output_text) {\n      state.responseTexts.push(response.output_text);\n    }\n  }\n}\n\n/**\n * Instruments a stream of OpenAI events, updating the provided span with relevant attributes and\n * optionally recording output text. This function yields each event from the input stream as it is processed.\n *\n * @template T - The type of events in the stream.\n * @param stream - The async iterable stream of events to instrument.\n * @param span - The span to add attributes to and to finish at the end of the stream.\n * @param recordOutputs - Whether to record output text fragments in the span.\n * @returns An async generator yielding each event from the input stream.\n */\nexport async function* instrumentStream<T>(\n  stream: AsyncIterable<T>,\n  span: Span,\n  recordOutputs: boolean,\n): AsyncGenerator<T, void, unknown> {\n  const state: StreamingState = {\n    eventTypes: [],\n    responseTexts: [],\n    finishReasons: [],\n    responseId: '',\n    responseModel: '',\n    promptTokens: undefined,\n    completionTokens: undefined,\n    totalTokens: undefined,\n    chatCompletionToolCalls: {},\n    responsesApiToolCalls: [],\n  };\n\n  try {\n    for await (const event of stream) {\n      if (isChatCompletionChunk(event)) {\n        processChatCompletionChunk(event as ChatCompletionChunk, state, recordOutputs);\n      } else if (isResponsesApiStreamEvent(event)) {\n        processResponsesApiEvent(event as ResponseStreamingEvent, state, recordOutputs, span);\n      }\n      yield event;\n    }\n  } finally {\n    const allToolCalls = [...Object.values(state.chatCompletionToolCalls), ...state.responsesApiToolCalls];\n    endStreamSpan(span, { ...state, toolCalls: allToolCalls }, recordOutputs);\n  }\n}\n", "import { DEBUG_BUILD } from '../../debug-build';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '../../semanticAttributes';\nimport { SPAN_STATUS_ERROR } from '../../tracing';\nimport { startSpan, startSpanManual } from '../../tracing/trace';\nimport type { Span, SpanAttributeValue } from '../../types/span';\nimport { debug } from '../../utils/debug-logger';\nimport {\n  GEN_AI_EMBEDDINGS_INPUT_ATTRIBUTE,\n  GEN_AI_INPUT_MESSAGES_ATTRIBUTE,\n  GEN_AI_INPUT_MESSAGES_ORIGINAL_LENGTH_ATTRIBUTE,\n  GEN_AI_OPERATION_NAME_ATTRIBUTE,\n  GEN_AI_REQUEST_AVAILABLE_TOOLS_ATTRIBUTE,\n  GEN_AI_REQUEST_MODEL_ATTRIBUTE,\n  GEN_AI_SYSTEM_ATTRIBUTE,\n  GEN_AI_SYSTEM_INSTRUCTIONS_ATTRIBUTE,\n} from '../ai/gen-ai-attributes';\nimport type { InstrumentedMethodEntry } from '../ai/utils';\nimport { stringify } from '../../utils/string';\nimport {\n  buildMethodPath,\n  extractSystemInstructions,\n  getTruncatedJsonString,\n  resolveAIRecordingOptions,\n  shouldEnableTruncation,\n  wrapPromiseWithMethods,\n} from '../ai/utils';\nimport { OPENAI_METHOD_REGISTRY } from './constants';\nimport { instrumentStream } from './streaming';\nimport type { ChatCompletionChunk, OpenAiOptions, OpenAIStream, ResponseStreamingEvent } from './types';\nimport { addResponseAttributes, extractRequestParameters } from './utils';\n\n/**\n * Extract available tools from request parameters\n */\nfunction extractAvailableTools(params: Record<string, unknown>): string | undefined {\n  const tools = Array.isArray(params.tools) ? params.tools : [];\n  const hasWebSearchOptions = params.web_search_options && typeof params.web_search_options === 'object';\n  const webSearchOptions = hasWebSearchOptions\n    ? [{ type: 'web_search_options', ...(params.web_search_options as Record<string, unknown>) }]\n    : [];\n\n  const availableTools = [...tools, ...webSearchOptions];\n  if (availableTools.length === 0) {\n    return undefined;\n  }\n\n  try {\n    return JSON.stringify(availableTools);\n  } catch (error) {\n    DEBUG_BUILD && debug.error('Failed to serialize OpenAI tools:', error);\n    return undefined;\n  }\n}\n\n/**\n * Extract request attributes from method arguments\n */\nexport function extractRequestAttributes(args: unknown[], operationName: string): Record<string, unknown> {\n  const attributes: Record<string, unknown> = {\n    [GEN_AI_SYSTEM_ATTRIBUTE]: 'openai',\n    [GEN_AI_OPERATION_NAME_ATTRIBUTE]: operationName,\n    [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ai.openai',\n  };\n\n  if (args.length > 0 && typeof args[0] === 'object' && args[0] !== null) {\n    const params = args[0] as Record<string, unknown>;\n\n    const availableTools = extractAvailableTools(params);\n    if (availableTools) {\n      attributes[GEN_AI_REQUEST_AVAILABLE_TOOLS_ATTRIBUTE] = availableTools;\n    }\n\n    Object.assign(attributes, extractRequestParameters(params));\n  } else {\n    attributes[GEN_AI_REQUEST_MODEL_ATTRIBUTE] = 'unknown';\n  }\n\n  return attributes;\n}\n\n// Extract and record AI request inputs, if present. This is intentionally separate from response attributes.\nexport function addRequestAttributes(\n  span: Span,\n  params: Record<string, unknown>,\n  operationName: string,\n  enableTruncation: boolean,\n): void {\n  // Store embeddings input on a separate attribute and do not truncate it\n  if (operationName === 'embeddings' && 'input' in params) {\n    const input = params.input;\n\n    // No input provided\n    if (input == null) {\n      return;\n    }\n\n    // Empty input string\n    if (typeof input === 'string' && input.length === 0) {\n      return;\n    }\n\n    // Empty array input\n    if (Array.isArray(input) && input.length === 0) {\n      return;\n    }\n\n    // Store strings as-is, arrays/objects as JSON\n    span.setAttribute(GEN_AI_EMBEDDINGS_INPUT_ATTRIBUTE, typeof input === 'string' ? input : JSON.stringify(input));\n    return;\n  }\n\n  const src = 'input' in params ? params.input : 'messages' in params ? params.messages : undefined;\n\n  if (!src) {\n    return;\n  }\n\n  if (Array.isArray(src) && src.length === 0) {\n    return;\n  }\n\n  const { systemInstructions, filteredMessages } = extractSystemInstructions(src);\n\n  if (systemInstructions) {\n    span.setAttribute(GEN_AI_SYSTEM_INSTRUCTIONS_ATTRIBUTE, systemInstructions);\n  }\n\n  span.setAttribute(\n    GEN_AI_INPUT_MESSAGES_ATTRIBUTE,\n    enableTruncation ? getTruncatedJsonString(filteredMessages) : stringify(filteredMessages),\n  );\n\n  if (Array.isArray(filteredMessages)) {\n    span.setAttribute(GEN_AI_INPUT_MESSAGES_ORIGINAL_LENGTH_ATTRIBUTE, filteredMessages.length);\n  } else {\n    span.setAttribute(GEN_AI_INPUT_MESSAGES_ORIGINAL_LENGTH_ATTRIBUTE, 1);\n  }\n}\n\n/**\n * Instrument a method with Sentry spans\n * Following Sentry AI Agents Manual Instrumentation conventions\n * @see https://docs.sentry.io/platforms/javascript/guides/node/tracing/instrumentation/ai-agents-module/#manual-instrumentation\n */\nfunction instrumentMethod<T extends unknown[], R>(\n  originalMethod: (...args: T) => Promise<R>,\n  methodPath: string,\n  instrumentedMethod: InstrumentedMethodEntry,\n  context: unknown,\n  options: OpenAiOptions,\n): (...args: T) => Promise<R> {\n  return function instrumentedCall(...args: T): Promise<R> {\n    const operationName = instrumentedMethod.operation || 'unknown';\n    const requestAttributes = extractRequestAttributes(args, operationName);\n    const model = (requestAttributes[GEN_AI_REQUEST_MODEL_ATTRIBUTE] as string) || 'unknown';\n\n    const params = args[0] as Record<string, unknown> | undefined;\n    const isStreamRequested = params && typeof params === 'object' && params.stream === true;\n\n    const spanConfig = {\n      name: `${operationName} ${model}`,\n      op: `gen_ai.${operationName}`,\n      attributes: requestAttributes as Record<string, SpanAttributeValue>,\n    };\n\n    if (isStreamRequested) {\n      let originalResult!: Promise<R>;\n\n      const instrumentedPromise = startSpanManual(spanConfig, (span: Span) => {\n        originalResult = originalMethod.apply(context, args);\n\n        if (options.recordInputs && params) {\n          addRequestAttributes(span, params, operationName, shouldEnableTruncation(options.enableTruncation));\n        }\n\n        // Return async processing\n        return (async () => {\n          try {\n            const result = await originalResult;\n            return instrumentStream(\n              result as OpenAIStream<ChatCompletionChunk | ResponseStreamingEvent>,\n              span,\n              options.recordOutputs ?? false,\n            ) as unknown as R;\n          } catch (error) {\n            span.setStatus({ code: SPAN_STATUS_ERROR, message: 'internal_error' });\n            span.end();\n            throw error;\n          }\n        })();\n      });\n\n      return wrapPromiseWithMethods(originalResult, instrumentedPromise);\n    }\n\n    // Non-streaming\n    let originalResult!: Promise<R>;\n\n    const instrumentedPromise = startSpan(spanConfig, (span: Span) => {\n      // Call synchronously to capture the promise\n      originalResult = originalMethod.apply(context, args);\n\n      if (options.recordInputs && params) {\n        addRequestAttributes(span, params, operationName, shouldEnableTruncation(options.enableTruncation));\n      }\n\n      return originalResult.then(result => {\n        addResponseAttributes(span, result, options.recordOutputs);\n        return result;\n      });\n    });\n\n    return wrapPromiseWithMethods(originalResult, instrumentedPromise);\n  };\n}\n\n/**\n * Create a deep proxy for OpenAI client instrumentation\n */\nfunction createDeepProxy<T extends object>(target: T, currentPath = '', options: OpenAiOptions): T {\n  return new Proxy(target, {\n    get(obj: object, prop: string): unknown {\n      const value = (obj as Record<string, unknown>)[prop];\n      const methodPath = buildMethodPath(currentPath, String(prop));\n\n      const instrumentedMethod = OPENAI_METHOD_REGISTRY[methodPath as keyof typeof OPENAI_METHOD_REGISTRY];\n      if (typeof value === 'function' && instrumentedMethod) {\n        return instrumentMethod(\n          value as (...args: unknown[]) => Promise<unknown>,\n          methodPath,\n          instrumentedMethod,\n          obj,\n          options,\n        );\n      }\n\n      if (typeof value === 'function') {\n        // Bind non-instrumented functions to preserve the original `this` context,\n        // which is required for accessing private class fields (e.g. #baseURL) in OpenAI SDK v5.\n        return value.bind(obj);\n      }\n\n      if (value && typeof value === 'object') {\n        return createDeepProxy(value, methodPath, options);\n      }\n\n      return value;\n    },\n  }) as T;\n}\n\n/**\n * Instrument an OpenAI client with Sentry tracing\n * Can be used across Node.js, Cloudflare Workers, and Vercel Edge\n */\nexport function instrumentOpenAiClient<T extends object>(client: T, options?: OpenAiOptions): T {\n  return createDeepProxy(client, '', resolveAIRecordingOptions(options));\n}\n", "import type { InstrumentedMethodRegistry } from '../ai/utils';\n\nexport const ANTHROPIC_AI_INTEGRATION_NAME = 'Anthropic_AI' as const;\n\n// https://docs.anthropic.com/en/api/messages\n// https://docs.anthropic.com/en/api/models-list\nexport const ANTHROPIC_METHOD_REGISTRY = {\n  'messages.create': { operation: 'chat' },\n  'messages.stream': { operation: 'chat', streaming: true },\n  'messages.countTokens': { operation: 'chat' },\n  'models.get': { operation: 'models' },\n  'completions.create': { operation: 'chat' },\n  'models.retrieve': { operation: 'models' },\n  'beta.messages.create': { operation: 'chat' },\n} as const satisfies InstrumentedMethodRegistry;\n", "import { captureException } from '../../exports';\nimport { SPAN_STATUS_ERROR } from '../../tracing';\nimport type { Span } from '../../types/span';\nimport type { SpanStatusType } from '../../types/spanStatus';\nimport {\n  GEN_AI_INPUT_MESSAGES_ATTRIBUTE,\n  GEN_AI_INPUT_MESSAGES_ORIGINAL_LENGTH_ATTRIBUTE,\n  GEN_AI_SYSTEM_INSTRUCTIONS_ATTRIBUTE,\n} from '../ai/gen-ai-attributes';\nimport { extractSystemInstructions, getTruncatedJsonString } from '../ai/utils';\nimport { stringify } from '../../utils/string';\nimport type { AnthropicAiResponse } from './types';\n\n/**\n * Set the messages and messages original length attributes.\n * Extracts system instructions before truncation.\n */\nexport function setMessagesAttribute(span: Span, messages: unknown, enableTruncation: boolean): void {\n  if (Array.isArray(messages) && messages.length === 0) {\n    return;\n  }\n\n  const { systemInstructions, filteredMessages } = extractSystemInstructions(messages);\n\n  if (systemInstructions) {\n    span.setAttributes({\n      [GEN_AI_SYSTEM_INSTRUCTIONS_ATTRIBUTE]: systemInstructions,\n    });\n  }\n\n  const filteredLength = Array.isArray(filteredMessages) ? filteredMessages.length : 1;\n  span.setAttributes({\n    [GEN_AI_INPUT_MESSAGES_ATTRIBUTE]: enableTruncation\n      ? getTruncatedJsonString(filteredMessages)\n      : stringify(filteredMessages),\n    [GEN_AI_INPUT_MESSAGES_ORIGINAL_LENGTH_ATTRIBUTE]: filteredLength,\n  });\n}\n\nconst ANTHROPIC_ERROR_TYPE_TO_SPAN_STATUS: Record<string, SpanStatusType> = {\n  invalid_request_error: 'invalid_argument',\n  authentication_error: 'unauthenticated',\n  permission_error: 'permission_denied',\n  not_found_error: 'not_found',\n  request_too_large: 'failed_precondition',\n  rate_limit_error: 'resource_exhausted',\n  api_error: 'internal_error',\n  overloaded_error: 'unavailable',\n};\n\n/**\n * Map an Anthropic API error type to a SpanStatusType value.\n * @see https://docs.anthropic.com/en/api/errors#error-shapes\n */\nexport function mapAnthropicErrorToStatusMessage(errorType: string | undefined): SpanStatusType {\n  if (!errorType) {\n    return 'internal_error';\n  }\n  return ANTHROPIC_ERROR_TYPE_TO_SPAN_STATUS[errorType] || 'internal_error';\n}\n\n/**\n * Capture error information from the response\n * @see https://docs.anthropic.com/en/api/errors#error-shapes\n */\nexport function handleResponseError(span: Span, response: AnthropicAiResponse): void {\n  if (response.error) {\n    span.setStatus({ code: SPAN_STATUS_ERROR, message: mapAnthropicErrorToStatusMessage(response.error.type) });\n\n    captureException(response.error, {\n      mechanism: {\n        handled: false,\n        type: 'auto.ai.anthropic.anthropic_error',\n      },\n    });\n  }\n}\n\n/**\n * Include the system prompt in the messages list, if available\n */\nexport function messagesFromParams(params: Record<string, unknown>): unknown[] {\n  const { system, messages, input } = params;\n\n  const systemMessages = typeof system === 'string' ? [{ role: 'system', content: params.system }] : [];\n\n  const inputParamMessages = Array.isArray(input) ? input : input != null ? [input] : undefined;\n\n  const messagesParamMessages = Array.isArray(messages) ? messages : messages != null ? [messages] : [];\n\n  const userMessages = inputParamMessages ?? messagesParamMessages;\n\n  return [...systemMessages, ...userMessages];\n}\n", "import { captureException } from '../../exports';\nimport { SPAN_STATUS_ERROR } from '../../tracing';\nimport type { Span } from '../../types/span';\nimport { endStreamSpan } from '../ai/utils';\nimport type { AnthropicAiStreamingEvent } from './types';\nimport { mapAnthropicErrorToStatusMessage } from './utils';\n\n/**\n * State object used to accumulate information from a stream of Anthropic AI events.\n */\ninterface StreamingState {\n  /** Collected response text fragments (for output recording). */\n  responseTexts: string[];\n  /** Reasons for finishing the response, as reported by the API. */\n  finishReasons: string[];\n  /** The response ID. */\n  responseId: string;\n  /** The model name. */\n  responseModel: string;\n  /** Number of prompt/input tokens used. */\n  promptTokens: number | undefined;\n  /** Number of completion/output tokens used. */\n  completionTokens: number | undefined;\n  /** Number of cache creation input tokens used. */\n  cacheCreationInputTokens: number | undefined;\n  /** Number of cache read input tokens used. */\n  cacheReadInputTokens: number | undefined;\n  /** Accumulated tool calls (finalized) */\n  toolCalls: Array<Record<string, unknown>>;\n  /** In-progress tool call blocks keyed by index */\n  activeToolBlocks: Record<\n    number,\n    {\n      id?: string;\n      name?: string;\n      inputJsonParts: string[];\n    }\n  >;\n}\n\n/**\n * Checks if an event is an error event\n * @param event - The event to process\n * @param state - The state of the streaming process\n * @param recordOutputs - Whether to record outputs\n * @param span - The span to update\n * @returns Whether an error occurred\n */\n\nfunction isErrorEvent(event: AnthropicAiStreamingEvent, span: Span): boolean {\n  if ('type' in event && typeof event.type === 'string') {\n    if (event.type === 'error') {\n      // The SDK surfaces this error to the caller (the async iterator rejects / their `error`\n      // listener fires), so we only mark the span failed and do not record it.\n      span.setStatus({ code: SPAN_STATUS_ERROR, message: mapAnthropicErrorToStatusMessage(event.error?.type) });\n      return true;\n    }\n  }\n  return false;\n}\n\n/**\n * Processes the message metadata of an event\n * @param event - The event to process\n * @param state - The state of the streaming process\n */\n\nfunction handleMessageMetadata(event: AnthropicAiStreamingEvent, state: StreamingState): void {\n  // Cumulative token counts and the final stop reason both arrive on the message_delta event.\n  // @see https://docs.anthropic.com/en/docs/build-with-claude/streaming#event-types\n  if (event.type === 'message_delta') {\n    if (event.usage && typeof event.usage.output_tokens === 'number') {\n      state.completionTokens = event.usage.output_tokens;\n    }\n    if (event.delta?.stop_reason) {\n      state.finishReasons.push(event.delta.stop_reason);\n    }\n  }\n\n  if (event.message) {\n    const message = event.message;\n\n    if (message.id) state.responseId = message.id;\n    if (message.model) state.responseModel = message.model;\n\n    if (message.usage) {\n      if (typeof message.usage.input_tokens === 'number') state.promptTokens = message.usage.input_tokens;\n      if (typeof message.usage.cache_creation_input_tokens === 'number')\n        state.cacheCreationInputTokens = message.usage.cache_creation_input_tokens;\n      if (typeof message.usage.cache_read_input_tokens === 'number')\n        state.cacheReadInputTokens = message.usage.cache_read_input_tokens;\n    }\n  }\n}\n\n/**\n * Handle start of a content block (e.g., tool_use)\n */\nfunction handleContentBlockStart(event: AnthropicAiStreamingEvent, state: StreamingState): void {\n  if (event.type !== 'content_block_start' || typeof event.index !== 'number' || !event.content_block) return;\n  if (event.content_block.type === 'tool_use' || event.content_block.type === 'server_tool_use') {\n    state.activeToolBlocks[event.index] = {\n      id: event.content_block.id,\n      name: event.content_block.name,\n      inputJsonParts: [],\n    };\n  }\n}\n\n/**\n * Handle deltas of a content block, including input_json_delta for tool_use\n */\nfunction handleContentBlockDelta(\n  event: AnthropicAiStreamingEvent,\n  state: StreamingState,\n  recordOutputs: boolean,\n): void {\n  if (event.type !== 'content_block_delta' || !event.delta) return;\n\n  // Accumulate tool_use input JSON deltas only when we have an index and an active tool block\n  if (\n    typeof event.index === 'number' &&\n    'partial_json' in event.delta &&\n    typeof event.delta.partial_json === 'string'\n  ) {\n    const active = state.activeToolBlocks[event.index];\n    if (active) {\n      active.inputJsonParts.push(event.delta.partial_json);\n    }\n  }\n\n  // Accumulate streamed response text regardless of index\n  if (recordOutputs && typeof event.delta.text === 'string') {\n    state.responseTexts.push(event.delta.text);\n  }\n}\n\n/**\n * Handle stop of a content block; finalize tool_use entries\n */\nfunction handleContentBlockStop(event: AnthropicAiStreamingEvent, state: StreamingState): void {\n  if (event.type !== 'content_block_stop' || typeof event.index !== 'number') return;\n\n  const active = state.activeToolBlocks[event.index];\n  if (!active) return;\n\n  const raw = active.inputJsonParts.join('');\n  let parsedInput: unknown;\n\n  try {\n    parsedInput = raw ? JSON.parse(raw) : {};\n  } catch {\n    parsedInput = { __unparsed: raw };\n  }\n\n  state.toolCalls.push({\n    type: 'tool_use',\n    id: active.id,\n    name: active.name,\n    input: parsedInput,\n  });\n\n  // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n  delete state.activeToolBlocks[event.index];\n}\n\n/**\n * Processes an event\n * @param event - The event to process\n * @param state - The state of the streaming process\n * @param recordOutputs - Whether to record outputs\n * @param span - The span to update\n */\nfunction processEvent(\n  event: AnthropicAiStreamingEvent,\n  state: StreamingState,\n  recordOutputs: boolean,\n  span: Span,\n): void {\n  if (!(event && typeof event === 'object')) {\n    return;\n  }\n\n  const isError = isErrorEvent(event, span);\n  if (isError) return;\n\n  handleMessageMetadata(event, state);\n\n  // Tool call events are sent via 3 separate events:\n  // - content_block_start (start of the tool call)\n  // - content_block_delta (delta aka input of the tool call)\n  // - content_block_stop (end of the tool call)\n  // We need to handle them all to capture the full tool call.\n  handleContentBlockStart(event, state);\n  handleContentBlockDelta(event, state, recordOutputs);\n  handleContentBlockStop(event, state);\n}\n\n/**\n * Instruments an async iterable stream of Anthropic events, updates the span with\n * streaming attributes and (optionally) the aggregated output text, and yields\n * each event from the input stream unchanged.\n */\nexport async function* instrumentAsyncIterableStream(\n  stream: AsyncIterable<AnthropicAiStreamingEvent>,\n  span: Span,\n  recordOutputs: boolean,\n): AsyncGenerator<AnthropicAiStreamingEvent, void, unknown> {\n  const state: StreamingState = {\n    responseTexts: [],\n    finishReasons: [],\n    responseId: '',\n    responseModel: '',\n    promptTokens: undefined,\n    completionTokens: undefined,\n    cacheCreationInputTokens: undefined,\n    cacheReadInputTokens: undefined,\n    toolCalls: [],\n    activeToolBlocks: {},\n  };\n\n  try {\n    for await (const event of stream) {\n      processEvent(event, state, recordOutputs, span);\n      yield event;\n    }\n  } finally {\n    endStreamSpan(span, state, recordOutputs);\n  }\n}\n\n/**\n * Instruments a MessageStream by registering event handlers and preserving the original stream API.\n */\nexport function instrumentMessageStream<R extends { on: (...args: unknown[]) => void }>(\n  stream: R,\n  span: Span,\n  recordOutputs: boolean,\n): R {\n  const state: StreamingState = {\n    responseTexts: [],\n    finishReasons: [],\n    responseId: '',\n    responseModel: '',\n    promptTokens: undefined,\n    completionTokens: undefined,\n    cacheCreationInputTokens: undefined,\n    cacheReadInputTokens: undefined,\n    toolCalls: [],\n    activeToolBlocks: {},\n  };\n\n  stream.on('streamEvent', (event: unknown) => {\n    processEvent(event as AnthropicAiStreamingEvent, state, recordOutputs, span);\n  });\n\n  // The event fired when a message is done being streamed by the API. Corresponds to the message_stop SSE event.\n  // @see https://github.com/anthropics/anthropic-sdk-typescript/blob/d3be31f5a4e6ebb4c0a2f65dbb8f381ae73a9166/helpers.md?plain=1#L42-L44\n  stream.on('message', () => {\n    endStreamSpan(span, state, recordOutputs);\n  });\n\n  stream.on('error', (error: unknown) => {\n    // Attaching this listener stops the stream error from being raised as an unhandled rejection, so\n    // we capture it here to avoid swallowing it (e.g. for callers that don't await/iterate the stream).\n    captureException(error, {\n      mechanism: {\n        handled: false,\n        type: 'auto.ai.anthropic.stream_error',\n      },\n    });\n\n    if (span.isRecording()) {\n      span.setStatus({ code: SPAN_STATUS_ERROR, message: 'internal_error' });\n      span.end();\n    }\n  });\n\n  return stream;\n}\n", "import { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '../../semanticAttributes';\nimport { SPAN_STATUS_ERROR } from '../../tracing';\nimport { startSpan, startSpanManual } from '../../tracing/trace';\nimport type { Span, SpanAttributeValue } from '../../types/span';\nimport {\n  GEN_AI_OPERATION_NAME_ATTRIBUTE,\n  GEN_AI_PROMPT_ATTRIBUTE,\n  GEN_AI_REQUEST_AVAILABLE_TOOLS_ATTRIBUTE,\n  GEN_AI_REQUEST_FREQUENCY_PENALTY_ATTRIBUTE,\n  GEN_AI_REQUEST_MAX_TOKENS_ATTRIBUTE,\n  GEN_AI_REQUEST_MODEL_ATTRIBUTE,\n  GEN_AI_REQUEST_STREAM_ATTRIBUTE,\n  GEN_AI_REQUEST_TEMPERATURE_ATTRIBUTE,\n  GEN_AI_REQUEST_TOP_K_ATTRIBUTE,\n  GEN_AI_REQUEST_TOP_P_ATTRIBUTE,\n  GEN_AI_RESPONSE_ID_ATTRIBUTE,\n  GEN_AI_RESPONSE_MODEL_ATTRIBUTE,\n  GEN_AI_RESPONSE_TEXT_ATTRIBUTE,\n  GEN_AI_RESPONSE_TOOL_CALLS_ATTRIBUTE,\n  GEN_AI_SYSTEM_ATTRIBUTE,\n} from '../ai/gen-ai-attributes';\nimport type { InstrumentedMethodEntry } from '../ai/utils';\nimport {\n  resolveAIRecordingOptions,\n  setTokenUsageAttributes,\n  shouldEnableTruncation,\n  wrapPromiseWithMethods,\n} from '../ai/utils';\nimport { ANTHROPIC_METHOD_REGISTRY } from './constants';\nimport { instrumentAsyncIterableStream, instrumentMessageStream } from './streaming';\nimport type { AnthropicAiOptions, AnthropicAiResponse, AnthropicAiStreamingEvent, ContentBlock } from './types';\nimport { handleResponseError, messagesFromParams, setMessagesAttribute } from './utils';\n\n// Set only while a streaming helper (e.g. `messages.stream()`) synchronously delegates to the\n// underlying `create`. The SDK invokes that internal `create` synchronously, so a plain flag\n// suppresses exactly the duplicate delegation and nothing else: a `create` made later from a\n// stream event handler runs in a separate async continuation with the flag already cleared.\nlet suppressDelegatedCreate = false;\n\n// Methods that have already been wrapped, so instrumenting the same client twice is a no-op.\nconst INSTRUMENTED_METHODS = new WeakSet<object>();\n\n/**\n * Extract request attributes from method arguments\n */\nexport function extractRequestAttributes(\n  args: unknown[],\n  methodPath: string,\n  operationName: string,\n): Record<string, unknown> {\n  const attributes: Record<string, unknown> = {\n    [GEN_AI_SYSTEM_ATTRIBUTE]: 'anthropic',\n    [GEN_AI_OPERATION_NAME_ATTRIBUTE]: operationName,\n    [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ai.anthropic',\n  };\n\n  if (args.length > 0 && typeof args[0] === 'object' && args[0] !== null) {\n    const params = args[0] as Record<string, unknown>;\n    if (params.tools && Array.isArray(params.tools)) {\n      attributes[GEN_AI_REQUEST_AVAILABLE_TOOLS_ATTRIBUTE] = JSON.stringify(params.tools);\n    }\n\n    attributes[GEN_AI_REQUEST_MODEL_ATTRIBUTE] = params.model ?? 'unknown';\n    if ('temperature' in params) attributes[GEN_AI_REQUEST_TEMPERATURE_ATTRIBUTE] = params.temperature;\n    if ('top_p' in params) attributes[GEN_AI_REQUEST_TOP_P_ATTRIBUTE] = params.top_p;\n    if ('stream' in params) attributes[GEN_AI_REQUEST_STREAM_ATTRIBUTE] = params.stream;\n    if ('top_k' in params) attributes[GEN_AI_REQUEST_TOP_K_ATTRIBUTE] = params.top_k;\n    if ('frequency_penalty' in params)\n      attributes[GEN_AI_REQUEST_FREQUENCY_PENALTY_ATTRIBUTE] = params.frequency_penalty;\n    if ('max_tokens' in params) attributes[GEN_AI_REQUEST_MAX_TOKENS_ATTRIBUTE] = params.max_tokens;\n  } else {\n    if (methodPath === 'models.retrieve' || methodPath === 'models.get') {\n      // models.retrieve(model-id) and models.get(model-id)\n      attributes[GEN_AI_REQUEST_MODEL_ATTRIBUTE] = args[0];\n    } else {\n      attributes[GEN_AI_REQUEST_MODEL_ATTRIBUTE] = 'unknown';\n    }\n  }\n\n  return attributes;\n}\n\n/**\n * Add private request attributes to spans.\n * This is only recorded if recordInputs is true.\n */\nexport function addPrivateRequestAttributes(\n  span: Span,\n  params: Record<string, unknown>,\n  enableTruncation: boolean,\n): void {\n  const messages = messagesFromParams(params);\n  setMessagesAttribute(span, messages, enableTruncation);\n\n  if ('prompt' in params) {\n    span.setAttributes({ [GEN_AI_PROMPT_ATTRIBUTE]: JSON.stringify(params.prompt) });\n  }\n}\n\n/**\n * Add content attributes when recordOutputs is enabled\n */\nfunction addContentAttributes(span: Span, response: AnthropicAiResponse): void {\n  // Messages.create\n  if ('content' in response) {\n    if (Array.isArray(response.content)) {\n      span.setAttributes({\n        [GEN_AI_RESPONSE_TEXT_ATTRIBUTE]: response.content\n          .map((item: ContentBlock) => item.text)\n          .filter(text => !!text)\n          .join(''),\n      });\n\n      const toolCalls: Array<ContentBlock> = [];\n\n      for (const item of response.content) {\n        if (item.type === 'tool_use' || item.type === 'server_tool_use') {\n          toolCalls.push(item);\n        }\n      }\n      if (toolCalls.length > 0) {\n        span.setAttributes({ [GEN_AI_RESPONSE_TOOL_CALLS_ATTRIBUTE]: JSON.stringify(toolCalls) });\n      }\n    }\n  }\n  // Completions.create\n  if ('completion' in response) {\n    span.setAttributes({ [GEN_AI_RESPONSE_TEXT_ATTRIBUTE]: response.completion });\n  }\n  // Models.countTokens\n  if ('input_tokens' in response) {\n    span.setAttributes({ [GEN_AI_RESPONSE_TEXT_ATTRIBUTE]: JSON.stringify(response.input_tokens) });\n  }\n}\n\n/**\n * Add basic metadata attributes from the response\n */\nfunction addMetadataAttributes(span: Span, response: AnthropicAiResponse): void {\n  if ('id' in response && 'model' in response) {\n    span.setAttributes({\n      [GEN_AI_RESPONSE_ID_ATTRIBUTE]: response.id,\n      [GEN_AI_RESPONSE_MODEL_ATTRIBUTE]: response.model,\n    });\n\n    if ('usage' in response && response.usage) {\n      setTokenUsageAttributes(\n        span,\n        response.usage.input_tokens,\n        response.usage.output_tokens,\n        response.usage.cache_creation_input_tokens,\n        response.usage.cache_read_input_tokens,\n      );\n    }\n  }\n}\n\n/**\n * Add response attributes to spans\n */\nexport function addResponseAttributes(span: Span, response: AnthropicAiResponse, recordOutputs?: boolean): void {\n  if (!response || typeof response !== 'object') return;\n\n  // capture error, do not add attributes if error (they shouldn't exist)\n  if ('type' in response && response.type === 'error') {\n    handleResponseError(span, response);\n    return;\n  }\n\n  // Private response attributes that are only recorded if recordOutputs is true.\n  if (recordOutputs) {\n    addContentAttributes(span, response);\n  }\n\n  // Add basic metadata attributes\n  addMetadataAttributes(span, response);\n}\n\n/**\n * Handle common error catching and reporting for streaming requests\n */\nfunction handleStreamingError(error: unknown, span: Span): never {\n  if (span.isRecording()) {\n    span.setStatus({ code: SPAN_STATUS_ERROR, message: 'internal_error' });\n    span.end();\n  }\n  throw error;\n}\n\n/**\n * Handle streaming cases with common logic\n */\nfunction handleStreamingRequest<T extends unknown[], R>(\n  target: (...args: T) => R | Promise<R>,\n  invocationThis: unknown,\n  args: T,\n  requestAttributes: Record<string, unknown>,\n  operationName: string,\n  methodPath: string,\n  params: Record<string, unknown> | undefined,\n  options: AnthropicAiOptions,\n  isStreamRequested: boolean,\n  isStreamingMethod: boolean,\n): R | Promise<R> {\n  const model = requestAttributes[GEN_AI_REQUEST_MODEL_ATTRIBUTE] ?? 'unknown';\n  const spanConfig = {\n    name: `${operationName} ${model}`,\n    op: `gen_ai.${operationName}`,\n    attributes: requestAttributes as Record<string, SpanAttributeValue>,\n  };\n\n  // messages.stream() always returns a sync MessageStream, even with stream: true param\n  if (isStreamRequested && !isStreamingMethod) {\n    let originalResult!: Promise<R>;\n\n    const instrumentedPromise = startSpanManual(spanConfig, (span: Span) => {\n      originalResult = target.apply(invocationThis, args) as Promise<R>;\n\n      if (options.recordInputs && params) {\n        addPrivateRequestAttributes(span, params, shouldEnableTruncation(options.enableTruncation));\n      }\n\n      return (async () => {\n        try {\n          const result = await originalResult;\n          return instrumentAsyncIterableStream(\n            result as AsyncIterable<AnthropicAiStreamingEvent>,\n            span,\n            options.recordOutputs ?? false,\n          ) as unknown as R;\n        } catch (error) {\n          return handleStreamingError(error, span);\n        }\n      })();\n    });\n\n    return wrapPromiseWithMethods(originalResult, instrumentedPromise);\n  } else {\n    return startSpanManual(spanConfig, span => {\n      try {\n        if (options.recordInputs && params) {\n          addPrivateRequestAttributes(span, params, shouldEnableTruncation(options.enableTruncation));\n        }\n        // The helper synchronously delegates to `create`; suppress that one internal call so it\n        // does not produce a duplicate child span (see the dedup gate in `instrumentMethod`).\n        suppressDelegatedCreate = true;\n        const messageStream = target.apply(invocationThis, args);\n        suppressDelegatedCreate = false;\n        return instrumentMessageStream(messageStream, span, options.recordOutputs ?? false);\n      } catch (error) {\n        suppressDelegatedCreate = false;\n        return handleStreamingError(error, span);\n      }\n    });\n  }\n}\n\n/**\n * Instrument a method with Sentry spans\n * Following Sentry AI Agents Manual Instrumentation conventions\n * @see https://docs.sentry.io/platforms/javascript/guides/node/tracing/instrumentation/ai-agents-module/#manual-instrumentation\n */\nfunction instrumentMethod<T extends unknown[], R>(\n  originalMethod: (...args: T) => R | Promise<R>,\n  methodPath: string,\n  instrumentedMethod: InstrumentedMethodEntry,\n  context: unknown,\n  options: AnthropicAiOptions,\n): (...args: T) => R | Promise<R> {\n  return new Proxy(originalMethod, {\n    apply(target, thisArg, args: T): R | Promise<R> {\n      // Preserve the caller's `this` so instrumentation stays transparent: the SDK's methods\n      // rely on private fields bound to the real instance, and internal delegation (e.g.\n      // `messages.stream()` calling `this.create()`) must resolve against the same object it\n      // would on an uninstrumented client. Fall back to the wrap-time owner for unbound calls.\n      const invocationThis = thisArg !== undefined ? thisArg : context;\n\n      const isStreamingMethod = instrumentedMethod.streaming === true;\n\n      // If this is the SDK's internal `create` delegation from a streaming helper (e.g.\n      // `messages.stream()` invoking `this.create()`), skip instrumentation: the helper span\n      // already represents this operation, so a second span would be a duplicate.\n      if (!isStreamingMethod && suppressDelegatedCreate) {\n        return target.apply(invocationThis, args);\n      }\n\n      const operationName = instrumentedMethod.operation || 'unknown';\n      const requestAttributes = extractRequestAttributes(args, methodPath, operationName);\n      const model = requestAttributes[GEN_AI_REQUEST_MODEL_ATTRIBUTE] ?? 'unknown';\n\n      const params = typeof args[0] === 'object' ? (args[0] as Record<string, unknown>) : undefined;\n      const isStreamRequested = Boolean(params?.stream);\n\n      if (isStreamRequested || isStreamingMethod) {\n        return handleStreamingRequest(\n          target,\n          invocationThis,\n          args,\n          requestAttributes,\n          operationName,\n          methodPath,\n          params,\n          options,\n          isStreamRequested,\n          isStreamingMethod,\n        );\n      }\n\n      let originalResult!: Promise<R>;\n\n      const instrumentedPromise = startSpan(\n        {\n          name: `${operationName} ${model}`,\n          op: `gen_ai.${operationName}`,\n          attributes: requestAttributes as Record<string, SpanAttributeValue>,\n        },\n        span => {\n          originalResult = target.apply(invocationThis, args) as Promise<R>;\n\n          if (options.recordInputs && params) {\n            addPrivateRequestAttributes(span, params, shouldEnableTruncation(options.enableTruncation));\n          }\n\n          return originalResult.then(result => {\n            addResponseAttributes(span, result as AnthropicAiResponse, options.recordOutputs);\n            return result;\n          });\n        },\n      );\n\n      return wrapPromiseWithMethods(originalResult, instrumentedPromise);\n    },\n  }) as (...args: T) => R | Promise<R>;\n}\n\n/**\n * Instrument the Anthropic client's methods in place.\n *\n * We deliberately do not wrap the client in a Proxy. The Anthropic SDK relies on private class\n * fields (`this.#field`), which are invisible to a Proxy and throw if a method runs with a\n * proxied `this`. Wrapping the registered methods in place (as own properties shadowing the\n * prototype) keeps `this` bound to the real instance, so instrumentation stays observationally\n * transparent: internal delegation (e.g. `messages.stream()` calling `this.create()`) and\n * `instanceof` checks behave exactly as on an uninstrumented client, and non-instrumented\n * methods are left untouched.\n */\nfunction instrumentClientInPlace<T extends object>(client: T, options: AnthropicAiOptions): T {\n  for (const methodPath of Object.keys(ANTHROPIC_METHOD_REGISTRY) as Array<keyof typeof ANTHROPIC_METHOD_REGISTRY>) {\n    const segments = methodPath.split('.');\n    const methodName = segments.pop() as string;\n\n    let owner = client as Record<string, unknown> | undefined;\n    for (const segment of segments) {\n      owner = owner?.[segment] as Record<string, unknown> | undefined;\n    }\n\n    if (!owner || typeof owner[methodName] !== 'function') {\n      continue;\n    }\n\n    const originalMethod = owner[methodName] as (...args: unknown[]) => unknown;\n    if (INSTRUMENTED_METHODS.has(originalMethod)) {\n      continue;\n    }\n\n    const instrumented = instrumentMethod(\n      originalMethod,\n      methodPath,\n      ANTHROPIC_METHOD_REGISTRY[methodPath],\n      owner,\n      options,\n    );\n    INSTRUMENTED_METHODS.add(instrumented);\n    owner[methodName] = instrumented;\n  }\n\n  return client;\n}\n\n/**\n * Instrument an Anthropic AI client with Sentry tracing\n * Can be used across Node.js, Cloudflare Workers, and Vercel Edge\n *\n * @template T - The type of the client that extends object\n * @param client - The Anthropic AI client to instrument\n * @param options - Optional configuration for recording inputs and outputs\n * @returns The instrumented client with the same type as the input\n */\nexport function instrumentAnthropicAiClient<T extends object>(anthropicAiClient: T, options?: AnthropicAiOptions): T {\n  return instrumentClientInPlace(anthropicAiClient, resolveAIRecordingOptions(options));\n}\n", "import type { InstrumentedMethodRegistry } from '../ai/utils';\n\nexport const GOOGLE_GENAI_INTEGRATION_NAME = 'Google_GenAI' as const;\n\n// https://ai.google.dev/api/rest/v1/models/generateContent\n// https://ai.google.dev/api/rest/v1/chats/sendMessage\n// https://googleapis.github.io/js-genai/release_docs/classes/models.Models.html#generatecontentstream\n// https://googleapis.github.io/js-genai/release_docs/classes/chats.Chat.html#sendmessagestream\nexport const GOOGLE_GENAI_METHOD_REGISTRY = {\n  'models.generateContent': { operation: 'generate_content' },\n  'models.generateContentStream': { operation: 'generate_content', streaming: true },\n  'models.embedContent': { operation: 'embeddings' },\n  'chats.create': { proxyResultPath: 'chat' },\n  'chat.sendMessage': { operation: 'chat' },\n  'chat.sendMessageStream': { operation: 'chat', streaming: true },\n} as const satisfies InstrumentedMethodRegistry;\n\n// Constants for internal use\nexport const GOOGLE_GENAI_SYSTEM_NAME = 'google_genai';\n", "import { captureException } from '../../exports';\nimport { SPAN_STATUS_ERROR } from '../../tracing';\nimport type { Span } from '../../types/span';\nimport { endStreamSpan } from '../ai/utils';\nimport type { GoogleGenAIResponse } from './types';\n\n/**\n * State object used to accumulate information from a stream of Google GenAI events.\n */\ninterface StreamingState {\n  /** Collected response text fragments (for output recording). */\n  responseTexts: string[];\n  /** Reasons for finishing the response, as reported by the API. */\n  finishReasons: string[];\n  /** The response ID. */\n  responseId?: string;\n  /** The model name. */\n  responseModel?: string;\n  /** Number of prompt/input tokens used. */\n  promptTokens?: number;\n  /** Number of completion/output tokens used. */\n  completionTokens?: number;\n  /** Number of total tokens used. */\n  totalTokens?: number;\n  /** Accumulated tool calls (finalized) */\n  toolCalls: Array<Record<string, unknown>>;\n}\n\n/**\n * Checks if a response chunk contains an error\n * @param chunk - The response chunk to check\n * @param span - The span to update if error is found\n * @returns Whether an error occurred\n */\nfunction isErrorChunk(chunk: GoogleGenAIResponse, span: Span): boolean {\n  const feedback = chunk?.promptFeedback;\n  if (feedback?.blockReason) {\n    const message = feedback.blockReasonMessage ?? feedback.blockReason;\n    span.setStatus({ code: SPAN_STATUS_ERROR, message: 'internal_error' });\n    captureException(`Content blocked: ${message}`, {\n      mechanism: { handled: false, type: 'auto.ai.google_genai' },\n    });\n    return true;\n  }\n  return false;\n}\n\n/**\n * Processes response metadata from a chunk\n * @param chunk - The response chunk to process\n * @param state - The state of the streaming process\n */\nfunction handleResponseMetadata(chunk: GoogleGenAIResponse, state: StreamingState): void {\n  if (typeof chunk.responseId === 'string') state.responseId = chunk.responseId;\n  if (typeof chunk.modelVersion === 'string') state.responseModel = chunk.modelVersion;\n\n  const usage = chunk.usageMetadata;\n  if (usage) {\n    if (typeof usage.promptTokenCount === 'number') state.promptTokens = usage.promptTokenCount;\n    if (typeof usage.candidatesTokenCount === 'number') state.completionTokens = usage.candidatesTokenCount;\n    if (typeof usage.totalTokenCount === 'number') state.totalTokens = usage.totalTokenCount;\n  }\n}\n\n/**\n * Processes candidate content from a response chunk\n * @param chunk - The response chunk to process\n * @param state - The state of the streaming process\n * @param recordOutputs - Whether to record outputs\n */\nfunction handleCandidateContent(chunk: GoogleGenAIResponse, state: StreamingState, recordOutputs: boolean): void {\n  if (Array.isArray(chunk.functionCalls)) {\n    state.toolCalls.push(...chunk.functionCalls);\n  }\n\n  for (const candidate of chunk.candidates ?? []) {\n    if (candidate?.finishReason && !state.finishReasons.includes(candidate.finishReason)) {\n      state.finishReasons.push(candidate.finishReason);\n    }\n\n    for (const part of candidate?.content?.parts ?? []) {\n      if (recordOutputs && part.text) state.responseTexts.push(part.text);\n      if (part.functionCall) {\n        state.toolCalls.push({\n          type: 'function',\n          id: part.functionCall.id,\n          name: part.functionCall.name,\n          arguments: part.functionCall.args,\n        });\n      }\n    }\n  }\n}\n\n/**\n * Processes a single chunk from the Google GenAI stream\n * @param chunk - The chunk to process\n * @param state - The state of the streaming process\n * @param recordOutputs - Whether to record outputs\n * @param span - The span to update\n */\nfunction processChunk(chunk: GoogleGenAIResponse, state: StreamingState, recordOutputs: boolean, span: Span): void {\n  if (!chunk || isErrorChunk(chunk, span)) return;\n  handleResponseMetadata(chunk, state);\n  handleCandidateContent(chunk, state, recordOutputs);\n}\n\n/**\n * Instruments an async iterable stream of Google GenAI response chunks, updates the span with\n * streaming attributes and (optionally) the aggregated output text, and yields\n * each chunk from the input stream unchanged.\n */\nexport async function* instrumentStream(\n  stream: AsyncIterable<GoogleGenAIResponse>,\n  span: Span,\n  recordOutputs: boolean,\n): AsyncGenerator<GoogleGenAIResponse, void, unknown> {\n  const state: StreamingState = {\n    responseTexts: [],\n    finishReasons: [],\n    toolCalls: [],\n  };\n\n  try {\n    for await (const chunk of stream) {\n      processChunk(chunk, state, recordOutputs, span);\n      yield chunk;\n    }\n  } finally {\n    endStreamSpan(span, state, recordOutputs);\n  }\n}\n", "// Copied from https://googleapis.github.io/js-genai/release_docs/index.html\nexport type ContentListUnion = Content | Content[] | PartListUnion;\nexport type ContentUnion = Content | PartUnion[] | PartUnion;\nexport type Content = {\n  parts?: Part[];\n  role?: string;\n};\nexport type PartUnion = Part | string;\nexport type Part = Record<string, unknown> & {\n  inlineData?: {\n    data?: string;\n    displayName?: string;\n    mimeType?: string;\n  };\n  text?: string;\n};\nexport type PartListUnion = PartUnion[] | PartUnion;\n\n// our consistent span message shape\nexport type Message = Record<string, unknown> & {\n  role: string;\n  content?: PartListUnion;\n  parts?: PartListUnion;\n};\n\n/**\n *\n */\nexport function contentUnionToMessages(content: ContentListUnion, role = 'user'): Message[] {\n  if (typeof content === 'string') {\n    return [{ role, content }];\n  }\n  if (Array.isArray(content)) {\n    return content.flatMap(content => contentUnionToMessages(content, role));\n  }\n  if (typeof content !== 'object' || !content) return [];\n  if ('role' in content && typeof content.role === 'string') {\n    return [content as Message];\n  }\n  if ('parts' in content) {\n    return [{ ...content, role } as Message];\n  }\n  return [{ role, content }];\n}\n", "/* eslint-disable max-lines */\nimport { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '../../semanticAttributes';\nimport { SPAN_STATUS_ERROR } from '../../tracing';\nimport { startSpan, startSpanManual } from '../../tracing/trace';\nimport type { Span, SpanAttributeValue } from '../../types/span';\nimport { handleCallbackErrors } from '../../utils/handleCallbackErrors';\nimport {\n  GEN_AI_EMBEDDINGS_INPUT_ATTRIBUTE,\n  GEN_AI_INPUT_MESSAGES_ATTRIBUTE,\n  GEN_AI_INPUT_MESSAGES_ORIGINAL_LENGTH_ATTRIBUTE,\n  GEN_AI_OPERATION_NAME_ATTRIBUTE,\n  GEN_AI_REQUEST_AVAILABLE_TOOLS_ATTRIBUTE,\n  GEN_AI_REQUEST_FREQUENCY_PENALTY_ATTRIBUTE,\n  GEN_AI_REQUEST_MAX_TOKENS_ATTRIBUTE,\n  GEN_AI_REQUEST_MODEL_ATTRIBUTE,\n  GEN_AI_REQUEST_PRESENCE_PENALTY_ATTRIBUTE,\n  GEN_AI_REQUEST_TEMPERATURE_ATTRIBUTE,\n  GEN_AI_REQUEST_TOP_K_ATTRIBUTE,\n  GEN_AI_REQUEST_TOP_P_ATTRIBUTE,\n  GEN_AI_RESPONSE_MODEL_ATTRIBUTE,\n  GEN_AI_RESPONSE_TEXT_ATTRIBUTE,\n  GEN_AI_RESPONSE_TOOL_CALLS_ATTRIBUTE,\n  GEN_AI_SYSTEM_ATTRIBUTE,\n  GEN_AI_SYSTEM_INSTRUCTIONS_ATTRIBUTE,\n  GEN_AI_USAGE_INPUT_TOKENS_ATTRIBUTE,\n  GEN_AI_USAGE_OUTPUT_TOKENS_ATTRIBUTE,\n  GEN_AI_USAGE_TOTAL_TOKENS_ATTRIBUTE,\n} from '../ai/gen-ai-attributes';\nimport type { InstrumentedMethodEntry } from '../ai/utils';\nimport { stringify } from '../../utils/string';\nimport {\n  buildMethodPath,\n  extractSystemInstructions,\n  getTruncatedJsonString,\n  resolveAIRecordingOptions,\n  shouldEnableTruncation,\n} from '../ai/utils';\nimport { GOOGLE_GENAI_METHOD_REGISTRY, GOOGLE_GENAI_SYSTEM_NAME } from './constants';\nimport { instrumentStream } from './streaming';\nimport type { Candidate, ContentPart, GoogleGenAIOptions, GoogleGenAIResponse } from './types';\nimport type { ContentListUnion, ContentUnion, Message, PartListUnion } from './utils';\nimport { contentUnionToMessages } from './utils';\n\n/**\n * Extract model from parameters or chat context object\n * For chat instances, the model is available on the chat object as 'model' (older versions) or 'modelVersion' (newer versions)\n */\nexport function extractModel(params: Record<string, unknown>, context?: unknown): string {\n  if ('model' in params && typeof params.model === 'string') {\n    return params.model;\n  }\n\n  // Try to get model from chat context object (chat instance has model property)\n  if (context && typeof context === 'object') {\n    const contextObj = context as Record<string, unknown>;\n\n    // Check for 'model' property (older versions, and streaming)\n    if ('model' in contextObj && typeof contextObj.model === 'string') {\n      return contextObj.model;\n    }\n\n    // Check for 'modelVersion' property (newer versions)\n    if ('modelVersion' in contextObj && typeof contextObj.modelVersion === 'string') {\n      return contextObj.modelVersion;\n    }\n  }\n\n  return 'unknown';\n}\n\n/**\n * Extract generation config parameters\n */\nfunction extractConfigAttributes(config: Record<string, unknown>): Record<string, SpanAttributeValue> {\n  const attributes: Record<string, SpanAttributeValue> = {};\n\n  if ('temperature' in config && typeof config.temperature === 'number') {\n    attributes[GEN_AI_REQUEST_TEMPERATURE_ATTRIBUTE] = config.temperature;\n  }\n  if ('topP' in config && typeof config.topP === 'number') {\n    attributes[GEN_AI_REQUEST_TOP_P_ATTRIBUTE] = config.topP;\n  }\n  if ('topK' in config && typeof config.topK === 'number') {\n    attributes[GEN_AI_REQUEST_TOP_K_ATTRIBUTE] = config.topK;\n  }\n  if ('maxOutputTokens' in config && typeof config.maxOutputTokens === 'number') {\n    attributes[GEN_AI_REQUEST_MAX_TOKENS_ATTRIBUTE] = config.maxOutputTokens;\n  }\n  if ('frequencyPenalty' in config && typeof config.frequencyPenalty === 'number') {\n    attributes[GEN_AI_REQUEST_FREQUENCY_PENALTY_ATTRIBUTE] = config.frequencyPenalty;\n  }\n  if ('presencePenalty' in config && typeof config.presencePenalty === 'number') {\n    attributes[GEN_AI_REQUEST_PRESENCE_PENALTY_ATTRIBUTE] = config.presencePenalty;\n  }\n\n  return attributes;\n}\n\n/**\n * Extract request attributes from method arguments\n * Builds the base attributes for span creation including system info, model, and config\n */\nexport function extractRequestAttributes(\n  operationName: string,\n  params?: Record<string, unknown>,\n  context?: unknown,\n): Record<string, SpanAttributeValue> {\n  const attributes: Record<string, SpanAttributeValue> = {\n    [GEN_AI_SYSTEM_ATTRIBUTE]: GOOGLE_GENAI_SYSTEM_NAME,\n    [GEN_AI_OPERATION_NAME_ATTRIBUTE]: operationName,\n    [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ai.google_genai',\n  };\n\n  if (params) {\n    attributes[GEN_AI_REQUEST_MODEL_ATTRIBUTE] = extractModel(params, context);\n\n    // Extract generation config parameters\n    if ('config' in params && typeof params.config === 'object' && params.config) {\n      const config = params.config as Record<string, unknown>;\n      Object.assign(attributes, extractConfigAttributes(config));\n\n      // Extract available tools from config\n      if ('tools' in config && Array.isArray(config.tools)) {\n        const functionDeclarations = config.tools.flatMap(\n          (tool: { functionDeclarations: unknown[] }) => tool.functionDeclarations,\n        );\n        attributes[GEN_AI_REQUEST_AVAILABLE_TOOLS_ATTRIBUTE] = JSON.stringify(functionDeclarations);\n      }\n    }\n  } else {\n    attributes[GEN_AI_REQUEST_MODEL_ATTRIBUTE] = extractModel({}, context);\n  }\n\n  return attributes;\n}\n\n/**\n * Add private request attributes to spans.\n * This is only recorded if recordInputs is true.\n * Handles different parameter formats for different Google GenAI methods.\n */\nexport function addPrivateRequestAttributes(\n  span: Span,\n  params: Record<string, unknown>,\n  operationName: string,\n  enableTruncation: boolean,\n): void {\n  if (operationName === 'embeddings') {\n    const contents = params.contents;\n    if (contents != null) {\n      span.setAttribute(\n        GEN_AI_EMBEDDINGS_INPUT_ATTRIBUTE,\n        typeof contents === 'string' ? contents : JSON.stringify(contents),\n      );\n    }\n    return;\n  }\n\n  const messages: Message[] = [];\n\n  // config.systemInstruction: ContentUnion\n  if (\n    'config' in params &&\n    params.config &&\n    typeof params.config === 'object' &&\n    'systemInstruction' in params.config &&\n    params.config.systemInstruction\n  ) {\n    messages.push(...contentUnionToMessages(params.config.systemInstruction as ContentUnion, 'system'));\n  }\n\n  // For chats.create: history contains the conversation history\n  if ('history' in params) {\n    messages.push(...contentUnionToMessages(params.history as PartListUnion, 'user'));\n  }\n\n  // For models.generateContent: ContentListUnion\n  if ('contents' in params) {\n    messages.push(...contentUnionToMessages(params.contents as ContentListUnion, 'user'));\n  }\n\n  // For chat.sendMessage: message can be PartListUnion\n  if ('message' in params) {\n    messages.push(...contentUnionToMessages(params.message as PartListUnion, 'user'));\n  }\n\n  if (Array.isArray(messages) && messages.length) {\n    const { systemInstructions, filteredMessages } = extractSystemInstructions(messages);\n\n    if (systemInstructions) {\n      span.setAttribute(GEN_AI_SYSTEM_INSTRUCTIONS_ATTRIBUTE, systemInstructions);\n    }\n\n    const filteredLength = Array.isArray(filteredMessages) ? filteredMessages.length : 0;\n    span.setAttributes({\n      [GEN_AI_INPUT_MESSAGES_ORIGINAL_LENGTH_ATTRIBUTE]: filteredLength,\n      [GEN_AI_INPUT_MESSAGES_ATTRIBUTE]: enableTruncation\n        ? getTruncatedJsonString(filteredMessages)\n        : stringify(filteredMessages),\n    });\n  }\n}\n\n/**\n * Add response attributes from the Google GenAI response\n * @see https://github.com/googleapis/js-genai/blob/v1.19.0/src/types.ts#L2313\n */\nexport function addResponseAttributes(span: Span, response: GoogleGenAIResponse, recordOutputs?: boolean): void {\n  if (!response || typeof response !== 'object') return;\n\n  if (response.modelVersion) {\n    span.setAttribute(GEN_AI_RESPONSE_MODEL_ATTRIBUTE, response.modelVersion);\n  }\n\n  // Add usage metadata if present\n  if (response.usageMetadata && typeof response.usageMetadata === 'object') {\n    const usage = response.usageMetadata;\n    if (typeof usage.promptTokenCount === 'number') {\n      span.setAttributes({\n        [GEN_AI_USAGE_INPUT_TOKENS_ATTRIBUTE]: usage.promptTokenCount,\n      });\n    }\n    if (typeof usage.candidatesTokenCount === 'number') {\n      span.setAttributes({\n        [GEN_AI_USAGE_OUTPUT_TOKENS_ATTRIBUTE]: usage.candidatesTokenCount,\n      });\n    }\n    if (typeof usage.totalTokenCount === 'number') {\n      span.setAttributes({\n        [GEN_AI_USAGE_TOTAL_TOKENS_ATTRIBUTE]: usage.totalTokenCount,\n      });\n    }\n  }\n\n  // Add response text if recordOutputs is enabled\n  if (recordOutputs && Array.isArray(response.candidates) && response.candidates.length > 0) {\n    const responseTexts = response.candidates\n      .map((candidate: Candidate) => {\n        if (candidate.content?.parts && Array.isArray(candidate.content.parts)) {\n          return candidate.content.parts\n            .map((part: ContentPart) => (typeof part.text === 'string' ? part.text : ''))\n            .filter((text: string) => text.length > 0)\n            .join('');\n        }\n        return '';\n      })\n      .filter((text: string) => text.length > 0);\n\n    if (responseTexts.length > 0) {\n      span.setAttributes({\n        [GEN_AI_RESPONSE_TEXT_ATTRIBUTE]: responseTexts.join(''),\n      });\n    }\n  }\n\n  // Add tool calls if recordOutputs is enabled\n  if (recordOutputs && response.functionCalls) {\n    const functionCalls = response.functionCalls;\n    if (Array.isArray(functionCalls) && functionCalls.length > 0) {\n      span.setAttributes({\n        [GEN_AI_RESPONSE_TOOL_CALLS_ATTRIBUTE]: JSON.stringify(functionCalls),\n      });\n    }\n  }\n}\n\n/**\n * Instrument any async or synchronous genai method with Sentry spans\n * Handles operations like models.generateContent and chat.sendMessage and chats.create\n * @see https://docs.sentry.io/platforms/javascript/guides/node/tracing/instrumentation/ai-agents-module/#manual-instrumentation\n */\nfunction instrumentMethod<T extends unknown[], R>(\n  originalMethod: (...args: T) => R | Promise<R>,\n  methodPath: string,\n  instrumentedMethod: InstrumentedMethodEntry,\n  context: unknown,\n  options: GoogleGenAIOptions,\n): (...args: T) => R | Promise<R> {\n  const isEmbeddings = instrumentedMethod.operation === 'embeddings';\n\n  return new Proxy(originalMethod, {\n    apply(target, _, args: T): R | Promise<R> {\n      const operationName = instrumentedMethod.operation || 'unknown';\n      const params = args[0] as Record<string, unknown> | undefined;\n      const requestAttributes = extractRequestAttributes(operationName, params, context);\n      const model = requestAttributes[GEN_AI_REQUEST_MODEL_ATTRIBUTE] ?? 'unknown';\n\n      // Check if this is a streaming method\n      if (instrumentedMethod.streaming) {\n        // Use startSpanManual for streaming methods to control span lifecycle\n        return startSpanManual(\n          {\n            name: `${operationName} ${model}`,\n            op: `gen_ai.${operationName}`,\n            attributes: requestAttributes,\n          },\n          async (span: Span) => {\n            try {\n              if (options.recordInputs && params) {\n                addPrivateRequestAttributes(\n                  span,\n                  params,\n                  operationName,\n                  shouldEnableTruncation(options.enableTruncation),\n                );\n              }\n              const stream = await target.apply(context, args);\n              return instrumentStream(stream, span, Boolean(options.recordOutputs)) as R;\n            } catch (error) {\n              span.setStatus({ code: SPAN_STATUS_ERROR, message: 'internal_error' });\n              span.end();\n              throw error;\n            }\n          },\n        );\n      }\n      // Single span for both sync and async operations\n      return startSpan(\n        {\n          name: `${operationName} ${model}`,\n          op: `gen_ai.${operationName}`,\n          attributes: requestAttributes,\n        },\n        (span: Span) => {\n          if (options.recordInputs && params) {\n            addPrivateRequestAttributes(span, params, operationName, shouldEnableTruncation(options.enableTruncation));\n          }\n\n          // `onError` is a no-op because the rejection is rethrown to the caller and `startSpan` already\n          // marks the span errored; both leading callbacks are positional and only exist to reach `onSuccess`.\n          return handleCallbackErrors(\n            () => target.apply(context, args),\n            () => {},\n            () => {},\n            result => {\n              // Only add response attributes for content-producing methods, not for embeddings\n              if (!isEmbeddings) {\n                addResponseAttributes(span, result, options.recordOutputs);\n              }\n            },\n          );\n        },\n      );\n    },\n  }) as (...args: T) => R | Promise<R>;\n}\n\n/**\n * Create a deep proxy for Google GenAI client instrumentation\n * Recursively instruments methods and handles special cases like chats.create\n */\nfunction createDeepProxy<T extends object>(target: T, currentPath = '', options: GoogleGenAIOptions): T {\n  return new Proxy(target, {\n    get: (t, prop, receiver) => {\n      const value = Reflect.get(t, prop, receiver);\n      const methodPath = buildMethodPath(currentPath, String(prop));\n\n      const instrumentedMethod: InstrumentedMethodEntry | undefined =\n        GOOGLE_GENAI_METHOD_REGISTRY[methodPath as keyof typeof GOOGLE_GENAI_METHOD_REGISTRY];\n      if (typeof value === 'function' && instrumentedMethod) {\n        // If an operation is specified, we need to instrument the method itself\n        const wrappedMethod = instrumentedMethod.operation\n          ? instrumentMethod(value as (...args: unknown[]) => unknown, methodPath, instrumentedMethod, t, options)\n          : value.bind(t);\n\n        if (!instrumentedMethod.proxyResultPath) {\n          return wrappedMethod;\n        }\n\n        // If a proxyResultPath is specified, we need to proxy the result of the method.\n        // Note: This currently only properly handles synchronous methods. For async methods,\n        // the Promise itself would be proxied instead of the resolved value. Currently we\n        // don't have a case where this is needed, so I'll keep it simple for now.\n        return function (...args: unknown[]): unknown {\n          const result = wrappedMethod(...args);\n          if (result && typeof result === 'object') {\n            return createDeepProxy(result as object, instrumentedMethod.proxyResultPath, options);\n          }\n          return result;\n        };\n      }\n\n      if (typeof value === 'function') {\n        // Bind non-instrumented functions to preserve the original `this` context\n        return value.bind(t);\n      }\n\n      if (value && typeof value === 'object') {\n        return createDeepProxy(value, methodPath, options);\n      }\n\n      return value;\n    },\n  });\n}\n\n/**\n * Instrument a Google GenAI client with Sentry tracing\n * Can be used across Node.js, Cloudflare Workers, and Vercel Edge\n *\n * @template T - The type of the client that extends client object\n * @param client - The Google GenAI client to instrument\n * @param options - Optional configuration for recording inputs and outputs\n * @returns The instrumented client with the same type as the input\n *\n * @example\n * ```typescript\n * import { GoogleGenAI } from '@google/genai';\n * import { instrumentGoogleGenAIClient } from '@sentry/core';\n *\n * const genAI = new GoogleGenAI({ apiKey: process.env.GOOGLE_GENAI_API_KEY });\n * const instrumentedClient = instrumentGoogleGenAIClient(genAI);\n *\n * // Now both chats.create and sendMessage will be instrumented\n * const chat = instrumentedClient.chats.create({ model: 'gemini-1.5-pro' });\n * const response = await chat.sendMessage({ message: 'Hello' });\n * ```\n */\nexport function instrumentGoogleGenAIClient<T extends object>(client: T, options?: GoogleGenAIOptions): T {\n  return createDeepProxy(client, '', resolveAIRecordingOptions(options));\n}\n", "export const LANGCHAIN_INTEGRATION_NAME = 'LangChain' as const;\nexport const LANGCHAIN_ORIGIN = 'auto.ai.langchain';\n\nexport const ROLE_MAP: Record<string, string> = {\n  human: 'user',\n  ai: 'assistant',\n  assistant: 'assistant',\n  system: 'system',\n  function: 'function',\n  tool: 'tool',\n};\n", "import { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '../../semanticAttributes';\nimport type { SpanAttributeValue } from '../../types/span';\nimport { stringify } from '../../utils/string';\nimport {\n  GEN_AI_AGENT_NAME_ATTRIBUTE,\n  GEN_AI_INPUT_MESSAGES_ATTRIBUTE,\n  GEN_AI_INPUT_MESSAGES_ORIGINAL_LENGTH_ATTRIBUTE,\n  GEN_AI_OPERATION_NAME_ATTRIBUTE,\n  GEN_AI_REQUEST_FREQUENCY_PENALTY_ATTRIBUTE,\n  GEN_AI_REQUEST_MAX_TOKENS_ATTRIBUTE,\n  GEN_AI_REQUEST_MODEL_ATTRIBUTE,\n  GEN_AI_REQUEST_PRESENCE_PENALTY_ATTRIBUTE,\n  GEN_AI_REQUEST_STREAM_ATTRIBUTE,\n  GEN_AI_REQUEST_TEMPERATURE_ATTRIBUTE,\n  GEN_AI_REQUEST_TOP_P_ATTRIBUTE,\n  GEN_AI_RESPONSE_FINISH_REASONS_ATTRIBUTE,\n  GEN_AI_RESPONSE_ID_ATTRIBUTE,\n  GEN_AI_RESPONSE_MODEL_ATTRIBUTE,\n  GEN_AI_RESPONSE_STOP_REASON_ATTRIBUTE,\n  GEN_AI_RESPONSE_TEXT_ATTRIBUTE,\n  GEN_AI_RESPONSE_TOOL_CALLS_ATTRIBUTE,\n  GEN_AI_SYSTEM_ATTRIBUTE,\n  GEN_AI_SYSTEM_INSTRUCTIONS_ATTRIBUTE,\n  GEN_AI_USAGE_CACHE_CREATION_INPUT_TOKENS_ATTRIBUTE,\n  GEN_AI_USAGE_CACHE_READ_INPUT_TOKENS_ATTRIBUTE,\n  GEN_AI_USAGE_INPUT_TOKENS_ATTRIBUTE,\n  GEN_AI_USAGE_OUTPUT_TOKENS_ATTRIBUTE,\n  GEN_AI_USAGE_TOTAL_TOKENS_ATTRIBUTE,\n} from '../ai/gen-ai-attributes';\nimport { isContentMedia, stripInlineMediaFromSingleMessage } from '../ai/mediaStripping';\nimport { extractSystemInstructions, getTruncatedJsonString } from '../ai/utils';\nimport { LANGCHAIN_ORIGIN, ROLE_MAP } from './constants';\nimport type { LangChainLLMResult, LangChainMessage, LangChainSerialized } from './types';\n\n/**\n * Assigns an attribute only when the value is neither `undefined` nor `null`.\n *\n * We keep this tiny helper because call sites are repetitive and easy to miswrite.\n * It also preserves falsy-but-valid values like `0` and `\"\"`.\n */\nconst setIfDefined = (target: Record<string, SpanAttributeValue | undefined>, key: string, value: unknown): void => {\n  if (value != null) target[key] = value as SpanAttributeValue;\n};\n\n/**\n * Like `setIfDefined`, but converts the value with `Number()` and skips only when the\n * result is `NaN`. This ensures numeric 0 makes it through (unlike truthy checks).\n */\nconst setNumberIfDefined = (\n  target: Record<string, SpanAttributeValue | undefined>,\n  key: string,\n  value: unknown,\n): void => {\n  const n = Number(value);\n  if (!Number.isNaN(n)) target[key] = n;\n};\n\n/**\n * Converts message content to a string, stripping inline media (base64 images, audio, etc.)\n * from multimodal content before stringification so downstream media stripping can't miss it.\n *\n * @example\n * // String content passes through unchanged:\n * normalizeContent(\"Hello\") // => \"Hello\"\n *\n * // Multimodal array content — media is replaced with \"[Blob substitute]\" before JSON.stringify:\n * normalizeContent([\n *   { type: \"text\", text: \"What color?\" },\n *   { type: \"image_url\", image_url: { url: \"data:image/png;base64,iVBOR...\" } }\n * ])\n * // => '[{\"type\":\"text\",\"text\":\"What color?\"},{\"type\":\"image_url\",\"image_url\":{\"url\":\"[Blob substitute]\"}}]'\n *\n * // Without this, stringification would JSON.stringify the raw array and the base64 blob\n * // would end up in span attributes, since downstream stripping only works on objects.\n */\nfunction normalizeContent(v: unknown): string | undefined {\n  if (Array.isArray(v)) {\n    try {\n      const stripped = v.map(part =>\n        part && typeof part === 'object' && isContentMedia(part) ? stripInlineMediaFromSingleMessage(part) : part,\n      );\n      return JSON.stringify(stripped);\n    } catch {\n      return String(v);\n    }\n  }\n  return stringify(v, String);\n}\n\n/**\n * Normalizes a single role token to our canonical set.\n *\n * @param role Incoming role value (free-form, any casing)\n * @returns Canonical role: 'user' | 'assistant' | 'system' | 'function' | 'tool' | <passthrough>\n */\nfunction normalizeMessageRole(role: string): string {\n  const normalized = role.toLowerCase();\n  return ROLE_MAP[normalized] ?? normalized;\n}\n\n/**\n * Infers a role from a LangChain message constructor name.\n *\n * Checks for substrings like \"System\", \"Human\", \"AI\", etc.\n */\nfunction normalizeRoleNameFromCtor(name: string): string {\n  if (name.includes('System')) return 'system';\n  if (name.includes('Human')) return 'user';\n  if (name.includes('AI') || name.includes('Assistant')) return 'assistant';\n  if (name.includes('Function')) return 'function';\n  if (name.includes('Tool')) return 'tool';\n  return 'user';\n}\n\n/**\n * Returns invocation params from a LangChain `tags` object.\n *\n * LangChain often passes runtime parameters (model, temperature, etc.) via the\n * `tags.invocation_params` bag. If `tags` is an array (LangChain sometimes uses\n * string tags), we return `undefined`.\n *\n * @param tags LangChain tags (string[] or record)\n * @returns The `invocation_params` object, if present\n */\nexport function getInvocationParams(tags?: string[] | Record<string, unknown>): Record<string, unknown> | undefined {\n  if (!tags || Array.isArray(tags)) return undefined;\n  return tags.invocation_params as Record<string, unknown> | undefined;\n}\n\n/**\n * Normalizes a heterogeneous set of LangChain messages to `{ role, content }`.\n *\n * Why so many branches? LangChain messages can arrive in several shapes:\n *  - Message classes with `_getType()` (most reliable)\n *  - Classes with meaningful constructor names (e.g. `SystemMessage`)\n *  - Plain objects with `type`, or `{ role, content }`\n *  - Serialized format with `{ lc: 1, id: [...], kwargs: { content } }`\n * We preserve the prioritization to minimize behavioral drift.\n *\n * @param messages Mixed LangChain messages\n * @returns Array of normalized `{ role, content }`\n */\nexport function normalizeLangChainMessages(\n  messages: LangChainMessage[],\n): Array<{ role: string; content: string | undefined }> {\n  return messages.map(message => {\n    // 1) Prefer _getType() when present\n    const maybeGetType = (message as { _getType?: () => string })._getType;\n    if (typeof maybeGetType === 'function') {\n      const messageType = maybeGetType.call(message);\n      return {\n        role: normalizeMessageRole(messageType),\n        content: normalizeContent(message.content),\n      };\n    }\n\n    // 2) Serialized LangChain format (lc: 1) - check before constructor name\n    // This is more reliable than constructor.name which can be lost during serialization\n    if (message.lc === 1 && message.kwargs) {\n      const id = message.id;\n      const messageType = Array.isArray(id) && id.length > 0 ? id[id.length - 1] : '';\n      const role = typeof messageType === 'string' ? normalizeRoleNameFromCtor(messageType) : 'user';\n\n      return {\n        role: normalizeMessageRole(role),\n        content: normalizeContent(message.kwargs?.content),\n      };\n    }\n\n    // 3) Then objects with `type`\n    if (message.type) {\n      const role = String(message.type).toLowerCase();\n      return {\n        role: normalizeMessageRole(role),\n        content: normalizeContent(message.content),\n      };\n    }\n\n    // 4) Then objects with `{ role, content }` - check before constructor name\n    // Plain objects have constructor.name=\"Object\" which would incorrectly default to \"user\"\n    if (message.role) {\n      return {\n        role: normalizeMessageRole(String(message.role)),\n        content: normalizeContent(message.content),\n      };\n    }\n\n    // 5) Then try constructor name (SystemMessage / HumanMessage / ...)\n    // Only use this if we haven't matched a more specific case\n    const ctor = (message as { constructor?: { name?: string } }).constructor?.name;\n    if (ctor && ctor !== 'Object') {\n      return {\n        role: normalizeMessageRole(normalizeRoleNameFromCtor(ctor)),\n        content: normalizeContent(message.content),\n      };\n    }\n\n    // 6) Fallback: treat as user text\n    return {\n      role: 'user',\n      content: normalizeContent(message.content),\n    };\n  });\n}\n\n/**\n * Extracts request attributes common to both LLM and ChatModel invocations.\n *\n * Source precedence:\n * 1) `invocationParams` (highest)\n * 2) `langSmithMetadata`\n *\n * Numeric values are set even when 0 (e.g. `temperature: 0`), but skipped if `NaN`.\n */\nfunction extractCommonRequestAttributes(\n  serialized: LangChainSerialized,\n  invocationParams?: Record<string, unknown>,\n  langSmithMetadata?: Record<string, unknown>,\n): Record<string, SpanAttributeValue> {\n  const attrs: Record<string, SpanAttributeValue> = {};\n\n  // Get kwargs if available (from constructor type)\n  const kwargs = 'kwargs' in serialized ? serialized.kwargs : undefined;\n\n  const temperature = invocationParams?.temperature ?? langSmithMetadata?.ls_temperature ?? kwargs?.temperature;\n  setNumberIfDefined(attrs, GEN_AI_REQUEST_TEMPERATURE_ATTRIBUTE, temperature);\n\n  const maxTokens = invocationParams?.max_tokens ?? langSmithMetadata?.ls_max_tokens ?? kwargs?.max_tokens;\n  setNumberIfDefined(attrs, GEN_AI_REQUEST_MAX_TOKENS_ATTRIBUTE, maxTokens);\n\n  const topP = invocationParams?.top_p ?? kwargs?.top_p;\n  setNumberIfDefined(attrs, GEN_AI_REQUEST_TOP_P_ATTRIBUTE, topP);\n\n  const frequencyPenalty = invocationParams?.frequency_penalty;\n  setNumberIfDefined(attrs, GEN_AI_REQUEST_FREQUENCY_PENALTY_ATTRIBUTE, frequencyPenalty);\n\n  const presencePenalty = invocationParams?.presence_penalty;\n  setNumberIfDefined(attrs, GEN_AI_REQUEST_PRESENCE_PENALTY_ATTRIBUTE, presencePenalty);\n\n  // LangChain uses `stream`. We only set the attribute if the key actually exists\n  // (some callbacks report `false` even on streamed requests, this stems from LangChain's callback handler).\n  if (invocationParams && 'stream' in invocationParams) {\n    setIfDefined(attrs, GEN_AI_REQUEST_STREAM_ATTRIBUTE, Boolean(invocationParams.stream));\n  }\n\n  return attrs;\n}\n\n/**\n * Small helper to assemble boilerplate attributes shared by both request extractors.\n * Always uses 'chat' as the operation type for all LLM and chat model operations.\n */\nfunction baseRequestAttributes(\n  system: unknown,\n  modelName: unknown,\n  serialized: LangChainSerialized,\n  invocationParams?: Record<string, unknown>,\n  langSmithMetadata?: Record<string, unknown>,\n): Record<string, SpanAttributeValue | undefined> {\n  return {\n    [GEN_AI_SYSTEM_ATTRIBUTE]: stringify(system ?? 'langchain', String),\n    [GEN_AI_OPERATION_NAME_ATTRIBUTE]: 'chat',\n    [GEN_AI_REQUEST_MODEL_ATTRIBUTE]: stringify(modelName, String),\n    [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: LANGCHAIN_ORIGIN,\n    ...extractCommonRequestAttributes(serialized, invocationParams, langSmithMetadata),\n  };\n}\n\n/**\n * Extracts attributes for plain LLM invocations (string prompts).\n *\n * - Operation is tagged as `chat` following OpenTelemetry semantic conventions.\n *   LangChain LLM operations are treated as chat operations.\n * - When `recordInputs` is true, string prompts are wrapped into `{role:\"user\"}`\n *   messages to align with the chat schema used elsewhere.\n */\nexport function extractLLMRequestAttributes(\n  llm: LangChainSerialized,\n  prompts: string[],\n  recordInputs: boolean,\n  enableTruncation: boolean,\n  invocationParams?: Record<string, unknown>,\n  langSmithMetadata?: Record<string, unknown>,\n): Record<string, SpanAttributeValue | undefined> {\n  const system = langSmithMetadata?.ls_provider;\n  const modelName = invocationParams?.model ?? langSmithMetadata?.ls_model_name ?? 'unknown';\n\n  const attrs = baseRequestAttributes(system, modelName, llm, invocationParams, langSmithMetadata);\n\n  if (recordInputs && Array.isArray(prompts) && prompts.length > 0) {\n    setIfDefined(attrs, GEN_AI_INPUT_MESSAGES_ORIGINAL_LENGTH_ATTRIBUTE, prompts.length);\n    const messages = prompts.map(p => ({ role: 'user', content: p }));\n    setIfDefined(\n      attrs,\n      GEN_AI_INPUT_MESSAGES_ATTRIBUTE,\n      enableTruncation ? getTruncatedJsonString(messages) : stringify(messages),\n    );\n  }\n\n  return attrs;\n}\n\n/**\n * Extracts attributes for ChatModel invocations (array-of-arrays of messages).\n *\n * - Operation is tagged as `chat` following OpenTelemetry semantic conventions.\n *   LangChain chat model operations are chat operations.\n * - We flatten LangChain's `LangChainMessage[][]` and normalize shapes into a\n *   consistent `{ role, content }` array when `recordInputs` is true.\n * - Provider system value falls back to `serialized.id?.[2]`.\n */\nexport function extractChatModelRequestAttributes(\n  llm: LangChainSerialized,\n  langChainMessages: LangChainMessage[][],\n  recordInputs: boolean,\n  enableTruncation: boolean,\n  invocationParams?: Record<string, unknown>,\n  langSmithMetadata?: Record<string, unknown>,\n): Record<string, SpanAttributeValue | undefined> {\n  const system = langSmithMetadata?.ls_provider ?? llm.id?.[2];\n  const modelName = invocationParams?.model ?? langSmithMetadata?.ls_model_name ?? 'unknown';\n\n  const attrs = baseRequestAttributes(system, modelName, llm, invocationParams, langSmithMetadata);\n\n  if (recordInputs && Array.isArray(langChainMessages) && langChainMessages.length > 0) {\n    const normalized = normalizeLangChainMessages(langChainMessages.flat());\n\n    const { systemInstructions, filteredMessages } = extractSystemInstructions(normalized);\n\n    if (systemInstructions) {\n      setIfDefined(attrs, GEN_AI_SYSTEM_INSTRUCTIONS_ATTRIBUTE, systemInstructions);\n    }\n\n    const filteredLength = Array.isArray(filteredMessages) ? filteredMessages.length : 0;\n    setIfDefined(attrs, GEN_AI_INPUT_MESSAGES_ORIGINAL_LENGTH_ATTRIBUTE, filteredLength);\n\n    setIfDefined(\n      attrs,\n      GEN_AI_INPUT_MESSAGES_ATTRIBUTE,\n      enableTruncation ? getTruncatedJsonString(filteredMessages) : stringify(filteredMessages),\n    );\n  }\n\n  return attrs;\n}\n\n/**\n * Extracts tool calls from generations and records them on the span attributes.\n * Prefers message.tool_calls (LangChain's normalized format). Falls back to\n * scanning message.content for Anthropic-style tool_use items in older versions\n * where tool_calls may not be populated.\n */\nfunction addToolCallsAttributes(generations: LangChainMessage[][], attrs: Record<string, SpanAttributeValue>): void {\n  const toolCalls: unknown[] = [];\n  const flatGenerations = generations.flat();\n\n  for (const gen of flatGenerations) {\n    const msg = gen.message as Record<string, unknown> | undefined;\n    const msgToolCalls = msg?.tool_calls as unknown[] | undefined;\n    if (Array.isArray(msgToolCalls) && msgToolCalls.length > 0) {\n      toolCalls.push(...msgToolCalls);\n    } else {\n      // Fallback for older LangChain versions: scan message.content for Anthropic-style tool_use\n      const content = gen.message?.content;\n      if (Array.isArray(content)) {\n        for (const item of content) {\n          const t = item as Record<string, unknown>;\n          if (t.type === 'tool_use') toolCalls.push(t);\n        }\n      }\n    }\n  }\n\n  if (toolCalls.length > 0) {\n    setIfDefined(attrs, GEN_AI_RESPONSE_TOOL_CALLS_ATTRIBUTE, stringify(toolCalls, String));\n  }\n}\n\n/**\n * Adds token usage attributes, supporting both OpenAI (`tokenUsage`) and Anthropic (`usage`) formats.\n * - Preserve zero values (0 tokens) by avoiding truthy checks.\n * - Compute a total for Anthropic when not explicitly provided.\n * - Include cache token metrics when present.\n */\nfunction addTokenUsageAttributes(\n  llmOutput: LangChainLLMResult['llmOutput'],\n  attrs: Record<string, SpanAttributeValue>,\n): void {\n  if (!llmOutput) return;\n\n  const tokenUsage = llmOutput.tokenUsage as\n    | { promptTokens?: number; completionTokens?: number; totalTokens?: number }\n    | undefined;\n  const anthropicUsage = llmOutput.usage as\n    | {\n        input_tokens?: number;\n        output_tokens?: number;\n        cache_creation_input_tokens?: number;\n        cache_read_input_tokens?: number;\n      }\n    | undefined;\n\n  if (tokenUsage) {\n    setNumberIfDefined(attrs, GEN_AI_USAGE_INPUT_TOKENS_ATTRIBUTE, tokenUsage.promptTokens);\n    setNumberIfDefined(attrs, GEN_AI_USAGE_OUTPUT_TOKENS_ATTRIBUTE, tokenUsage.completionTokens);\n    setNumberIfDefined(attrs, GEN_AI_USAGE_TOTAL_TOKENS_ATTRIBUTE, tokenUsage.totalTokens);\n  } else if (anthropicUsage) {\n    setNumberIfDefined(attrs, GEN_AI_USAGE_INPUT_TOKENS_ATTRIBUTE, anthropicUsage.input_tokens);\n    setNumberIfDefined(attrs, GEN_AI_USAGE_OUTPUT_TOKENS_ATTRIBUTE, anthropicUsage.output_tokens);\n\n    // Compute total when not provided by the provider.\n    const input = Number(anthropicUsage.input_tokens);\n    const output = Number(anthropicUsage.output_tokens);\n    const total = (Number.isNaN(input) ? 0 : input) + (Number.isNaN(output) ? 0 : output);\n    if (total > 0) setNumberIfDefined(attrs, GEN_AI_USAGE_TOTAL_TOKENS_ATTRIBUTE, total);\n\n    // Extra Anthropic cache metrics (present only when caching is enabled)\n    if (anthropicUsage.cache_creation_input_tokens !== undefined)\n      setNumberIfDefined(\n        attrs,\n        GEN_AI_USAGE_CACHE_CREATION_INPUT_TOKENS_ATTRIBUTE,\n        anthropicUsage.cache_creation_input_tokens,\n      );\n    if (anthropicUsage.cache_read_input_tokens !== undefined)\n      setNumberIfDefined(attrs, GEN_AI_USAGE_CACHE_READ_INPUT_TOKENS_ATTRIBUTE, anthropicUsage.cache_read_input_tokens);\n  }\n}\n\n/**\n * Extracts response-related attributes based on a `LangChainLLMResult`.\n *\n * - Records finish reasons when present on generations (e.g., OpenAI)\n * - When `recordOutputs` is true, captures textual response content and any\n *   tool calls.\n * - Also propagates model name (`model_name` or `model`), response `id`, and\n *   `stop_reason` (for providers that use it).\n */\nexport function extractLlmResponseAttributes(\n  llmResult: LangChainLLMResult,\n  recordOutputs: boolean,\n): Record<string, SpanAttributeValue> | undefined {\n  if (!llmResult) return;\n\n  const attrs: Record<string, SpanAttributeValue> = {};\n\n  if (Array.isArray(llmResult.generations)) {\n    const finishReasons = llmResult.generations\n      .flat()\n      .map(g => {\n        // v1 uses generationInfo.finish_reason\n        if (g.generationInfo?.finish_reason) {\n          return g.generationInfo.finish_reason;\n        }\n        // v0.3+ uses generation_info.finish_reason\n        if (g.generation_info?.finish_reason) {\n          return g.generation_info.finish_reason;\n        }\n        return null;\n      })\n      .filter((r): r is string => typeof r === 'string');\n\n    if (finishReasons.length > 0) {\n      setIfDefined(attrs, GEN_AI_RESPONSE_FINISH_REASONS_ATTRIBUTE, stringify(finishReasons, String));\n    }\n\n    // Tool calls metadata (names, IDs) are not PII, so capture them regardless of recordOutputs\n    addToolCallsAttributes(llmResult.generations as LangChainMessage[][], attrs);\n\n    if (recordOutputs) {\n      const texts = llmResult.generations\n        .flat()\n        .map(gen => gen.text ?? gen.message?.content)\n        .filter(t => typeof t === 'string');\n\n      if (texts.length > 0) {\n        setIfDefined(attrs, GEN_AI_RESPONSE_TEXT_ATTRIBUTE, stringify(texts, String));\n      }\n    }\n  }\n\n  addTokenUsageAttributes(llmResult.llmOutput, attrs);\n\n  const llmOutput = llmResult.llmOutput;\n\n  // Extract from v1 generations structure if available\n  const firstGeneration = llmResult.generations?.[0]?.[0];\n  const v1Message = firstGeneration?.message;\n\n  // Provider model identifier: `model_name` (OpenAI-style) or `model` (others)\n  // v1 stores this in message.response_metadata.model_name\n  const modelName = llmOutput?.model_name ?? llmOutput?.model ?? v1Message?.response_metadata?.model_name;\n  if (modelName) setIfDefined(attrs, GEN_AI_RESPONSE_MODEL_ATTRIBUTE, modelName);\n\n  // Response ID: v1 stores this in message.id\n  const responseId = llmOutput?.id ?? v1Message?.id;\n  if (responseId) {\n    setIfDefined(attrs, GEN_AI_RESPONSE_ID_ATTRIBUTE, responseId);\n  }\n\n  // Stop reason: v1 stores this in message.response_metadata.finish_reason\n  const stopReason = llmOutput?.stop_reason ?? v1Message?.response_metadata?.finish_reason;\n  if (stopReason) {\n    setIfDefined(attrs, GEN_AI_RESPONSE_STOP_REASON_ATTRIBUTE, stringify(stopReason, String));\n  }\n\n  return attrs;\n}\n\nexport function getAgentNameFromMetadata(metadata?: Record<string, unknown>): Record<string, SpanAttributeValue> {\n  const attrs: Record<string, SpanAttributeValue> = {};\n  // lc_agent_name is injected by instrumentCompiledGraphInvoke (langgraph integration)\n  const agentName = metadata?.lc_agent_name;\n  if (typeof agentName === 'string') {\n    attrs[GEN_AI_AGENT_NAME_ATTRIBUTE] = agentName;\n  }\n  return attrs;\n}\n\nexport function extractToolDefinitions(extraParams?: Record<string, unknown>): string | undefined {\n  const tools =\n    (extraParams?.invocation_params as Record<string, unknown>)?.tools ??\n    (extraParams?.options as Record<string, unknown>)?.tools;\n  if (!Array.isArray(tools) || tools.length === 0) return undefined;\n  const toolDefs = tools.map((tool: Record<string, unknown>) => {\n    const fn = tool.function as Record<string, unknown> | undefined;\n    return {\n      type: 'function',\n      name: tool.name ?? fn?.name ?? '',\n      description: tool.description ?? fn?.description,\n    };\n  });\n  return JSON.stringify(toolDefs);\n}\n\n/** Duck-types a LangChain `CallbackManager` (avoids coupling to a specific `@langchain/core` resolution). */\nfunction isCallbackManager(value: unknown): value is {\n  addHandler: (handler: unknown, inherit?: boolean) => void;\n  copy: () => unknown;\n  handlers?: unknown[];\n} {\n  if (!value || typeof value !== 'object') {\n    return false;\n  }\n  const candidate = value as { addHandler?: unknown; copy?: unknown };\n  return typeof candidate.addHandler === 'function' && typeof candidate.copy === 'function';\n}\n\nfunction isSentryHandler(handler: unknown): boolean {\n  return typeof handler === 'object' && (handler as Record<string, unknown>)?.name === 'SentryCallbackHandler';\n}\n\nfunction containsSentryHandler(handlers: unknown[]): boolean {\n  return handlers.some(isSentryHandler);\n}\n\n/**\n * Merge `sentryHandler` into a given set of LangChain callbacks or callback manager.\n * @internal Exported for cross-package instrumentation.\n */\nexport function _INTERNAL_mergeLangChainCallbackHandler(existing: unknown, sentryHandler: unknown): unknown {\n  if (!existing) {\n    return [sentryHandler];\n  }\n\n  if (isCallbackManager(existing)) {\n    if (containsSentryHandler(existing.handlers ?? [])) {\n      return existing;\n    }\n\n    const copied = existing.copy() as { addHandler: (handler: unknown, inherit?: boolean) => void };\n    copied.addHandler(sentryHandler, true);\n    return copied;\n  }\n\n  const handlers = Array.isArray(existing) ? existing : [existing];\n  if (containsSentryHandler(handlers)) {\n    return existing;\n  }\n\n  return [...handlers, sentryHandler];\n}\n", "/* eslint-disable max-lines */\nimport { SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '../../semanticAttributes';\nimport { SPAN_STATUS_ERROR } from '../../tracing';\nimport { startSpanManual } from '../../tracing/trace';\nimport type { Span, SpanAttributeValue } from '../../types/span';\nimport {\n  GEN_AI_OPERATION_NAME_ATTRIBUTE,\n  GEN_AI_REQUEST_AVAILABLE_TOOLS_ATTRIBUTE,\n  GEN_AI_REQUEST_MODEL_ATTRIBUTE,\n  GEN_AI_TOOL_INPUT_ATTRIBUTE,\n  GEN_AI_TOOL_NAME_ATTRIBUTE,\n  GEN_AI_TOOL_OUTPUT_ATTRIBUTE,\n} from '../ai/gen-ai-attributes';\nimport { resolveAIRecordingOptions, shouldEnableTruncation } from '../ai/utils';\nimport { LANGCHAIN_ORIGIN } from './constants';\nimport type {\n  LangChainCallbackHandler,\n  LangChainLLMResult,\n  LangChainMessage,\n  LangChainOptions,\n  LangChainSerialized,\n} from './types';\nimport {\n  extractChatModelRequestAttributes,\n  extractLLMRequestAttributes,\n  extractLlmResponseAttributes,\n  extractToolDefinitions,\n  getAgentNameFromMetadata,\n  getInvocationParams,\n} from './utils';\n\n/**\n * Creates a Sentry callback handler for LangChain\n * Returns a plain object that LangChain will call via duck-typing\n *\n * This is a stateful handler that tracks spans across multiple LangChain executions.\n */\nexport function createLangChainCallbackHandler(options: LangChainOptions = {}): LangChainCallbackHandler {\n  const { recordInputs, recordOutputs } = resolveAIRecordingOptions(options);\n  const enableTruncation = shouldEnableTruncation(options.enableTruncation);\n\n  // Internal state - single instance tracks all spans\n  const spanMap = new Map<string, Span>();\n\n  /**\n   * Exit a span and clean up\n   */\n  const exitSpan = (runId: string): void => {\n    const span = spanMap.get(runId);\n    if (span?.isRecording()) {\n      span.end();\n      spanMap.delete(runId);\n    }\n  };\n\n  /**\n   * Handler for LLM Start\n   * This handler will be called by LangChain's callback handler when an LLM event is detected.\n   */\n  const handler: LangChainCallbackHandler = {\n    // Required LangChain BaseCallbackHandler properties\n    lc_serializable: false,\n    lc_namespace: ['langchain_core', 'callbacks', 'sentry'],\n    lc_secrets: undefined,\n    lc_attributes: undefined,\n    lc_aliases: undefined,\n    lc_serializable_keys: undefined,\n    lc_id: ['langchain_core', 'callbacks', 'sentry'],\n    lc_kwargs: {},\n    name: 'SentryCallbackHandler',\n\n    // BaseCallbackHandlerInput boolean flags\n    ignoreLLM: false,\n    ignoreChain: false,\n    ignoreAgent: false,\n    ignoreRetriever: false,\n    ignoreCustomEvent: false,\n    raiseError: false,\n    awaitHandlers: true,\n\n    handleLLMStart(\n      llm: unknown,\n      prompts: string[],\n      runId: string,\n      _parentRunId?: string,\n      _extraParams?: Record<string, unknown>,\n      tags?: string[],\n      metadata?: Record<string, unknown>,\n      _runName?: string,\n    ) {\n      const invocationParams = getInvocationParams(tags);\n      const attributes = extractLLMRequestAttributes(\n        llm as LangChainSerialized,\n        prompts,\n        recordInputs,\n        enableTruncation,\n        invocationParams,\n        metadata,\n      );\n      const modelName = attributes[GEN_AI_REQUEST_MODEL_ATTRIBUTE];\n      const operationName = attributes[GEN_AI_OPERATION_NAME_ATTRIBUTE];\n\n      startSpanManual(\n        {\n          name: `${operationName} ${modelName}`,\n          op: 'gen_ai.chat',\n          attributes: {\n            ...getAgentNameFromMetadata(metadata),\n            ...attributes,\n            [SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'gen_ai.chat',\n          },\n        },\n        span => {\n          spanMap.set(runId, span);\n          return span;\n        },\n      );\n    },\n\n    // Chat Model Start Handler\n    handleChatModelStart(\n      llm: unknown,\n      messages: unknown,\n      runId: string,\n      _parentRunId?: string,\n      extraParams?: Record<string, unknown>,\n      tags?: string[],\n      metadata?: Record<string, unknown>,\n      _runName?: string,\n    ) {\n      const invocationParams = getInvocationParams(tags);\n      const attributes = extractChatModelRequestAttributes(\n        llm as LangChainSerialized,\n        messages as LangChainMessage[][],\n        recordInputs,\n        enableTruncation,\n        invocationParams,\n        metadata,\n      );\n\n      const toolDefsJson = extractToolDefinitions(extraParams);\n      if (toolDefsJson) {\n        attributes[GEN_AI_REQUEST_AVAILABLE_TOOLS_ATTRIBUTE] = toolDefsJson;\n      }\n\n      const modelName = attributes[GEN_AI_REQUEST_MODEL_ATTRIBUTE];\n      const operationName = attributes[GEN_AI_OPERATION_NAME_ATTRIBUTE];\n\n      startSpanManual(\n        {\n          name: `${operationName} ${modelName}`,\n          op: 'gen_ai.chat',\n          attributes: {\n            ...getAgentNameFromMetadata(metadata),\n            ...attributes,\n            [SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'gen_ai.chat',\n          },\n        },\n        span => {\n          spanMap.set(runId, span);\n          return span;\n        },\n      );\n    },\n\n    // LLM End Handler - note: handleLLMEnd with capital LLM (used by both LLMs and chat models!)\n    handleLLMEnd(\n      output: unknown,\n      runId: string,\n      _parentRunId?: string,\n      _tags?: string[],\n      _extraParams?: Record<string, unknown>,\n    ) {\n      const span = spanMap.get(runId);\n      if (span?.isRecording()) {\n        const attributes = extractLlmResponseAttributes(output as LangChainLLMResult, recordOutputs);\n        if (attributes) {\n          span.setAttributes(attributes);\n        }\n        exitSpan(runId);\n      }\n    },\n\n    // LLM Error Handler - note: handleLLMError with capital LLM\n    handleLLMError(_error: Error, runId: string) {\n      // The error is surfaced to the caller (invoke() rejects), so we only mark the span failed and\n      // do not record it.\n      const span = spanMap.get(runId);\n      if (span?.isRecording()) {\n        span.setStatus({ code: SPAN_STATUS_ERROR, message: 'internal_error' });\n        exitSpan(runId);\n      }\n    },\n\n    // Chain Start Handler\n    handleChainStart(\n      chain: { name?: string },\n      inputs: Record<string, unknown>,\n      runId: string,\n      _parentRunId?: string,\n      _tags?: string[],\n      metadata?: Record<string, unknown>,\n      _runType?: string,\n      runName?: string,\n    ) {\n      // Skip chain spans when inside an agent context (createReactAgent).\n      // The agent already creates an invoke_agent span; internal chain steps\n      // (ChannelWrite, Branch, prompt, etc.) are noise.\n      if (metadata?.__sentry_langgraph__) {\n        return;\n      }\n\n      const chainName = runName || chain.name || 'unknown_chain';\n      const attributes: Record<string, SpanAttributeValue> = {\n        [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ai.langchain',\n        'langchain.chain.name': chainName,\n      };\n\n      if (recordInputs) {\n        attributes['langchain.chain.inputs'] = JSON.stringify(inputs);\n      }\n\n      startSpanManual(\n        {\n          name: `chain ${chainName}`,\n          op: 'gen_ai.invoke_agent',\n          attributes: {\n            ...attributes,\n            [SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'gen_ai.invoke_agent',\n          },\n        },\n        span => {\n          spanMap.set(runId, span);\n          return span;\n        },\n      );\n    },\n\n    // Chain End Handler\n    handleChainEnd(outputs: unknown, runId: string) {\n      const span = spanMap.get(runId);\n      if (span?.isRecording()) {\n        // Add outputs if recordOutputs is enabled\n        if (recordOutputs) {\n          span.setAttributes({\n            'langchain.chain.outputs': JSON.stringify(outputs),\n          });\n        }\n        exitSpan(runId);\n      }\n    },\n\n    // Chain Error Handler\n    handleChainError(_error: Error, runId: string) {\n      // The error is surfaced to the caller (invoke() rejects), so we only mark the span failed and\n      // do not record it.\n      const span = spanMap.get(runId);\n      if (span?.isRecording()) {\n        span.setStatus({ code: SPAN_STATUS_ERROR, message: 'internal_error' });\n        exitSpan(runId);\n      }\n    },\n\n    // Tool Start Handler\n    handleToolStart(\n      tool: { name?: string },\n      input: string,\n      runId: string,\n      _parentRunId?: string,\n      _tags?: string[],\n      metadata?: Record<string, unknown>,\n      runName?: string,\n    ) {\n      // Skip tool spans when inside an agent context (createReactAgent).\n      // Tool spans are created by wrapToolsWithSpans with richer attributes.\n      if (metadata?.__sentry_langgraph__) {\n        return;\n      }\n\n      // runName is set to tool.name by LangChain's StructuredTool.call()\n      const toolName = runName || tool.name || 'unknown_tool';\n      const attributes: Record<string, SpanAttributeValue> = {\n        ...getAgentNameFromMetadata(metadata),\n        [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: LANGCHAIN_ORIGIN,\n        [GEN_AI_OPERATION_NAME_ATTRIBUTE]: 'execute_tool',\n        [GEN_AI_TOOL_NAME_ATTRIBUTE]: toolName,\n      };\n\n      if (recordInputs) {\n        attributes[GEN_AI_TOOL_INPUT_ATTRIBUTE] = input;\n      }\n\n      startSpanManual(\n        {\n          name: `execute_tool ${toolName}`,\n          op: 'gen_ai.execute_tool',\n          attributes: {\n            ...attributes,\n            [SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'gen_ai.execute_tool',\n          },\n        },\n        span => {\n          spanMap.set(runId, span);\n          return span;\n        },\n      );\n    },\n\n    // Tool End Handler\n    handleToolEnd(output: unknown, runId: string) {\n      const span = spanMap.get(runId);\n      if (span?.isRecording()) {\n        if (recordOutputs) {\n          // LangChain tools may return ToolMessage objects — extract the content\n          const outputObj = output as Record<string, unknown> | undefined;\n          const content =\n            outputObj && typeof outputObj === 'object' && 'content' in outputObj ? outputObj.content : output;\n          span.setAttributes({\n            [GEN_AI_TOOL_OUTPUT_ATTRIBUTE]: typeof content === 'string' ? content : JSON.stringify(content),\n          });\n        }\n        exitSpan(runId);\n      }\n    },\n\n    // Tool Error Handler\n    handleToolError(_error: Error, runId: string) {\n      // The error is surfaced to the caller (invoke() rejects), so we only mark the span failed and\n      // do not record it.\n      const span = spanMap.get(runId);\n      if (span?.isRecording()) {\n        span.setStatus({ code: SPAN_STATUS_ERROR, message: 'internal_error' });\n        exitSpan(runId);\n      }\n    },\n\n    // LangChain BaseCallbackHandler required methods\n    copy() {\n      return handler;\n    },\n\n    toJSON() {\n      return {\n        lc: 1,\n        type: 'not_implemented',\n        id: handler.lc_id,\n      };\n    },\n\n    toJSONNotImplemented() {\n      return {\n        lc: 1,\n        type: 'not_implemented',\n        id: handler.lc_id,\n      };\n    },\n  };\n\n  return handler;\n}\n\nexport { instrumentLangChainEmbeddings } from './embeddings';\n", "import { SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '../../semanticAttributes';\nimport { startSpan } from '../../tracing/trace';\nimport type { SpanAttributeValue } from '../../types/span';\nimport {\n  GEN_AI_EMBEDDINGS_OPERATION_ATTRIBUTE,\n  GEN_AI_EMBEDDINGS_INPUT_ATTRIBUTE,\n  GEN_AI_OPERATION_NAME_ATTRIBUTE,\n  GEN_AI_REQUEST_DIMENSIONS_ATTRIBUTE,\n  GEN_AI_REQUEST_ENCODING_FORMAT_ATTRIBUTE,\n  GEN_AI_REQUEST_MODEL_ATTRIBUTE,\n  GEN_AI_SYSTEM_ATTRIBUTE,\n} from '../ai/gen-ai-attributes';\nimport { resolveAIRecordingOptions } from '../ai/utils';\nimport { LANGCHAIN_ORIGIN } from './constants';\nimport type { LangChainOptions } from './types';\n\n/**\n * Infers the AI provider system name from the embedding class instance.\n */\nfunction inferSystemFromInstance(instance: Record<string, unknown>): string {\n  const name = (instance.constructor as { name?: string })?.name ?? '';\n  if (name.includes('OpenAI')) return 'openai';\n  if (name.includes('Google')) return 'google_genai';\n  if (name.includes('Mistral')) return 'mistralai';\n  if (name.includes('Vertex')) return 'google_vertexai';\n  if (name.includes('Bedrock')) return 'aws_bedrock';\n  if (name.includes('Ollama')) return 'ollama';\n  if (name.includes('Cloudflare')) return 'cloudflare';\n  if (name.includes('Cohere')) return 'cohere';\n  return 'langchain';\n}\n\n/**\n * Extracts span attributes from a LangChain embedding class instance.\n */\nfunction extractEmbeddingAttributes(instance: unknown): Record<string, unknown> {\n  const embeddingsInstance = (instance ?? {}) as Record<string, unknown>;\n\n  const attributes: Record<string, unknown> = {\n    [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: LANGCHAIN_ORIGIN,\n    [SEMANTIC_ATTRIBUTE_SENTRY_OP]: GEN_AI_EMBEDDINGS_OPERATION_ATTRIBUTE,\n    [GEN_AI_OPERATION_NAME_ATTRIBUTE]: 'embeddings',\n    [GEN_AI_REQUEST_MODEL_ATTRIBUTE]: embeddingsInstance.model ?? 'unknown',\n  };\n\n  attributes[GEN_AI_SYSTEM_ATTRIBUTE] = inferSystemFromInstance(embeddingsInstance);\n  if ('dimensions' in embeddingsInstance) {\n    attributes[GEN_AI_REQUEST_DIMENSIONS_ATTRIBUTE] = embeddingsInstance.dimensions;\n  }\n  if ('encodingFormat' in embeddingsInstance) {\n    attributes[GEN_AI_REQUEST_ENCODING_FORMAT_ATTRIBUTE] = embeddingsInstance.encodingFormat;\n  }\n\n  return attributes;\n}\n\n/**\n * Builds the span options for a LangChain embedding call from the embeddings instance and input.\n *\n * @internal Exported so the diagnostics-channel (orchestrion) instrumentation can build the same\n * span as the prototype-patching path below.\n */\nexport function _INTERNAL_getLangChainEmbeddingsSpanOptions(\n  instance: unknown,\n  input: unknown,\n  options: LangChainOptions = {},\n): { name: string; op: string; attributes: Record<string, SpanAttributeValue> } {\n  const { recordInputs } = resolveAIRecordingOptions(options);\n  const attributes = extractEmbeddingAttributes(instance);\n  const modelName = attributes[GEN_AI_REQUEST_MODEL_ATTRIBUTE] || 'unknown';\n\n  if (recordInputs && input != null) {\n    attributes[GEN_AI_EMBEDDINGS_INPUT_ATTRIBUTE] = typeof input === 'string' ? input : JSON.stringify(input);\n  }\n\n  return {\n    name: `embeddings ${modelName}`,\n    op: GEN_AI_EMBEDDINGS_OPERATION_ATTRIBUTE,\n    attributes: attributes as Record<string, SpanAttributeValue>,\n  };\n}\n\n/**\n * Wraps a LangChain embedding method (embedQuery or embedDocuments) to create Sentry spans.\n *\n * Used internally by the Node.js auto-instrumentation to patch embedding class prototypes.\n */\nexport function instrumentEmbeddingMethod(\n  originalMethod: (...args: unknown[]) => Promise<unknown>,\n  options: LangChainOptions = {},\n): (...args: unknown[]) => Promise<unknown> {\n  return new Proxy(originalMethod, {\n    apply(target, thisArg, args: unknown[]): Promise<unknown> {\n      return startSpan(_INTERNAL_getLangChainEmbeddingsSpanOptions(thisArg, args[0], options), () => {\n        // On rejection `startSpan` marks the span failed and rethrows to the caller, so we don't\n        // record the error ourselves.\n        return Reflect.apply(target, thisArg, args);\n      });\n    },\n  }) as (...args: unknown[]) => Promise<unknown>;\n}\n\n/**\n * Wraps a LangChain embeddings instance to create Sentry spans for `embedQuery` and `embedDocuments` calls.\n *\n * Use this in non-Node runtimes (Cloudflare, browser, etc.) where auto-instrumentation is not available.\n *\n * @example\n * ```javascript\n * import * as Sentry from '@sentry/cloudflare';\n * import { OpenAIEmbeddings } from '@langchain/openai';\n *\n * const embeddings = Sentry.instrumentLangChainEmbeddings(\n *   new OpenAIEmbeddings({ model: 'text-embedding-3-small' })\n * );\n *\n * await embeddings.embedQuery('Hello world');\n * await embeddings.embedDocuments(['doc1', 'doc2']);\n * ```\n */\nexport function instrumentLangChainEmbeddings<T extends object>(instance: T, options?: LangChainOptions): T {\n  const embeddingsInstance = instance as Record<string, unknown>;\n\n  if (typeof embeddingsInstance.embedQuery === 'function') {\n    embeddingsInstance.embedQuery = instrumentEmbeddingMethod(\n      embeddingsInstance.embedQuery as (...args: unknown[]) => Promise<unknown>,\n      options,\n    );\n  }\n\n  if (typeof embeddingsInstance.embedDocuments === 'function') {\n    embeddingsInstance.embedDocuments = instrumentEmbeddingMethod(\n      embeddingsInstance.embedDocuments as (...args: unknown[]) => Promise<unknown>,\n      options,\n    );\n  }\n\n  return instance;\n}\n", "export const LANGGRAPH_INTEGRATION_NAME = 'LangGraph' as const;\nexport const LANGGRAPH_ORIGIN = 'auto.ai.langgraph';\n", "import { SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '../../semanticAttributes';\nimport { SPAN_STATUS_ERROR } from '../../tracing';\nimport type { Span, SpanAttributes } from '../../types/span';\nimport {\n  GEN_AI_AGENT_NAME_ATTRIBUTE,\n  GEN_AI_EXECUTE_TOOL_OPERATION_ATTRIBUTE,\n  GEN_AI_OPERATION_NAME_ATTRIBUTE,\n  GEN_AI_RESPONSE_FINISH_REASONS_ATTRIBUTE,\n  GEN_AI_RESPONSE_MODEL_ATTRIBUTE,\n  GEN_AI_RESPONSE_TEXT_ATTRIBUTE,\n  GEN_AI_RESPONSE_TOOL_CALLS_ATTRIBUTE,\n  GEN_AI_TOOL_CALL_ID_ATTRIBUTE,\n  GEN_AI_TOOL_INPUT_ATTRIBUTE,\n  GEN_AI_TOOL_OUTPUT_ATTRIBUTE,\n  GEN_AI_TOOL_DESCRIPTION_ATTRIBUTE,\n  GEN_AI_TOOL_NAME_ATTRIBUTE,\n  GEN_AI_TOOL_TYPE_ATTRIBUTE,\n  GEN_AI_USAGE_INPUT_TOKENS_ATTRIBUTE,\n  GEN_AI_USAGE_OUTPUT_TOKENS_ATTRIBUTE,\n  GEN_AI_USAGE_TOTAL_TOKENS_ATTRIBUTE,\n} from '../ai/gen-ai-attributes';\nimport type { BaseChatModel, LangChainMessage } from '../langchain/types';\nimport { normalizeLangChainMessages } from '../langchain/utils';\nimport { startSpan } from '../trace';\nimport { LANGGRAPH_ORIGIN } from './constants';\nimport type { CompiledGraph, LangGraphOptions, LangGraphTool } from './types';\n\n/**\n * Extract LLM model object from createReactAgent params\n */\nexport function extractLLMFromParams(args: unknown[]): BaseChatModel | null {\n  const arg = args[0];\n  if (typeof arg !== 'object' || !arg || !('llm' in arg) || !arg.llm || typeof arg.llm !== 'object') {\n    return null;\n  }\n  const llm = arg.llm as BaseChatModel;\n  if (typeof llm.modelName !== 'string' && typeof llm.model !== 'string') {\n    return null;\n  }\n  return llm;\n}\n\n/**\n * Extract agent name from createReactAgent params\n */\nexport function extractAgentNameFromParams(args: unknown[]): string | null {\n  const arg = args[0];\n  if (typeof arg === 'object' && !!arg && 'name' in arg && typeof arg.name === 'string') {\n    return arg.name;\n  }\n  return null;\n}\n\n/**\n * Wraps an array of LangChain tools so each invocation creates a gen_ai.execute_tool span.\n *\n * Wraps each tool's invoke() method in place. A marker prevents double-wrapping.\n */\nexport function wrapToolsWithSpans(tools: unknown[], options: LangGraphOptions, agentName?: string): unknown[] {\n  const SENTRY_WRAPPED = '__sentry_tool_wrapped__';\n\n  for (const tool of tools) {\n    if (!tool || typeof tool !== 'object') {\n      continue;\n    }\n\n    const t = tool as Record<string, unknown>;\n    const originalInvoke = t.invoke;\n    if (typeof originalInvoke !== 'function' || Object.prototype.hasOwnProperty.call(t, SENTRY_WRAPPED)) {\n      continue;\n    }\n\n    const toolName = typeof t.name === 'string' ? t.name : 'unknown_tool';\n    const toolDescription = typeof t.description === 'string' ? t.description : undefined;\n\n    const wrappedInvoke = new Proxy(originalInvoke as (...args: unknown[]) => unknown, {\n      apply(target, thisArg, args: unknown[]): unknown {\n        const spanAttributes: SpanAttributes = {\n          [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: LANGGRAPH_ORIGIN,\n          [SEMANTIC_ATTRIBUTE_SENTRY_OP]: GEN_AI_EXECUTE_TOOL_OPERATION_ATTRIBUTE,\n          [GEN_AI_OPERATION_NAME_ATTRIBUTE]: 'execute_tool',\n          [GEN_AI_TOOL_NAME_ATTRIBUTE]: toolName,\n          [GEN_AI_TOOL_TYPE_ATTRIBUTE]: 'function',\n        };\n\n        // Read agent name from LangChain's propagated config metadata at call time,\n        // so shared tools get the correct agent name for each invocation\n        const callConfig = args[1] as Record<string, unknown> | undefined;\n        const callAgentName = (callConfig?.metadata as Record<string, unknown>)?.lc_agent_name ?? agentName;\n        if (typeof callAgentName === 'string') {\n          spanAttributes[GEN_AI_AGENT_NAME_ATTRIBUTE] = callAgentName;\n        }\n\n        if (toolDescription) {\n          spanAttributes[GEN_AI_TOOL_DESCRIPTION_ATTRIBUTE] = toolDescription;\n        }\n\n        // LangGraph ToolNode passes { name, args, id, type: \"tool_call\" }\n        const input = args[0] as Record<string, unknown> | undefined;\n        if (typeof input === 'object' && !!input) {\n          if ('id' in input && typeof input.id === 'string') {\n            spanAttributes[GEN_AI_TOOL_CALL_ID_ATTRIBUTE] = input.id;\n          }\n\n          if (options.recordInputs) {\n            const toolArgs = 'args' in input && typeof input.args === 'object' ? input.args : input;\n            try {\n              spanAttributes[GEN_AI_TOOL_INPUT_ATTRIBUTE] = JSON.stringify(toolArgs);\n            } catch {\n              // skip if not serializable\n            }\n          }\n        }\n\n        return startSpan(\n          {\n            op: GEN_AI_EXECUTE_TOOL_OPERATION_ATTRIBUTE,\n            name: `execute_tool ${toolName}`,\n            attributes: spanAttributes,\n          },\n          async span => {\n            try {\n              const result = await Reflect.apply(target, thisArg, args);\n\n              if (options.recordOutputs) {\n                try {\n                  // ToolMessage objects wrap the result in .content\n                  const resultObj = result as Record<string, unknown> | undefined;\n                  const content =\n                    resultObj && typeof resultObj === 'object' && 'content' in resultObj ? resultObj.content : result;\n                  span.setAttribute(\n                    GEN_AI_TOOL_OUTPUT_ATTRIBUTE,\n                    typeof content === 'string' ? content : JSON.stringify(content),\n                  );\n                } catch {\n                  // skip if not serializable\n                }\n              }\n\n              return result;\n            } catch (error) {\n              // The error is rethrown to the caller (invoke() rejects), so we only mark the span\n              // failed and do not record it.\n              span.setStatus({ code: SPAN_STATUS_ERROR, message: 'internal_error' });\n              throw error;\n            }\n          },\n        );\n      },\n    });\n\n    t.invoke = wrappedInvoke;\n    Object.defineProperty(t, SENTRY_WRAPPED, { value: true, enumerable: false });\n  }\n\n  return tools;\n}\n\n/**\n * Extract tool calls from messages\n */\nexport function extractToolCalls(messages: Array<Record<string, unknown>> | null): unknown[] | null {\n  if (!messages || messages.length === 0) {\n    return null;\n  }\n\n  const toolCalls: unknown[] = [];\n\n  for (const message of messages) {\n    if (message && typeof message === 'object') {\n      const msgToolCalls = message.tool_calls;\n      if (msgToolCalls && Array.isArray(msgToolCalls)) {\n        toolCalls.push(...msgToolCalls);\n      }\n    }\n  }\n\n  return toolCalls.length > 0 ? toolCalls : null;\n}\n\n/**\n * Extract token usage from a message's usage_metadata or response_metadata\n * Returns token counts without setting span attributes\n */\nexport function extractTokenUsageFromMessage(message: LangChainMessage): {\n  inputTokens: number;\n  outputTokens: number;\n  totalTokens: number;\n} {\n  const msg = message as Record<string, unknown>;\n  let inputTokens = 0;\n  let outputTokens = 0;\n  let totalTokens = 0;\n\n  // Extract from usage_metadata (newer format)\n  if (msg.usage_metadata && typeof msg.usage_metadata === 'object') {\n    const usage = msg.usage_metadata as Record<string, unknown>;\n    if (typeof usage.input_tokens === 'number') {\n      inputTokens = usage.input_tokens;\n    }\n    if (typeof usage.output_tokens === 'number') {\n      outputTokens = usage.output_tokens;\n    }\n    if (typeof usage.total_tokens === 'number') {\n      totalTokens = usage.total_tokens;\n    }\n    return { inputTokens, outputTokens, totalTokens };\n  }\n\n  // Fallback: Extract from response_metadata.tokenUsage\n  if (msg.response_metadata && typeof msg.response_metadata === 'object') {\n    const metadata = msg.response_metadata as Record<string, unknown>;\n    if (metadata.tokenUsage && typeof metadata.tokenUsage === 'object') {\n      const tokenUsage = metadata.tokenUsage as Record<string, unknown>;\n      if (typeof tokenUsage.promptTokens === 'number') {\n        inputTokens = tokenUsage.promptTokens;\n      }\n      if (typeof tokenUsage.completionTokens === 'number') {\n        outputTokens = tokenUsage.completionTokens;\n      }\n      if (typeof tokenUsage.totalTokens === 'number') {\n        totalTokens = tokenUsage.totalTokens;\n      }\n    }\n  }\n\n  return { inputTokens, outputTokens, totalTokens };\n}\n\n/**\n * Extract model and finish reason from a message's response_metadata\n */\nexport function extractModelMetadata(span: Span, message: LangChainMessage): void {\n  const msg = message as Record<string, unknown>;\n\n  if (msg.response_metadata && typeof msg.response_metadata === 'object') {\n    const metadata = msg.response_metadata as Record<string, unknown>;\n\n    if (metadata.model_name && typeof metadata.model_name === 'string') {\n      span.setAttribute(GEN_AI_RESPONSE_MODEL_ATTRIBUTE, metadata.model_name);\n    }\n\n    if (metadata.finish_reason && typeof metadata.finish_reason === 'string') {\n      span.setAttribute(GEN_AI_RESPONSE_FINISH_REASONS_ATTRIBUTE, [metadata.finish_reason]);\n    }\n  }\n}\n\n/**\n * Extract tools from compiled graph structure\n *\n * Tools are stored in: compiledGraph.builder.nodes.tools.runnable.tools\n */\nexport function extractToolsFromCompiledGraph(compiledGraph: CompiledGraph): unknown[] | null {\n  if (!compiledGraph.builder?.nodes?.tools?.runnable?.tools) {\n    return null;\n  }\n\n  const tools = compiledGraph.builder?.nodes?.tools?.runnable?.tools;\n\n  if (!tools || !Array.isArray(tools) || tools.length === 0) {\n    return null;\n  }\n\n  // Extract name, description, and schema from each tool's lc_kwargs\n  return tools.map((tool: LangGraphTool) => ({\n    name: tool.lc_kwargs?.name,\n    description: tool.lc_kwargs?.description,\n    schema: tool.lc_kwargs?.schema,\n  }));\n}\n\n/**\n * Set response attributes on the span\n */\nexport function setResponseAttributes(span: Span, inputMessages: LangChainMessage[] | null, result: unknown): void {\n  // Extract messages from result\n  const resultObj = result as { messages?: LangChainMessage[] } | undefined;\n  const outputMessages = resultObj?.messages;\n\n  if (!outputMessages || !Array.isArray(outputMessages)) {\n    return;\n  }\n\n  // Get new messages (delta between input and output)\n  const inputCount = inputMessages?.length ?? 0;\n  const newMessages = outputMessages.length > inputCount ? outputMessages.slice(inputCount) : [];\n\n  if (newMessages.length === 0) {\n    return;\n  }\n\n  // Extract and set tool calls from new messages BEFORE normalization\n  // (normalization strips tool_calls, so we need to extract them first)\n  const toolCalls = extractToolCalls(newMessages as Array<Record<string, unknown>>);\n  if (toolCalls) {\n    span.setAttribute(GEN_AI_RESPONSE_TOOL_CALLS_ATTRIBUTE, JSON.stringify(toolCalls));\n  }\n\n  // Normalize the new messages\n  const normalizedNewMessages = normalizeLangChainMessages(newMessages);\n  span.setAttribute(GEN_AI_RESPONSE_TEXT_ATTRIBUTE, JSON.stringify(normalizedNewMessages));\n\n  // Accumulate token usage across all messages\n  let totalInputTokens = 0;\n  let totalOutputTokens = 0;\n  let totalTokens = 0;\n\n  // Extract metadata from messages\n  for (const message of newMessages) {\n    // Accumulate token usage\n    const tokens = extractTokenUsageFromMessage(message);\n    totalInputTokens += tokens.inputTokens;\n    totalOutputTokens += tokens.outputTokens;\n    totalTokens += tokens.totalTokens;\n\n    // Extract model metadata (last message's metadata wins for model/finish_reason)\n    extractModelMetadata(span, message);\n  }\n\n  // Set accumulated token usage on span\n  if (totalInputTokens > 0) {\n    span.setAttribute(GEN_AI_USAGE_INPUT_TOKENS_ATTRIBUTE, totalInputTokens);\n  }\n  if (totalOutputTokens > 0) {\n    span.setAttribute(GEN_AI_USAGE_OUTPUT_TOKENS_ATTRIBUTE, totalOutputTokens);\n  }\n  if (totalTokens > 0) {\n    span.setAttribute(GEN_AI_USAGE_TOTAL_TOKENS_ATTRIBUTE, totalTokens);\n  }\n}\n", "import { SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '../../semanticAttributes';\nimport { SPAN_STATUS_ERROR } from '../../tracing';\nimport {\n  GEN_AI_AGENT_NAME_ATTRIBUTE,\n  GEN_AI_CONVERSATION_ID_ATTRIBUTE,\n  GEN_AI_INPUT_MESSAGES_ATTRIBUTE,\n  GEN_AI_INPUT_MESSAGES_ORIGINAL_LENGTH_ATTRIBUTE,\n  GEN_AI_INVOKE_AGENT_OPERATION_ATTRIBUTE,\n  GEN_AI_OPERATION_NAME_ATTRIBUTE,\n  GEN_AI_PIPELINE_NAME_ATTRIBUTE,\n  GEN_AI_REQUEST_AVAILABLE_TOOLS_ATTRIBUTE,\n  GEN_AI_REQUEST_MODEL_ATTRIBUTE,\n  GEN_AI_SYSTEM_INSTRUCTIONS_ATTRIBUTE,\n} from '../ai/gen-ai-attributes';\nimport {\n  extractSystemInstructions,\n  getTruncatedJsonString,\n  resolveAIRecordingOptions,\n  shouldEnableTruncation,\n} from '../ai/utils';\nimport { stringify } from '../../utils/string';\nimport type { SpanAttributeValue } from '../../types/span';\nimport { createLangChainCallbackHandler } from '../langchain';\nimport type { BaseChatModel, LangChainMessage } from '../langchain/types';\nimport { normalizeLangChainMessages } from '../langchain/utils';\nimport { startSpan } from '../trace';\nimport { LANGGRAPH_ORIGIN } from './constants';\nimport type { CompiledGraph, LangGraphOptions } from './types';\nimport {\n  extractAgentNameFromParams,\n  extractLLMFromParams,\n  extractToolsFromCompiledGraph,\n  setResponseAttributes,\n  wrapToolsWithSpans,\n} from './utils';\nimport { _INTERNAL_mergeLangChainCallbackHandler } from '../langchain/utils';\n\nlet _insideCreateReactAgent = false;\n\nconst SENTRY_PATCHED = '__sentry_patched__';\n\n/**\n * Builds the span options for a LangGraph `create_agent` span.\n *\n * @internal Exported so the diagnostics-channel (orchestrion) instrumentation can open the same span\n * as the prototype-patching path below without re-declaring the semantic attribute keys.\n */\nexport function _INTERNAL_getLangGraphCreateAgentSpanOptions(agentName?: string): {\n  op: string;\n  name: string;\n  attributes: Record<string, SpanAttributeValue>;\n} {\n  const attributes: Record<string, SpanAttributeValue> = {\n    [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: LANGGRAPH_ORIGIN,\n    [SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'gen_ai.create_agent',\n    [GEN_AI_OPERATION_NAME_ATTRIBUTE]: 'create_agent',\n  };\n\n  if (agentName) {\n    attributes[GEN_AI_AGENT_NAME_ATTRIBUTE] = agentName;\n  }\n\n  return {\n    op: 'gen_ai.create_agent',\n    name: agentName ? `create_agent ${agentName}` : 'create_agent',\n    attributes,\n  };\n}\n\n/**\n * Instruments StateGraph's compile method to create spans for agent creation and invocation\n *\n * Wraps the compile() method to:\n * - Create a `gen_ai.create_agent` span when compile() is called\n * - Automatically wrap the invoke() method on the returned compiled graph with a `gen_ai.invoke_agent` span\n *\n */\nexport function instrumentStateGraphCompile(\n  originalCompile: (...args: unknown[]) => CompiledGraph,\n  options: LangGraphOptions,\n): (...args: unknown[]) => CompiledGraph {\n  if (Object.prototype.hasOwnProperty.call(originalCompile, SENTRY_PATCHED)) {\n    return originalCompile;\n  }\n\n  const sentryHandler = createLangChainCallbackHandler(options);\n\n  const wrapped = new Proxy(originalCompile, {\n    apply(target, thisArg, args: unknown[]): CompiledGraph {\n      // Skip when called from within createReactAgent to avoid duplicate instrumentation\n      if (_insideCreateReactAgent) {\n        return Reflect.apply(target, thisArg, args);\n      }\n\n      return startSpan(_INTERNAL_getLangGraphCreateAgentSpanOptions(), span => {\n        try {\n          const compiledGraph = Reflect.apply(target, thisArg, args);\n          const compileOptions = args.length > 0 ? (args[0] as Record<string, unknown>) : {};\n\n          // Extract graph name\n          if (compileOptions?.name && typeof compileOptions.name === 'string') {\n            span.setAttribute(GEN_AI_AGENT_NAME_ATTRIBUTE, compileOptions.name);\n            span.updateName(`create_agent ${compileOptions.name}`);\n          }\n\n          // Instrument agent invoke method on the compiled graph\n          const originalInvoke = compiledGraph.invoke;\n          if (originalInvoke && typeof originalInvoke === 'function') {\n            compiledGraph.invoke = instrumentCompiledGraphInvoke(\n              originalInvoke.bind(compiledGraph) as (...args: unknown[]) => Promise<unknown>,\n              compiledGraph,\n              compileOptions,\n              options,\n              undefined,\n              sentryHandler,\n            ) as typeof originalInvoke;\n          }\n\n          return compiledGraph;\n        } catch (error) {\n          // The error is rethrown to the caller (compile() throws), so we only mark the span failed\n          // and do not record it.\n          span.setStatus({ code: SPAN_STATUS_ERROR, message: 'internal_error' });\n          throw error;\n        }\n      });\n    },\n  }) as (...args: unknown[]) => CompiledGraph;\n\n  Object.defineProperty(wrapped, SENTRY_PATCHED, { value: true, enumerable: false });\n  return wrapped;\n}\n\n/**\n * Instruments CompiledGraph's invoke method to create spans for agent invocation\n *\n * Creates a `gen_ai.invoke_agent` span when invoke() is called\n */\nexport function instrumentCompiledGraphInvoke(\n  originalInvoke: (...args: unknown[]) => Promise<unknown>,\n  graphInstance: CompiledGraph,\n  compileOptions: Record<string, unknown>,\n  options: LangGraphOptions,\n  llm?: BaseChatModel | null,\n  sentryCallbackHandler?: unknown,\n): (...args: unknown[]) => Promise<unknown> {\n  return new Proxy(originalInvoke, {\n    apply(target, thisArg, args: unknown[]): Promise<unknown> {\n      const modelName = llm?.modelName ?? llm?.model;\n      return startSpan(\n        {\n          op: 'gen_ai.invoke_agent',\n          name: 'invoke_agent',\n          attributes: {\n            [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: LANGGRAPH_ORIGIN,\n            [SEMANTIC_ATTRIBUTE_SENTRY_OP]: GEN_AI_INVOKE_AGENT_OPERATION_ATTRIBUTE,\n            [GEN_AI_OPERATION_NAME_ATTRIBUTE]: 'invoke_agent',\n          },\n        },\n        async span => {\n          try {\n            const graphName = compileOptions?.name;\n\n            if (graphName && typeof graphName === 'string') {\n              span.setAttribute(GEN_AI_PIPELINE_NAME_ATTRIBUTE, graphName);\n              span.setAttribute(GEN_AI_AGENT_NAME_ATTRIBUTE, graphName);\n              span.updateName(`invoke_agent ${graphName}`);\n            }\n\n            if (modelName) {\n              span.setAttribute(GEN_AI_REQUEST_MODEL_ATTRIBUTE, modelName);\n            }\n\n            // Extract thread_id from the config (second argument)\n            // LangGraph uses config.configurable.thread_id for conversation/session linking\n            const config = args.length > 1 ? (args[1] as Record<string, unknown> | undefined) : undefined;\n            const configurable = config?.configurable as Record<string, unknown> | undefined;\n            const threadId = configurable?.thread_id;\n            if (threadId && typeof threadId === 'string') {\n              span.setAttribute(GEN_AI_CONVERSATION_ID_ATTRIBUTE, threadId);\n            }\n\n            // Inject callback handler and agent name into invoke config\n            if (sentryCallbackHandler) {\n              const invokeConfig = (args[1] ?? {}) as Record<string, unknown>;\n              args[1] = invokeConfig;\n\n              const existingMetadata = (invokeConfig.metadata ?? {}) as Record<string, unknown>;\n              invokeConfig.metadata = {\n                ...existingMetadata,\n                __sentry_langgraph__: true,\n                ...(typeof graphName === 'string' ? { lc_agent_name: graphName } : {}),\n              };\n\n              invokeConfig.callbacks = _INTERNAL_mergeLangChainCallbackHandler(\n                invokeConfig.callbacks,\n                sentryCallbackHandler,\n              );\n            }\n\n            // Extract available tools from the graph instance\n            const tools = extractToolsFromCompiledGraph(graphInstance);\n            if (tools) {\n              span.setAttribute(GEN_AI_REQUEST_AVAILABLE_TOOLS_ATTRIBUTE, JSON.stringify(tools));\n            }\n\n            // Parse input messages\n            const recordInputs = options.recordInputs;\n            const recordOutputs = options.recordOutputs;\n            const inputMessages =\n              args.length > 0 ? ((args[0] as { messages?: LangChainMessage[] } | null)?.messages ?? []) : [];\n\n            if (inputMessages && recordInputs) {\n              const normalizedMessages = normalizeLangChainMessages(inputMessages);\n              const { systemInstructions, filteredMessages } = extractSystemInstructions(normalizedMessages);\n\n              if (systemInstructions) {\n                span.setAttribute(GEN_AI_SYSTEM_INSTRUCTIONS_ATTRIBUTE, systemInstructions);\n              }\n\n              const enableTruncation = shouldEnableTruncation(options.enableTruncation);\n              const filteredLength = Array.isArray(filteredMessages) ? filteredMessages.length : 0;\n              span.setAttributes({\n                [GEN_AI_INPUT_MESSAGES_ATTRIBUTE]: enableTruncation\n                  ? getTruncatedJsonString(filteredMessages)\n                  : stringify(filteredMessages),\n                [GEN_AI_INPUT_MESSAGES_ORIGINAL_LENGTH_ATTRIBUTE]: filteredLength,\n              });\n            }\n\n            // Call original invoke\n            const result = await Reflect.apply(target, thisArg, args);\n\n            if (recordOutputs) {\n              setResponseAttributes(span, inputMessages ?? null, result);\n            }\n\n            return result;\n          } catch (error) {\n            // The error is rethrown to the caller (invoke() rejects), so we only mark the span failed\n            // and do not record it.\n            span.setStatus({ code: SPAN_STATUS_ERROR, message: 'internal_error' });\n            throw error;\n          }\n        },\n      );\n    },\n  }) as (...args: unknown[]) => Promise<unknown>;\n}\n\n/**\n * Instruments createReactAgent to create invoke_agent and execute_tool spans.\n */\nexport function instrumentCreateReactAgent(\n  originalCreateReactAgent: (...args: unknown[]) => CompiledGraph,\n  options?: LangGraphOptions,\n): (...args: unknown[]) => CompiledGraph {\n  if (Object.prototype.hasOwnProperty.call(originalCreateReactAgent, SENTRY_PATCHED)) {\n    return originalCreateReactAgent;\n  }\n\n  const resolvedOptions = resolveAIRecordingOptions(options);\n  const sentryHandler = createLangChainCallbackHandler(resolvedOptions);\n\n  const wrapped = new Proxy(originalCreateReactAgent, {\n    apply(target, thisArg, args: unknown[]): CompiledGraph {\n      const llm = extractLLMFromParams(args);\n      const agentName = extractAgentNameFromParams(args);\n\n      // Wrap tools with execute_tool spans (direct access gives us name, type, description)\n      const params = args[0] as Record<string, unknown> | undefined;\n      if (params && Array.isArray(params.tools) && params.tools.length > 0) {\n        wrapToolsWithSpans(params.tools, resolvedOptions, agentName ?? undefined);\n      }\n\n      // Suppress StateGraph.compile instrumentation inside createReactAgent\n      _insideCreateReactAgent = true;\n      let compiledGraph: CompiledGraph;\n      try {\n        compiledGraph = Reflect.apply(target, thisArg, args);\n      } finally {\n        _insideCreateReactAgent = false;\n      }\n\n      // Wrap invoke() on the returned compiled graph\n      const originalInvoke = compiledGraph.invoke;\n      if (originalInvoke && typeof originalInvoke === 'function') {\n        const compileOptions: Record<string, unknown> = {};\n        if (agentName) {\n          compileOptions.name = agentName;\n        }\n\n        compiledGraph.invoke = instrumentCompiledGraphInvoke(\n          originalInvoke.bind(compiledGraph) as (...args: unknown[]) => Promise<unknown>,\n          compiledGraph,\n          compileOptions,\n          resolvedOptions,\n          llm,\n          sentryHandler,\n        ) as typeof originalInvoke;\n      }\n\n      return compiledGraph;\n    },\n  }) as (...args: unknown[]) => CompiledGraph;\n\n  Object.defineProperty(wrapped, SENTRY_PATCHED, { value: true, enumerable: false });\n  return wrapped;\n}\n\n/**\n * Directly instruments a StateGraph instance to add tracing spans\n *\n * This function can be used to manually instrument LangGraph StateGraph instances\n * in environments where automatic instrumentation is not available or desired.\n *\n * @param stateGraph - The StateGraph instance to instrument\n * @param options - Optional configuration for recording inputs/outputs\n *\n * @example\n * ```typescript\n * import { instrumentStateGraph } from '@sentry/cloudflare';\n * import { StateGraph } from '@langchain/langgraph';\n *\n * const graph = new StateGraph(MessagesAnnotation)\n *   .addNode('agent', mockLlm)\n *   .addEdge(START, 'agent')\n *   .addEdge('agent', END);\n *\n * instrumentStateGraph(graph, { recordInputs: true, recordOutputs: true });\n * const compiled = graph.compile({ name: 'my_agent' });\n * ```\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function instrumentStateGraph<T extends { compile: (...args: any[]) => any }>(\n  stateGraph: T,\n  options?: LangGraphOptions,\n): T {\n  stateGraph.compile = instrumentStateGraphCompile(stateGraph.compile, resolveAIRecordingOptions(options));\n\n  return stateGraph;\n}\n\n/**\n * Directly instruments a StateGraph instance to add tracing spans.\n *\n * @deprecated This function was renamed and will be removed in a future major version.\n * Use `instrumentStateGraph` instead.\n */\nexport const instrumentLangGraph = instrumentStateGraph;\n", "import type { Client } from '../../client';\nimport type { DynamicSamplingContext, SpanContainerItem, StreamedSpanEnvelope } from '../../types/envelope';\nimport type { SerializedStreamedSpan } from '../../types/span';\nimport { dsnToString } from '../../utils/dsn';\nimport { createEnvelope, getSdkMetadataForEnvelopeHeader } from '../../utils/envelope';\nimport { isBrowser } from '../../utils/isBrowser';\nimport { safeDateNow } from '../../utils/randomSafeContext';\n\n/**\n * Creates a span v2 span streaming envelope\n */\nexport function createStreamedSpanEnvelope(\n  serializedSpans: Array<SerializedStreamedSpan>,\n  dsc: Partial<DynamicSamplingContext>,\n  client: Client,\n): StreamedSpanEnvelope {\n  const options = client.getOptions();\n  const dsn = client.getDsn();\n  const tunnel = options.tunnel;\n  const sdk = getSdkMetadataForEnvelopeHeader(options._metadata);\n\n  const headers: StreamedSpanEnvelope[0] = {\n    sent_at: new Date(safeDateNow()).toISOString(),\n    ...(dscHasRequiredProps(dsc) && { trace: dsc }),\n    ...(sdk && { sdk }),\n    ...(!!tunnel && dsn && { dsn: dsnToString(dsn) }),\n  };\n\n  const inferSetting = client.getDataCollectionOptions().userInfo ? 'auto' : 'never';\n\n  const spanContainer: SpanContainerItem = [\n    { type: 'span', item_count: serializedSpans.length, content_type: 'application/vnd.sentry.items.span.v2+json' },\n    {\n      version: 2,\n      ...(isBrowser() && {\n        ingest_settings: { infer_ip: inferSetting, infer_user_agent: inferSetting },\n      }),\n      items: serializedSpans,\n    },\n  ];\n\n  return createEnvelope<StreamedSpanEnvelope>(headers, [spanContainer]);\n}\n\nfunction dscHasRequiredProps(dsc: Partial<DynamicSamplingContext>): dsc is DynamicSamplingContext {\n  return !!dsc.trace_id && !!dsc.public_key;\n}\n", "import { estimateTypedAttributesSizeInBytes } from '../../attributes';\nimport type { SerializedStreamedSpan } from '../../types/span';\n\n/**\n * Estimates the serialized byte size of a {@link SerializedStreamedSpan}.\n *\n * Uses 2 bytes per character as a UTF-16 approximation, and 8 bytes per number.\n * The estimate is intentionally conservative and may be slightly lower than the\n * actual byte size on the wire.\n * We compensate for this by setting the span buffers internal limit well below the limit\n * of how large an actual span v2 envelope may be.\n */\nexport function estimateSerializedSpanSizeInBytes(span: SerializedStreamedSpan): number {\n  /*\n   * Fixed-size fields are pre-computed as a constant for performance:\n   * - two timestamps (8 bytes each = 16)\n   * - is_segment boolean (5 bytes, assumed false for most spans)\n   * - trace_id  – always 32 hex chars (64 bytes)\n   * - span_id   – always 16 hex chars (32 bytes)\n   * - parent_span_id – 16 hex chars, assumed present for most spans (32 bytes)\n   * - status \"ok\" – most common value (8 bytes)\n   * = 156 bytes total base\n   */\n  let weight = 156;\n  weight += span.name.length * 2;\n  weight += estimateTypedAttributesSizeInBytes(span.attributes);\n  if (span.links && span.links.length > 0) {\n    // Assumption: Links are roughly equal in number of attributes\n    // probably not always true but allows us to cut down on runtime\n    const firstLink = span.links[0];\n    const attributes = firstLink?.attributes;\n    // Fixed size 100 due to span_id, trace_id and sampled flag (see above)\n    const linkWeight = 100 + (attributes ? estimateTypedAttributesSizeInBytes(attributes) : 0);\n    weight += linkWeight * span.links.length;\n  }\n  return weight;\n}\n", "import type { Client } from '../../client';\nimport { DEBUG_BUILD } from '../../debug-build';\nimport type { SerializedStreamedSpan } from '../../types/span';\nimport { debug } from '../../utils/debug-logger';\nimport { safeUnref } from '../../utils/timer';\nimport { getDynamicSamplingContextFromSpan } from '../dynamicSamplingContext';\nimport type { SerializedStreamedSpanWithSegmentSpan } from './captureSpan';\nimport { createStreamedSpanEnvelope } from './envelope';\nimport { estimateSerializedSpanSizeInBytes } from './estimateSize';\n\n/**\n * We must not send more than 1000 spans in one envelope.\n * Otherwise the envelope is dropped by Relay.\n */\nconst MAX_SPANS_PER_ENVELOPE = 1000;\n\nconst MAX_TRACE_WEIGHT_IN_BYTES = 5_000_000;\n\ninterface TraceBucket {\n  spans: Set<SerializedStreamedSpanWithSegmentSpan>;\n  size: number;\n  timeout: ReturnType<typeof setTimeout>;\n}\n\nexport interface SpanBufferOptions {\n  /**\n   * Max spans per trace before auto-flush\n   * Must not exceed 1000.\n   *\n   * @default 1_000\n   */\n  maxSpanLimit?: number;\n\n  /**\n   * Per-trace flush timeout in ms. A timeout is started when a trace bucket is first created\n   * and fires flush() for that specific trace when it expires.\n   * Must be greater than 0.\n   *\n   * @default 5_000\n   */\n  flushInterval?: number;\n\n  /**\n   * Max accumulated byte weight of spans per trace before auto-flush.\n   * Size is estimated, not exact. Uses 2 bytes per character for strings (UTF-16).\n   *\n   * @default 5_000_000 (5 MB)\n   */\n  maxTraceWeightInBytes?: number;\n}\n\n/**\n * A buffer for serialized streamed span JSON objects that flushes them to Sentry in Span v2 envelopes.\n * Handles per-trace timeout-based flushing, size thresholds, and graceful shutdown.\n * Also handles computation of the Dynamic Sampling Context (DSC) for the trace, if it wasn't yet\n * frozen onto the segment span.\n *\n * For this, we need the reference to the segment span instance, from\n * which we compute the DSC. Doing this in the buffer ensures that we compute the DSC as late as possible,\n * allowing span name and data updates up to this point. Worth noting here that the segment span is likely\n * still active and modifyable when child spans are added to the buffer.\n */\nexport class SpanBuffer {\n  /* Bucket spans by their trace id, along with accumulated size and a per-trace flush timeout */\n  private _traceBuckets: Map<string, TraceBucket>;\n\n  private _client: Client;\n  private _maxSpanLimit: number;\n  private _flushInterval: number;\n  private _maxTraceWeight: number;\n\n  public constructor(client: Client, options?: SpanBufferOptions) {\n    this._traceBuckets = new Map();\n    this._client = client;\n\n    const { maxSpanLimit, flushInterval, maxTraceWeightInBytes } = options ?? {};\n\n    this._maxSpanLimit =\n      maxSpanLimit && maxSpanLimit > 0 && maxSpanLimit <= MAX_SPANS_PER_ENVELOPE\n        ? maxSpanLimit\n        : MAX_SPANS_PER_ENVELOPE;\n    this._flushInterval = flushInterval && flushInterval > 0 ? flushInterval : 5_000;\n    this._maxTraceWeight =\n      maxTraceWeightInBytes && maxTraceWeightInBytes > 0 ? maxTraceWeightInBytes : MAX_TRACE_WEIGHT_IN_BYTES;\n\n    this._client.on('flush', () => {\n      this.drain();\n    });\n\n    this._client.on('close', () => {\n      // No need to drain the buffer here as `Client.close()` internally already calls `Client.flush()`\n      // which already invokes the `flush` hook and thus drains the buffer.\n      this._traceBuckets.forEach(bucket => {\n        clearTimeout(bucket.timeout);\n      });\n      this._traceBuckets.clear();\n    });\n  }\n\n  /**\n   * Add a span to the buffer.\n   */\n  public add(spanJSON: SerializedStreamedSpanWithSegmentSpan): void {\n    const traceId = spanJSON.trace_id;\n    let bucket = this._traceBuckets.get(traceId);\n\n    if (!bucket) {\n      bucket = {\n        spans: new Set(),\n        size: 0,\n        timeout: safeUnref(\n          setTimeout(() => {\n            this.flush(traceId);\n          }, this._flushInterval),\n        ),\n      };\n      this._traceBuckets.set(traceId, bucket);\n    }\n\n    bucket.spans.add(spanJSON);\n    bucket.size += estimateSerializedSpanSizeInBytes(spanJSON);\n\n    if (bucket.spans.size >= this._maxSpanLimit || bucket.size >= this._maxTraceWeight) {\n      this.flush(traceId);\n    }\n  }\n\n  /**\n   * Drain and flush all buffered traces.\n   */\n  public drain(): void {\n    if (!this._traceBuckets.size) {\n      return;\n    }\n\n    DEBUG_BUILD && debug.log(`Flushing span tree map with ${this._traceBuckets.size} traces`);\n\n    this._traceBuckets.forEach((_, traceId) => {\n      this.flush(traceId);\n    });\n  }\n\n  /**\n   * Flush spans of a specific trace.\n   * In contrast to {@link SpanBuffer.drain}, this method does not flush all traces, but only the one with the given traceId.\n   */\n  public flush(traceId: string): void {\n    const bucket = this._traceBuckets.get(traceId);\n    if (!bucket) {\n      return;\n    }\n\n    if (!bucket.spans.size) {\n      // we should never get here, given we always add a span when we create a new bucket\n      // and delete the bucket once we flush out the trace\n      this._removeTrace(traceId);\n      return;\n    }\n\n    const spans = Array.from(bucket.spans);\n\n    const segmentSpan = spans[0]?._segmentSpan;\n    if (!segmentSpan) {\n      DEBUG_BUILD && debug.warn('No segment span reference found on span JSON, cannot compute DSC');\n      this._removeTrace(traceId);\n      return;\n    }\n\n    const dsc = getDynamicSamplingContextFromSpan(segmentSpan);\n\n    const cleanedSpans: SerializedStreamedSpan[] = spans.map(spanJSON => {\n      // eslint-disable-next-line @typescript-eslint/no-unused-vars\n      const { _segmentSpan, ...cleanSpanJSON } = spanJSON;\n      return cleanSpanJSON;\n    });\n\n    const envelope = createStreamedSpanEnvelope(cleanedSpans, dsc, this._client);\n\n    DEBUG_BUILD && debug.log(`Sending span envelope for trace ${traceId} with ${cleanedSpans.length} spans`);\n\n    this._client.sendEnvelope(envelope).then(null, reason => {\n      DEBUG_BUILD && debug.error('Error while sending streamed span envelope:', reason);\n    });\n\n    this._removeTrace(traceId);\n  }\n\n  private _removeTrace(traceId: string): void {\n    const bucket = this._traceBuckets.get(traceId);\n    if (bucket) {\n      clearTimeout(bucket.timeout);\n    }\n    this._traceBuckets.delete(traceId);\n  }\n}\n", "import type { SeverityLevel } from '../types/severity';\n\n/**\n * Determine a breadcrumb's log level (only `warning` or `error`) based on an HTTP status code.\n */\nexport function getBreadcrumbLogLevelFromHttpStatusCode(statusCode: number | undefined): SeverityLevel | undefined {\n  // NOTE: undefined defaults to 'info' in Sentry\n  if (statusCode === undefined) {\n    return undefined;\n  } else if (statusCode >= 400 && statusCode < 500) {\n    return 'warning';\n  } else if (statusCode >= 500) {\n    return 'error';\n  } else {\n    return undefined;\n  }\n}\n", "import { DEBUG_BUILD } from '../debug-build';\nimport { debug } from './debug-logger';\nimport { GLOBAL_OBJ } from './worldwide';\n\nconst WINDOW = GLOBAL_OBJ as unknown as Window;\n\ndeclare const EdgeRuntime: string | undefined;\n\n/**\n * Tells whether current environment supports ErrorEvent objects\n * {@link supportsErrorEvent}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsErrorEvent(): boolean {\n  try {\n    new ErrorEvent('');\n    return true;\n  } catch {\n    return false;\n  }\n}\n\n/**\n * Tells whether current environment supports DOMError objects\n * {@link supportsDOMError}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsDOMError(): boolean {\n  try {\n    // Chrome: VM89:1 Uncaught TypeError: Failed to construct 'DOMError':\n    // 1 argument required, but only 0 present.\n    // @ts-expect-error It really needs 1 argument, not 0.\n    new DOMError('');\n    return true;\n  } catch {\n    return false;\n  }\n}\n\n/**\n * Tells whether current environment supports DOMException objects\n * {@link supportsDOMException}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsDOMException(): boolean {\n  try {\n    new DOMException('');\n    return true;\n  } catch {\n    return false;\n  }\n}\n\n/**\n * Tells whether current environment supports History API\n * {@link supportsHistory}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsHistory(): boolean {\n  return 'history' in WINDOW && !!WINDOW.history;\n}\n\n/**\n * Tells whether current environment supports Fetch API\n * {@link supportsFetch}.\n *\n * @returns Answer to the given question.\n * @deprecated This is no longer used and will be removed in a future major version.\n */\nexport const supportsFetch = _isFetchSupported;\n\nfunction _isFetchSupported(): boolean {\n  if (!('fetch' in WINDOW)) {\n    return false;\n  }\n\n  try {\n    new Headers();\n    // Deno requires a valid URL so '' cannot be used as an argument\n    new Request('data:,');\n    new Response();\n    return true;\n  } catch {\n    return false;\n  }\n}\n\n/**\n * isNative checks if the given function is a native implementation\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport function isNativeFunction(func: Function): boolean {\n  return func && /^function\\s+\\w+\\(\\)\\s+\\{\\s+\\[native code\\]\\s+\\}$/.test(func.toString());\n}\n\n/**\n * Tells whether current environment supports Fetch API natively\n * {@link supportsNativeFetch}.\n *\n * @returns true if `window.fetch` is natively implemented, false otherwise\n */\nexport function supportsNativeFetch(): boolean {\n  if (typeof EdgeRuntime === 'string') {\n    return true;\n  }\n\n  if (!_isFetchSupported()) {\n    return false;\n  }\n\n  // Fast path to avoid DOM I/O\n  // eslint-disable-next-line @typescript-eslint/unbound-method\n  if (isNativeFunction(WINDOW.fetch)) {\n    return true;\n  }\n\n  // window.fetch is implemented, but is polyfilled or already wrapped (e.g: by a chrome extension)\n  // so create a \"pure\" iframe to see if that has native fetch\n  let result = false;\n  const doc = WINDOW.document;\n  // eslint-disable-next-line typescript/no-deprecated\n  if (doc && typeof (doc.createElement as unknown) === 'function') {\n    try {\n      const sandbox = doc.createElement('iframe');\n      sandbox.hidden = true;\n      doc.head.appendChild(sandbox);\n      if (sandbox.contentWindow?.fetch) {\n        // eslint-disable-next-line @typescript-eslint/unbound-method\n        result = isNativeFunction(sandbox.contentWindow.fetch);\n      }\n      doc.head.removeChild(sandbox);\n    } catch (err) {\n      DEBUG_BUILD && debug.warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', err);\n    }\n  }\n\n  return result;\n}\n\n/**\n * Tells whether current environment supports ReportingObserver API\n * {@link supportsReportingObserver}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsReportingObserver(): boolean {\n  return 'ReportingObserver' in WINDOW;\n}\n\n/**\n * Tells whether current environment supports Referrer Policy API\n * {@link supportsReferrerPolicy}.\n *\n * @returns Answer to the given question.\n * @deprecated This is no longer used and will be removed in a future major version.\n */\nexport function supportsReferrerPolicy(): boolean {\n  // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default'\n  // (see https://caniuse.com/#feat=referrer-policy),\n  // it doesn't. And it throws an exception instead of ignoring this parameter...\n  // REF: https://github.com/getsentry/raven-js/issues/1233\n\n  if (!_isFetchSupported()) {\n    return false;\n  }\n\n  try {\n    new Request('_', {\n      referrerPolicy: 'origin' as ReferrerPolicy,\n    });\n    return true;\n  } catch {\n    return false;\n  }\n}\n", "/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { getClient } from '../currentScopes';\nimport type { HandlerDataFetch } from '../types/instrument';\nimport type { WebFetchHeaders } from '../types/webfetchapi';\nimport { isError, isObjectLike, isRequest } from '../utils/is';\nimport { addNonEnumerableProperty, fill } from '../utils/object';\nimport { supportsNativeFetch } from '../utils/supports';\nimport { timestampInSeconds } from '../utils/time';\nimport { GLOBAL_OBJ } from '../utils/worldwide';\nimport { addHandler, maybeInstrument, triggerHandlers } from './handlers';\n\ntype FetchResource = string | { toString(): string } | { url: string };\n\n/**\n * Add an instrumentation handler for when a fetch request happens.\n * The handler function is called once when the request starts and once when it ends,\n * which can be identified by checking if it has an `endTimestamp`.\n * Returns a function to remove the handler.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nexport function addFetchInstrumentationHandler(\n  handler: (data: HandlerDataFetch) => void,\n  skipNativeFetchCheck?: boolean,\n): () => void {\n  const type = 'fetch';\n  const removeHandler = addHandler(type, handler);\n  maybeInstrument(type, () => instrumentFetch(undefined, skipNativeFetchCheck));\n  return removeHandler;\n}\n\n/**\n * Add an instrumentation handler for long-lived fetch requests, like consuming server-sent events (SSE) via fetch.\n * The handler will resolve the request body and emit the actual `endTimestamp`, so that the\n * span can be updated accordingly.\n * Returns a function to remove the handler.\n *\n * Only used internally\n * @hidden\n */\nexport function addFetchEndInstrumentationHandler(handler: (data: HandlerDataFetch) => void): () => void {\n  const type = 'fetch-body-resolved';\n  const removeHandler = addHandler(type, handler);\n  maybeInstrument(type, () => instrumentFetch(streamHandler));\n  return removeHandler;\n}\n\nfunction instrumentFetch(onFetchResolved?: (response: Response) => void, skipNativeFetchCheck: boolean = false): void {\n  if (skipNativeFetchCheck && !supportsNativeFetch()) {\n    return;\n  }\n\n  fill(GLOBAL_OBJ, 'fetch', function (originalFetch: () => void): () => void {\n    return function (...args: any[]): void {\n      // We capture the error right here and not in the Promise error callback because Safari (and probably other\n      // browsers too) will wipe the stack trace up to this point, only leaving us with this file which is useless.\n\n      // NOTE: If you are a Sentry user, and you are seeing this stack frame,\n      //       it means the error, that was caused by your fetch call did not\n      //       have a stack trace, so the SDK backfilled the stack trace so\n      //       you can see which fetch call failed.\n      const virtualError = new Error();\n\n      const { method, url } = parseFetchArgs(args);\n      const handlerData: HandlerDataFetch = {\n        args,\n        fetchData: {\n          method,\n          url,\n        },\n        startTimestamp: timestampInSeconds() * 1000,\n        // // Adding the error to be able to fingerprint the failed fetch event in HttpClient instrumentation\n        virtualError,\n        headers: getHeadersFromFetchArgs(args),\n      };\n\n      // if there is no callback, fetch is instrumented directly\n      if (!onFetchResolved) {\n        triggerHandlers('fetch', {\n          ...handlerData,\n        });\n      }\n\n      // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n      return originalFetch.apply(GLOBAL_OBJ, args).then(\n        async (response: Response) => {\n          if (onFetchResolved) {\n            onFetchResolved(response);\n          } else {\n            triggerHandlers('fetch', {\n              ...handlerData,\n              endTimestamp: timestampInSeconds() * 1000,\n              response,\n            });\n          }\n\n          return response;\n        },\n        (error: Error) => {\n          triggerHandlers('fetch', {\n            ...handlerData,\n            endTimestamp: timestampInSeconds() * 1000,\n            error,\n          });\n\n          if (isError(error) && error.stack === undefined) {\n            // NOTE: If you are a Sentry user, and you are seeing this stack frame,\n            //       it means the error, that was caused by your fetch call did not\n            //       have a stack trace, so the SDK backfilled the stack trace so\n            //       you can see which fetch call failed.\n            error.stack = virtualError.stack;\n            addNonEnumerableProperty(error, 'framesToPop', 1);\n          }\n\n          // We enhance fetch error messages with hostname information based on the configuration.\n          // Possible messages we handle here:\n          // * \"Failed to fetch\" (chromium)\n          // * \"Load failed\" (webkit)\n          // * \"NetworkError when attempting to fetch resource.\" (firefox)\n          const client = getClient();\n          const enhanceOption = client?.getOptions().enhanceFetchErrorMessages ?? 'always';\n          const shouldEnhance = enhanceOption !== false;\n\n          if (\n            shouldEnhance &&\n            isError(error) &&\n            error.name === 'TypeError' &&\n            (error.message === 'Failed to fetch' ||\n              error.message === 'Load failed' ||\n              error.message === 'NetworkError when attempting to fetch resource.')\n          ) {\n            try {\n              const url = new URL(handlerData.fetchData.url);\n              const hostname = url.host;\n\n              if (enhanceOption === 'always') {\n                // Modify the error message directly\n                error.message = `${error.message} (${hostname})`;\n              } else {\n                // Store hostname as non-enumerable property for Sentry-only enhancement\n                // This preserves the original error message for third-party packages\n                addNonEnumerableProperty(error, '__sentry_fetch_url_host__', hostname);\n              }\n            } catch {\n              // ignore it if errors happen here\n            }\n          }\n\n          // NOTE: If you are a Sentry user, and you are seeing this stack frame,\n          //       it means the sentry.javascript SDK caught an error invoking your application code.\n          //       This is expected behavior and NOT indicative of a bug with sentry.javascript.\n          throw error;\n        },\n      );\n    };\n  });\n}\n\nasync function resolveResponse(res: Response | undefined, onFinishedResolving: () => void): Promise<void> {\n  if (res?.body) {\n    const body = res.body;\n    const responseReader = body.getReader();\n\n    // Define a maximum duration after which we just cancel\n    const maxFetchDurationTimeout = setTimeout(\n      () => {\n        body.cancel().then(null, () => {\n          // noop\n        });\n      },\n      90 * 1000, // 90s\n    );\n\n    let readingActive = true;\n    while (readingActive) {\n      let chunkTimeout;\n      try {\n        // abort reading if read op takes more than 5s\n        chunkTimeout = setTimeout(() => {\n          body.cancel().then(null, () => {\n            // noop on error\n          });\n        }, 5000);\n\n        // This .read() call will reject/throw when we abort due to timeouts through `body.cancel()`\n        const { done } = await responseReader.read();\n\n        clearTimeout(chunkTimeout);\n\n        if (done) {\n          onFinishedResolving();\n          readingActive = false;\n        }\n      } catch {\n        readingActive = false;\n      } finally {\n        clearTimeout(chunkTimeout);\n      }\n    }\n\n    clearTimeout(maxFetchDurationTimeout);\n\n    responseReader.releaseLock();\n    body.cancel().then(null, () => {\n      // noop on error\n    });\n  }\n}\n\nfunction streamHandler(response: Response): void {\n  // clone response for awaiting stream\n  let clonedResponseForResolving: Response;\n  try {\n    clonedResponseForResolving = response.clone();\n  } catch {\n    return;\n  }\n\n  // eslint-disable-next-line @typescript-eslint/no-floating-promises\n  resolveResponse(clonedResponseForResolving, () => {\n    triggerHandlers('fetch-body-resolved', {\n      endTimestamp: timestampInSeconds() * 1000,\n      response,\n    });\n  });\n}\n\nfunction hasProp<T extends string>(obj: unknown, prop: T): obj is Record<string, string> {\n  return isObjectLike(obj) && !!(obj as Record<string, string>)[prop];\n}\n\nfunction getUrlFromResource(resource: FetchResource): string {\n  if (typeof resource === 'string') {\n    return resource;\n  }\n\n  if (!resource) {\n    return '';\n  }\n\n  if (hasProp(resource, 'url')) {\n    return resource.url;\n  }\n\n  if (resource.toString) {\n    return resource.toString();\n  }\n\n  return '';\n}\n\n/**\n * Parses the fetch arguments to find the used Http method and the url of the request.\n * Exported for tests only.\n */\nexport function parseFetchArgs(fetchArgs: unknown[]): { method: string; url: string } {\n  if (fetchArgs.length === 0) {\n    return { method: 'GET', url: '' };\n  }\n\n  if (fetchArgs.length === 2) {\n    const [resource, options] = fetchArgs as [FetchResource, object];\n\n    return {\n      url: getUrlFromResource(resource),\n      method: hasProp(options, 'method')\n        ? String(options.method).toUpperCase()\n        : // Request object as first argument\n          isRequest(resource) && hasProp(resource, 'method')\n          ? String(resource.method).toUpperCase()\n          : 'GET',\n    };\n  }\n\n  const arg = fetchArgs[0];\n  return {\n    url: getUrlFromResource(arg as FetchResource),\n    method: hasProp(arg, 'method') ? String(arg.method).toUpperCase() : 'GET',\n  };\n}\n\nfunction getHeadersFromFetchArgs(fetchArgs: unknown[]): WebFetchHeaders | undefined {\n  const [requestArgument, optionsArgument] = fetchArgs;\n\n  try {\n    if (\n      typeof optionsArgument === 'object' &&\n      optionsArgument !== null &&\n      'headers' in optionsArgument &&\n      optionsArgument.headers\n    ) {\n      return new Headers(optionsArgument.headers as any);\n    }\n\n    if (isRequest(requestArgument)) {\n      return new Headers(requestArgument.headers);\n    }\n  } catch {\n    // noop\n  }\n\n  return;\n}\n", "import { isString } from './is';\nimport { GLOBAL_OBJ } from './worldwide';\n\nconst WINDOW = GLOBAL_OBJ as unknown as Window;\n\nconst DEFAULT_MAX_STRING_LENGTH = 80;\n\ntype SimpleNode = {\n  parentNode: SimpleNode;\n} | null;\n\n/**\n * Given a child DOM element, returns a query-selector statement describing that\n * and its ancestors\n * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz]\n * @returns generated DOM path\n * @deprecated This is browser-specific and will be removed from `@sentry/core` in a future major version.\n * Import `htmlTreeAsString` from `@sentry/browser-utils` instead.\n */\nexport function htmlTreeAsString(\n  elem: unknown,\n  options: string[] | { keyAttrs?: string[]; maxStringLength?: number } = {},\n): string {\n  if (!elem) {\n    return '<unknown>';\n  }\n\n  // try/catch both:\n  // - accessing event.target (see getsentry/raven-js#838, #768)\n  // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly\n  // - can throw an exception in some circumstances.\n  try {\n    let currentElem = elem as SimpleNode;\n    const MAX_TRAVERSE_HEIGHT = 5;\n    const out = [];\n    let height = 0;\n    let len = 0;\n    const separator = ' > ';\n    const sepLength = separator.length;\n    let nextStr;\n    const keyAttrs = Array.isArray(options) ? options : options.keyAttrs;\n    const maxStringLength = (!Array.isArray(options) && options.maxStringLength) || DEFAULT_MAX_STRING_LENGTH;\n\n    while (currentElem && height++ < MAX_TRAVERSE_HEIGHT) {\n      nextStr = _htmlElementAsString(currentElem, keyAttrs);\n      // bail out if\n      // - nextStr is the 'html' element\n      // - the length of the string that would be created exceeds maxStringLength\n      //   (ignore this limit if we are on the first iteration)\n      if (nextStr === 'html' || (height > 1 && len + out.length * sepLength + nextStr.length >= maxStringLength)) {\n        break;\n      }\n\n      out.push(nextStr);\n\n      len += nextStr.length;\n      currentElem = currentElem.parentNode;\n    }\n\n    return out.reverse().join(separator);\n  } catch {\n    return '<unknown>';\n  }\n}\n\n/**\n * Returns a simple, query-selector representation of a DOM element\n * e.g. [HTMLElement] => input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nfunction _htmlElementAsString(el: unknown, keyAttrs?: string[]): string {\n  const elem = el as {\n    tagName?: string;\n    id?: string;\n    className?: string;\n    getAttribute(key: string): string;\n  };\n\n  const out = [];\n\n  if (!elem?.tagName) {\n    return '';\n  }\n\n  // @ts-expect-error WINDOW has HTMLElement\n  if (WINDOW.HTMLElement) {\n    // If using the component name annotation plugin, this value may be available on the DOM node\n    if (elem instanceof HTMLElement && elem.dataset) {\n      if (elem.dataset['sentryComponent']) {\n        return elem.dataset['sentryComponent'];\n      }\n      if (elem.dataset['sentryElement']) {\n        return elem.dataset['sentryElement'];\n      }\n    }\n  }\n\n  out.push(elem.tagName.toLowerCase());\n\n  // Pairs of attribute keys defined in `serializeAttribute` and their values on element.\n  const keyAttrPairs = keyAttrs?.length\n    ? keyAttrs.filter(keyAttr => elem.getAttribute(keyAttr)).map(keyAttr => [keyAttr, elem.getAttribute(keyAttr)])\n    : null;\n\n  if (keyAttrPairs?.length) {\n    keyAttrPairs.forEach(keyAttrPair => {\n      out.push(`[${keyAttrPair[0]}=\"${keyAttrPair[1]}\"]`);\n    });\n  } else {\n    if (elem.id) {\n      out.push(`#${elem.id}`);\n    }\n\n    const className = elem.className;\n    if (className && isString(className)) {\n      const classes = className.split(/\\s+/);\n      for (const c of classes) {\n        out.push(`.${c}`);\n      }\n    }\n  }\n  for (const k of ['aria-label', 'type', 'name', 'title', 'alt']) {\n    const attr = elem.getAttribute(k);\n    if (attr) {\n      out.push(`[${k}=\"${attr}\"]`);\n    }\n  }\n\n  return out.join('');\n}\n\n/**\n * A safe form of location.href\n */\nexport function getLocationHref(): string {\n  try {\n    return WINDOW.document.location.href;\n  } catch {\n    return '';\n  }\n}\n\n/**\n * Given a DOM element, traverses up the tree until it finds the first ancestor node\n * that has the `data-sentry-component` or `data-sentry-element` attribute with `data-sentry-component` taking\n * precedence. This attribute is added at build-time by projects that have the component name annotation plugin installed.\n *\n * @returns a string representation of the component for the provided DOM element, or `null` if not found\n */\nexport function getComponentName(elem: unknown, maxTraverseHeight: number = 5): string | null {\n  // @ts-expect-error WINDOW has HTMLElement\n  if (!WINDOW.HTMLElement) {\n    return null;\n  }\n\n  let currentElem = elem as SimpleNode;\n  for (let i = 0; i < maxTraverseHeight; i++) {\n    if (!currentElem) {\n      return null;\n    }\n\n    if (currentElem instanceof HTMLElement) {\n      if (currentElem.dataset['sentryComponent']) {\n        return currentElem.dataset['sentryComponent'];\n      }\n      if (currentElem.dataset['sentryElement']) {\n        return currentElem.dataset['sentryElement'];\n      }\n    }\n\n    currentElem = currentElem.parentNode;\n  }\n\n  return null;\n}\n", "import { GLOBAL_OBJ } from '@sentry/core';\n\n// exporting a separate copy of `WINDOW` rather than exporting the one from `@sentry/browser`\n// prevents the browser package from being bundled in the CDN bundle, and avoids a\n// circular dependency between the browser and feedback packages\nexport const WINDOW = GLOBAL_OBJ as typeof GLOBAL_OBJ & Window;\nexport const DOCUMENT = WINDOW.document;\nexport const NAVIGATOR = WINDOW.navigator;\n\nexport const TRIGGER_LABEL = 'Report a Bug';\nexport const CANCEL_BUTTON_LABEL = 'Cancel';\nexport const SUBMIT_BUTTON_LABEL = 'Send Bug Report';\nexport const CONFIRM_BUTTON_LABEL = 'Confirm';\nexport const FORM_TITLE = 'Report a Bug';\nexport const EMAIL_PLACEHOLDER = 'your.email@example.org';\nexport const EMAIL_LABEL = 'Email';\nexport const MESSAGE_PLACEHOLDER = \"What's the bug? What did you expect?\";\nexport const MESSAGE_LABEL = 'Description';\nexport const NAME_PLACEHOLDER = 'Your Name';\nexport const NAME_LABEL = 'Name';\nexport const SUCCESS_MESSAGE_TEXT = 'Thank you for your report!';\nexport const IS_REQUIRED_LABEL = '(required)';\nexport const ADD_SCREENSHOT_LABEL = 'Add a screenshot';\nexport const REMOVE_SCREENSHOT_LABEL = 'Remove screenshot';\nexport const HIGHLIGHT_TOOL_TEXT = 'Highlight';\nexport const HIDE_TOOL_TEXT = 'Hide';\nexport const REMOVE_HIGHLIGHT_TEXT = 'Remove';\n\nexport const ERROR_EMPTY_MESSAGE_TEXT = 'Unable to submit feedback with empty message';\nexport const ERROR_NO_CLIENT_TEXT = 'No client setup, cannot send feedback.';\nexport const ERROR_TIMEOUT_TEXT = 'Unable to determine if Feedback was correctly sent.';\nexport const ERROR_FORBIDDEN_TEXT =\n  'Unable to send feedback. This could be because this domain is not in your list of allowed domains.';\nexport const ERROR_GENERIC_TEXT =\n  'Unable to send feedback. This could be because of network issues, or because you are using an ad-blocker.';\n\nexport const FEEDBACK_WIDGET_SOURCE = 'widget';\nexport const FEEDBACK_API_SOURCE = 'api';\n\nexport const SUCCESS_MESSAGE_TIMEOUT = 5000;\n", "import type { FeedbackErrorCode, FeedbackErrorMessages } from '@sentry/core';\nimport {\n  ERROR_EMPTY_MESSAGE_TEXT,\n  ERROR_FORBIDDEN_TEXT,\n  ERROR_GENERIC_TEXT,\n  ERROR_NO_CLIENT_TEXT,\n  ERROR_TIMEOUT_TEXT,\n} from '../constants';\n\nconst DEFAULT_MESSAGES: Record<FeedbackErrorCode, string> = {\n  ERROR_EMPTY_MESSAGE: ERROR_EMPTY_MESSAGE_TEXT,\n  ERROR_NO_CLIENT: ERROR_NO_CLIENT_TEXT,\n  ERROR_TIMEOUT: ERROR_TIMEOUT_TEXT,\n  ERROR_FORBIDDEN: ERROR_FORBIDDEN_TEXT,\n  ERROR_GENERIC: ERROR_GENERIC_TEXT,\n};\n\nexport function resolveFeedbackErrorMessage(code: FeedbackErrorCode, messages?: FeedbackErrorMessages): string {\n  return messages?.[code] ?? DEFAULT_MESSAGES[code];\n}\n\nexport function createFeedbackError(code: FeedbackErrorCode, messages?: FeedbackErrorMessages): Error {\n  return new Error(resolveFeedbackErrorMessage(code, messages));\n}\n", "import type {\n  Event,\n  EventHint,\n  FeedbackErrorMessages,\n  SendFeedback,\n  SendFeedbackParams,\n  TransportMakeRequestResponse,\n} from '@sentry/core';\nimport { captureFeedback, getClient, getCurrentScope, getLocationHref } from '@sentry/core';\nimport { FEEDBACK_API_SOURCE } from '../constants';\nimport { createFeedbackError, resolveFeedbackErrorMessage } from '../util/createFeedbackError';\n\n/**\n * Public API to send a Feedback item to Sentry\n */\nexport const sendFeedback: SendFeedback = (\n  params: SendFeedbackParams,\n  hint: EventHint & { includeReplay?: boolean; errorMessages?: FeedbackErrorMessages } = { includeReplay: true },\n): Promise<string> => {\n  const errorMessages = hint.errorMessages;\n\n  if (!params.message) {\n    throw createFeedbackError('ERROR_EMPTY_MESSAGE', errorMessages);\n  }\n\n  // We want to wait for the feedback to be sent (or not)\n  const client = getClient();\n\n  if (!client) {\n    throw createFeedbackError('ERROR_NO_CLIENT', errorMessages);\n  }\n\n  if (params.tags && Object.keys(params.tags).length) {\n    getCurrentScope().setTags(params.tags);\n  }\n  const eventId = captureFeedback(\n    {\n      source: FEEDBACK_API_SOURCE,\n      url: getLocationHref(),\n      ...params,\n    },\n    hint,\n  );\n\n  // We want to wait for the feedback to be sent (or not)\n  return new Promise<string>((resolve, reject) => {\n    // After 30s, we want to clear anyhow\n    const timeout = setTimeout(() => {\n      cleanup();\n      reject(resolveFeedbackErrorMessage('ERROR_TIMEOUT', errorMessages));\n    }, 30_000);\n\n    const cleanup = client.on('afterSendEvent', (event: Event, response: TransportMakeRequestResponse) => {\n      if (event.event_id !== eventId) {\n        return;\n      }\n\n      clearTimeout(timeout);\n      cleanup();\n\n      // Require valid status codes, otherwise can assume feedback was not sent successfully\n      if (response?.statusCode && response.statusCode >= 200 && response.statusCode < 300) {\n        return resolve(eventId);\n      }\n\n      if (response?.statusCode === 403) {\n        return reject(resolveFeedbackErrorMessage('ERROR_FORBIDDEN', errorMessages));\n      }\n\n      return reject(resolveFeedbackErrorMessage('ERROR_GENERIC', errorMessages));\n    });\n  });\n};\n\n/*\n * For reference, the fully built event looks something like this:\n * {\n *     \"type\": \"feedback\",\n *     \"event_id\": \"d2132d31b39445f1938d7e21b6bf0ec4\",\n *     \"timestamp\": 1597977777.6189718,\n *     \"dist\": \"1.12\",\n *     \"platform\": \"javascript\",\n *     \"environment\": \"production\",\n *     \"release\": 42,\n *     \"tags\": {\"transaction\": \"/organizations/:orgId/performance/:eventSlug/\"},\n *     \"sdk\": {\"name\": \"name\", \"version\": \"version\"},\n *     \"user\": {\n *         \"id\": \"123\",\n *         \"username\": \"user\",\n *         \"email\": \"user@site.com\",\n *         \"ip_address\": \"192.168.11.12\",\n *     },\n *     \"request\": {\n *         \"url\": None,\n *         \"headers\": {\n *             \"user-Agent\": \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.5 Safari/605.1.15\"\n *         },\n *     },\n *     \"contexts\": {\n *         \"feedback\": {\n *             \"message\": \"test message\",\n *             \"contact_email\": \"test@example.com\",\n *             \"type\": \"feedback\",\n *         },\n *         \"trace\": {\n *             \"trace_id\": \"4C79F60C11214EB38604F4AE0781BFB2\",\n *             \"span_id\": \"FA90FDEAD5F74052\",\n *             \"type\": \"trace\",\n *         },\n *         \"replay\": {\n *             \"replay_id\": \"e2d42047b1c5431c8cba85ee2a8ab25d\",\n *         },\n *     },\n *   }\n */\n", "declare const __DEBUG_BUILD__: boolean;\n\n/**\n * This serves as a build time flag that will be true by default, but false in non-debug builds or if users replace `__SENTRY_DEBUG__` in their generated code.\n *\n * ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking.\n */\nexport const DEBUG_BUILD = __DEBUG_BUILD__;\n", "import { NAVIGATOR } from '../constants';\n\n/**\n * Mobile browsers do not support `mediaDevices.getDisplayMedia` even though they have the api implemented\n * Instead they return things like `NotAllowedError` when called.\n *\n * It's simpler for us to browser sniff first, and avoid loading the integration if we can.\n *\n * https://stackoverflow.com/a/58879212\n * https://stackoverflow.com/a/3540295\n *\n * `mediaDevices.getDisplayMedia` is also only supported in secure contexts, and return a `mediaDevices is not supported` error, so we should also avoid loading the integration if we can.\n *\n * https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getDisplayMedia\n */\nexport function isScreenshotSupported(): boolean {\n  if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(NAVIGATOR.userAgent)) {\n    return false;\n  }\n  /**\n   * User agent on iPads show as Macintosh, so we need extra checks\n   *\n   * https://forums.developer.apple.com/forums/thread/119186\n   * https://stackoverflow.com/questions/60482650/how-to-detect-ipad-useragent-on-safari-browser\n   */\n  if (/Macintosh/i.test(NAVIGATOR.userAgent) && NAVIGATOR.maxTouchPoints && NAVIGATOR.maxTouchPoints > 1) {\n    return false;\n  }\n  if (!isSecureContext) {\n    return false;\n  }\n  return true;\n}\n", "import type { FeedbackFormData, FeedbackInternalOptions } from '@sentry/core';\nimport type { OptionalFeedbackConfiguration } from '../core/types';\n\n/**\n * Quick and dirty deep merge for the Feedback integration options\n */\nexport function mergeOptions(\n  defaultOptions: FeedbackInternalOptions,\n  optionOverrides: OptionalFeedbackConfiguration,\n): FeedbackInternalOptions {\n  return {\n    ...defaultOptions,\n    ...optionOverrides,\n    tags: {\n      ...defaultOptions.tags,\n      ...optionOverrides.tags,\n    },\n    onFormOpen: () => {\n      optionOverrides.onFormOpen?.();\n      defaultOptions.onFormOpen?.();\n    },\n    onFormClose: () => {\n      optionOverrides.onFormClose?.();\n      defaultOptions.onFormClose?.();\n    },\n    onSubmitSuccess: (data: FeedbackFormData, eventId: string) => {\n      optionOverrides.onSubmitSuccess?.(data, eventId);\n      defaultOptions.onSubmitSuccess?.(data, eventId);\n    },\n    onSubmitError: (error: Error) => {\n      optionOverrides.onSubmitError?.(error);\n      defaultOptions.onSubmitError?.(error);\n    },\n    onFormSubmitted: () => {\n      optionOverrides.onFormSubmitted?.();\n      defaultOptions.onFormSubmitted?.();\n    },\n    themeDark: {\n      ...defaultOptions.themeDark,\n      ...optionOverrides.themeDark,\n    },\n    themeLight: {\n      ...defaultOptions.themeLight,\n      ...optionOverrides.themeLight,\n    },\n  };\n}\n", "import { DOCUMENT } from '../../constants';\n\n/**\n * Creates <style> element for widget actor (button that opens the dialog)\n */\nexport function createActorStyles(styleNonce?: string): HTMLStyleElement {\n  const style = DOCUMENT.createElement('style');\n  style.textContent = `\n.widget__actor {\n  position: fixed;\n  z-index: var(--z-index);\n  margin: var(--page-margin);\n  inset: var(--actor-inset);\n\n  display: flex;\n  align-items: center;\n  gap: 8px;\n  padding: 16px;\n\n  font-family: inherit;\n  font-size: var(--font-size);\n  font-weight: 600;\n  line-height: 1.14em;\n  text-decoration: none;\n\n  background: var(--actor-background, var(--background));\n  border-radius: var(--actor-border-radius, 1.7em/50%);\n  border: var(--actor-border, var(--border));\n  box-shadow: var(--actor-box-shadow, var(--box-shadow));\n  color: var(--actor-color, var(--foreground));\n  fill: var(--actor-color, var(--foreground));\n  cursor: pointer;\n  opacity: 1;\n  transition: transform 0.2s ease-in-out;\n  transform: translate(0, 0) scale(1);\n}\n.widget__actor[aria-hidden=\"true\"] {\n  opacity: 0;\n  pointer-events: none;\n  visibility: hidden;\n  transform: translate(0, 16px) scale(0.98);\n}\n\n.widget__actor:hover {\n  background: var(--actor-hover-background, var(--background));\n  filter: var(--interactive-filter);\n}\n\n.widget__actor svg {\n  width: 1.14em;\n  height: 1.14em;\n}\n\n@media (max-width: 600px) {\n  .widget__actor span {\n    display: none;\n  }\n}\n`;\n\n  if (styleNonce) {\n    style.setAttribute('nonce', styleNonce);\n  }\n\n  return style;\n}\n", "/**\n * Helper function to set a dict of attributes on element (w/ specified namespace)\n */\nexport function setAttributesNS<T extends SVGElement>(el: T, attributes: Record<string, string>): T {\n  Object.entries(attributes).forEach(([key, val]) => {\n    el.setAttributeNS(null, key, val);\n  });\n  return el;\n}\n", "import { WINDOW } from '../../constants';\nimport { setAttributesNS } from '../../util/setAttributesNS';\n\nconst SIZE = 20;\nconst XMLNS = 'http://www.w3.org/2000/svg';\n\n/**\n * Feedback Icon\n */\nexport function FeedbackIcon(): SVGElement {\n  const createElementNS = <K extends keyof SVGElementTagNameMap>(tagName: K): SVGElementTagNameMap[K] =>\n    WINDOW.document.createElementNS(XMLNS, tagName);\n  const svg = setAttributesNS(createElementNS('svg'), {\n    width: `${SIZE}`,\n    height: `${SIZE}`,\n    viewBox: `0 0 ${SIZE} ${SIZE}`,\n    fill: 'var(--actor-color, var(--foreground))',\n  });\n\n  const g = setAttributesNS(createElementNS('g'), {\n    clipPath: 'url(#clip0_57_80)',\n  });\n\n  const path = setAttributesNS(createElementNS('path'), {\n    ['fill-rule']: 'evenodd',\n    ['clip-rule']: 'evenodd',\n    d: 'M15.6622 15H12.3997C12.2129 14.9959 12.031 14.9396 11.8747 14.8375L8.04965 12.2H7.49956V19.1C7.4875 19.3348 7.3888 19.5568 7.22256 19.723C7.05632 19.8892 6.83435 19.9879 6.59956 20H2.04956C1.80193 19.9968 1.56535 19.8969 1.39023 19.7218C1.21511 19.5467 1.1153 19.3101 1.11206 19.0625V12.2H0.949652C0.824431 12.2017 0.700142 12.1783 0.584123 12.1311C0.468104 12.084 0.362708 12.014 0.274155 11.9255C0.185602 11.8369 0.115689 11.7315 0.0685419 11.6155C0.0213952 11.4995 -0.00202913 11.3752 -0.00034808 11.25V3.75C-0.00900498 3.62067 0.0092504 3.49095 0.0532651 3.36904C0.0972798 3.24712 0.166097 3.13566 0.255372 3.04168C0.344646 2.94771 0.452437 2.87327 0.571937 2.82307C0.691437 2.77286 0.82005 2.74798 0.949652 2.75H8.04965L11.8747 0.1625C12.031 0.0603649 12.2129 0.00407221 12.3997 0H15.6622C15.9098 0.00323746 16.1464 0.103049 16.3215 0.278167C16.4966 0.453286 16.5964 0.689866 16.5997 0.9375V3.25269C17.3969 3.42959 18.1345 3.83026 18.7211 4.41679C19.5322 5.22788 19.9878 6.32796 19.9878 7.47502C19.9878 8.62209 19.5322 9.72217 18.7211 10.5333C18.1345 11.1198 17.3969 11.5205 16.5997 11.6974V14.0125C16.6047 14.1393 16.5842 14.2659 16.5395 14.3847C16.4948 14.5035 16.4268 14.6121 16.3394 14.7042C16.252 14.7962 16.147 14.8698 16.0307 14.9206C15.9144 14.9714 15.7891 14.9984 15.6622 15ZM1.89695 10.325H1.88715V4.625H8.33715C8.52423 4.62301 8.70666 4.56654 8.86215 4.4625L12.6872 1.875H14.7247V13.125H12.6872L8.86215 10.4875C8.70666 10.3835 8.52423 10.327 8.33715 10.325H2.20217C2.15205 10.3167 2.10102 10.3125 2.04956 10.3125C1.9981 10.3125 1.94708 10.3167 1.89695 10.325ZM2.98706 12.2V18.1625H5.66206V12.2H2.98706ZM16.5997 9.93612V5.01393C16.6536 5.02355 16.7072 5.03495 16.7605 5.04814C17.1202 5.13709 17.4556 5.30487 17.7425 5.53934C18.0293 5.77381 18.2605 6.06912 18.4192 6.40389C18.578 6.73866 18.6603 7.10452 18.6603 7.47502C18.6603 7.84552 18.578 8.21139 18.4192 8.54616C18.2605 8.88093 18.0293 9.17624 17.7425 9.41071C17.4556 9.64518 17.1202 9.81296 16.7605 9.90191C16.7072 9.91509 16.6536 9.9265 16.5997 9.93612Z',\n  });\n  svg.appendChild(g).appendChild(path);\n\n  const speakerDefs = createElementNS('defs');\n  const speakerClipPathDef = setAttributesNS(createElementNS('clipPath'), {\n    id: 'clip0_57_80',\n  });\n\n  const speakerRect = setAttributesNS(createElementNS('rect'), {\n    width: `${SIZE}`,\n    height: `${SIZE}`,\n    fill: 'white',\n  });\n\n  speakerClipPathDef.appendChild(speakerRect);\n  speakerDefs.appendChild(speakerClipPathDef);\n\n  svg.appendChild(speakerDefs).appendChild(speakerClipPathDef).appendChild(speakerRect);\n\n  return svg;\n}\n", "import { DOCUMENT, TRIGGER_LABEL } from '../../constants';\nimport { createActorStyles } from './Actor.css';\nimport { FeedbackIcon } from './FeedbackIcon';\n\nexport interface ActorProps {\n  triggerLabel: string;\n  triggerAriaLabel: string;\n  shadow: ShadowRoot;\n  styleNonce?: string;\n}\n\nexport interface ActorComponent {\n  el: HTMLElement;\n\n  appendToDom: () => void;\n\n  removeFromDom: () => void;\n\n  show: () => void;\n\n  hide: () => void;\n}\n\n/**\n * The sentry-provided button to open the feedback modal\n */\nexport function Actor({ triggerLabel, triggerAriaLabel, shadow, styleNonce }: ActorProps): ActorComponent {\n  const el = DOCUMENT.createElement('button');\n  el.type = 'button';\n  el.className = 'widget__actor';\n  el.ariaHidden = 'false';\n  el.ariaLabel = triggerAriaLabel || triggerLabel || TRIGGER_LABEL;\n  el.appendChild(FeedbackIcon());\n  if (triggerLabel) {\n    const label = DOCUMENT.createElement('span');\n    label.appendChild(DOCUMENT.createTextNode(triggerLabel));\n    el.appendChild(label);\n  }\n\n  const style = createActorStyles(styleNonce);\n\n  return {\n    el,\n    appendToDom(): void {\n      shadow.appendChild(style);\n      shadow.appendChild(el);\n    },\n    removeFromDom(): void {\n      el.remove();\n      style.remove();\n    },\n    show(): void {\n      el.ariaHidden = 'false';\n    },\n    hide(): void {\n      el.ariaHidden = 'true';\n    },\n  };\n}\n", "import type { FeedbackInternalOptions } from '@sentry/core';\nimport { DOCUMENT } from '../constants';\n\nconst PURPLE = 'rgba(88, 74, 192, 1)';\n\ninterface InternalTheme extends NonNullable<FeedbackInternalOptions['themeLight']> {\n  border: string;\n  interactiveFilter: string;\n}\n\nconst DEFAULT_LIGHT: InternalTheme = {\n  foreground: '#2b2233',\n  background: '#ffffff',\n  accentForeground: 'white',\n  accentBackground: PURPLE,\n  successColor: '#268d75',\n  errorColor: '#df3338',\n  border: '1.5px solid rgba(41, 35, 47, 0.13)',\n  boxShadow: '0px 4px 24px 0px rgba(43, 34, 51, 0.12)',\n  outline: '1px auto var(--accent-background)',\n  interactiveFilter: 'brightness(95%)',\n};\nconst DEFAULT_DARK: InternalTheme = {\n  foreground: '#ebe6ef',\n  background: '#29232f',\n  accentForeground: 'white',\n  accentBackground: PURPLE,\n  successColor: '#2da98c',\n  errorColor: '#f55459',\n  border: '1.5px solid rgba(235, 230, 239, 0.15)',\n  boxShadow: '0px 4px 24px 0px rgba(43, 34, 51, 0.12)',\n  outline: '1px auto var(--accent-background)',\n  interactiveFilter: 'brightness(150%)',\n};\n\nfunction getThemedCssVariables(theme: InternalTheme): string {\n  return `\n  --foreground: ${theme.foreground};\n  --background: ${theme.background};\n  --accent-foreground: ${theme.accentForeground};\n  --accent-background: ${theme.accentBackground};\n  --success-color: ${theme.successColor};\n  --error-color: ${theme.errorColor};\n  --border: ${theme.border};\n  --box-shadow: ${theme.boxShadow};\n  --outline: ${theme.outline};\n  --interactive-filter: ${theme.interactiveFilter};\n  `;\n}\n\n/**\n * Creates <style> element for widget actor (button that opens the dialog)\n */\nexport function createMainStyles({\n  colorScheme,\n  themeDark,\n  themeLight,\n  styleNonce,\n}: FeedbackInternalOptions): HTMLStyleElement {\n  const style = DOCUMENT.createElement('style');\n  style.textContent = `\n:host {\n  --font-family: system-ui, 'Helvetica Neue', Arial, sans-serif;\n  --font-size: 14px;\n  --z-index: 100000;\n\n  --page-margin: 16px;\n  --inset: auto 0 0 auto;\n  --actor-inset: var(--inset);\n\n  font-family: var(--font-family);\n  font-size: var(--font-size);\n\n  ${colorScheme !== 'system' ? `color-scheme: only ${colorScheme};` : ''}\n\n  ${getThemedCssVariables(\n    colorScheme === 'dark' ? { ...DEFAULT_DARK, ...themeDark } : { ...DEFAULT_LIGHT, ...themeLight },\n  )}\n}\n\n${\n  colorScheme === 'system'\n    ? `\n@media (prefers-color-scheme: dark) {\n  :host {\n    color-scheme: only dark;\n\n    ${getThemedCssVariables({ ...DEFAULT_DARK, ...themeDark })}\n  }\n}`\n    : ''\n}\n`;\n\n  if (styleNonce) {\n    style.setAttribute('nonce', styleNonce);\n  }\n\n  return style;\n}\n", "/* eslint-disable max-lines */\n/* eslint-disable complexity */\n\nimport type {\n  FeedbackErrorMessages,\n  FeedbackInternalOptions,\n  FeedbackModalIntegration,\n  FeedbackScreenshotIntegration,\n  Integration,\n  IntegrationFn,\n  SendFeedback,\n} from '@sentry/core';\nimport { addIntegration, debug, isBrowser } from '@sentry/core';\nimport {\n  ADD_SCREENSHOT_LABEL,\n  CANCEL_BUTTON_LABEL,\n  CONFIRM_BUTTON_LABEL,\n  DOCUMENT,\n  EMAIL_LABEL,\n  EMAIL_PLACEHOLDER,\n  ERROR_EMPTY_MESSAGE_TEXT,\n  ERROR_FORBIDDEN_TEXT,\n  ERROR_GENERIC_TEXT,\n  ERROR_NO_CLIENT_TEXT,\n  ERROR_TIMEOUT_TEXT,\n  FORM_TITLE,\n  HIDE_TOOL_TEXT,\n  HIGHLIGHT_TOOL_TEXT,\n  IS_REQUIRED_LABEL,\n  MESSAGE_LABEL,\n  MESSAGE_PLACEHOLDER,\n  NAME_LABEL,\n  NAME_PLACEHOLDER,\n  REMOVE_HIGHLIGHT_TEXT,\n  REMOVE_SCREENSHOT_LABEL,\n  SUBMIT_BUTTON_LABEL,\n  SUCCESS_MESSAGE_TEXT,\n  TRIGGER_LABEL,\n} from '../constants';\nimport { DEBUG_BUILD } from '../util/debug-build';\nimport { isScreenshotSupported } from '../util/isScreenshotSupported';\nimport { mergeOptions } from '../util/mergeOptions';\nimport type { ActorComponent } from './components/Actor';\nimport { Actor } from './components/Actor';\nimport { createMainStyles } from './createMainStyles';\nimport { sendFeedback } from './sendFeedback';\nimport type { OptionalFeedbackConfiguration, OverrideFeedbackConfiguration } from './types';\n\ntype Unsubscribe = () => void;\n\n/**\n * Allow users to capture user feedback and send it to Sentry.\n */\n\ntype BuilderOptions =\n  | {\n      lazyLoadIntegration?: never;\n      getModalIntegration: () => IntegrationFn;\n      getScreenshotIntegration: () => IntegrationFn;\n    }\n  | {\n      // The type here should be `keyof typeof LazyLoadableIntegrations`, but that'll cause a cicrular\n      // dependency with @sentry/core\n      lazyLoadIntegration: (\n        name: 'feedbackModalIntegration' | 'feedbackScreenshotIntegration',\n        scriptNonce?: string,\n      ) => Promise<IntegrationFn>;\n      getModalIntegration?: never;\n      getScreenshotIntegration?: never;\n    };\n\nexport const buildFeedbackIntegration = ({\n  lazyLoadIntegration,\n  getModalIntegration,\n  getScreenshotIntegration,\n}: BuilderOptions): IntegrationFn<\n  Integration & {\n    attachTo(el: Element | string, optionOverrides?: OverrideFeedbackConfiguration): Unsubscribe;\n    createForm(\n      optionOverrides?: OverrideFeedbackConfiguration,\n    ): Promise<ReturnType<FeedbackModalIntegration['createDialog']>>;\n    createWidget(optionOverrides?: OverrideFeedbackConfiguration): ActorComponent;\n    setTheme(colorScheme: 'light' | 'dark' | 'system'): void;\n    remove(): void;\n  }\n> => {\n  const feedbackIntegration = (({\n    // FeedbackGeneralConfiguration\n    id = 'sentry-feedback',\n    autoInject = true,\n    showBranding = true,\n    isEmailRequired = false,\n    isNameRequired = false,\n    showEmail = true,\n    showName = true,\n    enableScreenshot = true,\n    useSentryUser = {\n      email: 'email',\n      name: 'username',\n    },\n    tags,\n    styleNonce,\n    scriptNonce,\n\n    // FeedbackThemeConfiguration\n    colorScheme = 'system',\n    themeLight = {},\n    themeDark = {},\n\n    // FeedbackTextConfiguration\n    addScreenshotButtonLabel = ADD_SCREENSHOT_LABEL,\n    cancelButtonLabel = CANCEL_BUTTON_LABEL,\n    confirmButtonLabel = CONFIRM_BUTTON_LABEL,\n    emailLabel = EMAIL_LABEL,\n    emailPlaceholder = EMAIL_PLACEHOLDER,\n    formTitle = FORM_TITLE,\n    isRequiredLabel = IS_REQUIRED_LABEL,\n    messageLabel = MESSAGE_LABEL,\n    messagePlaceholder = MESSAGE_PLACEHOLDER,\n    nameLabel = NAME_LABEL,\n    namePlaceholder = NAME_PLACEHOLDER,\n    removeScreenshotButtonLabel = REMOVE_SCREENSHOT_LABEL,\n    submitButtonLabel = SUBMIT_BUTTON_LABEL,\n    successMessageText = SUCCESS_MESSAGE_TEXT,\n    triggerLabel = TRIGGER_LABEL,\n    triggerAriaLabel = '',\n    highlightToolText = HIGHLIGHT_TOOL_TEXT,\n    hideToolText = HIDE_TOOL_TEXT,\n    removeHighlightText = REMOVE_HIGHLIGHT_TEXT,\n    errorEmptyMessageText = ERROR_EMPTY_MESSAGE_TEXT,\n    errorNoClientText = ERROR_NO_CLIENT_TEXT,\n    errorTimeoutText = ERROR_TIMEOUT_TEXT,\n    errorForbiddenText = ERROR_FORBIDDEN_TEXT,\n    errorGenericText = ERROR_GENERIC_TEXT,\n\n    // FeedbackCallbacks\n    onFormOpen,\n    onFormClose,\n    onSubmitSuccess,\n    onSubmitError,\n    onFormSubmitted,\n  }: OptionalFeedbackConfiguration = {}) => {\n    const _options = {\n      id,\n      autoInject,\n      showBranding,\n      isEmailRequired,\n      isNameRequired,\n      showEmail,\n      showName,\n      enableScreenshot,\n      useSentryUser,\n      tags,\n      styleNonce,\n      scriptNonce,\n\n      colorScheme,\n      themeDark,\n      themeLight,\n\n      triggerLabel,\n      triggerAriaLabel,\n      cancelButtonLabel,\n      submitButtonLabel,\n      confirmButtonLabel,\n      formTitle,\n      emailLabel,\n      emailPlaceholder,\n      messageLabel,\n      messagePlaceholder,\n      nameLabel,\n      namePlaceholder,\n      successMessageText,\n      isRequiredLabel,\n      addScreenshotButtonLabel,\n      removeScreenshotButtonLabel,\n      highlightToolText,\n      hideToolText,\n      removeHighlightText,\n      errorEmptyMessageText,\n      errorNoClientText,\n      errorTimeoutText,\n      errorForbiddenText,\n      errorGenericText,\n\n      onFormClose,\n      onFormOpen,\n      onSubmitError,\n      onSubmitSuccess,\n      onFormSubmitted,\n    };\n\n    let _shadow: ShadowRoot | null = null;\n    let _mainStyle: HTMLStyleElement | null = null;\n    let _subscriptions: Unsubscribe[] = [];\n\n    /**\n     * Get the shadow root where we will append css\n     */\n    const _createShadow = (options: FeedbackInternalOptions): ShadowRoot => {\n      if (!_shadow) {\n        const host = DOCUMENT.createElement('div');\n        host.id = String(options.id);\n        DOCUMENT.body.appendChild(host);\n\n        _shadow = host.attachShadow({ mode: 'open' });\n        _mainStyle = createMainStyles(options);\n        _shadow.appendChild(_mainStyle);\n      }\n      return _shadow;\n    };\n\n    const _loadAndRenderDialog = async (\n      options: FeedbackInternalOptions,\n    ): Promise<ReturnType<FeedbackModalIntegration['createDialog']>> => {\n      const screenshotRequired = options.enableScreenshot && isScreenshotSupported();\n\n      let modalIntegration: FeedbackModalIntegration;\n      let screenshotIntegration: FeedbackScreenshotIntegration | undefined;\n\n      try {\n        const modalIntegrationFn = getModalIntegration\n          ? getModalIntegration()\n          : await lazyLoadIntegration('feedbackModalIntegration', scriptNonce);\n        modalIntegration = modalIntegrationFn() as FeedbackModalIntegration;\n        addIntegration(modalIntegration);\n      } catch {\n        DEBUG_BUILD &&\n          debug.error(\n            '[Feedback] Error when trying to load feedback integrations. Try using `feedbackSyncIntegration` in your `Sentry.init`.',\n          );\n        throw new Error('[Feedback] Missing feedback modal integration!');\n      }\n\n      try {\n        const screenshotIntegrationFn = screenshotRequired\n          ? getScreenshotIntegration\n            ? getScreenshotIntegration()\n            : await lazyLoadIntegration('feedbackScreenshotIntegration', scriptNonce)\n          : undefined;\n\n        if (screenshotIntegrationFn) {\n          screenshotIntegration = screenshotIntegrationFn() as FeedbackScreenshotIntegration;\n          addIntegration(screenshotIntegration);\n        }\n      } catch {\n        DEBUG_BUILD &&\n          debug.error('[Feedback] Missing feedback screenshot integration. Proceeding without screenshots.');\n      }\n\n      const errorMessages: FeedbackErrorMessages = {\n        ERROR_EMPTY_MESSAGE: options.errorEmptyMessageText,\n        ERROR_NO_CLIENT: options.errorNoClientText,\n        ERROR_TIMEOUT: options.errorTimeoutText,\n        ERROR_FORBIDDEN: options.errorForbiddenText,\n        ERROR_GENERIC: options.errorGenericText,\n      };\n      const wrappedSendFeedback: SendFeedback = (params, hint) =>\n        sendFeedback(params, { includeReplay: true, ...hint, errorMessages });\n\n      const dialog = modalIntegration.createDialog({\n        options: {\n          ...options,\n          onFormClose: () => {\n            dialog?.close();\n            options.onFormClose?.();\n          },\n          onFormSubmitted: () => {\n            dialog?.close();\n            options.onFormSubmitted?.();\n          },\n        },\n        screenshotIntegration,\n        sendFeedback: wrappedSendFeedback,\n        shadow: _createShadow(options),\n      });\n\n      return dialog;\n    };\n\n    const _attachTo = (el: Element | string, optionOverrides: OverrideFeedbackConfiguration = {}): Unsubscribe => {\n      const mergedOptions = mergeOptions(_options, optionOverrides);\n\n      const targetEl =\n        typeof el === 'string' ? DOCUMENT.querySelector(el) : typeof el.addEventListener === 'function' ? el : null;\n\n      if (!targetEl) {\n        DEBUG_BUILD && debug.error('[Feedback] Unable to attach to target element');\n        throw new Error('Unable to attach to target element');\n      }\n\n      let dialog: ReturnType<FeedbackModalIntegration['createDialog']> | null = null;\n      const handleClick = async (): Promise<void> => {\n        if (!dialog) {\n          dialog = await _loadAndRenderDialog({\n            ...mergedOptions,\n            onFormSubmitted: () => {\n              dialog?.removeFromDom();\n              mergedOptions.onFormSubmitted?.();\n            },\n          });\n        }\n        dialog.appendToDom();\n        dialog.open();\n      };\n      targetEl.addEventListener('click', handleClick);\n      const unsubscribe = (): void => {\n        _subscriptions = _subscriptions.filter(sub => sub !== unsubscribe);\n        dialog?.removeFromDom();\n        dialog = null;\n        targetEl.removeEventListener('click', handleClick);\n      };\n      _subscriptions.push(unsubscribe);\n      return unsubscribe;\n    };\n\n    const _createActor = (optionOverrides: OverrideFeedbackConfiguration = {}): ActorComponent => {\n      const mergedOptions = mergeOptions(_options, optionOverrides);\n      const shadow = _createShadow(mergedOptions);\n      const actor = Actor({\n        triggerLabel: mergedOptions.triggerLabel,\n        triggerAriaLabel: mergedOptions.triggerAriaLabel,\n        shadow,\n        styleNonce,\n      });\n      _attachTo(actor.el, {\n        ...mergedOptions,\n        onFormOpen() {\n          actor.hide();\n        },\n        onFormClose() {\n          actor.show();\n        },\n        onFormSubmitted() {\n          actor.show();\n        },\n      });\n      return actor;\n    };\n\n    return {\n      name: 'Feedback' as const,\n      setupOnce() {\n        if (!isBrowser() || !_options.autoInject) {\n          return;\n        }\n\n        if (DOCUMENT.readyState === 'loading') {\n          DOCUMENT.addEventListener('DOMContentLoaded', () => _createActor().appendToDom());\n        } else {\n          _createActor().appendToDom();\n        }\n      },\n\n      /**\n       * Adds click listener to the element to open a feedback dialog\n       *\n       * The returned function can be used to remove the click listener\n       */\n      attachTo: _attachTo,\n\n      /**\n       * Creates a new widget which is composed of a Button which triggers a Dialog.\n       * Accepts partial options to override any options passed to constructor.\n       */\n      createWidget(optionOverrides: OverrideFeedbackConfiguration = {}): ActorComponent {\n        const actor = _createActor(mergeOptions(_options, optionOverrides));\n        actor.appendToDom();\n        return actor;\n      },\n\n      /**\n       * Creates a new Form which you can\n       * Accepts partial options to override any options passed to constructor.\n       */\n      async createForm(\n        optionOverrides: OverrideFeedbackConfiguration = {},\n      ): Promise<ReturnType<FeedbackModalIntegration['createDialog']>> {\n        return _loadAndRenderDialog(mergeOptions(_options, optionOverrides));\n      },\n\n      /**\n       * Updates the color scheme of the feedback widget at runtime.\n       */\n      setTheme(colorScheme: 'light' | 'dark' | 'system'): void {\n        _options.colorScheme = colorScheme;\n        if (_shadow) {\n          const newStyle = createMainStyles(_options);\n          if (_mainStyle) {\n            _shadow.replaceChild(newStyle, _mainStyle);\n          } else {\n            _shadow.prepend(newStyle);\n          }\n          _mainStyle = newStyle;\n        }\n      },\n\n      /**\n       * Removes the Feedback integration (including host, shadow DOM, and all widgets)\n       */\n      remove(): void {\n        if (_shadow) {\n          _shadow.parentElement?.remove();\n          _shadow = null;\n          _mainStyle = null;\n        }\n        // Remove any lingering subscriptions\n        _subscriptions.forEach(sub => sub());\n        _subscriptions = [];\n      },\n    };\n  }) satisfies IntegrationFn;\n\n  return feedbackIntegration;\n};\n", "import { getClient } from '@sentry/core';\nimport type { buildFeedbackIntegration } from './integration';\n\ntype FeedbackIntegration = ReturnType<typeof buildFeedbackIntegration>;\n\n/**\n * This is a small utility to get a type-safe instance of the Feedback integration.\n */\nexport function getFeedback(): ReturnType<FeedbackIntegration> | undefined {\n  const client = getClient();\n  return client?.getIntegrationByName<ReturnType<FeedbackIntegration>>('Feedback');\n}\n", "var n,l,u,t,i,o,r,f,e,c={},s=[],a=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,h=Array.isArray;function v(n,l){for(var u in l)n[u]=l[u];return n}function p(n){var l=n.parentNode;l&&l.removeChild(n)}function y(l,u,t){var i,o,r,f={};for(r in u)\"key\"==r?i=u[r]:\"ref\"==r?o=u[r]:f[r]=u[r];if(arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):t),\"function\"==typeof l&&null!=l.defaultProps)for(r in l.defaultProps)void 0===f[r]&&(f[r]=l.defaultProps[r]);return d(l,f,i,o,null)}function d(n,t,i,o,r){var f={type:n,props:t,key:i,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==r?++u:r,__i:-1,__u:0};return null==r&&null!=l.vnode&&l.vnode(f),f}function _(){return{current:null}}function g(n){return n.children}function b(n,l){this.props=n,this.context=l}function m(n,l){if(null==l)return n.__?m(n.__,n.__i+1):null;for(var u;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e)return u.__e;return\"function\"==typeof n.type?m(n):null}function w(n,u,t){var i,o=n.__v,r=o.__e,f=n.__P;if(f)return(i=v({},o)).__v=o.__v+1,l.vnode&&l.vnode(i),M(f,i,o,n.__n,void 0!==f.ownerSVGElement,32&o.__u?[r]:null,u,null==r?m(o):r,!!(32&o.__u),t),i.__.__k[i.__i]=i,i.__d=void 0,i.__e!=r&&k(i),i}function k(n){var l,u;if(null!=(n=n.__)&&null!=n.__c){for(n.__e=n.__c.base=null,l=0;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e){n.__e=n.__c.base=u.__e;break}return k(n)}}function x(n){(!n.__d&&(n.__d=!0)&&i.push(n)&&!C.__r++||o!==l.debounceRendering)&&((o=l.debounceRendering)||r)(C)}function C(){var n,u,t,o=[],r=[];for(i.sort(f);n=i.shift();)n.__d&&(t=i.length,u=w(n,o,r)||u,0===t||i.length>t?(j(o,u,r),r.length=o.length=0,u=void 0,i.sort(f)):u&&l.__c&&l.__c(u,s));u&&j(o,u,r),C.__r=0}function P(n,l,u,t,i,o,r,f,e,a,h){var v,p,y,d,_,g=t&&t.__k||s,b=l.length;for(u.__d=e,S(u,l,g),e=u.__d,v=0;v<b;v++)null!=(y=u.__k[v])&&\"boolean\"!=typeof y&&\"function\"!=typeof y&&(p=-1===y.__i?c:g[y.__i]||c,y.__i=v,M(n,y,p,i,o,r,f,e,a,h),d=y.__e,y.ref&&p.ref!=y.ref&&(p.ref&&N(p.ref,null,y),h.push(y.ref,y.__c||d,y)),null==_&&null!=d&&(_=d),65536&y.__u||p.__k===y.__k?e=$(y,e,n):\"function\"==typeof y.type&&void 0!==y.__d?e=y.__d:d&&(e=d.nextSibling),y.__d=void 0,y.__u&=-196609);u.__d=e,u.__e=_}function S(n,l,u){var t,i,o,r,f,e=l.length,c=u.length,s=c,a=0;for(n.__k=[],t=0;t<e;t++)null!=(i=n.__k[t]=null==(i=l[t])||\"boolean\"==typeof i||\"function\"==typeof i?null:\"string\"==typeof i||\"number\"==typeof i||\"bigint\"==typeof i||i.constructor==String?d(null,i,null,null,i):h(i)?d(g,{children:i},null,null,null):void 0===i.constructor&&i.__b>0?d(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)?(i.__=n,i.__b=n.__b+1,f=I(i,u,r=t+a,s),i.__i=f,o=null,-1!==f&&(s--,(o=u[f])&&(o.__u|=131072)),null==o||null===o.__v?(-1==f&&a--,\"function\"!=typeof i.type&&(i.__u|=65536)):f!==r&&(f===r+1?a++:f>r?s>e-r?a+=f-r:a--:a=f<r&&f==r-1?f-r:0,f!==t+a&&(i.__u|=65536))):(o=u[t])&&null==o.key&&o.__e&&(o.__e==n.__d&&(n.__d=m(o)),O(o,o,!1),u[t]=null,s--);if(s)for(t=0;t<c;t++)null!=(o=u[t])&&0==(131072&o.__u)&&(o.__e==n.__d&&(n.__d=m(o)),O(o,o))}function $(n,l,u){var t,i;if(\"function\"==typeof n.type){for(t=n.__k,i=0;t&&i<t.length;i++)t[i]&&(t[i].__=n,l=$(t[i],l,u));return l}n.__e!=l&&(u.insertBefore(n.__e,l||null),l=n.__e);do{l=l&&l.nextSibling}while(null!=l&&8===l.nodeType);return l}function H(n,l){return l=l||[],null==n||\"boolean\"==typeof n||(h(n)?n.some(function(n){H(n,l)}):l.push(n)),l}function I(n,l,u,t){var i=n.key,o=n.type,r=u-1,f=u+1,e=l[u];if(null===e||e&&i==e.key&&o===e.type)return u;if(t>(null!=e&&0==(131072&e.__u)?1:0))for(;r>=0||f<l.length;){if(r>=0){if((e=l[r])&&0==(131072&e.__u)&&i==e.key&&o===e.type)return r;r--}if(f<l.length){if((e=l[f])&&0==(131072&e.__u)&&i==e.key&&o===e.type)return f;f++}}return-1}function T(n,l,u){\"-\"===l[0]?n.setProperty(l,null==u?\"\":u):n[l]=null==u?\"\":\"number\"!=typeof u||a.test(l)?u:u+\"px\"}function A(n,l,u,t,i){var o;n:if(\"style\"===l)if(\"string\"==typeof u)n.style.cssText=u;else{if(\"string\"==typeof t&&(n.style.cssText=t=\"\"),t)for(l in t)u&&l in u||T(n.style,l,\"\");if(u)for(l in u)t&&u[l]===t[l]||T(n.style,l,u[l])}else if(\"o\"===l[0]&&\"n\"===l[1])o=l!==(l=l.replace(/(PointerCapture)$|Capture$/i,\"$1\")),l=l.toLowerCase()in n?l.toLowerCase().slice(2):l.slice(2),n.l||(n.l={}),n.l[l+o]=u,u?t?u.u=t.u:(u.u=Date.now(),n.addEventListener(l,o?L:D,o)):n.removeEventListener(l,o?L:D,o);else{if(i)l=l.replace(/xlink(H|:h)/,\"h\").replace(/sName$/,\"s\");else if(\"width\"!==l&&\"height\"!==l&&\"href\"!==l&&\"list\"!==l&&\"form\"!==l&&\"tabIndex\"!==l&&\"download\"!==l&&\"rowSpan\"!==l&&\"colSpan\"!==l&&\"role\"!==l&&l in n)try{n[l]=null==u?\"\":u;break n}catch(n){}\"function\"==typeof u||(null==u||!1===u&&\"-\"!==l[4]?n.removeAttribute(l):n.setAttribute(l,u))}}function D(n){if(this.l){var u=this.l[n.type+!1];if(n.t){if(n.t<=u.u)return}else n.t=Date.now();return u(l.event?l.event(n):n)}}function L(n){if(this.l)return this.l[n.type+!0](l.event?l.event(n):n)}function M(n,u,t,i,o,r,f,e,c,s){var a,p,y,d,_,m,w,k,x,C,S,$,H,I,T,A=u.type;if(void 0!==u.constructor)return null;128&t.__u&&(c=!!(32&t.__u),r=[e=u.__e=t.__e]),(a=l.__b)&&a(u);n:if(\"function\"==typeof A)try{if(k=u.props,x=(a=A.contextType)&&i[a.__c],C=a?x?x.props.value:a.__:i,t.__c?w=(p=u.__c=t.__c).__=p.__E:(\"prototype\"in A&&A.prototype.render?u.__c=p=new A(k,C):(u.__c=p=new b(k,C),p.constructor=A,p.render=q),x&&x.sub(p),p.props=k,p.state||(p.state={}),p.context=C,p.__n=i,y=p.__d=!0,p.__h=[],p._sb=[]),null==p.__s&&(p.__s=p.state),null!=A.getDerivedStateFromProps&&(p.__s==p.state&&(p.__s=v({},p.__s)),v(p.__s,A.getDerivedStateFromProps(k,p.__s))),d=p.props,_=p.state,p.__v=u,y)null==A.getDerivedStateFromProps&&null!=p.componentWillMount&&p.componentWillMount(),null!=p.componentDidMount&&p.__h.push(p.componentDidMount);else{if(null==A.getDerivedStateFromProps&&k!==d&&null!=p.componentWillReceiveProps&&p.componentWillReceiveProps(k,C),!p.__e&&(null!=p.shouldComponentUpdate&&!1===p.shouldComponentUpdate(k,p.__s,C)||u.__v===t.__v)){for(u.__v!==t.__v&&(p.props=k,p.state=p.__s,p.__d=!1),u.__e=t.__e,u.__k=t.__k,u.__k.forEach(function(n){n&&(n.__=u)}),S=0;S<p._sb.length;S++)p.__h.push(p._sb[S]);p._sb=[],p.__h.length&&f.push(p);break n}null!=p.componentWillUpdate&&p.componentWillUpdate(k,p.__s,C),null!=p.componentDidUpdate&&p.__h.push(function(){p.componentDidUpdate(d,_,m)})}if(p.context=C,p.props=k,p.__P=n,p.__e=!1,$=l.__r,H=0,\"prototype\"in A&&A.prototype.render){for(p.state=p.__s,p.__d=!1,$&&$(u),a=p.render(p.props,p.state,p.context),I=0;I<p._sb.length;I++)p.__h.push(p._sb[I]);p._sb=[]}else do{p.__d=!1,$&&$(u),a=p.render(p.props,p.state,p.context),p.state=p.__s}while(p.__d&&++H<25);p.state=p.__s,null!=p.getChildContext&&(i=v(v({},i),p.getChildContext())),y||null==p.getSnapshotBeforeUpdate||(m=p.getSnapshotBeforeUpdate(d,_)),P(n,h(T=null!=a&&a.type===g&&null==a.key?a.props.children:a)?T:[T],u,t,i,o,r,f,e,c,s),p.base=u.__e,u.__u&=-161,p.__h.length&&f.push(p),w&&(p.__E=p.__=null)}catch(n){u.__v=null,c||null!=r?(u.__e=e,u.__u|=c?160:32,r[r.indexOf(e)]=null):(u.__e=t.__e,u.__k=t.__k),l.__e(n,u,t)}else null==r&&u.__v===t.__v?(u.__k=t.__k,u.__e=t.__e):u.__e=z(t.__e,u,t,i,o,r,f,c,s);(a=l.diffed)&&a(u)}function j(n,u,t){for(var i=0;i<t.length;i++)N(t[i],t[++i],t[++i]);l.__c&&l.__c(u,n),n.some(function(u){try{n=u.__h,u.__h=[],n.some(function(n){n.call(u)})}catch(n){l.__e(n,u.__v)}})}function z(l,u,t,i,o,r,f,e,s){var a,v,y,d,_,g,b,w=t.props,k=u.props,x=u.type;if(\"svg\"===x&&(o=!0),null!=r)for(a=0;a<r.length;a++)if((_=r[a])&&\"setAttribute\"in _==!!x&&(x?_.localName===x:3===_.nodeType)){l=_,r[a]=null;break}if(null==l){if(null===x)return document.createTextNode(k);l=o?document.createElementNS(\"http://www.w3.org/2000/svg\",x):document.createElement(x,k.is&&k),r=null,e=!1}if(null===x)w===k||e&&l.data===k||(l.data=k);else{if(r=r&&n.call(l.childNodes),w=t.props||c,!e&&null!=r)for(w={},a=0;a<l.attributes.length;a++)w[(_=l.attributes[a]).name]=_.value;for(a in w)_=w[a],\"children\"==a||(\"dangerouslySetInnerHTML\"==a?y=_:\"key\"===a||a in k||A(l,a,null,_,o));for(a in k)_=k[a],\"children\"==a?d=_:\"dangerouslySetInnerHTML\"==a?v=_:\"value\"==a?g=_:\"checked\"==a?b=_:\"key\"===a||e&&\"function\"!=typeof _||w[a]===_||A(l,a,_,w[a],o);if(v)e||y&&(v.__html===y.__html||v.__html===l.innerHTML)||(l.innerHTML=v.__html),u.__k=[];else if(y&&(l.innerHTML=\"\"),P(l,h(d)?d:[d],u,t,i,o&&\"foreignObject\"!==x,r,f,r?r[0]:t.__k&&m(t,0),e,s),null!=r)for(a=r.length;a--;)null!=r[a]&&p(r[a]);e||(a=\"value\",void 0!==g&&(g!==l[a]||\"progress\"===x&&!g||\"option\"===x&&g!==w[a])&&A(l,a,g,w[a],!1),a=\"checked\",void 0!==b&&b!==l[a]&&A(l,a,b,w[a],!1))}return l}function N(n,u,t){try{\"function\"==typeof n?n(u):n.current=u}catch(n){l.__e(n,t)}}function O(n,u,t){var i,o;if(l.unmount&&l.unmount(n),(i=n.ref)&&(i.current&&i.current!==n.__e||N(i,null,u)),null!=(i=n.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(n){l.__e(n,u)}i.base=i.__P=null,n.__c=void 0}if(i=n.__k)for(o=0;o<i.length;o++)i[o]&&O(i[o],u,t||\"function\"!=typeof n.type);t||null==n.__e||p(n.__e),n.__=n.__e=n.__d=void 0}function q(n,l,u){return this.constructor(n,u)}function B(u,t,i){var o,r,f,e;l.__&&l.__(u,t),r=(o=\"function\"==typeof i)?null:i&&i.__k||t.__k,f=[],e=[],M(t,u=(!o&&i||t).__k=y(g,null,[u]),r||c,c,void 0!==t.ownerSVGElement,!o&&i?[i]:r?null:t.firstChild?n.call(t.childNodes):null,f,!o&&i?i:r?r.__e:t.firstChild,o,e),u.__d=void 0,j(f,u,e)}function E(n,l){B(n,l,E)}function F(l,u,t){var i,o,r,f,e=v({},l.props);for(r in l.type&&l.type.defaultProps&&(f=l.type.defaultProps),u)\"key\"==r?i=u[r]:\"ref\"==r?o=u[r]:e[r]=void 0===u[r]&&void 0!==f?f[r]:u[r];return arguments.length>2&&(e.children=arguments.length>3?n.call(arguments,2):t),d(l.type,e,i||l.key,o||l.ref,null)}function G(n,l){var u={__c:l=\"__cC\"+e++,__:n,Consumer:function(n,l){return n.children(l)},Provider:function(n){var u,t;return this.getChildContext||(u=[],(t={})[l]=this,this.getChildContext=function(){return t},this.shouldComponentUpdate=function(n){this.props.value!==n.value&&u.some(function(n){n.__e=!0,x(n)})},this.sub=function(n){u.push(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){u.splice(u.indexOf(n),1),l&&l.call(n)}}),n.children}};return u.Provider.__=u.Consumer.contextType=u}n=s.slice,l={__e:function(n,l,u,t){for(var i,o,r;l=l.__;)if((i=l.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(n)),r=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(n,t||{}),r=i.__d),r)return i.__E=i}catch(l){n=l}throw n}},u=0,t=function(n){return null!=n&&null==n.constructor},b.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=v({},this.state),\"function\"==typeof n&&(n=n(v({},u),this.props)),n&&v(u,n),null!=n&&this.__v&&(l&&this._sb.push(l),x(this))},b.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),x(this))},b.prototype.render=g,i=[],r=\"function\"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,f=function(n,l){return n.__v.__b-l.__v.__b},C.__r=0,e=0;export{b as Component,g as Fragment,F as cloneElement,G as createContext,y as createElement,_ as createRef,y as h,E as hydrate,t as isValidElement,l as options,B as render,H as toChildArray};\n//# sourceMappingURL=preact.module.js.map\n", "import{options as n}from\"preact\";var t,r,u,i,o=0,f=[],c=[],e=n,a=e.__b,v=e.__r,l=e.diffed,m=e.__c,s=e.unmount,d=e.__;function h(n,t){e.__h&&e.__h(r,n,o||t),o=0;var u=r.__H||(r.__H={__:[],__h:[]});return n>=u.__.length&&u.__.push({__V:c}),u.__[n]}function p(n){return o=1,y(D,n)}function y(n,u,i){var o=h(t++,2);if(o.t=n,!o.__c&&(o.__=[i?i(u):D(void 0,u),function(n){var t=o.__N?o.__N[0]:o.__[0],r=o.t(t,n);t!==r&&(o.__N=[r,o.__[1]],o.__c.setState({}))}],o.__c=r,!r.u)){var f=function(n,t,r){if(!o.__c.__H)return!0;var u=o.__c.__H.__.filter(function(n){return!!n.__c});if(u.every(function(n){return!n.__N}))return!c||c.call(this,n,t,r);var i=!1;return u.forEach(function(n){if(n.__N){var t=n.__[0];n.__=n.__N,n.__N=void 0,t!==n.__[0]&&(i=!0)}}),!(!i&&o.__c.props===n)&&(!c||c.call(this,n,t,r))};r.u=!0;var c=r.shouldComponentUpdate,e=r.componentWillUpdate;r.componentWillUpdate=function(n,t,r){if(this.__e){var u=c;c=void 0,f(n,t,r),c=u}e&&e.call(this,n,t,r)},r.shouldComponentUpdate=f}return o.__N||o.__}function _(n,u){var i=h(t++,3);!e.__s&&C(i.__H,u)&&(i.__=n,i.i=u,r.__H.__h.push(i))}function A(n,u){var i=h(t++,4);!e.__s&&C(i.__H,u)&&(i.__=n,i.i=u,r.__h.push(i))}function F(n){return o=5,q(function(){return{current:n}},[])}function T(n,t,r){o=6,A(function(){return\"function\"==typeof n?(n(t()),function(){return n(null)}):n?(n.current=t(),function(){return n.current=null}):void 0},null==r?r:r.concat(n))}function q(n,r){var u=h(t++,7);return C(u.__H,r)?(u.__V=n(),u.i=r,u.__h=n,u.__V):u.__}function x(n,t){return o=8,q(function(){return n},t)}function P(n){var u=r.context[n.__c],i=h(t++,9);return i.c=n,u?(null==i.__&&(i.__=!0,u.sub(r)),u.props.value):n.__}function V(n,t){e.useDebugValue&&e.useDebugValue(t?t(n):n)}function b(n){var u=h(t++,10),i=p();return u.__=n,r.componentDidCatch||(r.componentDidCatch=function(n,t){u.__&&u.__(n,t),i[1](n)}),[i[0],function(){i[1](void 0)}]}function g(){var n=h(t++,11);if(!n.__){for(var u=r.__v;null!==u&&!u.__m&&null!==u.__;)u=u.__;var i=u.__m||(u.__m=[0,0]);n.__=\"P\"+i[0]+\"-\"+i[1]++}return n.__}function j(){for(var n;n=f.shift();)if(n.__P&&n.__H)try{n.__H.__h.forEach(z),n.__H.__h.forEach(B),n.__H.__h=[]}catch(t){n.__H.__h=[],e.__e(t,n.__v)}}e.__b=function(n){r=null,a&&a(n)},e.__=function(n,t){t.__k&&t.__k.__m&&(n.__m=t.__k.__m),d&&d(n,t)},e.__r=function(n){v&&v(n),t=0;var i=(r=n.__c).__H;i&&(u===r?(i.__h=[],r.__h=[],i.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=c,n.__N=n.i=void 0})):(i.__h.forEach(z),i.__h.forEach(B),i.__h=[],t=0)),u=r},e.diffed=function(n){l&&l(n);var t=n.__c;t&&t.__H&&(t.__H.__h.length&&(1!==f.push(t)&&i===e.requestAnimationFrame||((i=e.requestAnimationFrame)||w)(j)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==c&&(n.__=n.__V),n.i=void 0,n.__V=c})),u=r=null},e.__c=function(n,t){t.some(function(n){try{n.__h.forEach(z),n.__h=n.__h.filter(function(n){return!n.__||B(n)})}catch(r){t.some(function(n){n.__h&&(n.__h=[])}),t=[],e.__e(r,n.__v)}}),m&&m(n,t)},e.unmount=function(n){s&&s(n);var t,r=n.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{z(n)}catch(n){t=n}}),r.__H=void 0,t&&e.__e(t,r.__v))};var k=\"function\"==typeof requestAnimationFrame;function w(n){var t,r=function(){clearTimeout(u),k&&cancelAnimationFrame(t),setTimeout(n)},u=setTimeout(r,100);k&&(t=requestAnimationFrame(r))}function z(n){var t=r,u=n.__c;\"function\"==typeof u&&(n.__c=void 0,u()),r=t}function B(n){var t=r;n.__c=n.__(),r=t}function C(n,t){return!n||n.length!==t.length||t.some(function(t,r){return t!==n[r]})}function D(n,t){return\"function\"==typeof t?t(n):t}export{x as useCallback,P as useContext,V as useDebugValue,_ as useEffect,b as useErrorBoundary,g as useId,T as useImperativeHandle,A as useLayoutEffect,q as useMemo,y as useReducer,F as useRef,p as useState};\n//# sourceMappingURL=hooks.module.js.map\n", "import { DOCUMENT } from '../../constants';\nimport { setAttributesNS } from '../../util/setAttributesNS';\n\nconst XMLNS = 'http://www.w3.org/2000/svg';\n\n/**\n * Sentry Logo\n */\nexport function SentryLogo(): SVGElement {\n  const createElementNS = <K extends keyof SVGElementTagNameMap>(tagName: K): SVGElementTagNameMap[K] =>\n    DOCUMENT.createElementNS(XMLNS, tagName);\n  const svg = setAttributesNS(createElementNS('svg'), {\n    width: '32',\n    height: '30',\n    viewBox: '0 0 72 66',\n    fill: 'inherit',\n  });\n\n  const path = setAttributesNS(createElementNS('path'), {\n    transform: 'translate(11, 11)',\n    d: 'M29,2.26a4.67,4.67,0,0,0-8,0L14.42,13.53A32.21,32.21,0,0,1,32.17,40.19H27.55A27.68,27.68,0,0,0,12.09,17.47L6,28a15.92,15.92,0,0,1,9.23,12.17H4.62A.76.76,0,0,1,4,39.06l2.94-5a10.74,10.74,0,0,0-3.36-1.9l-2.91,5a4.54,4.54,0,0,0,1.69,6.24A4.66,4.66,0,0,0,4.62,44H19.15a19.4,19.4,0,0,0-8-17.31l2.31-4A23.87,23.87,0,0,1,23.76,44H36.07a35.88,35.88,0,0,0-16.41-31.8l4.67-8a.77.77,0,0,1,1.05-.27c.53.29,20.29,34.77,20.66,35.17a.76.76,0,0,1-.68,1.13H40.6q.09,1.91,0,3.81h4.78A4.59,4.59,0,0,0,50,39.43a4.49,4.49,0,0,0-.62-2.28Z',\n  });\n  svg.appendChild(path);\n\n  return svg;\n}\n", "import type { FeedbackInternalOptions } from '@sentry/core';\nimport type { VNode } from 'preact';\nimport { h } from 'preact'; // eslint-disable-line @typescript-eslint/no-unused-vars\nimport { useMemo } from 'preact/hooks';\nimport { SentryLogo } from './SentryLogo';\n\nexport interface Props {\n  options: FeedbackInternalOptions;\n}\n\nexport function DialogHeader({ options }: Props): VNode {\n  const logoHtml = useMemo(() => ({ __html: SentryLogo().outerHTML }), []);\n\n  return (\n    <h2 class=\"dialog__header\">\n      <span class=\"dialog__title\">{options.formTitle}</span>\n      {options.showBranding ? (\n        <a\n          class=\"brand-link\"\n          target=\"_blank\"\n          href=\"https://sentry.io/welcome/\"\n          title=\"Powered by Sentry\"\n          rel=\"noopener noreferrer\"\n          dangerouslySetInnerHTML={logoHtml}\n        />\n      ) : null}\n    </h2>\n  );\n}\n", "import type { FeedbackFormData, FeedbackInternalOptions } from '@sentry/core';\n\nexport type Props = Pick<\n  FeedbackInternalOptions,\n  'emailLabel' | 'isEmailRequired' | 'isNameRequired' | 'messageLabel' | 'nameLabel'\n>;\n\n/**\n * Validate that a given feedback submission has the required fields\n */\nexport function getMissingFields(feedback: FeedbackFormData, props: Props): string[] {\n  const emptyFields = [];\n  if (props.isNameRequired && !feedback.name) {\n    emptyFields.push(props.nameLabel);\n  }\n  if (props.isEmailRequired && !feedback.email) {\n    emptyFields.push(props.emailLabel);\n  }\n  if (!feedback.message) {\n    emptyFields.push(props.messageLabel);\n  }\n\n  return emptyFields;\n}\n", "import type {\n  FeedbackFormData,\n  FeedbackInternalOptions,\n  FeedbackScreenshotIntegration,\n  SendFeedback,\n} from '@sentry/core';\nimport { debug } from '@sentry/core';\nimport type { JSX, VNode } from 'preact';\nimport { h } from 'preact'; // eslint-disable-line @typescript-eslint/no-unused-vars\nimport { useCallback, useState } from 'preact/hooks';\nimport { FEEDBACK_WIDGET_SOURCE } from '../../constants';\nimport { DEBUG_BUILD } from '../../util/debug-build';\nimport { getMissingFields } from '../../util/validate';\n\nexport interface Props extends Pick<FeedbackInternalOptions, 'showEmail' | 'showName'> {\n  options: FeedbackInternalOptions;\n  defaultEmail: string;\n  defaultName: string;\n  onFormClose: () => void;\n  onSubmit: SendFeedback;\n  onSubmitSuccess: (data: FeedbackFormData, eventId: string) => void;\n  onSubmitError: (error: Error) => void;\n  screenshotInput: ReturnType<FeedbackScreenshotIntegration['createInput']> | undefined;\n}\n\nfunction retrieveStringValue(formData: FormData, key: string): string {\n  const value = formData.get(key);\n  if (typeof value === 'string') {\n    return value.trim();\n  }\n  return '';\n}\n\nexport function Form({\n  options,\n  defaultEmail,\n  defaultName,\n\n  onFormClose,\n  onSubmit,\n  onSubmitSuccess,\n  onSubmitError,\n  showEmail,\n  showName,\n  screenshotInput,\n}: Props): VNode {\n  const {\n    tags,\n    addScreenshotButtonLabel,\n    removeScreenshotButtonLabel,\n    cancelButtonLabel,\n    emailLabel,\n    emailPlaceholder,\n    isEmailRequired,\n    isNameRequired,\n    messageLabel,\n    messagePlaceholder,\n    nameLabel,\n    namePlaceholder,\n    submitButtonLabel,\n    isRequiredLabel,\n  } = options;\n  const [isSubmitting, setIsSubmitting] = useState<boolean>(false);\n  // TODO: set a ref on the form, and whenever an input changes call processForm() and setError()\n  const [error, setError] = useState<null | string>(null);\n\n  const [showScreenshotInput, setShowScreenshotInput] = useState(false);\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  const ScreenshotInputComponent: any = screenshotInput?.input;\n\n  const [screenshotError, setScreenshotError] = useState<null | Error>(null);\n  const onScreenshotError = useCallback((error: Error) => {\n    setScreenshotError(error);\n    setShowScreenshotInput(false);\n  }, []);\n\n  const hasAllRequiredFields = useCallback(\n    (data: FeedbackFormData) => {\n      const missingFields = getMissingFields(data, {\n        emailLabel,\n        isEmailRequired,\n        isNameRequired,\n        messageLabel,\n        nameLabel,\n      });\n\n      if (missingFields.length > 0) {\n        setError(`Please enter in the following required fields: ${missingFields.join(', ')}`);\n      } else {\n        setError(null);\n      }\n\n      return missingFields.length === 0;\n    },\n    [emailLabel, isEmailRequired, isNameRequired, messageLabel, nameLabel],\n  );\n\n  const handleSubmit = useCallback(\n    async (e: JSX.TargetedSubmitEvent<HTMLFormElement>) => {\n      setIsSubmitting(true);\n      try {\n        e.preventDefault();\n        if (!(e.target instanceof HTMLFormElement)) {\n          return;\n        }\n        const formData = new FormData(e.target);\n        const attachment = await (screenshotInput && showScreenshotInput ? screenshotInput.value() : undefined);\n\n        const data: FeedbackFormData = {\n          name: retrieveStringValue(formData, 'name'),\n          email: retrieveStringValue(formData, 'email'),\n          message: retrieveStringValue(formData, 'message'),\n          attachments: attachment ? [attachment] : undefined,\n        };\n\n        if (!hasAllRequiredFields(data)) {\n          return;\n        }\n\n        try {\n          const eventId = await onSubmit(\n            {\n              name: data.name,\n              email: data.email,\n              message: data.message,\n              source: FEEDBACK_WIDGET_SOURCE,\n              tags,\n            },\n            { attachments: data.attachments },\n          );\n          onSubmitSuccess(data, eventId);\n        } catch (error) {\n          DEBUG_BUILD && debug.error(error);\n          const err = error instanceof Error ? error : new Error(String(error));\n          setError(err.message);\n          onSubmitError(err);\n        }\n      } finally {\n        setIsSubmitting(false);\n      }\n    },\n    [screenshotInput && showScreenshotInput, onSubmitSuccess, onSubmitError],\n  );\n\n  return (\n    <form class=\"form\" onSubmit={handleSubmit}>\n      {ScreenshotInputComponent && showScreenshotInput ? (\n        <ScreenshotInputComponent onError={onScreenshotError} />\n      ) : null}\n\n      <fieldset class=\"form__right\" data-sentry-feedback={true} disabled={isSubmitting}>\n        <div class=\"form__top\">\n          {error ? <div class=\"form__error-container\">{error}</div> : null}\n\n          {showName ? (\n            <label for=\"name\" class=\"form__label\">\n              <LabelText label={nameLabel} isRequiredLabel={isRequiredLabel} isRequired={isNameRequired} />\n              <input\n                class=\"form__input\"\n                defaultValue={defaultName}\n                id=\"name\"\n                name=\"name\"\n                placeholder={namePlaceholder}\n                required={isNameRequired}\n                type=\"text\"\n              />\n            </label>\n          ) : (\n            <input aria-hidden value={defaultName} name=\"name\" type=\"hidden\" />\n          )}\n\n          {showEmail ? (\n            <label for=\"email\" class=\"form__label\">\n              <LabelText label={emailLabel} isRequiredLabel={isRequiredLabel} isRequired={isEmailRequired} />\n              <input\n                class=\"form__input\"\n                defaultValue={defaultEmail}\n                id=\"email\"\n                name=\"email\"\n                placeholder={emailPlaceholder}\n                required={isEmailRequired}\n                type=\"email\"\n              ></input>\n            </label>\n          ) : (\n            <input aria-hidden value={defaultEmail} name=\"email\" type=\"hidden\" />\n          )}\n\n          <label for=\"message\" class=\"form__label\">\n            <LabelText label={messageLabel} isRequiredLabel={isRequiredLabel} isRequired />\n            <textarea\n              autoFocus\n              class=\"form__input form__input--textarea\"\n              id=\"message\"\n              name=\"message\"\n              placeholder={messagePlaceholder}\n              required={true}\n              rows={5}\n            />\n          </label>\n\n          {ScreenshotInputComponent ? (\n            <label for=\"screenshot\" class=\"form__label\">\n              <button\n                class=\"btn btn--default\"\n                disabled={isSubmitting}\n                type=\"button\"\n                onClick={() => {\n                  setScreenshotError(null);\n                  setShowScreenshotInput(prev => !prev);\n                }}\n              >\n                {showScreenshotInput ? removeScreenshotButtonLabel : addScreenshotButtonLabel}\n              </button>\n              {screenshotError ? <div class=\"form__error-container\">{screenshotError.message}</div> : null}\n            </label>\n          ) : null}\n        </div>\n        <div class=\"btn-group\">\n          <button class=\"btn btn--primary\" disabled={isSubmitting} type=\"submit\">\n            {submitButtonLabel}\n          </button>\n          <button class=\"btn btn--default\" disabled={isSubmitting} type=\"button\" onClick={onFormClose}>\n            {cancelButtonLabel}\n          </button>\n        </div>\n      </fieldset>\n    </form>\n  );\n}\n\nfunction LabelText({\n  label,\n  isRequired,\n  isRequiredLabel,\n}: {\n  label: string;\n  isRequired: boolean;\n  isRequiredLabel: string;\n}): VNode {\n  return (\n    <span class=\"form__label__text\">\n      {label}\n      {isRequired && <span class=\"form__label__text--required\">{isRequiredLabel}</span>}\n    </span>\n  );\n}\n", "import { WINDOW } from '../../constants';\nimport { setAttributesNS } from '../../util/setAttributesNS';\n\nconst WIDTH = 16;\nconst HEIGHT = 17;\nconst XMLNS = 'http://www.w3.org/2000/svg';\n\n/**\n * Success Icon (checkmark)\n */\nexport function SuccessIcon(): SVGElement {\n  const createElementNS = <K extends keyof SVGElementTagNameMap>(tagName: K): SVGElementTagNameMap[K] =>\n    WINDOW.document.createElementNS(XMLNS, tagName);\n  const svg = setAttributesNS(createElementNS('svg'), {\n    width: `${WIDTH}`,\n    height: `${HEIGHT}`,\n    viewBox: `0 0 ${WIDTH} ${HEIGHT}`,\n    fill: 'inherit',\n  });\n\n  const g = setAttributesNS(createElementNS('g'), {\n    clipPath: 'url(#clip0_57_156)',\n  });\n\n  const path2 = setAttributesNS(createElementNS('path'), {\n    ['fill-rule']: 'evenodd',\n    ['clip-rule']: 'evenodd',\n    d: 'M3.55544 15.1518C4.87103 16.0308 6.41775 16.5 8 16.5C10.1217 16.5 12.1566 15.6571 13.6569 14.1569C15.1571 12.6566 16 10.6217 16 8.5C16 6.91775 15.5308 5.37103 14.6518 4.05544C13.7727 2.73985 12.5233 1.71447 11.0615 1.10897C9.59966 0.503466 7.99113 0.34504 6.43928 0.653721C4.88743 0.962403 3.46197 1.72433 2.34315 2.84315C1.22433 3.96197 0.462403 5.38743 0.153721 6.93928C-0.15496 8.49113 0.00346625 10.0997 0.608967 11.5615C1.21447 13.0233 2.23985 14.2727 3.55544 15.1518ZM4.40546 3.1204C5.46945 2.40946 6.72036 2.03 8 2.03C9.71595 2.03 11.3616 2.71166 12.575 3.92502C13.7883 5.13838 14.47 6.78405 14.47 8.5C14.47 9.77965 14.0905 11.0306 13.3796 12.0945C12.6687 13.1585 11.6582 13.9878 10.476 14.4775C9.29373 14.9672 7.99283 15.0953 6.73777 14.8457C5.48271 14.596 4.32987 13.9798 3.42502 13.075C2.52018 12.1701 1.90397 11.0173 1.65432 9.76224C1.40468 8.50718 1.5328 7.20628 2.0225 6.02404C2.5122 4.8418 3.34148 3.83133 4.40546 3.1204Z',\n  });\n  const path = setAttributesNS(createElementNS('path'), {\n    d: 'M6.68775 12.4297C6.78586 12.4745 6.89218 12.4984 7 12.5C7.11275 12.4955 7.22315 12.4664 7.32337 12.4145C7.4236 12.3627 7.51121 12.2894 7.58 12.2L12 5.63999C12.0848 5.47724 12.1071 5.28902 12.0625 5.11098C12.0178 4.93294 11.9095 4.77744 11.7579 4.67392C11.6064 4.57041 11.4221 4.52608 11.24 4.54931C11.0579 4.57254 10.8907 4.66173 10.77 4.79999L6.88 10.57L5.13 8.56999C5.06508 8.49566 4.98613 8.43488 4.89768 8.39111C4.80922 8.34735 4.713 8.32148 4.61453 8.31498C4.51605 8.30847 4.41727 8.32147 4.32382 8.35322C4.23038 8.38497 4.14413 8.43484 4.07 8.49999C3.92511 8.63217 3.83692 8.81523 3.82387 9.01092C3.81083 9.2066 3.87393 9.39976 4 9.54999L6.43 12.24C6.50187 12.3204 6.58964 12.385 6.68775 12.4297Z',\n  });\n\n  svg.appendChild(g).append(path, path2);\n\n  const speakerDefs = createElementNS('defs');\n  const speakerClipPathDef = setAttributesNS(createElementNS('clipPath'), {\n    id: 'clip0_57_156',\n  });\n\n  const speakerRect = setAttributesNS(createElementNS('rect'), {\n    width: `${WIDTH}`,\n    height: `${WIDTH}`,\n    fill: 'white',\n    transform: 'translate(0 0.5)',\n  });\n\n  speakerClipPathDef.appendChild(speakerRect);\n  speakerDefs.appendChild(speakerClipPathDef);\n\n  svg.appendChild(speakerDefs).appendChild(speakerClipPathDef).appendChild(speakerRect);\n\n  return svg;\n}\n", "import type { FeedbackFormData, FeedbackInternalOptions } from '@sentry/core';\nimport type { VNode } from 'preact';\nimport { Fragment, h } from 'preact'; // eslint-disable-line @typescript-eslint/no-unused-vars\nimport { useCallback, useMemo, useState } from 'preact/hooks';\nimport { SUCCESS_MESSAGE_TIMEOUT } from '../../constants';\nimport type { Props as HeaderProps } from './DialogHeader';\nimport { DialogHeader } from './DialogHeader';\nimport type { Props as FormProps } from './Form';\nimport { Form } from './Form';\nimport { SuccessIcon } from './SuccessIcon';\n\ninterface Props extends HeaderProps, FormProps {\n  onFormSubmitted: () => void;\n  open: boolean;\n  options: FeedbackInternalOptions;\n}\n\nexport function Dialog({ open, onFormSubmitted, ...props }: Props): VNode {\n  const options = props.options;\n  const successIconHtml = useMemo(() => ({ __html: SuccessIcon().outerHTML }), []);\n\n  const [timeoutId, setTimeoutId] = useState<NodeJS.Timeout | null>(null);\n\n  const handleOnSuccessClick = useCallback(() => {\n    if (timeoutId) {\n      clearTimeout(timeoutId);\n      setTimeoutId(null);\n    }\n    onFormSubmitted();\n  }, [timeoutId]);\n\n  const onSubmitSuccess = useCallback(\n    (data: FeedbackFormData, eventId: string) => {\n      props.onSubmitSuccess(data, eventId);\n      setTimeoutId(\n        setTimeout(() => {\n          onFormSubmitted();\n          setTimeoutId(null);\n        }, SUCCESS_MESSAGE_TIMEOUT),\n      );\n    },\n    [onFormSubmitted],\n  );\n\n  return (\n    <Fragment>\n      {timeoutId ? (\n        <div class=\"success__position\" onClick={handleOnSuccessClick}>\n          <div class=\"success__content\">\n            {options.successMessageText}\n            <span class=\"success__icon\" dangerouslySetInnerHTML={successIconHtml} />\n          </div>\n        </div>\n      ) : (\n        <dialog class=\"dialog\" onClick={options.onFormClose} open={open}>\n          <div class=\"dialog__position\">\n            <div\n              class=\"dialog__content\"\n              onClick={e => {\n                // Stop event propagation so clicks on content modal do not propagate to dialog (which will close dialog)\n                e.stopPropagation();\n              }}\n            >\n              <DialogHeader options={options} />\n              <Form {...props} onSubmitSuccess={onSubmitSuccess} />\n            </div>\n          </div>\n        </dialog>\n      )}\n    </Fragment>\n  );\n}\n", "import { DOCUMENT } from '../../constants';\n\nconst DIALOG = `\n.dialog {\n  position: fixed;\n  z-index: var(--z-index);\n  margin: 0;\n  inset: 0;\n\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  padding: 0;\n  height: 100vh;\n  width: 100vw;\n\n  color: var(--dialog-color, var(--foreground));\n  fill: var(--dialog-color, var(--foreground));\n  line-height: 1.75em;\n\n  background-color: rgba(0, 0, 0, 0.05);\n  border: none;\n  inset: 0;\n  opacity: 1;\n  transition: opacity 0.2s ease-in-out;\n}\n\n.dialog__position {\n  position: fixed;\n  z-index: var(--z-index);\n  inset: var(--dialog-inset);\n  padding: var(--page-margin);\n  display: flex;\n  max-height: calc(100vh - (2 * var(--page-margin)));\n}\n@media (max-width: 600px) {\n  .dialog__position {\n    inset: var(--page-margin);\n    padding: 0;\n  }\n}\n\n.dialog__position:has(.editor) {\n  inset: var(--page-margin);\n  padding: 0;\n}\n\n.dialog:not([open]) {\n  opacity: 0;\n  pointer-events: none;\n  visibility: hidden;\n}\n.dialog:not([open]) .dialog__content {\n  transform: translate(0, -16px) scale(0.98);\n}\n\n.dialog__content {\n  display: flex;\n  flex-direction: column;\n  gap: 16px;\n  padding: var(--dialog-padding, 24px);\n  max-width: 100%;\n  width: 100%;\n  max-height: 100%;\n  overflow: auto;\n\n  background: var(--dialog-background, var(--background));\n  border-radius: var(--dialog-border-radius, 20px);\n  border: var(--dialog-border, var(--border));\n  box-shadow: var(--dialog-box-shadow, var(--box-shadow));\n  transform: translate(0, 0) scale(1);\n  transition: transform 0.2s ease-in-out;\n}\n\n`;\n\nconst DIALOG_HEADER = `\n.dialog__header {\n  display: flex;\n  gap: 4px;\n  justify-content: space-between;\n  font-weight: var(--dialog-header-weight, 600);\n  margin: 0;\n}\n.dialog__title {\n  align-self: center;\n  width: var(--form-width, 272px);\n}\n\n@media (max-width: 600px) {\n  .dialog__title {\n    width: auto;\n  }\n}\n\n.dialog__position:has(.editor) .dialog__title {\n  width: auto;\n}\n\n\n.brand-link {\n  display: inline-flex;\n}\n.brand-link:focus-visible {\n  outline: var(--outline);\n}\n`;\n\nconst FORM = `\n.form {\n  display: flex;\n  overflow: auto;\n  flex-direction: row;\n  gap: 16px;\n  flex: 1 0;\n}\n\n.form fieldset {\n  border: none;\n  margin: 0;\n  padding: 0;\n}\n\n.form__right {\n  flex: 0 0 auto;\n  display: flex;\n  overflow: auto;\n  flex-direction: column;\n  justify-content: space-between;\n  gap: 20px;\n  width: var(--form-width, 100%);\n}\n\n.dialog__position:has(.editor) .form__right {\n  width: var(--form-width, 272px);\n}\n\n.form__top {\n  display: flex;\n  flex-direction: column;\n  gap: 8px;\n}\n\n.form__error-container {\n  color: var(--error-color);\n  fill: var(--error-color);\n}\n\n.form__label {\n  display: flex;\n  flex-direction: column;\n  gap: 4px;\n  margin: 0px;\n}\n\n.form__label__text {\n  display: flex;\n  gap: 4px;\n  align-items: center;\n}\n\n.form__label__text--required {\n  font-size: 0.85em;\n}\n\n.form__input {\n  font-family: inherit;\n  line-height: inherit;\n  background: transparent;\n  box-sizing: border-box;\n  border: var(--input-border, var(--border));\n  border-radius: var(--input-border-radius, 6px);\n  color: var(--input-color, inherit);\n  fill: var(--input-color, inherit);\n  font-size: var(--input-font-size, inherit);\n  font-weight: var(--input-font-weight, 500);\n  padding: 6px 12px;\n}\n\n.form__input::placeholder {\n  opacity: 0.65;\n  color: var(--input-placeholder-color, inherit);\n  filter: var(--interactive-filter);\n}\n\n.form__input:focus-visible {\n  outline: var(--input-focus-outline, var(--outline));\n}\n\n.form__input--textarea {\n  font-family: inherit;\n  resize: vertical;\n}\n\n.error {\n  color: var(--error-color);\n  fill: var(--error-color);\n}\n`;\n\nconst BUTTON = `\n.btn-group {\n  display: grid;\n  gap: 8px;\n}\n\n.btn {\n  line-height: inherit;\n  border: var(--button-border, var(--border));\n  border-radius: var(--button-border-radius, 6px);\n  cursor: pointer;\n  font-family: inherit;\n  font-size: var(--button-font-size, inherit);\n  font-weight: var(--button-font-weight, 600);\n  padding: var(--button-padding, 6px 16px);\n}\n.btn[disabled] {\n  opacity: 0.6;\n  pointer-events: none;\n}\n\n.btn--primary {\n  color: var(--button-primary-color, var(--accent-foreground));\n  fill: var(--button-primary-color, var(--accent-foreground));\n  background: var(--button-primary-background, var(--accent-background));\n  border: var(--button-primary-border, var(--border));\n  border-radius: var(--button-primary-border-radius, 6px);\n  font-weight: var(--button-primary-font-weight, 500);\n}\n.btn--primary:hover {\n  color: var(--button-primary-hover-color, var(--accent-foreground));\n  fill: var(--button-primary-hover-color, var(--accent-foreground));\n  background: var(--button-primary-hover-background, var(--accent-background));\n  filter: var(--interactive-filter);\n}\n.btn--primary:focus-visible {\n  background: var(--button-primary-hover-background, var(--accent-background));\n  filter: var(--interactive-filter);\n  outline: var(--button-primary-focus-outline, var(--outline));\n}\n\n.btn--default {\n  color: var(--button-color, var(--foreground));\n  fill: var(--button-color, var(--foreground));\n  background: var(--button-background, var(--background));\n  border: var(--button-border, var(--border));\n  border-radius: var(--button-border-radius, 6px);\n  font-weight: var(--button-font-weight, 500);\n}\n.btn--default:hover {\n  color: var(--button-color, var(--foreground));\n  fill: var(--button-color, var(--foreground));\n  background: var(--button-hover-background, var(--background));\n  filter: var(--interactive-filter);\n}\n.btn--default:focus-visible {\n  background: var(--button-hover-background, var(--background));\n  filter: var(--interactive-filter);\n  outline: var(--button-focus-outline, var(--outline));\n}\n`;\n\nconst SUCCESS = `\n.success__position {\n  position: fixed;\n  inset: var(--dialog-inset);\n  padding: var(--page-margin);\n  z-index: var(--z-index);\n}\n.success__content {\n  background: var(--success-background, var(--background));\n  border: var(--success-border, var(--border));\n  border-radius: var(--success-border-radius, 1.7em/50%);\n  box-shadow: var(--success-box-shadow, var(--box-shadow));\n  font-weight: var(--success-font-weight, 600);\n  color: var(--success-color);\n  fill: var(--success-color);\n  padding: 12px 24px;\n  line-height: 1.75em;\n\n  display: grid;\n  align-items: center;\n  grid-auto-flow: column;\n  gap: 6px;\n  cursor: default;\n}\n\n.success__icon {\n  display: flex;\n}\n`;\n\n/**\n * Creates <style> element for widget dialog\n */\nexport function createDialogStyles(styleNonce?: string): HTMLStyleElement {\n  const style = DOCUMENT.createElement('style');\n\n  style.textContent = `\n:host {\n  --dialog-inset: var(--inset);\n}\n\n${DIALOG}\n${DIALOG_HEADER}\n${FORM}\n${BUTTON}\n${SUCCESS}\n`;\n\n  if (styleNonce) {\n    style.setAttribute('nonce', styleNonce);\n  }\n\n  return style;\n}\n", "import type { FeedbackFormData, FeedbackModalIntegration, IntegrationFn, User } from '@sentry/core';\nimport { getClient, getCurrentScope, getGlobalScope, getIsolationScope } from '@sentry/core';\nimport { h, render } from 'preact';\nimport * as hooks from 'preact/hooks';\nimport { DOCUMENT } from '../constants';\nimport { Dialog } from './components/Dialog';\nimport { createDialogStyles } from './components/Dialog.css';\n\nfunction getUser(): User | undefined {\n  const currentUser = getCurrentScope().getUser();\n  const isolationUser = getIsolationScope().getUser();\n  const globalUser = getGlobalScope().getUser();\n  if (currentUser && Object.keys(currentUser).length) {\n    return currentUser;\n  }\n  if (isolationUser && Object.keys(isolationUser).length) {\n    return isolationUser;\n  }\n  return globalUser;\n}\n\nexport const feedbackModalIntegration = ((): FeedbackModalIntegration => {\n  return {\n    name: 'FeedbackModal' as const,\n    setupOnce() {},\n    createDialog: ({ options, screenshotIntegration, sendFeedback, shadow }) => {\n      const shadowRoot = shadow as ShadowRoot;\n      const userKey = options.useSentryUser;\n      const user = getUser();\n\n      const el = DOCUMENT.createElement('div');\n      const style = createDialogStyles(options.styleNonce);\n\n      let originalOverflow = '';\n      const dialog: ReturnType<FeedbackModalIntegration['createDialog']> = {\n        get el() {\n          return el;\n        },\n        appendToDom(): void {\n          if (!shadowRoot.contains(style) && !shadowRoot.contains(el)) {\n            shadowRoot.appendChild(style);\n            shadowRoot.appendChild(el);\n          }\n        },\n        removeFromDom(): void {\n          el.remove();\n          style.remove();\n          DOCUMENT.body.style.overflow = originalOverflow;\n        },\n        open() {\n          renderContent(true);\n          options.onFormOpen?.();\n          getClient()?.emit('openFeedbackWidget');\n          originalOverflow = DOCUMENT.body.style.overflow;\n          DOCUMENT.body.style.overflow = 'hidden';\n        },\n        close() {\n          renderContent(false);\n          DOCUMENT.body.style.overflow = originalOverflow;\n        },\n      };\n\n      const screenshotInput = screenshotIntegration?.createInput({ h, hooks, dialog, options });\n\n      const renderContent = (open: boolean): void => {\n        render(\n          <Dialog\n            options={options}\n            screenshotInput={screenshotInput}\n            showName={options.showName || options.isNameRequired}\n            showEmail={options.showEmail || options.isEmailRequired}\n            defaultName={String((userKey && user?.[userKey.name]) || '')}\n            defaultEmail={String((userKey && user?.[userKey.email]) || '')}\n            onFormClose={() => {\n              renderContent(false);\n              options.onFormClose?.();\n            }}\n            onSubmit={sendFeedback}\n            onSubmitSuccess={(data: FeedbackFormData, eventId: string) => {\n              renderContent(false);\n              options.onSubmitSuccess?.(data, eventId);\n            }}\n            onSubmitError={(error: Error) => {\n              options.onSubmitError?.(error);\n            }}\n            onFormSubmitted={() => {\n              options.onFormSubmitted?.();\n            }}\n            open={open}\n          />,\n          el,\n        );\n      };\n\n      return dialog;\n    },\n  };\n}) satisfies IntegrationFn;\n", "import type { h as hType, VNode } from 'preact';\n\ninterface FactoryParams {\n  h: typeof hType;\n}\n\nexport default function IconCloseFactory({\n  h, // eslint-disable-line @typescript-eslint/no-unused-vars\n}: FactoryParams) {\n  return function IconClose(): VNode {\n    return (\n      <svg data-test-id=\"icon-close\" viewBox=\"0 0 16 16\" fill=\"#2B2233\" height=\"25px\" width=\"25px\">\n        <circle r=\"7\" cx=\"8\" cy=\"8\" fill=\"white\" />\n        <path\n          strokeWidth=\"1.5\"\n          d=\"M8,16a8,8,0,1,1,8-8A8,8,0,0,1,8,16ZM8,1.53A6.47,6.47,0,1,0,14.47,8,6.47,6.47,0,0,0,8,1.53Z\"\n        ></path>\n        <path\n          strokeWidth=\"1.5\"\n          d=\"M5.34,11.41a.71.71,0,0,1-.53-.22.74.74,0,0,1,0-1.06l5.32-5.32a.75.75,0,0,1,1.06,1.06L5.87,11.19A.74.74,0,0,1,5.34,11.41Z\"\n        ></path>\n        <path\n          strokeWidth=\"1.5\"\n          d=\"M10.66,11.41a.74.74,0,0,1-.53-.22L4.81,5.87A.75.75,0,0,1,5.87,4.81l5.32,5.32a.74.74,0,0,1,0,1.06A.71.71,0,0,1,10.66,11.41Z\"\n        ></path>\n      </svg>\n    );\n  };\n}\n", "import { DOCUMENT } from '../../constants';\n\n/**\n * Creates <style> element for widget dialog\n */\nexport function createScreenshotInputStyles(styleNonce?: string): HTMLStyleElement {\n  const style = DOCUMENT.createElement('style');\n\n  const surface200 = '#1A141F';\n  const gray100 = '#302735';\n\n  style.textContent = `\n.editor {\n  display: flex;\n  flex-grow: 1;\n  flex-direction: column;\n}\n\n.editor__image-container {\n  justify-items: center;\n  padding: 15px;\n  position: relative;\n  height: 100%;\n  border-radius: var(--menu-border-radius, 6px);\n\n  background-color: ${surface200};\n  background-image: repeating-linear-gradient(\n      -145deg,\n      transparent,\n      transparent 8px,\n      ${surface200} 8px,\n      ${surface200} 11px\n    ),\n    repeating-linear-gradient(\n      -45deg,\n      transparent,\n      transparent 15px,\n      ${gray100} 15px,\n      ${gray100} 16px\n    );\n}\n\n.editor__canvas-container {\n  width: 100%;\n  height: 100%;\n  position: relative;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n}\n\n.editor__canvas-container > * {\n  object-fit: contain;\n  position: absolute;\n}\n\n.editor__tool-container {\n  padding-top: 8px;\n  display: flex;\n  justify-content: center;\n}\n\n.editor__tool-bar {\n  display: flex;\n  gap: 8px;\n}\n\n.editor__tool {\n  display: flex;\n  padding: 8px 12px;\n  justify-content: center;\n  align-items: center;\n  border: var(--button-border, var(--border));\n  border-radius: var(--button-border-radius, 6px);\n  background: var(--button-background, var(--background));\n  color: var(--button-color, var(--foreground));\n}\n\n.editor__tool--active {\n  background: var(--button-primary-background, var(--accent-background));\n  color: var(--button-primary-color, var(--accent-foreground));\n}\n\n.editor__rect {\n  position: absolute;\n  z-index: 2;\n}\n\n.editor__rect button {\n  opacity: 0;\n  position: absolute;\n  top: -12px;\n  right: -12px;\n  cursor: pointer;\n  padding: 0;\n  z-index: 3;\n  border: none;\n  background: none;\n}\n\n.editor__rect:hover button {\n  opacity: 1;\n}\n`;\n\n  if (styleNonce) {\n    style.setAttribute('nonce', styleNonce);\n  }\n\n  return style;\n}\n", "import type { FeedbackInternalOptions } from '@sentry/core';\nimport type { h as hType, VNode } from 'preact';\nimport type * as Hooks from 'preact/hooks';\n\ninterface FactoryParams {\n  h: typeof hType;\n}\n\nexport default function ToolbarFactory({\n  h, // eslint-disable-line @typescript-eslint/no-unused-vars\n}: FactoryParams) {\n  return function Toolbar({\n    action,\n    setAction,\n    options,\n  }: {\n    action: 'highlight' | 'hide' | '';\n    setAction: Hooks.StateUpdater<'highlight' | 'hide' | ''>;\n    options: FeedbackInternalOptions;\n  }): VNode {\n    return (\n      <div class=\"editor__tool-container\">\n        <div class=\"editor__tool-bar\">\n          <button\n            type=\"button\"\n            class={`editor__tool ${action === 'highlight' ? 'editor__tool--active' : ''}`}\n            onClick={() => {\n              setAction(action === 'highlight' ? '' : 'highlight');\n            }}\n          >\n            {options.highlightToolText}\n          </button>\n          <button\n            type=\"button\"\n            class={`editor__tool ${action === 'hide' ? 'editor__tool--active' : ''}`}\n            onClick={() => {\n              setAction(action === 'hide' ? '' : 'hide');\n            }}\n          >\n            {options.hideToolText}\n          </button>\n        </div>\n      </div>\n    );\n  };\n}\n", "import type * as Hooks from 'preact/hooks';\nimport { DOCUMENT, NAVIGATOR, WINDOW } from '../../constants';\n\ninterface FactoryParams {\n  hooks: typeof Hooks;\n}\n\ninterface Props {\n  onBeforeScreenshot: () => void;\n  onScreenshot: (imageSource: HTMLVideoElement, dpi: number) => void;\n  onAfterScreenshot: () => void;\n  onError: (error: Error) => void;\n}\n\ntype UseTakeScreenshot = ({ onBeforeScreenshot, onScreenshot, onAfterScreenshot, onError }: Props) => void;\n\nexport function useTakeScreenshotFactory({ hooks }: FactoryParams): UseTakeScreenshot {\n  function useDpi(): number {\n    const [dpi, setDpi] = hooks.useState<number>(WINDOW.devicePixelRatio ?? 1);\n    hooks.useEffect(() => {\n      const onChange = (): void => {\n        setDpi(WINDOW.devicePixelRatio);\n      };\n      const media = matchMedia(`(resolution: ${WINDOW.devicePixelRatio}dppx)`);\n      media.addEventListener('change', onChange);\n      return () => {\n        media.removeEventListener('change', onChange);\n      };\n    }, []);\n\n    return dpi;\n  }\n\n  return function useTakeScreenshot({ onBeforeScreenshot, onScreenshot, onAfterScreenshot, onError }: Props) {\n    const dpi = useDpi();\n\n    hooks.useEffect(() => {\n      const takeScreenshot = async (): Promise<void> => {\n        onBeforeScreenshot();\n\n        // Chrome will animate a top-bar which can shrink the window height by a\n        // few pixels. The exact amount depends on how fast it takes to exec\n        // the onloadedmetadata callback.\n        // https://stackoverflow.com/q/75833049\n        const stream = await NAVIGATOR.mediaDevices.getDisplayMedia({\n          video: {\n            width: WINDOW.innerWidth * dpi,\n            height: WINDOW.innerHeight * dpi,\n          },\n          audio: false,\n          // @ts-expect-error experimental flags: https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getDisplayMedia#prefercurrenttab\n          monitorTypeSurfaces: 'exclude',\n          preferCurrentTab: true,\n          selfBrowserSurface: 'include',\n          surfaceSwitching: 'exclude',\n        });\n\n        const video = DOCUMENT.createElement('video');\n        await new Promise<void>((resolve, reject) => {\n          video.srcObject = stream;\n          video.onloadedmetadata = () => {\n            onScreenshot(video, dpi);\n            stream.getTracks().forEach(track => track.stop());\n            resolve();\n          };\n          video.play().catch(reject);\n        });\n        onAfterScreenshot();\n      };\n\n      takeScreenshot().catch(onError);\n    }, []);\n  };\n}\n", "import type { FeedbackInternalOptions, FeedbackModalIntegration } from '@sentry/core';\nimport type { ComponentType, h as hType, VNode } from 'preact';\nimport { h } from 'preact'; // eslint-disable-line @typescript-eslint/no-unused-vars\nimport type * as Hooks from 'preact/hooks';\nimport { DOCUMENT, WINDOW } from '../../constants';\nimport IconCloseFactory from './IconClose';\nimport { createScreenshotInputStyles } from './ScreenshotInput.css';\nimport ToolbarFactory from './Toolbar';\nimport { useTakeScreenshotFactory } from './useTakeScreenshot';\n\ninterface FactoryParams {\n  h: typeof hType;\n  hooks: typeof Hooks;\n\n  /**\n   * A ref to a Canvas Element that serves as our \"value\" or image output.\n   */\n  outputBuffer: HTMLCanvasElement;\n\n  /**\n   * A reference to the whole dialog (the parent of this component) so that we\n   * can show/hide it and take a clean screenshot of the webpage.\n   */\n  dialog: ReturnType<FeedbackModalIntegration['createDialog']>;\n\n  /**\n   * The whole options object.\n   *\n   * Needed to set nonce and id values for editor specific styles\n   */\n  options: FeedbackInternalOptions;\n}\n\ninterface Props {\n  onError: (error: Error) => void;\n}\n\ntype MaybeCanvas = HTMLCanvasElement | null;\ntype Screenshot = { canvas: HTMLCanvasElement; dpi: number };\n\ntype DrawType = 'highlight' | 'hide' | '';\ninterface DrawCommand {\n  type: DrawType;\n  x: number;\n  y: number;\n  h: number;\n  w: number;\n}\n\nfunction drawRect(command: DrawCommand, ctx: CanvasRenderingContext2D, color: string): void {\n  switch (command.type) {\n    case 'highlight': {\n      // creates a shadow around\n      ctx.shadowColor = 'rgba(0, 0, 0, 0.7)';\n      ctx.shadowBlur = 50;\n\n      // draws a rectangle first with a shadow\n      ctx.fillStyle = color;\n      ctx.fillRect(command.x - 1, command.y - 1, command.w + 2, command.h + 2);\n\n      // cut out the inside of the rectangle\n      ctx.clearRect(command.x, command.y, command.w, command.h);\n\n      break;\n    }\n    case 'hide':\n      ctx.fillStyle = 'rgb(0, 0, 0)';\n      ctx.fillRect(command.x, command.y, command.w, command.h);\n\n      break;\n    default:\n      break;\n  }\n}\n\nfunction with2dContext(\n  canvas: MaybeCanvas,\n  options: CanvasRenderingContext2DSettings,\n  callback: (canvas: HTMLCanvasElement, ctx: CanvasRenderingContext2D) => void,\n): void {\n  if (!canvas) {\n    return;\n  }\n  const ctx = canvas.getContext('2d', options);\n  if (!ctx) {\n    return;\n  }\n  callback(canvas, ctx);\n}\n\nfunction paintImage(maybeDest: MaybeCanvas, source: HTMLCanvasElement): void {\n  with2dContext(maybeDest, { alpha: true }, (destCanvas, destCtx) => {\n    destCtx.drawImage(source, 0, 0, source.width, source.height, 0, 0, destCanvas.width, destCanvas.height);\n  });\n}\n\n// Paint the array of drawCommands into a canvas.\n// Assuming this is the canvas foreground, and the background is cleaned.\nfunction paintForeground(maybeCanvas: MaybeCanvas, strokeColor: string, drawCommands: DrawCommand[]): void {\n  with2dContext(maybeCanvas, { alpha: true }, (canvas, ctx) => {\n    // If there's anything to draw, then we'll first clear the canvas with\n    // a transparent grey background\n    if (drawCommands.length) {\n      ctx.fillStyle = 'rgba(0, 0, 0, 0.25)';\n      ctx.fillRect(0, 0, canvas.width, canvas.height);\n    }\n\n    drawCommands.forEach(command => {\n      drawRect(command, ctx, strokeColor);\n    });\n  });\n}\n\nexport function ScreenshotEditorFactory({\n  h,\n  hooks,\n  outputBuffer,\n  dialog,\n  options,\n}: FactoryParams): ComponentType<Props> {\n  const useTakeScreenshot = useTakeScreenshotFactory({ hooks });\n  const Toolbar = ToolbarFactory({ h });\n  const IconClose = IconCloseFactory({ h });\n  const editorStyleInnerText = { __html: createScreenshotInputStyles(options.styleNonce).innerText };\n\n  const dialogStyle = (dialog.el as HTMLElement).style;\n\n  const ScreenshotEditor = ({ screenshot }: { screenshot: Screenshot }): VNode => {\n    // Data for rendering:\n    const [action, setAction] = hooks.useState<DrawType>('highlight');\n    const [drawCommands, setDrawCommands] = hooks.useState<DrawCommand[]>([]);\n\n    // Refs to our html components:\n    const measurementRef = hooks.useRef<HTMLDivElement | null>(null);\n    const backgroundRef = hooks.useRef<MaybeCanvas>(null);\n    const foregroundRef = hooks.useRef<MaybeCanvas>(null);\n    const mouseRef = hooks.useRef<HTMLDivElement | null>(null);\n\n    // The size of our window, relative to the imageSource\n    const [scaleFactor, setScaleFactor] = hooks.useState<number>(1);\n\n    const strokeColor = hooks.useMemo((): string => {\n      const sentryFeedback = DOCUMENT.getElementById(options.id);\n      if (!sentryFeedback) {\n        return 'white';\n      }\n      const computedStyle = getComputedStyle(sentryFeedback);\n      return (\n        computedStyle.getPropertyValue('--button-primary-background') ||\n        computedStyle.getPropertyValue('--accent-background')\n      );\n    }, [options.id]);\n\n    // The initial resize, to measure the area and set the children to the correct size\n    hooks.useLayoutEffect(() => {\n      const handleResize = (): void => {\n        const measurementDiv = measurementRef.current;\n        if (!measurementDiv) {\n          return;\n        }\n\n        with2dContext(screenshot.canvas, { alpha: false }, canvas => {\n          const scale = Math.min(\n            measurementDiv.clientWidth / canvas.width,\n            measurementDiv.clientHeight / canvas.height,\n          );\n          setScaleFactor(scale);\n        });\n\n        // For Firefox, the canvas is not yet measured, so we need to wait for it to get the correct size\n        if (measurementDiv.clientHeight === 0 || measurementDiv.clientWidth === 0) {\n          setTimeout(handleResize, 0);\n        }\n      };\n\n      handleResize();\n      WINDOW.addEventListener('resize', handleResize);\n      return () => {\n        WINDOW.removeEventListener('resize', handleResize);\n      };\n    }, [screenshot]);\n\n    // Set the size of the canvas element to match our screenshot\n    const setCanvasSize = hooks.useCallback(\n      (maybeCanvas: MaybeCanvas, scale: number): void => {\n        with2dContext(maybeCanvas, { alpha: true }, (canvas, ctx) => {\n          // Must call `scale()` before setting `width` & `height`\n          ctx.scale(scale, scale);\n          canvas.width = screenshot.canvas.width;\n          canvas.height = screenshot.canvas.height;\n        });\n      },\n      [screenshot],\n    );\n\n    // Draw the screenshot into the background\n    hooks.useEffect(() => {\n      setCanvasSize(backgroundRef.current, screenshot.dpi);\n      paintImage(backgroundRef.current, screenshot.canvas);\n    }, [screenshot]);\n\n    // Draw the commands into the foreground\n    hooks.useEffect(() => {\n      setCanvasSize(foregroundRef.current, screenshot.dpi);\n      with2dContext(foregroundRef.current, { alpha: true }, (canvas, ctx) => {\n        ctx.clearRect(0, 0, canvas.width, canvas.height);\n      });\n      paintForeground(foregroundRef.current, strokeColor, drawCommands);\n    }, [drawCommands, strokeColor]);\n\n    // Draw into the output outputBuffer\n    hooks.useEffect(() => {\n      setCanvasSize(outputBuffer, screenshot.dpi);\n      paintImage(outputBuffer, screenshot.canvas);\n      with2dContext(DOCUMENT.createElement('canvas'), { alpha: true }, (foreground, ctx) => {\n        ctx.scale(screenshot.dpi, screenshot.dpi); // The scale needs to be set before we set the width/height and paint\n        foreground.width = screenshot.canvas.width;\n        foreground.height = screenshot.canvas.height;\n        paintForeground(foreground, strokeColor, drawCommands);\n        paintImage(outputBuffer, foreground);\n      });\n    }, [drawCommands, screenshot, strokeColor]);\n\n    const handleMouseDown = (e: MouseEvent): void => {\n      if (!action || !mouseRef.current) {\n        return;\n      }\n\n      const boundingRect = mouseRef.current.getBoundingClientRect();\n      const startingPoint: DrawCommand = {\n        type: action,\n        x: e.offsetX / scaleFactor,\n        y: e.offsetY / scaleFactor,\n        w: 0,\n        h: 0,\n      };\n\n      const getDrawCommand = (startingPoint: DrawCommand, e: MouseEvent): DrawCommand => {\n        const x = (e.clientX - boundingRect.x) / scaleFactor;\n        const y = (e.clientY - boundingRect.y) / scaleFactor;\n        return {\n          type: startingPoint.type,\n          x: Math.min(startingPoint.x, x),\n          y: Math.min(startingPoint.y, y),\n          w: Math.abs(x - startingPoint.x),\n          h: Math.abs(y - startingPoint.y),\n        } as DrawCommand;\n      };\n\n      const handleMouseMove = (e: MouseEvent): void => {\n        with2dContext(foregroundRef.current, { alpha: true }, (canvas, ctx) => {\n          ctx.clearRect(0, 0, canvas.width, canvas.height);\n        });\n        paintForeground(foregroundRef.current, strokeColor, [...drawCommands, getDrawCommand(startingPoint, e)]);\n      };\n\n      const handleMouseUp = (e: MouseEvent): void => {\n        const drawCommand = getDrawCommand(startingPoint, e);\n\n        // Prevent just clicking onto the canvas, mouse has to move at least 1 pixel\n        if (drawCommand.w * scaleFactor >= 1 && drawCommand.h * scaleFactor >= 1) {\n          setDrawCommands(prev => [...prev, drawCommand]);\n        }\n        DOCUMENT.removeEventListener('mousemove', handleMouseMove);\n        DOCUMENT.removeEventListener('mouseup', handleMouseUp);\n      };\n\n      DOCUMENT.addEventListener('mousemove', handleMouseMove);\n      DOCUMENT.addEventListener('mouseup', handleMouseUp);\n    };\n\n    const deleteRect = hooks.useCallback((index: number): hType.JSX.MouseEventHandler<HTMLButtonElement> => {\n      return (e: MouseEvent): void => {\n        e.preventDefault();\n        e.stopPropagation();\n        setDrawCommands(prev => {\n          const updatedRects = [...prev];\n          updatedRects.splice(index, 1);\n          return updatedRects;\n        });\n      };\n    }, []);\n\n    const dimensions = {\n      width: `${screenshot.canvas.width * scaleFactor}px`,\n      height: `${screenshot.canvas.height * scaleFactor}px`,\n    };\n\n    const handleStopPropagation = (e: MouseEvent): void => {\n      e.stopPropagation();\n    };\n\n    return (\n      <div class=\"editor\">\n        <style nonce={options.styleNonce} dangerouslySetInnerHTML={editorStyleInnerText} />\n        <div class=\"editor__image-container\">\n          <div class=\"editor__canvas-container\" ref={measurementRef}>\n            <canvas ref={backgroundRef} id=\"background\" style={dimensions} />\n            <canvas ref={foregroundRef} id=\"foreground\" style={dimensions} />\n            <div ref={mouseRef} onMouseDown={handleMouseDown} style={dimensions}>\n              {drawCommands.map((rect, index) => (\n                <div\n                  key={index}\n                  class=\"editor__rect\"\n                  style={{\n                    top: `${rect.y * scaleFactor}px`,\n                    left: `${rect.x * scaleFactor}px`,\n                    width: `${rect.w * scaleFactor}px`,\n                    height: `${rect.h * scaleFactor}px`,\n                  }}\n                >\n                  <button\n                    aria-label={options.removeHighlightText}\n                    onClick={deleteRect(index)}\n                    onMouseDown={handleStopPropagation}\n                    onMouseUp={handleStopPropagation}\n                    type=\"button\"\n                  >\n                    <IconClose />\n                  </button>\n                </div>\n              ))}\n            </div>\n          </div>\n        </div>\n        <Toolbar options={options} action={action} setAction={setAction} />\n      </div>\n    );\n  };\n\n  return function Wrapper({ onError }: Props): VNode {\n    const [screenshot, setScreenshot] = hooks.useState<undefined | Screenshot>();\n\n    useTakeScreenshot({\n      onBeforeScreenshot: hooks.useCallback(() => {\n        dialogStyle.display = 'none';\n      }, []),\n      onScreenshot: hooks.useCallback((screenshotVideo: HTMLVideoElement, dpi: number) => {\n        // Stash the original screenshot image so we can (re)draw it multiple times\n        with2dContext(DOCUMENT.createElement('canvas'), { alpha: false }, (canvas, ctx) => {\n          ctx.scale(dpi, dpi); // The scale needs to be set before we set the width/height and paint\n          canvas.width = screenshotVideo.videoWidth;\n          canvas.height = screenshotVideo.videoHeight;\n          ctx.drawImage(screenshotVideo, 0, 0, canvas.width, canvas.height);\n\n          setScreenshot({ canvas, dpi });\n        });\n\n        // The output buffer, we only need to set the width/height on this once, it stays the same forever\n        outputBuffer.width = screenshotVideo.videoWidth;\n        outputBuffer.height = screenshotVideo.videoHeight;\n      }, []),\n      onAfterScreenshot: hooks.useCallback(() => {\n        dialogStyle.display = 'block';\n      }, []),\n      onError: hooks.useCallback(error => {\n        dialogStyle.display = 'block';\n        onError(error);\n      }, []),\n    });\n\n    if (screenshot) {\n      return <ScreenshotEditor screenshot={screenshot} />;\n    }\n\n    return <div />;\n  };\n}\n", "import type { Attachment, FeedbackScreenshotIntegration, IntegrationFn } from '@sentry/core';\nimport type { h as hType } from 'preact';\nimport type * as Hooks from 'preact/hooks';\nimport { DOCUMENT } from '../constants';\nimport { ScreenshotEditorFactory } from './components/ScreenshotEditor';\n\nexport const feedbackScreenshotIntegration = ((): FeedbackScreenshotIntegration => {\n  return {\n    name: 'FeedbackScreenshot' as const,\n    setupOnce() {},\n    createInput: ({ h, hooks, dialog, options }) => {\n      const outputBuffer = DOCUMENT.createElement('canvas');\n\n      return {\n        input: ScreenshotEditorFactory({\n          h: h as typeof hType,\n          hooks: hooks as typeof Hooks,\n          outputBuffer,\n          dialog,\n          options,\n        }) as any, // eslint-disable-line @typescript-eslint/no-explicit-any\n\n        value: async () => {\n          const blob = await new Promise<Parameters<BlobCallback>[0]>(resolve => {\n            outputBuffer.toBlob(resolve, 'image/png');\n          });\n          if (blob) {\n            const data = new Uint8Array(await blob.arrayBuffer());\n            const attachment: Attachment = {\n              data,\n              filename: 'screenshot.png',\n              contentType: 'application/png',\n              // attachmentType?: string;\n            };\n            return attachment;\n          }\n          return undefined;\n        },\n      };\n    },\n  };\n}) satisfies IntegrationFn;\n", "import type { Mechanism, WrappedFunction } from '@sentry/core/browser';\nimport {\n  addExceptionMechanism,\n  addExceptionTypeValue,\n  addNonEnumerableProperty,\n  captureException,\n  getLocationHref,\n  getOriginalFunction,\n  GLOBAL_OBJ,\n  markFunctionWrapped,\n  withScope,\n} from '@sentry/core/browser';\n\nexport const WINDOW = GLOBAL_OBJ as typeof GLOBAL_OBJ & Window;\n\nlet ignoreOnError: number = 0;\n\n/**\n * @hidden\n */\nexport function shouldIgnoreOnError(): boolean {\n  return ignoreOnError > 0;\n}\n\n/**\n * @hidden\n */\nexport function ignoreNextOnError(): void {\n  // onerror should trigger before setTimeout\n  ignoreOnError++;\n  setTimeout(() => {\n    ignoreOnError--;\n  });\n}\n\n// eslint-disable-next-line @typescript-eslint/ban-types\ntype WrappableFunction = Function;\n\nexport function wrap<T extends WrappableFunction>(\n  fn: T,\n  options?: {\n    mechanism?: Mechanism;\n  },\n): WrappedFunction<T>;\nexport function wrap<NonFunction>(\n  fn: NonFunction,\n  options?: {\n    mechanism?: Mechanism;\n  },\n): NonFunction;\n/**\n * Instruments the given function and sends an event to Sentry every time the\n * function throws an exception.\n *\n * @param fn A function to wrap. It is generally safe to pass an unbound function, because the returned wrapper always\n * has a correct `this` context.\n * @returns The wrapped function.\n * @hidden\n */\nexport function wrap<T extends WrappableFunction, NonFunction>(\n  fn: T | NonFunction,\n  options: {\n    mechanism?: Mechanism;\n  } = {},\n): NonFunction | WrappedFunction<T> {\n  // for future readers what this does is wrap a function and then create\n  // a bi-directional wrapping between them.\n  //\n  // example: wrapped = wrap(original);\n  //  original.__sentry_wrapped__ -> wrapped\n  //  wrapped.__sentry_original__ -> original\n\n  function isFunction(fn: T | NonFunction): fn is T {\n    return typeof fn === 'function';\n  }\n\n  if (!isFunction(fn)) {\n    return fn;\n  }\n\n  try {\n    // If we're dealing with a function that was previously wrapped, return the original wrapper.\n    // Check via hasOwnProperty so a `__sentry_wrapped__` inherited from a wrapped `Function.prototype`\n    // is not mistaken for a real wrapper.\n    const hasOwnWrapper = Object.prototype.hasOwnProperty.call(fn, '__sentry_wrapped__');\n    if (hasOwnWrapper) {\n      const wrapper = (fn as WrappedFunction<T>).__sentry_wrapped__;\n      if (typeof wrapper === 'function') {\n        return wrapper;\n      } else {\n        // If we find that the `__sentry_wrapped__` function is not a function at the time of accessing it, it means\n        // that something messed with it. In that case we want to return the originally passed function.\n        return fn;\n      }\n    }\n\n    // We don't wanna wrap it twice\n    if (getOriginalFunction(fn)) {\n      return fn;\n    }\n  } catch {\n    // Just accessing custom props in some Selenium environments\n    // can cause a \"Permission denied\" exception (see raven-js#495).\n    // Bail on wrapping and return the function as-is (defers to window.onerror).\n    return fn;\n  }\n\n  // Wrap the function itself\n  // It is important that `sentryWrapped` is not an arrow function to preserve the context of `this`\n  const sentryWrapped = function (this: unknown, ...args: unknown[]): unknown {\n    // Track depth on GLOBAL_OBJ so the thirdPartyErrorFilterIntegration (in @sentry/core) can detect\n    // that processEvent is running inside a sentryWrapped call, even with minified/bundled code.\n    GLOBAL_OBJ._sentryWrappedDepth = (GLOBAL_OBJ._sentryWrappedDepth || 0) + 1;\n    try {\n      // Also wrap arguments that are themselves functions\n      const wrappedArguments = args.map(arg => wrap(arg, options));\n\n      // Attempt to invoke user-land function\n      // NOTE: If you are a Sentry user, and you are seeing this stack frame, it\n      //       means the sentry.javascript SDK caught an error invoking your application code. This\n      //       is expected behavior and NOT indicative of a bug with sentry.javascript.\n      return fn.apply(this, wrappedArguments);\n    } catch (ex) {\n      ignoreNextOnError();\n\n      withScope(scope => {\n        scope.addEventProcessor(event => {\n          if (options.mechanism) {\n            addExceptionTypeValue(event, undefined, undefined);\n            addExceptionMechanism(event, options.mechanism);\n          }\n\n          event.extra = {\n            ...event.extra,\n            arguments: args,\n          };\n\n          return event;\n        });\n\n        // no need to add a mechanism here, we already add it via an event processor above\n        captureException(ex);\n      });\n\n      throw ex;\n    } finally {\n      GLOBAL_OBJ._sentryWrappedDepth = (GLOBAL_OBJ._sentryWrappedDepth || 0) - 1;\n    }\n  } as unknown as WrappedFunction<T>;\n\n  // Wrap the wrapped function in a proxy, to ensure any other properties of the original function remain available\n  try {\n    for (const property in fn) {\n      if (Object.prototype.hasOwnProperty.call(fn, property)) {\n        sentryWrapped[property as keyof T] = fn[property as keyof T];\n      }\n    }\n  } catch {\n    // Accessing some objects may throw\n    // ref: https://github.com/getsentry/sentry-javascript/issues/1168\n  }\n\n  // Signal that this function has been wrapped/filled already\n  // for both debugging and to prevent it to being wrapped/filled twice\n  markFunctionWrapped(sentryWrapped, fn);\n\n  addNonEnumerableProperty(fn, '__sentry_wrapped__', sentryWrapped);\n\n  // Restore original function name (not all browsers allow that)\n  try {\n    // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n    const descriptor = Object.getOwnPropertyDescriptor(sentryWrapped, 'name')!;\n    if (descriptor.configurable) {\n      Object.defineProperty(sentryWrapped, 'name', {\n        get(): string {\n          return fn.name;\n        },\n      });\n    }\n  } catch {\n    // This may throw if e.g. the descriptor does not exist, or a browser does not allow redefining `name`.\n    // to save some bytes we simply try-catch this\n  }\n\n  return sentryWrapped;\n}\n\n/**\n * Get HTTP request data from the current page.\n */\nexport function getHttpRequestData(): { url: string; headers: Record<string, string> } {\n  // grab as much info as exists and add it to the event\n  const url = getLocationHref();\n  const { referrer } = WINDOW.document || {};\n  const { userAgent } = WINDOW.navigator || {};\n\n  const headers = {\n    ...(referrer && { Referer: referrer }),\n    ...(userAgent && { 'User-Agent': userAgent }),\n  };\n  const request = {\n    url,\n    headers,\n  };\n\n  return request;\n}\n", "import type { IntegrationFn } from '@sentry/core/browser';\nimport { getClient, SDK_VERSION } from '@sentry/core/browser';\nimport type { BrowserClient } from '../client';\nimport { WINDOW } from '../helpers';\n\n// Single source of truth: as const array provides both the runtime list and the type.\n// Bundle file names are derived: strip 'Integration' suffix, lowercase.\n// Exceptions (hyphenated bundle names) are listed in HYPHENATED_BUNDLES.\nconst LAZY_LOADABLE_NAMES = [\n  'replayIntegration',\n  'replayCanvasIntegration',\n  'feedbackIntegration',\n  'feedbackModalIntegration',\n  'feedbackScreenshotIntegration',\n  'captureConsoleIntegration',\n  'contextLinesIntegration',\n  'linkedErrorsIntegration',\n  'dedupeIntegration',\n  'extraErrorDataIntegration',\n  'graphqlClientIntegration',\n  'httpClientIntegration',\n  'reportingObserverIntegration',\n  'rewriteFramesIntegration',\n  'browserProfilingIntegration',\n  'moduleMetadataIntegration',\n  'instrumentAnthropicAiClient',\n  'instrumentOpenAiClient',\n  'instrumentGoogleGenAIClient',\n  'instrumentStateGraph',\n  'instrumentLangGraph',\n  'createLangChainCallbackHandler',\n  'instrumentLangChainEmbeddings',\n] as const;\n\ntype ElementOf<T extends readonly unknown[]> = T[number];\ntype LazyLoadableIntegrationName = ElementOf<typeof LAZY_LOADABLE_NAMES>;\n\nconst HYPHENATED_BUNDLES: Partial<Record<LazyLoadableIntegrationName, string>> = {\n  replayCanvasIntegration: 'replay-canvas',\n  feedbackModalIntegration: 'feedback-modal',\n  feedbackScreenshotIntegration: 'feedback-screenshot',\n};\n\nfunction getBundleName(name: string): string {\n  return HYPHENATED_BUNDLES[name as LazyLoadableIntegrationName] || name.replace('Integration', '').toLowerCase();\n}\n\nconst WindowWithMaybeIntegration = WINDOW as {\n  Sentry?: Partial<Record<LazyLoadableIntegrationName, IntegrationFn>>;\n};\n\n/**\n * Lazy load an integration from the CDN.\n * Rejects if the integration cannot be loaded.\n */\nexport async function lazyLoadIntegration(\n  name: LazyLoadableIntegrationName,\n  scriptNonce?: string,\n): Promise<IntegrationFn> {\n  const bundle = LAZY_LOADABLE_NAMES.includes(name) ? getBundleName(name) : undefined;\n\n  // `window.Sentry` is only set when using a CDN bundle, but this method can also be used via the NPM package\n  const sentryOnWindow = (WindowWithMaybeIntegration.Sentry = WindowWithMaybeIntegration.Sentry || {});\n\n  if (!bundle) {\n    throw new Error(`Cannot lazy load integration: ${name}`);\n  }\n\n  // Bail if the integration already exists\n  const existing = sentryOnWindow[name];\n  // The `feedbackIntegration` is loaded by default in the CDN bundles,\n  // so we need to differentiate between the real integration and the shim.\n  // if only the shim exists, we still want to lazy load the real integration.\n  if (typeof existing === 'function' && !('_isShim' in existing)) {\n    return existing;\n  }\n\n  const url = getScriptURL(bundle);\n  const script = WINDOW.document.createElement('script');\n  script.src = url;\n  script.crossOrigin = 'anonymous';\n  script.referrerPolicy = 'strict-origin';\n\n  if (scriptNonce) {\n    script.setAttribute('nonce', scriptNonce);\n  }\n\n  const waitForLoad = new Promise<void>((resolve, reject) => {\n    script.addEventListener('load', () => resolve());\n    script.addEventListener('error', reject);\n  });\n\n  const currentScript = WINDOW.document.currentScript;\n  const parent = WINDOW.document.body || WINDOW.document.head || currentScript?.parentElement;\n\n  if (parent) {\n    parent.appendChild(script);\n  } else {\n    throw new Error(`Could not find parent element to insert lazy-loaded ${name} script`);\n  }\n\n  try {\n    await waitForLoad;\n  } catch {\n    throw new Error(`Error when loading integration: ${name}`);\n  }\n\n  const integrationFn = sentryOnWindow[name];\n\n  if (typeof integrationFn !== 'function') {\n    throw new Error(`Could not load integration: ${name}`);\n  }\n\n  return integrationFn;\n}\n\nfunction getScriptURL(bundle: string): string {\n  const client = getClient<BrowserClient>();\n  const baseURL = client?.getOptions()?.cdnBaseUrl || 'https://browser.sentry-cdn.com';\n\n  return new URL(`/${SDK_VERSION}/${bundle}.min.js`, baseURL).toString();\n}\n", "import { buildFeedbackIntegration } from '@sentry/feedback';\nimport { lazyLoadIntegration } from './utils/lazyLoadIntegration';\n\n/**\n * An integration to add user feedback to your application,\n * while loading most of the code lazily only when it's needed.\n */\nexport const feedbackAsyncIntegration: ReturnType<typeof buildFeedbackIntegration> = buildFeedbackIntegration({\n  lazyLoadIntegration,\n});\n", "import { buildFeedbackIntegration, feedbackModalIntegration, feedbackScreenshotIntegration } from '@sentry/feedback';\n\n/** Add a widget to capture user feedback to your application. */\nexport const feedbackSyncIntegration: ReturnType<typeof buildFeedbackIntegration> = buildFeedbackIntegration({\n  getModalIntegration: () => feedbackModalIntegration,\n  getScreenshotIntegration: () => feedbackScreenshotIntegration,\n});\n", "import type {\n  Event,\n  EventHint,\n  Exception,\n  ParameterizedString,\n  SeverityLevel,\n  StackFrame,\n  StackParser,\n} from '@sentry/core/browser';\nimport {\n  _INTERNAL_enhanceErrorWithSentryInfo,\n  addExceptionMechanism,\n  addExceptionTypeValue,\n  extractExceptionKeysForMessage,\n  getClient,\n  isDOMError,\n  isDOMException,\n  isError,\n  isErrorEvent,\n  isEvent,\n  isParameterizedString,\n  isPlainObject,\n  normalizeToSize,\n  resolvedSyncPromise,\n} from '@sentry/core/browser';\n\ntype Prototype = { constructor: (...args: unknown[]) => unknown };\n\n/**\n * This function creates an exception from a JavaScript Error\n */\nexport function exceptionFromError(stackParser: StackParser, ex: Error): Exception {\n  // Get the frames first since Opera can lose the stack if we touch anything else first\n  const frames = parseStackFrames(stackParser, ex);\n\n  const exception: Exception = {\n    type: extractType(ex),\n    value: extractMessage(ex),\n  };\n\n  if (frames.length) {\n    exception.stacktrace = { frames };\n  }\n\n  if (exception.type === undefined && exception.value === '') {\n    exception.value = 'Unrecoverable error caught';\n  }\n\n  return exception;\n}\n\nfunction eventFromPlainObject(\n  stackParser: StackParser,\n  exception: Record<string, unknown>,\n  syntheticException?: Error,\n  isUnhandledRejection?: boolean,\n): Event {\n  const client = getClient();\n  const normalizeDepth = client?.getOptions().normalizeDepth;\n\n  // If we can, we extract an exception from the object properties\n  const errorFromProp = getErrorPropertyFromObject(exception);\n\n  const extra = {\n    __serialized__: normalizeToSize(exception, normalizeDepth),\n  };\n\n  if (errorFromProp) {\n    return {\n      exception: {\n        values: [exceptionFromError(stackParser, errorFromProp)],\n      },\n      extra,\n    };\n  }\n\n  const event = {\n    exception: {\n      values: [\n        {\n          type: isEvent(exception) ? exception.constructor.name : isUnhandledRejection ? 'UnhandledRejection' : 'Error',\n          value: getNonErrorObjectExceptionValue(exception, { isUnhandledRejection }),\n        } as Exception,\n      ],\n    },\n    extra,\n  } satisfies Event;\n\n  if (syntheticException) {\n    const frames = parseStackFrames(stackParser, syntheticException);\n    if (frames.length) {\n      // event.exception.values[0] has been set above\n      // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n      event.exception.values[0]!.stacktrace = { frames };\n    }\n  }\n\n  return event;\n}\n\nfunction eventFromError(stackParser: StackParser, ex: Error): Event {\n  return {\n    exception: {\n      values: [exceptionFromError(stackParser, ex)],\n    },\n  };\n}\n\n/** Parses stack frames from an error */\nfunction parseStackFrames(\n  stackParser: StackParser,\n  ex: Error & { framesToPop?: number; stacktrace?: string },\n): StackFrame[] {\n  // Access and store the stacktrace property before doing ANYTHING\n  // else to it because Opera is not very good at providing it\n  // reliably in other circumstances.\n  const stacktrace = ex.stacktrace || ex.stack || '';\n\n  const skipLines = getSkipFirstStackStringLines(ex);\n  const framesToPop = getPopFirstTopFrames(ex);\n\n  try {\n    return stackParser(stacktrace, skipLines, framesToPop);\n  } catch {\n    // no-empty\n  }\n\n  return [];\n}\n\n// Based on our own mapping pattern - https://github.com/getsentry/sentry/blob/9f08305e09866c8bd6d0c24f5b0aabdd7dd6c59c/src/sentry/lang/javascript/errormapping.py#L83-L108\nconst reactMinifiedRegexp = /Minified React error #\\d+;/i;\n\n/**\n * Certain known React errors contain links that would be falsely\n * parsed as frames. This function check for these errors and\n * returns number of the stack string lines to skip.\n */\nfunction getSkipFirstStackStringLines(ex: Error): number {\n  if (ex && reactMinifiedRegexp.test(ex.message)) {\n    return 1;\n  }\n\n  return 0;\n}\n\n/**\n * If error has `framesToPop` property, it means that the\n * creator tells us the first x frames will be useless\n * and should be discarded. Typically error from wrapper function\n * which don't point to the actual location in the developer's code.\n *\n * Example: https://github.com/zertosh/invariant/blob/master/invariant.js#L46\n */\nfunction getPopFirstTopFrames(ex: Error & { framesToPop?: unknown }): number {\n  if (typeof ex.framesToPop === 'number') {\n    return ex.framesToPop;\n  }\n\n  return 0;\n}\n\n// https://developer.mozilla.org/en-US/docs/WebAssembly/JavaScript_interface/Exception\n// @ts-expect-error - WebAssembly.Exception is a valid class\nfunction isWebAssemblyException(exception: unknown): exception is WebAssembly.Exception {\n  // Check for support\n  // @ts-expect-error - WebAssembly.Exception is a valid class\n  // oxlint-disable-next-line typescript/prefer-optional-chain\n  if (typeof WebAssembly !== 'undefined' && typeof WebAssembly.Exception !== 'undefined') {\n    // @ts-expect-error - WebAssembly.Exception is a valid class\n    return exception instanceof WebAssembly.Exception;\n  } else {\n    return false;\n  }\n}\n\n/**\n * Extracts from errors what we use as the exception `type` in error events.\n *\n * Usually, this is the `name` property on Error objects but WASM errors need to be treated differently.\n */\nexport function extractType(ex: Error & { message: { error?: Error } }): string | undefined {\n  const name = ex?.name;\n\n  // The name for WebAssembly.Exception Errors needs to be extracted differently.\n  // Context: https://github.com/getsentry/sentry-javascript/issues/13787\n  if (!name && isWebAssemblyException(ex)) {\n    // Emscripten sets array[type, message] to the \"message\" property on the WebAssembly.Exception object\n    const hasTypeInMessage = ex.message && Array.isArray(ex.message) && ex.message.length == 2;\n    return hasTypeInMessage ? ex.message[0] : 'WebAssembly.Exception';\n  }\n\n  return name;\n}\n\n/**\n * There are cases where stacktrace.message is an Event object\n * https://github.com/getsentry/sentry-javascript/issues/1949\n * In this specific case we try to extract stacktrace.message.error.message\n */\nexport function extractMessage(ex: Error & { message: { error?: Error } }): string {\n  const message = ex?.message;\n\n  if (isWebAssemblyException(ex)) {\n    // For Node 18, Emscripten sets array[type, message] to the \"message\" property on the WebAssembly.Exception object\n    if (Array.isArray(ex.message) && ex.message.length == 2) {\n      return ex.message[1];\n    }\n    return 'wasm exception';\n  }\n\n  if (!message) {\n    return 'No error message';\n  }\n\n  if (message.error && typeof message.error.message === 'string') {\n    return _INTERNAL_enhanceErrorWithSentryInfo(message.error);\n  }\n\n  return _INTERNAL_enhanceErrorWithSentryInfo(ex);\n}\n\n/**\n * Creates an {@link Event} from all inputs to `captureException` and non-primitive inputs to `captureMessage`.\n * @hidden\n */\nexport function eventFromException(\n  stackParser: StackParser,\n  exception: unknown,\n  hint?: EventHint,\n  attachStacktrace?: boolean,\n): PromiseLike<Event> {\n  const syntheticException = hint?.syntheticException || undefined;\n  const event = eventFromUnknownInput(stackParser, exception, syntheticException, attachStacktrace);\n  addExceptionMechanism(event); // defaults to { type: 'generic', handled: true }\n  event.level = 'error';\n  if (hint?.event_id) {\n    event.event_id = hint.event_id;\n  }\n  return resolvedSyncPromise(event);\n}\n\n/**\n * Builds and Event from a Message\n * @hidden\n */\nexport function eventFromMessage(\n  stackParser: StackParser,\n  message: ParameterizedString,\n  level: SeverityLevel = 'info',\n  hint?: EventHint,\n  attachStacktrace?: boolean,\n): PromiseLike<Event> {\n  const syntheticException = hint?.syntheticException || undefined;\n  const event = eventFromString(stackParser, message, syntheticException, attachStacktrace);\n  event.level = level;\n  if (hint?.event_id) {\n    event.event_id = hint.event_id;\n  }\n  return resolvedSyncPromise(event);\n}\n\n/**\n * @hidden\n */\nexport function eventFromUnknownInput(\n  stackParser: StackParser,\n  exception: unknown,\n  syntheticException?: Error,\n  attachStacktrace?: boolean,\n  isUnhandledRejection?: boolean,\n): Event {\n  let event: Event;\n\n  if (isErrorEvent(exception as ErrorEvent) && (exception as ErrorEvent).error) {\n    // If it is an ErrorEvent with `error` property, extract it to get actual Error\n    const errorEvent = exception as ErrorEvent;\n    return eventFromError(stackParser, errorEvent.error as Error);\n  }\n\n  // If it is a `DOMError` (which is a legacy API, but still supported in some browsers) then we just extract the name\n  // and message, as it doesn't provide anything else. According to the spec, all `DOMExceptions` should also be\n  // `Error`s, but that's not the case in IE11, so in that case we treat it the same as we do a `DOMError`.\n  //\n  // https://developer.mozilla.org/en-US/docs/Web/API/DOMError\n  // https://developer.mozilla.org/en-US/docs/Web/API/DOMException\n  // https://webidl.spec.whatwg.org/#es-DOMException-specialness\n  if (isDOMError(exception) || isDOMException(exception as DOMException)) {\n    const domException = exception as DOMException;\n\n    if ('stack' in (exception as Error)) {\n      event = eventFromError(stackParser, exception as Error);\n\n      const firstException = event.exception?.values?.[0];\n      if (attachStacktrace && syntheticException && firstException && !firstException.stacktrace) {\n        const frames = parseStackFrames(stackParser, syntheticException);\n        if (frames.length) {\n          firstException.stacktrace = { frames };\n          addExceptionMechanism(event, { synthetic: true });\n        }\n      }\n    } else {\n      const name = domException.name || (isDOMError(domException) ? 'DOMError' : 'DOMException');\n      const message = domException.message ? `${name}: ${domException.message}` : name;\n      event = eventFromString(stackParser, message, syntheticException, attachStacktrace);\n      addExceptionTypeValue(event, message);\n    }\n    if ('code' in domException) {\n      // eslint-disable-next-line typescript/no-deprecated\n      event.tags = { ...event.tags, 'DOMException.code': `${domException.code}` };\n    }\n\n    return event;\n  }\n  if (isError(exception)) {\n    // we have a real Error object, do nothing\n    return eventFromError(stackParser, exception);\n  }\n  if (isPlainObject(exception) || isEvent(exception)) {\n    // If it's a plain object or an instance of `Event` (the built-in JS kind, not this SDK's `Event` type), serialize\n    // it manually. This will allow us to group events based on top-level keys which is much better than creating a new\n    // group on any key/value change.\n    const objectException = exception;\n    event = eventFromPlainObject(stackParser, objectException, syntheticException, isUnhandledRejection);\n    addExceptionMechanism(event, {\n      synthetic: true,\n    });\n    return event;\n  }\n\n  // If none of previous checks were valid, then it means that it's not:\n  // - an instance of DOMError\n  // - an instance of DOMException\n  // - an instance of Event\n  // - an instance of Error\n  // - a valid ErrorEvent (one with an error property)\n  // - a plain Object\n  //\n  // So bail out and capture it as a simple message:\n  event = eventFromString(stackParser, exception as string, syntheticException, attachStacktrace);\n  addExceptionTypeValue(event, `${exception}`, undefined);\n  addExceptionMechanism(event, {\n    synthetic: true,\n  });\n\n  return event;\n}\n\nfunction eventFromString(\n  stackParser: StackParser,\n  message: ParameterizedString,\n  syntheticException?: Error,\n  attachStacktrace?: boolean,\n): Event {\n  const event: Event = {};\n\n  if (attachStacktrace && syntheticException) {\n    const frames = parseStackFrames(stackParser, syntheticException);\n    if (frames.length) {\n      event.exception = {\n        values: [{ value: message, stacktrace: { frames } }],\n      };\n    }\n    addExceptionMechanism(event, { synthetic: true });\n  }\n\n  if (isParameterizedString(message)) {\n    const { __sentry_template_string__, __sentry_template_values__ } = message;\n\n    event.logentry = {\n      message: __sentry_template_string__,\n      params: __sentry_template_values__,\n    };\n    return event;\n  }\n\n  event.message = message;\n  return event;\n}\n\nfunction getNonErrorObjectExceptionValue(\n  exception: Record<string, unknown>,\n  { isUnhandledRejection }: { isUnhandledRejection?: boolean },\n): string {\n  const keys = extractExceptionKeysForMessage(exception);\n  const captureType = isUnhandledRejection ? 'promise rejection' : 'exception';\n\n  // Some ErrorEvent instances do not have an `error` property, which is why they are not handled before\n  // We still want to try to get a decent message for these cases\n  if (isErrorEvent(exception)) {\n    return `Event \\`ErrorEvent\\` captured as ${captureType} with message \\`${exception.message}\\``;\n  }\n\n  if (isEvent(exception)) {\n    const className = getObjectClassName(exception);\n    return `Event \\`${className}\\` (type=${exception.type}) captured as ${captureType}`;\n  }\n\n  return `Object captured as ${captureType} with keys: ${keys}`;\n}\n\nfunction getObjectClassName(obj: unknown): string | undefined | void {\n  try {\n    const prototype: Prototype | null = Object.getPrototypeOf(obj);\n    return prototype ? prototype.constructor.name : undefined;\n  } catch {\n    // ignore errors here\n  }\n}\n\n/** If a plain object has a property that is an `Error`, return this error. */\nfunction getErrorPropertyFromObject(obj: Record<string, unknown>): Error | undefined {\n  return Object.values(obj).find(isError);\n}\n", "import type {\n  BrowserClientProfilingOptions,\n  BrowserClientReplayOptions,\n  ClientOptions,\n  Event,\n  EventHint,\n  Options as CoreOptions,\n  ParameterizedString,\n  Scope,\n  SeverityLevel,\n} from '@sentry/core/browser';\nimport { addAutoIpAddressToSession, applySdkMetadata, Client, getSDKSource } from '@sentry/core/browser';\nimport { eventFromException, eventFromMessage } from './eventbuilder';\nimport { WINDOW } from './helpers';\nimport type { BrowserTransportOptions } from './transports/types';\n\n/**\n * A magic string that build tooling can leverage in order to inject a release value into the SDK.\n */\ndeclare const __SENTRY_RELEASE__: string | undefined;\n\ntype BrowserSpecificOptions = BrowserClientReplayOptions &\n  BrowserClientProfilingOptions & {\n    /** If configured, this URL will be used as base URL for lazy loading integration. */\n    cdnBaseUrl?: string;\n\n    /**\n     * Important: Only set this option if you know what you are doing!\n     *\n     * By default, the SDK will check if `Sentry.init` is called in a browser extension.\n     * In case it is, it will stop initialization and log a warning\n     * because browser extensions require a different Sentry initialization process:\n     * https://docs.sentry.io/platforms/javascript/best-practices/shared-environments/\n     *\n     * Setting up the SDK in a browser extension with global error monitoring is not recommended\n     * and will likely flood you with errors from other web sites or extensions. This can heavily\n     * impact your quota and cause interference with your and other Sentry SDKs in shared environments.\n     *\n     * If this check wrongfully flags your setup as a browser extension, you can set this\n     * option to `true` to skip the check.\n     *\n     * @default false\n     */\n    skipBrowserExtensionCheck?: boolean;\n\n    /**\n     * If you use Spotlight by Sentry during development, use\n     * this option to forward captured Sentry events to Spotlight.\n     *\n     * Either set it to true, or provide a specific Spotlight Sidecar URL.\n     *\n     * More details: https://spotlightjs.com/\n     *\n     * IMPORTANT: Only set this option to `true` while developing, not in production!\n     */\n    spotlight?: boolean | string;\n  };\n/**\n * Configuration options for the Sentry Browser SDK.\n * @see @sentry/core Options for more information.\n */\nexport type BrowserOptions = CoreOptions<BrowserTransportOptions> & BrowserSpecificOptions;\n\n/**\n * Configuration options for the Sentry Browser SDK Client class\n * @see BrowserClient for more information.\n */\nexport type BrowserClientOptions = ClientOptions<BrowserTransportOptions> & BrowserSpecificOptions;\n\n/**\n * The Sentry Browser SDK Client.\n *\n * @see BrowserOptions for documentation on configuration options.\n * @see SentryClient for usage documentation.\n */\nexport class BrowserClient extends Client<BrowserClientOptions> {\n  /**\n   * Creates a new Browser SDK instance.\n   *\n   * @param options Configuration options for this SDK.\n   */\n  public constructor(options: BrowserClientOptions) {\n    const opts = applyDefaultOptions(options);\n    const sdkSource = WINDOW.SENTRY_SDK_SOURCE || getSDKSource();\n    applySdkMetadata(opts, 'browser', ['browser'], sdkSource);\n\n    super(opts);\n\n    const { userInfo } = this.getDataCollectionOptions();\n\n    if (opts._metadata?.sdk) {\n      opts._metadata.sdk.settings = {\n        // Only allow IP inferral by Relay if the user opted in via dataCollection\n        infer_ip: userInfo ? 'auto' : 'never',\n        // purposefully allowing already passed settings to override the default\n        ...opts._metadata.sdk.settings,\n      };\n    }\n\n    const { sendClientReports } = this._options;\n\n    // Flush buffered data when the page becomes hidden (e.g. tab switch, navigation, or the page\n    // being discarded). `flush()` emits the `flush` hook, which drains the span (streaming), log and\n    // metric buffers and hands the resulting envelopes to the transport (which uses `keepalive`).\n    // Client report outcomes don't listen to the `flush` hook, so we flush them separately.\n    if (WINDOW.document) {\n      WINDOW.document.addEventListener('visibilitychange', () => {\n        if (WINDOW.document.visibilityState === 'hidden') {\n          if (sendClientReports) {\n            this._flushOutcomes();\n          }\n          // Defer the flush to a microtask so that visibilitychange listeners registered after this\n          // one have already run. In particular, browser tracing's background-tab detection ends the\n          // active pageload/navigation (segment) span when the page is hidden. Deferring ensures that\n          // segment span has been added to the streaming buffer before we flush, so it is sent\n          // together with its child spans instead of being orphaned.\n          queueMicrotask(() => {\n            void this.flush();\n          });\n        }\n      });\n    }\n\n    if (userInfo) {\n      this.on('beforeSendSession', addAutoIpAddressToSession);\n    }\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public eventFromException(exception: unknown, hint?: EventHint): PromiseLike<Event> {\n    return eventFromException(this._options.stackParser, exception, hint, this._options.attachStacktrace);\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public eventFromMessage(\n    message: ParameterizedString,\n    level: SeverityLevel = 'info',\n    hint?: EventHint,\n  ): PromiseLike<Event> {\n    return eventFromMessage(this._options.stackParser, message, level, hint, this._options.attachStacktrace);\n  }\n\n  /**\n   * @inheritDoc\n   */\n  protected _prepareEvent(\n    event: Event,\n    hint: EventHint,\n    currentScope: Scope,\n    isolationScope: Scope,\n  ): PromiseLike<Event | null> {\n    event.platform = event.platform || 'javascript';\n\n    return super._prepareEvent(event, hint, currentScope, isolationScope);\n  }\n}\n\n/** Exported only for tests. */\nexport function applyDefaultOptions<T extends Partial<BrowserClientOptions>>(optionsArg: T): T {\n  return {\n    release:\n      typeof __SENTRY_RELEASE__ === 'string' // This allows build tooling to find-and-replace __SENTRY_RELEASE__ to inject a release value\n        ? __SENTRY_RELEASE__\n        : WINDOW.SENTRY_RELEASE?.id, // This supports the variable that sentry-webpack-plugin injects\n    sendClientReports: true,\n    // We default this to true, as it is the safer scenario\n    parentSpanIsAlwaysRootSpan: true,\n    ...optionsArg,\n  };\n}\n", "declare const __DEBUG_BUILD__: boolean;\n\n/**\n * This serves as a build time flag that will be true by default, but false in non-debug builds or if users replace `__SENTRY_DEBUG__` in their generated code.\n *\n * ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking.\n */\nexport const DEBUG_BUILD = __DEBUG_BUILD__;\n", "import type {\n  FetchBreadcrumbHint,\n  HandlerDataFetch,\n  SentryWrappedXMLHttpRequest,\n  XhrBreadcrumbHint,\n} from '@sentry/core';\nimport { GLOBAL_OBJ } from '@sentry/core';\n\nexport const WINDOW = GLOBAL_OBJ as typeof GLOBAL_OBJ &\n  // document is not available in all browser environments (webworkers). We make it optional so you have to explicitly check for it\n  Omit<Window, 'document'> &\n  Partial<Pick<Window, 'document'>>;\n\nexport type NetworkMetaWarning =\n  | 'MAYBE_JSON_TRUNCATED'\n  | 'TEXT_TRUNCATED'\n  | 'URL_SKIPPED'\n  | 'BODY_PARSE_ERROR'\n  | 'BODY_PARSE_TIMEOUT'\n  | 'UNPARSEABLE_BODY_TYPE';\n\ntype RequestBody = null | Blob | BufferSource | FormData | URLSearchParams | string;\n\nexport type XhrHint = XhrBreadcrumbHint & {\n  xhr: XMLHttpRequest & SentryWrappedXMLHttpRequest;\n  input?: RequestBody;\n};\nexport type FetchHint = FetchBreadcrumbHint & {\n  input: HandlerDataFetch['args'];\n  response: Response;\n};\n", "/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { MetricRatingThresholds, MetricType } from '../types';\n\nconst getRating = (value: number, thresholds: MetricRatingThresholds): MetricType['rating'] => {\n  if (value > thresholds[1]) {\n    return 'poor';\n  }\n  if (value > thresholds[0]) {\n    return 'needs-improvement';\n  }\n  return 'good';\n};\n\nexport const bindReporter = <MetricName extends MetricType['name']>(\n  callback: (metric: Extract<MetricType, { name: MetricName }>) => void,\n  metric: Extract<MetricType, { name: MetricName }>,\n  thresholds: MetricRatingThresholds,\n  reportAllChanges?: boolean,\n) => {\n  let prevValue: number;\n  let delta: number;\n  return (forceReport?: boolean) => {\n    if (metric.value >= 0) {\n      if (forceReport || reportAllChanges) {\n        delta = metric.value - (prevValue ?? 0);\n\n        // Report the metric if there's a non-zero delta or if no previous\n        // value exists (which can happen in the case of the document becoming\n        // hidden when the metric value is 0).\n        // See: https://github.com/GoogleChrome/web-vitals/issues/14\n        if (delta || prevValue === undefined) {\n          prevValue = metric.value;\n          metric.delta = delta;\n          metric.rating = getRating(metric.value, thresholds);\n          callback(metric);\n        }\n      }\n    }\n  };\n};\n", "/*\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { WINDOW } from '../../../types';\n\n// sentry-specific change:\n// add optional param to not check for responseStart (see comment below)\nexport const getNavigationEntry = (checkResponseStart = true): PerformanceNavigationTiming | void => {\n  const navigationEntry = WINDOW.performance?.getEntriesByType?.('navigation')[0];\n  // Check to ensure the `responseStart` property is present and valid.\n  // In some cases a zero value is reported by the browser (for\n  // privacy/security reasons), and in other cases (bugs) the value is\n  // negative or is larger than the current page time. Ignore these cases:\n  // - https://github.com/GoogleChrome/web-vitals/issues/137\n  // - https://github.com/GoogleChrome/web-vitals/issues/162\n  // - https://github.com/GoogleChrome/web-vitals/issues/275\n  if (\n    // sentry-specific change:\n    // We don't want to check for responseStart for our own use of `getNavigationEntry`\n    !checkResponseStart ||\n    (navigationEntry && navigationEntry.responseStart > 0 && navigationEntry.responseStart < performance.now())\n  ) {\n    return navigationEntry;\n  }\n};\n", "/*\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { getNavigationEntry } from './getNavigationEntry';\n\nexport const getActivationStart = (): number => {\n  const navEntry = getNavigationEntry();\n  return navEntry?.activationStart ?? 0;\n};\n", "import { WINDOW } from '../../../types';\n\n/**\n * web-vitals 5.1.0 switched listeners to be added on the window rather than the document.\n * Instead of having to check for window/document every time we add a listener, we can use this function.\n */\nexport function addPageListener(type: string, listener: EventListener, options?: boolean | AddEventListenerOptions) {\n  if (WINDOW.document) {\n    WINDOW.addEventListener(type, listener, options);\n  }\n}\n/**\n * web-vitals 5.1.0 switched listeners to be removed from the window rather than the document.\n * Instead of having to check for window/document every time we remove a listener, we can use this function.\n */\nexport function removePageListener(type: string, listener: EventListener, options?: boolean | AddEventListenerOptions) {\n  if (WINDOW.document) {\n    WINDOW.removeEventListener(type, listener, options);\n  }\n}\n", "/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { WINDOW } from '../../../types';\nimport { getActivationStart } from './getActivationStart';\nimport { addPageListener, removePageListener } from './globalListeners';\n\nlet firstHiddenTime = -1;\nconst onHiddenFunctions: Set<() => void> = new Set();\n\nconst initHiddenTime = () => {\n  // If the document is hidden when this code runs, assume it was always\n  // hidden and the page was loaded in the background, with the one exception\n  // that visibility state is always 'hidden' during prerendering, so we have\n  // to ignore that case until prerendering finishes (see: `prerenderingchange`\n  // event logic below).\n  return WINDOW.document?.visibilityState === 'hidden' && !WINDOW.document?.prerendering ? 0 : Infinity;\n};\n\nconst onVisibilityUpdate = (event: Event) => {\n  // Handle changes to hidden state\n  if (isPageHidden(event) && firstHiddenTime > -1) {\n    // Sentry-specific change: Also call onHidden callbacks for pagehide events\n    // to support older browsers (Safari <14.4) that don't properly fire visibilitychange\n    if (event.type === 'visibilitychange' || event.type === 'pagehide') {\n      for (const onHiddenFunction of onHiddenFunctions) {\n        onHiddenFunction();\n      }\n    }\n\n    // If the document is 'hidden' and no previous hidden timestamp has been\n    // set (so is infinity), update it based on the current event data.\n    if (!isFinite(firstHiddenTime)) {\n      // If the event is a 'visibilitychange' event, it means the page was\n      // visible prior to this change, so the event timestamp is the first\n      // hidden time.\n      // However, if the event is not a 'visibilitychange' event, then it must\n      // be a 'prerenderingchange' or 'pagehide' event, and the fact that the document is\n      // still 'hidden' from the above check means the tab was activated\n      // in a background state and so has always been hidden.\n      firstHiddenTime = event.type === 'visibilitychange' ? event.timeStamp : 0;\n\n      // We no longer need the `prerenderingchange` event listener now we've\n      // set an initial init time so remove that\n      // (we'll keep the visibilitychange and pagehide ones for onHiddenFunction above)\n      removePageListener('prerenderingchange', onVisibilityUpdate, true);\n    }\n  }\n};\n\nexport const getVisibilityWatcher = () => {\n  if (WINDOW.document && firstHiddenTime < 0) {\n    // Check if we have a previous hidden `visibility-state` performance entry.\n    const activationStart = getActivationStart();\n    const firstVisibilityStateHiddenTime = !WINDOW.document.prerendering\n      ? globalThis.performance\n          .getEntriesByType('visibility-state')\n          .filter(e => e.name === 'hidden' && e.startTime > activationStart)[0]?.startTime\n      : undefined;\n\n    // Prefer that, but if it's not available and the document is hidden when\n    // this code runs, assume it was hidden since navigation start. This isn't\n    // a perfect heuristic, but it's the best we can do until the\n    // `visibility-state` performance entry becomes available in all browsers.\n    firstHiddenTime = firstVisibilityStateHiddenTime ?? initHiddenTime();\n    // Listen for visibility changes so we can handle things like bfcache\n    // restores and/or prerender without having to examine individual\n    // timestamps in detail and also for onHidden function calls.\n    addPageListener('visibilitychange', onVisibilityUpdate, true);\n\n    // Sentry-specific change: Some browsers have buggy implementations of visibilitychange,\n    // so we use pagehide in addition, just to be safe. This is also required for older\n    // Safari versions (<14.4) that we still support.\n    addPageListener('pagehide', onVisibilityUpdate, true);\n\n    // IMPORTANT: when a page is prerendering, its `visibilityState` is\n    // 'hidden', so in order to account for cases where this module checks for\n    // visibility during prerendering, an additional check after prerendering\n    // completes is also required.\n    addPageListener('prerenderingchange', onVisibilityUpdate, true);\n  }\n\n  return {\n    get firstHiddenTime() {\n      return firstHiddenTime;\n    },\n    onHidden(cb: () => void) {\n      onHiddenFunctions.add(cb);\n    },\n  };\n};\n\n/**\n * Check if the page is hidden, uses the `pagehide` event for older browsers support that we used to have in `onHidden` function.\n * Some browsers we still support (Safari <14.4) don't fully support `visibilitychange`\n * or have known bugs w.r.t the `visibilitychange` event.\n * // TODO (v11): If we decide to drop support for Safari 14.4, we can use the logic from web-vitals 4.2.4\n */\nfunction isPageHidden(event: Event) {\n  return event.type === 'pagehide' || WINDOW.document?.visibilityState === 'hidden';\n}\n", "/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Performantly generate a unique, 30-char string by combining a version\n * number, the current timestamp with a 13-digit number integer.\n * @return {string}\n */\nexport const generateUniqueID = () => {\n  return `v5-${Date.now()}-${Math.floor(Math.random() * (9e12 - 1)) + 1e12}`;\n};\n", "/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { WINDOW } from '../../../types';\nimport type { MetricType } from '../types';\nimport { generateUniqueID } from './generateUniqueID';\nimport { getActivationStart } from './getActivationStart';\nimport { getNavigationEntry } from './getNavigationEntry';\n\nexport const initMetric = <MetricName extends MetricType['name']>(name: MetricName, value: number = -1) => {\n  const navEntry = getNavigationEntry();\n  let navigationType: MetricType['navigationType'] = 'navigate';\n\n  if (navEntry) {\n    if (WINDOW.document?.prerendering || getActivationStart() > 0) {\n      navigationType = 'prerender';\n    } else if (WINDOW.document?.wasDiscarded) {\n      navigationType = 'restore';\n    } else if (navEntry.type) {\n      navigationType = navEntry.type.replace(/_/g, '-') as MetricType['navigationType'];\n    }\n  }\n\n  // Use `entries` type specific for the metric.\n  const entries: Extract<MetricType, { name: MetricName }>['entries'] = [];\n\n  return {\n    name,\n    value,\n    rating: 'good' as const, // If needed, will be updated when reported. `const` to keep the type from widening to `string`.\n    delta: 0,\n    entries,\n    id: generateUniqueID(),\n    navigationType,\n  };\n};\n", "/*\n * Copyright 2024 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst instanceMap: WeakMap<object, unknown> = new WeakMap();\n\n/**\n * A function that accepts and identity object and a class object and returns\n * either a new instance of that class or an existing instance, if the\n * identity object was previously used.\n */\nexport function initUnique<T>(identityObj: object, ClassObj: new () => T): T {\n  try {\n    if (!instanceMap.get(identityObj)) {\n      instanceMap.set(identityObj, new ClassObj());\n    }\n    return instanceMap.get(identityObj)! as T;\n  } catch (_e) {\n    // --- START Sentry-custom code (try/catch wrapping) ---\n    // Fix for cases where identityObj is not a valid key for WeakMap (sometimes a problem in Safari)\n    // Just return a new instance without caching it in instanceMap\n    return new ClassObj();\n  }\n  // --- END Sentry-custom code ---\n}\n", "/* eslint-disable jsdoc/require-jsdoc */\n/*\n * Copyright 2024 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport class LayoutShiftManager {\n  // eslint-disable-next-line @typescript-eslint/explicit-member-accessibility\n  _onAfterProcessingUnexpectedShift?: (entry: LayoutShift) => void;\n\n  // oxlint-disable-next-line sdk/no-class-field-initializers\n  _sessionValue = 0;\n  // oxlint-disable-next-line sdk/no-class-field-initializers\n  _sessionEntries: LayoutShift[] = [];\n\n  // eslint-disable-next-line @typescript-eslint/explicit-member-accessibility\n  _processEntry(entry: LayoutShift) {\n    // Only count layout shifts without recent user input.\n    if (entry.hadRecentInput) return;\n\n    const firstSessionEntry = this._sessionEntries[0];\n    // This previously used `this._sessionEntries.at(-1)` but that is ES2022. We support ES2021 and earlier.\n    const lastSessionEntry = this._sessionEntries[this._sessionEntries.length - 1];\n\n    // If the entry occurred less than 1 second after the previous entry\n    // and less than 5 seconds after the first entry in the session,\n    // include the entry in the current session. Otherwise, start a new\n    // session.\n    if (\n      this._sessionValue &&\n      firstSessionEntry &&\n      lastSessionEntry &&\n      entry.startTime - lastSessionEntry.startTime < 1000 &&\n      entry.startTime - firstSessionEntry.startTime < 5000\n    ) {\n      this._sessionValue += entry.value;\n      this._sessionEntries.push(entry);\n    } else {\n      this._sessionValue = entry.value;\n      this._sessionEntries = [entry];\n    }\n\n    this._onAfterProcessingUnexpectedShift?.(entry);\n  }\n}\n", "/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\ninterface PerformanceEntryMap {\n  event: PerformanceEventTiming[];\n  'first-input': PerformanceEventTiming[];\n  'layout-shift': LayoutShift[];\n  'largest-contentful-paint': LargestContentfulPaint[];\n  'long-animation-frame': PerformanceLongAnimationFrameTiming[];\n  paint: PerformancePaintTiming[];\n  navigation: PerformanceNavigationTiming[];\n  resource: PerformanceResourceTiming[];\n  // Sentry-specific change:\n  // We add longtask as a supported entry type as we use this in\n  // our `instrumentPerformanceObserver` function also observes 'longtask'\n  // entries.\n  longtask: PerformanceEntry[];\n  // Sentry-specific change:\n  // We add element as a supported entry type for ElementTiming API\n  element: PerformanceEntry[];\n}\n\n/**\n * Takes a performance entry type and a callback function, and creates a\n * `PerformanceObserver` instance that will observe the specified entry type\n * with buffering enabled and call the callback _for each entry_.\n *\n * This function also feature-detects entry support and wraps the logic in a\n * try/catch to avoid errors in unsupporting browsers.\n */\nexport const observe = <K extends keyof PerformanceEntryMap>(\n  type: K,\n  callback: (entries: PerformanceEntryMap[K]) => void,\n  opts: PerformanceObserverInit = {},\n): PerformanceObserver | undefined => {\n  try {\n    if (PerformanceObserver.supportedEntryTypes.includes(type)) {\n      const po = new PerformanceObserver(list => {\n        // Delay by a microtask to workaround a bug in Safari where the\n        // callback is invoked immediately, rather than in a separate task.\n        // See: https://github.com/GoogleChrome/web-vitals/issues/277\n        // eslint-disable-next-line @typescript-eslint/no-floating-promises\n        Promise.resolve().then(() => {\n          callback(list.getEntries() as PerformanceEntryMap[K]);\n        });\n      });\n      po.observe({ type, buffered: true, ...opts });\n      return po;\n    }\n  } catch {\n    // Do nothing.\n  }\n  return;\n};\n", "/*\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const runOnce = (cb: () => void) => {\n  let called = false;\n  return () => {\n    if (!called) {\n      cb();\n      called = true;\n    }\n  };\n};\n", "/*\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { WINDOW } from '../../../types';\n\nexport const whenActivated = (callback: () => void) => {\n  if (WINDOW.document?.prerendering) {\n    addEventListener('prerenderingchange', () => callback(), true);\n  } else {\n    callback();\n  }\n};\n", "/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { bindReporter } from './lib/bindReporter';\nimport { getActivationStart } from './lib/getActivationStart';\nimport { getVisibilityWatcher } from './lib/getVisibilityWatcher';\nimport { initMetric } from './lib/initMetric';\nimport { observe } from './lib/observe';\nimport { whenActivated } from './lib/whenActivated';\nimport type { FCPMetric, MetricRatingThresholds, ReportOpts } from './types';\n\n/** Thresholds for FCP. See https://web.dev/articles/fcp#what_is_a_good_fcp_score */\nexport const FCPThresholds: MetricRatingThresholds = [1800, 3000];\n\n/**\n * Calculates the [FCP](https://web.dev/articles/fcp) value for the current page and\n * calls the `callback` function once the value is ready, along with the\n * relevant `paint` performance entry used to determine the value. The reported\n * value is a `DOMHighResTimeStamp`.\n */\nexport const onFCP = (onReport: (metric: FCPMetric) => void, opts: ReportOpts = {}) => {\n  whenActivated(() => {\n    const visibilityWatcher = getVisibilityWatcher();\n    const metric = initMetric('FCP');\n    let report: ReturnType<typeof bindReporter>;\n\n    const handleEntries = (entries: FCPMetric['entries']) => {\n      for (const entry of entries) {\n        if (entry.name === 'first-contentful-paint') {\n          po!.disconnect();\n\n          // Only report if the page wasn't hidden prior to the first paint.\n          if (entry.startTime < visibilityWatcher.firstHiddenTime) {\n            // The activationStart reference is used because FCP should be\n            // relative to page activation rather than navigation start if the\n            // page was prerendered. But in cases where `activationStart` occurs\n            // after the FCP, this time should be clamped at 0.\n            metric.value = Math.max(entry.startTime - getActivationStart(), 0);\n            metric.entries.push(entry);\n            report(true);\n          }\n        }\n      }\n    };\n\n    const po = observe('paint', handleEntries);\n\n    if (po) {\n      report = bindReporter(onReport, metric, FCPThresholds, opts.reportAllChanges);\n    }\n  });\n};\n", "/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { WINDOW } from '../../types';\nimport { bindReporter } from './lib/bindReporter';\nimport { getVisibilityWatcher } from './lib/getVisibilityWatcher';\nimport { initMetric } from './lib/initMetric';\nimport { initUnique } from './lib/initUnique';\nimport { LayoutShiftManager } from './lib/LayoutShiftManager';\nimport { observe } from './lib/observe';\nimport { runOnce } from './lib/runOnce';\nimport { onFCP } from './onFCP';\nimport type { CLSMetric, MetricRatingThresholds, ReportOpts } from './types';\n\n/** Thresholds for CLS. See https://web.dev/articles/cls#what_is_a_good_cls_score */\nexport const CLSThresholds: MetricRatingThresholds = [0.1, 0.25];\n\n/**\n * Calculates the [CLS](https://web.dev/articles/cls) value for the current page and\n * calls the `callback` function once the value is ready to be reported, along\n * with all `layout-shift` performance entries that were used in the metric\n * value calculation. The reported value is a `double` (corresponding to a\n * [layout shift score](https://web.dev/articles/cls#layout_shift_score)).\n *\n * If the `reportAllChanges` configuration option is set to `true`, the\n * `callback` function will be called as soon as the value is initially\n * determined as well as any time the value changes throughout the page\n * lifespan.\n *\n * _**Important:** CLS should be continually monitored for changes throughout\n * the entire lifespan of a page—including if the user returns to the page after\n * it's been hidden/backgrounded. However, since browsers often [will not fire\n * additional callbacks once the user has backgrounded a\n * page](https://developer.chrome.com/blog/page-lifecycle-api/#advice-hidden),\n * `callback` is always called when the page's visibility state changes to\n * hidden. As a result, the `callback` function might be called multiple times\n * during the same page load._\n */\nexport const onCLS = (onReport: (metric: CLSMetric) => void, opts: ReportOpts = {}) => {\n  // Start monitoring FCP so we can only report CLS if FCP is also reported.\n  // Note: this is done to match the current behavior of CrUX.\n  onFCP(\n    runOnce(() => {\n      const metric = initMetric('CLS', 0);\n      let report: ReturnType<typeof bindReporter>;\n      const visibilityWatcher = getVisibilityWatcher();\n\n      const layoutShiftManager = initUnique(opts, LayoutShiftManager);\n\n      const handleEntries = (entries: LayoutShift[]) => {\n        for (const entry of entries) {\n          layoutShiftManager._processEntry(entry);\n        }\n\n        // If the current session value is larger than the current CLS value,\n        // update CLS and the entries contributing to it.\n        if (layoutShiftManager._sessionValue > metric.value) {\n          metric.value = layoutShiftManager._sessionValue;\n          metric.entries = layoutShiftManager._sessionEntries;\n          report();\n        }\n      };\n\n      const po = observe('layout-shift', handleEntries);\n      if (po) {\n        report = bindReporter(onReport, metric, CLSThresholds, opts.reportAllChanges);\n\n        visibilityWatcher.onHidden(() => {\n          handleEntries(po.takeRecords() as CLSMetric['entries']);\n          report(true);\n        });\n\n        // Queue a task to report (if nothing else triggers a report first).\n        // This allows CLS to be reported as soon as FCP fires when\n        // `reportAllChanges` is true.\n        WINDOW?.setTimeout?.(report);\n      }\n    }),\n  );\n};\n", "/*\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { observe } from '../observe';\n\ndeclare global {\n  interface Performance {\n    interactionCount: number;\n  }\n}\n\nlet interactionCountEstimate = 0;\nlet minKnownInteractionId = Infinity;\nlet maxKnownInteractionId = 0;\n\nconst updateEstimate = (entries: PerformanceEventTiming[]) => {\n  entries.forEach(e => {\n    if (e.interactionId) {\n      minKnownInteractionId = Math.min(minKnownInteractionId, e.interactionId);\n      maxKnownInteractionId = Math.max(maxKnownInteractionId, e.interactionId);\n\n      interactionCountEstimate = maxKnownInteractionId ? (maxKnownInteractionId - minKnownInteractionId) / 7 + 1 : 0;\n    }\n  });\n};\n\nlet po: PerformanceObserver | undefined;\n\n/**\n * Returns the `interactionCount` value using the native API (if available)\n * or the polyfill estimate in this module.\n */\nexport const getInteractionCount = (): number => {\n  return po ? interactionCountEstimate : performance.interactionCount || 0;\n};\n\n/**\n * Feature detects native support or initializes the polyfill if needed.\n */\nexport const initInteractionCountPolyfill = (): void => {\n  if ('interactionCount' in performance || po) return;\n\n  po = observe('event', updateEstimate, {\n    type: 'event',\n    buffered: true,\n    durationThreshold: 0,\n  } as PerformanceObserverInit);\n};\n", "/*\n * Copyright 2024 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { getInteractionCount } from './polyfills/interactionCountPolyfill.js';\n\nexport interface Interaction {\n  _latency: number;\n  // While the `id` and `entries` properties are also internal and could be\n  // mangled by prefixing with an underscore, since they correspond to public\n  // symbols there is no need to mangle them as the library will compress\n  // better if we reuse the existing names.\n  id: number;\n  entries: PerformanceEventTiming[];\n}\n\n// To prevent unnecessary memory usage on pages with lots of interactions,\n// store at most 10 of the longest interactions to consider as INP candidates.\nconst MAX_INTERACTIONS_TO_CONSIDER = 10;\n\n// Used to store the interaction count after a bfcache restore, since p98\n// interaction latencies should only consider the current navigation.\nlet prevInteractionCount = 0;\n\n/**\n * Returns the interaction count since the last bfcache restore (or for the\n * full page lifecycle if there were no bfcache restores).\n */\nconst getInteractionCountForNavigation = () => {\n  return getInteractionCount() - prevInteractionCount;\n};\n\n/**\n *\n */\nexport class InteractionManager {\n  /**\n   * A list of longest interactions on the page (by latency) sorted so the\n   * longest one is first. The list is at most MAX_INTERACTIONS_TO_CONSIDER\n   * long.\n   */\n  // oxlint-disable-next-line sdk/no-class-field-initializers\n  _longestInteractionList: Interaction[] = [];\n\n  /**\n   * A mapping of longest interactions by their interaction ID.\n   * This is used for faster lookup.\n   */\n  // oxlint-disable-next-line sdk/no-class-field-initializers\n  _longestInteractionMap: Map<number, Interaction> = new Map();\n\n  // eslint-disable-next-line @typescript-eslint/explicit-member-accessibility\n  _onBeforeProcessingEntry?: (entry: PerformanceEventTiming) => void;\n\n  // eslint-disable-next-line @typescript-eslint/explicit-member-accessibility\n  _onAfterProcessingINPCandidate?: (interaction: Interaction) => void;\n\n  // eslint-disable-next-line @typescript-eslint/explicit-member-accessibility, jsdoc/require-jsdoc\n  _resetInteractions() {\n    prevInteractionCount = getInteractionCount();\n    this._longestInteractionList.length = 0;\n    this._longestInteractionMap.clear();\n  }\n\n  /**\n   * Returns the estimated p98 longest interaction based on the stored\n   * interaction candidates and the interaction count for the current page.\n   */\n  // eslint-disable-next-line @typescript-eslint/explicit-member-accessibility\n  _estimateP98LongestInteraction() {\n    const candidateInteractionIndex = Math.min(\n      this._longestInteractionList.length - 1,\n      Math.floor(getInteractionCountForNavigation() / 50),\n    );\n\n    return this._longestInteractionList[candidateInteractionIndex];\n  }\n\n  /**\n   * Takes a performance entry and adds it to the list of worst interactions\n   * if its duration is long enough to make it among the worst. If the\n   * entry is part of an existing interaction, it is merged and the latency\n   * and entries list is updated as needed.\n   */\n  // eslint-disable-next-line @typescript-eslint/explicit-member-accessibility\n  _processEntry(entry: PerformanceEventTiming) {\n    this._onBeforeProcessingEntry?.(entry);\n\n    // Skip further processing for entries that cannot be INP candidates.\n    if (!(entry.interactionId || entry.entryType === 'first-input')) return;\n\n    // The least-long of the 10 longest interactions.\n    const minLongestInteraction = this._longestInteractionList.at(-1);\n\n    let interaction = this._longestInteractionMap.get(entry.interactionId);\n\n    // Only process the entry if it's possibly one of the ten longest,\n    // or if it's part of an existing interaction.\n    if (\n      interaction ||\n      this._longestInteractionList.length < MAX_INTERACTIONS_TO_CONSIDER ||\n      // If the above conditions are false, `minLongestInteraction` will be set.\n      entry.duration > minLongestInteraction!._latency\n    ) {\n      // If the interaction already exists, update it. Otherwise create one.\n      if (interaction) {\n        // If the new entry has a longer duration, replace the old entries,\n        // otherwise add to the array.\n        if (entry.duration > interaction._latency) {\n          interaction.entries = [entry];\n          interaction._latency = entry.duration;\n        } else if (entry.duration === interaction._latency && entry.startTime === interaction.entries[0]!.startTime) {\n          interaction.entries.push(entry);\n        }\n      } else {\n        interaction = {\n          id: entry.interactionId,\n          entries: [entry],\n          _latency: entry.duration,\n        };\n        this._longestInteractionMap.set(interaction.id, interaction);\n        this._longestInteractionList.push(interaction);\n      }\n\n      // Sort the entries by latency (descending) and keep only the top ten.\n      this._longestInteractionList.sort((a, b) => b._latency - a._latency);\n      if (this._longestInteractionList.length > MAX_INTERACTIONS_TO_CONSIDER) {\n        const removedInteractions = this._longestInteractionList.splice(MAX_INTERACTIONS_TO_CONSIDER);\n\n        for (const interaction of removedInteractions) {\n          this._longestInteractionMap.delete(interaction.id);\n        }\n      }\n\n      // Call any post-processing on the interaction\n      this._onAfterProcessingINPCandidate?.(interaction);\n    }\n  }\n}\n", "/*\n * Copyright 2024 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { WINDOW } from '../../../types.js';\nimport { addPageListener, removePageListener } from './globalListeners.js';\nimport { runOnce } from './runOnce.js';\n\n/**\n * Runs the passed callback during the next idle period, or immediately\n * if the browser's visibility state is (or becomes) hidden.\n */\nexport const whenIdleOrHidden = (cb: () => void) => {\n  const rIC = WINDOW.requestIdleCallback || WINDOW.setTimeout;\n\n  // If the document is hidden, run the callback immediately, otherwise\n  // race an idle callback with the next `visibilitychange` event.\n  if (WINDOW.document?.visibilityState === 'hidden') {\n    cb();\n  } else {\n    // eslint-disable-next-line no-param-reassign\n    cb = runOnce(cb);\n    addPageListener('visibilitychange', cb, { once: true, capture: true });\n    // sentry: we use pagehide instead of directly listening to visibilitychange\n    // because some browsers we still support (Safari <14.4) don't fully support\n    // `visibilitychange` or have known bugs w.r.t the `visibilitychange` event.\n    // TODO(v11): remove this once we drop support for Safari <14.4\n    addPageListener('pagehide', cb, { once: true, capture: true });\n    rIC(() => {\n      cb();\n      // Remove the above event listener since no longer required.\n      // See: https://github.com/GoogleChrome/web-vitals/issues/622\n      removePageListener('visibilitychange', cb, { capture: true });\n      // TODO(v11): remove this once we drop support for Safari <14.4\n      removePageListener('pagehide', cb, { capture: true });\n    });\n  }\n};\n", "/*\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { bindReporter } from './lib/bindReporter';\nimport { getVisibilityWatcher } from './lib/getVisibilityWatcher';\nimport { initMetric } from './lib/initMetric';\nimport { initUnique } from './lib/initUnique';\nimport { InteractionManager } from './lib/InteractionManager';\nimport { observe } from './lib/observe';\nimport { initInteractionCountPolyfill } from './lib/polyfills/interactionCountPolyfill';\nimport { whenActivated } from './lib/whenActivated';\nimport { whenIdleOrHidden } from './lib/whenIdleOrHidden';\nimport type { INPMetric, INPReportOpts, MetricRatingThresholds } from './types';\n\n/** Thresholds for INP. See https://web.dev/articles/inp#what_is_a_good_inp_score */\nexport const INPThresholds: MetricRatingThresholds = [200, 500];\n\n// The default `durationThreshold` used across this library for observing\n// `event` entries via PerformanceObserver.\nconst DEFAULT_DURATION_THRESHOLD = 40;\n\n/**\n * Calculates the [INP](https://web.dev/articles/inp) value for the current\n * page and calls the `callback` function once the value is ready, along with\n * the `event` performance entries reported for that interaction. The reported\n * value is a `DOMHighResTimeStamp`.\n *\n * A custom `durationThreshold` configuration option can optionally be passed\n * to control what `event-timing` entries are considered for INP reporting. The\n * default threshold is `40`, which means INP scores of less than 40 will not\n * be reported. To avoid reporting no interactions in these cases, the library\n * will fall back to the input delay of the first interaction. Note that this\n * will not affect your 75th percentile INP value unless that value is also\n * less than 40 (well below the recommended\n * [good](https://web.dev/articles/inp#what_is_a_good_inp_score) threshold).\n *\n * If the `reportAllChanges` configuration option is set to `true`, the\n * `callback` function will be called as soon as the value is initially\n * determined as well as any time the value changes throughout the page\n * lifespan.\n *\n * _**Important:** INP should be continually monitored for changes throughout\n * the entire lifespan of a page—including if the user returns to the page after\n * it's been hidden/backgrounded. However, since browsers often [will not fire\n * additional callbacks once the user has backgrounded a\n * page](https://developer.chrome.com/blog/page-lifecycle-api/#advice-hidden),\n * `callback` is always called when the page's visibility state changes to\n * hidden. As a result, the `callback` function might be called multiple times\n * during the same page load._\n */\nexport const onINP = (onReport: (metric: INPMetric) => void, opts: INPReportOpts = {}) => {\n  // Return if the browser doesn't support all APIs needed to measure INP.\n  if (!(globalThis.PerformanceEventTiming && 'interactionId' in PerformanceEventTiming.prototype)) {\n    return;\n  }\n\n  const visibilityWatcher = getVisibilityWatcher();\n\n  whenActivated(() => {\n    // TODO(philipwalton): remove once the polyfill is no longer needed.\n    initInteractionCountPolyfill();\n\n    const metric = initMetric('INP');\n    // eslint-disable-next-line prefer-const\n    let report: ReturnType<typeof bindReporter>;\n\n    const interactionManager = initUnique(opts, InteractionManager);\n\n    const handleEntries = (entries: INPMetric['entries']) => {\n      // Queue the `handleEntries()` callback in the next idle task.\n      // This is needed to increase the chances that all event entries that\n      // occurred between the user interaction and the next paint\n      // have been dispatched. Note: there is currently an experiment\n      // running in Chrome (EventTimingKeypressAndCompositionInteractionId)\n      // 123+ that if rolled out fully may make this no longer necessary.\n      whenIdleOrHidden(() => {\n        for (const entry of entries) {\n          interactionManager._processEntry(entry);\n        }\n\n        const inp = interactionManager._estimateP98LongestInteraction();\n\n        if (inp && inp._latency !== metric.value) {\n          metric.value = inp._latency;\n          metric.entries = inp.entries;\n          report();\n        }\n      });\n    };\n\n    const po = observe('event', handleEntries, {\n      // Event Timing entries have their durations rounded to the nearest 8ms,\n      // so a duration of 40ms would be any event that spans 2.5 or more frames\n      // at 60Hz. This threshold is chosen to strike a balance between usefulness\n      // and performance. Running this callback for any interaction that spans\n      // just one or two frames is likely not worth the insight that could be\n      // gained.\n      durationThreshold: opts.durationThreshold ?? DEFAULT_DURATION_THRESHOLD,\n    });\n\n    report = bindReporter(onReport, metric, INPThresholds, opts.reportAllChanges);\n\n    if (po) {\n      // Also observe entries of type `first-input`. This is useful in cases\n      // where the first interaction is less than the `durationThreshold`.\n      po.observe({ type: 'first-input', buffered: true });\n\n      visibilityWatcher.onHidden(() => {\n        handleEntries(po.takeRecords() as INPMetric['entries']);\n        report(true);\n      });\n    }\n  });\n};\n", "/*\n * Copyright 2024 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// eslint-disable-next-line jsdoc/require-jsdoc\nexport class LCPEntryManager {\n  // eslint-disable-next-line @typescript-eslint/explicit-member-accessibility\n  _onBeforeProcessingEntry?: (entry: LargestContentfulPaint) => void;\n\n  // eslint-disable-next-line @typescript-eslint/explicit-member-accessibility, jsdoc/require-jsdoc\n  _processEntry(entry: LargestContentfulPaint) {\n    this._onBeforeProcessingEntry?.(entry);\n  }\n}\n", "/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { bindReporter } from './lib/bindReporter';\nimport { getActivationStart } from './lib/getActivationStart';\nimport { getVisibilityWatcher } from './lib/getVisibilityWatcher';\nimport { addPageListener, removePageListener } from './lib/globalListeners';\nimport { initMetric } from './lib/initMetric';\nimport { initUnique } from './lib/initUnique';\nimport { LCPEntryManager } from './lib/LCPEntryManager';\nimport { observe } from './lib/observe';\nimport { runOnce } from './lib/runOnce';\nimport { whenActivated } from './lib/whenActivated';\nimport { whenIdleOrHidden } from './lib/whenIdleOrHidden';\nimport type { LCPMetric, MetricRatingThresholds, ReportOpts } from './types';\n\n/** Thresholds for LCP. See https://web.dev/articles/lcp#what_is_a_good_lcp_score */\nexport const LCPThresholds: MetricRatingThresholds = [2500, 4000];\n\n/**\n * Calculates the [LCP](https://web.dev/articles/lcp) value for the current page and\n * calls the `callback` function once the value is ready (along with the\n * relevant `largest-contentful-paint` performance entry used to determine the\n * value). The reported value is a `DOMHighResTimeStamp`.\n *\n * If the `reportAllChanges` configuration option is set to `true`, the\n * `callback` function will be called any time a new `largest-contentful-paint`\n * performance entry is dispatched, or once the final value of the metric has\n * been determined.\n */\nexport const onLCP = (onReport: (metric: LCPMetric) => void, opts: ReportOpts = {}) => {\n  whenActivated(() => {\n    const visibilityWatcher = getVisibilityWatcher();\n    const metric = initMetric('LCP');\n    let report: ReturnType<typeof bindReporter>;\n\n    const lcpEntryManager = initUnique(opts, LCPEntryManager);\n\n    const handleEntries = (entries: LCPMetric['entries']) => {\n      // If reportAllChanges is set then call this function for each entry,\n      // otherwise only consider the last one.\n      if (!opts.reportAllChanges) {\n        // eslint-disable-next-line no-param-reassign\n        entries = entries.slice(-1);\n      }\n\n      for (const entry of entries) {\n        lcpEntryManager._processEntry(entry);\n\n        // Only report if the page wasn't hidden prior to LCP.\n        if (entry.startTime < visibilityWatcher.firstHiddenTime) {\n          // The startTime attribute returns the value of the renderTime if it is\n          // not 0, and the value of the loadTime otherwise. The activationStart\n          // reference is used because LCP should be relative to page activation\n          // rather than navigation start if the page was prerendered. But in cases\n          // where `activationStart` occurs after the LCP, this time should be\n          // clamped at 0.\n          metric.value = Math.max(entry.startTime - getActivationStart(), 0);\n          metric.entries = [entry];\n          report();\n        }\n      }\n    };\n\n    const po = observe('largest-contentful-paint', handleEntries);\n\n    if (po) {\n      report = bindReporter(onReport, metric, LCPThresholds, opts.reportAllChanges);\n\n      // Ensure this logic only runs once, since it can be triggered from\n      // any of three different event listeners below.\n      const stopListening = runOnce(() => {\n        handleEntries(po.takeRecords() as LCPMetric['entries']);\n        po.disconnect();\n        report(true);\n      });\n\n      // Need a separate wrapper to ensure the `runOnce` function above is\n      // common for all three functions\n      const stopListeningWrapper = (event: Event) => {\n        if (event.isTrusted) {\n          // Wrap the listener in an idle callback so it's run in a separate\n          // task to reduce potential INP impact.\n          // https://github.com/GoogleChrome/web-vitals/issues/383\n          whenIdleOrHidden(stopListening);\n          removePageListener(event.type, stopListeningWrapper, {\n            capture: true,\n          });\n        }\n      };\n\n      // Stop listening after input or visibilitychange.\n      // Note: while scrolling is an input that stops LCP observation, it's\n      // unreliable since it can be programmatically generated.\n      // See: https://github.com/GoogleChrome/web-vitals/issues/75\n      for (const type of ['keydown', 'click', 'visibilitychange']) {\n        addPageListener(type, stopListeningWrapper, {\n          capture: true,\n        });\n      }\n    }\n  });\n};\n", "/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { WINDOW } from '../../types';\nimport { bindReporter } from './lib/bindReporter';\nimport { getActivationStart } from './lib/getActivationStart';\nimport { getNavigationEntry } from './lib/getNavigationEntry';\nimport { initMetric } from './lib/initMetric';\nimport { whenActivated } from './lib/whenActivated';\nimport type { MetricRatingThresholds, ReportOpts, TTFBMetric } from './types';\n\n/** Thresholds for TTFB. See https://web.dev/articles/ttfb#what_is_a_good_ttfb_score */\nexport const TTFBThresholds: MetricRatingThresholds = [800, 1800];\n\n/**\n * Runs in the next task after the page is done loading and/or prerendering.\n * @param callback\n */\nconst whenReady = (callback: () => void) => {\n  if (WINDOW.document?.prerendering) {\n    whenActivated(() => whenReady(callback));\n  } else if (WINDOW.document?.readyState !== 'complete') {\n    addEventListener('load', () => whenReady(callback), true);\n  } else {\n    // Queue a task so the callback runs after `loadEventEnd`.\n    setTimeout(callback);\n  }\n};\n\n/**\n * Calculates the [TTFB](https://web.dev/articles/ttfb) value for the\n * current page and calls the `callback` function once the page has loaded,\n * along with the relevant `navigation` performance entry used to determine the\n * value. The reported value is a `DOMHighResTimeStamp`.\n *\n * Note, this function waits until after the page is loaded to call `callback`\n * in order to ensure all properties of the `navigation` entry are populated.\n * This is useful if you want to report on other metrics exposed by the\n * [Navigation Timing API](https://w3c.github.io/navigation-timing/). For\n * example, the TTFB metric starts from the page's [time\n * origin](https://www.w3.org/TR/hr-time-2/#sec-time-origin), which means it\n * includes time spent on DNS lookup, connection negotiation, network latency,\n * and server processing time.\n */\nexport const onTTFB = (onReport: (metric: TTFBMetric) => void, opts: ReportOpts = {}) => {\n  const metric = initMetric('TTFB');\n  const report = bindReporter(onReport, metric, TTFBThresholds, opts.reportAllChanges);\n\n  whenReady(() => {\n    const navigationEntry = getNavigationEntry();\n\n    if (navigationEntry) {\n      // The activationStart reference is used because TTFB should be\n      // relative to page activation rather than navigation start if the\n      // page was prerendered. But in cases where `activationStart` occurs\n      // after the first byte is received, this time should be clamped at 0.\n      metric.value = Math.max(navigationEntry.responseStart - getActivationStart(), 0);\n\n      metric.entries = [navigationEntry];\n      report(true);\n    }\n  });\n};\n", "import { debug, getFunctionName } from '@sentry/core';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { onCLS } from './web-vitals/getCLS';\nimport { onINP } from './web-vitals/getINP';\nimport { onLCP } from './web-vitals/getLCP';\nimport { observe } from './web-vitals/lib/observe';\nimport { onTTFB } from './web-vitals/onTTFB';\n\ntype InstrumentHandlerTypePerformanceObserver =\n  | 'longtask'\n  | 'event'\n  | 'navigation'\n  | 'paint'\n  | 'resource'\n  | 'element'\n  // fist-input is still needed for INP\n  | 'first-input';\n\ntype InstrumentHandlerTypeMetric = 'cls' | 'lcp' | 'ttfb' | 'inp';\n\n// We provide this here manually instead of relying on a global, as this is not available in non-browser environements\n// And we do not want to expose such types\ninterface PerformanceEntry {\n  readonly duration: number;\n  readonly entryType: string;\n  readonly name: string;\n  readonly startTime: number;\n  toJSON(): Record<string, unknown>;\n}\nexport interface PerformanceEventTiming extends PerformanceEntry {\n  processingStart: number;\n  processingEnd: number;\n  duration: number;\n  cancelable?: boolean;\n  target?: unknown | null;\n  interactionId?: number;\n}\n\ninterface PerformanceScriptTiming extends PerformanceEntry {\n  sourceURL: string;\n  sourceFunctionName: string;\n  sourceCharPosition: number;\n  invoker: string;\n  invokerType: string;\n}\nexport interface PerformanceLongAnimationFrameTiming extends PerformanceEntry {\n  scripts: PerformanceScriptTiming[];\n}\n\ninterface Metric {\n  /**\n   * The name of the metric (in acronym form).\n   */\n  name: 'CLS' | 'FCP' | 'INP' | 'LCP' | 'TTFB';\n\n  /**\n   * The current value of the metric.\n   */\n  value: number;\n\n  /**\n   * The rating as to whether the metric value is within the \"good\",\n   * \"needs improvement\", or \"poor\" thresholds of the metric.\n   */\n  rating: 'good' | 'needs-improvement' | 'poor';\n\n  /**\n   * The delta between the current value and the last-reported value.\n   * On the first report, `delta` and `value` will always be the same.\n   */\n  delta: number;\n\n  /**\n   * A unique ID representing this particular metric instance. This ID can\n   * be used by an analytics tool to dedupe multiple values sent for the same\n   * metric instance, or to group multiple deltas together and calculate a\n   * total. It can also be used to differentiate multiple different metric\n   * instances sent from the same page, which can happen if the page is\n   * restored from the back/forward cache (in that case new metrics object\n   * get created).\n   */\n  id: string;\n\n  /**\n   * Any performance entries relevant to the metric value calculation.\n   * The array may also be empty if the metric value was not based on any\n   * entries (e.g. a CLS value of 0 given no layout shifts).\n   */\n  entries: PerformanceEntry[];\n\n  /**\n   * The type of navigation\n   *\n   * Navigation Timing API (or `undefined` if the browser doesn't\n   * support that API). For pages that are restored from the bfcache, this\n   * value will be 'back-forward-cache'.\n   */\n  navigationType: 'navigate' | 'reload' | 'back-forward' | 'back-forward-cache' | 'prerender' | 'restore';\n}\n\ntype InstrumentHandlerType = InstrumentHandlerTypeMetric | InstrumentHandlerTypePerformanceObserver;\n\ntype StopListening = undefined | void | (() => void);\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype InstrumentHandlerCallback = (data: any) => void;\n\ntype CleanupHandlerCallback = () => void;\n\nconst handlers: { [key in InstrumentHandlerType]?: InstrumentHandlerCallback[] } = {};\nconst instrumented: { [key in InstrumentHandlerType]?: boolean } = {};\n\nlet _previousCls: Metric | undefined;\nlet _previousLcp: Metric | undefined;\nlet _previousTtfb: Metric | undefined;\nlet _previousInp: Metric | undefined;\n\n/**\n * Add a callback that will be triggered when a CLS metric is available.\n * Returns a cleanup callback which can be called to remove the instrumentation handler.\n *\n * Pass `stopOnCallback = true` to stop listening for CLS when the cleanup callback is called.\n * This will lead to the CLS being finalized and frozen.\n */\nexport function addClsInstrumentationHandler(\n  callback: (data: { metric: Metric }) => void,\n  stopOnCallback = false,\n): CleanupHandlerCallback {\n  return addMetricObserver('cls', callback, instrumentCls, _previousCls, stopOnCallback);\n}\n\n/**\n * Add a callback that will be triggered when a LCP metric is available.\n * Returns a cleanup callback which can be called to remove the instrumentation handler.\n *\n * Pass `stopOnCallback = true` to stop listening for LCP when the cleanup callback is called.\n * This will lead to the LCP being finalized and frozen.\n */\nexport function addLcpInstrumentationHandler(\n  callback: (data: { metric: Metric }) => void,\n  stopOnCallback = false,\n): CleanupHandlerCallback {\n  return addMetricObserver('lcp', callback, instrumentLcp, _previousLcp, stopOnCallback);\n}\n\n/**\n * Add a callback that will be triggered when a TTFD metric is available.\n */\nexport function addTtfbInstrumentationHandler(callback: (data: { metric: Metric }) => void): CleanupHandlerCallback {\n  return addMetricObserver('ttfb', callback, instrumentTtfb, _previousTtfb);\n}\n\nexport type InstrumentationHandlerCallback = (data: {\n  metric: Omit<Metric, 'entries'> & {\n    entries: PerformanceEventTiming[];\n  };\n}) => void;\n\n/**\n * Add a callback that will be triggered when a INP metric is available.\n * Returns a cleanup callback which can be called to remove the instrumentation handler.\n */\nexport function addInpInstrumentationHandler(callback: InstrumentationHandlerCallback): CleanupHandlerCallback {\n  return addMetricObserver('inp', callback, instrumentInp, _previousInp);\n}\n\nexport function addPerformanceInstrumentationHandler(\n  type: 'event',\n  callback: (data: { entries: ((PerformanceEntry & { target?: unknown | null }) | PerformanceEventTiming)[] }) => void,\n): CleanupHandlerCallback;\nexport function addPerformanceInstrumentationHandler(\n  type: InstrumentHandlerTypePerformanceObserver,\n  callback: (data: { entries: PerformanceEntry[] }) => void,\n): CleanupHandlerCallback;\n\n/**\n * Add a callback that will be triggered when a performance observer is triggered,\n * and receives the entries of the observer.\n * Returns a cleanup callback which can be called to remove the instrumentation handler.\n */\nexport function addPerformanceInstrumentationHandler(\n  type: InstrumentHandlerTypePerformanceObserver,\n  callback: (data: { entries: PerformanceEntry[] }) => void,\n): CleanupHandlerCallback {\n  addHandler(type, callback);\n\n  if (!instrumented[type]) {\n    instrumentPerformanceObserver(type);\n    instrumented[type] = true;\n  }\n\n  return getCleanupCallback(type, callback);\n}\n\n/** Trigger all handlers of a given type. */\nfunction triggerHandlers(type: InstrumentHandlerType, data: unknown): void {\n  const typeHandlers = handlers[type];\n\n  if (!typeHandlers?.length) {\n    return;\n  }\n\n  for (const handler of typeHandlers) {\n    try {\n      handler(data);\n    } catch (e) {\n      DEBUG_BUILD &&\n        debug.error(\n          `Error while triggering instrumentation handler.\\nType: ${type}\\nName: ${getFunctionName(handler)}\\nError:`,\n          e,\n        );\n    }\n  }\n}\n\nfunction instrumentCls(): StopListening {\n  return onCLS(\n    metric => {\n      triggerHandlers('cls', {\n        metric,\n      });\n      _previousCls = metric;\n    },\n    // We want the callback to be called whenever the CLS value updates.\n    // By default, the callback is only called when the tab goes to the background.\n    { reportAllChanges: true },\n  );\n}\n\nfunction instrumentLcp(): StopListening {\n  return onLCP(\n    metric => {\n      triggerHandlers('lcp', {\n        metric,\n      });\n      _previousLcp = metric;\n    },\n    // We want the callback to be called whenever the LCP value updates.\n    // By default, the callback is only called when the tab goes to the background.\n    { reportAllChanges: true },\n  );\n}\n\nfunction instrumentTtfb(): StopListening {\n  return onTTFB(metric => {\n    triggerHandlers('ttfb', {\n      metric,\n    });\n    _previousTtfb = metric;\n  });\n}\n\nfunction instrumentInp(): void {\n  return onINP(metric => {\n    triggerHandlers('inp', {\n      metric,\n    });\n    _previousInp = metric;\n  });\n}\n\nfunction addMetricObserver(\n  type: InstrumentHandlerTypeMetric,\n  callback: InstrumentHandlerCallback,\n  instrumentFn: () => StopListening,\n  previousValue: Metric | undefined,\n  stopOnCallback = false,\n): CleanupHandlerCallback {\n  addHandler(type, callback);\n\n  let stopListening: StopListening | undefined;\n\n  if (!instrumented[type]) {\n    stopListening = instrumentFn();\n    instrumented[type] = true;\n  }\n\n  if (previousValue) {\n    callback({ metric: previousValue });\n  }\n\n  return getCleanupCallback(type, callback, stopOnCallback ? stopListening : undefined);\n}\n\nfunction instrumentPerformanceObserver(type: InstrumentHandlerTypePerformanceObserver): void {\n  const options: PerformanceObserverInit = {};\n\n  // Special per-type options we want to use\n  if (type === 'event') {\n    options.durationThreshold = 0;\n  }\n\n  observe(\n    type,\n    entries => {\n      triggerHandlers(type, { entries });\n    },\n    options,\n  );\n}\n\nfunction addHandler(type: InstrumentHandlerType, handler: InstrumentHandlerCallback): void {\n  handlers[type] = handlers[type] || [];\n  handlers[type].push(handler);\n}\n\n// Get a callback which can be called to remove the instrumentation handler\nfunction getCleanupCallback(\n  type: InstrumentHandlerType,\n  callback: InstrumentHandlerCallback,\n  stopListening: StopListening,\n): CleanupHandlerCallback {\n  return () => {\n    if (stopListening) {\n      stopListening();\n    }\n\n    const typeHandlers = handlers[type];\n\n    if (!typeHandlers) {\n      return;\n    }\n\n    const index = typeHandlers.indexOf(callback);\n    if (index !== -1) {\n      typeHandlers.splice(index, 1);\n    }\n  };\n}\n\n/**\n * Check if a PerformanceEntry is a PerformanceEventTiming by checking for the `duration` property.\n */\nexport function isPerformanceEventTiming(entry: PerformanceEntry): entry is PerformanceEventTiming {\n  return 'duration' in entry;\n}\n", "import { isString } from '@sentry/core';\n\nconst DEFAULT_MAX_STRING_LENGTH = 80;\n\ntype SimpleNode = {\n  parentNode: SimpleNode;\n} | null;\n\n// Native DOM accessors cached at module load. Calling these instead of reading\n// instance properties bypasses user-defined getters that shadow the prototypes.\n// Stored unbound and rebound via .call(el) — the unbound-method lint is expected.\n// See https://github.com/getsentry/sentry-javascript/issues/21353\ntype AccessorKey = 'parentNode' | 'tagName' | 'id' | 'className' | 'getAttribute' | 'dataset';\nconst accessors: Partial<Record<AccessorKey, Function>> = {};\n\n// oxlint-disable typescript-eslint(unbound-method)\ntry {\n  if (typeof Node !== 'undefined') {\n    accessors.parentNode = Object.getOwnPropertyDescriptor(Node.prototype, 'parentNode')!.get!;\n  }\n  if (typeof Element !== 'undefined') {\n    accessors.tagName = Object.getOwnPropertyDescriptor(Element.prototype, 'tagName')!.get!;\n    accessors.id = Object.getOwnPropertyDescriptor(Element.prototype, 'id')!.get!;\n    accessors.className = Object.getOwnPropertyDescriptor(Element.prototype, 'className')!.get!;\n    accessors.getAttribute = Element.prototype.getAttribute;\n  }\n  if (typeof HTMLElement !== 'undefined') {\n    accessors.dataset = Object.getOwnPropertyDescriptor(HTMLElement.prototype, 'dataset')!.get!;\n  }\n} catch {\n  // Polyfilled or stubbed prototypes may not have the expected descriptors.\n  // _safeRead falls back to direct property access.\n}\n// oxlint-enable typescript-eslint(unbound-method)\n\nfunction _safeRead<T>(el: unknown, prop: AccessorKey, arg?: string): T {\n  const fn = accessors[prop];\n  if (fn) {\n    try {\n      return fn.call(el, arg) as T;\n    } catch {\n      // Fall through to direct access\n    }\n  }\n  const val = (el as Record<string, unknown>)[prop];\n  return typeof val === 'function' ? val.call(el, arg) : (val as T);\n}\n\n/**\n * Given a child DOM element, returns a query-selector statement describing that\n * and its ancestors\n * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nexport function htmlTreeAsString(\n  elem: unknown,\n  options: string[] | { keyAttrs?: string[]; maxStringLength?: number } = {},\n): string {\n  if (!elem) {\n    return '<unknown>';\n  }\n\n  // try/catch both:\n  // - accessing event.target (see getsentry/raven-js#838, #768)\n  // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly\n  // - can throw an exception in some circumstances.\n  try {\n    let currentElem = elem as SimpleNode;\n    const MAX_TRAVERSE_HEIGHT = 5;\n    const out = [];\n    let height = 0;\n    let len = 0;\n    const separator = ' > ';\n    const sepLength = separator.length;\n    let nextStr;\n    const keyAttrs = Array.isArray(options) ? options : options.keyAttrs;\n    const maxStringLength = (!Array.isArray(options) && options.maxStringLength) || DEFAULT_MAX_STRING_LENGTH;\n\n    while (currentElem && height++ < MAX_TRAVERSE_HEIGHT) {\n      nextStr = _htmlElementAsString(currentElem, keyAttrs);\n      // bail out if\n      // - nextStr is the 'html' element\n      // - the length of the string that would be created exceeds maxStringLength\n      //   (ignore this limit if we are on the first iteration)\n      if (nextStr === 'html' || (height > 1 && len + out.length * sepLength + nextStr.length >= maxStringLength)) {\n        break;\n      }\n\n      out.push(nextStr);\n\n      len += nextStr.length;\n      currentElem = _safeRead<SimpleNode>(currentElem, 'parentNode');\n    }\n\n    return out.reverse().join(separator);\n  } catch {\n    return '<unknown>';\n  }\n}\n\n/**\n * Returns a simple, query-selector representation of a DOM element\n * e.g. [HTMLElement] => input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nfunction _htmlElementAsString(el: unknown, keyAttrs?: string[]): string {\n  const out = [];\n\n  const tagName = _safeRead<string | undefined>(el, 'tagName');\n  if (!tagName) {\n    return '';\n  }\n\n  if (typeof HTMLElement !== 'undefined') {\n    // If using the component name annotation plugin, this value may be available on the DOM node\n    if (el instanceof HTMLElement) {\n      const dataset = _safeRead<DOMStringMap | undefined>(el, 'dataset');\n      if (dataset) {\n        if (dataset['sentryComponent']) {\n          return dataset['sentryComponent'];\n        }\n        if (dataset['sentryElement']) {\n          return dataset['sentryElement'];\n        }\n      }\n    }\n  }\n\n  out.push(tagName.toLowerCase());\n\n  // Pairs of attribute keys defined in `serializeAttribute` and their values on element.\n  const keyAttrPairs = keyAttrs?.length\n    ? keyAttrs\n        .filter(keyAttr => _safeRead<string | null>(el, 'getAttribute', keyAttr))\n        .map(keyAttr => [keyAttr, _safeRead<string | null>(el, 'getAttribute', keyAttr)])\n    : null;\n\n  if (keyAttrPairs?.length) {\n    keyAttrPairs.forEach(keyAttrPair => {\n      out.push(`[${keyAttrPair[0]}=\"${keyAttrPair[1]}\"]`);\n    });\n  } else {\n    const id = _safeRead<string | undefined>(el, 'id');\n    if (id) {\n      out.push(`#${id}`);\n    }\n\n    const className = _safeRead<string | undefined>(el, 'className');\n    if (className && isString(className)) {\n      const classes = className.split(/\\s+/);\n      for (const c of classes) {\n        out.push(`.${c}`);\n      }\n    }\n  }\n  for (const k of ['aria-label', 'type', 'name', 'title', 'alt']) {\n    const attr = _safeRead<string | null>(el, 'getAttribute', k);\n    if (attr) {\n      out.push(`[${k}=\"${attr}\"]`);\n    }\n  }\n\n  return out.join('');\n}\n", "/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { WINDOW } from '../../../types';\nimport { addPageListener } from './globalListeners';\n\nexport interface OnHiddenCallback {\n  (event: Event): void;\n}\n\n/**\n * Sentry-specific change:\n *\n * This function's logic was NOT updated to web-vitals 4.2.4 or 5.x but we continue\n * to use the web-vitals 3.5.2 version due to having stricter browser support.\n *\n * PR with context that made the changes:\n * https://github.com/GoogleChrome/web-vitals/pull/442/files#r1530492402\n *\n * The PR removed listening to the `pagehide` event, in favour of only listening to\n * the `visibilitychange` event. This is \"more correct\" but some browsers we still\n * support (Safari <14.4) don't fully support `visibilitychange` or have known bugs\n * with respect to the `visibilitychange` event.\n *\n * TODO (v11): If we decide to drop support for Safari 14.4, we can use the logic\n * from web-vitals 4.2.4. In this case, we also need to update the integration tests\n * that currently trigger the `pagehide` event to simulate the page being hidden.\n *\n * @param {OnHiddenCallback} cb - Callback to be executed when the page is hidden or unloaded.\n *\n * @deprecated use `whenIdleOrHidden` or `addPageListener('visibilitychange')` instead\n */\nexport const onHidden = (cb: OnHiddenCallback) => {\n  const onHiddenOrPageHide = (event: Event) => {\n    if (event.type === 'pagehide' || WINDOW.document?.visibilityState === 'hidden') {\n      cb(event);\n    }\n  };\n\n  addPageListener('visibilitychange', onHiddenOrPageHide, { capture: true, once: true });\n  // Some browsers have buggy implementations of visibilitychange,\n  // so we use pagehide in addition, just to be safe.\n  addPageListener('pagehide', onHiddenOrPageHide, { capture: true, once: true });\n};\n", "import type {\n  Client,\n  Integration,\n  SentrySpan,\n  Span,\n  SpanAttributes,\n  SpanTimeInput,\n  StartSpanOptions,\n} from '@sentry/core';\nimport { getClient, getCurrentScope, spanToJSON, startInactiveSpan, withActiveSpan } from '@sentry/core';\nimport { WINDOW } from '../types';\nimport { onHidden } from './web-vitals/lib/onHidden';\n\nexport type WebVitalReportEvent = 'pagehide' | 'navigation';\n\n/**\n * Checks if a given value is a valid measurement value.\n */\nexport function isMeasurementValue(value: unknown): value is number {\n  return typeof value === 'number' && isFinite(value);\n}\n\n/**\n * Helper function to start child on transactions. This function will make sure that the transaction will\n * use the start timestamp of the created child span if it is earlier than the transactions actual\n * start timestamp.\n */\nexport function startAndEndSpan(\n  parentSpan: Span,\n  startTimeInSeconds: number,\n  endTime: SpanTimeInput,\n  { ...ctx }: StartSpanOptions,\n): Span | undefined {\n  const parentStartTime = spanToJSON(parentSpan).start_timestamp;\n  if (parentStartTime && parentStartTime > startTimeInSeconds) {\n    // We can only do this for SentrySpans...\n    if (typeof (parentSpan as Partial<SentrySpan>).updateStartTime === 'function') {\n      (parentSpan as SentrySpan).updateStartTime(startTimeInSeconds);\n    }\n  }\n\n  // The return value only exists for tests\n  return withActiveSpan(parentSpan, () => {\n    const span = startInactiveSpan({\n      startTime: startTimeInSeconds,\n      ...ctx,\n    });\n\n    if (span) {\n      span.end(endTime);\n    }\n\n    return span;\n  });\n}\n\ninterface StandaloneWebVitalSpanOptions {\n  name: string;\n  transaction?: string;\n  attributes: SpanAttributes;\n  startTime: number;\n}\n\n/**\n * Starts an inactive, standalone span used to send web vital values to Sentry.\n * DO NOT use this for arbitrary spans, as these spans require special handling\n * during ingestion to extract metrics.\n *\n * This function adds a bunch of attributes and data to the span that's shared\n * by all web vital standalone spans. However, you need to take care of adding\n * the actual web vital value as an event to the span. Also, you need to assign\n * a transaction name and some other values that are specific to the web vital.\n *\n * Ultimately, you also need to take care of ending the span to send it off.\n *\n * @param options\n *\n * @returns an inactive, standalone and NOT YET ended span\n */\nexport function startStandaloneWebVitalSpan(options: StandaloneWebVitalSpanOptions): Span | undefined {\n  const client = getClient();\n  if (!client) {\n    return;\n  }\n\n  const { name, transaction, attributes: passedAttributes, startTime } = options;\n\n  const { release, environment } = client.getOptions();\n  const { userInfo } = client.getDataCollectionOptions();\n  // We need to get the replay, user, and activeTransaction from the current scope\n  // so that we can associate replay id, profile id, and a user display to the span\n  const replay = client.getIntegrationByName<Integration & { getReplayId: () => string }>('Replay');\n  const replayId = replay?.getReplayId();\n\n  const scope = getCurrentScope();\n\n  const user = scope.getUser();\n  const userDisplay = user !== undefined ? user.email || user.id || user.ip_address : undefined;\n\n  let profileId: string | undefined;\n  try {\n    // @ts-expect-error skip optional chaining to save bundle size with try catch\n    profileId = scope.getScopeData().contexts.profile.profile_id;\n  } catch {\n    // do nothing\n  }\n\n  const attributes: SpanAttributes = {\n    release,\n    environment,\n\n    user: userDisplay || undefined,\n    profile_id: profileId || undefined,\n    replay_id: replayId || undefined,\n\n    transaction,\n\n    // Web vital score calculation relies on the user agent to account for different\n    // browsers setting different thresholds for what is considered a good/meh/bad value.\n    // For example: Chrome vs. Chrome Mobile\n    'user_agent.original': WINDOW.navigator?.userAgent,\n\n    // This tells Sentry to infer the IP address from the request\n    'client.address': userInfo ? '{{auto}}' : undefined,\n\n    ...passedAttributes,\n  };\n\n  return startInactiveSpan({\n    name,\n    attributes,\n    startTime,\n    experimental: {\n      standalone: true,\n    },\n  });\n}\n\n/** Get the browser performance API. */\nexport function getBrowserPerformanceAPI(): Performance | undefined {\n  // @ts-expect-error we want to make sure all of these are available, even if TS is sure they are\n  return WINDOW.addEventListener && WINDOW.performance;\n}\n\n/**\n * Converts from milliseconds to seconds\n * @param time time in ms\n */\nexport function msToSec(time: number): number {\n  return time / 1000;\n}\n\n/**\n * Converts ALPN protocol ids to name and version.\n *\n * (https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids)\n * @param nextHopProtocol PerformanceResourceTiming.nextHopProtocol\n */\nexport function extractNetworkProtocol(nextHopProtocol: string): { name: string; version: string } {\n  let name = 'unknown';\n  let version = 'unknown';\n  let _name = '';\n  for (const char of nextHopProtocol) {\n    // http/1.1 etc.\n    if (char === '/') {\n      [name, version] = nextHopProtocol.split('/') as [string, string];\n      break;\n    }\n    // h2, h3 etc.\n    if (!isNaN(Number(char))) {\n      name = _name === 'h' ? 'http' : _name;\n      version = nextHopProtocol.split(_name)[1] as string;\n      break;\n    }\n    _name += char;\n  }\n  if (_name === nextHopProtocol) {\n    // webrtc, ftp, etc.\n    name = _name;\n  }\n  return { name, version };\n}\n\n/**\n * Generic support check for web vitals\n */\nexport function supportsWebVital(entryType: 'layout-shift' | 'largest-contentful-paint'): boolean {\n  try {\n    return PerformanceObserver.supportedEntryTypes.includes(entryType);\n  } catch {\n    return false;\n  }\n}\n\n/**\n * Listens for events on which we want to collect a previously accumulated web vital value.\n * Currently, this includes:\n *\n * - pagehide (i.e. user minimizes browser window, hides tab, etc)\n * - soft navigation (we only care about the vital of the initially loaded route)\n *\n * As a \"side-effect\", this function will also collect the span id of the pageload span.\n *\n * @param collectorCallback the callback to be called when the first of these events is triggered. Parameters:\n * - event: the event that triggered the reporting of the web vital value.\n * - pageloadSpanId: the span id of the pageload span. This is used to link the web vital span to the pageload span.\n * - pageloadSpan: the pageload span instance. This is used for full access to the pageload span for span streaming.\n */\nexport function listenForWebVitalReportEvents(\n  client: Client,\n  collectorCallback: (event: WebVitalReportEvent, pageloadSpanId: string, pageloadSpan?: Span) => void,\n) {\n  let pageloadSpan: Span | undefined;\n\n  let collected = false;\n  function _runCollectorCallbackOnce(event: WebVitalReportEvent) {\n    if (!collected && pageloadSpan) {\n      collectorCallback(event, pageloadSpan.spanContext().spanId, pageloadSpan);\n    }\n    collected = true;\n  }\n\n  // eslint-disable-next-line typescript/no-deprecated\n  onHidden(() => {\n    _runCollectorCallbackOnce('pagehide');\n  });\n\n  const unsubscribeStartNavigation = client.on('beforeStartNavigationSpan', (_, options) => {\n    // we only want to collect LCP if we actually navigate. Redirects should be ignored.\n    if (!options?.isRedirect) {\n      _runCollectorCallbackOnce('navigation');\n      unsubscribeStartNavigation();\n      unsubscribeAfterStartPageLoadSpan();\n    }\n  });\n\n  const unsubscribeAfterStartPageLoadSpan = client.on('afterStartPageLoadSpan', span => {\n    pageloadSpan = span;\n    unsubscribeAfterStartPageLoadSpan();\n  });\n}\n", "import type { Client, SpanAttributes } from '@sentry/core';\nimport {\n  browserPerformanceTimeOrigin,\n  debug,\n  getCurrentScope,\n  SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME,\n  SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT,\n  SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE,\n  SEMANTIC_ATTRIBUTE_SENTRY_OP,\n  SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n  timestampInSeconds,\n} from '@sentry/core';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { htmlTreeAsString } from '../htmlTreeAsString';\nimport { addClsInstrumentationHandler } from './instrument';\nimport type { WebVitalReportEvent } from './utils';\nimport { listenForWebVitalReportEvents, msToSec, startStandaloneWebVitalSpan, supportsWebVital } from './utils';\n\n/**\n * Starts tracking the Cumulative Layout Shift on the current page and collects the value once\n *\n * - the page visibility is hidden\n * - a navigation span is started (to stop CLS measurement for SPA soft navigations)\n *\n * Once either of these events triggers, the CLS value is sent as a standalone span and we stop\n * measuring CLS.\n */\nexport function trackClsAsStandaloneSpan(client: Client): void {\n  let standaloneCLsValue = 0;\n  let standaloneClsEntry: LayoutShift | undefined;\n\n  if (!supportsWebVital('layout-shift')) {\n    return;\n  }\n\n  const cleanupClsHandler = addClsInstrumentationHandler(({ metric }) => {\n    const entry = metric.entries[metric.entries.length - 1] as LayoutShift | undefined;\n    if (!entry) {\n      return;\n    }\n    standaloneCLsValue = metric.value;\n    standaloneClsEntry = entry;\n  }, true);\n\n  listenForWebVitalReportEvents(client, (reportEvent, pageloadSpanId) => {\n    _sendStandaloneClsSpan(standaloneCLsValue, standaloneClsEntry, pageloadSpanId, reportEvent);\n    cleanupClsHandler();\n  });\n}\n\n/**\n * Exported only for testing!\n */\nexport function _sendStandaloneClsSpan(\n  clsValue: number,\n  entry: LayoutShift | undefined,\n  pageloadSpanId: string,\n  reportEvent: WebVitalReportEvent,\n) {\n  DEBUG_BUILD && debug.log(`Sending CLS span (${clsValue})`);\n\n  const startTime = entry ? msToSec((browserPerformanceTimeOrigin() || 0) + entry.startTime) : timestampInSeconds();\n  const routeName = getCurrentScope().getScopeData().transactionName;\n\n  const name = entry ? htmlTreeAsString(entry.sources[0]?.node) : 'Layout shift';\n\n  const attributes: SpanAttributes = {\n    [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.browser.cls',\n    [SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'ui.webvital.cls',\n    [SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME]: 0,\n    // attach the pageload span id to the CLS span so that we can link them in the UI\n    'sentry.pageload.span_id': pageloadSpanId,\n    // describes what triggered the web vital to be reported\n    'sentry.report_event': reportEvent,\n  };\n\n  // Add CLS sources as span attributes to help with debugging layout shifts\n  // See: https://developer.mozilla.org/en-US/docs/Web/API/LayoutShift/sources\n  if (entry?.sources) {\n    entry.sources.forEach((source, index) => {\n      attributes[`cls.source.${index + 1}`] = htmlTreeAsString(source.node);\n    });\n  }\n\n  const span = startStandaloneWebVitalSpan({\n    name,\n    transaction: routeName,\n    attributes,\n    startTime,\n  });\n\n  if (span) {\n    span.addEvent('cls', {\n      [SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT]: '',\n      [SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE]: clsValue,\n    });\n\n    // LayoutShift performance entries always have a duration of 0, so we don't need to add `entry.duration` here\n    // see: https://developer.mozilla.org/en-US/docs/Web/API/PerformanceEntry/duration\n    span.end(startTime);\n  }\n}\n", "import type { Client, SpanAttributes } from '@sentry/core';\nimport {\n  browserPerformanceTimeOrigin,\n  debug,\n  getCurrentScope,\n  SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME,\n  SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT,\n  SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE,\n  SEMANTIC_ATTRIBUTE_SENTRY_OP,\n  SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n} from '@sentry/core';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { htmlTreeAsString } from '../htmlTreeAsString';\nimport { addLcpInstrumentationHandler } from './instrument';\nimport type { WebVitalReportEvent } from './utils';\nimport { listenForWebVitalReportEvents, msToSec, startStandaloneWebVitalSpan, supportsWebVital } from './utils';\n\n/**\n * 60 seconds is the maximum for a plausible LCP value.\n */\nexport const MAX_PLAUSIBLE_LCP_DURATION = 60_000;\n\nexport function isValidLcpMetric(lcpValue: number | undefined): lcpValue is number {\n  return lcpValue != null && lcpValue > 0 && lcpValue <= MAX_PLAUSIBLE_LCP_DURATION;\n}\n\n/**\n * Starts tracking the Largest Contentful Paint on the current page and collects the value once\n *\n * - the page visibility is hidden\n * - a navigation span is started (to stop LCP measurement for SPA soft navigations)\n *\n * Once either of these events triggers, the LCP value is sent as a standalone span and we stop\n * measuring LCP for subsequent routes.\n */\nexport function trackLcpAsStandaloneSpan(client: Client): void {\n  let standaloneLcpValue = 0;\n  let standaloneLcpEntry: LargestContentfulPaint | undefined;\n\n  if (!supportsWebVital('largest-contentful-paint')) {\n    return;\n  }\n\n  const cleanupLcpHandler = addLcpInstrumentationHandler(({ metric }) => {\n    const entry = metric.entries[metric.entries.length - 1] as LargestContentfulPaint | undefined;\n    if (!entry || !isValidLcpMetric(metric.value)) {\n      return;\n    }\n    standaloneLcpValue = metric.value;\n    standaloneLcpEntry = entry;\n  }, true);\n\n  listenForWebVitalReportEvents(client, (reportEvent, pageloadSpanId) => {\n    _sendStandaloneLcpSpan(standaloneLcpValue, standaloneLcpEntry, pageloadSpanId, reportEvent);\n    cleanupLcpHandler();\n  });\n}\n\n/**\n * Exported only for testing!\n */\nexport function _sendStandaloneLcpSpan(\n  lcpValue: number,\n  entry: LargestContentfulPaint | undefined,\n  pageloadSpanId: string,\n  reportEvent: WebVitalReportEvent,\n) {\n  if (!isValidLcpMetric(lcpValue)) {\n    return;\n  }\n\n  DEBUG_BUILD && debug.log(`Sending LCP span (${lcpValue})`);\n\n  const startTime = msToSec((browserPerformanceTimeOrigin() || 0) + (entry?.startTime || 0));\n  const routeName = getCurrentScope().getScopeData().transactionName;\n\n  const name = entry ? htmlTreeAsString(entry.element) : 'Largest contentful paint';\n\n  const attributes: SpanAttributes = {\n    [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.browser.lcp',\n    [SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'ui.webvital.lcp',\n    [SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME]: 0, // LCP is a point-in-time metric\n    // attach the pageload span id to the LCP span so that we can link them in the UI\n    'sentry.pageload.span_id': pageloadSpanId,\n    // describes what triggered the web vital to be reported\n    'sentry.report_event': reportEvent,\n  };\n\n  if (entry) {\n    entry.element && (attributes['lcp.element'] = htmlTreeAsString(entry.element));\n    entry.id && (attributes['lcp.id'] = entry.id);\n\n    entry.url && (attributes['lcp.url'] = entry.url);\n\n    // loadTime is the time of LCP that's related to receiving the LCP element response..\n    entry.loadTime != null && (attributes['lcp.loadTime'] = entry.loadTime);\n\n    // renderTime is loadTime + rendering time\n    // it's 0 if the LCP element is loaded from a 3rd party origin that doesn't send the\n    // `Timing-Allow-Origin` header.\n    entry.renderTime != null && (attributes['lcp.renderTime'] = entry.renderTime);\n\n    entry.size != null && (attributes['lcp.size'] = entry.size);\n  }\n\n  const span = startStandaloneWebVitalSpan({\n    name,\n    transaction: routeName,\n    attributes,\n    startTime,\n  });\n\n  if (span) {\n    span.addEvent('lcp', {\n      [SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT]: 'millisecond',\n      [SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE]: lcpValue,\n    });\n\n    // LCP is a point-in-time metric, so we end the span immediately\n    span.end(startTime);\n  }\n}\n", "import type { SpanAttributes } from '@sentry/core';\nimport { browserPerformanceTimeOrigin } from '@sentry/core';\nimport { extractNetworkProtocol, getBrowserPerformanceAPI } from './utils';\n\nfunction getAbsoluteTime(time: number | undefined): number | undefined {\n  // falsy values should be preserved so that we can later on drop undefined values and\n  // preserve 0 vals for cross-origin resources without proper `Timing-Allow-Origin` header.\n  return time ? ((browserPerformanceTimeOrigin() || performance.timeOrigin) + time) / 1000 : time;\n}\n\n/**\n * Converts a PerformanceResourceTiming entry to span data for the resource span. Most importantly,\n * it converts the timing values from timestamps relative to the `performance.timeOrigin` to absolute timestamps\n * in seconds.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming#timestamps\n *\n * @param resourceTiming\n * @returns An array where the first element is the attribute name and the second element is the attribute value.\n */\nexport function resourceTimingToSpanAttributes(resourceTiming: PerformanceResourceTiming): SpanAttributes {\n  const timingSpanData: SpanAttributes = {};\n  // Checking for only `undefined` and `null` is intentional because it's\n  // valid for `nextHopProtocol` to be an empty string.\n  if (resourceTiming.nextHopProtocol != undefined) {\n    const { name, version } = extractNetworkProtocol(resourceTiming.nextHopProtocol);\n    timingSpanData['network.protocol.version'] = version;\n    timingSpanData['network.protocol.name'] = name;\n  }\n\n  if (!(browserPerformanceTimeOrigin() || getBrowserPerformanceAPI()?.timeOrigin)) {\n    return timingSpanData;\n  }\n\n  return dropUndefinedKeysFromObject({\n    ...timingSpanData,\n\n    'http.request.redirect_start': getAbsoluteTime(resourceTiming.redirectStart),\n    'http.request.redirect_end': getAbsoluteTime(resourceTiming.redirectEnd),\n\n    'http.request.worker_start': getAbsoluteTime(resourceTiming.workerStart),\n\n    'http.request.fetch_start': getAbsoluteTime(resourceTiming.fetchStart),\n\n    'http.request.domain_lookup_start': getAbsoluteTime(resourceTiming.domainLookupStart),\n    'http.request.domain_lookup_end': getAbsoluteTime(resourceTiming.domainLookupEnd),\n\n    'http.request.connect_start': getAbsoluteTime(resourceTiming.connectStart),\n    'http.request.secure_connection_start': getAbsoluteTime(resourceTiming.secureConnectionStart),\n    'http.request.connection_end': getAbsoluteTime(resourceTiming.connectEnd),\n\n    'http.request.request_start': getAbsoluteTime(resourceTiming.requestStart),\n\n    'http.request.response_start': getAbsoluteTime(resourceTiming.responseStart),\n    'http.request.response_end': getAbsoluteTime(resourceTiming.responseEnd),\n\n    // For TTFB we actually want the relative time from timeOrigin to responseStart\n    // This way, TTFB always measures the \"first page load\" experience.\n    // see: https://web.dev/articles/ttfb#measure-resource-requests\n    'http.request.time_to_first_byte':\n      resourceTiming.responseStart != null ? resourceTiming.responseStart / 1000 : undefined,\n  });\n}\n\n/**\n * Remove properties with `undefined` as value from an object.\n * In contrast to `dropUndefinedKeys` in core this funciton only works on first-level\n * key-value objects and does not recursively go into object properties or arrays.\n */\nfunction dropUndefinedKeysFromObject<T extends object>(attrs: T): Partial<T> {\n  return Object.fromEntries(Object.entries(attrs).filter(([, value]) => value != null)) as Partial<T>;\n}\n", "/* eslint-disable max-lines */\nimport type { Client, Measurements, Span, SpanAttributes, SpanAttributeValue, StartSpanOptions } from '@sentry/core';\nimport {\n  browserPerformanceTimeOrigin,\n  debug,\n  getActiveSpan,\n  getComponentName,\n  isPrimitive,\n  parseUrl,\n  SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n  setMeasurement,\n  spanToJSON,\n  stringMatchesSomePattern,\n} from '@sentry/core';\nimport { htmlTreeAsString } from '../htmlTreeAsString';\nimport { WINDOW } from '../types';\nimport { trackClsAsStandaloneSpan } from './cls';\nimport {\n  addClsInstrumentationHandler,\n  addLcpInstrumentationHandler,\n  addPerformanceInstrumentationHandler,\n  addTtfbInstrumentationHandler,\n  type PerformanceLongAnimationFrameTiming,\n} from './instrument';\nimport { isValidLcpMetric, trackLcpAsStandaloneSpan } from './lcp';\nimport { resourceTimingToSpanAttributes } from './resourceTiming';\nimport { getBrowserPerformanceAPI, isMeasurementValue, msToSec, startAndEndSpan } from './utils';\nimport { getActivationStart } from './web-vitals/lib/getActivationStart';\nimport { getNavigationEntry } from './web-vitals/lib/getNavigationEntry';\nimport { getVisibilityWatcher } from './web-vitals/lib/getVisibilityWatcher';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { URL_FULL } from '@sentry/conventions/attributes';\ninterface NavigatorNetworkInformation {\n  readonly connection?: NetworkInformation;\n}\n\n// http://wicg.github.io/netinfo/#connection-types\ntype ConnectionType = 'bluetooth' | 'cellular' | 'ethernet' | 'mixed' | 'none' | 'other' | 'unknown' | 'wifi' | 'wimax';\n\n// http://wicg.github.io/netinfo/#effectiveconnectiontype-enum\ntype EffectiveConnectionType = '2g' | '3g' | '4g' | 'slow-2g';\n\n// http://wicg.github.io/netinfo/#dom-megabit\ntype Megabit = number;\n// http://wicg.github.io/netinfo/#dom-millisecond\ntype Millisecond = number;\n\n// http://wicg.github.io/netinfo/#networkinformation-interface\ninterface NetworkInformation extends EventTarget {\n  // http://wicg.github.io/netinfo/#type-attribute\n  readonly type?: ConnectionType;\n  // http://wicg.github.io/netinfo/#effectivetype-attribute\n  readonly effectiveType?: EffectiveConnectionType;\n  // http://wicg.github.io/netinfo/#downlinkmax-attribute\n  readonly downlinkMax?: Megabit;\n  // http://wicg.github.io/netinfo/#downlink-attribute\n  readonly downlink?: Megabit;\n  // http://wicg.github.io/netinfo/#rtt-attribute\n  readonly rtt?: Millisecond;\n  // http://wicg.github.io/netinfo/#savedata-attribute\n  readonly saveData?: boolean;\n  // http://wicg.github.io/netinfo/#handling-changes-to-the-underlying-connection\n  onchange?: EventListener;\n}\n\n// https://w3c.github.io/device-memory/#sec-device-memory-js-api\ninterface NavigatorDeviceMemory {\n  readonly deviceMemory?: number;\n}\n\nconst MAX_INT_AS_BYTES = 2147483647;\n\nlet _performanceCursor: number = 0;\n\nlet _measurements: Measurements = {};\nlet _lcpEntry: LargestContentfulPaint | undefined;\nlet _clsEntry: LayoutShift | undefined;\n\ninterface StartTrackingWebVitalsOptions {\n  /**\n   * When `true`, CLS is tracked as a standalone span. When `false`, CLS is\n   * recorded as a measurement on the pageload span. When `undefined`, CLS\n   * tracking is skipped entirely (e.g. because span streaming handles it).\n   */\n  recordClsStandaloneSpans: boolean | undefined;\n  /**\n   * When `true`, LCP is tracked as a standalone span. When `false`, LCP is\n   * recorded as a measurement on the pageload span. When `undefined`, LCP\n   * tracking is skipped entirely (e.g. because span streaming handles it).\n   */\n  recordLcpStandaloneSpans: boolean | undefined;\n  client: Client;\n}\n\n/**\n * Start tracking web vitals.\n * The callback returned by this function can be used to stop tracking & ensure all measurements are final & captured.\n *\n * @deprecated this function will be removed and streamlined once we stop supporting standalone v1\n * @returns A function that forces web vitals collection\n */\nexport function startTrackingWebVitals({\n  recordClsStandaloneSpans,\n  recordLcpStandaloneSpans,\n  client,\n}: StartTrackingWebVitalsOptions): () => void {\n  const performance = getBrowserPerformanceAPI();\n  if (performance && browserPerformanceTimeOrigin()) {\n    // @ts-expect-error we want to make sure all of these are available, even if TS is sure they are\n    if (performance.mark) {\n      WINDOW.performance.mark('sentry-tracing-init');\n    }\n\n    const lcpCleanupCallback = recordLcpStandaloneSpans\n      ? trackLcpAsStandaloneSpan(client)\n      : recordLcpStandaloneSpans === false\n        ? _trackLCP()\n        : undefined;\n\n    const clsCleanupCallback = recordClsStandaloneSpans\n      ? trackClsAsStandaloneSpan(client)\n      : recordClsStandaloneSpans === false\n        ? _trackCLS()\n        : undefined;\n\n    const ttfbCleanupCallback = _trackTtfb();\n    const fpFcpCleanupCallback = _trackFpFcp();\n\n    return (): void => {\n      ttfbCleanupCallback();\n      fpFcpCleanupCallback();\n      lcpCleanupCallback?.();\n      clsCleanupCallback?.();\n    };\n  }\n\n  return () => undefined;\n}\n\n/**\n * Start tracking long tasks.\n */\nexport function startTrackingLongTasks(): void {\n  addPerformanceInstrumentationHandler('longtask', ({ entries }) => {\n    const parent = getActiveSpan();\n    if (!parent) {\n      return;\n    }\n\n    const { op: parentOp, start_timestamp: parentStartTimestamp } = spanToJSON(parent);\n\n    for (const entry of entries) {\n      const startTime = msToSec((browserPerformanceTimeOrigin() as number) + entry.startTime);\n      const duration = msToSec(entry.duration);\n\n      if (parentOp === 'navigation' && parentStartTimestamp && startTime < parentStartTimestamp) {\n        // Skip adding a span if the long task started before the navigation started.\n        // `startAndEndSpan` will otherwise adjust the parent's start time to the span's start\n        // time, potentially skewing the duration of the actual navigation as reported via our\n        // routing instrumentations\n        continue;\n      }\n\n      startAndEndSpan(parent, startTime, startTime + duration, {\n        name: 'Main UI thread blocked',\n        op: 'ui.long-task',\n        attributes: {\n          [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.browser.metrics',\n        },\n      });\n    }\n  });\n}\n\n/**\n * Start tracking long animation frames.\n */\nexport function startTrackingLongAnimationFrames(): void {\n  // NOTE: the current web-vitals version (3.5.2) does not support long-animation-frame, so\n  // we directly observe `long-animation-frame` events instead of through the web-vitals\n  // `observe` helper function.\n  const observer = new PerformanceObserver(list => {\n    const parent = getActiveSpan();\n    if (!parent) {\n      return;\n    }\n    for (const entry of list.getEntries() as PerformanceLongAnimationFrameTiming[]) {\n      if (!entry.scripts[0]) {\n        continue;\n      }\n\n      const startTime = msToSec((browserPerformanceTimeOrigin() as number) + entry.startTime);\n\n      const { start_timestamp: parentStartTimestamp, op: parentOp } = spanToJSON(parent);\n\n      if (parentOp === 'navigation' && parentStartTimestamp && startTime < parentStartTimestamp) {\n        // Skip adding the span if the long animation frame started before the navigation started.\n        // `startAndEndSpan` will otherwise adjust the parent's start time to the span's start\n        // time, potentially skewing the duration of the actual navigation as reported via our\n        // routing instrumentations\n        continue;\n      }\n      const duration = msToSec(entry.duration);\n\n      const attributes: SpanAttributes = {\n        [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.browser.metrics',\n      };\n\n      const initialScript = entry.scripts[0];\n      const { invoker, invokerType, sourceURL, sourceFunctionName, sourceCharPosition } = initialScript;\n      attributes['browser.script.invoker'] = invoker;\n      attributes['browser.script.invoker_type'] = invokerType;\n      if (sourceURL) {\n        attributes['code.filepath'] = sourceURL;\n      }\n      if (sourceFunctionName) {\n        attributes['code.function'] = sourceFunctionName;\n      }\n      if (sourceCharPosition !== -1) {\n        attributes['browser.script.source_char_position'] = sourceCharPosition;\n      }\n\n      startAndEndSpan(parent, startTime, startTime + duration, {\n        name: 'Main UI thread blocked',\n        op: 'ui.long-animation-frame',\n        attributes,\n      });\n    }\n  });\n\n  observer.observe({ type: 'long-animation-frame', buffered: true });\n}\n\n/**\n * Start tracking interaction events.\n */\nexport function startTrackingInteractions(): void {\n  addPerformanceInstrumentationHandler('event', ({ entries }) => {\n    const parent = getActiveSpan();\n    if (!parent) {\n      return;\n    }\n    for (const entry of entries) {\n      if (entry.name === 'click') {\n        const startTime = msToSec((browserPerformanceTimeOrigin() as number) + entry.startTime);\n        const duration = msToSec(entry.duration);\n\n        const spanOptions: StartSpanOptions & Required<Pick<StartSpanOptions, 'attributes'>> = {\n          name: htmlTreeAsString(entry.target),\n          op: `ui.interaction.${entry.name}`,\n          startTime: startTime,\n          attributes: {\n            [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.browser.metrics',\n          },\n        };\n\n        const componentName = getComponentName(entry.target);\n        if (componentName) {\n          spanOptions.attributes['ui.component_name'] = componentName;\n        }\n\n        startAndEndSpan(parent, startTime, startTime + duration, spanOptions);\n      }\n    }\n  });\n}\n\nexport { registerInpInteractionListener, startTrackingINP } from './inp';\n\n/**\n * Starts tracking the Cumulative Layout Shift on the current page and collects the value and last entry\n * to the `_measurements` object which ultimately is applied to the pageload span's measurements.\n */\nfunction _trackCLS(): () => void {\n  return addClsInstrumentationHandler(({ metric }) => {\n    const entry = metric.entries[metric.entries.length - 1] as LayoutShift | undefined;\n    if (!entry) {\n      return;\n    }\n    _measurements['cls'] = { value: metric.value, unit: '' };\n    _clsEntry = entry;\n  }, true);\n}\n\n/** Starts tracking the Largest Contentful Paint on the current page. */\nfunction _trackLCP(): () => void {\n  return addLcpInstrumentationHandler(({ metric }) => {\n    const entry = metric.entries[metric.entries.length - 1];\n    if (!entry || !isValidLcpMetric(metric.value)) {\n      return;\n    }\n\n    _measurements['lcp'] = { value: metric.value, unit: 'millisecond' };\n    _lcpEntry = entry as LargestContentfulPaint;\n  }, true);\n}\n\nfunction _trackTtfb(): () => void {\n  return addTtfbInstrumentationHandler(({ metric }) => {\n    const entry = metric.entries[metric.entries.length - 1];\n    if (!entry) {\n      return;\n    }\n\n    _measurements['ttfb'] = { value: metric.value, unit: 'millisecond' };\n  });\n}\n\n/** Starts tracking First Paint and First Contentful Paint on the current page. */\nfunction _trackFpFcp(): () => void {\n  return addPerformanceInstrumentationHandler('paint', ({ entries }) => {\n    const firstHidden = getVisibilityWatcher();\n    for (const entry of entries) {\n      // Only report if the page wasn't hidden prior to the web vital.\n      const shouldRecord = entry.startTime < firstHidden.firstHiddenTime;\n      if (entry.name === 'first-paint' && shouldRecord) {\n        _measurements['fp'] = { value: entry.startTime, unit: 'millisecond' };\n      }\n      if (entry.name === 'first-contentful-paint' && shouldRecord) {\n        _measurements['fcp'] = { value: entry.startTime, unit: 'millisecond' };\n      }\n    }\n  });\n}\n\ninterface AddPerformanceEntriesOptions {\n  /**\n   * Resource spans with `op`s matching strings in the array will not be emitted.\n   *\n   * Default: []\n   */\n  ignoreResourceSpans: Array<'resouce.script' | 'resource.css' | 'resource.img' | 'resource.other' | string>;\n\n  /**\n   * Performance spans created from browser Performance APIs,\n   * `performance.mark(...)` nand `performance.measure(...)`\n   * with `name`s matching strings in the array will not be emitted.\n   *\n   * Default: []\n   */\n  ignorePerformanceApiSpans: Array<string | RegExp>;\n\n  /**\n   * Whether span streaming is enabled.\n   */\n  spanStreamingEnabled?: boolean;\n}\n\ninterface AddWebVitalsToSpanOptions {\n  /**\n   * Flag to determine if CLS should be recorded as a measurement on the pageload span or\n   * sent as a standalone span instead.\n   * Sending it as a standalone span will yield more accurate LCP values.\n   *\n   * Default: `false` for backwards compatibility.\n   */\n  recordClsOnPageloadSpan: boolean;\n\n  /**\n   * Flag to determine if LCP should be recorded as a measurement on the pageload span or\n   * sent as a standalone span instead.\n   * Sending it as a standalone span will yield more accurate LCP values.\n   *\n   * Default: `false` for backwards compatibility.\n   */\n  recordLcpOnPageloadSpan: boolean;\n\n  /**\n   * Whether span streaming is enabled.\n   */\n  spanStreamingEnabled?: boolean;\n}\n\n/** Add performance related spans to a transaction */\nexport function addPerformanceEntries(span: Span, options: AddPerformanceEntriesOptions): void {\n  const performance = getBrowserPerformanceAPI();\n  const origin = browserPerformanceTimeOrigin();\n  if (!performance?.getEntries || !origin) {\n    // Gatekeeper if performance API not available\n    return;\n  }\n\n  const { spanStreamingEnabled, ignorePerformanceApiSpans, ignoreResourceSpans } = options;\n\n  const timeOrigin = msToSec(origin);\n\n  const performanceEntries = performance.getEntries();\n\n  const { op, start_timestamp: transactionStartTime } = spanToJSON(span);\n\n  performanceEntries.slice(_performanceCursor).forEach(entry => {\n    const startTime = msToSec(entry.startTime);\n    const duration = msToSec(\n      // Inexplicably, Chrome sometimes emits a negative duration. We need to work around this.\n      // There is a SO post attempting to explain this, but it leaves one with open questions: https://stackoverflow.com/questions/23191918/peformance-getentries-and-negative-duration-display\n      // The way we clamp the value is probably not accurate, since we have observed this happen for things that may take a while to load, like for example the replay worker.\n      // TODO: Investigate why this happens and how to properly mitigate. For now, this is a workaround to prevent transactions being dropped due to negative duration spans.\n      Math.max(0, entry.duration),\n    );\n\n    if (op === 'navigation' && transactionStartTime && timeOrigin + startTime < transactionStartTime) {\n      return;\n    }\n\n    switch (entry.entryType) {\n      case 'navigation': {\n        _addNavigationSpans(span, entry as PerformanceNavigationTiming, timeOrigin);\n        break;\n      }\n      case 'mark':\n      case 'paint':\n      case 'measure': {\n        _addMeasureSpans(span, entry, startTime, duration, timeOrigin, ignorePerformanceApiSpans);\n        break;\n      }\n      case 'resource': {\n        _addResourceSpans(\n          span,\n          entry as PerformanceResourceTiming,\n          entry.name,\n          startTime,\n          duration,\n          timeOrigin,\n          ignoreResourceSpans,\n        );\n        break;\n      }\n      // Ignore other entry types.\n    }\n  });\n\n  _performanceCursor = Math.max(performanceEntries.length - 1, 0);\n\n  _trackNavigator(span, spanStreamingEnabled);\n}\n\n/**\n * Writes the collected web vitals (LCP, CLS, INP, TTFB, FP, FCP) onto the pageload span,\n * either as measurements/attributes (v1) or as web vital attributes (span streaming).\n *\n * This should be called when the pageload span ends, after the web vitals have been finalized.\n * It is a no-op for non-pageload spans, but always resets the collected web vital state so it\n * doesn't leak into a subsequent navigation.\n */\nexport function addWebVitalsToSpan(span: Span, options: AddWebVitalsToSpanOptions): void {\n  const origin = browserPerformanceTimeOrigin();\n  if (!getBrowserPerformanceAPI()?.getEntries || !origin) {\n    // Gatekeeper if performance API not available\n    resetWebVitalState();\n    return;\n  }\n\n  const { spanStreamingEnabled, recordClsOnPageloadSpan, recordLcpOnPageloadSpan } = options;\n  const timeOrigin = msToSec(origin);\n\n  // Measurements are only available for pageload transactions\n  if (spanToJSON(span).op === 'pageload') {\n    _addTtfbRequestTimeToMeasurements(_measurements);\n\n    if (spanStreamingEnabled) {\n      const setAttr = (shortWebVitalName: string, value: number, customAttrName?: string) => {\n        const attrKey = customAttrName ?? `browser.web_vital.${shortWebVitalName}.value`;\n        span.setAttribute(attrKey, value);\n        DEBUG_BUILD && debug.log('Setting web vital attribute', { [attrKey]: value }, 'on pageload span');\n      };\n      // for streamed pageload spans, we add the web vital measurements as attributes.\n      // We omit LCP, CLS and INP because they're tracked separately as spans\n      ['ttfb', 'fp', 'fcp'].forEach(measurementName => {\n        if (_measurements[measurementName]) {\n          setAttr(measurementName, _measurements[measurementName].value);\n        }\n      });\n      if (_measurements['ttfb.requestTime']) {\n        setAttr('ttfb.requestTime', _measurements['ttfb.requestTime'].value, 'browser.web_vital.ttfb.request_time');\n      }\n    } else {\n      // TODO (V11): Remove this else branch once we remove v1 standalone spans and transactions\n\n      // If CLS standalone spans are enabled, don't record CLS as a measurement\n      if (!recordClsOnPageloadSpan) {\n        delete _measurements.cls;\n      }\n\n      // If LCP standalone spans are enabled, don't record LCP as a measurement\n      if (!recordLcpOnPageloadSpan) {\n        delete _measurements.lcp;\n      }\n\n      Object.entries(_measurements).forEach(([measurementName, measurement]) => {\n        setMeasurement(measurementName, measurement.value, measurement.unit, span);\n      });\n\n      _setWebVitalAttributes(span, options);\n    }\n\n    // Set timeOrigin which denotes the timestamp which to base the LCP/FCP/FP/TTFB measurements on\n    span.setAttribute(spanStreamingEnabled ? 'browser.performance.time_origin' : 'performance.timeOrigin', timeOrigin);\n\n    // In prerendering scenarios, where a page might be prefetched and pre-rendered before the user clicks the link,\n    // the navigation starts earlier than when the user clicks it. Web Vitals should always be based on the\n    // user-perceived time, so they are not reported from the actual start of the navigation, but rather from the\n    // time where the user actively started the navigation, for example by clicking a link.\n    // This is user action is called \"activation\" and the time between navigation and activation is stored in\n    // the `activationStart` attribute of the \"navigation\" PerformanceEntry.\n    span.setAttribute(\n      spanStreamingEnabled ? 'browser.performance.navigation.activation_start' : 'performance.activationStart',\n      getActivationStart(),\n    );\n  }\n\n  resetWebVitalState();\n}\n\nfunction resetWebVitalState(): void {\n  _lcpEntry = undefined;\n  _clsEntry = undefined;\n  _measurements = {};\n}\n\n/**\n * React 19.2+ creates performance.measure entries for component renders.\n * We can identify them by the `detail.devtools.track` property being set to 'Components ⚛'.\n * see: https://react.dev/reference/dev-tools/react-performance-tracks\n * see: https://github.com/facebook/react/blob/06fcc8f380c6a905c7bc18d94453f623cf8cbc81/packages/react-reconciler/src/ReactFiberPerformanceTrack.js#L454-L473\n */\nfunction isReact19MeasureEntry(entry: PerformanceEntry | null): boolean | void {\n  if (entry?.entryType !== 'measure') {\n    return;\n  }\n  try {\n    // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n    return (entry as PerformanceMeasure).detail.devtools.track === 'Components ⚛';\n  } catch {\n    return;\n  }\n}\n\n/**\n * Create measure related spans.\n * Exported only for tests.\n */\nexport function _addMeasureSpans(\n  span: Span,\n  entry: PerformanceEntry,\n  startTime: number,\n  duration: number,\n  timeOrigin: number,\n  ignorePerformanceApiSpans: AddPerformanceEntriesOptions['ignorePerformanceApiSpans'],\n): void {\n  if (isReact19MeasureEntry(entry)) {\n    return;\n  }\n\n  if (\n    ['mark', 'measure'].includes(entry.entryType) &&\n    stringMatchesSomePattern(entry.name, ignorePerformanceApiSpans)\n  ) {\n    return;\n  }\n\n  const navEntry = getNavigationEntry(false);\n\n  const requestTime = msToSec(navEntry ? navEntry.requestStart : 0);\n  // Because performance.measure accepts arbitrary timestamps it can produce\n  // spans that happen before the browser even makes a request for the page.\n  //\n  // An example of this is the automatically generated Next.js-before-hydration\n  // spans created by the Next.js framework.\n  //\n  // To prevent this we will pin the start timestamp to the request start time\n  // This does make duration inaccurate, so if this does happen, we will add\n  // an attribute to the span\n  const measureStartTimestamp = timeOrigin + Math.max(startTime, requestTime);\n  const startTimeStamp = timeOrigin + startTime;\n  const measureEndTimestamp = startTimeStamp + duration;\n\n  const attributes: SpanAttributes = {\n    [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.resource.browser.metrics',\n  };\n\n  if (measureStartTimestamp !== startTimeStamp) {\n    attributes['sentry.browser.measure_happened_before_request'] = true;\n    attributes['sentry.browser.measure_start_time'] = measureStartTimestamp;\n  }\n\n  _addDetailToSpanAttributes(attributes, entry as PerformanceMeasure);\n\n  // Measurements from third parties can be off, which would create invalid spans, dropping transactions in the process.\n  if (measureStartTimestamp <= measureEndTimestamp) {\n    startAndEndSpan(span, measureStartTimestamp, measureEndTimestamp, {\n      name: entry.name,\n      op: entry.entryType,\n      attributes,\n    });\n  }\n}\n\nfunction _addDetailToSpanAttributes(attributes: SpanAttributes, performanceMeasure: PerformanceMeasure): void {\n  try {\n    // Accessing detail might throw in some browsers (e.g., Firefox) due to security restrictions\n    const detail = performanceMeasure.detail;\n\n    if (!detail) {\n      return;\n    }\n\n    // Process detail based on its type\n    if (typeof detail === 'object') {\n      // Handle object details\n      for (const [key, value] of Object.entries(detail)) {\n        if (value && isPrimitive(value)) {\n          attributes[`sentry.browser.measure.detail.${key}`] = value as SpanAttributeValue;\n        } else if (value !== undefined) {\n          try {\n            // This is user defined so we can't guarantee it's serializable\n            attributes[`sentry.browser.measure.detail.${key}`] = JSON.stringify(value);\n          } catch {\n            // Skip values that can't be stringified\n          }\n        }\n      }\n      return;\n    }\n\n    if (isPrimitive(detail)) {\n      // Handle primitive details\n      attributes['sentry.browser.measure.detail'] = detail as SpanAttributeValue;\n      return;\n    }\n\n    try {\n      attributes['sentry.browser.measure.detail'] = JSON.stringify(detail);\n    } catch {\n      // Skip if stringification fails\n    }\n  } catch {\n    // Silently ignore any errors when accessing detail\n    // This handles the Firefox \"Permission denied to access object\" error\n  }\n}\n\n/**\n * Instrument navigation entries\n * exported only for tests\n */\nexport function _addNavigationSpans(span: Span, entry: PerformanceNavigationTiming, timeOrigin: number): void {\n  (['unloadEvent', 'redirect', 'domContentLoadedEvent', 'loadEvent', 'connect'] as const).forEach(event => {\n    _addPerformanceNavigationTiming(span, entry, event, timeOrigin);\n  });\n  _addPerformanceNavigationTiming(span, entry, 'secureConnection', timeOrigin, 'TLS/SSL');\n  _addPerformanceNavigationTiming(span, entry, 'fetch', timeOrigin, 'cache');\n  _addPerformanceNavigationTiming(span, entry, 'domainLookup', timeOrigin, 'DNS');\n\n  _addRequest(span, entry, timeOrigin);\n}\n\ntype StartEventName =\n  | 'secureConnection'\n  | 'fetch'\n  | 'domainLookup'\n  | 'unloadEvent'\n  | 'redirect'\n  | 'connect'\n  | 'domContentLoadedEvent'\n  | 'loadEvent';\n\ntype EndEventName =\n  | 'domainLookupStart'\n  | 'domainLookupEnd'\n  | 'unloadEventEnd'\n  | 'redirectEnd'\n  | 'connectEnd'\n  | 'domContentLoadedEventEnd'\n  | 'loadEventEnd';\n\n/** Create performance navigation related spans */\nfunction _addPerformanceNavigationTiming(\n  span: Span,\n  entry: PerformanceNavigationTiming,\n  event: StartEventName,\n  timeOrigin: number,\n  name: string = event,\n): void {\n  const eventEnd = _getEndPropertyNameForNavigationTiming(event) satisfies keyof PerformanceNavigationTiming;\n  const end = entry[eventEnd];\n  const start = entry[`${event}Start`];\n  if (!start || !end) {\n    return;\n  }\n  startAndEndSpan(span, timeOrigin + msToSec(start), timeOrigin + msToSec(end), {\n    op: `browser.${name}`,\n    name: entry.name,\n    attributes: {\n      [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.browser.metrics',\n      ...(event === 'redirect' && entry.redirectCount != null ? { 'http.redirect_count': entry.redirectCount } : {}),\n    },\n  });\n}\n\nfunction _getEndPropertyNameForNavigationTiming(event: StartEventName): EndEventName {\n  if (event === 'secureConnection') {\n    return 'connectEnd';\n  }\n  if (event === 'fetch') {\n    return 'domainLookupStart';\n  }\n  return `${event}End`;\n}\n\n/** Create request and response related spans */\nfunction _addRequest(span: Span, entry: PerformanceNavigationTiming, timeOrigin: number): void {\n  const requestStartTimestamp = timeOrigin + msToSec(entry.requestStart);\n  const responseEndTimestamp = timeOrigin + msToSec(entry.responseEnd);\n  const responseStartTimestamp = timeOrigin + msToSec(entry.responseStart);\n  if (entry.responseEnd) {\n    // It is possible that we are collecting these metrics when the page hasn't finished loading yet, for example when the HTML slowly streams in.\n    // In this case, ie. when the document request hasn't finished yet, `entry.responseEnd` will be 0.\n    // In order not to produce faulty spans, where the end timestamp is before the start timestamp, we will only collect\n    // these spans when the responseEnd value is available. The backend (Relay) would drop the entire span if it contained faulty spans.\n    startAndEndSpan(span, requestStartTimestamp, responseEndTimestamp, {\n      op: 'browser.request',\n      name: entry.name,\n      attributes: {\n        [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.browser.metrics',\n      },\n    });\n\n    startAndEndSpan(span, responseStartTimestamp, responseEndTimestamp, {\n      op: 'browser.response',\n      name: entry.name,\n      attributes: {\n        [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.browser.metrics',\n      },\n    });\n  }\n}\n\n/**\n * Create resource-related spans.\n * Exported only for tests.\n */\nexport function _addResourceSpans(\n  span: Span,\n  entry: PerformanceResourceTiming,\n  resourceUrl: string,\n  startTime: number,\n  duration: number,\n  timeOrigin: number,\n  ignoredResourceSpanOps?: Array<string>,\n): void {\n  // we already instrument based on fetch and xhr, so we don't need to\n  // duplicate spans here.\n  if (entry.initiatorType === 'xmlhttprequest' || entry.initiatorType === 'fetch') {\n    return;\n  }\n\n  const op = entry.initiatorType ? `resource.${entry.initiatorType}` : 'resource.other';\n  if (ignoredResourceSpanOps?.includes(op)) {\n    return;\n  }\n\n  const attributes: SpanAttributes = {\n    [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.resource.browser.metrics',\n  };\n\n  const parsedUrl = parseUrl(resourceUrl);\n\n  if (parsedUrl.protocol) {\n    attributes['url.scheme'] = parsedUrl.protocol.split(':').pop(); // the protocol returned by parseUrl includes a :, but OTEL spec does not, so we remove it.\n  }\n\n  if (parsedUrl.host) {\n    attributes['server.address'] = parsedUrl.host;\n  }\n\n  attributes['url.same_origin'] = resourceUrl.includes(WINDOW.location.origin);\n\n  attributes[URL_FULL] = resourceUrl;\n\n  _setResourceRequestAttributes(entry, attributes, [\n    // https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming/responseStatus\n    ['responseStatus', 'http.response.status_code'],\n\n    ['transferSize', 'http.response_transfer_size'],\n    ['encodedBodySize', 'http.response_content_length'],\n    ['decodedBodySize', 'http.decoded_response_content_length'],\n\n    // https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming/renderBlockingStatus\n    ['renderBlockingStatus', 'resource.render_blocking_status'],\n\n    // https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming/deliveryType\n    ['deliveryType', 'http.response_delivery_type'],\n  ]);\n\n  const attributesWithResourceTiming: SpanAttributes = { ...attributes, ...resourceTimingToSpanAttributes(entry) };\n\n  const startTimestamp = timeOrigin + startTime;\n  const endTimestamp = startTimestamp + duration;\n\n  startAndEndSpan(span, startTimestamp, endTimestamp, {\n    name: resourceUrl.replace(WINDOW.location.origin, ''),\n    op,\n    attributes: attributesWithResourceTiming,\n  });\n}\n\n/**\n * Capture the information of the user agent.\n * TODO v11: Remove non-span-streaming attributes and measurements once we removed transactions\n */\nfunction _trackNavigator(span: Span, spanStreamingEnabled: boolean | undefined): void {\n  const navigator = WINDOW.navigator as null | (Navigator & NavigatorNetworkInformation & NavigatorDeviceMemory);\n  if (!navigator) {\n    return;\n  }\n\n  // track network connectivity\n  const connection = navigator.connection;\n  if (connection) {\n    if (connection.effectiveType) {\n      span.setAttribute(\n        spanStreamingEnabled ? 'network.connection.effective_type' : 'effectiveConnectionType',\n        connection.effectiveType,\n      );\n    }\n\n    if (connection.type) {\n      span.setAttribute(spanStreamingEnabled ? 'network.connection.type' : 'connectionType', connection.type);\n    }\n\n    if (isMeasurementValue(connection.rtt)) {\n      if (spanStreamingEnabled) {\n        span.setAttribute('network.connection.rtt', connection.rtt);\n      } else if (spanToJSON(span).op === 'pageload') {\n        // Measurements are only recorded on the pageload span, matching the historical\n        // behavior where `connection.rtt` was only flushed for pageload transactions.\n        setMeasurement('connection.rtt', connection.rtt, 'millisecond');\n      }\n    }\n  }\n\n  if (isMeasurementValue(navigator.deviceMemory)) {\n    if (spanStreamingEnabled) {\n      span.setAttribute('device.memory.estimated_capacity', navigator.deviceMemory);\n    } else {\n      span.setAttribute('deviceMemory', `${navigator.deviceMemory} GB`);\n    }\n  }\n\n  if (isMeasurementValue(navigator.hardwareConcurrency)) {\n    if (spanStreamingEnabled) {\n      span.setAttribute('device.processor_count', navigator.hardwareConcurrency);\n    } else {\n      span.setAttribute('hardwareConcurrency', String(navigator.hardwareConcurrency));\n    }\n  }\n}\n\n/** Add LCP / CLS data to span to allow debugging */\nfunction _setWebVitalAttributes(span: Span, options: AddWebVitalsToSpanOptions): void {\n  // Only add LCP attributes if LCP is being recorded on the pageload span\n  if (_lcpEntry && options.recordLcpOnPageloadSpan) {\n    // Capture Properties of the LCP element that contributes to the LCP.\n\n    if (_lcpEntry.element) {\n      span.setAttribute('lcp.element', htmlTreeAsString(_lcpEntry.element));\n    }\n\n    if (_lcpEntry.id) {\n      span.setAttribute('lcp.id', _lcpEntry.id);\n    }\n\n    if (_lcpEntry.url) {\n      // Trim URL to the first 200 characters.\n      span.setAttribute('lcp.url', _lcpEntry.url.trim().slice(0, 200));\n    }\n\n    if (_lcpEntry.loadTime != null) {\n      // loadTime is the time of LCP that's related to receiving the LCP element response..\n      span.setAttribute('lcp.loadTime', _lcpEntry.loadTime);\n    }\n\n    if (_lcpEntry.renderTime != null) {\n      // renderTime is loadTime + rendering time\n      // it's 0 if the LCP element is loaded from a 3rd party origin that doesn't send the\n      // `Timing-Allow-Origin` header.\n      span.setAttribute('lcp.renderTime', _lcpEntry.renderTime);\n    }\n\n    span.setAttribute('lcp.size', _lcpEntry.size);\n  }\n\n  // Only add CLS attributes if CLS is being recorded on the pageload span\n  if (_clsEntry?.sources && options.recordClsOnPageloadSpan) {\n    _clsEntry.sources.forEach((source, index) =>\n      span.setAttribute(`cls.source.${index + 1}`, htmlTreeAsString(source.node)),\n    );\n  }\n}\n\ntype ExperimentalResourceTimingProperty =\n  | 'renderBlockingStatus'\n  | 'deliveryType'\n  // For some reason, TS during build, errors on `responseStatus` not being a property of\n  // PerformanceResourceTiming while it actually is. Hence, we're adding it here.\n  // Perhaps because response status is not yet available in Webkit/Safari.\n  // https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming/responseStatus\n  | 'responseStatus';\n\n/**\n * Use this to set any attributes we can take directly form the PerformanceResourceTiming entry.\n *\n * This is just a mapping function for entry->attribute to keep bundle-size minimal.\n * Experimental properties are also accepted (see {@link ExperimentalResourceTimingProperty}).\n * Assumes that all entry properties might be undefined for browser-specific differences.\n * Only accepts string and number values for now and also sets 0-values.\n */\nexport function _setResourceRequestAttributes(\n  entry: Partial<PerformanceResourceTiming> & Partial<Record<ExperimentalResourceTimingProperty, number | string>>,\n  attributes: SpanAttributes,\n  properties: [keyof PerformanceResourceTiming | ExperimentalResourceTimingProperty, string][],\n): void {\n  properties.forEach(([entryKey, attributeKey]) => {\n    const entryVal = entry[entryKey];\n    if (\n      entryVal != null &&\n      ((typeof entryVal === 'number' && entryVal < MAX_INT_AS_BYTES) || typeof entryVal === 'string')\n    ) {\n      attributes[attributeKey] = entryVal;\n    }\n  });\n}\n\n/**\n * Add ttfb request time information to measurements.\n *\n * ttfb information is added via vendored web vitals library.\n */\nfunction _addTtfbRequestTimeToMeasurements(_measurements: Measurements): void {\n  const navEntry = getNavigationEntry(false);\n  if (!navEntry) {\n    return;\n  }\n\n  const { responseStart, requestStart } = navEntry;\n\n  if (requestStart <= responseStart) {\n    _measurements['ttfb.requestTime'] = {\n      value: responseStart - requestStart,\n      unit: 'millisecond',\n    };\n  }\n}\n", "import type { IntegrationFn } from '@sentry/core';\nimport { browserPerformanceTimeOrigin, defineIntegration, metrics } from '@sentry/core';\nimport { addPerformanceInstrumentationHandler } from './instrument';\nimport { getBrowserPerformanceAPI } from './utils';\n\n// ElementTiming interface based on the W3C spec\ninterface PerformanceElementTiming extends PerformanceEntry {\n  renderTime: number;\n  loadTime: number;\n  intersectionRect: DOMRectReadOnly;\n  identifier: string;\n  naturalWidth: number;\n  naturalHeight: number;\n  id: string;\n  element: Element | null;\n  url?: string;\n}\n\nconst INTEGRATION_NAME = 'ElementTiming';\n\nconst _elementTimingIntegration = (() => {\n  return {\n    name: INTEGRATION_NAME,\n    setup() {\n      const performance = getBrowserPerformanceAPI();\n      if (!performance || !browserPerformanceTimeOrigin()) {\n        return;\n      }\n\n      addPerformanceInstrumentationHandler('element', ({ entries }) => {\n        for (const entry of entries) {\n          const elementEntry = entry as PerformanceElementTiming;\n\n          if (!elementEntry.identifier) {\n            continue;\n          }\n\n          const identifier = elementEntry.identifier;\n          const paintType = elementEntry.name as 'image-paint' | 'text-paint' | undefined;\n          const renderTime = elementEntry.renderTime;\n          const loadTime = elementEntry.loadTime;\n\n          const metricAttributes: Record<string, string | number> = {\n            'sentry.origin': 'auto.ui.browser.element_timing',\n            'ui.element.identifier': identifier,\n          };\n\n          if (paintType) {\n            metricAttributes['ui.element.paint_type'] = paintType;\n          }\n\n          if (elementEntry.id) {\n            metricAttributes['ui.element.id'] = elementEntry.id;\n          }\n\n          if (elementEntry.element) {\n            metricAttributes['ui.element.type'] = elementEntry.element.tagName.toLowerCase();\n          }\n\n          if (elementEntry.url) {\n            metricAttributes['ui.element.url'] = elementEntry.url;\n          }\n\n          if (elementEntry.naturalWidth) {\n            metricAttributes['ui.element.width'] = elementEntry.naturalWidth;\n          }\n\n          if (elementEntry.naturalHeight) {\n            metricAttributes['ui.element.height'] = elementEntry.naturalHeight;\n          }\n\n          if (renderTime > 0) {\n            metrics.distribution(`ui.element.render_time`, renderTime, {\n              unit: 'millisecond',\n              attributes: metricAttributes,\n            });\n          }\n\n          if (loadTime > 0) {\n            metrics.distribution(`ui.element.load_time`, loadTime, {\n              unit: 'millisecond',\n              attributes: metricAttributes,\n            });\n          }\n        }\n      });\n    },\n  };\n}) satisfies IntegrationFn;\n\n/**\n * Captures [Element Timing API](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceElementTiming)\n * data as Sentry metrics.\n *\n * To mark an element for tracking, add the `elementtiming` HTML attribute:\n * ```html\n * <img src=\"hero.jpg\" elementtiming=\"hero-image\" />\n * <p elementtiming=\"hero-text\">Welcome!</p>\n * ```\n *\n * This emits `ui.element.render_time` and `ui.element.load_time` (for images)\n * as distribution metrics, tagged with the element's identifier and paint type.\n */\nexport const elementTimingIntegration = defineIntegration(_elementTimingIntegration);\n\n/**\n * @deprecated Use `elementTimingIntegration` instead. This function is a no-op and will be removed in a future version.\n */\nexport function startTrackingElementTiming(): () => void {\n  return () => undefined;\n}\n", "import type { Span, SpanAttributes } from '@sentry/core';\nimport {\n  browserPerformanceTimeOrigin,\n  getActiveSpan,\n  getCurrentScope,\n  getRootSpan,\n  isBrowser,\n  SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME,\n  SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT,\n  SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE,\n  SEMANTIC_ATTRIBUTE_SENTRY_OP,\n  SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n  spanToJSON,\n} from '@sentry/core';\nimport { htmlTreeAsString } from '../htmlTreeAsString';\nimport { WINDOW } from '../types';\nimport type { InstrumentationHandlerCallback } from './instrument';\nimport {\n  addInpInstrumentationHandler,\n  addPerformanceInstrumentationHandler,\n  isPerformanceEventTiming,\n} from './instrument';\nimport { getBrowserPerformanceAPI, msToSec, startStandaloneWebVitalSpan } from './utils';\n\ninterface InteractionContext {\n  span: Span | undefined;\n  elementName: string;\n}\n\nconst LAST_INTERACTIONS: number[] = [];\nconst INTERACTIONS_SPAN_MAP = new Map<number, InteractionContext>();\n\n// Map to store element names by timestamp, since we get the DOM event before the PerformanceObserver entry\nconst ELEMENT_NAME_TIMESTAMP_MAP = new Map<number, string>();\n\n/**\n * 60 seconds is the maximum for a plausible INP value\n * (source: Me)\n */\nexport const MAX_PLAUSIBLE_INP_DURATION = 60;\n/**\n * Start tracking INP webvital events.\n */\nexport function startTrackingINP(): () => void {\n  const performance = getBrowserPerformanceAPI();\n  if (performance && browserPerformanceTimeOrigin()) {\n    const inpCallback = _trackINP();\n\n    return (): void => {\n      inpCallback();\n    };\n  }\n\n  return () => undefined;\n}\n\nexport const INP_ENTRY_MAP: Record<string, 'click' | 'hover' | 'drag' | 'press'> = {\n  click: 'click',\n  pointerdown: 'click',\n  pointerup: 'click',\n  mousedown: 'click',\n  mouseup: 'click',\n  touchstart: 'click',\n  touchend: 'click',\n  mouseover: 'hover',\n  mouseout: 'hover',\n  mouseenter: 'hover',\n  mouseleave: 'hover',\n  pointerover: 'hover',\n  pointerout: 'hover',\n  pointerenter: 'hover',\n  pointerleave: 'hover',\n  dragstart: 'drag',\n  dragend: 'drag',\n  drag: 'drag',\n  dragenter: 'drag',\n  dragleave: 'drag',\n  dragover: 'drag',\n  drop: 'drag',\n  keydown: 'press',\n  keyup: 'press',\n  keypress: 'press',\n  input: 'press',\n};\n\n/** Starts tracking the Interaction to Next Paint on the current page. #\n * exported only for testing\n */\nexport function _trackINP(): () => void {\n  return addInpInstrumentationHandler(_onInp);\n}\n\n/**\n * exported only for testing\n */\nexport const _onInp: InstrumentationHandlerCallback = ({ metric }) => {\n  if (metric.value == undefined) {\n    return;\n  }\n\n  const duration = msToSec(metric.value);\n\n  // We received occasional reports of hour-long INP values.\n  // Therefore, we add a sanity check to avoid creating spans for\n  // unrealistically long INP durations.\n  if (duration > MAX_PLAUSIBLE_INP_DURATION) {\n    return;\n  }\n\n  const entry = metric.entries.find(entry => entry.duration === metric.value && INP_ENTRY_MAP[entry.name]);\n\n  if (!entry) {\n    return;\n  }\n\n  const { interactionId } = entry;\n  const interactionType = INP_ENTRY_MAP[entry.name];\n\n  /** Build the INP span, create an envelope from the span, and then send the envelope */\n  const startTime = msToSec((browserPerformanceTimeOrigin() as number) + entry.startTime);\n  const activeSpan = getActiveSpan();\n  const rootSpan = activeSpan ? getRootSpan(activeSpan) : undefined;\n\n  // We first try to lookup the interaction context from our INTERACTIONS_SPAN_MAP,\n  // where we cache the route and element name per interactionId\n  const cachedInteractionContext = interactionId != null ? INTERACTIONS_SPAN_MAP.get(interactionId) : undefined;\n\n  const spanToUse = cachedInteractionContext?.span || rootSpan;\n\n  // Else, we try to use the active span.\n  // Finally, we fall back to look at the transactionName on the scope\n  const routeName = spanToUse ? spanToJSON(spanToUse).description : getCurrentScope().getScopeData().transactionName;\n\n  const name = cachedInteractionContext?.elementName || htmlTreeAsString(entry.target);\n  const attributes: SpanAttributes = {\n    [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.browser.inp',\n    [SEMANTIC_ATTRIBUTE_SENTRY_OP]: `ui.interaction.${interactionType}`,\n    [SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME]: entry.duration,\n  };\n\n  const span = startStandaloneWebVitalSpan({\n    name,\n    transaction: routeName,\n    attributes,\n    startTime,\n  });\n\n  if (span) {\n    span.addEvent('inp', {\n      [SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT]: 'millisecond',\n      [SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE]: metric.value,\n    });\n\n    span.end(startTime + duration);\n  }\n};\n\n/**\n * Look up a cached interaction context (element name + root span) by interactionId.\n * Returns undefined if no context was cached for this interaction.\n */\nexport function getCachedInteractionContext(interactionId: number | undefined): InteractionContext | undefined {\n  return interactionId != null ? INTERACTIONS_SPAN_MAP.get(interactionId) : undefined;\n}\n\n/**\n * Register a listener to cache route information for INP interactions.\n */\nexport function registerInpInteractionListener(): void {\n  // Listen for all interaction events that could contribute to INP\n  const interactionEvents = Object.keys(INP_ENTRY_MAP);\n  if (isBrowser()) {\n    interactionEvents.forEach(eventType => {\n      WINDOW.addEventListener(eventType, captureElementFromEvent, { capture: true, passive: true });\n    });\n  }\n\n  /**\n   * Captures the element name from a DOM event and stores it in the ELEMENT_NAME_TIMESTAMP_MAP.\n   */\n  function captureElementFromEvent(event: Event): void {\n    const target = event.target as HTMLElement | null;\n    if (!target) {\n      return;\n    }\n\n    const elementName = htmlTreeAsString(target);\n    const timestamp = Math.round(event.timeStamp);\n\n    // Store the element name by timestamp so we can match it with the PerformanceEntry\n    ELEMENT_NAME_TIMESTAMP_MAP.set(timestamp, elementName);\n\n    // Clean up old\n    if (ELEMENT_NAME_TIMESTAMP_MAP.size > 50) {\n      const firstKey = ELEMENT_NAME_TIMESTAMP_MAP.keys().next().value;\n      if (firstKey !== undefined) {\n        ELEMENT_NAME_TIMESTAMP_MAP.delete(firstKey);\n      }\n    }\n  }\n\n  /**\n   * Tries to get the element name from the timestamp map.\n   */\n  function resolveElementNameFromEntry(entry: PerformanceEntry): string {\n    const timestamp = Math.round(entry.startTime);\n    let elementName = ELEMENT_NAME_TIMESTAMP_MAP.get(timestamp);\n\n    // try nearby timestamps (±5ms)\n    if (!elementName) {\n      for (let offset = -5; offset <= 5; offset++) {\n        const nearbyName = ELEMENT_NAME_TIMESTAMP_MAP.get(timestamp + offset);\n        if (nearbyName) {\n          elementName = nearbyName;\n          break;\n        }\n      }\n    }\n\n    return elementName || '<unknown>';\n  }\n\n  const handleEntries = ({ entries }: { entries: PerformanceEntry[] }): void => {\n    const activeSpan = getActiveSpan();\n    const activeRootSpan = activeSpan && getRootSpan(activeSpan);\n\n    entries.forEach(entry => {\n      if (!isPerformanceEventTiming(entry)) {\n        return;\n      }\n\n      const interactionId = entry.interactionId;\n      if (interactionId == null) {\n        return;\n      }\n\n      // If the interaction was already recorded before, nothing more to do\n      if (INTERACTIONS_SPAN_MAP.has(interactionId)) {\n        return;\n      }\n\n      const elementName = entry.target ? htmlTreeAsString(entry.target) : resolveElementNameFromEntry(entry);\n\n      // We keep max. 10 interactions in the list, then remove the oldest one & clean up\n      if (LAST_INTERACTIONS.length > 10) {\n        const last = LAST_INTERACTIONS.shift() as number;\n        INTERACTIONS_SPAN_MAP.delete(last);\n      }\n\n      // We add the interaction to the list of recorded interactions\n      // and store both the span and element name for this interaction\n      LAST_INTERACTIONS.push(interactionId);\n      INTERACTIONS_SPAN_MAP.set(interactionId, {\n        span: activeRootSpan,\n        elementName,\n      });\n    });\n  };\n\n  addPerformanceInstrumentationHandler('event', handleEntries);\n  addPerformanceInstrumentationHandler('first-input', handleEntries);\n}\n", "import type { Client, Span, SpanAttributes } from '@sentry/core';\nimport {\n  browserPerformanceTimeOrigin,\n  debug,\n  getActiveSpan,\n  getCurrentScope,\n  getRootSpan,\n  SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME,\n  SEMANTIC_ATTRIBUTE_SENTRY_OP,\n  SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n  spanToStreamedSpanJSON,\n  startInactiveSpan,\n  timestampInSeconds,\n} from '@sentry/core';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { htmlTreeAsString } from '../htmlTreeAsString';\nimport { WINDOW } from '../types';\nimport { getCachedInteractionContext, INP_ENTRY_MAP, MAX_PLAUSIBLE_INP_DURATION } from './inp';\nimport type { InstrumentationHandlerCallback } from './instrument';\nimport { addClsInstrumentationHandler, addInpInstrumentationHandler, addLcpInstrumentationHandler } from './instrument';\nimport { isValidLcpMetric } from './lcp';\nimport type { WebVitalReportEvent } from './utils';\nimport { getBrowserPerformanceAPI, listenForWebVitalReportEvents, msToSec, supportsWebVital } from './utils';\nimport type { PerformanceEventTiming } from './instrument';\nimport { SENTRY_SEGMENT_NAME, SENTRY_TRANSACTION } from '@sentry/conventions/attributes';\n\n// Locally-defined interfaces to avoid leaking bare global type references into the\n// generated .d.ts. The `declare global` augmentations in web-vitals/types.ts make these\n// available during this package's compilation but are NOT carried to consumers.\n// This mirrors the pattern used for PerformanceEventTiming in instrument.ts.\nexport interface LayoutShift extends PerformanceEntry {\n  value: number;\n  sources: Array<{ node: Node | null }>;\n  hadRecentInput: boolean;\n}\n\nexport interface LargestContentfulPaint extends PerformanceEntry {\n  readonly renderTime: DOMHighResTimeStamp;\n  readonly loadTime: DOMHighResTimeStamp;\n  readonly size: number;\n  readonly id: string;\n  readonly url: string;\n  readonly element: Element | null;\n}\n\ninterface WebVitalSpanOptions {\n  name: string;\n  op: string;\n  origin: string;\n  metricName: 'lcp' | 'cls' | 'inp';\n  value: number;\n  attributes?: SpanAttributes;\n  parentSpan?: Span;\n  reportEvent?: WebVitalReportEvent;\n  startTime: number;\n  endTime?: number;\n}\n\n/**\n * Emits a web vital span that flows through the span streaming pipeline.\n */\nexport function _emitWebVitalSpan(options: WebVitalSpanOptions): void {\n  const {\n    name,\n    op,\n    origin,\n    metricName,\n    value,\n    attributes: passedAttributes,\n    parentSpan,\n    reportEvent,\n    startTime,\n    endTime,\n  } = options;\n\n  const routeName = getCurrentScope().getScopeData().transactionName;\n\n  const attributes: SpanAttributes = {\n    [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: origin,\n    [SEMANTIC_ATTRIBUTE_SENTRY_OP]: op,\n    [SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME]: 0,\n    [`browser.web_vital.${metricName}.value`]: value,\n    // oxlint-disable-next-line typescript-eslint/no-deprecated\n    [SENTRY_TRANSACTION]: routeName,\n    [SENTRY_SEGMENT_NAME]: routeName,\n    // Web vital score calculation relies on the user agent\n    'user_agent.original': WINDOW.navigator?.userAgent,\n    ...passedAttributes,\n  };\n\n  if (parentSpan && spanToStreamedSpanJSON(parentSpan).attributes?.[SEMANTIC_ATTRIBUTE_SENTRY_OP] === 'pageload') {\n    // for LCP and CLS, we collect the pageload span id as an attribute\n    attributes['sentry.pageload.span_id'] = parentSpan.spanContext().spanId;\n  }\n\n  if (reportEvent) {\n    attributes[`browser.web_vital.${metricName}.report_event`] = reportEvent;\n  }\n\n  const span = startInactiveSpan({\n    name,\n    attributes,\n    startTime,\n    // if we have a pageload span, we let the web vital span start as its parent. This ensures that\n    // it is not started as a segment span, without having to manually set it to a \"standalone\" v2 span\n    // that has `segment: false` but no actual parent span.\n    parentSpan: parentSpan,\n  });\n\n  if (span) {\n    span.end(endTime ?? startTime);\n  }\n}\n\n/**\n * Tracks LCP as a streamed span.\n */\nexport function trackLcpAsSpan(client: Client): void {\n  let lcpValue = 0;\n  let lcpEntry: LargestContentfulPaint | undefined;\n\n  if (!supportsWebVital('largest-contentful-paint')) {\n    return;\n  }\n\n  const cleanupLcpHandler = addLcpInstrumentationHandler(({ metric }) => {\n    const entry = metric.entries[metric.entries.length - 1] as LargestContentfulPaint | undefined;\n    if (!entry || !isValidLcpMetric(metric.value)) {\n      return;\n    }\n    lcpValue = metric.value;\n    lcpEntry = entry;\n  }, true);\n\n  listenForWebVitalReportEvents(client, (reportEvent, _, pageloadSpan) => {\n    _sendLcpSpan(lcpValue, lcpEntry, pageloadSpan, reportEvent);\n    cleanupLcpHandler();\n  });\n}\n\n/**\n * Exported only for testing.\n */\nexport function _sendLcpSpan(\n  lcpValue: number,\n  entry: LargestContentfulPaint | undefined,\n  pageloadSpan?: Span,\n  reportEvent?: WebVitalReportEvent,\n): void {\n  if (!isValidLcpMetric(lcpValue)) {\n    return;\n  }\n\n  DEBUG_BUILD && debug.log(`Sending LCP span (${lcpValue})`);\n\n  const performanceTimeOrigin = browserPerformanceTimeOrigin() || 0;\n  const timeOrigin = msToSec(performanceTimeOrigin);\n  const endTime = msToSec(performanceTimeOrigin + (entry?.startTime || 0));\n  const name = entry ? htmlTreeAsString(entry.element) : 'Largest contentful paint';\n\n  const attributes: SpanAttributes = {};\n\n  entry?.element && (attributes['browser.web_vital.lcp.element'] = htmlTreeAsString(entry.element));\n  entry?.id && (attributes['browser.web_vital.lcp.id'] = entry.id);\n  entry?.url && (attributes['browser.web_vital.lcp.url'] = entry.url);\n  entry?.loadTime != null && (attributes['browser.web_vital.lcp.load_time'] = entry.loadTime);\n  entry?.renderTime != null && (attributes['browser.web_vital.lcp.render_time'] = entry.renderTime);\n  entry?.size != null && (attributes['browser.web_vital.lcp.size'] = entry.size);\n\n  _emitWebVitalSpan({\n    name,\n    op: 'ui.webvital.lcp',\n    origin: 'auto.http.browser.lcp',\n    metricName: 'lcp',\n    value: lcpValue,\n    attributes,\n    parentSpan: pageloadSpan,\n    reportEvent,\n    startTime: timeOrigin,\n    endTime,\n  });\n}\n\n/**\n * Tracks CLS as a streamed span.\n */\nexport function trackClsAsSpan(client: Client): void {\n  let clsValue = 0;\n  let clsEntry: LayoutShift | undefined;\n\n  if (!supportsWebVital('layout-shift')) {\n    return;\n  }\n\n  const cleanupClsHandler = addClsInstrumentationHandler(({ metric }) => {\n    const entry = metric.entries[metric.entries.length - 1] as LayoutShift | undefined;\n    if (!entry) {\n      return;\n    }\n    clsValue = metric.value;\n    clsEntry = entry;\n  }, true);\n\n  listenForWebVitalReportEvents(client, (reportEvent, _, pageloadSpan) => {\n    _sendClsSpan(clsValue, clsEntry, pageloadSpan, reportEvent);\n    cleanupClsHandler();\n  });\n}\n\n/**\n * Exported only for testing.\n */\nexport function _sendClsSpan(\n  clsValue: number,\n  entry: LayoutShift | undefined,\n  pageloadSpan?: Span,\n  reportEvent?: WebVitalReportEvent,\n): void {\n  DEBUG_BUILD && debug.log(`Sending CLS span (${clsValue})`);\n\n  const startTime = entry ? msToSec((browserPerformanceTimeOrigin() || 0) + entry.startTime) : timestampInSeconds();\n  const name = entry ? htmlTreeAsString(entry.sources[0]?.node) : 'Layout shift';\n\n  const attributes: SpanAttributes = {};\n\n  if (entry?.sources) {\n    entry.sources.forEach((source, index) => {\n      attributes[`browser.web_vital.cls.source.${index + 1}`] = htmlTreeAsString(source.node);\n    });\n  }\n\n  _emitWebVitalSpan({\n    name,\n    op: 'ui.webvital.cls',\n    origin: 'auto.http.browser.cls',\n    metricName: 'cls',\n    value: clsValue,\n    attributes,\n    parentSpan: pageloadSpan,\n    reportEvent,\n    startTime,\n  });\n}\n\n/**\n * Tracks INP as a streamed span.\n *\n * This mirrors the standalone INP tracking logic (`startTrackingINP`) but emits\n * spans through the streaming pipeline instead of as standalone spans.\n * Requires `registerInpInteractionListener()` to be called separately for\n * cached element names and root spans per interaction.\n */\nexport function trackInpAsSpan(): void {\n  const performance = getBrowserPerformanceAPI();\n  if (!performance || !browserPerformanceTimeOrigin()) {\n    return;\n  }\n\n  const onInp: InstrumentationHandlerCallback = ({ metric }) => {\n    if (metric.value == null) {\n      return;\n    }\n\n    const duration = msToSec(metric.value);\n\n    if (duration > MAX_PLAUSIBLE_INP_DURATION) {\n      return;\n    }\n\n    const entry = metric.entries.find(e => e.duration === metric.value && INP_ENTRY_MAP[e.name]);\n\n    if (!entry) {\n      return;\n    }\n\n    _sendInpSpan(metric.value, entry);\n  };\n\n  addInpInstrumentationHandler(onInp);\n}\n\n/**\n * Exported only for testing.\n */\nexport function _sendInpSpan(inpValue: number, entry: PerformanceEventTiming): void {\n  DEBUG_BUILD && debug.log(`Sending INP span (${inpValue})`);\n\n  const startTime = msToSec((browserPerformanceTimeOrigin() as number) + entry.startTime);\n  const duration = msToSec(inpValue);\n  const interactionType = INP_ENTRY_MAP[entry.name];\n\n  const cachedContext = getCachedInteractionContext(entry.interactionId);\n  const activeSpan = getActiveSpan();\n  const rootSpan = activeSpan ? getRootSpan(activeSpan) : undefined;\n\n  const spanToUse = cachedContext?.span || rootSpan;\n  const routeName = spanToUse\n    ? spanToStreamedSpanJSON(spanToUse).name\n    : getCurrentScope().getScopeData().transactionName;\n  const name = cachedContext?.elementName || htmlTreeAsString(entry.target);\n\n  _emitWebVitalSpan({\n    name,\n    op: `ui.interaction.${interactionType}`,\n    origin: 'auto.http.browser.inp',\n    metricName: 'inp',\n    value: inpValue,\n    attributes: {\n      [SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME]: entry.duration,\n      // oxlint-disable-next-line typescript-eslint/no-deprecated\n      [SENTRY_TRANSACTION]: routeName,\n      [SENTRY_SEGMENT_NAME]: routeName,\n    },\n    startTime,\n    endTime: startTime + duration,\n    parentSpan: spanToUse,\n  });\n}\n", "import type { HandlerDataDom } from '@sentry/core';\nimport { addHandler, addNonEnumerableProperty, fill, maybeInstrument, triggerHandlers, uuid4 } from '@sentry/core';\nimport { WINDOW } from '../types';\n\ntype SentryWrappedTarget = HTMLElement & { _sentryId?: string };\n\ntype AddEventListener = (\n  type: string,\n  listener: EventListenerOrEventListenerObject,\n  options?: boolean | AddEventListenerOptions,\n) => void;\ntype RemoveEventListener = (\n  type: string,\n  listener: EventListenerOrEventListenerObject,\n  options?: boolean | EventListenerOptions,\n) => void;\n\ntype InstrumentedElement = Element & {\n  __sentry_instrumentation_handlers__?: {\n    [key in 'click' | 'keypress']?: {\n      handler?: unknown;\n      /** The number of custom listeners attached to this element */\n      refCount: number;\n    };\n  };\n};\n\nconst DEBOUNCE_DURATION = 1000;\n\nlet debounceTimerID: number | undefined;\nlet lastCapturedEventType: string | undefined;\nlet lastCapturedEventTargetId: string | undefined;\n\n/**\n * Add an instrumentation handler for when a click or a keypress happens.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nexport function addClickKeypressInstrumentationHandler(handler: (data: HandlerDataDom) => void): void {\n  const type = 'dom';\n  addHandler(type, handler);\n  maybeInstrument(type, instrumentDOM);\n}\n\n/** Exported for tests only. */\nexport function instrumentDOM(): void {\n  if (!WINDOW.document) {\n    return;\n  }\n\n  // Make it so that any click or keypress that is unhandled / bubbled up all the way to the document triggers our dom\n  // handlers. (Normally we have only one, which captures a breadcrumb for each click or keypress.) Do this before\n  // we instrument `addEventListener` so that we don't end up attaching this handler twice.\n  const triggerDOMHandler = triggerHandlers.bind(null, 'dom');\n  const globalDOMEventHandler = makeDOMEventHandler(triggerDOMHandler, true);\n  WINDOW.document.addEventListener('click', globalDOMEventHandler, false);\n  WINDOW.document.addEventListener('keypress', globalDOMEventHandler, false);\n\n  // After hooking into click and keypress events bubbled up to `document`, we also hook into user-handled\n  // clicks & keypresses, by adding an event listener of our own to any element to which they add a listener. That\n  // way, whenever one of their handlers is triggered, ours will be, too. (This is needed because their handler\n  // could potentially prevent the event from bubbling up to our global listeners. This way, our handler are still\n  // guaranteed to fire at least once.)\n  ['EventTarget', 'Node'].forEach((target: string) => {\n    const globalObject = WINDOW as unknown as Record<string, { prototype?: object }>;\n    const proto = globalObject[target]?.prototype;\n\n    // eslint-disable-next-line no-prototype-builtins\n    if (!proto?.hasOwnProperty?.('addEventListener')) {\n      return;\n    }\n\n    fill(proto, 'addEventListener', function (originalAddEventListener: AddEventListener): AddEventListener {\n      return function (this: InstrumentedElement, type, listener, options): AddEventListener {\n        if (type === 'click' || type == 'keypress') {\n          try {\n            const handlers = (this.__sentry_instrumentation_handlers__ =\n              this.__sentry_instrumentation_handlers__ || {});\n            const handlerForType = (handlers[type] = handlers[type] || { refCount: 0 });\n\n            if (!handlerForType.handler) {\n              const handler = makeDOMEventHandler(triggerDOMHandler);\n              handlerForType.handler = handler;\n              originalAddEventListener.call(this, type, handler, options);\n            }\n\n            handlerForType.refCount++;\n          } catch {\n            // Accessing dom properties is always fragile.\n            // Also allows us to skip `addEventListeners` calls with no proper `this` context.\n          }\n        }\n\n        return originalAddEventListener.call(this, type, listener, options);\n      };\n    });\n\n    fill(\n      proto,\n      'removeEventListener',\n      function (originalRemoveEventListener: RemoveEventListener): RemoveEventListener {\n        return function (this: InstrumentedElement, type, listener, options): () => void {\n          if (type === 'click' || type == 'keypress') {\n            try {\n              const handlers = this.__sentry_instrumentation_handlers__ || {};\n              const handlerForType = handlers[type];\n\n              if (handlerForType) {\n                handlerForType.refCount--;\n                // If there are no longer any custom handlers of the current type on this element, we can remove ours, too.\n                if (handlerForType.refCount <= 0) {\n                  originalRemoveEventListener.call(this, type, handlerForType.handler, options);\n                  handlerForType.handler = undefined;\n                  delete handlers[type]; // eslint-disable-line @typescript-eslint/no-dynamic-delete\n                }\n\n                // If there are no longer any custom handlers of any type on this element, cleanup everything.\n                if (Object.keys(handlers).length === 0) {\n                  delete this.__sentry_instrumentation_handlers__;\n                }\n              }\n            } catch {\n              // Accessing dom properties is always fragile.\n              // Also allows us to skip `addEventListeners` calls with no proper `this` context.\n            }\n          }\n\n          return originalRemoveEventListener.call(this, type, listener, options);\n        };\n      },\n    );\n  });\n}\n\n/**\n * Check whether the event is similar to the last captured one. For example, two click events on the same button.\n */\nfunction isSimilarToLastCapturedEvent(event: Event): boolean {\n  // If both events have different type, then user definitely performed two separate actions. e.g. click + keypress.\n  if (event.type !== lastCapturedEventType) {\n    return false;\n  }\n\n  try {\n    // If both events have the same type, it's still possible that actions were performed on different targets.\n    // e.g. 2 clicks on different buttons.\n    if (!event.target || (event.target as SentryWrappedTarget)._sentryId !== lastCapturedEventTargetId) {\n      return false;\n    }\n  } catch {\n    // just accessing `target` property can throw an exception in some rare circumstances\n    // see: https://github.com/getsentry/sentry-javascript/issues/838\n  }\n\n  // If both events have the same type _and_ same `target` (an element which triggered an event, _not necessarily_\n  // to which an event listener was attached), we treat them as the same action, as we want to capture\n  // only one breadcrumb. e.g. multiple clicks on the same button, or typing inside a user input box.\n  return true;\n}\n\n/**\n * Decide whether an event should be captured.\n * @param event event to be captured\n */\nfunction shouldSkipDOMEvent(eventType: string, target: SentryWrappedTarget | null): boolean {\n  // We are only interested in filtering `keypress` events for now.\n  if (eventType !== 'keypress') {\n    return false;\n  }\n\n  if (!target?.tagName) {\n    return true;\n  }\n\n  // Only consider keypress events on actual input elements. This will disregard keypresses targeting body\n  // e.g.tabbing through elements, hotkeys, etc.\n  if (target.tagName === 'INPUT' || target.tagName === 'TEXTAREA' || target.isContentEditable) {\n    return false;\n  }\n\n  return true;\n}\n\n/**\n * Wraps addEventListener to capture UI breadcrumbs\n */\nfunction makeDOMEventHandler(\n  handler: (data: HandlerDataDom) => void,\n  globalListener: boolean = false,\n): (event: Event) => void {\n  return (event: Event & { _sentryCaptured?: true }): void => {\n    // It's possible this handler might trigger multiple times for the same\n    // event (e.g. event propagation through node ancestors).\n    // Ignore if we've already captured that event.\n    if (!event || event['_sentryCaptured']) {\n      return;\n    }\n\n    const target = getEventTarget(event);\n\n    // We always want to skip _some_ events.\n    if (shouldSkipDOMEvent(event.type, target)) {\n      return;\n    }\n\n    // Mark event as \"seen\"\n    addNonEnumerableProperty(event, '_sentryCaptured', true);\n\n    if (target && !target._sentryId) {\n      // Add UUID to event target so we can identify if\n      addNonEnumerableProperty(target, '_sentryId', uuid4());\n    }\n\n    const name = event.type === 'keypress' ? 'input' : event.type;\n\n    // If there is no last captured event, it means that we can safely capture the new event and store it for future comparisons.\n    // If there is a last captured event, see if the new event is different enough to treat it as a unique one.\n    // If that's the case, emit the previous event and store locally the newly-captured DOM event.\n    if (!isSimilarToLastCapturedEvent(event)) {\n      const handlerData: HandlerDataDom = { event, name, global: globalListener };\n      handler(handlerData);\n      lastCapturedEventType = event.type;\n      lastCapturedEventTargetId = target ? target._sentryId : undefined;\n    }\n\n    // Start a new debounce timer that will prevent us from capturing multiple events that should be grouped together.\n    clearTimeout(debounceTimerID);\n    debounceTimerID = WINDOW.setTimeout(() => {\n      lastCapturedEventTargetId = undefined;\n      lastCapturedEventType = undefined;\n    }, DEBOUNCE_DURATION);\n  };\n}\n\nfunction getEventTarget(event: Event): SentryWrappedTarget | null {\n  try {\n    return event.target as SentryWrappedTarget | null;\n  } catch {\n    // just accessing `target` property can throw an exception in some rare circumstances\n    // see: https://github.com/getsentry/sentry-javascript/issues/838\n    return null;\n  }\n}\n", "import type { HandlerDataHistory } from '@sentry/core';\nimport { addHandler, fill, maybeInstrument, supportsHistory, triggerHandlers } from '@sentry/core';\nimport { WINDOW } from '../types';\n\nlet lastHref: string | undefined;\n\n/**\n * Add an instrumentation handler for when a fetch request happens.\n * The handler function is called once when the request starts and once when it ends,\n * which can be identified by checking if it has an `endTimestamp`.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nexport function addHistoryInstrumentationHandler(handler: (data: HandlerDataHistory) => void): void {\n  const type = 'history';\n  addHandler(type, handler);\n  maybeInstrument(type, instrumentHistory);\n}\n\n/**\n * Exported just for testing\n */\nexport function instrumentHistory(): void {\n  // The `popstate` event may also be triggered on `pushState`, but it may not always reliably be emitted by the browser\n  // Which is why we also monkey-patch methods below, in addition to this\n  WINDOW.addEventListener('popstate', () => {\n    const to = WINDOW.location.href;\n    // keep track of the current URL state, as we always receive only the updated state\n    const from = lastHref;\n    lastHref = to;\n\n    if (from === to) {\n      return;\n    }\n\n    const handlerData = { from, to } satisfies HandlerDataHistory;\n    triggerHandlers('history', handlerData);\n  });\n\n  // Just guard against this not being available, in weird environments\n  if (!supportsHistory()) {\n    return;\n  }\n\n  function historyReplacementFunction(originalHistoryFunction: () => void): () => void {\n    return function (this: History, ...args: unknown[]): void {\n      const url = args.length > 2 ? args[2] : undefined;\n      if (url) {\n        const from = lastHref;\n\n        // Ensure the URL is absolute\n        // this can be either a path, then it is relative to the current origin\n        // or a full URL of the current origin - other origins are not allowed\n        // See: https://developer.mozilla.org/en-US/docs/Web/API/History/pushState#url\n        // coerce to string (this is what pushState does)\n        const to = getAbsoluteUrl(String(url));\n\n        // keep track of the current URL state, as we always receive only the updated state\n        lastHref = to;\n\n        if (from === to) {\n          return originalHistoryFunction.apply(this, args);\n        }\n\n        const handlerData = { from, to } satisfies HandlerDataHistory;\n        triggerHandlers('history', handlerData);\n      }\n      return originalHistoryFunction.apply(this, args);\n    };\n  }\n\n  fill(WINDOW.history, 'pushState', historyReplacementFunction);\n  fill(WINDOW.history, 'replaceState', historyReplacementFunction);\n}\n\nfunction getAbsoluteUrl(urlOrPath: string): string {\n  try {\n    const url = new URL(urlOrPath, WINDOW.location.origin);\n    return url.toString();\n  } catch {\n    // fallback, just do nothing\n    return urlOrPath;\n  }\n}\n", "import { debug, isNativeFunction } from '@sentry/core';\nimport { DEBUG_BUILD } from './debug-build';\nimport { WINDOW } from './types';\n\n/**\n * We generally want to use window.fetch / window.setTimeout.\n * However, in some cases this may be wrapped (e.g. by Zone.js for Angular),\n * so we try to get an unpatched version of this from a sandboxed iframe.\n */\n\ninterface CacheableImplementations {\n  setTimeout: typeof WINDOW.setTimeout;\n  fetch: typeof WINDOW.fetch;\n}\n\nconst cachedImplementations: Partial<CacheableImplementations> = {};\n\n/**\n * Get the native implementation of a browser function.\n *\n * This can be used to ensure we get an unwrapped version of a function, in cases where a wrapped function can lead to problems.\n *\n * The following methods can be retrieved:\n * - `setTimeout`: This can be wrapped by e.g. Angular, causing change detection to be triggered.\n * - `fetch`: This can be wrapped by e.g. ad-blockers, causing an infinite loop when a request is blocked.\n */\nexport function getNativeImplementation<T extends keyof CacheableImplementations>(\n  name: T,\n): CacheableImplementations[T] {\n  const cached = cachedImplementations[name];\n  if (cached) {\n    return cached;\n  }\n\n  let impl = WINDOW[name] as CacheableImplementations[T];\n\n  // Fast path to avoid DOM I/O\n  if (isNativeFunction(impl)) {\n    return (cachedImplementations[name] = impl.bind(WINDOW) as CacheableImplementations[T]);\n  }\n\n  const document = WINDOW.document;\n  // eslint-disable-next-line typescript/no-deprecated\n  if (document && typeof document.createElement === 'function') {\n    try {\n      const sandbox = document.createElement('iframe');\n      sandbox.hidden = true;\n      document.head.appendChild(sandbox);\n      const contentWindow = sandbox.contentWindow;\n      if (contentWindow?.[name]) {\n        impl = contentWindow[name] as CacheableImplementations[T];\n      }\n      document.head.removeChild(sandbox);\n    } catch (e) {\n      // Could not create sandbox iframe, just use window.xxx\n      DEBUG_BUILD && debug.warn(`Could not create sandbox iframe for ${name} check, bailing to window.${name}: `, e);\n    }\n  }\n\n  // Sanity check: This _should_ not happen, but if it does, we just skip caching...\n  // This can happen e.g. in tests where fetch may not be available in the env, or similar.\n  if (!impl) {\n    return impl;\n  }\n\n  return (cachedImplementations[name] = impl.bind(WINDOW) as CacheableImplementations[T]);\n}\n\n/** Clear a cached implementation. */\nexport function clearCachedImplementation(name: keyof CacheableImplementations): void {\n  cachedImplementations[name] = undefined;\n}\n\n/**\n * A special usecase for incorrectly wrapped Fetch APIs in conjunction with ad-blockers.\n * Whenever someone wraps the Fetch API and returns the wrong promise chain,\n * this chain becomes orphaned and there is no possible way to capture it's rejections\n * other than allowing it bubble up to this very handler. eg.\n *\n * const f = window.fetch;\n * window.fetch = function () {\n *   const p = f.apply(this, arguments);\n *\n *   p.then(function() {\n *     console.log('hi.');\n *   });\n *\n *   return p;\n * }\n *\n * `p.then(function () { ... })` is producing a completely separate promise chain,\n * however, what's returned is `p` - the result of original `fetch` call.\n *\n * This mean, that whenever we use the Fetch API to send our own requests, _and_\n * some ad-blocker blocks it, this orphaned chain will _always_ reject,\n * effectively causing another event to be captured.\n * This makes a whole process become an infinite loop, which we need to somehow\n * deal with, and break it in one way or another.\n *\n * To deal with this issue, we are making sure that we _always_ use the real\n * browser Fetch API, instead of relying on what `window.fetch` exposes.\n * The only downside to this would be missing our own requests as breadcrumbs,\n * but because we are already not doing this, it should be just fine.\n *\n * Possible failed fetch error messages per-browser:\n *\n * Chrome:  Failed to fetch\n * Edge:    Failed to Fetch\n * Firefox: NetworkError when attempting to fetch resource\n * Safari:  resource blocked by content blocker\n */\nexport function fetch(...rest: Parameters<typeof WINDOW.fetch>): ReturnType<typeof WINDOW.fetch> {\n  return getNativeImplementation('fetch')(...rest);\n}\n\n/**\n * Get an unwrapped `setTimeout` method.\n * This ensures that even if e.g. Angular wraps `setTimeout`, we get the native implementation,\n * avoiding triggering change detection.\n */\nexport function setTimeout(...rest: Parameters<typeof WINDOW.setTimeout>): ReturnType<typeof WINDOW.setTimeout> {\n  return getNativeImplementation('setTimeout')(...rest);\n}\n", "import type { HandlerDataXhr, SentryWrappedXMLHttpRequest } from '@sentry/core';\nimport { addHandler, isString, maybeInstrument, timestampInSeconds, triggerHandlers } from '@sentry/core';\nimport { WINDOW } from '../types';\n\nexport const SENTRY_XHR_DATA_KEY = '__sentry_xhr_v3__';\n\ntype WindowWithXhr = Window & { XMLHttpRequest?: typeof XMLHttpRequest };\n\n/**\n * Add an instrumentation handler for when an XHR request happens.\n * The handler function is called once when the request starts and once when it ends,\n * which can be identified by checking if it has an `endTimestamp`.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nexport function addXhrInstrumentationHandler(handler: (data: HandlerDataXhr) => void): void {\n  const type = 'xhr';\n  addHandler(type, handler);\n  maybeInstrument(type, instrumentXHR);\n}\n\n/** Exported only for tests. */\nexport function instrumentXHR(): void {\n  if (!(WINDOW as WindowWithXhr).XMLHttpRequest) {\n    return;\n  }\n\n  const xhrproto = XMLHttpRequest.prototype;\n\n  // eslint-disable-next-line @typescript-eslint/unbound-method\n  xhrproto.open = new Proxy(xhrproto.open, {\n    apply(\n      originalOpen,\n      xhrOpenThisArg: XMLHttpRequest & SentryWrappedXMLHttpRequest,\n      xhrOpenArgArray:\n        | [method: string, url: string | URL]\n        | [method: string, url: string | URL, async: boolean, username?: string | null, password?: string | null],\n    ) {\n      // NOTE: If you are a Sentry user, and you are seeing this stack frame,\n      //       it means the error, that was caused by your XHR call did not\n      //       have a stack trace. If you are using HttpClient integration,\n      //       this is the expected behavior, as we are using this virtual error to capture\n      //       the location of your XHR call, and group your HttpClient events accordingly.\n      const virtualError = new Error();\n\n      const startTimestamp = timestampInSeconds() * 1000;\n\n      // open() should always be called with two or more arguments\n      // But to be on the safe side, we actually validate this and bail out if we don't have a method & url\n      const method = isString(xhrOpenArgArray[0]) ? xhrOpenArgArray[0].toUpperCase() : undefined;\n      const url = parseXhrUrlArg(xhrOpenArgArray[1]);\n\n      if (!method || !url) {\n        return originalOpen.apply(xhrOpenThisArg, xhrOpenArgArray);\n      }\n\n      xhrOpenThisArg[SENTRY_XHR_DATA_KEY] = {\n        method,\n        url,\n        request_headers: {},\n      };\n\n      // if Sentry key appears in URL, don't capture it as a request\n      if (method === 'POST' && url.match(/sentry_key/)) {\n        xhrOpenThisArg.__sentry_own_request__ = true;\n      }\n\n      const onreadystatechangeHandler: () => void = () => {\n        // For whatever reason, this is not the same instance here as from the outer method\n        const xhrInfo = xhrOpenThisArg[SENTRY_XHR_DATA_KEY];\n\n        if (!xhrInfo) {\n          return;\n        }\n\n        if (xhrOpenThisArg.readyState === 4) {\n          try {\n            // touching statusCode in some platforms throws\n            // an exception\n            xhrInfo.status_code = xhrOpenThisArg.status;\n          } catch {\n            /* do nothing */\n          }\n\n          const handlerData: HandlerDataXhr = {\n            endTimestamp: timestampInSeconds() * 1000,\n            startTimestamp,\n            xhr: xhrOpenThisArg,\n            virtualError,\n          };\n          triggerHandlers('xhr', handlerData);\n\n          // In the `addEventListener` branch below, this handler is the only\n          // `readystatechange` listener we add, so detach it once the request is\n          // done to avoid pinning the XMLHttpRequest and its captured\n          // `virtualError` per HTTP call on long-lived pages. In the\n          // `onreadystatechange` proxy branch the handler isn't registered via\n          // `addEventListener`, so this is a harmless no-op there.\n          xhrOpenThisArg.removeEventListener('readystatechange', onreadystatechangeHandler);\n        }\n      };\n\n      if ('onreadystatechange' in xhrOpenThisArg && typeof xhrOpenThisArg.onreadystatechange === 'function') {\n        xhrOpenThisArg.onreadystatechange = new Proxy(xhrOpenThisArg.onreadystatechange, {\n          apply(originalOnreadystatechange, onreadystatechangeThisArg, onreadystatechangeArgArray: unknown[]) {\n            onreadystatechangeHandler();\n            return originalOnreadystatechange.apply(onreadystatechangeThisArg, onreadystatechangeArgArray);\n          },\n        });\n      } else {\n        xhrOpenThisArg.addEventListener('readystatechange', onreadystatechangeHandler);\n      }\n\n      // Intercepting `setRequestHeader` to access the request headers of XHR instance.\n      // This will only work for user/library defined headers, not for the default/browser-assigned headers.\n      // Request cookies are also unavailable for XHR, as `Cookie` header can't be defined by `setRequestHeader`.\n      xhrOpenThisArg.setRequestHeader = new Proxy(xhrOpenThisArg.setRequestHeader, {\n        apply(\n          originalSetRequestHeader,\n          setRequestHeaderThisArg: SentryWrappedXMLHttpRequest,\n          setRequestHeaderArgArray: unknown[],\n        ) {\n          const [header, value] = setRequestHeaderArgArray;\n\n          const xhrInfo = setRequestHeaderThisArg[SENTRY_XHR_DATA_KEY];\n\n          if (xhrInfo && isString(header) && isString(value)) {\n            xhrInfo.request_headers[header.toLowerCase()] = value;\n          }\n\n          return originalSetRequestHeader.apply(setRequestHeaderThisArg, setRequestHeaderArgArray);\n        },\n      });\n\n      return originalOpen.apply(xhrOpenThisArg, xhrOpenArgArray);\n    },\n  });\n\n  // eslint-disable-next-line @typescript-eslint/unbound-method\n  xhrproto.send = new Proxy(xhrproto.send, {\n    apply(originalSend, sendThisArg: XMLHttpRequest & SentryWrappedXMLHttpRequest, sendArgArray: unknown[]) {\n      const sentryXhrData = sendThisArg[SENTRY_XHR_DATA_KEY];\n\n      if (!sentryXhrData) {\n        return originalSend.apply(sendThisArg, sendArgArray);\n      }\n\n      if (sendArgArray[0] !== undefined) {\n        sentryXhrData.body = sendArgArray[0];\n      }\n\n      const handlerData: HandlerDataXhr = {\n        startTimestamp: timestampInSeconds() * 1000,\n        xhr: sendThisArg,\n      };\n      triggerHandlers('xhr', handlerData);\n\n      return originalSend.apply(sendThisArg, sendArgArray);\n    },\n  });\n}\n\n/**\n * Parses the URL argument of a XHR method to a string.\n *\n * See: https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/open#url\n * url: A string or any other object with a stringifier — including a URL object — that provides the URL of the resource to send the request to.\n *\n * @param url - The URL argument of an XHR method\n * @returns The parsed URL string or undefined if the URL is invalid\n */\nfunction parseXhrUrlArg(url: unknown): string | undefined {\n  if (isString(url)) {\n    return url;\n  }\n\n  try {\n    // If the passed in argument is not a string, it should have a `toString` method as a stringifier.\n    // If that fails, we just return undefined (like in IE11 where URL is not available)\n    return (url as URL).toString();\n  } catch {} // eslint-disable-line no-empty\n\n  return undefined;\n}\n", "import { debug } from '@sentry/core';\nimport { DEBUG_BUILD } from './debug-build';\nimport type { NetworkMetaWarning } from './types';\n\n// Symbol used by e.g. the Replay integration to store original body on Request objects\nexport const ORIGINAL_REQ_BODY = Symbol.for('sentry__originalRequestBody');\n\n/**\n * Serializes FormData.\n *\n * This is a bit simplified, but gives us a decent estimate.\n * This converts e.g. { name: 'Anne Smith', age: 13 } to 'name=Anne+Smith&age=13'.\n *\n */\nexport function serializeFormData(formData: FormData): string {\n  // @ts-expect-error passing FormData to URLSearchParams actually works\n  return new URLSearchParams(formData).toString();\n}\n\n/** Get the string representation of a body. */\nexport function getBodyString(body: unknown, _debug: typeof debug = debug): [string | undefined, NetworkMetaWarning?] {\n  try {\n    if (typeof body === 'string') {\n      return [body];\n    }\n\n    if (body instanceof URLSearchParams) {\n      return [body.toString()];\n    }\n\n    if (body instanceof FormData) {\n      return [serializeFormData(body)];\n    }\n\n    if (!body) {\n      return [undefined];\n    }\n  } catch (error) {\n    DEBUG_BUILD && _debug.error(error, 'Failed to serialize body', body);\n    return [undefined, 'BODY_PARSE_ERROR'];\n  }\n\n  DEBUG_BUILD && _debug.log('Skipping network body because of body type', body);\n\n  return [undefined, 'UNPARSEABLE_BODY_TYPE'];\n}\n\n/**\n * Parses the fetch arguments to extract the request payload.\n *\n * In case of a Request object, this function attempts to retrieve the original body by looking for a Sentry-patched symbol.\n */\nexport function getFetchRequestArgBody(fetchArgs: unknown[] = []): RequestInit['body'] | undefined {\n  // Second argument with body options takes precedence\n  if (fetchArgs.length >= 2 && fetchArgs[1] && typeof fetchArgs[1] === 'object' && 'body' in fetchArgs[1]) {\n    return (fetchArgs[1] as RequestInit).body;\n  }\n\n  if (fetchArgs.length >= 1 && fetchArgs[0] instanceof Request) {\n    const request = fetchArgs[0];\n    /* The Request interface's body is a ReadableStream, which we cannot directly access.\n       Some integrations (e.g. Replay) patch the Request object to store the original body. */\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access\n    const originalBody = (request as any)[ORIGINAL_REQ_BODY];\n    if (originalBody !== undefined) {\n      return originalBody;\n    }\n\n    return undefined; // Fall back to returning undefined (as we don't want to return a ReadableStream)\n  }\n\n  return undefined;\n}\n\n/**\n * Parses XMLHttpRequest response headers into a Record.\n * Extracted from replay internals to be reusable.\n */\nexport function parseXhrResponseHeaders(xhr: XMLHttpRequest): Record<string, string> {\n  let headers: string | undefined;\n  try {\n    headers = xhr.getAllResponseHeaders();\n  } catch (error) {\n    DEBUG_BUILD && debug.error(error, 'Failed to get xhr response headers', xhr);\n    return {};\n  }\n\n  if (!headers) {\n    return {};\n  }\n\n  return headers.split('\\r\\n').reduce((acc: Record<string, string>, line: string) => {\n    const [key, value] = line.split(': ') as [string, string | undefined];\n    if (value) {\n      acc[key.toLowerCase()] = value;\n    }\n    return acc;\n  }, {});\n}\n", "/**\n * Checks whether given value's type is an Element instance.\n *\n * Returns false if `Element` is not available in the current runtime.\n */\nexport function isElement(wat: unknown): boolean {\n  if (typeof Element === 'undefined') {\n    return false;\n  }\n  try {\n    return wat instanceof Element;\n  } catch {\n    return false;\n  }\n}\n", "import { WINDOW } from '../types';\n\n/**\n *\n * @param urlOrPath - The URL or path to convert to an absolute URL.\n *\n * @return the absolute URL when handed a relative URL path, by\n * combining the current `window.location.origin` with param urlOrPath.\n *\n * If param urlOrPath is already a full or an invalid URL,\n * or URL determination fails, the original param urlOrPath is returned unchanged.\n *\n */\nexport function getAbsoluteUrl(urlOrPath: string): string {\n  try {\n    const url = new URL(urlOrPath, WINDOW.location.origin);\n    return url.toString();\n  } catch {\n    // fallback, just do nothing\n    return urlOrPath;\n  }\n}\n", "import type { Transport, TransportMakeRequestResponse, TransportRequest } from '@sentry/core/browser';\nimport { createTransport, makePromiseBuffer } from '@sentry/core/browser';\nimport { clearCachedImplementation, getNativeImplementation } from '@sentry/browser-utils';\nimport type { WINDOW } from '../helpers';\nimport type { BrowserTransportOptions } from './types';\n\nconst DEFAULT_BROWSER_TRANSPORT_BUFFER_SIZE = 40;\n\n/**\n * Creates a Transport that uses the Fetch API to send events to Sentry.\n */\nexport function makeFetchTransport(\n  options: BrowserTransportOptions,\n  nativeFetch: typeof WINDOW.fetch = getNativeImplementation('fetch'),\n): Transport {\n  let pendingBodySize = 0;\n  let pendingCount = 0;\n\n  async function makeRequest(request: TransportRequest): Promise<TransportMakeRequestResponse> {\n    const requestSize = request.body.length;\n    pendingBodySize += requestSize;\n    pendingCount++;\n\n    const requestOptions: RequestInit = {\n      body: request.body,\n      method: 'POST',\n      referrerPolicy: 'strict-origin',\n      headers: options.headers,\n      // Outgoing requests are usually cancelled when navigating to a different page, causing a \"TypeError: Failed to\n      // fetch\" error and sending a \"network_error\" client-outcome - in Chrome, the request status shows \"(cancelled)\".\n      // The `keepalive` flag keeps outgoing requests alive, even when switching pages. We want this since we're\n      // frequently sending events right before the user is switching pages (eg. when finishing navigation transactions).\n      // Gotchas:\n      // - `keepalive` isn't supported by Firefox\n      // - As per spec (https://fetch.spec.whatwg.org/#http-network-or-cache-fetch):\n      //   If the sum of contentLength and inflightKeepaliveBytes is greater than 64 kibibytes, then return a network error.\n      //   We will therefore only activate the flag when we're below that limit.\n      // There is also a limit of requests that can be open at the same time, so we also limit this to 15\n      // See https://github.com/getsentry/sentry-javascript/pull/7553 for details\n      keepalive: pendingBodySize <= 60_000 && pendingCount < 15,\n      ...options.fetchOptions,\n    };\n\n    try {\n      // Note: We do not need to suppress tracing here, because we are using the native fetch, instead of our wrapped one.\n      const response = await nativeFetch(options.url, requestOptions);\n\n      return {\n        statusCode: response.status,\n        headers: {\n          'x-sentry-rate-limits': response.headers.get('X-Sentry-Rate-Limits'),\n          'retry-after': response.headers.get('Retry-After'),\n        },\n      };\n    } catch (e) {\n      clearCachedImplementation('fetch');\n      throw e;\n    } finally {\n      pendingBodySize -= requestSize;\n      pendingCount--;\n    }\n  }\n\n  return createTransport(\n    options,\n    makeRequest,\n    makePromiseBuffer(options.bufferSize || DEFAULT_BROWSER_TRANSPORT_BUFFER_SIZE),\n  );\n}\n", "declare const __DEBUG_BUILD__: boolean;\n\n/**\n * This serves as a build time flag that will be true by default, but false in non-debug builds or if users replace `__SENTRY_DEBUG__` in their generated code.\n *\n * ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking.\n */\nexport const DEBUG_BUILD = __DEBUG_BUILD__;\n", "import type { Profiler } from '@sentry/core/browser';\nimport { debug, getClient } from '@sentry/core/browser';\nimport { DEBUG_BUILD } from '../debug-build';\n\n/**\n * Starts the Sentry UI profiler.\n * This mode is exclusive with the transaction profiler and will only work if the profilesSampleRate is set to a falsy value.\n * In UI profiling mode, the profiler will keep reporting profile chunks to Sentry until it is stopped, which allows for continuous profiling of the application.\n */\nfunction startProfiler(): void {\n  const client = getClient();\n  if (!client) {\n    DEBUG_BUILD && debug.warn('No Sentry client available, profiling is not started');\n    return;\n  }\n\n  const integration = client.getIntegrationByName('BrowserProfiling');\n\n  if (!integration) {\n    DEBUG_BUILD && debug.warn('BrowserProfiling integration is not available');\n    return;\n  }\n\n  client.emit('startUIProfiler');\n}\n\n/**\n * Stops the Sentry UI profiler.\n * Calls to stop will stop the profiler and flush the currently collected profile data to Sentry.\n */\nfunction stopProfiler(): void {\n  const client = getClient();\n  if (!client) {\n    DEBUG_BUILD && debug.warn('No Sentry client available, profiling is not started');\n    return;\n  }\n\n  const integration = client.getIntegrationByName('BrowserProfiling');\n  if (!integration) {\n    DEBUG_BUILD && debug.warn('ProfilingIntegration is not available');\n    return;\n  }\n\n  client.emit('stopUIProfiler');\n}\n\n/**\n * Profiler namespace for controlling the JS profiler in 'manual' mode.\n *\n * Requires the `browserProfilingIntegration` from the `@sentry/browser` package.\n */\nexport const uiProfiler: Profiler = {\n  startProfiler,\n  stopProfiler,\n};\n", "// This was originally forked from https://github.com/csnover/TraceKit, and was largely\n// re - written as part of raven - js.\n//\n// This code was later copied to the JavaScript mono - repo and further modified and\n// refactored over the years.\n\n// Copyright (c) 2013 Onur Can Cakmak onur.cakmak@gmail.com and all TraceKit contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy of this\n// software and associated documentation files(the 'Software'), to deal in the Software\n// without restriction, including without limitation the rights to use, copy, modify,\n// merge, publish, distribute, sublicense, and / or sell copies of the Software, and to\n// permit persons to whom the Software is furnished to do so, subject to the following\n// conditions:\n//\n// The above copyright notice and this permission notice shall be included in all copies\n// or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\n// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\n// PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n// CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE\n// OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nimport type { StackFrame, StackLineParser, StackLineParserFn } from '@sentry/core/browser';\nimport { createStackParser, UNKNOWN_FUNCTION } from '@sentry/core/browser';\n\nconst OPERA10_PRIORITY = 10;\nconst OPERA11_PRIORITY = 20;\nconst CHROME_PRIORITY = 30;\nconst WINJS_PRIORITY = 40;\nconst GECKO_PRIORITY = 50;\n\nfunction createFrame(filename: string, func: string, lineno?: number, colno?: number): StackFrame {\n  const frame: StackFrame = {\n    filename,\n    function: func === '<anonymous>' ? UNKNOWN_FUNCTION : func,\n    in_app: true, // All browser frames are considered in_app\n  };\n\n  if (lineno !== undefined) {\n    frame.lineno = lineno;\n  }\n\n  if (colno !== undefined) {\n    frame.colno = colno;\n  }\n\n  return frame;\n}\n\n// This regex matches frames that have no function name (ie. are at the top level of a module).\n// For example \"at http://localhost:5000//script.js:1:126\"\n// Frames _with_ function names usually look as follows: \"at commitLayoutEffects (react-dom.development.js:23426:1)\"\nconst chromeRegexNoFnName = /^\\s*at (\\S+?)(?::(\\d+))(?::(\\d+))\\s*$/i;\n\n// This regex matches all the frames that have a function name.\nconst chromeRegex =\n  /^\\s*at (?:(.+?\\)(?: \\[.+\\])?|.*?) ?\\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\\/)?.*?)(?::(\\d+))?(?::(\\d+))?\\)?\\s*$/i;\n\nconst chromeEvalRegex = /\\((\\S*)(?::(\\d+))(?::(\\d+))\\)/;\n\n// Matches stack frames with data URIs instead of filename so we can still get the function name\n// Example: \"at dynamicFn (data:application/javascript,export function dynamicFn() {...\"\nconst chromeDataUriRegex = /at (.+?) ?\\(data:(.+?),/;\n\n// Chromium based browsers: Chrome, Brave, new Opera, new Edge\n// We cannot call this variable `chrome` because it can conflict with global `chrome` variable in certain environments\n// See: https://github.com/getsentry/sentry-javascript/issues/6880\nconst chromeStackParserFn: StackLineParserFn = line => {\n  const dataUriMatch = line.match(chromeDataUriRegex);\n  if (dataUriMatch) {\n    return {\n      filename: `<data:${dataUriMatch[2]}>`,\n      function: dataUriMatch[1],\n    };\n  }\n\n  // If the stack line has no function name, we need to parse it differently\n  const noFnParts = chromeRegexNoFnName.exec(line) as null | [string, string, string, string];\n\n  if (noFnParts) {\n    const [, filename, line, col] = noFnParts;\n    return createFrame(filename, UNKNOWN_FUNCTION, +line, +col);\n  }\n\n  const parts = chromeRegex.exec(line) as null | [string, string, string, string, string];\n\n  if (parts) {\n    const isEval = parts[2]?.indexOf('eval') === 0; // start of line\n\n    if (isEval) {\n      const subMatch = chromeEvalRegex.exec(parts[2]) as null | [string, string, string, string];\n\n      if (subMatch) {\n        // throw out eval line/column and use top-most line/column number\n        parts[2] = subMatch[1]; // url\n        parts[3] = subMatch[2]; // line\n        parts[4] = subMatch[3]; // column\n      }\n    }\n\n    // Kamil: One more hack won't hurt us right? Understanding and adding more rules on top of these regexps right now\n    // would be way too time consuming. (TODO: Rewrite whole RegExp to be more readable)\n    const [func, filename] = extractSafariExtensionDetails(parts[1] || UNKNOWN_FUNCTION, parts[2]);\n\n    return createFrame(filename, func, parts[3] ? +parts[3] : undefined, parts[4] ? +parts[4] : undefined);\n  }\n\n  return;\n};\n\nexport const chromeStackLineParser: StackLineParser = [CHROME_PRIORITY, chromeStackParserFn];\n\n// gecko regex: `(?:bundle|\\d+\\.js)`: `bundle` is for react native, `\\d+\\.js` also but specifically for ram bundles because it\n// generates filenames without a prefix like `file://` the filenames in the stacktrace are just 42.js\n// We need this specific case for now because we want no other regex to match.\nconst geckoREgex =\n  /^\\s*(.*?)(?:\\((.*?)\\))?(?:^|@)?((?:[-a-z]+)?:\\/.*?|\\[native code\\]|[^@]*(?:bundle|\\d+\\.js)|\\/[\\w\\-. /=]+)(?::(\\d+))?(?::(\\d+))?\\s*$/i;\nconst geckoEvalRegex = /(\\S+) line (\\d+)(?: > eval line \\d+)* > eval/i;\n\nconst gecko: StackLineParserFn = line => {\n  const parts = geckoREgex.exec(line) as null | [string, string, string, string, string, string];\n\n  if (parts) {\n    const isEval = parts[3] && parts[3].indexOf(' > eval') > -1;\n    if (isEval) {\n      const subMatch = geckoEvalRegex.exec(parts[3]) as null | [string, string, string];\n\n      if (subMatch) {\n        // throw out eval line/column and use top-most line number\n        parts[1] = parts[1] || 'eval';\n        parts[3] = subMatch[1];\n        parts[4] = subMatch[2];\n        parts[5] = ''; // no column when eval\n      }\n    }\n\n    let filename = parts[3];\n    let func = parts[1] || UNKNOWN_FUNCTION;\n    [func, filename] = extractSafariExtensionDetails(func, filename);\n\n    return createFrame(filename, func, parts[4] ? +parts[4] : undefined, parts[5] ? +parts[5] : undefined);\n  }\n\n  return;\n};\n\nexport const geckoStackLineParser: StackLineParser = [GECKO_PRIORITY, gecko];\n\nconst winjsRegex = /^\\s*at (?:((?:\\[object object\\])?.+) )?\\(?((?:[-a-z]+):.*?):(\\d+)(?::(\\d+))?\\)?\\s*$/i;\n\nconst winjs: StackLineParserFn = line => {\n  const parts = winjsRegex.exec(line) as null | [string, string, string, string, string];\n\n  return parts\n    ? createFrame(parts[2], parts[1] || UNKNOWN_FUNCTION, +parts[3], parts[4] ? +parts[4] : undefined)\n    : undefined;\n};\n\nexport const winjsStackLineParser: StackLineParser = [WINJS_PRIORITY, winjs];\n\nconst opera10Regex = / line (\\d+).*script (?:in )?(\\S+)(?:: in function (\\S+))?$/i;\n\nconst opera10: StackLineParserFn = line => {\n  const parts = opera10Regex.exec(line) as null | [string, string, string, string];\n  return parts ? createFrame(parts[2], parts[3] || UNKNOWN_FUNCTION, +parts[1]) : undefined;\n};\n\nexport const opera10StackLineParser: StackLineParser = [OPERA10_PRIORITY, opera10];\n\nconst opera11Regex =\n  / line (\\d+), column (\\d+)\\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\\(.*\\))? in (.*):\\s*$/i;\n\nconst opera11: StackLineParserFn = line => {\n  const parts = opera11Regex.exec(line) as null | [string, string, string, string, string, string];\n  return parts ? createFrame(parts[5], parts[3] || parts[4] || UNKNOWN_FUNCTION, +parts[1], +parts[2]) : undefined;\n};\n\nexport const opera11StackLineParser: StackLineParser = [OPERA11_PRIORITY, opera11];\n\nexport const defaultStackLineParsers = [chromeStackLineParser, geckoStackLineParser];\n\nexport const defaultStackParser = createStackParser(...defaultStackLineParsers);\n\n/**\n * Safari web extensions, starting version unknown, can produce \"frames-only\" stacktraces.\n * What it means, is that instead of format like:\n *\n * Error: wat\n *   at function@url:row:col\n *   at function@url:row:col\n *   at function@url:row:col\n *\n * it produces something like:\n *\n *   function@url:row:col\n *   function@url:row:col\n *   function@url:row:col\n *\n * Because of that, it won't be captured by `chrome` RegExp and will fall into `Gecko` branch.\n * This function is extracted so that we can use it in both places without duplicating the logic.\n * Unfortunately \"just\" changing RegExp is too complicated now and making it pass all tests\n * and fix this case seems like an impossible, or at least way too time-consuming task.\n */\nconst extractSafariExtensionDetails = (func: string, filename: string): [string, string] => {\n  const isSafariExtension = func.indexOf('safari-extension') !== -1;\n  const isSafariWebExtension = func.indexOf('safari-web-extension') !== -1;\n\n  return isSafariExtension || isSafariWebExtension\n    ? [\n        func.indexOf('@') !== -1 ? (func.split('@')[0] as string) : UNKNOWN_FUNCTION,\n        isSafariExtension ? `safari-extension:${filename}` : `safari-web-extension:${filename}`,\n      ]\n    : [func, filename];\n};\n", "import type { DsnComponents, EventEnvelope, SdkMetadata, UserFeedback, UserFeedbackItem } from '@sentry/core/browser';\nimport { createEnvelope, dsnToString } from '@sentry/core/browser';\n\n/**\n * Creates an envelope from a user feedback.\n */\nexport function createUserFeedbackEnvelope(\n  feedback: UserFeedback,\n  {\n    metadata,\n    tunnel,\n    dsn,\n  }: {\n    metadata: SdkMetadata | undefined;\n    tunnel: string | undefined;\n    dsn: DsnComponents | undefined;\n  },\n): EventEnvelope {\n  const headers: EventEnvelope[0] = {\n    event_id: feedback.event_id,\n    sent_at: new Date().toISOString(),\n    ...(metadata?.sdk && {\n      sdk: {\n        name: metadata.sdk.name,\n        version: metadata.sdk.version,\n      },\n    }),\n    ...(!!tunnel && !!dsn && { dsn: dsnToString(dsn) }),\n  };\n  const item = createUserFeedbackEnvelopeItem(feedback);\n\n  return createEnvelope(headers, [item]);\n}\n\nfunction createUserFeedbackEnvelopeItem(feedback: UserFeedback): UserFeedbackItem {\n  const feedbackHeaders: UserFeedbackItem[0] = {\n    type: 'user_report',\n  };\n  return [feedbackHeaders, feedback];\n}\n", "/* eslint-disable max-lines */\n\nimport type {\n  Breadcrumb,\n  Client,\n  Event as SentryEvent,\n  FetchBreadcrumbData,\n  FetchBreadcrumbHint,\n  HandlerDataConsole,\n  HandlerDataDom,\n  HandlerDataFetch,\n  HandlerDataHistory,\n  HandlerDataXhr,\n  IntegrationFn,\n  XhrBreadcrumbData,\n  XhrBreadcrumbHint,\n} from '@sentry/core/browser';\nimport {\n  addBreadcrumb,\n  addConsoleInstrumentationHandler,\n  addFetchInstrumentationHandler,\n  debug,\n  defineIntegration,\n  getBreadcrumbLogLevelFromHttpStatusCode,\n  getClient,\n  getComponentName,\n  getEventDescription,\n  parseUrl,\n  safeJoin,\n  severityLevelFromString,\n} from '@sentry/core/browser';\nimport type { FetchHint, XhrHint } from '@sentry/browser-utils';\nimport {\n  addClickKeypressInstrumentationHandler,\n  addHistoryInstrumentationHandler,\n  addXhrInstrumentationHandler,\n  htmlTreeAsString,\n  SENTRY_XHR_DATA_KEY,\n} from '@sentry/browser-utils';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { WINDOW } from '../helpers';\n\ninterface BreadcrumbsOptions {\n  console: boolean;\n  dom:\n    | boolean\n    | {\n        serializeAttribute?: string | string[];\n        maxStringLength?: number;\n      };\n  fetch: boolean;\n  history: boolean;\n  sentry: boolean;\n  xhr: boolean;\n}\n\n/** maxStringLength gets capped to prevent 100 breadcrumbs exceeding 1MB event payload size */\nconst MAX_ALLOWED_STRING_LENGTH = 1024;\n\nconst INTEGRATION_NAME = 'Breadcrumbs' as const;\n\nconst _breadcrumbsIntegration = ((options: Partial<BreadcrumbsOptions> = {}) => {\n  const _options = {\n    console: true,\n    dom: true,\n    fetch: true,\n    history: true,\n    sentry: true,\n    xhr: true,\n    ...options,\n  };\n\n  return {\n    name: INTEGRATION_NAME,\n    setup(client) {\n      // TODO(v11): Remove this functionality and use `consoleIntegration` from @sentry/core instead.\n      if (_options.console) {\n        addConsoleInstrumentationHandler(_getConsoleBreadcrumbHandler(client));\n      }\n      if (_options.dom) {\n        addClickKeypressInstrumentationHandler(_getDomBreadcrumbHandler(client, _options.dom));\n      }\n      if (_options.xhr) {\n        addXhrInstrumentationHandler(_getXhrBreadcrumbHandler(client));\n      }\n      if (_options.fetch) {\n        addFetchInstrumentationHandler(_getFetchBreadcrumbHandler(client));\n      }\n      if (_options.history) {\n        addHistoryInstrumentationHandler(_getHistoryBreadcrumbHandler(client));\n      }\n      if (_options.sentry) {\n        client.on('beforeSendEvent', _getSentryBreadcrumbHandler(client));\n      }\n    },\n  };\n}) satisfies IntegrationFn;\n\nexport const breadcrumbsIntegration = defineIntegration(_breadcrumbsIntegration);\n\n/**\n * Adds a breadcrumb for Sentry events or transactions if this option is enabled.\n */\nfunction _getSentryBreadcrumbHandler(client: Client): (event: SentryEvent) => void {\n  return function addSentryBreadcrumb(event: SentryEvent): void {\n    if (getClient() !== client) {\n      return;\n    }\n\n    addBreadcrumb(\n      {\n        category: `sentry.${event.type === 'transaction' ? 'transaction' : 'event'}`,\n        event_id: event.event_id,\n        level: event.level,\n        message: getEventDescription(event),\n      },\n      {\n        event,\n      },\n    );\n  };\n}\n\n/**\n * A HOC that creates a function that creates breadcrumbs from DOM API calls.\n * This is a HOC so that we get access to dom options in the closure.\n */\nfunction _getDomBreadcrumbHandler(\n  client: Client,\n  dom: BreadcrumbsOptions['dom'],\n): (handlerData: HandlerDataDom) => void {\n  return function _innerDomBreadcrumb(handlerData: HandlerDataDom): void {\n    if (getClient() !== client) {\n      return;\n    }\n\n    let target;\n    let componentName;\n    let keyAttrs = typeof dom === 'object' ? dom.serializeAttribute : undefined;\n\n    let maxStringLength =\n      typeof dom === 'object' && typeof dom.maxStringLength === 'number' ? dom.maxStringLength : undefined;\n    if (maxStringLength && maxStringLength > MAX_ALLOWED_STRING_LENGTH) {\n      DEBUG_BUILD &&\n        debug.warn(\n          `\\`dom.maxStringLength\\` cannot exceed ${MAX_ALLOWED_STRING_LENGTH}, but a value of ${maxStringLength} was configured. Sentry will use ${MAX_ALLOWED_STRING_LENGTH} instead.`,\n        );\n      maxStringLength = MAX_ALLOWED_STRING_LENGTH;\n    }\n\n    if (typeof keyAttrs === 'string') {\n      keyAttrs = [keyAttrs];\n    }\n\n    // Accessing event.target can throw (see getsentry/raven-js#838, #768)\n    try {\n      const event = handlerData.event as Event | Node;\n      const element = _isEvent(event) ? event.target : event;\n\n      target = htmlTreeAsString(element, { keyAttrs, maxStringLength });\n      componentName = getComponentName(element);\n    } catch {\n      target = '<unknown>';\n    }\n\n    if (target.length === 0) {\n      return;\n    }\n\n    const breadcrumb: Breadcrumb = {\n      category: `ui.${handlerData.name}`,\n      message: target,\n    };\n\n    if (componentName) {\n      breadcrumb.data = { 'ui.component_name': componentName };\n    }\n\n    addBreadcrumb(breadcrumb, {\n      event: handlerData.event,\n      name: handlerData.name,\n      global: handlerData.global,\n    });\n  };\n}\n\n/**\n * Creates breadcrumbs from console API calls\n */\nfunction _getConsoleBreadcrumbHandler(client: Client): (handlerData: HandlerDataConsole) => void {\n  return function _consoleBreadcrumb(handlerData: HandlerDataConsole): void {\n    if (getClient() !== client) {\n      return;\n    }\n\n    const breadcrumb = {\n      category: 'console',\n      data: {\n        arguments: handlerData.args,\n        logger: 'console',\n      },\n      level: severityLevelFromString(handlerData.level),\n      message: safeJoin(handlerData.args, ' '),\n    };\n\n    if (handlerData.level === 'assert') {\n      if (handlerData.args[0] === false) {\n        breadcrumb.message = `Assertion failed: ${safeJoin(handlerData.args.slice(1), ' ') || 'console.assert'}`;\n        breadcrumb.data.arguments = handlerData.args.slice(1);\n      } else {\n        // Don't capture a breadcrumb for passed assertions\n        return;\n      }\n    }\n\n    addBreadcrumb(breadcrumb, {\n      input: handlerData.args,\n      level: handlerData.level,\n    });\n  };\n}\n\n/**\n * Creates breadcrumbs from XHR API calls\n */\nfunction _getXhrBreadcrumbHandler(client: Client): (handlerData: HandlerDataXhr) => void {\n  return function _xhrBreadcrumb(handlerData: HandlerDataXhr): void {\n    if (getClient() !== client) {\n      return;\n    }\n\n    const { startTimestamp, endTimestamp } = handlerData;\n\n    const sentryXhrData = handlerData.xhr[SENTRY_XHR_DATA_KEY];\n\n    // We only capture complete, non-sentry requests\n    if (!startTimestamp || !endTimestamp || !sentryXhrData) {\n      return;\n    }\n\n    const { method, url, status_code, body } = sentryXhrData;\n\n    const data: XhrBreadcrumbData = {\n      method,\n      url,\n      status_code,\n    };\n\n    const hint: XhrBreadcrumbHint = {\n      xhr: handlerData.xhr,\n      input: body,\n      startTimestamp,\n      endTimestamp,\n    };\n\n    const breadcrumb = {\n      category: 'xhr',\n      data,\n      type: 'http',\n      level: getBreadcrumbLogLevelFromHttpStatusCode(status_code),\n    };\n\n    client.emit('beforeOutgoingRequestBreadcrumb', breadcrumb, hint as XhrHint);\n\n    addBreadcrumb(breadcrumb, hint);\n  };\n}\n\n/**\n * Creates breadcrumbs from fetch API calls\n */\nfunction _getFetchBreadcrumbHandler(client: Client): (handlerData: HandlerDataFetch) => void {\n  return function _fetchBreadcrumb(handlerData: HandlerDataFetch): void {\n    if (getClient() !== client) {\n      return;\n    }\n\n    const { startTimestamp, endTimestamp } = handlerData;\n\n    // We only capture complete fetch requests\n    if (!endTimestamp) {\n      return;\n    }\n\n    if (handlerData.fetchData.url.match(/sentry_key/) && handlerData.fetchData.method === 'POST') {\n      // We will not create breadcrumbs for fetch requests that contain `sentry_key` (internal sentry requests)\n      return;\n    }\n\n    if (handlerData.error) {\n      const hint: FetchBreadcrumbHint = {\n        data: handlerData.error,\n        input: handlerData.args,\n        startTimestamp,\n        endTimestamp,\n      };\n\n      const breadcrumb = {\n        category: 'fetch',\n        data: handlerData.fetchData,\n        level: 'error',\n        type: 'http',\n      } satisfies Breadcrumb;\n\n      client.emit('beforeOutgoingRequestBreadcrumb', breadcrumb, hint as FetchHint);\n\n      addBreadcrumb(breadcrumb, hint);\n    } else {\n      const response = handlerData.response as Response | undefined;\n      const data: FetchBreadcrumbData = {\n        ...handlerData.fetchData,\n        status_code: response?.status,\n      };\n\n      const hint: FetchBreadcrumbHint = {\n        input: handlerData.args,\n        response,\n        startTimestamp,\n        endTimestamp,\n      };\n\n      const breadcrumb = {\n        category: 'fetch',\n        data,\n        type: 'http',\n        level: getBreadcrumbLogLevelFromHttpStatusCode(data.status_code),\n      };\n\n      client.emit('beforeOutgoingRequestBreadcrumb', breadcrumb, hint as FetchHint);\n\n      addBreadcrumb(breadcrumb, hint);\n    }\n  };\n}\n\n/**\n * Creates breadcrumbs from history API calls\n */\nfunction _getHistoryBreadcrumbHandler(client: Client): (handlerData: HandlerDataHistory) => void {\n  return function _historyBreadcrumb(handlerData: HandlerDataHistory): void {\n    if (getClient() !== client) {\n      return;\n    }\n\n    let from: string | undefined = handlerData.from;\n    let to: string | undefined = handlerData.to;\n    const parsedLoc = parseUrl(WINDOW.location.href);\n    let parsedFrom = from ? parseUrl(from) : undefined;\n    const parsedTo = parseUrl(to);\n\n    // Initial pushState doesn't provide `from` information\n    if (!parsedFrom?.path) {\n      parsedFrom = parsedLoc;\n    }\n\n    // Use only the path component of the URL if the URL matches the current\n    // document (almost all the time when using pushState)\n    if (parsedLoc.protocol === parsedTo.protocol && parsedLoc.host === parsedTo.host) {\n      to = parsedTo.relative;\n    }\n    if (parsedLoc.protocol === parsedFrom.protocol && parsedLoc.host === parsedFrom.host) {\n      from = parsedFrom.relative;\n    }\n\n    addBreadcrumb({\n      category: 'navigation',\n      data: {\n        from,\n        to,\n      },\n    });\n  };\n}\n\nfunction _isEvent(event: unknown): event is Event {\n  return !!event && !!(event as Record<string, unknown>).target;\n}\n", "import type { IntegrationFn, WrappedFunction } from '@sentry/core/browser';\nimport { defineIntegration, fill, getFunctionName, getOriginalFunction } from '@sentry/core/browser';\nimport { WINDOW, wrap } from '../helpers';\n\n// Using a comma-separated string and split for smaller bundle size vs an array literal\nconst DEFAULT_EVENT_TARGET =\n  'EventTarget,Window,Node,ApplicationCache,AudioTrackList,BroadcastChannel,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,SharedWorker,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload'.split(\n    ',',\n  );\n\nconst INTEGRATION_NAME = 'BrowserApiErrors' as const;\n\ntype XMLHttpRequestProp = 'onload' | 'onerror' | 'onprogress' | 'onreadystatechange';\n\ninterface BrowserApiErrorsOptions {\n  setTimeout: boolean;\n  setInterval: boolean;\n  requestAnimationFrame: boolean;\n  XMLHttpRequest: boolean;\n  eventTarget: boolean | string[];\n\n  /**\n   * If you experience issues with this integration causing double-invocations of event listeners,\n   * try setting this option to `true`. It will unregister the original callbacks from the event targets\n   * before adding the instrumented callback.\n   *\n   * @default false\n   */\n  unregisterOriginalCallbacks: boolean;\n}\n\nconst _browserApiErrorsIntegration = ((options: Partial<BrowserApiErrorsOptions> = {}) => {\n  const _options = {\n    XMLHttpRequest: true,\n    eventTarget: true,\n    requestAnimationFrame: true,\n    setInterval: true,\n    setTimeout: true,\n    unregisterOriginalCallbacks: false,\n    ...options,\n  };\n\n  return {\n    name: INTEGRATION_NAME,\n    // TODO: This currently only works for the first client this is setup\n    // We may want to adjust this to check for client etc.\n    setupOnce() {\n      if (_options.setTimeout) {\n        fill(WINDOW, 'setTimeout', _wrapTimeFunction);\n      }\n\n      if (_options.setInterval) {\n        fill(WINDOW, 'setInterval', _wrapTimeFunction);\n      }\n\n      if (_options.requestAnimationFrame) {\n        fill(WINDOW, 'requestAnimationFrame', _wrapRAF);\n      }\n\n      if (_options.XMLHttpRequest && 'XMLHttpRequest' in WINDOW) {\n        fill(XMLHttpRequest.prototype, 'send', _wrapXHR);\n      }\n\n      const eventTargetOption = _options.eventTarget;\n      if (eventTargetOption) {\n        const eventTarget = Array.isArray(eventTargetOption) ? eventTargetOption : DEFAULT_EVENT_TARGET;\n        eventTarget.forEach(target => _wrapEventTarget(target, _options));\n      }\n    },\n  };\n}) satisfies IntegrationFn;\n\n/**\n * Wrap timer functions and event targets to catch errors and provide better meta data.\n */\nexport const browserApiErrorsIntegration = defineIntegration(_browserApiErrorsIntegration);\n\nfunction _wrapTimeFunction(original: () => void): () => number {\n  return function (this: unknown, ...args: unknown[]): number {\n    const originalCallback = args[0];\n    args[0] = wrap(originalCallback, {\n      mechanism: {\n        handled: false,\n        type: `auto.browser.browserapierrors.${getFunctionName(original)}`,\n      },\n    });\n    return original.apply(this, args);\n  };\n}\n\nfunction _wrapRAF(original: () => void): (callback: () => void) => unknown {\n  return function (this: unknown, callback: () => void): () => void {\n    return original.apply(this, [\n      wrap(callback, {\n        mechanism: {\n          data: {\n            handler: getFunctionName(original),\n          },\n          handled: false,\n          type: 'auto.browser.browserapierrors.requestAnimationFrame',\n        },\n      }),\n    ]);\n  };\n}\n\nfunction _wrapXHR(originalSend: () => void): () => void {\n  return function (this: XMLHttpRequest, ...args: unknown[]): void {\n    // eslint-disable-next-line @typescript-eslint/no-this-alias\n    const xhr = this;\n    const xmlHttpRequestProps: XMLHttpRequestProp[] = ['onload', 'onerror', 'onprogress', 'onreadystatechange'];\n\n    xmlHttpRequestProps.forEach(prop => {\n      if (prop in xhr && typeof xhr[prop] === 'function') {\n        fill(xhr, prop, function (original) {\n          const wrapOptions = {\n            mechanism: {\n              data: {\n                handler: getFunctionName(original),\n              },\n              handled: false,\n              type: `auto.browser.browserapierrors.xhr.${prop}`,\n            },\n          };\n\n          // If Instrument integration has been called before BrowserApiErrors, get the name of original function\n          const originalFunction = getOriginalFunction(original);\n          if (originalFunction) {\n            wrapOptions.mechanism.data.handler = getFunctionName(originalFunction);\n          }\n\n          // Otherwise wrap directly\n          return wrap(original, wrapOptions);\n        });\n      }\n    });\n\n    return originalSend.apply(this, args);\n  };\n}\n\nfunction _wrapEventTarget(target: string, integrationOptions: BrowserApiErrorsOptions): void {\n  const globalObject = WINDOW as unknown as Record<string, { prototype?: object }>;\n  const proto = globalObject[target]?.prototype;\n\n  // eslint-disable-next-line no-prototype-builtins\n  if (!proto?.hasOwnProperty?.('addEventListener')) {\n    return;\n  }\n\n  fill(proto, 'addEventListener', function (original: VoidFunction): (\n    ...args: Parameters<typeof WINDOW.addEventListener>\n  ) => ReturnType<typeof WINDOW.addEventListener> {\n    return function (this: unknown, eventName, fn, options): VoidFunction {\n      try {\n        if (isEventListenerObject(fn)) {\n          // ESlint disable explanation:\n          //  First, it is generally safe to call `wrap` with an unbound function. Furthermore, using `.bind()` would\n          //  introduce a bug here, because bind returns a new function that doesn't have our\n          //  flags(like __sentry_original__) attached. `wrap` checks for those flags to avoid unnecessary wrapping.\n          //  Without those flags, every call to addEventListener wraps the function again, causing a memory leak.\n          // eslint-disable-next-line @typescript-eslint/unbound-method\n          fn.handleEvent = wrap(fn.handleEvent, {\n            mechanism: {\n              data: {\n                handler: getFunctionName(fn),\n                target,\n              },\n              handled: false,\n              type: 'auto.browser.browserapierrors.handleEvent',\n            },\n          });\n        }\n      } catch {\n        // can sometimes get 'Permission denied to access property \"handle Event'\n      }\n\n      if (integrationOptions.unregisterOriginalCallbacks) {\n        unregisterOriginalCallback(this, eventName, fn);\n      }\n\n      return original.apply(this, [\n        eventName,\n        wrap(fn, {\n          mechanism: {\n            data: {\n              handler: getFunctionName(fn),\n              target,\n            },\n            handled: false,\n            type: 'auto.browser.browserapierrors.addEventListener',\n          },\n        }),\n        options,\n      ]);\n    };\n  });\n\n  fill(proto, 'removeEventListener', function (originalRemoveEventListener: VoidFunction): (\n    this: unknown,\n    ...args: Parameters<typeof WINDOW.removeEventListener>\n  ) => ReturnType<typeof WINDOW.removeEventListener> {\n    return function (this: unknown, eventName, fn, options): VoidFunction {\n      /**\n       * There are 2 possible scenarios here:\n       *\n       * 1. Someone passes a callback, which was attached prior to Sentry initialization, or by using unmodified\n       * method, eg. `document.addEventListener.call(el, name, handler). In this case, we treat this function\n       * as a pass-through, and call original `removeEventListener` with it.\n       *\n       * 2. Someone passes a callback, which was attached after Sentry was initialized, which means that it was using\n       * our wrapped version of `addEventListener`, which internally calls `wrap` helper.\n       * This helper \"wraps\" whole callback inside a try/catch statement, and attached appropriate metadata to it,\n       * in order for us to make a distinction between wrapped/non-wrapped functions possible.\n       * If a function was wrapped, it has additional property of `__sentry_wrapped__`, holding the handler.\n       *\n       * When someone adds a handler prior to initialization, and then do it again, but after,\n       * then we have to detach both of them. Otherwise, if we'd detach only wrapped one, it'd be impossible\n       * to get rid of the initial handler and it'd stick there forever.\n       */\n      try {\n        // Check via hasOwnProperty so a `__sentry_wrapped__` inherited from a wrapped\n        // `Function.prototype` doesn't cause removal of the wrong handler.\n        if (Object.prototype.hasOwnProperty.call(fn, '__sentry_wrapped__')) {\n          const originalEventHandler = (fn as WrappedFunction).__sentry_wrapped__;\n          if (originalEventHandler) {\n            originalRemoveEventListener.call(this, eventName, originalEventHandler, options);\n          }\n        }\n      } catch {\n        // ignore, accessing __sentry_wrapped__ will throw in some Selenium environments\n      }\n      return originalRemoveEventListener.call(this, eventName, fn, options);\n    };\n  });\n}\n\nfunction isEventListenerObject(obj: unknown): obj is EventListenerObject {\n  return typeof (obj as EventListenerObject).handleEvent === 'function';\n}\n\nfunction unregisterOriginalCallback(target: unknown, eventName: string, fn: EventListenerOrEventListenerObject): void {\n  if (\n    target &&\n    typeof target === 'object' &&\n    'removeEventListener' in target &&\n    typeof target.removeEventListener === 'function'\n  ) {\n    target.removeEventListener(eventName, fn);\n  }\n}\n", "import { captureSession, debug, defineIntegration, getIsolationScope, startSession } from '@sentry/core/browser';\nimport { addHistoryInstrumentationHandler, whenIdleOrHidden } from '@sentry/browser-utils';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { WINDOW } from '../helpers';\n\ninterface BrowserSessionOptions {\n  /**\n   * Controls the session lifecycle - when new sessions are created.\n   *\n   * - `'route'`: A session is created on page load and on every navigation.\n   *   This is the default behavior.\n   * - `'page'`: A session is created once when the page is loaded. Session is not\n   *   updated on navigation. This is useful for webviews or single-page apps where\n   *   URL changes should not trigger new sessions.\n   *\n   * @default 'route'\n   */\n  lifecycle?: 'route' | 'page';\n}\n\n/**\n * When added, automatically creates sessions which allow you to track adoption and crashes (crash free rate) in your Releases in Sentry.\n * More information: https://docs.sentry.io/product/releases/health/\n *\n * Note: In order for session tracking to work, you need to set up Releases: https://docs.sentry.io/product/releases/\n */\nexport const browserSessionIntegration = defineIntegration((options: BrowserSessionOptions = {}) => {\n  const lifecycle = options.lifecycle ?? 'route';\n\n  return {\n    name: 'BrowserSession' as const,\n    setupOnce() {\n      if (typeof WINDOW.document === 'undefined') {\n        DEBUG_BUILD &&\n          debug.warn('Using the `browserSessionIntegration` in non-browser environments is not supported.');\n        return;\n      }\n\n      // The session duration for browser sessions does not track a meaningful\n      // concept that can be used as a metric.\n      // Automatically captured sessions are akin to page views, and thus we\n      // discard their duration.\n      startSession({ ignoreDuration: true });\n\n      // Sending the session envelope synchronously in `init()` runs the full send\n      // pipeline during page load, competing with critical resources for the network and\n      // adding overhead that measurably hurts LCP. We defer the initial send until the\n      // browser is idle; `whenIdleOrHidden` flushes it on page-hide so we don't lose short\n      // (page-view-like) sessions.\n      let initialSessionSent = false;\n      whenIdleOrHidden(() => {\n        // A navigation (in `'route'` lifecycle) may start and send a new session before this\n        // deferred callback fires. In that case the current session was already sent, so\n        // re-capturing here would send it a second time - guard against that.\n        if (!initialSessionSent) {\n          captureSession();\n          initialSessionSent = true;\n        }\n      });\n\n      // User data can be set at any time, for example async after Sentry.init has run and the initial session\n      // envelope was already sent, but still on the initial page.\n      // Therefore, we have to update the ongoing session with the new user data if it exists, to send the `did`.\n      // In theory, sessions, as well as user data is always put onto the isolation scope. So we listen to the\n      // isolation scope for changes and update the session with the new user data if it exists.\n      // This will not catch users set onto other scopes, like the current scope. For now, we'll accept this limitation.\n      // The alternative is to update and capture the session from within the scope. This could be too costly or would not\n      // play well with session aggregates on the server side. Since this happens in the scope class, we'd need change\n      // scope behaviour in the browser.\n      const isolationScope = getIsolationScope();\n      let previousUser = isolationScope.getUser();\n      isolationScope.addScopeListener(scope => {\n        const maybeNewUser = scope.getUser();\n        // sessions only care about user id and ip address, so we only need to capture the session if the user has changed\n        if (previousUser?.id !== maybeNewUser?.id || previousUser?.ip_address !== maybeNewUser?.ip_address) {\n          previousUser = maybeNewUser;\n          // Only emit a dedicated update envelope for user data that arrives _after_ the\n          // deferred initial session was sent. User data set during page load is already\n          // reflected in that session (the scope writes it onto the session), so capturing\n          // here would send a redundant envelope - and do so during page load, which is\n          // exactly the overhead we're deferring away from.\n          if (initialSessionSent) {\n            captureSession();\n          }\n        }\n      });\n\n      if (lifecycle === 'route') {\n        // We want to create a session for every navigation as well\n        addHistoryInstrumentationHandler(({ from, to }) => {\n          // Don't create an additional session for the initial route or if the location did not change\n          if (from !== to) {\n            startSession({ ignoreDuration: true });\n            captureSession();\n            // A session has now been sent, so the deferred initial capture (if still pending)\n            // must not re-send this navigation session.\n            initialSessionSent = true;\n          }\n        });\n      }\n    },\n  };\n});\n", "import type { CultureContext, IntegrationFn } from '@sentry/core/browser';\nimport { defineIntegration, safeSetSpanJSONAttributes } from '@sentry/core/browser';\nimport { WINDOW } from '../helpers';\n\nconst INTEGRATION_NAME = 'CultureContext' as const;\n\nconst _cultureContextIntegration = (() => {\n  return {\n    name: INTEGRATION_NAME,\n    preprocessEvent(event) {\n      const culture = getCultureContext();\n\n      if (culture) {\n        event.contexts = {\n          ...event.contexts,\n          culture: { ...culture, ...event.contexts?.culture },\n        };\n      }\n    },\n    processSegmentSpan(span) {\n      const culture = getCultureContext();\n\n      if (culture) {\n        safeSetSpanJSONAttributes(span, {\n          'culture.locale': culture.locale,\n          'culture.timezone': culture.timezone,\n          'culture.calendar': culture.calendar,\n        });\n      }\n    },\n  };\n}) satisfies IntegrationFn;\n\n/**\n * Captures culture context from the browser.\n *\n * Enabled by default.\n *\n * @example\n * ```js\n * import * as Sentry from '@sentry/browser';\n *\n * Sentry.init({\n *   integrations: [Sentry.cultureContextIntegration()],\n * });\n * ```\n */\nexport const cultureContextIntegration = defineIntegration(_cultureContextIntegration);\n\n/**\n * Returns the culture context from the browser's Intl API.\n */\nfunction getCultureContext(): CultureContext | undefined {\n  try {\n    const intl = (WINDOW as { Intl?: typeof Intl }).Intl;\n    if (!intl) {\n      return undefined;\n    }\n\n    const options = intl.DateTimeFormat().resolvedOptions();\n\n    return {\n      locale: options.locale,\n      timezone: options.timeZone,\n      calendar: options.calendar,\n    };\n  } catch {\n    // Ignore errors\n    return undefined;\n  }\n}\n", "import type { Client, Event, IntegrationFn, Primitive, StackParser } from '@sentry/core/browser';\nimport {\n  addGlobalErrorInstrumentationHandler,\n  addGlobalUnhandledRejectionInstrumentationHandler,\n  captureEvent,\n  debug,\n  defineIntegration,\n  getClient,\n  getLocationHref,\n  isPrimitive,\n  isString,\n  stripDataUrlContent,\n  UNKNOWN_FUNCTION,\n} from '@sentry/core/browser';\nimport type { BrowserClient } from '../client';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { eventFromUnknownInput } from '../eventbuilder';\nimport { shouldIgnoreOnError } from '../helpers';\n\ntype GlobalHandlersIntegrationsOptionKeys = 'onerror' | 'onunhandledrejection';\n\ntype GlobalHandlersIntegrations = Record<GlobalHandlersIntegrationsOptionKeys, boolean>;\n\nconst INTEGRATION_NAME = 'GlobalHandlers' as const;\n\nconst _globalHandlersIntegration = ((options: Partial<GlobalHandlersIntegrations> = {}) => {\n  const _options = {\n    onerror: true,\n    onunhandledrejection: true,\n    ...options,\n  };\n\n  return {\n    name: INTEGRATION_NAME,\n    setupOnce() {\n      Error.stackTraceLimit = 50;\n    },\n    setup(client) {\n      if (_options.onerror) {\n        _installGlobalOnErrorHandler(client);\n        globalHandlerLog('onerror');\n      }\n      if (_options.onunhandledrejection) {\n        _installGlobalOnUnhandledRejectionHandler(client);\n        globalHandlerLog('onunhandledrejection');\n      }\n    },\n  };\n}) satisfies IntegrationFn;\n\nexport const globalHandlersIntegration = defineIntegration(_globalHandlersIntegration);\n\nfunction _installGlobalOnErrorHandler(client: Client): void {\n  addGlobalErrorInstrumentationHandler(data => {\n    const { stackParser, attachStacktrace } = getOptions();\n\n    if (getClient() !== client || shouldIgnoreOnError()) {\n      return;\n    }\n\n    const { msg, url, line, column, error } = data;\n\n    const event = _enhanceEventWithInitialFrame(\n      eventFromUnknownInput(stackParser, error || msg, undefined, attachStacktrace, false),\n      url,\n      line,\n      column,\n    );\n\n    event.level = 'error';\n\n    captureEvent(event, {\n      originalException: error,\n      mechanism: {\n        handled: false,\n        type: 'auto.browser.global_handlers.onerror',\n      },\n    });\n  });\n}\n\nfunction _installGlobalOnUnhandledRejectionHandler(client: Client): void {\n  addGlobalUnhandledRejectionInstrumentationHandler(e => {\n    const { stackParser, attachStacktrace } = getOptions();\n\n    if (getClient() !== client || shouldIgnoreOnError()) {\n      return;\n    }\n\n    const error = _getUnhandledRejectionError(e);\n\n    const event = isPrimitive(error)\n      ? _eventFromRejectionWithPrimitive(error)\n      : eventFromUnknownInput(stackParser, error, undefined, attachStacktrace, true);\n\n    event.level = 'error';\n\n    captureEvent(event, {\n      originalException: error,\n      mechanism: {\n        handled: false,\n        type: 'auto.browser.global_handlers.onunhandledrejection',\n      },\n    });\n  });\n}\n\n/**\n *\n */\nexport function _getUnhandledRejectionError(error: unknown): unknown {\n  if (isPrimitive(error)) {\n    return error;\n  }\n\n  // dig the object of the rejection out of known event types\n  try {\n    type ErrorWithReason = { reason: unknown };\n    // PromiseRejectionEvents store the object of the rejection under 'reason'\n    // see https://developer.mozilla.org/en-US/docs/Web/API/PromiseRejectionEvent\n    if ('reason' in (error as ErrorWithReason)) {\n      return (error as ErrorWithReason).reason;\n    }\n\n    type CustomEventWithDetail = { detail: { reason: unknown } };\n    // something, somewhere, (likely a browser extension) effectively casts PromiseRejectionEvents\n    // to CustomEvents, moving the `promise` and `reason` attributes of the PRE into\n    // the CustomEvent's `detail` attribute, since they're not part of CustomEvent's spec\n    // see https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent and\n    // https://github.com/getsentry/sentry-javascript/issues/2380\n    if ('detail' in (error as CustomEventWithDetail) && 'reason' in (error as CustomEventWithDetail).detail) {\n      return (error as CustomEventWithDetail).detail.reason;\n    }\n  } catch {} // eslint-disable-line no-empty\n\n  return error;\n}\n\n/**\n * Create an event from a promise rejection where the `reason` is a primitive.\n *\n * @param reason: The `reason` property of the promise rejection\n * @returns An Event object with an appropriate `exception` value\n */\nexport function _eventFromRejectionWithPrimitive(reason: Primitive): Event {\n  return {\n    exception: {\n      values: [\n        {\n          type: 'UnhandledRejection',\n          // String() is needed because the Primitive type includes symbols (which can't be automatically stringified)\n          value: `Non-Error promise rejection captured with value: ${String(reason)}`,\n        },\n      ],\n    },\n  };\n}\n\nfunction _enhanceEventWithInitialFrame(\n  event: Event,\n  url: string | undefined,\n  lineno: number | undefined,\n  colno: number | undefined,\n): Event {\n  // event.exception\n  const e = (event.exception = event.exception || {});\n  // event.exception.values\n  const ev = (e.values = e.values || []);\n  // event.exception.values[0]\n  const ev0 = (ev[0] = ev[0] || {});\n  // event.exception.values[0].stacktrace\n  const ev0s = (ev0.stacktrace = ev0.stacktrace || {});\n  // event.exception.values[0].stacktrace.frames\n  const ev0sf = (ev0s.frames = ev0s.frames || []);\n\n  if (ev0sf.length === 0) {\n    ev0sf.push({\n      colno,\n      lineno,\n      filename: getFilenameFromUrl(url) ?? getLocationHref(),\n      function: UNKNOWN_FUNCTION,\n      in_app: true,\n    });\n  }\n\n  return event;\n}\n\nfunction globalHandlerLog(type: string): void {\n  DEBUG_BUILD && debug.log(`Global Handler attached: ${type}`);\n}\n\nfunction getOptions(): { stackParser: StackParser; attachStacktrace?: boolean } {\n  const client = getClient<BrowserClient>();\n  const options = client?.getOptions() || {\n    stackParser: () => [],\n    attachStacktrace: false,\n  };\n  return options;\n}\n\nfunction getFilenameFromUrl(url: string | undefined): string | undefined {\n  if (!isString(url) || url.length === 0) {\n    return undefined;\n  }\n\n  // Strip data URL content to avoid long base64 strings in stack frames\n  // (e.g. when initializing a Worker with a base64 encoded script)\n  // Don't include data prefix for filenames as it's not useful for stack traces\n  // Wrap with < > to indicate it's a placeholder\n  if (url.startsWith('data:')) {\n    return `<${stripDataUrlContent(url, false)}>`;\n  }\n\n  return url;\n}\n", "import { defineIntegration, safeSetSpanJSONAttributes, SEMANTIC_ATTRIBUTE_SENTRY_OP } from '@sentry/core/browser';\nimport { getHttpRequestData, WINDOW } from '../helpers';\nimport { URL_FULL } from '@sentry/conventions/attributes';\n\n/**\n * Collects information about HTTP request headers and\n * attaches them to the event.\n */\nexport const httpContextIntegration = defineIntegration(() => {\n  return {\n    name: 'HttpContext' as const,\n    preprocessEvent(event) {\n      // if none of the information we want exists, don't bother\n      if (!WINDOW.navigator && !WINDOW.location && !WINDOW.document) {\n        return;\n      }\n\n      const reqData = getHttpRequestData();\n      const headers = {\n        ...reqData.headers,\n        ...event.request?.headers,\n      };\n\n      event.request = {\n        ...reqData,\n        ...event.request,\n        headers,\n      };\n    },\n    processSegmentSpan(span) {\n      const spanOp = span.attributes?.[SEMANTIC_ATTRIBUTE_SENTRY_OP];\n\n      // if none of the information we want exists, don't bother\n      if (!WINDOW.navigator && !WINDOW.location && !WINDOW.document) {\n        return;\n      }\n\n      const reqData = getHttpRequestData();\n\n      safeSetSpanJSONAttributes(span, {\n        // Coerce empty string to undefined so the helper's nullish check drops it,\n        // rather than writing an empty `url.full` attribute onto the span.\n        [URL_FULL]: spanOp !== 'http.client' ? reqData.url : undefined,\n        'http.request.header.user_agent': reqData.headers['User-Agent'],\n        'http.request.header.referer': reqData.headers['Referer'],\n      });\n    },\n  };\n});\n", "import type { IntegrationFn } from '@sentry/core/browser';\nimport { applyAggregateErrorsToEvent, defineIntegration } from '@sentry/core/browser';\nimport { exceptionFromError } from '../eventbuilder';\n\ninterface LinkedErrorsOptions {\n  key?: string;\n  limit?: number;\n}\n\nconst DEFAULT_KEY = 'cause';\nconst DEFAULT_LIMIT = 5;\n\nconst INTEGRATION_NAME = 'LinkedErrors' as const;\n\nconst _linkedErrorsIntegration = ((options: LinkedErrorsOptions = {}) => {\n  const limit = options.limit || DEFAULT_LIMIT;\n  const key = options.key || DEFAULT_KEY;\n\n  return {\n    name: INTEGRATION_NAME,\n    preprocessEvent(event, hint, client) {\n      const options = client.getOptions();\n\n      applyAggregateErrorsToEvent(\n        // This differs from the LinkedErrors integration in core by using a different exceptionFromError function\n        exceptionFromError,\n        options.stackParser,\n        key,\n        limit,\n        event,\n        hint,\n      );\n    },\n  };\n}) satisfies IntegrationFn;\n\n/**\n * Aggregrate linked errors in an event.\n */\nexport const linkedErrorsIntegration = defineIntegration(_linkedErrorsIntegration);\n", "import { htmlTreeAsString, isElement } from '@sentry/browser-utils';\n\ntype Prototype = { constructor?: (...args: unknown[]) => unknown };\n\nconst HTML_ELEMENT_CONSTRUCTOR_NAME_REGEX = /^HTML(\\w*)Element$/;\n\n/**\n * Browser-specific contributions to `normalize()`'s `stringifyValue`. Plug into\n * `setNormalizeStringifier` from the browser SDK so DOM values get a useful string\n * representation without forcing core to carry the DOM-specific code.\n *\n * Handles:\n * - `window` → `[Window]`\n * - `document` → `[Document]`\n * - `HTMLElement` subclasses → `[HTMLElement: <css-selector-path>]` (via `htmlTreeAsString`)\n *\n * Vue ViewModels and React SyntheticEvents are not handled here — the Vue and React\n * SDKs wrap this function in their `init` and add their own checks on top.\n */\nexport function normalizeStringifyValue(value: Exclude<unknown, string | number | boolean | null>): string | undefined {\n  // oxlint-disable-next-line no-restricted-globals\n  if (typeof window !== 'undefined' && value === window) {\n    return '[Window]';\n  }\n  // oxlint-disable-next-line no-restricted-globals\n  if (typeof document !== 'undefined' && value === document) {\n    return '[Document]';\n  }\n\n  if (isElement(value)) {\n    const objName = getConstructorName(value);\n    if (HTML_ELEMENT_CONSTRUCTOR_NAME_REGEX.test(objName)) {\n      return `[HTMLElement: ${htmlTreeAsString(value)}]`;\n    }\n  }\n\n  return undefined;\n}\n\nfunction getConstructorName(value: unknown): string {\n  const prototype: Prototype | null = Object.getPrototypeOf(value);\n\n  return prototype?.constructor ? prototype.constructor.name : 'null prototype';\n}\n", "import { consoleSandbox, getLocationHref } from '@sentry/core/browser';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { WINDOW } from '../helpers';\n\ntype ExtensionRuntime = {\n  runtime?: {\n    id?: string;\n  };\n};\ntype ExtensionProperties = {\n  chrome?: ExtensionRuntime;\n  browser?: ExtensionRuntime;\n  nw?: unknown;\n};\n\n/**\n * Returns true if the SDK is running in an embedded browser extension.\n * Stand-alone browser extensions (which do not share the same data as the main browser page) are fine.\n */\nexport function checkAndWarnIfIsEmbeddedBrowserExtension(): boolean {\n  if (_isEmbeddedBrowserExtension()) {\n    if (DEBUG_BUILD) {\n      consoleSandbox(() => {\n        // eslint-disable-next-line no-console\n        console.error(\n          '[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/',\n        );\n      });\n    }\n\n    return true;\n  }\n\n  return false;\n}\n\nfunction _isEmbeddedBrowserExtension(): boolean {\n  if (typeof WINDOW.window === 'undefined') {\n    // No need to show the error if we're not in a browser window environment (e.g. service workers)\n    return false;\n  }\n\n  const _window = WINDOW as typeof WINDOW & ExtensionProperties;\n\n  // Running the SDK in NW.js, which appears like a browser extension but isn't, is also fine\n  // see: https://github.com/getsentry/sentry-javascript/issues/12668\n  if (_window.nw) {\n    return false;\n  }\n\n  const extensionObject = _window['chrome'] || _window['browser'];\n\n  if (!extensionObject?.runtime?.id) {\n    return false;\n  }\n\n  const href = getLocationHref();\n\n  // Running the SDK in a dedicated extension page and calling Sentry.init is fine; no risk of data leakage\n  const isDedicatedExtensionPage =\n    WINDOW === WINDOW.top &&\n    /^(?:chrome-extension|moz-extension|ms-browser-extension|safari-web-extension):\\/\\//.test(href);\n\n  return !isDedicatedExtensionPage;\n}\n", "import type { Client, Integration, Options } from '@sentry/core/browser';\nimport {\n  conversationIdIntegration,\n  dedupeIntegration,\n  functionToStringIntegration,\n  getIntegrationsToSetup,\n  inboundFiltersIntegration,\n  initAndBind,\n  setNormalizeStringifier,\n  stackParserFromStackParserOptions,\n} from '@sentry/core/browser';\nimport type { BrowserClientOptions, BrowserOptions } from './client';\nimport { BrowserClient } from './client';\nimport { breadcrumbsIntegration } from './integrations/breadcrumbs';\nimport { browserApiErrorsIntegration } from './integrations/browserapierrors';\nimport { browserSessionIntegration } from './integrations/browsersession';\nimport { cultureContextIntegration } from './integrations/culturecontext';\nimport { globalHandlersIntegration } from './integrations/globalhandlers';\nimport { httpContextIntegration } from './integrations/httpcontext';\nimport { linkedErrorsIntegration } from './integrations/linkederrors';\nimport { spotlightBrowserIntegration } from './integrations/spotlight';\nimport { defaultStackParser } from './stack-parsers';\nimport { makeFetchTransport } from './transports/fetch';\nimport { normalizeStringifyValue } from './normalizeStringifyValue';\nimport { checkAndWarnIfIsEmbeddedBrowserExtension } from './utils/detectBrowserExtension';\n\n/** Get the default integrations for the browser SDK. */\nexport function getDefaultIntegrations(_options: Options): Integration[] {\n  /**\n   * Note: Please make sure this stays in sync with Angular SDK, which re-exports\n   * `getDefaultIntegrations` but with an adjusted set of integrations.\n   */\n  return [\n    // TODO(v11): Replace with `eventFiltersIntegration` once we remove the deprecated `inboundFiltersIntegration`\n    // eslint-disable-next-line typescript/no-deprecated\n    inboundFiltersIntegration(),\n    functionToStringIntegration(),\n    conversationIdIntegration(),\n    browserApiErrorsIntegration(),\n    breadcrumbsIntegration(),\n    globalHandlersIntegration(),\n    linkedErrorsIntegration(),\n    dedupeIntegration(),\n    httpContextIntegration(),\n    cultureContextIntegration(),\n    browserSessionIntegration(),\n  ];\n}\n\n/**\n * The Sentry Browser SDK Client.\n *\n * To use this SDK, call the {@link init} function as early as possible when\n * loading the web page. To set context information or send manual events, use\n * the provided methods.\n *\n * @example\n *\n * ```\n *\n * import { init } from '@sentry/browser';\n *\n * init({\n *   dsn: '__DSN__',\n *   // ...\n * });\n * ```\n *\n * @example\n * ```\n *\n * import { addBreadcrumb } from '@sentry/browser';\n * addBreadcrumb({\n *   message: 'My Breadcrumb',\n *   // ...\n * });\n * ```\n *\n * @example\n *\n * ```\n *\n * import * as Sentry from '@sentry/browser';\n * Sentry.captureMessage('Hello, world!');\n * Sentry.captureException(new Error('Good bye'));\n * Sentry.captureEvent({\n *   message: 'Manual',\n *   stacktrace: [\n *     // ...\n *   ],\n * });\n * ```\n *\n * @see {@link BrowserOptions} for documentation on configuration options.\n */\nexport function init(options: BrowserOptions = {}): Client | undefined {\n  const shouldDisableBecauseIsBrowserExtenstion =\n    !options.skipBrowserExtensionCheck && checkAndWarnIfIsEmbeddedBrowserExtension();\n\n  let defaultIntegrations =\n    options.defaultIntegrations == null ? getDefaultIntegrations(options) : options.defaultIntegrations;\n\n  /*! rollup-include-development-only */\n  if (options.spotlight) {\n    if (!defaultIntegrations) {\n      defaultIntegrations = [];\n    }\n    const args = typeof options.spotlight === 'string' ? { sidecarUrl: options.spotlight } : undefined;\n    defaultIntegrations.push(spotlightBrowserIntegration(args));\n  }\n  /*! rollup-include-development-only-end */\n\n  const clientOptions: BrowserClientOptions = {\n    ...options,\n    enabled: shouldDisableBecauseIsBrowserExtenstion ? false : options.enabled,\n    stackParser: stackParserFromStackParserOptions(options.stackParser || defaultStackParser),\n    integrations: getIntegrationsToSetup({\n      integrations: options.integrations,\n      defaultIntegrations,\n    }),\n    transport: options.transport || makeFetchTransport,\n  };\n\n  setNormalizeStringifier(normalizeStringifyValue);\n\n  return initAndBind(BrowserClient, clientOptions);\n}\n\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\nexport function forceLoad(): void {\n  // Noop\n}\n\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\nexport function onLoad(callback: () => void): void {\n  callback();\n}\n", "import type { ReportDialogOptions } from '@sentry/core/browser';\nimport { debug, getClient, getCurrentScope, getReportDialogEndpoint, lastEventId } from '@sentry/core/browser';\nimport { DEBUG_BUILD } from './debug-build';\nimport { WINDOW } from './helpers';\n\n/**\n * Present the user with a report dialog.\n *\n * @param options Everything is optional, we try to fetch all info need from the current scope.\n */\nexport function showReportDialog(options: ReportDialogOptions = {}): void {\n  const optionalDocument = WINDOW.document as Document | undefined;\n  const injectionPoint = optionalDocument?.head || optionalDocument?.body;\n\n  // doesn't work without a document (React Native)\n  if (!injectionPoint) {\n    DEBUG_BUILD && debug.error('[showReportDialog] Global document not defined');\n    return;\n  }\n\n  const scope = getCurrentScope();\n  const client = getClient();\n  const dsn = client?.getDsn();\n\n  if (!dsn) {\n    DEBUG_BUILD && debug.error('[showReportDialog] DSN not configured');\n    return;\n  }\n\n  const mergedOptions = {\n    ...options,\n    user: {\n      ...scope.getUser(),\n      ...options.user,\n    },\n    eventId: options.eventId || lastEventId(),\n  };\n\n  const script = WINDOW.document.createElement('script');\n  script.async = true;\n  script.crossOrigin = 'anonymous';\n  script.src = getReportDialogEndpoint(dsn, mergedOptions);\n\n  const { onLoad, onClose } = mergedOptions;\n\n  if (onLoad) {\n    script.onload = onLoad;\n  }\n\n  if (onClose) {\n    const reportDialogClosedMessageHandler = (event: MessageEvent): void => {\n      if (event.data === '__sentry_reportdialog_closed__') {\n        try {\n          onClose();\n        } finally {\n          WINDOW.removeEventListener('message', reportDialogClosedMessageHandler);\n        }\n      }\n    };\n    WINDOW.addEventListener('message', reportDialogClosedMessageHandler);\n  }\n\n  injectionPoint.appendChild(script);\n}\n", "import type { Client, IntegrationFn } from '@sentry/core/browser';\nimport {\n  captureMessage,\n  defineIntegration,\n  getClient,\n  GLOBAL_OBJ,\n  supportsReportingObserver,\n  withScope,\n} from '@sentry/core/browser';\n\nconst WINDOW = GLOBAL_OBJ as typeof GLOBAL_OBJ & Window;\n\nconst INTEGRATION_NAME = 'ReportingObserver' as const;\n\ninterface Report {\n  [key: string]: unknown;\n  type: ReportTypes;\n  url: string;\n  body?: ReportBody;\n}\n\ntype ReportTypes = 'crash' | 'deprecation' | 'intervention';\n\ntype ReportBody = CrashReportBody | DeprecationReportBody | InterventionReportBody;\n\ninterface CrashReportBody {\n  [key: string]: unknown;\n  crashId: string;\n  reason?: string;\n}\n\ninterface DeprecationReportBody {\n  [key: string]: unknown;\n  id: string;\n  anticipatedRemoval?: Date;\n  message: string;\n  sourceFile?: string;\n  lineNumber?: number;\n  columnNumber?: number;\n}\n\ninterface InterventionReportBody {\n  [key: string]: unknown;\n  id: string;\n  message: string;\n  sourceFile?: string;\n  lineNumber?: number;\n  columnNumber?: number;\n}\n\ninterface ReportingObserverOptions {\n  types?: ReportTypes[];\n}\n\n/** This is experimental and the types are not included with TypeScript, sadly. */\ninterface ReportingObserverClass {\n  new (\n    handler: (reports: Report[]) => void,\n    options: { buffered?: boolean; types?: ReportTypes[] },\n  ): {\n    observe: () => void;\n  };\n}\n\nconst SETUP_CLIENTS = new WeakMap<Client, boolean>();\n\nconst _reportingObserverIntegration = ((options: ReportingObserverOptions = {}) => {\n  const types = options.types || ['crash', 'deprecation', 'intervention'];\n\n  /** Handler for the reporting observer. */\n  function handler(reports: Report[]): void {\n    if (!SETUP_CLIENTS.has(getClient() as Client)) {\n      return;\n    }\n\n    for (const report of reports) {\n      withScope(scope => {\n        scope.setExtra('url', report.url);\n\n        const label = `ReportingObserver [${report.type}]`;\n        let details = 'No details available';\n\n        if (report.body) {\n          // Object.keys doesn't work on ReportBody, as all properties are inherited\n          const plainBody: {\n            [key: string]: unknown;\n          } = {};\n\n          // eslint-disable-next-line guard-for-in\n          for (const prop in report.body) {\n            plainBody[prop] = report.body[prop];\n          }\n\n          scope.setExtra('body', plainBody);\n\n          if (report.type === 'crash') {\n            const body = report.body as CrashReportBody;\n            // A fancy way to create a message out of crashId OR reason OR both OR fallback\n            details = [body.crashId || '', body.reason || ''].join(' ').trim() || details;\n          } else {\n            const body = report.body as DeprecationReportBody | InterventionReportBody;\n            details = body.message || details;\n          }\n        }\n\n        captureMessage(`${label}: ${details}`);\n      });\n    }\n  }\n\n  return {\n    name: INTEGRATION_NAME,\n    setupOnce() {\n      if (!supportsReportingObserver()) {\n        return;\n      }\n\n      const observer = new (WINDOW as typeof WINDOW & { ReportingObserver: ReportingObserverClass }).ReportingObserver(\n        handler,\n        {\n          buffered: true,\n          types,\n        },\n      );\n\n      observer.observe();\n    },\n\n    setup(client): void {\n      SETUP_CLIENTS.set(client, true);\n    },\n  };\n}) satisfies IntegrationFn;\n\n/**\n * Reporting API integration - https://w3c.github.io/reporting/\n */\nexport const reportingObserverIntegration = defineIntegration(_reportingObserverIntegration);\n", "import type { Client, Event as SentryEvent, IntegrationFn, SentryWrappedXMLHttpRequest } from '@sentry/core/browser';\nimport {\n  _INTERNAL_filterCookies,\n  _INTERNAL_filterKeyValueData,\n  addExceptionMechanism,\n  addFetchInstrumentationHandler,\n  captureEvent,\n  debug,\n  defineIntegration,\n  getClient,\n  GLOBAL_OBJ,\n  isSentryRequestUrl,\n  supportsNativeFetch,\n} from '@sentry/core/browser';\nimport { addXhrInstrumentationHandler, SENTRY_XHR_DATA_KEY } from '@sentry/browser-utils';\nimport { DEBUG_BUILD } from '../debug-build';\n\nexport type HttpStatusCodeRange = [number, number] | number;\nexport type HttpRequestTarget = string | RegExp;\n\nconst INTEGRATION_NAME = 'HttpClient' as const;\n\ninterface HttpClientOptions {\n  /**\n   * HTTP status codes that should be considered failed.\n   * This array can contain tuples of `[begin, end]` (both inclusive),\n   * single status codes, or a combinations of both\n   *\n   * Example: [[500, 505], 507]\n   * Default: [[500, 599]]\n   */\n  failedRequestStatusCodes: HttpStatusCodeRange[];\n\n  /**\n   * Targets to track for failed requests.\n   * This array can contain strings or regular expressions.\n   *\n   * Example: ['http://localhost', /api\\/.*\\/]\n   * Default: [/.*\\/]\n   */\n  failedRequestTargets: HttpRequestTarget[];\n}\n\nconst _httpClientIntegration = ((options: Partial<HttpClientOptions> = {}) => {\n  const _options: HttpClientOptions = {\n    failedRequestStatusCodes: [[500, 599]],\n    failedRequestTargets: [/.*/],\n    ...options,\n  };\n\n  return {\n    name: INTEGRATION_NAME,\n    setup(client): void {\n      _wrapFetch(client, _options);\n      _wrapXHR(client, _options);\n    },\n  };\n}) satisfies IntegrationFn;\n\n/**\n * Create events for failed client side HTTP requests.\n */\nexport const httpClientIntegration = defineIntegration(_httpClientIntegration);\n\n/**\n * Interceptor function for fetch requests\n *\n * @param requestInfo The Fetch API request info\n * @param response The Fetch API response\n * @param requestInit The request init object\n */\nfunction _fetchResponseHandler(\n  options: HttpClientOptions,\n  requestInfo: RequestInfo,\n  response: Response,\n  requestInit?: RequestInit,\n  error?: unknown,\n): void {\n  if (_shouldCaptureResponse(options, response.status, response.url)) {\n    const request = _getRequest(requestInfo, requestInit);\n\n    let requestHeaders, responseHeaders, requestCookies, responseCookies;\n\n    const dc = _getDataCollectionSettings();\n\n    if (dc.requestHeaders !== false) {\n      requestHeaders = _INTERNAL_filterKeyValueData(_extractFetchHeaders(request.headers), dc.requestHeaders);\n    }\n    if (dc.responseHeaders !== false) {\n      responseHeaders = _INTERNAL_filterKeyValueData(_extractFetchHeaders(response.headers), dc.responseHeaders);\n    }\n    if (dc.cookies !== false) {\n      const reqCookieStr = request.headers.get('Cookie') || undefined;\n      if (reqCookieStr) {\n        const filtered = _INTERNAL_filterCookies(reqCookieStr, dc.cookies);\n        if (typeof filtered === 'object') {\n          requestCookies = filtered;\n        }\n      }\n      const resCookieStr = response.headers.get('Set-Cookie') || undefined;\n      if (resCookieStr) {\n        const filtered = _INTERNAL_filterCookies(resCookieStr, dc.cookies);\n        if (typeof filtered === 'object') {\n          responseCookies = filtered;\n        }\n      }\n    }\n\n    const event = _createEvent({\n      url: request.url,\n      method: request.method,\n      status: response.status,\n      requestHeaders,\n      responseHeaders,\n      requestCookies,\n      responseCookies,\n      error,\n      type: 'fetch',\n    });\n\n    captureEvent(event);\n  }\n}\n\n/**\n * Interceptor function for XHR requests\n *\n * @param xhr The XHR request\n * @param method The HTTP method\n * @param headers The HTTP headers\n */\nfunction _xhrResponseHandler(\n  options: HttpClientOptions,\n  xhr: XMLHttpRequest,\n  method: string,\n  headers: Record<string, string>,\n  error?: unknown,\n): void {\n  if (_shouldCaptureResponse(options, xhr.status, xhr.responseURL)) {\n    let requestHeaders, responseCookies, responseHeaders;\n\n    const dc = _getDataCollectionSettings();\n\n    if (dc.cookies !== false) {\n      try {\n        const cookieString = xhr.getResponseHeader('Set-Cookie') || xhr.getResponseHeader('set-cookie') || undefined;\n        if (cookieString) {\n          const filtered = _INTERNAL_filterCookies(cookieString, dc.cookies);\n          if (typeof filtered === 'object') {\n            responseCookies = filtered;\n          }\n        }\n      } catch {\n        // ignore it if parsing fails\n      }\n    }\n\n    if (dc.responseHeaders !== false) {\n      try {\n        responseHeaders = _INTERNAL_filterKeyValueData(_getXHRResponseHeaders(xhr), dc.responseHeaders);\n      } catch {\n        // ignore it if parsing fails\n      }\n    }\n\n    if (dc.requestHeaders !== false) {\n      requestHeaders = _INTERNAL_filterKeyValueData(headers, dc.requestHeaders);\n    }\n\n    const event = _createEvent({\n      url: xhr.responseURL,\n      method,\n      status: xhr.status,\n      requestHeaders,\n      // Can't access request cookies from XHR\n      responseHeaders,\n      responseCookies,\n      error,\n      type: 'xhr',\n    });\n\n    captureEvent(event);\n  }\n}\n\n/**\n * Extracts response size from `Content-Length` header when possible\n *\n * @param headers\n * @returns The response size in bytes or undefined\n */\nfunction _getResponseSizeFromHeaders(headers?: Record<string, string>): number | undefined {\n  if (headers) {\n    const contentLength = headers['Content-Length'] || headers['content-length'];\n\n    if (contentLength) {\n      return parseInt(contentLength, 10);\n    }\n  }\n\n  return undefined;\n}\n\n/**\n * Extracts the headers as an object from the given Fetch API request or response object\n *\n * @param headers The headers to extract\n * @returns The extracted headers as an object\n */\nfunction _extractFetchHeaders(headers: Headers): Record<string, string> {\n  const result: Record<string, string> = {};\n\n  headers.forEach((value, key) => {\n    result[key] = value;\n  });\n\n  return result;\n}\n\n/**\n * Extracts the response headers as an object from the given XHR object\n *\n * @param xhr The XHR object to extract the response headers from\n * @returns The response headers as an object\n */\nfunction _getXHRResponseHeaders(xhr: XMLHttpRequest): Record<string, string> {\n  const headers = xhr.getAllResponseHeaders();\n\n  if (!headers) {\n    return {};\n  }\n\n  return headers.split('\\r\\n').reduce((acc: Record<string, string>, line: string) => {\n    const [key, value] = line.split(': ');\n    if (key && value) {\n      acc[key] = value;\n    }\n    return acc;\n  }, {});\n}\n\n/**\n * Checks if the given target url is in the given list of targets\n *\n * @param target The target url to check\n * @returns true if the target url is in the given list of targets, false otherwise\n */\nfunction _isInGivenRequestTargets(\n  failedRequestTargets: HttpClientOptions['failedRequestTargets'],\n  target: string,\n): boolean {\n  return failedRequestTargets.some((givenRequestTarget: HttpRequestTarget) => {\n    if (typeof givenRequestTarget === 'string') {\n      return target.includes(givenRequestTarget);\n    }\n\n    return givenRequestTarget.test(target);\n  });\n}\n\n/**\n * Checks if the given status code is in the given range\n *\n * @param status The status code to check\n * @returns true if the status code is in the given range, false otherwise\n */\nfunction _isInGivenStatusRanges(\n  failedRequestStatusCodes: HttpClientOptions['failedRequestStatusCodes'],\n  status: number,\n): boolean {\n  return failedRequestStatusCodes.some((range: HttpStatusCodeRange) => {\n    if (typeof range === 'number') {\n      return range === status;\n    }\n\n    return status >= range[0] && status <= range[1];\n  });\n}\n\n/**\n * Wraps `fetch` function to capture request and response data\n */\nfunction _wrapFetch(client: Client, options: HttpClientOptions): void {\n  if (!supportsNativeFetch()) {\n    return;\n  }\n\n  addFetchInstrumentationHandler(handlerData => {\n    if (getClient() !== client) {\n      return;\n    }\n\n    const { response, args, error, virtualError } = handlerData;\n    const [requestInfo, requestInit] = args as [RequestInfo, RequestInit | undefined];\n\n    if (!response) {\n      return;\n    }\n\n    _fetchResponseHandler(options, requestInfo, response as Response, requestInit, error || virtualError);\n  }, false);\n}\n\n/**\n * Wraps XMLHttpRequest to capture request and response data\n */\nfunction _wrapXHR(client: Client, options: HttpClientOptions): void {\n  if (!('XMLHttpRequest' in GLOBAL_OBJ)) {\n    return;\n  }\n\n  addXhrInstrumentationHandler(handlerData => {\n    if (getClient() !== client) {\n      return;\n    }\n\n    const { error, virtualError } = handlerData;\n\n    const xhr = handlerData.xhr as SentryWrappedXMLHttpRequest & XMLHttpRequest;\n\n    const sentryXhrData = xhr[SENTRY_XHR_DATA_KEY];\n\n    if (!sentryXhrData) {\n      return;\n    }\n\n    const { method, request_headers: headers } = sentryXhrData;\n\n    try {\n      _xhrResponseHandler(options, xhr, method, headers, error || virtualError);\n    } catch (e) {\n      DEBUG_BUILD && debug.warn('Error while extracting response event form XHR response', e);\n    }\n  });\n}\n\n/**\n * Checks whether to capture given response as an event\n *\n * @param status response status code\n * @param url response url\n */\nfunction _shouldCaptureResponse(options: HttpClientOptions, status: number, url: string): boolean {\n  return (\n    _isInGivenStatusRanges(options.failedRequestStatusCodes, status) &&\n    _isInGivenRequestTargets(options.failedRequestTargets, url) &&\n    !isSentryRequestUrl(url, getClient())\n  );\n}\n\n/**\n * Creates a synthetic Sentry event from given response data\n *\n * @param data response data\n * @returns event\n */\nfunction _createEvent(data: {\n  url: string;\n  method: string;\n  status: number;\n  type: 'fetch' | 'xhr';\n  responseHeaders?: Record<string, string>;\n  responseCookies?: Record<string, string>;\n  requestHeaders?: Record<string, string>;\n  requestCookies?: Record<string, string>;\n  error?: unknown;\n}): SentryEvent {\n  const client = getClient();\n  const virtualStackTrace = client && data.error && data.error instanceof Error ? data.error.stack : undefined;\n  // Remove the first frame from the stack as it's the HttpClient call\n  const stack = virtualStackTrace && client ? client.getOptions().stackParser(virtualStackTrace, 0, 1) : undefined;\n  const message = `HTTP Client Error with status code: ${data.status}`;\n\n  const event: SentryEvent = {\n    message,\n    exception: {\n      values: [\n        {\n          type: 'Error',\n          value: message,\n          stacktrace: stack ? { frames: stack } : undefined,\n        },\n      ],\n    },\n    request: {\n      url: data.url,\n      method: data.method,\n      headers: data.requestHeaders,\n      cookies: data.requestCookies,\n    },\n    contexts: {\n      response: {\n        status_code: data.status,\n        headers: data.responseHeaders,\n        cookies: data.responseCookies,\n        body_size: _getResponseSizeFromHeaders(data.responseHeaders),\n      },\n    },\n  };\n\n  addExceptionMechanism(event, {\n    type: `auto.http.client.${data.type}`,\n    handled: false,\n  });\n\n  return event;\n}\n\nfunction _getRequest(requestInfo: RequestInfo, requestInit?: RequestInit): Request {\n  if (!requestInit && requestInfo instanceof Request) {\n    return requestInfo;\n  }\n\n  // If both are set, we try to construct a new Request with the given arguments\n  // However, if e.g. the original request has a `body`, this will throw an error because it was already accessed\n  // In this case, as a fallback, we just use the original request - using both is rather an edge case\n  if (requestInfo instanceof Request && requestInfo.bodyUsed) {\n    return requestInfo;\n  }\n\n  return new Request(requestInfo, requestInit);\n}\n\nfunction _getDataCollectionSettings() {\n  const client = getClient();\n  if (!client) {\n    return { cookies: false, requestHeaders: false, responseHeaders: false };\n  }\n\n  // todo(v11): Always use granular dataCollection settings and remove this legacy guard.\n  // Currently, when dataCollection is not explicitly set, we gate all collection on\n  // sendDefaultPii to avoid sending more data than before (the spec defaults would\n  // collect headers/cookies with deny-list filtering even without sendDefaultPii).\n  const options = client.getOptions();\n  if (options.dataCollection == null) {\n    // eslint-disable-next-line typescript/no-deprecated\n    const enabled = Boolean(options.sendDefaultPii);\n    return { cookies: enabled, requestHeaders: enabled, responseHeaders: enabled };\n  }\n\n  const { cookies, httpHeaders } = client.getDataCollectionOptions();\n  return { cookies, requestHeaders: httpHeaders.request, responseHeaders: httpHeaders.response };\n}\n", "import type { Event, IntegrationFn, StackFrame } from '@sentry/core/browser';\nimport { addContextToFrame, defineIntegration, GLOBAL_OBJ, stripUrlQueryAndFragment } from '@sentry/core/browser';\n\nconst WINDOW = GLOBAL_OBJ as typeof GLOBAL_OBJ & Window;\n\nconst DEFAULT_LINES_OF_CONTEXT = 7;\n\nconst INTEGRATION_NAME = 'ContextLines' as const;\n\n// TODO(v11): Use `dataCollection.frameContextLines` default (5)\ninterface ContextLinesOptions {\n  /**\n   * Sets the number of context lines for each frame when loading a file.\n   * Defaults to 7.\n   *\n   * Set to 0 to disable loading and inclusion of source files.\n   *\n   * When set, this option takes precedence over `dataCollection.frameContextLines`.\n   **/\n  frameContextLines?: number;\n}\n\nconst _contextLinesIntegration = ((options: ContextLinesOptions = {}) => {\n  return {\n    name: INTEGRATION_NAME,\n    processEvent(event, _hint, client) {\n      const contextLines =\n        options.frameContextLines ?? client?.getDataCollectionOptions().frameContextLines ?? DEFAULT_LINES_OF_CONTEXT;\n      return addSourceContext(event, contextLines);\n    },\n  };\n}) satisfies IntegrationFn;\n\n/**\n * Collects source context lines around the lines of stackframes pointing to JS embedded in\n * the current page's HTML.\n *\n * This integration DOES NOT work for stack frames pointing to JS files that are loaded by the browser.\n * For frames pointing to files, context lines are added during ingestion and symbolication\n * by attempting to download the JS files to the Sentry backend.\n *\n * Use this integration if you have inline JS code in HTML pages that can't be accessed\n * by our backend (e.g. due to a login-protected page).\n */\nexport const contextLinesIntegration = defineIntegration(_contextLinesIntegration);\n\n/**\n * Processes an event and adds context lines.\n */\nfunction addSourceContext(event: Event, contextLines: number): Event {\n  const doc = WINDOW.document;\n  const htmlFilename = WINDOW.location && stripUrlQueryAndFragment(WINDOW.location.href);\n  if (!doc || !htmlFilename) {\n    return event;\n  }\n\n  const exceptions = event.exception?.values;\n  if (!exceptions?.length) {\n    return event;\n  }\n\n  const html = doc.documentElement.innerHTML;\n  if (!html) {\n    return event;\n  }\n\n  const htmlLines = ['<!DOCTYPE html>', '<html>', ...html.split('\\n'), '</html>'];\n\n  exceptions.forEach(exception => {\n    const stacktrace = exception.stacktrace;\n    if (stacktrace?.frames) {\n      stacktrace.frames = stacktrace.frames.map(frame =>\n        applySourceContextToFrame(frame, htmlLines, htmlFilename, contextLines),\n      );\n    }\n  });\n\n  return event;\n}\n\n/**\n * Only exported for testing\n */\nexport function applySourceContextToFrame(\n  frame: StackFrame,\n  htmlLines: string[],\n  htmlFilename: string,\n  linesOfContext: number,\n): StackFrame {\n  if (frame.filename !== htmlFilename || !frame.lineno || !htmlLines.length) {\n    return frame;\n  }\n\n  addContextToFrame(htmlLines, frame, linesOfContext);\n\n  return frame;\n}\n", "import type { Client, IntegrationFn } from '@sentry/core/browser';\nimport {\n  defineIntegration,\n  isObjectLike,\n  isString,\n  SEMANTIC_ATTRIBUTE_HTTP_REQUEST_METHOD,\n  SEMANTIC_ATTRIBUTE_SENTRY_OP,\n  spanToJSON,\n  stringMatchesSomePattern,\n} from '@sentry/core/browser';\nimport type { FetchHint, XhrHint } from '@sentry/browser-utils';\nimport { getBodyString, getFetchRequestArgBody, SENTRY_XHR_DATA_KEY } from '@sentry/browser-utils';\nimport { GRAPHQL_DOCUMENT, URL_FULL } from '@sentry/conventions/attributes';\n\ninterface GraphQLClientOptions {\n  endpoints: Array<string | RegExp>;\n}\n\n/** Standard graphql request shape: https://graphql.org/learn/serving-over-http/#post-request-and-body */\ninterface GraphQLStandardRequest {\n  query: string;\n  operationName?: string;\n  variables?: Record<string, unknown>;\n  extensions?: Record<string, unknown>;\n}\n\n/** Persisted operation request */\ninterface GraphQLPersistedRequest {\n  operationName: string;\n  variables?: Record<string, unknown>;\n  extensions: {\n    persistedQuery: {\n      version: number;\n      sha256Hash: string;\n    };\n  } & Record<string, unknown>;\n}\n\ntype GraphQLRequestPayload = GraphQLStandardRequest | GraphQLPersistedRequest;\n\ninterface GraphQLOperation {\n  operationType?: string;\n  operationName?: string;\n}\n\nconst INTEGRATION_NAME = 'GraphQLClient' as const;\n\nconst _graphqlClientIntegration = ((options: GraphQLClientOptions) => {\n  return {\n    name: INTEGRATION_NAME,\n    setup(client: Client) {\n      _updateSpanWithGraphQLData(client, options);\n      _updateBreadcrumbWithGraphQLData(client, options);\n    },\n  };\n}) satisfies IntegrationFn;\n\nfunction _updateSpanWithGraphQLData(client: Client, options: GraphQLClientOptions): void {\n  client.on('beforeOutgoingRequestSpan', (span, hint) => {\n    const spanJSON = spanToJSON(span);\n\n    const spanAttributes = spanJSON.data || {};\n    const spanOp = spanAttributes[SEMANTIC_ATTRIBUTE_SENTRY_OP];\n\n    const isHttpClientSpan = spanOp === 'http.client';\n\n    if (!isHttpClientSpan) {\n      return;\n    }\n\n    // Fall back to `url` because fetch instrumentation only sets `http.url` for absolute URLs;\n    // relative URLs end up only in `url` (see `getFetchSpanAttributes` in packages/core/src/fetch.ts).\n    const httpUrl = spanAttributes[URL_FULL] || spanAttributes['http.url'] || spanAttributes['url'];\n    const httpMethod = spanAttributes[SEMANTIC_ATTRIBUTE_HTTP_REQUEST_METHOD] || spanAttributes['http.method'];\n\n    if (!isString(httpUrl) || !isString(httpMethod)) {\n      return;\n    }\n\n    const { endpoints } = options;\n    const isTracedGraphqlEndpoint = stringMatchesSomePattern(httpUrl, endpoints);\n    const payload = getRequestPayloadXhrOrFetch(hint as XhrHint | FetchHint);\n\n    if (isTracedGraphqlEndpoint && payload) {\n      const graphqlBody = getGraphQLRequestPayload(payload);\n\n      if (graphqlBody) {\n        const operationInfo = _getGraphQLOperation(graphqlBody);\n        span.updateName(`${httpMethod} ${httpUrl} (${operationInfo})`);\n\n        // Handle standard requests - capture the query document when enabled via dataCollection (default true)\n        if (isStandardRequest(graphqlBody) && client.getDataCollectionOptions().graphQL.document === true) {\n          span.setAttribute(GRAPHQL_DOCUMENT, graphqlBody.query);\n        }\n\n        // Handle persisted operations - capture hash for debugging\n        if (isPersistedRequest(graphqlBody)) {\n          span.setAttribute('graphql.persisted_query.hash.sha256', graphqlBody.extensions.persistedQuery.sha256Hash);\n          span.setAttribute('graphql.persisted_query.version', graphqlBody.extensions.persistedQuery.version);\n        }\n      }\n    }\n  });\n}\n\nfunction _updateBreadcrumbWithGraphQLData(client: Client, options: GraphQLClientOptions): void {\n  client.on('beforeOutgoingRequestBreadcrumb', (breadcrumb, handlerData) => {\n    const { category, type, data } = breadcrumb;\n\n    const isFetch = category === 'fetch';\n    const isXhr = category === 'xhr';\n    const isHttpBreadcrumb = type === 'http';\n\n    if (isHttpBreadcrumb && (isFetch || isXhr)) {\n      const httpUrl = data?.url;\n      const { endpoints } = options;\n\n      const isTracedGraphqlEndpoint = stringMatchesSomePattern(httpUrl, endpoints);\n      const payload = getRequestPayloadXhrOrFetch(handlerData as XhrHint | FetchHint);\n\n      if (isTracedGraphqlEndpoint && data && payload) {\n        const graphqlBody = getGraphQLRequestPayload(payload);\n\n        if (!data.graphql && graphqlBody) {\n          const operationInfo = _getGraphQLOperation(graphqlBody);\n\n          data['graphql.operation'] = operationInfo;\n\n          if (isStandardRequest(graphqlBody) && client.getDataCollectionOptions().graphQL.document === true) {\n            data[GRAPHQL_DOCUMENT] = graphqlBody.query;\n          }\n\n          if (isPersistedRequest(graphqlBody)) {\n            data['graphql.persisted_query.hash.sha256'] = graphqlBody.extensions.persistedQuery.sha256Hash;\n            data['graphql.persisted_query.version'] = graphqlBody.extensions.persistedQuery.version;\n          }\n        }\n      }\n    }\n  });\n}\n\n/**\n * @param requestBody - GraphQL request\n * @returns A formatted version of the request: 'TYPE NAME' or 'TYPE' or 'persisted NAME'\n */\nexport function _getGraphQLOperation(requestBody: GraphQLRequestPayload): string {\n  // Handle persisted operations\n  if (isPersistedRequest(requestBody)) {\n    return `persisted ${requestBody.operationName}`;\n  }\n\n  // Handle standard GraphQL requests\n  if (isStandardRequest(requestBody)) {\n    const { query: graphqlQuery, operationName: graphqlOperationName } = requestBody;\n    const { operationName = graphqlOperationName, operationType } = parseGraphQLQuery(graphqlQuery);\n    const operationInfo = operationName ? `${operationType} ${operationName}` : `${operationType}`;\n    return operationInfo;\n  }\n\n  // Fallback for unknown request types\n  return 'unknown';\n}\n\n/**\n * Get the request body/payload based on the shape of the hint.\n *\n * Exported for tests only.\n */\nexport function getRequestPayloadXhrOrFetch(hint: XhrHint | FetchHint): string | undefined {\n  const isXhr = 'xhr' in hint;\n\n  let body: string | undefined;\n\n  if (isXhr) {\n    const sentryXhrData = hint.xhr[SENTRY_XHR_DATA_KEY];\n    body = sentryXhrData && getBodyString(sentryXhrData.body)[0];\n  } else {\n    const sentryFetchData = getFetchRequestArgBody(hint.input);\n    body = getBodyString(sentryFetchData)[0];\n  }\n\n  return body;\n}\n\n/**\n * Extract the name and type of the operation from the GraphQL query.\n *\n * Exported for tests only.\n */\nexport function parseGraphQLQuery(query: string): GraphQLOperation {\n  const namedQueryRe = /^(?:\\s*)(query|mutation|subscription)(?:\\s*)(\\w+)(?:\\s*)[{(]/;\n  const unnamedQueryRe = /^(?:\\s*)(query|mutation|subscription)(?:\\s*)[{(]/;\n\n  const namedMatch = query.match(namedQueryRe);\n  if (namedMatch) {\n    return {\n      operationType: namedMatch[1],\n      operationName: namedMatch[2],\n    };\n  }\n\n  const unnamedMatch = query.match(unnamedQueryRe);\n  if (unnamedMatch) {\n    return {\n      operationType: unnamedMatch[1],\n      operationName: undefined,\n    };\n  }\n  return {\n    operationType: undefined,\n    operationName: undefined,\n  };\n}\n\n/**\n * Helper to safely check if a value is a non-null object\n */\n\n/**\n * Type guard to check if a request is a standard GraphQL request\n */\nfunction isStandardRequest(payload: unknown): payload is GraphQLStandardRequest {\n  return isObjectLike(payload) && typeof payload.query === 'string';\n}\n\n/**\n * Type guard to check if a request is a persisted operation request\n */\nfunction isPersistedRequest(payload: unknown): payload is GraphQLPersistedRequest {\n  return (\n    isObjectLike(payload) &&\n    typeof payload.operationName === 'string' &&\n    isObjectLike(payload.extensions) &&\n    isObjectLike(payload.extensions.persistedQuery) &&\n    typeof payload.extensions.persistedQuery.sha256Hash === 'string' &&\n    typeof payload.extensions.persistedQuery.version === 'number'\n  );\n}\n\n/**\n * Extract the payload of a request if it's GraphQL.\n * Exported for tests only.\n * @param payload - A valid JSON string\n * @returns A POJO or undefined\n */\nexport function getGraphQLRequestPayload(payload: string): GraphQLRequestPayload | undefined {\n  try {\n    const requestBody = JSON.parse(payload);\n\n    // Return any valid GraphQL request (standard, persisted, or APQ retry with both)\n    if (isStandardRequest(requestBody) || isPersistedRequest(requestBody)) {\n      return requestBody;\n    }\n\n    // Not a GraphQL request\n    return undefined;\n  } catch {\n    // Invalid JSON\n    return undefined;\n  }\n}\n\n/**\n * This integration ensures that GraphQL requests made in the browser\n * have their GraphQL-specific data captured and attached to spans and breadcrumbs.\n */\nexport const graphqlClientIntegration = defineIntegration(_graphqlClientIntegration);\n", "import type { Attachment, Event, EventHint, ViewHierarchyData, ViewHierarchyWindow } from '@sentry/core/browser';\nimport { defineIntegration, getComponentName } from '@sentry/core/browser';\nimport { WINDOW } from '../helpers';\n\ninterface OnElementArgs {\n  /**\n   * The element being processed.\n   */\n  element: HTMLElement;\n  /**\n   * Lowercase tag name of the element.\n   */\n  tagName: string;\n  /**\n   * The component name of the element.\n   */\n  componentName?: string;\n\n  /**\n   * The current depth of the element in the view hierarchy. The root element will have a depth of 0.\n   *\n   * This allows you to limit the traversal depth for large DOM trees.\n   */\n  depth?: number;\n}\n\ninterface Options {\n  /**\n   * Whether to attach the view hierarchy to the event.\n   *\n   * Default: Always attach.\n   */\n  shouldAttach?: (event: Event, hint: EventHint) => boolean;\n\n  /**\n   * A function that returns the root element to start walking the DOM from.\n   *\n   * Default: `window.document.body`\n   */\n  rootElement?: () => HTMLElement | undefined;\n\n  /**\n   * Called for each HTMLElement as we walk the DOM.\n   *\n   * Return an object to include the element with any additional properties.\n   * Return `skip` to exclude the element and its children.\n   * Return `children` to skip the element but include its children.\n   */\n  onElement?: (prop: OnElementArgs) => Record<string, string | number | boolean> | 'skip' | 'children';\n}\n\n/**\n * An integration to include a view hierarchy attachment which contains the DOM.\n */\nexport const viewHierarchyIntegration = defineIntegration((options: Options = {}) => {\n  const skipHtmlTags = ['script'];\n\n  /** Walk an element */\n  function walk(element: HTMLElement, windows: ViewHierarchyWindow[], depth = 0): void {\n    if (!element) {\n      return;\n    }\n\n    // With Web Components, we need to walk into shadow DOMs\n    const children = 'shadowRoot' in element && element.shadowRoot ? element.shadowRoot.children : element.children;\n\n    for (const child of children) {\n      if (!(child instanceof HTMLElement)) {\n        continue;\n      }\n\n      const componentName = getComponentName(child, 1) || undefined;\n      const tagName = child.tagName.toLowerCase();\n\n      if (skipHtmlTags.includes(tagName)) {\n        continue;\n      }\n\n      const result = options.onElement?.({ element: child, componentName, tagName, depth }) || {};\n\n      if (result === 'skip') {\n        continue;\n      }\n\n      // Skip this element but include its children\n      if (result === 'children') {\n        walk(child, windows, depth + 1);\n        continue;\n      }\n\n      const { x, y, width, height } = child.getBoundingClientRect();\n\n      const window: ViewHierarchyWindow = {\n        identifier: (child.id || undefined) as string,\n        type: componentName || tagName,\n        visible: true,\n        alpha: 1,\n        height,\n        width,\n        x,\n        y,\n        ...result,\n      };\n\n      const children: ViewHierarchyWindow[] = [];\n      window.children = children;\n\n      // Recursively walk the children\n      walk(child, window.children, depth + 1);\n\n      windows.push(window);\n    }\n  }\n\n  return {\n    name: 'ViewHierarchy' as const,\n    processEvent: (event, hint) => {\n      // only capture for error events\n      if (event.type !== undefined || options.shouldAttach?.(event, hint) === false) {\n        return event;\n      }\n\n      const root: ViewHierarchyData = {\n        rendering_system: 'DOM',\n        positioning: 'absolute',\n        windows: [],\n      };\n\n      walk(options.rootElement?.() || WINDOW.document.body, root.windows);\n\n      const attachment: Attachment = {\n        filename: 'view-hierarchy.json',\n        attachmentType: 'event.view_hierarchy',\n        contentType: 'application/json',\n        data: JSON.stringify(root),\n      };\n\n      hint.attachments = hint.attachments || [];\n      hint.attachments.push(attachment);\n\n      return event;\n    },\n  };\n});\n", "import { GLOBAL_OBJ } from '@sentry/core';\n\n// exporting a separate copy of `WINDOW` rather than exporting the one from `@sentry/browser`\n// prevents the browser package from being bundled in the CDN bundle, and avoids a\n// circular dependency between the browser and replay packages should `@sentry/browser` import\n// from `@sentry/replay` in the future\nexport const WINDOW = GLOBAL_OBJ as typeof GLOBAL_OBJ & Window;\n\nexport const REPLAY_SESSION_KEY = 'sentryReplaySession';\nexport const REPLAY_EVENT_NAME = 'replay_event';\nexport const RECORDING_EVENT_NAME = 'replay_recording';\nexport const UNABLE_TO_SEND_REPLAY = 'Unable to send Replay';\n\n// The idle limit for a session after which recording is paused.\nexport const SESSION_IDLE_PAUSE_DURATION = 300_000; // 5 minutes in ms\n\n// The idle limit for a session after which the session expires.\nexport const SESSION_IDLE_EXPIRE_DURATION = 900_000; // 15 minutes in ms\n\n/** Default flush delays */\nexport const DEFAULT_FLUSH_MIN_DELAY = 5_000;\n// XXX: Temp fix for our debounce logic where `maxWait` would never occur if it\n// was the same as `wait`\nexport const DEFAULT_FLUSH_MAX_DELAY = 5_500;\n\n/* How long to wait for error checkouts */\nexport const BUFFER_CHECKOUT_TIME = 60_000;\n\nexport const RETRY_BASE_INTERVAL = 5000;\nexport const RETRY_MAX_COUNT = 3;\n\n/* The max (uncompressed) size in bytes of a network body. Any body larger than this will be truncated. */\nexport const NETWORK_BODY_MAX_SIZE = 150_000;\n\n/* The max size of a single console arg that is captured. Any arg larger than this will be truncated. */\nexport const CONSOLE_ARG_MAX_SIZE = 5_000;\n\n/* Min. time to wait before we consider something a slow click. */\nexport const SLOW_CLICK_THRESHOLD = 3_000;\n/* For scroll actions after a click, we only look for a very short time period to detect programmatic scrolling. */\nexport const SLOW_CLICK_SCROLL_TIMEOUT = 300;\n\n/** When encountering a total segment size exceeding this size, stop the replay (as we cannot properly ingest it). */\nexport const REPLAY_MAX_EVENT_BUFFER_SIZE = 20_000_000; // ~20MB\n\n/** Replays must be min. 5s long before we send them. */\nexport const MIN_REPLAY_DURATION = 4_999;\n\n/*\nThe max. allowed value that the minReplayDuration can be set to.\nThis needs to be below 60s, so we don't unintentionally drop buffered replays that are longer than 60s.\n*/\nexport const MIN_REPLAY_DURATION_LIMIT = 50_000;\n\n/** The max. length of a replay. */\nexport const MAX_REPLAY_DURATION = 3_600_000; // 60 minutes in ms;\n\n/** Default attributes to be ignored when `maskAllText` is enabled */\nexport const DEFAULT_IGNORED_ATTRIBUTES = ['title', 'placeholder'];\n", "var __defProp = Object.defineProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\nvar NodeType = /* @__PURE__ */ ((NodeType2) => {\n  NodeType2[NodeType2[\"Document\"] = 0] = \"Document\";\n  NodeType2[NodeType2[\"DocumentType\"] = 1] = \"DocumentType\";\n  NodeType2[NodeType2[\"Element\"] = 2] = \"Element\";\n  NodeType2[NodeType2[\"Text\"] = 3] = \"Text\";\n  NodeType2[NodeType2[\"CDATA\"] = 4] = \"CDATA\";\n  NodeType2[NodeType2[\"Comment\"] = 5] = \"Comment\";\n  return NodeType2;\n})(NodeType || {});\nfunction isElement(n) {\n  return n.nodeType === n.ELEMENT_NODE;\n}\nfunction isShadowRoot(n) {\n  const host = n?.host;\n  return Boolean(host?.shadowRoot === n);\n}\nfunction isNativeShadowDom(shadowRoot) {\n  return Object.prototype.toString.call(shadowRoot) === \"[object ShadowRoot]\";\n}\nfunction fixBrowserCompatibilityIssuesInCSS(cssText) {\n  if (cssText.includes(\" background-clip: text;\") && !cssText.includes(\" -webkit-background-clip: text;\")) {\n    cssText = cssText.replace(\n      /\\sbackground-clip:\\s*text;/g,\n      \" -webkit-background-clip: text; background-clip: text;\"\n    );\n  }\n  return cssText;\n}\nfunction escapeImportStatement(rule) {\n  const { cssText } = rule;\n  if (cssText.split('\"').length < 3) return cssText;\n  const statement = [\"@import\", `url(${JSON.stringify(rule.href)})`];\n  if (rule.layerName === \"\") {\n    statement.push(`layer`);\n  } else if (rule.layerName) {\n    statement.push(`layer(${rule.layerName})`);\n  }\n  if (rule.supportsText) {\n    statement.push(`supports(${rule.supportsText})`);\n  }\n  if (rule.media.length) {\n    statement.push(rule.media.mediaText);\n  }\n  return statement.join(\" \") + \";\";\n}\nfunction stringifyStylesheet(s) {\n  try {\n    const rules = s.rules || s.cssRules;\n    return rules ? fixBrowserCompatibilityIssuesInCSS(\n      Array.from(rules, stringifyRule).join(\"\")\n    ) : null;\n  } catch (error) {\n    return null;\n  }\n}\nfunction fixAllCssProperty(rule) {\n  let styles = \"\";\n  for (let i = 0; i < rule.style.length; i++) {\n    const styleDeclaration = rule.style;\n    const attribute = styleDeclaration[i];\n    const isImportant = styleDeclaration.getPropertyPriority(attribute);\n    styles += `${attribute}:${styleDeclaration.getPropertyValue(attribute)}${isImportant ? ` !important` : \"\"};`;\n  }\n  return `${rule.selectorText} { ${styles} }`;\n}\nfunction stringifyRule(rule) {\n  let importStringified;\n  if (isCSSImportRule(rule)) {\n    try {\n      importStringified = // for same-origin stylesheets,\n      // we can access the imported stylesheet rules directly\n      stringifyStylesheet(rule.styleSheet) || // work around browser issues with the raw string `@import url(...)` statement\n      escapeImportStatement(rule);\n    } catch (error) {\n    }\n  } else if (isCSSStyleRule(rule)) {\n    let cssText = rule.cssText;\n    const needsSafariColonFix = rule.selectorText.includes(\":\");\n    const needsAllFix = typeof rule.style[\"all\"] === \"string\" && rule.style[\"all\"];\n    if (needsAllFix) {\n      cssText = fixAllCssProperty(rule);\n    }\n    if (needsSafariColonFix) {\n      cssText = fixSafariColons(cssText);\n    }\n    if (needsSafariColonFix || needsAllFix) {\n      return cssText;\n    }\n  }\n  return importStringified || rule.cssText;\n}\nfunction fixSafariColons(cssStringified) {\n  const regex = /(\\[(?:[\\w-]+)[^\\\\])(:(?:[\\w-]+)\\])/gm;\n  return cssStringified.replace(regex, \"$1\\\\$2\");\n}\nfunction isCSSImportRule(rule) {\n  return \"styleSheet\" in rule;\n}\nfunction isCSSStyleRule(rule) {\n  return \"selectorText\" in rule;\n}\nclass Mirror {\n  constructor() {\n    __publicField(this, \"idNodeMap\", /* @__PURE__ */ new Map());\n    __publicField(this, \"nodeMetaMap\", /* @__PURE__ */ new WeakMap());\n  }\n  getId(n) {\n    if (!n) return -1;\n    const id = this.getMeta(n)?.id;\n    return id ?? -1;\n  }\n  getNode(id) {\n    return this.idNodeMap.get(id) || null;\n  }\n  getIds() {\n    return Array.from(this.idNodeMap.keys());\n  }\n  getMeta(n) {\n    return this.nodeMetaMap.get(n) || null;\n  }\n  // removes the node from idNodeMap\n  // doesn't remove the node from nodeMetaMap\n  removeNodeFromMap(n) {\n    const id = this.getId(n);\n    this.idNodeMap.delete(id);\n    if (n.childNodes) {\n      n.childNodes.forEach(\n        (childNode) => this.removeNodeFromMap(childNode)\n      );\n    }\n  }\n  has(id) {\n    return this.idNodeMap.has(id);\n  }\n  hasNode(node) {\n    return this.nodeMetaMap.has(node);\n  }\n  add(n, meta) {\n    const id = meta.id;\n    this.idNodeMap.set(id, n);\n    this.nodeMetaMap.set(n, meta);\n  }\n  replace(id, n) {\n    const oldNode = this.getNode(id);\n    if (oldNode) {\n      const meta = this.nodeMetaMap.get(oldNode);\n      if (meta) this.nodeMetaMap.set(n, meta);\n    }\n    this.idNodeMap.set(id, n);\n  }\n  reset() {\n    this.idNodeMap = /* @__PURE__ */ new Map();\n    this.nodeMetaMap = /* @__PURE__ */ new WeakMap();\n  }\n}\nfunction createMirror() {\n  return new Mirror();\n}\nfunction shouldMaskInput({\n  maskInputOptions,\n  tagName,\n  type\n}) {\n  if (tagName === \"OPTION\") {\n    tagName = \"SELECT\";\n  }\n  return Boolean(\n    maskInputOptions[tagName.toLowerCase()] || type && maskInputOptions[type] || type === \"password\" || // Default to \"text\" option for inputs without a \"type\" attribute defined\n    tagName === \"INPUT\" && !type && maskInputOptions[\"text\"]\n  );\n}\nfunction maskInputValue({\n  isMasked,\n  element,\n  value,\n  maskInputFn\n}) {\n  let text = value || \"\";\n  if (!isMasked) {\n    return text;\n  }\n  if (maskInputFn) {\n    text = maskInputFn(text, element);\n  }\n  return \"*\".repeat(text.length);\n}\nfunction toLowerCase(str) {\n  return str.toLowerCase();\n}\nfunction toUpperCase(str) {\n  return str.toUpperCase();\n}\nconst ORIGINAL_ATTRIBUTE_NAME = \"__rrweb_original__\";\nfunction is2DCanvasBlank(canvas) {\n  const ctx = canvas.getContext(\"2d\");\n  if (!ctx) return true;\n  const chunkSize = 50;\n  for (let x = 0; x < canvas.width; x += chunkSize) {\n    for (let y = 0; y < canvas.height; y += chunkSize) {\n      const getImageData = ctx.getImageData;\n      const originalGetImageData = ORIGINAL_ATTRIBUTE_NAME in getImageData ? getImageData[ORIGINAL_ATTRIBUTE_NAME] : getImageData;\n      const pixelBuffer = new Uint32Array(\n        // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access\n        originalGetImageData.call(\n          ctx,\n          x,\n          y,\n          Math.min(chunkSize, canvas.width - x),\n          Math.min(chunkSize, canvas.height - y)\n        ).data.buffer\n      );\n      if (pixelBuffer.some((pixel) => pixel !== 0)) return false;\n    }\n  }\n  return true;\n}\nfunction isNodeMetaEqual(a, b) {\n  if (!a || !b || a.type !== b.type) return false;\n  if (a.type === NodeType.Document)\n    return a.compatMode === b.compatMode;\n  else if (a.type === NodeType.DocumentType)\n    return a.name === b.name && a.publicId === b.publicId && a.systemId === b.systemId;\n  else if (a.type === NodeType.Comment || a.type === NodeType.Text || a.type === NodeType.CDATA)\n    return a.textContent === b.textContent;\n  else if (a.type === NodeType.Element)\n    return a.tagName === b.tagName && JSON.stringify(a.attributes) === JSON.stringify(b.attributes) && a.isSVG === b.isSVG && a.needBlock === b.needBlock;\n  return false;\n}\nfunction getInputType(element) {\n  const type = element.type;\n  return element.hasAttribute(\"data-rr-is-password\") ? \"password\" : type ? (\n    // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n    toLowerCase(type)\n  ) : null;\n}\nfunction getInputValue(el, tagName, type) {\n  if (tagName === \"INPUT\" && (type === \"radio\" || type === \"checkbox\")) {\n    return el.getAttribute(\"value\") || \"\";\n  }\n  return el.value;\n}\nfunction extractFileExtension(path, baseURL) {\n  let url;\n  try {\n    url = new URL(path, baseURL ?? window.location.href);\n  } catch (err) {\n    return null;\n  }\n  const regex = /\\.([0-9a-z]+)(?:$)/i;\n  const match = url.pathname.match(regex);\n  return match?.[1] ?? null;\n}\nconst cachedImplementations$1 = {};\nfunction getImplementation$1(name) {\n  const cached = cachedImplementations$1[name];\n  if (cached) {\n    return cached;\n  }\n  const document2 = window.document;\n  let impl = window[name];\n  if (document2 && typeof document2.createElement === \"function\") {\n    try {\n      const sandbox = document2.createElement(\"iframe\");\n      sandbox.hidden = true;\n      document2.head.appendChild(sandbox);\n      const contentWindow = sandbox.contentWindow;\n      if (contentWindow && contentWindow[name]) {\n        impl = // eslint-disable-next-line @typescript-eslint/unbound-method\n        contentWindow[name];\n      }\n      document2.head.removeChild(sandbox);\n    } catch (e) {\n    }\n  }\n  return cachedImplementations$1[name] = impl.bind(\n    window\n  );\n}\nfunction setTimeout$1(...rest) {\n  return getImplementation$1(\"setTimeout\")(...rest);\n}\nfunction clearTimeout$1(...rest) {\n  return getImplementation$1(\"clearTimeout\")(...rest);\n}\nfunction getIFrameContentDocument(iframe) {\n  try {\n    return iframe.contentDocument;\n  } catch {\n  }\n}\nfunction getIFrameContentWindow(iframe) {\n  try {\n    return iframe.contentWindow;\n  } catch {\n  }\n}\nlet _id = 1;\nconst tagNameRegex = new RegExp(\"[^a-z0-9-_:]\");\nconst IGNORED_NODE = -2;\nfunction genId() {\n  return _id++;\n}\nfunction getValidTagName(element) {\n  if (element instanceof HTMLFormElement) {\n    return \"form\";\n  }\n  const processedTagName = toLowerCase(element.tagName);\n  if (tagNameRegex.test(processedTagName)) {\n    return \"div\";\n  }\n  return processedTagName;\n}\nfunction extractOrigin(url) {\n  let origin = \"\";\n  if (url.indexOf(\"//\") > -1) {\n    origin = url.split(\"/\").slice(0, 3).join(\"/\");\n  } else {\n    origin = url.split(\"/\")[0];\n  }\n  origin = origin.split(\"?\")[0];\n  return origin;\n}\nlet canvasService;\nlet canvasCtx;\nconst URL_IN_CSS_REF = /url\\((?:(')([^']*)'|(\")(.*?)\"|([^)]*))\\)/gm;\nconst URL_PROTOCOL_MATCH = /^(?:[a-z+]+:)?\\/\\//i;\nconst URL_WWW_MATCH = /^www\\..*/i;\nconst DATA_URI = /^(data:)([^,]*),(.*)/i;\nfunction filterCSSPropertiesFromInlineStyle(cssText, ignoredProperties) {\n  if (!cssText || ignoredProperties.size === 0) {\n    return cssText;\n  }\n  try {\n    const properties = cssText.split(\";\");\n    const filteredProperties = [];\n    for (let property of properties) {\n      property = property.trim();\n      if (!property) continue;\n      const colonIndex = property.indexOf(\":\");\n      if (colonIndex === -1) {\n        filteredProperties.push(property);\n        continue;\n      }\n      const propertyName = property.slice(0, colonIndex).trim();\n      if (!ignoredProperties.has(propertyName)) {\n        filteredProperties.push(property);\n      }\n    }\n    return filteredProperties.join(\"; \") + (filteredProperties.length > 0 && cssText.endsWith(\";\") ? \";\" : \"\");\n  } catch (error) {\n    console.warn(\"Error filtering CSS properties:\", error);\n    return cssText;\n  }\n}\nfunction absoluteToStylesheet(cssText, href) {\n  return (cssText || \"\").replace(\n    URL_IN_CSS_REF,\n    (origin, quote1, path1, quote2, path2, path3) => {\n      const filePath = path1 || path2 || path3;\n      const maybeQuote = quote1 || quote2 || \"\";\n      if (!filePath) {\n        return origin;\n      }\n      if (URL_PROTOCOL_MATCH.test(filePath) || URL_WWW_MATCH.test(filePath)) {\n        return `url(${maybeQuote}${filePath}${maybeQuote})`;\n      }\n      if (DATA_URI.test(filePath)) {\n        return `url(${maybeQuote}${filePath}${maybeQuote})`;\n      }\n      if (filePath[0] === \"/\") {\n        return `url(${maybeQuote}${extractOrigin(href) + filePath}${maybeQuote})`;\n      }\n      const stack = href.split(\"/\");\n      const parts = filePath.split(\"/\");\n      stack.pop();\n      for (const part of parts) {\n        if (part === \".\") {\n          continue;\n        } else if (part === \"..\") {\n          stack.pop();\n        } else {\n          stack.push(part);\n        }\n      }\n      return `url(${maybeQuote}${stack.join(\"/\")}${maybeQuote})`;\n    }\n  );\n}\nconst SRCSET_NOT_SPACES = /^[^ \\t\\n\\r\\u000c]+/;\nconst SRCSET_COMMAS_OR_SPACES = /^[, \\t\\n\\r\\u000c]+/;\nfunction getAbsoluteSrcsetString(doc, attributeValue) {\n  if (attributeValue.trim() === \"\") {\n    return attributeValue;\n  }\n  let pos = 0;\n  function collectCharacters(regEx) {\n    let chars2;\n    const match = regEx.exec(attributeValue.substring(pos));\n    if (match) {\n      chars2 = match[0];\n      pos += chars2.length;\n      return chars2;\n    }\n    return \"\";\n  }\n  const output = [];\n  while (true) {\n    collectCharacters(SRCSET_COMMAS_OR_SPACES);\n    if (pos >= attributeValue.length) {\n      break;\n    }\n    let url = collectCharacters(SRCSET_NOT_SPACES);\n    if (url.slice(-1) === \",\") {\n      url = absoluteToDoc(doc, url.substring(0, url.length - 1));\n      output.push(url);\n    } else {\n      let descriptorsStr = \"\";\n      url = absoluteToDoc(doc, url);\n      let inParens = false;\n      while (true) {\n        const c = attributeValue.charAt(pos);\n        if (c === \"\") {\n          output.push((url + descriptorsStr).trim());\n          break;\n        } else if (!inParens) {\n          if (c === \",\") {\n            pos += 1;\n            output.push((url + descriptorsStr).trim());\n            break;\n          } else if (c === \"(\") {\n            inParens = true;\n          }\n        } else {\n          if (c === \")\") {\n            inParens = false;\n          }\n        }\n        descriptorsStr += c;\n        pos += 1;\n      }\n    }\n  }\n  return output.join(\", \");\n}\nconst cachedDocument = /* @__PURE__ */ new WeakMap();\nfunction absoluteToDoc(doc, attributeValue) {\n  if (!attributeValue || attributeValue.trim() === \"\") {\n    return attributeValue;\n  }\n  return getHref(doc, attributeValue);\n}\nfunction isSVGElement(el) {\n  return Boolean(el.tagName === \"svg\" || el.ownerSVGElement);\n}\nfunction getHref(doc, customHref) {\n  let a = cachedDocument.get(doc);\n  if (!a) {\n    a = doc.createElement(\"a\");\n    cachedDocument.set(doc, a);\n  }\n  if (!customHref) {\n    customHref = \"\";\n  } else if (customHref.startsWith(\"blob:\") || customHref.startsWith(\"data:\")) {\n    return customHref;\n  }\n  a.setAttribute(\"href\", customHref);\n  return a.href;\n}\nfunction transformAttribute(doc, tagName, name, value, element, maskAttributeFn, ignoreCSSAttributes) {\n  if (!value) {\n    return value;\n  }\n  if (name === \"src\" || name === \"href\" && !(tagName === \"use\" && value[0] === \"#\")) {\n    return absoluteToDoc(doc, value);\n  } else if (name === \"xlink:href\" && value[0] !== \"#\") {\n    return absoluteToDoc(doc, value);\n  } else if (name === \"background\" && (tagName === \"table\" || tagName === \"td\" || tagName === \"th\")) {\n    return absoluteToDoc(doc, value);\n  } else if (name === \"srcset\") {\n    return getAbsoluteSrcsetString(doc, value);\n  } else if (name === \"style\") {\n    let processedStyle = absoluteToStylesheet(value, getHref(doc));\n    if (ignoreCSSAttributes && ignoreCSSAttributes.size > 0) {\n      processedStyle = filterCSSPropertiesFromInlineStyle(\n        processedStyle,\n        ignoreCSSAttributes\n      );\n    }\n    return processedStyle;\n  } else if (tagName === \"object\" && name === \"data\") {\n    return absoluteToDoc(doc, value);\n  }\n  if (typeof maskAttributeFn === \"function\") {\n    return maskAttributeFn(name, value, element);\n  }\n  return value;\n}\nfunction ignoreAttribute(tagName, name, _value) {\n  return (tagName === \"video\" || tagName === \"audio\") && name === \"autoplay\";\n}\nfunction _isBlockedElement(element, blockClass, blockSelector, unblockSelector) {\n  try {\n    if (unblockSelector && element.matches(unblockSelector)) {\n      return false;\n    }\n    if (typeof blockClass === \"string\") {\n      if (element.classList.contains(blockClass)) {\n        return true;\n      }\n    } else {\n      for (let eIndex = element.classList.length; eIndex--; ) {\n        const className = element.classList[eIndex];\n        if (blockClass.test(className)) {\n          return true;\n        }\n      }\n    }\n    if (blockSelector) {\n      return element.matches(blockSelector);\n    }\n  } catch (e) {\n  }\n  return false;\n}\nfunction elementClassMatchesRegex(el, regex) {\n  for (let eIndex = el.classList.length; eIndex--; ) {\n    const className = el.classList[eIndex];\n    if (regex.test(className)) {\n      return true;\n    }\n  }\n  return false;\n}\nfunction distanceToMatch(node, matchPredicate, limit = Infinity, distance = 0) {\n  if (!node) return -1;\n  if (node.nodeType !== node.ELEMENT_NODE) return -1;\n  if (distance > limit) return -1;\n  if (matchPredicate(node)) return distance;\n  return distanceToMatch(node.parentNode, matchPredicate, limit, distance + 1);\n}\nfunction createMatchPredicate(className, selector) {\n  return (node) => {\n    const el = node;\n    if (el === null) return false;\n    try {\n      if (className) {\n        if (typeof className === \"string\") {\n          if (el.matches(`.${className}`)) return true;\n        } else if (elementClassMatchesRegex(el, className)) {\n          return true;\n        }\n      }\n      if (selector && el.matches(selector)) return true;\n      return false;\n    } catch {\n      return false;\n    }\n  };\n}\nfunction needMaskingText(node, maskTextClass, maskTextSelector, unmaskTextClass, unmaskTextSelector, maskAllText) {\n  try {\n    const el = node.nodeType === node.ELEMENT_NODE ? node : node.parentElement;\n    if (el === null) return false;\n    if (el.tagName === \"INPUT\") {\n      const autocomplete = el.getAttribute(\"autocomplete\");\n      const disallowedAutocompleteValues = [\n        \"current-password\",\n        \"new-password\",\n        \"cc-number\",\n        \"cc-exp\",\n        \"cc-exp-month\",\n        \"cc-exp-year\",\n        \"cc-csc\"\n      ];\n      if (disallowedAutocompleteValues.includes(autocomplete)) {\n        return true;\n      }\n    }\n    let maskDistance = -1;\n    let unmaskDistance = -1;\n    if (maskAllText) {\n      unmaskDistance = distanceToMatch(\n        el,\n        createMatchPredicate(unmaskTextClass, unmaskTextSelector)\n      );\n      if (unmaskDistance < 0) {\n        return true;\n      }\n      maskDistance = distanceToMatch(\n        el,\n        createMatchPredicate(maskTextClass, maskTextSelector),\n        unmaskDistance >= 0 ? unmaskDistance : Infinity\n      );\n    } else {\n      maskDistance = distanceToMatch(\n        el,\n        createMatchPredicate(maskTextClass, maskTextSelector)\n      );\n      if (maskDistance < 0) {\n        return false;\n      }\n      unmaskDistance = distanceToMatch(\n        el,\n        createMatchPredicate(unmaskTextClass, unmaskTextSelector),\n        maskDistance >= 0 ? maskDistance : Infinity\n      );\n    }\n    return maskDistance >= 0 ? unmaskDistance >= 0 ? maskDistance <= unmaskDistance : true : unmaskDistance >= 0 ? false : !!maskAllText;\n  } catch (e) {\n  }\n  return !!maskAllText;\n}\nfunction onceIframeLoaded(iframeEl, listener, iframeLoadTimeout) {\n  const win = getIFrameContentWindow(iframeEl);\n  if (!win) {\n    return;\n  }\n  let fired = false;\n  let readyState;\n  try {\n    readyState = win.document.readyState;\n  } catch (error) {\n    return;\n  }\n  if (readyState !== \"complete\") {\n    const timer = setTimeout$1(() => {\n      if (!fired) {\n        listener();\n        fired = true;\n      }\n    }, iframeLoadTimeout);\n    iframeEl.addEventListener(\"load\", () => {\n      clearTimeout$1(timer);\n      fired = true;\n      listener();\n    });\n    return;\n  }\n  const blankUrl = \"about:blank\";\n  if (win.location.href !== blankUrl || iframeEl.src === blankUrl || iframeEl.src === \"\") {\n    setTimeout$1(listener, 0);\n    return iframeEl.addEventListener(\"load\", listener);\n  }\n  iframeEl.addEventListener(\"load\", listener);\n}\nfunction onceStylesheetLoaded(link, listener, styleSheetLoadTimeout) {\n  let fired = false;\n  let styleSheetLoaded;\n  try {\n    styleSheetLoaded = link.sheet;\n  } catch (error) {\n    styleSheetLoaded = null;\n  }\n  if (styleSheetLoaded) return;\n  const timer = setTimeout$1(() => {\n    if (!fired) {\n      listener();\n      fired = true;\n    }\n  }, styleSheetLoadTimeout);\n  link.addEventListener(\"load\", () => {\n    clearTimeout$1(timer);\n    fired = true;\n    listener();\n  });\n}\nfunction serializeNode(n, options) {\n  const {\n    doc,\n    mirror,\n    blockClass,\n    blockSelector,\n    unblockSelector,\n    maskAllText,\n    maskAttributeFn,\n    maskTextClass,\n    unmaskTextClass,\n    maskTextSelector,\n    unmaskTextSelector,\n    inlineStylesheet,\n    maskInputOptions = {},\n    maskTextFn,\n    maskInputFn,\n    dataURLOptions = {},\n    inlineImages,\n    recordCanvas,\n    keepIframeSrcFn,\n    newlyAddedElement = false,\n    ignoreCSSAttributes\n  } = options;\n  const rootId = getRootId(doc, mirror);\n  switch (n.nodeType) {\n    case n.DOCUMENT_NODE:\n      if (n.compatMode !== \"CSS1Compat\") {\n        return {\n          type: NodeType.Document,\n          childNodes: [],\n          compatMode: n.compatMode\n          // probably \"BackCompat\"\n        };\n      } else {\n        return {\n          type: NodeType.Document,\n          childNodes: []\n        };\n      }\n    case n.DOCUMENT_TYPE_NODE:\n      return {\n        type: NodeType.DocumentType,\n        name: n.name,\n        publicId: n.publicId,\n        systemId: n.systemId,\n        rootId\n      };\n    case n.ELEMENT_NODE:\n      return serializeElementNode(n, {\n        doc,\n        blockClass,\n        blockSelector,\n        unblockSelector,\n        inlineStylesheet,\n        maskAttributeFn,\n        maskInputOptions,\n        maskInputFn,\n        dataURLOptions,\n        inlineImages,\n        recordCanvas,\n        keepIframeSrcFn,\n        newlyAddedElement,\n        rootId,\n        maskTextClass,\n        unmaskTextClass,\n        maskTextSelector,\n        unmaskTextSelector,\n        ignoreCSSAttributes\n      });\n    case n.TEXT_NODE:\n      return serializeTextNode(n, {\n        doc,\n        maskAllText,\n        maskTextClass,\n        unmaskTextClass,\n        maskTextSelector,\n        unmaskTextSelector,\n        maskTextFn,\n        maskInputOptions,\n        maskInputFn,\n        rootId\n      });\n    case n.CDATA_SECTION_NODE:\n      return {\n        type: NodeType.CDATA,\n        textContent: \"\",\n        rootId\n      };\n    case n.COMMENT_NODE:\n      return {\n        type: NodeType.Comment,\n        textContent: n.textContent || \"\",\n        rootId\n      };\n    default:\n      return false;\n  }\n}\nfunction getRootId(doc, mirror) {\n  if (!mirror.hasNode(doc)) return void 0;\n  const docId = mirror.getId(doc);\n  return docId === 1 ? void 0 : docId;\n}\nfunction serializeTextNode(n, options) {\n  const {\n    maskAllText,\n    maskTextClass,\n    unmaskTextClass,\n    maskTextSelector,\n    unmaskTextSelector,\n    maskTextFn,\n    maskInputOptions,\n    maskInputFn,\n    rootId\n  } = options;\n  const parentTagName = n.parentNode && n.parentNode.tagName;\n  let textContent = n.textContent;\n  const isStyle = parentTagName === \"STYLE\" ? true : void 0;\n  const isScript = parentTagName === \"SCRIPT\" ? true : void 0;\n  const isTextarea = parentTagName === \"TEXTAREA\" ? true : void 0;\n  if (isStyle && textContent) {\n    try {\n      if (n.nextSibling || n.previousSibling) {\n      } else if (n.parentNode.sheet?.cssRules) {\n        textContent = stringifyStylesheet(\n          n.parentNode.sheet\n        );\n      }\n    } catch (err) {\n      console.warn(\n        `Cannot get CSS styles from text's parentNode. Error: ${err}`,\n        n\n      );\n    }\n    textContent = absoluteToStylesheet(textContent, getHref(options.doc));\n  }\n  if (isScript) {\n    textContent = \"SCRIPT_PLACEHOLDER\";\n  }\n  const forceMask = needMaskingText(\n    n,\n    maskTextClass,\n    maskTextSelector,\n    unmaskTextClass,\n    unmaskTextSelector,\n    maskAllText\n  );\n  if (!isStyle && !isScript && !isTextarea && textContent && forceMask) {\n    textContent = maskTextFn ? maskTextFn(textContent, n.parentElement) : textContent.replace(/[\\S]/g, \"*\");\n  }\n  if (isTextarea && textContent && (maskInputOptions.textarea || forceMask)) {\n    textContent = maskInputFn ? maskInputFn(textContent, n.parentNode) : textContent.replace(/[\\S]/g, \"*\");\n  }\n  if (parentTagName === \"OPTION\" && textContent) {\n    const isInputMasked = shouldMaskInput({\n      type: null,\n      tagName: parentTagName,\n      maskInputOptions\n    });\n    textContent = maskInputValue({\n      isMasked: needMaskingText(\n        n,\n        maskTextClass,\n        maskTextSelector,\n        unmaskTextClass,\n        unmaskTextSelector,\n        isInputMasked\n      ),\n      element: n,\n      value: textContent,\n      maskInputFn\n    });\n  }\n  return {\n    type: NodeType.Text,\n    textContent: textContent || \"\",\n    isStyle,\n    rootId\n  };\n}\nfunction serializeElementNode(n, options) {\n  const {\n    doc,\n    blockClass,\n    blockSelector,\n    unblockSelector,\n    inlineStylesheet,\n    maskInputOptions = {},\n    maskAttributeFn,\n    maskInputFn,\n    dataURLOptions = {},\n    inlineImages,\n    recordCanvas,\n    keepIframeSrcFn,\n    newlyAddedElement = false,\n    rootId,\n    maskTextClass,\n    unmaskTextClass,\n    maskTextSelector,\n    unmaskTextSelector,\n    ignoreCSSAttributes\n  } = options;\n  const needBlock = _isBlockedElement(\n    n,\n    blockClass,\n    blockSelector,\n    unblockSelector\n  );\n  const tagName = getValidTagName(n);\n  let attributes2 = {};\n  const len = n.attributes.length;\n  for (let i = 0; i < len; i++) {\n    const attr = n.attributes[i];\n    if (attr.name && !ignoreAttribute(tagName, attr.name, attr.value)) {\n      attributes2[attr.name] = transformAttribute(\n        doc,\n        tagName,\n        toLowerCase(attr.name),\n        attr.value,\n        n,\n        maskAttributeFn,\n        ignoreCSSAttributes\n      );\n    }\n  }\n  if (tagName === \"link\" && inlineStylesheet) {\n    const stylesheet = Array.from(doc.styleSheets).find((s) => {\n      return s.href === n.href;\n    });\n    let cssText = null;\n    if (stylesheet) {\n      cssText = stringifyStylesheet(stylesheet);\n    }\n    if (cssText) {\n      attributes2.rel = null;\n      attributes2.href = null;\n      attributes2.crossorigin = null;\n      attributes2._cssText = absoluteToStylesheet(cssText, stylesheet.href);\n    }\n  }\n  if (tagName === \"style\" && n.sheet && // TODO: Currently we only try to get dynamic stylesheet when it is an empty style element\n  !(n.innerText || n.textContent || \"\").trim().length) {\n    const cssText = stringifyStylesheet(\n      n.sheet\n    );\n    if (cssText) {\n      attributes2._cssText = absoluteToStylesheet(cssText, getHref(doc));\n    }\n  }\n  if (tagName === \"input\" || tagName === \"textarea\" || tagName === \"select\" || tagName === \"option\") {\n    const el = n;\n    const type = getInputType(el);\n    const value = getInputValue(el, toUpperCase(tagName), type);\n    const checked = el.checked;\n    if (type !== \"submit\" && type !== \"button\" && value) {\n      const forceMask = needMaskingText(\n        el,\n        maskTextClass,\n        maskTextSelector,\n        unmaskTextClass,\n        unmaskTextSelector,\n        shouldMaskInput({\n          type,\n          tagName: toUpperCase(tagName),\n          maskInputOptions\n        })\n      );\n      attributes2.value = maskInputValue({\n        isMasked: forceMask,\n        element: el,\n        value,\n        maskInputFn\n      });\n    }\n    if (checked) {\n      attributes2.checked = checked;\n    }\n  }\n  if (tagName === \"option\") {\n    if (n.selected && !maskInputOptions[\"select\"]) {\n      attributes2.selected = true;\n    } else {\n      delete attributes2.selected;\n    }\n  }\n  if (tagName === \"canvas\" && recordCanvas) {\n    if (n.__context === \"2d\") {\n      if (!is2DCanvasBlank(n)) {\n        attributes2.rr_dataURL = n.toDataURL(\n          dataURLOptions.type,\n          dataURLOptions.quality\n        );\n      }\n    } else if (!(\"__context\" in n)) {\n      const canvasDataURL = n.toDataURL(\n        dataURLOptions.type,\n        dataURLOptions.quality\n      );\n      const blankCanvas = doc.createElement(\"canvas\");\n      blankCanvas.width = n.width;\n      blankCanvas.height = n.height;\n      const blankCanvasDataURL = blankCanvas.toDataURL(\n        dataURLOptions.type,\n        dataURLOptions.quality\n      );\n      if (canvasDataURL !== blankCanvasDataURL) {\n        attributes2.rr_dataURL = canvasDataURL;\n      }\n    }\n  }\n  if (tagName === \"img\" && inlineImages) {\n    if (!canvasService) {\n      canvasService = doc.createElement(\"canvas\");\n      canvasCtx = canvasService.getContext(\"2d\");\n    }\n    const image = n;\n    const imageSrc = image.currentSrc || image.getAttribute(\"src\") || \"<unknown-src>\";\n    const priorCrossOrigin = image.crossOrigin;\n    const recordInlineImage = () => {\n      image.removeEventListener(\"load\", recordInlineImage);\n      try {\n        canvasService.width = image.naturalWidth;\n        canvasService.height = image.naturalHeight;\n        canvasCtx.drawImage(image, 0, 0);\n        attributes2.rr_dataURL = canvasService.toDataURL(\n          dataURLOptions.type,\n          dataURLOptions.quality\n        );\n      } catch (err) {\n        if (image.crossOrigin !== \"anonymous\") {\n          image.crossOrigin = \"anonymous\";\n          if (image.complete && image.naturalWidth !== 0)\n            recordInlineImage();\n          else image.addEventListener(\"load\", recordInlineImage);\n          return;\n        } else {\n          console.warn(\n            `Cannot inline img src=${imageSrc}! Error: ${err}`\n          );\n        }\n      }\n      if (image.crossOrigin === \"anonymous\") {\n        priorCrossOrigin ? attributes2.crossOrigin = priorCrossOrigin : image.removeAttribute(\"crossorigin\");\n      }\n    };\n    if (image.complete && image.naturalWidth !== 0) recordInlineImage();\n    else image.addEventListener(\"load\", recordInlineImage);\n  }\n  if (tagName === \"audio\" || tagName === \"video\") {\n    attributes2.rr_mediaState = n.paused ? \"paused\" : \"played\";\n    attributes2.rr_mediaCurrentTime = n.currentTime;\n  }\n  if (!newlyAddedElement) {\n    if (n.scrollLeft) {\n      attributes2.rr_scrollLeft = n.scrollLeft;\n    }\n    if (n.scrollTop) {\n      attributes2.rr_scrollTop = n.scrollTop;\n    }\n  }\n  if (needBlock) {\n    const { width, height } = n.getBoundingClientRect();\n    attributes2 = {\n      class: attributes2.class,\n      rr_width: `${width}px`,\n      rr_height: `${height}px`\n    };\n  }\n  if (tagName === \"iframe\" && !keepIframeSrcFn(attributes2.src)) {\n    if (!needBlock && !getIFrameContentDocument(n)) {\n      attributes2.rr_src = attributes2.src;\n    }\n    delete attributes2.src;\n  }\n  let isCustomElement;\n  try {\n    if (customElements.get(tagName)) isCustomElement = true;\n  } catch (e) {\n  }\n  return {\n    type: NodeType.Element,\n    tagName,\n    attributes: attributes2,\n    childNodes: [],\n    isSVG: isSVGElement(n) || void 0,\n    needBlock,\n    rootId,\n    isCustom: isCustomElement\n  };\n}\nfunction lowerIfExists(maybeAttr) {\n  if (maybeAttr === void 0 || maybeAttr === null) {\n    return \"\";\n  } else {\n    return maybeAttr.toLowerCase();\n  }\n}\nfunction slimDOMExcluded(sn, slimDOMOptions) {\n  if (slimDOMOptions.comment && sn.type === NodeType.Comment) {\n    return true;\n  } else if (sn.type === NodeType.Element) {\n    if (slimDOMOptions.script && // script tag\n    (sn.tagName === \"script\" || // (module)preload link\n    sn.tagName === \"link\" && (sn.attributes.rel === \"preload\" || sn.attributes.rel === \"modulepreload\") || // prefetch link\n    sn.tagName === \"link\" && sn.attributes.rel === \"prefetch\" && typeof sn.attributes.href === \"string\" && extractFileExtension(sn.attributes.href) === \"js\")) {\n      return true;\n    } else if (slimDOMOptions.headFavicon && (sn.tagName === \"link\" && sn.attributes.rel === \"shortcut icon\" || sn.tagName === \"meta\" && (lowerIfExists(sn.attributes.name).match(\n      /^msapplication-tile(image|color)$/\n    ) || lowerIfExists(sn.attributes.name) === \"application-name\" || lowerIfExists(sn.attributes.rel) === \"icon\" || lowerIfExists(sn.attributes.rel) === \"apple-touch-icon\" || lowerIfExists(sn.attributes.rel) === \"shortcut icon\"))) {\n      return true;\n    } else if (sn.tagName === \"meta\") {\n      if (slimDOMOptions.headMetaDescKeywords && lowerIfExists(sn.attributes.name).match(/^description|keywords$/)) {\n        return true;\n      } else if (slimDOMOptions.headMetaSocial && (lowerIfExists(sn.attributes.property).match(/^(og|twitter|fb):/) || // og = opengraph (facebook)\n      lowerIfExists(sn.attributes.name).match(/^(og|twitter):/) || lowerIfExists(sn.attributes.name) === \"pinterest\")) {\n        return true;\n      } else if (slimDOMOptions.headMetaRobots && (lowerIfExists(sn.attributes.name) === \"robots\" || lowerIfExists(sn.attributes.name) === \"googlebot\" || lowerIfExists(sn.attributes.name) === \"bingbot\")) {\n        return true;\n      } else if (slimDOMOptions.headMetaHttpEquiv && sn.attributes[\"http-equiv\"] !== void 0) {\n        return true;\n      } else if (slimDOMOptions.headMetaAuthorship && (lowerIfExists(sn.attributes.name) === \"author\" || lowerIfExists(sn.attributes.name) === \"generator\" || lowerIfExists(sn.attributes.name) === \"framework\" || lowerIfExists(sn.attributes.name) === \"publisher\" || lowerIfExists(sn.attributes.name) === \"progid\" || lowerIfExists(sn.attributes.property).match(/^article:/) || lowerIfExists(sn.attributes.property).match(/^product:/))) {\n        return true;\n      } else if (slimDOMOptions.headMetaVerification && (lowerIfExists(sn.attributes.name) === \"google-site-verification\" || lowerIfExists(sn.attributes.name) === \"yandex-verification\" || lowerIfExists(sn.attributes.name) === \"csrf-token\" || lowerIfExists(sn.attributes.name) === \"p:domain_verify\" || lowerIfExists(sn.attributes.name) === \"verify-v1\" || lowerIfExists(sn.attributes.name) === \"verification\" || lowerIfExists(sn.attributes.name) === \"shopify-checkout-api-token\")) {\n        return true;\n      }\n    }\n  }\n  return false;\n}\nfunction serializeNodeWithId(n, options) {\n  const {\n    doc,\n    mirror,\n    blockClass,\n    blockSelector,\n    unblockSelector,\n    maskAllText,\n    maskTextClass,\n    unmaskTextClass,\n    maskTextSelector,\n    unmaskTextSelector,\n    skipChild = false,\n    inlineStylesheet = true,\n    maskInputOptions = {},\n    maskAttributeFn,\n    maskTextFn,\n    maskInputFn,\n    slimDOMOptions,\n    dataURLOptions = {},\n    inlineImages = false,\n    recordCanvas = false,\n    onSerialize,\n    onIframeLoad,\n    iframeLoadTimeout = 5e3,\n    onBlockedImageLoad,\n    onStylesheetLoad,\n    stylesheetLoadTimeout = 5e3,\n    keepIframeSrcFn = () => false,\n    newlyAddedElement = false,\n    ignoreCSSAttributes\n  } = options;\n  let { preserveWhiteSpace = true } = options;\n  const _serializedNode = serializeNode(n, {\n    doc,\n    mirror,\n    blockClass,\n    blockSelector,\n    maskAllText,\n    unblockSelector,\n    maskTextClass,\n    unmaskTextClass,\n    maskTextSelector,\n    unmaskTextSelector,\n    inlineStylesheet,\n    maskInputOptions,\n    maskAttributeFn,\n    maskTextFn,\n    maskInputFn,\n    dataURLOptions,\n    inlineImages,\n    recordCanvas,\n    keepIframeSrcFn,\n    newlyAddedElement,\n    ignoreCSSAttributes\n  });\n  if (!_serializedNode) {\n    console.warn(n, \"not serialized\");\n    return null;\n  }\n  let id;\n  if (mirror.hasNode(n)) {\n    id = mirror.getId(n);\n  } else if (slimDOMExcluded(_serializedNode, slimDOMOptions) || !preserveWhiteSpace && _serializedNode.type === NodeType.Text && !_serializedNode.isStyle && !_serializedNode.textContent.trim().length) {\n    id = IGNORED_NODE;\n  } else {\n    id = genId();\n  }\n  const serializedNode2 = Object.assign(_serializedNode, { id });\n  mirror.add(n, serializedNode2);\n  if (id === IGNORED_NODE) {\n    return null;\n  }\n  if (onSerialize) {\n    onSerialize(n);\n  }\n  let recordChild = !skipChild;\n  if (serializedNode2.type === NodeType.Element) {\n    recordChild = recordChild && !serializedNode2.needBlock;\n    const shadowRoot = n.shadowRoot;\n    if (shadowRoot && isNativeShadowDom(shadowRoot))\n      serializedNode2.isShadowHost = true;\n  }\n  if ((serializedNode2.type === NodeType.Document || serializedNode2.type === NodeType.Element) && recordChild) {\n    if (slimDOMOptions.headWhitespace && serializedNode2.type === NodeType.Element && serializedNode2.tagName === \"head\") {\n      preserveWhiteSpace = false;\n    }\n    const bypassOptions = {\n      doc,\n      mirror,\n      blockClass,\n      blockSelector,\n      maskAllText,\n      unblockSelector,\n      maskTextClass,\n      unmaskTextClass,\n      maskTextSelector,\n      unmaskTextSelector,\n      skipChild,\n      inlineStylesheet,\n      maskInputOptions,\n      maskAttributeFn,\n      maskTextFn,\n      maskInputFn,\n      slimDOMOptions,\n      dataURLOptions,\n      inlineImages,\n      recordCanvas,\n      preserveWhiteSpace,\n      onSerialize,\n      onIframeLoad,\n      iframeLoadTimeout,\n      onBlockedImageLoad,\n      onStylesheetLoad,\n      stylesheetLoadTimeout,\n      keepIframeSrcFn,\n      ignoreCSSAttributes\n    };\n    const childNodes = n.childNodes ? Array.from(n.childNodes) : [];\n    for (const childN of childNodes) {\n      const serializedChildNode = serializeNodeWithId(childN, bypassOptions);\n      if (serializedChildNode) {\n        serializedNode2.childNodes.push(serializedChildNode);\n      }\n    }\n    if (isElement(n) && n.shadowRoot) {\n      for (const childN of Array.from(n.shadowRoot.childNodes)) {\n        const serializedChildNode = serializeNodeWithId(childN, bypassOptions);\n        if (serializedChildNode) {\n          isNativeShadowDom(n.shadowRoot) && (serializedChildNode.isShadow = true);\n          serializedNode2.childNodes.push(serializedChildNode);\n        }\n      }\n    }\n  }\n  if (n.parentNode && isShadowRoot(n.parentNode) && isNativeShadowDom(n.parentNode)) {\n    serializedNode2.isShadow = true;\n  }\n  if (serializedNode2.type === NodeType.Element && serializedNode2.tagName === \"iframe\" && !serializedNode2.needBlock) {\n    onceIframeLoaded(\n      n,\n      () => {\n        const iframeDoc = getIFrameContentDocument(n);\n        if (iframeDoc && onIframeLoad) {\n          const serializedIframeNode = serializeNodeWithId(iframeDoc, {\n            doc: iframeDoc,\n            mirror,\n            blockClass,\n            blockSelector,\n            unblockSelector,\n            maskAllText,\n            maskTextClass,\n            unmaskTextClass,\n            maskTextSelector,\n            unmaskTextSelector,\n            skipChild: false,\n            inlineStylesheet,\n            maskInputOptions,\n            maskAttributeFn,\n            maskTextFn,\n            maskInputFn,\n            slimDOMOptions,\n            dataURLOptions,\n            inlineImages,\n            recordCanvas,\n            preserveWhiteSpace,\n            onSerialize,\n            onIframeLoad,\n            iframeLoadTimeout,\n            onStylesheetLoad,\n            stylesheetLoadTimeout,\n            keepIframeSrcFn,\n            ignoreCSSAttributes\n          });\n          if (serializedIframeNode) {\n            onIframeLoad(\n              n,\n              serializedIframeNode\n            );\n          }\n        }\n      },\n      iframeLoadTimeout\n    );\n  }\n  if (serializedNode2.type === NodeType.Element && serializedNode2.tagName === \"img\" && !n.complete && serializedNode2.needBlock) {\n    const image = n;\n    const updateImageDimensions = () => {\n      if (image.isConnected && !image.complete && onBlockedImageLoad) {\n        try {\n          const rect = image.getBoundingClientRect();\n          if (rect.width > 0 && rect.height > 0) {\n            onBlockedImageLoad(image, serializedNode2, rect);\n          }\n        } catch (error) {\n        }\n      }\n      image.removeEventListener(\"load\", updateImageDimensions);\n    };\n    if (image.isConnected) {\n      image.addEventListener(\"load\", updateImageDimensions);\n    }\n  }\n  if (serializedNode2.type === NodeType.Element && serializedNode2.tagName === \"link\" && typeof serializedNode2.attributes.rel === \"string\" && (serializedNode2.attributes.rel === \"stylesheet\" || serializedNode2.attributes.rel === \"preload\" && typeof serializedNode2.attributes.href === \"string\" && extractFileExtension(serializedNode2.attributes.href) === \"css\")) {\n    onceStylesheetLoaded(\n      n,\n      () => {\n        if (onStylesheetLoad) {\n          const serializedLinkNode = serializeNodeWithId(n, {\n            doc,\n            mirror,\n            blockClass,\n            blockSelector,\n            unblockSelector,\n            maskAllText,\n            maskTextClass,\n            unmaskTextClass,\n            maskTextSelector,\n            unmaskTextSelector,\n            skipChild: false,\n            inlineStylesheet,\n            maskInputOptions,\n            maskAttributeFn,\n            maskTextFn,\n            maskInputFn,\n            slimDOMOptions,\n            dataURLOptions,\n            inlineImages,\n            recordCanvas,\n            preserveWhiteSpace,\n            onSerialize,\n            onIframeLoad,\n            iframeLoadTimeout,\n            onStylesheetLoad,\n            stylesheetLoadTimeout,\n            keepIframeSrcFn,\n            ignoreCSSAttributes\n          });\n          if (serializedLinkNode) {\n            onStylesheetLoad(\n              n,\n              serializedLinkNode\n            );\n          }\n        }\n      },\n      stylesheetLoadTimeout\n    );\n  }\n  if (serializedNode2.type === NodeType.Element) {\n    delete serializedNode2.needBlock;\n  }\n  return serializedNode2;\n}\nfunction snapshot(n, options) {\n  const {\n    mirror = new Mirror(),\n    blockClass = \"rr-block\",\n    blockSelector = null,\n    unblockSelector = null,\n    maskAllText = false,\n    maskTextClass = \"rr-mask\",\n    unmaskTextClass = null,\n    maskTextSelector = null,\n    unmaskTextSelector = null,\n    inlineStylesheet = true,\n    inlineImages = false,\n    recordCanvas = false,\n    maskAllInputs = false,\n    maskAttributeFn,\n    maskTextFn,\n    maskInputFn,\n    slimDOM = false,\n    dataURLOptions,\n    preserveWhiteSpace,\n    onSerialize,\n    onIframeLoad,\n    iframeLoadTimeout,\n    onBlockedImageLoad,\n    onStylesheetLoad,\n    stylesheetLoadTimeout,\n    keepIframeSrcFn = () => false,\n    ignoreCSSAttributes = /* @__PURE__ */ new Set([])\n  } = options || {};\n  const maskInputOptions = maskAllInputs === true ? {\n    color: true,\n    date: true,\n    \"datetime-local\": true,\n    email: true,\n    month: true,\n    number: true,\n    range: true,\n    search: true,\n    tel: true,\n    text: true,\n    time: true,\n    url: true,\n    week: true,\n    textarea: true,\n    select: true\n  } : maskAllInputs === false ? {} : maskAllInputs;\n  const slimDOMOptions = slimDOM === true || slimDOM === \"all\" ? (\n    // if true: set of sensible options that should not throw away any information\n    {\n      script: true,\n      comment: true,\n      headFavicon: true,\n      headWhitespace: true,\n      headMetaDescKeywords: slimDOM === \"all\",\n      // destructive\n      headMetaSocial: true,\n      headMetaRobots: true,\n      headMetaHttpEquiv: true,\n      headMetaAuthorship: true,\n      headMetaVerification: true\n    }\n  ) : slimDOM === false ? {} : slimDOM;\n  return serializeNodeWithId(n, {\n    doc: n,\n    mirror,\n    blockClass,\n    blockSelector,\n    unblockSelector,\n    maskAllText,\n    maskTextClass,\n    unmaskTextClass,\n    maskTextSelector,\n    unmaskTextSelector,\n    skipChild: false,\n    inlineStylesheet,\n    maskInputOptions,\n    maskAttributeFn,\n    maskTextFn,\n    maskInputFn,\n    slimDOMOptions,\n    dataURLOptions,\n    inlineImages,\n    recordCanvas,\n    preserveWhiteSpace,\n    onSerialize,\n    onIframeLoad,\n    iframeLoadTimeout,\n    onBlockedImageLoad,\n    onStylesheetLoad,\n    stylesheetLoadTimeout,\n    keepIframeSrcFn,\n    newlyAddedElement: false,\n    ignoreCSSAttributes\n  });\n}\nconst commentre = /\\/\\*[^*]*\\*+([^/*][^*]*\\*+)*\\//g;\nfunction parse(css, options = {}) {\n  let lineno = 1;\n  let column = 1;\n  function updatePosition(str) {\n    const lines = str.match(/\\n/g);\n    if (lines) {\n      lineno += lines.length;\n    }\n    const i = str.lastIndexOf(\"\\n\");\n    column = i === -1 ? column + str.length : str.length - i;\n  }\n  function position() {\n    const start = { line: lineno, column };\n    return (node) => {\n      node.position = new Position(start);\n      whitespace();\n      return node;\n    };\n  }\n  const _Position = class _Position2 {\n    constructor(start) {\n      __publicField(this, \"content\");\n      __publicField(this, \"start\");\n      __publicField(this, \"end\");\n      __publicField(this, \"source\");\n      this.start = start;\n      this.end = { line: lineno, column };\n      this.source = options.source;\n      this.content = _Position2.content;\n    }\n  };\n  __publicField(_Position, \"content\");\n  let Position = _Position;\n  Position.content = css;\n  const errorsList = [];\n  function error(msg) {\n    const err = new Error(\n      `${options.source || \"\"}:${lineno}:${column}: ${msg}`\n    );\n    err.reason = msg;\n    err.filename = options.source;\n    err.line = lineno;\n    err.column = column;\n    err.source = css;\n    if (options.silent) {\n      errorsList.push(err);\n    } else {\n      throw err;\n    }\n  }\n  function stylesheet() {\n    const rulesList = rules();\n    return {\n      type: \"stylesheet\",\n      stylesheet: {\n        source: options.source,\n        rules: rulesList,\n        parsingErrors: errorsList\n      }\n    };\n  }\n  function open() {\n    return match(/^{\\s*/);\n  }\n  function close() {\n    return match(/^}/);\n  }\n  function rules() {\n    let node;\n    const rules2 = [];\n    whitespace();\n    comments(rules2);\n    while (css.length && css.charAt(0) !== \"}\" && (node = atrule() || rule())) {\n      if (node) {\n        rules2.push(node);\n        comments(rules2);\n      }\n    }\n    return rules2;\n  }\n  function match(re) {\n    const m = re.exec(css);\n    if (!m) {\n      return;\n    }\n    const str = m[0];\n    updatePosition(str);\n    css = css.slice(str.length);\n    return m;\n  }\n  function whitespace() {\n    match(/^\\s*/);\n  }\n  function comments(rules2 = []) {\n    let c;\n    while (c = comment()) {\n      if (c) {\n        rules2.push(c);\n      }\n      c = comment();\n    }\n    return rules2;\n  }\n  function comment() {\n    const pos = position();\n    if (\"/\" !== css.charAt(0) || \"*\" !== css.charAt(1)) {\n      return;\n    }\n    let i = 2;\n    while (\"\" !== css.charAt(i) && (\"*\" !== css.charAt(i) || \"/\" !== css.charAt(i + 1))) {\n      ++i;\n    }\n    i += 2;\n    if (\"\" === css.charAt(i - 1)) {\n      return error(\"End of comment missing\");\n    }\n    const str = css.slice(2, i - 2);\n    column += 2;\n    updatePosition(str);\n    css = css.slice(i);\n    column += 2;\n    return pos({\n      type: \"comment\",\n      comment: str\n    });\n  }\n  function selector() {\n    const m = match(/^([^{]+)/);\n    if (!m) {\n      return;\n    }\n    const splitSelectors = trim(m[0]).replace(/\\/\\*[\\s\\S]*?\\*\\/+/g, \"\").replace(/\"(?:\\\\\"|[^\"])*\"|'(?:\\\\'|[^'])*'/g, (m2) => {\n      return m2.replace(/,/g, \"‌\");\n    }).split(/\\s*(?![^(]*\\)),\\s*/);\n    if (splitSelectors.length <= 1) {\n      return splitSelectors.map((s) => {\n        return s.replace(/\\u200C/g, \",\");\n      });\n    }\n    let i = 0;\n    let j = 0;\n    const len = splitSelectors.length;\n    const finalSelectors = [];\n    while (i < len) {\n      const openingParensCount = (splitSelectors[i].match(/\\(/g) || []).length;\n      const closingParensCount = (splitSelectors[i].match(/\\)/g) || []).length;\n      let unbalancedParens = openingParensCount - closingParensCount;\n      if (unbalancedParens >= 1) {\n        let foundClosingSelector = false;\n        j = i + 1;\n        while (j < len) {\n          const nextOpeningParensCount = (splitSelectors[j].match(/\\(/g) || []).length;\n          const nextClosingParensCount = (splitSelectors[j].match(/\\)/g) || []).length;\n          const nextUnbalancedParens = nextClosingParensCount - nextOpeningParensCount;\n          if (nextUnbalancedParens === unbalancedParens) {\n            finalSelectors.push(splitSelectors.slice(i, j + 1).join(\",\"));\n            i = j + 1;\n            foundClosingSelector = true;\n            break;\n          }\n          j++;\n          unbalancedParens -= nextUnbalancedParens;\n        }\n        if (foundClosingSelector) {\n          continue;\n        }\n        splitSelectors.slice(i, len).forEach((selector2) => selector2 && finalSelectors.push(selector2));\n        break;\n      }\n      splitSelectors[i] && finalSelectors.push(splitSelectors[i]);\n      i++;\n    }\n    return finalSelectors.map((s) => {\n      return s.replace(/\\u200C/g, \",\");\n    });\n  }\n  function declaration() {\n    const pos = position();\n    const propMatch = match(/^(\\*?[-#\\/\\*\\\\\\w]+(\\[[0-9a-z_-]+\\])?)\\s*/);\n    if (!propMatch) {\n      return;\n    }\n    const prop = trim(propMatch[0]);\n    if (!match(/^:\\s*/)) {\n      return error(`property missing ':'`);\n    }\n    const val = match(/^((?:'(?:\\\\'|.)*?'|\"(?:\\\\\"|.)*?\"|\\([^\\)]*?\\)|[^};])+)/);\n    const ret = pos({\n      type: \"declaration\",\n      property: prop.replace(commentre, \"\"),\n      value: val ? trim(val[0]).replace(commentre, \"\") : \"\"\n    });\n    match(/^[;\\s]*/);\n    return ret;\n  }\n  function declarations() {\n    const decls = [];\n    if (!open()) {\n      return error(`missing '{'`);\n    }\n    comments(decls);\n    let decl;\n    while (decl = declaration()) {\n      if (decl !== false) {\n        decls.push(decl);\n        comments(decls);\n      }\n      decl = declaration();\n    }\n    if (!close()) {\n      return error(`missing '}'`);\n    }\n    return decls;\n  }\n  function keyframe() {\n    let m;\n    const vals = [];\n    const pos = position();\n    while (m = match(/^((\\d+\\.\\d+|\\.\\d+|\\d+)%?|[a-z]+)\\s*/)) {\n      vals.push(m[1]);\n      match(/^,\\s*/);\n    }\n    if (!vals.length) {\n      return;\n    }\n    return pos({\n      type: \"keyframe\",\n      values: vals,\n      declarations: declarations()\n    });\n  }\n  function atkeyframes() {\n    const pos = position();\n    let m = match(/^@([-\\w]+)?keyframes\\s*/);\n    if (!m) {\n      return;\n    }\n    const vendor = m[1];\n    m = match(/^([-\\w]+)\\s*/);\n    if (!m) {\n      return error(\"@keyframes missing name\");\n    }\n    const name = m[1];\n    if (!open()) {\n      return error(`@keyframes missing '{'`);\n    }\n    let frame;\n    let frames = comments();\n    while (frame = keyframe()) {\n      frames.push(frame);\n      frames = frames.concat(comments());\n    }\n    if (!close()) {\n      return error(`@keyframes missing '}'`);\n    }\n    return pos({\n      type: \"keyframes\",\n      name,\n      vendor,\n      keyframes: frames\n    });\n  }\n  function atsupports() {\n    const pos = position();\n    const m = match(/^@supports *([^{]+)/);\n    if (!m) {\n      return;\n    }\n    const supports = trim(m[1]);\n    if (!open()) {\n      return error(`@supports missing '{'`);\n    }\n    const style = comments().concat(rules());\n    if (!close()) {\n      return error(`@supports missing '}'`);\n    }\n    return pos({\n      type: \"supports\",\n      supports,\n      rules: style\n    });\n  }\n  function athost() {\n    const pos = position();\n    const m = match(/^@host\\s*/);\n    if (!m) {\n      return;\n    }\n    if (!open()) {\n      return error(`@host missing '{'`);\n    }\n    const style = comments().concat(rules());\n    if (!close()) {\n      return error(`@host missing '}'`);\n    }\n    return pos({\n      type: \"host\",\n      rules: style\n    });\n  }\n  function atmedia() {\n    const pos = position();\n    const m = match(/^@media *([^{]+)/);\n    if (!m) {\n      return;\n    }\n    const media = trim(m[1]);\n    if (!open()) {\n      return error(`@media missing '{'`);\n    }\n    const style = comments().concat(rules());\n    if (!close()) {\n      return error(`@media missing '}'`);\n    }\n    return pos({\n      type: \"media\",\n      media,\n      rules: style\n    });\n  }\n  function atcustommedia() {\n    const pos = position();\n    const m = match(/^@custom-media\\s+(--[^\\s]+)\\s*([^{;]+);/);\n    if (!m) {\n      return;\n    }\n    return pos({\n      type: \"custom-media\",\n      name: trim(m[1]),\n      media: trim(m[2])\n    });\n  }\n  function atpage() {\n    const pos = position();\n    const m = match(/^@page */);\n    if (!m) {\n      return;\n    }\n    const sel = selector() || [];\n    if (!open()) {\n      return error(`@page missing '{'`);\n    }\n    let decls = comments();\n    let decl;\n    while (decl = declaration()) {\n      decls.push(decl);\n      decls = decls.concat(comments());\n    }\n    if (!close()) {\n      return error(`@page missing '}'`);\n    }\n    return pos({\n      type: \"page\",\n      selectors: sel,\n      declarations: decls\n    });\n  }\n  function atdocument() {\n    const pos = position();\n    const m = match(/^@([-\\w]+)?document *([^{]+)/);\n    if (!m) {\n      return;\n    }\n    const vendor = trim(m[1]);\n    const doc = trim(m[2]);\n    if (!open()) {\n      return error(`@document missing '{'`);\n    }\n    const style = comments().concat(rules());\n    if (!close()) {\n      return error(`@document missing '}'`);\n    }\n    return pos({\n      type: \"document\",\n      document: doc,\n      vendor,\n      rules: style\n    });\n  }\n  function atfontface() {\n    const pos = position();\n    const m = match(/^@font-face\\s*/);\n    if (!m) {\n      return;\n    }\n    if (!open()) {\n      return error(`@font-face missing '{'`);\n    }\n    let decls = comments();\n    let decl;\n    while (decl = declaration()) {\n      decls.push(decl);\n      decls = decls.concat(comments());\n    }\n    if (!close()) {\n      return error(`@font-face missing '}'`);\n    }\n    return pos({\n      type: \"font-face\",\n      declarations: decls\n    });\n  }\n  const atimport = _compileAtrule(\"import\");\n  const atcharset = _compileAtrule(\"charset\");\n  const atnamespace = _compileAtrule(\"namespace\");\n  function _compileAtrule(name) {\n    const re = new RegExp(\n      \"^@\" + name + \"\\\\s*((?:\" + [\n        /[^\\\\]\"(?:\\\\\"|[^\"])*\"/.source,\n        // consume any quoted parts (checking that the double quote isn't itself escaped)\n        /[^\\\\]'(?:\\\\'|[^'])*'/.source,\n        // same but for single quotes\n        \"[^;]\"\n      ].join(\"|\") + \")+);\"\n    );\n    return () => {\n      const pos = position();\n      const m = match(re);\n      if (!m) {\n        return;\n      }\n      const ret = { type: name };\n      ret[name] = m[1].trim();\n      return pos(ret);\n    };\n  }\n  function atrule() {\n    if (css[0] !== \"@\") {\n      return;\n    }\n    return atkeyframes() || atmedia() || atcustommedia() || atsupports() || atimport() || atcharset() || atnamespace() || atdocument() || atpage() || athost() || atfontface();\n  }\n  function rule() {\n    const pos = position();\n    const sel = selector();\n    if (!sel) {\n      return error(\"selector missing\");\n    }\n    comments();\n    return pos({\n      type: \"rule\",\n      selectors: sel,\n      declarations: declarations()\n    });\n  }\n  return addParent(stylesheet());\n}\nfunction trim(str) {\n  return str ? str.replace(/^\\s+|\\s+$/g, \"\") : \"\";\n}\nfunction addParent(obj, parent) {\n  const isNode = obj && typeof obj.type === \"string\";\n  const childParent = isNode ? obj : parent;\n  for (const k of Object.keys(obj)) {\n    const value = obj[k];\n    if (Array.isArray(value)) {\n      value.forEach((v) => {\n        addParent(v, childParent);\n      });\n    } else if (value && typeof value === \"object\") {\n      addParent(value, childParent);\n    }\n  }\n  if (isNode) {\n    Object.defineProperty(obj, \"parent\", {\n      configurable: true,\n      writable: true,\n      enumerable: false,\n      value: parent || null\n    });\n  }\n  return obj;\n}\nconst tagMap = {\n  script: \"noscript\",\n  // camel case svg element tag names\n  altglyph: \"altGlyph\",\n  altglyphdef: \"altGlyphDef\",\n  altglyphitem: \"altGlyphItem\",\n  animatecolor: \"animateColor\",\n  animatemotion: \"animateMotion\",\n  animatetransform: \"animateTransform\",\n  clippath: \"clipPath\",\n  feblend: \"feBlend\",\n  fecolormatrix: \"feColorMatrix\",\n  fecomponenttransfer: \"feComponentTransfer\",\n  fecomposite: \"feComposite\",\n  feconvolvematrix: \"feConvolveMatrix\",\n  fediffuselighting: \"feDiffuseLighting\",\n  fedisplacementmap: \"feDisplacementMap\",\n  fedistantlight: \"feDistantLight\",\n  fedropshadow: \"feDropShadow\",\n  feflood: \"feFlood\",\n  fefunca: \"feFuncA\",\n  fefuncb: \"feFuncB\",\n  fefuncg: \"feFuncG\",\n  fefuncr: \"feFuncR\",\n  fegaussianblur: \"feGaussianBlur\",\n  feimage: \"feImage\",\n  femerge: \"feMerge\",\n  femergenode: \"feMergeNode\",\n  femorphology: \"feMorphology\",\n  feoffset: \"feOffset\",\n  fepointlight: \"fePointLight\",\n  fespecularlighting: \"feSpecularLighting\",\n  fespotlight: \"feSpotLight\",\n  fetile: \"feTile\",\n  feturbulence: \"feTurbulence\",\n  foreignobject: \"foreignObject\",\n  glyphref: \"glyphRef\",\n  lineargradient: \"linearGradient\",\n  radialgradient: \"radialGradient\"\n};\nfunction getTagName(n) {\n  let tagName = tagMap[n.tagName] ? tagMap[n.tagName] : n.tagName;\n  if (tagName === \"link\" && n.attributes._cssText) {\n    tagName = \"style\";\n  }\n  return tagName;\n}\nfunction escapeRegExp(str) {\n  return str.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n}\nconst HOVER_SELECTOR = /([^\\\\]):hover/;\nconst HOVER_SELECTOR_GLOBAL = new RegExp(HOVER_SELECTOR.source, \"g\");\nfunction addHoverClass(cssText, cache) {\n  const cachedStyle = cache?.stylesWithHoverClass.get(cssText);\n  if (cachedStyle) return cachedStyle;\n  if (cssText.length >= 1e6) {\n    return cssText;\n  }\n  const ast = parse(cssText, {\n    silent: true\n  });\n  if (!ast.stylesheet) {\n    return cssText;\n  }\n  const selectors = [];\n  ast.stylesheet.rules.forEach((rule) => {\n    if (\"selectors\" in rule) {\n      (rule.selectors || []).forEach((selector) => {\n        if (HOVER_SELECTOR.test(selector)) {\n          selectors.push(selector);\n        }\n      });\n    }\n  });\n  if (selectors.length === 0) {\n    return cssText;\n  }\n  const selectorMatcher = new RegExp(\n    selectors.filter((selector, index) => selectors.indexOf(selector) === index).sort((a, b) => b.length - a.length).map((selector) => {\n      return escapeRegExp(selector);\n    }).join(\"|\"),\n    \"g\"\n  );\n  const result = cssText.replace(selectorMatcher, (selector) => {\n    const newSelector = selector.replace(HOVER_SELECTOR_GLOBAL, \"$1.\\\\:hover\");\n    return `${selector}, ${newSelector}`;\n  });\n  cache?.stylesWithHoverClass.set(cssText, result);\n  return result;\n}\nfunction createCache() {\n  const stylesWithHoverClass = /* @__PURE__ */ new Map();\n  return {\n    stylesWithHoverClass\n  };\n}\nfunction buildNode(n, options) {\n  const { doc, hackCss, cache } = options;\n  switch (n.type) {\n    case NodeType.Document:\n      return doc.implementation.createDocument(null, \"\", null);\n    case NodeType.DocumentType:\n      return doc.implementation.createDocumentType(\n        n.name || \"html\",\n        n.publicId,\n        n.systemId\n      );\n    case NodeType.Element: {\n      const tagName = getTagName(n);\n      let node;\n      if (n.isSVG) {\n        node = doc.createElementNS(\"http://www.w3.org/2000/svg\", tagName);\n      } else {\n        if (\n          // If the tag name is a custom element name\n          n.isCustom && // If the browser supports custom elements\n          doc.defaultView?.customElements && // If the custom element hasn't been defined yet\n          !doc.defaultView.customElements.get(n.tagName)\n        )\n          try {\n            doc.defaultView.customElements.define(\n              n.tagName,\n              class extends doc.defaultView.HTMLElement {\n              }\n            );\n          } catch (e) {\n            console.warn(\"Cannot define custom element\", e);\n          }\n        node = doc.createElement(tagName);\n      }\n      const specialAttributes = {};\n      for (const name in n.attributes) {\n        if (!Object.prototype.hasOwnProperty.call(n.attributes, name)) {\n          continue;\n        }\n        let value = n.attributes[name];\n        if (tagName === \"option\" && name === \"selected\" && value === false) {\n          continue;\n        }\n        if (value === null) {\n          continue;\n        }\n        if (value === true) value = \"\";\n        if (name.startsWith(\"rr_\")) {\n          specialAttributes[name] = value;\n          continue;\n        }\n        const isTextarea = tagName === \"textarea\" && name === \"value\";\n        const isRemoteOrDynamicCss = tagName === \"style\" && name === \"_cssText\";\n        if (isRemoteOrDynamicCss && hackCss && typeof value === \"string\") {\n          value = addHoverClass(value, cache);\n        }\n        if ((isTextarea || isRemoteOrDynamicCss) && typeof value === \"string\") {\n          const child = doc.createTextNode(value);\n          for (const c of Array.from(node.childNodes)) {\n            if (c.nodeType === node.TEXT_NODE) {\n              node.removeChild(c);\n            }\n          }\n          node.appendChild(child);\n          continue;\n        }\n        try {\n          if (n.isSVG && name === \"xlink:href\") {\n            node.setAttributeNS(\n              \"http://www.w3.org/1999/xlink\",\n              name,\n              value.toString()\n            );\n          } else if (name === \"onload\" || name === \"onclick\" || name.substring(0, 7) === \"onmouse\") {\n            node.setAttribute(\"_\" + name, value.toString());\n          } else if (tagName === \"meta\" && n.attributes[\"http-equiv\"] === \"Content-Security-Policy\" && name === \"content\") {\n            node.setAttribute(\"csp-content\", value.toString());\n            continue;\n          } else if (tagName === \"link\" && (n.attributes.rel === \"preload\" || n.attributes.rel === \"modulepreload\")) {\n          } else if (tagName === \"link\" && n.attributes.rel === \"prefetch\" && typeof n.attributes.href === \"string\" && extractFileExtension(n.attributes.href) === \"js\") {\n          } else if (tagName === \"img\" && n.attributes.srcset && n.attributes.rr_dataURL) {\n            node.setAttribute(\n              \"rrweb-original-srcset\",\n              n.attributes.srcset\n            );\n          } else {\n            node.setAttribute(name, value.toString());\n          }\n        } catch (error) {\n        }\n      }\n      for (const name in specialAttributes) {\n        const value = specialAttributes[name];\n        if (tagName === \"canvas\" && name === \"rr_dataURL\") {\n          const image = doc.createElement(\"img\");\n          image.onload = () => {\n            const ctx = node.getContext(\"2d\");\n            if (ctx) {\n              ctx.drawImage(image, 0, 0, image.width, image.height);\n            }\n          };\n          image.src = value.toString();\n          if (node.RRNodeType)\n            node.rr_dataURL = value.toString();\n        } else if (tagName === \"img\" && name === \"rr_dataURL\") {\n          const image = node;\n          if (!image.currentSrc.startsWith(\"data:\")) {\n            image.setAttribute(\n              \"rrweb-original-src\",\n              n.attributes.src\n            );\n            image.src = value.toString();\n          }\n        }\n        if (name === \"rr_width\") {\n          node.style.setProperty(\"width\", value.toString());\n        } else if (name === \"rr_height\") {\n          node.style.setProperty(\"height\", value.toString());\n        } else if (name === \"rr_mediaCurrentTime\" && typeof value === \"number\") {\n          node.currentTime = value;\n        } else if (name === \"rr_mediaState\") {\n          switch (value) {\n            case \"played\":\n              node.play().catch((e) => console.warn(\"media playback error\", e));\n              break;\n            case \"paused\":\n              node.pause();\n              break;\n          }\n        }\n      }\n      if (n.isShadowHost) {\n        if (!node.shadowRoot) {\n          node.attachShadow({ mode: \"open\" });\n        } else {\n          while (node.shadowRoot.firstChild) {\n            node.shadowRoot.removeChild(node.shadowRoot.firstChild);\n          }\n        }\n      }\n      return node;\n    }\n    case NodeType.Text:\n      return doc.createTextNode(\n        n.isStyle && hackCss ? addHoverClass(n.textContent, cache) : n.textContent\n      );\n    case NodeType.CDATA:\n      if (!(doc instanceof XMLDocument)) {\n        return null;\n      }\n      return doc.createCDATASection(n.textContent);\n    case NodeType.Comment:\n      return doc.createComment(n.textContent);\n    default:\n      return null;\n  }\n}\nfunction buildNodeWithSN(n, options) {\n  const {\n    doc,\n    mirror,\n    skipChild = false,\n    hackCss = true,\n    afterAppend,\n    cache\n  } = options;\n  if (mirror.has(n.id)) {\n    const nodeInMirror = mirror.getNode(n.id);\n    const meta = mirror.getMeta(nodeInMirror);\n    if (isNodeMetaEqual(meta, n)) return mirror.getNode(n.id);\n  }\n  let node = buildNode(n, { doc, hackCss, cache });\n  if (!node) {\n    return null;\n  }\n  if (n.rootId && mirror.getNode(n.rootId) !== doc) {\n    mirror.replace(n.rootId, doc);\n  }\n  if (n.type === NodeType.Document) {\n    doc.close();\n    doc.open();\n    if (n.compatMode === \"BackCompat\" && n.childNodes && n.childNodes[0].type !== NodeType.DocumentType) {\n      if (n.childNodes[0].type === NodeType.Element && \"xmlns\" in n.childNodes[0].attributes && n.childNodes[0].attributes.xmlns === \"http://www.w3.org/1999/xhtml\") {\n        doc.write(\n          '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"\">'\n        );\n      } else {\n        doc.write(\n          '<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"\">'\n        );\n      }\n    }\n    node = doc;\n  }\n  mirror.add(node, n);\n  if ((n.type === NodeType.Document || n.type === NodeType.Element) && !skipChild) {\n    for (const childN of n.childNodes) {\n      const childNode = buildNodeWithSN(childN, {\n        doc,\n        mirror,\n        skipChild: false,\n        hackCss,\n        afterAppend,\n        cache\n      });\n      if (!childNode) {\n        console.warn(\"Failed to rebuild\", childN);\n        continue;\n      }\n      if (childN.isShadow && isElement(node) && node.shadowRoot) {\n        node.shadowRoot.appendChild(childNode);\n      } else if (n.type === NodeType.Document && childN.type == NodeType.Element) {\n        const htmlElement = childNode;\n        let body = null;\n        htmlElement.childNodes.forEach((child) => {\n          if (child.nodeName === \"BODY\") body = child;\n        });\n        if (body) {\n          htmlElement.removeChild(body);\n          node.appendChild(childNode);\n          htmlElement.appendChild(body);\n        } else {\n          node.appendChild(childNode);\n        }\n      } else {\n        node.appendChild(childNode);\n      }\n      if (afterAppend) {\n        afterAppend(childNode, childN.id);\n      }\n    }\n  }\n  return node;\n}\nfunction visit(mirror, onVisit) {\n  function walk(node) {\n    onVisit(node);\n  }\n  for (const id of mirror.getIds()) {\n    if (mirror.has(id)) {\n      walk(mirror.getNode(id));\n    }\n  }\n}\nfunction handleScroll(node, mirror) {\n  const n = mirror.getMeta(node);\n  if (n?.type !== NodeType.Element) {\n    return;\n  }\n  const el = node;\n  for (const name in n.attributes) {\n    if (!(Object.prototype.hasOwnProperty.call(n.attributes, name) && name.startsWith(\"rr_\"))) {\n      continue;\n    }\n    const value = n.attributes[name];\n    if (name === \"rr_scrollLeft\") {\n      el.scrollLeft = value;\n    }\n    if (name === \"rr_scrollTop\") {\n      el.scrollTop = value;\n    }\n  }\n}\nfunction rebuild(n, options) {\n  const {\n    doc,\n    onVisit,\n    hackCss = true,\n    afterAppend,\n    cache,\n    mirror = new Mirror()\n  } = options;\n  const node = buildNodeWithSN(n, {\n    doc,\n    mirror,\n    skipChild: false,\n    hackCss,\n    afterAppend,\n    cache\n  });\n  visit(mirror, (visitedNode) => {\n    if (onVisit) {\n      onVisit(visitedNode);\n    }\n    handleScroll(visitedNode, mirror);\n  });\n  return node;\n}\nfunction on(type, fn, target = document) {\n  const options = { capture: true, passive: true };\n  target.addEventListener(type, fn, options);\n  return () => target.removeEventListener(type, fn, options);\n}\nconst DEPARTED_MIRROR_ACCESS_WARNING = \"Please stop import mirror directly. Instead of that,\\r\\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\\r\\nor you can use record.mirror to access the mirror instance during recording.\";\nlet _mirror = {\n  map: {},\n  getId() {\n    console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n    return -1;\n  },\n  getNode() {\n    console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n    return null;\n  },\n  removeNodeFromMap() {\n    console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n  },\n  has() {\n    console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n    return false;\n  },\n  reset() {\n    console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n  }\n};\nif (typeof window !== \"undefined\" && window.Proxy && window.Reflect) {\n  _mirror = new Proxy(_mirror, {\n    get(target, prop, receiver) {\n      if (prop === \"map\") {\n        console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n      }\n      return Reflect.get(target, prop, receiver);\n    }\n  });\n}\nfunction throttle(func, wait, options = {}) {\n  let timeout = null;\n  let previous = 0;\n  return function(...args) {\n    const now = Date.now();\n    if (!previous && options.leading === false) {\n      previous = now;\n    }\n    const remaining = wait - (now - previous);\n    const context = this;\n    if (remaining <= 0 || remaining > wait) {\n      if (timeout) {\n        clearTimeout(timeout);\n        timeout = null;\n      }\n      previous = now;\n      func.apply(context, args);\n    } else if (!timeout && options.trailing !== false) {\n      timeout = setTimeout(() => {\n        previous = options.leading === false ? 0 : Date.now();\n        timeout = null;\n        func.apply(context, args);\n      }, remaining);\n    }\n  };\n}\nfunction hookSetter(target, key, d, isRevoked, win = window) {\n  const original = win.Object.getOwnPropertyDescriptor(target, key);\n  win.Object.defineProperty(\n    target,\n    key,\n    isRevoked ? d : {\n      set(value) {\n        setTimeout(() => {\n          d.set.call(this, value);\n        }, 0);\n        if (original && original.set) {\n          original.set.call(this, value);\n        }\n      }\n    }\n  );\n  return () => hookSetter(target, key, original || {}, true);\n}\nfunction patch(source, name, replacement) {\n  try {\n    if (!(name in source)) {\n      return () => {\n      };\n    }\n    const original = source[name];\n    const wrapped = replacement(original);\n    if (typeof wrapped === \"function\") {\n      wrapped.prototype = wrapped.prototype || {};\n      Object.defineProperties(wrapped, {\n        __rrweb_original__: {\n          enumerable: false,\n          value: original\n        }\n      });\n    }\n    source[name] = wrapped;\n    return () => {\n      source[name] = original;\n    };\n  } catch {\n    return () => {\n    };\n  }\n}\nlet nowTimestamp = Date.now;\nif (!/* @__PURE__ */ /[1-9][0-9]{12}/.test(Date.now().toString())) {\n  nowTimestamp = () => (/* @__PURE__ */ new Date()).getTime();\n}\nfunction getWindowScroll(win) {\n  const doc = win.document;\n  return {\n    left: doc.scrollingElement ? doc.scrollingElement.scrollLeft : win.pageXOffset !== void 0 ? win.pageXOffset : doc?.documentElement.scrollLeft || doc?.body?.parentElement?.scrollLeft || doc?.body?.scrollLeft || 0,\n    top: doc.scrollingElement ? doc.scrollingElement.scrollTop : win.pageYOffset !== void 0 ? win.pageYOffset : doc?.documentElement.scrollTop || doc?.body?.parentElement?.scrollTop || doc?.body?.scrollTop || 0\n  };\n}\nfunction getWindowHeight() {\n  return window.innerHeight || document.documentElement && document.documentElement.clientHeight || document.body && document.body.clientHeight;\n}\nfunction getWindowWidth() {\n  return window.innerWidth || document.documentElement && document.documentElement.clientWidth || document.body && document.body.clientWidth;\n}\nfunction closestElementOfNode(node) {\n  if (!node) {\n    return null;\n  }\n  try {\n    const el = node.nodeType === node.ELEMENT_NODE ? node : node.parentElement;\n    return el;\n  } catch (error) {\n    return null;\n  }\n}\nfunction isBlocked(node, blockClass, blockSelector, unblockSelector, checkAncestors) {\n  if (!node) {\n    return false;\n  }\n  const el = closestElementOfNode(node);\n  if (!el) {\n    return false;\n  }\n  const blockedPredicate = createMatchPredicate(blockClass, blockSelector);\n  if (!checkAncestors) {\n    const isUnblocked = unblockSelector && el.matches(unblockSelector);\n    return blockedPredicate(el) && !isUnblocked;\n  }\n  const blockDistance = distanceToMatch(el, blockedPredicate);\n  let unblockDistance = -1;\n  if (blockDistance < 0) {\n    return false;\n  }\n  if (unblockSelector) {\n    unblockDistance = distanceToMatch(\n      el,\n      createMatchPredicate(null, unblockSelector)\n    );\n  }\n  if (blockDistance > -1 && unblockDistance < 0) {\n    return true;\n  }\n  return blockDistance < unblockDistance;\n}\nfunction isSerialized(n, mirror) {\n  return mirror.getId(n) !== -1;\n}\nfunction isIgnored(n, mirror) {\n  return mirror.getId(n) === IGNORED_NODE;\n}\nfunction isAncestorRemoved(target, mirror) {\n  if (isShadowRoot(target)) {\n    return false;\n  }\n  const id = mirror.getId(target);\n  if (!mirror.has(id)) {\n    return true;\n  }\n  if (target.parentNode && target.parentNode.nodeType === target.DOCUMENT_NODE) {\n    return false;\n  }\n  if (!target.parentNode) {\n    return true;\n  }\n  return isAncestorRemoved(target.parentNode, mirror);\n}\nfunction legacy_isTouchEvent(event) {\n  return Boolean(event.changedTouches);\n}\nfunction polyfill(win = window) {\n  if (\"NodeList\" in win && !win.NodeList.prototype.forEach) {\n    win.NodeList.prototype.forEach = Array.prototype.forEach;\n  }\n  if (\"DOMTokenList\" in win && !win.DOMTokenList.prototype.forEach) {\n    win.DOMTokenList.prototype.forEach = Array.prototype.forEach;\n  }\n  if (!Node.prototype.contains) {\n    Node.prototype.contains = (...args) => {\n      let node = args[0];\n      if (!(0 in args)) {\n        throw new TypeError(\"1 argument is required\");\n      }\n      do {\n        if (this === node) {\n          return true;\n        }\n      } while (node = node && node.parentNode);\n      return false;\n    };\n  }\n}\nfunction queueToResolveTrees(queue) {\n  const queueNodeMap = {};\n  const putIntoMap = (m, parent) => {\n    const nodeInTree = {\n      value: m,\n      parent,\n      children: []\n    };\n    queueNodeMap[m.node.id] = nodeInTree;\n    return nodeInTree;\n  };\n  const queueNodeTrees = [];\n  for (const mutation of queue) {\n    const { nextId, parentId } = mutation;\n    if (nextId && nextId in queueNodeMap) {\n      const nextInTree = queueNodeMap[nextId];\n      if (nextInTree.parent) {\n        const idx = nextInTree.parent.children.indexOf(nextInTree);\n        nextInTree.parent.children.splice(\n          idx,\n          0,\n          putIntoMap(mutation, nextInTree.parent)\n        );\n      } else {\n        const idx = queueNodeTrees.indexOf(nextInTree);\n        queueNodeTrees.splice(idx, 0, putIntoMap(mutation, null));\n      }\n      continue;\n    }\n    if (parentId in queueNodeMap) {\n      const parentInTree = queueNodeMap[parentId];\n      parentInTree.children.push(putIntoMap(mutation, parentInTree));\n      continue;\n    }\n    queueNodeTrees.push(putIntoMap(mutation, null));\n  }\n  return queueNodeTrees;\n}\nfunction iterateResolveTree(tree, cb) {\n  cb(tree.value);\n  for (let i = tree.children.length - 1; i >= 0; i--) {\n    iterateResolveTree(tree.children[i], cb);\n  }\n}\nfunction isSerializedIframe(n, mirror) {\n  return Boolean(n.nodeName === \"IFRAME\" && mirror.getMeta(n));\n}\nfunction isSerializedStylesheet(n, mirror) {\n  return Boolean(\n    n.nodeName === \"LINK\" && n.nodeType === n.ELEMENT_NODE && n.getAttribute && n.getAttribute(\"rel\") === \"stylesheet\" && mirror.getMeta(n)\n  );\n}\nfunction getBaseDimension(node, rootIframe) {\n  const frameElement = node.ownerDocument?.defaultView?.frameElement;\n  if (!frameElement || frameElement === rootIframe) {\n    return {\n      x: 0,\n      y: 0,\n      relativeScale: 1,\n      absoluteScale: 1\n    };\n  }\n  const frameDimension = frameElement.getBoundingClientRect();\n  const frameBaseDimension = getBaseDimension(frameElement, rootIframe);\n  const relativeScale = frameDimension.height / frameElement.clientHeight;\n  return {\n    x: frameDimension.x * frameBaseDimension.relativeScale + frameBaseDimension.x,\n    y: frameDimension.y * frameBaseDimension.relativeScale + frameBaseDimension.y,\n    relativeScale,\n    absoluteScale: frameBaseDimension.absoluteScale * relativeScale\n  };\n}\nfunction hasShadowRoot(n) {\n  return Boolean(n?.shadowRoot);\n}\nfunction getNestedRule(rules, position) {\n  const rule = rules[position[0]];\n  if (position.length === 1) {\n    return rule;\n  } else {\n    return getNestedRule(\n      rule.cssRules[position[1]].cssRules,\n      position.slice(2)\n    );\n  }\n}\nfunction getPositionsAndIndex(nestedIndex) {\n  const positions = [...nestedIndex];\n  const index = positions.pop();\n  return { positions, index };\n}\nfunction uniqueTextMutations(mutations) {\n  const idSet = /* @__PURE__ */ new Set();\n  const uniqueMutations = [];\n  for (let i = mutations.length; i--; ) {\n    const mutation = mutations[i];\n    if (!idSet.has(mutation.id)) {\n      uniqueMutations.push(mutation);\n      idSet.add(mutation.id);\n    }\n  }\n  return uniqueMutations;\n}\nclass StyleSheetMirror {\n  constructor() {\n    this.id = 1;\n    this.styleIDMap = /* @__PURE__ */ new WeakMap();\n    this.idStyleMap = /* @__PURE__ */ new Map();\n  }\n  getId(stylesheet) {\n    return this.styleIDMap.get(stylesheet) ?? -1;\n  }\n  has(stylesheet) {\n    return this.styleIDMap.has(stylesheet);\n  }\n  /**\n   * @returns If the stylesheet is in the mirror, returns the id of the stylesheet. If not, return the new assigned id.\n   */\n  add(stylesheet, id) {\n    if (this.has(stylesheet)) return this.getId(stylesheet);\n    let newId;\n    if (id === void 0) {\n      newId = this.id++;\n    } else newId = id;\n    this.styleIDMap.set(stylesheet, newId);\n    this.idStyleMap.set(newId, stylesheet);\n    return newId;\n  }\n  getStyle(id) {\n    return this.idStyleMap.get(id) || null;\n  }\n  reset() {\n    this.styleIDMap = /* @__PURE__ */ new WeakMap();\n    this.idStyleMap = /* @__PURE__ */ new Map();\n    this.id = 1;\n  }\n  generateId() {\n    return this.id++;\n  }\n}\nfunction getShadowHost(n) {\n  let shadowHost = null;\n  if (n.getRootNode?.()?.nodeType === Node.DOCUMENT_FRAGMENT_NODE && n.getRootNode().host)\n    shadowHost = n.getRootNode().host;\n  return shadowHost;\n}\nfunction getRootShadowHost(n) {\n  let rootShadowHost = n;\n  let shadowHost;\n  while (shadowHost = getShadowHost(rootShadowHost))\n    rootShadowHost = shadowHost;\n  return rootShadowHost;\n}\nfunction shadowHostInDom(n) {\n  const doc = n.ownerDocument;\n  if (!doc) return false;\n  const shadowHost = getRootShadowHost(n);\n  return doc.contains(shadowHost);\n}\nfunction inDom(n) {\n  const doc = n.ownerDocument;\n  if (!doc) return false;\n  return doc.contains(n) || shadowHostInDom(n);\n}\nconst cachedImplementations = {};\nfunction getImplementation(name) {\n  const cached = cachedImplementations[name];\n  if (cached) {\n    return cached;\n  }\n  const document2 = window.document;\n  let impl = window[name];\n  if (document2 && typeof document2.createElement === \"function\") {\n    try {\n      const sandbox = document2.createElement(\"iframe\");\n      sandbox.hidden = true;\n      document2.head.appendChild(sandbox);\n      const contentWindow = sandbox.contentWindow;\n      if (contentWindow && contentWindow[name]) {\n        impl = // eslint-disable-next-line @typescript-eslint/unbound-method\n        contentWindow[name];\n      }\n      document2.head.removeChild(sandbox);\n    } catch (e) {\n    }\n  }\n  return cachedImplementations[name] = impl.bind(\n    window\n  );\n}\nfunction onRequestAnimationFrame(...rest) {\n  return getImplementation(\"requestAnimationFrame\")(...rest);\n}\nfunction setTimeout(...rest) {\n  return getImplementation(\"setTimeout\")(...rest);\n}\nfunction clearTimeout(...rest) {\n  return getImplementation(\"clearTimeout\")(...rest);\n}\nconst utils = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({\n  __proto__: null,\n  StyleSheetMirror,\n  get _mirror() {\n    return _mirror;\n  },\n  clearTimeout,\n  closestElementOfNode,\n  getBaseDimension,\n  getNestedRule,\n  getPositionsAndIndex,\n  getRootShadowHost,\n  getShadowHost,\n  getWindowHeight,\n  getWindowScroll,\n  getWindowWidth,\n  hasShadowRoot,\n  hookSetter,\n  inDom,\n  isAncestorRemoved,\n  isBlocked,\n  isIgnored,\n  isSerialized,\n  isSerializedIframe,\n  isSerializedStylesheet,\n  iterateResolveTree,\n  legacy_isTouchEvent,\n  get nowTimestamp() {\n    return nowTimestamp;\n  },\n  on,\n  onRequestAnimationFrame,\n  patch,\n  polyfill,\n  queueToResolveTrees,\n  setTimeout,\n  shadowHostInDom,\n  throttle,\n  uniqueTextMutations\n}, Symbol.toStringTag, { value: \"Module\" }));\nvar EventType = /* @__PURE__ */ ((EventType2) => {\n  EventType2[EventType2[\"DomContentLoaded\"] = 0] = \"DomContentLoaded\";\n  EventType2[EventType2[\"Load\"] = 1] = \"Load\";\n  EventType2[EventType2[\"FullSnapshot\"] = 2] = \"FullSnapshot\";\n  EventType2[EventType2[\"IncrementalSnapshot\"] = 3] = \"IncrementalSnapshot\";\n  EventType2[EventType2[\"Meta\"] = 4] = \"Meta\";\n  EventType2[EventType2[\"Custom\"] = 5] = \"Custom\";\n  EventType2[EventType2[\"Plugin\"] = 6] = \"Plugin\";\n  return EventType2;\n})(EventType || {});\nvar IncrementalSource = /* @__PURE__ */ ((IncrementalSource2) => {\n  IncrementalSource2[IncrementalSource2[\"Mutation\"] = 0] = \"Mutation\";\n  IncrementalSource2[IncrementalSource2[\"MouseMove\"] = 1] = \"MouseMove\";\n  IncrementalSource2[IncrementalSource2[\"MouseInteraction\"] = 2] = \"MouseInteraction\";\n  IncrementalSource2[IncrementalSource2[\"Scroll\"] = 3] = \"Scroll\";\n  IncrementalSource2[IncrementalSource2[\"ViewportResize\"] = 4] = \"ViewportResize\";\n  IncrementalSource2[IncrementalSource2[\"Input\"] = 5] = \"Input\";\n  IncrementalSource2[IncrementalSource2[\"TouchMove\"] = 6] = \"TouchMove\";\n  IncrementalSource2[IncrementalSource2[\"MediaInteraction\"] = 7] = \"MediaInteraction\";\n  IncrementalSource2[IncrementalSource2[\"StyleSheetRule\"] = 8] = \"StyleSheetRule\";\n  IncrementalSource2[IncrementalSource2[\"CanvasMutation\"] = 9] = \"CanvasMutation\";\n  IncrementalSource2[IncrementalSource2[\"Font\"] = 10] = \"Font\";\n  IncrementalSource2[IncrementalSource2[\"Log\"] = 11] = \"Log\";\n  IncrementalSource2[IncrementalSource2[\"Drag\"] = 12] = \"Drag\";\n  IncrementalSource2[IncrementalSource2[\"StyleDeclaration\"] = 13] = \"StyleDeclaration\";\n  IncrementalSource2[IncrementalSource2[\"Selection\"] = 14] = \"Selection\";\n  IncrementalSource2[IncrementalSource2[\"AdoptedStyleSheet\"] = 15] = \"AdoptedStyleSheet\";\n  IncrementalSource2[IncrementalSource2[\"CustomElement\"] = 16] = \"CustomElement\";\n  return IncrementalSource2;\n})(IncrementalSource || {});\nvar MouseInteractions = /* @__PURE__ */ ((MouseInteractions2) => {\n  MouseInteractions2[MouseInteractions2[\"MouseUp\"] = 0] = \"MouseUp\";\n  MouseInteractions2[MouseInteractions2[\"MouseDown\"] = 1] = \"MouseDown\";\n  MouseInteractions2[MouseInteractions2[\"Click\"] = 2] = \"Click\";\n  MouseInteractions2[MouseInteractions2[\"ContextMenu\"] = 3] = \"ContextMenu\";\n  MouseInteractions2[MouseInteractions2[\"DblClick\"] = 4] = \"DblClick\";\n  MouseInteractions2[MouseInteractions2[\"Focus\"] = 5] = \"Focus\";\n  MouseInteractions2[MouseInteractions2[\"Blur\"] = 6] = \"Blur\";\n  MouseInteractions2[MouseInteractions2[\"TouchStart\"] = 7] = \"TouchStart\";\n  MouseInteractions2[MouseInteractions2[\"TouchMove_Departed\"] = 8] = \"TouchMove_Departed\";\n  MouseInteractions2[MouseInteractions2[\"TouchEnd\"] = 9] = \"TouchEnd\";\n  MouseInteractions2[MouseInteractions2[\"TouchCancel\"] = 10] = \"TouchCancel\";\n  return MouseInteractions2;\n})(MouseInteractions || {});\nvar PointerTypes = /* @__PURE__ */ ((PointerTypes2) => {\n  PointerTypes2[PointerTypes2[\"Mouse\"] = 0] = \"Mouse\";\n  PointerTypes2[PointerTypes2[\"Pen\"] = 1] = \"Pen\";\n  PointerTypes2[PointerTypes2[\"Touch\"] = 2] = \"Touch\";\n  return PointerTypes2;\n})(PointerTypes || {});\nvar CanvasContext = /* @__PURE__ */ ((CanvasContext2) => {\n  CanvasContext2[CanvasContext2[\"2D\"] = 0] = \"2D\";\n  CanvasContext2[CanvasContext2[\"WebGL\"] = 1] = \"WebGL\";\n  CanvasContext2[CanvasContext2[\"WebGL2\"] = 2] = \"WebGL2\";\n  return CanvasContext2;\n})(CanvasContext || {});\nvar MediaInteractions = /* @__PURE__ */ ((MediaInteractions2) => {\n  MediaInteractions2[MediaInteractions2[\"Play\"] = 0] = \"Play\";\n  MediaInteractions2[MediaInteractions2[\"Pause\"] = 1] = \"Pause\";\n  MediaInteractions2[MediaInteractions2[\"Seeked\"] = 2] = \"Seeked\";\n  MediaInteractions2[MediaInteractions2[\"VolumeChange\"] = 3] = \"VolumeChange\";\n  MediaInteractions2[MediaInteractions2[\"RateChange\"] = 4] = \"RateChange\";\n  return MediaInteractions2;\n})(MediaInteractions || {});\nvar ReplayerEvents = /* @__PURE__ */ ((ReplayerEvents2) => {\n  ReplayerEvents2[\"Start\"] = \"start\";\n  ReplayerEvents2[\"Pause\"] = \"pause\";\n  ReplayerEvents2[\"Resume\"] = \"resume\";\n  ReplayerEvents2[\"Resize\"] = \"resize\";\n  ReplayerEvents2[\"Finish\"] = \"finish\";\n  ReplayerEvents2[\"FullsnapshotRebuilded\"] = \"fullsnapshot-rebuilded\";\n  ReplayerEvents2[\"LoadStylesheetStart\"] = \"load-stylesheet-start\";\n  ReplayerEvents2[\"LoadStylesheetEnd\"] = \"load-stylesheet-end\";\n  ReplayerEvents2[\"SkipStart\"] = \"skip-start\";\n  ReplayerEvents2[\"SkipEnd\"] = \"skip-end\";\n  ReplayerEvents2[\"MouseInteraction\"] = \"mouse-interaction\";\n  ReplayerEvents2[\"EventCast\"] = \"event-cast\";\n  ReplayerEvents2[\"CustomEvent\"] = \"custom-event\";\n  ReplayerEvents2[\"Flush\"] = \"flush\";\n  ReplayerEvents2[\"StateChange\"] = \"state-change\";\n  ReplayerEvents2[\"PlayBack\"] = \"play-back\";\n  ReplayerEvents2[\"Destroy\"] = \"destroy\";\n  return ReplayerEvents2;\n})(ReplayerEvents || {});\nlet errorHandler;\nfunction registerErrorHandler(handler) {\n  errorHandler = handler;\n}\nfunction unregisterErrorHandler() {\n  errorHandler = void 0;\n}\nconst callbackWrapper = (cb) => {\n  if (!errorHandler) {\n    return cb;\n  }\n  const rrwebWrapped = ((...rest) => {\n    try {\n      return cb(...rest);\n    } catch (error) {\n      if (errorHandler && errorHandler(error) === true) {\n        return () => {\n        };\n      }\n      throw error;\n    }\n  });\n  return rrwebWrapped;\n};\nvar chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\nvar lookup = typeof Uint8Array === \"undefined\" ? [] : new Uint8Array(256);\nfor (var i = 0; i < chars.length; i++) {\n  lookup[chars.charCodeAt(i)] = i;\n}\nvar encode = function(arraybuffer) {\n  var bytes = new Uint8Array(arraybuffer), i, len = bytes.length, base64 = \"\";\n  for (i = 0; i < len; i += 3) {\n    base64 += chars[bytes[i] >> 2];\n    base64 += chars[(bytes[i] & 3) << 4 | bytes[i + 1] >> 4];\n    base64 += chars[(bytes[i + 1] & 15) << 2 | bytes[i + 2] >> 6];\n    base64 += chars[bytes[i + 2] & 63];\n  }\n  if (len % 3 === 2) {\n    base64 = base64.substring(0, base64.length - 1) + \"=\";\n  } else if (len % 3 === 1) {\n    base64 = base64.substring(0, base64.length - 2) + \"==\";\n  }\n  return base64;\n};\nvar decode = function(base64) {\n  var bufferLength = base64.length * 0.75, len = base64.length, i, p = 0, encoded1, encoded2, encoded3, encoded4;\n  if (base64[base64.length - 1] === \"=\") {\n    bufferLength--;\n    if (base64[base64.length - 2] === \"=\") {\n      bufferLength--;\n    }\n  }\n  var arraybuffer = new ArrayBuffer(bufferLength), bytes = new Uint8Array(arraybuffer);\n  for (i = 0; i < len; i += 4) {\n    encoded1 = lookup[base64.charCodeAt(i)];\n    encoded2 = lookup[base64.charCodeAt(i + 1)];\n    encoded3 = lookup[base64.charCodeAt(i + 2)];\n    encoded4 = lookup[base64.charCodeAt(i + 3)];\n    bytes[p++] = encoded1 << 2 | encoded2 >> 4;\n    bytes[p++] = (encoded2 & 15) << 4 | encoded3 >> 2;\n    bytes[p++] = (encoded3 & 3) << 6 | encoded4 & 63;\n  }\n  return arraybuffer;\n};\nconst canvasVarMap = /* @__PURE__ */ new Map();\nfunction variableListFor(ctx, ctor) {\n  let contextMap = canvasVarMap.get(ctx);\n  if (!contextMap) {\n    contextMap = /* @__PURE__ */ new Map();\n    canvasVarMap.set(ctx, contextMap);\n  }\n  if (!contextMap.has(ctor)) {\n    contextMap.set(ctor, []);\n  }\n  return contextMap.get(ctor);\n}\nconst saveWebGLVar = (value, win, ctx) => {\n  if (!value || !(isInstanceOfWebGLObject(value, win) || typeof value === \"object\"))\n    return;\n  const name = value.constructor.name;\n  const list = variableListFor(ctx, name);\n  let index = list.indexOf(value);\n  if (index === -1) {\n    index = list.length;\n    list.push(value);\n  }\n  return index;\n};\nfunction serializeArg(value, win, ctx) {\n  if (value instanceof Array) {\n    return value.map((arg) => serializeArg(arg, win, ctx));\n  } else if (value === null) {\n    return value;\n  } else if (value instanceof Float32Array || value instanceof Float64Array || value instanceof Int32Array || value instanceof Uint32Array || value instanceof Uint8Array || value instanceof Uint16Array || value instanceof Int16Array || value instanceof Int8Array || value instanceof Uint8ClampedArray) {\n    const name = value.constructor.name;\n    return {\n      rr_type: name,\n      args: [Object.values(value)]\n    };\n  } else if (\n    // SharedArrayBuffer disabled on most browsers due to spectre.\n    // More info: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer/SharedArrayBuffer\n    // value instanceof SharedArrayBuffer ||\n    value instanceof ArrayBuffer\n  ) {\n    const name = value.constructor.name;\n    const base64 = encode(value);\n    return {\n      rr_type: name,\n      base64\n    };\n  } else if (value instanceof DataView) {\n    const name = value.constructor.name;\n    return {\n      rr_type: name,\n      args: [\n        serializeArg(value.buffer, win, ctx),\n        value.byteOffset,\n        value.byteLength\n      ]\n    };\n  } else if (value instanceof HTMLImageElement) {\n    const name = value.constructor.name;\n    const { src } = value;\n    return {\n      rr_type: name,\n      src\n    };\n  } else if (value instanceof HTMLCanvasElement) {\n    const name = \"HTMLImageElement\";\n    const src = value.toDataURL();\n    return {\n      rr_type: name,\n      src\n    };\n  } else if (value instanceof ImageData) {\n    const name = value.constructor.name;\n    return {\n      rr_type: name,\n      args: [serializeArg(value.data, win, ctx), value.width, value.height]\n    };\n  } else if (isInstanceOfWebGLObject(value, win) || typeof value === \"object\") {\n    const name = value.constructor.name;\n    const index = saveWebGLVar(value, win, ctx);\n    return {\n      rr_type: name,\n      index\n    };\n  }\n  return value;\n}\nconst serializeArgs = (args, win, ctx) => {\n  return args.map((arg) => serializeArg(arg, win, ctx));\n};\nconst isInstanceOfWebGLObject = (value, win) => {\n  const webGLConstructorNames = [\n    \"WebGLActiveInfo\",\n    \"WebGLBuffer\",\n    \"WebGLFramebuffer\",\n    \"WebGLProgram\",\n    \"WebGLRenderbuffer\",\n    \"WebGLShader\",\n    \"WebGLShaderPrecisionFormat\",\n    \"WebGLTexture\",\n    \"WebGLUniformLocation\",\n    \"WebGLVertexArrayObject\",\n    // In old Chrome versions, value won't be an instanceof WebGLVertexArrayObject.\n    \"WebGLVertexArrayObjectOES\"\n  ];\n  const supportedWebGLConstructorNames = webGLConstructorNames.filter(\n    (name) => typeof win[name] === \"function\"\n  );\n  return Boolean(\n    supportedWebGLConstructorNames.find(\n      (name) => value instanceof win[name]\n    )\n  );\n};\nfunction initCanvas2DMutationObserver(cb, win, blockClass2, blockSelector, unblockSelector) {\n  const handlers = [];\n  const props2D = Object.getOwnPropertyNames(\n    win.CanvasRenderingContext2D.prototype\n  );\n  for (const prop of props2D) {\n    try {\n      if (typeof win.CanvasRenderingContext2D.prototype[prop] !== \"function\") {\n        continue;\n      }\n      const restoreHandler = patch(\n        win.CanvasRenderingContext2D.prototype,\n        prop,\n        function(original) {\n          return function(...args) {\n            if (!isBlocked(\n              this.canvas,\n              blockClass2,\n              blockSelector,\n              unblockSelector,\n              true\n            )) {\n              setTimeout(() => {\n                const recordArgs = serializeArgs(args, win, this);\n                cb(this.canvas, {\n                  type: CanvasContext[\"2D\"],\n                  property: prop,\n                  args: recordArgs\n                });\n              }, 0);\n            }\n            return original.apply(this, args);\n          };\n        }\n      );\n      handlers.push(restoreHandler);\n    } catch {\n      const hookHandler = hookSetter(\n        win.CanvasRenderingContext2D.prototype,\n        prop,\n        {\n          set(v) {\n            cb(this.canvas, {\n              type: CanvasContext[\"2D\"],\n              property: prop,\n              args: [v],\n              setter: true\n            });\n          }\n        }\n      );\n      handlers.push(hookHandler);\n    }\n  }\n  return () => {\n    handlers.forEach((h) => h());\n  };\n}\nfunction getNormalizedContextName(contextType) {\n  return contextType === \"experimental-webgl\" ? \"webgl\" : contextType;\n}\nfunction initCanvasContextObserver(win, blockClass, blockSelector, unblockSelector, setPreserveDrawingBufferToTrue) {\n  const handlers = [];\n  try {\n    const restoreHandler = patch(\n      win.HTMLCanvasElement.prototype,\n      \"getContext\",\n      function(original) {\n        return function(contextType, ...args) {\n          if (!isBlocked(this, blockClass, blockSelector, unblockSelector, true)) {\n            const ctxName = getNormalizedContextName(contextType);\n            if (!(\"__context\" in this)) this.__context = ctxName;\n            if (setPreserveDrawingBufferToTrue && [\"webgl\", \"webgl2\"].includes(ctxName)) {\n              if (args[0] && typeof args[0] === \"object\") {\n                const contextAttributes = args[0];\n                if (!contextAttributes.preserveDrawingBuffer) {\n                  contextAttributes.preserveDrawingBuffer = true;\n                }\n              } else {\n                args.splice(0, 1, {\n                  preserveDrawingBuffer: true\n                });\n              }\n            }\n          }\n          return original.apply(this, [contextType, ...args]);\n        };\n      }\n    );\n    handlers.push(restoreHandler);\n  } catch {\n    console.error(\"failed to patch HTMLCanvasElement.prototype.getContext\");\n  }\n  return () => {\n    handlers.forEach((h) => h());\n  };\n}\nfunction patchGLPrototype(prototype, type, cb, blockClass2, blockSelector, unblockSelector, _mirror2, win) {\n  const handlers = [];\n  const props = Object.getOwnPropertyNames(prototype);\n  for (const prop of props) {\n    if (\n      //prop.startsWith('get') ||  // e.g. getProgramParameter, but too risky\n      [\n        \"isContextLost\",\n        \"canvas\",\n        \"drawingBufferWidth\",\n        \"drawingBufferHeight\"\n      ].includes(prop)\n    ) {\n      continue;\n    }\n    try {\n      if (typeof prototype[prop] !== \"function\") {\n        continue;\n      }\n      const restoreHandler = patch(\n        prototype,\n        prop,\n        function(original) {\n          return function(...args) {\n            const result = original.apply(this, args);\n            saveWebGLVar(result, win, this);\n            if (\"tagName\" in this.canvas && !isBlocked(\n              this.canvas,\n              blockClass2,\n              blockSelector,\n              unblockSelector,\n              true\n            )) {\n              const recordArgs = serializeArgs(args, win, this);\n              const mutation = {\n                type,\n                property: prop,\n                args: recordArgs\n              };\n              cb(this.canvas, mutation);\n            }\n            return result;\n          };\n        }\n      );\n      handlers.push(restoreHandler);\n    } catch {\n      const hookHandler = hookSetter(prototype, prop, {\n        set(v) {\n          cb(this.canvas, {\n            type,\n            property: prop,\n            args: [v],\n            setter: true\n          });\n        }\n      });\n      handlers.push(hookHandler);\n    }\n  }\n  return handlers;\n}\nfunction initCanvasWebGLMutationObserver(cb, win, blockClass2, blockSelector, unblockSelector, mirror) {\n  const handlers = [];\n  handlers.push(\n    ...patchGLPrototype(\n      win.WebGLRenderingContext.prototype,\n      CanvasContext.WebGL,\n      cb,\n      blockClass2,\n      blockSelector,\n      unblockSelector,\n      mirror,\n      win\n    )\n  );\n  if (typeof win.WebGL2RenderingContext !== \"undefined\") {\n    handlers.push(\n      ...patchGLPrototype(\n        win.WebGL2RenderingContext.prototype,\n        CanvasContext.WebGL2,\n        cb,\n        blockClass2,\n        blockSelector,\n        unblockSelector,\n        mirror,\n        win\n      )\n    );\n  }\n  return () => {\n    handlers.forEach((h) => h());\n  };\n}\nconst r = `for(var e=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",t=\"undefined\"==typeof Uint8Array?[]:new Uint8Array(256),a=0;a<64;a++)t[e.charCodeAt(a)]=a;var n=function(t){var a,n=new Uint8Array(t),r=n.length,s=\"\";for(a=0;a<r;a+=3)s+=e[n[a]>>2],s+=e[(3&n[a])<<4|n[a+1]>>4],s+=e[(15&n[a+1])<<2|n[a+2]>>6],s+=e[63&n[a+2]];return r%3==2?s=s.substring(0,s.length-1)+\"=\":r%3==1&&(s=s.substring(0,s.length-2)+\"==\"),s};const r=new Map,s=new Map;const i=self;i.onmessage=async function(e){if(!(\"OffscreenCanvas\"in globalThis))return i.postMessage({id:e.data.id});{const{id:t,bitmap:a,width:o,height:f,maxCanvasSize:c,dataURLOptions:g}=e.data,u=async function(e,t,a){const r=e+\"-\"+t;if(\"OffscreenCanvas\"in globalThis){if(s.has(r))return s.get(r);const i=new OffscreenCanvas(e,t);i.getContext(\"2d\");const o=await i.convertToBlob(a),f=await o.arrayBuffer(),c=n(f);return s.set(r,c),c}return\"\"}(o,f,g),[h,d]=function(e,t,a){if(!a)return[e,t];const[n,r]=a;if(e<=n&&t<=r)return[e,t];let s=e,i=t;return s>n&&(i=Math.floor(n*t/e),s=n),i>r&&(s=Math.floor(r*e/t),i=r),[s,i]}(o,f,c),l=new OffscreenCanvas(h,d),w=l.getContext(\"bitmaprenderer\"),p=h===o&&d===f?a:await createImageBitmap(a,{resizeWidth:h,resizeHeight:d,resizeQuality:\"low\"});w?.transferFromImageBitmap(p),a.close();const y=await l.convertToBlob(g),v=y.type,b=await y.arrayBuffer(),m=n(b);if(p.close(),!r.has(t)&&await u===m)return r.set(t,m),i.postMessage({id:t});if(r.get(t)===m)return i.postMessage({id:t});i.postMessage({id:t,type:v,base64:m,width:o,height:f}),r.set(t,m)}};`;\nfunction t() {\n  const t2 = new Blob([r]);\n  return URL.createObjectURL(t2);\n}\nclass CanvasManagerNoop {\n  reset() {\n  }\n  freeze() {\n  }\n  unfreeze() {\n  }\n  lock() {\n  }\n  unlock() {\n  }\n  snapshot() {\n  }\n  addWindow() {\n  }\n  addShadowRoot() {\n  }\n  resetShadowRoots() {\n  }\n}\nclass CanvasManager {\n  constructor(options) {\n    this.pendingCanvasMutations = /* @__PURE__ */ new Map();\n    this.rafStamps = { latestId: 0, invokeId: null };\n    this.shadowDoms = /* @__PURE__ */ new Set();\n    this.windowsSet = /* @__PURE__ */ new WeakSet();\n    this.windows = [];\n    this.restoreHandlers = [];\n    this.frozen = false;\n    this.locked = false;\n    this.snapshotInProgressMap = /* @__PURE__ */ new Map();\n    this.worker = null;\n    this.lastSnapshotTime = 0;\n    this.processMutation = (target, mutation) => {\n      const newFrame = this.rafStamps.invokeId && this.rafStamps.latestId !== this.rafStamps.invokeId;\n      if (newFrame || !this.rafStamps.invokeId)\n        this.rafStamps.invokeId = this.rafStamps.latestId;\n      if (!this.pendingCanvasMutations.has(target)) {\n        this.pendingCanvasMutations.set(target, []);\n      }\n      this.pendingCanvasMutations.get(target).push(mutation);\n    };\n    const {\n      enableManualSnapshot,\n      sampling = \"all\",\n      win,\n      recordCanvas,\n      errorHandler: errorHandler2\n    } = options;\n    options.sampling = sampling;\n    this.mutationCb = options.mutationCb;\n    this.mirror = options.mirror;\n    this.options = options;\n    if (errorHandler2) {\n      registerErrorHandler(errorHandler2);\n    }\n    if (recordCanvas && typeof sampling === \"number\" || enableManualSnapshot) {\n      this.worker = this.initFPSWorker();\n    }\n    this.addWindow(win);\n    if (enableManualSnapshot) {\n      return;\n    }\n    callbackWrapper(() => {\n      if (recordCanvas && sampling === \"all\") {\n        this.startRAFTimestamping();\n        this.startPendingCanvasMutationFlusher();\n      }\n      if (recordCanvas && typeof sampling === \"number\") {\n        this.initCanvasFPSObserver();\n      }\n    })();\n  }\n  reset() {\n    this.pendingCanvasMutations.clear();\n    this.restoreHandlers.forEach((handler) => {\n      try {\n        handler();\n      } catch (e) {\n      }\n    });\n    this.restoreHandlers = [];\n    this.windowsSet = /* @__PURE__ */ new WeakSet();\n    this.windows = [];\n    this.shadowDoms = /* @__PURE__ */ new Set();\n    this.worker?.terminate();\n    this.worker = null;\n    this.snapshotInProgressMap = /* @__PURE__ */ new Map();\n  }\n  freeze() {\n    this.frozen = true;\n  }\n  unfreeze() {\n    this.frozen = false;\n  }\n  lock() {\n    this.locked = true;\n  }\n  unlock() {\n    this.locked = false;\n  }\n  addWindow(win) {\n    const {\n      sampling = \"all\",\n      blockClass,\n      blockSelector,\n      unblockSelector,\n      recordCanvas,\n      enableManualSnapshot\n    } = this.options;\n    if (this.windowsSet.has(win)) return;\n    if (enableManualSnapshot) {\n      this.windowsSet.add(win);\n      this.windows.push(new WeakRef(win));\n      return;\n    }\n    callbackWrapper(() => {\n      if (recordCanvas && sampling === \"all\") {\n        this.initCanvasMutationObserver(\n          win,\n          blockClass,\n          blockSelector,\n          unblockSelector\n        );\n      }\n      if (recordCanvas && typeof sampling === \"number\") {\n        const canvasContextReset = initCanvasContextObserver(\n          win,\n          blockClass,\n          blockSelector,\n          unblockSelector,\n          true\n        );\n        this.restoreHandlers.push(() => {\n          canvasContextReset();\n        });\n      }\n    })();\n    this.windowsSet.add(win);\n    this.windows.push(new WeakRef(win));\n  }\n  addShadowRoot(shadowRoot) {\n    this.shadowDoms.add(new WeakRef(shadowRoot));\n  }\n  resetShadowRoots() {\n    this.shadowDoms = /* @__PURE__ */ new Set();\n  }\n  snapshot(canvasElement, options) {\n    if (options?.skipRequestAnimationFrame) {\n      this.takeSnapshot(performance.now(), true, canvasElement);\n      return;\n    }\n    onRequestAnimationFrame(\n      (timestamp) => this.takeSnapshot(timestamp, true, canvasElement)\n    );\n  }\n  initFPSWorker() {\n    const worker = new Worker(t());\n    worker.onmessage = (e) => {\n      const data = e.data;\n      const { id } = data;\n      this.snapshotInProgressMap.set(id, false);\n      if (!(\"base64\" in data)) return;\n      const { base64, type, width, height } = data;\n      this.mutationCb({\n        id,\n        type: CanvasContext[\"2D\"],\n        commands: [\n          {\n            property: \"clearRect\",\n            // wipe canvas\n            args: [0, 0, width, height]\n          },\n          {\n            property: \"drawImage\",\n            // draws (semi-transparent) image\n            args: [\n              {\n                rr_type: \"ImageBitmap\",\n                args: [\n                  {\n                    rr_type: \"Blob\",\n                    data: [{ rr_type: \"ArrayBuffer\", base64 }],\n                    type\n                  }\n                ]\n              },\n              0,\n              0,\n              // The below args are needed if we enforce a max size, we want to\n              // retain the original size when drawing the image (which should be smaller)\n              width,\n              height\n            ]\n          }\n        ]\n      });\n    };\n    return worker;\n  }\n  initCanvasFPSObserver() {\n    let rafId;\n    if (!this.windows.length && !this.shadowDoms.size) {\n      return;\n    }\n    const rafCallback = (timestamp) => {\n      this.takeSnapshot(timestamp, false);\n      rafId = onRequestAnimationFrame(rafCallback);\n    };\n    rafId = onRequestAnimationFrame(rafCallback);\n    this.restoreHandlers.push(() => {\n      if (rafId) {\n        cancelAnimationFrame(rafId);\n      }\n    });\n  }\n  initCanvasMutationObserver(win, blockClass, blockSelector, unblockSelector) {\n    const canvasContextReset = initCanvasContextObserver(\n      win,\n      blockClass,\n      blockSelector,\n      unblockSelector,\n      false\n    );\n    const canvas2DReset = initCanvas2DMutationObserver(\n      this.processMutation.bind(this),\n      win,\n      blockClass,\n      blockSelector,\n      unblockSelector\n    );\n    const canvasWebGL1and2Reset = initCanvasWebGLMutationObserver(\n      this.processMutation.bind(this),\n      win,\n      blockClass,\n      blockSelector,\n      unblockSelector,\n      this.mirror\n    );\n    this.restoreHandlers.push(() => {\n      canvasContextReset();\n      canvas2DReset();\n      canvasWebGL1and2Reset();\n    });\n  }\n  /**\n   * Returns all `canvas` elements that are not blocked by the given selectors. Searches all windows and shadow roots.\n   */\n  getCanvasElements(blockClass, blockSelector, unblockSelector) {\n    const matchedCanvas = [];\n    const searchCanvas = (root) => {\n      root.querySelectorAll(\"canvas\").forEach((canvas) => {\n        if (!isBlocked(canvas, blockClass, blockSelector, unblockSelector, true)) {\n          matchedCanvas.push(canvas);\n        }\n      });\n    };\n    for (const item of this.windows) {\n      const window2 = item.deref();\n      let _document;\n      try {\n        _document = window2 && window2.document;\n      } catch {\n      }\n      if (_document) {\n        searchCanvas(_document);\n      }\n    }\n    for (const item of this.shadowDoms) {\n      const shadowRoot = item.deref();\n      if (shadowRoot) {\n        searchCanvas(shadowRoot);\n      }\n    }\n    return matchedCanvas;\n  }\n  /**\n   * Takes a snapshot of the provided canvas element, or will search all windows/shadow roots for canvases. Will self-throttle based on `options.sampling`.\n   *\n   * @returns `true` if the snapshot was taken, `false` if it was throttled.\n   */\n  takeSnapshot(timestamp, isManualSnapshot, canvasElement) {\n    const {\n      sampling,\n      blockClass,\n      blockSelector,\n      unblockSelector,\n      dataURLOptions,\n      maxCanvasSize\n    } = this.options;\n    const fps = sampling === \"all\" ? 2 : sampling || 2;\n    const timeBetweenSnapshots = 1e3 / fps;\n    const shouldThrottle = this.lastSnapshotTime && timestamp - this.lastSnapshotTime < timeBetweenSnapshots;\n    if (shouldThrottle) {\n      return false;\n    }\n    this.lastSnapshotTime = timestamp;\n    const canvases = canvasElement ? [canvasElement] : this.getCanvasElements(blockClass, blockSelector, unblockSelector);\n    canvases.forEach((canvas) => {\n      const id = this.mirror.getId(canvas);\n      if (!this.mirror.hasNode(canvas) || !canvas.width || !canvas.height || this.snapshotInProgressMap.get(id)) {\n        return;\n      }\n      this.snapshotInProgressMap.set(id, true);\n      if (!isManualSnapshot && [\"webgl\", \"webgl2\"].includes(canvas.__context)) {\n        const context = canvas.getContext(canvas.__context);\n        if (context?.getContextAttributes()?.preserveDrawingBuffer === false) {\n          context.clear(context.COLOR_BUFFER_BIT);\n        }\n      }\n      createImageBitmap(canvas).then((bitmap) => {\n        this.worker?.postMessage(\n          {\n            id,\n            bitmap,\n            width: canvas.width,\n            height: canvas.height,\n            dataURLOptions,\n            maxCanvasSize\n          },\n          [bitmap]\n        );\n      }).catch((error) => {\n        callbackWrapper(() => {\n          this.snapshotInProgressMap.delete(id);\n          throw error;\n        })();\n      });\n    });\n    return true;\n  }\n  startPendingCanvasMutationFlusher() {\n    onRequestAnimationFrame(() => this.flushPendingCanvasMutations());\n  }\n  startRAFTimestamping() {\n    const setLatestRAFTimestamp = (timestamp) => {\n      this.rafStamps.latestId = timestamp;\n      onRequestAnimationFrame(setLatestRAFTimestamp);\n    };\n    onRequestAnimationFrame(setLatestRAFTimestamp);\n  }\n  flushPendingCanvasMutations() {\n    this.pendingCanvasMutations.forEach(\n      (_values, canvas) => {\n        const id = this.mirror.getId(canvas);\n        this.flushPendingCanvasMutationFor(canvas, id);\n      }\n    );\n    onRequestAnimationFrame(() => this.flushPendingCanvasMutations());\n  }\n  flushPendingCanvasMutationFor(canvas, id) {\n    if (this.frozen || this.locked) {\n      return;\n    }\n    const valuesWithType = this.pendingCanvasMutations.get(canvas);\n    if (!valuesWithType || id === -1) return;\n    const values = valuesWithType.map((value) => {\n      const { type: type2, ...rest } = value;\n      return rest;\n    });\n    const { type } = valuesWithType[0];\n    this.mutationCb({ id, type, commands: values });\n    this.pendingCanvasMutations.delete(canvas);\n  }\n}\nexport {\n  createCache as $,\n  MediaInteractions as A,\n  patch as B,\n  setTimeout as C,\n  legacy_isTouchEvent as D,\n  nowTimestamp as E,\n  IncrementalSource as F,\n  getWindowHeight as G,\n  getWindowWidth as H,\n  IGNORED_NODE as I,\n  toUpperCase as J,\n  genId as K,\n  EventType as L,\n  MouseInteractions as M,\n  NodeType as N,\n  stringifyRule as O,\n  PointerTypes as P,\n  onRequestAnimationFrame as Q,\n  polyfill as R,\n  StyleSheetMirror as S,\n  unregisterErrorHandler as T,\n  createMirror as U,\n  CanvasManagerNoop as V,\n  snapshot as W,\n  registerErrorHandler as X,\n  ReplayerEvents as Y,\n  decode as Z,\n  CanvasContext as _,\n  isBlocked as a,\n  rebuild as a0,\n  buildNodeWithSN as a1,\n  queueToResolveTrees as a2,\n  iterateResolveTree as a3,\n  uniqueTextMutations as a4,\n  getPositionsAndIndex as a5,\n  getNestedRule as a6,\n  getBaseDimension as a7,\n  clearTimeout as a8,\n  CanvasManager as a9,\n  utils as aa,\n  isShadowRoot as b,\n  isSerialized as c,\n  isAncestorRemoved as d,\n  isNativeShadowDom as e,\n  getInputValue as f,\n  getInputType as g,\n  ignoreAttribute as h,\n  isIgnored as i,\n  toLowerCase as j,\n  closestElementOfNode as k,\n  hasShadowRoot as l,\n  maskInputValue as m,\n  needMaskingText as n,\n  inDom as o,\n  getShadowHost as p,\n  serializeNodeWithId as q,\n  isSerializedIframe as r,\n  shouldMaskInput as s,\n  transformAttribute as t,\n  isSerializedStylesheet as u,\n  callbackWrapper as v,\n  throttle as w,\n  getWindowScroll as x,\n  on as y,\n  hookSetter as z\n};\n//# sourceMappingURL=canvas-manager-B7mHazUr.js.map\n", "import { i as isIgnored, a as isBlocked, b as isShadowRoot, c as isSerialized, d as isAncestorRemoved, e as isNativeShadowDom, g as getInputType, f as getInputValue, s as shouldMaskInput, n as needMaskingText, m as maskInputValue, h as ignoreAttribute, t as transformAttribute, j as toLowerCase, k as closestElementOfNode, l as hasShadowRoot, I as IGNORED_NODE, o as inDom, p as getShadowHost, q as serializeNodeWithId, r as isSerializedIframe, u as isSerializedStylesheet, v as callbackWrapper, w as throttle, x as getWindowScroll, y as on, M as MouseInteractions, z as hookSetter, A as MediaInteractions, B as patch, C as setTimeout$1, D as legacy_isTouchEvent, E as nowTimestamp, F as IncrementalSource, G as getWindowHeight, H as getWindowWidth, J as toUpperCase, P as PointerTypes, K as genId, L as EventType, N as NodeType$2, S as StyleSheetMirror, O as stringifyRule, Q as onRequestAnimationFrame, R as polyfill$1, T as unregisterErrorHandler, U as createMirror$2, V as CanvasManagerNoop, W as snapshot, X as registerErrorHandler, Y as ReplayerEvents, Z as decode, _ as CanvasContext, $ as createCache, a0 as rebuild, a1 as buildNodeWithSN, a2 as queueToResolveTrees, a3 as iterateResolveTree, a4 as uniqueTextMutations, a5 as getPositionsAndIndex, a6 as getNestedRule, a7 as getBaseDimension, a8 as clearTimeout } from \"./canvas-manager-B7mHazUr.js\";\nimport { a9, aa } from \"./canvas-manager-B7mHazUr.js\";\nvar __defProp = Object.defineProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\nvar __defProp2 = Object.defineProperty;\nvar __defNormalProp2 = (obj, key, value) => key in obj ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField2 = (obj, key, value) => __defNormalProp2(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\nvar NodeType$1 = /* @__PURE__ */ ((NodeType2) => {\n  NodeType2[NodeType2[\"Document\"] = 0] = \"Document\";\n  NodeType2[NodeType2[\"DocumentType\"] = 1] = \"DocumentType\";\n  NodeType2[NodeType2[\"Element\"] = 2] = \"Element\";\n  NodeType2[NodeType2[\"Text\"] = 3] = \"Text\";\n  NodeType2[NodeType2[\"CDATA\"] = 4] = \"CDATA\";\n  NodeType2[NodeType2[\"Comment\"] = 5] = \"Comment\";\n  return NodeType2;\n})(NodeType$1 || {});\nlet Mirror$1 = class Mirror {\n  constructor() {\n    __publicField2(this, \"idNodeMap\", /* @__PURE__ */ new Map());\n    __publicField2(this, \"nodeMetaMap\", /* @__PURE__ */ new WeakMap());\n  }\n  getId(n2) {\n    if (!n2) return -1;\n    const id = this.getMeta(n2)?.id;\n    return id ?? -1;\n  }\n  getNode(id) {\n    return this.idNodeMap.get(id) || null;\n  }\n  getIds() {\n    return Array.from(this.idNodeMap.keys());\n  }\n  getMeta(n2) {\n    return this.nodeMetaMap.get(n2) || null;\n  }\n  // removes the node from idNodeMap\n  // doesn't remove the node from nodeMetaMap\n  removeNodeFromMap(n2) {\n    const id = this.getId(n2);\n    this.idNodeMap.delete(id);\n    if (n2.childNodes) {\n      n2.childNodes.forEach(\n        (childNode) => this.removeNodeFromMap(childNode)\n      );\n    }\n  }\n  has(id) {\n    return this.idNodeMap.has(id);\n  }\n  hasNode(node) {\n    return this.nodeMetaMap.has(node);\n  }\n  add(n2, meta) {\n    const id = meta.id;\n    this.idNodeMap.set(id, n2);\n    this.nodeMetaMap.set(n2, meta);\n  }\n  replace(id, n2) {\n    const oldNode = this.getNode(id);\n    if (oldNode) {\n      const meta = this.nodeMetaMap.get(oldNode);\n      if (meta) this.nodeMetaMap.set(n2, meta);\n    }\n    this.idNodeMap.set(id, n2);\n  }\n  reset() {\n    this.idNodeMap = /* @__PURE__ */ new Map();\n    this.nodeMetaMap = /* @__PURE__ */ new WeakMap();\n  }\n};\nfunction createMirror$1() {\n  return new Mirror$1();\n}\nfunction parseCSSText(cssText) {\n  const res = {};\n  const listDelimiter = /;(?![^(]*\\))/g;\n  const propertyDelimiter = /:(.+)/;\n  const comment = /\\/\\*.*?\\*\\//g;\n  cssText.replace(comment, \"\").split(listDelimiter).forEach(function(item) {\n    if (item) {\n      const tmp = item.split(propertyDelimiter);\n      tmp.length > 1 && (res[camelize(tmp[0].trim())] = tmp[1].trim());\n    }\n  });\n  return res;\n}\nfunction toCSSText(style) {\n  const properties = [];\n  for (const name in style) {\n    const value = style[name];\n    if (typeof value !== \"string\") continue;\n    const normalizedName = hyphenate(name);\n    properties.push(`${normalizedName}: ${value};`);\n  }\n  return properties.join(\" \");\n}\nconst camelizeRE = /-([a-z])/g;\nconst CUSTOM_PROPERTY_REGEX = /^--[a-zA-Z0-9-]+$/;\nconst camelize = (str) => {\n  if (CUSTOM_PROPERTY_REGEX.test(str)) return str;\n  return str.replace(camelizeRE, (_, c2) => c2 ? c2.toUpperCase() : \"\");\n};\nconst hyphenateRE = /\\B([A-Z])/g;\nconst hyphenate = (str) => {\n  return str.replace(hyphenateRE, \"-$1\").toLowerCase();\n};\nclass BaseRRNode {\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any\n  constructor(..._args) {\n    __publicField(this, \"parentElement\", null);\n    __publicField(this, \"parentNode\", null);\n    __publicField(this, \"ownerDocument\");\n    __publicField(this, \"firstChild\", null);\n    __publicField(this, \"lastChild\", null);\n    __publicField(this, \"previousSibling\", null);\n    __publicField(this, \"nextSibling\", null);\n    __publicField(this, \"ELEMENT_NODE\", 1);\n    __publicField(this, \"TEXT_NODE\", 3);\n    __publicField(this, \"nodeType\");\n    __publicField(this, \"nodeName\");\n    __publicField(this, \"RRNodeType\");\n  }\n  get childNodes() {\n    const childNodes = [];\n    let childIterator = this.firstChild;\n    while (childIterator) {\n      childNodes.push(childIterator);\n      childIterator = childIterator.nextSibling;\n    }\n    return childNodes;\n  }\n  contains(node) {\n    if (!(node instanceof BaseRRNode)) return false;\n    else if (node.ownerDocument !== this.ownerDocument) return false;\n    else if (node === this) return true;\n    while (node.parentNode) {\n      if (node.parentNode === this) return true;\n      node = node.parentNode;\n    }\n    return false;\n  }\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  appendChild(_newChild) {\n    throw new Error(\n      `RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.`\n    );\n  }\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  insertBefore(_newChild, _refChild) {\n    throw new Error(\n      `RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.`\n    );\n  }\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  removeChild(_node) {\n    throw new Error(\n      `RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.`\n    );\n  }\n  toString() {\n    return \"RRNode\";\n  }\n}\nclass BaseRRDocument extends BaseRRNode {\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  constructor(...args) {\n    super(args);\n    __publicField(this, \"nodeType\", 9);\n    __publicField(this, \"nodeName\", \"#document\");\n    __publicField(this, \"compatMode\", \"CSS1Compat\");\n    __publicField(this, \"RRNodeType\", NodeType$1.Document);\n    __publicField(this, \"textContent\", null);\n    this.ownerDocument = this;\n  }\n  get documentElement() {\n    return this.childNodes.find(\n      (node) => node.RRNodeType === NodeType$1.Element && node.tagName === \"HTML\"\n    ) || null;\n  }\n  get body() {\n    return this.documentElement?.childNodes.find(\n      (node) => node.RRNodeType === NodeType$1.Element && node.tagName === \"BODY\"\n    ) || null;\n  }\n  get head() {\n    return this.documentElement?.childNodes.find(\n      (node) => node.RRNodeType === NodeType$1.Element && node.tagName === \"HEAD\"\n    ) || null;\n  }\n  get implementation() {\n    return this;\n  }\n  get firstElementChild() {\n    return this.documentElement;\n  }\n  appendChild(newChild) {\n    const nodeType = newChild.RRNodeType;\n    if (nodeType === NodeType$1.Element || nodeType === NodeType$1.DocumentType) {\n      if (this.childNodes.some((s2) => s2.RRNodeType === nodeType)) {\n        throw new Error(\n          `RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${nodeType === NodeType$1.Element ? \"RRElement\" : \"RRDoctype\"} on RRDocument allowed.`\n        );\n      }\n    }\n    const child = appendChild(this, newChild);\n    child.parentElement = null;\n    return child;\n  }\n  insertBefore(newChild, refChild) {\n    const nodeType = newChild.RRNodeType;\n    if (nodeType === NodeType$1.Element || nodeType === NodeType$1.DocumentType) {\n      if (this.childNodes.some((s2) => s2.RRNodeType === nodeType)) {\n        throw new Error(\n          `RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${nodeType === NodeType$1.Element ? \"RRElement\" : \"RRDoctype\"} on RRDocument allowed.`\n        );\n      }\n    }\n    const child = insertBefore(this, newChild, refChild);\n    child.parentElement = null;\n    return child;\n  }\n  removeChild(node) {\n    return removeChild(this, node);\n  }\n  open() {\n    this.firstChild = null;\n    this.lastChild = null;\n  }\n  close() {\n  }\n  /**\n   * Adhoc implementation for setting xhtml namespace in rebuilt.ts (rrweb-snapshot).\n   * There are two lines used this function:\n   * 1. doc.write('\\<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"\"\\>')\n   * 2. doc.write('\\<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"\"\\>')\n   */\n  write(content) {\n    let publicId;\n    if (content === '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"\">')\n      publicId = \"-//W3C//DTD XHTML 1.0 Transitional//EN\";\n    else if (content === '<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"\">')\n      publicId = \"-//W3C//DTD HTML 4.0 Transitional//EN\";\n    if (publicId) {\n      const doctype = this.createDocumentType(\"html\", publicId, \"\");\n      this.open();\n      this.appendChild(doctype);\n    }\n  }\n  createDocument(_namespace, _qualifiedName, _doctype) {\n    return new BaseRRDocument();\n  }\n  createDocumentType(qualifiedName, publicId, systemId) {\n    const doctype = new BaseRRDocumentType(qualifiedName, publicId, systemId);\n    doctype.ownerDocument = this;\n    return doctype;\n  }\n  createElement(tagName) {\n    const element = new BaseRRElement(tagName);\n    element.ownerDocument = this;\n    return element;\n  }\n  createElementNS(_namespaceURI, qualifiedName) {\n    return this.createElement(qualifiedName);\n  }\n  createTextNode(data) {\n    const text = new BaseRRText(data);\n    text.ownerDocument = this;\n    return text;\n  }\n  createComment(data) {\n    const comment = new BaseRRComment(data);\n    comment.ownerDocument = this;\n    return comment;\n  }\n  createCDATASection(data) {\n    const CDATASection = new BaseRRCDATASection(data);\n    CDATASection.ownerDocument = this;\n    return CDATASection;\n  }\n  toString() {\n    return \"RRDocument\";\n  }\n}\nclass BaseRRDocumentType extends BaseRRNode {\n  constructor(qualifiedName, publicId, systemId) {\n    super();\n    __publicField(this, \"nodeType\", 10);\n    __publicField(this, \"RRNodeType\", NodeType$1.DocumentType);\n    __publicField(this, \"name\");\n    __publicField(this, \"publicId\");\n    __publicField(this, \"systemId\");\n    __publicField(this, \"textContent\", null);\n    this.name = qualifiedName;\n    this.publicId = publicId;\n    this.systemId = systemId;\n    this.nodeName = qualifiedName;\n  }\n  toString() {\n    return \"RRDocumentType\";\n  }\n}\nclass BaseRRElement extends BaseRRNode {\n  constructor(tagName) {\n    super();\n    __publicField(this, \"nodeType\", 1);\n    __publicField(this, \"RRNodeType\", NodeType$1.Element);\n    __publicField(this, \"tagName\");\n    __publicField(this, \"attributes\", {});\n    __publicField(this, \"shadowRoot\", null);\n    __publicField(this, \"scrollLeft\");\n    __publicField(this, \"scrollTop\");\n    this.tagName = tagName.toUpperCase();\n    this.nodeName = tagName.toUpperCase();\n  }\n  get textContent() {\n    let result = \"\";\n    this.childNodes.forEach((node) => result += node.textContent);\n    return result;\n  }\n  set textContent(textContent) {\n    this.firstChild = null;\n    this.lastChild = null;\n    this.appendChild(this.ownerDocument.createTextNode(textContent));\n  }\n  get classList() {\n    return new ClassList(\n      this.attributes.class,\n      (newClassName) => {\n        this.attributes.class = newClassName;\n      }\n    );\n  }\n  get id() {\n    return this.attributes.id || \"\";\n  }\n  get className() {\n    return this.attributes.class || \"\";\n  }\n  get style() {\n    const style = this.attributes.style ? parseCSSText(this.attributes.style) : {};\n    const hyphenateRE2 = /\\B([A-Z])/g;\n    style.setProperty = (name, value, priority) => {\n      if (hyphenateRE2.test(name)) return;\n      const normalizedName = camelize(name);\n      if (!value) delete style[normalizedName];\n      else style[normalizedName] = value;\n      if (priority === \"important\") style[normalizedName] += \" !important\";\n      this.attributes.style = toCSSText(style);\n    };\n    style.removeProperty = (name) => {\n      if (hyphenateRE2.test(name)) return \"\";\n      const normalizedName = camelize(name);\n      const value = style[normalizedName] || \"\";\n      delete style[normalizedName];\n      this.attributes.style = toCSSText(style);\n      return value;\n    };\n    return style;\n  }\n  getAttribute(name) {\n    return this.attributes[name] || null;\n  }\n  setAttribute(name, attribute) {\n    this.attributes[name] = attribute;\n  }\n  setAttributeNS(_namespace, qualifiedName, value) {\n    this.setAttribute(qualifiedName, value);\n  }\n  removeAttribute(name) {\n    delete this.attributes[name];\n  }\n  appendChild(newChild) {\n    return appendChild(this, newChild);\n  }\n  insertBefore(newChild, refChild) {\n    return insertBefore(this, newChild, refChild);\n  }\n  removeChild(node) {\n    return removeChild(this, node);\n  }\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  attachShadow(_init) {\n    const shadowRoot = this.ownerDocument.createElement(\"SHADOWROOT\");\n    this.shadowRoot = shadowRoot;\n    return shadowRoot;\n  }\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  dispatchEvent(_event) {\n    return true;\n  }\n  toString() {\n    let attributeString = \"\";\n    for (const attribute in this.attributes) {\n      attributeString += `${attribute}=\"${this.attributes[attribute]}\" `;\n    }\n    return `${this.tagName} ${attributeString}`;\n  }\n}\nclass BaseRRMediaElement extends BaseRRElement {\n  constructor() {\n    super(...arguments);\n    __publicField(this, \"currentTime\");\n    __publicField(this, \"volume\");\n    __publicField(this, \"paused\");\n    __publicField(this, \"muted\");\n    __publicField(this, \"playbackRate\");\n    __publicField(this, \"loop\");\n  }\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  attachShadow(_init) {\n    throw new Error(\n      `RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow`\n    );\n  }\n  play() {\n    this.paused = false;\n  }\n  pause() {\n    this.paused = true;\n  }\n}\nclass BaseRRText extends BaseRRNode {\n  constructor(data) {\n    super();\n    __publicField(this, \"nodeType\", 3);\n    __publicField(this, \"nodeName\", \"#text\");\n    __publicField(this, \"RRNodeType\", NodeType$1.Text);\n    __publicField(this, \"data\");\n    this.data = data;\n  }\n  get textContent() {\n    return this.data;\n  }\n  set textContent(textContent) {\n    this.data = textContent;\n  }\n  toString() {\n    return `RRText text=${JSON.stringify(this.data)}`;\n  }\n}\nclass BaseRRComment extends BaseRRNode {\n  constructor(data) {\n    super();\n    __publicField(this, \"nodeType\", 8);\n    __publicField(this, \"nodeName\", \"#comment\");\n    __publicField(this, \"RRNodeType\", NodeType$1.Comment);\n    __publicField(this, \"data\");\n    this.data = data;\n  }\n  get textContent() {\n    return this.data;\n  }\n  set textContent(textContent) {\n    this.data = textContent;\n  }\n  toString() {\n    return `RRComment text=${JSON.stringify(this.data)}`;\n  }\n}\nclass BaseRRCDATASection extends BaseRRNode {\n  constructor(data) {\n    super();\n    __publicField(this, \"nodeName\", \"#cdata-section\");\n    __publicField(this, \"nodeType\", 4);\n    __publicField(this, \"RRNodeType\", NodeType$1.CDATA);\n    __publicField(this, \"data\");\n    this.data = data;\n  }\n  get textContent() {\n    return this.data;\n  }\n  set textContent(textContent) {\n    this.data = textContent;\n  }\n  toString() {\n    return `RRCDATASection data=${JSON.stringify(this.data)}`;\n  }\n}\nclass ClassList {\n  constructor(classText, onChange) {\n    __publicField(this, \"onChange\");\n    __publicField(this, \"classes\", []);\n    __publicField(this, \"add\", (...classNames) => {\n      for (const item of classNames) {\n        const className = String(item);\n        if (this.classes.indexOf(className) >= 0) continue;\n        this.classes.push(className);\n      }\n      this.onChange && this.onChange(this.classes.join(\" \"));\n    });\n    __publicField(this, \"remove\", (...classNames) => {\n      this.classes = this.classes.filter(\n        (item) => classNames.indexOf(item) === -1\n      );\n      this.onChange && this.onChange(this.classes.join(\" \"));\n    });\n    if (classText) {\n      const classes = classText.trim().split(/\\s+/);\n      this.classes.push(...classes);\n    }\n    this.onChange = onChange;\n  }\n}\nfunction appendChild(parent, newChild) {\n  if (newChild.parentNode) newChild.parentNode.removeChild(newChild);\n  if (parent.lastChild) {\n    parent.lastChild.nextSibling = newChild;\n    newChild.previousSibling = parent.lastChild;\n  } else {\n    parent.firstChild = newChild;\n    newChild.previousSibling = null;\n  }\n  parent.lastChild = newChild;\n  newChild.nextSibling = null;\n  newChild.parentNode = parent;\n  newChild.parentElement = parent;\n  newChild.ownerDocument = parent.ownerDocument;\n  return newChild;\n}\nfunction insertBefore(parent, newChild, refChild) {\n  if (!refChild) return appendChild(parent, newChild);\n  if (refChild.parentNode !== parent)\n    throw new Error(\n      \"Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.\"\n    );\n  if (newChild === refChild) return newChild;\n  if (newChild.parentNode) newChild.parentNode.removeChild(newChild);\n  newChild.previousSibling = refChild.previousSibling;\n  refChild.previousSibling = newChild;\n  newChild.nextSibling = refChild;\n  if (newChild.previousSibling) newChild.previousSibling.nextSibling = newChild;\n  else parent.firstChild = newChild;\n  newChild.parentElement = parent;\n  newChild.parentNode = parent;\n  newChild.ownerDocument = parent.ownerDocument;\n  return newChild;\n}\nfunction removeChild(parent, child) {\n  if (child.parentNode !== parent)\n    throw new Error(\n      \"Failed to execute 'removeChild' on 'RRNode': The RRNode to be removed is not a child of this RRNode.\"\n    );\n  if (child.previousSibling)\n    child.previousSibling.nextSibling = child.nextSibling;\n  else parent.firstChild = child.nextSibling;\n  if (child.nextSibling)\n    child.nextSibling.previousSibling = child.previousSibling;\n  else parent.lastChild = child.previousSibling;\n  child.previousSibling = null;\n  child.nextSibling = null;\n  child.parentElement = null;\n  child.parentNode = null;\n  return child;\n}\nvar NodeType = /* @__PURE__ */ ((NodeType2) => {\n  NodeType2[NodeType2[\"PLACEHOLDER\"] = 0] = \"PLACEHOLDER\";\n  NodeType2[NodeType2[\"ELEMENT_NODE\"] = 1] = \"ELEMENT_NODE\";\n  NodeType2[NodeType2[\"ATTRIBUTE_NODE\"] = 2] = \"ATTRIBUTE_NODE\";\n  NodeType2[NodeType2[\"TEXT_NODE\"] = 3] = \"TEXT_NODE\";\n  NodeType2[NodeType2[\"CDATA_SECTION_NODE\"] = 4] = \"CDATA_SECTION_NODE\";\n  NodeType2[NodeType2[\"ENTITY_REFERENCE_NODE\"] = 5] = \"ENTITY_REFERENCE_NODE\";\n  NodeType2[NodeType2[\"ENTITY_NODE\"] = 6] = \"ENTITY_NODE\";\n  NodeType2[NodeType2[\"PROCESSING_INSTRUCTION_NODE\"] = 7] = \"PROCESSING_INSTRUCTION_NODE\";\n  NodeType2[NodeType2[\"COMMENT_NODE\"] = 8] = \"COMMENT_NODE\";\n  NodeType2[NodeType2[\"DOCUMENT_NODE\"] = 9] = \"DOCUMENT_NODE\";\n  NodeType2[NodeType2[\"DOCUMENT_TYPE_NODE\"] = 10] = \"DOCUMENT_TYPE_NODE\";\n  NodeType2[NodeType2[\"DOCUMENT_FRAGMENT_NODE\"] = 11] = \"DOCUMENT_FRAGMENT_NODE\";\n  return NodeType2;\n})(NodeType || {});\nfunction getIFrameContentDocument(iframe) {\n  try {\n    return iframe.contentDocument;\n  } catch (e2) {\n  }\n}\nfunction getIFrameContentWindow(iframe) {\n  try {\n    return iframe.contentWindow;\n  } catch (e2) {\n  }\n}\nconst NAMESPACES = {\n  svg: \"http://www.w3.org/2000/svg\",\n  \"xlink:href\": \"http://www.w3.org/1999/xlink\",\n  xmlns: \"http://www.w3.org/2000/xmlns/\"\n};\nconst SVGTagMap = {\n  altglyph: \"altGlyph\",\n  altglyphdef: \"altGlyphDef\",\n  altglyphitem: \"altGlyphItem\",\n  animatecolor: \"animateColor\",\n  animatemotion: \"animateMotion\",\n  animatetransform: \"animateTransform\",\n  clippath: \"clipPath\",\n  feblend: \"feBlend\",\n  fecolormatrix: \"feColorMatrix\",\n  fecomponenttransfer: \"feComponentTransfer\",\n  fecomposite: \"feComposite\",\n  feconvolvematrix: \"feConvolveMatrix\",\n  fediffuselighting: \"feDiffuseLighting\",\n  fedisplacementmap: \"feDisplacementMap\",\n  fedistantlight: \"feDistantLight\",\n  fedropshadow: \"feDropShadow\",\n  feflood: \"feFlood\",\n  fefunca: \"feFuncA\",\n  fefuncb: \"feFuncB\",\n  fefuncg: \"feFuncG\",\n  fefuncr: \"feFuncR\",\n  fegaussianblur: \"feGaussianBlur\",\n  feimage: \"feImage\",\n  femerge: \"feMerge\",\n  femergenode: \"feMergeNode\",\n  femorphology: \"feMorphology\",\n  feoffset: \"feOffset\",\n  fepointlight: \"fePointLight\",\n  fespecularlighting: \"feSpecularLighting\",\n  fespotlight: \"feSpotLight\",\n  fetile: \"feTile\",\n  feturbulence: \"feTurbulence\",\n  foreignobject: \"foreignObject\",\n  glyphref: \"glyphRef\",\n  lineargradient: \"linearGradient\",\n  radialgradient: \"radialGradient\"\n};\nlet createdNodeSet = null;\nfunction diff(oldTree, newTree, replayer, rrnodeMirror = newTree.mirror || newTree.ownerDocument.mirror) {\n  oldTree = diffBeforeUpdatingChildren(\n    oldTree,\n    newTree,\n    replayer,\n    rrnodeMirror\n  );\n  diffChildren(oldTree, newTree, replayer, rrnodeMirror);\n  diffAfterUpdatingChildren(oldTree, newTree, replayer);\n}\nfunction diffBeforeUpdatingChildren(oldTree, newTree, replayer, rrnodeMirror) {\n  if (replayer.afterAppend && !createdNodeSet) {\n    createdNodeSet = /* @__PURE__ */ new WeakSet();\n    setTimeout(() => {\n      createdNodeSet = null;\n    }, 0);\n  }\n  if (!sameNodeType(oldTree, newTree)) {\n    const calibratedOldTree = createOrGetNode(\n      newTree,\n      replayer.mirror,\n      rrnodeMirror\n    );\n    oldTree.parentNode?.replaceChild(calibratedOldTree, oldTree);\n    oldTree = calibratedOldTree;\n  }\n  switch (newTree.RRNodeType) {\n    case NodeType$1.Document: {\n      if (!nodeMatching(oldTree, newTree, replayer.mirror, rrnodeMirror)) {\n        const newMeta = rrnodeMirror.getMeta(newTree);\n        if (newMeta) {\n          replayer.mirror.removeNodeFromMap(oldTree);\n          oldTree.close();\n          oldTree.open();\n          replayer.mirror.add(oldTree, newMeta);\n          createdNodeSet?.add(oldTree);\n        }\n      }\n      break;\n    }\n    case NodeType$1.Element: {\n      const oldElement = oldTree;\n      const newRRElement = newTree;\n      switch (newRRElement.tagName) {\n        case \"IFRAME\": {\n          const oldContentDocument = getIFrameContentDocument(\n            oldTree\n          );\n          if (!oldContentDocument) break;\n          diff(\n            oldContentDocument,\n            newTree.contentDocument,\n            replayer,\n            rrnodeMirror\n          );\n          break;\n        }\n      }\n      if (newRRElement.shadowRoot) {\n        if (!oldElement.shadowRoot) oldElement.attachShadow({ mode: \"open\" });\n        diffChildren(\n          // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n          oldElement.shadowRoot,\n          newRRElement.shadowRoot,\n          replayer,\n          rrnodeMirror\n        );\n      }\n      diffProps(oldElement, newRRElement, rrnodeMirror);\n      break;\n    }\n  }\n  return oldTree;\n}\nfunction diffAfterUpdatingChildren(oldTree, newTree, replayer) {\n  switch (newTree.RRNodeType) {\n    case NodeType$1.Document: {\n      const scrollData = newTree.scrollData;\n      scrollData && replayer.applyScroll(scrollData, true);\n      break;\n    }\n    case NodeType$1.Element: {\n      const oldElement = oldTree;\n      const newRRElement = newTree;\n      newRRElement.scrollData && replayer.applyScroll(newRRElement.scrollData, true);\n      newRRElement.inputData && replayer.applyInput(newRRElement.inputData);\n      switch (newRRElement.tagName) {\n        case \"AUDIO\":\n        case \"VIDEO\": {\n          const oldMediaElement = oldTree;\n          const newMediaRRElement = newRRElement;\n          if (newMediaRRElement.paused !== void 0) {\n            const maybePromise = newMediaRRElement.paused ? oldMediaElement.pause() : oldMediaElement.play();\n            if (typeof maybePromise?.catch === \"function\") {\n              maybePromise.catch((e2) => {\n                console.warn(e2);\n              });\n            }\n          }\n          if (newMediaRRElement.muted !== void 0)\n            oldMediaElement.muted = newMediaRRElement.muted;\n          if (newMediaRRElement.volume !== void 0)\n            oldMediaElement.volume = newMediaRRElement.volume;\n          if (newMediaRRElement.currentTime !== void 0)\n            oldMediaElement.currentTime = newMediaRRElement.currentTime;\n          if (newMediaRRElement.playbackRate !== void 0)\n            oldMediaElement.playbackRate = newMediaRRElement.playbackRate;\n          break;\n        }\n        case \"CANVAS\": {\n          const rrCanvasElement = newTree;\n          if (rrCanvasElement.rr_dataURL !== null) {\n            const image = document.createElement(\"img\");\n            image.onload = () => {\n              const ctx = oldElement.getContext(\"2d\");\n              if (ctx) {\n                ctx.drawImage(image, 0, 0, image.width, image.height);\n              }\n            };\n            image.src = rrCanvasElement.rr_dataURL;\n          }\n          rrCanvasElement.canvasMutations.forEach(\n            (canvasMutation2) => replayer.applyCanvas(\n              canvasMutation2.event,\n              canvasMutation2.mutation,\n              oldTree\n            )\n          );\n          break;\n        }\n        // Props of style elements have to be updated after all children are updated. Otherwise the props can be overwritten by textContent.\n        case \"STYLE\": {\n          const styleSheet = oldElement.sheet;\n          styleSheet && newTree.rules.forEach(\n            (data) => replayer.applyStyleSheetMutation(data, styleSheet)\n          );\n          break;\n        }\n      }\n      break;\n    }\n    case NodeType$1.Text:\n    case NodeType$1.Comment:\n    case NodeType$1.CDATA: {\n      if (oldTree.textContent !== newTree.data)\n        oldTree.textContent = newTree.data;\n      break;\n    }\n  }\n  if (createdNodeSet?.has(oldTree)) {\n    createdNodeSet.delete(oldTree);\n    replayer.afterAppend?.(oldTree, replayer.mirror.getId(oldTree));\n  }\n}\nfunction diffProps(oldTree, newTree, rrnodeMirror) {\n  const oldAttributes = oldTree.attributes;\n  const newAttributes = newTree.attributes;\n  for (const name in newAttributes) {\n    const newValue = newAttributes[name];\n    const sn = rrnodeMirror.getMeta(newTree);\n    if (sn?.isSVG && NAMESPACES[name])\n      oldTree.setAttributeNS(NAMESPACES[name], name, newValue);\n    else if (newTree.tagName === \"CANVAS\" && name === \"rr_dataURL\") {\n      const image = document.createElement(\"img\");\n      image.src = newValue;\n      image.onload = () => {\n        const ctx = oldTree.getContext(\"2d\");\n        if (ctx) {\n          ctx.drawImage(image, 0, 0, image.width, image.height);\n        }\n      };\n    } else if (newTree.tagName === \"IFRAME\" && name === \"srcdoc\") continue;\n    else {\n      try {\n        oldTree.setAttribute(name, newValue);\n      } catch (err) {\n        console.warn(err);\n      }\n    }\n  }\n  for (const { name } of Array.from(oldAttributes))\n    if (!(name in newAttributes)) oldTree.removeAttribute(name);\n  newTree.scrollLeft && (oldTree.scrollLeft = newTree.scrollLeft);\n  newTree.scrollTop && (oldTree.scrollTop = newTree.scrollTop);\n}\nfunction diffChildren(oldTree, newTree, replayer, rrnodeMirror) {\n  const oldChildren = Array.from(oldTree.childNodes);\n  const newChildren = newTree.childNodes;\n  if (oldChildren.length === 0 && newChildren.length === 0) return;\n  let oldStartIndex = 0, oldEndIndex = oldChildren.length - 1, newStartIndex = 0, newEndIndex = newChildren.length - 1;\n  let oldStartNode = oldChildren[oldStartIndex], oldEndNode = oldChildren[oldEndIndex], newStartNode = newChildren[newStartIndex], newEndNode = newChildren[newEndIndex];\n  let oldIdToIndex = void 0, indexInOld = void 0;\n  while (oldStartIndex <= oldEndIndex && newStartIndex <= newEndIndex) {\n    if (oldStartNode === void 0) {\n      oldStartNode = oldChildren[++oldStartIndex];\n    } else if (oldEndNode === void 0) {\n      oldEndNode = oldChildren[--oldEndIndex];\n    } else if (\n      // same first node?\n      nodeMatching(oldStartNode, newStartNode, replayer.mirror, rrnodeMirror)\n    ) {\n      oldStartNode = oldChildren[++oldStartIndex];\n      newStartNode = newChildren[++newStartIndex];\n    } else if (\n      // same last node?\n      nodeMatching(oldEndNode, newEndNode, replayer.mirror, rrnodeMirror)\n    ) {\n      oldEndNode = oldChildren[--oldEndIndex];\n      newEndNode = newChildren[--newEndIndex];\n    } else if (\n      // is the first old node the same as the last new node?\n      nodeMatching(oldStartNode, newEndNode, replayer.mirror, rrnodeMirror)\n    ) {\n      try {\n        handleInsertBefore(oldTree, oldStartNode, oldEndNode.nextSibling);\n      } catch (e2) {\n        console.warn(e2);\n      }\n      oldStartNode = oldChildren[++oldStartIndex];\n      newEndNode = newChildren[--newEndIndex];\n    } else if (\n      // is the last old node the same as the first new node?\n      nodeMatching(oldEndNode, newStartNode, replayer.mirror, rrnodeMirror)\n    ) {\n      try {\n        handleInsertBefore(oldTree, oldEndNode, oldStartNode);\n      } catch (e2) {\n        console.warn(e2);\n      }\n      oldEndNode = oldChildren[--oldEndIndex];\n      newStartNode = newChildren[++newStartIndex];\n    } else {\n      if (!oldIdToIndex) {\n        oldIdToIndex = {};\n        for (let i2 = oldStartIndex; i2 <= oldEndIndex; i2++) {\n          const oldChild2 = oldChildren[i2];\n          if (oldChild2 && replayer.mirror.hasNode(oldChild2))\n            oldIdToIndex[replayer.mirror.getId(oldChild2)] = i2;\n        }\n      }\n      indexInOld = oldIdToIndex[rrnodeMirror.getId(newStartNode)];\n      const nodeToMove = oldChildren[indexInOld];\n      if (indexInOld !== void 0 && nodeToMove && nodeMatching(nodeToMove, newStartNode, replayer.mirror, rrnodeMirror)) {\n        try {\n          handleInsertBefore(oldTree, nodeToMove, oldStartNode);\n        } catch (e2) {\n          console.warn(e2);\n        }\n        oldChildren[indexInOld] = void 0;\n      } else {\n        const newNode = createOrGetNode(\n          newStartNode,\n          replayer.mirror,\n          rrnodeMirror\n        );\n        if (oldTree.nodeName === \"#document\" && oldStartNode && /**\n        * Special case 1: one document isn't allowed to have two doctype nodes at the same time, so we need to remove the old one first before inserting the new one.\n        * How this case happens: A parent document in the old tree already has a doctype node with an id e.g. #1. A new full snapshot rebuilds the replayer with a new doctype node with another id #2. According to the algorithm, the new doctype node will be inserted before the old one, which is not allowed by the Document standard.\n        */\n        (newNode.nodeType === newNode.DOCUMENT_TYPE_NODE && oldStartNode.nodeType === oldStartNode.DOCUMENT_TYPE_NODE || /**\n        * Special case 2: one document isn't allowed to have two HTMLElements at the same time, so we need to remove the old one first before inserting the new one.\n        * How this case happens: A mounted iframe element has an automatically created HTML element. We should delete it before inserting a serialized one. Otherwise, an error 'Only one element on document allowed' will be thrown.\n        */\n        newNode.nodeType === newNode.ELEMENT_NODE && oldStartNode.nodeType === oldStartNode.ELEMENT_NODE)) {\n          oldTree.removeChild(oldStartNode);\n          replayer.mirror.removeNodeFromMap(oldStartNode);\n          oldStartNode = oldChildren[++oldStartIndex];\n        }\n        try {\n          handleInsertBefore(oldTree, newNode, oldStartNode || null);\n        } catch (e2) {\n          console.warn(e2);\n        }\n      }\n      newStartNode = newChildren[++newStartIndex];\n    }\n  }\n  if (oldStartIndex > oldEndIndex) {\n    const referenceRRNode = newChildren[newEndIndex + 1];\n    let referenceNode = null;\n    if (referenceRRNode)\n      referenceNode = replayer.mirror.getNode(\n        rrnodeMirror.getId(referenceRRNode)\n      );\n    for (; newStartIndex <= newEndIndex; ++newStartIndex) {\n      const newNode = createOrGetNode(\n        newChildren[newStartIndex],\n        replayer.mirror,\n        rrnodeMirror\n      );\n      try {\n        handleInsertBefore(oldTree, newNode, referenceNode);\n      } catch (e2) {\n        console.warn(e2);\n      }\n    }\n  } else if (newStartIndex > newEndIndex) {\n    for (; oldStartIndex <= oldEndIndex; oldStartIndex++) {\n      const node = oldChildren[oldStartIndex];\n      if (!node || node.parentNode !== oldTree) continue;\n      try {\n        oldTree.removeChild(node);\n        replayer.mirror.removeNodeFromMap(node);\n      } catch (e2) {\n        console.warn(e2);\n      }\n    }\n  }\n  let oldChild = oldTree.firstChild;\n  let newChild = newTree.firstChild;\n  while (oldChild !== null && newChild !== null) {\n    diff(oldChild, newChild, replayer, rrnodeMirror);\n    oldChild = oldChild.nextSibling;\n    newChild = newChild.nextSibling;\n  }\n}\nfunction createOrGetNode(rrNode, domMirror, rrnodeMirror) {\n  const nodeId = rrnodeMirror.getId(rrNode);\n  const sn = rrnodeMirror.getMeta(rrNode);\n  let node = null;\n  if (nodeId > -1) node = domMirror.getNode(nodeId);\n  if (node !== null && sameNodeType(node, rrNode)) return node;\n  switch (rrNode.RRNodeType) {\n    case NodeType$1.Document:\n      node = new Document();\n      break;\n    case NodeType$1.DocumentType:\n      node = document.implementation.createDocumentType(\n        rrNode.name,\n        rrNode.publicId,\n        rrNode.systemId\n      );\n      break;\n    case NodeType$1.Element: {\n      let tagName = rrNode.tagName.toLowerCase();\n      tagName = SVGTagMap[tagName] || tagName;\n      if (sn && \"isSVG\" in sn && sn?.isSVG) {\n        node = document.createElementNS(NAMESPACES[\"svg\"], tagName);\n      } else node = document.createElement(rrNode.tagName);\n      break;\n    }\n    case NodeType$1.Text:\n      node = document.createTextNode(rrNode.data);\n      break;\n    case NodeType$1.Comment:\n      node = document.createComment(rrNode.data);\n      break;\n    case NodeType$1.CDATA:\n      node = document.createCDATASection(rrNode.data);\n      break;\n  }\n  if (sn) domMirror.add(node, { ...sn });\n  try {\n    createdNodeSet?.add(node);\n  } catch (e2) {\n  }\n  return node;\n}\nfunction sameNodeType(node1, node2) {\n  if (node1.nodeType !== node2.nodeType) return false;\n  return node1.nodeType !== node1.ELEMENT_NODE || node1.tagName.toUpperCase() === node2.tagName;\n}\nfunction nodeMatching(node1, node2, domMirror, rrdomMirror) {\n  const node1Id = domMirror.getId(node1);\n  const node2Id = rrdomMirror.getId(node2);\n  if (node1Id === -1 || node1Id !== node2Id) return false;\n  return sameNodeType(node1, node2);\n}\nfunction getInsertedStylesFromElement(styleElement) {\n  const elementCssRules = styleElement.sheet?.cssRules;\n  if (!elementCssRules || !elementCssRules.length) return;\n  const tempStyleSheet = new CSSStyleSheet();\n  tempStyleSheet.replaceSync(styleElement.innerText);\n  const innerTextStylesMap = {};\n  for (let i2 = 0; i2 < tempStyleSheet.cssRules.length; i2++) {\n    innerTextStylesMap[tempStyleSheet.cssRules[i2].cssText] = tempStyleSheet.cssRules[i2];\n  }\n  const insertedStylesStyleSheet = [];\n  for (let i2 = 0; i2 < elementCssRules?.length; i2++) {\n    const cssRuleText = elementCssRules[i2].cssText;\n    if (!innerTextStylesMap[cssRuleText]) {\n      insertedStylesStyleSheet.push({\n        index: i2,\n        cssRuleText\n      });\n    }\n  }\n  return insertedStylesStyleSheet;\n}\nfunction handleInsertBefore(oldTree, nodeToMove, insertBeforeNode) {\n  let insertedStyles;\n  if (nodeToMove.nodeName === \"STYLE\") {\n    insertedStyles = getInsertedStylesFromElement(\n      nodeToMove\n    );\n  }\n  oldTree.insertBefore(nodeToMove, insertBeforeNode);\n  if (insertedStyles && insertedStyles.length) {\n    insertedStyles.forEach(({ cssRuleText, index }) => {\n      nodeToMove.sheet?.insertRule(cssRuleText, index);\n    });\n  }\n}\nclass RRDocument extends BaseRRDocument {\n  constructor(mirror2) {\n    super();\n    __publicField(this, \"UNSERIALIZED_STARTING_ID\", -2);\n    __publicField(this, \"_unserializedId\", this.UNSERIALIZED_STARTING_ID);\n    __publicField(this, \"mirror\", createMirror());\n    __publicField(this, \"scrollData\", null);\n    if (mirror2) {\n      this.mirror = mirror2;\n    }\n  }\n  /**\n   * Every time the id is used, it will minus 1 automatically to avoid collisions.\n   */\n  get unserializedId() {\n    return this._unserializedId--;\n  }\n  createDocument(_namespace, _qualifiedName, _doctype) {\n    return new RRDocument();\n  }\n  createDocumentType(qualifiedName, publicId, systemId) {\n    const documentTypeNode = new RRDocumentType(\n      qualifiedName,\n      publicId,\n      systemId\n    );\n    documentTypeNode.ownerDocument = this;\n    return documentTypeNode;\n  }\n  createElement(tagName) {\n    const upperTagName = tagName.toUpperCase();\n    let element;\n    switch (upperTagName) {\n      case \"AUDIO\":\n      case \"VIDEO\":\n        element = new RRMediaElement(upperTagName);\n        break;\n      case \"IFRAME\":\n        element = new RRIFrameElement(upperTagName, this.mirror);\n        break;\n      case \"CANVAS\":\n        element = new RRCanvasElement(upperTagName);\n        break;\n      case \"STYLE\":\n        element = new RRStyleElement(upperTagName);\n        break;\n      default:\n        element = new RRElement(upperTagName);\n        break;\n    }\n    element.ownerDocument = this;\n    return element;\n  }\n  createComment(data) {\n    const commentNode = new RRComment(data);\n    commentNode.ownerDocument = this;\n    return commentNode;\n  }\n  createCDATASection(data) {\n    const sectionNode = new RRCDATASection(data);\n    sectionNode.ownerDocument = this;\n    return sectionNode;\n  }\n  createTextNode(data) {\n    const textNode = new RRText(data);\n    textNode.ownerDocument = this;\n    return textNode;\n  }\n  destroyTree() {\n    this.firstChild = null;\n    this.lastChild = null;\n    this.mirror.reset();\n  }\n  open() {\n    super.open();\n    this._unserializedId = this.UNSERIALIZED_STARTING_ID;\n  }\n}\nconst RRDocumentType = BaseRRDocumentType;\nclass RRElement extends BaseRRElement {\n  constructor() {\n    super(...arguments);\n    __publicField(this, \"inputData\", null);\n    __publicField(this, \"scrollData\", null);\n  }\n}\nclass RRMediaElement extends BaseRRMediaElement {\n}\nclass RRCanvasElement extends RRElement {\n  constructor() {\n    super(...arguments);\n    __publicField(this, \"rr_dataURL\", null);\n    __publicField(this, \"canvasMutations\", []);\n  }\n  /**\n   * This is a dummy implementation to distinguish RRCanvasElement from real HTMLCanvasElement.\n   */\n  getContext() {\n    return null;\n  }\n}\nclass RRStyleElement extends RRElement {\n  constructor() {\n    super(...arguments);\n    __publicField(this, \"rules\", []);\n  }\n}\nclass RRIFrameElement extends RRElement {\n  constructor(upperTagName, mirror2) {\n    super(upperTagName);\n    __publicField(this, \"contentDocument\", new RRDocument());\n    this.contentDocument.mirror = mirror2;\n  }\n}\nconst RRText = BaseRRText;\nconst RRComment = BaseRRComment;\nconst RRCDATASection = BaseRRCDATASection;\nfunction getValidTagName(element) {\n  if (element instanceof HTMLFormElement) {\n    return \"FORM\";\n  }\n  return element.tagName.toUpperCase();\n}\nfunction buildFromNode(node, rrdom, domMirror, parentRRNode) {\n  let rrNode;\n  switch (node.nodeType) {\n    case NodeType.DOCUMENT_NODE:\n      if (parentRRNode && parentRRNode.nodeName === \"IFRAME\")\n        rrNode = parentRRNode.contentDocument;\n      else {\n        rrNode = rrdom;\n        rrNode.compatMode = node.compatMode;\n      }\n      break;\n    case NodeType.DOCUMENT_TYPE_NODE: {\n      const documentType = node;\n      rrNode = rrdom.createDocumentType(\n        documentType.name,\n        documentType.publicId,\n        documentType.systemId\n      );\n      break;\n    }\n    case NodeType.ELEMENT_NODE: {\n      const elementNode = node;\n      const tagName = getValidTagName(elementNode);\n      rrNode = rrdom.createElement(tagName);\n      const rrElement = rrNode;\n      for (const { name, value } of Array.from(elementNode.attributes)) {\n        rrElement.attributes[name] = value;\n      }\n      elementNode.scrollLeft && (rrElement.scrollLeft = elementNode.scrollLeft);\n      elementNode.scrollTop && (rrElement.scrollTop = elementNode.scrollTop);\n      break;\n    }\n    case NodeType.TEXT_NODE:\n      rrNode = rrdom.createTextNode(node.textContent || \"\");\n      break;\n    case NodeType.CDATA_SECTION_NODE:\n      rrNode = rrdom.createCDATASection(node.data);\n      break;\n    case NodeType.COMMENT_NODE:\n      rrNode = rrdom.createComment(node.textContent || \"\");\n      break;\n    // if node is a shadow root\n    case NodeType.DOCUMENT_FRAGMENT_NODE:\n      rrNode = parentRRNode.attachShadow({ mode: \"open\" });\n      break;\n    default:\n      return null;\n  }\n  let sn = domMirror.getMeta(node);\n  if (rrdom instanceof RRDocument) {\n    if (!sn) {\n      sn = getDefaultSN(rrNode, rrdom.unserializedId);\n      domMirror.add(node, sn);\n    }\n    rrdom.mirror.add(rrNode, { ...sn });\n  }\n  return rrNode;\n}\nfunction buildFromDom(dom, domMirror = createMirror$1(), rrdom = new RRDocument()) {\n  function walk2(node, parentRRNode) {\n    const rrNode = buildFromNode(node, rrdom, domMirror, parentRRNode);\n    if (rrNode === null) return;\n    if (\n      // if the parentRRNode isn't a RRIFrameElement\n      parentRRNode?.nodeName !== \"IFRAME\" && // if node isn't a shadow root\n      node.nodeType !== NodeType.DOCUMENT_FRAGMENT_NODE\n    ) {\n      parentRRNode?.appendChild(rrNode);\n      rrNode.parentNode = parentRRNode;\n      rrNode.parentElement = parentRRNode;\n    }\n    if (node.nodeName === \"IFRAME\") {\n      const iframeDoc = getIFrameContentDocument(node);\n      iframeDoc && walk2(iframeDoc, rrNode);\n    } else if (node.nodeType === NodeType.DOCUMENT_NODE || node.nodeType === NodeType.ELEMENT_NODE || node.nodeType === NodeType.DOCUMENT_FRAGMENT_NODE) {\n      if (node.nodeType === NodeType.ELEMENT_NODE && node.shadowRoot)\n        walk2(node.shadowRoot, rrNode);\n      node.childNodes.forEach((childNode) => walk2(childNode, rrNode));\n    }\n  }\n  walk2(dom, null);\n  return rrdom;\n}\nfunction createMirror() {\n  return new Mirror2();\n}\nclass Mirror2 {\n  constructor() {\n    __publicField(this, \"idNodeMap\", /* @__PURE__ */ new Map());\n    __publicField(this, \"nodeMetaMap\", /* @__PURE__ */ new WeakMap());\n  }\n  getId(n2) {\n    if (!n2) return -1;\n    const id = this.getMeta(n2)?.id;\n    return id ?? -1;\n  }\n  getNode(id) {\n    return this.idNodeMap.get(id) || null;\n  }\n  getIds() {\n    return Array.from(this.idNodeMap.keys());\n  }\n  getMeta(n2) {\n    return this.nodeMetaMap.get(n2) || null;\n  }\n  // removes the node from idNodeMap\n  // doesn't remove the node from nodeMetaMap\n  removeNodeFromMap(n2) {\n    const id = this.getId(n2);\n    this.idNodeMap.delete(id);\n    if (n2.childNodes) {\n      n2.childNodes.forEach((childNode) => this.removeNodeFromMap(childNode));\n    }\n  }\n  has(id) {\n    return this.idNodeMap.has(id);\n  }\n  hasNode(node) {\n    return this.nodeMetaMap.has(node);\n  }\n  add(n2, meta) {\n    const id = meta.id;\n    this.idNodeMap.set(id, n2);\n    this.nodeMetaMap.set(n2, meta);\n  }\n  replace(id, n2) {\n    const oldNode = this.getNode(id);\n    if (oldNode) {\n      const meta = this.nodeMetaMap.get(oldNode);\n      if (meta) this.nodeMetaMap.set(n2, meta);\n    }\n    this.idNodeMap.set(id, n2);\n  }\n  reset() {\n    this.idNodeMap = /* @__PURE__ */ new Map();\n    this.nodeMetaMap = /* @__PURE__ */ new WeakMap();\n  }\n}\nfunction getDefaultSN(node, id) {\n  switch (node.RRNodeType) {\n    case NodeType$1.Document:\n      return {\n        id,\n        type: node.RRNodeType,\n        childNodes: []\n      };\n    case NodeType$1.DocumentType: {\n      const doctype = node;\n      return {\n        id,\n        type: node.RRNodeType,\n        name: doctype.name,\n        publicId: doctype.publicId,\n        systemId: doctype.systemId\n      };\n    }\n    case NodeType$1.Element:\n      return {\n        id,\n        type: node.RRNodeType,\n        tagName: node.tagName.toLowerCase(),\n        // In rrweb data, all tagNames are lowercase.\n        attributes: {},\n        childNodes: []\n      };\n    case NodeType$1.Text:\n      return {\n        id,\n        type: node.RRNodeType,\n        textContent: node.textContent || \"\"\n      };\n    case NodeType$1.Comment:\n      return {\n        id,\n        type: node.RRNodeType,\n        textContent: node.textContent || \"\"\n      };\n    case NodeType$1.CDATA:\n      return {\n        id,\n        type: node.RRNodeType,\n        textContent: \"\"\n      };\n  }\n}\nclass StyleDeclarationParser {\n  constructor(doc) {\n    this.doc = doc;\n    this.unattachedDoc = null;\n  }\n  parse(styleText) {\n    return this.parseWithConstructableStylesheet(styleText) || this.parseWithDetachedElement(styleText);\n  }\n  parseWithConstructableStylesheet(styleText) {\n    if (typeof CSSStyleSheet === \"undefined\" || typeof CSSStyleSheet.prototype.replaceSync !== \"function\") {\n      return null;\n    }\n    try {\n      const sheet = new CSSStyleSheet();\n      sheet.replaceSync(`x { ${styleText} }`);\n      const rule = sheet.cssRules[0];\n      if (!rule || rule.type !== CSSRule.STYLE_RULE) {\n        return null;\n      }\n      return rule.style;\n    } catch {\n      return null;\n    }\n  }\n  parseWithDetachedElement(styleText) {\n    const old = this.getUnattachedDoc().createElement(\"span\");\n    old.setAttribute(\"style\", styleText);\n    return old.style;\n  }\n  getUnattachedDoc() {\n    if (!this.unattachedDoc) {\n      try {\n        this.unattachedDoc = document.implementation.createHTMLDocument();\n      } catch {\n        this.unattachedDoc = this.doc;\n      }\n    }\n    return this.unattachedDoc;\n  }\n}\nfunction isNodeInLinkedList(n2) {\n  return \"__ln\" in n2;\n}\nclass DoubleLinkedList {\n  constructor() {\n    this.length = 0;\n    this.head = null;\n    this.tail = null;\n  }\n  get(position) {\n    if (position >= this.length) {\n      throw new Error(\"Position outside of list range\");\n    }\n    let current = this.head;\n    for (let index = 0; index < position; index++) {\n      current = current?.next || null;\n    }\n    return current;\n  }\n  addNode(n2) {\n    const node = {\n      value: n2,\n      previous: null,\n      next: null\n    };\n    n2.__ln = node;\n    if (n2.previousSibling && isNodeInLinkedList(n2.previousSibling)) {\n      const current = n2.previousSibling.__ln.next;\n      node.next = current;\n      node.previous = n2.previousSibling.__ln;\n      n2.previousSibling.__ln.next = node;\n      if (current) {\n        current.previous = node;\n      }\n    } else if (n2.nextSibling && isNodeInLinkedList(n2.nextSibling) && n2.nextSibling.__ln.previous) {\n      const current = n2.nextSibling.__ln.previous;\n      node.previous = current;\n      node.next = n2.nextSibling.__ln;\n      n2.nextSibling.__ln.previous = node;\n      if (current) {\n        current.next = node;\n      }\n    } else {\n      if (this.head) {\n        this.head.previous = node;\n      }\n      node.next = this.head;\n      this.head = node;\n    }\n    if (node.next === null) {\n      this.tail = node;\n    }\n    this.length++;\n  }\n  removeNode(n2) {\n    const current = n2.__ln;\n    if (!this.head) {\n      return;\n    }\n    if (!current.previous) {\n      this.head = current.next;\n      if (this.head) {\n        this.head.previous = null;\n      } else {\n        this.tail = null;\n      }\n    } else {\n      current.previous.next = current.next;\n      if (current.next) {\n        current.next.previous = current.previous;\n      } else {\n        this.tail = current.previous;\n      }\n    }\n    if (n2.__ln) {\n      delete n2.__ln;\n    }\n    this.length--;\n  }\n}\nconst moveKey = (id, parentId) => `${id}@${parentId}`;\nclass MutationBuffer {\n  constructor() {\n    this.frozen = false;\n    this.locked = false;\n    this.texts = [];\n    this.attributes = [];\n    this.attributeMap = /* @__PURE__ */ new WeakMap();\n    this.removes = [];\n    this.mapRemoves = [];\n    this.movedMap = {};\n    this.addedSet = /* @__PURE__ */ new Set();\n    this.movedSet = /* @__PURE__ */ new Set();\n    this.droppedSet = /* @__PURE__ */ new Set();\n    this.processMutations = (mutations) => {\n      mutations.forEach(this.processMutation);\n      this.emit();\n    };\n    this.emit = () => {\n      if (this.frozen || this.locked) {\n        return;\n      }\n      const adds = [];\n      const addedIds = /* @__PURE__ */ new Set();\n      const addList = new DoubleLinkedList();\n      const getNextId = (n2) => {\n        let ns = n2;\n        let nextId = IGNORED_NODE;\n        while (nextId === IGNORED_NODE) {\n          ns = ns && ns.nextSibling;\n          nextId = ns && this.mirror.getId(ns);\n        }\n        return nextId;\n      };\n      const pushAdd = (n2) => {\n        if (!n2.parentNode || !inDom(n2)) {\n          return;\n        }\n        const parentId = isShadowRoot(n2.parentNode) ? this.mirror.getId(getShadowHost(n2)) : this.mirror.getId(n2.parentNode);\n        const nextId = getNextId(n2);\n        if (parentId === -1 || nextId === -1) {\n          return addList.addNode(n2);\n        }\n        const sn = serializeNodeWithId(n2, {\n          doc: this.doc,\n          mirror: this.mirror,\n          blockClass: this.blockClass,\n          blockSelector: this.blockSelector,\n          maskAllText: this.maskAllText,\n          unblockSelector: this.unblockSelector,\n          maskTextClass: this.maskTextClass,\n          unmaskTextClass: this.unmaskTextClass,\n          maskTextSelector: this.maskTextSelector,\n          unmaskTextSelector: this.unmaskTextSelector,\n          skipChild: true,\n          newlyAddedElement: true,\n          inlineStylesheet: this.inlineStylesheet,\n          maskInputOptions: this.maskInputOptions,\n          maskAttributeFn: this.maskAttributeFn,\n          maskTextFn: this.maskTextFn,\n          maskInputFn: this.maskInputFn,\n          slimDOMOptions: this.slimDOMOptions,\n          dataURLOptions: this.dataURLOptions,\n          recordCanvas: this.recordCanvas,\n          inlineImages: this.inlineImages,\n          onSerialize: (currentN) => {\n            if (isSerializedIframe(currentN, this.mirror) && !isBlocked(\n              currentN,\n              this.blockClass,\n              this.blockSelector,\n              this.unblockSelector,\n              false\n            )) {\n              this.iframeManager.addIframe(currentN);\n            }\n            if (isSerializedStylesheet(currentN, this.mirror)) {\n              this.stylesheetManager.trackLinkElement(\n                currentN\n              );\n            }\n            if (hasShadowRoot(n2)) {\n              this.shadowDomManager.addShadowRoot(n2.shadowRoot, this.doc);\n            }\n          },\n          onIframeLoad: (iframe, childSn) => {\n            if (isBlocked(\n              iframe,\n              this.blockClass,\n              this.blockSelector,\n              this.unblockSelector,\n              false\n            )) {\n              return;\n            }\n            this.iframeManager.attachIframe(iframe, childSn);\n            const contentWindow = getIFrameContentWindow(iframe);\n            if (contentWindow) {\n              this.canvasManager.addWindow(contentWindow);\n            }\n            this.shadowDomManager.observeAttachShadow(iframe);\n          },\n          onStylesheetLoad: (link, childSn) => {\n            this.stylesheetManager.attachLinkElement(link, childSn);\n          },\n          onBlockedImageLoad: (_imageEl, serializedNode, { width, height }) => {\n            this.mutationCb({\n              adds: [],\n              removes: [],\n              texts: [],\n              attributes: [\n                {\n                  id: serializedNode.id,\n                  attributes: {\n                    style: {\n                      width: `${width}px`,\n                      height: `${height}px`\n                    }\n                  }\n                }\n              ]\n            });\n          },\n          ignoreCSSAttributes: this.ignoreCSSAttributes\n        });\n        if (sn) {\n          adds.push({\n            parentId,\n            nextId,\n            node: sn\n          });\n          addedIds.add(sn.id);\n        }\n      };\n      while (this.mapRemoves.length) {\n        this.mirror.removeNodeFromMap(this.mapRemoves.shift());\n      }\n      for (const n2 of this.movedSet) {\n        if (isParentRemoved(this.removes, n2, this.mirror) && !this.movedSet.has(n2.parentNode)) {\n          continue;\n        }\n        pushAdd(n2);\n      }\n      for (const n2 of this.addedSet) {\n        if (!isAncestorInSet(this.droppedSet, n2) && !isParentRemoved(this.removes, n2, this.mirror)) {\n          pushAdd(n2);\n        } else if (isAncestorInSet(this.movedSet, n2)) {\n          pushAdd(n2);\n        } else {\n          this.droppedSet.add(n2);\n        }\n      }\n      let candidate = null;\n      while (addList.length) {\n        let node = null;\n        if (candidate) {\n          const parentId = this.mirror.getId(candidate.value.parentNode);\n          const nextId = getNextId(candidate.value);\n          if (parentId !== -1 && nextId !== -1) {\n            node = candidate;\n          }\n        }\n        if (!node) {\n          let tailNode = addList.tail;\n          while (tailNode) {\n            const _node = tailNode;\n            tailNode = tailNode.previous;\n            if (_node) {\n              const parentId = this.mirror.getId(_node.value.parentNode);\n              const nextId = getNextId(_node.value);\n              if (nextId === -1) continue;\n              else if (parentId !== -1) {\n                node = _node;\n                break;\n              } else {\n                const unhandledNode = _node.value;\n                if (unhandledNode.parentNode && unhandledNode.parentNode.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {\n                  const shadowHost = unhandledNode.parentNode.host;\n                  const parentId2 = this.mirror.getId(shadowHost);\n                  if (parentId2 !== -1) {\n                    node = _node;\n                    break;\n                  }\n                }\n              }\n            }\n          }\n        }\n        if (!node) {\n          while (addList.head) {\n            addList.removeNode(addList.head.value);\n          }\n          break;\n        }\n        candidate = node.previous;\n        addList.removeNode(node.value);\n        pushAdd(node.value);\n      }\n      const payload = {\n        texts: this.texts.map((text) => ({\n          id: this.mirror.getId(text.node),\n          value: text.value\n        })).filter((text) => !addedIds.has(text.id)).filter((text) => this.mirror.has(text.id)),\n        attributes: this.attributes.map((attribute) => {\n          const { attributes } = attribute;\n          if (typeof attributes.style === \"string\") {\n            const diffAsStr = JSON.stringify(attribute.styleDiff);\n            const unchangedAsStr = JSON.stringify(attribute._unchangedStyles);\n            if (diffAsStr.length < attributes.style.length) {\n              if ((diffAsStr + unchangedAsStr).split(\"var(\").length === attributes.style.split(\"var(\").length) {\n                attributes.style = attribute.styleDiff;\n              }\n            }\n          }\n          return {\n            id: this.mirror.getId(attribute.node),\n            attributes\n          };\n        }).filter((attribute) => !addedIds.has(attribute.id)).filter((attribute) => this.mirror.has(attribute.id)),\n        removes: this.removes,\n        adds\n      };\n      if (!payload.texts.length && !payload.attributes.length && !payload.removes.length && !payload.adds.length) {\n        return;\n      }\n      this.texts = [];\n      this.attributes = [];\n      this.attributeMap = /* @__PURE__ */ new WeakMap();\n      this.removes = [];\n      this.addedSet = /* @__PURE__ */ new Set();\n      this.movedSet = /* @__PURE__ */ new Set();\n      this.droppedSet = /* @__PURE__ */ new Set();\n      this.movedMap = {};\n      this.mutationCb(payload);\n    };\n    this.processMutation = (m) => {\n      if (isIgnored(m.target, this.mirror)) {\n        return;\n      }\n      switch (m.type) {\n        case \"characterData\": {\n          const value = m.target.textContent;\n          if (!isBlocked(\n            m.target,\n            this.blockClass,\n            this.blockSelector,\n            this.unblockSelector,\n            false\n          ) && value !== m.oldValue) {\n            this.texts.push({\n              value: needMaskingText(\n                m.target,\n                this.maskTextClass,\n                this.maskTextSelector,\n                this.unmaskTextClass,\n                this.unmaskTextSelector,\n                this.maskAllText\n              ) && value ? this.maskTextFn ? this.maskTextFn(value, closestElementOfNode(m.target)) : value.replace(/[\\S]/g, \"*\") : value,\n              node: m.target\n            });\n          }\n          break;\n        }\n        case \"attributes\": {\n          const target = m.target;\n          let attributeName = m.attributeName;\n          let value = m.target.getAttribute(attributeName);\n          if (attributeName === \"value\") {\n            const type = getInputType(target);\n            const tagName = target.tagName;\n            value = getInputValue(target, tagName, type);\n            const isInputMasked = shouldMaskInput({\n              maskInputOptions: this.maskInputOptions,\n              tagName,\n              type\n            });\n            const forceMask = needMaskingText(\n              m.target,\n              this.maskTextClass,\n              this.maskTextSelector,\n              this.unmaskTextClass,\n              this.unmaskTextSelector,\n              isInputMasked\n            );\n            value = maskInputValue({\n              isMasked: forceMask,\n              element: target,\n              value,\n              maskInputFn: this.maskInputFn\n            });\n          }\n          if (isBlocked(\n            m.target,\n            this.blockClass,\n            this.blockSelector,\n            this.unblockSelector,\n            false\n          ) || value === m.oldValue) {\n            return;\n          }\n          let item = this.attributeMap.get(m.target);\n          if (target.tagName === \"IFRAME\" && attributeName === \"src\" && !this.keepIframeSrcFn(value)) {\n            const iframeDoc = getIFrameContentDocument(\n              target\n            );\n            if (!iframeDoc) {\n              attributeName = \"rr_src\";\n            } else {\n              return;\n            }\n          }\n          if (!item) {\n            item = {\n              node: m.target,\n              attributes: {},\n              styleDiff: {},\n              _unchangedStyles: {}\n            };\n            this.attributes.push(item);\n            this.attributeMap.set(m.target, item);\n          }\n          if (attributeName === \"type\" && target.tagName === \"INPUT\" && (m.oldValue || \"\").toLowerCase() === \"password\") {\n            target.setAttribute(\"data-rr-is-password\", \"true\");\n          }\n          if (!ignoreAttribute(target.tagName, attributeName)) {\n            item.attributes[attributeName] = transformAttribute(\n              this.doc,\n              toLowerCase(target.tagName),\n              toLowerCase(attributeName),\n              value,\n              target,\n              this.maskAttributeFn\n            );\n            if (attributeName === \"style\") {\n              const oldStyle = m.oldValue ? this.styleDeclarationParser.parse(m.oldValue) : null;\n              for (const pname of Array.from(target.style)) {\n                const newValue = target.style.getPropertyValue(pname);\n                const newPriority = target.style.getPropertyPriority(pname);\n                if (newValue !== (oldStyle?.getPropertyValue(pname) || \"\") || newPriority !== (oldStyle?.getPropertyPriority(pname) || \"\")) {\n                  if (newPriority === \"\") {\n                    item.styleDiff[pname] = newValue;\n                  } else {\n                    item.styleDiff[pname] = [newValue, newPriority];\n                  }\n                } else {\n                  item._unchangedStyles[pname] = [newValue, newPriority];\n                }\n              }\n              if (oldStyle) {\n                for (const pname of Array.from(oldStyle)) {\n                  if (target.style.getPropertyValue(pname) === \"\") {\n                    item.styleDiff[pname] = false;\n                  }\n                }\n              }\n            }\n          }\n          break;\n        }\n        case \"childList\": {\n          if (isBlocked(\n            m.target,\n            this.blockClass,\n            this.blockSelector,\n            this.unblockSelector,\n            true\n          )) {\n            return;\n          }\n          m.addedNodes.forEach((n2) => this.genAdds(n2, m.target));\n          m.removedNodes.forEach((n2) => {\n            const nodeId = this.mirror.getId(n2);\n            const parentId = isShadowRoot(m.target) ? this.mirror.getId(m.target.host) : this.mirror.getId(m.target);\n            if (isBlocked(\n              m.target,\n              this.blockClass,\n              this.blockSelector,\n              this.unblockSelector,\n              false\n            ) || isIgnored(n2, this.mirror) || !isSerialized(n2, this.mirror)) {\n              return;\n            }\n            if (this.addedSet.has(n2)) {\n              deepDelete(this.addedSet, n2);\n              this.droppedSet.add(n2);\n            } else if (this.addedSet.has(m.target) && nodeId === -1) ;\n            else if (isAncestorRemoved(m.target, this.mirror)) ;\n            else if (this.movedSet.has(n2) && this.movedMap[moveKey(nodeId, parentId)]) {\n              deepDelete(this.movedSet, n2);\n            } else {\n              this.removes.push({\n                parentId,\n                id: nodeId,\n                isShadow: isShadowRoot(m.target) && isNativeShadowDom(m.target) ? true : void 0\n              });\n            }\n            this.mapRemoves.push(n2);\n          });\n          break;\n        }\n      }\n    };\n    this.genAdds = (n2, target) => {\n      if (this.processedNodeManager.inOtherBuffer(n2, this)) return;\n      if (this.addedSet.has(n2) || this.movedSet.has(n2)) return;\n      if (this.mirror.hasNode(n2)) {\n        if (isIgnored(n2, this.mirror)) {\n          return;\n        }\n        this.movedSet.add(n2);\n        let targetId = null;\n        if (target && this.mirror.hasNode(target)) {\n          targetId = this.mirror.getId(target);\n        }\n        if (targetId && targetId !== -1) {\n          this.movedMap[moveKey(this.mirror.getId(n2), targetId)] = true;\n        }\n      } else {\n        this.addedSet.add(n2);\n        this.droppedSet.delete(n2);\n      }\n      if (!isBlocked(\n        n2,\n        this.blockClass,\n        this.blockSelector,\n        this.unblockSelector,\n        false\n      )) {\n        if (n2.childNodes) {\n          n2.childNodes.forEach((childN) => this.genAdds(childN));\n        }\n        if (hasShadowRoot(n2)) {\n          n2.shadowRoot.childNodes.forEach((childN) => {\n            this.processedNodeManager.add(childN, this);\n            this.genAdds(childN, n2);\n          });\n        }\n      }\n    };\n  }\n  init(options) {\n    [\n      \"mutationCb\",\n      \"blockClass\",\n      \"blockSelector\",\n      \"unblockSelector\",\n      \"maskAllText\",\n      \"maskTextClass\",\n      \"unmaskTextClass\",\n      \"maskTextSelector\",\n      \"unmaskTextSelector\",\n      \"inlineStylesheet\",\n      \"maskInputOptions\",\n      \"maskAttributeFn\",\n      \"maskTextFn\",\n      \"maskInputFn\",\n      \"keepIframeSrcFn\",\n      \"recordCanvas\",\n      \"inlineImages\",\n      \"slimDOMOptions\",\n      \"dataURLOptions\",\n      \"doc\",\n      \"mirror\",\n      \"iframeManager\",\n      \"stylesheetManager\",\n      \"shadowDomManager\",\n      \"canvasManager\",\n      \"processedNodeManager\",\n      \"ignoreCSSAttributes\"\n    ].forEach((key) => {\n      this[key] = options[key];\n    });\n    this.styleDeclarationParser = new StyleDeclarationParser(this.doc);\n  }\n  freeze() {\n    this.frozen = true;\n    this.canvasManager.freeze();\n  }\n  unfreeze() {\n    this.frozen = false;\n    this.canvasManager.unfreeze();\n    this.emit();\n  }\n  isFrozen() {\n    return this.frozen;\n  }\n  lock() {\n    this.locked = true;\n    this.canvasManager.lock();\n  }\n  unlock() {\n    this.locked = false;\n    this.canvasManager.unlock();\n    this.emit();\n  }\n  reset() {\n    this.shadowDomManager.reset();\n    this.canvasManager.reset();\n  }\n}\nfunction deepDelete(addsSet, n2) {\n  addsSet.delete(n2);\n  n2.childNodes?.forEach((childN) => deepDelete(addsSet, childN));\n}\nfunction isParentRemoved(removes, n2, mirror2) {\n  if (removes.length === 0) return false;\n  return _isParentRemoved(removes, n2, mirror2);\n}\nfunction _isParentRemoved(removes, n2, mirror2) {\n  let node = n2.parentNode;\n  while (node) {\n    const parentId = mirror2.getId(node);\n    if (removes.some((r2) => r2.id === parentId)) {\n      return true;\n    }\n    node = node.parentNode;\n  }\n  return false;\n}\nfunction isAncestorInSet(set, n2) {\n  if (set.size === 0) return false;\n  return _isAncestorInSet(set, n2);\n}\nfunction _isAncestorInSet(set, n2) {\n  const { parentNode } = n2;\n  if (!parentNode) {\n    return false;\n  }\n  if (set.has(parentNode)) {\n    return true;\n  }\n  return _isAncestorInSet(set, parentNode);\n}\nconst mutationBuffers = [];\nfunction getEventTarget(event) {\n  try {\n    if (\"composedPath\" in event) {\n      const path = event.composedPath();\n      if (path.length) {\n        return path[0];\n      }\n    } else if (\"path\" in event && event.path.length) {\n      return event.path[0];\n    }\n  } catch {\n  }\n  return event && event.target;\n}\nfunction initMutationObserver(options, rootEl) {\n  const mutationBuffer = new MutationBuffer();\n  mutationBuffers.push(mutationBuffer);\n  mutationBuffer.init(options);\n  let mutationObserverCtor = window.MutationObserver || /**\n  * Some websites may disable MutationObserver by removing it from the window object.\n  * If someone is using rrweb to build a browser extention or things like it, they\n  * could not change the website's code but can have an opportunity to inject some\n  * code before the website executing its JS logic.\n  * Then they can do this to store the native MutationObserver:\n  * window.__rrMutationObserver = MutationObserver\n  */\n  window.__rrMutationObserver;\n  const angularZoneSymbol = window?.Zone?.__symbol__?.(\"MutationObserver\");\n  if (angularZoneSymbol && window[angularZoneSymbol]) {\n    mutationObserverCtor = window[angularZoneSymbol];\n  }\n  const observer = new mutationObserverCtor(\n    callbackWrapper((mutations) => {\n      if (options.onMutation && options.onMutation(mutations) === false) {\n        return;\n      }\n      mutationBuffer.processMutations.bind(mutationBuffer)(mutations);\n    })\n  );\n  observer.observe(rootEl, {\n    attributes: true,\n    attributeOldValue: true,\n    characterData: true,\n    characterDataOldValue: true,\n    childList: true,\n    subtree: true\n  });\n  return observer;\n}\nfunction initMoveObserver({\n  mousemoveCb,\n  sampling,\n  doc,\n  mirror: mirror2\n}) {\n  if (sampling.mousemove === false) {\n    return () => {\n    };\n  }\n  const threshold = typeof sampling.mousemove === \"number\" ? sampling.mousemove : 50;\n  const callbackThreshold = typeof sampling.mousemoveCallback === \"number\" ? sampling.mousemoveCallback : 500;\n  let positions = [];\n  let timeBaseline;\n  const wrappedCb = throttle(\n    callbackWrapper(\n      (source) => {\n        const totalOffset = Date.now() - timeBaseline;\n        mousemoveCb(\n          positions.map((p) => {\n            p.timeOffset -= totalOffset;\n            return p;\n          }),\n          source\n        );\n        positions = [];\n        timeBaseline = null;\n      }\n    ),\n    callbackThreshold\n  );\n  const updatePosition = callbackWrapper(\n    throttle(\n      callbackWrapper((evt) => {\n        const target = getEventTarget(evt);\n        const { clientX, clientY } = legacy_isTouchEvent(evt) ? evt.changedTouches[0] : evt;\n        if (!timeBaseline) {\n          timeBaseline = nowTimestamp();\n        }\n        positions.push({\n          x: clientX,\n          y: clientY,\n          id: mirror2.getId(target),\n          timeOffset: nowTimestamp() - timeBaseline\n        });\n        wrappedCb(\n          typeof DragEvent !== \"undefined\" && evt instanceof DragEvent ? IncrementalSource.Drag : evt instanceof MouseEvent ? IncrementalSource.MouseMove : IncrementalSource.TouchMove\n        );\n      }),\n      threshold,\n      {\n        trailing: false\n      }\n    )\n  );\n  const handlers = [\n    on(\"mousemove\", updatePosition, doc),\n    on(\"touchmove\", updatePosition, doc),\n    on(\"drag\", updatePosition, doc)\n  ];\n  return callbackWrapper(() => {\n    handlers.forEach((h) => h());\n  });\n}\nfunction initMouseInteractionObserver({\n  mouseInteractionCb,\n  doc,\n  mirror: mirror2,\n  blockClass,\n  blockSelector,\n  unblockSelector,\n  sampling\n}) {\n  if (sampling.mouseInteraction === false) {\n    return () => {\n    };\n  }\n  const disableMap = sampling.mouseInteraction === true || sampling.mouseInteraction === void 0 ? {} : sampling.mouseInteraction;\n  const handlers = [];\n  let currentPointerType = null;\n  const getHandler = (eventKey) => {\n    return (event) => {\n      const target = getEventTarget(event);\n      if (isBlocked(target, blockClass, blockSelector, unblockSelector, true)) {\n        return;\n      }\n      let pointerType = null;\n      let thisEventKey = eventKey;\n      if (\"pointerType\" in event) {\n        switch (event.pointerType) {\n          case \"mouse\":\n            pointerType = PointerTypes.Mouse;\n            break;\n          case \"touch\":\n            pointerType = PointerTypes.Touch;\n            break;\n          case \"pen\":\n            pointerType = PointerTypes.Pen;\n            break;\n        }\n        if (pointerType === PointerTypes.Touch) {\n          if (MouseInteractions[eventKey] === MouseInteractions.MouseDown) {\n            thisEventKey = \"TouchStart\";\n          } else if (MouseInteractions[eventKey] === MouseInteractions.MouseUp) {\n            thisEventKey = \"TouchEnd\";\n          }\n        } else if (pointerType === PointerTypes.Pen) ;\n      } else if (legacy_isTouchEvent(event)) {\n        pointerType = PointerTypes.Touch;\n      }\n      if (pointerType !== null) {\n        currentPointerType = pointerType;\n        if (thisEventKey.startsWith(\"Touch\") && pointerType === PointerTypes.Touch || thisEventKey.startsWith(\"Mouse\") && pointerType === PointerTypes.Mouse) {\n          pointerType = null;\n        }\n      } else if (MouseInteractions[eventKey] === MouseInteractions.Click) {\n        pointerType = currentPointerType;\n        currentPointerType = null;\n      }\n      const e2 = legacy_isTouchEvent(event) ? event.changedTouches[0] : event;\n      if (!e2) {\n        return;\n      }\n      const id = mirror2.getId(target);\n      const { clientX, clientY } = e2;\n      callbackWrapper(mouseInteractionCb)({\n        type: MouseInteractions[thisEventKey],\n        id,\n        x: clientX,\n        y: clientY,\n        ...pointerType !== null && { pointerType }\n      });\n    };\n  };\n  Object.keys(MouseInteractions).filter(\n    (key) => Number.isNaN(Number(key)) && !key.endsWith(\"_Departed\") && disableMap[key] !== false\n  ).forEach((eventKey) => {\n    let eventName = toLowerCase(eventKey);\n    const handler = getHandler(eventKey);\n    if (window.PointerEvent) {\n      switch (MouseInteractions[eventKey]) {\n        case MouseInteractions.MouseDown:\n        case MouseInteractions.MouseUp:\n          eventName = eventName.replace(\n            \"mouse\",\n            \"pointer\"\n          );\n          break;\n        case MouseInteractions.TouchStart:\n        case MouseInteractions.TouchEnd:\n          return;\n      }\n    }\n    handlers.push(on(eventName, handler, doc));\n  });\n  return callbackWrapper(() => {\n    handlers.forEach((h) => h());\n  });\n}\nfunction initScrollObserver({\n  scrollCb,\n  doc,\n  mirror: mirror2,\n  blockClass,\n  blockSelector,\n  unblockSelector,\n  sampling\n}) {\n  const updatePosition = callbackWrapper(\n    throttle(\n      callbackWrapper((evt) => {\n        const target = getEventTarget(evt);\n        if (!target || isBlocked(\n          target,\n          blockClass,\n          blockSelector,\n          unblockSelector,\n          true\n        )) {\n          return;\n        }\n        const id = mirror2.getId(target);\n        if (target === doc && doc.defaultView) {\n          const scrollLeftTop = getWindowScroll(doc.defaultView);\n          scrollCb({\n            id,\n            x: scrollLeftTop.left,\n            y: scrollLeftTop.top\n          });\n        } else {\n          scrollCb({\n            id,\n            x: target.scrollLeft,\n            y: target.scrollTop\n          });\n        }\n      }),\n      sampling.scroll || 100\n    )\n  );\n  return on(\"scroll\", updatePosition, doc);\n}\nfunction initViewportResizeObserver({ viewportResizeCb }, { win }) {\n  let lastH = -1;\n  let lastW = -1;\n  const updateDimension = callbackWrapper(\n    throttle(\n      callbackWrapper(() => {\n        const height = getWindowHeight();\n        const width = getWindowWidth();\n        if (lastH !== height || lastW !== width) {\n          viewportResizeCb({\n            width: Number(width),\n            height: Number(height)\n          });\n          lastH = height;\n          lastW = width;\n        }\n      }),\n      200\n    )\n  );\n  return on(\"resize\", updateDimension, win);\n}\nconst INPUT_TAGS = [\"INPUT\", \"TEXTAREA\", \"SELECT\"];\nconst lastInputValueMap = /* @__PURE__ */ new WeakMap();\nfunction initInputObserver({\n  inputCb,\n  doc,\n  mirror: mirror2,\n  blockClass,\n  blockSelector,\n  unblockSelector,\n  ignoreClass,\n  ignoreSelector,\n  maskInputOptions,\n  maskInputFn,\n  sampling,\n  userTriggeredOnInput,\n  maskTextClass,\n  unmaskTextClass,\n  maskTextSelector,\n  unmaskTextSelector\n}) {\n  function eventHandler(event) {\n    let target = getEventTarget(event);\n    const userTriggered = event.isTrusted;\n    const tagName = target && toUpperCase(target.tagName);\n    if (tagName === \"OPTION\") target = target.parentElement;\n    if (!target || !tagName || INPUT_TAGS.indexOf(tagName) < 0 || isBlocked(\n      target,\n      blockClass,\n      blockSelector,\n      unblockSelector,\n      true\n    )) {\n      return;\n    }\n    const el = target;\n    if (el.classList.contains(ignoreClass) || ignoreSelector && el.matches(ignoreSelector)) {\n      return;\n    }\n    const type = getInputType(target);\n    let text = getInputValue(el, tagName, type);\n    let isChecked = false;\n    const isInputMasked = shouldMaskInput({\n      maskInputOptions,\n      tagName,\n      type\n    });\n    const forceMask = needMaskingText(\n      target,\n      maskTextClass,\n      maskTextSelector,\n      unmaskTextClass,\n      unmaskTextSelector,\n      isInputMasked\n    );\n    if (type === \"radio\" || type === \"checkbox\") {\n      isChecked = target.checked;\n    }\n    text = maskInputValue({\n      isMasked: forceMask,\n      element: target,\n      value: text,\n      maskInputFn\n    });\n    cbWithDedup(\n      target,\n      userTriggeredOnInput ? { text, isChecked, userTriggered } : { text, isChecked }\n    );\n    const name = target.name;\n    if (type === \"radio\" && name && isChecked) {\n      doc.querySelectorAll(`input[type=\"radio\"][name=\"${name}\"]`).forEach((el2) => {\n        if (el2 !== target) {\n          const text2 = maskInputValue({\n            // share mask behavior of `target`\n            isMasked: forceMask,\n            element: el2,\n            value: getInputValue(el2, tagName, type),\n            maskInputFn\n          });\n          cbWithDedup(\n            el2,\n            userTriggeredOnInput ? { text: text2, isChecked: !isChecked, userTriggered: false } : { text: text2, isChecked: !isChecked }\n          );\n        }\n      });\n    }\n  }\n  function cbWithDedup(target, v2) {\n    const lastInputValue = lastInputValueMap.get(target);\n    if (!lastInputValue || lastInputValue.text !== v2.text || lastInputValue.isChecked !== v2.isChecked) {\n      lastInputValueMap.set(target, v2);\n      const id = mirror2.getId(target);\n      callbackWrapper(inputCb)({\n        ...v2,\n        id\n      });\n    }\n  }\n  const events = sampling.input === \"last\" ? [\"change\"] : [\"input\", \"change\"];\n  const handlers = events.map(\n    (eventName) => on(eventName, callbackWrapper(eventHandler), doc)\n  );\n  const currentWindow = doc.defaultView;\n  if (!currentWindow) {\n    return () => {\n      handlers.forEach((h) => h());\n    };\n  }\n  const propertyDescriptor = currentWindow.Object.getOwnPropertyDescriptor(\n    currentWindow.HTMLInputElement.prototype,\n    \"value\"\n  );\n  const hookProperties = [\n    [currentWindow.HTMLInputElement.prototype, \"value\"],\n    [currentWindow.HTMLInputElement.prototype, \"checked\"],\n    [currentWindow.HTMLSelectElement.prototype, \"value\"],\n    [currentWindow.HTMLTextAreaElement.prototype, \"value\"],\n    // Some UI library use selectedIndex to set select value\n    [currentWindow.HTMLSelectElement.prototype, \"selectedIndex\"],\n    [currentWindow.HTMLOptionElement.prototype, \"selected\"]\n  ];\n  if (propertyDescriptor && propertyDescriptor.set) {\n    handlers.push(\n      ...hookProperties.map(\n        (p) => hookSetter(\n          p[0],\n          p[1],\n          {\n            set() {\n              callbackWrapper(eventHandler)({\n                target: this,\n                isTrusted: false\n                // userTriggered to false as this could well be programmatic\n              });\n            }\n          },\n          false,\n          currentWindow\n        )\n      )\n    );\n  }\n  return callbackWrapper(() => {\n    handlers.forEach((h) => h());\n  });\n}\nfunction getNestedCSSRulePositions(rule) {\n  const positions = [];\n  function recurse(childRule, pos) {\n    if (hasNestedCSSRule(\"CSSGroupingRule\") && childRule.parentRule instanceof CSSGroupingRule || hasNestedCSSRule(\"CSSMediaRule\") && childRule.parentRule instanceof CSSMediaRule || hasNestedCSSRule(\"CSSSupportsRule\") && childRule.parentRule instanceof CSSSupportsRule || hasNestedCSSRule(\"CSSConditionRule\") && childRule.parentRule instanceof CSSConditionRule) {\n      const rules2 = Array.from(\n        childRule.parentRule.cssRules\n      );\n      const index = rules2.indexOf(childRule);\n      pos.unshift(index);\n    } else if (childRule.parentStyleSheet) {\n      const rules2 = Array.from(childRule.parentStyleSheet.cssRules);\n      const index = rules2.indexOf(childRule);\n      pos.unshift(index);\n    }\n    return pos;\n  }\n  return recurse(rule, positions);\n}\nfunction getIdAndStyleId(sheet, mirror2, styleMirror) {\n  let id, styleId;\n  if (!sheet) return {};\n  if (sheet.ownerNode) id = mirror2.getId(sheet.ownerNode);\n  else styleId = styleMirror.getId(sheet);\n  return {\n    styleId,\n    id\n  };\n}\nfunction initStyleSheetObserver({ styleSheetRuleCb, mirror: mirror2, stylesheetManager }, { win }) {\n  if (!win.CSSStyleSheet || !win.CSSStyleSheet.prototype) {\n    return () => {\n    };\n  }\n  const insertRule = win.CSSStyleSheet.prototype.insertRule;\n  win.CSSStyleSheet.prototype.insertRule = new Proxy(insertRule, {\n    apply: callbackWrapper(\n      (target, thisArg, argumentsList) => {\n        const [rule, index] = argumentsList;\n        const { id, styleId } = getIdAndStyleId(\n          thisArg,\n          mirror2,\n          stylesheetManager.styleMirror\n        );\n        if (id && id !== -1 || styleId && styleId !== -1) {\n          styleSheetRuleCb({\n            id,\n            styleId,\n            adds: [{ rule, index }]\n          });\n        }\n        return target.apply(thisArg, argumentsList);\n      }\n    )\n  });\n  const deleteRule = win.CSSStyleSheet.prototype.deleteRule;\n  win.CSSStyleSheet.prototype.deleteRule = new Proxy(deleteRule, {\n    apply: callbackWrapper(\n      (target, thisArg, argumentsList) => {\n        const [index] = argumentsList;\n        const { id, styleId } = getIdAndStyleId(\n          thisArg,\n          mirror2,\n          stylesheetManager.styleMirror\n        );\n        if (id && id !== -1 || styleId && styleId !== -1) {\n          styleSheetRuleCb({\n            id,\n            styleId,\n            removes: [{ index }]\n          });\n        }\n        return target.apply(thisArg, argumentsList);\n      }\n    )\n  });\n  let replace;\n  if (win.CSSStyleSheet.prototype.replace) {\n    replace = win.CSSStyleSheet.prototype.replace;\n    win.CSSStyleSheet.prototype.replace = new Proxy(replace, {\n      apply: callbackWrapper(\n        (target, thisArg, argumentsList) => {\n          const [text] = argumentsList;\n          const { id, styleId } = getIdAndStyleId(\n            thisArg,\n            mirror2,\n            stylesheetManager.styleMirror\n          );\n          if (id && id !== -1 || styleId && styleId !== -1) {\n            styleSheetRuleCb({\n              id,\n              styleId,\n              replace: text\n            });\n          }\n          return target.apply(thisArg, argumentsList);\n        }\n      )\n    });\n  }\n  let replaceSync;\n  if (win.CSSStyleSheet.prototype.replaceSync) {\n    replaceSync = win.CSSStyleSheet.prototype.replaceSync;\n    win.CSSStyleSheet.prototype.replaceSync = new Proxy(replaceSync, {\n      apply: callbackWrapper(\n        (target, thisArg, argumentsList) => {\n          const [text] = argumentsList;\n          const { id, styleId } = getIdAndStyleId(\n            thisArg,\n            mirror2,\n            stylesheetManager.styleMirror\n          );\n          if (id && id !== -1 || styleId && styleId !== -1) {\n            styleSheetRuleCb({\n              id,\n              styleId,\n              replaceSync: text\n            });\n          }\n          return target.apply(thisArg, argumentsList);\n        }\n      )\n    });\n  }\n  const supportedNestedCSSRuleTypes = {};\n  if (canMonkeyPatchNestedCSSRule(\"CSSGroupingRule\")) {\n    supportedNestedCSSRuleTypes.CSSGroupingRule = win.CSSGroupingRule;\n  } else {\n    if (canMonkeyPatchNestedCSSRule(\"CSSMediaRule\")) {\n      supportedNestedCSSRuleTypes.CSSMediaRule = win.CSSMediaRule;\n    }\n    if (canMonkeyPatchNestedCSSRule(\"CSSConditionRule\")) {\n      supportedNestedCSSRuleTypes.CSSConditionRule = win.CSSConditionRule;\n    }\n    if (canMonkeyPatchNestedCSSRule(\"CSSSupportsRule\")) {\n      supportedNestedCSSRuleTypes.CSSSupportsRule = win.CSSSupportsRule;\n    }\n  }\n  const unmodifiedFunctions = {};\n  Object.entries(supportedNestedCSSRuleTypes).forEach(([typeKey, type]) => {\n    unmodifiedFunctions[typeKey] = {\n      // eslint-disable-next-line @typescript-eslint/unbound-method\n      insertRule: type.prototype.insertRule,\n      // eslint-disable-next-line @typescript-eslint/unbound-method\n      deleteRule: type.prototype.deleteRule\n    };\n    type.prototype.insertRule = new Proxy(\n      unmodifiedFunctions[typeKey].insertRule,\n      {\n        apply: callbackWrapper(\n          (target, thisArg, argumentsList) => {\n            const [rule, index] = argumentsList;\n            const { id, styleId } = getIdAndStyleId(\n              thisArg.parentStyleSheet,\n              mirror2,\n              stylesheetManager.styleMirror\n            );\n            if (id && id !== -1 || styleId && styleId !== -1) {\n              styleSheetRuleCb({\n                id,\n                styleId,\n                adds: [\n                  {\n                    rule,\n                    index: [\n                      ...getNestedCSSRulePositions(thisArg),\n                      index || 0\n                      // defaults to 0\n                    ]\n                  }\n                ]\n              });\n            }\n            return target.apply(thisArg, argumentsList);\n          }\n        )\n      }\n    );\n    type.prototype.deleteRule = new Proxy(\n      unmodifiedFunctions[typeKey].deleteRule,\n      {\n        apply: callbackWrapper(\n          (target, thisArg, argumentsList) => {\n            const [index] = argumentsList;\n            const { id, styleId } = getIdAndStyleId(\n              thisArg.parentStyleSheet,\n              mirror2,\n              stylesheetManager.styleMirror\n            );\n            if (id && id !== -1 || styleId && styleId !== -1) {\n              styleSheetRuleCb({\n                id,\n                styleId,\n                removes: [\n                  { index: [...getNestedCSSRulePositions(thisArg), index] }\n                ]\n              });\n            }\n            return target.apply(thisArg, argumentsList);\n          }\n        )\n      }\n    );\n  });\n  return callbackWrapper(() => {\n    win.CSSStyleSheet.prototype.insertRule = insertRule;\n    win.CSSStyleSheet.prototype.deleteRule = deleteRule;\n    replace && (win.CSSStyleSheet.prototype.replace = replace);\n    replaceSync && (win.CSSStyleSheet.prototype.replaceSync = replaceSync);\n    Object.entries(supportedNestedCSSRuleTypes).forEach(([typeKey, type]) => {\n      type.prototype.insertRule = unmodifiedFunctions[typeKey].insertRule;\n      type.prototype.deleteRule = unmodifiedFunctions[typeKey].deleteRule;\n    });\n  });\n}\nfunction initAdoptedStyleSheetObserver({\n  mirror: mirror2,\n  stylesheetManager\n}, host) {\n  let hostId = null;\n  if (host.nodeName === \"#document\") hostId = mirror2.getId(host);\n  else hostId = mirror2.getId(host.host);\n  const patchTarget = host.nodeName === \"#document\" ? host.defaultView?.Document : host.ownerDocument?.defaultView?.ShadowRoot;\n  const originalPropertyDescriptor = patchTarget?.prototype ? Object.getOwnPropertyDescriptor(\n    patchTarget?.prototype,\n    \"adoptedStyleSheets\"\n  ) : void 0;\n  if (hostId === null || hostId === -1 || !patchTarget || !originalPropertyDescriptor)\n    return () => {\n    };\n  Object.defineProperty(host, \"adoptedStyleSheets\", {\n    configurable: originalPropertyDescriptor.configurable,\n    enumerable: originalPropertyDescriptor.enumerable,\n    get() {\n      return originalPropertyDescriptor.get?.call(this);\n    },\n    set(sheets) {\n      const result = originalPropertyDescriptor.set?.call(this, sheets);\n      if (hostId !== null && hostId !== -1) {\n        try {\n          stylesheetManager.adoptStyleSheets(sheets, hostId);\n        } catch (e2) {\n        }\n      }\n      return result;\n    }\n  });\n  return callbackWrapper(() => {\n    Object.defineProperty(host, \"adoptedStyleSheets\", {\n      configurable: originalPropertyDescriptor.configurable,\n      enumerable: originalPropertyDescriptor.enumerable,\n      // eslint-disable-next-line @typescript-eslint/unbound-method\n      get: originalPropertyDescriptor.get,\n      // eslint-disable-next-line @typescript-eslint/unbound-method\n      set: originalPropertyDescriptor.set\n    });\n  });\n}\nfunction initStyleDeclarationObserver({\n  styleDeclarationCb,\n  mirror: mirror2,\n  ignoreCSSAttributes,\n  stylesheetManager\n}, { win }) {\n  const setProperty = win.CSSStyleDeclaration.prototype.setProperty;\n  win.CSSStyleDeclaration.prototype.setProperty = new Proxy(setProperty, {\n    apply: callbackWrapper(\n      (target, thisArg, argumentsList) => {\n        const [property, value, priority] = argumentsList;\n        if (ignoreCSSAttributes.has(property)) {\n          return setProperty.apply(thisArg, [property, value, priority]);\n        }\n        const { id, styleId } = getIdAndStyleId(\n          thisArg.parentRule?.parentStyleSheet,\n          mirror2,\n          stylesheetManager.styleMirror\n        );\n        if (id && id !== -1 || styleId && styleId !== -1) {\n          styleDeclarationCb({\n            id,\n            styleId,\n            set: {\n              property,\n              value,\n              priority\n            },\n            // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n            index: getNestedCSSRulePositions(thisArg.parentRule)\n          });\n        }\n        return target.apply(thisArg, argumentsList);\n      }\n    )\n  });\n  const removeProperty = win.CSSStyleDeclaration.prototype.removeProperty;\n  win.CSSStyleDeclaration.prototype.removeProperty = new Proxy(removeProperty, {\n    apply: callbackWrapper(\n      (target, thisArg, argumentsList) => {\n        const [property] = argumentsList;\n        if (ignoreCSSAttributes.has(property)) {\n          return removeProperty.apply(thisArg, [property]);\n        }\n        const { id, styleId } = getIdAndStyleId(\n          thisArg.parentRule?.parentStyleSheet,\n          mirror2,\n          stylesheetManager.styleMirror\n        );\n        if (id && id !== -1 || styleId && styleId !== -1) {\n          styleDeclarationCb({\n            id,\n            styleId,\n            remove: {\n              property\n            },\n            // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n            index: getNestedCSSRulePositions(thisArg.parentRule)\n          });\n        }\n        return target.apply(thisArg, argumentsList);\n      }\n    )\n  });\n  return callbackWrapper(() => {\n    win.CSSStyleDeclaration.prototype.setProperty = setProperty;\n    win.CSSStyleDeclaration.prototype.removeProperty = removeProperty;\n  });\n}\nfunction initMediaInteractionObserver({\n  mediaInteractionCb,\n  blockClass,\n  blockSelector,\n  unblockSelector,\n  mirror: mirror2,\n  sampling,\n  doc\n}) {\n  const handler = callbackWrapper(\n    (type) => throttle(\n      callbackWrapper((event) => {\n        const target = getEventTarget(event);\n        if (!target || isBlocked(\n          target,\n          blockClass,\n          blockSelector,\n          unblockSelector,\n          true\n        )) {\n          return;\n        }\n        const { currentTime, volume, muted, playbackRate } = target;\n        mediaInteractionCb({\n          type,\n          id: mirror2.getId(target),\n          currentTime,\n          volume,\n          muted,\n          playbackRate\n        });\n      }),\n      sampling.media || 500\n    )\n  );\n  const handlers = [\n    on(\"play\", handler(MediaInteractions.Play), doc),\n    on(\"pause\", handler(MediaInteractions.Pause), doc),\n    on(\"seeked\", handler(MediaInteractions.Seeked), doc),\n    on(\"volumechange\", handler(MediaInteractions.VolumeChange), doc),\n    on(\"ratechange\", handler(MediaInteractions.RateChange), doc)\n  ];\n  return callbackWrapper(() => {\n    handlers.forEach((h) => h());\n  });\n}\nfunction initFontObserver({ fontCb, doc }) {\n  const win = doc.defaultView;\n  if (!win) {\n    return () => {\n    };\n  }\n  const handlers = [];\n  const fontMap = /* @__PURE__ */ new WeakMap();\n  const originalFontFace = win.FontFace;\n  win.FontFace = function FontFace2(family, source, descriptors) {\n    const fontFace = new originalFontFace(family, source, descriptors);\n    fontMap.set(fontFace, {\n      family,\n      buffer: typeof source !== \"string\",\n      descriptors,\n      fontSource: typeof source === \"string\" ? source : JSON.stringify(Array.from(new Uint8Array(source)))\n    });\n    return fontFace;\n  };\n  const restoreHandler = patch(\n    doc.fonts,\n    \"add\",\n    function(original) {\n      return function(fontFace) {\n        setTimeout$1(\n          callbackWrapper(() => {\n            const p = fontMap.get(fontFace);\n            if (p) {\n              fontCb(p);\n              fontMap.delete(fontFace);\n            }\n          }),\n          0\n        );\n        return original.apply(this, [fontFace]);\n      };\n    }\n  );\n  handlers.push(() => {\n    win.FontFace = originalFontFace;\n  });\n  handlers.push(restoreHandler);\n  return callbackWrapper(() => {\n    handlers.forEach((h) => h());\n  });\n}\nfunction initSelectionObserver(param) {\n  const {\n    doc,\n    mirror: mirror2,\n    blockClass,\n    blockSelector,\n    unblockSelector,\n    selectionCb\n  } = param;\n  let collapsed = true;\n  const updateSelection = callbackWrapper(() => {\n    const selection = doc.getSelection();\n    if (!selection || collapsed && selection?.isCollapsed) return;\n    collapsed = selection.isCollapsed || false;\n    const ranges = [];\n    const count = selection.rangeCount || 0;\n    for (let i2 = 0; i2 < count; i2++) {\n      const range = selection.getRangeAt(i2);\n      const { startContainer, startOffset, endContainer, endOffset } = range;\n      const blocked = isBlocked(\n        startContainer,\n        blockClass,\n        blockSelector,\n        unblockSelector,\n        true\n      ) || isBlocked(\n        endContainer,\n        blockClass,\n        blockSelector,\n        unblockSelector,\n        true\n      );\n      if (blocked) continue;\n      ranges.push({\n        start: mirror2.getId(startContainer),\n        startOffset,\n        end: mirror2.getId(endContainer),\n        endOffset\n      });\n    }\n    selectionCb({ ranges });\n  });\n  updateSelection();\n  return on(\"selectionchange\", updateSelection);\n}\nfunction initCustomElementObserver({\n  doc,\n  customElementCb\n}) {\n  const win = doc.defaultView;\n  if (!win || !win.customElements) return () => {\n  };\n  const restoreHandler = patch(\n    win.customElements,\n    \"define\",\n    function(original) {\n      return function(name, constructor, options) {\n        try {\n          customElementCb({\n            define: {\n              name\n            }\n          });\n        } catch (e2) {\n        }\n        return original.apply(this, [name, constructor, options]);\n      };\n    }\n  );\n  return restoreHandler;\n}\nfunction initObservers(o2, _hooks = {}) {\n  const currentWindow = o2.doc.defaultView;\n  if (!currentWindow) {\n    return () => {\n    };\n  }\n  let mutationObserver;\n  if (o2.recordDOM) {\n    mutationObserver = initMutationObserver(o2, o2.doc);\n  }\n  const mousemoveHandler = initMoveObserver(o2);\n  const mouseInteractionHandler = initMouseInteractionObserver(o2);\n  const scrollHandler = initScrollObserver(o2);\n  const viewportResizeHandler = initViewportResizeObserver(o2, {\n    win: currentWindow\n  });\n  const inputHandler = initInputObserver(o2);\n  const mediaInteractionHandler = initMediaInteractionObserver(o2);\n  let styleSheetObserver = () => {\n  };\n  let adoptedStyleSheetObserver = () => {\n  };\n  let styleDeclarationObserver = () => {\n  };\n  let fontObserver = () => {\n  };\n  if (o2.recordDOM) {\n    styleSheetObserver = initStyleSheetObserver(o2, { win: currentWindow });\n    adoptedStyleSheetObserver = initAdoptedStyleSheetObserver(o2, o2.doc);\n    styleDeclarationObserver = initStyleDeclarationObserver(o2, {\n      win: currentWindow\n    });\n    if (o2.collectFonts) {\n      fontObserver = initFontObserver(o2);\n    }\n  }\n  const selectionObserver = initSelectionObserver(o2);\n  const customElementObserver = initCustomElementObserver(o2);\n  const pluginHandlers = [];\n  for (const plugin of o2.plugins) {\n    pluginHandlers.push(\n      plugin.observer(plugin.callback, currentWindow, plugin.options)\n    );\n  }\n  return callbackWrapper(() => {\n    mutationBuffers.forEach((b) => b.reset());\n    mutationObserver?.disconnect();\n    mousemoveHandler();\n    mouseInteractionHandler();\n    scrollHandler();\n    viewportResizeHandler();\n    inputHandler();\n    mediaInteractionHandler();\n    styleSheetObserver();\n    adoptedStyleSheetObserver();\n    styleDeclarationObserver();\n    fontObserver();\n    selectionObserver();\n    customElementObserver();\n    pluginHandlers.forEach((h) => h());\n  });\n}\nfunction hasNestedCSSRule(prop) {\n  return typeof window[prop] !== \"undefined\";\n}\nfunction canMonkeyPatchNestedCSSRule(prop) {\n  return Boolean(\n    typeof window[prop] !== \"undefined\" && // Note: Generally, this check _shouldn't_ be necessary\n    // However, in some scenarios (e.g. jsdom) this can sometimes fail, so we check for it here\n    window[prop].prototype && \"insertRule\" in window[prop].prototype && \"deleteRule\" in window[prop].prototype\n  );\n}\nclass CrossOriginIframeMirror {\n  constructor(generateIdFn) {\n    this.generateIdFn = generateIdFn;\n    this.iframeIdToRemoteIdMap = /* @__PURE__ */ new WeakMap();\n    this.iframeRemoteIdToIdMap = /* @__PURE__ */ new WeakMap();\n  }\n  getId(iframe, remoteId, idToRemoteMap, remoteToIdMap) {\n    const idToRemoteIdMap = idToRemoteMap || this.getIdToRemoteIdMap(iframe);\n    const remoteIdToIdMap = remoteToIdMap || this.getRemoteIdToIdMap(iframe);\n    let id = idToRemoteIdMap.get(remoteId);\n    if (!id) {\n      id = this.generateIdFn();\n      idToRemoteIdMap.set(remoteId, id);\n      remoteIdToIdMap.set(id, remoteId);\n    }\n    return id;\n  }\n  getIds(iframe, remoteId) {\n    const idToRemoteIdMap = this.getIdToRemoteIdMap(iframe);\n    const remoteIdToIdMap = this.getRemoteIdToIdMap(iframe);\n    return remoteId.map(\n      (id) => this.getId(iframe, id, idToRemoteIdMap, remoteIdToIdMap)\n    );\n  }\n  getRemoteId(iframe, id, map) {\n    const remoteIdToIdMap = map || this.getRemoteIdToIdMap(iframe);\n    if (typeof id !== \"number\") return id;\n    const remoteId = remoteIdToIdMap.get(id);\n    if (!remoteId) return -1;\n    return remoteId;\n  }\n  getRemoteIds(iframe, ids) {\n    const remoteIdToIdMap = this.getRemoteIdToIdMap(iframe);\n    return ids.map((id) => this.getRemoteId(iframe, id, remoteIdToIdMap));\n  }\n  reset(iframe) {\n    if (!iframe) {\n      this.iframeIdToRemoteIdMap = /* @__PURE__ */ new WeakMap();\n      this.iframeRemoteIdToIdMap = /* @__PURE__ */ new WeakMap();\n      return;\n    }\n    this.iframeIdToRemoteIdMap.delete(iframe);\n    this.iframeRemoteIdToIdMap.delete(iframe);\n  }\n  getIdToRemoteIdMap(iframe) {\n    let idToRemoteIdMap = this.iframeIdToRemoteIdMap.get(iframe);\n    if (!idToRemoteIdMap) {\n      idToRemoteIdMap = /* @__PURE__ */ new Map();\n      this.iframeIdToRemoteIdMap.set(iframe, idToRemoteIdMap);\n    }\n    return idToRemoteIdMap;\n  }\n  getRemoteIdToIdMap(iframe) {\n    let remoteIdToIdMap = this.iframeRemoteIdToIdMap.get(iframe);\n    if (!remoteIdToIdMap) {\n      remoteIdToIdMap = /* @__PURE__ */ new Map();\n      this.iframeRemoteIdToIdMap.set(iframe, remoteIdToIdMap);\n    }\n    return remoteIdToIdMap;\n  }\n}\nclass IframeManagerNoop {\n  constructor() {\n    this.crossOriginIframeMirror = new CrossOriginIframeMirror(genId);\n    this.crossOriginIframeRootIdMap = /* @__PURE__ */ new WeakMap();\n  }\n  addIframe() {\n  }\n  addLoadListener() {\n  }\n  attachIframe() {\n  }\n}\nclass IframeManager {\n  constructor(options) {\n    this.iframes = /* @__PURE__ */ new WeakMap();\n    this.crossOriginIframeMap = /* @__PURE__ */ new WeakMap();\n    this.crossOriginIframeMirror = new CrossOriginIframeMirror(genId);\n    this.crossOriginIframeRootIdMap = /* @__PURE__ */ new WeakMap();\n    this.mutationCb = options.mutationCb;\n    this.wrappedEmit = options.wrappedEmit;\n    this.stylesheetManager = options.stylesheetManager;\n    this.recordCrossOriginIframes = options.recordCrossOriginIframes;\n    this.crossOriginIframeStyleMirror = new CrossOriginIframeMirror(\n      this.stylesheetManager.styleMirror.generateId.bind(\n        this.stylesheetManager.styleMirror\n      )\n    );\n    this.mirror = options.mirror;\n    if (this.recordCrossOriginIframes) {\n      window.addEventListener(\"message\", this.handleMessage.bind(this));\n    }\n  }\n  addIframe(iframeEl) {\n    this.iframes.set(iframeEl, true);\n    const contentWindow = getIFrameContentWindow(iframeEl);\n    if (contentWindow) this.crossOriginIframeMap.set(contentWindow, iframeEl);\n  }\n  addLoadListener(cb) {\n    this.loadListener = cb;\n  }\n  attachIframe(iframeEl, childSn) {\n    this.mutationCb({\n      adds: [\n        {\n          parentId: this.mirror.getId(iframeEl),\n          nextId: null,\n          node: childSn\n        }\n      ],\n      removes: [],\n      texts: [],\n      attributes: [],\n      isAttachIframe: true\n    });\n    if (this.recordCrossOriginIframes) {\n      getIFrameContentWindow(iframeEl)?.addEventListener(\n        \"message\",\n        this.handleMessage.bind(this)\n      );\n    }\n    this.loadListener?.(iframeEl);\n    const iframeDoc = getIFrameContentDocument(iframeEl);\n    if (iframeDoc && iframeDoc.adoptedStyleSheets && iframeDoc.adoptedStyleSheets.length > 0)\n      this.stylesheetManager.adoptStyleSheets(\n        iframeDoc.adoptedStyleSheets,\n        this.mirror.getId(iframeDoc)\n      );\n  }\n  handleMessage(message) {\n    const crossOriginMessageEvent = message;\n    if (crossOriginMessageEvent.data.type !== \"rrweb\" || // To filter out the rrweb messages which are forwarded by some sites.\n    crossOriginMessageEvent.origin !== crossOriginMessageEvent.data.origin)\n      return;\n    const iframeSourceWindow = message.source;\n    if (!iframeSourceWindow) return;\n    const iframeEl = this.crossOriginIframeMap.get(message.source);\n    if (!iframeEl) return;\n    const transformedEvent = this.transformCrossOriginEvent(\n      iframeEl,\n      crossOriginMessageEvent.data.event\n    );\n    if (transformedEvent)\n      this.wrappedEmit(\n        transformedEvent,\n        crossOriginMessageEvent.data.isCheckout\n      );\n  }\n  transformCrossOriginEvent(iframeEl, e2) {\n    switch (e2.type) {\n      case EventType.FullSnapshot: {\n        this.crossOriginIframeMirror.reset(iframeEl);\n        this.crossOriginIframeStyleMirror.reset(iframeEl);\n        this.replaceIdOnNode(e2.data.node, iframeEl);\n        const rootId = e2.data.node.id;\n        this.crossOriginIframeRootIdMap.set(iframeEl, rootId);\n        this.patchRootIdOnNode(e2.data.node, rootId);\n        return {\n          timestamp: e2.timestamp,\n          type: EventType.IncrementalSnapshot,\n          data: {\n            source: IncrementalSource.Mutation,\n            adds: [\n              {\n                parentId: this.mirror.getId(iframeEl),\n                nextId: null,\n                node: e2.data.node\n              }\n            ],\n            removes: [],\n            texts: [],\n            attributes: [],\n            isAttachIframe: true\n          }\n        };\n      }\n      case EventType.Meta:\n      case EventType.Load:\n      case EventType.DomContentLoaded: {\n        return false;\n      }\n      case EventType.Plugin: {\n        return e2;\n      }\n      case EventType.Custom: {\n        this.replaceIds(\n          e2.data.payload,\n          iframeEl,\n          [\"id\", \"parentId\", \"previousId\", \"nextId\"]\n        );\n        return e2;\n      }\n      case EventType.IncrementalSnapshot: {\n        switch (e2.data.source) {\n          case IncrementalSource.Mutation: {\n            e2.data.adds.forEach((n2) => {\n              this.replaceIds(n2, iframeEl, [\n                \"parentId\",\n                \"nextId\",\n                \"previousId\"\n              ]);\n              this.replaceIdOnNode(n2.node, iframeEl);\n              const rootId = this.crossOriginIframeRootIdMap.get(iframeEl);\n              rootId && this.patchRootIdOnNode(n2.node, rootId);\n            });\n            e2.data.removes.forEach((n2) => {\n              this.replaceIds(n2, iframeEl, [\"parentId\", \"id\"]);\n            });\n            e2.data.attributes.forEach((n2) => {\n              this.replaceIds(n2, iframeEl, [\"id\"]);\n            });\n            e2.data.texts.forEach((n2) => {\n              this.replaceIds(n2, iframeEl, [\"id\"]);\n            });\n            return e2;\n          }\n          case IncrementalSource.Drag:\n          case IncrementalSource.TouchMove:\n          case IncrementalSource.MouseMove: {\n            e2.data.positions.forEach((p) => {\n              this.replaceIds(p, iframeEl, [\"id\"]);\n            });\n            return e2;\n          }\n          case IncrementalSource.ViewportResize: {\n            return false;\n          }\n          case IncrementalSource.MediaInteraction:\n          case IncrementalSource.MouseInteraction:\n          case IncrementalSource.Scroll:\n          case IncrementalSource.CanvasMutation:\n          case IncrementalSource.Input: {\n            this.replaceIds(e2.data, iframeEl, [\"id\"]);\n            return e2;\n          }\n          case IncrementalSource.StyleSheetRule:\n          case IncrementalSource.StyleDeclaration: {\n            this.replaceIds(e2.data, iframeEl, [\"id\"]);\n            this.replaceStyleIds(e2.data, iframeEl, [\"styleId\"]);\n            return e2;\n          }\n          case IncrementalSource.Font: {\n            return e2;\n          }\n          case IncrementalSource.Selection: {\n            e2.data.ranges.forEach((range) => {\n              this.replaceIds(range, iframeEl, [\"start\", \"end\"]);\n            });\n            return e2;\n          }\n          case IncrementalSource.AdoptedStyleSheet: {\n            this.replaceIds(e2.data, iframeEl, [\"id\"]);\n            this.replaceStyleIds(e2.data, iframeEl, [\"styleIds\"]);\n            e2.data.styles?.forEach((style) => {\n              this.replaceStyleIds(style, iframeEl, [\"styleId\"]);\n            });\n            return e2;\n          }\n        }\n      }\n    }\n    return false;\n  }\n  replace(iframeMirror, obj, iframeEl, keys) {\n    for (const key of keys) {\n      if (!Array.isArray(obj[key]) && typeof obj[key] !== \"number\") continue;\n      if (Array.isArray(obj[key])) {\n        obj[key] = iframeMirror.getIds(\n          iframeEl,\n          obj[key]\n        );\n      } else {\n        obj[key] = iframeMirror.getId(iframeEl, obj[key]);\n      }\n    }\n    return obj;\n  }\n  replaceIds(obj, iframeEl, keys) {\n    return this.replace(this.crossOriginIframeMirror, obj, iframeEl, keys);\n  }\n  replaceStyleIds(obj, iframeEl, keys) {\n    return this.replace(this.crossOriginIframeStyleMirror, obj, iframeEl, keys);\n  }\n  replaceIdOnNode(node, iframeEl) {\n    this.replaceIds(node, iframeEl, [\"id\", \"rootId\"]);\n    if (\"childNodes\" in node) {\n      node.childNodes.forEach((child) => {\n        this.replaceIdOnNode(child, iframeEl);\n      });\n    }\n  }\n  patchRootIdOnNode(node, rootId) {\n    if (node.type !== NodeType$2.Document && !node.rootId) node.rootId = rootId;\n    if (\"childNodes\" in node) {\n      node.childNodes.forEach((child) => {\n        this.patchRootIdOnNode(child, rootId);\n      });\n    }\n  }\n}\nclass ShadowDomManagerNoop {\n  init() {\n  }\n  addShadowRoot() {\n  }\n  observeAttachShadow() {\n  }\n  reset() {\n  }\n}\nclass ShadowDomManager {\n  constructor(options) {\n    this.shadowDoms = /* @__PURE__ */ new WeakSet();\n    this.restoreHandlers = [];\n    this.mutationCb = options.mutationCb;\n    this.scrollCb = options.scrollCb;\n    this.bypassOptions = options.bypassOptions;\n    this.mirror = options.mirror;\n    this.init();\n  }\n  init() {\n    this.reset();\n    this.patchAttachShadow(Element, document);\n  }\n  addShadowRoot(shadowRoot, doc) {\n    if (!isNativeShadowDom(shadowRoot)) return;\n    if (this.shadowDoms.has(shadowRoot)) return;\n    this.shadowDoms.add(shadowRoot);\n    this.bypassOptions.canvasManager.addShadowRoot(shadowRoot);\n    const observer = initMutationObserver(\n      {\n        ...this.bypassOptions,\n        doc,\n        mutationCb: this.mutationCb,\n        mirror: this.mirror,\n        shadowDomManager: this\n      },\n      shadowRoot\n    );\n    this.restoreHandlers.push(() => observer.disconnect());\n    this.restoreHandlers.push(\n      initScrollObserver({\n        ...this.bypassOptions,\n        scrollCb: this.scrollCb,\n        // https://gist.github.com/praveenpuglia/0832da687ed5a5d7a0907046c9ef1813\n        // scroll is not allowed to pass the boundary, so we need to listen the shadow document\n        doc: shadowRoot,\n        mirror: this.mirror\n      })\n    );\n    setTimeout$1(() => {\n      if (shadowRoot.adoptedStyleSheets && shadowRoot.adoptedStyleSheets.length > 0)\n        this.bypassOptions.stylesheetManager.adoptStyleSheets(\n          shadowRoot.adoptedStyleSheets,\n          this.mirror.getId(shadowRoot.host)\n        );\n      this.restoreHandlers.push(\n        initAdoptedStyleSheetObserver(\n          {\n            mirror: this.mirror,\n            stylesheetManager: this.bypassOptions.stylesheetManager\n          },\n          shadowRoot\n        )\n      );\n    }, 0);\n  }\n  /**\n   * Monkey patch 'attachShadow' of an IFrameElement to observe newly added shadow doms.\n   */\n  observeAttachShadow(iframeElement) {\n    const iframeDoc = getIFrameContentDocument(iframeElement);\n    const iframeWindow = getIFrameContentWindow(iframeElement);\n    if (!iframeDoc || !iframeWindow) return;\n    this.patchAttachShadow(\n      iframeWindow.Element,\n      iframeDoc\n    );\n  }\n  /**\n   * Patch 'attachShadow' to observe newly added shadow doms.\n   */\n  patchAttachShadow(element, doc) {\n    const manager = this;\n    this.restoreHandlers.push(\n      patch(\n        element.prototype,\n        \"attachShadow\",\n        function(original) {\n          return function(option) {\n            const shadowRoot = original.call(this, option);\n            if (this.shadowRoot && inDom(this))\n              manager.addShadowRoot(this.shadowRoot, doc);\n            return shadowRoot;\n          };\n        }\n      )\n    );\n  }\n  reset() {\n    this.restoreHandlers.forEach((handler) => {\n      try {\n        handler();\n      } catch (e2) {\n      }\n    });\n    this.restoreHandlers = [];\n    this.shadowDoms = /* @__PURE__ */ new WeakSet();\n    this.bypassOptions.canvasManager.resetShadowRoots();\n  }\n}\nclass StylesheetManager {\n  constructor(options) {\n    this.trackedLinkElements = /* @__PURE__ */ new WeakSet();\n    this.styleMirror = new StyleSheetMirror();\n    this.mutationCb = options.mutationCb;\n    this.adoptedStyleSheetCb = options.adoptedStyleSheetCb;\n  }\n  attachLinkElement(linkEl, childSn) {\n    if (\"_cssText\" in childSn.attributes)\n      this.mutationCb({\n        adds: [],\n        removes: [],\n        texts: [],\n        attributes: [\n          {\n            id: childSn.id,\n            attributes: childSn.attributes\n          }\n        ]\n      });\n    this.trackLinkElement(linkEl);\n  }\n  trackLinkElement(linkEl) {\n    if (this.trackedLinkElements.has(linkEl)) return;\n    this.trackedLinkElements.add(linkEl);\n    this.trackStylesheetInLinkElement(linkEl);\n  }\n  adoptStyleSheets(sheets, hostId) {\n    if (sheets.length === 0) return;\n    const adoptedStyleSheetData = {\n      id: hostId,\n      styleIds: []\n    };\n    const styles = [];\n    for (const sheet of sheets) {\n      let styleId;\n      if (!this.styleMirror.has(sheet)) {\n        styleId = this.styleMirror.add(sheet);\n        styles.push({\n          styleId,\n          rules: Array.from(sheet.rules || CSSRule, (r2, index) => ({\n            rule: stringifyRule(r2),\n            index\n          }))\n        });\n      } else styleId = this.styleMirror.getId(sheet);\n      adoptedStyleSheetData.styleIds.push(styleId);\n    }\n    if (styles.length > 0) adoptedStyleSheetData.styles = styles;\n    this.adoptedStyleSheetCb(adoptedStyleSheetData);\n  }\n  reset() {\n    this.styleMirror.reset();\n    this.trackedLinkElements = /* @__PURE__ */ new WeakSet();\n  }\n  // TODO: take snapshot on stylesheet reload by applying event listener\n  trackStylesheetInLinkElement(_linkEl) {\n  }\n}\nclass ProcessedNodeManager {\n  constructor() {\n    this.nodeMap = /* @__PURE__ */ new WeakMap();\n    this.active = false;\n  }\n  inOtherBuffer(node, thisBuffer) {\n    const buffers = this.nodeMap.get(node);\n    return buffers && Array.from(buffers).some((buffer) => buffer !== thisBuffer);\n  }\n  add(node, buffer) {\n    if (!this.active) {\n      this.active = true;\n      onRequestAnimationFrame(() => {\n        this.nodeMap = /* @__PURE__ */ new WeakMap();\n        this.active = false;\n      });\n    }\n    this.nodeMap.set(node, (this.nodeMap.get(node) || /* @__PURE__ */ new Set()).add(buffer));\n  }\n  destroy() {\n  }\n}\nlet wrappedEmit;\nlet _wrappedEmit;\nlet _takeFullSnapshot;\ntry {\n  if (Array.from([1], (x) => x * 2)[0] !== 2) {\n    const cleanFrame = document.createElement(\"iframe\");\n    document.body.appendChild(cleanFrame);\n    Array.from = cleanFrame.contentWindow?.Array.from || Array.from;\n    document.body.removeChild(cleanFrame);\n  }\n} catch (err) {\n  console.debug(\"Unable to override Array.from\", err);\n}\nconst mirror = createMirror$2();\nfunction record(options = {}) {\n  const {\n    emit,\n    checkoutEveryNms,\n    checkoutEveryNth,\n    blockClass = \"rr-block\",\n    blockSelector = null,\n    unblockSelector = null,\n    ignoreClass = \"rr-ignore\",\n    ignoreSelector = null,\n    maskAllText = false,\n    maskTextClass = \"rr-mask\",\n    unmaskTextClass = null,\n    maskTextSelector = null,\n    unmaskTextSelector = null,\n    inlineStylesheet = true,\n    maskAllInputs,\n    maskInputOptions: _maskInputOptions,\n    slimDOMOptions: _slimDOMOptions,\n    maskAttributeFn,\n    maskInputFn,\n    maskTextFn,\n    maxCanvasSize = null,\n    packFn,\n    sampling = {},\n    dataURLOptions = {},\n    mousemoveWait,\n    recordDOM = true,\n    recordCanvas = false,\n    recordCrossOriginIframes = false,\n    recordAfter = options.recordAfter === \"DOMContentLoaded\" ? options.recordAfter : \"load\",\n    userTriggeredOnInput = false,\n    collectFonts = false,\n    inlineImages = false,\n    plugins,\n    keepIframeSrcFn = () => false,\n    ignoreCSSAttributes = /* @__PURE__ */ new Set([]),\n    errorHandler,\n    onMutation,\n    getCanvasManager\n  } = options;\n  registerErrorHandler(errorHandler);\n  const inEmittingFrame = recordCrossOriginIframes ? window.parent === window : true;\n  let passEmitsToParent = false;\n  if (!inEmittingFrame) {\n    try {\n      if (window.parent.document) {\n        passEmitsToParent = false;\n      }\n    } catch (e2) {\n      passEmitsToParent = true;\n    }\n  }\n  if (inEmittingFrame && !emit) {\n    throw new Error(\"emit function is required\");\n  }\n  if (!inEmittingFrame && !passEmitsToParent) {\n    return () => {\n    };\n  }\n  if (mousemoveWait !== void 0 && sampling.mousemove === void 0) {\n    sampling.mousemove = mousemoveWait;\n  }\n  mirror.reset();\n  const maskInputOptions = maskAllInputs === true ? {\n    color: true,\n    date: true,\n    \"datetime-local\": true,\n    email: true,\n    month: true,\n    number: true,\n    range: true,\n    search: true,\n    tel: true,\n    text: true,\n    time: true,\n    url: true,\n    week: true,\n    textarea: true,\n    select: true,\n    radio: true,\n    checkbox: true\n  } : _maskInputOptions !== void 0 ? _maskInputOptions : {};\n  const slimDOMOptions = _slimDOMOptions === true || _slimDOMOptions === \"all\" ? {\n    script: true,\n    comment: true,\n    headFavicon: true,\n    headWhitespace: true,\n    headMetaSocial: true,\n    headMetaRobots: true,\n    headMetaHttpEquiv: true,\n    headMetaVerification: true,\n    // the following are off for slimDOMOptions === true,\n    // as they destroy some (hidden) info:\n    headMetaAuthorship: _slimDOMOptions === \"all\",\n    headMetaDescKeywords: _slimDOMOptions === \"all\"\n  } : _slimDOMOptions ? _slimDOMOptions : {};\n  polyfill$1();\n  let lastFullSnapshotEvent;\n  let incrementalSnapshotCount = 0;\n  const eventProcessor = (e2) => {\n    for (const plugin of plugins || []) {\n      if (plugin.eventProcessor) {\n        e2 = plugin.eventProcessor(e2);\n      }\n    }\n    if (packFn && // Disable packing events which will be emitted to parent frames.\n    !passEmitsToParent) {\n      e2 = packFn(e2);\n    }\n    return e2;\n  };\n  wrappedEmit = (r2, isCheckout) => {\n    const e2 = r2;\n    e2.timestamp = nowTimestamp();\n    if (mutationBuffers[0]?.isFrozen() && e2.type !== EventType.FullSnapshot && !(e2.type === EventType.IncrementalSnapshot && e2.data.source === IncrementalSource.Mutation)) {\n      mutationBuffers.forEach((buf) => buf.unfreeze());\n    }\n    if (inEmittingFrame) {\n      emit?.(eventProcessor(e2), isCheckout);\n    } else if (passEmitsToParent) {\n      const message = {\n        type: \"rrweb\",\n        event: eventProcessor(e2),\n        origin: window.location.origin,\n        isCheckout\n      };\n      window.parent.postMessage(message, \"*\");\n    }\n    if (e2.type === EventType.FullSnapshot) {\n      lastFullSnapshotEvent = e2;\n      incrementalSnapshotCount = 0;\n    } else if (e2.type === EventType.IncrementalSnapshot) {\n      if (e2.data.source === IncrementalSource.Mutation && e2.data.isAttachIframe) {\n        return;\n      }\n      incrementalSnapshotCount++;\n      const exceedCount = checkoutEveryNth && incrementalSnapshotCount >= checkoutEveryNth;\n      const exceedTime = checkoutEveryNms && lastFullSnapshotEvent && e2.timestamp - lastFullSnapshotEvent.timestamp > checkoutEveryNms;\n      if (exceedCount || exceedTime) {\n        takeFullSnapshot2(true);\n      }\n    }\n  };\n  _wrappedEmit = wrappedEmit;\n  const wrappedMutationEmit = (m) => {\n    wrappedEmit({\n      type: EventType.IncrementalSnapshot,\n      data: {\n        source: IncrementalSource.Mutation,\n        ...m\n      }\n    });\n  };\n  const wrappedScrollEmit = (p) => wrappedEmit({\n    type: EventType.IncrementalSnapshot,\n    data: {\n      source: IncrementalSource.Scroll,\n      ...p\n    }\n  });\n  const wrappedCanvasMutationEmit = (p) => wrappedEmit({\n    type: EventType.IncrementalSnapshot,\n    data: {\n      source: IncrementalSource.CanvasMutation,\n      ...p\n    }\n  });\n  const wrappedAdoptedStyleSheetEmit = (a2) => wrappedEmit({\n    type: EventType.IncrementalSnapshot,\n    data: {\n      source: IncrementalSource.AdoptedStyleSheet,\n      ...a2\n    }\n  });\n  const stylesheetManager = new StylesheetManager({\n    mutationCb: wrappedMutationEmit,\n    adoptedStyleSheetCb: wrappedAdoptedStyleSheetEmit\n  });\n  const iframeManager = typeof __RRWEB_EXCLUDE_IFRAME__ === \"boolean\" && __RRWEB_EXCLUDE_IFRAME__ ? new IframeManagerNoop() : new IframeManager({\n    mirror,\n    mutationCb: wrappedMutationEmit,\n    stylesheetManager,\n    recordCrossOriginIframes,\n    wrappedEmit\n  });\n  for (const plugin of plugins || []) {\n    if (plugin.getMirror)\n      plugin.getMirror({\n        nodeMirror: mirror,\n        crossOriginIframeMirror: iframeManager.crossOriginIframeMirror,\n        crossOriginIframeStyleMirror: iframeManager.crossOriginIframeStyleMirror\n      });\n  }\n  const processedNodeManager = new ProcessedNodeManager();\n  const canvasManager = _getCanvasManager(\n    getCanvasManager,\n    {\n      mirror,\n      win: window,\n      mutationCb: (p) => wrappedEmit({\n        type: EventType.IncrementalSnapshot,\n        data: {\n          source: IncrementalSource.CanvasMutation,\n          ...p\n        }\n      }),\n      recordCanvas,\n      blockClass,\n      blockSelector,\n      unblockSelector,\n      maxCanvasSize,\n      sampling: sampling[\"canvas\"],\n      dataURLOptions,\n      errorHandler\n    }\n  );\n  const shadowDomManager = typeof __RRWEB_EXCLUDE_SHADOW_DOM__ === \"boolean\" && __RRWEB_EXCLUDE_SHADOW_DOM__ ? new ShadowDomManagerNoop() : new ShadowDomManager({\n    mutationCb: wrappedMutationEmit,\n    scrollCb: wrappedScrollEmit,\n    bypassOptions: {\n      onMutation,\n      blockClass,\n      blockSelector,\n      unblockSelector,\n      maskAllText,\n      maskTextClass,\n      unmaskTextClass,\n      maskTextSelector,\n      unmaskTextSelector,\n      inlineStylesheet,\n      maskInputOptions,\n      dataURLOptions,\n      maskAttributeFn,\n      maskTextFn,\n      maskInputFn,\n      recordCanvas,\n      inlineImages,\n      sampling,\n      slimDOMOptions,\n      iframeManager,\n      stylesheetManager,\n      canvasManager,\n      keepIframeSrcFn,\n      processedNodeManager,\n      ignoreCSSAttributes\n    },\n    mirror\n  });\n  const takeFullSnapshot2 = (isCheckout = false) => {\n    if (!recordDOM) {\n      return;\n    }\n    wrappedEmit(\n      {\n        type: EventType.Meta,\n        data: {\n          href: window.location.href,\n          width: getWindowWidth(),\n          height: getWindowHeight()\n        }\n      },\n      isCheckout\n    );\n    stylesheetManager.reset();\n    shadowDomManager.init();\n    mutationBuffers.forEach((buf) => buf.lock());\n    const node = snapshot(document, {\n      mirror,\n      blockClass,\n      blockSelector,\n      unblockSelector,\n      maskAllText,\n      maskTextClass,\n      unmaskTextClass,\n      maskTextSelector,\n      unmaskTextSelector,\n      inlineStylesheet,\n      maskAllInputs: maskInputOptions,\n      maskAttributeFn,\n      maskInputFn,\n      maskTextFn,\n      slimDOM: slimDOMOptions,\n      dataURLOptions,\n      recordCanvas,\n      inlineImages,\n      onSerialize: (n2) => {\n        if (isSerializedIframe(n2, mirror)) {\n          iframeManager.addIframe(n2);\n        }\n        if (isSerializedStylesheet(n2, mirror)) {\n          stylesheetManager.trackLinkElement(n2);\n        }\n        if (hasShadowRoot(n2)) {\n          shadowDomManager.addShadowRoot(n2.shadowRoot, document);\n        }\n      },\n      onIframeLoad: (iframe, childSn) => {\n        iframeManager.attachIframe(iframe, childSn);\n        const contentWindow = getIFrameContentWindow(iframe);\n        if (contentWindow) {\n          canvasManager.addWindow(contentWindow);\n        }\n        shadowDomManager.observeAttachShadow(iframe);\n      },\n      onStylesheetLoad: (linkEl, childSn) => {\n        stylesheetManager.attachLinkElement(linkEl, childSn);\n      },\n      onBlockedImageLoad: (_imageEl, serializedNode, { width, height }) => {\n        wrappedMutationEmit({\n          adds: [],\n          removes: [],\n          texts: [],\n          attributes: [\n            {\n              id: serializedNode.id,\n              attributes: {\n                style: {\n                  width: `${width}px`,\n                  height: `${height}px`\n                }\n              }\n            }\n          ]\n        });\n      },\n      keepIframeSrcFn,\n      ignoreCSSAttributes\n    });\n    if (!node) {\n      return console.warn(\"Failed to snapshot the document\");\n    }\n    wrappedEmit({\n      type: EventType.FullSnapshot,\n      data: {\n        node,\n        initialOffset: getWindowScroll(window)\n      }\n    });\n    mutationBuffers.forEach((buf) => buf.unlock());\n    if (document.adoptedStyleSheets && document.adoptedStyleSheets.length > 0)\n      stylesheetManager.adoptStyleSheets(\n        document.adoptedStyleSheets,\n        mirror.getId(document)\n      );\n  };\n  _takeFullSnapshot = takeFullSnapshot2;\n  try {\n    const handlers = [];\n    const observe = (doc) => {\n      return callbackWrapper(initObservers)(\n        {\n          onMutation,\n          mutationCb: wrappedMutationEmit,\n          mousemoveCb: (positions, source) => wrappedEmit({\n            type: EventType.IncrementalSnapshot,\n            data: {\n              source,\n              positions\n            }\n          }),\n          mouseInteractionCb: (d) => wrappedEmit({\n            type: EventType.IncrementalSnapshot,\n            data: {\n              source: IncrementalSource.MouseInteraction,\n              ...d\n            }\n          }),\n          scrollCb: wrappedScrollEmit,\n          viewportResizeCb: (d) => wrappedEmit({\n            type: EventType.IncrementalSnapshot,\n            data: {\n              source: IncrementalSource.ViewportResize,\n              ...d\n            }\n          }),\n          inputCb: (v2) => wrappedEmit({\n            type: EventType.IncrementalSnapshot,\n            data: {\n              source: IncrementalSource.Input,\n              ...v2\n            }\n          }),\n          mediaInteractionCb: (p) => wrappedEmit({\n            type: EventType.IncrementalSnapshot,\n            data: {\n              source: IncrementalSource.MediaInteraction,\n              ...p\n            }\n          }),\n          styleSheetRuleCb: (r2) => wrappedEmit({\n            type: EventType.IncrementalSnapshot,\n            data: {\n              source: IncrementalSource.StyleSheetRule,\n              ...r2\n            }\n          }),\n          styleDeclarationCb: (r2) => wrappedEmit({\n            type: EventType.IncrementalSnapshot,\n            data: {\n              source: IncrementalSource.StyleDeclaration,\n              ...r2\n            }\n          }),\n          canvasMutationCb: wrappedCanvasMutationEmit,\n          fontCb: (p) => wrappedEmit({\n            type: EventType.IncrementalSnapshot,\n            data: {\n              source: IncrementalSource.Font,\n              ...p\n            }\n          }),\n          selectionCb: (p) => {\n            wrappedEmit({\n              type: EventType.IncrementalSnapshot,\n              data: {\n                source: IncrementalSource.Selection,\n                ...p\n              }\n            });\n          },\n          customElementCb: (c2) => {\n            wrappedEmit({\n              type: EventType.IncrementalSnapshot,\n              data: {\n                source: IncrementalSource.CustomElement,\n                ...c2\n              }\n            });\n          },\n          blockClass,\n          ignoreClass,\n          ignoreSelector,\n          maskAllText,\n          maskTextClass,\n          unmaskTextClass,\n          maskTextSelector,\n          unmaskTextSelector,\n          maskInputOptions,\n          inlineStylesheet,\n          sampling,\n          recordDOM,\n          recordCanvas,\n          inlineImages,\n          userTriggeredOnInput,\n          collectFonts,\n          doc,\n          maskAttributeFn,\n          maskInputFn,\n          maskTextFn,\n          keepIframeSrcFn,\n          blockSelector,\n          unblockSelector,\n          slimDOMOptions,\n          dataURLOptions,\n          mirror,\n          iframeManager,\n          stylesheetManager,\n          shadowDomManager,\n          processedNodeManager,\n          canvasManager,\n          ignoreCSSAttributes,\n          plugins: plugins?.filter((p) => p.observer)?.map((p) => ({\n            observer: p.observer,\n            options: p.options,\n            callback: (payload) => wrappedEmit({\n              type: EventType.Plugin,\n              data: {\n                plugin: p.name,\n                payload\n              }\n            })\n          })) || []\n        },\n        {}\n      );\n    };\n    iframeManager.addLoadListener((iframeEl) => {\n      try {\n        handlers.push(observe(iframeEl.contentDocument));\n      } catch (error) {\n        console.warn(error);\n      }\n    });\n    const init = () => {\n      takeFullSnapshot2();\n      handlers.push(observe(document));\n    };\n    if (document.readyState === \"interactive\" || document.readyState === \"complete\") {\n      init();\n    } else {\n      handlers.push(\n        on(\"DOMContentLoaded\", () => {\n          wrappedEmit({\n            type: EventType.DomContentLoaded,\n            data: {}\n          });\n          if (recordAfter === \"DOMContentLoaded\") init();\n        })\n      );\n      handlers.push(\n        on(\n          \"load\",\n          () => {\n            wrappedEmit({\n              type: EventType.Load,\n              data: {}\n            });\n            if (recordAfter === \"load\") init();\n          },\n          window\n        )\n      );\n    }\n    return () => {\n      handlers.forEach((h) => h());\n      processedNodeManager.destroy();\n      _takeFullSnapshot = void 0;\n      unregisterErrorHandler();\n    };\n  } catch (error) {\n    console.warn(error);\n  }\n}\nfunction addCustomEvent(tag, payload) {\n  if (!_wrappedEmit) {\n    throw new Error(\"please add custom event after start recording\");\n  }\n  wrappedEmit({\n    type: EventType.Custom,\n    data: {\n      tag,\n      payload\n    }\n  });\n}\nfunction freezePage() {\n  mutationBuffers.forEach((buf) => buf.freeze());\n}\nfunction takeFullSnapshot(isCheckout) {\n  if (!_takeFullSnapshot) {\n    throw new Error(\"please take full snapshot after start recording\");\n  }\n  _takeFullSnapshot(isCheckout);\n}\nrecord.mirror = mirror;\nrecord.takeFullSnapshot = takeFullSnapshot;\nfunction _getCanvasManager(getCanvasManagerFn, options) {\n  try {\n    return getCanvasManagerFn ? getCanvasManagerFn(options) : new CanvasManagerNoop();\n  } catch {\n    console.warn(\"Unable to initialize CanvasManager\");\n    return new CanvasManagerNoop();\n  }\n}\nfunction mitt$1(n2) {\n  return { all: n2 = n2 || /* @__PURE__ */ new Map(), on: function(t2, e2) {\n    var i2 = n2.get(t2);\n    i2 ? i2.push(e2) : n2.set(t2, [e2]);\n  }, off: function(t2, e2) {\n    var i2 = n2.get(t2);\n    i2 && (e2 ? i2.splice(i2.indexOf(e2) >>> 0, 1) : n2.set(t2, []));\n  }, emit: function(t2, e2) {\n    var i2 = n2.get(t2);\n    i2 && i2.slice().map(function(n3) {\n      n3(e2);\n    }), (i2 = n2.get(\"*\")) && i2.slice().map(function(n3) {\n      n3(t2, e2);\n    });\n  } };\n}\nconst mittProxy = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({\n  __proto__: null,\n  default: mitt$1\n}, Symbol.toStringTag, { value: \"Module\" }));\nfunction polyfill(w = window, d = document) {\n  if (\"scrollBehavior\" in d.documentElement.style && w.__forceSmoothScrollPolyfill__ !== true) {\n    return;\n  }\n  const Element2 = w.HTMLElement || w.Element;\n  const SCROLL_TIME = 468;\n  const original = {\n    scroll: w.scroll || w.scrollTo,\n    scrollBy: w.scrollBy,\n    elementScroll: Element2.prototype.scroll || scrollElement,\n    scrollIntoView: Element2.prototype.scrollIntoView\n  };\n  const now = w.performance && w.performance.now ? w.performance.now.bind(w.performance) : Date.now;\n  function isMicrosoftBrowser(userAgent) {\n    const userAgentPatterns = [\"MSIE \", \"Trident/\", \"Edge/\"];\n    return new RegExp(userAgentPatterns.join(\"|\")).test(userAgent);\n  }\n  const ROUNDING_TOLERANCE = isMicrosoftBrowser(w.navigator.userAgent) ? 1 : 0;\n  function scrollElement(x, y) {\n    this.scrollLeft = x;\n    this.scrollTop = y;\n  }\n  function ease(k) {\n    return 0.5 * (1 - Math.cos(Math.PI * k));\n  }\n  function shouldBailOut(firstArg) {\n    if (firstArg === null || typeof firstArg !== \"object\" || firstArg.behavior === void 0 || firstArg.behavior === \"auto\" || firstArg.behavior === \"instant\") {\n      return true;\n    }\n    if (typeof firstArg === \"object\" && firstArg.behavior === \"smooth\") {\n      return false;\n    }\n    throw new TypeError(\n      \"behavior member of ScrollOptions \" + firstArg.behavior + \" is not a valid value for enumeration ScrollBehavior.\"\n    );\n  }\n  function hasScrollableSpace(el, axis) {\n    if (axis === \"Y\") {\n      return el.clientHeight + ROUNDING_TOLERANCE < el.scrollHeight;\n    }\n    if (axis === \"X\") {\n      return el.clientWidth + ROUNDING_TOLERANCE < el.scrollWidth;\n    }\n  }\n  function canOverflow(el, axis) {\n    const overflowValue = w.getComputedStyle(el, null)[\"overflow\" + axis];\n    return overflowValue === \"auto\" || overflowValue === \"scroll\";\n  }\n  function isScrollable(el) {\n    const isScrollableY = hasScrollableSpace(el, \"Y\") && canOverflow(el, \"Y\");\n    const isScrollableX = hasScrollableSpace(el, \"X\") && canOverflow(el, \"X\");\n    return isScrollableY || isScrollableX;\n  }\n  function findScrollableParent(el) {\n    while (el !== d.body && isScrollable(el) === false) {\n      el = el.parentNode || el.host;\n    }\n    return el;\n  }\n  function step(context) {\n    const time = now();\n    let value;\n    let currentX;\n    let currentY;\n    let elapsed = (time - context.startTime) / SCROLL_TIME;\n    elapsed = elapsed > 1 ? 1 : elapsed;\n    value = ease(elapsed);\n    currentX = context.startX + (context.x - context.startX) * value;\n    currentY = context.startY + (context.y - context.startY) * value;\n    context.method.call(context.scrollable, currentX, currentY);\n    if (currentX !== context.x || currentY !== context.y) {\n      w.requestAnimationFrame(step.bind(w, context));\n    }\n  }\n  function smoothScroll(el, x, y) {\n    let scrollable;\n    let startX;\n    let startY;\n    let method;\n    const startTime = now();\n    if (el === d.body) {\n      scrollable = w;\n      startX = w.scrollX || w.pageXOffset;\n      startY = w.scrollY || w.pageYOffset;\n      method = original.scroll;\n    } else {\n      scrollable = el;\n      startX = el.scrollLeft;\n      startY = el.scrollTop;\n      method = scrollElement;\n    }\n    step({\n      scrollable,\n      method,\n      startTime,\n      startX,\n      startY,\n      x,\n      y\n    });\n  }\n  w.scroll = w.scrollTo = function() {\n    if (arguments[0] === void 0) {\n      return;\n    }\n    if (shouldBailOut(arguments[0]) === true) {\n      original.scroll.call(\n        w,\n        arguments[0].left !== void 0 ? arguments[0].left : typeof arguments[0] !== \"object\" ? arguments[0] : w.scrollX || w.pageXOffset,\n        // use top prop, second argument if present or fallback to scrollY\n        arguments[0].top !== void 0 ? arguments[0].top : arguments[1] !== void 0 ? arguments[1] : w.scrollY || w.pageYOffset\n      );\n      return;\n    }\n    smoothScroll.call(\n      w,\n      d.body,\n      arguments[0].left !== void 0 ? ~~arguments[0].left : w.scrollX || w.pageXOffset,\n      arguments[0].top !== void 0 ? ~~arguments[0].top : w.scrollY || w.pageYOffset\n    );\n  };\n  w.scrollBy = function() {\n    if (arguments[0] === void 0) {\n      return;\n    }\n    if (shouldBailOut(arguments[0])) {\n      original.scrollBy.call(\n        w,\n        arguments[0].left !== void 0 ? arguments[0].left : typeof arguments[0] !== \"object\" ? arguments[0] : 0,\n        arguments[0].top !== void 0 ? arguments[0].top : arguments[1] !== void 0 ? arguments[1] : 0\n      );\n      return;\n    }\n    smoothScroll.call(\n      w,\n      d.body,\n      ~~arguments[0].left + (w.scrollX || w.pageXOffset),\n      ~~arguments[0].top + (w.scrollY || w.pageYOffset)\n    );\n  };\n  Element2.prototype.scroll = Element2.prototype.scrollTo = function() {\n    if (arguments[0] === void 0) {\n      return;\n    }\n    if (shouldBailOut(arguments[0]) === true) {\n      if (typeof arguments[0] === \"number\" && arguments[1] === void 0) {\n        throw new SyntaxError(\"Value could not be converted\");\n      }\n      original.elementScroll.call(\n        this,\n        // use left prop, first number argument or fallback to scrollLeft\n        arguments[0].left !== void 0 ? ~~arguments[0].left : typeof arguments[0] !== \"object\" ? ~~arguments[0] : this.scrollLeft,\n        // use top prop, second argument or fallback to scrollTop\n        arguments[0].top !== void 0 ? ~~arguments[0].top : arguments[1] !== void 0 ? ~~arguments[1] : this.scrollTop\n      );\n      return;\n    }\n    const left = arguments[0].left;\n    const top = arguments[0].top;\n    smoothScroll.call(\n      this,\n      this,\n      typeof left === \"undefined\" ? this.scrollLeft : ~~left,\n      typeof top === \"undefined\" ? this.scrollTop : ~~top\n    );\n  };\n  Element2.prototype.scrollBy = function() {\n    if (arguments[0] === void 0) {\n      return;\n    }\n    if (shouldBailOut(arguments[0]) === true) {\n      original.elementScroll.call(\n        this,\n        arguments[0].left !== void 0 ? ~~arguments[0].left + this.scrollLeft : ~~arguments[0] + this.scrollLeft,\n        arguments[0].top !== void 0 ? ~~arguments[0].top + this.scrollTop : ~~arguments[1] + this.scrollTop\n      );\n      return;\n    }\n    this.scroll({\n      left: ~~arguments[0].left + this.scrollLeft,\n      top: ~~arguments[0].top + this.scrollTop,\n      behavior: arguments[0].behavior\n    });\n  };\n  Element2.prototype.scrollIntoView = function() {\n    if (shouldBailOut(arguments[0]) === true) {\n      original.scrollIntoView.call(\n        this,\n        arguments[0] === void 0 ? true : arguments[0]\n      );\n      return;\n    }\n    const scrollableParent = findScrollableParent(this);\n    const parentRects = scrollableParent.getBoundingClientRect();\n    const clientRects = this.getBoundingClientRect();\n    if (scrollableParent !== d.body) {\n      smoothScroll.call(\n        this,\n        scrollableParent,\n        scrollableParent.scrollLeft + clientRects.left - parentRects.left,\n        scrollableParent.scrollTop + clientRects.top - parentRects.top\n      );\n      if (w.getComputedStyle(scrollableParent).position !== \"fixed\") {\n        w.scrollBy({\n          left: parentRects.left,\n          top: parentRects.top,\n          behavior: \"smooth\"\n        });\n      }\n    } else {\n      w.scrollBy({\n        left: clientRects.left,\n        top: clientRects.top,\n        behavior: \"smooth\"\n      });\n    }\n  };\n}\nclass Timer {\n  constructor(actions = [], config) {\n    this.timeOffset = 0;\n    this.raf = null;\n    this.actions = actions;\n    this.speed = config.speed;\n  }\n  /**\n   * Add an action, possibly after the timer starts.\n   */\n  addAction(action) {\n    const rafWasActive = this.raf === true;\n    if (!this.actions.length || this.actions[this.actions.length - 1].delay <= action.delay) {\n      this.actions.push(action);\n    } else {\n      const index = this.findActionIndex(action);\n      this.actions.splice(index, 0, action);\n    }\n    if (rafWasActive) {\n      this.raf = onRequestAnimationFrame(this.rafCheck.bind(this));\n    }\n  }\n  start() {\n    this.timeOffset = 0;\n    this.lastTimestamp = performance.now();\n    this.raf = onRequestAnimationFrame(this.rafCheck.bind(this));\n  }\n  rafCheck() {\n    const time = performance.now();\n    this.timeOffset += (time - this.lastTimestamp) * this.speed;\n    this.lastTimestamp = time;\n    while (this.actions.length) {\n      const action = this.actions[0];\n      if (this.timeOffset >= action.delay) {\n        this.actions.shift();\n        action.doAction();\n      } else {\n        break;\n      }\n    }\n    if (this.actions.length > 0) {\n      this.raf = onRequestAnimationFrame(this.rafCheck.bind(this));\n    } else {\n      this.raf = true;\n    }\n  }\n  clear() {\n    if (this.raf) {\n      if (this.raf !== true) {\n        cancelAnimationFrame(this.raf);\n      }\n      this.raf = null;\n    }\n    this.actions.length = 0;\n  }\n  setSpeed(speed) {\n    this.speed = speed;\n  }\n  isActive() {\n    return this.raf !== null;\n  }\n  findActionIndex(action) {\n    let start = 0;\n    let end = this.actions.length - 1;\n    while (start <= end) {\n      const mid = Math.floor((start + end) / 2);\n      if (this.actions[mid].delay < action.delay) {\n        start = mid + 1;\n      } else if (this.actions[mid].delay > action.delay) {\n        end = mid - 1;\n      } else {\n        return mid + 1;\n      }\n    }\n    return start;\n  }\n}\nfunction addDelay(event, baselineTime) {\n  if (event.type === EventType.IncrementalSnapshot && event.data.source === IncrementalSource.MouseMove && event.data.positions && event.data.positions.length) {\n    const firstOffset = event.data.positions[0].timeOffset;\n    const firstTimestamp = event.timestamp + firstOffset;\n    event.delay = firstTimestamp - baselineTime;\n    return firstTimestamp - baselineTime;\n  }\n  event.delay = event.timestamp - baselineTime;\n  return event.delay;\n}\n/*! *****************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\nfunction t(t2, n2) {\n  var e2 = \"function\" == typeof Symbol && t2[Symbol.iterator];\n  if (!e2) return t2;\n  var r2, o2, i2 = e2.call(t2), a2 = [];\n  try {\n    for (; (void 0 === n2 || n2-- > 0) && !(r2 = i2.next()).done; ) a2.push(r2.value);\n  } catch (t3) {\n    o2 = { error: t3 };\n  } finally {\n    try {\n      r2 && !r2.done && (e2 = i2.return) && e2.call(i2);\n    } finally {\n      if (o2) throw o2.error;\n    }\n  }\n  return a2;\n}\nvar n;\n!(function(t2) {\n  t2[t2.NotStarted = 0] = \"NotStarted\", t2[t2.Running = 1] = \"Running\", t2[t2.Stopped = 2] = \"Stopped\";\n})(n || (n = {}));\nvar e = { type: \"xstate.init\" };\nfunction r(t2) {\n  return void 0 === t2 ? [] : [].concat(t2);\n}\nfunction o(t2) {\n  return { type: \"xstate.assign\", assignment: t2 };\n}\nfunction i(t2, n2) {\n  return \"string\" == typeof (t2 = \"string\" == typeof t2 && n2 && n2[t2] ? n2[t2] : t2) ? { type: t2 } : \"function\" == typeof t2 ? { type: t2.name, exec: t2 } : t2;\n}\nfunction a(t2) {\n  return function(n2) {\n    return t2 === n2;\n  };\n}\nfunction u(t2) {\n  return \"string\" == typeof t2 ? { type: t2 } : t2;\n}\nfunction c(t2, n2) {\n  return { value: t2, context: n2, actions: [], changed: false, matches: a(t2) };\n}\nfunction f(t2, n2, e2) {\n  var r2 = n2, o2 = false;\n  return [t2.filter((function(t3) {\n    if (\"xstate.assign\" === t3.type) {\n      o2 = true;\n      var n3 = Object.assign({}, r2);\n      return \"function\" == typeof t3.assignment ? n3 = t3.assignment(r2, e2) : Object.keys(t3.assignment).forEach((function(o3) {\n        n3[o3] = \"function\" == typeof t3.assignment[o3] ? t3.assignment[o3](r2, e2) : t3.assignment[o3];\n      })), r2 = n3, false;\n    }\n    return true;\n  })), r2, o2];\n}\nfunction s(n2, o2) {\n  void 0 === o2 && (o2 = {});\n  var s2 = t(f(r(n2.states[n2.initial].entry).map((function(t2) {\n    return i(t2, o2.actions);\n  })), n2.context, e), 2), l2 = s2[0], v2 = s2[1], y = { config: n2, _options: o2, initialState: { value: n2.initial, actions: l2, context: v2, matches: a(n2.initial) }, transition: function(e2, o3) {\n    var s3, l3, v3 = \"string\" == typeof e2 ? { value: e2, context: n2.context } : e2, p = v3.value, g = v3.context, d = u(o3), x = n2.states[p];\n    if (x.on) {\n      var m = r(x.on[d.type]);\n      try {\n        for (var h = (function(t2) {\n          var n3 = \"function\" == typeof Symbol && Symbol.iterator, e3 = n3 && t2[n3], r2 = 0;\n          if (e3) return e3.call(t2);\n          if (t2 && \"number\" == typeof t2.length) return { next: function() {\n            return t2 && r2 >= t2.length && (t2 = void 0), { value: t2 && t2[r2++], done: !t2 };\n          } };\n          throw new TypeError(n3 ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n        })(m), b = h.next(); !b.done; b = h.next()) {\n          var S = b.value;\n          if (void 0 === S) return c(p, g);\n          var w = \"string\" == typeof S ? { target: S } : S, j = w.target, E = w.actions, R = void 0 === E ? [] : E, N = w.cond, O = void 0 === N ? function() {\n            return true;\n          } : N, _ = void 0 === j, k = null != j ? j : p, T = n2.states[k];\n          if (O(g, d)) {\n            var q = t(f((_ ? r(R) : [].concat(x.exit, R, T.entry).filter((function(t2) {\n              return t2;\n            }))).map((function(t2) {\n              return i(t2, y._options.actions);\n            })), g, d), 3), z = q[0], A = q[1], B = q[2], C = null != j ? j : p;\n            return { value: C, context: A, actions: z, changed: j !== p || z.length > 0 || B, matches: a(C) };\n          }\n        }\n      } catch (t2) {\n        s3 = { error: t2 };\n      } finally {\n        try {\n          b && !b.done && (l3 = h.return) && l3.call(h);\n        } finally {\n          if (s3) throw s3.error;\n        }\n      }\n    }\n    return c(p, g);\n  } };\n  return y;\n}\nvar l = function(t2, n2) {\n  return t2.actions.forEach((function(e2) {\n    var r2 = e2.exec;\n    return r2 && r2(t2.context, n2);\n  }));\n};\nfunction v(t2) {\n  var r2 = t2.initialState, o2 = n.NotStarted, i2 = /* @__PURE__ */ new Set(), c2 = { _machine: t2, send: function(e2) {\n    o2 === n.Running && (r2 = t2.transition(r2, e2), l(r2, u(e2)), i2.forEach((function(t3) {\n      return t3(r2);\n    })));\n  }, subscribe: function(t3) {\n    return i2.add(t3), t3(r2), { unsubscribe: function() {\n      return i2.delete(t3);\n    } };\n  }, start: function(i3) {\n    if (i3) {\n      var u2 = \"object\" == typeof i3 ? i3 : { context: t2.config.context, value: i3 };\n      r2 = { value: u2.value, actions: [], context: u2.context, matches: a(u2.value) };\n    }\n    return o2 = n.Running, l(r2, e), c2;\n  }, stop: function() {\n    return o2 = n.Stopped, i2.clear(), c2;\n  }, get state() {\n    return r2;\n  }, get status() {\n    return o2;\n  } };\n  return c2;\n}\nfunction discardPriorSnapshots(events, baselineTime) {\n  for (let idx = events.length - 1; idx >= 0; idx--) {\n    const event = events[idx];\n    if (event.type === EventType.Meta) {\n      if (event.timestamp <= baselineTime) {\n        return events.slice(idx);\n      }\n    }\n  }\n  return events;\n}\nfunction createPlayerService(context, { getCastFn, applyEventsSynchronously, emitter }) {\n  const playerMachine = s(\n    {\n      id: \"player\",\n      context,\n      initial: \"paused\",\n      states: {\n        playing: {\n          on: {\n            PAUSE: {\n              target: \"paused\",\n              actions: [\"pause\"]\n            },\n            CAST_EVENT: {\n              target: \"playing\",\n              actions: \"castEvent\"\n            },\n            END: {\n              target: \"paused\",\n              actions: [\"resetLastPlayedEvent\", \"pause\"]\n            },\n            ADD_EVENT: {\n              target: \"playing\",\n              actions: [\"addEvent\"]\n            }\n          }\n        },\n        paused: {\n          on: {\n            PLAY: {\n              target: \"playing\",\n              actions: [\"recordTimeOffset\", \"play\"]\n            },\n            CAST_EVENT: {\n              target: \"paused\",\n              actions: \"castEvent\"\n            },\n            TO_LIVE: {\n              target: \"live\",\n              actions: [\"startLive\"]\n            },\n            ADD_EVENT: {\n              target: \"paused\",\n              actions: [\"addEvent\"]\n            }\n          }\n        },\n        live: {\n          on: {\n            ADD_EVENT: {\n              target: \"live\",\n              actions: [\"addEvent\"]\n            },\n            CAST_EVENT: {\n              target: \"live\",\n              actions: [\"castEvent\"]\n            }\n          }\n        }\n      }\n    },\n    {\n      actions: {\n        castEvent: o({\n          lastPlayedEvent: (ctx, event) => {\n            if (event.type === \"CAST_EVENT\") {\n              return event.payload.event;\n            }\n            return ctx.lastPlayedEvent;\n          }\n        }),\n        recordTimeOffset: o((ctx, event) => {\n          let timeOffset = ctx.timeOffset;\n          if (\"payload\" in event && \"timeOffset\" in event.payload) {\n            timeOffset = event.payload.timeOffset;\n          }\n          return {\n            ...ctx,\n            timeOffset,\n            baselineTime: ctx.events[0].timestamp + timeOffset\n          };\n        }),\n        play(ctx) {\n          const { timer, events, baselineTime, lastPlayedEvent } = ctx;\n          timer.clear();\n          for (const event of events) {\n            addDelay(event, baselineTime);\n          }\n          const neededEvents = discardPriorSnapshots(events, baselineTime);\n          let lastPlayedTimestamp = lastPlayedEvent?.timestamp;\n          if (lastPlayedEvent?.type === EventType.IncrementalSnapshot && lastPlayedEvent.data.source === IncrementalSource.MouseMove) {\n            lastPlayedTimestamp = lastPlayedEvent.timestamp + lastPlayedEvent.data.positions[0]?.timeOffset;\n          }\n          if (baselineTime < (lastPlayedTimestamp || 0)) {\n            emitter.emit(ReplayerEvents.PlayBack);\n          }\n          const syncEvents = new Array();\n          for (const event of neededEvents) {\n            if (lastPlayedTimestamp && lastPlayedTimestamp < baselineTime && (event.timestamp <= lastPlayedTimestamp || event === lastPlayedEvent)) {\n              continue;\n            }\n            if (event.timestamp < baselineTime) {\n              syncEvents.push(event);\n            } else {\n              const castFn = getCastFn(event, false);\n              timer.addAction({\n                doAction: () => {\n                  castFn();\n                },\n                delay: event.delay\n              });\n            }\n          }\n          applyEventsSynchronously(syncEvents);\n          emitter.emit(ReplayerEvents.Flush);\n          timer.start();\n        },\n        pause(ctx) {\n          ctx.timer.clear();\n        },\n        resetLastPlayedEvent: o((ctx) => {\n          return {\n            ...ctx,\n            lastPlayedEvent: null\n          };\n        }),\n        startLive: o({\n          baselineTime: (ctx, event) => {\n            ctx.timer.start();\n            if (event.type === \"TO_LIVE\" && event.payload.baselineTime) {\n              return event.payload.baselineTime;\n            }\n            return Date.now();\n          }\n        }),\n        addEvent: o((ctx, machineEvent) => {\n          const { baselineTime, timer, events } = ctx;\n          if (machineEvent.type === \"ADD_EVENT\") {\n            const { event } = machineEvent.payload;\n            addDelay(event, baselineTime);\n            let end = events.length - 1;\n            if (!events[end] || events[end].timestamp <= event.timestamp) {\n              events.push(event);\n            } else {\n              let insertionIndex = -1;\n              let start = 0;\n              while (start <= end) {\n                const mid = Math.floor((start + end) / 2);\n                if (events[mid].timestamp <= event.timestamp) {\n                  start = mid + 1;\n                } else {\n                  end = mid - 1;\n                }\n              }\n              if (insertionIndex === -1) {\n                insertionIndex = start;\n              }\n              events.splice(insertionIndex, 0, event);\n            }\n            const isSync = event.timestamp < baselineTime;\n            const castFn = getCastFn(event, isSync);\n            if (isSync) {\n              castFn();\n            } else if (timer.isActive()) {\n              timer.addAction({\n                doAction: () => {\n                  castFn();\n                },\n                delay: event.delay\n              });\n            }\n          }\n          return { ...ctx, events };\n        })\n      }\n    }\n  );\n  return v(playerMachine);\n}\nfunction createSpeedService(context) {\n  const speedMachine = s(\n    {\n      id: \"speed\",\n      context,\n      initial: \"normal\",\n      states: {\n        normal: {\n          on: {\n            FAST_FORWARD: {\n              target: \"skipping\",\n              actions: [\"recordSpeed\", \"setSpeed\"]\n            },\n            SET_SPEED: {\n              target: \"normal\",\n              actions: [\"setSpeed\"]\n            }\n          }\n        },\n        skipping: {\n          on: {\n            BACK_TO_NORMAL: {\n              target: \"normal\",\n              actions: [\"restoreSpeed\"]\n            },\n            SET_SPEED: {\n              target: \"normal\",\n              actions: [\"setSpeed\"]\n            }\n          }\n        }\n      }\n    },\n    {\n      actions: {\n        setSpeed: (ctx, event) => {\n          if (\"payload\" in event) {\n            ctx.timer.setSpeed(event.payload.speed);\n          }\n        },\n        recordSpeed: o({\n          normalSpeed: (ctx) => ctx.timer.speed\n        }),\n        restoreSpeed: (ctx) => {\n          ctx.timer.setSpeed(ctx.normalSpeed);\n        }\n      }\n    }\n  );\n  return v(speedMachine);\n}\nconst rules = (blockClass) => [\n  `.${blockClass} { background: currentColor }`,\n  \"noscript { display: none !important; }\"\n];\nconst webGLVarMap = /* @__PURE__ */ new Map();\nfunction variableListFor(ctx, ctor) {\n  let contextMap = webGLVarMap.get(ctx);\n  if (!contextMap) {\n    contextMap = /* @__PURE__ */ new Map();\n    webGLVarMap.set(ctx, contextMap);\n  }\n  if (!contextMap.has(ctor)) {\n    contextMap.set(ctor, []);\n  }\n  return contextMap.get(ctor);\n}\nfunction deserializeArg(imageMap, ctx, preload) {\n  return async (arg) => {\n    if (arg && typeof arg === \"object\" && \"rr_type\" in arg) {\n      if (preload) preload.isUnchanged = false;\n      if (arg.rr_type === \"ImageBitmap\" && \"args\" in arg) {\n        const args = await deserializeArg(imageMap, ctx, preload)(arg.args);\n        return await createImageBitmap.apply(null, args);\n      } else if (\"index\" in arg) {\n        if (preload || ctx === null) return arg;\n        const { rr_type: name, index } = arg;\n        return variableListFor(ctx, name)[index];\n      } else if (\"args\" in arg) {\n        const { rr_type: name, args } = arg;\n        const ctor = window[name];\n        return new ctor(\n          ...await Promise.all(\n            args.map(deserializeArg(imageMap, ctx, preload))\n          )\n        );\n      } else if (\"base64\" in arg) {\n        return decode(arg.base64);\n      } else if (\"src\" in arg) {\n        const image = imageMap.get(arg.src);\n        if (image) {\n          return image;\n        } else {\n          const image2 = new Image();\n          image2.src = arg.src;\n          imageMap.set(arg.src, image2);\n          return image2;\n        }\n      } else if (\"data\" in arg && arg.rr_type === \"Blob\") {\n        const blobContents = await Promise.all(\n          arg.data.map(deserializeArg(imageMap, ctx, preload))\n        );\n        const blob = new Blob(blobContents, {\n          type: arg.type\n        });\n        return blob;\n      }\n    } else if (Array.isArray(arg)) {\n      const result = await Promise.all(\n        arg.map(deserializeArg(imageMap, ctx, preload))\n      );\n      return result;\n    }\n    return arg;\n  };\n}\nfunction getContext(target, type) {\n  try {\n    if (type === CanvasContext.WebGL) {\n      return target.getContext(\"webgl\") || target.getContext(\"experimental-webgl\");\n    }\n    return target.getContext(\"webgl2\");\n  } catch (e2) {\n    return null;\n  }\n}\nconst WebGLVariableConstructorsNames = [\n  \"WebGLActiveInfo\",\n  \"WebGLBuffer\",\n  \"WebGLFramebuffer\",\n  \"WebGLProgram\",\n  \"WebGLRenderbuffer\",\n  \"WebGLShader\",\n  \"WebGLShaderPrecisionFormat\",\n  \"WebGLTexture\",\n  \"WebGLUniformLocation\",\n  \"WebGLVertexArrayObject\"\n];\nfunction saveToWebGLVarMap(ctx, result) {\n  if (!result?.constructor) return;\n  const { name } = result.constructor;\n  if (!WebGLVariableConstructorsNames.includes(name)) return;\n  const variables = variableListFor(ctx, name);\n  if (!variables.includes(result)) variables.push(result);\n}\nasync function webglMutation({\n  mutation,\n  target,\n  type,\n  imageMap,\n  errorHandler\n}) {\n  try {\n    const ctx = getContext(target, type);\n    if (!ctx) return;\n    if (mutation.setter) {\n      ctx[mutation.property] = mutation.args[0];\n      return;\n    }\n    const original = ctx[mutation.property];\n    const args = await Promise.all(\n      mutation.args.map(deserializeArg(imageMap, ctx))\n    );\n    const result = original.apply(ctx, args);\n    saveToWebGLVarMap(ctx, result);\n    const debugMode = false;\n    if (debugMode) ;\n  } catch (error) {\n    errorHandler(mutation, error);\n  }\n}\nasync function canvasMutation$1({\n  event,\n  mutations,\n  target,\n  imageMap,\n  errorHandler\n}) {\n  const ctx = target.getContext(\"2d\");\n  if (!ctx) {\n    errorHandler(mutations[0], new Error(\"Canvas context is null\"));\n    return;\n  }\n  const mutationArgsPromises = mutations.map(\n    async (mutation) => {\n      return Promise.all(mutation.args.map(deserializeArg(imageMap, ctx)));\n    }\n  );\n  const args = await Promise.all(mutationArgsPromises);\n  args.forEach((args2, index) => {\n    const mutation = mutations[index];\n    try {\n      if (mutation.setter) {\n        ctx[mutation.property] = mutation.args[0];\n        return;\n      }\n      const original = ctx[mutation.property];\n      if (mutation.property === \"drawImage\" && typeof mutation.args[0] === \"string\") {\n        imageMap.get(event);\n        original.apply(ctx, mutation.args);\n      } else {\n        original.apply(ctx, args2);\n      }\n    } catch (error) {\n      errorHandler(mutation, error);\n    }\n    return;\n  });\n}\nasync function canvasMutation({\n  event,\n  mutation,\n  target,\n  imageMap,\n  canvasEventMap,\n  errorHandler\n}) {\n  try {\n    const precomputedMutation = canvasEventMap.get(event) || mutation;\n    const commands = \"commands\" in precomputedMutation ? precomputedMutation.commands : [precomputedMutation];\n    if ([CanvasContext.WebGL, CanvasContext.WebGL2].includes(mutation.type)) {\n      for (let i2 = 0; i2 < commands.length; i2++) {\n        const command = commands[i2];\n        await webglMutation({\n          mutation: command,\n          type: mutation.type,\n          target,\n          imageMap,\n          errorHandler\n        });\n      }\n      return;\n    }\n    await canvasMutation$1({\n      event,\n      mutations: commands,\n      target,\n      imageMap,\n      errorHandler\n    });\n  } catch (error) {\n    errorHandler(mutation, error);\n  }\n}\nconst SKIP_TIME_INTERVAL = 5 * 1e3;\nconst mitt = mitt$1 || mittProxy;\nconst REPLAY_CONSOLE_PREFIX = \"[replayer]\";\nfunction getEventIndex(events, eventTime) {\n  let result = -1;\n  if (events.length === 0) {\n    return result;\n  }\n  let left = 0, right = events.length - 1;\n  while (left <= right) {\n    const mid = Math.floor((left + right) / 2);\n    if (events[mid].timestamp <= eventTime) {\n      result = mid;\n      left = mid + 1;\n    } else {\n      right = mid - 1;\n    }\n  }\n  return result;\n}\nconst defaultMouseTailConfig = {\n  duration: 500,\n  lineCap: \"round\",\n  lineWidth: 3,\n  strokeStyle: \"red\"\n};\nfunction indicatesTouchDevice(e2) {\n  return e2.type == EventType.IncrementalSnapshot && (e2.data.source == IncrementalSource.TouchMove || e2.data.source == IncrementalSource.MouseInteraction && e2.data.type == MouseInteractions.TouchStart);\n}\nfunction getPointerId(d) {\n  const pointerId = \"pointerId\" in d && typeof d.pointerId === \"number\" ? d.pointerId : -1;\n  return pointerId;\n}\nclass Replayer {\n  constructor(events, config) {\n    this.usingVirtualDom = false;\n    this.virtualDom = new RRDocument();\n    this.emitter = mitt();\n    this.legacy_missingNodeRetryMap = {};\n    this.cache = createCache();\n    this.imageMap = /* @__PURE__ */ new Map();\n    this.canvasEventMap = /* @__PURE__ */ new Map();\n    this.mirror = createMirror$2();\n    this.styleMirror = new StyleSheetMirror();\n    this.firstFullSnapshot = null;\n    this.newDocumentQueue = [];\n    this.pointers = {};\n    this.lastMouseDownEvent = null;\n    this.lastSelectionData = null;\n    this.constructedStyleMutations = [];\n    this.adoptedStyleSheets = [];\n    this.handleResize = (dimension) => {\n      this.iframe.style.display = \"inherit\";\n      for (const el of [\n        ...Object.values(this.pointers).flatMap((a2) => a2.mouseTail),\n        this.iframe\n      ]) {\n        if (!el) {\n          continue;\n        }\n        el.setAttribute(\"width\", String(dimension.width));\n        el.setAttribute(\"height\", String(dimension.height));\n      }\n    };\n    this.applyEventsSynchronously = (events2) => {\n      for (const event of events2) {\n        switch (event.type) {\n          case EventType.DomContentLoaded:\n          case EventType.Load:\n          case EventType.Custom:\n            continue;\n          case EventType.FullSnapshot:\n          case EventType.Meta:\n          case EventType.Plugin:\n          case EventType.IncrementalSnapshot:\n            break;\n        }\n        const castFn = this.getCastFn(event, true);\n        castFn();\n      }\n    };\n    this.getCastFn = (event, isSync = false) => {\n      let castFn;\n      switch (event.type) {\n        case EventType.DomContentLoaded:\n        case EventType.Load:\n          break;\n        case EventType.Custom:\n          castFn = () => {\n            this.emitter.emit(ReplayerEvents.CustomEvent, event);\n          };\n          break;\n        case EventType.Meta:\n          castFn = () => this.emitter.emit(ReplayerEvents.Resize, {\n            width: event.data.width,\n            height: event.data.height\n          });\n          break;\n        case EventType.FullSnapshot:\n          castFn = () => {\n            if (this.firstFullSnapshot) {\n              if (this.firstFullSnapshot === event) {\n                this.firstFullSnapshot = true;\n                return;\n              }\n            } else {\n              this.firstFullSnapshot = true;\n            }\n            this.rebuildFullSnapshot(event, isSync);\n            this.iframe.contentWindow?.scrollTo(event.data.initialOffset);\n            this.styleMirror.reset();\n          };\n          break;\n        case EventType.IncrementalSnapshot:\n          castFn = () => {\n            this.applyIncremental(event, isSync);\n            if (isSync) {\n              return;\n            }\n            if (event === this.nextUserInteractionEvent) {\n              this.nextUserInteractionEvent = null;\n              this.backToNormal();\n            }\n            if (this.config.skipInactive && !this.nextUserInteractionEvent) {\n              for (const _event of this.service.state.context.events) {\n                if (_event.timestamp <= event.timestamp) {\n                  continue;\n                }\n                if (this.isUserInteraction(_event)) {\n                  if (\n                    // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n                    _event.delay - event.delay > this.config.inactivePeriodThreshold * this.speedService.state.context.timer.speed\n                  ) {\n                    this.nextUserInteractionEvent = _event;\n                  }\n                  break;\n                }\n              }\n              if (this.nextUserInteractionEvent) {\n                const skipTime = (\n                  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n                  this.nextUserInteractionEvent.delay - event.delay\n                );\n                const payload = {\n                  speed: Math.min(\n                    Math.round(skipTime / SKIP_TIME_INTERVAL),\n                    this.config.maxSpeed\n                  )\n                };\n                this.speedService.send({ type: \"FAST_FORWARD\", payload });\n                this.emitter.emit(ReplayerEvents.SkipStart, payload);\n              }\n            }\n          };\n          break;\n      }\n      const wrappedCastFn = () => {\n        if (castFn) {\n          castFn();\n        }\n        for (const plugin of this.config.plugins || []) {\n          if (plugin.handler) plugin.handler(event, isSync, { replayer: this });\n        }\n        this.service.send({ type: \"CAST_EVENT\", payload: { event } });\n        const last_index = this.service.state.context.events.length - 1;\n        if (!this.config.liveMode && event === this.service.state.context.events[last_index]) {\n          const finish = () => {\n            if (last_index < this.service.state.context.events.length - 1) {\n              return;\n            }\n            this.backToNormal();\n            this.service.send(\"END\");\n            this.emitter.emit(ReplayerEvents.Finish);\n          };\n          let finish_buffer = 50;\n          if (event.type === EventType.IncrementalSnapshot && event.data.source === IncrementalSource.MouseMove && event.data.positions.length) {\n            finish_buffer += Math.max(0, -event.data.positions[0].timeOffset);\n          }\n          setTimeout$1(finish, finish_buffer);\n        }\n        this.emitter.emit(ReplayerEvents.EventCast, event);\n      };\n      return wrappedCastFn;\n    };\n    if (!config?.liveMode && events.length < 2) {\n      throw new Error(\"Replayer need at least 2 events.\");\n    }\n    const defaultConfig = {\n      speed: 1,\n      maxSpeed: 360,\n      root: document.body,\n      loadTimeout: 0,\n      skipInactive: false,\n      inactivePeriodThreshold: 10 * 1e3,\n      showWarning: true,\n      showDebug: false,\n      blockClass: \"rr-block\",\n      liveMode: false,\n      insertStyleRules: [],\n      triggerFocus: true,\n      UNSAFE_replayCanvas: false,\n      pauseAnimation: true,\n      mouseTail: defaultMouseTailConfig,\n      useVirtualDom: true,\n      // Virtual-dom optimization is enabled by default.\n      logger: console\n    };\n    this.config = Object.assign({}, defaultConfig, config);\n    this.handleResize = this.handleResize.bind(this);\n    this.getCastFn = this.getCastFn.bind(this);\n    this.applyEventsSynchronously = this.applyEventsSynchronously.bind(this);\n    this.emitter.on(ReplayerEvents.Resize, this.handleResize);\n    this.setupDom();\n    for (const plugin of this.config.plugins || []) {\n      if (plugin.getMirror) plugin.getMirror({ nodeMirror: this.mirror });\n    }\n    this.emitter.on(ReplayerEvents.Flush, () => {\n      if (this.usingVirtualDom) {\n        const replayerHandler = {\n          mirror: this.mirror,\n          applyCanvas: (canvasEvent, canvasMutationData2, target) => {\n            void canvasMutation({\n              event: canvasEvent,\n              mutation: canvasMutationData2,\n              target,\n              imageMap: this.imageMap,\n              canvasEventMap: this.canvasEventMap,\n              errorHandler: this.warnCanvasMutationFailed.bind(this)\n            });\n          },\n          applyInput: this.applyInput.bind(this),\n          applyScroll: this.applyScroll.bind(this),\n          applyStyleSheetMutation: (data, styleSheet) => {\n            if (data.source === IncrementalSource.StyleSheetRule)\n              this.applyStyleSheetRule(data, styleSheet);\n            else if (data.source === IncrementalSource.StyleDeclaration)\n              this.applyStyleDeclaration(data, styleSheet);\n          },\n          afterAppend: (node, id) => {\n            for (const plugin of this.config.plugins || []) {\n              if (plugin.onBuild) plugin.onBuild(node, { id, replayer: this });\n            }\n          }\n        };\n        const iframeDoc = getIFrameContentDocument(this.iframe);\n        if (iframeDoc)\n          try {\n            diff(\n              iframeDoc,\n              this.virtualDom,\n              replayerHandler,\n              this.virtualDom.mirror\n            );\n          } catch (e2) {\n            console.warn(e2);\n          }\n        this.virtualDom.destroyTree();\n        this.usingVirtualDom = false;\n        if (Object.keys(this.legacy_missingNodeRetryMap).length) {\n          for (const key in this.legacy_missingNodeRetryMap) {\n            try {\n              const value = this.legacy_missingNodeRetryMap[key];\n              const realNode = createOrGetNode(\n                value.node,\n                this.mirror,\n                this.virtualDom.mirror\n              );\n              diff(\n                realNode,\n                value.node,\n                replayerHandler,\n                this.virtualDom.mirror\n              );\n              value.node = realNode;\n            } catch (error) {\n              this.warn(error);\n            }\n          }\n        }\n        this.constructedStyleMutations.forEach((data) => {\n          this.applyStyleSheetMutation(data);\n        });\n        this.constructedStyleMutations = [];\n        this.adoptedStyleSheets.forEach((data) => {\n          this.applyAdoptedStyleSheet(data);\n        });\n        this.adoptedStyleSheets = [];\n      }\n      for (const [\n        pointerId,\n        { pointerPosition, touchActive }\n      ] of Object.entries(this.pointers)) {\n        const id = parseInt(pointerId);\n        const pointer = this.pointers[id];\n        if (pointerPosition) {\n          this.moveAndHover(\n            pointerPosition.x,\n            pointerPosition.y,\n            pointerPosition.id,\n            true,\n            pointerPosition.debugData,\n            id\n          );\n          pointer.pointerPosition = null;\n        }\n        if (touchActive === true) {\n          pointer.pointerEl.classList.add(\"touch-active\");\n        } else if (touchActive === false) {\n          pointer.pointerEl.classList.remove(\"touch-active\");\n        }\n        pointer.touchActive = null;\n      }\n      if (this.lastMouseDownEvent) {\n        const [target, event] = this.lastMouseDownEvent;\n        target.dispatchEvent(event);\n      }\n      this.lastMouseDownEvent = null;\n      if (this.lastSelectionData) {\n        this.applySelection(this.lastSelectionData);\n        this.lastSelectionData = null;\n      }\n    });\n    this.emitter.on(ReplayerEvents.PlayBack, () => {\n      this.firstFullSnapshot = null;\n      this.mirror.reset();\n      this.styleMirror.reset();\n    });\n    const timer = new Timer([], {\n      speed: this.config.speed\n    });\n    this.service = createPlayerService(\n      {\n        events: events.map((e2) => {\n          if (config && config.unpackFn) {\n            return config.unpackFn(e2);\n          }\n          return e2;\n        }).sort((a1, a2) => a1.timestamp - a2.timestamp),\n        timer,\n        timeOffset: 0,\n        baselineTime: 0,\n        lastPlayedEvent: null\n      },\n      {\n        getCastFn: this.getCastFn,\n        applyEventsSynchronously: this.applyEventsSynchronously,\n        emitter: this.emitter\n      }\n    );\n    this.service.start();\n    this.service.subscribe((state) => {\n      this.emitter.emit(ReplayerEvents.StateChange, {\n        player: state\n      });\n    });\n    this.speedService = createSpeedService({\n      normalSpeed: -1,\n      timer\n    });\n    this.speedService.start();\n    this.speedService.subscribe((state) => {\n      this.emitter.emit(ReplayerEvents.StateChange, {\n        speed: state\n      });\n    });\n    const firstMeta = this.service.state.context.events.find(\n      (e2) => e2.type === EventType.Meta\n    );\n    const firstFullsnapshot = this.service.state.context.events.find(\n      (e2) => e2.type === EventType.FullSnapshot\n    );\n    if (firstMeta) {\n      const { width, height } = firstMeta.data;\n      setTimeout$1(() => {\n        this.emitter.emit(ReplayerEvents.Resize, {\n          width,\n          height\n        });\n      }, 0);\n    }\n    if (firstFullsnapshot) {\n      setTimeout$1(() => {\n        if (this.firstFullSnapshot) {\n          return;\n        }\n        this.firstFullSnapshot = firstFullsnapshot;\n        this.rebuildFullSnapshot(\n          firstFullsnapshot\n        );\n        this.iframe.contentWindow?.scrollTo(\n          firstFullsnapshot.data.initialOffset\n        );\n      }, 1);\n    }\n  }\n  get timer() {\n    return this.service.state.context.timer;\n  }\n  createPointer(pointerId, event) {\n    const mouseTail = document.createElement(\"canvas\");\n    mouseTail.classList.add(\"replayer-mouse-tail\");\n    mouseTail.width = Number.parseFloat(this.iframe.width);\n    mouseTail.height = Number.parseFloat(this.iframe.height);\n    this.wrapper.insertBefore(mouseTail, this.iframe);\n    mouseTail.style.display = this.config.mouseTail === false ? \"none\" : \"inherit\";\n    const newMouse = document.createElement(\"div\");\n    newMouse.classList.add(\"replayer-mouse\");\n    this.pointers[pointerId] = {\n      touchActive: null,\n      pointerEl: newMouse,\n      tailPositions: [],\n      pointerPosition: null,\n      mouseTail\n    };\n    if (indicatesTouchDevice(event)) {\n      newMouse.classList.add(\"touch-device\");\n    }\n    this.wrapper.appendChild(newMouse);\n  }\n  on(event, handler) {\n    this.emitter.on(event, handler);\n    return this;\n  }\n  off(event, handler) {\n    this.emitter.off(event, handler);\n    return this;\n  }\n  setConfig(config) {\n    const previousSkipInactive = this.config.skipInactive;\n    Object.keys(config).forEach((key) => {\n      config[key];\n      this.config[key] = config[key];\n    });\n    if (!this.config.skipInactive) {\n      this.backToNormal();\n    } else if (previousSkipInactive === false && this.config.skipInactive === true) {\n      this.reevaluateFastForward();\n    }\n    if (typeof config.speed !== \"undefined\") {\n      this.speedService.send({\n        type: \"SET_SPEED\",\n        payload: {\n          speed: config.speed\n        }\n      });\n    }\n    if (typeof config.mouseTail !== \"undefined\") {\n      if (config.mouseTail === false) {\n        for (const { mouseTail } of Object.values(this.pointers)) {\n          if (mouseTail) {\n            mouseTail.style.display = \"none\";\n          }\n        }\n      } else {\n        for (let { mouseTail } of Object.values(this.pointers)) {\n          if (!mouseTail) {\n            mouseTail = document.createElement(\"canvas\");\n            mouseTail.width = Number.parseFloat(this.iframe.width);\n            mouseTail.height = Number.parseFloat(this.iframe.height);\n            mouseTail.classList.add(\"replayer-mouse-tail\");\n            this.wrapper.insertBefore(mouseTail, this.iframe);\n          }\n          mouseTail.style.display = \"inherit\";\n        }\n      }\n    }\n  }\n  getMetaData() {\n    const firstEvent = this.service.state.context.events[0];\n    const lastEvent = this.service.state.context.events[this.service.state.context.events.length - 1];\n    return {\n      startTime: firstEvent.timestamp,\n      endTime: lastEvent.timestamp,\n      totalTime: lastEvent.timestamp - firstEvent.timestamp\n    };\n  }\n  getCurrentTime() {\n    return this.timer.timeOffset + this.getTimeOffset();\n  }\n  getTimeOffset() {\n    const { baselineTime, events } = this.service.state.context;\n    return baselineTime - events[0].timestamp;\n  }\n  getMirror() {\n    return this.mirror;\n  }\n  /**\n   * This API was designed to be used as play at any time offset.\n   * Since we minimized the data collected from recorder, we do not\n   * have the ability of undo an event.\n   * So the implementation of play at any time offset will always iterate\n   * all of the events, cast event before the offset synchronously\n   * and cast event after the offset asynchronously with timer.\n   * @param timeOffset - number\n   */\n  play(timeOffset = 0) {\n    if (this.config.skipInactive && this.speedService.state.matches(\"skipping\")) {\n      this.backToNormal();\n    }\n    if (this.service.state.matches(\"paused\")) {\n      this.service.send({ type: \"PLAY\", payload: { timeOffset } });\n    } else {\n      this.service.send({ type: \"PAUSE\" });\n      this.service.send({ type: \"PLAY\", payload: { timeOffset } });\n    }\n    const iframeDoc = getIFrameContentDocument(this.iframe);\n    iframeDoc?.getElementsByTagName(\"html\")[0]?.classList.remove(\"rrweb-paused\");\n    this.emitter.emit(ReplayerEvents.Start);\n    if (this.config.skipInactive) {\n      this.reevaluateFastForward();\n    }\n  }\n  pause(timeOffset) {\n    if (timeOffset === void 0 && this.service.state.matches(\"playing\")) {\n      this.service.send({ type: \"PAUSE\" });\n    }\n    if (typeof timeOffset === \"number\") {\n      this.play(timeOffset);\n      this.service.send({ type: \"PAUSE\" });\n    }\n    const iframeDoc = getIFrameContentDocument(this.iframe);\n    iframeDoc?.getElementsByTagName(\"html\")[0]?.classList.add(\"rrweb-paused\");\n    this.emitter.emit(ReplayerEvents.Pause);\n  }\n  resume(timeOffset = 0) {\n    this.warn(\n      `The 'resume' was deprecated in 1.0. Please use 'play' method which has the same interface.`\n    );\n    this.play(timeOffset);\n    this.emitter.emit(ReplayerEvents.Resume);\n  }\n  /**\n   * Totally destroy this replayer and please be careful that this operation is irreversible.\n   * Memory occupation can be released by removing all references to this replayer.\n   */\n  destroy() {\n    this.pause();\n    this.config.root.removeChild(this.wrapper);\n    this.emitter.emit(ReplayerEvents.Destroy);\n  }\n  startLive(baselineTime) {\n    this.service.send({ type: \"TO_LIVE\", payload: { baselineTime } });\n  }\n  addEvent(rawEvent) {\n    const event = this.config.unpackFn ? this.config.unpackFn(rawEvent) : rawEvent;\n    void Promise.resolve().then(\n      () => this.service.send({ type: \"ADD_EVENT\", payload: { event } })\n    );\n  }\n  enableInteract() {\n    this.iframe.setAttribute(\"scrolling\", \"auto\");\n    this.iframe.style.pointerEvents = \"auto\";\n  }\n  disableInteract() {\n    this.iframe.setAttribute(\"scrolling\", \"no\");\n    this.iframe.style.pointerEvents = \"none\";\n  }\n  /**\n   * Empties the replayer's cache and reclaims memory.\n   * The replayer will use this cache to speed up the playback.\n   */\n  resetCache() {\n    this.cache = createCache();\n  }\n  reevaluateFastForward() {\n    if (!this.config.skipInactive) {\n      return;\n    }\n    this.nextUserInteractionEvent = null;\n    const events = this.service.state.context.events;\n    const firstEvent = events[0];\n    if (!firstEvent) {\n      return;\n    }\n    const currentEventTime = firstEvent.timestamp + this.getCurrentTime();\n    const currentEventIndex = getEventIndex(events, currentEventTime);\n    if (currentEventIndex === -1) {\n      return;\n    }\n    const currentEvent = events[currentEventIndex];\n    const threshold = this.config.inactivePeriodThreshold * this.speedService.state.context.timer.speed;\n    for (let i2 = currentEventIndex + 1; i2 < events.length; i2++) {\n      const event = events[i2];\n      if (this.isUserInteraction(event)) {\n        const gapTime = event.timestamp - currentEvent.timestamp;\n        if (gapTime > threshold) {\n          this.nextUserInteractionEvent = event;\n          const payload = {\n            speed: Math.min(\n              Math.round(gapTime / SKIP_TIME_INTERVAL),\n              this.config.maxSpeed\n            )\n          };\n          this.speedService.send({ type: \"FAST_FORWARD\", payload });\n          this.emitter.emit(ReplayerEvents.SkipStart, payload);\n        }\n        break;\n      }\n    }\n  }\n  setupDom() {\n    this.wrapper = document.createElement(\"div\");\n    this.wrapper.classList.add(\"replayer-wrapper\");\n    this.config.root.appendChild(this.wrapper);\n    this.iframe = document.createElement(\"iframe\");\n    const attributes2 = [\"allow-same-origin\"];\n    if (this.config.UNSAFE_replayCanvas) {\n      attributes2.push(\"allow-scripts\");\n    }\n    this.iframe.style.display = \"none\";\n    this.iframe.setAttribute(\"sandbox\", attributes2.join(\" \"));\n    this.disableInteract();\n    this.wrapper.appendChild(this.iframe);\n    const iframeDoc = getIFrameContentDocument(this.iframe);\n    const iframeWindow = getIFrameContentWindow(this.iframe);\n    if (iframeWindow && iframeDoc) {\n      polyfill(iframeWindow, iframeDoc);\n      polyfill$1(iframeWindow);\n    }\n  }\n  rebuildFullSnapshot(event, isSync = false) {\n    const iframeDoc = getIFrameContentDocument(this.iframe);\n    if (!iframeDoc) {\n      return this.warn(\"Looks like your replayer has been destroyed.\");\n    }\n    if (Object.keys(this.legacy_missingNodeRetryMap).length) {\n      this.warn(\n        \"Found unresolved missing node map\",\n        this.legacy_missingNodeRetryMap\n      );\n    }\n    this.legacy_missingNodeRetryMap = {};\n    const collected = [];\n    const afterAppend = (builtNode, id) => {\n      this.collectIframeAndAttachDocument(collected, builtNode);\n      for (const plugin of this.config.plugins || []) {\n        if (plugin.onBuild)\n          plugin.onBuild(builtNode, {\n            id,\n            replayer: this\n          });\n      }\n    };\n    if (this.usingVirtualDom) {\n      this.virtualDom.destroyTree();\n      this.usingVirtualDom = false;\n    }\n    this.mirror.reset();\n    rebuild(event.data.node, {\n      doc: iframeDoc,\n      afterAppend,\n      cache: this.cache,\n      mirror: this.mirror\n    });\n    afterAppend(iframeDoc, event.data.node.id);\n    for (const { mutationInQueue, builtNode } of collected) {\n      this.attachDocumentToIframe(mutationInQueue, builtNode);\n      this.newDocumentQueue = this.newDocumentQueue.filter(\n        (m) => m !== mutationInQueue\n      );\n    }\n    const { documentElement, head } = iframeDoc;\n    this.insertStyleRules(documentElement, head);\n    if (!this.service.state.matches(\"playing\")) {\n      const iframeHtmlElement = iframeDoc.getElementsByTagName(\"html\")[0];\n      iframeHtmlElement && iframeHtmlElement.classList.add(\"rrweb-paused\");\n    }\n    this.emitter.emit(ReplayerEvents.FullsnapshotRebuilded, event);\n    if (!isSync) {\n      this.waitForStylesheetLoad();\n    }\n    if (this.config.UNSAFE_replayCanvas) {\n      void this.preloadAllImages();\n    }\n  }\n  insertStyleRules(documentElement, head) {\n    const injectStylesRules = rules(\n      this.config.blockClass\n    ).concat(this.config.insertStyleRules);\n    if (this.config.pauseAnimation) {\n      injectStylesRules.push(\n        \"html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }\"\n      );\n    }\n    if (this.usingVirtualDom) {\n      const styleEl = this.virtualDom.createElement(\"style\");\n      this.virtualDom.mirror.add(\n        styleEl,\n        getDefaultSN(styleEl, this.virtualDom.unserializedId)\n      );\n      documentElement.insertBefore(styleEl, head);\n      styleEl.rules.push({\n        source: IncrementalSource.StyleSheetRule,\n        adds: injectStylesRules.map((cssText, index) => ({\n          rule: cssText,\n          index\n        }))\n      });\n    } else {\n      const styleEl = document.createElement(\"style\");\n      documentElement.insertBefore(\n        styleEl,\n        head\n      );\n      for (let idx = 0; idx < injectStylesRules.length; idx++) {\n        styleEl.sheet?.insertRule(injectStylesRules[idx], idx);\n      }\n    }\n  }\n  attachDocumentToIframe(mutation, iframeEl) {\n    const mirror2 = this.usingVirtualDom ? this.virtualDom.mirror : this.mirror;\n    const iframeContentDoc = getIFrameContentDocument(\n      iframeEl\n    );\n    const collected = [];\n    const afterAppend = (builtNode, id) => {\n      this.collectIframeAndAttachDocument(collected, builtNode);\n      const sn = mirror2.getMeta(builtNode);\n      if (sn?.type === NodeType$2.Element && sn?.tagName.toUpperCase() === \"HTML\" && iframeContentDoc) {\n        const { documentElement, head } = iframeContentDoc;\n        this.insertStyleRules(\n          documentElement,\n          head\n        );\n      }\n      if (this.usingVirtualDom) return;\n      for (const plugin of this.config.plugins || []) {\n        if (plugin.onBuild)\n          plugin.onBuild(builtNode, {\n            id,\n            replayer: this\n          });\n      }\n    };\n    buildNodeWithSN(mutation.node, {\n      doc: iframeContentDoc,\n      mirror: mirror2,\n      hackCss: true,\n      skipChild: false,\n      afterAppend,\n      cache: this.cache\n    });\n    afterAppend(iframeContentDoc, mutation.node.id);\n    for (const { mutationInQueue, builtNode } of collected) {\n      this.attachDocumentToIframe(mutationInQueue, builtNode);\n      this.newDocumentQueue = this.newDocumentQueue.filter(\n        (m) => m !== mutationInQueue\n      );\n    }\n  }\n  collectIframeAndAttachDocument(collected, builtNode) {\n    if (isSerializedIframe(builtNode, this.mirror)) {\n      const mutationInQueue = this.newDocumentQueue.find(\n        (m) => m.parentId === this.mirror.getId(builtNode)\n      );\n      if (mutationInQueue) {\n        collected.push({\n          mutationInQueue,\n          builtNode\n        });\n      }\n    }\n  }\n  /**\n   * pause when loading style sheet, resume when loaded all timeout exceed\n   */\n  waitForStylesheetLoad() {\n    const iframeDoc = getIFrameContentDocument(this.iframe);\n    const head = iframeDoc?.head;\n    if (head) {\n      const unloadSheets = /* @__PURE__ */ new Set();\n      let timer;\n      let beforeLoadState = this.service.state;\n      const stateHandler = () => {\n        beforeLoadState = this.service.state;\n      };\n      this.emitter.on(ReplayerEvents.Start, stateHandler);\n      this.emitter.on(ReplayerEvents.Pause, stateHandler);\n      const unsubscribe = () => {\n        this.emitter.off(ReplayerEvents.Start, stateHandler);\n        this.emitter.off(ReplayerEvents.Pause, stateHandler);\n      };\n      head.querySelectorAll('link[rel=\"stylesheet\"]').forEach((css) => {\n        if (!css.sheet) {\n          unloadSheets.add(css);\n          css.addEventListener(\"load\", () => {\n            unloadSheets.delete(css);\n            if (unloadSheets.size === 0 && timer !== -1) {\n              if (beforeLoadState.matches(\"playing\")) {\n                this.play(this.getCurrentTime());\n              }\n              this.emitter.emit(ReplayerEvents.LoadStylesheetEnd);\n              if (timer) {\n                clearTimeout(timer);\n              }\n              unsubscribe();\n            }\n          });\n        }\n      });\n      if (unloadSheets.size > 0) {\n        this.service.send({ type: \"PAUSE\" });\n        this.emitter.emit(ReplayerEvents.LoadStylesheetStart);\n        timer = setTimeout$1(() => {\n          if (beforeLoadState.matches(\"playing\")) {\n            this.play(this.getCurrentTime());\n          }\n          timer = -1;\n          unsubscribe();\n        }, this.config.loadTimeout);\n      }\n    }\n  }\n  /**\n   * pause when there are some canvas drawImage args need to be loaded\n   */\n  async preloadAllImages() {\n    const promises = [];\n    for (const event of this.service.state.context.events) {\n      if (event.type === EventType.IncrementalSnapshot && event.data.source === IncrementalSource.CanvasMutation) {\n        promises.push(\n          this.deserializeAndPreloadCanvasEvents(event.data, event)\n        );\n        const commands = \"commands\" in event.data ? event.data.commands : [event.data];\n        commands.forEach((c2) => {\n          this.preloadImages(c2, event);\n        });\n      }\n    }\n    return Promise.all(promises);\n  }\n  preloadImages(data, event) {\n    if (data.property === \"drawImage\" && typeof data.args[0] === \"string\" && !this.imageMap.has(event)) {\n      const canvas = document.createElement(\"canvas\");\n      const ctx = canvas.getContext(\"2d\");\n      const imgd = ctx?.createImageData(canvas.width, canvas.height);\n      ctx?.putImageData(imgd, 0, 0);\n    }\n  }\n  async deserializeAndPreloadCanvasEvents(data, event) {\n    if (!this.canvasEventMap.has(event)) {\n      const status = {\n        isUnchanged: true\n      };\n      if (\"commands\" in data) {\n        const commands = await Promise.all(\n          data.commands.map(async (c2) => {\n            const args = await Promise.all(\n              c2.args.map(deserializeArg(this.imageMap, null, status))\n            );\n            return { ...c2, args };\n          })\n        );\n        if (status.isUnchanged === false)\n          this.canvasEventMap.set(event, { ...data, commands });\n      } else {\n        const args = await Promise.all(\n          data.args.map(deserializeArg(this.imageMap, null, status))\n        );\n        if (status.isUnchanged === false)\n          this.canvasEventMap.set(event, { ...data, args });\n      }\n    }\n  }\n  applyIncremental(e2, isSync) {\n    const { data: d } = e2;\n    switch (d.source) {\n      case IncrementalSource.Mutation: {\n        try {\n          this.applyMutation(d, isSync);\n        } catch (error) {\n          this.warn(`Exception in mutation ${error.message || error}`, d);\n        }\n        break;\n      }\n      case IncrementalSource.Drag:\n      case IncrementalSource.TouchMove:\n      case IncrementalSource.MouseMove: {\n        const pointerId = getPointerId(d);\n        if (!this.pointers[pointerId]) {\n          this.createPointer(pointerId, e2);\n        }\n        const pointer = this.pointers[pointerId];\n        if (isSync) {\n          const lastPosition = d.positions[d.positions.length - 1];\n          pointer.pointerPosition = {\n            x: lastPosition.x,\n            y: lastPosition.y,\n            id: lastPosition.id,\n            debugData: d\n          };\n        } else {\n          d.positions.forEach((p) => {\n            const action = {\n              doAction: () => {\n                this.moveAndHover(p.x, p.y, p.id, isSync, d, pointerId);\n              },\n              delay: p.timeOffset + e2.timestamp - this.service.state.context.baselineTime\n            };\n            this.timer.addAction(action);\n          });\n          this.timer.addAction({\n            doAction() {\n            },\n            // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n            delay: e2.delay - d.positions[0]?.timeOffset\n          });\n        }\n        break;\n      }\n      case IncrementalSource.MouseInteraction: {\n        const pointerId = getPointerId(d);\n        if (!this.pointers[pointerId]) {\n          this.createPointer(pointerId, e2);\n        }\n        const pointer = this.pointers[pointerId];\n        if (d.id === -1) {\n          break;\n        }\n        const event = new Event(toLowerCase(MouseInteractions[d.type]));\n        const target = this.mirror.getNode(d.id);\n        if (!target) {\n          return this.debugNodeNotFound(d, d.id);\n        }\n        this.emitter.emit(ReplayerEvents.MouseInteraction, {\n          type: d.type,\n          target\n        });\n        const { triggerFocus } = this.config;\n        switch (d.type) {\n          case MouseInteractions.Blur:\n            if (\"blur\" in target) {\n              target.blur();\n            }\n            break;\n          case MouseInteractions.Focus:\n            if (triggerFocus && target.focus) {\n              target.focus({\n                preventScroll: true\n              });\n            }\n            break;\n          case MouseInteractions.Click:\n          case MouseInteractions.TouchStart:\n          case MouseInteractions.TouchEnd:\n          case MouseInteractions.MouseDown:\n          case MouseInteractions.MouseUp:\n            if (isSync) {\n              if (d.type === MouseInteractions.TouchStart) {\n                pointer.touchActive = true;\n                Object.values(this.pointers).forEach((p) => {\n                  if (p !== pointer && !p.touchActive) {\n                    p.touchActive = false;\n                  }\n                });\n              } else if (d.type === MouseInteractions.TouchEnd) {\n                pointer.touchActive = false;\n                pointer.pointerEl.remove();\n                if (pointer.mouseTail) {\n                  pointer.mouseTail.remove();\n                }\n                delete this.pointers[pointerId];\n              }\n              if (d.type === MouseInteractions.MouseDown) {\n                this.lastMouseDownEvent = [target, event];\n              } else if (d.type === MouseInteractions.MouseUp) {\n                this.lastMouseDownEvent = null;\n              }\n              pointer.pointerPosition = {\n                x: d.x || 0,\n                y: d.y || 0,\n                id: d.id,\n                debugData: d\n              };\n            } else {\n              if (d.type === MouseInteractions.TouchStart) {\n                pointer.tailPositions.length = 0;\n              }\n              this.moveAndHover(d.x || 0, d.y || 0, d.id, isSync, d, pointerId);\n              if (d.type === MouseInteractions.Click) {\n                pointer.pointerEl.classList.remove(\"active\");\n                void pointer.pointerEl.offsetWidth;\n                pointer.pointerEl.classList.add(\"active\");\n              } else if (d.type === MouseInteractions.TouchStart) {\n                void pointer.pointerEl.offsetWidth;\n                pointer.pointerEl.classList.add(\"touch-active\");\n              } else if (d.type === MouseInteractions.TouchEnd) {\n                pointer.pointerEl.remove();\n                if (pointer.mouseTail) {\n                  pointer.mouseTail.remove();\n                }\n                delete this.pointers[pointerId];\n              } else {\n                target.dispatchEvent(event);\n              }\n            }\n            break;\n          case MouseInteractions.TouchCancel:\n            if (isSync) {\n              pointer.touchActive = false;\n            } else {\n              pointer.pointerEl.classList.remove(\"touch-active\");\n            }\n            break;\n          default:\n            target.dispatchEvent(event);\n        }\n        break;\n      }\n      case IncrementalSource.Scroll: {\n        if (d.id === -1) {\n          break;\n        }\n        if (this.usingVirtualDom) {\n          const target = this.virtualDom.mirror.getNode(d.id);\n          if (!target) {\n            return this.debugNodeNotFound(d, d.id);\n          }\n          target.scrollData = d;\n          break;\n        }\n        this.applyScroll(d, isSync);\n        break;\n      }\n      case IncrementalSource.ViewportResize:\n        this.emitter.emit(ReplayerEvents.Resize, {\n          width: d.width,\n          height: d.height\n        });\n        break;\n      case IncrementalSource.Input: {\n        if (d.id === -1) {\n          break;\n        }\n        if (this.usingVirtualDom) {\n          const target = this.virtualDom.mirror.getNode(d.id);\n          if (!target) {\n            return this.debugNodeNotFound(d, d.id);\n          }\n          target.inputData = d;\n          break;\n        }\n        this.applyInput(d);\n        break;\n      }\n      case IncrementalSource.MediaInteraction: {\n        const target = this.usingVirtualDom ? this.virtualDom.mirror.getNode(d.id) : this.mirror.getNode(d.id);\n        if (!target) {\n          return this.debugNodeNotFound(d, d.id);\n        }\n        const mediaEl = target;\n        try {\n          if (d.currentTime !== void 0) {\n            mediaEl.currentTime = d.currentTime;\n          }\n          if (d.volume !== void 0) {\n            mediaEl.volume = d.volume;\n          }\n          if (d.muted !== void 0) {\n            mediaEl.muted = d.muted;\n          }\n          if (d.type === MediaInteractions.Pause) {\n            mediaEl.pause();\n          }\n          if (d.type === MediaInteractions.Play) {\n            const maybePlayPromise = mediaEl.play();\n            if (typeof maybePlayPromise?.catch === \"function\") {\n              maybePlayPromise.catch((err) => {\n                console.warn(err);\n              });\n            }\n          }\n          if (d.type === MediaInteractions.RateChange) {\n            mediaEl.playbackRate = d.playbackRate;\n          }\n        } catch (error) {\n          this.warn(\n            // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/restrict-template-expressions\n            `Failed to replay media interactions: ${error.message || error}`\n          );\n        }\n        break;\n      }\n      case IncrementalSource.StyleSheetRule:\n      case IncrementalSource.StyleDeclaration: {\n        if (this.usingVirtualDom) {\n          if (d.styleId) this.constructedStyleMutations.push(d);\n          else if (d.id)\n            this.virtualDom.mirror.getNode(d.id)?.rules?.push(d);\n        } else this.applyStyleSheetMutation(d);\n        break;\n      }\n      case IncrementalSource.CanvasMutation: {\n        if (!this.config.UNSAFE_replayCanvas) {\n          return;\n        }\n        if (this.usingVirtualDom) {\n          const target = this.virtualDom.mirror.getNode(\n            d.id\n          );\n          if (!target) {\n            return this.debugNodeNotFound(d, d.id);\n          }\n          target.canvasMutations.push({\n            event: e2,\n            mutation: d\n          });\n        } else {\n          const target = this.mirror.getNode(d.id);\n          if (!target) {\n            return this.debugNodeNotFound(d, d.id);\n          }\n          void canvasMutation({\n            event: e2,\n            mutation: d,\n            target,\n            imageMap: this.imageMap,\n            canvasEventMap: this.canvasEventMap,\n            errorHandler: this.warnCanvasMutationFailed.bind(this)\n          });\n        }\n        break;\n      }\n      case IncrementalSource.Font: {\n        try {\n          const fontFace = new FontFace(\n            d.family,\n            d.buffer ? new Uint8Array(JSON.parse(d.fontSource)) : d.fontSource,\n            d.descriptors\n          );\n          getIFrameContentDocument(this.iframe)?.fonts.add(fontFace);\n        } catch (error) {\n          this.warn(error);\n        }\n        break;\n      }\n      case IncrementalSource.Selection: {\n        if (isSync) {\n          this.lastSelectionData = d;\n          break;\n        }\n        this.applySelection(d);\n        break;\n      }\n      case IncrementalSource.AdoptedStyleSheet: {\n        if (this.usingVirtualDom) this.adoptedStyleSheets.push(d);\n        else this.applyAdoptedStyleSheet(d);\n        break;\n      }\n    }\n  }\n  applyMutation(d, isSync) {\n    if (this.config.useVirtualDom && !this.usingVirtualDom && isSync) {\n      this.usingVirtualDom = true;\n      const iframeDoc = getIFrameContentDocument(this.iframe);\n      if (iframeDoc) {\n        buildFromDom(iframeDoc, this.mirror, this.virtualDom);\n      }\n      if (Object.keys(this.legacy_missingNodeRetryMap).length) {\n        for (const key in this.legacy_missingNodeRetryMap) {\n          try {\n            const value = this.legacy_missingNodeRetryMap[key];\n            const virtualNode = buildFromNode(\n              value.node,\n              this.virtualDom,\n              this.mirror\n            );\n            if (virtualNode) value.node = virtualNode;\n          } catch (error) {\n            this.warn(error);\n          }\n        }\n      }\n    }\n    const mirror2 = this.usingVirtualDom ? this.virtualDom.mirror : this.mirror;\n    d.removes = d.removes.filter((mutation) => {\n      if (!mirror2.getNode(mutation.id)) {\n        this.warnNodeNotFound(d, mutation.id);\n        return false;\n      }\n      return true;\n    });\n    d.removes.forEach((mutation) => {\n      const target = mirror2.getNode(mutation.id);\n      if (!target) {\n        return;\n      }\n      let parent = mirror2.getNode(\n        mutation.parentId\n      );\n      if (!parent) {\n        return this.warnNodeNotFound(d, mutation.parentId);\n      }\n      if (mutation.isShadow && hasShadowRoot(parent)) {\n        parent = parent.shadowRoot;\n      }\n      mirror2.removeNodeFromMap(target);\n      if (parent)\n        try {\n          parent.removeChild(target);\n          if (this.usingVirtualDom && target.nodeName === \"#text\" && parent.nodeName === \"STYLE\" && parent.rules?.length > 0)\n            parent.rules = [];\n        } catch (error) {\n          if (error instanceof DOMException) {\n            this.warn(\n              \"parent could not remove child in mutation\",\n              parent,\n              target,\n              d\n            );\n          } else {\n            throw error;\n          }\n        }\n    });\n    const legacy_missingNodeMap = {\n      ...this.legacy_missingNodeRetryMap\n    };\n    const queue = [];\n    const nextNotInDOM = (mutation) => {\n      let next = null;\n      if (mutation.nextId) {\n        next = mirror2.getNode(mutation.nextId);\n      }\n      if (mutation.nextId !== null && mutation.nextId !== void 0 && mutation.nextId !== -1 && !next) {\n        return true;\n      }\n      return false;\n    };\n    const appendNode = (mutation) => {\n      const iframeDoc = getIFrameContentDocument(this.iframe);\n      if (!iframeDoc) {\n        return this.warn(\"Looks like your replayer has been destroyed.\");\n      }\n      let parent = mirror2.getNode(\n        mutation.parentId\n      );\n      if (!parent) {\n        if (mutation.node.type === NodeType$2.Document) {\n          return this.newDocumentQueue.push(mutation);\n        }\n        return queue.push(mutation);\n      }\n      if (mutation.node.isShadow) {\n        if (!hasShadowRoot(parent)) {\n          parent.attachShadow({ mode: \"open\" });\n          parent = parent.shadowRoot;\n        } else parent = parent.shadowRoot;\n      }\n      let previous = null;\n      let next = null;\n      if (mutation.previousId) {\n        previous = mirror2.getNode(mutation.previousId);\n      }\n      if (mutation.nextId) {\n        next = mirror2.getNode(mutation.nextId);\n      }\n      if (nextNotInDOM(mutation)) {\n        return queue.push(mutation);\n      }\n      if (mutation.node.rootId && !mirror2.getNode(mutation.node.rootId)) {\n        return;\n      }\n      const targetDoc = mutation.node.rootId ? mirror2.getNode(mutation.node.rootId) : this.usingVirtualDom ? this.virtualDom : iframeDoc;\n      if (isSerializedIframe(parent, mirror2)) {\n        this.attachDocumentToIframe(\n          mutation,\n          parent\n        );\n        return;\n      }\n      const afterAppend = (node, id) => {\n        if (this.usingVirtualDom) return;\n        for (const plugin of this.config.plugins || []) {\n          if (plugin.onBuild) plugin.onBuild(node, { id, replayer: this });\n        }\n      };\n      const target = buildNodeWithSN(mutation.node, {\n        doc: targetDoc,\n        // can be Document or RRDocument\n        mirror: mirror2,\n        // can be this.mirror or virtualDom.mirror\n        skipChild: true,\n        hackCss: true,\n        cache: this.cache,\n        /**\n         * caveat: `afterAppend` only gets called on child nodes of target\n         * we have to call it again below when this target was added to the DOM\n         */\n        afterAppend\n      });\n      if (mutation.previousId === -1 || mutation.nextId === -1) {\n        legacy_missingNodeMap[mutation.node.id] = {\n          node: target,\n          mutation\n        };\n        return;\n      }\n      const parentSn = mirror2.getMeta(parent);\n      if (parentSn && parentSn.type === NodeType$2.Element && parentSn.tagName === \"textarea\" && mutation.node.type === NodeType$2.Text) {\n        const childNodeArray = Array.isArray(parent.childNodes) ? parent.childNodes : Array.from(parent.childNodes);\n        for (const c2 of childNodeArray) {\n          if (c2.nodeType === parent.TEXT_NODE) {\n            parent.removeChild(c2);\n          }\n        }\n      } else if (parentSn?.type === NodeType$2.Document) {\n        const parentDoc = parent;\n        if (mutation.node.type === NodeType$2.DocumentType && parentDoc.childNodes[0]?.nodeType === Node.DOCUMENT_TYPE_NODE)\n          parentDoc.removeChild(parentDoc.childNodes[0]);\n        if (target.nodeName === \"HTML\" && parentDoc.documentElement)\n          parentDoc.removeChild(\n            parentDoc.documentElement\n          );\n      }\n      if (previous && previous.nextSibling && previous.nextSibling.parentNode) {\n        parent.insertBefore(\n          target,\n          previous.nextSibling\n        );\n      } else if (next && next.parentNode) {\n        parent.contains(next) ? parent.insertBefore(target, next) : parent.insertBefore(target, null);\n      } else {\n        parent.appendChild(target);\n      }\n      afterAppend(target, mutation.node.id);\n      if (this.usingVirtualDom && target.nodeName === \"#text\" && parent.nodeName === \"STYLE\" && parent.rules?.length > 0)\n        parent.rules = [];\n      if (isSerializedIframe(target, this.mirror)) {\n        const targetId = this.mirror.getId(target);\n        const mutationInQueue = this.newDocumentQueue.find(\n          (m) => m.parentId === targetId\n        );\n        if (mutationInQueue) {\n          this.attachDocumentToIframe(\n            mutationInQueue,\n            target\n          );\n          this.newDocumentQueue = this.newDocumentQueue.filter(\n            (m) => m !== mutationInQueue\n          );\n        }\n      }\n      if (mutation.previousId || mutation.nextId) {\n        this.legacy_resolveMissingNode(\n          legacy_missingNodeMap,\n          parent,\n          target,\n          mutation\n        );\n      }\n    };\n    d.adds.forEach((mutation) => {\n      appendNode(mutation);\n    });\n    const startTime = Date.now();\n    while (queue.length) {\n      const resolveTrees = queueToResolveTrees(queue);\n      queue.length = 0;\n      if (Date.now() - startTime > 500) {\n        this.warn(\n          \"Timeout in the loop, please check the resolve tree data:\",\n          resolveTrees\n        );\n        break;\n      }\n      for (const tree of resolveTrees) {\n        const parent = mirror2.getNode(tree.value.parentId);\n        if (!parent) {\n          this.debug(\n            \"Drop resolve tree since there is no parent for the root node.\",\n            tree\n          );\n        } else {\n          iterateResolveTree(tree, (mutation) => {\n            appendNode(mutation);\n          });\n        }\n      }\n    }\n    if (Object.keys(legacy_missingNodeMap).length) {\n      Object.assign(this.legacy_missingNodeRetryMap, legacy_missingNodeMap);\n    }\n    uniqueTextMutations(d.texts).forEach((mutation) => {\n      const target = mirror2.getNode(mutation.id);\n      if (!target) {\n        if (d.removes.find((r2) => r2.id === mutation.id)) {\n          return;\n        }\n        return this.warnNodeNotFound(d, mutation.id);\n      }\n      target.textContent = mutation.value;\n      if (this.usingVirtualDom) {\n        const parent = target.parentNode;\n        if (parent?.rules?.length > 0) parent.rules = [];\n      }\n    });\n    d.attributes.forEach((mutation) => {\n      const target = mirror2.getNode(mutation.id);\n      if (!target) {\n        if (d.removes.find((r2) => r2.id === mutation.id)) {\n          return;\n        }\n        return this.warnNodeNotFound(d, mutation.id);\n      }\n      for (const attributeName in mutation.attributes) {\n        if (typeof attributeName === \"string\") {\n          const value = mutation.attributes[attributeName];\n          if (value === null) {\n            target.removeAttribute(attributeName);\n          } else if (typeof value === \"string\") {\n            try {\n              if (attributeName === \"_cssText\" && (target.nodeName === \"LINK\" || target.nodeName === \"STYLE\")) {\n                try {\n                  const newSn = mirror2.getMeta(\n                    target\n                  );\n                  const newNode = buildNodeWithSN(\n                    {\n                      ...newSn,\n                      attributes: {\n                        ...newSn.attributes,\n                        ...mutation.attributes\n                      }\n                    },\n                    {\n                      doc: target.ownerDocument,\n                      // can be Document or RRDocument\n                      mirror: mirror2,\n                      skipChild: true,\n                      hackCss: true,\n                      cache: this.cache\n                    }\n                  );\n                  const siblingNode = target.nextSibling;\n                  const parentNode = target.parentNode;\n                  if (newNode && parentNode) {\n                    parentNode.removeChild(target);\n                    parentNode.insertBefore(\n                      newNode,\n                      siblingNode\n                    );\n                    mirror2.replace(mutation.id, newNode);\n                    break;\n                  }\n                } catch (e2) {\n                }\n              }\n              if (target.nodeType !== 3) {\n                target.setAttribute(\n                  attributeName,\n                  value\n                );\n              }\n            } catch (error) {\n              this.warn(\n                \"An error occurred may due to the checkout feature.\",\n                error\n              );\n            }\n          } else if (attributeName === \"style\") {\n            const styleValues = value;\n            const targetEl = target;\n            for (const s2 in styleValues) {\n              if (styleValues[s2] === false) {\n                targetEl.style.removeProperty(s2);\n              } else if (styleValues[s2] instanceof Array) {\n                const svp = styleValues[s2];\n                targetEl.style.setProperty(s2, svp[0], svp[1]);\n              } else {\n                const svs = styleValues[s2];\n                targetEl.style.setProperty(s2, svs);\n              }\n            }\n          }\n        }\n      }\n    });\n  }\n  /**\n   * Apply the scroll data on real elements.\n   * If the replayer is in sync mode, smooth scroll behavior should be disabled.\n   * @param d - the scroll data\n   * @param isSync - whether the replayer is in sync mode(fast-forward)\n   */\n  applyScroll(d, isSync) {\n    const target = this.mirror.getNode(d.id);\n    if (!target) {\n      return this.debugNodeNotFound(d, d.id);\n    }\n    const sn = this.mirror.getMeta(target);\n    const iframeDoc = getIFrameContentDocument(this.iframe);\n    if (target === iframeDoc) {\n      this.iframe.contentWindow?.scrollTo({\n        top: d.y,\n        left: d.x,\n        behavior: isSync ? \"auto\" : \"smooth\"\n      });\n    } else if (sn?.type === NodeType$2.Document) {\n      target.defaultView?.scrollTo({\n        top: d.y,\n        left: d.x,\n        behavior: isSync ? \"auto\" : \"smooth\"\n      });\n    } else {\n      try {\n        target.scrollTo({\n          top: d.y,\n          left: d.x,\n          behavior: isSync ? \"auto\" : \"smooth\"\n        });\n      } catch (error) {\n      }\n    }\n  }\n  applyInput(d) {\n    const target = this.mirror.getNode(d.id);\n    if (!target) {\n      return this.debugNodeNotFound(d, d.id);\n    }\n    try {\n      target.checked = d.isChecked;\n      target.value = d.text;\n    } catch (error) {\n    }\n  }\n  applySelection(d) {\n    try {\n      const selectionSet = /* @__PURE__ */ new Set();\n      const ranges = d.ranges.map(({ start, startOffset, end, endOffset }) => {\n        const startContainer = this.mirror.getNode(start);\n        const endContainer = this.mirror.getNode(end);\n        if (!startContainer || !endContainer) return;\n        const result = new Range();\n        result.setStart(startContainer, startOffset);\n        result.setEnd(endContainer, endOffset);\n        const doc = startContainer.ownerDocument;\n        const selection = doc?.getSelection();\n        selection && selectionSet.add(selection);\n        return {\n          range: result,\n          selection\n        };\n      });\n      selectionSet.forEach((s2) => s2.removeAllRanges());\n      ranges.forEach((r2) => r2 && r2.selection?.addRange(r2.range));\n    } catch (error) {\n    }\n  }\n  applyStyleSheetMutation(data) {\n    let styleSheet = null;\n    if (data.styleId) styleSheet = this.styleMirror.getStyle(data.styleId);\n    else if (data.id)\n      styleSheet = this.mirror.getNode(data.id)?.sheet || null;\n    if (!styleSheet) return;\n    if (data.source === IncrementalSource.StyleSheetRule)\n      this.applyStyleSheetRule(data, styleSheet);\n    else if (data.source === IncrementalSource.StyleDeclaration)\n      this.applyStyleDeclaration(data, styleSheet);\n  }\n  applyStyleSheetRule(data, styleSheet) {\n    data.adds?.forEach(({ rule, index: nestedIndex }) => {\n      try {\n        if (Array.isArray(nestedIndex)) {\n          const { positions, index } = getPositionsAndIndex(nestedIndex);\n          const nestedRule = getNestedRule(styleSheet.cssRules, positions);\n          nestedRule.insertRule(rule, index);\n        } else {\n          const index = nestedIndex === void 0 ? void 0 : Math.min(nestedIndex, styleSheet.cssRules.length);\n          styleSheet?.insertRule(rule, index);\n        }\n      } catch (e2) {\n      }\n    });\n    data.removes?.forEach(({ index: nestedIndex }) => {\n      try {\n        if (Array.isArray(nestedIndex)) {\n          const { positions, index } = getPositionsAndIndex(nestedIndex);\n          const nestedRule = getNestedRule(styleSheet.cssRules, positions);\n          nestedRule.deleteRule(index || 0);\n        } else {\n          styleSheet?.deleteRule(nestedIndex);\n        }\n      } catch (e2) {\n      }\n    });\n    if (data.replace)\n      try {\n        void styleSheet.replace?.(data.replace);\n      } catch (e2) {\n      }\n    if (data.replaceSync)\n      try {\n        styleSheet.replaceSync?.(data.replaceSync);\n      } catch (e2) {\n      }\n  }\n  applyStyleDeclaration(data, styleSheet) {\n    if (data.set) {\n      const rule = getNestedRule(\n        styleSheet.rules,\n        data.index\n      );\n      rule && rule.style && rule.style.setProperty(\n        data.set.property,\n        data.set.value,\n        data.set.priority\n      );\n    }\n    if (data.remove) {\n      const rule = getNestedRule(\n        styleSheet.rules,\n        data.index\n      );\n      rule && rule.style && rule.style.removeProperty(data.remove.property);\n    }\n  }\n  applyAdoptedStyleSheet(data) {\n    const targetHost = this.mirror.getNode(data.id);\n    if (!targetHost) return;\n    data.styles?.forEach((style) => {\n      let newStyleSheet = null;\n      let hostWindow = null;\n      if (hasShadowRoot(targetHost))\n        hostWindow = targetHost.ownerDocument?.defaultView || null;\n      else if (targetHost.nodeName === \"#document\")\n        hostWindow = targetHost.defaultView;\n      if (!hostWindow) return;\n      try {\n        newStyleSheet = new hostWindow.CSSStyleSheet();\n        this.styleMirror.add(newStyleSheet, style.styleId);\n        this.applyStyleSheetRule(\n          {\n            source: IncrementalSource.StyleSheetRule,\n            adds: style.rules\n          },\n          newStyleSheet\n        );\n      } catch (e2) {\n      }\n    });\n    const MAX_RETRY_TIME = 10;\n    let count = 0;\n    const adoptStyleSheets = (targetHost2, styleIds) => {\n      const stylesToAdopt = styleIds.map((styleId) => this.styleMirror.getStyle(styleId)).filter((style) => style !== null);\n      if (hasShadowRoot(targetHost2))\n        targetHost2.shadowRoot.adoptedStyleSheets = stylesToAdopt;\n      else if (targetHost2.nodeName === \"#document\")\n        targetHost2.adoptedStyleSheets = stylesToAdopt;\n      if (stylesToAdopt.length !== styleIds.length && count < MAX_RETRY_TIME) {\n        setTimeout$1(\n          () => adoptStyleSheets(targetHost2, styleIds),\n          0 + 100 * count\n        );\n        count++;\n      }\n    };\n    adoptStyleSheets(targetHost, data.styleIds);\n  }\n  legacy_resolveMissingNode(map, parent, target, targetMutation) {\n    const { previousId, nextId } = targetMutation;\n    const previousInMap = previousId && map[previousId];\n    const nextInMap = nextId && map[nextId];\n    if (previousInMap) {\n      const { node, mutation } = previousInMap;\n      parent.insertBefore(node, target);\n      delete map[mutation.node.id];\n      delete this.legacy_missingNodeRetryMap[mutation.node.id];\n      if (mutation.previousId || mutation.nextId) {\n        this.legacy_resolveMissingNode(map, parent, node, mutation);\n      }\n    }\n    if (nextInMap) {\n      const { node, mutation } = nextInMap;\n      parent.insertBefore(\n        node,\n        target.nextSibling\n      );\n      delete map[mutation.node.id];\n      delete this.legacy_missingNodeRetryMap[mutation.node.id];\n      if (mutation.previousId || mutation.nextId) {\n        this.legacy_resolveMissingNode(map, parent, node, mutation);\n      }\n    }\n  }\n  moveAndHover(x, y, id, isSync, debugData, pointerId) {\n    const target = this.mirror.getNode(id);\n    if (!target) {\n      return this.debugNodeNotFound(debugData, id);\n    }\n    const base = getBaseDimension(target, this.iframe);\n    const _x = x * base.absoluteScale + base.x;\n    const _y = y * base.absoluteScale + base.y;\n    const pointer = this.pointers[pointerId];\n    if (pointer && pointer.pointerEl) {\n      pointer.pointerEl.style.left = `${_x}px`;\n      pointer.pointerEl.style.top = `${_y}px`;\n    }\n    if (!isSync) {\n      this.drawMouseTail({ x: _x, y: _y }, pointerId);\n    }\n    this.hoverElements(target);\n  }\n  drawMouseTail(position, pointerId) {\n    const pointer = this.pointers[pointerId];\n    if (!pointer || !pointer.mouseTail) {\n      return;\n    }\n    const { lineCap, lineWidth, strokeStyle, duration } = this.config.mouseTail === true ? defaultMouseTailConfig : Object.assign({}, defaultMouseTailConfig, this.config.mouseTail);\n    const draw = () => {\n      if (!pointer || !pointer.mouseTail) {\n        return;\n      }\n      const mouseTail = pointer.mouseTail;\n      const ctx = mouseTail.getContext(\"2d\");\n      if (!ctx || !pointer.tailPositions.length) {\n        return;\n      }\n      ctx.clearRect(0, 0, mouseTail.width, mouseTail.height);\n      ctx.beginPath();\n      ctx.lineWidth = lineWidth;\n      ctx.lineCap = lineCap;\n      ctx.strokeStyle = strokeStyle;\n      ctx.moveTo(pointer.tailPositions[0].x, pointer.tailPositions[0].y);\n      pointer.tailPositions.forEach((p) => ctx.lineTo(p.x, p.y));\n      ctx.stroke();\n    };\n    pointer.tailPositions.push(position);\n    draw();\n    setTimeout$1(() => {\n      if (pointerId in this.pointers) {\n        pointer.tailPositions = pointer.tailPositions.filter(\n          (p) => p !== position\n        );\n        draw();\n      }\n    }, duration / this.speedService.state.context.timer.speed);\n  }\n  hoverElements(el) {\n    const iframeDoc = getIFrameContentDocument(this.iframe);\n    const rootElement = this.lastHoveredRootNode || iframeDoc;\n    if (rootElement && typeof rootElement.querySelectorAll === \"function\") {\n      rootElement.querySelectorAll(\".\\\\:hover\").forEach((hoveredEl) => {\n        hoveredEl.classList.remove(\":hover\");\n      });\n    }\n    this.lastHoveredRootNode = el.getRootNode();\n    let currentEl = el;\n    while (currentEl) {\n      if (currentEl.classList) {\n        currentEl.classList.add(\":hover\");\n      }\n      currentEl = currentEl.parentElement;\n    }\n  }\n  isUserInteraction(event) {\n    if (event.type !== EventType.IncrementalSnapshot) {\n      return false;\n    }\n    return event.data.source > IncrementalSource.Mutation && event.data.source <= IncrementalSource.Input;\n  }\n  backToNormal() {\n    this.nextUserInteractionEvent = null;\n    if (this.speedService.state.matches(\"normal\")) {\n      return;\n    }\n    this.speedService.send({ type: \"BACK_TO_NORMAL\" });\n    this.emitter.emit(ReplayerEvents.SkipEnd, {\n      speed: this.speedService.state.context.normalSpeed\n    });\n  }\n  warnNodeNotFound(d, id) {\n    this.warn(`Node with id '${id}' not found. `, d);\n  }\n  warnCanvasMutationFailed(d, error) {\n    this.warn(`Has error on canvas update`, error, \"canvas mutation:\", d);\n  }\n  debugNodeNotFound(d, id) {\n    this.debug(`Node with id '${id}' not found. `, d);\n  }\n  warn(...args) {\n    if (!this.config.showWarning) {\n      return;\n    }\n    this.config.logger.warn(REPLAY_CONSOLE_PREFIX, ...args);\n  }\n  debug(...args) {\n    if (!this.config.showDebug) {\n      return;\n    }\n    this.config.logger.log(REPLAY_CONSOLE_PREFIX, ...args);\n  }\n}\nexport {\n  a9 as CanvasManager,\n  EventType,\n  IncrementalSource,\n  MouseInteractions,\n  Replayer,\n  ReplayerEvents,\n  addCustomEvent,\n  canvasMutation,\n  deserializeArg,\n  freezePage,\n  record,\n  takeFullSnapshot,\n  aa as utils\n};\n//# sourceMappingURL=rrweb.js.map\n", "type ClassOption = string | RegExp;\n\n/** Duplicate this from @sentry/rrweb so we can export this as well. */\nexport const ReplayEventTypeDomContentLoaded = 0;\nexport const ReplayEventTypeLoad = 1;\nexport const ReplayEventTypeFullSnapshot = 2;\nexport const ReplayEventTypeIncrementalSnapshot = 3;\nexport const ReplayEventTypeMeta = 4;\nexport const ReplayEventTypeCustom = 5;\nexport const ReplayEventTypePlugin = 6;\n\nexport type ReplayEventType =\n  | typeof ReplayEventTypeDomContentLoaded\n  | typeof ReplayEventTypeLoad\n  | typeof ReplayEventTypeFullSnapshot\n  | typeof ReplayEventTypeIncrementalSnapshot\n  | typeof ReplayEventTypeMeta\n  | typeof ReplayEventTypeCustom\n  | typeof ReplayEventTypePlugin;\n\n/**\n * This is a partial copy of rrweb's eventWithTime type which only contains the properties\n * we specifically need in the SDK.\n */\nexport type ReplayEventWithTime = {\n  type: ReplayEventType;\n  data: unknown;\n  timestamp: number;\n  delay?: number;\n};\n\n/**\n * This is a partial copy of rrweb's recording options which only contains the properties\n * we specifically use in the SDK. Users can specify additional properties, hence we add the\n * Record<string, unknown> union type.\n */\nexport type RrwebRecordOptions = {\n  maskAllText?: boolean;\n  maskAllInputs?: boolean;\n  blockClass?: ClassOption;\n  ignoreClass?: string;\n  maskTextClass?: ClassOption;\n  maskTextSelector?: string;\n  blockSelector?: string;\n  maskInputOptions?: Record<string, boolean>;\n  recordCrossOriginIframes?: boolean;\n} & Record<string, unknown>;\n\nexport interface CanvasManagerInterface {\n  reset(): void;\n  freeze(): void;\n  unfreeze(): void;\n  lock(): void;\n  unlock(): void;\n  snapshot(): void;\n  addWindow(win: typeof globalThis & Window): void;\n  addShadowRoot(shadowRoot: ShadowRoot): void;\n  resetShadowRoots(): void;\n}\n\nexport interface CanvasManagerOptions {\n  recordCanvas: boolean;\n  enableManualSnapshot?: boolean;\n  blockClass: string | RegExp;\n  blockSelector: string | null;\n  unblockSelector: string | null;\n  sampling?: 'all' | number;\n  dataURLOptions: Partial<{\n    type: string;\n    quality: number;\n  }>;\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  mutationCb: (p: any) => void;\n  win: typeof globalThis & Window;\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  mirror: any;\n}\n", "/**\n * Converts a timestamp to ms, if it was in s, or keeps it as ms.\n */\nexport function timestampToMs(timestamp: number): number {\n  const isMs = timestamp > 9999999999;\n  return isMs ? timestamp : timestamp * 1000;\n}\n\n/**\n * Converts a timestamp to s, if it was in ms, or keeps it as s.\n */\nexport function timestampToS(timestamp: number): number {\n  const isMs = timestamp > 9999999999;\n  return isMs ? timestamp / 1000 : timestamp;\n}\n", "import type { Breadcrumb } from '@sentry/core';\nimport { normalize } from '@sentry/core';\nimport { EventType } from '@sentry/rrweb';\nimport type { ReplayContainer } from '../../types';\n\n/**\n * Add a breadcrumb event to replay.\n */\nexport function addBreadcrumbEvent(replay: ReplayContainer, breadcrumb: Breadcrumb): void {\n  if (breadcrumb.category === 'sentry.transaction') {\n    return;\n  }\n\n  if (['ui.click', 'ui.input'].includes(breadcrumb.category as string)) {\n    replay.triggerUserActivity();\n  } else {\n    replay.checkAndHandleExpiredSession();\n  }\n\n  replay.addUpdate(() => {\n    // This should never reject\n    // eslint-disable-next-line @typescript-eslint/no-floating-promises\n    replay.throttledAddEvent({\n      type: EventType.Custom,\n      // TODO: We were converting from ms to seconds for breadcrumbs, spans,\n      // but maybe we should just keep them as milliseconds\n      timestamp: (breadcrumb.timestamp || 0) * 1000,\n      data: {\n        tag: 'breadcrumb',\n        // normalize to max. 10 depth and 1_000 properties per object\n        payload: normalize(breadcrumb, 10, 1_000),\n      },\n    });\n\n    // Do not flush after console log messages\n    return breadcrumb.category === 'console';\n  });\n}\n", "import type { INode } from '@sentry/rrweb-snapshot';\nimport { isObjectLike } from '@sentry/core';\n\nconst INTERACTIVE_SELECTOR = 'button,a';\n\n/** Get the closest interactive parent element, or else return the given element. */\nexport function getClosestInteractive(element: Element): Element {\n  const closestInteractive = element.closest(INTERACTIVE_SELECTOR);\n  return closestInteractive || element;\n}\n\n/**\n * For clicks, we check if the target is inside of a button or link\n * If so, we use this as the target instead\n * This is useful because if you click on the image in <button><img></button>,\n * The target will be the image, not the button, which we don't want here\n */\nexport function getClickTargetNode(event: Event | MouseEvent | Node): Node | INode | null {\n  const target = getTargetNode(event);\n\n  if (!target || !(target instanceof Element)) {\n    return target;\n  }\n\n  return getClosestInteractive(target);\n}\n\n/** Get the event target node. */\nexport function getTargetNode(event: Node | { target: EventTarget | null }): Node | INode | null {\n  if (isEventWithTarget(event)) {\n    return event.target as Node | null;\n  }\n\n  return event;\n}\n\nfunction isEventWithTarget(event: unknown): event is { target: EventTarget | null } {\n  return isObjectLike(event) && 'target' in event;\n}\n", "import { fill } from '@sentry/core';\nimport { WINDOW } from '../../constants';\n\ntype WindowOpenHandler = () => void;\n\nlet handlers: undefined | WindowOpenHandler[];\n\n/**\n * Register a handler to be called when `window.open()` is called.\n * Returns a cleanup function.\n */\nexport function onWindowOpen(cb: WindowOpenHandler): () => void {\n  // Ensure to only register this once\n  if (!handlers) {\n    handlers = [];\n    monkeyPatchWindowOpen();\n  }\n\n  handlers.push(cb);\n\n  return () => {\n    const pos = handlers ? handlers.indexOf(cb) : -1;\n    if (pos > -1) {\n      (handlers as WindowOpenHandler[]).splice(pos, 1);\n    }\n  };\n}\n\nfunction monkeyPatchWindowOpen(): void {\n  fill(WINDOW, 'open', function (originalWindowOpen: () => void): () => void {\n    return function (...args: unknown[]): void {\n      if (handlers) {\n        try {\n          handlers.forEach(handler => handler());\n        } catch {\n          // ignore errors in here\n        }\n      }\n\n      return originalWindowOpen.apply(WINDOW, args);\n    };\n  });\n}\n", "import type { Breadcrumb } from '@sentry/core';\nimport { setTimeout } from '@sentry/browser-utils';\nimport { IncrementalSource, MouseInteractions, record } from '@sentry/rrweb';\nimport { WINDOW } from '../constants';\nimport type {\n  RecordingEvent,\n  ReplayClickDetector,\n  ReplayContainer,\n  ReplayMultiClickFrame,\n  ReplaySlowClickFrame,\n  SlowClickConfig,\n} from '../types';\nimport { ReplayEventTypeIncrementalSnapshot } from '../types';\nimport { timestampToS } from '../util/timestamp';\nimport { addBreadcrumbEvent } from './util/addBreadcrumbEvent';\nimport { getClosestInteractive } from './util/domUtils';\nimport { onWindowOpen } from './util/onWindowOpen';\n\ntype ClickBreadcrumb = Breadcrumb & {\n  timestamp: number;\n};\n\ninterface Click {\n  timestamp: number;\n  mutationAfter?: number;\n  scrollAfter?: number;\n  clickBreadcrumb: ClickBreadcrumb;\n  clickCount: number;\n  node: HTMLElement;\n}\n\ntype IncrementalRecordingEvent = RecordingEvent & {\n  type: typeof ReplayEventTypeIncrementalSnapshot;\n  data: { source: IncrementalSource };\n};\n\ntype IncrementalMouseInteractionRecordingEvent = IncrementalRecordingEvent & {\n  type: typeof ReplayEventTypeIncrementalSnapshot;\n  data: { type: MouseInteractions; id: number };\n};\n\n/** Any IncrementalSource for rrweb that we interpret as a kind of mutation. */\nconst IncrementalMutationSources = new Set([\n  IncrementalSource.Mutation,\n  IncrementalSource.StyleSheetRule,\n  IncrementalSource.StyleDeclaration,\n  IncrementalSource.AdoptedStyleSheet,\n  IncrementalSource.CanvasMutation,\n  IncrementalSource.Selection,\n  IncrementalSource.MediaInteraction,\n]);\n\n/** Handle a click. */\nexport function handleClick(clickDetector: ReplayClickDetector, clickBreadcrumb: Breadcrumb, node: HTMLElement): void {\n  clickDetector.handleClick(clickBreadcrumb, node);\n}\n\n/** A click detector class that can be used to detect slow or rage clicks on elements. */\nexport class ClickDetector implements ReplayClickDetector {\n  // protected for testing\n  protected _lastMutation: number;\n  protected _lastScroll: number;\n\n  private _clicks: Click[];\n  private _teardown: undefined | (() => void);\n\n  private _threshold: number;\n  private _scrollTimeout: number;\n  private _timeout: number;\n  private _ignoreSelector: string;\n\n  private _replay: ReplayContainer;\n  private _checkClickTimeout?: ReturnType<typeof setTimeout>;\n  private _addBreadcrumbEvent: typeof addBreadcrumbEvent;\n\n  public constructor(\n    replay: ReplayContainer,\n    slowClickConfig: SlowClickConfig,\n    // Just for easier testing\n    _addBreadcrumbEvent = addBreadcrumbEvent,\n  ) {\n    this._lastMutation = 0;\n    this._lastScroll = 0;\n    this._clicks = [];\n\n    // We want everything in s, but options are in ms\n    this._timeout = slowClickConfig.timeout / 1000;\n    this._threshold = slowClickConfig.threshold / 1000;\n    this._scrollTimeout = slowClickConfig.scrollTimeout / 1000;\n    this._replay = replay;\n    this._ignoreSelector = slowClickConfig.ignoreSelector;\n    this._addBreadcrumbEvent = _addBreadcrumbEvent;\n  }\n\n  /** Register click detection handlers on mutation or scroll. */\n  public addListeners(): void {\n    const cleanupWindowOpen = onWindowOpen(() => {\n      // Treat window.open as mutation\n      this._lastMutation = nowInSeconds();\n    });\n\n    this._teardown = () => {\n      cleanupWindowOpen();\n\n      this._clicks = [];\n      this._lastMutation = 0;\n      this._lastScroll = 0;\n    };\n  }\n\n  /** Clean up listeners. */\n  public removeListeners(): void {\n    if (this._teardown) {\n      this._teardown();\n    }\n\n    if (this._checkClickTimeout) {\n      clearTimeout(this._checkClickTimeout);\n    }\n  }\n\n  /** @inheritDoc */\n  public handleClick(breadcrumb: Breadcrumb, node: HTMLElement): void {\n    if (ignoreElement(node, this._ignoreSelector) || !isClickBreadcrumb(breadcrumb)) {\n      return;\n    }\n\n    const newClick: Click = {\n      timestamp: timestampToS(breadcrumb.timestamp),\n      clickBreadcrumb: breadcrumb,\n      // Set this to 0 so we know it originates from the click breadcrumb\n      clickCount: 0,\n      node,\n    };\n\n    // If there was a click in the last 1s on the same element, ignore it - only keep a single reference per second\n    if (\n      this._clicks.some(click => click.node === newClick.node && Math.abs(click.timestamp - newClick.timestamp) < 1)\n    ) {\n      return;\n    }\n\n    this._clicks.push(newClick);\n\n    // If this is the first new click, set a timeout to check for multi clicks\n    if (this._clicks.length === 1) {\n      this._scheduleCheckClicks();\n    }\n  }\n\n  /** @inheritDoc */\n  public registerMutation(timestamp = Date.now()): void {\n    this._lastMutation = timestampToS(timestamp);\n  }\n\n  /** @inheritDoc */\n  public registerScroll(timestamp = Date.now()): void {\n    this._lastScroll = timestampToS(timestamp);\n  }\n\n  /** @inheritDoc */\n  public registerClick(element: HTMLElement): void {\n    const node = getClosestInteractive(element);\n    this._handleMultiClick(node as HTMLElement);\n  }\n\n  /** Count multiple clicks on elements. */\n  private _handleMultiClick(node: HTMLElement): void {\n    this._getClicks(node).forEach(click => {\n      click.clickCount++;\n    });\n  }\n\n  /** Get all pending clicks for a given node. */\n  private _getClicks(node: HTMLElement): Click[] {\n    return this._clicks.filter(click => click.node === node);\n  }\n\n  /** Check the clicks that happened. */\n  private _checkClicks(): void {\n    const timedOutClicks: Click[] = [];\n\n    const now = nowInSeconds();\n\n    this._clicks.forEach(click => {\n      if (!click.mutationAfter && this._lastMutation) {\n        click.mutationAfter = click.timestamp <= this._lastMutation ? this._lastMutation - click.timestamp : undefined;\n      }\n      if (!click.scrollAfter && this._lastScroll) {\n        click.scrollAfter = click.timestamp <= this._lastScroll ? this._lastScroll - click.timestamp : undefined;\n      }\n\n      // All of these are in seconds!\n      if (click.timestamp + this._timeout <= now) {\n        timedOutClicks.push(click);\n      }\n    });\n\n    // Remove \"old\" clicks\n    for (const click of timedOutClicks) {\n      const pos = this._clicks.indexOf(click);\n\n      if (pos > -1) {\n        this._generateBreadcrumbs(click);\n        this._clicks.splice(pos, 1);\n      }\n    }\n\n    // Trigger new check, unless no clicks left\n    if (this._clicks.length) {\n      this._scheduleCheckClicks();\n    }\n  }\n\n  /** Generate matching breadcrumb(s) for the click. */\n  private _generateBreadcrumbs(click: Click): void {\n    const replay = this._replay;\n    const hadScroll = click.scrollAfter && click.scrollAfter <= this._scrollTimeout;\n    const hadMutation = click.mutationAfter && click.mutationAfter <= this._threshold;\n\n    const isSlowClick = !hadScroll && !hadMutation;\n    const { clickCount, clickBreadcrumb } = click;\n\n    // Slow click\n    if (isSlowClick) {\n      // If `mutationAfter` is set, it means a mutation happened after the threshold, but before the timeout\n      // If not, it means we just timed out without scroll & mutation\n      const timeAfterClickMs = Math.min(click.mutationAfter || this._timeout, this._timeout) * 1000;\n      const endReason = timeAfterClickMs < this._timeout * 1000 ? 'mutation' : 'timeout';\n\n      const breadcrumb: ReplaySlowClickFrame = {\n        type: 'default',\n        message: clickBreadcrumb.message,\n        timestamp: clickBreadcrumb.timestamp,\n        category: 'ui.slowClickDetected',\n        data: {\n          ...clickBreadcrumb.data,\n          url: WINDOW.location.href,\n          route: replay.getCurrentRoute(),\n          timeAfterClickMs,\n          endReason,\n          // If clickCount === 0, it means multiClick was not correctly captured here\n          // - we still want to send 1 in this case\n          clickCount: clickCount || 1,\n        },\n      };\n\n      this._addBreadcrumbEvent(replay, breadcrumb);\n      return;\n    }\n\n    // Multi click\n    if (clickCount > 1) {\n      const breadcrumb: ReplayMultiClickFrame = {\n        type: 'default',\n        message: clickBreadcrumb.message,\n        timestamp: clickBreadcrumb.timestamp,\n        category: 'ui.multiClick',\n        data: {\n          ...clickBreadcrumb.data,\n          url: WINDOW.location.href,\n          route: replay.getCurrentRoute(),\n          clickCount,\n          metric: true,\n        },\n      };\n\n      this._addBreadcrumbEvent(replay, breadcrumb);\n    }\n  }\n\n  /** Schedule to check current clicks. */\n  private _scheduleCheckClicks(): void {\n    if (this._checkClickTimeout) {\n      clearTimeout(this._checkClickTimeout);\n    }\n\n    this._checkClickTimeout = setTimeout(() => this._checkClicks(), 1000);\n  }\n}\n\nconst SLOW_CLICK_TAGS = ['A', 'BUTTON', 'INPUT'];\n\n/** exported for tests only */\nexport function ignoreElement(node: HTMLElement, ignoreSelector: string): boolean {\n  if (!SLOW_CLICK_TAGS.includes(node.tagName)) {\n    return true;\n  }\n\n  // If <input> tag, we only want to consider input[type='submit'] & input[type='button']\n  if (node.tagName === 'INPUT' && !['submit', 'button'].includes(node.getAttribute('type') || '')) {\n    return true;\n  }\n\n  // If <a> tag, detect special variants that may not lead to an action\n  // If target !== _self, we may open the link somewhere else, which would lead to no action\n  // Also, when downloading a file, we may not leave the page, but still not trigger an action\n  if (\n    node.tagName === 'A' &&\n    (node.hasAttribute('download') || (node.hasAttribute('target') && node.getAttribute('target') !== '_self'))\n  ) {\n    return true;\n  }\n\n  if (ignoreSelector && node.matches(ignoreSelector)) {\n    return true;\n  }\n\n  return false;\n}\n\nfunction isClickBreadcrumb(breadcrumb: Breadcrumb): breadcrumb is ClickBreadcrumb {\n  return !!(breadcrumb.data && typeof breadcrumb.data.nodeId === 'number' && breadcrumb.timestamp);\n}\n\n// This is good enough for us, and is easier to test/mock than `timestampInSeconds`\nfunction nowInSeconds(): number {\n  return Date.now() / 1000;\n}\n\n/** Update the click detector based on a recording event of rrweb. */\nexport function updateClickDetectorForRecordingEvent(clickDetector: ReplayClickDetector, event: RecordingEvent): void {\n  try {\n    // note: We only consider incremental snapshots here\n    // This means that any full snapshot is ignored for mutation detection - the reason is that we simply cannot know if a mutation happened here.\n    // E.g. think that we are buffering, an error happens and we take a full snapshot because we switched to session mode -\n    // in this scenario, we would not know if a dead click happened because of the error, which is a key dead click scenario.\n    // Instead, by ignoring full snapshots, we have the risk that we generate a false positive\n    // (if a mutation _did_ happen but was \"swallowed\" by the full snapshot)\n    // But this should be more unlikely as we'd generally capture the incremental snapshot right away\n\n    if (!isIncrementalEvent(event)) {\n      return;\n    }\n\n    const { source } = event.data;\n    if (IncrementalMutationSources.has(source)) {\n      clickDetector.registerMutation(event.timestamp);\n    }\n\n    if (source === IncrementalSource.Scroll) {\n      clickDetector.registerScroll(event.timestamp);\n    }\n\n    if (isIncrementalMouseInteraction(event)) {\n      const { type, id } = event.data;\n      const node = record.mirror.getNode(id);\n\n      if (node instanceof HTMLElement && type === MouseInteractions.Click) {\n        clickDetector.registerClick(node);\n      }\n    }\n  } catch {\n    // ignore errors here, e.g. if accessing something that does not exist\n  }\n}\n\nfunction isIncrementalEvent(event: RecordingEvent): event is IncrementalRecordingEvent {\n  return event.type === ReplayEventTypeIncrementalSnapshot;\n}\n\nfunction isIncrementalMouseInteraction(\n  event: IncrementalRecordingEvent,\n): event is IncrementalMouseInteractionRecordingEvent {\n  return event.data.source === IncrementalSource.MouseInteraction;\n}\n", "import type { ReplayBreadcrumbFrame } from '../types/replayFrame';\n\n/**\n * Create a breadcrumb for a replay.\n */\nexport function createBreadcrumb(\n  breadcrumb: Omit<ReplayBreadcrumbFrame, 'timestamp' | 'type'> & Partial<Pick<ReplayBreadcrumbFrame, 'timestamp'>>,\n): ReplayBreadcrumbFrame {\n  return {\n    timestamp: Date.now() / 1000,\n    type: 'default',\n    ...breadcrumb,\n  };\n}\n", "var __defProp = Object.defineProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\nvar NodeType = /* @__PURE__ */ ((NodeType2) => {\n  NodeType2[NodeType2[\"Document\"] = 0] = \"Document\";\n  NodeType2[NodeType2[\"DocumentType\"] = 1] = \"DocumentType\";\n  NodeType2[NodeType2[\"Element\"] = 2] = \"Element\";\n  NodeType2[NodeType2[\"Text\"] = 3] = \"Text\";\n  NodeType2[NodeType2[\"CDATA\"] = 4] = \"CDATA\";\n  NodeType2[NodeType2[\"Comment\"] = 5] = \"Comment\";\n  return NodeType2;\n})(NodeType || {});\nfunction isElement(n) {\n  return n.nodeType === n.ELEMENT_NODE;\n}\nfunction isShadowRoot(n) {\n  const host = n?.host;\n  return Boolean(host?.shadowRoot === n);\n}\nfunction isNativeShadowDom(shadowRoot) {\n  return Object.prototype.toString.call(shadowRoot) === \"[object ShadowRoot]\";\n}\nfunction fixBrowserCompatibilityIssuesInCSS(cssText) {\n  if (cssText.includes(\" background-clip: text;\") && !cssText.includes(\" -webkit-background-clip: text;\")) {\n    cssText = cssText.replace(\n      /\\sbackground-clip:\\s*text;/g,\n      \" -webkit-background-clip: text; background-clip: text;\"\n    );\n  }\n  return cssText;\n}\nfunction escapeImportStatement(rule) {\n  const { cssText } = rule;\n  if (cssText.split('\"').length < 3) return cssText;\n  const statement = [\"@import\", `url(${JSON.stringify(rule.href)})`];\n  if (rule.layerName === \"\") {\n    statement.push(`layer`);\n  } else if (rule.layerName) {\n    statement.push(`layer(${rule.layerName})`);\n  }\n  if (rule.supportsText) {\n    statement.push(`supports(${rule.supportsText})`);\n  }\n  if (rule.media.length) {\n    statement.push(rule.media.mediaText);\n  }\n  return statement.join(\" \") + \";\";\n}\nfunction stringifyStylesheet(s) {\n  try {\n    const rules = s.rules || s.cssRules;\n    return rules ? fixBrowserCompatibilityIssuesInCSS(\n      Array.from(rules, stringifyRule).join(\"\")\n    ) : null;\n  } catch (error) {\n    return null;\n  }\n}\nfunction fixAllCssProperty(rule) {\n  let styles = \"\";\n  for (let i = 0; i < rule.style.length; i++) {\n    const styleDeclaration = rule.style;\n    const attribute = styleDeclaration[i];\n    const isImportant = styleDeclaration.getPropertyPriority(attribute);\n    styles += `${attribute}:${styleDeclaration.getPropertyValue(attribute)}${isImportant ? ` !important` : \"\"};`;\n  }\n  return `${rule.selectorText} { ${styles} }`;\n}\nfunction stringifyRule(rule) {\n  let importStringified;\n  if (isCSSImportRule(rule)) {\n    try {\n      importStringified = // for same-origin stylesheets,\n      // we can access the imported stylesheet rules directly\n      stringifyStylesheet(rule.styleSheet) || // work around browser issues with the raw string `@import url(...)` statement\n      escapeImportStatement(rule);\n    } catch (error) {\n    }\n  } else if (isCSSStyleRule(rule)) {\n    let cssText = rule.cssText;\n    const needsSafariColonFix = rule.selectorText.includes(\":\");\n    const needsAllFix = typeof rule.style[\"all\"] === \"string\" && rule.style[\"all\"];\n    if (needsAllFix) {\n      cssText = fixAllCssProperty(rule);\n    }\n    if (needsSafariColonFix) {\n      cssText = fixSafariColons(cssText);\n    }\n    if (needsSafariColonFix || needsAllFix) {\n      return cssText;\n    }\n  }\n  return importStringified || rule.cssText;\n}\nfunction fixSafariColons(cssStringified) {\n  const regex = /(\\[(?:[\\w-]+)[^\\\\])(:(?:[\\w-]+)\\])/gm;\n  return cssStringified.replace(regex, \"$1\\\\$2\");\n}\nfunction isCSSImportRule(rule) {\n  return \"styleSheet\" in rule;\n}\nfunction isCSSStyleRule(rule) {\n  return \"selectorText\" in rule;\n}\nclass Mirror {\n  constructor() {\n    __publicField(this, \"idNodeMap\", /* @__PURE__ */ new Map());\n    __publicField(this, \"nodeMetaMap\", /* @__PURE__ */ new WeakMap());\n  }\n  getId(n) {\n    if (!n) return -1;\n    const id = this.getMeta(n)?.id;\n    return id ?? -1;\n  }\n  getNode(id) {\n    return this.idNodeMap.get(id) || null;\n  }\n  getIds() {\n    return Array.from(this.idNodeMap.keys());\n  }\n  getMeta(n) {\n    return this.nodeMetaMap.get(n) || null;\n  }\n  // removes the node from idNodeMap\n  // doesn't remove the node from nodeMetaMap\n  removeNodeFromMap(n) {\n    const id = this.getId(n);\n    this.idNodeMap.delete(id);\n    if (n.childNodes) {\n      n.childNodes.forEach(\n        (childNode) => this.removeNodeFromMap(childNode)\n      );\n    }\n  }\n  has(id) {\n    return this.idNodeMap.has(id);\n  }\n  hasNode(node) {\n    return this.nodeMetaMap.has(node);\n  }\n  add(n, meta) {\n    const id = meta.id;\n    this.idNodeMap.set(id, n);\n    this.nodeMetaMap.set(n, meta);\n  }\n  replace(id, n) {\n    const oldNode = this.getNode(id);\n    if (oldNode) {\n      const meta = this.nodeMetaMap.get(oldNode);\n      if (meta) this.nodeMetaMap.set(n, meta);\n    }\n    this.idNodeMap.set(id, n);\n  }\n  reset() {\n    this.idNodeMap = /* @__PURE__ */ new Map();\n    this.nodeMetaMap = /* @__PURE__ */ new WeakMap();\n  }\n}\nfunction createMirror() {\n  return new Mirror();\n}\nfunction shouldMaskInput({\n  maskInputOptions,\n  tagName,\n  type\n}) {\n  if (tagName === \"OPTION\") {\n    tagName = \"SELECT\";\n  }\n  return Boolean(\n    maskInputOptions[tagName.toLowerCase()] || type && maskInputOptions[type] || type === \"password\" || // Default to \"text\" option for inputs without a \"type\" attribute defined\n    tagName === \"INPUT\" && !type && maskInputOptions[\"text\"]\n  );\n}\nfunction maskInputValue({\n  isMasked,\n  element,\n  value,\n  maskInputFn\n}) {\n  let text = value || \"\";\n  if (!isMasked) {\n    return text;\n  }\n  if (maskInputFn) {\n    text = maskInputFn(text, element);\n  }\n  return \"*\".repeat(text.length);\n}\nfunction toLowerCase(str) {\n  return str.toLowerCase();\n}\nfunction toUpperCase(str) {\n  return str.toUpperCase();\n}\nconst ORIGINAL_ATTRIBUTE_NAME = \"__rrweb_original__\";\nfunction is2DCanvasBlank(canvas) {\n  const ctx = canvas.getContext(\"2d\");\n  if (!ctx) return true;\n  const chunkSize = 50;\n  for (let x = 0; x < canvas.width; x += chunkSize) {\n    for (let y = 0; y < canvas.height; y += chunkSize) {\n      const getImageData = ctx.getImageData;\n      const originalGetImageData = ORIGINAL_ATTRIBUTE_NAME in getImageData ? getImageData[ORIGINAL_ATTRIBUTE_NAME] : getImageData;\n      const pixelBuffer = new Uint32Array(\n        // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access\n        originalGetImageData.call(\n          ctx,\n          x,\n          y,\n          Math.min(chunkSize, canvas.width - x),\n          Math.min(chunkSize, canvas.height - y)\n        ).data.buffer\n      );\n      if (pixelBuffer.some((pixel) => pixel !== 0)) return false;\n    }\n  }\n  return true;\n}\nfunction isNodeMetaEqual(a, b) {\n  if (!a || !b || a.type !== b.type) return false;\n  if (a.type === NodeType.Document)\n    return a.compatMode === b.compatMode;\n  else if (a.type === NodeType.DocumentType)\n    return a.name === b.name && a.publicId === b.publicId && a.systemId === b.systemId;\n  else if (a.type === NodeType.Comment || a.type === NodeType.Text || a.type === NodeType.CDATA)\n    return a.textContent === b.textContent;\n  else if (a.type === NodeType.Element)\n    return a.tagName === b.tagName && JSON.stringify(a.attributes) === JSON.stringify(b.attributes) && a.isSVG === b.isSVG && a.needBlock === b.needBlock;\n  return false;\n}\nfunction getInputType(element) {\n  const type = element.type;\n  return element.hasAttribute(\"data-rr-is-password\") ? \"password\" : type ? (\n    // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n    toLowerCase(type)\n  ) : null;\n}\nfunction getInputValue(el, tagName, type) {\n  if (tagName === \"INPUT\" && (type === \"radio\" || type === \"checkbox\")) {\n    return el.getAttribute(\"value\") || \"\";\n  }\n  return el.value;\n}\nfunction extractFileExtension(path, baseURL) {\n  let url;\n  try {\n    url = new URL(path, baseURL ?? window.location.href);\n  } catch (err) {\n    return null;\n  }\n  const regex = /\\.([0-9a-z]+)(?:$)/i;\n  const match = url.pathname.match(regex);\n  return match?.[1] ?? null;\n}\nconst cachedImplementations = {};\nfunction getImplementation(name) {\n  const cached = cachedImplementations[name];\n  if (cached) {\n    return cached;\n  }\n  const document = window.document;\n  let impl = window[name];\n  if (document && typeof document.createElement === \"function\") {\n    try {\n      const sandbox = document.createElement(\"iframe\");\n      sandbox.hidden = true;\n      document.head.appendChild(sandbox);\n      const contentWindow = sandbox.contentWindow;\n      if (contentWindow && contentWindow[name]) {\n        impl = // eslint-disable-next-line @typescript-eslint/unbound-method\n        contentWindow[name];\n      }\n      document.head.removeChild(sandbox);\n    } catch (e) {\n    }\n  }\n  return cachedImplementations[name] = impl.bind(\n    window\n  );\n}\nfunction onRequestAnimationFrame(...rest) {\n  return getImplementation(\"requestAnimationFrame\")(...rest);\n}\nfunction setTimeout(...rest) {\n  return getImplementation(\"setTimeout\")(...rest);\n}\nfunction clearTimeout(...rest) {\n  return getImplementation(\"clearTimeout\")(...rest);\n}\nfunction getIFrameContentDocument(iframe) {\n  try {\n    return iframe.contentDocument;\n  } catch {\n  }\n}\nfunction getIFrameContentWindow(iframe) {\n  try {\n    return iframe.contentWindow;\n  } catch {\n  }\n}\nlet _id = 1;\nconst tagNameRegex = new RegExp(\"[^a-z0-9-_:]\");\nconst IGNORED_NODE = -2;\nfunction genId() {\n  return _id++;\n}\nfunction getValidTagName(element) {\n  if (element instanceof HTMLFormElement) {\n    return \"form\";\n  }\n  const processedTagName = toLowerCase(element.tagName);\n  if (tagNameRegex.test(processedTagName)) {\n    return \"div\";\n  }\n  return processedTagName;\n}\nfunction extractOrigin(url) {\n  let origin = \"\";\n  if (url.indexOf(\"//\") > -1) {\n    origin = url.split(\"/\").slice(0, 3).join(\"/\");\n  } else {\n    origin = url.split(\"/\")[0];\n  }\n  origin = origin.split(\"?\")[0];\n  return origin;\n}\nlet canvasService;\nlet canvasCtx;\nconst URL_IN_CSS_REF = /url\\((?:(')([^']*)'|(\")(.*?)\"|([^)]*))\\)/gm;\nconst URL_PROTOCOL_MATCH = /^(?:[a-z+]+:)?\\/\\//i;\nconst URL_WWW_MATCH = /^www\\..*/i;\nconst DATA_URI = /^(data:)([^,]*),(.*)/i;\nfunction filterCSSPropertiesFromInlineStyle(cssText, ignoredProperties) {\n  if (!cssText || ignoredProperties.size === 0) {\n    return cssText;\n  }\n  try {\n    const properties = cssText.split(\";\");\n    const filteredProperties = [];\n    for (let property of properties) {\n      property = property.trim();\n      if (!property) continue;\n      const colonIndex = property.indexOf(\":\");\n      if (colonIndex === -1) {\n        filteredProperties.push(property);\n        continue;\n      }\n      const propertyName = property.slice(0, colonIndex).trim();\n      if (!ignoredProperties.has(propertyName)) {\n        filteredProperties.push(property);\n      }\n    }\n    return filteredProperties.join(\"; \") + (filteredProperties.length > 0 && cssText.endsWith(\";\") ? \";\" : \"\");\n  } catch (error) {\n    console.warn(\"Error filtering CSS properties:\", error);\n    return cssText;\n  }\n}\nfunction absoluteToStylesheet(cssText, href) {\n  return (cssText || \"\").replace(\n    URL_IN_CSS_REF,\n    (origin, quote1, path1, quote2, path2, path3) => {\n      const filePath = path1 || path2 || path3;\n      const maybeQuote = quote1 || quote2 || \"\";\n      if (!filePath) {\n        return origin;\n      }\n      if (URL_PROTOCOL_MATCH.test(filePath) || URL_WWW_MATCH.test(filePath)) {\n        return `url(${maybeQuote}${filePath}${maybeQuote})`;\n      }\n      if (DATA_URI.test(filePath)) {\n        return `url(${maybeQuote}${filePath}${maybeQuote})`;\n      }\n      if (filePath[0] === \"/\") {\n        return `url(${maybeQuote}${extractOrigin(href) + filePath}${maybeQuote})`;\n      }\n      const stack = href.split(\"/\");\n      const parts = filePath.split(\"/\");\n      stack.pop();\n      for (const part of parts) {\n        if (part === \".\") {\n          continue;\n        } else if (part === \"..\") {\n          stack.pop();\n        } else {\n          stack.push(part);\n        }\n      }\n      return `url(${maybeQuote}${stack.join(\"/\")}${maybeQuote})`;\n    }\n  );\n}\nconst SRCSET_NOT_SPACES = /^[^ \\t\\n\\r\\u000c]+/;\nconst SRCSET_COMMAS_OR_SPACES = /^[, \\t\\n\\r\\u000c]+/;\nfunction getAbsoluteSrcsetString(doc, attributeValue) {\n  if (attributeValue.trim() === \"\") {\n    return attributeValue;\n  }\n  let pos = 0;\n  function collectCharacters(regEx) {\n    let chars;\n    const match = regEx.exec(attributeValue.substring(pos));\n    if (match) {\n      chars = match[0];\n      pos += chars.length;\n      return chars;\n    }\n    return \"\";\n  }\n  const output = [];\n  while (true) {\n    collectCharacters(SRCSET_COMMAS_OR_SPACES);\n    if (pos >= attributeValue.length) {\n      break;\n    }\n    let url = collectCharacters(SRCSET_NOT_SPACES);\n    if (url.slice(-1) === \",\") {\n      url = absoluteToDoc(doc, url.substring(0, url.length - 1));\n      output.push(url);\n    } else {\n      let descriptorsStr = \"\";\n      url = absoluteToDoc(doc, url);\n      let inParens = false;\n      while (true) {\n        const c = attributeValue.charAt(pos);\n        if (c === \"\") {\n          output.push((url + descriptorsStr).trim());\n          break;\n        } else if (!inParens) {\n          if (c === \",\") {\n            pos += 1;\n            output.push((url + descriptorsStr).trim());\n            break;\n          } else if (c === \"(\") {\n            inParens = true;\n          }\n        } else {\n          if (c === \")\") {\n            inParens = false;\n          }\n        }\n        descriptorsStr += c;\n        pos += 1;\n      }\n    }\n  }\n  return output.join(\", \");\n}\nconst cachedDocument = /* @__PURE__ */ new WeakMap();\nfunction absoluteToDoc(doc, attributeValue) {\n  if (!attributeValue || attributeValue.trim() === \"\") {\n    return attributeValue;\n  }\n  return getHref(doc, attributeValue);\n}\nfunction isSVGElement(el) {\n  return Boolean(el.tagName === \"svg\" || el.ownerSVGElement);\n}\nfunction getHref(doc, customHref) {\n  let a = cachedDocument.get(doc);\n  if (!a) {\n    a = doc.createElement(\"a\");\n    cachedDocument.set(doc, a);\n  }\n  if (!customHref) {\n    customHref = \"\";\n  } else if (customHref.startsWith(\"blob:\") || customHref.startsWith(\"data:\")) {\n    return customHref;\n  }\n  a.setAttribute(\"href\", customHref);\n  return a.href;\n}\nfunction transformAttribute(doc, tagName, name, value, element, maskAttributeFn, ignoreCSSAttributes) {\n  if (!value) {\n    return value;\n  }\n  if (name === \"src\" || name === \"href\" && !(tagName === \"use\" && value[0] === \"#\")) {\n    return absoluteToDoc(doc, value);\n  } else if (name === \"xlink:href\" && value[0] !== \"#\") {\n    return absoluteToDoc(doc, value);\n  } else if (name === \"background\" && (tagName === \"table\" || tagName === \"td\" || tagName === \"th\")) {\n    return absoluteToDoc(doc, value);\n  } else if (name === \"srcset\") {\n    return getAbsoluteSrcsetString(doc, value);\n  } else if (name === \"style\") {\n    let processedStyle = absoluteToStylesheet(value, getHref(doc));\n    if (ignoreCSSAttributes && ignoreCSSAttributes.size > 0) {\n      processedStyle = filterCSSPropertiesFromInlineStyle(\n        processedStyle,\n        ignoreCSSAttributes\n      );\n    }\n    return processedStyle;\n  } else if (tagName === \"object\" && name === \"data\") {\n    return absoluteToDoc(doc, value);\n  }\n  if (typeof maskAttributeFn === \"function\") {\n    return maskAttributeFn(name, value, element);\n  }\n  return value;\n}\nfunction ignoreAttribute(tagName, name, _value) {\n  return (tagName === \"video\" || tagName === \"audio\") && name === \"autoplay\";\n}\nfunction _isBlockedElement(element, blockClass, blockSelector, unblockSelector) {\n  try {\n    if (unblockSelector && element.matches(unblockSelector)) {\n      return false;\n    }\n    if (typeof blockClass === \"string\") {\n      if (element.classList.contains(blockClass)) {\n        return true;\n      }\n    } else {\n      for (let eIndex = element.classList.length; eIndex--; ) {\n        const className = element.classList[eIndex];\n        if (blockClass.test(className)) {\n          return true;\n        }\n      }\n    }\n    if (blockSelector) {\n      return element.matches(blockSelector);\n    }\n  } catch (e) {\n  }\n  return false;\n}\nfunction elementClassMatchesRegex(el, regex) {\n  for (let eIndex = el.classList.length; eIndex--; ) {\n    const className = el.classList[eIndex];\n    if (regex.test(className)) {\n      return true;\n    }\n  }\n  return false;\n}\nfunction classMatchesRegex(node, regex, checkAncestors) {\n  if (!node) return false;\n  if (checkAncestors) {\n    return distanceToMatch(\n      node,\n      (node2) => elementClassMatchesRegex(node2, regex)\n    ) >= 0;\n  } else if (node.nodeType === node.ELEMENT_NODE) {\n    return elementClassMatchesRegex(node, regex);\n  }\n  return false;\n}\nfunction distanceToMatch(node, matchPredicate, limit = Infinity, distance = 0) {\n  if (!node) return -1;\n  if (node.nodeType !== node.ELEMENT_NODE) return -1;\n  if (distance > limit) return -1;\n  if (matchPredicate(node)) return distance;\n  return distanceToMatch(node.parentNode, matchPredicate, limit, distance + 1);\n}\nfunction createMatchPredicate(className, selector) {\n  return (node) => {\n    const el = node;\n    if (el === null) return false;\n    try {\n      if (className) {\n        if (typeof className === \"string\") {\n          if (el.matches(`.${className}`)) return true;\n        } else if (elementClassMatchesRegex(el, className)) {\n          return true;\n        }\n      }\n      if (selector && el.matches(selector)) return true;\n      return false;\n    } catch {\n      return false;\n    }\n  };\n}\nfunction needMaskingText(node, maskTextClass, maskTextSelector, unmaskTextClass, unmaskTextSelector, maskAllText) {\n  try {\n    const el = node.nodeType === node.ELEMENT_NODE ? node : node.parentElement;\n    if (el === null) return false;\n    if (el.tagName === \"INPUT\") {\n      const autocomplete = el.getAttribute(\"autocomplete\");\n      const disallowedAutocompleteValues = [\n        \"current-password\",\n        \"new-password\",\n        \"cc-number\",\n        \"cc-exp\",\n        \"cc-exp-month\",\n        \"cc-exp-year\",\n        \"cc-csc\"\n      ];\n      if (disallowedAutocompleteValues.includes(autocomplete)) {\n        return true;\n      }\n    }\n    let maskDistance = -1;\n    let unmaskDistance = -1;\n    if (maskAllText) {\n      unmaskDistance = distanceToMatch(\n        el,\n        createMatchPredicate(unmaskTextClass, unmaskTextSelector)\n      );\n      if (unmaskDistance < 0) {\n        return true;\n      }\n      maskDistance = distanceToMatch(\n        el,\n        createMatchPredicate(maskTextClass, maskTextSelector),\n        unmaskDistance >= 0 ? unmaskDistance : Infinity\n      );\n    } else {\n      maskDistance = distanceToMatch(\n        el,\n        createMatchPredicate(maskTextClass, maskTextSelector)\n      );\n      if (maskDistance < 0) {\n        return false;\n      }\n      unmaskDistance = distanceToMatch(\n        el,\n        createMatchPredicate(unmaskTextClass, unmaskTextSelector),\n        maskDistance >= 0 ? maskDistance : Infinity\n      );\n    }\n    return maskDistance >= 0 ? unmaskDistance >= 0 ? maskDistance <= unmaskDistance : true : unmaskDistance >= 0 ? false : !!maskAllText;\n  } catch (e) {\n  }\n  return !!maskAllText;\n}\nfunction onceIframeLoaded(iframeEl, listener, iframeLoadTimeout) {\n  const win = getIFrameContentWindow(iframeEl);\n  if (!win) {\n    return;\n  }\n  let fired = false;\n  let readyState;\n  try {\n    readyState = win.document.readyState;\n  } catch (error) {\n    return;\n  }\n  if (readyState !== \"complete\") {\n    const timer = setTimeout(() => {\n      if (!fired) {\n        listener();\n        fired = true;\n      }\n    }, iframeLoadTimeout);\n    iframeEl.addEventListener(\"load\", () => {\n      clearTimeout(timer);\n      fired = true;\n      listener();\n    });\n    return;\n  }\n  const blankUrl = \"about:blank\";\n  if (win.location.href !== blankUrl || iframeEl.src === blankUrl || iframeEl.src === \"\") {\n    setTimeout(listener, 0);\n    return iframeEl.addEventListener(\"load\", listener);\n  }\n  iframeEl.addEventListener(\"load\", listener);\n}\nfunction onceStylesheetLoaded(link, listener, styleSheetLoadTimeout) {\n  let fired = false;\n  let styleSheetLoaded;\n  try {\n    styleSheetLoaded = link.sheet;\n  } catch (error) {\n    styleSheetLoaded = null;\n  }\n  if (styleSheetLoaded) return;\n  const timer = setTimeout(() => {\n    if (!fired) {\n      listener();\n      fired = true;\n    }\n  }, styleSheetLoadTimeout);\n  link.addEventListener(\"load\", () => {\n    clearTimeout(timer);\n    fired = true;\n    listener();\n  });\n}\nfunction serializeNode(n, options) {\n  const {\n    doc,\n    mirror,\n    blockClass,\n    blockSelector,\n    unblockSelector,\n    maskAllText,\n    maskAttributeFn,\n    maskTextClass,\n    unmaskTextClass,\n    maskTextSelector,\n    unmaskTextSelector,\n    inlineStylesheet,\n    maskInputOptions = {},\n    maskTextFn,\n    maskInputFn,\n    dataURLOptions = {},\n    inlineImages,\n    recordCanvas,\n    keepIframeSrcFn,\n    newlyAddedElement = false,\n    ignoreCSSAttributes\n  } = options;\n  const rootId = getRootId(doc, mirror);\n  switch (n.nodeType) {\n    case n.DOCUMENT_NODE:\n      if (n.compatMode !== \"CSS1Compat\") {\n        return {\n          type: NodeType.Document,\n          childNodes: [],\n          compatMode: n.compatMode\n          // probably \"BackCompat\"\n        };\n      } else {\n        return {\n          type: NodeType.Document,\n          childNodes: []\n        };\n      }\n    case n.DOCUMENT_TYPE_NODE:\n      return {\n        type: NodeType.DocumentType,\n        name: n.name,\n        publicId: n.publicId,\n        systemId: n.systemId,\n        rootId\n      };\n    case n.ELEMENT_NODE:\n      return serializeElementNode(n, {\n        doc,\n        blockClass,\n        blockSelector,\n        unblockSelector,\n        inlineStylesheet,\n        maskAttributeFn,\n        maskInputOptions,\n        maskInputFn,\n        dataURLOptions,\n        inlineImages,\n        recordCanvas,\n        keepIframeSrcFn,\n        newlyAddedElement,\n        rootId,\n        maskTextClass,\n        unmaskTextClass,\n        maskTextSelector,\n        unmaskTextSelector,\n        ignoreCSSAttributes\n      });\n    case n.TEXT_NODE:\n      return serializeTextNode(n, {\n        doc,\n        maskAllText,\n        maskTextClass,\n        unmaskTextClass,\n        maskTextSelector,\n        unmaskTextSelector,\n        maskTextFn,\n        maskInputOptions,\n        maskInputFn,\n        rootId\n      });\n    case n.CDATA_SECTION_NODE:\n      return {\n        type: NodeType.CDATA,\n        textContent: \"\",\n        rootId\n      };\n    case n.COMMENT_NODE:\n      return {\n        type: NodeType.Comment,\n        textContent: n.textContent || \"\",\n        rootId\n      };\n    default:\n      return false;\n  }\n}\nfunction getRootId(doc, mirror) {\n  if (!mirror.hasNode(doc)) return void 0;\n  const docId = mirror.getId(doc);\n  return docId === 1 ? void 0 : docId;\n}\nfunction serializeTextNode(n, options) {\n  const {\n    maskAllText,\n    maskTextClass,\n    unmaskTextClass,\n    maskTextSelector,\n    unmaskTextSelector,\n    maskTextFn,\n    maskInputOptions,\n    maskInputFn,\n    rootId\n  } = options;\n  const parentTagName = n.parentNode && n.parentNode.tagName;\n  let textContent = n.textContent;\n  const isStyle = parentTagName === \"STYLE\" ? true : void 0;\n  const isScript = parentTagName === \"SCRIPT\" ? true : void 0;\n  const isTextarea = parentTagName === \"TEXTAREA\" ? true : void 0;\n  if (isStyle && textContent) {\n    try {\n      if (n.nextSibling || n.previousSibling) {\n      } else if (n.parentNode.sheet?.cssRules) {\n        textContent = stringifyStylesheet(\n          n.parentNode.sheet\n        );\n      }\n    } catch (err) {\n      console.warn(\n        `Cannot get CSS styles from text's parentNode. Error: ${err}`,\n        n\n      );\n    }\n    textContent = absoluteToStylesheet(textContent, getHref(options.doc));\n  }\n  if (isScript) {\n    textContent = \"SCRIPT_PLACEHOLDER\";\n  }\n  const forceMask = needMaskingText(\n    n,\n    maskTextClass,\n    maskTextSelector,\n    unmaskTextClass,\n    unmaskTextSelector,\n    maskAllText\n  );\n  if (!isStyle && !isScript && !isTextarea && textContent && forceMask) {\n    textContent = maskTextFn ? maskTextFn(textContent, n.parentElement) : textContent.replace(/[\\S]/g, \"*\");\n  }\n  if (isTextarea && textContent && (maskInputOptions.textarea || forceMask)) {\n    textContent = maskInputFn ? maskInputFn(textContent, n.parentNode) : textContent.replace(/[\\S]/g, \"*\");\n  }\n  if (parentTagName === \"OPTION\" && textContent) {\n    const isInputMasked = shouldMaskInput({\n      type: null,\n      tagName: parentTagName,\n      maskInputOptions\n    });\n    textContent = maskInputValue({\n      isMasked: needMaskingText(\n        n,\n        maskTextClass,\n        maskTextSelector,\n        unmaskTextClass,\n        unmaskTextSelector,\n        isInputMasked\n      ),\n      element: n,\n      value: textContent,\n      maskInputFn\n    });\n  }\n  return {\n    type: NodeType.Text,\n    textContent: textContent || \"\",\n    isStyle,\n    rootId\n  };\n}\nfunction serializeElementNode(n, options) {\n  const {\n    doc,\n    blockClass,\n    blockSelector,\n    unblockSelector,\n    inlineStylesheet,\n    maskInputOptions = {},\n    maskAttributeFn,\n    maskInputFn,\n    dataURLOptions = {},\n    inlineImages,\n    recordCanvas,\n    keepIframeSrcFn,\n    newlyAddedElement = false,\n    rootId,\n    maskTextClass,\n    unmaskTextClass,\n    maskTextSelector,\n    unmaskTextSelector,\n    ignoreCSSAttributes\n  } = options;\n  const needBlock = _isBlockedElement(\n    n,\n    blockClass,\n    blockSelector,\n    unblockSelector\n  );\n  const tagName = getValidTagName(n);\n  let attributes2 = {};\n  const len = n.attributes.length;\n  for (let i = 0; i < len; i++) {\n    const attr = n.attributes[i];\n    if (attr.name && !ignoreAttribute(tagName, attr.name, attr.value)) {\n      attributes2[attr.name] = transformAttribute(\n        doc,\n        tagName,\n        toLowerCase(attr.name),\n        attr.value,\n        n,\n        maskAttributeFn,\n        ignoreCSSAttributes\n      );\n    }\n  }\n  if (tagName === \"link\" && inlineStylesheet) {\n    const stylesheet = Array.from(doc.styleSheets).find((s) => {\n      return s.href === n.href;\n    });\n    let cssText = null;\n    if (stylesheet) {\n      cssText = stringifyStylesheet(stylesheet);\n    }\n    if (cssText) {\n      attributes2.rel = null;\n      attributes2.href = null;\n      attributes2.crossorigin = null;\n      attributes2._cssText = absoluteToStylesheet(cssText, stylesheet.href);\n    }\n  }\n  if (tagName === \"style\" && n.sheet && // TODO: Currently we only try to get dynamic stylesheet when it is an empty style element\n  !(n.innerText || n.textContent || \"\").trim().length) {\n    const cssText = stringifyStylesheet(\n      n.sheet\n    );\n    if (cssText) {\n      attributes2._cssText = absoluteToStylesheet(cssText, getHref(doc));\n    }\n  }\n  if (tagName === \"input\" || tagName === \"textarea\" || tagName === \"select\" || tagName === \"option\") {\n    const el = n;\n    const type = getInputType(el);\n    const value = getInputValue(el, toUpperCase(tagName), type);\n    const checked = el.checked;\n    if (type !== \"submit\" && type !== \"button\" && value) {\n      const forceMask = needMaskingText(\n        el,\n        maskTextClass,\n        maskTextSelector,\n        unmaskTextClass,\n        unmaskTextSelector,\n        shouldMaskInput({\n          type,\n          tagName: toUpperCase(tagName),\n          maskInputOptions\n        })\n      );\n      attributes2.value = maskInputValue({\n        isMasked: forceMask,\n        element: el,\n        value,\n        maskInputFn\n      });\n    }\n    if (checked) {\n      attributes2.checked = checked;\n    }\n  }\n  if (tagName === \"option\") {\n    if (n.selected && !maskInputOptions[\"select\"]) {\n      attributes2.selected = true;\n    } else {\n      delete attributes2.selected;\n    }\n  }\n  if (tagName === \"canvas\" && recordCanvas) {\n    if (n.__context === \"2d\") {\n      if (!is2DCanvasBlank(n)) {\n        attributes2.rr_dataURL = n.toDataURL(\n          dataURLOptions.type,\n          dataURLOptions.quality\n        );\n      }\n    } else if (!(\"__context\" in n)) {\n      const canvasDataURL = n.toDataURL(\n        dataURLOptions.type,\n        dataURLOptions.quality\n      );\n      const blankCanvas = doc.createElement(\"canvas\");\n      blankCanvas.width = n.width;\n      blankCanvas.height = n.height;\n      const blankCanvasDataURL = blankCanvas.toDataURL(\n        dataURLOptions.type,\n        dataURLOptions.quality\n      );\n      if (canvasDataURL !== blankCanvasDataURL) {\n        attributes2.rr_dataURL = canvasDataURL;\n      }\n    }\n  }\n  if (tagName === \"img\" && inlineImages) {\n    if (!canvasService) {\n      canvasService = doc.createElement(\"canvas\");\n      canvasCtx = canvasService.getContext(\"2d\");\n    }\n    const image = n;\n    const imageSrc = image.currentSrc || image.getAttribute(\"src\") || \"<unknown-src>\";\n    const priorCrossOrigin = image.crossOrigin;\n    const recordInlineImage = () => {\n      image.removeEventListener(\"load\", recordInlineImage);\n      try {\n        canvasService.width = image.naturalWidth;\n        canvasService.height = image.naturalHeight;\n        canvasCtx.drawImage(image, 0, 0);\n        attributes2.rr_dataURL = canvasService.toDataURL(\n          dataURLOptions.type,\n          dataURLOptions.quality\n        );\n      } catch (err) {\n        if (image.crossOrigin !== \"anonymous\") {\n          image.crossOrigin = \"anonymous\";\n          if (image.complete && image.naturalWidth !== 0)\n            recordInlineImage();\n          else image.addEventListener(\"load\", recordInlineImage);\n          return;\n        } else {\n          console.warn(\n            `Cannot inline img src=${imageSrc}! Error: ${err}`\n          );\n        }\n      }\n      if (image.crossOrigin === \"anonymous\") {\n        priorCrossOrigin ? attributes2.crossOrigin = priorCrossOrigin : image.removeAttribute(\"crossorigin\");\n      }\n    };\n    if (image.complete && image.naturalWidth !== 0) recordInlineImage();\n    else image.addEventListener(\"load\", recordInlineImage);\n  }\n  if (tagName === \"audio\" || tagName === \"video\") {\n    attributes2.rr_mediaState = n.paused ? \"paused\" : \"played\";\n    attributes2.rr_mediaCurrentTime = n.currentTime;\n  }\n  if (!newlyAddedElement) {\n    if (n.scrollLeft) {\n      attributes2.rr_scrollLeft = n.scrollLeft;\n    }\n    if (n.scrollTop) {\n      attributes2.rr_scrollTop = n.scrollTop;\n    }\n  }\n  if (needBlock) {\n    const { width, height } = n.getBoundingClientRect();\n    attributes2 = {\n      class: attributes2.class,\n      rr_width: `${width}px`,\n      rr_height: `${height}px`\n    };\n  }\n  if (tagName === \"iframe\" && !keepIframeSrcFn(attributes2.src)) {\n    if (!needBlock && !getIFrameContentDocument(n)) {\n      attributes2.rr_src = attributes2.src;\n    }\n    delete attributes2.src;\n  }\n  let isCustomElement;\n  try {\n    if (customElements.get(tagName)) isCustomElement = true;\n  } catch (e) {\n  }\n  return {\n    type: NodeType.Element,\n    tagName,\n    attributes: attributes2,\n    childNodes: [],\n    isSVG: isSVGElement(n) || void 0,\n    needBlock,\n    rootId,\n    isCustom: isCustomElement\n  };\n}\nfunction lowerIfExists(maybeAttr) {\n  if (maybeAttr === void 0 || maybeAttr === null) {\n    return \"\";\n  } else {\n    return maybeAttr.toLowerCase();\n  }\n}\nfunction slimDOMExcluded(sn, slimDOMOptions) {\n  if (slimDOMOptions.comment && sn.type === NodeType.Comment) {\n    return true;\n  } else if (sn.type === NodeType.Element) {\n    if (slimDOMOptions.script && // script tag\n    (sn.tagName === \"script\" || // (module)preload link\n    sn.tagName === \"link\" && (sn.attributes.rel === \"preload\" || sn.attributes.rel === \"modulepreload\") || // prefetch link\n    sn.tagName === \"link\" && sn.attributes.rel === \"prefetch\" && typeof sn.attributes.href === \"string\" && extractFileExtension(sn.attributes.href) === \"js\")) {\n      return true;\n    } else if (slimDOMOptions.headFavicon && (sn.tagName === \"link\" && sn.attributes.rel === \"shortcut icon\" || sn.tagName === \"meta\" && (lowerIfExists(sn.attributes.name).match(\n      /^msapplication-tile(image|color)$/\n    ) || lowerIfExists(sn.attributes.name) === \"application-name\" || lowerIfExists(sn.attributes.rel) === \"icon\" || lowerIfExists(sn.attributes.rel) === \"apple-touch-icon\" || lowerIfExists(sn.attributes.rel) === \"shortcut icon\"))) {\n      return true;\n    } else if (sn.tagName === \"meta\") {\n      if (slimDOMOptions.headMetaDescKeywords && lowerIfExists(sn.attributes.name).match(/^description|keywords$/)) {\n        return true;\n      } else if (slimDOMOptions.headMetaSocial && (lowerIfExists(sn.attributes.property).match(/^(og|twitter|fb):/) || // og = opengraph (facebook)\n      lowerIfExists(sn.attributes.name).match(/^(og|twitter):/) || lowerIfExists(sn.attributes.name) === \"pinterest\")) {\n        return true;\n      } else if (slimDOMOptions.headMetaRobots && (lowerIfExists(sn.attributes.name) === \"robots\" || lowerIfExists(sn.attributes.name) === \"googlebot\" || lowerIfExists(sn.attributes.name) === \"bingbot\")) {\n        return true;\n      } else if (slimDOMOptions.headMetaHttpEquiv && sn.attributes[\"http-equiv\"] !== void 0) {\n        return true;\n      } else if (slimDOMOptions.headMetaAuthorship && (lowerIfExists(sn.attributes.name) === \"author\" || lowerIfExists(sn.attributes.name) === \"generator\" || lowerIfExists(sn.attributes.name) === \"framework\" || lowerIfExists(sn.attributes.name) === \"publisher\" || lowerIfExists(sn.attributes.name) === \"progid\" || lowerIfExists(sn.attributes.property).match(/^article:/) || lowerIfExists(sn.attributes.property).match(/^product:/))) {\n        return true;\n      } else if (slimDOMOptions.headMetaVerification && (lowerIfExists(sn.attributes.name) === \"google-site-verification\" || lowerIfExists(sn.attributes.name) === \"yandex-verification\" || lowerIfExists(sn.attributes.name) === \"csrf-token\" || lowerIfExists(sn.attributes.name) === \"p:domain_verify\" || lowerIfExists(sn.attributes.name) === \"verify-v1\" || lowerIfExists(sn.attributes.name) === \"verification\" || lowerIfExists(sn.attributes.name) === \"shopify-checkout-api-token\")) {\n        return true;\n      }\n    }\n  }\n  return false;\n}\nfunction serializeNodeWithId(n, options) {\n  const {\n    doc,\n    mirror,\n    blockClass,\n    blockSelector,\n    unblockSelector,\n    maskAllText,\n    maskTextClass,\n    unmaskTextClass,\n    maskTextSelector,\n    unmaskTextSelector,\n    skipChild = false,\n    inlineStylesheet = true,\n    maskInputOptions = {},\n    maskAttributeFn,\n    maskTextFn,\n    maskInputFn,\n    slimDOMOptions,\n    dataURLOptions = {},\n    inlineImages = false,\n    recordCanvas = false,\n    onSerialize,\n    onIframeLoad,\n    iframeLoadTimeout = 5e3,\n    onBlockedImageLoad,\n    onStylesheetLoad,\n    stylesheetLoadTimeout = 5e3,\n    keepIframeSrcFn = () => false,\n    newlyAddedElement = false,\n    ignoreCSSAttributes\n  } = options;\n  let { preserveWhiteSpace = true } = options;\n  const _serializedNode = serializeNode(n, {\n    doc,\n    mirror,\n    blockClass,\n    blockSelector,\n    maskAllText,\n    unblockSelector,\n    maskTextClass,\n    unmaskTextClass,\n    maskTextSelector,\n    unmaskTextSelector,\n    inlineStylesheet,\n    maskInputOptions,\n    maskAttributeFn,\n    maskTextFn,\n    maskInputFn,\n    dataURLOptions,\n    inlineImages,\n    recordCanvas,\n    keepIframeSrcFn,\n    newlyAddedElement,\n    ignoreCSSAttributes\n  });\n  if (!_serializedNode) {\n    console.warn(n, \"not serialized\");\n    return null;\n  }\n  let id;\n  if (mirror.hasNode(n)) {\n    id = mirror.getId(n);\n  } else if (slimDOMExcluded(_serializedNode, slimDOMOptions) || !preserveWhiteSpace && _serializedNode.type === NodeType.Text && !_serializedNode.isStyle && !_serializedNode.textContent.trim().length) {\n    id = IGNORED_NODE;\n  } else {\n    id = genId();\n  }\n  const serializedNode2 = Object.assign(_serializedNode, { id });\n  mirror.add(n, serializedNode2);\n  if (id === IGNORED_NODE) {\n    return null;\n  }\n  if (onSerialize) {\n    onSerialize(n);\n  }\n  let recordChild = !skipChild;\n  if (serializedNode2.type === NodeType.Element) {\n    recordChild = recordChild && !serializedNode2.needBlock;\n    const shadowRoot = n.shadowRoot;\n    if (shadowRoot && isNativeShadowDom(shadowRoot))\n      serializedNode2.isShadowHost = true;\n  }\n  if ((serializedNode2.type === NodeType.Document || serializedNode2.type === NodeType.Element) && recordChild) {\n    if (slimDOMOptions.headWhitespace && serializedNode2.type === NodeType.Element && serializedNode2.tagName === \"head\") {\n      preserveWhiteSpace = false;\n    }\n    const bypassOptions = {\n      doc,\n      mirror,\n      blockClass,\n      blockSelector,\n      maskAllText,\n      unblockSelector,\n      maskTextClass,\n      unmaskTextClass,\n      maskTextSelector,\n      unmaskTextSelector,\n      skipChild,\n      inlineStylesheet,\n      maskInputOptions,\n      maskAttributeFn,\n      maskTextFn,\n      maskInputFn,\n      slimDOMOptions,\n      dataURLOptions,\n      inlineImages,\n      recordCanvas,\n      preserveWhiteSpace,\n      onSerialize,\n      onIframeLoad,\n      iframeLoadTimeout,\n      onBlockedImageLoad,\n      onStylesheetLoad,\n      stylesheetLoadTimeout,\n      keepIframeSrcFn,\n      ignoreCSSAttributes\n    };\n    const childNodes = n.childNodes ? Array.from(n.childNodes) : [];\n    for (const childN of childNodes) {\n      const serializedChildNode = serializeNodeWithId(childN, bypassOptions);\n      if (serializedChildNode) {\n        serializedNode2.childNodes.push(serializedChildNode);\n      }\n    }\n    if (isElement(n) && n.shadowRoot) {\n      for (const childN of Array.from(n.shadowRoot.childNodes)) {\n        const serializedChildNode = serializeNodeWithId(childN, bypassOptions);\n        if (serializedChildNode) {\n          isNativeShadowDom(n.shadowRoot) && (serializedChildNode.isShadow = true);\n          serializedNode2.childNodes.push(serializedChildNode);\n        }\n      }\n    }\n  }\n  if (n.parentNode && isShadowRoot(n.parentNode) && isNativeShadowDom(n.parentNode)) {\n    serializedNode2.isShadow = true;\n  }\n  if (serializedNode2.type === NodeType.Element && serializedNode2.tagName === \"iframe\" && !serializedNode2.needBlock) {\n    onceIframeLoaded(\n      n,\n      () => {\n        const iframeDoc = getIFrameContentDocument(n);\n        if (iframeDoc && onIframeLoad) {\n          const serializedIframeNode = serializeNodeWithId(iframeDoc, {\n            doc: iframeDoc,\n            mirror,\n            blockClass,\n            blockSelector,\n            unblockSelector,\n            maskAllText,\n            maskTextClass,\n            unmaskTextClass,\n            maskTextSelector,\n            unmaskTextSelector,\n            skipChild: false,\n            inlineStylesheet,\n            maskInputOptions,\n            maskAttributeFn,\n            maskTextFn,\n            maskInputFn,\n            slimDOMOptions,\n            dataURLOptions,\n            inlineImages,\n            recordCanvas,\n            preserveWhiteSpace,\n            onSerialize,\n            onIframeLoad,\n            iframeLoadTimeout,\n            onStylesheetLoad,\n            stylesheetLoadTimeout,\n            keepIframeSrcFn,\n            ignoreCSSAttributes\n          });\n          if (serializedIframeNode) {\n            onIframeLoad(\n              n,\n              serializedIframeNode\n            );\n          }\n        }\n      },\n      iframeLoadTimeout\n    );\n  }\n  if (serializedNode2.type === NodeType.Element && serializedNode2.tagName === \"img\" && !n.complete && serializedNode2.needBlock) {\n    const image = n;\n    const updateImageDimensions = () => {\n      if (image.isConnected && !image.complete && onBlockedImageLoad) {\n        try {\n          const rect = image.getBoundingClientRect();\n          if (rect.width > 0 && rect.height > 0) {\n            onBlockedImageLoad(image, serializedNode2, rect);\n          }\n        } catch (error) {\n        }\n      }\n      image.removeEventListener(\"load\", updateImageDimensions);\n    };\n    if (image.isConnected) {\n      image.addEventListener(\"load\", updateImageDimensions);\n    }\n  }\n  if (serializedNode2.type === NodeType.Element && serializedNode2.tagName === \"link\" && typeof serializedNode2.attributes.rel === \"string\" && (serializedNode2.attributes.rel === \"stylesheet\" || serializedNode2.attributes.rel === \"preload\" && typeof serializedNode2.attributes.href === \"string\" && extractFileExtension(serializedNode2.attributes.href) === \"css\")) {\n    onceStylesheetLoaded(\n      n,\n      () => {\n        if (onStylesheetLoad) {\n          const serializedLinkNode = serializeNodeWithId(n, {\n            doc,\n            mirror,\n            blockClass,\n            blockSelector,\n            unblockSelector,\n            maskAllText,\n            maskTextClass,\n            unmaskTextClass,\n            maskTextSelector,\n            unmaskTextSelector,\n            skipChild: false,\n            inlineStylesheet,\n            maskInputOptions,\n            maskAttributeFn,\n            maskTextFn,\n            maskInputFn,\n            slimDOMOptions,\n            dataURLOptions,\n            inlineImages,\n            recordCanvas,\n            preserveWhiteSpace,\n            onSerialize,\n            onIframeLoad,\n            iframeLoadTimeout,\n            onStylesheetLoad,\n            stylesheetLoadTimeout,\n            keepIframeSrcFn,\n            ignoreCSSAttributes\n          });\n          if (serializedLinkNode) {\n            onStylesheetLoad(\n              n,\n              serializedLinkNode\n            );\n          }\n        }\n      },\n      stylesheetLoadTimeout\n    );\n  }\n  if (serializedNode2.type === NodeType.Element) {\n    delete serializedNode2.needBlock;\n  }\n  return serializedNode2;\n}\nfunction snapshot(n, options) {\n  const {\n    mirror = new Mirror(),\n    blockClass = \"rr-block\",\n    blockSelector = null,\n    unblockSelector = null,\n    maskAllText = false,\n    maskTextClass = \"rr-mask\",\n    unmaskTextClass = null,\n    maskTextSelector = null,\n    unmaskTextSelector = null,\n    inlineStylesheet = true,\n    inlineImages = false,\n    recordCanvas = false,\n    maskAllInputs = false,\n    maskAttributeFn,\n    maskTextFn,\n    maskInputFn,\n    slimDOM = false,\n    dataURLOptions,\n    preserveWhiteSpace,\n    onSerialize,\n    onIframeLoad,\n    iframeLoadTimeout,\n    onBlockedImageLoad,\n    onStylesheetLoad,\n    stylesheetLoadTimeout,\n    keepIframeSrcFn = () => false,\n    ignoreCSSAttributes = /* @__PURE__ */ new Set([])\n  } = options || {};\n  const maskInputOptions = maskAllInputs === true ? {\n    color: true,\n    date: true,\n    \"datetime-local\": true,\n    email: true,\n    month: true,\n    number: true,\n    range: true,\n    search: true,\n    tel: true,\n    text: true,\n    time: true,\n    url: true,\n    week: true,\n    textarea: true,\n    select: true\n  } : maskAllInputs === false ? {} : maskAllInputs;\n  const slimDOMOptions = slimDOM === true || slimDOM === \"all\" ? (\n    // if true: set of sensible options that should not throw away any information\n    {\n      script: true,\n      comment: true,\n      headFavicon: true,\n      headWhitespace: true,\n      headMetaDescKeywords: slimDOM === \"all\",\n      // destructive\n      headMetaSocial: true,\n      headMetaRobots: true,\n      headMetaHttpEquiv: true,\n      headMetaAuthorship: true,\n      headMetaVerification: true\n    }\n  ) : slimDOM === false ? {} : slimDOM;\n  return serializeNodeWithId(n, {\n    doc: n,\n    mirror,\n    blockClass,\n    blockSelector,\n    unblockSelector,\n    maskAllText,\n    maskTextClass,\n    unmaskTextClass,\n    maskTextSelector,\n    unmaskTextSelector,\n    skipChild: false,\n    inlineStylesheet,\n    maskInputOptions,\n    maskAttributeFn,\n    maskTextFn,\n    maskInputFn,\n    slimDOMOptions,\n    dataURLOptions,\n    inlineImages,\n    recordCanvas,\n    preserveWhiteSpace,\n    onSerialize,\n    onIframeLoad,\n    iframeLoadTimeout,\n    onBlockedImageLoad,\n    onStylesheetLoad,\n    stylesheetLoadTimeout,\n    keepIframeSrcFn,\n    newlyAddedElement: false,\n    ignoreCSSAttributes\n  });\n}\nfunction visitSnapshot(node, onVisit) {\n  function walk(current) {\n    onVisit(current);\n    if (current.type === NodeType.Document || current.type === NodeType.Element) {\n      current.childNodes.forEach(walk);\n    }\n  }\n  walk(node);\n}\nfunction cleanupSnapshot() {\n  _id = 1;\n}\nconst commentre = /\\/\\*[^*]*\\*+([^/*][^*]*\\*+)*\\//g;\nfunction parse(css, options = {}) {\n  let lineno = 1;\n  let column = 1;\n  function updatePosition(str) {\n    const lines = str.match(/\\n/g);\n    if (lines) {\n      lineno += lines.length;\n    }\n    const i = str.lastIndexOf(\"\\n\");\n    column = i === -1 ? column + str.length : str.length - i;\n  }\n  function position() {\n    const start = { line: lineno, column };\n    return (node) => {\n      node.position = new Position(start);\n      whitespace();\n      return node;\n    };\n  }\n  const _Position = class _Position {\n    constructor(start) {\n      __publicField(this, \"content\");\n      __publicField(this, \"start\");\n      __publicField(this, \"end\");\n      __publicField(this, \"source\");\n      this.start = start;\n      this.end = { line: lineno, column };\n      this.source = options.source;\n      this.content = _Position.content;\n    }\n  };\n  __publicField(_Position, \"content\");\n  let Position = _Position;\n  Position.content = css;\n  const errorsList = [];\n  function error(msg) {\n    const err = new Error(\n      `${options.source || \"\"}:${lineno}:${column}: ${msg}`\n    );\n    err.reason = msg;\n    err.filename = options.source;\n    err.line = lineno;\n    err.column = column;\n    err.source = css;\n    if (options.silent) {\n      errorsList.push(err);\n    } else {\n      throw err;\n    }\n  }\n  function stylesheet() {\n    const rulesList = rules();\n    return {\n      type: \"stylesheet\",\n      stylesheet: {\n        source: options.source,\n        rules: rulesList,\n        parsingErrors: errorsList\n      }\n    };\n  }\n  function open() {\n    return match(/^{\\s*/);\n  }\n  function close() {\n    return match(/^}/);\n  }\n  function rules() {\n    let node;\n    const rules2 = [];\n    whitespace();\n    comments(rules2);\n    while (css.length && css.charAt(0) !== \"}\" && (node = atrule() || rule())) {\n      if (node) {\n        rules2.push(node);\n        comments(rules2);\n      }\n    }\n    return rules2;\n  }\n  function match(re) {\n    const m = re.exec(css);\n    if (!m) {\n      return;\n    }\n    const str = m[0];\n    updatePosition(str);\n    css = css.slice(str.length);\n    return m;\n  }\n  function whitespace() {\n    match(/^\\s*/);\n  }\n  function comments(rules2 = []) {\n    let c;\n    while (c = comment()) {\n      if (c) {\n        rules2.push(c);\n      }\n      c = comment();\n    }\n    return rules2;\n  }\n  function comment() {\n    const pos = position();\n    if (\"/\" !== css.charAt(0) || \"*\" !== css.charAt(1)) {\n      return;\n    }\n    let i = 2;\n    while (\"\" !== css.charAt(i) && (\"*\" !== css.charAt(i) || \"/\" !== css.charAt(i + 1))) {\n      ++i;\n    }\n    i += 2;\n    if (\"\" === css.charAt(i - 1)) {\n      return error(\"End of comment missing\");\n    }\n    const str = css.slice(2, i - 2);\n    column += 2;\n    updatePosition(str);\n    css = css.slice(i);\n    column += 2;\n    return pos({\n      type: \"comment\",\n      comment: str\n    });\n  }\n  function selector() {\n    const m = match(/^([^{]+)/);\n    if (!m) {\n      return;\n    }\n    const splitSelectors = trim(m[0]).replace(/\\/\\*[\\s\\S]*?\\*\\/+/g, \"\").replace(/\"(?:\\\\\"|[^\"])*\"|'(?:\\\\'|[^'])*'/g, (m2) => {\n      return m2.replace(/,/g, \"‌\");\n    }).split(/\\s*(?![^(]*\\)),\\s*/);\n    if (splitSelectors.length <= 1) {\n      return splitSelectors.map((s) => {\n        return s.replace(/\\u200C/g, \",\");\n      });\n    }\n    let i = 0;\n    let j = 0;\n    const len = splitSelectors.length;\n    const finalSelectors = [];\n    while (i < len) {\n      const openingParensCount = (splitSelectors[i].match(/\\(/g) || []).length;\n      const closingParensCount = (splitSelectors[i].match(/\\)/g) || []).length;\n      let unbalancedParens = openingParensCount - closingParensCount;\n      if (unbalancedParens >= 1) {\n        let foundClosingSelector = false;\n        j = i + 1;\n        while (j < len) {\n          const nextOpeningParensCount = (splitSelectors[j].match(/\\(/g) || []).length;\n          const nextClosingParensCount = (splitSelectors[j].match(/\\)/g) || []).length;\n          const nextUnbalancedParens = nextClosingParensCount - nextOpeningParensCount;\n          if (nextUnbalancedParens === unbalancedParens) {\n            finalSelectors.push(splitSelectors.slice(i, j + 1).join(\",\"));\n            i = j + 1;\n            foundClosingSelector = true;\n            break;\n          }\n          j++;\n          unbalancedParens -= nextUnbalancedParens;\n        }\n        if (foundClosingSelector) {\n          continue;\n        }\n        splitSelectors.slice(i, len).forEach((selector2) => selector2 && finalSelectors.push(selector2));\n        break;\n      }\n      splitSelectors[i] && finalSelectors.push(splitSelectors[i]);\n      i++;\n    }\n    return finalSelectors.map((s) => {\n      return s.replace(/\\u200C/g, \",\");\n    });\n  }\n  function declaration() {\n    const pos = position();\n    const propMatch = match(/^(\\*?[-#\\/\\*\\\\\\w]+(\\[[0-9a-z_-]+\\])?)\\s*/);\n    if (!propMatch) {\n      return;\n    }\n    const prop = trim(propMatch[0]);\n    if (!match(/^:\\s*/)) {\n      return error(`property missing ':'`);\n    }\n    const val = match(/^((?:'(?:\\\\'|.)*?'|\"(?:\\\\\"|.)*?\"|\\([^\\)]*?\\)|[^};])+)/);\n    const ret = pos({\n      type: \"declaration\",\n      property: prop.replace(commentre, \"\"),\n      value: val ? trim(val[0]).replace(commentre, \"\") : \"\"\n    });\n    match(/^[;\\s]*/);\n    return ret;\n  }\n  function declarations() {\n    const decls = [];\n    if (!open()) {\n      return error(`missing '{'`);\n    }\n    comments(decls);\n    let decl;\n    while (decl = declaration()) {\n      if (decl !== false) {\n        decls.push(decl);\n        comments(decls);\n      }\n      decl = declaration();\n    }\n    if (!close()) {\n      return error(`missing '}'`);\n    }\n    return decls;\n  }\n  function keyframe() {\n    let m;\n    const vals = [];\n    const pos = position();\n    while (m = match(/^((\\d+\\.\\d+|\\.\\d+|\\d+)%?|[a-z]+)\\s*/)) {\n      vals.push(m[1]);\n      match(/^,\\s*/);\n    }\n    if (!vals.length) {\n      return;\n    }\n    return pos({\n      type: \"keyframe\",\n      values: vals,\n      declarations: declarations()\n    });\n  }\n  function atkeyframes() {\n    const pos = position();\n    let m = match(/^@([-\\w]+)?keyframes\\s*/);\n    if (!m) {\n      return;\n    }\n    const vendor = m[1];\n    m = match(/^([-\\w]+)\\s*/);\n    if (!m) {\n      return error(\"@keyframes missing name\");\n    }\n    const name = m[1];\n    if (!open()) {\n      return error(`@keyframes missing '{'`);\n    }\n    let frame;\n    let frames = comments();\n    while (frame = keyframe()) {\n      frames.push(frame);\n      frames = frames.concat(comments());\n    }\n    if (!close()) {\n      return error(`@keyframes missing '}'`);\n    }\n    return pos({\n      type: \"keyframes\",\n      name,\n      vendor,\n      keyframes: frames\n    });\n  }\n  function atsupports() {\n    const pos = position();\n    const m = match(/^@supports *([^{]+)/);\n    if (!m) {\n      return;\n    }\n    const supports = trim(m[1]);\n    if (!open()) {\n      return error(`@supports missing '{'`);\n    }\n    const style = comments().concat(rules());\n    if (!close()) {\n      return error(`@supports missing '}'`);\n    }\n    return pos({\n      type: \"supports\",\n      supports,\n      rules: style\n    });\n  }\n  function athost() {\n    const pos = position();\n    const m = match(/^@host\\s*/);\n    if (!m) {\n      return;\n    }\n    if (!open()) {\n      return error(`@host missing '{'`);\n    }\n    const style = comments().concat(rules());\n    if (!close()) {\n      return error(`@host missing '}'`);\n    }\n    return pos({\n      type: \"host\",\n      rules: style\n    });\n  }\n  function atmedia() {\n    const pos = position();\n    const m = match(/^@media *([^{]+)/);\n    if (!m) {\n      return;\n    }\n    const media = trim(m[1]);\n    if (!open()) {\n      return error(`@media missing '{'`);\n    }\n    const style = comments().concat(rules());\n    if (!close()) {\n      return error(`@media missing '}'`);\n    }\n    return pos({\n      type: \"media\",\n      media,\n      rules: style\n    });\n  }\n  function atcustommedia() {\n    const pos = position();\n    const m = match(/^@custom-media\\s+(--[^\\s]+)\\s*([^{;]+);/);\n    if (!m) {\n      return;\n    }\n    return pos({\n      type: \"custom-media\",\n      name: trim(m[1]),\n      media: trim(m[2])\n    });\n  }\n  function atpage() {\n    const pos = position();\n    const m = match(/^@page */);\n    if (!m) {\n      return;\n    }\n    const sel = selector() || [];\n    if (!open()) {\n      return error(`@page missing '{'`);\n    }\n    let decls = comments();\n    let decl;\n    while (decl = declaration()) {\n      decls.push(decl);\n      decls = decls.concat(comments());\n    }\n    if (!close()) {\n      return error(`@page missing '}'`);\n    }\n    return pos({\n      type: \"page\",\n      selectors: sel,\n      declarations: decls\n    });\n  }\n  function atdocument() {\n    const pos = position();\n    const m = match(/^@([-\\w]+)?document *([^{]+)/);\n    if (!m) {\n      return;\n    }\n    const vendor = trim(m[1]);\n    const doc = trim(m[2]);\n    if (!open()) {\n      return error(`@document missing '{'`);\n    }\n    const style = comments().concat(rules());\n    if (!close()) {\n      return error(`@document missing '}'`);\n    }\n    return pos({\n      type: \"document\",\n      document: doc,\n      vendor,\n      rules: style\n    });\n  }\n  function atfontface() {\n    const pos = position();\n    const m = match(/^@font-face\\s*/);\n    if (!m) {\n      return;\n    }\n    if (!open()) {\n      return error(`@font-face missing '{'`);\n    }\n    let decls = comments();\n    let decl;\n    while (decl = declaration()) {\n      decls.push(decl);\n      decls = decls.concat(comments());\n    }\n    if (!close()) {\n      return error(`@font-face missing '}'`);\n    }\n    return pos({\n      type: \"font-face\",\n      declarations: decls\n    });\n  }\n  const atimport = _compileAtrule(\"import\");\n  const atcharset = _compileAtrule(\"charset\");\n  const atnamespace = _compileAtrule(\"namespace\");\n  function _compileAtrule(name) {\n    const re = new RegExp(\n      \"^@\" + name + \"\\\\s*((?:\" + [\n        /[^\\\\]\"(?:\\\\\"|[^\"])*\"/.source,\n        // consume any quoted parts (checking that the double quote isn't itself escaped)\n        /[^\\\\]'(?:\\\\'|[^'])*'/.source,\n        // same but for single quotes\n        \"[^;]\"\n      ].join(\"|\") + \")+);\"\n    );\n    return () => {\n      const pos = position();\n      const m = match(re);\n      if (!m) {\n        return;\n      }\n      const ret = { type: name };\n      ret[name] = m[1].trim();\n      return pos(ret);\n    };\n  }\n  function atrule() {\n    if (css[0] !== \"@\") {\n      return;\n    }\n    return atkeyframes() || atmedia() || atcustommedia() || atsupports() || atimport() || atcharset() || atnamespace() || atdocument() || atpage() || athost() || atfontface();\n  }\n  function rule() {\n    const pos = position();\n    const sel = selector();\n    if (!sel) {\n      return error(\"selector missing\");\n    }\n    comments();\n    return pos({\n      type: \"rule\",\n      selectors: sel,\n      declarations: declarations()\n    });\n  }\n  return addParent(stylesheet());\n}\nfunction trim(str) {\n  return str ? str.replace(/^\\s+|\\s+$/g, \"\") : \"\";\n}\nfunction addParent(obj, parent) {\n  const isNode = obj && typeof obj.type === \"string\";\n  const childParent = isNode ? obj : parent;\n  for (const k of Object.keys(obj)) {\n    const value = obj[k];\n    if (Array.isArray(value)) {\n      value.forEach((v) => {\n        addParent(v, childParent);\n      });\n    } else if (value && typeof value === \"object\") {\n      addParent(value, childParent);\n    }\n  }\n  if (isNode) {\n    Object.defineProperty(obj, \"parent\", {\n      configurable: true,\n      writable: true,\n      enumerable: false,\n      value: parent || null\n    });\n  }\n  return obj;\n}\nconst tagMap = {\n  script: \"noscript\",\n  // camel case svg element tag names\n  altglyph: \"altGlyph\",\n  altglyphdef: \"altGlyphDef\",\n  altglyphitem: \"altGlyphItem\",\n  animatecolor: \"animateColor\",\n  animatemotion: \"animateMotion\",\n  animatetransform: \"animateTransform\",\n  clippath: \"clipPath\",\n  feblend: \"feBlend\",\n  fecolormatrix: \"feColorMatrix\",\n  fecomponenttransfer: \"feComponentTransfer\",\n  fecomposite: \"feComposite\",\n  feconvolvematrix: \"feConvolveMatrix\",\n  fediffuselighting: \"feDiffuseLighting\",\n  fedisplacementmap: \"feDisplacementMap\",\n  fedistantlight: \"feDistantLight\",\n  fedropshadow: \"feDropShadow\",\n  feflood: \"feFlood\",\n  fefunca: \"feFuncA\",\n  fefuncb: \"feFuncB\",\n  fefuncg: \"feFuncG\",\n  fefuncr: \"feFuncR\",\n  fegaussianblur: \"feGaussianBlur\",\n  feimage: \"feImage\",\n  femerge: \"feMerge\",\n  femergenode: \"feMergeNode\",\n  femorphology: \"feMorphology\",\n  feoffset: \"feOffset\",\n  fepointlight: \"fePointLight\",\n  fespecularlighting: \"feSpecularLighting\",\n  fespotlight: \"feSpotLight\",\n  fetile: \"feTile\",\n  feturbulence: \"feTurbulence\",\n  foreignobject: \"foreignObject\",\n  glyphref: \"glyphRef\",\n  lineargradient: \"linearGradient\",\n  radialgradient: \"radialGradient\"\n};\nfunction getTagName(n) {\n  let tagName = tagMap[n.tagName] ? tagMap[n.tagName] : n.tagName;\n  if (tagName === \"link\" && n.attributes._cssText) {\n    tagName = \"style\";\n  }\n  return tagName;\n}\nfunction escapeRegExp(str) {\n  return str.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n}\nconst HOVER_SELECTOR = /([^\\\\]):hover/;\nconst HOVER_SELECTOR_GLOBAL = new RegExp(HOVER_SELECTOR.source, \"g\");\nfunction addHoverClass(cssText, cache) {\n  const cachedStyle = cache?.stylesWithHoverClass.get(cssText);\n  if (cachedStyle) return cachedStyle;\n  if (cssText.length >= 1e6) {\n    return cssText;\n  }\n  const ast = parse(cssText, {\n    silent: true\n  });\n  if (!ast.stylesheet) {\n    return cssText;\n  }\n  const selectors = [];\n  ast.stylesheet.rules.forEach((rule) => {\n    if (\"selectors\" in rule) {\n      (rule.selectors || []).forEach((selector) => {\n        if (HOVER_SELECTOR.test(selector)) {\n          selectors.push(selector);\n        }\n      });\n    }\n  });\n  if (selectors.length === 0) {\n    return cssText;\n  }\n  const selectorMatcher = new RegExp(\n    selectors.filter((selector, index) => selectors.indexOf(selector) === index).sort((a, b) => b.length - a.length).map((selector) => {\n      return escapeRegExp(selector);\n    }).join(\"|\"),\n    \"g\"\n  );\n  const result = cssText.replace(selectorMatcher, (selector) => {\n    const newSelector = selector.replace(HOVER_SELECTOR_GLOBAL, \"$1.\\\\:hover\");\n    return `${selector}, ${newSelector}`;\n  });\n  cache?.stylesWithHoverClass.set(cssText, result);\n  return result;\n}\nfunction createCache() {\n  const stylesWithHoverClass = /* @__PURE__ */ new Map();\n  return {\n    stylesWithHoverClass\n  };\n}\nfunction buildNode(n, options) {\n  const { doc, hackCss, cache } = options;\n  switch (n.type) {\n    case NodeType.Document:\n      return doc.implementation.createDocument(null, \"\", null);\n    case NodeType.DocumentType:\n      return doc.implementation.createDocumentType(\n        n.name || \"html\",\n        n.publicId,\n        n.systemId\n      );\n    case NodeType.Element: {\n      const tagName = getTagName(n);\n      let node;\n      if (n.isSVG) {\n        node = doc.createElementNS(\"http://www.w3.org/2000/svg\", tagName);\n      } else {\n        if (\n          // If the tag name is a custom element name\n          n.isCustom && // If the browser supports custom elements\n          doc.defaultView?.customElements && // If the custom element hasn't been defined yet\n          !doc.defaultView.customElements.get(n.tagName)\n        )\n          try {\n            doc.defaultView.customElements.define(\n              n.tagName,\n              class extends doc.defaultView.HTMLElement {\n              }\n            );\n          } catch (e) {\n            console.warn(\"Cannot define custom element\", e);\n          }\n        node = doc.createElement(tagName);\n      }\n      const specialAttributes = {};\n      for (const name in n.attributes) {\n        if (!Object.prototype.hasOwnProperty.call(n.attributes, name)) {\n          continue;\n        }\n        let value = n.attributes[name];\n        if (tagName === \"option\" && name === \"selected\" && value === false) {\n          continue;\n        }\n        if (value === null) {\n          continue;\n        }\n        if (value === true) value = \"\";\n        if (name.startsWith(\"rr_\")) {\n          specialAttributes[name] = value;\n          continue;\n        }\n        const isTextarea = tagName === \"textarea\" && name === \"value\";\n        const isRemoteOrDynamicCss = tagName === \"style\" && name === \"_cssText\";\n        if (isRemoteOrDynamicCss && hackCss && typeof value === \"string\") {\n          value = addHoverClass(value, cache);\n        }\n        if ((isTextarea || isRemoteOrDynamicCss) && typeof value === \"string\") {\n          const child = doc.createTextNode(value);\n          for (const c of Array.from(node.childNodes)) {\n            if (c.nodeType === node.TEXT_NODE) {\n              node.removeChild(c);\n            }\n          }\n          node.appendChild(child);\n          continue;\n        }\n        try {\n          if (n.isSVG && name === \"xlink:href\") {\n            node.setAttributeNS(\n              \"http://www.w3.org/1999/xlink\",\n              name,\n              value.toString()\n            );\n          } else if (name === \"onload\" || name === \"onclick\" || name.substring(0, 7) === \"onmouse\") {\n            node.setAttribute(\"_\" + name, value.toString());\n          } else if (tagName === \"meta\" && n.attributes[\"http-equiv\"] === \"Content-Security-Policy\" && name === \"content\") {\n            node.setAttribute(\"csp-content\", value.toString());\n            continue;\n          } else if (tagName === \"link\" && (n.attributes.rel === \"preload\" || n.attributes.rel === \"modulepreload\")) {\n          } else if (tagName === \"link\" && n.attributes.rel === \"prefetch\" && typeof n.attributes.href === \"string\" && extractFileExtension(n.attributes.href) === \"js\") {\n          } else if (tagName === \"img\" && n.attributes.srcset && n.attributes.rr_dataURL) {\n            node.setAttribute(\n              \"rrweb-original-srcset\",\n              n.attributes.srcset\n            );\n          } else {\n            node.setAttribute(name, value.toString());\n          }\n        } catch (error) {\n        }\n      }\n      for (const name in specialAttributes) {\n        const value = specialAttributes[name];\n        if (tagName === \"canvas\" && name === \"rr_dataURL\") {\n          const image = doc.createElement(\"img\");\n          image.onload = () => {\n            const ctx = node.getContext(\"2d\");\n            if (ctx) {\n              ctx.drawImage(image, 0, 0, image.width, image.height);\n            }\n          };\n          image.src = value.toString();\n          if (node.RRNodeType)\n            node.rr_dataURL = value.toString();\n        } else if (tagName === \"img\" && name === \"rr_dataURL\") {\n          const image = node;\n          if (!image.currentSrc.startsWith(\"data:\")) {\n            image.setAttribute(\n              \"rrweb-original-src\",\n              n.attributes.src\n            );\n            image.src = value.toString();\n          }\n        }\n        if (name === \"rr_width\") {\n          node.style.setProperty(\"width\", value.toString());\n        } else if (name === \"rr_height\") {\n          node.style.setProperty(\"height\", value.toString());\n        } else if (name === \"rr_mediaCurrentTime\" && typeof value === \"number\") {\n          node.currentTime = value;\n        } else if (name === \"rr_mediaState\") {\n          switch (value) {\n            case \"played\":\n              node.play().catch((e) => console.warn(\"media playback error\", e));\n              break;\n            case \"paused\":\n              node.pause();\n              break;\n          }\n        }\n      }\n      if (n.isShadowHost) {\n        if (!node.shadowRoot) {\n          node.attachShadow({ mode: \"open\" });\n        } else {\n          while (node.shadowRoot.firstChild) {\n            node.shadowRoot.removeChild(node.shadowRoot.firstChild);\n          }\n        }\n      }\n      return node;\n    }\n    case NodeType.Text:\n      return doc.createTextNode(\n        n.isStyle && hackCss ? addHoverClass(n.textContent, cache) : n.textContent\n      );\n    case NodeType.CDATA:\n      if (!(doc instanceof XMLDocument)) {\n        return null;\n      }\n      return doc.createCDATASection(n.textContent);\n    case NodeType.Comment:\n      return doc.createComment(n.textContent);\n    default:\n      return null;\n  }\n}\nfunction buildNodeWithSN(n, options) {\n  const {\n    doc,\n    mirror,\n    skipChild = false,\n    hackCss = true,\n    afterAppend,\n    cache\n  } = options;\n  if (mirror.has(n.id)) {\n    const nodeInMirror = mirror.getNode(n.id);\n    const meta = mirror.getMeta(nodeInMirror);\n    if (isNodeMetaEqual(meta, n)) return mirror.getNode(n.id);\n  }\n  let node = buildNode(n, { doc, hackCss, cache });\n  if (!node) {\n    return null;\n  }\n  if (n.rootId && mirror.getNode(n.rootId) !== doc) {\n    mirror.replace(n.rootId, doc);\n  }\n  if (n.type === NodeType.Document) {\n    doc.close();\n    doc.open();\n    if (n.compatMode === \"BackCompat\" && n.childNodes && n.childNodes[0].type !== NodeType.DocumentType) {\n      if (n.childNodes[0].type === NodeType.Element && \"xmlns\" in n.childNodes[0].attributes && n.childNodes[0].attributes.xmlns === \"http://www.w3.org/1999/xhtml\") {\n        doc.write(\n          '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"\">'\n        );\n      } else {\n        doc.write(\n          '<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"\">'\n        );\n      }\n    }\n    node = doc;\n  }\n  mirror.add(node, n);\n  if ((n.type === NodeType.Document || n.type === NodeType.Element) && !skipChild) {\n    for (const childN of n.childNodes) {\n      const childNode = buildNodeWithSN(childN, {\n        doc,\n        mirror,\n        skipChild: false,\n        hackCss,\n        afterAppend,\n        cache\n      });\n      if (!childNode) {\n        console.warn(\"Failed to rebuild\", childN);\n        continue;\n      }\n      if (childN.isShadow && isElement(node) && node.shadowRoot) {\n        node.shadowRoot.appendChild(childNode);\n      } else if (n.type === NodeType.Document && childN.type == NodeType.Element) {\n        const htmlElement = childNode;\n        let body = null;\n        htmlElement.childNodes.forEach((child) => {\n          if (child.nodeName === \"BODY\") body = child;\n        });\n        if (body) {\n          htmlElement.removeChild(body);\n          node.appendChild(childNode);\n          htmlElement.appendChild(body);\n        } else {\n          node.appendChild(childNode);\n        }\n      } else {\n        node.appendChild(childNode);\n      }\n      if (afterAppend) {\n        afterAppend(childNode, childN.id);\n      }\n    }\n  }\n  return node;\n}\nfunction visit(mirror, onVisit) {\n  function walk(node) {\n    onVisit(node);\n  }\n  for (const id of mirror.getIds()) {\n    if (mirror.has(id)) {\n      walk(mirror.getNode(id));\n    }\n  }\n}\nfunction handleScroll(node, mirror) {\n  const n = mirror.getMeta(node);\n  if (n?.type !== NodeType.Element) {\n    return;\n  }\n  const el = node;\n  for (const name in n.attributes) {\n    if (!(Object.prototype.hasOwnProperty.call(n.attributes, name) && name.startsWith(\"rr_\"))) {\n      continue;\n    }\n    const value = n.attributes[name];\n    if (name === \"rr_scrollLeft\") {\n      el.scrollLeft = value;\n    }\n    if (name === \"rr_scrollTop\") {\n      el.scrollTop = value;\n    }\n  }\n}\nfunction rebuild(n, options) {\n  const {\n    doc,\n    onVisit,\n    hackCss = true,\n    afterAppend,\n    cache,\n    mirror = new Mirror()\n  } = options;\n  const node = buildNodeWithSN(n, {\n    doc,\n    mirror,\n    skipChild: false,\n    hackCss,\n    afterAppend,\n    cache\n  });\n  visit(mirror, (visitedNode) => {\n    if (onVisit) {\n      onVisit(visitedNode);\n    }\n    handleScroll(visitedNode, mirror);\n  });\n  return node;\n}\nexport {\n  IGNORED_NODE,\n  Mirror,\n  NodeType,\n  addHoverClass,\n  buildNodeWithSN,\n  classMatchesRegex,\n  cleanupSnapshot,\n  clearTimeout,\n  createCache,\n  createMatchPredicate,\n  createMirror,\n  distanceToMatch,\n  escapeImportStatement,\n  extractFileExtension,\n  filterCSSPropertiesFromInlineStyle,\n  fixAllCssProperty,\n  fixSafariColons,\n  genId,\n  getIFrameContentDocument,\n  getIFrameContentWindow,\n  getInputType,\n  getInputValue,\n  ignoreAttribute,\n  is2DCanvasBlank,\n  isCSSImportRule,\n  isCSSStyleRule,\n  isElement,\n  isNativeShadowDom,\n  isNodeMetaEqual,\n  isShadowRoot,\n  maskInputValue,\n  needMaskingText,\n  onRequestAnimationFrame,\n  rebuild,\n  serializeNodeWithId,\n  setTimeout,\n  shouldMaskInput,\n  snapshot,\n  stringifyRule,\n  stringifyStylesheet,\n  toLowerCase,\n  toUpperCase,\n  transformAttribute,\n  visitSnapshot\n};\n//# sourceMappingURL=rrweb-snapshot.js.map\n", "// Note that these are the serialized attributes and not attributes directly on\n// the DOM Node. Attributes we are interested in:\nconst ATTRIBUTES_TO_RECORD = new Set([\n  'id',\n  'class',\n  'aria-label',\n  'role',\n  'name',\n  'alt',\n  'title',\n  'data-test-id',\n  'data-testid',\n  'disabled',\n  'aria-disabled',\n  'data-sentry-component',\n]);\n\n/**\n * Inclusion list of attributes that we want to record from the DOM element\n */\nexport function getAttributesToRecord(attributes: Record<string, unknown>): Record<string, unknown> {\n  const obj: Record<string, unknown> = {};\n  if (!attributes['data-sentry-component'] && attributes['data-sentry-element']) {\n    attributes['data-sentry-component'] = attributes['data-sentry-element'];\n  }\n  for (const key in attributes) {\n    if (ATTRIBUTES_TO_RECORD.has(key)) {\n      let normalizedKey = key;\n\n      if (key === 'data-testid' || key === 'data-test-id') {\n        normalizedKey = 'testId';\n      }\n\n      obj[normalizedKey] = attributes[key];\n    }\n  }\n\n  return obj;\n}\n", "import { htmlTreeAsString } from '@sentry/browser-utils';\nimport type { Breadcrumb, HandlerDataDom } from '@sentry/core';\nimport { record } from '@sentry/rrweb';\nimport type { serializedElementNodeWithId, serializedNodeWithId } from '@sentry/rrweb-snapshot';\nimport { NodeType } from '@sentry/rrweb-snapshot';\nimport type { ReplayContainer } from '../types';\nimport { createBreadcrumb } from '../util/createBreadcrumb';\nimport { handleClick } from './handleClick';\nimport { addBreadcrumbEvent } from './util/addBreadcrumbEvent';\nimport { getClickTargetNode, getTargetNode } from './util/domUtils';\nimport { getAttributesToRecord } from './util/getAttributesToRecord';\n\nexport const handleDomListener: (replay: ReplayContainer) => (handlerData: HandlerDataDom) => void = (\n  replay: ReplayContainer,\n) => {\n  return (handlerData: HandlerDataDom): void => {\n    if (!replay.isEnabled()) {\n      return;\n    }\n\n    const result = handleDom(handlerData);\n\n    if (!result) {\n      return;\n    }\n\n    const isClick = handlerData.name === 'click';\n    const event = isClick ? (handlerData.event as PointerEvent) : undefined;\n    // Ignore clicks if ctrl/alt/meta/shift keys are held down as they alter behavior of clicks (e.g. open in new tab)\n    if (\n      isClick &&\n      replay.clickDetector &&\n      event?.target &&\n      !event.altKey &&\n      !event.metaKey &&\n      !event.ctrlKey &&\n      !event.shiftKey\n    ) {\n      handleClick(\n        replay.clickDetector,\n        result as Breadcrumb & { timestamp: number; data: { nodeId: number } },\n        getClickTargetNode(handlerData.event as Event) as HTMLElement,\n      );\n    }\n\n    addBreadcrumbEvent(replay, result);\n  };\n};\n\n/** Get the base DOM breadcrumb. */\nexport function getBaseDomBreadcrumb(target: Node | null, message: string): Breadcrumb {\n  const nodeId = record.mirror.getId(target);\n  const node = nodeId && record.mirror.getNode(nodeId);\n  const meta = node && record.mirror.getMeta(node);\n  const element = meta && isElement(meta) ? meta : null;\n\n  return {\n    message,\n    data: element\n      ? {\n          nodeId,\n          node: {\n            id: nodeId,\n            tagName: element.tagName,\n            textContent: Array.from(element.childNodes)\n              .map((node: serializedNodeWithId) => node.type === NodeType.Text && node.textContent)\n              .filter(Boolean) // filter out empty values\n              .map(text => (text as string).trim())\n              .join(''),\n            attributes: getAttributesToRecord(element.attributes),\n          },\n        }\n      : {},\n  };\n}\n\n/**\n * An event handler to react to DOM events.\n * Exported for tests.\n */\nexport function handleDom(handlerData: HandlerDataDom): Breadcrumb | null {\n  const { target, message } = getDomTarget(handlerData);\n\n  return createBreadcrumb({\n    category: `ui.${handlerData.name}`,\n    ...getBaseDomBreadcrumb(target, message),\n  });\n}\n\nfunction getDomTarget(handlerData: HandlerDataDom): { target: Node | null; message: string } {\n  const isClick = handlerData.name === 'click';\n\n  let message: string | undefined;\n  let target: Node | null = null;\n\n  // Accessing event.target can throw (see getsentry/raven-js#838, #768)\n  try {\n    target = isClick ? getClickTargetNode(handlerData.event as Event) : getTargetNode(handlerData.event as Event);\n    message = htmlTreeAsString(target, { maxStringLength: 200 }) || '<unknown>';\n  } catch {\n    message = '<unknown>';\n  }\n\n  return { target, message };\n}\n\nfunction isElement(node: serializedNodeWithId): node is serializedElementNodeWithId {\n  return node.type === NodeType.Element;\n}\n", "import { htmlTreeAsString } from '@sentry/browser-utils';\nimport type { Breadcrumb } from '@sentry/core';\nimport type { ReplayContainer } from '../types';\nimport { createBreadcrumb } from '../util/createBreadcrumb';\nimport { getBaseDomBreadcrumb } from './handleDom';\nimport { addBreadcrumbEvent } from './util/addBreadcrumbEvent';\n\n/** Handle keyboard events & create breadcrumbs. */\nexport function handleKeyboardEvent(replay: ReplayContainer, event: KeyboardEvent): void {\n  if (!replay.isEnabled()) {\n    return;\n  }\n\n  // Update user activity, but do not restart recording as it can create\n  // noisy/low-value replays (e.g. user comes back from idle, hits alt-tab, new\n  // session with a single \"keydown\" breadcrumb is created)\n  replay.updateUserActivity();\n\n  const breadcrumb = getKeyboardBreadcrumb(event);\n\n  if (!breadcrumb) {\n    return;\n  }\n\n  addBreadcrumbEvent(replay, breadcrumb);\n}\n\n/** exported only for tests */\nexport function getKeyboardBreadcrumb(event: KeyboardEvent): Breadcrumb | null {\n  const { metaKey, shiftKey, ctrlKey, altKey, key, target } = event;\n\n  // never capture for input fields\n  if (!target || isInputElement(target as HTMLElement) || !key) {\n    return null;\n  }\n\n  // Note: We do not consider shift here, as that means \"uppercase\"\n  const hasModifierKey = metaKey || ctrlKey || altKey;\n  const isCharacterKey = key.length === 1; // other keys like Escape, Tab, etc have a longer length\n\n  // Do not capture breadcrumb if only a word key is pressed\n  // This could leak e.g. user input\n  if (!hasModifierKey && isCharacterKey) {\n    return null;\n  }\n\n  const message = htmlTreeAsString(target, { maxStringLength: 200 }) || '<unknown>';\n  const baseBreadcrumb = getBaseDomBreadcrumb(target as Node, message);\n\n  return createBreadcrumb({\n    category: 'ui.keyDown',\n    message,\n    data: {\n      ...baseBreadcrumb.data,\n      metaKey,\n      shiftKey,\n      ctrlKey,\n      altKey,\n      key,\n    },\n  });\n}\n\nfunction isInputElement(target: HTMLElement): boolean {\n  return target.tagName === 'INPUT' || target.tagName === 'TEXTAREA' || target.isContentEditable;\n}\n", "import { browserPerformanceTimeOrigin } from '@sentry/core';\nimport { record } from '@sentry/rrweb';\nimport { WINDOW } from '../constants';\nimport type {\n  AllPerformanceEntry,\n  AllPerformanceEntryData,\n  ExperimentalPerformanceResourceTiming,\n  NavigationData,\n  PaintData,\n  ReplayContainer,\n  ReplayPerformanceEntry,\n  ResourceData,\n  WebVitalData,\n} from '../types';\n\n// Map entryType -> function to normalize data for event\nconst ENTRY_TYPES: Record<\n  string,\n  (entry: AllPerformanceEntry) => null | ReplayPerformanceEntry<AllPerformanceEntryData>\n> = {\n  // @ts-expect-error TODO: entry type does not fit the create* functions entry type\n  resource: createResourceEntry,\n  paint: createPaintEntry,\n  // @ts-expect-error TODO: entry type does not fit the create* functions entry type\n  navigation: createNavigationEntry,\n};\n\nexport interface Metric {\n  /**\n   * The current value of the metric.\n   */\n  value: number;\n\n  /**\n   * The rating as to whether the metric value is within the \"good\",\n   * \"needs improvement\", or \"poor\" thresholds of the metric.\n   */\n  rating: 'good' | 'needs-improvement' | 'poor';\n\n  /**\n   * Any performance entries relevant to the metric value calculation.\n   * The array may also be empty if the metric value was not based on any\n   * entries (e.g. a CLS value of 0 given no layout shifts).\n   */\n  entries: PerformanceEntry[] | LayoutShift[];\n}\n\ninterface LayoutShift extends PerformanceEntry {\n  value: number;\n  sources: LayoutShiftAttribution[];\n  hadRecentInput: boolean;\n}\n\ninterface LayoutShiftAttribution {\n  node?: Node;\n  previousRect: DOMRectReadOnly;\n  currentRect: DOMRectReadOnly;\n}\n\n/**\n * Handler creater for web vitals\n */\nexport function webVitalHandler(\n  getter: (metric: Metric) => ReplayPerformanceEntry<AllPerformanceEntryData>,\n  replay: ReplayContainer,\n): (data: { metric: Metric }) => void {\n  return ({ metric }) => void replay.replayPerformanceEntries.push(getter(metric));\n}\n\n/**\n * Create replay performance entries from the browser performance entries.\n */\nexport function createPerformanceEntries(\n  entries: AllPerformanceEntry[],\n): ReplayPerformanceEntry<AllPerformanceEntryData>[] {\n  return entries.map(createPerformanceEntry).filter(Boolean) as ReplayPerformanceEntry<AllPerformanceEntryData>[];\n}\n\nfunction createPerformanceEntry(entry: AllPerformanceEntry): ReplayPerformanceEntry<AllPerformanceEntryData> | null {\n  const entryType = ENTRY_TYPES[entry.entryType];\n  if (!entryType) {\n    return null;\n  }\n\n  return entryType(entry);\n}\n\nfunction getAbsoluteTime(time: number): number {\n  // browserPerformanceTimeOrigin can be undefined if `performance` or\n  // `performance.now` doesn't exist, but this is already checked by this integration\n  return ((browserPerformanceTimeOrigin() || WINDOW.performance.timeOrigin) + time) / 1000;\n}\n\nfunction createPaintEntry(entry: PerformancePaintTiming): ReplayPerformanceEntry<PaintData> {\n  const { duration, entryType, name, startTime } = entry;\n\n  const start = getAbsoluteTime(startTime);\n  return {\n    type: entryType,\n    name,\n    start,\n    end: start + duration,\n    data: undefined,\n  };\n}\n\nfunction createNavigationEntry(entry: PerformanceNavigationTiming): ReplayPerformanceEntry<NavigationData> | null {\n  const {\n    entryType,\n    name,\n    decodedBodySize,\n    duration,\n    domComplete,\n    encodedBodySize,\n    domContentLoadedEventStart,\n    domContentLoadedEventEnd,\n    domInteractive,\n    loadEventStart,\n    loadEventEnd,\n    redirectCount,\n    startTime,\n    transferSize,\n    type,\n  } = entry;\n\n  // Ignore entries with no duration, they do not seem to be useful and cause dupes\n  if (duration === 0) {\n    return null;\n  }\n\n  return {\n    type: `${entryType}.${type}`,\n    start: getAbsoluteTime(startTime),\n    end: getAbsoluteTime(domComplete),\n    name,\n    data: {\n      size: transferSize,\n      decodedBodySize,\n      encodedBodySize,\n      duration,\n      domInteractive,\n      domContentLoadedEventStart,\n      domContentLoadedEventEnd,\n      loadEventStart,\n      loadEventEnd,\n      domComplete,\n      redirectCount,\n    },\n  };\n}\n\nfunction createResourceEntry(\n  entry: ExperimentalPerformanceResourceTiming,\n): ReplayPerformanceEntry<ResourceData> | null {\n  const {\n    entryType,\n    initiatorType,\n    name,\n    responseEnd,\n    startTime,\n    decodedBodySize,\n    encodedBodySize,\n    responseStatus,\n    transferSize,\n  } = entry;\n\n  // Core SDK handles these\n  if (['fetch', 'xmlhttprequest'].includes(initiatorType)) {\n    return null;\n  }\n\n  return {\n    type: `${entryType}.${initiatorType}`,\n    start: getAbsoluteTime(startTime),\n    end: getAbsoluteTime(responseEnd),\n    name,\n    data: {\n      size: transferSize,\n      statusCode: responseStatus,\n      decodedBodySize,\n      encodedBodySize,\n    },\n  };\n}\n\n/**\n * Add a LCP event to the replay based on a LCP metric.\n */\nexport function getLargestContentfulPaint(metric: Metric): ReplayPerformanceEntry<WebVitalData> {\n  const lastEntry = metric.entries[metric.entries.length - 1] as (PerformanceEntry & { element?: Node }) | undefined;\n  const node = lastEntry?.element ? [lastEntry.element] : undefined;\n  return getWebVital(metric, 'largest-contentful-paint', node);\n}\n\nfunction isLayoutShift(entry: PerformanceEntry): entry is LayoutShift {\n  return (entry as LayoutShift).sources !== undefined;\n}\n\n/**\n * Add a CLS event to the replay based on a CLS metric.\n */\nexport function getCumulativeLayoutShift(metric: Metric): ReplayPerformanceEntry<WebVitalData> {\n  const layoutShifts: WebVitalData['attributions'] = [];\n  const nodes: Node[] = [];\n  for (const entry of metric.entries) {\n    if (isLayoutShift(entry)) {\n      const nodeIds = [];\n      for (const source of entry.sources) {\n        if (source.node) {\n          nodes.push(source.node);\n          const nodeId = record.mirror.getId(source.node);\n          if (nodeId) {\n            nodeIds.push(nodeId);\n          }\n        }\n      }\n      layoutShifts.push({ value: entry.value, nodeIds: nodeIds.length ? nodeIds : undefined });\n    }\n  }\n\n  return getWebVital(metric, 'cumulative-layout-shift', nodes, layoutShifts);\n}\n\n/**\n * Add an INP event to the replay based on an INP metric.\n */\nexport function getInteractionToNextPaint(metric: Metric): ReplayPerformanceEntry<WebVitalData> {\n  const lastEntry = metric.entries[metric.entries.length - 1] as (PerformanceEntry & { target?: Node }) | undefined;\n  const node = lastEntry?.target ? [lastEntry.target] : undefined;\n  return getWebVital(metric, 'interaction-to-next-paint', node);\n}\n\n/**\n * Add an web vital event to the replay based on the web vital metric.\n */\nfunction getWebVital(\n  metric: Metric,\n  name: string,\n  nodes: Node[] | undefined,\n  attributions?: WebVitalData['attributions'],\n): ReplayPerformanceEntry<WebVitalData> {\n  const value = metric.value;\n  const rating = metric.rating;\n\n  const end = getAbsoluteTime(value);\n\n  return {\n    type: 'web-vital',\n    name,\n    start: end,\n    end,\n    data: {\n      value,\n      size: value,\n      rating,\n      nodeIds: nodes ? nodes.map(node => record.mirror.getId(node)) : undefined,\n      attributions,\n    },\n  };\n}\n", "import {\n  addClsInstrumentationHandler,\n  addInpInstrumentationHandler,\n  addLcpInstrumentationHandler,\n  addPerformanceInstrumentationHandler,\n} from '@sentry/browser-utils';\nimport type { ReplayContainer } from '../types';\nimport {\n  getCumulativeLayoutShift,\n  getInteractionToNextPaint,\n  getLargestContentfulPaint,\n  webVitalHandler,\n} from '../util/createPerformanceEntries';\n\n/**\n * Sets up a PerformanceObserver to listen to all performance entry types.\n * Returns a callback to stop observing.\n */\nexport function setupPerformanceObserver(replay: ReplayContainer): () => void {\n  function addPerformanceEntry(entry: PerformanceEntry): void {\n    // It is possible for entries to come up multiple times\n    if (!replay.performanceEntries.includes(entry)) {\n      replay.performanceEntries.push(entry);\n    }\n  }\n\n  function onEntries({ entries }: { entries: PerformanceEntry[] }): void {\n    entries.forEach(addPerformanceEntry);\n  }\n\n  const clearCallbacks: (() => void)[] = [];\n\n  (['navigation', 'paint', 'resource'] as const).forEach(type => {\n    clearCallbacks.push(addPerformanceInstrumentationHandler(type, onEntries));\n  });\n\n  clearCallbacks.push(\n    addLcpInstrumentationHandler(webVitalHandler(getLargestContentfulPaint, replay)),\n    addClsInstrumentationHandler(webVitalHandler(getCumulativeLayoutShift, replay)),\n    addInpInstrumentationHandler(webVitalHandler(getInteractionToNextPaint, replay)),\n  );\n\n  // A callback to cleanup all handlers\n  return () => {\n    clearCallbacks.forEach(clearCallback => clearCallback());\n  };\n}\n", "declare const __DEBUG_BUILD__: boolean;\n\n/**\n * This serves as a build time flag that will be true by default, but false in non-debug builds or if users replace `__SENTRY_DEBUG__` in their generated code.\n *\n * ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking.\n */\nexport const DEBUG_BUILD = __DEBUG_BUILD__;\n", "export default `var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),s=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),a=function(t,e){for(var i=new n(31),s=0;s<31;++s)i[s]=e+=1<<t[s-1];var a=new r(i[30]);for(s=1;s<30;++s)for(var o=i[s];o<i[s+1];++o)a[o]=o-i[s]<<5|s;return{b:i,r:a}},o=a(e,2),h=o.b,f=o.r;h[28]=258,f[258]=28;for(var l=a(i,0).r,u=new n(32768),c=0;c<32768;++c){var v=(43690&c)>>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,s=0,a=new n(r);s<i;++s)t[s]&&++a[t[s]-1];var o,h=new n(r);for(s=1;s<r;++s)h[s]=h[s-1]+a[s-1]<<1;if(e){o=new n(1<<r);var f=15-r;for(s=0;s<i;++s)if(t[s])for(var l=s<<4|t[s],c=r-t[s],v=h[t[s]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>f]=l}else for(o=new n(i),s=0;s<i;++s)t[s]&&(o[s]=u[h[t[s]-1]++]>>15-t[s]);return o},p=new t(288);for(c=0;c<144;++c)p[c]=8;for(c=144;c<256;++c)p[c]=9;for(c=256;c<280;++c)p[c]=7;for(c=280;c<288;++c)p[c]=8;var g=new t(32);for(c=0;c<32;++c)g[c]=5;var w=d(p,9,0),y=d(g,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=[\"unexpected EOF\",\"invalid block type\",\"invalid length/literal\",\"invalid distance\",\"stream finished\",\"no stream handler\",,\"no callback\",\"invalid UTF-8 data\",\"extra field too long\",\"date not in range 1980-2099\",\"filename too long\",\"stream finishing\",\"invalid zip data\"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},_=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},x=function(r,e){for(var i=[],s=0;s<r.length;++s)r[s]&&i.push({s:s,f:r[s]});var a=i.length,o=i.slice();if(!a)return{t:F,l:0};if(1==a){var h=new t(i[0].s+1);return h[i[0].s]=1,{t:h,l:1}}i.sort(function(t,n){return t.f-n.f}),i.push({s:-1,f:25001});var f=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:f.f+l.f,l:f,r:l};c!=a-1;)f=i[i[u].f<i[v].f?u++:v++],l=i[u!=c&&i[u].f<i[v].f?u++:v++],i[c++]={s:-1,f:f.f+l.f,l:f,r:l};var d=o[0].s;for(s=1;s<a;++s)o[s].s>d&&(d=o[s].s);var p=new n(d+1),g=A(i[c-1],p,0);if(g>e){s=0;var w=0,y=g-e,m=1<<y;for(o.sort(function(t,n){return p[n.s]-p[t.s]||t.f-n.f});s<a;++s){var b=o[s].s;if(!(p[b]>e))break;w+=m-(1<<g-p[b]),p[b]=e}for(w>>=y;w>0;){var M=o[s].s;p[M]<e?w-=1<<e-p[M]++-1:++s}for(;s>=0&&w;--s){var E=o[s].s;p[E]==e&&(--p[E],++w)}g=e}return{t:new t(p),l:g}},A=function(t,n,r){return-1==t.s?Math.max(A(t.l,n,r+1),A(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,s=t[0],a=1,o=function(t){e[i++]=t},h=1;h<=r;++h)if(t[h]==s&&h!=r)++a;else{if(!s&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(s),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(s);a=1,s=t[h]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e<n.length;++e)r+=t[e]*n[e];return r},k=function(t,n,r){var e=r.length,i=m(n+2);t[i]=255&e,t[i+1]=e>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var s=0;s<e;++s)t[i+s+4]=r[s];return 8*(i+4+e)},U=function(t,r,a,o,h,f,l,u,c,v,m){z(r,m++,a),++h[256];for(var b=x(h,15),M=b.t,E=b.l,A=x(f,15),U=A.t,C=A.l,F=D(M),I=F.c,S=F.n,L=D(U),O=L.c,j=L.n,q=new n(19),B=0;B<I.length;++B)++q[31&I[B]];for(B=0;B<O.length;++B)++q[31&O[B]];for(var G=x(q,7),H=G.t,J=G.l,K=19;K>4&&!H[s[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(h,p)+T(f,g)+l,X=T(h,M)+T(f,U)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(X<W)),m+=2,X<W){N=d(M,E,0),P=M,Q=d(U,C,0),R=U;var Y=d(H,J,0);z(r,m,S-257),z(r,m+5,j-1),z(r,m+10,K-4),m+=14;for(B=0;B<K;++B)z(r,m+3*B,H[s[B]]);m+=3*K;for(var Z=[I,O],$=0;$<2;++$){var tt=Z[$];for(B=0;B<tt.length;++B){var nt=31&tt[B];z(r,m,Y[nt]),m+=H[nt],nt>15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=w,P=p,Q=y,R=g;for(B=0;B<u;++B){var rt=o[B];if(rt>255){_(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;_(r,m,Q[et]),m+=R[et],et>3&&(_(r,m,rt>>5&8191),m+=i[et])}else _(r,m,N[rt]),m+=P[rt]}return _(r,m,N[256]),m+P[256]},C=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,s=0|r.length,a=0;a!=s;){for(var o=Math.min(a+2655,s);a<o;++a)i+=e+=r[a];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},L=function(s,a,o,h,u){if(!u&&(u={l:1},a.dictionary)){var c=a.dictionary.subarray(-32768),v=new t(c.length+s.length);v.set(c),v.set(s,c.length),s=v,u.w=c.length}return function(s,a,o,h,u,c){var v=c.z||s.length,d=new t(h+v+5*(1+Math.ceil(v/7e3))+u),p=d.subarray(h,d.length-u),g=c.l,w=7&(c.r||0);if(a){w&&(p[0]=c.r>>3);for(var y=C[a-1],M=y>>13,E=8191&y,z=(1<<o)-1,_=c.p||new n(32768),x=c.h||new n(z+1),A=Math.ceil(o/3),D=2*A,T=function(t){return(s[t]^s[t+1]<<A^s[t+2]<<D)&z},F=new r(25e3),I=new n(288),S=new n(32),L=0,O=0,j=c.i||0,q=0,B=c.w||0,G=0;j+2<v;++j){var H=T(j),J=32767&j,K=x[H];if(_[J]=K,x[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!g)){w=U(s,p,0,F,I,S,O,q,G,j-G,w),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(s[j+Q]==s[j+Q-W]){for(var $=0;$<Z&&s[j+$]==s[j+$-W];++$);if($>Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;P<tt;++P){var rt=j-W+P&32767,et=rt-_[rt]&32767;et>nt&&(nt=et,K=rt)}}}W+=(J=K)-(K=_[J])&32767}if(R){F[q++]=268435456|f[Q]<<18|l[R];var it=31&f[Q],st=31&l[R];O+=e[it]+i[st],++I[257+it],++S[st],B=j+Q,++L}else F[q++]=s[j],++I[s[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=s[j],++I[s[j]];w=U(s,p,g,F,I,S,O,q,G,j-G,w),g||(c.r=7&w|p[w/8|0]<<3,w-=7,c.h=x,c.p=_,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+g;j+=65535){var at=j+65535;at>=v&&(p[w/8|0]=g,at=v),w=k(p,w+1,s.subarray(j,at))}c.i=v}return b(d,0,h+m(w)+u)}(s,null==a.level?6:a.level,null==a.mem?u.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(s.length)))):20:12+a.mem,o,h,u)},O=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},j=function(){function n(n,r){if(\"function\"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(L(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var s=this.b.length-this.s.z;this.b.set(n.subarray(0,s),this.s.z),this.s.z=this.b.length,this.p(this.b,!1),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(s),32768),this.s.z=n.length-s+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n.prototype.flush=function(){this.ondata||E(5),this.s.l&&E(4),this.p(this.b,!1),this.s.w=this.s.i,this.s.i-=2},n}();function q(t,n){n||(n={});var r=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e<n.length;++e)r=I[255&r^n[e]]^r>>>8;t=r},d:function(){return~t}}}(),e=t.length;r.p(t);var i,s=L(t,n,10+((i=n).filename?i.filename.length+1:0),8),a=s.length;return function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&O(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}}(s,n),O(s,a-8,r.d()),O(s,a-4,e),s}var B=function(){function t(t,n){this.c=S(),this.v=1,j.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),j.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=L(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=S();i.p(n.dictionary),O(t,2,i.d())}}(r,this.o),this.v=0),n&&O(r,r.length-4,this.c.d()),this.ondata(r,n)},t.prototype.flush=function(){j.prototype.flush.call(this)},t}(),G=\"undefined\"!=typeof TextEncoder&&new TextEncoder,H=\"undefined\"!=typeof TextDecoder&&new TextDecoder;try{H.decode(F,{stream:!0})}catch(t){}var J=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(K(t),this.d=n||!1)},t}();function K(n,r){if(G)return G.encode(n);for(var e=n.length,i=new t(n.length+(n.length>>1)),s=0,a=function(t){i[s++]=t},o=0;o<e;++o){if(s+5>i.length){var h=new t(s+8+(e-o<<1));h.set(i),i=h}var f=n.charCodeAt(o);f<128||r?a(f):f<2048?(a(192|f>>6),a(128|63&f)):f>55295&&f<57344?(a(240|(f=65536+(1047552&f)|1023&n.charCodeAt(++o))>>18),a(128|f>>12&63),a(128|f>>6&63),a(128|63&f)):(a(224|f>>12),a(128|f>>6&63),a(128|63&f))}return b(i,0,s)}const N=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error(\"Adding invalid event\");const n=this._hasEvents?\",\":\"\";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push(\"]\",!0);const t=function(t){let n=0;for(const r of t)n+=r.length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n<i;n++){const i=t[n];r.set(i,e),e+=i.length}return r}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new B,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new J((t,n)=>{this.deflate.push(t,n)}),this.stream.push(\"[\")}},P={clear:()=>{N.clear()},addEvent:t=>N.addEvent(t),finish:()=>N.finish(),compress:t=>function(t){return q(K(t))}(t)};addEventListener(\"message\",function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in P&&\"function\"==typeof P[n])try{const t=P[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}}),postMessage({id:void 0,method:\"init\",success:!0,response:void 0});`;\n", "import t from\"./worker\";function e(){const e=new Blob([t],{type:\"text/javascript\"});return URL.createObjectURL(e)}export{e as getWorkerURL};\n", "import type { ConsoleLevel, SeverityLevel } from '@sentry/core';\nimport { addBreadcrumb, captureException, debug as coreDebug, severityLevelFromString } from '@sentry/core';\nimport { DEBUG_BUILD } from '../debug-build';\n\ntype ReplayConsoleLevels = Extract<ConsoleLevel, 'log' | 'warn' | 'error'>;\nconst CONSOLE_LEVELS: readonly ReplayConsoleLevels[] = ['log', 'warn', 'error'] as const;\nconst PREFIX = '[Replay] ';\n\ninterface LoggerConfig {\n  captureExceptions: boolean;\n  traceInternals: boolean;\n}\n\ntype CoreDebugLogger = typeof coreDebug;\n\ninterface ReplayDebugLogger extends CoreDebugLogger {\n  /**\n   * Calls `debug.log` but saves breadcrumb in the next tick due to race\n   * conditions before replay is initialized.\n   */\n  infoTick: CoreDebugLogger['log'];\n  /**\n   * Captures exceptions (`Error`) if \"capture internal exceptions\" is enabled\n   */\n  exception: CoreDebugLogger['error'];\n  /**\n   * Configures the logger with additional debugging behavior\n   */\n  setConfig(config: Partial<LoggerConfig>): void;\n}\n\nfunction _addBreadcrumb(message: unknown, level: SeverityLevel = 'info'): void {\n  addBreadcrumb(\n    {\n      category: 'console',\n      data: {\n        logger: 'replay',\n      },\n      level,\n      message: `${PREFIX}${message}`,\n    },\n    { level },\n  );\n}\n\nfunction makeReplayDebugLogger(): ReplayDebugLogger {\n  let _capture = false;\n  let _trace = false;\n\n  const _debug: Partial<ReplayDebugLogger> = {\n    exception: () => undefined,\n    infoTick: () => undefined,\n    setConfig: (opts: Partial<LoggerConfig>) => {\n      _capture = !!opts.captureExceptions;\n      _trace = !!opts.traceInternals;\n    },\n  };\n\n  if (DEBUG_BUILD) {\n    CONSOLE_LEVELS.forEach(name => {\n      _debug[name] = (...args: unknown[]) => {\n        coreDebug[name](PREFIX, ...args);\n        if (_trace) {\n          _addBreadcrumb(args.join(''), severityLevelFromString(name));\n        }\n      };\n    });\n\n    _debug.exception = (error: unknown, ...message: unknown[]) => {\n      if (message.length && _debug.error) {\n        _debug.error(...message);\n      }\n\n      coreDebug.error(PREFIX, error);\n\n      if (_capture) {\n        captureException(error, {\n          mechanism: {\n            handled: true,\n            type: 'auto.function.replay.debug',\n          },\n        });\n      } else if (_trace) {\n        // No need for a breadcrumb if `_capture` is enabled since it should be\n        // captured as an exception\n        _addBreadcrumb(error, 'error');\n      }\n    };\n\n    _debug.infoTick = (...args: unknown[]) => {\n      coreDebug.log(PREFIX, ...args);\n      if (_trace) {\n        // Wait a tick here to avoid race conditions for some initial logs\n        // which may be added before replay is initialized\n        setTimeout(() => _addBreadcrumb(args[0]), 0);\n      }\n    };\n  } else {\n    CONSOLE_LEVELS.forEach(name => {\n      _debug[name] = () => undefined;\n    });\n  }\n\n  return _debug as ReplayDebugLogger;\n}\n\nexport const debug = makeReplayDebugLogger();\n", "import { REPLAY_MAX_EVENT_BUFFER_SIZE } from '../constants';\n\n/** This error indicates that the event buffer size exceeded the limit.. */\nexport class EventBufferSizeExceededError extends Error {\n  public constructor() {\n    super(`Event buffer exceeded maximum size of ${REPLAY_MAX_EVENT_BUFFER_SIZE}.`);\n  }\n}\n\n/** This error indicates that the compression worker was intentionally destroyed (e.g. on session expiry). */\nexport class WorkerDestroyedError extends Error {\n  public constructor() {\n    super('Worker destroyed');\n  }\n}\n", "import { REPLAY_MAX_EVENT_BUFFER_SIZE } from '../constants';\nimport type { AddEventResult, EventBuffer, EventBufferType, RecordingEvent } from '../types';\nimport { timestampToMs } from '../util/timestamp';\nimport { EventBufferSizeExceededError } from './error';\n\n/**\n * A basic event buffer that does not do any compression.\n * Used as fallback if the compression worker cannot be loaded or is disabled.\n */\nexport class EventBufferArray implements EventBuffer {\n  /** All the events that are buffered to be sent. */\n  public events: RecordingEvent[];\n\n  /** @inheritdoc */\n  public hasCheckout: boolean;\n\n  /** @inheritdoc */\n  public waitForCheckout: boolean;\n\n  private _totalSize: number;\n\n  public constructor() {\n    this.events = [];\n    this._totalSize = 0;\n    this.hasCheckout = false;\n    this.waitForCheckout = false;\n  }\n\n  /** @inheritdoc */\n  public get hasEvents(): boolean {\n    return this.events.length > 0;\n  }\n\n  /** @inheritdoc */\n  public get type(): EventBufferType {\n    return 'sync';\n  }\n\n  /** @inheritdoc */\n  public destroy(): void {\n    this.events = [];\n  }\n\n  /** @inheritdoc */\n  public async addEvent(event: RecordingEvent): Promise<AddEventResult> {\n    const eventSize = JSON.stringify(event).length;\n    this._totalSize += eventSize;\n    if (this._totalSize > REPLAY_MAX_EVENT_BUFFER_SIZE) {\n      throw new EventBufferSizeExceededError();\n    }\n\n    this.events.push(event);\n  }\n\n  /** @inheritdoc */\n  public finish(): Promise<string> {\n    return new Promise<string>(resolve => {\n      // Make a copy of the events array reference and immediately clear the\n      // events member so that we do not lose new events while uploading\n      // attachment.\n      const eventsRet = this.events;\n      this.clear();\n      resolve(JSON.stringify(eventsRet));\n    });\n  }\n\n  /** @inheritdoc */\n  public clear(): void {\n    this.events = [];\n    this._totalSize = 0;\n    this.hasCheckout = false;\n  }\n\n  /** @inheritdoc */\n  public getEarliestTimestamp(): number | null {\n    let ts: number | null = null;\n    for (const { timestamp } of this.events) {\n      if (ts === null || timestamp < ts) ts = timestamp;\n    }\n    return ts === null ? ts : timestampToMs(ts);\n  }\n}\n", "import { DEBUG_BUILD } from '../debug-build';\nimport type { WorkerRequest, WorkerResponse } from '../types';\nimport { debug } from '../util/logger';\nimport { WorkerDestroyedError } from './error';\n\ninterface PendingRequest {\n  method: WorkerRequest['method'];\n  resolve: (value: unknown) => void;\n  reject: (reason: unknown) => void;\n}\n\n/**\n * Event buffer that uses a web worker to compress events.\n * Exported only for testing.\n */\nexport class WorkerHandler {\n  private _worker: Worker;\n  private _id: number;\n  private _ensureReadyPromise?: Promise<void>;\n  private _pending: Map<number, PendingRequest>;\n\n  public constructor(worker: Worker) {\n    this._worker = worker;\n    this._id = 0;\n    this._pending = new Map();\n    // A single long-lived listener routes responses by id. Per-request\n    // listeners would make worker dispatch O(n) per response, so a burst of N\n    // in-flight requests becomes O(n^2) main-thread work.\n    this._worker.addEventListener('message', this._onMessage);\n  }\n\n  /**\n   * Ensure the worker is ready (or not).\n   * This will either resolve when the worker is ready, or reject if an error occurred.\n   */\n  public ensureReady(): Promise<void> {\n    // Ensure we only check once\n    if (this._ensureReadyPromise) {\n      return this._ensureReadyPromise;\n    }\n\n    this._ensureReadyPromise = new Promise((resolve, reject) => {\n      this._worker.addEventListener(\n        'message',\n        ({ data }: MessageEvent) => {\n          if ((data as WorkerResponse).success) {\n            resolve();\n          } else {\n            DEBUG_BUILD && debug.warn('Received worker message with unsuccessful status', data);\n            reject(new Error('Received worker message with unsuccessful status'));\n          }\n        },\n        { once: true },\n      );\n\n      this._worker.addEventListener(\n        'error',\n        error => {\n          DEBUG_BUILD && debug.warn('Failed to load Replay compression worker', error);\n          reject(\n            new Error(\n              `Failed to load Replay compression worker: ${error instanceof ErrorEvent && error.message ? error.message : 'Unknown error. This can happen due to CSP policy restrictions, network issues, or the worker script failing to load.'}`,\n            ),\n          );\n        },\n        { once: true },\n      );\n    });\n\n    return this._ensureReadyPromise;\n  }\n\n  /**\n   * Destroy the worker.\n   */\n  public destroy(): void {\n    DEBUG_BUILD && debug.log('Destroying compression worker');\n    this._worker.removeEventListener('message', this._onMessage);\n    this._pending.forEach(pending => pending.reject(new WorkerDestroyedError()));\n    this._pending.clear();\n    this._worker.terminate();\n  }\n\n  /**\n   * Post message to worker and wait for response before resolving promise.\n   */\n  public postMessage<T>(method: WorkerRequest['method'], arg?: WorkerRequest['arg']): Promise<T> {\n    const id = this._getAndIncrementId();\n\n    return new Promise<T>((resolve, reject) => {\n      this._pending.set(id, {\n        method,\n        resolve: resolve as (value: unknown) => void,\n        reject,\n      });\n      try {\n        this._worker.postMessage({ id, method, arg });\n      } catch (error) {\n        // If postMessage throws synchronously (e.g. DataCloneError, worker\n        // already terminated), drop the pending entry so it doesn't leak.\n        this._pending.delete(id);\n        reject(error);\n      }\n    });\n  }\n\n  private _onMessage = ({ data }: MessageEvent): void => {\n    const response = data as WorkerResponse;\n    // The worker emits an init message with `id: undefined` on load, which is\n    // handled by `ensureReady()` via its own listener. Ignore anything that\n    // doesn't carry a numeric id we issued.\n    if (typeof response.id !== 'number') {\n      return;\n    }\n    const pending = this._pending.get(response.id);\n    if (!pending || pending.method !== response.method) {\n      return;\n    }\n\n    this._pending.delete(response.id);\n\n    if (!response.success) {\n      DEBUG_BUILD && debug.error('Error in compression worker: ', response.response);\n      pending.reject(new Error('Error in compression worker'));\n      return;\n    }\n\n    pending.resolve(response.response);\n  };\n\n  /** Get the current ID and increment it for the next call. */\n  private _getAndIncrementId(): number {\n    return this._id++;\n  }\n}\n", "import type { ReplayRecordingData } from '@sentry/core';\nimport { REPLAY_MAX_EVENT_BUFFER_SIZE } from '../constants';\nimport { DEBUG_BUILD } from '../debug-build';\nimport type { AddEventResult, EventBuffer, EventBufferType, RecordingEvent } from '../types';\nimport { debug } from '../util/logger';\nimport { timestampToMs } from '../util/timestamp';\nimport { EventBufferSizeExceededError } from './error';\nimport { WorkerHandler } from './WorkerHandler';\n\n/**\n * Event buffer that uses a web worker to compress events.\n * Exported only for testing.\n */\nexport class EventBufferCompressionWorker implements EventBuffer {\n  /** @inheritdoc */\n  public hasCheckout: boolean;\n\n  /** @inheritdoc */\n  public waitForCheckout: boolean;\n\n  private _worker: WorkerHandler;\n  private _earliestTimestamp: number | null;\n  private _totalSize;\n\n  public constructor(worker: Worker) {\n    this._worker = new WorkerHandler(worker);\n    this._earliestTimestamp = null;\n    this._totalSize = 0;\n    this.hasCheckout = false;\n    this.waitForCheckout = false;\n  }\n\n  /** @inheritdoc */\n  public get hasEvents(): boolean {\n    return !!this._earliestTimestamp;\n  }\n\n  /** @inheritdoc */\n  public get type(): EventBufferType {\n    return 'worker';\n  }\n\n  /**\n   * Ensure the worker is ready (or not).\n   * This will either resolve when the worker is ready, or reject if an error occurred.\n   */\n  public ensureReady(): Promise<void> {\n    return this._worker.ensureReady();\n  }\n\n  /**\n   * Destroy the event buffer.\n   */\n  public destroy(): void {\n    this._worker.destroy();\n  }\n\n  /**\n   * Add an event to the event buffer.\n   *\n   * Returns true if event was successfully received and processed by worker.\n   */\n  public addEvent(event: RecordingEvent): Promise<AddEventResult> {\n    const timestamp = timestampToMs(event.timestamp);\n    if (!this._earliestTimestamp || timestamp < this._earliestTimestamp) {\n      this._earliestTimestamp = timestamp;\n    }\n\n    const data = JSON.stringify(event);\n    this._totalSize += data.length;\n\n    if (this._totalSize > REPLAY_MAX_EVENT_BUFFER_SIZE) {\n      return Promise.reject(new EventBufferSizeExceededError());\n    }\n\n    return this._sendEventToWorker(data);\n  }\n\n  /**\n   * Finish the event buffer and return the compressed data.\n   */\n  public finish(): Promise<ReplayRecordingData> {\n    return this._finishRequest();\n  }\n\n  /** @inheritdoc */\n  public clear(): void {\n    this._earliestTimestamp = null;\n    this._totalSize = 0;\n    this.hasCheckout = false;\n\n    // We do not wait on this, as we assume the order of messages is consistent for the worker\n    this._worker.postMessage('clear').then(null, e => {\n      DEBUG_BUILD && debug.exception(e, 'Sending \"clear\" message to worker failed', e);\n    });\n  }\n\n  /** @inheritdoc */\n  public getEarliestTimestamp(): number | null {\n    return this._earliestTimestamp;\n  }\n\n  /**\n   * Send the event to the worker.\n   */\n  private _sendEventToWorker(data: string): Promise<AddEventResult> {\n    return this._worker.postMessage<void>('addEvent', data);\n  }\n\n  /**\n   * Finish the request and return the compressed data from the worker.\n   */\n  private async _finishRequest(): Promise<Uint8Array> {\n    const response = await this._worker.postMessage<Uint8Array>('finish');\n\n    this._earliestTimestamp = null;\n    this._totalSize = 0;\n\n    return response;\n  }\n}\n", "import type { ReplayRecordingData } from '@sentry/core';\nimport { DEBUG_BUILD } from '../debug-build';\nimport type { AddEventResult, EventBuffer, EventBufferType, RecordingEvent } from '../types';\nimport { debug } from '../util/logger';\nimport { EventBufferArray } from './EventBufferArray';\nimport { EventBufferCompressionWorker } from './EventBufferCompressionWorker';\nimport { WorkerDestroyedError } from './error';\n\n/**\n * This proxy will try to use the compression worker, and fall back to use the simple buffer if an error occurs there.\n * This can happen e.g. if the worker cannot be loaded.\n * Exported only for testing.\n */\nexport class EventBufferProxy implements EventBuffer {\n  private _fallback: EventBufferArray;\n  private _compression: EventBufferCompressionWorker;\n  private _used: EventBuffer;\n  private _ensureWorkerIsLoadedPromise: Promise<void>;\n\n  public constructor(worker: Worker) {\n    this._fallback = new EventBufferArray();\n    this._compression = new EventBufferCompressionWorker(worker);\n    this._used = this._fallback;\n\n    this._ensureWorkerIsLoadedPromise = this._ensureWorkerIsLoaded();\n  }\n\n  /** @inheritdoc */\n  public get waitForCheckout(): boolean {\n    return this._used.waitForCheckout;\n  }\n\n  /** @inheritdoc */\n  public get type(): EventBufferType {\n    return this._used.type;\n  }\n\n  /** @inheritDoc */\n  public get hasEvents(): boolean {\n    return this._used.hasEvents;\n  }\n\n  /** @inheritdoc */\n  public get hasCheckout(): boolean {\n    return this._used.hasCheckout;\n  }\n  /** @inheritdoc */\n  public set hasCheckout(value: boolean) {\n    this._used.hasCheckout = value;\n  }\n\n  /** @inheritdoc */\n  // eslint-disable-next-line @typescript-eslint/adjacent-overload-signatures\n  public set waitForCheckout(value: boolean) {\n    this._used.waitForCheckout = value;\n  }\n\n  /** @inheritDoc */\n  public destroy(): void {\n    this._fallback.destroy();\n    this._compression.destroy();\n  }\n\n  /** @inheritdoc */\n  public clear(): void {\n    return this._used.clear();\n  }\n\n  /** @inheritdoc */\n  public getEarliestTimestamp(): number | null {\n    return this._used.getEarliestTimestamp();\n  }\n\n  /**\n   * Add an event to the event buffer.\n   *\n   * Returns true if event was successfully added.\n   */\n  public addEvent(event: RecordingEvent): Promise<AddEventResult> {\n    return this._used.addEvent(event);\n  }\n\n  /** @inheritDoc */\n  public async finish(): Promise<ReplayRecordingData> {\n    // Ensure the worker is loaded, so the sent event is compressed\n    await this.ensureWorkerIsLoaded();\n\n    return this._used.finish();\n  }\n\n  /** Ensure the worker has loaded. */\n  public ensureWorkerIsLoaded(): Promise<void> {\n    return this._ensureWorkerIsLoadedPromise;\n  }\n\n  /** Actually check if the worker has been loaded. */\n  private async _ensureWorkerIsLoaded(): Promise<void> {\n    try {\n      await this._compression.ensureReady();\n    } catch (error) {\n      // If the worker fails to load, we fall back to the simple buffer.\n      // Nothing more to do from our side here\n      DEBUG_BUILD && debug.exception(error, 'Failed to load the compression worker, falling back to simple buffer');\n      return;\n    }\n\n    // Now we need to switch over the array buffer to the compression worker\n    await this._switchToCompressionWorker();\n  }\n\n  /** Switch the used buffer to the compression worker. */\n  private async _switchToCompressionWorker(): Promise<void> {\n    const { events, hasCheckout, waitForCheckout } = this._fallback;\n\n    const addEventPromises: Promise<void>[] = [];\n    for (const event of events) {\n      addEventPromises.push(this._compression.addEvent(event));\n    }\n\n    this._compression.hasCheckout = hasCheckout;\n    this._compression.waitForCheckout = waitForCheckout;\n\n    // We switch over to the new buffer immediately - any further events will be added\n    // after the previously buffered ones\n    this._used = this._compression;\n\n    // Wait for original events to be re-added before resolving\n    try {\n      await Promise.all(addEventPromises);\n\n      // Can now clear fallback buffer as it's no longer necessary\n      this._fallback.clear();\n    } catch (error) {\n      // Destroying the worker (e.g. when the session expires) rejects the\n      // in-flight requests. This is expected teardown, not a failure.\n      if (error instanceof WorkerDestroyedError) {\n        return;\n      }\n      DEBUG_BUILD && debug.exception(error, 'Failed to add events when switching buffers.');\n    }\n  }\n}\n", "import { getWorkerURL } from '@sentry-internal/replay-worker';\nimport { DEBUG_BUILD } from '../debug-build';\nimport type { EventBuffer, ReplayWorkerURL } from '../types';\nimport { debug } from '../util/logger';\nimport { EventBufferArray } from './EventBufferArray';\nimport { EventBufferProxy } from './EventBufferProxy';\n\ninterface CreateEventBufferParams {\n  useCompression: boolean;\n  workerUrl?: ReplayWorkerURL;\n}\n\n// Treeshakable guard to remove the code of the included compression worker\ndeclare const __SENTRY_EXCLUDE_REPLAY_WORKER__: boolean;\n\n/**\n * Create an event buffer for replays.\n */\nexport function createEventBuffer({\n  useCompression,\n  workerUrl: customWorkerUrl,\n}: CreateEventBufferParams): EventBuffer {\n  if (\n    useCompression &&\n    // eslint-disable-next-line no-restricted-globals\n    window.Worker\n  ) {\n    const worker = _loadWorker(customWorkerUrl);\n\n    if (worker) {\n      return worker;\n    }\n  }\n\n  DEBUG_BUILD && debug.log('Using simple buffer');\n  return new EventBufferArray();\n}\n\nfunction _loadWorker(customWorkerUrl?: ReplayWorkerURL): EventBufferProxy | void {\n  try {\n    const workerUrl = customWorkerUrl || _getWorkerUrl();\n\n    if (!workerUrl) {\n      return;\n    }\n\n    DEBUG_BUILD && debug.log(`Using compression worker${customWorkerUrl ? ` from ${customWorkerUrl}` : ''}`);\n    const worker = new Worker(workerUrl);\n    return new EventBufferProxy(worker);\n  } catch (error) {\n    DEBUG_BUILD && debug.exception(error, 'Failed to create compression worker');\n    // Fall back to use simple event buffer array\n  }\n}\n\nfunction _getWorkerUrl(): string {\n  if (typeof __SENTRY_EXCLUDE_REPLAY_WORKER__ === 'undefined' || !__SENTRY_EXCLUDE_REPLAY_WORKER__) {\n    return getWorkerURL();\n  }\n\n  return '';\n}\n", "import { WINDOW } from '../constants';\n\n/** If sessionStorage is available. */\nexport function hasSessionStorage(): boolean {\n  try {\n    // This can throw, e.g. when being accessed in a sandboxed iframe\n    return 'sessionStorage' in WINDOW && !!WINDOW.sessionStorage;\n  } catch {\n    return false;\n  }\n}\n", "import { REPLAY_SESSION_KEY, WINDOW } from '../../src/constants';\nimport type { ReplayContainer } from '../../src/types';\nimport { hasSessionStorage } from '../util/hasSessionStorage';\n\n/**\n * Removes the session from Session Storage and unsets session in replay instance\n */\nexport function clearSession(replay: ReplayContainer): void {\n  deleteSession();\n  replay.session = undefined;\n}\n\n/**\n * Deletes a session from storage\n */\nfunction deleteSession(): void {\n  if (!hasSessionStorage()) {\n    return;\n  }\n\n  try {\n    WINDOW.sessionStorage.removeItem(REPLAY_SESSION_KEY);\n  } catch {\n    // Ignore potential SecurityError exceptions\n  }\n}\n", "/**\n * Given a sample rate, returns true if replay should be sampled.\n *\n * 1.0 = 100% sampling\n * 0.0 = 0% sampling\n */\nexport function isSampled(sampleRate?: number): boolean {\n  if (sampleRate === undefined) {\n    return false;\n  }\n\n  // Math.random() returns a number in range of 0 to 1 (inclusive of 0, but not 1)\n  return Math.random() < sampleRate;\n}\n", "import { REPLAY_SESSION_KEY, WINDOW } from '../constants';\nimport type { Session } from '../types';\nimport { hasSessionStorage } from '../util/hasSessionStorage';\n\n/**\n * Save a session to session storage.\n */\nexport function saveSession(session: Session): void {\n  if (!hasSessionStorage()) {\n    return;\n  }\n\n  try {\n    WINDOW.sessionStorage.setItem(REPLAY_SESSION_KEY, JSON.stringify(session));\n  } catch {\n    // Ignore potential SecurityError exceptions\n  }\n}\n", "import { uuid4 } from '@sentry/core';\nimport type { Sampled, Session } from '../types';\n\n/**\n * Get a session with defaults & applied sampling.\n */\nexport function makeSession(session: Partial<Session> & { sampled: Sampled }): Session {\n  const now = Date.now();\n  const id = session.id || uuid4();\n  // Note that this means we cannot set a started/lastActivity of `0`, but this should not be relevant outside of tests.\n  const started = session.started || now;\n  const lastActivity = session.lastActivity || now;\n  const segmentId = session.segmentId || 0;\n  const sampled = session.sampled;\n  const previousSessionId = session.previousSessionId;\n  const dirty = session.dirty || false;\n\n  return {\n    id,\n    started,\n    lastActivity,\n    segmentId,\n    sampled,\n    previousSessionId,\n    dirty,\n  };\n}\n", "import type { Sampled, Session, SessionOptions } from '../types';\nimport { isSampled } from '../util/isSampled';\nimport { saveSession } from './saveSession';\nimport { makeSession } from './Session';\n\n/**\n * Get the sampled status for a session based on sample rates & current sampled status.\n */\nexport function getSessionSampleType(sessionSampleRate: number, allowBuffering: boolean): Sampled {\n  return isSampled(sessionSampleRate) ? 'session' : allowBuffering ? 'buffer' : false;\n}\n\n/**\n * Create a new session, which in its current implementation is a Sentry event\n * that all replays will be saved to as attachments. Currently, we only expect\n * one of these Sentry events per \"replay session\".\n */\nexport function createSession(\n  { sessionSampleRate, allowBuffering, stickySession = false }: SessionOptions,\n  { previousSessionId }: { previousSessionId?: string } = {},\n): Session {\n  const sampled = getSessionSampleType(sessionSampleRate, allowBuffering);\n  const session = makeSession({\n    sampled,\n    previousSessionId,\n  });\n\n  if (stickySession) {\n    saveSession(session);\n  }\n\n  return session;\n}\n", "import { REPLAY_SESSION_KEY, WINDOW } from '../constants';\nimport { DEBUG_BUILD } from '../debug-build';\nimport type { Session } from '../types';\nimport { hasSessionStorage } from '../util/hasSessionStorage';\nimport { debug } from '../util/logger';\nimport { makeSession } from './Session';\n\n/**\n * Fetches a session from storage\n */\nexport function fetchSession(): Session | null {\n  if (!hasSessionStorage()) {\n    return null;\n  }\n\n  try {\n    // This can throw if cookies are disabled\n    const sessionStringFromStorage = WINDOW.sessionStorage.getItem(REPLAY_SESSION_KEY);\n\n    if (!sessionStringFromStorage) {\n      return null;\n    }\n\n    const sessionObj = JSON.parse(sessionStringFromStorage) as Session;\n\n    DEBUG_BUILD && debug.infoTick('Loading existing session');\n\n    return makeSession(sessionObj);\n  } catch {\n    return null;\n  }\n}\n", "/**\n * Given an initial timestamp and an expiry duration, checks to see if current\n * time should be considered as expired.\n */\nexport function isExpired(\n  initialTime: null | number,\n  expiry: undefined | number,\n  targetTime: number = +new Date(),\n): boolean {\n  // Always expired if < 0\n  if (initialTime === null || expiry === undefined || expiry < 0) {\n    return true;\n  }\n\n  // Never expires if == 0\n  if (expiry === 0) {\n    return false;\n  }\n\n  return initialTime + expiry <= targetTime;\n}\n", "import type { Session } from '../types';\nimport { isExpired } from './isExpired';\n\n/**\n * Checks to see if session is expired\n */\nexport function isSessionExpired(\n  session: Session,\n  {\n    maxReplayDuration,\n    sessionIdleExpire,\n    targetTime = Date.now(),\n  }: { maxReplayDuration: number; sessionIdleExpire: number; targetTime?: number },\n): boolean {\n  return (\n    // First, check that maximum session length has not been exceeded\n    isExpired(session.started, maxReplayDuration, targetTime) ||\n    // check that the idle timeout has not been exceeded (i.e. user has\n    // performed an action within the last `sessionIdleExpire` ms)\n    isExpired(session.lastActivity, sessionIdleExpire, targetTime)\n  );\n}\n", "import type { Session } from '../types';\nimport { isSessionExpired } from '../util/isSessionExpired';\n\n/** If the session should be refreshed or not. */\nexport function shouldRefreshSession(\n  session: Session,\n  { sessionIdleExpire, maxReplayDuration }: { sessionIdleExpire: number; maxReplayDuration: number },\n): boolean {\n  // If not expired, all good, just keep the session\n  if (!isSessionExpired(session, { sessionIdleExpire, maxReplayDuration })) {\n    return false;\n  }\n\n  // If we are buffering & haven't ever flushed yet, always continue\n  if (session.sampled === 'buffer' && session.segmentId === 0) {\n    return false;\n  }\n\n  return true;\n}\n", "import { DEBUG_BUILD } from '../debug-build';\nimport type { Session, SessionOptions } from '../types';\nimport { debug } from '../util/logger';\nimport { createSession } from './createSession';\nimport { fetchSession } from './fetchSession';\nimport { shouldRefreshSession } from './shouldRefreshSession';\n\n/**\n * Get or create a session, when initializing the replay.\n * Returns a session that may be unsampled.\n */\nexport function loadOrCreateSession(\n  {\n    sessionIdleExpire,\n    maxReplayDuration,\n    previousSessionId,\n  }: {\n    sessionIdleExpire: number;\n    maxReplayDuration: number;\n    previousSessionId?: string;\n  },\n  sessionOptions: SessionOptions,\n): Session {\n  const existingSession = sessionOptions.stickySession && fetchSession();\n\n  // No session exists yet, just create a new one\n  if (!existingSession) {\n    DEBUG_BUILD && debug.infoTick('Creating new session');\n    return createSession(sessionOptions, { previousSessionId });\n  }\n\n  if (!shouldRefreshSession(existingSession, { sessionIdleExpire, maxReplayDuration })) {\n    return existingSession;\n  }\n\n  DEBUG_BUILD && debug.infoTick('Session in sessionStorage is expired, creating new one...');\n  return createSession(sessionOptions, { previousSessionId: existingSession.id });\n}\n", "import { getClient } from '@sentry/core';\nimport { EventType } from '@sentry/rrweb';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { EventBufferSizeExceededError } from '../eventBuffer/error';\nimport type { AddEventResult, RecordingEvent, ReplayContainer, ReplayFrameEvent, ReplayPluginOptions } from '../types';\nimport { debug } from './logger';\nimport { timestampToMs } from './timestamp';\n\nfunction isCustomEvent(event: RecordingEvent): event is ReplayFrameEvent {\n  return event.type === EventType.Custom;\n}\n\n/**\n * Add an event to the event buffer.\n * In contrast to `addEvent`, this does not return a promise & does not wait for the adding of the event to succeed/fail.\n * Instead this returns `true` if we tried to add the event, else false.\n * It returns `false` e.g. if we are paused, disabled, or out of the max replay duration.\n *\n * `isCheckout` is true if this is either the very first event, or an event triggered by `checkoutEveryNms`.\n */\nexport function addEventSync(replay: ReplayContainer, event: RecordingEvent, isCheckout?: boolean): boolean {\n  if (!shouldAddEvent(replay, event)) {\n    return false;\n  }\n\n  // This should never reject\n  // eslint-disable-next-line @typescript-eslint/no-floating-promises\n  _addEvent(replay, event, isCheckout);\n\n  return true;\n}\n\n/**\n * Add an event to the event buffer.\n * Resolves to `null` if no event was added, else to `void`.\n *\n * `isCheckout` is true if this is either the very first event, or an event triggered by `checkoutEveryNms`.\n */\nexport function addEvent(\n  replay: ReplayContainer,\n  event: RecordingEvent,\n  isCheckout?: boolean,\n): Promise<AddEventResult | null> {\n  if (!shouldAddEvent(replay, event)) {\n    return Promise.resolve(null);\n  }\n\n  return _addEvent(replay, event, isCheckout);\n}\n\nasync function _addEvent(\n  replay: ReplayContainer,\n  event: RecordingEvent,\n  isCheckout?: boolean,\n): Promise<AddEventResult | null> {\n  const { eventBuffer } = replay;\n\n  if (!eventBuffer || (eventBuffer.waitForCheckout && !isCheckout)) {\n    return null;\n  }\n\n  const isBufferMode = replay.recordingMode === 'buffer';\n\n  try {\n    if (isCheckout && isBufferMode) {\n      eventBuffer.clear();\n    }\n\n    if (isCheckout) {\n      eventBuffer.hasCheckout = true;\n      eventBuffer.waitForCheckout = false;\n    }\n\n    const replayOptions = replay.getOptions();\n\n    const eventAfterPossibleCallback = maybeApplyCallback(event, replayOptions.beforeAddRecordingEvent);\n\n    if (!eventAfterPossibleCallback) {\n      return;\n    }\n\n    return await eventBuffer.addEvent(eventAfterPossibleCallback);\n  } catch (error) {\n    // If replay is no longer enabled, the buffer was torn down by `stop()`\n    // (session refresh, mutation limit, etc.), which rejects any in-flight\n    // `addEvent` with \"Worker destroyed\". Any error that is thrown after stopping\n    // should not result in a client report\n    if (!replay.isEnabled()) {\n      replay.handleException(error);\n      return null;\n    }\n\n    const isExceeded = error && error instanceof EventBufferSizeExceededError;\n    const reason = isExceeded ? 'eventBufferOverflow' : 'eventBufferError';\n    const client = getClient();\n\n    if (client) {\n      // We are limited in the drop reasons:\n      // https://github.com/getsentry/snuba/blob/6c73be60716c2fb1c30ca627883207887c733cbd/rust_snuba/src/processors/outcomes.rs#L39\n      const dropReason = isExceeded ? 'buffer_overflow' : 'internal_sdk_error';\n      client.recordDroppedEvent(dropReason, 'replay');\n    }\n\n    if (isExceeded && isBufferMode) {\n      // Clear buffer and wait for next checkout\n      eventBuffer.clear();\n      eventBuffer.waitForCheckout = true;\n\n      return null;\n    }\n\n    replay.handleException(error);\n\n    await replay.stop({ reason });\n  }\n}\n\n/** Exported only for tests. */\nexport function shouldAddEvent(replay: ReplayContainer, event: RecordingEvent): boolean {\n  if (!replay.eventBuffer || replay.isPaused() || !replay.isEnabled()) {\n    return false;\n  }\n\n  const timestampInMs = timestampToMs(event.timestamp);\n\n  // Throw out events that happen more than 5 minutes ago. This can happen if\n  // page has been left open and idle for a long period of time and user\n  // comes back to trigger a new session. The performance entries rely on\n  // `performance.timeOrigin`, which is when the page first opened.\n  if (timestampInMs + replay.timeouts.sessionIdlePause < Date.now()) {\n    return false;\n  }\n\n  // Throw out events that are +60min from the initial timestamp\n  if (timestampInMs > replay.getContext().initialTimestamp + replay.getOptions().maxReplayDuration) {\n    DEBUG_BUILD &&\n      debug.infoTick(`Skipping event with timestamp ${timestampInMs} because it is after maxReplayDuration`);\n    return false;\n  }\n\n  return true;\n}\n\nfunction maybeApplyCallback(\n  event: RecordingEvent,\n  callback: ReplayPluginOptions['beforeAddRecordingEvent'],\n): RecordingEvent | null | undefined {\n  try {\n    if (typeof callback === 'function' && isCustomEvent(event)) {\n      return callback(event);\n    }\n  } catch (error) {\n    DEBUG_BUILD &&\n      debug.exception(error, 'An error occurred in the `beforeAddRecordingEvent` callback, skipping the event...');\n    return null;\n  }\n\n  return event;\n}\n", "import type { ReplayContainer } from '../../types';\n\nconst MAX_CONTEXT_VALUES = 100;\n\nexport function addSegmentDetailsToContext(replay: ReplayContainer, traceId?: string, segmentName?: string): void {\n  const replayContext = replay.getContext();\n  if (traceId && replayContext.traceIds.size < MAX_CONTEXT_VALUES) {\n    replayContext.traceIds.add(traceId);\n  }\n  if (segmentName && replayContext.segmentNames.size < MAX_CONTEXT_VALUES) {\n    replayContext.segmentNames.add(segmentName);\n  }\n}\n", "import type { StreamedSpanJSON } from '@sentry/core';\nimport type { ReplayContainer } from '../types';\nimport { addSegmentDetailsToContext } from './util/addSegmentDetailsToContext';\n\ntype ProcessSegmentSpanCallback = (spanJSON: StreamedSpanJSON) => void;\n\nexport function handleProcessSegmentSpan(replay: ReplayContainer): ProcessSegmentSpanCallback {\n  return (spanJSON: StreamedSpanJSON) => {\n    if (!replay.isEnabled()) {\n      return;\n    }\n\n    addSegmentDetailsToContext(replay, spanJSON.trace_id, spanJSON.name || undefined);\n  };\n}\n", "import type { ErrorEvent, Event, FeedbackEvent, ReplayEvent, TransactionEvent } from '@sentry/core';\n\n/** If the event is an error event */\nexport function isErrorEvent(event: Event): event is ErrorEvent {\n  return !event.type;\n}\n\n/** If the event is a transaction event */\nexport function isTransactionEvent(event: Event): event is TransactionEvent {\n  return event.type === 'transaction';\n}\n\n/** If the event is an replay event */\nexport function isReplayEvent(event: Event): event is ReplayEvent {\n  return event.type === 'replay_event';\n}\n\n/** If the event is a feedback event */\nexport function isFeedbackEvent(event: Event): event is FeedbackEvent {\n  return event.type === 'feedback';\n}\n", "import type { ErrorEvent, Event, TransactionEvent, TransportMakeRequestResponse } from '@sentry/core';\nimport { setTimeout } from '@sentry/browser-utils';\nimport type { ReplayContainer } from '../types';\nimport { isErrorEvent, isTransactionEvent } from '../util/eventUtils';\nimport { addSegmentDetailsToContext } from './util/addSegmentDetailsToContext';\n\ntype AfterSendEventCallback = (event: Event, sendResponse: TransportMakeRequestResponse) => void;\n\n/**\n * Returns a listener to be added to `client.on('afterSendErrorEvent, listener)`.\n */\nexport function handleAfterSendEvent(replay: ReplayContainer): AfterSendEventCallback {\n  return (event: Event, sendResponse: TransportMakeRequestResponse) => {\n    if (!replay.isEnabled() || (!isErrorEvent(event) && !isTransactionEvent(event))) {\n      return;\n    }\n\n    const statusCode = sendResponse.statusCode;\n\n    // We only want to do stuff on successful error sending, otherwise you get error replays without errors attached\n    // We skip if we encountered an non-OK status code\n    if (!statusCode || statusCode < 200 || statusCode >= 300) {\n      return;\n    }\n\n    if (isTransactionEvent(event)) {\n      handleTransactionEvent(replay, event);\n      return;\n    }\n\n    handleErrorEvent(replay, event);\n  };\n}\n\nfunction handleTransactionEvent(replay: ReplayContainer, event: TransactionEvent): void {\n  addSegmentDetailsToContext(replay, event.contexts?.trace?.trace_id, event.transaction);\n}\n\nfunction handleErrorEvent(replay: ReplayContainer, event: ErrorEvent): void {\n  const replayContext = replay.getContext();\n\n  // Add error to list of errorIds of replay. This is ok to do even if not\n  // sampled because context will get reset at next checkout.\n  // XXX: There is also a race condition where it's possible to capture an\n  // error to Sentry before Replay SDK has loaded, but response returns after\n  // it was loaded, and this gets called.\n  // We limit to max. 100 errors linked\n  if (event.event_id && replayContext.errorIds.size < 100) {\n    replayContext.errorIds.add(event.event_id);\n  }\n\n  // If error event is tagged with replay id it means it was sampled (when in buffer mode)\n  // Need to be very careful that this does not cause an infinite loop\n  if (replay.recordingMode !== 'buffer' || !event.tags?.replayId) {\n    return;\n  }\n\n  const { beforeErrorSampling } = replay.getOptions();\n  if (typeof beforeErrorSampling === 'function' && !beforeErrorSampling(event)) {\n    return;\n  }\n\n  setTimeout(async () => {\n    try {\n      // Capture current event buffer as new replay\n      await replay.sendBufferedReplayOrFlush();\n    } catch (err) {\n      replay.handleException(err);\n    }\n  });\n}\n", "import type { ErrorEvent, Event } from '@sentry/core';\nimport { getLocationHref } from '@sentry/core';\nimport type { ReplayContainer } from '../types';\nimport { createBreadcrumb } from '../util/createBreadcrumb';\nimport { isErrorEvent } from '../util/eventUtils';\nimport { addBreadcrumbEvent } from './util/addBreadcrumbEvent';\n\ntype BeforeSendEventCallback = (event: Event) => void;\n\n/**\n * Returns a listener to be added to `client.on('afterSendErrorEvent, listener)`.\n */\nexport function handleBeforeSendEvent(replay: ReplayContainer): BeforeSendEventCallback {\n  return (event: Event) => {\n    if (!replay.isEnabled() || !isErrorEvent(event)) {\n      return;\n    }\n\n    handleHydrationError(replay, event);\n  };\n}\n\nfunction handleHydrationError(replay: ReplayContainer, event: ErrorEvent): void {\n  const exceptionValue = event.exception?.values?.[0]?.value;\n  if (typeof exceptionValue !== 'string') {\n    return;\n  }\n\n  if (\n    // Only matches errors in production builds of react-dom\n    // Example https://reactjs.org/docs/error-decoder.html?invariant=423\n    // With newer React versions, the messages changed to a different website https://react.dev/errors/418\n    exceptionValue.match(\n      /(reactjs\\.org\\/docs\\/error-decoder\\.html\\?invariant=|react\\.dev\\/errors\\/)(418|419|422|423|425)/,\n    ) ||\n    // Development builds of react-dom\n    // Error 1: Hydration failed because the initial UI does not match what was rendered on the server.\n    // Error 2: Text content does not match server-rendered HTML. Warning: Text content did not match.\n    exceptionValue.match(/(does not match server-rendered HTML|Hydration failed because)/i)\n  ) {\n    const breadcrumb = createBreadcrumb({\n      category: 'replay.hydrate-error',\n      data: {\n        url: getLocationHref(),\n      },\n    });\n    addBreadcrumbEvent(replay, breadcrumb);\n  }\n}\n", "import type { Breadcrumb } from '@sentry/core';\nimport { getClient, normalize } from '@sentry/core';\nimport { CONSOLE_ARG_MAX_SIZE } from '../constants';\nimport type { ReplayContainer } from '../types';\nimport type { ReplayFrame } from '../types/replayFrame';\nimport { createBreadcrumb } from '../util/createBreadcrumb';\nimport { addBreadcrumbEvent } from './util/addBreadcrumbEvent';\n\ntype BreadcrumbWithCategory = Required<Pick<Breadcrumb, 'category'>>;\n\n/**\n * Handle breadcrumbs that Sentry captures, and make sure to capture relevant breadcrumbs to Replay as well.\n */\nexport function handleBreadcrumbs(replay: ReplayContainer): void {\n  const client = getClient();\n\n  if (!client) {\n    return;\n  }\n\n  client.on('beforeAddBreadcrumb', breadcrumb => beforeAddBreadcrumb(replay, breadcrumb));\n}\n\nfunction beforeAddBreadcrumb(replay: ReplayContainer, breadcrumb: Breadcrumb): void {\n  if (!replay.isEnabled() || !isBreadcrumbWithCategory(breadcrumb)) {\n    return;\n  }\n\n  const result = normalizeBreadcrumb(breadcrumb);\n  if (result) {\n    addBreadcrumbEvent(replay, result);\n  }\n}\n\n/** Exported only for tests. */\nexport function normalizeBreadcrumb(breadcrumb: Breadcrumb): Breadcrumb | null {\n  if (\n    !isBreadcrumbWithCategory(breadcrumb) ||\n    [\n      // fetch & xhr are handled separately,in handleNetworkBreadcrumbs\n      'fetch',\n      'xhr',\n      // These two are breadcrumbs for emitted sentry events, we don't care about them\n      'sentry.event',\n      'sentry.transaction',\n    ].includes(breadcrumb.category) ||\n    // We capture UI breadcrumbs separately\n    breadcrumb.category.startsWith('ui.')\n  ) {\n    return null;\n  }\n\n  if (breadcrumb.category === 'console') {\n    return normalizeConsoleBreadcrumb(breadcrumb);\n  }\n\n  return createBreadcrumb(breadcrumb);\n}\n\n/** exported for tests only */\nexport function normalizeConsoleBreadcrumb(\n  breadcrumb: Omit<Breadcrumb, 'category'> & BreadcrumbWithCategory,\n): ReplayFrame {\n  const args = breadcrumb.data?.arguments;\n\n  if (!Array.isArray(args) || args.length === 0) {\n    return createBreadcrumb(breadcrumb);\n  }\n\n  let isTruncated = false;\n\n  // Avoid giant args captures\n  const normalizedArgs = args.map(arg => {\n    if (!arg) {\n      return arg;\n    }\n    if (typeof arg === 'string') {\n      if (arg.length > CONSOLE_ARG_MAX_SIZE) {\n        isTruncated = true;\n        return `${arg.slice(0, CONSOLE_ARG_MAX_SIZE)}…`;\n      }\n\n      return arg;\n    }\n    if (typeof arg === 'object') {\n      try {\n        const normalizedArg = normalize(arg, 7);\n        const stringified = JSON.stringify(normalizedArg);\n        if (stringified.length > CONSOLE_ARG_MAX_SIZE) {\n          isTruncated = true;\n          // We use the pretty printed JSON string here as a base\n          return `${JSON.stringify(normalizedArg, null, 2).slice(0, CONSOLE_ARG_MAX_SIZE)}…`;\n        }\n        return normalizedArg;\n      } catch {\n        // fall back to default\n      }\n    }\n\n    return arg;\n  });\n\n  return createBreadcrumb({\n    ...breadcrumb,\n    data: {\n      ...breadcrumb.data,\n      arguments: normalizedArgs,\n      ...(isTruncated ? { _meta: { warnings: ['CONSOLE_ARG_TRUNCATED'] } } : {}),\n    },\n  });\n}\n\nfunction isBreadcrumbWithCategory(breadcrumb: Breadcrumb): breadcrumb is BreadcrumbWithCategory {\n  return !!breadcrumb.category;\n}\n", "import type { Event, EventHint } from '@sentry/core';\n\n/**\n * Returns true if we think the given event is an error originating inside of rrweb.\n */\nexport function isRrwebError(event: Event, hint: EventHint): boolean {\n  if (event.type || !event.exception?.values?.length) {\n    return false;\n  }\n\n  // @ts-expect-error this may be set by rrweb when it finds errors\n  if (hint.originalException?.__rrweb__) {\n    return true;\n  }\n\n  return false;\n}\n", "import type { DynamicSamplingContext } from '@sentry/core';\nimport { getActiveSpan, getCurrentScope, getDynamicSamplingContextFromSpan } from '@sentry/core';\n\n/**\n * Reset the `replay_id` field on the DSC.\n */\nexport function resetReplayIdOnDynamicSamplingContext(): void {\n  // Reset DSC on the current scope, if there is one\n  const dsc = getCurrentScope().getPropagationContext().dsc;\n  if (dsc) {\n    delete dsc.replay_id;\n  }\n\n  // Clear it from frozen DSC on the active span\n  const activeSpan = getActiveSpan();\n  if (activeSpan) {\n    const dsc = getDynamicSamplingContextFromSpan(activeSpan);\n    delete (dsc as Partial<DynamicSamplingContext>).replay_id;\n  }\n}\n\n/**\n * Set the `replay_id` field on the cached DSC.\n * This is needed after a session refresh because the cached DSC on the scope\n * (set by browserTracingIntegration when the idle span ended) persists across\n * session boundaries. Without updating it, the new session's replay_id would\n * never appear in DSC since `getDynamicSamplingContextFromClient` (and its\n * `createDsc` hook) is not called when a cached DSC already exists.\n */\nexport function setReplayIdOnDynamicSamplingContext(replayId: string): void {\n  const dsc = getCurrentScope().getPropagationContext().dsc;\n  if (dsc) {\n    dsc.replay_id = replayId;\n  }\n\n  const activeSpan = getActiveSpan();\n  if (activeSpan) {\n    const dsc = getDynamicSamplingContextFromSpan(activeSpan);\n    (dsc as Partial<DynamicSamplingContext>).replay_id = replayId;\n  }\n}\n", "import type { FeedbackEvent } from '@sentry/core';\nimport { EventType } from '@sentry/rrweb';\nimport type { ReplayBreadcrumbFrameEvent, ReplayContainer } from '../../types';\n\n/**\n * Add a feedback breadcrumb event to replay.\n */\nexport function addFeedbackBreadcrumb(replay: ReplayContainer, event: FeedbackEvent): void {\n  replay.triggerUserActivity();\n  replay.addUpdate(() => {\n    if (!event.timestamp) {\n      // Ignore events that don't have timestamps (this shouldn't happen, more of a typing issue)\n      // Return true here so that we don't flush\n      return true;\n    }\n\n    // This should never reject\n    // eslint-disable-next-line @typescript-eslint/no-floating-promises\n    replay.throttledAddEvent({\n      type: EventType.Custom,\n      timestamp: event.timestamp * 1000,\n      data: {\n        tag: 'breadcrumb',\n        payload: {\n          timestamp: event.timestamp,\n          type: 'default',\n          category: 'sentry.feedback',\n          data: {\n            feedbackId: event.event_id,\n          },\n        },\n      },\n    } as ReplayBreadcrumbFrameEvent);\n\n    return false;\n  });\n}\n", "import type { Event } from '@sentry/core';\nimport { UNABLE_TO_SEND_REPLAY } from '../../constants';\nimport type { ReplayContainer } from '../../types';\nimport { isSampled } from '../../util/isSampled';\n\n/**\n * Determine if event should be sampled (only applies in buffer mode).\n * When an event is captured by `handleGlobalEvent`, when in buffer mode\n * we determine if we want to sample the error or not.\n */\nexport function shouldSampleForBufferEvent(replay: ReplayContainer, event: Event): boolean {\n  if (replay.recordingMode !== 'buffer') {\n    return false;\n  }\n\n  // ignore this error because otherwise we could loop indefinitely with\n  // trying to capture replay and failing\n  if (event.message === UNABLE_TO_SEND_REPLAY) {\n    return false;\n  }\n\n  // Require the event to be an error event & to have an exception\n  if (!event.exception || event.type) {\n    return false;\n  }\n\n  return isSampled(replay.getOptions().errorSampleRate);\n}\n", "import type { Event, EventHint } from '@sentry/core';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { saveSession } from '../session/saveSession';\nimport type { ReplayContainer } from '../types';\nimport { isErrorEvent, isFeedbackEvent, isReplayEvent, isTransactionEvent } from '../util/eventUtils';\nimport { isRrwebError } from '../util/isRrwebError';\nimport { shouldRefreshSession } from '../session/shouldRefreshSession';\nimport { debug } from '../util/logger';\nimport { resetReplayIdOnDynamicSamplingContext } from '../util/resetReplayIdOnDynamicSamplingContext';\nimport { addFeedbackBreadcrumb } from './util/addFeedbackBreadcrumb';\nimport { shouldSampleForBufferEvent } from './util/shouldSampleForBufferEvent';\n\n/**\n * Returns a listener to be added to `addEventProcessor(listener)`.\n */\nexport function handleGlobalEventListener(replay: ReplayContainer): (event: Event, hint: EventHint) => Event | null {\n  return Object.assign(\n    (event: Event, hint: EventHint) => {\n      // Check for expired session and clean stale replay_id from DSC.\n      // This must run BEFORE the isEnabled/isPaused guards because when paused,\n      // the guards short-circuit without cleaning DSC. Uses shouldRefreshSession\n      // instead of isSessionExpired to respect the buffer-mode carve-out:\n      // buffer sessions with segmentId === 0 are kept alive even when time-expired.\n      if (\n        replay.session &&\n        shouldRefreshSession(replay.session, {\n          maxReplayDuration: replay.getOptions().maxReplayDuration,\n          sessionIdleExpire: replay.timeouts.sessionIdleExpire,\n        })\n      ) {\n        resetReplayIdOnDynamicSamplingContext();\n      }\n\n      // Do nothing if replay has been disabled or paused\n      if (!replay.isEnabled() || replay.isPaused()) {\n        return event;\n      }\n\n      if (isReplayEvent(event)) {\n        // Replays have separate set of breadcrumbs, do not include breadcrumbs\n        // from core SDK\n        delete event.breadcrumbs;\n        return event;\n      }\n\n      // We only want to handle errors, transactions, and feedbacks, nothing else\n      if (!isErrorEvent(event) && !isTransactionEvent(event) && !isFeedbackEvent(event)) {\n        return event;\n      }\n\n      // Ensure we do not add replay_id if the session is expired\n      const isSessionActive = replay.checkAndHandleExpiredSession();\n      if (!isSessionActive) {\n        // prevent exceeding replay durations by removing the expired replayId from the DSC\n        resetReplayIdOnDynamicSamplingContext();\n        return event;\n      }\n\n      if (isFeedbackEvent(event)) {\n        // This should never reject\n        // eslint-disable-next-line @typescript-eslint/no-floating-promises\n        replay.flush();\n        event.contexts.feedback.replay_id = replay.getSessionId();\n        // Add a replay breadcrumb for this piece of feedback\n        addFeedbackBreadcrumb(replay, event);\n        return event;\n      }\n\n      // Unless `captureExceptions` is enabled, we want to ignore errors coming from rrweb\n      // As there can be a bunch of stuff going wrong in internals there, that we don't want to bubble up to users\n      if (isRrwebError(event, hint) && !replay.getOptions()._experiments.captureExceptions) {\n        DEBUG_BUILD && debug.log('Ignoring error from rrweb internals', event);\n        return null;\n      }\n\n      // When in buffer mode, we decide to sample here.\n      // Later, in `handleAfterSendEvent`, if the replayId is set, we know that we sampled\n      // And convert the buffer session to a full session\n      const isErrorEventSampled = shouldSampleForBufferEvent(replay, event);\n\n      // Tag errors if it has been sampled in buffer mode, or if it is session mode\n      // Only tag transactions if in session mode\n      const shouldTagReplayId = isErrorEventSampled || replay.recordingMode === 'session';\n\n      if (shouldTagReplayId) {\n        event.tags = { ...event.tags, replayId: replay.getSessionId() };\n      }\n\n      // If we sampled this error in buffer mode, immediately mark the session as \"sampled\"\n      // by changing the sampled state from 'buffer' to 'session'. Otherwise, if the application is interrupte\n      // before `afterSendEvent` occurs, then the session would remain as \"buffer\" but we have an error event\n      // that is tagged with a replay id. This could end up creating replays w/ excessive durations because\n      // of the linked error.\n      if (isErrorEventSampled && replay.recordingMode === 'buffer' && replay.session?.sampled === 'buffer') {\n        const session = replay.session;\n        session.dirty = true;\n        // Save the session if sticky sessions are enabled to persist the state change\n        if (replay.getOptions().stickySession) {\n          saveSession(session);\n        }\n      }\n\n      return event;\n    },\n    { id: 'Replay' },\n  );\n}\n", "import { EventType } from '@sentry/rrweb';\nimport type { AddEventResult, AllEntryData, ReplayContainer, ReplayPerformanceEntry } from '../types';\n\n/**\n * Create a \"span\" for each performance entry.\n */\nexport function createPerformanceSpans(\n  replay: ReplayContainer,\n  entries: ReplayPerformanceEntry<AllEntryData>[],\n): Promise<AddEventResult | null>[] {\n  return entries.map(({ type, start, end, name, data }) => {\n    const response = replay.throttledAddEvent({\n      type: EventType.Custom,\n      timestamp: start,\n      data: {\n        tag: 'performanceSpan',\n        payload: {\n          op: type,\n          description: name,\n          startTimestamp: start,\n          endTimestamp: end,\n          data,\n        },\n      },\n    });\n\n    // If response is a string, it means its either THROTTLED or SKIPPED\n    return typeof response === 'string' ? Promise.resolve(null) : response;\n  });\n}\n", "import type { HandlerDataHistory } from '@sentry/core';\nimport type { HistoryData, ReplayContainer, ReplayPerformanceEntry } from '../types';\nimport { createPerformanceSpans } from '../util/createPerformanceSpans';\n\nfunction handleHistory(handlerData: HandlerDataHistory): ReplayPerformanceEntry<HistoryData> {\n  const { from, to } = handlerData;\n\n  const now = Date.now() / 1000;\n\n  return {\n    type: 'navigation.push',\n    start: now,\n    end: now,\n    name: to,\n    data: {\n      previous: from,\n    },\n  };\n}\n\n/**\n * Returns a listener to be added to `addHistoryInstrumentationHandler(listener)`.\n */\nexport function handleHistorySpanListener(replay: ReplayContainer): (handlerData: HandlerDataHistory) => void {\n  return (handlerData: HandlerDataHistory) => {\n    if (!replay.isEnabled()) {\n      return;\n    }\n\n    const result = handleHistory(handlerData);\n\n    if (result === null) {\n      return;\n    }\n\n    // Need to collect visited URLs\n    replay.getContext().urls.push(result.name);\n    replay.triggerUserActivity();\n\n    replay.addUpdate(() => {\n      // oxlint-disable-next-line typescript/no-floating-promises\n      createPerformanceSpans(replay, [result]);\n      // Returning false to flush\n      return false;\n    });\n  };\n}\n", "import { getClient, isSentryRequestUrl } from '@sentry/core';\nimport { DEBUG_BUILD } from '../debug-build';\nimport type { ReplayContainer } from '../types';\n\n/**\n * Check whether a given request URL should be filtered out. This is so we\n * don't log Sentry ingest requests.\n */\nexport function shouldFilterRequest(replay: ReplayContainer, url: string): boolean {\n  // If we enabled the `traceInternals` experiment, we want to trace everything\n  if (DEBUG_BUILD && replay.getOptions()._experiments.traceInternals) {\n    return false;\n  }\n\n  return isSentryRequestUrl(url, getClient());\n}\n", "import type { NetworkRequestData, ReplayContainer, ReplayPerformanceEntry } from '../../types';\nimport { createPerformanceSpans } from '../../util/createPerformanceSpans';\nimport { shouldFilterRequest } from '../../util/shouldFilterRequest';\n\n/** Add a performance entry breadcrumb */\nexport function addNetworkBreadcrumb(\n  replay: ReplayContainer,\n  result: ReplayPerformanceEntry<NetworkRequestData> | null,\n): void {\n  if (!replay.isEnabled()) {\n    return;\n  }\n\n  if (result === null) {\n    return;\n  }\n\n  if (shouldFilterRequest(replay, result.name)) {\n    return;\n  }\n\n  replay.addUpdate(() => {\n    // oxlint-disable-next-line typescript/no-floating-promises\n    createPerformanceSpans(replay, [result]);\n    // Returning true will cause `addUpdate` to not flush\n    // We do not want network requests to cause a flush. This will prevent\n    // recurring/polling requests from keeping the replay session alive.\n    return true;\n  });\n}\n", "import { stringMatchesSomePattern } from '@sentry/core';\nimport type { NetworkMetaWarning } from '@sentry/browser-utils';\nimport { serializeFormData } from '@sentry/browser-utils';\nimport { NETWORK_BODY_MAX_SIZE, WINDOW } from '../../constants';\nimport type {\n  NetworkBody,\n  NetworkRequestData,\n  ReplayNetworkRequestData,\n  ReplayNetworkRequestOrResponse,\n  ReplayPerformanceEntry,\n} from '../../types';\n\n/** Get the size of a body. */\nexport function getBodySize(body: RequestInit['body']): number | undefined {\n  if (!body) {\n    return undefined;\n  }\n\n  const textEncoder = new TextEncoder();\n\n  try {\n    if (typeof body === 'string') {\n      return textEncoder.encode(body).length;\n    }\n\n    if (body instanceof URLSearchParams) {\n      return textEncoder.encode(body.toString()).length;\n    }\n\n    if (body instanceof FormData) {\n      const formDataStr = serializeFormData(body);\n      return textEncoder.encode(formDataStr).length;\n    }\n\n    if (body instanceof Blob) {\n      return body.size;\n    }\n\n    if (body instanceof ArrayBuffer) {\n      return body.byteLength;\n    }\n\n    // Currently unhandled types: ArrayBufferView, ReadableStream\n  } catch {\n    // just return undefined\n  }\n\n  return undefined;\n}\n\n/** Convert a Content-Length header to number/undefined.  */\nexport function parseContentLengthHeader(header: string | null | undefined): number | undefined {\n  if (!header) {\n    return undefined;\n  }\n\n  const size = parseInt(header, 10);\n  return isNaN(size) ? undefined : size;\n}\n\n/** Merge a warning into an existing network request/response. */\nexport function mergeWarning(\n  info: ReplayNetworkRequestOrResponse | undefined,\n  warning: NetworkMetaWarning,\n): ReplayNetworkRequestOrResponse {\n  if (!info) {\n    return {\n      headers: {},\n      size: undefined,\n      _meta: {\n        warnings: [warning],\n      },\n    };\n  }\n\n  const newMeta = { ...info._meta };\n  const existingWarnings = newMeta.warnings || [];\n  newMeta.warnings = [...existingWarnings, warning];\n\n  info._meta = newMeta;\n  return info;\n}\n\n/** Convert ReplayNetworkRequestData to a PerformanceEntry. */\nexport function makeNetworkReplayBreadcrumb(\n  type: string,\n  data: ReplayNetworkRequestData | null,\n): ReplayPerformanceEntry<NetworkRequestData> | null {\n  if (!data) {\n    return null;\n  }\n\n  const { startTimestamp, endTimestamp, url, method, statusCode, request, response } = data;\n\n  const result: ReplayPerformanceEntry<NetworkRequestData> = {\n    type,\n    start: startTimestamp / 1000,\n    end: endTimestamp / 1000,\n    name: url,\n    data: {\n      method,\n      statusCode,\n      request,\n      response,\n    },\n  };\n\n  return result;\n}\n\n/** Build the request or response part of a replay network breadcrumb that was skipped. */\nexport function buildSkippedNetworkRequestOrResponse(bodySize: number | undefined): ReplayNetworkRequestOrResponse {\n  return {\n    headers: {},\n    size: bodySize,\n    _meta: {\n      warnings: ['URL_SKIPPED'],\n    },\n  };\n}\n\n/** Build the request or response part of a replay network breadcrumb. */\nexport function buildNetworkRequestOrResponse(\n  headers: Record<string, string>,\n  bodySize: number | undefined,\n  body: string | undefined,\n): ReplayNetworkRequestOrResponse | undefined {\n  if (!bodySize && Object.keys(headers).length === 0) {\n    return undefined;\n  }\n\n  if (!bodySize) {\n    return {\n      headers,\n    };\n  }\n\n  if (!body) {\n    return {\n      headers,\n      size: bodySize,\n    };\n  }\n\n  const info: ReplayNetworkRequestOrResponse = {\n    headers,\n    size: bodySize,\n  };\n\n  const { body: normalizedBody, warnings } = normalizeNetworkBody(body);\n  info.body = normalizedBody;\n  if (warnings?.length) {\n    info._meta = {\n      warnings,\n    };\n  }\n\n  return info;\n}\n\n/** Filter a set of headers */\nexport function getAllowedHeaders(headers: Record<string, string>, allowedHeaders: string[]): Record<string, string> {\n  return Object.entries(headers).reduce((filteredHeaders: Record<string, string>, [key, value]) => {\n    const normalizedKey = key.toLowerCase();\n    // Avoid putting empty strings into the headers\n    if (allowedHeaders.includes(normalizedKey) && headers[key]) {\n      filteredHeaders[normalizedKey] = value;\n    }\n    return filteredHeaders;\n  }, {});\n}\n\nfunction normalizeNetworkBody(body: string | undefined): {\n  body: NetworkBody | undefined;\n  warnings?: NetworkMetaWarning[];\n} {\n  if (!body || typeof body !== 'string') {\n    return {\n      body,\n    };\n  }\n\n  const exceedsSizeLimit = body.length > NETWORK_BODY_MAX_SIZE;\n  const isProbablyJson = _strIsProbablyJson(body);\n\n  if (exceedsSizeLimit) {\n    const truncatedBody = body.slice(0, NETWORK_BODY_MAX_SIZE);\n\n    if (isProbablyJson) {\n      return {\n        body: truncatedBody,\n        warnings: ['MAYBE_JSON_TRUNCATED'],\n      };\n    }\n\n    return {\n      body: `${truncatedBody}…`,\n      warnings: ['TEXT_TRUNCATED'],\n    };\n  }\n\n  if (isProbablyJson) {\n    try {\n      const jsonBody = JSON.parse(body);\n      return {\n        body: jsonBody,\n      };\n    } catch {\n      // fall back to just send the body as string\n    }\n  }\n\n  return {\n    body,\n  };\n}\n\nfunction _strIsProbablyJson(str: string): boolean {\n  const first = str[0];\n  const last = str[str.length - 1];\n\n  // Simple check: If this does not start & end with {} or [], it's not JSON\n  return (first === '[' && last === ']') || (first === '{' && last === '}');\n}\n\n/** Match an URL against a list of strings/Regex. */\nexport function urlMatches(url: string, urls: (string | RegExp)[]): boolean {\n  const fullUrl = getFullUrl(url);\n\n  return stringMatchesSomePattern(fullUrl, urls);\n}\n\n/** exported for tests */\nexport function getFullUrl(url: string, baseURI = WINDOW.document.baseURI): string {\n  // Short circuit for common cases:\n  if (url.startsWith('http://') || url.startsWith('https://') || url.startsWith(WINDOW.location.origin)) {\n    return url;\n  }\n  const fixedUrl = new URL(url, baseURI);\n\n  // If these do not match, we are not dealing with a relative URL, so just return it\n  if (fixedUrl.origin !== new URL(baseURI).origin) {\n    return url;\n  }\n\n  const fullUrl = fixedUrl.href;\n\n  // Remove trailing slashes, if they don't match the original URL\n  if (!url.endsWith('/') && fullUrl.endsWith('/')) {\n    return fullUrl.slice(0, -1);\n  }\n\n  return fullUrl;\n}\n", "import type { Breadcrumb, FetchBreadcrumbData } from '@sentry/core';\nimport type { FetchHint, NetworkMetaWarning } from '@sentry/browser-utils';\nimport { getBodyString, getFetchRequestArgBody, setTimeout } from '@sentry/browser-utils';\nimport { DEBUG_BUILD } from '../../debug-build';\nimport type {\n  ReplayContainer,\n  ReplayNetworkOptions,\n  ReplayNetworkRequestData,\n  ReplayNetworkRequestOrResponse,\n} from '../../types';\nimport { debug } from '../../util/logger';\nimport { addNetworkBreadcrumb } from './addNetworkBreadcrumb';\nimport {\n  buildNetworkRequestOrResponse,\n  buildSkippedNetworkRequestOrResponse,\n  getAllowedHeaders,\n  getBodySize,\n  makeNetworkReplayBreadcrumb,\n  mergeWarning,\n  parseContentLengthHeader,\n  urlMatches,\n} from './networkUtils';\n\n/**\n * Capture a fetch breadcrumb to a replay.\n * This adds additional data (where appropriate).\n */\nexport async function captureFetchBreadcrumbToReplay(\n  breadcrumb: Breadcrumb & { data: FetchBreadcrumbData },\n  hint: Partial<FetchHint>,\n  options: ReplayNetworkOptions & {\n    replay: ReplayContainer;\n  },\n): Promise<void> {\n  try {\n    const data = await _prepareFetchData(breadcrumb, hint, options);\n\n    // Create a replay performance entry from this breadcrumb\n    const result = makeNetworkReplayBreadcrumb('resource.fetch', data);\n    addNetworkBreadcrumb(options.replay, result);\n  } catch (error) {\n    DEBUG_BUILD && debug.exception(error, 'Failed to capture fetch breadcrumb');\n  }\n}\n\n/**\n * Enrich a breadcrumb with additional data.\n * This has to be sync & mutate the given breadcrumb,\n * as the breadcrumb is afterwards consumed by other handlers.\n */\nexport function enrichFetchBreadcrumb(\n  breadcrumb: Breadcrumb & { data: FetchBreadcrumbData },\n  hint: Partial<FetchHint>,\n): void {\n  const { input, response } = hint;\n\n  const body = input ? getFetchRequestArgBody(input) : undefined;\n  const reqSize = getBodySize(body);\n\n  const resSize = response ? parseContentLengthHeader(response.headers.get('content-length')) : undefined;\n\n  if (reqSize !== undefined) {\n    breadcrumb.data.request_body_size = reqSize;\n  }\n  if (resSize !== undefined) {\n    breadcrumb.data.response_body_size = resSize;\n  }\n}\n\nasync function _prepareFetchData(\n  breadcrumb: Breadcrumb & { data: FetchBreadcrumbData },\n  hint: Partial<FetchHint>,\n  options: ReplayNetworkOptions,\n): Promise<ReplayNetworkRequestData> {\n  const now = Date.now();\n  const { startTimestamp = now, endTimestamp = now } = hint;\n\n  const {\n    url,\n    method,\n    status_code: statusCode = 0,\n    request_body_size: requestBodySize,\n    response_body_size: responseBodySize,\n  } = breadcrumb.data;\n\n  const captureDetails =\n    urlMatches(url, options.networkDetailAllowUrls) && !urlMatches(url, options.networkDetailDenyUrls);\n\n  const request = captureDetails\n    ? _getRequestInfo(options, hint.input, requestBodySize)\n    : buildSkippedNetworkRequestOrResponse(requestBodySize);\n  const response = await _getResponseInfo(captureDetails, options, hint.response, responseBodySize);\n\n  return {\n    startTimestamp,\n    endTimestamp,\n    url,\n    method,\n    statusCode,\n    request,\n    response,\n  };\n}\n\nfunction _getRequestInfo(\n  { networkCaptureBodies, networkRequestHeaders }: ReplayNetworkOptions,\n  input: FetchHint['input'] | undefined,\n  requestBodySize?: number,\n): ReplayNetworkRequestOrResponse | undefined {\n  const headers = input ? getRequestHeaders(input, networkRequestHeaders) : {};\n\n  if (!networkCaptureBodies) {\n    return buildNetworkRequestOrResponse(headers, requestBodySize, undefined);\n  }\n\n  // We only want to transmit string or string-like bodies\n  const requestBody = getFetchRequestArgBody(input);\n  const [bodyStr, warning] = getBodyString(requestBody, debug);\n  const data = buildNetworkRequestOrResponse(headers, requestBodySize, bodyStr);\n\n  if (warning) {\n    return mergeWarning(data, warning);\n  }\n\n  return data;\n}\n\n/** Exported only for tests. */\nexport async function _getResponseInfo(\n  captureDetails: boolean,\n  {\n    networkCaptureBodies,\n    networkResponseHeaders,\n  }: Pick<ReplayNetworkOptions, 'networkCaptureBodies' | 'networkResponseHeaders'>,\n  response: Response | undefined,\n  responseBodySize?: number,\n): Promise<ReplayNetworkRequestOrResponse | undefined> {\n  if (!captureDetails && responseBodySize !== undefined) {\n    return buildSkippedNetworkRequestOrResponse(responseBodySize);\n  }\n\n  const headers = response ? getAllHeaders(response.headers, networkResponseHeaders) : {};\n\n  if (!response || (!networkCaptureBodies && responseBodySize !== undefined)) {\n    return buildNetworkRequestOrResponse(headers, responseBodySize, undefined);\n  }\n\n  const [bodyText, warning] = await _parseFetchResponseBody(response);\n  const result = getResponseData(bodyText, {\n    networkCaptureBodies,\n\n    responseBodySize,\n    captureDetails,\n    headers,\n  });\n\n  if (warning) {\n    return mergeWarning(result, warning);\n  }\n\n  return result;\n}\n\nfunction getResponseData(\n  bodyText: string | undefined,\n  {\n    networkCaptureBodies,\n    responseBodySize,\n    captureDetails,\n    headers,\n  }: {\n    captureDetails: boolean;\n    networkCaptureBodies: boolean;\n    responseBodySize: number | undefined;\n    headers: Record<string, string>;\n  },\n): ReplayNetworkRequestOrResponse | undefined {\n  try {\n    const size = bodyText?.length && responseBodySize === undefined ? getBodySize(bodyText) : responseBodySize;\n\n    if (!captureDetails) {\n      return buildSkippedNetworkRequestOrResponse(size);\n    }\n\n    if (networkCaptureBodies) {\n      return buildNetworkRequestOrResponse(headers, size, bodyText);\n    }\n\n    return buildNetworkRequestOrResponse(headers, size, undefined);\n  } catch (error) {\n    DEBUG_BUILD && debug.exception(error, 'Failed to serialize response body');\n    // fallback\n    return buildNetworkRequestOrResponse(headers, responseBodySize, undefined);\n  }\n}\n\nasync function _parseFetchResponseBody(response: Response): Promise<[string | undefined, NetworkMetaWarning?]> {\n  const res = _tryCloneResponse(response);\n\n  if (!res) {\n    return [undefined, 'BODY_PARSE_ERROR'];\n  }\n\n  try {\n    const text = await _tryGetResponseText(res);\n    return [text];\n  } catch (error) {\n    if (error instanceof Error && error.message.indexOf('Timeout') > -1) {\n      DEBUG_BUILD && debug.warn('Parsing text body from response timed out');\n      return [undefined, 'BODY_PARSE_TIMEOUT'];\n    }\n\n    DEBUG_BUILD && debug.exception(error, 'Failed to get text body from response');\n    return [undefined, 'BODY_PARSE_ERROR'];\n  }\n}\n\nfunction getAllHeaders(headers: Headers, allowedHeaders: string[]): Record<string, string> {\n  const allHeaders: Record<string, string> = {};\n\n  allowedHeaders.forEach(header => {\n    if (headers.get(header)) {\n      allHeaders[header] = headers.get(header) as string;\n    }\n  });\n\n  return allHeaders;\n}\n\nfunction getRequestHeaders(fetchArgs: unknown[], allowedHeaders: string[]): Record<string, string> {\n  if (fetchArgs.length === 1 && typeof fetchArgs[0] !== 'string') {\n    return getHeadersFromOptions(fetchArgs[0] as Request | RequestInit, allowedHeaders);\n  }\n\n  if (fetchArgs.length === 2) {\n    return getHeadersFromOptions(fetchArgs[1] as Request | RequestInit, allowedHeaders);\n  }\n\n  return {};\n}\n\nfunction getHeadersFromOptions(\n  input: Request | RequestInit | undefined,\n  allowedHeaders: string[],\n): Record<string, string> {\n  if (!input) {\n    return {};\n  }\n\n  const headers = input.headers;\n\n  if (!headers) {\n    return {};\n  }\n\n  if (headers instanceof Headers) {\n    return getAllHeaders(headers, allowedHeaders);\n  }\n\n  // We do not support this, as it is not really documented (anymore?)\n  if (Array.isArray(headers)) {\n    return {};\n  }\n\n  return getAllowedHeaders(headers, allowedHeaders);\n}\n\nfunction _tryCloneResponse(response: Response): Response | void {\n  try {\n    // We have to clone this, as the body can only be read once\n    return response.clone();\n  } catch (error) {\n    // this can throw if the response was already consumed before\n    DEBUG_BUILD && debug.exception(error, 'Failed to clone response body');\n  }\n}\n\n/**\n * Get the response body of a fetch request, or timeout after 500ms.\n * Fetch can return a streaming body, that may not resolve (or not for a long time).\n * If that happens, we rather abort after a short time than keep waiting for this.\n */\nfunction _tryGetResponseText(response: Response): Promise<string | undefined> {\n  return new Promise((resolve, reject) => {\n    const timeout = setTimeout(() => reject(new Error('Timeout while trying to read response body')), 500);\n\n    _getResponseText(response)\n      .then(\n        txt => resolve(txt),\n        reason => reject(reason),\n      )\n      .finally(() => clearTimeout(timeout));\n  });\n}\n\nasync function _getResponseText(response: Response): Promise<string> {\n  // Force this to be a promise, just to be safe\n  // eslint-disable-next-line no-return-await\n  return await response.text();\n}\n", "import type { Breadcrumb, XhrBreadcrumbData } from '@sentry/core';\nimport { isObjectLike } from '@sentry/core';\nimport type { NetworkMetaWarning, XhrHint } from '@sentry/browser-utils';\nimport { getBodyString, parseXhrResponseHeaders, SENTRY_XHR_DATA_KEY } from '@sentry/browser-utils';\nimport { DEBUG_BUILD } from '../../debug-build';\nimport type { ReplayContainer, ReplayNetworkOptions, ReplayNetworkRequestData } from '../../types';\nimport { debug } from '../../util/logger';\nimport { addNetworkBreadcrumb } from './addNetworkBreadcrumb';\nimport {\n  buildNetworkRequestOrResponse,\n  buildSkippedNetworkRequestOrResponse,\n  getAllowedHeaders,\n  getBodySize,\n  makeNetworkReplayBreadcrumb,\n  mergeWarning,\n  parseContentLengthHeader,\n  urlMatches,\n} from './networkUtils';\n\n/**\n * Capture an XHR breadcrumb to a replay.\n * This adds additional data (where appropriate).\n */\nexport async function captureXhrBreadcrumbToReplay(\n  breadcrumb: Breadcrumb & { data: XhrBreadcrumbData },\n  hint: Partial<XhrHint>,\n  options: ReplayNetworkOptions & { replay: ReplayContainer },\n): Promise<void> {\n  try {\n    const data = _prepareXhrData(breadcrumb, hint, options);\n\n    // Create a replay performance entry from this breadcrumb\n    const result = makeNetworkReplayBreadcrumb('resource.xhr', data);\n    addNetworkBreadcrumb(options.replay, result);\n  } catch (error) {\n    DEBUG_BUILD && debug.exception(error, 'Failed to capture xhr breadcrumb');\n  }\n}\n\n/**\n * Enrich a breadcrumb with additional data.\n * This has to be sync & mutate the given breadcrumb,\n * as the breadcrumb is afterwards consumed by other handlers.\n */\nexport function enrichXhrBreadcrumb(\n  breadcrumb: Breadcrumb & { data: XhrBreadcrumbData },\n  hint: Partial<XhrHint>,\n): void {\n  const { xhr, input } = hint;\n\n  if (!xhr) {\n    return;\n  }\n\n  const reqSize = getBodySize(input);\n  const resSize = xhr.getResponseHeader('content-length')\n    ? parseContentLengthHeader(xhr.getResponseHeader('content-length'))\n    : _getBodySize(xhr.response, xhr.responseType);\n\n  if (reqSize !== undefined) {\n    breadcrumb.data.request_body_size = reqSize;\n  }\n  if (resSize !== undefined) {\n    breadcrumb.data.response_body_size = resSize;\n  }\n}\n\nfunction _prepareXhrData(\n  breadcrumb: Breadcrumb & { data: XhrBreadcrumbData },\n  hint: Partial<XhrHint>,\n  options: ReplayNetworkOptions,\n): ReplayNetworkRequestData | null {\n  const now = Date.now();\n  const { startTimestamp = now, endTimestamp = now, input, xhr } = hint;\n\n  const {\n    url,\n    method,\n    status_code: statusCode = 0,\n    request_body_size: requestBodySize,\n    response_body_size: responseBodySize,\n  } = breadcrumb.data;\n\n  if (!url) {\n    return null;\n  }\n\n  if (!xhr || !urlMatches(url, options.networkDetailAllowUrls) || urlMatches(url, options.networkDetailDenyUrls)) {\n    const request = buildSkippedNetworkRequestOrResponse(requestBodySize);\n    const response = buildSkippedNetworkRequestOrResponse(responseBodySize);\n    return {\n      startTimestamp,\n      endTimestamp,\n      url,\n      method,\n      statusCode,\n      request,\n      response,\n    };\n  }\n\n  // ---- This additional network data below is only captured for URLs defined in `networkDetailAllowUrls` ----\n\n  const xhrInfo = xhr[SENTRY_XHR_DATA_KEY];\n  const networkRequestHeaders = xhrInfo\n    ? getAllowedHeaders(xhrInfo.request_headers, options.networkRequestHeaders)\n    : {};\n  const networkResponseHeaders = getAllowedHeaders(parseXhrResponseHeaders(xhr), options.networkResponseHeaders);\n\n  const [requestBody, requestWarning] = options.networkCaptureBodies ? getBodyString(input, debug) : [undefined];\n  const [responseBody, responseWarning] = options.networkCaptureBodies ? _getXhrResponseBody(xhr) : [undefined];\n\n  const request = buildNetworkRequestOrResponse(networkRequestHeaders, requestBodySize, requestBody);\n  const response = buildNetworkRequestOrResponse(networkResponseHeaders, responseBodySize, responseBody);\n\n  return {\n    startTimestamp,\n    endTimestamp,\n    url,\n    method,\n    statusCode,\n    request: requestWarning ? mergeWarning(request, requestWarning) : request,\n    response: responseWarning ? mergeWarning(response, responseWarning) : response,\n  };\n}\n\nfunction _getXhrResponseBody(xhr: XMLHttpRequest): [string | undefined, NetworkMetaWarning?] {\n  // We collect errors that happen, but only log them if we can't get any response body\n  const errors: unknown[] = [];\n\n  try {\n    return [xhr.responseText];\n  } catch (e) {\n    errors.push(e);\n  }\n\n  // Try to manually parse the response body, if responseText fails\n  try {\n    return _parseXhrResponse(xhr.response, xhr.responseType);\n  } catch (e) {\n    errors.push(e);\n  }\n\n  DEBUG_BUILD && debug.warn('Failed to get xhr response body', ...errors);\n\n  return [undefined];\n}\n\n/**\n * Get the string representation of the XHR response.\n * Based on MDN, these are the possible types of the response:\n * string\n * ArrayBuffer\n * Blob\n * Document\n * POJO\n *\n * Exported only for tests.\n */\nexport function _parseXhrResponse(\n  body: XMLHttpRequest['response'],\n  responseType: XMLHttpRequest['responseType'],\n): [string | undefined, NetworkMetaWarning?] {\n  try {\n    if (typeof body === 'string') {\n      return [body];\n    }\n\n    if (body instanceof Document) {\n      return [body.body.outerHTML];\n    }\n\n    if (responseType === 'json' && isObjectLike(body)) {\n      return [JSON.stringify(body)];\n    }\n\n    if (!body) {\n      return [undefined];\n    }\n  } catch (error) {\n    DEBUG_BUILD && debug.exception(error, 'Failed to serialize body', body);\n    return [undefined, 'BODY_PARSE_ERROR'];\n  }\n\n  DEBUG_BUILD && debug.log('Skipping network body because of body type', body);\n\n  return [undefined, 'UNPARSEABLE_BODY_TYPE'];\n}\n\nfunction _getBodySize(\n  body: XMLHttpRequest['response'],\n  responseType: XMLHttpRequest['responseType'],\n): number | undefined {\n  try {\n    const bodyStr = responseType === 'json' && isObjectLike(body) ? JSON.stringify(body) : body;\n    return getBodySize(bodyStr);\n  } catch {\n    return undefined;\n  }\n}\n", "import type { Breadcrumb, BreadcrumbHint, FetchBreadcrumbData, XhrBreadcrumbData } from '@sentry/core';\nimport { getClient } from '@sentry/core';\nimport type { FetchHint, XhrHint } from '@sentry/browser-utils';\nimport { DEBUG_BUILD } from '../debug-build';\nimport type { ReplayContainer, ReplayNetworkOptions } from '../types';\nimport { debug } from '../util/logger';\nimport { captureFetchBreadcrumbToReplay, enrichFetchBreadcrumb } from './util/fetchUtils';\nimport { captureXhrBreadcrumbToReplay, enrichXhrBreadcrumb } from './util/xhrUtils';\n\ninterface ExtendedNetworkBreadcrumbsOptions extends ReplayNetworkOptions {\n  replay: ReplayContainer;\n}\n\n/**\n * This method does two things:\n * - It enriches the regular XHR/fetch breadcrumbs with request/response size data\n * - It captures the XHR/fetch breadcrumbs to the replay\n *   (enriching it with further data that is _not_ added to the regular breadcrumbs)\n */\nexport function handleNetworkBreadcrumbs(replay: ReplayContainer): void {\n  const client = getClient();\n\n  try {\n    const {\n      networkDetailAllowUrls,\n      networkDetailDenyUrls,\n      networkCaptureBodies,\n      networkRequestHeaders,\n      networkResponseHeaders,\n    } = replay.getOptions();\n\n    const options: ExtendedNetworkBreadcrumbsOptions = {\n      replay,\n      networkDetailAllowUrls,\n      networkDetailDenyUrls,\n      networkCaptureBodies,\n      networkRequestHeaders,\n      networkResponseHeaders,\n    };\n\n    if (client) {\n      client.on('beforeAddBreadcrumb', (breadcrumb, hint) => beforeAddNetworkBreadcrumb(options, breadcrumb, hint));\n    }\n  } catch {\n    // Do nothing\n  }\n}\n\n/** just exported for tests */\nexport function beforeAddNetworkBreadcrumb(\n  options: ExtendedNetworkBreadcrumbsOptions,\n  breadcrumb: Breadcrumb,\n  hint?: BreadcrumbHint,\n): void {\n  if (!breadcrumb.data) {\n    return;\n  }\n\n  try {\n    if (_isXhrBreadcrumb(breadcrumb) && _isXhrHint(hint)) {\n      // This has to be sync, as we need to ensure the breadcrumb is enriched in the same tick\n      // Because the hook runs synchronously, and the breadcrumb is afterwards passed on\n      // So any async mutations to it will not be reflected in the final breadcrumb\n      enrichXhrBreadcrumb(breadcrumb, hint);\n\n      // This call should not reject\n      // eslint-disable-next-line @typescript-eslint/no-floating-promises\n      captureXhrBreadcrumbToReplay(breadcrumb, hint, options);\n    }\n\n    if (_isFetchBreadcrumb(breadcrumb) && _isFetchHint(hint)) {\n      // This has to be sync, as we need to ensure the breadcrumb is enriched in the same tick\n      // Because the hook runs synchronously, and the breadcrumb is afterwards passed on\n      // So any async mutations to it will not be reflected in the final breadcrumb\n      enrichFetchBreadcrumb(breadcrumb, hint);\n\n      // This call should not reject\n      // eslint-disable-next-line @typescript-eslint/no-floating-promises\n      captureFetchBreadcrumbToReplay(breadcrumb, hint, options);\n    }\n  } catch (e) {\n    DEBUG_BUILD && debug.exception(e, 'Error when enriching network breadcrumb');\n  }\n}\n\nfunction _isXhrBreadcrumb(breadcrumb: Breadcrumb): breadcrumb is Breadcrumb & { data: XhrBreadcrumbData } {\n  return breadcrumb.category === 'xhr';\n}\n\nfunction _isFetchBreadcrumb(breadcrumb: Breadcrumb): breadcrumb is Breadcrumb & { data: FetchBreadcrumbData } {\n  return breadcrumb.category === 'fetch';\n}\n\nfunction _isXhrHint(hint?: BreadcrumbHint): hint is XhrHint {\n  return hint?.xhr;\n}\n\nfunction _isFetchHint(hint?: BreadcrumbHint): hint is Partial<FetchHint> {\n  return hint?.input !== undefined;\n}\n", "import type { DynamicSamplingContext } from '@sentry/core';\nimport { addEventProcessor, getClient } from '@sentry/core';\nimport { addClickKeypressInstrumentationHandler, addHistoryInstrumentationHandler } from '@sentry/browser-utils';\nimport { handleProcessSegmentSpan } from '../coreHandlers/handleProcessSegmentSpan';\nimport { handleAfterSendEvent } from '../coreHandlers/handleAfterSendEvent';\nimport { handleBeforeSendEvent } from '../coreHandlers/handleBeforeSendEvent';\nimport { handleBreadcrumbs } from '../coreHandlers/handleBreadcrumbs';\nimport { handleDomListener } from '../coreHandlers/handleDom';\nimport { handleGlobalEventListener } from '../coreHandlers/handleGlobalEvent';\nimport { handleHistorySpanListener } from '../coreHandlers/handleHistory';\nimport { handleNetworkBreadcrumbs } from '../coreHandlers/handleNetworkBreadcrumbs';\nimport type { ReplayContainer } from '../types';\n\n/**\n * Add global listeners that cannot be removed.\n */\nexport function addGlobalListeners(replay: ReplayContainer): void {\n  // Listeners from core SDK //\n  const client = getClient();\n\n  addClickKeypressInstrumentationHandler(handleDomListener(replay));\n  addHistoryInstrumentationHandler(handleHistorySpanListener(replay));\n  handleBreadcrumbs(replay);\n  handleNetworkBreadcrumbs(replay);\n\n  // Tag all (non replay) events that get sent to Sentry with the current\n  // replay ID so that we can reference them later in the UI\n  const eventProcessor = handleGlobalEventListener(replay);\n  addEventProcessor(eventProcessor);\n\n  // If a custom client has no hooks yet, we continue to use the \"old\" implementation\n  if (client) {\n    client.on('beforeSendEvent', handleBeforeSendEvent(replay));\n    client.on('afterSendEvent', handleAfterSendEvent(replay));\n    client.on('createDsc', (dsc: DynamicSamplingContext) => {\n      const replayId = replay.getSessionId();\n      // We do not want to set the DSC when in buffer mode, as that means the replay has not been sent (yet)\n      if (replayId && replay.isEnabled() && replay.recordingMode === 'session') {\n        // Ensure to check that the session is still active - it could have expired in the meanwhile\n        const isSessionActive = replay.checkAndHandleExpiredSession();\n        if (isSessionActive) {\n          dsc.replay_id = replayId;\n        }\n      }\n    });\n\n    client.on('processSegmentSpan', handleProcessSegmentSpan(replay));\n\n    client.on('spanStart', span => {\n      replay.lastActiveSpan = span;\n    });\n\n    // We may be missing the initial spanStart due to timing issues,\n    // so we capture it on finish again.\n    client.on('spanEnd', span => {\n      replay.lastActiveSpan = span;\n    });\n\n    // We want to attach the replay id to the feedback event\n    client.on('beforeSendFeedback', async (feedbackEvent, options) => {\n      const replayId = replay.getSessionId();\n      if (options?.includeReplay && replay.isEnabled() && replayId && feedbackEvent.contexts?.feedback) {\n        // In case the feedback is sent via API and not through our widget, we want to flush replay\n        if (feedbackEvent.contexts.feedback.source === 'api') {\n          await replay.sendBufferedReplayOrFlush();\n        }\n        feedbackEvent.contexts.feedback.replay_id = replayId;\n      }\n    });\n\n    client.on('openFeedbackWidget', async () => {\n      await replay.sendBufferedReplayOrFlush();\n    });\n  }\n}\n", "import { WINDOW } from '../constants';\nimport type { AddEventResult, MemoryData, ReplayContainer, ReplayPerformanceEntry } from '../types';\nimport { createPerformanceSpans } from './createPerformanceSpans';\n\ntype ReplayMemoryEntry = ReplayPerformanceEntry<MemoryData> & { data: { memory: MemoryInfo } };\n\ninterface MemoryInfo {\n  jsHeapSizeLimit: number;\n  totalJSHeapSize: number;\n  usedJSHeapSize: number;\n}\n\n/**\n * Create a \"span\" for the total amount of memory being used by JS objects\n * (including v8 internal objects).\n */\nexport async function addMemoryEntry(replay: ReplayContainer): Promise<Array<AddEventResult | null>> {\n  // window.performance.memory is a non-standard API and doesn't work on all browsers, so we try-catch this\n  try {\n    return Promise.all(\n      createPerformanceSpans(replay, [\n        // @ts-expect-error memory doesn't exist on type Performance as the API is non-standard (we check that it exists above)\n        createMemoryEntry(WINDOW.performance.memory),\n      ]),\n    );\n  } catch {\n    // Do nothing\n    return [];\n  }\n}\n\nfunction createMemoryEntry(memoryEntry: MemoryInfo): ReplayMemoryEntry {\n  const { jsHeapSizeLimit, totalJSHeapSize, usedJSHeapSize } = memoryEntry;\n  // we don't want to use `getAbsoluteTime` because it adds the event time to the\n  // time origin, so we get the current timestamp instead\n  const time = Date.now() / 1000;\n  return {\n    type: 'memory',\n    name: 'memory',\n    start: time,\n    end: time,\n    data: {\n      memory: {\n        jsHeapSizeLimit,\n        totalJSHeapSize,\n        usedJSHeapSize,\n      },\n    },\n  };\n}\n", "import { debounce as debounceCore } from '@sentry/core';\nimport { setTimeout } from '@sentry/browser-utils';\n\ntype DebouncedCallback = {\n  (): void | unknown;\n  flush: () => void | unknown;\n  cancel: () => void;\n};\ntype CallbackFunction = () => unknown;\ntype DebounceOptions = { maxWait?: number };\n\n/**\n * Heavily simplified debounce function based on lodash.debounce.\n *\n * This function takes a callback function (@param fun) and delays its invocation\n * by @param wait milliseconds. Optionally, a maxWait can be specified in @param options,\n * which ensures that the callback is invoked at least once after the specified max. wait time.\n *\n * @param func the function whose invocation is to be debounced\n * @param wait the minimum time until the function is invoked after it was called once\n * @param options the options object, which can contain the `maxWait` property\n *\n * @returns the debounced version of the function, which needs to be called at least once to start the\n *          debouncing process. Subsequent calls will reset the debouncing timer and, in case @paramfunc\n *          was already invoked in the meantime, return @param func's return value.\n *          The debounced function has two additional properties:\n *          - `flush`: Invokes the debounced function immediately and returns its return value\n *          - `cancel`: Cancels the debouncing process and resets the debouncing timer\n */\nexport function debounce(func: CallbackFunction, wait: number, options?: DebounceOptions): DebouncedCallback {\n  return debounceCore(func, wait, {\n    ...options,\n    // @ts-expect-error - Not quite sure why these types do not match, but this is fine\n    setTimeoutImpl: setTimeout,\n  });\n}\n", "import { GLOBAL_OBJ } from '@sentry/core';\n\nconst NAVIGATOR = GLOBAL_OBJ.navigator;\n\n/**\n *  Disable sampling mousemove events on iOS browsers as this can cause blocking the main thread\n *  https://github.com/getsentry/sentry-javascript/issues/14534\n */\nexport function getRecordingSamplingOptions(): Partial<{ sampling: { mousemove: boolean } }> {\n  if (\n    /iPhone|iPad|iPod/i.test(NAVIGATOR?.userAgent ?? '') ||\n    (/Macintosh/i.test(NAVIGATOR?.userAgent ?? '') && NAVIGATOR?.maxTouchPoints && NAVIGATOR?.maxTouchPoints > 1)\n  ) {\n    return {\n      sampling: {\n        mousemove: false,\n      },\n    };\n  }\n\n  return {};\n}\n", "import { EventType, IncrementalSource, record } from '@sentry/rrweb';\nimport { NodeType } from '@sentry/rrweb-snapshot';\nimport { updateClickDetectorForRecordingEvent } from '../coreHandlers/handleClick';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { saveSession } from '../session/saveSession';\nimport type { RecordingEvent, ReplayContainer, ReplayOptionFrameEvent } from '../types';\nimport { addEventSync } from './addEvent';\nimport { debug } from './logger';\n\ntype MutationAttributeData = {\n  id: number;\n  attributes: Record<string, string | number | true | null>;\n};\n\ntype RecordingEmitCallback = (event: RecordingEvent, isCheckout?: boolean) => void;\n\n/**\n * Handler for recording events.\n *\n * Adds to event buffer, and has varying flushing behaviors if the event was a checkout.\n */\nexport function getHandleRecordingEmit(replay: ReplayContainer): RecordingEmitCallback {\n  let hadFirstEvent = false;\n\n  return (event: RecordingEvent, _isCheckout?: boolean) => {\n    // This callback runs synchronously inside rrweb's observer / `takeFullSnapshot`\n    // call stack. If it throws, rrweb re-throws it (our `errorHandler` returns\n    // `undefined`) and can tear down recording — e.g. leaving the mutation buffer\n    // permanently locked. Never let an exception escape back into rrweb.\n    try {\n      // If this is false, it means session is expired, create and a new session and wait for checkout\n      if (!replay.checkAndHandleExpiredSession()) {\n        DEBUG_BUILD && debug.warn('Received replay event after session expired.');\n\n        return;\n      }\n\n      // `_isCheckout` is only set when the checkout is due to `checkoutEveryNms`\n      // We also want to treat the first event as a checkout, so we handle this specifically here\n      const isCheckout = _isCheckout || !hadFirstEvent;\n      hadFirstEvent = true;\n\n      syncMirrorAttributesFromMutationEvent(event);\n\n      if (replay.clickDetector) {\n        updateClickDetectorForRecordingEvent(replay.clickDetector, event);\n      }\n\n      // The handler returns `true` if we do not want to trigger debounced flush, `false` if we want to debounce flush.\n      replay.addUpdate(() => {\n        // The session is always started immediately on pageload/init, but for\n        // error-only replays, it should reflect the most recent checkout\n        // when an error occurs. Clear any state that happens before this current\n        // checkout. This needs to happen before `addEvent()` which updates state\n        // dependent on this reset.\n        if (replay.recordingMode === 'buffer' && isCheckout) {\n          replay.setInitialState();\n        }\n\n        // If the event is not added (e.g. due to being paused, disabled, or out of the max replay duration),\n        // Skip all further steps\n        if (!addEventSync(replay, event, isCheckout)) {\n          // Return true to skip scheduling a debounced flush\n          return true;\n        }\n\n        // Different behavior for full snapshots (type=2), ignore other event types\n        // See https://github.com/rrweb-io/rrweb/blob/d8f9290ca496712aa1e7d472549480c4e7876594/packages/rrweb/src/types.ts#L16\n        if (!isCheckout) {\n          return false;\n        }\n\n        const session = replay.session;\n\n        // Additionally, create a meta event that will capture certain SDK settings.\n        // In order to handle buffer mode, this needs to either be done when we\n        // receive checkout events or at flush time. We have an experimental mode\n        // to perform multiple checkouts a session (the idea is to improve\n        // seeking during playback), so also only include if segmentId is 0\n        // (handled in `addSettingsEvent`).\n        //\n        // `isCheckout` is always true, but want to be explicit that it should\n        // only be added for checkouts\n        addSettingsEvent(replay, isCheckout);\n\n        // When in buffer mode, make sure we adjust the session started date to the current earliest event of the buffer\n        // this should usually be the timestamp of the checkout event, but to be safe...\n        if (replay.recordingMode === 'buffer' && session && replay.eventBuffer && !session.dirty) {\n          const earliestEvent = replay.eventBuffer.getEarliestTimestamp();\n          if (earliestEvent) {\n            DEBUG_BUILD &&\n              debug.log(`Updating session start time to earliest event in buffer to ${new Date(earliestEvent)}`);\n\n            session.started = earliestEvent;\n\n            if (replay.getOptions().stickySession) {\n              saveSession(session);\n            }\n          }\n        }\n\n        // If there is a previousSessionId after a full snapshot occurs, then\n        // the replay session was started due to session expiration. The new session\n        // is started before triggering a new checkout and contains the id\n        // of the previous session. Do not immediately flush in this case\n        // to avoid capturing only the checkout and instead the replay will\n        // be captured if they perform any follow-up actions.\n        if (session?.previousSessionId) {\n          return true;\n        }\n\n        if (replay.recordingMode === 'session') {\n          // If the full snapshot is due to an initial load, we will not have\n          // a previous session ID. In this case, we want to buffer events\n          // for a set amount of time before flushing. This can help avoid\n          // capturing replays of users that immediately close the window.\n\n          // This should never reject\n          // eslint-disable-next-line @typescript-eslint/no-floating-promises\n          void replay.flush();\n        }\n\n        return true;\n      });\n    } catch (error) {\n      replay.handleException(error);\n    }\n  };\n}\n\nexport function syncMirrorAttributesFromMutationEvent(event: RecordingEvent): void {\n  const data = event.data;\n\n  if (\n    event.type !== EventType.IncrementalSnapshot ||\n    !data ||\n    typeof data !== 'object' ||\n    !('source' in data) ||\n    data.source !== IncrementalSource.Mutation ||\n    !('attributes' in data) ||\n    !Array.isArray(data.attributes)\n  ) {\n    return;\n  }\n\n  for (const mutation of data.attributes as MutationAttributeData[]) {\n    const node = record.mirror.getNode(mutation.id);\n    const meta = node && record.mirror.getMeta(node);\n\n    if (meta?.type !== NodeType.Element) {\n      continue;\n    }\n\n    for (const [attributeName, value] of Object.entries(mutation.attributes)) {\n      if (value === null) {\n        // oxlint-disable-next-line typescript/no-dynamic-delete\n        delete meta.attributes[attributeName];\n      } else {\n        meta.attributes[attributeName] = value;\n      }\n    }\n  }\n}\n\n/**\n * Exported for tests\n */\nexport function createOptionsEvent(replay: ReplayContainer): ReplayOptionFrameEvent {\n  const options = replay.getOptions();\n  return {\n    type: EventType.Custom,\n    timestamp: Date.now(),\n    data: {\n      tag: 'options',\n      payload: {\n        shouldRecordCanvas: replay.isRecordingCanvas(),\n        sessionSampleRate: options.sessionSampleRate,\n        errorSampleRate: options.errorSampleRate,\n        useCompressionOption: options.useCompression,\n        blockAllMedia: options.blockAllMedia,\n        maskAllText: options.maskAllText,\n        maskAllInputs: options.maskAllInputs,\n        useCompression: replay.eventBuffer ? replay.eventBuffer.type === 'worker' : false,\n        networkDetailHasUrls: options.networkDetailAllowUrls.length > 0,\n        networkCaptureBodies: options.networkCaptureBodies,\n        networkRequestHasHeaders: options.networkRequestHeaders.length > 0,\n        networkResponseHasHeaders: options.networkResponseHeaders.length > 0,\n      },\n    },\n  };\n}\n\n/**\n * Add a \"meta\" event that contains a simplified view on current configuration\n * options. This should only be included on the first segment of a recording.\n */\nfunction addSettingsEvent(replay: ReplayContainer, isCheckout?: boolean): void {\n  // Only need to add this event when sending the first segment\n  if (!isCheckout || replay.session?.segmentId !== 0) {\n    return;\n  }\n\n  addEventSync(replay, createOptionsEvent(replay), false);\n}\n", "/**\n * Vendored in from @sentry/rrweb.\n *\n * This is a copy of the function from rrweb, it is not nicely exported there.\n */\nexport function closestElementOfNode(node: Node | null): HTMLElement | null {\n  if (!node) {\n    return null;\n  }\n\n  // Catch access to node properties to avoid Firefox \"permission denied\" errors\n  try {\n    const el: HTMLElement | null = node.nodeType === node.ELEMENT_NODE ? (node as HTMLElement) : node.parentElement;\n    return el;\n  } catch {\n    return null;\n  }\n}\n", "import type { DsnComponents, ReplayEnvelope, ReplayEvent, ReplayRecordingData } from '@sentry/core';\nimport { createEnvelope, createEventEnvelopeHeaders, getSdkMetadataForEnvelopeHeader } from '@sentry/core';\n\n/**\n * Create a replay envelope ready to be sent.\n * This includes both the replay event, as well as the recording data.\n */\nexport function createReplayEnvelope(\n  replayEvent: ReplayEvent,\n  recordingData: ReplayRecordingData,\n  dsn: DsnComponents,\n  tunnel?: string,\n): ReplayEnvelope {\n  return createEnvelope<ReplayEnvelope>(\n    createEventEnvelopeHeaders(replayEvent, getSdkMetadataForEnvelopeHeader(replayEvent), tunnel, dsn),\n    [\n      [{ type: 'replay_event' }, replayEvent],\n      [\n        {\n          type: 'replay_recording',\n          // If string then we need to encode to UTF8, otherwise will have\n          // wrong size. TextEncoder has similar browser support to\n          // MutationObserver, although it does not accept IE11.\n          length:\n            typeof recordingData === 'string' ? new TextEncoder().encode(recordingData).length : recordingData.length,\n        },\n        recordingData,\n      ],\n    ],\n  );\n}\n", "import type { ReplayRecordingData } from '@sentry/core';\n\n/**\n * Prepare the recording data ready to be sent.\n */\nexport function prepareRecordingData({\n  recordingData,\n  headers,\n}: {\n  recordingData: ReplayRecordingData;\n  headers: Record<string, unknown>;\n}): ReplayRecordingData {\n  let payloadWithSequence;\n\n  // XXX: newline is needed to separate sequence id from events\n  const replayHeaders = `${JSON.stringify(headers)}\n`;\n\n  if (typeof recordingData === 'string') {\n    payloadWithSequence = `${replayHeaders}${recordingData}`;\n  } else {\n    const enc = new TextEncoder();\n    // XXX: newline is needed to separate sequence id from events\n    const sequence = enc.encode(replayHeaders);\n    // Merge the two Uint8Arrays\n    payloadWithSequence = new Uint8Array(sequence.length + recordingData.length);\n    payloadWithSequence.set(sequence);\n    payloadWithSequence.set(recordingData, sequence.length);\n  }\n\n  return payloadWithSequence;\n}\n", "import type { Client, EventHint, ReplayEvent, Scope } from '@sentry/core';\nimport { getIsolationScope, prepareEvent } from '@sentry/core';\n\n/**\n * Prepare a replay event & enrich it with the SDK metadata.\n */\nexport async function prepareReplayEvent({\n  client,\n  scope,\n  replayId: event_id,\n  event,\n}: {\n  client: Client;\n  scope: Scope;\n  replayId: string;\n  event: ReplayEvent;\n}): Promise<ReplayEvent | null> {\n  const integrations =\n    typeof client['_integrations'] === 'object' &&\n    client['_integrations'] !== null &&\n    !Array.isArray(client['_integrations'])\n      ? Object.keys(client['_integrations'])\n      : undefined;\n\n  const eventHint: EventHint = { event_id, integrations };\n\n  client.emit('preprocessEvent', event, eventHint);\n\n  const preparedEvent = (await prepareEvent(\n    client.getOptions(),\n    event,\n    eventHint,\n    scope,\n    client,\n    getIsolationScope(),\n  )) as ReplayEvent | null;\n\n  // If e.g. a global event processor returned null\n  if (!preparedEvent) {\n    return null;\n  }\n\n  client.emit('postprocessEvent', preparedEvent, eventHint);\n\n  // This normally happens in browser client \"_prepareEvent\"\n  // but since we do not use this private method from the client, but rather the plain import\n  // we need to do this manually.\n  preparedEvent.platform = preparedEvent.platform || 'javascript';\n\n  // extract the SDK name because `client._prepareEvent` doesn't add it to the event\n  const metadata = client.getSdkMetadata();\n  const { name, version, settings } = metadata?.sdk || {};\n\n  preparedEvent.sdk = {\n    ...preparedEvent.sdk,\n    name: name || 'sentry.javascript.unknown',\n    version: version || '0.0.0',\n    settings,\n  };\n\n  return preparedEvent;\n}\n", "import type { RateLimits, ReplayEvent, TransportMakeRequestResponse } from '@sentry/core';\nimport { getClient, getCurrentScope, isRateLimited, updateRateLimits } from '@sentry/core';\nimport { REPLAY_EVENT_NAME, UNABLE_TO_SEND_REPLAY } from '../constants';\nimport { DEBUG_BUILD } from '../debug-build';\nimport type { SendReplayData } from '../types';\nimport { createReplayEnvelope } from './createReplayEnvelope';\nimport { debug } from './logger';\nimport { prepareRecordingData } from './prepareRecordingData';\nimport { prepareReplayEvent } from './prepareReplayEvent';\n\n/**\n * Send replay attachment using `fetch()`\n */\nexport async function sendReplayRequest({\n  recordingData,\n  replayId,\n  segmentId: segment_id,\n  eventContext,\n  timestamp,\n  session,\n}: SendReplayData): Promise<TransportMakeRequestResponse> {\n  const preparedRecordingData = prepareRecordingData({\n    recordingData,\n    headers: {\n      segment_id,\n    },\n  });\n\n  const { urls, errorIds, traceIds, segmentNames, initialTimestamp } = eventContext;\n\n  const client = getClient();\n  const scope = getCurrentScope();\n  const transport = client?.getTransport();\n  const dsn = client?.getDsn();\n\n  if (!client || !transport || !dsn || !session.sampled) {\n    return Promise.resolve({});\n  }\n\n  const baseEvent: ReplayEvent = {\n    type: REPLAY_EVENT_NAME,\n    replay_start_timestamp: initialTimestamp / 1000,\n    timestamp: timestamp / 1000,\n    error_ids: errorIds,\n    trace_ids: traceIds,\n    segment_names: segmentNames,\n    urls,\n    replay_id: replayId,\n    segment_id,\n    replay_type: session.sampled,\n  };\n\n  const replayEvent = await prepareReplayEvent({ scope, client, replayId, event: baseEvent });\n\n  if (!replayEvent) {\n    // Taken from baseclient's `_processEvent` method, where this is handled for errors/transactions\n    client.recordDroppedEvent('event_processor', 'replay');\n    DEBUG_BUILD && debug.log('An event processor returned `null`, will not send event.');\n    return Promise.resolve({});\n  }\n\n  /*\n  For reference, the fully built event looks something like this:\n  {\n      \"type\": \"replay_event\",\n      \"timestamp\": 1670837008.634,\n      \"error_ids\": [\n          \"errorId\"\n      ],\n      \"trace_ids\": [\n          \"traceId\"\n      ],\n      \"urls\": [\n          \"https://example.com\"\n      ],\n      \"replay_id\": \"eventId\",\n      \"segment_id\": 3,\n      \"replay_type\": \"error\",\n      \"platform\": \"javascript\",\n      \"event_id\": \"eventId\",\n      \"environment\": \"production\",\n      \"sdk\": {\n          \"integrations\": [\n              \"BrowserTracing\",\n              \"Replay\"\n          ],\n          \"name\": \"sentry.javascript.browser\",\n          \"version\": \"7.25.0\"\n      },\n      \"sdkProcessingMetadata\": {},\n      \"contexts\": {\n      },\n  }\n  */\n\n  // Prevent this data (which, if it exists, was used in earlier steps in the processing pipeline) from being sent to\n  // sentry. (Note: Our use of this property comes and goes with whatever we might be debugging, whatever hacks we may\n  // have temporarily added, etc. Even if we don't happen to be using it at some point in the future, let's not get rid\n  // of this `delete`, lest we miss putting it back in the next time the property is in use.)\n  delete replayEvent.sdkProcessingMetadata;\n\n  const envelope = createReplayEnvelope(replayEvent, preparedRecordingData, dsn, client.getOptions().tunnel);\n\n  let response: TransportMakeRequestResponse;\n\n  try {\n    response = await transport.send(envelope);\n  } catch (err) {\n    const error = new Error(UNABLE_TO_SEND_REPLAY);\n\n    try {\n      // In case browsers don't allow this property to be writable\n      // @ts-expect-error This needs lib es2022 and newer\n      error.cause = err;\n    } catch {\n      // nothing to do\n    }\n    throw error;\n  }\n\n  // Check for rate limiting first (handles 429 and rate limit headers)\n  const rateLimits = updateRateLimits({}, response);\n  if (isRateLimited(rateLimits, 'replay')) {\n    throw new RateLimitError(rateLimits);\n  }\n\n  // If the status code is invalid, we want to immediately stop & not retry\n  if (typeof response.statusCode === 'number' && (response.statusCode < 200 || response.statusCode >= 300)) {\n    throw new TransportStatusCodeError(response.statusCode);\n  }\n\n  return response;\n}\n\n/**\n * This error indicates that the transport returned an invalid status code.\n */\nexport class TransportStatusCodeError extends Error {\n  public constructor(statusCode: number) {\n    super(`Transport returned status code ${statusCode}`);\n  }\n}\n\n/**\n * This error indicates that we hit a rate limit API error.\n */\nexport class RateLimitError extends Error {\n  public rateLimits: RateLimits;\n\n  public constructor(rateLimits: RateLimits) {\n    super('Rate limit hit');\n    this.rateLimits = rateLimits;\n  }\n}\n\n/**\n * This error indicates that the replay duration limit was exceeded and the session is too long.\n *\n */\nexport class ReplayDurationLimitError extends Error {\n  public constructor() {\n    super('Session is too long, not sending replay');\n  }\n}\n", "import { setContext } from '@sentry/core';\nimport { setTimeout } from '@sentry/browser-utils';\nimport { RETRY_BASE_INTERVAL, RETRY_MAX_COUNT, UNABLE_TO_SEND_REPLAY } from '../constants';\nimport type { SendReplayData } from '../types';\nimport { RateLimitError, sendReplayRequest, TransportStatusCodeError } from './sendReplayRequest';\n\n/**\n * Finalize and send the current replay event to Sentry\n */\nexport async function sendReplay(\n  replayData: SendReplayData,\n  retryConfig = {\n    count: 0,\n    interval: RETRY_BASE_INTERVAL,\n  },\n): Promise<unknown> {\n  const { recordingData, onError } = replayData;\n\n  // short circuit if there's no events to upload (this shouldn't happen as _runFlush makes this check)\n  if (!recordingData.length) {\n    return;\n  }\n\n  try {\n    await sendReplayRequest(replayData);\n    return true;\n  } catch (err) {\n    if (err instanceof TransportStatusCodeError || err instanceof RateLimitError) {\n      throw err;\n    }\n\n    // Capture error for every failed replay\n    setContext('Replays', {\n      _retryCount: retryConfig.count,\n    });\n\n    if (onError) {\n      onError(err);\n    }\n\n    // If an error happened here, it's likely that uploading the attachment\n    // failed, we'll can retry with the same events payload\n    if (retryConfig.count >= RETRY_MAX_COUNT) {\n      const error = new Error(`${UNABLE_TO_SEND_REPLAY} - max retries exceeded`);\n\n      try {\n        // In case browsers don't allow this property to be writable\n        // @ts-expect-error This needs lib es2022 and newer\n        error.cause = err;\n      } catch {\n        // nothing to do\n      }\n\n      throw error;\n    }\n\n    // will retry in intervals of 5, 10, 30\n    retryConfig.interval *= ++retryConfig.count;\n\n    return new Promise((resolve, reject) => {\n      setTimeout(async () => {\n        try {\n          await sendReplay(replayData, retryConfig);\n          resolve(true);\n        } catch (err) {\n          reject(err);\n        }\n      }, retryConfig.interval);\n    });\n  }\n}\n", "export const THROTTLED = '__THROTTLED';\nexport const SKIPPED = '__SKIPPED';\n\n/**\n * Create a throttled function off a given function.\n * When calling the throttled function, it will call the original function only\n * if it hasn't been called more than `maxCount` times in the last `durationSeconds`.\n *\n * Returns `THROTTLED` if throttled for the first time, after that `SKIPPED`,\n * or else the return value of the original function.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function throttle<T extends (...rest: any[]) => any>(\n  fn: T,\n  maxCount: number,\n  durationSeconds: number,\n): (...rest: Parameters<T>) => ReturnType<T> | typeof THROTTLED | typeof SKIPPED {\n  const counter = new Map<number, number>();\n\n  const _cleanup = (now: number): void => {\n    const threshold = now - durationSeconds;\n    counter.forEach((_value, key) => {\n      if (key < threshold) {\n        counter.delete(key);\n      }\n    });\n  };\n\n  const _getTotalCount = (): number => {\n    return [...counter.values()].reduce((a, b) => a + b, 0);\n  };\n\n  let isThrottled = false;\n\n  return (...rest: Parameters<T>): ReturnType<T> | typeof THROTTLED | typeof SKIPPED => {\n    // Date in second-precision, which we use as basis for the throttling\n    const now = Math.floor(Date.now() / 1000);\n\n    // First, make sure to delete any old entries\n    _cleanup(now);\n\n    // If already over limit, do nothing\n    if (_getTotalCount() >= maxCount) {\n      const wasThrottled = isThrottled;\n      isThrottled = true;\n      return wasThrottled ? SKIPPED : THROTTLED;\n    }\n\n    isThrottled = false;\n    const count = counter.get(now) || 0;\n    counter.set(now, count + 1);\n\n    return fn(...rest);\n  };\n}\n", "/* eslint-disable max-lines */ // TODO: We might want to split this file up\nimport type { ReplayRecordingMode, ReplayStopReason, Span } from '@sentry/core';\nimport { getActiveSpan, getClient, getRootSpan, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, spanToJSON } from '@sentry/core';\nimport { EventType, record } from '@sentry/rrweb';\nimport {\n  BUFFER_CHECKOUT_TIME,\n  SESSION_IDLE_EXPIRE_DURATION,\n  SESSION_IDLE_PAUSE_DURATION,\n  SLOW_CLICK_SCROLL_TIMEOUT,\n  SLOW_CLICK_THRESHOLD,\n  WINDOW,\n} from './constants';\nimport { ClickDetector } from './coreHandlers/handleClick';\nimport { handleKeyboardEvent } from './coreHandlers/handleKeyboardEvent';\nimport { setupPerformanceObserver } from './coreHandlers/performanceObserver';\nimport { DEBUG_BUILD } from './debug-build';\nimport { createEventBuffer } from './eventBuffer';\nimport { clearSession } from './session/clearSession';\nimport { loadOrCreateSession } from './session/loadOrCreateSession';\nimport { saveSession } from './session/saveSession';\nimport { shouldRefreshSession } from './session/shouldRefreshSession';\nimport type {\n  AddEventResult,\n  AddUpdateCallback,\n  AllPerformanceEntry,\n  AllPerformanceEntryData,\n  EventBuffer,\n  InternalEventContext,\n  PopEventContext,\n  RecordingEvent,\n  RecordingOptions,\n  ReplayBreadcrumbFrame,\n  ReplayCanvasIntegrationOptions,\n  ReplayContainer as ReplayContainerInterface,\n  ReplayPerformanceEntry,\n  ReplayPluginOptions,\n  SendBufferedReplayOptions,\n  Session,\n  SlowClickConfig,\n  Timeouts,\n} from './types';\nimport { ReplayEventTypeCustom } from './types';\nimport { addEvent, addEventSync } from './util/addEvent';\nimport { addGlobalListeners } from './util/addGlobalListeners';\nimport { addMemoryEntry } from './util/addMemoryEntry';\nimport { createBreadcrumb } from './util/createBreadcrumb';\nimport { createPerformanceEntries } from './util/createPerformanceEntries';\nimport { createPerformanceSpans } from './util/createPerformanceSpans';\nimport { debounce } from './util/debounce';\nimport { getRecordingSamplingOptions } from './util/getRecordingSamplingOptions';\nimport { getHandleRecordingEmit } from './util/handleRecordingEmit';\nimport { isExpired } from './util/isExpired';\nimport { debug } from './util/logger';\nimport {\n  resetReplayIdOnDynamicSamplingContext,\n  setReplayIdOnDynamicSamplingContext,\n} from './util/resetReplayIdOnDynamicSamplingContext';\nimport { closestElementOfNode } from './util/rrweb';\nimport { sendReplay } from './util/sendReplay';\nimport { RateLimitError, ReplayDurationLimitError } from './util/sendReplayRequest';\nimport type { SKIPPED } from './util/throttle';\nimport { throttle, THROTTLED } from './util/throttle';\n\n/**\n * The main replay container class, which holds all the state and methods for recording and sending replays.\n */\nexport class ReplayContainer implements ReplayContainerInterface {\n  public eventBuffer: EventBuffer | null;\n\n  public performanceEntries: AllPerformanceEntry[];\n\n  public replayPerformanceEntries: ReplayPerformanceEntry<AllPerformanceEntryData>[];\n\n  public session: Session | undefined;\n\n  public clickDetector: ClickDetector | undefined;\n\n  /**\n   * Recording can happen in one of two modes:\n   *   - session: Record the whole session, sending it continuously\n   *   - buffer: Always keep the last 60s of recording, requires:\n   *     - having replaysOnErrorSampleRate > 0 to capture replay when an error occurs\n   *     - or calling `flush()` to send the replay\n   */\n  public recordingMode: ReplayRecordingMode;\n\n  /**\n   * The current or last active span.\n   * This is only available when performance is enabled.\n   */\n  public lastActiveSpan?: Span;\n\n  /**\n   * These are here so we can overwrite them in tests etc.\n   * @hidden\n   */\n  public readonly timeouts: Timeouts;\n\n  /** The replay has to be manually started, because no sample rate (neither session or error) was provided. */\n  private _requiresManualStart: boolean;\n\n  private _throttledAddEvent: (\n    event: RecordingEvent,\n    isCheckout?: boolean,\n  ) => typeof THROTTLED | typeof SKIPPED | Promise<AddEventResult | null>;\n\n  /**\n   * Options to pass to `rrweb.record()`\n   */\n  private readonly _recordingOptions: RecordingOptions;\n\n  private readonly _options: ReplayPluginOptions;\n\n  private _performanceCleanupCallback?: () => void;\n\n  private _debouncedFlush: ReturnType<typeof debounce>;\n  private _flushLock: Promise<unknown> | undefined;\n\n  /**\n   * Timestamp of the last user activity. This lives across sessions.\n   */\n  private _lastActivity: number;\n\n  /**\n   * Is the integration currently active?\n   */\n  private _isEnabled: boolean;\n\n  /**\n   * Paused is a state where:\n   * - DOM Recording is not listening at all\n   * - Nothing will be added to event buffer (e.g. core SDK events)\n   */\n  private _isPaused: boolean;\n\n  /**\n   * Have we attached listeners to the core SDK?\n   * Note we have to track this as there is no way to remove instrumentation handlers.\n   */\n  private _hasInitializedCoreListeners: boolean;\n\n  /**\n   * Function to stop recording\n   */\n  private _stopRecording: ReturnType<typeof record> | undefined;\n\n  private _context: InternalEventContext;\n\n  /**\n   * Internal use for canvas recording options\n   */\n  private _canvas: ReplayCanvasIntegrationOptions | undefined;\n\n  /**\n   * Handle when visibility of the page content changes. Opening a new tab will\n   * cause the state to change to hidden because of content of current page will\n   * be hidden. Likewise, moving a different window to cover the contents of the\n   * page will also trigger a change to a hidden state.\n   */\n  private _handleVisibilityChange: () => void;\n\n  /**\n   * Handle when page is blurred\n   */\n  private _handleWindowBlur: () => void;\n\n  /**\n   * Handle when page is focused\n   */\n  private _handleWindowFocus: () => void;\n\n  /** Ensure page remains active when a key is pressed. */\n  private _handleKeyboardEvent: (event: KeyboardEvent) => void;\n\n  public constructor({\n    options,\n    recordingOptions,\n  }: {\n    options: ReplayPluginOptions;\n    recordingOptions: RecordingOptions;\n  }) {\n    this.eventBuffer = null;\n    this.performanceEntries = [];\n    this.replayPerformanceEntries = [];\n    this.recordingMode = 'session';\n    this.timeouts = {\n      sessionIdlePause: SESSION_IDLE_PAUSE_DURATION,\n      sessionIdleExpire: SESSION_IDLE_EXPIRE_DURATION,\n    } as const;\n    this._lastActivity = Date.now();\n    this._isEnabled = false;\n    this._isPaused = false;\n    this._requiresManualStart = false;\n    this._hasInitializedCoreListeners = false;\n    this._context = {\n      errorIds: new Set(),\n      traceIds: new Set(),\n      segmentNames: new Set(),\n      urls: [],\n      initialTimestamp: Date.now(),\n      initialUrl: '',\n    };\n\n    this._recordingOptions = recordingOptions;\n    this._options = options;\n\n    this._debouncedFlush = debounce(() => this._flush(), this._options.flushMinDelay, {\n      maxWait: this._options.flushMaxDelay,\n    });\n\n    this._throttledAddEvent = throttle(\n      (event: RecordingEvent, isCheckout?: boolean) => addEvent(this, event, isCheckout),\n      // Max 300 events...\n      300,\n      // ... per 5s\n      5,\n    );\n\n    const { slowClickTimeout, slowClickIgnoreSelectors } = this.getOptions();\n\n    const slowClickConfig: SlowClickConfig | undefined = slowClickTimeout\n      ? {\n          threshold: Math.min(SLOW_CLICK_THRESHOLD, slowClickTimeout),\n          timeout: slowClickTimeout,\n          scrollTimeout: SLOW_CLICK_SCROLL_TIMEOUT,\n          ignoreSelector: slowClickIgnoreSelectors ? slowClickIgnoreSelectors.join(',') : '',\n        }\n      : undefined;\n\n    if (slowClickConfig) {\n      this.clickDetector = new ClickDetector(this, slowClickConfig);\n    }\n\n    // Configure replay debug logger w/ experimental options\n    if (DEBUG_BUILD) {\n      const experiments = options._experiments;\n      debug.setConfig({\n        captureExceptions: !!experiments.captureExceptions,\n        traceInternals: !!experiments.traceInternals,\n      });\n    }\n\n    // We set these handler properties as class properties, to make binding/unbinding them easier\n    this._handleVisibilityChange = () => {\n      if (WINDOW.document.visibilityState === 'visible') {\n        this._doChangeToForegroundTasks();\n      } else {\n        this._doChangeToBackgroundTasks();\n      }\n    };\n\n    /**\n     * Handle when page is blurred\n     */\n    this._handleWindowBlur = () => {\n      const breadcrumb = createBreadcrumb({\n        category: 'ui.blur',\n      });\n\n      // Do not count blur as a user action -- it's part of the process of them\n      // leaving the page\n      this._doChangeToBackgroundTasks(breadcrumb);\n    };\n\n    this._handleWindowFocus = () => {\n      const breadcrumb = createBreadcrumb({\n        category: 'ui.focus',\n      });\n\n      // Do not count focus as a user action -- instead wait until they focus and\n      // interactive with page\n      this._doChangeToForegroundTasks(breadcrumb);\n    };\n\n    /** Ensure page remains active when a key is pressed. */\n    this._handleKeyboardEvent = (event: KeyboardEvent) => {\n      handleKeyboardEvent(this, event);\n    };\n  }\n\n  /** Get the event context. */\n  public getContext(): InternalEventContext {\n    return this._context;\n  }\n\n  /** If recording is currently enabled. */\n  public isEnabled(): boolean {\n    return this._isEnabled;\n  }\n\n  /** If recording is currently paused. */\n  public isPaused(): boolean {\n    return this._isPaused;\n  }\n\n  /**\n   * Determine if canvas recording is enabled\n   */\n  public isRecordingCanvas(): boolean {\n    return Boolean(this._canvas);\n  }\n\n  /** Get the replay integration options. */\n  public getOptions(): ReplayPluginOptions {\n    return this._options;\n  }\n\n  /** A wrapper to conditionally capture exceptions. */\n  public handleException(error: unknown): void {\n    DEBUG_BUILD && debug.exception(error);\n    if (this._options.onError) {\n      this._options.onError(error);\n    }\n  }\n\n  /**\n   * Initializes the plugin based on sampling configuration. Should not be\n   * called outside of constructor.\n   */\n  public initializeSampling(previousSessionId?: string): void {\n    const { errorSampleRate, sessionSampleRate } = this._options;\n\n    // If neither sample rate is > 0, then do nothing - user will need to call one of\n    // `start()` or `startBuffering` themselves.\n    const requiresManualStart = errorSampleRate <= 0 && sessionSampleRate <= 0;\n\n    this._requiresManualStart = requiresManualStart;\n\n    if (requiresManualStart) {\n      return;\n    }\n\n    // Otherwise if there is _any_ sample rate set, try to load an existing\n    // session, or create a new one.\n    this._initializeSessionForSampling(previousSessionId);\n\n    if (!this.session) {\n      // This should not happen, something wrong has occurred\n      DEBUG_BUILD && debug.exception(new Error('Unable to initialize and create session'));\n      return;\n    }\n\n    if (this.session.sampled === false) {\n      // This should only occur if `errorSampleRate` is 0 and was unsampled for\n      // session-based replay. In this case there is nothing to do.\n      return;\n    }\n\n    // If segmentId > 0, it means we've previously already captured this session\n    // In this case, we still want to continue in `session` recording mode\n    this.recordingMode = this.session.sampled === 'buffer' && this.session.segmentId === 0 ? 'buffer' : 'session';\n\n    DEBUG_BUILD && debug.infoTick(`Starting replay in ${this.recordingMode} mode`);\n\n    this._initializeRecording();\n  }\n\n  /**\n   * Start a replay regardless of sampling rate. Calling this will always\n   * create a new session. Will log a message if replay is already in progress.\n   *\n   * Creates or loads a session, attaches listeners to varying events (DOM,\n   * _performanceObserver, Recording, Sentry SDK, etc)\n   */\n  public start(): void {\n    if (this._isEnabled && this.recordingMode === 'session') {\n      DEBUG_BUILD && debug.log('Recording is already in progress');\n      return;\n    }\n\n    if (this._isEnabled && this.recordingMode === 'buffer') {\n      DEBUG_BUILD && debug.log('Buffering is in progress, call `flush()` to save the replay');\n      return;\n    }\n\n    DEBUG_BUILD && debug.infoTick('Starting replay in session mode');\n\n    // Required as user activity is initially set in\n    // constructor, so if `start()` is called after\n    // session idle expiration, a replay will not be\n    // created due to an idle timeout.\n    this._updateUserActivity();\n\n    const session = loadOrCreateSession(\n      {\n        maxReplayDuration: this._options.maxReplayDuration,\n        sessionIdleExpire: this.timeouts.sessionIdleExpire,\n      },\n      {\n        stickySession: this._options.stickySession,\n        // This is intentional: create a new session-based replay when calling `start()`\n        sessionSampleRate: 1,\n        allowBuffering: false,\n      },\n    );\n\n    this.session = session;\n    this.recordingMode = 'session';\n\n    this._initializeRecording();\n  }\n\n  /**\n   * Start replay buffering. Buffers until `flush()` is called or, if\n   * `replaysOnErrorSampleRate` > 0, an error occurs.\n   */\n  public startBuffering(): void {\n    if (this._isEnabled) {\n      DEBUG_BUILD && debug.log('Buffering is in progress, call `flush()` to save the replay');\n      return;\n    }\n\n    DEBUG_BUILD && debug.infoTick('Starting replay in buffer mode');\n\n    const session = loadOrCreateSession(\n      {\n        sessionIdleExpire: this.timeouts.sessionIdleExpire,\n        maxReplayDuration: this._options.maxReplayDuration,\n      },\n      {\n        stickySession: this._options.stickySession,\n        sessionSampleRate: 0,\n        allowBuffering: true,\n      },\n    );\n\n    this.session = session;\n\n    this.recordingMode = 'buffer';\n    this._initializeRecording();\n  }\n\n  /**\n   * Start recording.\n   *\n   * Note that this will cause a new DOM checkout\n   */\n  public startRecording(): void {\n    try {\n      const canvasOptions = this._canvas;\n\n      this._stopRecording = record({\n        ...this._recordingOptions,\n        // When running in error sampling mode, we need to overwrite `checkoutEveryNms`\n        // Without this, it would record forever, until an error happens, which we don't want\n        // instead, we'll always keep the last 60 seconds of replay before an error happened\n        ...(this.recordingMode === 'buffer'\n          ? { checkoutEveryNms: BUFFER_CHECKOUT_TIME }\n          : // Otherwise, use experimental option w/ min checkout time of 6 minutes\n            // This is to improve playback seeking as there could potentially be\n            // less mutations to process in the worse cases.\n            //\n            // checkout by \"N\" events is probably ideal, but means we have less\n            // control about the number of checkouts we make (which generally\n            // increases replay size)\n            this._options._experiments.continuousCheckout && {\n              // Minimum checkout time is 6 minutes\n              checkoutEveryNms: Math.max(360_000, this._options._experiments.continuousCheckout),\n            }),\n        emit: getHandleRecordingEmit(this),\n        ...getRecordingSamplingOptions(),\n        onMutation: this._onMutationHandler.bind(this),\n        ...(canvasOptions\n          ? {\n              recordCanvas: canvasOptions.recordCanvas,\n              getCanvasManager: canvasOptions.getCanvasManager,\n              sampling: canvasOptions.sampling,\n              dataURLOptions: canvasOptions.dataURLOptions,\n            }\n          : {}),\n      });\n    } catch (err) {\n      this.handleException(err);\n    }\n  }\n\n  /**\n   * Stops the recording, if it was running.\n   *\n   * Returns true if it was previously stopped, or is now stopped,\n   * otherwise false.\n   */\n  public stopRecording(): boolean {\n    try {\n      if (this._stopRecording) {\n        this._stopRecording();\n        this._stopRecording = undefined;\n      }\n\n      return true;\n    } catch (err) {\n      this.handleException(err);\n      return false;\n    }\n  }\n\n  /**\n   * Currently, this needs to be manually called (e.g. for tests). Sentry SDK\n   * does not support a teardown\n   */\n  public async stop({\n    forceFlush = false,\n    reason,\n  }: { forceFlush?: boolean; reason?: ReplayStopReason } = {}): Promise<void> {\n    if (!this._isEnabled) {\n      return;\n    }\n\n    // We can't move `_isEnabled` after awaiting a flush, otherwise we can\n    // enter into an infinite loop when `stop()` is called while flushing.\n    this._isEnabled = false;\n\n    // Make sure to reset `recordingMode` to `buffer` to avoid any additional\n    // breadcrumbs to trigger a flush (e.g. in `addUpdate()`)\n    this.recordingMode = 'buffer';\n\n    const stopReason: ReplayStopReason = reason ?? 'manual';\n    getClient()?.emit('replayEnd', { sessionId: this.session?.id, reason: stopReason });\n\n    try {\n      DEBUG_BUILD && debug.log(`Stopping Replay triggered by ${stopReason}`);\n\n      resetReplayIdOnDynamicSamplingContext();\n\n      this._removeListeners();\n      this.stopRecording();\n\n      this._debouncedFlush.cancel();\n      // See comment above re: `_isEnabled`, we \"force\" a flush, ignoring the\n      // `_isEnabled` state of the plugin since it was disabled above.\n      if (forceFlush) {\n        await this._flush({ force: true });\n      }\n\n      // After flush, destroy event buffer\n      this.eventBuffer?.destroy();\n      this.eventBuffer = null;\n\n      // Clear session from session storage, note this means if a new session\n      // is started after, it will not have `previousSessionId`\n      clearSession(this);\n    } catch (err) {\n      this.handleException(err);\n    }\n  }\n\n  /**\n   * Pause some replay functionality. See comments for `_isPaused`.\n   * This differs from stop as this only stops DOM recording, it is\n   * not as thorough of a shutdown as `stop()`.\n   */\n  public pause(): void {\n    if (this._isPaused) {\n      return;\n    }\n\n    this._isPaused = true;\n    this.stopRecording();\n\n    DEBUG_BUILD && debug.log('Pausing replay');\n  }\n\n  /**\n   * Resumes recording, see notes for `pause().\n   *\n   * Note that calling `startRecording()` here will cause a\n   * new DOM checkout.`\n   */\n  public resume(): void {\n    if (!this._isPaused || !this._checkSession()) {\n      return;\n    }\n\n    this._isPaused = false;\n    this.startRecording();\n\n    DEBUG_BUILD && debug.log('Resuming replay');\n  }\n\n  /**\n   * If not in \"session\" recording mode, flush event buffer which will create a new replay.\n   * Unless `continueRecording` is false, the replay will continue to record and\n   * behave as a \"session\"-based replay.\n   *\n   * Otherwise, queue up a flush.\n   */\n  public async sendBufferedReplayOrFlush({ continueRecording = true }: SendBufferedReplayOptions = {}): Promise<void> {\n    if (this.recordingMode === 'session') {\n      return this.flushImmediate();\n    }\n\n    const activityTime = Date.now();\n\n    DEBUG_BUILD && debug.log('Converting buffer to session');\n\n    // Allow flush to complete before resuming as a session recording, otherwise\n    // the checkout from `startRecording` may be included in the payload.\n    // Prefer to keep the error replay as a separate (and smaller) segment\n    // than the session replay.\n    await this.flushImmediate();\n\n    const hasStoppedRecording = this.stopRecording();\n\n    if (!continueRecording || !hasStoppedRecording) {\n      return;\n    }\n\n    // To avoid race conditions where this is called multiple times, we check here again that we are still buffering\n    if ((this.recordingMode as ReplayRecordingMode) === 'session') {\n      return;\n    }\n\n    // Re-start recording in session-mode\n    this.recordingMode = 'session';\n\n    // Once this session ends, we do not want to refresh it\n    if (this.session) {\n      this.session.dirty = false;\n      this._updateUserActivity(activityTime);\n      this._updateSessionActivity(activityTime);\n      this._maybeSaveSession();\n      setReplayIdOnDynamicSamplingContext(this.session.id);\n    }\n\n    this.startRecording();\n  }\n\n  /**\n   * We want to batch uploads of replay events. Save events only if\n   * `<flushMinDelay>` milliseconds have elapsed since the last event\n   * *OR* if `<flushMaxDelay>` milliseconds have elapsed.\n   *\n   * Accepts a callback to perform side-effects and returns true to stop batch\n   * processing and hand back control to caller.\n   */\n  public addUpdate(cb: AddUpdateCallback): void {\n    // We need to always run `cb` (e.g. in the case of `this.recordingMode == 'buffer'`)\n    const cbResult = cb();\n\n    // If this option is turned on then we will only want to call `flush`\n    // explicitly\n    if (this.recordingMode === 'buffer' || !this._isEnabled) {\n      return;\n    }\n\n    // If callback is true, we do not want to continue with flushing -- the\n    // caller will need to handle it.\n    if (cbResult === true) {\n      return;\n    }\n\n    // addUpdate is called quite frequently - use _debouncedFlush so that it\n    // respects the flush delays and does not flush immediately\n    this._debouncedFlush();\n  }\n\n  /**\n   * Updates the user activity timestamp and resumes recording. This should be\n   * called in an event handler for a user action that we consider as the user\n   * being \"active\" (e.g. a mouse click).\n   */\n  public triggerUserActivity(): void {\n    this._updateUserActivity();\n\n    // This case means that recording was once stopped due to inactivity.\n    // Ensure that recording is resumed.\n    if (!this._stopRecording) {\n      // Create a new session, otherwise when the user action is flushed, it\n      // will get rejected due to an expired session.\n      if (!this._checkSession()) {\n        return;\n      }\n\n      // Note: This will cause a new DOM checkout\n      this.resume();\n      return;\n    }\n\n    // Otherwise... recording was never suspended, continue as normalish\n    this.checkAndHandleExpiredSession();\n\n    this._updateSessionActivity();\n  }\n\n  /**\n   * Updates the user activity timestamp *without* resuming\n   * recording. Some user events (e.g. keydown) can be create\n   * low-value replays that only contain the keypress as a\n   * breadcrumb. Instead this would require other events to\n   * create a new replay after a session has expired.\n   */\n  public updateUserActivity(): void {\n    this._updateUserActivity();\n    this._updateSessionActivity();\n  }\n\n  /**\n   * Only flush if `this.recordingMode === 'session'`\n   */\n  public conditionalFlush(): Promise<void> {\n    if (this.recordingMode === 'buffer') {\n      return Promise.resolve();\n    }\n\n    return this.flushImmediate();\n  }\n\n  /**\n   * Flush using debounce flush\n   */\n  public flush(): Promise<void> {\n    return this._debouncedFlush() as Promise<void>;\n  }\n\n  /**\n   * Always flush via `_debouncedFlush` so that we do not have flushes triggered\n   * from calling both `flush` and `_debouncedFlush`. Otherwise, there could be\n   * cases of multiple flushes happening closely together.\n   */\n  public flushImmediate(): Promise<void> {\n    this._debouncedFlush();\n    // `.flush` is provided by the debounced function, analogously to lodash.debounce\n    return this._debouncedFlush.flush() as Promise<void>;\n  }\n\n  /**\n   * Cancels queued up flushes.\n   */\n  public cancelFlush(): void {\n    this._debouncedFlush.cancel();\n  }\n\n  /** Get the current session (=replay) ID\n   *\n   * @param onlyIfSampled - If true, will only return the session ID if the session is sampled.\n   */\n  public getSessionId(onlyIfSampled?: boolean): string | undefined {\n    if (onlyIfSampled && this.session?.sampled === false) {\n      return undefined;\n    }\n\n    return this.session?.id;\n  }\n\n  /**\n   * Checks if recording should be stopped due to user inactivity. Otherwise\n   * check if session is expired and create a new session if so. Triggers a new\n   * full snapshot on new session.\n   *\n   * Returns true if session is not expired, false otherwise.\n   * @hidden\n   */\n  public checkAndHandleExpiredSession(): boolean | void {\n    // Prevent starting a new session if the last user activity is older than\n    // SESSION_IDLE_PAUSE_DURATION. Otherwise non-user activity can trigger a new\n    // session+recording. This creates noisy replays that do not have much\n    // content in them.\n    if (\n      this._lastActivity &&\n      isExpired(this._lastActivity, this.timeouts.sessionIdlePause) &&\n      this.session?.sampled === 'session'\n    ) {\n      // Pause recording only for session-based replays. Otherwise, resuming\n      // will create a new replay and will conflict with users who only choose\n      // to record error-based replays only. (e.g. the resumed replay will not\n      // contain a reference to an error)\n      this.pause();\n      return;\n    }\n\n    // --- There is recent user activity --- //\n    // This will create a new session if expired, based on expiry length\n    if (!this._checkSession()) {\n      // Check session handles the refreshing itself\n      return false;\n    }\n\n    return true;\n  }\n\n  /**\n   * Capture some initial state that can change throughout the lifespan of the\n   * replay. This is required because otherwise they would be captured at the\n   * first flush.\n   */\n  public setInitialState(): void {\n    const urlPath = `${WINDOW.location.pathname}${WINDOW.location.hash}${WINDOW.location.search}`;\n    const url = `${WINDOW.location.origin}${urlPath}`;\n\n    this.performanceEntries = [];\n    this.replayPerformanceEntries = [];\n\n    // Reset _context as well\n    this._clearContext();\n\n    this._context.initialUrl = url;\n    this._context.initialTimestamp = Date.now();\n    this._context.urls.push(url);\n  }\n\n  /**\n   * Add a breadcrumb event, that may be throttled.\n   * If it was throttled, we add a custom breadcrumb to indicate that.\n   */\n  public throttledAddEvent(\n    event: RecordingEvent,\n    isCheckout?: boolean,\n  ): typeof THROTTLED | typeof SKIPPED | Promise<AddEventResult | null> {\n    const res = this._throttledAddEvent(event, isCheckout);\n\n    // If this is THROTTLED, it means we have throttled the event for the first time\n    // In this case, we want to add a breadcrumb indicating that something was skipped\n    if (res === THROTTLED) {\n      const breadcrumb = createBreadcrumb({\n        category: 'replay.throttled',\n      });\n\n      this.addUpdate(() => {\n        // Return `false` if the event _was_ added, as that means we schedule a flush\n        return !addEventSync(this, {\n          type: ReplayEventTypeCustom,\n          timestamp: breadcrumb.timestamp || 0,\n          data: {\n            tag: 'breadcrumb',\n            payload: breadcrumb,\n            metric: true,\n          },\n        });\n      });\n    }\n\n    return res;\n  }\n\n  /**\n   * This will get the parametrized route name of the current page.\n   * This is only available if performance is enabled, and if an instrumented router is used.\n   */\n  public getCurrentRoute(): string | undefined {\n    const lastActiveSpan = this.lastActiveSpan || getActiveSpan();\n    const lastRootSpan = lastActiveSpan && getRootSpan(lastActiveSpan);\n\n    const attributes = (lastRootSpan && spanToJSON(lastRootSpan).data) || {};\n    const source = attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE];\n    if (!lastRootSpan || !source || !['route', 'custom'].includes(source)) {\n      return undefined;\n    }\n\n    return spanToJSON(lastRootSpan).description;\n  }\n\n  /**\n   * Initialize and start all listeners to varying events (DOM,\n   * Performance Observer, Recording, Sentry SDK, etc)\n   */\n  private _initializeRecording(): void {\n    this.setInitialState();\n\n    // this method is generally called on page load or manually - in both cases\n    // we should treat it as an activity\n    this._updateSessionActivity();\n\n    this.eventBuffer = createEventBuffer({\n      useCompression: this._options.useCompression,\n      workerUrl: this._options.workerUrl,\n    });\n\n    this._removeListeners();\n    this._addListeners();\n\n    // Need to set as enabled before we start recording, as `record()` can trigger a flush with a new checkout\n    this._isEnabled = true;\n    this._isPaused = false;\n\n    if (this.session) {\n      getClient()?.emit('replayStart', {\n        sessionId: this.session.id,\n        recordingMode: this.recordingMode,\n      });\n    }\n\n    this.startRecording();\n\n    // Update the cached DSC with the new replay_id when in session mode.\n    // The cached DSC on the scope (set by browserTracingIntegration) persists\n    // across session refreshes, and the `createDsc` hook won't fire for it.\n    if (this.recordingMode === 'session' && this.session) {\n      setReplayIdOnDynamicSamplingContext(this.session.id);\n    }\n  }\n\n  /**\n   * Loads (or refreshes) the current session.\n   */\n  private _initializeSessionForSampling(previousSessionId?: string): void {\n    // Whenever there is _any_ error sample rate, we always allow buffering\n    // Because we decide on sampling when an error occurs, we need to buffer at all times if sampling for errors\n    const allowBuffering = this._options.errorSampleRate > 0;\n\n    const session = loadOrCreateSession(\n      {\n        sessionIdleExpire: this.timeouts.sessionIdleExpire,\n        maxReplayDuration: this._options.maxReplayDuration,\n        previousSessionId,\n      },\n      {\n        stickySession: this._options.stickySession,\n        sessionSampleRate: this._options.sessionSampleRate,\n        allowBuffering,\n      },\n    );\n\n    this.session = session;\n  }\n\n  /**\n   * Checks and potentially refreshes the current session.\n   * Returns false if session is not recorded.\n   */\n  private _checkSession(): boolean {\n    // If there is no session yet, we do not want to refresh anything\n    // This should generally not happen, but to be safe....\n    if (!this.session) {\n      return false;\n    }\n\n    const currentSession = this.session;\n\n    if (\n      shouldRefreshSession(currentSession, {\n        sessionIdleExpire: this.timeouts.sessionIdleExpire,\n        maxReplayDuration: this._options.maxReplayDuration,\n      })\n    ) {\n      // This should never reject\n      // eslint-disable-next-line @typescript-eslint/no-floating-promises\n      this._refreshSession(currentSession);\n      return false;\n    }\n\n    return true;\n  }\n\n  /**\n   * Refresh a session with a new one.\n   * This stops the current session (without forcing a flush, as that would never work since we are expired),\n   * and then does a new sampling based on the refreshed session.\n   */\n  private async _refreshSession(session: Session): Promise<void> {\n    if (!this._isEnabled) {\n      return;\n    }\n    await this.stop({ reason: 'sessionExpired' });\n    this.initializeSampling(session.id);\n  }\n\n  /**\n   * Adds listeners to record events for the replay\n   */\n  private _addListeners(): void {\n    try {\n      WINDOW.document.addEventListener('visibilitychange', this._handleVisibilityChange);\n      WINDOW.addEventListener('blur', this._handleWindowBlur);\n      WINDOW.addEventListener('focus', this._handleWindowFocus);\n      WINDOW.addEventListener('keydown', this._handleKeyboardEvent);\n\n      if (this.clickDetector) {\n        this.clickDetector.addListeners();\n      }\n\n      // There is no way to remove these listeners, so ensure they are only added once\n      if (!this._hasInitializedCoreListeners) {\n        addGlobalListeners(this);\n\n        this._hasInitializedCoreListeners = true;\n      }\n    } catch (err) {\n      this.handleException(err);\n    }\n\n    this._performanceCleanupCallback = setupPerformanceObserver(this);\n  }\n\n  /**\n   * Cleans up listeners that were created in `_addListeners`\n   */\n  private _removeListeners(): void {\n    try {\n      WINDOW.document.removeEventListener('visibilitychange', this._handleVisibilityChange);\n\n      WINDOW.removeEventListener('blur', this._handleWindowBlur);\n      WINDOW.removeEventListener('focus', this._handleWindowFocus);\n      WINDOW.removeEventListener('keydown', this._handleKeyboardEvent);\n\n      if (this.clickDetector) {\n        this.clickDetector.removeListeners();\n      }\n\n      if (this._performanceCleanupCallback) {\n        this._performanceCleanupCallback();\n      }\n    } catch (err) {\n      this.handleException(err);\n    }\n  }\n\n  /**\n   * Tasks to run when we consider a page to be hidden (via blurring and/or visibility)\n   */\n  private _doChangeToBackgroundTasks(breadcrumb?: ReplayBreadcrumbFrame): void {\n    if (!this.session) {\n      return;\n    }\n\n    const expired = shouldRefreshSession(this.session, {\n      maxReplayDuration: this._options.maxReplayDuration,\n      sessionIdleExpire: this.timeouts.sessionIdleExpire,\n    });\n\n    if (expired) {\n      resetReplayIdOnDynamicSamplingContext();\n      return;\n    }\n\n    if (breadcrumb) {\n      this._createCustomBreadcrumb(breadcrumb);\n    }\n\n    // Send replay when the page/tab becomes hidden. There is no reason to send\n    // replay if it becomes visible, since no actions we care about were done\n    // while it was hidden\n    // This should never reject\n    // eslint-disable-next-line @typescript-eslint/no-floating-promises\n    void this.conditionalFlush();\n  }\n\n  /**\n   * Tasks to run when we consider a page to be visible (via focus and/or visibility)\n   */\n  private _doChangeToForegroundTasks(breadcrumb?: ReplayBreadcrumbFrame): void {\n    if (!this.session) {\n      return;\n    }\n\n    const isSessionActive = this.checkAndHandleExpiredSession();\n\n    if (!isSessionActive) {\n      // If the user has come back to the page within SESSION_IDLE_PAUSE_DURATION\n      // ms, we will re-use the existing session, otherwise create a new\n      // session\n      DEBUG_BUILD && debug.log('Document has become active, but session has expired');\n      return;\n    }\n\n    if (breadcrumb) {\n      this._createCustomBreadcrumb(breadcrumb);\n    }\n  }\n\n  /**\n   * Update user activity (across session lifespans)\n   */\n  private _updateUserActivity(_lastActivity: number = Date.now()): void {\n    this._lastActivity = _lastActivity;\n  }\n\n  /**\n   * Updates the session's last activity timestamp\n   */\n  private _updateSessionActivity(_lastActivity: number = Date.now()): void {\n    if (this.session) {\n      this.session.lastActivity = _lastActivity;\n      this._maybeSaveSession();\n    }\n  }\n\n  /**\n   * Helper to create (and buffer) a replay breadcrumb from a core SDK breadcrumb\n   */\n  private _createCustomBreadcrumb(breadcrumb: ReplayBreadcrumbFrame): void {\n    this.addUpdate(() => {\n      // This should never reject\n      // eslint-disable-next-line @typescript-eslint/no-floating-promises\n      this.throttledAddEvent({\n        type: EventType.Custom,\n        timestamp: breadcrumb.timestamp || 0,\n        data: {\n          tag: 'breadcrumb',\n          payload: breadcrumb,\n        },\n      });\n    });\n  }\n\n  /**\n   * Observed performance events are added to `this.performanceEntries`. These\n   * are included in the replay event before it is finished and sent to Sentry.\n   */\n  private _addPerformanceEntries(): Promise<Array<AddEventResult | null>> {\n    let performanceEntries = createPerformanceEntries(this.performanceEntries).concat(this.replayPerformanceEntries);\n\n    this.performanceEntries = [];\n    this.replayPerformanceEntries = [];\n\n    // If we are manually starting, we want to ensure we only include performance entries\n    // that are after the initial timestamp\n    // The reason for this is that we may have performance entries from the page load, but may decide to start\n    // the replay later on, in which case we do not want to include these entries.\n    // without this, manually started replays can have events long before the actual replay recording starts,\n    // which messes with the timeline etc.\n    if (this._requiresManualStart) {\n      const initialTimestampInSeconds = this._context.initialTimestamp / 1000;\n      performanceEntries = performanceEntries.filter(entry => entry.start >= initialTimestampInSeconds);\n    }\n\n    return Promise.all(createPerformanceSpans(this, performanceEntries));\n  }\n\n  /**\n   * Clear _context\n   */\n  private _clearContext(): void {\n    // XXX: `initialTimestamp` and `initialUrl` do not get cleared\n    this._context.errorIds.clear();\n    this._context.traceIds.clear();\n    this._context.segmentNames.clear();\n    this._context.urls = [];\n  }\n\n  /** Update the initial timestamp based on the buffer content. */\n  private _updateInitialTimestampFromEventBuffer(): void {\n    const { session, eventBuffer } = this;\n    // If replay was started manually (=no sample rate was given),\n    // We do not want to back-port the initial timestamp\n    if (!session || !eventBuffer || this._requiresManualStart) {\n      return;\n    }\n\n    // we only ever update this on the initial segment\n    if (session.segmentId) {\n      return;\n    }\n\n    const earliestEvent = eventBuffer.getEarliestTimestamp();\n    if (earliestEvent && earliestEvent < this._context.initialTimestamp) {\n      this._context.initialTimestamp = earliestEvent;\n    }\n  }\n\n  /**\n   * Return and clear _context\n   */\n  private _popEventContext(): PopEventContext {\n    const _context = {\n      initialTimestamp: this._context.initialTimestamp,\n      initialUrl: this._context.initialUrl,\n      errorIds: Array.from(this._context.errorIds),\n      traceIds: Array.from(this._context.traceIds),\n      segmentNames: Array.from(this._context.segmentNames),\n      urls: this._context.urls,\n    };\n\n    this._clearContext();\n\n    return _context;\n  }\n\n  /**\n   * Flushes replay event buffer to Sentry.\n   *\n   * Performance events are only added right before flushing - this is\n   * due to the buffered performance observer events.\n   *\n   * Should never be called directly, only by `flush`\n   */\n  private async _runFlush(): Promise<void> {\n    const replayId = this.getSessionId();\n\n    if (!this.session || !this.eventBuffer || !replayId) {\n      DEBUG_BUILD && debug.error('No session or eventBuffer found to flush.');\n      return;\n    }\n\n    await this._addPerformanceEntries();\n\n    // Check eventBuffer again, as it could have been stopped in the meanwhile\n    if (!this.eventBuffer?.hasEvents) {\n      return;\n    }\n\n    // Only attach memory event if eventBuffer is not empty\n    await addMemoryEntry(this);\n\n    // Check eventBuffer again, as it could have been stopped in the meanwhile\n    if (!this.eventBuffer) {\n      return;\n    }\n\n    // if this changed in the meanwhile, e.g. because the session was refreshed or similar, we abort here\n    if (replayId !== this.getSessionId()) {\n      return;\n    }\n\n    try {\n      // This uses the data from the eventBuffer, so we need to call this before `finish()\n      this._updateInitialTimestampFromEventBuffer();\n\n      const timestamp = Date.now();\n\n      // Check total duration again, to avoid sending outdated stuff\n      // We leave 30s wiggle room to accommodate late flushing etc.\n      // This _could_ happen when the browser is suspended during flushing, in which case we just want to stop\n      if (timestamp - this._context.initialTimestamp > this._options.maxReplayDuration + 30_000) {\n        throw new ReplayDurationLimitError();\n      }\n\n      const eventContext = this._popEventContext();\n      // Always increment segmentId regardless of outcome of sending replay\n      const segmentId = this.session.segmentId++;\n      this._maybeSaveSession();\n\n      // Note this empties the event buffer regardless of outcome of sending replay\n      const recordingData = await this.eventBuffer.finish();\n\n      await sendReplay({\n        replayId,\n        recordingData,\n        segmentId,\n        eventContext,\n        session: this.session,\n        timestamp,\n        onError: err => this.handleException(err),\n      });\n    } catch (err) {\n      this.handleException(err);\n\n      // This means we retried 3 times and all of them failed,\n      // or we ran into a problem we don't want to retry, like rate limiting.\n      // In this case, we want to completely stop the replay - otherwise, we may get inconsistent segments\n      // This should never reject\n      // eslint-disable-next-line @typescript-eslint/no-floating-promises\n      this.stop({ reason: 'sendError' });\n\n      const client = getClient();\n\n      if (client) {\n        let dropReason: 'ratelimit_backoff' | 'send_error' | 'invalid';\n        if (err instanceof RateLimitError) {\n          dropReason = 'ratelimit_backoff';\n        } else if (err instanceof ReplayDurationLimitError) {\n          dropReason = 'invalid';\n        } else {\n          dropReason = 'send_error';\n        }\n        client.recordDroppedEvent(dropReason, 'replay');\n      }\n    }\n  }\n\n  /**\n   * Flush recording data to Sentry. Creates a lock so that only a single flush\n   * can be active at a time. Do not call this directly.\n   */\n  private async _flush({\n    force = false,\n  }: {\n    /**\n     * If true, flush while ignoring the `_isEnabled` state of\n     * Replay integration. (By default, flush is noop if integration\n     * is stopped).\n     */\n    force?: boolean;\n  } = {}): Promise<void> {\n    if (!this._isEnabled && !force) {\n      // This can happen if e.g. the replay was stopped because of exceeding the retry limit\n      return;\n    }\n\n    if (!this.checkAndHandleExpiredSession()) {\n      DEBUG_BUILD && debug.error('Attempting to finish replay event after session expired.');\n      return;\n    }\n\n    if (!this.session) {\n      // should never happen, as we would have bailed out before\n      return;\n    }\n\n    const start = this.session.started;\n    const now = Date.now();\n    const duration = now - start;\n\n    // A flush is about to happen, cancel any queued flushes\n    this._debouncedFlush.cancel();\n\n    // If session is too short, or too long (allow some wiggle room over maxReplayDuration), do not send it\n    // This _should_ not happen, but it may happen if flush is triggered due to a page activity change or similar\n    const tooShort = duration < this._options.minReplayDuration;\n    const tooLong = duration > this._options.maxReplayDuration + 5_000;\n    if (tooShort || tooLong) {\n      DEBUG_BUILD &&\n        debug.log(\n          `Session duration (${Math.floor(duration / 1000)}s) is too ${\n            tooShort ? 'short' : 'long'\n          }, not sending replay.`,\n        );\n\n      if (tooShort) {\n        this._debouncedFlush();\n      }\n      return;\n    }\n\n    const eventBuffer = this.eventBuffer;\n    if (eventBuffer && this.session.segmentId === 0 && !eventBuffer.hasCheckout) {\n      DEBUG_BUILD && debug.log('Flushing initial segment without checkout.');\n      // TODO FN: Evaluate if we want to stop here, or remove this again?\n    }\n\n    const _flushInProgress = !!this._flushLock;\n\n    // this._flushLock acts as a lock so that future calls to `_flush()` will\n    // be blocked until current flush is finished (i.e. this promise resolves)\n    if (!this._flushLock) {\n      this._flushLock = this._runFlush();\n    }\n\n    try {\n      await this._flushLock;\n    } catch (err) {\n      this.handleException(err);\n    } finally {\n      this._flushLock = undefined;\n\n      if (_flushInProgress) {\n        // Wait for previous flush to finish, then call the debounced\n        // `_flush()`. It's possible there are other flush requests queued and\n        // waiting for it to resolve. We want to reduce all outstanding\n        // requests (as well as any new flush requests that occur within a\n        // second of the locked flush completing) into a single flush.\n        this._debouncedFlush();\n      }\n    }\n  }\n\n  /** Save the session, if it is sticky */\n  private _maybeSaveSession(): void {\n    if (this.session && this._options.stickySession) {\n      saveSession(this.session);\n    }\n  }\n\n  /** Handler for rrweb.record.onMutation */\n  private _onMutationHandler(mutations: MutationRecord[]): boolean {\n    const { ignoreMutations } = this._options._experiments;\n    if (ignoreMutations?.length) {\n      if (\n        mutations.some(mutation => {\n          const el = closestElementOfNode(mutation.target);\n          const selector = ignoreMutations.join(',');\n          return el?.matches(selector);\n        })\n      ) {\n        return false;\n      }\n    }\n\n    const count = mutations.length;\n\n    const mutationLimit = this._options.mutationLimit;\n    const mutationBreadcrumbLimit = this._options.mutationBreadcrumbLimit;\n    const overMutationLimit = mutationLimit && count > mutationLimit;\n\n    // Create a breadcrumb if a lot of mutations happen at the same time\n    // We can show this in the UI as an information with potential performance improvements\n    if (count > mutationBreadcrumbLimit || overMutationLimit) {\n      const breadcrumb = createBreadcrumb({\n        category: 'replay.mutations',\n        data: {\n          count,\n          limit: overMutationLimit,\n        },\n      });\n      this._createCustomBreadcrumb(breadcrumb);\n    }\n\n    // Stop replay if over the mutation limit\n    if (overMutationLimit) {\n      // This should never reject\n      // eslint-disable-next-line @typescript-eslint/no-floating-promises\n      this.stop({ reason: 'mutationLimit', forceFlush: this.recordingMode === 'session' });\n      return false;\n    }\n\n    // `true` means we use the regular mutation handling by rrweb\n    return true;\n  }\n}\n\ninterface MutationRecord {\n  type: string;\n  target: Node;\n  oldValue: string | null;\n  addedNodes: NodeList;\n  removedNodes: NodeList;\n  attributeName: string | null;\n}\n", "import type { ReplayIntegrationPrivacyOptions } from '../types';\n\ntype GetPrivacyOptions = Required<Omit<ReplayIntegrationPrivacyOptions, 'maskFn'>>;\n\ninterface GetPrivacyReturn {\n  maskTextSelector: string;\n  unmaskTextSelector: string;\n  blockSelector: string;\n  unblockSelector: string;\n  ignoreSelector: string;\n\n  blockClass?: RegExp;\n  maskTextClass?: RegExp;\n}\n\nfunction getOption(selectors: string[], defaultSelectors: string[]): string {\n  return [\n    ...selectors,\n    // sentry defaults\n    ...defaultSelectors,\n  ].join(',');\n}\n\n/**\n * Returns privacy related configuration for use in rrweb\n */\nexport function getPrivacyOptions({ mask, unmask, block, unblock, ignore }: GetPrivacyOptions): GetPrivacyReturn {\n  const defaultBlockedElements = ['base', 'iframe[srcdoc]:not([src])'];\n\n  const maskSelector = getOption(mask, ['.sentry-mask', '[data-sentry-mask]']);\n  const unmaskSelector = getOption(unmask, []);\n\n  const options: GetPrivacyReturn = {\n    // We are making the decision to make text and input selectors the same\n    maskTextSelector: maskSelector,\n    unmaskTextSelector: unmaskSelector,\n\n    blockSelector: getOption(block, ['.sentry-block', '[data-sentry-block]', ...defaultBlockedElements]),\n    unblockSelector: getOption(unblock, []),\n    ignoreSelector: getOption(ignore, ['.sentry-ignore', '[data-sentry-ignore]', 'input[type=\"file\"]']),\n  };\n\n  return options;\n}\n", "import type { getPrivacyOptions } from './getPrivacyOptions';\n\ninterface MaskAttributeParams {\n  maskAttributes: string[];\n  maskAllText: boolean;\n  privacyOptions: ReturnType<typeof getPrivacyOptions>;\n  key: string;\n  value: string;\n  el: HTMLElement;\n}\n\n/**\n * Masks an attribute if necessary, otherwise return attribute value as-is.\n * Keys listed in `maskAttributes` are masked even when `maskAllText` is false;\n * masking `value` on submit/button inputs without listing `value` still requires `maskAllText`.\n */\nexport function maskAttribute({\n  el,\n  key,\n  maskAttributes,\n  maskAllText,\n  privacyOptions,\n  value,\n}: MaskAttributeParams): string {\n  // unmaskTextSelector takes precedence\n  if (privacyOptions.unmaskTextSelector && el.matches(privacyOptions.unmaskTextSelector)) {\n    return value;\n  }\n\n  const masksNamedAttribute = maskAttributes.includes(key);\n  // When `maskAllText` is enabled, also mask `value` on button-like inputs even if `value` is not listed.\n  const masksSubmitButtonValue =\n    maskAllText &&\n    key === 'value' &&\n    el.tagName === 'INPUT' &&\n    ['submit', 'button'].includes(el.getAttribute('type') || '');\n\n  if (masksNamedAttribute || masksSubmitButtonValue) {\n    return value.replace(/[\\S]/g, '*');\n  }\n\n  return value;\n}\n", "import type {\n  BrowserClientReplayOptions,\n  Client,\n  Integration,\n  IntegrationFn,\n  ReplayRecordingMode,\n  StreamedSpanJSON,\n} from '@sentry/core';\nimport { consoleSandbox, GLOBAL_OBJ, isBrowser, parseSampleRate, safeSetSpanJSONAttributes } from '@sentry/core';\nimport {\n  DEFAULT_FLUSH_MAX_DELAY,\n  DEFAULT_FLUSH_MIN_DELAY,\n  MAX_REPLAY_DURATION,\n  MIN_REPLAY_DURATION,\n  MIN_REPLAY_DURATION_LIMIT,\n} from './constants';\nimport { ReplayContainer } from './replay';\nimport type {\n  InitialReplayPluginOptions,\n  RecordingOptions,\n  ReplayCanvasIntegrationOptions,\n  ReplayConfiguration,\n  ReplayPluginOptions,\n  SendBufferedReplayOptions,\n} from './types';\nimport { getPrivacyOptions } from './util/getPrivacyOptions';\nimport { maskAttribute } from './util/maskAttribute';\n\nconst MEDIA_SELECTORS =\n  'img,image,svg,video,object,picture,embed,map,audio,link[rel=\"icon\"],link[rel=\"apple-touch-icon\"]';\n\nconst DEFAULT_NETWORK_HEADERS = ['content-length', 'content-type', 'accept'];\n\n// Symbol to store the original body on Request objects\nconst ORIGINAL_BODY = Symbol.for('sentry__originalRequestBody');\n\nlet _initialized = false;\nlet _isRequestInstrumented = false;\n\n/**\n * Instruments the global Request constructor to store the original body.\n * This allows us to retrieve the original body value later, since Request\n * converts string bodies to ReadableStreams.\n */\nexport function _INTERNAL_instrumentRequestInterface(): void {\n  if (typeof Request === 'undefined' || _isRequestInstrumented) {\n    return;\n  }\n\n  const OriginalRequest = Request;\n\n  try {\n    const SentryRequest = function (input: RequestInfo | URL, init?: RequestInit): Request {\n      const request = new OriginalRequest(input, init);\n      if (init?.body != null) {\n        // eslint-disable-next-line @typescript-eslint/no-explicit-any,@typescript-eslint/no-unsafe-member-access\n        (request as any)[ORIGINAL_BODY] = init.body;\n      }\n      return request;\n    };\n\n    SentryRequest.prototype = OriginalRequest.prototype;\n\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any,@typescript-eslint/no-unsafe-member-access\n    (GLOBAL_OBJ as any).Request = SentryRequest;\n\n    _isRequestInstrumented = true;\n  } catch {\n    // Fail silently if Request is frozen\n  }\n}\n\n/**\n * Sentry integration for [Session Replay](https://sentry.io/for/session-replay/).\n *\n * See the [Replay documentation](https://docs.sentry.io/platforms/javascript/guides/session-replay/) for more information.\n *\n * @example\n *\n * ```\n * Sentry.init({\n *   dsn: '__DSN__',\n *   integrations: [Sentry.replayIntegration()],\n * });\n * ```\n */\nexport const replayIntegration = ((options?: ReplayConfiguration) => {\n  return new Replay(options);\n}) satisfies IntegrationFn;\n\n/**\n * Replay integration\n */\nexport class Replay implements Integration {\n  /**\n   * @inheritDoc\n   */\n  public name: string;\n\n  /**\n   * Options to pass to `rrweb.record()`\n   */\n  private readonly _recordingOptions: RecordingOptions;\n\n  /**\n   * Initial options passed to the replay integration, merged with default values.\n   * Note: `sessionSampleRate` and `errorSampleRate` are not required here, as they\n   * can only be finally set when setupOnce() is called.\n   *\n   * @private\n   */\n  private readonly _initialOptions: InitialReplayPluginOptions;\n\n  private _replay?: ReplayContainer;\n\n  public constructor({\n    flushMinDelay = DEFAULT_FLUSH_MIN_DELAY,\n    flushMaxDelay = DEFAULT_FLUSH_MAX_DELAY,\n    minReplayDuration = MIN_REPLAY_DURATION,\n    maxReplayDuration = MAX_REPLAY_DURATION,\n    stickySession = true,\n    useCompression = true,\n    workerUrl,\n    _experiments = {},\n    maskAllText = true,\n    maskAllInputs = true,\n    blockAllMedia = true,\n\n    mutationBreadcrumbLimit = 750,\n    mutationLimit = 10_000,\n\n    slowClickTimeout = 7_000,\n    slowClickIgnoreSelectors = [],\n\n    networkDetailAllowUrls = [],\n    networkDetailDenyUrls = [],\n    networkCaptureBodies = true,\n    networkRequestHeaders = [],\n    networkResponseHeaders = [],\n\n    mask = [],\n    maskAttributes = ['title', 'placeholder', 'aria-label'],\n    unmask = [],\n    block = [],\n    unblock = [],\n    ignore = [],\n    maskFn,\n\n    beforeAddRecordingEvent,\n    beforeErrorSampling,\n    onError,\n    attachRawBodyFromRequest = false,\n  }: ReplayConfiguration = {}) {\n    this.name = 'Replay';\n\n    const privacyOptions = getPrivacyOptions({\n      mask,\n      unmask,\n      block,\n      unblock,\n      ignore,\n    });\n\n    this._recordingOptions = {\n      maskAllInputs,\n      maskAllText,\n      maskInputOptions: { password: true },\n      maskTextFn: maskFn,\n      maskInputFn: maskFn,\n      maskAttributeFn: (key: string, value: string, el: HTMLElement): string =>\n        maskAttribute({\n          maskAttributes,\n          maskAllText,\n          privacyOptions,\n          key,\n          value,\n          el,\n        }),\n\n      ...privacyOptions,\n\n      // Our defaults\n      slimDOMOptions: 'all',\n      inlineStylesheet: true,\n      // Disable inline images as it will increase segment/replay size\n      inlineImages: false,\n      // collect fonts, but be aware that `sentry.io` needs to be an allowed\n      // origin for playback\n      collectFonts: true,\n      errorHandler: (err: Error & { __rrweb__?: boolean }) => {\n        try {\n          err.__rrweb__ = true;\n        } catch {\n          // ignore errors here\n          // this can happen if the error is frozen or does not allow mutation for other reasons\n        }\n      },\n      // experimental support for recording iframes from different origins\n      recordCrossOriginIframes: Boolean(_experiments.recordCrossOriginIframes),\n    };\n\n    this._initialOptions = {\n      flushMinDelay,\n      flushMaxDelay,\n      minReplayDuration: Math.min(minReplayDuration, MIN_REPLAY_DURATION_LIMIT),\n      maxReplayDuration: Math.min(maxReplayDuration, MAX_REPLAY_DURATION),\n      stickySession,\n      useCompression,\n      workerUrl,\n      blockAllMedia,\n      maskAllInputs,\n      maskAllText,\n      mutationBreadcrumbLimit,\n      mutationLimit,\n      slowClickTimeout,\n      slowClickIgnoreSelectors,\n      networkDetailAllowUrls,\n      networkDetailDenyUrls,\n      networkCaptureBodies,\n      networkRequestHeaders: _getMergedNetworkHeaders(networkRequestHeaders),\n      networkResponseHeaders: _getMergedNetworkHeaders(networkResponseHeaders),\n      beforeAddRecordingEvent,\n      beforeErrorSampling,\n      onError,\n      attachRawBodyFromRequest,\n\n      _experiments,\n    };\n\n    if (this._initialOptions.blockAllMedia) {\n      // `blockAllMedia` is a more user friendly option to configure blocking\n      // embedded media elements\n      this._recordingOptions.blockSelector = !this._recordingOptions.blockSelector\n        ? MEDIA_SELECTORS\n        : `${this._recordingOptions.blockSelector},${MEDIA_SELECTORS}`;\n      this._recordingOptions.ignoreCSSAttributes = new Set(['background-image']);\n    }\n\n    if (this._isInitialized && isBrowser()) {\n      throw new Error('Multiple Sentry Session Replay instances are not supported');\n    }\n\n    this._isInitialized = true;\n  }\n\n  /** If replay has already been initialized */\n  protected get _isInitialized(): boolean {\n    return _initialized;\n  }\n\n  /** Update _isInitialized */\n  protected set _isInitialized(value: boolean) {\n    _initialized = value;\n  }\n\n  /**\n   * Setup and initialize replay container\n   */\n  public afterAllSetup(client: Client): void {\n    if (!isBrowser() || this._replay) {\n      return;\n    }\n\n    if (this._initialOptions.attachRawBodyFromRequest) {\n      _INTERNAL_instrumentRequestInterface();\n    }\n\n    this._setup(client);\n    this._initialize(client);\n  }\n\n  /**\n   * Start a replay regardless of sampling rate. Calling this will always\n   * create a new session. Will log a message if replay is already in progress.\n   *\n   * Creates or loads a session, attaches listeners to varying events (DOM,\n   * PerformanceObserver, Recording, Sentry SDK, etc)\n   */\n  public start(): void {\n    if (!this._replay) {\n      return;\n    }\n    this._replay.start();\n  }\n\n  /**\n   * Start replay buffering. Buffers until `flush()` is called or, if\n   * `replaysOnErrorSampleRate` > 0, until an error occurs.\n   */\n  public startBuffering(): void {\n    if (!this._replay) {\n      return;\n    }\n\n    this._replay.startBuffering();\n  }\n\n  /**\n   * Currently, this needs to be manually called (e.g. for tests). Sentry SDK\n   * does not support a teardown\n   *\n   * @param options.flush - Whether to flush the pending replay segment when stopping.\n   * When recording in `session` mode, `stop()` flushes the buffered-but-unsent segment by\n   * default (`flush: true`), matching the previous behavior. Pass `flush: false` to stop\n   * recording without sending that pending segment — useful when a user withdraws consent\n   * and no further data should leave the browser.\n   *\n   * Note: `flush: false` only prevents the *pending* (final) segment from being sent. It does\n   * **not** retract segments that were already sent earlier during `session` recording.\n   */\n  public stop(options?: { flush?: boolean }): Promise<void> {\n    if (!this._replay) {\n      return Promise.resolve();\n    }\n\n    return this._replay.stop({\n      forceFlush: options?.flush ?? this._replay.recordingMode === 'session',\n      reason: 'manual',\n    });\n  }\n\n  /**\n   * If not in \"session\" recording mode, flush event buffer which will create a new replay.\n   * If replay is not enabled, a new session replay is started.\n   * Unless `continueRecording` is false, the replay will continue to record and\n   * behave as a \"session\"-based replay.\n   *\n   * Otherwise, queue up a flush.\n   */\n  public flush(options?: SendBufferedReplayOptions): Promise<void> {\n    if (!this._replay) {\n      return Promise.resolve();\n    }\n\n    // assuming a session should be recorded in this case\n    if (!this._replay.isEnabled()) {\n      this._replay.start();\n      return Promise.resolve();\n    }\n\n    return this._replay.sendBufferedReplayOrFlush(options);\n  }\n\n  /**\n   * Get the current session ID.\n   *\n   * @param onlyIfSampled - If true, will only return the session ID if the session is sampled.\n   *\n   */\n  public getReplayId(onlyIfSampled?: boolean): string | undefined {\n    if (!this._replay?.isEnabled()) {\n      return;\n    }\n\n    return this._replay.getSessionId(onlyIfSampled);\n  }\n\n  /**\n   * Get the current recording mode. This can be either `session` or `buffer`.\n   *\n   * `session`: Recording the whole session, sending it continuously\n   * `buffer`: Always keeping the last 60s of recording, requires:\n   *   - having replaysOnErrorSampleRate > 0 to capture replay when an error occurs\n   *   - or calling `flush()` to send the replay\n   */\n  public getRecordingMode(): ReplayRecordingMode | undefined {\n    if (!this._replay?.isEnabled()) {\n      return;\n    }\n\n    return this._replay.recordingMode;\n  }\n\n  public processSpan(span: StreamedSpanJSON): void {\n    const replayId = this.getReplayId(true);\n    if (replayId) {\n      safeSetSpanJSONAttributes(span, { 'sentry.replay_id': replayId });\n      if (this.getRecordingMode() === 'buffer') {\n        safeSetSpanJSONAttributes(span, { 'sentry._internal.replay_is_buffering': true });\n      }\n    }\n  }\n\n  /**\n   * Initializes replay.\n   */\n  protected _initialize(client: Client): void {\n    if (!this._replay) {\n      return;\n    }\n\n    this._maybeLoadFromReplayCanvasIntegration(client);\n    this._replay.initializeSampling();\n  }\n\n  /** Setup the integration. */\n  private _setup(client: Client): void {\n    // Client is not available in constructor, so we need to wait until setupOnce\n    const finalOptions = loadReplayOptionsFromClient(this._initialOptions, client);\n\n    this._replay = new ReplayContainer({\n      options: finalOptions,\n      recordingOptions: this._recordingOptions,\n    });\n  }\n\n  /** Get canvas options from ReplayCanvas integration, if it is also added. */\n  private _maybeLoadFromReplayCanvasIntegration(client: Client): void {\n    // To save bundle size, we skip checking for stuff here\n    // and instead just try-catch everything - as generally this should all be defined\n    /* eslint-disable @typescript-eslint/no-non-null-assertion */\n    try {\n      const canvasIntegration = client.getIntegrationByName('ReplayCanvas') as Integration & {\n        getOptions(): ReplayCanvasIntegrationOptions;\n      };\n      if (!canvasIntegration) {\n        return;\n      }\n\n      this._replay!['_canvas'] = canvasIntegration.getOptions();\n    } catch {\n      // ignore errors here\n    }\n    /* eslint-enable @typescript-eslint/no-non-null-assertion */\n  }\n}\n\n/** Parse Replay-related options from SDK options */\nfunction loadReplayOptionsFromClient(initialOptions: InitialReplayPluginOptions, client: Client): ReplayPluginOptions {\n  const opt = client.getOptions() as BrowserClientReplayOptions;\n\n  const finalOptions: ReplayPluginOptions = {\n    sessionSampleRate: 0,\n    errorSampleRate: 0,\n    ...initialOptions,\n  };\n\n  const replaysSessionSampleRate = parseSampleRate(opt.replaysSessionSampleRate);\n  const replaysOnErrorSampleRate = parseSampleRate(opt.replaysOnErrorSampleRate);\n\n  if (replaysSessionSampleRate == null && replaysOnErrorSampleRate == null) {\n    consoleSandbox(() => {\n      // eslint-disable-next-line no-console\n      console.warn(\n        'Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.',\n      );\n    });\n  }\n\n  if (replaysSessionSampleRate != null) {\n    finalOptions.sessionSampleRate = replaysSessionSampleRate;\n  }\n\n  if (replaysOnErrorSampleRate != null) {\n    finalOptions.errorSampleRate = replaysOnErrorSampleRate;\n  }\n\n  return finalOptions;\n}\n\nfunction _getMergedNetworkHeaders(headers: string[]): string[] {\n  return [...DEFAULT_NETWORK_HEADERS, ...headers.map(header => header.toLowerCase())];\n}\n", "import { getClient } from '@sentry/core';\nimport type { replayIntegration } from '../integration';\n\n/**\n * This is a small utility to get a type-safe instance of the Replay integration.\n */\nexport function getReplay(): ReturnType<typeof replayIntegration> | undefined {\n  const client = getClient();\n  return client?.getIntegrationByName<ReturnType<typeof replayIntegration>>('Replay');\n}\n", "var __defProp = Object.defineProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\nvar NodeType = /* @__PURE__ */ ((NodeType2) => {\n  NodeType2[NodeType2[\"Document\"] = 0] = \"Document\";\n  NodeType2[NodeType2[\"DocumentType\"] = 1] = \"DocumentType\";\n  NodeType2[NodeType2[\"Element\"] = 2] = \"Element\";\n  NodeType2[NodeType2[\"Text\"] = 3] = \"Text\";\n  NodeType2[NodeType2[\"CDATA\"] = 4] = \"CDATA\";\n  NodeType2[NodeType2[\"Comment\"] = 5] = \"Comment\";\n  return NodeType2;\n})(NodeType || {});\nfunction isElement(n) {\n  return n.nodeType === n.ELEMENT_NODE;\n}\nfunction isShadowRoot(n) {\n  const host = n?.host;\n  return Boolean(host?.shadowRoot === n);\n}\nfunction isNativeShadowDom(shadowRoot) {\n  return Object.prototype.toString.call(shadowRoot) === \"[object ShadowRoot]\";\n}\nfunction fixBrowserCompatibilityIssuesInCSS(cssText) {\n  if (cssText.includes(\" background-clip: text;\") && !cssText.includes(\" -webkit-background-clip: text;\")) {\n    cssText = cssText.replace(\n      /\\sbackground-clip:\\s*text;/g,\n      \" -webkit-background-clip: text; background-clip: text;\"\n    );\n  }\n  return cssText;\n}\nfunction escapeImportStatement(rule) {\n  const { cssText } = rule;\n  if (cssText.split('\"').length < 3) return cssText;\n  const statement = [\"@import\", `url(${JSON.stringify(rule.href)})`];\n  if (rule.layerName === \"\") {\n    statement.push(`layer`);\n  } else if (rule.layerName) {\n    statement.push(`layer(${rule.layerName})`);\n  }\n  if (rule.supportsText) {\n    statement.push(`supports(${rule.supportsText})`);\n  }\n  if (rule.media.length) {\n    statement.push(rule.media.mediaText);\n  }\n  return statement.join(\" \") + \";\";\n}\nfunction stringifyStylesheet(s) {\n  try {\n    const rules = s.rules || s.cssRules;\n    return rules ? fixBrowserCompatibilityIssuesInCSS(\n      Array.from(rules, stringifyRule).join(\"\")\n    ) : null;\n  } catch (error) {\n    return null;\n  }\n}\nfunction fixAllCssProperty(rule) {\n  let styles = \"\";\n  for (let i = 0; i < rule.style.length; i++) {\n    const styleDeclaration = rule.style;\n    const attribute = styleDeclaration[i];\n    const isImportant = styleDeclaration.getPropertyPriority(attribute);\n    styles += `${attribute}:${styleDeclaration.getPropertyValue(attribute)}${isImportant ? ` !important` : \"\"};`;\n  }\n  return `${rule.selectorText} { ${styles} }`;\n}\nfunction stringifyRule(rule) {\n  let importStringified;\n  if (isCSSImportRule(rule)) {\n    try {\n      importStringified = // for same-origin stylesheets,\n      // we can access the imported stylesheet rules directly\n      stringifyStylesheet(rule.styleSheet) || // work around browser issues with the raw string `@import url(...)` statement\n      escapeImportStatement(rule);\n    } catch (error) {\n    }\n  } else if (isCSSStyleRule(rule)) {\n    let cssText = rule.cssText;\n    const needsSafariColonFix = rule.selectorText.includes(\":\");\n    const needsAllFix = typeof rule.style[\"all\"] === \"string\" && rule.style[\"all\"];\n    if (needsAllFix) {\n      cssText = fixAllCssProperty(rule);\n    }\n    if (needsSafariColonFix) {\n      cssText = fixSafariColons(cssText);\n    }\n    if (needsSafariColonFix || needsAllFix) {\n      return cssText;\n    }\n  }\n  return importStringified || rule.cssText;\n}\nfunction fixSafariColons(cssStringified) {\n  const regex = /(\\[(?:[\\w-]+)[^\\\\])(:(?:[\\w-]+)\\])/gm;\n  return cssStringified.replace(regex, \"$1\\\\$2\");\n}\nfunction isCSSImportRule(rule) {\n  return \"styleSheet\" in rule;\n}\nfunction isCSSStyleRule(rule) {\n  return \"selectorText\" in rule;\n}\nclass Mirror {\n  constructor() {\n    __publicField(this, \"idNodeMap\", /* @__PURE__ */ new Map());\n    __publicField(this, \"nodeMetaMap\", /* @__PURE__ */ new WeakMap());\n  }\n  getId(n) {\n    if (!n) return -1;\n    const id = this.getMeta(n)?.id;\n    return id ?? -1;\n  }\n  getNode(id) {\n    return this.idNodeMap.get(id) || null;\n  }\n  getIds() {\n    return Array.from(this.idNodeMap.keys());\n  }\n  getMeta(n) {\n    return this.nodeMetaMap.get(n) || null;\n  }\n  // removes the node from idNodeMap\n  // doesn't remove the node from nodeMetaMap\n  removeNodeFromMap(n) {\n    const id = this.getId(n);\n    this.idNodeMap.delete(id);\n    if (n.childNodes) {\n      n.childNodes.forEach(\n        (childNode) => this.removeNodeFromMap(childNode)\n      );\n    }\n  }\n  has(id) {\n    return this.idNodeMap.has(id);\n  }\n  hasNode(node) {\n    return this.nodeMetaMap.has(node);\n  }\n  add(n, meta) {\n    const id = meta.id;\n    this.idNodeMap.set(id, n);\n    this.nodeMetaMap.set(n, meta);\n  }\n  replace(id, n) {\n    const oldNode = this.getNode(id);\n    if (oldNode) {\n      const meta = this.nodeMetaMap.get(oldNode);\n      if (meta) this.nodeMetaMap.set(n, meta);\n    }\n    this.idNodeMap.set(id, n);\n  }\n  reset() {\n    this.idNodeMap = /* @__PURE__ */ new Map();\n    this.nodeMetaMap = /* @__PURE__ */ new WeakMap();\n  }\n}\nfunction createMirror() {\n  return new Mirror();\n}\nfunction shouldMaskInput({\n  maskInputOptions,\n  tagName,\n  type\n}) {\n  if (tagName === \"OPTION\") {\n    tagName = \"SELECT\";\n  }\n  return Boolean(\n    maskInputOptions[tagName.toLowerCase()] || type && maskInputOptions[type] || type === \"password\" || // Default to \"text\" option for inputs without a \"type\" attribute defined\n    tagName === \"INPUT\" && !type && maskInputOptions[\"text\"]\n  );\n}\nfunction maskInputValue({\n  isMasked,\n  element,\n  value,\n  maskInputFn\n}) {\n  let text = value || \"\";\n  if (!isMasked) {\n    return text;\n  }\n  if (maskInputFn) {\n    text = maskInputFn(text, element);\n  }\n  return \"*\".repeat(text.length);\n}\nfunction toLowerCase(str) {\n  return str.toLowerCase();\n}\nfunction toUpperCase(str) {\n  return str.toUpperCase();\n}\nconst ORIGINAL_ATTRIBUTE_NAME = \"__rrweb_original__\";\nfunction is2DCanvasBlank(canvas) {\n  const ctx = canvas.getContext(\"2d\");\n  if (!ctx) return true;\n  const chunkSize = 50;\n  for (let x = 0; x < canvas.width; x += chunkSize) {\n    for (let y = 0; y < canvas.height; y += chunkSize) {\n      const getImageData = ctx.getImageData;\n      const originalGetImageData = ORIGINAL_ATTRIBUTE_NAME in getImageData ? getImageData[ORIGINAL_ATTRIBUTE_NAME] : getImageData;\n      const pixelBuffer = new Uint32Array(\n        // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access\n        originalGetImageData.call(\n          ctx,\n          x,\n          y,\n          Math.min(chunkSize, canvas.width - x),\n          Math.min(chunkSize, canvas.height - y)\n        ).data.buffer\n      );\n      if (pixelBuffer.some((pixel) => pixel !== 0)) return false;\n    }\n  }\n  return true;\n}\nfunction isNodeMetaEqual(a, b) {\n  if (!a || !b || a.type !== b.type) return false;\n  if (a.type === NodeType.Document)\n    return a.compatMode === b.compatMode;\n  else if (a.type === NodeType.DocumentType)\n    return a.name === b.name && a.publicId === b.publicId && a.systemId === b.systemId;\n  else if (a.type === NodeType.Comment || a.type === NodeType.Text || a.type === NodeType.CDATA)\n    return a.textContent === b.textContent;\n  else if (a.type === NodeType.Element)\n    return a.tagName === b.tagName && JSON.stringify(a.attributes) === JSON.stringify(b.attributes) && a.isSVG === b.isSVG && a.needBlock === b.needBlock;\n  return false;\n}\nfunction getInputType(element) {\n  const type = element.type;\n  return element.hasAttribute(\"data-rr-is-password\") ? \"password\" : type ? (\n    // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n    toLowerCase(type)\n  ) : null;\n}\nfunction getInputValue(el, tagName, type) {\n  if (tagName === \"INPUT\" && (type === \"radio\" || type === \"checkbox\")) {\n    return el.getAttribute(\"value\") || \"\";\n  }\n  return el.value;\n}\nfunction extractFileExtension(path, baseURL) {\n  let url;\n  try {\n    url = new URL(path, baseURL ?? window.location.href);\n  } catch (err) {\n    return null;\n  }\n  const regex = /\\.([0-9a-z]+)(?:$)/i;\n  const match = url.pathname.match(regex);\n  return match?.[1] ?? null;\n}\nconst cachedImplementations$1 = {};\nfunction getImplementation$1(name) {\n  const cached = cachedImplementations$1[name];\n  if (cached) {\n    return cached;\n  }\n  const document2 = window.document;\n  let impl = window[name];\n  if (document2 && typeof document2.createElement === \"function\") {\n    try {\n      const sandbox = document2.createElement(\"iframe\");\n      sandbox.hidden = true;\n      document2.head.appendChild(sandbox);\n      const contentWindow = sandbox.contentWindow;\n      if (contentWindow && contentWindow[name]) {\n        impl = // eslint-disable-next-line @typescript-eslint/unbound-method\n        contentWindow[name];\n      }\n      document2.head.removeChild(sandbox);\n    } catch (e) {\n    }\n  }\n  return cachedImplementations$1[name] = impl.bind(\n    window\n  );\n}\nfunction setTimeout$1(...rest) {\n  return getImplementation$1(\"setTimeout\")(...rest);\n}\nfunction clearTimeout$1(...rest) {\n  return getImplementation$1(\"clearTimeout\")(...rest);\n}\nfunction getIFrameContentDocument(iframe) {\n  try {\n    return iframe.contentDocument;\n  } catch {\n  }\n}\nfunction getIFrameContentWindow(iframe) {\n  try {\n    return iframe.contentWindow;\n  } catch {\n  }\n}\nlet _id = 1;\nconst tagNameRegex = new RegExp(\"[^a-z0-9-_:]\");\nconst IGNORED_NODE = -2;\nfunction genId() {\n  return _id++;\n}\nfunction getValidTagName(element) {\n  if (element instanceof HTMLFormElement) {\n    return \"form\";\n  }\n  const processedTagName = toLowerCase(element.tagName);\n  if (tagNameRegex.test(processedTagName)) {\n    return \"div\";\n  }\n  return processedTagName;\n}\nfunction extractOrigin(url) {\n  let origin = \"\";\n  if (url.indexOf(\"//\") > -1) {\n    origin = url.split(\"/\").slice(0, 3).join(\"/\");\n  } else {\n    origin = url.split(\"/\")[0];\n  }\n  origin = origin.split(\"?\")[0];\n  return origin;\n}\nlet canvasService;\nlet canvasCtx;\nconst URL_IN_CSS_REF = /url\\((?:(')([^']*)'|(\")(.*?)\"|([^)]*))\\)/gm;\nconst URL_PROTOCOL_MATCH = /^(?:[a-z+]+:)?\\/\\//i;\nconst URL_WWW_MATCH = /^www\\..*/i;\nconst DATA_URI = /^(data:)([^,]*),(.*)/i;\nfunction filterCSSPropertiesFromInlineStyle(cssText, ignoredProperties) {\n  if (!cssText || ignoredProperties.size === 0) {\n    return cssText;\n  }\n  try {\n    const properties = cssText.split(\";\");\n    const filteredProperties = [];\n    for (let property of properties) {\n      property = property.trim();\n      if (!property) continue;\n      const colonIndex = property.indexOf(\":\");\n      if (colonIndex === -1) {\n        filteredProperties.push(property);\n        continue;\n      }\n      const propertyName = property.slice(0, colonIndex).trim();\n      if (!ignoredProperties.has(propertyName)) {\n        filteredProperties.push(property);\n      }\n    }\n    return filteredProperties.join(\"; \") + (filteredProperties.length > 0 && cssText.endsWith(\";\") ? \";\" : \"\");\n  } catch (error) {\n    console.warn(\"Error filtering CSS properties:\", error);\n    return cssText;\n  }\n}\nfunction absoluteToStylesheet(cssText, href) {\n  return (cssText || \"\").replace(\n    URL_IN_CSS_REF,\n    (origin, quote1, path1, quote2, path2, path3) => {\n      const filePath = path1 || path2 || path3;\n      const maybeQuote = quote1 || quote2 || \"\";\n      if (!filePath) {\n        return origin;\n      }\n      if (URL_PROTOCOL_MATCH.test(filePath) || URL_WWW_MATCH.test(filePath)) {\n        return `url(${maybeQuote}${filePath}${maybeQuote})`;\n      }\n      if (DATA_URI.test(filePath)) {\n        return `url(${maybeQuote}${filePath}${maybeQuote})`;\n      }\n      if (filePath[0] === \"/\") {\n        return `url(${maybeQuote}${extractOrigin(href) + filePath}${maybeQuote})`;\n      }\n      const stack = href.split(\"/\");\n      const parts = filePath.split(\"/\");\n      stack.pop();\n      for (const part of parts) {\n        if (part === \".\") {\n          continue;\n        } else if (part === \"..\") {\n          stack.pop();\n        } else {\n          stack.push(part);\n        }\n      }\n      return `url(${maybeQuote}${stack.join(\"/\")}${maybeQuote})`;\n    }\n  );\n}\nconst SRCSET_NOT_SPACES = /^[^ \\t\\n\\r\\u000c]+/;\nconst SRCSET_COMMAS_OR_SPACES = /^[, \\t\\n\\r\\u000c]+/;\nfunction getAbsoluteSrcsetString(doc, attributeValue) {\n  if (attributeValue.trim() === \"\") {\n    return attributeValue;\n  }\n  let pos = 0;\n  function collectCharacters(regEx) {\n    let chars2;\n    const match = regEx.exec(attributeValue.substring(pos));\n    if (match) {\n      chars2 = match[0];\n      pos += chars2.length;\n      return chars2;\n    }\n    return \"\";\n  }\n  const output = [];\n  while (true) {\n    collectCharacters(SRCSET_COMMAS_OR_SPACES);\n    if (pos >= attributeValue.length) {\n      break;\n    }\n    let url = collectCharacters(SRCSET_NOT_SPACES);\n    if (url.slice(-1) === \",\") {\n      url = absoluteToDoc(doc, url.substring(0, url.length - 1));\n      output.push(url);\n    } else {\n      let descriptorsStr = \"\";\n      url = absoluteToDoc(doc, url);\n      let inParens = false;\n      while (true) {\n        const c = attributeValue.charAt(pos);\n        if (c === \"\") {\n          output.push((url + descriptorsStr).trim());\n          break;\n        } else if (!inParens) {\n          if (c === \",\") {\n            pos += 1;\n            output.push((url + descriptorsStr).trim());\n            break;\n          } else if (c === \"(\") {\n            inParens = true;\n          }\n        } else {\n          if (c === \")\") {\n            inParens = false;\n          }\n        }\n        descriptorsStr += c;\n        pos += 1;\n      }\n    }\n  }\n  return output.join(\", \");\n}\nconst cachedDocument = /* @__PURE__ */ new WeakMap();\nfunction absoluteToDoc(doc, attributeValue) {\n  if (!attributeValue || attributeValue.trim() === \"\") {\n    return attributeValue;\n  }\n  return getHref(doc, attributeValue);\n}\nfunction isSVGElement(el) {\n  return Boolean(el.tagName === \"svg\" || el.ownerSVGElement);\n}\nfunction getHref(doc, customHref) {\n  let a = cachedDocument.get(doc);\n  if (!a) {\n    a = doc.createElement(\"a\");\n    cachedDocument.set(doc, a);\n  }\n  if (!customHref) {\n    customHref = \"\";\n  } else if (customHref.startsWith(\"blob:\") || customHref.startsWith(\"data:\")) {\n    return customHref;\n  }\n  a.setAttribute(\"href\", customHref);\n  return a.href;\n}\nfunction transformAttribute(doc, tagName, name, value, element, maskAttributeFn, ignoreCSSAttributes) {\n  if (!value) {\n    return value;\n  }\n  if (name === \"src\" || name === \"href\" && !(tagName === \"use\" && value[0] === \"#\")) {\n    return absoluteToDoc(doc, value);\n  } else if (name === \"xlink:href\" && value[0] !== \"#\") {\n    return absoluteToDoc(doc, value);\n  } else if (name === \"background\" && (tagName === \"table\" || tagName === \"td\" || tagName === \"th\")) {\n    return absoluteToDoc(doc, value);\n  } else if (name === \"srcset\") {\n    return getAbsoluteSrcsetString(doc, value);\n  } else if (name === \"style\") {\n    let processedStyle = absoluteToStylesheet(value, getHref(doc));\n    if (ignoreCSSAttributes && ignoreCSSAttributes.size > 0) {\n      processedStyle = filterCSSPropertiesFromInlineStyle(\n        processedStyle,\n        ignoreCSSAttributes\n      );\n    }\n    return processedStyle;\n  } else if (tagName === \"object\" && name === \"data\") {\n    return absoluteToDoc(doc, value);\n  }\n  if (typeof maskAttributeFn === \"function\") {\n    return maskAttributeFn(name, value, element);\n  }\n  return value;\n}\nfunction ignoreAttribute(tagName, name, _value) {\n  return (tagName === \"video\" || tagName === \"audio\") && name === \"autoplay\";\n}\nfunction _isBlockedElement(element, blockClass, blockSelector, unblockSelector) {\n  try {\n    if (unblockSelector && element.matches(unblockSelector)) {\n      return false;\n    }\n    if (typeof blockClass === \"string\") {\n      if (element.classList.contains(blockClass)) {\n        return true;\n      }\n    } else {\n      for (let eIndex = element.classList.length; eIndex--; ) {\n        const className = element.classList[eIndex];\n        if (blockClass.test(className)) {\n          return true;\n        }\n      }\n    }\n    if (blockSelector) {\n      return element.matches(blockSelector);\n    }\n  } catch (e) {\n  }\n  return false;\n}\nfunction elementClassMatchesRegex(el, regex) {\n  for (let eIndex = el.classList.length; eIndex--; ) {\n    const className = el.classList[eIndex];\n    if (regex.test(className)) {\n      return true;\n    }\n  }\n  return false;\n}\nfunction distanceToMatch(node, matchPredicate, limit = Infinity, distance = 0) {\n  if (!node) return -1;\n  if (node.nodeType !== node.ELEMENT_NODE) return -1;\n  if (distance > limit) return -1;\n  if (matchPredicate(node)) return distance;\n  return distanceToMatch(node.parentNode, matchPredicate, limit, distance + 1);\n}\nfunction createMatchPredicate(className, selector) {\n  return (node) => {\n    const el = node;\n    if (el === null) return false;\n    try {\n      if (className) {\n        if (typeof className === \"string\") {\n          if (el.matches(`.${className}`)) return true;\n        } else if (elementClassMatchesRegex(el, className)) {\n          return true;\n        }\n      }\n      if (selector && el.matches(selector)) return true;\n      return false;\n    } catch {\n      return false;\n    }\n  };\n}\nfunction needMaskingText(node, maskTextClass, maskTextSelector, unmaskTextClass, unmaskTextSelector, maskAllText) {\n  try {\n    const el = node.nodeType === node.ELEMENT_NODE ? node : node.parentElement;\n    if (el === null) return false;\n    if (el.tagName === \"INPUT\") {\n      const autocomplete = el.getAttribute(\"autocomplete\");\n      const disallowedAutocompleteValues = [\n        \"current-password\",\n        \"new-password\",\n        \"cc-number\",\n        \"cc-exp\",\n        \"cc-exp-month\",\n        \"cc-exp-year\",\n        \"cc-csc\"\n      ];\n      if (disallowedAutocompleteValues.includes(autocomplete)) {\n        return true;\n      }\n    }\n    let maskDistance = -1;\n    let unmaskDistance = -1;\n    if (maskAllText) {\n      unmaskDistance = distanceToMatch(\n        el,\n        createMatchPredicate(unmaskTextClass, unmaskTextSelector)\n      );\n      if (unmaskDistance < 0) {\n        return true;\n      }\n      maskDistance = distanceToMatch(\n        el,\n        createMatchPredicate(maskTextClass, maskTextSelector),\n        unmaskDistance >= 0 ? unmaskDistance : Infinity\n      );\n    } else {\n      maskDistance = distanceToMatch(\n        el,\n        createMatchPredicate(maskTextClass, maskTextSelector)\n      );\n      if (maskDistance < 0) {\n        return false;\n      }\n      unmaskDistance = distanceToMatch(\n        el,\n        createMatchPredicate(unmaskTextClass, unmaskTextSelector),\n        maskDistance >= 0 ? maskDistance : Infinity\n      );\n    }\n    return maskDistance >= 0 ? unmaskDistance >= 0 ? maskDistance <= unmaskDistance : true : unmaskDistance >= 0 ? false : !!maskAllText;\n  } catch (e) {\n  }\n  return !!maskAllText;\n}\nfunction onceIframeLoaded(iframeEl, listener, iframeLoadTimeout) {\n  const win = getIFrameContentWindow(iframeEl);\n  if (!win) {\n    return;\n  }\n  let fired = false;\n  let readyState;\n  try {\n    readyState = win.document.readyState;\n  } catch (error) {\n    return;\n  }\n  if (readyState !== \"complete\") {\n    const timer = setTimeout$1(() => {\n      if (!fired) {\n        listener();\n        fired = true;\n      }\n    }, iframeLoadTimeout);\n    iframeEl.addEventListener(\"load\", () => {\n      clearTimeout$1(timer);\n      fired = true;\n      listener();\n    });\n    return;\n  }\n  const blankUrl = \"about:blank\";\n  if (win.location.href !== blankUrl || iframeEl.src === blankUrl || iframeEl.src === \"\") {\n    setTimeout$1(listener, 0);\n    return iframeEl.addEventListener(\"load\", listener);\n  }\n  iframeEl.addEventListener(\"load\", listener);\n}\nfunction onceStylesheetLoaded(link, listener, styleSheetLoadTimeout) {\n  let fired = false;\n  let styleSheetLoaded;\n  try {\n    styleSheetLoaded = link.sheet;\n  } catch (error) {\n    styleSheetLoaded = null;\n  }\n  if (styleSheetLoaded) return;\n  const timer = setTimeout$1(() => {\n    if (!fired) {\n      listener();\n      fired = true;\n    }\n  }, styleSheetLoadTimeout);\n  link.addEventListener(\"load\", () => {\n    clearTimeout$1(timer);\n    fired = true;\n    listener();\n  });\n}\nfunction serializeNode(n, options) {\n  const {\n    doc,\n    mirror,\n    blockClass,\n    blockSelector,\n    unblockSelector,\n    maskAllText,\n    maskAttributeFn,\n    maskTextClass,\n    unmaskTextClass,\n    maskTextSelector,\n    unmaskTextSelector,\n    inlineStylesheet,\n    maskInputOptions = {},\n    maskTextFn,\n    maskInputFn,\n    dataURLOptions = {},\n    inlineImages,\n    recordCanvas,\n    keepIframeSrcFn,\n    newlyAddedElement = false,\n    ignoreCSSAttributes\n  } = options;\n  const rootId = getRootId(doc, mirror);\n  switch (n.nodeType) {\n    case n.DOCUMENT_NODE:\n      if (n.compatMode !== \"CSS1Compat\") {\n        return {\n          type: NodeType.Document,\n          childNodes: [],\n          compatMode: n.compatMode\n          // probably \"BackCompat\"\n        };\n      } else {\n        return {\n          type: NodeType.Document,\n          childNodes: []\n        };\n      }\n    case n.DOCUMENT_TYPE_NODE:\n      return {\n        type: NodeType.DocumentType,\n        name: n.name,\n        publicId: n.publicId,\n        systemId: n.systemId,\n        rootId\n      };\n    case n.ELEMENT_NODE:\n      return serializeElementNode(n, {\n        doc,\n        blockClass,\n        blockSelector,\n        unblockSelector,\n        inlineStylesheet,\n        maskAttributeFn,\n        maskInputOptions,\n        maskInputFn,\n        dataURLOptions,\n        inlineImages,\n        recordCanvas,\n        keepIframeSrcFn,\n        newlyAddedElement,\n        rootId,\n        maskTextClass,\n        unmaskTextClass,\n        maskTextSelector,\n        unmaskTextSelector,\n        ignoreCSSAttributes\n      });\n    case n.TEXT_NODE:\n      return serializeTextNode(n, {\n        doc,\n        maskAllText,\n        maskTextClass,\n        unmaskTextClass,\n        maskTextSelector,\n        unmaskTextSelector,\n        maskTextFn,\n        maskInputOptions,\n        maskInputFn,\n        rootId\n      });\n    case n.CDATA_SECTION_NODE:\n      return {\n        type: NodeType.CDATA,\n        textContent: \"\",\n        rootId\n      };\n    case n.COMMENT_NODE:\n      return {\n        type: NodeType.Comment,\n        textContent: n.textContent || \"\",\n        rootId\n      };\n    default:\n      return false;\n  }\n}\nfunction getRootId(doc, mirror) {\n  if (!mirror.hasNode(doc)) return void 0;\n  const docId = mirror.getId(doc);\n  return docId === 1 ? void 0 : docId;\n}\nfunction serializeTextNode(n, options) {\n  const {\n    maskAllText,\n    maskTextClass,\n    unmaskTextClass,\n    maskTextSelector,\n    unmaskTextSelector,\n    maskTextFn,\n    maskInputOptions,\n    maskInputFn,\n    rootId\n  } = options;\n  const parentTagName = n.parentNode && n.parentNode.tagName;\n  let textContent = n.textContent;\n  const isStyle = parentTagName === \"STYLE\" ? true : void 0;\n  const isScript = parentTagName === \"SCRIPT\" ? true : void 0;\n  const isTextarea = parentTagName === \"TEXTAREA\" ? true : void 0;\n  if (isStyle && textContent) {\n    try {\n      if (n.nextSibling || n.previousSibling) {\n      } else if (n.parentNode.sheet?.cssRules) {\n        textContent = stringifyStylesheet(\n          n.parentNode.sheet\n        );\n      }\n    } catch (err) {\n      console.warn(\n        `Cannot get CSS styles from text's parentNode. Error: ${err}`,\n        n\n      );\n    }\n    textContent = absoluteToStylesheet(textContent, getHref(options.doc));\n  }\n  if (isScript) {\n    textContent = \"SCRIPT_PLACEHOLDER\";\n  }\n  const forceMask = needMaskingText(\n    n,\n    maskTextClass,\n    maskTextSelector,\n    unmaskTextClass,\n    unmaskTextSelector,\n    maskAllText\n  );\n  if (!isStyle && !isScript && !isTextarea && textContent && forceMask) {\n    textContent = maskTextFn ? maskTextFn(textContent, n.parentElement) : textContent.replace(/[\\S]/g, \"*\");\n  }\n  if (isTextarea && textContent && (maskInputOptions.textarea || forceMask)) {\n    textContent = maskInputFn ? maskInputFn(textContent, n.parentNode) : textContent.replace(/[\\S]/g, \"*\");\n  }\n  if (parentTagName === \"OPTION\" && textContent) {\n    const isInputMasked = shouldMaskInput({\n      type: null,\n      tagName: parentTagName,\n      maskInputOptions\n    });\n    textContent = maskInputValue({\n      isMasked: needMaskingText(\n        n,\n        maskTextClass,\n        maskTextSelector,\n        unmaskTextClass,\n        unmaskTextSelector,\n        isInputMasked\n      ),\n      element: n,\n      value: textContent,\n      maskInputFn\n    });\n  }\n  return {\n    type: NodeType.Text,\n    textContent: textContent || \"\",\n    isStyle,\n    rootId\n  };\n}\nfunction serializeElementNode(n, options) {\n  const {\n    doc,\n    blockClass,\n    blockSelector,\n    unblockSelector,\n    inlineStylesheet,\n    maskInputOptions = {},\n    maskAttributeFn,\n    maskInputFn,\n    dataURLOptions = {},\n    inlineImages,\n    recordCanvas,\n    keepIframeSrcFn,\n    newlyAddedElement = false,\n    rootId,\n    maskTextClass,\n    unmaskTextClass,\n    maskTextSelector,\n    unmaskTextSelector,\n    ignoreCSSAttributes\n  } = options;\n  const needBlock = _isBlockedElement(\n    n,\n    blockClass,\n    blockSelector,\n    unblockSelector\n  );\n  const tagName = getValidTagName(n);\n  let attributes2 = {};\n  const len = n.attributes.length;\n  for (let i = 0; i < len; i++) {\n    const attr = n.attributes[i];\n    if (attr.name && !ignoreAttribute(tagName, attr.name, attr.value)) {\n      attributes2[attr.name] = transformAttribute(\n        doc,\n        tagName,\n        toLowerCase(attr.name),\n        attr.value,\n        n,\n        maskAttributeFn,\n        ignoreCSSAttributes\n      );\n    }\n  }\n  if (tagName === \"link\" && inlineStylesheet) {\n    const stylesheet = Array.from(doc.styleSheets).find((s) => {\n      return s.href === n.href;\n    });\n    let cssText = null;\n    if (stylesheet) {\n      cssText = stringifyStylesheet(stylesheet);\n    }\n    if (cssText) {\n      attributes2.rel = null;\n      attributes2.href = null;\n      attributes2.crossorigin = null;\n      attributes2._cssText = absoluteToStylesheet(cssText, stylesheet.href);\n    }\n  }\n  if (tagName === \"style\" && n.sheet && // TODO: Currently we only try to get dynamic stylesheet when it is an empty style element\n  !(n.innerText || n.textContent || \"\").trim().length) {\n    const cssText = stringifyStylesheet(\n      n.sheet\n    );\n    if (cssText) {\n      attributes2._cssText = absoluteToStylesheet(cssText, getHref(doc));\n    }\n  }\n  if (tagName === \"input\" || tagName === \"textarea\" || tagName === \"select\" || tagName === \"option\") {\n    const el = n;\n    const type = getInputType(el);\n    const value = getInputValue(el, toUpperCase(tagName), type);\n    const checked = el.checked;\n    if (type !== \"submit\" && type !== \"button\" && value) {\n      const forceMask = needMaskingText(\n        el,\n        maskTextClass,\n        maskTextSelector,\n        unmaskTextClass,\n        unmaskTextSelector,\n        shouldMaskInput({\n          type,\n          tagName: toUpperCase(tagName),\n          maskInputOptions\n        })\n      );\n      attributes2.value = maskInputValue({\n        isMasked: forceMask,\n        element: el,\n        value,\n        maskInputFn\n      });\n    }\n    if (checked) {\n      attributes2.checked = checked;\n    }\n  }\n  if (tagName === \"option\") {\n    if (n.selected && !maskInputOptions[\"select\"]) {\n      attributes2.selected = true;\n    } else {\n      delete attributes2.selected;\n    }\n  }\n  if (tagName === \"canvas\" && recordCanvas) {\n    if (n.__context === \"2d\") {\n      if (!is2DCanvasBlank(n)) {\n        attributes2.rr_dataURL = n.toDataURL(\n          dataURLOptions.type,\n          dataURLOptions.quality\n        );\n      }\n    } else if (!(\"__context\" in n)) {\n      const canvasDataURL = n.toDataURL(\n        dataURLOptions.type,\n        dataURLOptions.quality\n      );\n      const blankCanvas = doc.createElement(\"canvas\");\n      blankCanvas.width = n.width;\n      blankCanvas.height = n.height;\n      const blankCanvasDataURL = blankCanvas.toDataURL(\n        dataURLOptions.type,\n        dataURLOptions.quality\n      );\n      if (canvasDataURL !== blankCanvasDataURL) {\n        attributes2.rr_dataURL = canvasDataURL;\n      }\n    }\n  }\n  if (tagName === \"img\" && inlineImages) {\n    if (!canvasService) {\n      canvasService = doc.createElement(\"canvas\");\n      canvasCtx = canvasService.getContext(\"2d\");\n    }\n    const image = n;\n    const imageSrc = image.currentSrc || image.getAttribute(\"src\") || \"<unknown-src>\";\n    const priorCrossOrigin = image.crossOrigin;\n    const recordInlineImage = () => {\n      image.removeEventListener(\"load\", recordInlineImage);\n      try {\n        canvasService.width = image.naturalWidth;\n        canvasService.height = image.naturalHeight;\n        canvasCtx.drawImage(image, 0, 0);\n        attributes2.rr_dataURL = canvasService.toDataURL(\n          dataURLOptions.type,\n          dataURLOptions.quality\n        );\n      } catch (err) {\n        if (image.crossOrigin !== \"anonymous\") {\n          image.crossOrigin = \"anonymous\";\n          if (image.complete && image.naturalWidth !== 0)\n            recordInlineImage();\n          else image.addEventListener(\"load\", recordInlineImage);\n          return;\n        } else {\n          console.warn(\n            `Cannot inline img src=${imageSrc}! Error: ${err}`\n          );\n        }\n      }\n      if (image.crossOrigin === \"anonymous\") {\n        priorCrossOrigin ? attributes2.crossOrigin = priorCrossOrigin : image.removeAttribute(\"crossorigin\");\n      }\n    };\n    if (image.complete && image.naturalWidth !== 0) recordInlineImage();\n    else image.addEventListener(\"load\", recordInlineImage);\n  }\n  if (tagName === \"audio\" || tagName === \"video\") {\n    attributes2.rr_mediaState = n.paused ? \"paused\" : \"played\";\n    attributes2.rr_mediaCurrentTime = n.currentTime;\n  }\n  if (!newlyAddedElement) {\n    if (n.scrollLeft) {\n      attributes2.rr_scrollLeft = n.scrollLeft;\n    }\n    if (n.scrollTop) {\n      attributes2.rr_scrollTop = n.scrollTop;\n    }\n  }\n  if (needBlock) {\n    const { width, height } = n.getBoundingClientRect();\n    attributes2 = {\n      class: attributes2.class,\n      rr_width: `${width}px`,\n      rr_height: `${height}px`\n    };\n  }\n  if (tagName === \"iframe\" && !keepIframeSrcFn(attributes2.src)) {\n    if (!needBlock && !getIFrameContentDocument(n)) {\n      attributes2.rr_src = attributes2.src;\n    }\n    delete attributes2.src;\n  }\n  let isCustomElement;\n  try {\n    if (customElements.get(tagName)) isCustomElement = true;\n  } catch (e) {\n  }\n  return {\n    type: NodeType.Element,\n    tagName,\n    attributes: attributes2,\n    childNodes: [],\n    isSVG: isSVGElement(n) || void 0,\n    needBlock,\n    rootId,\n    isCustom: isCustomElement\n  };\n}\nfunction lowerIfExists(maybeAttr) {\n  if (maybeAttr === void 0 || maybeAttr === null) {\n    return \"\";\n  } else {\n    return maybeAttr.toLowerCase();\n  }\n}\nfunction slimDOMExcluded(sn, slimDOMOptions) {\n  if (slimDOMOptions.comment && sn.type === NodeType.Comment) {\n    return true;\n  } else if (sn.type === NodeType.Element) {\n    if (slimDOMOptions.script && // script tag\n    (sn.tagName === \"script\" || // (module)preload link\n    sn.tagName === \"link\" && (sn.attributes.rel === \"preload\" || sn.attributes.rel === \"modulepreload\") || // prefetch link\n    sn.tagName === \"link\" && sn.attributes.rel === \"prefetch\" && typeof sn.attributes.href === \"string\" && extractFileExtension(sn.attributes.href) === \"js\")) {\n      return true;\n    } else if (slimDOMOptions.headFavicon && (sn.tagName === \"link\" && sn.attributes.rel === \"shortcut icon\" || sn.tagName === \"meta\" && (lowerIfExists(sn.attributes.name).match(\n      /^msapplication-tile(image|color)$/\n    ) || lowerIfExists(sn.attributes.name) === \"application-name\" || lowerIfExists(sn.attributes.rel) === \"icon\" || lowerIfExists(sn.attributes.rel) === \"apple-touch-icon\" || lowerIfExists(sn.attributes.rel) === \"shortcut icon\"))) {\n      return true;\n    } else if (sn.tagName === \"meta\") {\n      if (slimDOMOptions.headMetaDescKeywords && lowerIfExists(sn.attributes.name).match(/^description|keywords$/)) {\n        return true;\n      } else if (slimDOMOptions.headMetaSocial && (lowerIfExists(sn.attributes.property).match(/^(og|twitter|fb):/) || // og = opengraph (facebook)\n      lowerIfExists(sn.attributes.name).match(/^(og|twitter):/) || lowerIfExists(sn.attributes.name) === \"pinterest\")) {\n        return true;\n      } else if (slimDOMOptions.headMetaRobots && (lowerIfExists(sn.attributes.name) === \"robots\" || lowerIfExists(sn.attributes.name) === \"googlebot\" || lowerIfExists(sn.attributes.name) === \"bingbot\")) {\n        return true;\n      } else if (slimDOMOptions.headMetaHttpEquiv && sn.attributes[\"http-equiv\"] !== void 0) {\n        return true;\n      } else if (slimDOMOptions.headMetaAuthorship && (lowerIfExists(sn.attributes.name) === \"author\" || lowerIfExists(sn.attributes.name) === \"generator\" || lowerIfExists(sn.attributes.name) === \"framework\" || lowerIfExists(sn.attributes.name) === \"publisher\" || lowerIfExists(sn.attributes.name) === \"progid\" || lowerIfExists(sn.attributes.property).match(/^article:/) || lowerIfExists(sn.attributes.property).match(/^product:/))) {\n        return true;\n      } else if (slimDOMOptions.headMetaVerification && (lowerIfExists(sn.attributes.name) === \"google-site-verification\" || lowerIfExists(sn.attributes.name) === \"yandex-verification\" || lowerIfExists(sn.attributes.name) === \"csrf-token\" || lowerIfExists(sn.attributes.name) === \"p:domain_verify\" || lowerIfExists(sn.attributes.name) === \"verify-v1\" || lowerIfExists(sn.attributes.name) === \"verification\" || lowerIfExists(sn.attributes.name) === \"shopify-checkout-api-token\")) {\n        return true;\n      }\n    }\n  }\n  return false;\n}\nfunction serializeNodeWithId(n, options) {\n  const {\n    doc,\n    mirror,\n    blockClass,\n    blockSelector,\n    unblockSelector,\n    maskAllText,\n    maskTextClass,\n    unmaskTextClass,\n    maskTextSelector,\n    unmaskTextSelector,\n    skipChild = false,\n    inlineStylesheet = true,\n    maskInputOptions = {},\n    maskAttributeFn,\n    maskTextFn,\n    maskInputFn,\n    slimDOMOptions,\n    dataURLOptions = {},\n    inlineImages = false,\n    recordCanvas = false,\n    onSerialize,\n    onIframeLoad,\n    iframeLoadTimeout = 5e3,\n    onBlockedImageLoad,\n    onStylesheetLoad,\n    stylesheetLoadTimeout = 5e3,\n    keepIframeSrcFn = () => false,\n    newlyAddedElement = false,\n    ignoreCSSAttributes\n  } = options;\n  let { preserveWhiteSpace = true } = options;\n  const _serializedNode = serializeNode(n, {\n    doc,\n    mirror,\n    blockClass,\n    blockSelector,\n    maskAllText,\n    unblockSelector,\n    maskTextClass,\n    unmaskTextClass,\n    maskTextSelector,\n    unmaskTextSelector,\n    inlineStylesheet,\n    maskInputOptions,\n    maskAttributeFn,\n    maskTextFn,\n    maskInputFn,\n    dataURLOptions,\n    inlineImages,\n    recordCanvas,\n    keepIframeSrcFn,\n    newlyAddedElement,\n    ignoreCSSAttributes\n  });\n  if (!_serializedNode) {\n    console.warn(n, \"not serialized\");\n    return null;\n  }\n  let id;\n  if (mirror.hasNode(n)) {\n    id = mirror.getId(n);\n  } else if (slimDOMExcluded(_serializedNode, slimDOMOptions) || !preserveWhiteSpace && _serializedNode.type === NodeType.Text && !_serializedNode.isStyle && !_serializedNode.textContent.trim().length) {\n    id = IGNORED_NODE;\n  } else {\n    id = genId();\n  }\n  const serializedNode2 = Object.assign(_serializedNode, { id });\n  mirror.add(n, serializedNode2);\n  if (id === IGNORED_NODE) {\n    return null;\n  }\n  if (onSerialize) {\n    onSerialize(n);\n  }\n  let recordChild = !skipChild;\n  if (serializedNode2.type === NodeType.Element) {\n    recordChild = recordChild && !serializedNode2.needBlock;\n    const shadowRoot = n.shadowRoot;\n    if (shadowRoot && isNativeShadowDom(shadowRoot))\n      serializedNode2.isShadowHost = true;\n  }\n  if ((serializedNode2.type === NodeType.Document || serializedNode2.type === NodeType.Element) && recordChild) {\n    if (slimDOMOptions.headWhitespace && serializedNode2.type === NodeType.Element && serializedNode2.tagName === \"head\") {\n      preserveWhiteSpace = false;\n    }\n    const bypassOptions = {\n      doc,\n      mirror,\n      blockClass,\n      blockSelector,\n      maskAllText,\n      unblockSelector,\n      maskTextClass,\n      unmaskTextClass,\n      maskTextSelector,\n      unmaskTextSelector,\n      skipChild,\n      inlineStylesheet,\n      maskInputOptions,\n      maskAttributeFn,\n      maskTextFn,\n      maskInputFn,\n      slimDOMOptions,\n      dataURLOptions,\n      inlineImages,\n      recordCanvas,\n      preserveWhiteSpace,\n      onSerialize,\n      onIframeLoad,\n      iframeLoadTimeout,\n      onBlockedImageLoad,\n      onStylesheetLoad,\n      stylesheetLoadTimeout,\n      keepIframeSrcFn,\n      ignoreCSSAttributes\n    };\n    const childNodes = n.childNodes ? Array.from(n.childNodes) : [];\n    for (const childN of childNodes) {\n      const serializedChildNode = serializeNodeWithId(childN, bypassOptions);\n      if (serializedChildNode) {\n        serializedNode2.childNodes.push(serializedChildNode);\n      }\n    }\n    if (isElement(n) && n.shadowRoot) {\n      for (const childN of Array.from(n.shadowRoot.childNodes)) {\n        const serializedChildNode = serializeNodeWithId(childN, bypassOptions);\n        if (serializedChildNode) {\n          isNativeShadowDom(n.shadowRoot) && (serializedChildNode.isShadow = true);\n          serializedNode2.childNodes.push(serializedChildNode);\n        }\n      }\n    }\n  }\n  if (n.parentNode && isShadowRoot(n.parentNode) && isNativeShadowDom(n.parentNode)) {\n    serializedNode2.isShadow = true;\n  }\n  if (serializedNode2.type === NodeType.Element && serializedNode2.tagName === \"iframe\" && !serializedNode2.needBlock) {\n    onceIframeLoaded(\n      n,\n      () => {\n        const iframeDoc = getIFrameContentDocument(n);\n        if (iframeDoc && onIframeLoad) {\n          const serializedIframeNode = serializeNodeWithId(iframeDoc, {\n            doc: iframeDoc,\n            mirror,\n            blockClass,\n            blockSelector,\n            unblockSelector,\n            maskAllText,\n            maskTextClass,\n            unmaskTextClass,\n            maskTextSelector,\n            unmaskTextSelector,\n            skipChild: false,\n            inlineStylesheet,\n            maskInputOptions,\n            maskAttributeFn,\n            maskTextFn,\n            maskInputFn,\n            slimDOMOptions,\n            dataURLOptions,\n            inlineImages,\n            recordCanvas,\n            preserveWhiteSpace,\n            onSerialize,\n            onIframeLoad,\n            iframeLoadTimeout,\n            onStylesheetLoad,\n            stylesheetLoadTimeout,\n            keepIframeSrcFn,\n            ignoreCSSAttributes\n          });\n          if (serializedIframeNode) {\n            onIframeLoad(\n              n,\n              serializedIframeNode\n            );\n          }\n        }\n      },\n      iframeLoadTimeout\n    );\n  }\n  if (serializedNode2.type === NodeType.Element && serializedNode2.tagName === \"img\" && !n.complete && serializedNode2.needBlock) {\n    const image = n;\n    const updateImageDimensions = () => {\n      if (image.isConnected && !image.complete && onBlockedImageLoad) {\n        try {\n          const rect = image.getBoundingClientRect();\n          if (rect.width > 0 && rect.height > 0) {\n            onBlockedImageLoad(image, serializedNode2, rect);\n          }\n        } catch (error) {\n        }\n      }\n      image.removeEventListener(\"load\", updateImageDimensions);\n    };\n    if (image.isConnected) {\n      image.addEventListener(\"load\", updateImageDimensions);\n    }\n  }\n  if (serializedNode2.type === NodeType.Element && serializedNode2.tagName === \"link\" && typeof serializedNode2.attributes.rel === \"string\" && (serializedNode2.attributes.rel === \"stylesheet\" || serializedNode2.attributes.rel === \"preload\" && typeof serializedNode2.attributes.href === \"string\" && extractFileExtension(serializedNode2.attributes.href) === \"css\")) {\n    onceStylesheetLoaded(\n      n,\n      () => {\n        if (onStylesheetLoad) {\n          const serializedLinkNode = serializeNodeWithId(n, {\n            doc,\n            mirror,\n            blockClass,\n            blockSelector,\n            unblockSelector,\n            maskAllText,\n            maskTextClass,\n            unmaskTextClass,\n            maskTextSelector,\n            unmaskTextSelector,\n            skipChild: false,\n            inlineStylesheet,\n            maskInputOptions,\n            maskAttributeFn,\n            maskTextFn,\n            maskInputFn,\n            slimDOMOptions,\n            dataURLOptions,\n            inlineImages,\n            recordCanvas,\n            preserveWhiteSpace,\n            onSerialize,\n            onIframeLoad,\n            iframeLoadTimeout,\n            onStylesheetLoad,\n            stylesheetLoadTimeout,\n            keepIframeSrcFn,\n            ignoreCSSAttributes\n          });\n          if (serializedLinkNode) {\n            onStylesheetLoad(\n              n,\n              serializedLinkNode\n            );\n          }\n        }\n      },\n      stylesheetLoadTimeout\n    );\n  }\n  if (serializedNode2.type === NodeType.Element) {\n    delete serializedNode2.needBlock;\n  }\n  return serializedNode2;\n}\nfunction snapshot(n, options) {\n  const {\n    mirror = new Mirror(),\n    blockClass = \"rr-block\",\n    blockSelector = null,\n    unblockSelector = null,\n    maskAllText = false,\n    maskTextClass = \"rr-mask\",\n    unmaskTextClass = null,\n    maskTextSelector = null,\n    unmaskTextSelector = null,\n    inlineStylesheet = true,\n    inlineImages = false,\n    recordCanvas = false,\n    maskAllInputs = false,\n    maskAttributeFn,\n    maskTextFn,\n    maskInputFn,\n    slimDOM = false,\n    dataURLOptions,\n    preserveWhiteSpace,\n    onSerialize,\n    onIframeLoad,\n    iframeLoadTimeout,\n    onBlockedImageLoad,\n    onStylesheetLoad,\n    stylesheetLoadTimeout,\n    keepIframeSrcFn = () => false,\n    ignoreCSSAttributes = /* @__PURE__ */ new Set([])\n  } = options || {};\n  const maskInputOptions = maskAllInputs === true ? {\n    color: true,\n    date: true,\n    \"datetime-local\": true,\n    email: true,\n    month: true,\n    number: true,\n    range: true,\n    search: true,\n    tel: true,\n    text: true,\n    time: true,\n    url: true,\n    week: true,\n    textarea: true,\n    select: true\n  } : maskAllInputs === false ? {} : maskAllInputs;\n  const slimDOMOptions = slimDOM === true || slimDOM === \"all\" ? (\n    // if true: set of sensible options that should not throw away any information\n    {\n      script: true,\n      comment: true,\n      headFavicon: true,\n      headWhitespace: true,\n      headMetaDescKeywords: slimDOM === \"all\",\n      // destructive\n      headMetaSocial: true,\n      headMetaRobots: true,\n      headMetaHttpEquiv: true,\n      headMetaAuthorship: true,\n      headMetaVerification: true\n    }\n  ) : slimDOM === false ? {} : slimDOM;\n  return serializeNodeWithId(n, {\n    doc: n,\n    mirror,\n    blockClass,\n    blockSelector,\n    unblockSelector,\n    maskAllText,\n    maskTextClass,\n    unmaskTextClass,\n    maskTextSelector,\n    unmaskTextSelector,\n    skipChild: false,\n    inlineStylesheet,\n    maskInputOptions,\n    maskAttributeFn,\n    maskTextFn,\n    maskInputFn,\n    slimDOMOptions,\n    dataURLOptions,\n    inlineImages,\n    recordCanvas,\n    preserveWhiteSpace,\n    onSerialize,\n    onIframeLoad,\n    iframeLoadTimeout,\n    onBlockedImageLoad,\n    onStylesheetLoad,\n    stylesheetLoadTimeout,\n    keepIframeSrcFn,\n    newlyAddedElement: false,\n    ignoreCSSAttributes\n  });\n}\nconst commentre = /\\/\\*[^*]*\\*+([^/*][^*]*\\*+)*\\//g;\nfunction parse(css, options = {}) {\n  let lineno = 1;\n  let column = 1;\n  function updatePosition(str) {\n    const lines = str.match(/\\n/g);\n    if (lines) {\n      lineno += lines.length;\n    }\n    const i = str.lastIndexOf(\"\\n\");\n    column = i === -1 ? column + str.length : str.length - i;\n  }\n  function position() {\n    const start = { line: lineno, column };\n    return (node) => {\n      node.position = new Position(start);\n      whitespace();\n      return node;\n    };\n  }\n  const _Position = class _Position2 {\n    constructor(start) {\n      __publicField(this, \"content\");\n      __publicField(this, \"start\");\n      __publicField(this, \"end\");\n      __publicField(this, \"source\");\n      this.start = start;\n      this.end = { line: lineno, column };\n      this.source = options.source;\n      this.content = _Position2.content;\n    }\n  };\n  __publicField(_Position, \"content\");\n  let Position = _Position;\n  Position.content = css;\n  const errorsList = [];\n  function error(msg) {\n    const err = new Error(\n      `${options.source || \"\"}:${lineno}:${column}: ${msg}`\n    );\n    err.reason = msg;\n    err.filename = options.source;\n    err.line = lineno;\n    err.column = column;\n    err.source = css;\n    if (options.silent) {\n      errorsList.push(err);\n    } else {\n      throw err;\n    }\n  }\n  function stylesheet() {\n    const rulesList = rules();\n    return {\n      type: \"stylesheet\",\n      stylesheet: {\n        source: options.source,\n        rules: rulesList,\n        parsingErrors: errorsList\n      }\n    };\n  }\n  function open() {\n    return match(/^{\\s*/);\n  }\n  function close() {\n    return match(/^}/);\n  }\n  function rules() {\n    let node;\n    const rules2 = [];\n    whitespace();\n    comments(rules2);\n    while (css.length && css.charAt(0) !== \"}\" && (node = atrule() || rule())) {\n      if (node) {\n        rules2.push(node);\n        comments(rules2);\n      }\n    }\n    return rules2;\n  }\n  function match(re) {\n    const m = re.exec(css);\n    if (!m) {\n      return;\n    }\n    const str = m[0];\n    updatePosition(str);\n    css = css.slice(str.length);\n    return m;\n  }\n  function whitespace() {\n    match(/^\\s*/);\n  }\n  function comments(rules2 = []) {\n    let c;\n    while (c = comment()) {\n      if (c) {\n        rules2.push(c);\n      }\n      c = comment();\n    }\n    return rules2;\n  }\n  function comment() {\n    const pos = position();\n    if (\"/\" !== css.charAt(0) || \"*\" !== css.charAt(1)) {\n      return;\n    }\n    let i = 2;\n    while (\"\" !== css.charAt(i) && (\"*\" !== css.charAt(i) || \"/\" !== css.charAt(i + 1))) {\n      ++i;\n    }\n    i += 2;\n    if (\"\" === css.charAt(i - 1)) {\n      return error(\"End of comment missing\");\n    }\n    const str = css.slice(2, i - 2);\n    column += 2;\n    updatePosition(str);\n    css = css.slice(i);\n    column += 2;\n    return pos({\n      type: \"comment\",\n      comment: str\n    });\n  }\n  function selector() {\n    const m = match(/^([^{]+)/);\n    if (!m) {\n      return;\n    }\n    const splitSelectors = trim(m[0]).replace(/\\/\\*[\\s\\S]*?\\*\\/+/g, \"\").replace(/\"(?:\\\\\"|[^\"])*\"|'(?:\\\\'|[^'])*'/g, (m2) => {\n      return m2.replace(/,/g, \"‌\");\n    }).split(/\\s*(?![^(]*\\)),\\s*/);\n    if (splitSelectors.length <= 1) {\n      return splitSelectors.map((s) => {\n        return s.replace(/\\u200C/g, \",\");\n      });\n    }\n    let i = 0;\n    let j = 0;\n    const len = splitSelectors.length;\n    const finalSelectors = [];\n    while (i < len) {\n      const openingParensCount = (splitSelectors[i].match(/\\(/g) || []).length;\n      const closingParensCount = (splitSelectors[i].match(/\\)/g) || []).length;\n      let unbalancedParens = openingParensCount - closingParensCount;\n      if (unbalancedParens >= 1) {\n        let foundClosingSelector = false;\n        j = i + 1;\n        while (j < len) {\n          const nextOpeningParensCount = (splitSelectors[j].match(/\\(/g) || []).length;\n          const nextClosingParensCount = (splitSelectors[j].match(/\\)/g) || []).length;\n          const nextUnbalancedParens = nextClosingParensCount - nextOpeningParensCount;\n          if (nextUnbalancedParens === unbalancedParens) {\n            finalSelectors.push(splitSelectors.slice(i, j + 1).join(\",\"));\n            i = j + 1;\n            foundClosingSelector = true;\n            break;\n          }\n          j++;\n          unbalancedParens -= nextUnbalancedParens;\n        }\n        if (foundClosingSelector) {\n          continue;\n        }\n        splitSelectors.slice(i, len).forEach((selector2) => selector2 && finalSelectors.push(selector2));\n        break;\n      }\n      splitSelectors[i] && finalSelectors.push(splitSelectors[i]);\n      i++;\n    }\n    return finalSelectors.map((s) => {\n      return s.replace(/\\u200C/g, \",\");\n    });\n  }\n  function declaration() {\n    const pos = position();\n    const propMatch = match(/^(\\*?[-#\\/\\*\\\\\\w]+(\\[[0-9a-z_-]+\\])?)\\s*/);\n    if (!propMatch) {\n      return;\n    }\n    const prop = trim(propMatch[0]);\n    if (!match(/^:\\s*/)) {\n      return error(`property missing ':'`);\n    }\n    const val = match(/^((?:'(?:\\\\'|.)*?'|\"(?:\\\\\"|.)*?\"|\\([^\\)]*?\\)|[^};])+)/);\n    const ret = pos({\n      type: \"declaration\",\n      property: prop.replace(commentre, \"\"),\n      value: val ? trim(val[0]).replace(commentre, \"\") : \"\"\n    });\n    match(/^[;\\s]*/);\n    return ret;\n  }\n  function declarations() {\n    const decls = [];\n    if (!open()) {\n      return error(`missing '{'`);\n    }\n    comments(decls);\n    let decl;\n    while (decl = declaration()) {\n      if (decl !== false) {\n        decls.push(decl);\n        comments(decls);\n      }\n      decl = declaration();\n    }\n    if (!close()) {\n      return error(`missing '}'`);\n    }\n    return decls;\n  }\n  function keyframe() {\n    let m;\n    const vals = [];\n    const pos = position();\n    while (m = match(/^((\\d+\\.\\d+|\\.\\d+|\\d+)%?|[a-z]+)\\s*/)) {\n      vals.push(m[1]);\n      match(/^,\\s*/);\n    }\n    if (!vals.length) {\n      return;\n    }\n    return pos({\n      type: \"keyframe\",\n      values: vals,\n      declarations: declarations()\n    });\n  }\n  function atkeyframes() {\n    const pos = position();\n    let m = match(/^@([-\\w]+)?keyframes\\s*/);\n    if (!m) {\n      return;\n    }\n    const vendor = m[1];\n    m = match(/^([-\\w]+)\\s*/);\n    if (!m) {\n      return error(\"@keyframes missing name\");\n    }\n    const name = m[1];\n    if (!open()) {\n      return error(`@keyframes missing '{'`);\n    }\n    let frame;\n    let frames = comments();\n    while (frame = keyframe()) {\n      frames.push(frame);\n      frames = frames.concat(comments());\n    }\n    if (!close()) {\n      return error(`@keyframes missing '}'`);\n    }\n    return pos({\n      type: \"keyframes\",\n      name,\n      vendor,\n      keyframes: frames\n    });\n  }\n  function atsupports() {\n    const pos = position();\n    const m = match(/^@supports *([^{]+)/);\n    if (!m) {\n      return;\n    }\n    const supports = trim(m[1]);\n    if (!open()) {\n      return error(`@supports missing '{'`);\n    }\n    const style = comments().concat(rules());\n    if (!close()) {\n      return error(`@supports missing '}'`);\n    }\n    return pos({\n      type: \"supports\",\n      supports,\n      rules: style\n    });\n  }\n  function athost() {\n    const pos = position();\n    const m = match(/^@host\\s*/);\n    if (!m) {\n      return;\n    }\n    if (!open()) {\n      return error(`@host missing '{'`);\n    }\n    const style = comments().concat(rules());\n    if (!close()) {\n      return error(`@host missing '}'`);\n    }\n    return pos({\n      type: \"host\",\n      rules: style\n    });\n  }\n  function atmedia() {\n    const pos = position();\n    const m = match(/^@media *([^{]+)/);\n    if (!m) {\n      return;\n    }\n    const media = trim(m[1]);\n    if (!open()) {\n      return error(`@media missing '{'`);\n    }\n    const style = comments().concat(rules());\n    if (!close()) {\n      return error(`@media missing '}'`);\n    }\n    return pos({\n      type: \"media\",\n      media,\n      rules: style\n    });\n  }\n  function atcustommedia() {\n    const pos = position();\n    const m = match(/^@custom-media\\s+(--[^\\s]+)\\s*([^{;]+);/);\n    if (!m) {\n      return;\n    }\n    return pos({\n      type: \"custom-media\",\n      name: trim(m[1]),\n      media: trim(m[2])\n    });\n  }\n  function atpage() {\n    const pos = position();\n    const m = match(/^@page */);\n    if (!m) {\n      return;\n    }\n    const sel = selector() || [];\n    if (!open()) {\n      return error(`@page missing '{'`);\n    }\n    let decls = comments();\n    let decl;\n    while (decl = declaration()) {\n      decls.push(decl);\n      decls = decls.concat(comments());\n    }\n    if (!close()) {\n      return error(`@page missing '}'`);\n    }\n    return pos({\n      type: \"page\",\n      selectors: sel,\n      declarations: decls\n    });\n  }\n  function atdocument() {\n    const pos = position();\n    const m = match(/^@([-\\w]+)?document *([^{]+)/);\n    if (!m) {\n      return;\n    }\n    const vendor = trim(m[1]);\n    const doc = trim(m[2]);\n    if (!open()) {\n      return error(`@document missing '{'`);\n    }\n    const style = comments().concat(rules());\n    if (!close()) {\n      return error(`@document missing '}'`);\n    }\n    return pos({\n      type: \"document\",\n      document: doc,\n      vendor,\n      rules: style\n    });\n  }\n  function atfontface() {\n    const pos = position();\n    const m = match(/^@font-face\\s*/);\n    if (!m) {\n      return;\n    }\n    if (!open()) {\n      return error(`@font-face missing '{'`);\n    }\n    let decls = comments();\n    let decl;\n    while (decl = declaration()) {\n      decls.push(decl);\n      decls = decls.concat(comments());\n    }\n    if (!close()) {\n      return error(`@font-face missing '}'`);\n    }\n    return pos({\n      type: \"font-face\",\n      declarations: decls\n    });\n  }\n  const atimport = _compileAtrule(\"import\");\n  const atcharset = _compileAtrule(\"charset\");\n  const atnamespace = _compileAtrule(\"namespace\");\n  function _compileAtrule(name) {\n    const re = new RegExp(\n      \"^@\" + name + \"\\\\s*((?:\" + [\n        /[^\\\\]\"(?:\\\\\"|[^\"])*\"/.source,\n        // consume any quoted parts (checking that the double quote isn't itself escaped)\n        /[^\\\\]'(?:\\\\'|[^'])*'/.source,\n        // same but for single quotes\n        \"[^;]\"\n      ].join(\"|\") + \")+);\"\n    );\n    return () => {\n      const pos = position();\n      const m = match(re);\n      if (!m) {\n        return;\n      }\n      const ret = { type: name };\n      ret[name] = m[1].trim();\n      return pos(ret);\n    };\n  }\n  function atrule() {\n    if (css[0] !== \"@\") {\n      return;\n    }\n    return atkeyframes() || atmedia() || atcustommedia() || atsupports() || atimport() || atcharset() || atnamespace() || atdocument() || atpage() || athost() || atfontface();\n  }\n  function rule() {\n    const pos = position();\n    const sel = selector();\n    if (!sel) {\n      return error(\"selector missing\");\n    }\n    comments();\n    return pos({\n      type: \"rule\",\n      selectors: sel,\n      declarations: declarations()\n    });\n  }\n  return addParent(stylesheet());\n}\nfunction trim(str) {\n  return str ? str.replace(/^\\s+|\\s+$/g, \"\") : \"\";\n}\nfunction addParent(obj, parent) {\n  const isNode = obj && typeof obj.type === \"string\";\n  const childParent = isNode ? obj : parent;\n  for (const k of Object.keys(obj)) {\n    const value = obj[k];\n    if (Array.isArray(value)) {\n      value.forEach((v) => {\n        addParent(v, childParent);\n      });\n    } else if (value && typeof value === \"object\") {\n      addParent(value, childParent);\n    }\n  }\n  if (isNode) {\n    Object.defineProperty(obj, \"parent\", {\n      configurable: true,\n      writable: true,\n      enumerable: false,\n      value: parent || null\n    });\n  }\n  return obj;\n}\nconst tagMap = {\n  script: \"noscript\",\n  // camel case svg element tag names\n  altglyph: \"altGlyph\",\n  altglyphdef: \"altGlyphDef\",\n  altglyphitem: \"altGlyphItem\",\n  animatecolor: \"animateColor\",\n  animatemotion: \"animateMotion\",\n  animatetransform: \"animateTransform\",\n  clippath: \"clipPath\",\n  feblend: \"feBlend\",\n  fecolormatrix: \"feColorMatrix\",\n  fecomponenttransfer: \"feComponentTransfer\",\n  fecomposite: \"feComposite\",\n  feconvolvematrix: \"feConvolveMatrix\",\n  fediffuselighting: \"feDiffuseLighting\",\n  fedisplacementmap: \"feDisplacementMap\",\n  fedistantlight: \"feDistantLight\",\n  fedropshadow: \"feDropShadow\",\n  feflood: \"feFlood\",\n  fefunca: \"feFuncA\",\n  fefuncb: \"feFuncB\",\n  fefuncg: \"feFuncG\",\n  fefuncr: \"feFuncR\",\n  fegaussianblur: \"feGaussianBlur\",\n  feimage: \"feImage\",\n  femerge: \"feMerge\",\n  femergenode: \"feMergeNode\",\n  femorphology: \"feMorphology\",\n  feoffset: \"feOffset\",\n  fepointlight: \"fePointLight\",\n  fespecularlighting: \"feSpecularLighting\",\n  fespotlight: \"feSpotLight\",\n  fetile: \"feTile\",\n  feturbulence: \"feTurbulence\",\n  foreignobject: \"foreignObject\",\n  glyphref: \"glyphRef\",\n  lineargradient: \"linearGradient\",\n  radialgradient: \"radialGradient\"\n};\nfunction getTagName(n) {\n  let tagName = tagMap[n.tagName] ? tagMap[n.tagName] : n.tagName;\n  if (tagName === \"link\" && n.attributes._cssText) {\n    tagName = \"style\";\n  }\n  return tagName;\n}\nfunction escapeRegExp(str) {\n  return str.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n}\nconst HOVER_SELECTOR = /([^\\\\]):hover/;\nconst HOVER_SELECTOR_GLOBAL = new RegExp(HOVER_SELECTOR.source, \"g\");\nfunction addHoverClass(cssText, cache) {\n  const cachedStyle = cache?.stylesWithHoverClass.get(cssText);\n  if (cachedStyle) return cachedStyle;\n  if (cssText.length >= 1e6) {\n    return cssText;\n  }\n  const ast = parse(cssText, {\n    silent: true\n  });\n  if (!ast.stylesheet) {\n    return cssText;\n  }\n  const selectors = [];\n  ast.stylesheet.rules.forEach((rule) => {\n    if (\"selectors\" in rule) {\n      (rule.selectors || []).forEach((selector) => {\n        if (HOVER_SELECTOR.test(selector)) {\n          selectors.push(selector);\n        }\n      });\n    }\n  });\n  if (selectors.length === 0) {\n    return cssText;\n  }\n  const selectorMatcher = new RegExp(\n    selectors.filter((selector, index) => selectors.indexOf(selector) === index).sort((a, b) => b.length - a.length).map((selector) => {\n      return escapeRegExp(selector);\n    }).join(\"|\"),\n    \"g\"\n  );\n  const result = cssText.replace(selectorMatcher, (selector) => {\n    const newSelector = selector.replace(HOVER_SELECTOR_GLOBAL, \"$1.\\\\:hover\");\n    return `${selector}, ${newSelector}`;\n  });\n  cache?.stylesWithHoverClass.set(cssText, result);\n  return result;\n}\nfunction createCache() {\n  const stylesWithHoverClass = /* @__PURE__ */ new Map();\n  return {\n    stylesWithHoverClass\n  };\n}\nfunction buildNode(n, options) {\n  const { doc, hackCss, cache } = options;\n  switch (n.type) {\n    case NodeType.Document:\n      return doc.implementation.createDocument(null, \"\", null);\n    case NodeType.DocumentType:\n      return doc.implementation.createDocumentType(\n        n.name || \"html\",\n        n.publicId,\n        n.systemId\n      );\n    case NodeType.Element: {\n      const tagName = getTagName(n);\n      let node;\n      if (n.isSVG) {\n        node = doc.createElementNS(\"http://www.w3.org/2000/svg\", tagName);\n      } else {\n        if (\n          // If the tag name is a custom element name\n          n.isCustom && // If the browser supports custom elements\n          doc.defaultView?.customElements && // If the custom element hasn't been defined yet\n          !doc.defaultView.customElements.get(n.tagName)\n        )\n          try {\n            doc.defaultView.customElements.define(\n              n.tagName,\n              class extends doc.defaultView.HTMLElement {\n              }\n            );\n          } catch (e) {\n            console.warn(\"Cannot define custom element\", e);\n          }\n        node = doc.createElement(tagName);\n      }\n      const specialAttributes = {};\n      for (const name in n.attributes) {\n        if (!Object.prototype.hasOwnProperty.call(n.attributes, name)) {\n          continue;\n        }\n        let value = n.attributes[name];\n        if (tagName === \"option\" && name === \"selected\" && value === false) {\n          continue;\n        }\n        if (value === null) {\n          continue;\n        }\n        if (value === true) value = \"\";\n        if (name.startsWith(\"rr_\")) {\n          specialAttributes[name] = value;\n          continue;\n        }\n        const isTextarea = tagName === \"textarea\" && name === \"value\";\n        const isRemoteOrDynamicCss = tagName === \"style\" && name === \"_cssText\";\n        if (isRemoteOrDynamicCss && hackCss && typeof value === \"string\") {\n          value = addHoverClass(value, cache);\n        }\n        if ((isTextarea || isRemoteOrDynamicCss) && typeof value === \"string\") {\n          const child = doc.createTextNode(value);\n          for (const c of Array.from(node.childNodes)) {\n            if (c.nodeType === node.TEXT_NODE) {\n              node.removeChild(c);\n            }\n          }\n          node.appendChild(child);\n          continue;\n        }\n        try {\n          if (n.isSVG && name === \"xlink:href\") {\n            node.setAttributeNS(\n              \"http://www.w3.org/1999/xlink\",\n              name,\n              value.toString()\n            );\n          } else if (name === \"onload\" || name === \"onclick\" || name.substring(0, 7) === \"onmouse\") {\n            node.setAttribute(\"_\" + name, value.toString());\n          } else if (tagName === \"meta\" && n.attributes[\"http-equiv\"] === \"Content-Security-Policy\" && name === \"content\") {\n            node.setAttribute(\"csp-content\", value.toString());\n            continue;\n          } else if (tagName === \"link\" && (n.attributes.rel === \"preload\" || n.attributes.rel === \"modulepreload\")) {\n          } else if (tagName === \"link\" && n.attributes.rel === \"prefetch\" && typeof n.attributes.href === \"string\" && extractFileExtension(n.attributes.href) === \"js\") {\n          } else if (tagName === \"img\" && n.attributes.srcset && n.attributes.rr_dataURL) {\n            node.setAttribute(\n              \"rrweb-original-srcset\",\n              n.attributes.srcset\n            );\n          } else {\n            node.setAttribute(name, value.toString());\n          }\n        } catch (error) {\n        }\n      }\n      for (const name in specialAttributes) {\n        const value = specialAttributes[name];\n        if (tagName === \"canvas\" && name === \"rr_dataURL\") {\n          const image = doc.createElement(\"img\");\n          image.onload = () => {\n            const ctx = node.getContext(\"2d\");\n            if (ctx) {\n              ctx.drawImage(image, 0, 0, image.width, image.height);\n            }\n          };\n          image.src = value.toString();\n          if (node.RRNodeType)\n            node.rr_dataURL = value.toString();\n        } else if (tagName === \"img\" && name === \"rr_dataURL\") {\n          const image = node;\n          if (!image.currentSrc.startsWith(\"data:\")) {\n            image.setAttribute(\n              \"rrweb-original-src\",\n              n.attributes.src\n            );\n            image.src = value.toString();\n          }\n        }\n        if (name === \"rr_width\") {\n          node.style.setProperty(\"width\", value.toString());\n        } else if (name === \"rr_height\") {\n          node.style.setProperty(\"height\", value.toString());\n        } else if (name === \"rr_mediaCurrentTime\" && typeof value === \"number\") {\n          node.currentTime = value;\n        } else if (name === \"rr_mediaState\") {\n          switch (value) {\n            case \"played\":\n              node.play().catch((e) => console.warn(\"media playback error\", e));\n              break;\n            case \"paused\":\n              node.pause();\n              break;\n          }\n        }\n      }\n      if (n.isShadowHost) {\n        if (!node.shadowRoot) {\n          node.attachShadow({ mode: \"open\" });\n        } else {\n          while (node.shadowRoot.firstChild) {\n            node.shadowRoot.removeChild(node.shadowRoot.firstChild);\n          }\n        }\n      }\n      return node;\n    }\n    case NodeType.Text:\n      return doc.createTextNode(\n        n.isStyle && hackCss ? addHoverClass(n.textContent, cache) : n.textContent\n      );\n    case NodeType.CDATA:\n      if (!(doc instanceof XMLDocument)) {\n        return null;\n      }\n      return doc.createCDATASection(n.textContent);\n    case NodeType.Comment:\n      return doc.createComment(n.textContent);\n    default:\n      return null;\n  }\n}\nfunction buildNodeWithSN(n, options) {\n  const {\n    doc,\n    mirror,\n    skipChild = false,\n    hackCss = true,\n    afterAppend,\n    cache\n  } = options;\n  if (mirror.has(n.id)) {\n    const nodeInMirror = mirror.getNode(n.id);\n    const meta = mirror.getMeta(nodeInMirror);\n    if (isNodeMetaEqual(meta, n)) return mirror.getNode(n.id);\n  }\n  let node = buildNode(n, { doc, hackCss, cache });\n  if (!node) {\n    return null;\n  }\n  if (n.rootId && mirror.getNode(n.rootId) !== doc) {\n    mirror.replace(n.rootId, doc);\n  }\n  if (n.type === NodeType.Document) {\n    doc.close();\n    doc.open();\n    if (n.compatMode === \"BackCompat\" && n.childNodes && n.childNodes[0].type !== NodeType.DocumentType) {\n      if (n.childNodes[0].type === NodeType.Element && \"xmlns\" in n.childNodes[0].attributes && n.childNodes[0].attributes.xmlns === \"http://www.w3.org/1999/xhtml\") {\n        doc.write(\n          '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"\">'\n        );\n      } else {\n        doc.write(\n          '<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"\">'\n        );\n      }\n    }\n    node = doc;\n  }\n  mirror.add(node, n);\n  if ((n.type === NodeType.Document || n.type === NodeType.Element) && !skipChild) {\n    for (const childN of n.childNodes) {\n      const childNode = buildNodeWithSN(childN, {\n        doc,\n        mirror,\n        skipChild: false,\n        hackCss,\n        afterAppend,\n        cache\n      });\n      if (!childNode) {\n        console.warn(\"Failed to rebuild\", childN);\n        continue;\n      }\n      if (childN.isShadow && isElement(node) && node.shadowRoot) {\n        node.shadowRoot.appendChild(childNode);\n      } else if (n.type === NodeType.Document && childN.type == NodeType.Element) {\n        const htmlElement = childNode;\n        let body = null;\n        htmlElement.childNodes.forEach((child) => {\n          if (child.nodeName === \"BODY\") body = child;\n        });\n        if (body) {\n          htmlElement.removeChild(body);\n          node.appendChild(childNode);\n          htmlElement.appendChild(body);\n        } else {\n          node.appendChild(childNode);\n        }\n      } else {\n        node.appendChild(childNode);\n      }\n      if (afterAppend) {\n        afterAppend(childNode, childN.id);\n      }\n    }\n  }\n  return node;\n}\nfunction visit(mirror, onVisit) {\n  function walk(node) {\n    onVisit(node);\n  }\n  for (const id of mirror.getIds()) {\n    if (mirror.has(id)) {\n      walk(mirror.getNode(id));\n    }\n  }\n}\nfunction handleScroll(node, mirror) {\n  const n = mirror.getMeta(node);\n  if (n?.type !== NodeType.Element) {\n    return;\n  }\n  const el = node;\n  for (const name in n.attributes) {\n    if (!(Object.prototype.hasOwnProperty.call(n.attributes, name) && name.startsWith(\"rr_\"))) {\n      continue;\n    }\n    const value = n.attributes[name];\n    if (name === \"rr_scrollLeft\") {\n      el.scrollLeft = value;\n    }\n    if (name === \"rr_scrollTop\") {\n      el.scrollTop = value;\n    }\n  }\n}\nfunction rebuild(n, options) {\n  const {\n    doc,\n    onVisit,\n    hackCss = true,\n    afterAppend,\n    cache,\n    mirror = new Mirror()\n  } = options;\n  const node = buildNodeWithSN(n, {\n    doc,\n    mirror,\n    skipChild: false,\n    hackCss,\n    afterAppend,\n    cache\n  });\n  visit(mirror, (visitedNode) => {\n    if (onVisit) {\n      onVisit(visitedNode);\n    }\n    handleScroll(visitedNode, mirror);\n  });\n  return node;\n}\nfunction on(type, fn, target = document) {\n  const options = { capture: true, passive: true };\n  target.addEventListener(type, fn, options);\n  return () => target.removeEventListener(type, fn, options);\n}\nconst DEPARTED_MIRROR_ACCESS_WARNING = \"Please stop import mirror directly. Instead of that,\\r\\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\\r\\nor you can use record.mirror to access the mirror instance during recording.\";\nlet _mirror = {\n  map: {},\n  getId() {\n    console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n    return -1;\n  },\n  getNode() {\n    console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n    return null;\n  },\n  removeNodeFromMap() {\n    console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n  },\n  has() {\n    console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n    return false;\n  },\n  reset() {\n    console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n  }\n};\nif (typeof window !== \"undefined\" && window.Proxy && window.Reflect) {\n  _mirror = new Proxy(_mirror, {\n    get(target, prop, receiver) {\n      if (prop === \"map\") {\n        console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n      }\n      return Reflect.get(target, prop, receiver);\n    }\n  });\n}\nfunction throttle(func, wait, options = {}) {\n  let timeout = null;\n  let previous = 0;\n  return function(...args) {\n    const now = Date.now();\n    if (!previous && options.leading === false) {\n      previous = now;\n    }\n    const remaining = wait - (now - previous);\n    const context = this;\n    if (remaining <= 0 || remaining > wait) {\n      if (timeout) {\n        clearTimeout(timeout);\n        timeout = null;\n      }\n      previous = now;\n      func.apply(context, args);\n    } else if (!timeout && options.trailing !== false) {\n      timeout = setTimeout(() => {\n        previous = options.leading === false ? 0 : Date.now();\n        timeout = null;\n        func.apply(context, args);\n      }, remaining);\n    }\n  };\n}\nfunction hookSetter(target, key, d, isRevoked, win = window) {\n  const original = win.Object.getOwnPropertyDescriptor(target, key);\n  win.Object.defineProperty(\n    target,\n    key,\n    isRevoked ? d : {\n      set(value) {\n        setTimeout(() => {\n          d.set.call(this, value);\n        }, 0);\n        if (original && original.set) {\n          original.set.call(this, value);\n        }\n      }\n    }\n  );\n  return () => hookSetter(target, key, original || {}, true);\n}\nfunction patch(source, name, replacement) {\n  try {\n    if (!(name in source)) {\n      return () => {\n      };\n    }\n    const original = source[name];\n    const wrapped = replacement(original);\n    if (typeof wrapped === \"function\") {\n      wrapped.prototype = wrapped.prototype || {};\n      Object.defineProperties(wrapped, {\n        __rrweb_original__: {\n          enumerable: false,\n          value: original\n        }\n      });\n    }\n    source[name] = wrapped;\n    return () => {\n      source[name] = original;\n    };\n  } catch {\n    return () => {\n    };\n  }\n}\nlet nowTimestamp = Date.now;\nif (!/* @__PURE__ */ /[1-9][0-9]{12}/.test(Date.now().toString())) {\n  nowTimestamp = () => (/* @__PURE__ */ new Date()).getTime();\n}\nfunction getWindowScroll(win) {\n  const doc = win.document;\n  return {\n    left: doc.scrollingElement ? doc.scrollingElement.scrollLeft : win.pageXOffset !== void 0 ? win.pageXOffset : doc?.documentElement.scrollLeft || doc?.body?.parentElement?.scrollLeft || doc?.body?.scrollLeft || 0,\n    top: doc.scrollingElement ? doc.scrollingElement.scrollTop : win.pageYOffset !== void 0 ? win.pageYOffset : doc?.documentElement.scrollTop || doc?.body?.parentElement?.scrollTop || doc?.body?.scrollTop || 0\n  };\n}\nfunction getWindowHeight() {\n  return window.innerHeight || document.documentElement && document.documentElement.clientHeight || document.body && document.body.clientHeight;\n}\nfunction getWindowWidth() {\n  return window.innerWidth || document.documentElement && document.documentElement.clientWidth || document.body && document.body.clientWidth;\n}\nfunction closestElementOfNode(node) {\n  if (!node) {\n    return null;\n  }\n  try {\n    const el = node.nodeType === node.ELEMENT_NODE ? node : node.parentElement;\n    return el;\n  } catch (error) {\n    return null;\n  }\n}\nfunction isBlocked(node, blockClass, blockSelector, unblockSelector, checkAncestors) {\n  if (!node) {\n    return false;\n  }\n  const el = closestElementOfNode(node);\n  if (!el) {\n    return false;\n  }\n  const blockedPredicate = createMatchPredicate(blockClass, blockSelector);\n  if (!checkAncestors) {\n    const isUnblocked = unblockSelector && el.matches(unblockSelector);\n    return blockedPredicate(el) && !isUnblocked;\n  }\n  const blockDistance = distanceToMatch(el, blockedPredicate);\n  let unblockDistance = -1;\n  if (blockDistance < 0) {\n    return false;\n  }\n  if (unblockSelector) {\n    unblockDistance = distanceToMatch(\n      el,\n      createMatchPredicate(null, unblockSelector)\n    );\n  }\n  if (blockDistance > -1 && unblockDistance < 0) {\n    return true;\n  }\n  return blockDistance < unblockDistance;\n}\nfunction isSerialized(n, mirror) {\n  return mirror.getId(n) !== -1;\n}\nfunction isIgnored(n, mirror) {\n  return mirror.getId(n) === IGNORED_NODE;\n}\nfunction isAncestorRemoved(target, mirror) {\n  if (isShadowRoot(target)) {\n    return false;\n  }\n  const id = mirror.getId(target);\n  if (!mirror.has(id)) {\n    return true;\n  }\n  if (target.parentNode && target.parentNode.nodeType === target.DOCUMENT_NODE) {\n    return false;\n  }\n  if (!target.parentNode) {\n    return true;\n  }\n  return isAncestorRemoved(target.parentNode, mirror);\n}\nfunction legacy_isTouchEvent(event) {\n  return Boolean(event.changedTouches);\n}\nfunction polyfill(win = window) {\n  if (\"NodeList\" in win && !win.NodeList.prototype.forEach) {\n    win.NodeList.prototype.forEach = Array.prototype.forEach;\n  }\n  if (\"DOMTokenList\" in win && !win.DOMTokenList.prototype.forEach) {\n    win.DOMTokenList.prototype.forEach = Array.prototype.forEach;\n  }\n  if (!Node.prototype.contains) {\n    Node.prototype.contains = (...args) => {\n      let node = args[0];\n      if (!(0 in args)) {\n        throw new TypeError(\"1 argument is required\");\n      }\n      do {\n        if (this === node) {\n          return true;\n        }\n      } while (node = node && node.parentNode);\n      return false;\n    };\n  }\n}\nfunction queueToResolveTrees(queue) {\n  const queueNodeMap = {};\n  const putIntoMap = (m, parent) => {\n    const nodeInTree = {\n      value: m,\n      parent,\n      children: []\n    };\n    queueNodeMap[m.node.id] = nodeInTree;\n    return nodeInTree;\n  };\n  const queueNodeTrees = [];\n  for (const mutation of queue) {\n    const { nextId, parentId } = mutation;\n    if (nextId && nextId in queueNodeMap) {\n      const nextInTree = queueNodeMap[nextId];\n      if (nextInTree.parent) {\n        const idx = nextInTree.parent.children.indexOf(nextInTree);\n        nextInTree.parent.children.splice(\n          idx,\n          0,\n          putIntoMap(mutation, nextInTree.parent)\n        );\n      } else {\n        const idx = queueNodeTrees.indexOf(nextInTree);\n        queueNodeTrees.splice(idx, 0, putIntoMap(mutation, null));\n      }\n      continue;\n    }\n    if (parentId in queueNodeMap) {\n      const parentInTree = queueNodeMap[parentId];\n      parentInTree.children.push(putIntoMap(mutation, parentInTree));\n      continue;\n    }\n    queueNodeTrees.push(putIntoMap(mutation, null));\n  }\n  return queueNodeTrees;\n}\nfunction iterateResolveTree(tree, cb) {\n  cb(tree.value);\n  for (let i = tree.children.length - 1; i >= 0; i--) {\n    iterateResolveTree(tree.children[i], cb);\n  }\n}\nfunction isSerializedIframe(n, mirror) {\n  return Boolean(n.nodeName === \"IFRAME\" && mirror.getMeta(n));\n}\nfunction isSerializedStylesheet(n, mirror) {\n  return Boolean(\n    n.nodeName === \"LINK\" && n.nodeType === n.ELEMENT_NODE && n.getAttribute && n.getAttribute(\"rel\") === \"stylesheet\" && mirror.getMeta(n)\n  );\n}\nfunction getBaseDimension(node, rootIframe) {\n  const frameElement = node.ownerDocument?.defaultView?.frameElement;\n  if (!frameElement || frameElement === rootIframe) {\n    return {\n      x: 0,\n      y: 0,\n      relativeScale: 1,\n      absoluteScale: 1\n    };\n  }\n  const frameDimension = frameElement.getBoundingClientRect();\n  const frameBaseDimension = getBaseDimension(frameElement, rootIframe);\n  const relativeScale = frameDimension.height / frameElement.clientHeight;\n  return {\n    x: frameDimension.x * frameBaseDimension.relativeScale + frameBaseDimension.x,\n    y: frameDimension.y * frameBaseDimension.relativeScale + frameBaseDimension.y,\n    relativeScale,\n    absoluteScale: frameBaseDimension.absoluteScale * relativeScale\n  };\n}\nfunction hasShadowRoot(n) {\n  return Boolean(n?.shadowRoot);\n}\nfunction getNestedRule(rules, position) {\n  const rule = rules[position[0]];\n  if (position.length === 1) {\n    return rule;\n  } else {\n    return getNestedRule(\n      rule.cssRules[position[1]].cssRules,\n      position.slice(2)\n    );\n  }\n}\nfunction getPositionsAndIndex(nestedIndex) {\n  const positions = [...nestedIndex];\n  const index = positions.pop();\n  return { positions, index };\n}\nfunction uniqueTextMutations(mutations) {\n  const idSet = /* @__PURE__ */ new Set();\n  const uniqueMutations = [];\n  for (let i = mutations.length; i--; ) {\n    const mutation = mutations[i];\n    if (!idSet.has(mutation.id)) {\n      uniqueMutations.push(mutation);\n      idSet.add(mutation.id);\n    }\n  }\n  return uniqueMutations;\n}\nclass StyleSheetMirror {\n  constructor() {\n    this.id = 1;\n    this.styleIDMap = /* @__PURE__ */ new WeakMap();\n    this.idStyleMap = /* @__PURE__ */ new Map();\n  }\n  getId(stylesheet) {\n    return this.styleIDMap.get(stylesheet) ?? -1;\n  }\n  has(stylesheet) {\n    return this.styleIDMap.has(stylesheet);\n  }\n  /**\n   * @returns If the stylesheet is in the mirror, returns the id of the stylesheet. If not, return the new assigned id.\n   */\n  add(stylesheet, id) {\n    if (this.has(stylesheet)) return this.getId(stylesheet);\n    let newId;\n    if (id === void 0) {\n      newId = this.id++;\n    } else newId = id;\n    this.styleIDMap.set(stylesheet, newId);\n    this.idStyleMap.set(newId, stylesheet);\n    return newId;\n  }\n  getStyle(id) {\n    return this.idStyleMap.get(id) || null;\n  }\n  reset() {\n    this.styleIDMap = /* @__PURE__ */ new WeakMap();\n    this.idStyleMap = /* @__PURE__ */ new Map();\n    this.id = 1;\n  }\n  generateId() {\n    return this.id++;\n  }\n}\nfunction getShadowHost(n) {\n  let shadowHost = null;\n  if (n.getRootNode?.()?.nodeType === Node.DOCUMENT_FRAGMENT_NODE && n.getRootNode().host)\n    shadowHost = n.getRootNode().host;\n  return shadowHost;\n}\nfunction getRootShadowHost(n) {\n  let rootShadowHost = n;\n  let shadowHost;\n  while (shadowHost = getShadowHost(rootShadowHost))\n    rootShadowHost = shadowHost;\n  return rootShadowHost;\n}\nfunction shadowHostInDom(n) {\n  const doc = n.ownerDocument;\n  if (!doc) return false;\n  const shadowHost = getRootShadowHost(n);\n  return doc.contains(shadowHost);\n}\nfunction inDom(n) {\n  const doc = n.ownerDocument;\n  if (!doc) return false;\n  return doc.contains(n) || shadowHostInDom(n);\n}\nconst cachedImplementations = {};\nfunction getImplementation(name) {\n  const cached = cachedImplementations[name];\n  if (cached) {\n    return cached;\n  }\n  const document2 = window.document;\n  let impl = window[name];\n  if (document2 && typeof document2.createElement === \"function\") {\n    try {\n      const sandbox = document2.createElement(\"iframe\");\n      sandbox.hidden = true;\n      document2.head.appendChild(sandbox);\n      const contentWindow = sandbox.contentWindow;\n      if (contentWindow && contentWindow[name]) {\n        impl = // eslint-disable-next-line @typescript-eslint/unbound-method\n        contentWindow[name];\n      }\n      document2.head.removeChild(sandbox);\n    } catch (e) {\n    }\n  }\n  return cachedImplementations[name] = impl.bind(\n    window\n  );\n}\nfunction onRequestAnimationFrame(...rest) {\n  return getImplementation(\"requestAnimationFrame\")(...rest);\n}\nfunction setTimeout(...rest) {\n  return getImplementation(\"setTimeout\")(...rest);\n}\nfunction clearTimeout(...rest) {\n  return getImplementation(\"clearTimeout\")(...rest);\n}\nconst utils = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({\n  __proto__: null,\n  StyleSheetMirror,\n  get _mirror() {\n    return _mirror;\n  },\n  clearTimeout,\n  closestElementOfNode,\n  getBaseDimension,\n  getNestedRule,\n  getPositionsAndIndex,\n  getRootShadowHost,\n  getShadowHost,\n  getWindowHeight,\n  getWindowScroll,\n  getWindowWidth,\n  hasShadowRoot,\n  hookSetter,\n  inDom,\n  isAncestorRemoved,\n  isBlocked,\n  isIgnored,\n  isSerialized,\n  isSerializedIframe,\n  isSerializedStylesheet,\n  iterateResolveTree,\n  legacy_isTouchEvent,\n  get nowTimestamp() {\n    return nowTimestamp;\n  },\n  on,\n  onRequestAnimationFrame,\n  patch,\n  polyfill,\n  queueToResolveTrees,\n  setTimeout,\n  shadowHostInDom,\n  throttle,\n  uniqueTextMutations\n}, Symbol.toStringTag, { value: \"Module\" }));\nvar EventType = /* @__PURE__ */ ((EventType2) => {\n  EventType2[EventType2[\"DomContentLoaded\"] = 0] = \"DomContentLoaded\";\n  EventType2[EventType2[\"Load\"] = 1] = \"Load\";\n  EventType2[EventType2[\"FullSnapshot\"] = 2] = \"FullSnapshot\";\n  EventType2[EventType2[\"IncrementalSnapshot\"] = 3] = \"IncrementalSnapshot\";\n  EventType2[EventType2[\"Meta\"] = 4] = \"Meta\";\n  EventType2[EventType2[\"Custom\"] = 5] = \"Custom\";\n  EventType2[EventType2[\"Plugin\"] = 6] = \"Plugin\";\n  return EventType2;\n})(EventType || {});\nvar IncrementalSource = /* @__PURE__ */ ((IncrementalSource2) => {\n  IncrementalSource2[IncrementalSource2[\"Mutation\"] = 0] = \"Mutation\";\n  IncrementalSource2[IncrementalSource2[\"MouseMove\"] = 1] = \"MouseMove\";\n  IncrementalSource2[IncrementalSource2[\"MouseInteraction\"] = 2] = \"MouseInteraction\";\n  IncrementalSource2[IncrementalSource2[\"Scroll\"] = 3] = \"Scroll\";\n  IncrementalSource2[IncrementalSource2[\"ViewportResize\"] = 4] = \"ViewportResize\";\n  IncrementalSource2[IncrementalSource2[\"Input\"] = 5] = \"Input\";\n  IncrementalSource2[IncrementalSource2[\"TouchMove\"] = 6] = \"TouchMove\";\n  IncrementalSource2[IncrementalSource2[\"MediaInteraction\"] = 7] = \"MediaInteraction\";\n  IncrementalSource2[IncrementalSource2[\"StyleSheetRule\"] = 8] = \"StyleSheetRule\";\n  IncrementalSource2[IncrementalSource2[\"CanvasMutation\"] = 9] = \"CanvasMutation\";\n  IncrementalSource2[IncrementalSource2[\"Font\"] = 10] = \"Font\";\n  IncrementalSource2[IncrementalSource2[\"Log\"] = 11] = \"Log\";\n  IncrementalSource2[IncrementalSource2[\"Drag\"] = 12] = \"Drag\";\n  IncrementalSource2[IncrementalSource2[\"StyleDeclaration\"] = 13] = \"StyleDeclaration\";\n  IncrementalSource2[IncrementalSource2[\"Selection\"] = 14] = \"Selection\";\n  IncrementalSource2[IncrementalSource2[\"AdoptedStyleSheet\"] = 15] = \"AdoptedStyleSheet\";\n  IncrementalSource2[IncrementalSource2[\"CustomElement\"] = 16] = \"CustomElement\";\n  return IncrementalSource2;\n})(IncrementalSource || {});\nvar MouseInteractions = /* @__PURE__ */ ((MouseInteractions2) => {\n  MouseInteractions2[MouseInteractions2[\"MouseUp\"] = 0] = \"MouseUp\";\n  MouseInteractions2[MouseInteractions2[\"MouseDown\"] = 1] = \"MouseDown\";\n  MouseInteractions2[MouseInteractions2[\"Click\"] = 2] = \"Click\";\n  MouseInteractions2[MouseInteractions2[\"ContextMenu\"] = 3] = \"ContextMenu\";\n  MouseInteractions2[MouseInteractions2[\"DblClick\"] = 4] = \"DblClick\";\n  MouseInteractions2[MouseInteractions2[\"Focus\"] = 5] = \"Focus\";\n  MouseInteractions2[MouseInteractions2[\"Blur\"] = 6] = \"Blur\";\n  MouseInteractions2[MouseInteractions2[\"TouchStart\"] = 7] = \"TouchStart\";\n  MouseInteractions2[MouseInteractions2[\"TouchMove_Departed\"] = 8] = \"TouchMove_Departed\";\n  MouseInteractions2[MouseInteractions2[\"TouchEnd\"] = 9] = \"TouchEnd\";\n  MouseInteractions2[MouseInteractions2[\"TouchCancel\"] = 10] = \"TouchCancel\";\n  return MouseInteractions2;\n})(MouseInteractions || {});\nvar PointerTypes = /* @__PURE__ */ ((PointerTypes2) => {\n  PointerTypes2[PointerTypes2[\"Mouse\"] = 0] = \"Mouse\";\n  PointerTypes2[PointerTypes2[\"Pen\"] = 1] = \"Pen\";\n  PointerTypes2[PointerTypes2[\"Touch\"] = 2] = \"Touch\";\n  return PointerTypes2;\n})(PointerTypes || {});\nvar CanvasContext = /* @__PURE__ */ ((CanvasContext2) => {\n  CanvasContext2[CanvasContext2[\"2D\"] = 0] = \"2D\";\n  CanvasContext2[CanvasContext2[\"WebGL\"] = 1] = \"WebGL\";\n  CanvasContext2[CanvasContext2[\"WebGL2\"] = 2] = \"WebGL2\";\n  return CanvasContext2;\n})(CanvasContext || {});\nvar MediaInteractions = /* @__PURE__ */ ((MediaInteractions2) => {\n  MediaInteractions2[MediaInteractions2[\"Play\"] = 0] = \"Play\";\n  MediaInteractions2[MediaInteractions2[\"Pause\"] = 1] = \"Pause\";\n  MediaInteractions2[MediaInteractions2[\"Seeked\"] = 2] = \"Seeked\";\n  MediaInteractions2[MediaInteractions2[\"VolumeChange\"] = 3] = \"VolumeChange\";\n  MediaInteractions2[MediaInteractions2[\"RateChange\"] = 4] = \"RateChange\";\n  return MediaInteractions2;\n})(MediaInteractions || {});\nvar ReplayerEvents = /* @__PURE__ */ ((ReplayerEvents2) => {\n  ReplayerEvents2[\"Start\"] = \"start\";\n  ReplayerEvents2[\"Pause\"] = \"pause\";\n  ReplayerEvents2[\"Resume\"] = \"resume\";\n  ReplayerEvents2[\"Resize\"] = \"resize\";\n  ReplayerEvents2[\"Finish\"] = \"finish\";\n  ReplayerEvents2[\"FullsnapshotRebuilded\"] = \"fullsnapshot-rebuilded\";\n  ReplayerEvents2[\"LoadStylesheetStart\"] = \"load-stylesheet-start\";\n  ReplayerEvents2[\"LoadStylesheetEnd\"] = \"load-stylesheet-end\";\n  ReplayerEvents2[\"SkipStart\"] = \"skip-start\";\n  ReplayerEvents2[\"SkipEnd\"] = \"skip-end\";\n  ReplayerEvents2[\"MouseInteraction\"] = \"mouse-interaction\";\n  ReplayerEvents2[\"EventCast\"] = \"event-cast\";\n  ReplayerEvents2[\"CustomEvent\"] = \"custom-event\";\n  ReplayerEvents2[\"Flush\"] = \"flush\";\n  ReplayerEvents2[\"StateChange\"] = \"state-change\";\n  ReplayerEvents2[\"PlayBack\"] = \"play-back\";\n  ReplayerEvents2[\"Destroy\"] = \"destroy\";\n  return ReplayerEvents2;\n})(ReplayerEvents || {});\nlet errorHandler;\nfunction registerErrorHandler(handler) {\n  errorHandler = handler;\n}\nfunction unregisterErrorHandler() {\n  errorHandler = void 0;\n}\nconst callbackWrapper = (cb) => {\n  if (!errorHandler) {\n    return cb;\n  }\n  const rrwebWrapped = ((...rest) => {\n    try {\n      return cb(...rest);\n    } catch (error) {\n      if (errorHandler && errorHandler(error) === true) {\n        return () => {\n        };\n      }\n      throw error;\n    }\n  });\n  return rrwebWrapped;\n};\nvar chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\nvar lookup = typeof Uint8Array === \"undefined\" ? [] : new Uint8Array(256);\nfor (var i = 0; i < chars.length; i++) {\n  lookup[chars.charCodeAt(i)] = i;\n}\nvar encode = function(arraybuffer) {\n  var bytes = new Uint8Array(arraybuffer), i, len = bytes.length, base64 = \"\";\n  for (i = 0; i < len; i += 3) {\n    base64 += chars[bytes[i] >> 2];\n    base64 += chars[(bytes[i] & 3) << 4 | bytes[i + 1] >> 4];\n    base64 += chars[(bytes[i + 1] & 15) << 2 | bytes[i + 2] >> 6];\n    base64 += chars[bytes[i + 2] & 63];\n  }\n  if (len % 3 === 2) {\n    base64 = base64.substring(0, base64.length - 1) + \"=\";\n  } else if (len % 3 === 1) {\n    base64 = base64.substring(0, base64.length - 2) + \"==\";\n  }\n  return base64;\n};\nvar decode = function(base64) {\n  var bufferLength = base64.length * 0.75, len = base64.length, i, p = 0, encoded1, encoded2, encoded3, encoded4;\n  if (base64[base64.length - 1] === \"=\") {\n    bufferLength--;\n    if (base64[base64.length - 2] === \"=\") {\n      bufferLength--;\n    }\n  }\n  var arraybuffer = new ArrayBuffer(bufferLength), bytes = new Uint8Array(arraybuffer);\n  for (i = 0; i < len; i += 4) {\n    encoded1 = lookup[base64.charCodeAt(i)];\n    encoded2 = lookup[base64.charCodeAt(i + 1)];\n    encoded3 = lookup[base64.charCodeAt(i + 2)];\n    encoded4 = lookup[base64.charCodeAt(i + 3)];\n    bytes[p++] = encoded1 << 2 | encoded2 >> 4;\n    bytes[p++] = (encoded2 & 15) << 4 | encoded3 >> 2;\n    bytes[p++] = (encoded3 & 3) << 6 | encoded4 & 63;\n  }\n  return arraybuffer;\n};\nconst canvasVarMap = /* @__PURE__ */ new Map();\nfunction variableListFor(ctx, ctor) {\n  let contextMap = canvasVarMap.get(ctx);\n  if (!contextMap) {\n    contextMap = /* @__PURE__ */ new Map();\n    canvasVarMap.set(ctx, contextMap);\n  }\n  if (!contextMap.has(ctor)) {\n    contextMap.set(ctor, []);\n  }\n  return contextMap.get(ctor);\n}\nconst saveWebGLVar = (value, win, ctx) => {\n  if (!value || !(isInstanceOfWebGLObject(value, win) || typeof value === \"object\"))\n    return;\n  const name = value.constructor.name;\n  const list = variableListFor(ctx, name);\n  let index = list.indexOf(value);\n  if (index === -1) {\n    index = list.length;\n    list.push(value);\n  }\n  return index;\n};\nfunction serializeArg(value, win, ctx) {\n  if (value instanceof Array) {\n    return value.map((arg) => serializeArg(arg, win, ctx));\n  } else if (value === null) {\n    return value;\n  } else if (value instanceof Float32Array || value instanceof Float64Array || value instanceof Int32Array || value instanceof Uint32Array || value instanceof Uint8Array || value instanceof Uint16Array || value instanceof Int16Array || value instanceof Int8Array || value instanceof Uint8ClampedArray) {\n    const name = value.constructor.name;\n    return {\n      rr_type: name,\n      args: [Object.values(value)]\n    };\n  } else if (\n    // SharedArrayBuffer disabled on most browsers due to spectre.\n    // More info: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer/SharedArrayBuffer\n    // value instanceof SharedArrayBuffer ||\n    value instanceof ArrayBuffer\n  ) {\n    const name = value.constructor.name;\n    const base64 = encode(value);\n    return {\n      rr_type: name,\n      base64\n    };\n  } else if (value instanceof DataView) {\n    const name = value.constructor.name;\n    return {\n      rr_type: name,\n      args: [\n        serializeArg(value.buffer, win, ctx),\n        value.byteOffset,\n        value.byteLength\n      ]\n    };\n  } else if (value instanceof HTMLImageElement) {\n    const name = value.constructor.name;\n    const { src } = value;\n    return {\n      rr_type: name,\n      src\n    };\n  } else if (value instanceof HTMLCanvasElement) {\n    const name = \"HTMLImageElement\";\n    const src = value.toDataURL();\n    return {\n      rr_type: name,\n      src\n    };\n  } else if (value instanceof ImageData) {\n    const name = value.constructor.name;\n    return {\n      rr_type: name,\n      args: [serializeArg(value.data, win, ctx), value.width, value.height]\n    };\n  } else if (isInstanceOfWebGLObject(value, win) || typeof value === \"object\") {\n    const name = value.constructor.name;\n    const index = saveWebGLVar(value, win, ctx);\n    return {\n      rr_type: name,\n      index\n    };\n  }\n  return value;\n}\nconst serializeArgs = (args, win, ctx) => {\n  return args.map((arg) => serializeArg(arg, win, ctx));\n};\nconst isInstanceOfWebGLObject = (value, win) => {\n  const webGLConstructorNames = [\n    \"WebGLActiveInfo\",\n    \"WebGLBuffer\",\n    \"WebGLFramebuffer\",\n    \"WebGLProgram\",\n    \"WebGLRenderbuffer\",\n    \"WebGLShader\",\n    \"WebGLShaderPrecisionFormat\",\n    \"WebGLTexture\",\n    \"WebGLUniformLocation\",\n    \"WebGLVertexArrayObject\",\n    // In old Chrome versions, value won't be an instanceof WebGLVertexArrayObject.\n    \"WebGLVertexArrayObjectOES\"\n  ];\n  const supportedWebGLConstructorNames = webGLConstructorNames.filter(\n    (name) => typeof win[name] === \"function\"\n  );\n  return Boolean(\n    supportedWebGLConstructorNames.find(\n      (name) => value instanceof win[name]\n    )\n  );\n};\nfunction initCanvas2DMutationObserver(cb, win, blockClass2, blockSelector, unblockSelector) {\n  const handlers = [];\n  const props2D = Object.getOwnPropertyNames(\n    win.CanvasRenderingContext2D.prototype\n  );\n  for (const prop of props2D) {\n    try {\n      if (typeof win.CanvasRenderingContext2D.prototype[prop] !== \"function\") {\n        continue;\n      }\n      const restoreHandler = patch(\n        win.CanvasRenderingContext2D.prototype,\n        prop,\n        function(original) {\n          return function(...args) {\n            if (!isBlocked(\n              this.canvas,\n              blockClass2,\n              blockSelector,\n              unblockSelector,\n              true\n            )) {\n              setTimeout(() => {\n                const recordArgs = serializeArgs(args, win, this);\n                cb(this.canvas, {\n                  type: CanvasContext[\"2D\"],\n                  property: prop,\n                  args: recordArgs\n                });\n              }, 0);\n            }\n            return original.apply(this, args);\n          };\n        }\n      );\n      handlers.push(restoreHandler);\n    } catch {\n      const hookHandler = hookSetter(\n        win.CanvasRenderingContext2D.prototype,\n        prop,\n        {\n          set(v) {\n            cb(this.canvas, {\n              type: CanvasContext[\"2D\"],\n              property: prop,\n              args: [v],\n              setter: true\n            });\n          }\n        }\n      );\n      handlers.push(hookHandler);\n    }\n  }\n  return () => {\n    handlers.forEach((h) => h());\n  };\n}\nfunction getNormalizedContextName(contextType) {\n  return contextType === \"experimental-webgl\" ? \"webgl\" : contextType;\n}\nfunction initCanvasContextObserver(win, blockClass, blockSelector, unblockSelector, setPreserveDrawingBufferToTrue) {\n  const handlers = [];\n  try {\n    const restoreHandler = patch(\n      win.HTMLCanvasElement.prototype,\n      \"getContext\",\n      function(original) {\n        return function(contextType, ...args) {\n          if (!isBlocked(this, blockClass, blockSelector, unblockSelector, true)) {\n            const ctxName = getNormalizedContextName(contextType);\n            if (!(\"__context\" in this)) this.__context = ctxName;\n            if (setPreserveDrawingBufferToTrue && [\"webgl\", \"webgl2\"].includes(ctxName)) {\n              if (args[0] && typeof args[0] === \"object\") {\n                const contextAttributes = args[0];\n                if (!contextAttributes.preserveDrawingBuffer) {\n                  contextAttributes.preserveDrawingBuffer = true;\n                }\n              } else {\n                args.splice(0, 1, {\n                  preserveDrawingBuffer: true\n                });\n              }\n            }\n          }\n          return original.apply(this, [contextType, ...args]);\n        };\n      }\n    );\n    handlers.push(restoreHandler);\n  } catch {\n    console.error(\"failed to patch HTMLCanvasElement.prototype.getContext\");\n  }\n  return () => {\n    handlers.forEach((h) => h());\n  };\n}\nfunction patchGLPrototype(prototype, type, cb, blockClass2, blockSelector, unblockSelector, _mirror2, win) {\n  const handlers = [];\n  const props = Object.getOwnPropertyNames(prototype);\n  for (const prop of props) {\n    if (\n      //prop.startsWith('get') ||  // e.g. getProgramParameter, but too risky\n      [\n        \"isContextLost\",\n        \"canvas\",\n        \"drawingBufferWidth\",\n        \"drawingBufferHeight\"\n      ].includes(prop)\n    ) {\n      continue;\n    }\n    try {\n      if (typeof prototype[prop] !== \"function\") {\n        continue;\n      }\n      const restoreHandler = patch(\n        prototype,\n        prop,\n        function(original) {\n          return function(...args) {\n            const result = original.apply(this, args);\n            saveWebGLVar(result, win, this);\n            if (\"tagName\" in this.canvas && !isBlocked(\n              this.canvas,\n              blockClass2,\n              blockSelector,\n              unblockSelector,\n              true\n            )) {\n              const recordArgs = serializeArgs(args, win, this);\n              const mutation = {\n                type,\n                property: prop,\n                args: recordArgs\n              };\n              cb(this.canvas, mutation);\n            }\n            return result;\n          };\n        }\n      );\n      handlers.push(restoreHandler);\n    } catch {\n      const hookHandler = hookSetter(prototype, prop, {\n        set(v) {\n          cb(this.canvas, {\n            type,\n            property: prop,\n            args: [v],\n            setter: true\n          });\n        }\n      });\n      handlers.push(hookHandler);\n    }\n  }\n  return handlers;\n}\nfunction initCanvasWebGLMutationObserver(cb, win, blockClass2, blockSelector, unblockSelector, mirror) {\n  const handlers = [];\n  handlers.push(\n    ...patchGLPrototype(\n      win.WebGLRenderingContext.prototype,\n      CanvasContext.WebGL,\n      cb,\n      blockClass2,\n      blockSelector,\n      unblockSelector,\n      mirror,\n      win\n    )\n  );\n  if (typeof win.WebGL2RenderingContext !== \"undefined\") {\n    handlers.push(\n      ...patchGLPrototype(\n        win.WebGL2RenderingContext.prototype,\n        CanvasContext.WebGL2,\n        cb,\n        blockClass2,\n        blockSelector,\n        unblockSelector,\n        mirror,\n        win\n      )\n    );\n  }\n  return () => {\n    handlers.forEach((h) => h());\n  };\n}\nconst r = `for(var e=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",t=\"undefined\"==typeof Uint8Array?[]:new Uint8Array(256),a=0;a<64;a++)t[e.charCodeAt(a)]=a;var n=function(t){var a,n=new Uint8Array(t),r=n.length,s=\"\";for(a=0;a<r;a+=3)s+=e[n[a]>>2],s+=e[(3&n[a])<<4|n[a+1]>>4],s+=e[(15&n[a+1])<<2|n[a+2]>>6],s+=e[63&n[a+2]];return r%3==2?s=s.substring(0,s.length-1)+\"=\":r%3==1&&(s=s.substring(0,s.length-2)+\"==\"),s};const r=new Map,s=new Map;const i=self;i.onmessage=async function(e){if(!(\"OffscreenCanvas\"in globalThis))return i.postMessage({id:e.data.id});{const{id:t,bitmap:a,width:o,height:f,maxCanvasSize:c,dataURLOptions:g}=e.data,u=async function(e,t,a){const r=e+\"-\"+t;if(\"OffscreenCanvas\"in globalThis){if(s.has(r))return s.get(r);const i=new OffscreenCanvas(e,t);i.getContext(\"2d\");const o=await i.convertToBlob(a),f=await o.arrayBuffer(),c=n(f);return s.set(r,c),c}return\"\"}(o,f,g),[h,d]=function(e,t,a){if(!a)return[e,t];const[n,r]=a;if(e<=n&&t<=r)return[e,t];let s=e,i=t;return s>n&&(i=Math.floor(n*t/e),s=n),i>r&&(s=Math.floor(r*e/t),i=r),[s,i]}(o,f,c),l=new OffscreenCanvas(h,d),w=l.getContext(\"bitmaprenderer\"),p=h===o&&d===f?a:await createImageBitmap(a,{resizeWidth:h,resizeHeight:d,resizeQuality:\"low\"});w?.transferFromImageBitmap(p),a.close();const y=await l.convertToBlob(g),v=y.type,b=await y.arrayBuffer(),m=n(b);if(p.close(),!r.has(t)&&await u===m)return r.set(t,m),i.postMessage({id:t});if(r.get(t)===m)return i.postMessage({id:t});i.postMessage({id:t,type:v,base64:m,width:o,height:f}),r.set(t,m)}};`;\nfunction t() {\n  const t2 = new Blob([r]);\n  return URL.createObjectURL(t2);\n}\nclass CanvasManagerNoop {\n  reset() {\n  }\n  freeze() {\n  }\n  unfreeze() {\n  }\n  lock() {\n  }\n  unlock() {\n  }\n  snapshot() {\n  }\n  addWindow() {\n  }\n  addShadowRoot() {\n  }\n  resetShadowRoots() {\n  }\n}\nclass CanvasManager {\n  constructor(options) {\n    this.pendingCanvasMutations = /* @__PURE__ */ new Map();\n    this.rafStamps = { latestId: 0, invokeId: null };\n    this.shadowDoms = /* @__PURE__ */ new Set();\n    this.windowsSet = /* @__PURE__ */ new WeakSet();\n    this.windows = [];\n    this.restoreHandlers = [];\n    this.frozen = false;\n    this.locked = false;\n    this.snapshotInProgressMap = /* @__PURE__ */ new Map();\n    this.worker = null;\n    this.lastSnapshotTime = 0;\n    this.processMutation = (target, mutation) => {\n      const newFrame = this.rafStamps.invokeId && this.rafStamps.latestId !== this.rafStamps.invokeId;\n      if (newFrame || !this.rafStamps.invokeId)\n        this.rafStamps.invokeId = this.rafStamps.latestId;\n      if (!this.pendingCanvasMutations.has(target)) {\n        this.pendingCanvasMutations.set(target, []);\n      }\n      this.pendingCanvasMutations.get(target).push(mutation);\n    };\n    const {\n      enableManualSnapshot,\n      sampling = \"all\",\n      win,\n      recordCanvas,\n      errorHandler: errorHandler2\n    } = options;\n    options.sampling = sampling;\n    this.mutationCb = options.mutationCb;\n    this.mirror = options.mirror;\n    this.options = options;\n    if (errorHandler2) {\n      registerErrorHandler(errorHandler2);\n    }\n    if (recordCanvas && typeof sampling === \"number\" || enableManualSnapshot) {\n      this.worker = this.initFPSWorker();\n    }\n    this.addWindow(win);\n    if (enableManualSnapshot) {\n      return;\n    }\n    callbackWrapper(() => {\n      if (recordCanvas && sampling === \"all\") {\n        this.startRAFTimestamping();\n        this.startPendingCanvasMutationFlusher();\n      }\n      if (recordCanvas && typeof sampling === \"number\") {\n        this.initCanvasFPSObserver();\n      }\n    })();\n  }\n  reset() {\n    this.pendingCanvasMutations.clear();\n    this.restoreHandlers.forEach((handler) => {\n      try {\n        handler();\n      } catch (e) {\n      }\n    });\n    this.restoreHandlers = [];\n    this.windowsSet = /* @__PURE__ */ new WeakSet();\n    this.windows = [];\n    this.shadowDoms = /* @__PURE__ */ new Set();\n    this.worker?.terminate();\n    this.worker = null;\n    this.snapshotInProgressMap = /* @__PURE__ */ new Map();\n  }\n  freeze() {\n    this.frozen = true;\n  }\n  unfreeze() {\n    this.frozen = false;\n  }\n  lock() {\n    this.locked = true;\n  }\n  unlock() {\n    this.locked = false;\n  }\n  addWindow(win) {\n    const {\n      sampling = \"all\",\n      blockClass,\n      blockSelector,\n      unblockSelector,\n      recordCanvas,\n      enableManualSnapshot\n    } = this.options;\n    if (this.windowsSet.has(win)) return;\n    if (enableManualSnapshot) {\n      this.windowsSet.add(win);\n      this.windows.push(new WeakRef(win));\n      return;\n    }\n    callbackWrapper(() => {\n      if (recordCanvas && sampling === \"all\") {\n        this.initCanvasMutationObserver(\n          win,\n          blockClass,\n          blockSelector,\n          unblockSelector\n        );\n      }\n      if (recordCanvas && typeof sampling === \"number\") {\n        const canvasContextReset = initCanvasContextObserver(\n          win,\n          blockClass,\n          blockSelector,\n          unblockSelector,\n          true\n        );\n        this.restoreHandlers.push(() => {\n          canvasContextReset();\n        });\n      }\n    })();\n    this.windowsSet.add(win);\n    this.windows.push(new WeakRef(win));\n  }\n  addShadowRoot(shadowRoot) {\n    this.shadowDoms.add(new WeakRef(shadowRoot));\n  }\n  resetShadowRoots() {\n    this.shadowDoms = /* @__PURE__ */ new Set();\n  }\n  snapshot(canvasElement, options) {\n    if (options?.skipRequestAnimationFrame) {\n      this.takeSnapshot(performance.now(), true, canvasElement);\n      return;\n    }\n    onRequestAnimationFrame(\n      (timestamp) => this.takeSnapshot(timestamp, true, canvasElement)\n    );\n  }\n  initFPSWorker() {\n    const worker = new Worker(t());\n    worker.onmessage = (e) => {\n      const data = e.data;\n      const { id } = data;\n      this.snapshotInProgressMap.set(id, false);\n      if (!(\"base64\" in data)) return;\n      const { base64, type, width, height } = data;\n      this.mutationCb({\n        id,\n        type: CanvasContext[\"2D\"],\n        commands: [\n          {\n            property: \"clearRect\",\n            // wipe canvas\n            args: [0, 0, width, height]\n          },\n          {\n            property: \"drawImage\",\n            // draws (semi-transparent) image\n            args: [\n              {\n                rr_type: \"ImageBitmap\",\n                args: [\n                  {\n                    rr_type: \"Blob\",\n                    data: [{ rr_type: \"ArrayBuffer\", base64 }],\n                    type\n                  }\n                ]\n              },\n              0,\n              0,\n              // The below args are needed if we enforce a max size, we want to\n              // retain the original size when drawing the image (which should be smaller)\n              width,\n              height\n            ]\n          }\n        ]\n      });\n    };\n    return worker;\n  }\n  initCanvasFPSObserver() {\n    let rafId;\n    if (!this.windows.length && !this.shadowDoms.size) {\n      return;\n    }\n    const rafCallback = (timestamp) => {\n      this.takeSnapshot(timestamp, false);\n      rafId = onRequestAnimationFrame(rafCallback);\n    };\n    rafId = onRequestAnimationFrame(rafCallback);\n    this.restoreHandlers.push(() => {\n      if (rafId) {\n        cancelAnimationFrame(rafId);\n      }\n    });\n  }\n  initCanvasMutationObserver(win, blockClass, blockSelector, unblockSelector) {\n    const canvasContextReset = initCanvasContextObserver(\n      win,\n      blockClass,\n      blockSelector,\n      unblockSelector,\n      false\n    );\n    const canvas2DReset = initCanvas2DMutationObserver(\n      this.processMutation.bind(this),\n      win,\n      blockClass,\n      blockSelector,\n      unblockSelector\n    );\n    const canvasWebGL1and2Reset = initCanvasWebGLMutationObserver(\n      this.processMutation.bind(this),\n      win,\n      blockClass,\n      blockSelector,\n      unblockSelector,\n      this.mirror\n    );\n    this.restoreHandlers.push(() => {\n      canvasContextReset();\n      canvas2DReset();\n      canvasWebGL1and2Reset();\n    });\n  }\n  /**\n   * Returns all `canvas` elements that are not blocked by the given selectors. Searches all windows and shadow roots.\n   */\n  getCanvasElements(blockClass, blockSelector, unblockSelector) {\n    const matchedCanvas = [];\n    const searchCanvas = (root) => {\n      root.querySelectorAll(\"canvas\").forEach((canvas) => {\n        if (!isBlocked(canvas, blockClass, blockSelector, unblockSelector, true)) {\n          matchedCanvas.push(canvas);\n        }\n      });\n    };\n    for (const item of this.windows) {\n      const window2 = item.deref();\n      let _document;\n      try {\n        _document = window2 && window2.document;\n      } catch {\n      }\n      if (_document) {\n        searchCanvas(_document);\n      }\n    }\n    for (const item of this.shadowDoms) {\n      const shadowRoot = item.deref();\n      if (shadowRoot) {\n        searchCanvas(shadowRoot);\n      }\n    }\n    return matchedCanvas;\n  }\n  /**\n   * Takes a snapshot of the provided canvas element, or will search all windows/shadow roots for canvases. Will self-throttle based on `options.sampling`.\n   *\n   * @returns `true` if the snapshot was taken, `false` if it was throttled.\n   */\n  takeSnapshot(timestamp, isManualSnapshot, canvasElement) {\n    const {\n      sampling,\n      blockClass,\n      blockSelector,\n      unblockSelector,\n      dataURLOptions,\n      maxCanvasSize\n    } = this.options;\n    const fps = sampling === \"all\" ? 2 : sampling || 2;\n    const timeBetweenSnapshots = 1e3 / fps;\n    const shouldThrottle = this.lastSnapshotTime && timestamp - this.lastSnapshotTime < timeBetweenSnapshots;\n    if (shouldThrottle) {\n      return false;\n    }\n    this.lastSnapshotTime = timestamp;\n    const canvases = canvasElement ? [canvasElement] : this.getCanvasElements(blockClass, blockSelector, unblockSelector);\n    canvases.forEach((canvas) => {\n      const id = this.mirror.getId(canvas);\n      if (!this.mirror.hasNode(canvas) || !canvas.width || !canvas.height || this.snapshotInProgressMap.get(id)) {\n        return;\n      }\n      this.snapshotInProgressMap.set(id, true);\n      if (!isManualSnapshot && [\"webgl\", \"webgl2\"].includes(canvas.__context)) {\n        const context = canvas.getContext(canvas.__context);\n        if (context?.getContextAttributes()?.preserveDrawingBuffer === false) {\n          context.clear(context.COLOR_BUFFER_BIT);\n        }\n      }\n      createImageBitmap(canvas).then((bitmap) => {\n        this.worker?.postMessage(\n          {\n            id,\n            bitmap,\n            width: canvas.width,\n            height: canvas.height,\n            dataURLOptions,\n            maxCanvasSize\n          },\n          [bitmap]\n        );\n      }).catch((error) => {\n        callbackWrapper(() => {\n          this.snapshotInProgressMap.delete(id);\n          throw error;\n        })();\n      });\n    });\n    return true;\n  }\n  startPendingCanvasMutationFlusher() {\n    onRequestAnimationFrame(() => this.flushPendingCanvasMutations());\n  }\n  startRAFTimestamping() {\n    const setLatestRAFTimestamp = (timestamp) => {\n      this.rafStamps.latestId = timestamp;\n      onRequestAnimationFrame(setLatestRAFTimestamp);\n    };\n    onRequestAnimationFrame(setLatestRAFTimestamp);\n  }\n  flushPendingCanvasMutations() {\n    this.pendingCanvasMutations.forEach(\n      (_values, canvas) => {\n        const id = this.mirror.getId(canvas);\n        this.flushPendingCanvasMutationFor(canvas, id);\n      }\n    );\n    onRequestAnimationFrame(() => this.flushPendingCanvasMutations());\n  }\n  flushPendingCanvasMutationFor(canvas, id) {\n    if (this.frozen || this.locked) {\n      return;\n    }\n    const valuesWithType = this.pendingCanvasMutations.get(canvas);\n    if (!valuesWithType || id === -1) return;\n    const values = valuesWithType.map((value) => {\n      const { type: type2, ...rest } = value;\n      return rest;\n    });\n    const { type } = valuesWithType[0];\n    this.mutationCb({ id, type, commands: values });\n    this.pendingCanvasMutations.delete(canvas);\n  }\n}\nexport {\n  createCache as $,\n  MediaInteractions as A,\n  patch as B,\n  setTimeout as C,\n  legacy_isTouchEvent as D,\n  nowTimestamp as E,\n  IncrementalSource as F,\n  getWindowHeight as G,\n  getWindowWidth as H,\n  IGNORED_NODE as I,\n  toUpperCase as J,\n  genId as K,\n  EventType as L,\n  MouseInteractions as M,\n  NodeType as N,\n  stringifyRule as O,\n  PointerTypes as P,\n  onRequestAnimationFrame as Q,\n  polyfill as R,\n  StyleSheetMirror as S,\n  unregisterErrorHandler as T,\n  createMirror as U,\n  CanvasManagerNoop as V,\n  snapshot as W,\n  registerErrorHandler as X,\n  ReplayerEvents as Y,\n  decode as Z,\n  CanvasContext as _,\n  isBlocked as a,\n  rebuild as a0,\n  buildNodeWithSN as a1,\n  queueToResolveTrees as a2,\n  iterateResolveTree as a3,\n  uniqueTextMutations as a4,\n  getPositionsAndIndex as a5,\n  getNestedRule as a6,\n  getBaseDimension as a7,\n  clearTimeout as a8,\n  CanvasManager as a9,\n  utils as aa,\n  isShadowRoot as b,\n  isSerialized as c,\n  isAncestorRemoved as d,\n  isNativeShadowDom as e,\n  getInputValue as f,\n  getInputType as g,\n  ignoreAttribute as h,\n  isIgnored as i,\n  toLowerCase as j,\n  closestElementOfNode as k,\n  hasShadowRoot as l,\n  maskInputValue as m,\n  needMaskingText as n,\n  inDom as o,\n  getShadowHost as p,\n  serializeNodeWithId as q,\n  isSerializedIframe as r,\n  shouldMaskInput as s,\n  transformAttribute as t,\n  isSerializedStylesheet as u,\n  callbackWrapper as v,\n  throttle as w,\n  getWindowScroll as x,\n  on as y,\n  hookSetter as z\n};\n//# sourceMappingURL=canvas-manager-B7mHazUr.js.map\n", "import { i as isIgnored, a as isBlocked, b as isShadowRoot, c as isSerialized, d as isAncestorRemoved, e as isNativeShadowDom, g as getInputType, f as getInputValue, s as shouldMaskInput, n as needMaskingText, m as maskInputValue, h as ignoreAttribute, t as transformAttribute, j as toLowerCase, k as closestElementOfNode, l as hasShadowRoot, I as IGNORED_NODE, o as inDom, p as getShadowHost, q as serializeNodeWithId, r as isSerializedIframe, u as isSerializedStylesheet, v as callbackWrapper, w as throttle, x as getWindowScroll, y as on, M as MouseInteractions, z as hookSetter, A as MediaInteractions, B as patch, C as setTimeout$1, D as legacy_isTouchEvent, E as nowTimestamp, F as IncrementalSource, G as getWindowHeight, H as getWindowWidth, J as toUpperCase, P as PointerTypes, K as genId, L as EventType, N as NodeType$2, S as StyleSheetMirror, O as stringifyRule, Q as onRequestAnimationFrame, R as polyfill$1, T as unregisterErrorHandler, U as createMirror$2, V as CanvasManagerNoop, W as snapshot, X as registerErrorHandler, Y as ReplayerEvents, Z as decode, _ as CanvasContext, $ as createCache, a0 as rebuild, a1 as buildNodeWithSN, a2 as queueToResolveTrees, a3 as iterateResolveTree, a4 as uniqueTextMutations, a5 as getPositionsAndIndex, a6 as getNestedRule, a7 as getBaseDimension, a8 as clearTimeout } from \"./canvas-manager-B7mHazUr.js\";\nimport { a9, aa } from \"./canvas-manager-B7mHazUr.js\";\nvar __defProp = Object.defineProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\nvar __defProp2 = Object.defineProperty;\nvar __defNormalProp2 = (obj, key, value) => key in obj ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField2 = (obj, key, value) => __defNormalProp2(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\nvar NodeType$1 = /* @__PURE__ */ ((NodeType2) => {\n  NodeType2[NodeType2[\"Document\"] = 0] = \"Document\";\n  NodeType2[NodeType2[\"DocumentType\"] = 1] = \"DocumentType\";\n  NodeType2[NodeType2[\"Element\"] = 2] = \"Element\";\n  NodeType2[NodeType2[\"Text\"] = 3] = \"Text\";\n  NodeType2[NodeType2[\"CDATA\"] = 4] = \"CDATA\";\n  NodeType2[NodeType2[\"Comment\"] = 5] = \"Comment\";\n  return NodeType2;\n})(NodeType$1 || {});\nlet Mirror$1 = class Mirror {\n  constructor() {\n    __publicField2(this, \"idNodeMap\", /* @__PURE__ */ new Map());\n    __publicField2(this, \"nodeMetaMap\", /* @__PURE__ */ new WeakMap());\n  }\n  getId(n2) {\n    if (!n2) return -1;\n    const id = this.getMeta(n2)?.id;\n    return id ?? -1;\n  }\n  getNode(id) {\n    return this.idNodeMap.get(id) || null;\n  }\n  getIds() {\n    return Array.from(this.idNodeMap.keys());\n  }\n  getMeta(n2) {\n    return this.nodeMetaMap.get(n2) || null;\n  }\n  // removes the node from idNodeMap\n  // doesn't remove the node from nodeMetaMap\n  removeNodeFromMap(n2) {\n    const id = this.getId(n2);\n    this.idNodeMap.delete(id);\n    if (n2.childNodes) {\n      n2.childNodes.forEach(\n        (childNode) => this.removeNodeFromMap(childNode)\n      );\n    }\n  }\n  has(id) {\n    return this.idNodeMap.has(id);\n  }\n  hasNode(node) {\n    return this.nodeMetaMap.has(node);\n  }\n  add(n2, meta) {\n    const id = meta.id;\n    this.idNodeMap.set(id, n2);\n    this.nodeMetaMap.set(n2, meta);\n  }\n  replace(id, n2) {\n    const oldNode = this.getNode(id);\n    if (oldNode) {\n      const meta = this.nodeMetaMap.get(oldNode);\n      if (meta) this.nodeMetaMap.set(n2, meta);\n    }\n    this.idNodeMap.set(id, n2);\n  }\n  reset() {\n    this.idNodeMap = /* @__PURE__ */ new Map();\n    this.nodeMetaMap = /* @__PURE__ */ new WeakMap();\n  }\n};\nfunction createMirror$1() {\n  return new Mirror$1();\n}\nfunction parseCSSText(cssText) {\n  const res = {};\n  const listDelimiter = /;(?![^(]*\\))/g;\n  const propertyDelimiter = /:(.+)/;\n  const comment = /\\/\\*.*?\\*\\//g;\n  cssText.replace(comment, \"\").split(listDelimiter).forEach(function(item) {\n    if (item) {\n      const tmp = item.split(propertyDelimiter);\n      tmp.length > 1 && (res[camelize(tmp[0].trim())] = tmp[1].trim());\n    }\n  });\n  return res;\n}\nfunction toCSSText(style) {\n  const properties = [];\n  for (const name in style) {\n    const value = style[name];\n    if (typeof value !== \"string\") continue;\n    const normalizedName = hyphenate(name);\n    properties.push(`${normalizedName}: ${value};`);\n  }\n  return properties.join(\" \");\n}\nconst camelizeRE = /-([a-z])/g;\nconst CUSTOM_PROPERTY_REGEX = /^--[a-zA-Z0-9-]+$/;\nconst camelize = (str) => {\n  if (CUSTOM_PROPERTY_REGEX.test(str)) return str;\n  return str.replace(camelizeRE, (_, c2) => c2 ? c2.toUpperCase() : \"\");\n};\nconst hyphenateRE = /\\B([A-Z])/g;\nconst hyphenate = (str) => {\n  return str.replace(hyphenateRE, \"-$1\").toLowerCase();\n};\nclass BaseRRNode {\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any\n  constructor(..._args) {\n    __publicField(this, \"parentElement\", null);\n    __publicField(this, \"parentNode\", null);\n    __publicField(this, \"ownerDocument\");\n    __publicField(this, \"firstChild\", null);\n    __publicField(this, \"lastChild\", null);\n    __publicField(this, \"previousSibling\", null);\n    __publicField(this, \"nextSibling\", null);\n    __publicField(this, \"ELEMENT_NODE\", 1);\n    __publicField(this, \"TEXT_NODE\", 3);\n    __publicField(this, \"nodeType\");\n    __publicField(this, \"nodeName\");\n    __publicField(this, \"RRNodeType\");\n  }\n  get childNodes() {\n    const childNodes = [];\n    let childIterator = this.firstChild;\n    while (childIterator) {\n      childNodes.push(childIterator);\n      childIterator = childIterator.nextSibling;\n    }\n    return childNodes;\n  }\n  contains(node) {\n    if (!(node instanceof BaseRRNode)) return false;\n    else if (node.ownerDocument !== this.ownerDocument) return false;\n    else if (node === this) return true;\n    while (node.parentNode) {\n      if (node.parentNode === this) return true;\n      node = node.parentNode;\n    }\n    return false;\n  }\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  appendChild(_newChild) {\n    throw new Error(\n      `RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.`\n    );\n  }\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  insertBefore(_newChild, _refChild) {\n    throw new Error(\n      `RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.`\n    );\n  }\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  removeChild(_node) {\n    throw new Error(\n      `RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.`\n    );\n  }\n  toString() {\n    return \"RRNode\";\n  }\n}\nclass BaseRRDocument extends BaseRRNode {\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  constructor(...args) {\n    super(args);\n    __publicField(this, \"nodeType\", 9);\n    __publicField(this, \"nodeName\", \"#document\");\n    __publicField(this, \"compatMode\", \"CSS1Compat\");\n    __publicField(this, \"RRNodeType\", NodeType$1.Document);\n    __publicField(this, \"textContent\", null);\n    this.ownerDocument = this;\n  }\n  get documentElement() {\n    return this.childNodes.find(\n      (node) => node.RRNodeType === NodeType$1.Element && node.tagName === \"HTML\"\n    ) || null;\n  }\n  get body() {\n    return this.documentElement?.childNodes.find(\n      (node) => node.RRNodeType === NodeType$1.Element && node.tagName === \"BODY\"\n    ) || null;\n  }\n  get head() {\n    return this.documentElement?.childNodes.find(\n      (node) => node.RRNodeType === NodeType$1.Element && node.tagName === \"HEAD\"\n    ) || null;\n  }\n  get implementation() {\n    return this;\n  }\n  get firstElementChild() {\n    return this.documentElement;\n  }\n  appendChild(newChild) {\n    const nodeType = newChild.RRNodeType;\n    if (nodeType === NodeType$1.Element || nodeType === NodeType$1.DocumentType) {\n      if (this.childNodes.some((s2) => s2.RRNodeType === nodeType)) {\n        throw new Error(\n          `RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${nodeType === NodeType$1.Element ? \"RRElement\" : \"RRDoctype\"} on RRDocument allowed.`\n        );\n      }\n    }\n    const child = appendChild(this, newChild);\n    child.parentElement = null;\n    return child;\n  }\n  insertBefore(newChild, refChild) {\n    const nodeType = newChild.RRNodeType;\n    if (nodeType === NodeType$1.Element || nodeType === NodeType$1.DocumentType) {\n      if (this.childNodes.some((s2) => s2.RRNodeType === nodeType)) {\n        throw new Error(\n          `RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${nodeType === NodeType$1.Element ? \"RRElement\" : \"RRDoctype\"} on RRDocument allowed.`\n        );\n      }\n    }\n    const child = insertBefore(this, newChild, refChild);\n    child.parentElement = null;\n    return child;\n  }\n  removeChild(node) {\n    return removeChild(this, node);\n  }\n  open() {\n    this.firstChild = null;\n    this.lastChild = null;\n  }\n  close() {\n  }\n  /**\n   * Adhoc implementation for setting xhtml namespace in rebuilt.ts (rrweb-snapshot).\n   * There are two lines used this function:\n   * 1. doc.write('\\<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"\"\\>')\n   * 2. doc.write('\\<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"\"\\>')\n   */\n  write(content) {\n    let publicId;\n    if (content === '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"\">')\n      publicId = \"-//W3C//DTD XHTML 1.0 Transitional//EN\";\n    else if (content === '<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"\">')\n      publicId = \"-//W3C//DTD HTML 4.0 Transitional//EN\";\n    if (publicId) {\n      const doctype = this.createDocumentType(\"html\", publicId, \"\");\n      this.open();\n      this.appendChild(doctype);\n    }\n  }\n  createDocument(_namespace, _qualifiedName, _doctype) {\n    return new BaseRRDocument();\n  }\n  createDocumentType(qualifiedName, publicId, systemId) {\n    const doctype = new BaseRRDocumentType(qualifiedName, publicId, systemId);\n    doctype.ownerDocument = this;\n    return doctype;\n  }\n  createElement(tagName) {\n    const element = new BaseRRElement(tagName);\n    element.ownerDocument = this;\n    return element;\n  }\n  createElementNS(_namespaceURI, qualifiedName) {\n    return this.createElement(qualifiedName);\n  }\n  createTextNode(data) {\n    const text = new BaseRRText(data);\n    text.ownerDocument = this;\n    return text;\n  }\n  createComment(data) {\n    const comment = new BaseRRComment(data);\n    comment.ownerDocument = this;\n    return comment;\n  }\n  createCDATASection(data) {\n    const CDATASection = new BaseRRCDATASection(data);\n    CDATASection.ownerDocument = this;\n    return CDATASection;\n  }\n  toString() {\n    return \"RRDocument\";\n  }\n}\nclass BaseRRDocumentType extends BaseRRNode {\n  constructor(qualifiedName, publicId, systemId) {\n    super();\n    __publicField(this, \"nodeType\", 10);\n    __publicField(this, \"RRNodeType\", NodeType$1.DocumentType);\n    __publicField(this, \"name\");\n    __publicField(this, \"publicId\");\n    __publicField(this, \"systemId\");\n    __publicField(this, \"textContent\", null);\n    this.name = qualifiedName;\n    this.publicId = publicId;\n    this.systemId = systemId;\n    this.nodeName = qualifiedName;\n  }\n  toString() {\n    return \"RRDocumentType\";\n  }\n}\nclass BaseRRElement extends BaseRRNode {\n  constructor(tagName) {\n    super();\n    __publicField(this, \"nodeType\", 1);\n    __publicField(this, \"RRNodeType\", NodeType$1.Element);\n    __publicField(this, \"tagName\");\n    __publicField(this, \"attributes\", {});\n    __publicField(this, \"shadowRoot\", null);\n    __publicField(this, \"scrollLeft\");\n    __publicField(this, \"scrollTop\");\n    this.tagName = tagName.toUpperCase();\n    this.nodeName = tagName.toUpperCase();\n  }\n  get textContent() {\n    let result = \"\";\n    this.childNodes.forEach((node) => result += node.textContent);\n    return result;\n  }\n  set textContent(textContent) {\n    this.firstChild = null;\n    this.lastChild = null;\n    this.appendChild(this.ownerDocument.createTextNode(textContent));\n  }\n  get classList() {\n    return new ClassList(\n      this.attributes.class,\n      (newClassName) => {\n        this.attributes.class = newClassName;\n      }\n    );\n  }\n  get id() {\n    return this.attributes.id || \"\";\n  }\n  get className() {\n    return this.attributes.class || \"\";\n  }\n  get style() {\n    const style = this.attributes.style ? parseCSSText(this.attributes.style) : {};\n    const hyphenateRE2 = /\\B([A-Z])/g;\n    style.setProperty = (name, value, priority) => {\n      if (hyphenateRE2.test(name)) return;\n      const normalizedName = camelize(name);\n      if (!value) delete style[normalizedName];\n      else style[normalizedName] = value;\n      if (priority === \"important\") style[normalizedName] += \" !important\";\n      this.attributes.style = toCSSText(style);\n    };\n    style.removeProperty = (name) => {\n      if (hyphenateRE2.test(name)) return \"\";\n      const normalizedName = camelize(name);\n      const value = style[normalizedName] || \"\";\n      delete style[normalizedName];\n      this.attributes.style = toCSSText(style);\n      return value;\n    };\n    return style;\n  }\n  getAttribute(name) {\n    return this.attributes[name] || null;\n  }\n  setAttribute(name, attribute) {\n    this.attributes[name] = attribute;\n  }\n  setAttributeNS(_namespace, qualifiedName, value) {\n    this.setAttribute(qualifiedName, value);\n  }\n  removeAttribute(name) {\n    delete this.attributes[name];\n  }\n  appendChild(newChild) {\n    return appendChild(this, newChild);\n  }\n  insertBefore(newChild, refChild) {\n    return insertBefore(this, newChild, refChild);\n  }\n  removeChild(node) {\n    return removeChild(this, node);\n  }\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  attachShadow(_init) {\n    const shadowRoot = this.ownerDocument.createElement(\"SHADOWROOT\");\n    this.shadowRoot = shadowRoot;\n    return shadowRoot;\n  }\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  dispatchEvent(_event) {\n    return true;\n  }\n  toString() {\n    let attributeString = \"\";\n    for (const attribute in this.attributes) {\n      attributeString += `${attribute}=\"${this.attributes[attribute]}\" `;\n    }\n    return `${this.tagName} ${attributeString}`;\n  }\n}\nclass BaseRRMediaElement extends BaseRRElement {\n  constructor() {\n    super(...arguments);\n    __publicField(this, \"currentTime\");\n    __publicField(this, \"volume\");\n    __publicField(this, \"paused\");\n    __publicField(this, \"muted\");\n    __publicField(this, \"playbackRate\");\n    __publicField(this, \"loop\");\n  }\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  attachShadow(_init) {\n    throw new Error(\n      `RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow`\n    );\n  }\n  play() {\n    this.paused = false;\n  }\n  pause() {\n    this.paused = true;\n  }\n}\nclass BaseRRText extends BaseRRNode {\n  constructor(data) {\n    super();\n    __publicField(this, \"nodeType\", 3);\n    __publicField(this, \"nodeName\", \"#text\");\n    __publicField(this, \"RRNodeType\", NodeType$1.Text);\n    __publicField(this, \"data\");\n    this.data = data;\n  }\n  get textContent() {\n    return this.data;\n  }\n  set textContent(textContent) {\n    this.data = textContent;\n  }\n  toString() {\n    return `RRText text=${JSON.stringify(this.data)}`;\n  }\n}\nclass BaseRRComment extends BaseRRNode {\n  constructor(data) {\n    super();\n    __publicField(this, \"nodeType\", 8);\n    __publicField(this, \"nodeName\", \"#comment\");\n    __publicField(this, \"RRNodeType\", NodeType$1.Comment);\n    __publicField(this, \"data\");\n    this.data = data;\n  }\n  get textContent() {\n    return this.data;\n  }\n  set textContent(textContent) {\n    this.data = textContent;\n  }\n  toString() {\n    return `RRComment text=${JSON.stringify(this.data)}`;\n  }\n}\nclass BaseRRCDATASection extends BaseRRNode {\n  constructor(data) {\n    super();\n    __publicField(this, \"nodeName\", \"#cdata-section\");\n    __publicField(this, \"nodeType\", 4);\n    __publicField(this, \"RRNodeType\", NodeType$1.CDATA);\n    __publicField(this, \"data\");\n    this.data = data;\n  }\n  get textContent() {\n    return this.data;\n  }\n  set textContent(textContent) {\n    this.data = textContent;\n  }\n  toString() {\n    return `RRCDATASection data=${JSON.stringify(this.data)}`;\n  }\n}\nclass ClassList {\n  constructor(classText, onChange) {\n    __publicField(this, \"onChange\");\n    __publicField(this, \"classes\", []);\n    __publicField(this, \"add\", (...classNames) => {\n      for (const item of classNames) {\n        const className = String(item);\n        if (this.classes.indexOf(className) >= 0) continue;\n        this.classes.push(className);\n      }\n      this.onChange && this.onChange(this.classes.join(\" \"));\n    });\n    __publicField(this, \"remove\", (...classNames) => {\n      this.classes = this.classes.filter(\n        (item) => classNames.indexOf(item) === -1\n      );\n      this.onChange && this.onChange(this.classes.join(\" \"));\n    });\n    if (classText) {\n      const classes = classText.trim().split(/\\s+/);\n      this.classes.push(...classes);\n    }\n    this.onChange = onChange;\n  }\n}\nfunction appendChild(parent, newChild) {\n  if (newChild.parentNode) newChild.parentNode.removeChild(newChild);\n  if (parent.lastChild) {\n    parent.lastChild.nextSibling = newChild;\n    newChild.previousSibling = parent.lastChild;\n  } else {\n    parent.firstChild = newChild;\n    newChild.previousSibling = null;\n  }\n  parent.lastChild = newChild;\n  newChild.nextSibling = null;\n  newChild.parentNode = parent;\n  newChild.parentElement = parent;\n  newChild.ownerDocument = parent.ownerDocument;\n  return newChild;\n}\nfunction insertBefore(parent, newChild, refChild) {\n  if (!refChild) return appendChild(parent, newChild);\n  if (refChild.parentNode !== parent)\n    throw new Error(\n      \"Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.\"\n    );\n  if (newChild === refChild) return newChild;\n  if (newChild.parentNode) newChild.parentNode.removeChild(newChild);\n  newChild.previousSibling = refChild.previousSibling;\n  refChild.previousSibling = newChild;\n  newChild.nextSibling = refChild;\n  if (newChild.previousSibling) newChild.previousSibling.nextSibling = newChild;\n  else parent.firstChild = newChild;\n  newChild.parentElement = parent;\n  newChild.parentNode = parent;\n  newChild.ownerDocument = parent.ownerDocument;\n  return newChild;\n}\nfunction removeChild(parent, child) {\n  if (child.parentNode !== parent)\n    throw new Error(\n      \"Failed to execute 'removeChild' on 'RRNode': The RRNode to be removed is not a child of this RRNode.\"\n    );\n  if (child.previousSibling)\n    child.previousSibling.nextSibling = child.nextSibling;\n  else parent.firstChild = child.nextSibling;\n  if (child.nextSibling)\n    child.nextSibling.previousSibling = child.previousSibling;\n  else parent.lastChild = child.previousSibling;\n  child.previousSibling = null;\n  child.nextSibling = null;\n  child.parentElement = null;\n  child.parentNode = null;\n  return child;\n}\nvar NodeType = /* @__PURE__ */ ((NodeType2) => {\n  NodeType2[NodeType2[\"PLACEHOLDER\"] = 0] = \"PLACEHOLDER\";\n  NodeType2[NodeType2[\"ELEMENT_NODE\"] = 1] = \"ELEMENT_NODE\";\n  NodeType2[NodeType2[\"ATTRIBUTE_NODE\"] = 2] = \"ATTRIBUTE_NODE\";\n  NodeType2[NodeType2[\"TEXT_NODE\"] = 3] = \"TEXT_NODE\";\n  NodeType2[NodeType2[\"CDATA_SECTION_NODE\"] = 4] = \"CDATA_SECTION_NODE\";\n  NodeType2[NodeType2[\"ENTITY_REFERENCE_NODE\"] = 5] = \"ENTITY_REFERENCE_NODE\";\n  NodeType2[NodeType2[\"ENTITY_NODE\"] = 6] = \"ENTITY_NODE\";\n  NodeType2[NodeType2[\"PROCESSING_INSTRUCTION_NODE\"] = 7] = \"PROCESSING_INSTRUCTION_NODE\";\n  NodeType2[NodeType2[\"COMMENT_NODE\"] = 8] = \"COMMENT_NODE\";\n  NodeType2[NodeType2[\"DOCUMENT_NODE\"] = 9] = \"DOCUMENT_NODE\";\n  NodeType2[NodeType2[\"DOCUMENT_TYPE_NODE\"] = 10] = \"DOCUMENT_TYPE_NODE\";\n  NodeType2[NodeType2[\"DOCUMENT_FRAGMENT_NODE\"] = 11] = \"DOCUMENT_FRAGMENT_NODE\";\n  return NodeType2;\n})(NodeType || {});\nfunction getIFrameContentDocument(iframe) {\n  try {\n    return iframe.contentDocument;\n  } catch (e2) {\n  }\n}\nfunction getIFrameContentWindow(iframe) {\n  try {\n    return iframe.contentWindow;\n  } catch (e2) {\n  }\n}\nconst NAMESPACES = {\n  svg: \"http://www.w3.org/2000/svg\",\n  \"xlink:href\": \"http://www.w3.org/1999/xlink\",\n  xmlns: \"http://www.w3.org/2000/xmlns/\"\n};\nconst SVGTagMap = {\n  altglyph: \"altGlyph\",\n  altglyphdef: \"altGlyphDef\",\n  altglyphitem: \"altGlyphItem\",\n  animatecolor: \"animateColor\",\n  animatemotion: \"animateMotion\",\n  animatetransform: \"animateTransform\",\n  clippath: \"clipPath\",\n  feblend: \"feBlend\",\n  fecolormatrix: \"feColorMatrix\",\n  fecomponenttransfer: \"feComponentTransfer\",\n  fecomposite: \"feComposite\",\n  feconvolvematrix: \"feConvolveMatrix\",\n  fediffuselighting: \"feDiffuseLighting\",\n  fedisplacementmap: \"feDisplacementMap\",\n  fedistantlight: \"feDistantLight\",\n  fedropshadow: \"feDropShadow\",\n  feflood: \"feFlood\",\n  fefunca: \"feFuncA\",\n  fefuncb: \"feFuncB\",\n  fefuncg: \"feFuncG\",\n  fefuncr: \"feFuncR\",\n  fegaussianblur: \"feGaussianBlur\",\n  feimage: \"feImage\",\n  femerge: \"feMerge\",\n  femergenode: \"feMergeNode\",\n  femorphology: \"feMorphology\",\n  feoffset: \"feOffset\",\n  fepointlight: \"fePointLight\",\n  fespecularlighting: \"feSpecularLighting\",\n  fespotlight: \"feSpotLight\",\n  fetile: \"feTile\",\n  feturbulence: \"feTurbulence\",\n  foreignobject: \"foreignObject\",\n  glyphref: \"glyphRef\",\n  lineargradient: \"linearGradient\",\n  radialgradient: \"radialGradient\"\n};\nlet createdNodeSet = null;\nfunction diff(oldTree, newTree, replayer, rrnodeMirror = newTree.mirror || newTree.ownerDocument.mirror) {\n  oldTree = diffBeforeUpdatingChildren(\n    oldTree,\n    newTree,\n    replayer,\n    rrnodeMirror\n  );\n  diffChildren(oldTree, newTree, replayer, rrnodeMirror);\n  diffAfterUpdatingChildren(oldTree, newTree, replayer);\n}\nfunction diffBeforeUpdatingChildren(oldTree, newTree, replayer, rrnodeMirror) {\n  if (replayer.afterAppend && !createdNodeSet) {\n    createdNodeSet = /* @__PURE__ */ new WeakSet();\n    setTimeout(() => {\n      createdNodeSet = null;\n    }, 0);\n  }\n  if (!sameNodeType(oldTree, newTree)) {\n    const calibratedOldTree = createOrGetNode(\n      newTree,\n      replayer.mirror,\n      rrnodeMirror\n    );\n    oldTree.parentNode?.replaceChild(calibratedOldTree, oldTree);\n    oldTree = calibratedOldTree;\n  }\n  switch (newTree.RRNodeType) {\n    case NodeType$1.Document: {\n      if (!nodeMatching(oldTree, newTree, replayer.mirror, rrnodeMirror)) {\n        const newMeta = rrnodeMirror.getMeta(newTree);\n        if (newMeta) {\n          replayer.mirror.removeNodeFromMap(oldTree);\n          oldTree.close();\n          oldTree.open();\n          replayer.mirror.add(oldTree, newMeta);\n          createdNodeSet?.add(oldTree);\n        }\n      }\n      break;\n    }\n    case NodeType$1.Element: {\n      const oldElement = oldTree;\n      const newRRElement = newTree;\n      switch (newRRElement.tagName) {\n        case \"IFRAME\": {\n          const oldContentDocument = getIFrameContentDocument(\n            oldTree\n          );\n          if (!oldContentDocument) break;\n          diff(\n            oldContentDocument,\n            newTree.contentDocument,\n            replayer,\n            rrnodeMirror\n          );\n          break;\n        }\n      }\n      if (newRRElement.shadowRoot) {\n        if (!oldElement.shadowRoot) oldElement.attachShadow({ mode: \"open\" });\n        diffChildren(\n          // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n          oldElement.shadowRoot,\n          newRRElement.shadowRoot,\n          replayer,\n          rrnodeMirror\n        );\n      }\n      diffProps(oldElement, newRRElement, rrnodeMirror);\n      break;\n    }\n  }\n  return oldTree;\n}\nfunction diffAfterUpdatingChildren(oldTree, newTree, replayer) {\n  switch (newTree.RRNodeType) {\n    case NodeType$1.Document: {\n      const scrollData = newTree.scrollData;\n      scrollData && replayer.applyScroll(scrollData, true);\n      break;\n    }\n    case NodeType$1.Element: {\n      const oldElement = oldTree;\n      const newRRElement = newTree;\n      newRRElement.scrollData && replayer.applyScroll(newRRElement.scrollData, true);\n      newRRElement.inputData && replayer.applyInput(newRRElement.inputData);\n      switch (newRRElement.tagName) {\n        case \"AUDIO\":\n        case \"VIDEO\": {\n          const oldMediaElement = oldTree;\n          const newMediaRRElement = newRRElement;\n          if (newMediaRRElement.paused !== void 0) {\n            const maybePromise = newMediaRRElement.paused ? oldMediaElement.pause() : oldMediaElement.play();\n            if (typeof maybePromise?.catch === \"function\") {\n              maybePromise.catch((e2) => {\n                console.warn(e2);\n              });\n            }\n          }\n          if (newMediaRRElement.muted !== void 0)\n            oldMediaElement.muted = newMediaRRElement.muted;\n          if (newMediaRRElement.volume !== void 0)\n            oldMediaElement.volume = newMediaRRElement.volume;\n          if (newMediaRRElement.currentTime !== void 0)\n            oldMediaElement.currentTime = newMediaRRElement.currentTime;\n          if (newMediaRRElement.playbackRate !== void 0)\n            oldMediaElement.playbackRate = newMediaRRElement.playbackRate;\n          break;\n        }\n        case \"CANVAS\": {\n          const rrCanvasElement = newTree;\n          if (rrCanvasElement.rr_dataURL !== null) {\n            const image = document.createElement(\"img\");\n            image.onload = () => {\n              const ctx = oldElement.getContext(\"2d\");\n              if (ctx) {\n                ctx.drawImage(image, 0, 0, image.width, image.height);\n              }\n            };\n            image.src = rrCanvasElement.rr_dataURL;\n          }\n          rrCanvasElement.canvasMutations.forEach(\n            (canvasMutation2) => replayer.applyCanvas(\n              canvasMutation2.event,\n              canvasMutation2.mutation,\n              oldTree\n            )\n          );\n          break;\n        }\n        // Props of style elements have to be updated after all children are updated. Otherwise the props can be overwritten by textContent.\n        case \"STYLE\": {\n          const styleSheet = oldElement.sheet;\n          styleSheet && newTree.rules.forEach(\n            (data) => replayer.applyStyleSheetMutation(data, styleSheet)\n          );\n          break;\n        }\n      }\n      break;\n    }\n    case NodeType$1.Text:\n    case NodeType$1.Comment:\n    case NodeType$1.CDATA: {\n      if (oldTree.textContent !== newTree.data)\n        oldTree.textContent = newTree.data;\n      break;\n    }\n  }\n  if (createdNodeSet?.has(oldTree)) {\n    createdNodeSet.delete(oldTree);\n    replayer.afterAppend?.(oldTree, replayer.mirror.getId(oldTree));\n  }\n}\nfunction diffProps(oldTree, newTree, rrnodeMirror) {\n  const oldAttributes = oldTree.attributes;\n  const newAttributes = newTree.attributes;\n  for (const name in newAttributes) {\n    const newValue = newAttributes[name];\n    const sn = rrnodeMirror.getMeta(newTree);\n    if (sn?.isSVG && NAMESPACES[name])\n      oldTree.setAttributeNS(NAMESPACES[name], name, newValue);\n    else if (newTree.tagName === \"CANVAS\" && name === \"rr_dataURL\") {\n      const image = document.createElement(\"img\");\n      image.src = newValue;\n      image.onload = () => {\n        const ctx = oldTree.getContext(\"2d\");\n        if (ctx) {\n          ctx.drawImage(image, 0, 0, image.width, image.height);\n        }\n      };\n    } else if (newTree.tagName === \"IFRAME\" && name === \"srcdoc\") continue;\n    else {\n      try {\n        oldTree.setAttribute(name, newValue);\n      } catch (err) {\n        console.warn(err);\n      }\n    }\n  }\n  for (const { name } of Array.from(oldAttributes))\n    if (!(name in newAttributes)) oldTree.removeAttribute(name);\n  newTree.scrollLeft && (oldTree.scrollLeft = newTree.scrollLeft);\n  newTree.scrollTop && (oldTree.scrollTop = newTree.scrollTop);\n}\nfunction diffChildren(oldTree, newTree, replayer, rrnodeMirror) {\n  const oldChildren = Array.from(oldTree.childNodes);\n  const newChildren = newTree.childNodes;\n  if (oldChildren.length === 0 && newChildren.length === 0) return;\n  let oldStartIndex = 0, oldEndIndex = oldChildren.length - 1, newStartIndex = 0, newEndIndex = newChildren.length - 1;\n  let oldStartNode = oldChildren[oldStartIndex], oldEndNode = oldChildren[oldEndIndex], newStartNode = newChildren[newStartIndex], newEndNode = newChildren[newEndIndex];\n  let oldIdToIndex = void 0, indexInOld = void 0;\n  while (oldStartIndex <= oldEndIndex && newStartIndex <= newEndIndex) {\n    if (oldStartNode === void 0) {\n      oldStartNode = oldChildren[++oldStartIndex];\n    } else if (oldEndNode === void 0) {\n      oldEndNode = oldChildren[--oldEndIndex];\n    } else if (\n      // same first node?\n      nodeMatching(oldStartNode, newStartNode, replayer.mirror, rrnodeMirror)\n    ) {\n      oldStartNode = oldChildren[++oldStartIndex];\n      newStartNode = newChildren[++newStartIndex];\n    } else if (\n      // same last node?\n      nodeMatching(oldEndNode, newEndNode, replayer.mirror, rrnodeMirror)\n    ) {\n      oldEndNode = oldChildren[--oldEndIndex];\n      newEndNode = newChildren[--newEndIndex];\n    } else if (\n      // is the first old node the same as the last new node?\n      nodeMatching(oldStartNode, newEndNode, replayer.mirror, rrnodeMirror)\n    ) {\n      try {\n        handleInsertBefore(oldTree, oldStartNode, oldEndNode.nextSibling);\n      } catch (e2) {\n        console.warn(e2);\n      }\n      oldStartNode = oldChildren[++oldStartIndex];\n      newEndNode = newChildren[--newEndIndex];\n    } else if (\n      // is the last old node the same as the first new node?\n      nodeMatching(oldEndNode, newStartNode, replayer.mirror, rrnodeMirror)\n    ) {\n      try {\n        handleInsertBefore(oldTree, oldEndNode, oldStartNode);\n      } catch (e2) {\n        console.warn(e2);\n      }\n      oldEndNode = oldChildren[--oldEndIndex];\n      newStartNode = newChildren[++newStartIndex];\n    } else {\n      if (!oldIdToIndex) {\n        oldIdToIndex = {};\n        for (let i2 = oldStartIndex; i2 <= oldEndIndex; i2++) {\n          const oldChild2 = oldChildren[i2];\n          if (oldChild2 && replayer.mirror.hasNode(oldChild2))\n            oldIdToIndex[replayer.mirror.getId(oldChild2)] = i2;\n        }\n      }\n      indexInOld = oldIdToIndex[rrnodeMirror.getId(newStartNode)];\n      const nodeToMove = oldChildren[indexInOld];\n      if (indexInOld !== void 0 && nodeToMove && nodeMatching(nodeToMove, newStartNode, replayer.mirror, rrnodeMirror)) {\n        try {\n          handleInsertBefore(oldTree, nodeToMove, oldStartNode);\n        } catch (e2) {\n          console.warn(e2);\n        }\n        oldChildren[indexInOld] = void 0;\n      } else {\n        const newNode = createOrGetNode(\n          newStartNode,\n          replayer.mirror,\n          rrnodeMirror\n        );\n        if (oldTree.nodeName === \"#document\" && oldStartNode && /**\n        * Special case 1: one document isn't allowed to have two doctype nodes at the same time, so we need to remove the old one first before inserting the new one.\n        * How this case happens: A parent document in the old tree already has a doctype node with an id e.g. #1. A new full snapshot rebuilds the replayer with a new doctype node with another id #2. According to the algorithm, the new doctype node will be inserted before the old one, which is not allowed by the Document standard.\n        */\n        (newNode.nodeType === newNode.DOCUMENT_TYPE_NODE && oldStartNode.nodeType === oldStartNode.DOCUMENT_TYPE_NODE || /**\n        * Special case 2: one document isn't allowed to have two HTMLElements at the same time, so we need to remove the old one first before inserting the new one.\n        * How this case happens: A mounted iframe element has an automatically created HTML element. We should delete it before inserting a serialized one. Otherwise, an error 'Only one element on document allowed' will be thrown.\n        */\n        newNode.nodeType === newNode.ELEMENT_NODE && oldStartNode.nodeType === oldStartNode.ELEMENT_NODE)) {\n          oldTree.removeChild(oldStartNode);\n          replayer.mirror.removeNodeFromMap(oldStartNode);\n          oldStartNode = oldChildren[++oldStartIndex];\n        }\n        try {\n          handleInsertBefore(oldTree, newNode, oldStartNode || null);\n        } catch (e2) {\n          console.warn(e2);\n        }\n      }\n      newStartNode = newChildren[++newStartIndex];\n    }\n  }\n  if (oldStartIndex > oldEndIndex) {\n    const referenceRRNode = newChildren[newEndIndex + 1];\n    let referenceNode = null;\n    if (referenceRRNode)\n      referenceNode = replayer.mirror.getNode(\n        rrnodeMirror.getId(referenceRRNode)\n      );\n    for (; newStartIndex <= newEndIndex; ++newStartIndex) {\n      const newNode = createOrGetNode(\n        newChildren[newStartIndex],\n        replayer.mirror,\n        rrnodeMirror\n      );\n      try {\n        handleInsertBefore(oldTree, newNode, referenceNode);\n      } catch (e2) {\n        console.warn(e2);\n      }\n    }\n  } else if (newStartIndex > newEndIndex) {\n    for (; oldStartIndex <= oldEndIndex; oldStartIndex++) {\n      const node = oldChildren[oldStartIndex];\n      if (!node || node.parentNode !== oldTree) continue;\n      try {\n        oldTree.removeChild(node);\n        replayer.mirror.removeNodeFromMap(node);\n      } catch (e2) {\n        console.warn(e2);\n      }\n    }\n  }\n  let oldChild = oldTree.firstChild;\n  let newChild = newTree.firstChild;\n  while (oldChild !== null && newChild !== null) {\n    diff(oldChild, newChild, replayer, rrnodeMirror);\n    oldChild = oldChild.nextSibling;\n    newChild = newChild.nextSibling;\n  }\n}\nfunction createOrGetNode(rrNode, domMirror, rrnodeMirror) {\n  const nodeId = rrnodeMirror.getId(rrNode);\n  const sn = rrnodeMirror.getMeta(rrNode);\n  let node = null;\n  if (nodeId > -1) node = domMirror.getNode(nodeId);\n  if (node !== null && sameNodeType(node, rrNode)) return node;\n  switch (rrNode.RRNodeType) {\n    case NodeType$1.Document:\n      node = new Document();\n      break;\n    case NodeType$1.DocumentType:\n      node = document.implementation.createDocumentType(\n        rrNode.name,\n        rrNode.publicId,\n        rrNode.systemId\n      );\n      break;\n    case NodeType$1.Element: {\n      let tagName = rrNode.tagName.toLowerCase();\n      tagName = SVGTagMap[tagName] || tagName;\n      if (sn && \"isSVG\" in sn && sn?.isSVG) {\n        node = document.createElementNS(NAMESPACES[\"svg\"], tagName);\n      } else node = document.createElement(rrNode.tagName);\n      break;\n    }\n    case NodeType$1.Text:\n      node = document.createTextNode(rrNode.data);\n      break;\n    case NodeType$1.Comment:\n      node = document.createComment(rrNode.data);\n      break;\n    case NodeType$1.CDATA:\n      node = document.createCDATASection(rrNode.data);\n      break;\n  }\n  if (sn) domMirror.add(node, { ...sn });\n  try {\n    createdNodeSet?.add(node);\n  } catch (e2) {\n  }\n  return node;\n}\nfunction sameNodeType(node1, node2) {\n  if (node1.nodeType !== node2.nodeType) return false;\n  return node1.nodeType !== node1.ELEMENT_NODE || node1.tagName.toUpperCase() === node2.tagName;\n}\nfunction nodeMatching(node1, node2, domMirror, rrdomMirror) {\n  const node1Id = domMirror.getId(node1);\n  const node2Id = rrdomMirror.getId(node2);\n  if (node1Id === -1 || node1Id !== node2Id) return false;\n  return sameNodeType(node1, node2);\n}\nfunction getInsertedStylesFromElement(styleElement) {\n  const elementCssRules = styleElement.sheet?.cssRules;\n  if (!elementCssRules || !elementCssRules.length) return;\n  const tempStyleSheet = new CSSStyleSheet();\n  tempStyleSheet.replaceSync(styleElement.innerText);\n  const innerTextStylesMap = {};\n  for (let i2 = 0; i2 < tempStyleSheet.cssRules.length; i2++) {\n    innerTextStylesMap[tempStyleSheet.cssRules[i2].cssText] = tempStyleSheet.cssRules[i2];\n  }\n  const insertedStylesStyleSheet = [];\n  for (let i2 = 0; i2 < elementCssRules?.length; i2++) {\n    const cssRuleText = elementCssRules[i2].cssText;\n    if (!innerTextStylesMap[cssRuleText]) {\n      insertedStylesStyleSheet.push({\n        index: i2,\n        cssRuleText\n      });\n    }\n  }\n  return insertedStylesStyleSheet;\n}\nfunction handleInsertBefore(oldTree, nodeToMove, insertBeforeNode) {\n  let insertedStyles;\n  if (nodeToMove.nodeName === \"STYLE\") {\n    insertedStyles = getInsertedStylesFromElement(\n      nodeToMove\n    );\n  }\n  oldTree.insertBefore(nodeToMove, insertBeforeNode);\n  if (insertedStyles && insertedStyles.length) {\n    insertedStyles.forEach(({ cssRuleText, index }) => {\n      nodeToMove.sheet?.insertRule(cssRuleText, index);\n    });\n  }\n}\nclass RRDocument extends BaseRRDocument {\n  constructor(mirror2) {\n    super();\n    __publicField(this, \"UNSERIALIZED_STARTING_ID\", -2);\n    __publicField(this, \"_unserializedId\", this.UNSERIALIZED_STARTING_ID);\n    __publicField(this, \"mirror\", createMirror());\n    __publicField(this, \"scrollData\", null);\n    if (mirror2) {\n      this.mirror = mirror2;\n    }\n  }\n  /**\n   * Every time the id is used, it will minus 1 automatically to avoid collisions.\n   */\n  get unserializedId() {\n    return this._unserializedId--;\n  }\n  createDocument(_namespace, _qualifiedName, _doctype) {\n    return new RRDocument();\n  }\n  createDocumentType(qualifiedName, publicId, systemId) {\n    const documentTypeNode = new RRDocumentType(\n      qualifiedName,\n      publicId,\n      systemId\n    );\n    documentTypeNode.ownerDocument = this;\n    return documentTypeNode;\n  }\n  createElement(tagName) {\n    const upperTagName = tagName.toUpperCase();\n    let element;\n    switch (upperTagName) {\n      case \"AUDIO\":\n      case \"VIDEO\":\n        element = new RRMediaElement(upperTagName);\n        break;\n      case \"IFRAME\":\n        element = new RRIFrameElement(upperTagName, this.mirror);\n        break;\n      case \"CANVAS\":\n        element = new RRCanvasElement(upperTagName);\n        break;\n      case \"STYLE\":\n        element = new RRStyleElement(upperTagName);\n        break;\n      default:\n        element = new RRElement(upperTagName);\n        break;\n    }\n    element.ownerDocument = this;\n    return element;\n  }\n  createComment(data) {\n    const commentNode = new RRComment(data);\n    commentNode.ownerDocument = this;\n    return commentNode;\n  }\n  createCDATASection(data) {\n    const sectionNode = new RRCDATASection(data);\n    sectionNode.ownerDocument = this;\n    return sectionNode;\n  }\n  createTextNode(data) {\n    const textNode = new RRText(data);\n    textNode.ownerDocument = this;\n    return textNode;\n  }\n  destroyTree() {\n    this.firstChild = null;\n    this.lastChild = null;\n    this.mirror.reset();\n  }\n  open() {\n    super.open();\n    this._unserializedId = this.UNSERIALIZED_STARTING_ID;\n  }\n}\nconst RRDocumentType = BaseRRDocumentType;\nclass RRElement extends BaseRRElement {\n  constructor() {\n    super(...arguments);\n    __publicField(this, \"inputData\", null);\n    __publicField(this, \"scrollData\", null);\n  }\n}\nclass RRMediaElement extends BaseRRMediaElement {\n}\nclass RRCanvasElement extends RRElement {\n  constructor() {\n    super(...arguments);\n    __publicField(this, \"rr_dataURL\", null);\n    __publicField(this, \"canvasMutations\", []);\n  }\n  /**\n   * This is a dummy implementation to distinguish RRCanvasElement from real HTMLCanvasElement.\n   */\n  getContext() {\n    return null;\n  }\n}\nclass RRStyleElement extends RRElement {\n  constructor() {\n    super(...arguments);\n    __publicField(this, \"rules\", []);\n  }\n}\nclass RRIFrameElement extends RRElement {\n  constructor(upperTagName, mirror2) {\n    super(upperTagName);\n    __publicField(this, \"contentDocument\", new RRDocument());\n    this.contentDocument.mirror = mirror2;\n  }\n}\nconst RRText = BaseRRText;\nconst RRComment = BaseRRComment;\nconst RRCDATASection = BaseRRCDATASection;\nfunction getValidTagName(element) {\n  if (element instanceof HTMLFormElement) {\n    return \"FORM\";\n  }\n  return element.tagName.toUpperCase();\n}\nfunction buildFromNode(node, rrdom, domMirror, parentRRNode) {\n  let rrNode;\n  switch (node.nodeType) {\n    case NodeType.DOCUMENT_NODE:\n      if (parentRRNode && parentRRNode.nodeName === \"IFRAME\")\n        rrNode = parentRRNode.contentDocument;\n      else {\n        rrNode = rrdom;\n        rrNode.compatMode = node.compatMode;\n      }\n      break;\n    case NodeType.DOCUMENT_TYPE_NODE: {\n      const documentType = node;\n      rrNode = rrdom.createDocumentType(\n        documentType.name,\n        documentType.publicId,\n        documentType.systemId\n      );\n      break;\n    }\n    case NodeType.ELEMENT_NODE: {\n      const elementNode = node;\n      const tagName = getValidTagName(elementNode);\n      rrNode = rrdom.createElement(tagName);\n      const rrElement = rrNode;\n      for (const { name, value } of Array.from(elementNode.attributes)) {\n        rrElement.attributes[name] = value;\n      }\n      elementNode.scrollLeft && (rrElement.scrollLeft = elementNode.scrollLeft);\n      elementNode.scrollTop && (rrElement.scrollTop = elementNode.scrollTop);\n      break;\n    }\n    case NodeType.TEXT_NODE:\n      rrNode = rrdom.createTextNode(node.textContent || \"\");\n      break;\n    case NodeType.CDATA_SECTION_NODE:\n      rrNode = rrdom.createCDATASection(node.data);\n      break;\n    case NodeType.COMMENT_NODE:\n      rrNode = rrdom.createComment(node.textContent || \"\");\n      break;\n    // if node is a shadow root\n    case NodeType.DOCUMENT_FRAGMENT_NODE:\n      rrNode = parentRRNode.attachShadow({ mode: \"open\" });\n      break;\n    default:\n      return null;\n  }\n  let sn = domMirror.getMeta(node);\n  if (rrdom instanceof RRDocument) {\n    if (!sn) {\n      sn = getDefaultSN(rrNode, rrdom.unserializedId);\n      domMirror.add(node, sn);\n    }\n    rrdom.mirror.add(rrNode, { ...sn });\n  }\n  return rrNode;\n}\nfunction buildFromDom(dom, domMirror = createMirror$1(), rrdom = new RRDocument()) {\n  function walk2(node, parentRRNode) {\n    const rrNode = buildFromNode(node, rrdom, domMirror, parentRRNode);\n    if (rrNode === null) return;\n    if (\n      // if the parentRRNode isn't a RRIFrameElement\n      parentRRNode?.nodeName !== \"IFRAME\" && // if node isn't a shadow root\n      node.nodeType !== NodeType.DOCUMENT_FRAGMENT_NODE\n    ) {\n      parentRRNode?.appendChild(rrNode);\n      rrNode.parentNode = parentRRNode;\n      rrNode.parentElement = parentRRNode;\n    }\n    if (node.nodeName === \"IFRAME\") {\n      const iframeDoc = getIFrameContentDocument(node);\n      iframeDoc && walk2(iframeDoc, rrNode);\n    } else if (node.nodeType === NodeType.DOCUMENT_NODE || node.nodeType === NodeType.ELEMENT_NODE || node.nodeType === NodeType.DOCUMENT_FRAGMENT_NODE) {\n      if (node.nodeType === NodeType.ELEMENT_NODE && node.shadowRoot)\n        walk2(node.shadowRoot, rrNode);\n      node.childNodes.forEach((childNode) => walk2(childNode, rrNode));\n    }\n  }\n  walk2(dom, null);\n  return rrdom;\n}\nfunction createMirror() {\n  return new Mirror2();\n}\nclass Mirror2 {\n  constructor() {\n    __publicField(this, \"idNodeMap\", /* @__PURE__ */ new Map());\n    __publicField(this, \"nodeMetaMap\", /* @__PURE__ */ new WeakMap());\n  }\n  getId(n2) {\n    if (!n2) return -1;\n    const id = this.getMeta(n2)?.id;\n    return id ?? -1;\n  }\n  getNode(id) {\n    return this.idNodeMap.get(id) || null;\n  }\n  getIds() {\n    return Array.from(this.idNodeMap.keys());\n  }\n  getMeta(n2) {\n    return this.nodeMetaMap.get(n2) || null;\n  }\n  // removes the node from idNodeMap\n  // doesn't remove the node from nodeMetaMap\n  removeNodeFromMap(n2) {\n    const id = this.getId(n2);\n    this.idNodeMap.delete(id);\n    if (n2.childNodes) {\n      n2.childNodes.forEach((childNode) => this.removeNodeFromMap(childNode));\n    }\n  }\n  has(id) {\n    return this.idNodeMap.has(id);\n  }\n  hasNode(node) {\n    return this.nodeMetaMap.has(node);\n  }\n  add(n2, meta) {\n    const id = meta.id;\n    this.idNodeMap.set(id, n2);\n    this.nodeMetaMap.set(n2, meta);\n  }\n  replace(id, n2) {\n    const oldNode = this.getNode(id);\n    if (oldNode) {\n      const meta = this.nodeMetaMap.get(oldNode);\n      if (meta) this.nodeMetaMap.set(n2, meta);\n    }\n    this.idNodeMap.set(id, n2);\n  }\n  reset() {\n    this.idNodeMap = /* @__PURE__ */ new Map();\n    this.nodeMetaMap = /* @__PURE__ */ new WeakMap();\n  }\n}\nfunction getDefaultSN(node, id) {\n  switch (node.RRNodeType) {\n    case NodeType$1.Document:\n      return {\n        id,\n        type: node.RRNodeType,\n        childNodes: []\n      };\n    case NodeType$1.DocumentType: {\n      const doctype = node;\n      return {\n        id,\n        type: node.RRNodeType,\n        name: doctype.name,\n        publicId: doctype.publicId,\n        systemId: doctype.systemId\n      };\n    }\n    case NodeType$1.Element:\n      return {\n        id,\n        type: node.RRNodeType,\n        tagName: node.tagName.toLowerCase(),\n        // In rrweb data, all tagNames are lowercase.\n        attributes: {},\n        childNodes: []\n      };\n    case NodeType$1.Text:\n      return {\n        id,\n        type: node.RRNodeType,\n        textContent: node.textContent || \"\"\n      };\n    case NodeType$1.Comment:\n      return {\n        id,\n        type: node.RRNodeType,\n        textContent: node.textContent || \"\"\n      };\n    case NodeType$1.CDATA:\n      return {\n        id,\n        type: node.RRNodeType,\n        textContent: \"\"\n      };\n  }\n}\nclass StyleDeclarationParser {\n  constructor(doc) {\n    this.doc = doc;\n    this.unattachedDoc = null;\n  }\n  parse(styleText) {\n    return this.parseWithConstructableStylesheet(styleText) || this.parseWithDetachedElement(styleText);\n  }\n  parseWithConstructableStylesheet(styleText) {\n    if (typeof CSSStyleSheet === \"undefined\" || typeof CSSStyleSheet.prototype.replaceSync !== \"function\") {\n      return null;\n    }\n    try {\n      const sheet = new CSSStyleSheet();\n      sheet.replaceSync(`x { ${styleText} }`);\n      const rule = sheet.cssRules[0];\n      if (!rule || rule.type !== CSSRule.STYLE_RULE) {\n        return null;\n      }\n      return rule.style;\n    } catch {\n      return null;\n    }\n  }\n  parseWithDetachedElement(styleText) {\n    const old = this.getUnattachedDoc().createElement(\"span\");\n    old.setAttribute(\"style\", styleText);\n    return old.style;\n  }\n  getUnattachedDoc() {\n    if (!this.unattachedDoc) {\n      try {\n        this.unattachedDoc = document.implementation.createHTMLDocument();\n      } catch {\n        this.unattachedDoc = this.doc;\n      }\n    }\n    return this.unattachedDoc;\n  }\n}\nfunction isNodeInLinkedList(n2) {\n  return \"__ln\" in n2;\n}\nclass DoubleLinkedList {\n  constructor() {\n    this.length = 0;\n    this.head = null;\n    this.tail = null;\n  }\n  get(position) {\n    if (position >= this.length) {\n      throw new Error(\"Position outside of list range\");\n    }\n    let current = this.head;\n    for (let index = 0; index < position; index++) {\n      current = current?.next || null;\n    }\n    return current;\n  }\n  addNode(n2) {\n    const node = {\n      value: n2,\n      previous: null,\n      next: null\n    };\n    n2.__ln = node;\n    if (n2.previousSibling && isNodeInLinkedList(n2.previousSibling)) {\n      const current = n2.previousSibling.__ln.next;\n      node.next = current;\n      node.previous = n2.previousSibling.__ln;\n      n2.previousSibling.__ln.next = node;\n      if (current) {\n        current.previous = node;\n      }\n    } else if (n2.nextSibling && isNodeInLinkedList(n2.nextSibling) && n2.nextSibling.__ln.previous) {\n      const current = n2.nextSibling.__ln.previous;\n      node.previous = current;\n      node.next = n2.nextSibling.__ln;\n      n2.nextSibling.__ln.previous = node;\n      if (current) {\n        current.next = node;\n      }\n    } else {\n      if (this.head) {\n        this.head.previous = node;\n      }\n      node.next = this.head;\n      this.head = node;\n    }\n    if (node.next === null) {\n      this.tail = node;\n    }\n    this.length++;\n  }\n  removeNode(n2) {\n    const current = n2.__ln;\n    if (!this.head) {\n      return;\n    }\n    if (!current.previous) {\n      this.head = current.next;\n      if (this.head) {\n        this.head.previous = null;\n      } else {\n        this.tail = null;\n      }\n    } else {\n      current.previous.next = current.next;\n      if (current.next) {\n        current.next.previous = current.previous;\n      } else {\n        this.tail = current.previous;\n      }\n    }\n    if (n2.__ln) {\n      delete n2.__ln;\n    }\n    this.length--;\n  }\n}\nconst moveKey = (id, parentId) => `${id}@${parentId}`;\nclass MutationBuffer {\n  constructor() {\n    this.frozen = false;\n    this.locked = false;\n    this.texts = [];\n    this.attributes = [];\n    this.attributeMap = /* @__PURE__ */ new WeakMap();\n    this.removes = [];\n    this.mapRemoves = [];\n    this.movedMap = {};\n    this.addedSet = /* @__PURE__ */ new Set();\n    this.movedSet = /* @__PURE__ */ new Set();\n    this.droppedSet = /* @__PURE__ */ new Set();\n    this.processMutations = (mutations) => {\n      mutations.forEach(this.processMutation);\n      this.emit();\n    };\n    this.emit = () => {\n      if (this.frozen || this.locked) {\n        return;\n      }\n      const adds = [];\n      const addedIds = /* @__PURE__ */ new Set();\n      const addList = new DoubleLinkedList();\n      const getNextId = (n2) => {\n        let ns = n2;\n        let nextId = IGNORED_NODE;\n        while (nextId === IGNORED_NODE) {\n          ns = ns && ns.nextSibling;\n          nextId = ns && this.mirror.getId(ns);\n        }\n        return nextId;\n      };\n      const pushAdd = (n2) => {\n        if (!n2.parentNode || !inDom(n2)) {\n          return;\n        }\n        const parentId = isShadowRoot(n2.parentNode) ? this.mirror.getId(getShadowHost(n2)) : this.mirror.getId(n2.parentNode);\n        const nextId = getNextId(n2);\n        if (parentId === -1 || nextId === -1) {\n          return addList.addNode(n2);\n        }\n        const sn = serializeNodeWithId(n2, {\n          doc: this.doc,\n          mirror: this.mirror,\n          blockClass: this.blockClass,\n          blockSelector: this.blockSelector,\n          maskAllText: this.maskAllText,\n          unblockSelector: this.unblockSelector,\n          maskTextClass: this.maskTextClass,\n          unmaskTextClass: this.unmaskTextClass,\n          maskTextSelector: this.maskTextSelector,\n          unmaskTextSelector: this.unmaskTextSelector,\n          skipChild: true,\n          newlyAddedElement: true,\n          inlineStylesheet: this.inlineStylesheet,\n          maskInputOptions: this.maskInputOptions,\n          maskAttributeFn: this.maskAttributeFn,\n          maskTextFn: this.maskTextFn,\n          maskInputFn: this.maskInputFn,\n          slimDOMOptions: this.slimDOMOptions,\n          dataURLOptions: this.dataURLOptions,\n          recordCanvas: this.recordCanvas,\n          inlineImages: this.inlineImages,\n          onSerialize: (currentN) => {\n            if (isSerializedIframe(currentN, this.mirror) && !isBlocked(\n              currentN,\n              this.blockClass,\n              this.blockSelector,\n              this.unblockSelector,\n              false\n            )) {\n              this.iframeManager.addIframe(currentN);\n            }\n            if (isSerializedStylesheet(currentN, this.mirror)) {\n              this.stylesheetManager.trackLinkElement(\n                currentN\n              );\n            }\n            if (hasShadowRoot(n2)) {\n              this.shadowDomManager.addShadowRoot(n2.shadowRoot, this.doc);\n            }\n          },\n          onIframeLoad: (iframe, childSn) => {\n            if (isBlocked(\n              iframe,\n              this.blockClass,\n              this.blockSelector,\n              this.unblockSelector,\n              false\n            )) {\n              return;\n            }\n            this.iframeManager.attachIframe(iframe, childSn);\n            const contentWindow = getIFrameContentWindow(iframe);\n            if (contentWindow) {\n              this.canvasManager.addWindow(contentWindow);\n            }\n            this.shadowDomManager.observeAttachShadow(iframe);\n          },\n          onStylesheetLoad: (link, childSn) => {\n            this.stylesheetManager.attachLinkElement(link, childSn);\n          },\n          onBlockedImageLoad: (_imageEl, serializedNode, { width, height }) => {\n            this.mutationCb({\n              adds: [],\n              removes: [],\n              texts: [],\n              attributes: [\n                {\n                  id: serializedNode.id,\n                  attributes: {\n                    style: {\n                      width: `${width}px`,\n                      height: `${height}px`\n                    }\n                  }\n                }\n              ]\n            });\n          },\n          ignoreCSSAttributes: this.ignoreCSSAttributes\n        });\n        if (sn) {\n          adds.push({\n            parentId,\n            nextId,\n            node: sn\n          });\n          addedIds.add(sn.id);\n        }\n      };\n      while (this.mapRemoves.length) {\n        this.mirror.removeNodeFromMap(this.mapRemoves.shift());\n      }\n      for (const n2 of this.movedSet) {\n        if (isParentRemoved(this.removes, n2, this.mirror) && !this.movedSet.has(n2.parentNode)) {\n          continue;\n        }\n        pushAdd(n2);\n      }\n      for (const n2 of this.addedSet) {\n        if (!isAncestorInSet(this.droppedSet, n2) && !isParentRemoved(this.removes, n2, this.mirror)) {\n          pushAdd(n2);\n        } else if (isAncestorInSet(this.movedSet, n2)) {\n          pushAdd(n2);\n        } else {\n          this.droppedSet.add(n2);\n        }\n      }\n      let candidate = null;\n      while (addList.length) {\n        let node = null;\n        if (candidate) {\n          const parentId = this.mirror.getId(candidate.value.parentNode);\n          const nextId = getNextId(candidate.value);\n          if (parentId !== -1 && nextId !== -1) {\n            node = candidate;\n          }\n        }\n        if (!node) {\n          let tailNode = addList.tail;\n          while (tailNode) {\n            const _node = tailNode;\n            tailNode = tailNode.previous;\n            if (_node) {\n              const parentId = this.mirror.getId(_node.value.parentNode);\n              const nextId = getNextId(_node.value);\n              if (nextId === -1) continue;\n              else if (parentId !== -1) {\n                node = _node;\n                break;\n              } else {\n                const unhandledNode = _node.value;\n                if (unhandledNode.parentNode && unhandledNode.parentNode.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {\n                  const shadowHost = unhandledNode.parentNode.host;\n                  const parentId2 = this.mirror.getId(shadowHost);\n                  if (parentId2 !== -1) {\n                    node = _node;\n                    break;\n                  }\n                }\n              }\n            }\n          }\n        }\n        if (!node) {\n          while (addList.head) {\n            addList.removeNode(addList.head.value);\n          }\n          break;\n        }\n        candidate = node.previous;\n        addList.removeNode(node.value);\n        pushAdd(node.value);\n      }\n      const payload = {\n        texts: this.texts.map((text) => ({\n          id: this.mirror.getId(text.node),\n          value: text.value\n        })).filter((text) => !addedIds.has(text.id)).filter((text) => this.mirror.has(text.id)),\n        attributes: this.attributes.map((attribute) => {\n          const { attributes } = attribute;\n          if (typeof attributes.style === \"string\") {\n            const diffAsStr = JSON.stringify(attribute.styleDiff);\n            const unchangedAsStr = JSON.stringify(attribute._unchangedStyles);\n            if (diffAsStr.length < attributes.style.length) {\n              if ((diffAsStr + unchangedAsStr).split(\"var(\").length === attributes.style.split(\"var(\").length) {\n                attributes.style = attribute.styleDiff;\n              }\n            }\n          }\n          return {\n            id: this.mirror.getId(attribute.node),\n            attributes\n          };\n        }).filter((attribute) => !addedIds.has(attribute.id)).filter((attribute) => this.mirror.has(attribute.id)),\n        removes: this.removes,\n        adds\n      };\n      if (!payload.texts.length && !payload.attributes.length && !payload.removes.length && !payload.adds.length) {\n        return;\n      }\n      this.texts = [];\n      this.attributes = [];\n      this.attributeMap = /* @__PURE__ */ new WeakMap();\n      this.removes = [];\n      this.addedSet = /* @__PURE__ */ new Set();\n      this.movedSet = /* @__PURE__ */ new Set();\n      this.droppedSet = /* @__PURE__ */ new Set();\n      this.movedMap = {};\n      this.mutationCb(payload);\n    };\n    this.processMutation = (m) => {\n      if (isIgnored(m.target, this.mirror)) {\n        return;\n      }\n      switch (m.type) {\n        case \"characterData\": {\n          const value = m.target.textContent;\n          if (!isBlocked(\n            m.target,\n            this.blockClass,\n            this.blockSelector,\n            this.unblockSelector,\n            false\n          ) && value !== m.oldValue) {\n            this.texts.push({\n              value: needMaskingText(\n                m.target,\n                this.maskTextClass,\n                this.maskTextSelector,\n                this.unmaskTextClass,\n                this.unmaskTextSelector,\n                this.maskAllText\n              ) && value ? this.maskTextFn ? this.maskTextFn(value, closestElementOfNode(m.target)) : value.replace(/[\\S]/g, \"*\") : value,\n              node: m.target\n            });\n          }\n          break;\n        }\n        case \"attributes\": {\n          const target = m.target;\n          let attributeName = m.attributeName;\n          let value = m.target.getAttribute(attributeName);\n          if (attributeName === \"value\") {\n            const type = getInputType(target);\n            const tagName = target.tagName;\n            value = getInputValue(target, tagName, type);\n            const isInputMasked = shouldMaskInput({\n              maskInputOptions: this.maskInputOptions,\n              tagName,\n              type\n            });\n            const forceMask = needMaskingText(\n              m.target,\n              this.maskTextClass,\n              this.maskTextSelector,\n              this.unmaskTextClass,\n              this.unmaskTextSelector,\n              isInputMasked\n            );\n            value = maskInputValue({\n              isMasked: forceMask,\n              element: target,\n              value,\n              maskInputFn: this.maskInputFn\n            });\n          }\n          if (isBlocked(\n            m.target,\n            this.blockClass,\n            this.blockSelector,\n            this.unblockSelector,\n            false\n          ) || value === m.oldValue) {\n            return;\n          }\n          let item = this.attributeMap.get(m.target);\n          if (target.tagName === \"IFRAME\" && attributeName === \"src\" && !this.keepIframeSrcFn(value)) {\n            const iframeDoc = getIFrameContentDocument(\n              target\n            );\n            if (!iframeDoc) {\n              attributeName = \"rr_src\";\n            } else {\n              return;\n            }\n          }\n          if (!item) {\n            item = {\n              node: m.target,\n              attributes: {},\n              styleDiff: {},\n              _unchangedStyles: {}\n            };\n            this.attributes.push(item);\n            this.attributeMap.set(m.target, item);\n          }\n          if (attributeName === \"type\" && target.tagName === \"INPUT\" && (m.oldValue || \"\").toLowerCase() === \"password\") {\n            target.setAttribute(\"data-rr-is-password\", \"true\");\n          }\n          if (!ignoreAttribute(target.tagName, attributeName)) {\n            item.attributes[attributeName] = transformAttribute(\n              this.doc,\n              toLowerCase(target.tagName),\n              toLowerCase(attributeName),\n              value,\n              target,\n              this.maskAttributeFn\n            );\n            if (attributeName === \"style\") {\n              const oldStyle = m.oldValue ? this.styleDeclarationParser.parse(m.oldValue) : null;\n              for (const pname of Array.from(target.style)) {\n                const newValue = target.style.getPropertyValue(pname);\n                const newPriority = target.style.getPropertyPriority(pname);\n                if (newValue !== (oldStyle?.getPropertyValue(pname) || \"\") || newPriority !== (oldStyle?.getPropertyPriority(pname) || \"\")) {\n                  if (newPriority === \"\") {\n                    item.styleDiff[pname] = newValue;\n                  } else {\n                    item.styleDiff[pname] = [newValue, newPriority];\n                  }\n                } else {\n                  item._unchangedStyles[pname] = [newValue, newPriority];\n                }\n              }\n              if (oldStyle) {\n                for (const pname of Array.from(oldStyle)) {\n                  if (target.style.getPropertyValue(pname) === \"\") {\n                    item.styleDiff[pname] = false;\n                  }\n                }\n              }\n            }\n          }\n          break;\n        }\n        case \"childList\": {\n          if (isBlocked(\n            m.target,\n            this.blockClass,\n            this.blockSelector,\n            this.unblockSelector,\n            true\n          )) {\n            return;\n          }\n          m.addedNodes.forEach((n2) => this.genAdds(n2, m.target));\n          m.removedNodes.forEach((n2) => {\n            const nodeId = this.mirror.getId(n2);\n            const parentId = isShadowRoot(m.target) ? this.mirror.getId(m.target.host) : this.mirror.getId(m.target);\n            if (isBlocked(\n              m.target,\n              this.blockClass,\n              this.blockSelector,\n              this.unblockSelector,\n              false\n            ) || isIgnored(n2, this.mirror) || !isSerialized(n2, this.mirror)) {\n              return;\n            }\n            if (this.addedSet.has(n2)) {\n              deepDelete(this.addedSet, n2);\n              this.droppedSet.add(n2);\n            } else if (this.addedSet.has(m.target) && nodeId === -1) ;\n            else if (isAncestorRemoved(m.target, this.mirror)) ;\n            else if (this.movedSet.has(n2) && this.movedMap[moveKey(nodeId, parentId)]) {\n              deepDelete(this.movedSet, n2);\n            } else {\n              this.removes.push({\n                parentId,\n                id: nodeId,\n                isShadow: isShadowRoot(m.target) && isNativeShadowDom(m.target) ? true : void 0\n              });\n            }\n            this.mapRemoves.push(n2);\n          });\n          break;\n        }\n      }\n    };\n    this.genAdds = (n2, target) => {\n      if (this.processedNodeManager.inOtherBuffer(n2, this)) return;\n      if (this.addedSet.has(n2) || this.movedSet.has(n2)) return;\n      if (this.mirror.hasNode(n2)) {\n        if (isIgnored(n2, this.mirror)) {\n          return;\n        }\n        this.movedSet.add(n2);\n        let targetId = null;\n        if (target && this.mirror.hasNode(target)) {\n          targetId = this.mirror.getId(target);\n        }\n        if (targetId && targetId !== -1) {\n          this.movedMap[moveKey(this.mirror.getId(n2), targetId)] = true;\n        }\n      } else {\n        this.addedSet.add(n2);\n        this.droppedSet.delete(n2);\n      }\n      if (!isBlocked(\n        n2,\n        this.blockClass,\n        this.blockSelector,\n        this.unblockSelector,\n        false\n      )) {\n        if (n2.childNodes) {\n          n2.childNodes.forEach((childN) => this.genAdds(childN));\n        }\n        if (hasShadowRoot(n2)) {\n          n2.shadowRoot.childNodes.forEach((childN) => {\n            this.processedNodeManager.add(childN, this);\n            this.genAdds(childN, n2);\n          });\n        }\n      }\n    };\n  }\n  init(options) {\n    [\n      \"mutationCb\",\n      \"blockClass\",\n      \"blockSelector\",\n      \"unblockSelector\",\n      \"maskAllText\",\n      \"maskTextClass\",\n      \"unmaskTextClass\",\n      \"maskTextSelector\",\n      \"unmaskTextSelector\",\n      \"inlineStylesheet\",\n      \"maskInputOptions\",\n      \"maskAttributeFn\",\n      \"maskTextFn\",\n      \"maskInputFn\",\n      \"keepIframeSrcFn\",\n      \"recordCanvas\",\n      \"inlineImages\",\n      \"slimDOMOptions\",\n      \"dataURLOptions\",\n      \"doc\",\n      \"mirror\",\n      \"iframeManager\",\n      \"stylesheetManager\",\n      \"shadowDomManager\",\n      \"canvasManager\",\n      \"processedNodeManager\",\n      \"ignoreCSSAttributes\"\n    ].forEach((key) => {\n      this[key] = options[key];\n    });\n    this.styleDeclarationParser = new StyleDeclarationParser(this.doc);\n  }\n  freeze() {\n    this.frozen = true;\n    this.canvasManager.freeze();\n  }\n  unfreeze() {\n    this.frozen = false;\n    this.canvasManager.unfreeze();\n    this.emit();\n  }\n  isFrozen() {\n    return this.frozen;\n  }\n  lock() {\n    this.locked = true;\n    this.canvasManager.lock();\n  }\n  unlock() {\n    this.locked = false;\n    this.canvasManager.unlock();\n    this.emit();\n  }\n  reset() {\n    this.shadowDomManager.reset();\n    this.canvasManager.reset();\n  }\n}\nfunction deepDelete(addsSet, n2) {\n  addsSet.delete(n2);\n  n2.childNodes?.forEach((childN) => deepDelete(addsSet, childN));\n}\nfunction isParentRemoved(removes, n2, mirror2) {\n  if (removes.length === 0) return false;\n  return _isParentRemoved(removes, n2, mirror2);\n}\nfunction _isParentRemoved(removes, n2, mirror2) {\n  let node = n2.parentNode;\n  while (node) {\n    const parentId = mirror2.getId(node);\n    if (removes.some((r2) => r2.id === parentId)) {\n      return true;\n    }\n    node = node.parentNode;\n  }\n  return false;\n}\nfunction isAncestorInSet(set, n2) {\n  if (set.size === 0) return false;\n  return _isAncestorInSet(set, n2);\n}\nfunction _isAncestorInSet(set, n2) {\n  const { parentNode } = n2;\n  if (!parentNode) {\n    return false;\n  }\n  if (set.has(parentNode)) {\n    return true;\n  }\n  return _isAncestorInSet(set, parentNode);\n}\nconst mutationBuffers = [];\nfunction getEventTarget(event) {\n  try {\n    if (\"composedPath\" in event) {\n      const path = event.composedPath();\n      if (path.length) {\n        return path[0];\n      }\n    } else if (\"path\" in event && event.path.length) {\n      return event.path[0];\n    }\n  } catch {\n  }\n  return event && event.target;\n}\nfunction initMutationObserver(options, rootEl) {\n  const mutationBuffer = new MutationBuffer();\n  mutationBuffers.push(mutationBuffer);\n  mutationBuffer.init(options);\n  let mutationObserverCtor = window.MutationObserver || /**\n  * Some websites may disable MutationObserver by removing it from the window object.\n  * If someone is using rrweb to build a browser extention or things like it, they\n  * could not change the website's code but can have an opportunity to inject some\n  * code before the website executing its JS logic.\n  * Then they can do this to store the native MutationObserver:\n  * window.__rrMutationObserver = MutationObserver\n  */\n  window.__rrMutationObserver;\n  const angularZoneSymbol = window?.Zone?.__symbol__?.(\"MutationObserver\");\n  if (angularZoneSymbol && window[angularZoneSymbol]) {\n    mutationObserverCtor = window[angularZoneSymbol];\n  }\n  const observer = new mutationObserverCtor(\n    callbackWrapper((mutations) => {\n      if (options.onMutation && options.onMutation(mutations) === false) {\n        return;\n      }\n      mutationBuffer.processMutations.bind(mutationBuffer)(mutations);\n    })\n  );\n  observer.observe(rootEl, {\n    attributes: true,\n    attributeOldValue: true,\n    characterData: true,\n    characterDataOldValue: true,\n    childList: true,\n    subtree: true\n  });\n  return observer;\n}\nfunction initMoveObserver({\n  mousemoveCb,\n  sampling,\n  doc,\n  mirror: mirror2\n}) {\n  if (sampling.mousemove === false) {\n    return () => {\n    };\n  }\n  const threshold = typeof sampling.mousemove === \"number\" ? sampling.mousemove : 50;\n  const callbackThreshold = typeof sampling.mousemoveCallback === \"number\" ? sampling.mousemoveCallback : 500;\n  let positions = [];\n  let timeBaseline;\n  const wrappedCb = throttle(\n    callbackWrapper(\n      (source) => {\n        const totalOffset = Date.now() - timeBaseline;\n        mousemoveCb(\n          positions.map((p) => {\n            p.timeOffset -= totalOffset;\n            return p;\n          }),\n          source\n        );\n        positions = [];\n        timeBaseline = null;\n      }\n    ),\n    callbackThreshold\n  );\n  const updatePosition = callbackWrapper(\n    throttle(\n      callbackWrapper((evt) => {\n        const target = getEventTarget(evt);\n        const { clientX, clientY } = legacy_isTouchEvent(evt) ? evt.changedTouches[0] : evt;\n        if (!timeBaseline) {\n          timeBaseline = nowTimestamp();\n        }\n        positions.push({\n          x: clientX,\n          y: clientY,\n          id: mirror2.getId(target),\n          timeOffset: nowTimestamp() - timeBaseline\n        });\n        wrappedCb(\n          typeof DragEvent !== \"undefined\" && evt instanceof DragEvent ? IncrementalSource.Drag : evt instanceof MouseEvent ? IncrementalSource.MouseMove : IncrementalSource.TouchMove\n        );\n      }),\n      threshold,\n      {\n        trailing: false\n      }\n    )\n  );\n  const handlers = [\n    on(\"mousemove\", updatePosition, doc),\n    on(\"touchmove\", updatePosition, doc),\n    on(\"drag\", updatePosition, doc)\n  ];\n  return callbackWrapper(() => {\n    handlers.forEach((h) => h());\n  });\n}\nfunction initMouseInteractionObserver({\n  mouseInteractionCb,\n  doc,\n  mirror: mirror2,\n  blockClass,\n  blockSelector,\n  unblockSelector,\n  sampling\n}) {\n  if (sampling.mouseInteraction === false) {\n    return () => {\n    };\n  }\n  const disableMap = sampling.mouseInteraction === true || sampling.mouseInteraction === void 0 ? {} : sampling.mouseInteraction;\n  const handlers = [];\n  let currentPointerType = null;\n  const getHandler = (eventKey) => {\n    return (event) => {\n      const target = getEventTarget(event);\n      if (isBlocked(target, blockClass, blockSelector, unblockSelector, true)) {\n        return;\n      }\n      let pointerType = null;\n      let thisEventKey = eventKey;\n      if (\"pointerType\" in event) {\n        switch (event.pointerType) {\n          case \"mouse\":\n            pointerType = PointerTypes.Mouse;\n            break;\n          case \"touch\":\n            pointerType = PointerTypes.Touch;\n            break;\n          case \"pen\":\n            pointerType = PointerTypes.Pen;\n            break;\n        }\n        if (pointerType === PointerTypes.Touch) {\n          if (MouseInteractions[eventKey] === MouseInteractions.MouseDown) {\n            thisEventKey = \"TouchStart\";\n          } else if (MouseInteractions[eventKey] === MouseInteractions.MouseUp) {\n            thisEventKey = \"TouchEnd\";\n          }\n        } else if (pointerType === PointerTypes.Pen) ;\n      } else if (legacy_isTouchEvent(event)) {\n        pointerType = PointerTypes.Touch;\n      }\n      if (pointerType !== null) {\n        currentPointerType = pointerType;\n        if (thisEventKey.startsWith(\"Touch\") && pointerType === PointerTypes.Touch || thisEventKey.startsWith(\"Mouse\") && pointerType === PointerTypes.Mouse) {\n          pointerType = null;\n        }\n      } else if (MouseInteractions[eventKey] === MouseInteractions.Click) {\n        pointerType = currentPointerType;\n        currentPointerType = null;\n      }\n      const e2 = legacy_isTouchEvent(event) ? event.changedTouches[0] : event;\n      if (!e2) {\n        return;\n      }\n      const id = mirror2.getId(target);\n      const { clientX, clientY } = e2;\n      callbackWrapper(mouseInteractionCb)({\n        type: MouseInteractions[thisEventKey],\n        id,\n        x: clientX,\n        y: clientY,\n        ...pointerType !== null && { pointerType }\n      });\n    };\n  };\n  Object.keys(MouseInteractions).filter(\n    (key) => Number.isNaN(Number(key)) && !key.endsWith(\"_Departed\") && disableMap[key] !== false\n  ).forEach((eventKey) => {\n    let eventName = toLowerCase(eventKey);\n    const handler = getHandler(eventKey);\n    if (window.PointerEvent) {\n      switch (MouseInteractions[eventKey]) {\n        case MouseInteractions.MouseDown:\n        case MouseInteractions.MouseUp:\n          eventName = eventName.replace(\n            \"mouse\",\n            \"pointer\"\n          );\n          break;\n        case MouseInteractions.TouchStart:\n        case MouseInteractions.TouchEnd:\n          return;\n      }\n    }\n    handlers.push(on(eventName, handler, doc));\n  });\n  return callbackWrapper(() => {\n    handlers.forEach((h) => h());\n  });\n}\nfunction initScrollObserver({\n  scrollCb,\n  doc,\n  mirror: mirror2,\n  blockClass,\n  blockSelector,\n  unblockSelector,\n  sampling\n}) {\n  const updatePosition = callbackWrapper(\n    throttle(\n      callbackWrapper((evt) => {\n        const target = getEventTarget(evt);\n        if (!target || isBlocked(\n          target,\n          blockClass,\n          blockSelector,\n          unblockSelector,\n          true\n        )) {\n          return;\n        }\n        const id = mirror2.getId(target);\n        if (target === doc && doc.defaultView) {\n          const scrollLeftTop = getWindowScroll(doc.defaultView);\n          scrollCb({\n            id,\n            x: scrollLeftTop.left,\n            y: scrollLeftTop.top\n          });\n        } else {\n          scrollCb({\n            id,\n            x: target.scrollLeft,\n            y: target.scrollTop\n          });\n        }\n      }),\n      sampling.scroll || 100\n    )\n  );\n  return on(\"scroll\", updatePosition, doc);\n}\nfunction initViewportResizeObserver({ viewportResizeCb }, { win }) {\n  let lastH = -1;\n  let lastW = -1;\n  const updateDimension = callbackWrapper(\n    throttle(\n      callbackWrapper(() => {\n        const height = getWindowHeight();\n        const width = getWindowWidth();\n        if (lastH !== height || lastW !== width) {\n          viewportResizeCb({\n            width: Number(width),\n            height: Number(height)\n          });\n          lastH = height;\n          lastW = width;\n        }\n      }),\n      200\n    )\n  );\n  return on(\"resize\", updateDimension, win);\n}\nconst INPUT_TAGS = [\"INPUT\", \"TEXTAREA\", \"SELECT\"];\nconst lastInputValueMap = /* @__PURE__ */ new WeakMap();\nfunction initInputObserver({\n  inputCb,\n  doc,\n  mirror: mirror2,\n  blockClass,\n  blockSelector,\n  unblockSelector,\n  ignoreClass,\n  ignoreSelector,\n  maskInputOptions,\n  maskInputFn,\n  sampling,\n  userTriggeredOnInput,\n  maskTextClass,\n  unmaskTextClass,\n  maskTextSelector,\n  unmaskTextSelector\n}) {\n  function eventHandler(event) {\n    let target = getEventTarget(event);\n    const userTriggered = event.isTrusted;\n    const tagName = target && toUpperCase(target.tagName);\n    if (tagName === \"OPTION\") target = target.parentElement;\n    if (!target || !tagName || INPUT_TAGS.indexOf(tagName) < 0 || isBlocked(\n      target,\n      blockClass,\n      blockSelector,\n      unblockSelector,\n      true\n    )) {\n      return;\n    }\n    const el = target;\n    if (el.classList.contains(ignoreClass) || ignoreSelector && el.matches(ignoreSelector)) {\n      return;\n    }\n    const type = getInputType(target);\n    let text = getInputValue(el, tagName, type);\n    let isChecked = false;\n    const isInputMasked = shouldMaskInput({\n      maskInputOptions,\n      tagName,\n      type\n    });\n    const forceMask = needMaskingText(\n      target,\n      maskTextClass,\n      maskTextSelector,\n      unmaskTextClass,\n      unmaskTextSelector,\n      isInputMasked\n    );\n    if (type === \"radio\" || type === \"checkbox\") {\n      isChecked = target.checked;\n    }\n    text = maskInputValue({\n      isMasked: forceMask,\n      element: target,\n      value: text,\n      maskInputFn\n    });\n    cbWithDedup(\n      target,\n      userTriggeredOnInput ? { text, isChecked, userTriggered } : { text, isChecked }\n    );\n    const name = target.name;\n    if (type === \"radio\" && name && isChecked) {\n      doc.querySelectorAll(`input[type=\"radio\"][name=\"${name}\"]`).forEach((el2) => {\n        if (el2 !== target) {\n          const text2 = maskInputValue({\n            // share mask behavior of `target`\n            isMasked: forceMask,\n            element: el2,\n            value: getInputValue(el2, tagName, type),\n            maskInputFn\n          });\n          cbWithDedup(\n            el2,\n            userTriggeredOnInput ? { text: text2, isChecked: !isChecked, userTriggered: false } : { text: text2, isChecked: !isChecked }\n          );\n        }\n      });\n    }\n  }\n  function cbWithDedup(target, v2) {\n    const lastInputValue = lastInputValueMap.get(target);\n    if (!lastInputValue || lastInputValue.text !== v2.text || lastInputValue.isChecked !== v2.isChecked) {\n      lastInputValueMap.set(target, v2);\n      const id = mirror2.getId(target);\n      callbackWrapper(inputCb)({\n        ...v2,\n        id\n      });\n    }\n  }\n  const events = sampling.input === \"last\" ? [\"change\"] : [\"input\", \"change\"];\n  const handlers = events.map(\n    (eventName) => on(eventName, callbackWrapper(eventHandler), doc)\n  );\n  const currentWindow = doc.defaultView;\n  if (!currentWindow) {\n    return () => {\n      handlers.forEach((h) => h());\n    };\n  }\n  const propertyDescriptor = currentWindow.Object.getOwnPropertyDescriptor(\n    currentWindow.HTMLInputElement.prototype,\n    \"value\"\n  );\n  const hookProperties = [\n    [currentWindow.HTMLInputElement.prototype, \"value\"],\n    [currentWindow.HTMLInputElement.prototype, \"checked\"],\n    [currentWindow.HTMLSelectElement.prototype, \"value\"],\n    [currentWindow.HTMLTextAreaElement.prototype, \"value\"],\n    // Some UI library use selectedIndex to set select value\n    [currentWindow.HTMLSelectElement.prototype, \"selectedIndex\"],\n    [currentWindow.HTMLOptionElement.prototype, \"selected\"]\n  ];\n  if (propertyDescriptor && propertyDescriptor.set) {\n    handlers.push(\n      ...hookProperties.map(\n        (p) => hookSetter(\n          p[0],\n          p[1],\n          {\n            set() {\n              callbackWrapper(eventHandler)({\n                target: this,\n                isTrusted: false\n                // userTriggered to false as this could well be programmatic\n              });\n            }\n          },\n          false,\n          currentWindow\n        )\n      )\n    );\n  }\n  return callbackWrapper(() => {\n    handlers.forEach((h) => h());\n  });\n}\nfunction getNestedCSSRulePositions(rule) {\n  const positions = [];\n  function recurse(childRule, pos) {\n    if (hasNestedCSSRule(\"CSSGroupingRule\") && childRule.parentRule instanceof CSSGroupingRule || hasNestedCSSRule(\"CSSMediaRule\") && childRule.parentRule instanceof CSSMediaRule || hasNestedCSSRule(\"CSSSupportsRule\") && childRule.parentRule instanceof CSSSupportsRule || hasNestedCSSRule(\"CSSConditionRule\") && childRule.parentRule instanceof CSSConditionRule) {\n      const rules2 = Array.from(\n        childRule.parentRule.cssRules\n      );\n      const index = rules2.indexOf(childRule);\n      pos.unshift(index);\n    } else if (childRule.parentStyleSheet) {\n      const rules2 = Array.from(childRule.parentStyleSheet.cssRules);\n      const index = rules2.indexOf(childRule);\n      pos.unshift(index);\n    }\n    return pos;\n  }\n  return recurse(rule, positions);\n}\nfunction getIdAndStyleId(sheet, mirror2, styleMirror) {\n  let id, styleId;\n  if (!sheet) return {};\n  if (sheet.ownerNode) id = mirror2.getId(sheet.ownerNode);\n  else styleId = styleMirror.getId(sheet);\n  return {\n    styleId,\n    id\n  };\n}\nfunction initStyleSheetObserver({ styleSheetRuleCb, mirror: mirror2, stylesheetManager }, { win }) {\n  if (!win.CSSStyleSheet || !win.CSSStyleSheet.prototype) {\n    return () => {\n    };\n  }\n  const insertRule = win.CSSStyleSheet.prototype.insertRule;\n  win.CSSStyleSheet.prototype.insertRule = new Proxy(insertRule, {\n    apply: callbackWrapper(\n      (target, thisArg, argumentsList) => {\n        const [rule, index] = argumentsList;\n        const { id, styleId } = getIdAndStyleId(\n          thisArg,\n          mirror2,\n          stylesheetManager.styleMirror\n        );\n        if (id && id !== -1 || styleId && styleId !== -1) {\n          styleSheetRuleCb({\n            id,\n            styleId,\n            adds: [{ rule, index }]\n          });\n        }\n        return target.apply(thisArg, argumentsList);\n      }\n    )\n  });\n  const deleteRule = win.CSSStyleSheet.prototype.deleteRule;\n  win.CSSStyleSheet.prototype.deleteRule = new Proxy(deleteRule, {\n    apply: callbackWrapper(\n      (target, thisArg, argumentsList) => {\n        const [index] = argumentsList;\n        const { id, styleId } = getIdAndStyleId(\n          thisArg,\n          mirror2,\n          stylesheetManager.styleMirror\n        );\n        if (id && id !== -1 || styleId && styleId !== -1) {\n          styleSheetRuleCb({\n            id,\n            styleId,\n            removes: [{ index }]\n          });\n        }\n        return target.apply(thisArg, argumentsList);\n      }\n    )\n  });\n  let replace;\n  if (win.CSSStyleSheet.prototype.replace) {\n    replace = win.CSSStyleSheet.prototype.replace;\n    win.CSSStyleSheet.prototype.replace = new Proxy(replace, {\n      apply: callbackWrapper(\n        (target, thisArg, argumentsList) => {\n          const [text] = argumentsList;\n          const { id, styleId } = getIdAndStyleId(\n            thisArg,\n            mirror2,\n            stylesheetManager.styleMirror\n          );\n          if (id && id !== -1 || styleId && styleId !== -1) {\n            styleSheetRuleCb({\n              id,\n              styleId,\n              replace: text\n            });\n          }\n          return target.apply(thisArg, argumentsList);\n        }\n      )\n    });\n  }\n  let replaceSync;\n  if (win.CSSStyleSheet.prototype.replaceSync) {\n    replaceSync = win.CSSStyleSheet.prototype.replaceSync;\n    win.CSSStyleSheet.prototype.replaceSync = new Proxy(replaceSync, {\n      apply: callbackWrapper(\n        (target, thisArg, argumentsList) => {\n          const [text] = argumentsList;\n          const { id, styleId } = getIdAndStyleId(\n            thisArg,\n            mirror2,\n            stylesheetManager.styleMirror\n          );\n          if (id && id !== -1 || styleId && styleId !== -1) {\n            styleSheetRuleCb({\n              id,\n              styleId,\n              replaceSync: text\n            });\n          }\n          return target.apply(thisArg, argumentsList);\n        }\n      )\n    });\n  }\n  const supportedNestedCSSRuleTypes = {};\n  if (canMonkeyPatchNestedCSSRule(\"CSSGroupingRule\")) {\n    supportedNestedCSSRuleTypes.CSSGroupingRule = win.CSSGroupingRule;\n  } else {\n    if (canMonkeyPatchNestedCSSRule(\"CSSMediaRule\")) {\n      supportedNestedCSSRuleTypes.CSSMediaRule = win.CSSMediaRule;\n    }\n    if (canMonkeyPatchNestedCSSRule(\"CSSConditionRule\")) {\n      supportedNestedCSSRuleTypes.CSSConditionRule = win.CSSConditionRule;\n    }\n    if (canMonkeyPatchNestedCSSRule(\"CSSSupportsRule\")) {\n      supportedNestedCSSRuleTypes.CSSSupportsRule = win.CSSSupportsRule;\n    }\n  }\n  const unmodifiedFunctions = {};\n  Object.entries(supportedNestedCSSRuleTypes).forEach(([typeKey, type]) => {\n    unmodifiedFunctions[typeKey] = {\n      // eslint-disable-next-line @typescript-eslint/unbound-method\n      insertRule: type.prototype.insertRule,\n      // eslint-disable-next-line @typescript-eslint/unbound-method\n      deleteRule: type.prototype.deleteRule\n    };\n    type.prototype.insertRule = new Proxy(\n      unmodifiedFunctions[typeKey].insertRule,\n      {\n        apply: callbackWrapper(\n          (target, thisArg, argumentsList) => {\n            const [rule, index] = argumentsList;\n            const { id, styleId } = getIdAndStyleId(\n              thisArg.parentStyleSheet,\n              mirror2,\n              stylesheetManager.styleMirror\n            );\n            if (id && id !== -1 || styleId && styleId !== -1) {\n              styleSheetRuleCb({\n                id,\n                styleId,\n                adds: [\n                  {\n                    rule,\n                    index: [\n                      ...getNestedCSSRulePositions(thisArg),\n                      index || 0\n                      // defaults to 0\n                    ]\n                  }\n                ]\n              });\n            }\n            return target.apply(thisArg, argumentsList);\n          }\n        )\n      }\n    );\n    type.prototype.deleteRule = new Proxy(\n      unmodifiedFunctions[typeKey].deleteRule,\n      {\n        apply: callbackWrapper(\n          (target, thisArg, argumentsList) => {\n            const [index] = argumentsList;\n            const { id, styleId } = getIdAndStyleId(\n              thisArg.parentStyleSheet,\n              mirror2,\n              stylesheetManager.styleMirror\n            );\n            if (id && id !== -1 || styleId && styleId !== -1) {\n              styleSheetRuleCb({\n                id,\n                styleId,\n                removes: [\n                  { index: [...getNestedCSSRulePositions(thisArg), index] }\n                ]\n              });\n            }\n            return target.apply(thisArg, argumentsList);\n          }\n        )\n      }\n    );\n  });\n  return callbackWrapper(() => {\n    win.CSSStyleSheet.prototype.insertRule = insertRule;\n    win.CSSStyleSheet.prototype.deleteRule = deleteRule;\n    replace && (win.CSSStyleSheet.prototype.replace = replace);\n    replaceSync && (win.CSSStyleSheet.prototype.replaceSync = replaceSync);\n    Object.entries(supportedNestedCSSRuleTypes).forEach(([typeKey, type]) => {\n      type.prototype.insertRule = unmodifiedFunctions[typeKey].insertRule;\n      type.prototype.deleteRule = unmodifiedFunctions[typeKey].deleteRule;\n    });\n  });\n}\nfunction initAdoptedStyleSheetObserver({\n  mirror: mirror2,\n  stylesheetManager\n}, host) {\n  let hostId = null;\n  if (host.nodeName === \"#document\") hostId = mirror2.getId(host);\n  else hostId = mirror2.getId(host.host);\n  const patchTarget = host.nodeName === \"#document\" ? host.defaultView?.Document : host.ownerDocument?.defaultView?.ShadowRoot;\n  const originalPropertyDescriptor = patchTarget?.prototype ? Object.getOwnPropertyDescriptor(\n    patchTarget?.prototype,\n    \"adoptedStyleSheets\"\n  ) : void 0;\n  if (hostId === null || hostId === -1 || !patchTarget || !originalPropertyDescriptor)\n    return () => {\n    };\n  Object.defineProperty(host, \"adoptedStyleSheets\", {\n    configurable: originalPropertyDescriptor.configurable,\n    enumerable: originalPropertyDescriptor.enumerable,\n    get() {\n      return originalPropertyDescriptor.get?.call(this);\n    },\n    set(sheets) {\n      const result = originalPropertyDescriptor.set?.call(this, sheets);\n      if (hostId !== null && hostId !== -1) {\n        try {\n          stylesheetManager.adoptStyleSheets(sheets, hostId);\n        } catch (e2) {\n        }\n      }\n      return result;\n    }\n  });\n  return callbackWrapper(() => {\n    Object.defineProperty(host, \"adoptedStyleSheets\", {\n      configurable: originalPropertyDescriptor.configurable,\n      enumerable: originalPropertyDescriptor.enumerable,\n      // eslint-disable-next-line @typescript-eslint/unbound-method\n      get: originalPropertyDescriptor.get,\n      // eslint-disable-next-line @typescript-eslint/unbound-method\n      set: originalPropertyDescriptor.set\n    });\n  });\n}\nfunction initStyleDeclarationObserver({\n  styleDeclarationCb,\n  mirror: mirror2,\n  ignoreCSSAttributes,\n  stylesheetManager\n}, { win }) {\n  const setProperty = win.CSSStyleDeclaration.prototype.setProperty;\n  win.CSSStyleDeclaration.prototype.setProperty = new Proxy(setProperty, {\n    apply: callbackWrapper(\n      (target, thisArg, argumentsList) => {\n        const [property, value, priority] = argumentsList;\n        if (ignoreCSSAttributes.has(property)) {\n          return setProperty.apply(thisArg, [property, value, priority]);\n        }\n        const { id, styleId } = getIdAndStyleId(\n          thisArg.parentRule?.parentStyleSheet,\n          mirror2,\n          stylesheetManager.styleMirror\n        );\n        if (id && id !== -1 || styleId && styleId !== -1) {\n          styleDeclarationCb({\n            id,\n            styleId,\n            set: {\n              property,\n              value,\n              priority\n            },\n            // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n            index: getNestedCSSRulePositions(thisArg.parentRule)\n          });\n        }\n        return target.apply(thisArg, argumentsList);\n      }\n    )\n  });\n  const removeProperty = win.CSSStyleDeclaration.prototype.removeProperty;\n  win.CSSStyleDeclaration.prototype.removeProperty = new Proxy(removeProperty, {\n    apply: callbackWrapper(\n      (target, thisArg, argumentsList) => {\n        const [property] = argumentsList;\n        if (ignoreCSSAttributes.has(property)) {\n          return removeProperty.apply(thisArg, [property]);\n        }\n        const { id, styleId } = getIdAndStyleId(\n          thisArg.parentRule?.parentStyleSheet,\n          mirror2,\n          stylesheetManager.styleMirror\n        );\n        if (id && id !== -1 || styleId && styleId !== -1) {\n          styleDeclarationCb({\n            id,\n            styleId,\n            remove: {\n              property\n            },\n            // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n            index: getNestedCSSRulePositions(thisArg.parentRule)\n          });\n        }\n        return target.apply(thisArg, argumentsList);\n      }\n    )\n  });\n  return callbackWrapper(() => {\n    win.CSSStyleDeclaration.prototype.setProperty = setProperty;\n    win.CSSStyleDeclaration.prototype.removeProperty = removeProperty;\n  });\n}\nfunction initMediaInteractionObserver({\n  mediaInteractionCb,\n  blockClass,\n  blockSelector,\n  unblockSelector,\n  mirror: mirror2,\n  sampling,\n  doc\n}) {\n  const handler = callbackWrapper(\n    (type) => throttle(\n      callbackWrapper((event) => {\n        const target = getEventTarget(event);\n        if (!target || isBlocked(\n          target,\n          blockClass,\n          blockSelector,\n          unblockSelector,\n          true\n        )) {\n          return;\n        }\n        const { currentTime, volume, muted, playbackRate } = target;\n        mediaInteractionCb({\n          type,\n          id: mirror2.getId(target),\n          currentTime,\n          volume,\n          muted,\n          playbackRate\n        });\n      }),\n      sampling.media || 500\n    )\n  );\n  const handlers = [\n    on(\"play\", handler(MediaInteractions.Play), doc),\n    on(\"pause\", handler(MediaInteractions.Pause), doc),\n    on(\"seeked\", handler(MediaInteractions.Seeked), doc),\n    on(\"volumechange\", handler(MediaInteractions.VolumeChange), doc),\n    on(\"ratechange\", handler(MediaInteractions.RateChange), doc)\n  ];\n  return callbackWrapper(() => {\n    handlers.forEach((h) => h());\n  });\n}\nfunction initFontObserver({ fontCb, doc }) {\n  const win = doc.defaultView;\n  if (!win) {\n    return () => {\n    };\n  }\n  const handlers = [];\n  const fontMap = /* @__PURE__ */ new WeakMap();\n  const originalFontFace = win.FontFace;\n  win.FontFace = function FontFace2(family, source, descriptors) {\n    const fontFace = new originalFontFace(family, source, descriptors);\n    fontMap.set(fontFace, {\n      family,\n      buffer: typeof source !== \"string\",\n      descriptors,\n      fontSource: typeof source === \"string\" ? source : JSON.stringify(Array.from(new Uint8Array(source)))\n    });\n    return fontFace;\n  };\n  const restoreHandler = patch(\n    doc.fonts,\n    \"add\",\n    function(original) {\n      return function(fontFace) {\n        setTimeout$1(\n          callbackWrapper(() => {\n            const p = fontMap.get(fontFace);\n            if (p) {\n              fontCb(p);\n              fontMap.delete(fontFace);\n            }\n          }),\n          0\n        );\n        return original.apply(this, [fontFace]);\n      };\n    }\n  );\n  handlers.push(() => {\n    win.FontFace = originalFontFace;\n  });\n  handlers.push(restoreHandler);\n  return callbackWrapper(() => {\n    handlers.forEach((h) => h());\n  });\n}\nfunction initSelectionObserver(param) {\n  const {\n    doc,\n    mirror: mirror2,\n    blockClass,\n    blockSelector,\n    unblockSelector,\n    selectionCb\n  } = param;\n  let collapsed = true;\n  const updateSelection = callbackWrapper(() => {\n    const selection = doc.getSelection();\n    if (!selection || collapsed && selection?.isCollapsed) return;\n    collapsed = selection.isCollapsed || false;\n    const ranges = [];\n    const count = selection.rangeCount || 0;\n    for (let i2 = 0; i2 < count; i2++) {\n      const range = selection.getRangeAt(i2);\n      const { startContainer, startOffset, endContainer, endOffset } = range;\n      const blocked = isBlocked(\n        startContainer,\n        blockClass,\n        blockSelector,\n        unblockSelector,\n        true\n      ) || isBlocked(\n        endContainer,\n        blockClass,\n        blockSelector,\n        unblockSelector,\n        true\n      );\n      if (blocked) continue;\n      ranges.push({\n        start: mirror2.getId(startContainer),\n        startOffset,\n        end: mirror2.getId(endContainer),\n        endOffset\n      });\n    }\n    selectionCb({ ranges });\n  });\n  updateSelection();\n  return on(\"selectionchange\", updateSelection);\n}\nfunction initCustomElementObserver({\n  doc,\n  customElementCb\n}) {\n  const win = doc.defaultView;\n  if (!win || !win.customElements) return () => {\n  };\n  const restoreHandler = patch(\n    win.customElements,\n    \"define\",\n    function(original) {\n      return function(name, constructor, options) {\n        try {\n          customElementCb({\n            define: {\n              name\n            }\n          });\n        } catch (e2) {\n        }\n        return original.apply(this, [name, constructor, options]);\n      };\n    }\n  );\n  return restoreHandler;\n}\nfunction initObservers(o2, _hooks = {}) {\n  const currentWindow = o2.doc.defaultView;\n  if (!currentWindow) {\n    return () => {\n    };\n  }\n  let mutationObserver;\n  if (o2.recordDOM) {\n    mutationObserver = initMutationObserver(o2, o2.doc);\n  }\n  const mousemoveHandler = initMoveObserver(o2);\n  const mouseInteractionHandler = initMouseInteractionObserver(o2);\n  const scrollHandler = initScrollObserver(o2);\n  const viewportResizeHandler = initViewportResizeObserver(o2, {\n    win: currentWindow\n  });\n  const inputHandler = initInputObserver(o2);\n  const mediaInteractionHandler = initMediaInteractionObserver(o2);\n  let styleSheetObserver = () => {\n  };\n  let adoptedStyleSheetObserver = () => {\n  };\n  let styleDeclarationObserver = () => {\n  };\n  let fontObserver = () => {\n  };\n  if (o2.recordDOM) {\n    styleSheetObserver = initStyleSheetObserver(o2, { win: currentWindow });\n    adoptedStyleSheetObserver = initAdoptedStyleSheetObserver(o2, o2.doc);\n    styleDeclarationObserver = initStyleDeclarationObserver(o2, {\n      win: currentWindow\n    });\n    if (o2.collectFonts) {\n      fontObserver = initFontObserver(o2);\n    }\n  }\n  const selectionObserver = initSelectionObserver(o2);\n  const customElementObserver = initCustomElementObserver(o2);\n  const pluginHandlers = [];\n  for (const plugin of o2.plugins) {\n    pluginHandlers.push(\n      plugin.observer(plugin.callback, currentWindow, plugin.options)\n    );\n  }\n  return callbackWrapper(() => {\n    mutationBuffers.forEach((b) => b.reset());\n    mutationObserver?.disconnect();\n    mousemoveHandler();\n    mouseInteractionHandler();\n    scrollHandler();\n    viewportResizeHandler();\n    inputHandler();\n    mediaInteractionHandler();\n    styleSheetObserver();\n    adoptedStyleSheetObserver();\n    styleDeclarationObserver();\n    fontObserver();\n    selectionObserver();\n    customElementObserver();\n    pluginHandlers.forEach((h) => h());\n  });\n}\nfunction hasNestedCSSRule(prop) {\n  return typeof window[prop] !== \"undefined\";\n}\nfunction canMonkeyPatchNestedCSSRule(prop) {\n  return Boolean(\n    typeof window[prop] !== \"undefined\" && // Note: Generally, this check _shouldn't_ be necessary\n    // However, in some scenarios (e.g. jsdom) this can sometimes fail, so we check for it here\n    window[prop].prototype && \"insertRule\" in window[prop].prototype && \"deleteRule\" in window[prop].prototype\n  );\n}\nclass CrossOriginIframeMirror {\n  constructor(generateIdFn) {\n    this.generateIdFn = generateIdFn;\n    this.iframeIdToRemoteIdMap = /* @__PURE__ */ new WeakMap();\n    this.iframeRemoteIdToIdMap = /* @__PURE__ */ new WeakMap();\n  }\n  getId(iframe, remoteId, idToRemoteMap, remoteToIdMap) {\n    const idToRemoteIdMap = idToRemoteMap || this.getIdToRemoteIdMap(iframe);\n    const remoteIdToIdMap = remoteToIdMap || this.getRemoteIdToIdMap(iframe);\n    let id = idToRemoteIdMap.get(remoteId);\n    if (!id) {\n      id = this.generateIdFn();\n      idToRemoteIdMap.set(remoteId, id);\n      remoteIdToIdMap.set(id, remoteId);\n    }\n    return id;\n  }\n  getIds(iframe, remoteId) {\n    const idToRemoteIdMap = this.getIdToRemoteIdMap(iframe);\n    const remoteIdToIdMap = this.getRemoteIdToIdMap(iframe);\n    return remoteId.map(\n      (id) => this.getId(iframe, id, idToRemoteIdMap, remoteIdToIdMap)\n    );\n  }\n  getRemoteId(iframe, id, map) {\n    const remoteIdToIdMap = map || this.getRemoteIdToIdMap(iframe);\n    if (typeof id !== \"number\") return id;\n    const remoteId = remoteIdToIdMap.get(id);\n    if (!remoteId) return -1;\n    return remoteId;\n  }\n  getRemoteIds(iframe, ids) {\n    const remoteIdToIdMap = this.getRemoteIdToIdMap(iframe);\n    return ids.map((id) => this.getRemoteId(iframe, id, remoteIdToIdMap));\n  }\n  reset(iframe) {\n    if (!iframe) {\n      this.iframeIdToRemoteIdMap = /* @__PURE__ */ new WeakMap();\n      this.iframeRemoteIdToIdMap = /* @__PURE__ */ new WeakMap();\n      return;\n    }\n    this.iframeIdToRemoteIdMap.delete(iframe);\n    this.iframeRemoteIdToIdMap.delete(iframe);\n  }\n  getIdToRemoteIdMap(iframe) {\n    let idToRemoteIdMap = this.iframeIdToRemoteIdMap.get(iframe);\n    if (!idToRemoteIdMap) {\n      idToRemoteIdMap = /* @__PURE__ */ new Map();\n      this.iframeIdToRemoteIdMap.set(iframe, idToRemoteIdMap);\n    }\n    return idToRemoteIdMap;\n  }\n  getRemoteIdToIdMap(iframe) {\n    let remoteIdToIdMap = this.iframeRemoteIdToIdMap.get(iframe);\n    if (!remoteIdToIdMap) {\n      remoteIdToIdMap = /* @__PURE__ */ new Map();\n      this.iframeRemoteIdToIdMap.set(iframe, remoteIdToIdMap);\n    }\n    return remoteIdToIdMap;\n  }\n}\nclass IframeManagerNoop {\n  constructor() {\n    this.crossOriginIframeMirror = new CrossOriginIframeMirror(genId);\n    this.crossOriginIframeRootIdMap = /* @__PURE__ */ new WeakMap();\n  }\n  addIframe() {\n  }\n  addLoadListener() {\n  }\n  attachIframe() {\n  }\n}\nclass IframeManager {\n  constructor(options) {\n    this.iframes = /* @__PURE__ */ new WeakMap();\n    this.crossOriginIframeMap = /* @__PURE__ */ new WeakMap();\n    this.crossOriginIframeMirror = new CrossOriginIframeMirror(genId);\n    this.crossOriginIframeRootIdMap = /* @__PURE__ */ new WeakMap();\n    this.mutationCb = options.mutationCb;\n    this.wrappedEmit = options.wrappedEmit;\n    this.stylesheetManager = options.stylesheetManager;\n    this.recordCrossOriginIframes = options.recordCrossOriginIframes;\n    this.crossOriginIframeStyleMirror = new CrossOriginIframeMirror(\n      this.stylesheetManager.styleMirror.generateId.bind(\n        this.stylesheetManager.styleMirror\n      )\n    );\n    this.mirror = options.mirror;\n    if (this.recordCrossOriginIframes) {\n      window.addEventListener(\"message\", this.handleMessage.bind(this));\n    }\n  }\n  addIframe(iframeEl) {\n    this.iframes.set(iframeEl, true);\n    const contentWindow = getIFrameContentWindow(iframeEl);\n    if (contentWindow) this.crossOriginIframeMap.set(contentWindow, iframeEl);\n  }\n  addLoadListener(cb) {\n    this.loadListener = cb;\n  }\n  attachIframe(iframeEl, childSn) {\n    this.mutationCb({\n      adds: [\n        {\n          parentId: this.mirror.getId(iframeEl),\n          nextId: null,\n          node: childSn\n        }\n      ],\n      removes: [],\n      texts: [],\n      attributes: [],\n      isAttachIframe: true\n    });\n    if (this.recordCrossOriginIframes) {\n      getIFrameContentWindow(iframeEl)?.addEventListener(\n        \"message\",\n        this.handleMessage.bind(this)\n      );\n    }\n    this.loadListener?.(iframeEl);\n    const iframeDoc = getIFrameContentDocument(iframeEl);\n    if (iframeDoc && iframeDoc.adoptedStyleSheets && iframeDoc.adoptedStyleSheets.length > 0)\n      this.stylesheetManager.adoptStyleSheets(\n        iframeDoc.adoptedStyleSheets,\n        this.mirror.getId(iframeDoc)\n      );\n  }\n  handleMessage(message) {\n    const crossOriginMessageEvent = message;\n    if (crossOriginMessageEvent.data.type !== \"rrweb\" || // To filter out the rrweb messages which are forwarded by some sites.\n    crossOriginMessageEvent.origin !== crossOriginMessageEvent.data.origin)\n      return;\n    const iframeSourceWindow = message.source;\n    if (!iframeSourceWindow) return;\n    const iframeEl = this.crossOriginIframeMap.get(message.source);\n    if (!iframeEl) return;\n    const transformedEvent = this.transformCrossOriginEvent(\n      iframeEl,\n      crossOriginMessageEvent.data.event\n    );\n    if (transformedEvent)\n      this.wrappedEmit(\n        transformedEvent,\n        crossOriginMessageEvent.data.isCheckout\n      );\n  }\n  transformCrossOriginEvent(iframeEl, e2) {\n    switch (e2.type) {\n      case EventType.FullSnapshot: {\n        this.crossOriginIframeMirror.reset(iframeEl);\n        this.crossOriginIframeStyleMirror.reset(iframeEl);\n        this.replaceIdOnNode(e2.data.node, iframeEl);\n        const rootId = e2.data.node.id;\n        this.crossOriginIframeRootIdMap.set(iframeEl, rootId);\n        this.patchRootIdOnNode(e2.data.node, rootId);\n        return {\n          timestamp: e2.timestamp,\n          type: EventType.IncrementalSnapshot,\n          data: {\n            source: IncrementalSource.Mutation,\n            adds: [\n              {\n                parentId: this.mirror.getId(iframeEl),\n                nextId: null,\n                node: e2.data.node\n              }\n            ],\n            removes: [],\n            texts: [],\n            attributes: [],\n            isAttachIframe: true\n          }\n        };\n      }\n      case EventType.Meta:\n      case EventType.Load:\n      case EventType.DomContentLoaded: {\n        return false;\n      }\n      case EventType.Plugin: {\n        return e2;\n      }\n      case EventType.Custom: {\n        this.replaceIds(\n          e2.data.payload,\n          iframeEl,\n          [\"id\", \"parentId\", \"previousId\", \"nextId\"]\n        );\n        return e2;\n      }\n      case EventType.IncrementalSnapshot: {\n        switch (e2.data.source) {\n          case IncrementalSource.Mutation: {\n            e2.data.adds.forEach((n2) => {\n              this.replaceIds(n2, iframeEl, [\n                \"parentId\",\n                \"nextId\",\n                \"previousId\"\n              ]);\n              this.replaceIdOnNode(n2.node, iframeEl);\n              const rootId = this.crossOriginIframeRootIdMap.get(iframeEl);\n              rootId && this.patchRootIdOnNode(n2.node, rootId);\n            });\n            e2.data.removes.forEach((n2) => {\n              this.replaceIds(n2, iframeEl, [\"parentId\", \"id\"]);\n            });\n            e2.data.attributes.forEach((n2) => {\n              this.replaceIds(n2, iframeEl, [\"id\"]);\n            });\n            e2.data.texts.forEach((n2) => {\n              this.replaceIds(n2, iframeEl, [\"id\"]);\n            });\n            return e2;\n          }\n          case IncrementalSource.Drag:\n          case IncrementalSource.TouchMove:\n          case IncrementalSource.MouseMove: {\n            e2.data.positions.forEach((p) => {\n              this.replaceIds(p, iframeEl, [\"id\"]);\n            });\n            return e2;\n          }\n          case IncrementalSource.ViewportResize: {\n            return false;\n          }\n          case IncrementalSource.MediaInteraction:\n          case IncrementalSource.MouseInteraction:\n          case IncrementalSource.Scroll:\n          case IncrementalSource.CanvasMutation:\n          case IncrementalSource.Input: {\n            this.replaceIds(e2.data, iframeEl, [\"id\"]);\n            return e2;\n          }\n          case IncrementalSource.StyleSheetRule:\n          case IncrementalSource.StyleDeclaration: {\n            this.replaceIds(e2.data, iframeEl, [\"id\"]);\n            this.replaceStyleIds(e2.data, iframeEl, [\"styleId\"]);\n            return e2;\n          }\n          case IncrementalSource.Font: {\n            return e2;\n          }\n          case IncrementalSource.Selection: {\n            e2.data.ranges.forEach((range) => {\n              this.replaceIds(range, iframeEl, [\"start\", \"end\"]);\n            });\n            return e2;\n          }\n          case IncrementalSource.AdoptedStyleSheet: {\n            this.replaceIds(e2.data, iframeEl, [\"id\"]);\n            this.replaceStyleIds(e2.data, iframeEl, [\"styleIds\"]);\n            e2.data.styles?.forEach((style) => {\n              this.replaceStyleIds(style, iframeEl, [\"styleId\"]);\n            });\n            return e2;\n          }\n        }\n      }\n    }\n    return false;\n  }\n  replace(iframeMirror, obj, iframeEl, keys) {\n    for (const key of keys) {\n      if (!Array.isArray(obj[key]) && typeof obj[key] !== \"number\") continue;\n      if (Array.isArray(obj[key])) {\n        obj[key] = iframeMirror.getIds(\n          iframeEl,\n          obj[key]\n        );\n      } else {\n        obj[key] = iframeMirror.getId(iframeEl, obj[key]);\n      }\n    }\n    return obj;\n  }\n  replaceIds(obj, iframeEl, keys) {\n    return this.replace(this.crossOriginIframeMirror, obj, iframeEl, keys);\n  }\n  replaceStyleIds(obj, iframeEl, keys) {\n    return this.replace(this.crossOriginIframeStyleMirror, obj, iframeEl, keys);\n  }\n  replaceIdOnNode(node, iframeEl) {\n    this.replaceIds(node, iframeEl, [\"id\", \"rootId\"]);\n    if (\"childNodes\" in node) {\n      node.childNodes.forEach((child) => {\n        this.replaceIdOnNode(child, iframeEl);\n      });\n    }\n  }\n  patchRootIdOnNode(node, rootId) {\n    if (node.type !== NodeType$2.Document && !node.rootId) node.rootId = rootId;\n    if (\"childNodes\" in node) {\n      node.childNodes.forEach((child) => {\n        this.patchRootIdOnNode(child, rootId);\n      });\n    }\n  }\n}\nclass ShadowDomManagerNoop {\n  init() {\n  }\n  addShadowRoot() {\n  }\n  observeAttachShadow() {\n  }\n  reset() {\n  }\n}\nclass ShadowDomManager {\n  constructor(options) {\n    this.shadowDoms = /* @__PURE__ */ new WeakSet();\n    this.restoreHandlers = [];\n    this.mutationCb = options.mutationCb;\n    this.scrollCb = options.scrollCb;\n    this.bypassOptions = options.bypassOptions;\n    this.mirror = options.mirror;\n    this.init();\n  }\n  init() {\n    this.reset();\n    this.patchAttachShadow(Element, document);\n  }\n  addShadowRoot(shadowRoot, doc) {\n    if (!isNativeShadowDom(shadowRoot)) return;\n    if (this.shadowDoms.has(shadowRoot)) return;\n    this.shadowDoms.add(shadowRoot);\n    this.bypassOptions.canvasManager.addShadowRoot(shadowRoot);\n    const observer = initMutationObserver(\n      {\n        ...this.bypassOptions,\n        doc,\n        mutationCb: this.mutationCb,\n        mirror: this.mirror,\n        shadowDomManager: this\n      },\n      shadowRoot\n    );\n    this.restoreHandlers.push(() => observer.disconnect());\n    this.restoreHandlers.push(\n      initScrollObserver({\n        ...this.bypassOptions,\n        scrollCb: this.scrollCb,\n        // https://gist.github.com/praveenpuglia/0832da687ed5a5d7a0907046c9ef1813\n        // scroll is not allowed to pass the boundary, so we need to listen the shadow document\n        doc: shadowRoot,\n        mirror: this.mirror\n      })\n    );\n    setTimeout$1(() => {\n      if (shadowRoot.adoptedStyleSheets && shadowRoot.adoptedStyleSheets.length > 0)\n        this.bypassOptions.stylesheetManager.adoptStyleSheets(\n          shadowRoot.adoptedStyleSheets,\n          this.mirror.getId(shadowRoot.host)\n        );\n      this.restoreHandlers.push(\n        initAdoptedStyleSheetObserver(\n          {\n            mirror: this.mirror,\n            stylesheetManager: this.bypassOptions.stylesheetManager\n          },\n          shadowRoot\n        )\n      );\n    }, 0);\n  }\n  /**\n   * Monkey patch 'attachShadow' of an IFrameElement to observe newly added shadow doms.\n   */\n  observeAttachShadow(iframeElement) {\n    const iframeDoc = getIFrameContentDocument(iframeElement);\n    const iframeWindow = getIFrameContentWindow(iframeElement);\n    if (!iframeDoc || !iframeWindow) return;\n    this.patchAttachShadow(\n      iframeWindow.Element,\n      iframeDoc\n    );\n  }\n  /**\n   * Patch 'attachShadow' to observe newly added shadow doms.\n   */\n  patchAttachShadow(element, doc) {\n    const manager = this;\n    this.restoreHandlers.push(\n      patch(\n        element.prototype,\n        \"attachShadow\",\n        function(original) {\n          return function(option) {\n            const shadowRoot = original.call(this, option);\n            if (this.shadowRoot && inDom(this))\n              manager.addShadowRoot(this.shadowRoot, doc);\n            return shadowRoot;\n          };\n        }\n      )\n    );\n  }\n  reset() {\n    this.restoreHandlers.forEach((handler) => {\n      try {\n        handler();\n      } catch (e2) {\n      }\n    });\n    this.restoreHandlers = [];\n    this.shadowDoms = /* @__PURE__ */ new WeakSet();\n    this.bypassOptions.canvasManager.resetShadowRoots();\n  }\n}\nclass StylesheetManager {\n  constructor(options) {\n    this.trackedLinkElements = /* @__PURE__ */ new WeakSet();\n    this.styleMirror = new StyleSheetMirror();\n    this.mutationCb = options.mutationCb;\n    this.adoptedStyleSheetCb = options.adoptedStyleSheetCb;\n  }\n  attachLinkElement(linkEl, childSn) {\n    if (\"_cssText\" in childSn.attributes)\n      this.mutationCb({\n        adds: [],\n        removes: [],\n        texts: [],\n        attributes: [\n          {\n            id: childSn.id,\n            attributes: childSn.attributes\n          }\n        ]\n      });\n    this.trackLinkElement(linkEl);\n  }\n  trackLinkElement(linkEl) {\n    if (this.trackedLinkElements.has(linkEl)) return;\n    this.trackedLinkElements.add(linkEl);\n    this.trackStylesheetInLinkElement(linkEl);\n  }\n  adoptStyleSheets(sheets, hostId) {\n    if (sheets.length === 0) return;\n    const adoptedStyleSheetData = {\n      id: hostId,\n      styleIds: []\n    };\n    const styles = [];\n    for (const sheet of sheets) {\n      let styleId;\n      if (!this.styleMirror.has(sheet)) {\n        styleId = this.styleMirror.add(sheet);\n        styles.push({\n          styleId,\n          rules: Array.from(sheet.rules || CSSRule, (r2, index) => ({\n            rule: stringifyRule(r2),\n            index\n          }))\n        });\n      } else styleId = this.styleMirror.getId(sheet);\n      adoptedStyleSheetData.styleIds.push(styleId);\n    }\n    if (styles.length > 0) adoptedStyleSheetData.styles = styles;\n    this.adoptedStyleSheetCb(adoptedStyleSheetData);\n  }\n  reset() {\n    this.styleMirror.reset();\n    this.trackedLinkElements = /* @__PURE__ */ new WeakSet();\n  }\n  // TODO: take snapshot on stylesheet reload by applying event listener\n  trackStylesheetInLinkElement(_linkEl) {\n  }\n}\nclass ProcessedNodeManager {\n  constructor() {\n    this.nodeMap = /* @__PURE__ */ new WeakMap();\n    this.active = false;\n  }\n  inOtherBuffer(node, thisBuffer) {\n    const buffers = this.nodeMap.get(node);\n    return buffers && Array.from(buffers).some((buffer) => buffer !== thisBuffer);\n  }\n  add(node, buffer) {\n    if (!this.active) {\n      this.active = true;\n      onRequestAnimationFrame(() => {\n        this.nodeMap = /* @__PURE__ */ new WeakMap();\n        this.active = false;\n      });\n    }\n    this.nodeMap.set(node, (this.nodeMap.get(node) || /* @__PURE__ */ new Set()).add(buffer));\n  }\n  destroy() {\n  }\n}\nlet wrappedEmit;\nlet _wrappedEmit;\nlet _takeFullSnapshot;\ntry {\n  if (Array.from([1], (x) => x * 2)[0] !== 2) {\n    const cleanFrame = document.createElement(\"iframe\");\n    document.body.appendChild(cleanFrame);\n    Array.from = cleanFrame.contentWindow?.Array.from || Array.from;\n    document.body.removeChild(cleanFrame);\n  }\n} catch (err) {\n  console.debug(\"Unable to override Array.from\", err);\n}\nconst mirror = createMirror$2();\nfunction record(options = {}) {\n  const {\n    emit,\n    checkoutEveryNms,\n    checkoutEveryNth,\n    blockClass = \"rr-block\",\n    blockSelector = null,\n    unblockSelector = null,\n    ignoreClass = \"rr-ignore\",\n    ignoreSelector = null,\n    maskAllText = false,\n    maskTextClass = \"rr-mask\",\n    unmaskTextClass = null,\n    maskTextSelector = null,\n    unmaskTextSelector = null,\n    inlineStylesheet = true,\n    maskAllInputs,\n    maskInputOptions: _maskInputOptions,\n    slimDOMOptions: _slimDOMOptions,\n    maskAttributeFn,\n    maskInputFn,\n    maskTextFn,\n    maxCanvasSize = null,\n    packFn,\n    sampling = {},\n    dataURLOptions = {},\n    mousemoveWait,\n    recordDOM = true,\n    recordCanvas = false,\n    recordCrossOriginIframes = false,\n    recordAfter = options.recordAfter === \"DOMContentLoaded\" ? options.recordAfter : \"load\",\n    userTriggeredOnInput = false,\n    collectFonts = false,\n    inlineImages = false,\n    plugins,\n    keepIframeSrcFn = () => false,\n    ignoreCSSAttributes = /* @__PURE__ */ new Set([]),\n    errorHandler,\n    onMutation,\n    getCanvasManager\n  } = options;\n  registerErrorHandler(errorHandler);\n  const inEmittingFrame = recordCrossOriginIframes ? window.parent === window : true;\n  let passEmitsToParent = false;\n  if (!inEmittingFrame) {\n    try {\n      if (window.parent.document) {\n        passEmitsToParent = false;\n      }\n    } catch (e2) {\n      passEmitsToParent = true;\n    }\n  }\n  if (inEmittingFrame && !emit) {\n    throw new Error(\"emit function is required\");\n  }\n  if (!inEmittingFrame && !passEmitsToParent) {\n    return () => {\n    };\n  }\n  if (mousemoveWait !== void 0 && sampling.mousemove === void 0) {\n    sampling.mousemove = mousemoveWait;\n  }\n  mirror.reset();\n  const maskInputOptions = maskAllInputs === true ? {\n    color: true,\n    date: true,\n    \"datetime-local\": true,\n    email: true,\n    month: true,\n    number: true,\n    range: true,\n    search: true,\n    tel: true,\n    text: true,\n    time: true,\n    url: true,\n    week: true,\n    textarea: true,\n    select: true,\n    radio: true,\n    checkbox: true\n  } : _maskInputOptions !== void 0 ? _maskInputOptions : {};\n  const slimDOMOptions = _slimDOMOptions === true || _slimDOMOptions === \"all\" ? {\n    script: true,\n    comment: true,\n    headFavicon: true,\n    headWhitespace: true,\n    headMetaSocial: true,\n    headMetaRobots: true,\n    headMetaHttpEquiv: true,\n    headMetaVerification: true,\n    // the following are off for slimDOMOptions === true,\n    // as they destroy some (hidden) info:\n    headMetaAuthorship: _slimDOMOptions === \"all\",\n    headMetaDescKeywords: _slimDOMOptions === \"all\"\n  } : _slimDOMOptions ? _slimDOMOptions : {};\n  polyfill$1();\n  let lastFullSnapshotEvent;\n  let incrementalSnapshotCount = 0;\n  const eventProcessor = (e2) => {\n    for (const plugin of plugins || []) {\n      if (plugin.eventProcessor) {\n        e2 = plugin.eventProcessor(e2);\n      }\n    }\n    if (packFn && // Disable packing events which will be emitted to parent frames.\n    !passEmitsToParent) {\n      e2 = packFn(e2);\n    }\n    return e2;\n  };\n  wrappedEmit = (r2, isCheckout) => {\n    const e2 = r2;\n    e2.timestamp = nowTimestamp();\n    if (mutationBuffers[0]?.isFrozen() && e2.type !== EventType.FullSnapshot && !(e2.type === EventType.IncrementalSnapshot && e2.data.source === IncrementalSource.Mutation)) {\n      mutationBuffers.forEach((buf) => buf.unfreeze());\n    }\n    if (inEmittingFrame) {\n      emit?.(eventProcessor(e2), isCheckout);\n    } else if (passEmitsToParent) {\n      const message = {\n        type: \"rrweb\",\n        event: eventProcessor(e2),\n        origin: window.location.origin,\n        isCheckout\n      };\n      window.parent.postMessage(message, \"*\");\n    }\n    if (e2.type === EventType.FullSnapshot) {\n      lastFullSnapshotEvent = e2;\n      incrementalSnapshotCount = 0;\n    } else if (e2.type === EventType.IncrementalSnapshot) {\n      if (e2.data.source === IncrementalSource.Mutation && e2.data.isAttachIframe) {\n        return;\n      }\n      incrementalSnapshotCount++;\n      const exceedCount = checkoutEveryNth && incrementalSnapshotCount >= checkoutEveryNth;\n      const exceedTime = checkoutEveryNms && lastFullSnapshotEvent && e2.timestamp - lastFullSnapshotEvent.timestamp > checkoutEveryNms;\n      if (exceedCount || exceedTime) {\n        takeFullSnapshot2(true);\n      }\n    }\n  };\n  _wrappedEmit = wrappedEmit;\n  const wrappedMutationEmit = (m) => {\n    wrappedEmit({\n      type: EventType.IncrementalSnapshot,\n      data: {\n        source: IncrementalSource.Mutation,\n        ...m\n      }\n    });\n  };\n  const wrappedScrollEmit = (p) => wrappedEmit({\n    type: EventType.IncrementalSnapshot,\n    data: {\n      source: IncrementalSource.Scroll,\n      ...p\n    }\n  });\n  const wrappedCanvasMutationEmit = (p) => wrappedEmit({\n    type: EventType.IncrementalSnapshot,\n    data: {\n      source: IncrementalSource.CanvasMutation,\n      ...p\n    }\n  });\n  const wrappedAdoptedStyleSheetEmit = (a2) => wrappedEmit({\n    type: EventType.IncrementalSnapshot,\n    data: {\n      source: IncrementalSource.AdoptedStyleSheet,\n      ...a2\n    }\n  });\n  const stylesheetManager = new StylesheetManager({\n    mutationCb: wrappedMutationEmit,\n    adoptedStyleSheetCb: wrappedAdoptedStyleSheetEmit\n  });\n  const iframeManager = typeof __RRWEB_EXCLUDE_IFRAME__ === \"boolean\" && __RRWEB_EXCLUDE_IFRAME__ ? new IframeManagerNoop() : new IframeManager({\n    mirror,\n    mutationCb: wrappedMutationEmit,\n    stylesheetManager,\n    recordCrossOriginIframes,\n    wrappedEmit\n  });\n  for (const plugin of plugins || []) {\n    if (plugin.getMirror)\n      plugin.getMirror({\n        nodeMirror: mirror,\n        crossOriginIframeMirror: iframeManager.crossOriginIframeMirror,\n        crossOriginIframeStyleMirror: iframeManager.crossOriginIframeStyleMirror\n      });\n  }\n  const processedNodeManager = new ProcessedNodeManager();\n  const canvasManager = _getCanvasManager(\n    getCanvasManager,\n    {\n      mirror,\n      win: window,\n      mutationCb: (p) => wrappedEmit({\n        type: EventType.IncrementalSnapshot,\n        data: {\n          source: IncrementalSource.CanvasMutation,\n          ...p\n        }\n      }),\n      recordCanvas,\n      blockClass,\n      blockSelector,\n      unblockSelector,\n      maxCanvasSize,\n      sampling: sampling[\"canvas\"],\n      dataURLOptions,\n      errorHandler\n    }\n  );\n  const shadowDomManager = typeof __RRWEB_EXCLUDE_SHADOW_DOM__ === \"boolean\" && __RRWEB_EXCLUDE_SHADOW_DOM__ ? new ShadowDomManagerNoop() : new ShadowDomManager({\n    mutationCb: wrappedMutationEmit,\n    scrollCb: wrappedScrollEmit,\n    bypassOptions: {\n      onMutation,\n      blockClass,\n      blockSelector,\n      unblockSelector,\n      maskAllText,\n      maskTextClass,\n      unmaskTextClass,\n      maskTextSelector,\n      unmaskTextSelector,\n      inlineStylesheet,\n      maskInputOptions,\n      dataURLOptions,\n      maskAttributeFn,\n      maskTextFn,\n      maskInputFn,\n      recordCanvas,\n      inlineImages,\n      sampling,\n      slimDOMOptions,\n      iframeManager,\n      stylesheetManager,\n      canvasManager,\n      keepIframeSrcFn,\n      processedNodeManager,\n      ignoreCSSAttributes\n    },\n    mirror\n  });\n  const takeFullSnapshot2 = (isCheckout = false) => {\n    if (!recordDOM) {\n      return;\n    }\n    wrappedEmit(\n      {\n        type: EventType.Meta,\n        data: {\n          href: window.location.href,\n          width: getWindowWidth(),\n          height: getWindowHeight()\n        }\n      },\n      isCheckout\n    );\n    stylesheetManager.reset();\n    shadowDomManager.init();\n    mutationBuffers.forEach((buf) => buf.lock());\n    const node = snapshot(document, {\n      mirror,\n      blockClass,\n      blockSelector,\n      unblockSelector,\n      maskAllText,\n      maskTextClass,\n      unmaskTextClass,\n      maskTextSelector,\n      unmaskTextSelector,\n      inlineStylesheet,\n      maskAllInputs: maskInputOptions,\n      maskAttributeFn,\n      maskInputFn,\n      maskTextFn,\n      slimDOM: slimDOMOptions,\n      dataURLOptions,\n      recordCanvas,\n      inlineImages,\n      onSerialize: (n2) => {\n        if (isSerializedIframe(n2, mirror)) {\n          iframeManager.addIframe(n2);\n        }\n        if (isSerializedStylesheet(n2, mirror)) {\n          stylesheetManager.trackLinkElement(n2);\n        }\n        if (hasShadowRoot(n2)) {\n          shadowDomManager.addShadowRoot(n2.shadowRoot, document);\n        }\n      },\n      onIframeLoad: (iframe, childSn) => {\n        iframeManager.attachIframe(iframe, childSn);\n        const contentWindow = getIFrameContentWindow(iframe);\n        if (contentWindow) {\n          canvasManager.addWindow(contentWindow);\n        }\n        shadowDomManager.observeAttachShadow(iframe);\n      },\n      onStylesheetLoad: (linkEl, childSn) => {\n        stylesheetManager.attachLinkElement(linkEl, childSn);\n      },\n      onBlockedImageLoad: (_imageEl, serializedNode, { width, height }) => {\n        wrappedMutationEmit({\n          adds: [],\n          removes: [],\n          texts: [],\n          attributes: [\n            {\n              id: serializedNode.id,\n              attributes: {\n                style: {\n                  width: `${width}px`,\n                  height: `${height}px`\n                }\n              }\n            }\n          ]\n        });\n      },\n      keepIframeSrcFn,\n      ignoreCSSAttributes\n    });\n    if (!node) {\n      return console.warn(\"Failed to snapshot the document\");\n    }\n    wrappedEmit({\n      type: EventType.FullSnapshot,\n      data: {\n        node,\n        initialOffset: getWindowScroll(window)\n      }\n    });\n    mutationBuffers.forEach((buf) => buf.unlock());\n    if (document.adoptedStyleSheets && document.adoptedStyleSheets.length > 0)\n      stylesheetManager.adoptStyleSheets(\n        document.adoptedStyleSheets,\n        mirror.getId(document)\n      );\n  };\n  _takeFullSnapshot = takeFullSnapshot2;\n  try {\n    const handlers = [];\n    const observe = (doc) => {\n      return callbackWrapper(initObservers)(\n        {\n          onMutation,\n          mutationCb: wrappedMutationEmit,\n          mousemoveCb: (positions, source) => wrappedEmit({\n            type: EventType.IncrementalSnapshot,\n            data: {\n              source,\n              positions\n            }\n          }),\n          mouseInteractionCb: (d) => wrappedEmit({\n            type: EventType.IncrementalSnapshot,\n            data: {\n              source: IncrementalSource.MouseInteraction,\n              ...d\n            }\n          }),\n          scrollCb: wrappedScrollEmit,\n          viewportResizeCb: (d) => wrappedEmit({\n            type: EventType.IncrementalSnapshot,\n            data: {\n              source: IncrementalSource.ViewportResize,\n              ...d\n            }\n          }),\n          inputCb: (v2) => wrappedEmit({\n            type: EventType.IncrementalSnapshot,\n            data: {\n              source: IncrementalSource.Input,\n              ...v2\n            }\n          }),\n          mediaInteractionCb: (p) => wrappedEmit({\n            type: EventType.IncrementalSnapshot,\n            data: {\n              source: IncrementalSource.MediaInteraction,\n              ...p\n            }\n          }),\n          styleSheetRuleCb: (r2) => wrappedEmit({\n            type: EventType.IncrementalSnapshot,\n            data: {\n              source: IncrementalSource.StyleSheetRule,\n              ...r2\n            }\n          }),\n          styleDeclarationCb: (r2) => wrappedEmit({\n            type: EventType.IncrementalSnapshot,\n            data: {\n              source: IncrementalSource.StyleDeclaration,\n              ...r2\n            }\n          }),\n          canvasMutationCb: wrappedCanvasMutationEmit,\n          fontCb: (p) => wrappedEmit({\n            type: EventType.IncrementalSnapshot,\n            data: {\n              source: IncrementalSource.Font,\n              ...p\n            }\n          }),\n          selectionCb: (p) => {\n            wrappedEmit({\n              type: EventType.IncrementalSnapshot,\n              data: {\n                source: IncrementalSource.Selection,\n                ...p\n              }\n            });\n          },\n          customElementCb: (c2) => {\n            wrappedEmit({\n              type: EventType.IncrementalSnapshot,\n              data: {\n                source: IncrementalSource.CustomElement,\n                ...c2\n              }\n            });\n          },\n          blockClass,\n          ignoreClass,\n          ignoreSelector,\n          maskAllText,\n          maskTextClass,\n          unmaskTextClass,\n          maskTextSelector,\n          unmaskTextSelector,\n          maskInputOptions,\n          inlineStylesheet,\n          sampling,\n          recordDOM,\n          recordCanvas,\n          inlineImages,\n          userTriggeredOnInput,\n          collectFonts,\n          doc,\n          maskAttributeFn,\n          maskInputFn,\n          maskTextFn,\n          keepIframeSrcFn,\n          blockSelector,\n          unblockSelector,\n          slimDOMOptions,\n          dataURLOptions,\n          mirror,\n          iframeManager,\n          stylesheetManager,\n          shadowDomManager,\n          processedNodeManager,\n          canvasManager,\n          ignoreCSSAttributes,\n          plugins: plugins?.filter((p) => p.observer)?.map((p) => ({\n            observer: p.observer,\n            options: p.options,\n            callback: (payload) => wrappedEmit({\n              type: EventType.Plugin,\n              data: {\n                plugin: p.name,\n                payload\n              }\n            })\n          })) || []\n        },\n        {}\n      );\n    };\n    iframeManager.addLoadListener((iframeEl) => {\n      try {\n        handlers.push(observe(iframeEl.contentDocument));\n      } catch (error) {\n        console.warn(error);\n      }\n    });\n    const init = () => {\n      takeFullSnapshot2();\n      handlers.push(observe(document));\n    };\n    if (document.readyState === \"interactive\" || document.readyState === \"complete\") {\n      init();\n    } else {\n      handlers.push(\n        on(\"DOMContentLoaded\", () => {\n          wrappedEmit({\n            type: EventType.DomContentLoaded,\n            data: {}\n          });\n          if (recordAfter === \"DOMContentLoaded\") init();\n        })\n      );\n      handlers.push(\n        on(\n          \"load\",\n          () => {\n            wrappedEmit({\n              type: EventType.Load,\n              data: {}\n            });\n            if (recordAfter === \"load\") init();\n          },\n          window\n        )\n      );\n    }\n    return () => {\n      handlers.forEach((h) => h());\n      processedNodeManager.destroy();\n      _takeFullSnapshot = void 0;\n      unregisterErrorHandler();\n    };\n  } catch (error) {\n    console.warn(error);\n  }\n}\nfunction addCustomEvent(tag, payload) {\n  if (!_wrappedEmit) {\n    throw new Error(\"please add custom event after start recording\");\n  }\n  wrappedEmit({\n    type: EventType.Custom,\n    data: {\n      tag,\n      payload\n    }\n  });\n}\nfunction freezePage() {\n  mutationBuffers.forEach((buf) => buf.freeze());\n}\nfunction takeFullSnapshot(isCheckout) {\n  if (!_takeFullSnapshot) {\n    throw new Error(\"please take full snapshot after start recording\");\n  }\n  _takeFullSnapshot(isCheckout);\n}\nrecord.mirror = mirror;\nrecord.takeFullSnapshot = takeFullSnapshot;\nfunction _getCanvasManager(getCanvasManagerFn, options) {\n  try {\n    return getCanvasManagerFn ? getCanvasManagerFn(options) : new CanvasManagerNoop();\n  } catch {\n    console.warn(\"Unable to initialize CanvasManager\");\n    return new CanvasManagerNoop();\n  }\n}\nfunction mitt$1(n2) {\n  return { all: n2 = n2 || /* @__PURE__ */ new Map(), on: function(t2, e2) {\n    var i2 = n2.get(t2);\n    i2 ? i2.push(e2) : n2.set(t2, [e2]);\n  }, off: function(t2, e2) {\n    var i2 = n2.get(t2);\n    i2 && (e2 ? i2.splice(i2.indexOf(e2) >>> 0, 1) : n2.set(t2, []));\n  }, emit: function(t2, e2) {\n    var i2 = n2.get(t2);\n    i2 && i2.slice().map(function(n3) {\n      n3(e2);\n    }), (i2 = n2.get(\"*\")) && i2.slice().map(function(n3) {\n      n3(t2, e2);\n    });\n  } };\n}\nconst mittProxy = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({\n  __proto__: null,\n  default: mitt$1\n}, Symbol.toStringTag, { value: \"Module\" }));\nfunction polyfill(w = window, d = document) {\n  if (\"scrollBehavior\" in d.documentElement.style && w.__forceSmoothScrollPolyfill__ !== true) {\n    return;\n  }\n  const Element2 = w.HTMLElement || w.Element;\n  const SCROLL_TIME = 468;\n  const original = {\n    scroll: w.scroll || w.scrollTo,\n    scrollBy: w.scrollBy,\n    elementScroll: Element2.prototype.scroll || scrollElement,\n    scrollIntoView: Element2.prototype.scrollIntoView\n  };\n  const now = w.performance && w.performance.now ? w.performance.now.bind(w.performance) : Date.now;\n  function isMicrosoftBrowser(userAgent) {\n    const userAgentPatterns = [\"MSIE \", \"Trident/\", \"Edge/\"];\n    return new RegExp(userAgentPatterns.join(\"|\")).test(userAgent);\n  }\n  const ROUNDING_TOLERANCE = isMicrosoftBrowser(w.navigator.userAgent) ? 1 : 0;\n  function scrollElement(x, y) {\n    this.scrollLeft = x;\n    this.scrollTop = y;\n  }\n  function ease(k) {\n    return 0.5 * (1 - Math.cos(Math.PI * k));\n  }\n  function shouldBailOut(firstArg) {\n    if (firstArg === null || typeof firstArg !== \"object\" || firstArg.behavior === void 0 || firstArg.behavior === \"auto\" || firstArg.behavior === \"instant\") {\n      return true;\n    }\n    if (typeof firstArg === \"object\" && firstArg.behavior === \"smooth\") {\n      return false;\n    }\n    throw new TypeError(\n      \"behavior member of ScrollOptions \" + firstArg.behavior + \" is not a valid value for enumeration ScrollBehavior.\"\n    );\n  }\n  function hasScrollableSpace(el, axis) {\n    if (axis === \"Y\") {\n      return el.clientHeight + ROUNDING_TOLERANCE < el.scrollHeight;\n    }\n    if (axis === \"X\") {\n      return el.clientWidth + ROUNDING_TOLERANCE < el.scrollWidth;\n    }\n  }\n  function canOverflow(el, axis) {\n    const overflowValue = w.getComputedStyle(el, null)[\"overflow\" + axis];\n    return overflowValue === \"auto\" || overflowValue === \"scroll\";\n  }\n  function isScrollable(el) {\n    const isScrollableY = hasScrollableSpace(el, \"Y\") && canOverflow(el, \"Y\");\n    const isScrollableX = hasScrollableSpace(el, \"X\") && canOverflow(el, \"X\");\n    return isScrollableY || isScrollableX;\n  }\n  function findScrollableParent(el) {\n    while (el !== d.body && isScrollable(el) === false) {\n      el = el.parentNode || el.host;\n    }\n    return el;\n  }\n  function step(context) {\n    const time = now();\n    let value;\n    let currentX;\n    let currentY;\n    let elapsed = (time - context.startTime) / SCROLL_TIME;\n    elapsed = elapsed > 1 ? 1 : elapsed;\n    value = ease(elapsed);\n    currentX = context.startX + (context.x - context.startX) * value;\n    currentY = context.startY + (context.y - context.startY) * value;\n    context.method.call(context.scrollable, currentX, currentY);\n    if (currentX !== context.x || currentY !== context.y) {\n      w.requestAnimationFrame(step.bind(w, context));\n    }\n  }\n  function smoothScroll(el, x, y) {\n    let scrollable;\n    let startX;\n    let startY;\n    let method;\n    const startTime = now();\n    if (el === d.body) {\n      scrollable = w;\n      startX = w.scrollX || w.pageXOffset;\n      startY = w.scrollY || w.pageYOffset;\n      method = original.scroll;\n    } else {\n      scrollable = el;\n      startX = el.scrollLeft;\n      startY = el.scrollTop;\n      method = scrollElement;\n    }\n    step({\n      scrollable,\n      method,\n      startTime,\n      startX,\n      startY,\n      x,\n      y\n    });\n  }\n  w.scroll = w.scrollTo = function() {\n    if (arguments[0] === void 0) {\n      return;\n    }\n    if (shouldBailOut(arguments[0]) === true) {\n      original.scroll.call(\n        w,\n        arguments[0].left !== void 0 ? arguments[0].left : typeof arguments[0] !== \"object\" ? arguments[0] : w.scrollX || w.pageXOffset,\n        // use top prop, second argument if present or fallback to scrollY\n        arguments[0].top !== void 0 ? arguments[0].top : arguments[1] !== void 0 ? arguments[1] : w.scrollY || w.pageYOffset\n      );\n      return;\n    }\n    smoothScroll.call(\n      w,\n      d.body,\n      arguments[0].left !== void 0 ? ~~arguments[0].left : w.scrollX || w.pageXOffset,\n      arguments[0].top !== void 0 ? ~~arguments[0].top : w.scrollY || w.pageYOffset\n    );\n  };\n  w.scrollBy = function() {\n    if (arguments[0] === void 0) {\n      return;\n    }\n    if (shouldBailOut(arguments[0])) {\n      original.scrollBy.call(\n        w,\n        arguments[0].left !== void 0 ? arguments[0].left : typeof arguments[0] !== \"object\" ? arguments[0] : 0,\n        arguments[0].top !== void 0 ? arguments[0].top : arguments[1] !== void 0 ? arguments[1] : 0\n      );\n      return;\n    }\n    smoothScroll.call(\n      w,\n      d.body,\n      ~~arguments[0].left + (w.scrollX || w.pageXOffset),\n      ~~arguments[0].top + (w.scrollY || w.pageYOffset)\n    );\n  };\n  Element2.prototype.scroll = Element2.prototype.scrollTo = function() {\n    if (arguments[0] === void 0) {\n      return;\n    }\n    if (shouldBailOut(arguments[0]) === true) {\n      if (typeof arguments[0] === \"number\" && arguments[1] === void 0) {\n        throw new SyntaxError(\"Value could not be converted\");\n      }\n      original.elementScroll.call(\n        this,\n        // use left prop, first number argument or fallback to scrollLeft\n        arguments[0].left !== void 0 ? ~~arguments[0].left : typeof arguments[0] !== \"object\" ? ~~arguments[0] : this.scrollLeft,\n        // use top prop, second argument or fallback to scrollTop\n        arguments[0].top !== void 0 ? ~~arguments[0].top : arguments[1] !== void 0 ? ~~arguments[1] : this.scrollTop\n      );\n      return;\n    }\n    const left = arguments[0].left;\n    const top = arguments[0].top;\n    smoothScroll.call(\n      this,\n      this,\n      typeof left === \"undefined\" ? this.scrollLeft : ~~left,\n      typeof top === \"undefined\" ? this.scrollTop : ~~top\n    );\n  };\n  Element2.prototype.scrollBy = function() {\n    if (arguments[0] === void 0) {\n      return;\n    }\n    if (shouldBailOut(arguments[0]) === true) {\n      original.elementScroll.call(\n        this,\n        arguments[0].left !== void 0 ? ~~arguments[0].left + this.scrollLeft : ~~arguments[0] + this.scrollLeft,\n        arguments[0].top !== void 0 ? ~~arguments[0].top + this.scrollTop : ~~arguments[1] + this.scrollTop\n      );\n      return;\n    }\n    this.scroll({\n      left: ~~arguments[0].left + this.scrollLeft,\n      top: ~~arguments[0].top + this.scrollTop,\n      behavior: arguments[0].behavior\n    });\n  };\n  Element2.prototype.scrollIntoView = function() {\n    if (shouldBailOut(arguments[0]) === true) {\n      original.scrollIntoView.call(\n        this,\n        arguments[0] === void 0 ? true : arguments[0]\n      );\n      return;\n    }\n    const scrollableParent = findScrollableParent(this);\n    const parentRects = scrollableParent.getBoundingClientRect();\n    const clientRects = this.getBoundingClientRect();\n    if (scrollableParent !== d.body) {\n      smoothScroll.call(\n        this,\n        scrollableParent,\n        scrollableParent.scrollLeft + clientRects.left - parentRects.left,\n        scrollableParent.scrollTop + clientRects.top - parentRects.top\n      );\n      if (w.getComputedStyle(scrollableParent).position !== \"fixed\") {\n        w.scrollBy({\n          left: parentRects.left,\n          top: parentRects.top,\n          behavior: \"smooth\"\n        });\n      }\n    } else {\n      w.scrollBy({\n        left: clientRects.left,\n        top: clientRects.top,\n        behavior: \"smooth\"\n      });\n    }\n  };\n}\nclass Timer {\n  constructor(actions = [], config) {\n    this.timeOffset = 0;\n    this.raf = null;\n    this.actions = actions;\n    this.speed = config.speed;\n  }\n  /**\n   * Add an action, possibly after the timer starts.\n   */\n  addAction(action) {\n    const rafWasActive = this.raf === true;\n    if (!this.actions.length || this.actions[this.actions.length - 1].delay <= action.delay) {\n      this.actions.push(action);\n    } else {\n      const index = this.findActionIndex(action);\n      this.actions.splice(index, 0, action);\n    }\n    if (rafWasActive) {\n      this.raf = onRequestAnimationFrame(this.rafCheck.bind(this));\n    }\n  }\n  start() {\n    this.timeOffset = 0;\n    this.lastTimestamp = performance.now();\n    this.raf = onRequestAnimationFrame(this.rafCheck.bind(this));\n  }\n  rafCheck() {\n    const time = performance.now();\n    this.timeOffset += (time - this.lastTimestamp) * this.speed;\n    this.lastTimestamp = time;\n    while (this.actions.length) {\n      const action = this.actions[0];\n      if (this.timeOffset >= action.delay) {\n        this.actions.shift();\n        action.doAction();\n      } else {\n        break;\n      }\n    }\n    if (this.actions.length > 0) {\n      this.raf = onRequestAnimationFrame(this.rafCheck.bind(this));\n    } else {\n      this.raf = true;\n    }\n  }\n  clear() {\n    if (this.raf) {\n      if (this.raf !== true) {\n        cancelAnimationFrame(this.raf);\n      }\n      this.raf = null;\n    }\n    this.actions.length = 0;\n  }\n  setSpeed(speed) {\n    this.speed = speed;\n  }\n  isActive() {\n    return this.raf !== null;\n  }\n  findActionIndex(action) {\n    let start = 0;\n    let end = this.actions.length - 1;\n    while (start <= end) {\n      const mid = Math.floor((start + end) / 2);\n      if (this.actions[mid].delay < action.delay) {\n        start = mid + 1;\n      } else if (this.actions[mid].delay > action.delay) {\n        end = mid - 1;\n      } else {\n        return mid + 1;\n      }\n    }\n    return start;\n  }\n}\nfunction addDelay(event, baselineTime) {\n  if (event.type === EventType.IncrementalSnapshot && event.data.source === IncrementalSource.MouseMove && event.data.positions && event.data.positions.length) {\n    const firstOffset = event.data.positions[0].timeOffset;\n    const firstTimestamp = event.timestamp + firstOffset;\n    event.delay = firstTimestamp - baselineTime;\n    return firstTimestamp - baselineTime;\n  }\n  event.delay = event.timestamp - baselineTime;\n  return event.delay;\n}\n/*! *****************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\nfunction t(t2, n2) {\n  var e2 = \"function\" == typeof Symbol && t2[Symbol.iterator];\n  if (!e2) return t2;\n  var r2, o2, i2 = e2.call(t2), a2 = [];\n  try {\n    for (; (void 0 === n2 || n2-- > 0) && !(r2 = i2.next()).done; ) a2.push(r2.value);\n  } catch (t3) {\n    o2 = { error: t3 };\n  } finally {\n    try {\n      r2 && !r2.done && (e2 = i2.return) && e2.call(i2);\n    } finally {\n      if (o2) throw o2.error;\n    }\n  }\n  return a2;\n}\nvar n;\n!(function(t2) {\n  t2[t2.NotStarted = 0] = \"NotStarted\", t2[t2.Running = 1] = \"Running\", t2[t2.Stopped = 2] = \"Stopped\";\n})(n || (n = {}));\nvar e = { type: \"xstate.init\" };\nfunction r(t2) {\n  return void 0 === t2 ? [] : [].concat(t2);\n}\nfunction o(t2) {\n  return { type: \"xstate.assign\", assignment: t2 };\n}\nfunction i(t2, n2) {\n  return \"string\" == typeof (t2 = \"string\" == typeof t2 && n2 && n2[t2] ? n2[t2] : t2) ? { type: t2 } : \"function\" == typeof t2 ? { type: t2.name, exec: t2 } : t2;\n}\nfunction a(t2) {\n  return function(n2) {\n    return t2 === n2;\n  };\n}\nfunction u(t2) {\n  return \"string\" == typeof t2 ? { type: t2 } : t2;\n}\nfunction c(t2, n2) {\n  return { value: t2, context: n2, actions: [], changed: false, matches: a(t2) };\n}\nfunction f(t2, n2, e2) {\n  var r2 = n2, o2 = false;\n  return [t2.filter((function(t3) {\n    if (\"xstate.assign\" === t3.type) {\n      o2 = true;\n      var n3 = Object.assign({}, r2);\n      return \"function\" == typeof t3.assignment ? n3 = t3.assignment(r2, e2) : Object.keys(t3.assignment).forEach((function(o3) {\n        n3[o3] = \"function\" == typeof t3.assignment[o3] ? t3.assignment[o3](r2, e2) : t3.assignment[o3];\n      })), r2 = n3, false;\n    }\n    return true;\n  })), r2, o2];\n}\nfunction s(n2, o2) {\n  void 0 === o2 && (o2 = {});\n  var s2 = t(f(r(n2.states[n2.initial].entry).map((function(t2) {\n    return i(t2, o2.actions);\n  })), n2.context, e), 2), l2 = s2[0], v2 = s2[1], y = { config: n2, _options: o2, initialState: { value: n2.initial, actions: l2, context: v2, matches: a(n2.initial) }, transition: function(e2, o3) {\n    var s3, l3, v3 = \"string\" == typeof e2 ? { value: e2, context: n2.context } : e2, p = v3.value, g = v3.context, d = u(o3), x = n2.states[p];\n    if (x.on) {\n      var m = r(x.on[d.type]);\n      try {\n        for (var h = (function(t2) {\n          var n3 = \"function\" == typeof Symbol && Symbol.iterator, e3 = n3 && t2[n3], r2 = 0;\n          if (e3) return e3.call(t2);\n          if (t2 && \"number\" == typeof t2.length) return { next: function() {\n            return t2 && r2 >= t2.length && (t2 = void 0), { value: t2 && t2[r2++], done: !t2 };\n          } };\n          throw new TypeError(n3 ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n        })(m), b = h.next(); !b.done; b = h.next()) {\n          var S = b.value;\n          if (void 0 === S) return c(p, g);\n          var w = \"string\" == typeof S ? { target: S } : S, j = w.target, E = w.actions, R = void 0 === E ? [] : E, N = w.cond, O = void 0 === N ? function() {\n            return true;\n          } : N, _ = void 0 === j, k = null != j ? j : p, T = n2.states[k];\n          if (O(g, d)) {\n            var q = t(f((_ ? r(R) : [].concat(x.exit, R, T.entry).filter((function(t2) {\n              return t2;\n            }))).map((function(t2) {\n              return i(t2, y._options.actions);\n            })), g, d), 3), z = q[0], A = q[1], B = q[2], C = null != j ? j : p;\n            return { value: C, context: A, actions: z, changed: j !== p || z.length > 0 || B, matches: a(C) };\n          }\n        }\n      } catch (t2) {\n        s3 = { error: t2 };\n      } finally {\n        try {\n          b && !b.done && (l3 = h.return) && l3.call(h);\n        } finally {\n          if (s3) throw s3.error;\n        }\n      }\n    }\n    return c(p, g);\n  } };\n  return y;\n}\nvar l = function(t2, n2) {\n  return t2.actions.forEach((function(e2) {\n    var r2 = e2.exec;\n    return r2 && r2(t2.context, n2);\n  }));\n};\nfunction v(t2) {\n  var r2 = t2.initialState, o2 = n.NotStarted, i2 = /* @__PURE__ */ new Set(), c2 = { _machine: t2, send: function(e2) {\n    o2 === n.Running && (r2 = t2.transition(r2, e2), l(r2, u(e2)), i2.forEach((function(t3) {\n      return t3(r2);\n    })));\n  }, subscribe: function(t3) {\n    return i2.add(t3), t3(r2), { unsubscribe: function() {\n      return i2.delete(t3);\n    } };\n  }, start: function(i3) {\n    if (i3) {\n      var u2 = \"object\" == typeof i3 ? i3 : { context: t2.config.context, value: i3 };\n      r2 = { value: u2.value, actions: [], context: u2.context, matches: a(u2.value) };\n    }\n    return o2 = n.Running, l(r2, e), c2;\n  }, stop: function() {\n    return o2 = n.Stopped, i2.clear(), c2;\n  }, get state() {\n    return r2;\n  }, get status() {\n    return o2;\n  } };\n  return c2;\n}\nfunction discardPriorSnapshots(events, baselineTime) {\n  for (let idx = events.length - 1; idx >= 0; idx--) {\n    const event = events[idx];\n    if (event.type === EventType.Meta) {\n      if (event.timestamp <= baselineTime) {\n        return events.slice(idx);\n      }\n    }\n  }\n  return events;\n}\nfunction createPlayerService(context, { getCastFn, applyEventsSynchronously, emitter }) {\n  const playerMachine = s(\n    {\n      id: \"player\",\n      context,\n      initial: \"paused\",\n      states: {\n        playing: {\n          on: {\n            PAUSE: {\n              target: \"paused\",\n              actions: [\"pause\"]\n            },\n            CAST_EVENT: {\n              target: \"playing\",\n              actions: \"castEvent\"\n            },\n            END: {\n              target: \"paused\",\n              actions: [\"resetLastPlayedEvent\", \"pause\"]\n            },\n            ADD_EVENT: {\n              target: \"playing\",\n              actions: [\"addEvent\"]\n            }\n          }\n        },\n        paused: {\n          on: {\n            PLAY: {\n              target: \"playing\",\n              actions: [\"recordTimeOffset\", \"play\"]\n            },\n            CAST_EVENT: {\n              target: \"paused\",\n              actions: \"castEvent\"\n            },\n            TO_LIVE: {\n              target: \"live\",\n              actions: [\"startLive\"]\n            },\n            ADD_EVENT: {\n              target: \"paused\",\n              actions: [\"addEvent\"]\n            }\n          }\n        },\n        live: {\n          on: {\n            ADD_EVENT: {\n              target: \"live\",\n              actions: [\"addEvent\"]\n            },\n            CAST_EVENT: {\n              target: \"live\",\n              actions: [\"castEvent\"]\n            }\n          }\n        }\n      }\n    },\n    {\n      actions: {\n        castEvent: o({\n          lastPlayedEvent: (ctx, event) => {\n            if (event.type === \"CAST_EVENT\") {\n              return event.payload.event;\n            }\n            return ctx.lastPlayedEvent;\n          }\n        }),\n        recordTimeOffset: o((ctx, event) => {\n          let timeOffset = ctx.timeOffset;\n          if (\"payload\" in event && \"timeOffset\" in event.payload) {\n            timeOffset = event.payload.timeOffset;\n          }\n          return {\n            ...ctx,\n            timeOffset,\n            baselineTime: ctx.events[0].timestamp + timeOffset\n          };\n        }),\n        play(ctx) {\n          const { timer, events, baselineTime, lastPlayedEvent } = ctx;\n          timer.clear();\n          for (const event of events) {\n            addDelay(event, baselineTime);\n          }\n          const neededEvents = discardPriorSnapshots(events, baselineTime);\n          let lastPlayedTimestamp = lastPlayedEvent?.timestamp;\n          if (lastPlayedEvent?.type === EventType.IncrementalSnapshot && lastPlayedEvent.data.source === IncrementalSource.MouseMove) {\n            lastPlayedTimestamp = lastPlayedEvent.timestamp + lastPlayedEvent.data.positions[0]?.timeOffset;\n          }\n          if (baselineTime < (lastPlayedTimestamp || 0)) {\n            emitter.emit(ReplayerEvents.PlayBack);\n          }\n          const syncEvents = new Array();\n          for (const event of neededEvents) {\n            if (lastPlayedTimestamp && lastPlayedTimestamp < baselineTime && (event.timestamp <= lastPlayedTimestamp || event === lastPlayedEvent)) {\n              continue;\n            }\n            if (event.timestamp < baselineTime) {\n              syncEvents.push(event);\n            } else {\n              const castFn = getCastFn(event, false);\n              timer.addAction({\n                doAction: () => {\n                  castFn();\n                },\n                delay: event.delay\n              });\n            }\n          }\n          applyEventsSynchronously(syncEvents);\n          emitter.emit(ReplayerEvents.Flush);\n          timer.start();\n        },\n        pause(ctx) {\n          ctx.timer.clear();\n        },\n        resetLastPlayedEvent: o((ctx) => {\n          return {\n            ...ctx,\n            lastPlayedEvent: null\n          };\n        }),\n        startLive: o({\n          baselineTime: (ctx, event) => {\n            ctx.timer.start();\n            if (event.type === \"TO_LIVE\" && event.payload.baselineTime) {\n              return event.payload.baselineTime;\n            }\n            return Date.now();\n          }\n        }),\n        addEvent: o((ctx, machineEvent) => {\n          const { baselineTime, timer, events } = ctx;\n          if (machineEvent.type === \"ADD_EVENT\") {\n            const { event } = machineEvent.payload;\n            addDelay(event, baselineTime);\n            let end = events.length - 1;\n            if (!events[end] || events[end].timestamp <= event.timestamp) {\n              events.push(event);\n            } else {\n              let insertionIndex = -1;\n              let start = 0;\n              while (start <= end) {\n                const mid = Math.floor((start + end) / 2);\n                if (events[mid].timestamp <= event.timestamp) {\n                  start = mid + 1;\n                } else {\n                  end = mid - 1;\n                }\n              }\n              if (insertionIndex === -1) {\n                insertionIndex = start;\n              }\n              events.splice(insertionIndex, 0, event);\n            }\n            const isSync = event.timestamp < baselineTime;\n            const castFn = getCastFn(event, isSync);\n            if (isSync) {\n              castFn();\n            } else if (timer.isActive()) {\n              timer.addAction({\n                doAction: () => {\n                  castFn();\n                },\n                delay: event.delay\n              });\n            }\n          }\n          return { ...ctx, events };\n        })\n      }\n    }\n  );\n  return v(playerMachine);\n}\nfunction createSpeedService(context) {\n  const speedMachine = s(\n    {\n      id: \"speed\",\n      context,\n      initial: \"normal\",\n      states: {\n        normal: {\n          on: {\n            FAST_FORWARD: {\n              target: \"skipping\",\n              actions: [\"recordSpeed\", \"setSpeed\"]\n            },\n            SET_SPEED: {\n              target: \"normal\",\n              actions: [\"setSpeed\"]\n            }\n          }\n        },\n        skipping: {\n          on: {\n            BACK_TO_NORMAL: {\n              target: \"normal\",\n              actions: [\"restoreSpeed\"]\n            },\n            SET_SPEED: {\n              target: \"normal\",\n              actions: [\"setSpeed\"]\n            }\n          }\n        }\n      }\n    },\n    {\n      actions: {\n        setSpeed: (ctx, event) => {\n          if (\"payload\" in event) {\n            ctx.timer.setSpeed(event.payload.speed);\n          }\n        },\n        recordSpeed: o({\n          normalSpeed: (ctx) => ctx.timer.speed\n        }),\n        restoreSpeed: (ctx) => {\n          ctx.timer.setSpeed(ctx.normalSpeed);\n        }\n      }\n    }\n  );\n  return v(speedMachine);\n}\nconst rules = (blockClass) => [\n  `.${blockClass} { background: currentColor }`,\n  \"noscript { display: none !important; }\"\n];\nconst webGLVarMap = /* @__PURE__ */ new Map();\nfunction variableListFor(ctx, ctor) {\n  let contextMap = webGLVarMap.get(ctx);\n  if (!contextMap) {\n    contextMap = /* @__PURE__ */ new Map();\n    webGLVarMap.set(ctx, contextMap);\n  }\n  if (!contextMap.has(ctor)) {\n    contextMap.set(ctor, []);\n  }\n  return contextMap.get(ctor);\n}\nfunction deserializeArg(imageMap, ctx, preload) {\n  return async (arg) => {\n    if (arg && typeof arg === \"object\" && \"rr_type\" in arg) {\n      if (preload) preload.isUnchanged = false;\n      if (arg.rr_type === \"ImageBitmap\" && \"args\" in arg) {\n        const args = await deserializeArg(imageMap, ctx, preload)(arg.args);\n        return await createImageBitmap.apply(null, args);\n      } else if (\"index\" in arg) {\n        if (preload || ctx === null) return arg;\n        const { rr_type: name, index } = arg;\n        return variableListFor(ctx, name)[index];\n      } else if (\"args\" in arg) {\n        const { rr_type: name, args } = arg;\n        const ctor = window[name];\n        return new ctor(\n          ...await Promise.all(\n            args.map(deserializeArg(imageMap, ctx, preload))\n          )\n        );\n      } else if (\"base64\" in arg) {\n        return decode(arg.base64);\n      } else if (\"src\" in arg) {\n        const image = imageMap.get(arg.src);\n        if (image) {\n          return image;\n        } else {\n          const image2 = new Image();\n          image2.src = arg.src;\n          imageMap.set(arg.src, image2);\n          return image2;\n        }\n      } else if (\"data\" in arg && arg.rr_type === \"Blob\") {\n        const blobContents = await Promise.all(\n          arg.data.map(deserializeArg(imageMap, ctx, preload))\n        );\n        const blob = new Blob(blobContents, {\n          type: arg.type\n        });\n        return blob;\n      }\n    } else if (Array.isArray(arg)) {\n      const result = await Promise.all(\n        arg.map(deserializeArg(imageMap, ctx, preload))\n      );\n      return result;\n    }\n    return arg;\n  };\n}\nfunction getContext(target, type) {\n  try {\n    if (type === CanvasContext.WebGL) {\n      return target.getContext(\"webgl\") || target.getContext(\"experimental-webgl\");\n    }\n    return target.getContext(\"webgl2\");\n  } catch (e2) {\n    return null;\n  }\n}\nconst WebGLVariableConstructorsNames = [\n  \"WebGLActiveInfo\",\n  \"WebGLBuffer\",\n  \"WebGLFramebuffer\",\n  \"WebGLProgram\",\n  \"WebGLRenderbuffer\",\n  \"WebGLShader\",\n  \"WebGLShaderPrecisionFormat\",\n  \"WebGLTexture\",\n  \"WebGLUniformLocation\",\n  \"WebGLVertexArrayObject\"\n];\nfunction saveToWebGLVarMap(ctx, result) {\n  if (!result?.constructor) return;\n  const { name } = result.constructor;\n  if (!WebGLVariableConstructorsNames.includes(name)) return;\n  const variables = variableListFor(ctx, name);\n  if (!variables.includes(result)) variables.push(result);\n}\nasync function webglMutation({\n  mutation,\n  target,\n  type,\n  imageMap,\n  errorHandler\n}) {\n  try {\n    const ctx = getContext(target, type);\n    if (!ctx) return;\n    if (mutation.setter) {\n      ctx[mutation.property] = mutation.args[0];\n      return;\n    }\n    const original = ctx[mutation.property];\n    const args = await Promise.all(\n      mutation.args.map(deserializeArg(imageMap, ctx))\n    );\n    const result = original.apply(ctx, args);\n    saveToWebGLVarMap(ctx, result);\n    const debugMode = false;\n    if (debugMode) ;\n  } catch (error) {\n    errorHandler(mutation, error);\n  }\n}\nasync function canvasMutation$1({\n  event,\n  mutations,\n  target,\n  imageMap,\n  errorHandler\n}) {\n  const ctx = target.getContext(\"2d\");\n  if (!ctx) {\n    errorHandler(mutations[0], new Error(\"Canvas context is null\"));\n    return;\n  }\n  const mutationArgsPromises = mutations.map(\n    async (mutation) => {\n      return Promise.all(mutation.args.map(deserializeArg(imageMap, ctx)));\n    }\n  );\n  const args = await Promise.all(mutationArgsPromises);\n  args.forEach((args2, index) => {\n    const mutation = mutations[index];\n    try {\n      if (mutation.setter) {\n        ctx[mutation.property] = mutation.args[0];\n        return;\n      }\n      const original = ctx[mutation.property];\n      if (mutation.property === \"drawImage\" && typeof mutation.args[0] === \"string\") {\n        imageMap.get(event);\n        original.apply(ctx, mutation.args);\n      } else {\n        original.apply(ctx, args2);\n      }\n    } catch (error) {\n      errorHandler(mutation, error);\n    }\n    return;\n  });\n}\nasync function canvasMutation({\n  event,\n  mutation,\n  target,\n  imageMap,\n  canvasEventMap,\n  errorHandler\n}) {\n  try {\n    const precomputedMutation = canvasEventMap.get(event) || mutation;\n    const commands = \"commands\" in precomputedMutation ? precomputedMutation.commands : [precomputedMutation];\n    if ([CanvasContext.WebGL, CanvasContext.WebGL2].includes(mutation.type)) {\n      for (let i2 = 0; i2 < commands.length; i2++) {\n        const command = commands[i2];\n        await webglMutation({\n          mutation: command,\n          type: mutation.type,\n          target,\n          imageMap,\n          errorHandler\n        });\n      }\n      return;\n    }\n    await canvasMutation$1({\n      event,\n      mutations: commands,\n      target,\n      imageMap,\n      errorHandler\n    });\n  } catch (error) {\n    errorHandler(mutation, error);\n  }\n}\nconst SKIP_TIME_INTERVAL = 5 * 1e3;\nconst mitt = mitt$1 || mittProxy;\nconst REPLAY_CONSOLE_PREFIX = \"[replayer]\";\nfunction getEventIndex(events, eventTime) {\n  let result = -1;\n  if (events.length === 0) {\n    return result;\n  }\n  let left = 0, right = events.length - 1;\n  while (left <= right) {\n    const mid = Math.floor((left + right) / 2);\n    if (events[mid].timestamp <= eventTime) {\n      result = mid;\n      left = mid + 1;\n    } else {\n      right = mid - 1;\n    }\n  }\n  return result;\n}\nconst defaultMouseTailConfig = {\n  duration: 500,\n  lineCap: \"round\",\n  lineWidth: 3,\n  strokeStyle: \"red\"\n};\nfunction indicatesTouchDevice(e2) {\n  return e2.type == EventType.IncrementalSnapshot && (e2.data.source == IncrementalSource.TouchMove || e2.data.source == IncrementalSource.MouseInteraction && e2.data.type == MouseInteractions.TouchStart);\n}\nfunction getPointerId(d) {\n  const pointerId = \"pointerId\" in d && typeof d.pointerId === \"number\" ? d.pointerId : -1;\n  return pointerId;\n}\nclass Replayer {\n  constructor(events, config) {\n    this.usingVirtualDom = false;\n    this.virtualDom = new RRDocument();\n    this.emitter = mitt();\n    this.legacy_missingNodeRetryMap = {};\n    this.cache = createCache();\n    this.imageMap = /* @__PURE__ */ new Map();\n    this.canvasEventMap = /* @__PURE__ */ new Map();\n    this.mirror = createMirror$2();\n    this.styleMirror = new StyleSheetMirror();\n    this.firstFullSnapshot = null;\n    this.newDocumentQueue = [];\n    this.pointers = {};\n    this.lastMouseDownEvent = null;\n    this.lastSelectionData = null;\n    this.constructedStyleMutations = [];\n    this.adoptedStyleSheets = [];\n    this.handleResize = (dimension) => {\n      this.iframe.style.display = \"inherit\";\n      for (const el of [\n        ...Object.values(this.pointers).flatMap((a2) => a2.mouseTail),\n        this.iframe\n      ]) {\n        if (!el) {\n          continue;\n        }\n        el.setAttribute(\"width\", String(dimension.width));\n        el.setAttribute(\"height\", String(dimension.height));\n      }\n    };\n    this.applyEventsSynchronously = (events2) => {\n      for (const event of events2) {\n        switch (event.type) {\n          case EventType.DomContentLoaded:\n          case EventType.Load:\n          case EventType.Custom:\n            continue;\n          case EventType.FullSnapshot:\n          case EventType.Meta:\n          case EventType.Plugin:\n          case EventType.IncrementalSnapshot:\n            break;\n        }\n        const castFn = this.getCastFn(event, true);\n        castFn();\n      }\n    };\n    this.getCastFn = (event, isSync = false) => {\n      let castFn;\n      switch (event.type) {\n        case EventType.DomContentLoaded:\n        case EventType.Load:\n          break;\n        case EventType.Custom:\n          castFn = () => {\n            this.emitter.emit(ReplayerEvents.CustomEvent, event);\n          };\n          break;\n        case EventType.Meta:\n          castFn = () => this.emitter.emit(ReplayerEvents.Resize, {\n            width: event.data.width,\n            height: event.data.height\n          });\n          break;\n        case EventType.FullSnapshot:\n          castFn = () => {\n            if (this.firstFullSnapshot) {\n              if (this.firstFullSnapshot === event) {\n                this.firstFullSnapshot = true;\n                return;\n              }\n            } else {\n              this.firstFullSnapshot = true;\n            }\n            this.rebuildFullSnapshot(event, isSync);\n            this.iframe.contentWindow?.scrollTo(event.data.initialOffset);\n            this.styleMirror.reset();\n          };\n          break;\n        case EventType.IncrementalSnapshot:\n          castFn = () => {\n            this.applyIncremental(event, isSync);\n            if (isSync) {\n              return;\n            }\n            if (event === this.nextUserInteractionEvent) {\n              this.nextUserInteractionEvent = null;\n              this.backToNormal();\n            }\n            if (this.config.skipInactive && !this.nextUserInteractionEvent) {\n              for (const _event of this.service.state.context.events) {\n                if (_event.timestamp <= event.timestamp) {\n                  continue;\n                }\n                if (this.isUserInteraction(_event)) {\n                  if (\n                    // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n                    _event.delay - event.delay > this.config.inactivePeriodThreshold * this.speedService.state.context.timer.speed\n                  ) {\n                    this.nextUserInteractionEvent = _event;\n                  }\n                  break;\n                }\n              }\n              if (this.nextUserInteractionEvent) {\n                const skipTime = (\n                  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n                  this.nextUserInteractionEvent.delay - event.delay\n                );\n                const payload = {\n                  speed: Math.min(\n                    Math.round(skipTime / SKIP_TIME_INTERVAL),\n                    this.config.maxSpeed\n                  )\n                };\n                this.speedService.send({ type: \"FAST_FORWARD\", payload });\n                this.emitter.emit(ReplayerEvents.SkipStart, payload);\n              }\n            }\n          };\n          break;\n      }\n      const wrappedCastFn = () => {\n        if (castFn) {\n          castFn();\n        }\n        for (const plugin of this.config.plugins || []) {\n          if (plugin.handler) plugin.handler(event, isSync, { replayer: this });\n        }\n        this.service.send({ type: \"CAST_EVENT\", payload: { event } });\n        const last_index = this.service.state.context.events.length - 1;\n        if (!this.config.liveMode && event === this.service.state.context.events[last_index]) {\n          const finish = () => {\n            if (last_index < this.service.state.context.events.length - 1) {\n              return;\n            }\n            this.backToNormal();\n            this.service.send(\"END\");\n            this.emitter.emit(ReplayerEvents.Finish);\n          };\n          let finish_buffer = 50;\n          if (event.type === EventType.IncrementalSnapshot && event.data.source === IncrementalSource.MouseMove && event.data.positions.length) {\n            finish_buffer += Math.max(0, -event.data.positions[0].timeOffset);\n          }\n          setTimeout$1(finish, finish_buffer);\n        }\n        this.emitter.emit(ReplayerEvents.EventCast, event);\n      };\n      return wrappedCastFn;\n    };\n    if (!config?.liveMode && events.length < 2) {\n      throw new Error(\"Replayer need at least 2 events.\");\n    }\n    const defaultConfig = {\n      speed: 1,\n      maxSpeed: 360,\n      root: document.body,\n      loadTimeout: 0,\n      skipInactive: false,\n      inactivePeriodThreshold: 10 * 1e3,\n      showWarning: true,\n      showDebug: false,\n      blockClass: \"rr-block\",\n      liveMode: false,\n      insertStyleRules: [],\n      triggerFocus: true,\n      UNSAFE_replayCanvas: false,\n      pauseAnimation: true,\n      mouseTail: defaultMouseTailConfig,\n      useVirtualDom: true,\n      // Virtual-dom optimization is enabled by default.\n      logger: console\n    };\n    this.config = Object.assign({}, defaultConfig, config);\n    this.handleResize = this.handleResize.bind(this);\n    this.getCastFn = this.getCastFn.bind(this);\n    this.applyEventsSynchronously = this.applyEventsSynchronously.bind(this);\n    this.emitter.on(ReplayerEvents.Resize, this.handleResize);\n    this.setupDom();\n    for (const plugin of this.config.plugins || []) {\n      if (plugin.getMirror) plugin.getMirror({ nodeMirror: this.mirror });\n    }\n    this.emitter.on(ReplayerEvents.Flush, () => {\n      if (this.usingVirtualDom) {\n        const replayerHandler = {\n          mirror: this.mirror,\n          applyCanvas: (canvasEvent, canvasMutationData2, target) => {\n            void canvasMutation({\n              event: canvasEvent,\n              mutation: canvasMutationData2,\n              target,\n              imageMap: this.imageMap,\n              canvasEventMap: this.canvasEventMap,\n              errorHandler: this.warnCanvasMutationFailed.bind(this)\n            });\n          },\n          applyInput: this.applyInput.bind(this),\n          applyScroll: this.applyScroll.bind(this),\n          applyStyleSheetMutation: (data, styleSheet) => {\n            if (data.source === IncrementalSource.StyleSheetRule)\n              this.applyStyleSheetRule(data, styleSheet);\n            else if (data.source === IncrementalSource.StyleDeclaration)\n              this.applyStyleDeclaration(data, styleSheet);\n          },\n          afterAppend: (node, id) => {\n            for (const plugin of this.config.plugins || []) {\n              if (plugin.onBuild) plugin.onBuild(node, { id, replayer: this });\n            }\n          }\n        };\n        const iframeDoc = getIFrameContentDocument(this.iframe);\n        if (iframeDoc)\n          try {\n            diff(\n              iframeDoc,\n              this.virtualDom,\n              replayerHandler,\n              this.virtualDom.mirror\n            );\n          } catch (e2) {\n            console.warn(e2);\n          }\n        this.virtualDom.destroyTree();\n        this.usingVirtualDom = false;\n        if (Object.keys(this.legacy_missingNodeRetryMap).length) {\n          for (const key in this.legacy_missingNodeRetryMap) {\n            try {\n              const value = this.legacy_missingNodeRetryMap[key];\n              const realNode = createOrGetNode(\n                value.node,\n                this.mirror,\n                this.virtualDom.mirror\n              );\n              diff(\n                realNode,\n                value.node,\n                replayerHandler,\n                this.virtualDom.mirror\n              );\n              value.node = realNode;\n            } catch (error) {\n              this.warn(error);\n            }\n          }\n        }\n        this.constructedStyleMutations.forEach((data) => {\n          this.applyStyleSheetMutation(data);\n        });\n        this.constructedStyleMutations = [];\n        this.adoptedStyleSheets.forEach((data) => {\n          this.applyAdoptedStyleSheet(data);\n        });\n        this.adoptedStyleSheets = [];\n      }\n      for (const [\n        pointerId,\n        { pointerPosition, touchActive }\n      ] of Object.entries(this.pointers)) {\n        const id = parseInt(pointerId);\n        const pointer = this.pointers[id];\n        if (pointerPosition) {\n          this.moveAndHover(\n            pointerPosition.x,\n            pointerPosition.y,\n            pointerPosition.id,\n            true,\n            pointerPosition.debugData,\n            id\n          );\n          pointer.pointerPosition = null;\n        }\n        if (touchActive === true) {\n          pointer.pointerEl.classList.add(\"touch-active\");\n        } else if (touchActive === false) {\n          pointer.pointerEl.classList.remove(\"touch-active\");\n        }\n        pointer.touchActive = null;\n      }\n      if (this.lastMouseDownEvent) {\n        const [target, event] = this.lastMouseDownEvent;\n        target.dispatchEvent(event);\n      }\n      this.lastMouseDownEvent = null;\n      if (this.lastSelectionData) {\n        this.applySelection(this.lastSelectionData);\n        this.lastSelectionData = null;\n      }\n    });\n    this.emitter.on(ReplayerEvents.PlayBack, () => {\n      this.firstFullSnapshot = null;\n      this.mirror.reset();\n      this.styleMirror.reset();\n    });\n    const timer = new Timer([], {\n      speed: this.config.speed\n    });\n    this.service = createPlayerService(\n      {\n        events: events.map((e2) => {\n          if (config && config.unpackFn) {\n            return config.unpackFn(e2);\n          }\n          return e2;\n        }).sort((a1, a2) => a1.timestamp - a2.timestamp),\n        timer,\n        timeOffset: 0,\n        baselineTime: 0,\n        lastPlayedEvent: null\n      },\n      {\n        getCastFn: this.getCastFn,\n        applyEventsSynchronously: this.applyEventsSynchronously,\n        emitter: this.emitter\n      }\n    );\n    this.service.start();\n    this.service.subscribe((state) => {\n      this.emitter.emit(ReplayerEvents.StateChange, {\n        player: state\n      });\n    });\n    this.speedService = createSpeedService({\n      normalSpeed: -1,\n      timer\n    });\n    this.speedService.start();\n    this.speedService.subscribe((state) => {\n      this.emitter.emit(ReplayerEvents.StateChange, {\n        speed: state\n      });\n    });\n    const firstMeta = this.service.state.context.events.find(\n      (e2) => e2.type === EventType.Meta\n    );\n    const firstFullsnapshot = this.service.state.context.events.find(\n      (e2) => e2.type === EventType.FullSnapshot\n    );\n    if (firstMeta) {\n      const { width, height } = firstMeta.data;\n      setTimeout$1(() => {\n        this.emitter.emit(ReplayerEvents.Resize, {\n          width,\n          height\n        });\n      }, 0);\n    }\n    if (firstFullsnapshot) {\n      setTimeout$1(() => {\n        if (this.firstFullSnapshot) {\n          return;\n        }\n        this.firstFullSnapshot = firstFullsnapshot;\n        this.rebuildFullSnapshot(\n          firstFullsnapshot\n        );\n        this.iframe.contentWindow?.scrollTo(\n          firstFullsnapshot.data.initialOffset\n        );\n      }, 1);\n    }\n  }\n  get timer() {\n    return this.service.state.context.timer;\n  }\n  createPointer(pointerId, event) {\n    const mouseTail = document.createElement(\"canvas\");\n    mouseTail.classList.add(\"replayer-mouse-tail\");\n    mouseTail.width = Number.parseFloat(this.iframe.width);\n    mouseTail.height = Number.parseFloat(this.iframe.height);\n    this.wrapper.insertBefore(mouseTail, this.iframe);\n    mouseTail.style.display = this.config.mouseTail === false ? \"none\" : \"inherit\";\n    const newMouse = document.createElement(\"div\");\n    newMouse.classList.add(\"replayer-mouse\");\n    this.pointers[pointerId] = {\n      touchActive: null,\n      pointerEl: newMouse,\n      tailPositions: [],\n      pointerPosition: null,\n      mouseTail\n    };\n    if (indicatesTouchDevice(event)) {\n      newMouse.classList.add(\"touch-device\");\n    }\n    this.wrapper.appendChild(newMouse);\n  }\n  on(event, handler) {\n    this.emitter.on(event, handler);\n    return this;\n  }\n  off(event, handler) {\n    this.emitter.off(event, handler);\n    return this;\n  }\n  setConfig(config) {\n    const previousSkipInactive = this.config.skipInactive;\n    Object.keys(config).forEach((key) => {\n      config[key];\n      this.config[key] = config[key];\n    });\n    if (!this.config.skipInactive) {\n      this.backToNormal();\n    } else if (previousSkipInactive === false && this.config.skipInactive === true) {\n      this.reevaluateFastForward();\n    }\n    if (typeof config.speed !== \"undefined\") {\n      this.speedService.send({\n        type: \"SET_SPEED\",\n        payload: {\n          speed: config.speed\n        }\n      });\n    }\n    if (typeof config.mouseTail !== \"undefined\") {\n      if (config.mouseTail === false) {\n        for (const { mouseTail } of Object.values(this.pointers)) {\n          if (mouseTail) {\n            mouseTail.style.display = \"none\";\n          }\n        }\n      } else {\n        for (let { mouseTail } of Object.values(this.pointers)) {\n          if (!mouseTail) {\n            mouseTail = document.createElement(\"canvas\");\n            mouseTail.width = Number.parseFloat(this.iframe.width);\n            mouseTail.height = Number.parseFloat(this.iframe.height);\n            mouseTail.classList.add(\"replayer-mouse-tail\");\n            this.wrapper.insertBefore(mouseTail, this.iframe);\n          }\n          mouseTail.style.display = \"inherit\";\n        }\n      }\n    }\n  }\n  getMetaData() {\n    const firstEvent = this.service.state.context.events[0];\n    const lastEvent = this.service.state.context.events[this.service.state.context.events.length - 1];\n    return {\n      startTime: firstEvent.timestamp,\n      endTime: lastEvent.timestamp,\n      totalTime: lastEvent.timestamp - firstEvent.timestamp\n    };\n  }\n  getCurrentTime() {\n    return this.timer.timeOffset + this.getTimeOffset();\n  }\n  getTimeOffset() {\n    const { baselineTime, events } = this.service.state.context;\n    return baselineTime - events[0].timestamp;\n  }\n  getMirror() {\n    return this.mirror;\n  }\n  /**\n   * This API was designed to be used as play at any time offset.\n   * Since we minimized the data collected from recorder, we do not\n   * have the ability of undo an event.\n   * So the implementation of play at any time offset will always iterate\n   * all of the events, cast event before the offset synchronously\n   * and cast event after the offset asynchronously with timer.\n   * @param timeOffset - number\n   */\n  play(timeOffset = 0) {\n    if (this.config.skipInactive && this.speedService.state.matches(\"skipping\")) {\n      this.backToNormal();\n    }\n    if (this.service.state.matches(\"paused\")) {\n      this.service.send({ type: \"PLAY\", payload: { timeOffset } });\n    } else {\n      this.service.send({ type: \"PAUSE\" });\n      this.service.send({ type: \"PLAY\", payload: { timeOffset } });\n    }\n    const iframeDoc = getIFrameContentDocument(this.iframe);\n    iframeDoc?.getElementsByTagName(\"html\")[0]?.classList.remove(\"rrweb-paused\");\n    this.emitter.emit(ReplayerEvents.Start);\n    if (this.config.skipInactive) {\n      this.reevaluateFastForward();\n    }\n  }\n  pause(timeOffset) {\n    if (timeOffset === void 0 && this.service.state.matches(\"playing\")) {\n      this.service.send({ type: \"PAUSE\" });\n    }\n    if (typeof timeOffset === \"number\") {\n      this.play(timeOffset);\n      this.service.send({ type: \"PAUSE\" });\n    }\n    const iframeDoc = getIFrameContentDocument(this.iframe);\n    iframeDoc?.getElementsByTagName(\"html\")[0]?.classList.add(\"rrweb-paused\");\n    this.emitter.emit(ReplayerEvents.Pause);\n  }\n  resume(timeOffset = 0) {\n    this.warn(\n      `The 'resume' was deprecated in 1.0. Please use 'play' method which has the same interface.`\n    );\n    this.play(timeOffset);\n    this.emitter.emit(ReplayerEvents.Resume);\n  }\n  /**\n   * Totally destroy this replayer and please be careful that this operation is irreversible.\n   * Memory occupation can be released by removing all references to this replayer.\n   */\n  destroy() {\n    this.pause();\n    this.config.root.removeChild(this.wrapper);\n    this.emitter.emit(ReplayerEvents.Destroy);\n  }\n  startLive(baselineTime) {\n    this.service.send({ type: \"TO_LIVE\", payload: { baselineTime } });\n  }\n  addEvent(rawEvent) {\n    const event = this.config.unpackFn ? this.config.unpackFn(rawEvent) : rawEvent;\n    void Promise.resolve().then(\n      () => this.service.send({ type: \"ADD_EVENT\", payload: { event } })\n    );\n  }\n  enableInteract() {\n    this.iframe.setAttribute(\"scrolling\", \"auto\");\n    this.iframe.style.pointerEvents = \"auto\";\n  }\n  disableInteract() {\n    this.iframe.setAttribute(\"scrolling\", \"no\");\n    this.iframe.style.pointerEvents = \"none\";\n  }\n  /**\n   * Empties the replayer's cache and reclaims memory.\n   * The replayer will use this cache to speed up the playback.\n   */\n  resetCache() {\n    this.cache = createCache();\n  }\n  reevaluateFastForward() {\n    if (!this.config.skipInactive) {\n      return;\n    }\n    this.nextUserInteractionEvent = null;\n    const events = this.service.state.context.events;\n    const firstEvent = events[0];\n    if (!firstEvent) {\n      return;\n    }\n    const currentEventTime = firstEvent.timestamp + this.getCurrentTime();\n    const currentEventIndex = getEventIndex(events, currentEventTime);\n    if (currentEventIndex === -1) {\n      return;\n    }\n    const currentEvent = events[currentEventIndex];\n    const threshold = this.config.inactivePeriodThreshold * this.speedService.state.context.timer.speed;\n    for (let i2 = currentEventIndex + 1; i2 < events.length; i2++) {\n      const event = events[i2];\n      if (this.isUserInteraction(event)) {\n        const gapTime = event.timestamp - currentEvent.timestamp;\n        if (gapTime > threshold) {\n          this.nextUserInteractionEvent = event;\n          const payload = {\n            speed: Math.min(\n              Math.round(gapTime / SKIP_TIME_INTERVAL),\n              this.config.maxSpeed\n            )\n          };\n          this.speedService.send({ type: \"FAST_FORWARD\", payload });\n          this.emitter.emit(ReplayerEvents.SkipStart, payload);\n        }\n        break;\n      }\n    }\n  }\n  setupDom() {\n    this.wrapper = document.createElement(\"div\");\n    this.wrapper.classList.add(\"replayer-wrapper\");\n    this.config.root.appendChild(this.wrapper);\n    this.iframe = document.createElement(\"iframe\");\n    const attributes2 = [\"allow-same-origin\"];\n    if (this.config.UNSAFE_replayCanvas) {\n      attributes2.push(\"allow-scripts\");\n    }\n    this.iframe.style.display = \"none\";\n    this.iframe.setAttribute(\"sandbox\", attributes2.join(\" \"));\n    this.disableInteract();\n    this.wrapper.appendChild(this.iframe);\n    const iframeDoc = getIFrameContentDocument(this.iframe);\n    const iframeWindow = getIFrameContentWindow(this.iframe);\n    if (iframeWindow && iframeDoc) {\n      polyfill(iframeWindow, iframeDoc);\n      polyfill$1(iframeWindow);\n    }\n  }\n  rebuildFullSnapshot(event, isSync = false) {\n    const iframeDoc = getIFrameContentDocument(this.iframe);\n    if (!iframeDoc) {\n      return this.warn(\"Looks like your replayer has been destroyed.\");\n    }\n    if (Object.keys(this.legacy_missingNodeRetryMap).length) {\n      this.warn(\n        \"Found unresolved missing node map\",\n        this.legacy_missingNodeRetryMap\n      );\n    }\n    this.legacy_missingNodeRetryMap = {};\n    const collected = [];\n    const afterAppend = (builtNode, id) => {\n      this.collectIframeAndAttachDocument(collected, builtNode);\n      for (const plugin of this.config.plugins || []) {\n        if (plugin.onBuild)\n          plugin.onBuild(builtNode, {\n            id,\n            replayer: this\n          });\n      }\n    };\n    if (this.usingVirtualDom) {\n      this.virtualDom.destroyTree();\n      this.usingVirtualDom = false;\n    }\n    this.mirror.reset();\n    rebuild(event.data.node, {\n      doc: iframeDoc,\n      afterAppend,\n      cache: this.cache,\n      mirror: this.mirror\n    });\n    afterAppend(iframeDoc, event.data.node.id);\n    for (const { mutationInQueue, builtNode } of collected) {\n      this.attachDocumentToIframe(mutationInQueue, builtNode);\n      this.newDocumentQueue = this.newDocumentQueue.filter(\n        (m) => m !== mutationInQueue\n      );\n    }\n    const { documentElement, head } = iframeDoc;\n    this.insertStyleRules(documentElement, head);\n    if (!this.service.state.matches(\"playing\")) {\n      const iframeHtmlElement = iframeDoc.getElementsByTagName(\"html\")[0];\n      iframeHtmlElement && iframeHtmlElement.classList.add(\"rrweb-paused\");\n    }\n    this.emitter.emit(ReplayerEvents.FullsnapshotRebuilded, event);\n    if (!isSync) {\n      this.waitForStylesheetLoad();\n    }\n    if (this.config.UNSAFE_replayCanvas) {\n      void this.preloadAllImages();\n    }\n  }\n  insertStyleRules(documentElement, head) {\n    const injectStylesRules = rules(\n      this.config.blockClass\n    ).concat(this.config.insertStyleRules);\n    if (this.config.pauseAnimation) {\n      injectStylesRules.push(\n        \"html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }\"\n      );\n    }\n    if (this.usingVirtualDom) {\n      const styleEl = this.virtualDom.createElement(\"style\");\n      this.virtualDom.mirror.add(\n        styleEl,\n        getDefaultSN(styleEl, this.virtualDom.unserializedId)\n      );\n      documentElement.insertBefore(styleEl, head);\n      styleEl.rules.push({\n        source: IncrementalSource.StyleSheetRule,\n        adds: injectStylesRules.map((cssText, index) => ({\n          rule: cssText,\n          index\n        }))\n      });\n    } else {\n      const styleEl = document.createElement(\"style\");\n      documentElement.insertBefore(\n        styleEl,\n        head\n      );\n      for (let idx = 0; idx < injectStylesRules.length; idx++) {\n        styleEl.sheet?.insertRule(injectStylesRules[idx], idx);\n      }\n    }\n  }\n  attachDocumentToIframe(mutation, iframeEl) {\n    const mirror2 = this.usingVirtualDom ? this.virtualDom.mirror : this.mirror;\n    const iframeContentDoc = getIFrameContentDocument(\n      iframeEl\n    );\n    const collected = [];\n    const afterAppend = (builtNode, id) => {\n      this.collectIframeAndAttachDocument(collected, builtNode);\n      const sn = mirror2.getMeta(builtNode);\n      if (sn?.type === NodeType$2.Element && sn?.tagName.toUpperCase() === \"HTML\" && iframeContentDoc) {\n        const { documentElement, head } = iframeContentDoc;\n        this.insertStyleRules(\n          documentElement,\n          head\n        );\n      }\n      if (this.usingVirtualDom) return;\n      for (const plugin of this.config.plugins || []) {\n        if (plugin.onBuild)\n          plugin.onBuild(builtNode, {\n            id,\n            replayer: this\n          });\n      }\n    };\n    buildNodeWithSN(mutation.node, {\n      doc: iframeContentDoc,\n      mirror: mirror2,\n      hackCss: true,\n      skipChild: false,\n      afterAppend,\n      cache: this.cache\n    });\n    afterAppend(iframeContentDoc, mutation.node.id);\n    for (const { mutationInQueue, builtNode } of collected) {\n      this.attachDocumentToIframe(mutationInQueue, builtNode);\n      this.newDocumentQueue = this.newDocumentQueue.filter(\n        (m) => m !== mutationInQueue\n      );\n    }\n  }\n  collectIframeAndAttachDocument(collected, builtNode) {\n    if (isSerializedIframe(builtNode, this.mirror)) {\n      const mutationInQueue = this.newDocumentQueue.find(\n        (m) => m.parentId === this.mirror.getId(builtNode)\n      );\n      if (mutationInQueue) {\n        collected.push({\n          mutationInQueue,\n          builtNode\n        });\n      }\n    }\n  }\n  /**\n   * pause when loading style sheet, resume when loaded all timeout exceed\n   */\n  waitForStylesheetLoad() {\n    const iframeDoc = getIFrameContentDocument(this.iframe);\n    const head = iframeDoc?.head;\n    if (head) {\n      const unloadSheets = /* @__PURE__ */ new Set();\n      let timer;\n      let beforeLoadState = this.service.state;\n      const stateHandler = () => {\n        beforeLoadState = this.service.state;\n      };\n      this.emitter.on(ReplayerEvents.Start, stateHandler);\n      this.emitter.on(ReplayerEvents.Pause, stateHandler);\n      const unsubscribe = () => {\n        this.emitter.off(ReplayerEvents.Start, stateHandler);\n        this.emitter.off(ReplayerEvents.Pause, stateHandler);\n      };\n      head.querySelectorAll('link[rel=\"stylesheet\"]').forEach((css) => {\n        if (!css.sheet) {\n          unloadSheets.add(css);\n          css.addEventListener(\"load\", () => {\n            unloadSheets.delete(css);\n            if (unloadSheets.size === 0 && timer !== -1) {\n              if (beforeLoadState.matches(\"playing\")) {\n                this.play(this.getCurrentTime());\n              }\n              this.emitter.emit(ReplayerEvents.LoadStylesheetEnd);\n              if (timer) {\n                clearTimeout(timer);\n              }\n              unsubscribe();\n            }\n          });\n        }\n      });\n      if (unloadSheets.size > 0) {\n        this.service.send({ type: \"PAUSE\" });\n        this.emitter.emit(ReplayerEvents.LoadStylesheetStart);\n        timer = setTimeout$1(() => {\n          if (beforeLoadState.matches(\"playing\")) {\n            this.play(this.getCurrentTime());\n          }\n          timer = -1;\n          unsubscribe();\n        }, this.config.loadTimeout);\n      }\n    }\n  }\n  /**\n   * pause when there are some canvas drawImage args need to be loaded\n   */\n  async preloadAllImages() {\n    const promises = [];\n    for (const event of this.service.state.context.events) {\n      if (event.type === EventType.IncrementalSnapshot && event.data.source === IncrementalSource.CanvasMutation) {\n        promises.push(\n          this.deserializeAndPreloadCanvasEvents(event.data, event)\n        );\n        const commands = \"commands\" in event.data ? event.data.commands : [event.data];\n        commands.forEach((c2) => {\n          this.preloadImages(c2, event);\n        });\n      }\n    }\n    return Promise.all(promises);\n  }\n  preloadImages(data, event) {\n    if (data.property === \"drawImage\" && typeof data.args[0] === \"string\" && !this.imageMap.has(event)) {\n      const canvas = document.createElement(\"canvas\");\n      const ctx = canvas.getContext(\"2d\");\n      const imgd = ctx?.createImageData(canvas.width, canvas.height);\n      ctx?.putImageData(imgd, 0, 0);\n    }\n  }\n  async deserializeAndPreloadCanvasEvents(data, event) {\n    if (!this.canvasEventMap.has(event)) {\n      const status = {\n        isUnchanged: true\n      };\n      if (\"commands\" in data) {\n        const commands = await Promise.all(\n          data.commands.map(async (c2) => {\n            const args = await Promise.all(\n              c2.args.map(deserializeArg(this.imageMap, null, status))\n            );\n            return { ...c2, args };\n          })\n        );\n        if (status.isUnchanged === false)\n          this.canvasEventMap.set(event, { ...data, commands });\n      } else {\n        const args = await Promise.all(\n          data.args.map(deserializeArg(this.imageMap, null, status))\n        );\n        if (status.isUnchanged === false)\n          this.canvasEventMap.set(event, { ...data, args });\n      }\n    }\n  }\n  applyIncremental(e2, isSync) {\n    const { data: d } = e2;\n    switch (d.source) {\n      case IncrementalSource.Mutation: {\n        try {\n          this.applyMutation(d, isSync);\n        } catch (error) {\n          this.warn(`Exception in mutation ${error.message || error}`, d);\n        }\n        break;\n      }\n      case IncrementalSource.Drag:\n      case IncrementalSource.TouchMove:\n      case IncrementalSource.MouseMove: {\n        const pointerId = getPointerId(d);\n        if (!this.pointers[pointerId]) {\n          this.createPointer(pointerId, e2);\n        }\n        const pointer = this.pointers[pointerId];\n        if (isSync) {\n          const lastPosition = d.positions[d.positions.length - 1];\n          pointer.pointerPosition = {\n            x: lastPosition.x,\n            y: lastPosition.y,\n            id: lastPosition.id,\n            debugData: d\n          };\n        } else {\n          d.positions.forEach((p) => {\n            const action = {\n              doAction: () => {\n                this.moveAndHover(p.x, p.y, p.id, isSync, d, pointerId);\n              },\n              delay: p.timeOffset + e2.timestamp - this.service.state.context.baselineTime\n            };\n            this.timer.addAction(action);\n          });\n          this.timer.addAction({\n            doAction() {\n            },\n            // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n            delay: e2.delay - d.positions[0]?.timeOffset\n          });\n        }\n        break;\n      }\n      case IncrementalSource.MouseInteraction: {\n        const pointerId = getPointerId(d);\n        if (!this.pointers[pointerId]) {\n          this.createPointer(pointerId, e2);\n        }\n        const pointer = this.pointers[pointerId];\n        if (d.id === -1) {\n          break;\n        }\n        const event = new Event(toLowerCase(MouseInteractions[d.type]));\n        const target = this.mirror.getNode(d.id);\n        if (!target) {\n          return this.debugNodeNotFound(d, d.id);\n        }\n        this.emitter.emit(ReplayerEvents.MouseInteraction, {\n          type: d.type,\n          target\n        });\n        const { triggerFocus } = this.config;\n        switch (d.type) {\n          case MouseInteractions.Blur:\n            if (\"blur\" in target) {\n              target.blur();\n            }\n            break;\n          case MouseInteractions.Focus:\n            if (triggerFocus && target.focus) {\n              target.focus({\n                preventScroll: true\n              });\n            }\n            break;\n          case MouseInteractions.Click:\n          case MouseInteractions.TouchStart:\n          case MouseInteractions.TouchEnd:\n          case MouseInteractions.MouseDown:\n          case MouseInteractions.MouseUp:\n            if (isSync) {\n              if (d.type === MouseInteractions.TouchStart) {\n                pointer.touchActive = true;\n                Object.values(this.pointers).forEach((p) => {\n                  if (p !== pointer && !p.touchActive) {\n                    p.touchActive = false;\n                  }\n                });\n              } else if (d.type === MouseInteractions.TouchEnd) {\n                pointer.touchActive = false;\n                pointer.pointerEl.remove();\n                if (pointer.mouseTail) {\n                  pointer.mouseTail.remove();\n                }\n                delete this.pointers[pointerId];\n              }\n              if (d.type === MouseInteractions.MouseDown) {\n                this.lastMouseDownEvent = [target, event];\n              } else if (d.type === MouseInteractions.MouseUp) {\n                this.lastMouseDownEvent = null;\n              }\n              pointer.pointerPosition = {\n                x: d.x || 0,\n                y: d.y || 0,\n                id: d.id,\n                debugData: d\n              };\n            } else {\n              if (d.type === MouseInteractions.TouchStart) {\n                pointer.tailPositions.length = 0;\n              }\n              this.moveAndHover(d.x || 0, d.y || 0, d.id, isSync, d, pointerId);\n              if (d.type === MouseInteractions.Click) {\n                pointer.pointerEl.classList.remove(\"active\");\n                void pointer.pointerEl.offsetWidth;\n                pointer.pointerEl.classList.add(\"active\");\n              } else if (d.type === MouseInteractions.TouchStart) {\n                void pointer.pointerEl.offsetWidth;\n                pointer.pointerEl.classList.add(\"touch-active\");\n              } else if (d.type === MouseInteractions.TouchEnd) {\n                pointer.pointerEl.remove();\n                if (pointer.mouseTail) {\n                  pointer.mouseTail.remove();\n                }\n                delete this.pointers[pointerId];\n              } else {\n                target.dispatchEvent(event);\n              }\n            }\n            break;\n          case MouseInteractions.TouchCancel:\n            if (isSync) {\n              pointer.touchActive = false;\n            } else {\n              pointer.pointerEl.classList.remove(\"touch-active\");\n            }\n            break;\n          default:\n            target.dispatchEvent(event);\n        }\n        break;\n      }\n      case IncrementalSource.Scroll: {\n        if (d.id === -1) {\n          break;\n        }\n        if (this.usingVirtualDom) {\n          const target = this.virtualDom.mirror.getNode(d.id);\n          if (!target) {\n            return this.debugNodeNotFound(d, d.id);\n          }\n          target.scrollData = d;\n          break;\n        }\n        this.applyScroll(d, isSync);\n        break;\n      }\n      case IncrementalSource.ViewportResize:\n        this.emitter.emit(ReplayerEvents.Resize, {\n          width: d.width,\n          height: d.height\n        });\n        break;\n      case IncrementalSource.Input: {\n        if (d.id === -1) {\n          break;\n        }\n        if (this.usingVirtualDom) {\n          const target = this.virtualDom.mirror.getNode(d.id);\n          if (!target) {\n            return this.debugNodeNotFound(d, d.id);\n          }\n          target.inputData = d;\n          break;\n        }\n        this.applyInput(d);\n        break;\n      }\n      case IncrementalSource.MediaInteraction: {\n        const target = this.usingVirtualDom ? this.virtualDom.mirror.getNode(d.id) : this.mirror.getNode(d.id);\n        if (!target) {\n          return this.debugNodeNotFound(d, d.id);\n        }\n        const mediaEl = target;\n        try {\n          if (d.currentTime !== void 0) {\n            mediaEl.currentTime = d.currentTime;\n          }\n          if (d.volume !== void 0) {\n            mediaEl.volume = d.volume;\n          }\n          if (d.muted !== void 0) {\n            mediaEl.muted = d.muted;\n          }\n          if (d.type === MediaInteractions.Pause) {\n            mediaEl.pause();\n          }\n          if (d.type === MediaInteractions.Play) {\n            const maybePlayPromise = mediaEl.play();\n            if (typeof maybePlayPromise?.catch === \"function\") {\n              maybePlayPromise.catch((err) => {\n                console.warn(err);\n              });\n            }\n          }\n          if (d.type === MediaInteractions.RateChange) {\n            mediaEl.playbackRate = d.playbackRate;\n          }\n        } catch (error) {\n          this.warn(\n            // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/restrict-template-expressions\n            `Failed to replay media interactions: ${error.message || error}`\n          );\n        }\n        break;\n      }\n      case IncrementalSource.StyleSheetRule:\n      case IncrementalSource.StyleDeclaration: {\n        if (this.usingVirtualDom) {\n          if (d.styleId) this.constructedStyleMutations.push(d);\n          else if (d.id)\n            this.virtualDom.mirror.getNode(d.id)?.rules?.push(d);\n        } else this.applyStyleSheetMutation(d);\n        break;\n      }\n      case IncrementalSource.CanvasMutation: {\n        if (!this.config.UNSAFE_replayCanvas) {\n          return;\n        }\n        if (this.usingVirtualDom) {\n          const target = this.virtualDom.mirror.getNode(\n            d.id\n          );\n          if (!target) {\n            return this.debugNodeNotFound(d, d.id);\n          }\n          target.canvasMutations.push({\n            event: e2,\n            mutation: d\n          });\n        } else {\n          const target = this.mirror.getNode(d.id);\n          if (!target) {\n            return this.debugNodeNotFound(d, d.id);\n          }\n          void canvasMutation({\n            event: e2,\n            mutation: d,\n            target,\n            imageMap: this.imageMap,\n            canvasEventMap: this.canvasEventMap,\n            errorHandler: this.warnCanvasMutationFailed.bind(this)\n          });\n        }\n        break;\n      }\n      case IncrementalSource.Font: {\n        try {\n          const fontFace = new FontFace(\n            d.family,\n            d.buffer ? new Uint8Array(JSON.parse(d.fontSource)) : d.fontSource,\n            d.descriptors\n          );\n          getIFrameContentDocument(this.iframe)?.fonts.add(fontFace);\n        } catch (error) {\n          this.warn(error);\n        }\n        break;\n      }\n      case IncrementalSource.Selection: {\n        if (isSync) {\n          this.lastSelectionData = d;\n          break;\n        }\n        this.applySelection(d);\n        break;\n      }\n      case IncrementalSource.AdoptedStyleSheet: {\n        if (this.usingVirtualDom) this.adoptedStyleSheets.push(d);\n        else this.applyAdoptedStyleSheet(d);\n        break;\n      }\n    }\n  }\n  applyMutation(d, isSync) {\n    if (this.config.useVirtualDom && !this.usingVirtualDom && isSync) {\n      this.usingVirtualDom = true;\n      const iframeDoc = getIFrameContentDocument(this.iframe);\n      if (iframeDoc) {\n        buildFromDom(iframeDoc, this.mirror, this.virtualDom);\n      }\n      if (Object.keys(this.legacy_missingNodeRetryMap).length) {\n        for (const key in this.legacy_missingNodeRetryMap) {\n          try {\n            const value = this.legacy_missingNodeRetryMap[key];\n            const virtualNode = buildFromNode(\n              value.node,\n              this.virtualDom,\n              this.mirror\n            );\n            if (virtualNode) value.node = virtualNode;\n          } catch (error) {\n            this.warn(error);\n          }\n        }\n      }\n    }\n    const mirror2 = this.usingVirtualDom ? this.virtualDom.mirror : this.mirror;\n    d.removes = d.removes.filter((mutation) => {\n      if (!mirror2.getNode(mutation.id)) {\n        this.warnNodeNotFound(d, mutation.id);\n        return false;\n      }\n      return true;\n    });\n    d.removes.forEach((mutation) => {\n      const target = mirror2.getNode(mutation.id);\n      if (!target) {\n        return;\n      }\n      let parent = mirror2.getNode(\n        mutation.parentId\n      );\n      if (!parent) {\n        return this.warnNodeNotFound(d, mutation.parentId);\n      }\n      if (mutation.isShadow && hasShadowRoot(parent)) {\n        parent = parent.shadowRoot;\n      }\n      mirror2.removeNodeFromMap(target);\n      if (parent)\n        try {\n          parent.removeChild(target);\n          if (this.usingVirtualDom && target.nodeName === \"#text\" && parent.nodeName === \"STYLE\" && parent.rules?.length > 0)\n            parent.rules = [];\n        } catch (error) {\n          if (error instanceof DOMException) {\n            this.warn(\n              \"parent could not remove child in mutation\",\n              parent,\n              target,\n              d\n            );\n          } else {\n            throw error;\n          }\n        }\n    });\n    const legacy_missingNodeMap = {\n      ...this.legacy_missingNodeRetryMap\n    };\n    const queue = [];\n    const nextNotInDOM = (mutation) => {\n      let next = null;\n      if (mutation.nextId) {\n        next = mirror2.getNode(mutation.nextId);\n      }\n      if (mutation.nextId !== null && mutation.nextId !== void 0 && mutation.nextId !== -1 && !next) {\n        return true;\n      }\n      return false;\n    };\n    const appendNode = (mutation) => {\n      const iframeDoc = getIFrameContentDocument(this.iframe);\n      if (!iframeDoc) {\n        return this.warn(\"Looks like your replayer has been destroyed.\");\n      }\n      let parent = mirror2.getNode(\n        mutation.parentId\n      );\n      if (!parent) {\n        if (mutation.node.type === NodeType$2.Document) {\n          return this.newDocumentQueue.push(mutation);\n        }\n        return queue.push(mutation);\n      }\n      if (mutation.node.isShadow) {\n        if (!hasShadowRoot(parent)) {\n          parent.attachShadow({ mode: \"open\" });\n          parent = parent.shadowRoot;\n        } else parent = parent.shadowRoot;\n      }\n      let previous = null;\n      let next = null;\n      if (mutation.previousId) {\n        previous = mirror2.getNode(mutation.previousId);\n      }\n      if (mutation.nextId) {\n        next = mirror2.getNode(mutation.nextId);\n      }\n      if (nextNotInDOM(mutation)) {\n        return queue.push(mutation);\n      }\n      if (mutation.node.rootId && !mirror2.getNode(mutation.node.rootId)) {\n        return;\n      }\n      const targetDoc = mutation.node.rootId ? mirror2.getNode(mutation.node.rootId) : this.usingVirtualDom ? this.virtualDom : iframeDoc;\n      if (isSerializedIframe(parent, mirror2)) {\n        this.attachDocumentToIframe(\n          mutation,\n          parent\n        );\n        return;\n      }\n      const afterAppend = (node, id) => {\n        if (this.usingVirtualDom) return;\n        for (const plugin of this.config.plugins || []) {\n          if (plugin.onBuild) plugin.onBuild(node, { id, replayer: this });\n        }\n      };\n      const target = buildNodeWithSN(mutation.node, {\n        doc: targetDoc,\n        // can be Document or RRDocument\n        mirror: mirror2,\n        // can be this.mirror or virtualDom.mirror\n        skipChild: true,\n        hackCss: true,\n        cache: this.cache,\n        /**\n         * caveat: `afterAppend` only gets called on child nodes of target\n         * we have to call it again below when this target was added to the DOM\n         */\n        afterAppend\n      });\n      if (mutation.previousId === -1 || mutation.nextId === -1) {\n        legacy_missingNodeMap[mutation.node.id] = {\n          node: target,\n          mutation\n        };\n        return;\n      }\n      const parentSn = mirror2.getMeta(parent);\n      if (parentSn && parentSn.type === NodeType$2.Element && parentSn.tagName === \"textarea\" && mutation.node.type === NodeType$2.Text) {\n        const childNodeArray = Array.isArray(parent.childNodes) ? parent.childNodes : Array.from(parent.childNodes);\n        for (const c2 of childNodeArray) {\n          if (c2.nodeType === parent.TEXT_NODE) {\n            parent.removeChild(c2);\n          }\n        }\n      } else if (parentSn?.type === NodeType$2.Document) {\n        const parentDoc = parent;\n        if (mutation.node.type === NodeType$2.DocumentType && parentDoc.childNodes[0]?.nodeType === Node.DOCUMENT_TYPE_NODE)\n          parentDoc.removeChild(parentDoc.childNodes[0]);\n        if (target.nodeName === \"HTML\" && parentDoc.documentElement)\n          parentDoc.removeChild(\n            parentDoc.documentElement\n          );\n      }\n      if (previous && previous.nextSibling && previous.nextSibling.parentNode) {\n        parent.insertBefore(\n          target,\n          previous.nextSibling\n        );\n      } else if (next && next.parentNode) {\n        parent.contains(next) ? parent.insertBefore(target, next) : parent.insertBefore(target, null);\n      } else {\n        parent.appendChild(target);\n      }\n      afterAppend(target, mutation.node.id);\n      if (this.usingVirtualDom && target.nodeName === \"#text\" && parent.nodeName === \"STYLE\" && parent.rules?.length > 0)\n        parent.rules = [];\n      if (isSerializedIframe(target, this.mirror)) {\n        const targetId = this.mirror.getId(target);\n        const mutationInQueue = this.newDocumentQueue.find(\n          (m) => m.parentId === targetId\n        );\n        if (mutationInQueue) {\n          this.attachDocumentToIframe(\n            mutationInQueue,\n            target\n          );\n          this.newDocumentQueue = this.newDocumentQueue.filter(\n            (m) => m !== mutationInQueue\n          );\n        }\n      }\n      if (mutation.previousId || mutation.nextId) {\n        this.legacy_resolveMissingNode(\n          legacy_missingNodeMap,\n          parent,\n          target,\n          mutation\n        );\n      }\n    };\n    d.adds.forEach((mutation) => {\n      appendNode(mutation);\n    });\n    const startTime = Date.now();\n    while (queue.length) {\n      const resolveTrees = queueToResolveTrees(queue);\n      queue.length = 0;\n      if (Date.now() - startTime > 500) {\n        this.warn(\n          \"Timeout in the loop, please check the resolve tree data:\",\n          resolveTrees\n        );\n        break;\n      }\n      for (const tree of resolveTrees) {\n        const parent = mirror2.getNode(tree.value.parentId);\n        if (!parent) {\n          this.debug(\n            \"Drop resolve tree since there is no parent for the root node.\",\n            tree\n          );\n        } else {\n          iterateResolveTree(tree, (mutation) => {\n            appendNode(mutation);\n          });\n        }\n      }\n    }\n    if (Object.keys(legacy_missingNodeMap).length) {\n      Object.assign(this.legacy_missingNodeRetryMap, legacy_missingNodeMap);\n    }\n    uniqueTextMutations(d.texts).forEach((mutation) => {\n      const target = mirror2.getNode(mutation.id);\n      if (!target) {\n        if (d.removes.find((r2) => r2.id === mutation.id)) {\n          return;\n        }\n        return this.warnNodeNotFound(d, mutation.id);\n      }\n      target.textContent = mutation.value;\n      if (this.usingVirtualDom) {\n        const parent = target.parentNode;\n        if (parent?.rules?.length > 0) parent.rules = [];\n      }\n    });\n    d.attributes.forEach((mutation) => {\n      const target = mirror2.getNode(mutation.id);\n      if (!target) {\n        if (d.removes.find((r2) => r2.id === mutation.id)) {\n          return;\n        }\n        return this.warnNodeNotFound(d, mutation.id);\n      }\n      for (const attributeName in mutation.attributes) {\n        if (typeof attributeName === \"string\") {\n          const value = mutation.attributes[attributeName];\n          if (value === null) {\n            target.removeAttribute(attributeName);\n          } else if (typeof value === \"string\") {\n            try {\n              if (attributeName === \"_cssText\" && (target.nodeName === \"LINK\" || target.nodeName === \"STYLE\")) {\n                try {\n                  const newSn = mirror2.getMeta(\n                    target\n                  );\n                  const newNode = buildNodeWithSN(\n                    {\n                      ...newSn,\n                      attributes: {\n                        ...newSn.attributes,\n                        ...mutation.attributes\n                      }\n                    },\n                    {\n                      doc: target.ownerDocument,\n                      // can be Document or RRDocument\n                      mirror: mirror2,\n                      skipChild: true,\n                      hackCss: true,\n                      cache: this.cache\n                    }\n                  );\n                  const siblingNode = target.nextSibling;\n                  const parentNode = target.parentNode;\n                  if (newNode && parentNode) {\n                    parentNode.removeChild(target);\n                    parentNode.insertBefore(\n                      newNode,\n                      siblingNode\n                    );\n                    mirror2.replace(mutation.id, newNode);\n                    break;\n                  }\n                } catch (e2) {\n                }\n              }\n              if (target.nodeType !== 3) {\n                target.setAttribute(\n                  attributeName,\n                  value\n                );\n              }\n            } catch (error) {\n              this.warn(\n                \"An error occurred may due to the checkout feature.\",\n                error\n              );\n            }\n          } else if (attributeName === \"style\") {\n            const styleValues = value;\n            const targetEl = target;\n            for (const s2 in styleValues) {\n              if (styleValues[s2] === false) {\n                targetEl.style.removeProperty(s2);\n              } else if (styleValues[s2] instanceof Array) {\n                const svp = styleValues[s2];\n                targetEl.style.setProperty(s2, svp[0], svp[1]);\n              } else {\n                const svs = styleValues[s2];\n                targetEl.style.setProperty(s2, svs);\n              }\n            }\n          }\n        }\n      }\n    });\n  }\n  /**\n   * Apply the scroll data on real elements.\n   * If the replayer is in sync mode, smooth scroll behavior should be disabled.\n   * @param d - the scroll data\n   * @param isSync - whether the replayer is in sync mode(fast-forward)\n   */\n  applyScroll(d, isSync) {\n    const target = this.mirror.getNode(d.id);\n    if (!target) {\n      return this.debugNodeNotFound(d, d.id);\n    }\n    const sn = this.mirror.getMeta(target);\n    const iframeDoc = getIFrameContentDocument(this.iframe);\n    if (target === iframeDoc) {\n      this.iframe.contentWindow?.scrollTo({\n        top: d.y,\n        left: d.x,\n        behavior: isSync ? \"auto\" : \"smooth\"\n      });\n    } else if (sn?.type === NodeType$2.Document) {\n      target.defaultView?.scrollTo({\n        top: d.y,\n        left: d.x,\n        behavior: isSync ? \"auto\" : \"smooth\"\n      });\n    } else {\n      try {\n        target.scrollTo({\n          top: d.y,\n          left: d.x,\n          behavior: isSync ? \"auto\" : \"smooth\"\n        });\n      } catch (error) {\n      }\n    }\n  }\n  applyInput(d) {\n    const target = this.mirror.getNode(d.id);\n    if (!target) {\n      return this.debugNodeNotFound(d, d.id);\n    }\n    try {\n      target.checked = d.isChecked;\n      target.value = d.text;\n    } catch (error) {\n    }\n  }\n  applySelection(d) {\n    try {\n      const selectionSet = /* @__PURE__ */ new Set();\n      const ranges = d.ranges.map(({ start, startOffset, end, endOffset }) => {\n        const startContainer = this.mirror.getNode(start);\n        const endContainer = this.mirror.getNode(end);\n        if (!startContainer || !endContainer) return;\n        const result = new Range();\n        result.setStart(startContainer, startOffset);\n        result.setEnd(endContainer, endOffset);\n        const doc = startContainer.ownerDocument;\n        const selection = doc?.getSelection();\n        selection && selectionSet.add(selection);\n        return {\n          range: result,\n          selection\n        };\n      });\n      selectionSet.forEach((s2) => s2.removeAllRanges());\n      ranges.forEach((r2) => r2 && r2.selection?.addRange(r2.range));\n    } catch (error) {\n    }\n  }\n  applyStyleSheetMutation(data) {\n    let styleSheet = null;\n    if (data.styleId) styleSheet = this.styleMirror.getStyle(data.styleId);\n    else if (data.id)\n      styleSheet = this.mirror.getNode(data.id)?.sheet || null;\n    if (!styleSheet) return;\n    if (data.source === IncrementalSource.StyleSheetRule)\n      this.applyStyleSheetRule(data, styleSheet);\n    else if (data.source === IncrementalSource.StyleDeclaration)\n      this.applyStyleDeclaration(data, styleSheet);\n  }\n  applyStyleSheetRule(data, styleSheet) {\n    data.adds?.forEach(({ rule, index: nestedIndex }) => {\n      try {\n        if (Array.isArray(nestedIndex)) {\n          const { positions, index } = getPositionsAndIndex(nestedIndex);\n          const nestedRule = getNestedRule(styleSheet.cssRules, positions);\n          nestedRule.insertRule(rule, index);\n        } else {\n          const index = nestedIndex === void 0 ? void 0 : Math.min(nestedIndex, styleSheet.cssRules.length);\n          styleSheet?.insertRule(rule, index);\n        }\n      } catch (e2) {\n      }\n    });\n    data.removes?.forEach(({ index: nestedIndex }) => {\n      try {\n        if (Array.isArray(nestedIndex)) {\n          const { positions, index } = getPositionsAndIndex(nestedIndex);\n          const nestedRule = getNestedRule(styleSheet.cssRules, positions);\n          nestedRule.deleteRule(index || 0);\n        } else {\n          styleSheet?.deleteRule(nestedIndex);\n        }\n      } catch (e2) {\n      }\n    });\n    if (data.replace)\n      try {\n        void styleSheet.replace?.(data.replace);\n      } catch (e2) {\n      }\n    if (data.replaceSync)\n      try {\n        styleSheet.replaceSync?.(data.replaceSync);\n      } catch (e2) {\n      }\n  }\n  applyStyleDeclaration(data, styleSheet) {\n    if (data.set) {\n      const rule = getNestedRule(\n        styleSheet.rules,\n        data.index\n      );\n      rule && rule.style && rule.style.setProperty(\n        data.set.property,\n        data.set.value,\n        data.set.priority\n      );\n    }\n    if (data.remove) {\n      const rule = getNestedRule(\n        styleSheet.rules,\n        data.index\n      );\n      rule && rule.style && rule.style.removeProperty(data.remove.property);\n    }\n  }\n  applyAdoptedStyleSheet(data) {\n    const targetHost = this.mirror.getNode(data.id);\n    if (!targetHost) return;\n    data.styles?.forEach((style) => {\n      let newStyleSheet = null;\n      let hostWindow = null;\n      if (hasShadowRoot(targetHost))\n        hostWindow = targetHost.ownerDocument?.defaultView || null;\n      else if (targetHost.nodeName === \"#document\")\n        hostWindow = targetHost.defaultView;\n      if (!hostWindow) return;\n      try {\n        newStyleSheet = new hostWindow.CSSStyleSheet();\n        this.styleMirror.add(newStyleSheet, style.styleId);\n        this.applyStyleSheetRule(\n          {\n            source: IncrementalSource.StyleSheetRule,\n            adds: style.rules\n          },\n          newStyleSheet\n        );\n      } catch (e2) {\n      }\n    });\n    const MAX_RETRY_TIME = 10;\n    let count = 0;\n    const adoptStyleSheets = (targetHost2, styleIds) => {\n      const stylesToAdopt = styleIds.map((styleId) => this.styleMirror.getStyle(styleId)).filter((style) => style !== null);\n      if (hasShadowRoot(targetHost2))\n        targetHost2.shadowRoot.adoptedStyleSheets = stylesToAdopt;\n      else if (targetHost2.nodeName === \"#document\")\n        targetHost2.adoptedStyleSheets = stylesToAdopt;\n      if (stylesToAdopt.length !== styleIds.length && count < MAX_RETRY_TIME) {\n        setTimeout$1(\n          () => adoptStyleSheets(targetHost2, styleIds),\n          0 + 100 * count\n        );\n        count++;\n      }\n    };\n    adoptStyleSheets(targetHost, data.styleIds);\n  }\n  legacy_resolveMissingNode(map, parent, target, targetMutation) {\n    const { previousId, nextId } = targetMutation;\n    const previousInMap = previousId && map[previousId];\n    const nextInMap = nextId && map[nextId];\n    if (previousInMap) {\n      const { node, mutation } = previousInMap;\n      parent.insertBefore(node, target);\n      delete map[mutation.node.id];\n      delete this.legacy_missingNodeRetryMap[mutation.node.id];\n      if (mutation.previousId || mutation.nextId) {\n        this.legacy_resolveMissingNode(map, parent, node, mutation);\n      }\n    }\n    if (nextInMap) {\n      const { node, mutation } = nextInMap;\n      parent.insertBefore(\n        node,\n        target.nextSibling\n      );\n      delete map[mutation.node.id];\n      delete this.legacy_missingNodeRetryMap[mutation.node.id];\n      if (mutation.previousId || mutation.nextId) {\n        this.legacy_resolveMissingNode(map, parent, node, mutation);\n      }\n    }\n  }\n  moveAndHover(x, y, id, isSync, debugData, pointerId) {\n    const target = this.mirror.getNode(id);\n    if (!target) {\n      return this.debugNodeNotFound(debugData, id);\n    }\n    const base = getBaseDimension(target, this.iframe);\n    const _x = x * base.absoluteScale + base.x;\n    const _y = y * base.absoluteScale + base.y;\n    const pointer = this.pointers[pointerId];\n    if (pointer && pointer.pointerEl) {\n      pointer.pointerEl.style.left = `${_x}px`;\n      pointer.pointerEl.style.top = `${_y}px`;\n    }\n    if (!isSync) {\n      this.drawMouseTail({ x: _x, y: _y }, pointerId);\n    }\n    this.hoverElements(target);\n  }\n  drawMouseTail(position, pointerId) {\n    const pointer = this.pointers[pointerId];\n    if (!pointer || !pointer.mouseTail) {\n      return;\n    }\n    const { lineCap, lineWidth, strokeStyle, duration } = this.config.mouseTail === true ? defaultMouseTailConfig : Object.assign({}, defaultMouseTailConfig, this.config.mouseTail);\n    const draw = () => {\n      if (!pointer || !pointer.mouseTail) {\n        return;\n      }\n      const mouseTail = pointer.mouseTail;\n      const ctx = mouseTail.getContext(\"2d\");\n      if (!ctx || !pointer.tailPositions.length) {\n        return;\n      }\n      ctx.clearRect(0, 0, mouseTail.width, mouseTail.height);\n      ctx.beginPath();\n      ctx.lineWidth = lineWidth;\n      ctx.lineCap = lineCap;\n      ctx.strokeStyle = strokeStyle;\n      ctx.moveTo(pointer.tailPositions[0].x, pointer.tailPositions[0].y);\n      pointer.tailPositions.forEach((p) => ctx.lineTo(p.x, p.y));\n      ctx.stroke();\n    };\n    pointer.tailPositions.push(position);\n    draw();\n    setTimeout$1(() => {\n      if (pointerId in this.pointers) {\n        pointer.tailPositions = pointer.tailPositions.filter(\n          (p) => p !== position\n        );\n        draw();\n      }\n    }, duration / this.speedService.state.context.timer.speed);\n  }\n  hoverElements(el) {\n    const iframeDoc = getIFrameContentDocument(this.iframe);\n    const rootElement = this.lastHoveredRootNode || iframeDoc;\n    if (rootElement && typeof rootElement.querySelectorAll === \"function\") {\n      rootElement.querySelectorAll(\".\\\\:hover\").forEach((hoveredEl) => {\n        hoveredEl.classList.remove(\":hover\");\n      });\n    }\n    this.lastHoveredRootNode = el.getRootNode();\n    let currentEl = el;\n    while (currentEl) {\n      if (currentEl.classList) {\n        currentEl.classList.add(\":hover\");\n      }\n      currentEl = currentEl.parentElement;\n    }\n  }\n  isUserInteraction(event) {\n    if (event.type !== EventType.IncrementalSnapshot) {\n      return false;\n    }\n    return event.data.source > IncrementalSource.Mutation && event.data.source <= IncrementalSource.Input;\n  }\n  backToNormal() {\n    this.nextUserInteractionEvent = null;\n    if (this.speedService.state.matches(\"normal\")) {\n      return;\n    }\n    this.speedService.send({ type: \"BACK_TO_NORMAL\" });\n    this.emitter.emit(ReplayerEvents.SkipEnd, {\n      speed: this.speedService.state.context.normalSpeed\n    });\n  }\n  warnNodeNotFound(d, id) {\n    this.warn(`Node with id '${id}' not found. `, d);\n  }\n  warnCanvasMutationFailed(d, error) {\n    this.warn(`Has error on canvas update`, error, \"canvas mutation:\", d);\n  }\n  debugNodeNotFound(d, id) {\n    this.debug(`Node with id '${id}' not found. `, d);\n  }\n  warn(...args) {\n    if (!this.config.showWarning) {\n      return;\n    }\n    this.config.logger.warn(REPLAY_CONSOLE_PREFIX, ...args);\n  }\n  debug(...args) {\n    if (!this.config.showDebug) {\n      return;\n    }\n    this.config.logger.log(REPLAY_CONSOLE_PREFIX, ...args);\n  }\n}\nexport {\n  a9 as CanvasManager,\n  EventType,\n  IncrementalSource,\n  MouseInteractions,\n  Replayer,\n  ReplayerEvents,\n  addCustomEvent,\n  canvasMutation,\n  deserializeArg,\n  freezePage,\n  record,\n  takeFullSnapshot,\n  aa as utils\n};\n//# sourceMappingURL=rrweb.js.map\n", "import type { Integration, IntegrationFn } from '@sentry/core';\nimport { defineIntegration } from '@sentry/core';\nimport type { CanvasManagerInterface, CanvasManagerOptions } from '@sentry/replay';\nimport { CanvasManager } from '@sentry/rrweb';\n\ninterface SnapshotOptions {\n  skipRequestAnimationFrame?: boolean;\n}\n\ninterface ReplayCanvasIntegration extends Integration {\n  snapshot: (canvasElement?: HTMLCanvasElement, options?: SnapshotOptions) => Promise<void>;\n}\n\ninterface ReplayCanvasOptions {\n  enableManualSnapshot?: boolean;\n  maxCanvasSize?: [width: number, height: number];\n  quality: 'low' | 'medium' | 'high';\n}\n\ntype GetCanvasManager = (options: CanvasManagerOptions) => CanvasManagerInterface;\nexport interface ReplayCanvasIntegrationOptions {\n  enableManualSnapshot?: boolean;\n  maxCanvasSize?: number;\n  recordCanvas: true;\n  getCanvasManager: GetCanvasManager;\n  sampling: {\n    canvas: number;\n  };\n  dataURLOptions: {\n    type: string;\n    quality: number;\n  };\n}\n\nconst CANVAS_QUALITY = {\n  low: {\n    sampling: {\n      canvas: 1,\n    },\n    dataURLOptions: {\n      type: 'image/webp',\n      quality: 0.25,\n    },\n  },\n  medium: {\n    sampling: {\n      canvas: 2,\n    },\n    dataURLOptions: {\n      type: 'image/webp',\n      quality: 0.4,\n    },\n  },\n  high: {\n    sampling: {\n      canvas: 4,\n    },\n    dataURLOptions: {\n      type: 'image/webp',\n      quality: 0.5,\n    },\n  },\n};\n\nconst INTEGRATION_NAME = 'ReplayCanvas';\nconst DEFAULT_MAX_CANVAS_SIZE = 1280;\n\n/** Exported only for type safe tests. */\nexport const _replayCanvasIntegration = ((options: Partial<ReplayCanvasOptions> = {}) => {\n  const [maxCanvasWidth, maxCanvasHeight] = options.maxCanvasSize || [];\n  const _canvasOptions = {\n    quality: options.quality || 'medium',\n    enableManualSnapshot: options.enableManualSnapshot,\n    maxCanvasSize: [\n      maxCanvasWidth ? Math.min(maxCanvasWidth, DEFAULT_MAX_CANVAS_SIZE) : DEFAULT_MAX_CANVAS_SIZE,\n      maxCanvasHeight ? Math.min(maxCanvasHeight, DEFAULT_MAX_CANVAS_SIZE) : DEFAULT_MAX_CANVAS_SIZE,\n    ] as [number, number],\n  };\n\n  let currentCanvasManager: CanvasManager | undefined;\n  let canvasManagerResolve: (value: CanvasManager) => void;\n  const _canvasManager: Promise<CanvasManager> = new Promise(resolve => (canvasManagerResolve = resolve));\n\n  return {\n    name: INTEGRATION_NAME,\n    getOptions(): ReplayCanvasIntegrationOptions {\n      const { quality, enableManualSnapshot, maxCanvasSize } = _canvasOptions;\n\n      return {\n        enableManualSnapshot,\n        recordCanvas: true,\n        getCanvasManager: (getCanvasManagerOptions: CanvasManagerOptions) => {\n          const manager = new CanvasManager({\n            ...getCanvasManagerOptions,\n            enableManualSnapshot,\n            maxCanvasSize,\n            errorHandler: (err: unknown) => {\n              try {\n                if (typeof err === 'object') {\n                  (err as Error & { __rrweb__?: boolean }).__rrweb__ = true;\n                }\n              } catch {\n                // ignore errors here\n                // this can happen if the error is frozen or does not allow mutation for other reasons\n              }\n            },\n          });\n\n          currentCanvasManager = manager;\n\n          // Resolve promise on first call for backward compatibility\n          canvasManagerResolve(manager);\n\n          return manager;\n        },\n        ...(CANVAS_QUALITY[quality || 'medium'] || CANVAS_QUALITY.medium),\n      };\n    },\n    async snapshot(canvasElement?: HTMLCanvasElement, options?: SnapshotOptions) {\n      const canvasManager = currentCanvasManager || (await _canvasManager);\n\n      canvasManager.snapshot(canvasElement, options);\n    },\n  };\n}) satisfies IntegrationFn<ReplayCanvasIntegration>;\n\n/**\n * Add this in addition to `replayIntegration()` to enable canvas recording.\n */\nexport const replayCanvasIntegration = defineIntegration(\n  _replayCanvasIntegration,\n) as IntegrationFn<ReplayCanvasIntegration>;\n", "import { WINDOW } from '../helpers';\n\n/**\n * Checks if the baggage header has Sentry values.\n */\nexport function baggageHeaderHasSentryValues(baggageHeader: string): boolean {\n  return baggageHeader.split(',').some(value => value.trim().startsWith('sentry-'));\n}\n\n/**\n * Gets the full URL from a given URL string.\n */\nexport function getFullURL(url: string): string | undefined {\n  try {\n    // By adding a base URL to new URL(), this will also work for relative urls\n    // If `url` is a full URL, the base URL is ignored anyhow\n    const parsed = new URL(url, WINDOW.location.origin);\n    return parsed.href;\n  } catch {\n    return undefined;\n  }\n}\n\n/**\n * Checks if the entry is a PerformanceResourceTiming.\n */\nexport function isPerformanceResourceTiming(entry: PerformanceEntry): entry is PerformanceResourceTiming {\n  return (\n    entry.entryType === 'resource' &&\n    'initiatorType' in entry &&\n    typeof (entry as PerformanceResourceTiming).nextHopProtocol === 'string' &&\n    (entry.initiatorType === 'fetch' || entry.initiatorType === 'xmlhttprequest')\n  );\n}\n\n/**\n * Creates a Headers object from a record of string key-value pairs, and returns undefined if it fails.\n */\nexport function createHeadersSafely(headers: Record<string, string> | undefined): Headers | undefined {\n  try {\n    return new Headers(headers);\n  } catch {\n    // noop\n    return undefined;\n  }\n}\n", "/* eslint-disable max-lines */\nimport type {\n  Client,\n  HandlerDataXhr,\n  RequestHookInfo,\n  ResponseHookInfo,\n  SentryWrappedXMLHttpRequest,\n  Span,\n  SpanTimeInput,\n} from '@sentry/core/browser';\nimport {\n  addFetchInstrumentationHandler,\n  getActiveSpan,\n  getClient,\n  getLocationHref,\n  getTraceData,\n  hasSpansEnabled,\n  hasSpanStreamingEnabled,\n  instrumentFetchRequest,\n  parseUrl,\n  SEMANTIC_ATTRIBUTE_SENTRY_OP,\n  SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n  SentryNonRecordingSpan,\n  setHttpStatus,\n  spanIsIgnored,\n  spanToJSON,\n  startInactiveSpan,\n  stringMatchesSomePattern,\n  stripDataUrlContent,\n  stripUrlQueryAndFragment,\n  timestampInSeconds,\n} from '@sentry/core/browser';\nimport type { XhrHint } from '@sentry/browser-utils';\nimport {\n  addPerformanceInstrumentationHandler,\n  addXhrInstrumentationHandler,\n  parseXhrResponseHeaders,\n  resourceTimingToSpanAttributes,\n  SENTRY_XHR_DATA_KEY,\n} from '@sentry/browser-utils';\nimport type { BrowserClient } from '../client';\nimport { baggageHeaderHasSentryValues, createHeadersSafely, getFullURL, isPerformanceResourceTiming } from './utils';\nimport { HTTP_URL, URL_FULL } from '@sentry/conventions/attributes';\n\n/** Options for Request Instrumentation */\nexport interface RequestInstrumentationOptions {\n  /**\n   * List of strings and/or Regular Expressions used to determine which outgoing requests will have `sentry-trace` and `baggage`\n   * headers attached.\n   *\n   * **Default:** If this option is not provided, tracing headers will be attached to all outgoing requests.\n   * If you are using a browser SDK, by default, tracing headers will only be attached to outgoing requests to the same origin.\n   *\n   * **Disclaimer:** Carelessly setting this option in browser environments may result into CORS errors!\n   * Only attach tracing headers to requests to the same origin, or to requests to services you can control CORS headers of.\n   * Cross-origin requests, meaning requests to a different domain, for example a request to `https://api.example.com/` while you're on `https://example.com/`, take special care.\n   * If you are attaching headers to cross-origin requests, make sure the backend handling the request returns a `\"Access-Control-Allow-Headers: sentry-trace, baggage\"` header to ensure your requests aren't blocked.\n   *\n   * If you provide a `tracePropagationTargets` array, the entries you provide will be matched against the entire URL of the outgoing request.\n   * If you are using a browser SDK, the entries will also be matched against the pathname of the outgoing requests.\n   * This is so you can have matchers for relative requests, for example, `/^\\/api/` if you want to trace requests to your `/api` routes on the same domain.\n   *\n   * If any of the two match any of the provided values, tracing headers will be attached to the outgoing request.\n   * Both, the string values, and the RegExes you provide in the array will match if they partially match the URL or pathname.\n   *\n   * Examples:\n   * - `tracePropagationTargets: [/^\\/api/]` and request to `https://same-origin.com/api/posts`:\n   *   - Tracing headers will be attached because the request is sent to the same origin and the regex matches the pathname \"/api/posts\".\n   * - `tracePropagationTargets: [/^\\/api/]` and request to `https://different-origin.com/api/posts`:\n   *   - Tracing headers will not be attached because the pathname will only be compared when the request target lives on the same origin.\n   * - `tracePropagationTargets: [/^\\/api/, 'https://external-api.com']` and request to `https://external-api.com/v1/data`:\n   *   - Tracing headers will be attached because the request URL matches the string `'https://external-api.com'`.\n   */\n  tracePropagationTargets?: Array<string | RegExp>;\n\n  /**\n   * Flag to disable patching all together for fetch requests.\n   *\n   * Default: true\n   */\n  traceFetch: boolean;\n\n  /**\n   * Flag to disable patching all together for xhr requests.\n   *\n   * Default: true\n   */\n  traceXHR: boolean;\n\n  /**\n   * Flag to disable tracking of long-lived streams, like server-sent events (SSE) via fetch.\n   * Do not enable this in case you have live streams or very long running streams.\n   *\n   * Disabled by default since it can lead to issues with streams using the `cancel()` api\n   * (https://github.com/getsentry/sentry-javascript/issues/13950)\n   *\n   * Default: false\n   *\n   * @deprecated Use `fetchStreamPerformanceIntegration()` instead. Add it to your `integrations` array\n   * to track the duration of streamed fetch response bodies.\n   */\n  trackFetchStreamPerformance: boolean;\n\n  /**\n   * If true, Sentry will capture http timings and add them to the corresponding http spans.\n   *\n   * Default: true\n   */\n  enableHTTPTimings: boolean;\n\n  /**\n   * This function will be called before creating a span for a request with the given url.\n   * Return false if you don't want a span for the given url.\n   *\n   * Default: (url: string) => true\n   */\n  shouldCreateSpanForRequest?(this: void, url: string): boolean;\n\n  /**\n   * Is called when spans are started for outgoing requests.\n   */\n  onRequestSpanStart?(span: Span, requestInformation: RequestHookInfo): void;\n\n  /**\n   * Is called when spans end for outgoing requests, providing access to response headers.\n   */\n  onRequestSpanEnd?(span: Span, responseInformation: ResponseHookInfo): void;\n}\n\nexport const defaultRequestInstrumentationOptions: RequestInstrumentationOptions = {\n  traceFetch: true,\n  traceXHR: true,\n  enableHTTPTimings: true,\n  trackFetchStreamPerformance: false,\n};\n\n/** Registers span creators for xhr and fetch requests  */\nexport function instrumentOutgoingRequests(client: Client, _options?: Partial<RequestInstrumentationOptions>): void {\n  const {\n    traceFetch,\n    traceXHR,\n    shouldCreateSpanForRequest,\n    enableHTTPTimings,\n    tracePropagationTargets,\n    onRequestSpanStart,\n    onRequestSpanEnd,\n  } = {\n    ...defaultRequestInstrumentationOptions,\n    ..._options,\n  };\n\n  const shouldCreateSpan =\n    typeof shouldCreateSpanForRequest === 'function' ? shouldCreateSpanForRequest : (_: string) => true;\n\n  const shouldAttachHeadersWithTargets = (url: string): boolean => shouldAttachHeaders(url, tracePropagationTargets);\n\n  const spans: Record<string, Span> = {};\n\n  const propagateTraceparent = (client as BrowserClient).getOptions().propagateTraceparent;\n\n  if (traceFetch) {\n    addFetchInstrumentationHandler(handlerData => {\n      const createdSpan = instrumentFetchRequest(handlerData, shouldCreateSpan, shouldAttachHeadersWithTargets, spans, {\n        propagateTraceparent,\n        onRequestSpanEnd,\n      });\n\n      // We cannot use `window.location` in the generic fetch instrumentation,\n      // but we need it for reliable `server.address` attribute.\n      // so we extend this in here\n      if (createdSpan) {\n        const fullUrl = getFullURL(handlerData.fetchData.url);\n        const host = fullUrl ? parseUrl(fullUrl).host : undefined;\n        const sanitizedFullUrl = fullUrl ? stripDataUrlContent(fullUrl) : undefined;\n        createdSpan.setAttributes({\n          // oxlint-disable-next-line typescript/no-deprecated\n          [HTTP_URL]: sanitizedFullUrl,\n          // `url.full` must match `http.url`. Setting it here ensures parentless `http.client`\n          // segment spans don't get `url.full` backfilled with the host page URL (see httpContextIntegration).\n          [URL_FULL]: sanitizedFullUrl,\n          'server.address': host,\n        });\n\n        if (enableHTTPTimings) {\n          addHTTPTimings(createdSpan, client);\n        }\n\n        onRequestSpanStart?.(createdSpan, { headers: handlerData.headers });\n      }\n    });\n  }\n\n  if (traceXHR) {\n    addXhrInstrumentationHandler(handlerData => {\n      const createdSpan = xhrCallback(\n        handlerData,\n        shouldCreateSpan,\n        shouldAttachHeadersWithTargets,\n        spans,\n        propagateTraceparent,\n        onRequestSpanEnd,\n      );\n\n      if (createdSpan) {\n        if (enableHTTPTimings) {\n          addHTTPTimings(createdSpan, client);\n        }\n\n        onRequestSpanStart?.(createdSpan, {\n          headers: createHeadersSafely(handlerData.xhr.__sentry_xhr_v3__?.request_headers),\n        });\n      }\n    });\n  }\n}\n\n/**\n * The maximum time (ms) to wait for PerformanceResourceTiming data before ending the span.\n * Same approach is used by OTel's browser fetch instrumentation:\n * See {@link https://github.com/open-telemetry/opentelemetry-js/blob/30f94fe99339287b1e4d3c8bb90172c2523f06f4/experimental/packages/opentelemetry-instrumentation-fetch/src/fetch.ts#L352-L372}\n */\nconst HTTP_TIMING_WAIT_MS = 300;\n\n/**\n * Creates a temporary observer to listen to the next fetch/xhr resourcing timings,\n * so that when timings hit their per-browser limit they don't need to be removed.\n *\n * @param span A span that has yet to be finished, must contain `url` on data.\n */\nfunction addHTTPTimings(span: Span, client: Client): void {\n  const { url } = spanToJSON(span).data;\n\n  if (!url || typeof url !== 'string') {\n    return;\n  }\n\n  // Clean up the performance observer and other resources\n  // We have to wait here because otherwise this cleans itself up before it is fully done.\n  // Default (non-streaming): just deregister the observer.\n  let onEntryFound = (): void => void setTimeout(unsubscribePerformanceObsever);\n\n  // For streamed spans, we have to artificially delay the ending of the span until we\n  // either receive the timing data, or HTTP_TIMING_WAIT_MS elapses.\n  if (hasSpanStreamingEnabled(client)) {\n    const originalEnd = span.end.bind(span);\n\n    span.end = (endTimestamp?: SpanTimeInput) => {\n      const capturedEndTimestamp = endTimestamp ?? timestampInSeconds();\n      let isEnded = false;\n\n      const endSpanAndCleanup = (): void => {\n        if (isEnded) {\n          return;\n        }\n        isEnded = true;\n        setTimeout(unsubscribePerformanceObsever);\n        originalEnd(capturedEndTimestamp);\n        clearTimeout(fallbackTimeout);\n      };\n\n      onEntryFound = endSpanAndCleanup;\n\n      // Fallback: always end the span after HTTP_TIMING_WAIT_MS even if no\n      // PerformanceResourceTiming entry arrives (e.g. cross-origin without\n      // Timing-Allow-Origin, or the browser didn't fire the observer in time).\n      const fallbackTimeout = setTimeout(endSpanAndCleanup, HTTP_TIMING_WAIT_MS);\n    };\n  }\n\n  const unsubscribePerformanceObsever = addPerformanceInstrumentationHandler('resource', ({ entries }) => {\n    entries.forEach(entry => {\n      if (isPerformanceResourceTiming(entry) && entry.name.endsWith(url)) {\n        span.setAttributes(resourceTimingToSpanAttributes(entry));\n        onEntryFound();\n      }\n    });\n  });\n}\n\n/**\n * A function that determines whether to attach tracing headers to a request.\n * We only export this function for testing purposes.\n */\nexport function shouldAttachHeaders(\n  targetUrl: string,\n  tracePropagationTargets: (string | RegExp)[] | undefined,\n): boolean {\n  // window.location.href not being defined is an edge case in the browser but we need to handle it.\n  // Potentially dangerous situations where it may not be defined: Browser Extensions, Web Workers, patching of the location obj\n  const href = getLocationHref();\n\n  if (!href) {\n    // If there is no window.location.origin, we default to only attaching tracing headers to relative requests, i.e. ones that start with `/`\n    // BIG DISCLAIMER: Users can call URLs with a double slash (fetch(\"//example.com/api\")), this is a shorthand for \"send to the same protocol\",\n    // so we need a to exclude those requests, because they might be cross origin.\n    const isRelativeSameOriginRequest = !!targetUrl.match(/^\\/(?!\\/)/);\n    if (!tracePropagationTargets) {\n      return isRelativeSameOriginRequest;\n    } else {\n      return stringMatchesSomePattern(targetUrl, tracePropagationTargets);\n    }\n  } else {\n    let resolvedUrl;\n    let currentOrigin;\n\n    // URL parsing may fail, we default to not attaching trace headers in that case.\n    try {\n      resolvedUrl = new URL(targetUrl, href);\n      currentOrigin = new URL(href).origin;\n    } catch {\n      return false;\n    }\n\n    const isSameOriginRequest = resolvedUrl.origin === currentOrigin;\n    if (!tracePropagationTargets) {\n      return isSameOriginRequest;\n    } else {\n      return (\n        stringMatchesSomePattern(resolvedUrl.toString(), tracePropagationTargets) ||\n        (isSameOriginRequest && stringMatchesSomePattern(resolvedUrl.pathname, tracePropagationTargets))\n      );\n    }\n  }\n}\n\n/**\n * Create and track xhr request spans\n *\n * @returns Span if a span was created, otherwise void.\n */\n// oxlint-disable-next-line complexity\nfunction xhrCallback(\n  handlerData: HandlerDataXhr,\n  shouldCreateSpan: (url: string) => boolean,\n  shouldAttachHeaders: (url: string) => boolean,\n  spans: Record<string, Span>,\n  propagateTraceparent?: boolean,\n  onRequestSpanEnd?: RequestInstrumentationOptions['onRequestSpanEnd'],\n): Span | undefined {\n  const xhr = handlerData.xhr;\n  const sentryXhrData = xhr?.[SENTRY_XHR_DATA_KEY];\n\n  if (!xhr || xhr.__sentry_own_request__ || !sentryXhrData) {\n    return undefined;\n  }\n\n  const { url, method } = sentryXhrData;\n\n  const shouldCreateSpanResult = hasSpansEnabled() && shouldCreateSpan(url);\n\n  // Handle XHR completion - clean up spans from the record\n  if (handlerData.endTimestamp) {\n    const spanId = xhr.__sentry_xhr_span_id__;\n    if (!spanId) return;\n\n    const span = spans[spanId];\n\n    if (span) {\n      if (shouldCreateSpanResult && sentryXhrData.status_code !== undefined) {\n        setHttpStatus(span, sentryXhrData.status_code);\n        span.end();\n\n        onRequestSpanEnd?.(span, {\n          headers: createHeadersSafely(parseXhrResponseHeaders(xhr as XMLHttpRequest & SentryWrappedXMLHttpRequest)),\n          error: handlerData.error,\n        });\n      }\n\n      // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n      delete spans[spanId];\n    }\n\n    return undefined;\n  }\n\n  const fullUrl = getFullURL(url);\n  const parsedUrl = fullUrl ? parseUrl(fullUrl) : parseUrl(url);\n  const sanitizedFullUrl = fullUrl ? stripDataUrlContent(fullUrl) : undefined;\n\n  const urlForSpanName = stripDataUrlContent(stripUrlQueryAndFragment(url));\n\n  const client = getClient();\n  const hasParent = !!getActiveSpan();\n  // With span streaming, we always emit http.client spans, even without a parent span\n  const shouldEmitSpan = hasParent || (!!client && hasSpanStreamingEnabled(client));\n\n  const span =\n    shouldCreateSpanResult && shouldEmitSpan\n      ? startInactiveSpan({\n          name: `${method} ${urlForSpanName}`,\n          attributes: {\n            url: stripDataUrlContent(url),\n            type: 'xhr',\n            'http.method': method,\n            'http.url': sanitizedFullUrl,\n            // `url.full` must match `http.url`. Setting it here ensures parentless `http.client`\n            // segment spans don't get `url.full` backfilled with the host page URL (see httpContextIntegration).\n            [URL_FULL]: sanitizedFullUrl,\n            'server.address': parsedUrl?.host,\n            [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.browser',\n            [SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'http.client',\n            ...(parsedUrl?.search && { 'http.query': parsedUrl?.search }),\n            ...(parsedUrl?.hash && { 'http.fragment': parsedUrl?.hash }),\n          },\n        })\n      : new SentryNonRecordingSpan();\n\n  // If the span is ignored, we don't want to continue the trace from it (NonRecordingSpan) but rather\n  // from the active span. Passing `undefined` here will make `getTraceData` use the active span instead.\n  const spanForTraceHeaders = spanIsIgnored(span) && hasParent ? undefined : span;\n\n  if (shouldCreateSpanResult && !shouldEmitSpan) {\n    client?.recordDroppedEvent('no_parent_span', 'span');\n  }\n\n  xhr.__sentry_xhr_span_id__ = span.spanContext().spanId;\n  spans[xhr.__sentry_xhr_span_id__] = span;\n\n  if (shouldAttachHeaders(url)) {\n    addTracingHeadersToXhrRequest(\n      xhr,\n      // If performance is disabled (TWP) or there's no active root span (pageload/navigation/interaction),\n      // we do not want to use the span as base for the trace headers,\n      // which means that the headers will be generated from the scope and the sampling decision is deferred\n      hasSpansEnabled() && shouldEmitSpan ? spanForTraceHeaders : undefined,\n      propagateTraceparent,\n    );\n  }\n\n  if (client) {\n    client.emit('beforeOutgoingRequestSpan', span, handlerData as XhrHint);\n  }\n\n  return span;\n}\n\nfunction addTracingHeadersToXhrRequest(\n  xhr: SentryWrappedXMLHttpRequest,\n  span?: Span,\n  propagateTraceparent?: boolean,\n): void {\n  const { 'sentry-trace': sentryTrace, baggage, traceparent } = getTraceData({ span, propagateTraceparent });\n\n  if (sentryTrace) {\n    setHeaderOnXhr(xhr, sentryTrace, baggage, traceparent);\n  }\n}\n\nfunction setHeaderOnXhr(\n  xhr: SentryWrappedXMLHttpRequest,\n  sentryTraceHeader: string,\n  sentryBaggageHeader: string | undefined,\n  traceparentHeader: string | undefined,\n): void {\n  const originalHeaders = xhr.__sentry_xhr_v3__?.request_headers;\n\n  if (originalHeaders?.['sentry-trace'] || !xhr.setRequestHeader) {\n    // bail if a sentry-trace header is already set\n    return;\n  }\n\n  try {\n    xhr.setRequestHeader('sentry-trace', sentryTraceHeader);\n\n    if (traceparentHeader && !originalHeaders?.['traceparent']) {\n      xhr.setRequestHeader('traceparent', traceparentHeader);\n    }\n\n    if (sentryBaggageHeader) {\n      // only add our headers if\n      // - no pre-existing baggage header exists\n      // - or it is set and doesn't yet contain sentry values\n      const originalBaggageHeader = originalHeaders?.['baggage'];\n      if (!originalBaggageHeader || !baggageHeaderHasSentryValues(originalBaggageHeader)) {\n        // From MDN: \"If this method is called several times with the same header, the values are merged into one single request header.\"\n        // We can therefore simply set a baggage header without checking what was there before\n        // https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/setRequestHeader\n        xhr.setRequestHeader('baggage', sentryBaggageHeader);\n      }\n    }\n  } catch {\n    // Error: InvalidStateError: Failed to execute 'setRequestHeader' on 'XMLHttpRequest': The object's state must be OPENED.\n  }\n}\n", "import type { IntegrationFn, Span } from '@sentry/core';\nimport {\n  addFetchEndInstrumentationHandler,\n  addFetchInstrumentationHandler,\n  defineIntegration,\n  getSanitizedUrlStringFromUrlObject,\n  parseStringToURLObject,\n  SEMANTIC_ATTRIBUTE_SENTRY_OP,\n  SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n  startInactiveSpan,\n  stripDataUrlContent,\n} from '@sentry/core';\n\nconst responseToStreamSpan = new WeakMap<object, Span>();\nconst responseToFallbackTimeout = new WeakMap<object, ReturnType<typeof setTimeout>>();\n\n// Matches the max timeout in `resolveResponse` in packages/core/src/instrument/fetch.ts\nconst STREAM_RESOLVE_FALLBACK_MS = 90_000;\n\nconst STREAMING_CONTENT_TYPES = ['text/event-stream', 'application/x-ndjson', 'application/stream+json'];\n\n/**\n * Tracks streamed fetch response bodies by creating an `http.client.stream` sibling span.\n *\n * The regular `http.client` span ends when response headers arrive. This integration adds\n * a span that starts at header arrival and ends when the body fully resolves:\n *\n * ```\n * --------- pageload --------------------------------\n *     -- http.client --\n *                       -- http.client.stream -------\n * ```\n */\nexport const fetchStreamPerformanceIntegration = defineIntegration(() => {\n  return {\n    name: 'FetchStreamPerformance' as const,\n\n    setup() {\n      // End the stream span when the response body finishes resolving\n      addFetchEndInstrumentationHandler(handlerData => {\n        if (handlerData.response) {\n          const streamSpan = responseToStreamSpan.get(handlerData.response);\n          if (streamSpan && handlerData.endTimestamp) {\n            streamSpan.end(handlerData.endTimestamp);\n\n            const fallbackTimeout = responseToFallbackTimeout.get(handlerData.response);\n            if (fallbackTimeout) {\n              clearTimeout(fallbackTimeout);\n            }\n          }\n        }\n      });\n\n      addFetchInstrumentationHandler(handlerData => {\n        // Only create the stream span once headers have arrived\n        if (handlerData.endTimestamp && handlerData.response) {\n          // Only create stream spans for responses that are likely streamed:\n          // 1. No content-length header (streamed responses don't know the size upfront)\n          // 2. Content-type is a known streaming type (avoids false positives on HTTP/2\n          //    where content-length is often omitted even for regular responses)\n          const contentType = handlerData.response.headers?.get('content-type') || '';\n          if (\n            handlerData.response.headers?.get('content-length') ||\n            !STREAMING_CONTENT_TYPES.some(t => contentType.startsWith(t))\n          ) {\n            return;\n          }\n\n          const url = handlerData.fetchData?.url || '';\n          const method = handlerData.fetchData?.method || 'GET';\n\n          const parsedUrl = parseStringToURLObject(url);\n          const sanitizedUrl = url.startsWith('data:')\n            ? stripDataUrlContent(url)\n            : parsedUrl\n              ? getSanitizedUrlStringFromUrlObject(parsedUrl)\n              : url;\n\n          const streamSpan = startInactiveSpan({\n            name: `${method} ${sanitizedUrl}`,\n            startTime: handlerData.endTimestamp,\n            attributes: {\n              url: stripDataUrlContent(url),\n              'http.method': method,\n              type: 'fetch',\n              [SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'http.client.stream',\n              [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.browser.stream',\n            },\n          });\n\n          responseToStreamSpan.set(handlerData.response, streamSpan);\n\n          // prevent the span from leaking indefinitely if the body never resolves\n          const fallbackTimeout = setTimeout(() => {\n            if (streamSpan.isRecording()) {\n              streamSpan.end();\n            }\n          }, STREAM_RESOLVE_FALLBACK_MS);\n\n          responseToFallbackTimeout.set(handlerData.response, fallbackTimeout);\n        }\n      });\n    },\n  };\n}) satisfies IntegrationFn;\n", "import type { IntegrationFn, Span } from '@sentry/core/browser';\nimport { defineIntegration, hasSpanStreamingEnabled } from '@sentry/core/browser';\nimport {\n  addWebVitalsToSpan,\n  registerInpInteractionListener,\n  startTrackingINP,\n  startTrackingWebVitals,\n  trackClsAsSpan,\n  trackInpAsSpan,\n  trackLcpAsSpan,\n} from '@sentry/browser-utils';\n\nexport const WEB_VITALS_INTEGRATION_NAME = 'WebVitals' as const;\n\nexport type WebVitalName = 'cls' | 'inp' | 'lcp';\n\nexport interface WebVitalsOptions {\n  /**\n   * Web vitals to skip.\n   */\n  ignore?: WebVitalName[];\n\n  /**\n   * @experimental\n   */\n  _experiments?: Partial<{\n    enableStandaloneClsSpans: boolean;\n    enableStandaloneLcpSpans: boolean;\n  }>;\n}\n\n/**\n * Captures Core Web Vitals (LCP, CLS, INP) and related pageload vitals.\n *\n * `browserTracingIntegration` auto-registers this integration if no\n * `webVitalsIntegration` is already present, so explicit registration is only\n * needed to customize options or to use it without `browserTracingIntegration`.\n */\nexport const webVitalsIntegration = defineIntegration((options: WebVitalsOptions = {}) => {\n  const ignored = new Set(options.ignore ?? []);\n\n  return {\n    name: WEB_VITALS_INTEGRATION_NAME,\n    setup(client) {\n      const spanStreamingEnabled = hasSpanStreamingEnabled(client);\n      const { enableStandaloneClsSpans, enableStandaloneLcpSpans } = options._experiments ?? {};\n\n      const recordClsStandaloneSpans =\n        spanStreamingEnabled || ignored.has('cls') ? undefined : enableStandaloneClsSpans || false;\n      const recordLcpStandaloneSpans =\n        spanStreamingEnabled || ignored.has('lcp') ? undefined : enableStandaloneLcpSpans || false;\n\n      // eslint-disable-next-line typescript/no-deprecated\n      const finalizeWebVitals = startTrackingWebVitals({\n        recordClsStandaloneSpans,\n        recordLcpStandaloneSpans,\n        client,\n      });\n\n      const pageloadSpans = new WeakSet<Span>();\n\n      client.on('afterStartPageLoadSpan', span => {\n        pageloadSpans.add(span);\n      });\n\n      client.on('spanEnd', span => {\n        if (!pageloadSpans.delete(span)) {\n          return;\n        }\n\n        finalizeWebVitals();\n        addWebVitalsToSpan(span, {\n          // CLS/LCP are recorded as pageload span measurements only when they're neither\n          // tracked as standalone spans nor handled by span streaming (and not ignored).\n          recordClsOnPageloadSpan: recordClsStandaloneSpans === false,\n          recordLcpOnPageloadSpan: recordLcpStandaloneSpans === false,\n          spanStreamingEnabled,\n        });\n      });\n\n      if (spanStreamingEnabled) {\n        if (!ignored.has('lcp')) {\n          trackLcpAsSpan(client);\n        }\n        if (!ignored.has('cls')) {\n          trackClsAsSpan(client);\n        }\n        if (!ignored.has('inp')) {\n          trackInpAsSpan();\n        }\n      } else if (!ignored.has('inp')) {\n        startTrackingINP();\n      }\n    },\n    afterAllSetup() {\n      if (!ignored.has('inp')) {\n        registerInpInteractionListener();\n      }\n    },\n  };\n}) satisfies IntegrationFn;\n", "import { debug, getActiveSpan, getRootSpan, SPAN_STATUS_ERROR, spanToJSON } from '@sentry/core/browser';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { WINDOW } from '../helpers';\n\n/**\n * Add a listener that cancels and finishes a transaction when the global\n * document is hidden.\n */\nexport function registerBackgroundTabDetection(): void {\n  if (WINDOW.document) {\n    WINDOW.document.addEventListener('visibilitychange', () => {\n      const activeSpan = getActiveSpan();\n      if (!activeSpan) {\n        return;\n      }\n\n      const rootSpan = getRootSpan(activeSpan);\n\n      if (WINDOW.document.hidden && rootSpan) {\n        const cancelledStatus = 'cancelled';\n\n        const { op, status } = spanToJSON(rootSpan);\n\n        if (DEBUG_BUILD) {\n          debug.log(`[Tracing] Transaction: ${cancelledStatus} -> since tab moved to the background, op: ${op}`);\n        }\n\n        // We should not set status if it is already set, this prevent important statuses like\n        // error or data loss from being overwritten on transaction.\n        if (!status) {\n          rootSpan.setStatus({ code: SPAN_STATUS_ERROR, message: cancelledStatus });\n        }\n\n        rootSpan.setAttribute('sentry.cancellation_reason', 'document.hidden');\n        rootSpan.end();\n      }\n    });\n  } else {\n    DEBUG_BUILD && debug.warn('[Tracing] Could not set up background tab detection due to lack of global document');\n  }\n}\n", "import type { Client, PropagationContext, Span, SpanContextData } from '@sentry/core/browser';\nimport {\n  debug,\n  getCurrentScope,\n  getRootSpan,\n  SEMANTIC_ATTRIBUTE_SENTRY_PREVIOUS_TRACE_SAMPLE_RATE,\n  SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,\n  SEMANTIC_LINK_ATTRIBUTE_LINK_TYPE,\n  spanToJSON,\n} from '@sentry/core/browser';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { WINDOW } from '../exports';\n\nexport interface PreviousTraceInfo {\n  /**\n   * Span context of the previous trace's local root span\n   */\n  spanContext: SpanContextData;\n\n  /**\n   * Timestamp in seconds when the previous trace was started\n   */\n  startTimestamp: number;\n\n  /**\n   * sample rate of the previous trace\n   */\n  sampleRate: number;\n\n  /**\n   * The sample rand of the previous trace\n   */\n  sampleRand: number;\n}\n\n// 1h in seconds\nexport const PREVIOUS_TRACE_MAX_DURATION = 3600;\n\n// session storage key\nexport const PREVIOUS_TRACE_KEY = 'sentry_previous_trace';\n\nexport const PREVIOUS_TRACE_TMP_SPAN_ATTRIBUTE = 'sentry.previous_trace';\n\n/**\n * Takes care of linking traces and applying the (consistent) sampling behavoiour based on the passed options\n * @param options - options for linking traces and consistent trace sampling (@see BrowserTracingOptions)\n * @param client - Sentry client\n */\nexport function linkTraces(\n  client: Client,\n  {\n    linkPreviousTrace,\n    consistentTraceSampling,\n  }: {\n    linkPreviousTrace: 'session-storage' | 'in-memory';\n    consistentTraceSampling: boolean;\n  },\n): void {\n  const useSessionStorage = linkPreviousTrace === 'session-storage';\n\n  let inMemoryPreviousTraceInfo = useSessionStorage ? getPreviousTraceFromSessionStorage() : undefined;\n\n  client.on('spanStart', span => {\n    if (getRootSpan(span) !== span) {\n      return;\n    }\n\n    const oldPropagationContext = getCurrentScope().getPropagationContext();\n    inMemoryPreviousTraceInfo = addPreviousTraceSpanLink(inMemoryPreviousTraceInfo, span, oldPropagationContext);\n\n    if (useSessionStorage) {\n      storePreviousTraceInSessionStorage(inMemoryPreviousTraceInfo);\n    }\n  });\n\n  let isFirstTraceOnPageload = true;\n  if (consistentTraceSampling) {\n    /*\n    When users opt into `consistentTraceSampling`, we need to ensure that we propagate\n    the previous trace's sample rate and rand to the current trace. This is necessary because otherwise, span\n    metric extrapolation is inaccurate, as we'd propagate too high of a sample rate for the subsequent traces.\n\n    So therefore, we pretend that the previous trace was the parent trace of the newly started trace. To do that,\n    we mutate the propagation context of the current trace and set the sample rate and sample rand of the previous trace.\n    Timing-wise, it is fine because it happens before we even sample the root span.\n\n    @see https://github.com/getsentry/sentry-javascript/issues/15754\n    */\n    client.on('beforeSampling', mutableSamplingContextData => {\n      if (!inMemoryPreviousTraceInfo) {\n        return;\n      }\n\n      const scope = getCurrentScope();\n      const currentPropagationContext = scope.getPropagationContext();\n\n      // We do not want to force-continue the sampling decision if we continue a trace\n      // that was started on the backend. Most prominently, this will happen in MPAs where\n      // users hard-navigate between pages. In this case, the sampling decision of a potentially\n      // started trace on the server takes precedence.\n      // Why? We want to prioritize inter-trace consistency over intra-trace consistency.\n      if (isFirstTraceOnPageload && currentPropagationContext.parentSpanId) {\n        isFirstTraceOnPageload = false;\n        return;\n      }\n\n      scope.setPropagationContext({\n        ...currentPropagationContext,\n        dsc: {\n          ...currentPropagationContext.dsc,\n          sample_rate: String(inMemoryPreviousTraceInfo.sampleRate),\n          sampled: String(spanContextSampled(inMemoryPreviousTraceInfo.spanContext)),\n        },\n        sampleRand: inMemoryPreviousTraceInfo.sampleRand,\n      });\n\n      mutableSamplingContextData.parentSampled = spanContextSampled(inMemoryPreviousTraceInfo.spanContext);\n      mutableSamplingContextData.parentSampleRate = inMemoryPreviousTraceInfo.sampleRate;\n\n      mutableSamplingContextData.spanAttributes = {\n        ...mutableSamplingContextData.spanAttributes,\n        [SEMANTIC_ATTRIBUTE_SENTRY_PREVIOUS_TRACE_SAMPLE_RATE]: inMemoryPreviousTraceInfo.sampleRate,\n      };\n    });\n  }\n}\n\n/**\n * Adds a previous_trace span link to the passed span if the passed\n * previousTraceInfo is still valid.\n *\n * @returns the updated previous trace info (based on the current span/trace) to\n * be used on the next call\n */\nexport function addPreviousTraceSpanLink(\n  previousTraceInfo: PreviousTraceInfo | undefined,\n  span: Span,\n  oldPropagationContext: PropagationContext,\n): PreviousTraceInfo {\n  const spanJson = spanToJSON(span);\n\n  function getSampleRate(): number {\n    try {\n      const oldSampleRate = Number(\n        spanJson.data?.[SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE] ?? oldPropagationContext.dsc?.sample_rate,\n      );\n      return Number.isNaN(oldSampleRate) ? 0 : oldSampleRate;\n    } catch {\n      return 0;\n    }\n  }\n\n  const updatedPreviousTraceInfo = {\n    spanContext: span.spanContext(),\n    startTimestamp: spanJson.start_timestamp,\n    sampleRate: getSampleRate(),\n    sampleRand: oldPropagationContext.sampleRand,\n  };\n\n  if (!previousTraceInfo) {\n    return updatedPreviousTraceInfo;\n  }\n\n  const previousTraceSpanCtx = previousTraceInfo.spanContext;\n  if (previousTraceSpanCtx.traceId === spanJson.trace_id) {\n    // This means, we're still in the same trace so let's not update the previous trace info\n    // or add a link to the current span.\n    // Once we move away from the long-lived, route-based trace model, we can remove this cases\n    return previousTraceInfo;\n  }\n\n  // Only add the link if the startTimeStamp of the previous trace's root span is within\n  // PREVIOUS_TRACE_MAX_DURATION (1h) of the current root span's startTimestamp\n  // This is done to\n  // - avoid adding links to \"stale\" traces\n  // - enable more efficient querying for previous/next traces in Sentry\n  if (Date.now() / 1000 - previousTraceInfo.startTimestamp <= PREVIOUS_TRACE_MAX_DURATION) {\n    if (DEBUG_BUILD) {\n      debug.log(\n        `Adding previous_trace \\`${JSON.stringify(previousTraceSpanCtx)}\\` link to span \\`${JSON.stringify({\n          op: spanJson.op,\n          ...span.spanContext(),\n        })}\\``,\n      );\n    }\n\n    span.addLink({\n      context: previousTraceSpanCtx,\n      attributes: {\n        [SEMANTIC_LINK_ATTRIBUTE_LINK_TYPE]: 'previous_trace',\n      },\n    });\n\n    // TODO: Remove this once EAP can store span links. We currently only set this attribute so that we\n    // can obtain the previous trace information from the EAP store. Long-term, EAP will handle\n    // span links and then we should remove this again. Also throwing in a TODO(v11), to remind us\n    // to check this at v11 time :)\n    span.setAttribute(\n      PREVIOUS_TRACE_TMP_SPAN_ATTRIBUTE,\n      `${previousTraceSpanCtx.traceId}-${previousTraceSpanCtx.spanId}-${\n        spanContextSampled(previousTraceSpanCtx) ? 1 : 0\n      }`,\n    );\n  }\n\n  return updatedPreviousTraceInfo;\n}\n\n/**\n * Stores @param previousTraceInfo in sessionStorage.\n */\nexport function storePreviousTraceInSessionStorage(previousTraceInfo: PreviousTraceInfo): void {\n  try {\n    WINDOW.sessionStorage.setItem(PREVIOUS_TRACE_KEY, JSON.stringify(previousTraceInfo));\n  } catch (e) {\n    // Ignore potential errors (e.g. if sessionStorage is not available)\n    DEBUG_BUILD && debug.warn('Could not store previous trace in sessionStorage', e);\n  }\n}\n\n/**\n * Retrieves the previous trace from sessionStorage if available.\n */\nexport function getPreviousTraceFromSessionStorage(): PreviousTraceInfo | undefined {\n  try {\n    const previousTraceInfo = WINDOW.sessionStorage?.getItem(PREVIOUS_TRACE_KEY);\n    // @ts-expect-error - intentionally risking JSON.parse throwing when previousTraceInfo is null to save bundle size\n    return JSON.parse(previousTraceInfo);\n  } catch {\n    return undefined;\n  }\n}\n\n/**\n * see {@link import('@sentry/core/browser').spanIsSampled}\n */\nexport function spanContextSampled(ctx: SpanContextData): boolean {\n  return ctx.traceFlags === 0x1;\n}\n", "/* eslint-disable max-lines */\nimport type {\n  Client,\n  IntegrationFn,\n  RequestHookInfo,\n  ResponseHookInfo,\n  Span,\n  StartSpanOptions,\n  TransactionSource,\n} from '@sentry/core/browser';\nimport {\n  addNonEnumerableProperty,\n  browserPerformanceTimeOrigin,\n  consoleSandbox,\n  dateTimestampInSeconds,\n  debug,\n  generateSpanId,\n  generateTraceId,\n  getClient,\n  getCurrentScope,\n  getDynamicSamplingContextFromSpan,\n  getIsolationScope,\n  getLocationHref,\n  GLOBAL_OBJ,\n  hasSpansEnabled,\n  hasSpanStreamingEnabled,\n  isURLObjectRelative,\n  parseStringToURLObject,\n  propagationContextFromHeaders,\n  registerSpanErrorInstrumentation,\n  SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON,\n  SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n  SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,\n  spanIsSampled,\n  spanToJSON,\n  startIdleSpan,\n  startInactiveSpan,\n  timestampInSeconds,\n  TRACING_DEFAULTS,\n} from '@sentry/core/browser';\nimport {\n  addHistoryInstrumentationHandler,\n  addPerformanceEntries,\n  startTrackingInteractions,\n  startTrackingLongAnimationFrames,\n  startTrackingLongTasks,\n} from '@sentry/browser-utils';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { getHttpRequestData, WINDOW } from '../helpers';\nimport { fetchStreamPerformanceIntegration } from '../integrations/fetchStreamPerformance';\nimport { WEB_VITALS_INTEGRATION_NAME, webVitalsIntegration } from '../integrations/webVitals';\nimport { registerBackgroundTabDetection } from './backgroundtab';\nimport { linkTraces } from './linkedTraces';\nimport { defaultRequestInstrumentationOptions, instrumentOutgoingRequests } from './request';\nimport { URL_FULL, URL_PATH } from '@sentry/conventions/attributes';\n\nexport const BROWSER_TRACING_INTEGRATION_ID = 'BrowserTracing';\n\n/**\n * We don't want to start a bunch of idle timers and PerformanceObservers\n * for web crawlers, as they may prevent the page from being seen as \"idle\"\n * by the crawler's rendering engine (e.g. Googlebot's headless Chromium).\n */\nconst BOT_USER_AGENT_RE =\n  /Googlebot|Google-InspectionTool|Storebot-Google|Bingbot|Slurp|DuckDuckBot|Baiduspider|YandexBot|Facebot|facebookexternalhit|LinkedInBot|Twitterbot|Applebot/i;\n\nexport function isBotUserAgent(): boolean {\n  const nav = WINDOW.navigator as Navigator | undefined;\n  if (!nav?.userAgent) {\n    return false;\n  }\n  return BOT_USER_AGENT_RE.test(nav.userAgent);\n}\n\ninterface RouteInfo {\n  name: string | undefined;\n  source: TransactionSource | undefined;\n}\n\n/** Options for Browser Tracing integration */\nexport interface BrowserTracingOptions {\n  /**\n   * The time that has to pass without any span being created.\n   * If this time is exceeded, the idle span will finish.\n   *\n   * Default: 1000 (ms)\n   */\n  idleTimeout: number;\n\n  /**\n   * The max. time an idle span may run.\n   * If this time is exceeded, the idle span will finish no matter what.\n   *\n   * Default: 30000 (ms)\n   */\n  finalTimeout: number;\n\n  /**\n   The max. time an idle span may run.\n   * If this time is exceeded, the idle span will finish no matter what.\n   *\n   * Default: 15000 (ms)\n   */\n  childSpanTimeout: number;\n\n  /**\n   * If a span should be created on page load.\n   * If this is set to `false`, this integration will not start the default page load span.\n   * Default: true\n   */\n  instrumentPageLoad: boolean;\n\n  /**\n   * If a span should be created on navigation (history change).\n   * If this is set to `false`, this integration will not start the default navigation spans.\n   * Default: true\n   */\n  instrumentNavigation: boolean;\n\n  /**\n   * Flag spans where tabs moved to background with \"cancelled\". Browser background tab timing is\n   * not suited towards doing precise measurements of operations. By default, we recommend that this option\n   * be enabled as background transactions can mess up your statistics in nondeterministic ways.\n   *\n   * Default: true\n   */\n  markBackgroundSpan: boolean;\n\n  /**\n   * If true, Sentry will capture long tasks and add them to the corresponding transaction.\n   *\n   * Default: true\n   */\n  enableLongTask: boolean;\n\n  /**\n   * If true, Sentry will capture long animation frames and add them to the corresponding transaction.\n   *\n   * Default: false\n   */\n  enableLongAnimationFrame: boolean;\n\n  /**\n   * If true, Sentry will capture first input delay and add it to the corresponding transaction.\n   *\n   * Default: true\n   */\n  enableInp: boolean;\n\n  /**\n   * @deprecated This option is no longer used. Element timing is now tracked via the standalone\n   * `elementTimingIntegration`. Add it to your `integrations` array to collect element timing metrics.\n   */\n  enableElementTiming?: boolean;\n\n  /**\n   * Flag to disable patching all together for fetch requests.\n   *\n   * Default: true\n   */\n  traceFetch: boolean;\n\n  /**\n   * Flag to disable patching all together for xhr requests.\n   *\n   * Default: true\n   */\n  traceXHR: boolean;\n\n  /**\n   * Flag to disable tracking of long-lived streams, like server-sent events (SSE) via fetch.\n   * Do not enable this in case you have live streams or very long running streams.\n   *\n   * Default: false\n   *\n   * @deprecated Use `fetchStreamPerformanceIntegration()` instead. Add it to your `integrations` array\n   * to track the duration of streamed fetch response bodies.\n   */\n  trackFetchStreamPerformance: boolean;\n\n  /**\n   * If true, Sentry will capture http timings and add them to the corresponding http spans.\n   *\n   * Default: true\n   */\n  enableHTTPTimings: boolean;\n\n  /**\n   * Resource spans with `op`s matching strings in the array will not be emitted.\n   *\n   * Default: []\n   */\n  ignoreResourceSpans: Array<'resouce.script' | 'resource.css' | 'resource.img' | 'resource.other' | string>;\n\n  /**\n   * Spans created from the following browser Performance APIs,\n   *\n   * - [`performance.mark(...)`](https://developer.mozilla.org/en-US/docs/Web/API/Performance/mark)\n   * - [`performance.measure(...)`](https://developer.mozilla.org/en-US/docs/Web/API/Performance/measure)\n   *\n   * will not be emitted if their names match strings in this array.\n   *\n   * This is useful, if you come across `mark` or `measure` spans in your Sentry traces\n   * that you want to ignore. For example, sometimes, browser extensions or libraries\n   * emit these entries on their own, which might not be relevant to your application.\n   *\n   * * @example\n   * ```ts\n   * Sentry.init({\n   *   integrations: [\n   *     Sentry.browserTracingIntegration({\n   *      ignorePerformanceApiSpans: ['myMeasurement', /myMark/],\n   *     }),\n   *   ],\n   * });\n   *\n   * // no spans will be created for these:\n   * performance.mark('myMark');\n   * performance.measure('myMeasurement');\n   *\n   * // spans will be created for these:\n   * performance.mark('authenticated');\n   * performance.measure('input-duration', ...);\n   * ```\n   *\n   * Default: [] - By default, all `mark` and `measure` entries are sent as spans.\n   */\n  ignorePerformanceApiSpans: Array<string | RegExp>;\n\n  /**\n   * By default, the SDK will try to detect redirects and avoid creating separate spans for them.\n   * If you want to opt-out of this behavior, you can set this option to `false`.\n   *\n   * Default: true\n   */\n  detectRedirects: boolean;\n\n  /**\n   * Link the currently started trace to a previous trace (e.g. a prior pageload, navigation or\n   * manually started span). When enabled, this option will allow you to navigate between traces\n   * in the Sentry UI.\n   *\n   * You can set this option to the following values:\n   *\n   * - `'in-memory'`: The previous trace data will be stored in memory.\n   *   This is useful for single-page applications and enabled by default.\n   *\n   * - `'session-storage'`: The previous trace data will be stored in the `sessionStorage`.\n   *   This is useful for multi-page applications or static sites but it means that the\n   *   Sentry SDK writes to the browser's `sessionStorage`.\n   *\n   * - `'off'`: The previous trace data will not be stored or linked.\n   *\n   * You can also use {@link BrowserTracingOptions.consistentTraceSampling} to get\n   * consistent trace sampling of subsequent traces. Otherwise, by default, your\n   * `tracesSampleRate` or `tracesSampler` config significantly influences how often\n   * traces will be linked.\n   *\n   * @default 'in-memory' - see explanation above\n   */\n  linkPreviousTrace: 'in-memory' | 'session-storage' | 'off';\n\n  /**\n   * If true, Sentry will consistently sample subsequent traces based on the\n   * sampling decision of the initial trace. For example, if the initial page\n   * load trace was sampled positively, all subsequent traces (e.g. navigations)\n   * are also sampled positively. In case the initial trace was sampled negatively,\n   * all subsequent traces are also sampled negatively.\n   *\n   * This option allows you to get consistent, linked traces within a user journey\n   * while maintaining an overall quota based on your trace sampling settings.\n   *\n   * This option is only effective if {@link BrowserTracingOptions.linkPreviousTrace}\n   * is enabled (i.e. not set to `'off'`).\n   *\n   * @default `false` - this is an opt-in feature.\n   */\n  consistentTraceSampling: boolean;\n\n  /**\n   * If set to `true`, the pageload span will not end itself automatically, unless it\n   * runs until the {@link BrowserTracingOptions.finalTimeout} (30 seconds by default) is reached.\n   *\n   * Set this option to `true`, if you want full control over the pageload span duration.\n   * You can use `Sentry.reportPageLoaded()` to manually end the pageload span whenever convenient.\n   * Be aware that you have to ensure that this is always called, regardless of the chosen route\n   * or path in the application.\n   *\n   * @default `false`. By default, the pageload span will end itself automatically, based on\n   * the {@link BrowserTracingOptions.finalTimeout}, {@link BrowserTracingOptions.idleTimeout}\n   * and {@link BrowserTracingOptions.childSpanTimeout}. This is more convenient to use but means\n   * that the pageload duration can be arbitrary and might not be fully representative of a perceived\n   * page load time.\n   */\n  enableReportPageLoaded: boolean;\n\n  /**\n   * _experiments allows the user to send options to define how this integration works.\n   *\n   * Default: undefined\n   */\n  _experiments: Partial<{\n    enableInteractions: boolean;\n    enableStandaloneClsSpans: boolean;\n    enableStandaloneLcpSpans: boolean;\n  }>;\n\n  /**\n   * A callback which is called before a span for a pageload or navigation is started.\n   * It receives the options passed to `startSpan`, and expects to return an updated options object.\n   */\n  beforeStartSpan?: (options: StartSpanOptions) => StartSpanOptions;\n\n  /**\n   * This function will be called before creating a span for a request with the given url.\n   * Return false if you don't want a span for the given url.\n   *\n   * Default: (url: string) => true\n   */\n  shouldCreateSpanForRequest?(this: void, url: string): boolean;\n\n  /**\n   * This callback is invoked directly after a span is started for an outgoing fetch or XHR request.\n   * You can use it to annotate the span with additional data or attributes, for example by setting\n   * attributes based on the passed request headers.\n   */\n  onRequestSpanStart?(span: Span, requestInformation: RequestHookInfo): void;\n\n  /**\n   * Is called when spans end for outgoing requests, providing access to response headers.\n   */\n  onRequestSpanEnd?(span: Span, responseInformation: ResponseHookInfo): void;\n}\n\nconst DEFAULT_BROWSER_TRACING_OPTIONS: BrowserTracingOptions = {\n  ...TRACING_DEFAULTS,\n  instrumentNavigation: true,\n  instrumentPageLoad: true,\n  markBackgroundSpan: true,\n  enableLongTask: true,\n  enableLongAnimationFrame: true,\n  enableInp: true,\n  ignoreResourceSpans: [],\n  ignorePerformanceApiSpans: [],\n  detectRedirects: true,\n  linkPreviousTrace: 'in-memory',\n  consistentTraceSampling: false,\n  enableReportPageLoaded: false,\n  _experiments: {},\n  ...defaultRequestInstrumentationOptions,\n};\n\n/**\n * The Browser Tracing integration automatically instruments browser pageload/navigation\n * actions as transactions, and captures requests, metrics and errors as spans.\n *\n * The integration can be configured with a variety of options, and can be extended to use\n * any routing library.\n *\n * We explicitly export the proper type here, as this has to be extended in some cases.\n */\nexport const browserTracingIntegration = ((options: Partial<BrowserTracingOptions> = {}) => {\n  if ('enableElementTiming' in options) {\n    consoleSandbox(() => {\n      // oxlint-disable-next-line no-console\n      console.warn(\n        '[Sentry] `enableElementTiming` is deprecated and no longer has any effect. Use the standalone `elementTimingIntegration` instead.',\n      );\n    });\n  }\n\n  const latestRoute: RouteInfo = {\n    name: undefined,\n    source: undefined,\n  };\n\n  /**\n   * This is just a small wrapper that makes `document` optional.\n   * We want to be extra-safe and always check that this exists, to ensure weird environments do not blow up.\n   */\n  const optionalWindowDocument = WINDOW.document as (typeof WINDOW)['document'] | undefined;\n\n  const {\n    enableInp,\n    enableLongTask,\n    enableLongAnimationFrame,\n    _experiments: { enableInteractions, enableStandaloneClsSpans, enableStandaloneLcpSpans },\n    beforeStartSpan,\n    idleTimeout,\n    finalTimeout,\n    childSpanTimeout,\n    markBackgroundSpan,\n    traceFetch,\n    traceXHR,\n    // eslint-disable-next-line typescript/no-deprecated\n    trackFetchStreamPerformance,\n    shouldCreateSpanForRequest,\n    enableHTTPTimings,\n    ignoreResourceSpans,\n    ignorePerformanceApiSpans,\n    instrumentPageLoad,\n    instrumentNavigation,\n    detectRedirects,\n    linkPreviousTrace,\n    consistentTraceSampling,\n    enableReportPageLoaded,\n    onRequestSpanStart,\n    onRequestSpanEnd,\n  } = {\n    ...DEFAULT_BROWSER_TRACING_OPTIONS,\n    ...options,\n  };\n\n  const _isBot = isBotUserAgent();\n\n  let lastInteractionTimestamp: number | undefined;\n\n  let _pageloadSpan: Span | undefined;\n\n  /** Create routing idle transaction. */\n  function _createRouteSpan(client: Client, startSpanOptions: StartSpanOptions, makeActive = true, url?: string): void {\n    const isPageloadSpan = startSpanOptions.op === 'pageload';\n\n    const initialSpanName = startSpanOptions.name;\n    const finalStartSpanOptions: StartSpanOptions = beforeStartSpan\n      ? beforeStartSpan(startSpanOptions)\n      : startSpanOptions;\n\n    // For navigations, `url` is the destination URL, so we use it to reflect the post-navigation location.\n    // For pageloads (and manual navigation spans without a URL) we fall back to the current location.\n    const urlObject = parseStringToURLObject(url || getLocationHref());\n\n    const attributes = {\n      ...(urlObject?.pathname && { [URL_PATH]: urlObject.pathname }),\n      ...(urlObject && !isURLObjectRelative(urlObject) && { [URL_FULL]: urlObject.href }),\n      ...finalStartSpanOptions.attributes,\n    };\n\n    // If `finalStartSpanOptions.name` is different than `startSpanOptions.name`\n    // it is because `beforeStartSpan` set a custom name. Therefore we set the source to 'custom'.\n    if (initialSpanName !== finalStartSpanOptions.name) {\n      attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] = 'custom';\n    }\n\n    finalStartSpanOptions.attributes = attributes;\n\n    if (!makeActive) {\n      // We want to ensure this has 0s duration\n      const now = dateTimestampInSeconds();\n      startInactiveSpan({\n        ...finalStartSpanOptions,\n        startTime: now,\n      }).end(now);\n      return;\n    }\n\n    latestRoute.name = finalStartSpanOptions.name;\n    latestRoute.source = attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE];\n\n    const idleSpan = startIdleSpan(finalStartSpanOptions, {\n      idleTimeout,\n      finalTimeout,\n      childSpanTimeout,\n      // should wait for finish signal if it's a pageload transaction\n      disableAutoFinish: isPageloadSpan,\n      beforeSpanEnd: span => {\n        addPerformanceEntries(span, {\n          ignoreResourceSpans,\n          ignorePerformanceApiSpans,\n          spanStreamingEnabled: hasSpanStreamingEnabled(client),\n        });\n        setActiveIdleSpan(client, undefined);\n\n        // A trace should stay consistent over the entire timespan of one route - even after the pageload/navigation ended.\n        // Only when another navigation happens, we want to create a new trace.\n        // This way, e.g. errors that occur after the pageload span ended are still associated to the pageload trace.\n        const scope = getCurrentScope();\n        const oldPropagationContext = scope.getPropagationContext();\n\n        scope.setPropagationContext({\n          ...oldPropagationContext,\n          traceId: idleSpan.spanContext().traceId,\n          sampled: spanIsSampled(idleSpan),\n          dsc: getDynamicSamplingContextFromSpan(span),\n        });\n\n        if (isPageloadSpan) {\n          // clean up the stored pageload span on the intergration.\n          _pageloadSpan = undefined;\n        }\n      },\n      trimIdleSpanEndTimestamp: !enableReportPageLoaded,\n    });\n\n    if (isPageloadSpan && enableReportPageLoaded) {\n      _pageloadSpan = idleSpan;\n    }\n\n    setActiveIdleSpan(client, idleSpan);\n\n    function emitFinish(): void {\n      if (optionalWindowDocument && ['interactive', 'complete'].includes(optionalWindowDocument.readyState)) {\n        client.emit('idleSpanEnableAutoFinish', idleSpan);\n        // Once the finish signal has been emitted, the listener is no longer needed. Removing it here (rather than\n        // relying on `{ once: true }`) also covers the common case where the document is already loaded when the span\n        // starts, so the listener never fires and would otherwise leak together with the `idleSpan` it closes over.\n        optionalWindowDocument.removeEventListener('readystatechange', emitFinish);\n      }\n    }\n\n    // Enable auto finish of the pageload span if users are not explicitly ending it\n    if (isPageloadSpan && !enableReportPageLoaded && optionalWindowDocument) {\n      optionalWindowDocument.addEventListener('readystatechange', emitFinish);\n\n      emitFinish();\n    }\n  }\n\n  return {\n    name: BROWSER_TRACING_INTEGRATION_ID,\n    setup(client) {\n      if (_isBot) {\n        DEBUG_BUILD && debug.log('[Tracing] Skipping browserTracingIntegration setup for bot user agent.');\n        return;\n      }\n\n      registerSpanErrorInstrumentation();\n\n      if (\n        enableLongAnimationFrame &&\n        GLOBAL_OBJ.PerformanceObserver &&\n        PerformanceObserver.supportedEntryTypes?.includes('long-animation-frame')\n      ) {\n        startTrackingLongAnimationFrames();\n      } else if (enableLongTask) {\n        startTrackingLongTasks();\n      }\n\n      if (enableInteractions) {\n        startTrackingInteractions();\n      }\n\n      if (detectRedirects && optionalWindowDocument) {\n        const interactionHandler = (): void => {\n          lastInteractionTimestamp = timestampInSeconds();\n        };\n        addEventListener('click', interactionHandler, { capture: true });\n        addEventListener('keydown', interactionHandler, { capture: true, passive: true });\n      }\n\n      function maybeEndActiveSpan(): void {\n        const activeSpan = getActiveIdleSpan(client);\n\n        if (activeSpan && !spanToJSON(activeSpan).timestamp) {\n          DEBUG_BUILD && debug.log(`[Tracing] Finishing current active span with op: ${spanToJSON(activeSpan).op}`);\n          // If there's an open active span, we need to finish it before creating an new one.\n          activeSpan.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON, 'cancelled');\n          activeSpan.end();\n        }\n      }\n\n      client.on('startNavigationSpan', (startSpanOptions, navigationOptions) => {\n        if (getClient() !== client) {\n          return;\n        }\n\n        if (navigationOptions?.isRedirect) {\n          DEBUG_BUILD &&\n            debug.warn('[Tracing] Detected redirect, navigation span will not be the root span, but a child span.');\n          _createRouteSpan(\n            client,\n            {\n              op: 'navigation.redirect',\n              ...startSpanOptions,\n            },\n            false,\n            navigationOptions.url,\n          );\n          return;\n        }\n\n        // Reset the last interaction timestamp since we now start a new navigation.\n        // Any subsequent navigation span starts could again be a redirect, so we\n        // should reset our heuristic detectors.\n        lastInteractionTimestamp = undefined;\n\n        maybeEndActiveSpan();\n\n        getIsolationScope().setPropagationContext({\n          traceId: generateTraceId(),\n          sampleRand: Math.random(),\n          propagationSpanId: hasSpansEnabled() ? undefined : generateSpanId(),\n        });\n\n        const scope = getCurrentScope();\n        scope.setPropagationContext({\n          traceId: generateTraceId(),\n          sampleRand: Math.random(),\n          propagationSpanId: hasSpansEnabled() ? undefined : generateSpanId(),\n        });\n\n        // We reset this to ensure we do not have lingering incorrect data here\n        // places that call this hook may set this where appropriate - else, the URL at span sending time is used\n        scope.setSDKProcessingMetadata({\n          normalizedRequest: undefined,\n        });\n\n        _createRouteSpan(\n          client,\n          {\n            op: 'navigation',\n            ...startSpanOptions,\n            // Navigation starts a new trace and is NOT parented under any active interaction (e.g. ui.action.click)\n            parentSpan: null,\n            forceTransaction: true,\n          },\n          true,\n          navigationOptions?.url,\n        );\n      });\n\n      client.on('startPageLoadSpan', (startSpanOptions, traceOptions = {}) => {\n        if (getClient() !== client) {\n          return;\n        }\n        maybeEndActiveSpan();\n\n        const sentryTrace =\n          traceOptions.sentryTrace || getMetaContent('sentry-trace') || getServerTiming('sentry-trace');\n        const baggage = traceOptions.baggage || getMetaContent('baggage') || getServerTiming('baggage');\n\n        const propagationContext = propagationContextFromHeaders(sentryTrace, baggage);\n\n        const scope = getCurrentScope();\n        scope.setPropagationContext(propagationContext);\n        if (!hasSpansEnabled()) {\n          // for browser, we wanna keep the spanIds consistent during the entire lifetime of the trace\n          // this works by setting the propagationSpanId to a random spanId so that we have a consistent\n          // span id to propagate in TwP mode (!hasSpansEnabled())\n          scope.getPropagationContext().propagationSpanId = generateSpanId();\n        }\n\n        // We store the normalized request data on the scope, so we get the request data at time of span creation\n        // otherwise, the URL etc. may already be of the following navigation, and we'd report the wrong URL\n        scope.setSDKProcessingMetadata({\n          normalizedRequest: getHttpRequestData(),\n        });\n\n        _createRouteSpan(client, {\n          op: 'pageload',\n          ...startSpanOptions,\n        });\n      });\n\n      client.on('endPageloadSpan', () => {\n        if (enableReportPageLoaded && _pageloadSpan) {\n          _pageloadSpan.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON, 'reportPageLoaded');\n          _pageloadSpan.end();\n        }\n      });\n    },\n\n    afterAllSetup(client) {\n      if (_isBot) {\n        return;\n      }\n\n      // Auto-register webVitalsIntegration if the user hasn't added one. We do this in\n      // afterAllSetup so that a user-provided webVitalsIntegration - which may be ordered after\n      // browserTracingIntegration in the integrations array - has already been installed.\n      if (client.addIntegration && !client.getIntegrationByName?.(WEB_VITALS_INTEGRATION_NAME)) {\n        client.addIntegration(\n          webVitalsIntegration({\n            ignore: enableInp ? [] : ['inp'],\n            _experiments: {\n              enableStandaloneClsSpans,\n              enableStandaloneLcpSpans,\n            },\n          }),\n        );\n      }\n\n      let startingUrl: string | undefined = getLocationHref();\n\n      if (linkPreviousTrace !== 'off') {\n        linkTraces(client, { linkPreviousTrace, consistentTraceSampling });\n      }\n\n      if (WINDOW.location) {\n        if (instrumentPageLoad) {\n          const origin = browserPerformanceTimeOrigin();\n          startBrowserTracingPageLoadSpan(client, {\n            name: WINDOW.location.pathname,\n            // pageload should always start at timeOrigin (and needs to be in s, not ms)\n            startTime: origin ? origin / 1000 : undefined,\n            attributes: {\n              [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'url',\n              [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.pageload.browser',\n            },\n          });\n        }\n\n        if (instrumentNavigation) {\n          addHistoryInstrumentationHandler(({ to, from }) => {\n            /**\n             * This early return is there to account for some cases where a navigation transaction starts right after\n             * long-running pageload. We make sure that if `from` is undefined and a valid `startingURL` exists, we don't\n             * create an uneccessary navigation transaction.\n             *\n             * This was hard to duplicate, but this behavior stopped as soon as this fix was applied. This issue might also\n             * only be caused in certain development environments where the usage of a hot module reloader is causing\n             * errors.\n             */\n            if (from === undefined && startingUrl?.indexOf(to) !== -1) {\n              startingUrl = undefined;\n              return;\n            }\n\n            startingUrl = undefined;\n            const parsed = parseStringToURLObject(to);\n            const activeSpan = getActiveIdleSpan(client);\n            const navigationIsRedirect =\n              activeSpan && detectRedirects && isRedirect(activeSpan, lastInteractionTimestamp);\n\n            startBrowserTracingNavigationSpan(\n              client,\n              {\n                name: parsed?.pathname || WINDOW.location.pathname,\n                attributes: {\n                  [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'url',\n                  [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.navigation.browser',\n                },\n              },\n              { url: to, isRedirect: navigationIsRedirect },\n            );\n          });\n        }\n      }\n\n      if (markBackgroundSpan) {\n        registerBackgroundTabDetection();\n      }\n\n      if (enableInteractions) {\n        registerInteractionListener(client, idleTimeout, finalTimeout, childSpanTimeout, latestRoute);\n      }\n\n      instrumentOutgoingRequests(client, {\n        traceFetch,\n        traceXHR,\n        tracePropagationTargets: client.getOptions().tracePropagationTargets,\n        shouldCreateSpanForRequest,\n        enableHTTPTimings,\n        onRequestSpanStart,\n        onRequestSpanEnd,\n      });\n\n      if (trackFetchStreamPerformance) {\n        client.addIntegration(fetchStreamPerformanceIntegration());\n      }\n    },\n  };\n}) satisfies IntegrationFn;\n\n/**\n * Manually start a page load span.\n * This will only do something if a browser tracing integration integration has been setup.\n *\n * If you provide a custom `traceOptions` object, it will be used to continue the trace\n * instead of the default behavior, which is to look it up on the <meta> tags.\n */\nexport function startBrowserTracingPageLoadSpan(\n  client: Client,\n  spanOptions: StartSpanOptions,\n  traceOptions?: { sentryTrace?: string | undefined; baggage?: string | undefined },\n): Span | undefined {\n  client.emit('startPageLoadSpan', spanOptions, traceOptions);\n  getCurrentScope().setTransactionName(spanOptions.name);\n\n  const pageloadSpan = getActiveIdleSpan(client);\n\n  if (pageloadSpan) {\n    client.emit('afterStartPageLoadSpan', pageloadSpan);\n  }\n\n  return pageloadSpan;\n}\n\n/**\n * Manually start a navigation span.\n * This will only do something if a browser tracing integration has been setup.\n */\nexport function startBrowserTracingNavigationSpan(\n  client: Client,\n  spanOptions: StartSpanOptions,\n  options?: { url?: string; isRedirect?: boolean },\n): Span | undefined {\n  const { url, isRedirect } = options || {};\n  client.emit('beforeStartNavigationSpan', spanOptions, { isRedirect, url });\n  client.emit('startNavigationSpan', spanOptions, { isRedirect, url });\n\n  const scope = getCurrentScope();\n  scope.setTransactionName(spanOptions.name);\n\n  // We store the normalized request data on the scope, so we get the request data at time of span creation\n  // otherwise, the URL etc. may already be of the following navigation, and we'd report the wrong URL\n  if (url && !isRedirect) {\n    scope.setSDKProcessingMetadata({\n      normalizedRequest: {\n        ...getHttpRequestData(),\n        url,\n      },\n    });\n  }\n\n  return getActiveIdleSpan(client);\n}\n\n/** Returns the value of a meta tag */\nexport function getMetaContent(metaName: string): string | undefined {\n  /**\n   * This is just a small wrapper that makes `document` optional.\n   * We want to be extra-safe and always check that this exists, to ensure weird environments do not blow up.\n   */\n  const optionalWindowDocument = WINDOW.document as (typeof WINDOW)['document'] | undefined;\n\n  const metaTag = optionalWindowDocument?.querySelector(`meta[name=${metaName}]`);\n  return metaTag?.getAttribute('content') || undefined;\n}\n\n/** Returns the description of a server timing entry */\nexport function getServerTiming(name: string): string | undefined {\n  const navigation = WINDOW.performance?.getEntriesByType?.('navigation')[0] as PerformanceNavigationTiming | undefined;\n  const entry = navigation?.serverTiming?.find(entry => entry.name === name);\n  return entry?.description;\n}\n\n/** Start listener for interaction transactions */\nfunction registerInteractionListener(\n  client: Client,\n  idleTimeout: BrowserTracingOptions['idleTimeout'],\n  finalTimeout: BrowserTracingOptions['finalTimeout'],\n  childSpanTimeout: BrowserTracingOptions['childSpanTimeout'],\n  latestRoute: RouteInfo,\n): void {\n  /**\n   * This is just a small wrapper that makes `document` optional.\n   * We want to be extra-safe and always check that this exists, to ensure weird environments do not blow up.\n   */\n  const optionalWindowDocument = WINDOW.document as (typeof WINDOW)['document'] | undefined;\n\n  let inflightInteractionSpan: Span | undefined;\n  const registerInteractionTransaction = (): void => {\n    const op = 'ui.action.click';\n\n    const activeIdleSpan = getActiveIdleSpan(client);\n    if (activeIdleSpan) {\n      const currentRootSpanOp = spanToJSON(activeIdleSpan).op;\n      if (['navigation', 'pageload'].includes(currentRootSpanOp as string)) {\n        DEBUG_BUILD &&\n          debug.warn(`[Tracing] Did not create ${op} span because a pageload or navigation span is in progress.`);\n        return undefined;\n      }\n    }\n\n    if (inflightInteractionSpan) {\n      inflightInteractionSpan.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON, 'interactionInterrupted');\n      inflightInteractionSpan.end();\n      inflightInteractionSpan = undefined;\n    }\n\n    if (!latestRoute.name) {\n      DEBUG_BUILD && debug.warn(`[Tracing] Did not create ${op} transaction because _latestRouteName is missing.`);\n      return undefined;\n    }\n\n    inflightInteractionSpan = startIdleSpan(\n      {\n        name: latestRoute.name,\n        op,\n        attributes: {\n          [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: latestRoute.source || 'url',\n        },\n      },\n      {\n        idleTimeout,\n        finalTimeout,\n        childSpanTimeout,\n      },\n    );\n  };\n\n  if (optionalWindowDocument) {\n    addEventListener('click', registerInteractionTransaction, { capture: true });\n  }\n}\n\n// We store the active idle span on the client object, so we can access it from exported functions\nconst ACTIVE_IDLE_SPAN_PROPERTY = '_sentry_idleSpan';\nfunction getActiveIdleSpan(client: Client): Span | undefined {\n  return (client as { [ACTIVE_IDLE_SPAN_PROPERTY]?: Span })[ACTIVE_IDLE_SPAN_PROPERTY];\n}\n\nfunction setActiveIdleSpan(client: Client, span: Span | undefined): void {\n  addNonEnumerableProperty(client, ACTIVE_IDLE_SPAN_PROPERTY, span);\n}\n\n// The max. time in seconds between two pageload/navigation spans that makes us consider the second one a redirect\nconst REDIRECT_THRESHOLD = 1.5;\n\nfunction isRedirect(activeSpan: Span, lastInteractionTimestamp: number | undefined): boolean {\n  const spanData = spanToJSON(activeSpan);\n\n  const now = dateTimestampInSeconds();\n\n  // More than REDIRECT_THRESHOLD seconds since last navigation/pageload span?\n  // --> never consider this a redirect\n  const startTimestamp = spanData.start_timestamp;\n  if (now - startTimestamp > REDIRECT_THRESHOLD) {\n    return false;\n  }\n\n  // A click happened in the last REDIRECT_THRESHOLD seconds?\n  // --> never consider this a redirect\n  if (lastInteractionTimestamp && now - lastInteractionTimestamp <= REDIRECT_THRESHOLD) {\n    return false;\n  }\n\n  return true;\n}\n", "import type { Client } from '@sentry/core/browser';\nimport { getClient } from '@sentry/core/browser';\n\n/**\n * Manually report the end of the page load, resulting in the SDK ending the pageload span.\n * This only works if {@link BrowserTracingOptions.enableReportPageLoaded} is set to `true`.\n * Otherwise, the pageload span will end itself based on the {@link BrowserTracingOptions.finalTimeout},\n * {@link BrowserTracingOptions.idleTimeout} and {@link BrowserTracingOptions.childSpanTimeout}.\n *\n * @param client - The client to use. If not provided, the global client will be used.\n */\nexport function reportPageLoaded(client: Client | undefined = getClient()): void {\n  client?.emit('endPageloadSpan');\n}\n", "import type { Span } from '@sentry/core/browser';\nimport { _INTERNAL_setSpanForScope, getActiveSpan, getCurrentScope } from '@sentry/core/browser';\n\n/**\n * Sets an inactive span active on the current scope.\n *\n * This is useful in browser applications, if you want to create a span that cannot be finished\n * within its callback. Any spans started while the given span is active, will be children of the span.\n *\n * If there already was an active span on the scope prior to calling this function, it is replaced\n * with the given span and restored after the span ended. Otherwise, the span will simply be\n * removed, resulting in no active span on the scope.\n *\n * IMPORTANT: This function can ONLY be used in the browser! Calling this function in a server\n * environment (for example in a server-side rendered component) will result in undefined behaviour\n * and is not supported.\n * You MUST call `span.end()` manually, otherwise the span will never be finished.\n *\n * @example\n * ```js\n * let checkoutSpan;\n *\n * on('checkoutStarted', () => {\n *  checkoutSpan = Sentry.startInactiveSpan({ name: 'checkout-flow' });\n *  Sentry.setActiveSpanInBrowser(checkoutSpan);\n * })\n *\n * // during this time, any spans started will be children of `checkoutSpan`:\n * Sentry.startSpan({ name: 'checkout-step-1' }, () => {\n *  // ... `\n * })\n *\n * on('checkoutCompleted', () => {\n *  checkoutSpan?.end();\n * })\n * ```\n *\n * @param span - the span to set active\n */\nexport function setActiveSpanInBrowser(span: Span): void {\n  const maybePreviousActiveSpan = getActiveSpan();\n\n  // If the span is already active, there's no need to double-patch or set it again.\n  // This also guards against users (for whatever reason) calling setActiveSpanInBrowser on SDK-started\n  // idle spans like pageload or navigation spans. These will already be handled correctly by the SDK.\n  // For nested situations, we have to double-patch to ensure we restore the correct previous span (see tests)\n  if (maybePreviousActiveSpan === span) {\n    return;\n  }\n\n  const scope = getCurrentScope();\n\n  // Putting a small patch onto the span.end method to ensure we\n  // remove the span from the scope when it ends.\n  // eslint-disable-next-line @typescript-eslint/unbound-method\n  span.end = new Proxy(span.end, {\n    apply(target, thisArg, args: Parameters<Span['end']>) {\n      _INTERNAL_setSpanForScope(scope, maybePreviousActiveSpan);\n      return Reflect.apply(target, thisArg, args);\n    },\n  });\n\n  _INTERNAL_setSpanForScope(scope, span);\n}\n", "import type { IntegrationFn } from '@sentry/core/browser';\nimport {\n  captureSpan,\n  debug,\n  defineIntegration,\n  hasSpanStreamingEnabled,\n  isStreamedBeforeSendSpanCallback,\n  SpanBuffer,\n  spanIsSampled,\n} from '@sentry/core/browser';\nimport { DEBUG_BUILD } from '../debug-build';\n\nexport const spanStreamingIntegration = defineIntegration(() => {\n  return {\n    name: 'SpanStreaming' as const,\n\n    beforeSetup(client) {\n      // If users only set spanStreamingIntegration, without traceLifecycle, we set it to \"stream\" for them.\n      // This avoids the classic double-opt-in problem we'd otherwise have in the browser SDK.\n      const clientOptions = client.getOptions();\n      if (!clientOptions.traceLifecycle) {\n        DEBUG_BUILD && debug.log('[SpanStreaming] setting `traceLifecycle` to \"stream\"');\n        clientOptions.traceLifecycle = 'stream';\n      }\n    },\n\n    setup(client) {\n      const initialMessage = 'SpanStreaming integration requires';\n      const fallbackMsg = 'Falling back to static trace lifecycle.';\n      const clientOptions = client.getOptions();\n\n      if (!hasSpanStreamingEnabled(client)) {\n        clientOptions.traceLifecycle = 'static';\n        DEBUG_BUILD && debug.warn(`${initialMessage} \\`traceLifecycle\\` to be set to \"stream\"! ${fallbackMsg}`);\n        return;\n      }\n\n      const beforeSendSpan = clientOptions.beforeSendSpan;\n      // If users misconfigure their SDK by opting into span streaming but\n      // using an incompatible beforeSendSpan callback, we fall back to the static trace lifecycle.\n      if (beforeSendSpan && !isStreamedBeforeSendSpanCallback(beforeSendSpan)) {\n        clientOptions.traceLifecycle = 'static';\n        DEBUG_BUILD &&\n          debug.warn(`${initialMessage} a beforeSendSpan callback using \\`withStreamedSpan\\`! ${fallbackMsg}`);\n        return;\n      }\n\n      const buffer = new SpanBuffer(client);\n\n      client.on('afterSpanEnd', span => {\n        // Negatively sampled spans must not be captured.\n        // This happens because OTel and we create non-recording spans for negatively sampled spans\n        // that go through the same life cycle as recording spans.\n        if (!spanIsSampled(span)) {\n          return;\n        }\n        buffer.add(captureSpan(span, client));\n      });\n\n      // In addition to capturing the span, we also flush the trace when the segment\n      // span ends to ensure things are sent timely. We never know when the browser\n      // is closed, users navigate away, etc.\n      client.on('afterSegmentSpanEnd', segmentSpan => {\n        const traceId = segmentSpan.spanContext().traceId;\n        setTimeout(() => {\n          buffer.flush(traceId);\n        }, 500);\n      });\n    },\n  };\n}) satisfies IntegrationFn;\n", "import type {\n  BaseTransportOptions,\n  Envelope,\n  OfflineStore,\n  OfflineTransportOptions,\n  Transport,\n} from '@sentry/core/browser';\nimport { makeOfflineTransport, parseEnvelope, serializeEnvelope } from '@sentry/core/browser';\nimport { WINDOW } from '../helpers';\nimport { makeFetchTransport } from './fetch';\n\n// 'Store', 'promisifyRequest' and 'createStore' were originally copied from the 'idb-keyval' package before being\n// modified and simplified: https://github.com/jakearchibald/idb-keyval\n//\n// At commit: 0420a704fd6cbb4225429c536b1f61112d012fca\n// Original license:\n\n// Copyright 2016, Jake Archibald\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\ntype Store = <T>(callback: (store: IDBObjectStore) => T | PromiseLike<T>) => Promise<T>;\n\nfunction promisifyRequest<T = undefined>(request: IDBRequest<T> | IDBTransaction): Promise<T> {\n  return new Promise<T>((resolve, reject) => {\n    // @ts-expect-error - file size hacks\n    request.oncomplete = request.onsuccess = () => resolve(request.result);\n    // @ts-expect-error - file size hacks\n    request.onabort = request.onerror = () => reject(request.error);\n  });\n}\n\n/** Create or open an IndexedDb store */\nexport function createStore(dbName: string, storeName: string): Store {\n  const request = indexedDB.open(dbName);\n  request.onupgradeneeded = () => request.result.createObjectStore(storeName);\n  const dbp = promisifyRequest(request);\n\n  return callback => dbp.then(db => callback(db.transaction(storeName, 'readwrite').objectStore(storeName)));\n}\n\nfunction keys(store: IDBObjectStore): Promise<number[]> {\n  return promisifyRequest(store.getAllKeys() as IDBRequest<number[]>);\n}\n\n/** Insert into the end of the store */\nexport function push(store: Store, value: Uint8Array | string, maxQueueSize: number): Promise<void> {\n  return store(store => {\n    return keys(store).then(keys => {\n      if (keys.length >= maxQueueSize) {\n        return;\n      }\n\n      // We insert with an incremented key so that the entries are popped in order\n      store.put(value, Math.max(...keys, 0) + 1);\n      return promisifyRequest(store.transaction);\n    });\n  });\n}\n\n/** Insert into the front of the store */\nexport function unshift(store: Store, value: Uint8Array | string, maxQueueSize: number): Promise<void> {\n  return store(store => {\n    return keys(store).then(keys => {\n      if (keys.length >= maxQueueSize) {\n        return;\n      }\n\n      // We insert with an decremented key so that the entries are popped in order\n      store.put(value, Math.min(...keys, 0) - 1);\n      return promisifyRequest(store.transaction);\n    });\n  });\n}\n\n/** Pop the oldest value from the store */\nexport function shift(store: Store): Promise<Uint8Array | string | undefined> {\n  return store(store => {\n    return keys(store).then(keys => {\n      const firstKey = keys[0];\n      if (firstKey == null) {\n        return undefined;\n      }\n\n      return promisifyRequest(store.get(firstKey)).then(value => {\n        store.delete(firstKey);\n        return promisifyRequest(store.transaction).then(() => value);\n      });\n    });\n  });\n}\n\nexport interface BrowserOfflineTransportOptions extends Omit<OfflineTransportOptions, 'createStore'> {\n  /**\n   * Name of indexedDb database to store envelopes in\n   * Default: 'sentry-offline'\n   */\n  dbName?: string;\n  /**\n   * Name of indexedDb object store to store envelopes in\n   * Default: 'queue'\n   */\n  storeName?: string;\n  /**\n   * Maximum number of envelopes to store\n   * Default: 30\n   */\n  maxQueueSize?: number;\n}\n\nfunction createIndexedDbStore(options: BrowserOfflineTransportOptions): OfflineStore {\n  let store: Store | undefined;\n\n  // Lazily create the store only when it's needed\n  function getStore(): Store {\n    if (store == undefined) {\n      store = createStore(options.dbName || 'sentry-offline', options.storeName || 'queue');\n    }\n\n    return store;\n  }\n\n  return {\n    push: async (env: Envelope) => {\n      try {\n        const serialized = serializeEnvelope(env);\n        await push(getStore(), serialized, options.maxQueueSize || 30);\n      } catch {\n        //\n      }\n    },\n    unshift: async (env: Envelope) => {\n      try {\n        const serialized = serializeEnvelope(env);\n        await unshift(getStore(), serialized, options.maxQueueSize || 30);\n      } catch {\n        //\n      }\n    },\n    shift: async () => {\n      try {\n        const deserialized = await shift(getStore());\n        if (deserialized) {\n          return parseEnvelope(deserialized);\n        }\n      } catch {\n        //\n      }\n\n      return undefined;\n    },\n  };\n}\n\nfunction makeIndexedDbOfflineTransport<T>(\n  createTransport: (options: T) => Transport,\n): (options: T & BrowserOfflineTransportOptions) => Transport {\n  return options => {\n    const transport = createTransport({ ...options, createStore: createIndexedDbStore });\n\n    WINDOW.addEventListener('online', async _ => {\n      await transport.flush();\n    });\n\n    return transport;\n  };\n}\n\n/**\n * Creates a transport that uses IndexedDb to store events when offline.\n */\nexport function makeBrowserOfflineTransport<T extends BaseTransportOptions>(\n  createTransport: (options: T) => Transport = makeFetchTransport,\n): (options: T & BrowserOfflineTransportOptions) => Transport {\n  return makeIndexedDbOfflineTransport<T>(makeOfflineTransport(createTransport));\n}\n", "/* eslint-disable max-lines */\nimport type {\n  Client,\n  ContinuousThreadCpuProfile,\n  DebugImage,\n  Envelope,\n  Event,\n  EventEnvelope,\n  Profile,\n  ProfileChunk,\n  Span,\n  ThreadCpuProfile,\n} from '@sentry/core/browser';\nimport {\n  browserPerformanceTimeOrigin,\n  debug,\n  DEFAULT_ENVIRONMENT,\n  forEachEnvelopeItem,\n  getClient,\n  getDebugImagesForResources,\n  GLOBAL_OBJ,\n  spanToJSON,\n  timestampInSeconds,\n  uuid4,\n} from '@sentry/core/browser';\nimport type { BrowserOptions } from '../client';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { WINDOW } from '../helpers';\nimport type { JSSelfProfile, JSSelfProfiler, JSSelfProfilerConstructor, JSSelfProfileStack } from './jsSelfProfiling';\n\nconst MS_TO_NS = 1e6;\n\n// Checking if we are in Main or Worker thread: `self` (not `window`) is the `globalThis` in Web Workers and `importScripts` are only available in Web Workers\nconst isMainThread = 'window' in GLOBAL_OBJ && GLOBAL_OBJ.window === GLOBAL_OBJ && typeof importScripts === 'undefined';\n\n// Setting ID to 0 as we cannot get an ID from Web Workers\nexport const PROFILER_THREAD_ID_STRING = String(0);\nexport const PROFILER_THREAD_NAME = isMainThread ? 'main' : 'worker';\n\n// We force make this optional to be on the safe side...\nconst navigator = WINDOW.navigator as typeof WINDOW.navigator | undefined;\n\n// Machine properties (eval only once)\nlet OS_PLATFORM = '';\nlet OS_PLATFORM_VERSION = '';\nlet OS_ARCH = '';\nlet OS_BROWSER = navigator?.userAgent || '';\nlet OS_MODEL = '';\nconst OS_LOCALE = navigator?.language || navigator?.languages?.[0] || '';\n\ntype UAData = {\n  platform?: string;\n  architecture?: string;\n  model?: string;\n  platformVersion?: string;\n  fullVersionList?: {\n    brand: string;\n    version: string;\n  }[];\n};\n\ninterface UserAgentData {\n  getHighEntropyValues: (keys: string[]) => Promise<UAData>;\n}\n\nfunction isUserAgentData(data: unknown): data is UserAgentData {\n  return typeof data === 'object' && data !== null && 'getHighEntropyValues' in data;\n}\n\n// @ts-expect-error userAgentData is not part of the navigator interface yet\nconst userAgentData = navigator?.userAgentData;\n\nif (isUserAgentData(userAgentData)) {\n  userAgentData\n    .getHighEntropyValues(['architecture', 'model', 'platform', 'platformVersion', 'fullVersionList'])\n    .then((ua: UAData) => {\n      OS_PLATFORM = ua.platform || '';\n      OS_ARCH = ua.architecture || '';\n      OS_MODEL = ua.model || '';\n      OS_PLATFORM_VERSION = ua.platformVersion || '';\n\n      if (ua.fullVersionList?.length) {\n        // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n        const firstUa = ua.fullVersionList[ua.fullVersionList.length - 1]!;\n        OS_BROWSER = `${firstUa.brand} ${firstUa.version}`;\n      }\n    })\n    .catch(e => void e);\n}\n\nfunction isProcessedJSSelfProfile(profile: ThreadCpuProfile | JSSelfProfile): profile is JSSelfProfile {\n  return !('thread_metadata' in profile);\n}\n\n// Enriches the profile with threadId of the current thread.\n// This is done in node as we seem to not be able to get the info from C native code.\n/**\n *\n */\nexport function enrichWithThreadInformation(profile: ThreadCpuProfile | JSSelfProfile): ThreadCpuProfile {\n  if (!isProcessedJSSelfProfile(profile)) {\n    return profile;\n  }\n\n  return convertJSSelfProfileToSampledFormat(profile);\n}\n\n// Profile is marked as optional because it is deleted from the metadata\n// by the integration before the event is processed by other integrations.\nexport interface ProfiledEvent extends Event {\n  sdkProcessingMetadata: {\n    profile?: JSSelfProfile;\n  };\n}\n\nfunction getTraceId(event: Event): string {\n  const traceId: unknown = event.contexts?.trace?.trace_id;\n  // Log a warning if the profile has an invalid traceId (should be uuidv4).\n  // All profiles and transactions are rejected if this is the case and we want to\n  // warn users that this is happening if they enable debug flag\n  if (typeof traceId === 'string' && traceId.length !== 32) {\n    if (DEBUG_BUILD) {\n      debug.log(`[Profiling] Invalid traceId: ${traceId} on profiled event`);\n    }\n  }\n  if (typeof traceId !== 'string') {\n    return '';\n  }\n\n  return traceId;\n}\n/**\n * Creates a profiling event envelope from a Sentry event. If profile does not pass\n * validation, returns null.\n * @param event\n * @param dsn\n * @param metadata\n * @param tunnel\n * @returns {EventEnvelope | null}\n */\n\n/**\n * Creates a profiling event envelope from a Sentry event.\n */\nexport function createProfilePayload(\n  profile_id: string,\n  start_timestamp: number | undefined,\n  processed_profile: JSSelfProfile,\n  event: ProfiledEvent,\n): Profile {\n  if (event.type !== 'transaction') {\n    // createProfilingEventEnvelope should only be called for transactions,\n    // we type guard this behavior with isProfiledTransactionEvent.\n    throw new TypeError('Profiling events may only be attached to transactions, this should never occur.');\n  }\n\n  if (processed_profile === undefined || processed_profile === null) {\n    throw new TypeError(\n      `Cannot construct profiling event envelope without a valid profile. Got ${processed_profile} instead.`,\n    );\n  }\n\n  const traceId = getTraceId(event);\n  const enrichedThreadProfile = enrichWithThreadInformation(processed_profile);\n  const transactionStartMs = start_timestamp\n    ? start_timestamp\n    : typeof event.start_timestamp === 'number'\n      ? event.start_timestamp * 1000\n      : timestampInSeconds() * 1000;\n  const transactionEndMs = typeof event.timestamp === 'number' ? event.timestamp * 1000 : timestampInSeconds() * 1000;\n\n  const profile: Profile = {\n    event_id: profile_id,\n    timestamp: new Date(transactionStartMs).toISOString(),\n    platform: 'javascript',\n    version: '1',\n    release: event.release || '',\n    environment: event.environment || DEFAULT_ENVIRONMENT,\n    runtime: {\n      name: 'javascript',\n      version: WINDOW.navigator.userAgent,\n    },\n    os: {\n      name: OS_PLATFORM,\n      version: OS_PLATFORM_VERSION,\n      build_number: OS_BROWSER,\n    },\n    device: {\n      locale: OS_LOCALE,\n      model: OS_MODEL,\n      manufacturer: OS_BROWSER,\n      architecture: OS_ARCH,\n      is_emulator: false,\n    },\n    debug_meta: {\n      images: applyDebugMetadata(processed_profile.resources),\n    },\n    profile: enrichedThreadProfile,\n    transactions: [\n      {\n        name: event.transaction || '',\n        id: event.event_id || uuid4(),\n        trace_id: traceId,\n        active_thread_id: PROFILER_THREAD_ID_STRING,\n        relative_start_ns: '0',\n        relative_end_ns: ((transactionEndMs - transactionStartMs) * 1e6).toFixed(0),\n      },\n    ],\n  };\n\n  return profile;\n}\n\n/**\n * Create a profile chunk envelope item\n */\nexport function createProfileChunkPayload(\n  jsSelfProfile: JSSelfProfile,\n  client: Client,\n  profilerId?: string,\n): ProfileChunk {\n  // only == to catch null and undefined\n  if (jsSelfProfile == null) {\n    throw new TypeError(\n      `Cannot construct profiling event envelope without a valid profile. Got ${jsSelfProfile} instead.`,\n    );\n  }\n\n  const continuousProfile = convertToContinuousProfile(jsSelfProfile);\n\n  const options = client.getOptions();\n  const sdk = client.getSdkMetadata?.()?.sdk;\n\n  return {\n    chunk_id: uuid4(),\n    client_sdk: {\n      name: sdk?.name ?? 'sentry.javascript.browser',\n      version: sdk?.version ?? '0.0.0',\n    },\n    profiler_id: profilerId || uuid4(),\n    platform: 'javascript',\n    version: '2',\n    release: options.release ?? '',\n    environment: options.environment ?? 'production',\n    debug_meta: {\n      // function name obfuscation\n      images: applyDebugMetadata(jsSelfProfile.resources),\n    },\n    profile: continuousProfile,\n  };\n}\n\n/**\n * Validate a profile chunk against the Sample Format V2 requirements.\n * https://develop.sentry.dev/sdk/telemetry/profiles/sample-format-v2/\n * - Presence of samples, stacks, frames\n * - Required metadata fields\n */\nexport function validateProfileChunk(chunk: ProfileChunk): { valid: true } | { reason: string } {\n  try {\n    // Required metadata\n    if (!chunk || typeof chunk !== 'object') {\n      return { reason: 'chunk is not an object' };\n    }\n\n    // profiler_id and chunk_id must be 32 lowercase hex chars\n    const isHex32 = (val: unknown): boolean => typeof val === 'string' && /^[a-f0-9]{32}$/.test(val);\n    if (!isHex32(chunk.profiler_id)) {\n      return { reason: 'missing or invalid profiler_id' };\n    }\n    if (!isHex32(chunk.chunk_id)) {\n      return { reason: 'missing or invalid chunk_id' };\n    }\n\n    if (!chunk.client_sdk) {\n      return { reason: 'missing client_sdk metadata' };\n    }\n\n    // Profile data must have frames, stacks, samples\n    const profile = chunk.profile as { frames?: unknown[]; stacks?: unknown[]; samples?: unknown[] } | undefined;\n    if (!profile) {\n      return { reason: 'missing profile data' };\n    }\n\n    if (!Array.isArray(profile.frames) || !profile.frames.length) {\n      return { reason: 'profile has no frames' };\n    }\n    if (!Array.isArray(profile.stacks) || !profile.stacks.length) {\n      return { reason: 'profile has no stacks' };\n    }\n    if (!Array.isArray(profile.samples) || !profile.samples.length) {\n      return { reason: 'profile has no samples' };\n    }\n\n    return { valid: true };\n  } catch (e) {\n    return { reason: `unknown validation error: ${e}` };\n  }\n}\n\n/**\n * Convert from JSSelfProfile format to ContinuousThreadCpuProfile format.\n */\nfunction convertToContinuousProfile(input: {\n  frames: { name: string; resourceId?: number; line?: number; column?: number }[];\n  stacks: { frameId: number; parentId?: number }[];\n  samples: { timestamp: number; stackId?: number }[];\n  resources: string[];\n}): ContinuousThreadCpuProfile {\n  // Frames map 1:1 by index; fill only when present to avoid sparse writes\n  const frames: ContinuousThreadCpuProfile['frames'] = [];\n  for (let i = 0; i < input.frames.length; i++) {\n    const frame = input.frames[i];\n    if (!frame) {\n      continue;\n    }\n    frames[i] = {\n      function: frame.name,\n      abs_path: typeof frame.resourceId === 'number' ? input.resources[frame.resourceId] : undefined,\n      lineno: frame.line,\n      colno: frame.column,\n    };\n  }\n\n  // Build stacks by following parent links, top->down order (root last)\n  const stacks: ContinuousThreadCpuProfile['stacks'] = [];\n  for (let i = 0; i < input.stacks.length; i++) {\n    const stackHead = input.stacks[i];\n    if (!stackHead) {\n      continue;\n    }\n    const list: number[] = [];\n    let current: { frameId: number; parentId?: number } | undefined = stackHead;\n    while (current) {\n      list.push(current.frameId);\n      current = current.parentId === undefined ? undefined : input.stacks[current.parentId];\n    }\n    stacks[i] = list;\n  }\n\n  // Align timestamps to SDK time origin to match span/event timelines\n  const perfOrigin = browserPerformanceTimeOrigin();\n  const origin = typeof performance.timeOrigin === 'number' ? performance.timeOrigin : perfOrigin || 0;\n  const adjustForOriginChange = origin - (perfOrigin || origin);\n\n  const samples: ContinuousThreadCpuProfile['samples'] = [];\n  for (let i = 0; i < input.samples.length; i++) {\n    const sample = input.samples[i];\n    if (!sample) {\n      continue;\n    }\n    // Convert ms to seconds epoch-based timestamp\n    const timestampSeconds = (origin + (sample.timestamp - adjustForOriginChange)) / 1000;\n    samples[i] = {\n      stack_id: sample.stackId ?? 0,\n      thread_id: PROFILER_THREAD_ID_STRING,\n      timestamp: timestampSeconds,\n    };\n  }\n\n  return {\n    frames,\n    stacks,\n    samples,\n    thread_metadata: { [PROFILER_THREAD_ID_STRING]: { name: PROFILER_THREAD_NAME } },\n  };\n}\n\n/**\n *\n */\nexport function isProfiledTransactionEvent(event: Event): event is ProfiledEvent {\n  return !!event.sdkProcessingMetadata?.profile;\n}\n\n/*\n  See packages/browser-utils/src/browser/router.ts\n*/\n/**\n *\n */\nexport function isAutomatedPageLoadSpan(span: Span): boolean {\n  return spanToJSON(span).op === 'pageload';\n}\n\n/**\n * Converts a JSSelfProfile to a our sampled format.\n * Does not currently perform stack indexing.\n */\nexport function convertJSSelfProfileToSampledFormat(input: JSSelfProfile): Profile['profile'] {\n  let EMPTY_STACK_ID: undefined | number = undefined;\n  let STACK_ID = 0;\n\n  // Initialize the profile that we will fill with data\n  const profile: Profile['profile'] = {\n    samples: [],\n    stacks: [],\n    frames: [],\n    thread_metadata: {\n      [PROFILER_THREAD_ID_STRING]: { name: PROFILER_THREAD_NAME },\n    },\n  };\n\n  const firstSample = input.samples[0];\n  if (!firstSample) {\n    return profile;\n  }\n\n  // We assert samples.length > 0 above and timestamp should always be present\n  const start = firstSample.timestamp;\n  // The JS SDK might change it's time origin based on some heuristic (see See packages/utils/src/time.ts)\n  // when that happens, we need to ensure we are correcting the profile timings so the two timelines stay in sync.\n  // Since JS self profiling time origin is always initialized to performance.timeOrigin, we need to adjust for\n  // the drift between the SDK selected value and our profile time origin.\n  const perfOrigin = browserPerformanceTimeOrigin();\n  const origin = typeof performance.timeOrigin === 'number' ? performance.timeOrigin : perfOrigin || 0;\n  const adjustForOriginChange = origin - (perfOrigin || origin);\n\n  input.samples.forEach((jsSample, i) => {\n    // If sample has no stack, add an empty sample\n    if (jsSample.stackId === undefined) {\n      if (EMPTY_STACK_ID === undefined) {\n        EMPTY_STACK_ID = STACK_ID;\n        profile.stacks[EMPTY_STACK_ID] = [];\n        STACK_ID++;\n      }\n\n      profile['samples'][i] = {\n        // convert ms timestamp to ns\n        elapsed_since_start_ns: ((jsSample.timestamp + adjustForOriginChange - start) * MS_TO_NS).toFixed(0),\n        stack_id: EMPTY_STACK_ID,\n        thread_id: PROFILER_THREAD_ID_STRING,\n      };\n      return;\n    }\n\n    let stackTop: JSSelfProfileStack | undefined = input.stacks[jsSample.stackId];\n\n    // Functions in top->down order (root is last)\n    // We follow the stackTop.parentId trail and collect each visited frameId\n    const stack: number[] = [];\n\n    while (stackTop) {\n      stack.push(stackTop.frameId);\n\n      const frame = input.frames[stackTop.frameId];\n\n      // If our frame has not been indexed yet, index it\n      if (frame && profile.frames[stackTop.frameId] === undefined) {\n        profile.frames[stackTop.frameId] = {\n          function: frame.name,\n          abs_path: typeof frame.resourceId === 'number' ? input.resources[frame.resourceId] : undefined,\n          lineno: frame.line,\n          colno: frame.column,\n        };\n      }\n\n      stackTop = stackTop.parentId === undefined ? undefined : input.stacks[stackTop.parentId];\n    }\n\n    const sample: Profile['profile']['samples'][0] = {\n      // convert ms timestamp to ns\n      elapsed_since_start_ns: ((jsSample.timestamp + adjustForOriginChange - start) * MS_TO_NS).toFixed(0),\n      stack_id: STACK_ID,\n      thread_id: PROFILER_THREAD_ID_STRING,\n    };\n\n    profile['stacks'][STACK_ID] = stack;\n    profile['samples'][i] = sample;\n    STACK_ID++;\n  });\n\n  return profile;\n}\n\n/**\n * Adds items to envelope if they are not already present - mutates the envelope.\n * @param envelope\n */\nexport function addProfilesToEnvelope(envelope: EventEnvelope, profiles: Profile[]): Envelope {\n  if (!profiles.length) {\n    return envelope;\n  }\n\n  for (const profile of profiles) {\n    envelope[1].push([{ type: 'profile' }, profile]);\n  }\n  return envelope;\n}\n\n/**\n * Finds transactions with profile_id context in the envelope\n * @param envelope\n * @returns\n */\nexport function findProfiledTransactionsFromEnvelope(envelope: Envelope): Event[] {\n  const events: Event[] = [];\n\n  forEachEnvelopeItem(envelope, (item, type) => {\n    if (type !== 'transaction') {\n      return;\n    }\n\n    for (let j = 1; j < item.length; j++) {\n      const event = item[j] as Event;\n\n      if (event?.contexts?.profile?.profile_id) {\n        events.push(item[j] as Event);\n      }\n    }\n  });\n\n  return events;\n}\n\n/**\n * Applies debug meta data to an event from a list of paths to resources (sourcemaps)\n */\nexport function applyDebugMetadata(resource_paths: ReadonlyArray<string>): DebugImage[] {\n  const client = getClient();\n  const options = client?.getOptions();\n  const stackParser = options?.stackParser;\n\n  if (!stackParser) {\n    return [];\n  }\n\n  return getDebugImagesForResources(stackParser, resource_paths);\n}\n\n/**\n * Checks the given sample rate to make sure it is valid type and value (a boolean, or a number between 0 and 1).\n */\nexport function isValidSampleRate(rate: unknown): boolean {\n  // we need to check NaN explicitly because it's of type 'number' and therefore wouldn't get caught by this typecheck\n  if ((typeof rate !== 'number' && typeof rate !== 'boolean') || (typeof rate === 'number' && isNaN(rate))) {\n    DEBUG_BUILD &&\n      debug.warn(\n        `[Profiling] Invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(\n          rate,\n        )} of type ${JSON.stringify(typeof rate)}.`,\n      );\n    return false;\n  }\n\n  // Boolean sample rates are always valid\n  if (rate === true || rate === false) {\n    return true;\n  }\n\n  // in case sampleRate is a boolean, it will get automatically cast to 1 if it's true and 0 if it's false\n  if (rate < 0 || rate > 1) {\n    DEBUG_BUILD && debug.warn(`[Profiling] Invalid sample rate. Sample rate must be between 0 and 1. Got ${rate}.`);\n    return false;\n  }\n  return true;\n}\n\nfunction isValidProfile(profile: JSSelfProfile): profile is JSSelfProfile & { profile_id: string } {\n  if (profile.samples.length < 2) {\n    if (DEBUG_BUILD) {\n      // Log a warning if the profile has less than 2 samples so users can know why\n      // they are not seeing any profiling data and we cant avoid the back and forth\n      // of asking them to provide us with a dump of the profile data.\n      debug.log('[Profiling] Discarding profile because it contains less than 2 samples');\n    }\n    return false;\n  }\n\n  if (!profile.frames.length) {\n    if (DEBUG_BUILD) {\n      debug.log('[Profiling] Discarding profile because it contains no frames');\n    }\n    return false;\n  }\n\n  return true;\n}\n\n// Keep a flag value to avoid re-initializing the profiler constructor. If it fails\n// once, it will always fail and this allows us to early return.\nlet PROFILING_CONSTRUCTOR_FAILED: boolean = false;\nexport const MAX_PROFILE_DURATION_MS = 30_000;\n\n/**\n * Check if profiler constructor is available.\n * @param maybeProfiler\n */\nfunction isJSProfilerSupported(maybeProfiler: unknown): maybeProfiler is typeof JSSelfProfilerConstructor {\n  return typeof maybeProfiler === 'function';\n}\n\n/**\n * Starts the profiler and returns the profiler instance.\n */\nexport function startJSSelfProfile(): JSSelfProfiler | undefined {\n  // Feature support check first\n  const JSProfilerConstructor = WINDOW.Profiler;\n\n  if (!isJSProfilerSupported(JSProfilerConstructor)) {\n    if (DEBUG_BUILD) {\n      debug.log('[Profiling] Profiling is not supported by this browser, Profiler interface missing on window object.');\n    }\n    return;\n  }\n\n  // From initial testing, it seems that the minimum value for sampleInterval is 10ms.\n  const samplingIntervalMS = 10;\n  // Start the profiler\n  const maxSamples = Math.floor(MAX_PROFILE_DURATION_MS / samplingIntervalMS);\n\n  // Attempt to initialize the profiler constructor, if it fails, we disable profiling for the current user session.\n  // This is likely due to a missing 'Document-Policy': 'js-profiling' header. We do not want to throw an error if this happens\n  // as we risk breaking the user's application, so just disable profiling and log an error.\n  try {\n    return new JSProfilerConstructor({ sampleInterval: samplingIntervalMS, maxBufferSize: maxSamples });\n  } catch (_e) {\n    if (DEBUG_BUILD) {\n      debug.log(\n        \"[Profiling] Failed to initialize the Profiling constructor, this is likely due to a missing 'Document-Policy': 'js-profiling' header.\",\n      );\n      debug.log('[Profiling] Disabling profiling for current user session.');\n    }\n    PROFILING_CONSTRUCTOR_FAILED = true;\n  }\n\n  return;\n}\n\n/**\n * Determine if a profile should be profiled.\n */\nexport function shouldProfileSpanLegacy(span: Span): boolean {\n  // If constructor failed once, it will always fail, so we can early return.\n  if (PROFILING_CONSTRUCTOR_FAILED) {\n    if (DEBUG_BUILD) {\n      debug.log('[Profiling] Profiling has been disabled for the duration of the current user session.');\n    }\n    return false;\n  }\n\n  if (!span.isRecording()) {\n    DEBUG_BUILD && debug.log('[Profiling] Discarding profile because root span was not sampled.');\n    return false;\n  }\n\n  const client = getClient();\n  const options = client?.getOptions();\n  if (!options) {\n    DEBUG_BUILD && debug.log('[Profiling] Profiling disabled, no options found.');\n    return false;\n  }\n\n  // eslint-disable-next-line typescript/no-deprecated\n  const profilesSampleRate = (options as BrowserOptions).profilesSampleRate as\n    | BrowserOptions['profilesSampleRate']\n    | boolean;\n\n  // Since this is coming from the user (or from a function provided by the user), who knows what we might get. (The\n  // only valid values are booleans or numbers between 0 and 1.)\n  if (!isValidSampleRate(profilesSampleRate)) {\n    DEBUG_BUILD && debug.warn('[Profiling] Discarding profile because of invalid sample rate.');\n    return false;\n  }\n\n  // if the function returned 0 (or false), or if `profileSampleRate` is 0, it's a sign the profile should be dropped\n  if (!profilesSampleRate) {\n    DEBUG_BUILD &&\n      debug.log(\n        '[Profiling] Discarding profile because a negative sampling decision was inherited or profileSampleRate is set to 0',\n      );\n    return false;\n  }\n\n  // Now we roll the dice. Math.random is inclusive of 0, but not of 1, so strict < is safe here. In case sampleRate is\n  // a boolean, the < comparison will cause it to be automatically cast to 1 if it's true and 0 if it's false.\n  const sampled = profilesSampleRate === true ? true : Math.random() < profilesSampleRate;\n  // Check if we should sample this profile\n  if (!sampled) {\n    DEBUG_BUILD &&\n      debug.log(\n        `[Profiling] Discarding profile because it's not included in the random sample (sampling rate = ${Number(\n          profilesSampleRate,\n        )})`,\n      );\n    return false;\n  }\n\n  return true;\n}\n\n/**\n * Determine if a profile should be created for the current session.\n */\nexport function shouldProfileSession(options: BrowserOptions): boolean {\n  // If constructor failed once, it will always fail, so we can early return.\n  if (PROFILING_CONSTRUCTOR_FAILED) {\n    if (DEBUG_BUILD) {\n      debug.log(\n        '[Profiling] Profiling has been disabled for the duration of the current user session as the JS Profiler could not be started.',\n      );\n    }\n    return false;\n  }\n\n  if (options.profileLifecycle !== 'trace' && options.profileLifecycle !== 'manual') {\n    DEBUG_BUILD && debug.warn('[Profiling] Session not sampled. Invalid `profileLifecycle` option.');\n    return false;\n  }\n\n  //  Session sampling: profileSessionSampleRate gates whether profiling is enabled for this session\n  const profileSessionSampleRate = options.profileSessionSampleRate;\n\n  if (!isValidSampleRate(profileSessionSampleRate)) {\n    DEBUG_BUILD && debug.warn('[Profiling] Discarding profile because of invalid profileSessionSampleRate.');\n    return false;\n  }\n\n  if (!profileSessionSampleRate) {\n    DEBUG_BUILD &&\n      debug.log('[Profiling] Discarding profile because profileSessionSampleRate is not defined or set to 0');\n    return false;\n  }\n\n  return Math.random() <= profileSessionSampleRate;\n}\n\n/**\n * Checks if legacy profiling is configured.\n */\nexport function hasLegacyProfiling(options: BrowserOptions): boolean {\n  // eslint-disable-next-line typescript/no-deprecated\n  return typeof options.profilesSampleRate !== 'undefined';\n}\n\n/**\n * Creates a profiling envelope item, if the profile does not pass validation, returns null.\n * @param event\n * @returns {Profile | null}\n */\nexport function createProfilingEvent(\n  profile_id: string,\n  start_timestamp: number | undefined,\n  profile: JSSelfProfile,\n  event: ProfiledEvent,\n): Profile | null {\n  if (!isValidProfile(profile)) {\n    return null;\n  }\n\n  return createProfilePayload(profile_id, start_timestamp, profile, event);\n}\n\n// TODO (v8): We need to obtain profile ids in @sentry-internal/tracing,\n// but we don't have access to this map because importing this map would\n// cause a circular dependency. We need to resolve this in v8.\nconst PROFILE_MAP: Map<string, JSSelfProfile> = new Map();\n/**\n *\n */\nexport function getActiveProfilesCount(): number {\n  return PROFILE_MAP.size;\n}\n\n/**\n * Retrieves profile from global cache and removes it.\n */\nexport function takeProfileFromGlobalCache(profile_id: string): JSSelfProfile | undefined {\n  const profile = PROFILE_MAP.get(profile_id);\n  if (profile) {\n    PROFILE_MAP.delete(profile_id);\n  }\n  return profile;\n}\n/**\n * Adds profile to global cache and evicts the oldest profile if the cache is full.\n */\nexport function addProfileToGlobalCache(profile_id: string, profile: JSSelfProfile): void {\n  PROFILE_MAP.set(profile_id, profile);\n\n  if (PROFILE_MAP.size > 30) {\n    const last = PROFILE_MAP.keys().next().value;\n    if (last !== undefined) {\n      PROFILE_MAP.delete(last);\n    }\n  }\n}\n\nexport const PROFILED_ROOT_SPANS = new WeakSet<Span>();\n\nexport function setThreadAttributes(span: Span): void {\n  span.setAttribute('thread.id', PROFILER_THREAD_ID_STRING);\n  span.setAttribute('thread.name', PROFILER_THREAD_NAME);\n}\n", "import type { Span } from '@sentry/core/browser';\nimport { debug, getCurrentScope, spanToJSON, timestampInSeconds, uuid4 } from '@sentry/core/browser';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { WINDOW } from '../helpers';\nimport type { JSSelfProfile } from './jsSelfProfiling';\nimport {\n  addProfileToGlobalCache,\n  isAutomatedPageLoadSpan,\n  MAX_PROFILE_DURATION_MS,\n  PROFILED_ROOT_SPANS,\n  setThreadAttributes,\n  startJSSelfProfile,\n} from './utils';\n\n/**\n * Wraps startTransaction and stopTransaction with profiling related logic.\n * startProfileForTransaction is called after the call to startTransaction in order to avoid our own code from\n * being profiled. Because of that same reason, stopProfiling is called before the call to stopTransaction.\n */\nexport function startProfileForSpan(span: Span): void {\n  // Start the profiler and get the profiler instance.\n  let startTimestamp: number | undefined;\n  if (isAutomatedPageLoadSpan(span)) {\n    startTimestamp = timestampInSeconds() * 1000;\n  }\n\n  const profiler = startJSSelfProfile();\n\n  // We failed to construct the profiler, so we skip.\n  // No need to log anything as this has already been logged in startProfile.\n  if (!profiler) {\n    return;\n  }\n\n  if (DEBUG_BUILD) {\n    debug.log(`[Profiling] started profiling span: ${spanToJSON(span).description}`);\n  }\n\n  // We create \"unique\" span names to avoid concurrent spans with same names\n  // from being ignored by the profiler. From here on, only this span name should be used when\n  // calling the profiler methods. Note: we log the original name to the user to avoid confusion.\n  const profileId = uuid4();\n\n  // A couple of important things to note here:\n  // `CpuProfilerBindings.stopProfiling` will be scheduled to run in 30seconds in order to exceed max profile duration.\n  // Whichever of the two (span.finish/timeout) is first to run, the profiling will be stopped and the gathered profile\n  // will be processed when the original span is finished. Since onProfileHandler can be invoked multiple times in the\n  // event of an error or user mistake (calling span.finish multiple times), it is important that the behavior of onProfileHandler\n  // is idempotent as we do not want any timings or profiles to be overridden by the last call to onProfileHandler.\n  // After the original finish method is called, the event will be reported through the integration and delegated to transport.\n  let processedProfile: JSSelfProfile | null = null;\n\n  getCurrentScope().setContext('profile', {\n    profile_id: profileId,\n    start_timestamp: startTimestamp,\n  });\n\n  PROFILED_ROOT_SPANS.add(span);\n  setThreadAttributes(span);\n\n  /**\n   * Idempotent handler for profile stop\n   */\n  async function onProfileHandler(): Promise<void> {\n    // Check if the profile exists and return it the behavior has to be idempotent as users may call span.finish multiple times.\n    if (!span) {\n      return;\n    }\n    // Satisfy the type checker, but profiler will always be defined here.\n    if (!profiler) {\n      return;\n    }\n    if (processedProfile) {\n      if (DEBUG_BUILD) {\n        debug.log('[Profiling] profile for:', spanToJSON(span).description, 'already exists, returning early');\n      }\n      return;\n    }\n\n    return profiler\n      .stop()\n      .then((profile: JSSelfProfile): void => {\n        if (maxDurationTimeoutID) {\n          WINDOW.clearTimeout(maxDurationTimeoutID);\n          maxDurationTimeoutID = undefined;\n        }\n\n        if (DEBUG_BUILD) {\n          debug.log(`[Profiling] stopped profiling of span: ${spanToJSON(span).description}`);\n        }\n\n        // In case of an overlapping span, stopProfiling may return null and silently ignore the overlapping profile.\n        if (!profile) {\n          if (DEBUG_BUILD) {\n            debug.log(\n              `[Profiling] profiler returned null profile for: ${spanToJSON(span).description}`,\n              'this may indicate an overlapping span or a call to stopProfiling with a profile title that was never started',\n            );\n          }\n          return;\n        }\n\n        processedProfile = profile;\n        addProfileToGlobalCache(profileId, profile);\n      })\n      .catch(error => {\n        if (DEBUG_BUILD) {\n          debug.log('[Profiling] error while stopping profiler:', error);\n        }\n      });\n  }\n\n  // Enqueue a timeout to prevent profiles from running over max duration.\n  let maxDurationTimeoutID: number | undefined = WINDOW.setTimeout(() => {\n    if (DEBUG_BUILD) {\n      debug.log('[Profiling] max profile duration elapsed, stopping profiling for:', spanToJSON(span).description);\n    }\n    // If the timeout exceeds, we want to stop profiling, but not finish the span\n    // eslint-disable-next-line @typescript-eslint/no-floating-promises\n    onProfileHandler();\n  }, MAX_PROFILE_DURATION_MS);\n\n  // We need to reference the original end call to avoid creating an infinite loop\n  const originalEnd = span.end.bind(span);\n\n  /**\n   * Wraps span `end()` with profiling related logic.\n   * startProfiling is called after the call to spanStart in order to avoid our own code from\n   * being profiled. Because of that same reason, stopProfiling is called before the call to spanEnd.\n   */\n  function profilingWrappedSpanEnd(): Span {\n    if (!span) {\n      return originalEnd();\n    }\n    // onProfileHandler should always return the same profile even if this is called multiple times.\n    // Always call onProfileHandler to ensure stopProfiling is called and the timeout is cleared.\n    void onProfileHandler().then(\n      () => {\n        originalEnd();\n      },\n      () => {\n        // If onProfileHandler fails, we still want to call the original finish method.\n        originalEnd();\n      },\n    );\n\n    return span;\n  }\n\n  span.end = profilingWrappedSpanEnd;\n}\n", "import type { Client, ContinuousProfiler, ProfileChunk, ProfileChunkEnvelope, Span } from '@sentry/core/browser';\nimport {\n  createEnvelope,\n  debug,\n  dsnToString,\n  getGlobalScope,\n  getRootSpan,\n  getSdkMetadataForEnvelopeHeader,\n  uuid4,\n} from '@sentry/core/browser';\nimport type { BrowserOptions } from '../client';\nimport { DEBUG_BUILD } from './../debug-build';\nimport type { JSSelfProfiler } from './jsSelfProfiling';\nimport {\n  createProfileChunkPayload,\n  setThreadAttributes,\n  shouldProfileSession,\n  startJSSelfProfile,\n  validateProfileChunk,\n} from './utils';\n\nconst CHUNK_INTERVAL_MS = 60_000; // 1 minute\n// Maximum length for trace lifecycle profiling per root span (e.g. if spanEnd never fires)\nconst MAX_ROOT_SPAN_PROFILE_MS = 300_000; // 5 minutes max per root span in trace mode\n\n/**\n * UIProfiler (Profiling V2):\n * Supports two lifecycle modes:\n *  - 'manual': controlled explicitly via start()/stop()\n *  - 'trace': automatically runs while there are active sampled root spans\n *\n * Profiles are emitted as standalone `profile_chunk` envelopes either when:\n * - there are no more sampled root spans, or\n * - the 60s chunk timer elapses while profiling is running.\n */\nexport class UIProfiler implements ContinuousProfiler<Client> {\n  private _client: Client | undefined;\n  private _profiler: JSSelfProfiler | undefined;\n  private _chunkTimer: ReturnType<typeof setTimeout> | undefined;\n\n  // Manual + Trace\n  private _profilerId: string | undefined; // one per Profiler session\n  private _isRunning: boolean; // current profiler instance active flag\n  private _sessionSampled: boolean; // sampling decision for entire session\n  private _lifecycleMode: 'manual' | 'trace' | undefined;\n\n  // Trace-only\n  private _activeRootSpanIds: Set<string>;\n  private _rootSpanTimeouts: Map<string, ReturnType<typeof setTimeout>>;\n\n  public constructor() {\n    this._client = undefined;\n    this._profiler = undefined;\n    this._chunkTimer = undefined;\n\n    this._profilerId = undefined;\n    this._isRunning = false;\n    this._sessionSampled = false;\n    this._lifecycleMode = undefined;\n\n    this._activeRootSpanIds = new Set();\n    this._rootSpanTimeouts = new Map();\n  }\n\n  /**\n   * Initialize the profiler with client, session sampling and lifecycle mode.\n   */\n  public initialize(client: Client): void {\n    const lifecycleMode = (client.getOptions() as BrowserOptions).profileLifecycle;\n    const sessionSampled = shouldProfileSession(client.getOptions());\n\n    DEBUG_BUILD && debug.log(`[Profiling] Initializing profiler (lifecycle='${lifecycleMode}').`);\n\n    if (!sessionSampled) {\n      DEBUG_BUILD && debug.log('[Profiling] Session not sampled. Skipping lifecycle profiler initialization.');\n    }\n\n    // One Profiler ID per profiling session (user session)\n    this._profilerId = uuid4();\n    this._client = client;\n    this._sessionSampled = sessionSampled;\n    this._lifecycleMode = lifecycleMode;\n\n    if (lifecycleMode === 'trace') {\n      this._setupTraceLifecycleListeners(client);\n    }\n\n    client.on('spanStart', span => {\n      if (this._isRunning) {\n        setThreadAttributes(span);\n      }\n    });\n  }\n\n  /** Starts UI profiling (only effective in 'manual' mode and when sampled). */\n  public start(): void {\n    if (this._lifecycleMode === 'trace') {\n      DEBUG_BUILD &&\n        debug.warn(\n          '[Profiling] `profileLifecycle` is set to \"trace\". Calls to `uiProfiler.start()` are ignored in trace mode.',\n        );\n      return;\n    }\n\n    if (this._isRunning) {\n      DEBUG_BUILD && debug.warn('[Profiling] Profile session is already running, `uiProfiler.start()` is a no-op.');\n      return;\n    }\n\n    if (!this._sessionSampled) {\n      DEBUG_BUILD && debug.warn('[Profiling] Session is not sampled, `uiProfiler.start()` is a no-op.');\n      return;\n    }\n\n    this._beginProfiling();\n  }\n\n  /** Stops UI profiling (only effective in 'manual' mode). */\n  public stop(): void {\n    if (this._lifecycleMode === 'trace') {\n      DEBUG_BUILD &&\n        debug.warn(\n          '[Profiling] `profileLifecycle` is set to \"trace\". Calls to `uiProfiler.stop()` are ignored in trace mode.',\n        );\n      return;\n    }\n\n    if (!this._isRunning) {\n      DEBUG_BUILD && debug.warn('[Profiling] Profiler is not running, `uiProfiler.stop()` is a no-op.');\n      return;\n    }\n\n    this._endProfiling();\n  }\n\n  /** Handle an already-active root span at integration setup time (used only in trace mode). */\n  public notifyRootSpanActive(rootSpan: Span): void {\n    if (this._lifecycleMode !== 'trace' || !this._sessionSampled) {\n      return;\n    }\n\n    const spanId = rootSpan.spanContext().spanId;\n    if (!spanId || this._activeRootSpanIds.has(spanId)) {\n      return;\n    }\n\n    this._registerTraceRootSpan(spanId);\n\n    const rootSpanCount = this._activeRootSpanIds.size;\n\n    if (rootSpanCount === 1) {\n      DEBUG_BUILD &&\n        debug.log('[Profiling] Detected already active root span during setup. Active root spans now:', rootSpanCount);\n\n      this._beginProfiling();\n    }\n\n    if (this._isRunning) {\n      setThreadAttributes(rootSpan);\n    }\n  }\n\n  /**\n   * Begin profiling if not already running.\n   */\n  private _beginProfiling(): void {\n    if (this._isRunning) {\n      return;\n    }\n    this._isRunning = true;\n\n    DEBUG_BUILD && debug.log('[Profiling] Started profiling with profiler ID:', this._profilerId);\n\n    // Expose profiler_id to match root spans with profiles\n    getGlobalScope().setContext('profile', { profiler_id: this._profilerId });\n\n    this._startProfilerInstance();\n\n    if (!this._profiler) {\n      DEBUG_BUILD && debug.log('[Profiling] Failed to start JS Profiler; stopping.');\n      this._resetProfilerInfo();\n      return;\n    }\n\n    this._startPeriodicChunking();\n  }\n\n  /** End profiling session; final chunk will be collected and sent. */\n  private _endProfiling(): void {\n    if (!this._isRunning) {\n      return;\n    }\n    this._isRunning = false;\n\n    if (this._chunkTimer) {\n      clearTimeout(this._chunkTimer);\n      this._chunkTimer = undefined;\n    }\n\n    this._clearAllRootSpanTimeouts();\n\n    // Collect whatever was currently recording\n    this._collectCurrentChunk().catch(e => {\n      DEBUG_BUILD && debug.error('[Profiling] Failed to collect current profile chunk on `stop()`:', e);\n    });\n\n    // Manual: Clear profiling context so spans outside start()/stop() aren't marked as profiled\n    // Trace: Profile context is kept for the whole session duration\n    if (this._lifecycleMode === 'manual') {\n      getGlobalScope().setContext('profile', {});\n    }\n  }\n\n  /** Trace-mode: attach spanStart/spanEnd listeners. */\n  private _setupTraceLifecycleListeners(client: Client): void {\n    client.on('spanStart', span => {\n      if (!this._sessionSampled) {\n        DEBUG_BUILD &&\n          debug.log('[Profiling] Span not profiled because of negative sampling decision for user session.');\n        return;\n      }\n      if (span !== getRootSpan(span)) {\n        return; // only care about root spans\n      }\n      // Only count sampled root spans\n      if (!span.isRecording()) {\n        DEBUG_BUILD && debug.log('[Profiling] Discarding profile because root span was not sampled.');\n        return;\n      }\n\n      const spanId = span.spanContext().spanId;\n      if (!spanId || this._activeRootSpanIds.has(spanId)) {\n        return;\n      }\n\n      this._registerTraceRootSpan(spanId);\n\n      const rootSpanCount = this._activeRootSpanIds.size;\n      if (rootSpanCount === 1) {\n        DEBUG_BUILD &&\n          debug.log(\n            `[Profiling] Root span ${spanId} started. Profiling active while there are active root spans (count=${rootSpanCount}).`,\n          );\n        this._beginProfiling();\n      }\n    });\n\n    client.on('spanEnd', span => {\n      if (!this._sessionSampled) {\n        return;\n      }\n      const spanId = span.spanContext().spanId;\n      if (!spanId || !this._activeRootSpanIds.has(spanId)) {\n        return;\n      }\n      this._activeRootSpanIds.delete(spanId);\n      const rootSpanCount = this._activeRootSpanIds.size;\n\n      DEBUG_BUILD &&\n        debug.log(\n          `[Profiling] Root span with ID ${spanId} ended. Will continue profiling for as long as there are active root spans (currently: ${rootSpanCount}).`,\n        );\n      if (rootSpanCount === 0) {\n        this._collectCurrentChunk().catch(e => {\n          DEBUG_BUILD && debug.error('[Profiling] Failed to collect current profile chunk on last `spanEnd`:', e);\n        });\n        this._endProfiling();\n      }\n    });\n  }\n\n  /**\n   * Resets profiling information from scope and resets running state (used on failure)\n   */\n  private _resetProfilerInfo(): void {\n    this._isRunning = false;\n    getGlobalScope().setContext('profile', {});\n  }\n\n  /**\n   * Clear and reset all per-root-span timeouts.\n   */\n  private _clearAllRootSpanTimeouts(): void {\n    this._rootSpanTimeouts.forEach(timeout => clearTimeout(timeout));\n    this._rootSpanTimeouts.clear();\n  }\n\n  /** Keep track of root spans and schedule safeguard timeout (trace mode). */\n  private _registerTraceRootSpan(spanId: string): void {\n    this._activeRootSpanIds.add(spanId);\n    const timeout = setTimeout(() => this._onRootSpanTimeout(spanId), MAX_ROOT_SPAN_PROFILE_MS);\n    this._rootSpanTimeouts.set(spanId, timeout);\n  }\n\n  /**\n   * Start a profiler instance if needed.\n   */\n  private _startProfilerInstance(): void {\n    if (this._profiler?.stopped === false) {\n      return; // already running\n    }\n    const profiler = startJSSelfProfile();\n    if (!profiler) {\n      DEBUG_BUILD && debug.log('[Profiling] Failed to start JS Profiler.');\n      return;\n    }\n    this._profiler = profiler;\n  }\n\n  /**\n   * Schedule the next 60s chunk while running.\n   * Each tick collects a chunk and restarts the profiler.\n   * A chunk should be closed when there are no active root spans anymore OR when the maximum chunk interval is reached.\n   */\n  private _startPeriodicChunking(): void {\n    if (!this._isRunning) {\n      return;\n    }\n\n    this._chunkTimer = setTimeout(() => {\n      this._collectCurrentChunk().catch(e => {\n        DEBUG_BUILD && debug.error('[Profiling] Failed to collect current profile chunk during periodic chunking:', e);\n      });\n\n      if (this._isRunning) {\n        this._startProfilerInstance();\n\n        if (!this._profiler) {\n          // If restart failed, stop scheduling further chunks and reset context.\n          this._resetProfilerInfo();\n          return;\n        }\n\n        this._startPeriodicChunking();\n      }\n    }, CHUNK_INTERVAL_MS);\n  }\n\n  /**\n   * Handle timeout for a specific root span ID to avoid indefinitely running profiler if `spanEnd` never fires.\n   * If this was the last active root span, collect the current chunk and stop profiling.\n   */\n  private _onRootSpanTimeout(rootSpanId: string): void {\n    // If span already ended, ignore\n    if (!this._rootSpanTimeouts.has(rootSpanId)) {\n      return;\n    }\n    this._rootSpanTimeouts.delete(rootSpanId);\n\n    if (!this._activeRootSpanIds.has(rootSpanId)) {\n      return;\n    }\n\n    DEBUG_BUILD &&\n      debug.log(\n        `[Profiling] Reached 5-minute timeout for root span ${rootSpanId}. You likely started a manual root span that never called \\`.end()\\`.`,\n      );\n\n    this._activeRootSpanIds.delete(rootSpanId);\n\n    if (this._activeRootSpanIds.size === 0) {\n      this._endProfiling();\n    }\n  }\n\n  /**\n   * Stop current profiler instance, convert profile to chunk & send.\n   */\n  private async _collectCurrentChunk(): Promise<void> {\n    const prevProfiler = this._profiler;\n    this._profiler = undefined;\n\n    if (!prevProfiler) {\n      return;\n    }\n\n    try {\n      const profile = await prevProfiler.stop();\n\n      // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n      const chunk = createProfileChunkPayload(profile, this._client!, this._profilerId);\n\n      // Validate chunk before sending\n      const validationReturn = validateProfileChunk(chunk);\n      if ('reason' in validationReturn) {\n        DEBUG_BUILD &&\n          debug.log(\n            '[Profiling] Discarding invalid profile chunk (this is probably a bug in the SDK):',\n            validationReturn.reason,\n          );\n        return;\n      }\n\n      this._sendProfileChunk(chunk);\n\n      DEBUG_BUILD && debug.log('[Profiling] Collected browser profile chunk.');\n    } catch (e) {\n      DEBUG_BUILD && debug.log('[Profiling] Error while stopping JS Profiler for chunk:', e);\n    }\n  }\n\n  /**\n   * Send a profile chunk as a standalone envelope.\n   */\n  private _sendProfileChunk(chunk: ProfileChunk): void {\n    // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n    const client = this._client!;\n\n    const sdkInfo = getSdkMetadataForEnvelopeHeader(client.getSdkMetadata?.());\n    const dsn = client.getDsn();\n    const tunnel = client.getOptions().tunnel;\n\n    const envelope = createEnvelope<ProfileChunkEnvelope>(\n      {\n        event_id: uuid4(),\n        sent_at: new Date().toISOString(),\n        ...(sdkInfo && { sdk: sdkInfo }),\n        ...(!!tunnel && dsn && { dsn: dsnToString(dsn) }),\n      },\n      [[{ type: 'profile_chunk', platform: 'javascript' }, chunk]],\n    );\n\n    client.sendEnvelope(envelope).then(null, reason => {\n      DEBUG_BUILD && debug.error('Error while sending profile chunk envelope:', reason);\n    });\n  }\n}\n", "import type { EventEnvelope, IntegrationFn, Profile, Span } from '@sentry/core/browser';\nimport { debug, defineIntegration, getActiveSpan, getRootSpan, hasSpansEnabled } from '@sentry/core/browser';\nimport type { BrowserOptions } from '../client';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { WINDOW } from '../helpers';\nimport { startProfileForSpan } from './startProfileForSpan';\nimport { UIProfiler } from './UIProfiler';\nimport type { ProfiledEvent } from './utils';\nimport {\n  addProfilesToEnvelope,\n  createProfilingEvent,\n  findProfiledTransactionsFromEnvelope,\n  getActiveProfilesCount,\n  hasLegacyProfiling,\n  isAutomatedPageLoadSpan,\n  PROFILED_ROOT_SPANS,\n  setThreadAttributes,\n  shouldProfileSpanLegacy,\n  takeProfileFromGlobalCache,\n} from './utils';\n\nconst INTEGRATION_NAME = 'BrowserProfiling' as const;\n\nconst _browserProfilingIntegration = (() => {\n  return {\n    name: INTEGRATION_NAME,\n    setup(client) {\n      const options = client.getOptions() as BrowserOptions;\n      const profiler = new UIProfiler();\n\n      if (!hasLegacyProfiling(options) && !options.profileLifecycle) {\n        // Set default lifecycle mode\n        options.profileLifecycle = 'manual';\n      }\n\n      // eslint-disable-next-line typescript/no-deprecated\n      if (hasLegacyProfiling(options) && !options.profilesSampleRate) {\n        DEBUG_BUILD && debug.log('[Profiling] Profiling disabled, no profiling options found.');\n        return;\n      }\n\n      const activeSpan = getActiveSpan();\n      const rootSpan = activeSpan && getRootSpan(activeSpan);\n\n      if (hasLegacyProfiling(options) && options.profileSessionSampleRate !== undefined) {\n        DEBUG_BUILD &&\n          debug.warn(\n            '[Profiling] Both legacy profiling (`profilesSampleRate`) and UI profiling settings are defined. `profileSessionSampleRate` has no effect when legacy profiling is enabled.',\n          );\n      }\n\n      // UI PROFILING (Profiling V2)\n      if (!hasLegacyProfiling(options)) {\n        const lifecycleMode = options.profileLifecycle;\n\n        // Registering hooks in all lifecycle modes to be able to notify users in case they want to start/stop the profiler manually in `trace` mode\n        client.on('startUIProfiler', () => profiler.start());\n        client.on('stopUIProfiler', () => profiler.stop());\n\n        if (lifecycleMode === 'manual') {\n          profiler.initialize(client);\n        } else if (lifecycleMode === 'trace') {\n          if (!hasSpansEnabled(options)) {\n            DEBUG_BUILD &&\n              debug.warn(\n                \"[Profiling] `profileLifecycle` is 'trace' but tracing is disabled. Set a `tracesSampleRate` or `tracesSampler` to enable span tracing.\",\n              );\n            return;\n          }\n\n          profiler.initialize(client);\n\n          // If there is an active, sampled root span already, notify the profiler\n          if (rootSpan) {\n            profiler.notifyRootSpanActive(rootSpan);\n          }\n\n          // In case rootSpan is created slightly after setup -> schedule microtask to re-check and notify.\n          WINDOW.setTimeout(() => {\n            const laterActiveSpan = getActiveSpan();\n            const laterRootSpan = laterActiveSpan && getRootSpan(laterActiveSpan);\n            if (laterRootSpan) {\n              profiler.notifyRootSpanActive(laterRootSpan);\n            }\n          }, 0);\n        }\n      } else {\n        // LEGACY PROFILING (v1)\n        if (rootSpan && isAutomatedPageLoadSpan(rootSpan)) {\n          if (shouldProfileSpanLegacy(rootSpan)) {\n            startProfileForSpan(rootSpan);\n          }\n        }\n\n        client.on('spanStart', (span: Span) => {\n          const rootSpan = getRootSpan(span);\n          if (span === rootSpan) {\n            if (shouldProfileSpanLegacy(span)) {\n              startProfileForSpan(span);\n            }\n          } else if (PROFILED_ROOT_SPANS.has(rootSpan)) {\n            setThreadAttributes(span);\n          }\n        });\n\n        client.on('beforeEnvelope', (envelope): void => {\n          // if not profiles are in queue, there is nothing to add to the envelope.\n          if (!getActiveProfilesCount()) {\n            return;\n          }\n\n          const profiledTransactionEvents = findProfiledTransactionsFromEnvelope(envelope);\n          if (!profiledTransactionEvents.length) {\n            return;\n          }\n\n          const profilesToAddToEnvelope: Profile[] = [];\n\n          for (const profiledTransaction of profiledTransactionEvents) {\n            const context = profiledTransaction?.contexts;\n            const profile_id = context?.profile?.['profile_id'];\n            const start_timestamp = context?.profile?.['start_timestamp'];\n\n            if (typeof profile_id !== 'string') {\n              DEBUG_BUILD && debug.log('[Profiling] cannot find profile for a span without a profile context');\n              continue;\n            }\n\n            if (!profile_id) {\n              DEBUG_BUILD && debug.log('[Profiling] cannot find profile for a span without a profile context');\n              continue;\n            }\n\n            // Remove the profile from the span context before sending, relay will take care of the rest.\n            if (context?.profile) {\n              delete context.profile;\n            }\n\n            const profile = takeProfileFromGlobalCache(profile_id);\n            if (!profile) {\n              DEBUG_BUILD && debug.log(`[Profiling] Could not retrieve profile for span: ${profile_id}`);\n              continue;\n            }\n\n            const profileEvent = createProfilingEvent(\n              profile_id,\n              start_timestamp as number | undefined,\n              profile,\n              profiledTransaction as ProfiledEvent,\n            );\n            if (profileEvent) {\n              profilesToAddToEnvelope.push(profileEvent);\n            }\n          }\n\n          addProfilesToEnvelope(envelope as EventEnvelope, profilesToAddToEnvelope);\n        });\n      }\n    },\n  };\n}) satisfies IntegrationFn;\n\nexport const browserProfilingIntegration = defineIntegration(_browserProfilingIntegration);\n", "import type { Client, Envelope, IntegrationFn } from '@sentry/core/browser';\nimport { debug, defineIntegration, serializeEnvelope } from '@sentry/core/browser';\nimport { getNativeImplementation } from '@sentry/browser-utils';\nimport { DEBUG_BUILD } from '../debug-build';\nimport type { WINDOW } from '../helpers';\n\nexport type SpotlightConnectionOptions = {\n  /**\n   * Set this if the Spotlight Sidecar is not running on localhost:8969\n   * By default, the Url is set to http://localhost:8969/stream\n   */\n  sidecarUrl?: string;\n};\n\nexport const INTEGRATION_NAME = 'SpotlightBrowser' as const;\n\nexport const SPOTLIGHT_IGNORE_SPANS = [{ op: 'ui.interaction.click', name: '#sentry-spotlight' }];\n\nconst _spotlightIntegration = ((options: Partial<SpotlightConnectionOptions> = {}) => {\n  const sidecarUrl = options.sidecarUrl || 'http://localhost:8969/stream';\n\n  return {\n    name: INTEGRATION_NAME,\n    setup: () => {\n      DEBUG_BUILD && debug.log('Using Sidecar URL', sidecarUrl);\n    },\n    beforeSetup(client: Client) {\n      const opts = client.getOptions();\n      opts.ignoreSpans = [...(opts.ignoreSpans || []), ...SPOTLIGHT_IGNORE_SPANS];\n    },\n    afterAllSetup: (client: Client) => {\n      setupSidecarForwarding(client, sidecarUrl);\n    },\n  };\n}) satisfies IntegrationFn;\n\nfunction setupSidecarForwarding(client: Client, sidecarUrl: string): void {\n  const makeFetch: typeof WINDOW.fetch | undefined = getNativeImplementation('fetch');\n  let failCount = 0;\n\n  client.on('beforeEnvelope', (envelope: Envelope) => {\n    if (failCount > 3) {\n      debug.warn('[Spotlight] Disabled Sentry -> Spotlight integration due to too many failed requests:', failCount);\n      return;\n    }\n\n    makeFetch(sidecarUrl, {\n      method: 'POST',\n      body: serializeEnvelope(envelope),\n      headers: {\n        'Content-Type': 'application/x-sentry-envelope',\n      },\n      mode: 'cors',\n    }).then(\n      res => {\n        if (res.status >= 200 && res.status < 400) {\n          // Reset failed requests counter on success\n          failCount = 0;\n        }\n      },\n      err => {\n        failCount++;\n        debug.error(\n          \"Sentry SDK can't connect to Sidecar is it running? See: https://spotlightjs.com/sidecar/npx/\",\n          err,\n        );\n      },\n    );\n  });\n}\n\n/**\n * Use this integration to send errors and transactions to Spotlight.\n *\n * Learn more about spotlight at https://spotlightjs.com\n */\nexport const spotlightBrowserIntegration = defineIntegration(_spotlightIntegration);\n", "import type { Client, Event, EventHint, IntegrationFn } from '@sentry/core/browser';\nimport {\n  _INTERNAL_addFeatureFlagToActiveSpan,\n  _INTERNAL_copyFlagsFromScopeToEvent,\n  _INTERNAL_insertFlagToScope,\n  defineIntegration,\n} from '@sentry/core/browser';\nimport type { LDContext, LDEvaluationDetail, LDInspectionFlagUsedHandler } from './types';\n\n/**\n * Sentry integration for capturing feature flag evaluations from LaunchDarkly.\n *\n * See the [feature flag documentation](https://develop.sentry.dev/sdk/expected-features/#feature-flags) for more information.\n *\n * @example\n * ```\n * import * as Sentry from '@sentry/browser';\n * import {launchDarklyIntegration, buildLaunchDarklyFlagUsedInspector} from '@sentry/browser';\n * import * as LaunchDarkly from 'launchdarkly-js-client-sdk';\n *\n * Sentry.init(..., integrations: [launchDarklyIntegration()])\n * const ldClient = LaunchDarkly.initialize(..., {inspectors: [buildLaunchDarklyFlagUsedHandler()]});\n * ```\n */\nexport const launchDarklyIntegration = defineIntegration(() => {\n  return {\n    name: 'LaunchDarkly' as const,\n\n    processEvent(event: Event, _hint: EventHint, _client: Client): Event {\n      return _INTERNAL_copyFlagsFromScopeToEvent(event);\n    },\n  };\n}) satisfies IntegrationFn;\n\n/**\n * LaunchDarkly hook to listen for and buffer flag evaluations. This needs to\n * be registered as an 'inspector' in LaunchDarkly initialize() options,\n * separately from `launchDarklyIntegration`. Both the hook and the integration\n * are needed to capture LaunchDarkly flags.\n */\nexport function buildLaunchDarklyFlagUsedHandler(): LDInspectionFlagUsedHandler {\n  return {\n    name: 'sentry-flag-auditor',\n    type: 'flag-used',\n\n    synchronous: true,\n\n    /**\n     * Handle a flag evaluation by storing its name and value on the current scope.\n     */\n    method: (flagKey: string, flagDetail: LDEvaluationDetail, _context: LDContext) => {\n      _INTERNAL_insertFlagToScope(flagKey, flagDetail.value);\n      _INTERNAL_addFeatureFlagToActiveSpan(flagKey, flagDetail.value);\n    },\n  };\n}\n", "/**\n * Sentry integration for capturing OpenFeature feature flag evaluations.\n *\n * See the [feature flag documentation](https://develop.sentry.dev/sdk/expected-features/#feature-flags) for more information.\n *\n * @example\n * ```\n * import * as Sentry from \"@sentry/browser\";\n * import { OpenFeature } from \"@openfeature/web-sdk\";\n *\n * Sentry.init(..., integrations: [Sentry.openFeatureIntegration()]);\n * OpenFeature.setProvider(new MyProviderOfChoice());\n * OpenFeature.addHooks(new Sentry.OpenFeatureIntegrationHook());\n * ```\n */\nimport type { Client, Event, EventHint, IntegrationFn } from '@sentry/core/browser';\nimport {\n  _INTERNAL_addFeatureFlagToActiveSpan,\n  _INTERNAL_copyFlagsFromScopeToEvent,\n  _INTERNAL_insertFlagToScope,\n  defineIntegration,\n} from '@sentry/core/browser';\nimport type { EvaluationDetails, HookContext, HookHints, JsonValue, OpenFeatureHook } from './types';\n\nexport const openFeatureIntegration = defineIntegration(() => {\n  return {\n    name: 'OpenFeature' as const,\n\n    processEvent(event: Event, _hint: EventHint, _client: Client): Event {\n      return _INTERNAL_copyFlagsFromScopeToEvent(event);\n    },\n  };\n}) satisfies IntegrationFn;\n\n/**\n * OpenFeature Hook class implementation.\n */\nexport class OpenFeatureIntegrationHook implements OpenFeatureHook {\n  /**\n   * Successful evaluation result.\n   */\n  public after(_hookContext: Readonly<HookContext<JsonValue>>, evaluationDetails: EvaluationDetails<JsonValue>): void {\n    _INTERNAL_insertFlagToScope(evaluationDetails.flagKey, evaluationDetails.value);\n    _INTERNAL_addFeatureFlagToActiveSpan(evaluationDetails.flagKey, evaluationDetails.value);\n  }\n\n  /**\n   * On error evaluation result.\n   */\n  public error(hookContext: Readonly<HookContext<JsonValue>>, _error: unknown, _hookHints?: HookHints): void {\n    _INTERNAL_insertFlagToScope(hookContext.flagKey, hookContext.defaultValue);\n    _INTERNAL_addFeatureFlagToActiveSpan(hookContext.flagKey, hookContext.defaultValue);\n  }\n}\n", "import type { Client, Event, EventHint, IntegrationFn } from '@sentry/core/browser';\nimport {\n  _INTERNAL_addFeatureFlagToActiveSpan,\n  _INTERNAL_copyFlagsFromScopeToEvent,\n  _INTERNAL_insertFlagToScope,\n  debug,\n  defineIntegration,\n  fill,\n} from '@sentry/core/browser';\nimport { DEBUG_BUILD } from '../../../debug-build';\nimport type { UnleashClient, UnleashClientClass } from './types';\n\ntype UnleashIntegrationOptions = {\n  featureFlagClientClass: UnleashClientClass;\n};\n\n/**\n * Sentry integration for capturing feature flag evaluations from the Unleash SDK.\n *\n * See the [feature flag documentation](https://develop.sentry.dev/sdk/expected-features/#feature-flags) for more information.\n *\n * @example\n * ```\n * import { UnleashClient } from 'unleash-proxy-client';\n * import * as Sentry from '@sentry/browser';\n *\n * Sentry.init({\n *   dsn: '___PUBLIC_DSN___',\n *   integrations: [Sentry.unleashIntegration({featureFlagClientClass: UnleashClient})],\n * });\n *\n * const unleash = new UnleashClient(...);\n * unleash.start();\n *\n * unleash.isEnabled('my-feature');\n * Sentry.captureException(new Error('something went wrong'));\n * ```\n */\nexport const unleashIntegration = defineIntegration(\n  ({ featureFlagClientClass: unleashClientClass }: UnleashIntegrationOptions) => {\n    return {\n      name: 'Unleash' as const,\n\n      setupOnce() {\n        const unleashClientPrototype = unleashClientClass.prototype as UnleashClient;\n        fill(unleashClientPrototype, 'isEnabled', _wrappedIsEnabled);\n      },\n\n      processEvent(event: Event, _hint: EventHint, _client: Client): Event {\n        return _INTERNAL_copyFlagsFromScopeToEvent(event);\n      },\n    };\n  },\n) satisfies IntegrationFn;\n\n/**\n * Wraps the UnleashClient.isEnabled method to capture feature flag evaluations. Its only side effect is writing to Sentry scope.\n *\n * This wrapper is safe for all isEnabled signatures. If the signature does not match (this: UnleashClient, toggleName: string, ...args: unknown[]) => boolean,\n * we log an error and return the original result.\n *\n * @param original - The original method.\n * @returns Wrapped method. Results should match the original.\n */\nfunction _wrappedIsEnabled(\n  original: (this: UnleashClient, ...args: unknown[]) => unknown,\n): (this: UnleashClient, ...args: unknown[]) => unknown {\n  return function (this: UnleashClient, ...args: unknown[]): unknown {\n    const toggleName = args[0];\n    const result = original.apply(this, args);\n\n    if (typeof toggleName === 'string' && typeof result === 'boolean') {\n      _INTERNAL_insertFlagToScope(toggleName, result);\n      _INTERNAL_addFeatureFlagToActiveSpan(toggleName, result);\n    } else if (DEBUG_BUILD) {\n      debug.error(\n        `[Feature Flags] UnleashClient.isEnabled does not match expected signature. arg0: ${toggleName} (${typeof toggleName}), result: ${result} (${typeof result})`,\n      );\n    }\n    return result;\n  };\n}\n", "import type { IntegrationFn } from '@sentry/core/browser';\nimport { growthbookIntegration as coreGrowthbookIntegration } from '@sentry/core/browser';\nimport type { GrowthBookClass } from './types';\n\n/**\n * Sentry integration for capturing feature flag evaluations from GrowthBook.\n *\n * See the feature flag documentation: https://develop.sentry.dev/sdk/expected-features/#feature-flags\n *\n * @example\n * ```\n * import { GrowthBook } from '@growthbook/growthbook';\n * import * as Sentry from '@sentry/browser';\n *\n * Sentry.init({\n *   dsn: '___PUBLIC_DSN___',\n *   integrations: [Sentry.growthbookIntegration({ growthbookClass: GrowthBook })],\n * });\n *\n * const gb = new GrowthBook();\n * gb.isOn('my-feature');\n * Sentry.captureException(new Error('something went wrong'));\n * ```\n */\nexport const growthbookIntegration = (({ growthbookClass }: { growthbookClass: GrowthBookClass }) =>\n  coreGrowthbookIntegration({ growthbookClass })) satisfies IntegrationFn;\n", "import type { Client, Event, EventHint, IntegrationFn } from '@sentry/core/browser';\nimport {\n  _INTERNAL_addFeatureFlagToActiveSpan,\n  _INTERNAL_copyFlagsFromScopeToEvent,\n  _INTERNAL_insertFlagToScope,\n  defineIntegration,\n} from '@sentry/core/browser';\nimport type { FeatureGate, StatsigClient } from './types';\n\n/**\n * Sentry integration for capturing feature flag evaluations from the Statsig js-client SDK.\n *\n * See the [feature flag documentation](https://develop.sentry.dev/sdk/expected-features/#feature-flags) for more information.\n *\n * @example\n * ```\n * import { StatsigClient } from '@statsig/js-client';\n * import * as Sentry from '@sentry/browser';\n *\n * const statsigClient = new StatsigClient();\n *\n * Sentry.init({\n *   dsn: '___PUBLIC_DSN___',\n *   integrations: [Sentry.statsigIntegration({featureFlagClient: statsigClient})],\n * });\n *\n * await statsigClient.initializeAsync();  // or statsigClient.initializeSync();\n *\n * const result = statsigClient.checkGate('my-feature-gate');\n * Sentry.captureException(new Error('something went wrong'));\n * ```\n */\nexport const statsigIntegration = defineIntegration(\n  ({ featureFlagClient: statsigClient }: { featureFlagClient: StatsigClient }) => {\n    return {\n      name: 'Statsig' as const,\n\n      setup(_client: Client) {\n        statsigClient.on('gate_evaluation', (event: { gate: FeatureGate }) => {\n          _INTERNAL_insertFlagToScope(event.gate.name, event.gate.value);\n          _INTERNAL_addFeatureFlagToActiveSpan(event.gate.name, event.gate.value);\n        });\n      },\n\n      processEvent(event: Event, _hint: EventHint, _client: Client): Event {\n        return _INTERNAL_copyFlagsFromScopeToEvent(event);\n      },\n    };\n  },\n) satisfies IntegrationFn;\n", "import { getClient, suppressTracing } from '@sentry/core/browser';\n\n/**\n * A function to diagnose why the SDK might not be successfully sending data.\n *\n * Possible return values wrapped in a Promise:\n * - `\"no-client-active\"` - There was no active client when the function was called. This possibly means that the SDK was not initialized yet.\n * - `\"sentry-unreachable\"` - The Sentry SaaS servers were not reachable. This likely means that there is an ad blocker active on the page or that there are other connection issues.\n *\n * If the function doesn't detect an issue it resolves to `undefined`.\n */\nexport async function diagnoseSdkConnectivity(): Promise<\n  'no-client-active' | 'sentry-unreachable' | 'no-dsn-configured' | void\n> {\n  const client = getClient();\n\n  if (!client) {\n    return 'no-client-active';\n  }\n\n  if (!client.getDsn()) {\n    return 'no-dsn-configured';\n  }\n\n  // Check if a tunnel is configured and use it if available\n  const tunnel = client.getOptions().tunnel;\n\n  // We are using the\n  // - \"sentry-sdks\" org with id 447951 not to pollute any actual organizations.\n  // - \"diagnose-sdk-connectivity\" project with id 4509632503087104\n  // - the public key of said org/project, which is disabled in the project settings\n  // => this DSN: https://c1dfb07d783ad5325c245c1fd3725390@o447951.ingest.us.sentry.io/4509632503087104 (i.e. disabled)\n  const defaultUrl =\n    'https://o447951.ingest.sentry.io/api/4509632503087104/envelope/?sentry_version=7&sentry_key=c1dfb07d783ad5325c245c1fd3725390&sentry_client=sentry.javascript.browser%2F1.33.7';\n\n  const url = tunnel || defaultUrl;\n\n  try {\n    await suppressTracing(() =>\n      // If fetch throws, there is likely an ad blocker active or there are other connective issues.\n      fetch(url, {\n        body: '{}',\n        method: 'POST',\n        mode: 'cors',\n        credentials: 'omit',\n      }),\n    );\n  } catch {\n    return 'sentry-unreachable';\n  }\n}\n", "import type { DebugImage, Integration, IntegrationFn } from '@sentry/core/browser';\nimport { captureEvent, debug, defineIntegration, getClient, isPlainObject, isPrimitive } from '@sentry/core/browser';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { eventFromUnknownInput } from '../eventbuilder';\nimport { WINDOW } from '../helpers';\nimport { _eventFromRejectionWithPrimitive, _getUnhandledRejectionError } from './globalhandlers';\n\nexport const INTEGRATION_NAME = 'WebWorker' as const;\n\ninterface WebWorkerMessage {\n  _sentryMessage: boolean;\n  _sentryDebugIds?: Record<string, string>;\n  _sentryModuleMetadata?: Record<string, any>; // eslint-disable-line @typescript-eslint/no-explicit-any\n  _sentryWorkerError?: SerializedWorkerError;\n  _sentryWasmImages?: Array<DebugImage>;\n}\n\ninterface SerializedWorkerError {\n  reason: unknown;\n  filename?: string;\n}\n\ninterface WebWorkerIntegrationOptions {\n  worker: Worker | Array<Worker>;\n}\n\ninterface WebWorkerIntegration extends Integration {\n  addWorker: (worker: Worker) => void;\n}\n\n/**\n * Use this integration to set up Sentry with web workers.\n *\n * IMPORTANT: This integration must be added **before** you start listening to\n * any messages from the worker. Otherwise, your message handlers will receive\n * messages from the Sentry SDK which you need to ignore.\n *\n * This integration only has an effect, if you call `Sentry.registerWebWorker(self)`\n * from within the worker(s) you're adding to the integration.\n *\n * Given that you want to initialize the SDK as early as possible, you most likely\n * want to add this integration **after** initializing the SDK:\n *\n * @example:\n * ```ts filename={main.js}\n * import * as Sentry from '@sentry/<your-sdk>';\n *\n * // some time earlier:\n * Sentry.init(...)\n *\n * // 1. Initialize the worker\n * const worker = new Worker(new URL('./worker.ts', import.meta.url));\n *\n * // 2. Add the integration\n * const webWorkerIntegration = Sentry.webWorkerIntegration({ worker });\n * Sentry.addIntegration(webWorkerIntegration);\n *\n * // 3. Register message listeners on the worker\n * worker.addEventListener('message', event => {\n *  // ...\n * });\n * ```\n *\n * If you initialize multiple workers at the same time, you can also pass an array of workers\n * to the integration:\n *\n * ```ts filename={main.js}\n * const webWorkerIntegration = Sentry.webWorkerIntegration({ worker: [worker1, worker2] });\n * Sentry.addIntegration(webWorkerIntegration);\n * ```\n *\n * If you have any additional workers that you initialize at a later point,\n * you can add them to the integration as follows:\n *\n * ```ts filename={main.js}\n * const webWorkerIntegration = Sentry.webWorkerIntegration({ worker: worker1 });\n * Sentry.addIntegration(webWorkerIntegration);\n *\n * // sometime later:\n * webWorkerIntegration.addWorker(worker2);\n * ```\n *\n * Of course, you can also directly add the integration in Sentry.init:\n * ```ts filename={main.js}\n * import * as Sentry from '@sentry/<your-sdk>';\n *\n * // 1. Initialize the worker\n * const worker = new Worker(new URL('./worker.ts', import.meta.url));\n *\n * // 2. Initialize the SDK\n * Sentry.init({\n *  integrations: [Sentry.webWorkerIntegration({ worker })]\n * });\n *\n * // 3. Register message listeners on the worker\n * worker.addEventListener('message', event => {\n *  // ...\n * });\n * ```\n *\n * @param options {WebWorkerIntegrationOptions} Integration options:\n *   - `worker`: The worker instance.\n */\nexport const webWorkerIntegration = defineIntegration(({ worker }: WebWorkerIntegrationOptions) => ({\n  name: INTEGRATION_NAME,\n  setupOnce: () => {\n    (Array.isArray(worker) ? worker : [worker]).forEach(w => listenForSentryMessages(w));\n  },\n  addWorker: (worker: Worker) => listenForSentryMessages(worker),\n})) as IntegrationFn<WebWorkerIntegration>;\n\nfunction listenForSentryMessages(worker: Worker): void {\n  worker.addEventListener('message', event => {\n    if (isSentryMessage(event.data)) {\n      event.stopImmediatePropagation(); // other listeners should not receive this message\n\n      // Handle debug IDs\n      if (event.data._sentryDebugIds) {\n        DEBUG_BUILD && debug.log('Sentry debugId web worker message received', event.data);\n        WINDOW._sentryDebugIds = {\n          ...event.data._sentryDebugIds,\n          // debugIds of the main thread have precedence over the worker's in case of a collision.\n          ...WINDOW._sentryDebugIds,\n        };\n      }\n\n      // Handle module metadata\n      if (event.data._sentryModuleMetadata) {\n        DEBUG_BUILD && debug.log('Sentry module metadata web worker message received', event.data);\n        // Merge worker's raw metadata into the global object\n        // It will be parsed lazily when needed by getMetadataForUrl\n        WINDOW._sentryModuleMetadata = {\n          ...event.data._sentryModuleMetadata,\n          // Module metadata of the main thread have precedence over the worker's in case of a collision.\n          ...WINDOW._sentryModuleMetadata,\n        };\n      }\n\n      // Handle WASM images from worker\n      if (event.data._sentryWasmImages) {\n        DEBUG_BUILD && debug.log('Sentry WASM images web worker message received', event.data);\n        const existingImages =\n          (WINDOW as typeof WINDOW & { _sentryWasmImages?: Array<DebugImage> })._sentryWasmImages || [];\n        const newImages = event.data._sentryWasmImages.filter(\n          (newImg: unknown) =>\n            isPlainObject(newImg) &&\n            typeof newImg.code_file === 'string' &&\n            !existingImages.some(existing => existing.code_file === newImg.code_file),\n        );\n        (WINDOW as typeof WINDOW & { _sentryWasmImages?: Array<DebugImage> })._sentryWasmImages = [\n          ...existingImages,\n          ...newImages,\n        ];\n      }\n\n      // Handle unhandled rejections forwarded from worker\n      if (event.data._sentryWorkerError) {\n        DEBUG_BUILD && debug.log('Sentry worker rejection message received', event.data._sentryWorkerError);\n        handleForwardedWorkerRejection(event.data._sentryWorkerError);\n      }\n    }\n  });\n}\n\nfunction handleForwardedWorkerRejection(workerError: SerializedWorkerError): void {\n  const client = getClient();\n  if (!client) {\n    return;\n  }\n\n  const stackParser = client.getOptions().stackParser;\n  const attachStacktrace = client.getOptions().attachStacktrace;\n\n  const error = workerError.reason;\n\n  // Follow same pattern as globalHandlers for unhandledrejection\n  // Handle both primitives and errors the same way\n  const event = isPrimitive(error)\n    ? _eventFromRejectionWithPrimitive(error)\n    : eventFromUnknownInput(stackParser, error, undefined, attachStacktrace, true);\n\n  event.level = 'error';\n\n  // Add worker-specific context\n  if (workerError.filename) {\n    event.contexts = {\n      ...event.contexts,\n      worker: {\n        filename: workerError.filename,\n      },\n    };\n  }\n\n  captureEvent(event, {\n    originalException: error,\n    mechanism: {\n      handled: false,\n      type: 'auto.browser.web_worker.onunhandledrejection',\n    },\n  });\n\n  DEBUG_BUILD && debug.log('Captured worker unhandled rejection', error);\n}\n\n/**\n * Minimal interface for DedicatedWorkerGlobalScope, only requiring the postMessage method.\n * (which is the only thing we need from the worker's global object)\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope\n *\n * We can't use the actual type because it breaks everyone who doesn't have {\"lib\": [\"WebWorker\"]}\n * but uses {\"skipLibCheck\": true} in their tsconfig.json.\n */\ninterface MinimalDedicatedWorkerGlobalScope {\n  postMessage: (message: unknown) => void;\n  addEventListener: (type: string, listener: (event: unknown) => void) => void;\n  location?: { href?: string };\n}\n\ninterface RegisterWebWorkerOptions {\n  self: MinimalDedicatedWorkerGlobalScope & {\n    _sentryDebugIds?: Record<string, string>;\n    _sentryModuleMetadata?: Record<string, any>; // eslint-disable-line @typescript-eslint/no-explicit-any\n  };\n}\n\n/**\n * Use this function to register the worker with the Sentry SDK.\n *\n * This function will:\n * - Send debug IDs to the parent thread\n * - Send module metadata to the parent thread (for thirdPartyErrorFilterIntegration)\n * - Set up a handler for unhandled rejections in the worker\n * - Forward unhandled rejections to the parent thread for capture\n *\n * Note: Synchronous errors in workers are already captured by globalHandlers.\n * This only handles unhandled promise rejections which don't bubble to the parent.\n *\n * @example\n * ```ts filename={worker.js}\n * import * as Sentry from '@sentry/<your-sdk>';\n *\n * // Do this as early as possible in your worker.\n * Sentry.registerWebWorker({ self });\n *\n * // continue setting up your worker\n * self.postMessage(...)\n * ```\n * @param options {RegisterWebWorkerOptions} Integration options:\n *   - `self`: The worker instance you're calling this function from (self).\n */\nexport function registerWebWorker({ self }: RegisterWebWorkerOptions): void {\n  // Send debug IDs and raw module metadata to parent thread\n  // The metadata will be parsed lazily on the main thread when needed\n  self.postMessage({\n    _sentryMessage: true,\n    _sentryDebugIds: self._sentryDebugIds ?? undefined,\n    _sentryModuleMetadata: self._sentryModuleMetadata ?? undefined,\n  });\n\n  // Set up unhandledrejection handler inside the worker\n  // Following the same pattern as globalHandlers\n  // unhandled rejections don't bubble to the parent thread, so we need to handle them here\n  self.addEventListener('unhandledrejection', (event: unknown) => {\n    const reason = _getUnhandledRejectionError(event);\n\n    // Forward the raw reason to parent thread\n    // The parent will handle primitives vs errors the same way globalHandlers does\n    const serializedError: SerializedWorkerError = {\n      reason: reason,\n      filename: self.location?.href,\n    };\n\n    // Forward to parent thread\n    self.postMessage({\n      _sentryMessage: true,\n      _sentryWorkerError: serializedError,\n    });\n\n    DEBUG_BUILD && debug.log('[Sentry Worker] Forwarding unhandled rejection to parent', serializedError);\n  });\n\n  DEBUG_BUILD && debug.log('[Sentry Worker] Registered worker with unhandled rejection handling');\n}\n\nfunction isSentryMessage(eventData: unknown): eventData is WebWorkerMessage {\n  if (!isPlainObject(eventData) || eventData._sentryMessage !== true) {\n    return false;\n  }\n\n  // Must have at least one of: debug IDs, module metadata, worker error, or WASM images\n  const hasDebugIds = '_sentryDebugIds' in eventData;\n  const hasModuleMetadata = '_sentryModuleMetadata' in eventData;\n  const hasWorkerError = '_sentryWorkerError' in eventData;\n  const hasWasmImages = '_sentryWasmImages' in eventData;\n\n  if (!hasDebugIds && !hasModuleMetadata && !hasWorkerError && !hasWasmImages) {\n    return false;\n  }\n\n  // Validate debug IDs if present\n  if (hasDebugIds && !(isPlainObject(eventData._sentryDebugIds) || eventData._sentryDebugIds === undefined)) {\n    return false;\n  }\n\n  // Validate module metadata if present\n  if (\n    hasModuleMetadata &&\n    !(isPlainObject(eventData._sentryModuleMetadata) || eventData._sentryModuleMetadata === undefined)\n  ) {\n    return false;\n  }\n\n  // Validate worker error if present\n  if (hasWorkerError && !isPlainObject(eventData._sentryWorkerError)) {\n    return false;\n  }\n\n  // Validate WASM images if present\n  if (\n    hasWasmImages &&\n    (!Array.isArray(eventData._sentryWasmImages) ||\n      !eventData._sentryWasmImages.every(\n        (img: unknown) => isPlainObject(img) && typeof (img as { code_file?: unknown }).code_file === 'string',\n      ))\n  ) {\n    return false;\n  }\n\n  return true;\n}\n", "import * as Sentry from \"@sentry/browser\";\n\nconst sentryDsn = () => {\n  const metaTag = document.head.querySelector(\"meta[name=sentry-dsn]\");\n  return metaTag && metaTag.content;\n};\n\nexport function sentryException(error, extras = false, eventIdCallback = () => {}) {\n  const documentBody = document.querySelector(\"body\");\n\n  function setSentryUserOnScope(scope) {\n    if (documentBody === null) return;\n\n    const { userId: id, userEmail: email } = documentBody.dataset;\n    if (id !== undefined && email !== undefined) scope.setUser({ id, email });\n  }\n\n  function setProjectOnScope(scope) {\n    if (documentBody === null) return;\n\n    const { projectId, projectType } = documentBody.dataset;\n    if (projectId !== undefined && projectType !== undefined) {\n      scope.setTag(\"project ID\", projectId);\n      scope.setTag(\"project type\", projectType.toUpperCase());\n    }\n  }\n\n  const errorPayload = error || \"No error available\";\n\n  Sentry.withScope(function (scope) {\n    if (extras) scope.setExtras(extras);\n    setSentryUserOnScope(scope);\n    setProjectOnScope(scope);\n    const captureMethod = errorPayload instanceof Error ? \"captureException\" : \"captureMessage\";\n    const eventId = Sentry[captureMethod](errorPayload);\n    eventIdCallback(eventId);\n  });\n}\n\nexport default Sentry;\n\nSentry.init({ dsn: sentryDsn() });\n", "import React from \"react\";\nimport ReactDOMServer from \"react-dom/server\";\nimport { sentryException } from \"../config/sentry\";\nimport { benchmark, debugIt, logger, warn, onDevelopment, onStaging, applicationEnvironment } from \"./logger\";\n\n// this allows us to call the function from a Rails JS \"sprinkle\" response\nif (!(\"IR_GLOBALS\" in window)) window.IR_GLOBALS = {};\n\nconst updateIdentifiedElement = (identifier, content) => {\n  const element = document.querySelector(`[data-identifier='${identifier}']`);\n  if (element) {\n    element.innerHTML = content;\n  } else {\n    const message = `[Handled Error] Could not find data-identifier \"${identifier}\" on page`;\n    logger(message);\n    sentryException(message);\n  }\n};\nwindow.IR_GLOBALS.updateIdentifiedElement = updateIdentifiedElement;\n\nexport const createLinkAndClick = (href, target = \"_self\") => {\n  const link = document.createElement(\"a\");\n  link.setAttribute(\"target\", target);\n  link.setAttribute(\"href\", href);\n  document.body.appendChild(link);\n  link.click();\n};\n\nexport const inchesToFeetAndInches = (inches, precision = 0) => {\n  const feet = Math.floor(inches / 12);\n  const remainingInches = Number.parseFloat(inches % 12).toFixed(IR_GLOBALS.dimensionLabelsPrecision || precision);\n  if (Number.parseFloat(remainingInches) === 0) return `${feet}'`;\n  if (Number.parseFloat(remainingInches) === 12) {\n    return `${feet + 1}'`;\n  }\n  return `${feet}' ${remainingInches}\"`;\n};\n\nexport const elementInfo = (el) => {\n  const rect = el.getBoundingClientRect();\n  const scrollLeft = window.pageXOffset || document.documentElement.scrollLeft;\n  const scrollTop = window.pageYOffset || document.documentElement.scrollTop;\n  const top = rect.top + scrollTop;\n  const left = rect.left + scrollLeft;\n  const { height, width } = rect;\n  const bottom = top + height;\n  const right = left + width;\n  const center = { x: left + width / 2, y: top + height / 2 };\n  return { top, right, bottom, left, height, width, center };\n};\n\nexport const pointOverlapsElement = ({ x, y, element }) => {\n  if (element.offsetParent !== null) {\n    const rect = element.getBoundingClientRect();\n\n    if (x >= rect.left && x <= rect.right && y >= rect.top && y <= rect.bottom) {\n      return true;\n    }\n  }\n\n  return false;\n};\n\n// Note: your callback will not execute if the tracking code is blocked by a browser ad/privacy block\nexport const track = ({ action = \"System Support\", category, label, callback = () => {} }) => {\n  // gtag(\"event\", action, {\n  //   event_category: category,\n  //   event_label: label,\n  //   transport_type: \"beacon\",\n  //   event_callback: callback,\n  // });\n};\n\nexport const showFlashMessage = ({ message, flashType }) => {\n  const allowedTypes = [\"error\", \"success\", \"info\"];\n  if (!allowedTypes.includes(flashType)) {\n    throw `${flashType} is not a recognized flash type`;\n  }\n\n  const flashMessageDiv = ReactDOMServer.renderToString(\n    <div className=\"ir-flash__container\" data-controller=\"components--ir-flash\">\n      <div\n        className={`ir-flash ir-flash--${flashType}`}\n        data-components--ir-flash-target=\"flash\"\n        data-action=\"mouseover->components--ir-flash#mouseOver mouseout->components--ir-flash#mouseOut\"\n      >\n        <a href=\"#\" className=\"ir-flash__close\" data-action=\"components--ir-flash#close\">\n          &times;\n        </a>\n        {message}\n      </div>\n    </div>,\n  );\n\n  let flashWrapper = document.querySelector(\"#ir-flash-messages\");\n  if (!flashWrapper) {\n    flashWrapper = document.createElement(\"div\");\n    flashWrapper.setAttribute(\"id\", \"#ir-flash-messages\");\n    document.body.appendChild(flashWrapper);\n  }\n\n  flashWrapper.innerHTML = flashMessageDiv;\n};\n\nwindow.IR_GLOBALS.showFlashMessage = showFlashMessage;\n\nexport const scaleMap = (num, inMin, inMax, outMin, outMax) => {\n  return ((num - inMin) * (outMax - outMin)) / (inMax - inMin) + outMin;\n};\n\nexport { benchmark, debugIt, logger, warn, onDevelopment, onStaging, applicationEnvironment };\n\nexport { buildAlphabeticalIdentifier } from \"./identifier-builder\";\n\nexport function showBtnSpinner(btn) {\n  btn.classList.add(\"ir-btn--spinner-shown\");\n  btn.disabled = true;\n}\n\nexport function hideBtnSpinner(btn) {\n  btn.classList.remove(\"ir-btn--spinner-shown\");\n  btn.disabled = false;\n}\n\nexport function humanizeWattage(wattage) {\n  if (wattage < 1000) {\n    return `${wattage} W`;\n  } else if (wattage <= 999995) {\n    const wattageKw = wattage / 1000.0;\n    return `${wattageKw.toFixed(2)} kW`;\n  } else {\n    const wattageMw = wattage / 1000000.0;\n    return `${wattageMw.toFixed(2)} MW`;\n  }\n}\n\nexport function getZIndex(e) {\n  let z = 10050;\n\n  try {\n    z = document.defaultView.getComputedStyle(e).getPropertyValue(\"z-index\");\n    if (isNaN(z)) z = getZIndex(e.parentNode);\n  } catch (error) {\n    // Remove import of SentryException when this is removed\n    const message = \"[Handled Error] getZIndex failure\";\n    const extras = {\n      e: JSON.stringify(e, [\"id\", \"className\", \"tagName\"]),\n      error: error,\n    };\n    console.log(message, extras);\n    sentryException(message, extras);\n  }\n\n  return Number.parseInt(z);\n}\n\nexport function isVisible(element) {\n  return element.offsetParent !== null;\n}\n\nexport function valueInSteps(value, precision = 1, step = 0.5) {\n  const originalValue = Number.parseFloat(value);\n  const originalInteger = Number.parseInt(originalValue);\n  const originalDecimal = originalValue - originalInteger;\n\n  const stepCount = Math.round(originalDecimal / step);\n  const scaledDecimal = stepCount * step;\n\n  const adjustedValue = originalInteger + scaledDecimal;\n\n  return `${adjustedValue.toFixed(precision)}`;\n}\n\nexport function flashlightAndRemoveClass(element) {\n  element.classList.add(\"flashlight\");\n  setTimeout(() => {\n    element.classList.remove(\"flashlight\");\n  }, 2000);\n}\n", "export function applicationEnvironment() {\n  if (typeof document === \"undefined\") return \"test\";\n\n  const metaTag = document.querySelector('meta[name=\"application-environment\"]');\n  if (!metaTag) return \"test\";\n\n  return metaTag.getAttribute(\"content\");\n}\n\nexport function onDevelopment() {\n  return applicationEnvironment() === \"development\";\n}\n\nexport function onStaging() {\n  return applicationEnvironment() === \"staging\";\n}\n\nexport function logger(...args) {\n  if (onDevelopment() || onStaging()) {\n    console.log(...args);\n  }\n}\n\nexport function warn(...args) {\n  if (onDevelopment() || onStaging()) {\n    console.warn(...args);\n  }\n}\n\nexport function debugIt() {\n  if (onDevelopment()) {\n    debugger;\n  }\n}\n\nexport function benchmark(message, runnable) {\n  const startTime = new Date();\n  const result = runnable();\n  const endTime = new Date();\n\n  console.log(message, endTime - startTime, \"ms\");\n  return result;\n}\n", "export function buildAlphabeticalIdentifier(position) {\n  const letters = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\".split(\"\");\n\n  let identifier = \"\";\n  if (position >= 26) {\n    identifier += letters[Math.floor(position / 26) - 1];\n    identifier += letters[position % 26];\n  } else {\n    identifier += letters[position];\n  }\n\n  return identifier;\n}\n", "export const get = (key, defaultValue = undefined) => {\n  let lsValue;\n  try {\n    lsValue = JSON.parse(localStorage.getItem(key));\n  } catch {\n    console.log(\"Format problem with stored value. Using default if possible.\");\n    lsValue = null;\n  }\n  if (lsValue === null && defaultValue !== undefined) return defaultValue;\n  return lsValue;\n};\n\nexport const set = (key, value) => {\n  localStorage.setItem(key, JSON.stringify(value));\n};\n\nexport const has = (key) => {\n  return get(key) !== null;\n};\n\nexport const del = (key) => {\n  localStorage.removeItem(key);\n};\n\nexport const removeMatchingKeys = (filterFn) => {\n  Object.keys(localStorage)\n    .filter(filterFn)\n    .forEach((key) => {\n      localStorage.removeItem(key);\n    });\n};\n", "/**\n * Anime.js - core - ESM\n * @version v4.5.0\n * @license MIT\n * @copyright 2026 - Julian Garnier\n */\n\n// Environments\n\n// TODO: Do we need to check if we're running inside a worker ?\nconst isBrowser = typeof window !== 'undefined';\n\n/** @typedef {Window & {AnimeJS: Array}|null} AnimeJSWindow\n\n/** @type {AnimeJSWindow} */\nconst win = isBrowser ? /** @type {AnimeJSWindow} */(/** @type {unknown} */(window)) : null;\n\n/** @type {Document|null} */\nconst doc = isBrowser ? document : null;\n\n// Enums\n\n/** @enum {Number} */\nconst tweenTypes = {\n  OBJECT: 0,\n  ATTRIBUTE: 1,\n  CSS: 2,\n  TRANSFORM: 3,\n  CSS_VAR: 4,\n};\n\n/** @enum {Number} */\nconst valueTypes = {\n  NUMBER: 0,\n  UNIT: 1,\n  COLOR: 2,\n  COMPLEX: 3,\n};\n\n/** @enum {Number} */\nconst tickModes = {\n  NONE: 0,\n  AUTO: 1,\n  FORCE: 2,\n};\n\n/** @enum {Number} */\nconst compositionTypes = {\n  replace: 0,\n  none: 1,\n  blend: 2,\n};\n\n// Cache symbols\n\nconst isRegisteredTargetSymbol = Symbol();\nconst isDomSymbol = Symbol();\nconst isSvgSymbol = Symbol();\nconst transformsSymbol = Symbol();\nconst proxyTargetSymbol = Symbol();\n\n// Numbers\n\nconst minValue = 1e-11;\nconst maxValue = 1e12;\nconst K = 1e3;\nconst maxFps = 240;\n\n// Strings\n\nconst emptyString = '';\nconst cssVarPrefix = 'var(';\n\n// Arrays\n\n// Shared sentinel for tween slots that don't hold array data. Never mutated, only read; COMPLEX and COLOR tweens always replace the slot before writing.\nconst emptyArray = [];\n\nconst shortTransforms = /*#__PURE__*/ (() => {\n  const map = new Map();\n  map.set('x', 'translateX');\n  map.set('y', 'translateY');\n  map.set('z', 'translateZ');\n  return map;\n})();\n\nconst validTransforms = [\n  'perspective',\n  'translateX',\n  'translateY',\n  'translateZ',\n  'rotate',\n  'rotateX',\n  'rotateY',\n  'rotateZ',\n  'scale',\n  'scaleX',\n  'scaleY',\n  'scaleZ',\n  'skew',\n  'skewX',\n  'skewY',\n];\n\nconst transformsFragmentStrings = /*#__PURE__*/ validTransforms.reduce((a, v) => ({...a, [v]: v + '('}), {});\n\n// Functions\n\n/** @return {void} */\nconst noop = () => {};\n\n/**\n * @template T\n * @param  {T} v\n * @return {T}\n */\nconst noopModifier = v => v;\n\n// Regex\n\nconst validRgbHslRgx = /\\)\\s*[-.\\d]/;\nconst hexTestRgx = /(^#([\\da-f]{3}){1,2}$)|(^#([\\da-f]{4}){1,2}$)/i;\nconst rgbExecRgx = /rgb\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*\\)/i;\nconst rgbaExecRgx = /rgba\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(-?\\d+|-?\\d*.\\d+)\\s*\\)/i;\nconst hslExecRgx = /hsl\\(\\s*(-?\\d+|-?\\d*.\\d+)\\s*,\\s*(-?\\d+|-?\\d*.\\d+)%\\s*,\\s*(-?\\d+|-?\\d*.\\d+)%\\s*\\)/i;\nconst hslaExecRgx = /hsla\\(\\s*(-?\\d+|-?\\d*.\\d+)\\s*,\\s*(-?\\d+|-?\\d*.\\d+)%\\s*,\\s*(-?\\d+|-?\\d*.\\d+)%\\s*,\\s*(-?\\d+|-?\\d*.\\d+)\\s*\\)/i;\n// export const digitWithExponentRgx = /[-+]?\\d*\\.?\\d+(?:[eE][-+]?\\d+)?/g;\nconst digitWithExponentRgx = /[-+]?\\d*\\.?\\d+(?:e[-+]?\\d)?/gi;\n// export const unitsExecRgx = /^([-+]?\\d*\\.?\\d+(?:[eE][-+]?\\d+)?)+([a-z]+|%)$/i;\nconst unitsExecRgx = /^([-+]?\\d*\\.?\\d+(?:e[-+]?\\d+)?)([a-z]+|%)$/i;\nconst lowerCaseRgx = /([a-z])([A-Z])/g;\nconst relativeValuesExecRgx = /(\\*=|\\+=|-=)/;\nconst cssVariableMatchRgx = /var\\(\\s*(--[\\w-]+)(?:\\s*,\\s*([^)]+))?\\s*\\)/;\n\nexport { K, compositionTypes, cssVarPrefix, cssVariableMatchRgx, digitWithExponentRgx, doc, emptyArray, emptyString, hexTestRgx, hslExecRgx, hslaExecRgx, isBrowser, isDomSymbol, isRegisteredTargetSymbol, isSvgSymbol, lowerCaseRgx, maxFps, maxValue, minValue, noop, noopModifier, proxyTargetSymbol, relativeValuesExecRgx, rgbExecRgx, rgbaExecRgx, shortTransforms, tickModes, transformsFragmentStrings, transformsSymbol, tweenTypes, unitsExecRgx, validRgbHslRgx, validTransforms, valueTypes, win };\n", "/**\n * Anime.js - core - ESM\n * @version v4.5.0\n * @license MIT\n * @copyright 2026 - Julian Garnier\n */\n\nimport { isBrowser, win, noop, noopModifier, compositionTypes, K, maxFps, doc } from './consts.js';\n\n/**\n * @import {\n *   DefaultsParams,\n *   DOMTarget,\n * } from '../types/index.js'\n *\n * @import {\n *   Scope,\n * } from '../scope/index.js'\n*/\n\n/**\n * @typedef {Object} EditorGlobals\n * @property {boolean} showPanel\n * @property {Function} addAnimation\n * @property {Function} addSet\n * @property {Function} addTimeline\n * @property {Function} addTimelineChild\n * @property {Function} addTimelineLabel\n * @property {Function} addTimelineCall\n * @property {Function} addTimelineSync\n * @property {Function} resolveStagger\n * @property {Object|null} _head\n * @property {Object|null} _tail\n */\n\n/** @type {DefaultsParams} */\nconst defaults = {\n  id: null,\n  keyframes: null,\n  playbackEase: null,\n  playbackRate: 1,\n  frameRate: maxFps,\n  loop: 0,\n  reversed: false,\n  alternate: false,\n  autoplay: true,\n  persist: false,\n  duration: K,\n  delay: 0,\n  loopDelay: 0,\n  ease: 'out(2)',\n  composition: compositionTypes.replace,\n  modifier: noopModifier,\n  onBegin: noop,\n  onBeforeUpdate: noop,\n  onUpdate: noop,\n  onLoop: noop,\n  onPause: noop,\n  onComplete: noop,\n  onRender: noop,\n};\n\nconst scope = {\n  /** @type {Scope} */\n  current: null,\n  /** @type {Document|DOMTarget} */\n  root: doc,\n};\n\nconst globals = {\n  /** @type {DefaultsParams} */\n  defaults,\n  /** @type {Number} */\n  precision: 4,\n  /** @type {Number} equals 1 in ms mode, 0.001 in s mode */\n  timeScale: 1,\n  /** @type {Number} */\n  tickThreshold: 200,\n  /** @type {EditorGlobals|null} */\n  editor: null,\n};\n\nconst globalVersions = { version: '4.5.0', engine: null };\n\nif (isBrowser) {\n  if (!win.AnimeJS) win.AnimeJS = [];\n  win.AnimeJS.push(globalVersions);\n}\n\nexport { defaults, globalVersions, globals, scope };\n", "/**\n * Anime.js - core - ESM\n * @version v4.5.0\n * @license MIT\n * @copyright 2026 - Julian Garnier\n */\n\nimport { isBrowser, maxValue, minValue, hexTestRgx, lowerCaseRgx, validRgbHslRgx } from './consts.js';\nimport { globals } from './globals.js';\n\n/**\n * @import {\n *   Target,\n *   DOMTarget,\n * } from '../types/index.js'\n*/\n\n// Strings\n\n/**\n * @param  {String} str\n * @return {String}\n */\nconst toLowerCase = str => str.replace(lowerCaseRgx, '$1-$2').toLowerCase();\n\n/**\n * Prioritize this method instead of regex when possible\n * @param  {String} str\n * @param  {String} sub\n * @return {Boolean}\n */\nconst stringStartsWith = (str, sub) => str.indexOf(sub) === 0;\n\n// Note: Date.now is used instead of performance.now since it is precise enough for timings calculations, performs slightly faster and works in Node.js environement.\nconst now = Date.now;\n\n// Types checkers\n\nconst isArr = Array.isArray;\n/**@param {any} a @return {a is Record<String, any>} */\nconst isObj = a => a && a.constructor === Object;\n/**@param {any} a @return {a is Number} */\nconst isNum = a => typeof a === 'number' && !isNaN(a);\n/**@param {any} a @return {a is String} */\nconst isStr = a => typeof a === 'string';\n/**@param {any} a @return {a is Function} */\nconst isFnc = a => typeof a === 'function';\n/**@param {any} a @return {a is undefined} */\nconst isUnd = a => typeof a === 'undefined';\n/**@param {any} a @return {a is null | undefined} */\nconst isNil = a => isUnd(a) || a === null;\n/**@param {any} a @return {a is SVGElement} */\nconst isSvg = a => isBrowser && a instanceof SVGElement;\n/**@param {any} a @return {Boolean} */\nconst isHex = a => hexTestRgx.test(a);\n/**@param {any} a @return {Boolean} */\nconst isRgb = a => stringStartsWith(a, 'rgb');\n/**@param {any} a @return {Boolean} */\nconst isHsl = a => stringStartsWith(a, 'hsl');\n/**@param {any} a @return {Boolean} */ // Make sure boxShadow syntax like 'rgb(255, 0, 0) 0px 0px 6px 0px' is not a valid color type\nconst isCol = a => isHex(a) || ((isRgb(a) || isHsl(a)) && (a[a.length - 1] === ')' || !validRgbHslRgx.test(a)));\n/**@param {any} a @return {Boolean} */\nconst isKey = a => !globals.defaults.hasOwnProperty(a);\n\n// SVG\n\n// Consider the following as CSS animation\n// CSS opacity animation has better default values (opacity: 1 instead of 0))\n// rotate is more commonly intended to be used as a transform\nconst svgCssReservedProperties = ['opacity', 'rotate', 'overflow', 'color'];\n\n/**\n * @param  {Target} el\n * @param  {String} propertyName\n * @return {Boolean}\n */\nconst isValidSVGAttribute = (el, propertyName) => {\n  if (svgCssReservedProperties.includes(propertyName)) return false;\n  if (el.getAttribute(propertyName) || propertyName in el) {\n    if (propertyName === 'scale') { // Scale\n      const elParentNode = /** @type {SVGGeometryElement} */(/** @type {DOMTarget} */(el).parentNode);\n      // Only consider scale as a valid SVG attribute on filter element\n      return elParentNode && elParentNode.tagName === 'filter';\n    }\n    return true;\n  }\n};\n\n// Number\n\n/**\n * @param  {Number|String} str\n * @return {Number}\n */\nconst parseNumber = str => isStr(str) ?\n  parseFloat(/** @type {String} */(str)) :\n  /** @type {Number} */(str);\n\n// Math\n\nconst pow = Math.pow;\nconst sqrt = Math.sqrt;\nconst sin = Math.sin;\nconst cos = Math.cos;\nconst abs = Math.abs;\nconst exp = Math.exp;\nconst ceil = Math.ceil;\nconst floor = Math.floor;\nconst asin = Math.asin;\nconst max = Math.max;\nconst atan2 = Math.atan2;\nconst PI = Math.PI;\nconst _round = Math.round;\n\n/**\n * Clamps a value between min and max bounds\n *\n * @param  {Number} v - Value to clamp\n * @param  {Number} min - Minimum boundary\n * @param  {Number} max - Maximum boundary\n * @return {Number}\n */\nconst clamp = (v, min, max) => v < min ? min : v > max ? max : v;\n\n/**\n * Rounds a number to specified decimal places\n *\n * @param  {Number} v - Value to round\n * @param  {Number} decimalLength - Number of decimal places\n * @return {Number}\n */\n const round = (v, decimalLength) => {\n   if (decimalLength < 0) return v;\n   if (!decimalLength) return _round(v);\n   const p = 10 ** decimalLength;\n   return _round(v * p) / p;\n };\n\n/**\n * Snaps a value to nearest increment or array value\n *\n * @param  {Number} v - Value to snap\n * @param  {Number|Array<Number>} increment - Step size or array of snap points\n * @return {Number}\n */\nconst snap = (v, increment) => isArr(increment) ? increment.reduce((closest, cv) => (abs(cv - v) < abs(closest - v) ? cv : closest)) : increment ? _round(v / increment) * increment : v;\n\n/**\n * Linear interpolation between two values\n *\n * @param  {Number} start - Starting value\n * @param  {Number} end - Ending value\n * @param  {Number} factor - Interpolation factor in the range [0, 1]\n * @return {Number} The interpolated value\n */\nconst lerp = (start, end, factor) => factor === 1 ? end : factor === 0 ? start : start + (end - start) * factor;\n\n/**\n * Replaces infinity with maximum safe value\n *\n * @param  {Number} v - Value to check\n * @return {Number}\n */\nconst clampInfinity = v => v === Infinity ? maxValue : v === -Infinity ? -maxValue : v;\n\n/**\n * Normalizes time value with minimum threshold\n *\n * @param  {Number} v - Time value to normalize\n * @return {Number}\n */\nconst normalizeTime = v => v <= minValue ? minValue : clampInfinity(round(v, 11));\n\n// Arrays\n\n/**\n * @template T\n * @param    {T[]} a\n * @return   {T[]}\n */\nconst cloneArray = a => isArr(a) ? [ ...a ] : a;\n\n// Objects\n\n/**\n * @template T\n * @template U\n * @param    {T} o1\n * @param    {U} o2\n * @return   {T & U}\n */\nconst mergeObjects = (o1, o2) => {\n  const merged = /** @type {T & U} */({ ...o1 });\n  for (let p in o2) {\n    const o1p = /** @type {T & U} */(o1)[p];\n    merged[p] = isUnd(o1p) ? /** @type {T & U} */(o2)[p] : o1p;\n  }  return merged;\n};\n\n// Linked lists\n\n/**\n * @param  {Object} parent\n * @param  {Function} callback\n * @param  {Boolean} [reverse]\n * @param  {String} [prevProp]\n * @param  {String} [nextProp]\n * @return {void}\n */\nconst forEachChildren = (parent, callback, reverse, prevProp = '_prev', nextProp = '_next') => {\n  let next = parent._head;\n  let adjustedNextProp = nextProp;\n  if (reverse) {\n    next = parent._tail;\n    adjustedNextProp = prevProp;\n  }\n  while (next) {\n    const currentNext = next[adjustedNextProp];\n    callback(next);\n    next = currentNext;\n  }\n};\n\n/**\n * @param  {Object} parent\n * @param  {Object} child\n * @param  {String} [prevProp]\n * @param  {String} [nextProp]\n * @return {void}\n */\nconst removeChild = (parent, child, prevProp = '_prev', nextProp = '_next') => {\n  const prev = child[prevProp];\n  const next = child[nextProp];\n  prev ? prev[nextProp] = next : parent._head = next;\n  next ? next[prevProp] = prev : parent._tail = prev;\n  child[prevProp] = null;\n  child[nextProp] = null;\n};\n\n/**\n * @param  {Object} parent\n * @param  {Object} child\n * @param  {Function} [sortMethod]\n * @param  {String} prevProp\n * @param  {String} nextProp\n * @return {void}\n */\nconst addChild = (parent, child, sortMethod, prevProp = '_prev', nextProp = '_next') => {\n  let prev = parent._tail;\n  while (prev && sortMethod && sortMethod(prev, child)) prev = prev[prevProp];\n  const next = prev ? prev[nextProp] : parent._head;\n  prev ? prev[nextProp] = child : parent._head = child;\n  next ? next[prevProp] = child : parent._tail = child;\n  child[prevProp] = prev;\n  child[nextProp] = next;\n};\n\nexport { PI, _round, abs, addChild, asin, atan2, ceil, clamp, clampInfinity, cloneArray, cos, exp, floor, forEachChildren, isArr, isCol, isFnc, isHex, isHsl, isKey, isNil, isNum, isObj, isRgb, isStr, isSvg, isUnd, isValidSVGAttribute, lerp, max, mergeObjects, normalizeTime, now, parseNumber, pow, removeChild, round, sin, snap, sqrt, stringStartsWith, toLowerCase };\n", "/**\n * Anime.js - core - ESM\n * @version v4.5.0\n * @license MIT\n * @copyright 2026 - Julian Garnier\n */\n\nimport { transformsFragmentStrings, emptyString, validTransforms, transformsSymbol } from './consts.js';\nimport { isUnd, stringStartsWith } from './helpers.js';\n\n/**\n* @import {\n*   DOMTarget,\n* } from '../types/index.js'\n*/\n\n/**\n * @param  {DOMTarget} target\n * @param  {String} propName\n * @param  {Object} animationInlineStyles\n * @return {String}\n */\nconst parseInlineTransforms = (target, propName, animationInlineStyles) => {\n  const inlineTransforms = target.style.transform;\n  if (inlineTransforms) {\n    const cachedTransforms = target[transformsSymbol];\n    let pos = 0;\n    const len = inlineTransforms.length;\n    let fullTranslateValue;\n    while (pos < len) {\n      // Skip whitespace\n      while (pos < len && inlineTransforms.charCodeAt(pos) === 32) pos++;\n      if (pos >= len) break;\n      // Read function name\n      const nameStart = pos;\n      while (pos < len && inlineTransforms.charCodeAt(pos) !== 40) pos++;\n      if (pos >= len) break;\n      const name = inlineTransforms.substring(nameStart, pos);\n      // Scan to closing paren, recording top-level comma positions\n      let depth = 1;\n      const valueStart = pos + 1;\n      let c1 = -1, c2 = -1;\n      pos++;\n      while (pos < len && depth > 0) {\n        const c = inlineTransforms.charCodeAt(pos);\n        if (c === 40) depth++;\n        else if (c === 41) depth--;\n        else if (c === 44 && depth === 1) {\n          if (c1 === -1) c1 = pos;\n          else if (c2 === -1) c2 = pos;\n        }\n        pos++;\n      }\n      const valueEnd = pos - 1;\n      // Decompose multi-arg functions into individual axis properties\n      if (name === 'translate' || name === 'translate3d') {\n        if (c1 === -1) {\n          cachedTransforms.translateX = inlineTransforms.substring(valueStart, valueEnd).trim();\n        } else {\n          cachedTransforms.translateX = inlineTransforms.substring(valueStart, c1).trim();\n          if (c2 === -1) {\n            cachedTransforms.translateY = inlineTransforms.substring(c1 + 1, valueEnd).trim();\n          } else {\n            cachedTransforms.translateY = inlineTransforms.substring(c1 + 1, c2).trim();\n            cachedTransforms.translateZ = inlineTransforms.substring(c2 + 1, valueEnd).trim();\n          }\n        }\n        fullTranslateValue = inlineTransforms.substring(valueStart, valueEnd);\n      } else if (name === 'scale' || name === 'scale3d') {\n        if (c1 === -1) {\n          cachedTransforms.scale = inlineTransforms.substring(valueStart, valueEnd).trim();\n        } else {\n          cachedTransforms.scaleX = inlineTransforms.substring(valueStart, c1).trim();\n          if (c2 === -1) {\n            cachedTransforms.scaleY = inlineTransforms.substring(c1 + 1, valueEnd).trim();\n          } else {\n            cachedTransforms.scaleY = inlineTransforms.substring(c1 + 1, c2).trim();\n            cachedTransforms.scaleZ = inlineTransforms.substring(c2 + 1, valueEnd).trim();\n          }\n        }\n      } else {\n        cachedTransforms[name] = inlineTransforms.substring(valueStart, valueEnd);\n      }\n    }\n    // Resolve the requested property from the cache\n    if (propName === 'translate3d' && fullTranslateValue) {\n      if (animationInlineStyles) animationInlineStyles[propName] = fullTranslateValue;\n      return fullTranslateValue;\n    }\n    const cached = cachedTransforms[propName];\n    if (!isUnd(cached)) {\n      if (animationInlineStyles) animationInlineStyles[propName] = cached;\n      return cached;\n    }\n  }\n  return propName === 'translate3d' ? '0px, 0px, 0px' :\n    propName === 'rotate3d' ? '0, 0, 0, 0deg' :\n    stringStartsWith(propName, 'scale') ? '1' :\n    stringStartsWith(propName, 'rotate') || stringStartsWith(propName, 'skew') ? '0deg' : '0px';\n};\n\n/**\n * Builds a CSS transform string from the target's cached transform properties.\n * Iterates validTransforms in order (perspective > translate > rotate > scale > skew > matrix).\n * When adjacent axis properties are all present, emits a shorter shorthand (translateX + translateY -> translate(x, y))\n * The index is advanced past consumed properties so they are not emitted twice.\n * Properties without a grouping partner (e.g. translateY alone, scaleZ alone) emit individually.\n *\n * @param  {Record<String, String>} props\n * @return {String}\n */\nconst buildTransformString = (props) => {\n  let str = emptyString;\n  for (let i = 0, l = validTransforms.length; i < l; i++) {\n    const key = validTransforms[i];\n    const val = props[key];\n    if (val !== undefined) {\n      // Group translateX with adjacent translateY / translateZ\n      if (key === 'translateX') {\n        const next = props.translateY;\n        if (next !== undefined) {\n          const next2 = props.translateZ;\n          if (next2 !== undefined) {\n            str += `translate3d(${val},${next},${next2}) `;\n            i += 2;\n          } else {\n            str += `translate(${val},${next}) `;\n            i += 1;\n          }\n          continue;\n        }\n      }\n      // Group scaleX with adjacent scaleY / scaleZ (only when standalone scale is absent)\n      if (key === 'scaleX' && props.scale === undefined) {\n        const next = props.scaleY;\n        if (next !== undefined) {\n          const next2 = props.scaleZ;\n          if (next2 !== undefined) {\n            str += `scale3d(${val},${next},${next2}) `;\n            i += 2;\n          } else {\n            str += `scale(${val},${next}) `;\n            i += 1;\n          }\n          continue;\n        }\n      }\n      // All other properties: emit individually using pre-built fragment string\n      str += `${transformsFragmentStrings[key]}${val}) `;\n    }\n    // Preserve non-animatable rotate3d in correct position (after rotateZ, before scale)\n    if (key === 'rotateZ') {\n      if (props.rotate3d !== undefined) str += `rotate3d(${props.rotate3d}) `;\n    }\n  }\n  // Preserve non-animatable matrix/matrix3d from inline styles\n  if (props.matrix !== undefined) str += `matrix(${props.matrix}) `;\n  if (props.matrix3d !== undefined) str += `matrix3d(${props.matrix3d}) `;\n  return str;\n};\n\nexport { buildTransformString, parseInlineTransforms };\n", "/**\n * Anime.js - adapters - ESM\n * @version v4.5.0\n * @license MIT\n * @copyright 2026 - Julian Garnier\n */\n\n/**\n * Anime.js adapter API. Each library or class group that wants to extend `animate()` and `utils.set()` calls `registerAdapter()` to create its own `Adapter`. The returned `Adapter` exposes `registerTargetAdapter(detect)` for per-class detection and `registerPropertyResolver(fn)` for global Color / Vector / pattern-based fallbacks.\n *\n *   import { registerAdapter } from 'animejs/adapters';\n *\n *   const myAdapter = registerAdapter();\n *   const widget = myAdapter.registerTargetAdapter((t) => t instanceof MyWidget);\n *   widget.registerProperty('value',\n *     (t) => t.getValue(),\n *     (target, value) => target.setValue(value),\n *   );\n *\n * For scalar tweens, `value` is the interpolated number. For color and complex tweens it is `undefined`; read `tween._numbers` instead. `gate(target)` scopes the prop to a subset of matching targets.\n *\n * Resolution order: every Adapter's target adapters in registration order (first match wins) then every Adapter's property resolvers (first non-null wins) then engine direct property path.\n */\n\n/**\n * @typedef TargetAdapterEntry\n * @property {(t: any) => any} get\n * @property {(target: any, value: number, tween: any) => void} set\n * @property {(t: any) => boolean} [gate]\n */\n\nconst alwaysTrue = () => true;\n\nclass TargetAdapter {\n  /**\n   * @param {(t: any) => boolean} detect\n   */\n  constructor(detect) {\n    this.detect = detect;\n    /** @type {Record<string, TargetAdapterEntry>} */\n    this.props = {};\n  }\n\n  /**\n   * Registers a property the adapter handles. `setter` receives `(target, value, tween)`. For color and complex tweens `value` is `undefined`, read `tween._numbers` instead. `gate(target)` scopes the prop to a subset of matching targets.\n   *\n   * @param {string} name\n   * @param {(t: any) => any} getter\n   * @param {(target: any, value: number, tween: any) => void} setter\n   * @param {(t: any) => boolean} [gate]\n   */\n  registerProperty(name, getter, setter, gate) {\n    this.props[name] = {\n      get: getter,\n      set: setter,\n      gate: gate || alwaysTrue,\n    };\n  }\n}\n\nclass Adapter {\n  /**\n   * @param {((t: any) => boolean) | null} [detect]\n   *   Optional gate. When provided, every lookup against this Adapter's target adapters and resolvers is skipped if `detect(target)` returns falsy. Lets the Adapter as a whole short-circuit on unrelated targets.\n   */\n  constructor(detect) {\n    /** @type {((t: any) => boolean) | null} */\n    this.detect = detect || null;\n    /** @type {TargetAdapter[]} */\n    this.targetAdapters = [];\n    /** @type {((target: any, name: string) => TargetAdapterEntry | null)[]} */\n    this.propertyResolvers = [];\n  }\n\n  /**\n   * Creates and registers a `TargetAdapter` scoped to this Adapter.\n   *\n   * @param {(t: any) => boolean} detect\n   * @return {TargetAdapter}\n   */\n  registerTargetAdapter(detect) {\n    const ta = new TargetAdapter(detect);\n    this.targetAdapters.push(ta);\n    return ta;\n  }\n\n  /**\n   * Registers a property resolver scoped to this Adapter. Resolvers are functions invoked at tween creation when no target adapter has claimed the name; the function returns an entry for names it handles or `null` to defer. Use for runtime-matched patterns (Color / Vector axis detection, name-prefix conventions, etc.).\n   *\n   * @param {(target: any, name: string) => TargetAdapterEntry | null} resolver\n   */\n  registerPropertyResolver(resolver) {\n    if (this.propertyResolvers.indexOf(resolver) === -1) this.propertyResolvers.push(resolver);\n  }\n}\n\nconst adapters = /** @type {Adapter[]} */([]);\n\n/**\n * Creates and registers an Adapter. Each library extending `animate()` calls this once and uses the returned Adapter to wire up its target adapters and property resolvers. The optional `detect` short-circuits all lookups against the Adapter when the target is unrelated.\n *\n * @param {(t: any) => boolean} [detect]\n * @return {Adapter}\n */\nfunction registerAdapter(detect) {\n  const a = new Adapter(detect);\n  adapters.push(a);\n  return a;\n}\n\n/**\n * Internal resolution. Tries every Adapter's target adapters first (in registration order, first match wins), then every Adapter's property resolvers.\n *\n * @param {any} target\n * @param {string} name\n * @return {TargetAdapterEntry | null}\n */\nfunction resolveAdapterEntry(target, name) {\n  if (!target) return null;\n  const al = adapters.length;\n  outer: for (let i = 0; i < al; i++) {\n    const a = adapters[i];\n    if (a.detect && !a.detect(target)) continue;\n    const tas = a.targetAdapters;\n    for (let j = 0, m = tas.length; j < m; j++) {\n      const ta = tas[j];\n      if (ta.detect(target)) {\n        const entry = ta.props[name];\n        if (entry && (!entry.gate || entry.gate(target))) return entry;\n        break outer;\n      }\n    }\n  }\n  for (let i = 0; i < al; i++) {\n    const a = adapters[i];\n    if (a.detect && !a.detect(target)) continue;\n    const rs = a.propertyResolvers;\n    for (let j = 0, m = rs.length; j < m; j++) {\n      const entry = rs[j](target, name);\n      if (entry) return entry;\n    }\n  }\n  return null;\n}\n\nexport { registerAdapter, resolveAdapterEntry };\n", "/**\n * Anime.js - core - ESM\n * @version v4.5.0\n * @license MIT\n * @copyright 2026 - Julian Garnier\n */\n\nimport { rgbExecRgx, rgbaExecRgx, hslExecRgx, hslaExecRgx } from './consts.js';\nimport { isRgb, isHex, isHsl, isUnd, round } from './helpers.js';\n\n/**\n * @import {\n *   ColorArray,\n * } from '../types/index.js'\n*/\n\n/**\n * RGB / RGBA Color value string -> RGBA values array\n * @param  {String} rgbValue\n * @return {ColorArray}\n */\nconst rgbToRgba = rgbValue => {\n  const rgba = rgbExecRgx.exec(rgbValue) || rgbaExecRgx.exec(rgbValue);\n  const a = !isUnd(rgba[4]) ? +rgba[4] : 1;\n  return [\n    +rgba[1],\n    +rgba[2],\n    +rgba[3],\n    a\n  ]\n};\n\n/**\n * HEX3 / HEX3A / HEX6 / HEX6A Color value string -> RGBA values array\n * @param  {String} hexValue\n * @return {ColorArray}\n */\nconst hexToRgba = hexValue => {\n  const hexLength = hexValue.length;\n  const isShort = hexLength === 4 || hexLength === 5;\n  return [\n    +('0x' + hexValue[1] + hexValue[isShort ? 1 : 2]),\n    +('0x' + hexValue[isShort ? 2 : 3] + hexValue[isShort ? 2 : 4]),\n    +('0x' + hexValue[isShort ? 3 : 5] + hexValue[isShort ? 3 : 6]),\n    ((hexLength === 5 || hexLength === 9) ? +(+('0x' + hexValue[isShort ? 4 : 7] + hexValue[isShort ? 4 : 8]) / 255).toFixed(3) : 1)\n  ]\n};\n\n/**\n * @param  {Number} p\n * @param  {Number} q\n * @param  {Number} t\n * @return {Number}\n */\nconst hue2rgb = (p, q, t) => {\n  if (t < 0) t += 1;\n  if (t > 1) t -= 1;\n  return t < 1 / 6 ? p + (q - p) * 6 * t :\n         t < 1 / 2 ? q :\n         t < 2 / 3 ? p + (q - p) * (2 / 3 - t) * 6 :\n         p;\n};\n\n/**\n * HSL / HSLA Color value string -> RGBA values array\n * @param  {String} hslValue\n * @return {ColorArray}\n */\nconst hslToRgba = hslValue => {\n  const hsla = hslExecRgx.exec(hslValue) || hslaExecRgx.exec(hslValue);\n  const h = +hsla[1] / 360;\n  const s = +hsla[2] / 100;\n  const l = +hsla[3] / 100;\n  const a = !isUnd(hsla[4]) ? +hsla[4] : 1;\n  let r, g, b;\n  if (s === 0) {\n    r = g = b = l;\n  } else {\n    const q = l < .5 ? l * (1 + s) : l + s - l * s;\n    const p = 2 * l - q;\n    r = round(hue2rgb(p, q, h + 1 / 3) * 255, 0);\n    g = round(hue2rgb(p, q, h) * 255, 0);\n    b = round(hue2rgb(p, q, h - 1 / 3) * 255, 0);\n  }\n  return [r, g, b, a];\n};\n\n/**\n * All in one color converter that converts a color string value into an array of RGBA values\n * @param  {String} colorString\n * @return {ColorArray}\n */\nconst convertColorStringValuesToRgbaArray = colorString => {\n  return isRgb(colorString) ? rgbToRgba(colorString) :\n         isHex(colorString) ? hexToRgba(colorString) :\n         isHsl(colorString) ? hslToRgba(colorString) :\n         [0, 0, 0, 1];\n};\n\nexport { convertColorStringValuesToRgbaArray };\n", "/**\n * Anime.js - core - ESM\n * @version v4.5.0\n * @license MIT\n * @copyright 2026 - Julian Garnier\n */\n\nimport { valueTypes, unitsExecRgx, digitWithExponentRgx, tweenTypes, isDomSymbol, isSvgSymbol, validTransforms, shortTransforms, proxyTargetSymbol, cssVariableMatchRgx, emptyString, cssVarPrefix } from './consts.js';\nimport { isUnd, isCol, isValidSVGAttribute, stringStartsWith, isFnc, isStr, round, lerp, cloneArray } from './helpers.js';\nimport { parseInlineTransforms } from './transforms.js';\nimport { resolveAdapterEntry } from '../adapters/registry.js';\nimport { convertColorStringValuesToRgbaArray } from './colors.js';\n\n/**\n* @import {\n*   Target,\n*   DOMTarget,\n*   Tween,\n*   TweenPropValue,\n*   TweenDecomposedValue,\n*   TargetsArray,\n* } from '../types/index.js'\n*/\n\n/**\n * @template T, D\n * @param {T|undefined} targetValue\n * @param {D} defaultValue\n * @return {T|D}\n */\nconst setValue = (targetValue, defaultValue) => {\n  return isUnd(targetValue) ? defaultValue : targetValue;\n};\n\n/**\n * Resolve against the target when it's a DOM element, otherwise fall back to :root so non-DOM targets like three.js meshes and custom adapters still pick up CSS variables defined on the document.\n *\n * @param  {String} value\n * @param  {Target} target\n * @return {String|Number}\n */\nconst resolveCssVar = (value, target) => {\n  const match = value.match(cssVariableMatchRgx);\n  const el = target[isDomSymbol] ? target : document.documentElement;\n  let computed = getComputedStyle(/** @type {HTMLElement} */(el))?.getPropertyValue(match[1]);\n  if ((!computed || computed.trim() === emptyString) && match[2]) computed = match[2].trim();\n  return computed || 0;\n};\n\n/**\n * @param  {TweenPropValue} value\n * @param  {Target} target\n * @param  {Number} index\n * @param  {TargetsArray} targets\n * @param  {Object|null} store\n * @param  {Tween|null} prevTween\n * @return {any}\n */\nconst getFunctionValue = (value, target, index, targets, store, prevTween) => {\n  if (isFnc(value)) {\n    if (!store) {\n      const computed = /** @type {Function} */(value)(target, index, targets, prevTween);\n      // Fallback to 0 if the function returns undefined, NaN, null, false or 0\n      return !isNaN(+computed) ? +computed : computed || 0;\n    }\n    const func = () => {\n      const computed = /** @type {Function} */(value)(target, index, targets, prevTween);\n      return !isNaN(+computed) ? +computed : computed || 0;\n    };\n    store.func = func;\n    return func();\n  }\n  if (isStr(value) && stringStartsWith(value, cssVarPrefix)) {\n    if (!store) return resolveCssVar(/** @type {String} */(value), target);\n    const func = () => resolveCssVar(/** @type {String} */(value), target);\n    store.func = func;\n    return func();\n  }\n  return value;\n};\n\n/**\n * @param  {Target} target\n * @param  {String} prop\n * @return {tweenTypes}\n */\nconst getTweenType = (target, prop) => {\n  return !target[isDomSymbol] ? tweenTypes.OBJECT :\n    // Handle SVG attributes\n    target[isSvgSymbol] && isValidSVGAttribute(target, prop) ? tweenTypes.ATTRIBUTE :\n    // Handle CSS Transform properties differently than CSS to allow individual animations\n    validTransforms.includes(prop) || shortTransforms.get(prop) ? tweenTypes.TRANSFORM :\n    // CSS variables\n    stringStartsWith(prop, '--') ? tweenTypes.CSS_VAR :\n    // All other CSS properties\n    prop in /** @type {DOMTarget} */(target).style ? tweenTypes.CSS :\n    // Handle other DOM Attributes\n    prop in target ? tweenTypes.OBJECT :\n    tweenTypes.ATTRIBUTE;\n};\n\n/**\n * @param  {DOMTarget} target\n * @param  {String} propName\n * @param  {Object} animationInlineStyles\n * @return {String}\n */\nconst getCSSValue = (target, propName, animationInlineStyles) => {\n  const inlineStyles = target.style[propName];\n  if (inlineStyles && animationInlineStyles) {\n    animationInlineStyles[propName] = inlineStyles;\n  }\n  const value = inlineStyles || getComputedStyle(target[proxyTargetSymbol] || target).getPropertyValue(propName);\n  return value === 'auto' ? '0' : value;\n};\n\n/**\n * @param {Target} target\n * @param {String} propName\n * @param {tweenTypes} [tweenType]\n * @param {Object|void} [animationInlineStyles]\n * @return {String|Number}\n */\nconst getOriginalAnimatableValue = (target, propName, tweenType, animationInlineStyles) => {\n  const type = !isUnd(tweenType) ? tweenType : getTweenType(target, propName);\n  const adapterProp = resolveAdapterEntry(target, propName);\n  if (adapterProp) {\n    const value = adapterProp.get(target);\n    if (value && animationInlineStyles) animationInlineStyles[propName] = value;\n    return value == null ? 0 : value;\n  }\n  if (type === tweenTypes.OBJECT) {\n    const value = target[propName];\n    if (value && animationInlineStyles) animationInlineStyles[propName] = value;\n    return value || 0;\n  }\n  if (type === tweenTypes.ATTRIBUTE) {\n    const value = /** @type {DOMTarget} */(target).getAttribute(propName);\n    if (value && animationInlineStyles) animationInlineStyles[propName] = value;\n    return value;\n  }\n  return type === tweenTypes.TRANSFORM ? parseInlineTransforms(/** @type {DOMTarget} */(target), propName, animationInlineStyles) :\n         type === tweenTypes.CSS_VAR ? getCSSValue(/** @type {DOMTarget} */(target), propName, animationInlineStyles).trimStart() :\n         getCSSValue(/** @type {DOMTarget} */(target), propName, animationInlineStyles);\n};\n\n/**\n * @param  {Number} x\n * @param  {Number} y\n * @param  {String} operator\n * @return {Number}\n */\nconst getRelativeValue = (x, y, operator) => {\n  return operator === '-' ? x - y :\n         operator === '+' ? x + y :\n         x * y;\n};\n\n/** @return {TweenDecomposedValue} */\nconst createDecomposedValueTargetObject = () => {\n  return {\n    /** @type {valueTypes} */\n    t: valueTypes.NUMBER,\n    n: 0,\n    u: null,\n    o: null,\n    d: null,\n    s: null,\n  }\n};\n\n/**\n * @param  {String|Number|Object} rawValue\n * @param  {TweenDecomposedValue} targetObject\n * @return {TweenDecomposedValue}\n */\nconst decomposeRawValue = (rawValue, targetObject) => {\n  /** @type {valueTypes} */\n  targetObject.t = valueTypes.NUMBER;\n  targetObject.n = 0;\n  targetObject.u = null;\n  targetObject.o = null;\n  targetObject.d = null;\n  targetObject.s = null;\n  if (!rawValue) return targetObject;\n  const num = +rawValue;\n  if (!isNaN(num)) {\n    // It's a number\n    targetObject.n = num;\n    return targetObject;\n  }\n  // let str = /** @type {String} */(rawValue).trim();\n  let str = /** @type {String} */(rawValue);\n  // Parsing operators (+=, -=, *=) manually is much faster than using regex here\n  if (str[1] === '=') {\n    targetObject.o = str[0];\n    str = str.slice(2);\n  }\n  // Skip exec regex if the value type is complex or color to avoid long regex backtracking\n  const unitMatch = str.includes(' ') ? false : unitsExecRgx.exec(str);\n  if (unitMatch) {\n    // Has a number and a unit\n    targetObject.t = valueTypes.UNIT;\n    targetObject.n = +unitMatch[1];\n    targetObject.u = unitMatch[2];\n    return targetObject;\n  } else if (targetObject.o) {\n    // Has an operator (+=, -=, *=)\n    targetObject.n = +str;\n    return targetObject;\n  } else if (isCol(str)) {\n    // Color string\n    targetObject.t = valueTypes.COLOR;\n    targetObject.d = convertColorStringValuesToRgbaArray(str);\n    return targetObject;\n  } else {\n    // Is a more complex string (generally svg coords, calc() or filters CSS values)\n    const matchedNumbers = str.match(digitWithExponentRgx);\n    targetObject.t = valueTypes.COMPLEX;\n    targetObject.d = matchedNumbers ? matchedNumbers.map(Number) : [];\n    targetObject.s = str.split(digitWithExponentRgx) || [];\n    return targetObject;\n  }\n};\n\n/**\n * @param  {Tween} tween\n * @param  {TweenDecomposedValue} targetObject\n * @return {TweenDecomposedValue}\n */\nconst decomposeTweenValue = (tween, targetObject) => {\n  targetObject.t = tween._valueType;\n  targetObject.n = tween._toNumber;\n  targetObject.u = tween._unit;\n  targetObject.o = null;\n  targetObject.d = cloneArray(tween._toNumbers);\n  targetObject.s = cloneArray(tween._strings);\n  return targetObject;\n};\n\nconst decomposedOriginalValue = createDecomposedValueTargetObject();\n\n/**\n * @param  {Tween} tween\n * @param  {Number} progress\n * @param  {Number} precision\n * @return {String}\n */\nconst composeComplexValue = (tween, progress, precision) => {\n  const mod = tween._modifier;\n  const fn = tween._fromNumbers;\n  const tn = tween._toNumbers;\n  const ts = tween._strings;\n  let v = ts[0];\n  for (let j = 0, l = tn.length; j < l; j++) {\n    const n = /** @type {Number} */(mod(round(lerp(fn[j], tn[j], progress), precision)));\n    const s = ts[j + 1];\n    v += `${s ? n + s : n}`;\n    // Keep _numbers fresh for every tween, not only composed ones, so a non-composition setter that reads the lerped triplet such as three transformOrigin still animates.\n    // Potential optimization, skip the write when nothing reads it: if (hasComposition || tween._setter) tween._numbers[j] = n;\n    tween._numbers[j] = n;\n  }\n  return v;\n};\n\nexport { composeComplexValue, createDecomposedValueTargetObject, decomposeRawValue, decomposeTweenValue, decomposedOriginalValue, getFunctionValue, getOriginalAnimatableValue, getRelativeValue, getTweenType, setValue };\n", "/**\n * Anime.js - core - ESM\n * @version v4.5.0\n * @license MIT\n * @copyright 2026 - Julian Garnier\n */\n\nimport { globals } from './globals.js';\nimport { minValue, tickModes, valueTypes, compositionTypes, tweenTypes, transformsSymbol } from './consts.js';\nimport { forEachChildren, round, now, clamp, lerp } from './helpers.js';\nimport { buildTransformString } from './transforms.js';\nimport { composeComplexValue } from './values.js';\n\n/**\n * @import {\n *   Tickable,\n *   Renderable,\n *   CallbackArgument,\n *   Tween,\n *   DOMTarget,\n * } from '../types/index.js'\n*/\n\n/**\n * @import {\n *   JSAnimation,\n * } from '../animation/animation.js'\n*/\n\n/**\n * @import {\n *   Timeline,\n * } from '../timeline/timeline.js'\n*/\n\n/**\n * @param  {Tickable} tickable\n * @param  {Number} time\n * @param  {Number} muteCallbacks\n * @param  {Number} internalRender\n * @param  {tickModes} tickMode\n * @return {Number}\n */\nconst render = (tickable, time, muteCallbacks, internalRender, tickMode) => {\n\n  const parent = tickable.parent;\n  const duration = tickable.duration;\n  const completed = tickable.completed;\n  const iterationDuration = tickable.iterationDuration;\n  const iterationCount = tickable.iterationCount;\n  const _currentIteration = tickable._currentIteration;\n  const _loopDelay = tickable._loopDelay;\n  const _reversed = tickable._reversed;\n  const _alternate = tickable._alternate;\n  const _hasChildren = tickable._hasChildren;\n  const tickableDelay = tickable._delay;\n  const tickablePrevAbsoluteTime = tickable._currentTime; // TODO: rename ._currentTime to ._absoluteCurrentTime\n  const tickableEndTime = tickableDelay + iterationDuration;\n  const tickableAbsoluteTime = time - tickableDelay;\n  const tickablePrevTime = clamp(tickablePrevAbsoluteTime, -tickableDelay, duration);\n  const tickableCurrentTime = clamp(tickableAbsoluteTime, -tickableDelay, duration);\n  const deltaTime = tickableAbsoluteTime - tickablePrevAbsoluteTime;\n  const isCurrentTimeAboveZero = tickableCurrentTime > 0;\n  const isCurrentTimeEqualOrAboveDuration = tickableCurrentTime >= duration;\n  const isSetter = duration <= minValue;\n  const forcedTick = tickMode === tickModes.FORCE;\n\n  let isOdd = 0;\n  let iterationElapsedTime = tickableAbsoluteTime;\n  // Render checks\n  // Used to also check if the children have rendered in order to trigger the onRender callback on the parent timer\n  let hasRendered = 0;\n\n  // Execute the \"expensive\" iterations calculations only when necessary\n  if (iterationCount > 1) {\n    // bitwise NOT operator seems to be generally faster than Math.floor() across browsers\n    const period = iterationDuration + (isCurrentTimeEqualOrAboveDuration ? 0 : _loopDelay);\n    const currentIteration = ~~(tickableCurrentTime / period);\n    tickable._currentIteration = clamp(currentIteration, 0, iterationCount);\n    // Prevent the iteration count to go above the max iterations when reaching the end of the animation\n    if (isCurrentTimeEqualOrAboveDuration) tickable._currentIteration--;\n    isOdd = tickable._currentIteration % 2;\n    // Derive elapsed from the same `~~` truncation that gave currentIteration. Using `% period` here can disagree with `~~(/period)` under float drift at iteration boundaries and write the wrong end of the tween for one frame.\n    iterationElapsedTime = tickableCurrentTime - currentIteration * period || 0;\n  }\n\n  // Checks if exactly one of _reversed and (_alternate && isOdd) is true\n  const isReversed = _reversed ^ (_alternate && isOdd);\n  const _ease = /** @type {Renderable} */(tickable)._ease;\n  let iterationTime = isCurrentTimeEqualOrAboveDuration ? isReversed ? 0 : duration : isReversed ? iterationDuration - iterationElapsedTime : iterationElapsedTime;\n  if (_ease) iterationTime = iterationDuration * _ease(iterationTime / iterationDuration) || 0;\n  const isRunningBackwards = (parent ? parent.backwards : tickableAbsoluteTime < tickablePrevAbsoluteTime) ? !isReversed : !!isReversed;\n\n  tickable._currentTime = tickableAbsoluteTime;\n  tickable._iterationTime = iterationTime;\n  tickable.backwards = isRunningBackwards;\n\n  if (isCurrentTimeAboveZero && !tickable.began) {\n    tickable.began = true;\n    if (!muteCallbacks && !(parent && (isRunningBackwards || !parent.began))) {\n      tickable.onBegin(/** @type {CallbackArgument} */(tickable));\n    }\n  } else if (tickableAbsoluteTime <= 0) {\n    tickable.began = false;\n  }\n\n  // Only triggers onLoop for tickable without children, otherwise call the the onLoop callback in the tick function\n  // Make sure to trigger the onLoop before rendering to allow .refresh() to pickup the current values\n  if (!muteCallbacks && !_hasChildren && isCurrentTimeAboveZero && tickable._currentIteration !== _currentIteration) {\n    tickable.onLoop(/** @type {CallbackArgument} */(tickable));\n  }\n\n  if (\n    forcedTick ||\n    tickMode === tickModes.AUTO && (\n      // Timeline children render from their offset instead of their delay so the gap left by a truncated sibling is covered on seek.\n      time >= (parent && tickableDelay > 0 ? 0 : tickableDelay) && time <= tickableEndTime || // Normal render\n      time <= tickableDelay && tickablePrevTime > tickableDelay || // Playhead is before the animation start time so make sure the animation is at its initial state\n      time >= tickableEndTime && tickablePrevTime !== duration // Playhead is after the animation end time so make sure the animation is at its end state\n    ) ||\n    iterationTime >= tickableEndTime && tickablePrevTime !== duration ||\n    // iterationTime is per-iteration, compared to the delay to catch a backward seek into a looped iteration's delay region. Exclude the final settled end, where iterationTime clamps to duration and would falsely match the delay region when the delay exceeds the duration.\n    iterationTime <= tickableDelay && tickablePrevTime > 0 && !isCurrentTimeEqualOrAboveDuration ||\n    time <= tickablePrevTime && tickablePrevTime === duration && completed || // Force a render if a seek occurs on an completed animation\n    isCurrentTimeEqualOrAboveDuration && !completed && isSetter // This prevents 0 duration tickables to be skipped\n  ) {\n\n    if (isCurrentTimeAboveZero) {\n      // Trigger onUpdate callback before rendering\n      tickable.computeDeltaTime(tickablePrevTime);\n      if (!muteCallbacks) tickable.onBeforeUpdate(/** @type {CallbackArgument} */(tickable));\n    }\n\n    // Start tweens rendering\n    if (!_hasChildren) {\n\n      // Time has jumped more than globals.tickThreshold so consider this tick manual\n      const forcedRender = forcedTick || (isRunningBackwards ? deltaTime * -1 : deltaTime) >= globals.tickThreshold;\n      // Round to match the precision of tween._absoluteStartTime so equal-time boundary checks compare cleanly without floating point drift from the unrounded _offset.\n      const absoluteTime = round(tickable._offset + (parent ? parent._offset : 0) + tickableDelay + iterationTime, 12);\n\n      // Only Animation can have tweens, Timer returns undefined\n      let tween = /** @type {Tween} */(/** @type {JSAnimation} */(tickable)._head);\n      let tweenTarget;\n      let tweenStyle;\n      let tweenTargetTransforms;\n      let tweenTargetTransformsProperties;\n      let tweenTransformsNeedUpdate = 0;\n\n      while (tween) {\n\n        const tweenComposition = tween._composition;\n        const tweenCurrentTime = tween._currentTime;\n        const tweenChangeDuration = tween._changeDuration;\n        const tweenAbsEndTime = tween._absoluteStartTime + tween._changeDuration;\n        const tweenNextRep = tween._nextRep;\n        const tweenPrevRep = tween._prevRep;\n        const tweenHasComposition = tweenComposition !== compositionTypes.none;\n        // The previous sibling stops writing at its truncated end, so this tween takes over the hold from that point.\n        const tweenPrevRepEndTime = tweenPrevRep ? tweenPrevRep._absoluteStartTime + tweenPrevRep._changeDuration : 0;\n        const tweenPrevRepIsCrossParent = tweenPrevRep && tweenPrevRep.parent !== tween.parent;\n        // Same parent keyframes take over at their own start, end plus delay equals the next start by construction.\n        // Cross parent siblings take over at their update start.\n        // Negative delay siblings take over at their own start instead.\n        const tweenNextRepTakeover = !tweenNextRep || tweenNextRep._isOverridden ? tweenAbsEndTime :\n          tweenNextRep.parent === tween.parent ? tweenAbsEndTime + tweenNextRep._delay :\n          tweenNextRep._absoluteStartTime < tweenNextRep._absoluteUpdateStartTime ? tweenNextRep._absoluteStartTime : tweenNextRep._absoluteUpdateStartTime;\n\n        if ((forcedRender || (\n            // Tail keyframes always re-evaluate the gate so an earlier keyframe cannot leave the target stale by writing past its own range after a backward seek.\n            (tweenCurrentTime !== tweenChangeDuration || absoluteTime <= tweenNextRepTakeover ||\n            (tweenPrevRep && !tweenPrevRepIsCrossParent && (!tweenNextRep || tweenNextRep.parent !== tween.parent))) &&\n            // A cross parent tween re-renders its from value from the previous sibling truncated end so the handoff gap holds.\n            // A keyframe re-renders its from revert while the next keyframe time is stale so a backward jump over its range cannot leave the next value in place.\n            (tweenCurrentTime !== 0 || absoluteTime >= tween._absoluteStartTime ||\n            (tweenPrevRepIsCrossParent && !tween._hasFromValue && !tweenPrevRep._isOverridden && absoluteTime >= tweenPrevRepEndTime) ||\n            (tweenNextRep && !tweenNextRep._isOverridden && tweenNextRep.parent === tween.parent && tweenNextRep._currentTime !== 0 && iterationTime < tweenNextRep._startTime))\n          )) &&\n          // Non-first keyframes wait until the iteration reaches their own start before rendering, so the previous keyframe can handle the from-revert when scrubbed backward past this tween's range.\n          (!tweenPrevRep || tweenPrevRepIsCrossParent || iterationTime >= tween._startTime) &&\n          (!tweenHasComposition || (\n            !tween._isOverridden &&\n            (!tween._isOverlapped || absoluteTime <= tweenAbsEndTime) &&\n            // The next sibling owns the value past its takeover point, so yielding there keeps writes single owner in both directions.\n            (!tweenNextRep || tweenNextRep._isOverridden || absoluteTime <= tweenNextRepTakeover) &&\n            // The previous sibling owns the value up to its truncated end.\n            // Cross parent tweens take over the hold from that point, explicit from values wait for their own start.\n            (!tweenPrevRep || (tweenPrevRep._isOverridden || (!tweenPrevRepIsCrossParent ?\n              absoluteTime >= tweenPrevRepEndTime + tween._delay :\n              absoluteTime >= tween._absoluteStartTime || (!tween._hasFromValue && absoluteTime >= tweenPrevRepEndTime))))\n          ))\n        ) {\n\n          const tweenNewTime = tween._currentTime = clamp(iterationTime - tween._startTime, 0, tweenChangeDuration);\n          const tweenProgress = tween._ease(tweenNewTime / tween._updateDuration);\n          const tweenModifier = tween._modifier;\n          const tweenValueType = tween._valueType;\n          const tweenType = tween._tweenType;\n          const tweenIsObject = tweenType === tweenTypes.OBJECT;\n          const tweenIsNumber = tweenValueType === valueTypes.NUMBER;\n          // Only round the in-between frames values if the final value is a string. Object targets consume raw numbers, so rounding is dead work there.\n          const tweenPrecision = (tweenIsNumber && tweenIsObject) || tweenProgress === 0 || tweenProgress === 1 ? -1 : globals.precision;\n\n          // Recompose tween value\n          /** @type {String|Number} */\n          let value;\n          /** @type {Number} */\n          let number;\n\n          if (tweenIsNumber) {\n            value = number = /** @type {Number} */(tweenModifier(round(lerp(tween._fromNumber, tween._toNumber,  tweenProgress), tweenPrecision )));\n          } else if (tweenValueType === valueTypes.UNIT) {\n            // Rounding the values speed up string composition\n            number = /** @type {Number} */(tweenModifier(round(lerp(tween._fromNumber, tween._toNumber,  tweenProgress), tweenPrecision)));\n            value = `${number}${tween._unit}`;\n          } else if (tweenValueType === valueTypes.COLOR) {\n            const ns = tween._numbers;\n            const fn = tween._fromNumbers;\n            const tn = tween._toNumbers;\n            const omt = 1 - tweenProgress;\n            const fr = fn[0], fg = fn[1], fb = fn[2];\n            const tr = tn[0], tg = tn[1], tb = tn[2];\n            // RGB channels lerp in pseudo-linear space (square inputs, sqrt result) to approximate gamma-correct blending.\n            // See https://developer.nvidia.com/gpugems/gpugems3/part-iv-image-effects/chapter-24-importance-being-linear.\n            ns[0] = /** @type {Number} */(tweenModifier(Math.sqrt(fr * fr * omt + tr * tr * tweenProgress)));\n            ns[1] = /** @type {Number} */(tweenModifier(Math.sqrt(fg * fg * omt + tg * tg * tweenProgress)));\n            ns[2] = /** @type {Number} */(tweenModifier(Math.sqrt(fb * fb * omt + tb * tb * tweenProgress)));\n            ns[3] = /** @type {Number} */(tweenModifier(lerp(fn[3], tn[3], tweenProgress)));\n            // The rgba string is built only for the dispatch path or the internalRender composition tick (setters handles the color comp)\n            if (!tween._setter || internalRender) {\n              value = `rgba(${round(ns[0], 0)},${round(ns[1], 0)},${round(ns[2], 0)},${ns[3]})`;\n            }\n          } else if (tweenValueType === valueTypes.COMPLEX) {\n            value = composeComplexValue(tween, tweenProgress, tweenPrecision);\n          }\n\n          // For additive tweens and Animatables\n          if (tweenHasComposition) {\n            tween._number = number;\n          }\n\n          if (!internalRender && tweenComposition !== compositionTypes.blend) {\n\n            const tweenProperty = tween.property;\n            tweenTarget = tween.target;\n\n            if (tween._setter) {\n              tween._setter(tweenTarget, number, tween);\n            } else if (tweenIsObject) {\n              tweenTarget[tweenProperty] = value;\n            } else if (tweenType === tweenTypes.ATTRIBUTE) {\n              /** @type {DOMTarget} */(tweenTarget).setAttribute(tweenProperty, /** @type {String} */(value));\n            } else {\n              tweenStyle = /** @type {DOMTarget} */(tweenTarget).style;\n              if (tweenType === tweenTypes.TRANSFORM) {\n                if (tweenTarget !== tweenTargetTransforms) {\n                  tweenTargetTransforms = tweenTarget;\n                  // NOTE: Referencing the cachedTransforms in the tween property directly can be a little bit faster but appears to increase memory usage.\n                  tweenTargetTransformsProperties = tweenTarget[transformsSymbol];\n                }\n                tweenTargetTransformsProperties[tweenProperty] = value;\n                tweenTransformsNeedUpdate = 1;\n              } else if (tweenType === tweenTypes.CSS) {\n                tweenStyle[tweenProperty] = value;\n              } else if (tweenType === tweenTypes.CSS_VAR) {\n                tweenStyle.setProperty(tweenProperty,/** @type {String} */(value));\n              }\n            }\n\n            if (isCurrentTimeAboveZero) hasRendered = 1;\n\n          } else {\n            // Used for composing timeline tweens without having to do a real render\n            tween._value = value;\n          }\n\n        } else if (tweenCurrentTime && tweenPrevRep && !tweenPrevRepIsCrossParent && iterationTime < tween._startTime) {\n          // Mark the keyframe as reverted when the playhead moves before its start, the previous keyframe owns the from revert and writes it once.\n          tween._currentTime = 0;\n        }\n\n        if (tweenTransformsNeedUpdate && tween._renderTransforms) {\n          tweenStyle.transform = buildTransformString(tweenTargetTransformsProperties);\n          tweenTransformsNeedUpdate = 0;\n        }\n\n        tween = tween._next;\n      }\n\n      if (!muteCallbacks && hasRendered) {\n        /** @type {JSAnimation} */(tickable).onRender(/** @type {JSAnimation} */(tickable));\n      }\n    }\n\n    if (!muteCallbacks && isCurrentTimeAboveZero) {\n      tickable.onUpdate(/** @type {CallbackArgument} */(tickable));\n    }\n\n  }\n\n  // End tweens rendering\n\n  // Handle setters on timeline differently and allow re-trigering the onComplete callback when seeking backwards\n  if (parent && isSetter) {\n    if (!muteCallbacks && (\n      // (tickableAbsoluteTime > 0 instead) of (tickableAbsoluteTime >= duration) to prevent floating point precision issues\n      // see: https://github.com/juliangarnier/anime/issues/1088\n      (parent.began && !isRunningBackwards && tickableAbsoluteTime > 0 && !completed) ||\n      (isRunningBackwards && tickableAbsoluteTime <= minValue && completed)\n    )) {\n      tickable.onComplete(/** @type {CallbackArgument} */(tickable));\n      tickable.completed = !isRunningBackwards;\n    }\n  // If currentTime is both above 0 and at least equals to duration, handles normal onComplete or infinite loops\n  } else if (isCurrentTimeAboveZero && isCurrentTimeEqualOrAboveDuration) {\n    if (iterationCount === Infinity) {\n      // Offset the tickable _startTime with its duration to reset _currentTime to 0 and continue the infinite timer\n      tickable._startTime += tickable.duration;\n    } else if (tickable._currentIteration >= iterationCount - 1) {\n      // By setting paused to true, we tell the engine loop to not render this tickable and removes it from the list on the next tick\n      tickable.paused = true;\n      if (!completed && !_hasChildren) {\n        // If the tickable has children, triggers onComplete() only when all children have completed in the tick function\n        tickable.completed = true;\n        if (!muteCallbacks && !(parent && (isRunningBackwards || !parent.began))) {\n          tickable.onComplete(/** @type {CallbackArgument} */(tickable));\n          tickable._resolve(/** @type {CallbackArgument} */(tickable));\n        }\n      }\n    }\n  // Otherwise set the completed flag to false\n  } else {\n    tickable.completed = false;\n  }\n\n  // NOTE: hasRendered * direction (negative for backwards) this way we can remove the tickable.backwards property completly ?\n  return hasRendered;\n};\n\n/**\n * @param  {Tickable} tickable\n * @param  {Number} time\n * @param  {Number} muteCallbacks\n * @param  {Number} internalRender\n * @param  {Number} tickMode\n * @return {void}\n */\nconst tick = (tickable, time, muteCallbacks, internalRender, tickMode) => {\n  const _currentIteration = tickable._currentIteration;\n  render(tickable, time, muteCallbacks, internalRender, tickMode);\n  if (tickable._hasChildren) {\n    const tl = /** @type {Timeline} */(tickable);\n    const tlIsRunningBackwards = tl.backwards;\n    const tlChildrenTime = internalRender ? time : tl._iterationTime;\n    const tlCildrenTickTime = now();\n\n    let tlChildrenHasRendered = 0;\n    let tlChildrenHaveCompleted = true;\n\n    // If the timeline has looped forward, we need to manually triggers children skipped callbacks\n    if (!internalRender && tl._currentIteration !== _currentIteration) {\n      const tlIterationDuration = tl.iterationDuration;\n      forEachChildren(tl, (/** @type {JSAnimation} */child) => {\n        if (!tlIsRunningBackwards) {\n          // Force an internal render to trigger the callbacks if the child has not completed on loop\n          if (!child.completed && !child.backwards && child._currentTime < child.iterationDuration) {\n            render(child, tlIterationDuration, muteCallbacks, 1, tickModes.FORCE);\n          }\n          // Reset their began and completed flags to allow retrigering callbacks on the next iteration\n          child.began = false;\n          child.completed = false;\n        } else {\n          const childDuration = child.duration;\n          const childStartTime = child._offset + child._delay;\n          const childEndTime = childStartTime + childDuration;\n          // Triggers the onComplete callback on reverse for children on the edges of the timeline\n          if (!muteCallbacks && childDuration <= minValue && (!childStartTime || childEndTime === tlIterationDuration)) {\n            child.onComplete(child);\n          }\n        }\n      });\n      if (!muteCallbacks) tl.onLoop(/** @type {CallbackArgument} */(tl));\n    }\n\n    forEachChildren(tl, (/** @type {JSAnimation} */child) => {\n      const childTime = round((tlChildrenTime - child._offset) * child._speed, 12); // Rounding is needed when using seconds\n      // Skip past-end siblings on backward iteration so their progress=1 to-values don't render last and overwrite the active sibling's write. Compare against _delay + duration so children with a normalized delay are not skipped while still inside their active range.\n      if (tlIsRunningBackwards && childTime > child._delay + child.duration) return;\n      const childTickMode = child._fps < tl._fps ? child.requestTick(tlCildrenTickTime) : tickMode;\n      tlChildrenHasRendered += render(child, childTime, muteCallbacks, internalRender, childTickMode);\n      if (!child.completed && tlChildrenHaveCompleted) tlChildrenHaveCompleted = false;\n    }, tlIsRunningBackwards);\n\n    // Renders on timeline are triggered by its children so it needs to be set after rendering the children\n    if (!muteCallbacks && tlChildrenHasRendered) tl.onRender(/** @type {CallbackArgument} */(tl));\n    // Triggers the timeline onComplete() once all chindren all completed and the current time has reached the end\n    if ((tlChildrenHaveCompleted || tlIsRunningBackwards) && tl._currentTime >= tl.duration) {\n      // Make sure the paused flag is false in case it has been skipped in the render function\n      tl.paused = true;\n      if (!tl.completed) {\n        tl.completed = true;\n        if (!muteCallbacks) {\n          tl.onComplete(/** @type {CallbackArgument} */(tl));\n          tl._resolve(/** @type {CallbackArgument} */(tl));\n        }\n      }\n    }\n  }\n};\n\nexport { render, tick };\n", "/**\n * Anime.js - core - ESM\n * @version v4.5.0\n * @license MIT\n * @copyright 2026 - Julian Garnier\n */\n\nimport { tweenTypes, isDomSymbol, transformsSymbol, emptyString, shortTransforms } from './consts.js';\nimport { forEachChildren, toLowerCase, isNil, isSvg } from './helpers.js';\nimport { buildTransformString } from './transforms.js';\nimport { decomposeRawValue, decomposedOriginalValue } from './values.js';\n\n/**\n * @import {\n *   JSAnimation,\n * } from '../animation/animation.js'\n*/\n\n/**\n* @import {\n*   Target,\n*   DOMTarget,\n*   Renderable,\n*   Tween,\n* } from '../types/index.js'\n*/\n\nconst propertyNamesCache = {};\n\n/**\n * @param  {String} propertyName\n * @param  {Target} target\n * @param  {tweenTypes} tweenType\n * @return {String}\n */\nconst sanitizePropertyName = (propertyName, target, tweenType) => {\n  if (tweenType === tweenTypes.TRANSFORM) {\n    const t = shortTransforms.get(propertyName);\n    return t ? t : propertyName;\n  } else if (\n    tweenType === tweenTypes.CSS ||\n    // Handle special cases where properties like \"strokeDashoffset\" needs to be set as \"stroke-dashoffset\"\n    // but properties like \"baseFrequency\" should stay in lowerCamelCase\n    (tweenType === tweenTypes.ATTRIBUTE && (isSvg(target) && propertyName in /** @type {DOMTarget} */(target).style))\n  ) {\n    const cachedPropertyName = propertyNamesCache[propertyName];\n    if (cachedPropertyName) {\n      return cachedPropertyName;\n    } else {\n      const lowerCaseName = propertyName ? toLowerCase(propertyName) : propertyName;\n      propertyNamesCache[propertyName] = lowerCaseName;\n      return lowerCaseName;\n    }\n  } else {\n    return propertyName;\n  }\n};\n\n/**\n * @template {Renderable} T\n * @param {T} renderable\n * @param {Boolean} [inlineStylesOnly]\n * @return {T}\n */\nconst revertValues = (renderable, inlineStylesOnly = false) => {\n  // Allow revertValues() to be called on timelines\n  if (renderable._hasChildren) {\n    forEachChildren(renderable, (/** @type {Renderable} */child) => revertValues(child, inlineStylesOnly), true);\n  } else {\n    const animation = /** @type {JSAnimation} */(renderable);\n    animation.pause();\n    forEachChildren(animation, (/** @type {Tween} */tween) => {\n      const tweenProperty = tween.property;\n      const tweenTarget = tween.target;\n      const tweenType = tween._tweenType;\n      const originalInlinedValue = tween._inlineValue;\n      const tweenHadNoInlineValue = isNil(originalInlinedValue) || originalInlinedValue === emptyString;\n      if (tween._setter) {\n        if (!inlineStylesOnly && !tweenHadNoInlineValue) {\n          // Re-seed the original value to the _number / _numbers props so the setter can write the original state instead of re-applying the current frame.\n          decomposeRawValue(originalInlinedValue, decomposedOriginalValue);\n          if (decomposedOriginalValue.d) {\n            const src = decomposedOriginalValue.d;\n            const dst = tween._numbers;\n            for (let i = 0, l = src.length; i < l; i++) dst[i] = src[i];\n          } else {\n            tween._number = decomposedOriginalValue.n;\n          }\n          tween._setter(tween.target, tween._number, tween);\n        }\n      } else if (tweenType === tweenTypes.OBJECT) {\n        if (!inlineStylesOnly && !tweenHadNoInlineValue) {\n          tweenTarget[tweenProperty] = originalInlinedValue;\n        }\n      } else if (tweenTarget[isDomSymbol]) {\n        if (tweenType === tweenTypes.ATTRIBUTE) {\n          if (!inlineStylesOnly) {\n            if (tweenHadNoInlineValue) {\n              /** @type {DOMTarget} */(tweenTarget).removeAttribute(tweenProperty);\n            } else {\n              /** @type {DOMTarget} */(tweenTarget).setAttribute(tweenProperty, /** @type {String} */(originalInlinedValue));\n            }\n          }\n        } else {\n          const targetStyle = /** @type {DOMTarget} */(tweenTarget).style;\n          if (tweenType === tweenTypes.TRANSFORM) {\n            const cachedTransforms = tweenTarget[transformsSymbol];\n            if (tweenHadNoInlineValue) {\n              delete cachedTransforms[tweenProperty];\n            } else {\n              cachedTransforms[tweenProperty] = originalInlinedValue;\n            }\n            if (tween._renderTransforms) {\n              if (!Object.keys(cachedTransforms).length) {\n                targetStyle.removeProperty('transform');\n              } else {\n                targetStyle.transform = buildTransformString(cachedTransforms);\n              }\n            }\n          } else {\n            if (tweenHadNoInlineValue) {\n              targetStyle.removeProperty(toLowerCase(tweenProperty));\n            } else {\n              targetStyle[tweenProperty] = originalInlinedValue;\n            }\n          }\n        }\n      }\n      if (tweenTarget[isDomSymbol] && animation._tail === tween) {\n        animation.targets.forEach(t => {\n          if (t.getAttribute && t.getAttribute('style') === emptyString) {\n            t.removeAttribute('style');\n          }        });\n      }\n    });\n  }\n  return renderable;\n};\n\n/**\n * @template {Renderable} T\n * @param {T} renderable\n * @return {T}\n */\nconst cleanInlineStyles = renderable => revertValues(renderable, true);\n\nexport { cleanInlineStyles, revertValues, sanitizePropertyName };\n", "/**\n * Anime.js - core - ESM\n * @version v4.5.0\n * @license MIT\n * @copyright 2026 - Julian Garnier\n */\n\nimport { K, maxFps, minValue, tickModes } from './consts.js';\nimport { defaults } from './globals.js';\n\n/**\n * @import {\n *   Tickable,\n *   Tween,\n * } from '../types/index.js'\n*/\n\n/*\n * Base class to control framerate and playback rate.\n * Inherited by Engine, Timer, Animation and Timeline.\n */\nclass Clock {\n\n  /** @param {Number} [initTime] */\n  constructor(initTime = 0) {\n    /** @type {Number} */\n    this.deltaTime = 0;\n    /** @type {Number} */\n    this._currentTime = initTime;\n    /** @type {Number} */\n    this._lastTickTime = initTime;\n    /** @type {Number} */\n    this._startTime = initTime;\n    /** @type {Number} */\n    this._lastTime = initTime;\n    /** @type {Number} */\n    this._frameDuration = K / maxFps;\n    /** @type {Number} */\n    this._fps = maxFps;\n    /** @type {Number} */\n    this._speed = 1;\n    /** @type {Boolean} */\n    this._hasChildren = false;\n    /** @type {Tickable|Tween} */\n    this._head = null;\n    /** @type {Tickable|Tween} */\n    this._tail = null;\n  }\n\n  get fps() {\n    return this._fps;\n  }\n\n  set fps(frameRate) {\n    const fr = +frameRate;\n    const fps = fr < minValue ? minValue : fr;\n    const frameDuration = K / fps;\n    if (fps > defaults.frameRate) defaults.frameRate = fps;\n    this._fps = fps;\n    this._frameDuration = frameDuration;\n  }\n\n  get speed() {\n    return this._speed;\n  }\n\n  set speed(playbackRate) {\n    const pbr = +playbackRate;\n    this._speed = pbr < minValue ? minValue : pbr;\n  }\n\n  /**\n   * @param  {Number} time\n   * @return {tickModes}\n   */\n  requestTick(time) {\n    const frameDuration = this._frameDuration;\n    const elapsed = time - this._lastTickTime;\n    const scaled = frameDuration * .25;\n    const tolerance = scaled < 4 ? scaled : 4;\n    // Tolerance prevents dropping frames that arrive a bit early due to RAF jitter\n    // typically <= ~25% of frame duration and capped at 4ms so it doesn't dominate at high fps.\n    // e.g. at 60fps (frameDuration=16.667ms) a frame arriving after 15ms:\n    // - without tolerance: 15 < 16.667 -> skip\n    // - with tolerance: 15 + 4 >= 16.667 -> tick\n    if (elapsed + tolerance < frameDuration) return tickModes.NONE;\n    this._lastTickTime = elapsed >= frameDuration ? time - (elapsed % frameDuration) : time;\n    return tickModes.AUTO;\n  }\n\n  /**\n   * @param  {Number} time\n   * @return {Number}\n   */\n  computeDeltaTime(time) {\n    const delta = time - this._lastTime;\n    this.deltaTime = delta;\n    this._lastTime = time;\n    return delta;\n  }\n\n}\n\nexport { Clock };\n", "/**\n * Anime.js - animation - ESM\n * @version v4.5.0\n * @license MIT\n * @copyright 2026 - Julian Garnier\n */\n\nimport { noop, minValue, valueTypes, tickModes } from '../core/consts.js';\nimport { cloneArray } from '../core/helpers.js';\nimport { render } from '../core/render.js';\n\nconst additive = {\n  animation: null,\n  update: noop,\n};\n\n/**\n * @import {\n *   Tween,\n *   TweenAdditiveLookups,\n * } from '../types/index.js'\n */\n\n/**\n * @typedef AdditiveAnimation\n * @property {Number} duration\n * @property {Number} _offset\n * @property {Number} _delay\n * @property {Tween} _head\n * @property {Tween} _tail\n */\n\n/**\n * @param  {TweenAdditiveLookups} lookups\n * @return {AdditiveAnimation}\n */\nconst addAdditiveAnimation = lookups => {\n  let animation = additive.animation;\n  if (!animation) {\n    animation = {\n      duration: minValue,\n      computeDeltaTime: noop,\n      _offset: 0,\n      _delay: 0,\n      _head: null,\n      _tail: null,\n    };\n    additive.animation = animation;\n    additive.update = () => {\n      lookups.forEach(propertyAnimation => {\n        for (let propertyName in propertyAnimation) {\n          const tweens = propertyAnimation[propertyName];\n          const lookupTween = tweens._head;\n          if (lookupTween) {\n            const valueType = lookupTween._valueType;\n            const additiveValues = valueType === valueTypes.COMPLEX || valueType === valueTypes.COLOR ? cloneArray(lookupTween._fromNumbers) : null;\n            let additiveValue = lookupTween._fromNumber;\n            let tween = tweens._tail;\n            while (tween && tween !== lookupTween) {\n              if (additiveValues) {\n                for (let i = 0, l = tween._numbers.length; i < l; i++) additiveValues[i] += tween._numbers[i];\n              } else {\n                additiveValue += tween._number;\n              }\n              tween = tween._prevAdd;\n            }\n            lookupTween._toNumber = additiveValue;\n            lookupTween._toNumbers = additiveValues;\n          }\n        }\n      });\n      // TODO: Avoid polymorphism here, idealy the additive animation should be a regular animation with a higher priority in the render loop\n      render(animation, 1, 1, 0, tickModes.FORCE);\n    };\n  }\n  return animation;\n};\n\nexport { addAdditiveAnimation, additive };\n", "/**\n * Anime.js - engine - ESM\n * @version v4.5.0\n * @license MIT\n * @copyright 2026 - Julian Garnier\n */\n\nimport { globalVersions, defaults, globals } from '../core/globals.js';\nimport { isBrowser, doc, tickModes, K } from '../core/consts.js';\nimport { now, removeChild, forEachChildren } from '../core/helpers.js';\nimport { Clock } from '../core/clock.js';\nimport { tick } from '../core/render.js';\nimport { additive } from '../animation/additive.js';\n\n/**\n * @import {\n *   DefaultsParams,\n * } from '../types/index.js'\n*/\n\n/**\n * @import {\n *   Tickable,\n * } from '../types/index.js'\n*/\n\nconst engineTickMethod = /*#__PURE__*/ (() => isBrowser ? requestAnimationFrame : setImmediate)();\nconst engineCancelMethod = /*#__PURE__*/ (() => isBrowser ? cancelAnimationFrame : clearImmediate)();\n\nclass Engine extends Clock {\n\n  /** @param {Number} [initTime] */\n  constructor(initTime) {\n    super(initTime);\n    this.useDefaultMainLoop = true;\n    this.pauseOnDocumentHidden = true;\n    /** @type {DefaultsParams} */\n    this.defaults = defaults;\n    // this.paused = isBrowser && doc.hidden ? true  : false;\n    this.paused = true;\n    /** @type {Number|NodeJS.Immediate} */\n    this.reqId = 0;\n  }\n\n  update() {\n    const time = this._currentTime = now();\n    if (this.requestTick(time)) {\n      this.computeDeltaTime(time);\n      const engineSpeed = this._speed;\n      const engineFps = this._fps;\n      let activeTickable = /** @type {Tickable} */(this._head);\n      while (activeTickable) {\n        const nextTickable = activeTickable._next;\n        if (!activeTickable.paused) {\n          tick(\n            activeTickable,\n            (time - activeTickable._startTime) * activeTickable._speed * engineSpeed,\n            0, // !muteCallbacks\n            0, // !internalRender\n            activeTickable._fps < engineFps ? activeTickable.requestTick(time) : tickModes.AUTO\n          );\n        } else {\n          removeChild(this, activeTickable);\n          this._hasChildren = !!this._tail;\n          activeTickable._running = false;\n          if (activeTickable.completed && !activeTickable._cancelled) {\n            activeTickable.cancel();\n          }\n        }\n        activeTickable = nextTickable;\n      }\n      additive.update();\n    }\n  }\n\n  wake() {\n    if (this.useDefaultMainLoop && !this.reqId) {\n      // Imediatly request a tick to update engine._lastTickTime and get accurate offsetPosition calculation in timer.js\n      this.requestTick(now());\n      this.reqId = engineTickMethod(tickEngine);\n    }\n    return this;\n  }\n\n  pause() {\n    if (!this.reqId) return;\n    this.paused = true;\n    return killEngine();\n  }\n\n  resume() {\n    if (!this.paused) return;\n    this.paused = false;\n    forEachChildren(this, (/** @type {Tickable} */child) => child.resetTime());\n    return this.wake();\n  }\n\n  // Getter and setter for speed\n  get speed() {\n    return this._speed * (globals.timeScale === 1 ? 1 : K);\n  }\n\n  set speed(playbackRate) {\n    const speed = playbackRate * globals.timeScale;\n    if (this._speed === speed) return;\n    this._speed = speed;\n    forEachChildren(this, (/** @type {Tickable} */child) => child.speed = child._speed);\n  }\n\n  // Getter and setter for timeUnit\n  get timeUnit() {\n    return globals.timeScale === 1 ? 'ms' : 's';\n  }\n\n  set timeUnit(unit) {\n    const secondsScale = 0.001;\n    const isSecond = unit === 's';\n    const newScale = isSecond ? secondsScale : 1;\n    if (globals.timeScale !== newScale) {\n      globals.timeScale = newScale;\n      globals.tickThreshold = 200 * newScale;\n      const scaleFactor = isSecond ? secondsScale : K;\n      /** @type {Number} */\n      (this.defaults.duration) *= scaleFactor;\n      this._speed *= scaleFactor;\n    }\n  }\n\n  // Getter and setter for precision\n  get precision() {\n    return globals.precision;\n  }\n\n  set precision(precision) {\n    globals.precision = precision;\n  }\n\n}\n\nconst engine = /*#__PURE__*/(() => {\n  const engine = new Engine(now());\n  if (isBrowser) {\n    globalVersions.engine = engine;\n    doc.addEventListener('visibilitychange', () => {\n      if (!engine.pauseOnDocumentHidden) return;\n      doc.hidden ? engine.pause() : engine.resume();\n    });\n  }\n  return engine;\n})();\n\n\nconst tickEngine = () => {\n  if (engine._head) {\n    engine.reqId = engineTickMethod(tickEngine);\n    engine.update();\n  } else {\n    engine.reqId = 0;\n  }\n};\n\nconst killEngine = () => {\n  engineCancelMethod(/** @type {NodeJS.Immediate & Number} */(engine.reqId));\n  engine.reqId = 0;\n  return engine;\n};\n\nexport { engine };\n", "/**\n * Anime.js - animation - ESM\n * @version v4.5.0\n * @license MIT\n * @copyright 2026 - Julian Garnier\n */\n\nimport { compositionTypes, minValue, tweenTypes } from '../core/consts.js';\nimport { forEachChildren, removeChild, isUnd, addChild, round, cloneArray } from '../core/helpers.js';\nimport { sanitizePropertyName } from '../core/styles.js';\nimport { engine } from '../engine/engine.js';\nimport { additive, addAdditiveAnimation } from './additive.js';\n\n/**\n * @import {\n *   TweenReplaceLookups,\n *   TweenAdditiveLookups,\n *   TweenPropertySiblings,\n *   Tween,\n *   Target,\n *   TargetsArray,\n *   Renderable,\n * } from '../types/index.js'\n *\n * @import {\n *   JSAnimation,\n * } from '../animation/animation.js'\n*/\n\nconst lookups = {\n  /** @type {TweenReplaceLookups} */\n  _rep: new WeakMap(),\n  /** @type {TweenAdditiveLookups} */\n  _add: new Map(),\n};\n\n/**\n * @param  {Target} target\n * @param  {String} property\n * @param  {String} lookup\n * @return {TweenPropertySiblings}\n */\nconst getTweenSiblings = (target, property, lookup = '_rep') => {\n  const lookupMap = lookups[lookup];\n  let targetLookup = lookupMap.get(target);\n  if (!targetLookup) {\n    targetLookup = {};\n    lookupMap.set(target, targetLookup);\n  }\n  return targetLookup[property] ? targetLookup[property] : targetLookup[property] = {\n    _head: null,\n    _tail: null,\n  }\n};\n\n/**\n * @param  {Tween} p\n * @param  {Tween} c\n * @return {Number|Boolean}\n */\nconst addTweenSortMethod = (p, c) => {\n  return p._isOverridden || p._absoluteStartTime > c._absoluteStartTime;\n};\n\n/**\n * @param {Tween} tween\n */\nconst overrideTween = tween => {\n  tween._isOverlapped = 1;\n  tween._isOverridden = 1;\n  tween._changeDuration = minValue;\n  tween._currentTime = minValue;\n};\n\n/**\n * @param  {Tween} tween\n * @param  {TweenPropertySiblings} siblings\n * @return {Tween}\n */\nconst composeTween = (tween, siblings) => {\n\n  const tweenCompositionType = tween._composition;\n\n  // Handle replaced tweens\n\n  if (tweenCompositionType === compositionTypes.replace) {\n\n    const tweenAbsStartTime = tween._absoluteStartTime;\n\n    addChild(siblings, tween, addTweenSortMethod, '_prevRep', '_nextRep');\n\n    const prevSibling = tween._prevRep;\n\n    // Update the previous siblings for composition replace tweens\n\n    if (prevSibling) {\n\n      const prevParent = prevSibling.parent;\n      const prevAbsEndTime = prevSibling._absoluteEndTime;\n\n      // Handle looped animations tween\n\n      if (\n        // Check if the previous tween is from a different animation\n        tween.parent.id !== prevParent.id &&\n        // Check if the animation has loops\n        prevParent.iterationCount> 1 &&\n        // Check if _absoluteChangeEndTime of last loop overlaps the current tween\n        prevAbsEndTime + (prevParent.duration - prevParent.iterationDuration) > tweenAbsStartTime\n      ) {\n\n        // TODO: Find a way to only override the iterations overlapping with the tween\n        overrideTween(prevSibling);\n\n        let prevPrevSibling = prevSibling._prevRep;\n\n        // If the tween was part of a set of keyframes, override its siblings\n        while (prevPrevSibling && prevPrevSibling.parent.id === prevParent.id) {\n          overrideTween(prevPrevSibling);\n          prevPrevSibling = prevPrevSibling._prevRep;\n        }\n\n      }\n\n      // Read the precision-matched update-start instead of subtracting tween._delay live so sequential keyframes touching at a boundary don't trigger a phantom overlap from float drift.\n      const absoluteUpdateStartTime = tween._absoluteUpdateStartTime;\n\n      if (prevAbsEndTime > absoluteUpdateStartTime) {\n\n        const prevChangeStartTime = prevSibling._startTime;\n        const prevTLOffset = prevAbsEndTime - (prevChangeStartTime + prevSibling._updateDuration);\n        // Rounding is necessary here to minimize floating point errors when working in seconds\n        const updatedPrevChangeDuration = round(absoluteUpdateStartTime - prevTLOffset - prevChangeStartTime, 12);\n\n        prevSibling._changeDuration = updatedPrevChangeDuration;\n        prevSibling._currentTime = updatedPrevChangeDuration;\n        prevSibling._isOverlapped = 1;\n\n        // Override the previous tween if its new _changeDuration is lower than minValue\n        // TODO: See if it's even neceseeary to test against minValue, checking for 0 might be enough\n        if (updatedPrevChangeDuration < minValue) {\n          overrideTween(prevSibling);\n        }\n      }\n\n      // Skip the cancel cascade when both tweens share the same parent timeline, a timeline cannot replace itself.\n      const tweenParentTL = tween.parent.parent;\n      if (!tweenParentTL || tweenParentTL !== prevParent.parent) {\n\n        let pausePrevParentAnimation = true;\n\n        forEachChildren(prevParent, (/** @type Tween */t) => {\n          if (!t._isOverlapped) pausePrevParentAnimation = false;\n        });\n\n        if (pausePrevParentAnimation) {\n          const prevParentTL = prevParent.parent;\n          if (prevParentTL) {\n            let pausePrevParentTL = true;\n            forEachChildren(prevParentTL, (/** @type JSAnimation */a) => {\n              if (a !== prevParent) {\n                forEachChildren(a, (/** @type Tween */t) => {\n                  if (!t._isOverlapped) pausePrevParentTL = false;\n                });\n              }\n            });\n            if (pausePrevParentTL) {\n              prevParentTL.cancel();\n            }\n          } else {\n            prevParent.cancel();\n            // Previously, calling .cancel() on a timeline child would affect the render order of other children\n            // Worked around this by marking it as .completed and using .pause() for safe removal in the engine loop\n            // This is no longer needed since timeline tween composition is now handled separately\n            // Keeping this here for reference\n            // prevParent.completed = true;\n            // prevParent.pause();\n          }\n        }\n\n      }\n\n    }\n\n    // let nextSibling = tween._nextRep;\n\n    // // All the next siblings are automatically overridden\n\n    // if (nextSibling && nextSibling._absoluteStartTime >= tweenAbsStartTime) {\n    //   while (nextSibling) {\n    //     overrideTween(nextSibling);\n    //     nextSibling = nextSibling._nextRep;\n    //   }\n    // }\n\n    // if (nextSibling && nextSibling._absoluteStartTime < tweenAbsStartTime) {\n    //   while (nextSibling) {\n    //     overrideTween(nextSibling);\n    //     console.log(tween.id, nextSibling.id);\n    //     nextSibling = nextSibling._nextRep;\n    //   }\n    // }\n\n  // Handle additive tweens composition\n\n  } else if (tweenCompositionType === compositionTypes.blend) {\n\n    const additiveTweenSiblings = getTweenSiblings(tween.target, tween.property, '_add');\n    const additiveAnimation = addAdditiveAnimation(lookups._add);\n\n    let lookupTween = additiveTweenSiblings._head;\n\n    if (!lookupTween) {\n      lookupTween = { ...tween };\n      lookupTween._composition = compositionTypes.replace;\n      lookupTween._updateDuration = minValue;\n      lookupTween._startTime = 0;\n      lookupTween._numbers = cloneArray(tween._fromNumbers);\n      lookupTween._number = 0;\n      lookupTween._next = null;\n      lookupTween._prev = null;\n      addChild(additiveTweenSiblings, lookupTween);\n      addChild(additiveAnimation, lookupTween);\n    }\n\n    // Convert the values of TO to FROM and set TO to 0\n\n    const toNumber = tween._toNumber;\n    tween._fromNumber = lookupTween._fromNumber - toNumber;\n    tween._toNumber = 0;\n    tween._numbers = cloneArray(tween._fromNumbers);\n    tween._number = 0;\n    lookupTween._fromNumber = toNumber;\n\n    if (tween._toNumbers.length) {\n      const toNumbers = cloneArray(tween._toNumbers);\n      toNumbers.forEach((value, i) => {\n        tween._fromNumbers[i] = lookupTween._fromNumbers[i] - value;\n        tween._toNumbers[i] = 0;\n      });\n      lookupTween._fromNumbers = toNumbers;\n    }\n\n    addChild(additiveTweenSiblings, tween, null, '_prevAdd', '_nextAdd');\n\n  }\n\n  return tween;\n\n};\n\n/**\n * @param  {Tween} tween\n * @return {Tween}\n */\nconst removeTweenSliblings = tween => {\n  const tweenComposition = tween._composition;\n  if (tweenComposition !== compositionTypes.none) {\n    const tweenTarget = tween.target;\n    const tweenProperty = tween.property;\n    const replaceTweensLookup = lookups._rep;\n    const replaceTargetProps = replaceTweensLookup.get(tweenTarget);\n    const tweenReplaceSiblings = replaceTargetProps[tweenProperty];\n    removeChild(tweenReplaceSiblings, tween, '_prevRep', '_nextRep');\n    if (tweenComposition === compositionTypes.blend) {\n      const addTweensLookup = lookups._add;\n      const addTargetProps = addTweensLookup.get(tweenTarget);\n      if (!addTargetProps) return;\n      const additiveTweenSiblings = addTargetProps[tweenProperty];\n      const additiveAnimation = additive.animation;\n      removeChild(additiveTweenSiblings, tween, '_prevAdd', '_nextAdd');\n      // If only one tween is left in the additive lookup, it's the tween lookup\n      const lookupTween = additiveTweenSiblings._head;\n      if (lookupTween && lookupTween === additiveTweenSiblings._tail) {\n        removeChild(additiveTweenSiblings, lookupTween, '_prevAdd', '_nextAdd');\n        removeChild(additiveAnimation, lookupTween);\n        let shouldClean = true;\n        for (let prop in addTargetProps) {\n          if (addTargetProps[prop]._head) {\n            shouldClean = false;\n            break;\n          }\n        }\n        if (shouldClean) {\n          addTweensLookup.delete(tweenTarget);\n        }\n      }\n    }\n  }\n  return tween;\n};\n\n/**\n * @param  {TargetsArray} targetsArray\n * @param  {JSAnimation} animation\n * @param  {String} [propertyName]\n * @return {Boolean}\n */\nconst removeTargetsFromJSAnimation = (targetsArray, animation, propertyName) => {\n  let tweensMatchesTargets = false;\n  forEachChildren(animation, (/**@type {Tween} */tween) => {\n    const tweenTarget = tween.target;\n    if (targetsArray.includes(tweenTarget)) {\n      const tweenName = tween.property;\n      const tweenType = tween._tweenType;\n      const normalizePropName = sanitizePropertyName(propertyName, tweenTarget, tweenType);\n      if (!normalizePropName || normalizePropName && normalizePropName === tweenName) {\n        // Make sure to flag the previous CSS transform tween to renderTransform\n        if (tween.parent._tail === tween &&\n            tween._tweenType === tweenTypes.TRANSFORM &&\n            tween._prev &&\n            tween._prev._tweenType === tweenTypes.TRANSFORM\n        ) {\n          tween._prev._renderTransforms = 1;\n        }\n        // Removes the tween from the selected animation\n        removeChild(animation, tween);\n        // Detach the tween from its siblings to make sure blended tweens are correctlly removed\n        removeTweenSliblings(tween);\n        tweensMatchesTargets = true;\n      }\n    }\n  }, true);\n  return tweensMatchesTargets;\n};\n\n/**\n * @param  {TargetsArray} targetsArray\n * @param  {Renderable} [renderable]\n * @param  {String} [propertyName]\n */\nconst removeTargetsFromRenderable = (targetsArray, renderable, propertyName) => {\n  const parent = /** @type {Renderable|typeof engine} **/(renderable ? renderable : engine);\n  let removeMatches;\n  if (parent._hasChildren) {\n    let iterationDuration = 0;\n    forEachChildren(parent, (/** @type {Renderable} */child) => {\n      if (!child._hasChildren) {\n        removeMatches = removeTargetsFromJSAnimation(targetsArray, /** @type {JSAnimation} */(child), propertyName);\n        // Remove the child from its parent if no tweens and no children left after the removal\n        if (removeMatches && !child._head) {\n          child.cancel();\n          removeChild(parent, child);\n        } else {\n          // Calculate the new iterationDuration value to handle onComplete with last child in render()\n          const childTLOffset = child._offset + child._delay;\n          const childDur = childTLOffset + child.duration;\n          if (childDur > iterationDuration) {\n            iterationDuration = childDur;\n          }\n        }\n      }\n      // Make sure to also remove engine's children targets\n      // NOTE: Avoid recursion?\n      if (child._head) {\n        removeTargetsFromRenderable(targetsArray, child, propertyName);\n      } else {\n        child._hasChildren = false;\n      }\n    }, true);\n    // Update iterationDuration value to handle onComplete with last child in render()\n    if (!isUnd(/** @type {Renderable} */(parent).iterationDuration)) {\n      /** @type {Renderable} */(parent).iterationDuration = iterationDuration;\n    }\n  } else {\n    removeMatches = removeTargetsFromJSAnimation(\n      targetsArray,\n      /** @type {JSAnimation} */(parent),\n      propertyName\n    );\n  }\n  if (removeMatches && !parent._head) {\n    parent._hasChildren = false;\n    // Cancel the parent if there are no tweens and no children left after the removal\n    // We have to check if the .cancel() method exist to handle cases where the parent is the engine itself\n    if (/** @type {Renderable} */(parent).cancel) /** @type {Renderable} */(parent).cancel();\n  }\n};\n\nexport { composeTween, getTweenSiblings, overrideTween, removeTargetsFromRenderable, removeTweenSliblings };\n", "/**\n * Anime.js - timer - ESM\n * @version v4.5.0\n * @license MIT\n * @copyright 2026 - Julian Garnier\n */\n\nimport { minValue, noop, maxValue, compositionTypes, tickModes } from '../core/consts.js';\nimport { isFnc, isUnd, now, clampInfinity, clamp, round, forEachChildren, addChild, normalizeTime, floor } from '../core/helpers.js';\nimport { globals, scope } from '../core/globals.js';\nimport { setValue } from '../core/values.js';\nimport { tick } from '../core/render.js';\nimport { removeTweenSliblings, composeTween, getTweenSiblings } from '../animation/composition.js';\nimport { Clock } from '../core/clock.js';\nimport { engine } from '../engine/engine.js';\n\n/**\n * @import {\n *   Callback,\n *   TimerParams,\n *   Renderable,\n *   Tween,\n * } from '../types/index.js'\n*/\n\n/**\n * @import {\n *   ScrollObserver,\n * } from '../events/scroll.js'\n*/\n\n/**\n * @import {\n *   Timeline,\n * } from '../timeline/timeline.js'\n*/\n\n/**\n * @param  {Timer} timer\n * @return {Timer}\n */\nconst resetTimerProperties = timer => {\n  timer.paused = true;\n  timer.began = false;\n  timer.completed = false;\n  return timer;\n};\n\n/**\n * @param  {Timer} timer\n * @return {Timer}\n */\nconst reviveTimer = timer => {\n  if (!timer._cancelled) return timer;\n  if (timer._hasChildren) {\n    forEachChildren(timer, reviveTimer);\n  } else {\n    forEachChildren(timer, (/** @type {Tween} tween */tween) => {\n      if (tween._composition !== compositionTypes.none) {\n        composeTween(tween, getTweenSiblings(tween.target, tween.property));\n      }\n    });\n  }\n  timer._cancelled = 0;\n  return timer;\n};\n\nlet timerId = 0;\n\n/** @param {Timer} prev @param {Timer} child */\nconst sortByPriority = (prev, child) => prev._priority > child._priority;\n\n/**\n * Base class used to create Timers, Animations and Timelines\n */\nclass Timer extends Clock {\n  /**\n   * @param {TimerParams} [parameters]\n   * @param {Timeline} [parent]\n   * @param {Number} [parentPosition]\n   */\n  constructor(parameters = {}, parent = null, parentPosition = 0) {\n\n    super(0);\n\n    ++timerId;\n\n    const {\n      id,\n      delay,\n      duration,\n      reversed,\n      alternate,\n      loop,\n      loopDelay,\n      autoplay,\n      frameRate,\n      playbackRate,\n      priority,\n      onComplete,\n      onLoop,\n      onPause,\n      onBegin,\n      onBeforeUpdate,\n      onUpdate,\n    } = parameters;\n\n    if (scope.current) scope.current.register(this);\n\n    const timerInitTime = parent ? 0 : engine._lastTickTime;\n    const timerDefaults = parent ? parent.defaults : globals.defaults;\n    const timerDelay = /** @type {Number} */(isFnc(delay) || isUnd(delay) ? timerDefaults.delay : +delay);\n    const timerDuration = isFnc(duration) || isUnd(duration) ? Infinity : +duration;\n    const timerLoop = setValue(loop, timerDefaults.loop);\n    const timerLoopDelay = setValue(loopDelay, timerDefaults.loopDelay);\n    let timerIterationCount = timerLoop === true ||\n                              timerLoop === Infinity ||\n                              /** @type {Number} */(timerLoop) < 0 ? Infinity :\n                              /** @type {Number} */(timerLoop) + 1;\n\n    let offsetPosition = 0;\n\n    if (parent) {\n      offsetPosition = parentPosition;\n    } else {\n      // Make sure to tick the engine once if not currently running to get up to date engine._lastTickTime\n      // to avoid big gaps with the following offsetPosition calculation\n      if (!engine.reqId) engine.requestTick(now());\n      // Make sure to scale the offset position with globals.timeScale to properly handle seconds unit\n      offsetPosition = (engine._lastTickTime - engine._startTime) * globals.timeScale;\n    }\n\n    // Timer's parameters\n    /** @type {String|Number} */\n    this.id = !isUnd(id) ? id : timerId;\n    /** @type {Timeline} */\n    this.parent = parent;\n    // Total duration of the timer\n    this.duration = clampInfinity(((timerDuration + timerLoopDelay) * timerIterationCount) - timerLoopDelay) || minValue;\n    /** @type {Boolean} */\n    this.backwards = false;\n    /** @type {Boolean} */\n    this.paused = true;\n    /** @type {Boolean} */\n    this.began = false;\n    /** @type {Boolean} */\n    this.completed = false;\n    /** @type {Callback<this>} */\n    this.onBegin = onBegin || timerDefaults.onBegin;\n    /** @type {Callback<this>} */\n    this.onBeforeUpdate = onBeforeUpdate || timerDefaults.onBeforeUpdate;\n    /** @type {Callback<this>} */\n    this.onUpdate = onUpdate || timerDefaults.onUpdate;\n    /** @type {Callback<this>} */\n    this.onLoop = onLoop || timerDefaults.onLoop;\n    /** @type {Callback<this>} */\n    this.onPause = onPause || timerDefaults.onPause;\n    /** @type {Callback<this>} */\n    this.onComplete = onComplete || timerDefaults.onComplete;\n    /** @type {Number} */\n    this.iterationDuration = timerDuration; // Duration of one loop\n    /** @type {Number} */\n    this.iterationCount = timerIterationCount; // Number of loops\n    /** @type {Boolean|ScrollObserver} */\n    this._autoplay = parent ? false : setValue(autoplay, timerDefaults.autoplay);\n    /** @type {Number} */\n    this._offset = offsetPosition;\n    /** @type {Number} */\n    this._delay = timerDelay;\n    /** @type {Number} */\n    this._loopDelay = timerLoopDelay;\n    /** @type {Number} */\n    this._iterationTime = 0;\n    /** @type {Number} */\n    this._currentIteration = 0; // Current loop index\n    /** @type {Function} */\n    this._resolve = noop; // Used by .then()\n    /** @type {Boolean} */\n    this._running = false;\n    /** @type {Number} */\n    this._reversed = +setValue(reversed, timerDefaults.reversed);\n    /** @type {Number} */\n    this._reverse = this._reversed;\n    /** @type {Number} */\n    this._cancelled = 0;\n    /** @type {Boolean} */\n    this._alternate = setValue(alternate, timerDefaults.alternate);\n    /** @type {Renderable} */\n    this._prev = null;\n    /** @type {Renderable} */\n    this._next = null;\n\n    // Clock's parameters\n    /** @type {Number} */\n    this._lastTickTime = timerInitTime;\n    /** @type {Number} */\n    this._startTime = timerInitTime;\n    /** @type {Number} */\n    this._lastTime = timerInitTime;\n    /** @type {Number} */\n    this._fps = setValue(frameRate, timerDefaults.frameRate);\n    /** @type {Number} */\n    this._speed = setValue(playbackRate, timerDefaults.playbackRate);\n    /** @type {Number} */\n    this._priority = +setValue(priority, 1);\n  }\n\n  get cancelled() {\n    return !!this._cancelled;\n  }\n\n  set cancelled(cancelled) {\n    cancelled ? this.cancel() : this.reset(true).play();\n  }\n\n  get currentTime() {\n    return clamp(round(this._currentTime, globals.precision), -this._delay, this.duration);\n  }\n\n  set currentTime(time) {\n    const paused = this.paused;\n    // Pausing the timer is necessary to avoid time jumps on a running instance\n    this.pause().seek(+time);\n    if (!paused) this.resume();\n  }\n\n  get iterationCurrentTime() {\n    return clamp(round(this._iterationTime, globals.precision), 0, this.iterationDuration);\n  }\n\n  set iterationCurrentTime(time) {\n    this.currentTime = (this.iterationDuration * this._currentIteration) + time;\n  }\n\n  get progress() {\n    return clamp(round(this._currentTime / this.duration, 10), 0, 1);\n  }\n\n  set progress(progress) {\n    this.currentTime = this.duration * progress;\n  }\n\n  get iterationProgress() {\n    return clamp(round(this._iterationTime / this.iterationDuration, 10), 0, 1);\n  }\n\n  set iterationProgress(progress) {\n    const iterationDuration = this.iterationDuration;\n    this.currentTime = (iterationDuration * this._currentIteration) + (iterationDuration * progress);\n  }\n\n  get currentIteration() {\n    return this._currentIteration;\n  }\n\n  set currentIteration(iterationCount) {\n    this.currentTime = (this.iterationDuration * clamp(+iterationCount, 0, this.iterationCount - 1));\n  }\n\n  get reversed() {\n    return !!this._reversed;\n  }\n\n  set reversed(reverse) {\n    reverse ? this.reverse() : this.play();\n  }\n\n  get speed() {\n    return super.speed;\n  }\n\n  set speed(playbackRate) {\n    super.speed = playbackRate;\n    this.resetTime();\n  }\n\n  /**\n   * @param  {Boolean} [softReset]\n   * @return {this}\n   */\n  reset(softReset = false) {\n    // If cancelled, revive the timer before rendering in order to have propertly composed tweens siblings\n    reviveTimer(this);\n    if (this._reversed && !this._reverse) this.reversed = false;\n    // Rendering before updating the completed flag to prevent skips and to make sure the properties are not overridden\n    // Setting the iterationTime at the end to force the rendering to happend backwards, otherwise calling .reset() on Timelines might not render children in the right order\n    // NOTE: This is only required for Timelines and might be better to move to the Timeline class?\n    this._iterationTime = this.iterationDuration;\n    // Set tickMode to tickModes.FORCE to force rendering\n    tick(this, 0, 1, ~~softReset, tickModes.FORCE);\n    // Reset timer properties after revive / render to make sure the props are not updated again\n    resetTimerProperties(this);\n    // Also reset children properties\n    if (this._hasChildren) {\n      forEachChildren(this, resetTimerProperties);\n    }\n    return this;\n  }\n\n  /**\n   * @param  {Boolean} internalRender\n   * @return {this}\n   */\n  init(internalRender = false) {\n    this.fps = this._fps;\n    this.speed = this._speed;\n    // Manually calling .init() on timelines should render all children intial state\n    // Forces all children to render once then render to 0 when reseted\n    if (!internalRender && this._hasChildren) {\n      tick(this, this.duration, 1, ~~internalRender, tickModes.FORCE);\n    }\n    this.reset(internalRender);\n    // Make sure to set autoplay to false to child timers so it doesn't attempt to autoplay / link\n    const autoplay = this._autoplay;\n    if (autoplay === true) {\n      this.resume();\n    } else if (autoplay && !isUnd(/** @type {ScrollObserver} */(autoplay).linked)) {\n      /** @type {ScrollObserver} */(autoplay).link(this);\n    }\n    return this;\n  }\n\n  /** @return {this} */\n  resetTime() {\n    const timeScale = 1 / (this._speed * engine._speed);\n    // TODO: See if we can safely use engine._lastTickTime here\n    // if (!engine.reqId) engine.requestTick(now())\n    // this._startTime = engine._lastTickTime - (this._currentTime + this._delay) * timeScale;\n    this._startTime = now() - (this._currentTime + this._delay) * timeScale;\n    return this;\n  }\n\n  /** @return {this} */\n  pause() {\n    if (this.paused) return this;\n    this.paused = true;\n    this.onPause(this);\n    return this;\n  }\n\n  /** @return {this} */\n  resume() {\n    if (!this.paused) return this;\n    this.paused = false;\n    // We can safely imediatly render a timer that has no duration and no children\n    if (this.duration <= minValue && !this._hasChildren) {\n      tick(this, minValue, 0, 0, tickModes.FORCE);\n    } else {\n      if (!this._running) {\n        addChild(engine, this, sortByPriority);\n        engine._hasChildren = true;\n        this._running = true;\n      }\n      this.resetTime();\n      // Forces the timer to advance by at least one frame when the next tick occurs\n      this._startTime -= 12;\n      engine.wake();\n    }\n    return this;\n  }\n\n  /** @return {this} */\n  restart() {\n    return this.reset().resume();\n  }\n\n  /**\n   * @param  {Number} time\n   * @param  {Boolean|Number} [muteCallbacks]\n   * @param  {Boolean|Number} [internalRender]\n   * @return {this}\n   */\n  seek(time, muteCallbacks = 0, internalRender = 0) {\n    // Recompose the tween siblings in case the timer has been cancelled\n    reviveTimer(this);\n    // If you seek a completed animation, otherwise the next play will starts at 0\n    this.completed = false;\n    const isPaused = this.paused;\n    this.paused = true;\n    // timer, time, muteCallbacks, internalRender, tickMode\n    tick(this, time + this._delay, ~~muteCallbacks, ~~internalRender, tickModes.AUTO);\n    return isPaused ? this : this.resume();\n  }\n\n  /** @return {this} */\n  alternate() {\n    const reversed = this._reversed;\n    const count = this.iterationCount;\n    const duration = this.iterationDuration;\n    // Calculate the maximum iterations possible given the iteration duration\n    const iterations = count === Infinity ? floor(maxValue / duration) : count;\n    this._reversed = +(this._alternate && !(iterations % 2) ? reversed : !reversed);\n    if (count === Infinity) {\n      // Handle infinite loops to loop on themself\n      this.iterationProgress = this._reversed ? 1 - this.iterationProgress : this.iterationProgress;\n    } else {\n      this.seek((duration * iterations) - this._currentTime);\n    }\n    this.resetTime();\n    return this;\n  }\n\n  /** @return {this} */\n  play() {\n    if (this._reversed) this.alternate();\n    return this.resume();\n  }\n\n  /** @return {this} */\n  reverse() {\n    if (!this._reversed) this.alternate();\n    return this.resume();\n  }\n\n  // TODO: Move all the animation / tweens / children related code to Animation / Timeline\n\n  /** @return {this} */\n  cancel() {\n    if (this._hasChildren) {\n      forEachChildren(this, (/** @type {Renderable} */child) => child.cancel(), true);\n    } else {\n      forEachChildren(this, removeTweenSliblings);\n    }\n    this._cancelled = 1;\n    // Pausing the timer removes it from the engine\n    return this.pause();\n  }\n\n  /**\n   * @param  {Number} newDuration\n   * @return {this}\n   */\n  stretch(newDuration) {\n    const currentDuration = this.duration;\n    const normlizedDuration = normalizeTime(newDuration);\n    if (currentDuration === normlizedDuration) return this;\n    const timeScale = newDuration / currentDuration;\n    const isSetter = newDuration <= minValue;\n    this.duration = isSetter ? minValue : normlizedDuration;\n    this.iterationDuration = isSetter ? minValue : normalizeTime(this.iterationDuration * timeScale);\n    this._offset *= timeScale;\n    this._delay *= timeScale;\n    this._loopDelay *= timeScale;\n    return this;\n  }\n\n /**\n   * Cancels the timer by seeking it back to 0 and reverting the attached scroller if necessary\n   * @return {this}\n   */\n  revert() {\n    tick(this, 0, 1, 0, tickModes.AUTO);\n    const ap = /** @type {ScrollObserver} */(this._autoplay);\n    if (ap && ap.linked && ap.linked === this) ap.revert();\n    return this.cancel();\n  }\n\n /**\n   * Imediatly completes the timer, cancels it and triggers the onComplete callback\n   * @param  {Boolean|Number} [muteCallbacks]\n   * @return {this}\n   */\n  complete(muteCallbacks = 0) {\n    return this.seek(this.duration, muteCallbacks).cancel();\n  }\n\n  /**\n   * @typedef {this & {then: null}} ResolvedTimer\n   */\n\n  /**\n   * @param  {Callback<ResolvedTimer>} [callback]\n   * @return Promise<this>\n   */\n  then(callback = noop) {\n    const then = this.then;\n    const onResolve = () => {\n      // this.then = null prevents infinite recursion if returned by an async function\n      // https://github.com/juliangarnierorg/anime-beta/issues/26\n      this.then = null;\n      callback(/** @type {ResolvedTimer} */(this));\n      this.then = then;\n      this._resolve = noop;\n    };\n    return new Promise(r => {\n      this._resolve = () => r(onResolve());\n      // Make sure to resolve imediatly if the timer has already completed\n      if (this.completed) this._resolve();\n      return this;\n    });\n  }\n\n}\n\n/**\n * @param {TimerParams} [parameters]\n * @return {Timer}\n */\nconst createTimer = parameters => new Timer(parameters, null, 0).init();\n\nexport { Timer, createTimer };\n", "/**\n * Anime.js - core - ESM\n * @version v4.5.0\n * @license MIT\n * @copyright 2026 - Julian Garnier\n */\n\nimport { scope } from './globals.js';\nimport { isRegisteredTargetSymbol, isDomSymbol, isSvgSymbol, transformsSymbol, isBrowser } from './consts.js';\nimport { isSvg, isNil, isArr, isStr } from './helpers.js';\n\n/**\n* @import {\n*   DOMTarget,\n*   DOMTargetsParam,\n*   JSTargetsArray,\n*   TargetsParam,\n*   JSTargetsParam,\n*   TargetsArray,\n*   DOMTargetsArray,\n* } from '../types/index.js'\n*/\n\n/**\n * @param  {DOMTargetsParam|TargetsParam} v\n * @return {NodeList|HTMLCollection}\n */\nfunction getNodeList(v) {\n  const n = isStr(v) ? scope.root.querySelectorAll(v) : v;\n  if (n instanceof NodeList || n instanceof HTMLCollection) return n;\n}\n\n/**\n * @overload\n * @param  {DOMTargetsParam} targets\n * @return {DOMTargetsArray}\n *\n * @overload\n * @param  {JSTargetsParam} targets\n * @return {JSTargetsArray}\n *\n * @overload\n * @param  {TargetsParam} targets\n * @return {TargetsArray}\n *\n * @param  {DOMTargetsParam|JSTargetsParam|TargetsParam} targets\n */\nfunction parseTargets(targets) {\n  if (isNil(targets)) return /** @type {TargetsArray} */([]);\n  if (!isBrowser) return /** @type {JSTargetsArray} */(isArr(targets) && targets.flat(Infinity) || [targets]);\n  if (isArr(targets)) {\n    const flattened = targets.flat(Infinity);\n    /** @type {TargetsArray} */\n    const parsed = [];\n    for (let i = 0, l = flattened.length; i < l; i++) {\n      const item = flattened[i];\n      if (!isNil(item)) {\n        const nodeList = getNodeList(item);\n        if (nodeList) {\n          for (let j = 0, jl = nodeList.length; j < jl; j++) {\n            const subItem = nodeList[j];\n            if (!isNil(subItem)) {\n              let isDuplicate = false;\n              for (let k = 0, kl = parsed.length; k < kl; k++) {\n                if (parsed[k] === subItem) {\n                  isDuplicate = true;\n                  break;\n                }\n              }\n              if (!isDuplicate) {\n                parsed.push(subItem);\n              }\n            }\n          }\n        } else {\n          let isDuplicate = false;\n          for (let j = 0, jl = parsed.length; j < jl; j++) {\n            if (parsed[j] === item) {\n              isDuplicate = true;\n              break;\n            }\n          }\n          if (!isDuplicate) {\n            parsed.push(item);\n          }\n        }\n      }\n    }\n    return parsed;\n  }\n  const nodeList = getNodeList(targets);\n  if (nodeList) return /** @type {DOMTargetsArray} */(Array.from(nodeList));\n  return /** @type {TargetsArray} */([targets]);\n}\n\n/**\n * @overload\n * @param  {DOMTargetsParam} targets\n * @return {DOMTargetsArray}\n *\n * @overload\n * @param  {JSTargetsParam} targets\n * @return {JSTargetsArray}\n *\n * @overload\n * @param  {TargetsParam} targets\n * @return {TargetsArray}\n *\n * @param  {DOMTargetsParam|JSTargetsParam|TargetsParam} targets\n */\nfunction registerTargets(targets) {\n  const parsedTargetsArray = parseTargets(targets);\n  const parsedTargetsLength = parsedTargetsArray.length;\n  for (let i = 0; i < parsedTargetsLength; i++) {\n    const target = parsedTargetsArray[i];\n    if (!target[isRegisteredTargetSymbol]) {\n      target[isRegisteredTargetSymbol] = true;\n      const isSvgType = isSvg(target);\n      const isDom = /** @type {DOMTarget} */(target).nodeType || isSvgType;\n      if (isDom) {\n        target[isDomSymbol] = true;\n        target[isSvgSymbol] = isSvgType;\n        target[transformsSymbol] = {};\n      }\n    }\n  }\n  return parsedTargetsArray;\n}\n\nexport { getNodeList, parseTargets, registerTargets };\n", "/**\n * Anime.js - core - ESM\n * @version v4.5.0\n * @license MIT\n * @copyright 2026 - Julian Garnier\n */\n\nimport { valueTypes, doc } from './consts.js';\nimport { isUnd, PI } from './helpers.js';\n\nconst angleUnitsMap = { 'deg': 1, 'rad': 180 / PI, 'turn': 360 };\nconst convertedValuesCache = {};\n\n/**\n* @import {\n*   DOMTarget,\n*   TweenDecomposedValue,\n* } from '../types/index.js'\n*/\n\n/**\n * @param  {DOMTarget} el\n * @param  {TweenDecomposedValue} decomposedValue\n * @param  {String} unit\n * @param  {Boolean} [force]\n * @return {TweenDecomposedValue}\n */\nconst convertValueUnit = (el, decomposedValue, unit, force = false) => {\n  const currentUnit = decomposedValue.u;\n  const currentNumber = decomposedValue.n;\n  if (decomposedValue.t === valueTypes.UNIT && currentUnit === unit) { // TODO: Check if checking against the same unit string is necessary\n    return decomposedValue;\n  }\n  const cachedKey = currentNumber + currentUnit + unit;\n  const cached = convertedValuesCache[cachedKey];\n  if (!isUnd(cached) && !force) {\n    decomposedValue.n = cached;\n  } else {\n    let convertedValue;\n    if (currentUnit in angleUnitsMap) {\n      convertedValue = currentNumber * angleUnitsMap[currentUnit] / angleUnitsMap[unit];\n    } else {\n      const baseline = 100;\n      const tempEl = /** @type {DOMTarget} */(el.cloneNode());\n      const parentNode = el.parentNode;\n      const parentEl = (parentNode && (parentNode !== doc)) ? parentNode : doc.body;\n      parentEl.appendChild(tempEl);\n      const elStyle = tempEl.style;\n      elStyle.width = baseline + currentUnit;\n      const currentUnitWidth = /** @type {HTMLElement} */(tempEl).offsetWidth || baseline;\n      elStyle.width = baseline + unit;\n      const newUnitWidth = /** @type {HTMLElement} */(tempEl).offsetWidth || baseline;\n      const factor = currentUnitWidth / newUnitWidth;\n      parentEl.removeChild(tempEl);\n      convertedValue = factor * currentNumber;\n    }\n    decomposedValue.n = convertedValue;\n    convertedValuesCache[cachedKey] = convertedValue;\n  }\n  decomposedValue.t === valueTypes.UNIT;\n  decomposedValue.u = unit;\n  return decomposedValue;\n};\n\nexport { convertValueUnit };\n", "/**\n * Anime.js - easings - ESM\n * @version v4.5.0\n * @license MIT\n * @copyright 2026 - Julian Garnier\n */\n\n/**\n * @import {\n *   EasingFunction,\n * } from '../types/index.js'\n*/\n\n/** @type {EasingFunction} */\nconst none = t => t;\n\nexport { none };\n", "/**\n * Anime.js - easings - ESM\n * @version v4.5.0\n * @license MIT\n * @copyright 2026 - Julian Garnier\n */\n\nimport { emptyString, minValue } from '../../core/consts.js';\nimport { pow, sin, sqrt, cos, isStr, stringStartsWith, isFnc, clamp, asin, PI } from '../../core/helpers.js';\nimport { none } from '../none.js';\n\n/**\n * @import {\n *   EasingFunction,\n *   EasingFunctionWithParams,\n *   EasingParam,\n *   BackEasing,\n *   ElasticEasing,\n *   PowerEasing,\n * } from '../../types/index.js'\n*/\n\n\n/** @type {PowerEasing} */\nconst easeInPower = (p = 1.68) => t => pow(t, +p);\n\n/**\n * @callback EaseType\n * @param {EasingFunction} Ease\n * @return {EasingFunction}\n */\n\n/** @type {Record<String, EaseType>} */\nconst easeTypes = {\n  in: easeIn => t => easeIn(t),\n  out: easeIn => t => 1 - easeIn(1 - t),\n  inOut: easeIn => t => t < .5 ? easeIn(t * 2) / 2 : 1 - easeIn(t * -2 + 2) / 2,\n  outIn: easeIn => t => t < .5 ? (1 - easeIn(1 - t * 2)) / 2 : (easeIn(t * 2 - 1) + 1) / 2,\n};\n\n/**\n * Easing functions adapted and simplified from https://robertpenner.com/easing/\n * (c) 2001 Robert Penner\n */\n\nconst halfPI = PI / 2;\nconst doublePI = PI * 2;\n\n/** @type {Record<String, EasingFunctionWithParams|EasingFunction>} */\nconst easeInFunctions = {\n  [emptyString]: easeInPower,\n  Quad: easeInPower(2),\n  Cubic: easeInPower(3),\n  Quart: easeInPower(4),\n  Quint: easeInPower(5),\n  /** @type {EasingFunction} */\n  Sine: t => 1 - cos(t * halfPI),\n  /** @type {EasingFunction} */\n  Circ: t => 1 - sqrt(1 - t * t),\n  /** @type {EasingFunction} */\n  Expo: t => t ? pow(2, 10 * t - 10) : 0,\n  /** @type {EasingFunction} */\n  Bounce: t => {\n    let pow2, b = 4;\n    while (t < ((pow2 = pow(2, --b)) - 1) / 11);\n    return 1 / pow(4, 3 - b) - 7.5625 * pow((pow2 * 3 - 2) / 22 - t, 2);\n  },\n  /** @type {BackEasing} */\n  Back: (overshoot = 1.7) => t => (+overshoot + 1) * t * t * t - +overshoot * t * t,\n  /** @type {ElasticEasing} */\n  Elastic: (amplitude = 1, period = .3) => {\n    const a = clamp(+amplitude, 1, 10);\n    const p = clamp(+period, minValue, 2);\n    const s = (p / doublePI) * asin(1 / a);\n    const e = doublePI / p;\n    return t => t === 0 || t === 1 ? t : -a * pow(2, -10 * (1 - t)) * sin(((1 - t) - s) * e);\n  }\n};\n\n/**\n * @typedef  {Object} EasesFunctions\n * @property {EasingFunction} linear\n * @property {EasingFunction} none\n * @property {PowerEasing} in\n * @property {PowerEasing} out\n * @property {PowerEasing} inOut\n * @property {PowerEasing} outIn\n * @property {EasingFunction} inQuad\n * @property {EasingFunction} outQuad\n * @property {EasingFunction} inOutQuad\n * @property {EasingFunction} outInQuad\n * @property {EasingFunction} inCubic\n * @property {EasingFunction} outCubic\n * @property {EasingFunction} inOutCubic\n * @property {EasingFunction} outInCubic\n * @property {EasingFunction} inQuart\n * @property {EasingFunction} outQuart\n * @property {EasingFunction} inOutQuart\n * @property {EasingFunction} outInQuart\n * @property {EasingFunction} inQuint\n * @property {EasingFunction} outQuint\n * @property {EasingFunction} inOutQuint\n * @property {EasingFunction} outInQuint\n * @property {EasingFunction} inSine\n * @property {EasingFunction} outSine\n * @property {EasingFunction} inOutSine\n * @property {EasingFunction} outInSine\n * @property {EasingFunction} inCirc\n * @property {EasingFunction} outCirc\n * @property {EasingFunction} inOutCirc\n * @property {EasingFunction} outInCirc\n * @property {EasingFunction} inExpo\n * @property {EasingFunction} outExpo\n * @property {EasingFunction} inOutExpo\n * @property {EasingFunction} outInExpo\n * @property {EasingFunction} inBounce\n * @property {EasingFunction} outBounce\n * @property {EasingFunction} inOutBounce\n * @property {EasingFunction} outInBounce\n * @property {BackEasing} inBack\n * @property {BackEasing} outBack\n * @property {BackEasing} inOutBack\n * @property {BackEasing} outInBack\n * @property {ElasticEasing} inElastic\n * @property {ElasticEasing} outElastic\n * @property {ElasticEasing} inOutElastic\n * @property {ElasticEasing} outInElastic\n */\n\nconst eases = (/*#__PURE__ */ (() => {\n  const list = { linear: none, none: none };\n  for (let type in easeTypes) {\n    for (let name in easeInFunctions) {\n      const easeIn = easeInFunctions[name];\n      const easeType = easeTypes[type];\n      list[type + name] = /** @type {EasingFunctionWithParams|EasingFunction} */(\n        name === emptyString || name === 'Back' || name === 'Elastic' ?\n        (a, b) => easeType(/** @type {EasingFunctionWithParams} */(easeIn)(a, b)) :\n        easeType(/** @type {EasingFunction} */(easeIn))\n      );\n    }\n  }\n  return /** @type {EasesFunctions} */(list);\n})());\n\n/** @type {Record<String, EasingFunction>} */\nconst easesLookups = { linear: none, none: none };\n\n/**\n * @param  {String} string\n * @return {EasingFunction}\n */\nconst parseEaseString = (string) => {\n  if (easesLookups[string]) return easesLookups[string];\n  if (string.indexOf('(') <= -1) {\n    const hasParams = easeTypes[string] || string.includes('Back') || string.includes('Elastic');\n    const parsedFn = /** @type {EasingFunction} */(hasParams ? /** @type {EasingFunctionWithParams} */(eases[string])() : eases[string]);\n    return parsedFn ? easesLookups[string] = parsedFn : none;\n  } else {\n    const split = string.slice(0, -1).split('(');\n    const parsedFn = /** @type {EasingFunctionWithParams} */(eases[split[0]]);\n    return parsedFn ? easesLookups[string] = parsedFn(...split[1].split(',')) : none;\n  }\n};\n\nconst deprecated = ['steps(', 'irregular(', 'linear(', 'cubicBezier('];\n\n/**\n * @param  {EasingParam} ease\n * @return {EasingFunction}\n */\nconst parseEase = ease => {\n  if (isStr(ease)) {\n    for (let i = 0, l = deprecated.length; i < l; i++) {\n      if (stringStartsWith(ease, deprecated[i])) {\n        console.warn(`String syntax for \\`ease: \"${ease}\"\\` has been removed from the core and replaced by importing and passing the easing function directly: \\`ease: ${ease}\\``);\n        return none;\n      }\n    }\n  }\n  const easeFunc = isFnc(ease) ? ease : isStr(ease) ? parseEaseString(/** @type {String} */(ease)) : none;\n  return easeFunc;\n};\n\nexport { easeInPower, easeTypes, eases, parseEase, parseEaseString };\n", "/**\n * Anime.js - animation - ESM\n * @version v4.5.0\n * @license MIT\n * @copyright 2026 - Julian Garnier\n */\n\nimport { K, compositionTypes, valueTypes, emptyArray, minValue, isDomSymbol, tweenTypes } from '../core/consts.js';\nimport { mergeObjects, isUnd, isKey, isObj, cloneArray, isNil, round, addChild, forEachChildren, clampInfinity, normalizeTime, isArr, isNum, isFnc, isStr } from '../core/helpers.js';\nimport { globals } from '../core/globals.js';\nimport { registerTargets } from '../core/targets.js';\nimport { resolveAdapterEntry } from '../adapters/registry.js';\nimport { setValue, getTweenType, getFunctionValue, decomposeRawValue, getOriginalAnimatableValue, createDecomposedValueTargetObject, decomposedOriginalValue, getRelativeValue, composeComplexValue, decomposeTweenValue } from '../core/values.js';\nimport { sanitizePropertyName, revertValues } from '../core/styles.js';\nimport { convertValueUnit } from '../core/units.js';\nimport { parseEase } from '../easings/eases/parser.js';\nimport { Timer } from '../timer/timer.js';\nimport { getTweenSiblings, overrideTween, composeTween } from './composition.js';\nimport { additive } from './additive.js';\n\n/**\n * @import {\n *   Tween,\n *   TweenKeyValue,\n *   TweenParamsOptions,\n *   TweenValues,\n *   DurationKeyframes,\n *   PercentageKeyframes,\n *   AnimationParams,\n *   TweenPropValue,\n *   ArraySyntaxValue,\n *   TargetsParam,\n *   TimerParams,\n *   TweenParamValue,\n *   DOMTarget,\n *   TargetsArray,\n *   Callback,\n *   EasingFunction,\n * } from '../types/index.js'\n *\n * @import {\n *   Timeline,\n * } from '../timeline/timeline.js'\n *\n * @import {\n *   Spring,\n * } from '../easings/spring/index.js'\n */\n\n// Defines decomposed values target objects only once and mutate their properties later to avoid GC\n// TODO: Maybe move the objects creation to values.js and use the decompose function to create the base object\nconst fromTargetObject = createDecomposedValueTargetObject();\nconst toTargetObject = createDecomposedValueTargetObject();\nconst inlineStylesStore = {};\nconst toFunctionStore = { func: null };\nconst fromFunctionStore = { func: null };\nconst keyframesTargetArray = [null];\nconst fastSetValuesArray = [null, null];\n/** @type {TweenKeyValue} */\nconst keyObjectTarget = { to: null };\n\nlet tweenId = 0;\nlet JSAnimationId = 0;\nlet keyframes;\n/** @type {TweenParamsOptions & TweenValues} */\nlet key;\n\n/**\n * @param {DurationKeyframes | PercentageKeyframes} keyframes\n * @param {AnimationParams} parameters\n * @return {AnimationParams}\n */\nconst generateKeyframes = (keyframes, parameters) => {\n  /** @type {AnimationParams} */\n  const properties = {};\n  if (isArr(keyframes)) {\n    const propertyNames = [].concat(.../** @type {DurationKeyframes} */(keyframes).map(key => Object.keys(key))).filter(isKey);\n    for (let i = 0, l = propertyNames.length; i < l; i++) {\n      const propName = propertyNames[i];\n      const propArray = /** @type {DurationKeyframes} */(keyframes).map(key => {\n        /** @type {TweenKeyValue} */\n        const newKey = {};\n        for (let p in key) {\n          const keyValue = /** @type {TweenPropValue} */(key[p]);\n          if (isKey(p)) {\n            if (p === propName) {\n              newKey.to = keyValue;\n            }\n          } else {\n            newKey[p] = keyValue;\n          }\n        }\n        return newKey;\n      });\n      properties[propName] = /** @type {ArraySyntaxValue} */(propArray);\n    }\n\n  } else {\n    const totalDuration = /** @type {Number} */(setValue(parameters.duration, globals.defaults.duration));\n    const keys = Object.keys(keyframes)\n    .map(key => { return {o: parseFloat(key) / 100, p: keyframes[key]} })\n    .sort((a, b) => a.o - b.o);\n    keys.forEach(key => {\n      const offset = key.o;\n      const prop = key.p;\n      for (let name in prop) {\n        if (isKey(name)) {\n          let propArray = /** @type {Array} */(properties[name]);\n          if (!propArray) propArray = properties[name] = [];\n          const duration = offset * totalDuration;\n          let length = propArray.length;\n          let prevKey = propArray[length - 1];\n          const keyObj = { to: prop[name] };\n          let durProgress = 0;\n          for (let i = 0; i < length; i++) {\n            durProgress += propArray[i].duration;\n          }\n          if (length === 1) {\n            keyObj.from = prevKey.to;\n          }\n          if (prop.ease) {\n            keyObj.ease = prop.ease;\n          }\n          keyObj.duration = duration - (length ? durProgress : 0);\n          propArray.push(keyObj);\n        }\n      }\n      return key;\n    });\n\n    for (let name in properties) {\n      const propArray = /** @type {Array} */(properties[name]);\n      let prevEase;\n      // let durProgress = 0\n      for (let i = 0, l = propArray.length; i < l; i++) {\n        const prop = propArray[i];\n        // Emulate WAPPI easing parameter position\n        const currentEase = prop.ease;\n        prop.ease = prevEase ? prevEase : undefined;\n        prevEase = currentEase;\n        // durProgress += prop.duration;\n        // if (i === l - 1 && durProgress !== totalDuration) {\n        //   propArray.push({ from: prop.to, ease: prop.ease, duration: totalDuration - durProgress })\n        // }\n      }\n      if (!propArray[0].duration) {\n        propArray.shift();\n      }\n    }\n\n  }\n\n  return properties;\n};\n\nclass JSAnimation extends Timer {\n  /**\n   * @param {TargetsParam} targets\n   * @param {AnimationParams} parameters\n   * @param {Timeline} [parent]\n   * @param {Number} [parentPosition]\n   * @param {Boolean} [fastSet=false]\n   * @param {Number} [index=0]\n   * @param {TargetsArray} [allTargets]\n   */\n  constructor(\n    targets,\n    parameters,\n    parent,\n    parentPosition,\n    fastSet = false,\n    index = 0,\n    allTargets\n  ) {\n\n    super(/** @type {TimerParams & AnimationParams} */(parameters), parent, parentPosition);\n\n    /** @type {Tween} */\n    this._head;\n    /** @type {Tween} */\n    this._tail;\n\n    ++JSAnimationId;\n\n    const parsedTargets = registerTargets(targets);\n    const targetsLength = parsedTargets.length;\n\n    // If the parameters object contains a \"keyframes\" property, convert all the keyframes values to regular properties\n\n    const kfParams = /** @type {AnimationParams} */(parameters).keyframes;\n    const params = /** @type {AnimationParams} */(kfParams ? mergeObjects(generateKeyframes(/** @type {DurationKeyframes} */(kfParams), parameters), parameters) : parameters);\n\n    const {\n      id,\n      delay,\n      duration,\n      ease,\n      playbackEase,\n      modifier,\n      composition,\n      onRender,\n    } = params;\n\n    const animDefaults = parent ? parent.defaults : globals.defaults;\n    const animEase = setValue(ease, animDefaults.ease);\n    const animPlaybackEase = setValue(playbackEase, animDefaults.playbackEase);\n    const parsedAnimPlaybackEase = animPlaybackEase ? parseEase(animPlaybackEase) : null;\n    const hasSpring = !isUnd(/** @type {Spring} */(animEase).ease);\n    const tEasing = hasSpring ? /** @type {Spring} */(animEase).ease : setValue(ease, parsedAnimPlaybackEase ? 'linear' : animDefaults.ease);\n    const tDuration = hasSpring ? /** @type {Spring} */(animEase).settlingDuration : setValue(duration, animDefaults.duration);\n    const tDelay = setValue(delay, animDefaults.delay);\n    const tModifier = modifier || animDefaults.modifier;\n    // If no composition is defined and the targets length is high (>= 1000) set the composition to 'none' (0) for faster tween creation\n    const tComposition = isUnd(composition) && targetsLength >= K ? compositionTypes.none : !isUnd(composition) ? composition : animDefaults.composition;\n    // const absoluteOffsetTime = this._offset;\n    const absoluteOffsetTime = this._offset + (parent ? parent._offset : 0);\n    // This allows targeting the current animation in the spring onComplete callback\n    if (hasSpring) /** @type {Spring} */(animEase).parent = this;\n\n    let iterationDuration = NaN;\n    let iterationDelay = NaN;\n    let animationAnimationLength = 0;\n    let shouldTriggerRender = 0;\n\n    for (let targetIndex = 0; targetIndex < targetsLength; targetIndex++) {\n\n      const target = parsedTargets[targetIndex];\n      const ti = index || targetIndex;\n      const tl = allTargets || parsedTargets;\n\n      let lastTransformGroupIndex = NaN;\n      let lastTransformGroupLength = NaN;\n\n      for (let p in params) {\n\n        if (isKey(p)) {\n\n          const tweenType = getTweenType(target, p);\n          const adapterProp = resolveAdapterEntry(target, p);\n\n          const propName = sanitizePropertyName(p, target, tweenType);\n\n          let propValue = params[p];\n\n          const isPropValueArray = isArr(propValue);\n\n          if (fastSet && !isPropValueArray) {\n            fastSetValuesArray[0] = propValue;\n            fastSetValuesArray[1] = propValue;\n            propValue = fastSetValuesArray;\n          }\n\n          // TODO: Allow nested keyframes inside ObjectValue value (prop: { to: [.5, 1, .75, 2, 3] })\n          // Normalize property values to valid keyframe syntax:\n          // [x, y] to [{to: [x, y]}] or {to: x} to [{to: x}] or keep keys syntax [{}, {}, {}...]\n          // const keyframes = isArr(propValue) ? propValue.length === 2 && !isObj(propValue[0]) ? [{ to: propValue }] : propValue : [propValue];\n          if (isPropValueArray) {\n            const arrayLength = /** @type {Array} */(propValue).length;\n            const isNotObjectValue = !isObj(propValue[0]);\n            // Convert [x, y] to [{to: [x, y]}]\n            if (arrayLength === 2 && isNotObjectValue) {\n              keyObjectTarget.to = /** @type {TweenParamValue} */(/** @type {unknown} */(propValue));\n              keyframesTargetArray[0] = keyObjectTarget;\n              keyframes = keyframesTargetArray;\n            // Convert [x, y, z] to [[x, y], z]\n            } else if (arrayLength > 2 && isNotObjectValue) {\n              keyframes = [];\n              /** @type {Array.<Number>} */(propValue).forEach((v, i) => {\n                if (!i) {\n                  fastSetValuesArray[0] = v;\n                } else if (i === 1) {\n                  fastSetValuesArray[1] = v;\n                  keyframes.push(fastSetValuesArray);\n                } else {\n                  keyframes.push(v);\n                }\n              });\n            } else {\n              keyframes = /** @type {Array.<TweenKeyValue>} */(propValue);\n            }\n          } else {\n            keyframesTargetArray[0] = propValue;\n            keyframes = keyframesTargetArray;\n          }\n\n          let siblings = null;\n          let prevTween = null;\n          let firstTweenChangeStartTime = NaN;\n          let lastTweenChangeEndTime = 0;\n          let tweenIndex = 0;\n\n          for (let l = keyframes.length; tweenIndex < l; tweenIndex++) {\n\n            const keyframe = keyframes[tweenIndex];\n\n            if (isObj(keyframe)) {\n              key = keyframe;\n            } else {\n              keyObjectTarget.to = /** @type {TweenParamValue} */(keyframe);\n              key = keyObjectTarget;\n            }\n\n            toFunctionStore.func = null;\n            fromFunctionStore.func = null;\n\n            const computedComposition = getFunctionValue(setValue(key.composition, tComposition), target, ti, tl, null, null);\n            const tweenComposition = isNum(computedComposition) ? computedComposition : compositionTypes[computedComposition];\n            if (!siblings && tweenComposition !== compositionTypes.none) siblings = getTweenSiblings(target, propName);\n            // Timelines pass the last sibling tween if it belongs to the same timeline\n            // Standalone animations only pass prevTween when the property has multiple keyframes\n            const tailTween = siblings ? siblings._tail : null;\n            const prevSiblingTween = parent && tailTween && tailTween.parent.parent === parent ? tailTween : prevTween;\n            const computedToValue = getFunctionValue(key.to, target, ti, tl, toFunctionStore, prevSiblingTween);\n\n            let tweenToValue;\n            // Allows function based values to return an object syntax value ({to: v})\n            if (isObj(computedToValue) && !isUnd(computedToValue.to)) {\n              key = computedToValue;\n              tweenToValue = computedToValue.to;\n            } else {\n              tweenToValue = computedToValue;\n            }\n            const tweenFromValue = getFunctionValue(key.from, target, ti, tl, fromFunctionStore, prevSiblingTween);\n            const easeToParse = key.ease || tEasing;\n\n            const easeFunctionResult = getFunctionValue(easeToParse, target, ti, tl, null, prevSiblingTween);\n            const keyEasing = isFnc(easeFunctionResult) || isStr(easeFunctionResult) ? easeFunctionResult : easeToParse;\n\n            const hasSpring = !isUnd(keyEasing) && !isUnd(/** @type {Spring} */(keyEasing).ease);\n            const tweenEasing = hasSpring ? /** @type {Spring} */(keyEasing).ease : keyEasing;\n            // Calculate default individual keyframe duration by dividing the tl of keyframes\n            const tweenDuration = hasSpring ? /** @type {Spring} */(keyEasing).settlingDuration : getFunctionValue(setValue(key.duration, (l > 1 ? getFunctionValue(tDuration, target, ti, tl, null, prevSiblingTween) / l : tDuration)), target, ti, tl, null, prevSiblingTween);\n            // Default delay value should only be applied to the first tween\n            const tweenDelay = getFunctionValue(setValue(key.delay, (!tweenIndex ? tDelay : 0)), target, ti, tl, null, prevSiblingTween);\n            // Modifiers are treated differently and don't accept function based value to prevent having to pass a function wrapper\n            const tweenModifier = key.modifier || tModifier;\n            const hasFromvalue = !isUnd(tweenFromValue);\n            const hasToValue = !isUnd(tweenToValue);\n            const isFromToArray = isArr(tweenToValue);\n            const isFromToValue = isFromToArray || (hasFromvalue && hasToValue);\n            // Capture the update-start in local time, the previous sibling's end for keyframes after the first, zero for the first keyframe. Used to derive a precision-matched _absoluteUpdateStartTime below.\n            const tweenUpdateStartLocal = prevTween ? lastTweenChangeEndTime : 0;\n            const tweenStartTime = prevTween ? lastTweenChangeEndTime + tweenDelay : tweenDelay;\n            // Rounding is necessary here to minimize floating point errors when working in seconds\n            const absoluteStartTime = round(absoluteOffsetTime + tweenStartTime, 12);\n            // Match the rounding pattern of prevSibling._absoluteEndTime so the composition overlap check compares cleanly when keyframes touch at a boundary.\n            const absoluteUpdateStartTime = round(absoluteOffsetTime + tweenUpdateStartLocal, 12);\n\n            // Force a onRender callback if the animation contains at least one from value and autoplay is set to false\n            if (!shouldTriggerRender && (hasFromvalue || isFromToArray)) shouldTriggerRender = 1;\n\n            let prevSibling = prevTween;\n\n            if (tweenComposition !== compositionTypes.none) {\n              let nextSibling = siblings._head;\n              // Walk prior siblings up to the new tween, skipping overridden ones so the chain resolves to the latest live value instead of stopping at the first override.\n              while (nextSibling && nextSibling._absoluteStartTime <= absoluteStartTime) {\n                if (!nextSibling._isOverridden) prevSibling = nextSibling;\n                nextSibling = nextSibling._nextRep;\n                // Overrides all the next siblings if the next sibling starts at the same time of after as the new tween start time\n                if (nextSibling && nextSibling._absoluteStartTime >= absoluteStartTime) {\n                  while (nextSibling) {\n                    overrideTween(nextSibling);\n                    // This will ends both the current while loop and the upper one once all the next sibllings have been overriden\n                    nextSibling = nextSibling._nextRep;\n                  }\n                }\n              }\n            }\n\n            // Decompose values\n            if (isFromToValue) {\n              decomposeRawValue(isFromToArray ? getFunctionValue(tweenToValue[0], target, ti, tl, fromFunctionStore, prevSiblingTween) : tweenFromValue, fromTargetObject);\n              decomposeRawValue(isFromToArray ? getFunctionValue(tweenToValue[1], target, ti, tl, toFunctionStore, prevSiblingTween) : tweenToValue, toTargetObject);\n              // Needed to force an inline style registration\n              const originalValue = getOriginalAnimatableValue(target, propName, tweenType, inlineStylesStore);\n              if (fromTargetObject.t === valueTypes.NUMBER) {\n                if (prevSibling) {\n                  if (prevSibling._valueType === valueTypes.UNIT) {\n                    fromTargetObject.t = valueTypes.UNIT;\n                    fromTargetObject.u = prevSibling._unit;\n                  }\n                } else {\n                  decomposeRawValue(\n                    originalValue,\n                    decomposedOriginalValue\n                  );\n                  if (decomposedOriginalValue.t === valueTypes.UNIT) {\n                    fromTargetObject.t = valueTypes.UNIT;\n                    fromTargetObject.u = decomposedOriginalValue.u;\n                  }\n                }\n              }\n            } else {\n              if (hasToValue) {\n                decomposeRawValue(tweenToValue, toTargetObject);\n              } else {\n                if (prevTween) {\n                  decomposeTweenValue(prevTween, toTargetObject);\n                } else {\n                  // No need to get and parse the original value if the tween is part of a timeline and has a previous sibling part of the same timeline\n                  decomposeRawValue(parent && prevSibling && prevSibling.parent.parent === parent ? prevSibling._value :\n                  getOriginalAnimatableValue(target, propName, tweenType, inlineStylesStore), toTargetObject);\n                }\n              }\n              if (hasFromvalue) {\n                decomposeRawValue(tweenFromValue, fromTargetObject);\n              } else {\n                if (prevTween) {\n                  decomposeTweenValue(prevTween, fromTargetObject);\n                } else {\n                  // No need to get and parse the original value if the tween is part of a timeline and has a previous sibling part of the same timeline\n                  decomposeRawValue(parent && prevSibling && prevSibling.parent.parent === parent ? prevSibling._value :\n                  getOriginalAnimatableValue(target, propName, tweenType, inlineStylesStore), fromTargetObject);\n                }\n              }\n            }\n\n            // Apply operators\n            if (fromTargetObject.o) {\n              fromTargetObject.n = getRelativeValue(\n                !prevSibling ? decomposeRawValue(\n                  getOriginalAnimatableValue(target, propName, tweenType, inlineStylesStore),\n                  decomposedOriginalValue\n                ).n : prevSibling._toNumber,\n                fromTargetObject.n,\n                fromTargetObject.o\n              );\n            }\n\n            if (toTargetObject.o) {\n              toTargetObject.n = getRelativeValue(fromTargetObject.n, toTargetObject.n, toTargetObject.o);\n            }\n\n            // Values omogenisation in cases of type difference between \"from\" and \"to\"\n            if (fromTargetObject.t !== toTargetObject.t) {\n              if (fromTargetObject.t === valueTypes.COMPLEX || toTargetObject.t === valueTypes.COMPLEX) {\n                const complexValue = fromTargetObject.t === valueTypes.COMPLEX ? fromTargetObject : toTargetObject;\n                const notComplexValue = fromTargetObject.t === valueTypes.COMPLEX ? toTargetObject : fromTargetObject;\n                notComplexValue.t = valueTypes.COMPLEX;\n                notComplexValue.s = cloneArray(complexValue.s);\n                notComplexValue.d = complexValue.d.map(() => notComplexValue.n);\n              } else if (fromTargetObject.t === valueTypes.UNIT || toTargetObject.t === valueTypes.UNIT) {\n                const unitValue = fromTargetObject.t === valueTypes.UNIT ? fromTargetObject : toTargetObject;\n                const notUnitValue = fromTargetObject.t === valueTypes.UNIT ? toTargetObject : fromTargetObject;\n                notUnitValue.t = valueTypes.UNIT;\n                notUnitValue.u = unitValue.u;\n              } else if (fromTargetObject.t === valueTypes.COLOR || toTargetObject.t === valueTypes.COLOR) {\n                const colorValue = fromTargetObject.t === valueTypes.COLOR ? fromTargetObject : toTargetObject;\n                const notColorValue = fromTargetObject.t === valueTypes.COLOR ? toTargetObject : fromTargetObject;\n                notColorValue.t = valueTypes.COLOR;\n                notColorValue.d = colorValue.d.map(() => 0);\n              }\n            }\n\n            // Unit conversion\n            if (fromTargetObject.u !== toTargetObject.u) {\n              let valueToConvert = toTargetObject.u ? fromTargetObject : toTargetObject;\n              valueToConvert = convertValueUnit(/** @type {DOMTarget} */(target), valueToConvert, toTargetObject.u ? toTargetObject.u : fromTargetObject.u, false);\n              // TODO:\n              // convertValueUnit(target, to.u ? from : to, to.u ? to.u : from.u);\n            }\n\n            // Fill in non existing complex values\n            if (toTargetObject.d && fromTargetObject.d && (toTargetObject.d.length !== fromTargetObject.d.length)) {\n              const longestValue = fromTargetObject.d.length > toTargetObject.d.length ? fromTargetObject : toTargetObject;\n              const shortestValue = longestValue === fromTargetObject ? toTargetObject : fromTargetObject;\n              // TODO: Check if n should be used instead of 0 for default complex values\n              shortestValue.d = longestValue.d.map((/** @type {Number} */_, /** @type {Number} */i) => isUnd(shortestValue.d[i]) ? 0 : shortestValue.d[i]);\n              shortestValue.s = cloneArray(longestValue.s);\n            }\n\n            // Tween factory\n\n            // Rounding is necessary here to minimize floating point errors when working in seconds\n            const tweenUpdateDuration = round(+tweenDuration || minValue, 12);\n\n            // Copy the value of the iniline style if it exist and imediatly nullify it to prevents false positive on other targets\n            let inlineValue = inlineStylesStore[propName];\n            if (!isNil(inlineValue)) inlineStylesStore[propName] = null;\n\n            // Resolve the adapter setter once so render skips the lookup per frame.\n            const tweenSetter = adapterProp ? adapterProp.set : null;\n\n            // Rounding is necessary here to minimize floating point errors when working in seconds\n            lastTweenChangeEndTime = round(tweenStartTime + tweenUpdateDuration, 12);\n\n            const fromD = fromTargetObject.d;\n            const toD = toTargetObject.d;\n            const toS = toTargetObject.s;\n\n            /** @type {Tween} */\n            const tween = {\n              parent: this,\n              id: tweenId++,\n              property: propName,\n              target: target,\n              _value: null,\n              _toFunc: toFunctionStore.func,\n              _fromFunc: fromFunctionStore.func,\n              _ease: parseEase(tweenEasing),\n              _fromNumbers: fromD ? cloneArray(fromD) : emptyArray,\n              _toNumbers: toD ? cloneArray(toD) : emptyArray,\n              _strings: toS ? cloneArray(toS) : emptyArray,\n              _fromNumber: fromTargetObject.n,\n              _toNumber: toTargetObject.n,\n              _numbers: fromD ? cloneArray(fromD) : emptyArray, // For additive tween and animatables\n              _number: fromTargetObject.n, // For additive tween and animatables\n              _unit: toTargetObject.u,\n              _modifier: tweenModifier,\n              _currentTime: 0,\n              _startTime: tweenStartTime,\n              _delay: +tweenDelay,\n              _updateDuration: tweenUpdateDuration,\n              _changeDuration: tweenUpdateDuration,\n              _absoluteStartTime: absoluteStartTime,\n              _absoluteUpdateStartTime: absoluteUpdateStartTime,\n              _absoluteEndTime: round(absoluteOffsetTime + lastTweenChangeEndTime, 12),\n              _hasFromValue: hasFromvalue || isFromToArray ? 1 : 0,\n              // NOTE: Investigate bit packing to stores ENUM / BOOL\n              _tweenType: tweenType,\n              _setter: tweenSetter,\n              _valueType: toTargetObject.t,\n              _composition: tweenComposition,\n              _isOverlapped: 0,\n              _isOverridden: 0,\n              _renderTransforms: 0,\n              _inlineValue: inlineValue,\n              _prevRep: null, // For replaced tween\n              _nextRep: null, // For replaced tween\n              _prevAdd: null, // For additive tween\n              _nextAdd: null, // For additive tween\n              _prev: null,\n              _next: null,\n            };\n\n            if (tweenComposition !== compositionTypes.none) {\n              composeTween(tween, siblings);\n            }\n\n            // Pre-compute the tween end value for function-based value chaining (ie morphTo / scrambleText in keyframe arrays and timelines)\n            const vt = tween._valueType;\n            if (vt === valueTypes.COMPLEX) {\n              tween._value = composeComplexValue(tween, 1, -1);\n            } else if (vt === valueTypes.UNIT) {\n              tween._value = `${tweenModifier(tween._toNumber)}${tween._unit}`;\n            } else if (vt === valueTypes.COLOR) {\n              const d = toTargetObject.d;\n              tween._value = `rgba(${round(d[0], 0)},${round(d[1], 0)},${round(d[2], 0)},${d[3]})`;\n            } else {\n              tween._value = tweenModifier(tween._toNumber);\n            }\n\n            if (isNaN(firstTweenChangeStartTime)) {\n              firstTweenChangeStartTime = tween._startTime;\n            }\n\n            prevTween = tween;\n            animationAnimationLength++;\n\n            addChild(this, tween);\n\n          }\n\n          // Update animation timings with the added tweens properties\n\n          if (isNaN(iterationDelay) || firstTweenChangeStartTime < iterationDelay) {\n            iterationDelay = firstTweenChangeStartTime;\n          }\n\n          if (isNaN(iterationDuration) || lastTweenChangeEndTime > iterationDuration) {\n            iterationDuration = lastTweenChangeEndTime;\n          }\n\n          // TODO: Find a way to inline tween._renderTransforms = 1 here\n          if (tweenType === tweenTypes.TRANSFORM) {\n            lastTransformGroupIndex = animationAnimationLength - tweenIndex;\n            lastTransformGroupLength = animationAnimationLength;\n          }\n\n        }\n\n      }\n\n      // Set _renderTransforms to last transform property to correctly render the transforms list\n      if (!isNaN(lastTransformGroupIndex)) {\n        let i = 0;\n        forEachChildren(this, (/** @type {Tween} */tween) => {\n          if (i >= lastTransformGroupIndex && i < lastTransformGroupLength) {\n            tween._renderTransforms = 1;\n            if (tween._composition === compositionTypes.blend) {\n              forEachChildren(additive.animation, (/** @type {Tween} */additiveTween) => {\n                if (additiveTween.id === tween.id) {\n                  additiveTween._renderTransforms = 1;\n                }\n              });\n            }\n          }\n          i++;\n        });\n      }\n\n    }\n\n    if (!targetsLength) {\n      console.warn(`No target found. Make sure the element you're trying to animate is accessible before creating your animation.`);\n    }\n\n    if (iterationDelay) {\n      forEachChildren(this, (/** @type {Tween} */tween) => {\n        // If (startTime - delay) equals 0, this means the tween is at the begining of the animation so we need to trim the delay too\n        if (!(tween._startTime - tween._delay)) {\n          tween._delay -= iterationDelay;\n        }\n        tween._startTime -= iterationDelay;\n      });\n      iterationDuration -= iterationDelay;\n    } else {\n      iterationDelay = 0;\n    }\n\n    // Prevents iterationDuration to be NaN if no valid animatable props have been provided\n    // Prevents _iterationCount to be NaN if no valid animatable props have been provided\n    if (!iterationDuration) {\n      iterationDuration = minValue;\n      this.iterationCount = 0;\n    }\n    /** @type {TargetsArray} */\n    this.targets = parsedTargets;\n    /** @type {String|Number} */\n    this.id = !isUnd(id) ? id : JSAnimationId;\n    /** @type {Number} */\n    this.duration = iterationDuration === minValue ? minValue : clampInfinity(((iterationDuration + this._loopDelay) * this.iterationCount) - this._loopDelay) || minValue;\n    /** @type {Callback<this>} */\n    this.onRender = onRender || animDefaults.onRender;\n    /** @type {EasingFunction} */\n    this._ease = parsedAnimPlaybackEase;\n    /** @type {Number} */\n    this._delay = iterationDelay;\n    // NOTE: I'm keeping delay values separated from offsets in timelines because delays can override previous tweens and it could be confusing to debug a timeline with overridden tweens and no associated visible delays.\n    // this._delay = parent ? 0 : iterationDelay;\n    // this._offset += parent ? iterationDelay : 0;\n    /** @type {Number} */\n    this.iterationDuration = iterationDuration;\n\n    if (!this._autoplay && shouldTriggerRender) this.onRender(this);\n  }\n\n  /**\n   * @param  {Number} newDuration\n   * @return {this}\n   */\n  stretch(newDuration) {\n    const currentDuration = this.duration;\n    if (currentDuration === normalizeTime(newDuration)) return this;\n    const timeScale = newDuration / currentDuration;\n    // NOTE: Find a better way to handle the stretch of an animation after stretch = 0\n    forEachChildren(this, (/** @type {Tween} */tween) => {\n      // Rounding is necessary here to minimize floating point errors\n      tween._updateDuration = normalizeTime(tween._updateDuration * timeScale);\n      tween._changeDuration = normalizeTime(tween._changeDuration * timeScale);\n      tween._currentTime *= timeScale;\n      tween._delay *= timeScale;\n      tween._startTime *= timeScale;\n      tween._absoluteStartTime *= timeScale;\n      tween._absoluteUpdateStartTime *= timeScale;\n      tween._absoluteEndTime *= timeScale;\n    });\n    return super.stretch(newDuration);\n  }\n\n  /**\n   * @return {this}\n   */\n  refresh() {\n    forEachChildren(this, (/** @type {Tween} */tween) => {\n      const toFunc = tween._toFunc;\n      const fromFunc = tween._fromFunc;\n      if (toFunc || fromFunc) {\n        if (fromFunc) {\n          decomposeRawValue(fromFunc(), fromTargetObject);\n          if (fromTargetObject.u !== tween._unit && tween.target[isDomSymbol]) {\n            convertValueUnit(/** @type {DOMTarget} */(tween.target), fromTargetObject, tween._unit, true);\n          }\n          tween._fromNumbers = cloneArray(fromTargetObject.d);\n          tween._fromNumber = fromTargetObject.n;\n        } else if (toFunc) {\n          // When only toFunc exists, get from value from target\n          decomposeRawValue(getOriginalAnimatableValue(tween.target, tween.property, tween._tweenType), decomposedOriginalValue);\n          tween._fromNumbers = cloneArray(decomposedOriginalValue.d);\n          tween._fromNumber = decomposedOriginalValue.n;\n        }\n        if (toFunc) {\n          decomposeRawValue(toFunc(), toTargetObject);\n          tween._toNumbers = cloneArray(toTargetObject.d);\n          tween._strings = cloneArray(toTargetObject.s);\n          // Make sure to apply relative operators https://github.com/juliangarnier/anime/issues/1025\n          tween._toNumber = toTargetObject.o ? getRelativeValue(tween._fromNumber, toTargetObject.n, toTargetObject.o) : toTargetObject.n;\n        }\n      }\n    });\n    // This forces setter animations to render once\n    if (this.duration === minValue) this.restart();\n    return this;\n  }\n\n  /**\n   * Cancel the animation and revert all the values affected by this animation to their original state\n   * @return {this}\n   */\n  revert() {\n    super.revert();\n    return revertValues(this);\n  }\n\n  /**\n   * @typedef {this & {then: null}} ResolvedJSAnimation\n   */\n\n  /**\n   * @param  {Callback<ResolvedJSAnimation>} [callback]\n   * @return Promise<this>\n   */\n  then(callback) {\n    return super.then(callback);\n  }\n\n}\n\n/**\n * @param {TargetsParam} targets\n * @param {AnimationParams} parameters\n * @return {JSAnimation}\n */\nconst animate = (targets, parameters) => {\n  if (globals.editor) {\n    return globals.editor.addAnimation(targets, parameters);\n  } else {\n    return new JSAnimation(targets, parameters, null, 0, false).init();\n  }\n};\n\nexport { JSAnimation, animate };\n", "import validate from './validate.js';\nconst byteToHex = [];\nfor (let i = 0; i < 256; ++i) {\n    byteToHex.push((i + 0x100).toString(16).slice(1));\n}\nexport function unsafeStringify(arr, offset = 0) {\n    return (byteToHex[arr[offset + 0]] +\n        byteToHex[arr[offset + 1]] +\n        byteToHex[arr[offset + 2]] +\n        byteToHex[arr[offset + 3]] +\n        '-' +\n        byteToHex[arr[offset + 4]] +\n        byteToHex[arr[offset + 5]] +\n        '-' +\n        byteToHex[arr[offset + 6]] +\n        byteToHex[arr[offset + 7]] +\n        '-' +\n        byteToHex[arr[offset + 8]] +\n        byteToHex[arr[offset + 9]] +\n        '-' +\n        byteToHex[arr[offset + 10]] +\n        byteToHex[arr[offset + 11]] +\n        byteToHex[arr[offset + 12]] +\n        byteToHex[arr[offset + 13]] +\n        byteToHex[arr[offset + 14]] +\n        byteToHex[arr[offset + 15]]).toLowerCase();\n}\nfunction stringify(arr, offset = 0) {\n    const uuid = unsafeStringify(arr, offset);\n    if (!validate(uuid)) {\n        throw TypeError('Stringified UUID is invalid');\n    }\n    return uuid;\n}\nexport default stringify;\n", "const rnds8 = new Uint8Array(16);\nexport default function rng() {\n    return crypto.getRandomValues(rnds8);\n}\n", "import rng from './rng.js';\nimport { unsafeStringify } from './stringify.js';\nfunction v4(options, buf, offset) {\n    if (!buf && !options && crypto.randomUUID) {\n        return crypto.randomUUID();\n    }\n    return _v4(options, buf, offset);\n}\nfunction _v4(options, buf, offset) {\n    options = options || {};\n    const rnds = options.random ?? options.rng?.() ?? rng();\n    if (rnds.length < 16) {\n        throw new Error('Random bytes length must be >= 16');\n    }\n    rnds[6] = (rnds[6] & 0x0f) | 0x40;\n    rnds[8] = (rnds[8] & 0x3f) | 0x80;\n    if (buf) {\n        offset = offset || 0;\n        if (offset < 0 || offset + 16 > buf.length) {\n            throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);\n        }\n        for (let i = 0; i < 16; ++i) {\n            buf[offset + i] = rnds[i];\n        }\n        return buf;\n    }\n    return unsafeStringify(rnds);\n}\nexport default v4;\n", "import { animate as anime } from \"animejs\";\n\n// this allows us to call the function from a Rails JS \"sprinkle\" response\nif (!(\"IR_GLOBALS\" in window)) window.IR_GLOBALS = {};\n\nexport const show = (element, options = {}) => {\n  if (getComputedStyle(element).display !== \"none\") return;\n\n  const defaultOpts = {\n    completedCallback: () => {},\n    showOpacity: 1,\n    display: \"block\",\n    fadeIn: true,\n    duration: 500,\n  };\n  const opts = { ...defaultOpts, ...options };\n\n  element.classList.remove(\"d-none\");\n  if (!opts.fadeIn) return;\n\n  element.style.display = opts.display;\n  element.style.opacity = 0;\n\n  if (element.style.height === \"0px\") {\n    element.style.removeProperty(\"height\");\n  }\n\n  anime(element, {\n    opacity: opts.showOpacity,\n    ease: \"outQuad\",\n    duration: opts.duration,\n    onComplete: () => {\n      opts.completedCallback();\n    },\n  });\n};\n\nexport const hide = (element, options = {}) => {\n  const defaultOpts = {\n    completedCallback: () => {},\n    fadeOut: true,\n    duration: 250,\n  };\n  const opts = { ...defaultOpts, ...options };\n\n  if (!opts.fadeOut) {\n    element.classList.add(\"d-none\");\n    return;\n  }\n\n  anime(element, {\n    opacity: 0,\n    ease: \"inQuad\",\n    duration: opts.duration,\n    onComplete: () => {\n      element.style.display = \"none\";\n      opts.completedCallback();\n    },\n  });\n};\n\nexport const toggle = (element, display, options = {}) => {\n  display ? show(element, options) : hide(element, options);\n};\n\nexport const flashlight = (selectorOrElementRef) => {\n  let elements;\n  if (typeof selectorOrElementRef === \"string\") {\n    elements = Array.from(document.querySelectorAll(selectorOrElementRef));\n  } else {\n    elements = [selectorOrElementRef];\n  }\n\n  elements.forEach((element) => {\n    if (element.classList.contains(\"flashlight\")) {\n      element.classList.remove(\"flashlight\");\n    }\n    // if we're removing the class first, we need a slight pause in order\n    // for the browser to run the animation again\n    setTimeout(() => {\n      element.classList.add(\"flashlight\");\n    }, 200);\n  });\n};\n\nwindow.IR_GLOBALS.flashlight = flashlight;\n", "import { animate as anime } from \"animejs\";\nimport { v4 as uuid } from \"uuid\";\n\nimport * as animate from \"../../../helpers/animate\";\nimport { elementInfo, isVisible } from \"../../../helpers/app\";\n\nexport const showDialogWithIdentifier = (dialogIdentifier, callback = () => {}, options = {}) => {\n  const dialog = document.querySelector(`[data-dialog-identifier=\"${dialogIdentifier}\"]`);\n  showDialog(dialog, callback, options);\n};\n\nconst confirmDialogHtml = `\n  <div class=\"ir-dialog__container\" data-controller=\"components--ir-dialog--base\" data-components--ir-dialog--base-auto-close-if-confirmed-value=\"true\">\n    <div class=\"ir-dialog ir-dialog--modal\" data-dialog-identifier=\"confirm-dialog\" data-dialog-width=\"350\" data-dialog-modal=\"true\" data-components--ir-dialog--base-target=\"dialog\" data-closable=\"false\">\n      <div class='ir-dialog__header'>\n        <h2>Please Confirm</h2>\n      </div>\n      <div class='ir-dialog__body'>\n      </div>\n      <div class='ir-dialog__footer d-flex'>\n        <button class=\"ir-btn ir-btn--icon-prepend ir-btn--blue me-4\" data-action=\"components--ir-dialog--base#confirmYes\" type=\"button\">\n          <span class=\"ir-btn__icon\">\n            <span class=\"spinner\"><span class=\"spinner-inner\"></span></span>\n            <i class=\"fa fa-check\"></i>\n          </span>\n          <span class=\"ir-btn__text\">\n            Okay\n          </span>\n        </button>\n        <button class=\"ir-btn ir-btn--gray\" data-action=\"components--ir-dialog--base#confirmNo\" type=\"button\">\n          <span class=\"ir-btn__text\">\n            Cancel\n          </span>\n        </button>\n      </div>\n    </div>\n  </div>\n`;\n\nexport const confirmDialog = (message, callback = () => {}, options = {}) => {\n  let dialogHtml = confirmDialogHtml;\n\n  const identifier = `confirm-dialog-${uuid()}`;\n\n  dialogHtml = dialogHtml.replace('data-dialog-identifier=\"confirm-dialog\"', `data-dialog-identifier=\"${identifier}\"`);\n\n  if (options.confirmBtnColor) {\n    dialogHtml = dialogHtml.replace(\"ir-btn--blue\", `ir-btn--${options.confirmBtnColor}`);\n  }\n\n  if (options.autoCloseIfConfirmed === false) {\n    dialogHtml = dialogHtml.replace(\n      `data-components--ir-dialog--base-auto-close-if-confirmed-value=\"true\"`,\n      `data-components--ir-dialog--base-auto-close-if-confirmed-value=\"false\"`,\n    );\n  }\n\n  if (options.headerColor) {\n    dialogHtml = dialogHtml.replace(\n      \"ir-dialog ir-dialog--modal\",\n      `ir-dialog ir-dialog--modal ir-dialog--solid-header ir-dialog--solid-header--${options.headerColor}`,\n    );\n  }\n\n  if (options.title) {\n    dialogHtml = dialogHtml.replace(\"Please Confirm\", options.title);\n  }\n\n  if (options.hideCancelBtn) {\n    dialogHtml = dialogHtml.replace(\"ir-btn--gray\", \"ir-btn--gray d-none\");\n  }\n\n  document.body.insertAdjacentHTML(\"beforeend\", dialogHtml);\n\n  const dialog = document.querySelector(`[data-dialog-identifier='${identifier}']`);\n  dialog.confirmCallback = (confirmed) => {\n    callback(confirmed);\n    if (!confirmed || options.autoCloseIfConfirmed !== false) {\n      dialog.closest(\"div\").remove();\n    }\n  };\n\n  if (options.width) {\n    dialog.dataset.dialogWidth = options.width;\n    dialog.style.width = `${options.width}px`;\n  }\n\n  dialog.querySelector(\".ir-dialog__body\").innerHTML = message;\n  showDialog(dialog, () => {}, options);\n};\n\nexport const alertDialog = (message, callback = () => {}, options = {}) => {\n  const defaultOptions = { title: \"Alert\", hideCancelBtn: true };\n  confirmDialog(message, callback, { ...defaultOptions, ...options });\n};\n\nexport const errorAlertDialog = (message, callback = () => {}, options = {}) => {\n  const defaultOptions = { title: \"Alert\", hideCancelBtn: true, headerColor: \"red\", confirmBtnColor: \"red\" };\n  confirmDialog(message, callback, { ...defaultOptions, ...options });\n};\n\nexport const dynamicDialog = ({\n  header,\n  content,\n  footer = \"\",\n  width = 350,\n  dialogIdentifier = \"dynamic-content-dialog\",\n  showNearClickPosition = false,\n  clickPosition = { x: 0, y: 0 },\n}) => {\n  const dialog = getDynamicDialog(dialogIdentifier, showNearClickPosition);\n\n  let dialogContentHTML = `\n    <div class=\"ir-dialog__header\">\n      <h2>${header}</h2>\n    </div>\n    <div class=\"ir-dialog__body\">\n      ${content}\n    </div>\n  `;\n  if (footer) {\n    dialogContentHTML += `\n      <div class=\"ir-dialog__footer d-flex\">\n        ${footer}\n      </div>\n    `;\n  }\n\n  const container = dialog.querySelector(\".ir-dialog__container__contents\");\n  container.innerHTML = dialogContentHTML;\n\n  dialog.dataset.dialogWidth = width;\n  dialog.style.width = `${width}px`;\n\n  dialog.style.zIndex = zIndexForDialog(dialog);\n  showDialog(dialog, () => {}, { showNearClickPosition, clickPosition });\n};\n\nconst getDynamicDialog = (dialogIdentifier) => {\n  let dialog = getDialogElem(dialogIdentifier);\n  if (dialog) return dialog;\n\n  const dialogHTML = `\n    <div class=\"ir-dialog__container\" data-controller=\"components--ir-dialog--base\">\n      <div class=\"ir-dialog ir-dialog--solid-header\"\n        data-dialog-identifier=\"${dialogIdentifier}\"\n        data-dialog-width=\"350\"\n        data-components--ir-dialog--base-target=\"dialog\"\n        data-dialog-escape-closes=\"true\"\n        data-closable=\"true\">\n        <div class=\"ir-dialog__drag\" data-action=\"mousedown->components--ir-dialog--base#dragMouseDown\">\n          <i class=\"fas fa-grip-lines\" aria-hidden=\"true\"></i>\n        </div>\n        <a class=\"ir-dialog__close\" data-action=\"components--ir-dialog--base#close\" href=\"#\">\n          &times;\n        </a>\n        <div class=\"ir-dialog__container__contents\"></div>\n      </div>\n    </div>\n  `;\n\n  document.body.insertAdjacentHTML(\"beforeend\", dialogHTML);\n\n  return getDialogElem(dialogIdentifier);\n};\n\nexport const getDialogElem = (dialogIdentifier) => {\n  return document.querySelector(`[data-dialog-identifier='${dialogIdentifier}']`);\n};\n\nexport const showDialog = (dialogOrIdentifier, completeCallback = () => {}, options = {}) => {\n  const dialog = lookupDialog(dialogOrIdentifier);\n\n  dialog.style.display = \"block\";\n  if (dialog.dataset.dialogWidth) {\n    // If the dialog has a manual width applied to it, we need to apply it here before we get\n    // the height and width of the dialog.\n    dialog.style.width = `${dialog.dataset.dialogWidth}px`;\n  }\n  const dialogInfo = elementInfo(dialog);\n\n  const animateDistance = 25;\n  let topPosition;\n\n  if (options.showNearClickPosition) {\n    const dialogHeight = dialogInfo.height;\n    const dialogWidth = dialogInfo.width;\n    const clickPosition = options.clickPosition;\n    topPosition = clickPosition.y - dialogHeight / 2;\n\n    const padding = 20;\n\n    // Set the top position and make sure the dialog does not appear off screen on the bottom or top\n    const dialogBottomY = topPosition + dialogHeight + padding;\n    const windowBottomY = window.innerHeight + window.scrollY;\n    const windowTopY = window.scrollY;\n\n    const distanceBeyondBottom = dialogBottomY - windowBottomY;\n    const distanceBeyondTop = windowTopY + padding - topPosition;\n\n    if (distanceBeyondBottom > 0) {\n      topPosition -= distanceBeyondBottom;\n    } else if (distanceBeyondTop > 0) {\n      topPosition += distanceBeyondTop;\n    }\n\n    if (topPosition < windowTopY + padding) {\n      topPosition = windowTopY + padding;\n    }\n\n    // Set the left position and make sure sure the dialog does not appear off screen left or right\n    const halfDialogWidth = dialogWidth / 2; // Default dialog CSS positioning is translated -50% of width\n    const beyondRight = clickPosition.x + halfDialogWidth - window.innerWidth - padding;\n    let leftPosition;\n    if (clickPosition.x - halfDialogWidth < padding) {\n      leftPosition = padding + halfDialogWidth;\n    } else if (beyondRight > 0) {\n      leftPosition = window.innerWidth - halfDialogWidth - padding;\n    } else {\n      leftPosition = clickPosition.x + padding;\n    }\n    dialog.style.left = `${leftPosition}px`;\n  } else {\n    const offsetFromTop = 125;\n    topPosition = options.ignoreScroll ? offsetFromTop : window.scrollY + offsetFromTop;\n  }\n\n  const topPositionAnimateStart = topPosition + animateDistance;\n\n  const isModal = dialog.dataset.dialogModal && dialog.dataset.dialogModal.toString() === \"true\";\n  if (isModal) showDialogModalOverlay(dialog);\n\n  anime(dialog, {\n    opacity: 1,\n    top: [`${topPositionAnimateStart}px`, `${topPosition}px`],\n    ease: \"outQuad\",\n    duration: 350,\n    onComplete: () => {\n      completeCallback();\n    },\n  });\n};\n\nexport const isDialogVisible = (dialogOrIdentifier) => {\n  const dialog = lookupDialog(dialogOrIdentifier);\n  if (!dialog) return false;\n\n  return dialog.style.display === \"block\";\n};\n\nexport const lookupDialog = (dialogOrIdentifier) => {\n  if (typeof dialogOrIdentifier === \"string\") {\n    return document.querySelector(`[data-dialog-identifier=\"${dialogOrIdentifier}\"]`);\n  } else {\n    return dialogOrIdentifier;\n  }\n};\n\nexport const hideDialog = (dialog, completeCallback = () => {}) => {\n  const dialogRect = dialog.getBoundingClientRect();\n  const topPosition = window.scrollY + dialogRect.top;\n  const animateDistance = 50;\n  const topPositionAnimateEnd = topPosition - animateDistance;\n  anime(dialog, {\n    opacity: 0,\n    top: [`${topPosition}px`, `${topPositionAnimateEnd}px`],\n    ease: \"inQuad\",\n    duration: 200,\n    onComplete: () => {\n      afterAnimatedOut(dialog);\n      completeCallback();\n    },\n  });\n  hideDialogModalOverlay(dialog);\n};\n\nlet hideDialogModalOverlayTimerId;\n\nconst showDialogModalOverlay = (dialog) => {\n  if (hideDialogModalOverlayTimerId) {\n    clearTimeout(hideDialogModalOverlayTimerId);\n  }\n  const overlay = document.querySelector(\".ir-dialog__modal-overlay\");\n  overlay.dataset.dialogOwnerIdentifier = dialog.dataset.dialogIdentifier;\n  animate.show(overlay, { showOpacity: 0.5 });\n};\n\nconst hideDialogModalOverlay = (dialog) => {\n  const overlay = document.querySelector(\".ir-dialog__modal-overlay\");\n  if (overlay.dataset.dialogOwnerIdentifier !== dialog.dataset.dialogIdentifier) return;\n  hideDialogModalOverlayTimerId = setTimeout(() => {\n    animate.hide(overlay);\n  }, 200);\n};\n\nconst afterAnimatedOut = (dialogDiv) => {\n  dialogDiv.style.display = \"none\";\n  resetForm(dialogDiv);\n  removeAnyValidationErrors(dialogDiv);\n  removeSelectedIndicators(dialogDiv);\n};\n\nconst resetForm = (dialogDiv) => {\n  const forms = dialogDiv.querySelectorAll(\"form\");\n  Array.from(forms).forEach((form) => form.reset());\n};\n\nconst removeAnyValidationErrors = (dialogDiv) => {\n  const fieldWithErrorrs = dialogDiv.querySelectorAll(\".field_with_errors\");\n  Array.from(fieldWithErrorrs).forEach((div) => {\n    div.classList.remove(\"field_with_errors\");\n  });\n  const errorDivSelectors = [\"#error_explanation\", \".ir-alert__container\"];\n  errorDivSelectors.forEach((errorDivSelector) => {\n    const errorDivs = dialogDiv.querySelectorAll(errorDivSelector);\n    Array.from(errorDivs).forEach((div) => {\n      div.style.display = \"none\";\n    });\n  });\n};\n\nconst removeSelectedIndicators = (dialogDiv) => {\n  const selectedElements = dialogDiv.querySelectorAll(\".selected\");\n  Array.from(selectedElements).forEach((element) => {\n    element.classList.remove(\"selected\");\n  });\n};\n\nconst defaultDialogZIndex = 100000;\nconst defaultModalDialogZIndex = defaultDialogZIndex + 1000;\n\nexport const zIndexForDialog = (currentDialog) => {\n  if (currentDialog.dataset.dialogModal === \"true\") return defaultModalDialogZIndex;\n\n  const dialogs = Array.from(document.querySelectorAll(\".ir-dialog\")).filter((e) => isVisible(e));\n\n  const currentHighestZIndex = dialogs.reduce((highestZIndex, dialog) => {\n    if (dialog.dataset.dialogModal === \"true\") return highestZIndex;\n    if (dialog === currentDialog) return highestZIndex;\n\n    const zIndex = Number.parseInt(dialog.style.zIndex);\n    if (Number.isNaN(zIndex)) return highestZIndex;\n\n    return zIndex > highestZIndex ? zIndex : highestZIndex;\n  }, defaultDialogZIndex);\n\n  return currentHighestZIndex + 1;\n};\n", "import { elementInfo } from \"../helpers/app\";\nimport * as store from \"../helpers/local-store\";\nimport { hideDialog } from \"../controllers/components/ir_dialog/helper\";\n\nexport const scrollToRoofSection = (roofSectionId, projectType) => {\n  const roofSectionContainer = elementInfo(document.querySelector(`#${projectType}_roof_section_${roofSectionId}`));\n\n  const headerScrollOffset = 85;\n  const headerHeight = Number.parseInt(document.querySelector(\".ir-body-container\").style.paddingTop);\n  const scrollToY = roofSectionContainer.top - headerHeight - headerScrollOffset;\n  window.scrollTo({ top: scrollToY, behavior: \"smooth\" });\n};\n\nwindow.DA_GLOBAL = {\n  hideDialog,\n  renumberRoofSections(pairs) {\n    pairs.forEach((pair) => {\n      const [id, identifier] = pair;\n      const identifier_span = `#roof_section_${id}_identifier`;\n      const identifierElement = document.querySelector(identifier_span);\n      if (identifierElement) identifierElement.innerHTML = identifier;\n    });\n  },\n\n  scrollToRoofSection: scrollToRoofSection,\n\n  showHideSecondaryRoofSectionMenuStrip() {\n    const floatingMenuDismissed = store.get(\"da-hide-floating-roof-section-menu\");\n    const roofSectionsList = document.querySelector(\"[data-identifier='da-roof-sections-list']\");\n    const roofSectionsArePresent = roofSectionsList !== null && roofSectionsList.innerHTML.trim() !== \"\";\n    const showMenu = floatingMenuDismissed && roofSectionsArePresent;\n    const secondaryMenu = Array.from(document.querySelectorAll(\"[data-controller='da--roof-section-menu']\")).find(\n      (m) => !m.dataset.hasOwnProperty(\"firstStrip\"),\n    );\n    if (secondaryMenu) secondaryMenu.style.display = showMenu ? \"block\" : \"none\";\n  },\n};\n", "var sparkMd5 = {\n  exports: {}\n};\n\n(function(module, exports) {\n  (function(factory) {\n    {\n      module.exports = factory();\n    }\n  })((function(undefined$1) {\n    var hex_chr = [ \"0\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"a\", \"b\", \"c\", \"d\", \"e\", \"f\" ];\n    function md5cycle(x, k) {\n      var a = x[0], b = x[1], c = x[2], d = x[3];\n      a += (b & c | ~b & d) + k[0] - 680876936 | 0;\n      a = (a << 7 | a >>> 25) + b | 0;\n      d += (a & b | ~a & c) + k[1] - 389564586 | 0;\n      d = (d << 12 | d >>> 20) + a | 0;\n      c += (d & a | ~d & b) + k[2] + 606105819 | 0;\n      c = (c << 17 | c >>> 15) + d | 0;\n      b += (c & d | ~c & a) + k[3] - 1044525330 | 0;\n      b = (b << 22 | b >>> 10) + c | 0;\n      a += (b & c | ~b & d) + k[4] - 176418897 | 0;\n      a = (a << 7 | a >>> 25) + b | 0;\n      d += (a & b | ~a & c) + k[5] + 1200080426 | 0;\n      d = (d << 12 | d >>> 20) + a | 0;\n      c += (d & a | ~d & b) + k[6] - 1473231341 | 0;\n      c = (c << 17 | c >>> 15) + d | 0;\n      b += (c & d | ~c & a) + k[7] - 45705983 | 0;\n      b = (b << 22 | b >>> 10) + c | 0;\n      a += (b & c | ~b & d) + k[8] + 1770035416 | 0;\n      a = (a << 7 | a >>> 25) + b | 0;\n      d += (a & b | ~a & c) + k[9] - 1958414417 | 0;\n      d = (d << 12 | d >>> 20) + a | 0;\n      c += (d & a | ~d & b) + k[10] - 42063 | 0;\n      c = (c << 17 | c >>> 15) + d | 0;\n      b += (c & d | ~c & a) + k[11] - 1990404162 | 0;\n      b = (b << 22 | b >>> 10) + c | 0;\n      a += (b & c | ~b & d) + k[12] + 1804603682 | 0;\n      a = (a << 7 | a >>> 25) + b | 0;\n      d += (a & b | ~a & c) + k[13] - 40341101 | 0;\n      d = (d << 12 | d >>> 20) + a | 0;\n      c += (d & a | ~d & b) + k[14] - 1502002290 | 0;\n      c = (c << 17 | c >>> 15) + d | 0;\n      b += (c & d | ~c & a) + k[15] + 1236535329 | 0;\n      b = (b << 22 | b >>> 10) + c | 0;\n      a += (b & d | c & ~d) + k[1] - 165796510 | 0;\n      a = (a << 5 | a >>> 27) + b | 0;\n      d += (a & c | b & ~c) + k[6] - 1069501632 | 0;\n      d = (d << 9 | d >>> 23) + a | 0;\n      c += (d & b | a & ~b) + k[11] + 643717713 | 0;\n      c = (c << 14 | c >>> 18) + d | 0;\n      b += (c & a | d & ~a) + k[0] - 373897302 | 0;\n      b = (b << 20 | b >>> 12) + c | 0;\n      a += (b & d | c & ~d) + k[5] - 701558691 | 0;\n      a = (a << 5 | a >>> 27) + b | 0;\n      d += (a & c | b & ~c) + k[10] + 38016083 | 0;\n      d = (d << 9 | d >>> 23) + a | 0;\n      c += (d & b | a & ~b) + k[15] - 660478335 | 0;\n      c = (c << 14 | c >>> 18) + d | 0;\n      b += (c & a | d & ~a) + k[4] - 405537848 | 0;\n      b = (b << 20 | b >>> 12) + c | 0;\n      a += (b & d | c & ~d) + k[9] + 568446438 | 0;\n      a = (a << 5 | a >>> 27) + b | 0;\n      d += (a & c | b & ~c) + k[14] - 1019803690 | 0;\n      d = (d << 9 | d >>> 23) + a | 0;\n      c += (d & b | a & ~b) + k[3] - 187363961 | 0;\n      c = (c << 14 | c >>> 18) + d | 0;\n      b += (c & a | d & ~a) + k[8] + 1163531501 | 0;\n      b = (b << 20 | b >>> 12) + c | 0;\n      a += (b & d | c & ~d) + k[13] - 1444681467 | 0;\n      a = (a << 5 | a >>> 27) + b | 0;\n      d += (a & c | b & ~c) + k[2] - 51403784 | 0;\n      d = (d << 9 | d >>> 23) + a | 0;\n      c += (d & b | a & ~b) + k[7] + 1735328473 | 0;\n      c = (c << 14 | c >>> 18) + d | 0;\n      b += (c & a | d & ~a) + k[12] - 1926607734 | 0;\n      b = (b << 20 | b >>> 12) + c | 0;\n      a += (b ^ c ^ d) + k[5] - 378558 | 0;\n      a = (a << 4 | a >>> 28) + b | 0;\n      d += (a ^ b ^ c) + k[8] - 2022574463 | 0;\n      d = (d << 11 | d >>> 21) + a | 0;\n      c += (d ^ a ^ b) + k[11] + 1839030562 | 0;\n      c = (c << 16 | c >>> 16) + d | 0;\n      b += (c ^ d ^ a) + k[14] - 35309556 | 0;\n      b = (b << 23 | b >>> 9) + c | 0;\n      a += (b ^ c ^ d) + k[1] - 1530992060 | 0;\n      a = (a << 4 | a >>> 28) + b | 0;\n      d += (a ^ b ^ c) + k[4] + 1272893353 | 0;\n      d = (d << 11 | d >>> 21) + a | 0;\n      c += (d ^ a ^ b) + k[7] - 155497632 | 0;\n      c = (c << 16 | c >>> 16) + d | 0;\n      b += (c ^ d ^ a) + k[10] - 1094730640 | 0;\n      b = (b << 23 | b >>> 9) + c | 0;\n      a += (b ^ c ^ d) + k[13] + 681279174 | 0;\n      a = (a << 4 | a >>> 28) + b | 0;\n      d += (a ^ b ^ c) + k[0] - 358537222 | 0;\n      d = (d << 11 | d >>> 21) + a | 0;\n      c += (d ^ a ^ b) + k[3] - 722521979 | 0;\n      c = (c << 16 | c >>> 16) + d | 0;\n      b += (c ^ d ^ a) + k[6] + 76029189 | 0;\n      b = (b << 23 | b >>> 9) + c | 0;\n      a += (b ^ c ^ d) + k[9] - 640364487 | 0;\n      a = (a << 4 | a >>> 28) + b | 0;\n      d += (a ^ b ^ c) + k[12] - 421815835 | 0;\n      d = (d << 11 | d >>> 21) + a | 0;\n      c += (d ^ a ^ b) + k[15] + 530742520 | 0;\n      c = (c << 16 | c >>> 16) + d | 0;\n      b += (c ^ d ^ a) + k[2] - 995338651 | 0;\n      b = (b << 23 | b >>> 9) + c | 0;\n      a += (c ^ (b | ~d)) + k[0] - 198630844 | 0;\n      a = (a << 6 | a >>> 26) + b | 0;\n      d += (b ^ (a | ~c)) + k[7] + 1126891415 | 0;\n      d = (d << 10 | d >>> 22) + a | 0;\n      c += (a ^ (d | ~b)) + k[14] - 1416354905 | 0;\n      c = (c << 15 | c >>> 17) + d | 0;\n      b += (d ^ (c | ~a)) + k[5] - 57434055 | 0;\n      b = (b << 21 | b >>> 11) + c | 0;\n      a += (c ^ (b | ~d)) + k[12] + 1700485571 | 0;\n      a = (a << 6 | a >>> 26) + b | 0;\n      d += (b ^ (a | ~c)) + k[3] - 1894986606 | 0;\n      d = (d << 10 | d >>> 22) + a | 0;\n      c += (a ^ (d | ~b)) + k[10] - 1051523 | 0;\n      c = (c << 15 | c >>> 17) + d | 0;\n      b += (d ^ (c | ~a)) + k[1] - 2054922799 | 0;\n      b = (b << 21 | b >>> 11) + c | 0;\n      a += (c ^ (b | ~d)) + k[8] + 1873313359 | 0;\n      a = (a << 6 | a >>> 26) + b | 0;\n      d += (b ^ (a | ~c)) + k[15] - 30611744 | 0;\n      d = (d << 10 | d >>> 22) + a | 0;\n      c += (a ^ (d | ~b)) + k[6] - 1560198380 | 0;\n      c = (c << 15 | c >>> 17) + d | 0;\n      b += (d ^ (c | ~a)) + k[13] + 1309151649 | 0;\n      b = (b << 21 | b >>> 11) + c | 0;\n      a += (c ^ (b | ~d)) + k[4] - 145523070 | 0;\n      a = (a << 6 | a >>> 26) + b | 0;\n      d += (b ^ (a | ~c)) + k[11] - 1120210379 | 0;\n      d = (d << 10 | d >>> 22) + a | 0;\n      c += (a ^ (d | ~b)) + k[2] + 718787259 | 0;\n      c = (c << 15 | c >>> 17) + d | 0;\n      b += (d ^ (c | ~a)) + k[9] - 343485551 | 0;\n      b = (b << 21 | b >>> 11) + c | 0;\n      x[0] = a + x[0] | 0;\n      x[1] = b + x[1] | 0;\n      x[2] = c + x[2] | 0;\n      x[3] = d + x[3] | 0;\n    }\n    function md5blk(s) {\n      var md5blks = [], i;\n      for (i = 0; i < 64; i += 4) {\n        md5blks[i >> 2] = s.charCodeAt(i) + (s.charCodeAt(i + 1) << 8) + (s.charCodeAt(i + 2) << 16) + (s.charCodeAt(i + 3) << 24);\n      }\n      return md5blks;\n    }\n    function md5blk_array(a) {\n      var md5blks = [], i;\n      for (i = 0; i < 64; i += 4) {\n        md5blks[i >> 2] = a[i] + (a[i + 1] << 8) + (a[i + 2] << 16) + (a[i + 3] << 24);\n      }\n      return md5blks;\n    }\n    function md51(s) {\n      var n = s.length, state = [ 1732584193, -271733879, -1732584194, 271733878 ], i, length, tail, tmp, lo, hi;\n      for (i = 64; i <= n; i += 64) {\n        md5cycle(state, md5blk(s.substring(i - 64, i)));\n      }\n      s = s.substring(i - 64);\n      length = s.length;\n      tail = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ];\n      for (i = 0; i < length; i += 1) {\n        tail[i >> 2] |= s.charCodeAt(i) << (i % 4 << 3);\n      }\n      tail[i >> 2] |= 128 << (i % 4 << 3);\n      if (i > 55) {\n        md5cycle(state, tail);\n        for (i = 0; i < 16; i += 1) {\n          tail[i] = 0;\n        }\n      }\n      tmp = n * 8;\n      tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/);\n      lo = parseInt(tmp[2], 16);\n      hi = parseInt(tmp[1], 16) || 0;\n      tail[14] = lo;\n      tail[15] = hi;\n      md5cycle(state, tail);\n      return state;\n    }\n    function md51_array(a) {\n      var n = a.length, state = [ 1732584193, -271733879, -1732584194, 271733878 ], i, length, tail, tmp, lo, hi;\n      for (i = 64; i <= n; i += 64) {\n        md5cycle(state, md5blk_array(a.subarray(i - 64, i)));\n      }\n      a = i - 64 < n ? a.subarray(i - 64) : new Uint8Array(0);\n      length = a.length;\n      tail = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ];\n      for (i = 0; i < length; i += 1) {\n        tail[i >> 2] |= a[i] << (i % 4 << 3);\n      }\n      tail[i >> 2] |= 128 << (i % 4 << 3);\n      if (i > 55) {\n        md5cycle(state, tail);\n        for (i = 0; i < 16; i += 1) {\n          tail[i] = 0;\n        }\n      }\n      tmp = n * 8;\n      tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/);\n      lo = parseInt(tmp[2], 16);\n      hi = parseInt(tmp[1], 16) || 0;\n      tail[14] = lo;\n      tail[15] = hi;\n      md5cycle(state, tail);\n      return state;\n    }\n    function rhex(n) {\n      var s = \"\", j;\n      for (j = 0; j < 4; j += 1) {\n        s += hex_chr[n >> j * 8 + 4 & 15] + hex_chr[n >> j * 8 & 15];\n      }\n      return s;\n    }\n    function hex(x) {\n      var i;\n      for (i = 0; i < x.length; i += 1) {\n        x[i] = rhex(x[i]);\n      }\n      return x.join(\"\");\n    }\n    if (hex(md51(\"hello\")) !== \"5d41402abc4b2a76b9719d911017c592\") ;\n    if (typeof ArrayBuffer !== \"undefined\" && !ArrayBuffer.prototype.slice) {\n      (function() {\n        function clamp(val, length) {\n          val = val | 0 || 0;\n          if (val < 0) {\n            return Math.max(val + length, 0);\n          }\n          return Math.min(val, length);\n        }\n        ArrayBuffer.prototype.slice = function(from, to) {\n          var length = this.byteLength, begin = clamp(from, length), end = length, num, target, targetArray, sourceArray;\n          if (to !== undefined$1) {\n            end = clamp(to, length);\n          }\n          if (begin > end) {\n            return new ArrayBuffer(0);\n          }\n          num = end - begin;\n          target = new ArrayBuffer(num);\n          targetArray = new Uint8Array(target);\n          sourceArray = new Uint8Array(this, begin, num);\n          targetArray.set(sourceArray);\n          return target;\n        };\n      })();\n    }\n    function toUtf8(str) {\n      if (/[\\u0080-\\uFFFF]/.test(str)) {\n        str = unescape(encodeURIComponent(str));\n      }\n      return str;\n    }\n    function utf8Str2ArrayBuffer(str, returnUInt8Array) {\n      var length = str.length, buff = new ArrayBuffer(length), arr = new Uint8Array(buff), i;\n      for (i = 0; i < length; i += 1) {\n        arr[i] = str.charCodeAt(i);\n      }\n      return returnUInt8Array ? arr : buff;\n    }\n    function arrayBuffer2Utf8Str(buff) {\n      return String.fromCharCode.apply(null, new Uint8Array(buff));\n    }\n    function concatenateArrayBuffers(first, second, returnUInt8Array) {\n      var result = new Uint8Array(first.byteLength + second.byteLength);\n      result.set(new Uint8Array(first));\n      result.set(new Uint8Array(second), first.byteLength);\n      return returnUInt8Array ? result : result.buffer;\n    }\n    function hexToBinaryString(hex) {\n      var bytes = [], length = hex.length, x;\n      for (x = 0; x < length - 1; x += 2) {\n        bytes.push(parseInt(hex.substr(x, 2), 16));\n      }\n      return String.fromCharCode.apply(String, bytes);\n    }\n    function SparkMD5() {\n      this.reset();\n    }\n    SparkMD5.prototype.append = function(str) {\n      this.appendBinary(toUtf8(str));\n      return this;\n    };\n    SparkMD5.prototype.appendBinary = function(contents) {\n      this._buff += contents;\n      this._length += contents.length;\n      var length = this._buff.length, i;\n      for (i = 64; i <= length; i += 64) {\n        md5cycle(this._hash, md5blk(this._buff.substring(i - 64, i)));\n      }\n      this._buff = this._buff.substring(i - 64);\n      return this;\n    };\n    SparkMD5.prototype.end = function(raw) {\n      var buff = this._buff, length = buff.length, i, tail = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], ret;\n      for (i = 0; i < length; i += 1) {\n        tail[i >> 2] |= buff.charCodeAt(i) << (i % 4 << 3);\n      }\n      this._finish(tail, length);\n      ret = hex(this._hash);\n      if (raw) {\n        ret = hexToBinaryString(ret);\n      }\n      this.reset();\n      return ret;\n    };\n    SparkMD5.prototype.reset = function() {\n      this._buff = \"\";\n      this._length = 0;\n      this._hash = [ 1732584193, -271733879, -1732584194, 271733878 ];\n      return this;\n    };\n    SparkMD5.prototype.getState = function() {\n      return {\n        buff: this._buff,\n        length: this._length,\n        hash: this._hash.slice()\n      };\n    };\n    SparkMD5.prototype.setState = function(state) {\n      this._buff = state.buff;\n      this._length = state.length;\n      this._hash = state.hash;\n      return this;\n    };\n    SparkMD5.prototype.destroy = function() {\n      delete this._hash;\n      delete this._buff;\n      delete this._length;\n    };\n    SparkMD5.prototype._finish = function(tail, length) {\n      var i = length, tmp, lo, hi;\n      tail[i >> 2] |= 128 << (i % 4 << 3);\n      if (i > 55) {\n        md5cycle(this._hash, tail);\n        for (i = 0; i < 16; i += 1) {\n          tail[i] = 0;\n        }\n      }\n      tmp = this._length * 8;\n      tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/);\n      lo = parseInt(tmp[2], 16);\n      hi = parseInt(tmp[1], 16) || 0;\n      tail[14] = lo;\n      tail[15] = hi;\n      md5cycle(this._hash, tail);\n    };\n    SparkMD5.hash = function(str, raw) {\n      return SparkMD5.hashBinary(toUtf8(str), raw);\n    };\n    SparkMD5.hashBinary = function(content, raw) {\n      var hash = md51(content), ret = hex(hash);\n      return raw ? hexToBinaryString(ret) : ret;\n    };\n    SparkMD5.ArrayBuffer = function() {\n      this.reset();\n    };\n    SparkMD5.ArrayBuffer.prototype.append = function(arr) {\n      var buff = concatenateArrayBuffers(this._buff.buffer, arr, true), length = buff.length, i;\n      this._length += arr.byteLength;\n      for (i = 64; i <= length; i += 64) {\n        md5cycle(this._hash, md5blk_array(buff.subarray(i - 64, i)));\n      }\n      this._buff = i - 64 < length ? new Uint8Array(buff.buffer.slice(i - 64)) : new Uint8Array(0);\n      return this;\n    };\n    SparkMD5.ArrayBuffer.prototype.end = function(raw) {\n      var buff = this._buff, length = buff.length, tail = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], i, ret;\n      for (i = 0; i < length; i += 1) {\n        tail[i >> 2] |= buff[i] << (i % 4 << 3);\n      }\n      this._finish(tail, length);\n      ret = hex(this._hash);\n      if (raw) {\n        ret = hexToBinaryString(ret);\n      }\n      this.reset();\n      return ret;\n    };\n    SparkMD5.ArrayBuffer.prototype.reset = function() {\n      this._buff = new Uint8Array(0);\n      this._length = 0;\n      this._hash = [ 1732584193, -271733879, -1732584194, 271733878 ];\n      return this;\n    };\n    SparkMD5.ArrayBuffer.prototype.getState = function() {\n      var state = SparkMD5.prototype.getState.call(this);\n      state.buff = arrayBuffer2Utf8Str(state.buff);\n      return state;\n    };\n    SparkMD5.ArrayBuffer.prototype.setState = function(state) {\n      state.buff = utf8Str2ArrayBuffer(state.buff, true);\n      return SparkMD5.prototype.setState.call(this, state);\n    };\n    SparkMD5.ArrayBuffer.prototype.destroy = SparkMD5.prototype.destroy;\n    SparkMD5.ArrayBuffer.prototype._finish = SparkMD5.prototype._finish;\n    SparkMD5.ArrayBuffer.hash = function(arr, raw) {\n      var hash = md51_array(new Uint8Array(arr)), ret = hex(hash);\n      return raw ? hexToBinaryString(ret) : ret;\n    };\n    return SparkMD5;\n  }));\n})(sparkMd5);\n\nvar SparkMD5 = sparkMd5.exports;\n\nconst fileSlice = File.prototype.slice || File.prototype.mozSlice || File.prototype.webkitSlice;\n\nclass FileChecksum {\n  static create(file, callback) {\n    const instance = new FileChecksum(file);\n    instance.create(callback);\n  }\n  constructor(file) {\n    this.file = file;\n    this.chunkSize = 2097152;\n    this.chunkCount = Math.ceil(this.file.size / this.chunkSize);\n    this.chunkIndex = 0;\n  }\n  create(callback) {\n    this.callback = callback;\n    this.md5Buffer = new SparkMD5.ArrayBuffer;\n    this.fileReader = new FileReader;\n    this.fileReader.addEventListener(\"load\", (event => this.fileReaderDidLoad(event)));\n    this.fileReader.addEventListener(\"error\", (event => this.fileReaderDidError(event)));\n    this.readNextChunk();\n  }\n  fileReaderDidLoad(event) {\n    this.md5Buffer.append(event.target.result);\n    if (!this.readNextChunk()) {\n      const binaryDigest = this.md5Buffer.end(true);\n      const base64digest = btoa(binaryDigest);\n      this.callback(null, base64digest);\n    }\n  }\n  fileReaderDidError(event) {\n    this.callback(`Error reading ${this.file.name}`);\n  }\n  readNextChunk() {\n    if (this.chunkIndex < this.chunkCount || this.chunkIndex == 0 && this.chunkCount == 0) {\n      const start = this.chunkIndex * this.chunkSize;\n      const end = Math.min(start + this.chunkSize, this.file.size);\n      const bytes = fileSlice.call(this.file, start, end);\n      this.fileReader.readAsArrayBuffer(bytes);\n      this.chunkIndex++;\n      return true;\n    } else {\n      return false;\n    }\n  }\n}\n\nfunction getMetaValue(name) {\n  const element = findElement(document.head, `meta[name=\"${name}\"]`);\n  if (element) {\n    return element.getAttribute(\"content\");\n  }\n}\n\nfunction findElements(root, selector) {\n  if (typeof root == \"string\") {\n    selector = root;\n    root = document;\n  }\n  const elements = root.querySelectorAll(selector);\n  return toArray(elements);\n}\n\nfunction findElement(root, selector) {\n  if (typeof root == \"string\") {\n    selector = root;\n    root = document;\n  }\n  return root.querySelector(selector);\n}\n\nfunction dispatchEvent(element, type, eventInit = {}) {\n  const {disabled: disabled} = element;\n  const {bubbles: bubbles, cancelable: cancelable, detail: detail} = eventInit;\n  const event = document.createEvent(\"Event\");\n  event.initEvent(type, bubbles || true, cancelable || true);\n  event.detail = detail || {};\n  try {\n    element.disabled = false;\n    element.dispatchEvent(event);\n  } finally {\n    element.disabled = disabled;\n  }\n  return event;\n}\n\nfunction toArray(value) {\n  if (Array.isArray(value)) {\n    return value;\n  } else if (Array.from) {\n    return Array.from(value);\n  } else {\n    return [].slice.call(value);\n  }\n}\n\nclass BlobRecord {\n  constructor(file, checksum, url, customHeaders = {}) {\n    this.file = file;\n    this.attributes = {\n      filename: file.name,\n      content_type: file.type || \"application/octet-stream\",\n      byte_size: file.size,\n      checksum: checksum\n    };\n    this.xhr = new XMLHttpRequest;\n    this.xhr.open(\"POST\", url, true);\n    this.xhr.responseType = \"json\";\n    this.xhr.setRequestHeader(\"Content-Type\", \"application/json\");\n    this.xhr.setRequestHeader(\"Accept\", \"application/json\");\n    this.xhr.setRequestHeader(\"X-Requested-With\", \"XMLHttpRequest\");\n    Object.keys(customHeaders).forEach((headerKey => {\n      this.xhr.setRequestHeader(headerKey, customHeaders[headerKey]);\n    }));\n    const csrfToken = getMetaValue(\"csrf-token\");\n    if (csrfToken != undefined) {\n      this.xhr.setRequestHeader(\"X-CSRF-Token\", csrfToken);\n    }\n    this.xhr.addEventListener(\"load\", (event => this.requestDidLoad(event)));\n    this.xhr.addEventListener(\"error\", (event => this.requestDidError(event)));\n  }\n  get status() {\n    return this.xhr.status;\n  }\n  get response() {\n    const {responseType: responseType, response: response} = this.xhr;\n    if (responseType == \"json\") {\n      return response;\n    } else {\n      return JSON.parse(response);\n    }\n  }\n  create(callback) {\n    this.callback = callback;\n    this.xhr.send(JSON.stringify({\n      blob: this.attributes\n    }));\n  }\n  requestDidLoad(event) {\n    if (this.status >= 200 && this.status < 300) {\n      const {response: response} = this;\n      const {direct_upload: direct_upload} = response;\n      delete response.direct_upload;\n      this.attributes = response;\n      this.directUploadData = direct_upload;\n      this.callback(null, this.toJSON());\n    } else {\n      this.requestDidError(event);\n    }\n  }\n  requestDidError(event) {\n    this.callback(`Error creating Blob for \"${this.file.name}\". Status: ${this.status}`);\n  }\n  toJSON() {\n    const result = {};\n    for (const key in this.attributes) {\n      result[key] = this.attributes[key];\n    }\n    return result;\n  }\n}\n\nclass BlobUpload {\n  constructor(blob) {\n    this.blob = blob;\n    this.file = blob.file;\n    const {url: url, headers: headers} = blob.directUploadData;\n    this.xhr = new XMLHttpRequest;\n    this.xhr.open(\"PUT\", url, true);\n    this.xhr.responseType = \"text\";\n    for (const key in headers) {\n      this.xhr.setRequestHeader(key, headers[key]);\n    }\n    this.xhr.addEventListener(\"load\", (event => this.requestDidLoad(event)));\n    this.xhr.addEventListener(\"error\", (event => this.requestDidError(event)));\n  }\n  create(callback) {\n    this.callback = callback;\n    this.xhr.send(this.file.slice());\n  }\n  requestDidLoad(event) {\n    const {status: status, response: response} = this.xhr;\n    if (status >= 200 && status < 300) {\n      this.callback(null, response);\n    } else {\n      this.requestDidError(event);\n    }\n  }\n  requestDidError(event) {\n    this.callback(`Error storing \"${this.file.name}\". Status: ${this.xhr.status}`);\n  }\n}\n\nlet id = 0;\n\nclass DirectUpload {\n  constructor(file, url, delegate, customHeaders = {}) {\n    this.id = ++id;\n    this.file = file;\n    this.url = url;\n    this.delegate = delegate;\n    this.customHeaders = customHeaders;\n  }\n  create(callback) {\n    FileChecksum.create(this.file, ((error, checksum) => {\n      if (error) {\n        callback(error);\n        return;\n      }\n      const blob = new BlobRecord(this.file, checksum, this.url, this.customHeaders);\n      notify(this.delegate, \"directUploadWillCreateBlobWithXHR\", blob.xhr);\n      blob.create((error => {\n        if (error) {\n          callback(error);\n        } else {\n          const upload = new BlobUpload(blob);\n          notify(this.delegate, \"directUploadWillStoreFileWithXHR\", upload.xhr);\n          upload.create((error => {\n            if (error) {\n              callback(error);\n            } else {\n              callback(null, blob.toJSON());\n            }\n          }));\n        }\n      }));\n    }));\n  }\n}\n\nfunction notify(object, methodName, ...messages) {\n  if (object && typeof object[methodName] == \"function\") {\n    return object[methodName](...messages);\n  }\n}\n\nclass DirectUploadController {\n  constructor(input, file) {\n    this.input = input;\n    this.file = file;\n    this.directUpload = new DirectUpload(this.file, this.url, this);\n    this.dispatch(\"initialize\");\n  }\n  start(callback) {\n    const hiddenInput = document.createElement(\"input\");\n    hiddenInput.type = \"hidden\";\n    hiddenInput.name = this.input.name;\n    this.input.insertAdjacentElement(\"beforebegin\", hiddenInput);\n    this.dispatch(\"start\");\n    this.directUpload.create(((error, attributes) => {\n      if (error) {\n        hiddenInput.parentNode.removeChild(hiddenInput);\n        this.dispatchError(error);\n      } else {\n        hiddenInput.value = attributes.signed_id;\n      }\n      this.dispatch(\"end\");\n      callback(error);\n    }));\n  }\n  uploadRequestDidProgress(event) {\n    const progress = event.loaded / event.total * 90;\n    if (progress) {\n      this.dispatch(\"progress\", {\n        progress: progress\n      });\n    }\n  }\n  get url() {\n    return this.input.getAttribute(\"data-direct-upload-url\");\n  }\n  dispatch(name, detail = {}) {\n    detail.file = this.file;\n    detail.id = this.directUpload.id;\n    return dispatchEvent(this.input, `direct-upload:${name}`, {\n      detail: detail\n    });\n  }\n  dispatchError(error) {\n    const event = this.dispatch(\"error\", {\n      error: error\n    });\n    if (!event.defaultPrevented) {\n      alert(error);\n    }\n  }\n  directUploadWillCreateBlobWithXHR(xhr) {\n    this.dispatch(\"before-blob-request\", {\n      xhr: xhr\n    });\n  }\n  directUploadWillStoreFileWithXHR(xhr) {\n    this.dispatch(\"before-storage-request\", {\n      xhr: xhr\n    });\n    xhr.upload.addEventListener(\"progress\", (event => this.uploadRequestDidProgress(event)));\n    xhr.upload.addEventListener(\"loadend\", (() => {\n      this.simulateResponseProgress(xhr);\n    }));\n  }\n  simulateResponseProgress(xhr) {\n    let progress = 90;\n    const startTime = Date.now();\n    const updateProgress = () => {\n      const elapsed = Date.now() - startTime;\n      const estimatedResponseTime = this.estimateResponseTime();\n      const responseProgress = Math.min(elapsed / estimatedResponseTime, 1);\n      progress = 90 + responseProgress * 9;\n      this.dispatch(\"progress\", {\n        progress: progress\n      });\n      if (xhr.readyState !== XMLHttpRequest.DONE && progress < 99) {\n        requestAnimationFrame(updateProgress);\n      }\n    };\n    xhr.addEventListener(\"loadend\", (() => {\n      this.dispatch(\"progress\", {\n        progress: 100\n      });\n    }));\n    requestAnimationFrame(updateProgress);\n  }\n  estimateResponseTime() {\n    const fileSize = this.file.size;\n    const MB = 1024 * 1024;\n    if (fileSize < MB) {\n      return 1e3;\n    } else if (fileSize < 10 * MB) {\n      return 2e3;\n    } else {\n      return 3e3 + fileSize / MB * 50;\n    }\n  }\n}\n\nconst inputSelector = \"input[type=file][data-direct-upload-url]:not([disabled])\";\n\nclass DirectUploadsController {\n  constructor(form) {\n    this.form = form;\n    this.inputs = findElements(form, inputSelector).filter((input => input.files.length));\n  }\n  start(callback) {\n    const controllers = this.createDirectUploadControllers();\n    const startNextController = () => {\n      const controller = controllers.shift();\n      if (controller) {\n        controller.start((error => {\n          if (error) {\n            callback(error);\n            this.dispatch(\"end\");\n          } else {\n            startNextController();\n          }\n        }));\n      } else {\n        callback();\n        this.dispatch(\"end\");\n      }\n    };\n    this.dispatch(\"start\");\n    startNextController();\n  }\n  createDirectUploadControllers() {\n    const controllers = [];\n    this.inputs.forEach((input => {\n      toArray(input.files).forEach((file => {\n        const controller = new DirectUploadController(input, file);\n        controllers.push(controller);\n      }));\n    }));\n    return controllers;\n  }\n  dispatch(name, detail = {}) {\n    return dispatchEvent(this.form, `direct-uploads:${name}`, {\n      detail: detail\n    });\n  }\n}\n\nconst processingAttribute = \"data-direct-uploads-processing\";\n\nconst submitButtonsByForm = new WeakMap;\n\nlet started = false;\n\nfunction start() {\n  if (!started) {\n    started = true;\n    document.addEventListener(\"click\", didClick, true);\n    document.addEventListener(\"submit\", didSubmitForm, true);\n    document.addEventListener(\"ajax:before\", didSubmitRemoteElement);\n  }\n}\n\nfunction didClick(event) {\n  const button = event.target.closest(\"button, input\");\n  if (button && button.type === \"submit\" && button.form) {\n    submitButtonsByForm.set(button.form, button);\n  }\n}\n\nfunction didSubmitForm(event) {\n  handleFormSubmissionEvent(event);\n}\n\nfunction didSubmitRemoteElement(event) {\n  if (event.target.tagName == \"FORM\") {\n    handleFormSubmissionEvent(event);\n  }\n}\n\nfunction handleFormSubmissionEvent(event) {\n  const form = event.target;\n  if (form.hasAttribute(processingAttribute)) {\n    event.preventDefault();\n    return;\n  }\n  const controller = new DirectUploadsController(form);\n  const {inputs: inputs} = controller;\n  if (inputs.length) {\n    event.preventDefault();\n    form.setAttribute(processingAttribute, \"\");\n    inputs.forEach(disable);\n    controller.start((error => {\n      form.removeAttribute(processingAttribute);\n      if (error) {\n        inputs.forEach(enable);\n      } else {\n        submitForm(form);\n      }\n    }));\n  }\n}\n\nfunction submitForm(form) {\n  let button = submitButtonsByForm.get(form) || findElement(form, \"input[type=submit], button[type=submit]\");\n  if (button) {\n    const {disabled: disabled} = button;\n    button.disabled = false;\n    button.focus();\n    button.click();\n    button.disabled = disabled;\n  } else {\n    button = document.createElement(\"input\");\n    button.type = \"submit\";\n    button.style.display = \"none\";\n    form.appendChild(button);\n    button.click();\n    form.removeChild(button);\n  }\n  submitButtonsByForm.delete(form);\n}\n\nfunction disable(input) {\n  input.disabled = true;\n}\n\nfunction enable(input) {\n  input.disabled = false;\n}\n\nfunction autostart() {\n  if (window.ActiveStorage) {\n    start();\n  }\n}\n\nsetTimeout(autostart, 1);\n\nclass AttachmentUpload {\n  constructor(attachment, element, file = attachment.file) {\n    this.attachment = attachment;\n    this.element = element;\n    this.directUpload = new DirectUpload(file, this.directUploadUrl, this);\n    this.file = file;\n  }\n  start() {\n    return new Promise(((resolve, reject) => {\n      this.directUpload.create(((error, attributes) => this.directUploadDidComplete(error, attributes, resolve, reject)));\n      this.dispatch(\"start\");\n    }));\n  }\n  directUploadWillStoreFileWithXHR(xhr) {\n    xhr.upload.addEventListener(\"progress\", (event => {\n      const progress = event.loaded / event.total * 90;\n      if (progress) {\n        this.dispatch(\"progress\", {\n          progress: progress\n        });\n      }\n    }));\n    xhr.upload.addEventListener(\"loadend\", (() => {\n      this.simulateResponseProgress(xhr);\n    }));\n  }\n  simulateResponseProgress(xhr) {\n    let progress = 90;\n    const startTime = Date.now();\n    const updateProgress = () => {\n      const elapsed = Date.now() - startTime;\n      const estimatedResponseTime = this.estimateResponseTime();\n      const responseProgress = Math.min(elapsed / estimatedResponseTime, 1);\n      progress = 90 + responseProgress * 9;\n      this.dispatch(\"progress\", {\n        progress: progress\n      });\n      if (xhr.readyState !== XMLHttpRequest.DONE && progress < 99) {\n        requestAnimationFrame(updateProgress);\n      }\n    };\n    xhr.addEventListener(\"loadend\", (() => {\n      this.dispatch(\"progress\", {\n        progress: 100\n      });\n    }));\n    requestAnimationFrame(updateProgress);\n  }\n  estimateResponseTime() {\n    const fileSize = this.file.size;\n    const MB = 1024 * 1024;\n    if (fileSize < MB) {\n      return 1e3;\n    } else if (fileSize < 10 * MB) {\n      return 2e3;\n    } else {\n      return 3e3 + fileSize / MB * 50;\n    }\n  }\n  directUploadDidComplete(error, attributes, resolve, reject) {\n    if (error) {\n      this.dispatchError(error, reject);\n    } else {\n      resolve({\n        sgid: attributes.attachable_sgid,\n        url: this.createBlobUrl(attributes.signed_id, attributes.filename)\n      });\n      this.dispatch(\"end\");\n    }\n  }\n  createBlobUrl(signedId, filename) {\n    return this.blobUrlTemplate.replace(\":signed_id\", signedId).replace(\":filename\", encodeURIComponent(filename));\n  }\n  dispatch(name, detail = {}) {\n    detail.attachment = this.attachment;\n    return dispatchEvent(this.element, `direct-upload:${name}`, {\n      detail: detail\n    });\n  }\n  dispatchError(error, reject) {\n    const event = this.dispatch(\"error\", {\n      error: error\n    });\n    if (!event.defaultPrevented) {\n      reject(error);\n    }\n  }\n  get directUploadUrl() {\n    return this.element.dataset.directUploadUrl;\n  }\n  get blobUrlTemplate() {\n    return this.element.dataset.blobUrlTemplate;\n  }\n}\n\naddEventListener(\"trix-attachment-add\", (event => {\n  const {attachment: attachment, target: target} = event;\n  if (attachment.file) {\n    const upload = new AttachmentUpload(attachment, target, attachment.file);\n    const onProgress = event => attachment.setUploadProgress(event.detail.progress);\n    target.addEventListener(\"direct-upload:progress\", onProgress);\n    upload.start().then((attributes => attachment.setAttributes(attributes))).catch((error => alert(error))).finally((() => target.removeEventListener(\"direct-upload:progress\", onProgress)));\n  }\n}));\n\nexport { AttachmentUpload };\n", "/*\nUnobtrusive JavaScript\nhttps://github.com/rails/rails/blob/main/actionview/app/javascript\nReleased under the MIT license\n */\nconst linkClickSelector = \"a[data-confirm], a[data-method], a[data-remote]:not([disabled]), a[data-disable-with], a[data-disable]\";\n\nconst buttonClickSelector = {\n  selector: \"button[data-remote]:not([form]), button[data-confirm]:not([form])\",\n  exclude: \"form button\"\n};\n\nconst inputChangeSelector = \"select[data-remote], input[data-remote], textarea[data-remote]\";\n\nconst formSubmitSelector = \"form:not([data-turbo=true])\";\n\nconst formInputClickSelector = \"form:not([data-turbo=true]) input[type=submit], form:not([data-turbo=true]) input[type=image], form:not([data-turbo=true]) button[type=submit], form:not([data-turbo=true]) button:not([type]), input[type=submit][form], input[type=image][form], button[type=submit][form], button[form]:not([type])\";\n\nconst formDisableSelector = \"input[data-disable-with]:enabled, button[data-disable-with]:enabled, textarea[data-disable-with]:enabled, input[data-disable]:enabled, button[data-disable]:enabled, textarea[data-disable]:enabled\";\n\nconst formEnableSelector = \"input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled, input[data-disable]:disabled, button[data-disable]:disabled, textarea[data-disable]:disabled\";\n\nconst fileInputSelector = \"input[name][type=file]:not([disabled])\";\n\nconst linkDisableSelector = \"a[data-disable-with], a[data-disable]\";\n\nconst buttonDisableSelector = \"button[data-remote][data-disable-with], button[data-remote][data-disable]\";\n\nlet nonce = null;\n\nconst loadCSPNonce = () => {\n  const metaTag = document.querySelector(\"meta[name=csp-nonce]\");\n  return nonce = metaTag && metaTag.content;\n};\n\nconst cspNonce = () => nonce || loadCSPNonce();\n\nconst m = Element.prototype.matches || Element.prototype.matchesSelector || Element.prototype.mozMatchesSelector || Element.prototype.msMatchesSelector || Element.prototype.oMatchesSelector || Element.prototype.webkitMatchesSelector;\n\nconst matches = function(element, selector) {\n  if (selector.exclude) {\n    return m.call(element, selector.selector) && !m.call(element, selector.exclude);\n  } else {\n    return m.call(element, selector);\n  }\n};\n\nconst EXPANDO = \"_ujsData\";\n\nconst getData = (element, key) => element[EXPANDO] ? element[EXPANDO][key] : undefined;\n\nconst setData = function(element, key, value) {\n  if (!element[EXPANDO]) {\n    element[EXPANDO] = {};\n  }\n  return element[EXPANDO][key] = value;\n};\n\nconst $ = selector => Array.prototype.slice.call(document.querySelectorAll(selector));\n\nconst isContentEditable = function(element) {\n  var isEditable = false;\n  do {\n    if (element.isContentEditable) {\n      isEditable = true;\n      break;\n    }\n    element = element.parentElement;\n  } while (element);\n  return isEditable;\n};\n\nconst csrfToken = () => {\n  const meta = document.querySelector(\"meta[name=csrf-token]\");\n  return meta && meta.content;\n};\n\nconst csrfParam = () => {\n  const meta = document.querySelector(\"meta[name=csrf-param]\");\n  return meta && meta.content;\n};\n\nconst CSRFProtection = xhr => {\n  const token = csrfToken();\n  if (token) {\n    return xhr.setRequestHeader(\"X-CSRF-Token\", token);\n  }\n};\n\nconst refreshCSRFTokens = () => {\n  const token = csrfToken();\n  const param = csrfParam();\n  if (token && param) {\n    return $('form input[name=\"' + param + '\"]').forEach((input => input.value = token));\n  }\n};\n\nconst AcceptHeaders = {\n  \"*\": \"*/*\",\n  text: \"text/plain\",\n  html: \"text/html\",\n  xml: \"application/xml, text/xml\",\n  json: \"application/json, text/javascript\",\n  script: \"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript\"\n};\n\nconst ajax = options => {\n  options = prepareOptions(options);\n  var xhr = createXHR(options, (function() {\n    const response = processResponse(xhr.response != null ? xhr.response : xhr.responseText, xhr.getResponseHeader(\"Content-Type\"));\n    if (Math.floor(xhr.status / 100) === 2) {\n      if (typeof options.success === \"function\") {\n        options.success(response, xhr.statusText, xhr);\n      }\n    } else {\n      if (typeof options.error === \"function\") {\n        options.error(response, xhr.statusText, xhr);\n      }\n    }\n    return typeof options.complete === \"function\" ? options.complete(xhr, xhr.statusText) : undefined;\n  }));\n  if (options.beforeSend && !options.beforeSend(xhr, options)) {\n    return false;\n  }\n  if (xhr.readyState === XMLHttpRequest.OPENED) {\n    return xhr.send(options.data);\n  }\n};\n\nvar prepareOptions = function(options) {\n  options.url = options.url || location.href;\n  options.type = options.type.toUpperCase();\n  if (options.type === \"GET\" && options.data) {\n    if (options.url.indexOf(\"?\") < 0) {\n      options.url += \"?\" + options.data;\n    } else {\n      options.url += \"&\" + options.data;\n    }\n  }\n  if (!(options.dataType in AcceptHeaders)) {\n    options.dataType = \"*\";\n  }\n  options.accept = AcceptHeaders[options.dataType];\n  if (options.dataType !== \"*\") {\n    options.accept += \", */*; q=0.01\";\n  }\n  return options;\n};\n\nvar createXHR = function(options, done) {\n  const xhr = new XMLHttpRequest;\n  xhr.open(options.type, options.url, true);\n  xhr.setRequestHeader(\"Accept\", options.accept);\n  if (typeof options.data === \"string\") {\n    xhr.setRequestHeader(\"Content-Type\", \"application/x-www-form-urlencoded; charset=UTF-8\");\n  }\n  if (!options.crossDomain) {\n    xhr.setRequestHeader(\"X-Requested-With\", \"XMLHttpRequest\");\n    CSRFProtection(xhr);\n  }\n  xhr.withCredentials = !!options.withCredentials;\n  xhr.onreadystatechange = function() {\n    if (xhr.readyState === XMLHttpRequest.DONE) {\n      return done(xhr);\n    }\n  };\n  return xhr;\n};\n\nvar processResponse = function(response, type) {\n  if (typeof response === \"string\" && typeof type === \"string\") {\n    if (type.match(/\\bjson\\b/)) {\n      try {\n        response = JSON.parse(response);\n      } catch (error) {}\n    } else if (type.match(/\\b(?:java|ecma)script\\b/)) {\n      const script = document.createElement(\"script\");\n      script.setAttribute(\"nonce\", cspNonce());\n      script.text = response;\n      document.head.appendChild(script).parentNode.removeChild(script);\n    } else if (type.match(/\\b(xml|html|svg)\\b/)) {\n      const parser = new DOMParser;\n      type = type.replace(/;.+/, \"\");\n      try {\n        response = parser.parseFromString(response, type);\n      } catch (error1) {}\n    }\n  }\n  return response;\n};\n\nconst href = element => element.href;\n\nconst isCrossDomain = function(url) {\n  const originAnchor = document.createElement(\"a\");\n  originAnchor.href = location.href;\n  const urlAnchor = document.createElement(\"a\");\n  try {\n    urlAnchor.href = url;\n    return !((!urlAnchor.protocol || urlAnchor.protocol === \":\") && !urlAnchor.host || originAnchor.protocol + \"//\" + originAnchor.host === urlAnchor.protocol + \"//\" + urlAnchor.host);\n  } catch (e) {\n    return true;\n  }\n};\n\nlet preventDefault;\n\nlet {CustomEvent: CustomEvent} = window;\n\nif (typeof CustomEvent !== \"function\") {\n  CustomEvent = function(event, params) {\n    const evt = document.createEvent(\"CustomEvent\");\n    evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);\n    return evt;\n  };\n  CustomEvent.prototype = window.Event.prototype;\n  ({preventDefault: preventDefault} = CustomEvent.prototype);\n  CustomEvent.prototype.preventDefault = function() {\n    const result = preventDefault.call(this);\n    if (this.cancelable && !this.defaultPrevented) {\n      Object.defineProperty(this, \"defaultPrevented\", {\n        get() {\n          return true;\n        }\n      });\n    }\n    return result;\n  };\n}\n\nconst fire = (obj, name, data) => {\n  const event = new CustomEvent(name, {\n    bubbles: true,\n    cancelable: true,\n    detail: data\n  });\n  obj.dispatchEvent(event);\n  return !event.defaultPrevented;\n};\n\nconst stopEverything = e => {\n  fire(e.target, \"ujs:everythingStopped\");\n  e.preventDefault();\n  e.stopPropagation();\n  e.stopImmediatePropagation();\n};\n\nconst delegate = (element, selector, eventType, handler) => element.addEventListener(eventType, (function(e) {\n  let {target: target} = e;\n  while (!!(target instanceof Element) && !matches(target, selector)) {\n    target = target.parentNode;\n  }\n  if (target instanceof Element && handler.call(target, e) === false) {\n    e.preventDefault();\n    e.stopPropagation();\n  }\n}));\n\nconst toArray = e => Array.prototype.slice.call(e);\n\nconst serializeElement = (element, additionalParam) => {\n  let inputs = [ element ];\n  if (matches(element, \"form\")) {\n    inputs = toArray(element.elements);\n  }\n  const params = [];\n  inputs.forEach((function(input) {\n    if (!input.name || input.disabled) {\n      return;\n    }\n    if (matches(input, \"fieldset[disabled] *\")) {\n      return;\n    }\n    if (matches(input, \"select\")) {\n      toArray(input.options).forEach((function(option) {\n        if (option.selected) {\n          params.push({\n            name: input.name,\n            value: option.value\n          });\n        }\n      }));\n    } else if (input.checked || [ \"radio\", \"checkbox\", \"submit\" ].indexOf(input.type) === -1) {\n      params.push({\n        name: input.name,\n        value: input.value\n      });\n    }\n  }));\n  if (additionalParam) {\n    params.push(additionalParam);\n  }\n  return params.map((function(param) {\n    if (param.name) {\n      return `${encodeURIComponent(param.name)}=${encodeURIComponent(param.value)}`;\n    } else {\n      return param;\n    }\n  })).join(\"&\");\n};\n\nconst formElements = (form, selector) => {\n  if (matches(form, \"form\")) {\n    return toArray(form.elements).filter((el => matches(el, selector)));\n  } else {\n    return toArray(form.querySelectorAll(selector));\n  }\n};\n\nconst handleConfirmWithRails = rails => function(e) {\n  if (!allowAction(this, rails)) {\n    stopEverything(e);\n  }\n};\n\nconst confirm = (message, element) => window.confirm(message);\n\nvar allowAction = function(element, rails) {\n  let callback;\n  const message = element.getAttribute(\"data-confirm\");\n  if (!message) {\n    return true;\n  }\n  let answer = false;\n  if (fire(element, \"confirm\")) {\n    try {\n      answer = rails.confirm(message, element);\n    } catch (error) {}\n    callback = fire(element, \"confirm:complete\", [ answer ]);\n  }\n  return answer && callback;\n};\n\nconst handleDisabledElement = function(e) {\n  const element = this;\n  if (element.disabled) {\n    stopEverything(e);\n  }\n};\n\nconst enableElement = e => {\n  let element;\n  if (e instanceof Event) {\n    if (isXhrRedirect(e)) {\n      return;\n    }\n    element = e.target;\n  } else {\n    element = e;\n  }\n  if (isContentEditable(element)) {\n    return;\n  }\n  if (matches(element, linkDisableSelector)) {\n    return enableLinkElement(element);\n  } else if (matches(element, buttonDisableSelector) || matches(element, formEnableSelector)) {\n    return enableFormElement(element);\n  } else if (matches(element, formSubmitSelector)) {\n    return enableFormElements(element);\n  }\n};\n\nconst disableElement = e => {\n  const element = e instanceof Event ? e.target : e;\n  if (isContentEditable(element)) {\n    return;\n  }\n  if (matches(element, linkDisableSelector)) {\n    return disableLinkElement(element);\n  } else if (matches(element, buttonDisableSelector) || matches(element, formDisableSelector)) {\n    return disableFormElement(element);\n  } else if (matches(element, formSubmitSelector)) {\n    return disableFormElements(element);\n  }\n};\n\nvar disableLinkElement = function(element) {\n  if (getData(element, \"ujs:disabled\")) {\n    return;\n  }\n  const replacement = element.getAttribute(\"data-disable-with\");\n  if (replacement != null) {\n    setData(element, \"ujs:enable-with\", element.innerHTML);\n    element.innerHTML = replacement;\n  }\n  element.addEventListener(\"click\", stopEverything);\n  return setData(element, \"ujs:disabled\", true);\n};\n\nvar enableLinkElement = function(element) {\n  const originalText = getData(element, \"ujs:enable-with\");\n  if (originalText != null) {\n    element.innerHTML = originalText;\n    setData(element, \"ujs:enable-with\", null);\n  }\n  element.removeEventListener(\"click\", stopEverything);\n  return setData(element, \"ujs:disabled\", null);\n};\n\nvar disableFormElements = form => formElements(form, formDisableSelector).forEach(disableFormElement);\n\nvar disableFormElement = function(element) {\n  if (getData(element, \"ujs:disabled\")) {\n    return;\n  }\n  const replacement = element.getAttribute(\"data-disable-with\");\n  if (replacement != null) {\n    if (matches(element, \"button\")) {\n      setData(element, \"ujs:enable-with\", element.innerHTML);\n      element.innerHTML = replacement;\n    } else {\n      setData(element, \"ujs:enable-with\", element.value);\n      element.value = replacement;\n    }\n  }\n  element.disabled = true;\n  return setData(element, \"ujs:disabled\", true);\n};\n\nvar enableFormElements = form => formElements(form, formEnableSelector).forEach((element => enableFormElement(element)));\n\nvar enableFormElement = function(element) {\n  const originalText = getData(element, \"ujs:enable-with\");\n  if (originalText != null) {\n    if (matches(element, \"button\")) {\n      element.innerHTML = originalText;\n    } else {\n      element.value = originalText;\n    }\n    setData(element, \"ujs:enable-with\", null);\n  }\n  element.disabled = false;\n  return setData(element, \"ujs:disabled\", null);\n};\n\nvar isXhrRedirect = function(event) {\n  const xhr = event.detail ? event.detail[0] : undefined;\n  return xhr && xhr.getResponseHeader(\"X-Xhr-Redirect\");\n};\n\nconst handleMethodWithRails = rails => function(e) {\n  const link = this;\n  const method = link.getAttribute(\"data-method\");\n  if (!method) {\n    return;\n  }\n  if (isContentEditable(this)) {\n    return;\n  }\n  const href = rails.href(link);\n  const csrfToken$1 = csrfToken();\n  const csrfParam$1 = csrfParam();\n  const form = document.createElement(\"form\");\n  let formContent = `<input name='_method' value='${method}' type='hidden' />`;\n  if (csrfParam$1 && csrfToken$1 && !isCrossDomain(href)) {\n    formContent += `<input name='${csrfParam$1}' value='${csrfToken$1}' type='hidden' />`;\n  }\n  formContent += '<input type=\"submit\" />';\n  form.method = \"post\";\n  form.action = href;\n  form.target = link.target;\n  form.innerHTML = formContent;\n  form.style.display = \"none\";\n  document.body.appendChild(form);\n  form.querySelector('[type=\"submit\"]').click();\n  stopEverything(e);\n};\n\nconst isRemote = function(element) {\n  const value = element.getAttribute(\"data-remote\");\n  return value != null && value !== \"false\";\n};\n\nconst handleRemoteWithRails = rails => function(e) {\n  let data, method, url;\n  const element = this;\n  if (!isRemote(element)) {\n    return true;\n  }\n  if (!fire(element, \"ajax:before\")) {\n    fire(element, \"ajax:stopped\");\n    return false;\n  }\n  if (isContentEditable(element)) {\n    fire(element, \"ajax:stopped\");\n    return false;\n  }\n  const withCredentials = element.getAttribute(\"data-with-credentials\");\n  const dataType = element.getAttribute(\"data-type\") || \"script\";\n  if (matches(element, formSubmitSelector)) {\n    const button = getData(element, \"ujs:submit-button\");\n    method = getData(element, \"ujs:submit-button-formmethod\") || element.getAttribute(\"method\") || \"get\";\n    url = getData(element, \"ujs:submit-button-formaction\") || element.getAttribute(\"action\") || location.href;\n    if (method.toUpperCase() === \"GET\") {\n      url = url.replace(/\\?.*$/, \"\");\n    }\n    if (element.enctype === \"multipart/form-data\") {\n      data = new FormData(element);\n      if (button != null) {\n        data.append(button.name, button.value);\n      }\n    } else {\n      data = serializeElement(element, button);\n    }\n    setData(element, \"ujs:submit-button\", null);\n    setData(element, \"ujs:submit-button-formmethod\", null);\n    setData(element, \"ujs:submit-button-formaction\", null);\n  } else if (matches(element, buttonClickSelector) || matches(element, inputChangeSelector)) {\n    method = element.getAttribute(\"data-method\");\n    url = element.getAttribute(\"data-url\");\n    data = serializeElement(element, element.getAttribute(\"data-params\"));\n  } else {\n    method = element.getAttribute(\"data-method\");\n    url = rails.href(element);\n    data = element.getAttribute(\"data-params\");\n  }\n  ajax({\n    type: method || \"GET\",\n    url: url,\n    data: data,\n    dataType: dataType,\n    beforeSend(xhr, options) {\n      if (fire(element, \"ajax:beforeSend\", [ xhr, options ])) {\n        return fire(element, \"ajax:send\", [ xhr ]);\n      } else {\n        fire(element, \"ajax:stopped\");\n        return false;\n      }\n    },\n    success(...args) {\n      return fire(element, \"ajax:success\", args);\n    },\n    error(...args) {\n      return fire(element, \"ajax:error\", args);\n    },\n    complete(...args) {\n      return fire(element, \"ajax:complete\", args);\n    },\n    crossDomain: isCrossDomain(url),\n    withCredentials: withCredentials != null && withCredentials !== \"false\"\n  });\n  stopEverything(e);\n};\n\nconst formSubmitButtonClick = function(e) {\n  const button = this;\n  const {form: form} = button;\n  if (!form) {\n    return;\n  }\n  if (button.name) {\n    setData(form, \"ujs:submit-button\", {\n      name: button.name,\n      value: button.value\n    });\n  }\n  setData(form, \"ujs:formnovalidate-button\", button.formNoValidate);\n  setData(form, \"ujs:submit-button-formaction\", button.getAttribute(\"formaction\"));\n  return setData(form, \"ujs:submit-button-formmethod\", button.getAttribute(\"formmethod\"));\n};\n\nconst preventInsignificantClick = function(e) {\n  const link = this;\n  const method = (link.getAttribute(\"data-method\") || \"GET\").toUpperCase();\n  const data = link.getAttribute(\"data-params\");\n  const metaClick = e.metaKey || e.ctrlKey;\n  const insignificantMetaClick = metaClick && method === \"GET\" && !data;\n  const nonPrimaryMouseClick = e.button != null && e.button !== 0;\n  if (nonPrimaryMouseClick || insignificantMetaClick) {\n    e.stopImmediatePropagation();\n  }\n};\n\nconst Rails = {\n  $: $,\n  ajax: ajax,\n  buttonClickSelector: buttonClickSelector,\n  buttonDisableSelector: buttonDisableSelector,\n  confirm: confirm,\n  cspNonce: cspNonce,\n  csrfToken: csrfToken,\n  csrfParam: csrfParam,\n  CSRFProtection: CSRFProtection,\n  delegate: delegate,\n  disableElement: disableElement,\n  enableElement: enableElement,\n  fileInputSelector: fileInputSelector,\n  fire: fire,\n  formElements: formElements,\n  formEnableSelector: formEnableSelector,\n  formDisableSelector: formDisableSelector,\n  formInputClickSelector: formInputClickSelector,\n  formSubmitButtonClick: formSubmitButtonClick,\n  formSubmitSelector: formSubmitSelector,\n  getData: getData,\n  handleDisabledElement: handleDisabledElement,\n  href: href,\n  inputChangeSelector: inputChangeSelector,\n  isCrossDomain: isCrossDomain,\n  linkClickSelector: linkClickSelector,\n  linkDisableSelector: linkDisableSelector,\n  loadCSPNonce: loadCSPNonce,\n  matches: matches,\n  preventInsignificantClick: preventInsignificantClick,\n  refreshCSRFTokens: refreshCSRFTokens,\n  serializeElement: serializeElement,\n  setData: setData,\n  stopEverything: stopEverything\n};\n\nconst handleConfirm = handleConfirmWithRails(Rails);\n\nRails.handleConfirm = handleConfirm;\n\nconst handleMethod = handleMethodWithRails(Rails);\n\nRails.handleMethod = handleMethod;\n\nconst handleRemote = handleRemoteWithRails(Rails);\n\nRails.handleRemote = handleRemote;\n\nconst start = function() {\n  if (window._rails_loaded) {\n    throw new Error(\"rails-ujs has already been loaded!\");\n  }\n  window.addEventListener(\"pageshow\", (function() {\n    $(formEnableSelector).forEach((function(el) {\n      if (getData(el, \"ujs:disabled\")) {\n        enableElement(el);\n      }\n    }));\n    $(linkDisableSelector).forEach((function(el) {\n      if (getData(el, \"ujs:disabled\")) {\n        enableElement(el);\n      }\n    }));\n  }));\n  delegate(document, linkDisableSelector, \"ajax:complete\", enableElement);\n  delegate(document, linkDisableSelector, \"ajax:stopped\", enableElement);\n  delegate(document, buttonDisableSelector, \"ajax:complete\", enableElement);\n  delegate(document, buttonDisableSelector, \"ajax:stopped\", enableElement);\n  delegate(document, linkClickSelector, \"click\", preventInsignificantClick);\n  delegate(document, linkClickSelector, \"click\", handleDisabledElement);\n  delegate(document, linkClickSelector, \"click\", handleConfirm);\n  delegate(document, linkClickSelector, \"click\", disableElement);\n  delegate(document, linkClickSelector, \"click\", handleRemote);\n  delegate(document, linkClickSelector, \"click\", handleMethod);\n  delegate(document, buttonClickSelector, \"click\", preventInsignificantClick);\n  delegate(document, buttonClickSelector, \"click\", handleDisabledElement);\n  delegate(document, buttonClickSelector, \"click\", handleConfirm);\n  delegate(document, buttonClickSelector, \"click\", disableElement);\n  delegate(document, buttonClickSelector, \"click\", handleRemote);\n  delegate(document, inputChangeSelector, \"change\", handleDisabledElement);\n  delegate(document, inputChangeSelector, \"change\", handleConfirm);\n  delegate(document, inputChangeSelector, \"change\", handleRemote);\n  delegate(document, formSubmitSelector, \"submit\", handleDisabledElement);\n  delegate(document, formSubmitSelector, \"submit\", handleConfirm);\n  delegate(document, formSubmitSelector, \"submit\", handleRemote);\n  delegate(document, formSubmitSelector, \"submit\", (e => setTimeout((() => disableElement(e)), 13)));\n  delegate(document, formSubmitSelector, \"ajax:send\", disableElement);\n  delegate(document, formSubmitSelector, \"ajax:complete\", enableElement);\n  delegate(document, formInputClickSelector, \"click\", preventInsignificantClick);\n  delegate(document, formInputClickSelector, \"click\", handleDisabledElement);\n  delegate(document, formInputClickSelector, \"click\", handleConfirm);\n  delegate(document, formInputClickSelector, \"click\", formSubmitButtonClick);\n  document.addEventListener(\"DOMContentLoaded\", refreshCSRFTokens);\n  document.addEventListener(\"DOMContentLoaded\", loadCSPNonce);\n  return window._rails_loaded = true;\n};\n\nRails.start = start;\n\nif (typeof jQuery !== \"undefined\" && jQuery && jQuery.ajax) {\n  if (jQuery.rails) {\n    throw new Error(\"If you load both jquery_ujs and rails-ujs, use rails-ujs only.\");\n  }\n  jQuery.rails = Rails;\n  jQuery.ajaxPrefilter((function(options, originalOptions, xhr) {\n    if (!options.crossDomain) {\n      return CSRFProtection(xhr);\n    }\n  }));\n}\n\nexport { Rails as default };\n", "/*!\nTurbo 8.0.23\nCopyright \u00A9 2026 37signals LLC\n */\nconst FrameLoadingStyle = {\n  eager: \"eager\",\n  lazy: \"lazy\"\n};\n\n/**\n * Contains a fragment of HTML which is updated based on navigation within\n * it (e.g. via links or form submissions).\n *\n * @customElement turbo-frame\n * @example\n *   <turbo-frame id=\"messages\">\n *     <a href=\"/messages/expanded\">\n *       Show all expanded messages in this frame.\n *     </a>\n *\n *     <form action=\"/messages\">\n *       Show response from this form within this frame.\n *     </form>\n *   </turbo-frame>\n */\nclass FrameElement extends HTMLElement {\n  static delegateConstructor = undefined\n\n  loaded = Promise.resolve()\n\n  static get observedAttributes() {\n    return [\"disabled\", \"loading\", \"src\"]\n  }\n\n  constructor() {\n    super();\n    this.delegate = new FrameElement.delegateConstructor(this);\n  }\n\n  connectedCallback() {\n    this.delegate.connect();\n  }\n\n  disconnectedCallback() {\n    this.delegate.disconnect();\n  }\n\n  reload() {\n    return this.delegate.sourceURLReloaded()\n  }\n\n  attributeChangedCallback(name) {\n    if (name == \"loading\") {\n      this.delegate.loadingStyleChanged();\n    } else if (name == \"src\") {\n      this.delegate.sourceURLChanged();\n    } else if (name == \"disabled\") {\n      this.delegate.disabledChanged();\n    }\n  }\n\n  /**\n   * Gets the URL to lazily load source HTML from\n   */\n  get src() {\n    return this.getAttribute(\"src\")\n  }\n\n  /**\n   * Sets the URL to lazily load source HTML from\n   */\n  set src(value) {\n    if (value) {\n      this.setAttribute(\"src\", value);\n    } else {\n      this.removeAttribute(\"src\");\n    }\n  }\n\n  /**\n   * Gets the refresh mode for the frame.\n   */\n  get refresh() {\n    return this.getAttribute(\"refresh\")\n  }\n\n  /**\n   * Sets the refresh mode for the frame.\n   */\n  set refresh(value) {\n    if (value) {\n      this.setAttribute(\"refresh\", value);\n    } else {\n      this.removeAttribute(\"refresh\");\n    }\n  }\n\n  get shouldReloadWithMorph() {\n    return this.src && this.refresh === \"morph\"\n  }\n\n  /**\n   * Determines if the element is loading\n   */\n  get loading() {\n    return frameLoadingStyleFromString(this.getAttribute(\"loading\") || \"\")\n  }\n\n  /**\n   * Sets the value of if the element is loading\n   */\n  set loading(value) {\n    if (value) {\n      this.setAttribute(\"loading\", value);\n    } else {\n      this.removeAttribute(\"loading\");\n    }\n  }\n\n  /**\n   * Gets the disabled state of the frame.\n   *\n   * If disabled, no requests will be intercepted by the frame.\n   */\n  get disabled() {\n    return this.hasAttribute(\"disabled\")\n  }\n\n  /**\n   * Sets the disabled state of the frame.\n   *\n   * If disabled, no requests will be intercepted by the frame.\n   */\n  set disabled(value) {\n    if (value) {\n      this.setAttribute(\"disabled\", \"\");\n    } else {\n      this.removeAttribute(\"disabled\");\n    }\n  }\n\n  /**\n   * Gets the autoscroll state of the frame.\n   *\n   * If true, the frame will be scrolled into view automatically on update.\n   */\n  get autoscroll() {\n    return this.hasAttribute(\"autoscroll\")\n  }\n\n  /**\n   * Sets the autoscroll state of the frame.\n   *\n   * If true, the frame will be scrolled into view automatically on update.\n   */\n  set autoscroll(value) {\n    if (value) {\n      this.setAttribute(\"autoscroll\", \"\");\n    } else {\n      this.removeAttribute(\"autoscroll\");\n    }\n  }\n\n  /**\n   * Determines if the element has finished loading\n   */\n  get complete() {\n    return !this.delegate.isLoading\n  }\n\n  /**\n   * Gets the active state of the frame.\n   *\n   * If inactive, source changes will not be observed.\n   */\n  get isActive() {\n    return this.ownerDocument === document && !this.isPreview\n  }\n\n  /**\n   * Sets the active state of the frame.\n   *\n   * If inactive, source changes will not be observed.\n   */\n  get isPreview() {\n    return this.ownerDocument?.documentElement?.hasAttribute(\"data-turbo-preview\")\n  }\n}\n\nfunction frameLoadingStyleFromString(style) {\n  switch (style.toLowerCase()) {\n    case \"lazy\":\n      return FrameLoadingStyle.lazy\n    default:\n      return FrameLoadingStyle.eager\n  }\n}\n\nconst drive = {\n  enabled: true,\n  progressBarDelay: 500,\n  unvisitableExtensions: new Set(\n    [\n      \".7z\", \".aac\", \".apk\", \".avi\", \".bmp\", \".bz2\", \".css\", \".csv\", \".deb\", \".dmg\", \".doc\",\n      \".docx\", \".exe\", \".gif\", \".gz\", \".heic\", \".heif\", \".ico\", \".iso\", \".jpeg\", \".jpg\",\n      \".js\", \".json\", \".m4a\", \".mkv\", \".mov\", \".mp3\", \".mp4\", \".mpeg\", \".mpg\", \".msi\",\n      \".ogg\", \".ogv\", \".pdf\", \".pkg\", \".png\", \".ppt\", \".pptx\", \".rar\", \".rtf\",\n      \".svg\", \".tar\", \".tif\", \".tiff\", \".txt\", \".wav\", \".webm\", \".webp\", \".wma\", \".wmv\",\n      \".xls\", \".xlsx\", \".xml\", \".zip\"\n    ]\n  )\n};\n\nfunction activateScriptElement(element) {\n  if (element.getAttribute(\"data-turbo-eval\") == \"false\") {\n    return element\n  } else {\n    const createdScriptElement = document.createElement(\"script\");\n    const cspNonce = getCspNonce();\n    if (cspNonce) {\n      createdScriptElement.nonce = cspNonce;\n    }\n    createdScriptElement.textContent = element.textContent;\n    createdScriptElement.async = false;\n    copyElementAttributes(createdScriptElement, element);\n    return createdScriptElement\n  }\n}\n\nfunction copyElementAttributes(destinationElement, sourceElement) {\n  for (const { name, value } of sourceElement.attributes) {\n    destinationElement.setAttribute(name, value);\n  }\n}\n\nfunction createDocumentFragment(html) {\n  const template = document.createElement(\"template\");\n  template.innerHTML = html;\n  return template.content\n}\n\nfunction dispatch(eventName, { target, cancelable, detail } = {}) {\n  const event = new CustomEvent(eventName, {\n    cancelable,\n    bubbles: true,\n    composed: true,\n    detail\n  });\n\n  if (target && target.isConnected) {\n    target.dispatchEvent(event);\n  } else {\n    document.documentElement.dispatchEvent(event);\n  }\n\n  return event\n}\n\nfunction cancelEvent(event) {\n  event.preventDefault();\n  event.stopImmediatePropagation();\n}\n\nfunction nextRepaint() {\n  if (document.visibilityState === \"hidden\") {\n    return nextEventLoopTick()\n  } else {\n    return nextAnimationFrame()\n  }\n}\n\nfunction nextAnimationFrame() {\n  return new Promise((resolve) => requestAnimationFrame(() => resolve()))\n}\n\nfunction nextEventLoopTick() {\n  return new Promise((resolve) => setTimeout(() => resolve(), 0))\n}\n\nfunction parseHTMLDocument(html = \"\") {\n  return new DOMParser().parseFromString(html, \"text/html\")\n}\n\nfunction unindent(strings, ...values) {\n  const lines = interpolate(strings, values).replace(/^\\n/, \"\").split(\"\\n\");\n  const match = lines[0].match(/^\\s+/);\n  const indent = match ? match[0].length : 0;\n  return lines.map((line) => line.slice(indent)).join(\"\\n\")\n}\n\nfunction interpolate(strings, values) {\n  return strings.reduce((result, string, i) => {\n    const value = values[i] == undefined ? \"\" : values[i];\n    return result + string + value\n  }, \"\")\n}\n\nfunction uuid() {\n  return Array.from({ length: 36 })\n    .map((_, i) => {\n      if (i == 8 || i == 13 || i == 18 || i == 23) {\n        return \"-\"\n      } else if (i == 14) {\n        return \"4\"\n      } else if (i == 19) {\n        return (Math.floor(Math.random() * 4) + 8).toString(16)\n      } else {\n        return Math.floor(Math.random() * 16).toString(16)\n      }\n    })\n    .join(\"\")\n}\n\nfunction getAttribute(attributeName, ...elements) {\n  for (const value of elements.map((element) => element?.getAttribute(attributeName))) {\n    if (typeof value == \"string\") return value\n  }\n\n  return null\n}\n\nfunction hasAttribute(attributeName, ...elements) {\n  return elements.some((element) => element && element.hasAttribute(attributeName))\n}\n\nfunction markAsBusy(...elements) {\n  for (const element of elements) {\n    if (element.localName == \"turbo-frame\") {\n      element.setAttribute(\"busy\", \"\");\n    }\n    element.setAttribute(\"aria-busy\", \"true\");\n  }\n}\n\nfunction clearBusyState(...elements) {\n  for (const element of elements) {\n    if (element.localName == \"turbo-frame\") {\n      element.removeAttribute(\"busy\");\n    }\n\n    element.removeAttribute(\"aria-busy\");\n  }\n}\n\nfunction waitForLoad(element, timeoutInMilliseconds = 2000) {\n  return new Promise((resolve) => {\n    const onComplete = () => {\n      element.removeEventListener(\"error\", onComplete);\n      element.removeEventListener(\"load\", onComplete);\n      resolve();\n    };\n\n    element.addEventListener(\"load\", onComplete, { once: true });\n    element.addEventListener(\"error\", onComplete, { once: true });\n    setTimeout(resolve, timeoutInMilliseconds);\n  })\n}\n\nfunction getHistoryMethodForAction(action) {\n  switch (action) {\n    case \"replace\":\n      return history.replaceState\n    case \"advance\":\n    case \"restore\":\n      return history.pushState\n  }\n}\n\nfunction isAction(action) {\n  return action == \"advance\" || action == \"replace\" || action == \"restore\"\n}\n\nfunction getVisitAction(...elements) {\n  const action = getAttribute(\"data-turbo-action\", ...elements);\n\n  return isAction(action) ? action : null\n}\n\nfunction getMetaElement(name) {\n  return document.querySelector(`meta[name=\"${name}\"]`)\n}\n\nfunction getMetaContent(name) {\n  const element = getMetaElement(name);\n  return element && element.content\n}\n\nfunction getCspNonce() {\n  const element = getMetaElement(\"csp-nonce\");\n\n  if (element) {\n    const { nonce, content } = element;\n    return nonce == \"\" ? content : nonce\n  }\n}\n\nfunction setMetaContent(name, content) {\n  let element = getMetaElement(name);\n\n  if (!element) {\n    element = document.createElement(\"meta\");\n    element.setAttribute(\"name\", name);\n\n    document.head.appendChild(element);\n  }\n\n  element.setAttribute(\"content\", content);\n\n  return element\n}\n\nfunction findClosestRecursively(element, selector) {\n  if (element instanceof Element) {\n    return (\n      element.closest(selector) || findClosestRecursively(element.assignedSlot || element.getRootNode()?.host, selector)\n    )\n  }\n}\n\nfunction elementIsFocusable(element) {\n  const inertDisabledOrHidden = \"[inert], :disabled, [hidden], details:not([open]), dialog:not([open])\";\n\n  return !!element && element.closest(inertDisabledOrHidden) == null && typeof element.focus == \"function\"\n}\n\nfunction queryAutofocusableElement(elementOrDocumentFragment) {\n  return Array.from(elementOrDocumentFragment.querySelectorAll(\"[autofocus]\")).find(elementIsFocusable)\n}\n\nasync function around(callback, reader) {\n  const before = reader();\n\n  callback();\n\n  await nextAnimationFrame();\n\n  const after = reader();\n\n  return [before, after]\n}\n\nfunction doesNotTargetIFrame(name) {\n  if (name === \"_blank\") {\n    return false\n  } else if (name) {\n    for (const element of document.getElementsByName(name)) {\n      if (element instanceof HTMLIFrameElement) return false\n    }\n\n    return true\n  } else {\n    return true\n  }\n}\n\nfunction findLinkFromClickTarget(target) {\n  const link = findClosestRecursively(target, \"a[href], a[xlink\\\\:href]\");\n\n  if (!link) return null\n  if (link.href.startsWith(\"#\")) return null\n  if (link.hasAttribute(\"download\")) return null\n\n  const linkTarget = link.getAttribute(\"target\");\n  if (linkTarget && linkTarget !== \"_self\") return null\n\n  return link\n}\n\nfunction debounce(fn, delay) {\n  let timeoutId = null;\n\n  return (...args) => {\n    const callback = () => fn.apply(this, args);\n    clearTimeout(timeoutId);\n    timeoutId = setTimeout(callback, delay);\n  }\n}\n\nconst submitter = {\n  \"aria-disabled\": {\n    beforeSubmit: submitter => {\n      submitter.setAttribute(\"aria-disabled\", \"true\");\n      submitter.addEventListener(\"click\", cancelEvent);\n    },\n\n    afterSubmit: submitter => {\n      submitter.removeAttribute(\"aria-disabled\");\n      submitter.removeEventListener(\"click\", cancelEvent);\n    }\n  },\n\n  \"disabled\": {\n    beforeSubmit: submitter => submitter.disabled = true,\n    afterSubmit: submitter => submitter.disabled = false\n  }\n};\n\nclass Config {\n  #submitter = null\n\n  constructor(config) {\n    Object.assign(this, config);\n  }\n\n  get submitter() {\n    return this.#submitter\n  }\n\n  set submitter(value) {\n    this.#submitter = submitter[value] || value;\n  }\n}\n\nconst forms = new Config({\n  mode: \"on\",\n  submitter: \"disabled\"\n});\n\nconst config = {\n  drive,\n  forms\n};\n\nfunction expandURL(locatable) {\n  return new URL(locatable.toString(), document.baseURI)\n}\n\nfunction getAnchor(url) {\n  let anchorMatch;\n  if (url.hash) {\n    return url.hash.slice(1)\n    // eslint-disable-next-line no-cond-assign\n  } else if ((anchorMatch = url.href.match(/#(.*)$/))) {\n    return anchorMatch[1]\n  }\n}\n\nfunction getAction$1(form, submitter) {\n  const action = submitter?.getAttribute(\"formaction\") || form.getAttribute(\"action\") || form.action;\n\n  return expandURL(action)\n}\n\nfunction getExtension(url) {\n  return (getLastPathComponent(url).match(/\\.[^.]*$/) || [])[0] || \"\"\n}\n\nfunction isPrefixedBy(baseURL, url) {\n  const prefix = addTrailingSlash(url.origin + url.pathname);\n  return addTrailingSlash(baseURL.href) === prefix || baseURL.href.startsWith(prefix)\n}\n\nfunction locationIsVisitable(location, rootLocation) {\n  return isPrefixedBy(location, rootLocation) && !config.drive.unvisitableExtensions.has(getExtension(location))\n}\n\nfunction getLocationForLink(link) {\n  return expandURL(link.getAttribute(\"href\") || \"\")\n}\n\nfunction getRequestURL(url) {\n  const anchor = getAnchor(url);\n  return anchor != null ? url.href.slice(0, -(anchor.length + 1)) : url.href\n}\n\nfunction toCacheKey(url) {\n  return getRequestURL(url)\n}\n\nfunction urlsAreEqual(left, right) {\n  return expandURL(left).href == expandURL(right).href\n}\n\nfunction getPathComponents(url) {\n  return url.pathname.split(\"/\").slice(1)\n}\n\nfunction getLastPathComponent(url) {\n  return getPathComponents(url).slice(-1)[0]\n}\n\nfunction addTrailingSlash(value) {\n  return value.endsWith(\"/\") ? value : value + \"/\"\n}\n\nclass FetchResponse {\n  constructor(response) {\n    this.response = response;\n  }\n\n  get succeeded() {\n    return this.response.ok\n  }\n\n  get failed() {\n    return !this.succeeded\n  }\n\n  get clientError() {\n    return this.statusCode >= 400 && this.statusCode <= 499\n  }\n\n  get serverError() {\n    return this.statusCode >= 500 && this.statusCode <= 599\n  }\n\n  get redirected() {\n    return this.response.redirected\n  }\n\n  get location() {\n    return expandURL(this.response.url)\n  }\n\n  get isHTML() {\n    return this.contentType && this.contentType.match(/^(?:text\\/([^\\s;,]+\\b)?html|application\\/xhtml\\+xml)\\b/)\n  }\n\n  get statusCode() {\n    return this.response.status\n  }\n\n  get contentType() {\n    return this.header(\"Content-Type\")\n  }\n\n  get responseText() {\n    return this.response.clone().text()\n  }\n\n  get responseHTML() {\n    if (this.isHTML) {\n      return this.response.clone().text()\n    } else {\n      return Promise.resolve(undefined)\n    }\n  }\n\n  header(name) {\n    return this.response.headers.get(name)\n  }\n}\n\nclass LimitedSet extends Set {\n  constructor(maxSize) {\n    super();\n    this.maxSize = maxSize;\n  }\n\n  add(value) {\n    if (this.size >= this.maxSize) {\n      const iterator = this.values();\n      const oldestValue = iterator.next().value;\n      this.delete(oldestValue);\n    }\n    super.add(value);\n  }\n}\n\nconst recentRequests = new LimitedSet(20);\n\nfunction fetchWithTurboHeaders(url, options = {}) {\n  const modifiedHeaders = new Headers(options.headers || {});\n  const requestUID = uuid();\n  recentRequests.add(requestUID);\n  modifiedHeaders.append(\"X-Turbo-Request-Id\", requestUID);\n\n  return window.fetch(url, {\n    ...options,\n    headers: modifiedHeaders\n  })\n}\n\nfunction fetchMethodFromString(method) {\n  switch (method.toLowerCase()) {\n    case \"get\":\n      return FetchMethod.get\n    case \"post\":\n      return FetchMethod.post\n    case \"put\":\n      return FetchMethod.put\n    case \"patch\":\n      return FetchMethod.patch\n    case \"delete\":\n      return FetchMethod.delete\n  }\n}\n\nconst FetchMethod = {\n  get: \"get\",\n  post: \"post\",\n  put: \"put\",\n  patch: \"patch\",\n  delete: \"delete\"\n};\n\nfunction fetchEnctypeFromString(encoding) {\n  switch (encoding.toLowerCase()) {\n    case FetchEnctype.multipart:\n      return FetchEnctype.multipart\n    case FetchEnctype.plain:\n      return FetchEnctype.plain\n    default:\n      return FetchEnctype.urlEncoded\n  }\n}\n\nconst FetchEnctype = {\n  urlEncoded: \"application/x-www-form-urlencoded\",\n  multipart: \"multipart/form-data\",\n  plain: \"text/plain\"\n};\n\nclass FetchRequest {\n  abortController = new AbortController()\n  #resolveRequestPromise = (_value) => {}\n\n  constructor(delegate, method, location, requestBody = new URLSearchParams(), target = null, enctype = FetchEnctype.urlEncoded) {\n    const [url, body] = buildResourceAndBody(expandURL(location), method, requestBody, enctype);\n\n    this.delegate = delegate;\n    this.url = url;\n    this.target = target;\n    this.fetchOptions = {\n      credentials: \"same-origin\",\n      redirect: \"follow\",\n      method: method.toUpperCase(),\n      headers: { ...this.defaultHeaders },\n      body: body,\n      signal: this.abortSignal,\n      referrer: this.delegate.referrer?.href\n    };\n    this.enctype = enctype;\n  }\n\n  get method() {\n    return this.fetchOptions.method\n  }\n\n  set method(value) {\n    const fetchBody = this.isSafe ? this.url.searchParams : this.fetchOptions.body || new FormData();\n    const fetchMethod = fetchMethodFromString(value) || FetchMethod.get;\n\n    this.url.search = \"\";\n\n    const [url, body] = buildResourceAndBody(this.url, fetchMethod, fetchBody, this.enctype);\n\n    this.url = url;\n    this.fetchOptions.body = body;\n    this.fetchOptions.method = fetchMethod.toUpperCase();\n  }\n\n  get headers() {\n    return this.fetchOptions.headers\n  }\n\n  set headers(value) {\n    this.fetchOptions.headers = value;\n  }\n\n  get body() {\n    if (this.isSafe) {\n      return this.url.searchParams\n    } else {\n      return this.fetchOptions.body\n    }\n  }\n\n  set body(value) {\n    this.fetchOptions.body = value;\n  }\n\n  get location() {\n    return this.url\n  }\n\n  get params() {\n    return this.url.searchParams\n  }\n\n  get entries() {\n    return this.body ? Array.from(this.body.entries()) : []\n  }\n\n  cancel() {\n    this.abortController.abort();\n  }\n\n  async perform() {\n    const { fetchOptions } = this;\n    this.delegate.prepareRequest(this);\n    const event = await this.#allowRequestToBeIntercepted(fetchOptions);\n    try {\n      this.delegate.requestStarted(this);\n\n      if (event.detail.fetchRequest) {\n        this.response = event.detail.fetchRequest.response;\n      } else {\n        this.response = fetchWithTurboHeaders(this.url.href, fetchOptions);\n      }\n\n      const response = await this.response;\n      return await this.receive(response)\n    } catch (error) {\n      if (error.name !== \"AbortError\") {\n        if (this.#willDelegateErrorHandling(error)) {\n          this.delegate.requestErrored(this, error);\n        }\n        throw error\n      }\n    } finally {\n      this.delegate.requestFinished(this);\n    }\n  }\n\n  async receive(response) {\n    const fetchResponse = new FetchResponse(response);\n    const event = dispatch(\"turbo:before-fetch-response\", {\n      cancelable: true,\n      detail: { fetchResponse },\n      target: this.target\n    });\n    if (event.defaultPrevented) {\n      this.delegate.requestPreventedHandlingResponse(this, fetchResponse);\n    } else if (fetchResponse.succeeded) {\n      this.delegate.requestSucceededWithResponse(this, fetchResponse);\n    } else {\n      this.delegate.requestFailedWithResponse(this, fetchResponse);\n    }\n    return fetchResponse\n  }\n\n  get defaultHeaders() {\n    return {\n      Accept: \"text/html, application/xhtml+xml\"\n    }\n  }\n\n  get isSafe() {\n    return isSafe(this.method)\n  }\n\n  get abortSignal() {\n    return this.abortController.signal\n  }\n\n  acceptResponseType(mimeType) {\n    this.headers[\"Accept\"] = [mimeType, this.headers[\"Accept\"]].join(\", \");\n  }\n\n  async #allowRequestToBeIntercepted(fetchOptions) {\n    const requestInterception = new Promise((resolve) => (this.#resolveRequestPromise = resolve));\n    const event = dispatch(\"turbo:before-fetch-request\", {\n      cancelable: true,\n      detail: {\n        fetchOptions,\n        url: this.url,\n        resume: this.#resolveRequestPromise\n      },\n      target: this.target\n    });\n    this.url = event.detail.url;\n    if (event.defaultPrevented) await requestInterception;\n\n    return event\n  }\n\n  #willDelegateErrorHandling(error) {\n    const event = dispatch(\"turbo:fetch-request-error\", {\n      target: this.target,\n      cancelable: true,\n      detail: { request: this, error: error }\n    });\n\n    return !event.defaultPrevented\n  }\n}\n\nfunction isSafe(fetchMethod) {\n  return fetchMethodFromString(fetchMethod) == FetchMethod.get\n}\n\nfunction buildResourceAndBody(resource, method, requestBody, enctype) {\n  const searchParams =\n    Array.from(requestBody).length > 0 ? new URLSearchParams(entriesExcludingFiles(requestBody)) : resource.searchParams;\n\n  if (isSafe(method)) {\n    return [mergeIntoURLSearchParams(resource, searchParams), null]\n  } else if (enctype == FetchEnctype.urlEncoded) {\n    return [resource, searchParams]\n  } else {\n    return [resource, requestBody]\n  }\n}\n\nfunction entriesExcludingFiles(requestBody) {\n  const entries = [];\n\n  for (const [name, value] of requestBody) {\n    if (value instanceof File) continue\n    else entries.push([name, value]);\n  }\n\n  return entries\n}\n\nfunction mergeIntoURLSearchParams(url, requestBody) {\n  const searchParams = new URLSearchParams(entriesExcludingFiles(requestBody));\n\n  url.search = searchParams.toString();\n\n  return url\n}\n\nclass AppearanceObserver {\n  started = false\n\n  constructor(delegate, element) {\n    this.delegate = delegate;\n    this.element = element;\n    this.intersectionObserver = new IntersectionObserver(this.intersect);\n  }\n\n  start() {\n    if (!this.started) {\n      this.started = true;\n      this.intersectionObserver.observe(this.element);\n    }\n  }\n\n  stop() {\n    if (this.started) {\n      this.started = false;\n      this.intersectionObserver.unobserve(this.element);\n    }\n  }\n\n  intersect = (entries) => {\n    const lastEntry = entries.slice(-1)[0];\n    if (lastEntry?.isIntersecting) {\n      this.delegate.elementAppearedInViewport(this.element);\n    }\n  }\n}\n\nclass StreamMessage {\n  static contentType = \"text/vnd.turbo-stream.html\"\n\n  static wrap(message) {\n    if (typeof message == \"string\") {\n      return new this(createDocumentFragment(message))\n    } else {\n      return message\n    }\n  }\n\n  constructor(fragment) {\n    this.fragment = importStreamElements(fragment);\n  }\n}\n\nfunction importStreamElements(fragment) {\n  for (const element of fragment.querySelectorAll(\"turbo-stream\")) {\n    const streamElement = document.importNode(element, true);\n\n    for (const inertScriptElement of streamElement.templateElement.content.querySelectorAll(\"script\")) {\n      inertScriptElement.replaceWith(activateScriptElement(inertScriptElement));\n    }\n\n    element.replaceWith(streamElement);\n  }\n\n  return fragment\n}\n\nconst identity = key => key;\n\nclass LRUCache {\n  keys = []\n  entries = {}\n  #toCacheKey\n\n  constructor(size, toCacheKey = identity) {\n    this.size = size;\n    this.#toCacheKey = toCacheKey;\n  }\n\n  has(key) {\n    return this.#toCacheKey(key) in this.entries\n  }\n\n  get(key) {\n    if (this.has(key)) {\n      const entry = this.read(key);\n      this.touch(key);\n      return entry\n    }\n  }\n\n  put(key, entry) {\n    this.write(key, entry);\n    this.touch(key);\n    return entry\n  }\n\n  clear() {\n    for (const key of Object.keys(this.entries)) {\n      this.evict(key);\n    }\n  }\n\n  // Private\n\n  read(key) {\n    return this.entries[this.#toCacheKey(key)]\n  }\n\n  write(key, entry) {\n    this.entries[this.#toCacheKey(key)] = entry;\n  }\n\n  touch(key) {\n    key = this.#toCacheKey(key);\n    const index = this.keys.indexOf(key);\n    if (index > -1) this.keys.splice(index, 1);\n    this.keys.unshift(key);\n    this.trim();\n  }\n\n  trim() {\n    for (const key of this.keys.splice(this.size)) {\n      this.evict(key);\n    }\n  }\n\n  evict(key) {\n    delete this.entries[key];\n  }\n}\n\nconst PREFETCH_DELAY = 100;\n\nclass PrefetchCache extends LRUCache {\n  #prefetchTimeout = null\n  #maxAges = {}\n\n  constructor(size = 1, prefetchDelay = PREFETCH_DELAY) {\n    super(size, toCacheKey);\n    this.prefetchDelay = prefetchDelay;\n  }\n\n  putLater(url, request, ttl) {\n    this.#prefetchTimeout = setTimeout(() => {\n      request.perform();\n      this.put(url, request, ttl);\n      this.#prefetchTimeout = null;\n    }, this.prefetchDelay);\n  }\n\n  put(url, request, ttl = cacheTtl) {\n    super.put(url, request);\n    this.#maxAges[toCacheKey(url)] = new Date(new Date().getTime() + ttl);\n  }\n\n  clear() {\n    super.clear();\n    if (this.#prefetchTimeout) clearTimeout(this.#prefetchTimeout);\n  }\n\n  evict(key) {\n    super.evict(key);\n    delete this.#maxAges[key];\n  }\n\n  has(key) {\n    if (super.has(key)) {\n      const maxAge = this.#maxAges[toCacheKey(key)];\n\n      return maxAge && maxAge > Date.now()\n    } else {\n      return false\n    }\n  }\n}\n\nconst cacheTtl = 10 * 1000;\nconst prefetchCache = new PrefetchCache();\n\nconst FormSubmissionState = {\n  initialized: \"initialized\",\n  requesting: \"requesting\",\n  waiting: \"waiting\",\n  receiving: \"receiving\",\n  stopping: \"stopping\",\n  stopped: \"stopped\"\n};\n\nclass FormSubmission {\n  state = FormSubmissionState.initialized\n\n  static confirmMethod(message) {\n    return Promise.resolve(confirm(message))\n  }\n\n  constructor(delegate, formElement, submitter, mustRedirect = false) {\n    const method = getMethod(formElement, submitter);\n    const action = getAction(getFormAction(formElement, submitter), method);\n    const body = buildFormData(formElement, submitter);\n    const enctype = getEnctype(formElement, submitter);\n\n    this.delegate = delegate;\n    this.formElement = formElement;\n    this.submitter = submitter;\n    this.fetchRequest = new FetchRequest(this, method, action, body, formElement, enctype);\n    this.mustRedirect = mustRedirect;\n  }\n\n  get method() {\n    return this.fetchRequest.method\n  }\n\n  set method(value) {\n    this.fetchRequest.method = value;\n  }\n\n  get action() {\n    return this.fetchRequest.url.toString()\n  }\n\n  set action(value) {\n    this.fetchRequest.url = expandURL(value);\n  }\n\n  get body() {\n    return this.fetchRequest.body\n  }\n\n  get enctype() {\n    return this.fetchRequest.enctype\n  }\n\n  get isSafe() {\n    return this.fetchRequest.isSafe\n  }\n\n  get location() {\n    return this.fetchRequest.url\n  }\n\n  // The submission process\n\n  async start() {\n    const { initialized, requesting } = FormSubmissionState;\n    const confirmationMessage = getAttribute(\"data-turbo-confirm\", this.submitter, this.formElement);\n\n    if (typeof confirmationMessage === \"string\") {\n      const confirmMethod = typeof config.forms.confirm === \"function\" ?\n        config.forms.confirm :\n        FormSubmission.confirmMethod;\n\n      const answer = await confirmMethod(confirmationMessage, this.formElement, this.submitter);\n      if (!answer) {\n        return\n      }\n    }\n\n    if (this.state == initialized) {\n      this.state = requesting;\n      return this.fetchRequest.perform()\n    }\n  }\n\n  stop() {\n    const { stopping, stopped } = FormSubmissionState;\n    if (this.state != stopping && this.state != stopped) {\n      this.state = stopping;\n      this.fetchRequest.cancel();\n      return true\n    }\n  }\n\n  // Fetch request delegate\n\n  prepareRequest(request) {\n    if (!request.isSafe) {\n      const token = getCookieValue(getMetaContent(\"csrf-param\")) || getMetaContent(\"csrf-token\");\n      if (token) {\n        request.headers[\"X-CSRF-Token\"] = token;\n      }\n    }\n\n    if (this.requestAcceptsTurboStreamResponse(request)) {\n      request.acceptResponseType(StreamMessage.contentType);\n    }\n  }\n\n  requestStarted(_request) {\n    this.state = FormSubmissionState.waiting;\n    if (this.submitter) config.forms.submitter.beforeSubmit(this.submitter);\n    this.setSubmitsWith();\n    markAsBusy(this.formElement);\n    dispatch(\"turbo:submit-start\", {\n      target: this.formElement,\n      detail: { formSubmission: this }\n    });\n    this.delegate.formSubmissionStarted(this);\n  }\n\n  requestPreventedHandlingResponse(request, response) {\n    prefetchCache.clear();\n\n    this.result = { success: response.succeeded, fetchResponse: response };\n  }\n\n  requestSucceededWithResponse(request, response) {\n    if (response.clientError || response.serverError) {\n      this.delegate.formSubmissionFailedWithResponse(this, response);\n      return\n    }\n\n    prefetchCache.clear();\n\n    if (this.requestMustRedirect(request) && responseSucceededWithoutRedirect(response)) {\n      const error = new Error(\"Form responses must redirect to another location\");\n      this.delegate.formSubmissionErrored(this, error);\n    } else {\n      this.state = FormSubmissionState.receiving;\n      this.result = { success: true, fetchResponse: response };\n      this.delegate.formSubmissionSucceededWithResponse(this, response);\n    }\n  }\n\n  requestFailedWithResponse(request, response) {\n    this.result = { success: false, fetchResponse: response };\n    this.delegate.formSubmissionFailedWithResponse(this, response);\n  }\n\n  requestErrored(request, error) {\n    this.result = { success: false, error };\n    this.delegate.formSubmissionErrored(this, error);\n  }\n\n  requestFinished(_request) {\n    this.state = FormSubmissionState.stopped;\n    if (this.submitter) config.forms.submitter.afterSubmit(this.submitter);\n    this.resetSubmitterText();\n    clearBusyState(this.formElement);\n    dispatch(\"turbo:submit-end\", {\n      target: this.formElement,\n      detail: { formSubmission: this, ...this.result }\n    });\n    this.delegate.formSubmissionFinished(this);\n  }\n\n  // Private\n\n  setSubmitsWith() {\n    if (!this.submitter || !this.submitsWith) return\n\n    if (this.submitter.matches(\"button\")) {\n      this.originalSubmitText = this.submitter.innerHTML;\n      this.submitter.innerHTML = this.submitsWith;\n    } else if (this.submitter.matches(\"input\")) {\n      const input = this.submitter;\n      this.originalSubmitText = input.value;\n      input.value = this.submitsWith;\n    }\n  }\n\n  resetSubmitterText() {\n    if (!this.submitter || !this.originalSubmitText) return\n\n    if (this.submitter.matches(\"button\")) {\n      this.submitter.innerHTML = this.originalSubmitText;\n    } else if (this.submitter.matches(\"input\")) {\n      const input = this.submitter;\n      input.value = this.originalSubmitText;\n    }\n  }\n\n  requestMustRedirect(request) {\n    return !request.isSafe && this.mustRedirect\n  }\n\n  requestAcceptsTurboStreamResponse(request) {\n    return !request.isSafe || hasAttribute(\"data-turbo-stream\", this.submitter, this.formElement)\n  }\n\n  get submitsWith() {\n    return this.submitter?.getAttribute(\"data-turbo-submits-with\")\n  }\n}\n\nfunction buildFormData(formElement, submitter) {\n  const formData = new FormData(formElement);\n  const name = submitter?.getAttribute(\"name\");\n  const value = submitter?.getAttribute(\"value\");\n\n  if (name) {\n    formData.append(name, value || \"\");\n  }\n\n  return formData\n}\n\nfunction getCookieValue(cookieName) {\n  if (cookieName != null) {\n    const cookies = document.cookie ? document.cookie.split(\"; \") : [];\n    const cookie = cookies.find((cookie) => cookie.startsWith(cookieName));\n    if (cookie) {\n      const value = cookie.split(\"=\").slice(1).join(\"=\");\n      return value ? decodeURIComponent(value) : undefined\n    }\n  }\n}\n\nfunction responseSucceededWithoutRedirect(response) {\n  return response.statusCode == 200 && !response.redirected\n}\n\nfunction getFormAction(formElement, submitter) {\n  const formElementAction = typeof formElement.action === \"string\" ? formElement.action : null;\n\n  if (submitter?.hasAttribute(\"formaction\")) {\n    return submitter.getAttribute(\"formaction\") || \"\"\n  } else {\n    return formElement.getAttribute(\"action\") || formElementAction || \"\"\n  }\n}\n\nfunction getAction(formAction, fetchMethod) {\n  const action = expandURL(formAction);\n\n  if (isSafe(fetchMethod)) {\n    action.search = \"\";\n  }\n\n  return action\n}\n\nfunction getMethod(formElement, submitter) {\n  const method = submitter?.getAttribute(\"formmethod\") || formElement.getAttribute(\"method\") || \"\";\n  return fetchMethodFromString(method.toLowerCase()) || FetchMethod.get\n}\n\nfunction getEnctype(formElement, submitter) {\n  return fetchEnctypeFromString(submitter?.getAttribute(\"formenctype\") || formElement.enctype)\n}\n\nclass Snapshot {\n  constructor(element) {\n    this.element = element;\n  }\n\n  get activeElement() {\n    return this.element.ownerDocument.activeElement\n  }\n\n  get children() {\n    return [...this.element.children]\n  }\n\n  hasAnchor(anchor) {\n    return this.getElementForAnchor(anchor) != null\n  }\n\n  getElementForAnchor(anchor) {\n    return anchor ? this.element.querySelector(`[id='${anchor}'], a[name='${anchor}']`) : null\n  }\n\n  get isConnected() {\n    return this.element.isConnected\n  }\n\n  get firstAutofocusableElement() {\n    return queryAutofocusableElement(this.element)\n  }\n\n  get permanentElements() {\n    return queryPermanentElementsAll(this.element)\n  }\n\n  getPermanentElementById(id) {\n    return getPermanentElementById(this.element, id)\n  }\n\n  getPermanentElementMapForSnapshot(snapshot) {\n    const permanentElementMap = {};\n\n    for (const currentPermanentElement of this.permanentElements) {\n      const { id } = currentPermanentElement;\n      const newPermanentElement = snapshot.getPermanentElementById(id);\n      if (newPermanentElement) {\n        permanentElementMap[id] = [currentPermanentElement, newPermanentElement];\n      }\n    }\n\n    return permanentElementMap\n  }\n}\n\nfunction getPermanentElementById(node, id) {\n  return node.querySelector(`#${id}[data-turbo-permanent]`)\n}\n\nfunction queryPermanentElementsAll(node) {\n  return node.querySelectorAll(\"[id][data-turbo-permanent]\")\n}\n\nclass FormSubmitObserver {\n  started = false\n\n  constructor(delegate, eventTarget) {\n    this.delegate = delegate;\n    this.eventTarget = eventTarget;\n  }\n\n  start() {\n    if (!this.started) {\n      this.eventTarget.addEventListener(\"submit\", this.submitCaptured, true);\n      this.started = true;\n    }\n  }\n\n  stop() {\n    if (this.started) {\n      this.eventTarget.removeEventListener(\"submit\", this.submitCaptured, true);\n      this.started = false;\n    }\n  }\n\n  submitCaptured = () => {\n    this.eventTarget.removeEventListener(\"submit\", this.submitBubbled, false);\n    this.eventTarget.addEventListener(\"submit\", this.submitBubbled, false);\n  }\n\n  submitBubbled = (event) => {\n    if (!event.defaultPrevented) {\n      const form = event.target instanceof HTMLFormElement ? event.target : undefined;\n      const submitter = event.submitter || undefined;\n\n      if (\n        form &&\n        submissionDoesNotDismissDialog(form, submitter) &&\n        submissionDoesNotTargetIFrame(form, submitter) &&\n        this.delegate.willSubmitForm(form, submitter)\n      ) {\n        event.preventDefault();\n        event.stopImmediatePropagation();\n        this.delegate.formSubmitted(form, submitter);\n      }\n    }\n  }\n}\n\nfunction submissionDoesNotDismissDialog(form, submitter) {\n  const method = submitter?.getAttribute(\"formmethod\") || form.getAttribute(\"method\");\n\n  return method != \"dialog\"\n}\n\nfunction submissionDoesNotTargetIFrame(form, submitter) {\n  const target = submitter?.getAttribute(\"formtarget\") || form.getAttribute(\"target\");\n\n  return doesNotTargetIFrame(target)\n}\n\nclass View {\n  #resolveRenderPromise = (_value) => {}\n  #resolveInterceptionPromise = (_value) => {}\n\n  constructor(delegate, element) {\n    this.delegate = delegate;\n    this.element = element;\n  }\n\n  // Scrolling\n\n  scrollToAnchor(anchor) {\n    const element = this.snapshot.getElementForAnchor(anchor);\n    if (element) {\n      this.focusElement(element);\n      this.scrollToElement(element);\n    } else {\n      this.scrollToPosition({ x: 0, y: 0 });\n    }\n  }\n\n  scrollToAnchorFromLocation(location) {\n    this.scrollToAnchor(getAnchor(location));\n  }\n\n  scrollToElement(element) {\n    element.scrollIntoView();\n  }\n\n  focusElement(element) {\n    if (element instanceof HTMLElement) {\n      if (element.hasAttribute(\"tabindex\")) {\n        element.focus();\n      } else {\n        element.setAttribute(\"tabindex\", \"-1\");\n        element.focus();\n        element.removeAttribute(\"tabindex\");\n      }\n    }\n  }\n\n  scrollToPosition({ x, y }) {\n    this.scrollRoot.scrollTo(x, y);\n  }\n\n  scrollToTop() {\n    this.scrollToPosition({ x: 0, y: 0 });\n  }\n\n  get scrollRoot() {\n    return window\n  }\n\n  // Rendering\n\n  async render(renderer) {\n    const { isPreview, shouldRender, willRender, newSnapshot: snapshot } = renderer;\n\n    // A workaround to ignore tracked element mismatch reloads when performing\n    // a promoted Visit from a frame navigation\n    const shouldInvalidate = willRender;\n\n    if (shouldRender) {\n      try {\n        this.renderPromise = new Promise((resolve) => (this.#resolveRenderPromise = resolve));\n        this.renderer = renderer;\n        await this.prepareToRenderSnapshot(renderer);\n\n        const renderInterception = new Promise((resolve) => (this.#resolveInterceptionPromise = resolve));\n        const options = { resume: this.#resolveInterceptionPromise, render: this.renderer.renderElement, renderMethod: this.renderer.renderMethod };\n        const immediateRender = this.delegate.allowsImmediateRender(snapshot, options);\n        if (!immediateRender) await renderInterception;\n\n        await this.renderSnapshot(renderer);\n        this.delegate.viewRenderedSnapshot(snapshot, isPreview, this.renderer.renderMethod);\n        this.delegate.preloadOnLoadLinksForView(this.element);\n        this.finishRenderingSnapshot(renderer);\n      } finally {\n        delete this.renderer;\n        this.#resolveRenderPromise(undefined);\n        delete this.renderPromise;\n      }\n    } else if (shouldInvalidate) {\n      this.invalidate(renderer.reloadReason);\n    }\n  }\n\n  invalidate(reason) {\n    this.delegate.viewInvalidated(reason);\n  }\n\n  async prepareToRenderSnapshot(renderer) {\n    this.markAsPreview(renderer.isPreview);\n    await renderer.prepareToRender();\n  }\n\n  markAsPreview(isPreview) {\n    if (isPreview) {\n      this.element.setAttribute(\"data-turbo-preview\", \"\");\n    } else {\n      this.element.removeAttribute(\"data-turbo-preview\");\n    }\n  }\n\n  markVisitDirection(direction) {\n    this.element.setAttribute(\"data-turbo-visit-direction\", direction);\n  }\n\n  unmarkVisitDirection() {\n    this.element.removeAttribute(\"data-turbo-visit-direction\");\n  }\n\n  async renderSnapshot(renderer) {\n    await renderer.render();\n  }\n\n  finishRenderingSnapshot(renderer) {\n    renderer.finishRendering();\n  }\n}\n\nclass FrameView extends View {\n  missing() {\n    this.element.innerHTML = `<strong class=\"turbo-frame-error\">Content missing</strong>`;\n  }\n\n  get snapshot() {\n    return new Snapshot(this.element)\n  }\n}\n\nclass LinkInterceptor {\n  constructor(delegate, element) {\n    this.delegate = delegate;\n    this.element = element;\n  }\n\n  start() {\n    this.element.addEventListener(\"click\", this.clickBubbled);\n    document.addEventListener(\"turbo:click\", this.linkClicked);\n    document.addEventListener(\"turbo:before-visit\", this.willVisit);\n  }\n\n  stop() {\n    this.element.removeEventListener(\"click\", this.clickBubbled);\n    document.removeEventListener(\"turbo:click\", this.linkClicked);\n    document.removeEventListener(\"turbo:before-visit\", this.willVisit);\n  }\n\n  clickBubbled = (event) => {\n    if (this.clickEventIsSignificant(event)) {\n      this.clickEvent = event;\n    } else {\n      delete this.clickEvent;\n    }\n  }\n\n  linkClicked = (event) => {\n    if (this.clickEvent && this.clickEventIsSignificant(event)) {\n      if (this.delegate.shouldInterceptLinkClick(event.target, event.detail.url, event.detail.originalEvent)) {\n        this.clickEvent.preventDefault();\n        event.preventDefault();\n        this.delegate.linkClickIntercepted(event.target, event.detail.url, event.detail.originalEvent);\n      }\n    }\n    delete this.clickEvent;\n  }\n\n  willVisit = (_event) => {\n    delete this.clickEvent;\n  }\n\n  clickEventIsSignificant(event) {\n    const target = event.composed ? event.target?.parentElement : event.target;\n    const element = findLinkFromClickTarget(target) || target;\n\n    return element instanceof Element && element.closest(\"turbo-frame, html\") == this.element\n  }\n}\n\nclass LinkClickObserver {\n  started = false\n\n  constructor(delegate, eventTarget) {\n    this.delegate = delegate;\n    this.eventTarget = eventTarget;\n  }\n\n  start() {\n    if (!this.started) {\n      this.eventTarget.addEventListener(\"click\", this.clickCaptured, true);\n      this.started = true;\n    }\n  }\n\n  stop() {\n    if (this.started) {\n      this.eventTarget.removeEventListener(\"click\", this.clickCaptured, true);\n      this.started = false;\n    }\n  }\n\n  clickCaptured = () => {\n    this.eventTarget.removeEventListener(\"click\", this.clickBubbled, false);\n    this.eventTarget.addEventListener(\"click\", this.clickBubbled, false);\n  }\n\n  clickBubbled = (event) => {\n    if (event instanceof MouseEvent && this.clickEventIsSignificant(event)) {\n      const target = (event.composedPath && event.composedPath()[0]) || event.target;\n      const link = findLinkFromClickTarget(target);\n      if (link && doesNotTargetIFrame(link.target)) {\n        const location = getLocationForLink(link);\n        if (this.delegate.willFollowLinkToLocation(link, location, event)) {\n          event.preventDefault();\n          this.delegate.followedLinkToLocation(link, location);\n        }\n      }\n    }\n  }\n\n  clickEventIsSignificant(event) {\n    return !(\n      (event.target && event.target.isContentEditable) ||\n      event.defaultPrevented ||\n      event.which > 1 ||\n      event.altKey ||\n      event.ctrlKey ||\n      event.metaKey ||\n      event.shiftKey\n    )\n  }\n}\n\nclass FormLinkClickObserver {\n  constructor(delegate, element) {\n    this.delegate = delegate;\n    this.linkInterceptor = new LinkClickObserver(this, element);\n  }\n\n  start() {\n    this.linkInterceptor.start();\n  }\n\n  stop() {\n    this.linkInterceptor.stop();\n  }\n\n  // Link hover observer delegate\n\n  canPrefetchRequestToLocation(link, location) {\n    return false\n  }\n\n  prefetchAndCacheRequestToLocation(link, location) {\n    return\n  }\n\n  // Link click observer delegate\n\n  willFollowLinkToLocation(link, location, originalEvent) {\n    return (\n      this.delegate.willSubmitFormLinkToLocation(link, location, originalEvent) &&\n      (link.hasAttribute(\"data-turbo-method\") || link.hasAttribute(\"data-turbo-stream\"))\n    )\n  }\n\n  followedLinkToLocation(link, location) {\n    const form = document.createElement(\"form\");\n\n    const type = \"hidden\";\n    for (const [name, value] of location.searchParams) {\n      form.append(Object.assign(document.createElement(\"input\"), { type, name, value }));\n    }\n\n    const action = Object.assign(location, { search: \"\" });\n    form.setAttribute(\"data-turbo\", \"true\");\n    form.setAttribute(\"action\", action.href);\n    form.setAttribute(\"hidden\", \"\");\n\n    const method = link.getAttribute(\"data-turbo-method\");\n    if (method) form.setAttribute(\"method\", method);\n\n    const turboFrame = link.getAttribute(\"data-turbo-frame\");\n    if (turboFrame) form.setAttribute(\"data-turbo-frame\", turboFrame);\n\n    const turboAction = getVisitAction(link);\n    if (turboAction) form.setAttribute(\"data-turbo-action\", turboAction);\n\n    const turboConfirm = link.getAttribute(\"data-turbo-confirm\");\n    if (turboConfirm) form.setAttribute(\"data-turbo-confirm\", turboConfirm);\n\n    const turboStream = link.hasAttribute(\"data-turbo-stream\");\n    if (turboStream) form.setAttribute(\"data-turbo-stream\", \"\");\n\n    this.delegate.submittedFormLinkToLocation(link, location, form);\n\n    document.body.appendChild(form);\n    form.addEventListener(\"turbo:submit-end\", () => form.remove(), { once: true });\n    requestAnimationFrame(() => form.requestSubmit());\n  }\n}\n\nclass Bardo {\n  static async preservingPermanentElements(delegate, permanentElementMap, callback) {\n    const bardo = new this(delegate, permanentElementMap);\n    bardo.enter();\n    await callback();\n    bardo.leave();\n  }\n\n  constructor(delegate, permanentElementMap) {\n    this.delegate = delegate;\n    this.permanentElementMap = permanentElementMap;\n  }\n\n  enter() {\n    for (const id in this.permanentElementMap) {\n      const [currentPermanentElement, newPermanentElement] = this.permanentElementMap[id];\n      this.delegate.enteringBardo(currentPermanentElement, newPermanentElement);\n      this.replaceNewPermanentElementWithPlaceholder(newPermanentElement);\n    }\n  }\n\n  leave() {\n    for (const id in this.permanentElementMap) {\n      const [currentPermanentElement] = this.permanentElementMap[id];\n      this.replaceCurrentPermanentElementWithClone(currentPermanentElement);\n      this.replacePlaceholderWithPermanentElement(currentPermanentElement);\n      this.delegate.leavingBardo(currentPermanentElement);\n    }\n  }\n\n  replaceNewPermanentElementWithPlaceholder(permanentElement) {\n    const placeholder = createPlaceholderForPermanentElement(permanentElement);\n    permanentElement.replaceWith(placeholder);\n  }\n\n  replaceCurrentPermanentElementWithClone(permanentElement) {\n    const clone = permanentElement.cloneNode(true);\n    permanentElement.replaceWith(clone);\n  }\n\n  replacePlaceholderWithPermanentElement(permanentElement) {\n    const placeholder = this.getPlaceholderById(permanentElement.id);\n    placeholder?.replaceWith(permanentElement);\n  }\n\n  getPlaceholderById(id) {\n    return this.placeholders.find((element) => element.content == id)\n  }\n\n  get placeholders() {\n    return [...document.querySelectorAll(\"meta[name=turbo-permanent-placeholder][content]\")]\n  }\n}\n\nfunction createPlaceholderForPermanentElement(permanentElement) {\n  const element = document.createElement(\"meta\");\n  element.setAttribute(\"name\", \"turbo-permanent-placeholder\");\n  element.setAttribute(\"content\", permanentElement.id);\n  return element\n}\n\nclass Renderer {\n  #activeElement = null\n\n  static renderElement(currentElement, newElement) {\n    // Abstract method\n  }\n\n  constructor(currentSnapshot, newSnapshot, isPreview, willRender = true) {\n    this.currentSnapshot = currentSnapshot;\n    this.newSnapshot = newSnapshot;\n    this.isPreview = isPreview;\n    this.willRender = willRender;\n    this.renderElement = this.constructor.renderElement;\n    this.promise = new Promise((resolve, reject) => (this.resolvingFunctions = { resolve, reject }));\n  }\n\n  get shouldRender() {\n    return true\n  }\n\n  get shouldAutofocus() {\n    return true\n  }\n\n  get reloadReason() {\n    return\n  }\n\n  prepareToRender() {\n    return\n  }\n\n  render() {\n    // Abstract method\n  }\n\n  finishRendering() {\n    if (this.resolvingFunctions) {\n      this.resolvingFunctions.resolve();\n      delete this.resolvingFunctions;\n    }\n  }\n\n  async preservingPermanentElements(callback) {\n    await Bardo.preservingPermanentElements(this, this.permanentElementMap, callback);\n  }\n\n  focusFirstAutofocusableElement() {\n    if (this.shouldAutofocus) {\n      const element = this.connectedSnapshot.firstAutofocusableElement;\n      if (element) {\n        element.focus();\n      }\n    }\n  }\n\n  // Bardo delegate\n\n  enteringBardo(currentPermanentElement) {\n    if (this.#activeElement) return\n\n    if (currentPermanentElement.contains(this.currentSnapshot.activeElement)) {\n      this.#activeElement = this.currentSnapshot.activeElement;\n    }\n  }\n\n  leavingBardo(currentPermanentElement) {\n    if (currentPermanentElement.contains(this.#activeElement) && this.#activeElement instanceof HTMLElement) {\n      this.#activeElement.focus();\n\n      this.#activeElement = null;\n    }\n  }\n\n  get connectedSnapshot() {\n    return this.newSnapshot.isConnected ? this.newSnapshot : this.currentSnapshot\n  }\n\n  get currentElement() {\n    return this.currentSnapshot.element\n  }\n\n  get newElement() {\n    return this.newSnapshot.element\n  }\n\n  get permanentElementMap() {\n    return this.currentSnapshot.getPermanentElementMapForSnapshot(this.newSnapshot)\n  }\n\n  get renderMethod() {\n    return \"replace\"\n  }\n}\n\nclass FrameRenderer extends Renderer {\n  static renderElement(currentElement, newElement) {\n    const destinationRange = document.createRange();\n    destinationRange.selectNodeContents(currentElement);\n    destinationRange.deleteContents();\n\n    const frameElement = newElement;\n    const sourceRange = frameElement.ownerDocument?.createRange();\n    if (sourceRange) {\n      sourceRange.selectNodeContents(frameElement);\n      currentElement.appendChild(sourceRange.extractContents());\n    }\n  }\n\n  constructor(delegate, currentSnapshot, newSnapshot, renderElement, isPreview, willRender = true) {\n    super(currentSnapshot, newSnapshot, renderElement, isPreview, willRender);\n    this.delegate = delegate;\n  }\n\n  get shouldRender() {\n    return true\n  }\n\n  async render() {\n    await nextRepaint();\n    this.preservingPermanentElements(() => {\n      this.loadFrameElement();\n    });\n    this.scrollFrameIntoView();\n    await nextRepaint();\n    this.focusFirstAutofocusableElement();\n    await nextRepaint();\n    this.activateScriptElements();\n  }\n\n  loadFrameElement() {\n    this.delegate.willRenderFrame(this.currentElement, this.newElement);\n    this.renderElement(this.currentElement, this.newElement);\n  }\n\n  scrollFrameIntoView() {\n    if (this.currentElement.autoscroll || this.newElement.autoscroll) {\n      const element = this.currentElement.firstElementChild;\n      const block = readScrollLogicalPosition(this.currentElement.getAttribute(\"data-autoscroll-block\"), \"end\");\n      const behavior = readScrollBehavior(this.currentElement.getAttribute(\"data-autoscroll-behavior\"), \"auto\");\n\n      if (element) {\n        element.scrollIntoView({ block, behavior });\n        return true\n      }\n    }\n    return false\n  }\n\n  activateScriptElements() {\n    for (const inertScriptElement of this.newScriptElements) {\n      const activatedScriptElement = activateScriptElement(inertScriptElement);\n      inertScriptElement.replaceWith(activatedScriptElement);\n    }\n  }\n\n  get newScriptElements() {\n    return this.currentElement.querySelectorAll(\"script\")\n  }\n}\n\nfunction readScrollLogicalPosition(value, defaultValue) {\n  if (value == \"end\" || value == \"start\" || value == \"center\" || value == \"nearest\") {\n    return value\n  } else {\n    return defaultValue\n  }\n}\n\nfunction readScrollBehavior(value, defaultValue) {\n  if (value == \"auto\" || value == \"smooth\") {\n    return value\n  } else {\n    return defaultValue\n  }\n}\n\n/**\n * @typedef {object} ConfigHead\n *\n * @property {'merge' | 'append' | 'morph' | 'none'} [style]\n * @property {boolean} [block]\n * @property {boolean} [ignore]\n * @property {function(Element): boolean} [shouldPreserve]\n * @property {function(Element): boolean} [shouldReAppend]\n * @property {function(Element): boolean} [shouldRemove]\n * @property {function(Element, {added: Node[], kept: Element[], removed: Element[]}): void} [afterHeadMorphed]\n */\n\n/**\n * @typedef {object} ConfigCallbacks\n *\n * @property {function(Node): boolean} [beforeNodeAdded]\n * @property {function(Node): void} [afterNodeAdded]\n * @property {function(Element, Node): boolean} [beforeNodeMorphed]\n * @property {function(Element, Node): void} [afterNodeMorphed]\n * @property {function(Element): boolean} [beforeNodeRemoved]\n * @property {function(Element): void} [afterNodeRemoved]\n * @property {function(string, Element, \"update\" | \"remove\"): boolean} [beforeAttributeUpdated]\n */\n\n/**\n * @typedef {object} Config\n *\n * @property {'outerHTML' | 'innerHTML'} [morphStyle]\n * @property {boolean} [ignoreActive]\n * @property {boolean} [ignoreActiveValue]\n * @property {boolean} [restoreFocus]\n * @property {ConfigCallbacks} [callbacks]\n * @property {ConfigHead} [head]\n */\n\n/**\n * @typedef {function} NoOp\n *\n * @returns {void}\n */\n\n/**\n * @typedef {object} ConfigHeadInternal\n *\n * @property {'merge' | 'append' | 'morph' | 'none'} style\n * @property {boolean} [block]\n * @property {boolean} [ignore]\n * @property {(function(Element): boolean) | NoOp} shouldPreserve\n * @property {(function(Element): boolean) | NoOp} shouldReAppend\n * @property {(function(Element): boolean) | NoOp} shouldRemove\n * @property {(function(Element, {added: Node[], kept: Element[], removed: Element[]}): void) | NoOp} afterHeadMorphed\n */\n\n/**\n * @typedef {object} ConfigCallbacksInternal\n *\n * @property {(function(Node): boolean) | NoOp} beforeNodeAdded\n * @property {(function(Node): void) | NoOp} afterNodeAdded\n * @property {(function(Node, Node): boolean) | NoOp} beforeNodeMorphed\n * @property {(function(Node, Node): void) | NoOp} afterNodeMorphed\n * @property {(function(Node): boolean) | NoOp} beforeNodeRemoved\n * @property {(function(Node): void) | NoOp} afterNodeRemoved\n * @property {(function(string, Element, \"update\" | \"remove\"): boolean) | NoOp} beforeAttributeUpdated\n */\n\n/**\n * @typedef {object} ConfigInternal\n *\n * @property {'outerHTML' | 'innerHTML'} morphStyle\n * @property {boolean} [ignoreActive]\n * @property {boolean} [ignoreActiveValue]\n * @property {boolean} [restoreFocus]\n * @property {ConfigCallbacksInternal} callbacks\n * @property {ConfigHeadInternal} head\n */\n\n/**\n * @typedef {Object} IdSets\n * @property {Set<string>} persistentIds\n * @property {Map<Node, Set<string>>} idMap\n */\n\n/**\n * @typedef {Function} Morph\n *\n * @param {Element | Document} oldNode\n * @param {Element | Node | HTMLCollection | Node[] | string | null} newContent\n * @param {Config} [config]\n * @returns {undefined | Node[]}\n */\n\n// base IIFE to define idiomorph\n/**\n *\n * @type {{defaults: ConfigInternal, morph: Morph}}\n */\nvar Idiomorph = (function () {\n\n  /**\n   * @typedef {object} MorphContext\n   *\n   * @property {Element} target\n   * @property {Element} newContent\n   * @property {ConfigInternal} config\n   * @property {ConfigInternal['morphStyle']} morphStyle\n   * @property {ConfigInternal['ignoreActive']} ignoreActive\n   * @property {ConfigInternal['ignoreActiveValue']} ignoreActiveValue\n   * @property {ConfigInternal['restoreFocus']} restoreFocus\n   * @property {Map<Node, Set<string>>} idMap\n   * @property {Set<string>} persistentIds\n   * @property {ConfigInternal['callbacks']} callbacks\n   * @property {ConfigInternal['head']} head\n   * @property {HTMLDivElement} pantry\n   * @property {Element[]} activeElementAndParents\n   */\n\n  //=============================================================================\n  // AND NOW IT BEGINS...\n  //=============================================================================\n\n  const noOp = () => {};\n  /**\n   * Default configuration values, updatable by users now\n   * @type {ConfigInternal}\n   */\n  const defaults = {\n    morphStyle: \"outerHTML\",\n    callbacks: {\n      beforeNodeAdded: noOp,\n      afterNodeAdded: noOp,\n      beforeNodeMorphed: noOp,\n      afterNodeMorphed: noOp,\n      beforeNodeRemoved: noOp,\n      afterNodeRemoved: noOp,\n      beforeAttributeUpdated: noOp,\n    },\n    head: {\n      style: \"merge\",\n      shouldPreserve: (elt) => elt.getAttribute(\"im-preserve\") === \"true\",\n      shouldReAppend: (elt) => elt.getAttribute(\"im-re-append\") === \"true\",\n      shouldRemove: noOp,\n      afterHeadMorphed: noOp,\n    },\n    restoreFocus: true,\n  };\n\n  /**\n   * Core idiomorph function for morphing one DOM tree to another\n   *\n   * @param {Element | Document} oldNode\n   * @param {Element | Node | HTMLCollection | Node[] | string | null} newContent\n   * @param {Config} [config]\n   * @returns {Promise<Node[]> | Node[]}\n   */\n  function morph(oldNode, newContent, config = {}) {\n    oldNode = normalizeElement(oldNode);\n    const newNode = normalizeParent(newContent);\n    const ctx = createMorphContext(oldNode, newNode, config);\n\n    const morphedNodes = saveAndRestoreFocus(ctx, () => {\n      return withHeadBlocking(\n        ctx,\n        oldNode,\n        newNode,\n        /** @param {MorphContext} ctx */ (ctx) => {\n          if (ctx.morphStyle === \"innerHTML\") {\n            morphChildren(ctx, oldNode, newNode);\n            return Array.from(oldNode.childNodes);\n          } else {\n            return morphOuterHTML(ctx, oldNode, newNode);\n          }\n        },\n      );\n    });\n\n    ctx.pantry.remove();\n    return morphedNodes;\n  }\n\n  /**\n   * Morph just the outerHTML of the oldNode to the newContent\n   * We have to be careful because the oldNode could have siblings which need to be untouched\n   * @param {MorphContext} ctx\n   * @param {Element} oldNode\n   * @param {Element} newNode\n   * @returns {Node[]}\n   */\n  function morphOuterHTML(ctx, oldNode, newNode) {\n    const oldParent = normalizeParent(oldNode);\n    morphChildren(\n      ctx,\n      oldParent,\n      newNode,\n      // these two optional params are the secret sauce\n      oldNode, // start point for iteration\n      oldNode.nextSibling, // end point for iteration\n    );\n    // this is safe even with siblings, because normalizeParent returns a SlicedParentNode if needed.\n    return Array.from(oldParent.childNodes);\n  }\n\n  /**\n   * @param {MorphContext} ctx\n   * @param {Function} fn\n   * @returns {Promise<Node[]> | Node[]}\n   */\n  function saveAndRestoreFocus(ctx, fn) {\n    if (!ctx.config.restoreFocus) return fn();\n    let activeElement =\n      /** @type {HTMLInputElement|HTMLTextAreaElement|null} */ (\n        document.activeElement\n      );\n\n    // don't bother if the active element is not an input or textarea\n    if (\n      !(\n        activeElement instanceof HTMLInputElement ||\n        activeElement instanceof HTMLTextAreaElement\n      )\n    ) {\n      return fn();\n    }\n\n    const { id: activeElementId, selectionStart, selectionEnd } = activeElement;\n\n    const results = fn();\n\n    if (\n      activeElementId &&\n      activeElementId !== document.activeElement?.getAttribute(\"id\")\n    ) {\n      activeElement = ctx.target.querySelector(`[id=\"${activeElementId}\"]`);\n      activeElement?.focus();\n    }\n    if (activeElement && !activeElement.selectionEnd && selectionEnd) {\n      activeElement.setSelectionRange(selectionStart, selectionEnd);\n    }\n\n    return results;\n  }\n\n  const morphChildren = (function () {\n    /**\n     * This is the core algorithm for matching up children.  The idea is to use id sets to try to match up\n     * nodes as faithfully as possible.  We greedily match, which allows us to keep the algorithm fast, but\n     * by using id sets, we are able to better match up with content deeper in the DOM.\n     *\n     * Basic algorithm:\n     * - for each node in the new content:\n     *   - search self and siblings for an id set match, falling back to a soft match\n     *   - if match found\n     *     - remove any nodes up to the match:\n     *       - pantry persistent nodes\n     *       - delete the rest\n     *     - morph the match\n     *   - elsif no match found, and node is persistent\n     *     - find its match by querying the old root (future) and pantry (past)\n     *     - move it and its children here\n     *     - morph it\n     *   - else\n     *     - create a new node from scratch as a last result\n     *\n     * @param {MorphContext} ctx the merge context\n     * @param {Element} oldParent the old content that we are merging the new content into\n     * @param {Element} newParent the parent element of the new content\n     * @param {Node|null} [insertionPoint] the point in the DOM we start morphing at (defaults to first child)\n     * @param {Node|null} [endPoint] the point in the DOM we stop morphing at (defaults to after last child)\n     */\n    function morphChildren(\n      ctx,\n      oldParent,\n      newParent,\n      insertionPoint = null,\n      endPoint = null,\n    ) {\n      // normalize\n      if (\n        oldParent instanceof HTMLTemplateElement &&\n        newParent instanceof HTMLTemplateElement\n      ) {\n        // @ts-ignore we can pretend the DocumentFragment is an Element\n        oldParent = oldParent.content;\n        // @ts-ignore ditto\n        newParent = newParent.content;\n      }\n      insertionPoint ||= oldParent.firstChild;\n\n      // run through all the new content\n      for (const newChild of newParent.childNodes) {\n        // once we reach the end of the old parent content skip to the end and insert the rest\n        if (insertionPoint && insertionPoint != endPoint) {\n          const bestMatch = findBestMatch(\n            ctx,\n            newChild,\n            insertionPoint,\n            endPoint,\n          );\n          if (bestMatch) {\n            // if the node to morph is not at the insertion point then remove/move up to it\n            if (bestMatch !== insertionPoint) {\n              removeNodesBetween(ctx, insertionPoint, bestMatch);\n            }\n            morphNode(bestMatch, newChild, ctx);\n            insertionPoint = bestMatch.nextSibling;\n            continue;\n          }\n        }\n\n        // if the matching node is elsewhere in the original content\n        if (newChild instanceof Element) {\n          // we can pretend the id is non-null because the next `.has` line will reject it if not\n          const newChildId = /** @type {String} */ (\n            newChild.getAttribute(\"id\")\n          );\n          if (ctx.persistentIds.has(newChildId)) {\n            // move it and all its children here and morph\n            const movedChild = moveBeforeById(\n              oldParent,\n              newChildId,\n              insertionPoint,\n              ctx,\n            );\n            morphNode(movedChild, newChild, ctx);\n            insertionPoint = movedChild.nextSibling;\n            continue;\n          }\n        }\n\n        // last resort: insert the new node from scratch\n        const insertedNode = createNode(\n          oldParent,\n          newChild,\n          insertionPoint,\n          ctx,\n        );\n        // could be null if beforeNodeAdded prevented insertion\n        if (insertedNode) {\n          insertionPoint = insertedNode.nextSibling;\n        }\n      }\n\n      // remove any remaining old nodes that didn't match up with new content\n      while (insertionPoint && insertionPoint != endPoint) {\n        const tempNode = insertionPoint;\n        insertionPoint = insertionPoint.nextSibling;\n        removeNode(ctx, tempNode);\n      }\n    }\n\n    /**\n     * This performs the action of inserting a new node while handling situations where the node contains\n     * elements with persistent ids and possible state info we can still preserve by moving in and then morphing\n     *\n     * @param {Element} oldParent\n     * @param {Node} newChild\n     * @param {Node|null} insertionPoint\n     * @param {MorphContext} ctx\n     * @returns {Node|null}\n     */\n    function createNode(oldParent, newChild, insertionPoint, ctx) {\n      if (ctx.callbacks.beforeNodeAdded(newChild) === false) return null;\n      if (ctx.idMap.has(newChild)) {\n        // node has children with ids with possible state so create a dummy elt of same type and apply full morph algorithm\n        const newEmptyChild = document.createElement(\n          /** @type {Element} */ (newChild).tagName,\n        );\n        oldParent.insertBefore(newEmptyChild, insertionPoint);\n        morphNode(newEmptyChild, newChild, ctx);\n        ctx.callbacks.afterNodeAdded(newEmptyChild);\n        return newEmptyChild;\n      } else {\n        // optimisation: no id state to preserve so we can just insert a clone of the newChild and its descendants\n        const newClonedChild = document.importNode(newChild, true); // importNode to not mutate newParent\n        oldParent.insertBefore(newClonedChild, insertionPoint);\n        ctx.callbacks.afterNodeAdded(newClonedChild);\n        return newClonedChild;\n      }\n    }\n\n    //=============================================================================\n    // Matching Functions\n    //=============================================================================\n    const findBestMatch = (function () {\n      /**\n       * Scans forward from the startPoint to the endPoint looking for a match\n       * for the node. It looks for an id set match first, then a soft match.\n       * We abort softmatching if we find two future soft matches, to reduce churn.\n       * @param {Node} node\n       * @param {MorphContext} ctx\n       * @param {Node | null} startPoint\n       * @param {Node | null} endPoint\n       * @returns {Node | null}\n       */\n      function findBestMatch(ctx, node, startPoint, endPoint) {\n        let softMatch = null;\n        let nextSibling = node.nextSibling;\n        let siblingSoftMatchCount = 0;\n\n        let cursor = startPoint;\n        while (cursor && cursor != endPoint) {\n          // soft matching is a prerequisite for id set matching\n          if (isSoftMatch(cursor, node)) {\n            if (isIdSetMatch(ctx, cursor, node)) {\n              return cursor; // found an id set match, we're done!\n            }\n\n            // we haven't yet saved a soft match fallback\n            if (softMatch === null) {\n              // the current soft match will hard match something else in the future, leave it\n              if (!ctx.idMap.has(cursor)) {\n                // save this as the fallback if we get through the loop without finding a hard match\n                softMatch = cursor;\n              }\n            }\n          }\n          if (\n            softMatch === null &&\n            nextSibling &&\n            isSoftMatch(cursor, nextSibling)\n          ) {\n            // The next new node has a soft match with this node, so\n            // increment the count of future soft matches\n            siblingSoftMatchCount++;\n            nextSibling = nextSibling.nextSibling;\n\n            // If there are two future soft matches, block soft matching for this node to allow\n            // future siblings to soft match. This is to reduce churn in the DOM when an element\n            // is prepended.\n            if (siblingSoftMatchCount >= 2) {\n              softMatch = undefined;\n            }\n          }\n\n          // if the current node contains active element, stop looking for better future matches,\n          // because if one is found, this node will be moved to the pantry, reparenting it and thus losing focus\n          // @ts-ignore pretend cursor is Element rather than Node, we're just testing for array inclusion\n          if (ctx.activeElementAndParents.includes(cursor)) break;\n\n          cursor = cursor.nextSibling;\n        }\n\n        return softMatch || null;\n      }\n\n      /**\n       *\n       * @param {MorphContext} ctx\n       * @param {Node} oldNode\n       * @param {Node} newNode\n       * @returns {boolean}\n       */\n      function isIdSetMatch(ctx, oldNode, newNode) {\n        let oldSet = ctx.idMap.get(oldNode);\n        let newSet = ctx.idMap.get(newNode);\n\n        if (!newSet || !oldSet) return false;\n\n        for (const id of oldSet) {\n          // a potential match is an id in the new and old nodes that\n          // has not already been merged into the DOM\n          // But the newNode content we call this on has not been\n          // merged yet and we don't allow duplicate IDs so it is simple\n          if (newSet.has(id)) {\n            return true;\n          }\n        }\n        return false;\n      }\n\n      /**\n       *\n       * @param {Node} oldNode\n       * @param {Node} newNode\n       * @returns {boolean}\n       */\n      function isSoftMatch(oldNode, newNode) {\n        // ok to cast: if one is not element, `id` and `tagName` will be undefined and we'll just compare that.\n        const oldElt = /** @type {Element} */ (oldNode);\n        const newElt = /** @type {Element} */ (newNode);\n\n        return (\n          oldElt.nodeType === newElt.nodeType &&\n          oldElt.tagName === newElt.tagName &&\n          // If oldElt has an `id` with possible state and it doesn't match newElt.id then avoid morphing.\n          // We'll still match an anonymous node with an IDed newElt, though, because if it got this far,\n          // its not persistent, and new nodes can't have any hidden state.\n          // We can't use .id because of form input shadowing, and we can't count on .getAttribute's presence because it could be a document-fragment\n          (!oldElt.getAttribute?.(\"id\") ||\n            oldElt.getAttribute?.(\"id\") === newElt.getAttribute?.(\"id\"))\n        );\n      }\n\n      return findBestMatch;\n    })();\n\n    //=============================================================================\n    // DOM Manipulation Functions\n    //=============================================================================\n\n    /**\n     * Gets rid of an unwanted DOM node; strategy depends on nature of its reuse:\n     * - Persistent nodes will be moved to the pantry for later reuse\n     * - Other nodes will have their hooks called, and then are removed\n     * @param {MorphContext} ctx\n     * @param {Node} node\n     */\n    function removeNode(ctx, node) {\n      // are we going to id set match this later?\n      if (ctx.idMap.has(node)) {\n        // skip callbacks and move to pantry\n        moveBefore(ctx.pantry, node, null);\n      } else {\n        // remove for realsies\n        if (ctx.callbacks.beforeNodeRemoved(node) === false) return;\n        node.parentNode?.removeChild(node);\n        ctx.callbacks.afterNodeRemoved(node);\n      }\n    }\n\n    /**\n     * Remove nodes between the start and end nodes\n     * @param {MorphContext} ctx\n     * @param {Node} startInclusive\n     * @param {Node} endExclusive\n     * @returns {Node|null}\n     */\n    function removeNodesBetween(ctx, startInclusive, endExclusive) {\n      /** @type {Node | null} */\n      let cursor = startInclusive;\n      // remove nodes until the endExclusive node\n      while (cursor && cursor !== endExclusive) {\n        let tempNode = /** @type {Node} */ (cursor);\n        cursor = cursor.nextSibling;\n        removeNode(ctx, tempNode);\n      }\n      return cursor;\n    }\n\n    /**\n     * Search for an element by id within the document and pantry, and move it using moveBefore.\n     *\n     * @param {Element} parentNode - The parent node to which the element will be moved.\n     * @param {string} id - The ID of the element to be moved.\n     * @param {Node | null} after - The reference node to insert the element before.\n     *                              If `null`, the element is appended as the last child.\n     * @param {MorphContext} ctx\n     * @returns {Element} The found element\n     */\n    function moveBeforeById(parentNode, id, after, ctx) {\n      const target =\n        /** @type {Element} - will always be found */\n        (\n          // ctx.target.id unsafe because of form input shadowing\n          // ctx.target could be a document fragment which doesn't have `getAttribute`\n          (ctx.target.getAttribute?.(\"id\") === id && ctx.target) ||\n            ctx.target.querySelector(`[id=\"${id}\"]`) ||\n            ctx.pantry.querySelector(`[id=\"${id}\"]`)\n        );\n      removeElementFromAncestorsIdMaps(target, ctx);\n      moveBefore(parentNode, target, after);\n      return target;\n    }\n\n    /**\n     * Removes an element from its ancestors' id maps. This is needed when an element is moved from the\n     * \"future\" via `moveBeforeId`. Otherwise, its erstwhile ancestors could be mistakenly moved to the\n     * pantry rather than being deleted, preventing their removal hooks from being called.\n     *\n     * @param {Element} element - element to remove from its ancestors' id maps\n     * @param {MorphContext} ctx\n     */\n    function removeElementFromAncestorsIdMaps(element, ctx) {\n      // we know id is non-null String, because this function is only called on elements with ids\n      const id = /** @type {String} */ (element.getAttribute(\"id\"));\n      /** @ts-ignore - safe to loop in this way **/\n      while ((element = element.parentNode)) {\n        let idSet = ctx.idMap.get(element);\n        if (idSet) {\n          idSet.delete(id);\n          if (!idSet.size) {\n            ctx.idMap.delete(element);\n          }\n        }\n      }\n    }\n\n    /**\n     * Moves an element before another element within the same parent.\n     * Uses the proposed `moveBefore` API if available (and working), otherwise falls back to `insertBefore`.\n     * This is essentialy a forward-compat wrapper.\n     *\n     * @param {Element} parentNode - The parent node containing the after element.\n     * @param {Node} element - The element to be moved.\n     * @param {Node | null} after - The reference node to insert `element` before.\n     *                              If `null`, `element` is appended as the last child.\n     */\n    function moveBefore(parentNode, element, after) {\n      // @ts-ignore - use proposed moveBefore feature\n      if (parentNode.moveBefore) {\n        try {\n          // @ts-ignore - use proposed moveBefore feature\n          parentNode.moveBefore(element, after);\n        } catch (e) {\n          // fall back to insertBefore as some browsers may fail on moveBefore when trying to move Dom disconnected nodes to pantry\n          parentNode.insertBefore(element, after);\n        }\n      } else {\n        parentNode.insertBefore(element, after);\n      }\n    }\n\n    return morphChildren;\n  })();\n\n  //=============================================================================\n  // Single Node Morphing Code\n  //=============================================================================\n  const morphNode = (function () {\n    /**\n     * @param {Node} oldNode root node to merge content into\n     * @param {Node} newContent new content to merge\n     * @param {MorphContext} ctx the merge context\n     * @returns {Node | null} the element that ended up in the DOM\n     */\n    function morphNode(oldNode, newContent, ctx) {\n      if (ctx.ignoreActive && oldNode === document.activeElement) {\n        // don't morph focused element\n        return null;\n      }\n\n      if (ctx.callbacks.beforeNodeMorphed(oldNode, newContent) === false) {\n        return oldNode;\n      }\n\n      if (oldNode instanceof HTMLHeadElement && ctx.head.ignore) ; else if (\n        oldNode instanceof HTMLHeadElement &&\n        ctx.head.style !== \"morph\"\n      ) {\n        // ok to cast: if newContent wasn't also a <head>, it would've got caught in the `!isSoftMatch` branch above\n        handleHeadElement(\n          oldNode,\n          /** @type {HTMLHeadElement} */ (newContent),\n          ctx,\n        );\n      } else {\n        morphAttributes(oldNode, newContent, ctx);\n        if (!ignoreValueOfActiveElement(oldNode, ctx)) {\n          // @ts-ignore newContent can be a node here because .firstChild will be null\n          morphChildren(ctx, oldNode, newContent);\n        }\n      }\n      ctx.callbacks.afterNodeMorphed(oldNode, newContent);\n      return oldNode;\n    }\n\n    /**\n     * syncs the oldNode to the newNode, copying over all attributes and\n     * inner element state from the newNode to the oldNode\n     *\n     * @param {Node} oldNode the node to copy attributes & state to\n     * @param {Node} newNode the node to copy attributes & state from\n     * @param {MorphContext} ctx the merge context\n     */\n    function morphAttributes(oldNode, newNode, ctx) {\n      let type = newNode.nodeType;\n\n      // if is an element type, sync the attributes from the\n      // new node into the new node\n      if (type === 1 /* element type */) {\n        const oldElt = /** @type {Element} */ (oldNode);\n        const newElt = /** @type {Element} */ (newNode);\n\n        const oldAttributes = oldElt.attributes;\n        const newAttributes = newElt.attributes;\n        for (const newAttribute of newAttributes) {\n          if (ignoreAttribute(newAttribute.name, oldElt, \"update\", ctx)) {\n            continue;\n          }\n          if (oldElt.getAttribute(newAttribute.name) !== newAttribute.value) {\n            oldElt.setAttribute(newAttribute.name, newAttribute.value);\n          }\n        }\n        // iterate backwards to avoid skipping over items when a delete occurs\n        for (let i = oldAttributes.length - 1; 0 <= i; i--) {\n          const oldAttribute = oldAttributes[i];\n\n          // toAttributes is a live NamedNodeMap, so iteration+mutation is unsafe\n          // e.g. custom element attribute callbacks can remove other attributes\n          if (!oldAttribute) continue;\n\n          if (!newElt.hasAttribute(oldAttribute.name)) {\n            if (ignoreAttribute(oldAttribute.name, oldElt, \"remove\", ctx)) {\n              continue;\n            }\n            oldElt.removeAttribute(oldAttribute.name);\n          }\n        }\n\n        if (!ignoreValueOfActiveElement(oldElt, ctx)) {\n          syncInputValue(oldElt, newElt, ctx);\n        }\n      }\n\n      // sync text nodes\n      if (type === 8 /* comment */ || type === 3 /* text */) {\n        if (oldNode.nodeValue !== newNode.nodeValue) {\n          oldNode.nodeValue = newNode.nodeValue;\n        }\n      }\n    }\n\n    /**\n     * NB: many bothans died to bring us information:\n     *\n     *  https://github.com/patrick-steele-idem/morphdom/blob/master/src/specialElHandlers.js\n     *  https://github.com/choojs/nanomorph/blob/master/lib/morph.jsL113\n     *\n     * @param {Element} oldElement the element to sync the input value to\n     * @param {Element} newElement the element to sync the input value from\n     * @param {MorphContext} ctx the merge context\n     */\n    function syncInputValue(oldElement, newElement, ctx) {\n      if (\n        oldElement instanceof HTMLInputElement &&\n        newElement instanceof HTMLInputElement &&\n        newElement.type !== \"file\"\n      ) {\n        let newValue = newElement.value;\n        let oldValue = oldElement.value;\n\n        // sync boolean attributes\n        syncBooleanAttribute(oldElement, newElement, \"checked\", ctx);\n        syncBooleanAttribute(oldElement, newElement, \"disabled\", ctx);\n\n        if (!newElement.hasAttribute(\"value\")) {\n          if (!ignoreAttribute(\"value\", oldElement, \"remove\", ctx)) {\n            oldElement.value = \"\";\n            oldElement.removeAttribute(\"value\");\n          }\n        } else if (oldValue !== newValue) {\n          if (!ignoreAttribute(\"value\", oldElement, \"update\", ctx)) {\n            oldElement.setAttribute(\"value\", newValue);\n            oldElement.value = newValue;\n          }\n        }\n        // TODO: QUESTION(1cg): this used to only check `newElement` unlike the other branches -- why?\n        // did I break something?\n      } else if (\n        oldElement instanceof HTMLOptionElement &&\n        newElement instanceof HTMLOptionElement\n      ) {\n        syncBooleanAttribute(oldElement, newElement, \"selected\", ctx);\n      } else if (\n        oldElement instanceof HTMLTextAreaElement &&\n        newElement instanceof HTMLTextAreaElement\n      ) {\n        let newValue = newElement.value;\n        let oldValue = oldElement.value;\n        if (ignoreAttribute(\"value\", oldElement, \"update\", ctx)) {\n          return;\n        }\n        if (newValue !== oldValue) {\n          oldElement.value = newValue;\n        }\n        if (\n          oldElement.firstChild &&\n          oldElement.firstChild.nodeValue !== newValue\n        ) {\n          oldElement.firstChild.nodeValue = newValue;\n        }\n      }\n    }\n\n    /**\n     * @param {Element} oldElement element to write the value to\n     * @param {Element} newElement element to read the value from\n     * @param {string} attributeName the attribute name\n     * @param {MorphContext} ctx the merge context\n     */\n    function syncBooleanAttribute(oldElement, newElement, attributeName, ctx) {\n      // @ts-ignore this function is only used on boolean attrs that are reflected as dom properties\n      const newLiveValue = newElement[attributeName],\n        // @ts-ignore ditto\n        oldLiveValue = oldElement[attributeName];\n      if (newLiveValue !== oldLiveValue) {\n        const ignoreUpdate = ignoreAttribute(\n          attributeName,\n          oldElement,\n          \"update\",\n          ctx,\n        );\n        if (!ignoreUpdate) {\n          // update attribute's associated DOM property\n          // @ts-ignore this function is only used on boolean attrs that are reflected as dom properties\n          oldElement[attributeName] = newElement[attributeName];\n        }\n        if (newLiveValue) {\n          if (!ignoreUpdate) {\n            // https://developer.mozilla.org/en-US/docs/Glossary/Boolean/HTML\n            // this is the correct way to set a boolean attribute to \"true\"\n            oldElement.setAttribute(attributeName, \"\");\n          }\n        } else {\n          if (!ignoreAttribute(attributeName, oldElement, \"remove\", ctx)) {\n            oldElement.removeAttribute(attributeName);\n          }\n        }\n      }\n    }\n\n    /**\n     * @param {string} attr the attribute to be mutated\n     * @param {Element} element the element that is going to be updated\n     * @param {\"update\" | \"remove\"} updateType\n     * @param {MorphContext} ctx the merge context\n     * @returns {boolean} true if the attribute should be ignored, false otherwise\n     */\n    function ignoreAttribute(attr, element, updateType, ctx) {\n      if (\n        attr === \"value\" &&\n        ctx.ignoreActiveValue &&\n        element === document.activeElement\n      ) {\n        return true;\n      }\n      return (\n        ctx.callbacks.beforeAttributeUpdated(attr, element, updateType) ===\n        false\n      );\n    }\n\n    /**\n     * @param {Node} possibleActiveElement\n     * @param {MorphContext} ctx\n     * @returns {boolean}\n     */\n    function ignoreValueOfActiveElement(possibleActiveElement, ctx) {\n      return (\n        !!ctx.ignoreActiveValue &&\n        possibleActiveElement === document.activeElement &&\n        possibleActiveElement !== document.body\n      );\n    }\n\n    return morphNode;\n  })();\n\n  //=============================================================================\n  // Head Management Functions\n  //=============================================================================\n  /**\n   * @param {MorphContext} ctx\n   * @param {Element} oldNode\n   * @param {Element} newNode\n   * @param {function} callback\n   * @returns {Node[] | Promise<Node[]>}\n   */\n  function withHeadBlocking(ctx, oldNode, newNode, callback) {\n    if (ctx.head.block) {\n      const oldHead = oldNode.querySelector(\"head\");\n      const newHead = newNode.querySelector(\"head\");\n      if (oldHead && newHead) {\n        const promises = handleHeadElement(oldHead, newHead, ctx);\n        // when head promises resolve, proceed ignoring the head tag\n        return Promise.all(promises).then(() => {\n          const newCtx = Object.assign(ctx, {\n            head: {\n              block: false,\n              ignore: true,\n            },\n          });\n          return callback(newCtx);\n        });\n      }\n    }\n    // just proceed if we not head blocking\n    return callback(ctx);\n  }\n\n  /**\n   *  The HEAD tag can be handled specially, either w/ a 'merge' or 'append' style\n   *\n   * @param {Element} oldHead\n   * @param {Element} newHead\n   * @param {MorphContext} ctx\n   * @returns {Promise<void>[]}\n   */\n  function handleHeadElement(oldHead, newHead, ctx) {\n    let added = [];\n    let removed = [];\n    let preserved = [];\n    let nodesToAppend = [];\n\n    // put all new head elements into a Map, by their outerHTML\n    let srcToNewHeadNodes = new Map();\n    for (const newHeadChild of newHead.children) {\n      srcToNewHeadNodes.set(newHeadChild.outerHTML, newHeadChild);\n    }\n\n    // for each elt in the current head\n    for (const currentHeadElt of oldHead.children) {\n      // If the current head element is in the map\n      let inNewContent = srcToNewHeadNodes.has(currentHeadElt.outerHTML);\n      let isReAppended = ctx.head.shouldReAppend(currentHeadElt);\n      let isPreserved = ctx.head.shouldPreserve(currentHeadElt);\n      if (inNewContent || isPreserved) {\n        if (isReAppended) {\n          // remove the current version and let the new version replace it and re-execute\n          removed.push(currentHeadElt);\n        } else {\n          // this element already exists and should not be re-appended, so remove it from\n          // the new content map, preserving it in the DOM\n          srcToNewHeadNodes.delete(currentHeadElt.outerHTML);\n          preserved.push(currentHeadElt);\n        }\n      } else {\n        if (ctx.head.style === \"append\") {\n          // we are appending and this existing element is not new content\n          // so if and only if it is marked for re-append do we do anything\n          if (isReAppended) {\n            removed.push(currentHeadElt);\n            nodesToAppend.push(currentHeadElt);\n          }\n        } else {\n          // if this is a merge, we remove this content since it is not in the new head\n          if (ctx.head.shouldRemove(currentHeadElt) !== false) {\n            removed.push(currentHeadElt);\n          }\n        }\n      }\n    }\n\n    // Push the remaining new head elements in the Map into the\n    // nodes to append to the head tag\n    nodesToAppend.push(...srcToNewHeadNodes.values());\n\n    let promises = [];\n    for (const newNode of nodesToAppend) {\n      // TODO: This could theoretically be null, based on type\n      let newElt = /** @type {ChildNode} */ (\n        document.createRange().createContextualFragment(newNode.outerHTML)\n          .firstChild\n      );\n      if (ctx.callbacks.beforeNodeAdded(newElt) !== false) {\n        if (\n          (\"href\" in newElt && newElt.href) ||\n          (\"src\" in newElt && newElt.src)\n        ) {\n          /** @type {(result?: any) => void} */ let resolve;\n          let promise = new Promise(function (_resolve) {\n            resolve = _resolve;\n          });\n          newElt.addEventListener(\"load\", function () {\n            resolve();\n          });\n          promises.push(promise);\n        }\n        oldHead.appendChild(newElt);\n        ctx.callbacks.afterNodeAdded(newElt);\n        added.push(newElt);\n      }\n    }\n\n    // remove all removed elements, after we have appended the new elements to avoid\n    // additional network requests for things like style sheets\n    for (const removedElement of removed) {\n      if (ctx.callbacks.beforeNodeRemoved(removedElement) !== false) {\n        oldHead.removeChild(removedElement);\n        ctx.callbacks.afterNodeRemoved(removedElement);\n      }\n    }\n\n    ctx.head.afterHeadMorphed(oldHead, {\n      added: added,\n      kept: preserved,\n      removed: removed,\n    });\n    return promises;\n  }\n\n  //=============================================================================\n  // Create Morph Context Functions\n  //=============================================================================\n  const createMorphContext = (function () {\n    /**\n     *\n     * @param {Element} oldNode\n     * @param {Element} newContent\n     * @param {Config} config\n     * @returns {MorphContext}\n     */\n    function createMorphContext(oldNode, newContent, config) {\n      const { persistentIds, idMap } = createIdMaps(oldNode, newContent);\n\n      const mergedConfig = mergeDefaults(config);\n      const morphStyle = mergedConfig.morphStyle || \"outerHTML\";\n      if (![\"innerHTML\", \"outerHTML\"].includes(morphStyle)) {\n        throw `Do not understand how to morph style ${morphStyle}`;\n      }\n\n      return {\n        target: oldNode,\n        newContent: newContent,\n        config: mergedConfig,\n        morphStyle: morphStyle,\n        ignoreActive: mergedConfig.ignoreActive,\n        ignoreActiveValue: mergedConfig.ignoreActiveValue,\n        restoreFocus: mergedConfig.restoreFocus,\n        idMap: idMap,\n        persistentIds: persistentIds,\n        pantry: createPantry(),\n        activeElementAndParents: createActiveElementAndParents(oldNode),\n        callbacks: mergedConfig.callbacks,\n        head: mergedConfig.head,\n      };\n    }\n\n    /**\n     * Deep merges the config object and the Idiomorph.defaults object to\n     * produce a final configuration object\n     * @param {Config} config\n     * @returns {ConfigInternal}\n     */\n    function mergeDefaults(config) {\n      let finalConfig = Object.assign({}, defaults);\n\n      // copy top level stuff into final config\n      Object.assign(finalConfig, config);\n\n      // copy callbacks into final config (do this to deep merge the callbacks)\n      finalConfig.callbacks = Object.assign(\n        {},\n        defaults.callbacks,\n        config.callbacks,\n      );\n\n      // copy head config into final config  (do this to deep merge the head)\n      finalConfig.head = Object.assign({}, defaults.head, config.head);\n\n      return finalConfig;\n    }\n\n    /**\n     * @returns {HTMLDivElement}\n     */\n    function createPantry() {\n      const pantry = document.createElement(\"div\");\n      pantry.hidden = true;\n      document.body.insertAdjacentElement(\"afterend\", pantry);\n      return pantry;\n    }\n\n    /**\n     * @param {Element} oldNode\n     * @returns {Element[]}\n     */\n    function createActiveElementAndParents(oldNode) {\n      /** @type {Element[]} */\n      let activeElementAndParents = [];\n      let elt = document.activeElement;\n      if (elt?.tagName !== \"BODY\" && oldNode.contains(elt)) {\n        while (elt) {\n          activeElementAndParents.push(elt);\n          if (elt === oldNode) break;\n          elt = elt.parentElement;\n        }\n      }\n      return activeElementAndParents;\n    }\n\n    /**\n     * Returns all elements with an ID contained within the root element and its descendants\n     *\n     * @param {Element} root\n     * @returns {Element[]}\n     */\n    function findIdElements(root) {\n      let elements = Array.from(root.querySelectorAll(\"[id]\"));\n      // root could be a document fragment which doesn't have `getAttribute`\n      if (root.getAttribute?.(\"id\")) {\n        elements.push(root);\n      }\n      return elements;\n    }\n\n    /**\n     * A bottom-up algorithm that populates a map of Element -> IdSet.\n     * The idSet for a given element is the set of all IDs contained within its subtree.\n     * As an optimzation, we filter these IDs through the given list of persistent IDs,\n     * because we don't need to bother considering IDed elements that won't be in the new content.\n     *\n     * @param {Map<Node, Set<string>>} idMap\n     * @param {Set<string>} persistentIds\n     * @param {Element} root\n     * @param {Element[]} elements\n     */\n    function populateIdMapWithTree(idMap, persistentIds, root, elements) {\n      for (const elt of elements) {\n        // we can pretend id is non-null String, because the .has line will reject it immediately if not\n        const id = /** @type {String} */ (elt.getAttribute(\"id\"));\n        if (persistentIds.has(id)) {\n          /** @type {Element|null} */\n          let current = elt;\n          // walk up the parent hierarchy of that element, adding the id\n          // of element to the parent's id set\n          while (current) {\n            let idSet = idMap.get(current);\n            // if the id set doesn't exist, create it and insert it in the map\n            if (idSet == null) {\n              idSet = new Set();\n              idMap.set(current, idSet);\n            }\n            idSet.add(id);\n\n            if (current === root) break;\n            current = current.parentElement;\n          }\n        }\n      }\n    }\n\n    /**\n     * This function computes a map of nodes to all ids contained within that node (inclusive of the\n     * node).  This map can be used to ask if two nodes have intersecting sets of ids, which allows\n     * for a looser definition of \"matching\" than tradition id matching, and allows child nodes\n     * to contribute to a parent nodes matching.\n     *\n     * @param {Element} oldContent  the old content that will be morphed\n     * @param {Element} newContent  the new content to morph to\n     * @returns {IdSets}\n     */\n    function createIdMaps(oldContent, newContent) {\n      const oldIdElements = findIdElements(oldContent);\n      const newIdElements = findIdElements(newContent);\n\n      const persistentIds = createPersistentIds(oldIdElements, newIdElements);\n\n      /** @type {Map<Node, Set<string>>} */\n      let idMap = new Map();\n      populateIdMapWithTree(idMap, persistentIds, oldContent, oldIdElements);\n\n      /** @ts-ignore - if newContent is a duck-typed parent, pass its single child node as the root to halt upwards iteration */\n      const newRoot = newContent.__idiomorphRoot || newContent;\n      populateIdMapWithTree(idMap, persistentIds, newRoot, newIdElements);\n\n      return { persistentIds, idMap };\n    }\n\n    /**\n     * This function computes the set of ids that persist between the two contents excluding duplicates\n     *\n     * @param {Element[]} oldIdElements\n     * @param {Element[]} newIdElements\n     * @returns {Set<string>}\n     */\n    function createPersistentIds(oldIdElements, newIdElements) {\n      let duplicateIds = new Set();\n\n      /** @type {Map<string, string>} */\n      let oldIdTagNameMap = new Map();\n      for (const { id, tagName } of oldIdElements) {\n        if (oldIdTagNameMap.has(id)) {\n          duplicateIds.add(id);\n        } else {\n          oldIdTagNameMap.set(id, tagName);\n        }\n      }\n\n      let persistentIds = new Set();\n      for (const { id, tagName } of newIdElements) {\n        if (persistentIds.has(id)) {\n          duplicateIds.add(id);\n        } else if (oldIdTagNameMap.get(id) === tagName) {\n          persistentIds.add(id);\n        }\n        // skip if tag types mismatch because its not possible to morph one tag into another\n      }\n\n      for (const id of duplicateIds) {\n        persistentIds.delete(id);\n      }\n      return persistentIds;\n    }\n\n    return createMorphContext;\n  })();\n\n  //=============================================================================\n  // HTML Normalization Functions\n  //=============================================================================\n  const { normalizeElement, normalizeParent } = (function () {\n    /** @type {WeakSet<Node>} */\n    const generatedByIdiomorph = new WeakSet();\n\n    /**\n     *\n     * @param {Element | Document} content\n     * @returns {Element}\n     */\n    function normalizeElement(content) {\n      if (content instanceof Document) {\n        return content.documentElement;\n      } else {\n        return content;\n      }\n    }\n\n    /**\n     *\n     * @param {null | string | Node | HTMLCollection | Node[] | Document & {generatedByIdiomorph:boolean}} newContent\n     * @returns {Element}\n     */\n    function normalizeParent(newContent) {\n      if (newContent == null) {\n        return document.createElement(\"div\"); // dummy parent element\n      } else if (typeof newContent === \"string\") {\n        return normalizeParent(parseContent(newContent));\n      } else if (\n        generatedByIdiomorph.has(/** @type {Element} */ (newContent))\n      ) {\n        // the template tag created by idiomorph parsing can serve as a dummy parent\n        return /** @type {Element} */ (newContent);\n      } else if (newContent instanceof Node) {\n        if (newContent.parentNode) {\n          // we can't use the parent directly because newContent may have siblings\n          // that we don't want in the morph, and reparenting might be expensive (TODO is it?),\n          // so instead we create a fake parent node that only sees a slice of its children.\n          /** @type {Element} */\n          return /** @type {any} */ (new SlicedParentNode(newContent));\n        } else {\n          // a single node is added as a child to a dummy parent\n          const dummyParent = document.createElement(\"div\");\n          dummyParent.append(newContent);\n          return dummyParent;\n        }\n      } else {\n        // all nodes in the array or HTMLElement collection are consolidated under\n        // a single dummy parent element\n        const dummyParent = document.createElement(\"div\");\n        for (const elt of [...newContent]) {\n          dummyParent.append(elt);\n        }\n        return dummyParent;\n      }\n    }\n\n    /**\n     * A fake duck-typed parent element to wrap a single node, without actually reparenting it.\n     * This is useful because the node may have siblings that we don't want in the morph, and it may also be moved\n     * or replaced with one or more elements during the morph. This class effectively allows us a window into\n     * a slice of a node's children.\n     * \"If it walks like a duck, and quacks like a duck, then it must be a duck!\" -- James Whitcomb Riley (1849\u20131916)\n     */\n    class SlicedParentNode {\n      /** @param {Node} node */\n      constructor(node) {\n        this.originalNode = node;\n        this.realParentNode = /** @type {Element} */ (node.parentNode);\n        this.previousSibling = node.previousSibling;\n        this.nextSibling = node.nextSibling;\n      }\n\n      /** @returns {Node[]} */\n      get childNodes() {\n        // return slice of realParent's current childNodes, based on previousSibling and nextSibling\n        const nodes = [];\n        let cursor = this.previousSibling\n          ? this.previousSibling.nextSibling\n          : this.realParentNode.firstChild;\n        while (cursor && cursor != this.nextSibling) {\n          nodes.push(cursor);\n          cursor = cursor.nextSibling;\n        }\n        return nodes;\n      }\n\n      /**\n       * @param {string} selector\n       * @returns {Element[]}\n       */\n      querySelectorAll(selector) {\n        return this.childNodes.reduce((results, node) => {\n          if (node instanceof Element) {\n            if (node.matches(selector)) results.push(node);\n            const nodeList = node.querySelectorAll(selector);\n            for (let i = 0; i < nodeList.length; i++) {\n              results.push(nodeList[i]);\n            }\n          }\n          return results;\n        }, /** @type {Element[]} */ ([]));\n      }\n\n      /**\n       * @param {Node} node\n       * @param {Node} referenceNode\n       * @returns {Node}\n       */\n      insertBefore(node, referenceNode) {\n        return this.realParentNode.insertBefore(node, referenceNode);\n      }\n\n      /**\n       * @param {Node} node\n       * @param {Node} referenceNode\n       * @returns {Node}\n       */\n      moveBefore(node, referenceNode) {\n        // @ts-ignore - use new moveBefore feature\n        return this.realParentNode.moveBefore(node, referenceNode);\n      }\n\n      /**\n       * for later use with populateIdMapWithTree to halt upwards iteration\n       * @returns {Node}\n       */\n      get __idiomorphRoot() {\n        return this.originalNode;\n      }\n    }\n\n    /**\n     *\n     * @param {string} newContent\n     * @returns {Node | null | DocumentFragment}\n     */\n    function parseContent(newContent) {\n      let parser = new DOMParser();\n\n      // remove svgs to avoid false-positive matches on head, etc.\n      let contentWithSvgsRemoved = newContent.replace(\n        /<svg(\\s[^>]*>|>)([\\s\\S]*?)<\\/svg>/gim,\n        \"\",\n      );\n\n      // if the newContent contains a html, head or body tag, we can simply parse it w/o wrapping\n      if (\n        contentWithSvgsRemoved.match(/<\\/html>/) ||\n        contentWithSvgsRemoved.match(/<\\/head>/) ||\n        contentWithSvgsRemoved.match(/<\\/body>/)\n      ) {\n        let content = parser.parseFromString(newContent, \"text/html\");\n        // if it is a full HTML document, return the document itself as the parent container\n        if (contentWithSvgsRemoved.match(/<\\/html>/)) {\n          generatedByIdiomorph.add(content);\n          return content;\n        } else {\n          // otherwise return the html element as the parent container\n          let htmlElement = content.firstChild;\n          if (htmlElement) {\n            generatedByIdiomorph.add(htmlElement);\n          }\n          return htmlElement;\n        }\n      } else {\n        // if it is partial HTML, wrap it in a template tag to provide a parent element and also to help\n        // deal with touchy tags like tr, tbody, etc.\n        let responseDoc = parser.parseFromString(\n          \"<body><template>\" + newContent + \"</template></body>\",\n          \"text/html\",\n        );\n        let content = /** @type {HTMLTemplateElement} */ (\n          responseDoc.body.querySelector(\"template\")\n        ).content;\n        generatedByIdiomorph.add(content);\n        return content;\n      }\n    }\n\n    return { normalizeElement, normalizeParent };\n  })();\n\n  //=============================================================================\n  // This is what ends up becoming the Idiomorph global object\n  //=============================================================================\n  return {\n    morph,\n    defaults,\n  };\n})();\n\n/**\n * Morph the state of the currentElement based on the attributes and contents of\n * the newElement. Morphing may dispatch turbo:before-morph-element,\n * turbo:before-morph-attribute, and turbo:morph-element events.\n *\n * @param currentElement Element destination of morphing changes\n * @param newElement Element source of morphing changes\n */\nfunction morphElements(currentElement, newElement, { callbacks, ...options } = {}) {\n  Idiomorph.morph(currentElement, newElement, {\n    ...options,\n    callbacks: new DefaultIdiomorphCallbacks(callbacks)\n  });\n}\n\n/**\n * Morph the child elements of the currentElement based on the child elements of\n * the newElement. Morphing children may dispatch turbo:before-morph-element,\n * turbo:before-morph-attribute, and turbo:morph-element events.\n *\n * @param currentElement Element destination of morphing children changes\n * @param newElement Element source of morphing children changes\n */\nfunction morphChildren(currentElement, newElement, options = {}) {\n  morphElements(currentElement, newElement.childNodes, {\n    ...options,\n    morphStyle: \"innerHTML\"\n  });\n}\n\nfunction shouldRefreshFrameWithMorphing(currentFrame, newFrame) {\n  return currentFrame instanceof FrameElement &&\n    currentFrame.shouldReloadWithMorph && (!newFrame || areFramesCompatibleForRefreshing(currentFrame, newFrame)) &&\n    !currentFrame.closest(\"[data-turbo-permanent]\")\n}\n\nfunction areFramesCompatibleForRefreshing(currentFrame, newFrame) {\n  // newFrame cannot yet be an instance of FrameElement because custom\n  // elements don't get initialized until they're attached to the DOM, so\n  // test its Element#nodeName instead\n  return newFrame instanceof Element && newFrame.nodeName === \"TURBO-FRAME\" && currentFrame.id === newFrame.id &&\n  (!newFrame.getAttribute(\"src\") || urlsAreEqual(currentFrame.src, newFrame.getAttribute(\"src\")))\n}\n\nfunction closestFrameReloadableWithMorphing(node) {\n  return node.parentElement.closest(\"turbo-frame[src][refresh=morph]\")\n}\n\nclass DefaultIdiomorphCallbacks {\n  #beforeNodeMorphed\n\n  constructor({ beforeNodeMorphed } = {}) {\n    this.#beforeNodeMorphed = beforeNodeMorphed || (() => true);\n  }\n\n  beforeNodeAdded = (node) => {\n    return !(node.id && node.hasAttribute(\"data-turbo-permanent\") && document.getElementById(node.id))\n  }\n\n  beforeNodeMorphed = (currentElement, newElement) => {\n    if (currentElement instanceof Element) {\n      if (!currentElement.hasAttribute(\"data-turbo-permanent\") && this.#beforeNodeMorphed(currentElement, newElement)) {\n        const event = dispatch(\"turbo:before-morph-element\", {\n          cancelable: true,\n          target: currentElement,\n          detail: { currentElement, newElement }\n        });\n\n        return !event.defaultPrevented\n      } else {\n        return false\n      }\n    }\n  }\n\n  beforeAttributeUpdated = (attributeName, target, mutationType) => {\n    const event = dispatch(\"turbo:before-morph-attribute\", {\n      cancelable: true,\n      target,\n      detail: { attributeName, mutationType }\n    });\n\n    return !event.defaultPrevented\n  }\n\n  beforeNodeRemoved = (node) => {\n    return this.beforeNodeMorphed(node)\n  }\n\n  afterNodeMorphed = (currentElement, newElement) => {\n    if (currentElement instanceof Element) {\n      dispatch(\"turbo:morph-element\", {\n        target: currentElement,\n        detail: { currentElement, newElement }\n      });\n    }\n  }\n}\n\nclass MorphingFrameRenderer extends FrameRenderer {\n  static renderElement(currentElement, newElement) {\n    dispatch(\"turbo:before-frame-morph\", {\n      target: currentElement,\n      detail: { currentElement, newElement }\n    });\n\n    morphChildren(currentElement, newElement, {\n      callbacks: {\n        beforeNodeMorphed: (node, newNode) => {\n          if (\n            shouldRefreshFrameWithMorphing(node, newNode) &&\n              closestFrameReloadableWithMorphing(node) === currentElement\n          ) {\n            node.reload();\n            return false\n          }\n          return true\n        }\n      }\n    });\n  }\n\n  async preservingPermanentElements(callback) {\n    return await callback()\n  }\n}\n\nclass ProgressBar {\n  static animationDuration = 300 /*ms*/\n\n  static get defaultCSS() {\n    return unindent`\n      .turbo-progress-bar {\n        position: fixed;\n        display: block;\n        top: 0;\n        left: 0;\n        height: 3px;\n        background: #0076ff;\n        z-index: 2147483647;\n        transition:\n          width ${ProgressBar.animationDuration}ms ease-out,\n          opacity ${ProgressBar.animationDuration / 2}ms ${ProgressBar.animationDuration / 2}ms ease-in;\n        transform: translate3d(0, 0, 0);\n      }\n    `\n  }\n\n  hiding = false\n  value = 0\n  visible = false\n\n  constructor() {\n    this.stylesheetElement = this.createStylesheetElement();\n    this.progressElement = this.createProgressElement();\n    this.installStylesheetElement();\n    this.setValue(0);\n  }\n\n  show() {\n    if (!this.visible) {\n      this.visible = true;\n      this.installProgressElement();\n      this.startTrickling();\n    }\n  }\n\n  hide() {\n    if (this.visible && !this.hiding) {\n      this.hiding = true;\n      this.fadeProgressElement(() => {\n        this.uninstallProgressElement();\n        this.stopTrickling();\n        this.visible = false;\n        this.hiding = false;\n      });\n    }\n  }\n\n  setValue(value) {\n    this.value = value;\n    this.refresh();\n  }\n\n  // Private\n\n  installStylesheetElement() {\n    document.head.insertBefore(this.stylesheetElement, document.head.firstChild);\n  }\n\n  installProgressElement() {\n    this.progressElement.style.width = \"0\";\n    this.progressElement.style.opacity = \"1\";\n    document.documentElement.insertBefore(this.progressElement, document.body);\n    this.refresh();\n  }\n\n  fadeProgressElement(callback) {\n    this.progressElement.style.opacity = \"0\";\n    setTimeout(callback, ProgressBar.animationDuration * 1.5);\n  }\n\n  uninstallProgressElement() {\n    if (this.progressElement.parentNode) {\n      document.documentElement.removeChild(this.progressElement);\n    }\n  }\n\n  startTrickling() {\n    if (!this.trickleInterval) {\n      this.trickleInterval = window.setInterval(this.trickle, ProgressBar.animationDuration);\n    }\n  }\n\n  stopTrickling() {\n    window.clearInterval(this.trickleInterval);\n    delete this.trickleInterval;\n  }\n\n  trickle = () => {\n    this.setValue(this.value + Math.random() / 100);\n  }\n\n  refresh() {\n    requestAnimationFrame(() => {\n      this.progressElement.style.width = `${10 + this.value * 90}%`;\n    });\n  }\n\n  createStylesheetElement() {\n    const element = document.createElement(\"style\");\n    element.type = \"text/css\";\n    element.textContent = ProgressBar.defaultCSS;\n    const cspNonce = getCspNonce();\n    if (cspNonce) {\n      element.nonce = cspNonce;\n    }\n    return element\n  }\n\n  createProgressElement() {\n    const element = document.createElement(\"div\");\n    element.className = \"turbo-progress-bar\";\n    return element\n  }\n}\n\nclass HeadSnapshot extends Snapshot {\n  detailsByOuterHTML = this.children\n    .filter((element) => !elementIsNoscript(element))\n    .map((element) => elementWithoutNonce(element))\n    .reduce((result, element) => {\n      const { outerHTML } = element;\n      const details =\n        outerHTML in result\n          ? result[outerHTML]\n          : {\n              type: elementType(element),\n              tracked: elementIsTracked(element),\n              elements: []\n            };\n      return {\n        ...result,\n        [outerHTML]: {\n          ...details,\n          elements: [...details.elements, element]\n        }\n      }\n    }, {})\n\n  get trackedElementSignature() {\n    return Object.keys(this.detailsByOuterHTML)\n      .filter((outerHTML) => this.detailsByOuterHTML[outerHTML].tracked)\n      .join(\"\")\n  }\n\n  getScriptElementsNotInSnapshot(snapshot) {\n    return this.getElementsMatchingTypeNotInSnapshot(\"script\", snapshot)\n  }\n\n  getStylesheetElementsNotInSnapshot(snapshot) {\n    return this.getElementsMatchingTypeNotInSnapshot(\"stylesheet\", snapshot)\n  }\n\n  getElementsMatchingTypeNotInSnapshot(matchedType, snapshot) {\n    return Object.keys(this.detailsByOuterHTML)\n      .filter((outerHTML) => !(outerHTML in snapshot.detailsByOuterHTML))\n      .map((outerHTML) => this.detailsByOuterHTML[outerHTML])\n      .filter(({ type }) => type == matchedType)\n      .map(({ elements: [element] }) => element)\n  }\n\n  get provisionalElements() {\n    return Object.keys(this.detailsByOuterHTML).reduce((result, outerHTML) => {\n      const { type, tracked, elements } = this.detailsByOuterHTML[outerHTML];\n      if (type == null && !tracked) {\n        return [...result, ...elements]\n      } else if (elements.length > 1) {\n        return [...result, ...elements.slice(1)]\n      } else {\n        return result\n      }\n    }, [])\n  }\n\n  getMetaValue(name) {\n    const element = this.findMetaElementByName(name);\n    return element ? element.getAttribute(\"content\") : null\n  }\n\n  findMetaElementByName(name) {\n    return Object.keys(this.detailsByOuterHTML).reduce((result, outerHTML) => {\n      const {\n        elements: [element]\n      } = this.detailsByOuterHTML[outerHTML];\n      return elementIsMetaElementWithName(element, name) ? element : result\n    }, undefined | undefined)\n  }\n}\n\nfunction elementType(element) {\n  if (elementIsScript(element)) {\n    return \"script\"\n  } else if (elementIsStylesheet(element)) {\n    return \"stylesheet\"\n  }\n}\n\nfunction elementIsTracked(element) {\n  return element.getAttribute(\"data-turbo-track\") == \"reload\"\n}\n\nfunction elementIsScript(element) {\n  const tagName = element.localName;\n  return tagName == \"script\"\n}\n\nfunction elementIsNoscript(element) {\n  const tagName = element.localName;\n  return tagName == \"noscript\"\n}\n\nfunction elementIsStylesheet(element) {\n  const tagName = element.localName;\n  return tagName == \"style\" || (tagName == \"link\" && element.getAttribute(\"rel\") == \"stylesheet\")\n}\n\nfunction elementIsMetaElementWithName(element, name) {\n  const tagName = element.localName;\n  return tagName == \"meta\" && element.getAttribute(\"name\") == name\n}\n\nfunction elementWithoutNonce(element) {\n  if (element.hasAttribute(\"nonce\")) {\n    element.setAttribute(\"nonce\", \"\");\n  }\n\n  return element\n}\n\nclass PageSnapshot extends Snapshot {\n  static fromHTMLString(html = \"\") {\n    return this.fromDocument(parseHTMLDocument(html))\n  }\n\n  static fromElement(element) {\n    return this.fromDocument(element.ownerDocument)\n  }\n\n  static fromDocument({ documentElement, body, head }) {\n    return new this(documentElement, body, new HeadSnapshot(head))\n  }\n\n  constructor(documentElement, body, headSnapshot) {\n    super(body);\n    this.documentElement = documentElement;\n    this.headSnapshot = headSnapshot;\n  }\n\n  clone() {\n    const clonedElement = this.element.cloneNode(true);\n\n    const selectElements = this.element.querySelectorAll(\"select\");\n    const clonedSelectElements = clonedElement.querySelectorAll(\"select\");\n\n    for (const [index, source] of selectElements.entries()) {\n      const clone = clonedSelectElements[index];\n      for (const option of clone.selectedOptions) option.selected = false;\n      for (const option of source.selectedOptions) clone.options[option.index].selected = true;\n    }\n\n    for (const clonedPasswordInput of clonedElement.querySelectorAll('input[type=\"password\"]')) {\n      clonedPasswordInput.value = \"\";\n    }\n\n    for (const clonedNoscriptElement of clonedElement.querySelectorAll(\"noscript\")) {\n      clonedNoscriptElement.remove();\n    }\n\n    return new PageSnapshot(this.documentElement, clonedElement, this.headSnapshot)\n  }\n\n  get lang() {\n    return this.documentElement.getAttribute(\"lang\")\n  }\n\n  get dir() {\n    return this.documentElement.getAttribute(\"dir\")\n  }\n\n  get headElement() {\n    return this.headSnapshot.element\n  }\n\n  get rootLocation() {\n    const root = this.getSetting(\"root\") ?? \"/\";\n    return expandURL(root)\n  }\n\n  get cacheControlValue() {\n    return this.getSetting(\"cache-control\")\n  }\n\n  get isPreviewable() {\n    return this.cacheControlValue != \"no-preview\"\n  }\n\n  get isCacheable() {\n    return this.cacheControlValue != \"no-cache\"\n  }\n\n  get isVisitable() {\n    return this.getSetting(\"visit-control\") != \"reload\"\n  }\n\n  get prefersViewTransitions() {\n    const viewTransitionEnabled = this.getSetting(\"view-transition\") === \"true\" || this.headSnapshot.getMetaValue(\"view-transition\") === \"same-origin\";\n    return viewTransitionEnabled && !window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches\n  }\n\n  get refreshMethod() {\n    return this.getSetting(\"refresh-method\")\n  }\n\n  get refreshScroll() {\n    return this.getSetting(\"refresh-scroll\")\n  }\n\n  // Private\n\n  getSetting(name) {\n    return this.headSnapshot.getMetaValue(`turbo-${name}`)\n  }\n}\n\nclass ViewTransitioner {\n  #viewTransitionStarted = false\n  #lastOperation = Promise.resolve()\n\n  renderChange(useViewTransition, render) {\n    if (useViewTransition && this.viewTransitionsAvailable && !this.#viewTransitionStarted) {\n      this.#viewTransitionStarted = true;\n      this.#lastOperation = this.#lastOperation.then(async () => {\n        await document.startViewTransition(render).finished;\n      });\n    } else {\n      this.#lastOperation = this.#lastOperation.then(render);\n    }\n\n    return this.#lastOperation\n  }\n\n  get viewTransitionsAvailable() {\n    return document.startViewTransition\n  }\n}\n\nconst defaultOptions = {\n  action: \"advance\",\n  historyChanged: false,\n  visitCachedSnapshot: () => {},\n  willRender: true,\n  updateHistory: true,\n  shouldCacheSnapshot: true,\n  acceptsStreamResponse: false,\n  refresh: {}\n};\n\nconst TimingMetric = {\n  visitStart: \"visitStart\",\n  requestStart: \"requestStart\",\n  requestEnd: \"requestEnd\",\n  visitEnd: \"visitEnd\"\n};\n\nconst VisitState = {\n  initialized: \"initialized\",\n  started: \"started\",\n  canceled: \"canceled\",\n  failed: \"failed\",\n  completed: \"completed\"\n};\n\nconst SystemStatusCode = {\n  networkFailure: 0,\n  timeoutFailure: -1,\n  contentTypeMismatch: -2\n};\n\nconst Direction = {\n  advance: \"forward\",\n  restore: \"back\",\n  replace: \"none\"\n};\n\nclass Visit {\n  identifier = uuid() // Required by turbo-ios\n  timingMetrics = {}\n\n  followedRedirect = false\n  historyChanged = false\n  scrolled = false\n  shouldCacheSnapshot = true\n  acceptsStreamResponse = false\n  snapshotCached = false\n  state = VisitState.initialized\n  viewTransitioner = new ViewTransitioner()\n\n  constructor(delegate, location, restorationIdentifier, options = {}) {\n    this.delegate = delegate;\n    this.location = location;\n    this.restorationIdentifier = restorationIdentifier || uuid();\n\n    const {\n      action,\n      historyChanged,\n      referrer,\n      snapshot,\n      snapshotHTML,\n      response,\n      visitCachedSnapshot,\n      willRender,\n      updateHistory,\n      shouldCacheSnapshot,\n      acceptsStreamResponse,\n      direction,\n      refresh\n    } = {\n      ...defaultOptions,\n      ...options\n    };\n    this.action = action;\n    this.historyChanged = historyChanged;\n    this.referrer = referrer;\n    this.snapshot = snapshot;\n    this.snapshotHTML = snapshotHTML;\n    this.response = response;\n    this.isPageRefresh = this.view.isPageRefresh(this);\n    this.visitCachedSnapshot = visitCachedSnapshot;\n    this.willRender = willRender;\n    this.updateHistory = updateHistory;\n    this.scrolled = !willRender;\n    this.shouldCacheSnapshot = shouldCacheSnapshot;\n    this.acceptsStreamResponse = acceptsStreamResponse;\n    this.direction = direction || Direction[action];\n    this.refresh = refresh;\n  }\n\n  get adapter() {\n    return this.delegate.adapter\n  }\n\n  get view() {\n    return this.delegate.view\n  }\n\n  get history() {\n    return this.delegate.history\n  }\n\n  get restorationData() {\n    return this.history.getRestorationDataForIdentifier(this.restorationIdentifier)\n  }\n\n  start() {\n    if (this.state == VisitState.initialized) {\n      this.recordTimingMetric(TimingMetric.visitStart);\n      this.state = VisitState.started;\n      this.adapter.visitStarted(this);\n      this.delegate.visitStarted(this);\n    }\n  }\n\n  cancel() {\n    if (this.state == VisitState.started) {\n      if (this.request) {\n        this.request.cancel();\n      }\n      this.cancelRender();\n      this.state = VisitState.canceled;\n    }\n  }\n\n  complete() {\n    if (this.state == VisitState.started) {\n      this.recordTimingMetric(TimingMetric.visitEnd);\n      this.adapter.visitCompleted(this);\n      this.state = VisitState.completed;\n      this.followRedirect();\n\n      if (!this.followedRedirect) {\n        this.delegate.visitCompleted(this);\n      }\n    }\n  }\n\n  fail() {\n    if (this.state == VisitState.started) {\n      this.state = VisitState.failed;\n      this.adapter.visitFailed(this);\n      this.delegate.visitCompleted(this);\n    }\n  }\n\n  changeHistory() {\n    if (!this.historyChanged && this.updateHistory) {\n      const actionForHistory = this.location.href === this.referrer?.href ? \"replace\" : this.action;\n      const method = getHistoryMethodForAction(actionForHistory);\n      this.history.update(method, this.location, this.restorationIdentifier);\n      this.historyChanged = true;\n    }\n  }\n\n  issueRequest() {\n    if (this.hasPreloadedResponse()) {\n      this.simulateRequest();\n    } else if (this.shouldIssueRequest() && !this.request) {\n      this.request = new FetchRequest(this, FetchMethod.get, this.location);\n      this.request.perform();\n    }\n  }\n\n  simulateRequest() {\n    if (this.response) {\n      this.startRequest();\n      this.recordResponse();\n      this.finishRequest();\n    }\n  }\n\n  startRequest() {\n    this.recordTimingMetric(TimingMetric.requestStart);\n    this.adapter.visitRequestStarted(this);\n  }\n\n  recordResponse(response = this.response) {\n    this.response = response;\n    if (response) {\n      const { statusCode } = response;\n      if (isSuccessful(statusCode)) {\n        this.adapter.visitRequestCompleted(this);\n      } else {\n        this.adapter.visitRequestFailedWithStatusCode(this, statusCode);\n      }\n    }\n  }\n\n  finishRequest() {\n    this.recordTimingMetric(TimingMetric.requestEnd);\n    this.adapter.visitRequestFinished(this);\n  }\n\n  loadResponse() {\n    if (this.response) {\n      const { statusCode, responseHTML } = this.response;\n      this.render(async () => {\n        if (this.shouldCacheSnapshot) this.cacheSnapshot();\n        if (this.view.renderPromise) await this.view.renderPromise;\n\n        if (isSuccessful(statusCode) && responseHTML != null) {\n          const snapshot = PageSnapshot.fromHTMLString(responseHTML);\n          await this.renderPageSnapshot(snapshot, false);\n\n          this.adapter.visitRendered(this);\n          this.complete();\n        } else {\n          await this.view.renderError(PageSnapshot.fromHTMLString(responseHTML), this);\n          this.adapter.visitRendered(this);\n          this.fail();\n        }\n      });\n    }\n  }\n\n  getCachedSnapshot() {\n    const snapshot = this.view.getCachedSnapshotForLocation(this.location) || this.getPreloadedSnapshot();\n\n    if (snapshot && (!getAnchor(this.location) || snapshot.hasAnchor(getAnchor(this.location)))) {\n      if (this.action == \"restore\" || snapshot.isPreviewable) {\n        return snapshot\n      }\n    }\n  }\n\n  getPreloadedSnapshot() {\n    if (this.snapshotHTML) {\n      return PageSnapshot.fromHTMLString(this.snapshotHTML)\n    }\n  }\n\n  hasCachedSnapshot() {\n    return this.getCachedSnapshot() != null\n  }\n\n  loadCachedSnapshot() {\n    const snapshot = this.getCachedSnapshot();\n    if (snapshot) {\n      const isPreview = this.shouldIssueRequest();\n      this.render(async () => {\n        this.cacheSnapshot();\n        if (this.isPageRefresh) {\n          this.adapter.visitRendered(this);\n        } else {\n          if (this.view.renderPromise) await this.view.renderPromise;\n\n          await this.renderPageSnapshot(snapshot, isPreview);\n\n          this.adapter.visitRendered(this);\n          if (!isPreview) {\n            this.complete();\n          }\n        }\n      });\n    }\n  }\n\n  followRedirect() {\n    if (this.redirectedToLocation && !this.followedRedirect && this.response?.redirected) {\n      this.adapter.visitProposedToLocation(this.redirectedToLocation, {\n        action: \"replace\",\n        response: this.response,\n        shouldCacheSnapshot: false,\n        willRender: false\n      });\n      this.followedRedirect = true;\n    }\n  }\n\n  // Fetch request delegate\n\n  prepareRequest(request) {\n    if (this.acceptsStreamResponse) {\n      request.acceptResponseType(StreamMessage.contentType);\n    }\n  }\n\n  requestStarted() {\n    this.startRequest();\n  }\n\n  requestPreventedHandlingResponse(_request, _response) {}\n\n  async requestSucceededWithResponse(request, response) {\n    const responseHTML = await response.responseHTML;\n    const { redirected, statusCode } = response;\n    if (responseHTML == undefined) {\n      this.recordResponse({\n        statusCode: SystemStatusCode.contentTypeMismatch,\n        redirected\n      });\n    } else {\n      this.redirectedToLocation = response.redirected ? response.location : undefined;\n      this.recordResponse({ statusCode: statusCode, responseHTML, redirected });\n    }\n  }\n\n  async requestFailedWithResponse(request, response) {\n    const responseHTML = await response.responseHTML;\n    const { redirected, statusCode } = response;\n    if (responseHTML == undefined) {\n      this.recordResponse({\n        statusCode: SystemStatusCode.contentTypeMismatch,\n        redirected\n      });\n    } else {\n      this.recordResponse({ statusCode: statusCode, responseHTML, redirected });\n    }\n  }\n\n  requestErrored(_request, _error) {\n    this.recordResponse({\n      statusCode: SystemStatusCode.networkFailure,\n      redirected: false\n    });\n  }\n\n  requestFinished() {\n    this.finishRequest();\n  }\n\n  // Scrolling\n\n  performScroll() {\n    if (!this.scrolled && !this.view.forceReloaded && !this.view.shouldPreserveScrollPosition(this)) {\n      if (this.action == \"restore\") {\n        this.scrollToRestoredPosition() || this.scrollToAnchor() || this.view.scrollToTop();\n      } else {\n        this.scrollToAnchor() || this.view.scrollToTop();\n      }\n\n      this.scrolled = true;\n    }\n  }\n\n  scrollToRestoredPosition() {\n    const { scrollPosition } = this.restorationData;\n    if (scrollPosition) {\n      this.view.scrollToPosition(scrollPosition);\n      return true\n    }\n  }\n\n  scrollToAnchor() {\n    const anchor = getAnchor(this.location);\n    if (anchor != null) {\n      this.view.scrollToAnchor(anchor);\n      return true\n    }\n  }\n\n  // Instrumentation\n\n  recordTimingMetric(metric) {\n    this.timingMetrics[metric] = new Date().getTime();\n  }\n\n  getTimingMetrics() {\n    return { ...this.timingMetrics }\n  }\n\n  // Private\n\n  hasPreloadedResponse() {\n    return typeof this.response == \"object\"\n  }\n\n  shouldIssueRequest() {\n    if (this.action == \"restore\") {\n      return !this.hasCachedSnapshot()\n    } else {\n      return this.willRender\n    }\n  }\n\n  cacheSnapshot() {\n    if (!this.snapshotCached) {\n      this.view.cacheSnapshot(this.snapshot).then((snapshot) => snapshot && this.visitCachedSnapshot(snapshot));\n      this.snapshotCached = true;\n    }\n  }\n\n  async render(callback) {\n    this.cancelRender();\n    await new Promise((resolve) => {\n      this.frame =\n        document.visibilityState === \"hidden\" ? setTimeout(() => resolve(), 0) : requestAnimationFrame(() => resolve());\n    });\n    await callback();\n    delete this.frame;\n  }\n\n  async renderPageSnapshot(snapshot, isPreview) {\n    await this.viewTransitioner.renderChange(this.view.shouldTransitionTo(snapshot), async () => {\n      await this.view.renderPage(snapshot, isPreview, this.willRender, this);\n      this.performScroll();\n    });\n  }\n\n  cancelRender() {\n    if (this.frame) {\n      cancelAnimationFrame(this.frame);\n      delete this.frame;\n    }\n  }\n}\n\nfunction isSuccessful(statusCode) {\n  return statusCode >= 200 && statusCode < 300\n}\n\nclass BrowserAdapter {\n  progressBar = new ProgressBar()\n\n  constructor(session) {\n    this.session = session;\n  }\n\n  visitProposedToLocation(location, options) {\n    if (locationIsVisitable(location, this.navigator.rootLocation)) {\n      this.navigator.startVisit(location, options?.restorationIdentifier || uuid(), options);\n    } else {\n      window.location.href = location.toString();\n    }\n  }\n\n  visitStarted(visit) {\n    this.location = visit.location;\n    this.redirectedToLocation = null;\n\n    visit.loadCachedSnapshot();\n    visit.issueRequest();\n  }\n\n  visitRequestStarted(visit) {\n    this.progressBar.setValue(0);\n    if (visit.hasCachedSnapshot() || visit.action != \"restore\") {\n      this.showVisitProgressBarAfterDelay();\n    } else {\n      this.showProgressBar();\n    }\n  }\n\n  visitRequestCompleted(visit) {\n    visit.loadResponse();\n\n    if (visit.response.redirected) {\n      this.redirectedToLocation = visit.redirectedToLocation;\n    }\n  }\n\n  visitRequestFailedWithStatusCode(visit, statusCode) {\n    switch (statusCode) {\n      case SystemStatusCode.networkFailure:\n      case SystemStatusCode.timeoutFailure:\n      case SystemStatusCode.contentTypeMismatch:\n        return this.reload({\n          reason: \"request_failed\",\n          context: {\n            statusCode\n          }\n        })\n      default:\n        return visit.loadResponse()\n    }\n  }\n\n  visitRequestFinished(_visit) {}\n\n  visitCompleted(_visit) {\n    this.progressBar.setValue(1);\n    this.hideVisitProgressBar();\n  }\n\n  pageInvalidated(reason) {\n    this.reload(reason);\n  }\n\n  visitFailed(_visit) {\n    this.progressBar.setValue(1);\n    this.hideVisitProgressBar();\n  }\n\n  visitRendered(_visit) {}\n\n  // Link prefetching\n\n  linkPrefetchingIsEnabledForLocation(location) {\n    return true\n  }\n\n  // Form Submission Delegate\n\n  formSubmissionStarted(_formSubmission) {\n    this.progressBar.setValue(0);\n    this.showFormProgressBarAfterDelay();\n  }\n\n  formSubmissionFinished(_formSubmission) {\n    this.progressBar.setValue(1);\n    this.hideFormProgressBar();\n  }\n\n  // Private\n\n  showVisitProgressBarAfterDelay() {\n    this.visitProgressBarTimeout = window.setTimeout(this.showProgressBar, this.session.progressBarDelay);\n  }\n\n  hideVisitProgressBar() {\n    this.progressBar.hide();\n    if (this.visitProgressBarTimeout != null) {\n      window.clearTimeout(this.visitProgressBarTimeout);\n      delete this.visitProgressBarTimeout;\n    }\n  }\n\n  showFormProgressBarAfterDelay() {\n    if (this.formProgressBarTimeout == null) {\n      this.formProgressBarTimeout = window.setTimeout(this.showProgressBar, this.session.progressBarDelay);\n    }\n  }\n\n  hideFormProgressBar() {\n    this.progressBar.hide();\n    if (this.formProgressBarTimeout != null) {\n      window.clearTimeout(this.formProgressBarTimeout);\n      delete this.formProgressBarTimeout;\n    }\n  }\n\n  showProgressBar = () => {\n    this.progressBar.show();\n  }\n\n  reload(reason) {\n    dispatch(\"turbo:reload\", { detail: reason });\n\n    window.location.href = (this.redirectedToLocation || this.location)?.toString() || window.location.href;\n  }\n\n  get navigator() {\n    return this.session.navigator\n  }\n}\n\nclass CacheObserver {\n  selector = \"[data-turbo-temporary]\"\n\n  started = false\n\n  start() {\n    if (!this.started) {\n      this.started = true;\n      addEventListener(\"turbo:before-cache\", this.removeTemporaryElements, false);\n    }\n  }\n\n  stop() {\n    if (this.started) {\n      this.started = false;\n      removeEventListener(\"turbo:before-cache\", this.removeTemporaryElements, false);\n    }\n  }\n\n  removeTemporaryElements = (_event) => {\n    for (const element of this.temporaryElements) {\n      element.remove();\n    }\n  }\n\n  get temporaryElements() {\n    return [...document.querySelectorAll(this.selector)]\n  }\n}\n\nclass FrameRedirector {\n  constructor(session, element) {\n    this.session = session;\n    this.element = element;\n    this.linkInterceptor = new LinkInterceptor(this, element);\n    this.formSubmitObserver = new FormSubmitObserver(this, element);\n  }\n\n  start() {\n    this.linkInterceptor.start();\n    this.formSubmitObserver.start();\n  }\n\n  stop() {\n    this.linkInterceptor.stop();\n    this.formSubmitObserver.stop();\n  }\n\n  // Link interceptor delegate\n\n  shouldInterceptLinkClick(element, _location, _event) {\n    return this.#shouldRedirect(element)\n  }\n\n  linkClickIntercepted(element, url, event) {\n    const frame = this.#findFrameElement(element);\n    if (frame) {\n      frame.delegate.linkClickIntercepted(element, url, event);\n    }\n  }\n\n  // Form submit observer delegate\n\n  willSubmitForm(element, submitter) {\n    return (\n      element.closest(\"turbo-frame\") == null &&\n      this.#shouldSubmit(element, submitter) &&\n      this.#shouldRedirect(element, submitter)\n    )\n  }\n\n  formSubmitted(element, submitter) {\n    const frame = this.#findFrameElement(element, submitter);\n    if (frame) {\n      frame.delegate.formSubmitted(element, submitter);\n    }\n  }\n\n  #shouldSubmit(form, submitter) {\n    const action = getAction$1(form, submitter);\n    const meta = this.element.ownerDocument.querySelector(`meta[name=\"turbo-root\"]`);\n    const rootLocation = expandURL(meta?.content ?? \"/\");\n\n    return this.#shouldRedirect(form, submitter) && locationIsVisitable(action, rootLocation)\n  }\n\n  #shouldRedirect(element, submitter) {\n    const isNavigatable =\n      element instanceof HTMLFormElement\n        ? this.session.submissionIsNavigatable(element, submitter)\n        : this.session.elementIsNavigatable(element);\n\n    if (isNavigatable) {\n      const frame = this.#findFrameElement(element, submitter);\n      return frame ? frame != element.closest(\"turbo-frame\") : false\n    } else {\n      return false\n    }\n  }\n\n  #findFrameElement(element, submitter) {\n    const id = submitter?.getAttribute(\"data-turbo-frame\") || element.getAttribute(\"data-turbo-frame\");\n    if (id && id != \"_top\") {\n      const frame = this.element.querySelector(`#${id}:not([disabled])`);\n      if (frame instanceof FrameElement) {\n        return frame\n      }\n    }\n  }\n}\n\nclass History {\n  location\n  restorationIdentifier = uuid()\n  restorationData = {}\n  started = false\n  currentIndex = 0\n\n  constructor(delegate) {\n    this.delegate = delegate;\n  }\n\n  start() {\n    if (!this.started) {\n      addEventListener(\"popstate\", this.onPopState, false);\n      this.currentIndex = history.state?.turbo?.restorationIndex || 0;\n      this.started = true;\n      this.replace(new URL(window.location.href));\n    }\n  }\n\n  stop() {\n    if (this.started) {\n      removeEventListener(\"popstate\", this.onPopState, false);\n      this.started = false;\n    }\n  }\n\n  push(location, restorationIdentifier) {\n    this.update(history.pushState, location, restorationIdentifier);\n  }\n\n  replace(location, restorationIdentifier) {\n    this.update(history.replaceState, location, restorationIdentifier);\n  }\n\n  update(method, location, restorationIdentifier = uuid()) {\n    if (method === history.pushState) ++this.currentIndex;\n\n    const state = { turbo: { restorationIdentifier, restorationIndex: this.currentIndex } };\n    method.call(history, state, \"\", location.href);\n    this.location = location;\n    this.restorationIdentifier = restorationIdentifier;\n  }\n\n  // Restoration data\n\n  getRestorationDataForIdentifier(restorationIdentifier) {\n    return this.restorationData[restorationIdentifier] || {}\n  }\n\n  updateRestorationData(additionalData) {\n    const { restorationIdentifier } = this;\n    const restorationData = this.restorationData[restorationIdentifier];\n    this.restorationData[restorationIdentifier] = {\n      ...restorationData,\n      ...additionalData\n    };\n  }\n\n  // Scroll restoration\n\n  assumeControlOfScrollRestoration() {\n    if (!this.previousScrollRestoration) {\n      this.previousScrollRestoration = history.scrollRestoration ?? \"auto\";\n      history.scrollRestoration = \"manual\";\n    }\n  }\n\n  relinquishControlOfScrollRestoration() {\n    if (this.previousScrollRestoration) {\n      history.scrollRestoration = this.previousScrollRestoration;\n      delete this.previousScrollRestoration;\n    }\n  }\n\n  // Event handlers\n\n  onPopState = (event) => {\n    const { turbo } = event.state || {};\n    this.location = new URL(window.location.href);\n\n    if (turbo) {\n      const { restorationIdentifier, restorationIndex } = turbo;\n      this.restorationIdentifier = restorationIdentifier;\n      const direction = restorationIndex > this.currentIndex ? \"forward\" : \"back\";\n      this.delegate.historyPoppedToLocationWithRestorationIdentifierAndDirection(this.location, restorationIdentifier, direction);\n      this.currentIndex = restorationIndex;\n    } else {\n      this.currentIndex++;\n      this.delegate.historyPoppedWithEmptyState(this.location);\n    }\n  }\n}\n\nclass LinkPrefetchObserver {\n  started = false\n  #prefetchedLink = null\n\n  constructor(delegate, eventTarget) {\n    this.delegate = delegate;\n    this.eventTarget = eventTarget;\n  }\n\n  start() {\n    if (this.started) return\n\n    if (this.eventTarget.readyState === \"loading\") {\n      this.eventTarget.addEventListener(\"DOMContentLoaded\", this.#enable, { once: true });\n    } else {\n      this.#enable();\n    }\n  }\n\n  stop() {\n    if (!this.started) return\n\n    this.eventTarget.removeEventListener(\"mouseenter\", this.#tryToPrefetchRequest, {\n      capture: true,\n      passive: true\n    });\n    this.eventTarget.removeEventListener(\"mouseleave\", this.#cancelRequestIfObsolete, {\n      capture: true,\n      passive: true\n    });\n\n    this.eventTarget.removeEventListener(\"turbo:before-fetch-request\", this.#tryToUsePrefetchedRequest, true);\n    this.started = false;\n  }\n\n  #enable = () => {\n    this.eventTarget.addEventListener(\"mouseenter\", this.#tryToPrefetchRequest, {\n      capture: true,\n      passive: true\n    });\n    this.eventTarget.addEventListener(\"mouseleave\", this.#cancelRequestIfObsolete, {\n      capture: true,\n      passive: true\n    });\n\n    this.eventTarget.addEventListener(\"turbo:before-fetch-request\", this.#tryToUsePrefetchedRequest, true);\n    this.started = true;\n  }\n\n  #tryToPrefetchRequest = (event) => {\n    if (getMetaContent(\"turbo-prefetch\") === \"false\") return\n\n    const target = event.target;\n    const isLink = target.matches && target.matches(\"a[href]:not([target^=_]):not([download])\");\n\n    if (isLink && this.#isPrefetchable(target)) {\n      const link = target;\n      const location = getLocationForLink(link);\n\n      if (this.delegate.canPrefetchRequestToLocation(link, location)) {\n        this.#prefetchedLink = link;\n\n        const fetchRequest = new FetchRequest(\n          this,\n          FetchMethod.get,\n          location,\n          new URLSearchParams(),\n          target\n        );\n\n        fetchRequest.fetchOptions.priority = \"low\";\n\n        prefetchCache.putLater(location, fetchRequest, this.#cacheTtl);\n      }\n    }\n  }\n\n  #cancelRequestIfObsolete = (event) => {\n    if (event.target === this.#prefetchedLink) this.#cancelPrefetchRequest();\n  }\n\n  #cancelPrefetchRequest = () => {\n    prefetchCache.clear();\n    this.#prefetchedLink = null;\n  }\n\n  #tryToUsePrefetchedRequest = (event) => {\n    if (event.target.tagName !== \"FORM\" && event.detail.fetchOptions.method === \"GET\") {\n      const cached = prefetchCache.get(event.detail.url);\n\n      if (cached) {\n        // User clicked link, use cache response\n        event.detail.fetchRequest = cached;\n      }\n\n      prefetchCache.clear();\n    }\n  }\n\n  prepareRequest(request) {\n    const link = request.target;\n\n    request.headers[\"X-Sec-Purpose\"] = \"prefetch\";\n\n    const turboFrame = link.closest(\"turbo-frame\");\n    const turboFrameTarget = link.getAttribute(\"data-turbo-frame\") || turboFrame?.getAttribute(\"target\") || turboFrame?.id;\n\n    if (turboFrameTarget && turboFrameTarget !== \"_top\") {\n      request.headers[\"Turbo-Frame\"] = turboFrameTarget;\n    }\n  }\n\n  // Fetch request interface\n\n  requestSucceededWithResponse() {}\n\n  requestStarted(fetchRequest) {}\n\n  requestErrored(fetchRequest) {}\n\n  requestFinished(fetchRequest) {}\n\n  requestPreventedHandlingResponse(fetchRequest, fetchResponse) {}\n\n  requestFailedWithResponse(fetchRequest, fetchResponse) {}\n\n  get #cacheTtl() {\n    return Number(getMetaContent(\"turbo-prefetch-cache-time\")) || cacheTtl\n  }\n\n  #isPrefetchable(link) {\n    const href = link.getAttribute(\"href\");\n\n    if (!href) return false\n\n    if (unfetchableLink(link)) return false\n    if (linkToTheSamePage(link)) return false\n    if (linkOptsOut(link)) return false\n    if (nonSafeLink(link)) return false\n    if (eventPrevented(link)) return false\n\n    return true\n  }\n}\n\nconst unfetchableLink = (link) => {\n  return link.origin !== document.location.origin || ![\"http:\", \"https:\"].includes(link.protocol) || link.hasAttribute(\"target\")\n};\n\nconst linkToTheSamePage = (link) => {\n  return (link.pathname + link.search === document.location.pathname + document.location.search) || link.href.startsWith(\"#\")\n};\n\nconst linkOptsOut = (link) => {\n  if (link.getAttribute(\"data-turbo-prefetch\") === \"false\") return true\n  if (link.getAttribute(\"data-turbo\") === \"false\") return true\n\n  const turboPrefetchParent = findClosestRecursively(link, \"[data-turbo-prefetch]\");\n  if (turboPrefetchParent && turboPrefetchParent.getAttribute(\"data-turbo-prefetch\") === \"false\") return true\n\n  return false\n};\n\nconst nonSafeLink = (link) => {\n  const turboMethod = link.getAttribute(\"data-turbo-method\");\n  if (turboMethod && turboMethod.toLowerCase() !== \"get\") return true\n\n  if (isUJS(link)) return true\n  if (link.hasAttribute(\"data-turbo-confirm\")) return true\n  if (link.hasAttribute(\"data-turbo-stream\")) return true\n\n  return false\n};\n\nconst isUJS = (link) => {\n  return link.hasAttribute(\"data-remote\") || link.hasAttribute(\"data-behavior\") || link.hasAttribute(\"data-confirm\") || link.hasAttribute(\"data-method\")\n};\n\nconst eventPrevented = (link) => {\n  const event = dispatch(\"turbo:before-prefetch\", { target: link, cancelable: true });\n  return event.defaultPrevented\n};\n\nclass Navigator {\n  constructor(delegate) {\n    this.delegate = delegate;\n  }\n\n  proposeVisit(location, options = {}) {\n    if (this.delegate.allowsVisitingLocationWithAction(location, options.action)) {\n      this.delegate.visitProposedToLocation(location, options);\n    }\n  }\n\n  startVisit(locatable, restorationIdentifier, options = {}) {\n    this.stop();\n    this.currentVisit = new Visit(this, expandURL(locatable), restorationIdentifier, {\n      referrer: this.location,\n      ...options\n    });\n    this.currentVisit.start();\n  }\n\n  submitForm(form, submitter) {\n    this.stop();\n    this.formSubmission = new FormSubmission(this, form, submitter, true);\n\n    this.formSubmission.start();\n  }\n\n  stop() {\n    if (this.formSubmission) {\n      this.formSubmission.stop();\n      delete this.formSubmission;\n    }\n\n    if (this.currentVisit) {\n      this.currentVisit.cancel();\n      delete this.currentVisit;\n    }\n  }\n\n  get adapter() {\n    return this.delegate.adapter\n  }\n\n  get view() {\n    return this.delegate.view\n  }\n\n  get rootLocation() {\n    return this.view.snapshot.rootLocation\n  }\n\n  get history() {\n    return this.delegate.history\n  }\n\n  // Form submission delegate\n\n  formSubmissionStarted(formSubmission) {\n    // Not all adapters implement formSubmissionStarted\n    if (typeof this.adapter.formSubmissionStarted === \"function\") {\n      this.adapter.formSubmissionStarted(formSubmission);\n    }\n  }\n\n  async formSubmissionSucceededWithResponse(formSubmission, fetchResponse) {\n    if (formSubmission == this.formSubmission) {\n      const responseHTML = await fetchResponse.responseHTML;\n      if (responseHTML) {\n        const shouldCacheSnapshot = formSubmission.isSafe;\n        if (!shouldCacheSnapshot) {\n          this.view.clearSnapshotCache();\n        }\n\n        const { statusCode, redirected } = fetchResponse;\n        const action = this.#getActionForFormSubmission(formSubmission, fetchResponse);\n        const visitOptions = {\n          action,\n          shouldCacheSnapshot,\n          response: { statusCode, responseHTML, redirected }\n        };\n        this.proposeVisit(fetchResponse.location, visitOptions);\n      }\n    }\n  }\n\n  async formSubmissionFailedWithResponse(formSubmission, fetchResponse) {\n    const responseHTML = await fetchResponse.responseHTML;\n\n    if (responseHTML) {\n      const snapshot = PageSnapshot.fromHTMLString(responseHTML);\n      if (fetchResponse.serverError) {\n        await this.view.renderError(snapshot, this.currentVisit);\n      } else {\n        await this.view.renderPage(snapshot, false, true, this.currentVisit);\n      }\n      if (snapshot.refreshScroll !== \"preserve\") {\n        this.view.scrollToTop();\n      }\n      this.view.clearSnapshotCache();\n    }\n  }\n\n  formSubmissionErrored(formSubmission, error) {\n    console.error(error);\n  }\n\n  formSubmissionFinished(formSubmission) {\n    // Not all adapters implement formSubmissionFinished\n    if (typeof this.adapter.formSubmissionFinished === \"function\") {\n      this.adapter.formSubmissionFinished(formSubmission);\n    }\n  }\n\n  // Link prefetching\n\n  linkPrefetchingIsEnabledForLocation(location) {\n    // Not all adapters implement linkPrefetchingIsEnabledForLocation\n    if (typeof this.adapter.linkPrefetchingIsEnabledForLocation === \"function\") {\n      return this.adapter.linkPrefetchingIsEnabledForLocation(location)\n    }\n\n    return true\n  }\n\n  // Visit delegate\n\n  visitStarted(visit) {\n    this.delegate.visitStarted(visit);\n  }\n\n  visitCompleted(visit) {\n    this.delegate.visitCompleted(visit);\n    delete this.currentVisit;\n  }\n\n  // Same-page links are no longer handled with a Visit.\n  // This method is still needed for Turbo Native adapters.\n  locationWithActionIsSamePage(location, action) {\n    return false\n  }\n\n  // Visits\n\n  get location() {\n    return this.history.location\n  }\n\n  get restorationIdentifier() {\n    return this.history.restorationIdentifier\n  }\n\n  #getActionForFormSubmission(formSubmission, fetchResponse) {\n    const { submitter, formElement } = formSubmission;\n    return getVisitAction(submitter, formElement) || this.#getDefaultAction(fetchResponse)\n  }\n\n  #getDefaultAction(fetchResponse) {\n    const sameLocationRedirect = fetchResponse.redirected && fetchResponse.location.href === this.location?.href;\n    return sameLocationRedirect ? \"replace\" : \"advance\"\n  }\n}\n\nconst PageStage = {\n  initial: 0,\n  loading: 1,\n  interactive: 2,\n  complete: 3\n};\n\nclass PageObserver {\n  stage = PageStage.initial\n  started = false\n\n  constructor(delegate) {\n    this.delegate = delegate;\n  }\n\n  start() {\n    if (!this.started) {\n      if (this.stage == PageStage.initial) {\n        this.stage = PageStage.loading;\n      }\n      document.addEventListener(\"readystatechange\", this.interpretReadyState, false);\n      addEventListener(\"pagehide\", this.pageWillUnload, false);\n      this.started = true;\n    }\n  }\n\n  stop() {\n    if (this.started) {\n      document.removeEventListener(\"readystatechange\", this.interpretReadyState, false);\n      removeEventListener(\"pagehide\", this.pageWillUnload, false);\n      this.started = false;\n    }\n  }\n\n  interpretReadyState = () => {\n    const { readyState } = this;\n    if (readyState == \"interactive\") {\n      this.pageIsInteractive();\n    } else if (readyState == \"complete\") {\n      this.pageIsComplete();\n    }\n  }\n\n  pageIsInteractive() {\n    if (this.stage == PageStage.loading) {\n      this.stage = PageStage.interactive;\n      this.delegate.pageBecameInteractive();\n    }\n  }\n\n  pageIsComplete() {\n    this.pageIsInteractive();\n    if (this.stage == PageStage.interactive) {\n      this.stage = PageStage.complete;\n      this.delegate.pageLoaded();\n    }\n  }\n\n  pageWillUnload = () => {\n    this.delegate.pageWillUnload();\n  }\n\n  get readyState() {\n    return document.readyState\n  }\n}\n\nclass ScrollObserver {\n  started = false\n\n  constructor(delegate) {\n    this.delegate = delegate;\n  }\n\n  start() {\n    if (!this.started) {\n      addEventListener(\"scroll\", this.onScroll, false);\n      this.onScroll();\n      this.started = true;\n    }\n  }\n\n  stop() {\n    if (this.started) {\n      removeEventListener(\"scroll\", this.onScroll, false);\n      this.started = false;\n    }\n  }\n\n  onScroll = () => {\n    this.updatePosition({ x: window.pageXOffset, y: window.pageYOffset });\n  }\n\n  // Private\n\n  updatePosition(position) {\n    this.delegate.scrollPositionChanged(position);\n  }\n}\n\nclass StreamMessageRenderer {\n  render({ fragment }) {\n    Bardo.preservingPermanentElements(this, getPermanentElementMapForFragment(fragment), () => {\n      withAutofocusFromFragment(fragment, () => {\n        withPreservedFocus(() => {\n          document.documentElement.appendChild(fragment);\n        });\n      });\n    });\n  }\n\n  // Bardo delegate\n\n  enteringBardo(currentPermanentElement, newPermanentElement) {\n    newPermanentElement.replaceWith(currentPermanentElement.cloneNode(true));\n  }\n\n  leavingBardo() {}\n}\n\nfunction getPermanentElementMapForFragment(fragment) {\n  const permanentElementsInDocument = queryPermanentElementsAll(document.documentElement);\n  const permanentElementMap = {};\n  for (const permanentElementInDocument of permanentElementsInDocument) {\n    const { id } = permanentElementInDocument;\n\n    for (const streamElement of fragment.querySelectorAll(\"turbo-stream\")) {\n      const elementInStream = getPermanentElementById(streamElement.templateElement.content, id);\n\n      if (elementInStream) {\n        permanentElementMap[id] = [permanentElementInDocument, elementInStream];\n      }\n    }\n  }\n\n  return permanentElementMap\n}\n\nasync function withAutofocusFromFragment(fragment, callback) {\n  const generatedID = `turbo-stream-autofocus-${uuid()}`;\n  const turboStreams = fragment.querySelectorAll(\"turbo-stream\");\n  const elementWithAutofocus = firstAutofocusableElementInStreams(turboStreams);\n  let willAutofocusId = null;\n\n  if (elementWithAutofocus) {\n    if (elementWithAutofocus.id) {\n      willAutofocusId = elementWithAutofocus.id;\n    } else {\n      willAutofocusId = generatedID;\n    }\n\n    elementWithAutofocus.id = willAutofocusId;\n  }\n\n  callback();\n  await nextRepaint();\n\n  const hasNoActiveElement = document.activeElement == null || document.activeElement == document.body;\n\n  if (hasNoActiveElement && willAutofocusId) {\n    const elementToAutofocus = document.getElementById(willAutofocusId);\n\n    if (elementIsFocusable(elementToAutofocus)) {\n      elementToAutofocus.focus();\n    }\n    if (elementToAutofocus && elementToAutofocus.id == generatedID) {\n      elementToAutofocus.removeAttribute(\"id\");\n    }\n  }\n}\n\nasync function withPreservedFocus(callback) {\n  const [activeElementBeforeRender, activeElementAfterRender] = await around(callback, () => document.activeElement);\n\n  const restoreFocusTo = activeElementBeforeRender && activeElementBeforeRender.id;\n\n  if (restoreFocusTo) {\n    const elementToFocus = document.getElementById(restoreFocusTo);\n\n    if (elementIsFocusable(elementToFocus) && elementToFocus != activeElementAfterRender) {\n      elementToFocus.focus();\n    }\n  }\n}\n\nfunction firstAutofocusableElementInStreams(nodeListOfStreamElements) {\n  for (const streamElement of nodeListOfStreamElements) {\n    const elementWithAutofocus = queryAutofocusableElement(streamElement.templateElement.content);\n\n    if (elementWithAutofocus) return elementWithAutofocus\n  }\n\n  return null\n}\n\nclass StreamObserver {\n  sources = new Set()\n  #started = false\n\n  constructor(delegate) {\n    this.delegate = delegate;\n  }\n\n  start() {\n    if (!this.#started) {\n      this.#started = true;\n      addEventListener(\"turbo:before-fetch-response\", this.inspectFetchResponse, false);\n    }\n  }\n\n  stop() {\n    if (this.#started) {\n      this.#started = false;\n      removeEventListener(\"turbo:before-fetch-response\", this.inspectFetchResponse, false);\n    }\n  }\n\n  connectStreamSource(source) {\n    if (!this.streamSourceIsConnected(source)) {\n      this.sources.add(source);\n      source.addEventListener(\"message\", this.receiveMessageEvent, false);\n    }\n  }\n\n  disconnectStreamSource(source) {\n    if (this.streamSourceIsConnected(source)) {\n      this.sources.delete(source);\n      source.removeEventListener(\"message\", this.receiveMessageEvent, false);\n    }\n  }\n\n  streamSourceIsConnected(source) {\n    return this.sources.has(source)\n  }\n\n  inspectFetchResponse = (event) => {\n    const response = fetchResponseFromEvent(event);\n    if (response && fetchResponseIsStream(response)) {\n      event.preventDefault();\n      this.receiveMessageResponse(response);\n    }\n  }\n\n  receiveMessageEvent = (event) => {\n    if (this.#started && typeof event.data == \"string\") {\n      this.receiveMessageHTML(event.data);\n    }\n  }\n\n  async receiveMessageResponse(response) {\n    const html = await response.responseHTML;\n    if (html) {\n      this.receiveMessageHTML(html);\n    }\n  }\n\n  receiveMessageHTML(html) {\n    this.delegate.receivedMessageFromStream(StreamMessage.wrap(html));\n  }\n}\n\nfunction fetchResponseFromEvent(event) {\n  const fetchResponse = event.detail?.fetchResponse;\n  if (fetchResponse instanceof FetchResponse) {\n    return fetchResponse\n  }\n}\n\nfunction fetchResponseIsStream(response) {\n  const contentType = response.contentType ?? \"\";\n  return contentType.startsWith(StreamMessage.contentType)\n}\n\nclass ErrorRenderer extends Renderer {\n  static renderElement(currentElement, newElement) {\n    const { documentElement, body } = document;\n\n    documentElement.replaceChild(newElement, body);\n  }\n\n  async render() {\n    this.replaceHeadAndBody();\n    this.activateScriptElements();\n  }\n\n  replaceHeadAndBody() {\n    const { documentElement, head } = document;\n    documentElement.replaceChild(this.newHead, head);\n    this.renderElement(this.currentElement, this.newElement);\n  }\n\n  activateScriptElements() {\n    for (const replaceableElement of this.scriptElements) {\n      const parentNode = replaceableElement.parentNode;\n      if (parentNode) {\n        const element = activateScriptElement(replaceableElement);\n        parentNode.replaceChild(element, replaceableElement);\n      }\n    }\n  }\n\n  get newHead() {\n    return this.newSnapshot.headSnapshot.element\n  }\n\n  get scriptElements() {\n    return document.documentElement.querySelectorAll(\"script\")\n  }\n}\n\nclass PageRenderer extends Renderer {\n  static renderElement(currentElement, newElement) {\n    if (document.body && newElement instanceof HTMLBodyElement) {\n      document.body.replaceWith(newElement);\n    } else {\n      document.documentElement.appendChild(newElement);\n    }\n  }\n\n  get shouldRender() {\n    return this.newSnapshot.isVisitable && this.trackedElementsAreIdentical\n  }\n\n  get reloadReason() {\n    if (!this.newSnapshot.isVisitable) {\n      return {\n        reason: \"turbo_visit_control_is_reload\"\n      }\n    }\n\n    if (!this.trackedElementsAreIdentical) {\n      return {\n        reason: \"tracked_element_mismatch\"\n      }\n    }\n  }\n\n  async prepareToRender() {\n    this.#setLanguage();\n    await this.mergeHead();\n  }\n\n  async render() {\n    if (this.willRender) {\n      await this.replaceBody();\n    }\n  }\n\n  finishRendering() {\n    super.finishRendering();\n    if (!this.isPreview) {\n      this.focusFirstAutofocusableElement();\n    }\n  }\n\n  get currentHeadSnapshot() {\n    return this.currentSnapshot.headSnapshot\n  }\n\n  get newHeadSnapshot() {\n    return this.newSnapshot.headSnapshot\n  }\n\n  get newElement() {\n    return this.newSnapshot.element\n  }\n\n  #setLanguage() {\n    const { documentElement } = this.currentSnapshot;\n    const { dir, lang } = this.newSnapshot;\n\n    if (lang) {\n      documentElement.setAttribute(\"lang\", lang);\n    } else {\n      documentElement.removeAttribute(\"lang\");\n    }\n    if (dir) {\n      documentElement.setAttribute(\"dir\", dir);\n    } else {\n      documentElement.removeAttribute(\"dir\");\n    }\n  }\n\n  async mergeHead() {\n    const mergedHeadElements = this.mergeProvisionalElements();\n    const newStylesheetElements = this.copyNewHeadStylesheetElements();\n    this.copyNewHeadScriptElements();\n\n    await mergedHeadElements;\n    await newStylesheetElements;\n\n    if (this.willRender) {\n      this.removeUnusedDynamicStylesheetElements();\n    }\n  }\n\n  async replaceBody() {\n    await this.preservingPermanentElements(async () => {\n      this.activateNewBody();\n      await this.assignNewBody();\n    });\n  }\n\n  get trackedElementsAreIdentical() {\n    return this.currentHeadSnapshot.trackedElementSignature == this.newHeadSnapshot.trackedElementSignature\n  }\n\n  async copyNewHeadStylesheetElements() {\n    const loadingElements = [];\n\n    for (const element of this.newHeadStylesheetElements) {\n      loadingElements.push(waitForLoad(element));\n\n      document.head.appendChild(element);\n    }\n\n    await Promise.all(loadingElements);\n  }\n\n  copyNewHeadScriptElements() {\n    for (const element of this.newHeadScriptElements) {\n      document.head.appendChild(activateScriptElement(element));\n    }\n  }\n\n  removeUnusedDynamicStylesheetElements() {\n    for (const element of this.unusedDynamicStylesheetElements) {\n      document.head.removeChild(element);\n    }\n  }\n\n  async mergeProvisionalElements() {\n    const newHeadElements = [...this.newHeadProvisionalElements];\n\n    for (const element of this.currentHeadProvisionalElements) {\n      if (!this.isCurrentElementInElementList(element, newHeadElements)) {\n        document.head.removeChild(element);\n      }\n    }\n\n    for (const element of newHeadElements) {\n      document.head.appendChild(element);\n    }\n  }\n\n  isCurrentElementInElementList(element, elementList) {\n    for (const [index, newElement] of elementList.entries()) {\n      // if title element...\n      if (element.tagName == \"TITLE\") {\n        if (newElement.tagName != \"TITLE\") {\n          continue\n        }\n        if (element.innerHTML == newElement.innerHTML) {\n          elementList.splice(index, 1);\n          return true\n        }\n      }\n\n      // if any other element...\n      if (newElement.isEqualNode(element)) {\n        elementList.splice(index, 1);\n        return true\n      }\n    }\n\n    return false\n  }\n\n  removeCurrentHeadProvisionalElements() {\n    for (const element of this.currentHeadProvisionalElements) {\n      document.head.removeChild(element);\n    }\n  }\n\n  copyNewHeadProvisionalElements() {\n    for (const element of this.newHeadProvisionalElements) {\n      document.head.appendChild(element);\n    }\n  }\n\n  activateNewBody() {\n    document.adoptNode(this.newElement);\n    this.removeNoscriptElements();\n    this.activateNewBodyScriptElements();\n  }\n\n  removeNoscriptElements() {\n    for (const noscriptElement of this.newElement.querySelectorAll(\"noscript\")) {\n      noscriptElement.remove();\n    }\n  }\n\n  activateNewBodyScriptElements() {\n    for (const inertScriptElement of this.newBodyScriptElements) {\n      const activatedScriptElement = activateScriptElement(inertScriptElement);\n      inertScriptElement.replaceWith(activatedScriptElement);\n    }\n  }\n\n  async assignNewBody() {\n    await this.renderElement(this.currentElement, this.newElement);\n  }\n\n  get unusedDynamicStylesheetElements() {\n    return this.oldHeadStylesheetElements.filter((element) => {\n      return element.getAttribute(\"data-turbo-track\") === \"dynamic\"\n    })\n  }\n\n  get oldHeadStylesheetElements() {\n    return this.currentHeadSnapshot.getStylesheetElementsNotInSnapshot(this.newHeadSnapshot)\n  }\n\n  get newHeadStylesheetElements() {\n    return this.newHeadSnapshot.getStylesheetElementsNotInSnapshot(this.currentHeadSnapshot)\n  }\n\n  get newHeadScriptElements() {\n    return this.newHeadSnapshot.getScriptElementsNotInSnapshot(this.currentHeadSnapshot)\n  }\n\n  get currentHeadProvisionalElements() {\n    return this.currentHeadSnapshot.provisionalElements\n  }\n\n  get newHeadProvisionalElements() {\n    return this.newHeadSnapshot.provisionalElements\n  }\n\n  get newBodyScriptElements() {\n    return this.newElement.querySelectorAll(\"script\")\n  }\n}\n\nclass MorphingPageRenderer extends PageRenderer {\n  static renderElement(currentElement, newElement) {\n    morphElements(currentElement, newElement, {\n      callbacks: {\n        beforeNodeMorphed: (node, newNode) => {\n          if (\n            shouldRefreshFrameWithMorphing(node, newNode) &&\n              !closestFrameReloadableWithMorphing(node)\n          ) {\n            node.reload();\n            return false\n          }\n          return true\n        }\n      }\n    });\n\n    dispatch(\"turbo:morph\", { detail: { currentElement, newElement } });\n  }\n\n  async preservingPermanentElements(callback) {\n    return await callback()\n  }\n\n  get renderMethod() {\n    return \"morph\"\n  }\n\n  get shouldAutofocus() {\n    return false\n  }\n}\n\nclass SnapshotCache extends LRUCache {\n  constructor(size) {\n    super(size, toCacheKey);\n  }\n\n  get snapshots() {\n    return this.entries\n  }\n}\n\nclass PageView extends View {\n  snapshotCache = new SnapshotCache(10)\n  lastRenderedLocation = new URL(location.href)\n  forceReloaded = false\n\n  shouldTransitionTo(newSnapshot) {\n    return this.snapshot.prefersViewTransitions && newSnapshot.prefersViewTransitions\n  }\n\n  renderPage(snapshot, isPreview = false, willRender = true, visit) {\n    const shouldMorphPage = this.isPageRefresh(visit) && (visit?.refresh?.method || this.snapshot.refreshMethod) === \"morph\";\n    const rendererClass = shouldMorphPage ? MorphingPageRenderer : PageRenderer;\n\n    const renderer = new rendererClass(this.snapshot, snapshot, isPreview, willRender);\n\n    if (!renderer.shouldRender) {\n      this.forceReloaded = true;\n    } else {\n      visit?.changeHistory();\n    }\n\n    return this.render(renderer)\n  }\n\n  renderError(snapshot, visit) {\n    visit?.changeHistory();\n    const renderer = new ErrorRenderer(this.snapshot, snapshot, false);\n    return this.render(renderer)\n  }\n\n  clearSnapshotCache() {\n    this.snapshotCache.clear();\n  }\n\n  async cacheSnapshot(snapshot = this.snapshot) {\n    if (snapshot.isCacheable) {\n      this.delegate.viewWillCacheSnapshot();\n      const { lastRenderedLocation: location } = this;\n      await nextEventLoopTick();\n      const cachedSnapshot = snapshot.clone();\n      this.snapshotCache.put(location, cachedSnapshot);\n      return cachedSnapshot\n    }\n  }\n\n  getCachedSnapshotForLocation(location) {\n    return this.snapshotCache.get(location)\n  }\n\n  isPageRefresh(visit) {\n    return !visit || (this.lastRenderedLocation.pathname === visit.location.pathname && visit.action === \"replace\")\n  }\n\n  shouldPreserveScrollPosition(visit) {\n    return this.isPageRefresh(visit) && (visit?.refresh?.scroll || this.snapshot.refreshScroll) === \"preserve\"\n  }\n\n  get snapshot() {\n    return PageSnapshot.fromElement(this.element)\n  }\n}\n\nclass Preloader {\n  selector = \"a[data-turbo-preload]\"\n\n  constructor(delegate, snapshotCache) {\n    this.delegate = delegate;\n    this.snapshotCache = snapshotCache;\n  }\n\n  start() {\n    if (document.readyState === \"loading\") {\n      document.addEventListener(\"DOMContentLoaded\", this.#preloadAll);\n    } else {\n      this.preloadOnLoadLinksForView(document.body);\n    }\n  }\n\n  stop() {\n    document.removeEventListener(\"DOMContentLoaded\", this.#preloadAll);\n  }\n\n  preloadOnLoadLinksForView(element) {\n    for (const link of element.querySelectorAll(this.selector)) {\n      if (this.delegate.shouldPreloadLink(link)) {\n        this.preloadURL(link);\n      }\n    }\n  }\n\n  async preloadURL(link) {\n    const location = new URL(link.href);\n\n    if (this.snapshotCache.has(location)) {\n      return\n    }\n\n    const fetchRequest = new FetchRequest(this, FetchMethod.get, location, new URLSearchParams(), link);\n    await fetchRequest.perform();\n  }\n\n  // Fetch request delegate\n\n  prepareRequest(fetchRequest) {\n    fetchRequest.headers[\"X-Sec-Purpose\"] = \"prefetch\";\n  }\n\n  async requestSucceededWithResponse(fetchRequest, fetchResponse) {\n    try {\n      const responseHTML = await fetchResponse.responseHTML;\n      const snapshot = PageSnapshot.fromHTMLString(responseHTML);\n\n      this.snapshotCache.put(fetchRequest.url, snapshot);\n    } catch (_) {\n      // If we cannot preload that is ok!\n    }\n  }\n\n  requestStarted(fetchRequest) {}\n\n  requestErrored(fetchRequest) {}\n\n  requestFinished(fetchRequest) {}\n\n  requestPreventedHandlingResponse(fetchRequest, fetchResponse) {}\n\n  requestFailedWithResponse(fetchRequest, fetchResponse) {}\n\n  #preloadAll = () => {\n    this.preloadOnLoadLinksForView(document.body);\n  }\n}\n\nclass Cache {\n  constructor(session) {\n    this.session = session;\n  }\n\n  clear() {\n    this.session.clearCache();\n  }\n\n  resetCacheControl() {\n    this.#setCacheControl(\"\");\n  }\n\n  exemptPageFromCache() {\n    this.#setCacheControl(\"no-cache\");\n  }\n\n  exemptPageFromPreview() {\n    this.#setCacheControl(\"no-preview\");\n  }\n\n  #setCacheControl(value) {\n    setMetaContent(\"turbo-cache-control\", value);\n  }\n}\n\nclass Session {\n  navigator = new Navigator(this)\n  history = new History(this)\n  view = new PageView(this, document.documentElement)\n  adapter = new BrowserAdapter(this)\n\n  pageObserver = new PageObserver(this)\n  cacheObserver = new CacheObserver()\n  linkPrefetchObserver = new LinkPrefetchObserver(this, document)\n  linkClickObserver = new LinkClickObserver(this, window)\n  formSubmitObserver = new FormSubmitObserver(this, document)\n  scrollObserver = new ScrollObserver(this)\n  streamObserver = new StreamObserver(this)\n  formLinkClickObserver = new FormLinkClickObserver(this, document.documentElement)\n  frameRedirector = new FrameRedirector(this, document.documentElement)\n  streamMessageRenderer = new StreamMessageRenderer()\n  cache = new Cache(this)\n\n  enabled = true\n  started = false\n  #pageRefreshDebouncePeriod = 150\n\n  constructor(recentRequests) {\n    this.recentRequests = recentRequests;\n    this.preloader = new Preloader(this, this.view.snapshotCache);\n    this.debouncedRefresh = this.refresh;\n    this.pageRefreshDebouncePeriod = this.pageRefreshDebouncePeriod;\n  }\n\n  start() {\n    if (!this.started) {\n      this.pageObserver.start();\n      this.cacheObserver.start();\n      this.linkPrefetchObserver.start();\n      this.formLinkClickObserver.start();\n      this.linkClickObserver.start();\n      this.formSubmitObserver.start();\n      this.scrollObserver.start();\n      this.streamObserver.start();\n      this.frameRedirector.start();\n      this.history.start();\n      this.preloader.start();\n      this.started = true;\n      this.enabled = true;\n    }\n  }\n\n  disable() {\n    this.enabled = false;\n  }\n\n  stop() {\n    if (this.started) {\n      this.pageObserver.stop();\n      this.cacheObserver.stop();\n      this.linkPrefetchObserver.stop();\n      this.formLinkClickObserver.stop();\n      this.linkClickObserver.stop();\n      this.formSubmitObserver.stop();\n      this.scrollObserver.stop();\n      this.streamObserver.stop();\n      this.frameRedirector.stop();\n      this.history.stop();\n      this.preloader.stop();\n      this.started = false;\n    }\n  }\n\n  registerAdapter(adapter) {\n    this.adapter = adapter;\n  }\n\n  visit(location, options = {}) {\n    const frameElement = options.frame ? document.getElementById(options.frame) : null;\n\n    if (frameElement instanceof FrameElement) {\n      const action = options.action || getVisitAction(frameElement);\n\n      frameElement.delegate.proposeVisitIfNavigatedWithAction(frameElement, action);\n      frameElement.src = location.toString();\n    } else {\n      this.navigator.proposeVisit(expandURL(location), options);\n    }\n  }\n\n  refresh(url, options = {}) {\n    options = typeof options === \"string\" ? { requestId: options } : options;\n\n    const { method, requestId, scroll } = options;\n    const isRecentRequest = requestId && this.recentRequests.has(requestId);\n    const isCurrentUrl = url === document.baseURI;\n    if (!isRecentRequest && !this.navigator.currentVisit && isCurrentUrl) {\n      this.visit(url, { action: \"replace\", shouldCacheSnapshot: false, refresh: { method, scroll } });\n    }\n  }\n\n  connectStreamSource(source) {\n    this.streamObserver.connectStreamSource(source);\n  }\n\n  disconnectStreamSource(source) {\n    this.streamObserver.disconnectStreamSource(source);\n  }\n\n  renderStreamMessage(message) {\n    this.streamMessageRenderer.render(StreamMessage.wrap(message));\n  }\n\n  clearCache() {\n    this.view.clearSnapshotCache();\n  }\n\n  setProgressBarDelay(delay) {\n    console.warn(\n      \"Please replace `session.setProgressBarDelay(delay)` with `session.progressBarDelay = delay`. The function is deprecated and will be removed in a future version of Turbo.`\"\n    );\n\n    this.progressBarDelay = delay;\n  }\n\n  set progressBarDelay(delay) {\n    config.drive.progressBarDelay = delay;\n  }\n\n  get progressBarDelay() {\n    return config.drive.progressBarDelay\n  }\n\n  set drive(value) {\n    config.drive.enabled = value;\n  }\n\n  get drive() {\n    return config.drive.enabled\n  }\n\n  set formMode(value) {\n    config.forms.mode = value;\n  }\n\n  get formMode() {\n    return config.forms.mode\n  }\n\n  get location() {\n    return this.history.location\n  }\n\n  get restorationIdentifier() {\n    return this.history.restorationIdentifier\n  }\n\n  get pageRefreshDebouncePeriod() {\n    return this.#pageRefreshDebouncePeriod\n  }\n\n  set pageRefreshDebouncePeriod(value) {\n    this.refresh = debounce(this.debouncedRefresh.bind(this), value);\n    this.#pageRefreshDebouncePeriod = value;\n  }\n\n  // Preloader delegate\n\n  shouldPreloadLink(element) {\n    const isUnsafe = element.hasAttribute(\"data-turbo-method\");\n    const isStream = element.hasAttribute(\"data-turbo-stream\");\n    const frameTarget = element.getAttribute(\"data-turbo-frame\");\n    const frame = frameTarget == \"_top\" ?\n      null :\n      document.getElementById(frameTarget) || findClosestRecursively(element, \"turbo-frame:not([disabled])\");\n\n    if (isUnsafe || isStream || frame instanceof FrameElement) {\n      return false\n    } else {\n      const location = new URL(element.href);\n\n      return this.elementIsNavigatable(element) && locationIsVisitable(location, this.snapshot.rootLocation)\n    }\n  }\n\n  // History delegate\n\n  historyPoppedToLocationWithRestorationIdentifierAndDirection(location, restorationIdentifier, direction) {\n    if (this.enabled) {\n      this.navigator.startVisit(location, restorationIdentifier, {\n        action: \"restore\",\n        historyChanged: true,\n        direction\n      });\n    } else {\n      this.adapter.pageInvalidated({\n        reason: \"turbo_disabled\"\n      });\n    }\n  }\n\n  historyPoppedWithEmptyState(location) {\n    this.history.replace(location);\n    this.view.lastRenderedLocation = location;\n    this.view.cacheSnapshot();\n  }\n\n  // Scroll observer delegate\n\n  scrollPositionChanged(position) {\n    this.history.updateRestorationData({ scrollPosition: position });\n  }\n\n  // Form click observer delegate\n\n  willSubmitFormLinkToLocation(link, location) {\n    return this.elementIsNavigatable(link) && locationIsVisitable(location, this.snapshot.rootLocation)\n  }\n\n  submittedFormLinkToLocation() {}\n\n  // Link hover observer delegate\n\n  canPrefetchRequestToLocation(link, location) {\n    return (\n      this.elementIsNavigatable(link) &&\n      locationIsVisitable(location, this.snapshot.rootLocation) &&\n      this.navigator.linkPrefetchingIsEnabledForLocation(location)\n    )\n  }\n\n  // Link click observer delegate\n\n  willFollowLinkToLocation(link, location, event) {\n    return (\n      this.elementIsNavigatable(link) &&\n      locationIsVisitable(location, this.snapshot.rootLocation) &&\n      this.applicationAllowsFollowingLinkToLocation(link, location, event)\n    )\n  }\n\n  followedLinkToLocation(link, location) {\n    const action = this.getActionForLink(link);\n    const acceptsStreamResponse = link.hasAttribute(\"data-turbo-stream\");\n\n    this.visit(location.href, { action, acceptsStreamResponse });\n  }\n\n  // Navigator delegate\n\n  allowsVisitingLocationWithAction(location, action) {\n    return this.applicationAllowsVisitingLocation(location)\n  }\n\n  visitProposedToLocation(location, options) {\n    extendURLWithDeprecatedProperties(location);\n    this.adapter.visitProposedToLocation(location, options);\n  }\n\n  // Visit delegate\n\n  visitStarted(visit) {\n    if (!visit.acceptsStreamResponse) {\n      markAsBusy(document.documentElement);\n      this.view.markVisitDirection(visit.direction);\n    }\n    extendURLWithDeprecatedProperties(visit.location);\n    this.notifyApplicationAfterVisitingLocation(visit.location, visit.action);\n  }\n\n  visitCompleted(visit) {\n    this.view.unmarkVisitDirection();\n    clearBusyState(document.documentElement);\n    this.notifyApplicationAfterPageLoad(visit.getTimingMetrics());\n  }\n\n  // Form submit observer delegate\n\n  willSubmitForm(form, submitter) {\n    const action = getAction$1(form, submitter);\n\n    return (\n      this.submissionIsNavigatable(form, submitter) &&\n      locationIsVisitable(expandURL(action), this.snapshot.rootLocation)\n    )\n  }\n\n  formSubmitted(form, submitter) {\n    this.navigator.submitForm(form, submitter);\n  }\n\n  // Page observer delegate\n\n  pageBecameInteractive() {\n    this.view.lastRenderedLocation = this.location;\n    this.notifyApplicationAfterPageLoad();\n  }\n\n  pageLoaded() {\n    this.history.assumeControlOfScrollRestoration();\n  }\n\n  pageWillUnload() {\n    this.history.relinquishControlOfScrollRestoration();\n  }\n\n  // Stream observer delegate\n\n  receivedMessageFromStream(message) {\n    this.renderStreamMessage(message);\n  }\n\n  // Page view delegate\n\n  viewWillCacheSnapshot() {\n    this.notifyApplicationBeforeCachingSnapshot();\n  }\n\n  allowsImmediateRender({ element }, options) {\n    const event = this.notifyApplicationBeforeRender(element, options);\n    const {\n      defaultPrevented,\n      detail: { render }\n    } = event;\n\n    if (this.view.renderer && render) {\n      this.view.renderer.renderElement = render;\n    }\n\n    return !defaultPrevented\n  }\n\n  viewRenderedSnapshot(_snapshot, _isPreview, renderMethod) {\n    this.view.lastRenderedLocation = this.history.location;\n    this.notifyApplicationAfterRender(renderMethod);\n  }\n\n  preloadOnLoadLinksForView(element) {\n    this.preloader.preloadOnLoadLinksForView(element);\n  }\n\n  viewInvalidated(reason) {\n    this.adapter.pageInvalidated(reason);\n  }\n\n  // Frame element\n\n  frameLoaded(frame) {\n    this.notifyApplicationAfterFrameLoad(frame);\n  }\n\n  frameRendered(fetchResponse, frame) {\n    this.notifyApplicationAfterFrameRender(fetchResponse, frame);\n  }\n\n  // Application events\n\n  applicationAllowsFollowingLinkToLocation(link, location, ev) {\n    const event = this.notifyApplicationAfterClickingLinkToLocation(link, location, ev);\n    return !event.defaultPrevented\n  }\n\n  applicationAllowsVisitingLocation(location) {\n    const event = this.notifyApplicationBeforeVisitingLocation(location);\n    return !event.defaultPrevented\n  }\n\n  notifyApplicationAfterClickingLinkToLocation(link, location, event) {\n    return dispatch(\"turbo:click\", {\n      target: link,\n      detail: { url: location.href, originalEvent: event },\n      cancelable: true\n    })\n  }\n\n  notifyApplicationBeforeVisitingLocation(location) {\n    return dispatch(\"turbo:before-visit\", {\n      detail: { url: location.href },\n      cancelable: true\n    })\n  }\n\n  notifyApplicationAfterVisitingLocation(location, action) {\n    return dispatch(\"turbo:visit\", { detail: { url: location.href, action } })\n  }\n\n  notifyApplicationBeforeCachingSnapshot() {\n    return dispatch(\"turbo:before-cache\")\n  }\n\n  notifyApplicationBeforeRender(newBody, options) {\n    return dispatch(\"turbo:before-render\", {\n      detail: { newBody, ...options },\n      cancelable: true\n    })\n  }\n\n  notifyApplicationAfterRender(renderMethod) {\n    return dispatch(\"turbo:render\", { detail: { renderMethod } })\n  }\n\n  notifyApplicationAfterPageLoad(timing = {}) {\n    return dispatch(\"turbo:load\", {\n      detail: { url: this.location.href, timing }\n    })\n  }\n\n  notifyApplicationAfterFrameLoad(frame) {\n    return dispatch(\"turbo:frame-load\", { target: frame })\n  }\n\n  notifyApplicationAfterFrameRender(fetchResponse, frame) {\n    return dispatch(\"turbo:frame-render\", {\n      detail: { fetchResponse },\n      target: frame,\n      cancelable: true\n    })\n  }\n\n  // Helpers\n\n  submissionIsNavigatable(form, submitter) {\n    if (config.forms.mode == \"off\") {\n      return false\n    } else {\n      const submitterIsNavigatable = submitter ? this.elementIsNavigatable(submitter) : true;\n\n      if (config.forms.mode == \"optin\") {\n        return submitterIsNavigatable && form.closest('[data-turbo=\"true\"]') != null\n      } else {\n        return submitterIsNavigatable && this.elementIsNavigatable(form)\n      }\n    }\n  }\n\n  elementIsNavigatable(element) {\n    const container = findClosestRecursively(element, \"[data-turbo]\");\n    const withinFrame = findClosestRecursively(element, \"turbo-frame\");\n\n    // Check if Drive is enabled on the session or we're within a Frame.\n    if (config.drive.enabled || withinFrame) {\n      // Element is navigatable by default, unless `data-turbo=\"false\"`.\n      if (container) {\n        return container.getAttribute(\"data-turbo\") != \"false\"\n      } else {\n        return true\n      }\n    } else {\n      // Element isn't navigatable by default, unless `data-turbo=\"true\"`.\n      if (container) {\n        return container.getAttribute(\"data-turbo\") == \"true\"\n      } else {\n        return false\n      }\n    }\n  }\n\n  // Private\n\n  getActionForLink(link) {\n    return getVisitAction(link) || \"advance\"\n  }\n\n  get snapshot() {\n    return this.view.snapshot\n  }\n}\n\n// Older versions of the Turbo Native adapters referenced the\n// `Location#absoluteURL` property in their implementations of\n// the `Adapter#visitProposedToLocation()` and `#visitStarted()`\n// methods. The Location class has since been removed in favor\n// of the DOM URL API, and accordingly all Adapter methods now\n// receive URL objects.\n//\n// We alias #absoluteURL to #toString() here to avoid crashing\n// older adapters which do not expect URL objects. We should\n// consider removing this support at some point in the future.\n\nfunction extendURLWithDeprecatedProperties(url) {\n  Object.defineProperties(url, deprecatedLocationPropertyDescriptors);\n}\n\nconst deprecatedLocationPropertyDescriptors = {\n  absoluteURL: {\n    get() {\n      return this.toString()\n    }\n  }\n};\n\nconst session = new Session(recentRequests);\n\n// Rename `navigator` to avoid shadowing `window.navigator`\nconst { cache, navigator: sessionNavigator } = session;\n\n/**\n * Starts the main session.\n * This initialises any necessary observers such as those to monitor\n * link interactions.\n */\nfunction start() {\n  session.start();\n}\n\n/**\n * Registers an adapter for the main session.\n *\n * @param adapter Adapter to register\n */\nfunction registerAdapter(adapter) {\n  session.registerAdapter(adapter);\n}\n\n/**\n * Performs an application visit to the given location.\n *\n * @param location Location to visit (a URL or path)\n * @param options Options to apply\n * @param options.action Type of history navigation to apply (\"restore\",\n * \"replace\" or \"advance\")\n * @param options.historyChanged Specifies whether the browser history has\n * already been changed for this visit or not\n * @param options.referrer Specifies the referrer of this visit such that\n * navigations to the same page will not result in a new history entry.\n * @param options.snapshotHTML Cached snapshot to render\n * @param options.response Response of the specified location\n */\nfunction visit(location, options) {\n  session.visit(location, options);\n}\n\n/**\n * Connects a stream source to the main session.\n *\n * @param source Stream source to connect\n */\nfunction connectStreamSource(source) {\n  session.connectStreamSource(source);\n}\n\n/**\n * Disconnects a stream source from the main session.\n *\n * @param source Stream source to disconnect\n */\nfunction disconnectStreamSource(source) {\n  session.disconnectStreamSource(source);\n}\n\n/**\n * Renders a stream message to the main session by appending it to the\n * current document.\n *\n * @param message Message to render\n */\nfunction renderStreamMessage(message) {\n  session.renderStreamMessage(message);\n}\n\n/**\n * Sets the delay after which the progress bar will appear during navigation.\n *\n * The progress bar appears after 500ms by default.\n *\n * Note that this method has no effect when used with the iOS or Android\n * adapters.\n *\n * @param delay Time to delay in milliseconds\n */\nfunction setProgressBarDelay(delay) {\n  console.warn(\n    \"Please replace `Turbo.setProgressBarDelay(delay)` with `Turbo.config.drive.progressBarDelay = delay`. The top-level function is deprecated and will be removed in a future version of Turbo.`\"\n  );\n  config.drive.progressBarDelay = delay;\n}\n\nfunction setConfirmMethod(confirmMethod) {\n  console.warn(\n    \"Please replace `Turbo.setConfirmMethod(confirmMethod)` with `Turbo.config.forms.confirm = confirmMethod`. The top-level function is deprecated and will be removed in a future version of Turbo.`\"\n  );\n  config.forms.confirm = confirmMethod;\n}\n\nfunction setFormMode(mode) {\n  console.warn(\n    \"Please replace `Turbo.setFormMode(mode)` with `Turbo.config.forms.mode = mode`. The top-level function is deprecated and will be removed in a future version of Turbo.`\"\n  );\n  config.forms.mode = mode;\n}\n\n/**\n * Morph the state of the currentBody based on the attributes and contents of\n * the newBody. Morphing body elements may dispatch turbo:morph,\n * turbo:before-morph-element, turbo:before-morph-attribute, and\n * turbo:morph-element events.\n *\n * @param currentBody HTMLBodyElement destination of morphing changes\n * @param newBody HTMLBodyElement source of morphing changes\n */\nfunction morphBodyElements(currentBody, newBody) {\n  MorphingPageRenderer.renderElement(currentBody, newBody);\n}\n\n/**\n * Morph the child elements of the currentFrame based on the child elements of\n * the newFrame. Morphing turbo-frame elements may dispatch turbo:before-frame-morph,\n * turbo:before-morph-element, turbo:before-morph-attribute, and\n * turbo:morph-element events.\n *\n * @param currentFrame FrameElement destination of morphing children changes\n * @param newFrame FrameElement source of morphing children changes\n */\nfunction morphTurboFrameElements(currentFrame, newFrame) {\n  MorphingFrameRenderer.renderElement(currentFrame, newFrame);\n}\n\nvar Turbo = /*#__PURE__*/Object.freeze({\n  __proto__: null,\n  PageRenderer: PageRenderer,\n  PageSnapshot: PageSnapshot,\n  FrameRenderer: FrameRenderer,\n  fetch: fetchWithTurboHeaders,\n  config: config,\n  session: session,\n  cache: cache,\n  navigator: sessionNavigator,\n  start: start,\n  registerAdapter: registerAdapter,\n  visit: visit,\n  connectStreamSource: connectStreamSource,\n  disconnectStreamSource: disconnectStreamSource,\n  renderStreamMessage: renderStreamMessage,\n  setProgressBarDelay: setProgressBarDelay,\n  setConfirmMethod: setConfirmMethod,\n  setFormMode: setFormMode,\n  morphBodyElements: morphBodyElements,\n  morphTurboFrameElements: morphTurboFrameElements,\n  morphChildren: morphChildren,\n  morphElements: morphElements\n});\n\nclass TurboFrameMissingError extends Error {}\n\nclass FrameController {\n  fetchResponseLoaded = (_fetchResponse) => Promise.resolve()\n  #currentFetchRequest = null\n  #resolveVisitPromise = () => {}\n  #connected = false\n  #hasBeenLoaded = false\n  #ignoredAttributes = new Set()\n  #shouldMorphFrame = false\n  action = null\n\n  constructor(element) {\n    this.element = element;\n    this.view = new FrameView(this, this.element);\n    this.appearanceObserver = new AppearanceObserver(this, this.element);\n    this.formLinkClickObserver = new FormLinkClickObserver(this, this.element);\n    this.linkInterceptor = new LinkInterceptor(this, this.element);\n    this.restorationIdentifier = uuid();\n    this.formSubmitObserver = new FormSubmitObserver(this, this.element);\n  }\n\n  // Frame delegate\n\n  connect() {\n    if (!this.#connected) {\n      this.#connected = true;\n      if (this.loadingStyle == FrameLoadingStyle.lazy) {\n        this.appearanceObserver.start();\n      } else {\n        this.#loadSourceURL();\n      }\n      this.formLinkClickObserver.start();\n      this.linkInterceptor.start();\n      this.formSubmitObserver.start();\n    }\n  }\n\n  disconnect() {\n    if (this.#connected) {\n      this.#connected = false;\n      this.appearanceObserver.stop();\n      this.formLinkClickObserver.stop();\n      this.linkInterceptor.stop();\n      this.formSubmitObserver.stop();\n\n      if (!this.element.hasAttribute(\"recurse\")) {\n        this.#currentFetchRequest?.cancel();\n      }\n    }\n  }\n\n  disabledChanged() {\n    if (this.disabled) {\n      this.#currentFetchRequest?.cancel();\n    } else if (this.loadingStyle == FrameLoadingStyle.eager) {\n      this.#loadSourceURL();\n    }\n  }\n\n  sourceURLChanged() {\n    if (this.#isIgnoringChangesTo(\"src\")) return\n\n    if (!this.sourceURL) {\n      this.#currentFetchRequest?.cancel();\n    }\n\n    if (this.element.isConnected) {\n      this.complete = false;\n    }\n\n    if (this.loadingStyle == FrameLoadingStyle.eager || this.#hasBeenLoaded) {\n      this.#loadSourceURL();\n    }\n  }\n\n  sourceURLReloaded() {\n    const { refresh, src } = this.element;\n\n    this.#shouldMorphFrame = src && refresh === \"morph\";\n\n    this.element.removeAttribute(\"complete\");\n    this.element.src = null;\n    this.element.src = src;\n    return this.element.loaded\n  }\n\n  loadingStyleChanged() {\n    if (this.loadingStyle == FrameLoadingStyle.lazy) {\n      this.appearanceObserver.start();\n    } else {\n      this.appearanceObserver.stop();\n      this.#loadSourceURL();\n    }\n  }\n\n  async #loadSourceURL() {\n    if (this.enabled && this.isActive && !this.complete && this.sourceURL) {\n      this.element.loaded = this.#visit(expandURL(this.sourceURL));\n      this.appearanceObserver.stop();\n      await this.element.loaded;\n      this.#hasBeenLoaded = true;\n    }\n  }\n\n  async loadResponse(fetchResponse) {\n    if (fetchResponse.redirected || (fetchResponse.succeeded && fetchResponse.isHTML)) {\n      this.sourceURL = fetchResponse.response.url;\n    }\n\n    try {\n      const html = await fetchResponse.responseHTML;\n      if (html) {\n        const document = parseHTMLDocument(html);\n        const pageSnapshot = PageSnapshot.fromDocument(document);\n\n        if (pageSnapshot.isVisitable) {\n          await this.#loadFrameResponse(fetchResponse, document);\n        } else {\n          await this.#handleUnvisitableFrameResponse(fetchResponse);\n        }\n      }\n    } finally {\n      this.#shouldMorphFrame = false;\n      this.fetchResponseLoaded = () => Promise.resolve();\n    }\n  }\n\n  // Appearance observer delegate\n\n  elementAppearedInViewport(element) {\n    this.proposeVisitIfNavigatedWithAction(element, getVisitAction(element));\n    this.#loadSourceURL();\n  }\n\n  // Form link click observer delegate\n\n  willSubmitFormLinkToLocation(link) {\n    return this.#shouldInterceptNavigation(link)\n  }\n\n  submittedFormLinkToLocation(link, _location, form) {\n    const frame = this.#findFrameElement(link);\n    if (frame) form.setAttribute(\"data-turbo-frame\", frame.id);\n  }\n\n  // Link interceptor delegate\n\n  shouldInterceptLinkClick(element, _location, _event) {\n    return this.#shouldInterceptNavigation(element)\n  }\n\n  linkClickIntercepted(element, location) {\n    this.#navigateFrame(element, location);\n  }\n\n  // Form submit observer delegate\n\n  willSubmitForm(element, submitter) {\n    return element.closest(\"turbo-frame\") == this.element && this.#shouldInterceptNavigation(element, submitter)\n  }\n\n  formSubmitted(element, submitter) {\n    if (this.formSubmission) {\n      this.formSubmission.stop();\n    }\n\n    this.formSubmission = new FormSubmission(this, element, submitter);\n\n    const { fetchRequest } = this.formSubmission;\n    const frame = this.#findFrameElement(element, submitter);\n\n    this.prepareRequest(fetchRequest, frame);\n    this.formSubmission.start();\n  }\n\n  // Fetch request delegate\n\n  prepareRequest(request, frame = this) {\n    request.headers[\"Turbo-Frame\"] = frame.id;\n\n    if (this.currentNavigationElement?.hasAttribute(\"data-turbo-stream\")) {\n      request.acceptResponseType(StreamMessage.contentType);\n    }\n  }\n\n  requestStarted(_request) {\n    markAsBusy(this.element);\n  }\n\n  requestPreventedHandlingResponse(_request, _response) {\n    this.#resolveVisitPromise();\n  }\n\n  async requestSucceededWithResponse(request, response) {\n    await this.loadResponse(response);\n    this.#resolveVisitPromise();\n  }\n\n  async requestFailedWithResponse(request, response) {\n    await this.loadResponse(response);\n    this.#resolveVisitPromise();\n  }\n\n  requestErrored(request, error) {\n    console.error(error);\n    this.#resolveVisitPromise();\n  }\n\n  requestFinished(_request) {\n    clearBusyState(this.element);\n  }\n\n  // Form submission delegate\n\n  formSubmissionStarted({ formElement }) {\n    markAsBusy(formElement, this.#findFrameElement(formElement));\n  }\n\n  formSubmissionSucceededWithResponse(formSubmission, response) {\n    const frame = this.#findFrameElement(formSubmission.formElement, formSubmission.submitter);\n\n    frame.delegate.proposeVisitIfNavigatedWithAction(frame, getVisitAction(formSubmission.submitter, formSubmission.formElement, frame));\n    frame.delegate.loadResponse(response);\n\n    if (!formSubmission.isSafe) {\n      session.clearCache();\n    }\n  }\n\n  formSubmissionFailedWithResponse(formSubmission, fetchResponse) {\n    this.element.delegate.loadResponse(fetchResponse);\n    session.clearCache();\n  }\n\n  formSubmissionErrored(formSubmission, error) {\n    console.error(error);\n  }\n\n  formSubmissionFinished({ formElement }) {\n    clearBusyState(formElement, this.#findFrameElement(formElement));\n  }\n\n  // View delegate\n\n  allowsImmediateRender({ element: newFrame }, options) {\n    const event = dispatch(\"turbo:before-frame-render\", {\n      target: this.element,\n      detail: { newFrame, ...options },\n      cancelable: true\n    });\n\n    const {\n      defaultPrevented,\n      detail: { render }\n    } = event;\n\n    if (this.view.renderer && render) {\n      this.view.renderer.renderElement = render;\n    }\n\n    return !defaultPrevented\n  }\n\n  viewRenderedSnapshot(_snapshot, _isPreview, _renderMethod) {}\n\n  preloadOnLoadLinksForView(element) {\n    session.preloadOnLoadLinksForView(element);\n  }\n\n  viewInvalidated() {}\n\n  // Frame renderer delegate\n\n  willRenderFrame(currentElement, _newElement) {\n    this.previousFrameElement = currentElement.cloneNode(true);\n  }\n\n  visitCachedSnapshot = ({ element }) => {\n    const frame = element.querySelector(\"#\" + this.element.id);\n\n    if (frame && this.previousFrameElement) {\n      frame.replaceChildren(...this.previousFrameElement.children);\n    }\n\n    delete this.previousFrameElement;\n  }\n\n  // Private\n\n  async #loadFrameResponse(fetchResponse, document) {\n    const newFrameElement = await this.extractForeignFrameElement(document.body);\n    const rendererClass = this.#shouldMorphFrame ? MorphingFrameRenderer : FrameRenderer;\n\n    if (newFrameElement) {\n      const snapshot = new Snapshot(newFrameElement);\n      const renderer = new rendererClass(this, this.view.snapshot, snapshot, false, false);\n      if (this.view.renderPromise) await this.view.renderPromise;\n      this.changeHistory();\n\n      await this.view.render(renderer);\n      this.complete = true;\n      session.frameRendered(fetchResponse, this.element);\n      session.frameLoaded(this.element);\n      await this.fetchResponseLoaded(fetchResponse);\n    } else if (this.#willHandleFrameMissingFromResponse(fetchResponse)) {\n      this.#handleFrameMissingFromResponse(fetchResponse);\n    }\n  }\n\n  async #visit(url) {\n    const request = new FetchRequest(this, FetchMethod.get, url, new URLSearchParams(), this.element);\n\n    this.#currentFetchRequest?.cancel();\n    this.#currentFetchRequest = request;\n\n    return new Promise((resolve) => {\n      this.#resolveVisitPromise = () => {\n        this.#resolveVisitPromise = () => {};\n        this.#currentFetchRequest = null;\n        resolve();\n      };\n      request.perform();\n    })\n  }\n\n  #navigateFrame(element, url, submitter) {\n    const frame = this.#findFrameElement(element, submitter);\n\n    frame.delegate.proposeVisitIfNavigatedWithAction(frame, getVisitAction(submitter, element, frame));\n\n    this.#withCurrentNavigationElement(element, () => {\n      frame.src = url;\n    });\n  }\n\n  proposeVisitIfNavigatedWithAction(frame, action = null) {\n    this.action = action;\n\n    if (this.action) {\n      const pageSnapshot = PageSnapshot.fromElement(frame).clone();\n      const { visitCachedSnapshot } = frame.delegate;\n\n      frame.delegate.fetchResponseLoaded = async (fetchResponse) => {\n        if (frame.src) {\n          const { statusCode, redirected } = fetchResponse;\n          const responseHTML = await fetchResponse.responseHTML;\n          const response = { statusCode, redirected, responseHTML };\n          const options = {\n            response,\n            visitCachedSnapshot,\n            willRender: false,\n            updateHistory: false,\n            restorationIdentifier: this.restorationIdentifier,\n            snapshot: pageSnapshot\n          };\n\n          if (this.action) options.action = this.action;\n\n          session.visit(frame.src, options);\n        }\n      };\n    }\n  }\n\n  changeHistory() {\n    if (this.action) {\n      const method = getHistoryMethodForAction(this.action);\n      session.history.update(method, expandURL(this.element.src || \"\"), this.restorationIdentifier);\n    }\n  }\n\n  async #handleUnvisitableFrameResponse(fetchResponse) {\n    console.warn(\n      `The response (${fetchResponse.statusCode}) from <turbo-frame id=\"${this.element.id}\"> is performing a full page visit due to turbo-visit-control.`\n    );\n\n    await this.#visitResponse(fetchResponse.response);\n  }\n\n  #willHandleFrameMissingFromResponse(fetchResponse) {\n    this.element.setAttribute(\"complete\", \"\");\n\n    const response = fetchResponse.response;\n    const visit = async (url, options) => {\n      if (url instanceof Response) {\n        this.#visitResponse(url);\n      } else {\n        session.visit(url, options);\n      }\n    };\n\n    const event = dispatch(\"turbo:frame-missing\", {\n      target: this.element,\n      detail: { response, visit },\n      cancelable: true\n    });\n\n    return !event.defaultPrevented\n  }\n\n  #handleFrameMissingFromResponse(fetchResponse) {\n    this.view.missing();\n    this.#throwFrameMissingError(fetchResponse);\n  }\n\n  #throwFrameMissingError(fetchResponse) {\n    const message = `The response (${fetchResponse.statusCode}) did not contain the expected <turbo-frame id=\"${this.element.id}\"> and will be ignored. To perform a full page visit instead, set turbo-visit-control to reload.`;\n    throw new TurboFrameMissingError(message)\n  }\n\n  async #visitResponse(response) {\n    const wrapped = new FetchResponse(response);\n    const responseHTML = await wrapped.responseHTML;\n    const { location, redirected, statusCode } = wrapped;\n\n    return session.visit(location, { response: { redirected, statusCode, responseHTML } })\n  }\n\n  #findFrameElement(element, submitter) {\n    const id = getAttribute(\"data-turbo-frame\", submitter, element) || this.element.getAttribute(\"target\");\n    const target = this.#getFrameElementById(id);\n\n    return target instanceof FrameElement ? target : this.element\n  }\n\n  async extractForeignFrameElement(container) {\n    let element;\n    const id = CSS.escape(this.id);\n\n    try {\n      element = activateElement(container.querySelector(`turbo-frame#${id}`), this.sourceURL);\n      if (element) {\n        return element\n      }\n\n      element = activateElement(container.querySelector(`turbo-frame[src][recurse~=${id}]`), this.sourceURL);\n      if (element) {\n        await element.loaded;\n        return await this.extractForeignFrameElement(element)\n      }\n    } catch (error) {\n      console.error(error);\n      return new FrameElement()\n    }\n\n    return null\n  }\n\n  #formActionIsVisitable(form, submitter) {\n    const action = getAction$1(form, submitter);\n\n    return locationIsVisitable(expandURL(action), this.rootLocation)\n  }\n\n  #shouldInterceptNavigation(element, submitter) {\n    const id = getAttribute(\"data-turbo-frame\", submitter, element) || this.element.getAttribute(\"target\");\n\n    if (element instanceof HTMLFormElement && !this.#formActionIsVisitable(element, submitter)) {\n      return false\n    }\n\n    if (!this.enabled || id == \"_top\") {\n      return false\n    }\n\n    if (id) {\n      const frameElement = this.#getFrameElementById(id);\n      if (frameElement) {\n        return !frameElement.disabled\n      } else if (id == \"_parent\") {\n        return false\n      }\n    }\n\n    if (!session.elementIsNavigatable(element)) {\n      return false\n    }\n\n    if (submitter && !session.elementIsNavigatable(submitter)) {\n      return false\n    }\n\n    return true\n  }\n\n  // Computed properties\n\n  get id() {\n    return this.element.id\n  }\n\n  get disabled() {\n    return this.element.disabled\n  }\n\n  get enabled() {\n    return !this.disabled\n  }\n\n  get sourceURL() {\n    if (this.element.src) {\n      return this.element.src\n    }\n  }\n\n  set sourceURL(sourceURL) {\n    this.#ignoringChangesToAttribute(\"src\", () => {\n      this.element.src = sourceURL ?? null;\n    });\n  }\n\n  get loadingStyle() {\n    return this.element.loading\n  }\n\n  get isLoading() {\n    return this.formSubmission !== undefined || this.#resolveVisitPromise() !== undefined\n  }\n\n  get complete() {\n    return this.element.hasAttribute(\"complete\")\n  }\n\n  set complete(value) {\n    if (value) {\n      this.element.setAttribute(\"complete\", \"\");\n    } else {\n      this.element.removeAttribute(\"complete\");\n    }\n  }\n\n  get isActive() {\n    return this.element.isActive && this.#connected\n  }\n\n  get rootLocation() {\n    const meta = this.element.ownerDocument.querySelector(`meta[name=\"turbo-root\"]`);\n    const root = meta?.content ?? \"/\";\n    return expandURL(root)\n  }\n\n  #isIgnoringChangesTo(attributeName) {\n    return this.#ignoredAttributes.has(attributeName)\n  }\n\n  #ignoringChangesToAttribute(attributeName, callback) {\n    this.#ignoredAttributes.add(attributeName);\n    callback();\n    this.#ignoredAttributes.delete(attributeName);\n  }\n\n  #withCurrentNavigationElement(element, callback) {\n    this.currentNavigationElement = element;\n    callback();\n    delete this.currentNavigationElement;\n  }\n\n  #getFrameElementById(id) {\n    if (id != null) {\n      const element = id === \"_parent\" ?\n        this.element.parentElement.closest(\"turbo-frame\") :\n        document.getElementById(id);\n      if (element instanceof FrameElement) {\n        return element\n      }\n    }\n  }\n}\n\nfunction activateElement(element, currentURL) {\n  if (element) {\n    const src = element.getAttribute(\"src\");\n    if (src != null && currentURL != null && urlsAreEqual(src, currentURL)) {\n      throw new Error(`Matching <turbo-frame id=\"${element.id}\"> element has a source URL which references itself`)\n    }\n    if (element.ownerDocument !== document) {\n      element = document.importNode(element, true);\n    }\n\n    if (element instanceof FrameElement) {\n      element.connectedCallback();\n      element.disconnectedCallback();\n      return element\n    }\n  }\n}\n\nconst StreamActions = {\n  after() {\n    this.removeDuplicateTargetSiblings();\n    this.targetElements.forEach((e) => e.parentElement?.insertBefore(this.templateContent, e.nextSibling));\n  },\n\n  append() {\n    this.removeDuplicateTargetChildren();\n    this.targetElements.forEach((e) => e.append(this.templateContent));\n  },\n\n  before() {\n    this.removeDuplicateTargetSiblings();\n    this.targetElements.forEach((e) => e.parentElement?.insertBefore(this.templateContent, e));\n  },\n\n  prepend() {\n    this.removeDuplicateTargetChildren();\n    this.targetElements.forEach((e) => e.prepend(this.templateContent));\n  },\n\n  remove() {\n    this.targetElements.forEach((e) => e.remove());\n  },\n\n  replace() {\n    const method = this.getAttribute(\"method\");\n\n    this.targetElements.forEach((targetElement) => {\n      if (method === \"morph\") {\n        morphElements(targetElement, this.templateContent);\n      } else {\n        targetElement.replaceWith(this.templateContent);\n      }\n    });\n  },\n\n  update() {\n    const method = this.getAttribute(\"method\");\n\n    this.targetElements.forEach((targetElement) => {\n      if (method === \"morph\") {\n        morphChildren(targetElement, this.templateContent);\n      } else {\n        targetElement.innerHTML = \"\";\n        targetElement.append(this.templateContent);\n      }\n    });\n  },\n\n  refresh() {\n    const method = this.getAttribute(\"method\");\n    const requestId = this.requestId;\n    const scroll = this.getAttribute(\"scroll\");\n\n    session.refresh(this.baseURI, { method, requestId, scroll });\n  }\n};\n\n// <turbo-stream action=replace target=id><template>...\n\n/**\n * Renders updates to the page from a stream of messages.\n *\n * Using the `action` attribute, this can be configured one of eight ways:\n *\n * - `after` - inserts the result after the target\n * - `append` - appends the result to the target\n * - `before` - inserts the result before the target\n * - `prepend` - prepends the result to the target\n * - `refresh` - initiates a page refresh\n * - `remove` - removes the target\n * - `replace` - replaces the outer HTML of the target\n * - `update` - replaces the inner HTML of the target\n *\n * @customElement turbo-stream\n * @example\n *   <turbo-stream action=\"append\" target=\"dom_id\">\n *     <template>\n *       Content to append to target designated with the dom_id.\n *     </template>\n *   </turbo-stream>\n */\nclass StreamElement extends HTMLElement {\n  static async renderElement(newElement) {\n    await newElement.performAction();\n  }\n\n  async connectedCallback() {\n    try {\n      await this.render();\n    } catch (error) {\n      console.error(error);\n    } finally {\n      this.disconnect();\n    }\n  }\n\n  async render() {\n    return (this.renderPromise ??= (async () => {\n      const event = this.beforeRenderEvent;\n\n      if (this.dispatchEvent(event)) {\n        await nextRepaint();\n        await event.detail.render(this);\n      }\n    })())\n  }\n\n  disconnect() {\n    try {\n      this.remove();\n      // eslint-disable-next-line no-empty\n    } catch {}\n  }\n\n  /**\n   * Removes duplicate children (by ID)\n   */\n  removeDuplicateTargetChildren() {\n    this.duplicateChildren.forEach((c) => c.remove());\n  }\n\n  /**\n   * Gets the list of duplicate children (i.e. those with the same ID)\n   */\n  get duplicateChildren() {\n    const existingChildren = this.targetElements.flatMap((e) => [...e.children]).filter((c) => !!c.getAttribute(\"id\"));\n    const newChildrenIds = [...(this.templateContent?.children || [])].filter((c) => !!c.getAttribute(\"id\")).map((c) => c.getAttribute(\"id\"));\n\n    return existingChildren.filter((c) => newChildrenIds.includes(c.getAttribute(\"id\")))\n  }\n\n  /**\n  * Removes duplicate siblings (by ID)\n  */\n  removeDuplicateTargetSiblings() {\n    this.duplicateSiblings.forEach((c) => c.remove());\n  }\n\n  /**\n  * Gets the list of duplicate siblings (i.e. those with the same ID)\n  */\n  get duplicateSiblings() {\n    const existingChildren = this.targetElements.flatMap((e) => [...e.parentElement.children]).filter((c) => !!c.id);\n    const newChildrenIds = [...(this.templateContent?.children || [])].filter((c) => !!c.id).map((c) => c.id);\n\n    return existingChildren.filter((c) => newChildrenIds.includes(c.id))\n  }\n\n  /**\n   * Gets the action function to be performed.\n   */\n  get performAction() {\n    if (this.action) {\n      const actionFunction = StreamActions[this.action];\n      if (actionFunction) {\n        return actionFunction\n      }\n      this.#raise(\"unknown action\");\n    }\n    this.#raise(\"action attribute is missing\");\n  }\n\n  /**\n   * Gets the target elements which the template will be rendered to.\n   */\n  get targetElements() {\n    if (this.target) {\n      return this.targetElementsById\n    } else if (this.targets) {\n      return this.targetElementsByQuery\n    } else {\n      this.#raise(\"target or targets attribute is missing\");\n    }\n  }\n\n  /**\n   * Gets the contents of the main `<template>`.\n   */\n  get templateContent() {\n    return this.templateElement.content.cloneNode(true)\n  }\n\n  /**\n   * Gets the main `<template>` used for rendering\n   */\n  get templateElement() {\n    if (this.firstElementChild === null) {\n      const template = this.ownerDocument.createElement(\"template\");\n      this.appendChild(template);\n      return template\n    } else if (this.firstElementChild instanceof HTMLTemplateElement) {\n      return this.firstElementChild\n    }\n    this.#raise(\"first child element must be a <template> element\");\n  }\n\n  /**\n   * Gets the current action.\n   */\n  get action() {\n    return this.getAttribute(\"action\")\n  }\n\n  /**\n   * Gets the current target (an element ID) to which the result will\n   * be rendered.\n   */\n  get target() {\n    return this.getAttribute(\"target\")\n  }\n\n  /**\n   * Gets the current \"targets\" selector (a CSS selector)\n   */\n  get targets() {\n    return this.getAttribute(\"targets\")\n  }\n\n  /**\n   * Reads the request-id attribute\n   */\n  get requestId() {\n    return this.getAttribute(\"request-id\")\n  }\n\n  #raise(message) {\n    throw new Error(`${this.description}: ${message}`)\n  }\n\n  get description() {\n    return (this.outerHTML.match(/<[^>]+>/) ?? [])[0] ?? \"<turbo-stream>\"\n  }\n\n  get beforeRenderEvent() {\n    return new CustomEvent(\"turbo:before-stream-render\", {\n      bubbles: true,\n      cancelable: true,\n      detail: { newStream: this, render: StreamElement.renderElement }\n    })\n  }\n\n  get targetElementsById() {\n    const element = this.ownerDocument?.getElementById(this.target);\n\n    if (element !== null) {\n      return [element]\n    } else {\n      return []\n    }\n  }\n\n  get targetElementsByQuery() {\n    const elements = this.ownerDocument?.querySelectorAll(this.targets);\n\n    if (elements.length !== 0) {\n      return Array.prototype.slice.call(elements)\n    } else {\n      return []\n    }\n  }\n}\n\nclass StreamSourceElement extends HTMLElement {\n  streamSource = null\n\n  connectedCallback() {\n    this.streamSource = this.src.match(/^ws{1,2}:/) ? new WebSocket(this.src) : new EventSource(this.src);\n\n    connectStreamSource(this.streamSource);\n  }\n\n  disconnectedCallback() {\n    if (this.streamSource) {\n      this.streamSource.close();\n\n      disconnectStreamSource(this.streamSource);\n    }\n  }\n\n  get src() {\n    return this.getAttribute(\"src\") || \"\"\n  }\n}\n\nFrameElement.delegateConstructor = FrameController;\n\nif (customElements.get(\"turbo-frame\") === undefined) {\n  customElements.define(\"turbo-frame\", FrameElement);\n}\n\nif (customElements.get(\"turbo-stream\") === undefined) {\n  customElements.define(\"turbo-stream\", StreamElement);\n}\n\nif (customElements.get(\"turbo-stream-source\") === undefined) {\n  customElements.define(\"turbo-stream-source\", StreamSourceElement);\n}\n\n(() => {\n  const scriptElement = document.currentScript;\n  if (!scriptElement) return\n  if (scriptElement.hasAttribute(\"data-turbo-suppress-warning\")) return\n\n  let element = scriptElement.parentElement;\n  while (element) {\n    if (element == document.body) {\n      return console.warn(\n        unindent`\n        You are loading Turbo from a <script> element inside the <body> element. This is probably not what you meant to do!\n\n        Load your application\u2019s JavaScript bundle inside the <head> element instead. <script> elements in <body> are evaluated with each page change.\n\n        For more information, see: https://turbo.hotwired.dev/handbook/building#working-with-script-elements\n\n        \u2014\u2014\n        Suppress this warning by adding a \"data-turbo-suppress-warning\" attribute to: %s\n      `,\n        scriptElement.outerHTML\n      )\n    }\n\n    element = element.parentElement;\n  }\n})();\n\nwindow.Turbo = { ...Turbo, StreamActions };\nstart();\n\nexport { FetchEnctype, FetchMethod, FetchRequest, FetchResponse, FrameElement, FrameLoadingStyle, FrameRenderer, PageRenderer, PageSnapshot, StreamActions, StreamElement, StreamSourceElement, cache, config, connectStreamSource, disconnectStreamSource, fetchWithTurboHeaders as fetch, fetchEnctypeFromString, fetchMethodFromString, isSafe, morphBodyElements, morphChildren, morphElements, morphTurboFrameElements, sessionNavigator as navigator, registerAdapter, renderStreamMessage, session, setConfirmMethod, setFormMode, setProgressBarDelay, start, visit };\n", "let consumer\n\nexport async function getConsumer() {\n  return consumer || setConsumer(createConsumer().then(setConsumer))\n}\n\nexport function setConsumer(newConsumer) {\n  return consumer = newConsumer\n}\n\nexport async function createConsumer() {\n  const { createConsumer } = await import(/* webpackChunkName: \"actioncable\" */ \"@rails/actioncable/src\")\n  return createConsumer()\n}\n\nexport async function subscribeTo(channel, mixin) {\n  const { subscriptions } = await getConsumer()\n  return subscriptions.create(channel, mixin)\n}\n", "// Based on https://github.com/nathan7/snakeize\n//\n// This software is released under the MIT license:\n// Permission is hereby granted, free of charge, to any person obtaining a copy of\n// this software and associated documentation files (the \"Software\"), to deal in\n// the Software without restriction, including without limitation the rights to\n// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n// the Software, and to permit persons to whom the Software is furnished to do so,\n// subject to the following conditions:\n\n// The above copyright notice and this permission notice shall be included in all\n// copies or substantial portions of the Software.\n\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\nexport default function walk (obj) {\n    if (!obj || typeof obj !== 'object') return obj;\n    if (obj instanceof Date || obj instanceof RegExp) return obj;\n    if (Array.isArray(obj)) return obj.map(walk);\n    return Object.keys(obj).reduce(function (acc, key) {\n        var camel = key[0].toLowerCase() + key.slice(1).replace(/([A-Z]+)/g, function (m, x) {\n            return '_' + x.toLowerCase();\n        });\n        acc[camel] = walk(obj[key]);\n        return acc;\n    }, {});\n};", "import { connectStreamSource, disconnectStreamSource } from \"@hotwired/turbo\"\nimport { subscribeTo } from \"./cable\"\nimport snakeize from \"./snakeize\"\n\nclass TurboCableStreamSourceElement extends HTMLElement {\n  static observedAttributes = [\"channel\", \"signed-stream-name\"]\n\n  async connectedCallback() {\n    connectStreamSource(this)\n    this.subscription = await subscribeTo(this.channel, {\n      received: this.dispatchMessageEvent.bind(this),\n      connected: this.subscriptionConnected.bind(this),\n      disconnected: this.subscriptionDisconnected.bind(this)\n    })\n  }\n\n  disconnectedCallback() {\n    disconnectStreamSource(this)\n    if (this.subscription) this.subscription.unsubscribe()\n    this.subscriptionDisconnected()\n  }\n\n  attributeChangedCallback() {\n    if (this.subscription) {\n      this.disconnectedCallback()\n      this.connectedCallback()\n    }\n  }\n\n  dispatchMessageEvent(data) {\n    const event = new MessageEvent(\"message\", { data })\n    return this.dispatchEvent(event)\n  }\n\n  subscriptionConnected() {\n    this.setAttribute(\"connected\", \"\")\n  }\n\n  subscriptionDisconnected() {\n    this.removeAttribute(\"connected\")\n  }\n\n  get channel() {\n    const channel = this.getAttribute(\"channel\")\n    const signed_stream_name = this.getAttribute(\"signed-stream-name\")\n    return { channel, signed_stream_name, ...snakeize({ ...this.dataset }) }\n  }\n}\n\n\nif (customElements.get(\"turbo-cable-stream-source\") === undefined) {\n  customElements.define(\"turbo-cable-stream-source\", TurboCableStreamSourceElement)\n}\n", "export function encodeMethodIntoRequestBody(event) {\n  if (event.target instanceof HTMLFormElement) {\n    const { target: form, detail: { fetchOptions } } = event\n\n    form.addEventListener(\"turbo:submit-start\", ({ detail: { formSubmission: { submitter } } }) => {\n      const body = isBodyInit(fetchOptions.body) ? fetchOptions.body : new URLSearchParams()\n      const method = determineFetchMethod(submitter, body, form)\n\n      if (!/get/i.test(method)) {\n        if (/post/i.test(method)) {\n          body.delete(\"_method\")\n        } else {\n          body.set(\"_method\", method)\n        }\n\n        fetchOptions.method = \"post\"\n      }\n    }, { once: true })\n  }\n}\n\nfunction determineFetchMethod(submitter, body, form) {\n  const formMethod = determineFormMethod(submitter)\n  const overrideMethod = body.get(\"_method\")\n  const method = form.getAttribute(\"method\") || \"get\"\n\n  if (typeof formMethod == \"string\") {\n    return formMethod\n  } else if (typeof overrideMethod == \"string\") {\n    return overrideMethod\n  } else {\n    return method\n  }\n}\n\nfunction determineFormMethod(submitter) {\n  if (submitter instanceof HTMLButtonElement || submitter instanceof HTMLInputElement) {\n    // Rails 7 ActionView::Helpers::FormBuilder#button method has an override\n    // for formmethod if the button does not have name or value attributes\n    // set, which is the default. This means that if you use <%= f.button\n    // formmethod: :delete %>, it will generate a <button name=\"_method\"\n    // value=\"delete\" formmethod=\"post\">. Therefore, if the submitter's name\n    // is already _method, it's value attribute already contains the desired\n    // method.\n    if (submitter.name === '_method') {\n      return submitter.value\n    } else if (submitter.hasAttribute(\"formmethod\")) {\n      return submitter.formMethod\n    } else {\n      return null\n    }\n  } else {\n    return null\n  }\n}\n\nfunction isBodyInit(body) {\n  return body instanceof FormData || body instanceof URLSearchParams\n}\n", "import \"./cable_stream_source_element\"\n\nimport * as Turbo from \"@hotwired/turbo\"\nexport { Turbo }\n\nimport * as cable from \"./cable\"\nexport { cable }\n\nimport { encodeMethodIntoRequestBody } from \"./fetch_requests\"\n\nwindow.Turbo = Turbo\n\naddEventListener(\"turbo:before-fetch-request\", encodeMethodIntoRequestBody)\n", "import { StreamActions } from \"@hotwired/turbo\";\n\nimport { errorAlertDialog, hideDialog } from \"../controllers/components/ir_dialog/helper\";\nimport { logger, showFlashMessage } from \"../helpers/app\";\nimport { flashlight } from \"../helpers/animate\";\n\nStreamActions.hideDialog = function () {\n  const dialogId = this.getAttribute(\"target\");\n  const dialog = document.querySelector(`[data-dialog-identifier=\"${dialogId}\"]`);\n  if (!dialog) {\n    logger(`Dialog not found: ${dialogId}`);\n    return;\n  }\n\n  hideDialog(dialog);\n};\n\nStreamActions.showErrorDialog = function () {\n  const message = this.getAttribute(\"message\");\n  const title = this.getAttribute(\"title\") || \"Error\";\n  errorAlertDialog(message, () => {}, { title });\n};\n\nStreamActions.showFlash = function () {\n  const message = this.getAttribute(\"message\");\n  const type = this.getAttribute(\"type\") || \"success\";\n  showFlashMessage({ message, flashType: type });\n};\n\nStreamActions.flashlight = function () {\n  const selector = this.getAttribute(\"selector\");\n  flashlight(selector);\n};\n\nStreamActions.redirect = function () {\n  const url = this.getAttribute(\"url\");\n  const timeout = this.getAttribute(\"timeout\") || 0;\n  setTimeout(() => {\n    location.href = url;\n  }, timeout);\n};\n", "/*\nStimulus 3.2.1\nCopyright \u00A9 2023 Basecamp, LLC\n */\nclass EventListener {\n    constructor(eventTarget, eventName, eventOptions) {\n        this.eventTarget = eventTarget;\n        this.eventName = eventName;\n        this.eventOptions = eventOptions;\n        this.unorderedBindings = new Set();\n    }\n    connect() {\n        this.eventTarget.addEventListener(this.eventName, this, this.eventOptions);\n    }\n    disconnect() {\n        this.eventTarget.removeEventListener(this.eventName, this, this.eventOptions);\n    }\n    bindingConnected(binding) {\n        this.unorderedBindings.add(binding);\n    }\n    bindingDisconnected(binding) {\n        this.unorderedBindings.delete(binding);\n    }\n    handleEvent(event) {\n        const extendedEvent = extendEvent(event);\n        for (const binding of this.bindings) {\n            if (extendedEvent.immediatePropagationStopped) {\n                break;\n            }\n            else {\n                binding.handleEvent(extendedEvent);\n            }\n        }\n    }\n    hasBindings() {\n        return this.unorderedBindings.size > 0;\n    }\n    get bindings() {\n        return Array.from(this.unorderedBindings).sort((left, right) => {\n            const leftIndex = left.index, rightIndex = right.index;\n            return leftIndex < rightIndex ? -1 : leftIndex > rightIndex ? 1 : 0;\n        });\n    }\n}\nfunction extendEvent(event) {\n    if (\"immediatePropagationStopped\" in event) {\n        return event;\n    }\n    else {\n        const { stopImmediatePropagation } = event;\n        return Object.assign(event, {\n            immediatePropagationStopped: false,\n            stopImmediatePropagation() {\n                this.immediatePropagationStopped = true;\n                stopImmediatePropagation.call(this);\n            },\n        });\n    }\n}\n\nclass Dispatcher {\n    constructor(application) {\n        this.application = application;\n        this.eventListenerMaps = new Map();\n        this.started = false;\n    }\n    start() {\n        if (!this.started) {\n            this.started = true;\n            this.eventListeners.forEach((eventListener) => eventListener.connect());\n        }\n    }\n    stop() {\n        if (this.started) {\n            this.started = false;\n            this.eventListeners.forEach((eventListener) => eventListener.disconnect());\n        }\n    }\n    get eventListeners() {\n        return Array.from(this.eventListenerMaps.values()).reduce((listeners, map) => listeners.concat(Array.from(map.values())), []);\n    }\n    bindingConnected(binding) {\n        this.fetchEventListenerForBinding(binding).bindingConnected(binding);\n    }\n    bindingDisconnected(binding, clearEventListeners = false) {\n        this.fetchEventListenerForBinding(binding).bindingDisconnected(binding);\n        if (clearEventListeners)\n            this.clearEventListenersForBinding(binding);\n    }\n    handleError(error, message, detail = {}) {\n        this.application.handleError(error, `Error ${message}`, detail);\n    }\n    clearEventListenersForBinding(binding) {\n        const eventListener = this.fetchEventListenerForBinding(binding);\n        if (!eventListener.hasBindings()) {\n            eventListener.disconnect();\n            this.removeMappedEventListenerFor(binding);\n        }\n    }\n    removeMappedEventListenerFor(binding) {\n        const { eventTarget, eventName, eventOptions } = binding;\n        const eventListenerMap = this.fetchEventListenerMapForEventTarget(eventTarget);\n        const cacheKey = this.cacheKey(eventName, eventOptions);\n        eventListenerMap.delete(cacheKey);\n        if (eventListenerMap.size == 0)\n            this.eventListenerMaps.delete(eventTarget);\n    }\n    fetchEventListenerForBinding(binding) {\n        const { eventTarget, eventName, eventOptions } = binding;\n        return this.fetchEventListener(eventTarget, eventName, eventOptions);\n    }\n    fetchEventListener(eventTarget, eventName, eventOptions) {\n        const eventListenerMap = this.fetchEventListenerMapForEventTarget(eventTarget);\n        const cacheKey = this.cacheKey(eventName, eventOptions);\n        let eventListener = eventListenerMap.get(cacheKey);\n        if (!eventListener) {\n            eventListener = this.createEventListener(eventTarget, eventName, eventOptions);\n            eventListenerMap.set(cacheKey, eventListener);\n        }\n        return eventListener;\n    }\n    createEventListener(eventTarget, eventName, eventOptions) {\n        const eventListener = new EventListener(eventTarget, eventName, eventOptions);\n        if (this.started) {\n            eventListener.connect();\n        }\n        return eventListener;\n    }\n    fetchEventListenerMapForEventTarget(eventTarget) {\n        let eventListenerMap = this.eventListenerMaps.get(eventTarget);\n        if (!eventListenerMap) {\n            eventListenerMap = new Map();\n            this.eventListenerMaps.set(eventTarget, eventListenerMap);\n        }\n        return eventListenerMap;\n    }\n    cacheKey(eventName, eventOptions) {\n        const parts = [eventName];\n        Object.keys(eventOptions)\n            .sort()\n            .forEach((key) => {\n            parts.push(`${eventOptions[key] ? \"\" : \"!\"}${key}`);\n        });\n        return parts.join(\":\");\n    }\n}\n\nconst defaultActionDescriptorFilters = {\n    stop({ event, value }) {\n        if (value)\n            event.stopPropagation();\n        return true;\n    },\n    prevent({ event, value }) {\n        if (value)\n            event.preventDefault();\n        return true;\n    },\n    self({ event, value, element }) {\n        if (value) {\n            return element === event.target;\n        }\n        else {\n            return true;\n        }\n    },\n};\nconst descriptorPattern = /^(?:(?:([^.]+?)\\+)?(.+?)(?:\\.(.+?))?(?:@(window|document))?->)?(.+?)(?:#([^:]+?))(?::(.+))?$/;\nfunction parseActionDescriptorString(descriptorString) {\n    const source = descriptorString.trim();\n    const matches = source.match(descriptorPattern) || [];\n    let eventName = matches[2];\n    let keyFilter = matches[3];\n    if (keyFilter && ![\"keydown\", \"keyup\", \"keypress\"].includes(eventName)) {\n        eventName += `.${keyFilter}`;\n        keyFilter = \"\";\n    }\n    return {\n        eventTarget: parseEventTarget(matches[4]),\n        eventName,\n        eventOptions: matches[7] ? parseEventOptions(matches[7]) : {},\n        identifier: matches[5],\n        methodName: matches[6],\n        keyFilter: matches[1] || keyFilter,\n    };\n}\nfunction parseEventTarget(eventTargetName) {\n    if (eventTargetName == \"window\") {\n        return window;\n    }\n    else if (eventTargetName == \"document\") {\n        return document;\n    }\n}\nfunction parseEventOptions(eventOptions) {\n    return eventOptions\n        .split(\":\")\n        .reduce((options, token) => Object.assign(options, { [token.replace(/^!/, \"\")]: !/^!/.test(token) }), {});\n}\nfunction stringifyEventTarget(eventTarget) {\n    if (eventTarget == window) {\n        return \"window\";\n    }\n    else if (eventTarget == document) {\n        return \"document\";\n    }\n}\n\nfunction camelize(value) {\n    return value.replace(/(?:[_-])([a-z0-9])/g, (_, char) => char.toUpperCase());\n}\nfunction namespaceCamelize(value) {\n    return camelize(value.replace(/--/g, \"-\").replace(/__/g, \"_\"));\n}\nfunction capitalize(value) {\n    return value.charAt(0).toUpperCase() + value.slice(1);\n}\nfunction dasherize(value) {\n    return value.replace(/([A-Z])/g, (_, char) => `-${char.toLowerCase()}`);\n}\nfunction tokenize(value) {\n    return value.match(/[^\\s]+/g) || [];\n}\n\nfunction isSomething(object) {\n    return object !== null && object !== undefined;\n}\nfunction hasProperty(object, property) {\n    return Object.prototype.hasOwnProperty.call(object, property);\n}\n\nconst allModifiers = [\"meta\", \"ctrl\", \"alt\", \"shift\"];\nclass Action {\n    constructor(element, index, descriptor, schema) {\n        this.element = element;\n        this.index = index;\n        this.eventTarget = descriptor.eventTarget || element;\n        this.eventName = descriptor.eventName || getDefaultEventNameForElement(element) || error(\"missing event name\");\n        this.eventOptions = descriptor.eventOptions || {};\n        this.identifier = descriptor.identifier || error(\"missing identifier\");\n        this.methodName = descriptor.methodName || error(\"missing method name\");\n        this.keyFilter = descriptor.keyFilter || \"\";\n        this.schema = schema;\n    }\n    static forToken(token, schema) {\n        return new this(token.element, token.index, parseActionDescriptorString(token.content), schema);\n    }\n    toString() {\n        const eventFilter = this.keyFilter ? `.${this.keyFilter}` : \"\";\n        const eventTarget = this.eventTargetName ? `@${this.eventTargetName}` : \"\";\n        return `${this.eventName}${eventFilter}${eventTarget}->${this.identifier}#${this.methodName}`;\n    }\n    shouldIgnoreKeyboardEvent(event) {\n        if (!this.keyFilter) {\n            return false;\n        }\n        const filters = this.keyFilter.split(\"+\");\n        if (this.keyFilterDissatisfied(event, filters)) {\n            return true;\n        }\n        const standardFilter = filters.filter((key) => !allModifiers.includes(key))[0];\n        if (!standardFilter) {\n            return false;\n        }\n        if (!hasProperty(this.keyMappings, standardFilter)) {\n            error(`contains unknown key filter: ${this.keyFilter}`);\n        }\n        return this.keyMappings[standardFilter].toLowerCase() !== event.key.toLowerCase();\n    }\n    shouldIgnoreMouseEvent(event) {\n        if (!this.keyFilter) {\n            return false;\n        }\n        const filters = [this.keyFilter];\n        if (this.keyFilterDissatisfied(event, filters)) {\n            return true;\n        }\n        return false;\n    }\n    get params() {\n        const params = {};\n        const pattern = new RegExp(`^data-${this.identifier}-(.+)-param$`, \"i\");\n        for (const { name, value } of Array.from(this.element.attributes)) {\n            const match = name.match(pattern);\n            const key = match && match[1];\n            if (key) {\n                params[camelize(key)] = typecast(value);\n            }\n        }\n        return params;\n    }\n    get eventTargetName() {\n        return stringifyEventTarget(this.eventTarget);\n    }\n    get keyMappings() {\n        return this.schema.keyMappings;\n    }\n    keyFilterDissatisfied(event, filters) {\n        const [meta, ctrl, alt, shift] = allModifiers.map((modifier) => filters.includes(modifier));\n        return event.metaKey !== meta || event.ctrlKey !== ctrl || event.altKey !== alt || event.shiftKey !== shift;\n    }\n}\nconst defaultEventNames = {\n    a: () => \"click\",\n    button: () => \"click\",\n    form: () => \"submit\",\n    details: () => \"toggle\",\n    input: (e) => (e.getAttribute(\"type\") == \"submit\" ? \"click\" : \"input\"),\n    select: () => \"change\",\n    textarea: () => \"input\",\n};\nfunction getDefaultEventNameForElement(element) {\n    const tagName = element.tagName.toLowerCase();\n    if (tagName in defaultEventNames) {\n        return defaultEventNames[tagName](element);\n    }\n}\nfunction error(message) {\n    throw new Error(message);\n}\nfunction typecast(value) {\n    try {\n        return JSON.parse(value);\n    }\n    catch (o_O) {\n        return value;\n    }\n}\n\nclass Binding {\n    constructor(context, action) {\n        this.context = context;\n        this.action = action;\n    }\n    get index() {\n        return this.action.index;\n    }\n    get eventTarget() {\n        return this.action.eventTarget;\n    }\n    get eventOptions() {\n        return this.action.eventOptions;\n    }\n    get identifier() {\n        return this.context.identifier;\n    }\n    handleEvent(event) {\n        const actionEvent = this.prepareActionEvent(event);\n        if (this.willBeInvokedByEvent(event) && this.applyEventModifiers(actionEvent)) {\n            this.invokeWithEvent(actionEvent);\n        }\n    }\n    get eventName() {\n        return this.action.eventName;\n    }\n    get method() {\n        const method = this.controller[this.methodName];\n        if (typeof method == \"function\") {\n            return method;\n        }\n        throw new Error(`Action \"${this.action}\" references undefined method \"${this.methodName}\"`);\n    }\n    applyEventModifiers(event) {\n        const { element } = this.action;\n        const { actionDescriptorFilters } = this.context.application;\n        const { controller } = this.context;\n        let passes = true;\n        for (const [name, value] of Object.entries(this.eventOptions)) {\n            if (name in actionDescriptorFilters) {\n                const filter = actionDescriptorFilters[name];\n                passes = passes && filter({ name, value, event, element, controller });\n            }\n            else {\n                continue;\n            }\n        }\n        return passes;\n    }\n    prepareActionEvent(event) {\n        return Object.assign(event, { params: this.action.params });\n    }\n    invokeWithEvent(event) {\n        const { target, currentTarget } = event;\n        try {\n            this.method.call(this.controller, event);\n            this.context.logDebugActivity(this.methodName, { event, target, currentTarget, action: this.methodName });\n        }\n        catch (error) {\n            const { identifier, controller, element, index } = this;\n            const detail = { identifier, controller, element, index, event };\n            this.context.handleError(error, `invoking action \"${this.action}\"`, detail);\n        }\n    }\n    willBeInvokedByEvent(event) {\n        const eventTarget = event.target;\n        if (event instanceof KeyboardEvent && this.action.shouldIgnoreKeyboardEvent(event)) {\n            return false;\n        }\n        if (event instanceof MouseEvent && this.action.shouldIgnoreMouseEvent(event)) {\n            return false;\n        }\n        if (this.element === eventTarget) {\n            return true;\n        }\n        else if (eventTarget instanceof Element && this.element.contains(eventTarget)) {\n            return this.scope.containsElement(eventTarget);\n        }\n        else {\n            return this.scope.containsElement(this.action.element);\n        }\n    }\n    get controller() {\n        return this.context.controller;\n    }\n    get methodName() {\n        return this.action.methodName;\n    }\n    get element() {\n        return this.scope.element;\n    }\n    get scope() {\n        return this.context.scope;\n    }\n}\n\nclass ElementObserver {\n    constructor(element, delegate) {\n        this.mutationObserverInit = { attributes: true, childList: true, subtree: true };\n        this.element = element;\n        this.started = false;\n        this.delegate = delegate;\n        this.elements = new Set();\n        this.mutationObserver = new MutationObserver((mutations) => this.processMutations(mutations));\n    }\n    start() {\n        if (!this.started) {\n            this.started = true;\n            this.mutationObserver.observe(this.element, this.mutationObserverInit);\n            this.refresh();\n        }\n    }\n    pause(callback) {\n        if (this.started) {\n            this.mutationObserver.disconnect();\n            this.started = false;\n        }\n        callback();\n        if (!this.started) {\n            this.mutationObserver.observe(this.element, this.mutationObserverInit);\n            this.started = true;\n        }\n    }\n    stop() {\n        if (this.started) {\n            this.mutationObserver.takeRecords();\n            this.mutationObserver.disconnect();\n            this.started = false;\n        }\n    }\n    refresh() {\n        if (this.started) {\n            const matches = new Set(this.matchElementsInTree());\n            for (const element of Array.from(this.elements)) {\n                if (!matches.has(element)) {\n                    this.removeElement(element);\n                }\n            }\n            for (const element of Array.from(matches)) {\n                this.addElement(element);\n            }\n        }\n    }\n    processMutations(mutations) {\n        if (this.started) {\n            for (const mutation of mutations) {\n                this.processMutation(mutation);\n            }\n        }\n    }\n    processMutation(mutation) {\n        if (mutation.type == \"attributes\") {\n            this.processAttributeChange(mutation.target, mutation.attributeName);\n        }\n        else if (mutation.type == \"childList\") {\n            this.processRemovedNodes(mutation.removedNodes);\n            this.processAddedNodes(mutation.addedNodes);\n        }\n    }\n    processAttributeChange(element, attributeName) {\n        if (this.elements.has(element)) {\n            if (this.delegate.elementAttributeChanged && this.matchElement(element)) {\n                this.delegate.elementAttributeChanged(element, attributeName);\n            }\n            else {\n                this.removeElement(element);\n            }\n        }\n        else if (this.matchElement(element)) {\n            this.addElement(element);\n        }\n    }\n    processRemovedNodes(nodes) {\n        for (const node of Array.from(nodes)) {\n            const element = this.elementFromNode(node);\n            if (element) {\n                this.processTree(element, this.removeElement);\n            }\n        }\n    }\n    processAddedNodes(nodes) {\n        for (const node of Array.from(nodes)) {\n            const element = this.elementFromNode(node);\n            if (element && this.elementIsActive(element)) {\n                this.processTree(element, this.addElement);\n            }\n        }\n    }\n    matchElement(element) {\n        return this.delegate.matchElement(element);\n    }\n    matchElementsInTree(tree = this.element) {\n        return this.delegate.matchElementsInTree(tree);\n    }\n    processTree(tree, processor) {\n        for (const element of this.matchElementsInTree(tree)) {\n            processor.call(this, element);\n        }\n    }\n    elementFromNode(node) {\n        if (node.nodeType == Node.ELEMENT_NODE) {\n            return node;\n        }\n    }\n    elementIsActive(element) {\n        if (element.isConnected != this.element.isConnected) {\n            return false;\n        }\n        else {\n            return this.element.contains(element);\n        }\n    }\n    addElement(element) {\n        if (!this.elements.has(element)) {\n            if (this.elementIsActive(element)) {\n                this.elements.add(element);\n                if (this.delegate.elementMatched) {\n                    this.delegate.elementMatched(element);\n                }\n            }\n        }\n    }\n    removeElement(element) {\n        if (this.elements.has(element)) {\n            this.elements.delete(element);\n            if (this.delegate.elementUnmatched) {\n                this.delegate.elementUnmatched(element);\n            }\n        }\n    }\n}\n\nclass AttributeObserver {\n    constructor(element, attributeName, delegate) {\n        this.attributeName = attributeName;\n        this.delegate = delegate;\n        this.elementObserver = new ElementObserver(element, this);\n    }\n    get element() {\n        return this.elementObserver.element;\n    }\n    get selector() {\n        return `[${this.attributeName}]`;\n    }\n    start() {\n        this.elementObserver.start();\n    }\n    pause(callback) {\n        this.elementObserver.pause(callback);\n    }\n    stop() {\n        this.elementObserver.stop();\n    }\n    refresh() {\n        this.elementObserver.refresh();\n    }\n    get started() {\n        return this.elementObserver.started;\n    }\n    matchElement(element) {\n        return element.hasAttribute(this.attributeName);\n    }\n    matchElementsInTree(tree) {\n        const match = this.matchElement(tree) ? [tree] : [];\n        const matches = Array.from(tree.querySelectorAll(this.selector));\n        return match.concat(matches);\n    }\n    elementMatched(element) {\n        if (this.delegate.elementMatchedAttribute) {\n            this.delegate.elementMatchedAttribute(element, this.attributeName);\n        }\n    }\n    elementUnmatched(element) {\n        if (this.delegate.elementUnmatchedAttribute) {\n            this.delegate.elementUnmatchedAttribute(element, this.attributeName);\n        }\n    }\n    elementAttributeChanged(element, attributeName) {\n        if (this.delegate.elementAttributeValueChanged && this.attributeName == attributeName) {\n            this.delegate.elementAttributeValueChanged(element, attributeName);\n        }\n    }\n}\n\nfunction add(map, key, value) {\n    fetch(map, key).add(value);\n}\nfunction del(map, key, value) {\n    fetch(map, key).delete(value);\n    prune(map, key);\n}\nfunction fetch(map, key) {\n    let values = map.get(key);\n    if (!values) {\n        values = new Set();\n        map.set(key, values);\n    }\n    return values;\n}\nfunction prune(map, key) {\n    const values = map.get(key);\n    if (values != null && values.size == 0) {\n        map.delete(key);\n    }\n}\n\nclass Multimap {\n    constructor() {\n        this.valuesByKey = new Map();\n    }\n    get keys() {\n        return Array.from(this.valuesByKey.keys());\n    }\n    get values() {\n        const sets = Array.from(this.valuesByKey.values());\n        return sets.reduce((values, set) => values.concat(Array.from(set)), []);\n    }\n    get size() {\n        const sets = Array.from(this.valuesByKey.values());\n        return sets.reduce((size, set) => size + set.size, 0);\n    }\n    add(key, value) {\n        add(this.valuesByKey, key, value);\n    }\n    delete(key, value) {\n        del(this.valuesByKey, key, value);\n    }\n    has(key, value) {\n        const values = this.valuesByKey.get(key);\n        return values != null && values.has(value);\n    }\n    hasKey(key) {\n        return this.valuesByKey.has(key);\n    }\n    hasValue(value) {\n        const sets = Array.from(this.valuesByKey.values());\n        return sets.some((set) => set.has(value));\n    }\n    getValuesForKey(key) {\n        const values = this.valuesByKey.get(key);\n        return values ? Array.from(values) : [];\n    }\n    getKeysForValue(value) {\n        return Array.from(this.valuesByKey)\n            .filter(([_key, values]) => values.has(value))\n            .map(([key, _values]) => key);\n    }\n}\n\nclass IndexedMultimap extends Multimap {\n    constructor() {\n        super();\n        this.keysByValue = new Map();\n    }\n    get values() {\n        return Array.from(this.keysByValue.keys());\n    }\n    add(key, value) {\n        super.add(key, value);\n        add(this.keysByValue, value, key);\n    }\n    delete(key, value) {\n        super.delete(key, value);\n        del(this.keysByValue, value, key);\n    }\n    hasValue(value) {\n        return this.keysByValue.has(value);\n    }\n    getKeysForValue(value) {\n        const set = this.keysByValue.get(value);\n        return set ? Array.from(set) : [];\n    }\n}\n\nclass SelectorObserver {\n    constructor(element, selector, delegate, details) {\n        this._selector = selector;\n        this.details = details;\n        this.elementObserver = new ElementObserver(element, this);\n        this.delegate = delegate;\n        this.matchesByElement = new Multimap();\n    }\n    get started() {\n        return this.elementObserver.started;\n    }\n    get selector() {\n        return this._selector;\n    }\n    set selector(selector) {\n        this._selector = selector;\n        this.refresh();\n    }\n    start() {\n        this.elementObserver.start();\n    }\n    pause(callback) {\n        this.elementObserver.pause(callback);\n    }\n    stop() {\n        this.elementObserver.stop();\n    }\n    refresh() {\n        this.elementObserver.refresh();\n    }\n    get element() {\n        return this.elementObserver.element;\n    }\n    matchElement(element) {\n        const { selector } = this;\n        if (selector) {\n            const matches = element.matches(selector);\n            if (this.delegate.selectorMatchElement) {\n                return matches && this.delegate.selectorMatchElement(element, this.details);\n            }\n            return matches;\n        }\n        else {\n            return false;\n        }\n    }\n    matchElementsInTree(tree) {\n        const { selector } = this;\n        if (selector) {\n            const match = this.matchElement(tree) ? [tree] : [];\n            const matches = Array.from(tree.querySelectorAll(selector)).filter((match) => this.matchElement(match));\n            return match.concat(matches);\n        }\n        else {\n            return [];\n        }\n    }\n    elementMatched(element) {\n        const { selector } = this;\n        if (selector) {\n            this.selectorMatched(element, selector);\n        }\n    }\n    elementUnmatched(element) {\n        const selectors = this.matchesByElement.getKeysForValue(element);\n        for (const selector of selectors) {\n            this.selectorUnmatched(element, selector);\n        }\n    }\n    elementAttributeChanged(element, _attributeName) {\n        const { selector } = this;\n        if (selector) {\n            const matches = this.matchElement(element);\n            const matchedBefore = this.matchesByElement.has(selector, element);\n            if (matches && !matchedBefore) {\n                this.selectorMatched(element, selector);\n            }\n            else if (!matches && matchedBefore) {\n                this.selectorUnmatched(element, selector);\n            }\n        }\n    }\n    selectorMatched(element, selector) {\n        this.delegate.selectorMatched(element, selector, this.details);\n        this.matchesByElement.add(selector, element);\n    }\n    selectorUnmatched(element, selector) {\n        this.delegate.selectorUnmatched(element, selector, this.details);\n        this.matchesByElement.delete(selector, element);\n    }\n}\n\nclass StringMapObserver {\n    constructor(element, delegate) {\n        this.element = element;\n        this.delegate = delegate;\n        this.started = false;\n        this.stringMap = new Map();\n        this.mutationObserver = new MutationObserver((mutations) => this.processMutations(mutations));\n    }\n    start() {\n        if (!this.started) {\n            this.started = true;\n            this.mutationObserver.observe(this.element, { attributes: true, attributeOldValue: true });\n            this.refresh();\n        }\n    }\n    stop() {\n        if (this.started) {\n            this.mutationObserver.takeRecords();\n            this.mutationObserver.disconnect();\n            this.started = false;\n        }\n    }\n    refresh() {\n        if (this.started) {\n            for (const attributeName of this.knownAttributeNames) {\n                this.refreshAttribute(attributeName, null);\n            }\n        }\n    }\n    processMutations(mutations) {\n        if (this.started) {\n            for (const mutation of mutations) {\n                this.processMutation(mutation);\n            }\n        }\n    }\n    processMutation(mutation) {\n        const attributeName = mutation.attributeName;\n        if (attributeName) {\n            this.refreshAttribute(attributeName, mutation.oldValue);\n        }\n    }\n    refreshAttribute(attributeName, oldValue) {\n        const key = this.delegate.getStringMapKeyForAttribute(attributeName);\n        if (key != null) {\n            if (!this.stringMap.has(attributeName)) {\n                this.stringMapKeyAdded(key, attributeName);\n            }\n            const value = this.element.getAttribute(attributeName);\n            if (this.stringMap.get(attributeName) != value) {\n                this.stringMapValueChanged(value, key, oldValue);\n            }\n            if (value == null) {\n                const oldValue = this.stringMap.get(attributeName);\n                this.stringMap.delete(attributeName);\n                if (oldValue)\n                    this.stringMapKeyRemoved(key, attributeName, oldValue);\n            }\n            else {\n                this.stringMap.set(attributeName, value);\n            }\n        }\n    }\n    stringMapKeyAdded(key, attributeName) {\n        if (this.delegate.stringMapKeyAdded) {\n            this.delegate.stringMapKeyAdded(key, attributeName);\n        }\n    }\n    stringMapValueChanged(value, key, oldValue) {\n        if (this.delegate.stringMapValueChanged) {\n            this.delegate.stringMapValueChanged(value, key, oldValue);\n        }\n    }\n    stringMapKeyRemoved(key, attributeName, oldValue) {\n        if (this.delegate.stringMapKeyRemoved) {\n            this.delegate.stringMapKeyRemoved(key, attributeName, oldValue);\n        }\n    }\n    get knownAttributeNames() {\n        return Array.from(new Set(this.currentAttributeNames.concat(this.recordedAttributeNames)));\n    }\n    get currentAttributeNames() {\n        return Array.from(this.element.attributes).map((attribute) => attribute.name);\n    }\n    get recordedAttributeNames() {\n        return Array.from(this.stringMap.keys());\n    }\n}\n\nclass TokenListObserver {\n    constructor(element, attributeName, delegate) {\n        this.attributeObserver = new AttributeObserver(element, attributeName, this);\n        this.delegate = delegate;\n        this.tokensByElement = new Multimap();\n    }\n    get started() {\n        return this.attributeObserver.started;\n    }\n    start() {\n        this.attributeObserver.start();\n    }\n    pause(callback) {\n        this.attributeObserver.pause(callback);\n    }\n    stop() {\n        this.attributeObserver.stop();\n    }\n    refresh() {\n        this.attributeObserver.refresh();\n    }\n    get element() {\n        return this.attributeObserver.element;\n    }\n    get attributeName() {\n        return this.attributeObserver.attributeName;\n    }\n    elementMatchedAttribute(element) {\n        this.tokensMatched(this.readTokensForElement(element));\n    }\n    elementAttributeValueChanged(element) {\n        const [unmatchedTokens, matchedTokens] = this.refreshTokensForElement(element);\n        this.tokensUnmatched(unmatchedTokens);\n        this.tokensMatched(matchedTokens);\n    }\n    elementUnmatchedAttribute(element) {\n        this.tokensUnmatched(this.tokensByElement.getValuesForKey(element));\n    }\n    tokensMatched(tokens) {\n        tokens.forEach((token) => this.tokenMatched(token));\n    }\n    tokensUnmatched(tokens) {\n        tokens.forEach((token) => this.tokenUnmatched(token));\n    }\n    tokenMatched(token) {\n        this.delegate.tokenMatched(token);\n        this.tokensByElement.add(token.element, token);\n    }\n    tokenUnmatched(token) {\n        this.delegate.tokenUnmatched(token);\n        this.tokensByElement.delete(token.element, token);\n    }\n    refreshTokensForElement(element) {\n        const previousTokens = this.tokensByElement.getValuesForKey(element);\n        const currentTokens = this.readTokensForElement(element);\n        const firstDifferingIndex = zip(previousTokens, currentTokens).findIndex(([previousToken, currentToken]) => !tokensAreEqual(previousToken, currentToken));\n        if (firstDifferingIndex == -1) {\n            return [[], []];\n        }\n        else {\n            return [previousTokens.slice(firstDifferingIndex), currentTokens.slice(firstDifferingIndex)];\n        }\n    }\n    readTokensForElement(element) {\n        const attributeName = this.attributeName;\n        const tokenString = element.getAttribute(attributeName) || \"\";\n        return parseTokenString(tokenString, element, attributeName);\n    }\n}\nfunction parseTokenString(tokenString, element, attributeName) {\n    return tokenString\n        .trim()\n        .split(/\\s+/)\n        .filter((content) => content.length)\n        .map((content, index) => ({ element, attributeName, content, index }));\n}\nfunction zip(left, right) {\n    const length = Math.max(left.length, right.length);\n    return Array.from({ length }, (_, index) => [left[index], right[index]]);\n}\nfunction tokensAreEqual(left, right) {\n    return left && right && left.index == right.index && left.content == right.content;\n}\n\nclass ValueListObserver {\n    constructor(element, attributeName, delegate) {\n        this.tokenListObserver = new TokenListObserver(element, attributeName, this);\n        this.delegate = delegate;\n        this.parseResultsByToken = new WeakMap();\n        this.valuesByTokenByElement = new WeakMap();\n    }\n    get started() {\n        return this.tokenListObserver.started;\n    }\n    start() {\n        this.tokenListObserver.start();\n    }\n    stop() {\n        this.tokenListObserver.stop();\n    }\n    refresh() {\n        this.tokenListObserver.refresh();\n    }\n    get element() {\n        return this.tokenListObserver.element;\n    }\n    get attributeName() {\n        return this.tokenListObserver.attributeName;\n    }\n    tokenMatched(token) {\n        const { element } = token;\n        const { value } = this.fetchParseResultForToken(token);\n        if (value) {\n            this.fetchValuesByTokenForElement(element).set(token, value);\n            this.delegate.elementMatchedValue(element, value);\n        }\n    }\n    tokenUnmatched(token) {\n        const { element } = token;\n        const { value } = this.fetchParseResultForToken(token);\n        if (value) {\n            this.fetchValuesByTokenForElement(element).delete(token);\n            this.delegate.elementUnmatchedValue(element, value);\n        }\n    }\n    fetchParseResultForToken(token) {\n        let parseResult = this.parseResultsByToken.get(token);\n        if (!parseResult) {\n            parseResult = this.parseToken(token);\n            this.parseResultsByToken.set(token, parseResult);\n        }\n        return parseResult;\n    }\n    fetchValuesByTokenForElement(element) {\n        let valuesByToken = this.valuesByTokenByElement.get(element);\n        if (!valuesByToken) {\n            valuesByToken = new Map();\n            this.valuesByTokenByElement.set(element, valuesByToken);\n        }\n        return valuesByToken;\n    }\n    parseToken(token) {\n        try {\n            const value = this.delegate.parseValueForToken(token);\n            return { value };\n        }\n        catch (error) {\n            return { error };\n        }\n    }\n}\n\nclass BindingObserver {\n    constructor(context, delegate) {\n        this.context = context;\n        this.delegate = delegate;\n        this.bindingsByAction = new Map();\n    }\n    start() {\n        if (!this.valueListObserver) {\n            this.valueListObserver = new ValueListObserver(this.element, this.actionAttribute, this);\n            this.valueListObserver.start();\n        }\n    }\n    stop() {\n        if (this.valueListObserver) {\n            this.valueListObserver.stop();\n            delete this.valueListObserver;\n            this.disconnectAllActions();\n        }\n    }\n    get element() {\n        return this.context.element;\n    }\n    get identifier() {\n        return this.context.identifier;\n    }\n    get actionAttribute() {\n        return this.schema.actionAttribute;\n    }\n    get schema() {\n        return this.context.schema;\n    }\n    get bindings() {\n        return Array.from(this.bindingsByAction.values());\n    }\n    connectAction(action) {\n        const binding = new Binding(this.context, action);\n        this.bindingsByAction.set(action, binding);\n        this.delegate.bindingConnected(binding);\n    }\n    disconnectAction(action) {\n        const binding = this.bindingsByAction.get(action);\n        if (binding) {\n            this.bindingsByAction.delete(action);\n            this.delegate.bindingDisconnected(binding);\n        }\n    }\n    disconnectAllActions() {\n        this.bindings.forEach((binding) => this.delegate.bindingDisconnected(binding, true));\n        this.bindingsByAction.clear();\n    }\n    parseValueForToken(token) {\n        const action = Action.forToken(token, this.schema);\n        if (action.identifier == this.identifier) {\n            return action;\n        }\n    }\n    elementMatchedValue(element, action) {\n        this.connectAction(action);\n    }\n    elementUnmatchedValue(element, action) {\n        this.disconnectAction(action);\n    }\n}\n\nclass ValueObserver {\n    constructor(context, receiver) {\n        this.context = context;\n        this.receiver = receiver;\n        this.stringMapObserver = new StringMapObserver(this.element, this);\n        this.valueDescriptorMap = this.controller.valueDescriptorMap;\n    }\n    start() {\n        this.stringMapObserver.start();\n        this.invokeChangedCallbacksForDefaultValues();\n    }\n    stop() {\n        this.stringMapObserver.stop();\n    }\n    get element() {\n        return this.context.element;\n    }\n    get controller() {\n        return this.context.controller;\n    }\n    getStringMapKeyForAttribute(attributeName) {\n        if (attributeName in this.valueDescriptorMap) {\n            return this.valueDescriptorMap[attributeName].name;\n        }\n    }\n    stringMapKeyAdded(key, attributeName) {\n        const descriptor = this.valueDescriptorMap[attributeName];\n        if (!this.hasValue(key)) {\n            this.invokeChangedCallback(key, descriptor.writer(this.receiver[key]), descriptor.writer(descriptor.defaultValue));\n        }\n    }\n    stringMapValueChanged(value, name, oldValue) {\n        const descriptor = this.valueDescriptorNameMap[name];\n        if (value === null)\n            return;\n        if (oldValue === null) {\n            oldValue = descriptor.writer(descriptor.defaultValue);\n        }\n        this.invokeChangedCallback(name, value, oldValue);\n    }\n    stringMapKeyRemoved(key, attributeName, oldValue) {\n        const descriptor = this.valueDescriptorNameMap[key];\n        if (this.hasValue(key)) {\n            this.invokeChangedCallback(key, descriptor.writer(this.receiver[key]), oldValue);\n        }\n        else {\n            this.invokeChangedCallback(key, descriptor.writer(descriptor.defaultValue), oldValue);\n        }\n    }\n    invokeChangedCallbacksForDefaultValues() {\n        for (const { key, name, defaultValue, writer } of this.valueDescriptors) {\n            if (defaultValue != undefined && !this.controller.data.has(key)) {\n                this.invokeChangedCallback(name, writer(defaultValue), undefined);\n            }\n        }\n    }\n    invokeChangedCallback(name, rawValue, rawOldValue) {\n        const changedMethodName = `${name}Changed`;\n        const changedMethod = this.receiver[changedMethodName];\n        if (typeof changedMethod == \"function\") {\n            const descriptor = this.valueDescriptorNameMap[name];\n            try {\n                const value = descriptor.reader(rawValue);\n                let oldValue = rawOldValue;\n                if (rawOldValue) {\n                    oldValue = descriptor.reader(rawOldValue);\n                }\n                changedMethod.call(this.receiver, value, oldValue);\n            }\n            catch (error) {\n                if (error instanceof TypeError) {\n                    error.message = `Stimulus Value \"${this.context.identifier}.${descriptor.name}\" - ${error.message}`;\n                }\n                throw error;\n            }\n        }\n    }\n    get valueDescriptors() {\n        const { valueDescriptorMap } = this;\n        return Object.keys(valueDescriptorMap).map((key) => valueDescriptorMap[key]);\n    }\n    get valueDescriptorNameMap() {\n        const descriptors = {};\n        Object.keys(this.valueDescriptorMap).forEach((key) => {\n            const descriptor = this.valueDescriptorMap[key];\n            descriptors[descriptor.name] = descriptor;\n        });\n        return descriptors;\n    }\n    hasValue(attributeName) {\n        const descriptor = this.valueDescriptorNameMap[attributeName];\n        const hasMethodName = `has${capitalize(descriptor.name)}`;\n        return this.receiver[hasMethodName];\n    }\n}\n\nclass TargetObserver {\n    constructor(context, delegate) {\n        this.context = context;\n        this.delegate = delegate;\n        this.targetsByName = new Multimap();\n    }\n    start() {\n        if (!this.tokenListObserver) {\n            this.tokenListObserver = new TokenListObserver(this.element, this.attributeName, this);\n            this.tokenListObserver.start();\n        }\n    }\n    stop() {\n        if (this.tokenListObserver) {\n            this.disconnectAllTargets();\n            this.tokenListObserver.stop();\n            delete this.tokenListObserver;\n        }\n    }\n    tokenMatched({ element, content: name }) {\n        if (this.scope.containsElement(element)) {\n            this.connectTarget(element, name);\n        }\n    }\n    tokenUnmatched({ element, content: name }) {\n        this.disconnectTarget(element, name);\n    }\n    connectTarget(element, name) {\n        var _a;\n        if (!this.targetsByName.has(name, element)) {\n            this.targetsByName.add(name, element);\n            (_a = this.tokenListObserver) === null || _a === void 0 ? void 0 : _a.pause(() => this.delegate.targetConnected(element, name));\n        }\n    }\n    disconnectTarget(element, name) {\n        var _a;\n        if (this.targetsByName.has(name, element)) {\n            this.targetsByName.delete(name, element);\n            (_a = this.tokenListObserver) === null || _a === void 0 ? void 0 : _a.pause(() => this.delegate.targetDisconnected(element, name));\n        }\n    }\n    disconnectAllTargets() {\n        for (const name of this.targetsByName.keys) {\n            for (const element of this.targetsByName.getValuesForKey(name)) {\n                this.disconnectTarget(element, name);\n            }\n        }\n    }\n    get attributeName() {\n        return `data-${this.context.identifier}-target`;\n    }\n    get element() {\n        return this.context.element;\n    }\n    get scope() {\n        return this.context.scope;\n    }\n}\n\nfunction readInheritableStaticArrayValues(constructor, propertyName) {\n    const ancestors = getAncestorsForConstructor(constructor);\n    return Array.from(ancestors.reduce((values, constructor) => {\n        getOwnStaticArrayValues(constructor, propertyName).forEach((name) => values.add(name));\n        return values;\n    }, new Set()));\n}\nfunction readInheritableStaticObjectPairs(constructor, propertyName) {\n    const ancestors = getAncestorsForConstructor(constructor);\n    return ancestors.reduce((pairs, constructor) => {\n        pairs.push(...getOwnStaticObjectPairs(constructor, propertyName));\n        return pairs;\n    }, []);\n}\nfunction getAncestorsForConstructor(constructor) {\n    const ancestors = [];\n    while (constructor) {\n        ancestors.push(constructor);\n        constructor = Object.getPrototypeOf(constructor);\n    }\n    return ancestors.reverse();\n}\nfunction getOwnStaticArrayValues(constructor, propertyName) {\n    const definition = constructor[propertyName];\n    return Array.isArray(definition) ? definition : [];\n}\nfunction getOwnStaticObjectPairs(constructor, propertyName) {\n    const definition = constructor[propertyName];\n    return definition ? Object.keys(definition).map((key) => [key, definition[key]]) : [];\n}\n\nclass OutletObserver {\n    constructor(context, delegate) {\n        this.started = false;\n        this.context = context;\n        this.delegate = delegate;\n        this.outletsByName = new Multimap();\n        this.outletElementsByName = new Multimap();\n        this.selectorObserverMap = new Map();\n        this.attributeObserverMap = new Map();\n    }\n    start() {\n        if (!this.started) {\n            this.outletDefinitions.forEach((outletName) => {\n                this.setupSelectorObserverForOutlet(outletName);\n                this.setupAttributeObserverForOutlet(outletName);\n            });\n            this.started = true;\n            this.dependentContexts.forEach((context) => context.refresh());\n        }\n    }\n    refresh() {\n        this.selectorObserverMap.forEach((observer) => observer.refresh());\n        this.attributeObserverMap.forEach((observer) => observer.refresh());\n    }\n    stop() {\n        if (this.started) {\n            this.started = false;\n            this.disconnectAllOutlets();\n            this.stopSelectorObservers();\n            this.stopAttributeObservers();\n        }\n    }\n    stopSelectorObservers() {\n        if (this.selectorObserverMap.size > 0) {\n            this.selectorObserverMap.forEach((observer) => observer.stop());\n            this.selectorObserverMap.clear();\n        }\n    }\n    stopAttributeObservers() {\n        if (this.attributeObserverMap.size > 0) {\n            this.attributeObserverMap.forEach((observer) => observer.stop());\n            this.attributeObserverMap.clear();\n        }\n    }\n    selectorMatched(element, _selector, { outletName }) {\n        const outlet = this.getOutlet(element, outletName);\n        if (outlet) {\n            this.connectOutlet(outlet, element, outletName);\n        }\n    }\n    selectorUnmatched(element, _selector, { outletName }) {\n        const outlet = this.getOutletFromMap(element, outletName);\n        if (outlet) {\n            this.disconnectOutlet(outlet, element, outletName);\n        }\n    }\n    selectorMatchElement(element, { outletName }) {\n        const selector = this.selector(outletName);\n        const hasOutlet = this.hasOutlet(element, outletName);\n        const hasOutletController = element.matches(`[${this.schema.controllerAttribute}~=${outletName}]`);\n        if (selector) {\n            return hasOutlet && hasOutletController && element.matches(selector);\n        }\n        else {\n            return false;\n        }\n    }\n    elementMatchedAttribute(_element, attributeName) {\n        const outletName = this.getOutletNameFromOutletAttributeName(attributeName);\n        if (outletName) {\n            this.updateSelectorObserverForOutlet(outletName);\n        }\n    }\n    elementAttributeValueChanged(_element, attributeName) {\n        const outletName = this.getOutletNameFromOutletAttributeName(attributeName);\n        if (outletName) {\n            this.updateSelectorObserverForOutlet(outletName);\n        }\n    }\n    elementUnmatchedAttribute(_element, attributeName) {\n        const outletName = this.getOutletNameFromOutletAttributeName(attributeName);\n        if (outletName) {\n            this.updateSelectorObserverForOutlet(outletName);\n        }\n    }\n    connectOutlet(outlet, element, outletName) {\n        var _a;\n        if (!this.outletElementsByName.has(outletName, element)) {\n            this.outletsByName.add(outletName, outlet);\n            this.outletElementsByName.add(outletName, element);\n            (_a = this.selectorObserverMap.get(outletName)) === null || _a === void 0 ? void 0 : _a.pause(() => this.delegate.outletConnected(outlet, element, outletName));\n        }\n    }\n    disconnectOutlet(outlet, element, outletName) {\n        var _a;\n        if (this.outletElementsByName.has(outletName, element)) {\n            this.outletsByName.delete(outletName, outlet);\n            this.outletElementsByName.delete(outletName, element);\n            (_a = this.selectorObserverMap\n                .get(outletName)) === null || _a === void 0 ? void 0 : _a.pause(() => this.delegate.outletDisconnected(outlet, element, outletName));\n        }\n    }\n    disconnectAllOutlets() {\n        for (const outletName of this.outletElementsByName.keys) {\n            for (const element of this.outletElementsByName.getValuesForKey(outletName)) {\n                for (const outlet of this.outletsByName.getValuesForKey(outletName)) {\n                    this.disconnectOutlet(outlet, element, outletName);\n                }\n            }\n        }\n    }\n    updateSelectorObserverForOutlet(outletName) {\n        const observer = this.selectorObserverMap.get(outletName);\n        if (observer) {\n            observer.selector = this.selector(outletName);\n        }\n    }\n    setupSelectorObserverForOutlet(outletName) {\n        const selector = this.selector(outletName);\n        const selectorObserver = new SelectorObserver(document.body, selector, this, { outletName });\n        this.selectorObserverMap.set(outletName, selectorObserver);\n        selectorObserver.start();\n    }\n    setupAttributeObserverForOutlet(outletName) {\n        const attributeName = this.attributeNameForOutletName(outletName);\n        const attributeObserver = new AttributeObserver(this.scope.element, attributeName, this);\n        this.attributeObserverMap.set(outletName, attributeObserver);\n        attributeObserver.start();\n    }\n    selector(outletName) {\n        return this.scope.outlets.getSelectorForOutletName(outletName);\n    }\n    attributeNameForOutletName(outletName) {\n        return this.scope.schema.outletAttributeForScope(this.identifier, outletName);\n    }\n    getOutletNameFromOutletAttributeName(attributeName) {\n        return this.outletDefinitions.find((outletName) => this.attributeNameForOutletName(outletName) === attributeName);\n    }\n    get outletDependencies() {\n        const dependencies = new Multimap();\n        this.router.modules.forEach((module) => {\n            const constructor = module.definition.controllerConstructor;\n            const outlets = readInheritableStaticArrayValues(constructor, \"outlets\");\n            outlets.forEach((outlet) => dependencies.add(outlet, module.identifier));\n        });\n        return dependencies;\n    }\n    get outletDefinitions() {\n        return this.outletDependencies.getKeysForValue(this.identifier);\n    }\n    get dependentControllerIdentifiers() {\n        return this.outletDependencies.getValuesForKey(this.identifier);\n    }\n    get dependentContexts() {\n        const identifiers = this.dependentControllerIdentifiers;\n        return this.router.contexts.filter((context) => identifiers.includes(context.identifier));\n    }\n    hasOutlet(element, outletName) {\n        return !!this.getOutlet(element, outletName) || !!this.getOutletFromMap(element, outletName);\n    }\n    getOutlet(element, outletName) {\n        return this.application.getControllerForElementAndIdentifier(element, outletName);\n    }\n    getOutletFromMap(element, outletName) {\n        return this.outletsByName.getValuesForKey(outletName).find((outlet) => outlet.element === element);\n    }\n    get scope() {\n        return this.context.scope;\n    }\n    get schema() {\n        return this.context.schema;\n    }\n    get identifier() {\n        return this.context.identifier;\n    }\n    get application() {\n        return this.context.application;\n    }\n    get router() {\n        return this.application.router;\n    }\n}\n\nclass Context {\n    constructor(module, scope) {\n        this.logDebugActivity = (functionName, detail = {}) => {\n            const { identifier, controller, element } = this;\n            detail = Object.assign({ identifier, controller, element }, detail);\n            this.application.logDebugActivity(this.identifier, functionName, detail);\n        };\n        this.module = module;\n        this.scope = scope;\n        this.controller = new module.controllerConstructor(this);\n        this.bindingObserver = new BindingObserver(this, this.dispatcher);\n        this.valueObserver = new ValueObserver(this, this.controller);\n        this.targetObserver = new TargetObserver(this, this);\n        this.outletObserver = new OutletObserver(this, this);\n        try {\n            this.controller.initialize();\n            this.logDebugActivity(\"initialize\");\n        }\n        catch (error) {\n            this.handleError(error, \"initializing controller\");\n        }\n    }\n    connect() {\n        this.bindingObserver.start();\n        this.valueObserver.start();\n        this.targetObserver.start();\n        this.outletObserver.start();\n        try {\n            this.controller.connect();\n            this.logDebugActivity(\"connect\");\n        }\n        catch (error) {\n            this.handleError(error, \"connecting controller\");\n        }\n    }\n    refresh() {\n        this.outletObserver.refresh();\n    }\n    disconnect() {\n        try {\n            this.controller.disconnect();\n            this.logDebugActivity(\"disconnect\");\n        }\n        catch (error) {\n            this.handleError(error, \"disconnecting controller\");\n        }\n        this.outletObserver.stop();\n        this.targetObserver.stop();\n        this.valueObserver.stop();\n        this.bindingObserver.stop();\n    }\n    get application() {\n        return this.module.application;\n    }\n    get identifier() {\n        return this.module.identifier;\n    }\n    get schema() {\n        return this.application.schema;\n    }\n    get dispatcher() {\n        return this.application.dispatcher;\n    }\n    get element() {\n        return this.scope.element;\n    }\n    get parentElement() {\n        return this.element.parentElement;\n    }\n    handleError(error, message, detail = {}) {\n        const { identifier, controller, element } = this;\n        detail = Object.assign({ identifier, controller, element }, detail);\n        this.application.handleError(error, `Error ${message}`, detail);\n    }\n    targetConnected(element, name) {\n        this.invokeControllerMethod(`${name}TargetConnected`, element);\n    }\n    targetDisconnected(element, name) {\n        this.invokeControllerMethod(`${name}TargetDisconnected`, element);\n    }\n    outletConnected(outlet, element, name) {\n        this.invokeControllerMethod(`${namespaceCamelize(name)}OutletConnected`, outlet, element);\n    }\n    outletDisconnected(outlet, element, name) {\n        this.invokeControllerMethod(`${namespaceCamelize(name)}OutletDisconnected`, outlet, element);\n    }\n    invokeControllerMethod(methodName, ...args) {\n        const controller = this.controller;\n        if (typeof controller[methodName] == \"function\") {\n            controller[methodName](...args);\n        }\n    }\n}\n\nfunction bless(constructor) {\n    return shadow(constructor, getBlessedProperties(constructor));\n}\nfunction shadow(constructor, properties) {\n    const shadowConstructor = extend(constructor);\n    const shadowProperties = getShadowProperties(constructor.prototype, properties);\n    Object.defineProperties(shadowConstructor.prototype, shadowProperties);\n    return shadowConstructor;\n}\nfunction getBlessedProperties(constructor) {\n    const blessings = readInheritableStaticArrayValues(constructor, \"blessings\");\n    return blessings.reduce((blessedProperties, blessing) => {\n        const properties = blessing(constructor);\n        for (const key in properties) {\n            const descriptor = blessedProperties[key] || {};\n            blessedProperties[key] = Object.assign(descriptor, properties[key]);\n        }\n        return blessedProperties;\n    }, {});\n}\nfunction getShadowProperties(prototype, properties) {\n    return getOwnKeys(properties).reduce((shadowProperties, key) => {\n        const descriptor = getShadowedDescriptor(prototype, properties, key);\n        if (descriptor) {\n            Object.assign(shadowProperties, { [key]: descriptor });\n        }\n        return shadowProperties;\n    }, {});\n}\nfunction getShadowedDescriptor(prototype, properties, key) {\n    const shadowingDescriptor = Object.getOwnPropertyDescriptor(prototype, key);\n    const shadowedByValue = shadowingDescriptor && \"value\" in shadowingDescriptor;\n    if (!shadowedByValue) {\n        const descriptor = Object.getOwnPropertyDescriptor(properties, key).value;\n        if (shadowingDescriptor) {\n            descriptor.get = shadowingDescriptor.get || descriptor.get;\n            descriptor.set = shadowingDescriptor.set || descriptor.set;\n        }\n        return descriptor;\n    }\n}\nconst getOwnKeys = (() => {\n    if (typeof Object.getOwnPropertySymbols == \"function\") {\n        return (object) => [...Object.getOwnPropertyNames(object), ...Object.getOwnPropertySymbols(object)];\n    }\n    else {\n        return Object.getOwnPropertyNames;\n    }\n})();\nconst extend = (() => {\n    function extendWithReflect(constructor) {\n        function extended() {\n            return Reflect.construct(constructor, arguments, new.target);\n        }\n        extended.prototype = Object.create(constructor.prototype, {\n            constructor: { value: extended },\n        });\n        Reflect.setPrototypeOf(extended, constructor);\n        return extended;\n    }\n    function testReflectExtension() {\n        const a = function () {\n            this.a.call(this);\n        };\n        const b = extendWithReflect(a);\n        b.prototype.a = function () { };\n        return new b();\n    }\n    try {\n        testReflectExtension();\n        return extendWithReflect;\n    }\n    catch (error) {\n        return (constructor) => class extended extends constructor {\n        };\n    }\n})();\n\nfunction blessDefinition(definition) {\n    return {\n        identifier: definition.identifier,\n        controllerConstructor: bless(definition.controllerConstructor),\n    };\n}\n\nclass Module {\n    constructor(application, definition) {\n        this.application = application;\n        this.definition = blessDefinition(definition);\n        this.contextsByScope = new WeakMap();\n        this.connectedContexts = new Set();\n    }\n    get identifier() {\n        return this.definition.identifier;\n    }\n    get controllerConstructor() {\n        return this.definition.controllerConstructor;\n    }\n    get contexts() {\n        return Array.from(this.connectedContexts);\n    }\n    connectContextForScope(scope) {\n        const context = this.fetchContextForScope(scope);\n        this.connectedContexts.add(context);\n        context.connect();\n    }\n    disconnectContextForScope(scope) {\n        const context = this.contextsByScope.get(scope);\n        if (context) {\n            this.connectedContexts.delete(context);\n            context.disconnect();\n        }\n    }\n    fetchContextForScope(scope) {\n        let context = this.contextsByScope.get(scope);\n        if (!context) {\n            context = new Context(this, scope);\n            this.contextsByScope.set(scope, context);\n        }\n        return context;\n    }\n}\n\nclass ClassMap {\n    constructor(scope) {\n        this.scope = scope;\n    }\n    has(name) {\n        return this.data.has(this.getDataKey(name));\n    }\n    get(name) {\n        return this.getAll(name)[0];\n    }\n    getAll(name) {\n        const tokenString = this.data.get(this.getDataKey(name)) || \"\";\n        return tokenize(tokenString);\n    }\n    getAttributeName(name) {\n        return this.data.getAttributeNameForKey(this.getDataKey(name));\n    }\n    getDataKey(name) {\n        return `${name}-class`;\n    }\n    get data() {\n        return this.scope.data;\n    }\n}\n\nclass DataMap {\n    constructor(scope) {\n        this.scope = scope;\n    }\n    get element() {\n        return this.scope.element;\n    }\n    get identifier() {\n        return this.scope.identifier;\n    }\n    get(key) {\n        const name = this.getAttributeNameForKey(key);\n        return this.element.getAttribute(name);\n    }\n    set(key, value) {\n        const name = this.getAttributeNameForKey(key);\n        this.element.setAttribute(name, value);\n        return this.get(key);\n    }\n    has(key) {\n        const name = this.getAttributeNameForKey(key);\n        return this.element.hasAttribute(name);\n    }\n    delete(key) {\n        if (this.has(key)) {\n            const name = this.getAttributeNameForKey(key);\n            this.element.removeAttribute(name);\n            return true;\n        }\n        else {\n            return false;\n        }\n    }\n    getAttributeNameForKey(key) {\n        return `data-${this.identifier}-${dasherize(key)}`;\n    }\n}\n\nclass Guide {\n    constructor(logger) {\n        this.warnedKeysByObject = new WeakMap();\n        this.logger = logger;\n    }\n    warn(object, key, message) {\n        let warnedKeys = this.warnedKeysByObject.get(object);\n        if (!warnedKeys) {\n            warnedKeys = new Set();\n            this.warnedKeysByObject.set(object, warnedKeys);\n        }\n        if (!warnedKeys.has(key)) {\n            warnedKeys.add(key);\n            this.logger.warn(message, object);\n        }\n    }\n}\n\nfunction attributeValueContainsToken(attributeName, token) {\n    return `[${attributeName}~=\"${token}\"]`;\n}\n\nclass TargetSet {\n    constructor(scope) {\n        this.scope = scope;\n    }\n    get element() {\n        return this.scope.element;\n    }\n    get identifier() {\n        return this.scope.identifier;\n    }\n    get schema() {\n        return this.scope.schema;\n    }\n    has(targetName) {\n        return this.find(targetName) != null;\n    }\n    find(...targetNames) {\n        return targetNames.reduce((target, targetName) => target || this.findTarget(targetName) || this.findLegacyTarget(targetName), undefined);\n    }\n    findAll(...targetNames) {\n        return targetNames.reduce((targets, targetName) => [\n            ...targets,\n            ...this.findAllTargets(targetName),\n            ...this.findAllLegacyTargets(targetName),\n        ], []);\n    }\n    findTarget(targetName) {\n        const selector = this.getSelectorForTargetName(targetName);\n        return this.scope.findElement(selector);\n    }\n    findAllTargets(targetName) {\n        const selector = this.getSelectorForTargetName(targetName);\n        return this.scope.findAllElements(selector);\n    }\n    getSelectorForTargetName(targetName) {\n        const attributeName = this.schema.targetAttributeForScope(this.identifier);\n        return attributeValueContainsToken(attributeName, targetName);\n    }\n    findLegacyTarget(targetName) {\n        const selector = this.getLegacySelectorForTargetName(targetName);\n        return this.deprecate(this.scope.findElement(selector), targetName);\n    }\n    findAllLegacyTargets(targetName) {\n        const selector = this.getLegacySelectorForTargetName(targetName);\n        return this.scope.findAllElements(selector).map((element) => this.deprecate(element, targetName));\n    }\n    getLegacySelectorForTargetName(targetName) {\n        const targetDescriptor = `${this.identifier}.${targetName}`;\n        return attributeValueContainsToken(this.schema.targetAttribute, targetDescriptor);\n    }\n    deprecate(element, targetName) {\n        if (element) {\n            const { identifier } = this;\n            const attributeName = this.schema.targetAttribute;\n            const revisedAttributeName = this.schema.targetAttributeForScope(identifier);\n            this.guide.warn(element, `target:${targetName}`, `Please replace ${attributeName}=\"${identifier}.${targetName}\" with ${revisedAttributeName}=\"${targetName}\". ` +\n                `The ${attributeName} attribute is deprecated and will be removed in a future version of Stimulus.`);\n        }\n        return element;\n    }\n    get guide() {\n        return this.scope.guide;\n    }\n}\n\nclass OutletSet {\n    constructor(scope, controllerElement) {\n        this.scope = scope;\n        this.controllerElement = controllerElement;\n    }\n    get element() {\n        return this.scope.element;\n    }\n    get identifier() {\n        return this.scope.identifier;\n    }\n    get schema() {\n        return this.scope.schema;\n    }\n    has(outletName) {\n        return this.find(outletName) != null;\n    }\n    find(...outletNames) {\n        return outletNames.reduce((outlet, outletName) => outlet || this.findOutlet(outletName), undefined);\n    }\n    findAll(...outletNames) {\n        return outletNames.reduce((outlets, outletName) => [...outlets, ...this.findAllOutlets(outletName)], []);\n    }\n    getSelectorForOutletName(outletName) {\n        const attributeName = this.schema.outletAttributeForScope(this.identifier, outletName);\n        return this.controllerElement.getAttribute(attributeName);\n    }\n    findOutlet(outletName) {\n        const selector = this.getSelectorForOutletName(outletName);\n        if (selector)\n            return this.findElement(selector, outletName);\n    }\n    findAllOutlets(outletName) {\n        const selector = this.getSelectorForOutletName(outletName);\n        return selector ? this.findAllElements(selector, outletName) : [];\n    }\n    findElement(selector, outletName) {\n        const elements = this.scope.queryElements(selector);\n        return elements.filter((element) => this.matchesElement(element, selector, outletName))[0];\n    }\n    findAllElements(selector, outletName) {\n        const elements = this.scope.queryElements(selector);\n        return elements.filter((element) => this.matchesElement(element, selector, outletName));\n    }\n    matchesElement(element, selector, outletName) {\n        const controllerAttribute = element.getAttribute(this.scope.schema.controllerAttribute) || \"\";\n        return element.matches(selector) && controllerAttribute.split(\" \").includes(outletName);\n    }\n}\n\nclass Scope {\n    constructor(schema, element, identifier, logger) {\n        this.targets = new TargetSet(this);\n        this.classes = new ClassMap(this);\n        this.data = new DataMap(this);\n        this.containsElement = (element) => {\n            return element.closest(this.controllerSelector) === this.element;\n        };\n        this.schema = schema;\n        this.element = element;\n        this.identifier = identifier;\n        this.guide = new Guide(logger);\n        this.outlets = new OutletSet(this.documentScope, element);\n    }\n    findElement(selector) {\n        return this.element.matches(selector) ? this.element : this.queryElements(selector).find(this.containsElement);\n    }\n    findAllElements(selector) {\n        return [\n            ...(this.element.matches(selector) ? [this.element] : []),\n            ...this.queryElements(selector).filter(this.containsElement),\n        ];\n    }\n    queryElements(selector) {\n        return Array.from(this.element.querySelectorAll(selector));\n    }\n    get controllerSelector() {\n        return attributeValueContainsToken(this.schema.controllerAttribute, this.identifier);\n    }\n    get isDocumentScope() {\n        return this.element === document.documentElement;\n    }\n    get documentScope() {\n        return this.isDocumentScope\n            ? this\n            : new Scope(this.schema, document.documentElement, this.identifier, this.guide.logger);\n    }\n}\n\nclass ScopeObserver {\n    constructor(element, schema, delegate) {\n        this.element = element;\n        this.schema = schema;\n        this.delegate = delegate;\n        this.valueListObserver = new ValueListObserver(this.element, this.controllerAttribute, this);\n        this.scopesByIdentifierByElement = new WeakMap();\n        this.scopeReferenceCounts = new WeakMap();\n    }\n    start() {\n        this.valueListObserver.start();\n    }\n    stop() {\n        this.valueListObserver.stop();\n    }\n    get controllerAttribute() {\n        return this.schema.controllerAttribute;\n    }\n    parseValueForToken(token) {\n        const { element, content: identifier } = token;\n        return this.parseValueForElementAndIdentifier(element, identifier);\n    }\n    parseValueForElementAndIdentifier(element, identifier) {\n        const scopesByIdentifier = this.fetchScopesByIdentifierForElement(element);\n        let scope = scopesByIdentifier.get(identifier);\n        if (!scope) {\n            scope = this.delegate.createScopeForElementAndIdentifier(element, identifier);\n            scopesByIdentifier.set(identifier, scope);\n        }\n        return scope;\n    }\n    elementMatchedValue(element, value) {\n        const referenceCount = (this.scopeReferenceCounts.get(value) || 0) + 1;\n        this.scopeReferenceCounts.set(value, referenceCount);\n        if (referenceCount == 1) {\n            this.delegate.scopeConnected(value);\n        }\n    }\n    elementUnmatchedValue(element, value) {\n        const referenceCount = this.scopeReferenceCounts.get(value);\n        if (referenceCount) {\n            this.scopeReferenceCounts.set(value, referenceCount - 1);\n            if (referenceCount == 1) {\n                this.delegate.scopeDisconnected(value);\n            }\n        }\n    }\n    fetchScopesByIdentifierForElement(element) {\n        let scopesByIdentifier = this.scopesByIdentifierByElement.get(element);\n        if (!scopesByIdentifier) {\n            scopesByIdentifier = new Map();\n            this.scopesByIdentifierByElement.set(element, scopesByIdentifier);\n        }\n        return scopesByIdentifier;\n    }\n}\n\nclass Router {\n    constructor(application) {\n        this.application = application;\n        this.scopeObserver = new ScopeObserver(this.element, this.schema, this);\n        this.scopesByIdentifier = new Multimap();\n        this.modulesByIdentifier = new Map();\n    }\n    get element() {\n        return this.application.element;\n    }\n    get schema() {\n        return this.application.schema;\n    }\n    get logger() {\n        return this.application.logger;\n    }\n    get controllerAttribute() {\n        return this.schema.controllerAttribute;\n    }\n    get modules() {\n        return Array.from(this.modulesByIdentifier.values());\n    }\n    get contexts() {\n        return this.modules.reduce((contexts, module) => contexts.concat(module.contexts), []);\n    }\n    start() {\n        this.scopeObserver.start();\n    }\n    stop() {\n        this.scopeObserver.stop();\n    }\n    loadDefinition(definition) {\n        this.unloadIdentifier(definition.identifier);\n        const module = new Module(this.application, definition);\n        this.connectModule(module);\n        const afterLoad = definition.controllerConstructor.afterLoad;\n        if (afterLoad) {\n            afterLoad.call(definition.controllerConstructor, definition.identifier, this.application);\n        }\n    }\n    unloadIdentifier(identifier) {\n        const module = this.modulesByIdentifier.get(identifier);\n        if (module) {\n            this.disconnectModule(module);\n        }\n    }\n    getContextForElementAndIdentifier(element, identifier) {\n        const module = this.modulesByIdentifier.get(identifier);\n        if (module) {\n            return module.contexts.find((context) => context.element == element);\n        }\n    }\n    proposeToConnectScopeForElementAndIdentifier(element, identifier) {\n        const scope = this.scopeObserver.parseValueForElementAndIdentifier(element, identifier);\n        if (scope) {\n            this.scopeObserver.elementMatchedValue(scope.element, scope);\n        }\n        else {\n            console.error(`Couldn't find or create scope for identifier: \"${identifier}\" and element:`, element);\n        }\n    }\n    handleError(error, message, detail) {\n        this.application.handleError(error, message, detail);\n    }\n    createScopeForElementAndIdentifier(element, identifier) {\n        return new Scope(this.schema, element, identifier, this.logger);\n    }\n    scopeConnected(scope) {\n        this.scopesByIdentifier.add(scope.identifier, scope);\n        const module = this.modulesByIdentifier.get(scope.identifier);\n        if (module) {\n            module.connectContextForScope(scope);\n        }\n    }\n    scopeDisconnected(scope) {\n        this.scopesByIdentifier.delete(scope.identifier, scope);\n        const module = this.modulesByIdentifier.get(scope.identifier);\n        if (module) {\n            module.disconnectContextForScope(scope);\n        }\n    }\n    connectModule(module) {\n        this.modulesByIdentifier.set(module.identifier, module);\n        const scopes = this.scopesByIdentifier.getValuesForKey(module.identifier);\n        scopes.forEach((scope) => module.connectContextForScope(scope));\n    }\n    disconnectModule(module) {\n        this.modulesByIdentifier.delete(module.identifier);\n        const scopes = this.scopesByIdentifier.getValuesForKey(module.identifier);\n        scopes.forEach((scope) => module.disconnectContextForScope(scope));\n    }\n}\n\nconst defaultSchema = {\n    controllerAttribute: \"data-controller\",\n    actionAttribute: \"data-action\",\n    targetAttribute: \"data-target\",\n    targetAttributeForScope: (identifier) => `data-${identifier}-target`,\n    outletAttributeForScope: (identifier, outlet) => `data-${identifier}-${outlet}-outlet`,\n    keyMappings: Object.assign(Object.assign({ enter: \"Enter\", tab: \"Tab\", esc: \"Escape\", space: \" \", up: \"ArrowUp\", down: \"ArrowDown\", left: \"ArrowLeft\", right: \"ArrowRight\", home: \"Home\", end: \"End\", page_up: \"PageUp\", page_down: \"PageDown\" }, objectFromEntries(\"abcdefghijklmnopqrstuvwxyz\".split(\"\").map((c) => [c, c]))), objectFromEntries(\"0123456789\".split(\"\").map((n) => [n, n]))),\n};\nfunction objectFromEntries(array) {\n    return array.reduce((memo, [k, v]) => (Object.assign(Object.assign({}, memo), { [k]: v })), {});\n}\n\nclass Application {\n    constructor(element = document.documentElement, schema = defaultSchema) {\n        this.logger = console;\n        this.debug = false;\n        this.logDebugActivity = (identifier, functionName, detail = {}) => {\n            if (this.debug) {\n                this.logFormattedMessage(identifier, functionName, detail);\n            }\n        };\n        this.element = element;\n        this.schema = schema;\n        this.dispatcher = new Dispatcher(this);\n        this.router = new Router(this);\n        this.actionDescriptorFilters = Object.assign({}, defaultActionDescriptorFilters);\n    }\n    static start(element, schema) {\n        const application = new this(element, schema);\n        application.start();\n        return application;\n    }\n    async start() {\n        await domReady();\n        this.logDebugActivity(\"application\", \"starting\");\n        this.dispatcher.start();\n        this.router.start();\n        this.logDebugActivity(\"application\", \"start\");\n    }\n    stop() {\n        this.logDebugActivity(\"application\", \"stopping\");\n        this.dispatcher.stop();\n        this.router.stop();\n        this.logDebugActivity(\"application\", \"stop\");\n    }\n    register(identifier, controllerConstructor) {\n        this.load({ identifier, controllerConstructor });\n    }\n    registerActionOption(name, filter) {\n        this.actionDescriptorFilters[name] = filter;\n    }\n    load(head, ...rest) {\n        const definitions = Array.isArray(head) ? head : [head, ...rest];\n        definitions.forEach((definition) => {\n            if (definition.controllerConstructor.shouldLoad) {\n                this.router.loadDefinition(definition);\n            }\n        });\n    }\n    unload(head, ...rest) {\n        const identifiers = Array.isArray(head) ? head : [head, ...rest];\n        identifiers.forEach((identifier) => this.router.unloadIdentifier(identifier));\n    }\n    get controllers() {\n        return this.router.contexts.map((context) => context.controller);\n    }\n    getControllerForElementAndIdentifier(element, identifier) {\n        const context = this.router.getContextForElementAndIdentifier(element, identifier);\n        return context ? context.controller : null;\n    }\n    handleError(error, message, detail) {\n        var _a;\n        this.logger.error(`%s\\n\\n%o\\n\\n%o`, message, error, detail);\n        (_a = window.onerror) === null || _a === void 0 ? void 0 : _a.call(window, message, \"\", 0, 0, error);\n    }\n    logFormattedMessage(identifier, functionName, detail = {}) {\n        detail = Object.assign({ application: this }, detail);\n        this.logger.groupCollapsed(`${identifier} #${functionName}`);\n        this.logger.log(\"details:\", Object.assign({}, detail));\n        this.logger.groupEnd();\n    }\n}\nfunction domReady() {\n    return new Promise((resolve) => {\n        if (document.readyState == \"loading\") {\n            document.addEventListener(\"DOMContentLoaded\", () => resolve());\n        }\n        else {\n            resolve();\n        }\n    });\n}\n\nfunction ClassPropertiesBlessing(constructor) {\n    const classes = readInheritableStaticArrayValues(constructor, \"classes\");\n    return classes.reduce((properties, classDefinition) => {\n        return Object.assign(properties, propertiesForClassDefinition(classDefinition));\n    }, {});\n}\nfunction propertiesForClassDefinition(key) {\n    return {\n        [`${key}Class`]: {\n            get() {\n                const { classes } = this;\n                if (classes.has(key)) {\n                    return classes.get(key);\n                }\n                else {\n                    const attribute = classes.getAttributeName(key);\n                    throw new Error(`Missing attribute \"${attribute}\"`);\n                }\n            },\n        },\n        [`${key}Classes`]: {\n            get() {\n                return this.classes.getAll(key);\n            },\n        },\n        [`has${capitalize(key)}Class`]: {\n            get() {\n                return this.classes.has(key);\n            },\n        },\n    };\n}\n\nfunction OutletPropertiesBlessing(constructor) {\n    const outlets = readInheritableStaticArrayValues(constructor, \"outlets\");\n    return outlets.reduce((properties, outletDefinition) => {\n        return Object.assign(properties, propertiesForOutletDefinition(outletDefinition));\n    }, {});\n}\nfunction getOutletController(controller, element, identifier) {\n    return controller.application.getControllerForElementAndIdentifier(element, identifier);\n}\nfunction getControllerAndEnsureConnectedScope(controller, element, outletName) {\n    let outletController = getOutletController(controller, element, outletName);\n    if (outletController)\n        return outletController;\n    controller.application.router.proposeToConnectScopeForElementAndIdentifier(element, outletName);\n    outletController = getOutletController(controller, element, outletName);\n    if (outletController)\n        return outletController;\n}\nfunction propertiesForOutletDefinition(name) {\n    const camelizedName = namespaceCamelize(name);\n    return {\n        [`${camelizedName}Outlet`]: {\n            get() {\n                const outletElement = this.outlets.find(name);\n                const selector = this.outlets.getSelectorForOutletName(name);\n                if (outletElement) {\n                    const outletController = getControllerAndEnsureConnectedScope(this, outletElement, name);\n                    if (outletController)\n                        return outletController;\n                    throw new Error(`The provided outlet element is missing an outlet controller \"${name}\" instance for host controller \"${this.identifier}\"`);\n                }\n                throw new Error(`Missing outlet element \"${name}\" for host controller \"${this.identifier}\". Stimulus couldn't find a matching outlet element using selector \"${selector}\".`);\n            },\n        },\n        [`${camelizedName}Outlets`]: {\n            get() {\n                const outlets = this.outlets.findAll(name);\n                if (outlets.length > 0) {\n                    return outlets\n                        .map((outletElement) => {\n                        const outletController = getControllerAndEnsureConnectedScope(this, outletElement, name);\n                        if (outletController)\n                            return outletController;\n                        console.warn(`The provided outlet element is missing an outlet controller \"${name}\" instance for host controller \"${this.identifier}\"`, outletElement);\n                    })\n                        .filter((controller) => controller);\n                }\n                return [];\n            },\n        },\n        [`${camelizedName}OutletElement`]: {\n            get() {\n                const outletElement = this.outlets.find(name);\n                const selector = this.outlets.getSelectorForOutletName(name);\n                if (outletElement) {\n                    return outletElement;\n                }\n                else {\n                    throw new Error(`Missing outlet element \"${name}\" for host controller \"${this.identifier}\". Stimulus couldn't find a matching outlet element using selector \"${selector}\".`);\n                }\n            },\n        },\n        [`${camelizedName}OutletElements`]: {\n            get() {\n                return this.outlets.findAll(name);\n            },\n        },\n        [`has${capitalize(camelizedName)}Outlet`]: {\n            get() {\n                return this.outlets.has(name);\n            },\n        },\n    };\n}\n\nfunction TargetPropertiesBlessing(constructor) {\n    const targets = readInheritableStaticArrayValues(constructor, \"targets\");\n    return targets.reduce((properties, targetDefinition) => {\n        return Object.assign(properties, propertiesForTargetDefinition(targetDefinition));\n    }, {});\n}\nfunction propertiesForTargetDefinition(name) {\n    return {\n        [`${name}Target`]: {\n            get() {\n                const target = this.targets.find(name);\n                if (target) {\n                    return target;\n                }\n                else {\n                    throw new Error(`Missing target element \"${name}\" for \"${this.identifier}\" controller`);\n                }\n            },\n        },\n        [`${name}Targets`]: {\n            get() {\n                return this.targets.findAll(name);\n            },\n        },\n        [`has${capitalize(name)}Target`]: {\n            get() {\n                return this.targets.has(name);\n            },\n        },\n    };\n}\n\nfunction ValuePropertiesBlessing(constructor) {\n    const valueDefinitionPairs = readInheritableStaticObjectPairs(constructor, \"values\");\n    const propertyDescriptorMap = {\n        valueDescriptorMap: {\n            get() {\n                return valueDefinitionPairs.reduce((result, valueDefinitionPair) => {\n                    const valueDescriptor = parseValueDefinitionPair(valueDefinitionPair, this.identifier);\n                    const attributeName = this.data.getAttributeNameForKey(valueDescriptor.key);\n                    return Object.assign(result, { [attributeName]: valueDescriptor });\n                }, {});\n            },\n        },\n    };\n    return valueDefinitionPairs.reduce((properties, valueDefinitionPair) => {\n        return Object.assign(properties, propertiesForValueDefinitionPair(valueDefinitionPair));\n    }, propertyDescriptorMap);\n}\nfunction propertiesForValueDefinitionPair(valueDefinitionPair, controller) {\n    const definition = parseValueDefinitionPair(valueDefinitionPair, controller);\n    const { key, name, reader: read, writer: write } = definition;\n    return {\n        [name]: {\n            get() {\n                const value = this.data.get(key);\n                if (value !== null) {\n                    return read(value);\n                }\n                else {\n                    return definition.defaultValue;\n                }\n            },\n            set(value) {\n                if (value === undefined) {\n                    this.data.delete(key);\n                }\n                else {\n                    this.data.set(key, write(value));\n                }\n            },\n        },\n        [`has${capitalize(name)}`]: {\n            get() {\n                return this.data.has(key) || definition.hasCustomDefaultValue;\n            },\n        },\n    };\n}\nfunction parseValueDefinitionPair([token, typeDefinition], controller) {\n    return valueDescriptorForTokenAndTypeDefinition({\n        controller,\n        token,\n        typeDefinition,\n    });\n}\nfunction parseValueTypeConstant(constant) {\n    switch (constant) {\n        case Array:\n            return \"array\";\n        case Boolean:\n            return \"boolean\";\n        case Number:\n            return \"number\";\n        case Object:\n            return \"object\";\n        case String:\n            return \"string\";\n    }\n}\nfunction parseValueTypeDefault(defaultValue) {\n    switch (typeof defaultValue) {\n        case \"boolean\":\n            return \"boolean\";\n        case \"number\":\n            return \"number\";\n        case \"string\":\n            return \"string\";\n    }\n    if (Array.isArray(defaultValue))\n        return \"array\";\n    if (Object.prototype.toString.call(defaultValue) === \"[object Object]\")\n        return \"object\";\n}\nfunction parseValueTypeObject(payload) {\n    const { controller, token, typeObject } = payload;\n    const hasType = isSomething(typeObject.type);\n    const hasDefault = isSomething(typeObject.default);\n    const fullObject = hasType && hasDefault;\n    const onlyType = hasType && !hasDefault;\n    const onlyDefault = !hasType && hasDefault;\n    const typeFromObject = parseValueTypeConstant(typeObject.type);\n    const typeFromDefaultValue = parseValueTypeDefault(payload.typeObject.default);\n    if (onlyType)\n        return typeFromObject;\n    if (onlyDefault)\n        return typeFromDefaultValue;\n    if (typeFromObject !== typeFromDefaultValue) {\n        const propertyPath = controller ? `${controller}.${token}` : token;\n        throw new Error(`The specified default value for the Stimulus Value \"${propertyPath}\" must match the defined type \"${typeFromObject}\". The provided default value of \"${typeObject.default}\" is of type \"${typeFromDefaultValue}\".`);\n    }\n    if (fullObject)\n        return typeFromObject;\n}\nfunction parseValueTypeDefinition(payload) {\n    const { controller, token, typeDefinition } = payload;\n    const typeObject = { controller, token, typeObject: typeDefinition };\n    const typeFromObject = parseValueTypeObject(typeObject);\n    const typeFromDefaultValue = parseValueTypeDefault(typeDefinition);\n    const typeFromConstant = parseValueTypeConstant(typeDefinition);\n    const type = typeFromObject || typeFromDefaultValue || typeFromConstant;\n    if (type)\n        return type;\n    const propertyPath = controller ? `${controller}.${typeDefinition}` : token;\n    throw new Error(`Unknown value type \"${propertyPath}\" for \"${token}\" value`);\n}\nfunction defaultValueForDefinition(typeDefinition) {\n    const constant = parseValueTypeConstant(typeDefinition);\n    if (constant)\n        return defaultValuesByType[constant];\n    const hasDefault = hasProperty(typeDefinition, \"default\");\n    const hasType = hasProperty(typeDefinition, \"type\");\n    const typeObject = typeDefinition;\n    if (hasDefault)\n        return typeObject.default;\n    if (hasType) {\n        const { type } = typeObject;\n        const constantFromType = parseValueTypeConstant(type);\n        if (constantFromType)\n            return defaultValuesByType[constantFromType];\n    }\n    return typeDefinition;\n}\nfunction valueDescriptorForTokenAndTypeDefinition(payload) {\n    const { token, typeDefinition } = payload;\n    const key = `${dasherize(token)}-value`;\n    const type = parseValueTypeDefinition(payload);\n    return {\n        type,\n        key,\n        name: camelize(key),\n        get defaultValue() {\n            return defaultValueForDefinition(typeDefinition);\n        },\n        get hasCustomDefaultValue() {\n            return parseValueTypeDefault(typeDefinition) !== undefined;\n        },\n        reader: readers[type],\n        writer: writers[type] || writers.default,\n    };\n}\nconst defaultValuesByType = {\n    get array() {\n        return [];\n    },\n    boolean: false,\n    number: 0,\n    get object() {\n        return {};\n    },\n    string: \"\",\n};\nconst readers = {\n    array(value) {\n        const array = JSON.parse(value);\n        if (!Array.isArray(array)) {\n            throw new TypeError(`expected value of type \"array\" but instead got value \"${value}\" of type \"${parseValueTypeDefault(array)}\"`);\n        }\n        return array;\n    },\n    boolean(value) {\n        return !(value == \"0\" || String(value).toLowerCase() == \"false\");\n    },\n    number(value) {\n        return Number(value.replace(/_/g, \"\"));\n    },\n    object(value) {\n        const object = JSON.parse(value);\n        if (object === null || typeof object != \"object\" || Array.isArray(object)) {\n            throw new TypeError(`expected value of type \"object\" but instead got value \"${value}\" of type \"${parseValueTypeDefault(object)}\"`);\n        }\n        return object;\n    },\n    string(value) {\n        return value;\n    },\n};\nconst writers = {\n    default: writeString,\n    array: writeJSON,\n    object: writeJSON,\n};\nfunction writeJSON(value) {\n    return JSON.stringify(value);\n}\nfunction writeString(value) {\n    return `${value}`;\n}\n\nclass Controller {\n    constructor(context) {\n        this.context = context;\n    }\n    static get shouldLoad() {\n        return true;\n    }\n    static afterLoad(_identifier, _application) {\n        return;\n    }\n    get application() {\n        return this.context.application;\n    }\n    get scope() {\n        return this.context.scope;\n    }\n    get element() {\n        return this.scope.element;\n    }\n    get identifier() {\n        return this.scope.identifier;\n    }\n    get targets() {\n        return this.scope.targets;\n    }\n    get outlets() {\n        return this.scope.outlets;\n    }\n    get classes() {\n        return this.scope.classes;\n    }\n    get data() {\n        return this.scope.data;\n    }\n    initialize() {\n    }\n    connect() {\n    }\n    disconnect() {\n    }\n    dispatch(eventName, { target = this.element, detail = {}, prefix = this.identifier, bubbles = true, cancelable = true, } = {}) {\n        const type = prefix ? `${prefix}:${eventName}` : eventName;\n        const event = new CustomEvent(type, { detail, bubbles, cancelable });\n        target.dispatchEvent(event);\n        return event;\n    }\n}\nController.blessings = [\n    ClassPropertiesBlessing,\n    TargetPropertiesBlessing,\n    ValuePropertiesBlessing,\n    OutletPropertiesBlessing,\n];\nController.targets = [];\nController.outlets = [];\nController.values = {};\n\nexport { Application, AttributeObserver, Context, Controller, ElementObserver, IndexedMultimap, Multimap, SelectorObserver, StringMapObserver, TokenListObserver, ValueListObserver, add, defaultSchema, del, fetch, prune };\n", "import { Application } from \"@hotwired/stimulus\";\n\nconst application = Application.start();\n\n// Configure Stimulus development experience\napplication.debug = false;\nwindow.Stimulus = application;\n\nexport { application };\n", "import { Controller } from \"@hotwired/stimulus\";\n\nimport * as animate from \"../../helpers/animate\";\n\nexport default class IntroductionsFormController extends Controller {\n  static targets = [\"introductionTypeSelect\", \"standardIntroductionOnlyFieldsContainer\"];\n\n  introductionTypeChange(event) {\n    const isNewFeatureBadge = event.currentTarget.value === \"true\";\n    this.standardIntroductionOnlyFieldsContainerTargets.forEach((container) => {\n      animate.toggle(container, !isNewFeatureBadge, { display: \"flex\" });\n    });\n  }\n}\n", "import Rails from \"@rails/ujs\";\nexport class Form {\n  static post(url, data = {}, options = { remote: false }) {\n    new Form(url, \"POST\", data, options).request();\n  }\n\n  static patch(url, data = {}, options = { remote: false }) {\n    new Form(url, \"PATCH\", data, options).request();\n  }\n\n  static get(url, data = {}, options = { remote: false }) {\n    new Form(url, \"GET\", data, options).request();\n  }\n\n  static delete(url, options = { remote: false }) {\n    new Form(url, \"DELETE\", options).request();\n  }\n\n  constructor(url, method = \"POST\", data = {}, options = { remote: false }) {\n    this.method = method;\n    this.data = data;\n    this.remote = options.remote;\n\n    this.form = document.createElement(\"form\");\n    this.form.method = method == \"GET\" ? \"GET\" : \"POST\";\n    this.form.action = url;\n    if (this.remote) this.form.dataset.remote = \"true\";\n  }\n\n  request() {\n    this.createInput(\"authenticity_token\", this.csrfToken);\n    this.createInput(\"tab_id\", window.sessionStorage.getItem(\"tabId\"));\n    this.createInput(\"utf8\", \"\u2713\");\n    if (this.method !== \"GET\") this.createInput(\"_method\", this.method.toLowerCase());\n    if (this.data != {}) {\n      this.addInputsForData(this.data);\n    }\n\n    if (this.remote) {\n      document.body.appendChild(this.form);\n      Rails.fire(this.form, \"submit\");\n    } else {\n      this.submit();\n    }\n  }\n\n  get csrfToken() {\n    const csrfMetaTag = document.querySelector('meta[name=\"csrf-token\"]');\n    return csrfMetaTag ? csrfMetaTag.getAttribute(\"content\") : \"no-token\";\n  }\n\n  createInput(name, value) {\n    const input = document.createElement(\"input\");\n    input.type = \"hidden\";\n    input.name = name;\n    input.value = value;\n    this.form.appendChild(input);\n  }\n\n  addInputsForData(data, nestedNamePrefix = \"\") {\n    for (let [name, value] of Object.entries(data)) {\n      if (typeof value === \"object\") {\n        this.addInputsForData(value, name);\n      } else {\n        if (nestedNamePrefix !== \"\") {\n          name = `${nestedNamePrefix}[${name}]`;\n        }\n        this.createInput(name, value);\n      }\n    }\n  }\n\n  submit() {\n    document.body.appendChild(this.form);\n    submitWithTabId(this.form);\n  }\n}\n\n// optsList = [ [name, value, disabled, selected] ]\nexport const addOptionsToSelect = (optsList, selectMenu, includeBlank = false, blankLabel = \"- choose one -\") => {\n  selectMenu.replaceChildren();\n\n  if (includeBlank) {\n    const option = document.createElement(\"option\");\n    option.value = \"\";\n    option.textContent = blankLabel;\n    selectMenu.appendChild(option);\n  }\n\n  optsList.forEach((optionData) => {\n    const option = document.createElement(\"option\");\n    option.value = optionData[1];\n    option.textContent = optionData[0];\n    option.disabled = !!optionData[2];\n    option.selected = !!optionData[3];\n    selectMenu.appendChild(option);\n  });\n};\n\nexport const submitWithTabId = (form) => {\n  addTabIdToForm(form);\n  form.submit();\n};\n\nexport const addTabIdToForm = (form) => {\n  const existingInput = form.querySelector('input[name=\"tab_id\"]');\n\n  if (!existingInput) {\n    const hidden = document.createElement(\"input\");\n    hidden.type = \"hidden\";\n    hidden.name = \"tab_id\";\n    hidden.value = window.sessionStorage.getItem(\"tabId\");\n    form.appendChild(hidden);\n  }\n};\n", "import { Controller } from \"@hotwired/stimulus\";\nimport { addOptionsToSelect } from \"../../helpers/form\";\n\nexport default class PaymentRequestForm extends Controller {\n  static targets = [\"partnerSelect\", \"productSelect\"];\n  static values = { productsByPartner: Object, selectedProductId: String };\n\n  connect() {\n    if (!this.hasPartnerSelectTarget || !this.hasProductSelectTarget) return;\n\n    this.filterProducts();\n  }\n\n  filterProducts() {\n    if (!this.hasPartnerSelectTarget || !this.hasProductSelectTarget) return;\n\n    const selectedPartner = this.partnerSelectTarget.value;\n    const selectedProductId = this.productSelectTarget.value || this.selectedProductIdValue;\n    const products = this.productsFor(selectedPartner).map((product) => [\n      product[0],\n      product[1],\n      false,\n      String(product[1]) === selectedProductId,\n    ]);\n\n    addOptionsToSelect(products, this.productSelectTarget, true);\n    this.selectedProductIdValue = this.productSelectTarget.value;\n  }\n\n  productsFor(partner) {\n    if (!partner) return [];\n\n    return this.productsByPartnerValue[partner] || [];\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport * as store from \"../../helpers/local-store\";\n\nexport default class extends Controller {\n  static values = {\n    userUuid: String,\n  };\n\n  static targets = [\"termsOfServiceAcceptedAtField\"];\n\n  connect() {\n    const delayMilliseconds = 500;\n    const termsOfServiceAcceptedAt = store.get(`${this.userUuidValue}-termsOfServiceAcceptedAt`);\n\n    if (termsOfServiceAcceptedAt) {\n      this.termsOfServiceAcceptedAtFieldTarget.value = termsOfServiceAcceptedAt;\n    }\n\n    setTimeout(() => {\n      this.element.requestSubmit();\n    }, delayMilliseconds);\n  }\n}\n", "import { FetchRequest } from './fetch_request'\nimport { FetchResponse } from './fetch_response'\nimport { RequestInterceptor } from './request_interceptor'\nimport { get, post, put, patch, destroy } from './verbs'\n\nexport { FetchRequest, FetchResponse, RequestInterceptor, get, post, put, patch, destroy }\n", "export class FetchResponse {\n  constructor (response) {\n    this.response = response\n  }\n\n  get statusCode () {\n    return this.response.status\n  }\n\n  get redirected () {\n    return this.response.redirected\n  }\n\n  get ok () {\n    return this.response.ok\n  }\n\n  get unauthenticated () {\n    return this.statusCode === 401\n  }\n\n  get unprocessableEntity () {\n    return this.statusCode === 422\n  }\n\n  get authenticationURL () {\n    return this.response.headers.get('WWW-Authenticate')\n  }\n\n  get contentType () {\n    const contentType = this.response.headers.get('Content-Type') || ''\n\n    return contentType.replace(/;.*$/, '')\n  }\n\n  get headers () {\n    return this.response.headers\n  }\n\n  get html () {\n    if (this.contentType.match(/^(application|text)\\/(html|xhtml\\+xml)$/)) {\n      return this.text\n    }\n\n    return Promise.reject(new Error(`Expected an HTML response but got \"${this.contentType}\" instead`))\n  }\n\n  get json () {\n    if (this.contentType.match(/^application\\/.*json$/)) {\n      return this.responseJson || (this.responseJson = this.response.json())\n    }\n\n    return Promise.reject(new Error(`Expected a JSON response but got \"${this.contentType}\" instead`))\n  }\n\n  get text () {\n    return this.responseText || (this.responseText = this.response.text())\n  }\n\n  get isTurboStream () {\n    return this.contentType.match(/^text\\/vnd\\.turbo-stream\\.html/)\n  }\n\n  get isScript () {\n    return this.contentType.match(/\\b(?:java|ecma)script\\b/)\n  }\n\n  async renderTurboStream () {\n    if (this.isTurboStream) {\n      if (window.Turbo) {\n        await window.Turbo.renderStreamMessage(await this.text)\n      } else {\n        console.warn('You must set `window.Turbo = Turbo` to automatically process Turbo Stream events with request.js')\n      }\n    } else {\n      return Promise.reject(new Error(`Expected a Turbo Stream response but got \"${this.contentType}\" instead`))\n    }\n  }\n\n  async activeScript () {\n    if (this.isScript) {\n      const script = document.createElement('script')\n      const metaTag = document.querySelector('meta[name=csp-nonce]')\n      if (metaTag) {\n        const nonce = metaTag.nonce === '' ? metaTag.content : metaTag.nonce\n        if (nonce) { script.setAttribute('nonce', nonce) }\n      }\n      script.innerHTML = await this.text\n      document.body.appendChild(script)\n    } else {\n      return Promise.reject(new Error(`Expected a Script response but got \"${this.contentType}\" instead`))\n    }\n  }\n}\n", "export class RequestInterceptor {\n  static register (interceptor) {\n    this.interceptor = interceptor\n  }\n\n  static get () {\n    return this.interceptor\n  }\n\n  static reset () {\n    this.interceptor = undefined\n  }\n}\n", "export function getCookie (name) {\n  const cookies = document.cookie ? document.cookie.split('; ') : []\n  const prefix = `${encodeURIComponent(name)}=`\n  const cookie = cookies.find(cookie => cookie.startsWith(prefix))\n\n  if (cookie) {\n    const value = cookie.split('=').slice(1).join('=')\n\n    if (value) {\n      return decodeURIComponent(value)\n    }\n  }\n}\n\nexport function compact (object) {\n  const result = {}\n\n  for (const key in object) {\n    const value = object[key]\n    if (value !== undefined) {\n      result[key] = value\n    }\n  }\n\n  return result\n}\n\nexport function metaContent (name) {\n  const element = document.head.querySelector(`meta[name=\"${name}\"]`)\n  return element && element.content\n}\n\nexport function stringEntriesFromFormData (formData) {\n  return [...formData].reduce((entries, [name, value]) => {\n    return entries.concat(typeof value === 'string' ? [[name, value]] : [])\n  }, [])\n}\n\nexport function mergeEntries (searchParams, entries) {\n  for (const [name, value] of entries) {\n    if (value instanceof window.File) continue\n\n    if (searchParams.has(name) && !name.includes('[]')) {\n      searchParams.delete(name)\n      searchParams.set(name, value)\n    } else {\n      searchParams.append(name, value)\n    }\n  }\n}\n", "import { FetchResponse } from './fetch_response'\nimport { RequestInterceptor } from './request_interceptor'\nimport { getCookie, compact, metaContent, stringEntriesFromFormData, mergeEntries } from './lib/utils'\n\nexport class FetchRequest {\n  constructor (method, url, options = {}) {\n    this.method = method\n    this.options = options\n    this.originalUrl = url.toString()\n  }\n\n  async perform () {\n    try {\n      const requestInterceptor = RequestInterceptor.get()\n      if (requestInterceptor) {\n        await requestInterceptor(this)\n      }\n    } catch (error) {\n      console.error(error)\n    }\n\n    const fetch = window.Turbo ? window.Turbo.fetch : window.fetch\n    const response = new FetchResponse(await fetch(this.url, this.fetchOptions))\n\n    if (response.unauthenticated && response.authenticationURL) {\n      return Promise.reject(window.location.href = response.authenticationURL)\n    }\n\n    if (response.isScript) {\n      await response.activeScript()\n    }\n\n    const responseStatusIsTurboStreamable = response.ok || response.unprocessableEntity\n\n    if (responseStatusIsTurboStreamable && response.isTurboStream) {\n      await response.renderTurboStream()\n    }\n\n    return response\n  }\n\n  addHeader (key, value) {\n    const headers = this.additionalHeaders\n    headers[key] = value\n    this.options.headers = headers\n  }\n\n  sameHostname () {\n    if (!this.originalUrl.startsWith('http:') && !this.originalUrl.startsWith('https:')) {\n      return true\n    }\n\n    try {\n      return new URL(this.originalUrl).hostname === window.location.hostname\n    } catch (_) {\n      return true\n    }\n  }\n\n  get fetchOptions () {\n    return {\n      method: this.method.toUpperCase(),\n      headers: this.headers,\n      body: this.formattedBody,\n      signal: this.signal,\n      credentials: this.credentials,\n      redirect: this.redirect,\n      keepalive: this.keepalive\n    }\n  }\n\n  get headers () {\n    const baseHeaders = {\n      'X-Requested-With': 'XMLHttpRequest',\n      'Content-Type': this.contentType,\n      Accept: this.accept\n    }\n\n    if (this.sameHostname()) {\n      baseHeaders['X-CSRF-Token'] = this.csrfToken\n    }\n\n    return compact(\n      Object.assign(baseHeaders, this.additionalHeaders)\n    )\n  }\n\n  get csrfToken () {\n    return getCookie(metaContent('csrf-param')) || metaContent('csrf-token')\n  }\n\n  get contentType () {\n    if (this.options.contentType) {\n      return this.options.contentType\n    } else if (this.body == null || this.body instanceof window.FormData) {\n      return undefined\n    } else if (this.body instanceof window.File) {\n      return this.body.type\n    }\n\n    return 'application/json'\n  }\n\n  get accept () {\n    switch (this.responseKind) {\n      case 'html':\n        return 'text/html, application/xhtml+xml'\n      case 'turbo-stream':\n        return 'text/vnd.turbo-stream.html, text/html, application/xhtml+xml'\n      case 'json':\n        return 'application/json, application/vnd.api+json'\n      case 'script':\n        return 'text/javascript, application/javascript'\n      default:\n        return '*/*'\n    }\n  }\n\n  get body () {\n    return this.options.body\n  }\n\n  get query () {\n    const originalQuery = (this.originalUrl.split('?')[1] || '').split('#')[0]\n    const params = new URLSearchParams(originalQuery)\n\n    let requestQuery = this.options.query\n    if (requestQuery instanceof window.FormData) {\n      requestQuery = stringEntriesFromFormData(requestQuery)\n    } else if (requestQuery instanceof window.URLSearchParams) {\n      requestQuery = requestQuery.entries()\n    } else {\n      requestQuery = Object.entries(requestQuery || {})\n    }\n\n    mergeEntries(params, requestQuery)\n\n    const query = params.toString()\n    return (query.length > 0 ? `?${query}` : '')\n  }\n\n  get url () {\n    return (this.originalUrl.split('?')[0]).split('#')[0] + this.query\n  }\n\n  get responseKind () {\n    return this.options.responseKind || 'html'\n  }\n\n  get signal () {\n    return this.options.signal\n  }\n\n  get redirect () {\n    return this.options.redirect || 'follow'\n  }\n\n  get credentials () {\n    return this.options.credentials || 'same-origin'\n  }\n\n  get keepalive () {\n    return this.options.keepalive || false\n  }\n\n  get additionalHeaders () {\n    return this.options.headers || {}\n  }\n\n  get formattedBody () {\n    const bodyIsAString = Object.prototype.toString.call(this.body) === '[object String]'\n    const contentTypeIsJson = this.headers['Content-Type'] === 'application/json'\n\n    if (contentTypeIsJson && !bodyIsAString) {\n      return JSON.stringify(this.body)\n    }\n\n    return this.body\n  }\n}\n", "import { FetchRequest } from './fetch_request'\n\nasync function get (url, options) {\n  const request = new FetchRequest('get', url, options)\n  return request.perform()\n}\n\nasync function post (url, options) {\n  const request = new FetchRequest('post', url, options)\n  return request.perform()\n}\n\nasync function put (url, options) {\n  const request = new FetchRequest('put', url, options)\n  return request.perform()\n}\n\nasync function patch (url, options) {\n  const request = new FetchRequest('patch', url, options)\n  return request.perform()\n}\n\nasync function destroy (url, options) {\n  const request = new FetchRequest('delete', url, options)\n  return request.perform()\n}\n\nexport { get, post, put, patch, destroy }\n", "import { Controller } from \"@hotwired/stimulus\";\nimport { get } from \"@rails/request.js\";\nimport debounce from \"lodash/debounce\";\n\nimport { errorAlertDialog } from \"./components/ir_dialog/helper\";\n\nexport default class AutoCompleteCheckboxController extends Controller {\n  static targets = [\"searchField\", \"searchResults\", \"checkbox\", \"checkboxesContainer\"];\n\n  static values = {\n    formParamsKey: String,\n    basePath: String,\n    modelName: String,\n  };\n\n  connect() {\n    this.search = debounce(this.search, 300);\n  }\n\n  search(event) {\n    const searchTerm = event.target.value;\n\n    get(`${this.basePathValue}?search=${searchTerm}&form_params_key=${this.formParamsKeyValue}`, {\n      responseKind: \"turbo-stream\",\n    });\n  }\n\n  add(event) {\n    event.preventDefault();\n\n    const id = event.params.id;\n\n    if (this.#idsAlreadyIncludeId(id)) {\n      errorAlertDialog(`This ${this.modelNameValue}, ${event.params.name}, is already added.`);\n      return;\n    }\n\n    if (this.hasSearchResultsTarget) {\n      this.searchResultsTarget.remove();\n    }\n\n    const checkbox = event.params.checkbox;\n    this.checkboxesContainerTarget.insertAdjacentHTML(\"beforeend\", checkbox);\n\n    this.searchFieldTarget.value = \"\";\n    this.searchFieldTarget.focus();\n  }\n\n  #idsAlreadyIncludeId(id) {\n    const ids = this.checkboxTargets.map((cb) => parseInt(cb.value));\n    return ids.includes(parseInt(id));\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\n\nexport default class extends Controller {\n  connect() {\n    // Sometimes the submission of a form causes page animations to stop.  Having a delay allows the animations to\n    // at least get a chance to show briefly so the user gets the \"loading\" experience.\n    //\n    // Note that this does not work as a Stimulus value.  It looks like the value does not load before the connect()\n    // method is called.\n    const delayMilliseconds = this.element.dataset.delayMilliseconds\n      ? parseInt(this.element.dataset.delayMilliseconds)\n      : 500;\n\n    setTimeout(() => {\n      this.element.requestSubmit();\n    }, delayMilliseconds);\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport debounce from \"lodash/debounce\";\n\nexport default class extends Controller {\n  initialize() {\n    this.submit = debounce(this.submit, 300);\n  }\n\n  submit(_event) {\n    this.element.requestSubmit();\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport { flashlight } from \"../../helpers/animate\";\n\nexport default class extends Controller {\n  static targets = [\"blockWeight\"];\n\n  changed(event) {\n    const blockSizeControl = event.target;\n    const blockSize = blockSizeControl.value;\n\n    const defaultWeights = JSON.parse(this.blockWeightTarget.dataset.defaultWeights);\n    const defaultWeight = defaultWeights[blockSize];\n\n    this.blockWeightTarget.value = defaultWeight;\n    flashlight(this.blockWeightTarget);\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport * as animate from \"../../helpers/animate\";\n\nexport default class extends Controller {\n  static targets = [\n    \"buildingNorthSouth\",\n    \"enclosingNorthSouth\",\n    \"buildingEastWest\",\n    \"enclosingEastWest\",\n    \"rectangularDisclosure\",\n  ];\n\n  changedShape(event) {\n    const buildingShapeSelect = event.target;\n    const buildingShape = buildingShapeSelect.value;\n\n    if (buildingShape === \"complex\") {\n      animate.show(this.enclosingNorthSouthTarget);\n      animate.show(this.enclosingEastWestTarget);\n      this.buildingNorthSouthTarget.classList.add(\"d-none\");\n      this.buildingEastWestTarget.classList.add(\"d-none\");\n      this.rectangularDisclosureTarget.classList.add(\"d-none\");\n    } else {\n      animate.show(this.buildingNorthSouthTarget);\n      animate.show(this.buildingEastWestTarget);\n      animate.show(this.rectangularDisclosureTarget);\n      this.enclosingNorthSouthTarget.classList.add(\"d-none\");\n      this.enclosingEastWestTarget.classList.add(\"d-none\");\n    }\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport * as animate from \"../../helpers/animate\";\n\nexport default class BuildingHeightController extends Controller {\n  static targets = [\"buildingHeightInput\", \"smallestHorizontalDimensionContainer\", \"smallestHorizontalDimension\"];\n\n  heightChanged(_event) {\n    const buildingHeight = Number.parseFloat(this.buildingHeightInputTarget.value);\n\n    if (isNaN(buildingHeight) || buildingHeight <= 60.0) {\n      this.smallestHorizontalDimensionContainerTarget.classList.add(\"d-none\");\n      this.smallestHorizontalDimensionTarget.value = \"\";\n    } else {\n      animate.show(this.smallestHorizontalDimensionContainerTarget);\n    }\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport * as animate from \"../../helpers/animate\";\n\nexport default class extends Controller {\n  static targets = [\"allowedMessage\", \"notAllowedMessage\", \"resetButton\", \"allowButton\"];\n  static values = {\n    showAllowedMessage: Boolean,\n  };\n\n  connect() {\n    this.element.controller = this;\n    this.displayMessage(this.showAllowedMessageValue);\n  }\n\n  displayMessage(showAllowed) {\n    if (showAllowed) {\n      animate.show(this.allowedMessageTarget);\n      animate.hide(this.notAllowedMessageTarget, { fadeOut: false });\n      this.resetButtonTarget.disabled = false;\n      this.resetButtonTarget.classList.remove(\"ir-btn--spinner-shown\");\n      this.allowButtonTarget.disabled = true;\n    } else {\n      animate.show(this.notAllowedMessageTarget);\n      animate.hide(this.allowedMessageTarget, { fadeOut: false });\n      this.resetButtonTarget.disabled = true;\n      this.allowButtonTarget.disabled = false;\n      this.allowButtonTarget.classList.remove(\"ir-btn--spinner-shown\");\n    }\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport throttle from \"lodash/throttle\";\nimport debounce from \"lodash/debounce\";\n\nimport { elementInfo } from \"../../../helpers/app\";\nimport { radiansToDegrees } from \"../../../helpers/geometry\";\nimport { valueInSteps } from \"../../../helpers/app\";\n\nexport default class extends Controller {\n  static targets = [\n    \"degreesField\",\n    \"degreesPointerImage\",\n    \"degreesPointerArrowContainer\",\n    \"degreesPointerArrow\",\n    \"onlyThis\",\n    \"allRsInRp\",\n    \"allRs\",\n    \"newProjectDefault\",\n  ];\n\n  static outlets = [\"bx--layout-editor--map-edit-array\"];\n\n  connect() {\n    this.mapIdentifier = this.element.dataset.mapIdentifier;\n    this.bxMapDomElement = document.querySelector(`[data-controller='${this.mapIdentifier}']`);\n\n    this.throttledNotifyMapOfAzimuthUpdate = throttle(this.notifyMapOfAzimuthUpdate, 750, { leading: true });\n    this.debouncedNotifyMapOfAzimuthUpdate = debounce(this.notifyMapOfAzimuthUpdate, 500);\n\n    this.updateDegreePointerDisplay();\n\n    // Add animation CSS after the page loads and we set the initial value\n    setTimeout(() => {\n      this.degreesPointerArrowContainerTarget.classList.add(\n        \"bx__layout-editor__azimuth-management__image__arrow--animated\",\n      );\n    }, 500);\n\n    this.dragging = false;\n    this.fieldValue = this.degreesFieldTarget.value;\n    this.element.controller = this;\n  }\n\n  disconnect() {\n    this.dragRemoveDocumentEvents();\n  }\n\n  // the azimuth input is in a form to leverage existing styles, but we don't want it to submit\n  // if they hit enter\n  preventSubmit(event) {\n    event.preventDefault();\n  }\n\n  onOnlyThis() {\n    // Need the method because form creates an action pointing to it, but it\n    // doesn't need to do anything since the base roof section was already updated\n  }\n\n  onAllRsInRp() {\n    this.bxMapController.azimuthUpdated(this.currentRotationDegrees, this.allRsInRpTarget.checked, false, false);\n  }\n\n  onAllRs() {\n    this.bxMapController.azimuthUpdated(this.currentRotationDegrees, false, this.allRsTarget.checked, false);\n  }\n\n  onNewProjectDefault() {\n    this.bxMapController.azimuthUpdated(\n      this.currentRotationDegrees,\n      false,\n      false,\n      this.newProjectDefaultTarget.checked,\n    );\n  }\n\n  updateDegreePointerDisplay() {\n    this.degreesPointerArrowContainerTarget.setAttribute(\"transform\", `rotate(${this.currentRotationDegrees} 34 34)`);\n  }\n\n  focusedField(_event) {\n    if (this.hasBxLayoutEditorMapEditArrayOutlet) {\n      this.bxLayoutEditorMapEditArrayOutlet.allowNudgingWithArrowKeys = false;\n    }\n  }\n\n  blurredField(_event) {\n    if (this.hasBxLayoutEditorMapEditArrayOutlet) {\n      this.bxLayoutEditorMapEditArrayOutlet.allowNudgingWithArrowKeys = true;\n    }\n  }\n\n  setFromRotation(event) {\n    event.preventDefault();\n\n    const mapRotation = radiansToDegrees(this.bxMapController.mapManager.rotation);\n    const newDegrees = 180 - mapRotation;\n\n    this.degreesFieldTarget.value = valueInSteps(newDegrees, 2, 0.01);\n    this.updateDegreePointerDisplay();\n    this.notifyMapOfAzimuthUpdate();\n  }\n\n  get currentRotationDegrees() {\n    const degreesValue = this.degreesFieldTarget.value;\n    const degrees = Number.parseFloat(degreesValue);\n\n    if (Number.isNaN(degrees)) return 0;\n    if (degrees >= 0 && degrees < 360) return degrees;\n\n    // force value into range of 0 to 360\n    const quotient = Math.floor(degrees / 360);\n    const adjustment = -1 * quotient * 360;\n    const final = degrees + adjustment;\n\n    // hoop jumping to try to avoid nasty decimals due to float representations\n    return Number.parseFloat(final.toFixed(2));\n  }\n\n  fieldValueChange(event) {\n    const fieldValue = event.currentTarget.value;\n    if (fieldValue === this.fieldValue) return;\n    this.fieldValue = fieldValue;\n    this.updateDegreePointerDisplay();\n    this.debouncedNotifyMapOfAzimuthUpdate();\n  }\n\n  setAzimuthValue(newValue) {\n    this.degreesFieldTarget.value = newValue;\n    this.updateDegreePointerDisplay();\n  }\n\n  checkValue() {\n    if (this.degreesFieldTarget.value === String(this.currentRotationDegrees)) return;\n\n    this.degreesFieldTarget.value = this.currentRotationDegrees;\n  }\n\n  dragMouseDown(event) {\n    event.preventDefault();\n    this.dragging = true;\n    this.dragAddDocumentEvents();\n    this.degreesPointerArrowTarget.classList.add(\"bx__layout-editor__azimuth-management__image__arrow--active\");\n    this.degreesPointerArrowContainerTarget.classList.remove(\n      \"bx__layout-editor__azimuth-management__image__arrow--animated\",\n    );\n  }\n\n  imageCenterToEventPointAngle(ex, ey) {\n    const {\n      center: { x: cx, y: cy },\n    } = elementInfo(this.degreesPointerImageTarget);\n\n    const dy = ey - cy;\n    const dx = ex - cx;\n    let theta = Math.atan2(dy, dx); // range (-PI, PI]\n    theta *= 180 / Math.PI; // rads to degs, range (-180, 180]\n\n    // Translate to solar style map rotation degrees\n    theta += 90;\n    if (theta < 0) theta += 360;\n\n    return theta;\n  }\n\n  dragAddDocumentEvents() {\n    document.addEventListener(\"mousemove\", this.dragMouseMove);\n    document.addEventListener(\"mouseup\", this.dragMouseUp);\n  }\n\n  dragMouseMove = (event) => {\n    const newDegrees = this.imageCenterToEventPointAngle(event.clientX, event.clientY);\n    this.degreesFieldTarget.value = valueInSteps(newDegrees, 1, 0.5);\n    this.updateDegreePointerDisplay();\n    this.throttledNotifyMapOfAzimuthUpdate();\n  };\n\n  dragMouseUp = (_event) => {\n    this.dragging = false;\n    this.throttledNotifyMapOfAzimuthUpdate();\n    this.dragRemoveDocumentEvents();\n    // Sometimes arrow was out of sync with value. We think mouse might have come up while transform was\n    // still running. So make sure to sync arrow with rotation value at the end when mouse comes up.\n    this.updateDegreePointerDisplay();\n    this.degreesPointerArrowTarget.classList.remove(\"bx__layout-editor__azimuth-management__image__arrow--active\");\n    this.degreesPointerArrowContainerTarget.classList.add(\n      \"bx__layout-editor__azimuth-management__image__arrow--animated\",\n    );\n  };\n\n  dragRemoveDocumentEvents() {\n    document.removeEventListener(\"mousemove\", this.dragMouseMove);\n    document.removeEventListener(\"mouseup\", this.dragMouseUp);\n  }\n\n  notifyMapOfAzimuthUpdate = () => {\n    let allRsInRp = true;\n    let allRs = true;\n    let newProjectDefault = true;\n\n    if (this.hasAllRsInRpTarget && !this.allRsInRpTarget.checked) {\n      allRsInRp = false;\n    }\n    if (this.hasAllRsTarget && !this.allRsTarget.checked) {\n      allRs = false;\n    }\n    if (this.hasNewProjectDefaultTarget && !this.newProjectDefaultTarget.checked) {\n      newProjectDefault = false;\n    }\n\n    this.bxMapController.azimuthUpdated(\n      this.currentRotationDegrees,\n      allRsInRp,\n      allRs,\n      newProjectDefault,\n      this.dragging,\n    );\n  };\n\n  get bxMapController() {\n    return this.bxMapDomElement[this.mapIdentifier];\n  }\n}\n", "import maxBy from \"lodash/maxBy\";\n\nexport const lineMidPoint = (point1, point2) => {\n  const x = (point1.x + point2.x) / 2;\n  const y = (point1.y + point2.y) / 2;\n  return { x, y };\n};\n\nexport const radiansToDegrees = (rad) => (rad * 180) / Math.PI;\nexport const degreesToRadians = (degr) => (degr * Math.PI) / 180;\n\nexport const lineDistance = (point1, point2) => {\n  let a = point1.x - point2.x;\n  let b = point1.y - point2.y;\n  return Math.sqrt(a * a + b * b);\n};\n\nexport const lineAngleRadians = (point1, point2) => {\n  return Math.atan2(point1.y - point2.y, point1.x - point2.x);\n};\n\nexport const lineAngleDegrees = (point1, point2) => {\n  return radiansToDegrees(lineAngleRadians(point1, point2));\n};\n\nexport const pointsDirection = (points) => {\n  let sum = 0;\n  for (let i = 0; i < points.length; i++) {\n    const p1 = points[i];\n    const p2 = points[(i + 1) % points.length];\n    sum += p1.x * p2.y - p1.y * p2.x;\n  }\n  return sum > 0 ? \"clockwise\" : \"counter clockwise\";\n};\n\n// https://stackoverflow.com/questions/9043805/test-if-two-lines-intersect-javascript-function?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa\nexport const linesAreIntersecting = (p1, p2, p3, p4) => {\n  function turn(p1, p2, p3) {\n    return (p3.y - p1.y) * (p2.x - p1.x) > (p2.y - p1.y) * (p3.x - p1.x);\n  }\n  return turn(p1, p3, p4) != turn(p2, p3, p4) && turn(p1, p2, p3) != turn(p1, p2, p4);\n};\n\n// https://stackoverflow.com/questions/22521982/js-check-if-point-inside-a-polygon?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa\nexport const pointIsInsidePolygon = (point, polygonPoints) => {\n  let inside = false;\n  const { x, y } = point;\n  for (let i = 0, j = polygonPoints.length - 1; i < polygonPoints.length; j = i++) {\n    let xi = polygonPoints[i].x;\n    let yi = polygonPoints[i].y;\n    let xj = polygonPoints[j].x;\n    let yj = polygonPoints[j].y;\n    let intersect = yi > y != yj > y && x < ((xj - xi) * (y - yi)) / (yj - yi) + xi;\n    if (intersect) inside = !inside;\n  }\n\n  return inside;\n};\n\n// Move minimum x and y points to 0 position\nexport const normalizePoints = (points) => {\n  let minX = undefined;\n  let minY = undefined;\n  points.forEach((p) => {\n    if (minX === undefined || p.x < minX) {\n      minX = p.x;\n    }\n    if (minY === undefined || p.y < minY) {\n      minY = p.y;\n    }\n  });\n  return points.map((p) => {\n    return {\n      x: p.x - minX,\n      y: p.y - minY,\n    };\n  });\n};\n\n// this also normalizes the position\nexport const resizePolygonPoints = (points, size = 48) => {\n  const normalizedPoints = normalizePoints(points);\n  const width = maxBy(normalizedPoints, \"x\")[\"x\"];\n  const height = maxBy(normalizedPoints, \"y\")[\"y\"];\n  let sizeX = size;\n  let sizeY = size;\n  // if one axis is greater than the other, resize to keep the aspect ratio intact\n  if (width > height) {\n    sizeY *= height / width;\n  } else if (height > width) {\n    sizeX *= width / height;\n  }\n  const percentageChangeX = (width - sizeX) / width;\n  const percentageChangeY = (height - sizeY) / height;\n  const resizedPoints = [];\n  for (let point of normalizedPoints) {\n    resizedPoints.push({\n      x: Math.round(point.x - point.x * percentageChangeX),\n      y: Math.round(point.y - point.y * percentageChangeY),\n    });\n  }\n  return resizedPoints;\n};\n\nexport const isClockwise = (pathDetails) => {\n  let sumEdges = 0;\n  pathDetails.forEach((line) => {\n    sumEdges += (line.vertices[1].x - line.vertices[0].x) * (line.vertices[1].y + line.vertices[0].y);\n  });\n  return sumEdges < 0;\n};\n\nexport const PROXIMITY_CUTOFF = 1.0e-6;\n\nexport const isClose = (value1, value2) => {\n  if (value1 === Infinity && value2 === Infinity) {\n    return true;\n  } else {\n    return Math.abs(value1 - value2) <= PROXIMITY_CUTOFF;\n  }\n};\n\nconst slope = (start, end) => {\n  if (start[0] === end[0]) {\n    return Infinity;\n  } else {\n    return Math.abs((end[1] - start[1]) / (end[0] - start[0]));\n  }\n};\n\nexport const hasSameSlope = (p1, p2, p3, p4) => {\n  const m1 = slope(p1, p2);\n  const m2 = slope(p3, p4);\n\n  // console.log(\"m1\", m1, \"m2\", m2);\n  return isClose(m1, m2);\n};\n\nconst isBetween = (value, end1, end2) => {\n  const low = Math.min(end1, end2) + PROXIMITY_CUTOFF;\n  const high = Math.max(end1, end2) - PROXIMITY_CUTOFF;\n\n  return low < value && value < high;\n};\n\n// https://stackoverflow.com/questions/9043805/test-if-two-lines-intersect-javascript-function?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa\nexport const linesAreIntersectingAndDontOverlap = (p1, p2, p3, p4) => {\n  const determinant = (p2[0] - p1[0]) * (p4[1] - p3[1]) - (p4[0] - p3[0]) * (p2[1] - p1[1]);\n  if (Math.abs(determinant) < PROXIMITY_CUTOFF) return false;\n\n  const lambda = ((p4[1] - p3[1]) * (p4[0] - p1[0]) + (p3[0] - p4[0]) * (p4[1] - p1[1])) / determinant;\n  const gamma = ((p1[1] - p2[1]) * (p4[0] - p1[0]) + (p2[0] - p1[0]) * (p4[1] - p1[1])) / determinant;\n\n  return isBetween(lambda, 0, 1) && isBetween(gamma, 0, 1);\n};\n\nexport function rotatePointAroundCenter([cx, cy], [x, y], rotationRadians) {\n  const cos = Math.cos(rotationRadians);\n  const sin = Math.sin(rotationRadians);\n  const nx = cos * (x - cx) + sin * (y - cy) + cx;\n  const ny = cos * (y - cy) - sin * (x - cx) + cy;\n\n  return [nx, ny];\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport debounce from \"lodash/debounce\";\n\nimport * as animate from \"../../../helpers/animate\";\n\nexport default class extends Controller {\n  static targets = [\"roofPlaneSelect\", \"distanceTextField\", \"toggleVisibilityIcon\", \"roofPlaneGuideLinesContainer\"];\n\n  connect() {\n    this.element.controller = this;\n    this.changeDistance = debounce(this.changeDistance, 300);\n\n    // Need to give the map controller a chance to load\n    setTimeout(() => {\n      this.#showOnlySelectedRoofPlaneGuideLines();\n    }, 50);\n  }\n\n  selectRoofPlane(event) {\n    const identifier = event.currentTarget.value;\n\n    this.roofPlaneGuideLinesContainerTargets.forEach((container) => {\n      if (container.dataset.identifier === identifier) {\n        animate.show(container, { display: \"flex\" });\n      } else {\n        animate.hide(container, { fadeOut: false });\n      }\n    });\n\n    this.#showOnlySelectedRoofPlaneGuideLines();\n  }\n\n  changeDistance(event) {\n    const field = event.target;\n    const fieldValue = field.value.replace(/[^0-9.]/, \"\");\n    if (field.value !== fieldValue) field.value = fieldValue;\n    if (field.value === \"\") return;\n\n    const segmentIndex = Number.parseInt(field.dataset.segmentIndex);\n    const roofPlaneIdentifier = field.dataset.roofPlaneIdentifier;\n    const distance = Number.parseFloat(fieldValue);\n    this.#mapController.mapModelSynchronizer.setGuideLineDistance(roofPlaneIdentifier, segmentIndex, distance);\n    this.#mapController.markDirty();\n  }\n\n  toggleVisibility(event) {\n    const button = event.currentTarget;\n    const segmentIndex = Number.parseInt(button.dataset.segmentIndex);\n\n    const roofPlaneIdentifier = this.roofPlaneSelectTarget.value;\n    const visible = this.#mapController.mapModelSynchronizer.toggleRoofPlaneGuideLineVisibility(\n      roofPlaneIdentifier,\n      segmentIndex,\n    );\n\n    const icon = button.querySelector(\"i\");\n    this.#toggleVisibilityIcon(icon, visible);\n\n    this.#mapController.markDirty();\n  }\n\n  hideAll(_event) {\n    const roofPlaneIdentifier = this.roofPlaneSelectTarget.value;\n    this.#mapController.mapModelSynchronizer.hideAllRoofPlaneGuideLines(roofPlaneIdentifier);\n    this.#toggleIconsForRoofPlane(roofPlaneIdentifier, false);\n    this.#mapController.markDirty();\n  }\n\n  showAll(_event) {\n    const roofPlaneIdentifier = this.roofPlaneSelectTarget.value;\n    this.#mapController.mapModelSynchronizer.showAllRoofPlaneGuideLines(roofPlaneIdentifier);\n    this.#toggleIconsForRoofPlane(roofPlaneIdentifier, true);\n    this.#mapController.markDirty();\n  }\n\n  updateDistanceValues(project) {\n    project.roofPlanes.forEach((rp) => {\n      this.#distanceFieldsForRoofPlane(rp.identifier).forEach((field) => {\n        const segmentIndex = Number.parseInt(field.dataset.segmentIndex);\n        const guideLine = rp.guideLineForSegmentIndex(segmentIndex);\n        field.value = guideLine.distance;\n      });\n    });\n  }\n\n  #distanceFieldsForRoofPlane(roofPlaneIdentifier) {\n    return this.distanceTextFieldTargets.filter((dtf) => dtf.dataset.roofPlaneIdentifier === roofPlaneIdentifier);\n  }\n\n  #toggleVisibilityIcon(icon, visible) {\n    if (visible) {\n      icon.classList.remove(\"fa-eye-slash\");\n      icon.classList.add(\"fa-eye\");\n    } else {\n      icon.classList.remove(\"fa-eye\");\n      icon.classList.add(\"fa-eye-slash\");\n    }\n  }\n\n  get #mapController() {\n    return document.querySelector(\"[data-controller='bx--layout-editor--map-roof-sections']\")[\n      \"bx--layout-editor--map-roof-sections\"\n    ];\n  }\n\n  #toggleIconsForRoofPlane(roofPlaneIdentifier, visible) {\n    this.toggleVisibilityIconTargets.forEach((icon) => {\n      if (icon.dataset.roofPlaneIdentifier === roofPlaneIdentifier) {\n        this.#toggleVisibilityIcon(icon, visible);\n      }\n    });\n  }\n\n  #showOnlySelectedRoofPlaneGuideLines() {\n    const roofPlaneIdentifier = this.roofPlaneSelectTarget.value;\n    this.#mapController.mapModelSynchronizer.showOnlyRoofPlaneGuideLines(roofPlaneIdentifier);\n    this.toggleVisibilityIconTargets.forEach((icon) => {\n      const visible = icon.dataset.roofPlaneIdentifier !== roofPlaneIdentifier;\n      this.#toggleIconsForRoofPlane(roofPlaneIdentifier, visible);\n    });\n  }\n}\n", "/**\n * @module ol/console\n */\n\n/**\n * @typedef {'info'|'warn'|'error'|'none'} Level\n */\n\n/**\n * @type {Object<Level, number>}\n */\nconst levels = {\n  info: 1,\n  warn: 2,\n  error: 3,\n  none: 4,\n};\n\n/**\n * @type {number}\n */\nlet level = levels.info;\n\n/**\n * Set the logging level.  By default, the level is set to 'info' and all\n * messages will be logged.  Set to 'warn' to only display warnings and errors.\n * Set to 'error' to only display errors.  Set to 'none' to silence all messages.\n *\n * @param {Level} l The new level.\n */\nexport function setLevel(l) {\n  level = levels[l];\n}\n\n/**\n * @param  {...any} args Arguments to log\n */\nexport function log(...args) {\n  if (level > levels.info) {\n    return;\n  }\n  console.log(...args); // eslint-disable-line no-console\n}\n\n/**\n * @param  {...any} args Arguments to log\n */\nexport function warn(...args) {\n  if (level > levels.warn) {\n    return;\n  }\n  console.warn(...args); // eslint-disable-line no-console\n}\n\n/**\n * @param  {...any} args Arguments to log\n */\nexport function error(...args) {\n  if (level > levels.error) {\n    return;\n  }\n  console.error(...args); // eslint-disable-line no-console\n}\n", "/**\n * @module ol/extent/Relationship\n */\n\n/**\n * Relationship to an extent.\n * @enum {number}\n */\nexport default {\n  UNKNOWN: 0,\n  INTERSECTING: 1,\n  ABOVE: 2,\n  RIGHT: 4,\n  BELOW: 8,\n  LEFT: 16,\n};\n", "/**\n * @module ol/extent\n */\nimport Relationship from './extent/Relationship.js';\n\n/**\n * An array of numbers representing an extent: `[minx, miny, maxx, maxy]`.\n * @typedef {Array<number>} Extent\n * @api\n */\n\n/**\n * Extent corner.\n * @typedef {'bottom-left' | 'bottom-right' | 'top-left' | 'top-right'} Corner\n */\n\n/**\n * Build an extent that includes all given coordinates.\n *\n * @param {Array<import(\"./coordinate.js\").Coordinate>} coordinates Coordinates.\n * @return {Extent} Bounding extent.\n * @api\n */\nexport function boundingExtent(coordinates) {\n  const extent = createEmpty();\n  for (let i = 0, ii = coordinates.length; i < ii; ++i) {\n    extendCoordinate(extent, coordinates[i]);\n  }\n  return extent;\n}\n\n/**\n * @param {Array<number>} xs Xs.\n * @param {Array<number>} ys Ys.\n * @param {Extent} [dest] Destination extent.\n * @private\n * @return {Extent} Extent.\n */\nfunction _boundingExtentXYs(xs, ys, dest) {\n  const minX = Math.min.apply(null, xs);\n  const minY = Math.min.apply(null, ys);\n  const maxX = Math.max.apply(null, xs);\n  const maxY = Math.max.apply(null, ys);\n  return createOrUpdate(minX, minY, maxX, maxY, dest);\n}\n\n/**\n * Return extent increased by the provided value.\n * @param {Extent} extent Extent.\n * @param {number} value The amount by which the extent should be buffered.\n * @param {Extent} [dest] Extent.\n * @return {Extent} Extent.\n * @api\n */\nexport function buffer(extent, value, dest) {\n  if (dest) {\n    dest[0] = extent[0] - value;\n    dest[1] = extent[1] - value;\n    dest[2] = extent[2] + value;\n    dest[3] = extent[3] + value;\n    return dest;\n  }\n  return [\n    extent[0] - value,\n    extent[1] - value,\n    extent[2] + value,\n    extent[3] + value,\n  ];\n}\n\n/**\n * Creates a clone of an extent.\n *\n * @param {Extent} extent Extent to clone.\n * @param {Extent} [dest] Extent.\n * @return {Extent} The clone.\n */\nexport function clone(extent, dest) {\n  if (dest) {\n    dest[0] = extent[0];\n    dest[1] = extent[1];\n    dest[2] = extent[2];\n    dest[3] = extent[3];\n    return dest;\n  }\n  return extent.slice();\n}\n\n/**\n * @param {Extent} extent Extent.\n * @param {number} x X.\n * @param {number} y Y.\n * @return {number} Closest squared distance.\n */\nexport function closestSquaredDistanceXY(extent, x, y) {\n  let dx, dy;\n  if (x < extent[0]) {\n    dx = extent[0] - x;\n  } else if (extent[2] < x) {\n    dx = x - extent[2];\n  } else {\n    dx = 0;\n  }\n  if (y < extent[1]) {\n    dy = extent[1] - y;\n  } else if (extent[3] < y) {\n    dy = y - extent[3];\n  } else {\n    dy = 0;\n  }\n  return dx * dx + dy * dy;\n}\n\n/**\n * Check if the passed coordinate is contained or on the edge of the extent.\n *\n * @param {Extent} extent Extent.\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate.\n * @return {boolean} The coordinate is contained in the extent.\n * @api\n */\nexport function containsCoordinate(extent, coordinate) {\n  return containsXY(extent, coordinate[0], coordinate[1]);\n}\n\n/**\n * Check if one extent contains another.\n *\n * An extent is deemed contained if it lies completely within the other extent,\n * including if they share one or more edges.\n *\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent 2.\n * @return {boolean} The second extent is contained by or on the edge of the\n *     first.\n * @api\n */\nexport function containsExtent(extent1, extent2) {\n  return (\n    extent1[0] <= extent2[0] &&\n    extent2[2] <= extent1[2] &&\n    extent1[1] <= extent2[1] &&\n    extent2[3] <= extent1[3]\n  );\n}\n\n/**\n * Check if the passed coordinate is contained or on the edge of the extent.\n *\n * @param {Extent} extent Extent.\n * @param {number} x X coordinate.\n * @param {number} y Y coordinate.\n * @return {boolean} The x, y values are contained in the extent.\n * @api\n */\nexport function containsXY(extent, x, y) {\n  return extent[0] <= x && x <= extent[2] && extent[1] <= y && y <= extent[3];\n}\n\n/**\n * Get the relationship between a coordinate and extent.\n * @param {Extent} extent The extent.\n * @param {import(\"./coordinate.js\").Coordinate} coordinate The coordinate.\n * @return {import(\"./extent/Relationship.js\").default} The relationship (bitwise compare with\n *     import(\"./extent/Relationship.js\").Relationship).\n */\nexport function coordinateRelationship(extent, coordinate) {\n  const minX = extent[0];\n  const minY = extent[1];\n  const maxX = extent[2];\n  const maxY = extent[3];\n  const x = coordinate[0];\n  const y = coordinate[1];\n  let relationship = Relationship.UNKNOWN;\n  if (x < minX) {\n    relationship = relationship | Relationship.LEFT;\n  } else if (x > maxX) {\n    relationship = relationship | Relationship.RIGHT;\n  }\n  if (y < minY) {\n    relationship = relationship | Relationship.BELOW;\n  } else if (y > maxY) {\n    relationship = relationship | Relationship.ABOVE;\n  }\n  if (relationship === Relationship.UNKNOWN) {\n    relationship = Relationship.INTERSECTING;\n  }\n  return relationship;\n}\n\n/**\n * Create an empty extent.\n * @return {Extent} Empty extent.\n * @api\n */\nexport function createEmpty() {\n  return [Infinity, Infinity, -Infinity, -Infinity];\n}\n\n/**\n * Create a new extent or update the provided extent.\n * @param {number} minX Minimum X.\n * @param {number} minY Minimum Y.\n * @param {number} maxX Maximum X.\n * @param {number} maxY Maximum Y.\n * @param {Extent} [dest] Destination extent.\n * @return {Extent} Extent.\n */\nexport function createOrUpdate(minX, minY, maxX, maxY, dest) {\n  if (dest) {\n    dest[0] = minX;\n    dest[1] = minY;\n    dest[2] = maxX;\n    dest[3] = maxY;\n    return dest;\n  }\n  return [minX, minY, maxX, maxY];\n}\n\n/**\n * Create a new empty extent or make the provided one empty.\n * @param {Extent} [dest] Extent.\n * @return {Extent} Extent.\n */\nexport function createOrUpdateEmpty(dest) {\n  return createOrUpdate(Infinity, Infinity, -Infinity, -Infinity, dest);\n}\n\n/**\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {Extent} [dest] Extent.\n * @return {Extent} Extent.\n */\nexport function createOrUpdateFromCoordinate(coordinate, dest) {\n  const x = coordinate[0];\n  const y = coordinate[1];\n  return createOrUpdate(x, y, x, y, dest);\n}\n\n/**\n * @param {Array<import(\"./coordinate.js\").Coordinate>} coordinates Coordinates.\n * @param {Extent} [dest] Extent.\n * @return {Extent} Extent.\n */\nexport function createOrUpdateFromCoordinates(coordinates, dest) {\n  const extent = createOrUpdateEmpty(dest);\n  return extendCoordinates(extent, coordinates);\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {Extent} [dest] Extent.\n * @return {Extent} Extent.\n */\nexport function createOrUpdateFromFlatCoordinates(\n  flatCoordinates,\n  offset,\n  end,\n  stride,\n  dest,\n) {\n  const extent = createOrUpdateEmpty(dest);\n  return extendFlatCoordinates(extent, flatCoordinates, offset, end, stride);\n}\n\n/**\n * @param {Array<Array<import(\"./coordinate.js\").Coordinate>>} rings Rings.\n * @param {Extent} [dest] Extent.\n * @return {Extent} Extent.\n */\nexport function createOrUpdateFromRings(rings, dest) {\n  const extent = createOrUpdateEmpty(dest);\n  return extendRings(extent, rings);\n}\n\n/**\n * Determine if two extents are equivalent.\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent 2.\n * @return {boolean} The two extents are equivalent.\n * @api\n */\nexport function equals(extent1, extent2) {\n  return (\n    extent1[0] == extent2[0] &&\n    extent1[2] == extent2[2] &&\n    extent1[1] == extent2[1] &&\n    extent1[3] == extent2[3]\n  );\n}\n\n/**\n * Determine if two extents are approximately equivalent.\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent 2.\n * @param {number} tolerance Tolerance in extent coordinate units.\n * @return {boolean} The two extents differ by less than the tolerance.\n */\nexport function approximatelyEquals(extent1, extent2, tolerance) {\n  return (\n    Math.abs(extent1[0] - extent2[0]) < tolerance &&\n    Math.abs(extent1[2] - extent2[2]) < tolerance &&\n    Math.abs(extent1[1] - extent2[1]) < tolerance &&\n    Math.abs(extent1[3] - extent2[3]) < tolerance\n  );\n}\n\n/**\n * Modify an extent to include another extent.\n * @param {Extent} extent1 The extent to be modified.\n * @param {Extent} extent2 The extent that will be included in the first.\n * @return {Extent} A reference to the first (extended) extent.\n * @api\n */\nexport function extend(extent1, extent2) {\n  if (extent2[0] < extent1[0]) {\n    extent1[0] = extent2[0];\n  }\n  if (extent2[2] > extent1[2]) {\n    extent1[2] = extent2[2];\n  }\n  if (extent2[1] < extent1[1]) {\n    extent1[1] = extent2[1];\n  }\n  if (extent2[3] > extent1[3]) {\n    extent1[3] = extent2[3];\n  }\n  return extent1;\n}\n\n/**\n * @param {Extent} extent Extent.\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate.\n */\nexport function extendCoordinate(extent, coordinate) {\n  if (coordinate[0] < extent[0]) {\n    extent[0] = coordinate[0];\n  }\n  if (coordinate[0] > extent[2]) {\n    extent[2] = coordinate[0];\n  }\n  if (coordinate[1] < extent[1]) {\n    extent[1] = coordinate[1];\n  }\n  if (coordinate[1] > extent[3]) {\n    extent[3] = coordinate[1];\n  }\n}\n\n/**\n * @param {Extent} extent Extent.\n * @param {Array<import(\"./coordinate.js\").Coordinate>} coordinates Coordinates.\n * @return {Extent} Extent.\n */\nexport function extendCoordinates(extent, coordinates) {\n  for (let i = 0, ii = coordinates.length; i < ii; ++i) {\n    extendCoordinate(extent, coordinates[i]);\n  }\n  return extent;\n}\n\n/**\n * @param {Extent} extent Extent.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {Extent} Extent.\n */\nexport function extendFlatCoordinates(\n  extent,\n  flatCoordinates,\n  offset,\n  end,\n  stride,\n) {\n  for (; offset < end; offset += stride) {\n    extendXY(extent, flatCoordinates[offset], flatCoordinates[offset + 1]);\n  }\n  return extent;\n}\n\n/**\n * @param {Extent} extent Extent.\n * @param {Array<Array<import(\"./coordinate.js\").Coordinate>>} rings Rings.\n * @return {Extent} Extent.\n */\nexport function extendRings(extent, rings) {\n  for (let i = 0, ii = rings.length; i < ii; ++i) {\n    extendCoordinates(extent, rings[i]);\n  }\n  return extent;\n}\n\n/**\n * @param {Extent} extent Extent.\n * @param {number} x X.\n * @param {number} y Y.\n */\nexport function extendXY(extent, x, y) {\n  extent[0] = Math.min(extent[0], x);\n  extent[1] = Math.min(extent[1], y);\n  extent[2] = Math.max(extent[2], x);\n  extent[3] = Math.max(extent[3], y);\n}\n\n/**\n * This function calls `callback` for each corner of the extent. If the\n * callback returns a truthy value the function returns that value\n * immediately. Otherwise the function returns `false`.\n * @param {Extent} extent Extent.\n * @param {function(import(\"./coordinate.js\").Coordinate): S} callback Callback.\n * @return {S|boolean} Value.\n * @template S\n */\nexport function forEachCorner(extent, callback) {\n  let val;\n  val = callback(getBottomLeft(extent));\n  if (val) {\n    return val;\n  }\n  val = callback(getBottomRight(extent));\n  if (val) {\n    return val;\n  }\n  val = callback(getTopRight(extent));\n  if (val) {\n    return val;\n  }\n  val = callback(getTopLeft(extent));\n  if (val) {\n    return val;\n  }\n  return false;\n}\n\n/**\n * Get the size of an extent.\n * @param {Extent} extent Extent.\n * @return {number} Area.\n * @api\n */\nexport function getArea(extent) {\n  let area = 0;\n  if (!isEmpty(extent)) {\n    area = getWidth(extent) * getHeight(extent);\n  }\n  return area;\n}\n\n/**\n * Get the bottom left coordinate of an extent.\n * @param {Extent} extent Extent.\n * @return {import(\"./coordinate.js\").Coordinate} Bottom left coordinate.\n * @api\n */\nexport function getBottomLeft(extent) {\n  return [extent[0], extent[1]];\n}\n\n/**\n * Get the bottom right coordinate of an extent.\n * @param {Extent} extent Extent.\n * @return {import(\"./coordinate.js\").Coordinate} Bottom right coordinate.\n * @api\n */\nexport function getBottomRight(extent) {\n  return [extent[2], extent[1]];\n}\n\n/**\n * Get the center coordinate of an extent.\n * @param {Extent} extent Extent.\n * @return {import(\"./coordinate.js\").Coordinate} Center.\n * @api\n */\nexport function getCenter(extent) {\n  return [(extent[0] + extent[2]) / 2, (extent[1] + extent[3]) / 2];\n}\n\n/**\n * Get a corner coordinate of an extent.\n * @param {Extent} extent Extent.\n * @param {Corner} corner Corner.\n * @return {import(\"./coordinate.js\").Coordinate} Corner coordinate.\n */\nexport function getCorner(extent, corner) {\n  let coordinate;\n  if (corner === 'bottom-left') {\n    coordinate = getBottomLeft(extent);\n  } else if (corner === 'bottom-right') {\n    coordinate = getBottomRight(extent);\n  } else if (corner === 'top-left') {\n    coordinate = getTopLeft(extent);\n  } else if (corner === 'top-right') {\n    coordinate = getTopRight(extent);\n  } else {\n    throw new Error('Invalid corner');\n  }\n  return coordinate;\n}\n\n/**\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent 2.\n * @return {number} Enlarged area.\n */\nexport function getEnlargedArea(extent1, extent2) {\n  const minX = Math.min(extent1[0], extent2[0]);\n  const minY = Math.min(extent1[1], extent2[1]);\n  const maxX = Math.max(extent1[2], extent2[2]);\n  const maxY = Math.max(extent1[3], extent2[3]);\n  return (maxX - minX) * (maxY - minY);\n}\n\n/**\n * @param {import(\"./coordinate.js\").Coordinate} center Center.\n * @param {number} resolution Resolution.\n * @param {number} rotation Rotation.\n * @param {import(\"./size.js\").Size} size Size.\n * @param {Extent} [dest] Destination extent.\n * @return {Extent} Extent.\n */\nexport function getForViewAndSize(center, resolution, rotation, size, dest) {\n  const [x0, y0, x1, y1, x2, y2, x3, y3] = getRotatedViewport(\n    center,\n    resolution,\n    rotation,\n    size,\n  );\n  return createOrUpdate(\n    Math.min(x0, x1, x2, x3),\n    Math.min(y0, y1, y2, y3),\n    Math.max(x0, x1, x2, x3),\n    Math.max(y0, y1, y2, y3),\n    dest,\n  );\n}\n\n/**\n * @param {import(\"./coordinate.js\").Coordinate} center Center.\n * @param {number} resolution Resolution.\n * @param {number} rotation Rotation.\n * @param {import(\"./size.js\").Size} size Size.\n * @return {Array<number>} Linear ring representing the viewport.\n */\nexport function getRotatedViewport(center, resolution, rotation, size) {\n  const dx = (resolution * size[0]) / 2;\n  const dy = (resolution * size[1]) / 2;\n  const cosRotation = Math.cos(rotation);\n  const sinRotation = Math.sin(rotation);\n  const xCos = dx * cosRotation;\n  const xSin = dx * sinRotation;\n  const yCos = dy * cosRotation;\n  const ySin = dy * sinRotation;\n  const x = center[0];\n  const y = center[1];\n  return [\n    x - xCos + ySin,\n    y - xSin - yCos,\n    x - xCos - ySin,\n    y - xSin + yCos,\n    x + xCos - ySin,\n    y + xSin + yCos,\n    x + xCos + ySin,\n    y + xSin - yCos,\n    x - xCos + ySin,\n    y - xSin - yCos,\n  ];\n}\n\n/**\n * Get the height of an extent.\n * @param {Extent} extent Extent.\n * @return {number} Height.\n * @api\n */\nexport function getHeight(extent) {\n  return extent[3] - extent[1];\n}\n\n/**\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent 2.\n * @return {number} Intersection area.\n */\nexport function getIntersectionArea(extent1, extent2) {\n  const intersection = getIntersection(extent1, extent2);\n  return getArea(intersection);\n}\n\n/**\n * Get the intersection of two extents.\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent 2.\n * @param {Extent} [dest] Optional extent to populate with intersection.\n * @return {Extent} Intersecting extent.\n * @api\n */\nexport function getIntersection(extent1, extent2, dest) {\n  const intersection = dest ? dest : createEmpty();\n  if (intersects(extent1, extent2)) {\n    if (extent1[0] > extent2[0]) {\n      intersection[0] = extent1[0];\n    } else {\n      intersection[0] = extent2[0];\n    }\n    if (extent1[1] > extent2[1]) {\n      intersection[1] = extent1[1];\n    } else {\n      intersection[1] = extent2[1];\n    }\n    if (extent1[2] < extent2[2]) {\n      intersection[2] = extent1[2];\n    } else {\n      intersection[2] = extent2[2];\n    }\n    if (extent1[3] < extent2[3]) {\n      intersection[3] = extent1[3];\n    } else {\n      intersection[3] = extent2[3];\n    }\n  } else {\n    createOrUpdateEmpty(intersection);\n  }\n  return intersection;\n}\n\n/**\n * Get the difference between two extents, i.e. the area(s) of `extent1` that\n * are not covered by `extent2`.  Returns an array of between 0 and 4 extents.\n *\n * When the extents do not intersect the returned array contains `extent1` as\n * its only element.  When `extent2` completely contains `extent1` the returned\n * array is empty.  Otherwise up to four non-overlapping extents are returned\n * that together cover exactly the parts of `extent1` outside `extent2`.\n *\n * The decomposition used is:\n *\n * ```\n * \u250C\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2510  \u2190 y2\n * \u2502    \u2502   top   \u2502    \u2502\n * \u2502    \u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524    \u2502  \u2190 iy2\n * \u2502left\u2502 (gone)  \u2502right\u2502\n * \u2502    \u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524    \u2502  \u2190 iy1\n * \u2502    \u2502 bottom  \u2502    \u2502\n * \u2514\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2518  \u2190 y1\n * x1  ix1       ix2   x2\n * ```\n *\n * The left and right strips span the full height of `extent1` while the top\n * and bottom strips are clamped horizontally to the intersection, so the four\n * rectangles tile perfectly without overlap or gaps.\n *\n * @param {Extent} extent1 Extent to subtract from.\n * @param {Extent} extent2 Extent to subtract.\n * @return {Array<Extent>} Remaining extents (0\u20134 elements).\n * @api\n */\nexport function getDifference(extent1, extent2) {\n  if (!intersects(extent1, extent2)) {\n    return [extent1.slice()];\n  }\n  if (containsExtent(extent2, extent1)) {\n    return [];\n  }\n\n  const [x1, y1, x2, y2] = extent1;\n  const ix1 = Math.max(x1, extent2[0]);\n  const iy1 = Math.max(y1, extent2[1]);\n  const ix2 = Math.min(x2, extent2[2]);\n  const iy2 = Math.min(y2, extent2[3]);\n\n  const result = [];\n\n  // Left strip  (full height of extent1)\n  if (ix1 > x1) {\n    result.push([x1, y1, ix1, y2]);\n  }\n  // Right strip (full height of extent1)\n  if (ix2 < x2) {\n    result.push([ix2, y1, x2, y2]);\n  }\n  // Bottom strip (between the left and right strips)\n  if (iy1 > y1) {\n    result.push([ix1, y1, ix2, iy1]);\n  }\n  // Top strip (between the left and right strips)\n  if (iy2 < y2) {\n    result.push([ix1, iy2, ix2, y2]);\n  }\n\n  return result;\n}\n\n/**\n * @param {Extent} extent Extent.\n * @return {number} Margin.\n */\nexport function getMargin(extent) {\n  return getWidth(extent) + getHeight(extent);\n}\n\n/**\n * Get the size (width, height) of an extent.\n * @param {Extent} extent The extent.\n * @return {import(\"./size.js\").Size} The extent size.\n * @api\n */\nexport function getSize(extent) {\n  return [extent[2] - extent[0], extent[3] - extent[1]];\n}\n\n/**\n * Get the top left coordinate of an extent.\n * @param {Extent} extent Extent.\n * @return {import(\"./coordinate.js\").Coordinate} Top left coordinate.\n * @api\n */\nexport function getTopLeft(extent) {\n  return [extent[0], extent[3]];\n}\n\n/**\n * Get the top right coordinate of an extent.\n * @param {Extent} extent Extent.\n * @return {import(\"./coordinate.js\").Coordinate} Top right coordinate.\n * @api\n */\nexport function getTopRight(extent) {\n  return [extent[2], extent[3]];\n}\n\n/**\n * Get the width of an extent.\n * @param {Extent} extent Extent.\n * @return {number} Width.\n * @api\n */\nexport function getWidth(extent) {\n  return extent[2] - extent[0];\n}\n\n/**\n * Determine if one extent intersects another.\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent.\n * @return {boolean} The two extents intersect.\n * @api\n */\nexport function intersects(extent1, extent2) {\n  return (\n    extent1[0] <= extent2[2] &&\n    extent1[2] >= extent2[0] &&\n    extent1[1] <= extent2[3] &&\n    extent1[3] >= extent2[1]\n  );\n}\n\n/**\n * Determine if an extent is empty.\n * @param {Extent} extent Extent.\n * @return {boolean} Is empty.\n * @api\n */\nexport function isEmpty(extent) {\n  return extent[2] < extent[0] || extent[3] < extent[1];\n}\n\n/**\n * @param {Extent} extent Extent.\n * @param {Extent} [dest] Extent.\n * @return {Extent} Extent.\n */\nexport function returnOrUpdate(extent, dest) {\n  if (dest) {\n    dest[0] = extent[0];\n    dest[1] = extent[1];\n    dest[2] = extent[2];\n    dest[3] = extent[3];\n    return dest;\n  }\n  return extent;\n}\n\n/**\n * @param {Extent} extent Extent.\n * @param {number} value Value.\n */\nexport function scaleFromCenter(extent, value) {\n  const deltaX = ((extent[2] - extent[0]) / 2) * (value - 1);\n  const deltaY = ((extent[3] - extent[1]) / 2) * (value - 1);\n  extent[0] -= deltaX;\n  extent[2] += deltaX;\n  extent[1] -= deltaY;\n  extent[3] += deltaY;\n}\n\n/**\n * Determine if the segment between two coordinates intersects (crosses,\n * touches, or is contained by) the provided extent.\n * @param {Extent} extent The extent.\n * @param {import(\"./coordinate.js\").Coordinate} start Segment start coordinate.\n * @param {import(\"./coordinate.js\").Coordinate} end Segment end coordinate.\n * @return {boolean} The segment intersects the extent.\n */\nexport function intersectsSegment(extent, start, end) {\n  let intersects = false;\n  const startRel = coordinateRelationship(extent, start);\n  const endRel = coordinateRelationship(extent, end);\n  if (\n    startRel === Relationship.INTERSECTING ||\n    endRel === Relationship.INTERSECTING\n  ) {\n    intersects = true;\n  } else {\n    const minX = extent[0];\n    const minY = extent[1];\n    const maxX = extent[2];\n    const maxY = extent[3];\n    const startX = start[0];\n    const startY = start[1];\n    const endX = end[0];\n    const endY = end[1];\n    const slope = (endY - startY) / (endX - startX);\n    let x, y;\n    if (!!(endRel & Relationship.ABOVE) && !(startRel & Relationship.ABOVE)) {\n      // potentially intersects top\n      x = endX - (endY - maxY) / slope;\n      intersects = x >= minX && x <= maxX;\n    }\n    if (\n      !intersects &&\n      !!(endRel & Relationship.RIGHT) &&\n      !(startRel & Relationship.RIGHT)\n    ) {\n      // potentially intersects right\n      y = endY - (endX - maxX) * slope;\n      intersects = y >= minY && y <= maxY;\n    }\n    if (\n      !intersects &&\n      !!(endRel & Relationship.BELOW) &&\n      !(startRel & Relationship.BELOW)\n    ) {\n      // potentially intersects bottom\n      x = endX - (endY - minY) / slope;\n      intersects = x >= minX && x <= maxX;\n    }\n    if (\n      !intersects &&\n      !!(endRel & Relationship.LEFT) &&\n      !(startRel & Relationship.LEFT)\n    ) {\n      // potentially intersects left\n      y = endY - (endX - minX) * slope;\n      intersects = y >= minY && y <= maxY;\n    }\n  }\n  return intersects;\n}\n\n/**\n * Apply a transform function to the extent.\n * @param {Extent} extent Extent.\n * @param {import(\"./proj.js\").TransformFunction} transformFn Transform function.\n * Called with `[minX, minY, maxX, maxY]` extent coordinates.\n * @param {Extent} [dest] Destination extent.\n * @param {number} [stops] Number of stops per side used for the transform.\n * By default only the corners are used.\n * @return {Extent} Extent.\n * @api\n */\nexport function applyTransform(extent, transformFn, dest, stops) {\n  if (isEmpty(extent)) {\n    return createOrUpdateEmpty(dest);\n  }\n  let coordinates = [];\n  if (stops > 1) {\n    const width = extent[2] - extent[0];\n    const height = extent[3] - extent[1];\n    for (let i = 0; i < stops; ++i) {\n      coordinates.push(\n        extent[0] + (width * i) / stops,\n        extent[1],\n        extent[2],\n        extent[1] + (height * i) / stops,\n        extent[2] - (width * i) / stops,\n        extent[3],\n        extent[0],\n        extent[3] - (height * i) / stops,\n      );\n    }\n  } else {\n    coordinates = [\n      extent[0],\n      extent[1],\n      extent[2],\n      extent[1],\n      extent[2],\n      extent[3],\n      extent[0],\n      extent[3],\n    ];\n  }\n  transformFn(coordinates, coordinates, 2);\n  const xs = [];\n  const ys = [];\n  for (let i = 0, l = coordinates.length; i < l; i += 2) {\n    xs.push(coordinates[i]);\n    ys.push(coordinates[i + 1]);\n  }\n  return _boundingExtentXYs(xs, ys, dest);\n}\n\n/**\n * Modifies the provided extent in-place to be within the real world\n * extent.\n *\n * @param {Extent} extent Extent.\n * @param {import(\"./proj/Projection.js\").default} projection Projection\n * @return {Extent} The extent within the real world extent.\n */\nexport function wrapX(extent, projection) {\n  const projectionExtent = projection.getExtent();\n  const center = getCenter(extent);\n  if (\n    projection.canWrapX() &&\n    (center[0] < projectionExtent[0] || center[0] >= projectionExtent[2])\n  ) {\n    const worldWidth = getWidth(projectionExtent);\n    const worldsAway = Math.floor(\n      (center[0] - projectionExtent[0]) / worldWidth,\n    );\n    const offset = worldsAway * worldWidth;\n    extent[0] -= offset;\n    extent[2] -= offset;\n  }\n  return extent;\n}\n\n/**\n * Fits the extent to the real world\n *\n * If the extent does not cross the anti meridian, this will return the extent in an array\n * If the extent crosses the anti meridian, the extent will be sliced, so each part fits within the\n * real world\n *\n *\n * @param {Extent} extent Extent.\n * @param {import(\"./proj/Projection.js\").default} projection Projection\n * @param {boolean} [multiWorld] Return all worlds\n * @return {Array<Extent>} The extent within the real world extent.\n */\nexport function wrapAndSliceX(extent, projection, multiWorld) {\n  if (projection.canWrapX()) {\n    const projectionExtent = projection.getExtent();\n\n    if (!isFinite(extent[0]) || !isFinite(extent[2])) {\n      return [[projectionExtent[0], extent[1], projectionExtent[2], extent[3]]];\n    }\n\n    wrapX(extent, projection);\n    const worldWidth = getWidth(projectionExtent);\n\n    if (getWidth(extent) > worldWidth && !multiWorld) {\n      // the extent wraps around on itself\n      return [[projectionExtent[0], extent[1], projectionExtent[2], extent[3]]];\n    }\n    if (extent[0] < projectionExtent[0]) {\n      // the extent crosses the anti meridian, so it needs to be sliced\n      return [\n        [extent[0] + worldWidth, extent[1], projectionExtent[2], extent[3]],\n        [projectionExtent[0], extent[1], extent[2], extent[3]],\n      ];\n    }\n    if (extent[2] > projectionExtent[2]) {\n      // the extent crosses the anti meridian, so it needs to be sliced\n      return [\n        [extent[0], extent[1], projectionExtent[2], extent[3]],\n        [projectionExtent[0], extent[1], extent[2] - worldWidth, extent[3]],\n      ];\n    }\n  }\n\n  return [extent];\n}\n\n/**\n * Subtract several rectangles from a base rectangle. Returns a set of disjoint\n * rectangles that together cover the base rectangle minus the union of the\n * subtracted rectangles, by repeatedly applying {@link module:ol/extent.getDifference}.\n * @param {Extent} base Base rectangle.\n * @param {Array<Extent>} subtract Rectangles to subtract.\n * @return {Array<Extent>} Remainder rectangles.\n */\nexport function subtractExtents(base, subtract) {\n  let remainder = [base];\n  for (let i = 0, ii = subtract.length; i < ii && remainder.length > 0; ++i) {\n    /** @type {Array<Extent>} */\n    const next = [];\n    for (let j = 0, jj = remainder.length; j < jj; ++j) {\n      next.push(...getDifference(remainder[j], subtract[i]));\n    }\n    remainder = next;\n  }\n  return remainder;\n}\n", "/**\n * @module ol/math\n */\n\n/**\n * Takes a number and clamps it to within the provided bounds.\n * @param {number} value The input number.\n * @param {number} min The minimum value to return.\n * @param {number} max The maximum value to return.\n * @return {number} The input number if it is within bounds, or the nearest\n *     number within the bounds.\n */\nexport function clamp(value, min, max) {\n  return Math.min(Math.max(value, min), max);\n}\n\n/**\n * Returns the square of the closest distance between the point (x, y) and the\n * line segment (x1, y1) to (x2, y2).\n * @param {number} x X.\n * @param {number} y Y.\n * @param {number} x1 X1.\n * @param {number} y1 Y1.\n * @param {number} x2 X2.\n * @param {number} y2 Y2.\n * @return {number} Squared distance.\n */\nexport function squaredSegmentDistance(x, y, x1, y1, x2, y2) {\n  const dx = x2 - x1;\n  const dy = y2 - y1;\n  if (dx !== 0 || dy !== 0) {\n    const t = ((x - x1) * dx + (y - y1) * dy) / (dx * dx + dy * dy);\n    if (t > 1) {\n      x1 = x2;\n      y1 = y2;\n    } else if (t > 0) {\n      x1 += dx * t;\n      y1 += dy * t;\n    }\n  }\n  return squaredDistance(x, y, x1, y1);\n}\n\n/**\n * Returns the square of the distance between the points (x1, y1) and (x2, y2).\n * @param {number} x1 X1.\n * @param {number} y1 Y1.\n * @param {number} x2 X2.\n * @param {number} y2 Y2.\n * @return {number} Squared distance.\n */\nexport function squaredDistance(x1, y1, x2, y2) {\n  const dx = x2 - x1;\n  const dy = y2 - y1;\n  return dx * dx + dy * dy;\n}\n\n/**\n * Solves system of linear equations using Gaussian elimination method.\n *\n * @param {Array<Array<number>>} mat Augmented matrix (n x n + 1 column)\n *                                     in row-major order.\n * @return {Array<number>|null} The resulting vector.\n */\nexport function solveLinearSystem(mat) {\n  const n = mat.length;\n\n  for (let i = 0; i < n; i++) {\n    // Find max in the i-th column (ignoring i - 1 first rows)\n    let maxRow = i;\n    let maxEl = Math.abs(mat[i][i]);\n    for (let r = i + 1; r < n; r++) {\n      const absValue = Math.abs(mat[r][i]);\n      if (absValue > maxEl) {\n        maxEl = absValue;\n        maxRow = r;\n      }\n    }\n\n    if (maxEl === 0) {\n      return null; // matrix is singular\n    }\n\n    // Swap max row with i-th (current) row\n    const tmp = mat[maxRow];\n    mat[maxRow] = mat[i];\n    mat[i] = tmp;\n\n    // Subtract the i-th row to make all the remaining rows 0 in the i-th column\n    for (let j = i + 1; j < n; j++) {\n      const coef = -mat[j][i] / mat[i][i];\n      for (let k = i; k < n + 1; k++) {\n        if (i == k) {\n          mat[j][k] = 0;\n        } else {\n          mat[j][k] += coef * mat[i][k];\n        }\n      }\n    }\n  }\n\n  // Solve Ax=b for upper triangular matrix A (mat)\n  const x = new Array(n);\n  for (let l = n - 1; l >= 0; l--) {\n    x[l] = mat[l][n] / mat[l][l];\n    for (let m = l - 1; m >= 0; m--) {\n      mat[m][n] -= mat[m][l] * x[l];\n    }\n  }\n  return x;\n}\n\n/**\n * Converts radians to to degrees.\n *\n * @param {number} angleInRadians Angle in radians.\n * @return {number} Angle in degrees.\n */\nexport function toDegrees(angleInRadians) {\n  return (angleInRadians * 180) / Math.PI;\n}\n\n/**\n * Converts degrees to radians.\n *\n * @param {number} angleInDegrees Angle in degrees.\n * @return {number} Angle in radians.\n */\nexport function toRadians(angleInDegrees) {\n  return (angleInDegrees * Math.PI) / 180;\n}\n\n/**\n * Returns the modulo of a / b, depending on the sign of b.\n *\n * @param {number} a Dividend.\n * @param {number} b Divisor.\n * @return {number} Modulo.\n */\nexport function modulo(a, b) {\n  const r = a % b;\n  return r * b < 0 ? r + b : r;\n}\n\n/**\n * Calculates the linearly interpolated value of x between a and b.\n *\n * @param {number} a Number\n * @param {number} b Number\n * @param {number} x Value to be interpolated.\n * @return {number} Interpolated value.\n */\nexport function lerp(a, b, x) {\n  return a + x * (b - a);\n}\n\n/**\n * Returns a number with a limited number of decimal digits.\n * @param {number} n The input number.\n * @param {number} decimals The maximum number of decimal digits.\n * @return {number} The input number with a limited number of decimal digits.\n */\nexport function toFixed(n, decimals) {\n  const factor = Math.pow(10, decimals);\n  return Math.round(n * factor) / factor;\n}\n\n/**\n * Rounds a number to the nearest integer value considering only the given number\n * of decimal digits (with rounding on the final digit).\n * @param {number} n The input number.\n * @param {number} decimals The maximum number of decimal digits.\n * @return {number} The nearest integer.\n */\nexport function round(n, decimals) {\n  return Math.round(toFixed(n, decimals));\n}\n\n/**\n * Rounds a number to the next smaller integer considering only the given number\n * of decimal digits (with rounding on the final digit).\n * @param {number} n The input number.\n * @param {number} decimals The maximum number of decimal digits.\n * @return {number} The next smaller integer.\n */\nexport function floor(n, decimals) {\n  return Math.floor(toFixed(n, decimals));\n}\n\n/**\n * Rounds a number to the next bigger integer considering only the given number\n * of decimal digits (with rounding on the final digit).\n * @param {number} n The input number.\n * @param {number} decimals The maximum number of decimal digits.\n * @return {number} The next bigger integer.\n */\nexport function ceil(n, decimals) {\n  return Math.ceil(toFixed(n, decimals));\n}\n\n/**\n * Wraps a number between some minimum and maximum values.\n * @param {number} n The number to wrap.\n * @param {number} min The minimum of the range (inclusive).\n * @param {number} max The maximum of the range (exclusive).\n * @return {number} The wrapped number.\n */\nexport function wrap(n, min, max) {\n  if (n >= min && n < max) {\n    return n;\n  }\n  const range = max - min;\n  return ((((n - min) % range) + range) % range) + min;\n}\n", "/**\n * @module ol/coordinate\n */\nimport {getWidth} from './extent.js';\nimport {clamp, modulo, toFixed} from './math.js';\nimport {padNumber} from './string.js';\n\n/**\n * An array of numbers representing an `xy`, `xyz` or `xyzm` coordinate.\n * Example: `[16, 48]`.\n * @typedef {Array<number>} Coordinate\n * @api\n */\n\n/**\n * A function that takes a {@link module:ol/coordinate~Coordinate} and\n * transforms it into a `{string}`.\n *\n * @typedef {function((Coordinate|undefined)): string} CoordinateFormat\n * @api\n */\n\n/**\n * Add `delta` to `coordinate`. `coordinate` is modified in place and returned\n * by the function.\n *\n * Example:\n *\n *     import {add} from 'ol/coordinate.js';\n *\n *     const coord = [7.85, 47.983333];\n *     add(coord, [-2, 4]);\n *     // coord is now [5.85, 51.983333]\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {Coordinate} delta Delta.\n * @return {Coordinate} The input coordinate adjusted by\n * the given delta.\n * @api\n */\nexport function add(coordinate, delta) {\n  coordinate[0] += +delta[0];\n  coordinate[1] += +delta[1];\n  return coordinate;\n}\n\n/**\n * Calculates the point closest to the passed coordinate on the passed circle.\n *\n * @param {Coordinate} coordinate The coordinate.\n * @param {import(\"./geom/Circle.js\").default} circle The circle.\n * @return {Coordinate} Closest point on the circumference.\n */\nexport function closestOnCircle(coordinate, circle) {\n  const r = circle.getRadius();\n  const center = circle.getCenter();\n  const x0 = center[0];\n  const y0 = center[1];\n  const x1 = coordinate[0];\n  const y1 = coordinate[1];\n\n  let dx = x1 - x0;\n  const dy = y1 - y0;\n  if (dx === 0 && dy === 0) {\n    dx = 1;\n  }\n  const d = Math.sqrt(dx * dx + dy * dy);\n\n  const x = x0 + (r * dx) / d;\n  const y = y0 + (r * dy) / d;\n\n  return [x, y];\n}\n\n/**\n * Calculates the point closest to the passed coordinate on the passed segment.\n * This is the foot of the perpendicular of the coordinate to the segment when\n * the foot is on the segment, or the closest segment coordinate when the foot\n * is outside the segment.\n *\n * @param {Coordinate} coordinate The coordinate.\n * @param {Array<Coordinate>} segment The two coordinates\n * of the segment.\n * @return {Coordinate} The foot of the perpendicular of\n * the coordinate to the segment.\n */\nexport function closestOnSegment(coordinate, segment) {\n  const x0 = coordinate[0];\n  const y0 = coordinate[1];\n  const start = segment[0];\n  const end = segment[1];\n  const x1 = start[0];\n  const y1 = start[1];\n  const x2 = end[0];\n  const y2 = end[1];\n  const dx = x2 - x1;\n  const dy = y2 - y1;\n  const along =\n    dx === 0 && dy === 0\n      ? 0\n      : (dx * (x0 - x1) + dy * (y0 - y1)) / (dx * dx + dy * dy || 0);\n  let x, y;\n  if (along <= 0) {\n    x = x1;\n    y = y1;\n  } else if (along >= 1) {\n    x = x2;\n    y = y2;\n  } else {\n    x = x1 + along * dx;\n    y = y1 + along * dy;\n  }\n  return [x, y];\n}\n\n/**\n * Returns a {@link module:ol/coordinate~CoordinateFormat} function that can be\n * used to format\n * a {Coordinate} to a string.\n *\n * Example without specifying the fractional digits:\n *\n *     import {createStringXY} from 'ol/coordinate.js';\n *\n *     const coord = [7.85, 47.983333];\n *     const stringifyFunc = createStringXY();\n *     const out = stringifyFunc(coord);\n *     // out is now '8, 48'\n *\n * Example with explicitly specifying 2 fractional digits:\n *\n *     import {createStringXY} from 'ol/coordinate.js';\n *\n *     const coord = [7.85, 47.983333];\n *     const stringifyFunc = createStringXY(2);\n *     const out = stringifyFunc(coord);\n *     // out is now '7.85, 47.98'\n *\n * @param {number} [fractionDigits] The number of digits to include\n *    after the decimal point. Default is `0`.\n * @return {CoordinateFormat} Coordinate format.\n * @api\n */\nexport function createStringXY(fractionDigits) {\n  return (\n    /**\n     * @param {Coordinate} coordinate Coordinate.\n     * @return {string} String XY.\n     */\n    function (coordinate) {\n      return toStringXY(coordinate, fractionDigits);\n    }\n  );\n}\n\n/**\n * @param {string} hemispheres Hemispheres.\n * @param {number} degrees Degrees.\n * @param {number} [fractionDigits] The number of digits to include\n *    after the decimal point. Default is `0`.\n * @return {string} String.\n */\nexport function degreesToStringHDMS(hemispheres, degrees, fractionDigits) {\n  const normalizedDegrees = modulo(degrees + 180, 360) - 180;\n  const x = Math.abs(3600 * normalizedDegrees);\n  const decimals = fractionDigits || 0;\n\n  let deg = Math.floor(x / 3600);\n  let min = Math.floor((x - deg * 3600) / 60);\n  let sec = toFixed(x - deg * 3600 - min * 60, decimals);\n\n  if (sec >= 60) {\n    sec = 0;\n    min += 1;\n  }\n\n  if (min >= 60) {\n    min = 0;\n    deg += 1;\n  }\n\n  let hdms = deg + '\\u00b0';\n  if (min !== 0 || sec !== 0) {\n    hdms += ' ' + padNumber(min, 2) + '\\u2032';\n  }\n  if (sec !== 0) {\n    hdms += ' ' + padNumber(sec, 2, decimals) + '\\u2033';\n  }\n  if (normalizedDegrees !== 0) {\n    hdms += ' ' + hemispheres.charAt(normalizedDegrees < 0 ? 1 : 0);\n  }\n\n  return hdms;\n}\n\n/**\n * Transforms the given {@link module:ol/coordinate~Coordinate} to a string\n * using the given string template. The strings `{x}` and `{y}` in the template\n * will be replaced with the first and second coordinate values respectively.\n *\n * Example without specifying the fractional digits:\n *\n *     import {format} from 'ol/coordinate.js';\n *\n *     const coord = [7.85, 47.983333];\n *     const template = 'Coordinate is ({x}|{y}).';\n *     const out = format(coord, template);\n *     // out is now 'Coordinate is (8|48).'\n *\n * Example explicitly specifying the fractional digits:\n *\n *     import {format} from 'ol/coordinate.js';\n *\n *     const coord = [7.85, 47.983333];\n *     const template = 'Coordinate is ({x}|{y}).';\n *     const out = format(coord, template, 2);\n *     // out is now 'Coordinate is (7.85|47.98).'\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {string} template A template string with `{x}` and `{y}` placeholders\n *     that will be replaced by first and second coordinate values.\n * @param {number} [fractionDigits] The number of digits to include\n *    after the decimal point. Default is `0`.\n * @return {string} Formatted coordinate.\n * @api\n */\nexport function format(coordinate, template, fractionDigits) {\n  if (coordinate) {\n    return template\n      .replace('{x}', coordinate[0].toFixed(fractionDigits))\n      .replace('{y}', coordinate[1].toFixed(fractionDigits));\n  }\n  return '';\n}\n\n/**\n * @param {Coordinate} coordinate1 First coordinate.\n * @param {Coordinate} coordinate2 Second coordinate.\n * @return {boolean} The two coordinates are equal.\n */\nexport function equals(coordinate1, coordinate2) {\n  let equals = true;\n  for (let i = coordinate1.length - 1; i >= 0; --i) {\n    if (coordinate1[i] != coordinate2[i]) {\n      equals = false;\n      break;\n    }\n  }\n  return equals;\n}\n\n/**\n * Rotate `coordinate` by `angle`. `coordinate` is modified in place and\n * returned by the function.\n *\n * Example:\n *\n *     import {rotate} from 'ol/coordinate.js';\n *\n *     const coord = [7.85, 47.983333];\n *     const rotateRadians = Math.PI / 2; // 90 degrees\n *     rotate(coord, rotateRadians);\n *     // coord is now [-47.983333, 7.85]\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {number} angle Angle in radian.\n * @return {Coordinate} Coordinate.\n * @api\n */\nexport function rotate(coordinate, angle) {\n  const cosAngle = Math.cos(angle);\n  const sinAngle = Math.sin(angle);\n  const x = coordinate[0] * cosAngle - coordinate[1] * sinAngle;\n  const y = coordinate[1] * cosAngle + coordinate[0] * sinAngle;\n  coordinate[0] = x;\n  coordinate[1] = y;\n  return coordinate;\n}\n\n/**\n * Scale `coordinate` by `scale`. `coordinate` is modified in place and returned\n * by the function.\n *\n * Example:\n *\n *     import {scale as scaleCoordinate} from 'ol/coordinate.js';\n *\n *     const coord = [7.85, 47.983333];\n *     const scale = 1.2;\n *     scaleCoordinate(coord, scale);\n *     // coord is now [9.42, 57.5799996]\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {number} scale Scale factor.\n * @return {Coordinate} Coordinate.\n */\nexport function scale(coordinate, scale) {\n  coordinate[0] *= scale;\n  coordinate[1] *= scale;\n  return coordinate;\n}\n\n/**\n * @param {Coordinate} coord1 First coordinate.\n * @param {Coordinate} coord2 Second coordinate.\n * @return {number} Squared distance between coord1 and coord2.\n */\nexport function squaredDistance(coord1, coord2) {\n  const dx = coord1[0] - coord2[0];\n  const dy = coord1[1] - coord2[1];\n  return dx * dx + dy * dy;\n}\n\n/**\n * @param {Coordinate} coord1 First coordinate.\n * @param {Coordinate} coord2 Second coordinate.\n * @return {number} Distance between coord1 and coord2.\n */\nexport function distance(coord1, coord2) {\n  return Math.sqrt(squaredDistance(coord1, coord2));\n}\n\n/**\n * Calculate the squared distance from a coordinate to a line segment.\n *\n * @param {Coordinate} coordinate Coordinate of the point.\n * @param {Array<Coordinate>} segment Line segment (2\n * coordinates).\n * @return {number} Squared distance from the point to the line segment.\n */\nexport function squaredDistanceToSegment(coordinate, segment) {\n  return squaredDistance(coordinate, closestOnSegment(coordinate, segment));\n}\n\n/**\n * Format a geographic coordinate with the hemisphere, degrees, minutes, and\n * seconds.\n *\n * Example without specifying fractional digits:\n *\n *     import {toStringHDMS} from 'ol/coordinate.js';\n *\n *     const coord = [7.85, 47.983333];\n *     const out = toStringHDMS(coord);\n *     // out is now '47\u00B0 58\u2032 60\u2033 N 7\u00B0 50\u2032 60\u2033 E'\n *\n * Example explicitly specifying 1 fractional digit:\n *\n *     import {toStringHDMS} from 'ol/coordinate.js';\n *\n *     const coord = [7.85, 47.983333];\n *     const out = toStringHDMS(coord, 1);\n *     // out is now '47\u00B0 58\u2032 60.0\u2033 N 7\u00B0 50\u2032 60.0\u2033 E'\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {number} [fractionDigits] The number of digits to include\n *    after the decimal point. Default is `0`.\n * @return {string} Hemisphere, degrees, minutes and seconds.\n * @api\n */\nexport function toStringHDMS(coordinate, fractionDigits) {\n  if (coordinate) {\n    return (\n      degreesToStringHDMS('NS', coordinate[1], fractionDigits) +\n      ' ' +\n      degreesToStringHDMS('EW', coordinate[0], fractionDigits)\n    );\n  }\n  return '';\n}\n\n/**\n * Format a coordinate as a comma delimited string.\n *\n * Example without specifying fractional digits:\n *\n *     import {toStringXY} from 'ol/coordinate.js';\n *\n *     const coord = [7.85, 47.983333];\n *     const out = toStringXY(coord);\n *     // out is now '8, 48'\n *\n * Example explicitly specifying 1 fractional digit:\n *\n *     import {toStringXY} from 'ol/coordinate.js';\n *\n *     const coord = [7.85, 47.983333];\n *     const out = toStringXY(coord, 1);\n *     // out is now '7.8, 48.0'\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {number} [fractionDigits] The number of digits to include\n *    after the decimal point. Default is `0`.\n * @return {string} XY.\n * @api\n */\nexport function toStringXY(coordinate, fractionDigits) {\n  return format(coordinate, '{x}, {y}', fractionDigits);\n}\n\n/**\n * Modifies the provided coordinate in-place to be within the real world\n * extent. The lower projection extent boundary is inclusive, the upper one\n * exclusive.\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {import(\"./proj/Projection.js\").default} projection Projection.\n * @return {Coordinate} The coordinate within the real world extent.\n */\nexport function wrapX(coordinate, projection) {\n  if (projection.canWrapX()) {\n    const worldWidth = getWidth(projection.getExtent());\n    const worldsAway = getWorldsAway(coordinate, projection, worldWidth);\n    if (worldsAway) {\n      coordinate[0] -= worldsAway * worldWidth;\n    }\n  }\n  return coordinate;\n}\n/**\n * @param {Coordinate} coordinate Coordinate.\n * @param {import(\"./proj/Projection.js\").default} projection Projection.\n * @param {number} [sourceExtentWidth] Width of the source extent.\n * @return {number} Offset in world widths.\n */\nexport function getWorldsAway(coordinate, projection, sourceExtentWidth) {\n  const projectionExtent = projection.getExtent();\n  let worldsAway = 0;\n  if (\n    projection.canWrapX() &&\n    (coordinate[0] < projectionExtent[0] || coordinate[0] > projectionExtent[2])\n  ) {\n    sourceExtentWidth = sourceExtentWidth || getWidth(projectionExtent);\n    worldsAway = Math.floor(\n      (coordinate[0] - projectionExtent[0]) / sourceExtentWidth,\n    );\n  }\n  return worldsAway;\n}\n\n/**\n * Compute the angle between p0pA and p0pB\n * @param {Coordinate} p0 Point 0\n * @param {Coordinate} pA Point A\n * @param {Coordinate} pB Point B\n * @return {number} a value in [0, 2PI]\n */\nexport function angleBetween(p0, pA, pB) {\n  const lenA = Math.sqrt(\n    (pA[0] - p0[0]) * (pA[0] - p0[0]) + (pA[1] - p0[1]) * (pA[1] - p0[1]),\n  );\n  const tangentA = [(pA[0] - p0[0]) / lenA, (pA[1] - p0[1]) / lenA];\n  const orthoA = [-tangentA[1], tangentA[0]];\n  const lenB = Math.sqrt(\n    (pB[0] - p0[0]) * (pB[0] - p0[0]) + (pB[1] - p0[1]) * (pB[1] - p0[1]),\n  );\n  const tangentB = [(pB[0] - p0[0]) / lenB, (pB[1] - p0[1]) / lenB];\n\n  // this angle can be clockwise or anticlockwise; hence the computation afterwards\n  let angle =\n    lenA === 0 || lenB === 0\n      ? 0\n      : Math.acos(\n          clamp(tangentB[0] * tangentA[0] + tangentB[1] * tangentA[1], -1, 1),\n        );\n  angle = Math.max(angle, 0.00001); // avoid a zero angle otherwise this is detected as a line cap\n  const isClockwise = tangentB[0] * orthoA[0] + tangentB[1] * orthoA[1] > 0;\n  return !isClockwise ? Math.PI * 2 - angle : angle;\n}\n", "/**\n * @module ol/proj/Units\n */\n\n/**\n * @typedef {'radians' | 'degrees' | 'ft' | 'm' | 'pixels' | 'tile-pixels' | 'us-ft'} Units\n * Projection units.\n */\n\n/**\n * See http://duff.ess.washington.edu/data/raster/drg/docs/geotiff.txt\n * @type {Object<number, Units>}\n */\nconst unitByCode = {\n  '9001': 'm',\n  '9002': 'ft',\n  '9003': 'us-ft',\n  '9101': 'radians',\n  '9102': 'degrees',\n};\n\n/**\n * @param {number} code Unit code.\n * @return {Units} Units.\n */\nexport function fromCode(code) {\n  return unitByCode[code];\n}\n\n/**\n * @typedef {Object} MetersPerUnitLookup\n * @property {number} radians Radians\n * @property {number} degrees Degrees\n * @property {number} ft  Feet\n * @property {number} m Meters\n * @property {number} us-ft US feet\n */\n\n/**\n * Meters per unit lookup table.\n * @const\n * @type {MetersPerUnitLookup}\n * @api\n */\nexport const METERS_PER_UNIT = {\n  // use the radius of the Normal sphere\n  'radians': 6370997 / (2 * Math.PI),\n  'degrees': (2 * Math.PI * 6370997) / 360,\n  'ft': 0.3048,\n  'm': 1,\n  'us-ft': 1200 / 3937,\n};\n", "/**\n * @module ol/proj/Projection\n */\nimport {METERS_PER_UNIT} from './Units.js';\n\n/**\n * The function is called with a `number` view resolution and a\n * {@link module:ol/coordinate~Coordinate} as arguments, and returns the `number` resolution\n * in projection units at the passed coordinate.\n * @typedef {function(number, import(\"../coordinate.js\").Coordinate):number} GetPointResolution\n * @api\n */\n\n/**\n * @typedef {Object} Options\n * @property {string} code The SRS identifier code, e.g. `EPSG:4326`.\n * @property {import(\"./Units.js\").Units} [units] Units. Required unless a\n * proj4 projection is defined for `code`.\n * @property {import(\"../extent.js\").Extent} [extent] The validity extent for the SRS.\n * @property {string} [axisOrientation='enu'] The axis orientation as specified in Proj4.\n * @property {boolean} [global=false] Whether the projection is valid for the whole globe.\n * @property {number} [metersPerUnit] The meters per unit for the SRS.\n * If not provided, the `units` are used to get the meters per unit from the {@link METERS_PER_UNIT}\n * lookup table.\n * @property {import(\"../extent.js\").Extent} [worldExtent] The world extent for the SRS.\n * @property {GetPointResolution} [getPointResolution]\n * Function to determine resolution at a point. The function is called with a\n * `number` view resolution and a {@link module:ol/coordinate~Coordinate} as arguments, and returns\n * the `number` resolution in projection units at the passed coordinate. If this is `undefined`,\n * the default {@link module:ol/proj.getPointResolution} function will be used.\n */\n\n/**\n * @classdesc\n * In most cases, you should not need to create instances of this class.\n * Instead, where projection information is required, you can use a string\n * projection code or identifier (e.g. `EPSG:4326`) instead of a projection\n * instance.\n *\n * The library includes support for transforming coordinates between the following\n * projections:\n *\n *  WGS 84 / Geographic - Using codes `EPSG:4326`, `CRS:84`, `urn:ogc:def:crs:EPSG:6.6:4326`,\n *    `urn:ogc:def:crs:OGC:1.3:CRS84`, `urn:ogc:def:crs:OGC:2:84`, `http://www.opengis.net/gml/srs/epsg.xml#4326`,\n *    or `urn:x-ogc:def:crs:EPSG:4326`\n *  WGS 84 / Spherical Mercator - Using codes `EPSG:3857`, `EPSG:102100`, `EPSG:102113`, `EPSG:900913`,\n *    `urn:ogc:def:crs:EPSG:6.18:3:3857`, or `http://www.opengis.net/gml/srs/epsg.xml#3857`\n *  WGS 84 / UTM zones - Using codes `EPSG:32601` through `EPSG:32660` for northern zones\n *    and `EPSG:32701` through `EPSG:32760` for southern zones. Note that the built-in UTM transforms\n *    are lower accuracy (with errors on the order of 0.1 m) than those that you might get in a\n *    library like [proj4js](https://github.com/proj4js/proj4js).\n *\n * For additional projection support, or to use higher accuracy transforms than the built-in ones, you can use\n * the [proj4js](https://github.com/proj4js/proj4js) library. With `proj4js`, after adding any new projection\n * definitions, call the {@link module:ol/proj/proj4.register} function.\n *\n * You can use the {@link module:ol/proj.get} function to retrieve a projection instance\n * for one of the registered projections.\n *\n * @api\n */\nclass Projection {\n  /**\n   * @param {Options} options Projection options.\n   */\n  constructor(options) {\n    /**\n     * @private\n     * @type {string}\n     */\n    this.code_ = options.code;\n\n    /**\n     * Units of projected coordinates. When set to `TILE_PIXELS`, a\n     * `this.extent_` and `this.worldExtent_` must be configured properly for each\n     * tile.\n     * @private\n     * @type {import(\"./Units.js\").Units}\n     */\n    this.units_ = /** @type {import(\"./Units.js\").Units} */ (options.units);\n\n    /**\n     * Validity extent of the projection in projected coordinates. For projections\n     * with `TILE_PIXELS` units, this is the extent of the tile in\n     * tile pixel space.\n     * @private\n     * @type {import(\"../extent.js\").Extent}\n     */\n    this.extent_ = options.extent !== undefined ? options.extent : null;\n\n    /**\n     * Extent of the world in EPSG:4326. For projections with\n     * `TILE_PIXELS` units, this is the extent of the tile in\n     * projected coordinate space.\n     * @private\n     * @type {import(\"../extent.js\").Extent}\n     */\n    this.worldExtent_ =\n      options.worldExtent !== undefined ? options.worldExtent : null;\n\n    /**\n     * @private\n     * @type {string}\n     */\n    this.axisOrientation_ =\n      options.axisOrientation !== undefined ? options.axisOrientation : 'enu';\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.global_ = options.global !== undefined ? options.global : false;\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.canWrapX_ = !!(this.global_ && this.extent_);\n\n    /**\n     * @private\n     * @type {GetPointResolution|undefined}\n     */\n    this.getPointResolutionFunc_ = options.getPointResolution;\n\n    /**\n     * @private\n     * @type {import(\"../tilegrid/TileGrid.js\").default}\n     */\n    this.defaultTileGrid_ = null;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.metersPerUnit_ = options.metersPerUnit;\n  }\n\n  /**\n   * @return {boolean} The projection is suitable for wrapping the x-axis\n   */\n  canWrapX() {\n    return this.canWrapX_;\n  }\n\n  /**\n   * Get the code for this projection, e.g. 'EPSG:4326'.\n   * @return {string} Code.\n   * @api\n   */\n  getCode() {\n    return this.code_;\n  }\n\n  /**\n   * Get the validity extent for this projection.\n   * @return {import(\"../extent.js\").Extent} Extent.\n   * @api\n   */\n  getExtent() {\n    return this.extent_;\n  }\n\n  /**\n   * Get the units of this projection.\n   * @return {import(\"./Units.js\").Units} Units.\n   * @api\n   */\n  getUnits() {\n    return this.units_;\n  }\n\n  /**\n   * Get the amount of meters per unit of this projection.  If the projection is\n   * not configured with `metersPerUnit` or a units identifier, the return is\n   * `undefined`.\n   * @return {number|undefined} Meters.\n   * @api\n   */\n  getMetersPerUnit() {\n    return this.metersPerUnit_ || METERS_PER_UNIT[this.units_];\n  }\n\n  /**\n   * Get the world extent for this projection.\n   * @return {import(\"../extent.js\").Extent} Extent.\n   * @api\n   */\n  getWorldExtent() {\n    return this.worldExtent_;\n  }\n\n  /**\n   * Get the axis orientation of this projection.\n   * Example values are:\n   * enu - the default easting, northing, elevation.\n   * neu - northing, easting, up - useful for \"lat/long\" geographic coordinates,\n   *     or south orientated transverse mercator.\n   * wnu - westing, northing, up - some planetary coordinate systems have\n   *     \"west positive\" coordinate systems\n   * @return {string} Axis orientation.\n   * @api\n   */\n  getAxisOrientation() {\n    return this.axisOrientation_;\n  }\n\n  /**\n   * Is this projection a global projection which spans the whole world?\n   * @return {boolean} Whether the projection is global.\n   * @api\n   */\n  isGlobal() {\n    return this.global_;\n  }\n\n  /**\n   * Set if the projection is a global projection which spans the whole world\n   * @param {boolean} global Whether the projection is global.\n   * @api\n   */\n  setGlobal(global) {\n    this.global_ = global;\n    this.canWrapX_ = !!(global && this.extent_);\n  }\n\n  /**\n   * @return {import(\"../tilegrid/TileGrid.js\").default} The default tile grid.\n   */\n  getDefaultTileGrid() {\n    return this.defaultTileGrid_;\n  }\n\n  /**\n   * @param {import(\"../tilegrid/TileGrid.js\").default} tileGrid The default tile grid.\n   */\n  setDefaultTileGrid(tileGrid) {\n    this.defaultTileGrid_ = tileGrid;\n  }\n\n  /**\n   * Set the validity extent for this projection.\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @api\n   */\n  setExtent(extent) {\n    this.extent_ = extent;\n    this.canWrapX_ = !!(this.global_ && extent);\n  }\n\n  /**\n   * Set the world extent for this projection.\n   * @param {import(\"../extent.js\").Extent} worldExtent World extent\n   *     [minlon, minlat, maxlon, maxlat].\n   * @api\n   */\n  setWorldExtent(worldExtent) {\n    this.worldExtent_ = worldExtent;\n  }\n\n  /**\n   * Set the getPointResolution function (see {@link module:ol/proj.getPointResolution}\n   * for this projection.\n   * @param {function(number, import(\"../coordinate.js\").Coordinate):number} func Function\n   * @api\n   */\n  setGetPointResolution(func) {\n    this.getPointResolutionFunc_ = func;\n  }\n\n  /**\n   * Get the custom point resolution function for this projection (if set).\n   * @return {GetPointResolution|undefined} The custom point\n   * resolution function (if set).\n   */\n  getPointResolutionFunc() {\n    return this.getPointResolutionFunc_;\n  }\n}\n\nexport default Projection;\n", "/**\n * @module ol/proj/epsg3857\n */\nimport Projection from './Projection.js';\n\n/**\n * Radius of WGS84 sphere\n *\n * @const\n * @type {number}\n */\nexport const RADIUS = 6378137;\n\n/**\n * @const\n * @type {number}\n */\nexport const HALF_SIZE = Math.PI * RADIUS;\n\n/**\n * @const\n * @type {import(\"../extent.js\").Extent}\n */\nexport const EXTENT = [-HALF_SIZE, -HALF_SIZE, HALF_SIZE, HALF_SIZE];\n\n/**\n * @const\n * @type {import(\"../extent.js\").Extent}\n */\nexport const WORLD_EXTENT = [-180, -85, 180, 85];\n\n/**\n * Maximum safe value in y direction\n * @const\n * @type {number}\n */\nexport const MAX_SAFE_Y = RADIUS * Math.log(Math.tan(Math.PI / 2));\n\n/**\n * @classdesc\n * Projection object for web/spherical Mercator (EPSG:3857).\n */\nclass EPSG3857Projection extends Projection {\n  /**\n   * @param {string} code Code.\n   */\n  constructor(code) {\n    super({\n      code: code,\n      units: 'm',\n      extent: EXTENT,\n      global: true,\n      worldExtent: WORLD_EXTENT,\n      getPointResolution: function (resolution, point) {\n        return resolution / Math.cosh(point[1] / RADIUS);\n      },\n    });\n  }\n}\n\n/**\n * Projections equal to EPSG:3857.\n *\n * @const\n * @type {Array<import(\"./Projection.js\").default>}\n */\nexport const PROJECTIONS = [\n  new EPSG3857Projection('EPSG:3857'),\n  new EPSG3857Projection('EPSG:102100'),\n  new EPSG3857Projection('EPSG:102113'),\n  new EPSG3857Projection('EPSG:900913'),\n  new EPSG3857Projection('http://www.opengis.net/def/crs/EPSG/0/3857'),\n  new EPSG3857Projection('http://www.opengis.net/gml/srs/epsg.xml#3857'),\n];\n\n/**\n * Transformation from EPSG:4326 to EPSG:3857.\n *\n * @param {Array<number>} input Input array of coordinate values.\n * @param {Array<number>} [output] Output array of coordinate values.\n * @param {number} [dimension] Dimension (default is `2`).\n * @param {number} [stride] Stride (default is `dimension`).\n * @return {Array<number>} Output array of coordinate values.\n */\nexport function fromEPSG4326(input, output, dimension, stride) {\n  const length = input.length;\n  dimension = dimension > 1 ? dimension : 2;\n  stride = stride ?? dimension;\n  if (output === undefined) {\n    if (dimension > 2) {\n      // preserve values beyond second dimension\n      output = input.slice();\n    } else {\n      output = new Array(length);\n    }\n  }\n  for (let i = 0; i < length; i += stride) {\n    output[i] = (HALF_SIZE * input[i]) / 180;\n    let y = RADIUS * Math.log(Math.tan((Math.PI * (+input[i + 1] + 90)) / 360));\n    if (y > MAX_SAFE_Y) {\n      y = MAX_SAFE_Y;\n    } else if (y < -MAX_SAFE_Y) {\n      y = -MAX_SAFE_Y;\n    }\n    output[i + 1] = y;\n  }\n  return output;\n}\n\n/**\n * Transformation from EPSG:3857 to EPSG:4326.\n *\n * @param {Array<number>} input Input array of coordinate values.\n * @param {Array<number>} [output] Output array of coordinate values.\n * @param {number} [dimension] Dimension (default is `2`).\n * @param {number} [stride] Stride (default is `dimension`).\n * @return {Array<number>} Output array of coordinate values.\n */\nexport function toEPSG4326(input, output, dimension, stride) {\n  const length = input.length;\n  dimension = dimension > 1 ? dimension : 2;\n  stride = stride ?? dimension;\n  if (output === undefined) {\n    if (dimension > 2) {\n      // preserve values beyond second dimension\n      output = input.slice();\n    } else {\n      output = new Array(length);\n    }\n  }\n  for (let i = 0; i < length; i += stride) {\n    output[i] = (180 * input[i]) / HALF_SIZE;\n    output[i + 1] =\n      (360 * Math.atan(Math.exp(input[i + 1] / RADIUS))) / Math.PI - 90;\n  }\n  return output;\n}\n", "/**\n * @module ol/proj/epsg4326\n */\nimport Projection from './Projection.js';\n\n/**\n * Semi-major radius of the WGS84 ellipsoid.\n *\n * @const\n * @type {number}\n */\nexport const RADIUS = 6378137;\n\n/**\n * Extent of the EPSG:4326 projection which is the whole world.\n *\n * @const\n * @type {import(\"../extent.js\").Extent}\n */\nexport const EXTENT = [-180, -90, 180, 90];\n\n/**\n * @const\n * @type {number}\n */\nexport const METERS_PER_UNIT = (Math.PI * RADIUS) / 180;\n\n/**\n * @classdesc\n * Projection object for WGS84 geographic coordinates (EPSG:4326).\n *\n * Note that OpenLayers does not strictly comply with the EPSG definition.\n * The EPSG registry defines 4326 as a CRS for Latitude,Longitude (y,x).\n * OpenLayers treats EPSG:4326 as a pseudo-projection, with x,y coordinates.\n */\nclass EPSG4326Projection extends Projection {\n  /**\n   * @param {string} code Code.\n   * @param {string} [axisOrientation] Axis orientation.\n   */\n  constructor(code, axisOrientation) {\n    super({\n      code: code,\n      units: 'degrees',\n      extent: EXTENT,\n      axisOrientation: axisOrientation,\n      global: true,\n      metersPerUnit: METERS_PER_UNIT,\n      worldExtent: EXTENT,\n    });\n  }\n}\n\n/**\n * Projections equal to EPSG:4326.\n *\n * @const\n * @type {Array<import(\"./Projection.js\").default>}\n */\nexport const PROJECTIONS = [\n  new EPSG4326Projection('CRS:84'),\n  new EPSG4326Projection('EPSG:4326', 'neu'),\n  new EPSG4326Projection('urn:ogc:def:crs:OGC:1.3:CRS84'),\n  new EPSG4326Projection('urn:ogc:def:crs:OGC:2:84'),\n  new EPSG4326Projection('http://www.opengis.net/def/crs/OGC/1.3/CRS84'),\n  new EPSG4326Projection('http://www.opengis.net/gml/srs/epsg.xml#4326', 'neu'),\n  new EPSG4326Projection('http://www.opengis.net/def/crs/EPSG/0/4326', 'neu'),\n];\n", "/**\n * @module ol/proj/projections\n */\n\n/**\n * @type {Object<string, import(\"./Projection.js\").default>}\n */\nlet cache = {};\n\n/**\n * Clear the projections cache.\n */\nexport function clear() {\n  cache = {};\n}\n\n/**\n * Get a cached projection by code.\n * @param {string} code The code for the projection.\n * @return {import(\"./Projection.js\").default|null} The projection (if cached).\n */\nexport function get(code) {\n  return (\n    cache[code] ||\n    cache[code.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\\w+)$/, 'EPSG:$3')] ||\n    null\n  );\n}\n\n/**\n * Add a projection to the cache.\n * @param {string} code The projection code.\n * @param {import(\"./Projection.js\").default} projection The projection to cache.\n */\nexport function add(code, projection) {\n  cache[code] = projection;\n}\n", "/**\n * @module ol/obj\n */\n\n/**\n * Removes all properties from an object.\n * @param {Object<string, unknown>} object The object to clear.\n */\nexport function clear(object) {\n  for (const property in object) {\n    delete object[property];\n  }\n}\n\n/**\n * Determine if an object has any properties.\n * @param {Object} object The object to check.\n * @return {boolean} The object is empty.\n */\nexport function isEmpty(object) {\n  let property;\n  for (property in object) {\n    return false;\n  }\n  return !property;\n}\n", "/**\n * @module ol/proj/transforms\n */\nimport {isEmpty} from '../obj.js';\n\n/**\n * @private\n * @type {!Object<string, Object<string, import(\"../proj.js\").TransformFunction>>}\n */\nlet transforms = {};\n\n/**\n * Clear the transform cache.\n */\nexport function clear() {\n  transforms = {};\n}\n\n/**\n * Registers a conversion function to convert coordinates from the source\n * projection to the destination projection.\n *\n * @param {import(\"./Projection.js\").default} source Source.\n * @param {import(\"./Projection.js\").default} destination Destination.\n * @param {import(\"../proj.js\").TransformFunction} transformFn Transform.\n */\nexport function add(source, destination, transformFn) {\n  const sourceCode = source.getCode();\n  const destinationCode = destination.getCode();\n  if (!(sourceCode in transforms)) {\n    transforms[sourceCode] = {};\n  }\n  transforms[sourceCode][destinationCode] = transformFn;\n}\n\n/**\n * Unregisters the conversion function to convert coordinates from the source\n * projection to the destination projection.  This method is used to clean up\n * cached transforms during testing.\n *\n * @param {import(\"./Projection.js\").default} source Source projection.\n * @param {import(\"./Projection.js\").default} destination Destination projection.\n * @return {import(\"../proj.js\").TransformFunction} transformFn The unregistered transform.\n */\nexport function remove(source, destination) {\n  const sourceCode = source.getCode();\n  const destinationCode = destination.getCode();\n  const transform = transforms[sourceCode][destinationCode];\n  delete transforms[sourceCode][destinationCode];\n  if (isEmpty(transforms[sourceCode])) {\n    delete transforms[sourceCode];\n  }\n  return transform;\n}\n\n/**\n * Get a transform given a source code and a destination code.\n * @param {string} sourceCode The code for the source projection.\n * @param {string} destinationCode The code for the destination projection.\n * @return {import(\"../proj.js\").TransformFunction|null} The transform function (if found).\n */\nexport function get(sourceCode, destinationCode) {\n  if (sourceCode in transforms && destinationCode in transforms[sourceCode]) {\n    return transforms[sourceCode][destinationCode];\n  }\n  return null;\n}\n", "/**\n * @module ol/proj/utm\n */\n\n/**\n * Adapted from https://github.com/Turbo87/utm\n * Copyright (c) 2012-2017 Tobias Bieniek\n *\n * The functions here provide approximate transforms to and from UTM.\n * They are not appropriate for use beyond the validity extend of a UTM\n * zone, and the accuracy of the transform decreases toward the zone\n * edges.\n */\n\nimport {toDegrees, toRadians, wrap} from '../math.js';\nimport Projection from './Projection.js';\n\n/**\n * @typedef {Object} UTMZone\n * @property {number} number The zone number (1 - 60).\n * @property {boolean} north The northern hemisphere.\n */\n\nconst K0 = 0.9996;\n\nconst E = 0.00669438;\nconst E2 = E * E;\nconst E3 = E2 * E;\nconst E_P2 = E / (1 - E);\n\nconst SQRT_E = Math.sqrt(1 - E);\nconst _E = (1 - SQRT_E) / (1 + SQRT_E);\nconst _E2 = _E * _E;\nconst _E3 = _E2 * _E;\nconst _E4 = _E3 * _E;\nconst _E5 = _E4 * _E;\n\nconst M1 = 1 - E / 4 - (3 * E2) / 64 - (5 * E3) / 256;\nconst M2 = (3 * E) / 8 + (3 * E2) / 32 + (45 * E3) / 1024;\nconst M3 = (15 * E2) / 256 + (45 * E3) / 1024;\nconst M4 = (35 * E3) / 3072;\n\nconst P2 = (3 / 2) * _E - (27 / 32) * _E3 + (269 / 512) * _E5;\nconst P3 = (21 / 16) * _E2 - (55 / 32) * _E4;\nconst P4 = (151 / 96) * _E3 - (417 / 128) * _E5;\nconst P5 = (1097 / 512) * _E4;\n\nconst R = 6378137;\n\n/**\n * @param {number} easting Easting value of coordinate.\n * @param {number} northing Northing value of coordinate.\n * @param {UTMZone} zone The UTM zone.\n * @return {import(\"../coordinate.js\").Coordinate} The transformed coordinate.\n */\nfunction toLonLat(easting, northing, zone) {\n  const x = easting - 500000;\n  const y = zone.north ? northing : northing - 10000000;\n\n  const m = y / K0;\n  const mu = m / (R * M1);\n\n  const pRad =\n    mu +\n    P2 * Math.sin(2 * mu) +\n    P3 * Math.sin(4 * mu) +\n    P4 * Math.sin(6 * mu) +\n    P5 * Math.sin(8 * mu);\n\n  const pSin = Math.sin(pRad);\n  const pSin2 = pSin * pSin;\n\n  const pCos = Math.cos(pRad);\n\n  const pTan = pSin / pCos;\n  const pTan2 = pTan * pTan;\n  const pTan4 = pTan2 * pTan2;\n\n  const epSin = 1 - E * pSin2;\n  const epSinSqrt = Math.sqrt(1 - E * pSin2);\n\n  const n = R / epSinSqrt;\n  const r = (1 - E) / epSin;\n\n  const c = E_P2 * pCos ** 2;\n  const c2 = c * c;\n\n  const d = x / (n * K0);\n  const d2 = d * d;\n  const d3 = d2 * d;\n  const d4 = d3 * d;\n  const d5 = d4 * d;\n  const d6 = d5 * d;\n\n  const latitude =\n    pRad -\n    (pTan / r) *\n      (d2 / 2 - (d4 / 24) * (5 + 3 * pTan2 + 10 * c - 4 * c2 - 9 * E_P2)) +\n    (d6 / 720) * (61 + 90 * pTan2 + 298 * c + 45 * pTan4 - 252 * E_P2 - 3 * c2);\n\n  let longitude =\n    (d -\n      (d3 / 6) * (1 + 2 * pTan2 + c) +\n      (d5 / 120) * (5 - 2 * c + 28 * pTan2 - 3 * c2 + 8 * E_P2 + 24 * pTan4)) /\n    pCos;\n\n  longitude = wrap(\n    longitude + toRadians(zoneToCentralLongitude(zone.number)),\n    -Math.PI,\n    Math.PI,\n  );\n\n  return [toDegrees(longitude), toDegrees(latitude)];\n}\n\nconst MIN_LATITUDE = -80;\nconst MAX_LATITUDE = 84;\nconst MIN_LONGITUDE = -180;\nconst MAX_LONGITUDE = 180;\n\n/**\n * @param {number} longitude The longitude.\n * @param {number} latitude The latitude.\n * @param {UTMZone} zone The UTM zone.\n * @return {import('../coordinate.js').Coordinate} The UTM coordinate.\n */\nfunction fromLonLat(longitude, latitude, zone) {\n  longitude = wrap(longitude, MIN_LONGITUDE, MAX_LONGITUDE);\n\n  if (latitude < MIN_LATITUDE) {\n    latitude = MIN_LATITUDE;\n  } else if (latitude > MAX_LATITUDE) {\n    latitude = MAX_LATITUDE;\n  }\n\n  const latRad = toRadians(latitude);\n  const latSin = Math.sin(latRad);\n  const latCos = Math.cos(latRad);\n\n  const latTan = latSin / latCos;\n  const latTan2 = latTan * latTan;\n  const latTan4 = latTan2 * latTan2;\n\n  const lonRad = toRadians(longitude);\n  const centralLon = zoneToCentralLongitude(zone.number);\n  const centralLonRad = toRadians(centralLon);\n\n  const n = R / Math.sqrt(1 - E * latSin ** 2);\n  const c = E_P2 * latCos ** 2;\n\n  const a = latCos * wrap(lonRad - centralLonRad, -Math.PI, Math.PI);\n  const a2 = a * a;\n  const a3 = a2 * a;\n  const a4 = a3 * a;\n  const a5 = a4 * a;\n  const a6 = a5 * a;\n\n  const m =\n    R *\n    (M1 * latRad -\n      M2 * Math.sin(2 * latRad) +\n      M3 * Math.sin(4 * latRad) -\n      M4 * Math.sin(6 * latRad));\n\n  const easting =\n    K0 *\n      n *\n      (a +\n        (a3 / 6) * (1 - latTan2 + c) +\n        (a5 / 120) * (5 - 18 * latTan2 + latTan4 + 72 * c - 58 * E_P2)) +\n    500000;\n\n  let northing =\n    K0 *\n    (m +\n      n *\n        latTan *\n        (a2 / 2 +\n          (a4 / 24) * (5 - latTan2 + 9 * c + 4 * c ** 2) +\n          (a6 / 720) * (61 - 58 * latTan2 + latTan4 + 600 * c - 330 * E_P2)));\n\n  if (!zone.north) {\n    northing += 10000000;\n  }\n\n  return [easting, northing];\n}\n\n/**\n * @param {number} zone The zone number.\n * @return {number} The central longitude in degrees.\n */\nfunction zoneToCentralLongitude(zone) {\n  return (zone - 1) * 6 - 180 + 3;\n}\n\n/**\n * @type {Array<RegExp>}\n */\nconst epsgRegExes = [\n  /^EPSG:(\\d+)$/,\n  /^urn:ogc:def:crs:EPSG::(\\d+)$/,\n  /^http:\\/\\/www\\.opengis\\.net\\/def\\/crs\\/EPSG\\/0\\/(\\d+)$/,\n];\n\n/**\n * @param {string} code The projection code.\n * @return {UTMZone|null} The UTM zone info (or null if not UTM).\n */\nexport function zoneFromCode(code) {\n  let epsgId = 0;\n  for (const re of epsgRegExes) {\n    const match = code.match(re);\n    if (match) {\n      epsgId = parseInt(match[1]);\n      break;\n    }\n  }\n  if (!epsgId) {\n    return null;\n  }\n\n  let number = 0;\n  let north = false;\n  if (epsgId > 32700 && epsgId < 32761) {\n    number = epsgId - 32700;\n  } else if (epsgId > 32600 && epsgId < 32661) {\n    north = true;\n    number = epsgId - 32600;\n  }\n  if (!number) {\n    return null;\n  }\n\n  return {number, north};\n}\n\n/**\n * @param {function(number, number, UTMZone): import('../coordinate.js').Coordinate} transformer The transformer.\n * @param {UTMZone} zone The UTM zone.\n * @return {import('../proj.js').TransformFunction} The transform function.\n */\nfunction makeTransformFunction(transformer, zone) {\n  return function (input, output, dimension, stride) {\n    const length = input.length;\n    dimension = dimension > 1 ? dimension : 2;\n    stride = stride ?? dimension;\n    if (!output) {\n      if (dimension > 2) {\n        output = input.slice();\n      } else {\n        output = new Array(length);\n      }\n    }\n    for (let i = 0; i < length; i += stride) {\n      const x = input[i];\n      const y = input[i + 1];\n      const coord = transformer(x, y, zone);\n      output[i] = coord[0];\n      output[i + 1] = coord[1];\n    }\n    return output;\n  };\n}\n\n/**\n * @param {string} code The projection code.\n * @return {import('./Projection.js').default|null} A projection or null if unable to create one.\n */\nexport function makeProjection(code) {\n  const zone = zoneFromCode(code);\n  if (!zone) {\n    return null;\n  }\n  return new Projection({code, units: 'm'});\n}\n\n/**\n * @param {import('./Projection.js').default} projection The projection.\n * @return {import('../proj.js').Transforms|null} The transforms lookup or null if unable to handle projection.\n */\nexport function makeTransforms(projection) {\n  const zone = zoneFromCode(projection.getCode());\n  if (!zone) {\n    return null;\n  }\n\n  return {\n    forward: makeTransformFunction(fromLonLat, zone),\n    inverse: makeTransformFunction(toLonLat, zone),\n  };\n}\n", "/**\n * @module ol/sphere\n */\nimport {toDegrees, toRadians} from './math.js';\n\n/**\n * Object literal with options for the {@link getLength} or {@link getArea}\n * functions.\n * @typedef {Object} SphereMetricOptions\n * @property {import(\"./proj.js\").ProjectionLike} [projection='EPSG:3857']\n * Projection of the  geometry.  By default, the geometry is assumed to be in\n * Web Mercator.\n * @property {number} [radius=6371008.8] Sphere radius.  By default, the\n * [mean Earth radius](https://en.wikipedia.org/wiki/Earth_radius#Mean_radius)\n * for the WGS84 ellipsoid is used.\n */\n\n/**\n * The mean Earth radius (1/3 * (2a + b)) for the WGS84 ellipsoid.\n * https://en.wikipedia.org/wiki/Earth_radius#Mean_radius\n * @type {number}\n */\nexport const DEFAULT_RADIUS = 6371008.8;\n\n/**\n * Get the great circle distance (in meters) between two geographic coordinates.\n * @param {Array} c1 Starting coordinate.\n * @param {Array} c2 Ending coordinate.\n * @param {number} [radius] The sphere radius to use.  Defaults to the Earth's\n *     mean radius using the WGS84 ellipsoid.\n * @return {number} The great circle distance between the points (in meters).\n * @api\n */\nexport function getDistance(c1, c2, radius) {\n  radius = radius || DEFAULT_RADIUS;\n  const lat1 = toRadians(c1[1]);\n  const lat2 = toRadians(c2[1]);\n  const deltaLatBy2 = (lat2 - lat1) / 2;\n  const deltaLonBy2 = toRadians(c2[0] - c1[0]) / 2;\n  const a =\n    Math.sin(deltaLatBy2) * Math.sin(deltaLatBy2) +\n    Math.sin(deltaLonBy2) *\n      Math.sin(deltaLonBy2) *\n      Math.cos(lat1) *\n      Math.cos(lat2);\n  return 2 * radius * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n}\n\n/**\n * Get the cumulative great circle length of linestring coordinates (geographic).\n * @param {Array} coordinates Linestring coordinates.\n * @param {number} radius The sphere radius to use.\n * @return {number} The length (in meters).\n */\nfunction getLengthInternal(coordinates, radius) {\n  let length = 0;\n  for (let i = 0, ii = coordinates.length; i < ii - 1; ++i) {\n    length += getDistance(coordinates[i], coordinates[i + 1], radius);\n  }\n  return length;\n}\n\n/**\n * Get the spherical length of a geometry.  This length is the sum of the\n * great circle distances between coordinates.  For polygons, the length is\n * the sum of all rings.  For points, the length is zero.  For multi-part\n * geometries, the length is the sum of the length of each part.\n * @param {import(\"./geom/Geometry.js\").default} geometry A geometry.\n * @param {SphereMetricOptions} [options] Options for the\n * length calculation.  By default, geometries are assumed to be in 'EPSG:3857'.\n * You can change this by providing a `projection` option.\n * @return {number} The spherical length (in meters).\n * @api\n */\nexport function getLength(geometry, options) {\n  options = options || {};\n  const radius = options.radius || DEFAULT_RADIUS;\n  const projection = options.projection || 'EPSG:3857';\n  const type = geometry.getType();\n  if (type !== 'GeometryCollection') {\n    geometry = geometry.clone().transform(projection, 'EPSG:4326');\n  }\n  let length = 0;\n  let coordinates, coords, i, ii, j, jj;\n  switch (type) {\n    case 'Point':\n    case 'MultiPoint': {\n      break;\n    }\n    case 'LineString':\n    case 'LinearRing': {\n      coordinates = /** @type {import(\"./geom/SimpleGeometry.js\").default} */ (\n        geometry\n      ).getCoordinates();\n      length = getLengthInternal(coordinates, radius);\n      break;\n    }\n    case 'MultiLineString':\n    case 'Polygon': {\n      coordinates = /** @type {import(\"./geom/SimpleGeometry.js\").default} */ (\n        geometry\n      ).getCoordinates();\n      for (i = 0, ii = coordinates.length; i < ii; ++i) {\n        length += getLengthInternal(coordinates[i], radius);\n      }\n      break;\n    }\n    case 'MultiPolygon': {\n      coordinates = /** @type {import(\"./geom/SimpleGeometry.js\").default} */ (\n        geometry\n      ).getCoordinates();\n      for (i = 0, ii = coordinates.length; i < ii; ++i) {\n        coords = coordinates[i];\n        for (j = 0, jj = coords.length; j < jj; ++j) {\n          length += getLengthInternal(coords[j], radius);\n        }\n      }\n      break;\n    }\n    case 'GeometryCollection': {\n      const geometries =\n        /** @type {import(\"./geom/GeometryCollection.js\").default} */ (\n          geometry\n        ).getGeometries();\n      for (i = 0, ii = geometries.length; i < ii; ++i) {\n        length += getLength(geometries[i], options);\n      }\n      break;\n    }\n    default: {\n      throw new Error('Unsupported geometry type: ' + type);\n    }\n  }\n  return length;\n}\n\n/**\n * Returns the spherical area for a list of coordinates.\n *\n * [Reference](https://trs.jpl.nasa.gov/handle/2014/40409)\n * Robert. G. Chamberlain and William H. Duquette, \"Some Algorithms for\n * Polygons on a Sphere\", JPL Publication 07-03, Jet Propulsion\n * Laboratory, Pasadena, CA, June 2007\n *\n * @param {Array<import(\"./coordinate.js\").Coordinate>} coordinates List of coordinates of a linear\n * ring. If the ring is oriented clockwise, the area will be positive,\n * otherwise it will be negative.\n * @param {number} radius The sphere radius.\n * @return {number} Area (in square meters).\n */\nfunction getAreaInternal(coordinates, radius) {\n  let area = 0;\n  const len = coordinates.length;\n  let x1 = coordinates[len - 1][0];\n  let y1 = coordinates[len - 1][1];\n  for (let i = 0; i < len; i++) {\n    const x2 = coordinates[i][0];\n    const y2 = coordinates[i][1];\n    area +=\n      toRadians(x2 - x1) *\n      (2 + Math.sin(toRadians(y1)) + Math.sin(toRadians(y2)));\n    x1 = x2;\n    y1 = y2;\n  }\n  return (area * radius * radius) / 2.0;\n}\n\n/**\n * Get the spherical area of a geometry.  This is the area (in meters) assuming\n * that polygon edges are segments of great circles on a sphere.\n * @param {import(\"./geom/Geometry.js\").default} geometry A geometry.\n * @param {SphereMetricOptions} [options] Options for the area\n *     calculation.  By default, geometries are assumed to be in 'EPSG:3857'.\n *     You can change this by providing a `projection` option.\n * @return {number} The spherical area (in square meters).\n * @api\n */\nexport function getArea(geometry, options) {\n  options = options || {};\n  const radius = options.radius || DEFAULT_RADIUS;\n  const projection = options.projection || 'EPSG:3857';\n  const type = geometry.getType();\n  if (type !== 'GeometryCollection') {\n    geometry = geometry.clone().transform(projection, 'EPSG:4326');\n  }\n  let area = 0;\n  let coordinates, coords, i, ii, j, jj;\n  switch (type) {\n    case 'Point':\n    case 'MultiPoint':\n    case 'LineString':\n    case 'MultiLineString':\n    case 'LinearRing': {\n      break;\n    }\n    case 'Polygon': {\n      coordinates = /** @type {import(\"./geom/Polygon.js\").default} */ (\n        geometry\n      ).getCoordinates();\n      area = Math.abs(getAreaInternal(coordinates[0], radius));\n      for (i = 1, ii = coordinates.length; i < ii; ++i) {\n        area -= Math.abs(getAreaInternal(coordinates[i], radius));\n      }\n      break;\n    }\n    case 'MultiPolygon': {\n      coordinates = /** @type {import(\"./geom/SimpleGeometry.js\").default} */ (\n        geometry\n      ).getCoordinates();\n      for (i = 0, ii = coordinates.length; i < ii; ++i) {\n        coords = coordinates[i];\n        area += Math.abs(getAreaInternal(coords[0], radius));\n        for (j = 1, jj = coords.length; j < jj; ++j) {\n          area -= Math.abs(getAreaInternal(coords[j], radius));\n        }\n      }\n      break;\n    }\n    case 'GeometryCollection': {\n      const geometries =\n        /** @type {import(\"./geom/GeometryCollection.js\").default} */ (\n          geometry\n        ).getGeometries();\n      for (i = 0, ii = geometries.length; i < ii; ++i) {\n        area += getArea(geometries[i], options);\n      }\n      break;\n    }\n    default: {\n      throw new Error('Unsupported geometry type: ' + type);\n    }\n  }\n  return area;\n}\n\n/**\n * Returns the coordinate at the given distance and bearing from `c1`.\n *\n * @param {import(\"./coordinate.js\").Coordinate} c1 The origin point (`[lon, lat]` in degrees).\n * @param {number} distance The great-circle distance between the origin\n *     point and the target point.\n * @param {number} bearing The bearing (in radians).\n * @param {number} [radius] The sphere radius to use.  Defaults to the Earth's\n *     mean radius using the WGS84 ellipsoid.\n * @return {import(\"./coordinate.js\").Coordinate} The target point.\n */\nexport function offset(c1, distance, bearing, radius) {\n  radius = radius || DEFAULT_RADIUS;\n  const lat1 = toRadians(c1[1]);\n  const lon1 = toRadians(c1[0]);\n  const dByR = distance / radius;\n  const lat = Math.asin(\n    Math.sin(lat1) * Math.cos(dByR) +\n      Math.cos(lat1) * Math.sin(dByR) * Math.cos(bearing),\n  );\n  const lon =\n    lon1 +\n    Math.atan2(\n      Math.sin(bearing) * Math.sin(dByR) * Math.cos(lat1),\n      Math.cos(dByR) - Math.sin(lat1) * Math.sin(lat),\n    );\n  return [toDegrees(lon), toDegrees(lat)];\n}\n", "/**\n * @module ol/proj\n */\n\n/**\n * The ol/proj module stores:\n * a list of {@link module:ol/proj/Projection~Projection}\n * objects, one for each projection supported by the application\n * a list of transform functions needed to convert coordinates in one projection\n * into another.\n *\n * The static functions are the methods used to maintain these.\n * Each transform function can handle not only simple coordinate pairs, but also\n * large arrays of coordinates such as vector geometries.\n *\n * When loaded, the library adds projection objects for EPSG:4326 (WGS84\n * geographic coordinates) and EPSG:3857 (Web or Spherical Mercator, as used\n * for example by Bing Maps or OpenStreetMap), together with the relevant\n * transform functions.\n *\n * Additional transforms may be added by using the http://proj4js.org/\n * library (version 2.2 or later). You can use the full build supplied by\n * Proj4js, or create a custom build to support those projections you need; see\n * the Proj4js website for how to do this. You also need the Proj4js definitions\n * for the required projections. These definitions can be obtained from\n * https://spatialreference.org/, and are a JS function, so can be loaded in a\n * script tag (as in the examples) or pasted into your application.\n *\n * After all required projection definitions are added to proj4's registry (by\n * using `proj4.defs()`), simply call `register(proj4)` from the `ol/proj/proj4`\n * package. Existing transforms are not changed by this function. See\n * examples/wms-image-custom-proj for an example of this.\n *\n * Additional projection definitions can be registered with `proj4.defs()` any\n * time. Just make sure to call `register(proj4)` again; for example, with user-supplied data where you don't\n * know in advance what projections are needed, you can initially load minimal\n * support and then load whichever are requested.\n *\n * Note that Proj4js does not support projection extents. If you want to add\n * one for creating default tile grids, you can add it after the Projection\n * object has been created with `setExtent`, for example,\n * `get('EPSG:1234').setExtent(extent)`.\n *\n * In addition to Proj4js support, any transform functions can be added with\n * {@link module:ol/proj.addCoordinateTransforms}. To use this, you must first create\n * a {@link module:ol/proj/Projection~Projection} object for the new projection and add it with\n * {@link module:ol/proj.addProjection}. You can then add the forward and inverse\n * functions with {@link module:ol/proj.addCoordinateTransforms}. See\n * examples/wms-custom-proj for an example of this.\n *\n * Note that if no transforms are needed and you only need to define the\n * projection, just add a {@link module:ol/proj/Projection~Projection} with\n * {@link module:ol/proj.addProjection}. See examples/wms-no-proj for an example of\n * this.\n */\nimport {warn} from './console.js';\nimport {equals, getWorldsAway} from './coordinate.js';\nimport {applyTransform, getWidth} from './extent.js';\nimport {clamp, modulo} from './math.js';\nimport Projection from './proj/Projection.js';\nimport {METERS_PER_UNIT} from './proj/Units.js';\nimport {\n  PROJECTIONS as EPSG3857_PROJECTIONS,\n  fromEPSG4326,\n  toEPSG4326,\n} from './proj/epsg3857.js';\nimport {PROJECTIONS as EPSG4326_PROJECTIONS} from './proj/epsg4326.js';\nimport {\n  add as addProj,\n  clear as clearProj,\n  get as getProj,\n} from './proj/projections.js';\nimport {\n  add as addTransformFunc,\n  clear as clearTransformFuncs,\n  get as getTransformFunc,\n} from './proj/transforms.js';\nimport {\n  makeProjection as makeUTMProjection,\n  makeTransforms as makeUTMTransforms,\n} from './proj/utm.js';\nimport {getDistance} from './sphere.js';\n\n/**\n * A projection as {@link module:ol/proj/Projection~Projection}, SRS identifier\n * string or undefined.\n * @typedef {Projection|string|undefined} ProjectionLike\n * @api\n */\n\n/**\n * @typedef {Object} Transforms\n * @property {TransformFunction} forward The forward transform (from geographic).\n * @property {TransformFunction} inverse The inverse transform (to geographic).\n */\n\n/**\n * @type {Array<function(Projection): Transforms|null>}\n */\nconst transformFactories = [makeUTMTransforms];\n\n/**\n * @type {Array<function(string): Projection|null>}\n */\nconst projectionFactories = [makeUTMProjection];\n\n/**\n * A transform function accepts an array of input coordinate values, an optional\n * output array, and an optional dimension (default should be 2).  The function\n * transforms the input coordinate values, populates the output array, and\n * returns the output array.\n *\n * @callback TransformFunction\n * @param {Array<number>} input\n * @param {Array<number>} [output]\n * @param {number} [dimension]\n * @param {number} [stride]\n * @return {Array<number>}\n *\n * @api\n */\n\nexport {METERS_PER_UNIT};\n\nexport {Projection};\n\nlet showCoordinateWarning = true;\n\n/**\n * @param {boolean} [disable] Disable console info about `useGeographic()`\n */\nexport function disableCoordinateWarning(disable) {\n  const hide = disable === undefined ? true : disable;\n  showCoordinateWarning = !hide;\n}\n\n/**\n * @param {Array<number>} input Input coordinate array.\n * @param {Array<number>} [output] Output array of coordinate values.\n * @return {Array<number>} Output coordinate array (new array, same coordinate\n *     values).\n */\nexport function cloneTransform(input, output) {\n  if (output !== undefined) {\n    for (let i = 0, ii = input.length; i < ii; ++i) {\n      output[i] = input[i];\n    }\n    output = output;\n  } else {\n    output = input.slice();\n  }\n  return output;\n}\n\n/**\n * @param {Array<number>} input Input coordinate array.\n * @param {Array<number>} [output] Output array of coordinate values.\n * @return {Array<number>} Input coordinate array (same array as input).\n */\nexport function identityTransform(input, output) {\n  if (output !== undefined && input !== output) {\n    for (let i = 0, ii = input.length; i < ii; ++i) {\n      output[i] = input[i];\n    }\n    input = output;\n  }\n  return input;\n}\n\n/**\n * Add a Projection object to the list of supported projections that can be\n * looked up by their code.\n *\n * @param {Projection} projection Projection instance.\n * @api\n */\nexport function addProjection(projection) {\n  addProj(projection.getCode(), projection);\n  addTransformFunc(projection, projection, cloneTransform);\n}\n\n/**\n * @param {Array<Projection>} projections Projections.\n */\nexport function addProjections(projections) {\n  projections.forEach(addProjection);\n}\n\n/**\n * Fetches a Projection object for the code specified.\n *\n * @param {ProjectionLike} projectionLike Either a code string which is\n *     a combination of authority and identifier such as \"EPSG:4326\", or an\n *     existing projection object, or undefined.\n * @return {Projection|null} Projection object, or null if not in list.\n * @api\n */\nexport function get(projectionLike) {\n  if (!(typeof projectionLike === 'string')) {\n    return projectionLike;\n  }\n  const projection = getProj(projectionLike);\n  if (projection) {\n    return projection;\n  }\n  for (const makeProjection of projectionFactories) {\n    const projection = makeProjection(projectionLike);\n    if (projection) {\n      return projection;\n    }\n  }\n  return null;\n}\n\n/**\n * Get the resolution of the point in degrees or distance units.\n * For projections with degrees as the unit this will simply return the\n * provided resolution. For other projections the point resolution is\n * by default estimated by transforming the `point` pixel to EPSG:4326,\n * measuring its width and height on the normal sphere,\n * and taking the average of the width and height.\n * A custom function can be provided for a specific projection, either\n * by setting the `getPointResolution` option in the\n * {@link module:ol/proj/Projection~Projection} constructor or by using\n * {@link module:ol/proj/Projection~Projection#setGetPointResolution} to change an existing\n * projection object.\n * @param {ProjectionLike} projection The projection.\n * @param {number} resolution Nominal resolution in projection units.\n * @param {import(\"./coordinate.js\").Coordinate} point Point to find adjusted resolution at.\n * @param {import(\"./proj/Units.js\").Units} [units] Units to get the point resolution in.\n * Default is the projection's units.\n * @return {number} Point resolution.\n * @api\n */\nexport function getPointResolution(projection, resolution, point, units) {\n  projection = get(projection);\n  let pointResolution;\n  const getter = projection.getPointResolutionFunc();\n  if (getter) {\n    pointResolution = getter(resolution, point);\n    if (units && units !== projection.getUnits()) {\n      const metersPerUnit = projection.getMetersPerUnit();\n      if (metersPerUnit) {\n        pointResolution =\n          (pointResolution * metersPerUnit) / METERS_PER_UNIT[units];\n      }\n    }\n  } else {\n    const projUnits = projection.getUnits();\n    if ((projUnits == 'degrees' && !units) || units == 'degrees') {\n      pointResolution = resolution;\n    } else {\n      // Estimate point resolution by transforming the center pixel to EPSG:4326,\n      // measuring its width and height on the normal sphere, and taking the\n      // average of the width and height.\n      const toEPSG4326 = getTransformFromProjections(\n        projection,\n        get('EPSG:4326'),\n      );\n      if (!toEPSG4326 && projUnits !== 'degrees') {\n        // no transform is available\n        pointResolution = resolution * projection.getMetersPerUnit();\n      } else {\n        let vertices = [\n          point[0] - resolution / 2,\n          point[1],\n          point[0] + resolution / 2,\n          point[1],\n          point[0],\n          point[1] - resolution / 2,\n          point[0],\n          point[1] + resolution / 2,\n        ];\n        vertices = toEPSG4326(vertices, vertices, 2);\n        const width = getDistance(vertices.slice(0, 2), vertices.slice(2, 4));\n        const height = getDistance(vertices.slice(4, 6), vertices.slice(6, 8));\n        pointResolution = (width + height) / 2;\n      }\n      const metersPerUnit = units\n        ? METERS_PER_UNIT[units]\n        : projection.getMetersPerUnit();\n      if (metersPerUnit !== undefined) {\n        pointResolution /= metersPerUnit;\n      }\n    }\n  }\n  return pointResolution;\n}\n\n/**\n * Registers transformation functions that don't alter coordinates. Those allow\n * to transform between projections with equal meaning.\n *\n * @param {Array<Projection>} projections Projections.\n * @api\n */\nexport function addEquivalentProjections(projections) {\n  addProjections(projections);\n  projections.forEach(function (source) {\n    projections.forEach(function (destination) {\n      if (source !== destination) {\n        addTransformFunc(source, destination, cloneTransform);\n      }\n    });\n  });\n}\n\n/**\n * Registers transformation functions to convert coordinates in any projection\n * in projection1 to any projection in projection2.\n *\n * @param {Array<Projection>} projections1 Projections with equal\n *     meaning.\n * @param {Array<Projection>} projections2 Projections with equal\n *     meaning.\n * @param {TransformFunction} forwardTransform Transformation from any\n *   projection in projection1 to any projection in projection2.\n * @param {TransformFunction} inverseTransform Transform from any projection\n *   in projection2 to any projection in projection1..\n */\nexport function addEquivalentTransforms(\n  projections1,\n  projections2,\n  forwardTransform,\n  inverseTransform,\n) {\n  projections1.forEach(function (projection1) {\n    projections2.forEach(function (projection2) {\n      addTransformFunc(projection1, projection2, forwardTransform);\n      addTransformFunc(projection2, projection1, inverseTransform);\n    });\n  });\n}\n\n/**\n * Clear all cached projections and transforms.\n */\nexport function clearAllProjections() {\n  clearProj();\n  clearTransformFuncs();\n}\n\n/**\n * @param {Projection|string|undefined} projection Projection.\n * @param {string} defaultCode Default code.\n * @return {Projection} Projection.\n */\nexport function createProjection(projection, defaultCode) {\n  if (!projection) {\n    return get(defaultCode);\n  }\n  if (typeof projection === 'string') {\n    return get(projection);\n  }\n  return /** @type {Projection} */ (projection);\n}\n\n/**\n * Creates a {@link module:ol/proj~TransformFunction} from a simple 2D coordinate transform\n * function.\n * @param {function(import(\"./coordinate.js\").Coordinate): import(\"./coordinate.js\").Coordinate} coordTransform Coordinate\n *     transform.\n * @return {TransformFunction} Transform function.\n */\nexport function createTransformFromCoordinateTransform(coordTransform) {\n  return (\n    /**\n     * @param {Array<number>} input Input.\n     * @param {Array<number>} [output] Output.\n     * @param {number} [dimension] Dimensions that should be transformed.\n     * @param {number} [stride] Stride.\n     * @return {Array<number>} Output.\n     */\n    function (input, output, dimension, stride) {\n      const length = input.length;\n      dimension = dimension !== undefined ? dimension : 2;\n      stride = stride ?? dimension;\n      output = output !== undefined ? output : new Array(length);\n      for (let i = 0; i < length; i += stride) {\n        const point = coordTransform(input.slice(i, i + dimension));\n        const pointLength = point.length;\n        for (let j = 0, jj = stride; j < jj; ++j) {\n          output[i + j] = j >= pointLength ? input[i + j] : point[j];\n        }\n      }\n      return output;\n    }\n  );\n}\n\n/**\n * Registers coordinate transform functions to convert coordinates between the\n * source projection and the destination projection.\n * The forward and inverse functions convert coordinate pairs; this function\n * converts these into the functions used internally which also handle\n * extents and coordinate arrays.\n *\n * @param {ProjectionLike} source Source projection.\n * @param {ProjectionLike} destination Destination projection.\n * @param {function(import(\"./coordinate.js\").Coordinate): import(\"./coordinate.js\").Coordinate} forward The forward transform\n *     function (that is, from the source projection to the destination\n *     projection) that takes a {@link module:ol/coordinate~Coordinate} as argument and returns\n *     the transformed {@link module:ol/coordinate~Coordinate}.\n * @param {function(import(\"./coordinate.js\").Coordinate): import(\"./coordinate.js\").Coordinate} inverse The inverse transform\n *     function (that is, from the destination projection to the source\n *     projection) that takes a {@link module:ol/coordinate~Coordinate} as argument and returns\n *     the transformed {@link module:ol/coordinate~Coordinate}. If the transform function can only\n *     transform less dimensions than the input coordinate, it is supposeed to return a coordinate\n *     with only the length it can transform. The other dimensions will be taken unchanged from the\n *     source.\n * @api\n */\nexport function addCoordinateTransforms(source, destination, forward, inverse) {\n  const sourceProj = get(source);\n  const destProj = get(destination);\n  addTransformFunc(\n    sourceProj,\n    destProj,\n    createTransformFromCoordinateTransform(forward),\n  );\n  addTransformFunc(\n    destProj,\n    sourceProj,\n    createTransformFromCoordinateTransform(inverse),\n  );\n}\n\n/**\n * Transforms a coordinate from longitude/latitude to a different projection.\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate as longitude and latitude, i.e.\n *     an array with longitude as 1st and latitude as 2nd element.\n * @param {ProjectionLike} [projection] Target projection. The\n *     default is Web Mercator, i.e. 'EPSG:3857'.\n * @return {import(\"./coordinate.js\").Coordinate} Coordinate projected to the target projection.\n * @api\n */\nexport function fromLonLat(coordinate, projection) {\n  disableCoordinateWarning();\n  return transform(\n    coordinate,\n    'EPSG:4326',\n    projection !== undefined ? projection : 'EPSG:3857',\n  );\n}\n\n/**\n * Transforms a coordinate to longitude/latitude.\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Projected coordinate.\n * @param {ProjectionLike} [projection] Projection of the coordinate.\n *     The default is Web Mercator, i.e. 'EPSG:3857'.\n * @return {import(\"./coordinate.js\").Coordinate} Coordinate as longitude and latitude, i.e. an array\n *     with longitude as 1st and latitude as 2nd element.\n * @api\n */\nexport function toLonLat(coordinate, projection) {\n  const lonLat = transform(\n    coordinate,\n    projection !== undefined ? projection : 'EPSG:3857',\n    'EPSG:4326',\n  );\n  const lon = lonLat[0];\n  if (lon < -180 || lon > 180) {\n    lonLat[0] = modulo(lon + 180, 360) - 180;\n  }\n  return lonLat;\n}\n\n/**\n * Checks if two projections are the same, that is every coordinate in one\n * projection does represent the same geographic point as the same coordinate in\n * the other projection.\n *\n * @param {Projection} projection1 Projection 1.\n * @param {Projection} projection2 Projection 2.\n * @return {boolean} Equivalent.\n * @api\n */\nexport function equivalent(projection1, projection2) {\n  if (projection1 === projection2) {\n    return true;\n  }\n  const equalUnits = projection1.getUnits() === projection2.getUnits();\n  if (projection1.getCode() === projection2.getCode()) {\n    return equalUnits;\n  }\n  const transformFunc = getTransformFromProjections(projection1, projection2);\n  return transformFunc === cloneTransform && equalUnits;\n}\n\n/**\n * Searches in the list of transform functions for the function for converting\n * coordinates from the source projection to the destination projection.\n *\n * @param {Projection} source Source Projection object.\n * @param {Projection} destination Destination Projection\n *     object.\n * @return {TransformFunction|null} Transform function.\n */\nexport function getTransformFromProjections(source, destination) {\n  const sourceCode = source.getCode();\n  const destinationCode = destination.getCode();\n  let transformFunc = getTransformFunc(sourceCode, destinationCode);\n  if (transformFunc) {\n    return transformFunc;\n  }\n\n  /**\n   * @type {Transforms|null}\n   */\n  let sourceTransforms = null;\n\n  /**\n   * @type {Transforms|null}\n   */\n  let destinationTransforms = null;\n\n  // lazily add projections if we have supported transforms\n  for (const makeTransforms of transformFactories) {\n    if (!sourceTransforms) {\n      sourceTransforms = makeTransforms(source);\n    }\n    if (!destinationTransforms) {\n      destinationTransforms = makeTransforms(destination);\n    }\n  }\n\n  if (!sourceTransforms && !destinationTransforms) {\n    return null;\n  }\n\n  const intermediateCode = 'EPSG:4326';\n  if (!destinationTransforms) {\n    const toDestination = getTransformFunc(intermediateCode, destinationCode);\n    if (toDestination) {\n      transformFunc = composeTransformFuncs(\n        sourceTransforms.inverse,\n        toDestination,\n      );\n    }\n  } else if (!sourceTransforms) {\n    const fromSource = getTransformFunc(sourceCode, intermediateCode);\n    if (fromSource) {\n      transformFunc = composeTransformFuncs(\n        fromSource,\n        destinationTransforms.forward,\n      );\n    }\n  } else {\n    transformFunc = composeTransformFuncs(\n      sourceTransforms.inverse,\n      destinationTransforms.forward,\n    );\n  }\n\n  if (transformFunc) {\n    addProjection(source);\n    addProjection(destination);\n    addTransformFunc(source, destination, transformFunc);\n  }\n\n  return transformFunc;\n}\n\n/**\n * @param {TransformFunction} t1 The first transform function.\n * @param {TransformFunction} t2 The second transform function.\n * @return {TransformFunction} The composed transform function.\n */\nfunction composeTransformFuncs(t1, t2) {\n  return function (input, output, dimensions, stride) {\n    output = t1(input, output, dimensions, stride);\n    return t2(output, output, dimensions, stride);\n  };\n}\n\n/**\n * Given the projection-like objects, searches for a transformation\n * function to convert a coordinates array from the source projection to the\n * destination projection.\n *\n * @param {ProjectionLike} source Source.\n * @param {ProjectionLike} destination Destination.\n * @return {TransformFunction} Transform function.\n * @api\n */\nexport function getTransform(source, destination) {\n  const sourceProjection = get(source);\n  const destinationProjection = get(destination);\n  return getTransformFromProjections(sourceProjection, destinationProjection);\n}\n\n/**\n * Transforms a coordinate from source projection to destination projection.\n * This returns a new coordinate (and does not modify the original). If there\n * is no available transform between the two projection, the function will throw\n * an error.\n *\n * See {@link module:ol/proj.transformExtent} for extent transformation.\n * See the transform method of {@link module:ol/geom/Geometry~Geometry} and its\n * subclasses for geometry transforms.\n *\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {ProjectionLike} source Source projection-like.\n * @param {ProjectionLike} destination Destination projection-like.\n * @return {import(\"./coordinate.js\").Coordinate} Coordinate.\n * @api\n */\nexport function transform(coordinate, source, destination) {\n  const transformFunc = getTransform(source, destination);\n  if (!transformFunc) {\n    const sourceCode = get(source).getCode();\n    const destinationCode = get(destination).getCode();\n    throw new Error(\n      `No transform available between ${sourceCode} and ${destinationCode}`,\n    );\n  }\n  return transformFunc(coordinate, undefined, coordinate.length);\n}\n\n/**\n * Transforms an extent from source projection to destination projection.  This\n * returns a new extent (and does not modify the original).\n *\n * @param {import(\"./extent.js\").Extent} extent The extent to transform.\n * @param {ProjectionLike} source Source projection-like.\n * @param {ProjectionLike} destination Destination projection-like.\n * @param {number} [stops] Number of stops per side used for the transform.\n * By default only the corners are used.\n * @return {import(\"./extent.js\").Extent} The transformed extent.\n * @api\n */\nexport function transformExtent(extent, source, destination, stops) {\n  const transformFunc = getTransform(source, destination);\n  return applyTransform(extent, transformFunc, undefined, stops);\n}\n\n/**\n * Transforms the given point to the destination projection.\n *\n * @param {import(\"./coordinate.js\").Coordinate} point Point.\n * @param {Projection} sourceProjection Source projection.\n * @param {Projection} destinationProjection Destination projection.\n * @return {import(\"./coordinate.js\").Coordinate} Point.\n */\nexport function transformWithProjections(\n  point,\n  sourceProjection,\n  destinationProjection,\n) {\n  const transformFunc = getTransformFromProjections(\n    sourceProjection,\n    destinationProjection,\n  );\n  return transformFunc(point);\n}\n\n/**\n * @type {Projection|null}\n */\nlet userProjection = null;\n\n/**\n * Set the projection for coordinates supplied from and returned by API methods.\n * This includes all API methods except for those interacting with tile grids,\n * plus {@link import(\"./Map.js\").FrameState} and {@link import(\"./View.js\").State}.\n * @param {ProjectionLike} projection The user projection.\n * @api\n */\nexport function setUserProjection(projection) {\n  userProjection = get(projection);\n}\n\n/**\n * Clear the user projection if set.\n * @api\n */\nexport function clearUserProjection() {\n  userProjection = null;\n}\n\n/**\n * Get the projection for coordinates supplied from and returned by API methods.\n * @return {Projection|null} The user projection (or null if not set).\n * @api\n */\nexport function getUserProjection() {\n  return userProjection;\n}\n\n/**\n * Use geographic coordinates (WGS-84 datum) in API methods.\n * This includes all API methods except for those interacting with tile grids,\n * plus {@link import(\"./Map.js\").FrameState} and {@link import(\"./View.js\").State}.\n * @api\n */\nexport function useGeographic() {\n  setUserProjection('EPSG:4326');\n}\n\n/**\n * Return a coordinate transformed into the user projection.  If no user projection\n * is set, the original coordinate is returned.\n * @param {Array<number>} coordinate Input coordinate.\n * @param {ProjectionLike} sourceProjection The input coordinate projection.\n * @return {Array<number>} The input coordinate in the user projection.\n */\nexport function toUserCoordinate(coordinate, sourceProjection) {\n  if (!userProjection) {\n    return coordinate;\n  }\n  return transform(coordinate, sourceProjection, userProjection);\n}\n\n/**\n * Return a coordinate transformed from the user projection.  If no user projection\n * is set, the original coordinate is returned.\n * @param {Array<number>} coordinate Input coordinate.\n * @param {ProjectionLike} destProjection The destination projection.\n * @return {Array<number>} The input coordinate transformed.\n */\nexport function fromUserCoordinate(coordinate, destProjection) {\n  if (!userProjection) {\n    if (\n      showCoordinateWarning &&\n      !equals(coordinate, [0, 0]) &&\n      coordinate[0] >= -180 &&\n      coordinate[0] <= 180 &&\n      coordinate[1] >= -90 &&\n      coordinate[1] <= 90\n    ) {\n      showCoordinateWarning = false;\n      warn(\n        'Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.',\n      );\n    }\n    return coordinate;\n  }\n  return transform(coordinate, userProjection, destProjection);\n}\n\n/**\n * Return an extent transformed into the user projection.  If no user projection\n * is set, the original extent is returned.\n * @param {import(\"./extent.js\").Extent} extent Input extent.\n * @param {ProjectionLike} sourceProjection The input extent projection.\n * @return {import(\"./extent.js\").Extent} The input extent in the user projection.\n */\nexport function toUserExtent(extent, sourceProjection) {\n  if (!userProjection) {\n    return extent;\n  }\n  return transformExtent(extent, sourceProjection, userProjection);\n}\n\n/**\n * Return an extent transformed from the user projection.  If no user projection\n * is set, the original extent is returned.\n * @param {import(\"./extent.js\").Extent} extent Input extent.\n * @param {ProjectionLike} destProjection The destination projection.\n * @return {import(\"./extent.js\").Extent} The input extent transformed.\n */\nexport function fromUserExtent(extent, destProjection) {\n  if (!userProjection) {\n    return extent;\n  }\n  return transformExtent(extent, userProjection, destProjection);\n}\n\n/**\n * Return the resolution in user projection units per pixel. If no user projection\n * is set, or source or user projection are missing units, the original resolution\n * is returned.\n * @param {number} resolution Resolution in input projection units per pixel.\n * @param {ProjectionLike} sourceProjection The input projection.\n * @return {number} Resolution in user projection units per pixel.\n */\nexport function toUserResolution(resolution, sourceProjection) {\n  if (!userProjection) {\n    return resolution;\n  }\n  const sourceMetersPerUnit = get(sourceProjection).getMetersPerUnit();\n  const userMetersPerUnit = userProjection.getMetersPerUnit();\n  return sourceMetersPerUnit && userMetersPerUnit\n    ? (resolution * sourceMetersPerUnit) / userMetersPerUnit\n    : resolution;\n}\n\n/**\n * Return the resolution in user projection units per pixel. If no user projection\n * is set, or source or user projection are missing units, the original resolution\n * is returned.\n * @param {number} resolution Resolution in user projection units per pixel.\n * @param {ProjectionLike} destProjection The destination projection.\n * @return {number} Resolution in destination projection units per pixel.\n */\nexport function fromUserResolution(resolution, destProjection) {\n  if (!userProjection) {\n    return resolution;\n  }\n  const destMetersPerUnit = get(destProjection).getMetersPerUnit();\n  const userMetersPerUnit = userProjection.getMetersPerUnit();\n  return destMetersPerUnit && userMetersPerUnit\n    ? (resolution * userMetersPerUnit) / destMetersPerUnit\n    : resolution;\n}\n\n/**\n * Creates a safe coordinate transform function from a coordinate transform function.\n * \"Safe\" means that it can handle wrapping of x-coordinates for global projections,\n * and that coordinates exceeding the source projection validity extent's range will be\n * clamped to the validity range.\n * @param {Projection} sourceProj Source projection.\n * @param {Projection} destProj Destination projection.\n * @param {function(import(\"./coordinate.js\").Coordinate): import(\"./coordinate.js\").Coordinate} transform Transform function (source to destination).\n * @return {function(import(\"./coordinate.js\").Coordinate): import(\"./coordinate.js\").Coordinate} Safe transform function (source to destination).\n */\nexport function createSafeCoordinateTransform(sourceProj, destProj, transform) {\n  return function (coord) {\n    let transformed, worldsAway;\n    if (sourceProj.canWrapX()) {\n      const sourceExtent = sourceProj.getExtent();\n      const sourceExtentWidth = getWidth(sourceExtent);\n      coord = coord.slice(0);\n      worldsAway = getWorldsAway(coord, sourceProj, sourceExtentWidth);\n      if (worldsAway) {\n        // Move x to the real world\n        coord[0] = coord[0] - worldsAway * sourceExtentWidth;\n      }\n      coord[0] = clamp(coord[0], sourceExtent[0], sourceExtent[2]);\n      coord[1] = clamp(coord[1], sourceExtent[1], sourceExtent[3]);\n      transformed = transform(coord);\n    } else {\n      transformed = transform(coord);\n    }\n    if (worldsAway && destProj.canWrapX()) {\n      // Move transformed coordinate back to the offset world\n      transformed[0] += worldsAway * getWidth(destProj.getExtent());\n    }\n    return transformed;\n  };\n}\n\n/**\n * Add transforms to and from EPSG:4326 and EPSG:3857.  This function is called\n * by when this module is executed and should only need to be called again after\n * `clearAllProjections()` is called (e.g. in tests).\n */\nexport function addCommon() {\n  // Add transformations that don't alter coordinates to convert within set of\n  // projections with equal meaning.\n  addEquivalentProjections(EPSG3857_PROJECTIONS);\n  addEquivalentProjections(EPSG4326_PROJECTIONS);\n  // Add transformations to convert EPSG:4326 like coordinates to EPSG:3857 like\n  // coordinates and back.\n  addEquivalentTransforms(\n    EPSG4326_PROJECTIONS,\n    EPSG3857_PROJECTIONS,\n    fromEPSG4326,\n    toEPSG4326,\n  );\n}\n\naddCommon();\n", "export const niceErrors = {\n    0: `Invalid value for configuration 'enforceActions', expected 'never', 'always' or 'observed'`,\n    1(annotationType, key: PropertyKey) {\n        return `Cannot apply '${annotationType}' to '${key.toString()}': Field not found.`\n    },\n    /*\n    2(prop) {\n        return `invalid decorator for '${prop.toString()}'`\n    },\n    3(prop) {\n        return `Cannot decorate '${prop.toString()}': action can only be used on properties with a function value.`\n    },\n    4(prop) {\n        return `Cannot decorate '${prop.toString()}': computed can only be used on getter properties.`\n    },\n    */\n    5: \"'keys()' can only be used on observable objects, arrays, sets and maps\",\n    6: \"'values()' can only be used on observable objects, arrays, sets and maps\",\n    7: \"'entries()' can only be used on observable objects, arrays and maps\",\n    8: \"'set()' can only be used on observable objects, arrays and maps\",\n    9: \"'remove()' can only be used on observable objects, arrays and maps\",\n    10: \"'has()' can only be used on observable objects, arrays and maps\",\n    11: \"'get()' can only be used on observable objects, arrays and maps\",\n    12: `Invalid annotation`,\n    13: `Dynamic observable objects cannot be frozen. If you're passing observables to 3rd party component/function that calls Object.freeze, pass copy instead: toJS(observable)`,\n    14: \"Intercept handlers should return nothing or a change object\",\n    15: `Observable arrays cannot be frozen. If you're passing observables to 3rd party component/function that calls Object.freeze, pass copy instead: toJS(observable)`,\n    16: `Modification exception: the internal structure of an observable array was changed.`,\n    19(other) {\n        return \"Cannot initialize from classes that inherit from Map: \" + other.constructor.name\n    },\n    20(other) {\n        return \"Cannot initialize map from \" + other\n    },\n    21(dataStructure) {\n        return `Cannot convert to map from '${dataStructure}'`\n    },\n    23: \"It is not possible to get index atoms from arrays\",\n    24(thing) {\n        return \"Cannot obtain administration from \" + thing\n    },\n    25(property, name) {\n        return `the entry '${property}' does not exist in the observable map '${name}'`\n    },\n    26: \"please specify a property\",\n    27(property, name) {\n        return `no observable property '${property.toString()}' found on the observable object '${name}'`\n    },\n    28(thing) {\n        return \"Cannot obtain atom from \" + thing\n    },\n    29: \"Expecting some object\",\n    30: \"invalid action stack. did you forget to finish an action?\",\n    31: \"missing option for computed: get\",\n    32(name, derivation) {\n        return `Cycle detected in computation ${name}: ${derivation}`\n    },\n    33(name) {\n        return `The setter of computed value '${name}' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?`\n    },\n    34(name) {\n        return `[ComputedValue '${name}'] It is not possible to assign a new value to a computed value.`\n    },\n    35: \"There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`\",\n    36: \"isolateGlobalState should be called before MobX is running any reactions\",\n    37(method) {\n        return `[mobx] \\`observableArray.${method}()\\` mutates the array in-place, which is not allowed inside a derivation. Use \\`array.slice().${method}()\\` instead`\n    },\n    38: \"'ownKeys()' can only be used on observable objects\",\n    39: \"'defineProperty()' can only be used on observable objects\",\n    40(length) {\n        return \"Out of range: \" + length\n    },\n    41(other) {\n        return \"Cannot initialize set from \" + other\n    },\n    42(key) {\n        return `Invalid index: '${key}'`\n    },\n    43(annotationType, name, kind) {\n        return (\n            `Cannot apply '${annotationType}' to '${name}' (kind: ${kind}):` +\n            `\\n'${annotationType}' can only be used on properties with a function value.`\n        )\n    },\n    44(annotationType) {\n        return `'${annotationType}' can only be used with 'makeObservable'`\n    }\n} as const\n\nconst errors: typeof niceErrors = __DEV__ ? niceErrors : ({} as any)\n\nexport function die(error: string | keyof typeof errors, ...args: any[]): never {\n    if (__DEV__) {\n        let e: any = typeof error === \"string\" ? error : errors[error]\n        if (typeof e === \"function\") e = e.apply(null, args as any)\n        throw new Error(`[MobX] ${e}`)\n    }\n    throw new Error(\n        `[MobX] minified error nr: ${error}${\n            args.length ? \" \" + args.map(String).join(\",\") : \"\"\n        }. See mobx.js.org/errors`\n    )\n}\n", "import { globalState } from \"../internal\"\n\n// We shorten anything used > 5 times\nexport const assign = Object.assign\nexport const getDescriptor = Object.getOwnPropertyDescriptor\nexport const defineProperty = Object.defineProperty\nexport const objectPrototype = Object.prototype\n\nexport const EMPTY_ARRAY = []\nObject.freeze(EMPTY_ARRAY)\n\nexport const EMPTY_OBJECT = {}\nObject.freeze(EMPTY_OBJECT)\n\nexport interface Lambda {\n    (): void\n    name?: string\n}\n\nconst plainObjectString = Object.toString()\n\nexport function getNextId() {\n    return ++globalState.mobxGuid\n}\n\n/**\n * Makes sure that the provided function is invoked at most once.\n */\nexport function once(func: Lambda): Lambda {\n    let invoked = false\n    return function () {\n        if (invoked) {\n            return\n        }\n        invoked = true\n        return (func as any).apply(this, arguments)\n    }\n}\n\nexport const noop = () => {}\n\nexport function isFunction(fn: any): fn is Function {\n    return typeof fn === \"function\"\n}\n\nexport function isString(value: any): value is string {\n    return typeof value === \"string\"\n}\n\nexport function isStringish(value: any): value is string | number | symbol {\n    const t = typeof value\n    switch (t) {\n        case \"string\":\n        case \"symbol\":\n        case \"number\":\n            return true\n    }\n    return false\n}\n\nexport function isObject(value: any): value is Object {\n    return value !== null && typeof value === \"object\"\n}\n\nexport function isPlainObject(value: any) {\n    if (!isObject(value)) {\n        return false\n    }\n    const proto = Object.getPrototypeOf(value)\n    if (proto == null) {\n        return true\n    }\n    const protoConstructor = hasProp(proto, \"constructor\") && proto.constructor\n    return (\n        typeof protoConstructor === \"function\" && protoConstructor.toString() === plainObjectString\n    )\n}\n\n// https://stackoverflow.com/a/37865170\nexport function isGenerator(obj: any): boolean {\n    const constructor = obj?.constructor\n    if (!constructor) {\n        return false\n    }\n    if (\n        \"GeneratorFunction\" === constructor.name ||\n        \"GeneratorFunction\" === constructor.displayName\n    ) {\n        return true\n    }\n    return false\n}\n\nexport function addHiddenProp(object: any, propName: PropertyKey, value: any) {\n    defineProperty(object, propName, {\n        enumerable: false,\n        writable: true,\n        configurable: true,\n        value\n    })\n}\n\nexport function addHiddenFinalProp(object: any, propName: PropertyKey, value: any) {\n    defineProperty(object, propName, {\n        enumerable: false,\n        writable: false,\n        configurable: true,\n        value\n    })\n}\n\nexport function createInstanceofPredicate<T>(\n    name: string,\n    theClass: new (...args: any[]) => T\n): (x: any) => x is T {\n    const propName = \"isMobX\" + name\n    theClass.prototype[propName] = true\n    return function (x) {\n        return isObject(x) && x[propName] === true\n    } as any\n}\n\n/**\n * Yields true for both native and observable Map, even across different windows.\n */\nexport function isES6Map(thing: unknown): thing is Map<any, any> {\n    return thing != null && Object.prototype.toString.call(thing) === \"[object Map]\"\n}\n\n/**\n * Makes sure a Map is an instance of non-inherited native or observable Map.\n */\nexport function isPlainES6Map(thing: Map<unknown, unknown>): boolean {\n    const mapProto = Object.getPrototypeOf(thing)\n    const objectProto = Object.getPrototypeOf(mapProto)\n    const nullProto = Object.getPrototypeOf(objectProto)\n    return nullProto === null\n}\n\n/**\n * Yields true for both native and observable Set, even across different windows.\n */\nexport function isES6Set(thing: unknown): thing is Set<any> {\n    return thing != null && Object.prototype.toString.call(thing) === \"[object Set]\"\n}\n\n/**\n * Returns the following: own enumerable keys and symbols.\n */\nexport function getPlainObjectKeys(object: any) {\n    const keys = Object.keys(object)\n    const symbols = Object.getOwnPropertySymbols(object)\n    if (!symbols.length) {\n        return keys\n    }\n    return [...keys, ...symbols.filter(s => objectPrototype.propertyIsEnumerable.call(object, s))]\n}\n\n// From Immer utils\n// Returns all own keys, including non-enumerable and symbolic\nexport const ownKeys: (target: any) => Array<string | symbol> = Reflect.ownKeys\n\nexport function stringifyKey(key: any): string {\n    if (typeof key === \"string\") {\n        return key\n    }\n    if (typeof key === \"symbol\") {\n        return key.toString()\n    }\n    return new String(key).toString()\n}\n\nexport function toPrimitive(value: any) {\n    return value === null ? null : typeof value === \"object\" ? \"\" + value : value\n}\n\nexport function hasProp(target: Object, prop: PropertyKey): boolean {\n    return objectPrototype.hasOwnProperty.call(target, prop)\n}\n\nexport const getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors\n\nexport function getFlag(flags: number, mask: number) {\n    return !!(flags & mask)\n}\n\nexport function setFlag(flags: number, mask: number, newValue: boolean): number {\n    if (newValue) {\n        flags |= mask\n    } else {\n        flags &= ~mask\n    }\n    return flags\n}\n", "import { die } from \"../internal\"\n\nexport function assert20223DecoratorType(\n    context: DecoratorContext,\n    types: DecoratorContext[\"kind\"][]\n) {\n    if (__DEV__ && !types.includes(context.kind)) {\n        die(\n            `The decorator applied to '${String(context.name)}' cannot be used on a ${\n                context.kind\n            } element`\n        )\n    }\n}\n", "import {\n    IDerivationState_,\n    IObservable,\n    IDerivation,\n    createInstanceofPredicate,\n    endBatch,\n    getNextId,\n    noop,\n    propagateChanged,\n    reportObserved,\n    startBatch,\n    Lambda\n} from \"../internal\"\n\nimport { getFlag, setFlag } from \"../utils/utils\"\n\nexport const $mobx = Symbol(\"mobx administration\")\n\nexport interface IAtom extends IObservable {\n    reportObserved(): boolean\n    reportChanged(): void\n}\n\nconst enum AtomFlags {\n    isBeingObserved = 0b001,\n    isPendingUnobservation = 0b010,\n    diffValue = 0b100\n}\n\nexport class Atom implements IAtom {\n    private flags_ = 0b000\n\n    // Allocated lazily on first observer to save memory.\n    observers_: Set<IDerivation> | null = null\n\n    lastAccessedBy_ = 0\n    lowestObserverState_ = IDerivationState_.NOT_TRACKING_\n    /**\n     * Create a new atom. For debugging purposes it is recommended to give it a name.\n     * The onBecomeObserved and onBecomeUnobserved callbacks can be used for resource management.\n     */\n    constructor(public name_ = __DEV__ ? \"Atom@\" + getNextId() : \"Atom\") {}\n\n    // for effective unobserving. BaseAtom has true, for extra optimization, so its onBecomeUnobserved never gets called, because it's not needed\n    get isBeingObserved(): boolean {\n        return getFlag(this.flags_, AtomFlags.isBeingObserved)\n    }\n    set isBeingObserved(newValue: boolean) {\n        this.flags_ = setFlag(this.flags_, AtomFlags.isBeingObserved, newValue)\n    }\n\n    get isPendingUnobservation(): boolean {\n        return getFlag(this.flags_, AtomFlags.isPendingUnobservation)\n    }\n    set isPendingUnobservation(newValue: boolean) {\n        this.flags_ = setFlag(this.flags_, AtomFlags.isPendingUnobservation, newValue)\n    }\n\n    get diffValue(): 0 | 1 {\n        return getFlag(this.flags_, AtomFlags.diffValue) ? 1 : 0\n    }\n    set diffValue(newValue: 0 | 1) {\n        this.flags_ = setFlag(this.flags_, AtomFlags.diffValue, newValue === 1 ? true : false)\n    }\n\n    // onBecomeObservedListeners\n    public onBOL: Set<Lambda> | undefined\n    // onBecomeUnobservedListeners\n    public onBUOL: Set<Lambda> | undefined\n\n    public onBO() {\n        if (this.onBOL) {\n            this.onBOL.forEach(listener => listener())\n        }\n    }\n\n    public onBUO() {\n        if (this.onBUOL) {\n            this.onBUOL.forEach(listener => listener())\n        }\n    }\n\n    /**\n     * Invoke this method to notify mobx that your atom has been used somehow.\n     * Returns true if there is currently a reactive context.\n     */\n    public reportObserved(): boolean {\n        return reportObserved(this)\n    }\n\n    /**\n     * Invoke this method _after_ this method has changed to signal mobx that all its observers should invalidate.\n     */\n    public reportChanged() {\n        startBatch()\n        propagateChanged(this)\n        endBatch()\n    }\n\n    toString() {\n        return this.name_\n    }\n}\n\nexport const isAtom = createInstanceofPredicate(\"Atom\", Atom)\n\nexport function createAtom(\n    name: string,\n    onBecomeObservedHandler: () => void = noop,\n    onBecomeUnobservedHandler: () => void = noop\n): IAtom {\n    const atom = new Atom(name)\n    // default `noop` listener will not initialize the hook Set\n    if (onBecomeObservedHandler !== noop) {\n        atom.onBOL = new Set([onBecomeObservedHandler])\n    }\n\n    if (onBecomeUnobservedHandler !== noop) {\n        atom.onBUOL = new Set([onBecomeUnobservedHandler])\n    }\n    return atom\n}\n", "import { deepEqual } from \"../internal\"\n\nexport interface IEqualsComparer<T> {\n    (a: T, b: T): boolean\n}\n\nexport function compareIdentity(a: any, b: any): boolean {\n    return a === b\n}\n\nexport function compareStructural(a: any, b: any): boolean {\n    return deepEqual(a, b)\n}\n\nexport function compareShallow(a: any, b: any): boolean {\n    return deepEqual(a, b, 1)\n}\n\nexport const compareDefault = Object.is\n", "import {\n    deepEqual,\n    isES6Map,\n    isES6Set,\n    isObservable,\n    isObservableArray,\n    isObservableMap,\n    isObservableSet,\n    isObservableObject,\n    isPlainObject,\n    observable,\n    die,\n    isAction,\n    autoAction,\n    flow,\n    isFlow,\n    isGenerator\n} from \"../internal\"\n\nexport interface IEnhancer<T> {\n    (newValue: T, oldValue: T | undefined, name: string): T\n}\n\nexport function deepEnhancer(v, _, name) {\n    // primitives can never be made observable; skip the type checks below\n    if (v === null || (typeof v !== \"object\" && typeof v !== \"function\")) {\n        return v\n    }\n\n    // it is an observable already, done\n    if (isObservable(v)) {\n        return v\n    }\n\n    // something that can be converted and mutated?\n    if (Array.isArray(v)) {\n        return observable.array(v, { name })\n    }\n    if (isPlainObject(v)) {\n        return observable.object(v, undefined, { name })\n    }\n    if (isES6Map(v)) {\n        return observable.map(v, { name })\n    }\n    if (isES6Set(v)) {\n        return observable.set(v, { name })\n    }\n    if (typeof v === \"function\" && !isAction(v) && !isFlow(v)) {\n        if (isGenerator(v)) {\n            return flow(v)\n        } else {\n            return autoAction(name, v)\n        }\n    }\n    return v\n}\n\nexport function shallowEnhancer(v, _, name): any {\n    if (v === undefined || v === null) {\n        return v\n    }\n    if (isObservableObject(v) || isObservableArray(v) || isObservableMap(v) || isObservableSet(v)) {\n        return v\n    }\n    if (Array.isArray(v)) {\n        return observable.array(v, { name, deep: false })\n    }\n    if (isPlainObject(v)) {\n        return observable.object(v, undefined, { name, deep: false })\n    }\n    if (isES6Map(v)) {\n        return observable.map(v, { name, deep: false })\n    }\n    if (isES6Set(v)) {\n        return observable.set(v, { name, deep: false })\n    }\n\n    if (__DEV__) {\n        die(\n            \"The shallow modifier / decorator can only used in combination with arrays, objects, maps and sets\"\n        )\n    }\n}\n\nexport function referenceEnhancer(newValue?) {\n    // never turn into an observable\n    return newValue\n}\n\nexport function refStructEnhancer(v, oldValue): any {\n    if (__DEV__ && isObservable(v)) {\n        die(`observable.struct should not be used with observable values`)\n    }\n    if (deepEqual(v, oldValue)) {\n        return oldValue\n    }\n    return v\n}\n", "import { die, Annotation, hasProp, ObservableObjectAdministration, MakeResult } from \"../internal\"\n\nconst OVERRIDE = \"override\"\n\nexport const override: Annotation = {\n    annotationType_: OVERRIDE,\n    make_,\n    extend_\n}\n\nexport function isOverride(annotation: Annotation): boolean {\n    return annotation.annotationType_ === OVERRIDE\n}\n\nfunction make_(this: Annotation, adm: ObservableObjectAdministration, key): MakeResult {\n    // Must not be plain object\n    if (__DEV__ && adm.isPlainObject_) {\n        die(\n            `Cannot apply '${this.annotationType_}' to '${adm.name_}.${key.toString()}':` +\n                `\\n'${this.annotationType_}' cannot be used on plain objects.`\n        )\n    }\n    // Must override something\n    if (__DEV__ && !hasProp(adm.appliedAnnotations_!, key)) {\n        die(\n            `'${adm.name_}.${key.toString()}' is annotated with '${this.annotationType_}', ` +\n                `but no such annotated member was found on prototype.`\n        )\n    }\n    return MakeResult.Cancel\n}\n\nfunction extend_(this: Annotation, adm, key, descriptor, proxyTrap): boolean {\n    die(44, this.annotationType_)\n}\n", "import {\n    ObservableObjectAdministration,\n    createAction,\n    isAction,\n    defineProperty,\n    die,\n    isFunction,\n    Annotation,\n    globalState,\n    MakeResult,\n    assert20223DecoratorType\n} from \"../internal\"\n\nexport function createActionAnnotation(name: string, options?: object): Annotation {\n    return {\n        annotationType_: name,\n        options_: options,\n        make_,\n        extend_\n    }\n}\n\nfunction make_(\n    this: Annotation,\n    adm: ObservableObjectAdministration,\n    key: PropertyKey,\n    descriptor: PropertyDescriptor,\n    source: object\n): MakeResult {\n    // bound\n    if (this.options_?.bound) {\n        return this.extend_(adm, key, descriptor, false) === null\n            ? MakeResult.Cancel\n            : MakeResult.Break\n    }\n    // own\n    if (source === adm.target_) {\n        return this.extend_(adm, key, descriptor, false) === null\n            ? MakeResult.Cancel\n            : MakeResult.Continue\n    }\n    // prototype\n    if (isAction(descriptor.value)) {\n        // A prototype could have been annotated already by other constructor,\n        // rest of the proto chain must be annotated already\n        return MakeResult.Break\n    }\n    const actionDescriptor = createActionDescriptor(adm, this, key, descriptor, false)\n    defineProperty(source, key, actionDescriptor)\n    return MakeResult.Continue\n}\n\nfunction extend_(\n    this: Annotation,\n    adm: ObservableObjectAdministration,\n    key: PropertyKey,\n    descriptor: PropertyDescriptor,\n    proxyTrap: boolean\n): boolean | null {\n    const actionDescriptor = createActionDescriptor(adm, this, key, descriptor)\n    return adm.defineProperty_(key, actionDescriptor, proxyTrap)\n}\n\nexport function decorateAction20223_(annotation: Annotation, mthd, context: DecoratorContext) {\n    if (__DEV__) {\n        assert20223DecoratorType(context, [\"method\", \"field\"])\n    }\n    const { kind, name, addInitializer } = context\n    const ann = annotation\n\n    const _createAction = m =>\n        createAction(ann.options_?.name ?? name!.toString(), m, ann.options_?.autoAction ?? false)\n\n    if (kind == \"field\") {\n        return function (initMthd) {\n            let mthd = initMthd\n            if (!isAction(mthd)) {\n                mthd = _createAction(mthd)\n            }\n            if (ann.options_?.bound) {\n                mthd = mthd.bind(this)\n                mthd.isMobxAction = true\n            }\n            return mthd\n        }\n    }\n\n    if (kind == \"method\") {\n        if (!isAction(mthd)) {\n            mthd = _createAction(mthd)\n        }\n\n        if (ann.options_?.bound) {\n            addInitializer(function () {\n                const self = this as any\n                const bound = self[name].bind(self)\n                bound.isMobxAction = true\n                self[name] = bound\n            })\n        }\n\n        return mthd\n    }\n\n    die(43, ann.annotationType_, String(name), kind)\n}\n\nfunction assertActionDescriptor(\n    adm: ObservableObjectAdministration,\n    { annotationType_ }: Annotation,\n    key: PropertyKey,\n    { value }: PropertyDescriptor\n) {\n    if (__DEV__ && !isFunction(value)) {\n        die(\n            `Cannot apply '${annotationType_}' to '${adm.name_}.${key.toString()}':` +\n                `\\n'${annotationType_}' can only be used on properties with a function value.`\n        )\n    }\n}\n\nexport function createActionDescriptor(\n    adm: ObservableObjectAdministration,\n    annotation: Annotation,\n    key: PropertyKey,\n    descriptor: PropertyDescriptor,\n    // provides ability to disable safeDescriptors for prototypes\n    safeDescriptors: boolean = globalState.safeDescriptors\n) {\n    assertActionDescriptor(adm, annotation, key, descriptor)\n    let { value } = descriptor\n    if (annotation.options_?.bound) {\n        value = value.bind(adm.proxy_ ?? adm.target_)\n    }\n    return {\n        value: createAction(\n            annotation.options_?.name ?? key.toString(),\n            value,\n            annotation.options_?.autoAction ?? false,\n            // https://github.com/mobxjs/mobx/discussions/3140\n            annotation.options_?.bound ? adm.proxy_ ?? adm.target_ : undefined\n        ),\n        // Non-configurable for classes\n        // prevents accidental field redefinition in subclass\n        configurable: safeDescriptors ? adm.isPlainObject_ : true,\n        // https://github.com/mobxjs/mobx/pull/2641#issuecomment-737292058\n        enumerable: false,\n        // Non-obsevable, therefore non-writable\n        // Also prevents rewriting in subclass constructor\n        writable: safeDescriptors ? false : true\n    }\n}\n", "import {\n    ObservableObjectAdministration,\n    Annotation,\n    defineProperty,\n    die,\n    flow,\n    isFlow,\n    isFunction,\n    globalState,\n    MakeResult,\n    hasProp,\n    assert20223DecoratorType\n} from \"../internal\"\n\nexport function createFlowAnnotation(name: string, options?: object): Annotation {\n    return {\n        annotationType_: name,\n        options_: options,\n        make_,\n        extend_\n    }\n}\n\nfunction make_(\n    this: Annotation,\n    adm: ObservableObjectAdministration,\n    key: PropertyKey,\n    descriptor: PropertyDescriptor,\n    source: object\n): MakeResult {\n    // own\n    if (source === adm.target_) {\n        return this.extend_(adm, key, descriptor, false) === null\n            ? MakeResult.Cancel\n            : MakeResult.Continue\n    }\n    // prototype\n    // bound - must annotate protos to support super.flow()\n    if (this.options_?.bound && (!hasProp(adm.target_, key) || !isFlow(adm.target_[key]))) {\n        if (this.extend_(adm, key, descriptor, false) === null) {\n            return MakeResult.Cancel\n        }\n    }\n    if (isFlow(descriptor.value)) {\n        // A prototype could have been annotated already by other constructor,\n        // rest of the proto chain must be annotated already\n        return MakeResult.Break\n    }\n    const flowDescriptor = createFlowDescriptor(adm, this, key, descriptor, false, false)\n    defineProperty(source, key, flowDescriptor)\n    return MakeResult.Continue\n}\n\nfunction extend_(\n    this: Annotation,\n    adm: ObservableObjectAdministration,\n    key: PropertyKey,\n    descriptor: PropertyDescriptor,\n    proxyTrap: boolean\n): boolean | null {\n    const flowDescriptor = createFlowDescriptor(adm, this, key, descriptor, this.options_?.bound)\n    return adm.defineProperty_(key, flowDescriptor, proxyTrap)\n}\n\nexport function decorateFlow20223_(\n    annotation: Annotation,\n    mthd,\n    context: ClassMethodDecoratorContext\n) {\n    if (__DEV__) {\n        assert20223DecoratorType(context, [\"method\"])\n    }\n    const { name, addInitializer } = context\n\n    if (!isFlow(mthd)) {\n        mthd = flow(mthd)\n    }\n\n    if (annotation.options_?.bound) {\n        addInitializer(function () {\n            const self = this as any\n            const bound = self[name].bind(self)\n            bound.isMobXFlow = true\n            self[name] = bound\n        })\n    }\n\n    return mthd\n}\n\nfunction assertFlowDescriptor(\n    adm: ObservableObjectAdministration,\n    { annotationType_ }: Annotation,\n    key: PropertyKey,\n    { value }: PropertyDescriptor\n) {\n    if (__DEV__ && !isFunction(value)) {\n        die(\n            `Cannot apply '${annotationType_}' to '${adm.name_}.${key.toString()}':` +\n                `\\n'${annotationType_}' can only be used on properties with a generator function value.`\n        )\n    }\n}\n\nfunction createFlowDescriptor(\n    adm: ObservableObjectAdministration,\n    annotation: Annotation,\n    key: PropertyKey,\n    descriptor: PropertyDescriptor,\n    bound: boolean,\n    // provides ability to disable safeDescriptors for prototypes\n    safeDescriptors: boolean = globalState.safeDescriptors\n): PropertyDescriptor {\n    assertFlowDescriptor(adm, annotation, key, descriptor)\n    let { value } = descriptor\n    // In case of flow.bound, the descriptor can be from already annotated prototype\n    if (!isFlow(value)) {\n        value = flow(value)\n    }\n    if (bound) {\n        // We do not keep original function around, so we bind the existing flow\n        value = value.bind(adm.proxy_ ?? adm.target_)\n        // This is normally set by `flow`, but `bind` returns new function...\n        value.isMobXFlow = true\n    }\n    return {\n        value,\n        // Non-configurable for classes\n        // prevents accidental field redefinition in subclass\n        configurable: safeDescriptors ? adm.isPlainObject_ : true,\n        // https://github.com/mobxjs/mobx/pull/2641#issuecomment-737292058\n        enumerable: false,\n        // Non-obsevable, therefore non-writable\n        // Also prevents rewriting in subclass constructor\n        writable: safeDescriptors ? false : true\n    }\n}\n", "import {\n    ObservableObjectAdministration,\n    die,\n    Annotation,\n    MakeResult,\n    assert20223DecoratorType,\n    $mobx,\n    asObservableObject,\n    ComputedValue,\n    assign\n} from \"../internal\"\n\nexport function createComputedAnnotation(name: string, options?: object): Annotation {\n    return {\n        annotationType_: name,\n        options_: options,\n        make_,\n        extend_\n    }\n}\n\nfunction make_(\n    this: Annotation,\n    adm: ObservableObjectAdministration,\n    key: PropertyKey,\n    descriptor: PropertyDescriptor\n): MakeResult {\n    return this.extend_(adm, key, descriptor, false) === null ? MakeResult.Cancel : MakeResult.Break\n}\n\nfunction extend_(\n    this: Annotation,\n    adm: ObservableObjectAdministration,\n    key: PropertyKey,\n    descriptor: PropertyDescriptor,\n    proxyTrap: boolean\n): boolean | null {\n    assertComputedDescriptor(adm, this, key, descriptor)\n    return adm.defineComputedProperty_(\n        key,\n        assign({}, this.options_, {\n            get: descriptor.get,\n            set: descriptor.set\n        }),\n        proxyTrap\n    )\n}\n\nexport function decorateComputed20223_(\n    annotation: Annotation,\n    get,\n    context: ClassGetterDecoratorContext\n) {\n    if (__DEV__) {\n        assert20223DecoratorType(context, [\"getter\"])\n    }\n    const ann = annotation\n    const { name: key, addInitializer } = context\n    let computedValues: WeakMap<object, ComputedValue<any>> | undefined\n\n    // Defer ComputedValue creation until first access — avoids allocating\n    // ComputedValues for getters that are never read on a given instance.\n    // The factory is materialised by ObservableObjectAdministration on demand.\n    function createComputedValue(target: object, adm: ObservableObjectAdministration) {\n        const options = assign({}, ann.options_, {\n            get,\n            context: target\n        })\n        options.name ||= __DEV__\n            ? `${adm.name_}.${key.toString()}`\n            : `ObservableObject.${key.toString()}`\n        return new ComputedValue(options)\n    }\n\n    addInitializer(function () {\n        const adm: ObservableObjectAdministration = asObservableObject(this)[$mobx]\n        const target = this as object\n        const observable = adm.values_.get(key)\n        if (observable instanceof ComputedValue && observable.derivation !== get) {\n            adm.values_.delete(key)\n        }\n        ;(adm.lazyComputedKeys_ ??= new Map()).set(key, () => createComputedValue(target, adm))\n    })\n\n    return function () {\n        const adm: ObservableObjectAdministration = this[$mobx]\n        const observable = adm.values_.get(key)\n        if (observable instanceof ComputedValue && observable.derivation !== get) {\n            let computed = computedValues?.get(this)\n            if (!computed) {\n                computed = createComputedValue(this, adm)\n                ;(computedValues ??= new WeakMap()).set(this, computed)\n            }\n            return computed.get()\n        }\n        return adm.getObservablePropValue_(key)\n    }\n}\n\nfunction assertComputedDescriptor(\n    adm: ObservableObjectAdministration,\n    { annotationType_ }: Annotation,\n    key: PropertyKey,\n    { get }: PropertyDescriptor\n) {\n    if (__DEV__ && !get) {\n        die(\n            `Cannot apply '${annotationType_}' to '${adm.name_}.${key.toString()}':` +\n                `\\n'${annotationType_}' can only be used on getter(+setter) properties.`\n        )\n    }\n}\n", "import {\n    ObservableObjectAdministration,\n    deepEnhancer,\n    die,\n    Annotation,\n    MakeResult,\n    assert20223DecoratorType,\n    ObservableValue,\n    asObservableObject,\n    $mobx\n} from \"../internal\"\n\nexport function createObservableAnnotation(name: string, options?: object): Annotation {\n    return {\n        annotationType_: name,\n        options_: options,\n        make_,\n        extend_\n    }\n}\n\nfunction make_(\n    this: Annotation,\n    adm: ObservableObjectAdministration,\n    key: PropertyKey,\n    descriptor: PropertyDescriptor\n): MakeResult {\n    return this.extend_(adm, key, descriptor, false) === null ? MakeResult.Cancel : MakeResult.Break\n}\n\nfunction extend_(\n    this: Annotation,\n    adm: ObservableObjectAdministration,\n    key: PropertyKey,\n    descriptor: PropertyDescriptor,\n    proxyTrap: boolean\n): boolean | null {\n    assertObservableDescriptor(adm, this, key, descriptor)\n    return adm.defineObservableProperty_(\n        key,\n        descriptor.value,\n        this.options_?.enhancer_ ?? deepEnhancer,\n        proxyTrap\n    )\n}\n\nexport function decorateObservable20223_(\n    annotation: Annotation,\n    desc,\n    context: ClassAccessorDecoratorContext | ClassFieldDecoratorContext\n) {\n    if (__DEV__) {\n        if (context.kind === \"field\") {\n            throw die(\n                `Please use \\`@observable accessor ${String(\n                    context.name\n                )}\\` instead of \\`@observable ${String(context.name)}\\``\n            )\n        }\n        assert20223DecoratorType(context, [\"accessor\"])\n    }\n\n    const ann = annotation\n    const { kind, name } = context\n\n    if (kind !== \"accessor\") {\n        return\n    }\n\n    // Defer ObservableValue construction until first access. The factory is\n    // materialised by ObservableObjectAdministration on demand, so unused\n    // fields on wide classes never pay the per-instance allocation cost.\n    function registerLazy(target: any, value: any): ObservableObjectAdministration {\n        const adm: ObservableObjectAdministration = asObservableObject(target)[$mobx]\n        ;(adm.lazyObservableKeys_ ??= new Map()).set(\n            name,\n            () =>\n                new ObservableValue(\n                    value,\n                    ann.options_?.enhancer_ ?? deepEnhancer,\n                    __DEV__\n                        ? `${adm.name_}.${name.toString()}`\n                        : `ObservableObject.${name.toString()}`,\n                    false\n                )\n        )\n        return adm\n    }\n\n    return {\n        get() {\n            const adm: ObservableObjectAdministration =\n                this[$mobx] ?? registerLazy(this, desc.get.call(this))\n            return adm.getObservablePropValue_(name)\n        },\n        set(value) {\n            const adm: ObservableObjectAdministration = this[$mobx] ?? registerLazy(this, value)\n            return adm.setObservablePropValue_(name, value)\n        },\n        init(value) {\n            registerLazy(this, value)\n            return value\n        }\n    }\n}\n\nfunction assertObservableDescriptor(\n    adm: ObservableObjectAdministration,\n    { annotationType_ }: Annotation,\n    key: PropertyKey,\n    descriptor: PropertyDescriptor\n) {\n    if (__DEV__ && !(\"value\" in descriptor)) {\n        die(\n            `Cannot apply '${annotationType_}' to '${adm.name_}.${key.toString()}':` +\n                `\\n'${annotationType_}' cannot be used on getter/setter properties`\n        )\n    }\n}\n", "import {\n    ObservableObjectAdministration,\n    observable,\n    observableRef,\n    Annotation,\n    defineProperty,\n    createAction,\n    globalState,\n    flow,\n    flowBound,\n    computed,\n    autoAction,\n    autoActionBound,\n    isGenerator,\n    MakeResult,\n    isAction\n} from \"../internal\"\n\nconst AUTO = \"true\"\n\nexport const autoAnnotation: Annotation = createAutoAnnotation()\n\nexport function createAutoAnnotation(options?: object): Annotation {\n    return {\n        annotationType_: AUTO,\n        options_: options,\n        make_,\n        extend_\n    }\n}\n\nfunction make_(\n    adm: ObservableObjectAdministration,\n    key: PropertyKey,\n    descriptor: PropertyDescriptor,\n    source: object\n): MakeResult {\n    // getter -> computed\n    if (descriptor.get) {\n        return computed.make_(adm, key, descriptor, source)\n    }\n    // lone setter -> action setter\n    if (descriptor.set) {\n        // TODO make action applicable to setter and delegate to action.make_\n        const set = isAction(descriptor.set)\n            ? descriptor.set // See #4553\n            : (createAction(key.toString(), descriptor.set) as (v: any) => void)\n        // own\n        if (source === adm.target_) {\n            return adm.defineProperty_(key, {\n                configurable: globalState.safeDescriptors ? adm.isPlainObject_ : true,\n                set\n            }) === null\n                ? MakeResult.Cancel\n                : MakeResult.Continue\n        }\n        // proto\n        defineProperty(source, key, {\n            configurable: true,\n            set\n        })\n        return MakeResult.Continue\n    }\n    // function on proto -> autoAction/flow\n    if (source !== adm.target_ && typeof descriptor.value === \"function\") {\n        if (isGenerator(descriptor.value)) {\n            const flowAnnotation = this.options_?.autoBind ? flowBound : flow\n            return flowAnnotation.make_(adm, key, descriptor, source)\n        }\n        const actionAnnotation = this.options_?.autoBind ? autoActionBound : autoAction\n        return actionAnnotation.make_(adm, key, descriptor, source)\n    }\n    // other -> observable\n    // Copy props from proto as well, see test:\n    // \"decorate should work with Object.create\"\n    let observableAnnotation = this.options_?.deep === false ? observableRef : observable\n    // if function respect autoBind option\n    if (typeof descriptor.value === \"function\" && this.options_?.autoBind) {\n        descriptor.value = descriptor.value.bind(adm.proxy_ ?? adm.target_)\n    }\n    return observableAnnotation.make_(adm, key, descriptor, source)\n}\n\nfunction extend_(\n    adm: ObservableObjectAdministration,\n    key: PropertyKey,\n    descriptor: PropertyDescriptor,\n    proxyTrap: boolean\n): boolean | null {\n    // getter -> computed\n    if (descriptor.get) {\n        return computed.extend_(adm, key, descriptor, proxyTrap)\n    }\n    // lone setter -> action setter\n    if (descriptor.set) {\n        // TODO make action applicable to setter and delegate to action.extend_\n        return adm.defineProperty_(\n            key,\n            {\n                configurable: globalState.safeDescriptors ? adm.isPlainObject_ : true,\n                set: createAction(key.toString(), descriptor.set) as (v: any) => void\n            },\n            proxyTrap\n        )\n    }\n    // other -> observable\n    // if function respect autoBind option\n    if (typeof descriptor.value === \"function\" && this.options_?.autoBind) {\n        descriptor.value = descriptor.value.bind(adm.proxy_ ?? adm.target_)\n    }\n    let observableAnnotation = this.options_?.deep === false ? observableRef : observable\n    return observableAnnotation.extend_(adm, key, descriptor, proxyTrap)\n}\n", "import { die } from \"../errors\"\nimport { assign } from \"../utils/utils\"\nimport type { Annotation } from \"./annotation\"\n\nexport type DecoratorAnnotation<Decorator extends (...args: any[]) => any> = Annotation & Decorator\n\nexport function createDecoratorAnnotation<Decorator extends (...args: any[]) => any>(\n    annotation: Annotation,\n    decorate: (annotation: Annotation, value: any, context: any) => any\n): DecoratorAnnotation<Decorator> {\n    return assign(function decoratorAnnotation(value, context) {\n        if (context && typeof context.kind === \"string\") {\n            return decorate(annotation, value, context)\n        }\n        if (__DEV__) {\n            die(`Invalid arguments for \\`${annotation.annotationType_}\\``)\n        }\n        return undefined\n    }, annotation) as any\n}\n", "import {\n    IEnhancer,\n    IEqualsComparer,\n    IObservableArray,\n    IObservableMapInitialValues,\n    IMapEntries,\n    IReadonlyMapEntries,\n    IKeyValueMap,\n    IObservableSetInitialValues,\n    IObservableValue,\n    ObservableMap,\n    ObservableSet,\n    ObservableValue,\n    asDynamicObservableObject,\n    createObservableArray,\n    deepEnhancer,\n    extendObservable,\n    isES6Map,\n    isES6Set,\n    isObservable,\n    isPlainObject,\n    referenceEnhancer,\n    Annotation,\n    shallowEnhancer,\n    refStructEnhancer,\n    AnnotationsMap,\n    assign,\n    createObservableAnnotation,\n    createAutoAnnotation,\n    initObservable,\n    decorateObservable20223_\n} from \"../internal\"\nimport { createDecoratorAnnotation, type DecoratorAnnotation } from \"./decoratorannotation\"\nimport type { ClassAccessorAndFieldDecorator } from \"../types/decorator_fills\"\n\nexport const OBSERVABLE = \"observable\"\nexport const OBSERVABLE_REF = \"observable.ref\"\nexport const OBSERVABLE_SHALLOW = \"observable.shallow\"\nexport const OBSERVABLE_STRUCT = \"observable.struct\"\n\nexport type CreateObservableOptions = {\n    name?: string\n    equals?: IEqualsComparer<any>\n    deep?: boolean\n    defaultDecorator?: Annotation\n    autoBind?: boolean\n}\n\n// Predefined bags of create observable options, to avoid allocating temporarily option objects\n// in the majority of cases\nexport const defaultCreateObservableOptions: CreateObservableOptions = {\n    deep: true,\n    name: undefined,\n    defaultDecorator: undefined\n}\nObject.freeze(defaultCreateObservableOptions)\n\nexport function asCreateObservableOptions(thing: any): CreateObservableOptions {\n    return thing || defaultCreateObservableOptions\n}\n\nconst observableAnnotation = createObservableAnnotation(OBSERVABLE)\nconst observableRefAnnotation = createObservableAnnotation(OBSERVABLE_REF, {\n    enhancer_: referenceEnhancer\n})\nconst observableShallowAnnotation = createObservableAnnotation(OBSERVABLE_SHALLOW, {\n    enhancer_: shallowEnhancer\n})\nconst observableStructAnnotation = createObservableAnnotation(OBSERVABLE_STRUCT, {\n    enhancer_: refStructEnhancer\n})\n\nfunction createObservableDecoratorAnnotation(\n    annotation: Annotation\n): DecoratorAnnotation<ClassAccessorAndFieldDecorator> {\n    return createDecoratorAnnotation(annotation, decorateObservable20223_)\n}\n\nexport function getEnhancerFromOptions(options: CreateObservableOptions): IEnhancer<any> {\n    return options.deep === true\n        ? deepEnhancer\n        : options.deep === false\n        ? referenceEnhancer\n        : getEnhancerFromAnnotation(options.defaultDecorator)\n}\n\nexport function getAnnotationFromOptions(\n    options?: CreateObservableOptions\n): Annotation | undefined {\n    return options ? options.defaultDecorator ?? createAutoAnnotation(options) : undefined\n}\n\nexport function getEnhancerFromAnnotation(annotation?: Annotation): IEnhancer<any> {\n    return !annotation ? deepEnhancer : annotation.options_?.enhancer_ ?? deepEnhancer\n}\n\n/**\n * Turns an object, array or function into a reactive structure.\n * @param v the value which should become observable.\n */\nfunction createObservable(v: any, arg2?: any, arg3?: any) {\n    if (arg2 && typeof arg2.kind === \"string\") {\n        return decorateObservable20223_(observableAnnotation, v, arg2)\n    }\n\n    // already observable - ignore\n    if (isObservable(v)) {\n        return v\n    }\n\n    // plain object\n    if (isPlainObject(v)) {\n        return observable.object(v, arg2, arg3)\n    }\n\n    // Array\n    if (Array.isArray(v)) {\n        return observable.array(v, arg2)\n    }\n\n    // Map\n    if (isES6Map(v)) {\n        return observable.map(v, arg2)\n    }\n\n    // Set\n    if (isES6Set(v)) {\n        return observable.set(v, arg2)\n    }\n\n    // other object - ignore\n    if (typeof v === \"object\" && v !== null) {\n        return v\n    }\n\n    // anything else\n    return observable.box(v, arg2)\n}\n\nexport interface IObservableValueFactory {\n    <T>(value: T, options?: CreateObservableOptions): IObservableValue<T>\n    <T>(value?: T, options?: CreateObservableOptions): IObservableValue<T | undefined>\n}\n\nexport interface IObservableMapFactory {\n    <K = any, V = any>(): ObservableMap<K, V>\n    <K, V>(initialValues?: IMapEntries<K, V>, options?: CreateObservableOptions): ObservableMap<\n        K,\n        V\n    >\n    <K, V>(\n        initialValues?: IReadonlyMapEntries<K, V>,\n        options?: CreateObservableOptions\n    ): ObservableMap<K, V>\n    <K, V>(initialValues?: IKeyValueMap<V>, options?: CreateObservableOptions): ObservableMap<K, V>\n    <K, V>(initialValues?: Map<K, V>, options?: CreateObservableOptions): ObservableMap<K, V>\n    <K = any, V = any>(initialValues: undefined, options?: CreateObservableOptions): ObservableMap<\n        K,\n        V\n    >\n}\n\nexport interface IObservableFactory extends Annotation, ClassAccessorAndFieldDecorator {\n    <T = any>(value: T[], options?: CreateObservableOptions): IObservableArray<T>\n    <T = any>(value: Set<T>, options?: CreateObservableOptions): ObservableSet<T>\n    <K = any, V = any>(value: Map<K, V>, options?: CreateObservableOptions): ObservableMap<K, V>\n    <T extends object>(\n        value: T,\n        annotations?: AnnotationsMap<T, never>,\n        options?: CreateObservableOptions\n    ): T\n\n    box: IObservableValueFactory\n    array: <T = any>(initialValues?: T[], options?: CreateObservableOptions) => IObservableArray<T>\n    set: <T = any>(\n        initialValues?: IObservableSetInitialValues<T>,\n        options?: CreateObservableOptions\n    ) => ObservableSet<T>\n    map: IObservableMapFactory\n    object: <T = any>(\n        props: T,\n        annotations?: AnnotationsMap<T, never>,\n        options?: CreateObservableOptions\n    ) => T\n}\n\nconst observableFactories: IObservableFactory = {\n    box<T = any>(value: T, options?: CreateObservableOptions): IObservableValue<T> {\n        const o = asCreateObservableOptions(options)\n        return new ObservableValue(value, getEnhancerFromOptions(o), o.name, true, o.equals)\n    },\n    array<T = any>(initialValues?: T[], options?: CreateObservableOptions): IObservableArray<T> {\n        const o = asCreateObservableOptions(options)\n        return createObservableArray(initialValues, getEnhancerFromOptions(o), o.name)\n    },\n    map<K = any, V = any>(\n        initialValues?: IObservableMapInitialValues<K, V>,\n        options?: CreateObservableOptions\n    ): ObservableMap<K, V> {\n        const o = asCreateObservableOptions(options)\n        return new ObservableMap<K, V>(initialValues, getEnhancerFromOptions(o), o.name)\n    },\n    set<T = any>(\n        initialValues?: IObservableSetInitialValues<T>,\n        options?: CreateObservableOptions\n    ): ObservableSet<T> {\n        const o = asCreateObservableOptions(options)\n        return new ObservableSet<T>(initialValues, getEnhancerFromOptions(o), o.name)\n    },\n    object<T extends object = any>(\n        props: T,\n        annotations?: AnnotationsMap<T, never>,\n        options?: CreateObservableOptions\n    ): T {\n        return initObservable(() =>\n            extendObservable(asDynamicObservableObject({}, options), props, annotations)\n        )\n    }\n} as any\n\nexport const observableRef = createObservableDecoratorAnnotation(observableRefAnnotation)\nexport const observableShallow = createObservableDecoratorAnnotation(observableShallowAnnotation)\nexport const observableDeep = createObservableDecoratorAnnotation(observableAnnotation)\nexport const observableStruct = createObservableDecoratorAnnotation(observableStructAnnotation)\n\n// eslint-disable-next-line\nexport var observable: IObservableFactory = assign(\n    createObservable,\n    observableAnnotation,\n    observableFactories\n)\n", "import {\n    ComputedValue,\n    IComputedValueOptions,\n    Annotation,\n    isPlainObject,\n    isFunction,\n    die,\n    IComputedValue,\n    createComputedAnnotation,\n    compareStructural,\n    decorateComputed20223_,\n    assign\n} from \"../internal\"\nimport { createDecoratorAnnotation, type DecoratorAnnotation } from \"./decoratorannotation\"\nimport type { ClassGetterDecorator } from \"../types/decorator_fills\"\n\nexport const COMPUTED = \"computed\"\nexport const COMPUTED_STRUCT = \"computed.struct\"\n\nfunction createComputedDecoratorAnnotation(\n    annotation: Annotation\n): DecoratorAnnotation<ClassGetterDecorator> {\n    return createDecoratorAnnotation(annotation, decorateComputed20223_)\n}\n\nexport interface IComputedFactory extends Annotation, ClassGetterDecorator {\n    // computed annotation with options\n    <T>(options: IComputedValueOptions<T>): DecoratorAnnotation<ClassGetterDecorator>\n    // computed(fn, opts)\n    <T>(func: () => T, options?: IComputedValueOptions<T>): IComputedValue<T>\n}\n\nconst computedAnnotation = createComputedAnnotation(COMPUTED)\nconst computedStructAnnotation = createComputedAnnotation(COMPUTED_STRUCT, {\n    equals: compareStructural\n})\nexport const computedStruct = createComputedDecoratorAnnotation(computedStructAnnotation)\n\nexport const computed: IComputedFactory = function computed(arg1, arg2) {\n    if (arg2 && typeof arg2.kind === \"string\") {\n        return decorateComputed20223_(computedAnnotation, arg1, arg2)\n    }\n\n    if (isPlainObject(arg1)) {\n        // computed annotation with options\n        return createComputedDecoratorAnnotation(createComputedAnnotation(COMPUTED, arg1))\n    }\n\n    // computed(expr, options?)\n    if (__DEV__) {\n        if (!isFunction(arg1)) {\n            die(\"First argument to `computed` should be an expression.\")\n        }\n        if (isFunction(arg2)) {\n            die(\n                \"A setter as second argument is no longer supported, use `{ set: fn }` option instead\"\n            )\n        }\n    }\n    const opts: IComputedValueOptions<any> = isPlainObject(arg2) ? arg2 : {}\n    opts.get = arg1\n    opts.name ||= arg1.name || \"\" /* for generated name */\n\n    return new ComputedValue(opts)\n} as any\n\nassign(computed, computedAnnotation)\n", "import {\n    IDerivation,\n    endBatch,\n    globalState,\n    isSpyEnabled,\n    spyReportEnd,\n    spyReportStart,\n    startBatch,\n    untrackedEnd,\n    untrackedStart,\n    isFunction,\n    allowStateReadsStart,\n    allowStateReadsEnd,\n    ACTION,\n    EMPTY_ARRAY,\n    die,\n    getDescriptor,\n    defineProperty\n} from \"../internal\"\n\n// we don't use globalState for these in order to avoid possible issues with multiple\n// mobx versions\nlet currentActionId = 0\nlet nextActionId = 1\nconst isFunctionNameConfigurable = getDescriptor(() => {}, \"name\")?.configurable ?? false\n\n// we can safely recycle this object\nconst tmpNameDescriptor: PropertyDescriptor = {\n    value: \"action\",\n    configurable: true,\n    writable: false,\n    enumerable: false\n}\n\nexport function createAction(\n    actionName: string,\n    fn: Function,\n    autoAction: boolean = false,\n    ref?: Object\n): Function {\n    if (__DEV__) {\n        if (!isFunction(fn)) {\n            die(\"`action` can only be invoked on functions\")\n        }\n        if (typeof actionName !== \"string\" || !actionName) {\n            die(`actions should have valid names, got: '${actionName}'`)\n        }\n    }\n    function res() {\n        return executeAction(actionName, autoAction, fn, ref || this, arguments)\n    }\n    res.isMobxAction = true\n    res.toString = () => fn.toString()\n    if (isFunctionNameConfigurable) {\n        tmpNameDescriptor.value = actionName\n        defineProperty(res, \"name\", tmpNameDescriptor)\n    }\n    return res\n}\n\nexport function executeAction(\n    actionName: string,\n    canRunAsDerivation: boolean,\n    fn: Function,\n    scope?: any,\n    args?: IArguments\n) {\n    const runInfo = _startAction(actionName, canRunAsDerivation, scope, args)\n    try {\n        return fn.apply(scope, args)\n    } catch (err) {\n        runInfo.error_ = err\n        throw err\n    } finally {\n        _endAction(runInfo)\n    }\n}\n\nexport interface IActionRunInfo {\n    prevDerivation_: IDerivation | null\n    prevAllowStateChanges_: boolean\n    prevAllowStateReads_: boolean\n    notifySpy_: boolean\n    startTime_: number\n    error_?: any\n    parentActionId_: number\n    actionId_: number\n    runAsAction_?: boolean\n}\n\nexport function _startAction(\n    actionName: string,\n    canRunAsDerivation: boolean, // true for autoAction\n    scope: any,\n    args?: IArguments\n): IActionRunInfo {\n    const notifySpy_ = __DEV__ && isSpyEnabled() && !!actionName\n    let startTime_: number = 0\n    if (notifySpy_) {\n        startTime_ = Date.now()\n        const flattenedArgs = args ? Array.from(args) : EMPTY_ARRAY\n        spyReportStart({\n            type: ACTION,\n            name: actionName,\n            object: scope,\n            arguments: flattenedArgs\n        })\n    }\n    const prevDerivation_ = globalState.trackingDerivation\n    const runAsAction = !canRunAsDerivation || !prevDerivation_\n    startBatch()\n    let prevAllowStateChanges_ = globalState.allowStateChanges // by default preserve previous allow\n    if (runAsAction) {\n        untrackedStart()\n        if (__DEV__) {\n            prevAllowStateChanges_ = allowStateChangesStart(true)\n        }\n    }\n    const prevAllowStateReads_ = globalState.allowStateReads\n    if (__DEV__) {\n        allowStateReadsStart(true)\n    }\n    const runInfo = {\n        runAsAction_: runAsAction,\n        prevDerivation_,\n        prevAllowStateChanges_,\n        prevAllowStateReads_,\n        notifySpy_,\n        startTime_,\n        actionId_: nextActionId++,\n        parentActionId_: currentActionId\n    }\n    currentActionId = runInfo.actionId_\n    return runInfo\n}\n\nexport function _endAction(runInfo: IActionRunInfo) {\n    if (currentActionId !== runInfo.actionId_) {\n        die(30)\n    }\n    currentActionId = runInfo.parentActionId_\n\n    if (runInfo.error_ !== undefined) {\n        globalState.suppressReactionErrors = true\n    }\n    if (__DEV__) {\n        allowStateChangesEnd(runInfo.prevAllowStateChanges_)\n        allowStateReadsEnd(runInfo.prevAllowStateReads_)\n    }\n    endBatch()\n    if (runInfo.runAsAction_) {\n        untrackedEnd(runInfo.prevDerivation_)\n    }\n    if (__DEV__ && runInfo.notifySpy_) {\n        spyReportEnd({ time: Date.now() - runInfo.startTime_ })\n    }\n    globalState.suppressReactionErrors = false\n}\n\nexport function allowStateChanges<T>(allowStateChanges: boolean, func: () => T): T {\n    const prev = allowStateChangesStart(allowStateChanges)\n    try {\n        return func()\n    } finally {\n        allowStateChangesEnd(prev)\n    }\n}\n\nexport function allowStateChangesStart(allowStateChanges: boolean) {\n    const prev = globalState.allowStateChanges\n    globalState.allowStateChanges = allowStateChanges\n    return prev\n}\n\nexport function allowStateChangesEnd(prev: boolean) {\n    globalState.allowStateChanges = prev\n}\n", "import {\n    Atom,\n    IEnhancer,\n    IInterceptable,\n    IEqualsComparer,\n    IListenable,\n    checkIfStateModificationsAreAllowed,\n    compareDefault,\n    createInstanceofPredicate,\n    getNextId,\n    hasInterceptors,\n    hasListeners,\n    interceptChange,\n    isSpyEnabled,\n    notifyListeners,\n    spyReport,\n    spyReportEnd,\n    spyReportStart,\n    toPrimitive,\n    globalState,\n    IUNCHANGED,\n    UPDATE\n} from \"../internal\"\n\nexport interface IValueWillChange<T> {\n    object: IObservableValue<T>\n    type: \"update\"\n    newValue: T\n}\n\nexport type IValueDidChange<T = any> = {\n    type: \"update\"\n    observableKind: \"value\"\n    object: IObservableValue<T>\n    debugObjectName: string\n    newValue: T\n    oldValue: T | undefined\n}\nexport type IBoxDidChange<T = any> =\n    | {\n          type: \"create\"\n          observableKind: \"value\"\n          object: IObservableValue<T>\n          debugObjectName: string\n          newValue: T\n      }\n    | IValueDidChange<T>\n\nexport interface IObservableValue<T> {\n    get(): T\n    set(value: T): void\n}\n\nconst CREATE = \"create\"\n\nexport class ObservableValue<T>\n    extends Atom\n    implements IObservableValue<T>, IInterceptable<IValueWillChange<T>>, IListenable\n{\n    hasUnreportedChange_ = false\n    interceptors_\n    changeListeners_\n    value_\n    dehancer: any\n\n    constructor(\n        value: T,\n        public enhancer_: IEnhancer<T>,\n        public name_ = __DEV__ ? \"ObservableValue@\" + getNextId() : \"ObservableValue\",\n        notifySpy = true,\n        private equals_: IEqualsComparer<any> = compareDefault\n    ) {\n        super(name_)\n        this.value_ = enhancer_(value, undefined, name_)\n        if (__DEV__ && notifySpy && isSpyEnabled()) {\n            // only notify spy if this is a stand-alone observable\n            spyReport({\n                type: CREATE,\n                object: this,\n                observableKind: \"value\",\n                debugObjectName: this.name_,\n                newValue: \"\" + this.value_?.toString()\n            })\n        }\n    }\n\n    private dehanceValue(value: T): T {\n        if (this.dehancer !== undefined) {\n            return this.dehancer(value)\n        }\n        return value\n    }\n\n    public set(newValue: T) {\n        const oldValue = this.value_\n        newValue = this.prepareNewValue_(newValue) as any\n        if (newValue !== globalState.UNCHANGED) {\n            const notifySpy = __DEV__ && isSpyEnabled()\n            if (__DEV__ && notifySpy) {\n                spyReportStart({\n                    type: UPDATE,\n                    object: this,\n                    observableKind: \"value\",\n                    debugObjectName: this.name_,\n                    newValue,\n                    oldValue\n                })\n            }\n            this.setNewValue_(newValue)\n            if (__DEV__ && notifySpy) {\n                spyReportEnd()\n            }\n        }\n    }\n\n    private prepareNewValue_(newValue): T | IUNCHANGED {\n        checkIfStateModificationsAreAllowed(this)\n        if (hasInterceptors(this)) {\n            const change = interceptChange<IValueWillChange<T>>(this, {\n                object: this,\n                type: UPDATE,\n                newValue\n            })\n            if (!change) {\n                return globalState.UNCHANGED\n            }\n            newValue = change.newValue\n        }\n        // apply modifier\n        newValue = this.enhancer_(newValue, this.value_, this.name_)\n        return this.equals_(this.value_, newValue) ? globalState.UNCHANGED : newValue\n    }\n\n    setNewValue_(newValue: T) {\n        const oldValue = this.value_\n        this.value_ = newValue\n        this.reportChanged()\n        if (hasListeners(this)) {\n            notifyListeners(this, {\n                type: UPDATE,\n                object: this,\n                newValue,\n                oldValue\n            })\n        }\n    }\n\n    public get(): T {\n        this.reportObserved()\n        return this.dehanceValue(this.value_)\n    }\n\n    raw() {\n        // used by MST ot get undehanced value\n        return this.value_\n    }\n\n    toJSON() {\n        return this.get()\n    }\n\n    toString() {\n        return `${this.name_}[${this.value_}]`\n    }\n\n    valueOf(): T {\n        return toPrimitive(this.get())\n    }\n\n    [Symbol.toPrimitive]() {\n        return this.valueOf()\n    }\n}\n\nexport const isObservableValue = createInstanceofPredicate(\"ObservableValue\", ObservableValue) as (\n    x: any\n) => x is IObservableValue<any>\n", "import {\n    CaughtException,\n    IDerivation,\n    IDerivationState_,\n    IEqualsComparer,\n    IObservable,\n    Lambda,\n    clearObserving,\n    compareDefault,\n    createAction,\n    createInstanceofPredicate,\n    endBatch,\n    getNextId,\n    globalState,\n    isCaughtException,\n    isSpyEnabled,\n    markObserved,\n    propagateChangeConfirmed,\n    propagateMaybeChanged,\n    reportObserved,\n    shouldCompute,\n    spyReport,\n    startBatch,\n    toPrimitive,\n    trackDerivedFunction,\n    die,\n    allowStateChangesStart,\n    allowStateChangesEnd\n} from \"../internal\"\n\nimport { getFlag, setFlag } from \"../utils/utils\"\n\nexport interface IComputedValue<T> {\n    get(): T\n    set(value: T): void\n}\n\nexport interface IComputedValueOptions<T> {\n    get?: () => T\n    set?: (value: T) => void\n    name?: string\n    equals?: IEqualsComparer<T>\n    context?: any\n    requiresReaction?: boolean\n    keepAlive?: boolean\n}\n\nexport type IComputedDidChange<T = any> = {\n    type: \"update\"\n    observableKind: \"computed\"\n    object: unknown\n    debugObjectName: string\n    newValue: T\n    oldValue: T | undefined\n}\n\n/**\n * A node in the state dependency root that observes other nodes, and can be observed itself.\n *\n * ComputedValue will remember the result of the computation for the duration of the batch, or\n * while being observed.\n *\n * During this time it will recompute only when one of its direct dependencies changed,\n * but only when it is being accessed with `ComputedValue.get()`.\n *\n * Implementation description:\n * 1. First time it's being accessed it will compute and remember result\n *    give back remembered result until 2. happens\n * 2. First time any deep dependency change, propagate POSSIBLY_STALE to all observers, wait for 3.\n * 3. When it's being accessed, recompute if any shallow dependency changed.\n *    if result changed: propagate STALE to all observers, that were POSSIBLY_STALE from the last step.\n *    go to step 2. either way\n *\n * If at any point it's outside batch and it isn't observed: reset everything and go to 1.\n */\nconst enum ComputedValueFlags {\n    isComputing = 0b00001,\n    isRunningSetter = 0b00010,\n    isBeingObserved = 0b00100,\n    isPendingUnobservation = 0b01000,\n    diffValue = 0b10000\n}\n\nexport class ComputedValue<T> implements IObservable, IComputedValue<T>, IDerivation {\n    dependenciesState_ = IDerivationState_.NOT_TRACKING_\n    observing_: IObservable[] = [] // nodes we are looking at. Our value depends on these nodes\n    newObserving_ = null // during tracking it's an array with new observed observers\n    // Lazily allocated on first observer - see Atom.observers_.\n    observers_: Set<IDerivation> | null = null\n    runId_ = 0\n    lastAccessedBy_ = 0\n    lowestObserverState_ = IDerivationState_.UP_TO_DATE_\n    unboundDepsCount_ = 0\n    protected value_: T | undefined | CaughtException = new CaughtException(null)\n    name_: string\n    triggeredBy_?: string\n\n    private flags_ = 0b00000\n\n    derivation: () => T // N.B: unminified as it is used by MST\n    setter_?: (value: T) => void\n    scope_: Object | undefined\n    private equals_: IEqualsComparer<any>\n    private requiresReaction_: boolean | undefined\n    keepAlive_: boolean\n\n    /**\n     * Create a new computed value based on a function expression.\n     *\n     * The `name` property is for debug purposes only.\n     *\n     * The `equals` property specifies the comparer function used to determine if a newly produced\n     * value differs from the previous value. Structural comparison can be convenient if you always\n     * produce a new aggregated object and don't want to notify observers if it is structurally the same.\n     * This is useful for working with vectors, mouse coordinates etc.\n     */\n    constructor(options: IComputedValueOptions<T>) {\n        if (!options.get) {\n            die(31)\n        }\n        this.derivation = options.get!\n        this.name_ = options.name || (__DEV__ ? \"ComputedValue@\" + getNextId() : \"ComputedValue\")\n        if (options.set) {\n            this.setter_ = createAction(\n                __DEV__ ? this.name_ + \"-setter\" : \"ComputedValue-setter\",\n                options.set\n            ) as any\n        }\n        this.equals_ = options.equals || compareDefault\n        this.scope_ = options.context\n        this.requiresReaction_ = options.requiresReaction\n        this.keepAlive_ = !!options.keepAlive\n    }\n\n    onBecomeStale_() {\n        propagateMaybeChanged(this)\n    }\n\n    public onBOL: Set<Lambda> | undefined\n    public onBUOL: Set<Lambda> | undefined\n\n    public onBO() {\n        if (this.onBOL) {\n            this.onBOL.forEach(listener => listener())\n        }\n    }\n\n    public onBUO() {\n        if (this.onBUOL) {\n            this.onBUOL.forEach(listener => listener())\n        }\n    }\n\n    // to check for cycles\n    private get isComputing(): boolean {\n        return getFlag(this.flags_, ComputedValueFlags.isComputing)\n    }\n    private set isComputing(newValue: boolean) {\n        this.flags_ = setFlag(this.flags_, ComputedValueFlags.isComputing, newValue)\n    }\n\n    private get isRunningSetter(): boolean {\n        return getFlag(this.flags_, ComputedValueFlags.isRunningSetter)\n    }\n    private set isRunningSetter(newValue: boolean) {\n        this.flags_ = setFlag(this.flags_, ComputedValueFlags.isRunningSetter, newValue)\n    }\n\n    get isBeingObserved(): boolean {\n        return getFlag(this.flags_, ComputedValueFlags.isBeingObserved)\n    }\n    set isBeingObserved(newValue: boolean) {\n        this.flags_ = setFlag(this.flags_, ComputedValueFlags.isBeingObserved, newValue)\n    }\n\n    get isPendingUnobservation(): boolean {\n        return getFlag(this.flags_, ComputedValueFlags.isPendingUnobservation)\n    }\n    set isPendingUnobservation(newValue: boolean) {\n        this.flags_ = setFlag(this.flags_, ComputedValueFlags.isPendingUnobservation, newValue)\n    }\n\n    get diffValue(): 0 | 1 {\n        return getFlag(this.flags_, ComputedValueFlags.diffValue) ? 1 : 0\n    }\n    set diffValue(newValue: 0 | 1) {\n        this.flags_ = setFlag(\n            this.flags_,\n            ComputedValueFlags.diffValue,\n            newValue === 1 ? true : false\n        )\n    }\n\n    /**\n     * Returns the current value of this computed value.\n     * Will evaluate its computation first if needed.\n     */\n    public get(): T {\n        if (this.isComputing) {\n            die(32, this.name_, this.derivation)\n        }\n        if (\n            globalState.inBatch === 0 &&\n            // !globalState.trackingDerivatpion &&\n            (!this.observers_ || this.observers_.size === 0) &&\n            !this.keepAlive_\n        ) {\n            if (shouldCompute(this)) {\n                this.warnAboutUntrackedRead_()\n                startBatch() // See perf test 'computed memoization'\n                this.value_ = this.computeValue_(false)\n                endBatch()\n            }\n        } else {\n            const wasBeingObserved = this.isBeingObserved\n            reportObserved(this)\n            if (shouldCompute(this)) {\n                let prevTrackingContext = globalState.trackingContext\n                if (this.keepAlive_ && !prevTrackingContext) {\n                    globalState.trackingContext = this\n                }\n                if (this.trackAndCompute()) {\n                    propagateChangeConfirmed(this)\n                }\n                globalState.trackingContext = prevTrackingContext\n            } else if (!wasBeingObserved && this.isBeingObserved) {\n                // We just became observed while serving a cached value, so the getter\n                // won't run and won't re-report our dependencies. Cascade to them. #4547\n                this.observing_.forEach(markObserved)\n            }\n        }\n        const result = this.value_!\n\n        if (isCaughtException(result)) {\n            throw result.cause\n        }\n        return result\n    }\n\n    public set(value: T) {\n        if (this.setter_) {\n            if (this.isRunningSetter) {\n                die(33, this.name_)\n            }\n            this.isRunningSetter = true\n            try {\n                this.setter_.call(this.scope_, value)\n            } finally {\n                this.isRunningSetter = false\n            }\n        } else {\n            die(34, this.name_)\n        }\n    }\n\n    trackAndCompute(): boolean {\n        // N.B: unminified as it is used by MST\n        const oldValue = this.value_\n        const wasSuspended =\n            /* see #1208 */ this.dependenciesState_ === IDerivationState_.NOT_TRACKING_\n        const newValue = this.computeValue_(true)\n\n        const changed =\n            wasSuspended ||\n            isCaughtException(oldValue) ||\n            isCaughtException(newValue) ||\n            !this.equals_(oldValue, newValue)\n\n        if (changed) {\n            this.value_ = newValue\n\n            if (__DEV__ && isSpyEnabled()) {\n                spyReport({\n                    observableKind: \"computed\",\n                    debugObjectName: this.name_,\n                    object: this.scope_,\n                    type: \"update\",\n                    oldValue,\n                    newValue\n                } as IComputedDidChange)\n            }\n        }\n\n        return changed\n    }\n\n    computeValue_(track: boolean) {\n        this.isComputing = true\n        // don't allow state changes during computation\n        const prev = __DEV__ ? allowStateChangesStart(false) : false\n        let res: T | CaughtException\n        if (track) {\n            res = trackDerivedFunction(this, this.derivation, this.scope_)\n        } else {\n            if (globalState.disableErrorBoundaries === true) {\n                res = this.derivation.call(this.scope_)\n            } else {\n                try {\n                    res = this.derivation.call(this.scope_)\n                } catch (e) {\n                    res = new CaughtException(e)\n                }\n            }\n        }\n        if (__DEV__) {\n            allowStateChangesEnd(prev)\n        }\n        this.isComputing = false\n        return res\n    }\n\n    suspend_() {\n        if (!this.keepAlive_) {\n            clearObserving(this)\n            this.value_ = undefined // don't hold on to computed value!\n        }\n    }\n\n    warnAboutUntrackedRead_() {\n        if (!__DEV__) {\n            return\n        }\n        if (\n            typeof this.requiresReaction_ === \"boolean\"\n                ? this.requiresReaction_\n                : globalState.computedRequiresReaction\n        ) {\n            console.warn(\n                `[mobx] Computed value '${this.name_}' is being read outside a reactive context. Doing a full recompute.`\n            )\n        }\n    }\n\n    toString() {\n        return `${this.name_}[${this.derivation.toString()}]`\n    }\n\n    valueOf(): T {\n        return toPrimitive(this.get())\n    }\n\n    [Symbol.toPrimitive]() {\n        return this.valueOf()\n    }\n}\n\nexport const isComputedValue = createInstanceofPredicate(\"ComputedValue\", ComputedValue)\n", "import {\n    IAtom,\n    IDepTreeNode,\n    IObservable,\n    addObserver,\n    globalState,\n    isComputedValue,\n    removeObserver\n} from \"../internal\"\n\nexport const enum IDerivationState_ {\n    // before being run or (outside batch and not being observed)\n    // at this point derivation is not holding any data about dependency tree\n    NOT_TRACKING_ = -1,\n    // no shallow dependency changed since last computation\n    // won't recalculate derivation\n    // this is what makes mobx fast\n    UP_TO_DATE_ = 0,\n    // some deep dependency changed, but don't know if shallow dependency changed\n    // will require to check first if UP_TO_DATE or POSSIBLY_STALE\n    // currently only ComputedValue will propagate POSSIBLY_STALE\n    //\n    // having this state is second big optimization:\n    // don't have to recompute on every dependency change, but only when it's needed\n    POSSIBLY_STALE_ = 1,\n    // A shallow dependency has changed since last computation and the derivation\n    // will need to recompute when it's needed next.\n    STALE_ = 2\n}\n\n/**\n * A derivation is everything that can be derived from the state (all the atoms) in a pure manner.\n * See https://medium.com/@mweststrate/becoming-fully-reactive-an-in-depth-explanation-of-mobservable-55995262a254#.xvbh6qd74\n */\nexport interface IDerivation extends IDepTreeNode {\n    observing_: IObservable[]\n    newObserving_: null | IObservable[]\n    dependenciesState_: IDerivationState_\n    /**\n     * Id of the current run of a derivation. Each time the derivation is tracked\n     * this number is increased by one. This number is globally unique\n     */\n    runId_: number\n    /**\n     * amount of dependencies used by the derivation in this run, which has not been bound yet.\n     */\n    unboundDepsCount_: number\n    onBecomeStale_(): void\n\n    /**\n     *  warn if the derivation has no dependencies after creation/update\n     */\n    requiresObservable_?: boolean\n}\n\nexport class CaughtException {\n    constructor(public cause: any) {\n        // Empty\n    }\n}\n\nexport function isCaughtException(e: any): e is CaughtException {\n    return e instanceof CaughtException\n}\n\n/**\n * Finds out whether any dependency of the derivation has actually changed.\n * If dependenciesState is 1 then it will recalculate dependencies,\n * if any dependency changed it will propagate it by changing dependenciesState to 2.\n *\n * By iterating over the dependencies in the same order that they were reported and\n * stopping on the first change, all the recalculations are only called for ComputedValues\n * that will be tracked by derivation. That is because we assume that if the first x\n * dependencies of the derivation doesn't change then the derivation should run the same way\n * up until accessing x-th dependency.\n */\nexport function shouldCompute(derivation: IDerivation): boolean {\n    switch (derivation.dependenciesState_) {\n        case IDerivationState_.UP_TO_DATE_:\n            return false\n        case IDerivationState_.NOT_TRACKING_:\n        case IDerivationState_.STALE_:\n            return true\n        case IDerivationState_.POSSIBLY_STALE_: {\n            // state propagation can occur outside of action/reactive context #2195\n            const prevAllowStateReads = __DEV__ ? allowStateReadsStart(true) : true\n            const prevUntracked = untrackedStart() // no need for those computeds to be reported, they will be picked up in trackDerivedFunction.\n            const obs = derivation.observing_,\n                l = obs.length\n            for (let i = 0; i < l; i++) {\n                const obj = obs[i]\n                if (isComputedValue(obj)) {\n                    if (globalState.disableErrorBoundaries) {\n                        obj.get()\n                    } else {\n                        try {\n                            obj.get()\n                        } catch (e) {\n                            // we are not interested in the value *or* exception at this moment, but if there is one, notify all\n                            untrackedEnd(prevUntracked)\n                            if (__DEV__) {\n                                allowStateReadsEnd(prevAllowStateReads)\n                            }\n                            return true\n                        }\n                    }\n                    // if ComputedValue `obj` actually changed it will be computed and propagated to its observers.\n                    // and `derivation` is an observer of `obj`\n                    // invariantShouldCompute(derivation)\n                    if ((derivation.dependenciesState_ as any) === IDerivationState_.STALE_) {\n                        untrackedEnd(prevUntracked)\n                        if (__DEV__) {\n                            allowStateReadsEnd(prevAllowStateReads)\n                        }\n                        return true\n                    }\n                }\n            }\n            changeDependenciesStateTo0(derivation)\n            untrackedEnd(prevUntracked)\n            if (__DEV__) {\n                allowStateReadsEnd(prevAllowStateReads)\n            }\n            return false\n        }\n    }\n}\n\nexport function isComputingDerivation() {\n    return globalState.trackingDerivation !== null // filter out actions inside computations\n}\n\nexport function checkIfStateModificationsAreAllowed(atom: IAtom) {\n    if (!__DEV__) {\n        return\n    }\n    const hasObservers = !!atom.observers_ && atom.observers_.size > 0\n    // Should not be possible to change observed state outside strict mode, except during initialization, see #563\n    if (\n        !globalState.allowStateChanges &&\n        (hasObservers || globalState.enforceActions === \"always\")\n    ) {\n        console.warn(\n            \"[MobX] \" +\n                (globalState.enforceActions\n                    ? \"Since strict-mode is enabled, changing (observed) observable values without using an action is not allowed. Tried to modify: \"\n                    : \"Side effects like changing state are not allowed at this point. Are you trying to modify state from, for example, a computed value or the render function of a React component? You can wrap side effects in 'runInAction' (or decorate functions with 'action') if needed. Tried to modify: \") +\n                atom.name_\n        )\n    }\n}\n\nexport function checkIfStateReadsAreAllowed(observable: IObservable) {\n    if (__DEV__ && !globalState.allowStateReads && globalState.observableRequiresReaction) {\n        console.warn(\n            `[mobx] Observable '${observable.name_}' being read outside a reactive context.`\n        )\n    }\n}\n\n/**\n * Executes the provided function `f` and tracks which observables are being accessed.\n * The tracking information is stored on the `derivation` object and the derivation is registered\n * as observer of any of the accessed observables.\n */\nexport function trackDerivedFunction<T>(derivation: IDerivation, f: () => T, context: any) {\n    const prevAllowStateReads = __DEV__ ? allowStateReadsStart(true) : true\n    changeDependenciesStateTo0(derivation)\n    // Preallocate array; will be trimmed by bindDependencies.\n    derivation.newObserving_ = new Array(\n        // Reserve constant space for initial dependencies, dynamic space otherwise.\n        // See https://github.com/mobxjs/mobx/pull/3833\n        derivation.runId_ === 0 ? 100 : derivation.observing_.length\n    )\n    derivation.unboundDepsCount_ = 0\n    derivation.runId_ = ++globalState.runId\n    const prevTracking = globalState.trackingDerivation\n    globalState.trackingDerivation = derivation\n    globalState.inBatch++\n    let result\n    if (globalState.disableErrorBoundaries === true) {\n        result = f.call(context)\n    } else {\n        try {\n            result = f.call(context)\n        } catch (e) {\n            result = new CaughtException(e)\n        }\n    }\n    globalState.inBatch--\n    globalState.trackingDerivation = prevTracking\n    bindDependencies(derivation)\n\n    warnAboutDerivationWithoutDependencies(derivation)\n    if (__DEV__) {\n        allowStateReadsEnd(prevAllowStateReads)\n    }\n    return result\n}\n\nfunction warnAboutDerivationWithoutDependencies(derivation: IDerivation) {\n    if (!__DEV__) {\n        return\n    }\n\n    if (derivation.observing_.length !== 0) {\n        return\n    }\n\n    if (\n        typeof derivation.requiresObservable_ === \"boolean\"\n            ? derivation.requiresObservable_\n            : globalState.reactionRequiresObservable\n    ) {\n        console.warn(\n            `[mobx] Derivation '${derivation.name_}' is created/updated without reading any observable value.`\n        )\n    }\n}\n\n/**\n * diffs newObserving with observing.\n * update observing to be newObserving with unique observables\n * notify observers that become observed/unobserved\n */\nfunction bindDependencies(derivation: IDerivation) {\n    // invariant(derivation.dependenciesState !== IDerivationState.NOT_TRACKING, \"INTERNAL ERROR bindDependencies expects derivation.dependenciesState !== -1\");\n    const prevObserving = derivation.observing_\n    const observing = (derivation.observing_ = derivation.newObserving_!)\n    let lowestNewObservingDerivationState = IDerivationState_.UP_TO_DATE_\n\n    // Go through all new observables and check diffValue: (this list can contain duplicates):\n    //   0: first occurrence, change to 1 and keep it\n    //   1: extra occurrence, drop it\n    let i0 = 0,\n        l = derivation.unboundDepsCount_\n    for (let i = 0; i < l; i++) {\n        const dep = observing[i]\n        if (dep.diffValue === 0) {\n            dep.diffValue = 1\n            if (i0 !== i) {\n                observing[i0] = dep\n            }\n            i0++\n        }\n\n        // Upcast is 'safe' here, because if dep is IObservable, `dependenciesState` will be undefined,\n        // not hitting the condition\n        if ((dep as any as IDerivation).dependenciesState_ > lowestNewObservingDerivationState) {\n            lowestNewObservingDerivationState = (dep as any as IDerivation).dependenciesState_\n        }\n    }\n    observing.length = i0\n\n    derivation.newObserving_ = null // newObserving shouldn't be needed outside tracking (statement moved down to work around FF bug, see #614)\n\n    // Go through all old observables and check diffValue: (it is unique after last bindDependencies)\n    //   0: it's not in new observables, unobserve it\n    //   1: it keeps being observed, don't want to notify it. change to 0\n    l = prevObserving.length\n    while (l--) {\n        const dep = prevObserving[l]\n        if (dep.diffValue === 0) {\n            removeObserver(dep, derivation)\n        }\n        dep.diffValue = 0\n    }\n\n    // Go through all new observables and check diffValue: (now it should be unique)\n    //   0: it was set to 0 in last loop. don't need to do anything.\n    //   1: it wasn't observed, let's observe it. set back to 0\n    while (i0--) {\n        const dep = observing[i0]\n        if (dep.diffValue === 1) {\n            dep.diffValue = 0\n            addObserver(dep, derivation)\n        }\n    }\n\n    // Some new observed derivations may become stale during this derivation computation\n    // so they have had no chance to propagate staleness (#916)\n    if (lowestNewObservingDerivationState !== IDerivationState_.UP_TO_DATE_) {\n        derivation.dependenciesState_ = lowestNewObservingDerivationState\n        derivation.onBecomeStale_()\n    }\n}\n\nexport function clearObserving(derivation: IDerivation) {\n    // invariant(globalState.inBatch > 0, \"INTERNAL ERROR clearObserving should be called only inside batch\");\n    const obs = derivation.observing_\n    derivation.observing_ = []\n    let i = obs.length\n    while (i--) {\n        removeObserver(obs[i], derivation)\n    }\n\n    derivation.dependenciesState_ = IDerivationState_.NOT_TRACKING_\n}\n\nexport function untracked<T>(action: () => T): T {\n    const prev = untrackedStart()\n    try {\n        return action()\n    } finally {\n        untrackedEnd(prev)\n    }\n}\n\nexport function untrackedStart(): IDerivation | null {\n    const prev = globalState.trackingDerivation\n    globalState.trackingDerivation = null\n    return prev\n}\n\nexport function untrackedEnd(prev: IDerivation | null) {\n    globalState.trackingDerivation = prev\n}\n\nexport function allowStateReadsStart(allowStateReads: boolean) {\n    const prev = globalState.allowStateReads\n    globalState.allowStateReads = allowStateReads\n    return prev\n}\n\nexport function allowStateReadsEnd(prev: boolean) {\n    globalState.allowStateReads = prev\n}\n\n/**\n * needed to keep `lowestObserverState` correct. when changing from (2 or 1) to 0\n *\n */\nexport function changeDependenciesStateTo0(derivation: IDerivation) {\n    if (derivation.dependenciesState_ === IDerivationState_.UP_TO_DATE_) {\n        return\n    }\n    derivation.dependenciesState_ = IDerivationState_.UP_TO_DATE_\n\n    const obs = derivation.observing_\n    let i = obs.length\n    while (i--) {\n        obs[i].lowestObserverState_ = IDerivationState_.UP_TO_DATE_\n    }\n}\n", "import { IDerivation, IObservable, Reaction, die } from \"../internal\"\nimport { ComputedValue } from \"./computedvalue\"\n\nconst MOBX_GLOBALS_VERSION = 7\n\n/**\n * These values will persist if global state is reset\n */\nconst persistentKeys: (keyof MobXGlobals)[] = [\n    \"mobxGuid\",\n    \"spyListeners\",\n    \"enforceActions\",\n    \"computedRequiresReaction\",\n    \"reactionRequiresObservable\",\n    \"observableRequiresReaction\",\n    \"allowStateReads\",\n    \"disableErrorBoundaries\",\n    \"runId\",\n    \"UNCHANGED\"\n]\n\nexport type IUNCHANGED = {}\n\nexport class MobXGlobals {\n    /**\n     * MobXGlobals version.\n     * MobX compatiblity with other versions loaded in memory as long as this version matches.\n     * It indicates that the global state still stores similar information\n     *\n     * N.B: this version is unrelated to the package version of MobX, and is only the version of the\n     * internal state storage of MobX, and can be the same across many different package versions\n     */\n    version = MOBX_GLOBALS_VERSION\n\n    /**\n     * globally unique token to signal unchanged\n     */\n    UNCHANGED: IUNCHANGED = {}\n\n    /**\n     * Currently running derivation\n     */\n    trackingDerivation: IDerivation | null = null\n\n    /**\n     * Currently running reaction. This determines if we currently have a reactive context.\n     * (Tracking derivation is also set for temporal tracking of computed values inside actions,\n     * but trackingReaction can only be set by a form of Reaction)\n     */\n    trackingContext: Reaction | ComputedValue<any> | null = null\n\n    /**\n     * Each time a derivation is tracked, it is assigned a unique run-id\n     */\n    runId = 0\n\n    /**\n     * 'guid' for general purpose. Will be persisted amongst resets.\n     */\n    mobxGuid = 0\n\n    /**\n     * Are we in a batch block? (and how many of them)\n     */\n    inBatch: number = 0\n\n    /**\n     * Observables that don't have observers anymore, and are about to be\n     * suspended, unless somebody else accesses it in the same batch\n     *\n     * @type {IObservable[]}\n     */\n    pendingUnobservations: IObservable[] = []\n\n    /**\n     * List of scheduled, not yet executed, reactions.\n     */\n    pendingReactions: Reaction[] = []\n\n    /**\n     * Are we currently processing reactions?\n     */\n    isRunningReactions = false\n\n    /**\n     * Are we currently draining pendingUnobservations in endBatch?\n     * An onBecomeUnobserved handler can dispose a Reaction, which calls\n     * startBatch/endBatch again; this guards against re-entering the same\n     * drain loop recursively (see endBatch in observable.ts).\n     */\n    isRunningUnobservations = false\n\n    /**\n     * Is it allowed to change observables at this point?\n     * In general, MobX doesn't allow that when running computations and React.render.\n     * To ensure that those functions stay pure.\n     */\n    allowStateChanges = false\n\n    /**\n     * Is it allowed to read observables at this point?\n     * Used to hold the state needed for `observableRequiresReaction`\n     */\n    allowStateReads = true\n\n    /**\n     * If strict mode is enabled, state changes are by default not allowed\n     */\n    enforceActions: boolean | \"always\" = true\n\n    /**\n     * Spy callbacks\n     */\n    spyListeners: { (change: any): void }[] = []\n\n    /**\n     * Globally attached error handlers that react specifically to errors in reactions\n     */\n    globalReactionErrorHandlers: ((error: any, derivation: IDerivation) => void)[] = []\n\n    /**\n     * Warn if computed values are accessed outside a reactive context\n     */\n    computedRequiresReaction = false\n\n    /**\n     * (Experimental)\n     * Warn if you try to create to derivation / reactive context without accessing any observable.\n     */\n    reactionRequiresObservable = false\n\n    /**\n     * (Experimental)\n     * Warn if observables are accessed outside a reactive context\n     */\n    observableRequiresReaction = false\n\n    /*\n     * Don't catch and rethrow exceptions. This is useful for inspecting the state of\n     * the stack when an exception occurs while debugging.\n     */\n    disableErrorBoundaries = false\n\n    /*\n     * If true, we are already handling an exception in an action. Any errors in reactions should be suppressed, as\n     * they are not the cause, see: https://github.com/mobxjs/mobx/issues/1836\n     */\n    suppressReactionErrors = false\n\n    /**\n     * False forces all object's descriptors to\n     * writable: true\n     * configurable: true\n     */\n    safeDescriptors = true\n}\n\nlet canMergeGlobalState = true\nlet isolateCalled = false\n\nexport let globalState: MobXGlobals = (function () {\n    let global = globalThis as any\n    if (global.__mobxInstanceCount > 0 && !global.__mobxGlobals) {\n        canMergeGlobalState = false\n    }\n    if (global.__mobxGlobals && global.__mobxGlobals.version !== MOBX_GLOBALS_VERSION) {\n        canMergeGlobalState = false\n    }\n\n    if (!canMergeGlobalState) {\n        // Because this is a IIFE we need to let isolateCalled a chance to change\n        // so we run it after the event loop completed at least 1 iteration\n        setTimeout(() => {\n            if (!isolateCalled) {\n                die(35)\n            }\n        }, 1)\n        return new MobXGlobals()\n    } else if (global.__mobxGlobals) {\n        global.__mobxInstanceCount += 1\n        if (!global.__mobxGlobals.UNCHANGED) {\n            global.__mobxGlobals.UNCHANGED = {}\n        } // make merge backward compatible\n        return global.__mobxGlobals\n    } else {\n        global.__mobxInstanceCount = 1\n        return (global.__mobxGlobals = new MobXGlobals())\n    }\n})()\n\nexport function isolateGlobalState() {\n    if (\n        globalState.pendingReactions.length ||\n        globalState.inBatch ||\n        globalState.isRunningReactions\n    ) {\n        die(36)\n    }\n    isolateCalled = true\n    if (canMergeGlobalState) {\n        let global = globalThis as any\n        if (--global.__mobxInstanceCount === 0) {\n            global.__mobxGlobals = undefined\n        }\n        globalState = new MobXGlobals()\n    }\n}\n\nexport function getGlobalState(): any {\n    return globalState\n}\n\n/**\n * For testing purposes only; this will break the internal state of existing observables,\n * but can be used to get back at a stable state after throwing errors\n */\nexport function resetGlobalState() {\n    const defaultGlobals = new MobXGlobals()\n    for (let key in defaultGlobals) {\n        if (persistentKeys.indexOf(key as any) === -1) {\n            globalState[key] = defaultGlobals[key]\n        }\n    }\n    globalState.allowStateChanges = !globalState.enforceActions\n}\n", "import {\n    Lambda,\n    ComputedValue,\n    IDerivation,\n    IDerivationState_,\n    globalState,\n    runReactions,\n    checkIfStateReadsAreAllowed\n} from \"../internal\"\n\nexport interface IDepTreeNode {\n    name_: string\n    observing_?: IObservable[]\n}\n\nexport interface IObservable extends IDepTreeNode {\n    diffValue: number\n    /**\n     * Id of the derivation *run* that last accessed this observable.\n     * If this id equals the *run* id of the current derivation,\n     * the dependency is already established\n     */\n    lastAccessedBy_: number\n    isBeingObserved: boolean\n\n    lowestObserverState_: IDerivationState_ // Used to avoid redundant propagations\n    isPendingUnobservation: boolean // Used to push itself to global.pendingUnobservations at most once per batch.\n\n    observers_: Set<IDerivation> | null\n\n    onBUO(): void\n    onBO(): void\n\n    onBUOL: Set<Lambda> | undefined\n    onBOL: Set<Lambda> | undefined\n}\n\nexport function hasObservers(observable: IObservable): boolean {\n    return !!observable.observers_ && observable.observers_.size > 0\n}\n\nexport function getObservers(observable: IObservable): Set<IDerivation> {\n    return observable.observers_ ?? new Set()\n}\n\n// function invariantObservers(observable: IObservable) {\n//     const list = observable.observers\n//     const map = observable.observersIndexes\n//     const l = list.length\n//     for (let i = 0; i < l; i++) {\n//         const id = list[i].__mapid\n//         if (i) {\n//             invariant(map[id] === i, \"INTERNAL ERROR maps derivation.__mapid to index in list\") // for performance\n//         } else {\n//             invariant(!(id in map), \"INTERNAL ERROR observer on index 0 shouldn't be held in map.\") // for performance\n//         }\n//     }\n//     invariant(\n//         list.length === 0 || Object.keys(map).length === list.length - 1,\n//         \"INTERNAL ERROR there is no junk in map\"\n//     )\n// }\nexport function addObserver(observable: IObservable, node: IDerivation) {\n    // invariant(node.dependenciesState !== -1, \"INTERNAL ERROR, can add only dependenciesState !== -1\");\n    // invariant(observable._observers.indexOf(node) === -1, \"INTERNAL ERROR add already added node\");\n    // invariantObservers(observable);\n\n    ;(observable.observers_ ??= new Set()).add(node)\n    if (observable.lowestObserverState_ > node.dependenciesState_) {\n        observable.lowestObserverState_ = node.dependenciesState_\n    }\n\n    // invariantObservers(observable);\n    // invariant(observable._observers.indexOf(node) !== -1, \"INTERNAL ERROR didn't add node\");\n}\n\nexport function removeObserver(observable: IObservable, node: IDerivation) {\n    // invariant(globalState.inBatch > 0, \"INTERNAL ERROR, remove should be called only inside batch\");\n    // invariant(observable._observers.indexOf(node) !== -1, \"INTERNAL ERROR remove already removed node\");\n    // invariantObservers(observable);\n    const observers = observable.observers_\n    if (!observers) {\n        return\n    }\n    observers.delete(node)\n    if (observers.size === 0) {\n        // deleting last observer\n        queueForUnobservation(observable)\n    }\n    // invariantObservers(observable);\n    // invariant(observable._observers.indexOf(node) === -1, \"INTERNAL ERROR remove already removed node2\");\n}\n\nexport function queueForUnobservation(observable: IObservable) {\n    if (observable.isPendingUnobservation === false) {\n        // invariant(observable._observers.length === 0, \"INTERNAL ERROR, should only queue for unobservation unobserved observables\");\n        observable.isPendingUnobservation = true\n        globalState.pendingUnobservations.push(observable)\n    }\n}\n\n/**\n * Batch starts a transaction, at least for purposes of memoizing ComputedValues when nothing else does.\n * During a batch `onBecomeUnobserved` will be called at most once per observable.\n * Avoids unnecessary recalculations.\n */\nexport function startBatch() {\n    globalState.inBatch++\n}\n\nexport function endBatch() {\n    if (--globalState.inBatch === 0) {\n        runReactions()\n        // the batch is actually about to finish, all unobserving should happen here.\n        // Guard against re-entering this loop: an onBUO handler can dispose a Reaction,\n        // which calls startBatch/endBatch again while we're still iterating. Bail out of\n        // the nested call instead of recursing; the outer loop re-reads list.length on\n        // every iteration, so it picks up anything the nested dispose() pushes onto the\n        // same pendingUnobservations array.\n        if (!globalState.isRunningUnobservations) {\n            globalState.isRunningUnobservations = true\n            try {\n                const list = globalState.pendingUnobservations\n                for (let i = 0; i < list.length; i++) {\n                    const observable = list[i]\n                    observable.isPendingUnobservation = false\n                    if (!observable.observers_ || observable.observers_.size === 0) {\n                        if (observable.isBeingObserved) {\n                            // if this observable had reactive observers, trigger the hooks\n                            observable.isBeingObserved = false\n                            observable.onBUO()\n                        }\n                        if (observable instanceof ComputedValue) {\n                            // computed values are automatically teared down when the last observer leaves\n                            // this process happens recursively, this computed might be the last observabe of another, etc..\n                            observable.suspend_()\n                        }\n                    }\n                }\n                globalState.pendingUnobservations = []\n            } finally {\n                // Always release the guard, even if an onBUO handler (user code) threw,\n                // otherwise every future endBatch() would see isRunningUnobservations\n                // stuck true and silently stop draining pendingUnobservations forever.\n                globalState.isRunningUnobservations = false\n            }\n        }\n    }\n}\n\n/**\n * Marks an observable as observed, cascading into the dependencies of a ComputedValue.\n * Unobservation already cascades (`suspend_` -> `clearObserving`), observation normally\n * only does so by accident: a newly observed computed usually recomputes and re-reports\n * its dependencies. When it serves a cached value instead nothing re-reports them, so the\n * transition has to be propagated by hand. See #4547.\n */\nexport function markObserved(observable: IObservable) {\n    if (observable.isBeingObserved) {\n        return\n    }\n    observable.isBeingObserved = true\n    observable.onBO()\n    // No queueForUnobservation here: the observer links already exist, so the regular\n    // suspend_ -> clearObserving -> removeObserver teardown still delivers the onBUO.\n    observable.observing_?.forEach(markObserved)\n}\n\nexport function reportObserved(observable: IObservable): boolean {\n    checkIfStateReadsAreAllowed(observable)\n\n    const derivation = globalState.trackingDerivation\n    if (derivation !== null) {\n        /**\n         * Simple optimization, give each derivation run an unique id (runId)\n         * Check if last time this observable was accessed the same runId is used\n         * if this is the case, the relation is already known\n         */\n        if (derivation.runId_ !== observable.lastAccessedBy_) {\n            observable.lastAccessedBy_ = derivation.runId_\n            // Tried storing newObserving, or observing, or both as Set, but performance didn't come close...\n            derivation.newObserving_![derivation.unboundDepsCount_++] = observable\n            if (!observable.isBeingObserved && globalState.trackingContext) {\n                observable.isBeingObserved = true\n                observable.onBO()\n            }\n        }\n        return observable.isBeingObserved\n    } else if (\n        (!observable.observers_ || observable.observers_.size === 0) &&\n        globalState.inBatch > 0\n    ) {\n        queueForUnobservation(observable)\n    }\n\n    return false\n}\n\n// function invariantLOS(observable: IObservable, msg: string) {\n//     // it's expensive so better not run it in produciton. but temporarily helpful for testing\n//     const min = getObservers(observable).reduce((a, b) => Math.min(a, b.dependenciesState), 2)\n//     if (min >= observable.lowestObserverState) return // <- the only assumption about `lowestObserverState`\n//     throw new Error(\n//         \"lowestObserverState is wrong for \" +\n//             msg +\n//             \" because \" +\n//             min +\n//             \" < \" +\n//             observable.lowestObserverState\n//     )\n// }\n\n/**\n * NOTE: current propagation mechanism will in case of self reruning autoruns behave unexpectedly\n * It will propagate changes to observers from previous run\n * It's hard or maybe impossible (with reasonable perf) to get it right with current approach\n * Hopefully self reruning autoruns aren't a feature people should depend on\n * Also most basic use cases should be ok\n */\n\n// Called by Atom when its value changes\nexport function propagateChanged(observable: IObservable) {\n    // invariantLOS(observable, \"changed start\");\n    if (observable.lowestObserverState_ === IDerivationState_.STALE_) {\n        return\n    }\n    observable.lowestObserverState_ = IDerivationState_.STALE_\n\n    // Ideally we use for..of here, but the downcompiled version is really slow...\n    observable.observers_?.forEach(d => {\n        if (d.dependenciesState_ === IDerivationState_.UP_TO_DATE_) {\n            d.onBecomeStale_()\n        }\n        d.dependenciesState_ = IDerivationState_.STALE_\n    })\n    // invariantLOS(observable, \"changed end\");\n}\n\n// Called by ComputedValue when it recalculate and its value changed\nexport function propagateChangeConfirmed(observable: IObservable) {\n    // invariantLOS(observable, \"confirmed start\");\n    if (observable.lowestObserverState_ === IDerivationState_.STALE_) {\n        return\n    }\n    observable.lowestObserverState_ = IDerivationState_.STALE_\n\n    observable.observers_?.forEach(d => {\n        if (d.dependenciesState_ === IDerivationState_.POSSIBLY_STALE_) {\n            d.dependenciesState_ = IDerivationState_.STALE_\n        } else if (\n            d.dependenciesState_ === IDerivationState_.UP_TO_DATE_ // this happens during computing of `d`, just keep lowestObserverState up to date.\n        ) {\n            observable.lowestObserverState_ = IDerivationState_.UP_TO_DATE_\n        }\n    })\n    // invariantLOS(observable, \"confirmed end\");\n}\n\n// Used by computed when its dependency changed, but we don't wan't to immediately recompute.\nexport function propagateMaybeChanged(observable: IObservable) {\n    // invariantLOS(observable, \"maybe start\");\n    if (observable.lowestObserverState_ !== IDerivationState_.UP_TO_DATE_) {\n        return\n    }\n    observable.lowestObserverState_ = IDerivationState_.POSSIBLY_STALE_\n\n    observable.observers_?.forEach(d => {\n        if (d.dependenciesState_ === IDerivationState_.UP_TO_DATE_) {\n            d.dependenciesState_ = IDerivationState_.POSSIBLY_STALE_\n            d.onBecomeStale_()\n        }\n    })\n    // invariantLOS(observable, \"maybe end\");\n}\n", "import {\n    $mobx,\n    IDerivation,\n    IDerivationState_,\n    IObservable,\n    Lambda,\n    clearObserving,\n    createInstanceofPredicate,\n    endBatch,\n    getNextId,\n    globalState,\n    isCaughtException,\n    isSpyEnabled,\n    shouldCompute,\n    spyReport,\n    spyReportEnd,\n    spyReportStart,\n    startBatch,\n    trackDerivedFunction,\n    GenericAbortSignal\n} from \"../internal\"\n\nimport { getFlag, setFlag } from \"../utils/utils\"\n\n/**\n * Reactions are a special kind of derivations. Several things distinguishes them from normal reactive computations\n *\n * 1) They will always run, whether they are used by other computations or not.\n * This means that they are very suitable for triggering side effects like logging, updating the DOM and making network requests.\n * 2) They are not observable themselves\n * 3) They will always run after any 'normal' derivations\n * 4) They are allowed to change the state and thereby triggering themselves again, as long as they make sure the state propagates to a stable state in a reasonable amount of iterations.\n *\n * The state machine of a Reaction is as follows:\n *\n * 1) after creating, the reaction should be started by calling `runReaction` or by scheduling it (see also `autorun`)\n * 2) the `onInvalidate` handler should somehow result in a call to `this.track(someFunction)`\n * 3) all observables accessed in `someFunction` will be observed by this reaction.\n * 4) as soon as some of the dependencies has changed the Reaction will be rescheduled for another run (after the current mutation or transaction). `isScheduled` will yield true once a dependency is stale and during this period\n * 5) `onInvalidate` will be called, and we are back at step 1.\n *\n */\n\nexport interface IReactionPublic {\n    dispose(): void\n}\n\nexport interface IReactionDisposer {\n    (): void\n    [$mobx]: Reaction\n}\n\nconst enum ReactionFlags {\n    isDisposed = 0b00001,\n    isScheduled = 0b00010,\n    isTrackPending = 0b00100,\n    isRunning = 0b01000,\n    diffValue = 0b10000\n}\n\nexport class Reaction implements IDerivation, IReactionPublic {\n    observing_: IObservable[] = [] // nodes we are looking at. Our value depends on these nodes\n    newObserving_: IObservable[] = []\n    dependenciesState_ = IDerivationState_.NOT_TRACKING_\n    runId_ = 0\n    unboundDepsCount_ = 0\n\n    private flags_ = 0b00000\n\n    constructor(\n        public name_: string = __DEV__ ? \"Reaction@\" + getNextId() : \"Reaction\",\n        private onInvalidate_: () => void,\n        private errorHandler_?: (error: any, derivation: IDerivation) => void,\n        public requiresObservable_?\n    ) {}\n\n    get isDisposed() {\n        return getFlag(this.flags_, ReactionFlags.isDisposed)\n    }\n    set isDisposed(newValue: boolean) {\n        this.flags_ = setFlag(this.flags_, ReactionFlags.isDisposed, newValue)\n    }\n\n    get isScheduled() {\n        return getFlag(this.flags_, ReactionFlags.isScheduled)\n    }\n    set isScheduled(newValue: boolean) {\n        this.flags_ = setFlag(this.flags_, ReactionFlags.isScheduled, newValue)\n    }\n\n    get isTrackPending() {\n        return getFlag(this.flags_, ReactionFlags.isTrackPending)\n    }\n    set isTrackPending(newValue: boolean) {\n        this.flags_ = setFlag(this.flags_, ReactionFlags.isTrackPending, newValue)\n    }\n\n    get isRunning() {\n        return getFlag(this.flags_, ReactionFlags.isRunning)\n    }\n    set isRunning(newValue: boolean) {\n        this.flags_ = setFlag(this.flags_, ReactionFlags.isRunning, newValue)\n    }\n\n    get diffValue(): 0 | 1 {\n        return getFlag(this.flags_, ReactionFlags.diffValue) ? 1 : 0\n    }\n    set diffValue(newValue: 0 | 1) {\n        this.flags_ = setFlag(this.flags_, ReactionFlags.diffValue, newValue === 1 ? true : false)\n    }\n\n    onBecomeStale_() {\n        this.schedule_()\n    }\n\n    schedule_() {\n        if (!this.isScheduled) {\n            this.isScheduled = true\n            globalState.pendingReactions.push(this)\n            runReactions()\n        }\n    }\n\n    /**\n     * internal, use schedule() if you intend to kick off a reaction\n     */\n    runReaction_() {\n        if (!this.isDisposed) {\n            startBatch()\n            this.isScheduled = false\n            const prev = globalState.trackingContext\n            globalState.trackingContext = this\n            if (shouldCompute(this)) {\n                this.isTrackPending = true\n\n                try {\n                    this.onInvalidate_()\n                    if (__DEV__ && this.isTrackPending && isSpyEnabled()) {\n                        // onInvalidate didn't trigger track right away..\n                        spyReport({\n                            name: this.name_,\n                            type: \"scheduled-reaction\"\n                        })\n                    }\n                } catch (e) {\n                    this.reportExceptionInDerivation_(e)\n                }\n            }\n            globalState.trackingContext = prev\n            endBatch()\n        }\n    }\n\n    track(fn: () => void) {\n        if (this.isDisposed) {\n            return\n            // console.warn(\"Reaction already disposed\") // Note: Not a warning / error in mobx 4 either\n        }\n        startBatch()\n        const notify = __DEV__ && isSpyEnabled()\n        let startTime\n        if (__DEV__ && notify) {\n            startTime = Date.now()\n            spyReportStart({\n                name: this.name_,\n                type: \"reaction\"\n            })\n        }\n        this.isRunning = true\n        const prevReaction = globalState.trackingContext // reactions could create reactions...\n        globalState.trackingContext = this\n        const result = trackDerivedFunction(this, fn, undefined)\n        globalState.trackingContext = prevReaction\n        this.isRunning = false\n        this.isTrackPending = false\n        if (this.isDisposed) {\n            // disposed during last run. Clean up everything that was bound after the dispose call.\n            clearObserving(this)\n        }\n        if (isCaughtException(result)) {\n            this.reportExceptionInDerivation_(result.cause)\n        }\n        if (__DEV__ && notify) {\n            spyReportEnd({\n                time: Date.now() - startTime\n            })\n        }\n        endBatch()\n    }\n\n    reportExceptionInDerivation_(error: any) {\n        if (this.errorHandler_) {\n            this.errorHandler_(error, this)\n            return\n        }\n\n        if (globalState.disableErrorBoundaries) {\n            throw error\n        }\n\n        const message = __DEV__\n            ? `[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '${this}'`\n            : `[mobx] uncaught error in '${this}'`\n        if (!globalState.suppressReactionErrors) {\n            console.error(message, error)\n            /** If debugging brought you here, please, read the above message :-). Tnx! */\n        } else if (__DEV__) { console.warn(`[mobx] (error in reaction '${this.name_}' suppressed, fix error of causing action below)`) } // prettier-ignore\n\n        if (__DEV__ && isSpyEnabled()) {\n            spyReport({\n                type: \"error\",\n                name: this.name_,\n                message,\n                error: \"\" + error\n            })\n        }\n\n        globalState.globalReactionErrorHandlers.forEach(f => f(error, this))\n    }\n\n    dispose() {\n        if (!this.isDisposed) {\n            this.isDisposed = true\n            if (!this.isRunning) {\n                // if disposed while running, clean up later. Maybe not optimal, but rare case\n                startBatch()\n                clearObserving(this)\n                endBatch()\n            }\n        }\n    }\n\n    getDisposer_(abortSignal?: GenericAbortSignal): IReactionDisposer {\n        const dispose = (() => {\n            this.dispose()\n            abortSignal?.removeEventListener?.(\"abort\", dispose)\n        }) as IReactionDisposer\n        abortSignal?.addEventListener?.(\"abort\", dispose)\n        dispose[$mobx] = this\n\n        if (\"dispose\" in Symbol && typeof Symbol.dispose === \"symbol\") {\n            dispose[Symbol.dispose] = dispose\n        }\n\n        return dispose\n    }\n\n    toString() {\n        return `Reaction[${this.name_}]`\n    }\n}\n\nexport function onReactionError(handler: (error: any, derivation: IDerivation) => void): Lambda {\n    globalState.globalReactionErrorHandlers.push(handler)\n    return () => {\n        const idx = globalState.globalReactionErrorHandlers.indexOf(handler)\n        if (idx >= 0) {\n            globalState.globalReactionErrorHandlers.splice(idx, 1)\n        }\n    }\n}\n\n/**\n * Magic number alert!\n * Defines within how many times a reaction is allowed to re-trigger itself\n * until it is assumed that this is gonna be a never ending loop...\n */\nconst MAX_REACTION_ITERATIONS = 100\n\nlet reactionScheduler: (fn: () => void) => void = f => f()\n\nexport function runReactions() {\n    // Trampolining, if runReactions are already running, new reactions will be picked up\n    if (globalState.inBatch > 0 || globalState.isRunningReactions) {\n        return\n    }\n    reactionScheduler(runReactionsHelper)\n}\n\nfunction runReactionsHelper() {\n    globalState.isRunningReactions = true\n    const allReactions = globalState.pendingReactions\n    let iterations = 0\n\n    // While running reactions, new reactions might be triggered.\n    // Hence we work with two variables and check whether\n    // we converge to no remaining reactions after a while.\n    while (allReactions.length > 0) {\n        if (++iterations === MAX_REACTION_ITERATIONS) {\n            console.error(\n                __DEV__\n                    ? `Reaction doesn't converge to a stable state after ${MAX_REACTION_ITERATIONS} iterations.` +\n                          ` Probably there is a cycle in the reactive function: ${allReactions[0]}`\n                    : `[mobx] cycle in reaction: ${allReactions[0]}`\n            )\n            allReactions.splice(0) // clear reactions\n        }\n        let remainingReactions = allReactions.splice(0)\n        for (let i = 0, l = remainingReactions.length; i < l; i++) {\n            remainingReactions[i].runReaction_()\n        }\n    }\n    globalState.isRunningReactions = false\n}\n\nexport const isReaction = createInstanceofPredicate(\"Reaction\", Reaction)\n\nexport function setReactionScheduler(fn: (f: () => void) => void) {\n    const baseScheduler = reactionScheduler\n    reactionScheduler = f => fn(() => baseScheduler(f))\n}\n", "import { IComputedDidChange } from \"./computedvalue\"\nimport { IValueDidChange, IBoxDidChange } from \"./../types/observablevalue\"\nimport { IObjectDidChange } from \"./../types/observableobject\"\nimport { IArrayDidChange } from \"./../types/observablearray\"\nimport { Lambda, globalState, once, ISetDidChange, IMapDidChange, assign } from \"../internal\"\n\nexport function isSpyEnabled() {\n    return __DEV__ && !!globalState.spyListeners.length\n}\n\nexport type PureSpyEvent =\n    | { type: \"action\"; name: string; object: unknown; arguments: unknown[] }\n    | { type: \"scheduled-reaction\"; name: string }\n    | { type: \"reaction\"; name: string }\n    | { type: \"error\"; name: string; message: string; error: string }\n    | IComputedDidChange<unknown>\n    | IObjectDidChange<unknown>\n    | IArrayDidChange<unknown>\n    | IMapDidChange<unknown, unknown>\n    | ISetDidChange<unknown>\n    | IValueDidChange<unknown>\n    | IBoxDidChange<unknown>\n    | { type: \"report-end\"; spyReportEnd: true; time?: number }\n\ntype SpyEvent = PureSpyEvent & { spyReportStart?: true }\n\nexport function spyReport(event: SpyEvent) {\n    if (!__DEV__) {\n        return\n    } // dead code elimination can do the rest\n    if (!globalState.spyListeners.length) {\n        return\n    }\n    const listeners = globalState.spyListeners\n    for (let i = 0, l = listeners.length; i < l; i++) {\n        listeners[i](event)\n    }\n}\n\nexport function spyReportStart(event: PureSpyEvent) {\n    if (!__DEV__) {\n        return\n    }\n    const change = assign({}, event, { spyReportStart: true as const })\n    spyReport(change)\n}\n\nconst END_EVENT: SpyEvent = { type: \"report-end\", spyReportEnd: true }\n\nexport function spyReportEnd(change?: { time?: number }) {\n    if (!__DEV__) {\n        return\n    }\n    if (change) {\n        spyReport(assign({}, change, { type: \"report-end\" as const, spyReportEnd: true as const }))\n    } else {\n        spyReport(END_EVENT)\n    }\n}\n\nexport function spy(listener: (change: SpyEvent) => void): Lambda {\n    if (!__DEV__) {\n        console.warn(`[mobx.spy] Is a no-op in production builds`)\n        return function () {}\n    } else {\n        globalState.spyListeners.push(listener)\n        return once(() => {\n            globalState.spyListeners = globalState.spyListeners.filter(l => l !== listener)\n        })\n    }\n}\n", "import {\n    createAction,\n    executeAction,\n    Annotation,\n    die,\n    isFunction,\n    isStringish,\n    createActionAnnotation,\n    decorateAction20223_,\n    assign\n} from \"../internal\"\nimport { createDecoratorAnnotation, type DecoratorAnnotation } from \"./decoratorannotation\"\nimport type { ClassMethodAndFieldDecorator } from \"../types/decorator_fills\"\n\nexport const ACTION = \"action\"\nexport const ACTION_BOUND = \"action.bound\"\nexport const AUTOACTION = \"autoAction\"\nexport const AUTOACTION_BOUND = \"autoAction.bound\"\n\nconst DEFAULT_ACTION_NAME = \"<unnamed action>\"\n\nconst actionAnnotation = createActionAnnotation(ACTION)\nconst actionBoundAnnotation = createActionAnnotation(ACTION_BOUND, {\n    bound: true\n})\nconst autoActionAnnotation = createActionAnnotation(AUTOACTION, {\n    autoAction: true\n})\nconst autoActionBoundAnnotation = createActionAnnotation(AUTOACTION_BOUND, {\n    autoAction: true,\n    bound: true\n})\n\nfunction createActionDecoratorAnnotation(\n    annotation: Annotation\n): DecoratorAnnotation<ClassMethodAndFieldDecorator> {\n    return createDecoratorAnnotation(annotation, decorateAction20223_)\n}\n\nexport interface IActionFactory extends Annotation, ClassMethodAndFieldDecorator {\n    // nameless actions\n    <T extends Function | undefined | null>(fn: T): T\n    // named actions\n    <T extends Function | undefined | null>(name: string, fn: T): T\n\n    // named annotation\n    (customName: string): DecoratorAnnotation<ClassMethodAndFieldDecorator>\n}\n\nfunction createActionFactory(autoAction: boolean): IActionFactory {\n    const res: IActionFactory = function action(arg1, arg2?): any {\n        if (arg2 && typeof arg2.kind === \"string\") {\n            return decorateAction20223_(\n                autoAction ? autoActionAnnotation : actionAnnotation,\n                arg1,\n                arg2\n            )\n        }\n\n        // action(fn() {})\n        if (isFunction(arg1)) {\n            return createAction(arg1.name || DEFAULT_ACTION_NAME, arg1, autoAction)\n        }\n        // action(\"name\", fn() {})\n        if (isFunction(arg2)) {\n            return createAction(arg1, arg2, autoAction)\n        }\n        // action(\"name\") annotation\n        if (isStringish(arg1)) {\n            return createActionDecoratorAnnotation(\n                createActionAnnotation(autoAction ? AUTOACTION : ACTION, {\n                    name: arg1,\n                    autoAction\n                })\n            )\n        }\n\n        if (__DEV__) {\n            die(\"Invalid arguments for `action`\")\n        }\n    } as IActionFactory\n    return res\n}\n\nexport const action: IActionFactory = createActionFactory(false)\nassign(action, actionAnnotation)\nexport const autoAction: IActionFactory = createActionFactory(true)\nassign(autoAction, autoActionAnnotation)\n\nexport const actionBound = createActionDecoratorAnnotation(actionBoundAnnotation)\nexport const autoActionBound = createActionDecoratorAnnotation(autoActionBoundAnnotation)\n\nexport function runInAction<T>(fn: () => T): T {\n    return executeAction(fn.name || DEFAULT_ACTION_NAME, false, fn, this, undefined)\n}\n\nexport function isAction(thing: any) {\n    return isFunction(thing) && thing.isMobxAction === true\n}\n", "import {\n    EMPTY_OBJECT,\n    IEqualsComparer,\n    IReactionDisposer,\n    IReactionPublic,\n    Lambda,\n    Reaction,\n    action,\n    compareDefault,\n    getNextId,\n    isAction,\n    isFunction,\n    isPlainObject,\n    die,\n    allowStateChanges,\n    GenericAbortSignal\n} from \"../internal\"\n\nexport interface IAutorunOptions {\n    delay?: number\n    name?: string\n    /**\n     * Experimental.\n     * Warns if the view doesn't track observables\n     */\n    requiresObservable?: boolean\n    scheduler?: (callback: () => void) => any\n    onError?: (error: any) => void\n    signal?: GenericAbortSignal\n}\n\n/**\n * Creates a named reactive view and keeps it alive, so that the view is always\n * updated if one of the dependencies changes, even when the view is not further used by something else.\n * @param view The reactive view\n * @returns disposer function, which can be used to stop the view from being updated in the future.\n */\nexport function autorun(\n    view: (r: IReactionPublic) => any,\n    opts: IAutorunOptions = EMPTY_OBJECT\n): IReactionDisposer {\n    if (__DEV__) {\n        if (!isFunction(view)) {\n            die(\"Autorun expects a function as first argument\")\n        }\n        if (isAction(view)) {\n            die(\"Autorun does not accept actions since actions are untrackable\")\n        }\n    }\n\n    const name: string =\n        opts?.name ?? (__DEV__ ? (view as any).name || \"Autorun@\" + getNextId() : \"Autorun\")\n    const runSync = !opts.scheduler && !opts.delay\n    let reaction: Reaction\n\n    if (runSync) {\n        // normal autorun\n        reaction = new Reaction(\n            name,\n            function (this: Reaction) {\n                this.track(reactionRunner)\n            },\n            opts.onError,\n            opts.requiresObservable\n        )\n    } else {\n        const scheduler = createSchedulerFromOptions(opts)\n        // debounced autorun\n        let isScheduled = false\n\n        reaction = new Reaction(\n            name,\n            () => {\n                if (!isScheduled) {\n                    isScheduled = true\n                    scheduler(() => {\n                        isScheduled = false\n                        if (!reaction.isDisposed) {\n                            reaction.track(reactionRunner)\n                        }\n                    })\n                }\n            },\n            opts.onError,\n            opts.requiresObservable\n        )\n    }\n\n    function reactionRunner() {\n        view(reaction)\n    }\n\n    if (!opts?.signal?.aborted) {\n        reaction.schedule_()\n    }\n    return reaction.getDisposer_(opts?.signal)\n}\n\nexport type IReactionOptions<T, FireImmediately extends boolean> = IAutorunOptions & {\n    fireImmediately?: FireImmediately\n    equals?: IEqualsComparer<T>\n}\n\nconst run = (f: Lambda) => f()\n\nfunction createSchedulerFromOptions(opts: IAutorunOptions) {\n    return opts.scheduler\n        ? opts.scheduler\n        : opts.delay\n        ? (f: Lambda) => setTimeout(f, opts.delay!)\n        : run\n}\n\nexport function reaction<T, FireImmediately extends boolean = false>(\n    expression: (r: IReactionPublic) => T,\n    effect: (\n        arg: T,\n        prev: FireImmediately extends true ? T | undefined : T,\n        r: IReactionPublic\n    ) => void,\n    opts: IReactionOptions<T, FireImmediately> = EMPTY_OBJECT\n): IReactionDisposer {\n    if (__DEV__) {\n        if (!isFunction(expression) || !isFunction(effect)) {\n            die(\"First and second argument to reaction should be functions\")\n        }\n        if (!isPlainObject(opts)) {\n            die(\"Third argument of reactions should be an object\")\n        }\n    }\n    const name = opts.name ?? (__DEV__ ? \"Reaction@\" + getNextId() : \"Reaction\")\n    const effectAction = action(\n        name,\n        opts.onError ? wrapErrorHandler(opts.onError, effect) : effect\n    )\n    const runSync = !opts.scheduler && !opts.delay\n    const scheduler = createSchedulerFromOptions(opts)\n\n    let firstTime = true\n    let isScheduled = false\n    let value: T\n\n    const equals: IEqualsComparer<T> = opts.equals || compareDefault\n\n    const r = new Reaction(\n        name,\n        () => {\n            if (firstTime || runSync) {\n                reactionRunner()\n            } else if (!isScheduled) {\n                isScheduled = true\n                scheduler!(reactionRunner)\n            }\n        },\n        opts.onError,\n        opts.requiresObservable\n    )\n\n    function reactionRunner() {\n        isScheduled = false\n        if (r.isDisposed) {\n            return\n        }\n        let changed: boolean = false\n        const oldValue = value\n        r.track(() => {\n            const nextValue = allowStateChanges(false, () => expression(r))\n            changed = firstTime || !equals(value, nextValue)\n            value = nextValue\n        })\n\n        // This casting is nesessary as TS cannot infer proper type in current function implementation\n        type OldValue = FireImmediately extends true ? T | undefined : T\n        if (firstTime && opts.fireImmediately!) {\n            effectAction(value, oldValue as OldValue, r)\n        } else if (!firstTime && changed) {\n            effectAction(value, oldValue as OldValue, r)\n        }\n        firstTime = false\n    }\n\n    if (!opts?.signal?.aborted) {\n        r.schedule_()\n    }\n    return r.getDisposer_(opts?.signal)\n}\n\nfunction wrapErrorHandler(errorHandler, baseFn) {\n    return function () {\n        try {\n            return baseFn.apply(this, arguments)\n        } catch (e) {\n            errorHandler.call(this, e)\n        }\n    }\n}\n", "import {\n    IComputedValue,\n    IObservable,\n    IObservableArray,\n    Lambda,\n    ObservableMap,\n    getAtom,\n    ObservableSet,\n    isFunction,\n    IObservableValue\n} from \"../internal\"\n\nconst ON_BECOME_OBSERVED = \"onBO\"\nconst ON_BECOME_UNOBSERVED = \"onBUO\"\n\nexport function onBecomeObserved(\n    value:\n        | IObservable\n        | IComputedValue<any>\n        | IObservableArray<any>\n        | ObservableMap<any, any>\n        | ObservableSet<any>\n        | IObservableValue<any>,\n    listener: Lambda\n): Lambda\nexport function onBecomeObserved<K, V = any>(\n    value: ObservableMap<K, V> | Object,\n    property: K,\n    listener: Lambda\n): Lambda\nexport function onBecomeObserved(thing, arg2, arg3?): Lambda {\n    return interceptHook(ON_BECOME_OBSERVED, thing, arg2, arg3)\n}\n\nexport function onBecomeUnobserved(\n    value:\n        | IObservable\n        | IComputedValue<any>\n        | IObservableArray<any>\n        | ObservableMap<any, any>\n        | ObservableSet<any>\n        | IObservableValue<any>,\n    listener: Lambda\n): Lambda\nexport function onBecomeUnobserved<K, V = any>(\n    value: ObservableMap<K, V> | Object,\n    property: K,\n    listener: Lambda\n): Lambda\nexport function onBecomeUnobserved(thing, arg2, arg3?): Lambda {\n    return interceptHook(ON_BECOME_UNOBSERVED, thing, arg2, arg3)\n}\n\nfunction interceptHook(hook: \"onBO\" | \"onBUO\", thing, arg2, arg3) {\n    const atom: IObservable =\n        typeof arg3 === \"function\" ? getAtom(thing, arg2) : (getAtom(thing) as any)\n    const cb = isFunction(arg3) ? arg3 : arg2\n    const listenersKey = `${hook}L` as \"onBOL\" | \"onBUOL\"\n\n    if (atom[listenersKey]) {\n        atom[listenersKey]!.add(cb)\n    } else {\n        atom[listenersKey] = new Set<Lambda>([cb])\n    }\n\n    return function () {\n        const hookListeners = atom[listenersKey]\n        if (hookListeners) {\n            hookListeners.delete(cb)\n            if (hookListeners.size === 0) {\n                delete atom[listenersKey]\n            }\n        }\n    }\n}\n", "import { globalState, isolateGlobalState, setReactionScheduler } from \"../internal\"\n\nconst ALWAYS = \"always\"\nconst OBSERVED = \"observed\"\n\nexport function configure(options: {\n    enforceActions?: \"never\" | \"always\" | \"observed\"\n    computedRequiresReaction?: boolean\n    /**\n     * Warn if you try to create to derivation / reactive context without accessing any observable.\n     */\n    reactionRequiresObservable?: boolean\n    /**\n     * Warn if observables are accessed outside a reactive context\n     */\n    observableRequiresReaction?: boolean\n    isolateGlobalState?: boolean\n    disableErrorBoundaries?: boolean\n    safeDescriptors?: boolean\n    reactionScheduler?: (f: () => void) => void\n}): void {\n    if (options.isolateGlobalState === true) {\n        isolateGlobalState()\n    }\n    const { enforceActions } = options\n    if (enforceActions !== undefined) {\n        const ea = enforceActions === ALWAYS ? ALWAYS : enforceActions === OBSERVED\n        globalState.enforceActions = ea\n        globalState.allowStateChanges = ea === true || ea === ALWAYS ? false : true\n    }\n    ;[\n        \"computedRequiresReaction\",\n        \"reactionRequiresObservable\",\n        \"observableRequiresReaction\",\n        \"disableErrorBoundaries\",\n        \"safeDescriptors\"\n    ].forEach(key => {\n        if (key in options) {\n            globalState[key] = !!options[key]\n        }\n    })\n    globalState.allowStateReads = !globalState.observableRequiresReaction\n    if (__DEV__ && globalState.disableErrorBoundaries === true) {\n        console.warn(\n            \"WARNING: Debug feature only. MobX will NOT recover from errors when `disableErrorBoundaries` is enabled.\"\n        )\n    }\n    if (options.reactionScheduler) {\n        setReactionScheduler(options.reactionScheduler)\n    }\n}\n", "import {\n    CreateObservableOptions,\n    isObservableMap,\n    AnnotationsMap,\n    asObservableObject,\n    isPlainObject,\n    ObservableObjectAdministration,\n    isObservable,\n    die,\n    getOwnPropertyDescriptors,\n    $mobx,\n    ownKeys,\n    initObservable\n} from \"../internal\"\n\nexport function extendObservable<A extends Object, B extends Object>(\n    target: A,\n    properties: B,\n    annotations?: AnnotationsMap<B, never>,\n    options?: CreateObservableOptions\n): A & B {\n    if (__DEV__) {\n        if (arguments.length > 4) {\n            die(\"'extendObservable' expected 2-4 arguments\")\n        }\n        if (typeof target !== \"object\") {\n            die(\"'extendObservable' expects an object as first argument\")\n        }\n        if (isObservableMap(target)) {\n            die(\"'extendObservable' should not be used on maps, use map.merge instead\")\n        }\n        if (!isPlainObject(properties)) {\n            die(`'extendObservable' only accepts plain objects as second argument`)\n        }\n        if (isObservable(properties) || isObservable(annotations)) {\n            die(`Extending an object with another observable (object) is not supported`)\n        }\n    }\n    // Pull descriptors first, so we don't have to deal with props added by administration ($mobx)\n    const descriptors = getOwnPropertyDescriptors(properties)\n\n    initObservable(() => {\n        const adm: ObservableObjectAdministration = asObservableObject(target, options)[$mobx]\n        ownKeys(descriptors).forEach(key => {\n            adm.extend_(\n                key,\n                descriptors[key as any],\n                // must pass \"undefined\" for { key: undefined }\n                !annotations ? true : key in annotations ? annotations[key] : true\n            )\n        })\n    })\n\n    return target as any\n}\n", "import { IDepTreeNode, getAtom, getObservers, hasObservers } from \"../internal\"\n\nexport interface IDependencyTree {\n    name: string\n    dependencies?: IDependencyTree[]\n}\n\nexport interface IObserverTree {\n    name: string\n    observers?: IObserverTree[]\n}\n\nexport function getDependencyTree(thing: any, property?: string): IDependencyTree {\n    return nodeToDependencyTree(getAtom(thing, property))\n}\n\nfunction nodeToDependencyTree(node: IDepTreeNode): IDependencyTree {\n    const result: IDependencyTree = {\n        name: node.name_\n    }\n    if (node.observing_ && node.observing_.length > 0) {\n        result.dependencies = unique(node.observing_).map(nodeToDependencyTree)\n    }\n    return result\n}\n\nexport function getObserverTree(thing: any, property?: string): IObserverTree {\n    return nodeToObserverTree(getAtom(thing, property))\n}\n\nfunction nodeToObserverTree(node: IDepTreeNode): IObserverTree {\n    const result: IObserverTree = {\n        name: node.name_\n    }\n    if (hasObservers(node as any)) {\n        result.observers = Array.from(<any>getObservers(node as any), <any>nodeToObserverTree)\n    }\n    return result\n}\n\nfunction unique<T>(list: T[]): T[] {\n    return Array.from(new Set(list))\n}\n", "import {\n    action,\n    noop,\n    die,\n    isFunction,\n    Annotation,\n    createFlowAnnotation,\n    decorateFlow20223_,\n    assign\n} from \"../internal\"\nimport { createDecoratorAnnotation, type DecoratorAnnotation } from \"./decoratorannotation\"\nimport type { ClassMethodDecorator } from \"../types/decorator_fills\"\n\nexport const FLOW = \"flow\"\n\nlet generatorId = 0\n\nexport class FlowCancellationError extends Error {\n    constructor() {\n        super(\"FLOW_CANCELLED\")\n        Object.setPrototypeOf(this, new.target.prototype)\n        this.name = \"FlowCancellationError\"\n    }\n\n    toString() {\n        return `Error: ${this.message}`\n    }\n}\n\nexport function isFlowCancellationError(error: Error) {\n    return error instanceof FlowCancellationError\n}\n\nexport type CancellablePromise<T> = Promise<T> & { cancel(): void }\n\nfunction createFlowDecoratorAnnotation(\n    annotation: Annotation\n): DecoratorAnnotation<ClassMethodDecorator> {\n    return createDecoratorAnnotation(annotation, decorateFlow20223_)\n}\n\ninterface Flow extends Annotation, ClassMethodDecorator {\n    <R, Args extends any[]>(\n        generator: (...args: Args) => Generator<any, R, any> | AsyncGenerator<any, R, any>,\n        context?: never\n    ): (...args: Args) => CancellablePromise<R>\n}\n\nconst flowAnnotation = createFlowAnnotation(\"flow\")\nconst flowBoundAnnotation = createFlowAnnotation(\"flow.bound\", { bound: true })\n\nexport const flow: Flow = assign(\n    function flow(arg1, arg2?) {\n        if (arg2 && typeof arg2.kind === \"string\") {\n            return decorateFlow20223_(flowAnnotation, arg1, arg2)\n        }\n\n        // flow(fn)\n        if (__DEV__ && arguments.length !== 1) {\n            die(`Flow expects single argument with generator function`)\n        }\n        const generator = arg1\n        const name = generator.name || (__DEV__ ? \"<unnamed flow>\" : \"flow\")\n\n        // Implementation based on https://github.com/tj/co/blob/master/index.js\n        const res = function () {\n            const ctx = this\n            const args = arguments\n            const runId = __DEV__ ? ++generatorId : 0\n            const gen = action(\n                __DEV__ ? `${name} - runid: ${runId} - init` : name,\n                generator\n            ).apply(ctx, args)\n            let rejector: (error: any) => void\n            let pendingPromise: CancellablePromise<any> | undefined = undefined\n\n            const promise = new Promise(function (resolve, reject) {\n                let stepId = 0\n                rejector = reject\n\n                function onFulfilled(res: any) {\n                    pendingPromise = undefined\n                    let ret\n                    try {\n                        ret = action(\n                            __DEV__ ? `${name} - runid: ${runId} - yield ${stepId++}` : name,\n                            gen.next\n                        ).call(gen, res)\n                    } catch (e) {\n                        return reject(e)\n                    }\n\n                    next(ret)\n                }\n\n                function onRejected(err: any) {\n                    pendingPromise = undefined\n                    let ret\n                    try {\n                        ret = action(\n                            __DEV__ ? `${name} - runid: ${runId} - yield ${stepId++}` : name,\n                            gen.throw!\n                        ).call(gen, err)\n                    } catch (e) {\n                        return reject(e)\n                    }\n                    next(ret)\n                }\n\n                function next(ret: any) {\n                    if (isFunction(ret?.then)) {\n                        // an async iterator\n                        ret.then(next, reject)\n                        return\n                    }\n                    if (ret.done) {\n                        return resolve(ret.value)\n                    }\n                    pendingPromise = Promise.resolve(ret.value) as any\n                    return pendingPromise!.then(onFulfilled, onRejected)\n                }\n\n                onFulfilled(undefined) // kick off the process\n            }) as any\n\n            const cancelActionName = __DEV__ ? `${name} - runid: ${runId} - cancel` : name\n            promise.cancel = action(cancelActionName, function () {\n                try {\n                    if (pendingPromise) {\n                        cancelPromise(pendingPromise)\n                    }\n                    // Finally block can return (or yield) stuff..\n                    const res = gen.return!(undefined as any)\n                    // eat anything that promise would do, it's cancelled!\n                    const yieldedPromise = Promise.resolve(res.value)\n                    yieldedPromise.then(noop, noop)\n                    cancelPromise(yieldedPromise) // maybe it can be cancelled :)\n                    // reject our original promise\n                    rejector(new FlowCancellationError())\n                } catch (e) {\n                    rejector(e) // there could be a throwing finally block\n                }\n            })\n            return promise\n        }\n        res.isMobXFlow = true\n        return res\n    } as any,\n    flowAnnotation\n)\n\nexport const flowBound = createFlowDecoratorAnnotation(flowBoundAnnotation)\n\nfunction cancelPromise(promise) {\n    if (isFunction(promise.cancel)) {\n        promise.cancel()\n    }\n}\n\nexport function flowResult<T>(\n    result: T\n): T extends Generator<any, infer R, any>\n    ? CancellablePromise<R>\n    : T extends CancellablePromise<any>\n    ? T\n    : never {\n    return result as any // just tricking TypeScript :)\n}\n\nexport function isFlow(fn: any): boolean {\n    return fn?.isMobXFlow === true\n}\n", "import {\n    IObservableArray,\n    IObservableValue,\n    Lambda,\n    ObservableMap,\n    getAdministration,\n    isObservableArray,\n    isObservableMap,\n    isObservableObject,\n    isObservableValue,\n    ObservableSet,\n    die,\n    isStringish\n} from \"../internal\"\n\nexport type ReadInterceptor<T> = (value: any) => T\n\n/** Experimental feature right now, tested indirectly via Mobx-State-Tree */\nexport function interceptReads<T>(value: IObservableValue<T>, handler: ReadInterceptor<T>): Lambda\nexport function interceptReads<T>(\n    observableArray: IObservableArray<T>,\n    handler: ReadInterceptor<T>\n): Lambda\nexport function interceptReads<K, V>(\n    observableMap: ObservableMap<K, V>,\n    handler: ReadInterceptor<V>\n): Lambda\nexport function interceptReads<V>(\n    observableSet: ObservableSet<V>,\n    handler: ReadInterceptor<V>\n): Lambda\nexport function interceptReads(\n    object: Object,\n    property: string,\n    handler: ReadInterceptor<any>\n): Lambda\nexport function interceptReads(thing, propOrHandler?, handler?): Lambda {\n    let target\n    if (isObservableMap(thing) || isObservableArray(thing) || isObservableValue(thing)) {\n        target = getAdministration(thing)\n    } else if (isObservableObject(thing)) {\n        if (__DEV__ && !isStringish(propOrHandler)) {\n            return die(\n                `InterceptReads can only be used with a specific property, not with an object in general`\n            )\n        }\n        target = getAdministration(thing, propOrHandler)\n    } else if (__DEV__) {\n        return die(`Expected observable map, object or array as first array`)\n    }\n    if (__DEV__ && target.dehancer !== undefined) {\n        return die(`An intercept reader was already established`)\n    }\n    target.dehancer = typeof propOrHandler === \"function\" ? propOrHandler : handler\n    return () => {\n        target.dehancer = undefined\n    }\n}\n", "import {\n    IArrayWillChange,\n    IArrayWillSplice,\n    IInterceptor,\n    IMapWillChange,\n    IObjectWillChange,\n    IObservableArray,\n    IObservableValue,\n    IValueWillChange,\n    Lambda,\n    ObservableMap,\n    getAdministration,\n    ObservableSet,\n    ISetWillChange,\n    isFunction,\n    registerInterceptor\n} from \"../internal\"\n\nexport function intercept<T>(\n    value: IObservableValue<T>,\n    handler: IInterceptor<IValueWillChange<T>>\n): Lambda\nexport function intercept<T>(\n    observableArray: IObservableArray<T> | Array<T>,\n    handler: IInterceptor<IArrayWillChange<T> | IArrayWillSplice<T>>\n): Lambda\nexport function intercept<K, V>(\n    observableMap: ObservableMap<K, V> | Map<K, V>,\n    handler: IInterceptor<IMapWillChange<K, V>>\n): Lambda\nexport function intercept<V>(\n    observableSet: ObservableSet<V> | Set<V>,\n    handler: IInterceptor<ISetWillChange<V>>\n): Lambda\nexport function intercept<K, V>(\n    observableMap: ObservableMap<K, V> | Map<K, V>,\n    property: K,\n    handler: IInterceptor<IValueWillChange<V>>\n): Lambda\nexport function intercept(object: object, handler: IInterceptor<IObjectWillChange>): Lambda\nexport function intercept<T extends object, K extends keyof T>(\n    object: T,\n    property: K,\n    handler: IInterceptor<IValueWillChange<T[K]>>\n): Lambda\nexport function intercept(thing, propOrHandler?, handler?): Lambda {\n    if (isFunction(handler)) {\n        return interceptProperty(thing, propOrHandler, handler)\n    } else {\n        return interceptInterceptable(thing, propOrHandler)\n    }\n}\n\nfunction interceptInterceptable(thing, handler) {\n    return registerInterceptor(getAdministration(thing), handler)\n}\n\nfunction interceptProperty(thing, property, handler) {\n    return registerInterceptor(getAdministration(thing, property), handler)\n}\n", "import { $mobx, getAtom, isComputedValue, isObservableObject, die, isStringish } from \"../internal\"\n\nexport function _isComputed(value, property?: PropertyKey): boolean {\n    if (property === undefined) {\n        return isComputedValue(value)\n    }\n    if (isObservableObject(value) === false) {\n        return false\n    }\n    const adm = value[$mobx]\n    if (adm.lazyComputedKeys_?.has(property)) {\n        return true\n    }\n    if (!adm.values_.has(property)) {\n        return false\n    }\n    const atom = getAtom(value, property)\n    return isComputedValue(atom)\n}\n\nexport function isComputed(value: any): boolean {\n    if (__DEV__ && arguments.length > 1) {\n        return die(\n            `isComputed expects only 1 argument. Use isComputedProp to inspect the observability of a property`\n        )\n    }\n    return _isComputed(value)\n}\n\nexport function isComputedProp(value: any, propName: PropertyKey): boolean {\n    if (__DEV__ && !isStringish(propName)) {\n        return die(`isComputed expected a property name as second argument`)\n    }\n    return _isComputed(value, propName)\n}\n", "import {\n    $mobx,\n    isAtom,\n    isComputedValue,\n    isObservableArray,\n    isObservableMap,\n    isObservableObject,\n    isReaction,\n    die,\n    isStringish\n} from \"../internal\"\n\nfunction _isObservable(value, property?: PropertyKey): boolean {\n    if (!value) {\n        return false\n    }\n    if (property !== undefined) {\n        if (__DEV__ && (isObservableMap(value) || isObservableArray(value))) {\n            return die(\n                \"isObservable(object, propertyName) is not supported for arrays and maps. Use map.has or array.length instead.\"\n            )\n        }\n        if (isObservableObject(value)) {\n            const adm = value[$mobx]\n            return (\n                adm.values_.has(property) ||\n                !!adm.lazyComputedKeys_?.has(property) ||\n                !!adm.lazyObservableKeys_?.has(property)\n            )\n        }\n        return false\n    }\n    // For first check, see #701\n    return (\n        isObservableObject(value) ||\n        !!value[$mobx] ||\n        isAtom(value) ||\n        isReaction(value) ||\n        isComputedValue(value)\n    )\n}\n\nexport function isObservable(value: any): boolean {\n    if (__DEV__ && arguments.length !== 1) {\n        die(\n            `isObservable expects only 1 argument. Use isObservableProp to inspect the observability of a property`\n        )\n    }\n    return _isObservable(value)\n}\n\nexport function isObservableProp(value: any, propName: PropertyKey): boolean {\n    if (__DEV__ && !isStringish(propName)) {\n        return die(`expected a property name as second argument`)\n    }\n    return _isObservable(value, propName)\n}\n", "import {\n    $mobx,\n    IIsObservableObject,\n    IObservableArray,\n    ObservableMap,\n    ObservableSet,\n    ObservableObjectAdministration,\n    endBatch,\n    isObservableArray,\n    isObservableMap,\n    isObservableSet,\n    isObservableObject,\n    startBatch,\n    die\n} from \"../internal\"\n\nexport function keys<K>(map: ObservableMap<K, any>): ReadonlyArray<K>\nexport function keys<T>(ar: IObservableArray<T>): ReadonlyArray<number>\nexport function keys<T>(set: ObservableSet<T>): ReadonlyArray<T>\nexport function keys<T extends Object>(obj: T): ReadonlyArray<PropertyKey>\nexport function keys(obj: any): any {\n    if (isObservableObject(obj)) {\n        return (\n            (obj as any as IIsObservableObject)[$mobx] as ObservableObjectAdministration\n        ).keys_()\n    }\n    if (isObservableMap(obj) || isObservableSet(obj)) {\n        return Array.from(obj.keys())\n    }\n    if (isObservableArray(obj)) {\n        return obj.map((_, index) => index)\n    }\n    die(5)\n}\n\nexport function values<K, T>(map: ObservableMap<K, T>): ReadonlyArray<T>\nexport function values<T>(set: ObservableSet<T>): ReadonlyArray<T>\nexport function values<T>(ar: IObservableArray<T>): ReadonlyArray<T>\nexport function values<T = any>(obj: T): ReadonlyArray<T extends object ? T[keyof T] : any>\nexport function values(obj: any): string[] {\n    if (isObservableObject(obj)) {\n        return keys(obj).map(key => obj[key])\n    }\n    if (isObservableMap(obj)) {\n        return keys(obj).map(key => obj.get(key))\n    }\n    if (isObservableSet(obj)) {\n        return Array.from(obj.values())\n    }\n    if (isObservableArray(obj)) {\n        return obj.slice()\n    }\n    die(6)\n}\n\nexport function entries<K, T>(map: ObservableMap<K, T>): ReadonlyArray<[K, T]>\nexport function entries<T>(set: ObservableSet<T>): ReadonlyArray<[T, T]>\nexport function entries<T>(ar: IObservableArray<T>): ReadonlyArray<[number, T]>\nexport function entries<T = any>(\n    obj: T\n): ReadonlyArray<[string, T extends object ? T[keyof T] : any]>\nexport function entries(obj: any): any {\n    if (isObservableObject(obj)) {\n        return keys(obj).map(key => [key, obj[key]])\n    }\n    if (isObservableMap(obj)) {\n        return keys(obj).map(key => [key, obj.get(key)])\n    }\n    if (isObservableSet(obj)) {\n        return Array.from(obj.entries())\n    }\n    if (isObservableArray(obj)) {\n        return obj.map((key, index) => [index, key])\n    }\n    die(7)\n}\n\nexport function set<V>(obj: ObservableMap<PropertyKey, V>, values: { [key: string]: V })\nexport function set<K, V>(obj: ObservableMap<K, V>, key: K, value: V)\nexport function set<T>(obj: ObservableSet<T>, value: T)\nexport function set<T>(obj: IObservableArray<T>, index: number, value: T)\nexport function set<T extends Object>(obj: T, values: { [key: string]: any })\nexport function set<T extends Object>(obj: T, key: PropertyKey, value: any)\nexport function set(obj: any, key: any, value?: any): void {\n    if (arguments.length === 2 && !isObservableSet(obj)) {\n        startBatch()\n        const values = key\n        try {\n            for (let key in values) {\n                set(obj, key, values[key])\n            }\n        } finally {\n            endBatch()\n        }\n        return\n    }\n    if (isObservableObject(obj)) {\n        ;(obj as any as IIsObservableObject)[$mobx].set_(key, value)\n    } else if (isObservableMap(obj)) {\n        obj.set(key, value)\n    } else if (isObservableSet(obj)) {\n        obj.add(key)\n    } else if (isObservableArray(obj)) {\n        if (typeof key !== \"number\") {\n            key = parseInt(key, 10)\n        }\n        if (key < 0) {\n            die(42, key)\n        }\n        startBatch()\n        if (key >= obj.length) {\n            obj.length = key + 1\n        }\n        obj[key] = value\n        endBatch()\n    } else {\n        die(8)\n    }\n}\n\nexport function remove<K, V>(obj: ObservableMap<K, V>, key: K)\nexport function remove<T>(obj: ObservableSet<T>, key: T)\nexport function remove<T>(obj: IObservableArray<T>, index: number)\nexport function remove<T extends Object>(obj: T, key: string)\nexport function remove(obj: any, key: any): void {\n    if (isObservableObject(obj)) {\n        ;(obj as any as IIsObservableObject)[$mobx].delete_(key)\n    } else if (isObservableMap(obj)) {\n        obj.delete(key)\n    } else if (isObservableSet(obj)) {\n        obj.delete(key)\n    } else if (isObservableArray(obj)) {\n        if (typeof key !== \"number\") {\n            key = parseInt(key, 10)\n        }\n        obj.splice(key, 1)\n    } else {\n        die(9)\n    }\n}\n\nexport function has<K>(obj: ObservableMap<K, any>, key: K): boolean\nexport function has<T>(obj: ObservableSet<T>, key: T): boolean\nexport function has<T>(obj: IObservableArray<T>, index: number): boolean\nexport function has<T extends Object>(obj: T, key: string): boolean\nexport function has(obj: any, key: any): boolean {\n    if (isObservableObject(obj)) {\n        return (obj as any as IIsObservableObject)[$mobx].has_(key)\n    } else if (isObservableMap(obj)) {\n        return obj.has(key)\n    } else if (isObservableSet(obj)) {\n        return obj.has(key)\n    } else if (isObservableArray(obj)) {\n        return key >= 0 && key < obj.length\n    }\n    die(10)\n}\n\nexport function get<K, V>(obj: ObservableMap<K, V>, key: K): V | undefined\nexport function get<T>(obj: IObservableArray<T>, index: number): T | undefined\nexport function get<T extends Object>(obj: T, key: string): any\nexport function get(obj: any, key: any): any {\n    if (!has(obj, key)) {\n        return undefined\n    }\n    if (isObservableObject(obj)) {\n        return (obj as any as IIsObservableObject)[$mobx].get_(key)\n    } else if (isObservableMap(obj)) {\n        return obj.get(key)\n    } else if (isObservableArray(obj)) {\n        return obj[key]\n    }\n    die(11)\n}\n\nexport function apiDefineProperty(obj: Object, key: PropertyKey, descriptor: PropertyDescriptor) {\n    if (isObservableObject(obj)) {\n        return (obj as any as IIsObservableObject)[$mobx].defineProperty_(key, descriptor)\n    }\n    die(39)\n}\n\nexport function apiOwnKeys(obj: Object) {\n    if (isObservableObject(obj)) {\n        return (obj as any as IIsObservableObject)[$mobx].ownKeys_()\n    }\n    die(38)\n}\n", "import {\n    IArrayDidChange,\n    IComputedValue,\n    IMapDidChange,\n    IObjectDidChange,\n    IObservableArray,\n    IObservableValue,\n    IValueDidChange,\n    Lambda,\n    ObservableMap,\n    getAdministration,\n    ObservableSet,\n    ISetDidChange,\n    isFunction,\n    isComputedValue,\n    isObservableArray,\n    isObservableMap,\n    isObservableObject,\n    isObservableSet,\n    autorun,\n    registerListener,\n    untrackedEnd,\n    untrackedStart,\n    UPDATE,\n    die\n} from \"../internal\"\n\nexport function observe<T>(\n    value: IObservableValue<T> | IComputedValue<T>,\n    listener: (change: IValueDidChange<T>) => void,\n    fireImmediately?: boolean\n): Lambda\nexport function observe<T>(\n    observableArray: IObservableArray<T> | Array<T>,\n    listener: (change: IArrayDidChange<T>) => void,\n    fireImmediately?: boolean\n): Lambda\nexport function observe<V>(\n    // ObservableSet/ObservableMap are required despite they implement Set/Map: https://github.com/mobxjs/mobx/pull/3180#discussion_r746542929\n    observableSet: ObservableSet<V> | Set<V>,\n    listener: (change: ISetDidChange<V>) => void,\n    fireImmediately?: boolean\n): Lambda\nexport function observe<K, V>(\n    observableMap: ObservableMap<K, V> | Map<K, V>,\n    listener: (change: IMapDidChange<K, V>) => void,\n    fireImmediately?: boolean\n): Lambda\nexport function observe<K, V>(\n    observableMap: ObservableMap<K, V> | Map<K, V>,\n    property: K,\n    listener: (change: IValueDidChange<V>) => void,\n    fireImmediately?: boolean\n): Lambda\nexport function observe(\n    object: Object,\n    listener: (change: IObjectDidChange) => void,\n    fireImmediately?: boolean\n): Lambda\nexport function observe<T, K extends keyof T>(\n    object: T,\n    property: K,\n    listener: (change: IValueDidChange<T[K]>) => void,\n    fireImmediately?: boolean\n): Lambda\nexport function observe(thing, propOrCb?, cbOrFire?, fireImmediately?): Lambda {\n    if (isFunction(cbOrFire)) {\n        return observeObservableProperty(thing, propOrCb, cbOrFire, fireImmediately)\n    } else {\n        return observeObservable(thing, propOrCb, cbOrFire)\n    }\n}\n\nfunction observeObservable(thing, listener, fireImmediately: boolean) {\n    const adm = getAdministration(thing)\n\n    if (isObservableArray(thing)) {\n        if (fireImmediately) {\n            listener({\n                observableKind: \"array\",\n                object: adm.proxy_,\n                debugObjectName: adm.atom_.name_,\n                type: \"splice\",\n                index: 0,\n                added: adm.values_.slice(),\n                addedCount: adm.values_.length,\n                removed: [],\n                removedCount: 0\n            })\n        }\n    } else if (isObservableMap(thing)) {\n        if (__DEV__ && fireImmediately === true) {\n            die(\"`observe` doesn't support fireImmediately=true in combination with maps.\")\n        }\n    } else if (isObservableSet(thing)) {\n        if (__DEV__ && fireImmediately === true) {\n            die(\"`observe` doesn't support fireImmediately=true in combination with sets.\")\n        }\n    } else if (isObservableObject(thing)) {\n        if (__DEV__ && fireImmediately === true) {\n            die(\"`observe` doesn't support the fire immediately property for observable objects.\")\n        }\n    } else {\n        return observeValue(adm, listener, fireImmediately)\n    }\n\n    return registerListener(adm, listener)\n}\n\nfunction observeObservableProperty(thing, property, listener, fireImmediately: boolean) {\n    return observeValue(getAdministration(thing, property), listener, fireImmediately)\n}\n\nfunction observeValue(adm, listener, fireImmediately: boolean) {\n    if (isComputedValue(adm)) {\n        let firstTime = true\n        let prevValue: any = undefined\n        return autorun(() => {\n            const newValue = adm.get()\n            if (!firstTime || fireImmediately) {\n                const prevU = untrackedStart()\n                listener({\n                    observableKind: \"computed\",\n                    debugObjectName: adm.name_,\n                    type: UPDATE,\n                    object: adm,\n                    newValue,\n                    oldValue: prevValue\n                })\n                untrackedEnd(prevU)\n            }\n            firstTime = false\n            prevValue = newValue\n        })\n    }\n\n    if (fireImmediately) {\n        listener({\n            observableKind: \"value\",\n            debugObjectName: adm.name_,\n            object: adm,\n            type: UPDATE,\n            newValue: adm.value_,\n            oldValue: undefined\n        })\n    }\n    return registerListener(adm, listener)\n}\n", "import {\n    isObservable,\n    isObservableArray,\n    isObservableValue,\n    isObservableMap,\n    isObservableSet,\n    isComputedValue,\n    die,\n    apiOwnKeys,\n    objectPrototype\n} from \"../internal\"\n\nfunction cache<K, V>(map: Map<any, any>, key: K, value: V): V {\n    map.set(key, value)\n    return value\n}\n\nfunction toJSHelper(source, __alreadySeen: Map<any, any>) {\n    if (\n        source == null ||\n        typeof source !== \"object\" ||\n        source instanceof Date ||\n        !isObservable(source)\n    ) {\n        return source\n    }\n\n    if (isObservableValue(source) || isComputedValue(source)) {\n        return toJSHelper(source.get(), __alreadySeen)\n    }\n    if (__alreadySeen.has(source)) {\n        return __alreadySeen.get(source)\n    }\n    if (isObservableArray(source)) {\n        const res = cache(__alreadySeen, source, new Array(source.length))\n        source.forEach((value, idx) => {\n            res[idx] = toJSHelper(value, __alreadySeen)\n        })\n        return res\n    }\n    if (isObservableSet(source)) {\n        const res = cache(__alreadySeen, source, new Set())\n        source.forEach(value => {\n            res.add(toJSHelper(value, __alreadySeen))\n        })\n        return res\n    }\n    if (isObservableMap(source)) {\n        const res = cache(__alreadySeen, source, new Map())\n        source.forEach((value, key) => {\n            res.set(key, toJSHelper(value, __alreadySeen))\n        })\n        return res\n    } else {\n        // must be observable object\n        const res = cache(__alreadySeen, source, {})\n        apiOwnKeys(source).forEach((key: any) => {\n            if (objectPrototype.propertyIsEnumerable.call(source, key)) {\n                res[key] = toJSHelper(source[key], __alreadySeen)\n            }\n        })\n        return res\n    }\n}\n\n/**\n * Recursively converts an observable to it's non-observable native counterpart.\n * It does NOT recurse into non-observables, these are left as they are, even if they contain observables.\n * Computed and other non-enumerable properties are completely ignored.\n * Complex scenarios require custom solution, eg implementing `toJSON` or using `serializr` lib.\n */\nexport function toJS<T>(source: T, options?: any): T {\n    if (__DEV__ && options) {\n        die(\"toJS no longer supports options\")\n    }\n    return toJSHelper(source, new Map())\n}\n", "import { endBatch, startBatch } from \"../internal\"\n\n/**\n * During a transaction no views are updated until the end of the transaction.\n * The transaction will be run synchronously nonetheless.\n *\n * @param action a function that updates some reactive state\n * @returns any value that was returned by the 'action' parameter.\n */\nexport function transaction<T>(action: () => T, thisArg = undefined): T {\n    startBatch()\n    try {\n        return action.apply(thisArg)\n    } finally {\n        endBatch()\n    }\n}\n", "import {\n    $mobx,\n    IReactionDisposer,\n    Lambda,\n    autorun,\n    createAction,\n    getNextId,\n    die,\n    allowStateChanges,\n    GenericAbortSignal,\n    assign\n} from \"../internal\"\n\nexport interface IWhenOptions {\n    name?: string\n    timeout?: number\n    onError?: (error: any) => void\n    signal?: GenericAbortSignal\n}\n\nexport function when(\n    predicate: () => boolean,\n    opts?: IWhenOptions\n): Promise<void> & { cancel(): void }\nexport function when(\n    predicate: () => boolean,\n    effect: Lambda,\n    opts?: IWhenOptions\n): IReactionDisposer\nexport function when(predicate: any, arg1?: any, arg2?: any): any {\n    if (arguments.length === 1 || (arg1 && typeof arg1 === \"object\")) {\n        return whenPromise(predicate, arg1)\n    }\n    return _when(predicate, arg1, arg2 || {})\n}\n\nfunction _when(predicate: () => boolean, effect: Lambda, opts: IWhenOptions): IReactionDisposer {\n    let timeoutHandle: any\n    if (typeof opts.timeout === \"number\") {\n        const error = new Error(\"WHEN_TIMEOUT\")\n        timeoutHandle = setTimeout(() => {\n            if (!disposer[$mobx].isDisposed) {\n                disposer()\n                if (opts.onError) {\n                    opts.onError(error)\n                } else {\n                    throw error\n                }\n            }\n        }, opts.timeout)\n    }\n\n    opts.name = __DEV__ ? opts.name || \"When@\" + getNextId() : \"When\"\n    const effectAction = createAction(\n        __DEV__ ? opts.name + \"-effect\" : \"When-effect\",\n        effect as Function\n    )\n    // eslint-disable-next-line\n    var disposer = autorun(r => {\n        // predicate should not change state\n        let cond = allowStateChanges(false, predicate)\n        if (cond) {\n            r.dispose()\n            if (timeoutHandle) {\n                clearTimeout(timeoutHandle)\n            }\n            effectAction()\n        }\n    }, opts)\n    return disposer\n}\n\nfunction whenPromise(\n    predicate: () => boolean,\n    opts?: IWhenOptions\n): Promise<void> & { cancel(): void } {\n    if (__DEV__ && opts && opts.onError) {\n        return die(`the options 'onError' and 'promise' cannot be combined`)\n    }\n    if (opts?.signal?.aborted) {\n        return assign(Promise.reject(new Error(\"WHEN_ABORTED\")), { cancel: () => null })\n    }\n    let cancel\n    let abort\n    const res = new Promise((resolve, reject) => {\n        let disposer = _when(predicate, resolve as Lambda, assign({}, opts, { onError: reject }))\n        cancel = () => {\n            disposer()\n            reject(new Error(\"WHEN_CANCELLED\"))\n        }\n        abort = () => {\n            disposer()\n            reject(new Error(\"WHEN_ABORTED\"))\n        }\n        opts?.signal?.addEventListener?.(\"abort\", abort)\n    }).finally(() => opts?.signal?.removeEventListener?.(\"abort\", abort))\n    ;(res as any).cancel = cancel\n    return res as any\n}\n", "import {\n    $mobx,\n    IIsObservableObject,\n    ObservableObjectAdministration,\n    die,\n    isStringish,\n    CreateObservableOptions,\n    asObservableObject\n} from \"../internal\"\n\nfunction getAdm(target): ObservableObjectAdministration {\n    return target[$mobx]\n}\n\n// Optimization: we don't need the intermediate objects and could have a completely custom administration for DynamicObjects,\n// and skip either the internal values map, or the base object with its property descriptors!\nconst objectProxyTraps: ProxyHandler<any> = {\n    has(target: IIsObservableObject, name: PropertyKey): boolean {\n        return getAdm(target).has_(name)\n    },\n    get(target: IIsObservableObject, name: PropertyKey): any {\n        return getAdm(target).get_(name)\n    },\n    set(target: IIsObservableObject, name: PropertyKey, value: any): boolean {\n        if (!isStringish(name)) {\n            return false\n        }\n        // null (intercepted) -> true (success)\n        return getAdm(target).set_(name, value, true) ?? true\n    },\n    deleteProperty(target: IIsObservableObject, name: PropertyKey): boolean {\n        if (!isStringish(name)) {\n            return false\n        }\n        // null (intercepted) -> true (success)\n        return getAdm(target).delete_(name, true) ?? true\n    },\n    defineProperty(\n        target: IIsObservableObject,\n        name: PropertyKey,\n        descriptor: PropertyDescriptor\n    ): boolean {\n        // null (intercepted) -> true (success)\n        return getAdm(target).defineProperty_(name, descriptor) ?? true\n    },\n    ownKeys(target: IIsObservableObject): ArrayLike<string | symbol> {\n        return getAdm(target).ownKeys_()\n    },\n    preventExtensions(target) {\n        die(13)\n    }\n}\n\nexport function asDynamicObservableObject(\n    target: any,\n    options?: CreateObservableOptions\n): IIsObservableObject {\n    target = asObservableObject(target, options)\n    return (target[$mobx].proxy_ ??= new Proxy(target, objectProxyTraps))\n}\n", "import { Lambda, once, untrackedEnd, untrackedStart, die } from \"../internal\"\n\nexport type IInterceptor<T> = (change: T) => T | null\n\nexport interface IInterceptable<T> {\n    interceptors_: IInterceptor<T>[] | undefined\n}\n\nexport function hasInterceptors(interceptable: IInterceptable<any>) {\n    return interceptable.interceptors_ !== undefined && interceptable.interceptors_.length > 0\n}\n\nexport function registerInterceptor<T>(\n    interceptable: IInterceptable<T>,\n    handler: IInterceptor<T>\n): Lambda {\n    const interceptors = interceptable.interceptors_ || (interceptable.interceptors_ = [])\n    interceptors.push(handler)\n    return once(() => {\n        const idx = interceptors.indexOf(handler)\n        if (idx !== -1) {\n            interceptors.splice(idx, 1)\n        }\n    })\n}\n\nexport function interceptChange<T>(\n    interceptable: IInterceptable<T | null>,\n    change: T | null\n): T | null {\n    const prevU = untrackedStart()\n    try {\n        // Interceptor can modify the array, copy it to avoid concurrent modification, see #1950\n        const interceptors = [...(interceptable.interceptors_ || [])]\n        for (let i = 0, l = interceptors.length; i < l; i++) {\n            change = interceptors[i](change)\n            if (change && !(change as any).type) {\n                die(14)\n            }\n            if (!change) {\n                break\n            }\n        }\n        return change\n    } finally {\n        untrackedEnd(prevU)\n    }\n}\n", "import { Lambda, once, untrackedEnd, untrackedStart } from \"../internal\"\n\nexport interface IListenable {\n    changeListeners_: Function[] | undefined\n}\n\nexport function hasListeners(listenable: IListenable) {\n    return listenable.changeListeners_ !== undefined && listenable.changeListeners_.length > 0\n}\n\nexport function registerListener(listenable: IListenable, handler: Function): Lambda {\n    const listeners = listenable.changeListeners_ || (listenable.changeListeners_ = [])\n    listeners.push(handler)\n    return once(() => {\n        const idx = listeners.indexOf(handler)\n        if (idx !== -1) {\n            listeners.splice(idx, 1)\n        }\n    })\n}\n\nexport function notifyListeners<T>(listenable: IListenable, change: T) {\n    const prevU = untrackedStart()\n    let listeners = listenable.changeListeners_\n    if (!listeners) {\n        return\n    }\n    listeners = listeners.slice()\n    for (let i = 0, l = listeners.length; i < l; i++) {\n        listeners[i](change)\n    }\n    untrackedEnd(prevU)\n}\n", "import {\n    $mobx,\n    asObservableObject,\n    AnnotationsMap,\n    CreateObservableOptions,\n    ObservableObjectAdministration,\n    isPlainObject,\n    isObservableObject,\n    die,\n    ownKeys,\n    extendObservable,\n    addHiddenProp,\n    initObservable,\n    Annotation,\n    assertAnnotable,\n    getDescriptor,\n    MakeResult,\n    objectPrototype,\n    recordAnnotationApplied\n} from \"../internal\"\n\n// Hack based on https://github.com/Microsoft/TypeScript/issues/14829#issuecomment-322267089\n// We need this, because otherwise, AdditionalKeys is going to be inferred to be any\n// set of superfluous keys. But, we rather want to get a compile error unless AdditionalKeys is\n// _explicity_ passed as generic argument\n// Fixes: https://github.com/mobxjs/mobx/issues/2325#issuecomment-691070022\ntype NoInfer<T> = [T][T extends any ? 0 : never]\n\nexport function makeObservable<T extends object, AdditionalKeys extends PropertyKey = never>(\n    target: T,\n    annotations: AnnotationsMap<T, NoInfer<AdditionalKeys>>,\n    options?: CreateObservableOptions\n): T {\n    initObservable(() => {\n        const adm: ObservableObjectAdministration = asObservableObject(target, options)[$mobx]\n\n        // Annotate\n        ownKeys(annotations).forEach(key => make_(adm, key, annotations[key]))\n    })\n    return target\n}\n\n// proto[keysSymbol] = new Set<PropertyKey>()\nconst keysSymbol = Symbol(\"mobx-keys\")\n\nexport function makeAutoObservable<T extends object, AdditionalKeys extends PropertyKey = never>(\n    target: T,\n    overrides?: AnnotationsMap<T, NoInfer<AdditionalKeys>>,\n    options?: CreateObservableOptions\n): T {\n    if (__DEV__) {\n        if (!isPlainObject(target) && !isPlainObject(Object.getPrototypeOf(target))) {\n            die(`'makeAutoObservable' can only be used for classes that don't have a superclass`)\n        }\n        if (isObservableObject(target)) {\n            die(`makeAutoObservable can only be used on objects not already made observable`)\n        }\n    }\n\n    // Optimization: avoid visiting protos\n    // Assumes that annotation.make_/.extend_ works the same for plain objects\n    if (isPlainObject(target)) {\n        return extendObservable(target, target, overrides, options)\n    }\n\n    initObservable(() => {\n        const adm: ObservableObjectAdministration = asObservableObject(target, options)[$mobx]\n\n        // Optimization: cache keys on proto\n        // Assumes makeAutoObservable can be called only once per object and can't be used in subclass\n        if (!target[keysSymbol]) {\n            const proto = Object.getPrototypeOf(target)\n            const keys = new Set([...ownKeys(target), ...ownKeys(proto)])\n            keys.delete(\"constructor\")\n            keys.delete($mobx)\n            addHiddenProp(proto, keysSymbol, keys)\n        }\n\n        target[keysSymbol].forEach(key =>\n            make_(\n                adm,\n                key,\n                // must pass \"undefined\" for { key: undefined }\n                !overrides ? true : key in overrides ? overrides[key] : true\n            )\n        )\n    })\n\n    return target\n}\n\nfunction make_(\n    adm: ObservableObjectAdministration,\n    key: PropertyKey,\n    annotation: Annotation | boolean\n) {\n    if (annotation === true) {\n        annotation = adm.defaultAnnotation_\n    }\n    if (annotation === false) {\n        return\n    }\n    assertAnnotable(adm, annotation, key)\n    if (!(key in adm.target_)) {\n        die(1, annotation.annotationType_, `${adm.name_}.${key.toString()}`)\n    }\n    let source = adm.target_\n    while (source && source !== objectPrototype) {\n        const descriptor = getDescriptor(source, key)\n        if (descriptor) {\n            const outcome = annotation.make_(adm, key, descriptor, source)\n            if (outcome === MakeResult.Cancel) {\n                return\n            }\n            if (outcome === MakeResult.Break) {\n                break\n            }\n        }\n        source = Object.getPrototypeOf(source)\n    }\n    recordAnnotationApplied(adm, annotation, key)\n}\n", "import {\n    $mobx,\n    Atom,\n    EMPTY_ARRAY,\n    IAtom,\n    IEnhancer,\n    IInterceptable,\n    IListenable,\n    addHiddenFinalProp,\n    checkIfStateModificationsAreAllowed,\n    createInstanceofPredicate,\n    getNextId,\n    hasInterceptors,\n    hasListeners,\n    interceptChange,\n    isObject,\n    isSpyEnabled,\n    notifyListeners,\n    spyReportEnd,\n    spyReportStart,\n    hasProp,\n    die,\n    globalState,\n    initObservable\n} from \"../internal\"\n\nconst SPLICE = \"splice\"\nexport const UPDATE = \"update\"\nexport const MAX_SPLICE_SIZE = 10000 // See e.g. https://github.com/mobxjs/mobx/issues/859\n\nexport interface IObservableArray<T = any> extends Array<T> {\n    spliceWithArray(index: number, deleteCount?: number, newItems?: T[]): T[]\n    clear(): T[]\n    replace(newItems: T[]): T[]\n    remove(value: T): boolean\n    toJSON(): T[]\n}\n\ninterface IArrayBaseChange<T> {\n    object: IObservableArray<T>\n    observableKind: \"array\"\n    debugObjectName: string\n    index: number\n}\n\nexport type IArrayDidChange<T = any> = IArrayUpdate<T> | IArraySplice<T>\n\nexport interface IArrayUpdate<T = any> extends IArrayBaseChange<T> {\n    type: \"update\"\n    newValue: T\n    oldValue: T\n}\n\nexport interface IArraySplice<T = any> extends IArrayBaseChange<T> {\n    type: \"splice\"\n    added: T[]\n    addedCount: number\n    removed: T[]\n    removedCount: number\n}\n\nexport interface IArrayWillChange<T = any> {\n    object: IObservableArray<T>\n    index: number\n    type: \"update\"\n    newValue: T\n}\n\nexport interface IArrayWillSplice<T = any> {\n    object: IObservableArray<T>\n    index: number\n    type: \"splice\"\n    added: T[]\n    removedCount: number\n}\n\nconst arrayTraps = {\n    get(target, name) {\n        const adm: ObservableArrayAdministration = target[$mobx]\n        if (name === $mobx) {\n            return adm\n        }\n        if (name === \"length\") {\n            return adm.getArrayLength_()\n        }\n        if (typeof name === \"string\" && !isNaN(name as any)) {\n            return adm.get_(parseInt(name))\n        }\n        if (hasProp(arrayExtensions, name)) {\n            return arrayExtensions[name]\n        }\n        return target[name]\n    },\n    set(target, name, value): boolean {\n        const adm: ObservableArrayAdministration = target[$mobx]\n        if (name === \"length\") {\n            adm.setArrayLength_(value)\n        }\n        if (typeof name === \"symbol\" || isNaN(name)) {\n            target[name] = value\n        } else {\n            // numeric string\n            adm.set_(parseInt(name), value)\n        }\n        return true\n    },\n    preventExtensions() {\n        die(15)\n    }\n}\n\nexport class ObservableArrayAdministration\n    implements IInterceptable<IArrayWillChange<any> | IArrayWillSplice<any>>, IListenable\n{\n    atom_: IAtom\n    readonly values_: any[] = [] // this is the prop that gets proxied, so can't replace it!\n    interceptors_\n    changeListeners_\n    enhancer_: (newV: any, oldV: any | undefined) => any\n    dehancer: any\n    proxy_!: IObservableArray<any>\n    lastKnownLength_ = 0\n\n    constructor(\n        name = __DEV__ ? \"ObservableArray@\" + getNextId() : \"ObservableArray\",\n        enhancer: IEnhancer<any>,\n        public owned_: boolean\n    ) {\n        this.atom_ = new Atom(name)\n        this.enhancer_ = (newV, oldV) =>\n            enhancer(newV, oldV, __DEV__ ? name + \"[..]\" : \"ObservableArray[..]\")\n    }\n\n    dehanceValue_(value: any): any {\n        if (this.dehancer !== undefined) {\n            return this.dehancer(value)\n        }\n        return value\n    }\n\n    dehanceValues_(values: any[]): any[] {\n        if (this.dehancer !== undefined && values.length > 0) {\n            return values.map(this.dehancer) as any\n        }\n        return values\n    }\n\n    getArrayLength_(): number {\n        this.atom_.reportObserved()\n        return this.values_.length\n    }\n\n    setArrayLength_(newLength: number) {\n        if (typeof newLength !== \"number\" || isNaN(newLength) || newLength < 0) {\n            die(40, newLength)\n        }\n        let currentLength = this.values_.length\n        if (newLength === currentLength) {\n            return\n        } else if (newLength > currentLength) {\n            const newItems = Array.from({ length: newLength - currentLength })\n            this.spliceWithArray_(currentLength, 0, newItems)\n        } else {\n            this.spliceWithArray_(newLength, currentLength - newLength)\n        }\n    }\n\n    updateArrayLength_(oldLength: number, delta: number) {\n        if (oldLength !== this.lastKnownLength_) {\n            die(16)\n        }\n        this.lastKnownLength_ += delta\n    }\n\n    spliceWithArray_(index: number, deleteCount?: number, newItems?: any[]): any[] {\n        checkIfStateModificationsAreAllowed(this.atom_)\n        const length = this.values_.length\n\n        if (index === undefined) {\n            index = 0\n        } else if (index > length) {\n            index = length\n        } else if (index < 0) {\n            index = Math.max(0, length + index)\n        }\n\n        if (arguments.length === 1) {\n            deleteCount = length - index\n        } else if (deleteCount === undefined || deleteCount === null) {\n            deleteCount = 0\n        } else {\n            deleteCount = Math.max(0, Math.min(deleteCount, length - index))\n        }\n\n        if (newItems === undefined) {\n            newItems = EMPTY_ARRAY\n        }\n\n        if (hasInterceptors(this)) {\n            const change = interceptChange<IArrayWillSplice<any>>(this as any, {\n                object: this.proxy_ as any,\n                type: SPLICE,\n                index,\n                removedCount: deleteCount,\n                added: newItems\n            })\n            if (!change) {\n                return EMPTY_ARRAY\n            }\n            deleteCount = change.removedCount\n            newItems = change.added\n        }\n\n        newItems =\n            newItems.length === 0 ? newItems : newItems.map(v => this.enhancer_(v, undefined))\n        if (__DEV__) {\n            const lengthDelta = newItems.length - deleteCount\n            this.updateArrayLength_(length, lengthDelta) // checks if internal array wasn't modified\n        }\n        const res = this.spliceItemsIntoValues_(index, deleteCount, newItems)\n\n        if (deleteCount !== 0 || newItems.length !== 0) {\n            this.notifyArraySplice_(index, newItems, res)\n        }\n        return this.dehanceValues_(res)\n    }\n\n    spliceItemsIntoValues_(index: number, deleteCount: number, newItems: any[]): any[] {\n        if (newItems.length < MAX_SPLICE_SIZE) {\n            return this.values_.splice(index, deleteCount, ...newItems)\n        } else {\n            // The items removed by the splice\n            const res = this.values_.slice(index, index + deleteCount)\n            // The items that that should remain at the end of the array\n            let oldItems = this.values_.slice(index + deleteCount)\n            // New length is the previous length + addition count - deletion count\n            this.values_.length += newItems.length - deleteCount\n            for (let i = 0; i < newItems.length; i++) {\n                this.values_[index + i] = newItems[i]\n            }\n            for (let i = 0; i < oldItems.length; i++) {\n                this.values_[index + newItems.length + i] = oldItems[i]\n            }\n            return res\n        }\n    }\n\n    notifyArrayChildUpdate_(index: number, newValue: any, oldValue: any) {\n        const notifySpy = __DEV__ && !this.owned_ && isSpyEnabled()\n        const notify = hasListeners(this)\n        const change: IArrayDidChange | null =\n            notify || notifySpy\n                ? ({\n                      observableKind: \"array\",\n                      object: this.proxy_,\n                      type: UPDATE,\n                      debugObjectName: this.atom_.name_,\n                      index,\n                      newValue,\n                      oldValue\n                  } as const)\n                : null\n\n        // The reason why this is on right hand side here (and not above), is this way the uglifier will drop it, but it won't\n        // cause any runtime overhead in development mode without NODE_ENV set, unless spying is enabled\n        if (__DEV__ && notifySpy) {\n            spyReportStart(change!)\n        }\n        this.atom_.reportChanged()\n        if (notify) {\n            notifyListeners(this, change)\n        }\n        if (__DEV__ && notifySpy) {\n            spyReportEnd()\n        }\n    }\n\n    notifyArraySplice_(index: number, added: any[], removed: any[]) {\n        const notifySpy = __DEV__ && !this.owned_ && isSpyEnabled()\n        const notify = hasListeners(this)\n        const change: IArraySplice | null =\n            notify || notifySpy\n                ? ({\n                      observableKind: \"array\",\n                      object: this.proxy_,\n                      debugObjectName: this.atom_.name_,\n                      type: SPLICE,\n                      index,\n                      removed,\n                      added,\n                      removedCount: removed.length,\n                      addedCount: added.length\n                  } as const)\n                : null\n\n        if (__DEV__ && notifySpy) {\n            spyReportStart(change!)\n        }\n        this.atom_.reportChanged()\n        // conform: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/observe\n        if (notify) {\n            notifyListeners(this, change)\n        }\n        if (__DEV__ && notifySpy) {\n            spyReportEnd()\n        }\n    }\n\n    get_(index: number): any | undefined {\n        this.atom_.reportObserved()\n        return this.dehanceValue_(this.values_[index])\n    }\n\n    set_(index: number, newValue: any) {\n        const values = this.values_\n        if (index < values.length) {\n            // update at index in range\n            checkIfStateModificationsAreAllowed(this.atom_)\n            const oldValue = values[index]\n            if (hasInterceptors(this)) {\n                const change = interceptChange<IArrayWillChange<any>>(this as any, {\n                    type: UPDATE,\n                    object: this.proxy_ as any, // since \"this\" is the real array we need to pass its proxy\n                    index,\n                    newValue\n                })\n                if (!change) {\n                    return\n                }\n                newValue = change.newValue\n            }\n            newValue = this.enhancer_(newValue, oldValue)\n            const changed = newValue !== oldValue\n            if (changed) {\n                values[index] = newValue\n                this.notifyArrayChildUpdate_(index, newValue, oldValue)\n            }\n        } else {\n            // For out of bound index, we don't create an actual sparse array,\n            // but rather fill the holes with undefined (same as setArrayLength_).\n            // This could be considered a bug.\n            const newItems = Array.from({ length: index + 1 - values.length })\n            newItems[newItems.length - 1] = newValue\n            this.spliceWithArray_(values.length, 0, newItems)\n        }\n    }\n}\n\nexport function createObservableArray<T>(\n    initialValues: T[] | undefined,\n    enhancer: IEnhancer<T>,\n    name = __DEV__ ? \"ObservableArray@\" + getNextId() : \"ObservableArray\",\n    owned = false\n): IObservableArray<T> {\n    return initObservable(() => {\n        const adm = new ObservableArrayAdministration(name, enhancer, owned)\n        addHiddenFinalProp(adm.values_, $mobx, adm)\n        const proxy = new Proxy(adm.values_, arrayTraps) as any\n        adm.proxy_ = proxy\n        if (initialValues && initialValues.length) {\n            adm.spliceWithArray_(0, 0, initialValues)\n        }\n        return proxy\n    })\n}\n\n// eslint-disable-next-line\nexport var arrayExtensions = {\n    clear(): any[] {\n        return this.splice(0)\n    },\n\n    replace(newItems: any[]) {\n        const adm: ObservableArrayAdministration = this[$mobx]\n        return adm.spliceWithArray_(0, adm.values_.length, newItems)\n    },\n\n    // Used by JSON.stringify\n    toJSON(): any[] {\n        return this.slice()\n    },\n\n    /*\n     * functions that do alter the internal structure of the array, (based on lib.es6.d.ts)\n     * since these functions alter the inner structure of the array, the have side effects.\n     * Because the have side effects, they should not be used in computed function,\n     * and for that reason the do not call dependencyState.notifyObserved\n     */\n    splice(index: number, deleteCount?: number, ...newItems: any[]): any[] {\n        const adm: ObservableArrayAdministration = this[$mobx]\n        switch (arguments.length) {\n            case 0:\n                return []\n            case 1:\n                return adm.spliceWithArray_(index)\n            case 2:\n                return adm.spliceWithArray_(index, deleteCount)\n        }\n        return adm.spliceWithArray_(index, deleteCount, newItems)\n    },\n\n    spliceWithArray(index: number, deleteCount?: number, newItems?: any[]): any[] {\n        return (this[$mobx] as ObservableArrayAdministration).spliceWithArray_(\n            index,\n            deleteCount,\n            newItems\n        )\n    },\n\n    push(...items: any[]): number {\n        const adm: ObservableArrayAdministration = this[$mobx]\n        adm.spliceWithArray_(adm.values_.length, 0, items)\n        return adm.values_.length\n    },\n\n    pop() {\n        return this.splice(Math.max(this[$mobx].values_.length - 1, 0), 1)[0]\n    },\n\n    shift() {\n        return this.splice(0, 1)[0]\n    },\n\n    unshift(...items: any[]): number {\n        const adm: ObservableArrayAdministration = this[$mobx]\n        adm.spliceWithArray_(0, 0, items)\n        return adm.values_.length\n    },\n\n    reverse(): any[] {\n        // reverse by default mutates in place before returning the result\n        // which makes it both a 'derivation' and a 'mutation'.\n        if (globalState.trackingDerivation) {\n            die(37, \"reverse\")\n        }\n        this.replace(this.slice().reverse())\n        return this\n    },\n\n    sort(): any[] {\n        // sort by default mutates in place before returning the result\n        // which goes against all good practices. Let's not change the array in place!\n        if (globalState.trackingDerivation) {\n            die(37, \"sort\")\n        }\n        const copy = this.slice()\n        copy.sort.apply(copy, arguments)\n        this.replace(copy)\n        return this\n    },\n\n    remove(value: any): boolean {\n        const adm: ObservableArrayAdministration = this[$mobx]\n        const idx = adm.dehanceValues_(adm.values_).indexOf(value)\n        if (idx > -1) {\n            this.splice(idx, 1)\n            return true\n        }\n        return false\n    }\n}\n\n/**\n * Wrap function from prototype\n * Without this, everything works as well, but this works\n * faster as everything works on unproxied values\n */\naddArrayExtension(\"at\", simpleFunc)\naddArrayExtension(\"concat\", simpleFunc)\naddArrayExtension(\"flat\", simpleFunc)\naddArrayExtension(\"includes\", simpleFunc)\naddArrayExtension(\"indexOf\", simpleFunc)\naddArrayExtension(\"join\", simpleFunc)\naddArrayExtension(\"lastIndexOf\", simpleFunc)\naddArrayExtension(\"slice\", simpleFunc)\naddArrayExtension(\"toString\", simpleFunc)\naddArrayExtension(\"toLocaleString\", simpleFunc)\naddArrayExtension(\"toSorted\", simpleFunc)\naddArrayExtension(\"toSpliced\", simpleFunc)\naddArrayExtension(\"with\", simpleFunc)\n// map\naddArrayExtension(\"every\", mapLikeFunc)\naddArrayExtension(\"filter\", mapLikeFunc)\naddArrayExtension(\"find\", mapLikeFunc)\naddArrayExtension(\"findIndex\", mapLikeFunc)\naddArrayExtension(\"findLast\", mapLikeFunc)\naddArrayExtension(\"findLastIndex\", mapLikeFunc)\naddArrayExtension(\"flatMap\", mapLikeFunc)\naddArrayExtension(\"forEach\", mapLikeFunc)\naddArrayExtension(\"map\", mapLikeFunc)\naddArrayExtension(\"some\", mapLikeFunc)\naddArrayExtension(\"toReversed\", mapLikeFunc)\n// reduce\naddArrayExtension(\"reduce\", reduceLikeFunc)\naddArrayExtension(\"reduceRight\", reduceLikeFunc)\n\nfunction addArrayExtension(funcName, funcFactory) {\n    if (typeof Array.prototype[funcName] === \"function\") {\n        arrayExtensions[funcName] = funcFactory(funcName)\n    }\n}\n\n// Report and delegate to dehanced array\nfunction simpleFunc(funcName) {\n    return function () {\n        const adm: ObservableArrayAdministration = this[$mobx]\n        adm.atom_.reportObserved()\n        const dehancedValues = adm.dehanceValues_(adm.values_)\n        return dehancedValues[funcName].apply(dehancedValues, arguments)\n    }\n}\n\n// Make sure callbacks receive correct array arg #2326\nfunction mapLikeFunc(funcName) {\n    return function (callback, thisArg) {\n        const adm: ObservableArrayAdministration = this[$mobx]\n        adm.atom_.reportObserved()\n        const dehancedValues = adm.dehanceValues_(adm.values_)\n        return dehancedValues[funcName]((element, index) => {\n            return callback.call(thisArg, element, index, this)\n        })\n    }\n}\n\n// Make sure callbacks receive correct array arg #2326\nfunction reduceLikeFunc(funcName) {\n    return function () {\n        const adm: ObservableArrayAdministration = this[$mobx]\n        adm.atom_.reportObserved()\n        const dehancedValues = adm.dehanceValues_(adm.values_)\n        // #2432 - reduce behavior depends on arguments.length\n        const callback = arguments[0]\n        arguments[0] = (accumulator, currentValue, index) => {\n            return callback(accumulator, currentValue, index, this)\n        }\n        return dehancedValues[funcName].apply(dehancedValues, arguments)\n    }\n}\n\nconst isObservableArrayAdministration = createInstanceofPredicate(\n    \"ObservableArrayAdministration\",\n    ObservableArrayAdministration\n)\n\nexport function isObservableArray(thing): thing is IObservableArray<any> {\n    return isObject(thing) && isObservableArrayAdministration(thing[$mobx])\n}\n", "import {\n    $mobx,\n    IEnhancer,\n    IInterceptable,\n    IListenable,\n    ObservableValue,\n    checkIfStateModificationsAreAllowed,\n    createAtom,\n    createInstanceofPredicate,\n    makeIterable,\n    deepEnhancer,\n    getNextId,\n    getPlainObjectKeys,\n    hasInterceptors,\n    hasListeners,\n    interceptChange,\n    isES6Map,\n    isPlainES6Map,\n    isPlainObject,\n    isSpyEnabled,\n    notifyListeners,\n    referenceEnhancer,\n    spyReportEnd,\n    spyReportStart,\n    stringifyKey,\n    transaction,\n    untracked,\n    globalState,\n    die,\n    UPDATE,\n    IAtom,\n    PureSpyEvent,\n    initObservable\n} from \"../internal\"\n\nexport interface IKeyValueMap<V = any> {\n    [key: string]: V\n}\n\nexport type IMapEntry<K = any, V = any> = [K, V]\nexport type IReadonlyMapEntry<K = any, V = any> = readonly [K, V]\nexport type IMapEntries<K = any, V = any> = IMapEntry<K, V>[]\nexport type IReadonlyMapEntries<K = any, V = any> = readonly IReadonlyMapEntry<K, V>[]\n\nexport type IMapDidChange<K = any, V = any> = { observableKind: \"map\"; debugObjectName: string } & (\n    | {\n          object: ObservableMap<K, V>\n          name: K // actual the key or index, but this is based on the ancient .observe proposal for consistency\n          type: \"update\"\n          newValue: V\n          oldValue: V\n      }\n    | {\n          object: ObservableMap<K, V>\n          name: K\n          type: \"add\"\n          newValue: V\n      }\n    | {\n          object: ObservableMap<K, V>\n          name: K\n          type: \"delete\"\n          oldValue: V\n      }\n)\n\nexport interface IMapWillChange<K = any, V = any> {\n    object: ObservableMap<K, V>\n    type: \"update\" | \"add\" | \"delete\"\n    name: K\n    newValue?: V\n}\n\nconst ObservableMapMarker = {}\n\nexport const ADD = \"add\"\nexport const DELETE = \"delete\"\n\nexport type IObservableMapInitialValues<K = any, V = any> =\n    | IMapEntries<K, V>\n    | IReadonlyMapEntries<K, V>\n    | IKeyValueMap<V>\n    | Map<K, V>\n\n// just extend Map? See also https://gist.github.com/nestharus/13b4d74f2ef4a2f4357dbd3fc23c1e54\n// But: https://github.com/mobxjs/mobx/issues/1556\nexport class ObservableMap<K = any, V = any>\n    implements Map<K, V>, IInterceptable<IMapWillChange<K, V>>, IListenable\n{\n    [$mobx] = ObservableMapMarker\n    data_!: Map<K, ObservableValue<V>>\n    hasMap_!: Map<K, ObservableValue<boolean>> // hasMap, not hashMap >-).\n    keysAtom_!: IAtom\n    interceptors_\n    changeListeners_\n    dehancer: any\n\n    constructor(\n        initialData?: IObservableMapInitialValues<K, V>,\n        public enhancer_: IEnhancer<V> = deepEnhancer,\n        public name_ = __DEV__ ? \"ObservableMap@\" + getNextId() : \"ObservableMap\"\n    ) {\n        initObservable(() => {\n            this.keysAtom_ = createAtom(__DEV__ ? `${this.name_}.keys()` : \"ObservableMap.keys()\")\n            this.data_ = new Map()\n            this.hasMap_ = new Map()\n            if (initialData) {\n                this.merge(initialData)\n            }\n        })\n    }\n\n    private has_(key: K): boolean {\n        return this.data_.has(key)\n    }\n\n    has(key: K): boolean {\n        if (!globalState.trackingDerivation) {\n            return this.has_(key)\n        }\n\n        let entry = this.hasMap_.get(key)\n        if (!entry) {\n            const newEntry = (entry = new ObservableValue(\n                this.has_(key),\n                referenceEnhancer,\n                __DEV__ ? `${this.name_}.${stringifyKey(key)}?` : \"ObservableMap.key?\",\n                false\n            ))\n            this.hasMap_.set(key, newEntry)\n            newEntry.onBUOL = new Set([() => this.hasMap_.delete(key)])\n        }\n\n        return entry.get()\n    }\n\n    set(key: K, value: V) {\n        const hasKey = this.has_(key)\n        if (hasInterceptors(this)) {\n            const change = interceptChange<IMapWillChange<K, V>>(this, {\n                type: hasKey ? UPDATE : ADD,\n                object: this,\n                newValue: value,\n                name: key\n            })\n            if (!change) {\n                return this\n            }\n            value = change.newValue!\n        }\n        if (hasKey) {\n            this.updateValue_(key, value)\n        } else {\n            this.addValue_(key, value)\n        }\n        return this\n    }\n\n    delete(key: K): boolean {\n        checkIfStateModificationsAreAllowed(this.keysAtom_)\n        if (hasInterceptors(this)) {\n            const change = interceptChange<IMapWillChange<K, V>>(this, {\n                type: DELETE,\n                object: this,\n                name: key\n            })\n            if (!change) {\n                return false\n            }\n        }\n        if (this.has_(key)) {\n            const notifySpy = __DEV__ && isSpyEnabled()\n            const notify = hasListeners(this)\n            const change: IMapDidChange<K, V> | null =\n                notify || notifySpy\n                    ? {\n                          observableKind: \"map\",\n                          debugObjectName: this.name_,\n                          type: DELETE,\n                          object: this,\n                          oldValue: (<any>this.data_.get(key)).value_,\n                          name: key\n                      }\n                    : null\n\n            if (__DEV__ && notifySpy) {\n                spyReportStart(change! as PureSpyEvent)\n            } // TODO fix type\n            transaction(() => {\n                this.keysAtom_.reportChanged()\n                this.hasMap_.get(key)?.setNewValue_(false)\n                const observable = this.data_.get(key)!\n                observable.setNewValue_(undefined as any)\n                this.data_.delete(key)\n            })\n            if (notify) {\n                notifyListeners(this, change)\n            }\n            if (__DEV__ && notifySpy) {\n                spyReportEnd()\n            }\n            return true\n        }\n        return false\n    }\n\n    private updateValue_(key: K, newValue: V | undefined) {\n        const observable = this.data_.get(key)!\n        newValue = (observable as any).prepareNewValue_(newValue) as V\n        if (newValue !== globalState.UNCHANGED) {\n            const notifySpy = __DEV__ && isSpyEnabled()\n            const notify = hasListeners(this)\n            const change: IMapDidChange<K, V> | null =\n                notify || notifySpy\n                    ? {\n                          observableKind: \"map\",\n                          debugObjectName: this.name_,\n                          type: UPDATE,\n                          object: this,\n                          oldValue: (observable as any).value_,\n                          name: key,\n                          newValue\n                      }\n                    : null\n            if (__DEV__ && notifySpy) {\n                spyReportStart(change! as PureSpyEvent)\n            } // TODO fix type\n            observable.setNewValue_(newValue as V)\n            if (notify) {\n                notifyListeners(this, change)\n            }\n            if (__DEV__ && notifySpy) {\n                spyReportEnd()\n            }\n        }\n    }\n\n    private addValue_(key: K, newValue: V) {\n        checkIfStateModificationsAreAllowed(this.keysAtom_)\n        transaction(() => {\n            const observable = new ObservableValue(\n                newValue,\n                this.enhancer_,\n                __DEV__ ? `${this.name_}.${stringifyKey(key)}` : \"ObservableMap.key\",\n                false\n            )\n            this.data_.set(key, observable)\n            newValue = (observable as any).value_ // value might have been changed\n            this.hasMap_.get(key)?.setNewValue_(true)\n            this.keysAtom_.reportChanged()\n        })\n        const notifySpy = __DEV__ && isSpyEnabled()\n        const notify = hasListeners(this)\n        const change: IMapDidChange<K, V> | null =\n            notify || notifySpy\n                ? {\n                      observableKind: \"map\",\n                      debugObjectName: this.name_,\n                      type: ADD,\n                      object: this,\n                      name: key,\n                      newValue\n                  }\n                : null\n        if (__DEV__ && notifySpy) {\n            spyReportStart(change! as PureSpyEvent)\n        } // TODO fix type\n        if (notify) {\n            notifyListeners(this, change)\n        }\n        if (__DEV__ && notifySpy) {\n            spyReportEnd()\n        }\n    }\n\n    get(key: K): V | undefined {\n        if (this.has(key)) {\n            return this.dehanceValue_(this.data_.get(key)!.get())\n        }\n        return this.dehanceValue_(undefined)\n    }\n\n    getOrInsert(key: K, value: V): V {\n        if (!this.has(key)) {\n            this.set(key, value)\n        }\n        return this.get(key)!\n    }\n\n    getOrInsertComputed(key: K, callback: (key: K) => V): V {\n        if (!this.has(key)) {\n            this.set(key, callback(key))\n        }\n        return this.get(key)!\n    }\n\n    private dehanceValue_<X extends V | undefined>(value: X): X {\n        if (this.dehancer !== undefined) {\n            return this.dehancer(value)\n        }\n        return value\n    }\n\n    keys(): MapIterator<K> {\n        this.keysAtom_.reportObserved()\n        return this.data_.keys()\n    }\n\n    values(): MapIterator<V> {\n        const self = this\n        const keys = this.keys()\n        return makeIterableForMap({\n            next() {\n                const { done, value } = keys.next()\n                return {\n                    done,\n                    value: done ? (undefined as any) : self.get(value)\n                }\n            }\n        })\n    }\n\n    entries(): MapIterator<IMapEntry<K, V>> {\n        const self = this\n        const keys = this.keys()\n        return makeIterableForMap({\n            next() {\n                const { done, value } = keys.next()\n                return {\n                    done,\n                    value: done ? (undefined as any) : ([value, self.get(value)!] as [K, V])\n                }\n            }\n        })\n    }\n\n    [Symbol.iterator]() {\n        return this.entries()\n    }\n\n    forEach(callback: (value: V, key: K, object: Map<K, V>) => void, thisArg?) {\n        for (const [key, value] of this) {\n            callback.call(thisArg, value, key, this)\n        }\n    }\n\n    /** Merge another object into this object, returns this. */\n    merge(other?: IObservableMapInitialValues<K, V>): ObservableMap<K, V> {\n        if (isObservableMap(other)) {\n            other = new Map(other)\n        }\n        transaction(() => {\n            if (isPlainObject(other)) {\n                getPlainObjectKeys(other).forEach((key: any) =>\n                    this.set(key as K, (other as IKeyValueMap)[key])\n                )\n            } else if (Array.isArray(other)) {\n                other.forEach(([key, value]) => this.set(key, value))\n            } else if (isES6Map(other)) {\n                if (!isPlainES6Map(other)) {\n                    die(19, other)\n                }\n                other.forEach((value, key) => this.set(key, value))\n            } else if (other !== null && other !== undefined) {\n                die(20, other)\n            }\n        })\n        return this\n    }\n\n    clear() {\n        transaction(() => {\n            untracked(() => {\n                for (const key of this.keys()) {\n                    this.delete(key)\n                }\n            })\n        })\n    }\n\n    replace(values: IObservableMapInitialValues<K, V>): ObservableMap<K, V> {\n        // Implementation requirements:\n        // - respect ordering of replacement map\n        // - allow interceptors to run and potentially prevent individual operations\n        // - don't recreate observables that already exist in original map (so we don't destroy existing subscriptions)\n        // - don't _keysAtom.reportChanged if the keys of resulting map are indentical (order matters!)\n        // - note that result map may differ from replacement map due to the interceptors\n        transaction(() => {\n            // Convert to map so we can do quick key lookups\n            const replacementMap = convertToMap(values)\n            const orderedData = new Map()\n            // Used for optimization\n            let keysReportChangedCalled = false\n            // Delete keys that don't exist in replacement map\n            // if the key deletion is prevented by interceptor\n            // add entry at the beginning of the result map\n            for (const key of this.data_.keys()) {\n                // Concurrently iterating/deleting keys\n                // iterator should handle this correctly\n                if (!replacementMap.has(key)) {\n                    const deleted = this.delete(key)\n                    // Was the key removed?\n                    if (deleted) {\n                        // _keysAtom.reportChanged() was already called\n                        keysReportChangedCalled = true\n                    } else {\n                        // Delete prevented by interceptor\n                        const value = this.data_.get(key)\n                        orderedData.set(key, value)\n                    }\n                }\n            }\n            // Merge entries\n            for (const [key, value] of replacementMap.entries()) {\n                // We will want to know whether a new key is added\n                const keyExisted = this.data_.has(key)\n                // Add or update value\n                this.set(key, value)\n                // The addition could have been prevent by interceptor\n                if (this.data_.has(key)) {\n                    // The update could have been prevented by interceptor\n                    // and also we want to preserve existing values\n                    // so use value from _data map (instead of replacement map)\n                    const value = this.data_.get(key)\n                    orderedData.set(key, value)\n                    // Was a new key added?\n                    if (!keyExisted) {\n                        // _keysAtom.reportChanged() was already called\n                        keysReportChangedCalled = true\n                    }\n                }\n            }\n            // Check for possible key order change\n            if (!keysReportChangedCalled) {\n                if (this.data_.size !== orderedData.size) {\n                    // If size differs, keys are definitely modified\n                    this.keysAtom_.reportChanged()\n                } else {\n                    const iter1 = this.data_.keys()\n                    const iter2 = orderedData.keys()\n                    let next1 = iter1.next()\n                    let next2 = iter2.next()\n                    while (!next1.done) {\n                        if (next1.value !== next2.value) {\n                            this.keysAtom_.reportChanged()\n                            break\n                        }\n                        next1 = iter1.next()\n                        next2 = iter2.next()\n                    }\n                }\n            }\n            // Use correctly ordered map\n            this.data_ = orderedData\n        })\n        return this\n    }\n\n    get size(): number {\n        this.keysAtom_.reportObserved()\n        return this.data_.size\n    }\n\n    toString(): string {\n        return \"[object ObservableMap]\"\n    }\n\n    toJSON(): [K, V][] {\n        return Array.from(this)\n    }\n\n    get [Symbol.toStringTag]() {\n        return \"Map\"\n    }\n}\n\n// eslint-disable-next-line\nexport var isObservableMap = createInstanceofPredicate(\"ObservableMap\", ObservableMap) as (\n    thing: any\n) => thing is ObservableMap<any, any>\n\nfunction makeIterableForMap<T>(iterator: Iterator<T>): MapIterator<T> {\n    iterator[Symbol.toStringTag] = \"MapIterator\"\n    return makeIterable<T, BuiltinIteratorReturn>(iterator)\n}\n\nfunction convertToMap(dataStructure: any): Map<any, any> {\n    if (isES6Map(dataStructure) || isObservableMap(dataStructure)) {\n        return dataStructure\n    } else if (Array.isArray(dataStructure)) {\n        return new Map(dataStructure)\n    } else if (isPlainObject(dataStructure)) {\n        const map = new Map()\n        for (const key in dataStructure) {\n            map.set(key, dataStructure[key])\n        }\n        return map\n    } else {\n        return die(21, dataStructure)\n    }\n}\n", "import {\n    $mobx,\n    createAtom,\n    deepEnhancer,\n    getNextId,\n    IEnhancer,\n    isSpyEnabled,\n    hasListeners,\n    IListenable,\n    spyReportStart,\n    notifyListeners,\n    spyReportEnd,\n    createInstanceofPredicate,\n    makeIterable,\n    hasInterceptors,\n    interceptChange,\n    IInterceptable,\n    checkIfStateModificationsAreAllowed,\n    untracked,\n    transaction,\n    isES6Set,\n    IAtom,\n    DELETE,\n    ADD,\n    die,\n    initObservable\n} from \"../internal\"\n\nconst ObservableSetMarker = {}\n\nexport type IObservableSetInitialValues<T> = Set<T> | readonly T[]\n\nexport type ISetDidChange<T = any> =\n    | {\n          object: ObservableSet<T>\n          observableKind: \"set\"\n          debugObjectName: string\n          type: \"add\"\n          newValue: T\n      }\n    | {\n          object: ObservableSet<T>\n          observableKind: \"set\"\n          debugObjectName: string\n          type: \"delete\"\n          oldValue: T\n      }\n\nexport type ISetWillDeleteChange<T = any> = {\n    type: \"delete\"\n    object: ObservableSet<T>\n    oldValue: T\n}\nexport type ISetWillAddChange<T = any> = {\n    type: \"add\"\n    object: ObservableSet<T>\n    newValue: T\n}\n\nexport type ISetWillChange<T = any> = ISetWillDeleteChange<T> | ISetWillAddChange<T>\n\nexport class ObservableSet<T = any> implements Set<T>, IInterceptable<ISetWillChange>, IListenable {\n    [$mobx] = ObservableSetMarker\n    private data_: Set<any> = new Set()\n    atom_!: IAtom\n    changeListeners_\n    interceptors_\n    dehancer: any\n    enhancer_: (newV: any, oldV: any | undefined) => any\n\n    constructor(\n        initialData?: IObservableSetInitialValues<T>,\n        enhancer: IEnhancer<T> = deepEnhancer,\n        public name_ = __DEV__ ? \"ObservableSet@\" + getNextId() : \"ObservableSet\"\n    ) {\n        this.enhancer_ = (newV, oldV) => enhancer(newV, oldV, name_)\n        initObservable(() => {\n            this.atom_ = createAtom(this.name_)\n            if (initialData) {\n                this.replace(initialData)\n            }\n        })\n    }\n\n    private dehanceValue_<X extends T | undefined>(value: X): X {\n        if (this.dehancer !== undefined) {\n            return this.dehancer(value)\n        }\n        return value\n    }\n\n    clear() {\n        transaction(() => {\n            untracked(() => {\n                for (const value of this.data_.values()) {\n                    this.delete(value)\n                }\n            })\n        })\n    }\n\n    forEach(callbackFn: (value: T, value2: T, set: Set<T>) => void, thisArg?: any) {\n        for (const value of this) {\n            callbackFn.call(thisArg, value, value, this)\n        }\n    }\n\n    get size() {\n        this.atom_.reportObserved()\n        return this.data_.size\n    }\n\n    add(value: T) {\n        checkIfStateModificationsAreAllowed(this.atom_)\n        if (hasInterceptors(this)) {\n            const change = interceptChange<ISetWillAddChange<T>>(this, {\n                type: ADD,\n                object: this,\n                newValue: value\n            })\n            if (!change) {\n                return this\n            }\n\n            // implemented reassignment same as it's done for ObservableMap\n            value = change.newValue!\n        }\n        if (!this.has(value)) {\n            transaction(() => {\n                this.data_.add(this.enhancer_(value, undefined))\n                this.atom_.reportChanged()\n            })\n            const notifySpy = __DEV__ && isSpyEnabled()\n            const notify = hasListeners(this)\n            const change =\n                notify || notifySpy\n                    ? <ISetDidChange<T>>{\n                          observableKind: \"set\",\n                          debugObjectName: this.name_,\n                          type: ADD,\n                          object: this,\n                          newValue: value\n                      }\n                    : null\n            if (notifySpy && __DEV__) {\n                spyReportStart(change!)\n            }\n            if (notify) {\n                notifyListeners(this, change)\n            }\n            if (notifySpy && __DEV__) {\n                spyReportEnd()\n            }\n        }\n\n        return this\n    }\n\n    delete(value: T) {\n        if (hasInterceptors(this)) {\n            const change = interceptChange<ISetWillDeleteChange<T>>(this, {\n                type: DELETE,\n                object: this,\n                oldValue: value\n            })\n            if (!change) {\n                return false\n            }\n        }\n        if (this.has(value)) {\n            const notifySpy = __DEV__ && isSpyEnabled()\n            const notify = hasListeners(this)\n            const change =\n                notify || notifySpy\n                    ? <ISetDidChange<T>>{\n                          observableKind: \"set\",\n                          debugObjectName: this.name_,\n                          type: DELETE,\n                          object: this,\n                          oldValue: value\n                      }\n                    : null\n\n            if (notifySpy && __DEV__) {\n                spyReportStart(change!)\n            }\n            transaction(() => {\n                this.atom_.reportChanged()\n                this.data_.delete(value)\n            })\n            if (notify) {\n                notifyListeners(this, change)\n            }\n            if (notifySpy && __DEV__) {\n                spyReportEnd()\n            }\n            return true\n        }\n        return false\n    }\n\n    has(value: T) {\n        this.atom_.reportObserved()\n        return this.data_.has(this.dehanceValue_(value))\n    }\n\n    entries() {\n        const values = this.values()\n        return makeIterableForSet<[T, T]>({\n            next() {\n                const { value, done } = values.next()\n                return !done ? { value: [value, value], done } : { value: undefined, done }\n            }\n        })\n    }\n\n    keys(): SetIterator<T> {\n        return this.values()\n    }\n\n    values(): SetIterator<T> {\n        this.atom_.reportObserved()\n        const self = this\n        const values = this.data_.values()\n        return makeIterableForSet({\n            next() {\n                const { value, done } = values.next()\n                return !done\n                    ? { value: self.dehanceValue_(value), done }\n                    : { value: undefined, done }\n            }\n        })\n    }\n\n    intersection<U>(otherSet: ReadonlySetLike<U> | Set<U>): Set<T & U> {\n        return new Set(this).intersection(otherSet)\n    }\n\n    union<U>(otherSet: ReadonlySetLike<U> | Set<U>): Set<T | U> {\n        return new Set(this).union(otherSet)\n    }\n\n    difference<U>(otherSet: ReadonlySetLike<U>): Set<T> {\n        return new Set(this).difference(otherSet)\n    }\n\n    symmetricDifference<U>(otherSet: ReadonlySetLike<U> | Set<U>): Set<T | U> {\n        return new Set(this).symmetricDifference(otherSet)\n    }\n\n    isSubsetOf(otherSet: ReadonlySetLike<unknown>): boolean {\n        return new Set(this).isSubsetOf(otherSet)\n    }\n\n    isSupersetOf(otherSet: ReadonlySetLike<unknown>): boolean {\n        return new Set(this).isSupersetOf(otherSet)\n    }\n\n    isDisjointFrom(otherSet: ReadonlySetLike<unknown> | Set<unknown>): boolean {\n        return new Set(this).isDisjointFrom(otherSet)\n    }\n\n    replace(other: ObservableSet<T> | IObservableSetInitialValues<T>): ObservableSet<T> {\n        if (isObservableSet(other)) {\n            other = new Set(other)\n        }\n\n        if (Array.isArray(other) || isES6Set(other)) {\n            // Only emit `delete`/`add` events (and `reportChanged`) for values that\n            // actually change, instead of clearing and re-adding everything. `add` and\n            // `delete` are already no-ops for values that are respectively already\n            // present or already absent, so we just need to avoid deleting values that\n            // are part of the replacement. See #3761.\n            transaction(() => {\n                // Collect the desired values for quick lookup. `other` is already a Set\n                // here when it was passed (or snapshotted from an observable set) as one,\n                // so reuse it rather than allocating another; arrays are wrapped (which\n                // also dedupes them).\n                const replacementValues: Set<T> = isES6Set(other)\n                    ? other\n                    : new Set<T>(other as Iterable<T>)\n                // Short-circuit the trivial cases: an empty replacement is just a clear,\n                // and replacing into an empty set only needs the adds.\n                if (replacementValues.size === 0) {\n                    this.clear()\n                    return\n                }\n                if (this.data_.size === 0) {\n                    replacementValues.forEach(value => this.add(value))\n                    return\n                }\n                // Delete values that are not part of the replacement.\n                for (const value of this.data_.values()) {\n                    if (!replacementValues.has(this.dehanceValue_(value))) {\n                        this.delete(value)\n                    }\n                }\n                // Add new values; values that are already present are a no-op.\n                replacementValues.forEach(value => this.add(value))\n            })\n        } else if (other !== null && other !== undefined) {\n            die(41, other)\n        }\n\n        return this\n    }\n    toJSON(): T[] {\n        return Array.from(this)\n    }\n\n    toString(): string {\n        return \"[object ObservableSet]\"\n    }\n\n    [Symbol.iterator]() {\n        return this.values()\n    }\n\n    get [Symbol.toStringTag]() {\n        return \"Set\"\n    }\n}\n\n// eslint-disable-next-line\nexport var isObservableSet = createInstanceofPredicate(\"ObservableSet\", ObservableSet) as (\n    thing: any\n) => thing is ObservableSet<any>\n\nfunction makeIterableForSet<T>(iterator: Iterator<T>): SetIterator<T> {\n    iterator[Symbol.toStringTag] = \"SetIterator\"\n    return makeIterable<T, BuiltinIteratorReturn>(iterator)\n}\n", "import {\n    CreateObservableOptions,\n    getAnnotationFromOptions,\n    propagateChanged,\n    isAnnotation,\n    $mobx,\n    Atom,\n    Annotation,\n    ComputedValue,\n    IAtom,\n    IComputedValueOptions,\n    IEnhancer,\n    IInterceptable,\n    IListenable,\n    ObservableValue,\n    addHiddenProp,\n    createInstanceofPredicate,\n    endBatch,\n    getNextId,\n    hasInterceptors,\n    hasListeners,\n    interceptChange,\n    isObject,\n    isPlainObject,\n    isSpyEnabled,\n    notifyListeners,\n    referenceEnhancer,\n    spyReportEnd,\n    spyReportStart,\n    startBatch,\n    stringifyKey,\n    globalState,\n    ADD,\n    UPDATE,\n    die,\n    hasProp,\n    getDescriptor,\n    ownKeys,\n    isOverride,\n    defineProperty,\n    autoAnnotation,\n    getAdministration,\n    getDebugName,\n    checkIfStateModificationsAreAllowed,\n    assign\n} from \"../internal\"\n\nconst descriptorCache = Object.create(null)\n\nexport type IObjectDidChange<T = any> = {\n    observableKind: \"object\"\n    name: PropertyKey\n    object: T\n    debugObjectName: string\n} & (\n    | {\n          type: \"add\"\n          newValue: any\n      }\n    | {\n          type: \"update\"\n          oldValue: any\n          newValue: any\n      }\n    | {\n          type: \"remove\"\n          oldValue: any\n      }\n)\n\nexport type IObjectWillChange<T = any> =\n    | {\n          object: T\n          type: \"update\" | \"add\"\n          name: PropertyKey\n          newValue: any\n      }\n    | {\n          object: T\n          type: \"remove\"\n          name: PropertyKey\n      }\n\nconst REMOVE = \"remove\"\n\nexport class ObservableObjectAdministration\n    implements IInterceptable<IObjectWillChange>, IListenable\n{\n    keysAtom_: IAtom\n    changeListeners_\n    interceptors_\n    proxy_: any\n    isPlainObject_: boolean\n    appliedAnnotations_?: object\n    private pendingKeys_: undefined | Map<PropertyKey, ObservableValue<boolean>>\n    lazyComputedKeys_: undefined | Map<PropertyKey, () => ComputedValue<any>>\n    lazyObservableKeys_: undefined | Map<PropertyKey, () => ObservableValue<any>>\n\n    constructor(\n        public target_: any,\n        public values_ = new Map<PropertyKey, ObservableValue<any> | ComputedValue<any>>(),\n        public name_: string,\n        // Used anytime annotation is not explicitely provided\n        public defaultAnnotation_: Annotation = autoAnnotation\n    ) {\n        this.keysAtom_ = new Atom(__DEV__ ? `${this.name_}.keys` : \"ObservableObject.keys\")\n        // Optimization: we use this frequently\n        this.isPlainObject_ = isPlainObject(this.target_)\n        if (__DEV__ && !isAnnotation(this.defaultAnnotation_)) {\n            die(`defaultAnnotation must be valid annotation`)\n        }\n        if (__DEV__) {\n            // Prepare structure for tracking which fields were already annotated\n            this.appliedAnnotations_ = {}\n        }\n    }\n\n    getObservablePropValue_(key: PropertyKey): any {\n        // Hot path: single map lookup. Lazy entries (rare) take the materialise branch.\n        const observable =\n            this.values_.get(key) ??\n            this.materializeLazyComputed_(key) ??\n            this.materializeLazyObservable_(key)\n        return observable!.get()\n    }\n\n    materializeLazyComputed_(key: PropertyKey): ComputedValue<any> | undefined {\n        const factory = this.lazyComputedKeys_?.get(key)\n        if (!factory) {\n            return undefined\n        }\n        this.lazyComputedKeys_!.delete(key)\n        if (this.lazyComputedKeys_!.size === 0) {\n            this.lazyComputedKeys_ = undefined\n        }\n        const computed = factory()\n        this.values_.set(key, computed)\n        return computed\n    }\n\n    materializeLazyObservable_(key: PropertyKey): ObservableValue<any> | undefined {\n        const factory = this.lazyObservableKeys_?.get(key)\n        if (!factory) {\n            return undefined\n        }\n        this.lazyObservableKeys_!.delete(key)\n        if (this.lazyObservableKeys_!.size === 0) {\n            this.lazyObservableKeys_ = undefined\n        }\n        const observable = factory()\n        this.values_.set(key, observable)\n        return observable\n    }\n\n    setObservablePropValue_(key: PropertyKey, newValue): boolean | null {\n        const observable =\n            this.values_.get(key) ??\n            this.materializeLazyComputed_(key) ??\n            this.materializeLazyObservable_(key)\n        if (observable instanceof ComputedValue) {\n            observable.set(newValue)\n            return true\n        }\n\n        // intercept\n        if (hasInterceptors(this)) {\n            const change = interceptChange<IObjectWillChange>(this, {\n                type: UPDATE,\n                object: this.proxy_ || this.target_,\n                name: key,\n                newValue\n            })\n            if (!change) {\n                return null\n            }\n            newValue = (change as any).newValue\n        }\n        newValue = (observable as any).prepareNewValue_(newValue)\n\n        // notify spy & observers\n        if (newValue !== globalState.UNCHANGED) {\n            const notify = hasListeners(this)\n            const notifySpy = __DEV__ && isSpyEnabled()\n            const change: IObjectDidChange | null =\n                notify || notifySpy\n                    ? {\n                          type: UPDATE,\n                          observableKind: \"object\",\n                          debugObjectName: this.name_,\n                          object: this.proxy_ || this.target_,\n                          oldValue: (observable as any).value_,\n                          name: key,\n                          newValue\n                      }\n                    : null\n\n            if (__DEV__ && notifySpy) {\n                spyReportStart(change!)\n            }\n            ;(observable as ObservableValue<any>).setNewValue_(newValue)\n            if (notify) {\n                notifyListeners(this, change)\n            }\n            if (__DEV__ && notifySpy) {\n                spyReportEnd()\n            }\n        }\n        return true\n    }\n\n    get_(key: PropertyKey): any {\n        if (globalState.trackingDerivation && !hasProp(this.target_, key)) {\n            // Key doesn't exist yet, subscribe for it in case it's added later\n            this.has_(key)\n        }\n        return this.target_[key]\n    }\n\n    /**\n     * @param {PropertyKey} key\n     * @param {any} value\n     * @param {Annotation|boolean} annotation true - use default annotation, false - copy as is\n     * @param {boolean} proxyTrap whether it's called from proxy trap\n     * @returns {boolean|null} true on success, false on failure (proxyTrap + non-configurable), null when cancelled by interceptor\n     */\n    set_(key: PropertyKey, value: any, proxyTrap: boolean = false): boolean | null {\n        // Don't use .has(key) - we care about own\n        if (hasProp(this.target_, key)) {\n            // Existing prop\n            if (this.values_.has(key)) {\n                // Observable (can be intercepted)\n                return this.setObservablePropValue_(key, value)\n            } else if (proxyTrap) {\n                // Non-observable - proxy\n                return Reflect.set(this.target_, key, value)\n            } else {\n                // Non-observable\n                this.target_[key] = value\n                return true\n            }\n        } else {\n            // New prop\n            return this.extend_(\n                key,\n                { value, enumerable: true, writable: true, configurable: true },\n                this.defaultAnnotation_,\n                proxyTrap\n            )\n        }\n    }\n\n    // Trap for \"in\"\n    has_(key: PropertyKey): boolean {\n        if (!globalState.trackingDerivation) {\n            // Skip key subscription outside derivation\n            return key in this.target_\n        }\n        this.pendingKeys_ ||= new Map()\n        let entry = this.pendingKeys_.get(key)\n        if (!entry) {\n            entry = new ObservableValue(\n                key in this.target_,\n                referenceEnhancer,\n                __DEV__ ? `${this.name_}.${stringifyKey(key)}?` : \"ObservableObject.key?\",\n                false\n            )\n            this.pendingKeys_.set(key, entry)\n        }\n        return entry.get()\n    }\n\n    /**\n     * @param {PropertyKey} key\n     * @param {PropertyDescriptor} descriptor\n     * @param {Annotation|boolean} annotation true - use default annotation, false - copy as is\n     * @param {boolean} proxyTrap whether it's called from proxy trap\n     * @returns {boolean|null} true on success, false on failure (proxyTrap + non-configurable), null when cancelled by interceptor\n     */\n    extend_(\n        key: PropertyKey,\n        descriptor: PropertyDescriptor,\n        annotation: Annotation | boolean,\n        proxyTrap: boolean = false\n    ): boolean | null {\n        if (annotation === true) {\n            annotation = this.defaultAnnotation_\n        }\n        if (annotation === false) {\n            return this.defineProperty_(key, descriptor, proxyTrap)\n        }\n        assertAnnotable(this, annotation, key)\n        const outcome = annotation.extend_(this, key, descriptor, proxyTrap)\n        if (outcome) {\n            recordAnnotationApplied(this, annotation, key)\n        }\n        return outcome\n    }\n\n    /**\n     * @param {PropertyKey} key\n     * @param {PropertyDescriptor} descriptor\n     * @param {boolean} proxyTrap whether it's called from proxy trap\n     * @returns {boolean|null} true on success, false on failure (proxyTrap + non-configurable), null when cancelled by interceptor\n     */\n    defineProperty_(\n        key: PropertyKey,\n        descriptor: PropertyDescriptor,\n        proxyTrap: boolean = false\n    ): boolean | null {\n        checkIfStateModificationsAreAllowed(this.keysAtom_)\n        try {\n            startBatch()\n\n            // Delete\n            const deleteOutcome = this.delete_(key)\n            if (!deleteOutcome) {\n                // Failure or intercepted\n                return deleteOutcome\n            }\n\n            // ADD interceptor\n            if (hasInterceptors(this)) {\n                const change = interceptChange<IObjectWillChange>(this, {\n                    object: this.proxy_ || this.target_,\n                    name: key,\n                    type: ADD,\n                    newValue: descriptor.value\n                })\n                if (!change) {\n                    return null\n                }\n                const { newValue } = change as any\n                if (descriptor.value !== newValue) {\n                    descriptor = assign({}, descriptor, {\n                        value: newValue\n                    })\n                }\n            }\n\n            // Define\n            if (proxyTrap) {\n                if (!Reflect.defineProperty(this.target_, key, descriptor)) {\n                    return false\n                }\n            } else {\n                defineProperty(this.target_, key, descriptor)\n            }\n\n            // Notify\n            this.notifyPropertyAddition_(key, descriptor.value)\n        } finally {\n            endBatch()\n        }\n        return true\n    }\n\n    // If original descriptor becomes relevant, move this to annotation directly\n    defineObservableProperty_(\n        key: PropertyKey,\n        value: any,\n        enhancer: IEnhancer<any>,\n        proxyTrap: boolean = false\n    ): boolean | null {\n        checkIfStateModificationsAreAllowed(this.keysAtom_)\n        try {\n            startBatch()\n\n            // Delete\n            const deleteOutcome = this.delete_(key)\n            if (!deleteOutcome) {\n                // Failure or intercepted\n                return deleteOutcome\n            }\n\n            // ADD interceptor\n            if (hasInterceptors(this)) {\n                const change = interceptChange<IObjectWillChange>(this, {\n                    object: this.proxy_ || this.target_,\n                    name: key,\n                    type: ADD,\n                    newValue: value\n                })\n                if (!change) {\n                    return null\n                }\n                value = (change as any).newValue\n            }\n\n            const cachedDescriptor = getCachedObservablePropDescriptor(key)\n            const descriptor = {\n                configurable: globalState.safeDescriptors ? this.isPlainObject_ : true,\n                enumerable: true,\n                get: cachedDescriptor.get,\n                set: cachedDescriptor.set\n            }\n\n            // Define\n            if (proxyTrap) {\n                if (!Reflect.defineProperty(this.target_, key, descriptor)) {\n                    return false\n                }\n            } else {\n                defineProperty(this.target_, key, descriptor)\n            }\n\n            const observable = new ObservableValue(\n                value,\n                enhancer,\n                __DEV__ ? `${this.name_}.${key.toString()}` : \"ObservableObject.key\",\n                false\n            )\n\n            this.values_.set(key, observable)\n\n            // Notify (value possibly changed by ObservableValue)\n            this.notifyPropertyAddition_(key, observable.value_)\n        } finally {\n            endBatch()\n        }\n        return true\n    }\n\n    // If original descriptor becomes relevant, move this to annotation directly\n    defineComputedProperty_(\n        key: PropertyKey,\n        options: IComputedValueOptions<any>,\n        proxyTrap: boolean = false\n    ): boolean | null {\n        checkIfStateModificationsAreAllowed(this.keysAtom_)\n        try {\n            startBatch()\n\n            // Delete\n            const deleteOutcome = this.delete_(key)\n            if (!deleteOutcome) {\n                // Failure or intercepted\n                return deleteOutcome\n            }\n\n            // ADD interceptor\n            if (hasInterceptors(this)) {\n                const change = interceptChange<IObjectWillChange>(this, {\n                    object: this.proxy_ || this.target_,\n                    name: key,\n                    type: ADD,\n                    newValue: undefined\n                })\n                if (!change) {\n                    return null\n                }\n            }\n            options.name ||= __DEV__ ? `${this.name_}.${key.toString()}` : \"ObservableObject.key\"\n            options.context = this.proxy_ || this.target_\n            const cachedDescriptor = getCachedObservablePropDescriptor(key)\n            const descriptor = {\n                configurable: globalState.safeDescriptors ? this.isPlainObject_ : true,\n                enumerable: false,\n                get: cachedDescriptor.get,\n                set: cachedDescriptor.set\n            }\n\n            // Define\n            if (proxyTrap) {\n                if (!Reflect.defineProperty(this.target_, key, descriptor)) {\n                    return false\n                }\n            } else {\n                defineProperty(this.target_, key, descriptor)\n            }\n\n            this.values_.set(key, new ComputedValue(options))\n\n            // Notify\n            this.notifyPropertyAddition_(key, undefined)\n        } finally {\n            endBatch()\n        }\n        return true\n    }\n\n    /**\n     * @param {PropertyKey} key\n     * @param {PropertyDescriptor} descriptor\n     * @param {boolean} proxyTrap whether it's called from proxy trap\n     * @returns {boolean|null} true on success, false on failure (proxyTrap + non-configurable), null when cancelled by interceptor\n     */\n    delete_(key: PropertyKey, proxyTrap: boolean = false): boolean | null {\n        checkIfStateModificationsAreAllowed(this.keysAtom_)\n        // No such prop\n        if (!hasProp(this.target_, key)) {\n            return true\n        }\n\n        // Intercept\n        if (hasInterceptors(this)) {\n            const change = interceptChange<IObjectWillChange>(this, {\n                object: this.proxy_ || this.target_,\n                name: key,\n                type: REMOVE\n            })\n            // Cancelled\n            if (!change) {\n                return null\n            }\n        }\n\n        // Delete\n        try {\n            startBatch()\n            const notify = hasListeners(this)\n            const notifySpy = __DEV__ && isSpyEnabled()\n            const observable = this.values_.get(key)\n            // Value needed for spies/listeners\n            let value = undefined\n            // Optimization: don't pull the value unless we will need it\n            if (!observable && (notify || notifySpy)) {\n                value = getDescriptor(this.target_, key)?.value\n            }\n            // delete prop (do first, may fail)\n            if (proxyTrap) {\n                if (!Reflect.deleteProperty(this.target_, key)) {\n                    return false\n                }\n            } else {\n                delete this.target_[key]\n            }\n            // Allow re-annotating this field\n            if (__DEV__) {\n                delete this.appliedAnnotations_![key]\n            }\n            // Clear observable\n            if (observable) {\n                this.values_.delete(key)\n                // for computed, value is undefined\n                if (observable instanceof ObservableValue) {\n                    value = observable.value_\n                }\n                // Notify: autorun(() => obj[key]), see #1796\n                propagateChanged(observable)\n            }\n            // Notify \"keys/entries/values\" observers\n            this.keysAtom_.reportChanged()\n\n            // Notify \"has\" observers\n            // \"in\" as it may still exist in proto\n            this.pendingKeys_?.get(key)?.set(key in this.target_)\n\n            // Notify spies/listeners\n            if (notify || notifySpy) {\n                const change: IObjectDidChange = {\n                    type: REMOVE,\n                    observableKind: \"object\",\n                    object: this.proxy_ || this.target_,\n                    debugObjectName: this.name_,\n                    oldValue: value,\n                    name: key\n                }\n                if (__DEV__ && notifySpy) {\n                    spyReportStart(change!)\n                }\n                if (notify) {\n                    notifyListeners(this, change)\n                }\n                if (__DEV__ && notifySpy) {\n                    spyReportEnd()\n                }\n            }\n        } finally {\n            endBatch()\n        }\n        return true\n    }\n\n    notifyPropertyAddition_(key: PropertyKey, value: any) {\n        const notify = hasListeners(this)\n        const notifySpy = __DEV__ && isSpyEnabled()\n        if (notify || notifySpy) {\n            const change: IObjectDidChange | null =\n                notify || notifySpy\n                    ? ({\n                          type: ADD,\n                          observableKind: \"object\",\n                          debugObjectName: this.name_,\n                          object: this.proxy_ || this.target_,\n                          name: key,\n                          newValue: value\n                      } as const)\n                    : null\n\n            if (__DEV__ && notifySpy) {\n                spyReportStart(change!)\n            }\n            if (notify) {\n                notifyListeners(this, change)\n            }\n            if (__DEV__ && notifySpy) {\n                spyReportEnd()\n            }\n        }\n\n        this.pendingKeys_?.get(key)?.set(true)\n\n        // Notify \"keys/entries/values\" observers\n        this.keysAtom_.reportChanged()\n    }\n\n    ownKeys_(): Array<string | symbol> {\n        this.keysAtom_.reportObserved()\n        return ownKeys(this.target_)\n    }\n\n    keys_(): PropertyKey[] {\n        // Returns enumerable && own, but unfortunately keysAtom will report on ANY key change.\n        // There is no way to distinguish between Object.keys(object) and Reflect.ownKeys(object) - both are handled by ownKeys trap.\n        // We can either over-report in Object.keys(object) or under-report in Reflect.ownKeys(object)\n        // We choose to over-report in Object.keys(object), because:\n        // - typically it's used with simple data objects\n        // - when symbolic/non-enumerable keys are relevant Reflect.ownKeys works as expected\n        this.keysAtom_.reportObserved()\n        return Object.keys(this.target_)\n    }\n}\n\nexport interface IIsObservableObject {\n    [$mobx]: ObservableObjectAdministration\n}\n\nexport function asObservableObject(\n    target: any,\n    options?: CreateObservableOptions\n): IIsObservableObject {\n    if (__DEV__ && options && isObservableObject(target)) {\n        die(`Options can't be provided for already observable objects.`)\n    }\n\n    if (hasProp(target, $mobx)) {\n        if (__DEV__ && !(getAdministration(target) instanceof ObservableObjectAdministration)) {\n            die(\n                `Cannot convert '${getDebugName(target)}' into observable object:` +\n                    `\\nThe target is already observable of different type.` +\n                    `\\nExtending builtins is not supported.`\n            )\n        }\n        return target\n    }\n\n    if (__DEV__ && !Object.isExtensible(target)) {\n        die(\"Cannot make the designated object observable; it is not extensible\")\n    }\n\n    const name =\n        options?.name ??\n        (__DEV__\n            ? `${\n                  isPlainObject(target) ? \"ObservableObject\" : target.constructor.name\n              }@${getNextId()}`\n            : \"ObservableObject\")\n\n    const adm = new ObservableObjectAdministration(\n        target,\n        new Map(),\n        String(name),\n        getAnnotationFromOptions(options)\n    )\n\n    addHiddenProp(target, $mobx, adm)\n\n    return target\n}\n\nconst isObservableObjectAdministration = createInstanceofPredicate(\n    \"ObservableObjectAdministration\",\n    ObservableObjectAdministration\n)\n\nfunction getCachedObservablePropDescriptor(key) {\n    return (\n        descriptorCache[key] ||\n        (descriptorCache[key] = {\n            get() {\n                return this[$mobx].getObservablePropValue_(key)\n            },\n            set(value) {\n                return this[$mobx].setObservablePropValue_(key, value)\n            }\n        })\n    )\n}\n\nexport function isObservableObject(thing: any): boolean {\n    if (isObject(thing)) {\n        return isObservableObjectAdministration((thing as any)[$mobx])\n    }\n    return false\n}\n\nexport function recordAnnotationApplied(\n    adm: ObservableObjectAdministration,\n    annotation: Annotation,\n    key: PropertyKey\n) {\n    if (__DEV__) {\n        adm.appliedAnnotations_![key] = annotation\n    }\n}\n\nexport function assertAnnotable(\n    adm: ObservableObjectAdministration,\n    annotation: Annotation,\n    key: PropertyKey\n) {\n    // Valid annotation\n    if (__DEV__ && !isAnnotation(annotation)) {\n        die(`Cannot annotate '${adm.name_}.${key.toString()}': Invalid annotation.`)\n    }\n\n    /*\n    // Configurable, not sealed, not frozen\n    // Possibly not needed, just a little better error then the one thrown by engine.\n    // Cases where this would be useful the most (subclass field initializer) are not interceptable by this.\n    if (__DEV__) {\n        const configurable = getDescriptor(adm.target_, key)?.configurable\n        const frozen = Object.isFrozen(adm.target_)\n        const sealed = Object.isSealed(adm.target_)\n        if (!configurable || frozen || sealed) {\n            const fieldName = `${adm.name_}.${key.toString()}`\n            const requestedAnnotationType = annotation.annotationType_\n            let error = `Cannot apply '${requestedAnnotationType}' to '${fieldName}':`\n            if (frozen) {\n                error += `\\nObject is frozen.`\n            }\n            if (sealed) {\n                error += `\\nObject is sealed.`\n            }\n            if (!configurable) {\n                error += `\\nproperty is not configurable.`\n                // Mention only if caused by us to avoid confusion\n                if (hasProp(adm.appliedAnnotations!, key)) {\n                    error += `\\nTo prevent accidental re-definition of a field by a subclass, `\n                    error += `all annotated fields of non-plain objects (classes) are not configurable.`\n                }\n            }\n            die(error)\n        }\n    }\n    */\n\n    // Not annotated\n    if (__DEV__ && !isOverride(annotation) && hasProp(adm.appliedAnnotations_!, key)) {\n        const fieldName = `${adm.name_}.${key.toString()}`\n        const currentAnnotationType = adm.appliedAnnotations_![key].annotationType_\n        const requestedAnnotationType = annotation.annotationType_\n        die(\n            `Cannot apply '${requestedAnnotationType}' to '${fieldName}':` +\n                `\\nThe field is already annotated with '${currentAnnotationType}'.` +\n                `\\nRe-annotating fields is not allowed.` +\n                `\\nUse 'override' annotation for methods overridden by subclass.`\n        )\n    }\n}\n", "import { isAction } from \"../api/action\"\nimport {\n    $mobx,\n    IDepTreeNode,\n    isAtom,\n    isComputedValue,\n    isObservableArray,\n    isObservableMap,\n    isObservableObject,\n    isReaction,\n    isObservableSet,\n    die,\n    isFunction,\n    allowStateChangesStart,\n    untrackedStart,\n    allowStateChangesEnd,\n    untrackedEnd,\n    startBatch,\n    endBatch\n} from \"../internal\"\n\nexport function getAtom(thing: any, property?: PropertyKey): IDepTreeNode {\n    if (typeof thing === \"object\" && thing !== null) {\n        if (isObservableArray(thing)) {\n            if (property !== undefined) {\n                die(23)\n            }\n            return (thing as any)[$mobx].atom_\n        }\n        if (isObservableSet(thing)) {\n            return thing.atom_\n        }\n        if (isObservableMap(thing)) {\n            if (property === undefined) {\n                return thing.keysAtom_\n            }\n            const observable = thing.data_.get(property) || thing.hasMap_.get(property)\n            if (!observable) {\n                die(25, property, getDebugName(thing))\n            }\n            return observable\n        }\n        if (property && !thing[$mobx]) {\n            thing[property]\n        } // See #1072\n        if (isObservableObject(thing)) {\n            if (!property) {\n                return die(26)\n            }\n            const adm = (thing as any)[$mobx]\n            const observable =\n                adm.values_.get(property) ??\n                adm.materializeLazyComputed_(property) ??\n                adm.materializeLazyObservable_(property)\n            if (!observable) {\n                die(27, property, getDebugName(thing))\n            }\n            return observable\n        }\n        if (isAtom(thing) || isComputedValue(thing) || isReaction(thing)) {\n            return thing\n        }\n    } else if (isFunction(thing)) {\n        if (isReaction(thing[$mobx])) {\n            // disposer function\n            return thing[$mobx]\n        }\n    }\n    die(28)\n}\n\nexport function getAdministration(thing: any, property?: string) {\n    if (!thing) {\n        die(29)\n    }\n    if (property !== undefined) {\n        return getAdministration(getAtom(thing, property))\n    }\n    if (isAtom(thing) || isComputedValue(thing) || isReaction(thing)) {\n        return thing\n    }\n    if (isObservableMap(thing) || isObservableSet(thing)) {\n        return thing\n    }\n    if (thing[$mobx]) {\n        return thing[$mobx]\n    }\n    die(24, thing)\n}\n\nexport function getDebugName(thing: any, property?: string): string {\n    let named\n    if (property !== undefined) {\n        named = getAtom(thing, property)\n    } else if (isAction(thing)) {\n        return thing.name\n    } else if (isObservableObject(thing) || isObservableMap(thing) || isObservableSet(thing)) {\n        named = getAdministration(thing)\n    } else {\n        // valid for arrays as well\n        named = getAtom(thing)\n    }\n    return named.name_\n}\n\n/**\n * Helper function for initializing observable structures, it applies:\n * 1. allowStateChanges so we don't violate enforceActions.\n * 2. untracked so we don't accidentaly subscribe to anything observable accessed during init in case the observable is created inside derivation.\n * 3. batch to avoid state version updates\n */\nexport function initObservable<T>(cb: () => T): T {\n    const derivation = untrackedStart()\n    const allowStateChanges = __DEV__ ? allowStateChangesStart(true) : true\n    startBatch()\n    try {\n        return cb()\n    } finally {\n        endBatch()\n        if (__DEV__) {\n            allowStateChangesEnd(allowStateChanges)\n        }\n        untrackedEnd(derivation)\n    }\n}\n", "import {\n    isES6Map,\n    isObservableArray,\n    isObservableMap,\n    isES6Set,\n    isObservableSet,\n    hasProp,\n    isFunction,\n    objectPrototype\n} from \"../internal\"\n\ndeclare const Symbol\nconst toString = objectPrototype.toString\n\nexport function deepEqual(a: any, b: any, depth: number = -1): boolean {\n    return eq(a, b, depth)\n}\n\n// Copied from https://github.com/jashkenas/underscore/blob/5c237a7c682fb68fd5378203f0bf22dce1624854/underscore.js#L1186-L1289\n// Modified: \"Deep compare objects\" part to iterate over keys in forward order instead of reverse order.\n//\n// Internal recursive comparison function for `isEqual`.\nfunction eq(a: any, b: any, depth: number, aStack?: any[], bStack?: any[]) {\n    // Identical objects are equal. `0 === -0`, but they aren't identical.\n    // See the [Harmony `egal` proposal](http://wiki.ecmascript.org/doku.php?id=harmony:egal).\n    if (a === b) {\n        return a !== 0 || 1 / a === 1 / b\n    }\n    // `null` or `undefined` only equal to itself (strict comparison).\n    if (a == null || b == null) {\n        return false\n    }\n    // `NaN`s are equivalent, but non-reflexive.\n    if (a !== a) {\n        return b !== b\n    }\n    // Exhaust primitive checks\n    const type = typeof a\n    if (type !== \"function\" && type !== \"object\" && typeof b != \"object\") {\n        return false\n    }\n\n    // Compare `[[Class]]` names.\n    const className = toString.call(a)\n    if (className !== toString.call(b)) {\n        return false\n    }\n    switch (className) {\n        // Strings, numbers, regular expressions, dates, and booleans are compared by value.\n        case \"[object RegExp]\":\n        // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i')\n        case \"[object String]\":\n            // Primitives and their corresponding object wrappers are equivalent; thus, `\"5\"` is\n            // equivalent to `new String(\"5\")`.\n            return \"\" + a === \"\" + b\n        case \"[object Number]\":\n            // `NaN`s are equivalent, but non-reflexive.\n            // Object(NaN) is equivalent to NaN.\n            if (+a !== +a) {\n                return +b !== +b\n            }\n            // An `egal` comparison is performed for other numeric values.\n            return +a === 0 ? 1 / +a === 1 / b : +a === +b\n        case \"[object Date]\":\n        case \"[object Boolean]\":\n            // Coerce dates and booleans to numeric primitive values. Dates are compared by their\n            // millisecond representations. Note that invalid dates with millisecond representations\n            // of `NaN` are not equivalent.\n            return +a === +b\n        case \"[object Symbol]\":\n            return (\n                typeof Symbol !== \"undefined\" && Symbol.valueOf.call(a) === Symbol.valueOf.call(b)\n            )\n        case \"[object Map]\":\n        case \"[object Set]\":\n            // Maps and Sets are unwrapped to arrays of entry-pairs, adding an incidental level.\n            // Hide this extra level by increasing the depth.\n            if (depth >= 0) {\n                depth++\n            }\n            break\n    }\n    // Unwrap any wrapped objects.\n    a = unwrap(a)\n    b = unwrap(b)\n\n    const areArrays = className === \"[object Array]\"\n    if (!areArrays) {\n        if (typeof a != \"object\" || typeof b != \"object\") {\n            return false\n        }\n\n        // Objects with different constructors are not equivalent, but `Object`s or `Array`s\n        // from different frames are.\n        const aCtor = a.constructor,\n            bCtor = b.constructor\n        if (\n            aCtor !== bCtor &&\n            !(\n                isFunction(aCtor) &&\n                aCtor instanceof aCtor &&\n                isFunction(bCtor) &&\n                bCtor instanceof bCtor\n            ) &&\n            \"constructor\" in a &&\n            \"constructor\" in b\n        ) {\n            return false\n        }\n    }\n\n    if (depth === 0) {\n        return false\n    } else if (depth < 0) {\n        depth = -1\n    }\n\n    // Assume equality for cyclic structures. The algorithm for detecting cyclic\n    // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.\n\n    // Initializing stack of traversed objects.\n    // It's done here since we only need them for objects and arrays comparison.\n    aStack = aStack || []\n    bStack = bStack || []\n    let length = aStack.length\n    while (length--) {\n        // Linear search. Performance is inversely proportional to the number of\n        // unique nested structures.\n        if (aStack[length] === a) {\n            return bStack[length] === b\n        }\n    }\n\n    // Add the first object to the stack of traversed objects.\n    aStack.push(a)\n    bStack.push(b)\n\n    // Recursively compare objects and arrays.\n    if (areArrays) {\n        // Compare array lengths to determine if a deep comparison is necessary.\n        length = a.length\n        if (length !== b.length) {\n            return false\n        }\n        // Deep compare the contents, ignoring non-numeric properties.\n        while (length--) {\n            if (!eq(a[length], b[length], depth - 1, aStack, bStack)) {\n                return false\n            }\n        }\n    } else {\n        // Deep compare objects.\n        const keys = Object.keys(a)\n        const length = keys.length\n        // Ensure that both objects contain the same number of properties before comparing deep equality.\n        if (Object.keys(b).length !== length) {\n            return false\n        }\n        for (let i = 0; i < length; i++) {\n            // Deep compare each member\n            const key = keys[i]\n            if (!(hasProp(b, key) && eq(a[key], b[key], depth - 1, aStack, bStack))) {\n                return false\n            }\n        }\n    }\n    // Remove the first object from the stack of traversed objects.\n    aStack.pop()\n    bStack.pop()\n    return true\n}\n\nfunction unwrap(a: any) {\n    if (isObservableArray(a)) {\n        return a.slice()\n    }\n    if (isES6Map(a) || isObservableMap(a)) {\n        return Array.from(a.entries())\n    }\n    if (isES6Set(a) || isObservableSet(a)) {\n        return Array.from(a.entries())\n    }\n    return a\n}\n", "import { assign } from \"./utils\"\n\n// safely get iterator prototype if available\nconst maybeIteratorPrototype = (globalThis as any).Iterator?.prototype || {}\n\nexport function makeIterable<T, TReturn = unknown>(\n    iterator: Iterator<T>\n): IteratorObject<T, TReturn> {\n    iterator[Symbol.iterator] = getSelf\n    return assign(Object.create(maybeIteratorPrototype), iterator)\n}\n\nfunction getSelf() {\n    return this\n}\n", "import { ObservableObjectAdministration, isFunction } from \"../internal\"\n\nexport const enum MakeResult {\n    Cancel,\n    Break,\n    Continue\n}\n\nexport type Annotation = {\n    annotationType_: string\n    make_(\n        adm: ObservableObjectAdministration,\n        key: PropertyKey,\n        descriptor: PropertyDescriptor,\n        source: object\n    ): MakeResult\n    extend_(\n        adm: ObservableObjectAdministration,\n        key: PropertyKey,\n        descriptor: PropertyDescriptor,\n        proxyTrap: boolean\n    ): boolean | null\n    options_?: any\n}\n\nexport type AnnotationMapEntry =\n    | Annotation\n    | true /* follow the default decorator, usually deep */\n    | false /* don't decorate this property */\n\n// AdditionalFields can be used to declare additional keys that can be used, for example to be able to\n// declare annotations for private/ protected members, see #2339\nexport type AnnotationsMap<T, AdditionalFields extends PropertyKey> = {\n    [P in Exclude<keyof T, \"toString\">]?: AnnotationMapEntry\n} & Record<AdditionalFields, AnnotationMapEntry>\n\nexport function isAnnotation(thing: any) {\n    return (\n        // Can be function\n        thing instanceof Object &&\n        typeof thing.annotationType_ === \"string\" &&\n        isFunction(thing.make_) &&\n        isFunction(thing.extend_)\n    )\n}\n\nexport function isAnnotationMapEntry(thing: any) {\n    return typeof thing === \"boolean\" || isAnnotation(thing)\n}\n", "/**\n * (c) Michel Weststrate 2015 - 2020\n * MIT Licensed\n *\n * Welcome to the mobx sources! To get a global overview of how MobX internally works,\n * this is a good place to start:\n * https://medium.com/@mweststrate/becoming-fully-reactive-an-in-depth-explanation-of-mobservable-55995262a254#.xvbh6qd74\n *\n * Source folders:\n * ===============\n *\n * - api/     Most of the public static methods exposed by the module can be found here.\n * - core/    Implementation of the MobX algorithm; atoms, derivations, reactions, dependency trees, optimizations. Cool stuff can be found here.\n * - types/   All the magic that is need to have observable objects, arrays and values is in this folder. Including the modifiers like `asFlat`.\n * - utils/   Utility stuff.\n *\n */\nimport { die } from \"./errors\"\nif (__DEV__) {\n    const g = globalThis as any\n    ;[\"Symbol\", \"Map\", \"Set\", \"Proxy\"].forEach(m => {\n        if (typeof g[m] === \"undefined\") {\n            die(`MobX requires global '${m}' to be available or polyfilled`)\n        }\n    })\n}\n\nimport { spy, getDebugName, $mobx } from \"./internal\"\n\nexport {\n    IObservable,\n    IDepTreeNode,\n    Reaction,\n    IReactionPublic,\n    IReactionDisposer,\n    untracked,\n    IAtom,\n    createAtom,\n    spy,\n    IComputedValue,\n    IEqualsComparer,\n    compareDefault,\n    compareIdentity,\n    compareStructural,\n    compareShallow,\n    IEnhancer,\n    IInterceptable,\n    IInterceptor,\n    IListenable,\n    IObjectWillChange,\n    IObjectDidChange,\n    isObservableObject,\n    IValueDidChange,\n    IValueWillChange,\n    IObservableValue,\n    isObservableValue as isBoxedObservable,\n    IObservableArray,\n    IArrayWillChange,\n    IArrayWillSplice,\n    IArraySplice,\n    IArrayUpdate,\n    IArrayDidChange,\n    isObservableArray,\n    IKeyValueMap,\n    ObservableMap,\n    IMapEntries,\n    IMapEntry,\n    IMapWillChange,\n    IMapDidChange,\n    isObservableMap,\n    IObservableMapInitialValues,\n    ObservableSet,\n    isObservableSet,\n    ISetDidChange,\n    ISetWillChange,\n    IObservableSetInitialValues,\n    transaction,\n    observable,\n    observableRef,\n    observableShallow,\n    observableDeep,\n    observableStruct,\n    IObservableFactory,\n    CreateObservableOptions,\n    computed,\n    computedStruct,\n    IComputedFactory,\n    isObservable,\n    isObservableProp,\n    isComputed,\n    isComputedProp,\n    extendObservable,\n    observe,\n    intercept,\n    autorun,\n    IAutorunOptions,\n    reaction,\n    IReactionOptions,\n    when,\n    IWhenOptions,\n    action,\n    actionBound,\n    isAction,\n    runInAction,\n    IActionFactory,\n    keys,\n    values,\n    entries,\n    set,\n    remove,\n    has,\n    get,\n    apiOwnKeys as ownKeys,\n    apiDefineProperty as defineProperty,\n    configure,\n    onBecomeObserved,\n    onBecomeUnobserved,\n    flow,\n    flowBound,\n    isFlow,\n    flowResult,\n    CancellablePromise,\n    FlowCancellationError,\n    isFlowCancellationError,\n    toJS,\n    IObserverTree,\n    IDependencyTree,\n    getDependencyTree,\n    getObserverTree,\n    resetGlobalState as _resetGlobalState,\n    getGlobalState as _getGlobalState,\n    getDebugName,\n    getAtom,\n    getAdministration as _getAdministration,\n    allowStateChanges as _allowStateChanges,\n    runInAction as _allowStateChangesInsideComputed, // This has become the default behavior in Mobx 6\n    Lambda,\n    $mobx,\n    isComputingDerivation as _isComputingDerivation,\n    onReactionError,\n    interceptReads as _interceptReads,\n    IComputedValueOptions,\n    IActionRunInfo,\n    _startAction,\n    _endAction,\n    allowStateReadsStart as _allowStateReadsStart,\n    allowStateReadsEnd as _allowStateReadsEnd,\n    makeObservable,\n    makeAutoObservable,\n    autoAction as _autoAction,\n    autoActionBound as _autoActionBound,\n    AnnotationsMap,\n    AnnotationMapEntry,\n    override\n} from \"./internal\"\n\n// Devtools support\ndeclare const __MOBX_DEVTOOLS_GLOBAL_HOOK__: { injectMobx: (any) => void }\nif (__DEV__ && typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__ === \"object\") {\n    // See: https://github.com/andykog/mobx-devtools/\n    __MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({\n        spy,\n        extras: {\n            getDebugName\n        },\n        $mobx\n    })\n}\n", "import { isComputedProp, isObservableProp, createAtom, action, computed, _allowStateChangesInsideComputed, reaction, runInAction, observable, values, entries, isObservableArray, isObservableObject, defineProperty as defineProperty$1, _interceptReads, intercept, observe, ObservableMap, _getAdministration, set, makeObservable, getAtom, when } from 'mobx';\n\nlet livelinessChecking = \"warn\";\n/**\n * Defines what MST should do when running into reads / writes to objects that have died.\n * By default it will print a warning.\n * Use the `\"error\"` option to easy debugging to see where the error was thrown and when the offending read / write took place\n *\n * @param mode `\"warn\"`, `\"error\"` or `\"ignore\"`\n */\nfunction setLivelinessChecking(mode) {\n    livelinessChecking = mode;\n}\n/**\n * Returns the current liveliness checking mode.\n *\n * @returns `\"warn\"`, `\"error\"` or `\"ignore\"`\n */\nfunction getLivelinessChecking() {\n    return livelinessChecking;\n}\n/**\n * @deprecated use setLivelinessChecking instead\n * @hidden\n *\n * Defines what MST should do when running into reads / writes to objects that have died.\n * By default it will print a warning.\n * Use the `\"error\"` option to easy debugging to see where the error was thrown and when the offending read / write took place\n *\n * @param mode `\"warn\"`, `\"error\"` or `\"ignore\"`\n */\nfunction setLivelynessChecking(mode) {\n    setLivelinessChecking(mode);\n}\n\n/**\n * @hidden\n */\nvar Hook;\n(function (Hook) {\n    Hook[\"afterCreate\"] = \"afterCreate\";\n    Hook[\"afterAttach\"] = \"afterAttach\";\n    Hook[\"afterCreationFinalization\"] = \"afterCreationFinalization\";\n    Hook[\"beforeDetach\"] = \"beforeDetach\";\n    Hook[\"beforeDestroy\"] = \"beforeDestroy\";\n})(Hook || (Hook = {}));\n\n/**\n * Returns the _actual_ type of the given tree node. (Or throws)\n *\n * @param object\n * @returns\n */\nfunction getType(object) {\n    assertIsStateTreeNode(object, 1);\n    return getStateTreeNode(object).type;\n}\n/**\n * Returns the _declared_ type of the given sub property of an object, array or map.\n * In the case of arrays and maps the property name is optional and will be ignored.\n *\n * Example:\n * ```ts\n * const Box = types.model({ x: 0, y: 0 })\n * const box = Box.create()\n *\n * console.log(getChildType(box, \"x\").name) // 'number'\n * ```\n *\n * @param object\n * @param propertyName\n * @returns\n */\nfunction getChildType(object, propertyName) {\n    assertIsStateTreeNode(object, 1);\n    return getStateTreeNode(object).getChildType(propertyName);\n}\n/**\n * Registers a function that will be invoked for each mutation that is applied to the provided model instance, or to any of its children.\n * See [patches](https://github.com/mobxjs/mobx-state-tree#patches) for more details. onPatch events are emitted immediately and will not await the end of a transaction.\n * Patches can be used to deeply observe a model tree.\n *\n * @param target the model instance from which to receive patches\n * @param callback the callback that is invoked for each patch. The reversePatch is a patch that would actually undo the emitted patch\n * @returns function to remove the listener\n */\nfunction onPatch(target, callback) {\n    // check all arguments\n    assertIsStateTreeNode(target, 1);\n    assertIsFunction(callback, 2);\n    return getStateTreeNode(target).onPatch(callback);\n}\n/**\n * Registers a function that is invoked whenever a new snapshot for the given model instance is available.\n * The listener will only be fire at the end of the current MobX (trans)action.\n * See [snapshots](https://github.com/mobxjs/mobx-state-tree#snapshots) for more details.\n *\n * @param target\n * @param callback\n * @returns\n */\nfunction onSnapshot(target, callback) {\n    // check all arguments\n    assertIsStateTreeNode(target, 1);\n    assertIsFunction(callback, 2);\n    return getStateTreeNode(target).onSnapshot(callback);\n}\n/**\n * Applies a JSON-patch to the given model instance or bails out if the patch couldn't be applied\n * See [patches](https://github.com/mobxjs/mobx-state-tree#patches) for more details.\n *\n * Can apply a single past, or an array of patches.\n *\n * @param target\n * @param patch\n * @returns\n */\nfunction applyPatch(target, patch) {\n    // check all arguments\n    assertIsStateTreeNode(target, 1);\n    assertArg(patch, p => typeof p === \"object\", \"object or array\", 2);\n    getStateTreeNode(target).applyPatches(asArray(patch));\n}\n/**\n * Small abstraction around `onPatch` and `applyPatch`, attaches a patch listener to a tree and records all the patches.\n * Returns a recorder object with the following signature:\n *\n * Example:\n * ```ts\n * export interface IPatchRecorder {\n *      // the recorded patches\n *      patches: IJsonPatch[]\n *      // the inverse of the recorded patches\n *      inversePatches: IJsonPatch[]\n *      // true if currently recording\n *      recording: boolean\n *      // stop recording patches\n *      stop(): void\n *      // resume recording patches\n *      resume(): void\n *      // apply all the recorded patches on the given target (the original subject if omitted)\n *      replay(target?: IAnyStateTreeNode): void\n *      // reverse apply the recorded patches on the given target  (the original subject if omitted)\n *      // stops the recorder if not already stopped\n *      undo(): void\n * }\n * ```\n *\n * The optional filter function allows to skip recording certain patches.\n *\n * @param subject\n * @param filter\n * @returns\n */\nfunction recordPatches(subject, filter) {\n    // check all arguments\n    assertIsStateTreeNode(subject, 1);\n    const data = {\n        patches: [],\n        inversePatches: []\n    };\n    // we will generate the immutable copy of patches on demand for public consumption\n    const publicData = {};\n    let disposer;\n    const recorder = {\n        get recording() {\n            return !!disposer;\n        },\n        get patches() {\n            if (!publicData.patches) {\n                publicData.patches = data.patches.slice();\n            }\n            return publicData.patches;\n        },\n        get reversedInversePatches() {\n            if (!publicData.reversedInversePatches) {\n                publicData.reversedInversePatches = data.inversePatches.slice().reverse();\n            }\n            return publicData.reversedInversePatches;\n        },\n        get inversePatches() {\n            if (!publicData.inversePatches) {\n                publicData.inversePatches = data.inversePatches.slice();\n            }\n            return publicData.inversePatches;\n        },\n        stop() {\n            if (disposer) {\n                disposer();\n                disposer = undefined;\n            }\n        },\n        resume() {\n            if (disposer)\n                return;\n            disposer = onPatch(subject, (patch, inversePatch) => {\n                // skip patches that are asked to be filtered if there's a filter in place\n                if (filter && !filter(patch, inversePatch, getRunningActionContext())) {\n                    return;\n                }\n                data.patches.push(patch);\n                data.inversePatches.push(inversePatch);\n                // mark immutable public patches as dirty\n                publicData.patches = undefined;\n                publicData.inversePatches = undefined;\n                publicData.reversedInversePatches = undefined;\n            });\n        },\n        replay(target) {\n            applyPatch(target || subject, data.patches);\n        },\n        undo(target) {\n            applyPatch(target || subject, data.inversePatches.slice().reverse());\n        }\n    };\n    recorder.resume();\n    return recorder;\n}\n/**\n * The inverse of `unprotect`.\n *\n * @param target\n */\nfunction protect(target) {\n    // check all arguments\n    assertIsStateTreeNode(target, 1);\n    const node = getStateTreeNode(target);\n    if (!node.isRoot)\n        throw new MstError(\"`protect` can only be invoked on root nodes\");\n    node.isProtectionEnabled = true;\n}\n/**\n * By default it is not allowed to directly modify a model. Models can only be modified through actions.\n * However, in some cases you don't care about the advantages (like replayability, traceability, etc) this yields.\n * For example because you are building a PoC or don't have any middleware attached to your tree.\n *\n * In that case you can disable this protection by calling `unprotect` on the root of your tree.\n *\n * Example:\n * ```ts\n * const Todo = types.model({\n *     done: false\n * }).actions(self => ({\n *     toggle() {\n *         self.done = !self.done\n *     }\n * }))\n *\n * const todo = Todo.create()\n * todo.done = true // throws!\n * todo.toggle() // OK\n * unprotect(todo)\n * todo.done = false // OK\n * ```\n */\nfunction unprotect(target) {\n    // check all arguments\n    assertIsStateTreeNode(target, 1);\n    const node = getStateTreeNode(target);\n    if (!node.isRoot)\n        throw new MstError(\"`unprotect` can only be invoked on root nodes\");\n    node.isProtectionEnabled = false;\n}\n/**\n * Returns true if the object is in protected mode, @see protect\n */\nfunction isProtected(target) {\n    return getStateTreeNode(target).isProtected;\n}\n/**\n * Applies a snapshot to a given model instances. Patch and snapshot listeners will be invoked as usual.\n *\n * @param target\n * @param snapshot\n * @returns\n */\nfunction applySnapshot(target, snapshot) {\n    // check all arguments\n    assertIsStateTreeNode(target, 1);\n    return getStateTreeNode(target).applySnapshot(snapshot);\n}\n/**\n * Calculates a snapshot from the given model instance. The snapshot will always reflect the latest state but use\n * structural sharing where possible. Doesn't require MobX transactions to be completed.\n *\n * @param target\n * @param applyPostProcess If true (the default) then postProcessSnapshot gets applied.\n * @returns\n */\nfunction getSnapshot(target, applyPostProcess = true) {\n    // check all arguments\n    assertIsStateTreeNode(target, 1);\n    const node = getStateTreeNode(target);\n    if (applyPostProcess)\n        return node.snapshot;\n    return freeze(node.type.getSnapshot(node, false));\n}\n/**\n * Given a model instance, returns `true` if the object has a parent, that is, is part of another object, map or array.\n *\n * @param target\n * @param depth How far should we look upward? 1 by default.\n * @returns\n */\nfunction hasParent(target, depth = 1) {\n    // check all arguments\n    assertIsStateTreeNode(target, 1);\n    assertIsNumber(depth, 2, 0);\n    let parent = getStateTreeNode(target).parent;\n    while (parent) {\n        if (--depth === 0)\n            return true;\n        parent = parent.parent;\n    }\n    return false;\n}\n/**\n * Returns the immediate parent of this object, or throws.\n *\n * Note that the immediate parent can be either an object, map or array, and\n * doesn't necessarily refer to the parent model.\n *\n * Please note that in child nodes access to the root is only possible\n * once the `afterAttach` hook has fired.\n *\n * @param target\n * @param depth How far should we look upward? 1 by default.\n * @returns\n */\nfunction getParent(target, depth = 1) {\n    // check all arguments\n    assertIsStateTreeNode(target, 1);\n    assertIsNumber(depth, 2, 0);\n    let d = depth;\n    let parent = getStateTreeNode(target).parent;\n    while (parent) {\n        if (--d === 0)\n            return parent.storedValue;\n        parent = parent.parent;\n    }\n    throw new MstError(`Failed to find the parent of ${getStateTreeNode(target)} at depth ${depth}`);\n}\n/**\n * Given a model instance, returns `true` if the object has a parent of given type, that is, is part of another object, map or array\n *\n * @param target\n * @param type\n * @returns\n */\nfunction hasParentOfType(target, type) {\n    // check all arguments\n    assertIsStateTreeNode(target, 1);\n    assertIsType(type, 2);\n    let parent = getStateTreeNode(target).parent;\n    while (parent) {\n        if (type.is(parent.storedValue))\n            return true;\n        parent = parent.parent;\n    }\n    return false;\n}\n/**\n * Returns the target's parent of a given type, or throws.\n *\n * @param target\n * @param type\n * @returns\n */\nfunction getParentOfType(target, type) {\n    // check all arguments\n    assertIsStateTreeNode(target, 1);\n    assertIsType(type, 2);\n    let parent = getStateTreeNode(target).parent;\n    while (parent) {\n        if (type.is(parent.storedValue))\n            return parent.storedValue;\n        parent = parent.parent;\n    }\n    throw new MstError(`Failed to find the parent of ${getStateTreeNode(target)} of a given type`);\n}\n/**\n * Given an object in a model tree, returns the root object of that tree.\n *\n * Please note that in child nodes access to the root is only possible\n * once the `afterAttach` hook has fired.\n *\n * @param target\n * @returns\n */\nfunction getRoot(target) {\n    // check all arguments\n    assertIsStateTreeNode(target, 1);\n    return getStateTreeNode(target).root.storedValue;\n}\n/**\n * Returns the path of the given object in the model tree\n *\n * @param target\n * @returns\n */\nfunction getPath(target) {\n    // check all arguments\n    assertIsStateTreeNode(target, 1);\n    return getStateTreeNode(target).path;\n}\n/**\n * Returns the path of the given object as unescaped string array.\n *\n * @param target\n * @returns\n */\nfunction getPathParts(target) {\n    // check all arguments\n    assertIsStateTreeNode(target, 1);\n    return splitJsonPath(getStateTreeNode(target).path);\n}\n/**\n * Returns true if the given object is the root of a model tree.\n *\n * @param target\n * @returns\n */\nfunction isRoot(target) {\n    // check all arguments\n    assertIsStateTreeNode(target, 1);\n    return getStateTreeNode(target).isRoot;\n}\n/**\n * Resolves a path relatively to a given object.\n * Returns undefined if no value can be found.\n *\n * @param target\n * @param path escaped json path\n * @returns\n */\nfunction resolvePath(target, path) {\n    // check all arguments\n    assertIsStateTreeNode(target, 1);\n    assertIsString(path, 2);\n    const node = resolveNodeByPath(getStateTreeNode(target), path);\n    return node ? node.value : undefined;\n}\n/**\n * Resolves a model instance given a root target, the type and the identifier you are searching for.\n * Returns undefined if no value can be found.\n *\n * @param type\n * @param target\n * @param identifier\n * @returns\n */\nfunction resolveIdentifier(type, target, identifier) {\n    // check all arguments\n    assertIsType(type, 1);\n    assertIsStateTreeNode(target, 2);\n    assertIsValidIdentifier(identifier, 3);\n    const node = getStateTreeNode(target).root.identifierCache.resolve(type, normalizeIdentifier(identifier));\n    return node === null || node === void 0 ? void 0 : node.value;\n}\n/**\n * Returns the identifier of the target node.\n * This is the *string normalized* identifier, which might not match the type of the identifier attribute\n *\n * @param target\n * @returns\n */\nfunction getIdentifier(target) {\n    // check all arguments\n    assertIsStateTreeNode(target, 1);\n    return getStateTreeNode(target).identifier;\n}\n/**\n * Tests if a reference is valid (pointing to an existing node and optionally if alive) and returns such reference if the check passes,\n * else it returns undefined.\n *\n * @param getter Function to access the reference.\n * @param checkIfAlive true to also make sure the referenced node is alive (default), false to skip this check.\n * @returns\n */\nfunction tryReference(getter, checkIfAlive = true) {\n    try {\n        const node = getter();\n        if (node === undefined || node === null) {\n            return undefined;\n        }\n        else if (isStateTreeNode(node)) {\n            if (!checkIfAlive) {\n                return node;\n            }\n            else {\n                return isAlive(node) ? node : undefined;\n            }\n        }\n        else {\n            throw new MstError(\"The reference to be checked is not one of node, null or undefined\");\n        }\n    }\n    catch (e) {\n        if (e instanceof InvalidReferenceError) {\n            return undefined;\n        }\n        throw e;\n    }\n}\n/**\n * Tests if a reference is valid (pointing to an existing node and optionally if alive) and returns if the check passes or not.\n *\n * @param getter Function to access the reference.\n * @param checkIfAlive true to also make sure the referenced node is alive (default), false to skip this check.\n * @returns\n */\nfunction isValidReference(getter, checkIfAlive = true) {\n    try {\n        const node = getter();\n        if (node === undefined || node === null) {\n            return false;\n        }\n        else if (isStateTreeNode(node)) {\n            return checkIfAlive ? isAlive(node) : true;\n        }\n        else {\n            throw new MstError(\"The reference to be checked is not one of node, null or undefined\");\n        }\n    }\n    catch (e) {\n        if (e instanceof InvalidReferenceError) {\n            return false;\n        }\n        throw e;\n    }\n}\n/**\n * Try to resolve a given path relative to a given node.\n *\n * @param target\n * @param path\n * @returns\n */\nfunction tryResolve(target, path) {\n    // check all arguments\n    assertIsStateTreeNode(target, 1);\n    assertIsString(path, 2);\n    const node = resolveNodeByPath(getStateTreeNode(target), path, false);\n    if (node === undefined)\n        return undefined;\n    try {\n        return node.value;\n    }\n    catch (e) {\n        // For what ever reason not resolvable (e.g. totally not existing path, or value that cannot be fetched)\n        // see test / issue: 'try resolve doesn't work #686'\n        return undefined;\n    }\n}\n/**\n * Given two state tree nodes that are part of the same tree,\n * returns the shortest jsonpath needed to navigate from the one to the other\n *\n * @param base\n * @param target\n * @returns\n */\nfunction getRelativePath(base, target) {\n    // check all arguments\n    assertIsStateTreeNode(base, 1);\n    assertIsStateTreeNode(target, 2);\n    return getRelativePathBetweenNodes(getStateTreeNode(base), getStateTreeNode(target));\n}\n/**\n * Returns a deep copy of the given state tree node as new tree.\n * Shorthand for `snapshot(x) = getType(x).create(getSnapshot(x))`\n *\n * _Tip: clone will create a literal copy, including the same identifiers. To modify identifiers etc. during cloning, don't use clone but take a snapshot of the tree, modify it, and create new instance_\n *\n * @param source\n * @param keepEnvironment indicates whether the clone should inherit the same environment (`true`, the default), or not have an environment (`false`). If an object is passed in as second argument, that will act as the environment for the cloned tree.\n * @returns\n */\nfunction clone(source, keepEnvironment = true) {\n    // check all arguments\n    assertIsStateTreeNode(source, 1);\n    const node = getStateTreeNode(source);\n    return node.type.create(node.snapshot, keepEnvironment === true\n        ? node.root.environment\n        : keepEnvironment === false\n            ? undefined\n            : keepEnvironment); // it's an object or something else\n}\n/**\n * Removes a model element from the state tree, and let it live on as a new state tree\n */\nfunction detach(target) {\n    // check all arguments\n    assertIsStateTreeNode(target, 1);\n    getStateTreeNode(target).detach();\n    return target;\n}\n/**\n * Removes a model element from the state tree, and mark it as end-of-life; the element should not be used anymore\n */\nfunction destroy(target) {\n    // check all arguments\n    assertIsStateTreeNode(target, 1);\n    const node = getStateTreeNode(target);\n    if (node.isRoot)\n        node.die();\n    else\n        node.parent.removeChild(node.subpath);\n}\n/**\n * Returns true if the given state tree node is not killed yet.\n * This means that the node is still a part of a tree, and that `destroy`\n * has not been called. If a node is not alive anymore, the only thing one can do with it\n * is requesting it's last path and snapshot\n *\n * @param target\n * @returns\n */\nfunction isAlive(target) {\n    // check all arguments\n    assertIsStateTreeNode(target, 1);\n    return getStateTreeNode(target).observableIsAlive;\n}\n/**\n * Use this utility to register a function that should be called whenever the\n * targeted state tree node is destroyed. This is a useful alternative to managing\n * cleanup methods yourself using the `beforeDestroy` hook.\n *\n * This methods returns the same disposer that was passed as argument.\n *\n * Example:\n * ```ts\n * const Todo = types.model({\n *   title: types.string\n * }).actions(self => ({\n *   afterCreate() {\n *     const autoSaveDisposer = reaction(\n *       () => getSnapshot(self),\n *       snapshot => sendSnapshotToServerSomehow(snapshot)\n *     )\n *     // stop sending updates to server if this\n *     // instance is destroyed\n *     addDisposer(self, autoSaveDisposer)\n *   }\n * }))\n * ```\n *\n * @param target\n * @param disposer\n * @returns The same disposer that was passed as argument\n */\nfunction addDisposer(target, disposer) {\n    // check all arguments\n    assertIsStateTreeNode(target, 1);\n    assertIsFunction(disposer, 2);\n    const node = getStateTreeNode(target);\n    node.addDisposer(disposer);\n    return disposer;\n}\n/**\n * Returns the environment of the current state tree, or throws. For more info on environments,\n * see [Dependency injection](/concepts/dependency-injection)\n *\n * Please note that in child nodes access to the root is only possible\n * once the `afterAttach` hook has fired\n *\n * Returns an empty environment if the tree wasn't initialized with an environment\n *\n * @param target\n * @returns\n */\nfunction getEnv(target) {\n    // check all arguments\n    assertIsStateTreeNode(target, 1);\n    const node = getStateTreeNode(target);\n    const env = node.root.environment;\n    if (!env)\n        throw new MstError(`Failed to find the environment of ${node} ${node.path}`);\n    return env;\n}\n/**\n * Returns whether the current state tree has environment or not.\n *\n * @export\n * @param {IStateTreeNode} target\n * @return {boolean}\n */\nfunction hasEnv(target) {\n    // check all arguments\n    if (process.env.NODE_ENV !== \"production\") {\n        if (!isStateTreeNode(target))\n            throw new MstError(\"expected first argument to be a mobx-state-tree node, got \" + target + \" instead\");\n    }\n    const node = getStateTreeNode(target);\n    const env = node.root.environment;\n    return !!env;\n}\n/**\n * Performs a depth first walk through a tree.\n */\nfunction walk(target, processor) {\n    // check all arguments\n    assertIsStateTreeNode(target, 1);\n    assertIsFunction(processor, 2);\n    const node = getStateTreeNode(target);\n    // tslint:disable-next-line:no_unused-variable\n    node.getChildren().forEach(child => {\n        if (isStateTreeNode(child.storedValue))\n            walk(child.storedValue, processor);\n    });\n    processor(node.storedValue);\n}\n/**\n * Returns a reflection of the model type properties and name for either a model type or model node.\n *\n * @param typeOrNode\n * @returns\n */\nfunction getPropertyMembers(typeOrNode) {\n    let type;\n    if (isStateTreeNode(typeOrNode)) {\n        type = getType(typeOrNode);\n    }\n    else {\n        type = typeOrNode;\n    }\n    assertArg(type, t => isModelType(t), \"model type or model instance\", 1);\n    return {\n        name: type.name,\n        properties: Object.assign({}, type.properties)\n    };\n}\n/**\n * Returns a reflection of the model node, including name, properties, views, volatile state,\n * and actions. `flowActions` is also provided as a separate array of names for any action that\n * came from a flow generator as well.\n *\n * In the case where a model has two actions: `doSomething` and `doSomethingWithFlow`, where\n * `doSomethingWithFlow` is a flow generator, the `actions` array will contain both actions,\n * i.e. [\"doSomething\", \"doSomethingWithFlow\"], and the `flowActions` array will contain only\n * the flow action, i.e. [\"doSomethingWithFlow\"].\n *\n * @param target\n * @returns\n */\nfunction getMembers(target) {\n    const type = getStateTreeNode(target).type;\n    const reflected = Object.assign(Object.assign({}, getPropertyMembers(type)), { actions: [], volatile: [], views: [], flowActions: [] });\n    const props = Object.getOwnPropertyNames(target);\n    props.forEach(key => {\n        if (key in reflected.properties)\n            return;\n        const descriptor = Object.getOwnPropertyDescriptor(target, key);\n        if (descriptor.get) {\n            if (isComputedProp(target, key))\n                reflected.views.push(key);\n            else\n                reflected.volatile.push(key);\n            return;\n        }\n        if (descriptor.value._isFlowAction === true) {\n            reflected.flowActions.push(key);\n        }\n        if (descriptor.value._isMSTAction === true) {\n            reflected.actions.push(key);\n        }\n        else if (isObservableProp(target, key)) {\n            reflected.volatile.push(key);\n        }\n        else {\n            reflected.views.push(key);\n        }\n    });\n    return reflected;\n}\n/**\n * Casts a node snapshot or instance type to an instance type so it can be assigned to a type instance.\n * Note that this is just a cast for the type system, this is, it won't actually convert a snapshot to an instance,\n * but just fool typescript into thinking so.\n * Either way, casting when outside an assignation operation won't compile.\n *\n * Example:\n * ```ts\n * const ModelA = types.model({\n *   n: types.number\n * }).actions(self => ({\n *   setN(aNumber: number) {\n *     self.n = aNumber\n *   }\n * }))\n *\n * const ModelB = types.model({\n *   innerModel: ModelA\n * }).actions(self => ({\n *   someAction() {\n *     // this will allow the compiler to assign a snapshot to the property\n *     self.innerModel = cast({ a: 5 })\n *   }\n * }))\n * ```\n *\n * @param snapshotOrInstance Snapshot or instance\n * @returns The same object cast as an instance\n */\nfunction cast(snapshotOrInstance) {\n    return snapshotOrInstance;\n}\n/**\n * Casts a node instance type to a snapshot type so it can be assigned to a type snapshot (e.g. to be used inside a create call).\n * Note that this is just a cast for the type system, this is, it won't actually convert an instance to a snapshot,\n * but just fool typescript into thinking so.\n *\n * Example:\n * ```ts\n * const ModelA = types.model({\n *   n: types.number\n * }).actions(self => ({\n *   setN(aNumber: number) {\n *     self.n = aNumber\n *   }\n * }))\n *\n * const ModelB = types.model({\n *   innerModel: ModelA\n * })\n *\n * const a = ModelA.create({ n: 5 });\n * // this will allow the compiler to use a model as if it were a snapshot\n * const b = ModelB.create({ innerModel: castToSnapshot(a)})\n * ```\n *\n * @param snapshotOrInstance Snapshot or instance\n * @returns The same object cast as an input (creation) snapshot\n */\nfunction castToSnapshot(snapshotOrInstance) {\n    return snapshotOrInstance;\n}\n/**\n * Casts a node instance type to a reference snapshot type so it can be assigned to a reference snapshot (e.g. to be used inside a create call).\n * Note that this is just a cast for the type system, this is, it won't actually convert an instance to a reference snapshot,\n * but just fool typescript into thinking so.\n *\n * Example:\n * ```ts\n * const ModelA = types.model({\n *   id: types.identifier,\n *   n: types.number\n * }).actions(self => ({\n *   setN(aNumber: number) {\n *     self.n = aNumber\n *   }\n * }))\n *\n * const ModelB = types.model({\n *   refA: types.reference(ModelA)\n * })\n *\n * const a = ModelA.create({ id: 'someId', n: 5 });\n * // this will allow the compiler to use a model as if it were a reference snapshot\n * const b = ModelB.create({ refA: castToReferenceSnapshot(a)})\n * ```\n *\n * @param instance Instance\n * @returns The same object cast as a reference snapshot (string or number)\n */\nfunction castToReferenceSnapshot(instance) {\n    return instance;\n}\n/**\n * Returns the unique node id (not to be confused with the instance identifier) for a\n * given instance.\n * This id is a number that is unique for each instance.\n *\n * @export\n * @param target\n * @returns\n */\nfunction getNodeId(target) {\n    assertIsStateTreeNode(target, 1);\n    return getStateTreeNode(target).nodeId;\n}\n\n/**\n * @internal\n * @hidden\n */\nclass BaseNode {\n    get subpath() {\n        return this._subpath;\n    }\n    get subpathUponDeath() {\n        return this._subpathUponDeath;\n    }\n    get pathUponDeath() {\n        return this._pathUponDeath;\n    }\n    get value() {\n        return this.type.getValue(this);\n    }\n    get state() {\n        return this._state;\n    }\n    set state(val) {\n        const wasAlive = this.isAlive;\n        this._state = val;\n        const isAlive = this.isAlive;\n        if (this.aliveAtom && wasAlive !== isAlive) {\n            this.aliveAtom.reportChanged();\n        }\n    }\n    fireInternalHook(name) {\n        if (this._hookSubscribers) {\n            this._hookSubscribers.emit(name, this, name);\n        }\n    }\n    registerHook(hook, hookHandler) {\n        if (!this._hookSubscribers) {\n            this._hookSubscribers = new EventHandlers();\n        }\n        return this._hookSubscribers.register(hook, hookHandler);\n    }\n    get parent() {\n        return this._parent;\n    }\n    constructor(type, parent, subpath, environment) {\n        Object.defineProperty(this, \"type\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: type\n        });\n        Object.defineProperty(this, \"environment\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: environment\n        });\n        Object.defineProperty(this, \"_escapedSubpath\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: void 0\n        });\n        Object.defineProperty(this, \"_subpath\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: void 0\n        });\n        Object.defineProperty(this, \"_subpathUponDeath\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: void 0\n        });\n        Object.defineProperty(this, \"_pathUponDeath\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: void 0\n        });\n        Object.defineProperty(this, \"storedValue\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: void 0\n        }); // usually the same type as the value, but not always (such as with references)\n        Object.defineProperty(this, \"aliveAtom\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: void 0\n        });\n        Object.defineProperty(this, \"_state\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: NodeLifeCycle.INITIALIZING\n        });\n        Object.defineProperty(this, \"_hookSubscribers\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: void 0\n        });\n        Object.defineProperty(this, \"_parent\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: void 0\n        });\n        Object.defineProperty(this, \"pathAtom\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: void 0\n        });\n        this.environment = environment;\n        this.baseSetParent(parent, subpath);\n    }\n    getReconciliationType() {\n        return this.type;\n    }\n    baseSetParent(parent, subpath) {\n        this._parent = parent;\n        this._subpath = subpath;\n        this._escapedSubpath = undefined; // regenerate when needed\n        if (this.pathAtom) {\n            this.pathAtom.reportChanged();\n        }\n    }\n    /*\n     * Returns (escaped) path representation as string\n     */\n    get path() {\n        return this.getEscapedPath(true);\n    }\n    getEscapedPath(reportObserved) {\n        if (reportObserved) {\n            if (!this.pathAtom) {\n                this.pathAtom = createAtom(`path`);\n            }\n            this.pathAtom.reportObserved();\n        }\n        if (!this.parent)\n            return \"\";\n        // regenerate escaped subpath if needed\n        if (this._escapedSubpath === undefined) {\n            this._escapedSubpath = !this._subpath ? \"\" : escapeJsonPath(this._subpath);\n        }\n        return this.parent.getEscapedPath(reportObserved) + \"/\" + this._escapedSubpath;\n    }\n    get isRoot() {\n        return this.parent === null;\n    }\n    get isAlive() {\n        return this.state !== NodeLifeCycle.DEAD;\n    }\n    get isDetaching() {\n        return this.state === NodeLifeCycle.DETACHING;\n    }\n    get observableIsAlive() {\n        if (!this.aliveAtom) {\n            this.aliveAtom = createAtom(`alive`);\n        }\n        this.aliveAtom.reportObserved();\n        return this.isAlive;\n    }\n    baseFinalizeCreation(whenFinalized) {\n        if (devMode()) {\n            if (!this.isAlive) {\n                // istanbul ignore next\n                throw new MstError(\"assertion failed: cannot finalize the creation of a node that is already dead\");\n            }\n        }\n        // goal: afterCreate hooks runs depth-first. After attach runs parent first, so on afterAttach the parent has completed already\n        if (this.state === NodeLifeCycle.CREATED) {\n            if (this.parent) {\n                if (this.parent.state !== NodeLifeCycle.FINALIZED) {\n                    // parent not ready yet, postpone\n                    return;\n                }\n                this.fireHook(Hook.afterAttach);\n            }\n            this.state = NodeLifeCycle.FINALIZED;\n            if (whenFinalized) {\n                whenFinalized();\n            }\n        }\n    }\n    baseFinalizeDeath() {\n        if (this._hookSubscribers) {\n            this._hookSubscribers.clearAll();\n        }\n        this._subpathUponDeath = this._subpath;\n        this._pathUponDeath = this.getEscapedPath(false);\n        this.baseSetParent(null, \"\");\n        this.state = NodeLifeCycle.DEAD;\n    }\n    baseAboutToDie() {\n        this.fireHook(Hook.beforeDestroy);\n    }\n}\n\n/**\n * @internal\n * @hidden\n */\nclass ScalarNode extends BaseNode {\n    constructor(simpleType, parent, subpath, environment, initialSnapshot) {\n        super(simpleType, parent, subpath, environment);\n        try {\n            this.storedValue = simpleType.createNewInstance(initialSnapshot);\n        }\n        catch (e) {\n            // short-cut to die the instance, to avoid the snapshot computed starting to throw...\n            this.state = NodeLifeCycle.DEAD;\n            throw e;\n        }\n        this.state = NodeLifeCycle.CREATED;\n        // for scalar nodes there's no point in firing this event since it would fire on the constructor, before\n        // anybody can actually register for/listen to it\n        // this.fireHook(Hook.AfterCreate)\n        this.finalizeCreation();\n    }\n    get root() {\n        // future optimization: store root ref in the node and maintain it\n        if (!this.parent)\n            throw new MstError(`This scalar node is not part of a tree`);\n        return this.parent.root;\n    }\n    setParent(newParent, subpath) {\n        const parentChanged = this.parent !== newParent;\n        const subpathChanged = this.subpath !== subpath;\n        if (!parentChanged && !subpathChanged) {\n            return;\n        }\n        if (devMode()) {\n            if (!subpath) {\n                // istanbul ignore next\n                throw new MstError(\"assertion failed: subpath expected\");\n            }\n            if (!newParent) {\n                // istanbul ignore next\n                throw new MstError(\"assertion failed: parent expected\");\n            }\n            if (parentChanged) {\n                // istanbul ignore next\n                throw new MstError(\"assertion failed: scalar nodes cannot change their parent\");\n            }\n        }\n        this.environment = undefined; // use parent's\n        this.baseSetParent(this.parent, subpath);\n    }\n    get snapshot() {\n        return freeze(this.getSnapshot());\n    }\n    getSnapshot() {\n        return this.type.getSnapshot(this);\n    }\n    toString() {\n        const path = (this.isAlive ? this.path : this.pathUponDeath) || \"<root>\";\n        return `${this.type.name}@${path}${this.isAlive ? \"\" : \" [dead]\"}`;\n    }\n    die() {\n        if (!this.isAlive || this.state === NodeLifeCycle.DETACHING)\n            return;\n        this.aboutToDie();\n        this.finalizeDeath();\n    }\n    finalizeCreation() {\n        this.baseFinalizeCreation();\n    }\n    aboutToDie() {\n        this.baseAboutToDie();\n    }\n    finalizeDeath() {\n        this.baseFinalizeDeath();\n    }\n    fireHook(name) {\n        this.fireInternalHook(name);\n    }\n}\nScalarNode.prototype.die = action(ScalarNode.prototype.die);\n\n// noinspection ES6UnusedImports\nlet nextNodeId = 1;\nvar ObservableInstanceLifecycle;\n(function (ObservableInstanceLifecycle) {\n    // the actual observable instance has not been created yet\n    ObservableInstanceLifecycle[ObservableInstanceLifecycle[\"UNINITIALIZED\"] = 0] = \"UNINITIALIZED\";\n    // the actual observable instance is being created\n    ObservableInstanceLifecycle[ObservableInstanceLifecycle[\"CREATING\"] = 1] = \"CREATING\";\n    // the actual observable instance has been created\n    ObservableInstanceLifecycle[ObservableInstanceLifecycle[\"CREATED\"] = 2] = \"CREATED\";\n})(ObservableInstanceLifecycle || (ObservableInstanceLifecycle = {}));\nvar InternalEvents;\n(function (InternalEvents) {\n    InternalEvents[\"Dispose\"] = \"dispose\";\n    InternalEvents[\"Patch\"] = \"patch\";\n    InternalEvents[\"Snapshot\"] = \"snapshot\";\n})(InternalEvents || (InternalEvents = {}));\nconst snapshotReactionOptions = {\n    onError(e) {\n        throw e;\n    }\n};\n/**\n * @internal\n * @hidden\n */\nclass ObjectNode extends BaseNode {\n    applyPatches(patches) {\n        this.createObservableInstanceIfNeeded();\n        this._applyPatches(patches);\n    }\n    applySnapshot(snapshot) {\n        this.createObservableInstanceIfNeeded();\n        this._applySnapshot(snapshot);\n    }\n    constructor(complexType, parent, subpath, environment, initialValue) {\n        super(complexType, parent, subpath, environment);\n        Object.defineProperty(this, \"nodeId\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: ++nextNodeId\n        });\n        Object.defineProperty(this, \"identifierAttribute\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: void 0\n        });\n        Object.defineProperty(this, \"identifier\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: void 0\n        }); // Identifier is always normalized to string, even if the identifier property isn't\n        Object.defineProperty(this, \"unnormalizedIdentifier\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: void 0\n        });\n        Object.defineProperty(this, \"identifierCache\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: void 0\n        });\n        Object.defineProperty(this, \"isProtectionEnabled\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: true\n        });\n        Object.defineProperty(this, \"middlewares\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: void 0\n        });\n        Object.defineProperty(this, \"hasSnapshotPostProcessor\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: false\n        });\n        Object.defineProperty(this, \"_applyPatches\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: void 0\n        });\n        Object.defineProperty(this, \"_applySnapshot\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: void 0\n        });\n        Object.defineProperty(this, \"_autoUnbox\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: true\n        }); // unboxing is disabled when reading child nodes\n        Object.defineProperty(this, \"_isRunningAction\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: false\n        }); // only relevant for root\n        Object.defineProperty(this, \"_hasSnapshotReaction\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: false\n        });\n        Object.defineProperty(this, \"_endOfActionCallbacks\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: void 0\n        });\n        Object.defineProperty(this, \"_observableInstanceState\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: ObservableInstanceLifecycle.UNINITIALIZED\n        });\n        Object.defineProperty(this, \"_childNodes\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: void 0\n        });\n        Object.defineProperty(this, \"_initialSnapshot\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: void 0\n        });\n        Object.defineProperty(this, \"_cachedInitialSnapshot\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: void 0\n        });\n        Object.defineProperty(this, \"_cachedInitialSnapshotCreated\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: false\n        });\n        Object.defineProperty(this, \"_snapshotComputed\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: void 0\n        });\n        Object.defineProperty(this, \"_snapshotUponDeath\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: void 0\n        });\n        // #region internal event handling\n        Object.defineProperty(this, \"_internalEvents\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: void 0\n        });\n        this._snapshotComputed = computed(() => freeze(this.getSnapshot()));\n        this.unbox = this.unbox.bind(this);\n        this._initialSnapshot = freeze(initialValue);\n        this.identifierAttribute = complexType.identifierAttribute;\n        if (!parent) {\n            this.identifierCache = new IdentifierCache();\n        }\n        this._childNodes = complexType.initializeChildNodes(this, this._initialSnapshot);\n        // identifier can not be changed during lifecycle of a node\n        // so we safely can read it from initial snapshot\n        this.identifier = null;\n        this.unnormalizedIdentifier = null;\n        if (this.identifierAttribute && this._initialSnapshot) {\n            let id = this._initialSnapshot[this.identifierAttribute];\n            if (id === undefined) {\n                // try with the actual node if not (for optional identifiers)\n                const childNode = this._childNodes[this.identifierAttribute];\n                if (childNode) {\n                    id = childNode.value;\n                }\n            }\n            if (typeof id !== \"string\" && typeof id !== \"number\" && typeof id !== \"bigint\") {\n                throw new MstError(`Instance identifier '${this.identifierAttribute}' for type '${this.type.name}' must be a string, a number or a bigint`);\n            }\n            // normalize internal identifier to string\n            this.identifier = normalizeIdentifier(id);\n            this.unnormalizedIdentifier = id;\n        }\n        if (!parent) {\n            this.identifierCache.addNodeToCache(this);\n        }\n        else {\n            parent.root.identifierCache.addNodeToCache(this);\n        }\n    }\n    createObservableInstanceIfNeeded(fireHooks = true) {\n        if (this._observableInstanceState === ObservableInstanceLifecycle.UNINITIALIZED) {\n            this.createObservableInstance(fireHooks);\n        }\n    }\n    createObservableInstance(fireHooks = true) {\n        if (devMode()) {\n            if (this.state !== NodeLifeCycle.INITIALIZING) {\n                // istanbul ignore next\n                throw new MstError(\"assertion failed: the creation of the observable instance must be done on the initializing phase\");\n            }\n        }\n        this._observableInstanceState = ObservableInstanceLifecycle.CREATING;\n        // make sure the parent chain is created as well\n        // array with parent chain from parent to child\n        const parentChain = [];\n        let parent = this.parent;\n        // for performance reasons we never go back further than the most direct\n        // uninitialized parent\n        // this is done to avoid traversing the whole tree to the root when using\n        // the same reference again\n        while (parent &&\n            parent._observableInstanceState === ObservableInstanceLifecycle.UNINITIALIZED) {\n            parentChain.unshift(parent);\n            parent = parent.parent;\n        }\n        // initialize the uninitialized parent chain from parent to child\n        for (const p of parentChain) {\n            // delay firing hooks until after all parents have been created\n            p.createObservableInstanceIfNeeded(false);\n        }\n        const type = this.type;\n        try {\n            this.storedValue = type.createNewInstance(this._childNodes);\n            this.preboot();\n            this._isRunningAction = true;\n            type.finalizeNewInstance(this, this.storedValue);\n        }\n        catch (e) {\n            // short-cut to die the instance, to avoid the snapshot computed starting to throw...\n            this.state = NodeLifeCycle.DEAD;\n            throw e;\n        }\n        finally {\n            this._isRunningAction = false;\n        }\n        this._observableInstanceState = ObservableInstanceLifecycle.CREATED;\n        this._snapshotComputed.trackAndCompute();\n        if (this.isRoot)\n            this._addSnapshotReaction();\n        this._childNodes = EMPTY_OBJECT;\n        this.state = NodeLifeCycle.CREATED;\n        if (fireHooks) {\n            this.fireHook(Hook.afterCreate);\n            // Note that the parent might not be finalized at this point\n            // so afterAttach won't be called until later in that case\n            this.finalizeCreation();\n            // fire the hooks of the parents that we created\n            for (const p of parentChain.reverse()) {\n                p.fireHook(Hook.afterCreate);\n                // This will call afterAttach on the child if necessary\n                p.finalizeCreation();\n            }\n        }\n    }\n    get root() {\n        const parent = this.parent;\n        return parent ? parent.root : this;\n    }\n    enqueueEndOfAction(callback) {\n        const root = this.root;\n        if (!root._endOfActionCallbacks) {\n            root._endOfActionCallbacks = [];\n        }\n        root._endOfActionCallbacks.push(callback);\n    }\n    flushEndOfActionCallbacks() {\n        const root = this.root;\n        while (root._endOfActionCallbacks && root._endOfActionCallbacks.length > 0) {\n            const callbacks = root._endOfActionCallbacks;\n            root._endOfActionCallbacks = undefined;\n            callbacks.forEach(callback => {\n                callback();\n            });\n        }\n    }\n    clearParent() {\n        if (!this.parent)\n            return;\n        // detach if attached\n        this.fireHook(Hook.beforeDetach);\n        const previousState = this.state;\n        this.state = NodeLifeCycle.DETACHING;\n        const root = this.root;\n        const newEnv = root.environment;\n        const newIdCache = root.identifierCache.splitCache(this);\n        try {\n            this.parent.removeChild(this.subpath);\n            this.baseSetParent(null, \"\");\n            this.environment = newEnv;\n            this.identifierCache = newIdCache;\n        }\n        finally {\n            this.state = previousState;\n        }\n    }\n    setParent(newParent, subpath) {\n        const parentChanged = newParent !== this.parent;\n        const subpathChanged = subpath !== this.subpath;\n        if (!parentChanged && !subpathChanged) {\n            return;\n        }\n        if (devMode()) {\n            if (!subpath) {\n                // istanbul ignore next\n                throw new MstError(\"assertion failed: subpath expected\");\n            }\n            if (!newParent) {\n                // istanbul ignore next\n                throw new MstError(\"assertion failed: new parent expected\");\n            }\n            if (this.parent && parentChanged) {\n                throw new MstError(`A node cannot exists twice in the state tree. Failed to add ${this} to path '${newParent.path}/${subpath}'.`);\n            }\n            if (!this.parent && newParent.root === this) {\n                throw new MstError(`A state tree is not allowed to contain itself. Cannot assign ${this} to path '${newParent.path}/${subpath}'`);\n            }\n            if (!this.parent &&\n                !!this.environment &&\n                this.environment !== newParent.root.environment) {\n                throw new MstError(`A state tree cannot be made part of another state tree as long as their environments are different.`);\n            }\n        }\n        if (parentChanged) {\n            // attach to new parent\n            this.environment = undefined; // will use root's\n            newParent.root.identifierCache.mergeCache(this);\n            this.baseSetParent(newParent, subpath);\n            this.fireHook(Hook.afterAttach);\n        }\n        else if (subpathChanged) {\n            // moving to a new subpath on the same parent\n            this.baseSetParent(this.parent, subpath);\n        }\n    }\n    fireHook(name) {\n        this.fireInternalHook(name);\n        const fn = this.storedValue &&\n            typeof this.storedValue === \"object\" &&\n            this.storedValue[name];\n        if (typeof fn === \"function\") {\n            // we check for it to allow old mobx peer dependencies that don't have the method to work (even when still bugged)\n            if (_allowStateChangesInsideComputed) {\n                _allowStateChangesInsideComputed(() => {\n                    fn.apply(this.storedValue);\n                });\n            }\n            else {\n                fn.apply(this.storedValue);\n            }\n        }\n    }\n    // advantage of using computed for a snapshot is that nicely respects transactions etc.\n    get snapshot() {\n        if (this.hasSnapshotPostProcessor) {\n            this.createObservableInstanceIfNeeded();\n        }\n        return this._snapshotComputed.get();\n    }\n    // NOTE: we use this method to get snapshot without creating @computed overhead\n    getSnapshot() {\n        if (!this.isAlive)\n            return this._snapshotUponDeath;\n        return this._observableInstanceState === ObservableInstanceLifecycle.CREATED\n            ? this._getActualSnapshot()\n            : this._getCachedInitialSnapshot();\n    }\n    _getActualSnapshot() {\n        return this.type.getSnapshot(this);\n    }\n    _getCachedInitialSnapshot() {\n        if (!this._cachedInitialSnapshotCreated) {\n            const type = this.type;\n            const childNodes = this._childNodes;\n            const snapshot = this._initialSnapshot;\n            this._cachedInitialSnapshot = type.processInitialSnapshot(childNodes, snapshot);\n            this._cachedInitialSnapshotCreated = true;\n        }\n        return this._cachedInitialSnapshot;\n    }\n    isRunningAction() {\n        if (this._isRunningAction)\n            return true;\n        if (this.isRoot)\n            return false;\n        return this.parent.isRunningAction();\n    }\n    assertAlive(context) {\n        const livelinessChecking = getLivelinessChecking();\n        if (!this.isAlive && livelinessChecking !== \"ignore\") {\n            const error = this._getAssertAliveError(context);\n            switch (livelinessChecking) {\n                case \"error\":\n                    throw new MstError(error);\n                case \"warn\":\n                    warnError(error);\n            }\n        }\n    }\n    _getAssertAliveError(context) {\n        const escapedPath = this.getEscapedPath(false) || this.pathUponDeath || \"\";\n        const subpath = (context.subpath && escapeJsonPath(context.subpath)) || \"\";\n        let actionContext = context.actionContext || getCurrentActionContext();\n        // try to use a real action context if possible since it includes the action name\n        if (actionContext && actionContext.type !== \"action\" && actionContext.parentActionEvent) {\n            actionContext = actionContext.parentActionEvent;\n        }\n        let actionFullPath = \"\";\n        if (actionContext && actionContext.name != null) {\n            // try to use the context, and if it not available use the node one\n            const actionPath = (actionContext && actionContext.context && getPath(actionContext.context)) ||\n                escapedPath;\n            actionFullPath = `${actionPath}.${actionContext.name}()`;\n        }\n        return `You are trying to read or write to an object that is no longer part of a state tree. (Object type: '${this.type.name}', Path upon death: '${escapedPath}', Subpath: '${subpath}', Action: '${actionFullPath}'). Either detach nodes first, or don't use objects after removing / replacing them in the tree.`;\n    }\n    getChildNode(subpath) {\n        this.assertAlive({\n            subpath\n        });\n        this._autoUnbox = false;\n        try {\n            return this._observableInstanceState === ObservableInstanceLifecycle.CREATED\n                ? this.type.getChildNode(this, subpath)\n                : this._childNodes[subpath];\n        }\n        finally {\n            this._autoUnbox = true;\n        }\n    }\n    getChildren() {\n        this.assertAlive(EMPTY_OBJECT);\n        this._autoUnbox = false;\n        try {\n            return this._observableInstanceState === ObservableInstanceLifecycle.CREATED\n                ? this.type.getChildren(this)\n                : convertChildNodesToArray(this._childNodes);\n        }\n        finally {\n            this._autoUnbox = true;\n        }\n    }\n    getChildType(propertyName) {\n        return this.type.getChildType(propertyName);\n    }\n    get isProtected() {\n        return this.root.isProtectionEnabled;\n    }\n    assertWritable(context) {\n        this.assertAlive(context);\n        if (!this.isRunningAction() && this.isProtected) {\n            throw new MstError(`Cannot modify '${this}', the object is protected and can only be modified by using an action.`);\n        }\n    }\n    removeChild(subpath) {\n        this.type.removeChild(this, subpath);\n    }\n    // bound on the constructor\n    unbox(childNode) {\n        if (!childNode)\n            return childNode;\n        this.assertAlive({\n            subpath: childNode.subpath || childNode.subpathUponDeath\n        });\n        return this._autoUnbox ? childNode.value : childNode;\n    }\n    toString() {\n        const path = (this.isAlive ? this.path : this.pathUponDeath) || \"<root>\";\n        const identifier = this.identifier ? `(id: ${this.identifier})` : \"\";\n        return `${this.type.name}@${path}${identifier}${this.isAlive ? \"\" : \" [dead]\"}`;\n    }\n    finalizeCreation() {\n        this.baseFinalizeCreation(() => {\n            for (let child of this.getChildren()) {\n                child.finalizeCreation();\n            }\n            this.fireInternalHook(Hook.afterCreationFinalization);\n        });\n    }\n    detach() {\n        if (!this.isAlive)\n            throw new MstError(`Error while detaching, node is not alive.`);\n        this.clearParent();\n    }\n    preboot() {\n        const self = this;\n        this._applyPatches = createActionInvoker(this.storedValue, \"@APPLY_PATCHES\", (patches) => {\n            patches.forEach(patch => {\n                if (!patch.path) {\n                    self.type.applySnapshot(self, patch.value);\n                    return;\n                }\n                const parts = splitJsonPath(patch.path);\n                const node = resolveNodeByPathParts(self, parts.slice(0, -1));\n                node.applyPatchLocally(parts[parts.length - 1], patch);\n            });\n        });\n        this._applySnapshot = createActionInvoker(this.storedValue, \"@APPLY_SNAPSHOT\", (snapshot) => {\n            // if the snapshot is the same as the current one, avoid performing a reconcile\n            if (snapshot === self.snapshot)\n                return;\n            // else, apply it by calling the type logic\n            return self.type.applySnapshot(self, snapshot);\n        });\n        addHiddenFinalProp(this.storedValue, \"$treenode\", this);\n        addHiddenFinalProp(this.storedValue, \"toJSON\", toJSON);\n    }\n    die() {\n        if (!this.isAlive || this.state === NodeLifeCycle.DETACHING)\n            return;\n        this.aboutToDie();\n        this.finalizeDeath();\n    }\n    aboutToDie() {\n        if (this._observableInstanceState === ObservableInstanceLifecycle.UNINITIALIZED) {\n            return;\n        }\n        this.getChildren().forEach(node => {\n            node.aboutToDie();\n        });\n        // beforeDestroy should run before the disposers since else we could end up in a situation where\n        // a disposer added with addDisposer at this stage (beforeDestroy) is actually never released\n        this.baseAboutToDie();\n        this._internalEventsEmit(InternalEvents.Dispose);\n        this._internalEventsClear(InternalEvents.Dispose);\n    }\n    finalizeDeath() {\n        // invariant: not called directly but from \"die\"\n        this.getChildren().forEach(node => {\n            node.finalizeDeath();\n        });\n        this.root.identifierCache.notifyDied(this);\n        // \"kill\" the computed prop and just store the last snapshot\n        const snapshot = this.snapshot;\n        this._snapshotUponDeath = snapshot;\n        this._internalEventsClearAll();\n        this.baseFinalizeDeath();\n    }\n    onSnapshot(onChange) {\n        this._addSnapshotReaction();\n        return this._internalEventsRegister(InternalEvents.Snapshot, onChange);\n    }\n    emitSnapshot(snapshot) {\n        this._internalEventsEmit(InternalEvents.Snapshot, snapshot);\n    }\n    onPatch(handler) {\n        return this._internalEventsRegister(InternalEvents.Patch, handler);\n    }\n    hasPatchSubscribers() {\n        if (this._internalEventsHasSubscribers(InternalEvents.Patch)) {\n            return true;\n        }\n        return this.parent ? this.parent.hasPatchSubscribers() : false;\n    }\n    emitPatch(basePatch, source) {\n        if (this._internalEventsHasSubscribers(InternalEvents.Patch)) {\n            // calculate the relative path of the patch\n            const path = source.path.substr(this.path.length) + (basePatch.path ? \"/\" + basePatch.path : \"\");\n            const localizedPatch = extend({}, basePatch, { path });\n            const [patch, reversePatch] = splitPatch(localizedPatch);\n            this._internalEventsEmit(InternalEvents.Patch, patch, reversePatch);\n        }\n        if (this.parent)\n            this.parent.emitPatch(basePatch, source);\n    }\n    hasDisposer(disposer) {\n        return this._internalEventsHas(InternalEvents.Dispose, disposer);\n    }\n    addDisposer(disposer) {\n        if (!this.hasDisposer(disposer)) {\n            this._internalEventsRegister(InternalEvents.Dispose, disposer, true);\n            return;\n        }\n        throw new MstError(\"cannot add a disposer when it is already registered for execution\");\n    }\n    removeDisposer(disposer) {\n        if (!this._internalEventsHas(InternalEvents.Dispose, disposer)) {\n            throw new MstError(\"cannot remove a disposer which was never registered for execution\");\n        }\n        this._internalEventsUnregister(InternalEvents.Dispose, disposer);\n    }\n    removeMiddleware(middleware) {\n        if (this.middlewares) {\n            const index = this.middlewares.indexOf(middleware);\n            if (index >= 0) {\n                this.middlewares.splice(index, 1);\n            }\n        }\n    }\n    addMiddleWare(handler, includeHooks = true) {\n        const middleware = { handler, includeHooks };\n        if (!this.middlewares)\n            this.middlewares = [middleware];\n        else\n            this.middlewares.push(middleware);\n        return () => {\n            this.removeMiddleware(middleware);\n        };\n    }\n    applyPatchLocally(subpath, patch) {\n        this.assertWritable({\n            subpath\n        });\n        this.createObservableInstanceIfNeeded();\n        this.type.applyPatchLocally(this, subpath, patch);\n    }\n    _addSnapshotReaction() {\n        if (!this._hasSnapshotReaction) {\n            const snapshotDisposer = reaction(() => this.snapshot, snapshot => this.emitSnapshot(snapshot), snapshotReactionOptions);\n            this.addDisposer(snapshotDisposer);\n            this._hasSnapshotReaction = true;\n        }\n    }\n    // we proxy the methods to avoid creating an EventHandlers instance when it is not needed\n    _internalEventsHasSubscribers(event) {\n        return !!this._internalEvents && this._internalEvents.hasSubscribers(event);\n    }\n    _internalEventsRegister(event, eventHandler, atTheBeginning = false) {\n        if (!this._internalEvents) {\n            this._internalEvents = new EventHandlers();\n        }\n        return this._internalEvents.register(event, eventHandler, atTheBeginning);\n    }\n    _internalEventsHas(event, eventHandler) {\n        return !!this._internalEvents && this._internalEvents.has(event, eventHandler);\n    }\n    _internalEventsUnregister(event, eventHandler) {\n        if (this._internalEvents) {\n            this._internalEvents.unregister(event, eventHandler);\n        }\n    }\n    _internalEventsEmit(event, ...args) {\n        if (this._internalEvents) {\n            this._internalEvents.emit(event, ...args);\n        }\n    }\n    _internalEventsClear(event) {\n        if (this._internalEvents) {\n            this._internalEvents.clear(event);\n        }\n    }\n    _internalEventsClearAll() {\n        if (this._internalEvents) {\n            this._internalEvents.clearAll();\n        }\n    }\n}\nObjectNode.prototype.createObservableInstance = action(ObjectNode.prototype.createObservableInstance);\nObjectNode.prototype.detach = action(ObjectNode.prototype.detach);\nObjectNode.prototype.die = action(ObjectNode.prototype.die);\n\nvar _a;\n/**\n * @internal\n * @hidden\n */\nvar TypeFlags;\n(function (TypeFlags) {\n    TypeFlags[TypeFlags[\"String\"] = 1] = \"String\";\n    TypeFlags[TypeFlags[\"Number\"] = 2] = \"Number\";\n    TypeFlags[TypeFlags[\"Boolean\"] = 4] = \"Boolean\";\n    TypeFlags[TypeFlags[\"Date\"] = 8] = \"Date\";\n    TypeFlags[TypeFlags[\"Literal\"] = 16] = \"Literal\";\n    TypeFlags[TypeFlags[\"Array\"] = 32] = \"Array\";\n    TypeFlags[TypeFlags[\"Map\"] = 64] = \"Map\";\n    TypeFlags[TypeFlags[\"Object\"] = 128] = \"Object\";\n    TypeFlags[TypeFlags[\"Frozen\"] = 256] = \"Frozen\";\n    TypeFlags[TypeFlags[\"Optional\"] = 512] = \"Optional\";\n    TypeFlags[TypeFlags[\"Reference\"] = 1024] = \"Reference\";\n    TypeFlags[TypeFlags[\"Identifier\"] = 2048] = \"Identifier\";\n    TypeFlags[TypeFlags[\"Late\"] = 4096] = \"Late\";\n    TypeFlags[TypeFlags[\"Refinement\"] = 8192] = \"Refinement\";\n    TypeFlags[TypeFlags[\"Union\"] = 16384] = \"Union\";\n    TypeFlags[TypeFlags[\"Null\"] = 32768] = \"Null\";\n    TypeFlags[TypeFlags[\"Undefined\"] = 65536] = \"Undefined\";\n    TypeFlags[TypeFlags[\"Integer\"] = 131072] = \"Integer\";\n    TypeFlags[TypeFlags[\"Custom\"] = 262144] = \"Custom\";\n    TypeFlags[TypeFlags[\"SnapshotProcessor\"] = 524288] = \"SnapshotProcessor\";\n    TypeFlags[TypeFlags[\"Lazy\"] = 1048576] = \"Lazy\";\n    TypeFlags[TypeFlags[\"Finite\"] = 2097152] = \"Finite\";\n    TypeFlags[TypeFlags[\"Float\"] = 4194304] = \"Float\";\n    TypeFlags[TypeFlags[\"BigInt\"] = 8388608] = \"BigInt\";\n})(TypeFlags || (TypeFlags = {}));\n/**\n * @internal\n * @hidden\n */\nconst cannotDetermineSubtype = \"cannotDetermine\";\n/** @hidden */\nconst $type = Symbol(\"$type\");\n/**\n * A base type produces a MST node (Node in the state tree)\n *\n * @internal\n * @hidden\n */\nclass BaseType {\n    constructor(name) {\n        Object.defineProperty(this, _a, {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: void 0\n        });\n        // these are just to make inner types avaialable to inherited classes\n        Object.defineProperty(this, \"C\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: void 0\n        });\n        Object.defineProperty(this, \"S\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: void 0\n        });\n        Object.defineProperty(this, \"T\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: void 0\n        });\n        Object.defineProperty(this, \"N\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: void 0\n        });\n        Object.defineProperty(this, \"isType\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: true\n        });\n        Object.defineProperty(this, \"name\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: void 0\n        });\n        this.name = name;\n    }\n    create(snapshot, environment) {\n        typecheckInternal(this, snapshot);\n        return this.instantiate(null, \"\", environment, snapshot).value;\n    }\n    getSnapshot(node, applyPostProcess) {\n        // istanbul ignore next\n        throw new MstError(\"unimplemented method\");\n    }\n    isAssignableFrom(type) {\n        return type === this;\n    }\n    validate(value, context) {\n        const node = getStateTreeNodeSafe(value);\n        if (node) {\n            const valueType = getType(value);\n            return this.isAssignableFrom(valueType)\n                ? typeCheckSuccess()\n                : typeCheckFailure(context, value);\n            // it is tempting to compare snapshots, but in that case we should always clone on assignments...\n        }\n        return this.isValidSnapshot(value, context);\n    }\n    is(thing) {\n        return this.validate(thing, [{ path: \"\", type: this }]).length === 0;\n    }\n    get Type() {\n        // istanbul ignore next\n        throw new MstError(\"Factory.Type should not be actually called. It is just a Type signature that can be used at compile time with Typescript, by using `typeof type.Type`\");\n    }\n    get TypeWithoutSTN() {\n        // istanbul ignore next\n        throw new MstError(\"Factory.TypeWithoutSTN should not be actually called. It is just a Type signature that can be used at compile time with Typescript, by using `typeof type.TypeWithoutSTN`\");\n    }\n    get SnapshotType() {\n        // istanbul ignore next\n        throw new MstError(\"Factory.SnapshotType should not be actually called. It is just a Type signature that can be used at compile time with Typescript, by using `typeof type.SnapshotType`\");\n    }\n    get CreationType() {\n        // istanbul ignore next\n        throw new MstError(\"Factory.CreationType should not be actually called. It is just a Type signature that can be used at compile time with Typescript, by using `typeof type.CreationType`\");\n    }\n}\n_a = $type;\nBaseType.prototype.create = action(BaseType.prototype.create);\n/**\n * A complex type produces a MST node (Node in the state tree)\n *\n * @internal\n * @hidden\n */\nclass ComplexType extends BaseType {\n    constructor(name) {\n        super(name);\n        Object.defineProperty(this, \"identifierAttribute\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: void 0\n        });\n    }\n    create(snapshot = this.getDefaultSnapshot(), environment) {\n        return super.create(snapshot, environment);\n    }\n    getValue(node) {\n        node.createObservableInstanceIfNeeded();\n        return node.storedValue;\n    }\n    isMatchingSnapshotId(current, snapshot) {\n        return (!current.identifierAttribute ||\n            current.identifier ===\n                normalizeIdentifier(snapshot[current.identifierAttribute]));\n    }\n    tryToReconcileNode(current, newValue) {\n        if (current.isDetaching)\n            return false;\n        if (current.snapshot === newValue) {\n            // newValue is the current snapshot of the node, noop\n            return true;\n        }\n        if (isStateTreeNode(newValue) && getStateTreeNode(newValue) === current) {\n            // the current node is the same as the new one\n            return true;\n        }\n        if (current.type === this &&\n            isMutable(newValue) &&\n            !isStateTreeNode(newValue) &&\n            this.isMatchingSnapshotId(current, newValue)) {\n            // the newValue has no node, so can be treated like a snapshot\n            // we can reconcile\n            current.applySnapshot(newValue);\n            return true;\n        }\n        return false;\n    }\n    reconcile(current, newValue, parent, subpath) {\n        const nodeReconciled = this.tryToReconcileNode(current, newValue);\n        if (nodeReconciled) {\n            current.setParent(parent, subpath);\n            return current;\n        }\n        // current node cannot be recycled in any way\n        current.die(); // noop if detaching\n        // attempt to reuse the new one\n        if (isStateTreeNode(newValue) && this.isAssignableFrom(getType(newValue))) {\n            // newValue is a Node as well, move it here..\n            const newNode = getStateTreeNode(newValue);\n            newNode.setParent(parent, subpath);\n            return newNode;\n        }\n        // nothing to do, we have to create a new node\n        return this.instantiate(parent, subpath, undefined, newValue);\n    }\n    getSubTypes() {\n        return null;\n    }\n}\nComplexType.prototype.create = action(ComplexType.prototype.create);\n/**\n * @internal\n * @hidden\n */\nclass SimpleType extends BaseType {\n    createNewInstance(snapshot) {\n        return snapshot;\n    }\n    getValue(node) {\n        // if we ever find a case where scalar nodes can be accessed without iterating through its parent\n        // uncomment this to make sure the parent chain is created when this is accessed\n        // if (node.parent) {\n        //     node.parent.createObservableInstanceIfNeeded()\n        // }\n        return node.storedValue;\n    }\n    getSnapshot(node) {\n        return node.storedValue;\n    }\n    reconcile(current, newValue, parent, subpath) {\n        // reconcile only if type and value are still the same, and only if the node is not detaching\n        if (!current.isDetaching && current.type === this && current.storedValue === newValue) {\n            return current;\n        }\n        const res = this.instantiate(parent, subpath, undefined, newValue);\n        current.die(); // noop if detaching\n        return res;\n    }\n    getSubTypes() {\n        return null;\n    }\n}\nfunction canApplyDirectSnapshot(childType, childNode, newValue) {\n    const reconciliationType = childNode.getReconciliationType();\n    const expectedReconciliationType = resolveDirectApplyType(childType);\n    // Only types that reconcile as the same transparent-wrapper-adjusted type can safely reuse\n    // the existing child node. Wrappers with their own validation or snapshot semantics\n    // intentionally keep a distinct reconciliation type so they fall back to the validated path.\n    const hasMatchingReconciliationType = reconciliationType === expectedReconciliationType;\n    return (childNode instanceof ObjectNode &&\n        hasMatchingReconciliationType &&\n        reconciliationType instanceof ComplexType &&\n        isMutable(newValue) &&\n        !isStateTreeNode(newValue) &&\n        reconciliationType.isMatchingSnapshotId(childNode, newValue));\n}\nfunction resolveDirectApplyType(type) {\n    const subTypes = type.getSubTypes();\n    if (!subTypes ||\n        Array.isArray(subTypes) ||\n        subTypes === cannotDetermineSubtype ||\n        !canUnwrapDirectApplyType(type)) {\n        return type;\n    }\n    // Only unwrap wrappers that are transparent for direct apply. Wrappers with their own\n    // validation or snapshot processing must keep their wrapper identity here.\n    return resolveDirectApplyType(subTypes);\n}\nfunction canUnwrapDirectApplyType(type) {\n    const transparentWrapperFlags = TypeFlags.Optional | TypeFlags.Late;\n    const nonTransparentWrapperFlags = TypeFlags.Refinement | TypeFlags.SnapshotProcessor | TypeFlags.Union;\n    return ((type.flags & transparentWrapperFlags) > 0 &&\n        (type.flags & nonTransparentWrapperFlags) === 0);\n}\n/**\n * Returns if a given value represents a type.\n *\n * @param value Value to check.\n * @returns `true` if the value is a type.\n */\nfunction isType(value) {\n    return typeof value === \"object\" && value && value.isType === true;\n}\n/**\n * @internal\n * @hidden\n */\nfunction assertIsType(type, argNumber) {\n    assertArg(type, isType, \"mobx-state-tree type\", argNumber);\n}\n\nconst runningActions = new Map();\n/**\n * Note: Consider migrating to `createActionTrackingMiddleware2`, it is easier to use.\n *\n * Convenience utility to create action based middleware that supports async processes more easily.\n * All hooks are called for both synchronous and asynchronous actions. Except that either `onSuccess` or `onFail` is called\n *\n * The create middleware tracks the process of an action (assuming it passes the `filter`).\n * `onResume` can return any value, which will be passed as second argument to any other hook. This makes it possible to keep state during a process.\n *\n * See the `atomic` middleware for an example\n *\n * @param hooks\n * @returns\n */\nfunction createActionTrackingMiddleware(hooks) {\n    return function actionTrackingMiddleware(call, next, abort) {\n        switch (call.type) {\n            case \"action\": {\n                if (!hooks.filter || hooks.filter(call) === true) {\n                    const context = hooks.onStart(call);\n                    hooks.onResume(call, context);\n                    runningActions.set(call.id, {\n                        call,\n                        context,\n                        async: false\n                    });\n                    try {\n                        const res = next(call);\n                        hooks.onSuspend(call, context);\n                        if (runningActions.get(call.id).async === false) {\n                            runningActions.delete(call.id);\n                            hooks.onSuccess(call, context, res);\n                        }\n                        return res;\n                    }\n                    catch (e) {\n                        runningActions.delete(call.id);\n                        hooks.onFail(call, context, e);\n                        throw e;\n                    }\n                }\n                else {\n                    return next(call);\n                }\n            }\n            case \"flow_spawn\": {\n                const root = runningActions.get(call.rootId);\n                root.async = true;\n                return next(call);\n            }\n            case \"flow_resume\":\n            case \"flow_resume_error\": {\n                const root = runningActions.get(call.rootId);\n                hooks.onResume(call, root.context);\n                try {\n                    return next(call);\n                }\n                finally {\n                    hooks.onSuspend(call, root.context);\n                }\n            }\n            case \"flow_throw\": {\n                const root = runningActions.get(call.rootId);\n                runningActions.delete(call.rootId);\n                hooks.onFail(call, root.context, call.args[0]);\n                return next(call);\n            }\n            case \"flow_return\": {\n                const root = runningActions.get(call.rootId);\n                runningActions.delete(call.rootId);\n                hooks.onSuccess(call, root.context, call.args[0]);\n                return next(call);\n            }\n        }\n    };\n}\n\nclass RunningAction {\n    constructor(hooks, call) {\n        Object.defineProperty(this, \"hooks\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: hooks\n        });\n        Object.defineProperty(this, \"call\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: call\n        });\n        Object.defineProperty(this, \"flowsPending\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: 0\n        });\n        Object.defineProperty(this, \"running\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: true\n        });\n        if (hooks) {\n            hooks.onStart(call);\n        }\n    }\n    finish(error) {\n        if (this.running) {\n            this.running = false;\n            if (this.hooks) {\n                this.hooks.onFinish(this.call, error);\n            }\n        }\n    }\n    incFlowsPending() {\n        this.flowsPending++;\n    }\n    decFlowsPending() {\n        this.flowsPending--;\n    }\n    get hasFlowsPending() {\n        return this.flowsPending > 0;\n    }\n}\n/**\n * Convenience utility to create action based middleware that supports async processes more easily.\n * The flow is like this:\n * - for each action: if filter passes -> `onStart` -> (inner actions recursively) -> `onFinish`\n *\n * Example: if we had an action `a` that called inside an action `b1`, then `b2` the flow would be:\n * - `filter(a)`\n * - `onStart(a)`\n *   - `filter(b1)`\n *   - `onStart(b1)`\n *   - `onFinish(b1)`\n *   - `filter(b2)`\n *   - `onStart(b2)`\n *   - `onFinish(b2)`\n * - `onFinish(a)`\n *\n * The flow is the same no matter if the actions are sync or async.\n *\n * See the `atomic` middleware for an example\n *\n * @param hooks\n * @returns\n */\nfunction createActionTrackingMiddleware2(middlewareHooks) {\n    const runningActions = new Map();\n    return function actionTrackingMiddleware(call, next) {\n        // find parentRunningAction\n        const parentRunningAction = call.parentActionEvent\n            ? runningActions.get(call.parentActionEvent.id)\n            : undefined;\n        if (call.type === \"action\") {\n            const newCall = Object.assign(Object.assign({}, call), { \n                // make a shallow copy of the parent action env\n                env: parentRunningAction && parentRunningAction.call.env, parentCall: parentRunningAction && parentRunningAction.call });\n            const passesFilter = !middlewareHooks.filter || middlewareHooks.filter(newCall);\n            const hooks = passesFilter ? middlewareHooks : undefined;\n            const runningAction = new RunningAction(hooks, newCall);\n            runningActions.set(call.id, runningAction);\n            let res;\n            try {\n                res = next(call);\n            }\n            catch (e) {\n                runningActions.delete(call.id);\n                runningAction.finish(e);\n                throw e;\n            }\n            // sync action finished\n            if (!runningAction.hasFlowsPending) {\n                runningActions.delete(call.id);\n                runningAction.finish();\n            }\n            return res;\n        }\n        else {\n            if (!parentRunningAction) {\n                return next(call);\n            }\n            switch (call.type) {\n                case \"flow_spawn\": {\n                    parentRunningAction.incFlowsPending();\n                    return next(call);\n                }\n                case \"flow_resume\":\n                case \"flow_resume_error\": {\n                    return next(call);\n                }\n                case \"flow_throw\": {\n                    const error = call.args[0];\n                    try {\n                        return next(call);\n                    }\n                    finally {\n                        parentRunningAction.decFlowsPending();\n                        if (!parentRunningAction.hasFlowsPending) {\n                            runningActions.delete(call.parentActionEvent.id);\n                            parentRunningAction.finish(error);\n                        }\n                    }\n                }\n                case \"flow_return\": {\n                    try {\n                        return next(call);\n                    }\n                    finally {\n                        parentRunningAction.decFlowsPending();\n                        if (!parentRunningAction.hasFlowsPending) {\n                            runningActions.delete(call.parentActionEvent.id);\n                            parentRunningAction.finish();\n                        }\n                    }\n                }\n            }\n        }\n    };\n}\n\nfunction serializeArgument(node, actionName, index, arg) {\n    if (arg instanceof Date)\n        return { $MST_DATE: arg.getTime() };\n    if (isPrimitive(arg))\n        return arg;\n    // We should not serialize MST nodes, even if we can, because we don't know if the receiving party can handle a raw snapshot instead of an\n    // MST type instance. So if one wants to serialize a MST node that was pass in, either explitly pass: 1: an id, 2: a (relative) path, 3: a snapshot\n    if (isStateTreeNode(arg))\n        return serializeTheUnserializable(`[MSTNode: ${getType(arg).name}]`);\n    if (typeof arg === \"function\")\n        return serializeTheUnserializable(`[function]`);\n    if (typeof arg === \"object\" && !isPlainObject(arg) && !isArray(arg))\n        return serializeTheUnserializable(`[object ${(arg && arg.constructor && arg.constructor.name) ||\n            \"Complex Object\"}]`);\n    try {\n        // Check if serializable, cycle free etc...\n        // MWE: there must be a better way....\n        JSON.stringify(arg); // or throws\n        return arg;\n    }\n    catch (e) {\n        return serializeTheUnserializable(\"\" + e);\n    }\n}\nfunction deserializeArgument(adm, value) {\n    if (value && typeof value === \"object\" && \"$MST_DATE\" in value)\n        return new Date(value[\"$MST_DATE\"]);\n    return value;\n}\nfunction serializeTheUnserializable(baseType) {\n    return {\n        $MST_UNSERIALIZABLE: true,\n        type: baseType\n    };\n}\n/**\n * Applies an action or a series of actions in a single MobX transaction.\n * Does not return any value\n * Takes an action description as produced by the `onAction` middleware.\n *\n * @param target\n * @param actions\n */\nfunction applyAction(target, actions) {\n    // check all arguments\n    assertIsStateTreeNode(target, 1);\n    assertArg(actions, a => typeof a === \"object\", \"object or array\", 2);\n    runInAction(() => {\n        asArray(actions).forEach(action => baseApplyAction(target, action));\n    });\n}\nfunction baseApplyAction(target, action) {\n    const resolvedTarget = tryResolve(target, action.path || \"\");\n    if (!resolvedTarget)\n        throw new MstError(`Invalid action path: ${action.path || \"\"}`);\n    const node = getStateTreeNode(resolvedTarget);\n    // Reserved functions\n    if (action.name === \"@APPLY_PATCHES\") {\n        return applyPatch.call(null, resolvedTarget, action.args[0]);\n    }\n    if (action.name === \"@APPLY_SNAPSHOT\") {\n        return applySnapshot.call(null, resolvedTarget, action.args[0]);\n    }\n    if (!(typeof resolvedTarget[action.name] === \"function\"))\n        throw new MstError(`Action '${action.name}' does not exist in '${node.path}'`);\n    return resolvedTarget[action.name].apply(resolvedTarget, action.args ? action.args.map(v => deserializeArgument(node, v)) : []);\n}\n/**\n * Small abstraction around `onAction` and `applyAction`, attaches an action listener to a tree and records all the actions emitted.\n * Returns an recorder object with the following signature:\n *\n * Example:\n * ```ts\n * export interface IActionRecorder {\n *      // the recorded actions\n *      actions: ISerializedActionCall[]\n *      // true if currently recording\n *      recording: boolean\n *      // stop recording actions\n *      stop(): void\n *      // resume recording actions\n *      resume(): void\n *      // apply all the recorded actions on the given object\n *      replay(target: IAnyStateTreeNode): void\n * }\n * ```\n *\n * The optional filter function allows to skip recording certain actions.\n *\n * @param subject\n * @returns\n */\nfunction recordActions(subject, filter) {\n    // check all arguments\n    assertIsStateTreeNode(subject, 1);\n    const actions = [];\n    const listener = (call) => {\n        const recordThis = filter ? filter(call, getRunningActionContext()) : true;\n        if (recordThis) {\n            actions.push(call);\n        }\n    };\n    let disposer;\n    const recorder = {\n        actions,\n        get recording() {\n            return !!disposer;\n        },\n        stop() {\n            if (disposer) {\n                disposer();\n                disposer = undefined;\n            }\n        },\n        resume() {\n            if (disposer)\n                return;\n            disposer = onAction(subject, listener);\n        },\n        replay(target) {\n            applyAction(target, actions);\n        }\n    };\n    recorder.resume();\n    return recorder;\n}\n/**\n * Registers a function that will be invoked for each action that is called on the provided model instance, or to any of its children.\n * See [actions](https://github.com/mobxjs/mobx-state-tree#actions) for more details. onAction events are emitted only for the outermost called action in the stack.\n * Action can also be intercepted by middleware using addMiddleware to change the function call before it will be run.\n *\n * Not all action arguments might be serializable. For unserializable arguments, a struct like `{ $MST_UNSERIALIZABLE: true, type: \"someType\" }` will be generated.\n * MST Nodes are considered non-serializable as well (they could be serialized as there snapshot, but it is uncertain whether an replaying party will be able to handle such a non-instantiated snapshot).\n * Rather, when using `onAction` middleware, one should consider in passing arguments which are 1: an id, 2: a (relative) path, or 3: a snapshot. Instead of a real MST node.\n *\n * Example:\n * ```ts\n * const Todo = types.model({\n *   task: types.string\n * })\n *\n * const TodoStore = types.model({\n *   todos: types.array(Todo)\n * }).actions(self => ({\n *   add(todo) {\n *     self.todos.push(todo);\n *   }\n * }))\n *\n * const s = TodoStore.create({ todos: [] })\n *\n * let disposer = onAction(s, (call) => {\n *   console.log(call);\n * })\n *\n * s.add({ task: \"Grab a coffee\" })\n * // Logs: { name: \"add\", path: \"\", args: [{ task: \"Grab a coffee\" }] }\n * ```\n *\n * @param target\n * @param listener\n * @param attachAfter (default false) fires the listener *after* the action has executed instead of before.\n * @returns\n */\nfunction onAction(target, listener, attachAfter = false) {\n    // check all arguments\n    assertIsStateTreeNode(target, 1);\n    if (devMode()) {\n        if (!isRoot(target))\n            warnError(\"Warning: Attaching onAction listeners to non root nodes is dangerous: No events will be emitted for actions initiated higher up in the tree.\");\n        if (!isProtected(target))\n            warnError(\"Warning: Attaching onAction listeners to non protected nodes is dangerous: No events will be emitted for direct modifications without action.\");\n    }\n    return addMiddleware(target, function handler(rawCall, next) {\n        if (rawCall.type === \"action\" && rawCall.id === rawCall.rootId) {\n            const sourceNode = getStateTreeNode(rawCall.context);\n            const info = {\n                name: rawCall.name,\n                path: getRelativePathBetweenNodes(getStateTreeNode(target), sourceNode),\n                args: rawCall.args.map((arg, index) => serializeArgument(sourceNode, rawCall.name, index, arg))\n            };\n            if (attachAfter) {\n                const res = next(rawCall);\n                listener(info);\n                return res;\n            }\n            else {\n                listener(info);\n                return next(rawCall);\n            }\n        }\n        else {\n            return next(rawCall);\n        }\n    });\n}\n\nlet nextActionId = 1;\nlet currentActionContext;\n/**\n * @internal\n * @hidden\n */\nfunction getCurrentActionContext() {\n    return currentActionContext;\n}\n/**\n * @internal\n * @hidden\n */\nfunction getNextActionId() {\n    return nextActionId++;\n}\n// TODO: optimize away entire action context if there is no middleware in tree?\n/**\n * @internal\n * @hidden\n */\nfunction runWithActionContext(context, fn) {\n    const node = getStateTreeNode(context.context);\n    if (context.type === \"action\") {\n        node.assertAlive({\n            actionContext: context\n        });\n    }\n    const baseIsRunningAction = node._isRunningAction;\n    node._isRunningAction = true;\n    const previousContext = currentActionContext;\n    const isRootActionContext = !previousContext;\n    currentActionContext = context;\n    try {\n        return runMiddleWares(node, context, fn, isRootActionContext);\n    }\n    finally {\n        currentActionContext = previousContext;\n        node._isRunningAction = baseIsRunningAction;\n    }\n}\n/**\n * @internal\n * @hidden\n */\nfunction getParentActionContext(parentContext) {\n    if (!parentContext)\n        return undefined;\n    if (parentContext.type === \"action\")\n        return parentContext;\n    return parentContext.parentActionEvent;\n}\n/**\n * @internal\n * @hidden\n */\nfunction createActionInvoker(target, name, fn) {\n    const res = function () {\n        const id = getNextActionId();\n        const parentContext = currentActionContext;\n        const parentActionContext = getParentActionContext(parentContext);\n        return runWithActionContext({\n            type: \"action\",\n            name,\n            id,\n            args: argsToArray(arguments),\n            context: target,\n            tree: getRoot(target),\n            rootId: parentContext ? parentContext.rootId : id,\n            parentId: parentContext ? parentContext.id : 0,\n            allParentIds: parentContext\n                ? [...parentContext.allParentIds, parentContext.id]\n                : [],\n            parentEvent: parentContext,\n            parentActionEvent: parentActionContext\n        }, fn);\n    };\n    res._isMSTAction = true;\n    res._isFlowAction = fn._isFlowAction;\n    return res;\n}\n/**\n * Middleware can be used to intercept any action is invoked on the subtree where it is attached.\n * If a tree is protected (by default), this means that any mutation of the tree will pass through your middleware.\n *\n * For more details, see the [middleware docs](concepts/middleware.md)\n *\n * @param target Node to apply the middleware to.\n * @param middleware Middleware to apply.\n * @returns A callable function to dispose the middleware.\n */\nfunction addMiddleware(target, handler, includeHooks = true) {\n    const node = getStateTreeNode(target);\n    if (devMode()) {\n        if (!node.isProtectionEnabled) {\n            warnError(\"It is recommended to protect the state tree before attaching action middleware, as otherwise it cannot be guaranteed that all changes are passed through middleware. See `protect`\");\n        }\n    }\n    return node.addMiddleWare(handler, includeHooks);\n}\n/**\n * Binds middleware to a specific action.\n *\n * Example:\n * ```ts\n * type.actions(self => {\n *   function takeA____() {\n *       self.toilet.donate()\n *       self.wipe()\n *       self.wipe()\n *       self.toilet.flush()\n *   }\n *   return {\n *     takeA____: decorate(atomic, takeA____)\n *   }\n * })\n * ```\n *\n * @param handler\n * @param fn\n * @param includeHooks\n * @returns The original function\n */\nfunction decorate(handler, fn, includeHooks = true) {\n    const middleware = { handler, includeHooks };\n    fn.$mst_middleware = fn.$mst_middleware || [];\n    fn.$mst_middleware.push(middleware);\n    return fn;\n}\nclass CollectedMiddlewares {\n    constructor(node, fn) {\n        Object.defineProperty(this, \"arrayIndex\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: 0\n        });\n        Object.defineProperty(this, \"inArrayIndex\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: 0\n        });\n        Object.defineProperty(this, \"middlewares\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: []\n        });\n        // we just push middleware arrays into an array of arrays to avoid making copies\n        if (fn.$mst_middleware) {\n            this.middlewares.push(fn.$mst_middleware);\n        }\n        let n = node;\n        // Find all middlewares. Optimization: cache this?\n        while (n) {\n            if (n.middlewares)\n                this.middlewares.push(n.middlewares);\n            n = n.parent;\n        }\n    }\n    get isEmpty() {\n        return this.middlewares.length <= 0;\n    }\n    getNextMiddleware() {\n        const array = this.middlewares[this.arrayIndex];\n        if (!array)\n            return undefined;\n        const item = array[this.inArrayIndex++];\n        if (!item) {\n            this.arrayIndex++;\n            this.inArrayIndex = 0;\n            return this.getNextMiddleware();\n        }\n        return item;\n    }\n}\nfunction runMiddleWares(node, baseCall, originalFn, isRootActionContext) {\n    function runInActionScope(call, fn) {\n        const execute = () => {\n            let result;\n            let error;\n            try {\n                result = fn.apply(null, call.args);\n            }\n            catch (e) {\n                error = e;\n            }\n            if (isRootActionContext || !call.parentActionEvent) {\n                try {\n                    node.root.flushEndOfActionCallbacks();\n                }\n                catch (flushError) {\n                    if (!error) {\n                        error = flushError;\n                    }\n                }\n            }\n            if (error) {\n                throw error;\n            }\n            return result;\n        };\n        return call.name ? action(call.name, execute)() : action(execute)();\n    }\n    const middlewares = new CollectedMiddlewares(node, originalFn);\n    // Short circuit\n    if (middlewares.isEmpty)\n        return runInActionScope(baseCall, originalFn);\n    let result = null;\n    function runNextMiddleware(call) {\n        const middleware = middlewares.getNextMiddleware();\n        const handler = middleware && middleware.handler;\n        if (!handler) {\n            return runInActionScope(call, originalFn);\n        }\n        // skip hooks if asked to\n        if (!middleware.includeHooks && Hook[call.name]) {\n            return runNextMiddleware(call);\n        }\n        let nextInvoked = false;\n        function next(call2, callback) {\n            nextInvoked = true;\n            // the result can contain\n            // - the non manipulated return value from an action\n            // - the non manipulated abort value\n            // - one of the above but manipulated through the callback function\n            result = runNextMiddleware(call2);\n            if (callback) {\n                result = callback(result);\n            }\n        }\n        let abortInvoked = false;\n        function abort(value) {\n            abortInvoked = true;\n            // overwrite the result\n            // can be manipulated through middlewares earlier in the queue using the callback fn\n            result = value;\n        }\n        handler(call, next, abort);\n        if (devMode()) {\n            if (!nextInvoked && !abortInvoked) {\n                const node2 = getStateTreeNode(call.tree);\n                throw new MstError(`Neither the next() nor the abort() callback within the middleware ${handler.name} for the action: \"${call.name}\" on the node: ${node2.type.name} was invoked.`);\n            }\n            else if (nextInvoked && abortInvoked) {\n                const node2 = getStateTreeNode(call.tree);\n                throw new MstError(`The next() and abort() callback within the middleware ${handler.name} for the action: \"${call.name}\" on the node: ${node2.type.name} were invoked.`);\n            }\n        }\n        if (abortInvoked && (isRootActionContext || !call.parentActionEvent)) {\n            return runInActionScope(call, () => result);\n        }\n        return result;\n    }\n    return runNextMiddleware(baseCall);\n}\n\n/**\n * Returns the currently executing MST action context, or undefined if none.\n */\nfunction getRunningActionContext() {\n    let current = getCurrentActionContext();\n    while (current && current.type !== \"action\") {\n        current = current.parentActionEvent;\n    }\n    return current;\n}\nfunction _isActionContextThisOrChildOf(actionContext, sameOrParent, includeSame) {\n    const parentId = typeof sameOrParent === \"number\" ? sameOrParent : sameOrParent.id;\n    let current = includeSame\n        ? actionContext\n        : actionContext.parentActionEvent;\n    while (current) {\n        if (current.id === parentId) {\n            return true;\n        }\n        current = current.parentActionEvent;\n    }\n    return false;\n}\n/**\n * Returns if the given action context is a parent of this action context.\n */\nfunction isActionContextChildOf(actionContext, parent) {\n    return _isActionContextThisOrChildOf(actionContext, parent, false);\n}\n/**\n * Returns if the given action context is this or a parent of this action context.\n */\nfunction isActionContextThisOrChildOf(actionContext, parentOrThis) {\n    return _isActionContextThisOrChildOf(actionContext, parentOrThis, true);\n}\n\nconst defaultOptions = {\n    enabled: false,\n    indent: 2,\n    maxStringLength: 100,\n    maxArrayLength: 10,\n    maxPropertyCount: 30,\n    maxDepth: 5\n};\nlet currentOptions = Object.assign({}, defaultOptions);\n/**\n * Configures how snapshots/values and type shapes are formatted inside\n * type-checking error messages. This is **opt-in**: by default MST keeps its\n * original single-line error formatting, so enabling this does not change\n * behavior for anyone who doesn't call it.\n *\n * The given options are merged over the current ones, so you can set only the\n * fields you care about.\n *\n * @example\n * // pretty-print large snapshots across multiple lines and truncate them\n * setErrorFormatting({ enabled: true })\n *\n * @example\n * // only bound the message size, without reflowing it onto multiple lines\n * setErrorFormatting({ enabled: true, indent: 0 })\n *\n * @example\n * // tweak the truncation limits\n * setErrorFormatting({ enabled: true, maxArrayLength: 3, maxStringLength: 40 })\n *\n * @param options A partial set of {@link ErrorFormattingOptions} to apply.\n */\nfunction setErrorFormatting(options) {\n    currentOptions = Object.assign(Object.assign({}, currentOptions), options);\n}\n/**\n * Returns a copy of the current error formatting options (see\n * {@link setErrorFormatting}). Useful for temporarily overriding and then\n * restoring the configuration.\n *\n * @returns The current {@link ErrorFormattingOptions}.\n */\nfunction getErrorFormatting() {\n    return Object.assign({}, currentOptions);\n}\n\nfunction safeStringify(value, indent) {\n    try {\n        return JSON.stringify(value, null, indent);\n    }\n    catch (e) {\n        // istanbul ignore next\n        return `<Unserializable: ${e}>`;\n    }\n}\nfunction shortenPrintValue(valueInString) {\n    return valueInString.length < 280\n        ? valueInString\n        : `${valueInString.substring(0, 272)}......${valueInString.substring(valueInString.length - 8)}`;\n}\n/**\n * Returns a clone of `value` in which overly long strings are clipped and large\n * arrays/objects (or values nested too deeply) are summarized, so the result is\n * safe to print in an error message without flooding the screen.\n */\nfunction truncateForDisplay(value, depth, options) {\n    if (typeof value === \"string\") {\n        return value.length > options.maxStringLength\n            ? `${value.slice(0, options.maxStringLength)}\u2026 (${value.length - options.maxStringLength} more characters)`\n            : value;\n    }\n    if (Array.isArray(value)) {\n        if (depth >= options.maxDepth)\n            return \"[\u2026]\";\n        const items = value\n            .slice(0, options.maxArrayLength)\n            .map(item => truncateForDisplay(item, depth + 1, options));\n        if (value.length > options.maxArrayLength) {\n            items.push(`\u2026 ${value.length - options.maxArrayLength} more items`);\n        }\n        return items;\n    }\n    if (isPlainObject(value)) {\n        if (depth >= options.maxDepth)\n            return \"{\u2026}\";\n        const result = {};\n        const keys = Object.keys(value);\n        keys.slice(0, options.maxPropertyCount).forEach(key => {\n            result[key] = truncateForDisplay(value[key], depth + 1, options);\n        });\n        if (keys.length > options.maxPropertyCount) {\n            result[\"\u2026\"] = `${keys.length - options.maxPropertyCount} more keys`;\n        }\n        return result;\n    }\n    return value;\n}\n/**\n * @internal\n * @hidden\n */\nfunction prettyPrintValue(value) {\n    if (typeof value === \"function\") {\n        return `<function${value.name ? \" \" + value.name : \"\"}>`;\n    }\n    if (isStateTreeNode(value)) {\n        return `<${value}>`;\n    }\n    const options = getErrorFormatting();\n    if (!options.enabled) {\n        // Default behavior: serialize the value compactly on a single line.\n        // JSON.stringify returns `undefined` for values like `undefined` itself,\n        // which the template literal coerces back to a string.\n        return `\\`${safeStringify(value)}\\``;\n    }\n    // Opt-in behavior: clip long strings, big arrays/objects and deep nesting, and\n    // (when indent > 0) pretty-print the result across multiple lines.\n    const truncated = truncateForDisplay(value, 0, options);\n    return `\\`${safeStringify(truncated, options.indent || undefined)}\\``;\n}\n/**\n * Re-indents a type description (as produced by `IType.describe()`) across\n * multiple lines, by breaking after the `{`, `}` and `;` separators used in\n * model shapes (while leaving union `|` and array `[]` parts inline).\n * Characters inside string literals (e.g. literal types like `\"a;b\"`) are left\n * untouched.\n *\n * `indentSize` is the number of spaces per nesting level; when it is `0` (or\n * negative) the description is returned unchanged on a single line. As this runs\n * while formatting an error that is already being thrown, it must never throw\n * itself: any unexpected input falls back to the original, unformatted\n * description.\n *\n * @internal\n * @hidden\n */\nfunction prettyPrintDescription(description, indentSize) {\n    if (indentSize <= 0) {\n        return description;\n    }\n    try {\n        const step = \" \".repeat(indentSize);\n        let result = \"\";\n        let depth = 0;\n        let stringDelimiter = null;\n        let escaped = false;\n        const newline = () => {\n            // drop any trailing spaces (e.g. the \"{ \" / \"; \" separators) before breaking,\n            // and never let a malformed (over-closed) shape produce a negative indent\n            result = result.replace(/[ \\t]+$/, \"\");\n            result += \"\\n\" + step.repeat(Math.max(0, depth));\n        };\n        for (let i = 0; i < description.length; i++) {\n            const char = description[i];\n            if (stringDelimiter) {\n                result += char;\n                if (escaped) {\n                    escaped = false;\n                }\n                else if (char === \"\\\\\") {\n                    escaped = true;\n                }\n                else if (char === stringDelimiter) {\n                    stringDelimiter = null;\n                }\n                continue;\n            }\n            switch (char) {\n                case '\"':\n                case \"'\":\n                    stringDelimiter = char;\n                    result += char;\n                    break;\n                case \"{\":\n                    depth++;\n                    result += \"{\";\n                    newline();\n                    while (description[i + 1] === \" \")\n                        i++;\n                    break;\n                case \"}\":\n                    depth--;\n                    newline();\n                    result += \"}\";\n                    break;\n                case \";\":\n                    result += \";\";\n                    newline();\n                    while (description[i + 1] === \" \")\n                        i++;\n                    break;\n                default:\n                    result += char;\n            }\n        }\n        return result;\n    }\n    catch (e) {\n        // istanbul ignore next - defensive: never let formatting hide the real error\n        return description;\n    }\n}\nfunction toErrorString(error) {\n    const { value } = error;\n    const type = error.context[error.context.length - 1].type;\n    const fullPath = error.context\n        .map(({ path }) => path)\n        .filter(path => path.length > 0)\n        .join(\"/\");\n    const pathPrefix = fullPath.length > 0 ? `at path \"/${fullPath}\" ` : ``;\n    const currentTypename = isStateTreeNode(value)\n        ? `value of type ${getStateTreeNode(value).type.name}:`\n        : isPrimitive(value)\n            ? \"value\"\n            : \"snapshot\";\n    const isSnapshotCompatible = type && isStateTreeNode(value) && type.is(getStateTreeNode(value).snapshot);\n    // When error formatting is enabled, the type shape is re-indented using the\n    // same indent setting as values; otherwise it's left on a single line.\n    const formatting = getErrorFormatting();\n    const describeType = (t) => formatting.enabled ? prettyPrintDescription(t.describe(), formatting.indent) : t.describe();\n    return (`${pathPrefix}${currentTypename} ${prettyPrintValue(value)} is not assignable ${type ? `to type: \\`${type.name}\\`` : ``}` +\n        (error.message ? ` (${error.message})` : \"\") +\n        (type\n            ? isPrimitiveType(type) || isPrimitive(value)\n                ? `.`\n                : `, expected an instance of \\`${type.name}\\` or a snapshot like \\`${describeType(type)}\\` instead.` +\n                    (isSnapshotCompatible\n                        ? \" (Note that a snapshot of the provided value is compatible with the targeted type)\"\n                        : \"\")\n            : `.`));\n}\n/**\n * @internal\n * @hidden\n */\nfunction getContextForPath(context, path, type) {\n    return context.concat([{ path, type }]);\n}\n/**\n * @internal\n * @hidden\n */\nfunction typeCheckSuccess() {\n    return EMPTY_ARRAY;\n}\n/**\n * @internal\n * @hidden\n */\nfunction typeCheckFailure(context, value, message) {\n    return [{ context, value, message }];\n}\n/**\n * @internal\n * @hidden\n */\nfunction flattenTypeErrors(errors) {\n    return errors.reduce((a, i) => a.concat(i), []);\n}\n// TODO; doublecheck: typecheck should only needed to be invoked from: type.create and array / map / value.property will change\n/**\n * @internal\n * @hidden\n */\nfunction typecheckInternal(type, value) {\n    // runs typeChecking if it is in dev-mode or through a process.env.ENABLE_TYPE_CHECK flag\n    if (isTypeCheckingEnabled()) {\n        typecheck(type, value);\n    }\n}\n/**\n * Run's the typechecker for the given type on the given value, which can be a snapshot or an instance.\n * Throws if the given value is not according the provided type specification.\n * Use this if you need typechecks even in a production build (by default all automatic runtime type checks will be skipped in production builds)\n *\n * @param type Type to check against.\n * @param value Value to be checked, either a snapshot or an instance.\n */\nfunction typecheck(type, value) {\n    const errors = type.validate(value, [{ path: \"\", type }]);\n    if (errors.length > 0) {\n        throw new MstError(validationErrorsToString(type, value, errors));\n    }\n}\nfunction validationErrorsToString(type, value, errors) {\n    if (errors.length === 0) {\n        return undefined;\n    }\n    // When formatting is disabled, keep the original behavior of capping the\n    // header value's length; when enabled, truncation already bounds its size.\n    const printedValue = prettyPrintValue(value);\n    const headerValue = getErrorFormatting().enabled\n        ? printedValue\n        : shortenPrintValue(printedValue);\n    return (`Error while converting ${headerValue} to \\`${type.name}\\`:\\n\\n    ` +\n        errors.map(toErrorString).join(\"\\n    \"));\n}\n\nlet identifierCacheId = 0;\n/**\n * @internal\n * @hidden\n */\nclass IdentifierCache {\n    constructor() {\n        Object.defineProperty(this, \"cacheId\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: identifierCacheId++\n        });\n        // n.b. in cache all identifiers are normalized to strings\n        Object.defineProperty(this, \"cache\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: observable.map()\n        });\n        // last time the cache (array) for a given time changed\n        // n.b. it is not really the time, but just an integer that gets increased after each modification to the array\n        Object.defineProperty(this, \"lastCacheModificationPerId\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: observable.map()\n        });\n    }\n    updateLastCacheModificationPerId(identifier) {\n        const lcm = this.lastCacheModificationPerId.get(identifier);\n        // we start at 1 since 0 means no update since cache creation\n        this.lastCacheModificationPerId.set(identifier, lcm === undefined ? 1 : lcm + 1);\n    }\n    getLastCacheModificationPerId(identifier) {\n        const modificationId = this.lastCacheModificationPerId.get(identifier) || 0;\n        return `${this.cacheId}-${modificationId}`;\n    }\n    addNodeToCache(node, lastCacheUpdate = true) {\n        if (node.identifierAttribute) {\n            const identifier = node.identifier;\n            if (!this.cache.has(identifier)) {\n                this.cache.set(identifier, observable.array([], mobxShallow));\n            }\n            const set = this.cache.get(identifier);\n            if (set.indexOf(node) !== -1)\n                throw new MstError(`Already registered`);\n            set.push(node);\n            if (lastCacheUpdate) {\n                this.updateLastCacheModificationPerId(identifier);\n            }\n        }\n    }\n    mergeCache(node) {\n        values(node.identifierCache.cache).forEach(nodes => nodes.forEach(child => {\n            this.addNodeToCache(child);\n        }));\n    }\n    notifyDied(node) {\n        if (node.identifierAttribute) {\n            const id = node.identifier;\n            const set = this.cache.get(id);\n            if (set) {\n                set.remove(node);\n                // remove empty sets from cache\n                if (!set.length) {\n                    this.cache.delete(id);\n                }\n                this.updateLastCacheModificationPerId(node.identifier);\n            }\n        }\n    }\n    splitCache(splitNode) {\n        const newCache = new IdentifierCache();\n        // The slash is added here so we only match children of the splitNode. In version 5.1.8 and\n        // earlier there was no trailing slash, so non children that started with the same path string\n        // were being matched incorrectly.\n        const basePath = splitNode.path + \"/\";\n        entries(this.cache).forEach(([id, nodes]) => {\n            let modified = false;\n            for (let i = nodes.length - 1; i >= 0; i--) {\n                const node = nodes[i];\n                if (node === splitNode || node.path.indexOf(basePath) === 0) {\n                    newCache.addNodeToCache(node, false); // no need to update lastUpdated since it is a whole new cache\n                    nodes.splice(i, 1);\n                    // remove empty sets from cache\n                    if (!nodes.length) {\n                        this.cache.delete(id);\n                    }\n                    modified = true;\n                }\n            }\n            if (modified) {\n                this.updateLastCacheModificationPerId(id);\n            }\n        });\n        return newCache;\n    }\n    has(type, identifier) {\n        const set = this.cache.get(identifier);\n        if (!set)\n            return false;\n        return set.some(candidate => type.isAssignableFrom(candidate.type));\n    }\n    resolve(type, identifier) {\n        const set = this.cache.get(identifier);\n        if (!set)\n            return null;\n        const matches = set.filter(candidate => type.isAssignableFrom(candidate.type));\n        switch (matches.length) {\n            case 0:\n                return null;\n            case 1:\n                return matches[0];\n            default:\n                throw new MstError(`Cannot resolve a reference to type '${type.name}' with id: '${identifier}' unambigously, there are multiple candidates: ${matches\n                    .map(n => n.path)\n                    .join(\", \")}`);\n        }\n    }\n}\n\n/**\n * @internal\n * @hidden\n */\nfunction createObjectNode(type, parent, subpath, environment, initialValue) {\n    const existingNode = getStateTreeNodeSafe(initialValue);\n    if (existingNode) {\n        if (existingNode.parent) {\n            // istanbul ignore next\n            throw new MstError(`Cannot add an object to a state tree if it is already part of the same or another state tree. Tried to assign an object to '${parent ? parent.path : \"\"}/${subpath}', but it lives already at '${existingNode.path}'`);\n        }\n        if (parent) {\n            existingNode.setParent(parent, subpath);\n        }\n        // else it already has no parent since it is a pre-requisite\n        return existingNode;\n    }\n    // not a node, a snapshot\n    return new ObjectNode(type, parent, subpath, environment, initialValue);\n}\n/**\n * @internal\n * @hidden\n */\nfunction createScalarNode(type, parent, subpath, environment, initialValue) {\n    return new ScalarNode(type, parent, subpath, environment, initialValue);\n}\n/**\n * @internal\n * @hidden\n */\nfunction isNode(value) {\n    return value instanceof ScalarNode || value instanceof ObjectNode;\n}\n\n/**\n * @internal\n * @hidden\n */\nvar NodeLifeCycle;\n(function (NodeLifeCycle) {\n    NodeLifeCycle[NodeLifeCycle[\"INITIALIZING\"] = 0] = \"INITIALIZING\";\n    NodeLifeCycle[NodeLifeCycle[\"CREATED\"] = 1] = \"CREATED\";\n    NodeLifeCycle[NodeLifeCycle[\"FINALIZED\"] = 2] = \"FINALIZED\";\n    NodeLifeCycle[NodeLifeCycle[\"DETACHING\"] = 3] = \"DETACHING\";\n    NodeLifeCycle[NodeLifeCycle[\"DEAD\"] = 4] = \"DEAD\"; // no coming back from this one\n})(NodeLifeCycle || (NodeLifeCycle = {}));\n/**\n * Returns true if the given value is a node in a state tree.\n * More precisely, that is, if the value is an instance of a\n * `types.model`, `types.array` or `types.map`.\n *\n * @param value\n * @returns true if the value is a state tree node.\n */\nfunction isStateTreeNode(value) {\n    return !!(value && value.$treenode);\n}\n/**\n * @internal\n * @hidden\n */\nfunction assertIsStateTreeNode(value, argNumber) {\n    assertArg(value, isStateTreeNode, \"mobx-state-tree node\", argNumber);\n}\n/**\n * @internal\n * @hidden\n */\nfunction getStateTreeNode(value) {\n    if (!isStateTreeNode(value)) {\n        // istanbul ignore next\n        throw new MstError(`Value ${value} is no MST Node`);\n    }\n    return value.$treenode;\n}\n/**\n * @internal\n * @hidden\n */\nfunction getStateTreeNodeSafe(value) {\n    return (value && value.$treenode) || null;\n}\n/**\n * @internal\n * @hidden\n */\nfunction toJSON() {\n    return getStateTreeNode(this).snapshot;\n}\nconst doubleDot = (_) => \"..\";\n/**\n * @internal\n * @hidden\n */\nfunction getRelativePathBetweenNodes(base, target) {\n    // PRE condition target is (a child of) base!\n    if (base.root !== target.root) {\n        throw new MstError(`Cannot calculate relative path: objects '${base}' and '${target}' are not part of the same object tree`);\n    }\n    const baseParts = splitJsonPath(base.path);\n    const targetParts = splitJsonPath(target.path);\n    let common = 0;\n    for (; common < baseParts.length; common++) {\n        if (baseParts[common] !== targetParts[common])\n            break;\n    }\n    // TODO: assert that no targetParts paths are \"..\", \".\" or \"\"!\n    return (baseParts.slice(common).map(doubleDot).join(\"/\") + joinJsonPath(targetParts.slice(common)));\n}\n/**\n * @internal\n * @hidden\n */\nfunction resolveNodeByPath(base, path, failIfResolveFails = true) {\n    return resolveNodeByPathParts(base, splitJsonPath(path), failIfResolveFails);\n}\n/**\n * @internal\n * @hidden\n */\nfunction resolveNodeByPathParts(base, pathParts, failIfResolveFails = true) {\n    let current = base;\n    try {\n        for (let i = 0; i < pathParts.length; i++) {\n            const part = pathParts[i];\n            if (part === \"..\") {\n                current = current.parent;\n                if (current)\n                    continue; // not everything has a parent\n            }\n            else if (part === \".\") {\n                continue;\n            }\n            else if (current) {\n                if (current instanceof ScalarNode) {\n                    // check if the value of a scalar resolves to a state tree node (e.g. references)\n                    // then we can continue resolving...\n                    const value = current.value;\n                    if (isStateTreeNode(value)) {\n                        current = getStateTreeNode(value);\n                        // fall through\n                    }\n                }\n                if (current instanceof ObjectNode) {\n                    const subType = current.getChildType(part);\n                    if (subType) {\n                        current = current.getChildNode(part);\n                        if (current)\n                            continue;\n                    }\n                }\n            }\n            throw new MstError(`Could not resolve '${part}' in path '${joinJsonPath(pathParts.slice(0, i)) || \"/\"}' while resolving '${joinJsonPath(pathParts)}'`);\n        }\n    }\n    catch (e) {\n        if (!failIfResolveFails) {\n            return undefined;\n        }\n        throw e;\n    }\n    return current;\n}\n/**\n * @internal\n * @hidden\n */\nfunction convertChildNodesToArray(childNodes) {\n    if (!childNodes)\n        return EMPTY_ARRAY;\n    const keys = Object.keys(childNodes);\n    if (!keys.length)\n        return EMPTY_ARRAY;\n    const result = new Array(keys.length);\n    keys.forEach((key, index) => {\n        result[index] = childNodes[key];\n    });\n    return result;\n}\n\n// based on: https://github.com/mobxjs/mobx-utils/blob/master/src/async-action.ts\n/*\n    All contents of this file are deprecated.\n\n    The term `process` has been replaced with `flow` to avoid conflicts with the\n    global `process` object.\n\n    Refer to `flow.ts` for any further changes to this implementation.\n*/\nconst DEPRECATION_MESSAGE = \"See https://github.com/mobxjs/mobx-state-tree/issues/399 for more information. \" +\n    \"Note that the middleware event types starting with `process` now start with `flow`.\";\n/**\n * @hidden\n *\n * @deprecated has been renamed to `flow()`.\n * See https://github.com/mobxjs/mobx-state-tree/issues/399 for more information.\n * Note that the middleware event types starting with `process` now start with `flow`.\n *\n * @returns {Promise}\n */\nfunction process$1(asyncAction) {\n    deprecated(\"process\", \"`process()` has been renamed to `flow()`. \" + DEPRECATION_MESSAGE);\n    return flow(asyncAction);\n}\n\nconst plainObjectString = Object.toString();\n/**\n * @internal\n * @hidden\n */\nconst EMPTY_ARRAY = Object.freeze([]);\n/**\n * @internal\n * @hidden\n */\nconst EMPTY_OBJECT = Object.freeze({});\n/**\n * @internal\n * @hidden\n */\n// MobX 7 is always Proxy-backed, so there is no non-proxy shape to opt into.\nconst mobxShallow = { deep: false };\nObject.freeze(mobxShallow);\n/**\n * @internal\n * @hidden\n */\nclass MstError extends Error {\n    constructor(message = \"Illegal state\") {\n        super(`[mobx-state-tree] ${message}`);\n    }\n}\n/**\n * @internal\n * @hidden\n */\nfunction identity(_) {\n    return _;\n}\n/**\n * @internal\n * @hidden\n */\nconst isInteger = Number.isInteger;\n/**\n * @internal\n * @hidden\n */\nfunction isFloat(val) {\n    return Number(val) === val && val % 1 !== 0;\n}\n/**\n * @internal\n * @hidden\n */\nfunction isFinite(val) {\n    return Number.isFinite(val);\n}\n/**\n * @internal\n * @hidden\n */\nfunction isArray(val) {\n    return Array.isArray(val) || isObservableArray(val);\n}\n/**\n * @internal\n * @hidden\n */\nfunction asArray(val) {\n    if (!val)\n        return EMPTY_ARRAY;\n    if (isArray(val))\n        return val;\n    return [val];\n}\n/**\n * @internal\n * @hidden\n */\nfunction extend(a, ...b) {\n    for (let i = 0; i < b.length; i++) {\n        const current = b[i];\n        for (let key in current)\n            a[key] = current[key];\n    }\n    return a;\n}\n/**\n * @internal\n * @hidden\n */\nfunction isPlainObject(value) {\n    var _a;\n    if (value === null || typeof value !== \"object\")\n        return false;\n    const proto = Object.getPrototypeOf(value);\n    if (proto == null)\n        return true;\n    return ((_a = proto.constructor) === null || _a === void 0 ? void 0 : _a.toString()) === plainObjectString;\n}\n/**\n * @internal\n * @hidden\n */\nfunction isMutable(value) {\n    return (value !== null &&\n        typeof value === \"object\" &&\n        !(value instanceof Date) &&\n        !(value instanceof RegExp));\n}\n/**\n * @internal\n * @hidden\n */\nfunction isPrimitive(value, includeDate = true) {\n    return (value === null ||\n        value === undefined ||\n        typeof value === \"string\" ||\n        typeof value === \"number\" ||\n        typeof value === \"boolean\" ||\n        typeof value === \"bigint\" ||\n        (includeDate && value instanceof Date));\n}\n/**\n * @internal\n * @hidden\n * Freeze a value and return it (if not in production)\n */\nfunction freeze(value) {\n    if (!devMode())\n        return value;\n    return isPrimitive(value) || isObservableArray(value) ? value : Object.freeze(value);\n}\n/**\n * @internal\n * @hidden\n * Recursively freeze a value (if not in production)\n */\nfunction deepFreeze(value) {\n    if (!devMode())\n        return value;\n    freeze(value);\n    if (isPlainObject(value)) {\n        Object.keys(value).forEach(propKey => {\n            if (!isPrimitive(value[propKey]) &&\n                !Object.isFrozen(value[propKey])) {\n                deepFreeze(value[propKey]);\n            }\n        });\n    }\n    return value;\n}\n/**\n * @internal\n * @hidden\n */\nfunction isSerializable(value) {\n    return typeof value !== \"function\";\n}\n/**\n * @internal\n * @hidden\n */\nfunction defineProperty(object, key, descriptor) {\n    isObservableObject(object)\n        ? defineProperty$1(object, key, descriptor)\n        : Object.defineProperty(object, key, descriptor);\n}\n/**\n * @internal\n * @hidden\n */\nfunction addHiddenFinalProp(object, propName, value) {\n    defineProperty(object, propName, {\n        enumerable: false,\n        writable: false,\n        configurable: true,\n        value\n    });\n}\n/**\n * @internal\n * @hidden\n */\nfunction addHiddenWritableProp(object, propName, value) {\n    defineProperty(object, propName, {\n        enumerable: false,\n        writable: true,\n        configurable: true,\n        value\n    });\n}\n/**\n * @internal\n * @hidden\n */\nclass EventHandler {\n    constructor() {\n        Object.defineProperty(this, \"handlers\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: []\n        });\n    }\n    get hasSubscribers() {\n        return this.handlers.length > 0;\n    }\n    register(fn, atTheBeginning = false) {\n        if (atTheBeginning) {\n            this.handlers.unshift(fn);\n        }\n        else {\n            this.handlers.push(fn);\n        }\n        return () => {\n            this.unregister(fn);\n        };\n    }\n    has(fn) {\n        return this.handlers.indexOf(fn) >= 0;\n    }\n    unregister(fn) {\n        const index = this.handlers.indexOf(fn);\n        if (index >= 0) {\n            this.handlers.splice(index, 1);\n        }\n    }\n    clear() {\n        this.handlers.length = 0;\n    }\n    emit(...args) {\n        // make a copy just in case it changes\n        const handlers = this.handlers.slice();\n        handlers.forEach(f => f(...args));\n    }\n}\n/**\n * @internal\n * @hidden\n */\nclass EventHandlers {\n    constructor() {\n        Object.defineProperty(this, \"eventHandlers\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: void 0\n        });\n    }\n    hasSubscribers(event) {\n        const handler = this.eventHandlers && this.eventHandlers[event];\n        return !!handler && handler.hasSubscribers;\n    }\n    register(event, fn, atTheBeginning = false) {\n        if (!this.eventHandlers) {\n            this.eventHandlers = {};\n        }\n        let handler = this.eventHandlers[event];\n        if (!handler) {\n            handler = this.eventHandlers[event] = new EventHandler();\n        }\n        return handler.register(fn, atTheBeginning);\n    }\n    has(event, fn) {\n        const handler = this.eventHandlers && this.eventHandlers[event];\n        return !!handler && handler.has(fn);\n    }\n    unregister(event, fn) {\n        const handler = this.eventHandlers && this.eventHandlers[event];\n        if (handler) {\n            handler.unregister(fn);\n        }\n    }\n    clear(event) {\n        if (this.eventHandlers) {\n            delete this.eventHandlers[event];\n        }\n    }\n    clearAll() {\n        this.eventHandlers = undefined;\n    }\n    emit(event, ...args) {\n        const handler = this.eventHandlers && this.eventHandlers[event];\n        if (handler) {\n            handler.emit(...args);\n        }\n    }\n}\n/**\n * @internal\n * @hidden\n */\nfunction argsToArray(args) {\n    const res = new Array(args.length);\n    for (let i = 0; i < args.length; i++)\n        res[i] = args[i];\n    return res;\n}\n/**\n * @internal\n * @hidden\n */\nfunction stringStartsWith(str, beginning) {\n    return str.indexOf(beginning) === 0;\n}\n/**\n * @internal\n * @hidden\n */\nconst deprecated = function (id, message) {\n    // skip if running production\n    if (!devMode())\n        return;\n    // warn if hasn't been warned before\n    if (deprecated.ids && !deprecated.ids.hasOwnProperty(id)) {\n        warnError(\"Deprecation warning: \" + message);\n    }\n    // mark as warned to avoid duplicate warn message\n    if (deprecated.ids)\n        deprecated.ids[id] = true;\n};\ndeprecated.ids = {};\n/**\n * @internal\n * @hidden\n */\nfunction warnError(msg) {\n    console.warn(new Error(`[mobx-state-tree] ${msg}`));\n}\n/**\n * @internal\n * @hidden\n */\nfunction isTypeCheckingEnabled() {\n    return (devMode() ||\n        (typeof process !== \"undefined\" && process.env && process.env.ENABLE_TYPE_CHECK === \"true\"));\n}\n/**\n * @internal\n * @hidden\n */\nfunction devMode() {\n    return process.env.NODE_ENV !== \"production\";\n}\n/**\n * @internal\n * @hidden\n */\nfunction assertArg(value, fn, typeName, argNumber) {\n    if (devMode()) {\n        if (!fn(value)) {\n            // istanbul ignore next\n            throw new MstError(`expected ${typeName} as argument ${asArray(argNumber).join(\" or \")}, got ${value} instead`);\n        }\n    }\n}\n/**\n * @internal\n * @hidden\n */\nfunction assertIsFunction(value, argNumber) {\n    assertArg(value, fn => typeof fn === \"function\", \"function\", argNumber);\n}\n/**\n * @internal\n * @hidden\n */\nfunction assertIsNumber(value, argNumber, min, max) {\n    assertArg(value, n => typeof n === \"number\", \"number\", argNumber);\n    if (min !== undefined) {\n        assertArg(value, n => n >= min, `number greater than ${min}`, argNumber);\n    }\n    if (max !== undefined) {\n        assertArg(value, n => n <= max, `number lesser than ${max}`, argNumber);\n    }\n}\n/**\n * @internal\n * @hidden\n */\nfunction assertIsString(value, argNumber, canBeEmpty = true) {\n    assertArg(value, s => typeof s === \"string\", \"string\", argNumber);\n    if (!canBeEmpty) {\n        assertArg(value, s => s !== \"\", \"not empty string\", argNumber);\n    }\n}\n/**\n * @internal\n * @hidden\n */\nfunction setImmediateWithFallback(fn) {\n    if (typeof queueMicrotask === \"function\") {\n        queueMicrotask(fn);\n    }\n    else if (typeof setImmediate === \"function\") {\n        setImmediate(fn);\n    }\n    else {\n        setTimeout(fn, 1);\n    }\n}\n\n/**\n * See [asynchronous actions](concepts/async-actions.md).\n *\n * @returns The flow as a promise.\n */\nfunction flow(generator) {\n    return createFlowSpawner(generator.name, generator);\n}\n/**\n * @deprecated Not needed since TS3.6.\n * Used for TypeScript to make flows that return a promise return the actual promise result.\n *\n * @param val\n * @returns\n */\nfunction castFlowReturn(val) {\n    return val;\n}\n/**\n * @experimental\n * experimental api - might change on minor/patch releases\n *\n * Convert a promise-returning function to a generator-returning one.\n * This is intended to allow for usage of `yield*` in async actions to\n * retain the promise return type.\n *\n * Example:\n * ```ts\n * function getDataAsync(input: string): Promise<number> { ... }\n * const getDataGen = toGeneratorFunction(getDataAsync);\n *\n * const someModel.actions(self => ({\n *   someAction: flow(function*() {\n *     // value is typed as number\n *     const value = yield* getDataGen(\"input value\");\n *     ...\n *   })\n * }))\n * ```\n */\nfunction toGeneratorFunction(p) {\n    return function* (...args) {\n        return (yield p(...args));\n    };\n}\n/**\n * @experimental\n * experimental api - might change on minor/patch releases\n *\n * Convert a promise to a generator yielding that promise\n * This is intended to allow for usage of `yield*` in async actions to\n * retain the promise return type.\n *\n * Example:\n * ```ts\n * function getDataAsync(input: string): Promise<number> { ... }\n *\n * const someModel.actions(self => ({\n *   someAction: flow(function*() {\n *     // value is typed as number\n *     const value = yield* toGenerator(getDataAsync(\"input value\"));\n *     ...\n *   })\n * }))\n * ```\n */\nfunction* toGenerator(p) {\n    return (yield p);\n}\n/**\n * @internal\n * @hidden\n */\nfunction createFlowSpawner(name, generator) {\n    const spawner = function flowSpawner() {\n        // Implementation based on https://github.com/tj/co/blob/master/index.js\n        const runId = getNextActionId();\n        const parentContext = getCurrentActionContext();\n        if (!parentContext) {\n            throw new MstError(\"a mst flow must always have a parent context\");\n        }\n        const parentActionContext = getParentActionContext(parentContext);\n        if (!parentActionContext) {\n            throw new MstError(\"a mst flow must always have a parent action context\");\n        }\n        const contextBase = {\n            name,\n            id: runId,\n            tree: parentContext.tree,\n            context: parentContext.context,\n            parentId: parentContext.id,\n            allParentIds: [...parentContext.allParentIds, parentContext.id],\n            rootId: parentContext.rootId,\n            parentEvent: parentContext,\n            parentActionEvent: parentActionContext\n        };\n        const args = arguments;\n        function wrap(fn, type, arg) {\n            fn.$mst_middleware = spawner.$mst_middleware; // pick up any middleware attached to the flow\n            return runWithActionContext(Object.assign(Object.assign({}, contextBase), { type, args: [arg] }), fn);\n        }\n        return new Promise(function (resolve, reject) {\n            let gen;\n            const init = function asyncActionInit() {\n                gen = generator.apply(null, arguments);\n                onFulfilled(undefined); // kick off the flow\n            };\n            init.$mst_middleware = spawner.$mst_middleware;\n            runWithActionContext(Object.assign(Object.assign({}, contextBase), { type: \"flow_spawn\", args: argsToArray(args) }), init);\n            function onFulfilled(res) {\n                let ret;\n                try {\n                    // prettier-ignore\n                    const cancelError = wrap((r) => { ret = gen.next(r); }, \"flow_resume\", res);\n                    if (cancelError instanceof Error) {\n                        ret = gen.throw(cancelError);\n                    }\n                }\n                catch (e) {\n                    // prettier-ignore\n                    setImmediateWithFallback(() => {\n                        wrap((r) => { reject(e); }, \"flow_throw\", e);\n                    });\n                    return;\n                }\n                next(ret);\n                return;\n            }\n            function onRejected(err) {\n                let ret;\n                try {\n                    // prettier-ignore\n                    wrap((r) => { ret = gen.throw(r); }, \"flow_resume_error\", err); // or yieldError?\n                }\n                catch (e) {\n                    // prettier-ignore\n                    setImmediateWithFallback(() => {\n                        wrap((r) => { reject(e); }, \"flow_throw\", e);\n                    });\n                    return;\n                }\n                next(ret);\n            }\n            function next(ret) {\n                if (ret.done) {\n                    // prettier-ignore\n                    setImmediateWithFallback(() => {\n                        wrap((r) => { resolve(r); }, \"flow_return\", ret.value);\n                    });\n                    return;\n                }\n                // TODO: support more type of values? See https://github.com/tj/co/blob/249bbdc72da24ae44076afd716349d2089b31c4c/index.js#L100\n                if (!ret.value || typeof ret.value.then !== \"function\") {\n                    // istanbul ignore next\n                    throw new MstError(\"Only promises can be yielded to `async`, got: \" + ret);\n                }\n                return ret.value.then(onFulfilled, onRejected);\n            }\n        });\n    };\n    spawner._isFlowAction = true;\n    return spawner;\n}\n\n/**\n * @internal\n * @hidden\n */\nfunction splitPatch(patch) {\n    if (!(\"oldValue\" in patch))\n        throw new MstError(`Patches without \\`oldValue\\` field cannot be inversed`);\n    return [stripPatch(patch), invertPatch(patch)];\n}\n/**\n * @internal\n * @hidden\n */\nfunction stripPatch(patch) {\n    // strips `oldvalue` information from the patch, so that it becomes a patch conform the json-patch spec\n    // this removes the ability to undo the patch\n    switch (patch.op) {\n        case \"add\":\n            return { op: \"add\", path: patch.path, value: patch.value };\n        case \"remove\":\n            return { op: \"remove\", path: patch.path };\n        case \"replace\":\n            return { op: \"replace\", path: patch.path, value: patch.value };\n    }\n}\nfunction invertPatch(patch) {\n    switch (patch.op) {\n        case \"add\":\n            return {\n                op: \"remove\",\n                path: patch.path\n            };\n        case \"remove\":\n            return {\n                op: \"add\",\n                path: patch.path,\n                value: patch.oldValue\n            };\n        case \"replace\":\n            return {\n                op: \"replace\",\n                path: patch.path,\n                value: patch.oldValue\n            };\n    }\n}\n/**\n * Simple simple check to check it is a number.\n */\nfunction isNumber(x) {\n    return typeof x === \"number\";\n}\n/**\n * Escape slashes and backslashes.\n *\n * http://tools.ietf.org/html/rfc6901\n */\nfunction escapeJsonPath(path) {\n    if (isNumber(path) === true) {\n        return \"\" + path;\n    }\n    if (path.indexOf(\"/\") === -1 && path.indexOf(\"~\") === -1)\n        return path;\n    return path.replace(/~/g, \"~0\").replace(/\\//g, \"~1\");\n}\n/**\n * Unescape slashes and backslashes.\n */\nfunction unescapeJsonPath(path) {\n    return path.replace(/~1/g, \"/\").replace(/~0/g, \"~\");\n}\n/**\n * Generates a json-path compliant json path from path parts.\n *\n * @param path\n * @returns\n */\nfunction joinJsonPath(path) {\n    // `/` refers to property with an empty name, while `` refers to root itself!\n    if (path.length === 0)\n        return \"\";\n    const getPathStr = (p) => p.map(escapeJsonPath).join(\"/\");\n    if (path[0] === \".\" || path[0] === \"..\") {\n        // relative\n        return getPathStr(path);\n    }\n    else {\n        // absolute\n        return \"/\" + getPathStr(path);\n    }\n}\n/**\n * Splits and decodes a json path into several parts.\n *\n * @param path\n * @returns\n */\nfunction splitJsonPath(path) {\n    // `/` refers to property with an empty name, while `` refers to root itself!\n    const parts = path.split(\"/\").map(unescapeJsonPath);\n    const valid = path === \"\" ||\n        path === \".\" ||\n        path === \"..\" ||\n        stringStartsWith(path, \"/\") ||\n        stringStartsWith(path, \"./\") ||\n        stringStartsWith(path, \"../\");\n    if (!valid) {\n        throw new MstError(`a json path must be either rooted, empty or relative, but got '${path}'`);\n    }\n    // '/a/b/c' -> [\"a\", \"b\", \"c\"]\n    // '../../b/c' -> [\"..\", \"..\", \"b\", \"c\"]\n    // '' -> []\n    // '/' -> ['']\n    // './a' -> [\".\", \"a\"]\n    // /./a' -> [\".\", \"a\"] equivalent to './a'\n    if (parts[0] === \"\") {\n        parts.shift();\n    }\n    return parts;\n}\n\n/** @hidden */\nconst $preProcessorFailed = Symbol(\"$preProcessorFailed\");\nclass SnapshotProcessor extends BaseType {\n    get flags() {\n        return this._subtype.flags | TypeFlags.SnapshotProcessor;\n    }\n    constructor(_subtype, _processors, name) {\n        super(name || _subtype.name);\n        Object.defineProperty(this, \"_subtype\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: _subtype\n        });\n        Object.defineProperty(this, \"_processors\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: _processors\n        });\n    }\n    describe() {\n        return `snapshotProcessor(${this._subtype.describe()})`;\n    }\n    preProcessSnapshot(sn) {\n        if (this._processors.preProcessor) {\n            return this._processors.preProcessor.call(null, sn);\n        }\n        return sn;\n    }\n    preProcessSnapshotSafe(sn) {\n        try {\n            return this.preProcessSnapshot(sn);\n        }\n        catch (e) {\n            return $preProcessorFailed;\n        }\n    }\n    postProcessSnapshot(sn, node) {\n        if (this._processors.postProcessor) {\n            return this._processors.postProcessor.call(null, sn, node.storedValue);\n        }\n        return sn;\n    }\n    _fixNode(node) {\n        // the node has to use these methods rather than the original type ones\n        proxyNodeTypeMethods(node.type, this, \"create\");\n        if (node instanceof ObjectNode) {\n            node.hasSnapshotPostProcessor = !!this._processors.postProcessor;\n        }\n        const oldGetSnapshot = node.getSnapshot;\n        node.getSnapshot = () => this.postProcessSnapshot(oldGetSnapshot.call(node), node);\n        if (!isUnionType(this._subtype)) {\n            node.getReconciliationType = () => {\n                return this;\n            };\n        }\n    }\n    instantiate(parent, subpath, environment, initialValue) {\n        const processedInitialValue = isStateTreeNode(initialValue)\n            ? initialValue\n            : this.preProcessSnapshot(initialValue);\n        const node = this._subtype.instantiate(parent, subpath, environment, processedInitialValue);\n        this._fixNode(node);\n        return node;\n    }\n    reconcile(current, newValue, parent, subpath) {\n        const node = this._subtype.reconcile(current, isStateTreeNode(newValue) ? newValue : this.preProcessSnapshot(newValue), parent, subpath);\n        if (node !== current) {\n            this._fixNode(node);\n        }\n        return node;\n    }\n    getSnapshot(node, applyPostProcess = true) {\n        const sn = this._subtype.getSnapshot(node);\n        return applyPostProcess ? this.postProcessSnapshot(sn, node) : sn;\n    }\n    isValidSnapshot(value, context) {\n        const processedSn = this.preProcessSnapshotSafe(value);\n        if (processedSn === $preProcessorFailed) {\n            return typeCheckFailure(context, value, \"Failed to preprocess value\");\n        }\n        return this._subtype.validate(processedSn, context);\n    }\n    getSubTypes() {\n        return this._subtype;\n    }\n    /**\n     * MST considers a given value to \"be\" of a subtype is the value is either:\n     *\n     * 1. And instance of the subtype\n     * 2. A valid snapshot *in* of the subtype\n     *\n     * Before v7, we used to also consider processed models (as in, SnapshotOut values of this).\n     * This is no longer the case, and is more in line with our overall \"is\" philosophy, which you can\n     * see in `src/core/type/type.ts:104` (assuming lines don't change too much).\n     *\n     * For additonal commentary, see discussion in https://github.com/mobxjs/mobx-state-tree/pull/2182\n     *\n     * The `is` function specifically checks for `SnapshotIn` or `Instance` of a given type.\n     *\n     * @param thing\n     * @returns\n     */\n    is(thing) {\n        const value = isType(thing)\n            ? this._subtype\n            : isStateTreeNode(thing)\n                ? thing\n                : this.preProcessSnapshotSafe(thing);\n        if (value === $preProcessorFailed) {\n            return false;\n        }\n        return this._subtype.validate(value, [{ path: \"\", type: this._subtype }]).length === 0;\n    }\n    isAssignableFrom(type) {\n        return this._subtype.isAssignableFrom(type);\n    }\n    isMatchingSnapshotId(current, snapshot) {\n        if (!(this._subtype instanceof ComplexType)) {\n            return false;\n        }\n        const processedSn = this.preProcessSnapshot(snapshot);\n        return this._subtype.isMatchingSnapshotId(current, processedSn);\n    }\n}\nfunction proxyNodeTypeMethods(nodeType, snapshotProcessorType, ...methods) {\n    for (const method of methods) {\n        nodeType[method] = snapshotProcessorType[method].bind(snapshotProcessorType);\n    }\n}\n/**\n * `types.snapshotProcessor` - Runs a pre/post snapshot processor before/after serializing a given type.\n *\n * [See known issue with `applySnapshot` and `preProcessSnapshot`](https://github.com/mobxjs/mobx-state-tree/issues/1317)\n *\n * Example:\n * ```ts\n * const Todo1 = types.model({ text: types.string })\n * // in the backend the text type must be null when empty\n * interface BackendTodo {\n *     text: string | null\n * }\n *\n * const Todo2 = types.snapshotProcessor(Todo1, {\n *     // from snapshot to instance\n *     preProcessor(snapshot: BackendTodo) {\n *         return {\n *             text: sn.text || \"\";\n *         }\n *     },\n *\n *     // from instance to snapshot\n *     postProcessor(snapshot, node): BackendTodo {\n *         return {\n *             text: !sn.text ? null : sn.text\n *         }\n *     }\n * })\n * ```\n *\n * @param type Type to run the processors over.\n * @param processors Processors to run.\n * @param name Type name, or undefined to inherit the inner type one.\n * @returns\n */\nfunction snapshotProcessor(type, processors, name) {\n    assertIsType(type, 1);\n    if (devMode()) {\n        if (processors.postProcessor && typeof processors.postProcessor !== \"function\") {\n            // istanbul ignore next\n            throw new MstError(\"postSnapshotProcessor must be a function\");\n        }\n        if (processors.preProcessor && typeof processors.preProcessor !== \"function\") {\n            // istanbul ignore next\n            throw new MstError(\"preSnapshotProcessor must be a function\");\n        }\n    }\n    return new SnapshotProcessor(type, processors, name);\n}\n\nconst needsIdentifierError = `Map.put can only be used to store complex values that have an identifier type attribute`;\nfunction tryCollectModelTypes(type, modelTypes) {\n    const subtypes = type.getSubTypes();\n    if (subtypes === cannotDetermineSubtype) {\n        return false;\n    }\n    if (subtypes) {\n        const subtypesArray = asArray(subtypes);\n        for (const subtype of subtypesArray) {\n            if (!tryCollectModelTypes(subtype, modelTypes))\n                return false;\n        }\n    }\n    if (type instanceof ModelType) {\n        modelTypes.push(type);\n    }\n    return true;\n}\n/**\n * @internal\n * @hidden\n */\nvar MapIdentifierMode;\n(function (MapIdentifierMode) {\n    MapIdentifierMode[MapIdentifierMode[\"UNKNOWN\"] = 0] = \"UNKNOWN\";\n    MapIdentifierMode[MapIdentifierMode[\"YES\"] = 1] = \"YES\";\n    MapIdentifierMode[MapIdentifierMode[\"NO\"] = 2] = \"NO\";\n})(MapIdentifierMode || (MapIdentifierMode = {}));\nclass MSTMap extends ObservableMap {\n    constructor(initialData, name) {\n        super(initialData, v => v, name);\n    }\n    get(key) {\n        // maybe this is over-enthousiastic? normalize numeric keys to strings\n        return super.get(\"\" + key);\n    }\n    has(key) {\n        return super.has(\"\" + key);\n    }\n    delete(key) {\n        return super.delete(\"\" + key);\n    }\n    set(key, value) {\n        return super.set(\"\" + key, value);\n    }\n    put(value) {\n        if (!value)\n            throw new MstError(`Map.put cannot be used to set empty values`);\n        if (isStateTreeNode(value)) {\n            const node = getStateTreeNode(value);\n            if (devMode()) {\n                if (!node.identifierAttribute) {\n                    throw new MstError(needsIdentifierError);\n                }\n            }\n            if (node.identifier === null) {\n                throw new MstError(needsIdentifierError);\n            }\n            this.set(node.identifier, value);\n            return value;\n        }\n        else if (!isMutable(value)) {\n            throw new MstError(`Map.put can only be used to store complex values`);\n        }\n        else {\n            const mapNode = getStateTreeNode(this);\n            const mapType = mapNode.type;\n            if (mapType.identifierMode !== MapIdentifierMode.YES) {\n                throw new MstError(needsIdentifierError);\n            }\n            const idAttr = mapType.mapIdentifierAttribute;\n            const id = value[idAttr];\n            if (!isValidIdentifier(id)) {\n                // try again but this time after creating a node for the value\n                // since it might be an optional identifier\n                const newNode = this.put(mapType.getChildType().create(value, mapNode.environment));\n                return this.put(getSnapshot(newNode));\n            }\n            const key = normalizeIdentifier(id);\n            this.set(key, value);\n            return this.get(key);\n        }\n    }\n}\n/**\n * @internal\n * @hidden\n */\nclass MapType extends ComplexType {\n    constructor(name, _subType, hookInitializers = []) {\n        super(name);\n        Object.defineProperty(this, \"_subType\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: _subType\n        });\n        Object.defineProperty(this, \"identifierMode\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: MapIdentifierMode.UNKNOWN\n        });\n        Object.defineProperty(this, \"mapIdentifierAttribute\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: undefined\n        });\n        Object.defineProperty(this, \"flags\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: TypeFlags.Map\n        });\n        Object.defineProperty(this, \"hookInitializers\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: []\n        });\n        this._determineIdentifierMode();\n        this.hookInitializers = hookInitializers;\n    }\n    hooks(hooks) {\n        const hookInitializers = this.hookInitializers.length > 0 ? this.hookInitializers.concat(hooks) : [hooks];\n        return new MapType(this.name, this._subType, hookInitializers);\n    }\n    instantiate(parent, subpath, environment, initialValue) {\n        this._determineIdentifierMode();\n        return createObjectNode(this, parent, subpath, environment, initialValue);\n    }\n    _determineIdentifierMode() {\n        if (this.identifierMode !== MapIdentifierMode.UNKNOWN) {\n            return;\n        }\n        const modelTypes = [];\n        if (tryCollectModelTypes(this._subType, modelTypes)) {\n            const identifierAttribute = modelTypes.reduce((current, type) => {\n                if (!type.identifierAttribute)\n                    return current;\n                if (current && current !== type.identifierAttribute) {\n                    throw new MstError(`The objects in a map should all have the same identifier attribute, expected '${current}', but child of type '${type.name}' declared attribute '${type.identifierAttribute}' as identifier`);\n                }\n                return type.identifierAttribute;\n            }, undefined);\n            if (identifierAttribute) {\n                this.identifierMode = MapIdentifierMode.YES;\n                this.mapIdentifierAttribute = identifierAttribute;\n            }\n            else {\n                this.identifierMode = MapIdentifierMode.NO;\n            }\n        }\n    }\n    initializeChildNodes(objNode, initialSnapshot = {}) {\n        const subType = objNode.type._subType;\n        const result = {};\n        Object.keys(initialSnapshot).forEach(name => {\n            result[name] = subType.instantiate(objNode, name, undefined, initialSnapshot[name]);\n        });\n        return result;\n    }\n    createNewInstance(childNodes) {\n        return new MSTMap(childNodes, this.name);\n    }\n    finalizeNewInstance(node, instance) {\n        _interceptReads(instance, node.unbox);\n        const type = node.type;\n        type.hookInitializers.forEach(initializer => {\n            const hooks = initializer(instance);\n            Object.keys(hooks).forEach(name => {\n                const hook = hooks[name];\n                const actionInvoker = createActionInvoker(instance, name, hook);\n                (!devMode() ? addHiddenFinalProp : addHiddenWritableProp)(instance, name, actionInvoker);\n            });\n        });\n        intercept(instance, this.willChange);\n        observe(instance, this.didChange);\n    }\n    describe() {\n        return this.name;\n    }\n    getChildren(node) {\n        // return (node.storedValue as ObservableMap<any>).values()\n        return values(node.storedValue);\n    }\n    getChildNode(node, key) {\n        const childNode = node.storedValue.get(\"\" + key);\n        if (!childNode)\n            throw new MstError(\"Not a child \" + key);\n        return childNode;\n    }\n    willChange(change) {\n        const node = getStateTreeNode(change.object);\n        const key = change.name;\n        node.assertWritable({ subpath: key });\n        const mapType = node.type;\n        const subType = mapType._subType;\n        switch (change.type) {\n            case \"update\":\n                {\n                    const { newValue } = change;\n                    const oldValue = change.object.get(key);\n                    if (newValue === oldValue)\n                        return null;\n                    typecheckInternal(subType, newValue);\n                    change.newValue = subType.reconcile(node.getChildNode(key), change.newValue, node, key);\n                    mapType.processIdentifier(key, change.newValue);\n                }\n                break;\n            case \"add\":\n                {\n                    typecheckInternal(subType, change.newValue);\n                    change.newValue = subType.instantiate(node, key, undefined, change.newValue);\n                    mapType.processIdentifier(key, change.newValue);\n                }\n                break;\n        }\n        return change;\n    }\n    processIdentifier(expected, node) {\n        if (this.identifierMode === MapIdentifierMode.YES && node instanceof ObjectNode) {\n            const identifier = node.identifier;\n            if (identifier !== expected)\n                throw new MstError(`A map of objects containing an identifier should always store the object under their own identifier. Trying to store key '${identifier}', but expected: '${expected}'`);\n        }\n    }\n    getSnapshot(node) {\n        const res = {};\n        node.getChildren().forEach(childNode => {\n            res[childNode.subpath] = childNode.snapshot;\n        });\n        return res;\n    }\n    processInitialSnapshot(childNodes) {\n        const processed = {};\n        Object.keys(childNodes).forEach(key => {\n            processed[key] = childNodes[key].getSnapshot();\n        });\n        return processed;\n    }\n    didChange(change) {\n        const node = getStateTreeNode(change.object);\n        switch (change.type) {\n            case \"update\":\n                return void node.emitPatch({\n                    op: \"replace\",\n                    path: escapeJsonPath(change.name),\n                    value: change.newValue.snapshot,\n                    oldValue: change.oldValue ? change.oldValue.snapshot : undefined\n                }, node);\n            case \"add\":\n                return void node.emitPatch({\n                    op: \"add\",\n                    path: escapeJsonPath(change.name),\n                    value: change.newValue.snapshot,\n                    oldValue: undefined\n                }, node);\n            case \"delete\":\n                // a node got deleted, get the old snapshot and make the node die\n                const oldSnapshot = change.oldValue.snapshot;\n                change.oldValue.die();\n                // emit the patch\n                return void node.emitPatch({\n                    op: \"remove\",\n                    path: escapeJsonPath(change.name),\n                    oldValue: oldSnapshot\n                }, node);\n        }\n    }\n    applyPatchLocally(node, subpath, patch) {\n        const target = node.storedValue;\n        switch (patch.op) {\n            case \"add\":\n            case \"replace\":\n                target.set(subpath, patch.value);\n                break;\n            case \"remove\":\n                target.delete(subpath);\n                break;\n        }\n    }\n    applySnapshot(node, snapshot) {\n        if (!isPlainObject(snapshot)) {\n            typecheckInternal(this, snapshot);\n            return;\n        }\n        const target = node.storedValue;\n        const childType = this.getChildType();\n        Array.from(target.keys()).forEach(key => {\n            if (!Object.prototype.hasOwnProperty.call(snapshot, key)) {\n                target.delete(key);\n                return;\n            }\n            const childNode = node.getChildNode(key);\n            const newValue = snapshot[key];\n            if (childNode.snapshot === newValue)\n                return;\n            if (canApplyDirectSnapshot(childType, childNode, newValue)) {\n                childNode.applySnapshot(newValue);\n            }\n            else {\n                target.set(key, newValue);\n            }\n        });\n        for (let key in snapshot) {\n            if (!Object.prototype.hasOwnProperty.call(snapshot, key) || target.has(key))\n                continue;\n            target.set(key, snapshot[key]);\n        }\n    }\n    getChildType() {\n        return this._subType;\n    }\n    isValidSnapshot(value, context) {\n        if (!isPlainObject(value)) {\n            return typeCheckFailure(context, value, \"Value is not a plain object\");\n        }\n        return flattenTypeErrors(Object.keys(value).map(path => this._subType.validate(value[path], getContextForPath(context, path, this._subType))));\n    }\n    getDefaultSnapshot() {\n        return EMPTY_OBJECT;\n    }\n    removeChild(node, subpath) {\n        node.storedValue.delete(subpath);\n    }\n}\nMapType.prototype.applySnapshot = action(MapType.prototype.applySnapshot);\n/**\n * `types.map` - Creates a key based collection type who's children are all of a uniform declared type.\n * If the type stored in a map has an identifier, it is mandatory to store the child under that identifier in the map.\n *\n * This type will always produce [observable maps](https://mobx.js.org/api.html#observablemap)\n *\n * Example:\n * ```ts\n * const Todo = types.model({\n *   id: types.identifier,\n *   task: types.string\n * })\n *\n * const TodoStore = types.model({\n *   todos: types.map(Todo)\n * })\n *\n * const s = TodoStore.create({ todos: {} })\n * unprotect(s)\n * s.todos.set(17, { task: \"Grab coffee\", id: 17 })\n * s.todos.put({ task: \"Grab cookie\", id: 18 }) // put will infer key from the identifier\n * console.log(s.todos.get(17).task) // prints: \"Grab coffee\"\n * ```\n *\n * @param subtype\n * @returns\n */\nfunction map(subtype) {\n    return new MapType(`Map<string, ${subtype.name}>`, subtype);\n}\n/**\n * Returns if a given value represents a map type.\n *\n * @param type\n * @returns `true` if it is a map type.\n */\nfunction isMapType(type) {\n    return isType(type) && (type.flags & TypeFlags.Map) > 0;\n}\n\n/**\n * @internal\n * @hidden\n */\nclass ArrayType extends ComplexType {\n    constructor(name, _subType, hookInitializers = []) {\n        super(name);\n        Object.defineProperty(this, \"_subType\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: _subType\n        });\n        Object.defineProperty(this, \"flags\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: TypeFlags.Array\n        });\n        Object.defineProperty(this, \"hookInitializers\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: []\n        });\n        this.hookInitializers = hookInitializers;\n    }\n    hooks(hooks) {\n        const hookInitializers = this.hookInitializers.length > 0 ? this.hookInitializers.concat(hooks) : [hooks];\n        return new ArrayType(this.name, this._subType, hookInitializers);\n    }\n    instantiate(parent, subpath, environment, initialValue) {\n        return createObjectNode(this, parent, subpath, environment, initialValue);\n    }\n    initializeChildNodes(objNode, snapshot = []) {\n        const subType = objNode.type._subType;\n        const result = {};\n        snapshot.forEach((item, index) => {\n            const subpath = \"\" + index;\n            result[subpath] = subType.instantiate(objNode, subpath, undefined, item);\n        });\n        return result;\n    }\n    createNewInstance(childNodes) {\n        const options = Object.assign(Object.assign({}, mobxShallow), { name: this.name });\n        return observable.array(convertChildNodesToArray(childNodes), options);\n    }\n    finalizeNewInstance(node, instance) {\n        _getAdministration(instance).dehancer = node.unbox;\n        const type = node.type;\n        type.hookInitializers.forEach(initializer => {\n            const hooks = initializer(instance);\n            Object.keys(hooks).forEach(name => {\n                const hook = hooks[name];\n                const actionInvoker = createActionInvoker(instance, name, hook);\n                (!devMode() ? addHiddenFinalProp : addHiddenWritableProp)(instance, name, actionInvoker);\n            });\n        });\n        intercept(instance, this.willChange);\n        observe(instance, this.didChange);\n    }\n    describe() {\n        return this.name;\n    }\n    getChildren(node) {\n        return node.storedValue.slice();\n    }\n    getChildNode(node, key) {\n        const index = Number(key);\n        if (index < node.storedValue.length)\n            return node.storedValue[index];\n        throw new MstError(\"Not a child: \" + key);\n    }\n    willChange(change) {\n        const node = getStateTreeNode(change.object);\n        node.assertWritable({ subpath: \"\" + change.index });\n        const subType = node.type._subType;\n        const childNodes = node.getChildren();\n        switch (change.type) {\n            case \"update\":\n                {\n                    if (change.newValue === change.object[change.index])\n                        return null;\n                    const updatedNodes = reconcileArrayChildren(node, subType, [childNodes[change.index]], [change.newValue], [change.index]);\n                    if (!updatedNodes) {\n                        return null;\n                    }\n                    change.newValue = updatedNodes[0];\n                }\n                break;\n            case \"splice\":\n                {\n                    const { index, removedCount, added } = change;\n                    const addedNodes = reconcileArrayChildren(node, subType, childNodes.slice(index, index + removedCount), added, added.map((_, i) => index + i));\n                    if (!addedNodes) {\n                        return null;\n                    }\n                    change.added = addedNodes;\n                    // update paths of remaining items\n                    for (let i = index + removedCount; i < childNodes.length; i++) {\n                        childNodes[i].setParent(node, \"\" + (i + added.length - removedCount));\n                    }\n                }\n                break;\n        }\n        return change;\n    }\n    getSnapshot(node) {\n        return node.getChildren().map(childNode => childNode.snapshot);\n    }\n    processInitialSnapshot(childNodes) {\n        const processed = [];\n        Object.keys(childNodes).forEach(key => {\n            processed.push(childNodes[key].getSnapshot());\n        });\n        return processed;\n    }\n    didChange(change) {\n        const node = getStateTreeNode(change.object);\n        switch (change.type) {\n            case \"update\":\n                return void node.emitPatch({\n                    op: \"replace\",\n                    path: \"\" + change.index,\n                    value: change.newValue.snapshot,\n                    oldValue: change.oldValue ? change.oldValue.snapshot : undefined\n                }, node);\n            case \"splice\":\n                // Perf: emit one patch for clear and replace ops.\n                if (change.removedCount && change.addedCount === change.object.length) {\n                    return void node.emitPatch({\n                        op: \"replace\",\n                        path: \"\",\n                        value: node.snapshot,\n                        oldValue: change.removed.map(node => node.snapshot)\n                    }, node);\n                }\n                for (let i = change.removedCount - 1; i >= 0; i--)\n                    node.emitPatch({\n                        op: \"remove\",\n                        path: \"\" + (change.index + i),\n                        oldValue: change.removed[i].snapshot\n                    }, node);\n                for (let i = 0; i < change.addedCount; i++)\n                    node.emitPatch({\n                        op: \"add\",\n                        path: \"\" + (change.index + i),\n                        value: change.added[i].snapshot,\n                        oldValue: undefined\n                    }, node);\n                return;\n        }\n    }\n    applyPatchLocally(node, subpath, patch) {\n        const target = node.storedValue;\n        const index = subpath === \"-\" ? target.length : Number(subpath);\n        switch (patch.op) {\n            case \"replace\":\n                target[index] = patch.value;\n                break;\n            case \"add\":\n                target.splice(index, 0, patch.value);\n                break;\n            case \"remove\":\n                target.splice(index, 1);\n                break;\n        }\n    }\n    applySnapshot(node, snapshot) {\n        if (!isArray(snapshot)) {\n            typecheckInternal(this, snapshot);\n            return;\n        }\n        const target = node.storedValue;\n        const childNodes = node.getChildren();\n        const oldLength = childNodes.length;\n        const newLength = snapshot.length;\n        const childType = this.getChildType();\n        const minLength = Math.min(oldLength, newLength);\n        const firstChangedIndex = findFirstChangedIndex(childNodes, snapshot, minLength);\n        // If all array items are the same and the length did not change, there is nothing to do.\n        if (firstChangedIndex === oldLength && firstChangedIndex === newLength) {\n            return;\n        }\n        // Preserve the old \"always replace\" behavior for length changes and when patches are being\n        // observed, since those cases are more sensitive to patch shape (for example, splice\n        // would otherwise emit add/remove patch sequences) and benchmark variance.\n        if (oldLength !== newLength || node.hasPatchSubscribers()) {\n            target.replace(snapshot);\n            return;\n        }\n        // When every changed entry can reuse its existing child node, update them in place\n        // instead of going through array replacement/splice.\n        if (canApplyDirectSnapshotsInRange(childType, childNodes, snapshot, firstChangedIndex)) {\n            applyDirectSnapshotsInRange(childNodes, snapshot, firstChangedIndex);\n            return;\n        }\n        // The lengths match, so only the differing entries have to change. Collect them\n        // before touching the array, because assigning to one entry invalidates the\n        // snapshots of the others and their identity can no longer be compared.\n        const changedIndexes = [];\n        for (let i = firstChangedIndex; i < oldLength; i++) {\n            if (childNodes[i].snapshot !== snapshot[i]) {\n                changedIndexes.push(i);\n            }\n        }\n        // Assign the changed entries individually rather than splicing across the\n        // untouched entries between them: a single assignment reconciles exactly one\n        // child, which keeps the cost proportional to the number of changes instead of\n        // the distance between the first and the last of them.\n        for (const index of changedIndexes) {\n            target[index] = snapshot[index];\n        }\n    }\n    getChildType() {\n        return this._subType;\n    }\n    isValidSnapshot(value, context) {\n        if (!isArray(value)) {\n            return typeCheckFailure(context, value, \"Value is not an array\");\n        }\n        return flattenTypeErrors(value.map((item, index) => this._subType.validate(item, getContextForPath(context, \"\" + index, this._subType))));\n    }\n    getDefaultSnapshot() {\n        return EMPTY_ARRAY;\n    }\n    removeChild(node, subpath) {\n        node.storedValue.splice(Number(subpath), 1);\n    }\n}\nArrayType.prototype.applySnapshot = action(ArrayType.prototype.applySnapshot);\n/**\n * `types.array` - Creates an index based collection type who's children are all of a uniform declared type.\n *\n * This type will always produce [observable arrays](https://mobx.js.org/api.html#observablearray)\n *\n * Example:\n * ```ts\n * const Todo = types.model({\n *   task: types.string\n * })\n *\n * const TodoStore = types.model({\n *   todos: types.array(Todo)\n * })\n *\n * const s = TodoStore.create({ todos: [] })\n * unprotect(s) // needed to allow modifying outside of an action\n * s.todos.push({ task: \"Grab coffee\" })\n * console.log(s.todos[0]) // prints: \"Grab coffee\"\n * ```\n *\n * @param subtype\n * @returns\n */\nfunction array(subtype) {\n    assertIsType(subtype, 1);\n    return new ArrayType(`${subtype.name}[]`, subtype);\n}\nfunction findFirstChangedIndex(childNodes, snapshot, length) {\n    let index = 0;\n    while (index < length && childNodes[index].snapshot === snapshot[index]) {\n        index++;\n    }\n    return index;\n}\nfunction canApplyDirectSnapshotsInRange(childType, childNodes, snapshot, startIndex) {\n    for (let i = startIndex; i < childNodes.length; i++) {\n        const childNode = childNodes[i];\n        if (childNode.snapshot === snapshot[i])\n            continue;\n        if (!canApplyDirectSnapshot(childType, childNode, snapshot[i])) {\n            return false;\n        }\n        // Array reconciliation only treats two snapshots as the same child when they carry\n        // a matching identifier (see `areSame`). Identifier-less children are replaced\n        // rather than updated in place, so they must not take the direct-apply path or\n        // lifecycle hooks such as afterCreate would never run for the new child.\n        if (!childNode.identifierAttribute || childNode.identifier === null) {\n            return false;\n        }\n    }\n    return true;\n}\nfunction applyDirectSnapshotsInRange(childNodes, snapshot, startIndex) {\n    for (let i = startIndex; i < childNodes.length; i++) {\n        const childNode = childNodes[i];\n        if (childNode.snapshot === snapshot[i])\n            continue;\n        childNode.applySnapshot(snapshot[i]);\n    }\n}\nfunction reconcileArrayChildren(parent, childType, oldNodes, newValues, newPaths) {\n    let nothingChanged = true;\n    for (let i = 0;; i++) {\n        const hasNewNode = i <= newValues.length - 1;\n        const oldNode = oldNodes[i];\n        let newValue = hasNewNode ? newValues[i] : undefined;\n        const newPath = \"\" + newPaths[i];\n        // for some reason, instead of newValue we got a node, fallback to the storedValue\n        // TODO: https://github.com/mobxjs/mobx-state-tree/issues/340#issuecomment-325581681\n        if (isNode(newValue))\n            newValue = newValue.storedValue;\n        if (!oldNode && !hasNewNode) {\n            // both are empty, end\n            break;\n        }\n        else if (!hasNewNode) {\n            // new one does not exists\n            nothingChanged = false;\n            oldNodes.splice(i, 1);\n            if (oldNode instanceof ObjectNode) {\n                // since it is going to be returned by pop/splice/shift better create it before killing it\n                // so it doesn't end up in an undead state\n                oldNode.createObservableInstanceIfNeeded();\n            }\n            oldNode.die();\n            i--;\n        }\n        else if (!oldNode) {\n            // there is no old node, create it\n            // check if already belongs to the same parent. if so, avoid pushing item in. only swapping can occur.\n            if (isStateTreeNode(newValue) && getStateTreeNode(newValue).parent === parent) {\n                // this node is owned by this parent, but not in the reconcilable set, so it must be double\n                throw new MstError(`Cannot add an object to a state tree if it is already part of the same or another state tree. Tried to assign an object to '${parent.path}/${newPath}', but it lives already at '${getStateTreeNode(newValue).path}'`);\n            }\n            nothingChanged = false;\n            const newNode = valueAsNode(childType, parent, newPath, newValue);\n            oldNodes.splice(i, 0, newNode);\n        }\n        else if (areSame(oldNode, newValue)) {\n            // both are the same, reconcile\n            oldNodes[i] = valueAsNode(childType, parent, newPath, newValue, oldNode);\n        }\n        else {\n            // nothing to do, try to reorder\n            let oldMatch = undefined;\n            // find a possible candidate to reuse\n            for (let j = i; j < oldNodes.length; j++) {\n                if (areSame(oldNodes[j], newValue)) {\n                    oldMatch = oldNodes.splice(j, 1)[0];\n                    break;\n                }\n            }\n            nothingChanged = false;\n            const newNode = valueAsNode(childType, parent, newPath, newValue, oldMatch);\n            oldNodes.splice(i, 0, newNode);\n        }\n    }\n    return nothingChanged ? null : oldNodes;\n}\n/**\n * Convert a value to a node at given parent and subpath. Attempts to reuse old node if possible and given.\n */\nfunction valueAsNode(childType, parent, subpath, newValue, oldNode) {\n    // ensure the value is valid-ish\n    typecheckInternal(childType, newValue);\n    function getNewNode() {\n        // the new value has a MST node\n        if (isStateTreeNode(newValue)) {\n            const childNode = getStateTreeNode(newValue);\n            childNode.assertAlive(EMPTY_OBJECT);\n            // the node lives here\n            if (childNode.parent !== null && childNode.parent === parent) {\n                childNode.setParent(parent, subpath);\n                return childNode;\n            }\n        }\n        // there is old node and new one is a value/snapshot\n        if (oldNode) {\n            return childType.reconcile(oldNode, newValue, parent, subpath);\n        }\n        // nothing to do, create from scratch\n        return childType.instantiate(parent, subpath, undefined, newValue);\n    }\n    const newNode = getNewNode();\n    if (oldNode && oldNode !== newNode) {\n        if (oldNode instanceof ObjectNode) {\n            // since it is going to be returned by pop/splice/shift better create it before killing it\n            // so it doesn't end up in an undead state\n            oldNode.createObservableInstanceIfNeeded();\n        }\n        oldNode.die();\n    }\n    return newNode;\n}\n/**\n * Check if a node holds a value.\n */\nfunction areSame(oldNode, newValue) {\n    // never consider dead old nodes for reconciliation\n    if (!oldNode.isAlive) {\n        return false;\n    }\n    // the new value has the same node\n    if (isStateTreeNode(newValue)) {\n        const newNode = getStateTreeNode(newValue);\n        return newNode.isAlive && newNode === oldNode;\n    }\n    // the provided value is the snapshot of the old node\n    if (oldNode.snapshot === newValue) {\n        return true;\n    }\n    // Non object nodes don't get reconciled\n    if (!(oldNode instanceof ObjectNode)) {\n        return false;\n    }\n    const oldNodeType = oldNode.getReconciliationType();\n    // new value is a snapshot with the correct identifier\n    return (oldNode.identifier !== null &&\n        oldNode.identifierAttribute &&\n        isPlainObject(newValue) &&\n        oldNodeType.is(newValue) &&\n        oldNodeType.isMatchingSnapshotId(oldNode, newValue));\n}\n/**\n * Returns if a given value represents an array type.\n *\n * @param type\n * @returns `true` if the type is an array type.\n */\nfunction isArrayType(type) {\n    return isType(type) && (type.flags & TypeFlags.Array) > 0;\n}\n\n/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n\r\nfunction __rest(s, e) {\r\n    var t = {};\r\n    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n        t[p] = s[p];\r\n    if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n            if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n                t[p[i]] = s[p[i]];\r\n        }\r\n    return t;\r\n}\r\n\r\ntypeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n    var e = new Error(message);\r\n    return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\n\nconst PRE_PROCESS_SNAPSHOT = \"preProcessSnapshot\";\nconst POST_PROCESS_SNAPSHOT = \"postProcessSnapshot\";\nfunction objectTypeToString() {\n    return getStateTreeNode(this).toString();\n}\nconst defaultObjectOptions = {\n    name: \"AnonymousModel\",\n    properties: {},\n    initializers: EMPTY_ARRAY\n};\nfunction toPropertiesObject(declaredProps) {\n    const keysList = Object.keys(declaredProps);\n    const alreadySeenKeys = new Set();\n    keysList.forEach(key => {\n        if (alreadySeenKeys.has(key)) {\n            throw new MstError(`${key} is declared twice in the model. Model should not contain the same keys`);\n        }\n        alreadySeenKeys.add(key);\n    });\n    // loop through properties and ensures that all items are types\n    return keysList.reduce((props, key) => {\n        // warn if user intended a HOOK\n        if (key in Hook) {\n            throw new MstError(`Hook '${key}' was defined as property. Hooks should be defined as part of the actions`);\n        }\n        // the user intended to use a view\n        const descriptor = Object.getOwnPropertyDescriptor(declaredProps, key);\n        if (\"get\" in descriptor) {\n            throw new MstError(\"Getters are not supported as properties. Please use views instead\");\n        }\n        // undefined and null are not valid\n        const value = descriptor.value;\n        if (value === null || value === undefined) {\n            throw new MstError(\"The default value of an attribute cannot be null or undefined as the type cannot be inferred. Did you mean `types.maybe(someType)`?\");\n        }\n        // its a primitive, convert to its type\n        else if (isPrimitive(value)) {\n            props[key] = optional(getPrimitiveFactoryFromValue(value), value);\n        }\n        // map defaults to empty object automatically for models\n        else if (value instanceof MapType) {\n            props[key] = optional(value, {});\n        }\n        else if (value instanceof ArrayType) {\n            props[key] = optional(value, []);\n        }\n        // its already a type\n        else if (isType(value)) ;\n        // its a function, maybe the user wanted a view?\n        else if (devMode() && typeof value === \"function\") {\n            throw new MstError(`Invalid type definition for property '${key}', it looks like you passed a function. Did you forget to invoke it, or did you intend to declare a view / action?`);\n        }\n        // no other complex values\n        else if (devMode() && typeof value === \"object\") {\n            throw new MstError(`Invalid type definition for property '${key}', it looks like you passed an object. Try passing another model type or a types.frozen.`);\n        }\n        else {\n            throw new MstError(`Invalid type definition for property '${key}', cannot infer a type from a value like '${value}' (${typeof value})`);\n        }\n        return props;\n    }, Object.assign({}, declaredProps));\n}\n/**\n * @internal\n * @hidden\n */\nclass ModelType extends ComplexType {\n    constructor(opts) {\n        super(opts.name || defaultObjectOptions.name);\n        Object.defineProperty(this, \"flags\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: TypeFlags.Object\n        });\n        /*\n         * The original object definition\n         */\n        Object.defineProperty(this, \"initializers\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: void 0\n        });\n        Object.defineProperty(this, \"properties\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: void 0\n        });\n        Object.defineProperty(this, \"preProcessor\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: void 0\n        });\n        Object.defineProperty(this, \"postProcessor\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: void 0\n        });\n        Object.defineProperty(this, \"propertyNames\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: void 0\n        });\n        Object.defineProperty(this, \"named\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: name => {\n                return this.cloneAndEnhance({ name });\n            }\n        });\n        Object.defineProperty(this, \"props\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: properties => {\n                return this.cloneAndEnhance({ properties });\n            }\n        });\n        Object.defineProperty(this, \"preProcessSnapshot\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: preProcessor => {\n                const currentPreprocessor = this.preProcessor;\n                if (!currentPreprocessor)\n                    return this.cloneAndEnhance({ preProcessor });\n                else\n                    return this.cloneAndEnhance({\n                        preProcessor: snapshot => currentPreprocessor(preProcessor(snapshot))\n                    });\n            }\n        });\n        Object.defineProperty(this, \"postProcessSnapshot\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: postProcessor => {\n                const currentPostprocessor = this.postProcessor;\n                if (!currentPostprocessor)\n                    return this.cloneAndEnhance({ postProcessor });\n                else\n                    return this.cloneAndEnhance({\n                        postProcessor: snapshot => postProcessor(currentPostprocessor(snapshot))\n                    });\n            }\n        });\n        Object.assign(this, defaultObjectOptions, opts);\n        // ensures that any default value gets converted to its related type\n        this.properties = toPropertiesObject(this.properties);\n        freeze(this.properties); // make sure nobody messes with it\n        this.propertyNames = Object.keys(this.properties);\n        this.identifierAttribute = this._getIdentifierAttribute();\n    }\n    _getIdentifierAttribute() {\n        let identifierAttribute = undefined;\n        this.forAllProps((propName, propType) => {\n            if (propType.flags & TypeFlags.Identifier) {\n                if (identifierAttribute)\n                    throw new MstError(`Cannot define property '${propName}' as object identifier, property '${identifierAttribute}' is already defined as identifier property`);\n                identifierAttribute = propName;\n            }\n        });\n        return identifierAttribute;\n    }\n    cloneAndEnhance(opts) {\n        return new ModelType({\n            name: opts.name || this.name,\n            properties: Object.assign({}, this.properties, opts.properties),\n            initializers: this.initializers.concat(opts.initializers || []),\n            preProcessor: opts.preProcessor || this.preProcessor,\n            postProcessor: opts.postProcessor || this.postProcessor\n        });\n    }\n    actions(fn) {\n        const actionInitializer = (self) => {\n            this.instantiateActions(self, fn(self));\n            return self;\n        };\n        return this.cloneAndEnhance({ initializers: [actionInitializer] });\n    }\n    instantiateActions(self, actions) {\n        // check if return is correct\n        if (!isPlainObject(actions)) {\n            throw new MstError(`actions initializer should return a plain object containing actions`);\n        }\n        // bind actions to the object created\n        Object.getOwnPropertyNames(actions).forEach(name => {\n            if (name in this.properties) {\n                throw new MstError(`'${name}' is a property and cannot be declared as an action`);\n            }\n            // warn if preprocessor was given\n            if (name === PRE_PROCESS_SNAPSHOT)\n                throw new MstError(`Cannot define action '${PRE_PROCESS_SNAPSHOT}', it should be defined using 'type.preProcessSnapshot(fn)' instead`);\n            // warn if postprocessor was given\n            if (name === POST_PROCESS_SNAPSHOT)\n                throw new MstError(`Cannot define action '${POST_PROCESS_SNAPSHOT}', it should be defined using 'type.postProcessSnapshot(fn)' instead`);\n            let action2 = actions[name];\n            // apply hook composition\n            let baseAction = self[name];\n            if (name in Hook && baseAction) {\n                let specializedAction = action2;\n                action2 = function () {\n                    baseAction.apply(null, arguments);\n                    specializedAction.apply(null, arguments);\n                };\n            }\n            // the goal of this is to make sure actions using \"this\" can call themselves,\n            // while still allowing the middlewares to register them\n            const middlewares = action2.$mst_middleware; // make sure middlewares are not lost\n            let boundAction = action2.bind(actions);\n            boundAction._isFlowAction = action2._isFlowAction || false;\n            boundAction.$mst_middleware = middlewares;\n            const actionInvoker = createActionInvoker(self, name, boundAction);\n            actions[name] = actionInvoker;\n            (!devMode() ? addHiddenFinalProp : addHiddenWritableProp)(self, name, actionInvoker);\n        });\n    }\n    volatile(fn) {\n        if (typeof fn !== \"function\") {\n            throw new MstError(`You passed an ${typeof fn} to volatile state as an argument, when function is expected`);\n        }\n        const stateInitializer = (self) => {\n            this.instantiateVolatileState(self, fn(self));\n            return self;\n        };\n        return this.cloneAndEnhance({ initializers: [stateInitializer] });\n    }\n    instantiateVolatileState(self, state) {\n        // check views return\n        if (!isPlainObject(state)) {\n            throw new MstError(`volatile state initializer should return a plain object containing state`);\n        }\n        Object.getOwnPropertyNames(state).forEach(name => {\n            if (name in this.properties) {\n                throw new MstError(`'${name}' is a property and cannot be declared as volatile state`);\n            }\n            set(self, name, state[name]);\n        });\n    }\n    extend(fn) {\n        const initializer = (self) => {\n            const _a = fn(self), { actions, views, state } = _a, rest = __rest(_a, [\"actions\", \"views\", \"state\"]);\n            for (let key in rest)\n                throw new MstError(`The \\`extend\\` function should return an object with a subset of the fields 'actions', 'views' and 'state'. Found invalid key '${key}'`);\n            if (state)\n                this.instantiateVolatileState(self, state);\n            if (views)\n                this.instantiateViews(self, views);\n            if (actions)\n                this.instantiateActions(self, actions);\n            return self;\n        };\n        return this.cloneAndEnhance({ initializers: [initializer] });\n    }\n    views(fn) {\n        const viewInitializer = (self) => {\n            this.instantiateViews(self, fn(self));\n            return self;\n        };\n        return this.cloneAndEnhance({ initializers: [viewInitializer] });\n    }\n    instantiateViews(self, views) {\n        // check views return\n        if (!isPlainObject(views)) {\n            throw new MstError(`views initializer should return a plain object containing views`);\n        }\n        Object.getOwnPropertyNames(views).forEach(name => {\n            if (name in this.properties) {\n                throw new MstError(`'${name}' is a property and cannot be declared as a view`);\n            }\n            // is this a computed property?\n            const descriptor = Object.getOwnPropertyDescriptor(views, name);\n            if (\"get\" in descriptor) {\n                defineProperty$1(self, name, descriptor);\n                makeObservable(self, { [name]: computed });\n            }\n            else if (typeof descriptor.value === \"function\") {\n                (!devMode() ? addHiddenFinalProp : addHiddenWritableProp)(self, name, descriptor.value);\n            }\n            else {\n                throw new MstError(`A view member should either be a function or getter based property`);\n            }\n        });\n    }\n    instantiate(parent, subpath, environment, initialValue) {\n        const value = isStateTreeNode(initialValue)\n            ? initialValue\n            : this.applySnapshotPreProcessor(initialValue);\n        return createObjectNode(this, parent, subpath, environment, value);\n        // Optimization: record all prop- view- and action names after first construction, and generate an optimal base class\n        // that pre-reserves all these fields for fast object-member lookups\n    }\n    initializeChildNodes(objNode, initialSnapshot = {}) {\n        const type = objNode.type;\n        const result = {};\n        type.forAllProps((name, childType) => {\n            result[name] = childType.instantiate(objNode, name, undefined, initialSnapshot[name]);\n        });\n        return result;\n    }\n    createNewInstance(childNodes) {\n        const options = Object.assign(Object.assign({}, mobxShallow), { name: this.name });\n        return observable.object(childNodes, EMPTY_OBJECT, options);\n    }\n    finalizeNewInstance(node, instance) {\n        addHiddenFinalProp(instance, \"toString\", objectTypeToString);\n        this.forAllProps(name => {\n            _interceptReads(instance, name, node.unbox);\n        });\n        this.initializers.reduce((self, fn) => fn(self), instance);\n        intercept(instance, this.willChange);\n        observe(instance, this.didChange);\n    }\n    willChange(chg) {\n        // TODO: mobx typings don't seem to take into account that newValue can be set even when removing a prop\n        const change = chg;\n        const node = getStateTreeNode(change.object);\n        const subpath = change.name;\n        node.assertWritable({ subpath });\n        const childType = node.type.properties[subpath];\n        // only properties are typed, state are stored as-is references\n        if (childType) {\n            typecheckInternal(childType, change.newValue);\n            change.newValue = childType.reconcile(node.getChildNode(subpath), change.newValue, node, subpath);\n        }\n        return change;\n    }\n    didChange(chg) {\n        // TODO: mobx typings don't seem to take into account that newValue can be set even when removing a prop\n        const change = chg;\n        const childNode = getStateTreeNode(change.object);\n        const childType = childNode.type.properties[change.name];\n        if (!childType) {\n            // don't emit patches for volatile state\n            return;\n        }\n        const oldChildValue = change.oldValue ? change.oldValue.snapshot : undefined;\n        childNode.emitPatch({\n            op: \"replace\",\n            path: escapeJsonPath(change.name),\n            value: change.newValue.snapshot,\n            oldValue: oldChildValue\n        }, childNode);\n    }\n    getChildren(node) {\n        const res = [];\n        this.forAllProps(name => {\n            res.push(this.getChildNode(node, name));\n        });\n        return res;\n    }\n    getChildNode(node, key) {\n        var _a;\n        if (!(key in this.properties))\n            throw new MstError(\"Not a value property: \" + key);\n        const adm = _getAdministration(node.storedValue, key);\n        const childNode = (_a = adm.raw) === null || _a === void 0 ? void 0 : _a.call(adm);\n        if (!childNode)\n            throw new MstError(\"Node not available for property \" + key);\n        return childNode;\n    }\n    getSnapshot(node, applyPostProcess = true) {\n        const res = {};\n        this.forAllProps((name, type) => {\n            // TODO: FIXME, make sure the observable ref is used!\n            const atom = getAtom(node.storedValue, name);\n            atom.reportObserved();\n            res[name] = this.getChildNode(node, name).snapshot;\n        });\n        if (applyPostProcess) {\n            return this.applySnapshotPostProcessor(res);\n        }\n        return res;\n    }\n    processInitialSnapshot(childNodes) {\n        const processed = {};\n        Object.keys(childNodes).forEach(key => {\n            processed[key] = childNodes[key].getSnapshot();\n        });\n        return this.applySnapshotPostProcessor(processed);\n    }\n    applyPatchLocally(node, subpath, patch) {\n        if (!(patch.op === \"replace\" || patch.op === \"add\")) {\n            throw new MstError(`object does not support operation ${patch.op}`);\n        }\n        node.storedValue[subpath] = patch.value;\n    }\n    applySnapshot(node, snapshot) {\n        const preProcessedSnapshot = this.applySnapshotPreProcessor(snapshot);\n        const isPreProcessedSnapshotNonPlain = !isPlainObject(preProcessedSnapshot);\n        // Fast-path plain-object snapshots, but still validate when preprocessing is required\n        // or when preprocessing produces an invalid model snapshot.\n        if (!isPlainObject(snapshot) || isPreProcessedSnapshotNonPlain) {\n            typecheckInternal(this, snapshot);\n            if (isPreProcessedSnapshotNonPlain)\n                return;\n        }\n        this.forAllProps((name, childType) => {\n            const childNode = node.getChildNode(name);\n            const newValue = preProcessedSnapshot[name];\n            if (childNode.snapshot === newValue)\n                return;\n            if (canApplyDirectSnapshot(childType, childNode, newValue)) {\n                childNode.applySnapshot(newValue);\n                return;\n            }\n            node.storedValue[name] = newValue;\n        });\n    }\n    applySnapshotPreProcessor(snapshot) {\n        const processor = this.preProcessor;\n        return processor ? processor.call(null, snapshot) : snapshot;\n    }\n    applySnapshotPostProcessor(snapshot) {\n        const postProcessor = this.postProcessor;\n        if (postProcessor)\n            return postProcessor.call(null, snapshot);\n        return snapshot;\n    }\n    getChildType(propertyName) {\n        assertIsString(propertyName, 1);\n        return this.properties[propertyName];\n    }\n    isValidSnapshot(value, context) {\n        let snapshot = this.applySnapshotPreProcessor(value);\n        if (!isPlainObject(snapshot)) {\n            return typeCheckFailure(context, snapshot, \"Value is not a plain object\");\n        }\n        return flattenTypeErrors(this.propertyNames.map(key => this.properties[key].validate(snapshot[key], getContextForPath(context, key, this.properties[key]))));\n    }\n    forAllProps(fn) {\n        this.propertyNames.forEach(key => fn(key, this.properties[key]));\n    }\n    describe() {\n        // optimization: cache\n        return (\"{ \" +\n            this.propertyNames.map(key => key + \": \" + this.properties[key].describe()).join(\"; \") +\n            \" }\");\n    }\n    getDefaultSnapshot() {\n        return EMPTY_OBJECT;\n    }\n    removeChild(node, subpath) {\n        node.storedValue[subpath] = undefined;\n    }\n}\nModelType.prototype.applySnapshot = action(ModelType.prototype.applySnapshot);\n/**\n * `types.model` - Creates a new model type by providing a name, properties, volatile state and actions.\n *\n * See the [model type](/concepts/trees#creating-models) description or the [getting started](intro/getting-started.md#getting-started-1) tutorial.\n */\nfunction model(...args) {\n    if (devMode() && typeof args[0] !== \"string\" && args[1]) {\n        throw new MstError(\"Model creation failed. First argument must be a string when two arguments are provided\");\n    }\n    const name = typeof args[0] === \"string\" ? args.shift() : \"AnonymousModel\";\n    const properties = args.shift() || {};\n    return new ModelType({ name, properties });\n}\n/**\n * `types.compose` - Composes a new model from one or more existing model types.\n * This method can be invoked in two forms:\n * Given 2 or more model types, the types are composed into a new Type.\n * Given first parameter as a string and 2 or more model types,\n * the types are composed into a new Type with the given name\n */\nfunction compose(...args) {\n    // TODO: just join the base type names if no name is provided\n    const hasTypename = typeof args[0] === \"string\";\n    const typeName = hasTypename ? args[0] : \"AnonymousModel\";\n    if (hasTypename) {\n        args.shift();\n    }\n    // check all parameters\n    if (devMode()) {\n        args.forEach((type, i) => {\n            assertArg(type, isModelType, \"mobx-state-tree model type\", hasTypename ? i + 2 : i + 1);\n        });\n    }\n    return args\n        .reduce((prev, cur) => prev.cloneAndEnhance({\n        name: prev.name + \"_\" + cur.name,\n        properties: cur.properties,\n        initializers: cur.initializers,\n        preProcessor: (snapshot) => cur.applySnapshotPreProcessor(prev.applySnapshotPreProcessor(snapshot)),\n        postProcessor: (snapshot) => cur.applySnapshotPostProcessor(prev.applySnapshotPostProcessor(snapshot))\n    }))\n        .named(typeName);\n}\n/**\n * Returns if a given value represents a model type.\n *\n * @param type\n * @returns\n */\nfunction isModelType(type) {\n    return isType(type) && (type.flags & TypeFlags.Object) > 0;\n}\n\n// TODO: implement CoreType using types.custom ?\n/**\n * @internal\n * @hidden\n */\nclass CoreType extends SimpleType {\n    constructor(name, flags, checker, initializer = identity) {\n        super(name);\n        Object.defineProperty(this, \"flags\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: flags\n        });\n        Object.defineProperty(this, \"checker\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: checker\n        });\n        Object.defineProperty(this, \"initializer\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: initializer\n        });\n        this.flags = flags;\n    }\n    describe() {\n        return this.name;\n    }\n    instantiate(parent, subpath, environment, initialValue) {\n        return createScalarNode(this, parent, subpath, environment, initialValue);\n    }\n    createNewInstance(snapshot) {\n        return this.initializer(snapshot);\n    }\n    isValidSnapshot(value, context) {\n        if (isPrimitive(value) && this.checker(value)) {\n            return typeCheckSuccess();\n        }\n        const typeName = this.name === \"Date\" ? \"Date or a unix milliseconds timestamp\" : this.name;\n        return typeCheckFailure(context, value, `Value is not a ${typeName}`);\n    }\n}\n/**\n * `types.string` - Creates a type that can only contain a string value.\n * This type is used for string values by default\n *\n * Example:\n * ```ts\n * const Person = types.model({\n *   firstName: types.string,\n *   lastName: \"Doe\"\n * })\n * ```\n */\n// tslint:disable-next-line:variable-name\nconst string = new CoreType(\"string\", TypeFlags.String, v => typeof v === \"string\");\n/**\n * `types.number` - Creates a type that can only contain a numeric value.\n * This type is used for numeric values by default\n *\n * Example:\n * ```ts\n * const Vector = types.model({\n *   x: types.number,\n *   y: 1.5\n * })\n * ```\n */\n// tslint:disable-next-line:variable-name\nconst number = new CoreType(\"number\", TypeFlags.Number, v => typeof v === \"number\");\n/**\n * `types.integer` - Creates a type that can only contain an integer value.\n *\n * Example:\n * ```ts\n * const Size = types.model({\n *   width: types.integer,\n *   height: 10\n * })\n * ```\n */\n// tslint:disable-next-line:variable-name\nconst integer = new CoreType(\"integer\", TypeFlags.Integer, v => isInteger(v));\n/**\n * `types.float` - Creates a type that can only contain an float value.\n *\n * Example:\n * ```ts\n * const Size = types.model({\n *   width: types.float,\n *   height: 10\n * })\n * ```\n */\n// tslint:disable-next-line:variable-name\nconst float = new CoreType(\"float\", TypeFlags.Float, v => isFloat(v));\n/**\n * `types.finite` - Creates a type that can only contain an finite value.\n *\n * Example:\n * ```ts\n * const Size = types.model({\n *   width: types.finite,\n *   height: 10\n * })\n * ```\n */\n// tslint:disable-next-line:variable-name\nconst finite = new CoreType(\"finite\", TypeFlags.Finite, v => isFinite(v));\nconst _BigIntPrimitive = new CoreType(\"bigint\", TypeFlags.BigInt, v => {\n    if (typeof v === \"bigint\") {\n        return true;\n    }\n    if (typeof v === \"string\" || typeof v === \"number\") {\n        try {\n            // BigInt primitive constructor verifies whether the value is a valid integer\n            BigInt(v);\n            return true;\n        }\n        catch (_a) { }\n    }\n    return false;\n}, v => (typeof v === \"bigint\" ? v : BigInt(v)));\n_BigIntPrimitive.getSnapshot = function (node) {\n    return String(node.storedValue);\n};\n/**\n * `types.bigint` - Creates a type that can only contain a bigint value.\n * Snapshots serialize to string (JSON-safe) and deserialize from string, number or bigint.\n *\n * Example:\n * ```ts\n * const BigId = types.model({\n *   id: types.identifier,\n *   value: types.bigint\n * })\n * getSnapshot(store).value // \"0\" (string, JSON-safe)\n * ```\n */\nconst bigint = _BigIntPrimitive;\n/**\n * `types.boolean` - Creates a type that can only contain a boolean value.\n * This type is used for boolean values by default\n *\n * Example:\n * ```ts\n * const Thing = types.model({\n *   isCool: types.boolean,\n *   isAwesome: false\n * })\n * ```\n */\n// tslint:disable-next-line:variable-name\nconst boolean = new CoreType(\"boolean\", TypeFlags.Boolean, v => typeof v === \"boolean\");\n/**\n * `types.null` - The type of the value `null`\n */\nconst nullType = new CoreType(\"null\", TypeFlags.Null, v => v === null);\n/**\n * `types.undefined` - The type of the value `undefined`\n */\nconst undefinedType = new CoreType(\"undefined\", TypeFlags.Undefined, v => v === undefined);\nconst _DatePrimitive = new CoreType(\"Date\", TypeFlags.Date, v => typeof v === \"number\" || v instanceof Date, v => (v instanceof Date ? v : new Date(v)));\n_DatePrimitive.getSnapshot = function (node) {\n    return node.storedValue.getTime();\n};\n/**\n * `types.Date` - Creates a type that can only contain a javascript Date value.\n *\n * Example:\n * ```ts\n * const LogLine = types.model({\n *   timestamp: types.Date,\n * })\n *\n * LogLine.create({ timestamp: new Date() })\n * ```\n */\nconst DatePrimitive = _DatePrimitive;\n/**\n * @internal\n * @hidden\n */\nfunction getPrimitiveFactoryFromValue(value) {\n    switch (typeof value) {\n        case \"string\":\n            return string;\n        case \"number\":\n            return number; // In the future, isInteger(value) ? integer : number would be interesting, but would be too breaking for now\n        case \"boolean\":\n            return boolean;\n        case \"bigint\":\n            return bigint;\n        case \"object\":\n            if (value instanceof Date)\n                return DatePrimitive;\n    }\n    throw new MstError(\"Cannot determine primitive type from value \" + value);\n}\n/**\n * Returns if a given value represents a primitive type.\n *\n * @param type\n * @returns\n */\nfunction isPrimitiveType(type) {\n    return (isType(type) &&\n        (type.flags &\n            (TypeFlags.String |\n                TypeFlags.Number |\n                TypeFlags.Integer |\n                TypeFlags.Boolean |\n                TypeFlags.Date |\n                TypeFlags.BigInt)) >\n            0);\n}\n\n/**\n * @internal\n * @hidden\n */\nclass Literal extends SimpleType {\n    constructor(value) {\n        super(JSON.stringify(value));\n        Object.defineProperty(this, \"value\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: void 0\n        });\n        Object.defineProperty(this, \"flags\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: TypeFlags.Literal\n        });\n        this.value = value;\n    }\n    instantiate(parent, subpath, environment, initialValue) {\n        return createScalarNode(this, parent, subpath, environment, initialValue);\n    }\n    describe() {\n        return JSON.stringify(this.value);\n    }\n    isValidSnapshot(value, context) {\n        if (isPrimitive(value) && value === this.value) {\n            return typeCheckSuccess();\n        }\n        return typeCheckFailure(context, value, `Value is not a literal ${JSON.stringify(this.value)}`);\n    }\n}\n/**\n * `types.literal` - The literal type will return a type that will match only the exact given type.\n * The given value must be a primitive, in order to be serialized to a snapshot correctly.\n * You can use literal to match exact strings for example the exact male or female string.\n *\n * Example:\n * ```ts\n * const Person = types.model({\n *     name: types.string,\n *     gender: types.union(types.literal('male'), types.literal('female'))\n * })\n * ```\n *\n * @param value The value to use in the strict equal check\n * @returns\n */\nfunction literal(value) {\n    // check that the given value is a primitive\n    assertArg(value, isPrimitive, \"primitive\", 1);\n    return new Literal(value);\n}\n/**\n * Returns if a given value represents a literal type.\n *\n * @param type\n * @returns\n */\nfunction isLiteralType(type) {\n    return isType(type) && (type.flags & TypeFlags.Literal) > 0;\n}\n\nclass Refinement extends BaseType {\n    get flags() {\n        return this._subtype.flags | TypeFlags.Refinement;\n    }\n    constructor(name, _subtype, _predicate, _message) {\n        super(name);\n        Object.defineProperty(this, \"_subtype\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: _subtype\n        });\n        Object.defineProperty(this, \"_predicate\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: _predicate\n        });\n        Object.defineProperty(this, \"_message\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: _message\n        });\n    }\n    describe() {\n        return this.name;\n    }\n    instantiate(parent, subpath, environment, initialValue) {\n        // create the child type\n        return this._subtype.instantiate(parent, subpath, environment, initialValue);\n    }\n    isAssignableFrom(type) {\n        return this._subtype.isAssignableFrom(type);\n    }\n    isValidSnapshot(value, context) {\n        const subtypeErrors = this._subtype.validate(value, context);\n        if (subtypeErrors.length > 0)\n            return subtypeErrors;\n        const snapshot = isStateTreeNode(value) ? getStateTreeNode(value).snapshot : value;\n        if (!this._predicate(snapshot)) {\n            return typeCheckFailure(context, value, this._message(value));\n        }\n        return typeCheckSuccess();\n    }\n    reconcile(current, newValue, parent, subpath) {\n        return this._subtype.reconcile(current, newValue, parent, subpath);\n    }\n    getSubTypes() {\n        return this._subtype;\n    }\n}\n/**\n * `types.refinement` - Creates a type that is more specific than the base type, e.g. `types.refinement(types.string, value => value.length > 5)` to create a type of strings that can only be longer then 5.\n *\n * @param name\n * @param type\n * @param predicate\n * @returns\n */\nfunction refinement(...args) {\n    const name = typeof args[0] === \"string\" ? args.shift() : isType(args[0]) ? args[0].name : null;\n    const type = args[0];\n    const predicate = args[1];\n    const message = args[2]\n        ? args[2]\n        : (v) => \"Value does not respect the refinement predicate\";\n    // ensures all parameters are correct\n    assertIsType(type, [1, 2]);\n    assertIsString(name, 1);\n    assertIsFunction(predicate, [2, 3]);\n    assertIsFunction(message, [3, 4]);\n    return new Refinement(name, type, predicate, message);\n}\n/**\n * Returns if a given value is a refinement type.\n *\n * @param type\n * @returns\n */\nfunction isRefinementType(type) {\n    return isType(type) && (type.flags & TypeFlags.Refinement) > 0;\n}\n\n/**\n * `types.enumeration` - Can be used to create a string or number based enumeration.\n * (note: this methods is just sugar for a union of string or number literals)\n *\n * Example:\n * ```ts\n * const TrafficLight = types.model({\n *   color: types.enumeration(\"Color\", [\"Red\", \"Orange\", \"Green\"]),\n *   speedLimit: types.enumeration(\"SpeedLimit\", [30, 50])\n * })\n * ```\n *\n * @param name descriptive name of the enumeration (optional)\n * @param options possible values this enumeration can have\n * @returns\n */\nfunction enumeration(name, options) {\n    const realOptions = typeof name === \"string\" ? options : name;\n    // check all options\n    if (devMode()) {\n        realOptions.forEach((option, i) => {\n            assertArg(option, o => typeof o === \"string\" || typeof o === \"number\", \"string or number\", i + 1);\n        });\n    }\n    const type = union(...realOptions.map(option => literal(option)));\n    if (typeof name === \"string\")\n        type.name = name;\n    return type;\n}\n\n/**\n * @internal\n * @hidden\n */\nclass Union extends BaseType {\n    get flags() {\n        let result = TypeFlags.Union;\n        this._types.forEach(type => {\n            result |= type.flags;\n        });\n        return result;\n    }\n    constructor(name, _types, options) {\n        super(name);\n        Object.defineProperty(this, \"_types\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: _types\n        });\n        Object.defineProperty(this, \"_dispatcher\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: void 0\n        });\n        Object.defineProperty(this, \"_eager\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: true\n        });\n        options = Object.assign({ eager: true, dispatcher: undefined }, options);\n        this._dispatcher = options.dispatcher;\n        if (!options.eager)\n            this._eager = false;\n    }\n    isAssignableFrom(type) {\n        return this._types.some(subType => subType.isAssignableFrom(type));\n    }\n    describe() {\n        return \"(\" + this._types.map(factory => factory.describe()).join(\" | \") + \")\";\n    }\n    instantiate(parent, subpath, environment, initialValue) {\n        const type = this.determineType(initialValue, undefined);\n        if (!type)\n            throw new MstError(\"No matching type for union \" + this.describe()); // can happen in prod builds\n        return type.instantiate(parent, subpath, environment, initialValue);\n    }\n    reconcile(current, newValue, parent, subpath) {\n        const type = this.determineType(newValue, current.getReconciliationType());\n        if (!type)\n            throw new MstError(\"No matching type for union \" + this.describe()); // can happen in prod builds\n        return type.reconcile(current, newValue, parent, subpath);\n    }\n    determineType(value, reconcileCurrentType) {\n        // try the dispatcher, if defined\n        if (this._dispatcher) {\n            return this._dispatcher(value);\n        }\n        // find the most accommodating type\n        // if we are using reconciliation try the current node type first (fix for #1045)\n        if (reconcileCurrentType) {\n            if (reconcileCurrentType.is(value)) {\n                return reconcileCurrentType;\n            }\n            return this._types.filter(t => t !== reconcileCurrentType).find(type => type.is(value));\n        }\n        else {\n            return this._types.find(type => type.is(value));\n        }\n    }\n    isValidSnapshot(value, context) {\n        if (this._dispatcher) {\n            return this._dispatcher(value).validate(value, context);\n        }\n        const allErrors = [];\n        let applicableTypes = 0;\n        for (let i = 0; i < this._types.length; i++) {\n            const type = this._types[i];\n            const errors = type.validate(value, context);\n            if (errors.length === 0) {\n                if (this._eager)\n                    return typeCheckSuccess();\n                else\n                    applicableTypes++;\n            }\n            else {\n                allErrors.push(errors);\n            }\n        }\n        if (applicableTypes === 1)\n            return typeCheckSuccess();\n        return typeCheckFailure(context, value, \"No type is applicable for the union\").concat(flattenTypeErrors(allErrors));\n    }\n    getSubTypes() {\n        return this._types;\n    }\n}\n/**\n * `types.union` - Create a union of multiple types. If the correct type cannot be inferred unambiguously from a snapshot, provide a dispatcher function of the form `(snapshot) => Type`.\n *\n * @param optionsOrType\n * @param otherTypes\n * @returns\n */\nfunction union(optionsOrType, ...otherTypes) {\n    const options = isType(optionsOrType) ? undefined : optionsOrType;\n    const types = (isType(optionsOrType) ? [optionsOrType, ...otherTypes] : otherTypes);\n    const name = \"(\" + types.map(type => type.name).join(\" | \") + \")\";\n    // check all options\n    if (devMode()) {\n        if (options) {\n            assertArg(options, o => isPlainObject(o), \"object { eager?: boolean, dispatcher?: Function }\", 1);\n        }\n        types.forEach((type, i) => {\n            assertIsType(type, options ? i + 2 : i + 1);\n        });\n    }\n    return new Union(name, types, options);\n}\n/**\n * Returns if a given value represents a union type.\n *\n * @param type\n * @returns\n */\nfunction isUnionType(type) {\n    return isType(type) && (type.flags & TypeFlags.Union) > 0;\n}\n\n/**\n * @hidden\n * @internal\n */\nclass OptionalValue extends BaseType {\n    get flags() {\n        return this._subtype.flags | TypeFlags.Optional;\n    }\n    constructor(_subtype, _defaultValue, optionalValues) {\n        super(_subtype.name);\n        Object.defineProperty(this, \"_subtype\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: _subtype\n        });\n        Object.defineProperty(this, \"_defaultValue\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: _defaultValue\n        });\n        Object.defineProperty(this, \"optionalValues\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: optionalValues\n        });\n    }\n    describe() {\n        return this._subtype.describe() + \"?\";\n    }\n    instantiate(parent, subpath, environment, initialValue) {\n        if (this.optionalValues.indexOf(initialValue) >= 0) {\n            const defaultInstanceOrSnapshot = this.getDefaultInstanceOrSnapshot();\n            return this._subtype.instantiate(parent, subpath, environment, defaultInstanceOrSnapshot);\n        }\n        return this._subtype.instantiate(parent, subpath, environment, initialValue);\n    }\n    reconcile(current, newValue, parent, subpath) {\n        return this._subtype.reconcile(current, this.optionalValues.indexOf(newValue) < 0 && this._subtype.is(newValue)\n            ? newValue\n            : this.getDefaultInstanceOrSnapshot(), parent, subpath);\n    }\n    getDefaultInstanceOrSnapshot() {\n        const defaultInstanceOrSnapshot = typeof this._defaultValue === \"function\"\n            ? this._defaultValue()\n            : this._defaultValue;\n        // while static values are already snapshots and checked on types.optional\n        // generator functions must always be rechecked just in case\n        if (typeof this._defaultValue === \"function\") {\n            typecheckInternal(this, defaultInstanceOrSnapshot);\n        }\n        return defaultInstanceOrSnapshot;\n    }\n    isValidSnapshot(value, context) {\n        // defaulted values can be skipped\n        if (this.optionalValues.indexOf(value) >= 0) {\n            return typeCheckSuccess();\n        }\n        // bounce validation to the sub-type\n        return this._subtype.validate(value, context);\n    }\n    isAssignableFrom(type) {\n        return this._subtype.isAssignableFrom(type);\n    }\n    getSubTypes() {\n        return this._subtype;\n    }\n}\nfunction checkOptionalPreconditions(type, defaultValueOrFunction) {\n    // make sure we never pass direct instances\n    if (typeof defaultValueOrFunction !== \"function\" && isStateTreeNode(defaultValueOrFunction)) {\n        throw new MstError(\"default value cannot be an instance, pass a snapshot or a function that creates an instance/snapshot instead\");\n    }\n    assertIsType(type, 1);\n    if (devMode()) {\n        // we only check default values if they are passed directly\n        // if they are generator functions they will be checked once they are generated\n        // we don't check generator function results here to avoid generating a node just for type-checking purposes\n        // which might generate side-effects\n        if (typeof defaultValueOrFunction !== \"function\") {\n            typecheckInternal(type, defaultValueOrFunction);\n        }\n    }\n}\n/**\n * `types.optional` - Can be used to create a property with a default value.\n *\n * Depending on the third argument (`optionalValues`) there are two ways of operation:\n * - If the argument is not provided, then if a value is not provided in the snapshot (`undefined` or missing),\n *   it will default to the provided `defaultValue`\n * - If the argument is provided, then if the value in the snapshot matches one of the optional values inside the array then it will\n *   default to the provided `defaultValue`. Additionally, if one of the optional values inside the array is `undefined` then a missing\n *   property is also valid.\n *\n *   Note that it is also possible to include values of the same type as the intended subtype as optional values,\n *   in this case the optional value will be transformed into the `defaultValue` (e.g. `types.optional(types.string, \"unnamed\", [undefined, \"\"])`\n *   will transform the snapshot values `undefined` (and therefore missing) and empty strings into the string `\"unnamed\"` when it gets\n *   instantiated).\n *\n * If `defaultValue` is a function, the function will be invoked for every new instance.\n * Applying a snapshot in which the optional value is one of the optional values (or `undefined`/_not_ present if none are provided) causes the\n * value to be reset.\n *\n * Example:\n * ```ts\n * const Todo = types.model({\n *   title: types.string,\n *   subtitle1: types.optional(types.string, \"\", [null]),\n *   subtitle2: types.optional(types.string, \"\", [null, undefined]),\n *   done: types.optional(types.boolean, false),\n *   created: types.optional(types.Date, () => new Date()),\n * })\n *\n * // if done is missing / undefined it will become false\n * // if created is missing / undefined it will get a freshly generated timestamp\n * // if subtitle1 is null it will default to \"\", but it cannot be missing or undefined\n * // if subtitle2 is null or undefined it will default to \"\"; since it can be undefined it can also be missing\n * const todo = Todo.create({ title: \"Get coffee\", subtitle1: null })\n * ```\n *\n * @param type\n * @param defaultValueOrFunction\n * @param optionalValues an optional array with zero or more primitive values (string, number, boolean, null or undefined)\n *                       that will be converted into the default. `[ undefined ]` is assumed when none is provided\n * @returns\n */\nfunction optional(type, defaultValueOrFunction, optionalValues) {\n    checkOptionalPreconditions(type, defaultValueOrFunction);\n    return new OptionalValue(type, defaultValueOrFunction, optionalValues ? optionalValues : undefinedAsOptionalValues);\n}\nconst undefinedAsOptionalValues = [undefined];\n/**\n * Returns if a value represents an optional type.\n *\n * @template IT\n * @param type\n * @returns\n */\nfunction isOptionalType(type) {\n    return isType(type) && (type.flags & TypeFlags.Optional) > 0;\n}\n\nconst optionalUndefinedType = optional(undefinedType, undefined);\nconst optionalNullType = optional(nullType, null);\n/**\n * `types.maybe` - Maybe will make a type nullable, and also optional.\n * The value `undefined` will be used to represent nullability.\n *\n * @param type\n * @returns\n */\nfunction maybe(type) {\n    assertIsType(type, 1);\n    return union(type, optionalUndefinedType);\n}\n/**\n * `types.maybeNull` - Maybe will make a type nullable, and also optional.\n * The value `null` will be used to represent no value.\n *\n * @param type\n * @returns\n */\nfunction maybeNull(type) {\n    assertIsType(type, 1);\n    return union(type, optionalNullType);\n}\n\nclass Late extends BaseType {\n    get flags() {\n        return (this._subType ? this._subType.flags : 0) | TypeFlags.Late;\n    }\n    getSubType(mustSucceed) {\n        if (!this._subType) {\n            let t = undefined;\n            try {\n                t = this._definition();\n            }\n            catch (e) {\n                if (e instanceof ReferenceError)\n                    // can happen in strict ES5 code when a definition is self refering\n                    t = undefined;\n                else\n                    throw e;\n            }\n            if (mustSucceed && t === undefined)\n                throw new MstError(\"Late type seems to be used too early, the definition (still) returns undefined\");\n            if (t) {\n                if (devMode() && !isType(t))\n                    throw new MstError(\"Failed to determine subtype, make sure types.late returns a type definition.\");\n                this._subType = t;\n            }\n        }\n        return this._subType;\n    }\n    constructor(name, _definition) {\n        super(name);\n        Object.defineProperty(this, \"_definition\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: _definition\n        });\n        Object.defineProperty(this, \"_subType\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: void 0\n        });\n    }\n    instantiate(parent, subpath, environment, initialValue) {\n        return this.getSubType(true).instantiate(parent, subpath, environment, initialValue);\n    }\n    reconcile(current, newValue, parent, subpath) {\n        return this.getSubType(true).reconcile(current, newValue, parent, subpath);\n    }\n    describe() {\n        const t = this.getSubType(false);\n        return t ? t.name : \"<uknown late type>\";\n    }\n    isValidSnapshot(value, context) {\n        const t = this.getSubType(false);\n        if (!t) {\n            // See #916; the variable the definition closure is pointing to wasn't defined yet, so can't be evaluted yet here\n            return typeCheckSuccess();\n        }\n        return t.validate(value, context);\n    }\n    isAssignableFrom(type) {\n        const t = this.getSubType(false);\n        return t ? t.isAssignableFrom(type) : false;\n    }\n    getSubTypes() {\n        const subtype = this.getSubType(false);\n        return subtype ? subtype : cannotDetermineSubtype;\n    }\n}\n/**\n * `types.late` - Defines a type that gets implemented later. This is useful when you have to deal with circular dependencies.\n * Please notice that when defining circular dependencies TypeScript isn't smart enough to inference them.\n *\n * Example:\n * ```ts\n *   // TypeScript isn't smart enough to infer self referencing types.\n *  const Node = types.model({\n *       children: types.array(types.late((): IAnyModelType => Node)) // then typecast each array element to Instance<typeof Node>\n *  })\n * ```\n *\n * @param name The name to use for the type that will be returned.\n * @param type A function that returns the type that will be defined.\n * @returns\n */\nfunction late(nameOrType, maybeType) {\n    const name = typeof nameOrType === \"string\" ? nameOrType : `late(${nameOrType.toString()})`;\n    const type = typeof nameOrType === \"string\" ? maybeType : nameOrType;\n    // checks that the type is actually a late type\n    if (devMode()) {\n        if (!(typeof type === \"function\" && type.length === 0))\n            throw new MstError(\"Invalid late type, expected a function with zero arguments that returns a type, got: \" +\n                type);\n    }\n    return new Late(name, type);\n}\n/**\n * Returns if a given value represents a late type.\n *\n * @param type\n * @returns\n */\nfunction isLateType(type) {\n    return isType(type) && (type.flags & TypeFlags.Late) > 0;\n}\n\nfunction lazy(name, options) {\n    // TODO: fix this unknown casting to be stricter\n    return new Lazy(name, options);\n}\n/**\n * @internal\n * @hidden\n */\nclass Lazy extends SimpleType {\n    constructor(name, options) {\n        super(name);\n        Object.defineProperty(this, \"options\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: options\n        });\n        Object.defineProperty(this, \"flags\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: TypeFlags.Lazy\n        });\n        Object.defineProperty(this, \"loadedType\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: null\n        });\n        Object.defineProperty(this, \"pendingNodeList\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: observable.array()\n        });\n        when(() => this.pendingNodeList.length > 0 &&\n            this.pendingNodeList.some(node => node.isAlive &&\n                this.options.shouldLoadPredicate(node.parent ? node.parent.value : null)), () => {\n            this.options.loadType().then(action((type) => {\n                this.loadedType = type;\n                this.pendingNodeList.forEach(node => {\n                    if (!node.parent)\n                        return;\n                    if (!this.loadedType)\n                        return;\n                    node.parent.applyPatches([\n                        {\n                            op: \"replace\",\n                            path: `/${node.subpath}`,\n                            value: node.snapshot\n                        }\n                    ]);\n                });\n            }));\n        });\n    }\n    describe() {\n        return `<lazy ${this.name}>`;\n    }\n    instantiate(parent, subpath, environment, value) {\n        if (this.loadedType) {\n            return this.loadedType.instantiate(parent, subpath, environment, value);\n        }\n        const node = createScalarNode(this, parent, subpath, environment, deepFreeze(value));\n        this.pendingNodeList.push(node);\n        when(() => !node.isAlive, () => this.pendingNodeList.splice(this.pendingNodeList.indexOf(node), 1));\n        return node;\n    }\n    isValidSnapshot(value, context) {\n        if (this.loadedType) {\n            return this.loadedType.validate(value, context);\n        }\n        if (!isSerializable(value)) {\n            return typeCheckFailure(context, value, \"Value is not serializable and cannot be lazy\");\n        }\n        return typeCheckSuccess();\n    }\n    reconcile(current, value, parent, subpath) {\n        if (this.loadedType) {\n            current.die();\n            return this.loadedType.instantiate(parent, subpath, parent.environment, value);\n        }\n        return super.reconcile(current, value, parent, subpath);\n    }\n}\n\n/**\n * @internal\n * @hidden\n */\nclass Frozen extends SimpleType {\n    constructor(subType) {\n        super(subType ? `frozen(${subType.name})` : \"frozen\");\n        Object.defineProperty(this, \"subType\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: subType\n        });\n        Object.defineProperty(this, \"flags\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: TypeFlags.Frozen\n        });\n    }\n    describe() {\n        return \"<any immutable value>\";\n    }\n    instantiate(parent, subpath, environment, value) {\n        // create the node\n        return createScalarNode(this, parent, subpath, environment, deepFreeze(value));\n    }\n    isValidSnapshot(value, context) {\n        if (!isSerializable(value)) {\n            return typeCheckFailure(context, value, \"Value is not serializable and cannot be frozen\");\n        }\n        if (this.subType)\n            return this.subType.validate(value, context);\n        return typeCheckSuccess();\n    }\n}\nconst untypedFrozenInstance = new Frozen();\n/**\n * `types.frozen` - Frozen can be used to store any value that is serializable in itself (that is valid JSON).\n * Frozen values need to be immutable or treated as if immutable. They need be serializable as well.\n * Values stored in frozen will snapshotted as-is by MST, and internal changes will not be tracked.\n *\n * This is useful to store complex, but immutable values like vectors etc. It can form a powerful bridge to parts of your application that should be immutable, or that assume data to be immutable.\n *\n * Note: if you want to store free-form state that is mutable, or not serializeable, consider using volatile state instead.\n *\n * Frozen properties can be defined in three different ways\n * 1. `types.frozen(SubType)` - provide a valid MST type and frozen will check if the provided data conforms the snapshot for that type\n * 2. `types.frozen({ someDefaultValue: true})` - provide a primitive value, object or array, and MST will infer the type from that object, and also make it the default value for the field\n * 3. `types.frozen<TypeScriptType>()` - provide a typescript type, to help in strongly typing the field (design time only)\n *\n * Example:\n * ```ts\n * const GameCharacter = types.model({\n *   name: string,\n *   location: types.frozen({ x: 0, y: 0})\n * })\n *\n * const hero = GameCharacter.create({\n *   name: \"Mario\",\n *   location: { x: 7, y: 4 }\n * })\n *\n * hero.location = { x: 10, y: 2 } // OK\n * hero.location.x = 7 // Not ok!\n * ```\n *\n * ```ts\n * type Point = { x: number, y: number }\n *    const Mouse = types.model({\n *         loc: types.frozen<Point>()\n *    })\n * ```\n *\n * @param defaultValueOrType\n * @returns\n */\nfunction frozen(arg) {\n    if (arguments.length === 0)\n        return untypedFrozenInstance;\n    else if (isType(arg))\n        return new Frozen(arg);\n    else\n        return optional(untypedFrozenInstance, arg);\n}\n/**\n * Returns if a given value represents a frozen type.\n *\n * @param type\n * @returns\n */\nfunction isFrozenType(type) {\n    return isType(type) && (type.flags & TypeFlags.Frozen) > 0;\n}\n\nfunction getInvalidationCause(hook) {\n    switch (hook) {\n        case Hook.beforeDestroy:\n            return \"destroy\";\n        case Hook.beforeDetach:\n            return \"detach\";\n        default:\n            return undefined;\n    }\n}\nclass StoredReference {\n    constructor(value, targetType) {\n        Object.defineProperty(this, \"targetType\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: targetType\n        });\n        Object.defineProperty(this, \"identifier\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: void 0\n        });\n        Object.defineProperty(this, \"node\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: void 0\n        });\n        Object.defineProperty(this, \"resolvedReference\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: void 0\n        });\n        if (isValidIdentifier(value)) {\n            this.identifier = value;\n        }\n        else if (isStateTreeNode(value)) {\n            const targetNode = getStateTreeNode(value);\n            if (!targetNode.identifierAttribute)\n                throw new MstError(`Can only store references with a defined identifier attribute.`);\n            const id = targetNode.unnormalizedIdentifier;\n            if (id === null || id === undefined) {\n                throw new MstError(`Can only store references to tree nodes with a defined identifier.`);\n            }\n            this.identifier = id;\n        }\n        else {\n            throw new MstError(`Can only store references to tree nodes or identifiers, got: '${value}'`);\n        }\n    }\n    updateResolvedReference(node) {\n        const normalizedId = normalizeIdentifier(this.identifier);\n        const root = node.root;\n        const lastCacheModification = root.identifierCache.getLastCacheModificationPerId(normalizedId);\n        if (!this.resolvedReference ||\n            this.resolvedReference.lastCacheModification !== lastCacheModification) {\n            const { targetType } = this;\n            // reference was initialized with the identifier of the target\n            const target = root.identifierCache.resolve(targetType, normalizedId);\n            if (!target) {\n                throw new InvalidReferenceError(`[mobx-state-tree] Failed to resolve reference '${this.identifier}' to type '${this.targetType.name}' (from node: ${node.path})`);\n            }\n            this.resolvedReference = {\n                node: target,\n                lastCacheModification: lastCacheModification\n            };\n        }\n    }\n    get resolvedValue() {\n        this.updateResolvedReference(this.node);\n        return this.resolvedReference.node.value;\n    }\n}\n/**\n * @internal\n * @hidden\n */\nclass InvalidReferenceError extends Error {\n    constructor(m) {\n        super(m);\n        Object.setPrototypeOf(this, InvalidReferenceError.prototype);\n    }\n}\n/**\n * @internal\n * @hidden\n */\nclass BaseReferenceType extends SimpleType {\n    constructor(targetType, onInvalidated) {\n        super(`reference(${targetType.name})`);\n        Object.defineProperty(this, \"targetType\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: targetType\n        });\n        Object.defineProperty(this, \"onInvalidated\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: onInvalidated\n        });\n        Object.defineProperty(this, \"flags\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: TypeFlags.Reference\n        });\n    }\n    describe() {\n        return this.name;\n    }\n    isAssignableFrom(type) {\n        return this.targetType.isAssignableFrom(type);\n    }\n    isValidSnapshot(value, context) {\n        return isValidIdentifier(value)\n            ? typeCheckSuccess()\n            : typeCheckFailure(context, value, \"Value is not a valid identifier, which is a string, number or a bigint\");\n    }\n    fireInvalidated(cause, storedRefNode, referenceId, refTargetNode) {\n        // to actually invalidate a reference we need an alive parent,\n        // since it is a scalar value (immutable-ish) and we need to change it\n        // from the parent\n        const storedRefParentNode = storedRefNode.parent;\n        if (!storedRefParentNode || !storedRefParentNode.isAlive) {\n            return;\n        }\n        const storedRefParentValue = storedRefParentNode.storedValue;\n        if (!storedRefParentValue) {\n            return;\n        }\n        this.onInvalidated({\n            cause,\n            parent: storedRefParentValue,\n            invalidTarget: refTargetNode ? refTargetNode.storedValue : undefined,\n            invalidId: referenceId,\n            replaceRef(newRef) {\n                applyPatch(storedRefNode.root.storedValue, {\n                    op: \"replace\",\n                    value: newRef,\n                    path: storedRefNode.path\n                });\n            },\n            removeRef() {\n                if (isModelType(storedRefParentNode.type)) {\n                    this.replaceRef(undefined);\n                }\n                else {\n                    applyPatch(storedRefNode.root.storedValue, {\n                        op: \"remove\",\n                        path: storedRefNode.path\n                    });\n                }\n            }\n        });\n    }\n    addTargetNodeWatcher(storedRefNode, referenceId) {\n        // this will make sure the target node becomes created\n        const refTargetValue = this.getValue(storedRefNode);\n        if (!refTargetValue) {\n            return undefined;\n        }\n        const refTargetNode = getStateTreeNode(refTargetValue);\n        const hookHandler = (_, refTargetNodeHook) => {\n            const cause = getInvalidationCause(refTargetNodeHook);\n            if (!cause) {\n                return;\n            }\n            this.fireInvalidated(cause, storedRefNode, referenceId, refTargetNode);\n        };\n        const refTargetDetachHookDisposer = refTargetNode.registerHook(Hook.beforeDetach, hookHandler);\n        const refTargetDestroyHookDisposer = refTargetNode.registerHook(Hook.beforeDestroy, hookHandler);\n        return () => {\n            refTargetDetachHookDisposer();\n            refTargetDestroyHookDisposer();\n        };\n    }\n    watchTargetNodeForInvalidations(storedRefNode, identifier, customGetSet) {\n        if (!this.onInvalidated) {\n            return;\n        }\n        let onRefTargetDestroyedHookDisposer;\n        // get rid of the watcher hook when the stored ref node is destroyed\n        // detached is ignored since scalar nodes (where the reference resides) cannot be detached\n        storedRefNode.registerHook(Hook.beforeDestroy, () => {\n            if (onRefTargetDestroyedHookDisposer) {\n                onRefTargetDestroyedHookDisposer();\n            }\n        });\n        const scheduleRetryAfterReconciliation = () => {\n            const retry = () => {\n                if (!storedRefNode.isAlive) {\n                    return;\n                }\n                if (this.getSnapshot(storedRefNode) !== identifier) {\n                    return;\n                }\n                startWatching(false);\n            };\n            if (getCurrentActionContext()) {\n                storedRefNode.root.enqueueEndOfAction(retry);\n            }\n            else {\n                setImmediateWithFallback(retry);\n            }\n        };\n        const startWatching = (sync) => {\n            // re-create hook in case the stored ref gets reattached\n            if (onRefTargetDestroyedHookDisposer) {\n                onRefTargetDestroyedHookDisposer();\n            }\n            // make sure the target node is actually there and initialized\n            const storedRefParentNode = storedRefNode.parent;\n            const storedRefParentValue = storedRefParentNode && storedRefParentNode.storedValue;\n            if (storedRefParentNode && storedRefParentNode.isAlive && storedRefParentValue) {\n                let refTargetNodeExists;\n                if (customGetSet) {\n                    refTargetNodeExists = !!customGetSet.get(identifier, storedRefParentValue);\n                }\n                else {\n                    refTargetNodeExists = storedRefNode.root.identifierCache.has(this.targetType, normalizeIdentifier(identifier));\n                }\n                if (!refTargetNodeExists) {\n                    // if the tree is already attached we may still be in the middle of a reconcile/applySnapshot,\n                    // so wait until the current MST action finishes before deciding whether to invalidate or\n                    // attach a watcher to a target that appeared later in the same action.\n                    if (sync) {\n                        scheduleRetryAfterReconciliation();\n                    }\n                    else {\n                        this.fireInvalidated(\"invalidSnapshotReference\", storedRefNode, identifier, null);\n                    }\n                }\n                else {\n                    onRefTargetDestroyedHookDisposer = this.addTargetNodeWatcher(storedRefNode, identifier);\n                }\n            }\n        };\n        if (storedRefNode.state === NodeLifeCycle.FINALIZED) {\n            // already attached, so the whole tree is ready\n            startWatching(true);\n        }\n        else {\n            if (!storedRefNode.isRoot) {\n                // start watching once the whole tree is ready\n                storedRefNode.root.registerHook(Hook.afterCreationFinalization, () => {\n                    // make sure to attach it so it can start listening\n                    if (storedRefNode.parent) {\n                        storedRefNode.parent.createObservableInstanceIfNeeded();\n                    }\n                });\n            }\n            // start watching once the node is attached somewhere / parent changes\n            storedRefNode.registerHook(Hook.afterAttach, () => {\n                startWatching(false);\n            });\n        }\n    }\n}\n/**\n * @internal\n * @hidden\n */\nclass IdentifierReferenceType extends BaseReferenceType {\n    constructor(targetType, onInvalidated) {\n        super(targetType, onInvalidated);\n    }\n    getValue(storedRefNode) {\n        if (!storedRefNode.isAlive)\n            return undefined;\n        const storedRef = storedRefNode.storedValue;\n        return storedRef.resolvedValue;\n    }\n    getSnapshot(storedRefNode) {\n        const ref = storedRefNode.storedValue;\n        return ref.identifier;\n    }\n    instantiate(parent, subpath, environment, initialValue) {\n        const identifier = isStateTreeNode(initialValue)\n            ? getIdentifier(initialValue)\n            : initialValue;\n        const storedRef = new StoredReference(initialValue, this.targetType);\n        const storedRefNode = createScalarNode(this, parent, subpath, environment, storedRef);\n        storedRef.node = storedRefNode;\n        this.watchTargetNodeForInvalidations(storedRefNode, identifier, undefined);\n        return storedRefNode;\n    }\n    reconcile(current, newValue, parent, subpath) {\n        if (!current.isDetaching && current.type === this) {\n            const compareByValue = isStateTreeNode(newValue);\n            const ref = current.storedValue;\n            if ((!compareByValue && ref.identifier === newValue) ||\n                (compareByValue && ref.resolvedValue === newValue)) {\n                current.setParent(parent, subpath);\n                return current;\n            }\n        }\n        const newNode = this.instantiate(parent, subpath, undefined, newValue);\n        current.die(); // noop if detaching\n        return newNode;\n    }\n}\n/**\n * @internal\n * @hidden\n */\nclass CustomReferenceType extends BaseReferenceType {\n    constructor(targetType, options, onInvalidated) {\n        super(targetType, onInvalidated);\n        Object.defineProperty(this, \"options\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: options\n        });\n    }\n    getValue(storedRefNode) {\n        if (!storedRefNode.isAlive)\n            return undefined;\n        const referencedNode = this.options.get(storedRefNode.storedValue, storedRefNode.parent ? storedRefNode.parent.storedValue : null);\n        return referencedNode;\n    }\n    getSnapshot(storedRefNode) {\n        return storedRefNode.storedValue;\n    }\n    instantiate(parent, subpath, environment, newValue) {\n        const identifier = isStateTreeNode(newValue)\n            ? this.options.set(newValue, parent ? parent.storedValue : null)\n            : newValue;\n        const storedRefNode = createScalarNode(this, parent, subpath, environment, identifier);\n        this.watchTargetNodeForInvalidations(storedRefNode, identifier, this.options);\n        return storedRefNode;\n    }\n    reconcile(current, newValue, parent, subpath) {\n        const newIdentifier = isStateTreeNode(newValue)\n            ? this.options.set(newValue, current ? current.storedValue : null)\n            : newValue;\n        if (!current.isDetaching &&\n            current.type === this &&\n            current.storedValue === newIdentifier) {\n            current.setParent(parent, subpath);\n            return current;\n        }\n        const newNode = this.instantiate(parent, subpath, undefined, newIdentifier);\n        current.die(); // noop if detaching\n        return newNode;\n    }\n}\n/**\n * `types.reference` - Creates a reference to another type, which should have defined an identifier.\n * See also the [reference and identifiers](https://github.com/mobxjs/mobx-state-tree#references-and-identifiers) section.\n */\nfunction reference(subType, options) {\n    assertIsType(subType, 1);\n    if (devMode()) {\n        if (arguments.length === 2 && typeof arguments[1] === \"string\") {\n            // istanbul ignore next\n            throw new MstError(\"References with base path are no longer supported. Please remove the base path.\");\n        }\n    }\n    const getSetOptions = options ? options : undefined;\n    const onInvalidated = options\n        ? options.onInvalidated\n        : undefined;\n    if (getSetOptions && (getSetOptions.get || getSetOptions.set)) {\n        if (devMode()) {\n            if (!getSetOptions.get || !getSetOptions.set) {\n                throw new MstError(\"reference options must either contain both a 'get' and a 'set' method or none of them\");\n            }\n        }\n        return new CustomReferenceType(subType, {\n            get: getSetOptions.get,\n            set: getSetOptions.set\n        }, onInvalidated);\n    }\n    else {\n        return new IdentifierReferenceType(subType, onInvalidated);\n    }\n}\n/**\n * Returns if a given value represents a reference type.\n *\n * @param type\n * @returns\n */\nfunction isReferenceType(type) {\n    return isType(type) && (type.flags & TypeFlags.Reference) > 0;\n}\n/**\n * `types.safeReference` - A safe reference is like a standard reference, except that it accepts the undefined value by default\n * and automatically sets itself to undefined (when the parent is a model) / removes itself from arrays and maps\n * when the reference it is pointing to gets detached/destroyed.\n *\n * The optional options parameter object accepts a parameter named `acceptsUndefined`, which is set to true by default, so it is suitable\n * for model properties.\n * When used inside collections (arrays/maps), it is recommended to set this option to false so it can't take undefined as value,\n * which is usually the desired in those cases.\n * Additionally, the optional options parameter object accepts a parameter named `onInvalidated`, which will be called when the reference target node that the reference is pointing to is about to be detached/destroyed\n *\n * Strictly speaking it is a `types.maybe(types.reference(X))` (when `acceptsUndefined` is set to true, the default) and\n * `types.reference(X)` (when `acceptsUndefined` is set to false), both of them with a customized `onInvalidated` option.\n *\n * @param subType\n * @param options\n * @returns\n */\nfunction safeReference(subType, options) {\n    const refType = reference(subType, Object.assign(Object.assign({}, options), { onInvalidated(ev) {\n            if (options && options.onInvalidated) {\n                options.onInvalidated(ev);\n            }\n            ev.removeRef();\n        } }));\n    if (options && options.acceptsUndefined === false) {\n        return refType;\n    }\n    else {\n        return maybe(refType);\n    }\n}\n\nclass BaseIdentifierType extends SimpleType {\n    constructor(name, validType) {\n        super(name);\n        Object.defineProperty(this, \"validType\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: validType\n        });\n        Object.defineProperty(this, \"flags\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: TypeFlags.Identifier\n        });\n    }\n    instantiate(parent, subpath, environment, initialValue) {\n        if (!parent || !(parent.type instanceof ModelType))\n            throw new MstError(`Identifier types can only be instantiated as direct child of a model type`);\n        return createScalarNode(this, parent, subpath, environment, initialValue);\n    }\n    reconcile(current, newValue, parent, subpath) {\n        // we don't consider detaching here since identifier are scalar nodes, and scalar nodes cannot be detached\n        if (current.storedValue !== newValue)\n            throw new MstError(`Tried to change identifier from '${current.storedValue}' to '${newValue}'. Changing identifiers is not allowed.`);\n        current.setParent(parent, subpath);\n        return current;\n    }\n    isValidSnapshot(value, context) {\n        if (typeof value !== this.validType) {\n            return typeCheckFailure(context, value, `Value is not a valid ${this.describe()}, expected a ${this.validType}`);\n        }\n        return typeCheckSuccess();\n    }\n}\n/**\n * @internal\n * @hidden\n */\nclass IdentifierType extends BaseIdentifierType {\n    constructor() {\n        super(`identifier`, \"string\");\n        Object.defineProperty(this, \"flags\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: TypeFlags.Identifier\n        });\n    }\n    describe() {\n        return `identifier`;\n    }\n}\n/**\n * @internal\n * @hidden\n */\nclass IdentifierNumberType extends BaseIdentifierType {\n    constructor() {\n        super(\"identifierNumber\", \"number\");\n    }\n    getSnapshot(node) {\n        return node.storedValue;\n    }\n    describe() {\n        return `identifierNumber`;\n    }\n}\n/**\n * `types.identifier` - Identifiers are used to make references, lifecycle events and reconciling works.\n * Inside a state tree, for each type can exist only one instance for each given identifier.\n * For example there couldn't be 2 instances of user with id 1. If you need more, consider using references.\n * Identifier can be used only as type property of a model.\n * This type accepts as parameter the value type of the identifier field that can be either string, number or bigint.\n *\n * Example:\n * ```ts\n *  const Todo = types.model(\"Todo\", {\n *      id: types.identifier,\n *      title: types.string\n *  })\n * ```\n *\n * @returns\n */\nconst identifier = new IdentifierType();\n/**\n * `types.identifierNumber` - Similar to `types.identifier`. This one will serialize from / to a number when applying snapshots\n *\n * Example:\n * ```ts\n *  const Todo = types.model(\"Todo\", {\n *      id: types.identifierNumber,\n *      title: types.string\n *  })\n * ```\n *\n * @returns\n */\nconst identifierNumber = new IdentifierNumberType();\n/**\n * @internal\n * @hidden\n * IdentifierBigintType uses SimpleType<bigint | string | number, string, bigint> so snapshots serialize to string (JSON-safe).\n */\nclass IdentifierBigintType extends SimpleType {\n    constructor() {\n        super(\"identifierBigint\");\n        Object.defineProperty(this, \"flags\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: TypeFlags.Identifier\n        });\n    }\n    createNewInstance(snapshot) {\n        if (typeof snapshot === \"bigint\")\n            return snapshot;\n        return BigInt(snapshot);\n    }\n    instantiate(parent, subpath, environment, initialValue) {\n        if (!parent || !(parent.type instanceof ModelType))\n            throw new MstError(`Identifier types can only be instantiated as direct child of a model type`);\n        return createScalarNode(this, parent, subpath, environment, initialValue);\n    }\n    reconcile(current, newValue, parent, subpath) {\n        const currentVal = current.storedValue;\n        const newVal = typeof newValue === \"bigint\" ? newValue : BigInt(newValue);\n        if (currentVal !== newVal)\n            throw new MstError(`Tried to change identifier from '${currentVal}' to '${newVal}'. Changing identifiers is not allowed.`);\n        current.setParent(parent, subpath);\n        return current;\n    }\n    isValidSnapshot(value, context) {\n        if (typeof value === \"bigint\") {\n            return typeCheckSuccess();\n        }\n        if (typeof value === \"string\" || typeof value === \"number\") {\n            try {\n                // BigInt primitive constructor verifies whether the value is a valid integer\n                BigInt(value);\n                return typeCheckSuccess();\n            }\n            catch (e) {\n                const errorMessage = e instanceof Error ? e.message : String(e);\n                return typeCheckFailure(context, value, `Value is not a valid ${this.describe()}: ${errorMessage}`);\n            }\n        }\n        return typeCheckFailure(context, value, `Value is not a valid ${this.describe()}, expected a bigint, a string or a number`);\n    }\n    getSnapshot(node) {\n        return String(node.storedValue);\n    }\n    describe() {\n        return `identifierBigint`;\n    }\n}\n/**\n * `types.identifierBigint` - Similar to `types.identifier`. Snapshots serialize to string (JSON-safe) and deserialize from string, number or bigint.\n *\n * Example:\n * ```ts\n *  const Todo = types.model(\"Todo\", {\n *      id: types.identifierBigint,\n *      title: types.string\n *  })\n * ```\n *\n * @returns\n */\nconst identifierBigint = new IdentifierBigintType();\n/**\n * Returns if a given value represents an identifier type.\n *\n * @param type\n * @returns\n */\nfunction isIdentifierType(type) {\n    return isType(type) && (type.flags & TypeFlags.Identifier) > 0;\n}\n/**\n * @internal\n * @hidden\n */\nfunction normalizeIdentifier(id) {\n    return \"\" + id;\n}\n/**\n * @internal\n * @hidden\n */\nfunction isValidIdentifier(id) {\n    return typeof id === \"string\" || typeof id === \"number\" || typeof id === \"bigint\";\n}\n/**\n * @internal\n * @hidden\n */\nfunction assertIsValidIdentifier(id, argNumber) {\n    assertArg(id, isValidIdentifier, \"string, number or bigint (identifier)\", argNumber);\n}\n\n/**\n * `types.custom` - Creates a custom type. Custom types can be used for arbitrary immutable values, that have a serializable representation. For example, to create your own Date representation, Decimal type etc.\n *\n * The signature of the options is:\n * ```ts\n * export interface CustomTypeOptions<S, T> {\n *     // Friendly name\n *     name: string\n *     // given a serialized value and environment, how to turn it into the target type\n *     fromSnapshot(snapshot: S, env: any): T\n *     // return the serialization of the current value\n *     toSnapshot(value: T): S\n *     // if true, this is a converted value, if false, it's a snapshot\n *     isTargetType(value: T | S): value is T\n *     // a non empty string is assumed to be a validation error\n *     getValidationMessage?(snapshot: S): string\n * }\n * ```\n *\n * Example:\n * ```ts\n * const DecimalPrimitive = types.custom<string, Decimal>({\n *     name: \"Decimal\",\n *     fromSnapshot(value: string) {\n *         return new Decimal(value)\n *     },\n *     toSnapshot(value: Decimal) {\n *         return value.toString()\n *     },\n *     isTargetType(value: string | Decimal): boolean {\n *         return value instanceof Decimal\n *     },\n *     getValidationMessage(value: string): string {\n *         if (/^-?\\d+\\.\\d+$/.test(value)) return \"\" // OK\n *         return `'${value}' doesn't look like a valid decimal number`\n *     }\n * })\n *\n * const Wallet = types.model({\n *     balance: DecimalPrimitive\n * })\n * ```\n *\n * @param options\n * @returns\n */\nfunction custom(options) {\n    return new CustomType(options);\n}\n/**\n * @internal\n * @hidden\n */\nclass CustomType extends SimpleType {\n    constructor(options) {\n        super(options.name);\n        Object.defineProperty(this, \"options\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: options\n        });\n        Object.defineProperty(this, \"flags\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: TypeFlags.Custom\n        });\n    }\n    describe() {\n        return this.name;\n    }\n    isValidSnapshot(value, context) {\n        if (this.options.isTargetType(value))\n            return typeCheckSuccess();\n        const typeError = this.options.getValidationMessage(value);\n        if (typeError) {\n            return typeCheckFailure(context, value, `Invalid value for type '${this.name}': ${typeError}`);\n        }\n        return typeCheckSuccess();\n    }\n    getSnapshot(node) {\n        return this.options.toSnapshot(node.storedValue);\n    }\n    instantiate(parent, subpath, environment, initialValue) {\n        const valueToStore = this.options.isTargetType(initialValue)\n            ? initialValue\n            : this.options.fromSnapshot(initialValue, parent && parent.root.environment);\n        return createScalarNode(this, parent, subpath, environment, valueToStore);\n    }\n    reconcile(current, value, parent, subpath) {\n        const isSnapshot = !this.options.isTargetType(value);\n        // in theory customs use scalar nodes which cannot be detached, but still...\n        if (!current.isDetaching) {\n            const unchanged = current.type === this &&\n                (isSnapshot ? value === current.snapshot : value === current.storedValue);\n            if (unchanged) {\n                current.setParent(parent, subpath);\n                return current;\n            }\n        }\n        const valueToStore = isSnapshot\n            ? this.options.fromSnapshot(value, parent.root.environment)\n            : value;\n        const newNode = this.instantiate(parent, subpath, undefined, valueToStore);\n        current.die(); // noop if detaching\n        return newNode;\n    }\n}\n\n// we import the types to re-export them inside types.\nconst types = {\n    enumeration,\n    model,\n    compose,\n    custom,\n    reference,\n    safeReference,\n    union,\n    optional,\n    literal,\n    maybe,\n    maybeNull,\n    refinement,\n    string,\n    boolean,\n    number,\n    integer,\n    float,\n    finite,\n    bigint,\n    Date: DatePrimitive,\n    map,\n    array,\n    frozen,\n    identifier,\n    identifierNumber,\n    identifierBigint,\n    late,\n    lazy,\n    undefined: undefinedType,\n    null: nullType,\n    snapshotProcessor\n};\n\nexport { addDisposer, addMiddleware, applyAction, applyPatch, applySnapshot, cast, castFlowReturn, castToReferenceSnapshot, castToSnapshot, clone, createActionTrackingMiddleware, createActionTrackingMiddleware2, decorate, destroy, detach, escapeJsonPath, flow, getChildType, getEnv, getErrorFormatting, getIdentifier, getLivelinessChecking, getMembers, getNodeId, getParent, getParentOfType, getPath, getPathParts, getPropertyMembers, getRelativePath, getRoot, getRunningActionContext, getSnapshot, getType, hasEnv, hasParent, hasParentOfType, isActionContextChildOf, isActionContextThisOrChildOf, isAlive, isArrayType, isFrozenType, isIdentifierType, isLateType, isLiteralType, isMapType, isModelType, isOptionalType, isPrimitiveType, isProtected, isReferenceType, isRefinementType, isRoot, isStateTreeNode, isType, isUnionType, isValidReference, joinJsonPath, onAction, onPatch, onSnapshot, process$1 as process, protect, recordActions, recordPatches, resolveIdentifier, resolvePath, setErrorFormatting, setLivelinessChecking, setLivelynessChecking, splitJsonPath, types as t, toGenerator, toGeneratorFunction, tryReference, tryResolve, typecheck, types, unescapeJsonPath, unprotect, walk };\n", "export function activate(...buttons) {\n  buttons.forEach((button) => {\n    button.classList.add(\"ol-map__btn--active\");\n  });\n}\n\nexport function deactivate(...buttons) {\n  buttons.forEach((button) => {\n    button.classList.remove(\"ol-map__btn--active\");\n  });\n}\n\nexport function enable(...buttons) {\n  buttons.forEach((button) => {\n    button.classList.remove(\"ol-map__btn--disabled\");\n  });\n}\n\nexport function disable(...buttons) {\n  buttons.forEach((button) => {\n    button.classList.add(\"ol-map__btn--disabled\");\n  });\n}\n\nexport function showSpinner(button) {\n  button.classList.add(\"ol-map__btn--spinner-shown\");\n}\n\nexport function hideSpinner(button) {\n  button.classList.remove(\"ol-map__btn--spinner-shown\");\n}\n\nexport function setIcon(button, icon) {\n  button.querySelector(\".fas\").className = `fas fa-${icon}`;\n}\n\nexport function setSpanContent(button, newContent) {\n  button.querySelector(\"span\").innerHTML = newContent;\n}\n\nexport function isToolbarBtn(button) {\n  if (!button) return false;\n  return button.classList.contains(\"ol-map__btn\");\n}\n\nexport function isDisabled(button) {\n  if (!isToolbarBtn(button)) return false;\n\n  return button.classList.contains(\"ol-map__btn--disabled\");\n}\n\nexport function isActive(button) {\n  if (!isToolbarBtn(button)) return false;\n\n  return button.classList.contains(\"ol-map__btn--active\");\n}\n\nexport function showEnabledAndHideDisabledPinnedFlyoutMenus() {\n  const flyoutMenuContainers = document.querySelectorAll(\".ol-map__btn__flyout__container\");\n  Array.from(flyoutMenuContainers).forEach((el) => {\n    if (!el.flyoutMenuController) return;\n\n    el.flyoutMenuController.showEnabledAndHideDisabledPinnedMenu();\n  });\n}\n", "// Dedup key only. The queue compares hashes for equality to skip pushing an\n// unchanged snapshot; nothing is signed or kept secret, so a cryptographic digest\n// buys nothing here and costs real time on the 100ms drag throttle. Do not swap\n// this for a crypto library. A 53-bit hash (cyrb53) keeps collisions vanishingly\n// rare, and a collision only skips one undo step rather than corrupting state.\n//\n// cyrb53 (c) 2018 bryc, https://github.com/bryc/code/blob/master/jshash/experimental/cyrb53.js\n// Released by the author as public domain (\"or MIT if needed\"), attribution appreciated.\nfunction hashString(str) {\n  let h1 = 0xdeadbeef;\n  let h2 = 0x41c6ce57;\n  for (let i = 0; i < str.length; i++) {\n    const ch = str.charCodeAt(i);\n    h1 = Math.imul(h1 ^ ch, 2654435761);\n    h2 = Math.imul(h2 ^ ch, 1597334677);\n  }\n  h1 = Math.imul(h1 ^ (h1 >>> 16), 2246822507);\n  h1 ^= Math.imul(h2 ^ (h2 >>> 13), 3266489909);\n  h2 = Math.imul(h2 ^ (h2 >>> 16), 2246822507);\n  h2 ^= Math.imul(h1 ^ (h1 >>> 13), 3266489909);\n  return 4294967296 * (2097151 & h2) + (h1 >>> 0);\n}\n\nexport default class UndoQueue {\n  constructor({ maxUndo, debug } = { debug: false, maxUndo: 50 }) {\n    this.undoStack = [];\n    this.redoStack = [];\n    this.maxUndo = maxUndo;\n    this.debug = debug;\n  }\n\n  push(newValue) {\n    if (this.debug) console.log(\"undoQueue: push\");\n\n    if (!newValue) return;\n\n    const newItem = this.#hashedItem(newValue);\n\n    if (this.currentItem) {\n      if (newItem.hash === this.currentItem.hash) return;\n\n      this.undoStack.push(this.currentItem);\n    }\n\n    this.currentItem = newItem;\n    if (this.undoStack.length > this.maxUndo) this.undoStack.shift();\n\n    this.redoStack = [];\n\n    if (this.debug) this.debugLog();\n  }\n\n  // currentItem is always the state on screen, so after an undo or redo a push of the\n  // same state is a no-op and a push of a new state branches off history.\n  undo() {\n    if (this.debug) console.log(\"undoQueue: undo\");\n\n    if (this.hasZeroUndoSteps) return undefined;\n\n    this.redoStack.push(this.currentItem);\n    this.currentItem = this.undoStack.pop();\n\n    if (this.debug) this.debugLog();\n\n    return this.currentItem.value;\n  }\n\n  redo() {\n    if (this.debug) console.log(\"undoQueue: redo\");\n\n    if (this.hasZeroRedoSteps) return undefined;\n\n    this.undoStack.push(this.currentItem);\n    this.currentItem = this.redoStack.pop();\n\n    if (this.debug) this.debugLog();\n\n    return this.currentItem.value;\n  }\n\n  get undoSteps() {\n    return this.undoStack.length;\n  }\n\n  get hasUndoSteps() {\n    return this.undoSteps > 0;\n  }\n\n  get hasZeroUndoSteps() {\n    return this.undoSteps === 0;\n  }\n\n  get redoSteps() {\n    return this.redoStack.length;\n  }\n\n  get hasRedoSteps() {\n    return this.redoSteps > 0;\n  }\n\n  get hasZeroRedoSteps() {\n    return this.redoSteps === 0;\n  }\n\n  clear() {\n    if (this.debug) console.log(\"undoQueue: clear\");\n\n    this.undoStack = [];\n    this.redoStack = [];\n    this.currentItem = undefined;\n  }\n\n  // dirty flags mark unsaved changes, not layout content. Undo restores a snapshot with\n  // them cleared and the editor immediately marks the project dirty again, so hashing\n  // them would make every push after an undo look like a new edit.\n  #hashedItem(value) {\n    const omitDirty = (key, v) => (key === \"dirty\" ? undefined : v);\n    return { hash: hashString(JSON.stringify(value, omitDirty)), value };\n  }\n\n  debugLog() {\n    console.group(`--[ Undo Queue Debug Logging ]---------------- ${new Date()}`);\n    console.group(\"undoStack:\");\n    if (this.hasUndoSteps) {\n      this.undoStack.forEach((item, i) => {\n        console.log(`${i + 1}. ${item.hash}`);\n      });\n    }\n    console.groupEnd();\n    console.group(\"redoStack:\");\n    if (this.hasRedoSteps) {\n      this.redoStack.forEach((item, i) => {\n        console.log(`${i + 1}. ${item.hash}`);\n      });\n    }\n    console.groupEnd();\n    console.log(\"currentItem:\", this.currentItem && this.currentItem.hash);\n    console.groupEnd();\n  }\n}\n", "/**\n * @module ol/array\n */\n\n/**\n * Performs a binary search on the provided sorted list and returns the index of the item if found. If it can't be found it'll return -1.\n * https://github.com/darkskyapp/binary-search\n *\n * @param {Array<*>} haystack Items to search through.\n * @param {*} needle The item to look for.\n * @param {Function} [comparator] Comparator function.\n * @return {number} The index of the item if found, -1 if not.\n */\nexport function binarySearch(haystack, needle, comparator) {\n  let mid, cmp;\n  comparator = comparator || ascending;\n  let low = 0;\n  let high = haystack.length;\n  let found = false;\n\n  while (low < high) {\n    /* Note that \"(low + high) >>> 1\" may overflow, and results in a typecast\n     * to double (which gives the wrong results). */\n    mid = low + ((high - low) >> 1);\n    cmp = +comparator(haystack[mid], needle);\n\n    if (cmp < 0.0) {\n      /* Too low. */\n      low = mid + 1;\n    } else {\n      /* Key found or too high */\n      high = mid;\n      found = !cmp;\n    }\n  }\n\n  /* Key not found. */\n  return found ? low : ~low;\n}\n\n/**\n * Compare function sorting arrays in ascending order.  Safe to use for numeric values.\n * @param {*} a The first object to be compared.\n * @param {*} 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 */\nexport function ascending(a, b) {\n  return a > b ? 1 : a < b ? -1 : 0;\n}\n\n/**\n * Compare function sorting arrays in descending order.  Safe to use for numeric values.\n * @param {*} a The first object to be compared.\n * @param {*} 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 */\nexport function descending(a, b) {\n  return a < b ? 1 : a > b ? -1 : 0;\n}\n\n/**\n * {@link module:ol/tilegrid/TileGrid~TileGrid#getZForResolution} can use a function\n * of this type to determine which nearest resolution to use.\n *\n * This function takes a `{number}` representing a value between two array entries,\n * a `{number}` representing the value of the nearest higher entry and\n * a `{number}` representing the value of the nearest lower entry\n * as arguments and returns a `{number}`. If a negative number or zero is returned\n * the lower value will be used, if a positive number is returned the higher value\n * will be used.\n * @typedef {function(number, number, number): number} NearestDirectionFunction\n * @api\n */\n\n/**\n * @param {Array<number>} arr Array in descending order.\n * @param {number} target Target.\n * @param {number|NearestDirectionFunction} direction\n *    0 means return the nearest,\n *    > 0 means return the largest nearest,\n *    < 0 means return the smallest nearest.\n * @return {number} Index.\n */\nexport function linearFindNearest(arr, target, direction) {\n  if (arr[0] <= target) {\n    return 0;\n  }\n\n  const n = arr.length;\n  if (target <= arr[n - 1]) {\n    return n - 1;\n  }\n\n  if (typeof direction === 'function') {\n    for (let i = 1; i < n; ++i) {\n      const candidate = arr[i];\n      if (candidate === target) {\n        return i;\n      }\n      if (candidate < target) {\n        if (direction(target, arr[i - 1], candidate) > 0) {\n          return i - 1;\n        }\n        return i;\n      }\n    }\n    return n - 1;\n  }\n\n  if (direction > 0) {\n    for (let i = 1; i < n; ++i) {\n      if (arr[i] < target) {\n        return i - 1;\n      }\n    }\n    return n - 1;\n  }\n\n  if (direction < 0) {\n    for (let i = 1; i < n; ++i) {\n      if (arr[i] <= target) {\n        return i;\n      }\n    }\n    return n - 1;\n  }\n\n  for (let i = 1; i < n; ++i) {\n    if (arr[i] == target) {\n      return i;\n    }\n    if (arr[i] < target) {\n      if (arr[i - 1] - target < target - arr[i]) {\n        return i - 1;\n      }\n      return i;\n    }\n  }\n  return n - 1;\n}\n\n/**\n * @param {Array<*>} arr Array.\n * @param {number} begin Begin index.\n * @param {number} end End index.\n */\nexport function reverseSubArray(arr, begin, end) {\n  while (begin < end) {\n    const tmp = arr[begin];\n    arr[begin] = arr[end];\n    arr[end] = tmp;\n    ++begin;\n    --end;\n  }\n}\n\n/**\n * @param {Array<VALUE>} arr The array to modify.\n * @param {!Array<VALUE>|VALUE} data The elements or arrays of elements to add to arr.\n * @template VALUE\n */\nexport function extend(arr, data) {\n  const extension = Array.isArray(data) ? data : [data];\n  const length = extension.length;\n  for (let i = 0; i < length; i++) {\n    arr[arr.length] = extension[i];\n  }\n}\n\n/**\n * @param {Array<VALUE>} arr The array to modify.\n * @param {VALUE} obj The element to remove.\n * @template VALUE\n * @return {boolean} If the element was removed.\n */\nexport function remove(arr, obj) {\n  const i = arr.indexOf(obj);\n  const found = i > -1;\n  if (found) {\n    arr.splice(i, 1);\n  }\n  return found;\n}\n\n/**\n * @param {Array<any>|Uint8ClampedArray} arr1 The first array to compare.\n * @param {Array<any>|Uint8ClampedArray} arr2 The second array to compare.\n * @return {boolean} Whether the two arrays are equal.\n */\nexport function equals(arr1, arr2) {\n  const len1 = arr1.length;\n  if (len1 !== arr2.length) {\n    return false;\n  }\n  for (let i = 0; i < len1; i++) {\n    if (arr1[i] !== arr2[i]) {\n      return false;\n    }\n  }\n  return true;\n}\n\n/**\n * Sort the passed array such that the relative order of equal elements is preserved.\n * See https://en.wikipedia.org/wiki/Sorting_algorithm#Stability for details.\n * @param {Array<*>} arr The array to sort (modifies original).\n * @param {!function(*, *): number} compareFnc Comparison function.\n * @api\n * @deprecated\n */\nexport function stableSort(arr, compareFnc) {\n  const length = arr.length;\n  const tmp = Array(arr.length);\n  let i;\n  for (i = 0; i < length; i++) {\n    tmp[i] = {index: i, value: arr[i]};\n  }\n  tmp.sort(function (a, b) {\n    return compareFnc(a.value, b.value) || a.index - b.index;\n  });\n  for (i = 0; i < arr.length; i++) {\n    arr[i] = tmp[i].value;\n  }\n}\n\n/**\n * @param {Array<*>} arr The array to test.\n * @param {Function} [func] Comparison function.\n * @param {boolean} [strict] Strictly sorted (default false).\n * @return {boolean} Return index.\n */\nexport function isSorted(arr, func, strict) {\n  const compare = func || ascending;\n  return arr.every(function (currentVal, index) {\n    if (index === 0) {\n      return true;\n    }\n    const res = compare(arr[index - 1], currentVal);\n    return !(res > 0 || (strict && res === 0));\n  });\n}\n", "/**\n * @module ol/util\n */\n\n/**\n * @return {never} Any return.\n */\nexport function abstract() {\n  throw new Error('Unimplemented abstract method.');\n}\n\n/**\n * Counter for getUid.\n * @type {number}\n * @private\n */\nlet uidCounter_ = 0;\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. Unique IDs are generated\n * as a strictly increasing sequence. Adapted from goog.getUid.\n *\n * @param {Object} obj The object to get the unique ID for.\n * @return {string} The unique ID for the object.\n * @api\n */\nexport function getUid(obj) {\n  return obj.ol_uid || (obj.ol_uid = String(++uidCounter_));\n}\n\n/**\n * OpenLayers version.\n * @type {string}\n */\nexport const VERSION = '10.10.0';\n", "/**\n * @module ol/ObjectEventType\n */\n\n/**\n * @enum {string}\n */\nexport default {\n  /**\n   * Triggered when a property is changed.\n   * @event module:ol/Object.ObjectEvent#propertychange\n   * @api\n   */\n  PROPERTYCHANGE: 'propertychange',\n};\n\n/**\n * @typedef {'propertychange'} Types\n */\n", "/**\n * @module ol/events\n */\nimport {clear} from './obj.js';\n\n/**\n * Key to use with {@link module:ol/Observable.unByKey}.\n * @typedef {Object} EventsKey\n * @property {ListenerFunction} listener Listener.\n * @property {import(\"./events/Target.js\").EventTargetLike} target Target.\n * @property {string} type Type.\n * @api\n */\n\n/**\n * Listener function. This function is called with an event object as argument.\n * When the function returns `false`, event propagation will stop.\n *\n * @typedef {function((Event|import(\"./events/Event.js\").default)): (void|boolean)} ListenerFunction\n * @api\n */\n\n/**\n * @typedef {Object} ListenerObject\n * @property {ListenerFunction} handleEvent HandleEvent listener function.\n */\n\n/**\n * @typedef {ListenerFunction|ListenerObject} Listener\n */\n\n/**\n * Registers an event listener on an event target. Inspired by\n * https://google.github.io/closure-library/api/source/closure/goog/events/events.js.src.html\n *\n * This function efficiently binds a `listener` to a `this` object, and returns\n * a key for use with {@link module:ol/events.unlistenByKey}.\n *\n * @param {import(\"./events/Target.js\").EventTargetLike} target Event target.\n * @param {string} type Event type.\n * @param {ListenerFunction} listener Listener.\n * @param {Object} [thisArg] Object referenced by the `this` keyword in the\n *     listener. Default is the `target`.\n * @param {boolean} [once] If true, add the listener as one-off listener.\n * @return {EventsKey} Unique key for the listener.\n */\nexport function listen(target, type, listener, thisArg, once) {\n  if (once) {\n    const originalListener = listener;\n    /**\n     * @param {Event|import('./events/Event.js').default} event The event\n     * @return {void|boolean} When the function returns `false`, event propagation will stop.\n     * @this {typeof target}\n     */\n    listener = function (event) {\n      target.removeEventListener(type, listener);\n      return originalListener.call(thisArg ?? this, event);\n    };\n  } else if (thisArg && thisArg !== target) {\n    listener = listener.bind(thisArg);\n  }\n  const eventsKey = {\n    target: target,\n    type: type,\n    listener: listener,\n  };\n  target.addEventListener(type, listener);\n  return eventsKey;\n}\n\n/**\n * Registers a one-off event listener on an event target. Inspired by\n * https://google.github.io/closure-library/api/source/closure/goog/events/events.js.src.html\n *\n * This function efficiently binds a `listener` as self-unregistering listener\n * to a `this` object, and returns a key for use with\n * {@link module:ol/events.unlistenByKey} in case the listener needs to be\n * unregistered before it is called.\n *\n * When {@link module:ol/events.listen} is called with the same arguments after this\n * function, the self-unregistering listener will be turned into a permanent\n * listener.\n *\n * @param {import(\"./events/Target.js\").EventTargetLike} target Event target.\n * @param {string} type Event type.\n * @param {ListenerFunction} listener Listener.\n * @param {Object} [thisArg] Object referenced by the `this` keyword in the\n *     listener. Default is the `target`.\n * @return {EventsKey} Key for unlistenByKey.\n */\nexport function listenOnce(target, type, listener, thisArg) {\n  return listen(target, type, listener, thisArg, true);\n}\n\n/**\n * Unregisters event listeners on an event target. Inspired by\n * https://google.github.io/closure-library/api/source/closure/goog/events/events.js.src.html\n *\n * The argument passed to this function is the key returned from\n * {@link module:ol/events.listen} or {@link module:ol/events.listenOnce}.\n *\n * @param {EventsKey} key The key.\n */\nexport function unlistenByKey(key) {\n  if (key && key.target) {\n    key.target.removeEventListener(key.type, key.listener);\n    clear(key);\n  }\n}\n", "/**\n * @module ol/events/EventType\n */\n\n/**\n * @enum {string}\n * @const\n */\nexport default {\n  /**\n   * Generic change event. Triggered when the revision counter is increased.\n   * @event module:ol/events/Event~BaseEvent#change\n   * @api\n   */\n  CHANGE: 'change',\n\n  /**\n   * Generic error event. Triggered when an error occurs.\n   * @event module:ol/events/Event~BaseEvent#error\n   * @api\n   */\n  ERROR: 'error',\n\n  BLUR: 'blur',\n  CLEAR: 'clear',\n  CONTEXTMENU: 'contextmenu',\n  CLICK: 'click',\n  DBLCLICK: 'dblclick',\n  DRAGENTER: 'dragenter',\n  DRAGOVER: 'dragover',\n  DROP: 'drop',\n  FOCUS: 'focus',\n  KEYDOWN: 'keydown',\n  KEYPRESS: 'keypress',\n  LOAD: 'load',\n  RESIZE: 'resize',\n  TOUCHMOVE: 'touchmove',\n  WHEEL: 'wheel',\n};\n", "/**\n * @module ol/Disposable\n */\n\n/**\n * @classdesc\n * Objects that need to clean up after themselves.\n */\nclass Disposable {\n  constructor() {\n    /**\n     * The object has already been disposed.\n     * @type {boolean}\n     * @protected\n     */\n    this.disposed = false;\n  }\n\n  /**\n   * Clean up.\n   */\n  dispose() {\n    if (!this.disposed) {\n      this.disposed = true;\n      this.disposeInternal();\n    }\n  }\n\n  /**\n   * Extension point for disposable objects.\n   * @protected\n   */\n  disposeInternal() {}\n}\n\nexport default Disposable;\n", "/**\n * @module ol/functions\n */\n\nimport {equals as arrayEquals} from './array.js';\n\n/**\n * Always returns true.\n * @return {boolean} true.\n */\nexport function TRUE() {\n  return true;\n}\n\n/**\n * Always returns false.\n * @return {boolean} false.\n */\nexport function FALSE() {\n  return false;\n}\n\n/**\n * A reusable function, used e.g. as a default for callbacks.\n *\n * @return {void} Nothing.\n */\nexport function VOID() {}\n\n/**\n * Wrap a function in another function that remembers the last return.  If the\n * returned function is called twice in a row with the same arguments and the same\n * this object, it will return the value from the first call in the second call.\n *\n * @param {function(...any): ReturnType} fn The function to memoize.\n * @return {function(...any): ReturnType} The memoized function.\n * @template ReturnType\n */\nexport function memoizeOne(fn) {\n  /** @type {ReturnType} */\n  let lastResult;\n\n  /** @type {Array<any>|undefined} */\n  let lastArgs;\n\n  let lastThis;\n\n  /**\n   * @this {*} Only need to know if `this` changed, don't care what type\n   * @return {ReturnType} Memoized value\n   */\n  return function () {\n    const nextArgs = Array.prototype.slice.call(arguments);\n    if (!lastArgs || this !== lastThis || !arrayEquals(nextArgs, lastArgs)) {\n      lastThis = this;\n      lastArgs = nextArgs;\n      lastResult = fn.apply(this, arguments);\n    }\n    return lastResult;\n  };\n}\n\n/**\n * @template T\n * @param {function(): (T | Promise<T>)} getter A function that returns a value or a promise for a value.\n * @return {Promise<T>} A promise for the value.\n */\nexport function toPromise(getter) {\n  function promiseGetter() {\n    let value;\n    try {\n      value = getter();\n    } catch (err) {\n      return Promise.reject(err);\n    }\n    if (value instanceof Promise) {\n      return value;\n    }\n    return Promise.resolve(value);\n  }\n  return promiseGetter();\n}\n", "/**\n * @module ol/events/Event\n */\n\n/**\n * @classdesc\n * Stripped down implementation of the W3C DOM Level 2 Event interface.\n * See https://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-interface.\n *\n * This implementation only provides `type` and `target` properties, and\n * `stopPropagation` and `preventDefault` methods. It is meant as base class\n * for higher level events defined in the library, and works with\n * {@link module:ol/events/Target~Target}.\n */\nclass BaseEvent {\n  /**\n   * @param {string} type Type.\n   */\n  constructor(type) {\n    /**\n     * @type {boolean}\n     */\n    this.propagationStopped;\n\n    /**\n     * @type {boolean}\n     */\n    this.defaultPrevented;\n\n    /**\n     * The event type.\n     * @type {string}\n     * @api\n     */\n    this.type = type;\n\n    /**\n     * The event target.\n     * @type {Object}\n     * @api\n     */\n    this.target = null;\n  }\n\n  /**\n   * Prevent default. This means that no emulated `click`, `singleclick` or `doubleclick` events\n   * will be fired.\n   * @api\n   */\n  preventDefault() {\n    this.defaultPrevented = true;\n  }\n\n  /**\n   * Stop event propagation.\n   * @api\n   */\n  stopPropagation() {\n    this.propagationStopped = true;\n  }\n}\n\n/**\n * @param {Event|import(\"./Event.js\").default} evt Event\n */\nexport function stopPropagation(evt) {\n  evt.stopPropagation();\n}\n\n/**\n * @param {Event|import(\"./Event.js\").default} evt Event\n */\nexport function preventDefault(evt) {\n  evt.preventDefault();\n}\n\nexport default BaseEvent;\n", "/**\n * @module ol/events/Target\n */\nimport Disposable from '../Disposable.js';\nimport {VOID} from '../functions.js';\nimport {clear} from '../obj.js';\nimport Event from './Event.js';\n\n/**\n * @typedef {EventTarget|Target} EventTargetLike\n */\n\n/**\n * @classdesc\n * A simplified implementation of the W3C DOM Level 2 EventTarget interface.\n * See https://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113/events.html#Events-EventTarget.\n *\n * There are two important simplifications compared to the specification:\n *\n * 1. The handling of `useCapture` in `addEventListener` and\n *    `removeEventListener`. There is no real capture model.\n * 2. The handling of `stopPropagation` and `preventDefault` on `dispatchEvent`.\n *    There is no event target hierarchy. When a listener calls\n *    `stopPropagation` or `preventDefault` on an event object, it means that no\n *    more listeners after this one will be called. Same as when the listener\n *    returns false.\n */\nclass Target extends Disposable {\n  /**\n   * @param {*} [target] Default event target for dispatched events.\n   */\n  constructor(target) {\n    super();\n\n    /**\n     * @private\n     * @type {*}\n     */\n    this.eventTarget_ = target;\n\n    /**\n     * @private\n     * @type {Object<string, number>|null}\n     */\n    this.pendingRemovals_ = null;\n\n    /**\n     * @private\n     * @type {Object<string, number>|null}\n     */\n    this.dispatching_ = null;\n\n    /**\n     * @private\n     * @type {Object<string, Array<import(\"../events.js\").Listener>>|null}\n     */\n    this.listeners_ = null;\n  }\n\n  /**\n   * @param {string} type Type.\n   * @param {import(\"../events.js\").Listener} listener Listener.\n   */\n  addEventListener(type, listener) {\n    if (!type || !listener) {\n      return;\n    }\n    const listeners = this.listeners_ || (this.listeners_ = {});\n    const listenersForType = listeners[type] || (listeners[type] = []);\n    if (!listenersForType.includes(listener)) {\n      listenersForType.push(listener);\n    }\n  }\n\n  /**\n   * Dispatches an event and calls all listeners listening for events\n   * of this type. The event parameter can either be a string or an\n   * Object with a `type` property.\n   *\n   * @param {import(\"./Event.js\").default|string} event Event object.\n   * @return {boolean|undefined} `false` if anyone called preventDefault on the\n   *     event object or if any of the listeners returned false.\n   * @api\n   */\n  dispatchEvent(event) {\n    const isString = typeof event === 'string';\n    const type = isString ? event : event.type;\n    const listeners = this.listeners_ && this.listeners_[type];\n    if (!listeners) {\n      return;\n    }\n\n    const evt = isString ? new Event(event) : /** @type {Event} */ (event);\n    if (!evt.target) {\n      evt.target = this.eventTarget_ || this;\n    }\n    const dispatching = this.dispatching_ || (this.dispatching_ = {});\n    const pendingRemovals =\n      this.pendingRemovals_ || (this.pendingRemovals_ = {});\n    if (!(type in dispatching)) {\n      dispatching[type] = 0;\n      pendingRemovals[type] = 0;\n    }\n    ++dispatching[type];\n    let propagate;\n    for (let i = 0, ii = listeners.length; i < ii; ++i) {\n      if ('handleEvent' in listeners[i]) {\n        propagate = /** @type {import(\"../events.js\").ListenerObject} */ (\n          listeners[i]\n        ).handleEvent(evt);\n      } else {\n        propagate = /** @type {import(\"../events.js\").ListenerFunction} */ (\n          listeners[i]\n        ).call(this, evt);\n      }\n      if (propagate === false || evt.propagationStopped) {\n        propagate = false;\n        break;\n      }\n    }\n    if (--dispatching[type] === 0) {\n      let pr = pendingRemovals[type];\n      delete pendingRemovals[type];\n      while (pr--) {\n        this.removeEventListener(type, VOID);\n      }\n      delete dispatching[type];\n    }\n    return propagate;\n  }\n\n  /**\n   * Clean up.\n   * @override\n   */\n  disposeInternal() {\n    this.listeners_ && clear(this.listeners_);\n  }\n\n  /**\n   * Get the listeners for a specified event type. Listeners are returned in the\n   * order that they will be called in.\n   *\n   * @param {string} type Type.\n   * @return {Array<import(\"../events.js\").Listener>|undefined} Listeners.\n   */\n  getListeners(type) {\n    return (this.listeners_ && this.listeners_[type]) || undefined;\n  }\n\n  /**\n   * @param {string} [type] Type. If not provided,\n   *     `true` will be returned if this event target has any listeners.\n   * @return {boolean} Has listeners.\n   */\n  hasListener(type) {\n    if (!this.listeners_) {\n      return false;\n    }\n    return type\n      ? type in this.listeners_\n      : Object.keys(this.listeners_).length > 0;\n  }\n\n  /**\n   * @param {string} type Type.\n   * @param {import(\"../events.js\").Listener} listener Listener.\n   */\n  removeEventListener(type, listener) {\n    if (!this.listeners_) {\n      return;\n    }\n    const listeners = this.listeners_[type];\n    if (!listeners) {\n      return;\n    }\n    const index = listeners.indexOf(listener);\n    if (index !== -1) {\n      if (this.pendingRemovals_ && type in this.pendingRemovals_) {\n        // make listener a no-op, and remove later in #dispatchEvent()\n        listeners[index] = VOID;\n        ++this.pendingRemovals_[type];\n      } else {\n        listeners.splice(index, 1);\n        if (listeners.length === 0) {\n          delete this.listeners_[type];\n        }\n      }\n    }\n  }\n}\n\nexport default Target;\n", "/**\n * @module ol/Observable\n */\nimport {listen, listenOnce, unlistenByKey} from './events.js';\nimport EventType from './events/EventType.js';\nimport EventTarget from './events/Target.js';\n\n/***\n * @template {string} Type\n * @template {Event|import(\"./events/Event.js\").default} EventClass\n * @template Return\n * @typedef {(type: Type, listener: (event: EventClass) => ?) => Return} OnSignature\n */\n\n/***\n * @template {string} Type\n * @template Return\n * @typedef {(type: Type[], listener: (event: Event|import(\"./events/Event.js\").default) => ?) => Return extends void ? void : Return[]} CombinedOnSignature\n */\n\n/**\n * @typedef {'change'|'error'} EventTypes\n */\n\n/***\n * @template Return\n * @typedef {OnSignature<EventTypes, import(\"./events/Event.js\").default, Return> & CombinedOnSignature<EventTypes, Return>} ObservableOnSignature\n */\n\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * An event target providing convenient methods for listener registration\n * and unregistration. A generic `change` event is always available through\n * {@link module:ol/Observable~Observable#changed}.\n *\n * @fires import(\"./events/Event.js\").default\n * @api\n */\nclass Observable extends EventTarget {\n  constructor() {\n    super();\n\n    this.on =\n      /** @type {ObservableOnSignature<import(\"./events.js\").EventsKey>} */ (\n        this.onInternal\n      );\n\n    this.once =\n      /** @type {ObservableOnSignature<import(\"./events.js\").EventsKey>} */ (\n        this.onceInternal\n      );\n\n    this.un = /** @type {ObservableOnSignature<void>} */ (this.unInternal);\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.revision_ = 0;\n  }\n\n  /**\n   * Increases the revision counter and dispatches a 'change' event.\n   * @api\n   */\n  changed() {\n    ++this.revision_;\n    this.dispatchEvent(EventType.CHANGE);\n  }\n\n  /**\n   * Get the version number for this object.  Each time the object is modified,\n   * its version number will be incremented.\n   * @return {number} Revision.\n   * @api\n   */\n  getRevision() {\n    return this.revision_;\n  }\n\n  /**\n   * @param {string|Array<string>} type Type.\n   * @param {function((Event|import(\"./events/Event.js\").default)): ?} listener Listener.\n   * @return {import(\"./events.js\").EventsKey|Array<import(\"./events.js\").EventsKey>} Event key.\n   * @protected\n   */\n  onInternal(type, listener) {\n    if (Array.isArray(type)) {\n      const len = type.length;\n      const keys = new Array(len);\n      for (let i = 0; i < len; ++i) {\n        keys[i] = listen(this, type[i], listener);\n      }\n      return keys;\n    }\n    return listen(this, /** @type {string} */ (type), listener);\n  }\n\n  /**\n   * @param {string|Array<string>} type Type.\n   * @param {function((Event|import(\"./events/Event.js\").default)): ?} listener Listener.\n   * @return {import(\"./events.js\").EventsKey|Array<import(\"./events.js\").EventsKey>} Event key.\n   * @protected\n   */\n  onceInternal(type, listener) {\n    let key;\n    if (Array.isArray(type)) {\n      const len = type.length;\n      key = new Array(len);\n      for (let i = 0; i < len; ++i) {\n        key[i] = listenOnce(this, type[i], listener);\n      }\n    } else {\n      key = listenOnce(this, /** @type {string} */ (type), listener);\n    }\n    /** @type {Object} */ (listener).ol_key = key;\n    return key;\n  }\n\n  /**\n   * Unlisten for a certain type of event.\n   * @param {string|Array<string>} type Type.\n   * @param {function((Event|import(\"./events/Event.js\").default)): ?} listener Listener.\n   * @protected\n   */\n  unInternal(type, listener) {\n    const key = /** @type {Object} */ (listener).ol_key;\n    if (key) {\n      unByKey(key);\n    } else if (Array.isArray(type)) {\n      for (let i = 0, ii = type.length; i < ii; ++i) {\n        this.removeEventListener(type[i], listener);\n      }\n    } else {\n      this.removeEventListener(type, listener);\n    }\n  }\n}\n\n/**\n * Listen for a certain type of event.\n * @function\n * @param {string|Array<string>} type The event type or array of event types.\n * @param {function((Event|import(\"./events/Event.js\").default)): ?} listener The listener function.\n * @return {import(\"./events.js\").EventsKey|Array<import(\"./events.js\").EventsKey>} Unique key for the listener. If\n *     called with an array of event types as the first argument, the return\n *     will be an array of keys.\n * @api\n */\nObservable.prototype.on;\n\n/**\n * Listen once for a certain type of event.\n * @function\n * @param {string|Array<string>} type The event type or array of event types.\n * @param {function((Event|import(\"./events/Event.js\").default)): ?} listener The listener function.\n * @return {import(\"./events.js\").EventsKey|Array<import(\"./events.js\").EventsKey>} Unique key for the listener. If\n *     called with an array of event types as the first argument, the return\n *     will be an array of keys.\n * @api\n */\nObservable.prototype.once;\n\n/**\n * Unlisten for a certain type of event.\n * @function\n * @param {string|Array<string>} type The event type or array of event types.\n * @param {function((Event|import(\"./events/Event.js\").default)): ?} listener The listener function.\n * @api\n */\nObservable.prototype.un;\n\n/**\n * Removes an event listener using the key returned by `on()` or `once()`.\n * @param {import(\"./events.js\").EventsKey|Array<import(\"./events.js\").EventsKey>} key The key returned by `on()`\n *     or `once()` (or an array of keys).\n * @api\n */\nexport function unByKey(key) {\n  if (Array.isArray(key)) {\n    for (let i = 0, ii = key.length; i < ii; ++i) {\n      unlistenByKey(key[i]);\n    }\n  } else {\n    unlistenByKey(/** @type {import(\"./events.js\").EventsKey} */ (key));\n  }\n}\n\nexport default Observable;\n", "/**\n * @module ol/Object\n */\nimport ObjectEventType from './ObjectEventType.js';\nimport Observable from './Observable.js';\nimport Event from './events/Event.js';\nimport {isEmpty} from './obj.js';\nimport {getUid} from './util.js';\n\n/**\n * @classdesc\n * Events emitted by {@link module:ol/Object~BaseObject} instances are instances of this type.\n */\nexport class ObjectEvent extends Event {\n  /**\n   * @param {string} type The event type.\n   * @param {string} key The property name.\n   * @param {*} oldValue The old value for `key`.\n   */\n  constructor(type, key, oldValue) {\n    super(type);\n\n    /**\n     * The name of the property whose value is changing.\n     * @type {string}\n     * @api\n     */\n    this.key = key;\n\n    /**\n     * The old value. To get the new value use `e.target.get(e.key)` where\n     * `e` is the event object.\n     * @type {*}\n     * @api\n     */\n    this.oldValue = oldValue;\n  }\n}\n\n/***\n * @template Return\n * @typedef {import(\"./Observable.js\").OnSignature<import(\"./Observable.js\").EventTypes, import(\"./events/Event.js\").default, Return> &\n *    import(\"./Observable.js\").OnSignature<import(\"./ObjectEventType.js\").Types, ObjectEvent, Return> &\n *    import(\"./Observable.js\").CombinedOnSignature<import(\"./Observable.js\").EventTypes|import(\"./ObjectEventType.js\").Types, Return>} ObjectOnSignature\n */\n\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Most non-trivial classes inherit from this.\n *\n * This extends {@link module:ol/Observable~Observable} with observable\n * properties, where each property is observable as well as the object as a\n * whole.\n *\n * Classes that inherit from this have pre-defined properties, to which you can\n * add your owns. The pre-defined properties are listed in this documentation as\n * 'Observable Properties', and have their own accessors; for example,\n * {@link module:ol/Map~Map} has a `target` property, accessed with\n * `getTarget()` and changed with `setTarget()`. Not all properties are however\n * settable. There are also general-purpose accessors `get()` and `set()`. For\n * example, `get('target')` is equivalent to `getTarget()`.\n *\n * The `set` accessors trigger a change event, and you can monitor this by\n * registering a listener. For example, {@link module:ol/View~View} has a\n * `center` property, so `view.on('change:center', function(evt) {...});` would\n * call the function whenever the value of the center property changes. Within\n * the function, `evt.target` would be the view, so `evt.target.getCenter()`\n * would return the new center.\n *\n * You can add your own observable properties with\n * `object.set('prop', 'value')`, and retrieve that with `object.get('prop')`.\n * You can listen for changes on that property value with\n * `object.on('change:prop', listener)`. You can get a list of all\n * properties with {@link module:ol/Object~BaseObject#getProperties}.\n *\n * Note that the observable properties are separate from standard JS properties.\n * You can, for example, give your map object a title with\n * `map.title='New title'` and with `map.set('title', 'Another title')`. The\n * first will be a `hasOwnProperty`; the second will appear in\n * `getProperties()`. Only the second is observable.\n *\n * Properties can be deleted by using the unset method. E.g.\n * object.unset('foo').\n *\n * @fires ObjectEvent\n * @template {Object<string, *>} [Properties=Object<string, *>]\n * @api\n */\nclass BaseObject extends Observable {\n  /**\n   * @param {NoInfer<Properties>} [values] An object with key-value pairs.\n   */\n  constructor(values) {\n    super();\n\n    /***\n     * @type {ObjectOnSignature<import(\"./events.js\").EventsKey>}\n     */\n    this.on;\n\n    /***\n     * @type {ObjectOnSignature<import(\"./events.js\").EventsKey>}\n     */\n    this.once;\n\n    /***\n     * @type {ObjectOnSignature<void>}\n     */\n    this.un;\n\n    // Call {@link module:ol/util.getUid} to ensure that the order of objects' ids is\n    // the same as the order in which they were created.  This also helps to\n    // ensure that object properties are always added in the same order, which\n    // helps many JavaScript engines generate faster code.\n    getUid(this);\n\n    /**\n     * @private\n     * @type {Partial<NoInfer<Properties>>|null}\n     */\n    this.values_ = null;\n\n    if (values !== undefined) {\n      this.setProperties(values);\n    }\n  }\n\n  /**\n   * Gets a value.\n   * @param {string} key Key name.\n   * @return {*} Value.\n   * @api\n   */\n  get(key) {\n    let value;\n    if (this.values_ && this.values_.hasOwnProperty(key)) {\n      value = this.values_[key];\n    }\n    return value;\n  }\n\n  /**\n   * Get a list of object property names.\n   * @return {Array<string>} List of property names.\n   * @api\n   */\n  getKeys() {\n    return (this.values_ && Object.keys(this.values_)) || [];\n  }\n\n  /**\n   * Get an object of all property names and values.\n   * @return {NoInfer<Properties>} Object.\n   * @api\n   */\n  getProperties() {\n    return /** @type {NoInfer<Properties>} */ (\n      (this.values_ && Object.assign({}, this.values_)) || {}\n    );\n  }\n\n  /**\n   * Get an object of all property names and values.\n   * @return {Partial<NoInfer<Properties>>?} Object.\n   */\n  getPropertiesInternal() {\n    return this.values_;\n  }\n\n  /**\n   * @return {boolean} The object has properties.\n   */\n  hasProperties() {\n    return !!this.values_;\n  }\n\n  /**\n   * @param {string} key Key name.\n   * @param {*} oldValue Old value.\n   */\n  notify(key, oldValue) {\n    let eventType;\n    eventType = `change:${key}`;\n    if (this.hasListener(eventType)) {\n      this.dispatchEvent(new ObjectEvent(eventType, key, oldValue));\n    }\n    eventType = ObjectEventType.PROPERTYCHANGE;\n    if (this.hasListener(eventType)) {\n      this.dispatchEvent(new ObjectEvent(eventType, key, oldValue));\n    }\n  }\n\n  /**\n   * @param {string} key Key name.\n   * @param {import(\"./events.js\").Listener} listener Listener.\n   */\n  addChangeListener(key, listener) {\n    this.addEventListener(`change:${key}`, listener);\n  }\n\n  /**\n   * @param {string} key Key name.\n   * @param {import(\"./events.js\").Listener} listener Listener.\n   */\n  removeChangeListener(key, listener) {\n    this.removeEventListener(`change:${key}`, listener);\n  }\n\n  /**\n   * Sets a value.\n   * @param {string} key Key name.\n   * @param {*} value Value.\n   * @param {boolean} [silent] Update without triggering an event.\n   * @api\n   */\n  set(key, value, silent) {\n    const values = this.values_ || (this.values_ = {});\n    if (silent) {\n      values[key] = value;\n    } else {\n      const oldValue = values[key];\n      values[key] = value;\n      if (oldValue !== value) {\n        this.notify(key, oldValue);\n      }\n    }\n  }\n\n  /**\n   * Sets a collection of key-value pairs.  Note that this changes any existing\n   * properties and adds new ones (it does not remove any existing properties).\n   * @param {Partial<NoInfer<Properties>>} values Values.\n   * @param {boolean} [silent] Update without triggering an event.\n   * @api\n   */\n  setProperties(values, silent) {\n    for (const key in values) {\n      this.set(key, values[key], silent);\n    }\n  }\n\n  /**\n   * Apply any properties from another object without triggering events.\n   * @param {BaseObject} source The source object.\n   * @protected\n   */\n  applyProperties(source) {\n    if (!source.values_) {\n      return;\n    }\n    Object.assign(this.values_ || (this.values_ = {}), source.values_);\n  }\n\n  /**\n   * Unsets a property.\n   * @param {string} key Key name.\n   * @param {boolean} [silent] Unset without triggering an event.\n   * @api\n   */\n  unset(key, silent) {\n    if (this.values_ && key in this.values_) {\n      const oldValue = this.values_[key];\n      delete this.values_[key];\n      if (isEmpty(this.values_)) {\n        this.values_ = null;\n      }\n      if (!silent) {\n        this.notify(key, oldValue);\n      }\n    }\n  }\n}\n\nexport default BaseObject;\n", "/**\n * @module ol/asserts\n */\n\n/**\n * @param {*} assertion Assertion we expected to be truthy.\n * @param {string} errorMessage Error message.\n */\nexport function assert(assertion, errorMessage) {\n  if (!assertion) {\n    throw new Error(errorMessage);\n  }\n}\n", "/**\n * @module ol/transform\n */\nimport {assert} from './asserts.js';\n\n/**\n * An array representing an affine 2d transformation for use with\n * {@link module:ol/transform} functions. The array has 6 elements.\n * @typedef {!Array<number>} Transform\n * @api\n */\n\n/**\n * Collection of affine 2d transformation functions. The functions work on an\n * array of 6 elements. The element order is compatible with the [SVGMatrix\n * interface](https://developer.mozilla.org/en-US/docs/Web/API/SVGMatrix) and is\n * a subset (elements a to f) of a 3\u00D73 matrix:\n * ```\n * [ a c e ]\n * [ b d f ]\n * [ 0 0 1 ]\n * ```\n */\n\n/** @type {Transform} */\nexport const IDENTITY_TRANSFORM = [1, 0, 0, 1, 0, 0];\n\n/**\n * @private\n * @type {Transform}\n */\nconst tmp_ = new Array(6);\n\n/**\n * Create an identity transform.\n * @return {!Transform} Identity transform.\n */\nexport function create() {\n  return IDENTITY_TRANSFORM.slice(0);\n}\n\n/**\n * Resets the given transform to an identity transform.\n * @param {!Transform} transform Transform.\n * @return {!Transform} Transform.\n */\nexport function reset(transform) {\n  return set(transform, 1, 0, 0, 1, 0, 0);\n}\n\n/**\n * Multiply the underlying matrices of two transforms and return the result in\n * the first transform.\n * @param {!Transform} transform1 Transform parameters of matrix 1.\n * @param {!Transform} transform2 Transform parameters of matrix 2.\n * @return {!Transform} transform1 multiplied with transform2.\n */\nexport function multiply(transform1, transform2) {\n  const a1 = transform1[0];\n  const b1 = transform1[1];\n  const c1 = transform1[2];\n  const d1 = transform1[3];\n  const e1 = transform1[4];\n  const f1 = transform1[5];\n  const a2 = transform2[0];\n  const b2 = transform2[1];\n  const c2 = transform2[2];\n  const d2 = transform2[3];\n  const e2 = transform2[4];\n  const f2 = transform2[5];\n\n  transform1[0] = a1 * a2 + c1 * b2;\n  transform1[1] = b1 * a2 + d1 * b2;\n  transform1[2] = a1 * c2 + c1 * d2;\n  transform1[3] = b1 * c2 + d1 * d2;\n  transform1[4] = a1 * e2 + c1 * f2 + e1;\n  transform1[5] = b1 * e2 + d1 * f2 + f1;\n\n  return transform1;\n}\n\n/**\n * Set the transform components a-f on a given transform.\n * @param {!Transform} transform Transform.\n * @param {number} a The a component of the transform.\n * @param {number} b The b component of the transform.\n * @param {number} c The c component of the transform.\n * @param {number} d The d component of the transform.\n * @param {number} e The e component of the transform.\n * @param {number} f The f component of the transform.\n * @return {!Transform} Matrix with transform applied.\n */\nexport function set(transform, a, b, c, d, e, f) {\n  transform[0] = a;\n  transform[1] = b;\n  transform[2] = c;\n  transform[3] = d;\n  transform[4] = e;\n  transform[5] = f;\n  return transform;\n}\n\n/**\n * Set transform on one matrix from another matrix.\n * @param {!Transform} transform1 Matrix to set transform to.\n * @param {!Transform} transform2 Matrix to set transform from.\n * @return {!Transform} transform1 with transform from transform2 applied.\n */\nexport function setFromArray(transform1, transform2) {\n  transform1[0] = transform2[0];\n  transform1[1] = transform2[1];\n  transform1[2] = transform2[2];\n  transform1[3] = transform2[3];\n  transform1[4] = transform2[4];\n  transform1[5] = transform2[5];\n  return transform1;\n}\n\n/**\n * Transforms the given coordinate with the given transform returning the\n * resulting, transformed coordinate. The coordinate will be modified in-place.\n *\n * @param {Transform} transform The transformation.\n * @param {import(\"./coordinate.js\").Coordinate|import(\"./pixel.js\").Pixel} coordinate The coordinate to transform.\n * @return {import(\"./coordinate.js\").Coordinate|import(\"./pixel.js\").Pixel} return coordinate so that operations can be\n *     chained together.\n */\nexport function apply(transform, coordinate) {\n  const x = coordinate[0];\n  const y = coordinate[1];\n  coordinate[0] = transform[0] * x + transform[2] * y + transform[4];\n  coordinate[1] = transform[1] * x + transform[3] * y + transform[5];\n  return coordinate;\n}\n\n/**\n * Applies rotation to the given transform.\n * @param {!Transform} transform Transform.\n * @param {number} angle Angle in radians.\n * @return {!Transform} The rotated transform.\n */\nexport function rotate(transform, angle) {\n  const cos = Math.cos(angle);\n  const sin = Math.sin(angle);\n  return multiply(transform, set(tmp_, cos, sin, -sin, cos, 0, 0));\n}\n\n/**\n * Applies scale to a given transform.\n * @param {!Transform} transform Transform.\n * @param {number} x Scale factor x.\n * @param {number} y Scale factor y.\n * @return {!Transform} The scaled transform.\n */\nexport function scale(transform, x, y) {\n  return multiply(transform, set(tmp_, x, 0, 0, y, 0, 0));\n}\n\n/**\n * Creates a scale transform.\n * @param {!Transform} target Transform to overwrite.\n * @param {number} x Scale factor x.\n * @param {number} y Scale factor y.\n * @return {!Transform} The scale transform.\n */\nexport function makeScale(target, x, y) {\n  return set(target, x, 0, 0, y, 0, 0);\n}\n\n/**\n * Applies translation to the given transform.\n * @param {!Transform} transform Transform.\n * @param {number} dx Translation x.\n * @param {number} dy Translation y.\n * @return {!Transform} The translated transform.\n */\nexport function translate(transform, dx, dy) {\n  return multiply(transform, set(tmp_, 1, 0, 0, 1, dx, dy));\n}\n\n/**\n * Creates a composite transform given an initial translation, scale, rotation, and\n * final translation (in that order only, not commutative).\n * @param {!Transform} transform The transform (will be modified in place).\n * @param {number} dx1 Initial translation x.\n * @param {number} dy1 Initial translation y.\n * @param {number} sx Scale factor x.\n * @param {number} sy Scale factor y.\n * @param {number} angle Rotation (in counter-clockwise radians).\n * @param {number} dx2 Final translation x.\n * @param {number} dy2 Final translation y.\n * @return {!Transform} The composite transform.\n */\nexport function compose(transform, dx1, dy1, sx, sy, angle, dx2, dy2) {\n  const sin = Math.sin(angle);\n  const cos = Math.cos(angle);\n  transform[0] = sx * cos;\n  transform[1] = sy * sin;\n  transform[2] = -sx * sin;\n  transform[3] = sy * cos;\n  transform[4] = dx2 * sx * cos - dy2 * sx * sin + dx1;\n  transform[5] = dx2 * sy * sin + dy2 * sy * cos + dy1;\n  return transform;\n}\n\n/**\n * Creates a composite transform given an initial translation, scale, rotation, and\n * final translation (in that order only, not commutative). The resulting transform\n * string can be applied as `transform` property of an HTMLElement's style.\n * @param {number} dx1 Initial translation x.\n * @param {number} dy1 Initial translation y.\n * @param {number} sx Scale factor x.\n * @param {number} sy Scale factor y.\n * @param {number} angle Rotation (in counter-clockwise radians).\n * @param {number} dx2 Final translation x.\n * @param {number} dy2 Final translation y.\n * @return {string} The composite css transform.\n * @api\n */\nexport function composeCssTransform(dx1, dy1, sx, sy, angle, dx2, dy2) {\n  return toString(compose(create(), dx1, dy1, sx, sy, angle, dx2, dy2));\n}\n\n/**\n * Invert the given transform.\n * @param {!Transform} source The source transform to invert.\n * @return {!Transform} The inverted (source) transform.\n */\nexport function invert(source) {\n  return makeInverse(source, source);\n}\n\n/**\n * Invert the given transform.\n * @param {!Transform} target Transform to be set as the inverse of\n *     the source transform.\n * @param {!Transform} source The source transform to invert.\n * @return {!Transform} The inverted (target) transform.\n */\nexport function makeInverse(target, source) {\n  const det = determinant(source);\n  assert(det !== 0, 'Transformation matrix cannot be inverted');\n\n  const a = source[0];\n  const b = source[1];\n  const c = source[2];\n  const d = source[3];\n  const e = source[4];\n  const f = source[5];\n\n  target[0] = d / det;\n  target[1] = -b / det;\n  target[2] = -c / det;\n  target[3] = a / det;\n  target[4] = (c * f - d * e) / det;\n  target[5] = -(a * f - b * e) / det;\n\n  return target;\n}\n\n/**\n * Returns the determinant of the given matrix.\n * @param {!Transform} mat Matrix.\n * @return {number} Determinant.\n */\nexport function determinant(mat) {\n  return mat[0] * mat[3] - mat[1] * mat[2];\n}\n\n/**\n * @type {Array}\n */\nconst matrixPrecision = [1e5, 1e5, 1e5, 1e5, 2, 2];\n\n/**\n * A matrix string version of the transform.  This can be used\n * for CSS transforms.\n * @param {!Transform} mat Matrix.\n * @return {string} The transform as a string.\n */\nexport function toString(mat) {\n  const transformString = 'matrix(' + mat.join(', ') + ')';\n  return transformString;\n}\n\n/**\n * Create a transform from a CSS transform matrix string.\n * @param {string} cssTransform The CSS string to parse.\n * @return {!Transform} The transform.\n */\nexport function fromString(cssTransform) {\n  const values = cssTransform.substring(7, cssTransform.length - 1).split(',');\n  return values.map(parseFloat);\n}\n\n/**\n * Compare two matrices for equality.\n * @param {!string} cssTransform1 A CSS transform matrix string.\n * @param {!string} cssTransform2 A CSS transform matrix string.\n * @return {boolean} The two matrices are equal.\n */\nexport function equivalent(cssTransform1, cssTransform2) {\n  const mat1 = fromString(cssTransform1);\n  const mat2 = fromString(cssTransform2);\n  for (let i = 0; i < 6; ++i) {\n    if (Math.round((mat1[i] - mat2[i]) * matrixPrecision[i]) !== 0) {\n      return false;\n    }\n  }\n  return true;\n}\n", "/**\n * @module ol/geom/flat/transform\n */\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {import(\"../../transform.js\").Transform} transform Transform.\n * @param {Array<number>} [dest] Destination.\n * @param {number} [destinationStride] Stride of destination coordinates; if unspecified, assumed to be 2.\n * @return {Array<number>} Transformed coordinates.\n */\nexport function transform2D(\n  flatCoordinates,\n  offset,\n  end,\n  stride,\n  transform,\n  dest,\n  destinationStride,\n) {\n  dest = dest ? dest : [];\n  destinationStride = destinationStride ? destinationStride : 2;\n  let i = 0;\n  for (let j = offset; j < end; j += stride) {\n    const x = flatCoordinates[j];\n    const y = flatCoordinates[j + 1];\n    dest[i++] = transform[0] * x + transform[2] * y + transform[4];\n    dest[i++] = transform[1] * x + transform[3] * y + transform[5];\n\n    for (let k = 2; k < destinationStride; k++) {\n      dest[i++] = flatCoordinates[j + k];\n    }\n  }\n\n  if (dest && dest.length != i) {\n    dest.length = i;\n  }\n  return dest;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} angle Angle.\n * @param {Array<number>} anchor Rotation anchor point.\n * @param {Array<number>} [dest] Destination.\n * @return {Array<number>} Transformed coordinates.\n */\nexport function rotate(\n  flatCoordinates,\n  offset,\n  end,\n  stride,\n  angle,\n  anchor,\n  dest,\n) {\n  dest = dest ? dest : [];\n  const cos = Math.cos(angle);\n  const sin = Math.sin(angle);\n  const anchorX = anchor[0];\n  const anchorY = anchor[1];\n  let i = 0;\n  for (let j = offset; j < end; j += stride) {\n    const deltaX = flatCoordinates[j] - anchorX;\n    const deltaY = flatCoordinates[j + 1] - anchorY;\n    dest[i++] = anchorX + deltaX * cos - deltaY * sin;\n    dest[i++] = anchorY + deltaX * sin + deltaY * cos;\n    for (let k = j + 2; k < j + stride; ++k) {\n      dest[i++] = flatCoordinates[k];\n    }\n  }\n  if (dest && dest.length != i) {\n    dest.length = i;\n  }\n  return dest;\n}\n\n/**\n * Scale the coordinates.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} sx Scale factor in the x-direction.\n * @param {number} sy Scale factor in the y-direction.\n * @param {Array<number>} anchor Scale anchor point.\n * @param {Array<number>} [dest] Destination.\n * @return {Array<number>} Transformed coordinates.\n */\nexport function scale(\n  flatCoordinates,\n  offset,\n  end,\n  stride,\n  sx,\n  sy,\n  anchor,\n  dest,\n) {\n  dest = dest ? dest : [];\n  const anchorX = anchor[0];\n  const anchorY = anchor[1];\n  let i = 0;\n  for (let j = offset; j < end; j += stride) {\n    const deltaX = flatCoordinates[j] - anchorX;\n    const deltaY = flatCoordinates[j + 1] - anchorY;\n    dest[i++] = anchorX + sx * deltaX;\n    dest[i++] = anchorY + sy * deltaY;\n    for (let k = j + 2; k < j + stride; ++k) {\n      dest[i++] = flatCoordinates[k];\n    }\n  }\n  if (dest && dest.length != i) {\n    dest.length = i;\n  }\n  return dest;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} deltaX Delta X.\n * @param {number} deltaY Delta Y.\n * @param {Array<number>} [dest] Destination.\n * @return {Array<number>} Transformed coordinates.\n */\nexport function translate(\n  flatCoordinates,\n  offset,\n  end,\n  stride,\n  deltaX,\n  deltaY,\n  dest,\n) {\n  dest = dest ? dest : [];\n  let i = 0;\n  for (let j = offset; j < end; j += stride) {\n    dest[i++] = flatCoordinates[j] + deltaX;\n    dest[i++] = flatCoordinates[j + 1] + deltaY;\n    for (let k = j + 2; k < j + stride; ++k) {\n      dest[i++] = flatCoordinates[k];\n    }\n  }\n  if (dest && dest.length != i) {\n    dest.length = i;\n  }\n  return dest;\n}\n", "/**\n * @module ol/geom/Geometry\n */\nimport BaseObject from '../Object.js';\nimport {\n  createEmpty,\n  createOrUpdateEmpty,\n  getHeight,\n  returnOrUpdate,\n} from '../extent.js';\nimport {memoizeOne} from '../functions.js';\nimport {get as getProjection, getTransform} from '../proj.js';\nimport {\n  compose as composeTransform,\n  create as createTransform,\n} from '../transform.js';\nimport {abstract} from '../util.js';\nimport {transform2D} from './flat/transform.js';\n\n/**\n * @typedef {'XY' | 'XYZ' | 'XYM' | 'XYZM'} GeometryLayout\n * The coordinate layout for geometries, indicating whether a 3rd or 4th z ('Z')\n * or measure ('M') coordinate is available.\n */\n\n/**\n * @typedef {'Point' | 'LineString' | 'LinearRing' | 'Polygon' | 'MultiPoint' | 'MultiLineString' | 'MultiPolygon' | 'GeometryCollection' | 'Circle'} Type\n * The geometry type.  One of `'Point'`, `'LineString'`, `'LinearRing'`,\n * `'Polygon'`, `'MultiPoint'`, `'MultiLineString'`, `'MultiPolygon'`,\n * `'GeometryCollection'`, or `'Circle'`.\n */\n\n/**\n * @type {import(\"../transform.js\").Transform}\n */\nconst tmpTransform = createTransform();\n\n/** @type {import('../coordinate.js').Coordinate} */\nconst tmpPoint = [NaN, NaN];\n\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Base class for vector geometries.\n *\n * To get notified of changes to the geometry, register a listener for the\n * generic `change` event on your geometry instance.\n *\n * @abstract\n * @api\n */\nclass Geometry extends BaseObject {\n  constructor() {\n    super();\n\n    /**\n     * @private\n     * @type {import(\"../extent.js\").Extent}\n     */\n    this.extent_ = createEmpty();\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.extentRevision_ = -1;\n\n    /**\n     * @protected\n     * @type {number}\n     */\n    this.simplifiedGeometryMaxMinSquaredTolerance = 0;\n\n    /**\n     * @protected\n     * @type {number}\n     */\n    this.simplifiedGeometryRevision = 0;\n\n    /**\n     * Get a transformed and simplified version of the geometry.\n     * @abstract\n     * @param {number} revision The geometry revision.\n     * @param {number} squaredTolerance Squared tolerance.\n     * @param {import(\"../proj.js\").TransformFunction} [transform] Optional transform function.\n     * @return {Geometry} Simplified geometry.\n     */\n    this.simplifyTransformedInternal = memoizeOne(\n      (revision, squaredTolerance, transform) => {\n        if (!transform) {\n          return this.getSimplifiedGeometry(squaredTolerance);\n        }\n        const clone = this.clone();\n        clone.applyTransform(transform);\n        return clone.getSimplifiedGeometry(squaredTolerance);\n      },\n    );\n  }\n\n  /**\n   * Get a transformed and simplified version of the geometry.\n   * @abstract\n   * @param {number} squaredTolerance Squared tolerance.\n   * @param {import(\"../proj.js\").TransformFunction} [transform] Optional transform function.\n   * @return {Geometry} Simplified geometry.\n   */\n  simplifyTransformed(squaredTolerance, transform) {\n    return this.simplifyTransformedInternal(\n      this.getRevision(),\n      squaredTolerance,\n      transform,\n    );\n  }\n\n  /**\n   * Make a complete copy of the geometry.\n   * @abstract\n   * @return {!Geometry} Clone.\n   */\n  clone() {\n    return abstract();\n  }\n\n  /**\n   * @abstract\n   * @param {number} x X.\n   * @param {number} y Y.\n   * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n   * @param {number} minSquaredDistance Minimum squared distance.\n   * @return {number} Minimum squared distance.\n   */\n  closestPointXY(x, y, closestPoint, minSquaredDistance) {\n    return abstract();\n  }\n\n  /**\n   * @param {number} x X.\n   * @param {number} y Y.\n   * @return {boolean} Contains (x, y).\n   */\n  containsXY(x, y) {\n    return this.closestPointXY(x, y, tmpPoint, Number.MIN_VALUE) === 0;\n  }\n\n  /**\n   * Return the closest point of the geometry to the passed point as\n   * {@link module:ol/coordinate~Coordinate coordinate}.\n   * @param {import(\"../coordinate.js\").Coordinate} point Point.\n   * @param {import(\"../coordinate.js\").Coordinate} [closestPoint] Closest point.\n   * @return {import(\"../coordinate.js\").Coordinate} Closest point.\n   * @api\n   */\n  getClosestPoint(point, closestPoint) {\n    closestPoint = closestPoint ? closestPoint : [NaN, NaN];\n    this.closestPointXY(point[0], point[1], closestPoint, Infinity);\n    return closestPoint;\n  }\n\n  /**\n   * Returns true if this geometry includes the specified coordinate. If the\n   * coordinate is on the boundary of the geometry, returns false.\n   * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n   * @return {boolean} Contains coordinate.\n   * @api\n   */\n  intersectsCoordinate(coordinate) {\n    return this.containsXY(coordinate[0], coordinate[1]);\n  }\n\n  /**\n   * @abstract\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @protected\n   * @return {import(\"../extent.js\").Extent} extent Extent.\n   */\n  computeExtent(extent) {\n    return abstract();\n  }\n\n  /**\n   * Get the extent of the geometry.\n   * @param {import(\"../extent.js\").Extent} [extent] Extent.\n   * @return {import(\"../extent.js\").Extent} extent Extent.\n   * @api\n   */\n  getExtent(extent) {\n    if (this.extentRevision_ != this.getRevision()) {\n      const extent = this.computeExtent(this.extent_);\n      if (isNaN(extent[0]) || isNaN(extent[1])) {\n        createOrUpdateEmpty(extent);\n      }\n      this.extentRevision_ = this.getRevision();\n    }\n    return returnOrUpdate(this.extent_, extent);\n  }\n\n  /**\n   * Rotate the geometry around a given coordinate. This modifies the geometry\n   * coordinates in place.\n   * @abstract\n   * @param {number} angle Rotation angle in radians.\n   * @param {import(\"../coordinate.js\").Coordinate} anchor The rotation center.\n   * @api\n   */\n  rotate(angle, anchor) {\n    abstract();\n  }\n\n  /**\n   * Scale the geometry (with an optional origin).  This modifies the geometry\n   * coordinates in place.\n   * @abstract\n   * @param {number} sx The scaling factor in the x-direction.\n   * @param {number} [sy] The scaling factor in the y-direction (defaults to sx).\n   * @param {import(\"../coordinate.js\").Coordinate} [anchor] The scale origin (defaults to the center\n   *     of the geometry extent).\n   * @api\n   */\n  scale(sx, sy, anchor) {\n    abstract();\n  }\n\n  /**\n   * Create a simplified version of this geometry.  For linestrings, this uses\n   * the [Douglas Peucker](https://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm)\n   * algorithm.  For polygons, a quantization-based\n   * simplification is used to preserve topology.\n   * @param {number} tolerance The tolerance distance for simplification.\n   * @return {Geometry} A new, simplified version of the original geometry.\n   * @api\n   */\n  simplify(tolerance) {\n    return this.getSimplifiedGeometry(tolerance * tolerance);\n  }\n\n  /**\n   * Create a simplified version of this geometry using the Douglas Peucker\n   * algorithm.\n   * See https://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm.\n   * @abstract\n   * @param {number} squaredTolerance Squared tolerance.\n   * @return {Geometry} Simplified geometry.\n   */\n  getSimplifiedGeometry(squaredTolerance) {\n    return abstract();\n  }\n\n  /**\n   * Get the type of this geometry.\n   * @abstract\n   * @return {Type} Geometry type.\n   */\n  getType() {\n    return abstract();\n  }\n\n  /**\n   * Apply a transform function to the coordinates of the geometry.\n   * The geometry is modified in place.\n   * If you do not want the geometry modified in place, first `clone()` it and\n   * then use this function on the clone.\n   * @abstract\n   * @param {import(\"../proj.js\").TransformFunction} transformFn Transform function.\n   * Called with a flat array of geometry coordinates.\n   */\n  applyTransform(transformFn) {\n    abstract();\n  }\n\n  /**\n   * Test if the geometry and the passed extent intersect.\n   * @abstract\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @return {boolean} `true` if the geometry and the extent intersect.\n   */\n  intersectsExtent(extent) {\n    return abstract();\n  }\n\n  /**\n   * Translate the geometry.  This modifies the geometry coordinates in place.  If\n   * instead you want a new geometry, first `clone()` this geometry.\n   * @abstract\n   * @param {number} deltaX Delta X.\n   * @param {number} deltaY Delta Y.\n   * @api\n   */\n  translate(deltaX, deltaY) {\n    abstract();\n  }\n\n  /**\n   * Transform each coordinate of the geometry from one coordinate reference\n   * system to another. The geometry is modified in place.\n   * For example, a line will be transformed to a line and a circle to a circle.\n   * If you do not want the geometry modified in place, first `clone()` it and\n   * then use this function on the clone.\n   *\n   * @param {import(\"../proj.js\").ProjectionLike} source The current projection.  Can be a\n   *     string identifier or a {@link module:ol/proj/Projection~Projection} object.\n   * @param {import(\"../proj.js\").ProjectionLike} destination The desired projection.  Can be a\n   *     string identifier or a {@link module:ol/proj/Projection~Projection} object.\n   * @return {this} This geometry.  Note that original geometry is\n   *     modified in place.\n   * @api\n   */\n  transform(source, destination) {\n    /** @type {import(\"../proj/Projection.js\").default} */\n    const sourceProj = getProjection(source);\n    const transformFn =\n      sourceProj.getUnits() == 'tile-pixels'\n        ? function (inCoordinates, outCoordinates, stride) {\n            const pixelExtent = sourceProj.getExtent();\n            const projectedExtent = sourceProj.getWorldExtent();\n            const scale = getHeight(projectedExtent) / getHeight(pixelExtent);\n            composeTransform(\n              tmpTransform,\n              projectedExtent[0],\n              projectedExtent[3],\n              scale,\n              -scale,\n              0,\n              0,\n              0,\n            );\n            const transformed = transform2D(\n              inCoordinates,\n              0,\n              inCoordinates.length,\n              stride,\n              tmpTransform,\n              outCoordinates,\n            );\n            const projTransform = getTransform(sourceProj, destination);\n            if (projTransform) {\n              return projTransform(transformed, transformed, stride);\n            }\n            return transformed;\n          }\n        : getTransform(sourceProj, destination);\n    this.applyTransform(transformFn);\n    return this;\n  }\n}\n\nexport default Geometry;\n", "/**\n * @module ol/geom/SimpleGeometry\n */\nimport {createOrUpdateFromFlatCoordinates, getCenter} from '../extent.js';\nimport {abstract} from '../util.js';\nimport Geometry from './Geometry.js';\nimport {rotate, scale, transform2D, translate} from './flat/transform.js';\n\n/**\n * @classdesc\n * Abstract base class; only used for creating subclasses; do not instantiate\n * in apps, as cannot be rendered.\n *\n * @abstract\n * @api\n */\nclass SimpleGeometry extends Geometry {\n  constructor() {\n    super();\n\n    /**\n     * @protected\n     * @type {import(\"./Geometry.js\").GeometryLayout}\n     */\n    this.layout = 'XY';\n\n    /**\n     * @protected\n     * @type {number}\n     */\n    this.stride = 2;\n\n    /**\n     * @protected\n     * @type {Array<number>}\n     */\n    this.flatCoordinates;\n  }\n\n  /**\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @protected\n   * @return {import(\"../extent.js\").Extent} extent Extent.\n   * @override\n   */\n  computeExtent(extent) {\n    return createOrUpdateFromFlatCoordinates(\n      this.flatCoordinates,\n      0,\n      this.flatCoordinates.length,\n      this.stride,\n      extent,\n    );\n  }\n\n  /**\n   * @abstract\n   * @return {Array<*> | null} Coordinates.\n   */\n  getCoordinates() {\n    return abstract();\n  }\n\n  /**\n   * Return the first coordinate of the geometry.\n   * @return {import(\"../coordinate.js\").Coordinate} First coordinate.\n   * @api\n   */\n  getFirstCoordinate() {\n    return this.flatCoordinates.slice(0, this.stride);\n  }\n\n  /**\n   * @return {Array<number>} Flat coordinates.\n   */\n  getFlatCoordinates() {\n    return this.flatCoordinates;\n  }\n\n  /**\n   * Return the last coordinate of the geometry.\n   * @return {import(\"../coordinate.js\").Coordinate} Last point.\n   * @api\n   */\n  getLastCoordinate() {\n    return this.flatCoordinates.slice(\n      this.flatCoordinates.length - this.stride,\n    );\n  }\n\n  /**\n   * Return the {@link import(\"./Geometry.js\").GeometryLayout layout} of the geometry.\n   * @return {import(\"./Geometry.js\").GeometryLayout} Layout.\n   * @api\n   */\n  getLayout() {\n    return this.layout;\n  }\n\n  /**\n   * Create a simplified version of this geometry using the Douglas Peucker algorithm.\n   * @param {number} squaredTolerance Squared tolerance.\n   * @return {SimpleGeometry} Simplified geometry.\n   * @override\n   */\n  getSimplifiedGeometry(squaredTolerance) {\n    if (this.simplifiedGeometryRevision !== this.getRevision()) {\n      this.simplifiedGeometryMaxMinSquaredTolerance = 0;\n      this.simplifiedGeometryRevision = this.getRevision();\n    }\n    // If squaredTolerance is negative or if we know that simplification will not\n    // have any effect then just return this.\n    if (\n      squaredTolerance < 0 ||\n      (this.simplifiedGeometryMaxMinSquaredTolerance !== 0 &&\n        squaredTolerance <= this.simplifiedGeometryMaxMinSquaredTolerance)\n    ) {\n      return this;\n    }\n\n    const simplifiedGeometry =\n      this.getSimplifiedGeometryInternal(squaredTolerance);\n    const simplifiedFlatCoordinates = simplifiedGeometry.getFlatCoordinates();\n    if (simplifiedFlatCoordinates.length < this.flatCoordinates.length) {\n      return simplifiedGeometry;\n    }\n    // Simplification did not actually remove any coordinates.  We now know\n    // that any calls to getSimplifiedGeometry with a squaredTolerance less\n    // than or equal to the current squaredTolerance will also not have any\n    // effect.  This allows us to short circuit simplification (saving CPU\n    // cycles) and prevents the cache of simplified geometries from filling\n    // up with useless identical copies of this geometry (saving memory).\n    this.simplifiedGeometryMaxMinSquaredTolerance = squaredTolerance;\n    return this;\n  }\n\n  /**\n   * @param {number} squaredTolerance Squared tolerance.\n   * @return {SimpleGeometry} Simplified geometry.\n   * @protected\n   */\n  getSimplifiedGeometryInternal(squaredTolerance) {\n    return this;\n  }\n\n  /**\n   * @return {number} Stride.\n   */\n  getStride() {\n    return this.stride;\n  }\n\n  /**\n   * @param {import(\"./Geometry.js\").GeometryLayout} layout Layout.\n   * @param {Array<number>} flatCoordinates Flat coordinates.\n   */\n  setFlatCoordinates(layout, flatCoordinates) {\n    this.stride = getStrideForLayout(layout);\n    this.layout = layout;\n    this.flatCoordinates = flatCoordinates;\n  }\n\n  /**\n   * @abstract\n   * @param {!Array<*>} coordinates Coordinates.\n   * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n   */\n  setCoordinates(coordinates, layout) {\n    abstract();\n  }\n\n  /**\n   * @param {import(\"./Geometry.js\").GeometryLayout|undefined} layout Layout.\n   * @param {Array<*>} coordinates Coordinates.\n   * @param {number} nesting Nesting.\n   * @protected\n   */\n  setLayout(layout, coordinates, nesting) {\n    let stride;\n    if (layout) {\n      stride = getStrideForLayout(layout);\n    } else {\n      for (let i = 0; i < nesting; ++i) {\n        if (coordinates.length === 0) {\n          this.layout = 'XY';\n          this.stride = 2;\n          return;\n        }\n        coordinates = /** @type {Array<unknown>} */ (coordinates[0]);\n      }\n      stride = coordinates.length;\n      layout = getLayoutForStride(stride);\n    }\n    this.layout = layout;\n    this.stride = stride;\n  }\n\n  /**\n   * Apply a transform function to the coordinates of the geometry.\n   * The geometry is modified in place.\n   * If you do not want the geometry modified in place, first `clone()` it and\n   * then use this function on the clone.\n   * @param {import(\"../proj.js\").TransformFunction} transformFn Transform function.\n   * Called with a flat array of geometry coordinates.\n   * @api\n   * @override\n   */\n  applyTransform(transformFn) {\n    if (this.flatCoordinates) {\n      transformFn(\n        this.flatCoordinates,\n        this.flatCoordinates,\n        this.layout.startsWith('XYZ') ? 3 : 2,\n        this.stride,\n      );\n      this.changed();\n    }\n  }\n\n  /**\n   * Rotate the geometry around a given coordinate. This modifies the geometry\n   * coordinates in place.\n   * @param {number} angle Rotation angle in counter-clockwise radians.\n   * @param {import(\"../coordinate.js\").Coordinate} anchor The rotation center.\n   * @api\n   * @override\n   */\n  rotate(angle, anchor) {\n    const flatCoordinates = this.getFlatCoordinates();\n    if (flatCoordinates) {\n      const stride = this.getStride();\n      rotate(\n        flatCoordinates,\n        0,\n        flatCoordinates.length,\n        stride,\n        angle,\n        anchor,\n        flatCoordinates,\n      );\n      this.changed();\n    }\n  }\n\n  /**\n   * Scale the geometry (with an optional origin).  This modifies the geometry\n   * coordinates in place.\n   * @param {number} sx The scaling factor in the x-direction.\n   * @param {number} [sy] The scaling factor in the y-direction (defaults to sx).\n   * @param {import(\"../coordinate.js\").Coordinate} [anchor] The scale origin (defaults to the center\n   *     of the geometry extent).\n   * @api\n   * @override\n   */\n  scale(sx, sy, anchor) {\n    if (sy === undefined) {\n      sy = sx;\n    }\n    if (!anchor) {\n      anchor = getCenter(this.getExtent());\n    }\n    const flatCoordinates = this.getFlatCoordinates();\n    if (flatCoordinates) {\n      const stride = this.getStride();\n      scale(\n        flatCoordinates,\n        0,\n        flatCoordinates.length,\n        stride,\n        sx,\n        sy,\n        anchor,\n        flatCoordinates,\n      );\n      this.changed();\n    }\n  }\n\n  /**\n   * Translate the geometry.  This modifies the geometry coordinates in place.  If\n   * instead you want a new geometry, first `clone()` this geometry.\n   * @param {number} deltaX Delta X.\n   * @param {number} deltaY Delta Y.\n   * @api\n   * @override\n   */\n  translate(deltaX, deltaY) {\n    const flatCoordinates = this.getFlatCoordinates();\n    if (flatCoordinates) {\n      const stride = this.getStride();\n      translate(\n        flatCoordinates,\n        0,\n        flatCoordinates.length,\n        stride,\n        deltaX,\n        deltaY,\n        flatCoordinates,\n      );\n      this.changed();\n    }\n  }\n}\n\n/**\n * @param {number} stride Stride.\n * @return {import(\"./Geometry.js\").GeometryLayout} layout Layout.\n */\nexport function getLayoutForStride(stride) {\n  let layout;\n  if (stride == 2) {\n    layout = 'XY';\n  } else if (stride == 3) {\n    layout = 'XYZ';\n  } else if (stride == 4) {\n    layout = 'XYZM';\n  }\n  return /** @type {import(\"./Geometry.js\").GeometryLayout} */ (layout);\n}\n\n/**\n * @param {import(\"./Geometry.js\").GeometryLayout} layout Layout.\n * @return {number} Stride.\n */\nexport function getStrideForLayout(layout) {\n  let stride;\n  if (layout == 'XY') {\n    stride = 2;\n  } else if (layout == 'XYZ' || layout == 'XYM') {\n    stride = 3;\n  } else if (layout == 'XYZM') {\n    stride = 4;\n  }\n  return /** @type {number} */ (stride);\n}\n\n/**\n * @param {SimpleGeometry} simpleGeometry Simple geometry.\n * @param {import(\"../transform.js\").Transform} transform Transform.\n * @param {Array<number>} [dest] Destination.\n * @return {Array<number>} Transformed flat coordinates.\n */\nexport function transformGeom2D(simpleGeometry, transform, dest) {\n  const flatCoordinates = simpleGeometry.getFlatCoordinates();\n  if (!flatCoordinates) {\n    return null;\n  }\n  const stride = simpleGeometry.getStride();\n  return transform2D(\n    flatCoordinates,\n    0,\n    flatCoordinates.length,\n    stride,\n    transform,\n    dest,\n  );\n}\n\nexport default SimpleGeometry;\n", "/**\n * @module ol/geom/flat/closest\n */\nimport {lerp, squaredDistance as squaredDx} from '../../math.js';\n\n/**\n * Returns the point on the 2D line segment flatCoordinates[offset1] to\n * flatCoordinates[offset2] that is closest to the point (x, y).  Extra\n * dimensions are linearly interpolated.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset1 Offset 1.\n * @param {number} offset2 Offset 2.\n * @param {number} stride Stride.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {Array<number>} closestPoint Closest point.\n */\nfunction assignClosest(\n  flatCoordinates,\n  offset1,\n  offset2,\n  stride,\n  x,\n  y,\n  closestPoint,\n) {\n  const x1 = flatCoordinates[offset1];\n  const y1 = flatCoordinates[offset1 + 1];\n  const dx = flatCoordinates[offset2] - x1;\n  const dy = flatCoordinates[offset2 + 1] - y1;\n  let offset;\n  if (dx === 0 && dy === 0) {\n    offset = offset1;\n  } else {\n    const t = ((x - x1) * dx + (y - y1) * dy) / (dx * dx + dy * dy);\n    if (t > 1) {\n      offset = offset2;\n    } else if (t > 0) {\n      for (let i = 0; i < stride; ++i) {\n        closestPoint[i] = lerp(\n          flatCoordinates[offset1 + i],\n          flatCoordinates[offset2 + i],\n          t,\n        );\n      }\n      closestPoint.length = stride;\n      return;\n    } else {\n      offset = offset1;\n    }\n  }\n  for (let i = 0; i < stride; ++i) {\n    closestPoint[i] = flatCoordinates[offset + i];\n  }\n  closestPoint.length = stride;\n}\n\n/**\n * Return the squared of the largest distance between any pair of consecutive\n * coordinates.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} max Max squared delta.\n * @return {number} Max squared delta.\n */\nexport function maxSquaredDelta(flatCoordinates, offset, end, stride, max) {\n  let x1 = flatCoordinates[offset];\n  let y1 = flatCoordinates[offset + 1];\n  for (offset += stride; offset < end; offset += stride) {\n    const x2 = flatCoordinates[offset];\n    const y2 = flatCoordinates[offset + 1];\n    const squaredDelta = squaredDx(x1, y1, x2, y2);\n    if (squaredDelta > max) {\n      max = squaredDelta;\n    }\n    x1 = x2;\n    y1 = y2;\n  }\n  return max;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {number} max Max squared delta.\n * @return {number} Max squared delta.\n */\nexport function arrayMaxSquaredDelta(\n  flatCoordinates,\n  offset,\n  ends,\n  stride,\n  max,\n) {\n  for (let i = 0, ii = ends.length; i < ii; ++i) {\n    const end = ends[i];\n    max = maxSquaredDelta(flatCoordinates, offset, end, stride, max);\n    offset = end;\n  }\n  return max;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @param {number} max Max squared delta.\n * @return {number} Max squared delta.\n */\nexport function multiArrayMaxSquaredDelta(\n  flatCoordinates,\n  offset,\n  endss,\n  stride,\n  max,\n) {\n  for (let i = 0, ii = endss.length; i < ii; ++i) {\n    const ends = endss[i];\n    max = arrayMaxSquaredDelta(flatCoordinates, offset, ends, stride, max);\n    offset = ends[ends.length - 1];\n  }\n  return max;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} maxDelta Max delta.\n * @param {boolean} isRing Is ring.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {Array<number>} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @param {Array<number>} [tmpPoint] Temporary point object.\n * @return {number} Minimum squared distance.\n */\nexport function assignClosestPoint(\n  flatCoordinates,\n  offset,\n  end,\n  stride,\n  maxDelta,\n  isRing,\n  x,\n  y,\n  closestPoint,\n  minSquaredDistance,\n  tmpPoint,\n) {\n  if (offset == end) {\n    return minSquaredDistance;\n  }\n  let i, squaredDistance;\n  if (maxDelta === 0) {\n    // All points are identical, so just test the first point.\n    squaredDistance = squaredDx(\n      x,\n      y,\n      flatCoordinates[offset],\n      flatCoordinates[offset + 1],\n    );\n    if (squaredDistance < minSquaredDistance) {\n      for (i = 0; i < stride; ++i) {\n        closestPoint[i] = flatCoordinates[offset + i];\n      }\n      closestPoint.length = stride;\n      return squaredDistance;\n    }\n    return minSquaredDistance;\n  }\n  tmpPoint = tmpPoint ? tmpPoint : [NaN, NaN];\n  let index = offset + stride;\n  while (index < end) {\n    assignClosest(\n      flatCoordinates,\n      index - stride,\n      index,\n      stride,\n      x,\n      y,\n      tmpPoint,\n    );\n    squaredDistance = squaredDx(x, y, tmpPoint[0], tmpPoint[1]);\n    if (squaredDistance < minSquaredDistance) {\n      minSquaredDistance = squaredDistance;\n      for (i = 0; i < stride; ++i) {\n        closestPoint[i] = tmpPoint[i];\n      }\n      closestPoint.length = stride;\n      index += stride;\n    } else {\n      // Skip ahead multiple points, because we know that all the skipped\n      // points cannot be any closer than the closest point we have found so\n      // far.  We know this because we know how close the current point is, how\n      // close the closest point we have found so far is, and the maximum\n      // distance between consecutive points.  For example, if we're currently\n      // at distance 10, the best we've found so far is 3, and that the maximum\n      // distance between consecutive points is 2, then we'll need to skip at\n      // least (10 - 3) / 2 == 3 (rounded down) points to have any chance of\n      // finding a closer point.  We use Math.max(..., 1) to ensure that we\n      // always advance at least one point, to avoid an infinite loop.\n      index +=\n        stride *\n        Math.max(\n          ((Math.sqrt(squaredDistance) - Math.sqrt(minSquaredDistance)) /\n            maxDelta) |\n            0,\n          1,\n        );\n    }\n  }\n  if (isRing) {\n    // Check the closing segment.\n    assignClosest(\n      flatCoordinates,\n      end - stride,\n      offset,\n      stride,\n      x,\n      y,\n      tmpPoint,\n    );\n    squaredDistance = squaredDx(x, y, tmpPoint[0], tmpPoint[1]);\n    if (squaredDistance < minSquaredDistance) {\n      minSquaredDistance = squaredDistance;\n      for (i = 0; i < stride; ++i) {\n        closestPoint[i] = tmpPoint[i];\n      }\n      closestPoint.length = stride;\n    }\n  }\n  return minSquaredDistance;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {number} maxDelta Max delta.\n * @param {boolean} isRing Is ring.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {Array<number>} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @param {Array<number>} [tmpPoint] Temporary point object.\n * @return {number} Minimum squared distance.\n */\nexport function assignClosestArrayPoint(\n  flatCoordinates,\n  offset,\n  ends,\n  stride,\n  maxDelta,\n  isRing,\n  x,\n  y,\n  closestPoint,\n  minSquaredDistance,\n  tmpPoint,\n) {\n  tmpPoint = tmpPoint ? tmpPoint : [NaN, NaN];\n  for (let i = 0, ii = ends.length; i < ii; ++i) {\n    const end = ends[i];\n    minSquaredDistance = assignClosestPoint(\n      flatCoordinates,\n      offset,\n      end,\n      stride,\n      maxDelta,\n      isRing,\n      x,\n      y,\n      closestPoint,\n      minSquaredDistance,\n      tmpPoint,\n    );\n    offset = end;\n  }\n  return minSquaredDistance;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @param {number} maxDelta Max delta.\n * @param {boolean} isRing Is ring.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {Array<number>} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @param {Array<number>} [tmpPoint] Temporary point object.\n * @return {number} Minimum squared distance.\n */\nexport function assignClosestMultiArrayPoint(\n  flatCoordinates,\n  offset,\n  endss,\n  stride,\n  maxDelta,\n  isRing,\n  x,\n  y,\n  closestPoint,\n  minSquaredDistance,\n  tmpPoint,\n) {\n  tmpPoint = tmpPoint ? tmpPoint : [NaN, NaN];\n  for (let i = 0, ii = endss.length; i < ii; ++i) {\n    const ends = endss[i];\n    minSquaredDistance = assignClosestArrayPoint(\n      flatCoordinates,\n      offset,\n      ends,\n      stride,\n      maxDelta,\n      isRing,\n      x,\n      y,\n      closestPoint,\n      minSquaredDistance,\n      tmpPoint,\n    );\n    offset = ends[ends.length - 1];\n  }\n  return minSquaredDistance;\n}\n", "/**\n * @module ol/geom/flat/deflate\n */\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {import(\"../../coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {number} stride Stride.\n * @return {number} offset Offset.\n */\nexport function deflateCoordinate(flatCoordinates, offset, coordinate, stride) {\n  for (let i = 0, ii = coordinate.length; i < ii; ++i) {\n    flatCoordinates[offset++] = coordinate[i];\n  }\n  return offset;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<import(\"../../coordinate.js\").Coordinate>} coordinates Coordinates.\n * @param {number} stride Stride.\n * @return {number} offset Offset.\n */\nexport function deflateCoordinates(\n  flatCoordinates,\n  offset,\n  coordinates,\n  stride,\n) {\n  for (let i = 0, ii = coordinates.length; i < ii; ++i) {\n    const coordinate = coordinates[i];\n    for (let j = 0; j < stride; ++j) {\n      flatCoordinates[offset++] = coordinate[j];\n    }\n  }\n  return offset;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<import(\"../../coordinate.js\").Coordinate>>} coordinatess Coordinatess.\n * @param {number} stride Stride.\n * @param {Array<number>} [ends] Ends.\n * @return {Array<number>} Ends.\n */\nexport function deflateCoordinatesArray(\n  flatCoordinates,\n  offset,\n  coordinatess,\n  stride,\n  ends,\n) {\n  ends = ends ? ends : [];\n  let i = 0;\n  for (let j = 0, jj = coordinatess.length; j < jj; ++j) {\n    const end = deflateCoordinates(\n      flatCoordinates,\n      offset,\n      coordinatess[j],\n      stride,\n    );\n    ends[i++] = end;\n    offset = end;\n  }\n  ends.length = i;\n  return ends;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<Array<import(\"../../coordinate.js\").Coordinate>>>} coordinatesss Coordinatesss.\n * @param {number} stride Stride.\n * @param {Array<Array<number>>} [endss] Endss.\n * @return {Array<Array<number>>} Endss.\n */\nexport function deflateMultiCoordinatesArray(\n  flatCoordinates,\n  offset,\n  coordinatesss,\n  stride,\n  endss,\n) {\n  endss = endss ? endss : [];\n  let i = 0;\n  for (let j = 0, jj = coordinatesss.length; j < jj; ++j) {\n    const ends = deflateCoordinatesArray(\n      flatCoordinates,\n      offset,\n      coordinatesss[j],\n      stride,\n      endss[i],\n    );\n    if (ends.length === 0) {\n      ends[0] = offset;\n    }\n    endss[i++] = ends;\n    offset = ends[ends.length - 1];\n  }\n  endss.length = i;\n  return endss;\n}\n", "/**\n * @module ol/geom/flat/inflate\n */\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {Array<import(\"../../coordinate.js\").Coordinate>} [coordinates] Coordinates.\n * @return {Array<import(\"../../coordinate.js\").Coordinate>} Coordinates.\n */\nexport function inflateCoordinates(\n  flatCoordinates,\n  offset,\n  end,\n  stride,\n  coordinates,\n) {\n  coordinates = coordinates !== undefined ? coordinates : [];\n  let i = 0;\n  for (let j = offset; j < end; j += stride) {\n    coordinates[i++] = flatCoordinates.slice(j, j + stride);\n  }\n  coordinates.length = i;\n  return coordinates;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {Array<Array<import(\"../../coordinate.js\").Coordinate>>} [coordinatess] Coordinatess.\n * @return {Array<Array<import(\"../../coordinate.js\").Coordinate>>} Coordinatess.\n */\nexport function inflateCoordinatesArray(\n  flatCoordinates,\n  offset,\n  ends,\n  stride,\n  coordinatess,\n) {\n  coordinatess = coordinatess !== undefined ? coordinatess : [];\n  let i = 0;\n  for (let j = 0, jj = ends.length; j < jj; ++j) {\n    const end = ends[j];\n    coordinatess[i++] = inflateCoordinates(\n      flatCoordinates,\n      offset,\n      end,\n      stride,\n      coordinatess[i],\n    );\n    offset = end;\n  }\n  coordinatess.length = i;\n  return coordinatess;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @param {Array<Array<Array<import(\"../../coordinate.js\").Coordinate>>>} [coordinatesss]\n *     Coordinatesss.\n * @return {Array<Array<Array<import(\"../../coordinate.js\").Coordinate>>>} Coordinatesss.\n */\nexport function inflateMultiCoordinatesArray(\n  flatCoordinates,\n  offset,\n  endss,\n  stride,\n  coordinatesss,\n) {\n  coordinatesss = coordinatesss !== undefined ? coordinatesss : [];\n  let i = 0;\n  for (let j = 0, jj = endss.length; j < jj; ++j) {\n    const ends = endss[j];\n    coordinatesss[i++] =\n      ends.length === 1 && ends[0] === offset\n        ? []\n        : inflateCoordinatesArray(\n            flatCoordinates,\n            offset,\n            ends,\n            stride,\n            coordinatesss[i],\n          );\n    offset = ends[ends.length - 1];\n  }\n  coordinatesss.length = i;\n  return coordinatesss;\n}\n", "/**\n * @module ol/geom/flat/interpolate\n */\nimport {binarySearch} from '../../array.js';\nimport {lerp} from '../../math.js';\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} fraction Fraction.\n * @param {Array<number>} [dest] Destination.\n * @param {number} [dimension] Destination dimension (default is `2`)\n * @return {Array<number>} Destination.\n */\nexport function interpolatePoint(\n  flatCoordinates,\n  offset,\n  end,\n  stride,\n  fraction,\n  dest,\n  dimension,\n) {\n  let o, t;\n  const n = (end - offset) / stride;\n  if (n === 1) {\n    o = offset;\n  } else if (n === 2) {\n    o = offset;\n    t = fraction;\n  } else if (n !== 0) {\n    let x1 = flatCoordinates[offset];\n    let y1 = flatCoordinates[offset + 1];\n    let length = 0;\n    const cumulativeLengths = [0];\n    for (let i = offset + stride; i < end; i += stride) {\n      const x2 = flatCoordinates[i];\n      const y2 = flatCoordinates[i + 1];\n      length += Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));\n      cumulativeLengths.push(length);\n      x1 = x2;\n      y1 = y2;\n    }\n    const target = fraction * length;\n    const index = binarySearch(cumulativeLengths, target);\n    if (index < 0) {\n      t =\n        (target - cumulativeLengths[-index - 2]) /\n        (cumulativeLengths[-index - 1] - cumulativeLengths[-index - 2]);\n      o = offset + (-index - 2) * stride;\n    } else {\n      o = offset + index * stride;\n    }\n  }\n  dimension = dimension > 1 ? dimension : 2;\n  dest = dest ? dest : new Array(dimension);\n  for (let i = 0; i < dimension; ++i) {\n    dest[i] =\n      o === undefined\n        ? NaN\n        : t === undefined\n          ? flatCoordinates[o + i]\n          : lerp(flatCoordinates[o + i], flatCoordinates[o + stride + i], t);\n  }\n  return dest;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} m M.\n * @param {boolean} extrapolate Extrapolate.\n * @return {import(\"../../coordinate.js\").Coordinate|null} Coordinate.\n */\nexport function lineStringCoordinateAtM(\n  flatCoordinates,\n  offset,\n  end,\n  stride,\n  m,\n  extrapolate,\n) {\n  if (end == offset) {\n    return null;\n  }\n  let coordinate;\n  if (m < flatCoordinates[offset + stride - 1]) {\n    if (extrapolate) {\n      coordinate = flatCoordinates.slice(offset, offset + stride);\n      coordinate[stride - 1] = m;\n      return coordinate;\n    }\n    return null;\n  }\n  if (flatCoordinates[end - 1] < m) {\n    if (extrapolate) {\n      coordinate = flatCoordinates.slice(end - stride, end);\n      coordinate[stride - 1] = m;\n      return coordinate;\n    }\n    return null;\n  }\n  // FIXME use O(1) search\n  if (m == flatCoordinates[offset + stride - 1]) {\n    return flatCoordinates.slice(offset, offset + stride);\n  }\n  let lo = offset / stride;\n  let hi = end / stride;\n  while (lo < hi) {\n    const mid = (lo + hi) >> 1;\n    if (m < flatCoordinates[(mid + 1) * stride - 1]) {\n      hi = mid;\n    } else {\n      lo = mid + 1;\n    }\n  }\n  const m0 = flatCoordinates[lo * stride - 1];\n  if (m == m0) {\n    return flatCoordinates.slice((lo - 1) * stride, (lo - 1) * stride + stride);\n  }\n  const m1 = flatCoordinates[(lo + 1) * stride - 1];\n  const t = (m - m0) / (m1 - m0);\n  coordinate = [];\n  for (let i = 0; i < stride - 1; ++i) {\n    coordinate.push(\n      lerp(\n        flatCoordinates[(lo - 1) * stride + i],\n        flatCoordinates[lo * stride + i],\n        t,\n      ),\n    );\n  }\n  coordinate.push(m);\n  return coordinate;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {number} m M.\n * @param {boolean} extrapolate Extrapolate.\n * @param {boolean} interpolate Interpolate.\n * @return {import(\"../../coordinate.js\").Coordinate|null} Coordinate.\n */\nexport function lineStringsCoordinateAtM(\n  flatCoordinates,\n  offset,\n  ends,\n  stride,\n  m,\n  extrapolate,\n  interpolate,\n) {\n  if (interpolate) {\n    return lineStringCoordinateAtM(\n      flatCoordinates,\n      offset,\n      ends[ends.length - 1],\n      stride,\n      m,\n      extrapolate,\n    );\n  }\n  let coordinate;\n  if (m < flatCoordinates[stride - 1]) {\n    if (extrapolate) {\n      coordinate = flatCoordinates.slice(0, stride);\n      coordinate[stride - 1] = m;\n      return coordinate;\n    }\n    return null;\n  }\n  if (flatCoordinates[flatCoordinates.length - 1] < m) {\n    if (extrapolate) {\n      coordinate = flatCoordinates.slice(flatCoordinates.length - stride);\n      coordinate[stride - 1] = m;\n      return coordinate;\n    }\n    return null;\n  }\n  for (let i = 0, ii = ends.length; i < ii; ++i) {\n    const end = ends[i];\n    if (offset == end) {\n      continue;\n    }\n    if (m < flatCoordinates[offset + stride - 1]) {\n      return null;\n    }\n    if (m <= flatCoordinates[end - 1]) {\n      return lineStringCoordinateAtM(\n        flatCoordinates,\n        offset,\n        end,\n        stride,\n        m,\n        false,\n      );\n    }\n    offset = end;\n  }\n  return null;\n}\n", "/**\n * @module ol/geom/flat/contains\n */\nimport {forEachCorner} from '../../extent.js';\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} Contains extent.\n */\nexport function linearRingContainsExtent(\n  flatCoordinates,\n  offset,\n  end,\n  stride,\n  extent,\n) {\n  const outside = forEachCorner(\n    extent,\n    /**\n     * @param {import(\"../../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @return {boolean} Contains (x, y).\n     */\n    function (coordinate) {\n      return !linearRingContainsXY(\n        flatCoordinates,\n        offset,\n        end,\n        stride,\n        coordinate[0],\n        coordinate[1],\n      );\n    },\n  );\n  return !outside;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} x X.\n * @param {number} y Y.\n * @return {boolean} Contains (x, y).\n */\nexport function linearRingContainsXY(\n  flatCoordinates,\n  offset,\n  end,\n  stride,\n  x,\n  y,\n) {\n  // https://web.archive.org/web/20210504233957/http://geomalgorithms.com/a03-_inclusion.html\n  // Copyright 2000 softSurfer, 2012 Dan Sunday\n  // This code may be freely used and modified for any purpose\n  // providing that this copyright notice is included with it.\n  // SoftSurfer makes no warranty for this code, and cannot be held\n  // liable for any real or imagined damage resulting from its use.\n  // Users of this code must verify correctness for their application.\n  let wn = 0;\n  let x1 = flatCoordinates[end - stride];\n  let y1 = flatCoordinates[end - stride + 1];\n  for (; offset < end; offset += stride) {\n    const x2 = flatCoordinates[offset];\n    const y2 = flatCoordinates[offset + 1];\n    if (y1 <= y) {\n      if (y2 > y && (x2 - x1) * (y - y1) - (x - x1) * (y2 - y1) > 0) {\n        wn++;\n      }\n    } else if (y2 <= y && (x2 - x1) * (y - y1) - (x - x1) * (y2 - y1) < 0) {\n      wn--;\n    }\n    x1 = x2;\n    y1 = y2;\n  }\n  return wn !== 0;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {number} x X.\n * @param {number} y Y.\n * @return {boolean} Contains (x, y).\n */\nexport function linearRingsContainsXY(\n  flatCoordinates,\n  offset,\n  ends,\n  stride,\n  x,\n  y,\n) {\n  if (ends.length === 0) {\n    return false;\n  }\n  if (!linearRingContainsXY(flatCoordinates, offset, ends[0], stride, x, y)) {\n    return false;\n  }\n  for (let i = 1, ii = ends.length; i < ii; ++i) {\n    if (\n      linearRingContainsXY(flatCoordinates, ends[i - 1], ends[i], stride, x, y)\n    ) {\n      return false;\n    }\n  }\n  return true;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @param {number} x X.\n * @param {number} y Y.\n * @return {boolean} Contains (x, y).\n */\nexport function linearRingssContainsXY(\n  flatCoordinates,\n  offset,\n  endss,\n  stride,\n  x,\n  y,\n) {\n  if (endss.length === 0) {\n    return false;\n  }\n  for (let i = 0, ii = endss.length; i < ii; ++i) {\n    const ends = endss[i];\n    if (linearRingsContainsXY(flatCoordinates, offset, ends, stride, x, y)) {\n      return true;\n    }\n    offset = ends[ends.length - 1];\n  }\n  return false;\n}\n", "/**\n * @module ol/geom/flat/segments\n */\n\n/**\n * This function calls `callback` for each segment of the flat coordinates\n * array. If the callback returns a truthy value the function returns that\n * value immediately. Otherwise the function returns `false`.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {function(import(\"../../coordinate.js\").Coordinate, import(\"../../coordinate.js\").Coordinate): T} callback Function\n *     called for each segment.\n * @return {T|boolean} Value.\n * @template T\n */\nexport function forEach(flatCoordinates, offset, end, stride, callback) {\n  let ret;\n  offset += stride;\n  for (; offset < end; offset += stride) {\n    ret = callback(\n      flatCoordinates.slice(offset - stride, offset),\n      flatCoordinates.slice(offset, offset + stride),\n    );\n    if (ret) {\n      return ret;\n    }\n  }\n  return false;\n}\n\n/**\n * Calculate the intersection point of two line segments.\n * Reference: https://stackoverflow.com/a/72474223/2389327\n * @param {Array<import(\"../../coordinate.js\").Coordinate>} segment1 The first line segment as an array of two points.\n * @param {Array<import(\"../../coordinate.js\").Coordinate>} segment2 The second line segment as an array of two points.\n * @return {import(\"../../coordinate.js\").Coordinate|undefined} The intersection point or `undefined` if no intersection.\n */\nexport function getIntersectionPoint(segment1, segment2) {\n  const [a, b] = segment1;\n  const [c, d] = segment2;\n  const t =\n    ((a[0] - c[0]) * (c[1] - d[1]) - (a[1] - c[1]) * (c[0] - d[0])) /\n    ((a[0] - b[0]) * (c[1] - d[1]) - (a[1] - b[1]) * (c[0] - d[0]));\n  const u =\n    ((a[0] - c[0]) * (a[1] - b[1]) - (a[1] - c[1]) * (a[0] - b[0])) /\n    ((a[0] - b[0]) * (c[1] - d[1]) - (a[1] - b[1]) * (c[0] - d[0]));\n\n  // Check if lines actually intersect\n  if (0 <= t && t <= 1 && 0 <= u && u <= 1) {\n    return [a[0] + t * (b[0] - a[0]), a[1] + t * (b[1] - a[1])];\n  }\n  return undefined;\n}\n", "/**\n * @module ol/geom/flat/intersectsextent\n */\nimport {\n  createEmpty,\n  extendFlatCoordinates,\n  intersects,\n  intersectsSegment,\n} from '../../extent.js';\nimport {linearRingContainsExtent, linearRingContainsXY} from './contains.js';\nimport {forEach as forEachSegment} from './segments.js';\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @param {import('../../extent.js').Extent} [coordinatesExtent] Coordinates extent\n * @return {boolean} True if the geometry and the extent intersect.\n */\nexport function intersectsLineString(\n  flatCoordinates,\n  offset,\n  end,\n  stride,\n  extent,\n  coordinatesExtent,\n) {\n  coordinatesExtent =\n    coordinatesExtent ??\n    extendFlatCoordinates(createEmpty(), flatCoordinates, offset, end, stride);\n  if (!intersects(extent, coordinatesExtent)) {\n    return false;\n  }\n  if (\n    (coordinatesExtent[0] >= extent[0] && coordinatesExtent[2] <= extent[2]) ||\n    (coordinatesExtent[1] >= extent[1] && coordinatesExtent[3] <= extent[3])\n  ) {\n    return true;\n  }\n  return forEachSegment(\n    flatCoordinates,\n    offset,\n    end,\n    stride,\n    /**\n     * @param {import(\"../../coordinate.js\").Coordinate} point1 Start point.\n     * @param {import(\"../../coordinate.js\").Coordinate} point2 End point.\n     * @return {boolean} `true` if the segment and the extent intersect,\n     *     `false` otherwise.\n     */\n    function (point1, point2) {\n      return intersectsSegment(extent, point1, point2);\n    },\n  );\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} True if the geometry and the extent intersect.\n */\nexport function intersectsLineStringArray(\n  flatCoordinates,\n  offset,\n  ends,\n  stride,\n  extent,\n) {\n  for (let i = 0, ii = ends.length; i < ii; ++i) {\n    if (\n      intersectsLineString(flatCoordinates, offset, ends[i], stride, extent)\n    ) {\n      return true;\n    }\n    offset = ends[i];\n  }\n  return false;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} True if the geometry and the extent intersect.\n */\nexport function intersectsLinearRing(\n  flatCoordinates,\n  offset,\n  end,\n  stride,\n  extent,\n) {\n  if (intersectsLineString(flatCoordinates, offset, end, stride, extent)) {\n    return true;\n  }\n  if (\n    linearRingContainsXY(\n      flatCoordinates,\n      offset,\n      end,\n      stride,\n      extent[0],\n      extent[1],\n    )\n  ) {\n    return true;\n  }\n  if (\n    linearRingContainsXY(\n      flatCoordinates,\n      offset,\n      end,\n      stride,\n      extent[0],\n      extent[3],\n    )\n  ) {\n    return true;\n  }\n  if (\n    linearRingContainsXY(\n      flatCoordinates,\n      offset,\n      end,\n      stride,\n      extent[2],\n      extent[1],\n    )\n  ) {\n    return true;\n  }\n  if (\n    linearRingContainsXY(\n      flatCoordinates,\n      offset,\n      end,\n      stride,\n      extent[2],\n      extent[3],\n    )\n  ) {\n    return true;\n  }\n  return false;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} True if the geometry and the extent intersect.\n */\nexport function intersectsLinearRingArray(\n  flatCoordinates,\n  offset,\n  ends,\n  stride,\n  extent,\n) {\n  if (!intersectsLinearRing(flatCoordinates, offset, ends[0], stride, extent)) {\n    return false;\n  }\n  if (ends.length === 1) {\n    return true;\n  }\n  for (let i = 1, ii = ends.length; i < ii; ++i) {\n    if (\n      linearRingContainsExtent(\n        flatCoordinates,\n        ends[i - 1],\n        ends[i],\n        stride,\n        extent,\n      )\n    ) {\n      if (\n        !intersectsLineString(\n          flatCoordinates,\n          ends[i - 1],\n          ends[i],\n          stride,\n          extent,\n        )\n      ) {\n        return false;\n      }\n    }\n  }\n  return true;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} True if the geometry and the extent intersect.\n */\nexport function intersectsLinearRingMultiArray(\n  flatCoordinates,\n  offset,\n  endss,\n  stride,\n  extent,\n) {\n  for (let i = 0, ii = endss.length; i < ii; ++i) {\n    const ends = endss[i];\n    if (\n      intersectsLinearRingArray(flatCoordinates, offset, ends, stride, extent)\n    ) {\n      return true;\n    }\n    offset = ends[ends.length - 1];\n  }\n  return false;\n}\n", "/**\n * @module ol/geom/flat/length\n */\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {number} Length.\n */\nexport function lineStringLength(flatCoordinates, offset, end, stride) {\n  let x1 = flatCoordinates[offset];\n  let y1 = flatCoordinates[offset + 1];\n  let length = 0;\n  for (let i = offset + stride; i < end; i += stride) {\n    const x2 = flatCoordinates[i];\n    const y2 = flatCoordinates[i + 1];\n    length += Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));\n    x1 = x2;\n    y1 = y2;\n  }\n  return length;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {number} Perimeter.\n */\nexport function linearRingLength(flatCoordinates, offset, end, stride) {\n  let perimeter = lineStringLength(flatCoordinates, offset, end, stride);\n  const dx = flatCoordinates[end - stride] - flatCoordinates[offset];\n  const dy = flatCoordinates[end - stride + 1] - flatCoordinates[offset + 1];\n  perimeter += Math.sqrt(dx * dx + dy * dy);\n  return perimeter;\n}\n", "/**\n * @module ol/geom/flat/simplify\n */\n// Based on simplify-js https://github.com/mourner/simplify-js\n// Copyright (c) 2012, Vladimir Agafonkin\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n//    1. Redistributions of source code must retain the above copyright notice,\n//       this list of conditions and the following disclaimer.\n//\n//    2. Redistributions in binary form must reproduce the above copyright\n//       notice, this list of conditions and the following disclaimer in the\n//       documentation and/or other materials provided with the distribution.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n\nimport {squaredDistance, squaredSegmentDistance} from '../../math.js';\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {boolean} highQuality Highest quality.\n * @param {Array<number>} [simplifiedFlatCoordinates] Simplified flat\n *     coordinates.\n * @return {Array<number>} Simplified line string.\n */\nexport function simplifyLineString(\n  flatCoordinates,\n  offset,\n  end,\n  stride,\n  squaredTolerance,\n  highQuality,\n  simplifiedFlatCoordinates,\n) {\n  simplifiedFlatCoordinates =\n    simplifiedFlatCoordinates !== undefined ? simplifiedFlatCoordinates : [];\n  if (!highQuality) {\n    end = radialDistance(\n      flatCoordinates,\n      offset,\n      end,\n      stride,\n      squaredTolerance,\n      simplifiedFlatCoordinates,\n      0,\n    );\n    flatCoordinates = simplifiedFlatCoordinates;\n    offset = 0;\n    stride = 2;\n  }\n  simplifiedFlatCoordinates.length = douglasPeucker(\n    flatCoordinates,\n    offset,\n    end,\n    stride,\n    squaredTolerance,\n    simplifiedFlatCoordinates,\n    0,\n  );\n  return simplifiedFlatCoordinates;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {Array<number>} simplifiedFlatCoordinates Simplified flat\n *     coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @return {number} Simplified offset.\n */\nexport function douglasPeucker(\n  flatCoordinates,\n  offset,\n  end,\n  stride,\n  squaredTolerance,\n  simplifiedFlatCoordinates,\n  simplifiedOffset,\n) {\n  const n = (end - offset) / stride;\n  if (n < 3) {\n    for (; offset < end; offset += stride) {\n      simplifiedFlatCoordinates[simplifiedOffset++] = flatCoordinates[offset];\n      simplifiedFlatCoordinates[simplifiedOffset++] =\n        flatCoordinates[offset + 1];\n    }\n    return simplifiedOffset;\n  }\n  /** @type {Array<number>} */\n  const markers = new Array(n);\n  markers[0] = 1;\n  markers[n - 1] = 1;\n  /** @type {Array<number>} */\n  const stack = [offset, end - stride];\n  let index = 0;\n  while (stack.length > 0) {\n    const last = stack.pop();\n    const first = stack.pop();\n    let maxSquaredDistance = 0;\n    const x1 = flatCoordinates[first];\n    const y1 = flatCoordinates[first + 1];\n    const x2 = flatCoordinates[last];\n    const y2 = flatCoordinates[last + 1];\n    for (let i = first + stride; i < last; i += stride) {\n      const x = flatCoordinates[i];\n      const y = flatCoordinates[i + 1];\n      const squaredDistance = squaredSegmentDistance(x, y, x1, y1, x2, y2);\n      if (squaredDistance > maxSquaredDistance) {\n        index = i;\n        maxSquaredDistance = squaredDistance;\n      }\n    }\n    if (maxSquaredDistance > squaredTolerance) {\n      markers[(index - offset) / stride] = 1;\n      if (first + stride < index) {\n        stack.push(first, index);\n      }\n      if (index + stride < last) {\n        stack.push(index, last);\n      }\n    }\n  }\n  for (let i = 0; i < n; ++i) {\n    if (markers[i]) {\n      simplifiedFlatCoordinates[simplifiedOffset++] =\n        flatCoordinates[offset + i * stride];\n      simplifiedFlatCoordinates[simplifiedOffset++] =\n        flatCoordinates[offset + i * stride + 1];\n    }\n  }\n  return simplifiedOffset;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {Array<number>} simplifiedFlatCoordinates Simplified flat\n *     coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @param {Array<number>} simplifiedEnds Simplified ends.\n * @return {number} Simplified offset.\n */\nexport function douglasPeuckerArray(\n  flatCoordinates,\n  offset,\n  ends,\n  stride,\n  squaredTolerance,\n  simplifiedFlatCoordinates,\n  simplifiedOffset,\n  simplifiedEnds,\n) {\n  for (let i = 0, ii = ends.length; i < ii; ++i) {\n    const end = ends[i];\n    simplifiedOffset = douglasPeucker(\n      flatCoordinates,\n      offset,\n      end,\n      stride,\n      squaredTolerance,\n      simplifiedFlatCoordinates,\n      simplifiedOffset,\n    );\n    simplifiedEnds.push(simplifiedOffset);\n    offset = end;\n  }\n  return simplifiedOffset;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {Array<number>} simplifiedFlatCoordinates Simplified flat\n *     coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @param {Array<Array<number>>} simplifiedEndss Simplified endss.\n * @return {number} Simplified offset.\n */\nexport function douglasPeuckerMultiArray(\n  flatCoordinates,\n  offset,\n  endss,\n  stride,\n  squaredTolerance,\n  simplifiedFlatCoordinates,\n  simplifiedOffset,\n  simplifiedEndss,\n) {\n  for (let i = 0, ii = endss.length; i < ii; ++i) {\n    const ends = endss[i];\n    /** @type {Array<number>} */\n    const simplifiedEnds = [];\n    simplifiedOffset = douglasPeuckerArray(\n      flatCoordinates,\n      offset,\n      ends,\n      stride,\n      squaredTolerance,\n      simplifiedFlatCoordinates,\n      simplifiedOffset,\n      simplifiedEnds,\n    );\n    simplifiedEndss.push(simplifiedEnds);\n    offset = ends[ends.length - 1];\n  }\n  return simplifiedOffset;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {Array<number>} simplifiedFlatCoordinates Simplified flat\n *     coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @return {number} Simplified offset.\n */\nexport function radialDistance(\n  flatCoordinates,\n  offset,\n  end,\n  stride,\n  squaredTolerance,\n  simplifiedFlatCoordinates,\n  simplifiedOffset,\n) {\n  if (end <= offset + stride) {\n    // zero or one point, no simplification possible, so copy and return\n    for (; offset < end; offset += stride) {\n      simplifiedFlatCoordinates[simplifiedOffset++] = flatCoordinates[offset];\n      simplifiedFlatCoordinates[simplifiedOffset++] =\n        flatCoordinates[offset + 1];\n    }\n    return simplifiedOffset;\n  }\n  let x1 = flatCoordinates[offset];\n  let y1 = flatCoordinates[offset + 1];\n  // copy first point\n  simplifiedFlatCoordinates[simplifiedOffset++] = x1;\n  simplifiedFlatCoordinates[simplifiedOffset++] = y1;\n  let x2 = x1;\n  let y2 = y1;\n  for (offset += stride; offset < end; offset += stride) {\n    x2 = flatCoordinates[offset];\n    y2 = flatCoordinates[offset + 1];\n    if (squaredDistance(x1, y1, x2, y2) > squaredTolerance) {\n      // copy point at offset\n      simplifiedFlatCoordinates[simplifiedOffset++] = x2;\n      simplifiedFlatCoordinates[simplifiedOffset++] = y2;\n      x1 = x2;\n      y1 = y2;\n    }\n  }\n  if (x2 != x1 || y2 != y1) {\n    // copy last point\n    simplifiedFlatCoordinates[simplifiedOffset++] = x2;\n    simplifiedFlatCoordinates[simplifiedOffset++] = y2;\n  }\n  return simplifiedOffset;\n}\n\n/**\n * @param {number} value Value.\n * @param {number} tolerance Tolerance.\n * @return {number} Rounded value.\n */\nexport function snap(value, tolerance) {\n  return tolerance * Math.round(value / tolerance);\n}\n\n/**\n * Simplifies a line string using an algorithm designed by Tim Schaub.\n * Coordinates are snapped to the nearest value in a virtual grid and\n * consecutive duplicate coordinates are discarded.  This effectively preserves\n * topology as the simplification of any subsection of a line string is\n * independent of the rest of the line string.  This means that, for examples,\n * the common edge between two polygons will be simplified to the same line\n * string independently in both polygons.  This implementation uses a single\n * pass over the coordinates and eliminates intermediate collinear points.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} tolerance Tolerance.\n * @param {Array<number>} simplifiedFlatCoordinates Simplified flat\n *     coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @return {number} Simplified offset.\n */\nexport function quantize(\n  flatCoordinates,\n  offset,\n  end,\n  stride,\n  tolerance,\n  simplifiedFlatCoordinates,\n  simplifiedOffset,\n) {\n  // do nothing if the line is empty\n  if (offset == end) {\n    return simplifiedOffset;\n  }\n  // snap the first coordinate (P1)\n  let x1 = snap(flatCoordinates[offset], tolerance);\n  let y1 = snap(flatCoordinates[offset + 1], tolerance);\n  offset += stride;\n  // add the first coordinate to the output\n  simplifiedFlatCoordinates[simplifiedOffset++] = x1;\n  simplifiedFlatCoordinates[simplifiedOffset++] = y1;\n  // find the next coordinate that does not snap to the same value as the first\n  // coordinate (P2)\n  let x2, y2;\n  do {\n    x2 = snap(flatCoordinates[offset], tolerance);\n    y2 = snap(flatCoordinates[offset + 1], tolerance);\n    offset += stride;\n    if (offset == end) {\n      // all coordinates snap to the same value, the line collapses to a point\n      // push the last snapped value anyway to ensure that the output contains\n      // at least two points\n      // FIXME should we really return at least two points anyway?\n      simplifiedFlatCoordinates[simplifiedOffset++] = x2;\n      simplifiedFlatCoordinates[simplifiedOffset++] = y2;\n      return simplifiedOffset;\n    }\n  } while (x2 == x1 && y2 == y1);\n  while (offset < end) {\n    // snap the next coordinate (P3)\n    const x3 = snap(flatCoordinates[offset], tolerance);\n    const y3 = snap(flatCoordinates[offset + 1], tolerance);\n    offset += stride;\n    // skip P3 if it is equal to P2\n    if (x3 == x2 && y3 == y2) {\n      continue;\n    }\n    // calculate the delta between P1 and P2\n    const dx1 = x2 - x1;\n    const dy1 = y2 - y1;\n    // calculate the delta between P3 and P1\n    const dx2 = x3 - x1;\n    const dy2 = y3 - y1;\n    // if P1, P2, and P3 are colinear and P3 is further from P1 than P2 is from\n    // P1 in the same direction then P2 is on the straight line between P1 and\n    // P3\n    if (\n      dx1 * dy2 == dy1 * dx2 &&\n      ((dx1 < 0 && dx2 < dx1) || dx1 == dx2 || (dx1 > 0 && dx2 > dx1)) &&\n      ((dy1 < 0 && dy2 < dy1) || dy1 == dy2 || (dy1 > 0 && dy2 > dy1))\n    ) {\n      // discard P2 and set P2 = P3\n      x2 = x3;\n      y2 = y3;\n      continue;\n    }\n    // either P1, P2, and P3 are not colinear, or they are colinear but P3 is\n    // between P3 and P1 or on the opposite half of the line to P2.  add P2,\n    // and continue with P1 = P2 and P2 = P3\n    simplifiedFlatCoordinates[simplifiedOffset++] = x2;\n    simplifiedFlatCoordinates[simplifiedOffset++] = y2;\n    x1 = x2;\n    y1 = y2;\n    x2 = x3;\n    y2 = y3;\n  }\n  // add the last point (P2)\n  simplifiedFlatCoordinates[simplifiedOffset++] = x2;\n  simplifiedFlatCoordinates[simplifiedOffset++] = y2;\n  return simplifiedOffset;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {number} tolerance Tolerance.\n * @param {Array<number>} simplifiedFlatCoordinates Simplified flat\n *     coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @param {Array<number>} simplifiedEnds Simplified ends.\n * @return {number} Simplified offset.\n */\nexport function quantizeArray(\n  flatCoordinates,\n  offset,\n  ends,\n  stride,\n  tolerance,\n  simplifiedFlatCoordinates,\n  simplifiedOffset,\n  simplifiedEnds,\n) {\n  for (let i = 0, ii = ends.length; i < ii; ++i) {\n    const end = ends[i];\n    simplifiedOffset = quantize(\n      flatCoordinates,\n      offset,\n      end,\n      stride,\n      tolerance,\n      simplifiedFlatCoordinates,\n      simplifiedOffset,\n    );\n    simplifiedEnds.push(simplifiedOffset);\n    offset = end;\n  }\n  return simplifiedOffset;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @param {number} tolerance Tolerance.\n * @param {Array<number>} simplifiedFlatCoordinates Simplified flat\n *     coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @param {Array<Array<number>>} simplifiedEndss Simplified endss.\n * @return {number} Simplified offset.\n */\nexport function quantizeMultiArray(\n  flatCoordinates,\n  offset,\n  endss,\n  stride,\n  tolerance,\n  simplifiedFlatCoordinates,\n  simplifiedOffset,\n  simplifiedEndss,\n) {\n  for (let i = 0, ii = endss.length; i < ii; ++i) {\n    const ends = endss[i];\n    /** @type {Array<number>} */\n    const simplifiedEnds = [];\n    simplifiedOffset = quantizeArray(\n      flatCoordinates,\n      offset,\n      ends,\n      stride,\n      tolerance,\n      simplifiedFlatCoordinates,\n      simplifiedOffset,\n      simplifiedEnds,\n    );\n    simplifiedEndss.push(simplifiedEnds);\n    offset = ends[ends.length - 1];\n  }\n  return simplifiedOffset;\n}\n", "/**\n * @module ol/geom/LineString\n */\nimport {extend} from '../array.js';\nimport {closestSquaredDistanceXY} from '../extent.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport {assignClosestPoint, maxSquaredDelta} from './flat/closest.js';\nimport {deflateCoordinates} from './flat/deflate.js';\nimport {inflateCoordinates} from './flat/inflate.js';\nimport {interpolatePoint, lineStringCoordinateAtM} from './flat/interpolate.js';\nimport {intersectsLineString} from './flat/intersectsextent.js';\nimport {lineStringLength} from './flat/length.js';\nimport {forEach as forEachSegment} from './flat/segments.js';\nimport {douglasPeucker} from './flat/simplify.js';\n\n/**\n * @classdesc\n * Linestring geometry.\n *\n * @api\n */\nclass LineString extends SimpleGeometry {\n  /**\n   * @param {Array<import(\"../coordinate.js\").Coordinate>|Array<number>} coordinates Coordinates.\n   *     For internal use, flat coordinates in combination with `layout` are also accepted.\n   * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n   */\n  constructor(coordinates, layout) {\n    super();\n\n    /**\n     * @private\n     * @type {import(\"../coordinate.js\").Coordinate|null}\n     */\n    this.flatMidpoint_ = null;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.flatMidpointRevision_ = -1;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.maxDelta_ = -1;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.maxDeltaRevision_ = -1;\n\n    if (layout !== undefined && !Array.isArray(coordinates[0])) {\n      this.setFlatCoordinates(\n        layout,\n        /** @type {Array<number>} */ (coordinates),\n      );\n    } else {\n      this.setCoordinates(\n        /** @type {Array<import(\"../coordinate.js\").Coordinate>} */ (\n          coordinates\n        ),\n        layout,\n      );\n    }\n  }\n\n  /**\n   * Append the passed coordinate to the coordinates of the linestring.\n   * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n   * @api\n   */\n  appendCoordinate(coordinate) {\n    extend(this.flatCoordinates, coordinate);\n    this.changed();\n  }\n\n  /**\n   * Make a complete copy of the geometry.\n   * @return {!LineString} Clone.\n   * @api\n   * @override\n   */\n  clone() {\n    const lineString = new LineString(\n      this.flatCoordinates.slice(),\n      this.layout,\n    );\n    lineString.applyProperties(this);\n    return lineString;\n  }\n\n  /**\n   * @param {number} x X.\n   * @param {number} y Y.\n   * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n   * @param {number} minSquaredDistance Minimum squared distance.\n   * @return {number} Minimum squared distance.\n   * @override\n   */\n  closestPointXY(x, y, closestPoint, minSquaredDistance) {\n    if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {\n      return minSquaredDistance;\n    }\n    if (this.maxDeltaRevision_ != this.getRevision()) {\n      this.maxDelta_ = Math.sqrt(\n        maxSquaredDelta(\n          this.flatCoordinates,\n          0,\n          this.flatCoordinates.length,\n          this.stride,\n          0,\n        ),\n      );\n      this.maxDeltaRevision_ = this.getRevision();\n    }\n    return assignClosestPoint(\n      this.flatCoordinates,\n      0,\n      this.flatCoordinates.length,\n      this.stride,\n      this.maxDelta_,\n      false,\n      x,\n      y,\n      closestPoint,\n      minSquaredDistance,\n    );\n  }\n\n  /**\n   * Iterate over each segment, calling the provided callback.\n   * If the callback returns a truthy value the function returns that\n   * value immediately. Otherwise the function returns `false`.\n   *\n   * @param {function(this: S, import(\"../coordinate.js\").Coordinate, import(\"../coordinate.js\").Coordinate): T} callback Function\n   *     called for each segment. The function will receive two arguments, the start and end coordinates of the segment.\n   * @return {T|boolean} Value.\n   * @template T,S\n   * @api\n   */\n  forEachSegment(callback) {\n    return forEachSegment(\n      this.flatCoordinates,\n      0,\n      this.flatCoordinates.length,\n      this.stride,\n      callback,\n    );\n  }\n\n  /**\n   * Returns the coordinate at `m` using linear interpolation, or `null` if no\n   * such coordinate exists.\n   *\n   * `extrapolate` controls extrapolation beyond the range of Ms in the\n   * MultiLineString. If `extrapolate` is `true` then Ms less than the first\n   * M will return the first coordinate and Ms greater than the last M will\n   * return the last coordinate.\n   *\n   * @param {number} m M.\n   * @param {boolean} [extrapolate] Extrapolate. Default is `false`.\n   * @return {import(\"../coordinate.js\").Coordinate|null} Coordinate.\n   * @api\n   */\n  getCoordinateAtM(m, extrapolate) {\n    if (this.layout != 'XYM' && this.layout != 'XYZM') {\n      return null;\n    }\n    extrapolate = extrapolate !== undefined ? extrapolate : false;\n    return lineStringCoordinateAtM(\n      this.flatCoordinates,\n      0,\n      this.flatCoordinates.length,\n      this.stride,\n      m,\n      extrapolate,\n    );\n  }\n\n  /**\n   * Return the coordinates of the linestring.\n   * @return {Array<import(\"../coordinate.js\").Coordinate>} Coordinates.\n   * @api\n   * @override\n   */\n  getCoordinates() {\n    return inflateCoordinates(\n      this.flatCoordinates,\n      0,\n      this.flatCoordinates.length,\n      this.stride,\n    );\n  }\n\n  /**\n   * Return the coordinate at the provided fraction along the linestring.\n   * The `fraction` is a number between 0 and 1, where 0 is the start of the\n   * linestring and 1 is the end.\n   * @param {number} fraction Fraction.\n   * @param {import(\"../coordinate.js\").Coordinate} [dest] Optional coordinate whose values will\n   *     be modified. If not provided, a new coordinate will be returned.\n   * @return {import(\"../coordinate.js\").Coordinate} Coordinate of the interpolated point.\n   * @api\n   */\n  getCoordinateAt(fraction, dest) {\n    return interpolatePoint(\n      this.flatCoordinates,\n      0,\n      this.flatCoordinates.length,\n      this.stride,\n      fraction,\n      dest,\n      this.stride,\n    );\n  }\n\n  /**\n   * Return the length of the linestring on projected plane.\n   * @return {number} Length (on projected plane).\n   * @api\n   */\n  getLength() {\n    return lineStringLength(\n      this.flatCoordinates,\n      0,\n      this.flatCoordinates.length,\n      this.stride,\n    );\n  }\n\n  /**\n   * @return {Array<number>} Flat midpoint.\n   */\n  getFlatMidpoint() {\n    if (this.flatMidpointRevision_ != this.getRevision()) {\n      this.flatMidpoint_ = this.getCoordinateAt(\n        0.5,\n        this.flatMidpoint_ ?? undefined,\n      );\n      this.flatMidpointRevision_ = this.getRevision();\n    }\n    return /** @type {Array<number>} */ (this.flatMidpoint_);\n  }\n\n  /**\n   * @param {number} squaredTolerance Squared tolerance.\n   * @return {LineString} Simplified LineString.\n   * @protected\n   * @override\n   */\n  getSimplifiedGeometryInternal(squaredTolerance) {\n    /** @type {Array<number>} */\n    const simplifiedFlatCoordinates = [];\n    simplifiedFlatCoordinates.length = douglasPeucker(\n      this.flatCoordinates,\n      0,\n      this.flatCoordinates.length,\n      this.stride,\n      squaredTolerance,\n      simplifiedFlatCoordinates,\n      0,\n    );\n    return new LineString(simplifiedFlatCoordinates, 'XY');\n  }\n\n  /**\n   * Get the type of this geometry.\n   * @return {import(\"./Geometry.js\").Type} Geometry type.\n   * @api\n   * @override\n   */\n  getType() {\n    return 'LineString';\n  }\n\n  /**\n   * Test if the geometry and the passed extent intersect.\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @return {boolean} `true` if the geometry and the extent intersect.\n   * @api\n   * @override\n   */\n  intersectsExtent(extent) {\n    return intersectsLineString(\n      this.flatCoordinates,\n      0,\n      this.flatCoordinates.length,\n      this.stride,\n      extent,\n      this.getExtent(),\n    );\n  }\n\n  /**\n   * Set the coordinates of the linestring.\n   * @param {!Array<import(\"../coordinate.js\").Coordinate>} coordinates Coordinates.\n   * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n   * @api\n   * @override\n   */\n  setCoordinates(coordinates, layout) {\n    this.setLayout(layout, coordinates, 1);\n    if (!this.flatCoordinates) {\n      this.flatCoordinates = [];\n    }\n    this.flatCoordinates.length = deflateCoordinates(\n      this.flatCoordinates,\n      0,\n      coordinates,\n      this.stride,\n    );\n    this.changed();\n  }\n}\n\nexport default LineString;\n", "/**\n * @module ol/Feature\n */\nimport BaseObject from './Object.js';\nimport {assert} from './asserts.js';\nimport {listen, unlistenByKey} from './events.js';\nimport EventType from './events/EventType.js';\n\n/**\n * @typedef {typeof Feature|typeof import(\"./render/Feature.js\").default} FeatureClass\n */\n\n/**\n * @typedef {Feature|import(\"./render/Feature.js\").default} FeatureLike\n */\n\n/***\n * @template Return\n * @typedef {import(\"./Observable.js\").OnSignature<import(\"./Observable.js\").EventTypes, import(\"./events/Event.js\").default, Return> &\n *   import(\"./Observable.js\").OnSignature<import(\"./ObjectEventType.js\").Types|'change:geometry', import(\"./Object.js\").ObjectEvent, Return> &\n *   import(\"./Observable.js\").CombinedOnSignature<import(\"./Observable.js\").EventTypes|import(\"./ObjectEventType.js\").Types\n *     |'change:geometry', Return>} FeatureOnSignature\n */\n\n/***\n * @template {import(\"./geom/Geometry.js\").default} [Geometry=import(\"./geom/Geometry.js\").default]\n * @template {Object<string, *>} [Properties=Object<string, *>]\n * @typedef {Properties & { geometry?: Geometry }} ObjectWithGeometry\n */\n\n/**\n * @classdesc\n * A vector object for geographic features with a geometry and other\n * attribute properties, similar to the features in vector file formats like\n * GeoJSON.\n *\n * Features can be styled individually with `setStyle`; otherwise they use the\n * style of their vector layer.\n *\n * Note that attribute properties are set as {@link module:ol/Object~BaseObject} properties on\n * the feature object, so they are observable, and have get/set accessors.\n *\n * Typically, a feature has a single geometry property. You can set the\n * geometry using the `setGeometry` method and get it with `getGeometry`.\n * It is possible to store more than one geometry on a feature using attribute\n * properties. By default, the geometry used for rendering is identified by\n * the property name `geometry`. If you want to use another geometry property\n * for rendering, use the `setGeometryName` method to change the attribute\n * property associated with the geometry for the feature.  For example:\n *\n * ```js\n *\n * import Feature from 'ol/Feature.js';\n * import Polygon from 'ol/geom/Polygon.js';\n * import Point from 'ol/geom/Point.js';\n *\n * const feature = new Feature({\n *   geometry: new Polygon(polyCoords),\n *   labelPoint: new Point(labelCoords),\n *   name: 'My Polygon',\n * });\n *\n * // get the polygon geometry\n * const poly = feature.getGeometry();\n *\n * // Render the feature as a point using the coordinates from labelPoint\n * feature.setGeometryName('labelPoint');\n *\n * // get the point geometry\n * const point = feature.getGeometry();\n * ```\n *\n * @api\n * @template {import(\"./geom/Geometry.js\").default} [Geometry=import(\"./geom/Geometry.js\").default]\n * @template {Object<string, *>} [Properties=Object<string, *>]\n * @extends {BaseObject<NoInfer<Properties>>}\n */\nclass Feature extends BaseObject {\n  /**\n   * @param {Geometry|ObjectWithGeometry<Geometry, NoInfer<Properties>>} [geometryOrProperties]\n   *     You may pass a Geometry object directly, or an object literal containing\n   *     properties. If you pass an object literal, you may include a Geometry\n   *     associated with a `geometry` key.\n   */\n  constructor(geometryOrProperties) {\n    super();\n\n    /***\n     * @type {FeatureOnSignature<import(\"./events.js\").EventsKey>}\n     */\n    this.on;\n\n    /***\n     * @type {FeatureOnSignature<import(\"./events.js\").EventsKey>}\n     */\n    this.once;\n\n    /***\n     * @type {FeatureOnSignature<void>}\n     */\n    this.un;\n\n    /**\n     * @private\n     * @type {number|string|undefined}\n     */\n    this.id_ = undefined;\n\n    /**\n     * @type {string}\n     * @private\n     */\n    this.geometryName_ = 'geometry';\n\n    /**\n     * User provided style.\n     * @private\n     * @type {import(\"./style/Style.js\").StyleLike}\n     */\n    this.style_ = null;\n\n    /**\n     * @private\n     * @type {import(\"./style/Style.js\").StyleFunction|undefined}\n     */\n    this.styleFunction_ = undefined;\n\n    /**\n     * @private\n     * @type {?import(\"./events.js\").EventsKey}\n     */\n    this.geometryChangeKey_ = null;\n\n    this.addChangeListener(this.geometryName_, this.handleGeometryChanged_);\n\n    if (geometryOrProperties) {\n      if (\n        typeof (\n          /** @type {?} */ (geometryOrProperties).getSimplifiedGeometry\n        ) === 'function'\n      ) {\n        const geometry = /** @type {Geometry} */ (geometryOrProperties);\n        this.setGeometry(geometry);\n      } else {\n        /** @type {?} */\n        const properties = geometryOrProperties;\n        this.setProperties(properties);\n      }\n    }\n  }\n\n  /**\n   * Clone this feature. If the original feature has a geometry it\n   * is also cloned. The feature id is not set in the clone.\n   * @return {Feature<Geometry>} The clone.\n   * @api\n   */\n  clone() {\n    const clone = /** @type {Feature<Geometry>} */ (new Feature());\n    const geometryName = this.geometryName_;\n    clone.setGeometryName(geometryName);\n\n    const properties = this.getPropertiesInternal();\n    if (properties) {\n      const geometry = this.getGeometry();\n      for (const key in properties) {\n        if (key === geometryName && geometry) {\n          clone.set(key, geometry.clone());\n        } else {\n          clone.set(key, properties[key], true);\n        }\n      }\n    }\n\n    const style = this.getStyle();\n    if (style) {\n      clone.setStyle(style);\n    }\n    return clone;\n  }\n\n  /**\n   * Get the feature's default geometry.  A feature may have any number of named\n   * geometries.  The \"default\" geometry (the one that is rendered by default) is\n   * set when calling {@link module:ol/Feature~Feature#setGeometry}.\n   * @return {Geometry|undefined} The default geometry for the feature.\n   * @api\n   * @observable\n   */\n  getGeometry() {\n    return /** @type {Geometry|undefined} */ (this.get(this.geometryName_));\n  }\n\n  /**\n   * Get the feature identifier.  This is a stable identifier for the feature and\n   * is either set when reading data from a remote source or set explicitly by\n   * calling {@link module:ol/Feature~Feature#setId}.\n   * @return {number|string|undefined} Id.\n   * @api\n   */\n  getId() {\n    return this.id_;\n  }\n\n  /**\n   * Get the name of the feature's default geometry.  By default, the default\n   * geometry is named `geometry`.\n   * @return {string} Get the property name associated with the default geometry\n   *     for this feature.\n   * @api\n   */\n  getGeometryName() {\n    return this.geometryName_;\n  }\n\n  /**\n   * Get the feature's style. Will return what was provided to the\n   * {@link module:ol/Feature~Feature#setStyle} method.\n   * @return {import(\"./style/Style.js\").StyleLike|undefined} The feature style.\n   * @api\n   */\n  getStyle() {\n    return this.style_;\n  }\n\n  /**\n   * Get the feature's style function.\n   * @return {import(\"./style/Style.js\").StyleFunction|undefined} Return a function\n   * representing the current style of this feature.\n   * @api\n   */\n  getStyleFunction() {\n    return this.styleFunction_;\n  }\n\n  /**\n   * @private\n   */\n  handleGeometryChange_() {\n    this.changed();\n  }\n\n  /**\n   * @private\n   */\n  handleGeometryChanged_() {\n    if (this.geometryChangeKey_) {\n      unlistenByKey(this.geometryChangeKey_);\n      this.geometryChangeKey_ = null;\n    }\n    const geometry = this.getGeometry();\n    if (geometry) {\n      this.geometryChangeKey_ = listen(\n        geometry,\n        EventType.CHANGE,\n        this.handleGeometryChange_,\n        this,\n      );\n    }\n    this.changed();\n  }\n\n  /**\n   * Set the default geometry for the feature.  This will update the property\n   * with the name returned by {@link module:ol/Feature~Feature#getGeometryName}.\n   * @param {Geometry|undefined} geometry The new geometry.\n   * @api\n   * @observable\n   */\n  setGeometry(geometry) {\n    this.set(this.geometryName_, geometry);\n  }\n\n  /**\n   * Set the style for the feature to override the layer style.  This can be a\n   * single style object, an array of styles, or a function that takes a\n   * resolution and returns an array of styles. To unset the feature style, call\n   * `setStyle()` without arguments or a falsey value.\n   * @param {import(\"./style/Style.js\").StyleLike} [style] Style for this feature.\n   * @api\n   * @fires module:ol/events/Event~BaseEvent#event:change\n   */\n  setStyle(style) {\n    this.style_ = style;\n    this.styleFunction_ = !style ? undefined : createStyleFunction(style);\n    this.changed();\n  }\n\n  /**\n   * Set the feature id.  The feature id is considered stable and may be used when\n   * requesting features or comparing identifiers returned from a remote source.\n   * The feature id can be used with the\n   * {@link module:ol/source/Vector~VectorSource#getFeatureById} method.\n   * @param {number|string|undefined} id The feature id.\n   * @api\n   * @fires module:ol/events/Event~BaseEvent#event:change\n   */\n  setId(id) {\n    this.id_ = id;\n    this.changed();\n  }\n\n  /**\n   * Set the property name to be used when getting the feature's default geometry.\n   * When calling {@link module:ol/Feature~Feature#getGeometry}, the value of the property with\n   * this name will be returned.\n   * @param {string} name The property name of the default geometry.\n   * @api\n   */\n  setGeometryName(name) {\n    if (name === this.geometryName_) {\n      return;\n    }\n    this.removeChangeListener(this.geometryName_, this.handleGeometryChanged_);\n    this.geometryName_ = name;\n    this.addChangeListener(this.geometryName_, this.handleGeometryChanged_);\n    this.handleGeometryChanged_();\n  }\n}\n\n/**\n * Convert the provided object into a feature style function.  Functions passed\n * through unchanged.  Arrays of Style or single style objects wrapped\n * in a new feature style function.\n * @param {!import(\"./style/Style.js\").StyleFunction|!Array<import(\"./style/Style.js\").default>|!import(\"./style/Style.js\").default} obj\n *     A feature style function, a single style, or an array of styles.\n * @return {import(\"./style/Style.js\").StyleFunction} A style function.\n */\nexport function createStyleFunction(obj) {\n  if (typeof obj === 'function') {\n    return obj;\n  }\n  /**\n   * @type {Array<import(\"./style/Style.js\").default>}\n   */\n  let styles;\n  if (Array.isArray(obj)) {\n    styles = obj;\n  } else {\n    assert(\n      typeof (/** @type {?} */ (obj).getZIndex) === 'function',\n      'Expected an `ol/style/Style` or an array of `ol/style/Style.js`',\n    );\n    const style = /** @type {import(\"./style/Style.js\").default} */ (obj);\n    styles = [style];\n  }\n  return function () {\n    return styles;\n  };\n}\nexport default Feature;\n", "export const ARRAY_CELL_DATA_TYPE = \"ArrayCell\";\nexport const ARRAY_DATA_TYPE = \"Array\";\nexport const BOUNDING_BOX_DATA_TYPE = \"BoundingBox\";\nexport const MEASURE_DATA_TYPE = \"Measure\";\nexport const ROOF_PLANE_DATA_TYPE = \"RoofPlane\";\nexport const OBSTRUCTION_DATA_TYPE = \"Obstruction\";\nexport const OBSTRUCTION_BUFFER_DATA_TYPE = \"ObstructionBuffer\";\nexport const OBSTRUCTION_SETBACK_BUFFER_DATA_TYPE = \"ObstructionSetbackBuffer\";\nexport const ROOF_SECTION_DATA_TYPE = \"RoofSection\";\nexport const SETBACK_DATA_TYPE = \"Setback\";\nexport const GUIDE_LINE_DATA_TYPE = \"GuideLine\";\nexport const GUIDE_LINES_INTERSECTION_CIRCLE_DATA_TYPE = \"GuideLineIntersectionCircle\";\nexport const EAVE_SELECTION_LINE_STRING_DATA_TYPE = \"EaveSelectionLineString\";\nexport const SHAPE_GUIDE_LINE_DATA_TYPE = \"ShapeGuideLine\";\nexport const RAIL_DATA_TYPE = \"Rail\";\nexport const PANEL_DATA_TYPE = \"Panel\";\nexport const SEGMENT_DATA_TYPE = \"Segment\";\nexport const VISUAL_MARKER_DATA_TYPE = \"VisualMarker\";\nexport const THERMAL_EXPANSION_DATA_TYPE = \"ThermalExpansion\";\nexport const ADJOINMENT_DATA_TYPE = \"Adjoinment\";\nexport const CONTOUR_LEGALITY_ADJOINMENT_DATA_TYPE = \"ContourLegalityAdjoinment\";\nexport const CONTOUR_DATA_TYPE = \"Contour\";\nexport const BUILDING_IMAGE_PLACEMENT_DATA_TYPE = \"BuildingImagePlacement\";\nexport const SCALE_LINE_DATA_TYPE = \"ScaleLine\";\nexport const EXTENDED_GUIDELINE_DATA_TYPE = \"ExtendedGuideline\";\nexport const GUIDE_VERTEX_DATA_TYPE = \"GuideVertex\";\nexport const EXTENDED_GUIDELINE_SNAP_POINT_DATA_TYPE = \"ExtendedGuidelineSnapPoint\";\n", "import LineString from \"ol/geom/LineString\";\nimport Feature from \"ol/Feature\";\nimport { fromLonLat, getPointResolution, toLonLat } from \"ol/proj\";\n\nimport {\n  ROOF_PLANE_DATA_TYPE,\n  ROOF_SECTION_DATA_TYPE,\n  MEASURE_DATA_TYPE,\n  OBSTRUCTION_DATA_TYPE,\n  THERMAL_EXPANSION_DATA_TYPE,\n} from \"./data-types\";\nimport { PROXIMITY_CUTOFF } from \"../../helpers/geometry\";\nimport { getDistance } from \"ol/sphere\";\n\nexport const FEET_TO_METERS = 0.3048;\nexport const METERS_TO_FEET = 1.0 / FEET_TO_METERS;\nexport const METERS_TO_INCHES = METERS_TO_FEET * 12.0;\nexport const INCHES_TO_METERS = 1.0 / METERS_TO_INCHES;\n\nexport const GeometryType = {\n  POINT: \"Point\",\n  LINE_STRING: \"LineString\",\n  LINEAR_RING: \"LinearRing\",\n  POLYGON: \"Polygon\",\n  MULTI_POINT: \"MultiPoint\",\n  MULTI_LINE_STRING: \"MultiLineString\",\n  MULTI_POLYGON: \"MultiPolygon\",\n  GEOMETRY_COLLECTION: \"GeometryCollection\",\n  CIRCLE: \"Circle\",\n};\n\nexport function isARoofPlane(feature) {\n  return feature.get(\"dataType\") === ROOF_PLANE_DATA_TYPE;\n}\n\nexport function isAnObstruction(feature) {\n  return feature.get(\"dataType\") === OBSTRUCTION_DATA_TYPE;\n}\n\nexport function isARoofSection(feature) {\n  return feature.get(\"dataType\") === ROOF_SECTION_DATA_TYPE;\n}\n\nexport function isAMeasure(feature) {\n  return feature.get(\"dataType\") === MEASURE_DATA_TYPE;\n}\n\nexport function isAThermalExpansion(feature) {\n  return feature.get(\"dataType\") === THERMAL_EXPANSION_DATA_TYPE;\n}\n\nexport function isPolygon(feature) {\n  const geometry = feature.getGeometry();\n  const geometryType = geometry.getType();\n\n  return geometryType === GeometryType.POLYGON;\n}\n\nexport function isMultiPolygon(feature) {\n  const geometry = feature.getGeometry();\n  const geometryType = geometry.getType();\n\n  return geometryType === GeometryType.MULTI_POLYGON;\n}\n\nexport function isPoint(feature) {\n  const geometry = feature.getGeometry();\n  const geometryType = geometry.getType();\n\n  return geometryType === GeometryType.POINT;\n}\n\nexport function pointAtFeatureVertex(feature, point) {\n  if (!isPolygon(feature)) return false;\n\n  const geometry = feature.getGeometry();\n  const polygonCoordinates = geometry.getLinearRing(0).getCoordinates();\n\n  return polygonCoordinates.find((pc) => pc[0] === point[0] && pc[1] === point[1]);\n}\n\nexport function removeFeaturesMatchingUuid(vectorSource, uuid) {\n  removeFeaturesMatchingKeyAndValue(vectorSource, \"uuid\", uuid);\n}\n\nexport function removeFeaturesDescendedFromRoofPlaneUuid(vectorSource, roofPlaneUuid) {\n  removeFeaturesMatchingKeyAndValue(vectorSource, \"roofPlaneUuid\", roofPlaneUuid);\n}\n\nexport function removeFeaturesDescendedFromRoofSectionUuid(vectorSource, roofSectionUuid) {\n  removeFeaturesMatchingKeyAndValue(vectorSource, \"roofSectionUuid\", roofSectionUuid);\n}\n\nfunction removeFeaturesMatchingKeyAndValue(vectorSource, key, value) {\n  const features = vectorSource.getFeatures();\n\n  features.forEach((feature) => {\n    if (feature.get(key) === value) {\n      vectorSource.removeFeature(feature);\n    }\n  });\n}\n\nexport function ensureFeatureIsClockwise(feature) {\n  const geometry = feature.getGeometry();\n  // passing false to getCoordinates makes OpenLayers return coordinates where outer ring is clockwise\n  const clockwiseCoordinates = geometry.getCoordinates(false);\n\n  geometry.setCoordinates(clockwiseCoordinates);\n}\n\n// If the line is too short on the map (e.g. when you've zoomed out enough, polygon lines\n// get very short and can disappear) the line is too short to show ornamental UI, like a\n// dimension marker.\nexport function lineTooShortToShowOrnamentation(map, startPoint, endPoint, cutoffLineLength = 70) {\n  const startPixel = map.getPixelFromCoordinate(startPoint);\n  const endPixel = map.getPixelFromCoordinate(endPoint);\n\n  const dx = startPixel[0] - endPixel[0];\n  const dy = startPixel[1] - endPixel[1];\n  const length = Math.sqrt(dx * dx + dy * dy);\n\n  return length < cutoffLineLength;\n}\n\nexport function buildLineStringSegmentFeaturesFromPolygonCoordinates(polygonCoordinates) {\n  const segments = [];\n  for (let i = 0; i < polygonCoordinates.length - 1; i++) {\n    segments.push([polygonCoordinates[i], polygonCoordinates[i + 1]]);\n  }\n\n  const lineStringFeatures = segments.map((lineCoordinates, i) => {\n    const geometry = new LineString(lineCoordinates);\n    const feature = new Feature({ geometry });\n    feature.set(\"lineNumber\", i + 1);\n    return feature;\n  });\n\n  return lineStringFeatures;\n}\n\nexport function segmentCoordinatesFromPolygon(polygon) {\n  const polygonCoordinates = polygon.getGeometry().getLinearRing(0).getCoordinates();\n  const segmentCoordinates = [];\n  for (let i = 0; i < polygonCoordinates.length - 1; i++) {\n    segmentCoordinates.push([polygonCoordinates[i], polygonCoordinates[i + 1]]);\n  }\n  return segmentCoordinates;\n}\n\nexport function relativePosition(endLonLat, startLonLat) {\n  const signLng = Math.sign(endLonLat[0] - startLonLat[0]);\n  const signLat = Math.sign(endLonLat[1] - startLonLat[1]);\n\n  return [signLng, signLat];\n}\n\nexport function distanceForPixels(map, pixelDistance) {\n  const resolution = map.getView().getResolution(); // meters per pixel\n  return pixelDistance * resolution;\n}\n\nexport function findLineStringFeatureWithMatchingCoordinates(features, searchCoordinates) {\n  function coordinatesAreEqual(coordinate1, coordinate2) {\n    return (\n      Math.abs(coordinate1[0] - coordinate2[0]) < PROXIMITY_CUTOFF &&\n      Math.abs(coordinate1[1] - coordinate2[1]) < PROXIMITY_CUTOFF\n    );\n  }\n\n  return features.find((f) => {\n    const geometry = f.getGeometry();\n    const featureCoordinates = geometry.getCoordinates();\n    return (\n      (coordinatesAreEqual(featureCoordinates[0], searchCoordinates[0]) &&\n        coordinatesAreEqual(featureCoordinates[1], searchCoordinates[1])) ||\n      (coordinatesAreEqual(featureCoordinates[0], searchCoordinates[1]) &&\n        coordinatesAreEqual(featureCoordinates[1], searchCoordinates[0]))\n    );\n  });\n}\n\nexport const SIDE_TO_COMPASS_DIRECTION_MAP = { top: \"north\", right: \"east\", bottom: \"south\", left: \"west\" };\nexport const COMPASS_DIRECTION_TO_SIDE_MAP = { north: \"top\", east: \"right\", south: \"bottom\", west: \"left\" };\n\n// Note that coordinates are returned in clockwise order\nexport function rectangleFeatureSideCoordinates(feature, map) {\n  const coordinates = feature.getGeometry().getLinearRing(0).getCoordinates();\n  const lonLats = coordinates.map((coordinate) => toLonLat(coordinate));\n  const pixels = coordinates.map((coordinate) => map.getPixelFromCoordinate(coordinate));\n  const sides = {\n    top: {\n      coordinates: [coordinates[0], coordinates[1]],\n      lonLats: [lonLats[0], lonLats[1]],\n      pixels: [pixels[0], pixels[1]],\n    },\n    right: {\n      coordinates: [coordinates[1], coordinates[2]],\n      lonLats: [lonLats[1], lonLats[2]],\n      pixels: [pixels[1], pixels[2]],\n    },\n    bottom: {\n      coordinates: [coordinates[2], coordinates[3]],\n      lonLats: [lonLats[2], lonLats[3]],\n      pixels: [pixels[2], pixels[3]],\n    },\n    left: {\n      coordinates: [coordinates[3], coordinates[4]],\n      lonLats: [lonLats[3], lonLats[4]],\n      pixels: [pixels[3], pixels[4]],\n    },\n  };\n  return sides;\n}\n\nexport function pixelsFromLatLng(map, latLng) {\n  const lngLat = [latLng[1], latLng[0]];\n  const coordinate = fromLonLat(lngLat);\n  const pxCoordinate = map.getPixelFromCoordinate(coordinate);\n  return pxCoordinate;\n}\n\nexport function latLngObjToCoordinate(latLngObj) {\n  const lngLat = [latLngObj.lng, latLngObj.lat];\n  const coordinate = fromLonLat(lngLat);\n  return coordinate;\n}\n\nexport function coordinateToLatLngObj(coordinate) {\n  const lngLat = toLonLat(coordinate);\n  return { lng: lngLat[0], lat: lngLat[1] };\n}\n\nexport function latLngToCoordinate(latLng) {\n  const lngLat = [latLng[1], latLng[0]];\n  const coordinate = fromLonLat(lngLat);\n  return coordinate;\n}\n\nexport const PIXEL_COORDINATE_COMPARISON_THRESHOLD = 0.00001;\nexport function truncatePixelCoordinateDecimal(num) {\n  return truncateDecimal(num, PIXEL_COORDINATE_COMPARISON_THRESHOLD);\n}\n\nexport function truncateDecimal(num, digits) {\n  const numS = num.toString();\n  const decPos = numS.indexOf(\".\");\n  const substrLength = decPos == -1 ? numS.length : 1 + decPos + digits;\n  const trimmedResult = numS.substr(0, substrLength);\n  const finalResult = isNaN(trimmedResult) ? 0 : trimmedResult;\n\n  return parseFloat(finalResult);\n}\n\nexport function latLngFromPixelCoordinate(map, pixelCoordinate) {\n  const coordinate = map.getCoordinateFromPixel(pixelCoordinate);\n  const lngLat = toLonLat(coordinate);\n  const latLng = [lngLat[1], lngLat[0]];\n  return latLng;\n}\n\nexport function distanceBetweenPixelCoordinatesInInches(map, pixelCoordinate1, pixelCoordinate2) {\n  const coordinate1 = map.getCoordinateFromPixel(pixelCoordinate1);\n  const coordinate2 = map.getCoordinateFromPixel(pixelCoordinate2);\n  const lngLat1 = toLonLat(coordinate1);\n  const lngLat2 = toLonLat(coordinate2);\n  return getDistance(lngLat1, lngLat2) * METERS_TO_INCHES;\n}\n\nexport function distanceBetweenCoordinates(startPoint, endPoint) {\n  const startPointLonLat = toLonLat(startPoint);\n  const endPointLonLat = toLonLat(endPoint);\n  return getDistance(startPointLonLat, endPointLonLat);\n}\n\nexport function distanceBetweenCoordinatesInInches(startPoint, endPoint) {\n  return distanceBetweenCoordinates(startPoint, endPoint) * METERS_TO_INCHES;\n}\n\nexport function mercatorAdjustedLengthInMeters(map, rawLength) {\n  const projection = map.getView().getProjection();\n  const baseResolution = map.getView().getResolution();\n  const center = map.getView().getCenter();\n\n  const localResolution = getPointResolution(projection, baseResolution, center);\n  const adjustedLength = rawLength * (baseResolution / localResolution);\n\n  return adjustedLength;\n}\n", "import { toLonLat } from \"ol/proj\";\nimport { FEET_TO_METERS, mercatorAdjustedLengthInMeters } from \"../ol-helpers\";\n\nexport default class BuildingImagePlacementCreator {\n  constructor(mapManager, imagePath, uploadedBuildingImageId, width, height, feetPerPixel) {\n    this.mapManager = mapManager;\n    this.map = mapManager.map;\n    this.project = mapManager.project;\n\n    this.imagePath = imagePath;\n    this.uploadedBuildingImageId = uploadedBuildingImageId;\n    this.width = width;\n    this.height = height;\n    this.feetPerPixel = feetPerPixel;\n  }\n\n  create() {\n    let uploadedBuildingImage = this.project.getUploadedBuildingImage(this.uploadedBuildingImageId);\n\n    if (!uploadedBuildingImage) {\n      uploadedBuildingImage = this.project.addUploadedBuildingImage({\n        id: this.uploadedBuildingImageId,\n        imagePath: this.imagePath,\n        width: this.width,\n        height: this.height,\n      });\n    }\n\n    const latLngPoints = this.#latLngPoints(this.width, this.height);\n    this.placement = uploadedBuildingImage.addBuildingImagePlacement({ latLngPoints, feetPerPixel: this.feetPerPixel });\n\n    return this.placement;\n  }\n\n  #latLngPoints(imageWidth, imageHeight) {\n    const center = this.mapManager.mapCenter;\n    const resolution = this.mapManager.mapLocalResolution;\n\n    let imageWidthMeters = imageWidth * resolution;\n    let imageHeightMeters = imageHeight * resolution;\n\n    if (this.feetPerPixel) {\n      const rawImageWidthMeters = imageWidth * this.feetPerPixel * FEET_TO_METERS;\n      const rawImageHeightMeters = imageHeight * this.feetPerPixel * FEET_TO_METERS;\n\n      imageWidthMeters = mercatorAdjustedLengthInMeters(this.map, rawImageWidthMeters);\n      imageHeightMeters = mercatorAdjustedLengthInMeters(this.map, rawImageHeightMeters);\n    }\n\n    // Place the center of the image at the center of the visible map\n    const minX = center[0] - imageWidthMeters / 2;\n    const minY = center[1] - imageHeightMeters / 2;\n    const maxX = center[0] + imageWidthMeters / 2;\n    const maxY = center[1] + imageHeightMeters / 2;\n\n    const corners = [\n      [minX, minY],\n      [maxX, minY],\n      [maxX, maxY],\n      [minX, maxY],\n    ];\n\n    const rotatedCorners = this.#rotateCorners(corners);\n\n    const latLngCorners = rotatedCorners.map((corner) => {\n      const lonLat = toLonLat(corner);\n      return { lat: lonLat[1], lng: lonLat[0] };\n    });\n\n    return latLngCorners;\n  }\n\n  #rotateCorners(corners) {\n    const center = this.mapManager.mapCenter;\n    const angle = this.mapManager.rotation;\n\n    const cosAngle = Math.cos(angle);\n    const sinAngle = Math.sin(angle);\n\n    const centerX = center[0];\n    const centerY = center[1];\n\n    return corners.map(([x, y]) => {\n      const dx = x - centerX;\n      const dy = y - centerY;\n      const xRot = dx * cosAngle - dy * sinAngle + centerX;\n      const yRot = dx * sinAngle + dy * cosAngle + centerY;\n      return [xRot, yRot];\n    });\n  }\n}\n", "/**\n * @module ol/ImageState\n */\n\n/**\n * @enum {number}\n */\nexport default {\n  IDLE: 0,\n  LOADING: 1,\n  LOADED: 2,\n  ERROR: 3,\n  EMPTY: 4,\n};\n", "/**\n * @module ol/has\n */\n\nconst ua =\n  typeof navigator !== 'undefined' && typeof navigator.userAgent !== 'undefined'\n    ? navigator.userAgent.toLowerCase()\n    : '';\n\n/**\n * User agent string says we are dealing with Safari as browser.\n * @type {boolean}\n */\nexport const SAFARI = ua.includes('safari') && !ua.includes('chrom');\n\n/**\n * https://bugs.webkit.org/show_bug.cgi?id=237906\n * @type {boolean}\n */\nexport const SAFARI_BUG_237906 =\n  SAFARI &&\n  (ua.includes('version/15.4') ||\n    /cpu (os|iphone os) 15_4 like mac os x/.test(ua));\n\n/**\n * User agent string says we are dealing with a WebKit engine.\n * @type {boolean}\n */\nexport const WEBKIT = ua.includes('webkit') && !ua.includes('edge');\n\n/**\n * User agent string says we are dealing with a Mac as platform.\n * @type {boolean}\n */\nexport const MAC = ua.includes('macintosh');\n\n/**\n * The ratio between physical pixels and device-independent pixels\n * (dips) on the device (`window.devicePixelRatio`).\n * @const\n * @type {number}\n * @api\n */\nexport const DEVICE_PIXEL_RATIO =\n  typeof devicePixelRatio !== 'undefined' ? devicePixelRatio : 1;\n\n/**\n * The execution context is a worker with OffscreenCanvas available.\n * @const\n * @type {boolean}\n */\nexport const WORKER_OFFSCREEN_CANVAS =\n  typeof WorkerGlobalScope !== 'undefined' &&\n  typeof OffscreenCanvas !== 'undefined' &&\n  self instanceof WorkerGlobalScope; //eslint-disable-line\n\n/**\n * Image.prototype.decode() is supported.\n * @type {boolean}\n */\nexport const IMAGE_DECODE =\n  typeof Image !== 'undefined' && Image.prototype.decode;\n\n/**\n * createImageBitmap() is supported.\n * @type {boolean}\n */\nexport const CREATE_IMAGE_BITMAP = typeof createImageBitmap === 'function';\n\n/**\n * @type {boolean}\n */\nexport const PASSIVE_EVENT_LISTENERS = (function () {\n  let passive = false;\n  try {\n    const options = Object.defineProperty({}, 'passive', {\n      get: function () {\n        passive = true;\n      },\n    });\n\n    // @ts-ignore Ignore invalid event type '_'\n    window.addEventListener('_', null, options);\n    // @ts-ignore Ignore invalid event type '_'\n    window.removeEventListener('_', null, options);\n  } catch {\n    // passive not supported\n  }\n  return passive;\n})();\n", "import {WORKER_OFFSCREEN_CANVAS} from './has.js';\n\n/**\n * @module ol/dom\n */\n\n/**\n * @typedef {Object} ImageAttributes\n * @property {string|null} [crossOrigin] Cross origin.\n * @property {ReferrerPolicy} [referrerPolicy]  Referrer policy.\n */\n\n//FIXME Move this function to the canvas module\n/**\n * Create an html canvas element and returns its 2d context.\n * @param {number} [width] Canvas width.\n * @param {number} [height] Canvas height.\n * @param {Array<HTMLCanvasElement|OffscreenCanvas>} [canvasPool] Canvas pool to take existing canvas from.\n * @param {CanvasRenderingContext2DSettings} [settings] CanvasRenderingContext2DSettings\n * @return {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} The context.\n */\nexport function createCanvasContext2D(width, height, canvasPool, settings) {\n  /** @type {HTMLCanvasElement|OffscreenCanvas} */\n  let canvas;\n  if (canvasPool && canvasPool.length) {\n    canvas = /** @type {HTMLCanvasElement} */ (canvasPool.shift());\n  } else if (WORKER_OFFSCREEN_CANVAS) {\n    canvas = new (class extends OffscreenCanvas {\n      style = {};\n    })(width ?? 300, height ?? 150);\n  } else {\n    canvas = document.createElement('canvas');\n  }\n  if (width) {\n    canvas.width = width;\n  }\n  if (height) {\n    canvas.height = height;\n  }\n  return /** @type {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} */ (\n    canvas.getContext('2d', settings)\n  );\n}\n\n/**\n * @type {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D}\n */\nlet sharedCanvasContext;\n\n/**\n * @return {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} Shared canvas context.\n */\nexport function getSharedCanvasContext2D() {\n  if (!sharedCanvasContext) {\n    sharedCanvasContext = createCanvasContext2D(1, 1);\n  }\n  return sharedCanvasContext;\n}\n\n/**\n * Releases canvas memory to avoid exceeding memory limits in Safari.\n * See https://pqina.nl/blog/total-canvas-memory-use-exceeds-the-maximum-limit/\n * @param {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} context Context.\n */\nexport function releaseCanvas(context) {\n  const canvas = context.canvas;\n  canvas.width = 1;\n  canvas.height = 1;\n  context.clearRect(0, 0, 1, 1);\n}\n\n/**\n * Get the current computed width for the given element including margin,\n * padding and border.\n * Equivalent to jQuery's `$(el).outerWidth(true)`.\n * @param {!HTMLElement} element Element.\n * @return {number} The width.\n */\nexport function outerWidth(element) {\n  let width = element.offsetWidth;\n  const style = getComputedStyle(element);\n  width += parseInt(style.marginLeft, 10) + parseInt(style.marginRight, 10);\n\n  return width;\n}\n\n/**\n * Get the current computed height for the given element including margin,\n * padding and border.\n * Equivalent to jQuery's `$(el).outerHeight(true)`.\n * @param {!HTMLElement} element Element.\n * @return {number} The height.\n */\nexport function outerHeight(element) {\n  let height = element.offsetHeight;\n  const style = getComputedStyle(element);\n  height += parseInt(style.marginTop, 10) + parseInt(style.marginBottom, 10);\n\n  return height;\n}\n\n/**\n * @param {Node} newNode Node to replace old node\n * @param {Node} oldNode The node to be replaced\n */\nexport function replaceNode(newNode, oldNode) {\n  const parent = oldNode.parentNode;\n  if (parent) {\n    parent.replaceChild(newNode, oldNode);\n  }\n}\n\n/**\n * @param {Node} node The node to remove the children from.\n */\nexport function removeChildren(node) {\n  while (node.lastChild) {\n    node.lastChild.remove();\n  }\n}\n\n/**\n * Transform the children of a parent node so they match the\n * provided list of children.  This function aims to efficiently\n * remove, add, and reorder child nodes while maintaining a simple\n * implementation (it is not guaranteed to minimize DOM operations).\n * @param {Node} node The parent node whose children need reworking.\n * @param {Array<Node>} children The desired children.\n */\nexport function replaceChildren(node, children) {\n  const oldChildren = node.childNodes;\n\n  for (let i = 0; true; ++i) {\n    const oldChild = oldChildren[i];\n    const newChild = children[i];\n\n    // check if our work is done\n    if (!oldChild && !newChild) {\n      break;\n    }\n\n    // check if children match\n    if (oldChild === newChild) {\n      continue;\n    }\n\n    // check if a new child needs to be added\n    if (!oldChild) {\n      node.appendChild(newChild);\n      continue;\n    }\n\n    // check if an old child needs to be removed\n    if (!newChild) {\n      node.removeChild(oldChild);\n      --i;\n      continue;\n    }\n\n    // reorder\n    node.insertBefore(newChild, oldChild);\n  }\n}\n\n/**\n * Creates a minimal structure that mocks a DIV to be used by the composite and\n * layer renderer in a worker environment\n * @return {HTMLDivElement} mocked DIV\n */\nexport function createMockDiv() {\n  const mockedDiv = new Proxy(\n    {\n      /**\n       * @type {Array<HTMLElement>}\n       */\n      childNodes: [],\n      /**\n       * @param {HTMLElement} node html node.\n       * @return {HTMLElement} html node.\n       */\n      appendChild: function (node) {\n        this.childNodes.push(node);\n        return node;\n      },\n      /**\n       * dummy function, as this structure is not supposed to have a parent.\n       */\n      remove: function () {},\n      /**\n       * @param {HTMLElement} node html node.\n       * @return {HTMLElement} html node.\n       */\n      removeChild: function (node) {\n        const index = this.childNodes.indexOf(node);\n        if (index === -1) {\n          throw new Error('Node to remove was not found');\n        }\n        this.childNodes.splice(index, 1);\n        return node;\n      },\n      /**\n       * @param {HTMLElement} newNode new html node.\n       * @param {HTMLElement} referenceNode reference html node.\n       * @return {HTMLElement} new html node.\n       */\n      insertBefore: function (newNode, referenceNode) {\n        const index = this.childNodes.indexOf(referenceNode);\n        if (index === -1) {\n          throw new Error('Reference node not found');\n        }\n        this.childNodes.splice(index, 0, newNode);\n        return newNode;\n      },\n      style: {},\n    },\n    {\n      get(target, prop, receiver) {\n        if (prop === 'firstElementChild') {\n          return target.childNodes.length > 0 ? target.childNodes[0] : null;\n        }\n        return Reflect.get(target, prop, receiver);\n      },\n    },\n  );\n  return /** @type {HTMLDivElement} */ (/** @type {*} */ (mockedDiv));\n}\n\n/***\n * @param {*} obj The object to check.\n * @return {obj is (HTMLCanvasElement | OffscreenCanvas)} The object is a canvas.\n */\nexport function isCanvas(obj) {\n  return (\n    (typeof HTMLCanvasElement !== 'undefined' &&\n      obj instanceof HTMLCanvasElement) ||\n    (typeof OffscreenCanvas !== 'undefined' && obj instanceof OffscreenCanvas)\n  );\n}\n", "/**\n * @module ol/color\n */\nimport {createCanvasContext2D} from './dom.js';\nimport {clamp, toFixed} from './math.js';\n\n/**\n * A color represented as a short array [red, green, blue, alpha].\n * red, green, and blue should be integers in the range 0..255 inclusive.\n * alpha should be a float in the range 0..1 inclusive. If no alpha value is\n * given then `1` will be used.\n * @typedef {Array<number>} Color\n * @api\n */\n\n/**\n * Color to indicate that no color should be rendered. This is meant to be used for per-reference\n * comparisons only.\n * @type {Color}\n */\nexport const NO_COLOR = [NaN, NaN, NaN, 0];\n\nlet colorParseContext;\n/**\n * @return {CanvasRenderingContext2D} The color parse context\n */\nfunction getColorParseContext() {\n  if (!colorParseContext) {\n    colorParseContext = createCanvasContext2D(1, 1, undefined, {\n      willReadFrequently: true,\n      desynchronized: true,\n    });\n  }\n  return colorParseContext;\n}\n\nconst rgbModernRegEx =\n  /^rgba?\\(\\s*(\\d+%?)\\s+(\\d+%?)\\s+(\\d+%?)(?:\\s*\\/\\s*(\\d+%|\\d*\\.\\d+|[01]))?\\s*\\)$/i;\nconst rgbLegacyAbsoluteRegEx =\n  /^rgba?\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)(?:\\s*,\\s*(\\d+%|\\d*\\.\\d+|[01]))?\\s*\\)$/i;\nconst rgbLegacyPercentageRegEx =\n  /^rgba?\\(\\s*(\\d+%)\\s*,\\s*(\\d+%)\\s*,\\s*(\\d+%)(?:\\s*,\\s*(\\d+%|\\d*\\.\\d+|[01]))?\\s*\\)$/i;\nconst hexRegEx = /^#([\\da-f]{3,4}|[\\da-f]{6}|[\\da-f]{8})$/i;\n\n/**\n * @param {string} s Color component as number or percentage.\n * @param {number} divider Divider for percentage.\n * @return {number} Color component.\n */\nfunction toColorComponent(s, divider) {\n  return s.endsWith('%')\n    ? Number(s.substring(0, s.length - 1)) / divider\n    : Number(s);\n}\n\n/**\n * @param {string} color Color string.\n */\nfunction throwInvalidColor(color) {\n  throw new Error('failed to parse \"' + color + '\" as color');\n}\n\n/**\n * @param {string} color Color string.\n * @return {Color} RGBa color array.\n */\nfunction parseRgba(color) {\n  // Fast lane for rgb(a) colors\n  if (color.toLowerCase().startsWith('rgb')) {\n    const rgb =\n      color.match(rgbLegacyAbsoluteRegEx) ||\n      color.match(rgbModernRegEx) ||\n      color.match(rgbLegacyPercentageRegEx);\n    if (rgb) {\n      const alpha = rgb[4];\n      const rgbDivider = 100 / 255;\n      return [\n        clamp((toColorComponent(rgb[1], rgbDivider) + 0.5) | 0, 0, 255),\n        clamp((toColorComponent(rgb[2], rgbDivider) + 0.5) | 0, 0, 255),\n        clamp((toColorComponent(rgb[3], rgbDivider) + 0.5) | 0, 0, 255),\n        alpha !== undefined ? clamp(toColorComponent(alpha, 100), 0, 1) : 1,\n      ];\n    }\n    throwInvalidColor(color);\n  }\n  // Fast lane for hex colors (also with alpha)\n  if (color.startsWith('#')) {\n    if (hexRegEx.test(color)) {\n      const hex = color.substring(1);\n      const step = hex.length <= 4 ? 1 : 2;\n      const colorFromHex = [0, 0, 0, 255];\n      for (let i = 0, ii = hex.length; i < ii; i += step) {\n        let colorComponent = parseInt(hex.substring(i, i + step), 16);\n        if (step === 1) {\n          colorComponent += colorComponent << 4;\n        }\n        colorFromHex[i / step] = colorComponent;\n      }\n      colorFromHex[3] = colorFromHex[3] / 255;\n      return colorFromHex;\n    }\n    throwInvalidColor(color);\n  }\n  // Use canvas color serialization to parse the color into hex or rgba\n  // See https://www.w3.org/TR/2021/SPSD-2dcontext-20210128/#serialization-of-a-color\n  const context = getColorParseContext();\n  context.fillStyle = '#abcdef';\n  let invalidCheckFillStyle = context.fillStyle;\n  context.fillStyle = color;\n  if (context.fillStyle === invalidCheckFillStyle) {\n    context.fillStyle = '#fedcba';\n    invalidCheckFillStyle = context.fillStyle;\n    context.fillStyle = color;\n    if (context.fillStyle === invalidCheckFillStyle) {\n      throwInvalidColor(color);\n    }\n  }\n  const colorString = context.fillStyle;\n  if (colorString.startsWith('#') || colorString.startsWith('rgba')) {\n    return parseRgba(colorString);\n  }\n  context.clearRect(0, 0, 1, 1);\n  context.fillRect(0, 0, 1, 1);\n  const colorFromImage = Array.from(context.getImageData(0, 0, 1, 1).data);\n  colorFromImage[3] = toFixed(colorFromImage[3] / 255, 3);\n  return colorFromImage;\n}\n\n/**\n * Return the color as an rgba string.\n * @param {Color|string} color Color.\n * @return {string} Rgba string.\n * @api\n */\nexport function asString(color) {\n  if (typeof color === 'string') {\n    return color;\n  }\n  return toString(color);\n}\n\n/**\n * @type {number}\n */\nconst MAX_CACHE_SIZE = 1024;\n\n/**\n * We maintain a small cache of parsed strings.  Whenever the cache grows too large,\n * we delete an arbitrary set of the entries.\n *\n * @type {Object<string, Color>}\n */\nconst cache = {};\n\n/**\n * @type {number}\n */\nlet cacheSize = 0;\n\n/**\n * @param {Color} color A color that may or may not have an alpha channel.\n * @return {Color} The input color with an alpha channel.  If the input color has\n * an alpha channel, the input color will be returned unchanged.  Otherwise, a new\n * array will be returned with the input color and an alpha channel of 1.\n */\nexport function withAlpha(color) {\n  if (color.length === 4) {\n    return color;\n  }\n  const output = color.slice();\n  output[3] = 1;\n  return output;\n}\n\n// The functions b1, b2, a1, a2, rgbaToLcha and lchaToRgba below are adapted from\n// https://stackoverflow.com/a/67219995/2389327\n\n/**\n * @param {number} v Input value.\n * @return {number} Output value.\n */\nfunction b1(v) {\n  return v > 0.0031308 ? Math.pow(v, 1 / 2.4) * 269.025 - 14.025 : v * 3294.6;\n}\n\n/**\n * @param {number} v Input value.\n * @return {number} Output value.\n */\nfunction b2(v) {\n  return v > 0.2068965 ? Math.pow(v, 3) : (v - 4 / 29) * (108 / 841);\n}\n\n/**\n * @param {number} v Input value.\n * @return {number} Output value.\n */\nfunction a1(v) {\n  return v > 10.314724 ? Math.pow((v + 14.025) / 269.025, 2.4) : v / 3294.6;\n}\n\n/**\n * @param {number} v Input value.\n * @return {number} Output value.\n */\nfunction a2(v) {\n  return v > 0.0088564 ? Math.pow(v, 1 / 3) : v / (108 / 841) + 4 / 29;\n}\n\n/**\n * @param {Color} color RGBA color.\n * @return {Color} LCHuv color with alpha.\n */\nexport function rgbaToLcha(color) {\n  const r = a1(color[0]);\n  const g = a1(color[1]);\n  const b = a1(color[2]);\n  const y = a2(r * 0.222488403 + g * 0.716873169 + b * 0.06060791);\n  const l = 500 * (a2(r * 0.452247074 + g * 0.399439023 + b * 0.148375274) - y);\n  const q = 200 * (y - a2(r * 0.016863605 + g * 0.117638439 + b * 0.865350722));\n  const h = Math.atan2(q, l) * (180 / Math.PI);\n  return [\n    116 * y - 16,\n    Math.sqrt(l * l + q * q),\n    h < 0 ? h + 360 : h,\n    color[3],\n  ];\n}\n\n/**\n * @param {Color} color LCHuv color with alpha.\n * @return {Color} RGBA color.\n */\nexport function lchaToRgba(color) {\n  const l = (color[0] + 16) / 116;\n  const c = color[1];\n  const h = (color[2] * Math.PI) / 180;\n  const y = b2(l);\n  const x = b2(l + (c / 500) * Math.cos(h));\n  const z = b2(l - (c / 200) * Math.sin(h));\n  const r = b1(x * 3.021973625 - y * 1.617392459 - z * 0.404875592);\n  const g = b1(x * -0.943766287 + y * 1.916279586 + z * 0.027607165);\n  const b = b1(x * 0.069407491 - y * 0.22898585 + z * 1.159737864);\n  return [\n    clamp((r + 0.5) | 0, 0, 255),\n    clamp((g + 0.5) | 0, 0, 255),\n    clamp((b + 0.5) | 0, 0, 255),\n    color[3],\n  ];\n}\n\n/**\n * @param {string} s String.\n * @return {Color} Color.\n */\nexport function fromString(s) {\n  if (s === 'none') {\n    return NO_COLOR;\n  }\n  if (cache.hasOwnProperty(s)) {\n    return cache[s];\n  }\n  if (cacheSize >= MAX_CACHE_SIZE) {\n    let i = 0;\n    for (const key in cache) {\n      if ((i++ & 3) === 0) {\n        delete cache[key];\n        --cacheSize;\n      }\n    }\n  }\n\n  const color = parseRgba(s);\n  if (color.length !== 4) {\n    throwInvalidColor(s);\n  }\n  for (const c of color) {\n    if (isNaN(c)) {\n      throwInvalidColor(s);\n    }\n  }\n  cache[s] = color;\n  ++cacheSize;\n  return color;\n}\n\n/**\n * Return the color as an array. This function maintains a cache of calculated\n * arrays which means the result should not be modified.\n * @param {Color|string} color Color.\n * @return {Color} Color.\n * @api\n */\nexport function asArray(color) {\n  if (Array.isArray(color)) {\n    return color;\n  }\n  return fromString(color);\n}\n\n/**\n * @param {Color} color Color.\n * @return {string} String.\n */\nexport function toString(color) {\n  let r = color[0];\n  if (r != (r | 0)) {\n    r = (r + 0.5) | 0;\n  }\n  let g = color[1];\n  if (g != (g | 0)) {\n    g = (g + 0.5) | 0;\n  }\n  let b = color[2];\n  if (b != (b | 0)) {\n    b = (b + 0.5) | 0;\n  }\n  const a = color[3] === undefined ? 1 : Math.round(color[3] * 1000) / 1000;\n  return 'rgba(' + r + ',' + g + ',' + b + ',' + a + ')';\n}\n\n/**\n * @param {string} s String.\n * @return {boolean} Whether the string is actually a valid color\n */\nexport function isStringColor(s) {\n  try {\n    fromString(s);\n    return true;\n  } catch {\n    return false;\n  }\n}\n", "/**\n * @module ol/Image\n */\nimport ImageState from './ImageState.js';\nimport {listenOnce, unlistenByKey} from './events.js';\nimport EventType from './events/EventType.js';\nimport EventTarget from './events/Target.js';\nimport {toPromise} from './functions.js';\nimport {CREATE_IMAGE_BITMAP, IMAGE_DECODE} from './has.js';\n\n/**\n * A function that takes an {@link module:ol/Image~ImageWrapper} for the image and a\n * `{string}` for the src as arguments. It is supposed to make it so the\n * underlying image {@link module:ol/Image~ImageWrapper#getImage} is assigned the\n * content specified by the src. If not specified, the default is\n *\n *     function(image, src) {\n *       image.getImage().src = src;\n *     }\n *\n * Providing a custom `imageLoadFunction` can be useful to load images with\n * post requests or - in general - through XHR requests, where the src of the\n * image element would be set to a data URI when the content is loaded.\n *\n * @typedef {function(import(\"./Image.js\").default, string): void} LoadFunction\n * @api\n */\n\n/**\n * @typedef {Object} ImageObject\n * @property {import(\"./extent.js\").Extent} [extent] Extent, if different from the requested one.\n * @property {import(\"./resolution.js\").ResolutionLike} [resolution] Resolution, if different from the requested one.\n * When x and y resolution are different, use the array type (`[xResolution, yResolution]`).\n * @property {number} [pixelRatio] Pixel ratio, if different from the requested one.\n * @property {import('./DataTile.js').ImageLike} image Image.\n */\n\n/**\n * Loader function used for image sources. Receives extent, resolution and pixel ratio as arguments.\n * For images that cover any extent and resolution (static images), the loader function should not accept\n * any arguments. The function returns an {@link import(\"./DataTile.js\").ImageLike image}, an\n * {@link import(\"./Image.js\").ImageObject image object}, or a promise for the same.\n * For loaders that generate images, the promise should not resolve until the image is loaded.\n * If the returned image does not match the extent, resolution or pixel ratio passed to the loader,\n * it has to return an {@link import(\"./Image.js\").ImageObject image object} with the `image` and the\n * correct `extent`, `resolution` and `pixelRatio`.\n *\n * @typedef {function(import(\"./extent.js\").Extent, number, number, (function(HTMLImageElement, string): void)=): import(\"./DataTile.js\").ImageLike|ImageObject|Promise<import(\"./DataTile.js\").ImageLike|ImageObject>} Loader\n * @api\n */\n\n/**\n * Loader function used for image sources. Receives extent, resolution and pixel ratio as arguments.\n * The function returns a promise for an  {@link import(\"./Image.js\").ImageObject image object}.\n *\n * @typedef {function(import(\"./extent.js\").Extent, number, number, (function(HTMLImageElement, string): void)=): Promise<import(\"./DataTile.js\").ImageLike|ImageObject>} ImageObjectPromiseLoader\n */\n\nclass ImageWrapper extends EventTarget {\n  /**\n   * @param {import(\"./extent.js\").Extent} extent Extent.\n   * @param {number|Array<number>|undefined} resolution Resolution. If provided as array, x and y\n   * resolution will be assumed.\n   * @param {number} pixelRatio Pixel ratio.\n   * @param {import(\"./ImageState.js\").default|Loader} stateOrLoader State.\n   */\n  constructor(extent, resolution, pixelRatio, stateOrLoader) {\n    super();\n\n    /**\n     * @protected\n     * @type {import(\"./extent.js\").Extent}\n     */\n    this.extent = extent;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.pixelRatio_ = pixelRatio;\n\n    /**\n     * @protected\n     * @type {number|Array<number>|undefined}\n     */\n    this.resolution = resolution;\n\n    /**\n     * @protected\n     * @type {import(\"./ImageState.js\").default}\n     */\n    this.state =\n      typeof stateOrLoader === 'function' ? ImageState.IDLE : stateOrLoader;\n\n    /**\n     * @private\n     * @type {import('./DataTile.js').ImageLike|null}\n     */\n    this.image_ = null;\n\n    /**\n     * @protected\n     * @type {Loader|null}\n     */\n    this.loader = typeof stateOrLoader === 'function' ? stateOrLoader : null;\n  }\n\n  /**\n   * @protected\n   */\n  changed() {\n    this.dispatchEvent(EventType.CHANGE);\n  }\n\n  /**\n   * @return {import(\"./extent.js\").Extent} Extent.\n   */\n  getExtent() {\n    return this.extent;\n  }\n\n  /**\n   * @return {import('./DataTile.js').ImageLike} Image.\n   */\n  getImage() {\n    return this.image_;\n  }\n\n  /**\n   * @return {number} PixelRatio.\n   */\n  getPixelRatio() {\n    return this.pixelRatio_;\n  }\n\n  /**\n   * @return {number|Array<number>} Resolution.\n   */\n  getResolution() {\n    return /** @type {number} */ (this.resolution);\n  }\n\n  /**\n   * @return {import(\"./ImageState.js\").default} State.\n   */\n  getState() {\n    return this.state;\n  }\n\n  /**\n   * Load not yet loaded URI.\n   */\n  load() {\n    if (this.state == ImageState.IDLE) {\n      if (this.loader) {\n        this.state = ImageState.LOADING;\n        this.changed();\n        const resolution = this.getResolution();\n        const requestResolution = Array.isArray(resolution)\n          ? resolution[0]\n          : resolution;\n        toPromise(() =>\n          this.loader(\n            this.getExtent(),\n            requestResolution,\n            this.getPixelRatio(),\n          ),\n        )\n          .then((image) => {\n            if ('image' in image) {\n              this.image_ = image.image;\n            }\n            if ('extent' in image) {\n              this.extent = image.extent;\n            }\n            if ('resolution' in image) {\n              this.resolution = image.resolution;\n            }\n            if ('pixelRatio' in image) {\n              this.pixelRatio_ = image.pixelRatio;\n            }\n            if (\n              image instanceof HTMLImageElement ||\n              (CREATE_IMAGE_BITMAP && image instanceof ImageBitmap) ||\n              image instanceof HTMLCanvasElement ||\n              image instanceof HTMLVideoElement\n            ) {\n              this.image_ = image;\n            }\n            this.state = ImageState.LOADED;\n          })\n          .catch((error) => {\n            this.state = ImageState.ERROR;\n            console.error(error); // eslint-disable-line no-console\n          })\n          .finally(() => this.changed());\n      }\n    }\n  }\n\n  /**\n   * @param {import('./DataTile.js').ImageLike} image The image.\n   */\n  setImage(image) {\n    this.image_ = image;\n  }\n\n  /**\n   * @param {number|Array<number>} resolution Resolution.\n   */\n  setResolution(resolution) {\n    this.resolution = resolution;\n  }\n}\n\n/**\n * @param {import('./DataTile.js').ImageLike} image Image element.\n * @param {function():any} loadHandler Load callback function.\n * @param {function():any} errorHandler Error callback function.\n * @return {function():void} Callback to stop listening.\n */\nexport function listenImage(image, loadHandler, errorHandler) {\n  const img = /** @type {HTMLImageElement} */ (image);\n  let listening = true;\n  let decoding = false;\n  let loaded = false;\n\n  const listenerKeys = [\n    listenOnce(img, EventType.LOAD, function () {\n      loaded = true;\n      if (!decoding) {\n        loadHandler();\n      }\n    }),\n  ];\n\n  if (img.src && IMAGE_DECODE) {\n    decoding = true;\n    img\n      .decode()\n      .then(function () {\n        if (listening) {\n          loadHandler();\n        }\n      })\n      .catch(function (error) {\n        if (listening) {\n          if (loaded) {\n            loadHandler();\n          } else {\n            errorHandler();\n          }\n        }\n      });\n  } else {\n    listenerKeys.push(listenOnce(img, EventType.ERROR, errorHandler));\n  }\n\n  return function unlisten() {\n    listening = false;\n    listenerKeys.forEach(unlistenByKey);\n  };\n}\n\n/**\n * Loads an image.\n * @param {HTMLImageElement} image Image, not yet loaded.\n * @param {string} [src] `src` attribute of the image. Optional, not required if already present.\n * @return {Promise<HTMLImageElement>} Promise resolving to an `HTMLImageElement`.\n * @api\n */\nexport function load(image, src) {\n  return new Promise((resolve, reject) => {\n    function handleLoad() {\n      unlisten();\n      resolve(image);\n    }\n    function handleError() {\n      unlisten();\n      reject(new Error('Image load error'));\n    }\n    function unlisten() {\n      image.removeEventListener('load', handleLoad);\n      image.removeEventListener('error', handleError);\n    }\n    image.addEventListener('load', handleLoad);\n    image.addEventListener('error', handleError);\n    if (src) {\n      image.src = src;\n    }\n  });\n}\n\n/**\n * @param {HTMLImageElement} image Image, not yet loaded.\n * @param {string} [src] `src` attribute of the image. Optional, not required if already present.\n * @return {Promise<HTMLImageElement>} Promise resolving to an `HTMLImageElement`.\n */\nexport function decodeFallback(image, src) {\n  if (src) {\n    image.src = src;\n  }\n  return image.src && IMAGE_DECODE\n    ? new Promise((resolve, reject) =>\n        image\n          .decode()\n          .then(() => resolve(image))\n          .catch((e) =>\n            image.complete && image.width ? resolve(image) : reject(e),\n          ),\n      )\n    : load(image);\n}\n\n/**\n * Loads an image and decodes it to an `ImageBitmap` if `createImageBitmap()` is supported. Returns\n * the loaded image otherwise.\n * @param {HTMLImageElement} image Image, not yet loaded.\n * @param {string} [src] `src` attribute of the image. Optional, not required if already present.\n * @return {Promise<ImageBitmap|HTMLImageElement>} Promise resolving to an `ImageBitmap` or an\n * `HTMLImageElement` if `createImageBitmap()` is not supported.\n * @api\n */\nexport function decode(image, src) {\n  if (src) {\n    image.src = src;\n  }\n  return image.src && IMAGE_DECODE && CREATE_IMAGE_BITMAP\n    ? image\n        .decode()\n        .then(() => createImageBitmap(image))\n        .catch((e) => {\n          if (image.complete && image.width) {\n            return image;\n          }\n          throw e;\n        })\n    : decodeFallback(image);\n}\n\nexport default ImageWrapper;\n", "/**\n * @module ol/style/IconImageCache\n */\nimport ImageState from '../ImageState.js';\nimport {asArray} from '../color.js';\nimport {getSharedCanvasContext2D} from '../dom.js';\n\n/**\n * @classdesc\n * Singleton class. Available through {@link module:ol/style/IconImageCache.shared}.\n */\nclass IconImageCache {\n  constructor() {\n    /**\n     * @type {!Object<string, import(\"./IconImage.js\").default>}\n     * @private\n     */\n    this.cache_ = {};\n\n    /**\n     * @type {!Object<string, CanvasPattern>}\n     * @private\n     */\n    this.patternCache_ = {};\n\n    /**\n     * @type {number}\n     * @private\n     */\n    this.cacheSize_ = 0;\n\n    /**\n     * @type {number}\n     * @private\n     */\n    this.maxCacheSize_ = 1024;\n  }\n\n  /**\n   * FIXME empty description for jsdoc\n   */\n  clear() {\n    this.cache_ = {};\n    this.patternCache_ = {};\n    this.cacheSize_ = 0;\n  }\n\n  /**\n   * @return {boolean} Can expire cache.\n   */\n  canExpireCache() {\n    return this.cacheSize_ > this.maxCacheSize_;\n  }\n\n  /**\n   * FIXME empty description for jsdoc\n   */\n  expire() {\n    if (this.canExpireCache()) {\n      let i = 0;\n      for (const key in this.cache_) {\n        const iconImage = this.cache_[key];\n        if ((i++ & 3) === 0 && !iconImage.hasListener()) {\n          delete this.cache_[key];\n          delete this.patternCache_[key];\n          --this.cacheSize_;\n        }\n      }\n    }\n  }\n\n  /**\n   * @param {string} src Src.\n   * @param {import(\"../color.js\").Color|string|null} color Color.\n   * @return {import(\"./IconImage.js\").default} Icon image.\n   */\n  get(src, color) {\n    const key = getCacheKey(src, color);\n\n    const icon = key in this.cache_ ? this.cache_[key] : null;\n    return icon;\n  }\n\n  /**\n   * @param {string} src Src.\n   * @param {import(\"../color.js\").Color|string|null} color Color.\n   * @return {CanvasPattern} Icon image.\n   */\n  getPattern(src, color) {\n    const key = getCacheKey(src, color);\n    return key in this.patternCache_ ? this.patternCache_[key] : null;\n  }\n\n  /**\n   * @param {string} src Src.\n   * @param {import(\"../color.js\").Color|string|null} color Color.\n   * @param {import(\"./IconImage.js\").default|null} iconImage Icon image.\n   * @param {boolean} [pattern] Also cache a `'repeat'` pattern with this `iconImage`.\n   */\n  set(src, color, iconImage, pattern) {\n    const key = getCacheKey(src, color);\n    const update = key in this.cache_;\n    this.cache_[key] = iconImage;\n    if (pattern) {\n      if (iconImage.getImageState() === ImageState.IDLE) {\n        iconImage.load();\n      }\n      if (iconImage.getImageState() === ImageState.LOADING) {\n        iconImage.ready().then(() => {\n          this.patternCache_[key] = getSharedCanvasContext2D().createPattern(\n            iconImage.getImage(1),\n            'repeat',\n          );\n        });\n      } else {\n        this.patternCache_[key] = getSharedCanvasContext2D().createPattern(\n          iconImage.getImage(1),\n          'repeat',\n        );\n      }\n    }\n    if (!update) {\n      ++this.cacheSize_;\n    }\n  }\n\n  /**\n   * Set the cache size of the icon cache. Default is `1024`. Change this value when\n   * your map uses more than 1024 different icon images and you are not caching icon\n   * styles on the application level.\n   * @param {number} maxCacheSize Cache max size.\n   * @api\n   */\n  setSize(maxCacheSize) {\n    this.maxCacheSize_ = maxCacheSize;\n    this.expire();\n  }\n}\n\n/**\n * @param {string} src Src.\n * @param {import(\"../color.js\").Color|string|null} color Color.\n * @return {string} Cache key.\n */\nexport function getCacheKey(src, color) {\n  const colorString = color ? asArray(color) : 'null';\n  return src + ':' + colorString;\n}\n\nexport default IconImageCache;\n\n/**\n * The {@link module:ol/style/IconImageCache~IconImageCache} for\n * {@link module:ol/style/Icon~Icon} images.\n * @api\n */\nexport const shared = new IconImageCache();\n", "/**\n * @module ol/style/IconImage\n */\n\nimport {decodeFallback} from '../Image.js';\nimport ImageState from '../ImageState.js';\nimport {asString} from '../color.js';\nimport {createCanvasContext2D} from '../dom.js';\nimport EventType from '../events/EventType.js';\nimport EventTarget from '../events/Target.js';\nimport {shared as iconImageCache} from './IconImageCache.js';\n\n/**\n * @type {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D}\n */\nlet taintedTestContext = null;\n\nclass IconImage extends EventTarget {\n  /**\n   * @param {HTMLImageElement|HTMLCanvasElement|OffscreenCanvas|ImageBitmap|null} image Image.\n   * @param {string|undefined} src Src.\n   * @param {import('../dom.js').ImageAttributes} imageAttributes Image attributes options.\n   * @param {import(\"../ImageState.js\").default|undefined} imageState Image state.\n   * @param {import(\"../color.js\").Color|string|null} color Color.\n   */\n  constructor(image, src, imageAttributes, imageState, color) {\n    super();\n\n    /**\n     * @private\n     * @type {HTMLImageElement|OffscreenCanvas|HTMLCanvasElement|ImageBitmap}\n     */\n    this.hitDetectionImage_ = null;\n\n    /**\n     * @private\n     * @type {HTMLImageElement|HTMLCanvasElement|OffscreenCanvas|ImageBitmap|null}\n     */\n    this.image_ = image;\n\n    /**\n     * @private\n     * @type {string|null}\n     */\n    this.crossOrigin_ = imageAttributes?.crossOrigin;\n\n    /**\n     * @private\n     * @type {ReferrerPolicy}\n     */\n    this.referrerPolicy_ = imageAttributes?.referrerPolicy;\n\n    /**\n     * @private\n     * @type {Object<number, HTMLCanvasElement|OffscreenCanvas>}\n     */\n    this.canvas_ = {};\n\n    /**\n     * @private\n     * @type {import(\"../color.js\").Color|string|null}\n     */\n    this.color_ = color;\n\n    /**\n     * @private\n     * @type {import(\"../ImageState.js\").default}\n     */\n    this.imageState_ = imageState === undefined ? ImageState.IDLE : imageState;\n\n    /**\n     * @private\n     * @type {import(\"../size.js\").Size|null}\n     */\n    this.size_ =\n      image && image.width && image.height ? [image.width, image.height] : null;\n\n    /**\n     * @private\n     * @type {string|undefined}\n     */\n    this.src_ = src;\n\n    /**\n     * @private\n     */\n    this.tainted_;\n\n    /**\n     * @private\n     * @type {Promise<void>|null}\n     */\n    this.ready_ = null;\n  }\n\n  /**\n   * @private\n   */\n  initializeImage_() {\n    this.image_ = new Image();\n    if (this.crossOrigin_ !== null) {\n      this.image_.crossOrigin = this.crossOrigin_;\n    }\n    if (this.referrerPolicy_ !== undefined) {\n      this.image_.referrerPolicy = this.referrerPolicy_;\n    }\n  }\n\n  /**\n   * @private\n   * @return {boolean} The image canvas is tainted.\n   */\n  isTainted_() {\n    if (this.tainted_ === undefined && this.imageState_ === ImageState.LOADED) {\n      if (!taintedTestContext) {\n        taintedTestContext = createCanvasContext2D(1, 1, undefined, {\n          willReadFrequently: true,\n        });\n      }\n      taintedTestContext.drawImage(this.image_, 0, 0);\n      try {\n        taintedTestContext.getImageData(0, 0, 1, 1);\n        this.tainted_ = false;\n      } catch {\n        taintedTestContext = null;\n        this.tainted_ = true;\n      }\n    }\n    return this.tainted_ === true;\n  }\n\n  /**\n   * @private\n   */\n  dispatchChangeEvent_() {\n    this.dispatchEvent(EventType.CHANGE);\n  }\n\n  /**\n   * @private\n   */\n  handleImageError_() {\n    this.imageState_ = ImageState.ERROR;\n    this.dispatchChangeEvent_();\n  }\n\n  /**\n   * @private\n   */\n  handleImageLoad_() {\n    this.imageState_ = ImageState.LOADED;\n    this.size_ = [this.image_.width, this.image_.height];\n    this.dispatchChangeEvent_();\n  }\n\n  /**\n   * @param {number} pixelRatio Pixel ratio.\n   * @return {HTMLImageElement|HTMLCanvasElement|OffscreenCanvas|ImageBitmap} Image or Canvas element or image bitmap.\n   */\n  getImage(pixelRatio) {\n    if (!this.image_) {\n      this.initializeImage_();\n    }\n    this.replaceColor_(pixelRatio);\n    return this.canvas_[pixelRatio] ? this.canvas_[pixelRatio] : this.image_;\n  }\n\n  /**\n   * @param {HTMLImageElement|HTMLCanvasElement|OffscreenCanvas|ImageBitmap} image Image.\n   */\n  setImage(image) {\n    this.image_ = image;\n  }\n\n  /**\n   * @param {number} pixelRatio Pixel ratio.\n   * @return {number} Image or Canvas element.\n   */\n  getPixelRatio(pixelRatio) {\n    this.replaceColor_(pixelRatio);\n    return this.canvas_[pixelRatio] ? pixelRatio : 1;\n  }\n\n  /**\n   * @return {import(\"../ImageState.js\").default} Image state.\n   */\n  getImageState() {\n    return this.imageState_;\n  }\n\n  /**\n   * @return {HTMLImageElement|HTMLCanvasElement|OffscreenCanvas|ImageBitmap} Image element.\n   */\n  getHitDetectionImage() {\n    if (!this.image_) {\n      this.initializeImage_();\n    }\n    if (!this.hitDetectionImage_) {\n      if (this.isTainted_()) {\n        const width = this.size_[0];\n        const height = this.size_[1];\n        const context = createCanvasContext2D(width, height);\n        context.fillRect(0, 0, width, height);\n        this.hitDetectionImage_ = context.canvas;\n      } else {\n        this.hitDetectionImage_ = this.image_;\n      }\n    }\n    return this.hitDetectionImage_;\n  }\n\n  /**\n   * Get the size of the icon (in pixels).\n   * @return {import(\"../size.js\").Size} Image size.\n   */\n  getSize() {\n    return this.size_;\n  }\n\n  /**\n   * @return {string|undefined} Image src.\n   */\n  getSrc() {\n    return this.src_;\n  }\n\n  /**\n   * Load not yet loaded URI.\n   */\n  load() {\n    if (this.imageState_ !== ImageState.IDLE) {\n      return;\n    }\n    if (!this.image_) {\n      this.initializeImage_();\n    }\n\n    this.imageState_ = ImageState.LOADING;\n    try {\n      if (this.src_ !== undefined) {\n        /** @type {HTMLImageElement} */ (this.image_).src = this.src_;\n      }\n    } catch {\n      this.handleImageError_();\n    }\n    if (this.image_ instanceof HTMLImageElement) {\n      decodeFallback(this.image_, this.src_)\n        .then((image) => {\n          this.image_ = image;\n          this.handleImageLoad_();\n        })\n        .catch(this.handleImageError_.bind(this));\n    }\n  }\n\n  /**\n   * @param {number} pixelRatio Pixel ratio.\n   * @private\n   */\n  replaceColor_(pixelRatio) {\n    if (\n      !this.color_ ||\n      this.canvas_[pixelRatio] ||\n      this.imageState_ !== ImageState.LOADED\n    ) {\n      return;\n    }\n\n    const image = this.image_;\n    const ctx = createCanvasContext2D(\n      Math.ceil(image.width * pixelRatio),\n      Math.ceil(image.height * pixelRatio),\n    );\n    const canvas = ctx.canvas;\n\n    ctx.scale(pixelRatio, pixelRatio);\n    ctx.drawImage(image, 0, 0);\n\n    ctx.globalCompositeOperation = 'multiply';\n    ctx.fillStyle = asString(this.color_);\n    ctx.fillRect(0, 0, canvas.width / pixelRatio, canvas.height / pixelRatio);\n\n    ctx.globalCompositeOperation = 'destination-in';\n    ctx.drawImage(image, 0, 0);\n\n    this.canvas_[pixelRatio] = canvas;\n  }\n\n  /**\n   * @return {Promise<void>} Promise that resolves when the image is loaded.\n   */\n  ready() {\n    if (!this.ready_) {\n      this.ready_ = new Promise((resolve) => {\n        if (\n          this.imageState_ === ImageState.LOADED ||\n          this.imageState_ === ImageState.ERROR\n        ) {\n          resolve();\n        } else {\n          const onChange = () => {\n            if (\n              this.imageState_ === ImageState.LOADED ||\n              this.imageState_ === ImageState.ERROR\n            ) {\n              this.removeEventListener(EventType.CHANGE, onChange);\n              resolve();\n            }\n          };\n          this.addEventListener(EventType.CHANGE, onChange);\n        }\n      });\n    }\n    return this.ready_;\n  }\n}\n\n/**\n * @param {HTMLImageElement|HTMLCanvasElement|OffscreenCanvas|ImageBitmap|null} image Image.\n * @param {string|undefined} src Src.\n * @param {import('../dom.js').ImageAttributes} imageAttributes Image attributes options.\n * @param {import(\"../ImageState.js\").default|undefined} imageState Image state.\n * @param {import(\"../color.js\").Color|string|null} color Color.\n * @param {boolean} [pattern] Also cache a `repeat` pattern with the icon image.\n * @return {IconImage} Icon image.\n */\nexport function get(image, src, imageAttributes, imageState, color, pattern) {\n  let iconImage =\n    src === undefined ? undefined : iconImageCache.get(src, color);\n  if (!iconImage) {\n    iconImage = new IconImage(\n      image,\n      image && 'src' in image ? image.src || undefined : src,\n      imageAttributes,\n      imageState,\n      color,\n    );\n    iconImageCache.set(src, color, iconImage, pattern);\n  }\n  if (pattern && iconImage && !iconImageCache.getPattern(src, color)) {\n    iconImageCache.set(src, color, iconImage, pattern);\n  }\n  return iconImage;\n}\n\nexport default IconImage;\n", "/**\n * @module ol/colorlike\n */\nimport ImageState from './ImageState.js';\nimport {toString} from './color.js';\nimport {createCanvasContext2D} from './dom.js';\nimport {get as getIconImage} from './style/IconImage.js';\nimport {shared as iconCache} from './style/IconImageCache.js';\n\n/**\n * @typedef {Object} PatternDescriptor\n * @property {string} src Pattern image URL\n * @property {import(\"./color.js\").Color|string} [color] Color to tint the pattern with.\n * @property {import(\"./size.js\").Size} [size] Size of the desired slice from the pattern image.\n * Use this together with `offset` when the pattern image is a sprite sheet.\n * @property {import(\"./size.js\").Size} [offset] Offset of the desired slice from the pattern image.\n * Use this together with `size` when the pattern image is a sprite sheet.\n */\n\n/**\n * A type accepted by CanvasRenderingContext2D.fillStyle\n * or CanvasRenderingContext2D.strokeStyle.\n * Represents a color, [CanvasPattern](https://developer.mozilla.org/en-US/docs/Web/API/CanvasPattern),\n * or [CanvasGradient](https://developer.mozilla.org/en-US/docs/Web/API/CanvasGradient). The origin for\n * patterns and gradients as fill style is an increment of 512 css pixels from map coordinate\n * `[0, 0]`. For seamless repeat patterns, width and height of the pattern image\n * must be a factor of two (2, 4, 8, ..., 512).\n *\n * @typedef {string|CanvasPattern|CanvasGradient} ColorLike\n * @api\n */\n\n/**\n * @param {import(\"./color.js\").Color|ColorLike|PatternDescriptor|null} color Color.\n * @return {ColorLike|null} The color as an {@link ol/colorlike~ColorLike}.\n * @api\n */\nexport function asColorLike(color) {\n  if (!color) {\n    return null;\n  }\n  if (Array.isArray(color)) {\n    return toString(color);\n  }\n  if (typeof color === 'object' && 'src' in color) {\n    return asCanvasPattern(color);\n  }\n  return color;\n}\n\n/**\n * @param {PatternDescriptor} pattern Pattern descriptor.\n * @return {CanvasPattern|null} Canvas pattern or null if the pattern referenced in the\n * PatternDescriptor was not found in the icon image cache.\n */\nfunction asCanvasPattern(pattern) {\n  if (!pattern.offset || !pattern.size) {\n    return iconCache.getPattern(pattern.src, pattern.color);\n  }\n\n  const cacheKey = pattern.src + ':' + pattern.offset;\n\n  const canvasPattern = iconCache.getPattern(cacheKey, pattern.color);\n  if (canvasPattern) {\n    return canvasPattern;\n  }\n\n  const iconImage = iconCache.get(pattern.src, null);\n  if (iconImage.getImageState() !== ImageState.LOADED) {\n    return null;\n  }\n  const patternCanvasContext = createCanvasContext2D(\n    pattern.size[0],\n    pattern.size[1],\n  );\n  patternCanvasContext.drawImage(\n    iconImage.getImage(1),\n    pattern.offset[0],\n    pattern.offset[1],\n    pattern.size[0],\n    pattern.size[1],\n    0,\n    0,\n    pattern.size[0],\n    pattern.size[1],\n  );\n  getIconImage(\n    patternCanvasContext.canvas,\n    cacheKey,\n    undefined,\n    ImageState.LOADED,\n    pattern.color,\n    true,\n  );\n  return iconCache.getPattern(cacheKey, pattern.color);\n}\n", "/**\n * @module ol/css\n */\n\n/**\n * @typedef {Object} FontParameters\n * @property {string} style Style.\n * @property {string} variant Variant.\n * @property {string} weight Weight.\n * @property {string} size Size.\n * @property {string} lineHeight LineHeight.\n * @property {string} family Family.\n * @property {Array<string>} families Families.\n */\n\n/**\n * The CSS class for hidden feature.\n *\n * @const\n * @type {string}\n */\nexport const CLASS_HIDDEN = 'ol-hidden';\n\n/**\n * The CSS class that we'll give the DOM elements to have them selectable.\n *\n * @const\n * @type {string}\n */\nexport const CLASS_SELECTABLE = 'ol-selectable';\n\n/**\n * The CSS class that we'll give the DOM elements to have them unselectable.\n *\n * @const\n * @type {string}\n */\nexport const CLASS_UNSELECTABLE = 'ol-unselectable';\n\n/**\n * The CSS class for unsupported feature.\n *\n * @const\n * @type {string}\n */\nexport const CLASS_UNSUPPORTED = 'ol-unsupported';\n\n/**\n * The CSS class for controls.\n *\n * @const\n * @type {string}\n */\nexport const CLASS_CONTROL = 'ol-control';\n\n/**\n * The CSS class that we'll give the DOM elements that are collapsed, i.e.\n * to those elements which usually can be expanded.\n *\n * @const\n * @type {string}\n */\nexport const CLASS_COLLAPSED = 'ol-collapsed';\n\n/**\n * From https://stackoverflow.com/questions/10135697/regex-to-parse-any-css-font\n * @type {RegExp}\n */\nconst fontRegEx = new RegExp(\n  [\n    '^\\\\s*(?=(?:(?:[-a-z]+\\\\s*){0,2}(italic|oblique))?)',\n    '(?=(?:(?:[-a-z]+\\\\s*){0,2}(small-caps))?)',\n    '(?=(?:(?:[-a-z]+\\\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)',\n    '(?:(?:normal|\\\\1|\\\\2|\\\\3)\\\\s*){0,3}((?:xx?-)?',\n    '(?:small|large)|medium|smaller|larger|[\\\\.\\\\d]+(?:\\\\%|in|[cem]m|ex|p[ctx]))',\n    '(?:\\\\s*\\\\/\\\\s*(normal|[\\\\.\\\\d]+(?:\\\\%|in|[cem]m|ex|p[ctx])?))',\n    '?\\\\s*([-,\\\\\"\\\\\\'\\\\sa-z0-9]+?)\\\\s*$',\n  ].join(''),\n  'i',\n);\n/** @type {Array<'style'|'variant'|'weight'|'size'|'lineHeight'|'family'>} */\nconst fontRegExMatchIndex = [\n  'style',\n  'variant',\n  'weight',\n  'size',\n  'lineHeight',\n  'family',\n];\n\n/** @type {Object<string|number, number>} */\nexport const fontWeights = {\n  normal: 400,\n  bold: 700,\n};\n\n/**\n * Get the list of font families from a font spec.  Note that this doesn't work\n * for font families that have commas in them.\n * @param {string} fontSpec The CSS font property.\n * @return {FontParameters|null} The font parameters (or null if the input spec is invalid).\n */\nexport const getFontParameters = function (fontSpec) {\n  const match = fontSpec.match(fontRegEx);\n  if (!match) {\n    return null;\n  }\n  const style = /** @type {FontParameters} */ ({\n    lineHeight: 'normal',\n    size: '1.2em',\n    style: 'normal',\n    weight: '400',\n    variant: 'normal',\n  });\n  for (let i = 0, ii = fontRegExMatchIndex.length; i < ii; ++i) {\n    const value = match[i + 1];\n    if (value !== undefined) {\n      style[fontRegExMatchIndex[i]] =\n        typeof value === 'string' ? value.trim() : value;\n    }\n  }\n  if (isNaN(Number(style.weight)) && style.weight in fontWeights) {\n    style.weight = fontWeights[style.weight];\n  }\n  style.families = style.family\n    .split(/,\\s?/)\n    .map((f) => f.trim().replace(/^['\"]|['\"]$/g, ''));\n  return style;\n};\n", "/**\n * @module ol/render/canvas\n */\nimport BaseObject from '../Object.js';\nimport {fontWeights, getFontParameters} from '../css.js';\nimport {createCanvasContext2D} from '../dom.js';\nimport {WORKER_OFFSCREEN_CANVAS} from '../has.js';\nimport {clear} from '../obj.js';\n\n/**\n * @typedef {'Circle' | 'Image' | 'LineString' | 'Polygon' | 'Text' | 'Default'} BuilderType\n */\n\n/**\n * @typedef {Object} FillState\n * @property {import(\"../colorlike.js\").ColorLike} fillStyle FillStyle.\n */\n\n/**\n * @typedef Label\n * @property {number} width Width.\n * @property {number} height Height.\n * @property {Array<string|number>} contextInstructions ContextInstructions.\n */\n\n/**\n * @typedef {Object} FillStrokeState\n * @property {import(\"../colorlike.js\").ColorLike} [currentFillStyle] Current FillStyle.\n * @property {import(\"../colorlike.js\").ColorLike} [currentStrokeStyle] Current StrokeStyle.\n * @property {CanvasLineCap} [currentLineCap] Current LineCap.\n * @property {Array<number>} currentLineDash Current LineDash.\n * @property {number} [currentLineDashOffset] Current LineDashOffset.\n * @property {CanvasLineJoin} [currentLineJoin] Current LineJoin.\n * @property {number} [currentLineWidth] Current LineWidth.\n * @property {number} [currentMiterLimit] Current MiterLimit.\n * @property {number} [currentStrokeOffset] Current StrokeOffset.\n * @property {number} [lastStroke] Last stroke.\n * @property {import(\"../colorlike.js\").ColorLike} [fillStyle] FillStyle.\n * @property {import(\"../colorlike.js\").ColorLike} [strokeStyle] StrokeStyle.\n * @property {CanvasLineCap} [lineCap] LineCap.\n * @property {Array<number>} lineDash LineDash.\n * @property {number} [lineDashOffset] LineDashOffset.\n * @property {CanvasLineJoin} [lineJoin] LineJoin.\n * @property {number} [lineWidth] LineWidth.\n * @property {number} [miterLimit] MiterLimit.\n * @property {number} [strokeOffset] StrokeOffset.\n * @property {number} [fillPatternScale] Fill pattern scale.\n */\n\n/**\n * @typedef {Object} StrokeState\n * @property {CanvasLineCap} lineCap LineCap.\n * @property {Array<number>} lineDash LineDash.\n * @property {number} lineDashOffset LineDashOffset.\n * @property {CanvasLineJoin} lineJoin LineJoin.\n * @property {number} lineWidth LineWidth.\n * @property {number} miterLimit MiterLimit.\n * @property {number} [strokeOffset] StrokeOffset.\n * @property {import(\"../colorlike.js\").ColorLike} strokeStyle StrokeStyle.\n */\n\n/**\n * @typedef {Object} TextState\n * @property {string} font Font.\n * @property {CanvasTextAlign} [textAlign] TextAlign.\n * @property {number} [repeat] Repeat.\n * @property {import(\"../style/Text.js\").TextJustify} [justify] Justify.\n * @property {CanvasTextBaseline} textBaseline TextBaseline.\n * @property {import(\"../style/Text.js\").TextPlacement} [placement] Placement.\n * @property {number} [maxAngle] MaxAngle.\n * @property {boolean} [overflow] Overflow.\n * @property {import(\"../style/Fill.js\").default} [backgroundFill] BackgroundFill.\n * @property {import(\"../style/Stroke.js\").default} [backgroundStroke] BackgroundStroke.\n * @property {import(\"../size.js\").Size} [scale] Scale.\n * @property {Array<number>} [padding] Padding.\n */\n\n/**\n * @typedef {Object} SerializableInstructions\n * @property {Array<*>} instructions The rendering instructions.\n * @property {Array<*>} hitDetectionInstructions The rendering hit detection instructions.\n * @property {Array<number>} coordinates The array of all coordinates.\n * @property {!Object<string, TextState>} [textStates] The text states (decluttering).\n * @property {!Object<string, FillState>} [fillStates] The fill states (decluttering).\n * @property {!Object<string, StrokeState>} [strokeStates] The stroke states (decluttering).\n */\n\n/**\n * @typedef {Object<number, import(\"./canvas/Executor.js\").ReplayImageOrLabelArgs>} DeclutterImageWithText\n */\n\n/**\n * @const\n * @type {string}\n */\nexport const defaultFont = '10px sans-serif';\n\n/**\n * @const\n * @type {string}\n */\nexport const defaultFillStyle = '#000';\n\n/**\n * @const\n * @type {CanvasLineCap}\n */\nexport const defaultLineCap = 'round';\n\n/**\n * @const\n * @type {Array<number>}\n */\nexport const defaultLineDash = [];\n\n/**\n * @const\n * @type {number}\n */\nexport const defaultLineDashOffset = 0;\n\n/**\n * @const\n * @type {CanvasLineJoin}\n */\nexport const defaultLineJoin = 'round';\n\n/**\n * @const\n * @type {number}\n */\nexport const defaultMiterLimit = 10;\n\n/**\n * @const\n * @type {number}\n */\nexport const defaultStrokeOffset = 0;\n\n/**\n * @const\n * @type {import(\"../colorlike.js\").ColorLike}\n */\nexport const defaultStrokeStyle = '#000';\n\n/**\n * @const\n * @type {CanvasTextAlign}\n */\nexport const defaultTextAlign = 'center';\n\n/**\n * @const\n * @type {CanvasTextBaseline}\n */\nexport const defaultTextBaseline = 'middle';\n\n/**\n * @const\n * @type {Array<number>}\n */\nexport const defaultPadding = [0, 0, 0, 0];\n\n/**\n * @const\n * @type {number}\n */\nexport const defaultLineWidth = 1;\n\n/**\n * @type {BaseObject}\n */\nexport const checkedFonts = new BaseObject();\n\n/**\n * @type {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D}\n */\nlet measureContext = null;\n\n/**\n * @type {string}\n */\nlet measureFont;\n\n/**\n * @type {!Object<string, number>}\n */\nexport const textHeights = {};\n\nconst genericFontFamilies = new Set([\n  'serif',\n  'sans-serif',\n  'monospace',\n  'cursive',\n  'fantasy',\n  'system-ui',\n  'ui-serif',\n  'ui-sans-serif',\n  'ui-monospace',\n  'ui-rounded',\n  'emoji',\n  'math',\n  'fangsong',\n]);\n\n/**\n * @param {string} style Css font-style\n * @param {string} weight Css font-weight\n * @param {string} family Css font-family\n * @return {string} Font key.\n */\nfunction getFontKey(style, weight, family) {\n  return `${style} ${weight} 16px \"${family}\"`;\n}\n\n/**\n * Clears the label cache when a font becomes available.\n * @param {string} fontSpec CSS font spec.\n */\nexport const registerFont = (function () {\n  const retries = 100;\n  let timeout, fontFaceSet;\n\n  /**\n   * @param {string} fontSpec Css font spec\n   * @return {Promise<boolean>} Font with style and weight is available\n   */\n  async function isAvailable(fontSpec) {\n    await fontFaceSet.ready;\n    const font = getFontParameters(fontSpec);\n    const checkFamily = font.families[0].toLowerCase();\n    const checkWeight = font.weight;\n    /** @type {Array<FontFace>} */\n    const matching = [];\n    fontFaceSet.forEach(\n      /**\n       * @param {FontFace} f Font face.\n       */\n      (f) => {\n        const family = f.family.replace(/^['\"]|['\"]$/g, '').toLowerCase();\n        const weight = fontWeights[f.weight] || f.weight;\n        if (\n          family === checkFamily &&\n          f.style === font.style &&\n          weight == checkWeight\n        ) {\n          matching.push(f);\n        }\n      },\n    );\n    if (matching.length === 0) {\n      return false;\n    }\n    // Load each matching face with `FontFace.load()` instead of querying the\n    // set with `FontFaceSet.load()`. The latter only resolves faces whose\n    // `unicode-range` covers its (default) test string, so subset fonts -\n    // e.g. those served by Google Fonts - would never be detected.\n    const loaded = await Promise.all(\n      matching.map((f) =>\n        f.load().then(\n          () => true, // available\n          () => false, // not available\n        ),\n      ),\n    );\n    return loaded.some((available) => available);\n  }\n\n  async function check() {\n    await fontFaceSet.ready;\n    let done = true;\n    const checkedFontsProperties = checkedFonts.getProperties();\n    const fonts = Object.keys(checkedFontsProperties).filter(\n      (key) => checkedFontsProperties[key] < retries,\n    );\n    for (let i = fonts.length - 1; i >= 0; --i) {\n      const font = fonts[i];\n      let currentRetries = checkedFontsProperties[font];\n      if (currentRetries < retries) {\n        if (await isAvailable(font)) {\n          clear(textHeights);\n          checkedFonts.set(font, retries);\n        } else {\n          currentRetries += 10;\n          checkedFonts.set(font, currentRetries, true);\n          if (currentRetries < retries) {\n            done = false;\n          }\n        }\n      }\n    }\n    timeout = undefined;\n    if (!done) {\n      timeout = setTimeout(check, 100);\n    }\n  }\n\n  return async function (fontSpec) {\n    if (!fontFaceSet) {\n      fontFaceSet = WORKER_OFFSCREEN_CANVAS ? self.fonts : document.fonts;\n    }\n    const font = getFontParameters(fontSpec);\n    if (!font) {\n      return;\n    }\n    const families = font.families;\n    let needCheck = false;\n    for (const family of families) {\n      if (genericFontFamilies.has(family)) {\n        continue;\n      }\n      const key = getFontKey(font.style, font.weight, family);\n      if (checkedFonts.get(key) !== undefined) {\n        continue;\n      }\n      checkedFonts.set(key, 0, true);\n      needCheck = true;\n    }\n    if (needCheck) {\n      clearTimeout(timeout);\n      timeout = setTimeout(check, 100);\n    }\n  };\n})();\n\n/**\n * @param {string} font Font to use for measuring.\n * @return {import(\"../size.js\").Size} Measurement.\n */\nexport const measureTextHeight = (function () {\n  /**\n   * @type {HTMLDivElement}\n   */\n  let measureElement;\n  return function (fontSpec) {\n    let height = textHeights[fontSpec];\n    if (height == undefined) {\n      if (WORKER_OFFSCREEN_CANVAS) {\n        const font = getFontParameters(fontSpec);\n        const metrics = measureText(fontSpec, '\u017Dg');\n        const lineHeight = isNaN(Number(font.lineHeight))\n          ? 1.2\n          : Number(font.lineHeight);\n        height =\n          lineHeight *\n          (metrics.actualBoundingBoxAscent + metrics.actualBoundingBoxDescent);\n      } else {\n        if (!measureElement) {\n          measureElement = document.createElement('div');\n          measureElement.innerHTML = 'M';\n          measureElement.style.minHeight = '0';\n          measureElement.style.maxHeight = 'none';\n          measureElement.style.height = 'auto';\n          measureElement.style.padding = '0';\n          measureElement.style.border = 'none';\n          measureElement.style.position = 'absolute';\n          measureElement.style.display = 'block';\n          measureElement.style.left = '-99999px';\n        }\n        measureElement.style.font = fontSpec;\n        document.body.appendChild(measureElement);\n        height = measureElement.offsetHeight;\n        document.body.removeChild(measureElement);\n      }\n      textHeights[fontSpec] = height;\n    }\n    return height;\n  };\n})();\n\n/**\n * @param {string} font Font.\n * @param {string} text Text.\n * @return {TextMetrics} Text metrics.\n */\nfunction measureText(font, text) {\n  if (!measureContext) {\n    measureContext = createCanvasContext2D(1, 1);\n  }\n  if (font != measureFont) {\n    measureContext.font = font;\n    measureFont = measureContext.font;\n  }\n  return measureContext.measureText(text);\n}\n\n/**\n * @param {string} font Font.\n * @param {string} text Text.\n * @return {number} Width.\n */\nexport function measureTextWidth(font, text) {\n  return measureText(font, text).width;\n}\n\n/**\n * Measure text width using a cache.\n * @param {string} font The font.\n * @param {string} text The text to measure.\n * @param {Object<string, number>} cache A lookup of cached widths by text.\n * @return {number} The text width.\n */\nexport function measureAndCacheTextWidth(font, text, cache) {\n  if (text in cache) {\n    return cache[text];\n  }\n  const width = text\n    .split('\\n')\n    .reduce((prev, curr) => Math.max(prev, measureTextWidth(font, curr)), 0);\n  cache[text] = width;\n  return width;\n}\n\n/**\n * @param {TextState} baseStyle Base style.\n * @param {Array<string>} chunks Text chunks to measure.\n * @return {{width: number, height: number, widths: Array<number>, heights: Array<number>, lineWidths: Array<number>}}} Text metrics.\n */\nexport function getTextDimensions(baseStyle, chunks) {\n  const widths = [];\n  const heights = [];\n  const lineWidths = [];\n  let width = 0;\n  let lineWidth = 0;\n  let height = 0;\n  let lineHeight = 0;\n  for (let i = 0, ii = chunks.length; i <= ii; i += 2) {\n    const text = chunks[i];\n    if (text === '\\n' || i === ii) {\n      width = Math.max(width, lineWidth);\n      lineWidths.push(lineWidth);\n      lineWidth = 0;\n      height += lineHeight;\n      lineHeight = 0;\n      continue;\n    }\n    const font = chunks[i + 1] || baseStyle.font;\n    const currentWidth = measureTextWidth(font, text);\n    widths.push(currentWidth);\n    lineWidth += currentWidth;\n    const currentHeight = measureTextHeight(font);\n    heights.push(currentHeight);\n    lineHeight = Math.max(lineHeight, currentHeight);\n  }\n  return {width, height, widths, heights, lineWidths};\n}\n\n/**\n * @param {CanvasRenderingContext2D} context Context.\n * @param {number} rotation Rotation.\n * @param {number} offsetX X offset.\n * @param {number} offsetY Y offset.\n */\nexport function rotateAtOffset(context, rotation, offsetX, offsetY) {\n  if (rotation !== 0) {\n    context.translate(offsetX, offsetY);\n    context.rotate(rotation);\n    context.translate(-offsetX, -offsetY);\n  }\n}\n\n/**\n * @param {CanvasRenderingContext2D|import(\"../render/canvas/ZIndexContext.js\").ZIndexContextProxy} context Context.\n * @param {import(\"../transform.js\").Transform|null} transform Transform.\n * @param {number} opacity Opacity.\n * @param {Label|HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} labelOrImage Label.\n * @param {number} originX Origin X.\n * @param {number} originY Origin Y.\n * @param {number} w Width.\n * @param {number} h Height.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {import(\"../size.js\").Size} scale Scale.\n */\nexport function drawImageOrLabel(\n  context,\n  transform,\n  opacity,\n  labelOrImage,\n  originX,\n  originY,\n  w,\n  h,\n  x,\n  y,\n  scale,\n) {\n  context.save();\n\n  if (opacity !== 1) {\n    if (context.globalAlpha === undefined) {\n      context.globalAlpha = (context) => (context.globalAlpha *= opacity);\n    } else {\n      context.globalAlpha *= opacity;\n    }\n  }\n  if (transform) {\n    context.transform.apply(context, transform);\n  }\n\n  if (/** @type {*} */ (labelOrImage).contextInstructions) {\n    // label\n    context.translate(x, y);\n    context.scale(scale[0], scale[1]);\n    executeLabelInstructions(/** @type {Label} */ (labelOrImage), context);\n  } else if (scale[0] < 0 || scale[1] < 0) {\n    // flipped image\n    context.translate(x, y);\n    context.scale(scale[0], scale[1]);\n    context.drawImage(\n      /** @type {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} */ (\n        labelOrImage\n      ),\n      originX,\n      originY,\n      w,\n      h,\n      0,\n      0,\n      w,\n      h,\n    );\n  } else {\n    // if image not flipped translate and scale can be avoided\n    context.drawImage(\n      /** @type {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} */ (\n        labelOrImage\n      ),\n      originX,\n      originY,\n      w,\n      h,\n      x,\n      y,\n      w * scale[0],\n      h * scale[1],\n    );\n  }\n\n  context.restore();\n}\n\n/**\n * @param {Label} label Label.\n * @param {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} context Context.\n */\nfunction executeLabelInstructions(label, context) {\n  const contextInstructions = label.contextInstructions;\n  for (let i = 0, ii = contextInstructions.length; i < ii; i += 2) {\n    if (Array.isArray(contextInstructions[i + 1])) {\n      context[contextInstructions[i]].apply(\n        context,\n        contextInstructions[i + 1],\n      );\n    } else {\n      context[contextInstructions[i]] = contextInstructions[i + 1];\n    }\n  }\n}\n", "/**\n * @module ol/size\n */\n\n/**\n * An array of numbers representing a size: `[width, height]`.\n * @typedef {Array<number>} Size\n * @api\n */\n\n/**\n * Returns a buffered size.\n * @param {Size} size Size.\n * @param {number} num The amount by which to buffer.\n * @param {Size} [dest] Optional reusable size array.\n * @return {Size} The buffered size.\n */\nexport function buffer(size, num, dest) {\n  if (dest === undefined) {\n    dest = [0, 0];\n  }\n  dest[0] = size[0] + 2 * num;\n  dest[1] = size[1] + 2 * num;\n  return dest;\n}\n\n/**\n * Determines if a size has a positive area.\n * @param {Size} size The size to test.\n * @return {boolean} The size has a positive area.\n */\nexport function hasArea(size) {\n  return size[0] > 0 && size[1] > 0;\n}\n\n/**\n * Returns a size scaled by a ratio. The result will be an array of integers.\n * @param {Size} size Size.\n * @param {number} ratio Ratio.\n * @param {Size} [dest] Optional reusable size array.\n * @return {Size} The scaled size.\n */\nexport function scale(size, ratio, dest) {\n  if (dest === undefined) {\n    dest = [0, 0];\n  }\n  dest[0] = (size[0] * ratio + 0.5) | 0;\n  dest[1] = (size[1] * ratio + 0.5) | 0;\n  return dest;\n}\n\n/**\n * Returns an `Size` array for the passed in number (meaning: square) or\n * `Size` array.\n * (meaning: non-square),\n * @param {number|Size} size Width and height.\n * @param {Size} [dest] Optional reusable size array.\n * @return {Size} Size.\n * @api\n */\nexport function toSize(size, dest) {\n  if (Array.isArray(size)) {\n    return size;\n  }\n  if (dest === undefined) {\n    dest = [size, size];\n  } else {\n    dest[0] = size;\n    dest[1] = size;\n  }\n  return dest;\n}\n", "/**\n * @module ol/style/Image\n */\nimport {toSize} from '../size.js';\nimport {abstract} from '../util.js';\n\n/**\n * @typedef {Object} Options\n * @property {number} opacity Opacity.\n * @property {boolean} rotateWithView If the image should get rotated with the view.\n * @property {number} rotation Rotation.\n * @property {number|import(\"../size.js\").Size} scale Scale.\n * @property {Array<number>} displacement Displacement.\n * @property {import('../style/Style.js').DeclutterMode} declutterMode Declutter mode: `declutter`, `obstacle`, `none`.\n */\n\n/**\n * @classdesc\n * A base class used for creating subclasses and not instantiated in\n * apps. Base class for {@link module:ol/style/Icon~Icon}, {@link module:ol/style/Circle~CircleStyle} and\n * {@link module:ol/style/RegularShape~RegularShape}.\n * @abstract\n * @api\n */\nclass ImageStyle {\n  /**\n   * @param {Options} options Options.\n   */\n  constructor(options) {\n    /**\n     * @private\n     * @type {number}\n     */\n    this.opacity_ = options.opacity;\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.rotateWithView_ = options.rotateWithView;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.rotation_ = options.rotation;\n\n    /**\n     * @private\n     * @type {number|import(\"../size.js\").Size}\n     */\n    this.scale_ = options.scale;\n\n    /**\n     * @private\n     * @type {import(\"../size.js\").Size}\n     */\n    this.scaleArray_ = toSize(options.scale);\n\n    /**\n     * @private\n     * @type {Array<number>}\n     */\n    this.displacement_ = options.displacement;\n\n    /**\n     * @private\n     * @type {import('../style/Style.js').DeclutterMode}\n     */\n    this.declutterMode_ = options.declutterMode;\n  }\n\n  /**\n   * Clones the style.\n   * @return {ImageStyle} The cloned style.\n   * @api\n   */\n  clone() {\n    const scale = this.getScale();\n    return new ImageStyle({\n      opacity: this.getOpacity(),\n      scale: Array.isArray(scale) ? scale.slice() : scale,\n      rotation: this.getRotation(),\n      rotateWithView: this.getRotateWithView(),\n      displacement: this.getDisplacement().slice(),\n      declutterMode: this.getDeclutterMode(),\n    });\n  }\n\n  /**\n   * Get the symbolizer opacity.\n   * @return {number} Opacity.\n   * @api\n   */\n  getOpacity() {\n    return this.opacity_;\n  }\n\n  /**\n   * Determine whether the symbolizer rotates with the map.\n   * @return {boolean} Rotate with map.\n   * @api\n   */\n  getRotateWithView() {\n    return this.rotateWithView_;\n  }\n\n  /**\n   * Get the symoblizer rotation.\n   * @return {number} Rotation.\n   * @api\n   */\n  getRotation() {\n    return this.rotation_;\n  }\n\n  /**\n   * Get the symbolizer scale.\n   * @return {number|import(\"../size.js\").Size} Scale.\n   * @api\n   */\n  getScale() {\n    return this.scale_;\n  }\n\n  /**\n   * Get the symbolizer scale array.\n   * @return {import(\"../size.js\").Size} Scale array.\n   */\n  getScaleArray() {\n    return this.scaleArray_;\n  }\n\n  /**\n   * Get the displacement of the shape\n   * @return {Array<number>} Shape's center displacement\n   * @api\n   */\n  getDisplacement() {\n    return this.displacement_;\n  }\n\n  /**\n   * Get the declutter mode of the shape\n   * @return {import(\"./Style.js\").DeclutterMode} Shape's declutter mode\n   * @api\n   */\n  getDeclutterMode() {\n    return this.declutterMode_;\n  }\n\n  /**\n   * Get the anchor point in pixels. The anchor determines the center point for the\n   * symbolizer.\n   * @abstract\n   * @return {Array<number>} Anchor.\n   */\n  getAnchor() {\n    return abstract();\n  }\n\n  /**\n   * Get the image element for the symbolizer.\n   * @abstract\n   * @param {number} pixelRatio Pixel ratio.\n   * @return {import('../DataTile.js').ImageLike} Image element.\n   */\n  getImage(pixelRatio) {\n    return abstract();\n  }\n\n  /**\n   * @abstract\n   * @return {import('../DataTile.js').ImageLike} Image element.\n   */\n  getHitDetectionImage() {\n    return abstract();\n  }\n\n  /**\n   * Get the image pixel ratio.\n   * @param {number} pixelRatio Pixel ratio.\n   * @return {number} Pixel ratio.\n   */\n  getPixelRatio(pixelRatio) {\n    return 1;\n  }\n\n  /**\n   * @abstract\n   * @return {import(\"../ImageState.js\").default} Image state.\n   */\n  getImageState() {\n    return abstract();\n  }\n\n  /**\n   * @abstract\n   * @return {import(\"../size.js\").Size} Image size.\n   */\n  getImageSize() {\n    return abstract();\n  }\n\n  /**\n   * Get the origin of the symbolizer.\n   * @abstract\n   * @return {Array<number>} Origin.\n   */\n  getOrigin() {\n    return abstract();\n  }\n\n  /**\n   * Get the size of the symbolizer (in pixels).\n   * @abstract\n   * @return {import(\"../size.js\").Size} Size.\n   */\n  getSize() {\n    return abstract();\n  }\n\n  /**\n   * Set the displacement.\n   *\n   * @param {Array<number>} displacement Displacement.\n   * @api\n   */\n  setDisplacement(displacement) {\n    this.displacement_ = displacement;\n  }\n\n  /**\n   * Set the opacity.\n   *\n   * @param {number} opacity Opacity.\n   * @api\n   */\n  setOpacity(opacity) {\n    this.opacity_ = opacity;\n  }\n\n  /**\n   * Set whether to rotate the style with the view.\n   *\n   * @param {boolean} rotateWithView Rotate with map.\n   * @api\n   */\n  setRotateWithView(rotateWithView) {\n    this.rotateWithView_ = rotateWithView;\n  }\n\n  /**\n   * Set the rotation.\n   *\n   * @param {number} rotation Rotation.\n   * @api\n   */\n  setRotation(rotation) {\n    this.rotation_ = rotation;\n  }\n\n  /**\n   * Set the scale.\n   *\n   * @param {number|import(\"../size.js\").Size} scale Scale.\n   * @api\n   */\n  setScale(scale) {\n    this.scale_ = scale;\n    this.scaleArray_ = toSize(scale);\n  }\n\n  /**\n   * @abstract\n   * @param {function(import(\"../events/Event.js\").default): void} listener Listener function.\n   */\n  listenImageChange(listener) {\n    abstract();\n  }\n\n  /**\n   * Load not yet loaded URI.\n   * @abstract\n   */\n  load() {\n    abstract();\n  }\n\n  /**\n   * @abstract\n   * @param {function(import(\"../events/Event.js\").default): void} listener Listener function.\n   */\n  unlistenImageChange(listener) {\n    abstract();\n  }\n\n  /**\n   * @return {Promise<void>} `false` or Promise that resolves when the style is ready to use.\n   */\n  ready() {\n    return Promise.resolve();\n  }\n}\n\nexport default ImageStyle;\n", "/**\n * @module ol/style/RegularShape\n */\n\nimport ImageState from '../ImageState.js';\nimport {asArray} from '../color.js';\nimport {asColorLike} from '../colorlike.js';\nimport {createCanvasContext2D} from '../dom.js';\nimport {\n  defaultFillStyle,\n  defaultLineCap,\n  defaultLineJoin,\n  defaultLineWidth,\n  defaultMiterLimit,\n  defaultStrokeStyle,\n} from '../render/canvas.js';\nimport IconImage from './IconImage.js';\nimport {shared as iconImageCache} from './IconImageCache.js';\nimport ImageStyle from './Image.js';\n\n/**\n * Specify radius for regular polygons, or both radius and radius2 for stars.\n * @typedef {Object} Options\n * @property {import(\"./Fill.js\").default} [fill] Fill style.\n * @property {number} points Number of points for stars and regular polygons. In case of a polygon, the number of points\n * is the number of sides.\n * @property {number} radius Radius of a regular polygon.\n * @property {number} [radius2] Second radius to make a star instead of a regular polygon.\n * @property {number} [angle=0] Shape's angle in radians. A value of 0 will have one of the shape's points facing up.\n * @property {Array<number>} [displacement=[0, 0]] Displacement of the shape in pixels.\n * Positive values will shift the shape right and up.\n * @property {import(\"./Stroke.js\").default} [stroke] Stroke style.\n * @property {number} [rotation=0] Rotation in radians (positive rotation clockwise).\n * @property {boolean} [rotateWithView=false] Whether to rotate the shape with the view.\n * @property {number|import(\"../size.js\").Size} [scale=1] Scale. Unless two dimensional scaling is required a better\n * result may be obtained with appropriate settings for `radius` and `radius2`.\n * @property {import('./Style.js').DeclutterMode} [declutterMode] Declutter mode.\n */\n\n/**\n * @typedef {Object} RenderOptions\n * @property {import(\"../colorlike.js\").ColorLike|undefined} strokeStyle StrokeStyle.\n * @property {number} strokeWidth StrokeWidth.\n * @property {number} size Size.\n * @property {CanvasLineCap} lineCap LineCap.\n * @property {Array<number>|null} lineDash LineDash.\n * @property {number} lineDashOffset LineDashOffset.\n * @property {CanvasLineJoin} lineJoin LineJoin.\n * @property {number} miterLimit MiterLimit.\n */\n\n/**\n * @classdesc\n * Set regular shape style for vector features. The resulting shape will be\n * a regular polygon when `radius` is provided, or a star when both `radius` and\n * `radius2` are provided.\n * @api\n */\nclass RegularShape extends ImageStyle {\n  /**\n   * @param {Options} options Options.\n   */\n  constructor(options) {\n    super({\n      opacity: 1,\n      rotateWithView:\n        options.rotateWithView !== undefined ? options.rotateWithView : false,\n      rotation: options.rotation !== undefined ? options.rotation : 0,\n      scale: options.scale !== undefined ? options.scale : 1,\n      displacement:\n        options.displacement !== undefined ? options.displacement : [0, 0],\n      declutterMode: options.declutterMode,\n    });\n\n    /**\n     * @private\n     * @type {HTMLCanvasElement|OffscreenCanvas|null}\n     */\n    this.hitDetectionCanvas_ = null;\n\n    /**\n     * @private\n     * @type {import(\"./Fill.js\").default|null}\n     */\n    this.fill_ = options.fill !== undefined ? options.fill : null;\n\n    /**\n     * @private\n     * @type {Array<number>}\n     */\n    this.origin_ = [0, 0];\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.points_ = options.points;\n\n    /**\n     * @protected\n     * @type {number}\n     */\n    this.radius = options.radius;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.radius2_ = options.radius2;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.angle_ = options.angle !== undefined ? options.angle : 0;\n\n    /**\n     * @private\n     * @type {import(\"./Stroke.js\").default|null}\n     */\n    this.stroke_ = options.stroke !== undefined ? options.stroke : null;\n\n    /**\n     * @private\n     * @type {import(\"../size.js\").Size}\n     */\n    this.size_;\n\n    /**\n     * @private\n     * @type {RenderOptions}\n     */\n    this.renderOptions_;\n\n    /**\n     * @private\n     */\n    this.imageState_ =\n      this.fill_ && this.fill_.loading()\n        ? ImageState.LOADING\n        : ImageState.LOADED;\n    if (this.imageState_ === ImageState.LOADING) {\n      this.ready().then(() => (this.imageState_ = ImageState.LOADED));\n    }\n    this.render();\n  }\n\n  /**\n   * Clones the style.\n   * @return {RegularShape} The cloned style.\n   * @api\n   * @override\n   */\n  clone() {\n    const scale = this.getScale();\n    const style = new RegularShape({\n      fill: this.getFill() ? this.getFill().clone() : undefined,\n      points: this.getPoints(),\n      radius: this.getRadius(),\n      radius2: this.getRadius2(),\n      angle: this.getAngle(),\n      stroke: this.getStroke() ? this.getStroke().clone() : undefined,\n      rotation: this.getRotation(),\n      rotateWithView: this.getRotateWithView(),\n      scale: Array.isArray(scale) ? scale.slice() : scale,\n      displacement: this.getDisplacement().slice(),\n      declutterMode: this.getDeclutterMode(),\n    });\n    style.setOpacity(this.getOpacity());\n    return style;\n  }\n\n  /**\n   * Get the anchor point in pixels. The anchor determines the center point for the\n   * symbolizer.\n   * @return {Array<number>} Anchor.\n   * @api\n   * @override\n   */\n  getAnchor() {\n    const size = this.size_;\n    const displacement = this.getDisplacement();\n    const scale = this.getScaleArray();\n    // anchor is scaled by renderer but displacement should not be scaled\n    // so divide by scale here\n    return [\n      size[0] / 2 - displacement[0] / scale[0],\n      size[1] / 2 + displacement[1] / scale[1],\n    ];\n  }\n\n  /**\n   * Get the angle used in generating the shape.\n   * @return {number} Shape's rotation in radians.\n   * @api\n   */\n  getAngle() {\n    return this.angle_;\n  }\n\n  /**\n   * Get the fill style for the shape.\n   * @return {import(\"./Fill.js\").default|null} Fill style.\n   * @api\n   */\n  getFill() {\n    return this.fill_;\n  }\n\n  /**\n   * Set the fill style.\n   * @param {import(\"./Fill.js\").default|null} fill Fill style.\n   * @api\n   */\n  setFill(fill) {\n    this.fill_ = fill;\n    this.render();\n  }\n\n  /**\n   * @return {HTMLCanvasElement|OffscreenCanvas} Image element.\n   * @override\n   */\n  getHitDetectionImage() {\n    if (!this.hitDetectionCanvas_) {\n      this.hitDetectionCanvas_ = this.createHitDetectionCanvas_(\n        this.renderOptions_,\n      );\n    }\n    return this.hitDetectionCanvas_;\n  }\n\n  /**\n   * Get the image icon.\n   * @param {number} pixelRatio Pixel ratio.\n   * @return {HTMLCanvasElement|OffscreenCanvas} Image or Canvas element.\n   * @api\n   * @override\n   */\n  getImage(pixelRatio) {\n    const fillKey = this.fill_?.getKey();\n    const cacheKey =\n      `${pixelRatio},${this.angle_},${this.radius},${this.radius2_},${this.points_},${fillKey}` +\n      Object.values(this.renderOptions_).join(',');\n    let image = /** @type {HTMLCanvasElement|OffscreenCanvas} */ (\n      iconImageCache.get(cacheKey, null)?.getImage(1)\n    );\n    if (!image) {\n      const renderOptions = this.renderOptions_;\n      const size = Math.ceil(renderOptions.size * pixelRatio);\n      const context = createCanvasContext2D(size, size);\n      this.draw_(renderOptions, context, pixelRatio);\n\n      image = context.canvas;\n      const iconImage = new IconImage(\n        image,\n        undefined,\n        null,\n        ImageState.LOADED,\n        null,\n      );\n      iconImageCache.set(cacheKey, null, iconImage);\n      // Update the image in place to an ImageBitmap for better performance and lower memory usage\n      createImageBitmap(image).then((imageBitmap) => {\n        iconImage.setImage(imageBitmap);\n      });\n    }\n    return image;\n  }\n\n  /**\n   * Get the image pixel ratio.\n   * @param {number} pixelRatio Pixel ratio.\n   * @return {number} Pixel ratio.\n   * @override\n   */\n  getPixelRatio(pixelRatio) {\n    return pixelRatio;\n  }\n\n  /**\n   * @return {import(\"../size.js\").Size} Image size.\n   * @override\n   */\n  getImageSize() {\n    return this.size_;\n  }\n\n  /**\n   * @return {import(\"../ImageState.js\").default} Image state.\n   * @override\n   */\n  getImageState() {\n    return this.imageState_;\n  }\n\n  /**\n   * Get the origin of the symbolizer.\n   * @return {Array<number>} Origin.\n   * @api\n   * @override\n   */\n  getOrigin() {\n    return this.origin_;\n  }\n\n  /**\n   * Get the number of points for generating the shape.\n   * @return {number} Number of points for stars and regular polygons.\n   * @api\n   */\n  getPoints() {\n    return this.points_;\n  }\n\n  /**\n   * Get the (primary) radius for the shape.\n   * @return {number} Radius.\n   * @api\n   */\n  getRadius() {\n    return this.radius;\n  }\n\n  /**\n   * Set the (primary) radius for the shape.\n   * @param {number} radius Radius.\n   * @api\n   */\n  setRadius(radius) {\n    if (this.radius === radius) {\n      return;\n    }\n    this.radius = radius;\n    this.render();\n  }\n\n  /**\n   * Get the secondary radius for the shape.\n   * @return {number|undefined} Radius2.\n   * @api\n   */\n  getRadius2() {\n    return this.radius2_;\n  }\n\n  /**\n   * Set the secondary radius for the shape.\n   * @param {number|undefined} radius2 Radius2.\n   * @api\n   */\n  setRadius2(radius2) {\n    if (this.radius2_ === radius2) {\n      return;\n    }\n    this.radius2_ = radius2;\n    this.render();\n  }\n\n  /**\n   * Get the size of the symbolizer (in pixels).\n   * @return {import(\"../size.js\").Size} Size.\n   * @api\n   * @override\n   */\n  getSize() {\n    return this.size_;\n  }\n\n  /**\n   * Get the stroke style for the shape.\n   * @return {import(\"./Stroke.js\").default|null} Stroke style.\n   * @api\n   */\n  getStroke() {\n    return this.stroke_;\n  }\n\n  /**\n   * Set the stroke style.\n   * @param {import(\"./Stroke.js\").default|null} stroke Stroke style.\n   * @api\n   */\n  setStroke(stroke) {\n    this.stroke_ = stroke;\n    this.render();\n  }\n\n  /**\n   * @param {function(import(\"../events/Event.js\").default): void} listener Listener function.\n   * @override\n   */\n  listenImageChange(listener) {}\n\n  /**\n   * Load not yet loaded URI.\n   * @override\n   */\n  load() {}\n\n  /**\n   * @param {function(import(\"../events/Event.js\").default): void} listener Listener function.\n   * @override\n   */\n  unlistenImageChange(listener) {}\n\n  /**\n   * Calculate additional canvas size needed for the miter.\n   * @param {string} lineJoin Line join\n   * @param {number} strokeWidth Stroke width\n   * @param {number} miterLimit Miter limit\n   * @return {number} Additional canvas size needed\n   * @private\n   */\n  calculateLineJoinSize_(lineJoin, strokeWidth, miterLimit) {\n    if (\n      strokeWidth === 0 ||\n      this.points_ === Infinity ||\n      (lineJoin !== 'bevel' && lineJoin !== 'miter')\n    ) {\n      return strokeWidth;\n    }\n    // m  | ^\n    // i  | |\\                  .\n    // t >|  #\\\n    // e  | |\\ \\              .\n    // r      \\s\\\n    //      |  \\t\\          .                 .\n    //          \\r\\                      .   .\n    //      |    \\o\\      .          .  . . .\n    //          e \\k\\            .  .    . .\n    //      |      \\e\\  .    .  .       . .\n    //       d      \\ \\  .  .          . .\n    //      | _ _a_ _\\#  .            . .\n    //   r1          / `             . .\n    //      |                       . .\n    //       b     /               . .\n    //      |                     . .\n    //           / r2            . .\n    //      |                        .   .\n    //         /                           .   .\n    //      |\u03B1                                   .   .\n    //       /                                         .   .\n    //      \u00B0 center\n    let r1 = this.radius;\n    let r2 = this.radius2_ === undefined ? r1 : this.radius2_;\n    if (r1 < r2) {\n      const tmp = r1;\n      r1 = r2;\n      r2 = tmp;\n    }\n    const points =\n      this.radius2_ === undefined ? this.points_ : this.points_ * 2;\n    const alpha = (2 * Math.PI) / points;\n    const a = r2 * Math.sin(alpha);\n    const b = Math.sqrt(r2 * r2 - a * a);\n    const d = r1 - b;\n    const e = Math.sqrt(a * a + d * d);\n    const miterRatio = e / a;\n    if (lineJoin === 'miter' && miterRatio <= miterLimit) {\n      return miterRatio * strokeWidth;\n    }\n    // Calculate the distance from center to the stroke corner where\n    // it was cut short because of the miter limit.\n    //              l\n    //        ----+---- <= distance from center to here is maxr\n    //       /####|k ##\\\n    //      /#####^#####\\\n    //     /#### /+\\# s #\\\n    //    /### h/+++\\# t #\\\n    //   /### t/+++++\\# r #\\\n    //  /### a/+++++++\\# o #\\\n    // /### p/++ fill +\\# k #\\\n    ///#### /+++++^+++++\\# e #\\\n    //#####/+++++/+\\+++++\\#####\\\n    const k = strokeWidth / 2 / miterRatio;\n    const l = (strokeWidth / 2) * (d / e);\n    const maxr = Math.sqrt((r1 + k) * (r1 + k) + l * l);\n    const bevelAdd = maxr - r1;\n    if (this.radius2_ === undefined || lineJoin === 'bevel') {\n      return bevelAdd * 2;\n    }\n    // If outer miter is over the miter limit the inner miter may reach through the\n    // center and be longer than the bevel, same calculation as above but swap r1 / r2.\n    const aa = r1 * Math.sin(alpha);\n    const bb = Math.sqrt(r1 * r1 - aa * aa);\n    const dd = r2 - bb;\n    const ee = Math.sqrt(aa * aa + dd * dd);\n    const innerMiterRatio = ee / aa;\n    if (innerMiterRatio <= miterLimit) {\n      const innerLength = (innerMiterRatio * strokeWidth) / 2 - r2 - r1;\n      return 2 * Math.max(bevelAdd, innerLength);\n    }\n    return bevelAdd * 2;\n  }\n\n  /**\n   * @return {RenderOptions}  The render options\n   * @protected\n   */\n  createRenderOptions() {\n    let lineCap = defaultLineCap;\n    let lineJoin = defaultLineJoin;\n    let miterLimit = 0;\n    let lineDash = null;\n    let lineDashOffset = 0;\n    let strokeStyle;\n    let strokeWidth = 0;\n\n    if (this.stroke_) {\n      strokeStyle = asColorLike(this.stroke_.getColor() ?? defaultStrokeStyle);\n      strokeWidth = this.stroke_.getWidth() ?? defaultLineWidth;\n      lineDash = this.stroke_.getLineDash();\n      lineDashOffset = this.stroke_.getLineDashOffset() ?? 0;\n      lineJoin = this.stroke_.getLineJoin() ?? defaultLineJoin;\n      lineCap = this.stroke_.getLineCap() ?? defaultLineCap;\n      miterLimit = this.stroke_.getMiterLimit() ?? defaultMiterLimit;\n    }\n\n    const add = this.calculateLineJoinSize_(lineJoin, strokeWidth, miterLimit);\n    const maxRadius = Math.max(this.radius, this.radius2_ || 0);\n    const size = Math.ceil(2 * maxRadius + add);\n\n    return {\n      strokeStyle: strokeStyle,\n      strokeWidth: strokeWidth,\n      size: size,\n      lineCap: lineCap,\n      lineDash: lineDash,\n      lineDashOffset: lineDashOffset,\n      lineJoin: lineJoin,\n      miterLimit: miterLimit,\n    };\n  }\n\n  /**\n   * @protected\n   */\n  render() {\n    this.renderOptions_ = this.createRenderOptions();\n    const size = this.renderOptions_.size;\n    this.hitDetectionCanvas_ = null;\n    this.size_ = [size, size];\n  }\n\n  /**\n   * @private\n   * @param {RenderOptions} renderOptions Render options.\n   * @param {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} context The rendering context.\n   * @param {number} pixelRatio The pixel ratio.\n   */\n  draw_(renderOptions, context, pixelRatio) {\n    context.scale(pixelRatio, pixelRatio);\n    // set origin to canvas center\n    context.translate(renderOptions.size / 2, renderOptions.size / 2);\n\n    this.createPath_(context);\n\n    if (this.fill_) {\n      let color = this.fill_.getColor();\n      if (color === null) {\n        color = defaultFillStyle;\n      }\n      context.fillStyle = asColorLike(color);\n      context.fill();\n    }\n    if (renderOptions.strokeStyle) {\n      context.strokeStyle = renderOptions.strokeStyle;\n      context.lineWidth = renderOptions.strokeWidth;\n      if (renderOptions.lineDash) {\n        context.setLineDash(renderOptions.lineDash);\n        context.lineDashOffset = renderOptions.lineDashOffset;\n      }\n      context.lineCap = renderOptions.lineCap;\n      context.lineJoin = renderOptions.lineJoin;\n      context.miterLimit = renderOptions.miterLimit;\n      context.stroke();\n    }\n  }\n\n  /**\n   * @private\n   * @param {RenderOptions} renderOptions Render options.\n   * @return {HTMLCanvasElement|OffscreenCanvas} Canvas containing the icon\n   */\n  createHitDetectionCanvas_(renderOptions) {\n    let context;\n    if (this.fill_) {\n      let color = this.fill_.getColor();\n\n      // determine if fill is transparent (or pattern or gradient)\n      let opacity = 0;\n      if (typeof color === 'string') {\n        color = asArray(color);\n      }\n      if (color === null) {\n        opacity = 1;\n      } else if (Array.isArray(color)) {\n        opacity = color.length === 4 ? color[3] : 1;\n      }\n      if (opacity === 0) {\n        // if a transparent fill style is set, create an extra hit-detection image\n        // with a default fill style\n        context = createCanvasContext2D(renderOptions.size, renderOptions.size);\n        this.drawHitDetectionCanvas_(renderOptions, context);\n      }\n    }\n    return context ? context.canvas : this.getImage(1);\n  }\n\n  /**\n   * @private\n   * @param {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} context The context to draw in.\n   */\n  createPath_(context) {\n    let points = this.points_;\n    const radius = this.radius;\n    if (points === Infinity) {\n      context.arc(0, 0, radius, 0, 2 * Math.PI);\n    } else {\n      const radius2 = this.radius2_ === undefined ? radius : this.radius2_;\n      if (this.radius2_ !== undefined) {\n        points *= 2;\n      }\n      const startAngle = this.angle_ - Math.PI / 2;\n      const step = (2 * Math.PI) / points;\n      for (let i = 0; i < points; i++) {\n        const angle0 = startAngle + i * step;\n        const radiusC = i % 2 === 0 ? radius : radius2;\n        context.lineTo(radiusC * Math.cos(angle0), radiusC * Math.sin(angle0));\n      }\n      context.closePath();\n    }\n  }\n\n  /**\n   * @private\n   * @param {RenderOptions} renderOptions Render options.\n   * @param {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} context The context.\n   */\n  drawHitDetectionCanvas_(renderOptions, context) {\n    // set origin to canvas center\n    context.translate(renderOptions.size / 2, renderOptions.size / 2);\n\n    this.createPath_(context);\n\n    context.fillStyle = defaultFillStyle;\n    context.fill();\n    if (renderOptions.strokeStyle) {\n      context.strokeStyle = renderOptions.strokeStyle;\n      context.lineWidth = renderOptions.strokeWidth;\n      if (renderOptions.lineDash) {\n        context.setLineDash(renderOptions.lineDash);\n        context.lineDashOffset = renderOptions.lineDashOffset;\n      }\n      context.lineJoin = renderOptions.lineJoin;\n      context.miterLimit = renderOptions.miterLimit;\n      context.stroke();\n    }\n  }\n\n  /**\n   * @override\n   */\n  ready() {\n    return this.fill_ ? this.fill_.ready() : Promise.resolve();\n  }\n}\n\nexport default RegularShape;\n", "/**\n * @module ol/style/Circle\n */\n\nimport RegularShape from './RegularShape.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Fill.js\").default} [fill] Fill style.\n * @property {number} radius Circle radius.\n * @property {import(\"./Stroke.js\").default} [stroke] Stroke style.\n * @property {Array<number>} [displacement=[0,0]] displacement\n * @property {number|import(\"../size.js\").Size} [scale=1] Scale. A two dimensional scale will produce an ellipse.\n * Unless two dimensional scaling is required a better result may be obtained with an appropriate setting for `radius`.\n * @property {number} [rotation=0] Rotation in radians\n * (positive rotation clockwise, meaningful only when used in conjunction with a two dimensional scale).\n * @property {boolean} [rotateWithView=false] Whether to rotate the shape with the view\n * (meaningful only when used in conjunction with a two dimensional scale).\n * @property {import('./Style.js').DeclutterMode} [declutterMode] Declutter mode\n */\n\n/**\n * @classdesc\n * Set circle style for vector features.\n * @api\n */\nclass CircleStyle extends RegularShape {\n  /**\n   * @param {Options} [options] Options.\n   */\n  constructor(options) {\n    options = options ? options : {radius: 5};\n\n    super({\n      points: Infinity,\n      fill: options.fill,\n      radius: options.radius,\n      stroke: options.stroke,\n      scale: options.scale !== undefined ? options.scale : 1,\n      rotation: options.rotation !== undefined ? options.rotation : 0,\n      rotateWithView:\n        options.rotateWithView !== undefined ? options.rotateWithView : false,\n      displacement:\n        options.displacement !== undefined ? options.displacement : [0, 0],\n      declutterMode: options.declutterMode,\n    });\n  }\n\n  /**\n   * Clones the style.\n   * @return {CircleStyle} The cloned style.\n   * @api\n   * @override\n   */\n  clone() {\n    const scale = this.getScale();\n    const style = new CircleStyle({\n      fill: this.getFill() ? this.getFill().clone() : undefined,\n      stroke: this.getStroke() ? this.getStroke().clone() : undefined,\n      radius: this.getRadius(),\n      scale: Array.isArray(scale) ? scale.slice() : scale,\n      rotation: this.getRotation(),\n      rotateWithView: this.getRotateWithView(),\n      displacement: this.getDisplacement().slice(),\n      declutterMode: this.getDeclutterMode(),\n    });\n    style.setOpacity(this.getOpacity());\n    return style;\n  }\n}\n\nexport default CircleStyle;\n", "/**\n * @module ol/style/Fill\n */\n\nimport ImageState from '../ImageState.js';\nimport {asArray} from '../color.js';\nimport {getUid} from '../util.js';\nimport {get as getIconImage} from './IconImage.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike|import('../colorlike.js').PatternDescriptor|null} [color=null] A color,\n * gradient or pattern.\n * See {@link module:ol/color~Color} and {@link module:ol/colorlike~ColorLike} for possible formats. For polygon fills (not for {@link import(\"./RegularShape.js\").default} fills),\n * a pattern can also be provided as {@link module:ol/colorlike~PatternDescriptor}.\n * Default null; if null, the Canvas/renderer default black will be used.\n */\n\n/**\n * @classdesc\n * Set fill style for vector features.\n * @api\n */\nclass Fill {\n  /**\n   * @param {Options} [options] Options.\n   */\n  constructor(options) {\n    options = options || {};\n\n    /**\n     * @private\n     * @type {import(\"./IconImage.js\").default|null}\n     */\n    this.patternImage_ = null;\n\n    /**\n     * @private\n     * @type {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike|import('../colorlike.js').PatternDescriptor|null}\n     */\n    this.color_ = null;\n    if (options.color !== undefined) {\n      this.setColor(options.color);\n    }\n  }\n\n  /**\n   * Clones the style. The color is not cloned if it is a {@link module:ol/colorlike~ColorLike}.\n   * @return {Fill} The cloned style.\n   * @api\n   */\n  clone() {\n    const color = this.getColor();\n    return new Fill({\n      color: Array.isArray(color) ? color.slice() : color || undefined,\n    });\n  }\n\n  /**\n   * Get the fill color.\n   * @return {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike|import('../colorlike.js').PatternDescriptor|null} Color.\n   * @api\n   */\n  getColor() {\n    return this.color_;\n  }\n\n  /**\n   * Set the color.\n   *\n   * @param {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike|import('../colorlike.js').PatternDescriptor|null} color Color.\n   * @api\n   */\n  setColor(color) {\n    if (color !== null && typeof color === 'object' && 'src' in color) {\n      const patternImage = getIconImage(\n        null,\n        color.src,\n        {crossOrigin: 'anonymous'},\n        undefined,\n        color.offset ? null : color.color ? color.color : null,\n        !(color.offset && color.size),\n      );\n      patternImage.ready().then(() => {\n        this.patternImage_ = null;\n      });\n      if (patternImage.getImageState() === ImageState.IDLE) {\n        patternImage.load();\n      }\n      if (patternImage.getImageState() === ImageState.LOADING) {\n        this.patternImage_ = patternImage;\n      }\n    }\n    this.color_ = color;\n  }\n\n  /**\n   * @return {string} Key of the fill for cache lookup.\n   */\n  getKey() {\n    const fill = this.getColor();\n    if (!fill) {\n      return '';\n    }\n    return fill instanceof CanvasPattern || fill instanceof CanvasGradient\n      ? getUid(fill)\n      : typeof fill === 'object' && 'src' in fill\n        ? fill.src + ':' + fill.offset\n        : asArray(fill).toString();\n  }\n\n  /**\n   * @return {boolean} The fill style is loading an image pattern.\n   */\n  loading() {\n    return !!this.patternImage_;\n  }\n\n  /**\n   * @return {Promise<void>} `false` or a promise that resolves when the style is ready to use.\n   */\n  ready() {\n    return this.patternImage_ ? this.patternImage_.ready() : Promise.resolve();\n  }\n}\n\nexport default Fill;\n", "/**\n * @module ol/style/Stroke\n */\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike} [color] A color, gradient or pattern.\n * See {@link module:ol/color~Color} and {@link module:ol/colorlike~ColorLike} for possible formats.\n * Default null; if null, the Canvas/renderer default black will be used.\n * @property {CanvasLineCap} [lineCap='round'] Line cap style: `butt`, `round`, or `square`.\n * @property {CanvasLineJoin} [lineJoin='round'] Line join style: `bevel`, `round`, or `miter`.\n * @property {Array<number>} [lineDash] Line dash pattern. Default is `null` (no dash).\n * @property {number} [lineDashOffset=0] Line dash offset.\n * @property {number} [miterLimit=10] Miter limit.\n * @property {number} [offset] Line offset in pixels along the normal. A positive value offsets the line to the right,\n * relative to the direction of the line. Default is `undefined` (no offset).\n * @property {number} [width] Width.\n */\n\n/**\n * @classdesc\n * Set stroke style for vector features.\n * Note that the defaults given are the Canvas defaults, which will be used if\n * option is not defined. The `get` functions return whatever was entered in\n * the options; they will not return the default.\n * @api\n */\nclass Stroke {\n  /**\n   * @param {Options} [options] Options.\n   */\n  constructor(options) {\n    options = options || {};\n\n    /**\n     * @private\n     * @type {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike}\n     */\n    this.color_ = options.color !== undefined ? options.color : null;\n\n    /**\n     * @private\n     * @type {CanvasLineCap|undefined}\n     */\n    this.lineCap_ = options.lineCap;\n\n    /**\n     * @private\n     * @type {Array<number>|null}\n     */\n    this.lineDash_ = options.lineDash !== undefined ? options.lineDash : null;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.lineDashOffset_ = options.lineDashOffset;\n\n    /**\n     * @private\n     * @type {CanvasLineJoin|undefined}\n     */\n    this.lineJoin_ = options.lineJoin;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.miterLimit_ = options.miterLimit;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.offset_ = options.offset;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.width_ = options.width;\n  }\n\n  /**\n   * Clones the style.\n   * @return {Stroke} The cloned style.\n   * @api\n   */\n  clone() {\n    const color = this.getColor();\n    return new Stroke({\n      color: Array.isArray(color) ? color.slice() : color || undefined,\n      lineCap: this.getLineCap(),\n      lineDash: this.getLineDash() ? this.getLineDash().slice() : undefined,\n      lineDashOffset: this.getLineDashOffset(),\n      lineJoin: this.getLineJoin(),\n      miterLimit: this.getMiterLimit(),\n      offset: this.getOffset(),\n      width: this.getWidth(),\n    });\n  }\n\n  /**\n   * Get the stroke color.\n   * @return {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike} Color.\n   * @api\n   */\n  getColor() {\n    return this.color_;\n  }\n\n  /**\n   * Get the line cap type for the stroke.\n   * @return {CanvasLineCap|undefined} Line cap.\n   * @api\n   */\n  getLineCap() {\n    return this.lineCap_;\n  }\n\n  /**\n   * Get the line dash style for the stroke.\n   * @return {Array<number>|null} Line dash.\n   * @api\n   */\n  getLineDash() {\n    return this.lineDash_;\n  }\n\n  /**\n   * Get the line dash offset for the stroke.\n   * @return {number|undefined} Line dash offset.\n   * @api\n   */\n  getLineDashOffset() {\n    return this.lineDashOffset_;\n  }\n\n  /**\n   * Get the line join type for the stroke.\n   * @return {CanvasLineJoin|undefined} Line join.\n   * @api\n   */\n  getLineJoin() {\n    return this.lineJoin_;\n  }\n\n  /**\n   * Get the miter limit for the stroke.\n   * @return {number|undefined} Miter limit.\n   * @api\n   */\n  getMiterLimit() {\n    return this.miterLimit_;\n  }\n\n  /**\n   * Get the line offset in pixels.\n   * @return {number|undefined} Offset.\n   * @api\n   */\n  getOffset() {\n    return this.offset_;\n  }\n\n  /**\n   * Get the stroke width.\n   * @return {number|undefined} Width.\n   * @api\n   */\n  getWidth() {\n    return this.width_;\n  }\n\n  /**\n   * Set the color.\n   *\n   * @param {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike} color Color.\n   * @api\n   */\n  setColor(color) {\n    this.color_ = color;\n  }\n\n  /**\n   * Set the line cap.\n   *\n   * @param {CanvasLineCap|undefined} lineCap Line cap.\n   * @api\n   */\n  setLineCap(lineCap) {\n    this.lineCap_ = lineCap;\n  }\n\n  /**\n   * Set the line dash.\n   *\n   * @param {Array<number>|null} lineDash Line dash.\n   * @api\n   */\n  setLineDash(lineDash) {\n    this.lineDash_ = lineDash;\n  }\n\n  /**\n   * Set the line dash offset.\n   *\n   * @param {number|undefined} lineDashOffset Line dash offset.\n   * @api\n   */\n  setLineDashOffset(lineDashOffset) {\n    this.lineDashOffset_ = lineDashOffset;\n  }\n\n  /**\n   * Set the line join.\n   *\n   * @param {CanvasLineJoin|undefined} lineJoin Line join.\n   * @api\n   */\n  setLineJoin(lineJoin) {\n    this.lineJoin_ = lineJoin;\n  }\n\n  /**\n   * Set the miter limit.\n   *\n   * @param {number|undefined} miterLimit Miter limit.\n   * @api\n   */\n  setMiterLimit(miterLimit) {\n    this.miterLimit_ = miterLimit;\n  }\n\n  /**\n   * Set the line offset in pixels.\n   *\n   * @param {number|undefined} offset Offset.\n   * @api\n   */\n  setOffset(offset) {\n    this.offset_ = offset;\n  }\n\n  /**\n   * Set the width.\n   *\n   * @param {number|undefined} width Width.\n   * @api\n   */\n  setWidth(width) {\n    this.width_ = width;\n  }\n}\n\nexport default Stroke;\n", "/**\n * @module ol/style/Style\n */\n\nimport {assert} from '../asserts.js';\nimport CircleStyle from './Circle.js';\nimport Fill from './Fill.js';\nimport Stroke from './Stroke.js';\n\n/**\n * Defines how symbols and text are decluttered on layers ith `declutter` set to `true`\n * **declutter**: Overlapping symbols and text are decluttered.\n * **obstacle**: Symbols and text are rendered, but serve as obstacle for subsequent attempts\n *   to place a symbol or text at the same location.\n * **none**: No decluttering is done.\n *\n * @typedef {\"declutter\"|\"obstacle\"|\"none\"} DeclutterMode\n */\n\n/**\n * A function that takes a {@link module:ol/Feature~Feature} and a `{number}`\n * representing the view's resolution. The function should return a\n * {@link module:ol/style/Style~Style} or an array of them. This way e.g. a\n * vector layer can be styled. If the function returns `undefined`, the\n * feature will not be rendered.\n *\n * @typedef {function(import(\"../Feature.js\").FeatureLike, number):(Style|Array<Style>|void)} StyleFunction\n */\n\n/**\n * A {@link Style}, an array of {@link Style}, or a {@link StyleFunction}.\n * @typedef {Style|Array<Style>|StyleFunction} StyleLike\n */\n\n/**\n * A function that takes a {@link module:ol/Feature~Feature} as argument and returns an\n * {@link module:ol/geom/Geometry~Geometry} that will be rendered and styled for the feature.\n *\n * @typedef {function(import(\"../Feature.js\").FeatureLike):\n *     (import(\"../geom/Geometry.js\").default|import(\"../render/Feature.js\").default|undefined)} GeometryFunction\n */\n\n/**\n * Custom renderer function. Takes two arguments:\n *\n * 1. The pixel coordinates of the geometry in GeoJSON notation.\n * 2. The {@link module:ol/render~State} of the layer renderer.\n *\n * @typedef {function((import(\"../coordinate.js\").Coordinate|Array<import(\"../coordinate.js\").Coordinate>|Array<Array<import(\"../coordinate.js\").Coordinate>>|Array<Array<Array<import(\"../coordinate.js\").Coordinate>>>),import(\"../render.js\").State): void} RenderFunction\n */\n\n/**\n * @typedef {Object} Options\n * @property {string|import(\"../geom/Geometry.js\").default|GeometryFunction} [geometry] Feature property or geometry\n * or function returning a geometry to render for this style.\n * @property {import(\"./Fill.js\").default} [fill] Fill style.\n * @property {import(\"./Image.js\").default} [image] Image style.\n * @property {RenderFunction} [renderer] Custom renderer. When configured, `fill`, `stroke` and `image` will be\n * ignored, and the provided function will be called with each render frame for each geometry.\n * @property {RenderFunction} [hitDetectionRenderer] Custom renderer for hit detection. If provided will be used\n * in hit detection rendering.\n * @property {import(\"./Stroke.js\").default} [stroke] Stroke style.\n * @property {import(\"./Text.js\").default} [text] Text style.\n * @property {number} [zIndex] Z index.\n */\n\n/**\n * @classdesc\n * Container for vector feature rendering styles. Any changes made to the style\n * or its children through `set*()` methods will not take effect until the\n * feature or layer that uses the style is re-rendered.\n *\n * ## Feature styles\n *\n * If no style is defined, the following default style is used:\n * ```js\n *  import {Circle, Fill, Stroke, Style} from 'ol/style.js';\n *\n *  const fill = new Fill({\n *    color: 'rgba(255,255,255,0.4)',\n *  });\n *  const stroke = new Stroke({\n *    color: '#3399CC',\n *    width: 1.25,\n *  });\n *  const styles = [\n *    new Style({\n *      image: new Circle({\n *        fill: fill,\n *        stroke: stroke,\n *        radius: 5,\n *      }),\n *      fill: fill,\n *      stroke: stroke,\n *    }),\n *  ];\n * ```\n *\n * A separate editing style has the following defaults:\n * ```js\n *  import {Circle, Fill, Stroke, Style} from 'ol/style.js';\n *\n *  const styles = {};\n *  const white = [255, 255, 255, 1];\n *  const blue = [0, 153, 255, 1];\n *  const width = 3;\n *  styles['Polygon'] = [\n *    new Style({\n *      fill: new Fill({\n *        color: [255, 255, 255, 0.5],\n *      }),\n *    }),\n *  ];\n *  styles['MultiPolygon'] =\n *      styles['Polygon'];\n *  styles['LineString'] = [\n *    new Style({\n *      stroke: new Stroke({\n *        color: white,\n *        width: width + 2,\n *      }),\n *    }),\n *    new Style({\n *      stroke: new Stroke({\n *        color: blue,\n *        width: width,\n *      }),\n *    }),\n *  ];\n *  styles['MultiLineString'] = styles['LineString'];\n *\n *  styles['Circle'] = styles['Polygon'].concat(\n *    styles['LineString']\n *  );\n *\n *  styles['Point'] = [\n *    new Style({\n *      image: new Circle({\n *        radius: width * 2,\n *        fill: new Fill({\n *          color: blue,\n *        }),\n *        stroke: new Stroke({\n *          color: white,\n *          width: width / 2,\n *        }),\n *      }),\n *      zIndex: Infinity,\n *    }),\n *  ];\n *  styles['MultiPoint'] =\n *      styles['Point'];\n *  styles['GeometryCollection'] =\n *      styles['Polygon'].concat(\n *          styles['LineString'],\n *          styles['Point']\n *      );\n * ```\n *\n * @api\n */\nclass Style {\n  /**\n   * @param {Options} [options] Style options.\n   */\n  constructor(options) {\n    options = options || {};\n\n    /**\n     * @private\n     * @type {string|import(\"../geom/Geometry.js\").default|GeometryFunction|null}\n     */\n    this.geometry_ = null;\n\n    /**\n     * @private\n     * @type {!GeometryFunction}\n     */\n    this.geometryFunction_ = defaultGeometryFunction;\n\n    if (options.geometry !== undefined) {\n      this.setGeometry(options.geometry);\n    }\n\n    /**\n     * @private\n     * @type {import(\"./Fill.js\").default|null}\n     */\n    this.fill_ = options.fill !== undefined ? options.fill : null;\n\n    /**\n     * @private\n     * @type {import(\"./Image.js\").default|null}\n     */\n    this.image_ = options.image !== undefined ? options.image : null;\n\n    /**\n     * @private\n     * @type {RenderFunction|null}\n     */\n    this.renderer_ = options.renderer !== undefined ? options.renderer : null;\n\n    /**\n     * @private\n     * @type {RenderFunction|null}\n     */\n    this.hitDetectionRenderer_ =\n      options.hitDetectionRenderer !== undefined\n        ? options.hitDetectionRenderer\n        : null;\n\n    /**\n     * @private\n     * @type {import(\"./Stroke.js\").default|null}\n     */\n    this.stroke_ = options.stroke !== undefined ? options.stroke : null;\n\n    /**\n     * @private\n     * @type {import(\"./Text.js\").default|null}\n     */\n    this.text_ = options.text !== undefined ? options.text : null;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.zIndex_ = options.zIndex;\n  }\n\n  /**\n   * Clones the style.\n   * @return {Style} The cloned style.\n   * @api\n   */\n  clone() {\n    let geometry = this.getGeometry();\n    if (geometry && typeof geometry === 'object') {\n      geometry = /** @type {import(\"../geom/Geometry.js\").default} */ (\n        geometry\n      ).clone();\n    }\n    return new Style({\n      geometry: geometry ?? undefined,\n      fill: this.getFill() ? this.getFill().clone() : undefined,\n      image: this.getImage() ? this.getImage().clone() : undefined,\n      renderer: this.getRenderer() ?? undefined,\n      stroke: this.getStroke() ? this.getStroke().clone() : undefined,\n      text: this.getText() ? this.getText().clone() : undefined,\n      zIndex: this.getZIndex(),\n    });\n  }\n\n  /**\n   * Get the custom renderer function that was configured with\n   * {@link #setRenderer} or the `renderer` constructor option.\n   * @return {RenderFunction|null} Custom renderer function.\n   * @api\n   */\n  getRenderer() {\n    return this.renderer_;\n  }\n\n  /**\n   * Sets a custom renderer function for this style. When set, `fill`, `stroke`\n   * and `image` options of the style will be ignored.\n   * @param {RenderFunction|null} renderer Custom renderer function.\n   * @api\n   */\n  setRenderer(renderer) {\n    this.renderer_ = renderer;\n  }\n\n  /**\n   * Sets a custom renderer function for this style used\n   * in hit detection.\n   * @param {RenderFunction|null} renderer Custom renderer function.\n   * @api\n   */\n  setHitDetectionRenderer(renderer) {\n    this.hitDetectionRenderer_ = renderer;\n  }\n\n  /**\n   * Get the custom renderer function that was configured with\n   * {@link #setHitDetectionRenderer} or the `hitDetectionRenderer` constructor option.\n   * @return {RenderFunction|null} Custom renderer function.\n   * @api\n   */\n  getHitDetectionRenderer() {\n    return this.hitDetectionRenderer_;\n  }\n\n  /**\n   * Get the geometry to be rendered.\n   * @return {string|import(\"../geom/Geometry.js\").default|GeometryFunction|null}\n   * Feature property or geometry or function that returns the geometry that will\n   * be rendered with this style.\n   * @api\n   */\n  getGeometry() {\n    return this.geometry_;\n  }\n\n  /**\n   * Get the function used to generate a geometry for rendering.\n   * @return {!GeometryFunction} Function that is called with a feature\n   * and returns the geometry to render instead of the feature's geometry.\n   * @api\n   */\n  getGeometryFunction() {\n    return this.geometryFunction_;\n  }\n\n  /**\n   * Get the fill style.\n   * @return {import(\"./Fill.js\").default|null} Fill style.\n   * @api\n   */\n  getFill() {\n    return this.fill_;\n  }\n\n  /**\n   * Set the fill style.\n   * @param {import(\"./Fill.js\").default|null} fill Fill style.\n   * @api\n   */\n  setFill(fill) {\n    this.fill_ = fill;\n  }\n\n  /**\n   * Get the image style.\n   * @return {import(\"./Image.js\").default|null} Image style.\n   * @api\n   */\n  getImage() {\n    return this.image_;\n  }\n\n  /**\n   * Set the image style.\n   * @param {import(\"./Image.js\").default} image Image style.\n   * @api\n   */\n  setImage(image) {\n    this.image_ = image;\n  }\n\n  /**\n   * Get the stroke style.\n   * @return {import(\"./Stroke.js\").default|null} Stroke style.\n   * @api\n   */\n  getStroke() {\n    return this.stroke_;\n  }\n\n  /**\n   * Set the stroke style.\n   * @param {import(\"./Stroke.js\").default|null} stroke Stroke style.\n   * @api\n   */\n  setStroke(stroke) {\n    this.stroke_ = stroke;\n  }\n\n  /**\n   * Get the text style.\n   * @return {import(\"./Text.js\").default|null} Text style.\n   * @api\n   */\n  getText() {\n    return this.text_;\n  }\n\n  /**\n   * Set the text style.\n   * @param {import(\"./Text.js\").default} text Text style.\n   * @api\n   */\n  setText(text) {\n    this.text_ = text;\n  }\n\n  /**\n   * Get the z-index for the style.\n   * @return {number|undefined} ZIndex.\n   * @api\n   */\n  getZIndex() {\n    return this.zIndex_;\n  }\n\n  /**\n   * Set a geometry that is rendered instead of the feature's geometry.\n   *\n   * @param {string|import(\"../geom/Geometry.js\").default|GeometryFunction|null} geometry\n   *     Feature property or geometry or function returning a geometry to render\n   *     for this style.\n   * @api\n   */\n  setGeometry(geometry) {\n    if (typeof geometry === 'function') {\n      this.geometryFunction_ = geometry;\n    } else if (typeof geometry === 'string') {\n      this.geometryFunction_ = function (feature) {\n        return /** @type {import(\"../geom/Geometry.js\").default} */ (\n          feature.get(geometry)\n        );\n      };\n    } else if (!geometry) {\n      this.geometryFunction_ = defaultGeometryFunction;\n    } else if (geometry !== undefined) {\n      this.geometryFunction_ = function () {\n        return /** @type {import(\"../geom/Geometry.js\").default} */ (geometry);\n      };\n    }\n    this.geometry_ = geometry;\n  }\n\n  /**\n   * Set the z-index.\n   *\n   * @param {number|undefined} zIndex ZIndex.\n   * @api\n   */\n  setZIndex(zIndex) {\n    this.zIndex_ = zIndex;\n  }\n}\n\n/**\n * Convert the provided object into a style function.  Functions passed through\n * unchanged.  Arrays of Style or single style objects wrapped in a\n * new style function.\n * @param {StyleFunction|Array<Style>|Style} obj\n *     A style function, a single style, or an array of styles.\n * @return {StyleFunction} A style function.\n */\nexport function toFunction(obj) {\n  let styleFunction;\n\n  if (typeof obj === 'function') {\n    styleFunction = obj;\n  } else {\n    /**\n     * @type {Array<Style>}\n     */\n    let styles;\n    if (Array.isArray(obj)) {\n      styles = obj;\n    } else {\n      assert(\n        typeof (/** @type {?} */ (obj).getZIndex) === 'function',\n        'Expected an `Style` or an array of `Style`',\n      );\n      const style = /** @type {Style} */ (obj);\n      styles = [style];\n    }\n    styleFunction = function () {\n      return styles;\n    };\n  }\n  return styleFunction;\n}\n\n/**\n * @type {Array<Style>|null}\n */\nlet defaultStyles = null;\n\n/**\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {number} resolution Resolution.\n * @return {Array<Style>} Style.\n */\nexport function createDefaultStyle(feature, resolution) {\n  // We don't use an immediately-invoked function\n  // and a closure so we don't get an error at script evaluation time in\n  // browsers that do not support Canvas. (import(\"./Circle.js\").CircleStyle does\n  // canvas.getContext('2d') at construction time, which will cause an.error\n  // in such browsers.)\n  if (!defaultStyles) {\n    const fill = new Fill({\n      color: 'rgba(255,255,255,0.4)',\n    });\n    const stroke = new Stroke({\n      color: '#3399CC',\n      width: 1.25,\n    });\n    defaultStyles = [\n      new Style({\n        image: new CircleStyle({\n          fill: fill,\n          stroke: stroke,\n          radius: 5,\n        }),\n        fill: fill,\n        stroke: stroke,\n      }),\n    ];\n  }\n  return defaultStyles;\n}\n\n/**\n * Default styles for editing features.\n * @return {Object<import(\"../geom/Geometry.js\").Type, Array<Style>>} Styles\n */\nexport function createEditingStyle() {\n  /** @type {Object<import(\"../geom/Geometry.js\").Type, Array<Style>>} */\n  const styles = {};\n  const white = [255, 255, 255, 1];\n  const blue = [0, 153, 255, 1];\n  const width = 3;\n  styles['Polygon'] = [\n    new Style({\n      fill: new Fill({\n        color: [255, 255, 255, 0.5],\n      }),\n    }),\n  ];\n  styles['MultiPolygon'] = styles['Polygon'];\n\n  styles['LineString'] = [\n    new Style({\n      stroke: new Stroke({\n        color: white,\n        width: width + 2,\n      }),\n    }),\n    new Style({\n      stroke: new Stroke({\n        color: blue,\n        width: width,\n      }),\n    }),\n  ];\n  styles['MultiLineString'] = styles['LineString'];\n\n  styles['Circle'] = styles['Polygon'].concat(styles['LineString']);\n\n  styles['Point'] = [\n    new Style({\n      image: new CircleStyle({\n        radius: width * 2,\n        fill: new Fill({\n          color: blue,\n        }),\n        stroke: new Stroke({\n          color: white,\n          width: width / 2,\n        }),\n      }),\n      zIndex: Infinity,\n    }),\n  ];\n  styles['MultiPoint'] = styles['Point'];\n\n  styles['GeometryCollection'] = styles['Polygon'].concat(\n    styles['LineString'],\n    styles['Point'],\n  );\n\n  return styles;\n}\n\n/**\n * Function that is called with a feature and returns its default geometry.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature to get the geometry for.\n * @return {import(\"../geom/Geometry.js\").default|import(\"../render/Feature.js\").default|undefined} Geometry to render.\n */\nfunction defaultGeometryFunction(feature) {\n  return feature.getGeometry();\n}\n\nexport default Style;\n", "/**\n * @module ol/CollectionEventType\n */\n\n/**\n * @enum {string}\n */\nexport default {\n  /**\n   * Triggered when an item is added to the collection.\n   * @event module:ol/Collection.CollectionEvent#add\n   * @api\n   */\n  ADD: 'add',\n  /**\n   * Triggered when an item is removed from the collection.\n   * @event module:ol/Collection.CollectionEvent#remove\n   * @api\n   */\n  REMOVE: 'remove',\n};\n", "/**\n * @module ol/Collection\n */\nimport CollectionEventType from './CollectionEventType.js';\nimport BaseObject from './Object.js';\nimport Event from './events/Event.js';\n\n/**\n * @enum {string}\n * @private\n */\nconst Property = {\n  LENGTH: 'length',\n};\n\n/**\n * @classdesc\n * Events emitted by {@link module:ol/Collection~Collection} instances are instances of this\n * type.\n * @template T\n */\nexport class CollectionEvent extends Event {\n  /**\n   * @param {import(\"./CollectionEventType.js\").default} type Type.\n   * @param {T} element Element.\n   * @param {number} index The index of the added or removed element.\n   */\n  constructor(type, element, index) {\n    super(type);\n\n    /**\n     * The element that is added to or removed from the collection.\n     * @type {T}\n     * @api\n     */\n    this.element = element;\n\n    /**\n     * The index of the added or removed element.\n     * @type {number}\n     * @api\n     */\n    this.index = index;\n  }\n}\n\n/***\n * @template T\n * @template Return\n * @typedef {import(\"./Observable.js\").OnSignature<import(\"./Observable.js\").EventTypes, import(\"./events/Event.js\").default, Return> &\n *   import(\"./Observable.js\").OnSignature<import(\"./ObjectEventType.js\").Types|'change:length', import(\"./Object.js\").ObjectEvent, Return> &\n *   import(\"./Observable.js\").OnSignature<'add'|'remove', CollectionEvent<T>, Return> &\n *   import(\"./Observable.js\").CombinedOnSignature<import(\"./Observable.js\").EventTypes|import(\"./ObjectEventType.js\").Types|\n *     'change:length'|'add'|'remove',Return>} CollectionOnSignature\n */\n\n/**\n * @typedef {Object} Options\n * @property {boolean} [unique=false] Disallow the same item from being added to\n * the collection twice.\n */\n\n/**\n * @classdesc\n * An expanded version of standard JS Array, adding convenience methods for\n * manipulation. Add and remove changes to the Collection trigger a Collection\n * event. Note that this does not cover changes to the objects _within_ the\n * Collection; they trigger events on the appropriate object, not on the\n * Collection as a whole.\n *\n * @fires CollectionEvent\n *\n * @template T\n * @api\n */\nclass Collection extends BaseObject {\n  /**\n   * @param {Array<T>} [array] Array.\n   * @param {Options} [options] Collection options.\n   */\n  constructor(array, options) {\n    super();\n\n    /***\n     * @type {CollectionOnSignature<T, import(\"./events.js\").EventsKey>}\n     */\n    this.on;\n\n    /***\n     * @type {CollectionOnSignature<T, import(\"./events.js\").EventsKey>}\n     */\n    this.once;\n\n    /***\n     * @type {CollectionOnSignature<T, void>}\n     */\n    this.un;\n\n    options = options || {};\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.unique_ = !!options.unique;\n\n    /**\n     * @private\n     * @type {!Array<T>}\n     */\n    this.array_ = array ?? [];\n\n    if (this.unique_) {\n      for (let i = 1, ii = this.array_.length; i < ii; ++i) {\n        this.assertUnique_(this.array_[i], i);\n      }\n    }\n\n    this.updateLength_();\n  }\n\n  /**\n   * Remove all elements from the collection.\n   * @api\n   */\n  clear() {\n    while (this.getLength() > 0) {\n      this.pop();\n    }\n  }\n\n  /**\n   * Add elements to the collection.  This pushes each item in the provided array\n   * to the end of the collection.\n   * @param {!Array<T>} arr Array.\n   * @return {Collection<T>} This collection.\n   * @api\n   */\n  extend(arr) {\n    for (let i = 0, ii = arr.length; i < ii; ++i) {\n      this.push(arr[i]);\n    }\n    return this;\n  }\n\n  /**\n   * Iterate over each element, calling the provided callback.\n   * @param {function(T, number, Array<T>): *} f The function to call\n   *     for every element. This function takes 3 arguments (the element, the\n   *     index and the array). The return value is ignored.\n   * @api\n   */\n  forEach(f) {\n    const array = this.array_;\n    for (let i = 0, ii = array.length; i < ii; ++i) {\n      f(array[i], i, array);\n    }\n  }\n\n  /**\n   * Get a reference to the underlying Array object. Warning: if the array\n   * is mutated, no events will be dispatched by the collection, and the\n   * collection's \"length\" property won't be in sync with the actual length\n   * of the array.\n   * @return {!Array<T>} Array.\n   * @api\n   */\n  getArray() {\n    return this.array_;\n  }\n\n  /**\n   * Get the element at the provided index.\n   * @param {number} index Index.\n   * @return {T} Element.\n   * @api\n   */\n  item(index) {\n    return this.array_[index];\n  }\n\n  /**\n   * Get the length of this collection.\n   * @return {number} The length of the array.\n   * @observable\n   * @api\n   */\n  getLength() {\n    return this.get(Property.LENGTH);\n  }\n\n  /**\n   * Insert an element at the provided index.\n   * @param {number} index Index.\n   * @param {T} elem Element.\n   * @api\n   */\n  insertAt(index, elem) {\n    if (index < 0 || index > this.getLength()) {\n      throw new Error('Index out of bounds: ' + index);\n    }\n    if (this.unique_) {\n      this.assertUnique_(elem);\n    }\n    this.array_.splice(index, 0, elem);\n    this.updateLength_();\n    this.dispatchEvent(\n      new CollectionEvent(CollectionEventType.ADD, elem, index),\n    );\n  }\n\n  /**\n   * Remove the last element of the collection and return it.\n   * Return `undefined` if the collection is empty.\n   * @return {T|undefined} Element.\n   * @api\n   */\n  pop() {\n    return this.removeAt(this.getLength() - 1);\n  }\n\n  /**\n   * Insert the provided element at the end of the collection.\n   * @param {T} elem Element.\n   * @return {number} New length of the collection.\n   * @api\n   */\n  push(elem) {\n    const n = this.getLength();\n    this.insertAt(n, elem);\n    return this.getLength();\n  }\n\n  /**\n   * Remove the first occurrence of an element from the collection.\n   * @param {T} elem Element.\n   * @return {T|undefined} The removed element or undefined if none found.\n   * @api\n   */\n  remove(elem) {\n    const arr = this.array_;\n    for (let i = 0, ii = arr.length; i < ii; ++i) {\n      if (arr[i] === elem) {\n        return this.removeAt(i);\n      }\n    }\n    return undefined;\n  }\n\n  /**\n   * Remove the element at the provided index and return it.\n   * Return `undefined` if the collection does not contain this index.\n   * @param {number} index Index.\n   * @return {T|undefined} Value.\n   * @api\n   */\n  removeAt(index) {\n    if (index < 0 || index >= this.getLength()) {\n      return undefined;\n    }\n    const prev = this.array_[index];\n    this.array_.splice(index, 1);\n    this.updateLength_();\n    this.dispatchEvent(\n      /** @type {CollectionEvent<T>} */ (\n        new CollectionEvent(CollectionEventType.REMOVE, prev, index)\n      ),\n    );\n    return prev;\n  }\n\n  /**\n   * Set the element at the provided index.\n   * @param {number} index Index.\n   * @param {T} elem Element.\n   * @api\n   */\n  setAt(index, elem) {\n    const n = this.getLength();\n    if (index >= n) {\n      this.insertAt(index, elem);\n      return;\n    }\n    if (index < 0) {\n      throw new Error('Index out of bounds: ' + index);\n    }\n    if (this.unique_) {\n      this.assertUnique_(elem, index);\n    }\n    const prev = this.array_[index];\n    this.array_[index] = elem;\n    this.dispatchEvent(\n      /** @type {CollectionEvent<T>} */ (\n        new CollectionEvent(CollectionEventType.REMOVE, prev, index)\n      ),\n    );\n    this.dispatchEvent(\n      /** @type {CollectionEvent<T>} */ (\n        new CollectionEvent(CollectionEventType.ADD, elem, index)\n      ),\n    );\n  }\n\n  /**\n   * @private\n   */\n  updateLength_() {\n    this.set(Property.LENGTH, this.array_.length);\n  }\n\n  /**\n   * @private\n   * @param {T} elem Element.\n   * @param {number} [except] Optional index to ignore.\n   */\n  assertUnique_(elem, except) {\n    const array = this.array_;\n    for (let i = 0, ii = array.length; i < ii; ++i) {\n      if (array[i] === elem && i !== except) {\n        throw new Error('Duplicate item added to a unique collection');\n      }\n    }\n  }\n}\n\nexport default Collection;\n", "/**\n * @module ol/featureloader\n */\n\n/**\n *\n * @type {boolean}\n * @private\n */\nlet withCredentials = false;\n\n/**\n * {@link module:ol/source/Vector~VectorSource} sources use a function of this type to\n * load features.\n *\n * This function takes 3 arguments: an {@link module:ol/extent~Extent} representing\n * the area to be loaded, a `{number}` representing the resolution (map units per pixel), and a\n * {@link module:ol/proj/Projection~Projection} for the projection. The function is expeced to return\n * a promise that resolves to an array of features.\n *\n * There are also a deprecated signature, with `void` as\n * return, and two additional arguments: an optional success callback that should get\n * the loaded features passed as an argument and an optional failure callback with no arguments.\n *\n * The function is responsible for loading the features and adding them to the\n * source.\n *\n * @template {import(\"./Feature.js\").FeatureLike} [FeatureType=import(\"./Feature.js\").FeatureLike]\n * @typedef {(\n *           extent: import(\"./extent.js\").Extent,\n *           resolution: number,\n *           projection: import(\"./proj/Projection.js\").default,\n *           success?: (features: Array<FeatureType>) => void,\n *           failure?: () => void) => void|Promise<Array<FeatureType>>} FeatureLoader\n * @api\n */\n\n/**\n * {@link module:ol/source/Vector~VectorSource} sources use a function of this type to\n * get the url to load features from.\n *\n * This function takes an {@link module:ol/extent~Extent} representing the area\n * to be loaded, a `{number}` representing the resolution (map units per pixel)\n * and an {@link module:ol/proj/Projection~Projection} for the projection  as\n * arguments and returns a `{string}` representing the URL.\n * @typedef {function(import(\"./extent.js\").Extent, number, import(\"./proj/Projection.js\").default): string} FeatureUrlFunction\n * @api\n */\n\n/**\n * @template {import(\"./Feature.js\").FeatureLike} [FeatureType=import(\"./Feature.js\").default]\n * @param {string|FeatureUrlFunction} url Feature URL service.\n * @param {import(\"./format/Feature.js\").default<FeatureType>} format Feature format.\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @param {import(\"./proj/Projection.js\").default} projection Projection.\n * @param {function(Array<FeatureType>, import(\"./proj/Projection.js\").default): void} success Success\n *      Function called with the loaded features and optionally with the data projection.\n * @param {function(): void} failure Failure\n *      Function called when loading failed.\n */\nexport function loadFeaturesXhr(\n  url,\n  format,\n  extent,\n  resolution,\n  projection,\n  success,\n  failure,\n) {\n  const xhr = new XMLHttpRequest();\n  xhr.open(\n    'GET',\n    typeof url === 'function' ? url(extent, resolution, projection) : url,\n    true,\n  );\n  if (format.getType() == 'arraybuffer') {\n    xhr.responseType = 'arraybuffer';\n  }\n  xhr.withCredentials = withCredentials;\n  /**\n   * @param {Event} event Event.\n   * @private\n   */\n  xhr.onload = function (event) {\n    // status will be 0 for file:// urls\n    if (!xhr.status || (xhr.status >= 200 && xhr.status < 300)) {\n      const type = format.getType();\n      try {\n        /** @type {Document|Node|Object|string|undefined} */\n        let source;\n        if (type == 'text' || type == 'json') {\n          source = xhr.responseText;\n        } else if (type == 'xml') {\n          source = xhr.responseXML || xhr.responseText;\n        } else if (type == 'arraybuffer') {\n          source = /** @type {ArrayBuffer} */ (xhr.response);\n        }\n        if (source) {\n          success(\n            /** @type {Array<FeatureType>} */\n            (\n              format.readFeatures(source, {\n                extent: extent,\n                featureProjection: projection,\n              })\n            ),\n            format.readProjection(source),\n          );\n        } else {\n          failure();\n        }\n      } catch {\n        failure();\n      }\n    } else {\n      failure();\n    }\n  };\n  /**\n   * @private\n   */\n  xhr.onerror = failure;\n  xhr.send();\n}\n\n/**\n * Create an XHR feature loader for a `url` and `format`. The feature loader\n * loads features (with XHR), parses the features, and adds them to the\n * vector source.\n *\n * @template {import(\"./Feature.js\").FeatureLike} [FeatureType=import(\"./Feature.js\").default]\n * @param {string|FeatureUrlFunction} url Feature URL service.\n * @param {import(\"./format/Feature.js\").default<FeatureType>} format Feature format.\n * @return {FeatureLoader<FeatureType>} The feature loader.\n * @api\n */\nexport function xhr(url, format) {\n  /**\n   * @param {import(\"./extent.js\").Extent} extent Extent.\n   * @param {number} resolution Resolution.\n   * @param {import(\"./proj/Projection.js\").default} projection Projection.\n   * @param {function(Array<FeatureType>): void} [success] Success\n   *      Function called when loading succeeded.\n   * @param {function(): void} [failure] Failure\n   *      Function called when loading failed.\n   * @this {import(\"./source/Vector.js\").default<FeatureType>}\n   */\n  return function (extent, resolution, projection, success, failure) {\n    loadFeaturesXhr(\n      url,\n      format,\n      extent,\n      resolution,\n      projection,\n      /**\n       * @param {Array<FeatureType>} features The loaded features.\n       * @param {import(\"./proj/Projection.js\").default} dataProjection Data\n       * projection.\n       */\n      (features, dataProjection) => {\n        this.addFeatures(features);\n        if (success !== undefined) {\n          success(features);\n        }\n      },\n      () => {\n        this.changed();\n        if (failure !== undefined) {\n          failure();\n        }\n      },\n    );\n  };\n}\n\n/**\n * Setter for the withCredentials configuration for the XHR.\n *\n * @param {boolean} xhrWithCredentials The value of withCredentials to set.\n * Compare https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/\n * @api\n */\nexport function setWithCredentials(xhrWithCredentials) {\n  withCredentials = xhrWithCredentials;\n}\n", "/**\n * @module ol/loadingstrategy\n */\n\nimport {fromUserExtent, fromUserResolution, toUserExtent} from './proj.js';\n\n/**\n * Strategy function for loading all features with a single request.\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @return {Array<import(\"./extent.js\").Extent>} Extents.\n * @api\n */\nexport function all(extent, resolution) {\n  return [[-Infinity, -Infinity, Infinity, Infinity]];\n}\n\n/**\n * Strategy function for loading features based on the view's extent and\n * resolution.\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @return {Array<import(\"./extent.js\").Extent>} Extents.\n * @api\n */\nexport function bbox(extent, resolution) {\n  return [extent];\n}\n\n/**\n * Creates a strategy function for loading features based on a tile grid.\n * @param {import(\"./tilegrid/TileGrid.js\").default} tileGrid Tile grid.\n * @return {function(import(\"./extent.js\").Extent, number, import(\"./proj.js\").Projection): Array<import(\"./extent.js\").Extent>} Loading strategy.\n * @api\n */\nexport function tile(tileGrid) {\n  return (\n    /**\n     * @param {import(\"./extent.js\").Extent} extent Extent.\n     * @param {number} resolution Resolution.\n     * @param {import(\"./proj.js\").Projection} projection Projection.\n     * @return {Array<import(\"./extent.js\").Extent>} Extents.\n     */\n    function (extent, resolution, projection) {\n      const z = tileGrid.getZForResolution(\n        fromUserResolution(resolution, projection),\n      );\n      const tileRange = tileGrid.getTileRangeForExtentAndZ(\n        fromUserExtent(extent, projection),\n        z,\n      );\n      /** @type {Array<import(\"./extent.js\").Extent>} */\n      const extents = [];\n      /** @type {import(\"./tilecoord.js\").TileCoord} */\n      const tileCoord = [z, 0, 0];\n      for (\n        tileCoord[1] = tileRange.minX;\n        tileCoord[1] <= tileRange.maxX;\n        ++tileCoord[1]\n      ) {\n        for (\n          tileCoord[2] = tileRange.minY;\n          tileCoord[2] <= tileRange.maxY;\n          ++tileCoord[2]\n        ) {\n          extents.push(\n            toUserExtent(tileGrid.getTileCoordExtent(tileCoord), projection),\n          );\n        }\n      }\n      return extents;\n    }\n  );\n}\n", "/**\n * @module ol/geom/MultiLineString\n */\nimport {extend} from '../array.js';\nimport {closestSquaredDistanceXY} from '../extent.js';\nimport LineString from './LineString.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport {arrayMaxSquaredDelta, assignClosestArrayPoint} from './flat/closest.js';\nimport {deflateCoordinatesArray} from './flat/deflate.js';\nimport {inflateCoordinatesArray} from './flat/inflate.js';\nimport {\n  interpolatePoint,\n  lineStringsCoordinateAtM,\n} from './flat/interpolate.js';\nimport {intersectsLineStringArray} from './flat/intersectsextent.js';\nimport {lineStringLength} from './flat/length.js';\nimport {douglasPeuckerArray} from './flat/simplify.js';\n\n/**\n * @classdesc\n * Multi-linestring geometry.\n *\n * @api\n */\nclass MultiLineString extends SimpleGeometry {\n  /**\n   * @param {Array<Array<import(\"../coordinate.js\").Coordinate>|LineString>|Array<number>} coordinates\n   *     Coordinates or LineString geometries. (For internal use, flat coordinates in\n   *     combination with `layout` and `ends` are also accepted.)\n   * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n   * @param {Array<number>} [ends] Flat coordinate ends for internal use.\n   */\n  constructor(coordinates, layout, ends) {\n    super();\n\n    /**\n     * @type {Array<number>}\n     * @private\n     */\n    this.ends_ = [];\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.maxDelta_ = -1;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.maxDeltaRevision_ = -1;\n\n    if (Array.isArray(coordinates[0])) {\n      this.setCoordinates(\n        /** @type {Array<Array<import(\"../coordinate.js\").Coordinate>>} */ (\n          coordinates\n        ),\n        layout,\n      );\n    } else if (layout !== undefined && ends) {\n      this.setFlatCoordinates(\n        layout,\n        /** @type {Array<number>} */ (coordinates),\n      );\n      this.ends_ = ends;\n    } else {\n      const lineStrings = /** @type {Array<LineString>} */ (coordinates);\n      /** @type {Array<number>} */\n      const flatCoordinates = [];\n      const ends = [];\n      for (let i = 0, ii = lineStrings.length; i < ii; ++i) {\n        const lineString = lineStrings[i];\n        extend(flatCoordinates, lineString.getFlatCoordinates());\n        ends.push(flatCoordinates.length);\n      }\n      const layout =\n        lineStrings.length === 0\n          ? this.getLayout()\n          : lineStrings[0].getLayout();\n      this.setFlatCoordinates(layout, flatCoordinates);\n      this.ends_ = ends;\n    }\n  }\n\n  /**\n   * Append the passed linestring to the multilinestring.\n   * @param {LineString} lineString LineString.\n   * @api\n   */\n  appendLineString(lineString) {\n    extend(this.flatCoordinates, lineString.getFlatCoordinates().slice());\n    this.ends_.push(this.flatCoordinates.length);\n    this.changed();\n  }\n\n  /**\n   * Make a complete copy of the geometry.\n   * @return {!MultiLineString} Clone.\n   * @api\n   * @override\n   */\n  clone() {\n    const multiLineString = new MultiLineString(\n      this.flatCoordinates.slice(),\n      this.layout,\n      this.ends_.slice(),\n    );\n    multiLineString.applyProperties(this);\n    return multiLineString;\n  }\n\n  /**\n   * @param {number} x X.\n   * @param {number} y Y.\n   * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n   * @param {number} minSquaredDistance Minimum squared distance.\n   * @return {number} Minimum squared distance.\n   * @override\n   */\n  closestPointXY(x, y, closestPoint, minSquaredDistance) {\n    if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {\n      return minSquaredDistance;\n    }\n    if (this.maxDeltaRevision_ != this.getRevision()) {\n      this.maxDelta_ = Math.sqrt(\n        arrayMaxSquaredDelta(\n          this.flatCoordinates,\n          0,\n          this.ends_,\n          this.stride,\n          0,\n        ),\n      );\n      this.maxDeltaRevision_ = this.getRevision();\n    }\n    return assignClosestArrayPoint(\n      this.flatCoordinates,\n      0,\n      this.ends_,\n      this.stride,\n      this.maxDelta_,\n      false,\n      x,\n      y,\n      closestPoint,\n      minSquaredDistance,\n    );\n  }\n\n  /**\n   * Returns the coordinate at `m` using linear interpolation, or `null` if no\n   * such coordinate exists.\n   *\n   * `extrapolate` controls extrapolation beyond the range of Ms in the\n   * MultiLineString. If `extrapolate` is `true` then Ms less than the first\n   * M will return the first coordinate and Ms greater than the last M will\n   * return the last coordinate.\n   *\n   * `interpolate` controls interpolation between consecutive LineStrings\n   * within the MultiLineString. If `interpolate` is `true` the coordinates\n   * will be linearly interpolated between the last coordinate of one LineString\n   * and the first coordinate of the next LineString.  If `interpolate` is\n   * `false` then the function will return `null` for Ms falling between\n   * LineStrings.\n   *\n   * @param {number} m M.\n   * @param {boolean} [extrapolate] Extrapolate. Default is `false`.\n   * @param {boolean} [interpolate] Interpolate. Default is `false`.\n   * @return {import(\"../coordinate.js\").Coordinate|null} Coordinate.\n   * @api\n   */\n  getCoordinateAtM(m, extrapolate, interpolate) {\n    if (\n      (this.layout != 'XYM' && this.layout != 'XYZM') ||\n      this.flatCoordinates.length === 0\n    ) {\n      return null;\n    }\n    extrapolate = extrapolate !== undefined ? extrapolate : false;\n    interpolate = interpolate !== undefined ? interpolate : false;\n    return lineStringsCoordinateAtM(\n      this.flatCoordinates,\n      0,\n      this.ends_,\n      this.stride,\n      m,\n      extrapolate,\n      interpolate,\n    );\n  }\n\n  /**\n   * Return the coordinates of the multilinestring.\n   * @return {Array<Array<import(\"../coordinate.js\").Coordinate>>} Coordinates.\n   * @api\n   * @override\n   */\n  getCoordinates() {\n    return inflateCoordinatesArray(\n      this.flatCoordinates,\n      0,\n      this.ends_,\n      this.stride,\n    );\n  }\n\n  /**\n   * @return {Array<number>} Ends.\n   */\n  getEnds() {\n    return this.ends_;\n  }\n\n  /**\n   * Return the linestring at the specified index.\n   * @param {number} index Index.\n   * @return {LineString} LineString.\n   * @api\n   */\n  getLineString(index) {\n    if (index < 0 || this.ends_.length <= index) {\n      return null;\n    }\n    return new LineString(\n      this.flatCoordinates.slice(\n        index === 0 ? 0 : this.ends_[index - 1],\n        this.ends_[index],\n      ),\n      this.layout,\n    );\n  }\n\n  /**\n   * Return the linestrings of this multilinestring.\n   * @return {Array<LineString>} LineStrings.\n   * @api\n   */\n  getLineStrings() {\n    const flatCoordinates = this.flatCoordinates;\n    const ends = this.ends_;\n    const layout = this.layout;\n    /** @type {Array<LineString>} */\n    const lineStrings = [];\n    let offset = 0;\n    for (let i = 0, ii = ends.length; i < ii; ++i) {\n      const end = ends[i];\n      const lineString = new LineString(\n        flatCoordinates.slice(offset, end),\n        layout,\n      );\n      lineStrings.push(lineString);\n      offset = end;\n    }\n    return lineStrings;\n  }\n\n  /**\n   * Return the sum of all line string lengths\n   * @return {number} Length (on projected plane).\n   * @api\n   */\n  getLength() {\n    const ends = this.ends_;\n    let start = 0;\n    let length = 0;\n    for (let i = 0, ii = ends.length; i < ii; ++i) {\n      length += lineStringLength(\n        this.flatCoordinates,\n        start,\n        ends[i],\n        this.stride,\n      );\n      start = ends[i];\n    }\n    return length;\n  }\n\n  /**\n   * @return {Array<number>} Flat midpoints.\n   */\n  getFlatMidpoints() {\n    /** @type {Array<number>} */\n    const midpoints = [];\n    const flatCoordinates = this.flatCoordinates;\n    let offset = 0;\n    const ends = this.ends_;\n    const stride = this.stride;\n    for (let i = 0, ii = ends.length; i < ii; ++i) {\n      const end = ends[i];\n      const midpoint = interpolatePoint(\n        flatCoordinates,\n        offset,\n        end,\n        stride,\n        0.5,\n      );\n      extend(midpoints, midpoint);\n      offset = end;\n    }\n    return midpoints;\n  }\n\n  /**\n   * @param {number} squaredTolerance Squared tolerance.\n   * @return {MultiLineString} Simplified MultiLineString.\n   * @protected\n   * @override\n   */\n  getSimplifiedGeometryInternal(squaredTolerance) {\n    /** @type {Array<number>} */\n    const simplifiedFlatCoordinates = [];\n    /** @type {Array<number>} */\n    const simplifiedEnds = [];\n    simplifiedFlatCoordinates.length = douglasPeuckerArray(\n      this.flatCoordinates,\n      0,\n      this.ends_,\n      this.stride,\n      squaredTolerance,\n      simplifiedFlatCoordinates,\n      0,\n      simplifiedEnds,\n    );\n    return new MultiLineString(simplifiedFlatCoordinates, 'XY', simplifiedEnds);\n  }\n\n  /**\n   * Get the type of this geometry.\n   * @return {import(\"./Geometry.js\").Type} Geometry type.\n   * @api\n   * @override\n   */\n  getType() {\n    return 'MultiLineString';\n  }\n\n  /**\n   * Test if the geometry and the passed extent intersect.\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @return {boolean} `true` if the geometry and the extent intersect.\n   * @api\n   * @override\n   */\n  intersectsExtent(extent) {\n    return intersectsLineStringArray(\n      this.flatCoordinates,\n      0,\n      this.ends_,\n      this.stride,\n      extent,\n    );\n  }\n\n  /**\n   * Set the coordinates of the multilinestring.\n   * @param {!Array<Array<import(\"../coordinate.js\").Coordinate>>} coordinates Coordinates.\n   * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n   * @api\n   * @override\n   */\n  setCoordinates(coordinates, layout) {\n    this.setLayout(layout, coordinates, 2);\n    if (!this.flatCoordinates) {\n      this.flatCoordinates = [];\n    }\n    const ends = deflateCoordinatesArray(\n      this.flatCoordinates,\n      0,\n      coordinates,\n      this.stride,\n      this.ends_,\n    );\n    this.flatCoordinates.length = ends.length === 0 ? 0 : ends[ends.length - 1];\n    this.changed();\n  }\n}\n\nexport default MultiLineString;\n", "/**\n * @module ol/geom/Point\n */\nimport {containsXY, createOrUpdateFromCoordinate} from '../extent.js';\nimport {squaredDistance as squaredDx} from '../math.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport {deflateCoordinate} from './flat/deflate.js';\n\n/**\n * @classdesc\n * Point geometry.\n *\n * @api\n */\nclass Point extends SimpleGeometry {\n  /**\n   * @param {import(\"../coordinate.js\").Coordinate} coordinates Coordinates.\n   * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n   */\n  constructor(coordinates, layout) {\n    super();\n    this.setCoordinates(coordinates, layout);\n  }\n\n  /**\n   * Make a complete copy of the geometry.\n   * @return {!Point} Clone.\n   * @api\n   * @override\n   */\n  clone() {\n    const point = new Point(this.flatCoordinates.slice(), this.layout);\n    point.applyProperties(this);\n    return point;\n  }\n\n  /**\n   * @param {number} x X.\n   * @param {number} y Y.\n   * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n   * @param {number} minSquaredDistance Minimum squared distance.\n   * @return {number} Minimum squared distance.\n   * @override\n   */\n  closestPointXY(x, y, closestPoint, minSquaredDistance) {\n    const flatCoordinates = this.flatCoordinates;\n    const squaredDistance = squaredDx(\n      x,\n      y,\n      flatCoordinates[0],\n      flatCoordinates[1],\n    );\n    if (squaredDistance < minSquaredDistance) {\n      const stride = this.stride;\n      for (let i = 0; i < stride; ++i) {\n        closestPoint[i] = flatCoordinates[i];\n      }\n      closestPoint.length = stride;\n      return squaredDistance;\n    }\n    return minSquaredDistance;\n  }\n\n  /**\n   * Return the coordinate of the point.\n   * @return {import(\"../coordinate.js\").Coordinate} Coordinates.\n   * @api\n   * @override\n   */\n  getCoordinates() {\n    return this.flatCoordinates.slice();\n  }\n\n  /**\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @protected\n   * @return {import(\"../extent.js\").Extent} extent Extent.\n   * @override\n   */\n  computeExtent(extent) {\n    return createOrUpdateFromCoordinate(this.flatCoordinates, extent);\n  }\n\n  /**\n   * Get the type of this geometry.\n   * @return {import(\"./Geometry.js\").Type} Geometry type.\n   * @api\n   * @override\n   */\n  getType() {\n    return 'Point';\n  }\n\n  /**\n   * Test if the geometry and the passed extent intersect.\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @return {boolean} `true` if the geometry and the extent intersect.\n   * @api\n   * @override\n   */\n  intersectsExtent(extent) {\n    return containsXY(extent, this.flatCoordinates[0], this.flatCoordinates[1]);\n  }\n\n  /**\n   * @param {!Array<*>} coordinates Coordinates.\n   * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n   * @api\n   * @override\n   */\n  setCoordinates(coordinates, layout) {\n    this.setLayout(layout, coordinates, 0);\n    if (!this.flatCoordinates) {\n      this.flatCoordinates = [];\n    }\n    this.flatCoordinates.length = deflateCoordinate(\n      this.flatCoordinates,\n      0,\n      coordinates,\n      this.stride,\n    );\n    this.changed();\n  }\n}\n\nexport default Point;\n", "/**\n * @module ol/geom/MultiPoint\n */\nimport {extend} from '../array.js';\nimport {closestSquaredDistanceXY, containsXY} from '../extent.js';\nimport {squaredDistance as squaredDx} from '../math.js';\nimport Point from './Point.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport {deflateCoordinates} from './flat/deflate.js';\nimport {inflateCoordinates} from './flat/inflate.js';\n\n/**\n * @classdesc\n * Multi-point geometry.\n *\n * @api\n */\nclass MultiPoint extends SimpleGeometry {\n  /**\n   * @param {Array<import(\"../coordinate.js\").Coordinate>|Array<number>} coordinates Coordinates.\n   *     For internal use, flat coordinates in combination with `layout` are also accepted.\n   * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n   */\n  constructor(coordinates, layout) {\n    super();\n    if (layout && !Array.isArray(coordinates[0])) {\n      this.setFlatCoordinates(\n        layout,\n        /** @type {Array<number>} */ (coordinates),\n      );\n    } else {\n      this.setCoordinates(\n        /** @type {Array<import(\"../coordinate.js\").Coordinate>} */ (\n          coordinates\n        ),\n        layout,\n      );\n    }\n  }\n\n  /**\n   * Append the passed point to this multipoint.\n   * @param {Point} point Point.\n   * @api\n   */\n  appendPoint(point) {\n    extend(this.flatCoordinates, point.getFlatCoordinates());\n    this.changed();\n  }\n\n  /**\n   * Make a complete copy of the geometry.\n   * @return {!MultiPoint} Clone.\n   * @api\n   * @override\n   */\n  clone() {\n    const multiPoint = new MultiPoint(\n      this.flatCoordinates.slice(),\n      this.layout,\n    );\n    multiPoint.applyProperties(this);\n    return multiPoint;\n  }\n\n  /**\n   * @param {number} x X.\n   * @param {number} y Y.\n   * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n   * @param {number} minSquaredDistance Minimum squared distance.\n   * @return {number} Minimum squared distance.\n   * @override\n   */\n  closestPointXY(x, y, closestPoint, minSquaredDistance) {\n    if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {\n      return minSquaredDistance;\n    }\n    const flatCoordinates = this.flatCoordinates;\n    const stride = this.stride;\n    for (let i = 0, ii = flatCoordinates.length; i < ii; i += stride) {\n      const squaredDistance = squaredDx(\n        x,\n        y,\n        flatCoordinates[i],\n        flatCoordinates[i + 1],\n      );\n      if (squaredDistance < minSquaredDistance) {\n        minSquaredDistance = squaredDistance;\n        for (let j = 0; j < stride; ++j) {\n          closestPoint[j] = flatCoordinates[i + j];\n        }\n        closestPoint.length = stride;\n      }\n    }\n    return minSquaredDistance;\n  }\n\n  /**\n   * Return the coordinates of the multipoint.\n   * @return {Array<import(\"../coordinate.js\").Coordinate>} Coordinates.\n   * @api\n   * @override\n   */\n  getCoordinates() {\n    return inflateCoordinates(\n      this.flatCoordinates,\n      0,\n      this.flatCoordinates.length,\n      this.stride,\n    );\n  }\n\n  /**\n   * Return the point at the specified index.\n   * @param {number} index Index.\n   * @return {Point} Point.\n   * @api\n   */\n  getPoint(index) {\n    const n = this.flatCoordinates.length / this.stride;\n    if (index < 0 || n <= index) {\n      return null;\n    }\n    return new Point(\n      this.flatCoordinates.slice(\n        index * this.stride,\n        (index + 1) * this.stride,\n      ),\n      this.layout,\n    );\n  }\n\n  /**\n   * Return the points of this multipoint.\n   * @return {Array<Point>} Points.\n   * @api\n   */\n  getPoints() {\n    const flatCoordinates = this.flatCoordinates;\n    const layout = this.layout;\n    const stride = this.stride;\n    /** @type {Array<Point>} */\n    const points = [];\n    for (let i = 0, ii = flatCoordinates.length; i < ii; i += stride) {\n      const point = new Point(flatCoordinates.slice(i, i + stride), layout);\n      points.push(point);\n    }\n    return points;\n  }\n\n  /**\n   * Get the type of this geometry.\n   * @return {import(\"./Geometry.js\").Type} Geometry type.\n   * @api\n   * @override\n   */\n  getType() {\n    return 'MultiPoint';\n  }\n\n  /**\n   * Test if the geometry and the passed extent intersect.\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @return {boolean} `true` if the geometry and the extent intersect.\n   * @api\n   * @override\n   */\n  intersectsExtent(extent) {\n    const flatCoordinates = this.flatCoordinates;\n    const stride = this.stride;\n    for (let i = 0, ii = flatCoordinates.length; i < ii; i += stride) {\n      const x = flatCoordinates[i];\n      const y = flatCoordinates[i + 1];\n      if (containsXY(extent, x, y)) {\n        return true;\n      }\n    }\n    return false;\n  }\n\n  /**\n   * Set the coordinates of the multipoint.\n   * @param {!Array<import(\"../coordinate.js\").Coordinate>} coordinates Coordinates.\n   * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n   * @api\n   * @override\n   */\n  setCoordinates(coordinates, layout) {\n    this.setLayout(layout, coordinates, 1);\n    if (!this.flatCoordinates) {\n      this.flatCoordinates = [];\n    }\n    this.flatCoordinates.length = deflateCoordinates(\n      this.flatCoordinates,\n      0,\n      coordinates,\n      this.stride,\n    );\n    this.changed();\n  }\n}\n\nexport default MultiPoint;\n", "/**\n * @module ol/geom/flat/area\n */\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {number} Area.\n */\nexport function linearRing(flatCoordinates, offset, end, stride) {\n  let twiceArea = 0;\n  const x0 = flatCoordinates[end - stride];\n  const y0 = flatCoordinates[end - stride + 1];\n  let dx1 = 0;\n  let dy1 = 0;\n  for (; offset < end; offset += stride) {\n    const dx2 = flatCoordinates[offset] - x0;\n    const dy2 = flatCoordinates[offset + 1] - y0;\n    twiceArea += dy1 * dx2 - dx1 * dy2;\n    dx1 = dx2;\n    dy1 = dy2;\n  }\n  return twiceArea / 2;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @return {number} Area.\n */\nexport function linearRings(flatCoordinates, offset, ends, stride) {\n  let area = 0;\n  for (let i = 0, ii = ends.length; i < ii; ++i) {\n    const end = ends[i];\n    area += linearRing(flatCoordinates, offset, end, stride);\n    offset = end;\n  }\n  return area;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @return {number} Area.\n */\nexport function linearRingss(flatCoordinates, offset, endss, stride) {\n  let area = 0;\n  for (let i = 0, ii = endss.length; i < ii; ++i) {\n    const ends = endss[i];\n    area += linearRings(flatCoordinates, offset, ends, stride);\n    offset = ends[ends.length - 1];\n  }\n  return area;\n}\n", "/**\n * @module ol/geom/LinearRing\n */\nimport {closestSquaredDistanceXY} from '../extent.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport {linearRing as linearRingArea} from './flat/area.js';\nimport {assignClosestPoint, maxSquaredDelta} from './flat/closest.js';\nimport {deflateCoordinates} from './flat/deflate.js';\nimport {inflateCoordinates} from './flat/inflate.js';\nimport {intersectsLineString} from './flat/intersectsextent.js';\nimport {douglasPeucker} from './flat/simplify.js';\n\n/**\n * @classdesc\n * Linear ring geometry. Only used as part of polygon; cannot be rendered\n * on its own.\n *\n * @api\n */\nclass LinearRing extends SimpleGeometry {\n  /**\n   * @param {Array<import(\"../coordinate.js\").Coordinate>|Array<number>} coordinates Coordinates.\n   *     For internal use, flat coordinates in combination with `layout` are also accepted.\n   * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n   */\n  constructor(coordinates, layout) {\n    super();\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.maxDelta_ = -1;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.maxDeltaRevision_ = -1;\n\n    if (layout !== undefined && !Array.isArray(coordinates[0])) {\n      this.setFlatCoordinates(\n        layout,\n        /** @type {Array<number>} */ (coordinates),\n      );\n    } else {\n      this.setCoordinates(\n        /** @type {Array<import(\"../coordinate.js\").Coordinate>} */ (\n          coordinates\n        ),\n        layout,\n      );\n    }\n  }\n\n  /**\n   * Make a complete copy of the geometry.\n   * @return {!LinearRing} Clone.\n   * @api\n   * @override\n   */\n  clone() {\n    return new LinearRing(this.flatCoordinates.slice(), this.layout);\n  }\n\n  /**\n   * @param {number} x X.\n   * @param {number} y Y.\n   * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n   * @param {number} minSquaredDistance Minimum squared distance.\n   * @return {number} Minimum squared distance.\n   * @override\n   */\n  closestPointXY(x, y, closestPoint, minSquaredDistance) {\n    if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {\n      return minSquaredDistance;\n    }\n    if (this.maxDeltaRevision_ != this.getRevision()) {\n      this.maxDelta_ = Math.sqrt(\n        maxSquaredDelta(\n          this.flatCoordinates,\n          0,\n          this.flatCoordinates.length,\n          this.stride,\n          0,\n        ),\n      );\n      this.maxDeltaRevision_ = this.getRevision();\n    }\n    return assignClosestPoint(\n      this.flatCoordinates,\n      0,\n      this.flatCoordinates.length,\n      this.stride,\n      this.maxDelta_,\n      true,\n      x,\n      y,\n      closestPoint,\n      minSquaredDistance,\n    );\n  }\n\n  /**\n   * Return the area of the linear ring on projected plane.\n   * @return {number} Area (on projected plane).\n   * @api\n   */\n  getArea() {\n    return linearRingArea(\n      this.flatCoordinates,\n      0,\n      this.flatCoordinates.length,\n      this.stride,\n    );\n  }\n\n  /**\n   * Return the coordinates of the linear ring.\n   * @return {Array<import(\"../coordinate.js\").Coordinate>} Coordinates.\n   * @api\n   * @override\n   */\n  getCoordinates() {\n    return inflateCoordinates(\n      this.flatCoordinates,\n      0,\n      this.flatCoordinates.length,\n      this.stride,\n    );\n  }\n\n  /**\n   * @param {number} squaredTolerance Squared tolerance.\n   * @return {LinearRing} Simplified LinearRing.\n   * @protected\n   * @override\n   */\n  getSimplifiedGeometryInternal(squaredTolerance) {\n    /** @type {Array<number>} */\n    const simplifiedFlatCoordinates = [];\n    simplifiedFlatCoordinates.length = douglasPeucker(\n      this.flatCoordinates,\n      0,\n      this.flatCoordinates.length,\n      this.stride,\n      squaredTolerance,\n      simplifiedFlatCoordinates,\n      0,\n    );\n    return new LinearRing(simplifiedFlatCoordinates, 'XY');\n  }\n\n  /**\n   * Get the type of this geometry.\n   * @return {import(\"./Geometry.js\").Type} Geometry type.\n   * @api\n   * @override\n   */\n  getType() {\n    return 'LinearRing';\n  }\n\n  /**\n   * Test if the geometry and the passed extent intersect. A linear ring is\n   * treated as a line string for this test.\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @return {boolean} `true` if the geometry and the extent intersect.\n   * @api\n   * @override\n   */\n  intersectsExtent(extent) {\n    return intersectsLineString(\n      this.flatCoordinates,\n      0,\n      this.flatCoordinates.length,\n      this.stride,\n      extent,\n    );\n  }\n\n  /**\n   * Set the coordinates of the linear ring.\n   * @param {!Array<import(\"../coordinate.js\").Coordinate>} coordinates Coordinates.\n   * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n   * @api\n   * @override\n   */\n  setCoordinates(coordinates, layout) {\n    this.setLayout(layout, coordinates, 1);\n    if (!this.flatCoordinates) {\n      this.flatCoordinates = [];\n    }\n    this.flatCoordinates.length = deflateCoordinates(\n      this.flatCoordinates,\n      0,\n      coordinates,\n      this.stride,\n    );\n    this.changed();\n  }\n}\n\nexport default LinearRing;\n", "/**\n * @module ol/geom/flat/interiorpoint\n */\nimport {ascending} from '../../array.js';\nimport {linearRingsContainsXY} from './contains.js';\n\n/**\n * Calculates a point that is likely to lie in the interior of the linear rings.\n * Inspired by JTS's com.vividsolutions.jts.geom.Geometry#getInteriorPoint.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {Array<number>} flatCenters Flat centers.\n * @param {number} flatCentersOffset Flat center offset.\n * @param {Array<number>} [dest] Destination.\n * @return {Array<number>} Destination point as XYM coordinate, where M is the\n * length of the horizontal intersection that the point belongs to.\n */\nexport function getInteriorPointOfArray(\n  flatCoordinates,\n  offset,\n  ends,\n  stride,\n  flatCenters,\n  flatCentersOffset,\n  dest,\n) {\n  let i, ii, x, x1, x2, y1, y2;\n  const y = flatCenters[flatCentersOffset + 1];\n  /** @type {Array<number>} */\n  const intersections = [];\n  // Calculate intersections with the horizontal line\n  for (let r = 0, rr = ends.length; r < rr; ++r) {\n    const end = ends[r];\n    x1 = flatCoordinates[end - stride];\n    y1 = flatCoordinates[end - stride + 1];\n    for (i = offset; i < end; i += stride) {\n      x2 = flatCoordinates[i];\n      y2 = flatCoordinates[i + 1];\n      if ((y <= y1 && y2 <= y) || (y1 <= y && y <= y2)) {\n        x = ((y - y1) / (y2 - y1)) * (x2 - x1) + x1;\n        intersections.push(x);\n      }\n      x1 = x2;\n      y1 = y2;\n    }\n  }\n  // Find the longest segment of the horizontal line that has its center point\n  // inside the linear ring.\n  let pointX = NaN;\n  let maxSegmentLength = -Infinity;\n  intersections.sort(ascending);\n  x1 = intersections[0];\n  for (i = 1, ii = intersections.length; i < ii; ++i) {\n    x2 = intersections[i];\n    const segmentLength = Math.abs(x2 - x1);\n    if (segmentLength > maxSegmentLength) {\n      x = (x1 + x2) / 2;\n      if (linearRingsContainsXY(flatCoordinates, offset, ends, stride, x, y)) {\n        pointX = x;\n        maxSegmentLength = segmentLength;\n      }\n    }\n    x1 = x2;\n  }\n  if (isNaN(pointX)) {\n    // There is no horizontal line that has its center point inside the linear\n    // ring.  Use the center of the the linear ring's extent.\n    pointX = flatCenters[flatCentersOffset];\n  }\n  if (dest) {\n    dest.push(pointX, y, maxSegmentLength);\n    return dest;\n  }\n  return [pointX, y, maxSegmentLength];\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @param {Array<number>} flatCenters Flat centers.\n * @return {Array<number>} Interior points as XYM coordinates, where M is the\n * length of the horizontal intersection that the point belongs to.\n */\nexport function getInteriorPointsOfMultiArray(\n  flatCoordinates,\n  offset,\n  endss,\n  stride,\n  flatCenters,\n) {\n  /** @type {Array<number>} */\n  let interiorPoints = [];\n  for (let i = 0, ii = endss.length; i < ii; ++i) {\n    const ends = endss[i];\n    interiorPoints = getInteriorPointOfArray(\n      flatCoordinates,\n      offset,\n      ends,\n      stride,\n      flatCenters,\n      2 * i,\n      interiorPoints,\n    );\n    offset = ends[ends.length - 1];\n  }\n  return interiorPoints;\n}\n", "/**\n * @module ol/geom/flat/reverse\n */\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n */\nexport function coordinates(flatCoordinates, offset, end, stride) {\n  while (offset < end - stride) {\n    for (let i = 0; i < stride; ++i) {\n      const tmp = flatCoordinates[offset + i];\n      flatCoordinates[offset + i] = flatCoordinates[end - stride + i];\n      flatCoordinates[end - stride + i] = tmp;\n    }\n    offset += stride;\n    end -= stride;\n  }\n}\n", "/**\n * @module ol/geom/flat/orient\n */\nimport {coordinates as reverseCoordinates} from './reverse.js';\n\n/**\n * Is the linear ring oriented clockwise in a coordinate system with a bottom-left\n * coordinate origin? For a coordinate system with a top-left coordinate origin,\n * the ring's orientation is clockwise when this function returns false.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {boolean|undefined} Is clockwise.\n */\nexport function linearRingIsClockwise(flatCoordinates, offset, end, stride) {\n  // https://stackoverflow.com/q/1165647/clockwise-method#1165943\n  // https://github.com/OSGeo/gdal/blob/master/gdal/ogr/ogrlinearring.cpp\n  let edge = 0;\n  let x1 = flatCoordinates[end - stride];\n  let y1 = flatCoordinates[end - stride + 1];\n  for (; offset < end; offset += stride) {\n    const x2 = flatCoordinates[offset];\n    const y2 = flatCoordinates[offset + 1];\n    edge += (x2 - x1) * (y2 + y1);\n    x1 = x2;\n    y1 = y2;\n  }\n  return edge === 0 ? undefined : edge > 0;\n}\n\n/**\n * Determines if linear rings are oriented.  By default, left-hand orientation\n * is tested (first ring must be clockwise, remaining rings counter-clockwise).\n * To test for right-hand orientation, use the `right` argument.\n *\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Array of end indexes.\n * @param {number} stride Stride.\n * @param {boolean} [right] Test for right-hand orientation\n *     (counter-clockwise exterior ring and clockwise interior rings).\n * @return {boolean} Rings are correctly oriented.\n */\nexport function linearRingsAreOriented(\n  flatCoordinates,\n  offset,\n  ends,\n  stride,\n  right,\n) {\n  right = right !== undefined ? right : false;\n  for (let i = 0, ii = ends.length; i < ii; ++i) {\n    const end = ends[i];\n    const isClockwise = linearRingIsClockwise(\n      flatCoordinates,\n      offset,\n      end,\n      stride,\n    );\n    if (i === 0) {\n      if ((right && isClockwise) || (!right && !isClockwise)) {\n        return false;\n      }\n    } else {\n      if ((right && !isClockwise) || (!right && isClockwise)) {\n        return false;\n      }\n    }\n    offset = end;\n  }\n  return true;\n}\n\n/**\n * Determines if linear rings are oriented.  By default, left-hand orientation\n * is tested (first ring must be clockwise, remaining rings counter-clockwise).\n * To test for right-hand orientation, use the `right` argument.\n *\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Array of array of end indexes.\n * @param {number} stride Stride.\n * @param {boolean} [right] Test for right-hand orientation\n *     (counter-clockwise exterior ring and clockwise interior rings).\n * @return {boolean} Rings are correctly oriented.\n */\nexport function linearRingssAreOriented(\n  flatCoordinates,\n  offset,\n  endss,\n  stride,\n  right,\n) {\n  for (let i = 0, ii = endss.length; i < ii; ++i) {\n    const ends = endss[i];\n    if (!linearRingsAreOriented(flatCoordinates, offset, ends, stride, right)) {\n      return false;\n    }\n    if (ends.length) {\n      offset = ends[ends.length - 1];\n    }\n  }\n  return true;\n}\n\n/**\n * Orient coordinates in a flat array of linear rings.  By default, rings\n * are oriented following the left-hand rule (clockwise for exterior and\n * counter-clockwise for interior rings).  To orient according to the\n * right-hand rule, use the `right` argument.\n *\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {boolean} [right] Follow the right-hand rule for orientation.\n * @return {number} End.\n */\nexport function orientLinearRings(\n  flatCoordinates,\n  offset,\n  ends,\n  stride,\n  right,\n) {\n  right = right !== undefined ? right : false;\n  for (let i = 0, ii = ends.length; i < ii; ++i) {\n    const end = ends[i];\n    const isClockwise = linearRingIsClockwise(\n      flatCoordinates,\n      offset,\n      end,\n      stride,\n    );\n    const reverse =\n      i === 0\n        ? (right && isClockwise) || (!right && !isClockwise)\n        : (right && !isClockwise) || (!right && isClockwise);\n    if (reverse) {\n      reverseCoordinates(flatCoordinates, offset, end, stride);\n    }\n    offset = end;\n  }\n  return offset;\n}\n\n/**\n * Orient coordinates in a flat array of linear rings.  By default, rings\n * are oriented following the left-hand rule (clockwise for exterior and\n * counter-clockwise for interior rings).  To orient according to the\n * right-hand rule, use the `right` argument.\n *\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Array of array of end indexes.\n * @param {number} stride Stride.\n * @param {boolean} [right] Follow the right-hand rule for orientation.\n * @return {number} End.\n */\nexport function orientLinearRingsArray(\n  flatCoordinates,\n  offset,\n  endss,\n  stride,\n  right,\n) {\n  for (let i = 0, ii = endss.length; i < ii; ++i) {\n    offset = orientLinearRings(\n      flatCoordinates,\n      offset,\n      endss[i],\n      stride,\n      right,\n    );\n  }\n  return offset;\n}\n\n/**\n * Return a two-dimensional endss\n * @param {Array<number>} flatCoordinates Flat coordinates\n * @param {Array<number>} ends Linear ring end indexes\n * @return {Array<Array<number>>} Two dimensional endss array that can\n * be used to construct a MultiPolygon\n */\nexport function inflateEnds(flatCoordinates, ends) {\n  const endss = [];\n  let offset = 0;\n  let prevEndIndex = 0;\n  let startOrientation;\n  for (let i = 0, ii = ends.length; i < ii; ++i) {\n    const end = ends[i];\n    // classifies an array of rings into polygons with outer rings and holes\n    const orientation = linearRingIsClockwise(flatCoordinates, offset, end, 2);\n    if (startOrientation === undefined) {\n      startOrientation = orientation;\n    }\n    if (orientation === startOrientation) {\n      endss.push(ends.slice(prevEndIndex, i + 1));\n    } else {\n      if (endss.length === 0) {\n        continue;\n      }\n      endss[endss.length - 1].push(ends[prevEndIndex]);\n    }\n    prevEndIndex = i + 1;\n    offset = end;\n  }\n  return endss;\n}\n", "/**\n * @module ol/geom/Polygon\n */\nimport {extend} from '../array.js';\nimport {closestSquaredDistanceXY, getCenter, isEmpty} from '../extent.js';\nimport {modulo} from '../math.js';\nimport {offset as sphereOffset} from '../sphere.js';\nimport LinearRing from './LinearRing.js';\nimport Point from './Point.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport {linearRings as linearRingsArea} from './flat/area.js';\nimport {arrayMaxSquaredDelta, assignClosestArrayPoint} from './flat/closest.js';\nimport {linearRingsContainsXY} from './flat/contains.js';\nimport {deflateCoordinatesArray} from './flat/deflate.js';\nimport {inflateCoordinatesArray} from './flat/inflate.js';\nimport {getInteriorPointOfArray} from './flat/interiorpoint.js';\nimport {intersectsLinearRingArray} from './flat/intersectsextent.js';\nimport {linearRingsAreOriented, orientLinearRings} from './flat/orient.js';\nimport {quantizeArray} from './flat/simplify.js';\n\n/**\n * @classdesc\n * Polygon geometry.\n *\n * @api\n */\nclass Polygon extends SimpleGeometry {\n  /**\n   * @param {!Array<Array<import(\"../coordinate.js\").Coordinate>>|!Array<number>} coordinates\n   *     Array of linear rings that define the polygon. The first linear ring of the\n   *     array defines the outer-boundary or surface of the polygon. Each subsequent\n   *     linear ring defines a hole in the surface of the polygon. A linear ring is\n   *     an array of vertices' coordinates where the first coordinate and the last are\n   *     equivalent. (For internal use, flat coordinates in combination with\n   *     `layout` and `ends` are also accepted.)\n   * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n   * @param {Array<number>} [ends] Ends (for internal use with flat coordinates).\n   */\n  constructor(coordinates, layout, ends) {\n    super();\n\n    /**\n     * @type {Array<number>}\n     * @private\n     */\n    this.ends_ = [];\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.flatInteriorPointRevision_ = -1;\n\n    /**\n     * @private\n     * @type {import(\"../coordinate.js\").Coordinate|null}\n     */\n    this.flatInteriorPoint_ = null;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.maxDelta_ = -1;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.maxDeltaRevision_ = -1;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.orientedRevision_ = -1;\n\n    /**\n     * @private\n     * @type {Array<number>|null}\n     */\n    this.orientedFlatCoordinates_ = null;\n\n    if (layout !== undefined && ends) {\n      this.setFlatCoordinates(\n        layout,\n        /** @type {Array<number>} */ (coordinates),\n      );\n      this.ends_ = ends;\n    } else {\n      this.setCoordinates(\n        /** @type {Array<Array<import(\"../coordinate.js\").Coordinate>>} */ (\n          coordinates\n        ),\n        layout,\n      );\n    }\n  }\n\n  /**\n   * Append the passed linear ring to this polygon.\n   * @param {LinearRing} linearRing Linear ring.\n   * @api\n   */\n  appendLinearRing(linearRing) {\n    if (!this.flatCoordinates) {\n      this.flatCoordinates = linearRing.getFlatCoordinates().slice();\n    } else {\n      extend(this.flatCoordinates, linearRing.getFlatCoordinates());\n    }\n    this.ends_.push(this.flatCoordinates.length);\n    this.changed();\n  }\n\n  /**\n   * Make a complete copy of the geometry.\n   * @return {!Polygon} Clone.\n   * @api\n   * @override\n   */\n  clone() {\n    const polygon = new Polygon(\n      this.flatCoordinates.slice(),\n      this.layout,\n      this.ends_.slice(),\n    );\n    polygon.applyProperties(this);\n    return polygon;\n  }\n\n  /**\n   * @param {number} x X.\n   * @param {number} y Y.\n   * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n   * @param {number} minSquaredDistance Minimum squared distance.\n   * @return {number} Minimum squared distance.\n   * @override\n   */\n  closestPointXY(x, y, closestPoint, minSquaredDistance) {\n    if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {\n      return minSquaredDistance;\n    }\n    if (this.maxDeltaRevision_ != this.getRevision()) {\n      this.maxDelta_ = Math.sqrt(\n        arrayMaxSquaredDelta(\n          this.flatCoordinates,\n          0,\n          this.ends_,\n          this.stride,\n          0,\n        ),\n      );\n      this.maxDeltaRevision_ = this.getRevision();\n    }\n    return assignClosestArrayPoint(\n      this.flatCoordinates,\n      0,\n      this.ends_,\n      this.stride,\n      this.maxDelta_,\n      true,\n      x,\n      y,\n      closestPoint,\n      minSquaredDistance,\n    );\n  }\n\n  /**\n   * @param {number} x X.\n   * @param {number} y Y.\n   * @return {boolean} Contains (x, y).\n   * @override\n   */\n  containsXY(x, y) {\n    return linearRingsContainsXY(\n      this.getOrientedFlatCoordinates(),\n      0,\n      this.ends_,\n      this.stride,\n      x,\n      y,\n    );\n  }\n\n  /**\n   * Return the area of the polygon on projected plane.\n   * @return {number} Area (on projected plane).\n   * @api\n   */\n  getArea() {\n    return linearRingsArea(\n      this.getOrientedFlatCoordinates(),\n      0,\n      this.ends_,\n      this.stride,\n    );\n  }\n\n  /**\n   * Get the coordinate array for this geometry.  This array has the structure\n   * of a GeoJSON coordinate array for polygons.\n   *\n   * @param {boolean} [right] Orient coordinates according to the right-hand\n   *     rule (counter-clockwise for exterior and clockwise for interior rings).\n   *     If `false`, coordinates will be oriented according to the left-hand rule\n   *     (clockwise for exterior and counter-clockwise for interior rings).\n   *     By default, coordinate orientation will depend on how the geometry was\n   *     constructed.\n   * @return {Array<Array<import(\"../coordinate.js\").Coordinate>>} Coordinates.\n   * @api\n   * @override\n   */\n  getCoordinates(right) {\n    let flatCoordinates;\n    if (right !== undefined) {\n      flatCoordinates = this.getOrientedFlatCoordinates().slice();\n      orientLinearRings(flatCoordinates, 0, this.ends_, this.stride, right);\n    } else {\n      flatCoordinates = this.flatCoordinates;\n    }\n\n    return inflateCoordinatesArray(flatCoordinates, 0, this.ends_, this.stride);\n  }\n\n  /**\n   * @return {Array<number>} Ends.\n   */\n  getEnds() {\n    return this.ends_;\n  }\n\n  /**\n   * @return {Array<number>} Interior point.\n   */\n  getFlatInteriorPoint() {\n    if (this.flatInteriorPointRevision_ != this.getRevision()) {\n      const flatCenter = getCenter(this.getExtent());\n      this.flatInteriorPoint_ = getInteriorPointOfArray(\n        this.getOrientedFlatCoordinates(),\n        0,\n        this.ends_,\n        this.stride,\n        flatCenter,\n        0,\n      );\n      this.flatInteriorPointRevision_ = this.getRevision();\n    }\n    return /** @type {import(\"../coordinate.js\").Coordinate} */ (\n      this.flatInteriorPoint_\n    );\n  }\n\n  /**\n   * Return an interior point of the polygon.\n   * @return {Point} Interior point as XYM coordinate, where M is the\n   * length of the horizontal intersection that the point belongs to.\n   * @api\n   */\n  getInteriorPoint() {\n    return new Point(this.getFlatInteriorPoint(), 'XYM');\n  }\n\n  /**\n   * Return the number of rings of the polygon,  this includes the exterior\n   * ring and any interior rings.\n   *\n   * @return {number} Number of rings.\n   * @api\n   */\n  getLinearRingCount() {\n    return this.ends_.length;\n  }\n\n  /**\n   * Return the Nth linear ring of the polygon geometry. Return `null` if the\n   * given index is out of range.\n   * The exterior linear ring is available at index `0` and the interior rings\n   * at index `1` and beyond.\n   *\n   * @param {number} index Index.\n   * @return {LinearRing|null} Linear ring.\n   * @api\n   */\n  getLinearRing(index) {\n    if (index < 0 || this.ends_.length <= index) {\n      return null;\n    }\n    return new LinearRing(\n      this.flatCoordinates.slice(\n        index === 0 ? 0 : this.ends_[index - 1],\n        this.ends_[index],\n      ),\n      this.layout,\n    );\n  }\n\n  /**\n   * Return the linear rings of the polygon.\n   * @return {Array<LinearRing>} Linear rings.\n   * @api\n   */\n  getLinearRings() {\n    const layout = this.layout;\n    const flatCoordinates = this.flatCoordinates;\n    const ends = this.ends_;\n    const linearRings = [];\n    let offset = 0;\n    for (let i = 0, ii = ends.length; i < ii; ++i) {\n      const end = ends[i];\n      const linearRing = new LinearRing(\n        flatCoordinates.slice(offset, end),\n        layout,\n      );\n      linearRings.push(linearRing);\n      offset = end;\n    }\n    return linearRings;\n  }\n\n  /**\n   * @return {Array<number>} Oriented flat coordinates.\n   */\n  getOrientedFlatCoordinates() {\n    if (this.orientedRevision_ != this.getRevision()) {\n      const flatCoordinates = this.flatCoordinates;\n      if (linearRingsAreOriented(flatCoordinates, 0, this.ends_, this.stride)) {\n        this.orientedFlatCoordinates_ = flatCoordinates;\n      } else {\n        this.orientedFlatCoordinates_ = flatCoordinates.slice();\n        this.orientedFlatCoordinates_.length = orientLinearRings(\n          this.orientedFlatCoordinates_,\n          0,\n          this.ends_,\n          this.stride,\n        );\n      }\n      this.orientedRevision_ = this.getRevision();\n    }\n    return /** @type {Array<number>} */ (this.orientedFlatCoordinates_);\n  }\n\n  /**\n   * @param {number} squaredTolerance Squared tolerance.\n   * @return {Polygon} Simplified Polygon.\n   * @protected\n   * @override\n   */\n  getSimplifiedGeometryInternal(squaredTolerance) {\n    /** @type {Array<number>} */\n    const simplifiedFlatCoordinates = [];\n    /** @type {Array<number>} */\n    const simplifiedEnds = [];\n    simplifiedFlatCoordinates.length = quantizeArray(\n      this.flatCoordinates,\n      0,\n      this.ends_,\n      this.stride,\n      Math.sqrt(squaredTolerance),\n      simplifiedFlatCoordinates,\n      0,\n      simplifiedEnds,\n    );\n    return new Polygon(simplifiedFlatCoordinates, 'XY', simplifiedEnds);\n  }\n\n  /**\n   * Get the type of this geometry.\n   * @return {import(\"./Geometry.js\").Type} Geometry type.\n   * @api\n   * @override\n   */\n  getType() {\n    return 'Polygon';\n  }\n\n  /**\n   * Test if the geometry and the passed extent intersect.\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @return {boolean} `true` if the geometry and the extent intersect.\n   * @api\n   * @override\n   */\n  intersectsExtent(extent) {\n    return intersectsLinearRingArray(\n      this.getOrientedFlatCoordinates(),\n      0,\n      this.ends_,\n      this.stride,\n      extent,\n    );\n  }\n\n  /**\n   * Set the coordinates of the polygon.\n   * @param {!Array<Array<import(\"../coordinate.js\").Coordinate>>} coordinates Coordinates.\n   * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n   * @api\n   * @override\n   */\n  setCoordinates(coordinates, layout) {\n    this.setLayout(layout, coordinates, 2);\n    if (!this.flatCoordinates) {\n      this.flatCoordinates = [];\n    }\n    const ends = deflateCoordinatesArray(\n      this.flatCoordinates,\n      0,\n      coordinates,\n      this.stride,\n      this.ends_,\n    );\n    this.flatCoordinates.length = ends.length === 0 ? 0 : ends[ends.length - 1];\n    this.changed();\n  }\n}\n\nexport default Polygon;\n\n/**\n * Create an approximation of a circle on the surface of a sphere.\n * @param {import(\"../coordinate.js\").Coordinate} center Center (`[lon, lat]` in degrees).\n * @param {number} radius The great-circle distance from the center to\n *     the polygon vertices in meters.\n * @param {number} [n] Optional number of vertices for the resulting\n *     polygon. Default is `32`.\n * @param {number} [sphereRadius] Optional radius for the sphere (defaults to\n *     the Earth's mean radius using the WGS84 ellipsoid).\n * @return {Polygon} The \"circular\" polygon.\n * @api\n */\nexport function circular(center, radius, n, sphereRadius) {\n  n = n ? n : 32;\n  /** @type {Array<number>} */\n  const flatCoordinates = [];\n  for (let i = 0; i < n; ++i) {\n    extend(\n      flatCoordinates,\n      sphereOffset(center, radius, (2 * Math.PI * i) / n, sphereRadius),\n    );\n  }\n  flatCoordinates.push(flatCoordinates[0], flatCoordinates[1]);\n  return new Polygon(flatCoordinates, 'XY', [flatCoordinates.length]);\n}\n\n/**\n * Create a polygon from an extent. The layout used is `XY`.\n * @param {import(\"../extent.js\").Extent} extent The extent.\n * @return {Polygon} The polygon.\n * @api\n */\nexport function fromExtent(extent) {\n  if (isEmpty(extent)) {\n    throw new Error('Cannot create polygon from empty extent');\n  }\n  const minX = extent[0];\n  const minY = extent[1];\n  const maxX = extent[2];\n  const maxY = extent[3];\n  const flatCoordinates = [\n    minX,\n    minY,\n    minX,\n    maxY,\n    maxX,\n    maxY,\n    maxX,\n    minY,\n    minX,\n    minY,\n  ];\n  return new Polygon(flatCoordinates, 'XY', [flatCoordinates.length]);\n}\n\n/**\n * Create a regular polygon from a circle.\n * @param {import(\"./Circle.js\").default} circle Circle geometry.\n * @param {number} [sides] Number of sides of the polygon. Default is 32.\n * @param {number} [angle] Start angle for the first vertex of the polygon in\n *     counter-clockwise radians. 0 means East. Default is 0.\n * @return {Polygon} Polygon geometry.\n * @api\n */\nexport function fromCircle(circle, sides, angle) {\n  sides = sides ? sides : 32;\n  const stride = circle.getStride();\n  const layout = circle.getLayout();\n  const center = circle.getCenter();\n  const arrayLength = stride * (sides + 1);\n  const flatCoordinates = new Array(arrayLength);\n  for (let i = 0; i < arrayLength; i += stride) {\n    flatCoordinates[i] = 0;\n    flatCoordinates[i + 1] = 0;\n    for (let j = 2; j < stride; j++) {\n      flatCoordinates[i + j] = center[j];\n    }\n  }\n  const ends = [flatCoordinates.length];\n  const polygon = new Polygon(flatCoordinates, layout, ends);\n  makeRegular(polygon, center, circle.getRadius(), angle);\n  return polygon;\n}\n\n/**\n * Modify the coordinates of a polygon to make it a regular polygon.\n * @param {Polygon} polygon Polygon geometry.\n * @param {import(\"../coordinate.js\").Coordinate} center Center of the regular polygon.\n * @param {number} radius Radius of the regular polygon.\n * @param {number} [angle] Start angle for the first vertex of the polygon in\n *     counter-clockwise radians. 0 means East. Default is 0.\n */\nexport function makeRegular(polygon, center, radius, angle) {\n  const flatCoordinates = polygon.getFlatCoordinates();\n  const stride = polygon.getStride();\n  const sides = flatCoordinates.length / stride - 1;\n  const startAngle = angle ? angle : 0;\n  for (let i = 0; i <= sides; ++i) {\n    const offset = i * stride;\n    const angle = startAngle + (modulo(i, sides) * 2 * Math.PI) / sides;\n    flatCoordinates[offset] = center[0] + radius * Math.cos(angle);\n    flatCoordinates[offset + 1] = center[1] + radius * Math.sin(angle);\n  }\n  polygon.changed();\n}\n", "/**\n * @module ol/geom/flat/center\n */\nimport {createEmpty, createOrUpdateFromFlatCoordinates} from '../../extent.js';\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @return {Array<number>} Flat centers.\n */\nexport function linearRingss(flatCoordinates, offset, endss, stride) {\n  const flatCenters = [];\n  let extent = createEmpty();\n  for (let i = 0, ii = endss.length; i < ii; ++i) {\n    const ends = endss[i];\n    extent = createOrUpdateFromFlatCoordinates(\n      flatCoordinates,\n      offset,\n      ends[0],\n      stride,\n    );\n    flatCenters.push((extent[0] + extent[2]) / 2, (extent[1] + extent[3]) / 2);\n    offset = ends[ends.length - 1];\n  }\n  return flatCenters;\n}\n", "/**\n * @module ol/geom/MultiPolygon\n */\nimport {extend} from '../array.js';\nimport {closestSquaredDistanceXY} from '../extent.js';\nimport MultiPoint from './MultiPoint.js';\nimport Polygon from './Polygon.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport {linearRingss as linearRingssArea} from './flat/area.js';\nimport {linearRingss as linearRingssCenter} from './flat/center.js';\nimport {\n  assignClosestMultiArrayPoint,\n  multiArrayMaxSquaredDelta,\n} from './flat/closest.js';\nimport {linearRingssContainsXY} from './flat/contains.js';\nimport {deflateMultiCoordinatesArray} from './flat/deflate.js';\nimport {inflateMultiCoordinatesArray} from './flat/inflate.js';\nimport {getInteriorPointsOfMultiArray} from './flat/interiorpoint.js';\nimport {intersectsLinearRingMultiArray} from './flat/intersectsextent.js';\nimport {\n  linearRingssAreOriented,\n  orientLinearRingsArray,\n} from './flat/orient.js';\nimport {quantizeMultiArray} from './flat/simplify.js';\n\n/**\n * @classdesc\n * Multi-polygon geometry.\n *\n * @api\n */\nclass MultiPolygon extends SimpleGeometry {\n  /**\n   * @param {Array<Array<Array<import(\"../coordinate.js\").Coordinate>>|Polygon>|Array<number>} coordinates Coordinates.\n   *     For internal use, flat coordinates in combination with `layout` and `endss` are also accepted.\n   * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n   * @param {Array<Array<number>>} [endss] Array of ends for internal use with flat coordinates.\n   */\n  constructor(coordinates, layout, endss) {\n    super();\n\n    /**\n     * @type {Array<Array<number>>}\n     * @private\n     */\n    this.endss_ = [];\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.flatInteriorPointsRevision_ = -1;\n\n    /**\n     * @private\n     * @type {Array<number>|null}\n     */\n    this.flatInteriorPoints_ = null;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.maxDelta_ = -1;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.maxDeltaRevision_ = -1;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.orientedRevision_ = -1;\n\n    /**\n     * @private\n     * @type {Array<number>|null}\n     */\n    this.orientedFlatCoordinates_ = null;\n\n    if (!endss && !Array.isArray(coordinates[0])) {\n      const polygons = /** @type {Array<Polygon>} */ (coordinates);\n      /** @type {Array<number>} */\n      const flatCoordinates = [];\n      const thisEndss = [];\n      for (let i = 0, ii = polygons.length; i < ii; ++i) {\n        const polygon = polygons[i];\n        const offset = flatCoordinates.length;\n        const ends = polygon.getEnds();\n        for (let j = 0, jj = ends.length; j < jj; ++j) {\n          ends[j] += offset;\n        }\n        extend(flatCoordinates, polygon.getFlatCoordinates());\n        thisEndss.push(ends);\n      }\n      layout =\n        polygons.length === 0 ? this.getLayout() : polygons[0].getLayout();\n      coordinates = flatCoordinates;\n      endss = thisEndss;\n    }\n    if (layout !== undefined && endss) {\n      this.setFlatCoordinates(\n        layout,\n        /** @type {Array<number>} */ (coordinates),\n      );\n      this.endss_ = endss;\n    } else {\n      this.setCoordinates(\n        /** @type {Array<Array<Array<import(\"../coordinate.js\").Coordinate>>>} */ (\n          coordinates\n        ),\n        layout,\n      );\n    }\n  }\n\n  /**\n   * Append the passed polygon to this multipolygon.\n   * @param {Polygon} polygon Polygon.\n   * @api\n   */\n  appendPolygon(polygon) {\n    /** @type {Array<number>} */\n    let ends;\n    if (!this.flatCoordinates) {\n      this.flatCoordinates = polygon.getFlatCoordinates().slice();\n      ends = polygon.getEnds().slice();\n      this.endss_.push();\n    } else {\n      const offset = this.flatCoordinates.length;\n      extend(this.flatCoordinates, polygon.getFlatCoordinates());\n      ends = polygon.getEnds().slice();\n      for (let i = 0, ii = ends.length; i < ii; ++i) {\n        ends[i] += offset;\n      }\n    }\n    this.endss_.push(ends);\n    this.changed();\n  }\n\n  /**\n   * Make a complete copy of the geometry.\n   * @return {!MultiPolygon} Clone.\n   * @api\n   * @override\n   */\n  clone() {\n    const len = this.endss_.length;\n    const newEndss = new Array(len);\n    for (let i = 0; i < len; ++i) {\n      newEndss[i] = this.endss_[i].slice();\n    }\n\n    const multiPolygon = new MultiPolygon(\n      this.flatCoordinates.slice(),\n      this.layout,\n      newEndss,\n    );\n    multiPolygon.applyProperties(this);\n\n    return multiPolygon;\n  }\n\n  /**\n   * @param {number} x X.\n   * @param {number} y Y.\n   * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n   * @param {number} minSquaredDistance Minimum squared distance.\n   * @return {number} Minimum squared distance.\n   * @override\n   */\n  closestPointXY(x, y, closestPoint, minSquaredDistance) {\n    if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {\n      return minSquaredDistance;\n    }\n    if (this.maxDeltaRevision_ != this.getRevision()) {\n      this.maxDelta_ = Math.sqrt(\n        multiArrayMaxSquaredDelta(\n          this.flatCoordinates,\n          0,\n          this.endss_,\n          this.stride,\n          0,\n        ),\n      );\n      this.maxDeltaRevision_ = this.getRevision();\n    }\n    return assignClosestMultiArrayPoint(\n      this.getOrientedFlatCoordinates(),\n      0,\n      this.endss_,\n      this.stride,\n      this.maxDelta_,\n      true,\n      x,\n      y,\n      closestPoint,\n      minSquaredDistance,\n    );\n  }\n\n  /**\n   * @param {number} x X.\n   * @param {number} y Y.\n   * @return {boolean} Contains (x, y).\n   * @override\n   */\n  containsXY(x, y) {\n    return linearRingssContainsXY(\n      this.getOrientedFlatCoordinates(),\n      0,\n      this.endss_,\n      this.stride,\n      x,\n      y,\n    );\n  }\n\n  /**\n   * Return the area of the multipolygon on projected plane.\n   * @return {number} Area (on projected plane).\n   * @api\n   */\n  getArea() {\n    return linearRingssArea(\n      this.getOrientedFlatCoordinates(),\n      0,\n      this.endss_,\n      this.stride,\n    );\n  }\n\n  /**\n   * Get the coordinate array for this geometry.  This array has the structure\n   * of a GeoJSON coordinate array for multi-polygons.\n   *\n   * @param {boolean} [right] Orient coordinates according to the right-hand\n   *     rule (counter-clockwise for exterior and clockwise for interior rings).\n   *     If `false`, coordinates will be oriented according to the left-hand rule\n   *     (clockwise for exterior and counter-clockwise for interior rings).\n   *     By default, coordinate orientation will depend on how the geometry was\n   *     constructed.\n   * @return {Array<Array<Array<import(\"../coordinate.js\").Coordinate>>>} Coordinates.\n   * @api\n   * @override\n   */\n  getCoordinates(right) {\n    let flatCoordinates;\n    if (right !== undefined) {\n      flatCoordinates = this.getOrientedFlatCoordinates().slice();\n      orientLinearRingsArray(\n        flatCoordinates,\n        0,\n        this.endss_,\n        this.stride,\n        right,\n      );\n    } else {\n      flatCoordinates = this.flatCoordinates;\n    }\n\n    return inflateMultiCoordinatesArray(\n      flatCoordinates,\n      0,\n      this.endss_,\n      this.stride,\n    );\n  }\n\n  /**\n   * @return {Array<Array<number>>} Endss.\n   */\n  getEndss() {\n    return this.endss_;\n  }\n\n  /**\n   * @return {Array<number>} Flat interior points.\n   */\n  getFlatInteriorPoints() {\n    if (this.flatInteriorPointsRevision_ != this.getRevision()) {\n      const flatCenters = linearRingssCenter(\n        this.flatCoordinates,\n        0,\n        this.endss_,\n        this.stride,\n      );\n      this.flatInteriorPoints_ = getInteriorPointsOfMultiArray(\n        this.getOrientedFlatCoordinates(),\n        0,\n        this.endss_,\n        this.stride,\n        flatCenters,\n      );\n      this.flatInteriorPointsRevision_ = this.getRevision();\n    }\n    return /** @type {Array<number>} */ (this.flatInteriorPoints_);\n  }\n\n  /**\n   * Return the interior points as {@link module:ol/geom/MultiPoint~MultiPoint multipoint}.\n   * @return {MultiPoint} Interior points as XYM coordinates, where M is\n   * the length of the horizontal intersection that the point belongs to.\n   * @api\n   */\n  getInteriorPoints() {\n    return new MultiPoint(this.getFlatInteriorPoints().slice(), 'XYM');\n  }\n\n  /**\n   * @return {Array<number>} Oriented flat coordinates.\n   */\n  getOrientedFlatCoordinates() {\n    if (this.orientedRevision_ != this.getRevision()) {\n      const flatCoordinates = this.flatCoordinates;\n      if (\n        linearRingssAreOriented(flatCoordinates, 0, this.endss_, this.stride)\n      ) {\n        this.orientedFlatCoordinates_ = flatCoordinates;\n      } else {\n        this.orientedFlatCoordinates_ = flatCoordinates.slice();\n        this.orientedFlatCoordinates_.length = orientLinearRingsArray(\n          this.orientedFlatCoordinates_,\n          0,\n          this.endss_,\n          this.stride,\n        );\n      }\n      this.orientedRevision_ = this.getRevision();\n    }\n    return /** @type {Array<number>} */ (this.orientedFlatCoordinates_);\n  }\n\n  /**\n   * @param {number} squaredTolerance Squared tolerance.\n   * @return {MultiPolygon} Simplified MultiPolygon.\n   * @protected\n   * @override\n   */\n  getSimplifiedGeometryInternal(squaredTolerance) {\n    /** @type {Array<number>} */\n    const simplifiedFlatCoordinates = [];\n    /** @type {Array<Array<number>>} */\n    const simplifiedEndss = [];\n    simplifiedFlatCoordinates.length = quantizeMultiArray(\n      this.flatCoordinates,\n      0,\n      this.endss_,\n      this.stride,\n      Math.sqrt(squaredTolerance),\n      simplifiedFlatCoordinates,\n      0,\n      simplifiedEndss,\n    );\n    return new MultiPolygon(simplifiedFlatCoordinates, 'XY', simplifiedEndss);\n  }\n\n  /**\n   * Return the polygon at the specified index.\n   * @param {number} index Index.\n   * @return {Polygon} Polygon.\n   * @api\n   */\n  getPolygon(index) {\n    if (index < 0 || this.endss_.length <= index) {\n      return null;\n    }\n    let offset;\n    if (index === 0) {\n      offset = 0;\n    } else {\n      const prevEnds = this.endss_[index - 1];\n      offset = prevEnds[prevEnds.length - 1];\n    }\n    const ends = this.endss_[index].slice();\n    const end = ends[ends.length - 1];\n    if (offset !== 0) {\n      for (let i = 0, ii = ends.length; i < ii; ++i) {\n        ends[i] -= offset;\n      }\n    }\n    return new Polygon(\n      this.flatCoordinates.slice(offset, end),\n      this.layout,\n      ends,\n    );\n  }\n\n  /**\n   * Return the polygons of this multipolygon.\n   * @return {Array<Polygon>} Polygons.\n   * @api\n   */\n  getPolygons() {\n    const layout = this.layout;\n    const flatCoordinates = this.flatCoordinates;\n    const endss = this.endss_;\n    const polygons = [];\n    let offset = 0;\n    for (let i = 0, ii = endss.length; i < ii; ++i) {\n      const ends = endss[i].slice();\n      const end = ends[ends.length - 1];\n      if (offset !== 0) {\n        for (let j = 0, jj = ends.length; j < jj; ++j) {\n          ends[j] -= offset;\n        }\n      }\n      const polygon = new Polygon(\n        flatCoordinates.slice(offset, end),\n        layout,\n        ends,\n      );\n      polygons.push(polygon);\n      offset = end;\n    }\n    return polygons;\n  }\n\n  /**\n   * Get the type of this geometry.\n   * @return {import(\"./Geometry.js\").Type} Geometry type.\n   * @api\n   * @override\n   */\n  getType() {\n    return 'MultiPolygon';\n  }\n\n  /**\n   * Test if the geometry and the passed extent intersect.\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @return {boolean} `true` if the geometry and the extent intersect.\n   * @api\n   * @override\n   */\n  intersectsExtent(extent) {\n    return intersectsLinearRingMultiArray(\n      this.getOrientedFlatCoordinates(),\n      0,\n      this.endss_,\n      this.stride,\n      extent,\n    );\n  }\n\n  /**\n   * Set the coordinates of the multipolygon.\n   * @param {!Array<Array<Array<import(\"../coordinate.js\").Coordinate>>>} coordinates Coordinates.\n   * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n   * @api\n   * @override\n   */\n  setCoordinates(coordinates, layout) {\n    this.setLayout(layout, coordinates, 3);\n    if (!this.flatCoordinates) {\n      this.flatCoordinates = [];\n    }\n    const endss = deflateMultiCoordinatesArray(\n      this.flatCoordinates,\n      0,\n      coordinates,\n      this.stride,\n      this.endss_,\n    );\n    if (endss.length === 0) {\n      this.flatCoordinates.length = 0;\n    } else {\n      const lastEnds = endss[endss.length - 1];\n      this.flatCoordinates.length =\n        lastEnds.length === 0 ? 0 : lastEnds[lastEnds.length - 1];\n    }\n    this.changed();\n  }\n}\n\nexport default MultiPolygon;\n", "/**\n * @module ol/render/Feature\n */\nimport Feature from '../Feature.js';\nimport {extend} from '../array.js';\nimport {\n  createOrUpdateFromCoordinate,\n  createOrUpdateFromFlatCoordinates,\n  getCenter,\n  getHeight,\n} from '../extent.js';\nimport {memoizeOne} from '../functions.js';\nimport LineString from '../geom/LineString.js';\nimport MultiLineString from '../geom/MultiLineString.js';\nimport MultiPoint from '../geom/MultiPoint.js';\nimport MultiPolygon from '../geom/MultiPolygon.js';\nimport Point from '../geom/Point.js';\nimport Polygon from '../geom/Polygon.js';\nimport {linearRingss as linearRingssCenter} from '../geom/flat/center.js';\nimport {\n  getInteriorPointOfArray,\n  getInteriorPointsOfMultiArray,\n} from '../geom/flat/interiorpoint.js';\nimport {interpolatePoint} from '../geom/flat/interpolate.js';\nimport {inflateEnds} from '../geom/flat/orient.js';\nimport {\n  douglasPeucker,\n  douglasPeuckerArray,\n  quantizeArray,\n} from '../geom/flat/simplify.js';\nimport {transform2D} from '../geom/flat/transform.js';\nimport {get as getProjection} from '../proj.js';\nimport {\n  compose as composeTransform,\n  create as createTransform,\n} from '../transform.js';\n\n/**\n * @typedef {'Point' | 'LineString' | 'LinearRing' | 'Polygon' | 'MultiPoint' | 'MultiLineString'} Type\n * The geometry type.  One of `'Point'`, `'LineString'`, `'LinearRing'`,\n * `'Polygon'`, `'MultiPoint'` or 'MultiLineString'`.\n */\n\n/**\n * @type {import(\"../transform.js\").Transform}\n */\nconst tmpTransform = createTransform();\n\n/**\n * Lightweight, read-only, {@link module:ol/Feature~Feature} and {@link module:ol/geom/Geometry~Geometry} like\n * structure, optimized for vector tile rendering and styling. Geometry access\n * through the API is limited to getting the type and extent of the geometry.\n */\nclass RenderFeature {\n  /**\n   * @param {Type} type Geometry type.\n   * @param {Array<number>} flatCoordinates Flat coordinates. These always need\n   *     to be right-handed for polygons.\n   * @param {Array<number>} ends Ends.\n   * @param {number} stride Stride.\n   * @param {Object<string, *>} properties Properties.\n   * @param {number|string|undefined} id Feature id.\n   */\n  constructor(type, flatCoordinates, ends, stride, properties, id) {\n    /**\n     * @type {import(\"../style/Style.js\").StyleFunction|undefined}\n     */\n    this.styleFunction;\n\n    /**\n     * @private\n     * @type {import(\"../extent.js\").Extent|undefined}\n     */\n    this.extent_;\n\n    /**\n     * @private\n     * @type {number|string|undefined}\n     */\n    this.id_ = id;\n\n    /**\n     * @private\n     * @type {Type}\n     */\n    this.type_ = type;\n\n    /**\n     * @private\n     * @type {Array<number>}\n     */\n    this.flatCoordinates_ = flatCoordinates;\n\n    /**\n     * @private\n     * @type {Array<number>}\n     */\n    this.flatInteriorPoints_ = null;\n\n    /**\n     * @private\n     * @type {Array<number>}\n     */\n    this.flatMidpoints_ = null;\n\n    /**\n     * @private\n     * @type {Array<number>|null}\n     */\n    this.ends_ = ends || null;\n\n    /**\n     * @private\n     * @type {Object<string, *>}\n     */\n    this.properties_ = properties;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.squaredTolerance_;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.stride_ = stride;\n\n    /**\n     * @private\n     * @type {RenderFeature}\n     */\n    this.simplifiedGeometry_;\n  }\n\n  /**\n   * Get a feature property by its key.\n   * @param {string} key Key\n   * @return {*} Value for the requested key.\n   * @api\n   */\n  get(key) {\n    return this.properties_[key];\n  }\n\n  /**\n   * Get the extent of this feature's geometry.\n   * @return {import(\"../extent.js\").Extent} Extent.\n   * @api\n   */\n  getExtent() {\n    if (!this.extent_) {\n      this.extent_ =\n        this.type_ === 'Point'\n          ? createOrUpdateFromCoordinate(this.flatCoordinates_)\n          : createOrUpdateFromFlatCoordinates(\n              this.flatCoordinates_,\n              0,\n              this.flatCoordinates_.length,\n              this.stride_,\n            );\n    }\n    return this.extent_;\n  }\n\n  /**\n   * @return {Array<number>} Flat interior points.\n   */\n  getFlatInteriorPoint() {\n    if (!this.flatInteriorPoints_) {\n      const flatCenter = getCenter(this.getExtent());\n      this.flatInteriorPoints_ = getInteriorPointOfArray(\n        this.flatCoordinates_,\n        0,\n        this.ends_,\n        this.stride_,\n        flatCenter,\n        0,\n      );\n    }\n    return this.flatInteriorPoints_;\n  }\n\n  /**\n   * @return {Array<number>} Flat interior points.\n   */\n  getFlatInteriorPoints() {\n    if (!this.flatInteriorPoints_) {\n      const ends = inflateEnds(this.flatCoordinates_, this.ends_);\n      const flatCenters = linearRingssCenter(\n        this.flatCoordinates_,\n        0,\n        ends,\n        this.stride_,\n      );\n      this.flatInteriorPoints_ = getInteriorPointsOfMultiArray(\n        this.flatCoordinates_,\n        0,\n        ends,\n        this.stride_,\n        flatCenters,\n      );\n    }\n    return this.flatInteriorPoints_;\n  }\n\n  /**\n   * @return {Array<number>} Flat midpoint.\n   */\n  getFlatMidpoint() {\n    if (!this.flatMidpoints_) {\n      this.flatMidpoints_ = interpolatePoint(\n        this.flatCoordinates_,\n        0,\n        this.flatCoordinates_.length,\n        this.stride_,\n        0.5,\n      );\n    }\n    return this.flatMidpoints_;\n  }\n\n  /**\n   * @return {Array<number>} Flat midpoints.\n   */\n  getFlatMidpoints() {\n    if (!this.flatMidpoints_) {\n      this.flatMidpoints_ = [];\n      const flatCoordinates = this.flatCoordinates_;\n      let offset = 0;\n      const ends = /** @type {Array<number>} */ (this.ends_);\n      for (let i = 0, ii = ends.length; i < ii; ++i) {\n        const end = ends[i];\n        const midpoint = interpolatePoint(\n          flatCoordinates,\n          offset,\n          end,\n          this.stride_,\n          0.5,\n        );\n        extend(this.flatMidpoints_, midpoint);\n        offset = end;\n      }\n    }\n    return this.flatMidpoints_;\n  }\n\n  /**\n   * Get the feature identifier.  This is a stable identifier for the feature and\n   * is set when reading data from a remote source.\n   * @return {number|string|undefined} Id.\n   * @api\n   */\n  getId() {\n    return this.id_;\n  }\n\n  /**\n   * @return {Array<number>} Flat coordinates.\n   */\n  getOrientedFlatCoordinates() {\n    return this.flatCoordinates_;\n  }\n\n  /**\n   * For API compatibility with {@link module:ol/Feature~Feature}, this method is useful when\n   * determining the geometry type in style function (see {@link #getType}).\n   * @return {RenderFeature} Feature.\n   * @api\n   */\n  getGeometry() {\n    return this;\n  }\n\n  /**\n   * @param {number} squaredTolerance Squared tolerance.\n   * @return {RenderFeature} Simplified geometry.\n   */\n  getSimplifiedGeometry(squaredTolerance) {\n    return this;\n  }\n\n  /**\n   * Get a transformed and simplified version of the geometry.\n   * @param {number} squaredTolerance Squared tolerance.\n   * @param {import(\"../proj.js\").TransformFunction} [transform] Optional transform function.\n   * @return {RenderFeature} Simplified geometry.\n   */\n  simplifyTransformed(squaredTolerance, transform) {\n    return this;\n  }\n\n  /**\n   * Get the feature properties.\n   * @return {Object<string, *>} Feature properties.\n   * @api\n   */\n  getProperties() {\n    return this.properties_;\n  }\n\n  /**\n   * Get an object of all property names and values.  This has the same behavior as getProperties,\n   * but is here to conform with the {@link module:ol/Feature~Feature} interface.\n   * @return {Object<string, *>?} Object.\n   */\n  getPropertiesInternal() {\n    return this.properties_;\n  }\n\n  /**\n   * @return {number} Stride.\n   */\n  getStride() {\n    return this.stride_;\n  }\n\n  /**\n   * @return {import('../style/Style.js').StyleFunction|undefined} Style\n   */\n  getStyleFunction() {\n    return this.styleFunction;\n  }\n\n  /**\n   * Get the type of this feature's geometry.\n   * @return {Type} Geometry type.\n   * @api\n   */\n  getType() {\n    return this.type_;\n  }\n\n  /**\n   * Transform geometry coordinates from tile pixel space to projected.\n   *\n   * @param {import(\"../proj.js\").ProjectionLike} projection The data projection\n   */\n  transform(projection) {\n    projection = getProjection(projection);\n    const pixelExtent = projection.getExtent();\n    const projectedExtent = projection.getWorldExtent();\n    if (pixelExtent && projectedExtent) {\n      const scale = getHeight(projectedExtent) / getHeight(pixelExtent);\n      composeTransform(\n        tmpTransform,\n        projectedExtent[0],\n        projectedExtent[3],\n        scale,\n        -scale,\n        0,\n        0,\n        0,\n      );\n      transform2D(\n        this.flatCoordinates_,\n        0,\n        this.flatCoordinates_.length,\n        this.stride_,\n        tmpTransform,\n        this.flatCoordinates_,\n      );\n    }\n  }\n\n  /**\n   * Apply a transform function to the coordinates of the geometry.\n   * The geometry is modified in place.\n   * If you do not want the geometry modified in place, first `clone()` it and\n   * then use this function on the clone.\n   * @param {import(\"../proj.js\").TransformFunction} transformFn Transform function.\n   */\n  applyTransform(transformFn) {\n    transformFn(this.flatCoordinates_, this.flatCoordinates_, this.stride_);\n  }\n\n  /**\n   * @return {RenderFeature} A cloned render feature.\n   */\n  clone() {\n    return new RenderFeature(\n      this.type_,\n      this.flatCoordinates_.slice(),\n      this.ends_?.slice(),\n      this.stride_,\n      Object.assign({}, this.properties_),\n      this.id_,\n    );\n  }\n\n  /**\n   * @return {Array<number>|null} Ends.\n   */\n  getEnds() {\n    return this.ends_;\n  }\n\n  /**\n   * Add transform and resolution based geometry simplification to this instance.\n   * @return {RenderFeature} This render feature.\n   */\n  enableSimplifyTransformed() {\n    this.simplifyTransformed = memoizeOne((squaredTolerance, transform) => {\n      if (squaredTolerance === this.squaredTolerance_) {\n        return this.simplifiedGeometry_;\n      }\n      this.simplifiedGeometry_ = this.clone();\n      if (transform) {\n        this.simplifiedGeometry_.applyTransform(transform);\n      }\n      const simplifiedFlatCoordinates =\n        this.simplifiedGeometry_.getFlatCoordinates();\n      let simplifiedEnds;\n      switch (this.type_) {\n        case 'LineString':\n          simplifiedFlatCoordinates.length = douglasPeucker(\n            simplifiedFlatCoordinates,\n            0,\n            this.simplifiedGeometry_.flatCoordinates_.length,\n            this.simplifiedGeometry_.stride_,\n            squaredTolerance,\n            simplifiedFlatCoordinates,\n            0,\n          );\n          simplifiedEnds = [simplifiedFlatCoordinates.length];\n          break;\n        case 'MultiLineString':\n          simplifiedEnds = [];\n          simplifiedFlatCoordinates.length = douglasPeuckerArray(\n            simplifiedFlatCoordinates,\n            0,\n            this.simplifiedGeometry_.ends_,\n            this.simplifiedGeometry_.stride_,\n            squaredTolerance,\n            simplifiedFlatCoordinates,\n            0,\n            simplifiedEnds,\n          );\n          break;\n        case 'Polygon':\n          simplifiedEnds = [];\n          simplifiedFlatCoordinates.length = quantizeArray(\n            simplifiedFlatCoordinates,\n            0,\n            this.simplifiedGeometry_.ends_,\n            this.simplifiedGeometry_.stride_,\n            Math.sqrt(squaredTolerance),\n            simplifiedFlatCoordinates,\n            0,\n            simplifiedEnds,\n          );\n          break;\n        default:\n      }\n      if (simplifiedEnds) {\n        this.simplifiedGeometry_ = new RenderFeature(\n          this.type_,\n          simplifiedFlatCoordinates,\n          simplifiedEnds,\n          this.stride_,\n          this.properties_,\n          this.id_,\n        );\n      }\n      this.squaredTolerance_ = squaredTolerance;\n      return this.simplifiedGeometry_;\n    });\n    return this;\n  }\n}\n\n/**\n * @return {Array<number>} Flat coordinates.\n */\nRenderFeature.prototype.getFlatCoordinates =\n  RenderFeature.prototype.getOrientedFlatCoordinates;\n\n/**\n * Create a geometry from an `ol/render/Feature`\n * @param {RenderFeature} renderFeature\n * Render Feature\n * @return {Point|MultiPoint|LineString|MultiLineString|Polygon|MultiPolygon}\n * New geometry instance.\n * @api\n */\nexport function toGeometry(renderFeature) {\n  const geometryType = renderFeature.getType();\n  switch (geometryType) {\n    case 'Point':\n      return new Point(renderFeature.getFlatCoordinates());\n    case 'MultiPoint':\n      return new MultiPoint(renderFeature.getFlatCoordinates(), 'XY');\n    case 'LineString':\n      return new LineString(renderFeature.getFlatCoordinates(), 'XY');\n    case 'MultiLineString':\n      return new MultiLineString(\n        renderFeature.getFlatCoordinates(),\n        'XY',\n        /** @type {Array<number>} */ (renderFeature.getEnds()),\n      );\n    case 'Polygon':\n      const flatCoordinates = renderFeature.getFlatCoordinates();\n      const ends = renderFeature.getEnds();\n      const endss = inflateEnds(flatCoordinates, ends);\n      return endss.length > 1\n        ? new MultiPolygon(flatCoordinates, 'XY', endss)\n        : new Polygon(flatCoordinates, 'XY', ends);\n    default:\n      throw new Error('Invalid geometry type:' + geometryType);\n  }\n}\n\n/**\n * Create an `ol/Feature` from an `ol/render/Feature`\n * @param {RenderFeature} renderFeature RenderFeature\n * @param {string} [geometryName] Geometry name to use\n * when creating the Feature.\n * @return {Feature} Newly constructed `ol/Feature` with properties,\n * geometry, and id copied over.\n * @api\n */\nexport function toFeature(renderFeature, geometryName) {\n  const id = renderFeature.getId();\n  const geometry = toGeometry(renderFeature);\n  const properties = renderFeature.getProperties();\n  const feature = new Feature();\n  if (geometryName !== undefined) {\n    feature.setGeometryName(geometryName);\n  }\n  feature.setGeometry(geometry);\n  if (id !== undefined) {\n    feature.setId(id);\n  }\n  feature.setProperties(properties, true);\n  return feature;\n}\n\nexport default RenderFeature;\n", "\n/**\n * Rearranges items so that all items in the [left, k] are the smallest.\n * The k-th element will have the (k - left + 1)-th smallest value in [left, right].\n *\n * @template T\n * @param {T[]} arr the array to partially sort (in place)\n * @param {number} k middle index for partial sorting (as defined above)\n * @param {number} [left=0] left index of the range to sort\n * @param {number} [right=arr.length-1] right index\n * @param {(a: T, b: T) => number} [compare = (a, b) => a - b] compare function\n */\nexport default function quickselect(arr, k, left = 0, right = arr.length - 1, compare = defaultCompare) {\n\n    while (right > left) {\n        if (right - left > 600) {\n            const n = right - left + 1;\n            const m = k - left + 1;\n            const z = Math.log(n);\n            const s = 0.5 * Math.exp(2 * z / 3);\n            const sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);\n            const newLeft = Math.max(left, Math.floor(k - m * s / n + sd));\n            const newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));\n            quickselect(arr, k, newLeft, newRight, compare);\n        }\n\n        const t = arr[k];\n        let i = left;\n        /** @type {number} */\n        let j = right;\n\n        swap(arr, left, k);\n        if (compare(arr[right], t) > 0) swap(arr, left, right);\n\n        while (i < j) {\n            swap(arr, i, j);\n            i++;\n            j--;\n            while (compare(arr[i], t) < 0) i++;\n            while (compare(arr[j], t) > 0) j--;\n        }\n\n        if (compare(arr[left], t) === 0) swap(arr, left, j);\n        else {\n            j++;\n            swap(arr, j, right);\n        }\n\n        if (j <= k) left = j + 1;\n        if (k <= j) right = j - 1;\n    }\n}\n\n/**\n * @template T\n * @param {T[]} arr\n * @param {number} i\n * @param {number} j\n */\nfunction swap(arr, i, j) {\n    const tmp = arr[i];\n    arr[i] = arr[j];\n    arr[j] = tmp;\n}\n\n/**\n * @template T\n * @param {T} a\n * @param {T} b\n * @returns {number}\n */\nfunction defaultCompare(a, b) {\n    return a < b ? -1 : a > b ? 1 : 0;\n}\n", "import quickselect from 'quickselect';\n\nexport default class RBush {\n    constructor(maxEntries = 9) {\n        // max entries in a node is 9 by default; min node fill is 40% for best performance\n        this._maxEntries = Math.max(4, maxEntries);\n        this._minEntries = Math.max(2, Math.ceil(this._maxEntries * 0.4));\n        this.clear();\n    }\n\n    all() {\n        return this._all(this.data, []);\n    }\n\n    search(bbox) {\n        let node = this.data;\n        const result = [];\n\n        if (!intersects(bbox, node)) return result;\n\n        const toBBox = this.toBBox;\n        const nodesToSearch = [];\n\n        while (node) {\n            for (let i = 0; i < node.children.length; i++) {\n                const child = node.children[i];\n                const childBBox = node.leaf ? toBBox(child) : child;\n\n                if (intersects(bbox, childBBox)) {\n                    if (node.leaf) result.push(child);\n                    else if (contains(bbox, childBBox)) this._all(child, result);\n                    else nodesToSearch.push(child);\n                }\n            }\n            node = nodesToSearch.pop();\n        }\n\n        return result;\n    }\n\n    collides(bbox) {\n        let node = this.data;\n\n        if (!intersects(bbox, node)) return false;\n\n        const nodesToSearch = [];\n        while (node) {\n            for (let i = 0; i < node.children.length; i++) {\n                const child = node.children[i];\n                const childBBox = node.leaf ? this.toBBox(child) : child;\n\n                if (intersects(bbox, childBBox)) {\n                    if (node.leaf || contains(bbox, childBBox)) return true;\n                    nodesToSearch.push(child);\n                }\n            }\n            node = nodesToSearch.pop();\n        }\n\n        return false;\n    }\n\n    load(data) {\n        if (!(data && data.length)) return this;\n\n        if (data.length < this._minEntries) {\n            for (let i = 0; i < data.length; i++) {\n                this.insert(data[i]);\n            }\n            return this;\n        }\n\n        // recursively build the tree with the given data from scratch using OMT algorithm\n        let node = this._build(data.slice(), 0, data.length - 1, 0);\n\n        if (!this.data.children.length) {\n            // save as is if tree is empty\n            this.data = node;\n\n        } else if (this.data.height === node.height) {\n            // split root if trees have the same height\n            this._splitRoot(this.data, node);\n\n        } else {\n            if (this.data.height < node.height) {\n                // swap trees if inserted one is bigger\n                const tmpNode = this.data;\n                this.data = node;\n                node = tmpNode;\n            }\n\n            // insert the small tree into the large tree at appropriate level\n            this._insert(node, this.data.height - node.height - 1, true);\n        }\n\n        return this;\n    }\n\n    insert(item) {\n        if (item) this._insert(item, this.data.height - 1);\n        return this;\n    }\n\n    clear() {\n        this.data = createNode([]);\n        return this;\n    }\n\n    remove(item, equalsFn) {\n        if (!item) return this;\n\n        let node = this.data;\n        const bbox = this.toBBox(item);\n        const path = [];\n        const indexes = [];\n        let i, parent, goingUp;\n\n        // depth-first iterative tree traversal\n        while (node || path.length) {\n\n            if (!node) { // go up\n                node = path.pop();\n                parent = path[path.length - 1];\n                i = indexes.pop();\n                goingUp = true;\n            }\n\n            if (node.leaf) { // check current node\n                const index = findItem(item, node.children, equalsFn);\n\n                if (index !== -1) {\n                    // item found, remove the item and condense tree upwards\n                    node.children.splice(index, 1);\n                    path.push(node);\n                    this._condense(path);\n                    return this;\n                }\n            }\n\n            if (!goingUp && !node.leaf && contains(node, bbox)) { // go down\n                path.push(node);\n                indexes.push(i);\n                i = 0;\n                parent = node;\n                node = node.children[0];\n\n            } else if (parent) { // go right\n                i++;\n                node = parent.children[i];\n                goingUp = false;\n\n            } else node = null; // nothing found\n        }\n\n        return this;\n    }\n\n    toBBox(item) { return item; }\n\n    compareMinX(a, b) { return a.minX - b.minX; }\n    compareMinY(a, b) { return a.minY - b.minY; }\n\n    toJSON() { return this.data; }\n\n    fromJSON(data) {\n        this.data = data;\n        return this;\n    }\n\n    _all(node, result) {\n        const nodesToSearch = [];\n        while (node) {\n            if (node.leaf) result.push(...node.children);\n            else nodesToSearch.push(...node.children);\n\n            node = nodesToSearch.pop();\n        }\n        return result;\n    }\n\n    _build(items, left, right, height) {\n\n        const N = right - left + 1;\n        let M = this._maxEntries;\n        let node;\n\n        if (N <= M) {\n            // reached leaf level; return leaf\n            node = createNode(items.slice(left, right + 1));\n            calcBBox(node, this.toBBox);\n            return node;\n        }\n\n        if (!height) {\n            // target height of the bulk-loaded tree\n            height = Math.ceil(Math.log(N) / Math.log(M));\n\n            // target number of root entries to maximize storage utilization\n            M = Math.ceil(N / Math.pow(M, height - 1));\n        }\n\n        node = createNode([]);\n        node.leaf = false;\n        node.height = height;\n\n        // split the items into M mostly square tiles\n\n        const N2 = Math.ceil(N / M);\n        const N1 = N2 * Math.ceil(Math.sqrt(M));\n\n        multiSelect(items, left, right, N1, this.compareMinX);\n\n        for (let i = left; i <= right; i += N1) {\n\n            const right2 = Math.min(i + N1 - 1, right);\n\n            multiSelect(items, i, right2, N2, this.compareMinY);\n\n            for (let j = i; j <= right2; j += N2) {\n\n                const right3 = Math.min(j + N2 - 1, right2);\n\n                // pack each entry recursively\n                node.children.push(this._build(items, j, right3, height - 1));\n            }\n        }\n\n        calcBBox(node, this.toBBox);\n\n        return node;\n    }\n\n    _chooseSubtree(bbox, node, level, path) {\n        while (true) {\n            path.push(node);\n\n            if (node.leaf || path.length - 1 === level) break;\n\n            let minArea = Infinity;\n            let minEnlargement = Infinity;\n            let targetNode;\n\n            for (let i = 0; i < node.children.length; i++) {\n                const child = node.children[i];\n                const area = bboxArea(child);\n                const enlargement = enlargedArea(bbox, child) - area;\n\n                // choose entry with the least area enlargement\n                if (enlargement < minEnlargement) {\n                    minEnlargement = enlargement;\n                    minArea = area < minArea ? area : minArea;\n                    targetNode = child;\n\n                } else if (enlargement === minEnlargement) {\n                    // otherwise choose one with the smallest area\n                    if (area < minArea) {\n                        minArea = area;\n                        targetNode = child;\n                    }\n                }\n            }\n\n            node = targetNode || node.children[0];\n        }\n\n        return node;\n    }\n\n    _insert(item, level, isNode) {\n        const bbox = isNode ? item : this.toBBox(item);\n        const insertPath = [];\n\n        // find the best node for accommodating the item, saving all nodes along the path too\n        const node = this._chooseSubtree(bbox, this.data, level, insertPath);\n\n        // put the item into the node\n        node.children.push(item);\n        extend(node, bbox);\n\n        // split on node overflow; propagate upwards if necessary\n        while (level >= 0) {\n            if (insertPath[level].children.length > this._maxEntries) {\n                this._split(insertPath, level);\n                level--;\n            } else break;\n        }\n\n        // adjust bboxes along the insertion path\n        this._adjustParentBBoxes(bbox, insertPath, level);\n    }\n\n    // split overflowed node into two\n    _split(insertPath, level) {\n        const node = insertPath[level];\n        const M = node.children.length;\n        const m = this._minEntries;\n\n        this._chooseSplitAxis(node, m, M);\n\n        const splitIndex = this._chooseSplitIndex(node, m, M);\n\n        const newNode = createNode(node.children.splice(splitIndex, node.children.length - splitIndex));\n        newNode.height = node.height;\n        newNode.leaf = node.leaf;\n\n        calcBBox(node, this.toBBox);\n        calcBBox(newNode, this.toBBox);\n\n        if (level) insertPath[level - 1].children.push(newNode);\n        else this._splitRoot(node, newNode);\n    }\n\n    _splitRoot(node, newNode) {\n        // split root node\n        this.data = createNode([node, newNode]);\n        this.data.height = node.height + 1;\n        this.data.leaf = false;\n        calcBBox(this.data, this.toBBox);\n    }\n\n    _chooseSplitIndex(node, m, M) {\n        let index;\n        let minOverlap = Infinity;\n        let minArea = Infinity;\n\n        for (let i = m; i <= M - m; i++) {\n            const bbox1 = distBBox(node, 0, i, this.toBBox);\n            const bbox2 = distBBox(node, i, M, this.toBBox);\n\n            const overlap = intersectionArea(bbox1, bbox2);\n            const area = bboxArea(bbox1) + bboxArea(bbox2);\n\n            // choose distribution with minimum overlap\n            if (overlap < minOverlap) {\n                minOverlap = overlap;\n                index = i;\n\n                minArea = area < minArea ? area : minArea;\n\n            } else if (overlap === minOverlap) {\n                // otherwise choose distribution with minimum area\n                if (area < minArea) {\n                    minArea = area;\n                    index = i;\n                }\n            }\n        }\n\n        return index || M - m;\n    }\n\n    // sorts node children by the best axis for split\n    _chooseSplitAxis(node, m, M) {\n        const compareMinX = node.leaf ? this.compareMinX : compareNodeMinX;\n        const compareMinY = node.leaf ? this.compareMinY : compareNodeMinY;\n        const xMargin = this._allDistMargin(node, m, M, compareMinX);\n        const yMargin = this._allDistMargin(node, m, M, compareMinY);\n\n        // if total distributions margin value is minimal for x, sort by minX,\n        // otherwise it's already sorted by minY\n        if (xMargin < yMargin) node.children.sort(compareMinX);\n    }\n\n    // total margin of all possible split distributions where each node is at least m full\n    _allDistMargin(node, m, M, compare) {\n        node.children.sort(compare);\n\n        const toBBox = this.toBBox;\n        const leftBBox = distBBox(node, 0, m, toBBox);\n        const rightBBox = distBBox(node, M - m, M, toBBox);\n        let margin = bboxMargin(leftBBox) + bboxMargin(rightBBox);\n\n        for (let i = m; i < M - m; i++) {\n            const child = node.children[i];\n            extend(leftBBox, node.leaf ? toBBox(child) : child);\n            margin += bboxMargin(leftBBox);\n        }\n\n        for (let i = M - m - 1; i >= m; i--) {\n            const child = node.children[i];\n            extend(rightBBox, node.leaf ? toBBox(child) : child);\n            margin += bboxMargin(rightBBox);\n        }\n\n        return margin;\n    }\n\n    _adjustParentBBoxes(bbox, path, level) {\n        // adjust bboxes along the given tree path\n        for (let i = level; i >= 0; i--) {\n            extend(path[i], bbox);\n        }\n    }\n\n    _condense(path) {\n        // go through the path, removing empty nodes and updating bboxes\n        for (let i = path.length - 1, siblings; i >= 0; i--) {\n            if (path[i].children.length === 0) {\n                if (i > 0) {\n                    siblings = path[i - 1].children;\n                    siblings.splice(siblings.indexOf(path[i]), 1);\n\n                } else this.clear();\n\n            } else calcBBox(path[i], this.toBBox);\n        }\n    }\n}\n\nfunction findItem(item, items, equalsFn) {\n    if (!equalsFn) return items.indexOf(item);\n\n    for (let i = 0; i < items.length; i++) {\n        if (equalsFn(item, items[i])) return i;\n    }\n    return -1;\n}\n\n// calculate node's bbox from bboxes of its children\nfunction calcBBox(node, toBBox) {\n    distBBox(node, 0, node.children.length, toBBox, node);\n}\n\n// min bounding rectangle of node children from k to p-1\nfunction distBBox(node, k, p, toBBox, destNode) {\n    if (!destNode) destNode = createNode(null);\n    destNode.minX = Infinity;\n    destNode.minY = Infinity;\n    destNode.maxX = -Infinity;\n    destNode.maxY = -Infinity;\n\n    for (let i = k; i < p; i++) {\n        const child = node.children[i];\n        extend(destNode, node.leaf ? toBBox(child) : child);\n    }\n\n    return destNode;\n}\n\nfunction extend(a, b) {\n    a.minX = Math.min(a.minX, b.minX);\n    a.minY = Math.min(a.minY, b.minY);\n    a.maxX = Math.max(a.maxX, b.maxX);\n    a.maxY = Math.max(a.maxY, b.maxY);\n    return a;\n}\n\nfunction compareNodeMinX(a, b) { return a.minX - b.minX; }\nfunction compareNodeMinY(a, b) { return a.minY - b.minY; }\n\nfunction bboxArea(a)   { return (a.maxX - a.minX) * (a.maxY - a.minY); }\nfunction bboxMargin(a) { return (a.maxX - a.minX) + (a.maxY - a.minY); }\n\nfunction enlargedArea(a, b) {\n    return (Math.max(b.maxX, a.maxX) - Math.min(b.minX, a.minX)) *\n           (Math.max(b.maxY, a.maxY) - Math.min(b.minY, a.minY));\n}\n\nfunction intersectionArea(a, b) {\n    const minX = Math.max(a.minX, b.minX);\n    const minY = Math.max(a.minY, b.minY);\n    const maxX = Math.min(a.maxX, b.maxX);\n    const maxY = Math.min(a.maxY, b.maxY);\n\n    return Math.max(0, maxX - minX) *\n           Math.max(0, maxY - minY);\n}\n\nfunction contains(a, b) {\n    return a.minX <= b.minX &&\n           a.minY <= b.minY &&\n           b.maxX <= a.maxX &&\n           b.maxY <= a.maxY;\n}\n\nfunction intersects(a, b) {\n    return b.minX <= a.maxX &&\n           b.minY <= a.maxY &&\n           b.maxX >= a.minX &&\n           b.maxY >= a.minY;\n}\n\nfunction createNode(children) {\n    return {\n        children,\n        height: 1,\n        leaf: true,\n        minX: Infinity,\n        minY: Infinity,\n        maxX: -Infinity,\n        maxY: -Infinity\n    };\n}\n\n// sort an array so that items come in groups of n unsorted items, with groups sorted between each other;\n// combines selection algorithm with binary divide & conquer approach\n\nfunction multiSelect(arr, left, right, n, compare) {\n    const stack = [left, right];\n\n    while (stack.length) {\n        right = stack.pop();\n        left = stack.pop();\n\n        if (right - left <= n) continue;\n\n        const mid = left + Math.ceil((right - left) / n / 2) * n;\n        quickselect(arr, mid, left, right, compare);\n\n        stack.push(left, mid, mid, right);\n    }\n}\n", "/**\n * @module ol/structs/RBush\n */\nimport RBush_ from 'rbush';\nimport {createOrUpdate, equals} from '../extent.js';\nimport {isEmpty} from '../obj.js';\nimport {getUid} from '../util.js';\n\n/**\n * @typedef {import(\"rbush\").BBox & {value: T}} Entry\n * @template T\n */\n\n/**\n * @classdesc\n * Wrapper around the RBush by Vladimir Agafonkin.\n * See https://github.com/mourner/rbush.\n *\n * @template {Object} T\n */\nclass RBush {\n  /**\n   * @param {number} [maxEntries] Max entries.\n   */\n  constructor(maxEntries) {\n    /**\n     * @private\n     * @type {RBush_<Entry<T>>}\n     */\n    this.rbush_ = new RBush_(maxEntries);\n\n    /**\n     * A mapping between the objects added to this rbush wrapper\n     * and the objects that are actually added to the internal rbush.\n     * @private\n     * @type {Object<string, Entry<T>>}\n     */\n    this.items_ = {};\n  }\n\n  /**\n   * Insert a value into the RBush.\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @param {T} value Value.\n   */\n  insert(extent, value) {\n    /** @type {Entry<T>} */\n    const item = {\n      minX: extent[0],\n      minY: extent[1],\n      maxX: extent[2],\n      maxY: extent[3],\n      value: value,\n    };\n\n    this.rbush_.insert(item);\n    this.items_[getUid(value)] = item;\n  }\n\n  /**\n   * Bulk-insert values into the RBush.\n   * @param {Array<import(\"../extent.js\").Extent>} extents Extents.\n   * @param {Array<T>} values Values.\n   */\n  load(extents, values) {\n    const items = new Array(values.length);\n    for (let i = 0, l = values.length; i < l; i++) {\n      const extent = extents[i];\n      const value = values[i];\n\n      /** @type {Entry<T>} */\n      const item = {\n        minX: extent[0],\n        minY: extent[1],\n        maxX: extent[2],\n        maxY: extent[3],\n        value: value,\n      };\n      items[i] = item;\n      this.items_[getUid(value)] = item;\n    }\n    this.rbush_.load(items);\n  }\n\n  /**\n   * Remove a value from the RBush.\n   * @param {T} value Value.\n   * @return {boolean} Removed.\n   */\n  remove(value) {\n    const uid = getUid(value);\n\n    // get the object in which the value was wrapped when adding to the\n    // internal rbush. then use that object to do the removal.\n    const item = this.items_[uid];\n    delete this.items_[uid];\n    return this.rbush_.remove(item) !== null;\n  }\n\n  /**\n   * Update the extent of a value in the RBush.\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @param {T} value Value.\n   */\n  update(extent, value) {\n    const item = this.items_[getUid(value)];\n    const bbox = [item.minX, item.minY, item.maxX, item.maxY];\n    if (!equals(bbox, extent)) {\n      this.remove(value);\n      this.insert(extent, value);\n    }\n  }\n\n  /**\n   * Return all values in the RBush.\n   * @return {Array<T>} All.\n   */\n  getAll() {\n    const items = this.rbush_.all();\n    return items.map(function (item) {\n      return item.value;\n    });\n  }\n\n  /**\n   * Return all values in the given extent.\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @return {Array<T>} All in extent.\n   */\n  getInExtent(extent) {\n    /** @type {import(\"rbush\").BBox} */\n    const bbox = {\n      minX: extent[0],\n      minY: extent[1],\n      maxX: extent[2],\n      maxY: extent[3],\n    };\n    const items = this.rbush_.search(bbox);\n    return items.map(function (item) {\n      return item.value;\n    });\n  }\n\n  /**\n   * Calls a callback function with each value in the tree.\n   * If the callback returns a truthy value, this value is returned without\n   * checking the rest of the tree.\n   * @param {function(T): R} callback Callback.\n   * @return {R|undefined} Callback return value.\n   * @template R\n   */\n  forEach(callback) {\n    return this.forEach_(this.getAll(), callback);\n  }\n\n  /**\n   * Calls a callback function with each value in the provided extent.\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @param {function(T): R} callback Callback.\n   * @return {R|undefined} Callback return value.\n   * @template R\n   */\n  forEachInExtent(extent, callback) {\n    return this.forEach_(this.getInExtent(extent), callback);\n  }\n\n  /**\n   * @param {Array<T>} values Values.\n   * @param {function(T): R} callback Callback.\n   * @return {R|undefined} Callback return value.\n   * @template R\n   * @private\n   */\n  forEach_(values, callback) {\n    let result;\n    for (let i = 0, l = values.length; i < l; i++) {\n      result = callback(values[i]);\n      if (result) {\n        return result;\n      }\n    }\n    return result;\n  }\n\n  /**\n   * @return {boolean} Is empty.\n   */\n  isEmpty() {\n    return isEmpty(this.items_);\n  }\n\n  /**\n   * Remove all values from the RBush.\n   */\n  clear() {\n    this.rbush_.clear();\n    this.items_ = {};\n  }\n\n  /**\n   * @param {import(\"../extent.js\").Extent} [extent] Extent.\n   * @return {import(\"../extent.js\").Extent} Extent.\n   */\n  getExtent(extent) {\n    const data = this.rbush_.toJSON();\n    return createOrUpdate(data.minX, data.minY, data.maxX, data.maxY, extent);\n  }\n\n  /**\n   * @param {RBush<T>} rbush R-Tree.\n   */\n  concat(rbush) {\n    this.rbush_.load(rbush.rbush_.all());\n    for (const i in rbush.items_) {\n      this.items_[i] = rbush.items_[i];\n    }\n  }\n}\n\nexport default RBush;\n", "/**\n * @module ol/source/Source\n */\nimport BaseObject from '../Object.js';\nimport {get as getProjection} from '../proj.js';\n\n/**\n * @typedef {'undefined' | 'loading' | 'ready' | 'error'} State\n * State of the source, one of 'undefined', 'loading', 'ready' or 'error'.\n */\n\n/**\n * A function that takes a {@link import(\"../View.js\").ViewStateLayerStateExtent} and returns a string or\n * an array of strings representing source attributions.\n *\n * @typedef {function(import(\"../View.js\").ViewStateLayerStateExtent): (string|Array<string>)} Attribution\n */\n\n/**\n * A type that can be used to provide attribution information for data sources.\n *\n * It represents either\n * a simple string (e.g. `'\u00A9 Acme Inc.'`)\n * an array of simple strings (e.g. `['\u00A9 Acme Inc.', '\u00A9 Bacme Inc.']`)\n * a function that returns a string or array of strings ({@link module:ol/source/Source~Attribution})\n *\n * @typedef {string|Array<string>|Attribution} AttributionLike\n */\n\n/**\n * @typedef {Object} Options\n * @property {AttributionLike} [attributions] Attributions.\n * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection. Default is the view projection.\n * @property {import(\"./Source.js\").State} [state='ready'] State.\n * @property {boolean} [wrapX=false] WrapX.\n * @property {boolean} [interpolate=false] Use interpolated values when resampling.  By default,\n * the nearest neighbor is used when resampling.\n */\n\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Base class for {@link module:ol/layer/Layer~Layer} sources.\n *\n * A generic `change` event is triggered when the state of the source changes.\n * @abstract\n * @api\n */\nclass Source extends BaseObject {\n  /**\n   * @param {Options} options Source options.\n   */\n  constructor(options) {\n    super();\n\n    /**\n     * @protected\n     * @type {import(\"../proj/Projection.js\").default|null}\n     */\n    this.projection = getProjection(options.projection);\n\n    /**\n     * @private\n     * @type {?Attribution}\n     */\n    this.attributions_ = adaptAttributions(options.attributions);\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.attributionsCollapsible_ = options.attributionsCollapsible ?? true;\n\n    /**\n     * This source is currently loading data. Sources that defer loading to the\n     * map's tile queue never set this to a `truthy` value.\n     * @type {boolean|number}\n     */\n    this.loading = false;\n\n    /**\n     * @private\n     * @type {import(\"./Source.js\").State}\n     */\n    this.state_ = options.state !== undefined ? options.state : 'ready';\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.wrapX_ = options.wrapX !== undefined ? options.wrapX : false;\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.interpolate_ = !!options.interpolate;\n\n    /**\n     * @protected\n     * @type {function(import(\"../View.js\").ViewOptions):void}\n     */\n    this.viewResolver = null;\n\n    /**\n     * @protected\n     * @type {function(Error):void}\n     */\n    this.viewRejector = null;\n\n    const self = this;\n    /**\n     * @private\n     * @type {Promise<import(\"../View.js\").ViewOptions>}\n     */\n    this.viewPromise_ = new Promise(function (resolve, reject) {\n      self.viewResolver = resolve;\n      self.viewRejector = reject;\n    });\n  }\n\n  /**\n   * Get the attribution function for the source.\n   * @return {?Attribution} Attribution function.\n   * @api\n   */\n  getAttributions() {\n    return this.attributions_;\n  }\n\n  /**\n   * @return {boolean} Attributions are collapsible.\n   * @api\n   */\n  getAttributionsCollapsible() {\n    return this.attributionsCollapsible_;\n  }\n\n  /**\n   * Get the projection of the source.\n   * @return {import(\"../proj/Projection.js\").default|null} Projection.\n   * @api\n   */\n  getProjection() {\n    return this.projection;\n  }\n\n  /**\n   * @param {import(\"../proj/Projection.js\").default} [projection] Projection.\n   * @return {Array<number>|null} Resolutions.\n   */\n  getResolutions(projection) {\n    return null;\n  }\n\n  /**\n   * @return {Promise<import(\"../View.js\").ViewOptions>} A promise for view-related properties.\n   */\n  getView() {\n    return this.viewPromise_;\n  }\n\n  /**\n   * Resolve once the source is ready to be used (its state is `ready`), or\n   * reject if it fails to load (its state is `error`). Sources that configure\n   * asynchronously can use this to expose data (e.g. dimensions) through a\n   * promise instead of the `change` event.\n   * @return {Promise<void>} Resolves when the source is ready.\n   * @protected\n   */\n  ready() {\n    const state = this.getState();\n    if (state === 'ready') {\n      return Promise.resolve();\n    }\n    if (state === 'error') {\n      return Promise.reject(new Error('Source failed to load'));\n    }\n    return new Promise((resolve, reject) => {\n      const onChange = () => {\n        const changedState = this.getState();\n        if (changedState === 'ready') {\n          this.un('change', onChange);\n          resolve();\n        } else if (changedState === 'error') {\n          this.un('change', onChange);\n          reject(new Error('Source failed to load'));\n        }\n      };\n      this.on('change', onChange);\n    });\n  }\n\n  /**\n   * Get the state of the source, see {@link import(\"./Source.js\").State} for possible states.\n   * @return {import(\"./Source.js\").State} State.\n   * @api\n   */\n  getState() {\n    return this.state_;\n  }\n\n  /**\n   * @return {boolean|undefined} Wrap X.\n   */\n  getWrapX() {\n    return this.wrapX_;\n  }\n\n  /**\n   * @return {boolean} Use linear interpolation when resampling.\n   */\n  getInterpolate() {\n    return this.interpolate_;\n  }\n\n  /**\n   * Refreshes the source. The source will be cleared, and data from the server will be reloaded.\n   * @api\n   */\n  refresh() {\n    this.changed();\n  }\n\n  /**\n   * Set the attributions of the source.\n   * @param {AttributionLike|undefined} attributions Attributions.\n   *     Can be passed as `string`, `Array<string>`, {@link module:ol/source/Source~Attribution},\n   *     or `undefined`.\n   * @api\n   */\n  setAttributions(attributions) {\n    this.attributions_ = adaptAttributions(attributions);\n    this.changed();\n  }\n\n  /**\n   * Set the state of the source.\n   * @param {import(\"./Source.js\").State} state State.\n   */\n  setState(state) {\n    this.state_ = state;\n    this.changed();\n  }\n}\n\n/**\n * Turns the attributions option into an attributions function.\n * @param {AttributionLike|undefined} attributionLike The attribution option.\n * @return {Attribution|null} An attribution function (or null).\n */\nfunction adaptAttributions(attributionLike) {\n  if (!attributionLike) {\n    return null;\n  }\n  if (typeof attributionLike === 'function') {\n    return attributionLike;\n  }\n  if (!Array.isArray(attributionLike)) {\n    attributionLike = [attributionLike];\n  }\n  return (frameState) => attributionLike;\n}\n\nexport default Source;\n", "/**\n * @module ol/source/VectorEventType\n */\n\n/**\n * @enum {string}\n */\nexport default {\n  /**\n   * Triggered when a feature is added to the source.\n   * @event module:ol/source/Vector.VectorSourceEvent#addfeature\n   * @api\n   */\n  ADDFEATURE: 'addfeature',\n\n  /**\n   * Triggered when a feature is updated.\n   * @event module:ol/source/Vector.VectorSourceEvent#changefeature\n   * @api\n   */\n  CHANGEFEATURE: 'changefeature',\n\n  /**\n   * Triggered when the clear method is called on the source.\n   * @event module:ol/source/Vector.VectorSourceEvent#clear\n   * @api\n   */\n  CLEAR: 'clear',\n\n  /**\n   * Triggered when a feature is removed from the source.\n   * See {@link module:ol/source/Vector~VectorSource#clear source.clear()} for exceptions.\n   * @event module:ol/source/Vector.VectorSourceEvent#removefeature\n   * @api\n   */\n  REMOVEFEATURE: 'removefeature',\n\n  /**\n   * Triggered when features starts loading.\n   * @event module:ol/source/Vector.VectorSourceEvent#featuresloadstart\n   * @api\n   */\n  FEATURESLOADSTART: 'featuresloadstart',\n\n  /**\n   * Triggered when features finishes loading.\n   * @event module:ol/source/Vector.VectorSourceEvent#featuresloadend\n   * @api\n   */\n  FEATURESLOADEND: 'featuresloadend',\n\n  /**\n   * Triggered if feature loading results in an error.\n   * @event module:ol/source/Vector.VectorSourceEvent#featuresloaderror\n   * @api\n   */\n  FEATURESLOADERROR: 'featuresloaderror',\n};\n\n/**\n * @typedef {'addfeature'|'changefeature'|'clear'|'removefeature'|'featuresloadstart'|'featuresloadend'|'featuresloaderror'} VectorSourceEventTypes\n */\n", "/**\n * @module ol/source/Vector\n */\n\nimport Collection from '../Collection.js';\nimport CollectionEventType from '../CollectionEventType.js';\nimport ObjectEventType from '../ObjectEventType.js';\nimport {extend} from '../array.js';\nimport {assert} from '../asserts.js';\nimport {listen, unlistenByKey} from '../events.js';\nimport Event from '../events/Event.js';\nimport EventType from '../events/EventType.js';\nimport {containsExtent, getDifference, wrapAndSliceX} from '../extent.js';\nimport {xhr} from '../featureloader.js';\nimport {TRUE, VOID} from '../functions.js';\nimport {all as allStrategy} from '../loadingstrategy.js';\nimport {isEmpty} from '../obj.js';\nimport RenderFeature from '../render/Feature.js';\nimport RBush from '../structs/RBush.js';\nimport {getUid} from '../util.js';\nimport Source from './Source.js';\nimport VectorEventType from './VectorEventType.js';\n\n/**\n * A function that takes an {@link module:ol/extent~Extent} and a resolution as arguments, and\n * returns an array of {@link module:ol/extent~Extent} with the extents to load. Usually this\n * is one of the standard {@link module:ol/loadingstrategy} strategies.\n *\n * @typedef {function(import(\"../extent.js\").Extent, number, import(\"../proj/Projection.js\").default): Array<import(\"../extent.js\").Extent>} LoadingStrategy\n * @api\n */\n\n/**\n * @classdesc\n * Events emitted by {@link module:ol/source/Vector~VectorSource} instances are instances of this\n * type.\n * @template {import(\"../Feature.js\").FeatureLike} [FeatureType=import(\"../Feature.js\").default]\n */\nexport class VectorSourceEvent extends Event {\n  /**\n   * @param {string} type Type.\n   * @param {FeatureType} [feature] Feature.\n   * @param {Array<FeatureType>} [features] Features.\n   */\n  constructor(type, feature, features) {\n    super(type);\n\n    /**\n     * The added or removed feature for the `ADDFEATURE` and `REMOVEFEATURE` events, `undefined` otherwise.\n     * @type {FeatureType|undefined}\n     * @api\n     */\n    this.feature = feature;\n\n    /**\n     * The loaded features for the `FEATURESLOADED` event, `undefined` otherwise.\n     * @type {Array<FeatureType>|undefined}\n     * @api\n     */\n    this.features = features;\n  }\n}\n\n/***\n * @template {import(\"../Feature.js\").FeatureLike} [T=import(\"../Feature.js\").default]\n * @typedef {T extends RenderFeature ? T|Array<T> : T} FeatureClassOrArrayOfRenderFeatures\n */\n\n/***\n * @template Return\n * @template {import(\"../Feature.js\").FeatureLike} [FeatureType=import(\"../Feature.js\").default]\n * @typedef {import(\"../Observable.js\").OnSignature<import(\"../Observable.js\").EventTypes, import(\"../events/Event.js\").default, Return> &\n *   import(\"../Observable.js\").OnSignature<import(\"../ObjectEventType.js\").Types, import(\"../Object.js\").ObjectEvent, Return> &\n *   import(\"../Observable.js\").OnSignature<import(\"./VectorEventType.js\").VectorSourceEventTypes, VectorSourceEvent<FeatureType>, Return> &\n *   import(\"../Observable.js\").CombinedOnSignature<import(\"../Observable.js\").EventTypes|import(\"../ObjectEventType.js\").Types|\n *     import(\"./VectorEventType.js\").VectorSourceEventTypes, Return>} VectorSourceOnSignature\n */\n\n/**\n * @template {import(\"../Feature.js\").FeatureLike} [FeatureType=import(\"../Feature.js\").default]\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {Array<FeatureType>|Collection<FeatureType>} [features]\n * Features. If provided as {@link module:ol/Collection~Collection}, the features in the source\n * and the collection will stay in sync.\n * @property {import(\"../format/Feature.js\").default<FeatureType>} [format] The feature format used by the XHR\n * feature loader when `url` is set. Required if `url` is set, otherwise ignored.\n * @property {import(\"../featureloader.js\").FeatureLoader<FeatureType>} [loader]\n * The loader function used to load features, from a remote source for example.\n * If this is not set and `url` is set, the source will create and use an XHR\n * feature loader. The `'featuresloadend'` and `'featuresloaderror'` events\n * will only fire if the `success` and `failure` callbacks are used.\n *\n * Example:\n *\n * ```js\n * import Vector from 'ol/source/Vector.js';\n * import GeoJSON from 'ol/format/GeoJSON.js';\n * import {bbox} from 'ol/loadingstrategy.js';\n *\n * const vectorSource = new Vector({\n *   loader: async (extent, resolution, projection) => {\n *      const url = 'https://ahocevar.com/geoserver/wfs?service=WFS&' +\n *          'version=1.1.0&request=GetFeature&typename=osm:water_areas&' +\n *          'outputFormat=application/json' +\n *          'bbox=' + extent.join(',') + ',' + projection.getCode();\n *      const response = await fetch(url);\n *      if (!response.ok) {\n *        throw new Error('Network response was not ok');\n *      }\n *      const json = await response.json();\n *      const features = new GeoJSON().readFeatures(json, {\n *        featureProjection: projection,\n *      });\n *      return features;\n *    },\n *    strategy: bbox,\n *  });\n * ```\n *\n * When you want to retry a failed request, use\n * ```js\n * vectorSource.removeLoadedExtent(extent);\n * vectorSource.changed();\n * ```\n *\n * @property {boolean} [overlaps=true] This source may have overlapping geometries.\n * Setting this to `false` (e.g. for sources with polygons that represent administrative\n * boundaries or TopoJSON sources) allows the renderer to optimise fill and\n * stroke operations.\n * @property {LoadingStrategy} [strategy] The loading strategy to use.\n * By default an {@link module:ol/loadingstrategy.all}\n * strategy is used, a one-off strategy which loads all features at once.\n * @property {string|import(\"../featureloader.js\").FeatureUrlFunction} [url]\n * Setting this option instructs the source to load features using an XHR loader\n * (see {@link module:ol/featureloader.xhr}). Use a `string` and an\n * {@link module:ol/loadingstrategy.all} for a one-off download of all features from\n * the given URL. Use a {@link module:ol/featureloader~FeatureUrlFunction} to generate the url with\n * other loading strategies.\n * Requires `format` to be set as well.\n * When default XHR feature loader is provided, the features will\n * be transformed from the data projection to the view projection\n * during parsing. If your remote data source does not advertise its projection\n * properly, this transformation will be incorrect. For some formats, the\n * default projection (usually EPSG:4326) can be overridden by setting the\n * dataProjection constructor option on the format.\n * Note that if a source contains non-feature data, such as a GeoJSON geometry\n * or a KML NetworkLink, these will be ignored. Use a custom loader to load these.\n * @property {boolean} [useSpatialIndex=true]\n * By default, an RTree is used as spatial index. When features are removed and\n * added frequently, and the total number of features is low, setting this to\n * `false` may improve performance.\n *\n * Note that\n * {@link module:ol/source/Vector~VectorSource#getFeaturesInExtent},\n * {@link module:ol/source/Vector~VectorSource#getClosestFeatureToCoordinate} and\n * {@link module:ol/source/Vector~VectorSource#getExtent} cannot be used when `useSpatialIndex` is\n * set to `false`, and {@link module:ol/source/Vector~VectorSource#forEachFeatureInExtent} will loop\n * through all features.\n *\n * When set to `false`, the features will be maintained in an\n * {@link module:ol/Collection~Collection}, which can be retrieved through\n * {@link module:ol/source/Vector~VectorSource#getFeaturesCollection}.\n * @property {boolean} [wrapX=true] Wrap the world horizontally. For vector editing across the\n * -180\u00B0 and 180\u00B0 meridians to work properly, this should be set to `false`. The\n * resulting geometry coordinates will then exceed the world bounds.\n */\n\n/**\n * @classdesc\n * Provides a source of features for vector layers. Vector features provided\n * by this source are suitable for editing. See {@link module:ol/source/VectorTile~VectorTile} for\n * vector data that is optimized for rendering.\n *\n * @fires VectorSourceEvent\n * @api\n * @template {import(\"../Feature.js\").FeatureLike} [FeatureType=import(\"../Feature.js\").default]\n */\nclass VectorSource extends Source {\n  /**\n   * @param {Options<FeatureType>} [options] Vector source options.\n   */\n  constructor(options) {\n    options = options || {};\n\n    super({\n      attributions: options.attributions,\n      interpolate: true,\n      projection: undefined,\n      state: 'ready',\n      wrapX: options.wrapX !== undefined ? options.wrapX : true,\n    });\n\n    /***\n     * @type {VectorSourceOnSignature<import(\"../events.js\").EventsKey, FeatureType>}\n     */\n    this.on;\n\n    /***\n     * @type {VectorSourceOnSignature<import(\"../events.js\").EventsKey, FeatureType>}\n     */\n    this.once;\n\n    /***\n     * @type {VectorSourceOnSignature<void>}\n     */\n    this.un;\n\n    /**\n     * @private\n     * @type {import(\"../featureloader.js\").FeatureLoader<import(\"../Feature.js\").FeatureLike>}\n     */\n    this.loader_ = VOID;\n\n    /**\n     * @private\n     * @type {import(\"../format/Feature.js\").default<FeatureType>|null}\n     */\n    this.format_ = options.format || null;\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.overlaps_ = options.overlaps === undefined ? true : options.overlaps;\n\n    /**\n     * @private\n     * @type {string|import(\"../featureloader.js\").FeatureUrlFunction|undefined}\n     */\n    this.url_ = options.url;\n\n    if (options.loader !== undefined) {\n      this.loader_ = options.loader;\n    } else if (this.url_ !== undefined) {\n      assert(this.format_, '`format` must be set when `url` is set');\n      // create a XHR feature loader for \"url\" and \"format\"\n      this.loader_ = xhr(this.url_, this.format_);\n    }\n\n    /**\n     * @private\n     * @type {LoadingStrategy}\n     */\n    this.strategy_ =\n      options.strategy !== undefined ? options.strategy : allStrategy;\n\n    const useSpatialIndex =\n      options.useSpatialIndex !== undefined ? options.useSpatialIndex : true;\n\n    /**\n     * @private\n     * @type {RBush<FeatureType>}\n     */\n    this.featuresRtree_ = useSpatialIndex ? new RBush() : null;\n\n    /**\n     * @private\n     * @type {RBush<{extent: import(\"../extent.js\").Extent}>}\n     */\n    this.loadedExtentsRtree_ = new RBush();\n\n    /**\n     * @private\n     * @type {!Object<string, FeatureType>}\n     */\n    this.nullGeometryFeatures_ = {};\n\n    /**\n     * A lookup of features by id (the return from feature.getId()).\n     * @private\n     * @type {!Object<string, import('../Feature.js').FeatureLike|Array<import('../Feature.js').FeatureLike>>}\n     */\n    this.idIndex_ = {};\n\n    /**\n     * A lookup of features by uid (using getUid(feature)).\n     * @private\n     * @type {!Object<string, FeatureType>}\n     */\n    this.uidIndex_ = {};\n\n    /**\n     * @private\n     * @type {Object<string, Array<import(\"../events.js\").EventsKey>>}\n     */\n    this.featureChangeKeys_ = {};\n\n    /**\n     * @private\n     * @type {Collection<FeatureType>|null}\n     */\n    this.featuresCollection_ = null;\n\n    /** @type {Collection<FeatureType>} */\n    let collection;\n    /** @type {Array<FeatureType>} */\n    let features;\n    if (Array.isArray(options.features)) {\n      features = options.features;\n    } else if (options.features) {\n      collection = options.features;\n      features = collection.getArray();\n    }\n    if (!useSpatialIndex && collection === undefined) {\n      collection = new Collection(features);\n    }\n    if (features !== undefined) {\n      this.addFeaturesInternal(features);\n    }\n    if (collection !== undefined) {\n      this.bindFeaturesCollection_(collection);\n    }\n  }\n\n  /**\n   * Add a single feature to the source.  If you want to add a batch of features\n   * at once, call {@link module:ol/source/Vector~VectorSource#addFeatures #addFeatures()}\n   * instead. A feature will not be added to the source if feature with\n   * the same id is already there. The reason for this behavior is to avoid\n   * feature duplication when using bbox or tile loading strategies.\n   * Note: this also applies if a {@link module:ol/Collection~Collection} is used for features,\n   * meaning that if a feature with a duplicate id is added in the collection, it will\n   * be removed from it right away.\n   * @param {FeatureType} feature Feature to add.\n   * @api\n   */\n  addFeature(feature) {\n    this.addFeatureInternal(feature);\n    this.changed();\n  }\n\n  /**\n   * Add a feature without firing a `change` event.\n   * @param {FeatureType} feature Feature.\n   * @protected\n   */\n  addFeatureInternal(feature) {\n    const featureKey = getUid(feature);\n\n    if (!this.addToIndex_(featureKey, feature)) {\n      if (this.featuresCollection_) {\n        this.featuresCollection_.remove(feature);\n      }\n      return;\n    }\n\n    this.setupChangeEvents_(featureKey, feature);\n\n    const geometry = feature.getGeometry();\n    if (geometry) {\n      const extent = geometry.getExtent();\n      if (this.featuresRtree_) {\n        this.featuresRtree_.insert(extent, feature);\n      }\n    } else {\n      this.nullGeometryFeatures_[featureKey] = feature;\n    }\n\n    this.dispatchEvent(\n      new VectorSourceEvent(VectorEventType.ADDFEATURE, feature),\n    );\n  }\n\n  /**\n   * @param {string} featureKey Unique identifier for the feature.\n   * @param {FeatureType} feature The feature.\n   * @private\n   */\n  setupChangeEvents_(featureKey, feature) {\n    if (feature instanceof RenderFeature) {\n      return;\n    }\n    this.featureChangeKeys_[featureKey] = [\n      listen(feature, EventType.CHANGE, this.handleFeatureChange_, this),\n      listen(\n        feature,\n        ObjectEventType.PROPERTYCHANGE,\n        this.handleFeatureChange_,\n        this,\n      ),\n    ];\n  }\n\n  /**\n   * @param {string} featureKey Unique identifier for the feature.\n   * @param {FeatureType} feature The feature.\n   * @return {boolean} The feature is \"valid\", in the sense that it is also a\n   *     candidate for insertion into the Rtree.\n   * @private\n   */\n  addToIndex_(featureKey, feature) {\n    let valid = true;\n    if (feature.getId() !== undefined) {\n      const id = String(feature.getId());\n      if (!(id in this.idIndex_)) {\n        this.idIndex_[id] = feature;\n      } else if (feature instanceof RenderFeature) {\n        const indexedFeature = this.idIndex_[id];\n        if (!(indexedFeature instanceof RenderFeature)) {\n          valid = false;\n        } else if (!Array.isArray(indexedFeature)) {\n          this.idIndex_[id] = [indexedFeature, feature];\n        } else {\n          indexedFeature.push(feature);\n        }\n      } else {\n        valid = false;\n      }\n    }\n    if (valid) {\n      assert(\n        !(featureKey in this.uidIndex_),\n        'The passed `feature` was already added to the source',\n      );\n      this.uidIndex_[featureKey] = feature;\n    }\n    return valid;\n  }\n\n  /**\n   * Add a batch of features to the source.\n   * @param {Array<FeatureType>} features Features to add.\n   * @api\n   */\n  addFeatures(features) {\n    this.addFeaturesInternal(features);\n    this.changed();\n  }\n\n  /**\n   * Add features without firing a `change` event.\n   * @param {Array<FeatureType>} features Features.\n   * @protected\n   */\n  addFeaturesInternal(features) {\n    const extents = [];\n    /** @type {Array<FeatureType>} */\n    const newFeatures = [];\n    /** @type {Array<FeatureType>} */\n    const geometryFeatures = [];\n\n    for (let i = 0, length = features.length; i < length; i++) {\n      const feature = features[i];\n      const featureKey = getUid(feature);\n      if (this.addToIndex_(featureKey, feature)) {\n        newFeatures.push(feature);\n      }\n    }\n\n    for (let i = 0, length = newFeatures.length; i < length; i++) {\n      const feature = newFeatures[i];\n      const featureKey = getUid(feature);\n      this.setupChangeEvents_(featureKey, feature);\n\n      const geometry = feature.getGeometry();\n      if (geometry) {\n        const extent = geometry.getExtent();\n        extents.push(extent);\n        geometryFeatures.push(feature);\n      } else {\n        this.nullGeometryFeatures_[featureKey] = feature;\n      }\n    }\n    if (this.featuresRtree_) {\n      this.featuresRtree_.load(extents, geometryFeatures);\n    }\n\n    if (this.hasListener(VectorEventType.ADDFEATURE)) {\n      for (let i = 0, length = newFeatures.length; i < length; i++) {\n        this.dispatchEvent(\n          new VectorSourceEvent(VectorEventType.ADDFEATURE, newFeatures[i]),\n        );\n      }\n    }\n  }\n\n  /**\n   * @param {!Collection<FeatureType>} collection Collection.\n   * @private\n   */\n  bindFeaturesCollection_(collection) {\n    let modifyingCollection = false;\n    this.addEventListener(\n      VectorEventType.ADDFEATURE,\n      /**\n       * @param {VectorSourceEvent<FeatureType>} evt The vector source event\n       */\n      function (evt) {\n        if (!modifyingCollection) {\n          modifyingCollection = true;\n          collection.push(evt.feature);\n          modifyingCollection = false;\n        }\n      },\n    );\n    this.addEventListener(\n      VectorEventType.REMOVEFEATURE,\n      /**\n       * @param {VectorSourceEvent<FeatureType>} evt The vector source event\n       */\n      function (evt) {\n        if (!modifyingCollection) {\n          modifyingCollection = true;\n          collection.remove(evt.feature);\n          modifyingCollection = false;\n        }\n      },\n    );\n    collection.addEventListener(\n      CollectionEventType.ADD,\n      /**\n       * @param {import(\"../Collection.js\").CollectionEvent<FeatureType>} evt The collection event\n       */\n      (evt) => {\n        if (!modifyingCollection) {\n          modifyingCollection = true;\n          this.addFeature(evt.element);\n          modifyingCollection = false;\n        }\n      },\n    );\n    collection.addEventListener(\n      CollectionEventType.REMOVE,\n      /**\n       * @param {import(\"../Collection.js\").CollectionEvent<FeatureType>} evt The collection event\n       */\n      (evt) => {\n        if (!modifyingCollection) {\n          modifyingCollection = true;\n          this.removeFeature(evt.element);\n          modifyingCollection = false;\n        }\n      },\n    );\n    this.featuresCollection_ = collection;\n  }\n\n  /**\n   * Remove all features from the source.\n   * @param {boolean} [fast] Skip dispatching of {@link module:ol/source/Vector.VectorSourceEvent#event:removefeature} events.\n   * @api\n   */\n  clear(fast) {\n    if (fast) {\n      for (const featureId in this.featureChangeKeys_) {\n        const keys = this.featureChangeKeys_[featureId];\n        keys.forEach(unlistenByKey);\n      }\n      if (!this.featuresCollection_) {\n        this.featureChangeKeys_ = {};\n        this.idIndex_ = {};\n        this.uidIndex_ = {};\n      }\n    } else {\n      if (this.featuresRtree_) {\n        this.featuresRtree_.forEach((feature) => {\n          this.removeFeatureInternal(feature);\n        });\n        for (const id in this.nullGeometryFeatures_) {\n          this.removeFeatureInternal(this.nullGeometryFeatures_[id]);\n        }\n      }\n    }\n    if (this.featuresCollection_) {\n      this.featuresCollection_.clear();\n    }\n\n    if (this.featuresRtree_) {\n      this.featuresRtree_.clear();\n    }\n    this.nullGeometryFeatures_ = {};\n\n    const clearEvent = new VectorSourceEvent(VectorEventType.CLEAR);\n    this.dispatchEvent(clearEvent);\n    this.changed();\n  }\n\n  /**\n   * Iterate through all features on the source, calling the provided callback\n   * with each one.  If the callback returns any \"truthy\" value, iteration will\n   * stop and the function will return the same value.\n   * Note: this function only iterate through the feature that have a defined geometry.\n   *\n   * @param {function(FeatureType): T} callback Called with each feature\n   *     on the source.  Return a truthy value to stop iteration.\n   * @return {T|undefined} The return value from the last call to the callback.\n   * @template T\n   * @api\n   */\n  forEachFeature(callback) {\n    if (this.featuresRtree_) {\n      return this.featuresRtree_.forEach(callback);\n    }\n    if (this.featuresCollection_) {\n      this.featuresCollection_.forEach(callback);\n    }\n  }\n\n  /**\n   * Iterate through all features whose geometries contain the provided\n   * coordinate, calling the callback with each feature.  If the callback returns\n   * a \"truthy\" value, iteration will stop and the function will return the same\n   * value.\n   *\n   * For {@link module:ol/render/Feature~RenderFeature} features, the callback will be\n   * called for all features.\n   *\n   * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n   * @param {function(FeatureType): T} callback Called with each feature\n   *     whose goemetry contains the provided coordinate.\n   * @return {T|undefined} The return value from the last call to the callback.\n   * @template T\n   */\n  forEachFeatureAtCoordinateDirect(coordinate, callback) {\n    const extent = [coordinate[0], coordinate[1], coordinate[0], coordinate[1]];\n    return this.forEachFeatureInExtent(extent, function (feature) {\n      const geometry = feature.getGeometry();\n      if (\n        geometry instanceof RenderFeature ||\n        geometry.intersectsCoordinate(coordinate)\n      ) {\n        return callback(feature);\n      }\n      return undefined;\n    });\n  }\n\n  /**\n   * Iterate through all features whose bounding box intersects the provided\n   * extent (note that the feature's geometry may not intersect the extent),\n   * calling the callback with each feature.  If the callback returns a \"truthy\"\n   * value, iteration will stop and the function will return the same value.\n   *\n   * If you are interested in features whose geometry intersects an extent, call\n   * the {@link module:ol/source/Vector~VectorSource#forEachFeatureIntersectingExtent #forEachFeatureIntersectingExtent()} method instead.\n   *\n   * When `useSpatialIndex` is set to false, this method will loop through all\n   * features, equivalent to {@link module:ol/source/Vector~VectorSource#forEachFeature #forEachFeature()}.\n   *\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @param {function(FeatureType): T} callback Called with each feature\n   *     whose bounding box intersects the provided extent.\n   * @return {T|undefined} The return value from the last call to the callback.\n   * @template T\n   * @api\n   */\n  forEachFeatureInExtent(extent, callback) {\n    if (this.featuresRtree_) {\n      return this.featuresRtree_.forEachInExtent(extent, callback);\n    }\n    if (this.featuresCollection_) {\n      this.featuresCollection_.forEach(callback);\n    }\n  }\n\n  /**\n   * Iterate through all features whose geometry intersects the provided extent,\n   * calling the callback with each feature.  If the callback returns a \"truthy\"\n   * value, iteration will stop and the function will return the same value.\n   *\n   * If you only want to test for bounding box intersection, call the\n   * {@link module:ol/source/Vector~VectorSource#forEachFeatureInExtent #forEachFeatureInExtent()} method instead.\n   *\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @param {function(FeatureType): T} callback Called with each feature\n   *     whose geometry intersects the provided extent.\n   * @return {T|undefined} The return value from the last call to the callback.\n   * @template T\n   * @api\n   */\n  forEachFeatureIntersectingExtent(extent, callback) {\n    return this.forEachFeatureInExtent(\n      extent,\n      /**\n       * @param {FeatureType} feature Feature.\n       * @return {T|undefined} The return value from the last call to the callback.\n       */\n      function (feature) {\n        const geometry = feature.getGeometry();\n        if (\n          geometry instanceof RenderFeature ||\n          geometry.intersectsExtent(extent)\n        ) {\n          const result = callback(feature);\n          if (result) {\n            return result;\n          }\n        }\n      },\n    );\n  }\n\n  /**\n   * Get the features collection associated with this source. Will be `null`\n   * unless the source was configured with `useSpatialIndex` set to `false`, or\n   * with a {@link module:ol/Collection~Collection} as `features`.\n   * @return {Collection<FeatureType>|null} The collection of features.\n   * @api\n   */\n  getFeaturesCollection() {\n    return this.featuresCollection_;\n  }\n\n  /**\n   * Get a snapshot of the features currently on the source in random order. The returned array\n   * is a copy, the features are references to the features in the source.\n   * @return {Array<FeatureType>} Features.\n   * @api\n   */\n  getFeatures() {\n    let features;\n    if (this.featuresCollection_) {\n      features = this.featuresCollection_.getArray().slice(0);\n    } else if (this.featuresRtree_) {\n      features = this.featuresRtree_.getAll();\n      if (!isEmpty(this.nullGeometryFeatures_)) {\n        extend(features, Object.values(this.nullGeometryFeatures_));\n      }\n    }\n    return features;\n  }\n\n  /**\n   * Get all features whose geometry intersects the provided coordinate.\n   * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n   * @return {Array<FeatureType>} Features.\n   * @api\n   */\n  getFeaturesAtCoordinate(coordinate) {\n    /** @type {Array<FeatureType>} */\n    const features = [];\n    this.forEachFeatureAtCoordinateDirect(coordinate, function (feature) {\n      features.push(feature);\n    });\n    return features;\n  }\n\n  /**\n   * Get all features whose bounding box intersects the provided extent.  Note that this returns an array of\n   * all features intersecting the given extent in random order (so it may include\n   * features whose geometries do not intersect the extent).\n   *\n   * When `useSpatialIndex` is set to false, this method will return all\n   * features.\n   *\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @param {import(\"../proj/Projection.js\").default} [projection] Include features\n   * where `extent` exceeds the x-axis bounds of `projection` and wraps around the world.\n   * @return {Array<FeatureType>} Features.\n   * @api\n   */\n  getFeaturesInExtent(extent, projection) {\n    if (this.featuresRtree_) {\n      const multiWorld = projection && projection.canWrapX() && this.getWrapX();\n\n      if (!multiWorld) {\n        return this.featuresRtree_.getInExtent(extent);\n      }\n\n      const extents = wrapAndSliceX(extent, projection);\n\n      return [].concat(\n        ...extents.map((anExtent) => this.featuresRtree_.getInExtent(anExtent)),\n      );\n    }\n    if (this.featuresCollection_) {\n      return this.featuresCollection_.getArray().slice(0);\n    }\n    return [];\n  }\n\n  /**\n   * Get the closest feature to the provided coordinate.\n   *\n   * This method is not available when the source is configured with\n   * `useSpatialIndex` set to `false` and the features in this source are of type\n   * {@link module:ol/Feature~Feature}.\n   * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n   * @param {function(FeatureType):boolean} [filter] Feature filter function.\n   *     The filter function will receive one argument, the {@link module:ol/Feature~Feature feature}\n   *     and it should return a boolean value. By default, no filtering is made.\n   * @return {FeatureType|null} Closest feature (or `null` if none found).\n   * @api\n   */\n  getClosestFeatureToCoordinate(coordinate, filter) {\n    // Find the closest feature using branch and bound.  We start searching an\n    // infinite extent, and find the distance from the first feature found.  This\n    // becomes the closest feature.  We then compute a smaller extent which any\n    // closer feature must intersect.  We continue searching with this smaller\n    // extent, trying to find a closer feature.  Every time we find a closer\n    // feature, we update the extent being searched so that any even closer\n    // feature must intersect it.  We continue until we run out of features.\n    const x = coordinate[0];\n    const y = coordinate[1];\n    let closestFeature = null;\n    const closestPoint = [NaN, NaN];\n    let minSquaredDistance = Infinity;\n    const extent = [-Infinity, -Infinity, Infinity, Infinity];\n    filter = filter ? filter : TRUE;\n    this.featuresRtree_.forEachInExtent(\n      extent,\n      /**\n       * @param {FeatureType} feature Feature.\n       */\n      function (feature) {\n        if (filter(feature)) {\n          const geometry = feature.getGeometry();\n          const previousMinSquaredDistance = minSquaredDistance;\n          minSquaredDistance =\n            geometry instanceof RenderFeature\n              ? 0\n              : geometry.closestPointXY(x, y, closestPoint, minSquaredDistance);\n          if (minSquaredDistance < previousMinSquaredDistance) {\n            closestFeature = feature;\n            // This is sneaky.  Reduce the extent that it is currently being\n            // searched while the R-Tree traversal using this same extent object\n            // is still in progress.  This is safe because the new extent is\n            // strictly contained by the old extent.\n            const minDistance = Math.sqrt(minSquaredDistance);\n            extent[0] = x - minDistance;\n            extent[1] = y - minDistance;\n            extent[2] = x + minDistance;\n            extent[3] = y + minDistance;\n          }\n        }\n      },\n    );\n    return closestFeature;\n  }\n\n  /**\n   * Get the extent of the features currently in the source.\n   *\n   * This will return `null` when the source is configured with\n   * `useSpatialIndex` set to `false`.\n   * @param {import(\"../extent.js\").Extent} [extent] Destination extent. If provided, no new extent\n   *     will be created. Instead, that extent's coordinates will be overwritten.\n   * @return {import(\"../extent.js\").Extent | null} Extent.\n   * @api\n   */\n  getExtent(extent) {\n    return this.featuresRtree_?.getExtent(extent) ?? null;\n  }\n\n  /**\n   * Get a feature by its identifier (the value returned by feature.getId()). When `RenderFeature`s\n   * are used, `getFeatureById()` can return an array of `RenderFeature`s. This allows for handling\n   * of `GeometryCollection` geometries, where format readers create one `RenderFeature` per\n   * `GeometryCollection` member.\n   * Note that the index treats string and numeric identifiers as the same.  So\n   * `source.getFeatureById(2)` will return a feature with id `'2'` or `2`.\n   *\n   * @param {string|number} id Feature identifier.\n   * @return {FeatureClassOrArrayOfRenderFeatures<FeatureType>|null} The feature (or `null` if not found).\n   * @api\n   */\n  getFeatureById(id) {\n    const feature = this.idIndex_[id.toString()];\n    return feature !== undefined\n      ? /** @type {FeatureClassOrArrayOfRenderFeatures<FeatureType>} */ (\n          feature\n        )\n      : null;\n  }\n\n  /**\n   * Get a feature by its internal unique identifier (using `getUid`).\n   *\n   * @param {string} uid Feature identifier.\n   * @return {FeatureType|null} The feature (or `null` if not found).\n   */\n  getFeatureByUid(uid) {\n    const feature = this.uidIndex_[uid];\n    return feature !== undefined ? feature : null;\n  }\n\n  /**\n   * Get the format associated with this source.\n   *\n   * @return {import(\"../format/Feature.js\").default<FeatureType>|null}} The feature format.\n   * @api\n   */\n  getFormat() {\n    return this.format_;\n  }\n\n  /**\n   * @return {boolean} The source can have overlapping geometries.\n   */\n  getOverlaps() {\n    return this.overlaps_;\n  }\n\n  /**\n   * Get the url associated with this source.\n   *\n   * @return {string|import(\"../featureloader.js\").FeatureUrlFunction|undefined} The url.\n   * @api\n   */\n  getUrl() {\n    return this.url_;\n  }\n\n  /**\n   * @param {Event} event Event.\n   * @private\n   */\n  handleFeatureChange_(event) {\n    const feature = /** @type {FeatureType} */ (event.target);\n    const featureKey = getUid(feature);\n    const geometry = feature.getGeometry();\n    if (!geometry) {\n      if (!(featureKey in this.nullGeometryFeatures_)) {\n        if (this.featuresRtree_) {\n          this.featuresRtree_.remove(feature);\n        }\n        this.nullGeometryFeatures_[featureKey] = feature;\n      }\n    } else {\n      const extent = geometry.getExtent();\n      if (featureKey in this.nullGeometryFeatures_) {\n        delete this.nullGeometryFeatures_[featureKey];\n        if (this.featuresRtree_) {\n          this.featuresRtree_.insert(extent, feature);\n        }\n      } else {\n        if (this.featuresRtree_) {\n          this.featuresRtree_.update(extent, feature);\n        }\n      }\n    }\n    const id = feature.getId();\n    if (id !== undefined) {\n      const sid = id.toString();\n      if (this.idIndex_[sid] !== feature) {\n        this.removeFromIdIndex_(feature);\n        this.idIndex_[sid] = feature;\n      }\n    } else {\n      this.removeFromIdIndex_(feature);\n      this.uidIndex_[featureKey] = feature;\n    }\n    this.changed();\n    this.dispatchEvent(\n      new VectorSourceEvent(VectorEventType.CHANGEFEATURE, feature),\n    );\n  }\n\n  /**\n   * Returns true if the feature is contained within the source.\n   * @param {FeatureType} feature Feature.\n   * @return {boolean} Has feature.\n   * @api\n   */\n  hasFeature(feature) {\n    const id = feature.getId();\n    if (id !== undefined) {\n      const indexed = this.idIndex_[String(id)];\n      if (Array.isArray(indexed)) {\n        return indexed.includes(feature);\n      }\n      return indexed === feature;\n    }\n    return getUid(feature) in this.uidIndex_;\n  }\n\n  /**\n   * @return {boolean} Is empty.\n   */\n  isEmpty() {\n    if (this.featuresRtree_) {\n      return (\n        this.featuresRtree_.isEmpty() && isEmpty(this.nullGeometryFeatures_)\n      );\n    }\n    if (this.featuresCollection_) {\n      return this.featuresCollection_.getLength() === 0;\n    }\n    return true;\n  }\n\n  /**\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @param {number} resolution Resolution.\n   * @param {import(\"../proj/Projection.js\").default} projection Projection.\n   */\n  loadFeatures(extent, resolution, projection) {\n    const loadedExtentsRtree = this.loadedExtentsRtree_;\n    const extentsToLoad = this.strategy_(extent, resolution, projection);\n    for (let i = 0, ii = extentsToLoad.length; i < ii; ++i) {\n      const extentToLoad = extentsToLoad[i];\n      const alreadyLoaded = loadedExtentsRtree.forEachInExtent(\n        extentToLoad,\n        /**\n         * @param {{extent: import(\"../extent.js\").Extent}} object Object.\n         * @return {boolean} Contains.\n         */\n        function (object) {\n          return containsExtent(object.extent, extentToLoad);\n        },\n      );\n      if (!alreadyLoaded) {\n        this.loading = Number(this.loading) + 1;\n        this.dispatchEvent(\n          new VectorSourceEvent(VectorEventType.FEATURESLOADSTART),\n        );\n\n        /**\n         * @param {Array<FeatureType>} features Loaded features\n         */\n        const success = (features) => {\n          this.loading = Number(this.loading) - 1;\n          this.dispatchEvent(\n            new VectorSourceEvent(\n              VectorEventType.FEATURESLOADEND,\n              undefined,\n              features,\n            ),\n          );\n        };\n\n        const failure = () => {\n          this.changed();\n          this.loading = Number(this.loading) - 1;\n          this.dispatchEvent(\n            new VectorSourceEvent(VectorEventType.FEATURESLOADERROR),\n          );\n        };\n\n        //TODO Remove this when the deprecatedsuccess and failure arguments are removed\n        let disableCallbacks = false;\n\n        const loaded = this.loader_.call(\n          this,\n          extentToLoad,\n          resolution,\n          projection,\n          (features) => disableCallbacks || success(features),\n          () => disableCallbacks || failure(),\n        );\n        if (loaded instanceof Promise) {\n          //TODO Remove this when the deprecatedsuccess and failure arguments are removed\n          disableCallbacks = true;\n          loaded\n            .then((features) => {\n              this.addFeatures(features);\n              success(features);\n            })\n            .catch(failure);\n        } else if (this.loader_.length < 4) {\n          this.loading = false;\n        }\n        loadedExtentsRtree.insert(extentToLoad, {extent: extentToLoad.slice()});\n      }\n    }\n  }\n\n  /**\n   * @override\n   */\n  refresh() {\n    this.clear(true);\n    this.loadedExtentsRtree_.clear();\n    super.refresh();\n  }\n\n  /**\n   * Marks an extent as not loaded, preserving any loaded areas outside it.\n   *\n   * Any previously loaded extent overlapping the given extent is split into its\n   * remaining non-overlapping parts using {@link module:ol/extent~getDifference getDifference()},\n   * which are then re-inserted into the tree.\n   *\n   * @param {import(\"../extent.js\").Extent} extent Extent to mark as not loaded.\n   * @api\n   */\n  removeLoadedExtent(extent) {\n    const loadedExtentsRtree = this.loadedExtentsRtree_;\n    const intersectingExtents = [];\n    loadedExtentsRtree.forEachInExtent(extent, function (object) {\n      intersectingExtents.push(object);\n    });\n    intersectingExtents.forEach((intersectingExtent) => {\n      loadedExtentsRtree.remove(intersectingExtent);\n      const remainders = getDifference(intersectingExtent.extent, extent);\n      for (const remainder of remainders) {\n        loadedExtentsRtree.insert(remainder, {extent: remainder});\n      }\n    });\n  }\n\n  /**\n   * Batch remove features from the source.  If you want to remove all features\n   * at once, use the {@link module:ol/source/Vector~VectorSource#clear #clear()} method\n   * instead.\n   * @param {Array<FeatureType>} features Features to remove.\n   * @api\n   */\n  removeFeatures(features) {\n    let removed = false;\n    for (let i = 0, ii = features.length; i < ii; ++i) {\n      removed = this.removeFeatureInternal(features[i]) || removed;\n    }\n    if (removed) {\n      this.changed();\n    }\n  }\n\n  /**\n   * Remove a single feature from the source. If you want to batch remove\n   * features, use the {@link module:ol/source/Vector~VectorSource#removeFeatures #removeFeatures()} method\n   * instead.\n   * @param {FeatureType} feature Feature to remove.\n   * @api\n   */\n  removeFeature(feature) {\n    if (!feature) {\n      return;\n    }\n    const removed = this.removeFeatureInternal(feature);\n    if (removed) {\n      this.changed();\n    }\n  }\n\n  /**\n   * Remove feature without firing a `change` event.\n   * @param {FeatureType} feature Feature.\n   * @return {boolean} True if the feature was removed, false if it was not found.\n   * @protected\n   */\n  removeFeatureInternal(feature) {\n    const featureKey = getUid(feature);\n    if (!(featureKey in this.uidIndex_)) {\n      return false;\n    }\n\n    if (featureKey in this.nullGeometryFeatures_) {\n      delete this.nullGeometryFeatures_[featureKey];\n    } else {\n      if (this.featuresRtree_) {\n        this.featuresRtree_.remove(feature);\n      }\n    }\n\n    const featureChangeKeys = this.featureChangeKeys_[featureKey];\n    featureChangeKeys?.forEach(unlistenByKey);\n    delete this.featureChangeKeys_[featureKey];\n\n    const id = feature.getId();\n    if (id !== undefined) {\n      const idString = id.toString();\n      const indexedFeature = this.idIndex_[idString];\n      if (indexedFeature === feature) {\n        delete this.idIndex_[idString];\n      } else if (Array.isArray(indexedFeature)) {\n        indexedFeature.splice(indexedFeature.indexOf(feature), 1);\n        if (indexedFeature.length === 1) {\n          this.idIndex_[idString] = indexedFeature[0];\n        }\n      }\n    }\n    delete this.uidIndex_[featureKey];\n    if (this.hasListener(VectorEventType.REMOVEFEATURE)) {\n      this.dispatchEvent(\n        new VectorSourceEvent(VectorEventType.REMOVEFEATURE, feature),\n      );\n    }\n    return true;\n  }\n\n  /**\n   * Remove a feature from the id index.  Called internally when the feature id\n   * may have changed.\n   * @param {FeatureType} feature The feature.\n   * @private\n   */\n  removeFromIdIndex_(feature) {\n    for (const id in this.idIndex_) {\n      if (this.idIndex_[id] === feature) {\n        delete this.idIndex_[id];\n        break;\n      }\n    }\n  }\n\n  /**\n   * Set the new loader of the source. The next render cycle will use the\n   * new loader.\n   * @param {import(\"../featureloader.js\").FeatureLoader} loader The loader to set.\n   * @api\n   */\n  setLoader(loader) {\n    this.loader_ = loader;\n  }\n\n  /**\n   * Points the source to a new url. The next render cycle will use the new url.\n   * @param {string|import(\"../featureloader.js\").FeatureUrlFunction} url Url.\n   * @api\n   */\n  setUrl(url) {\n    assert(this.format_, '`format` must be set when `url` is set');\n    this.url_ = url;\n    this.setLoader(xhr(url, this.format_));\n  }\n\n  /**\n   * @param {boolean} overlaps The source can have overlapping geometries.\n   */\n  setOverlaps(overlaps) {\n    this.overlaps_ = overlaps;\n    this.changed();\n  }\n}\n\nexport default VectorSource;\n", "/**\n * @module ol/ViewHint\n */\n\n/**\n * @enum {number}\n */\nexport default {\n  ANIMATING: 0,\n  INTERACTING: 1,\n};\n", "/**\n * @module ol/render/EventType\n */\n\n/**\n * @enum {string}\n */\nexport default {\n  /**\n   * Triggered before a layer is rendered.\n   * @event module:ol/render/Event~RenderEvent#prerender\n   * @api\n   */\n  PRERENDER: 'prerender',\n\n  /**\n   * Triggered after a layer is rendered.\n   * @event module:ol/render/Event~RenderEvent#postrender\n   * @api\n   */\n  POSTRENDER: 'postrender',\n\n  /**\n   * Triggered before layers are composed.  When dispatched by the map, the event object will not have\n   * a `context` set.  When dispatched by a layer, the event object will have a `context` set.  Only\n   * WebGL layers currently dispatch this event.\n   * @event module:ol/render/Event~RenderEvent#precompose\n   * @api\n   */\n  PRECOMPOSE: 'precompose',\n\n  /**\n   * Triggered after layers are composed.  When dispatched by the map, the event object will not have\n   * a `context` set.  When dispatched by a layer, the event object will have a `context` set.  Only\n   * WebGL layers currently dispatch this event.\n   * @event module:ol/render/Event~RenderEvent#postcompose\n   * @api\n   */\n  POSTCOMPOSE: 'postcompose',\n\n  /**\n   * Triggered when rendering is complete, i.e. all sources and tiles have\n   * finished loading for the current viewport, and all tiles are faded in.\n   * The event object will not have a `context` set.\n   * @event module:ol/render/Event~RenderEvent#rendercomplete\n   * @api\n   */\n  RENDERCOMPLETE: 'rendercomplete',\n};\n\n/**\n * @typedef {'postrender'|'precompose'|'postcompose'|'rendercomplete'} MapRenderEventTypes\n */\n\n/**\n * @typedef {'postrender'|'prerender'} LayerRenderEventTypes\n */\n", "/**\n * @module ol/render/VectorContext\n */\n\n/**\n * @classdesc\n * Context for drawing geometries.  A vector context is available on render\n * events and does not need to be constructed directly.\n * @api\n */\nclass VectorContext {\n  /**\n   * Render a geometry with a custom renderer.\n   *\n   * @param {import(\"../geom/SimpleGeometry.js\").default} geometry Geometry.\n   * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n   * @param {Function} renderer Renderer.\n   * @param {Function} hitDetectionRenderer Renderer.\n   * @param {number} [index] Render order index.\n   */\n  drawCustom(geometry, feature, renderer, hitDetectionRenderer, index) {}\n\n  /**\n   * Render a geometry.\n   *\n   * @param {import(\"../geom/Geometry.js\").default} geometry The geometry to render.\n   */\n  drawGeometry(geometry) {}\n\n  /**\n   * Set the rendering style.\n   *\n   * @param {import(\"../style/Style.js\").default} style The rendering style.\n   */\n  setStyle(style) {}\n\n  /**\n   * @param {import(\"../geom/Circle.js\").default} circleGeometry Circle geometry.\n   * @param {import(\"../Feature.js\").default} feature Feature.\n   * @param {number} [index] Render order index.\n   */\n  drawCircle(circleGeometry, feature, index) {}\n\n  /**\n   * @param {import(\"../Feature.js\").default} feature Feature.\n   * @param {import(\"../style/Style.js\").default} style Style.\n   * @param {number} [index] Render order index.\n   */\n  drawFeature(feature, style, index) {}\n\n  /**\n   * @param {import(\"../geom/GeometryCollection.js\").default} geometryCollectionGeometry Geometry collection.\n   * @param {import(\"../Feature.js\").default} feature Feature.\n   * @param {number} [index] Render order index.\n   */\n  drawGeometryCollection(geometryCollectionGeometry, feature, index) {}\n\n  /**\n   * @param {import(\"../geom/LineString.js\").default|import(\"./Feature.js\").default} lineStringGeometry Line string geometry.\n   * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n   * @param {number} [index] Render order index.\n   */\n  drawLineString(lineStringGeometry, feature, index) {}\n\n  /**\n   * @param {import(\"../geom/MultiLineString.js\").default|import(\"./Feature.js\").default} multiLineStringGeometry MultiLineString geometry.\n   * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n   * @param {number} [index] Render order index.\n   */\n  drawMultiLineString(multiLineStringGeometry, feature, index) {}\n\n  /**\n   * @param {import(\"../geom/MultiPoint.js\").default|import(\"./Feature.js\").default} multiPointGeometry MultiPoint geometry.\n   * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n   * @param {number} [index] Render order index.\n   */\n  drawMultiPoint(multiPointGeometry, feature, index) {}\n\n  /**\n   * @param {import(\"../geom/MultiPolygon.js\").default} multiPolygonGeometry MultiPolygon geometry.\n   * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n   * @param {number} [index] Render order index.\n   */\n  drawMultiPolygon(multiPolygonGeometry, feature, index) {}\n\n  /**\n   * @param {import(\"../geom/Point.js\").default|import(\"./Feature.js\").default} pointGeometry Point geometry.\n   * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n   * @param {number} [index] Render order index.\n   */\n  drawPoint(pointGeometry, feature, index) {}\n\n  /**\n   * @param {import(\"../geom/Polygon.js\").default|import(\"./Feature.js\").default} polygonGeometry Polygon geometry.\n   * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n   * @param {number} [index] Render order index.\n   */\n  drawPolygon(polygonGeometry, feature, index) {}\n\n  /**\n   * @param {import(\"../geom/SimpleGeometry.js\").default|import(\"./Feature.js\").default} geometry Geometry.\n   * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n   * @param {number} [index] Render order index.\n   */\n  drawText(geometry, feature, index) {}\n\n  /**\n   * @param {import(\"../style/Fill.js\").default} fillStyle Fill style.\n   * @param {import(\"../style/Stroke.js\").default} strokeStyle Stroke style.\n   */\n  setFillStrokeStyle(fillStyle, strokeStyle) {}\n\n  /**\n   * @param {import(\"../style/Image.js\").default} imageStyle Image style.\n   * @param {import(\"../render/canvas.js\").DeclutterImageWithText} [declutterImageWithText] Shared data for combined decluttering with a text style.\n   */\n  setImageStyle(imageStyle, declutterImageWithText) {}\n\n  /**\n   * @param {import(\"../style/Text.js\").default} textStyle Text style.\n   * @param {import(\"../render/canvas.js\").DeclutterImageWithText} [declutterImageWithText] Shared data for combined decluttering with an image style.\n   */\n  setTextStyle(textStyle, declutterImageWithText) {}\n}\n\nexport default VectorContext;\n", "/**\n * @module ol/render/canvas/Instruction\n */\n\n/**\n * @enum {number}\n */\nconst Instruction = {\n  BEGIN_GEOMETRY: 0,\n  BEGIN_PATH: 1,\n  CIRCLE: 2,\n  CLOSE_PATH: 3,\n  CUSTOM: 4,\n  DRAW_CHARS: 5,\n  DRAW_IMAGE: 6,\n  END_GEOMETRY: 7,\n  FILL: 8,\n  MOVE_TO_LINE_TO: 9,\n  SET_FILL_STYLE: 10,\n  SET_STROKE_STYLE: 11,\n  STROKE: 12,\n};\n\n/**\n * @type {Array<Instruction>}\n */\nexport const fillInstruction = [Instruction.FILL];\n\n/**\n * @type {Array<Instruction>}\n */\nexport const strokeInstruction = [Instruction.STROKE];\n\n/**\n * @type {Array<Instruction>}\n */\nexport const beginPathInstruction = [Instruction.BEGIN_PATH];\n\n/**\n * @type {Array<Instruction>}\n */\nexport const closePathInstruction = [Instruction.CLOSE_PATH];\n\nexport default Instruction;\n", "/**\n * @module ol/render/canvas/Builder\n */\nimport {equals, reverseSubArray} from '../../array.js';\nimport {asColorLike} from '../../colorlike.js';\nimport {\n  buffer,\n  clone,\n  containsCoordinate,\n  coordinateRelationship,\n} from '../../extent.js';\nimport Relationship from '../../extent/Relationship.js';\nimport {\n  inflateCoordinates,\n  inflateCoordinatesArray,\n  inflateMultiCoordinatesArray,\n} from '../../geom/flat/inflate.js';\nimport VectorContext from '../VectorContext.js';\nimport {\n  defaultFillStyle,\n  defaultLineCap,\n  defaultLineDash,\n  defaultLineDashOffset,\n  defaultLineJoin,\n  defaultLineWidth,\n  defaultMiterLimit,\n  defaultStrokeOffset,\n  defaultStrokeStyle,\n} from '../canvas.js';\nimport CanvasInstruction from './Instruction.js';\n\nclass CanvasBuilder extends VectorContext {\n  /**\n   * @param {number} tolerance Tolerance.\n   * @param {import(\"../../extent.js\").Extent} maxExtent Maximum extent.\n   * @param {number} resolution Resolution.\n   * @param {number} pixelRatio Pixel ratio.\n   */\n  constructor(tolerance, maxExtent, resolution, pixelRatio) {\n    super();\n\n    /**\n     * @protected\n     * @type {number}\n     */\n    this.tolerance = tolerance;\n\n    /**\n     * @protected\n     * @const\n     * @type {import(\"../../extent.js\").Extent}\n     */\n    this.maxExtent = maxExtent;\n\n    /**\n     * @protected\n     * @type {number}\n     */\n    this.pixelRatio = pixelRatio;\n\n    /**\n     * @protected\n     * @type {number}\n     */\n    this.maxLineWidth = 0;\n\n    /**\n     * @protected\n     * @const\n     * @type {number}\n     */\n    this.resolution = resolution;\n\n    /**\n     * @private\n     * @type {Array<*>}\n     */\n    this.beginGeometryInstruction1_ = null;\n\n    /**\n     * @private\n     * @type {Array<*>}\n     */\n    this.beginGeometryInstruction2_ = null;\n\n    /**\n     * @private\n     * @type {import(\"../../extent.js\").Extent}\n     */\n    this.bufferedMaxExtent_ = null;\n\n    /**\n     * @protected\n     * @type {Array<*>}\n     */\n    this.instructions = [];\n\n    /**\n     * @protected\n     * @type {Array<number>}\n     */\n    this.coordinates = [];\n\n    /**\n     * @private\n     * @type {import(\"../../coordinate.js\").Coordinate}\n     */\n    this.tmpCoordinate_ = [];\n\n    /**\n     * @protected\n     * @type {Array<*>}\n     */\n    this.hitDetectionInstructions = [];\n\n    /**\n     * @protected\n     * @type {import(\"../canvas.js\").FillStrokeState}\n     */\n    this.state = /** @type {import(\"../canvas.js\").FillStrokeState} */ ({});\n  }\n\n  /**\n   * @protected\n   * @param {Array<number>} dashArray Dash array.\n   * @return {Array<number>} Dash array with pixel ratio applied\n   */\n  applyPixelRatio(dashArray) {\n    const pixelRatio = this.pixelRatio;\n    return pixelRatio == 1\n      ? dashArray\n      : dashArray.map(function (dash) {\n          return dash * pixelRatio;\n        });\n  }\n\n  /**\n   * @param {Array<number>} flatCoordinates Flat coordinates.\n   * @param {number} stride Stride.\n   * @protected\n   * @return {number} My end\n   */\n  appendFlatPointCoordinates(flatCoordinates, stride) {\n    const extent = this.getBufferedMaxExtent();\n    const tmpCoord = this.tmpCoordinate_;\n    const coordinates = this.coordinates;\n    let myEnd = coordinates.length;\n    for (let i = 0, ii = flatCoordinates.length; i < ii; i += stride) {\n      tmpCoord[0] = flatCoordinates[i];\n      tmpCoord[1] = flatCoordinates[i + 1];\n      if (containsCoordinate(extent, tmpCoord)) {\n        coordinates[myEnd++] = tmpCoord[0];\n        coordinates[myEnd++] = tmpCoord[1];\n      }\n    }\n    return myEnd;\n  }\n\n  /**\n   * @param {Array<number>} flatCoordinates Flat coordinates.\n   * @param {number} offset Offset.\n   * @param {number} end End.\n   * @param {number} stride Stride.\n   * @param {boolean} closed Last input coordinate equals first.\n   * @param {boolean} skipFirst Skip first coordinate.\n   * @protected\n   * @return {number} My end.\n   */\n  appendFlatLineCoordinates(\n    flatCoordinates,\n    offset,\n    end,\n    stride,\n    closed,\n    skipFirst,\n  ) {\n    const coordinates = this.coordinates;\n    let myEnd = coordinates.length;\n    const extent = this.getBufferedMaxExtent();\n    if (skipFirst) {\n      offset += stride;\n    }\n    let lastXCoord = flatCoordinates[offset];\n    let lastYCoord = flatCoordinates[offset + 1];\n    const nextCoord = this.tmpCoordinate_;\n    let skipped = true;\n\n    let i, lastRel, nextRel;\n    for (i = offset + stride; i < end; i += stride) {\n      nextCoord[0] = flatCoordinates[i];\n      nextCoord[1] = flatCoordinates[i + 1];\n      nextRel = coordinateRelationship(extent, nextCoord);\n      if (nextRel !== lastRel) {\n        if (skipped) {\n          coordinates[myEnd++] = lastXCoord;\n          coordinates[myEnd++] = lastYCoord;\n          skipped = false;\n        }\n        coordinates[myEnd++] = nextCoord[0];\n        coordinates[myEnd++] = nextCoord[1];\n      } else if (nextRel === Relationship.INTERSECTING) {\n        coordinates[myEnd++] = nextCoord[0];\n        coordinates[myEnd++] = nextCoord[1];\n        skipped = false;\n      } else {\n        skipped = true;\n      }\n      lastXCoord = nextCoord[0];\n      lastYCoord = nextCoord[1];\n      lastRel = nextRel;\n    }\n\n    // Last coordinate equals first or only one point to append:\n    if ((closed && skipped) || i === offset + stride) {\n      coordinates[myEnd++] = lastXCoord;\n      coordinates[myEnd++] = lastYCoord;\n    }\n    return myEnd;\n  }\n\n  /**\n   * @param {Array<number>} flatCoordinates Flat coordinates.\n   * @param {number} offset Offset.\n   * @param {Array<number>} ends Ends.\n   * @param {number} stride Stride.\n   * @param {Array<number>} builderEnds Builder ends.\n   * @return {number} Offset.\n   */\n  drawCustomCoordinates_(flatCoordinates, offset, ends, stride, builderEnds) {\n    for (let i = 0, ii = ends.length; i < ii; ++i) {\n      const end = ends[i];\n      const builderEnd = this.appendFlatLineCoordinates(\n        flatCoordinates,\n        offset,\n        end,\n        stride,\n        false,\n        false,\n      );\n      builderEnds.push(builderEnd);\n      offset = end;\n    }\n    return offset;\n  }\n\n  /**\n   * @param {import(\"../../geom/SimpleGeometry.js\").default} geometry Geometry.\n   * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n   * @param {Function} renderer Renderer.\n   * @param {Function} hitDetectionRenderer Renderer.\n   * @param {number} [index] Render order index.\n   * @override\n   */\n  drawCustom(geometry, feature, renderer, hitDetectionRenderer, index) {\n    this.beginGeometry(geometry, feature, index);\n\n    const type = geometry.getType();\n    const stride = geometry.getStride();\n    const builderBegin = this.coordinates.length;\n\n    let flatCoordinates, builderEnd, builderEnds, builderEndss;\n    let offset;\n\n    switch (type) {\n      case 'MultiPolygon':\n        flatCoordinates =\n          /** @type {import(\"../../geom/MultiPolygon.js\").default} */ (\n            geometry\n          ).getOrientedFlatCoordinates();\n        builderEndss = [];\n        const endss =\n          /** @type {import(\"../../geom/MultiPolygon.js\").default} */ (\n            geometry\n          ).getEndss();\n        offset = 0;\n        for (let i = 0, ii = endss.length; i < ii; ++i) {\n          const myEnds = [];\n          offset = this.drawCustomCoordinates_(\n            flatCoordinates,\n            offset,\n            endss[i],\n            stride,\n            myEnds,\n          );\n          builderEndss.push(myEnds);\n        }\n        this.instructions.push([\n          CanvasInstruction.CUSTOM,\n          builderBegin,\n          builderEndss,\n          geometry,\n          renderer,\n          inflateMultiCoordinatesArray,\n          index,\n        ]);\n        this.hitDetectionInstructions.push([\n          CanvasInstruction.CUSTOM,\n          builderBegin,\n          builderEndss,\n          geometry,\n          hitDetectionRenderer || renderer,\n          inflateMultiCoordinatesArray,\n          index,\n        ]);\n        break;\n      case 'Polygon':\n      case 'MultiLineString':\n        builderEnds = [];\n        flatCoordinates =\n          type == 'Polygon'\n            ? /** @type {import(\"../../geom/Polygon.js\").default} */ (\n                geometry\n              ).getOrientedFlatCoordinates()\n            : geometry.getFlatCoordinates();\n        offset = this.drawCustomCoordinates_(\n          flatCoordinates,\n          0,\n          /** @type {import(\"../../geom/Polygon.js\").default|import(\"../../geom/MultiLineString.js\").default} */ (\n            geometry\n          ).getEnds(),\n          stride,\n          builderEnds,\n        );\n        this.instructions.push([\n          CanvasInstruction.CUSTOM,\n          builderBegin,\n          builderEnds,\n          geometry,\n          renderer,\n          inflateCoordinatesArray,\n          index,\n        ]);\n        this.hitDetectionInstructions.push([\n          CanvasInstruction.CUSTOM,\n          builderBegin,\n          builderEnds,\n          geometry,\n          hitDetectionRenderer || renderer,\n          inflateCoordinatesArray,\n          index,\n        ]);\n        break;\n      case 'LineString':\n      case 'Circle':\n        flatCoordinates = geometry.getFlatCoordinates();\n        builderEnd = this.appendFlatLineCoordinates(\n          flatCoordinates,\n          0,\n          flatCoordinates.length,\n          stride,\n          false,\n          false,\n        );\n        this.instructions.push([\n          CanvasInstruction.CUSTOM,\n          builderBegin,\n          builderEnd,\n          geometry,\n          renderer,\n          inflateCoordinates,\n          index,\n        ]);\n        this.hitDetectionInstructions.push([\n          CanvasInstruction.CUSTOM,\n          builderBegin,\n          builderEnd,\n          geometry,\n          hitDetectionRenderer || renderer,\n          inflateCoordinates,\n          index,\n        ]);\n        break;\n      case 'MultiPoint':\n        flatCoordinates = geometry.getFlatCoordinates();\n        builderEnd = this.appendFlatPointCoordinates(flatCoordinates, stride);\n\n        if (builderEnd > builderBegin) {\n          this.instructions.push([\n            CanvasInstruction.CUSTOM,\n            builderBegin,\n            builderEnd,\n            geometry,\n            renderer,\n            inflateCoordinates,\n            index,\n          ]);\n          this.hitDetectionInstructions.push([\n            CanvasInstruction.CUSTOM,\n            builderBegin,\n            builderEnd,\n            geometry,\n            hitDetectionRenderer || renderer,\n            inflateCoordinates,\n            index,\n          ]);\n        }\n        break;\n      case 'Point':\n        flatCoordinates = geometry.getFlatCoordinates();\n        this.coordinates.push(flatCoordinates[0], flatCoordinates[1]);\n        builderEnd = this.coordinates.length;\n\n        this.instructions.push([\n          CanvasInstruction.CUSTOM,\n          builderBegin,\n          builderEnd,\n          geometry,\n          renderer,\n          undefined,\n          index,\n        ]);\n        this.hitDetectionInstructions.push([\n          CanvasInstruction.CUSTOM,\n          builderBegin,\n          builderEnd,\n          geometry,\n          hitDetectionRenderer || renderer,\n          undefined,\n          index,\n        ]);\n        break;\n      default:\n    }\n    this.endGeometry(feature);\n  }\n\n  /**\n   * @protected\n   * @param {import(\"../../geom/Geometry.js\").default|import(\"../Feature.js\").default} geometry The geometry.\n   * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n   * @param {number} index Render order index\n   */\n  beginGeometry(geometry, feature, index) {\n    this.beginGeometryInstruction1_ = [\n      CanvasInstruction.BEGIN_GEOMETRY,\n      feature,\n      0,\n      geometry,\n      index,\n    ];\n    this.instructions.push(this.beginGeometryInstruction1_);\n    this.beginGeometryInstruction2_ = [\n      CanvasInstruction.BEGIN_GEOMETRY,\n      feature,\n      0,\n      geometry,\n      index,\n    ];\n    this.hitDetectionInstructions.push(this.beginGeometryInstruction2_);\n  }\n\n  /**\n   * @return {import(\"../canvas.js\").SerializableInstructions} the serializable instructions.\n   */\n  finish() {\n    return {\n      instructions: this.instructions,\n      hitDetectionInstructions: this.hitDetectionInstructions,\n      coordinates: this.coordinates,\n    };\n  }\n\n  /**\n   * Reverse the hit detection instructions.\n   */\n  reverseHitDetectionInstructions() {\n    const hitDetectionInstructions = this.hitDetectionInstructions;\n    // step 1 - reverse array\n    hitDetectionInstructions.reverse();\n    // step 2 - reverse instructions within geometry blocks\n    let i;\n    const n = hitDetectionInstructions.length;\n    let instruction;\n    let type;\n    let begin = -1;\n    for (i = 0; i < n; ++i) {\n      instruction = hitDetectionInstructions[i];\n      type = /** @type {import(\"./Instruction.js\").default} */ (instruction[0]);\n      if (type == CanvasInstruction.END_GEOMETRY) {\n        begin = i;\n      } else if (type == CanvasInstruction.BEGIN_GEOMETRY) {\n        instruction[2] = i;\n        reverseSubArray(this.hitDetectionInstructions, begin, i);\n        begin = -1;\n      }\n    }\n  }\n\n  /**\n   * @param {import(\"../../style/Fill.js\").default} fillStyle Fill style.\n   * @param {import('../canvas.js').FillStrokeState} [state] State.\n   * @return {import('../canvas.js').FillStrokeState} State.\n   */\n  fillStyleToState(\n    fillStyle,\n    state = /** @type {import('../canvas.js').FillStrokeState} */ ({}),\n  ) {\n    if (fillStyle) {\n      const fillStyleColor = fillStyle.getColor();\n      state.fillPatternScale =\n        fillStyleColor &&\n        typeof fillStyleColor === 'object' &&\n        'src' in fillStyleColor\n          ? this.pixelRatio\n          : 1;\n      state.fillStyle =\n        asColorLike(fillStyleColor ? fillStyleColor : defaultFillStyle) ??\n        undefined;\n    } else {\n      state.fillStyle = undefined;\n    }\n    return state;\n  }\n\n  /**\n   * @param {import(\"../../style/Stroke.js\").default} strokeStyle Stroke style.\n   * @param {import(\"../canvas.js\").FillStrokeState} state State.\n   * @return {import(\"../canvas.js\").FillStrokeState} State.\n   */\n  strokeStyleToState(\n    strokeStyle,\n    state = /** @type {import('../canvas.js').FillStrokeState} */ ({}),\n  ) {\n    if (strokeStyle) {\n      const strokeStyleColor = strokeStyle.getColor();\n      state.strokeStyle = asColorLike(\n        strokeStyleColor ? strokeStyleColor : defaultStrokeStyle,\n      );\n      const strokeStyleLineCap = strokeStyle.getLineCap();\n      state.lineCap =\n        strokeStyleLineCap !== undefined ? strokeStyleLineCap : defaultLineCap;\n      const strokeStyleLineDash = strokeStyle.getLineDash();\n      state.lineDash = strokeStyleLineDash\n        ? strokeStyleLineDash.slice()\n        : defaultLineDash;\n      const strokeStyleLineDashOffset = strokeStyle.getLineDashOffset();\n      state.lineDashOffset = strokeStyleLineDashOffset\n        ? strokeStyleLineDashOffset\n        : defaultLineDashOffset;\n      const strokeStyleLineJoin = strokeStyle.getLineJoin();\n      state.lineJoin =\n        strokeStyleLineJoin !== undefined\n          ? strokeStyleLineJoin\n          : defaultLineJoin;\n      const strokeStyleWidth = strokeStyle.getWidth();\n      state.lineWidth =\n        strokeStyleWidth !== undefined ? strokeStyleWidth : defaultLineWidth;\n      const strokeStyleMiterLimit = strokeStyle.getMiterLimit();\n      state.miterLimit =\n        strokeStyleMiterLimit !== undefined\n          ? strokeStyleMiterLimit\n          : defaultMiterLimit;\n      const strokeStyleOffset = strokeStyle.getOffset();\n      state.strokeOffset = strokeStyleOffset ?? defaultStrokeOffset;\n\n      if (state.lineWidth > this.maxLineWidth) {\n        this.maxLineWidth = state.lineWidth;\n        // invalidate the buffered max extent cache\n        this.bufferedMaxExtent_ = null;\n      }\n    } else {\n      state.strokeStyle = undefined;\n      state.lineCap = undefined;\n      state.lineDash = null;\n      state.lineDashOffset = undefined;\n      state.lineJoin = undefined;\n      state.lineWidth = undefined;\n      state.miterLimit = undefined;\n      state.strokeOffset = undefined;\n    }\n    return state;\n  }\n\n  /**\n   * @param {import(\"../../style/Fill.js\").default} fillStyle Fill style.\n   * @param {import(\"../../style/Stroke.js\").default} strokeStyle Stroke style.\n   * @override\n   */\n  setFillStrokeStyle(fillStyle, strokeStyle) {\n    const state = this.state;\n    this.fillStyleToState(fillStyle, state);\n    this.strokeStyleToState(strokeStyle, state);\n  }\n\n  /**\n   * @param {import(\"../canvas.js\").FillStrokeState} state State.\n   * @return {Array<*>} Fill instruction.\n   */\n  createFill(state) {\n    const fillStyle = state.fillStyle;\n    /** @type {Array<*>} */\n    const fillInstruction = [CanvasInstruction.SET_FILL_STYLE, fillStyle];\n    if (typeof fillStyle !== 'string') {\n      // Fill is a pattern or gradient - align and scale it!\n      fillInstruction.push(state.fillPatternScale);\n    }\n    return fillInstruction;\n  }\n\n  /**\n   * @param {import(\"../canvas.js\").FillStrokeState} state State.\n   */\n  applyStroke(state) {\n    this.instructions.push(this.createStroke(state));\n  }\n\n  /**\n   * @param {import(\"../canvas.js\").FillStrokeState} state State.\n   * @return {Array<*>} Stroke instruction.\n   */\n  createStroke(state) {\n    return [\n      CanvasInstruction.SET_STROKE_STYLE,\n      state.strokeStyle,\n      state.lineWidth * this.pixelRatio,\n      state.lineCap,\n      state.lineJoin,\n      state.miterLimit,\n      state.lineDash ? this.applyPixelRatio(state.lineDash) : null,\n      state.lineDashOffset * this.pixelRatio,\n    ];\n  }\n\n  /**\n   * @param {import(\"../canvas.js\").FillStrokeState} state State.\n   * @param {function(this:CanvasBuilder, import(\"../canvas.js\").FillStrokeState):Array<*>} createFill Create fill.\n   */\n  updateFillStyle(state, createFill) {\n    const fillStyle = state.fillStyle;\n    if (\n      (fillStyle !== undefined && typeof fillStyle !== 'string') ||\n      state.currentFillStyle != fillStyle\n    ) {\n      this.instructions.push(createFill.call(this, state));\n      state.currentFillStyle = fillStyle;\n    }\n  }\n\n  /**\n   * @param {import(\"../canvas.js\").FillStrokeState} state State.\n   * @param {function(this:CanvasBuilder, import(\"../canvas.js\").FillStrokeState): void} applyStroke Apply stroke.\n   */\n  updateStrokeStyle(state, applyStroke) {\n    const strokeStyle = state.strokeStyle;\n    const lineCap = state.lineCap;\n    const lineDash = state.lineDash;\n    const lineDashOffset = state.lineDashOffset;\n    const lineJoin = state.lineJoin;\n    const lineWidth = state.lineWidth;\n    const miterLimit = state.miterLimit;\n    const strokeOffset = state.strokeOffset;\n    if (\n      state.currentStrokeStyle != strokeStyle ||\n      state.currentLineCap != lineCap ||\n      (lineDash != state.currentLineDash &&\n        !equals(state.currentLineDash, lineDash)) ||\n      state.currentLineDashOffset != lineDashOffset ||\n      state.currentLineJoin != lineJoin ||\n      state.currentLineWidth != lineWidth ||\n      state.currentMiterLimit != miterLimit ||\n      state.currentStrokeOffset != strokeOffset\n    ) {\n      applyStroke.call(this, state);\n      state.currentStrokeStyle = strokeStyle;\n      state.currentLineCap = lineCap;\n      state.currentLineDash = lineDash;\n      state.currentLineDashOffset = lineDashOffset;\n      state.currentLineJoin = lineJoin;\n      state.currentLineWidth = lineWidth;\n      state.currentMiterLimit = miterLimit;\n      state.currentStrokeOffset = strokeOffset;\n    }\n  }\n\n  /**\n   * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n   */\n  endGeometry(feature) {\n    this.beginGeometryInstruction1_[2] = this.instructions.length;\n    this.beginGeometryInstruction1_ = null;\n    this.beginGeometryInstruction2_[2] = this.hitDetectionInstructions.length;\n    this.beginGeometryInstruction2_ = null;\n    const endGeometryInstruction = [CanvasInstruction.END_GEOMETRY, feature];\n    this.instructions.push(endGeometryInstruction);\n    this.hitDetectionInstructions.push(endGeometryInstruction);\n  }\n\n  /**\n   * Get the buffered rendering extent.  Rendering will be clipped to the extent\n   * provided to the constructor.  To account for symbolizers that may intersect\n   * this extent, we calculate a buffered extent (e.g. based on stroke width).\n   * @return {import(\"../../extent.js\").Extent} The buffered rendering extent.\n   * @protected\n   */\n  getBufferedMaxExtent() {\n    if (!this.bufferedMaxExtent_) {\n      this.bufferedMaxExtent_ = clone(this.maxExtent);\n      if (this.maxLineWidth > 0) {\n        const width = (this.resolution * (this.maxLineWidth + 1)) / 2;\n        buffer(this.bufferedMaxExtent_, width, this.bufferedMaxExtent_);\n      }\n    }\n    return this.bufferedMaxExtent_;\n  }\n}\n\nexport default CanvasBuilder;\n", "/**\n * @module ol/render/canvas/ImageBuilder\n */\nimport {containsCoordinate} from '../../extent.js';\nimport CanvasBuilder from './Builder.js';\nimport CanvasInstruction from './Instruction.js';\n\nclass CanvasImageBuilder extends CanvasBuilder {\n  /**\n   * @param {number} tolerance Tolerance.\n   * @param {import(\"../../extent.js\").Extent} maxExtent Maximum extent.\n   * @param {number} resolution Resolution.\n   * @param {number} pixelRatio Pixel ratio.\n   */\n  constructor(tolerance, maxExtent, resolution, pixelRatio) {\n    super(tolerance, maxExtent, resolution, pixelRatio);\n\n    /**\n     * @private\n     * @type {import('../../DataTile.js').ImageLike}\n     */\n    this.hitDetectionImage_ = null;\n\n    /**\n     * @private\n     * @type {import('../../DataTile.js').ImageLike}\n     */\n    this.image_ = null;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.imagePixelRatio_ = undefined;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.anchorX_ = undefined;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.anchorY_ = undefined;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.height_ = undefined;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.opacity_ = undefined;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.originX_ = undefined;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.originY_ = undefined;\n\n    /**\n     * @private\n     * @type {boolean|undefined}\n     */\n    this.rotateWithView_ = undefined;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.rotation_ = undefined;\n\n    /**\n     * @private\n     * @type {import(\"../../size.js\").Size|undefined}\n     */\n    this.scale_ = undefined;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.width_ = undefined;\n\n    /**\n     * @private\n     * @type {import('../../style/Style.js').DeclutterMode}\n     */\n    this.declutterMode_ = undefined;\n\n    /**\n     * Data shared with a text builder for combined decluttering.\n     * @private\n     * @type {import(\"../canvas.js\").DeclutterImageWithText}\n     */\n    this.declutterImageWithText_ = undefined;\n  }\n\n  /**\n   * @param {import(\"../../geom/Point.js\").default|import(\"../Feature.js\").default} pointGeometry Point geometry.\n   * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n   * @param {number} [index] Render order index.\n   * @override\n   */\n  drawPoint(pointGeometry, feature, index) {\n    if (\n      !this.image_ ||\n      (this.maxExtent &&\n        !containsCoordinate(this.maxExtent, pointGeometry.getFlatCoordinates()))\n    ) {\n      return;\n    }\n    this.beginGeometry(pointGeometry, feature, index);\n    const flatCoordinates = pointGeometry.getFlatCoordinates();\n    const stride = pointGeometry.getStride();\n    const myBegin = this.coordinates.length;\n    const myEnd = this.appendFlatPointCoordinates(flatCoordinates, stride);\n    this.instructions.push([\n      CanvasInstruction.DRAW_IMAGE,\n      myBegin,\n      myEnd,\n      this.image_,\n      // Remaining arguments to DRAW_IMAGE are in alphabetical order\n      this.anchorX_ * this.imagePixelRatio_,\n      this.anchorY_ * this.imagePixelRatio_,\n      Math.ceil(this.height_ * this.imagePixelRatio_),\n      this.opacity_,\n      this.originX_ * this.imagePixelRatio_,\n      this.originY_ * this.imagePixelRatio_,\n      this.rotateWithView_,\n      this.rotation_,\n      [\n        (this.scale_[0] * this.pixelRatio) / this.imagePixelRatio_,\n        (this.scale_[1] * this.pixelRatio) / this.imagePixelRatio_,\n      ],\n      Math.ceil(this.width_ * this.imagePixelRatio_),\n      this.declutterMode_,\n      this.declutterImageWithText_,\n    ]);\n    this.hitDetectionInstructions.push([\n      CanvasInstruction.DRAW_IMAGE,\n      myBegin,\n      myEnd,\n      this.hitDetectionImage_,\n      // Remaining arguments to DRAW_IMAGE are in alphabetical order\n      this.anchorX_,\n      this.anchorY_,\n      this.height_,\n      1,\n      this.originX_,\n      this.originY_,\n      this.rotateWithView_,\n      this.rotation_,\n      this.scale_,\n      this.width_,\n      this.declutterMode_,\n      this.declutterImageWithText_,\n    ]);\n    this.endGeometry(feature);\n  }\n\n  /**\n   * @param {import(\"../../geom/MultiPoint.js\").default|import(\"../Feature.js\").default} multiPointGeometry MultiPoint geometry.\n   * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n   * @param {number} [index] Render order index.\n   * @override\n   */\n  drawMultiPoint(multiPointGeometry, feature, index) {\n    if (!this.image_) {\n      return;\n    }\n    this.beginGeometry(multiPointGeometry, feature, index);\n    const flatCoordinates = multiPointGeometry.getFlatCoordinates();\n    const filteredFlatCoordinates = [];\n    for (\n      let i = 0, ii = flatCoordinates.length;\n      i < ii;\n      i += multiPointGeometry.getStride()\n    ) {\n      if (\n        !this.maxExtent ||\n        containsCoordinate(this.maxExtent, flatCoordinates.slice(i, i + 2))\n      ) {\n        filteredFlatCoordinates.push(\n          flatCoordinates[i],\n          flatCoordinates[i + 1],\n        );\n      }\n    }\n    const myBegin = this.coordinates.length;\n    const myEnd = this.appendFlatPointCoordinates(filteredFlatCoordinates, 2);\n    this.instructions.push([\n      CanvasInstruction.DRAW_IMAGE,\n      myBegin,\n      myEnd,\n      this.image_,\n      // Remaining arguments to DRAW_IMAGE are in alphabetical order\n      this.anchorX_ * this.imagePixelRatio_,\n      this.anchorY_ * this.imagePixelRatio_,\n      Math.ceil(this.height_ * this.imagePixelRatio_),\n      this.opacity_,\n      this.originX_ * this.imagePixelRatio_,\n      this.originY_ * this.imagePixelRatio_,\n      this.rotateWithView_,\n      this.rotation_,\n      [\n        (this.scale_[0] * this.pixelRatio) / this.imagePixelRatio_,\n        (this.scale_[1] * this.pixelRatio) / this.imagePixelRatio_,\n      ],\n      Math.ceil(this.width_ * this.imagePixelRatio_),\n      this.declutterMode_,\n      this.declutterImageWithText_,\n    ]);\n    this.hitDetectionInstructions.push([\n      CanvasInstruction.DRAW_IMAGE,\n      myBegin,\n      myEnd,\n      this.hitDetectionImage_,\n      // Remaining arguments to DRAW_IMAGE are in alphabetical order\n      this.anchorX_,\n      this.anchorY_,\n      this.height_,\n      1,\n      this.originX_,\n      this.originY_,\n      this.rotateWithView_,\n      this.rotation_,\n      this.scale_,\n      this.width_,\n      this.declutterMode_,\n      this.declutterImageWithText_,\n    ]);\n    this.endGeometry(feature);\n  }\n\n  /**\n   * @return {import(\"../canvas.js\").SerializableInstructions} the serializable instructions.\n   * @override\n   */\n  finish() {\n    this.reverseHitDetectionInstructions();\n    // FIXME this doesn't really protect us against further calls to draw*Geometry\n    this.anchorX_ = undefined;\n    this.anchorY_ = undefined;\n    this.hitDetectionImage_ = null;\n    this.image_ = null;\n    this.imagePixelRatio_ = undefined;\n    this.height_ = undefined;\n    this.scale_ = undefined;\n    this.opacity_ = undefined;\n    this.originX_ = undefined;\n    this.originY_ = undefined;\n    this.rotateWithView_ = undefined;\n    this.rotation_ = undefined;\n    this.width_ = undefined;\n    return super.finish();\n  }\n\n  /**\n   * @param {import(\"../../style/Image.js\").default} imageStyle Image style.\n   * @param {Object} [sharedData] Shared data.\n   * @override\n   */\n  setImageStyle(imageStyle, sharedData) {\n    const anchor = imageStyle.getAnchor();\n    const size = imageStyle.getSize();\n    const origin = imageStyle.getOrigin();\n    this.imagePixelRatio_ = imageStyle.getPixelRatio(this.pixelRatio);\n    this.anchorX_ = anchor[0];\n    this.anchorY_ = anchor[1];\n    this.hitDetectionImage_ = imageStyle.getHitDetectionImage();\n    this.image_ = imageStyle.getImage(this.pixelRatio);\n    this.height_ = size[1];\n    this.opacity_ = imageStyle.getOpacity();\n    this.originX_ = origin[0];\n    this.originY_ = origin[1];\n    this.rotateWithView_ = imageStyle.getRotateWithView();\n    this.rotation_ = imageStyle.getRotation();\n    this.scale_ = imageStyle.getScaleArray();\n    this.width_ = size[0];\n    this.declutterMode_ = imageStyle.getDeclutterMode();\n    this.declutterImageWithText_ = sharedData;\n  }\n}\n\nexport default CanvasImageBuilder;\n", "/**\n * @module ol/render/canvas/LineStringBuilder\n */\nimport {\n  defaultLineDash,\n  defaultLineDashOffset,\n  defaultStrokeStyle,\n} from '../canvas.js';\nimport CanvasBuilder from './Builder.js';\nimport CanvasInstruction, {\n  beginPathInstruction,\n  strokeInstruction,\n} from './Instruction.js';\n\nclass CanvasLineStringBuilder extends CanvasBuilder {\n  /**\n   * @param {number} tolerance Tolerance.\n   * @param {import(\"../../extent.js\").Extent} maxExtent Maximum extent.\n   * @param {number} resolution Resolution.\n   * @param {number} pixelRatio Pixel ratio.\n   */\n  constructor(tolerance, maxExtent, resolution, pixelRatio) {\n    super(tolerance, maxExtent, resolution, pixelRatio);\n  }\n\n  /**\n   * @param {Array<number>} flatCoordinates Flat coordinates.\n   * @param {number} offset Offset.\n   * @param {number} end End.\n   * @param {number} stride Stride.\n   * @param {number} [strokeOffset] Stroke Offset in pixels.\n   * @private\n   * @return {number} end.\n   */\n  drawFlatCoordinates_(flatCoordinates, offset, end, stride, strokeOffset) {\n    const myBegin = this.coordinates.length;\n    const myEnd = this.appendFlatLineCoordinates(\n      flatCoordinates,\n      offset,\n      end,\n      stride,\n      false,\n      false,\n    );\n    this.instructions.push([\n      CanvasInstruction.MOVE_TO_LINE_TO,\n      myBegin,\n      myEnd,\n      strokeOffset * this.pixelRatio,\n    ]);\n    this.hitDetectionInstructions.push([\n      CanvasInstruction.MOVE_TO_LINE_TO,\n      myBegin,\n      myEnd,\n      strokeOffset,\n    ]);\n    return end;\n  }\n\n  /**\n   * @param {import(\"../../geom/LineString.js\").default|import(\"../Feature.js\").default} lineStringGeometry Line string geometry.\n   * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n   * @param {number} [index] Render order index.\n   * @override\n   */\n  drawLineString(lineStringGeometry, feature, index) {\n    const state = this.state;\n    const strokeStyle = state.strokeStyle;\n    const lineWidth = state.lineWidth;\n    const strokeOffset = state.strokeOffset;\n    if (strokeStyle === undefined || lineWidth === undefined) {\n      return;\n    }\n    this.updateStrokeStyle(state, this.applyStroke);\n    this.beginGeometry(lineStringGeometry, feature, index);\n    this.hitDetectionInstructions.push(\n      [\n        CanvasInstruction.SET_STROKE_STYLE,\n        defaultStrokeStyle,\n        state.lineWidth,\n        state.lineCap,\n        state.lineJoin,\n        state.miterLimit,\n        defaultLineDash,\n        defaultLineDashOffset,\n      ],\n      beginPathInstruction,\n    );\n    const flatCoordinates = lineStringGeometry.getFlatCoordinates();\n    const stride = lineStringGeometry.getStride();\n    this.drawFlatCoordinates_(\n      flatCoordinates,\n      0,\n      flatCoordinates.length,\n      stride,\n      strokeOffset,\n    );\n    this.hitDetectionInstructions.push(strokeInstruction);\n    this.endGeometry(feature);\n  }\n\n  /**\n   * @param {import(\"../../geom/MultiLineString.js\").default|import(\"../Feature.js\").default} multiLineStringGeometry MultiLineString geometry.\n   * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n   * @param {number} [index] Render order index.\n   * @override\n   */\n  drawMultiLineString(multiLineStringGeometry, feature, index) {\n    const state = this.state;\n    const strokeStyle = state.strokeStyle;\n    const lineWidth = state.lineWidth;\n    const strokeOffset = state.strokeOffset;\n    if (strokeStyle === undefined || lineWidth === undefined) {\n      return;\n    }\n    this.updateStrokeStyle(state, this.applyStroke);\n    this.beginGeometry(multiLineStringGeometry, feature, index);\n    this.hitDetectionInstructions.push(\n      [\n        CanvasInstruction.SET_STROKE_STYLE,\n        defaultStrokeStyle,\n        state.lineWidth,\n        state.lineCap,\n        state.lineJoin,\n        state.miterLimit,\n        defaultLineDash,\n        defaultLineDashOffset,\n      ],\n      beginPathInstruction,\n    );\n    const ends = multiLineStringGeometry.getEnds();\n    const flatCoordinates = multiLineStringGeometry.getFlatCoordinates();\n    const stride = multiLineStringGeometry.getStride();\n    let offset = 0;\n    for (let i = 0, ii = ends.length; i < ii; ++i) {\n      offset = this.drawFlatCoordinates_(\n        flatCoordinates,\n        offset,\n        /** @type {number} */ (ends[i]),\n        stride,\n        strokeOffset,\n      );\n    }\n    this.hitDetectionInstructions.push(strokeInstruction);\n    this.endGeometry(feature);\n  }\n\n  /**\n   * @return {import(\"../canvas.js\").SerializableInstructions} the serializable instructions.\n   * @override\n   */\n  finish() {\n    const state = this.state;\n    if (\n      state.lastStroke != undefined &&\n      state.lastStroke != this.coordinates.length\n    ) {\n      this.instructions.push(strokeInstruction);\n    }\n    this.reverseHitDetectionInstructions();\n    this.state = null;\n    return super.finish();\n  }\n\n  /**\n   * @param {import(\"../canvas.js\").FillStrokeState} state State.\n   * @override\n   */\n  applyStroke(state) {\n    if (\n      state.lastStroke != undefined &&\n      state.lastStroke != this.coordinates.length\n    ) {\n      this.instructions.push(strokeInstruction);\n      state.lastStroke = this.coordinates.length;\n    }\n    state.lastStroke = 0;\n    super.applyStroke(state);\n    this.instructions.push(beginPathInstruction);\n  }\n}\n\nexport default CanvasLineStringBuilder;\n", "/**\n * @module ol/render/canvas/PolygonBuilder\n */\nimport {snap} from '../../geom/flat/simplify.js';\nimport {\n  defaultFillStyle,\n  defaultLineDash,\n  defaultLineDashOffset,\n  defaultStrokeStyle,\n} from '../canvas.js';\nimport CanvasBuilder from './Builder.js';\nimport CanvasInstruction, {\n  beginPathInstruction,\n  closePathInstruction,\n  fillInstruction,\n  strokeInstruction,\n} from './Instruction.js';\n\nclass CanvasPolygonBuilder extends CanvasBuilder {\n  /**\n   * @param {number} tolerance Tolerance.\n   * @param {import(\"../../extent.js\").Extent} maxExtent Maximum extent.\n   * @param {number} resolution Resolution.\n   * @param {number} pixelRatio Pixel ratio.\n   */\n  constructor(tolerance, maxExtent, resolution, pixelRatio) {\n    super(tolerance, maxExtent, resolution, pixelRatio);\n  }\n\n  /**\n   * @param {Array<number>} flatCoordinates Flat coordinates.\n   * @param {number} offset Offset.\n   * @param {Array<number>} ends Ends.\n   * @param {number} stride Stride.\n   * @param {number} [strokeOffset] Stroke Offset in pixels.\n   * @private\n   * @return {number} End.\n   */\n  drawFlatCoordinatess_(flatCoordinates, offset, ends, stride, strokeOffset) {\n    const state = this.state;\n    const fill = state.fillStyle !== undefined;\n    const stroke = state.strokeStyle !== undefined;\n    const numEnds = ends.length;\n    this.instructions.push(beginPathInstruction);\n    this.hitDetectionInstructions.push(beginPathInstruction);\n    for (let i = 0; i < numEnds; ++i) {\n      const end = ends[i];\n      const myBegin = this.coordinates.length;\n      const myEnd = this.appendFlatLineCoordinates(\n        flatCoordinates,\n        offset,\n        end,\n        stride,\n        true,\n        !stroke,\n      );\n      this.instructions.push([\n        CanvasInstruction.MOVE_TO_LINE_TO,\n        myBegin,\n        myEnd,\n        strokeOffset * this.pixelRatio,\n        true,\n      ]);\n      this.hitDetectionInstructions.push([\n        CanvasInstruction.MOVE_TO_LINE_TO,\n        myBegin,\n        myEnd,\n        strokeOffset,\n        true,\n      ]);\n      if (stroke) {\n        // Performance optimization: only call closePath() when we have a stroke.\n        // Otherwise the ring is closed already (see appendFlatLineCoordinates above).\n        this.instructions.push(closePathInstruction);\n        this.hitDetectionInstructions.push(closePathInstruction);\n      }\n      offset = end;\n    }\n    if (fill) {\n      this.instructions.push(fillInstruction);\n      this.hitDetectionInstructions.push(fillInstruction);\n    }\n    if (stroke) {\n      this.instructions.push(strokeInstruction);\n      this.hitDetectionInstructions.push(strokeInstruction);\n    }\n    return offset;\n  }\n\n  /**\n   * @param {import(\"../../geom/Circle.js\").default} circleGeometry Circle geometry.\n   * @param {import(\"../../Feature.js\").default} feature Feature.\n   * @param {number} [index] Render order index.\n   * @override\n   */\n  drawCircle(circleGeometry, feature, index) {\n    const state = this.state;\n    const fillStyle = state.fillStyle;\n    const strokeStyle = state.strokeStyle;\n    const strokeOffset = state.strokeOffset;\n    if (fillStyle === undefined && strokeStyle === undefined) {\n      return;\n    }\n\n    if (\n      this.handleStrokeOffset_(() =>\n        this.drawCircle(circleGeometry, feature, index),\n      )\n    ) {\n      return;\n    }\n    this.setFillStrokeStyles_();\n    this.beginGeometry(circleGeometry, feature, index);\n    if (state.fillStyle !== undefined) {\n      this.hitDetectionInstructions.push([\n        CanvasInstruction.SET_FILL_STYLE,\n        defaultFillStyle,\n      ]);\n    }\n    if (state.strokeStyle !== undefined) {\n      this.hitDetectionInstructions.push([\n        CanvasInstruction.SET_STROKE_STYLE,\n        defaultStrokeStyle,\n        state.lineWidth,\n        state.lineCap,\n        state.lineJoin,\n        state.miterLimit,\n        defaultLineDash,\n        defaultLineDashOffset,\n      ]);\n    }\n    const flatCoordinates = circleGeometry.getFlatCoordinates();\n    const stride = circleGeometry.getStride();\n    const myBegin = this.coordinates.length;\n    this.appendFlatLineCoordinates(\n      flatCoordinates,\n      0,\n      flatCoordinates.length,\n      stride,\n      false,\n      false,\n    );\n    const circleInstruction = [CanvasInstruction.CIRCLE, myBegin, strokeOffset];\n    this.instructions.push(beginPathInstruction, circleInstruction);\n    this.hitDetectionInstructions.push(beginPathInstruction, circleInstruction);\n    if (state.fillStyle !== undefined) {\n      this.instructions.push(fillInstruction);\n      this.hitDetectionInstructions.push(fillInstruction);\n    }\n    if (state.strokeStyle !== undefined) {\n      this.instructions.push(strokeInstruction);\n      this.hitDetectionInstructions.push(strokeInstruction);\n    }\n    this.endGeometry(feature);\n  }\n\n  /**\n   * @param {import(\"../../geom/Polygon.js\").default|import(\"../Feature.js\").default} polygonGeometry Polygon geometry.\n   * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n   * @param {number} [index] Render order index.\n   * @override\n   */\n  drawPolygon(polygonGeometry, feature, index) {\n    const state = this.state;\n    const fillStyle = state.fillStyle;\n    const strokeStyle = state.strokeStyle;\n    const strokeOffset = state.strokeOffset;\n    if (fillStyle === undefined && strokeStyle === undefined) {\n      return;\n    }\n    if (\n      this.handleStrokeOffset_(() =>\n        this.drawPolygon(polygonGeometry, feature, index),\n      )\n    ) {\n      return;\n    }\n\n    this.setFillStrokeStyles_();\n    this.beginGeometry(polygonGeometry, feature, index);\n    if (state.fillStyle !== undefined) {\n      this.hitDetectionInstructions.push([\n        CanvasInstruction.SET_FILL_STYLE,\n        defaultFillStyle,\n      ]);\n    }\n    if (state.strokeStyle !== undefined) {\n      this.hitDetectionInstructions.push([\n        CanvasInstruction.SET_STROKE_STYLE,\n        defaultStrokeStyle,\n        state.lineWidth,\n        state.lineCap,\n        state.lineJoin,\n        state.miterLimit,\n        defaultLineDash,\n        defaultLineDashOffset,\n      ]);\n    }\n    const ends = polygonGeometry.getEnds();\n    const flatCoordinates = polygonGeometry.getOrientedFlatCoordinates();\n    const stride = polygonGeometry.getStride();\n    this.drawFlatCoordinatess_(\n      flatCoordinates,\n      0,\n      /** @type {Array<number>} */ (ends),\n      stride,\n      strokeOffset,\n    );\n    this.endGeometry(feature);\n  }\n\n  /**\n   * @param {import(\"../../geom/MultiPolygon.js\").default} multiPolygonGeometry MultiPolygon geometry.\n   * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n   * @param {number} [index] Render order index.\n   * @override\n   */\n  drawMultiPolygon(multiPolygonGeometry, feature, index) {\n    const state = this.state;\n    const fillStyle = state.fillStyle;\n    const strokeStyle = state.strokeStyle;\n    const strokeOffset = state.strokeOffset;\n    if (fillStyle === undefined && strokeStyle === undefined) {\n      return;\n    }\n    if (\n      this.handleStrokeOffset_(() =>\n        this.drawMultiPolygon(multiPolygonGeometry, feature, index),\n      )\n    ) {\n      return;\n    }\n    this.setFillStrokeStyles_();\n    this.beginGeometry(multiPolygonGeometry, feature, index);\n    if (state.fillStyle !== undefined) {\n      this.hitDetectionInstructions.push([\n        CanvasInstruction.SET_FILL_STYLE,\n        defaultFillStyle,\n      ]);\n    }\n    if (state.strokeStyle !== undefined) {\n      this.hitDetectionInstructions.push([\n        CanvasInstruction.SET_STROKE_STYLE,\n        defaultStrokeStyle,\n        state.lineWidth,\n        state.lineCap,\n        state.lineJoin,\n        state.miterLimit,\n        defaultLineDash,\n        defaultLineDashOffset,\n      ]);\n    }\n    const endss = multiPolygonGeometry.getEndss();\n    const flatCoordinates = multiPolygonGeometry.getOrientedFlatCoordinates();\n    const stride = multiPolygonGeometry.getStride();\n    let offset = 0;\n    for (let i = 0, ii = endss.length; i < ii; ++i) {\n      offset = this.drawFlatCoordinatess_(\n        flatCoordinates,\n        offset,\n        endss[i],\n        stride,\n        strokeOffset,\n      );\n    }\n    this.endGeometry(feature);\n  }\n\n  /**\n   * @return {import(\"../canvas.js\").SerializableInstructions} the serializable instructions.\n   * @override\n   */\n  finish() {\n    this.reverseHitDetectionInstructions();\n    this.state = null;\n    // We want to preserve topology when drawing polygons.  Polygons are\n    // simplified using quantization and point elimination. However, we might\n    // have received a mix of quantized and non-quantized geometries, so ensure\n    // that all are quantized by quantizing all coordinates in the batch.\n    const tolerance = this.tolerance;\n    if (tolerance !== 0) {\n      const coordinates = this.coordinates;\n      for (let i = 0, ii = coordinates.length; i < ii; ++i) {\n        coordinates[i] = snap(coordinates[i], tolerance);\n      }\n    }\n    return super.finish();\n  }\n\n  /**\n   * @private\n   */\n  setFillStrokeStyles_() {\n    const state = this.state;\n    this.updateFillStyle(state, this.createFill);\n    this.updateStrokeStyle(state, this.applyStroke);\n  }\n\n  handleStrokeOffset_(drawGeometryCallback) {\n    const state = this.state;\n    const fillStyle = state.fillStyle;\n    const strokeStyle = state.strokeStyle;\n    const strokeOffset = state.strokeOffset;\n\n    // In case both fill style and stroke style are defined and the stroke style has an offset,\n    // the stroke and fill should be done in separate steps, because offset stroke shape will\n    // be different from the original shape used for the fill.\n    if (\n      Math.abs(strokeOffset) > 0 &&\n      fillStyle !== undefined &&\n      strokeStyle !== undefined\n    ) {\n      // First do only fill\n      state.strokeStyle = undefined;\n      state.strokeOffset = 0;\n      drawGeometryCallback();\n      // Now separately do the stroke\n      state.fillStyle = undefined;\n      state.strokeStyle = strokeStyle;\n      state.strokeOffset = strokeOffset;\n      drawGeometryCallback();\n      // Reset the state to the original\n      state.fillStyle = fillStyle;\n      return true;\n    }\n    return false;\n  }\n}\n\nexport default CanvasPolygonBuilder;\n", "/**\n * @module ol/geom/flat/clip\n */\n\n/**\n * Start parameter of the portion of the last clipped segment that is inside the\n * extent. Set by {@link clipSegment}, read right after a `true` return to avoid\n * allocating a result array per segment.\n * @type {number}\n */\nlet clipSegmentStart = 0;\n\n/**\n * End parameter of the portion of the last clipped segment that is inside the\n * extent. See {@link clipSegmentStart}.\n * @type {number}\n */\nlet clipSegmentEnd = 1;\n\n/**\n * Clip a segment to a rectangular extent. On a `true` return, the inside\n * portion is `[clipSegmentStart, clipSegmentEnd]` in segment parameters. No\n * allocations are made, so the result globals must be read before the next\n * call.\n * @param {number} minX Minimum X.\n * @param {number} minY Minimum Y.\n * @param {number} maxX Maximum X.\n * @param {number} maxY Maximum Y.\n * @param {number} x0 Segment start X.\n * @param {number} y0 Segment start Y.\n * @param {number} x1 Segment end X.\n * @param {number} y1 Segment end Y.\n * @return {boolean} The segment intersects the extent.\n */\nfunction clipSegment(minX, minY, maxX, maxY, x0, y0, x1, y1) {\n  const dx = x1 - x0;\n  const dy = y1 - y0;\n  let t0 = 0;\n  let t1 = 1;\n\n  // X slab.\n  if (dx === 0) {\n    if (x0 < minX || x0 > maxX) {\n      return false;\n    }\n  } else {\n    let ta = (minX - x0) / dx;\n    let tb = (maxX - x0) / dx;\n    if (ta > tb) {\n      const tmp = ta;\n      ta = tb;\n      tb = tmp;\n    }\n    if (ta > t0) {\n      t0 = ta;\n    }\n    if (tb < t1) {\n      t1 = tb;\n    }\n    if (t0 > t1) {\n      return false;\n    }\n  }\n\n  // Y slab.\n  if (dy === 0) {\n    if (y0 < minY || y0 > maxY) {\n      return false;\n    }\n  } else {\n    let ta = (minY - y0) / dy;\n    let tb = (maxY - y0) / dy;\n    if (ta > tb) {\n      const tmp = ta;\n      ta = tb;\n      tb = tmp;\n    }\n    if (ta > t0) {\n      t0 = ta;\n    }\n    if (tb < t1) {\n      t1 = tb;\n    }\n    if (t0 > t1) {\n      return false;\n    }\n  }\n\n  clipSegmentStart = t0;\n  clipSegmentEnd = t1;\n  return true;\n}\n\n/**\n * Clip flat line strings to the given extent. Parts outside the extent are\n * dropped and a vertex is inserted where a segment crosses the boundary. A line\n * that leaves and re-enters the extent is split into separate parts so that\n * positions derived from the result (e.g. labels placed along the line) stay\n * within the extent. Output coordinates have a stride of 2.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent to clip to.\n * @return {{flatCoordinates: Array<number>, ends: Array<number>}} Clipped flat\n *     coordinates and ends.\n */\nexport function clipFlatLineStrings(flatCoordinates, ends, stride, extent) {\n  const minX = extent[0];\n  const minY = extent[1];\n  const maxX = extent[2];\n  const maxY = extent[3];\n  const dest = [];\n  const destEnds = [];\n  let open = false;\n  let lastX, lastY;\n  let offset = 0;\n  for (let e = 0, ee = ends.length; e < ee; ++e) {\n    const end = ends[e];\n    let prevX = flatCoordinates[offset];\n    let prevY = flatCoordinates[offset + 1];\n    let lineHasLast = false;\n    for (let i = offset + stride; i < end; i += stride) {\n      const curX = flatCoordinates[i];\n      const curY = flatCoordinates[i + 1];\n      if (clipSegment(minX, minY, maxX, maxY, prevX, prevY, curX, curY)) {\n        const dx = curX - prevX;\n        const dy = curY - prevY;\n        const ax = prevX + clipSegmentStart * dx;\n        const ay = prevY + clipSegmentStart * dy;\n        const bx = prevX + clipSegmentEnd * dx;\n        const by = prevY + clipSegmentEnd * dy;\n        if (open && lineHasLast && ax === lastX && ay === lastY) {\n          dest.push(bx, by);\n        } else {\n          if (open) {\n            destEnds.push(dest.length);\n          }\n          dest.push(ax, ay, bx, by);\n          open = true;\n        }\n        lastX = bx;\n        lastY = by;\n        lineHasLast = true;\n      }\n      prevX = curX;\n      prevY = curY;\n    }\n    offset = end;\n  }\n  if (open) {\n    destEnds.push(dest.length);\n  }\n  return {flatCoordinates: dest, ends: destEnds};\n}\n", "import {lerp} from '../../math.js';\n\n/**\n * Creates chunks of equal length from a linestring\n * @param {number} chunkLength Length of each chunk.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Start offset of the `flatCoordinates`.\n * @param {number} end End offset of the `flatCoordinates`.\n * @param {number} stride Stride.\n * @return {Array<Array<number>>} Chunks of linestrings with stride 2.\n */\nexport function lineChunk(chunkLength, flatCoordinates, offset, end, stride) {\n  const chunks = [];\n  let cursor = offset;\n  let chunkM = 0;\n  let currentChunk = flatCoordinates.slice(offset, 2);\n  while (chunkM < chunkLength && cursor + stride < end) {\n    const [x1, y1] = currentChunk.slice(-2);\n    const x2 = flatCoordinates[cursor + stride];\n    const y2 = flatCoordinates[cursor + stride + 1];\n    const segmentLength = Math.sqrt(\n      (x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1),\n    );\n    chunkM += segmentLength;\n    if (chunkM >= chunkLength) {\n      const m = (chunkLength - chunkM + segmentLength) / segmentLength;\n      const x = lerp(x1, x2, m);\n      const y = lerp(y1, y2, m);\n      currentChunk.push(x, y);\n      chunks.push(currentChunk);\n      currentChunk = [x, y];\n      if (chunkM == chunkLength) {\n        cursor += stride;\n      }\n      chunkM = 0;\n    } else if (chunkM < chunkLength) {\n      currentChunk.push(\n        flatCoordinates[cursor + stride],\n        flatCoordinates[cursor + stride + 1],\n      );\n      cursor += stride;\n    } else {\n      const missing = segmentLength - chunkM;\n      const x = lerp(x1, x2, missing / segmentLength);\n      const y = lerp(y1, y2, missing / segmentLength);\n      currentChunk.push(x, y);\n      chunks.push(currentChunk);\n      currentChunk = [x, y];\n      chunkM = 0;\n      cursor += stride;\n    }\n  }\n  if (chunkM > 0) {\n    chunks.push(currentChunk);\n  }\n  return chunks;\n}\n", "/**\n * @module ol/geom/flat/straightchunk\n */\n\n/**\n * @param {number} maxAngle Maximum acceptable angle delta between segments.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {Array<number>} Start and end of the first suitable chunk of the\n * given `flatCoordinates`.\n */\nexport function matchingChunk(maxAngle, flatCoordinates, offset, end, stride) {\n  let chunkStart = offset;\n  let chunkEnd = offset;\n  let chunkM = 0;\n  let m = 0;\n  let start = offset;\n  let acos, i, m12, m23, x1, y1, x12, y12, x23, y23;\n  for (i = offset; i < end; i += stride) {\n    const x2 = flatCoordinates[i];\n    const y2 = flatCoordinates[i + 1];\n    if (x1 !== undefined) {\n      x23 = x2 - x1;\n      y23 = y2 - y1;\n      m23 = Math.sqrt(x23 * x23 + y23 * y23);\n      if (x12 !== undefined) {\n        m += m12;\n        acos = Math.acos((x12 * x23 + y12 * y23) / (m12 * m23));\n        if (acos > maxAngle) {\n          if (m > chunkM) {\n            chunkM = m;\n            chunkStart = start;\n            chunkEnd = i;\n          }\n          m = 0;\n          start = i - stride;\n        }\n      }\n      m12 = m23;\n      x12 = x23;\n      y12 = y23;\n    }\n    x1 = x2;\n    y1 = y2;\n  }\n  m += m23;\n  return m > chunkM ? [start, i] : [chunkStart, chunkEnd];\n}\n", "/**\n * @module ol/render/canvas/TextBuilder\n */\nimport {asColorLike} from '../../colorlike.js';\nimport {containsExtent, intersects} from '../../extent.js';\nimport {clipFlatLineStrings} from '../../geom/flat/clip.js';\nimport {lineChunk} from '../../geom/flat/linechunk.js';\nimport {matchingChunk} from '../../geom/flat/straightchunk.js';\nimport {getUid} from '../../util.js';\nimport {\n  defaultFillStyle,\n  defaultFont,\n  defaultLineCap,\n  defaultLineDash,\n  defaultLineDashOffset,\n  defaultLineJoin,\n  defaultLineWidth,\n  defaultMiterLimit,\n  defaultPadding,\n  defaultStrokeStyle,\n  defaultTextAlign,\n  defaultTextBaseline,\n  registerFont,\n} from '../canvas.js';\nimport CanvasBuilder from './Builder.js';\nimport CanvasInstruction from './Instruction.js';\n/**\n * @const\n * @type {{left: 0, center: 0.5, right: 1, top: 0, middle: 0.5, hanging: 0.2, alphabetic: 0.8, ideographic: 0.8, bottom: 1}}\n */\nexport const TEXT_ALIGN = {\n  'left': 0,\n  'center': 0.5,\n  'right': 1,\n  'top': 0,\n  'middle': 0.5,\n  'hanging': 0.2,\n  'alphabetic': 0.8,\n  'ideographic': 0.8,\n  'bottom': 1,\n};\n\nclass CanvasTextBuilder extends CanvasBuilder {\n  /**\n   * @param {number} tolerance Tolerance.\n   * @param {import(\"../../extent.js\").Extent} maxExtent Maximum extent.\n   * @param {number} resolution Resolution.\n   * @param {number} pixelRatio Pixel ratio.\n   */\n  constructor(tolerance, maxExtent, resolution, pixelRatio) {\n    super(tolerance, maxExtent, resolution, pixelRatio);\n\n    /**\n     * @private\n     * @type {Array<HTMLCanvasElement>}\n     */\n    this.labels_ = null;\n\n    /**\n     * @private\n     * @type {string|Array<string>}\n     */\n    this.text_ = '';\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.textOffsetX_ = 0;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.textOffsetY_ = 0;\n\n    /**\n     * @private\n     * @type {boolean|undefined}\n     */\n    this.textRotateWithView_ = undefined;\n\n    /**\n     * @private\n     * @type {boolean|undefined}\n     */\n    this.textKeepUpright_ = undefined;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.textRotation_ = 0;\n\n    /**\n     * @private\n     * @type {?import(\"../canvas.js\").FillState}\n     */\n    this.textFillState_ = null;\n\n    /**\n     * @type {!Object<string, import(\"../canvas.js\").FillState>}\n     */\n    this.fillStates = {};\n    this.fillStates[defaultFillStyle] = {fillStyle: defaultFillStyle};\n\n    /**\n     * @private\n     * @type {?import(\"../canvas.js\").StrokeState}\n     */\n    this.textStrokeState_ = null;\n\n    /**\n     * @type {!Object<string, import(\"../canvas.js\").StrokeState>}\n     */\n    this.strokeStates = {};\n\n    /**\n     * @private\n     * @type {import(\"../canvas.js\").TextState}\n     */\n    this.textState_ = /** @type {import(\"../canvas.js\").TextState} */ ({});\n\n    /**\n     * @type {!Object<string, import(\"../canvas.js\").TextState>}\n     */\n    this.textStates = {};\n\n    /**\n     * @private\n     * @type {string}\n     */\n    this.textKey_ = '';\n\n    /**\n     * @private\n     * @type {string}\n     */\n    this.fillKey_ = '';\n\n    /**\n     * @private\n     * @type {string}\n     */\n    this.strokeKey_ = '';\n\n    /**\n     * @private\n     * @type {import('../../style/Style.js').DeclutterMode}\n     */\n    this.declutterMode_ = undefined;\n\n    /**\n     * Data shared with an image builder for combined decluttering.\n     * @private\n     * @type {import(\"../canvas.js\").DeclutterImageWithText}\n     */\n    this.declutterImageWithText_ = undefined;\n  }\n\n  /**\n   * @return {import(\"../canvas.js\").SerializableInstructions} the serializable instructions.\n   * @override\n   */\n  finish() {\n    const instructions = super.finish();\n    instructions.textStates = this.textStates;\n    instructions.fillStates = this.fillStates;\n    instructions.strokeStates = this.strokeStates;\n    return instructions;\n  }\n\n  /**\n   * @param {import(\"../../geom/SimpleGeometry.js\").default|import(\"../Feature.js\").default} geometry Geometry.\n   * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n   * @param {number} [index] Render order index.\n   * @override\n   */\n  drawText(geometry, feature, index) {\n    const fillState = this.textFillState_;\n    const strokeState = this.textStrokeState_;\n    const textState = this.textState_;\n    if (this.text_ === '' || !textState || (!fillState && !strokeState)) {\n      return;\n    }\n\n    const coordinates = this.coordinates;\n    let begin = coordinates.length;\n\n    const geometryType = geometry.getType();\n    let flatCoordinates = null;\n    let stride = geometry.getStride();\n\n    if (\n      textState.placement === 'line' &&\n      (geometryType == 'LineString' ||\n        geometryType == 'MultiLineString' ||\n        geometryType == 'Polygon' ||\n        geometryType == 'MultiPolygon')\n    ) {\n      const geometryExtent = geometry.getExtent();\n      if (!intersects(this.maxExtent, geometryExtent)) {\n        return;\n      }\n      let ends;\n      flatCoordinates = geometry.getFlatCoordinates();\n      if (geometryType == 'LineString') {\n        ends = [flatCoordinates.length];\n      } else if (geometryType == 'MultiLineString') {\n        ends = /** @type {import(\"../../geom/MultiLineString.js\").default} */ (\n          geometry\n        ).getEnds();\n      } else if (geometryType == 'Polygon') {\n        ends = /** @type {import(\"../../geom/Polygon.js\").default} */ (geometry)\n          .getEnds()\n          .slice(0, 1);\n      } else if (geometryType == 'MultiPolygon') {\n        const endss =\n          /** @type {import(\"../../geom/MultiPolygon.js\").default} */ (\n            geometry\n          ).getEndss();\n        ends = [];\n        for (let i = 0, ii = endss.length; i < ii; ++i) {\n          ends.push(endss[i][0]);\n        }\n      }\n      if (\n        (geometryType == 'LineString' || geometryType == 'MultiLineString') &&\n        !containsExtent(this.getBufferedMaxExtent(), geometryExtent)\n      ) {\n        // Clip the line to the rendered extent so the label is anchored within\n        // the rendered area instead of along the full geometry, whose center\n        // can lie outside it.\n        const clipped = clipFlatLineStrings(\n          flatCoordinates,\n          ends,\n          stride,\n          this.getBufferedMaxExtent(),\n        );\n        flatCoordinates = clipped.flatCoordinates;\n        ends = clipped.ends;\n        stride = 2;\n        if (ends.length === 0) {\n          return;\n        }\n      }\n      this.beginGeometry(geometry, feature, index);\n      const repeat = textState.repeat;\n      const textAlign = repeat ? undefined : textState.textAlign;\n      // No `justify` support for line placement.\n      let flatOffset = 0;\n      for (let o = 0, oo = ends.length; o < oo; ++o) {\n        let chunks;\n        if (repeat) {\n          chunks = lineChunk(\n            repeat * this.resolution,\n            flatCoordinates,\n            flatOffset,\n            ends[o],\n            stride,\n          );\n        } else {\n          chunks = [flatCoordinates.slice(flatOffset, ends[o])];\n        }\n        for (let c = 0, cc = chunks.length; c < cc; ++c) {\n          const chunk = chunks[c];\n          let chunkBegin = 0;\n          let chunkEnd = chunk.length;\n          if (textAlign == undefined) {\n            const range = matchingChunk(\n              textState.maxAngle,\n              chunk,\n              0,\n              chunk.length,\n              2,\n            );\n            chunkBegin = range[0];\n            chunkEnd = range[1];\n          }\n          for (let i = chunkBegin; i < chunkEnd; i += stride) {\n            coordinates.push(chunk[i], chunk[i + 1]);\n          }\n          const end = coordinates.length;\n          flatOffset = ends[o];\n          this.drawChars_(begin, end);\n          begin = end;\n        }\n      }\n      this.endGeometry(feature);\n    } else {\n      let geometryWidths = textState.overflow ? null : [];\n      switch (geometryType) {\n        case 'Point':\n        case 'MultiPoint':\n          flatCoordinates =\n            /** @type {import(\"../../geom/MultiPoint.js\").default} */ (\n              geometry\n            ).getFlatCoordinates();\n          break;\n        case 'LineString':\n          flatCoordinates =\n            /** @type {import(\"../../geom/LineString.js\").default} */ (\n              geometry\n            ).getFlatMidpoint();\n          break;\n        case 'Circle':\n          flatCoordinates =\n            /** @type {import(\"../../geom/Circle.js\").default} */ (\n              geometry\n            ).getCenter();\n          break;\n        case 'MultiLineString':\n          flatCoordinates =\n            /** @type {import(\"../../geom/MultiLineString.js\").default} */ (\n              geometry\n            ).getFlatMidpoints();\n          stride = 2;\n          break;\n        case 'Polygon':\n          flatCoordinates =\n            /** @type {import(\"../../geom/Polygon.js\").default} */ (\n              geometry\n            ).getFlatInteriorPoint();\n          if (!textState.overflow) {\n            geometryWidths.push(flatCoordinates[2] / this.resolution);\n          }\n          stride = 3;\n          break;\n        case 'MultiPolygon':\n          const interiorPoints =\n            /** @type {import(\"../../geom/MultiPolygon.js\").default} */ (\n              geometry\n            ).getFlatInteriorPoints();\n          flatCoordinates = [];\n          for (let i = 0, ii = interiorPoints.length; i < ii; i += 3) {\n            if (!textState.overflow) {\n              geometryWidths.push(interiorPoints[i + 2] / this.resolution);\n            }\n            flatCoordinates.push(interiorPoints[i], interiorPoints[i + 1]);\n          }\n          if (flatCoordinates.length === 0) {\n            return;\n          }\n          stride = 2;\n          break;\n        default:\n      }\n      const end = this.appendFlatPointCoordinates(flatCoordinates, stride);\n      if (end === begin) {\n        return;\n      }\n      if (\n        geometryWidths &&\n        (end - begin) / 2 !== flatCoordinates.length / stride\n      ) {\n        let beg = begin / 2;\n        geometryWidths = geometryWidths.filter((w, i) => {\n          const keep =\n            coordinates[(beg + i) * 2] === flatCoordinates[i * stride] &&\n            coordinates[(beg + i) * 2 + 1] === flatCoordinates[i * stride + 1];\n          if (!keep) {\n            --beg;\n          }\n          return keep;\n        });\n      }\n\n      this.saveTextStates_();\n\n      const backgroundFill = textState.backgroundFill\n        ? this.createFill(this.fillStyleToState(textState.backgroundFill))\n        : null;\n      const backgroundStroke = textState.backgroundStroke\n        ? this.createStroke(this.strokeStyleToState(textState.backgroundStroke))\n        : null;\n\n      this.beginGeometry(geometry, feature, index);\n\n      // adjust padding for negative scale\n      let padding = textState.padding;\n      if (\n        padding != defaultPadding &&\n        (textState.scale[0] < 0 || textState.scale[1] < 0)\n      ) {\n        let p0 = textState.padding[0];\n        let p1 = textState.padding[1];\n        let p2 = textState.padding[2];\n        let p3 = textState.padding[3];\n        if (textState.scale[0] < 0) {\n          p1 = -p1;\n          p3 = -p3;\n        }\n        if (textState.scale[1] < 0) {\n          p0 = -p0;\n          p2 = -p2;\n        }\n        padding = [p0, p1, p2, p3];\n      }\n\n      // The image is unknown at this stage so we pass null; it will be computed at render time.\n      // For clarity, we pass NaN for offsetX, offsetY, width and height, which will be computed at\n      // render time.\n      const pixelRatio = this.pixelRatio;\n      this.instructions.push([\n        CanvasInstruction.DRAW_IMAGE,\n        begin,\n        end,\n        null,\n        NaN,\n        NaN,\n        NaN,\n        1,\n        0,\n        0,\n        this.textRotateWithView_,\n        this.textRotation_,\n        [1, 1],\n        NaN,\n        this.declutterMode_,\n        this.declutterImageWithText_,\n        padding == defaultPadding\n          ? defaultPadding\n          : padding.map(function (p) {\n              return p * pixelRatio;\n            }),\n        backgroundFill,\n        backgroundStroke,\n        this.text_,\n        this.textKey_,\n        this.strokeKey_,\n        this.fillKey_,\n        this.textOffsetX_,\n        this.textOffsetY_,\n        geometryWidths,\n      ]);\n      const scale = 1 / pixelRatio;\n      // Set default fill for hit detection background\n      const hitDetectionBackgroundFill = backgroundFill\n        ? backgroundFill.slice(0)\n        : null;\n      if (hitDetectionBackgroundFill) {\n        hitDetectionBackgroundFill[1] = defaultFillStyle;\n      }\n      this.hitDetectionInstructions.push([\n        CanvasInstruction.DRAW_IMAGE,\n        begin,\n        end,\n        null,\n        NaN,\n        NaN,\n        NaN,\n        1,\n        0,\n        0,\n        this.textRotateWithView_,\n        this.textRotation_,\n        [scale, scale],\n        NaN,\n        this.declutterMode_,\n        this.declutterImageWithText_,\n        padding,\n        hitDetectionBackgroundFill,\n        backgroundStroke,\n        this.text_,\n        this.textKey_,\n        this.strokeKey_,\n        this.fillKey_ ? defaultFillStyle : this.fillKey_,\n        this.textOffsetX_,\n        this.textOffsetY_,\n        geometryWidths,\n      ]);\n\n      this.endGeometry(feature);\n    }\n  }\n\n  /**\n   * @private\n   */\n  saveTextStates_() {\n    const strokeState = this.textStrokeState_;\n    const textState = this.textState_;\n    const fillState = this.textFillState_;\n\n    const strokeKey = this.strokeKey_;\n    if (strokeState) {\n      if (!(strokeKey in this.strokeStates)) {\n        this.strokeStates[strokeKey] = {\n          strokeStyle: strokeState.strokeStyle,\n          lineCap: strokeState.lineCap,\n          lineDashOffset: strokeState.lineDashOffset,\n          lineWidth: strokeState.lineWidth,\n          lineJoin: strokeState.lineJoin,\n          miterLimit: strokeState.miterLimit,\n          lineDash: strokeState.lineDash,\n        };\n      }\n    }\n    const textKey = this.textKey_;\n    if (!(textKey in this.textStates)) {\n      this.textStates[textKey] = {\n        font: textState.font,\n        textAlign: textState.textAlign || defaultTextAlign,\n        justify: textState.justify,\n        textBaseline: textState.textBaseline || defaultTextBaseline,\n        scale: textState.scale,\n      };\n    }\n    const fillKey = this.fillKey_;\n    if (fillState) {\n      if (!(fillKey in this.fillStates)) {\n        this.fillStates[fillKey] = {\n          fillStyle: fillState.fillStyle,\n        };\n      }\n    }\n  }\n\n  /**\n   * @private\n   * @param {number} begin Begin.\n   * @param {number} end End.\n   */\n  drawChars_(begin, end) {\n    const strokeState = this.textStrokeState_;\n    const textState = this.textState_;\n\n    const strokeKey = this.strokeKey_;\n    const textKey = this.textKey_;\n    const fillKey = this.fillKey_;\n    this.saveTextStates_();\n\n    const pixelRatio = this.pixelRatio;\n    const baseline = TEXT_ALIGN[textState.textBaseline];\n\n    const offsetX = this.textOffsetX_ * pixelRatio;\n    const offsetY = this.textOffsetY_ * pixelRatio;\n    const text = this.text_;\n    const strokeWidth = strokeState\n      ? (strokeState.lineWidth * Math.abs(textState.scale[0])) / 2\n      : 0;\n\n    this.instructions.push([\n      CanvasInstruction.DRAW_CHARS,\n      begin,\n      end,\n      baseline,\n      textState.overflow,\n      fillKey,\n      textState.maxAngle,\n      pixelRatio,\n      offsetY,\n      strokeKey,\n      strokeWidth * pixelRatio,\n      text,\n      textKey,\n      1,\n      this.declutterMode_,\n      this.textKeepUpright_,\n      offsetX,\n    ]);\n    this.hitDetectionInstructions.push([\n      CanvasInstruction.DRAW_CHARS,\n      begin,\n      end,\n      baseline,\n      textState.overflow,\n      fillKey ? defaultFillStyle : fillKey,\n      textState.maxAngle,\n      pixelRatio,\n      offsetY,\n      strokeKey,\n      strokeWidth * pixelRatio,\n      text,\n      textKey,\n      1 / pixelRatio,\n      this.declutterMode_,\n      this.textKeepUpright_,\n      offsetX,\n    ]);\n  }\n\n  /**\n   * @param {import(\"../../style/Text.js\").default} textStyle Text style.\n   * @param {Object} [sharedData] Shared data.\n   * @override\n   */\n  setTextStyle(textStyle, sharedData) {\n    let textState, fillState, strokeState;\n    if (!textStyle) {\n      this.text_ = '';\n    } else {\n      const textFillStyle = textStyle.getFill();\n      if (!textFillStyle) {\n        fillState = null;\n        this.textFillState_ = fillState;\n      } else {\n        fillState = this.textFillState_;\n        if (!fillState) {\n          fillState = /** @type {import(\"../canvas.js\").FillState} */ ({});\n          this.textFillState_ = fillState;\n        }\n        fillState.fillStyle = asColorLike(\n          textFillStyle.getColor() || defaultFillStyle,\n        );\n      }\n\n      const textStrokeStyle = textStyle.getStroke();\n      if (!textStrokeStyle) {\n        strokeState = null;\n        this.textStrokeState_ = strokeState;\n      } else {\n        strokeState = this.textStrokeState_;\n        if (!strokeState) {\n          strokeState = /** @type {import(\"../canvas.js\").StrokeState} */ ({});\n          this.textStrokeState_ = strokeState;\n        }\n        const lineDash = textStrokeStyle.getLineDash();\n        const lineDashOffset = textStrokeStyle.getLineDashOffset();\n        const lineWidth = textStrokeStyle.getWidth();\n        const miterLimit = textStrokeStyle.getMiterLimit();\n        strokeState.lineCap = textStrokeStyle.getLineCap() || defaultLineCap;\n        strokeState.lineDash = lineDash ? lineDash.slice() : defaultLineDash;\n        strokeState.lineDashOffset =\n          lineDashOffset === undefined ? defaultLineDashOffset : lineDashOffset;\n        strokeState.lineJoin = textStrokeStyle.getLineJoin() || defaultLineJoin;\n        strokeState.lineWidth =\n          lineWidth === undefined ? defaultLineWidth : lineWidth;\n        strokeState.miterLimit =\n          miterLimit === undefined ? defaultMiterLimit : miterLimit;\n        strokeState.strokeStyle = asColorLike(\n          textStrokeStyle.getColor() || defaultStrokeStyle,\n        );\n      }\n\n      textState = this.textState_;\n      const font = textStyle.getFont() || defaultFont;\n      registerFont(font);\n      const textScale = textStyle.getScaleArray();\n      textState.overflow = textStyle.getOverflow();\n      textState.font = font;\n      textState.maxAngle = textStyle.getMaxAngle();\n      textState.placement = textStyle.getPlacement();\n      textState.textAlign = textStyle.getTextAlign();\n      textState.repeat = textStyle.getRepeat();\n      textState.justify = textStyle.getJustify();\n      textState.textBaseline =\n        textStyle.getTextBaseline() || defaultTextBaseline;\n      textState.backgroundFill = textStyle.getBackgroundFill();\n      textState.backgroundStroke = textStyle.getBackgroundStroke();\n      textState.padding = textStyle.getPadding() || defaultPadding;\n      textState.scale = textScale === undefined ? [1, 1] : textScale;\n\n      const textOffsetX = textStyle.getOffsetX();\n      const textOffsetY = textStyle.getOffsetY();\n      const textRotateWithView = textStyle.getRotateWithView();\n      const textKeepUpright = textStyle.getKeepUpright();\n      const textRotation = textStyle.getRotation();\n      this.text_ = textStyle.getText() || '';\n      this.textOffsetX_ = textOffsetX === undefined ? 0 : textOffsetX;\n      this.textOffsetY_ = textOffsetY === undefined ? 0 : textOffsetY;\n      this.textRotateWithView_ =\n        textRotateWithView === undefined ? false : textRotateWithView;\n      this.textKeepUpright_ =\n        textKeepUpright === undefined ? true : textKeepUpright;\n      this.textRotation_ = textRotation === undefined ? 0 : textRotation;\n\n      this.strokeKey_ = strokeState\n        ? (typeof strokeState.strokeStyle == 'string'\n            ? strokeState.strokeStyle\n            : getUid(strokeState.strokeStyle)) +\n          strokeState.lineCap +\n          strokeState.lineDashOffset +\n          '|' +\n          strokeState.lineWidth +\n          strokeState.lineJoin +\n          strokeState.miterLimit +\n          '[' +\n          strokeState.lineDash.join() +\n          ']'\n        : '';\n      this.textKey_ =\n        textState.font +\n        textState.scale +\n        (textState.textAlign || '?') +\n        (textState.repeat || '?') +\n        (textState.justify || '?') +\n        (textState.textBaseline || '?');\n      this.fillKey_ =\n        fillState && fillState.fillStyle\n          ? typeof fillState.fillStyle == 'string'\n            ? fillState.fillStyle\n            : '|' + getUid(fillState.fillStyle)\n          : '';\n    }\n    this.declutterMode_ = textStyle.getDeclutterMode();\n    this.declutterImageWithText_ = sharedData;\n  }\n}\n\nexport default CanvasTextBuilder;\n", "/**\n * @module ol/render/canvas/BuilderGroup\n */\n\nimport Builder from './Builder.js';\nimport ImageBuilder from './ImageBuilder.js';\nimport LineStringBuilder from './LineStringBuilder.js';\nimport PolygonBuilder from './PolygonBuilder.js';\nimport TextBuilder from './TextBuilder.js';\n\n/**\n * @type {Object<import(\"../canvas.js\").BuilderType, typeof Builder>}\n */\nconst BATCH_CONSTRUCTORS = {\n  'Circle': PolygonBuilder,\n  'Default': Builder,\n  'Image': ImageBuilder,\n  'LineString': LineStringBuilder,\n  'Polygon': PolygonBuilder,\n  'Text': TextBuilder,\n};\n\nclass BuilderGroup {\n  /**\n   * @param {number} tolerance Tolerance.\n   * @param {import(\"../../extent.js\").Extent} maxExtent Max extent.\n   * @param {number} resolution Resolution.\n   * @param {number} pixelRatio Pixel ratio.\n   */\n  constructor(tolerance, maxExtent, resolution, pixelRatio) {\n    /**\n     * @private\n     * @type {number}\n     */\n    this.tolerance_ = tolerance;\n\n    /**\n     * @private\n     * @type {import(\"../../extent.js\").Extent}\n     */\n    this.maxExtent_ = maxExtent;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.pixelRatio_ = pixelRatio;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.resolution_ = resolution;\n\n    /**\n     * @private\n     * @type {!Object<string, !Object<import(\"../canvas.js\").BuilderType, Builder>>}\n     */\n    this.buildersByZIndex_ = {};\n  }\n\n  /**\n   * @return {!Object<string, !Object<import(\"../canvas.js\").BuilderType, import(\"./Builder.js\").SerializableInstructions>>} The serializable instructions\n   */\n  finish() {\n    const builderInstructions = {};\n    for (const zKey in this.buildersByZIndex_) {\n      builderInstructions[zKey] = builderInstructions[zKey] || {};\n      const builders = this.buildersByZIndex_[zKey];\n      for (const builderKey in builders) {\n        const builderInstruction = builders[builderKey].finish();\n        builderInstructions[zKey][builderKey] = builderInstruction;\n      }\n    }\n    return builderInstructions;\n  }\n\n  /**\n   * @param {number|undefined} zIndex Z index.\n   * @param {import(\"../canvas.js\").BuilderType} builderType Replay type.\n   * @return {import(\"../VectorContext.js\").default} Replay.\n   */\n  getBuilder(zIndex, builderType) {\n    const zIndexKey = zIndex !== undefined ? zIndex.toString() : '0';\n    let replays = this.buildersByZIndex_[zIndexKey];\n    if (replays === undefined) {\n      replays = {};\n      this.buildersByZIndex_[zIndexKey] = replays;\n    }\n    let replay = replays[builderType];\n    if (replay === undefined) {\n      const Constructor = BATCH_CONSTRUCTORS[builderType];\n      replay = new Constructor(\n        this.tolerance_,\n        this.maxExtent_,\n        this.resolution_,\n        this.pixelRatio_,\n      );\n      replays[builderType] = replay;\n    }\n    return replay;\n  }\n}\n\nexport default BuilderGroup;\n", "import {angleBetween} from '../../coordinate.js';\n\n/**\n * Offsets a line string to the left / right along its segments direction.\n * Offset is applied to each segment of the line in the direciton of the segment normal (positive offset goes \"right\" relative to the line direction).\n * For very sharp angles between segments, the function falls back to offsetting along the segment normal direction to avoid excessively long miters.\n *\n * Coordinates and the offset should be in the same units \u2014 either pixels or the same spatial reference system as the input line coordinates.\n *\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} start Start index.\n * @param {number} end End index.\n * @param {number} stride Stride.\n * @param {number} offset Offset distance along the segment normal direction.\n *   Positive values offset to the right relative to the direction of the line.\n *   Negative values offset to the left.\n * @param {boolean} isClosedRing If coordinates build a closed circle (in this the first and the last coordinate offsets will consider previous / next ring coordinate)\n * @param {Array<number>} [dest] Destination coordinate array. If not provided a new one will be created\n * @param {number} [destinationStride] Stride of destination coordinates. If unspecified, assumed to be same as the source coordinates stride.\n * @return {Array<number>} Result flat coordinates of the offset line.\n */\nexport function offsetLineString(\n  flatCoordinates,\n  start,\n  end,\n  stride,\n  offset,\n  isClosedRing,\n  dest,\n  destinationStride,\n) {\n  dest = dest ?? [];\n  destinationStride = destinationStride ?? stride;\n\n  const secondPointX = flatCoordinates[start + stride];\n  const secondPointY = flatCoordinates[start + stride + 1];\n  const secondToLastPointX = flatCoordinates[end - 2 * stride];\n  const secondToLastPointY = flatCoordinates[end - 2 * stride + 1];\n  let x, y, prevX, prevY, nextX, nextY, offsetX, offsetY;\n\n  let i = 0;\n  for (let j = start; j < end; j += stride) {\n    // 1. Detect previous and next coordinates of a current vertex\n    prevX = x;\n    prevY = y;\n    nextX = undefined;\n    nextY = undefined;\n    if (j + stride < end) {\n      nextX = flatCoordinates[j + stride];\n      nextY = flatCoordinates[j + stride + 1];\n    }\n    // First coordinate of a closed ring -> previous coordinate is the second to last one\n    if (isClosedRing && j === start) {\n      prevX = secondToLastPointX;\n      prevY = secondToLastPointY;\n    }\n    // Last coordinate of a closed ring -> next coordinate is the second vertex of a line string (the last one is same as the first one for a closed ring)\n    if (isClosedRing && j === end - stride) {\n      nextX = secondPointX;\n      nextY = secondPointY;\n    }\n\n    // 2. Current vertex to offset\n    x = flatCoordinates[j];\n    y = flatCoordinates[j + 1];\n\n    // 3. Offset the vertex\n    [offsetX, offsetY] = offsetLineVertex(\n      x,\n      y,\n      prevX,\n      prevY,\n      nextX,\n      nextY,\n      offset,\n    );\n    dest[i++] = offsetX;\n    dest[i++] = offsetY;\n\n    // 4. Copy over other dimension values if any\n    for (let k = 2; k < destinationStride; k++) {\n      dest[i++] = flatCoordinates[j + k];\n    }\n  }\n\n  if (dest.length != i) {\n    dest.length = i;\n  }\n  return dest;\n}\n\n/**\n * Computes the offset of a single vertex of a line string.\n *\n * The function calculates a new vertex coordinate offset along the normal/miter direction of the line at this vertex.\n * Offset is applied along the segment normal (positive offset goes \"right\" relative to the line direction).\n * It handles first and last vertices (caps) as well as joins between two segments (mitering).\n * For very sharp angles, the function falls back to offsetting along the segment normal direction to avoid excessively long miters.\n *\n * Coordinates and the offset should be in the same units \u2014 either pixels or the same spatial reference system as the input line coordinates.\n *\n * @param {number} x Vertex x-coordinate.\n * @param {number} y Vertex y-coordinate.\n * @param {number|undefined} prevX Previous vertex x-coordinate.\n *   Pass undefined if computing the offset for the first vertex (no previous vertex).\n * @param {number|undefined} prevY Previous vertex y-coordinate.\n *   Pass undefined if computing the offset for the first vertex (no previous vertex).\n * @param {number|undefined} nextX Next vertex x-coordinate.\n *   Pass undefined if computing the offset for the last vertex (no next vertex).\n * @param {number|undefined} nextY Next vertex y-coordinate.\n *   Pass undefined if computing the offset for the last vertex (no next vertex).\n * @param {number} offset Offset distance along the segment normal direction.\n *   Positive values offset to the right relative to the direction from previous to next vertex.\n *   Negative values offset to the left.\n * @return {import(\"../../coordinate.js\").Coordinate} Offset vertex coordinate as `[x, y]`.\n */\nfunction offsetLineVertex(x, y, prevX, prevY, nextX, nextY, offset) {\n  // Compute segment direction\n  let nx, ny;\n  if (prevX !== undefined && prevY !== undefined) {\n    nx = x - prevX;\n    ny = y - prevY;\n  } else if (nextX !== undefined && nextY !== undefined) {\n    nx = nextX - x;\n    ny = nextY - y;\n  } else {\n    // no next, no previous point given -> just assume some default (horizontal) direction\n    nx = 1;\n    ny = 0;\n  }\n\n  // Normalize -> tangent\n  const len = Math.hypot(nx, ny);\n  const tx = nx / len;\n  const ty = ny / len;\n\n  // Rotate tangent 90\u00B0 -> normal\n  nx = -ty;\n  ny = tx;\n\n  // First / last vertex -> offset the point in the direction of the normal vector\n  if (prevX === undefined || prevY === undefined) {\n    return [x + nx * offset, y + ny * offset];\n  }\n  if (nextX === undefined || nextY === undefined) {\n    return [x + nx * offset, y + ny * offset];\n  }\n\n  // Compute join angle - angle between 2 segments of the vertex.\n  const joinAngle = angleBetween([x, y], [prevX, prevY], [nextX, nextY]);\n\n  // Avoid huge or infinite miter joins for very sharp angles, offset in the segment direction in this case.\n  if (Math.cos(joinAngle) > 0.998) {\n    return [x + tx * offset, y + ty * offset];\n  }\n\n  // Compute join offset direction.\n  // We rotate the normal vector by half of the join angle.\n  // This gives the direction of the miter at the vertex.\n  const cos = Math.cos(joinAngle / 2);\n  const sin = Math.sin(joinAngle / 2);\n\n  // Rotate the normal vector (nx, ny) by half of the join angle.\n  // bx/by = bisector direction before normalization\n  const bx = sin * nx + cos * ny;\n  const by = -cos * nx + sin * ny;\n\n  // Scale the bisector so that moving along it preserves the correct offset distance.\n  // Dividing by sin(half of angle) converts the bisector into the true miter vector.\n  // (This expands the miter for sharp angles and shortens it for wide ones.)\n  const dx = bx * (1 / sin);\n  const dy = by * (1 / sin);\n\n  // Offset final vertex along miter direction\n  return [x + dx * offset, y + dy * offset];\n}\n\n/**\n * Removes self-intersection loops (cycles) from an offset line.\n * When a polyline is offset, sharp turns can create self-intersecting loops.\n * This function detects those crossings and splices out the looped portions,\n * replacing them with the intersection point.\n *\n * @param {Array<number>} coords Flat offset coordinates (modified in-place).\n * @param {number} stride Coordinate stride (typically 2).\n * @param {boolean} [closedLine] Whether the original line is closed (first vertex === last vertex).\n *   When true, the first and last offset segments are not compared against each other to avoid\n *   false loop detection at the closure point.\n * @return {Array<number>} The cleaned coordinate array.\n */\nexport function removeOffsetCycles(coords, stride, closedLine = false) {\n  for (let i = 0, ii = coords.length - 2; i < ii; i += stride) {\n    const jMax =\n      closedLine && i === 0\n        ? coords.length - 3 * stride\n        : coords.length - 2 * stride;\n    for (let j = jMax; j > i + stride; j -= stride) {\n      const p1x = coords[i];\n      const p1y = coords[i + 1];\n      const p2x = coords[i + stride];\n      const p2y = coords[i + stride + 1];\n      const p3x = coords[j];\n      const p3y = coords[j + 1];\n      const p4x = coords[j + stride];\n      const p4y = coords[j + stride + 1];\n      const d = (p4y - p3y) * (p2x - p1x) - (p4x - p3x) * (p2y - p1y);\n      if (d === 0) {\n        continue;\n      }\n      const t = ((p4x - p3x) * (p1y - p3y) - (p4y - p3y) * (p1x - p3x)) / d;\n      const u = ((p2x - p1x) * (p1y - p3y) - (p2y - p1y) * (p1x - p3x)) / d;\n      if (t > 0 && t < 1 && u > 0 && u < 1) {\n        const ix = p1x + t * (p2x - p1x);\n        const iy = p1y + t * (p2y - p1y);\n        coords[i + stride] = ix;\n        coords[i + stride + 1] = iy;\n        coords.splice(i + 2 * stride, j - i - stride);\n        break;\n      }\n    }\n  }\n  return coords;\n}\n", "/**\n * @module ol/geom/flat/textpath\n */\nimport {lerp} from '../../math.js';\nimport {rotate} from './transform.js';\n\nlet segmenter;\n/**\n * @return {Intl.Segmenter} A grapheme segmenter.\n */\nfunction getSegmenter() {\n  if (!segmenter) {\n    segmenter = new Intl.Segmenter(undefined, {granularity: 'grapheme'});\n  }\n  return segmenter;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Path to put text on.\n * @param {number} offset Start offset of the `flatCoordinates`.\n * @param {number} end End offset of the `flatCoordinates`.\n * @param {number} stride Stride.\n * @param {string} text Text to place on the path.\n * @param {number} startM m along the path where the text starts.\n * @param {number} maxAngle Max angle between adjacent chars in radians.\n * @param {number} scale The product of the text scale and the device pixel ratio.\n * @param {function(string, string, Object<string, number>):number} measureAndCacheTextWidth Measure and cache text width.\n * @param {string} font The font.\n * @param {Object<string, number>} cache A cache of measured widths.\n * @param {number} rotation Rotation to apply to the flatCoordinates to determine whether text needs to be reversed.\n * @param {boolean} keepUpright Whether the text needs to be kept upright\n * @return {Array<Array<*>>|null} The result array (or null if `maxAngle` was\n * exceeded). Entries of the array are x, y, anchorX, angle, chunk.\n */\nexport function drawTextOnPath(\n  flatCoordinates,\n  offset,\n  end,\n  stride,\n  text,\n  startM,\n  maxAngle,\n  scale,\n  measureAndCacheTextWidth,\n  font,\n  cache,\n  rotation,\n  keepUpright = true,\n) {\n  let x2 = flatCoordinates[offset];\n  let y2 = flatCoordinates[offset + 1];\n  let x1 = 0;\n  let y1 = 0;\n  let segmentLength = 0;\n  let segmentM = 0;\n\n  function advance() {\n    x1 = x2;\n    y1 = y2;\n    offset += stride;\n    x2 = flatCoordinates[offset];\n    y2 = flatCoordinates[offset + 1];\n    segmentM += segmentLength;\n    segmentLength = Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));\n  }\n  do {\n    advance();\n  } while (offset < end - stride && segmentM + segmentLength < startM);\n\n  let interpolate =\n    segmentLength === 0 ? 0 : (startM - segmentM) / segmentLength;\n  const beginX = lerp(x1, x2, interpolate);\n  const beginY = lerp(y1, y2, interpolate);\n\n  const startOffset = offset - stride;\n  const startLength = segmentM;\n  const endM = startM + scale * measureAndCacheTextWidth(font, text, cache);\n  while (offset < end - stride && segmentM + segmentLength < endM) {\n    advance();\n  }\n  interpolate = segmentLength === 0 ? 0 : (endM - segmentM) / segmentLength;\n  const endX = lerp(x1, x2, interpolate);\n  const endY = lerp(y1, y2, interpolate);\n\n  // Keep text upright if the option is selected\n  let reverse = false;\n  if (keepUpright) {\n    if (rotation) {\n      const flat = [beginX, beginY, endX, endY];\n      rotate(flat, 0, 4, 2, rotation, flat, flat);\n      reverse = flat[0] > flat[2];\n    } else {\n      reverse = beginX > endX;\n    }\n  }\n\n  const PI = Math.PI;\n  const result = [];\n  const singleSegment = startOffset + stride === offset;\n\n  offset = startOffset;\n  segmentLength = 0;\n  segmentM = startLength;\n  x2 = flatCoordinates[offset];\n  y2 = flatCoordinates[offset + 1];\n\n  let previousAngle;\n  // All on the same segment\n  if (singleSegment) {\n    advance();\n\n    previousAngle = Math.atan2(y2 - y1, x2 - x1);\n    if (reverse) {\n      previousAngle += previousAngle > 0 ? -PI : PI;\n    }\n    const x = (endX + beginX) / 2;\n    const y = (endY + beginY) / 2;\n    result[0] = [x, y, (endM - startM) / 2, previousAngle, text];\n    return result;\n  }\n\n  // rendering across line segments\n  text = text.replace(/\\n/g, ' '); // ensure rendering in single-line as all calculations below don't handle multi-lines\n\n  const segments = Array.from(getSegmenter().segment(text), (s) => s.segment);\n  for (let i = 0, ii = segments.length; i < ii;) {\n    advance();\n    let angle = Math.atan2(y2 - y1, x2 - x1);\n    if (reverse) {\n      angle += angle > 0 ? -PI : PI;\n    }\n    if (previousAngle !== undefined) {\n      let delta = angle - previousAngle;\n      delta += delta > PI ? -2 * PI : delta < -PI ? 2 * PI : 0;\n      if (Math.abs(delta) > maxAngle) {\n        return null;\n      }\n    }\n    previousAngle = angle;\n\n    const iStart = i;\n    let charLength = 0;\n    for (; i < ii; ++i) {\n      const index = reverse ? ii - i - 1 : i;\n      const len =\n        scale * measureAndCacheTextWidth(font, segments[index], cache);\n      if (\n        offset + stride < end &&\n        segmentM + segmentLength < startM + charLength + len / 2\n      ) {\n        break;\n      }\n      charLength += len;\n    }\n    if (i === iStart) {\n      continue;\n    }\n    const chars = (\n      reverse ? segments.slice(ii - i, ii - iStart) : segments.slice(iStart, i)\n    ).join('');\n    interpolate =\n      segmentLength === 0\n        ? 0\n        : (startM + charLength / 2 - segmentM) / segmentLength;\n    const x = lerp(x1, x2, interpolate);\n    const y = lerp(y1, y2, interpolate);\n    result.push([x, y, charLength / 2, angle, chars]);\n    startM += charLength;\n  }\n  return result;\n}\n", "/**\n * @module ol/render/canvas/ZIndexContext\n */\n\nimport {getSharedCanvasContext2D} from '../../dom.js';\n\n/** @typedef {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D & {globalAlpha: any}} ZIndexContextProxy */\n\n/**\n * @extends {CanvasRenderingContext2D}\n */\nclass ZIndexContext {\n  constructor() {\n    /**\n     * @private\n     * @type {Array<Array<*>>}\n     */\n    this.instructions_ = [];\n    /**\n     * @type {number}\n     */\n    this.zIndex = 0;\n    /**\n     * @private\n     * @type {number}\n     */\n    this.offset_ = 0;\n\n    /**\n     * Name of the method last accessed on the proxy, pushed together with its\n     * arguments when the method is actually called.\n     * @private\n     * @type {string|symbol}\n     */\n    this.pendingMethod_;\n\n    /**\n     * @private\n     * @type {ZIndexContextProxy}\n     */\n    this.context_ = /** @type {ZIndexContextProxy} */ (\n      new Proxy(getSharedCanvasContext2D(), {\n        get: (target, property) => {\n          if (typeof (/** @type {*} */ (target)[property]) !== 'function') {\n            // we only accept calling functions on the proxy, not accessing properties\n            return undefined;\n          }\n          this.pendingMethod_ = property;\n          return this.pushMethodArgs_;\n        },\n        set: (target, property, value) => {\n          this.push_(property, value);\n          return true;\n        },\n      })\n    );\n  }\n\n  /**\n   * @param {...*} args Arguments to push to the instructions array.\n   * @private\n   */\n  push_(...args) {\n    const instructions = this.instructions_;\n    const index = this.zIndex + this.offset_;\n    if (!instructions[index]) {\n      instructions[index] = [];\n    }\n    instructions[index].push(...args);\n  }\n\n  /**\n   * Pushes the method name captured at access time together with the arguments\n   * passed at call time. Reused across all proxied method calls.\n   * @param {...*} args Args.\n   * @private\n   */\n  pushMethodArgs_ = (...args) => {\n    this.push_(this.pendingMethod_, args);\n  };\n\n  /**\n   * Push a function that renders to the context directly.\n   * @param {function(CanvasRenderingContext2D): void} render Function.\n   */\n  pushFunction(render) {\n    this.push_(render);\n  }\n\n  /**\n   * Get a proxy for CanvasRenderingContext2D which does not support getting state\n   * (e.g. `context.globalAlpha`, which will return `undefined`). To set state, if it relies on a\n   * previous state (e.g. `context.globalAlpha = context.globalAlpha / 2`), set a function,\n   * e.g. `context.globalAlpha = (context) => context.globalAlpha / 2`.\n   * @return {ZIndexContextProxy} Context.\n   */\n  getContext() {\n    return this.context_;\n  }\n\n  /**\n   * @param {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} context Context.\n   */\n  draw(context) {\n    this.instructions_.forEach((instructionsAtIndex) => {\n      for (let i = 0, ii = instructionsAtIndex.length; i < ii; ++i) {\n        const property = instructionsAtIndex[i];\n        if (typeof property === 'function') {\n          property(context);\n          continue;\n        }\n        const instructionAtIndex = instructionsAtIndex[++i];\n        if (typeof (/** @type {*} */ (context)[property]) === 'function') {\n          /** @type {*} */ (context)[property](...instructionAtIndex);\n        } else if (typeof instructionAtIndex === 'function') {\n          /** @type {*} */ (context)[property] = instructionAtIndex(context);\n        } else {\n          /** @type {*} */ (context)[property] = instructionAtIndex;\n        }\n      }\n    });\n  }\n\n  clear() {\n    this.instructions_.length = 0;\n    this.zIndex = 0;\n    this.offset_ = 0;\n  }\n\n  /**\n   * Offsets the zIndex by the highest current zIndex. Useful for rendering multiple worlds or tiles, to\n   * avoid conflicting context.clip() or context.save()/restore() calls.\n   */\n  offset() {\n    this.offset_ = this.instructions_.length;\n    this.zIndex = 0;\n  }\n}\n\nexport default ZIndexContext;\n", "/**\n * @module ol/render/canvas/Executor\n */\nimport {equals} from '../../array.js';\nimport {createEmpty, createOrUpdate, intersects} from '../../extent.js';\nimport {lineStringLength} from '../../geom/flat/length.js';\nimport {\n  offsetLineString,\n  removeOffsetCycles,\n} from '../../geom/flat/lineoffset.js';\nimport {drawTextOnPath} from '../../geom/flat/textpath.js';\nimport {transform2D} from '../../geom/flat/transform.js';\nimport {\n  apply as applyTransform,\n  compose as composeTransform,\n  create as createTransform,\n  setFromArray as transformSetFromArray,\n} from '../../transform.js';\nimport {\n  defaultPadding,\n  defaultTextAlign,\n  defaultTextBaseline,\n  drawImageOrLabel,\n  getTextDimensions,\n  measureAndCacheTextWidth,\n} from '../canvas.js';\nimport ZIndexContext from '../canvas/ZIndexContext.js';\nimport CanvasInstruction from './Instruction.js';\nimport {TEXT_ALIGN} from './TextBuilder.js';\n\n/**\n * @typedef {import('../../structs/RBush.js').Entry<import('../../Feature.js').FeatureLike>} DeclutterEntry\n */\n\n/**\n * @typedef {Object} ImageOrLabelDimensions\n * @property {number} drawImageX DrawImageX.\n * @property {number} drawImageY DrawImageY.\n * @property {number} drawImageW DrawImageW.\n * @property {number} drawImageH DrawImageH.\n * @property {number} originX OriginX.\n * @property {number} originY OriginY.\n * @property {Array<number>} scale Scale.\n * @property {DeclutterEntry} declutterBox DeclutterBox.\n * @property {import(\"../../transform.js\").Transform} canvasTransform CanvasTransform.\n */\n\n/**\n * @typedef {{0: CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D, 1: import('../../size.js').Size, 2: import(\"../canvas.js\").Label|HTMLImageElement|HTMLCanvasElement|HTMLVideoElement, 3: ImageOrLabelDimensions, 4: number, 5: Array<*>, 6: Array<*>}} ReplayImageOrLabelArgs\n */\n\n/**\n * @template T\n * @typedef {function(import(\"../../Feature.js\").FeatureLike, import(\"../../geom/SimpleGeometry.js\").default, import(\"../../style/Style.js\").DeclutterMode): T} FeatureCallback\n */\n\n/**\n * @type {import(\"../../extent.js\").Extent}\n */\nconst tmpExtent = createEmpty();\n\n/** @type {import(\"../../coordinate.js\").Coordinate} */\nconst p1 = [];\n/** @type {import(\"../../coordinate.js\").Coordinate} */\nconst p2 = [];\n/** @type {import(\"../../coordinate.js\").Coordinate} */\nconst p3 = [];\n/** @type {import(\"../../coordinate.js\").Coordinate} */\nconst p4 = [];\n\n/**\n * @param {ReplayImageOrLabelArgs} replayImageOrLabelArgs Arguments to replayImageOrLabel\n * @return {DeclutterEntry} Declutter rbush entry.\n */\nfunction getDeclutterBox(replayImageOrLabelArgs) {\n  return replayImageOrLabelArgs[3].declutterBox;\n}\n\nconst rtlRegEx = new RegExp(\n  /* eslint-disable prettier/prettier */\n  '[' +\n    String.fromCharCode(0x00591) + '-' + String.fromCharCode(0x008ff) +\n    String.fromCharCode(0x0fb1d) + '-' + String.fromCharCode(0x0fdff) +\n    String.fromCharCode(0x0fe70) + '-' + String.fromCharCode(0x0fefc) +\n    String.fromCharCode(0x10800) + '-' + String.fromCharCode(0x10fff) +\n    String.fromCharCode(0x1e800) + '-' + String.fromCharCode(0x1efff) +\n  ']'\n  /* eslint-enable prettier/prettier */\n);\n\n/**\n * @param {string} text Text.\n * @param {CanvasTextAlign} align Alignment.\n * @return {number} Text alignment.\n */\nfunction horizontalTextAlign(text, align) {\n  if (align === 'start') {\n    align = rtlRegEx.test(text) ? 'right' : 'left';\n  } else if (align === 'end') {\n    align = rtlRegEx.test(text) ? 'left' : 'right';\n  }\n  return TEXT_ALIGN[align];\n}\n\n/**\n * @param {Array<string>} acc Accumulator.\n * @param {string} line Line of text.\n * @param {number} i Index\n * @return {Array<string>} Accumulator.\n */\nfunction createTextChunks(acc, line, i) {\n  if (i > 0) {\n    acc.push('\\n', '');\n  }\n  acc.push(line, '');\n  return acc;\n}\n\n/**\n * Converts rich text to plain text for text along lines.\n * @param {string} result The resulting plain text.\n * @param {string} part Item of the rich text array.\n * @param {number} index Index of the item in the rich text array.\n * @return {string} The resulting plain text.\n */\nfunction richTextToPlainText(result, part, index) {\n  if (index % 2 === 0) {\n    result += part;\n  }\n  return result;\n}\n\nclass Executor {\n  /**\n   * @param {number} resolution Resolution.\n   * @param {number} pixelRatio Pixel ratio.\n   * @param {boolean} overlaps The replay can have overlapping geometries.\n   * @param {import(\"../canvas.js\").SerializableInstructions} instructions The serializable instructions.\n   * @param {boolean} [deferredRendering] Enable deferred rendering.\n   */\n  constructor(\n    resolution,\n    pixelRatio,\n    overlaps,\n    instructions,\n    deferredRendering,\n  ) {\n    /**\n     * @protected\n     * @type {boolean}\n     */\n    this.overlaps = overlaps;\n\n    /**\n     * @protected\n     * @type {number}\n     */\n    this.pixelRatio = pixelRatio;\n\n    /**\n     * @protected\n     * @const\n     * @type {number}\n     */\n    this.resolution = resolution;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.alignAndScaleFill_;\n\n    /**\n     * @protected\n     * @type {Array<*>}\n     */\n    this.instructions = instructions.instructions;\n\n    /**\n     * @protected\n     * @type {Array<number>}\n     */\n    this.coordinates = instructions.coordinates;\n\n    /**\n     * @private\n     * @type {!Object<number,import(\"../../coordinate.js\").Coordinate|Array<import(\"../../coordinate.js\").Coordinate>|Array<Array<import(\"../../coordinate.js\").Coordinate>>>}\n     */\n    this.coordinateCache_ = {};\n\n    /**\n     * @private\n     * @type {!import(\"../../transform.js\").Transform}\n     */\n    this.renderedTransform_ = createTransform();\n\n    /**\n     * @protected\n     * @type {Array<*>}\n     */\n    this.hitDetectionInstructions = instructions.hitDetectionInstructions;\n\n    /**\n     * @private\n     * @type {Array<number>}\n     */\n    this.pixelCoordinates_ = null;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.viewRotation_ = 0;\n\n    /**\n     * @type {!Object<string, import(\"../canvas.js\").FillState>}\n     */\n    this.fillStates = instructions.fillStates || {};\n\n    /**\n     * @type {!Object<string, import(\"../canvas.js\").StrokeState>}\n     */\n    this.strokeStates = instructions.strokeStates || {};\n\n    /**\n     * @type {!Object<string, import(\"../canvas.js\").TextState>}\n     */\n    this.textStates = instructions.textStates || {};\n\n    /**\n     * @private\n     * @type {Object<string, Object<string, number>>}\n     */\n    this.widths_ = {};\n\n    /**\n     * @private\n     * @type {Object<string, import(\"../canvas.js\").Label>}\n     */\n    this.labels_ = {};\n\n    /**\n     * @private\n     * @type {import(\"../canvas/ZIndexContext.js\").default}\n     */\n    this.zIndexContext_ = deferredRendering ? new ZIndexContext() : null;\n  }\n\n  /**\n   * @return {ZIndexContext} ZIndex context.\n   */\n  getZIndexContext() {\n    return this.zIndexContext_;\n  }\n\n  /**\n   * @param {string|Array<string>} text Text.\n   * @param {string} textKey Text style key.\n   * @param {string} fillKey Fill style key.\n   * @param {string} strokeKey Stroke style key.\n   * @return {import(\"../canvas.js\").Label} Label.\n   */\n  createLabel(text, textKey, fillKey, strokeKey) {\n    const key = text + textKey + fillKey + strokeKey;\n    if (this.labels_[key]) {\n      return this.labels_[key];\n    }\n    const strokeState = strokeKey ? this.strokeStates[strokeKey] : null;\n    const fillState = fillKey ? this.fillStates[fillKey] : null;\n    const textState = this.textStates[textKey];\n    const pixelRatio = this.pixelRatio;\n    const scale = [\n      textState.scale[0] * pixelRatio,\n      textState.scale[1] * pixelRatio,\n    ];\n    const align = textState.justify\n      ? TEXT_ALIGN[textState.justify]\n      : horizontalTextAlign(\n          Array.isArray(text) ? text[0] : text,\n          textState.textAlign || defaultTextAlign,\n        );\n    const strokeWidth =\n      strokeKey && strokeState.lineWidth ? strokeState.lineWidth : 0;\n\n    const chunks = Array.isArray(text)\n      ? text\n      : String(text).split('\\n').reduce(createTextChunks, []);\n\n    const {width, height, widths, heights, lineWidths} = getTextDimensions(\n      textState,\n      chunks,\n    );\n    const renderWidth = width + strokeWidth;\n    const contextInstructions = [];\n    // make canvas 2 pixels wider to account for italic text width measurement errors\n    const w = (renderWidth + 2) * scale[0];\n    const h = (height + strokeWidth) * scale[1];\n    /** @type {import(\"../canvas.js\").Label} */\n    const label = {\n      width: w < 0 ? Math.floor(w) : Math.ceil(w),\n      height: h < 0 ? Math.floor(h) : Math.ceil(h),\n      contextInstructions: contextInstructions,\n    };\n    if (scale[0] != 1 || scale[1] != 1) {\n      contextInstructions.push('scale', scale);\n    }\n    if (strokeKey) {\n      contextInstructions.push('strokeStyle', strokeState.strokeStyle);\n      contextInstructions.push('lineWidth', strokeWidth);\n      contextInstructions.push('lineCap', strokeState.lineCap);\n      contextInstructions.push('lineJoin', strokeState.lineJoin);\n      contextInstructions.push('miterLimit', strokeState.miterLimit);\n      contextInstructions.push('setLineDash', [strokeState.lineDash]);\n      contextInstructions.push('lineDashOffset', strokeState.lineDashOffset);\n    }\n    if (fillKey) {\n      contextInstructions.push('fillStyle', fillState.fillStyle);\n    }\n    contextInstructions.push('textBaseline', 'middle');\n    contextInstructions.push('textAlign', 'center');\n    const leftRight = 0.5 - align;\n    let x = align * renderWidth + leftRight * strokeWidth;\n    const strokeInstructions = [];\n    const fillInstructions = [];\n    let lineHeight = 0;\n    let lineOffset = 0;\n    let widthHeightIndex = 0;\n    let lineWidthIndex = 0;\n    let previousFont;\n    for (let i = 0, ii = chunks.length; i < ii; i += 2) {\n      const text = chunks[i];\n      if (text === '\\n') {\n        lineOffset += lineHeight;\n        lineHeight = 0;\n        x = align * renderWidth + leftRight * strokeWidth;\n        ++lineWidthIndex;\n        continue;\n      }\n      const font = chunks[i + 1] || textState.font;\n      if (font !== previousFont) {\n        if (strokeKey) {\n          strokeInstructions.push('font', font);\n        }\n        if (fillKey) {\n          fillInstructions.push('font', font);\n        }\n        previousFont = font;\n      }\n      lineHeight = Math.max(lineHeight, heights[widthHeightIndex]);\n      const fillStrokeArgs = [\n        text,\n        x +\n          leftRight * widths[widthHeightIndex] +\n          align * (widths[widthHeightIndex] - lineWidths[lineWidthIndex]),\n        0.5 * (strokeWidth + lineHeight) + lineOffset,\n      ];\n      x += widths[widthHeightIndex];\n      if (strokeKey) {\n        strokeInstructions.push('strokeText', fillStrokeArgs);\n      }\n      if (fillKey) {\n        fillInstructions.push('fillText', fillStrokeArgs);\n      }\n      ++widthHeightIndex;\n    }\n    Array.prototype.push.apply(contextInstructions, strokeInstructions);\n    Array.prototype.push.apply(contextInstructions, fillInstructions);\n    this.labels_[key] = label;\n    return label;\n  }\n\n  /**\n   * @param {CanvasRenderingContext2D} context Context.\n   * @param {import(\"../../coordinate.js\").Coordinate} p1 1st point of the background box.\n   * @param {import(\"../../coordinate.js\").Coordinate} p2 2nd point of the background box.\n   * @param {import(\"../../coordinate.js\").Coordinate} p3 3rd point of the background box.\n   * @param {import(\"../../coordinate.js\").Coordinate} p4 4th point of the background box.\n   * @param {Array<*>} fillInstruction Fill instruction.\n   * @param {Array<*>} strokeInstruction Stroke instruction.\n   */\n  replayTextBackground_(\n    context,\n    p1,\n    p2,\n    p3,\n    p4,\n    fillInstruction,\n    strokeInstruction,\n  ) {\n    context.beginPath();\n    context.moveTo.apply(context, p1);\n    context.lineTo.apply(context, p2);\n    context.lineTo.apply(context, p3);\n    context.lineTo.apply(context, p4);\n    context.lineTo.apply(context, p1);\n    if (fillInstruction) {\n      this.alignAndScaleFill_ = /** @type {number} */ (fillInstruction[2]);\n      context.fillStyle = /** @type {string} */ (fillInstruction[1]);\n      this.fill_(context);\n    }\n    if (strokeInstruction) {\n      this.setStrokeStyle_(\n        context,\n        /** @type {Array<*>} */ (strokeInstruction),\n      );\n      context.stroke();\n    }\n  }\n\n  /**\n   * @private\n   * @param {number} sheetWidth Width of the sprite sheet.\n   * @param {number} sheetHeight Height of the sprite sheet.\n   * @param {number} centerX X.\n   * @param {number} centerY Y.\n   * @param {number} width Width.\n   * @param {number} height Height.\n   * @param {number} anchorX Anchor X.\n   * @param {number} anchorY Anchor Y.\n   * @param {number} originX Origin X.\n   * @param {number} originY Origin Y.\n   * @param {number} rotation Rotation.\n   * @param {import(\"../../size.js\").Size} scale Scale.\n   * @param {boolean} snapToPixel Snap to pixel.\n   * @param {Array<number>} padding Padding.\n   * @param {boolean} fillStroke Background fill or stroke.\n   * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n   * @return {ImageOrLabelDimensions} Dimensions for positioning and decluttering the image or label.\n   */\n  calculateImageOrLabelDimensions_(\n    sheetWidth,\n    sheetHeight,\n    centerX,\n    centerY,\n    width,\n    height,\n    anchorX,\n    anchorY,\n    originX,\n    originY,\n    rotation,\n    scale,\n    snapToPixel,\n    padding,\n    fillStroke,\n    feature,\n  ) {\n    anchorX *= scale[0];\n    anchorY *= scale[1];\n    let x = centerX - anchorX;\n    let y = centerY - anchorY;\n\n    const w = width + originX > sheetWidth ? sheetWidth - originX : width;\n    const h = height + originY > sheetHeight ? sheetHeight - originY : height;\n    const boxW = padding[3] + w * scale[0] + padding[1];\n    const boxH = padding[0] + h * scale[1] + padding[2];\n    const boxX = x - padding[3];\n    const boxY = y - padding[0];\n\n    if (fillStroke || rotation !== 0) {\n      p1[0] = boxX;\n      p4[0] = boxX;\n      p1[1] = boxY;\n      p2[1] = boxY;\n      p2[0] = boxX + boxW;\n      p3[0] = p2[0];\n      p3[1] = boxY + boxH;\n      p4[1] = p3[1];\n    }\n\n    let transform;\n    if (rotation !== 0) {\n      transform = composeTransform(\n        createTransform(),\n        centerX,\n        centerY,\n        1,\n        1,\n        rotation,\n        -centerX,\n        -centerY,\n      );\n\n      applyTransform(transform, p1);\n      applyTransform(transform, p2);\n      applyTransform(transform, p3);\n      applyTransform(transform, p4);\n      createOrUpdate(\n        Math.min(p1[0], p2[0], p3[0], p4[0]),\n        Math.min(p1[1], p2[1], p3[1], p4[1]),\n        Math.max(p1[0], p2[0], p3[0], p4[0]),\n        Math.max(p1[1], p2[1], p3[1], p4[1]),\n        tmpExtent,\n      );\n    } else {\n      createOrUpdate(\n        Math.min(boxX, boxX + boxW),\n        Math.min(boxY, boxY + boxH),\n        Math.max(boxX, boxX + boxW),\n        Math.max(boxY, boxY + boxH),\n        tmpExtent,\n      );\n    }\n    if (snapToPixel) {\n      x = Math.round(x);\n      y = Math.round(y);\n    }\n    return {\n      drawImageX: x,\n      drawImageY: y,\n      drawImageW: w,\n      drawImageH: h,\n      originX: originX,\n      originY: originY,\n      declutterBox: {\n        minX: tmpExtent[0],\n        minY: tmpExtent[1],\n        maxX: tmpExtent[2],\n        maxY: tmpExtent[3],\n        value: feature,\n      },\n      canvasTransform: transform,\n      scale: scale,\n    };\n  }\n\n  /**\n   * @private\n   * @param {CanvasRenderingContext2D} context Context.\n   * @param {import('../../size.js').Size} scaledCanvasSize Scaled canvas size.\n   * @param {import(\"../canvas.js\").Label|HTMLImageElement|HTMLCanvasElement|HTMLVideoElement} imageOrLabel Image.\n   * @param {ImageOrLabelDimensions} dimensions Dimensions.\n   * @param {number} opacity Opacity.\n   * @param {Array<*>} fillInstruction Fill instruction.\n   * @param {Array<*>} strokeInstruction Stroke instruction.\n   * @return {boolean} The image or label was rendered.\n   */\n  replayImageOrLabel_(\n    context,\n    scaledCanvasSize,\n    imageOrLabel,\n    dimensions,\n    opacity,\n    fillInstruction,\n    strokeInstruction,\n  ) {\n    const fillStroke = !!(fillInstruction || strokeInstruction);\n\n    const box = dimensions.declutterBox;\n    const strokePadding = strokeInstruction\n      ? (strokeInstruction[2] * dimensions.scale[0]) / 2\n      : 0;\n    const intersects =\n      box.minX - strokePadding <= scaledCanvasSize[0] &&\n      box.maxX + strokePadding >= 0 &&\n      box.minY - strokePadding <= scaledCanvasSize[1] &&\n      box.maxY + strokePadding >= 0;\n\n    if (intersects) {\n      if (fillStroke) {\n        this.replayTextBackground_(\n          context,\n          p1,\n          p2,\n          p3,\n          p4,\n          /** @type {Array<*>} */ (fillInstruction),\n          /** @type {Array<*>} */ (strokeInstruction),\n        );\n      }\n      drawImageOrLabel(\n        context,\n        dimensions.canvasTransform,\n        opacity,\n        imageOrLabel,\n        dimensions.originX,\n        dimensions.originY,\n        dimensions.drawImageW,\n        dimensions.drawImageH,\n        dimensions.drawImageX,\n        dimensions.drawImageY,\n        dimensions.scale,\n      );\n    }\n    return true;\n  }\n\n  /**\n   * @private\n   * @param {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} context Context.\n   */\n  fill_(context) {\n    const alignAndScale = this.alignAndScaleFill_;\n    if (alignAndScale) {\n      const origin = applyTransform(this.renderedTransform_, [0, 0]);\n      const repeatSize = 512 * this.pixelRatio;\n      context.save();\n      context.translate(origin[0] % repeatSize, origin[1] % repeatSize);\n      if (alignAndScale !== 1) {\n        context.scale(alignAndScale, alignAndScale);\n      }\n    }\n    context.fill();\n    if (alignAndScale) {\n      context.restore();\n    }\n  }\n\n  /**\n   * @private\n   * @param {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} context Context.\n   * @param {Array<*>} instruction Instruction.\n   */\n  setStrokeStyle_(context, instruction) {\n    context.strokeStyle =\n      /** @type {import(\"../../colorlike.js\").ColorLike} */ (instruction[1]);\n    if (!instruction[1]) {\n      return;\n    }\n    context.lineWidth = /** @type {number} */ (instruction[2]);\n    context.lineCap = /** @type {CanvasLineCap} */ (instruction[3]);\n    context.lineJoin = /** @type {CanvasLineJoin} */ (instruction[4]);\n    context.miterLimit = /** @type {number} */ (instruction[5]);\n    context.lineDashOffset = /** @type {number} */ (instruction[7]);\n    context.setLineDash(/** @type {Array<number>} */ (instruction[6]));\n  }\n\n  /**\n   * @private\n   * @param {string|Array<string>} text The text to draw.\n   * @param {string} textKey The key of the text state.\n   * @param {string} strokeKey The key for the stroke state.\n   * @param {string} fillKey The key for the fill state.\n   * @return {{label: import(\"../canvas.js\").Label, anchorX: number, anchorY: number}} The text image and its anchor.\n   */\n  drawLabelWithPointPlacement_(text, textKey, strokeKey, fillKey) {\n    const textState = this.textStates[textKey];\n\n    const label = this.createLabel(text, textKey, fillKey, strokeKey);\n\n    const strokeState = this.strokeStates[strokeKey];\n    const pixelRatio = this.pixelRatio;\n    const align = horizontalTextAlign(\n      Array.isArray(text) ? text[0] : text,\n      textState.textAlign || defaultTextAlign,\n    );\n    const baseline = TEXT_ALIGN[textState.textBaseline || defaultTextBaseline];\n    const strokeWidth =\n      strokeState && strokeState.lineWidth ? strokeState.lineWidth : 0;\n\n    // Remove the 2 pixels we added in createLabel() for the anchor\n    const width = label.width / pixelRatio - 2 * textState.scale[0];\n    const anchorX = align * width + 2 * (0.5 - align) * strokeWidth;\n    const anchorY =\n      (baseline * label.height) / pixelRatio +\n      2 * (0.5 - baseline) * strokeWidth;\n\n    return {\n      label: label,\n      anchorX: anchorX,\n      anchorY: anchorY,\n    };\n  }\n\n  /**\n   * @private\n   * @param {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} context Context.\n   * @param {import('../../size.js').Size} scaledCanvasSize Scaled canvas size\n   * @param {import(\"../../transform.js\").Transform} transform Transform.\n   * @param {Array<*>} instructions Instructions array.\n   * @param {boolean} snapToPixel Snap point symbols and text to integer pixels.\n   * @param {FeatureCallback<T>} [featureCallback] Feature callback.\n   * @param {import(\"../../extent.js\").Extent} [hitExtent] Only check\n   *     features that intersect this extent.\n   * @param {import(\"rbush\").default<DeclutterEntry>} [declutterTree] Declutter tree.\n   * @return {T|undefined} Callback result.\n   * @template T\n   */\n  execute_(\n    context,\n    scaledCanvasSize,\n    transform,\n    instructions,\n    snapToPixel,\n    featureCallback,\n    hitExtent,\n    declutterTree,\n  ) {\n    const zIndexContext = this.zIndexContext_;\n    /** @type {Array<number>} */\n    let pixelCoordinates;\n    if (this.pixelCoordinates_ && equals(transform, this.renderedTransform_)) {\n      pixelCoordinates = this.pixelCoordinates_;\n    } else {\n      if (!this.pixelCoordinates_) {\n        this.pixelCoordinates_ = [];\n      }\n      pixelCoordinates = transform2D(\n        this.coordinates,\n        0,\n        this.coordinates.length,\n        2,\n        transform,\n        this.pixelCoordinates_,\n      );\n      transformSetFromArray(this.renderedTransform_, transform);\n    }\n    let i = 0; // instruction index\n    const ii = instructions.length; // end of instructions\n    let d = 0; // data index\n    let dd; // end of per-instruction data\n    const offsetCoords = [];\n    let anchorX,\n      anchorY,\n      lineOffsetPx,\n      /** @type {import('../../style/Style.js').DeclutterMode} */\n      declutterMode,\n      prevX,\n      prevY,\n      roundX,\n      roundY,\n      image,\n      text,\n      textKey,\n      strokeKey,\n      fillKey;\n    let pendingFill = 0;\n    let pendingStroke = 0;\n    const coordinateCache = this.coordinateCache_;\n    const viewRotation = this.viewRotation_;\n    const viewRotationFromTransform =\n      Math.round(Math.atan2(-transform[1], transform[0]) * 1e12) / 1e12;\n\n    const state = /** @type {import(\"../../render.js\").State} */ ({\n      context: context,\n      pixelRatio: this.pixelRatio,\n      resolution: this.resolution,\n      rotation: viewRotation,\n    });\n\n    // When the batch size gets too big, performance decreases. 200 is a good\n    // balance between batch size and number of fill/stroke instructions.\n    const batchSize =\n      this.instructions != instructions || this.overlaps ? 0 : 200;\n    let /** @type {import(\"../../Feature.js\").FeatureLike} */ feature;\n    let x, y, currentGeometry;\n    while (i < ii) {\n      const instruction = instructions[i];\n      const type = /** @type {import(\"./Instruction.js\").default} */ (\n        instruction[0]\n      );\n      switch (type) {\n        case CanvasInstruction.BEGIN_GEOMETRY:\n          feature = /** @type {import(\"../../Feature.js\").FeatureLike} */ (\n            instruction[1]\n          );\n          currentGeometry = instruction[3];\n          if (!feature.getGeometry()) {\n            i = /** @type {number} */ (instruction[2]);\n          } else if (\n            hitExtent !== undefined &&\n            !intersects(hitExtent, currentGeometry.getExtent())\n          ) {\n            i = /** @type {number} */ (instruction[2]) + 1;\n          } else {\n            ++i;\n          }\n          if (zIndexContext) {\n            zIndexContext.zIndex = instruction[4];\n          }\n          break;\n        case CanvasInstruction.BEGIN_PATH:\n          if (pendingFill > batchSize) {\n            this.fill_(context);\n            pendingFill = 0;\n          }\n          if (pendingStroke > batchSize) {\n            context.stroke();\n            pendingStroke = 0;\n          }\n          if (!pendingFill && !pendingStroke) {\n            context.beginPath();\n            prevX = NaN;\n            prevY = NaN;\n          }\n          ++i;\n          break;\n        case CanvasInstruction.CIRCLE:\n          d = /** @type {number} */ (instruction[1]);\n          lineOffsetPx = /** @type {number} */ instruction[2] ?? 0;\n          const x1 = pixelCoordinates[d];\n          const y1 = pixelCoordinates[d + 1];\n          const x2 = pixelCoordinates[d + 2] - lineOffsetPx;\n          const y2 = pixelCoordinates[d + 3] - lineOffsetPx;\n          const dx = x2 - x1;\n          const dy = y2 - y1;\n          const r = Math.sqrt(dx * dx + dy * dy);\n          context.moveTo(x1 + r, y1);\n          context.arc(x1, y1, r, 0, 2 * Math.PI, true);\n          ++i;\n          break;\n        case CanvasInstruction.CLOSE_PATH:\n          context.closePath();\n          ++i;\n          break;\n        case CanvasInstruction.CUSTOM:\n          d = /** @type {number} */ (instruction[1]);\n          dd = instruction[2];\n          const geometry =\n            /** @type {import(\"../../geom/SimpleGeometry.js\").default} */ (\n              instruction[3]\n            );\n          const renderer = instruction[4];\n          const fn = instruction[5];\n          state.geometry = geometry;\n          state.feature = feature;\n          if (!(i in coordinateCache)) {\n            coordinateCache[i] = [];\n          }\n          const coords = coordinateCache[i];\n          if (fn) {\n            fn(pixelCoordinates, d, dd, 2, coords);\n          } else {\n            coords[0] = pixelCoordinates[d];\n            coords[1] = pixelCoordinates[d + 1];\n            coords.length = 2;\n          }\n          if (zIndexContext) {\n            zIndexContext.zIndex = instruction[6];\n          }\n          renderer(coords, state);\n          ++i;\n          break;\n        case CanvasInstruction.DRAW_IMAGE:\n          d = /** @type {number} */ (instruction[1]);\n          dd = /** @type {number} */ (instruction[2]);\n          image =\n            /** @type {HTMLCanvasElement|HTMLVideoElement|HTMLImageElement} */ (\n              instruction[3]\n            );\n\n          // Remaining arguments in DRAW_IMAGE are in alphabetical order\n          anchorX = /** @type {number} */ (instruction[4]);\n          anchorY = /** @type {number} */ (instruction[5]);\n          let height = /** @type {number} */ (instruction[6]);\n          const opacity = /** @type {number} */ (instruction[7]);\n          const originX = /** @type {number} */ (instruction[8]);\n          const originY = /** @type {number} */ (instruction[9]);\n          const rotateWithView = /** @type {boolean} */ (instruction[10]);\n          let rotation = /** @type {number} */ (instruction[11]);\n          const scale = /** @type {import(\"../../size.js\").Size} */ (\n            instruction[12]\n          );\n          let width = /** @type {number} */ (instruction[13]);\n          declutterMode = instruction[14] || 'declutter';\n          const declutterImageWithText =\n            /** @type {{args: import(\"../canvas.js\").DeclutterImageWithText, declutterMode: import('../../style/Style.js').DeclutterMode}} */ (\n              instruction[15]\n            );\n\n          if (!image && instruction.length >= 20) {\n            // create label images\n            text = /** @type {string} */ (instruction[19]);\n            textKey = /** @type {string} */ (instruction[20]);\n            strokeKey = /** @type {string} */ (instruction[21]);\n            fillKey = /** @type {string} */ (instruction[22]);\n            const labelWithAnchor = this.drawLabelWithPointPlacement_(\n              text,\n              textKey,\n              strokeKey,\n              fillKey,\n            );\n            image = labelWithAnchor.label;\n            instruction[3] = image;\n            const textOffsetX = /** @type {number} */ (instruction[23]);\n            anchorX = (labelWithAnchor.anchorX - textOffsetX) * this.pixelRatio;\n            instruction[4] = anchorX;\n            const textOffsetY = /** @type {number} */ (instruction[24]);\n            anchorY = (labelWithAnchor.anchorY - textOffsetY) * this.pixelRatio;\n            instruction[5] = anchorY;\n            height = image.height;\n            instruction[6] = height;\n            width = image.width;\n            instruction[13] = width;\n          }\n\n          let geometryWidths;\n          if (instruction.length > 25) {\n            geometryWidths = /** @type {number} */ (instruction[25]);\n          }\n\n          let padding, backgroundFillInstruction, backgroundStrokeInstruction;\n          if (instruction.length > 17) {\n            padding = /** @type {Array<number>} */ (instruction[16]);\n            backgroundFillInstruction = /** @type {Array<*>} */ (\n              instruction[17]\n            );\n            backgroundStrokeInstruction = /** @type {Array<*>} */ (\n              instruction[18]\n            );\n          } else {\n            padding = defaultPadding;\n            backgroundFillInstruction = null;\n            backgroundStrokeInstruction = null;\n          }\n\n          if (rotateWithView && viewRotationFromTransform) {\n            // Canvas is expected to be rotated to reverse view rotation.\n            rotation += viewRotation;\n          } else if (!rotateWithView && !viewRotationFromTransform) {\n            // Canvas is not rotated, images need to be rotated back to be north-up.\n            rotation -= viewRotation;\n          }\n          let widthIndex = 0;\n          for (; d < dd; d += 2) {\n            if (\n              geometryWidths &&\n              geometryWidths[widthIndex++] < width / this.pixelRatio\n            ) {\n              continue;\n            }\n            const dimensions = this.calculateImageOrLabelDimensions_(\n              image.width,\n              image.height,\n              pixelCoordinates[d],\n              pixelCoordinates[d + 1],\n              width,\n              height,\n              anchorX,\n              anchorY,\n              originX,\n              originY,\n              rotation,\n              scale,\n              snapToPixel,\n              padding,\n              !!backgroundFillInstruction || !!backgroundStrokeInstruction,\n              feature,\n            );\n            /** @type {ReplayImageOrLabelArgs} */\n            const args = [\n              context,\n              scaledCanvasSize,\n              image,\n              dimensions,\n              opacity,\n              backgroundFillInstruction,\n              backgroundStrokeInstruction,\n            ];\n            if (declutterTree) {\n              let imageArgs, imageDeclutterMode, imageDeclutterBox;\n              if (declutterImageWithText) {\n                const index = dd - d;\n                if (!declutterImageWithText[index]) {\n                  // We now have the image for an image+text combination.\n                  declutterImageWithText[index] = {args, declutterMode};\n                  // Don't render anything for now, wait for the text.\n                  continue;\n                }\n                const imageDeclutter = declutterImageWithText[index];\n                imageArgs = imageDeclutter.args;\n                imageDeclutterMode = imageDeclutter.declutterMode;\n                delete declutterImageWithText[index];\n                imageDeclutterBox = getDeclutterBox(imageArgs);\n              }\n              // We now have image and text for an image+text combination.\n              let renderImage, renderText;\n              if (\n                imageArgs &&\n                (imageDeclutterMode !== 'declutter' ||\n                  !declutterTree.collides(imageDeclutterBox))\n              ) {\n                renderImage = true;\n              }\n              if (\n                declutterMode !== 'declutter' ||\n                !declutterTree.collides(dimensions.declutterBox)\n              ) {\n                renderText = true;\n              }\n              if (\n                imageDeclutterMode === 'declutter' &&\n                declutterMode === 'declutter'\n              ) {\n                const render = renderImage && renderText;\n                renderImage = render;\n                renderText = render;\n              }\n              if (renderImage) {\n                if (imageDeclutterMode !== 'none') {\n                  declutterTree.insert(imageDeclutterBox);\n                }\n                this.replayImageOrLabel_.apply(this, imageArgs);\n              }\n              if (renderText) {\n                if (declutterMode !== 'none') {\n                  declutterTree.insert(dimensions.declutterBox);\n                }\n                this.replayImageOrLabel_.apply(this, args);\n              }\n            } else {\n              this.replayImageOrLabel_.apply(this, args);\n            }\n          }\n          ++i;\n          break;\n        case CanvasInstruction.DRAW_CHARS:\n          const begin = /** @type {number} */ (instruction[1]);\n          const end = /** @type {number} */ (instruction[2]);\n          const baseline = /** @type {number} */ (instruction[3]);\n          const overflow = /** @type {number} */ (instruction[4]);\n          fillKey = /** @type {string} */ (instruction[5]);\n          const maxAngle = /** @type {number} */ (instruction[6]);\n          const measurePixelRatio = /** @type {number} */ (instruction[7]);\n          const offsetY = /** @type {number} */ (instruction[8]);\n          strokeKey = /** @type {string} */ (instruction[9]);\n          const strokeWidth = /** @type {number} */ (instruction[10]);\n          text = /** @type {string|Array<string>} */ (instruction[11]);\n          if (Array.isArray(text)) {\n            //FIXME Add support for rich text along lines\n            text = text.reduce(richTextToPlainText, '');\n          }\n          textKey = /** @type {string} */ (instruction[12]);\n          const pixelRatioScale = [\n            /** @type {number} */ (instruction[13]),\n            /** @type {number} */ (instruction[13]),\n          ];\n          declutterMode = instruction[14] || 'declutter';\n\n          const textKeepUpright = /** @type {boolean} */ (instruction[15]);\n          const offsetX = /** @type {number} */ (instruction[16]);\n          const textState = this.textStates[textKey];\n          const font = textState.font;\n          const textScale = [\n            textState.scale[0] * measurePixelRatio,\n            textState.scale[1] * measurePixelRatio,\n          ];\n\n          let cachedWidths;\n          if (font in this.widths_) {\n            cachedWidths = this.widths_[font];\n          } else {\n            cachedWidths = {};\n            this.widths_[font] = cachedWidths;\n          }\n\n          const pathLength = lineStringLength(pixelCoordinates, begin, end, 2);\n          const textLength =\n            Math.abs(textScale[0]) *\n            measureAndCacheTextWidth(font, text, cachedWidths);\n          if (overflow || textLength <= pathLength) {\n            const textAlign = this.textStates[textKey].textAlign;\n            const startM =\n              (pathLength - textLength) * horizontalTextAlign(text, textAlign);\n            const parts = drawTextOnPath(\n              pixelCoordinates,\n              begin,\n              end,\n              2,\n              text,\n              startM,\n              maxAngle,\n              Math.abs(textScale[0]),\n              measureAndCacheTextWidth,\n              font,\n              cachedWidths,\n              viewRotationFromTransform ? 0 : this.viewRotation_,\n              textKeepUpright,\n            );\n            drawChars: if (parts) {\n              /** @type {Array<ReplayImageOrLabelArgs>} */\n              const replayImageOrLabelArgs = [];\n              let c, cc, chars, label, part;\n              if (strokeKey) {\n                for (c = 0, cc = parts.length; c < cc; ++c) {\n                  part = parts[c]; // x, y, anchorX, rotation, chunk\n                  chars = /** @type {string} */ (part[4]);\n                  label = this.createLabel(chars, textKey, '', strokeKey);\n                  anchorX =\n                    /** @type {number} */ (part[2]) +\n                    (textScale[0] < 0 ? -strokeWidth : strokeWidth) -\n                    offsetX;\n                  anchorY =\n                    baseline * label.height +\n                    ((0.5 - baseline) * 2 * strokeWidth * textScale[1]) /\n                      textScale[0] -\n                    offsetY;\n                  const dimensions = this.calculateImageOrLabelDimensions_(\n                    label.width,\n                    label.height,\n                    part[0],\n                    part[1],\n                    label.width,\n                    label.height,\n                    anchorX,\n                    anchorY,\n                    0,\n                    0,\n                    part[3],\n                    pixelRatioScale,\n                    false,\n                    defaultPadding,\n                    false,\n                    feature,\n                  );\n                  if (\n                    declutterTree &&\n                    declutterMode === 'declutter' &&\n                    declutterTree.collides(dimensions.declutterBox)\n                  ) {\n                    break drawChars;\n                  }\n                  replayImageOrLabelArgs.push([\n                    context,\n                    scaledCanvasSize,\n                    label,\n                    dimensions,\n                    1,\n                    null,\n                    null,\n                  ]);\n                }\n              }\n              if (fillKey) {\n                for (c = 0, cc = parts.length; c < cc; ++c) {\n                  part = parts[c]; // x, y, anchorX, rotation, chunk\n                  chars = /** @type {string} */ (part[4]);\n                  label = this.createLabel(chars, textKey, fillKey, '');\n                  anchorX = /** @type {number} */ (part[2]) - offsetX;\n                  anchorY = baseline * label.height - offsetY;\n                  const dimensions = this.calculateImageOrLabelDimensions_(\n                    label.width,\n                    label.height,\n                    part[0],\n                    part[1],\n                    label.width,\n                    label.height,\n                    anchorX,\n                    anchorY,\n                    0,\n                    0,\n                    part[3],\n                    pixelRatioScale,\n                    false,\n                    defaultPadding,\n                    false,\n                    feature,\n                  );\n                  if (\n                    declutterTree &&\n                    declutterMode === 'declutter' &&\n                    declutterTree.collides(dimensions.declutterBox)\n                  ) {\n                    break drawChars;\n                  }\n                  replayImageOrLabelArgs.push([\n                    context,\n                    scaledCanvasSize,\n                    label,\n                    dimensions,\n                    1,\n                    null,\n                    null,\n                  ]);\n                }\n              }\n              if (declutterTree && declutterMode !== 'none') {\n                declutterTree.load(replayImageOrLabelArgs.map(getDeclutterBox));\n              }\n              for (let i = 0, ii = replayImageOrLabelArgs.length; i < ii; ++i) {\n                this.replayImageOrLabel_.apply(this, replayImageOrLabelArgs[i]);\n              }\n            }\n          }\n          ++i;\n          break;\n        case CanvasInstruction.END_GEOMETRY:\n          if (featureCallback !== undefined) {\n            feature = /** @type {import(\"../../Feature.js\").FeatureLike} */ (\n              instruction[1]\n            );\n            const result = featureCallback(\n              feature,\n              currentGeometry,\n              declutterMode,\n            );\n            if (result) {\n              return result;\n            }\n          }\n          ++i;\n          break;\n        case CanvasInstruction.FILL:\n          if (batchSize) {\n            pendingFill++;\n          } else {\n            this.fill_(context);\n          }\n          ++i;\n          break;\n        case CanvasInstruction.MOVE_TO_LINE_TO:\n          d = /** @type {number} */ (instruction[1]);\n          dd = /** @type {number} */ (instruction[2]);\n          lineOffsetPx = /** @type {number|undefined} */ (instruction[3]);\n\n          let lineCoords, lineStart, lineEnd;\n          if (lineOffsetPx) {\n            const isClosedRing =\n              /** @type {boolean|undefined} */ (instruction[4]) ?? false;\n            const isClosedLine =\n              isClosedRing ||\n              (Math.abs(pixelCoordinates[d] - pixelCoordinates[dd - 2]) <\n                1e-6 &&\n                Math.abs(pixelCoordinates[d + 1] - pixelCoordinates[dd - 1]) <\n                  1e-6);\n            offsetLineString(\n              pixelCoordinates,\n              d,\n              dd,\n              2,\n              lineOffsetPx,\n              isClosedLine,\n              offsetCoords,\n            );\n            removeOffsetCycles(offsetCoords, 2, isClosedLine);\n            lineCoords = offsetCoords;\n            lineStart = 0;\n            lineEnd = lineCoords.length;\n          } else {\n            lineCoords = pixelCoordinates;\n            lineStart = d;\n            lineEnd = dd;\n          }\n          x = lineCoords[lineStart];\n          y = lineCoords[lineStart + 1];\n          context.moveTo(x, y);\n          prevX = (x + 0.5) | 0;\n          prevY = (y + 0.5) | 0;\n          for (let k = lineStart + 2; k < lineEnd; k += 2) {\n            x = lineCoords[k];\n            y = lineCoords[k + 1];\n            roundX = (x + 0.5) | 0;\n            roundY = (y + 0.5) | 0;\n            if (k == lineEnd - 2 || roundX !== prevX || roundY !== prevY) {\n              context.lineTo(x, y);\n              prevX = roundX;\n              prevY = roundY;\n            }\n          }\n          ++i;\n          break;\n        case CanvasInstruction.SET_FILL_STYLE:\n          this.alignAndScaleFill_ = instruction[2];\n\n          if (pendingFill) {\n            this.fill_(context);\n            pendingFill = 0;\n            if (pendingStroke) {\n              context.stroke();\n              pendingStroke = 0;\n            }\n          } else if (pendingStroke && instruction[1]) {\n            context.stroke();\n            pendingStroke = 0;\n          }\n\n          /** @type {import(\"../../colorlike.js\").ColorLike} */\n          context.fillStyle = instruction[1];\n          ++i;\n          break;\n        case CanvasInstruction.SET_STROKE_STYLE:\n          if (pendingFill && instruction[1]) {\n            this.fill_(context);\n            pendingFill = 0;\n          }\n          if (pendingStroke) {\n            context.stroke();\n            pendingStroke = 0;\n          }\n          this.setStrokeStyle_(context, /** @type {Array<*>} */ (instruction));\n          ++i;\n          break;\n        case CanvasInstruction.STROKE:\n          if (batchSize) {\n            pendingStroke++;\n          } else {\n            context.stroke();\n          }\n          ++i;\n          break;\n        default: // consume the instruction anyway, to avoid an infinite loop\n          ++i;\n          break;\n      }\n    }\n    if (pendingFill) {\n      this.fill_(context);\n    }\n    if (pendingStroke) {\n      context.stroke();\n    }\n    return undefined;\n  }\n\n  /**\n   * @param {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} context Context.\n   * @param {import('../../size.js').Size} scaledCanvasSize Scaled canvas size.\n   * @param {import(\"../../transform.js\").Transform} transform Transform.\n   * @param {number} viewRotation View rotation.\n   * @param {boolean} snapToPixel Snap point symbols and text to integer pixels.\n   * @param {import(\"rbush\").default<DeclutterEntry>} [declutterTree] Declutter tree.\n   */\n  execute(\n    context,\n    scaledCanvasSize,\n    transform,\n    viewRotation,\n    snapToPixel,\n    declutterTree,\n  ) {\n    this.viewRotation_ = viewRotation;\n    this.execute_(\n      context,\n      scaledCanvasSize,\n      transform,\n      this.instructions,\n      snapToPixel,\n      undefined,\n      undefined,\n      declutterTree,\n    );\n  }\n\n  /**\n   * @param {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} context Context.\n   * @param {import(\"../../transform.js\").Transform} transform Transform.\n   * @param {number} viewRotation View rotation.\n   * @param {FeatureCallback<T>} [featureCallback] Feature callback.\n   * @param {import(\"../../extent.js\").Extent} [hitExtent] Only check\n   *     features that intersect this extent.\n   * @return {T|undefined} Callback result.\n   * @template T\n   */\n  executeHitDetection(\n    context,\n    transform,\n    viewRotation,\n    featureCallback,\n    hitExtent,\n  ) {\n    this.viewRotation_ = viewRotation;\n    return this.execute_(\n      context,\n      [context.canvas.width, context.canvas.height],\n      transform,\n      this.hitDetectionInstructions,\n      true,\n      featureCallback,\n      hitExtent,\n    );\n  }\n}\n\nexport default Executor;\n", "/**\n * @module ol/render/canvas/ExecutorGroup\n */\n\nimport {ascending, descending} from '../../array.js';\nimport {createCanvasContext2D} from '../../dom.js';\nimport {buffer, createEmpty, extendCoordinate} from '../../extent.js';\nimport {transform2D} from '../../geom/flat/transform.js';\nimport {isEmpty} from '../../obj.js';\nimport {\n  compose as composeTransform,\n  create as createTransform,\n} from '../../transform.js';\nimport Executor from './Executor.js';\n\n/**\n * @const\n * @type {Array<import(\"../canvas.js\").BuilderType>}\n */\nexport const ALL = [\n  'Polygon',\n  'Circle',\n  'LineString',\n  'Image',\n  'Text',\n  'Default',\n];\n\n/**\n * @const\n * @type {Array<import(\"../canvas.js\").BuilderType>}\n */\nexport const DECLUTTER = ['Image', 'Text'];\n\n/**\n * @const\n * @type {Array<import(\"../canvas.js\").BuilderType>}\n */\nexport const NON_DECLUTTER = ALL.filter(\n  (builderType) => !DECLUTTER.includes(builderType),\n);\n\n/** @type {boolean|undefined} */\nlet willReadFrequently = false;\n\n/** @type {boolean|undefined} */\nlet canvasReadsBenchmarked = false;\n\n/** Determine if canvas read operations are faster with willReadFrequently set to true or false */\nfunction benchmarkCanvasReads() {\n  let bestResult = 0;\n  /**\n   * @param {boolean} willReadFrequently Will read frequently.\n   * @return {number} Operation count.\n   */\n  const measure = (willReadFrequently) => {\n    const context = createCanvasContext2D(1, 1, null, {willReadFrequently});\n    let count = 0;\n    const start = performance.now();\n    for (; performance.now() - start < 50; ++count) {\n      context.fillStyle = `rgba(255,0,${count % 256},1)`;\n      context.fillRect(0, 0, 1, 1);\n      context.getImageData(0, 0, 1, 1);\n    }\n    bestResult = count > bestResult ? count : bestResult;\n    return count;\n  };\n\n  const measures = {\n    [measure(true)]: true,\n    [measure(false)]: false,\n    [measure(undefined)]: undefined,\n  };\n  willReadFrequently = measures[bestResult];\n  canvasReadsBenchmarked = true;\n}\n\nclass ExecutorGroup {\n  /**\n   * @param {import(\"../../extent.js\").Extent} maxExtent Max extent for clipping. When a\n   * `maxExtent` was set on the Builder for this executor group, the same `maxExtent`\n   * should be set here, unless the target context does not exceed that extent (which\n   * can be the case when rendering to tiles).\n   * @param {number} resolution Resolution.\n   * @param {number} pixelRatio Pixel ratio.\n   * @param {boolean} overlaps The executor group can have overlapping geometries.\n   * @param {!Object<string, !Object<import(\"../canvas.js\").BuilderType, import(\"../canvas.js\").SerializableInstructions>>} allInstructions\n   * The serializable instructions.\n   * @param {number} [renderBuffer] Optional rendering buffer.\n   * @param {boolean} [deferredRendering] Enable deferred rendering with renderDeferred().\n   */\n  constructor(\n    maxExtent,\n    resolution,\n    pixelRatio,\n    overlaps,\n    allInstructions,\n    renderBuffer,\n    deferredRendering,\n  ) {\n    /**\n     * @private\n     * @type {import(\"../../extent.js\").Extent}\n     */\n    this.maxExtent_ = maxExtent;\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.overlaps_ = overlaps;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.pixelRatio_ = pixelRatio;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.resolution_ = resolution;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.renderBuffer_ = renderBuffer;\n\n    /**\n     * @private\n     * @type {!Object<string, !Object<string, import(\"./Executor.js\").default>>}\n     */\n    this.executorsByZIndex_ = {};\n\n    /**\n     * @private\n     * @type {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D}\n     */\n    this.hitDetectionContext_ = null;\n\n    /**\n     * @private\n     * @type {import(\"../../transform.js\").Transform}\n     */\n    this.hitDetectionTransform_ = createTransform();\n\n    /**\n     * @private\n     * @type {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D}\n     */\n    this.renderedContext_ = null;\n\n    /**\n     * @private\n     * @type {Object<number, Array<import(\"./ZIndexContext.js\").default>>}\n     */\n    this.deferredZIndexContexts_ = {};\n\n    this.createExecutors_(allInstructions, deferredRendering);\n  }\n\n  /**\n   * @param {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} context Context.\n   * @param {import(\"../../transform.js\").Transform} transform Transform.\n   */\n  clip(context, transform) {\n    const flatClipCoords = this.getClipCoords(transform);\n    context.beginPath();\n    context.moveTo(flatClipCoords[0], flatClipCoords[1]);\n    context.lineTo(flatClipCoords[2], flatClipCoords[3]);\n    context.lineTo(flatClipCoords[4], flatClipCoords[5]);\n    context.lineTo(flatClipCoords[6], flatClipCoords[7]);\n    context.clip();\n  }\n\n  /**\n   * Create executors and populate them using the provided instructions.\n   * @private\n   * @param {!Object<string, !Object<string, import(\"../canvas.js\").SerializableInstructions>>} allInstructions The serializable instructions\n   * @param {boolean} deferredRendering Enable deferred rendering.\n   */\n  createExecutors_(allInstructions, deferredRendering) {\n    for (const zIndex in allInstructions) {\n      let executors = this.executorsByZIndex_[zIndex];\n      if (executors === undefined) {\n        executors = {};\n        this.executorsByZIndex_[zIndex] = executors;\n      }\n      const instructionByZindex = allInstructions[zIndex];\n      for (const builderType in instructionByZindex) {\n        const instructions = instructionByZindex[builderType];\n        executors[builderType] = new Executor(\n          this.resolution_,\n          this.pixelRatio_,\n          this.overlaps_,\n          instructions,\n          deferredRendering,\n        );\n      }\n    }\n  }\n\n  /**\n   * @param {Array<import(\"../canvas.js\").BuilderType>} executors Executors.\n   * @return {boolean} Has executors of the provided types.\n   */\n  hasExecutors(executors) {\n    for (const zIndex in this.executorsByZIndex_) {\n      const candidates = this.executorsByZIndex_[zIndex];\n      for (let i = 0, ii = executors.length; i < ii; ++i) {\n        if (executors[i] in candidates) {\n          return true;\n        }\n      }\n    }\n    return false;\n  }\n\n  /**\n   * @param {import(\"../../coordinate.js\").Coordinate} coordinate Coordinate.\n   * @param {number} resolution Resolution.\n   * @param {number} rotation Rotation.\n   * @param {number} hitTolerance Hit tolerance in pixels.\n   * @param {function(import(\"../../Feature.js\").FeatureLike, import(\"../../geom/SimpleGeometry.js\").default, number): T} callback Feature callback.\n   * @param {Array<import(\"../../Feature.js\").FeatureLike>} declutteredFeatures Decluttered features.\n   * @return {T|undefined} Callback result.\n   * @template T\n   */\n  forEachFeatureAtCoordinate(\n    coordinate,\n    resolution,\n    rotation,\n    hitTolerance,\n    callback,\n    declutteredFeatures,\n  ) {\n    if (canvasReadsBenchmarked === false) {\n      benchmarkCanvasReads();\n    }\n\n    hitTolerance = Math.round(hitTolerance);\n    const contextSize = hitTolerance * 2 + 1;\n    const transform = composeTransform(\n      this.hitDetectionTransform_,\n      hitTolerance + 0.5,\n      hitTolerance + 0.5,\n      1 / resolution,\n      -1 / resolution,\n      -rotation,\n      -coordinate[0],\n      -coordinate[1],\n    );\n\n    const newContext = !this.hitDetectionContext_;\n    if (newContext) {\n      this.hitDetectionContext_ = createCanvasContext2D(\n        contextSize,\n        contextSize,\n        null,\n        {willReadFrequently},\n      );\n    }\n    const context = this.hitDetectionContext_;\n\n    if (\n      context.canvas.width !== contextSize ||\n      context.canvas.height !== contextSize\n    ) {\n      context.canvas.width = contextSize;\n      context.canvas.height = contextSize;\n    } else if (!newContext) {\n      context.clearRect(0, 0, contextSize, contextSize);\n    }\n\n    /** @type {import(\"../../extent.js\").Extent|undefined} */\n    let hitExtent;\n    if (this.renderBuffer_ !== undefined) {\n      hitExtent = createEmpty();\n      extendCoordinate(hitExtent, coordinate);\n      buffer(\n        hitExtent,\n        resolution * (this.renderBuffer_ + hitTolerance),\n        hitExtent,\n      );\n    }\n\n    const indexes = getPixelIndexArray(hitTolerance);\n\n    /** @type {import(\"../canvas.js\").BuilderType} */\n    let builderType;\n\n    /**\n     * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n     * @param {import(\"../../geom/SimpleGeometry.js\").default} geometry Geometry.\n     * @param {import('../../style/Style.js').DeclutterMode} declutterMode Declutter mode.\n     * @return {T|undefined} Callback result.\n     */\n    function featureCallback(feature, geometry, declutterMode) {\n      const imageData = context.getImageData(\n        0,\n        0,\n        contextSize,\n        contextSize,\n      ).data;\n      for (let i = 0, ii = indexes.length; i < ii; i++) {\n        if (imageData[indexes[i]] > 0) {\n          if (\n            !declutteredFeatures ||\n            declutterMode === 'none' ||\n            (builderType !== 'Image' && builderType !== 'Text') ||\n            declutteredFeatures.includes(feature)\n          ) {\n            const idx = (indexes[i] - 3) / 4;\n            const x = hitTolerance - (idx % contextSize);\n            const y = hitTolerance - ((idx / contextSize) | 0);\n            const result = callback(feature, geometry, x * x + y * y);\n            if (result) {\n              return result;\n            }\n          }\n          context.clearRect(0, 0, contextSize, contextSize);\n          break;\n        }\n      }\n      return undefined;\n    }\n\n    /** @type {Array<number>} */\n    const zs = Object.keys(this.executorsByZIndex_).map(Number);\n    zs.sort(ascending);\n\n    let i, j, executors, executor, result;\n    for (i = zs.length - 1; i >= 0; --i) {\n      const zIndexKey = zs[i].toString();\n      executors = this.executorsByZIndex_[zIndexKey];\n      for (j = ALL.length - 1; j >= 0; --j) {\n        builderType = ALL[j];\n        executor = executors[builderType];\n        if (executor !== undefined) {\n          result = executor.executeHitDetection(\n            context,\n            transform,\n            rotation,\n            featureCallback,\n            hitExtent,\n          );\n          if (result) {\n            return result;\n          }\n        }\n      }\n    }\n    return undefined;\n  }\n\n  /**\n   * @param {import(\"../../transform.js\").Transform} transform Transform.\n   * @return {Array<number>|null} Clip coordinates.\n   */\n  getClipCoords(transform) {\n    const maxExtent = this.maxExtent_;\n    if (!maxExtent) {\n      return null;\n    }\n    const minX = maxExtent[0];\n    const minY = maxExtent[1];\n    const maxX = maxExtent[2];\n    const maxY = maxExtent[3];\n    const flatClipCoords = [minX, minY, minX, maxY, maxX, maxY, maxX, minY];\n    transform2D(flatClipCoords, 0, 8, 2, transform, flatClipCoords);\n    return flatClipCoords;\n  }\n\n  /**\n   * @return {boolean} Is empty.\n   */\n  isEmpty() {\n    return isEmpty(this.executorsByZIndex_);\n  }\n\n  /**\n   * @param {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} targetContext Context.\n   * @param {import('../../size.js').Size} scaledCanvasSize Scale of the context.\n   * @param {import(\"../../transform.js\").Transform} transform Transform.\n   * @param {number} viewRotation View rotation.\n   * @param {boolean} snapToPixel Snap point symbols and test to integer pixel.\n   * @param {Array<import(\"../canvas.js\").BuilderType>} [builderTypes] Ordered replay types to replay.\n   *     Default is {@link module:ol/render/replay~ALL}\n   * @param {import(\"rbush\").default<import('./Executor.js').DeclutterEntry>|null} [declutterTree] Declutter tree.\n   *     When set to null, no decluttering is done, even when the executor group has a `ZIndexContext`.\n   */\n  execute(\n    targetContext,\n    scaledCanvasSize,\n    transform,\n    viewRotation,\n    snapToPixel,\n    builderTypes,\n    declutterTree,\n  ) {\n    const zs = Object.keys(this.executorsByZIndex_).map(Number);\n    zs.sort(declutterTree ? descending : ascending);\n\n    builderTypes = builderTypes ? builderTypes : ALL;\n    const maxBuilderTypes = ALL.length;\n    for (let i = 0, ii = zs.length; i < ii; ++i) {\n      const zIndexKey = zs[i].toString();\n      const replays = this.executorsByZIndex_[zIndexKey];\n      for (let j = 0, jj = builderTypes.length; j < jj; ++j) {\n        const builderType = builderTypes[j];\n        const replay = replays[builderType];\n        if (replay !== undefined) {\n          const zIndexContext =\n            declutterTree === null ? undefined : replay.getZIndexContext();\n          const context = zIndexContext\n            ? zIndexContext.getContext()\n            : targetContext;\n          const requireClip =\n            this.maxExtent_ &&\n            builderType !== 'Image' &&\n            builderType !== 'Text';\n          if (requireClip) {\n            context.save();\n            // setup clipping so that the parts of over-simplified geometries are not\n            // visible outside the current extent when panning\n            this.clip(context, transform);\n          }\n          if (\n            !zIndexContext ||\n            builderType === 'Text' ||\n            builderType === 'Image'\n          ) {\n            replay.execute(\n              context,\n              scaledCanvasSize,\n              transform,\n              viewRotation,\n              snapToPixel,\n              declutterTree,\n            );\n          } else {\n            zIndexContext.pushFunction((context) =>\n              replay.execute(\n                context,\n                scaledCanvasSize,\n                transform,\n                viewRotation,\n                snapToPixel,\n                declutterTree,\n              ),\n            );\n          }\n          if (requireClip) {\n            context.restore();\n          }\n          if (zIndexContext) {\n            zIndexContext.offset();\n            const index = zs[i] * maxBuilderTypes + ALL.indexOf(builderType);\n            if (!this.deferredZIndexContexts_[index]) {\n              this.deferredZIndexContexts_[index] = [];\n            }\n            this.deferredZIndexContexts_[index].push(zIndexContext);\n          }\n        }\n      }\n    }\n\n    this.renderedContext_ = targetContext;\n  }\n\n  getDeferredZIndexContexts() {\n    return this.deferredZIndexContexts_;\n  }\n\n  getRenderedContext() {\n    return this.renderedContext_;\n  }\n\n  renderDeferred() {\n    const deferredZIndexContexts = this.deferredZIndexContexts_;\n    const zs = Object.keys(deferredZIndexContexts).map(Number).sort(ascending);\n    for (let i = 0, ii = zs.length; i < ii; ++i) {\n      deferredZIndexContexts[zs[i]].forEach((zIndexContext) => {\n        zIndexContext.draw(this.renderedContext_); // FIXME Pass clip to replay for temporarily enabling clip\n        zIndexContext.clear();\n      });\n      deferredZIndexContexts[zs[i]].length = 0;\n    }\n  }\n}\n\n/**\n * This cache is used to store arrays of indexes for calculated pixel circles\n * to increase performance.\n * It is a static property to allow each Replaygroup to access it.\n * @type {Object<number, Array<number>>}\n */\nconst circlePixelIndexArrayCache = {};\n\n/**\n * This methods creates an array with indexes of all pixels within a circle,\n * ordered by how close they are to the center.\n * A cache is used to increase performance.\n * @param {number} radius Radius.\n * @return {Array<number>} An array with indexes within a circle.\n */\nexport function getPixelIndexArray(radius) {\n  if (circlePixelIndexArrayCache[radius] !== undefined) {\n    return circlePixelIndexArrayCache[radius];\n  }\n\n  const size = radius * 2 + 1;\n  const maxDistanceSq = radius * radius;\n  const distances = new Array(maxDistanceSq + 1);\n  for (let i = 0; i <= radius; ++i) {\n    for (let j = 0; j <= radius; ++j) {\n      const distanceSq = i * i + j * j;\n      if (distanceSq > maxDistanceSq) {\n        break;\n      }\n      let distance = distances[distanceSq];\n      if (!distance) {\n        distance = [];\n        distances[distanceSq] = distance;\n      }\n      distance.push(((radius + i) * size + (radius + j)) * 4 + 3);\n      if (i > 0) {\n        distance.push(((radius - i) * size + (radius + j)) * 4 + 3);\n      }\n      if (j > 0) {\n        distance.push(((radius + i) * size + (radius - j)) * 4 + 3);\n        if (i > 0) {\n          distance.push(((radius - i) * size + (radius - j)) * 4 + 3);\n        }\n      }\n    }\n  }\n\n  const pixelIndex = [];\n  for (let i = 0, ii = distances.length; i < ii; ++i) {\n    if (distances[i]) {\n      pixelIndex.push(...distances[i]);\n    }\n  }\n\n  circlePixelIndexArrayCache[radius] = pixelIndex;\n  return pixelIndex;\n}\n\nexport default ExecutorGroup;\n", "/**\n * @module ol/style/Icon\n */\nimport ImageState from '../ImageState.js';\nimport {assert} from '../asserts.js';\nimport {asArray} from '../color.js';\nimport EventType from '../events/EventType.js';\nimport {getUid} from '../util.js';\nimport {get as getIconImage} from './IconImage.js';\nimport ImageStyle from './Image.js';\n\n/**\n * @typedef {'fraction' | 'pixels'} IconAnchorUnits\n * Anchor unit can be either a fraction of the icon size or in pixels.\n */\n\n/**\n * @typedef {'bottom-left' | 'bottom-right' | 'top-left' | 'top-right'} IconOrigin\n * Icon origin. One of 'bottom-left', 'bottom-right', 'top-left', 'top-right'.\n */\n\n/**\n * @typedef {Object} Options\n * @property {Array<number>} [anchor=[0.5, 0.5]] Anchor. Default value is the icon center.\n * @property {IconOrigin} [anchorOrigin='top-left'] Origin of the anchor: `bottom-left`, `bottom-right`,\n * `top-left` or `top-right`.\n * @property {IconAnchorUnits} [anchorXUnits='fraction'] Units in which the anchor x value is\n * specified. A value of `'fraction'` indicates the x value is a fraction of the icon. A value of `'pixels'` indicates\n * the x value in pixels.\n * @property {IconAnchorUnits} [anchorYUnits='fraction'] Units in which the anchor y value is\n * specified. A value of `'fraction'` indicates the y value is a fraction of the icon. A value of `'pixels'` indicates\n * the y value in pixels.\n * @property {import(\"../color.js\").Color|string} [color] Color to tint the icon. If not specified,\n * the icon will be left as is.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that you must provide a\n * `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {ReferrerPolicy} [referrerPolicy] The `referrerPolicy` property for loaded images.\n * @property {HTMLImageElement|HTMLCanvasElement|OffscreenCanvas|ImageBitmap} [img] Image object for the icon.\n * @property {Array<number>} [displacement=[0, 0]] Displacement of the icon in pixels.\n * Positive values will shift the icon right and up.\n * @property {number} [opacity=1] Opacity of the icon.\n * @property {number} [width] The width of the icon in pixels. This can't be used together with `scale`.\n * @property {number} [height] The height of the icon in pixels. This can't be used together with `scale`.\n * @property {number|import(\"../size.js\").Size} [scale=1] Scale.\n * @property {boolean} [rotateWithView=false] Whether to rotate the icon with the view.\n * @property {number} [rotation=0] Rotation in radians (positive rotation clockwise).\n * @property {Array<number>} [offset=[0, 0]] Offset which, together with `size` and `offsetOrigin`, defines the\n * sub-rectangle to use from the original (sprite) image.\n * @property {IconOrigin} [offsetOrigin='top-left'] Origin of the offset: `bottom-left`, `bottom-right`,\n * `top-left` or `top-right`.\n * @property {import(\"../size.js\").Size} [size] Icon size in pixels. Used together with `offset` to define the\n * sub-rectangle to use from the original (sprite) image.\n * @property {string} [src] Image source URI.\n * @property {import(\"./Style.js\").DeclutterMode} [declutterMode] Declutter mode.\n */\n\n/**\n * @param {number} width The width.\n * @param {number} height The height.\n * @param {number|undefined} wantedWidth The wanted width.\n * @param {number|undefined} wantedHeight The wanted height.\n * @return {number|Array<number>} The scale.\n */\nfunction calculateScale(width, height, wantedWidth, wantedHeight) {\n  if (wantedWidth !== undefined && wantedHeight !== undefined) {\n    return [wantedWidth / width, wantedHeight / height];\n  }\n  if (wantedWidth !== undefined) {\n    return wantedWidth / width;\n  }\n  if (wantedHeight !== undefined) {\n    return wantedHeight / height;\n  }\n  return 1;\n}\n\n/**\n * @classdesc\n * Set icon style for vector features.\n * @api\n */\nclass Icon extends ImageStyle {\n  /**\n   * @param {Options} [options] Options.\n   */\n  constructor(options) {\n    options = options || {};\n\n    /**\n     * @type {number}\n     */\n    const opacity = options.opacity !== undefined ? options.opacity : 1;\n\n    /**\n     * @type {number}\n     */\n    const rotation = options.rotation !== undefined ? options.rotation : 0;\n\n    /**\n     * @type {number|import(\"../size.js\").Size}\n     */\n    const scale = options.scale !== undefined ? options.scale : 1;\n\n    /**\n     * @type {boolean}\n     */\n    const rotateWithView =\n      options.rotateWithView !== undefined ? options.rotateWithView : false;\n\n    super({\n      opacity: opacity,\n      rotation: rotation,\n      scale: scale,\n      displacement:\n        options.displacement !== undefined ? options.displacement : [0, 0],\n      rotateWithView: rotateWithView,\n      declutterMode: options.declutterMode,\n    });\n\n    /**\n     * @private\n     * @type {Array<number>}\n     */\n    this.anchor_ = options.anchor !== undefined ? options.anchor : [0.5, 0.5];\n\n    /**\n     * @private\n     * @type {Array<number>}\n     */\n    this.normalizedAnchor_ = null;\n\n    /**\n     * @private\n     * @type {IconOrigin}\n     */\n    this.anchorOrigin_ =\n      options.anchorOrigin !== undefined ? options.anchorOrigin : 'top-left';\n\n    /**\n     * @private\n     * @type {IconAnchorUnits}\n     */\n    this.anchorXUnits_ =\n      options.anchorXUnits !== undefined ? options.anchorXUnits : 'fraction';\n\n    /**\n     * @private\n     * @type {IconAnchorUnits}\n     */\n    this.anchorYUnits_ =\n      options.anchorYUnits !== undefined ? options.anchorYUnits : 'fraction';\n\n    /**\n     * @private\n     * @type {?string}\n     */\n    this.crossOrigin_ =\n      options.crossOrigin !== undefined ? options.crossOrigin : null;\n\n    /**\n     * @private\n     * @type {ReferrerPolicy}\n     */\n    this.referrerPolicy_ = options.referrerPolicy;\n\n    const image = options.img !== undefined ? options.img : null;\n\n    let cacheKey = options.src;\n\n    assert(\n      !(cacheKey !== undefined && image),\n      '`image` and `src` cannot be provided at the same time',\n    );\n\n    if ((cacheKey === undefined || cacheKey.length === 0) && image) {\n      cacheKey = /** @type {HTMLImageElement} */ (image).src || getUid(image);\n    }\n    assert(\n      cacheKey !== undefined && cacheKey.length > 0,\n      'A defined and non-empty `src` or `image` must be provided',\n    );\n\n    assert(\n      !(\n        (options.width !== undefined || options.height !== undefined) &&\n        options.scale !== undefined\n      ),\n      '`width` or `height` cannot be provided together with `scale`',\n    );\n\n    let imageState;\n    if (options.src !== undefined) {\n      imageState = ImageState.IDLE;\n    } else if (image !== undefined) {\n      if ('complete' in image) {\n        if (image.complete) {\n          imageState = image.src ? ImageState.LOADED : ImageState.IDLE;\n        } else {\n          imageState = ImageState.LOADING;\n        }\n      } else {\n        imageState = ImageState.LOADED;\n      }\n    }\n\n    /**\n     * @private\n     * @type {import(\"../color.js\").Color}\n     */\n    this.color_ = options.color !== undefined ? asArray(options.color) : null;\n\n    /**\n     * @private\n     * @type {import(\"./IconImage.js\").default}\n     */\n    this.iconImage_ = getIconImage(\n      image,\n      /** @type {string} */ (cacheKey),\n      {\n        crossOrigin: this.crossOrigin_,\n        referrerPolicy: this.referrerPolicy_,\n      },\n      imageState,\n      this.color_,\n    );\n\n    /**\n     * @private\n     * @type {Array<number>}\n     */\n    this.offset_ = options.offset !== undefined ? options.offset : [0, 0];\n    /**\n     * @private\n     * @type {IconOrigin}\n     */\n    this.offsetOrigin_ =\n      options.offsetOrigin !== undefined ? options.offsetOrigin : 'top-left';\n\n    /**\n     * @private\n     * @type {Array<number>}\n     */\n    this.origin_ = null;\n\n    /**\n     * @private\n     * @type {import(\"../size.js\").Size}\n     */\n    this.size_ = options.size !== undefined ? options.size : null;\n\n    /**\n     * @private\n     */\n    this.initialOptions_;\n\n    /**\n     * Calculate the scale if width or height were given.\n     */\n    if (options.width !== undefined || options.height !== undefined) {\n      let width, height;\n      if (options.size) {\n        [width, height] = options.size;\n      } else {\n        const image = this.getImage(1);\n        if (image.width && image.height) {\n          width = image.width;\n          height = image.height;\n        } else if (image instanceof HTMLImageElement) {\n          this.initialOptions_ = options;\n          const onload = () => {\n            this.unlistenImageChange(onload);\n            if (!this.initialOptions_) {\n              return;\n            }\n            const imageSize = this.iconImage_.getSize();\n            this.setScale(\n              calculateScale(\n                imageSize[0],\n                imageSize[1],\n                options.width,\n                options.height,\n              ),\n            );\n          };\n          this.listenImageChange(onload);\n          return;\n        }\n      }\n      if (width !== undefined) {\n        this.setScale(\n          calculateScale(width, height, options.width, options.height),\n        );\n      }\n    }\n  }\n\n  /**\n   * Clones the style. The underlying Image/HTMLCanvasElement is not cloned.\n   * @return {Icon} The cloned style.\n   * @api\n   * @override\n   */\n  clone() {\n    let scale, width, height;\n    if (this.initialOptions_) {\n      width = this.initialOptions_.width;\n      height = this.initialOptions_.height;\n    } else {\n      scale = this.getScale();\n      scale = Array.isArray(scale) ? scale.slice() : scale;\n    }\n    return new Icon({\n      anchor: this.anchor_.slice(),\n      anchorOrigin: this.anchorOrigin_,\n      anchorXUnits: this.anchorXUnits_,\n      anchorYUnits: this.anchorYUnits_,\n      color:\n        this.color_ && this.color_.slice\n          ? this.color_.slice()\n          : this.color_ || undefined,\n      crossOrigin: this.crossOrigin_,\n      referrerPolicy: this.referrerPolicy_,\n      offset: this.offset_.slice(),\n      offsetOrigin: this.offsetOrigin_,\n      opacity: this.getOpacity(),\n      rotateWithView: this.getRotateWithView(),\n      rotation: this.getRotation(),\n      scale,\n      width,\n      height,\n      size: this.size_ !== null ? this.size_.slice() : undefined,\n      src: this.getSrc(),\n      displacement: this.getDisplacement().slice(),\n      declutterMode: this.getDeclutterMode(),\n    });\n  }\n\n  /**\n   * Get the anchor point in pixels. The anchor determines the center point for the\n   * symbolizer.\n   * @return {Array<number>} Anchor.\n   * @api\n   * @override\n   */\n  getAnchor() {\n    let anchor = this.normalizedAnchor_;\n    if (!anchor) {\n      anchor = this.anchor_;\n      const size = this.getSize();\n      if (\n        this.anchorXUnits_ == 'fraction' ||\n        this.anchorYUnits_ == 'fraction'\n      ) {\n        if (!size) {\n          return null;\n        }\n        anchor = this.anchor_.slice();\n        if (this.anchorXUnits_ == 'fraction') {\n          anchor[0] *= size[0];\n        }\n        if (this.anchorYUnits_ == 'fraction') {\n          anchor[1] *= size[1];\n        }\n      }\n\n      if (this.anchorOrigin_ != 'top-left') {\n        if (!size) {\n          return null;\n        }\n        if (anchor === this.anchor_) {\n          anchor = this.anchor_.slice();\n        }\n        if (\n          this.anchorOrigin_ == 'top-right' ||\n          this.anchorOrigin_ == 'bottom-right'\n        ) {\n          anchor[0] = -anchor[0] + size[0];\n        }\n        if (\n          this.anchorOrigin_ == 'bottom-left' ||\n          this.anchorOrigin_ == 'bottom-right'\n        ) {\n          anchor[1] = -anchor[1] + size[1];\n        }\n      }\n      this.normalizedAnchor_ = anchor;\n    }\n    const displacement = this.getDisplacement();\n    const scale = this.getScaleArray();\n    // anchor is scaled by renderer but displacement should not be scaled\n    // so divide by scale here\n    return [\n      anchor[0] - displacement[0] / scale[0],\n      anchor[1] + displacement[1] / scale[1],\n    ];\n  }\n\n  /**\n   * Set the anchor point. The anchor determines the center point for the\n   * symbolizer.\n   *\n   * @param {Array<number>} anchor Anchor.\n   * @api\n   */\n  setAnchor(anchor) {\n    this.anchor_ = anchor;\n    this.normalizedAnchor_ = null;\n  }\n\n  /**\n   * Get the icon color.\n   * @return {import(\"../color.js\").Color} Color.\n   * @api\n   */\n  getColor() {\n    return this.color_;\n  }\n\n  /**\n   * Set the icon color.\n   *\n   * Warning: Repeatedly setting the color on an icon style\n   * causes the icon image to be re-created each time. This can have a\n   * severe performance impact.\n   *\n   * @param {import(\"../color.js\").Color|string|null|undefined} color Color.\n   */\n  setColor(color) {\n    const nextColor = color ? asArray(color) : null;\n    if (\n      this.color_ === nextColor ||\n      (this.color_ &&\n        nextColor &&\n        this.color_.length === nextColor.length &&\n        this.color_.every((value, index) => value === nextColor[index]))\n    ) {\n      // Discard if the color hasn't changed.\n      return;\n    }\n\n    this.color_ = nextColor;\n    const src = this.getSrc();\n    const image = src !== undefined ? null : this.getHitDetectionImage();\n    const imageState =\n      src !== undefined ? ImageState.IDLE : this.iconImage_.getImageState();\n    this.iconImage_ = getIconImage(\n      image,\n      src,\n      {\n        crossOrigin: this.crossOrigin_,\n        referrerPolicy: this.referrerPolicy_,\n      },\n      imageState,\n      this.color_,\n    );\n  }\n\n  /**\n   * Get the image icon.\n   * @param {number} pixelRatio Pixel ratio.\n   * @return {HTMLImageElement|HTMLCanvasElement|OffscreenCanvas|ImageBitmap} Image or Canvas element. If the Icon\n   * style was configured with `src` or with a not let loaded `img`, an `ImageBitmap` will be returned.\n   * @api\n   * @override\n   */\n  getImage(pixelRatio) {\n    return this.iconImage_.getImage(pixelRatio);\n  }\n\n  /**\n   * Get the pixel ratio.\n   * @param {number} pixelRatio Pixel ratio.\n   * @return {number} The pixel ratio of the image.\n   * @api\n   * @override\n   */\n  getPixelRatio(pixelRatio) {\n    return this.iconImage_.getPixelRatio(pixelRatio);\n  }\n\n  /**\n   * @return {import(\"../size.js\").Size} Image size.\n   * @override\n   */\n  getImageSize() {\n    return this.iconImage_.getSize();\n  }\n\n  /**\n   * @return {import(\"../ImageState.js\").default} Image state.\n   * @override\n   */\n  getImageState() {\n    return this.iconImage_.getImageState();\n  }\n\n  /**\n   * @return {HTMLImageElement|HTMLCanvasElement|OffscreenCanvas|ImageBitmap} Image element.\n   * @override\n   */\n  getHitDetectionImage() {\n    return this.iconImage_.getHitDetectionImage();\n  }\n\n  /**\n   * Get the origin of the symbolizer.\n   * @return {Array<number>} Origin.\n   * @api\n   * @override\n   */\n  getOrigin() {\n    if (this.origin_) {\n      return this.origin_;\n    }\n    let offset = this.offset_;\n\n    if (this.offsetOrigin_ != 'top-left') {\n      const size = this.getSize();\n      const iconImageSize = this.iconImage_.getSize();\n      if (!size || !iconImageSize) {\n        return null;\n      }\n      offset = offset.slice();\n      if (\n        this.offsetOrigin_ == 'top-right' ||\n        this.offsetOrigin_ == 'bottom-right'\n      ) {\n        offset[0] = iconImageSize[0] - size[0] - offset[0];\n      }\n      if (\n        this.offsetOrigin_ == 'bottom-left' ||\n        this.offsetOrigin_ == 'bottom-right'\n      ) {\n        offset[1] = iconImageSize[1] - size[1] - offset[1];\n      }\n    }\n    this.origin_ = offset;\n    return this.origin_;\n  }\n\n  /**\n   * Get the image URL.\n   * @return {string|undefined} Image src.\n   * @api\n   */\n  getSrc() {\n    return this.iconImage_.getSrc();\n  }\n\n  /**\n   * Set the image URI\n   * @param {string} src Image source URI\n   * @api\n   */\n  setSrc(src) {\n    this.iconImage_ = getIconImage(\n      null,\n      src,\n      {\n        crossOrigin: this.crossOrigin_,\n        referrerPolicy: this.referrerPolicy_,\n      },\n      ImageState.IDLE,\n      this.color_,\n    );\n  }\n\n  /**\n   * Get the size of the icon (in pixels).\n   * @return {import(\"../size.js\").Size} Image size.\n   * @api\n   * @override\n   */\n  getSize() {\n    return !this.size_ ? this.iconImage_.getSize() : this.size_;\n  }\n\n  /**\n   * Get the width of the icon (in pixels). Will return undefined when the icon image is not yet loaded.\n   * @return {number} Icon width (in pixels).\n   * @api\n   */\n  getWidth() {\n    const scale = this.getScaleArray();\n    if (this.size_) {\n      return this.size_[0] * scale[0];\n    }\n    if (this.iconImage_.getImageState() == ImageState.LOADED) {\n      return this.iconImage_.getSize()[0] * scale[0];\n    }\n    return undefined;\n  }\n\n  /**\n   * Get the height of the icon (in pixels). Will return undefined when the icon image is not yet loaded.\n   * @return {number} Icon height (in pixels).\n   * @api\n   */\n  getHeight() {\n    const scale = this.getScaleArray();\n    if (this.size_) {\n      return this.size_[1] * scale[1];\n    }\n    if (this.iconImage_.getImageState() == ImageState.LOADED) {\n      return this.iconImage_.getSize()[1] * scale[1];\n    }\n    return undefined;\n  }\n\n  /**\n   * Set the scale.\n   *\n   * @param {number|import(\"../size.js\").Size} scale Scale.\n   * @api\n   * @override\n   */\n  setScale(scale) {\n    delete this.initialOptions_;\n    super.setScale(scale);\n  }\n\n  /**\n   * @param {function(import(\"../events/Event.js\").default): void} listener Listener function.\n   * @override\n   */\n  listenImageChange(listener) {\n    this.iconImage_.addEventListener(EventType.CHANGE, listener);\n  }\n\n  /**\n   * Load not yet loaded URI.\n   * When rendering a feature with an icon style, the vector renderer will\n   * automatically call this method. However, you might want to call this\n   * method yourself for preloading or other purposes.\n   * @api\n   * @override\n   */\n  load() {\n    this.iconImage_.load();\n  }\n\n  /**\n   * @param {function(import(\"../events/Event.js\").default): void} listener Listener function.\n   * @override\n   */\n  unlistenImageChange(listener) {\n    this.iconImage_.removeEventListener(EventType.CHANGE, listener);\n  }\n\n  /**\n   * @override\n   */\n  ready() {\n    return this.iconImage_.ready();\n  }\n}\n\nexport default Icon;\n", "/**\n * @module ol/render/canvas/Immediate\n */\n// FIXME test, especially polygons with holes and multipolygons\n// FIXME need to handle large thick features (where pixel size matters)\n// FIXME add offset and end to ol/geom/flat/transform~transform2D?\n\nimport {equals} from '../../array.js';\nimport {asColorLike} from '../../colorlike.js';\nimport {intersects} from '../../extent.js';\nimport {transformGeom2D} from '../../geom/SimpleGeometry.js';\nimport {\n  offsetLineString,\n  removeOffsetCycles,\n} from '../../geom/flat/lineoffset.js';\nimport {transform2D} from '../../geom/flat/transform.js';\nimport {toFixed} from '../../math.js';\nimport {\n  compose as composeTransform,\n  create as createTransform,\n} from '../../transform.js';\nimport VectorContext from '../VectorContext.js';\nimport {\n  defaultFillStyle,\n  defaultFont,\n  defaultLineCap,\n  defaultLineDash,\n  defaultLineDashOffset,\n  defaultLineJoin,\n  defaultLineWidth,\n  defaultMiterLimit,\n  defaultStrokeStyle,\n  defaultTextAlign,\n  defaultTextBaseline,\n} from '../canvas.js';\n\n/**\n * @classdesc\n * A concrete subclass of {@link module:ol/render/VectorContext~VectorContext} that implements\n * direct rendering of features and geometries to an HTML5 Canvas context.\n * Instances of this class are created internally by the library and\n * provided to application code as vectorContext member of the\n * {@link module:ol/render/Event~RenderEvent} object associated with postcompose, precompose and\n * render events emitted by layers and maps.\n */\nclass CanvasImmediateRenderer extends VectorContext {\n  /**\n   * @param {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} context Context.\n   * @param {number} pixelRatio Pixel ratio.\n   * @param {import(\"../../extent.js\").Extent} extent Extent.\n   * @param {import(\"../../transform.js\").Transform} transform Transform.\n   * @param {number} viewRotation View rotation.\n   * @param {number} [squaredTolerance] Optional squared tolerance for simplification.\n   * @param {import(\"../../proj.js\").TransformFunction} [userTransform] Transform from user to view projection.\n   */\n  constructor(\n    context,\n    pixelRatio,\n    extent,\n    transform,\n    viewRotation,\n    squaredTolerance,\n    userTransform,\n  ) {\n    super();\n\n    /**\n     * @private\n     * @type {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D}\n     */\n    this.context_ = context;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.pixelRatio_ = pixelRatio;\n\n    /**\n     * @private\n     * @type {import(\"../../extent.js\").Extent}\n     */\n    this.extent_ = extent;\n\n    /**\n     * @private\n     * @type {import(\"../../transform.js\").Transform}\n     */\n    this.transform_ = transform;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.transformRotation_ = transform\n      ? toFixed(Math.atan2(transform[1], transform[0]), 10)\n      : 0;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.viewRotation_ = viewRotation;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.squaredTolerance_ = squaredTolerance;\n\n    /**\n     * @private\n     * @type {import(\"../../proj.js\").TransformFunction}\n     */\n    this.userTransform_ = userTransform;\n\n    /**\n     * @private\n     * @type {?import(\"../canvas.js\").FillState}\n     */\n    this.contextFillState_ = null;\n\n    /**\n     * @private\n     * @type {?import(\"../canvas.js\").StrokeState}\n     */\n    this.contextStrokeState_ = null;\n\n    /**\n     * @private\n     * @type {?import(\"../canvas.js\").TextState}\n     */\n    this.contextTextState_ = null;\n\n    /**\n     * @private\n     * @type {?import(\"../canvas.js\").FillState}\n     */\n    this.fillState_ = null;\n\n    /**\n     * @private\n     * @type {?import(\"../canvas.js\").StrokeState}\n     */\n    this.strokeState_ = null;\n\n    /**\n     * @private\n     * @type {import('../../DataTile.js').ImageLike}\n     */\n    this.image_ = null;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.imageAnchorX_ = 0;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.imageAnchorY_ = 0;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.imageHeight_ = 0;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.imageOpacity_ = 0;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.imageOriginX_ = 0;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.imageOriginY_ = 0;\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.imageRotateWithView_ = false;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.imageRotation_ = 0;\n\n    /**\n     * @private\n     * @type {import(\"../../size.js\").Size}\n     */\n    this.imageScale_ = [0, 0];\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.imageWidth_ = 0;\n\n    /**\n     * @private\n     * @type {string}\n     */\n    this.text_ = '';\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.textOffsetX_ = 0;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.textOffsetY_ = 0;\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.textRotateWithView_ = false;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.textRotation_ = 0;\n\n    /**\n     * @private\n     * @type {import(\"../../size.js\").Size}\n     */\n    this.textScale_ = [0, 0];\n\n    /**\n     * @private\n     * @type {?import(\"../canvas.js\").FillState}\n     */\n    this.textFillState_ = null;\n\n    /**\n     * @private\n     * @type {?import(\"../canvas.js\").StrokeState}\n     */\n    this.textStrokeState_ = null;\n\n    /**\n     * @private\n     * @type {?import(\"../canvas.js\").TextState}\n     */\n    this.textState_ = null;\n\n    /**\n     * @private\n     * @type {Array<number>}\n     */\n    this.pixelCoordinates_ = [];\n\n    /**\n     * @private\n     * @type {import(\"../../transform.js\").Transform}\n     */\n    this.tmpLocalTransform_ = createTransform();\n  }\n\n  /**\n   * @param {Array<number>} flatCoordinates Flat coordinates.\n   * @param {number} offset Offset.\n   * @param {number} end End.\n   * @param {number} stride Stride.\n   * @private\n   */\n  drawImages_(flatCoordinates, offset, end, stride) {\n    if (!this.image_) {\n      return;\n    }\n    const pixelCoordinates = transform2D(\n      flatCoordinates,\n      offset,\n      end,\n      stride,\n      this.transform_,\n      this.pixelCoordinates_,\n    );\n    const context = this.context_;\n    const localTransform = this.tmpLocalTransform_;\n    const alpha = context.globalAlpha;\n    if (this.imageOpacity_ != 1) {\n      context.globalAlpha = alpha * this.imageOpacity_;\n    }\n    let rotation = this.imageRotation_;\n    if (this.transformRotation_ === 0) {\n      rotation -= this.viewRotation_;\n    }\n    if (this.imageRotateWithView_) {\n      rotation += this.viewRotation_;\n    }\n    for (let i = 0, ii = pixelCoordinates.length; i < ii; i += 2) {\n      const x = pixelCoordinates[i] - this.imageAnchorX_;\n      const y = pixelCoordinates[i + 1] - this.imageAnchorY_;\n      if (\n        rotation !== 0 ||\n        this.imageScale_[0] != 1 ||\n        this.imageScale_[1] != 1\n      ) {\n        const centerX = x + this.imageAnchorX_;\n        const centerY = y + this.imageAnchorY_;\n        composeTransform(\n          localTransform,\n          centerX,\n          centerY,\n          1,\n          1,\n          rotation,\n          -centerX,\n          -centerY,\n        );\n        context.save();\n        context.transform.apply(context, localTransform);\n        context.translate(centerX, centerY);\n        context.scale(this.imageScale_[0], this.imageScale_[1]);\n        context.drawImage(\n          this.image_,\n          this.imageOriginX_,\n          this.imageOriginY_,\n          this.imageWidth_,\n          this.imageHeight_,\n          -this.imageAnchorX_,\n          -this.imageAnchorY_,\n          this.imageWidth_,\n          this.imageHeight_,\n        );\n        context.restore();\n      } else {\n        context.drawImage(\n          this.image_,\n          this.imageOriginX_,\n          this.imageOriginY_,\n          this.imageWidth_,\n          this.imageHeight_,\n          x,\n          y,\n          this.imageWidth_,\n          this.imageHeight_,\n        );\n      }\n    }\n    if (this.imageOpacity_ != 1) {\n      context.globalAlpha = alpha;\n    }\n  }\n\n  /**\n   * @param {Array<number>} flatCoordinates Flat coordinates.\n   * @param {number} offset Offset.\n   * @param {number} end End.\n   * @param {number} stride Stride.\n   * @private\n   */\n  drawText_(flatCoordinates, offset, end, stride) {\n    if (!this.textState_ || this.text_ === '') {\n      return;\n    }\n    if (this.textFillState_) {\n      this.setContextFillState_(this.textFillState_);\n    }\n    if (this.textStrokeState_) {\n      this.setContextStrokeState_(this.textStrokeState_);\n    }\n    this.setContextTextState_(this.textState_);\n    const pixelCoordinates = transform2D(\n      flatCoordinates,\n      offset,\n      end,\n      stride,\n      this.transform_,\n      this.pixelCoordinates_,\n    );\n    const context = this.context_;\n    let rotation = this.textRotation_;\n    if (this.transformRotation_ === 0) {\n      rotation -= this.viewRotation_;\n    }\n    if (this.textRotateWithView_) {\n      rotation += this.viewRotation_;\n    }\n    for (; offset < end; offset += stride) {\n      const x = pixelCoordinates[offset] + this.textOffsetX_;\n      const y = pixelCoordinates[offset + 1] + this.textOffsetY_;\n      if (\n        rotation !== 0 ||\n        this.textScale_[0] != 1 ||\n        this.textScale_[1] != 1\n      ) {\n        context.save();\n        context.translate(x - this.textOffsetX_, y - this.textOffsetY_);\n        context.rotate(rotation);\n        context.translate(this.textOffsetX_, this.textOffsetY_);\n        context.scale(this.textScale_[0], this.textScale_[1]);\n        if (this.textStrokeState_) {\n          context.strokeText(this.text_, 0, 0);\n        }\n        if (this.textFillState_) {\n          context.fillText(this.text_, 0, 0);\n        }\n        context.restore();\n      } else {\n        if (this.textStrokeState_) {\n          context.strokeText(this.text_, x, y);\n        }\n        if (this.textFillState_) {\n          context.fillText(this.text_, x, y);\n        }\n      }\n    }\n  }\n\n  /**\n   * @param {Array<number>} flatCoordinates Flat coordinates.\n   * @param {number} offset Offset.\n   * @param {number} end End.\n   * @param {number} stride Stride.\n   * @param {boolean} close Close.\n   * @param {number} [strokeOffset] Stroke Offset.\n   * @private\n   * @return {number} end End.\n   */\n  moveToLineTo_(flatCoordinates, offset, end, stride, close, strokeOffset) {\n    const context = this.context_;\n    let pixelCoordinates = transform2D(\n      flatCoordinates,\n      offset,\n      end,\n      stride,\n      this.transform_,\n      this.pixelCoordinates_,\n    );\n    if (Math.abs(strokeOffset) > 0) {\n      const n = pixelCoordinates.length;\n      const isClosedLine =\n        close ||\n        (Math.abs(pixelCoordinates[0] - pixelCoordinates[n - 2]) < 1e-6 &&\n          Math.abs(pixelCoordinates[1] - pixelCoordinates[n - 1]) < 1e-6);\n      pixelCoordinates = offsetLineString(\n        pixelCoordinates,\n        0,\n        n,\n        2,\n        strokeOffset,\n        isClosedLine,\n        pixelCoordinates,\n      );\n      removeOffsetCycles(pixelCoordinates, 2, isClosedLine);\n    }\n    context.moveTo(pixelCoordinates[0], pixelCoordinates[1]);\n    let length = pixelCoordinates.length;\n    if (close) {\n      length -= 2;\n    }\n    for (let i = 2; i < length; i += 2) {\n      context.lineTo(pixelCoordinates[i], pixelCoordinates[i + 1]);\n    }\n    if (close) {\n      context.closePath();\n    }\n    return end;\n  }\n\n  /**\n   * @param {Array<number>} flatCoordinates Flat coordinates.\n   * @param {number} offset Offset.\n   * @param {Array<number>} ends Ends.\n   * @param {number} stride Stride.\n   * @param {number} [strokeOffset] Stroke Offset.\n   * @private\n   * @return {number} End.\n   */\n  drawRings_(flatCoordinates, offset, ends, stride, strokeOffset) {\n    for (let i = 0, ii = ends.length; i < ii; ++i) {\n      offset = this.moveToLineTo_(\n        flatCoordinates,\n        offset,\n        ends[i],\n        stride,\n        true,\n        strokeOffset,\n      );\n    }\n    return offset;\n  }\n\n  /**\n   * Render a circle geometry into the canvas.  Rendering is immediate and uses\n   * the current fill and stroke styles.\n   *\n   * @param {import(\"../../geom/Circle.js\").default} geometry Circle geometry.\n   * @api\n   * @override\n   */\n  drawCircle(geometry) {\n    if (this.squaredTolerance_) {\n      geometry = /** @type {import(\"../../geom/Circle.js\").default} */ (\n        geometry.simplifyTransformed(\n          this.squaredTolerance_,\n          this.userTransform_,\n        )\n      );\n    }\n    if (!intersects(this.extent_, geometry.getExtent())) {\n      return;\n    }\n    if (this.fillState_ || this.strokeState_) {\n      if (this.fillState_) {\n        this.setContextFillState_(this.fillState_);\n      }\n      if (this.strokeState_) {\n        this.setContextStrokeState_(this.strokeState_);\n      }\n      const pixelCoordinates = transformGeom2D(\n        geometry,\n        this.transform_,\n        this.pixelCoordinates_,\n      );\n      const dx = pixelCoordinates[2] - pixelCoordinates[0];\n      const dy = pixelCoordinates[3] - pixelCoordinates[1];\n      const radius = Math.sqrt(dx * dx + dy * dy);\n      const context = this.context_;\n      context.beginPath();\n      context.arc(\n        pixelCoordinates[0],\n        pixelCoordinates[1],\n        radius,\n        0,\n        2 * Math.PI,\n      );\n      if (this.fillState_) {\n        context.fill();\n      }\n      if (this.strokeState_) {\n        context.stroke();\n      }\n    }\n    if (this.text_ !== '') {\n      this.drawText_(geometry.getCenter(), 0, 2, 2);\n    }\n  }\n\n  /**\n   * Set the rendering style.  Note that since this is an immediate rendering API,\n   * any `zIndex` on the provided style will be ignored.\n   *\n   * @param {import(\"../../style/Style.js\").default} style The rendering style.\n   * @api\n   * @override\n   */\n  setStyle(style) {\n    this.setFillStrokeStyle(style.getFill(), style.getStroke());\n    this.setImageStyle(style.getImage());\n    this.setTextStyle(style.getText());\n  }\n\n  /**\n   * @param {import(\"../../transform.js\").Transform} transform Transform.\n   */\n  setTransform(transform) {\n    this.transform_ = transform;\n  }\n\n  /**\n   * Render a geometry into the canvas.  Call\n   * {@link module:ol/render/canvas/Immediate~CanvasImmediateRenderer#setStyle renderer.setStyle()} first to set the rendering style.\n   *\n   * @param {import(\"../../geom/Geometry.js\").default|import(\"../Feature.js\").default} geometry The geometry to render.\n   * @api\n   * @override\n   */\n  drawGeometry(geometry) {\n    const type = geometry.getType();\n    switch (type) {\n      case 'Point':\n        this.drawPoint(\n          /** @type {import(\"../../geom/Point.js\").default} */ (geometry),\n        );\n        break;\n      case 'LineString':\n        this.drawLineString(\n          /** @type {import(\"../../geom/LineString.js\").default} */ (geometry),\n        );\n        break;\n      case 'Polygon':\n        this.drawPolygon(\n          /** @type {import(\"../../geom/Polygon.js\").default} */ (geometry),\n        );\n        break;\n      case 'MultiPoint':\n        this.drawMultiPoint(\n          /** @type {import(\"../../geom/MultiPoint.js\").default} */ (geometry),\n        );\n        break;\n      case 'MultiLineString':\n        this.drawMultiLineString(\n          /** @type {import(\"../../geom/MultiLineString.js\").default} */ (\n            geometry\n          ),\n        );\n        break;\n      case 'MultiPolygon':\n        this.drawMultiPolygon(\n          /** @type {import(\"../../geom/MultiPolygon.js\").default} */ (\n            geometry\n          ),\n        );\n        break;\n      case 'GeometryCollection':\n        this.drawGeometryCollection(\n          /** @type {import(\"../../geom/GeometryCollection.js\").default} */ (\n            geometry\n          ),\n        );\n        break;\n      case 'Circle':\n        this.drawCircle(\n          /** @type {import(\"../../geom/Circle.js\").default} */ (geometry),\n        );\n        break;\n      default:\n    }\n  }\n\n  /**\n   * Render a feature into the canvas.  Note that any `zIndex` on the provided\n   * style will be ignored - features are rendered immediately in the order that\n   * this method is called.  If you need `zIndex` support, you should be using an\n   * {@link module:ol/layer/Vector~VectorLayer} instead.\n   *\n   * @param {import(\"../../Feature.js\").default} feature Feature.\n   * @param {import(\"../../style/Style.js\").default} style Style.\n   * @api\n   * @override\n   */\n  drawFeature(feature, style) {\n    const geometry = style.getGeometryFunction()(feature);\n    if (!geometry) {\n      return;\n    }\n    this.setStyle(style);\n    this.drawGeometry(geometry);\n  }\n\n  /**\n   * Render a GeometryCollection to the canvas.  Rendering is immediate and\n   * uses the current styles appropriate for each geometry in the collection.\n   *\n   * @param {import(\"../../geom/GeometryCollection.js\").default} geometry Geometry collection.\n   * @override\n   */\n  drawGeometryCollection(geometry) {\n    const geometries = geometry.getGeometriesArray();\n    for (let i = 0, ii = geometries.length; i < ii; ++i) {\n      this.drawGeometry(geometries[i]);\n    }\n  }\n\n  /**\n   * Render a Point geometry into the canvas.  Rendering is immediate and uses\n   * the current style.\n   *\n   * @param {import(\"../../geom/Point.js\").default|import(\"../Feature.js\").default} geometry Point geometry.\n   * @override\n   */\n  drawPoint(geometry) {\n    if (this.squaredTolerance_) {\n      geometry = /** @type {import(\"../../geom/Point.js\").default} */ (\n        geometry.simplifyTransformed(\n          this.squaredTolerance_,\n          this.userTransform_,\n        )\n      );\n    }\n    const flatCoordinates = geometry.getFlatCoordinates();\n    const stride = geometry.getStride();\n    if (this.image_) {\n      this.drawImages_(flatCoordinates, 0, flatCoordinates.length, stride);\n    }\n    if (this.text_ !== '') {\n      this.drawText_(flatCoordinates, 0, flatCoordinates.length, stride);\n    }\n  }\n\n  /**\n   * Render a MultiPoint geometry  into the canvas.  Rendering is immediate and\n   * uses the current style.\n   *\n   * @param {import(\"../../geom/MultiPoint.js\").default|import(\"../Feature.js\").default} geometry MultiPoint geometry.\n   * @override\n   */\n  drawMultiPoint(geometry) {\n    if (this.squaredTolerance_) {\n      geometry = /** @type {import(\"../../geom/MultiPoint.js\").default} */ (\n        geometry.simplifyTransformed(\n          this.squaredTolerance_,\n          this.userTransform_,\n        )\n      );\n    }\n    const flatCoordinates = geometry.getFlatCoordinates();\n    const stride = geometry.getStride();\n    if (this.image_) {\n      this.drawImages_(flatCoordinates, 0, flatCoordinates.length, stride);\n    }\n    if (this.text_ !== '') {\n      this.drawText_(flatCoordinates, 0, flatCoordinates.length, stride);\n    }\n  }\n\n  /**\n   * Render a LineString into the canvas.  Rendering is immediate and uses\n   * the current style.\n   *\n   * @param {import(\"../../geom/LineString.js\").default|import(\"../Feature.js\").default} geometry LineString geometry.\n   * @override\n   */\n  drawLineString(geometry) {\n    if (this.squaredTolerance_) {\n      geometry = /** @type {import(\"../../geom/LineString.js\").default} */ (\n        geometry.simplifyTransformed(\n          this.squaredTolerance_,\n          this.userTransform_,\n        )\n      );\n    }\n    if (!intersects(this.extent_, geometry.getExtent())) {\n      return;\n    }\n    if (this.strokeState_) {\n      this.setContextStrokeState_(this.strokeState_);\n      const context = this.context_;\n      const flatCoordinates = geometry.getFlatCoordinates();\n      context.beginPath();\n      this.moveToLineTo_(\n        flatCoordinates,\n        0,\n        flatCoordinates.length,\n        geometry.getStride(),\n        false,\n        this.strokeState_.strokeOffset,\n      );\n      context.stroke();\n    }\n    if (this.text_ !== '') {\n      const flatMidpoint = geometry.getFlatMidpoint();\n      this.drawText_(flatMidpoint, 0, 2, 2);\n    }\n  }\n\n  /**\n   * Render a MultiLineString geometry into the canvas.  Rendering is immediate\n   * and uses the current style.\n   *\n   * @param {import(\"../../geom/MultiLineString.js\").default|import(\"../Feature.js\").default} geometry MultiLineString geometry.\n   * @override\n   */\n  drawMultiLineString(geometry) {\n    if (this.squaredTolerance_) {\n      geometry =\n        /** @type {import(\"../../geom/MultiLineString.js\").default} */ (\n          geometry.simplifyTransformed(\n            this.squaredTolerance_,\n            this.userTransform_,\n          )\n        );\n    }\n    const geometryExtent = geometry.getExtent();\n    if (!intersects(this.extent_, geometryExtent)) {\n      return;\n    }\n    if (this.strokeState_) {\n      this.setContextStrokeState_(this.strokeState_);\n      const context = this.context_;\n      const flatCoordinates = geometry.getFlatCoordinates();\n      let offset = 0;\n      const ends = /** @type {Array<number>} */ (geometry.getEnds());\n      const stride = geometry.getStride();\n      context.beginPath();\n      for (let i = 0, ii = ends.length; i < ii; ++i) {\n        offset = this.moveToLineTo_(\n          flatCoordinates,\n          offset,\n          ends[i],\n          stride,\n          false,\n          this.strokeState_.strokeOffset,\n        );\n      }\n      context.stroke();\n    }\n    if (this.text_ !== '') {\n      const flatMidpoints = geometry.getFlatMidpoints();\n      this.drawText_(flatMidpoints, 0, flatMidpoints.length, 2);\n    }\n  }\n\n  /**\n   * Render a Polygon geometry into the canvas.  Rendering is immediate and uses\n   * the current style.\n   *\n   * @param {import(\"../../geom/Polygon.js\").default|import(\"../Feature.js\").default} geometry Polygon geometry.\n   * @override\n   */\n  drawPolygon(geometry) {\n    if (this.squaredTolerance_) {\n      geometry = /** @type {import(\"../../geom/Polygon.js\").default} */ (\n        geometry.simplifyTransformed(\n          this.squaredTolerance_,\n          this.userTransform_,\n        )\n      );\n    }\n    if (!intersects(this.extent_, geometry.getExtent())) {\n      return;\n    }\n    if (this.strokeState_ || this.fillState_) {\n      if (this.fillState_) {\n        this.setContextFillState_(this.fillState_);\n      }\n      if (this.strokeState_) {\n        this.setContextStrokeState_(this.strokeState_);\n      }\n      const context = this.context_;\n      context.beginPath();\n      this.drawRings_(\n        geometry.getOrientedFlatCoordinates(),\n        0,\n        /** @type {Array<number>} */ (geometry.getEnds()),\n        geometry.getStride(),\n        this.strokeState_?.strokeOffset,\n      );\n      if (this.fillState_) {\n        context.fill();\n      }\n      if (this.strokeState_) {\n        context.stroke();\n      }\n    }\n    if (this.text_ !== '') {\n      const flatInteriorPoint = geometry.getFlatInteriorPoint();\n      this.drawText_(flatInteriorPoint, 0, 2, 2);\n    }\n  }\n\n  /**\n   * Render MultiPolygon geometry into the canvas.  Rendering is immediate and\n   * uses the current style.\n   * @param {import(\"../../geom/MultiPolygon.js\").default} geometry MultiPolygon geometry.\n   * @override\n   */\n  drawMultiPolygon(geometry) {\n    if (this.squaredTolerance_) {\n      geometry = /** @type {import(\"../../geom/MultiPolygon.js\").default} */ (\n        geometry.simplifyTransformed(\n          this.squaredTolerance_,\n          this.userTransform_,\n        )\n      );\n    }\n    if (!intersects(this.extent_, geometry.getExtent())) {\n      return;\n    }\n    if (this.strokeState_ || this.fillState_) {\n      if (this.fillState_) {\n        this.setContextFillState_(this.fillState_);\n      }\n      if (this.strokeState_) {\n        this.setContextStrokeState_(this.strokeState_);\n      }\n      const context = this.context_;\n      const flatCoordinates = geometry.getOrientedFlatCoordinates();\n      let offset = 0;\n      const endss = geometry.getEndss();\n      const stride = geometry.getStride();\n      context.beginPath();\n      for (let i = 0, ii = endss.length; i < ii; ++i) {\n        const ends = endss[i];\n        offset = this.drawRings_(\n          flatCoordinates,\n          offset,\n          ends,\n          stride,\n          this.strokeState_?.strokeOffset,\n        );\n      }\n      if (this.fillState_) {\n        context.fill();\n      }\n      if (this.strokeState_) {\n        context.stroke();\n      }\n    }\n    if (this.text_ !== '') {\n      const flatInteriorPoints = geometry.getFlatInteriorPoints();\n      this.drawText_(flatInteriorPoints, 0, flatInteriorPoints.length, 2);\n    }\n  }\n\n  /**\n   * @param {import(\"../canvas.js\").FillState} fillState Fill state.\n   * @private\n   */\n  setContextFillState_(fillState) {\n    const context = this.context_;\n    const contextFillState = this.contextFillState_;\n    if (!contextFillState) {\n      context.fillStyle = fillState.fillStyle;\n      this.contextFillState_ = {\n        fillStyle: fillState.fillStyle,\n      };\n    } else {\n      if (contextFillState.fillStyle != fillState.fillStyle) {\n        contextFillState.fillStyle = fillState.fillStyle;\n        context.fillStyle = fillState.fillStyle;\n      }\n    }\n  }\n\n  /**\n   * @param {import(\"../canvas.js\").StrokeState} strokeState Stroke state.\n   * @private\n   */\n  setContextStrokeState_(strokeState) {\n    const context = this.context_;\n    const contextStrokeState = this.contextStrokeState_;\n    if (!contextStrokeState) {\n      context.lineCap = strokeState.lineCap;\n      context.setLineDash(strokeState.lineDash);\n      context.lineDashOffset = strokeState.lineDashOffset;\n      context.lineJoin = strokeState.lineJoin;\n      context.lineWidth = strokeState.lineWidth;\n      context.miterLimit = strokeState.miterLimit;\n      context.strokeStyle = strokeState.strokeStyle;\n      this.contextStrokeState_ = {\n        lineCap: strokeState.lineCap,\n        lineDash: strokeState.lineDash,\n        lineDashOffset: strokeState.lineDashOffset,\n        lineJoin: strokeState.lineJoin,\n        lineWidth: strokeState.lineWidth,\n        miterLimit: strokeState.miterLimit,\n        strokeStyle: strokeState.strokeStyle,\n      };\n    } else {\n      if (contextStrokeState.lineCap != strokeState.lineCap) {\n        contextStrokeState.lineCap = strokeState.lineCap;\n        context.lineCap = strokeState.lineCap;\n      }\n      if (!equals(contextStrokeState.lineDash, strokeState.lineDash)) {\n        context.setLineDash(\n          (contextStrokeState.lineDash = strokeState.lineDash),\n        );\n      }\n      if (contextStrokeState.lineDashOffset != strokeState.lineDashOffset) {\n        contextStrokeState.lineDashOffset = strokeState.lineDashOffset;\n        context.lineDashOffset = strokeState.lineDashOffset;\n      }\n      if (contextStrokeState.lineJoin != strokeState.lineJoin) {\n        contextStrokeState.lineJoin = strokeState.lineJoin;\n        context.lineJoin = strokeState.lineJoin;\n      }\n      if (contextStrokeState.lineWidth != strokeState.lineWidth) {\n        contextStrokeState.lineWidth = strokeState.lineWidth;\n        context.lineWidth = strokeState.lineWidth;\n      }\n      if (contextStrokeState.miterLimit != strokeState.miterLimit) {\n        contextStrokeState.miterLimit = strokeState.miterLimit;\n        context.miterLimit = strokeState.miterLimit;\n      }\n      if (contextStrokeState.strokeStyle != strokeState.strokeStyle) {\n        contextStrokeState.strokeStyle = strokeState.strokeStyle;\n        context.strokeStyle = strokeState.strokeStyle;\n      }\n    }\n  }\n\n  /**\n   * @param {import(\"../canvas.js\").TextState} textState Text state.\n   * @private\n   */\n  setContextTextState_(textState) {\n    const context = this.context_;\n    const contextTextState = this.contextTextState_;\n    const textAlign = textState.textAlign\n      ? textState.textAlign\n      : defaultTextAlign;\n    if (!contextTextState) {\n      context.font = textState.font;\n      context.textAlign = textAlign;\n      context.textBaseline = textState.textBaseline;\n      this.contextTextState_ = {\n        font: textState.font,\n        textAlign: textAlign,\n        textBaseline: textState.textBaseline,\n      };\n    } else {\n      if (contextTextState.font != textState.font) {\n        contextTextState.font = textState.font;\n        context.font = textState.font;\n      }\n      if (contextTextState.textAlign != textAlign) {\n        contextTextState.textAlign = textAlign;\n        context.textAlign = textAlign;\n      }\n      if (contextTextState.textBaseline != textState.textBaseline) {\n        contextTextState.textBaseline = textState.textBaseline;\n        context.textBaseline = textState.textBaseline;\n      }\n    }\n  }\n\n  /**\n   * Set the fill and stroke style for subsequent draw operations.  To clear\n   * either fill or stroke styles, pass null for the appropriate parameter.\n   *\n   * @param {import(\"../../style/Fill.js\").default} fillStyle Fill style.\n   * @param {import(\"../../style/Stroke.js\").default} strokeStyle Stroke style.\n   * @override\n   */\n  setFillStrokeStyle(fillStyle, strokeStyle) {\n    if (!fillStyle) {\n      this.fillState_ = null;\n    } else {\n      const fillStyleColor = fillStyle.getColor();\n      this.fillState_ = {\n        fillStyle: asColorLike(\n          fillStyleColor ? fillStyleColor : defaultFillStyle,\n        ),\n      };\n    }\n    if (!strokeStyle) {\n      this.strokeState_ = null;\n    } else {\n      const strokeStyleColor = strokeStyle.getColor();\n      const strokeStyleLineCap = strokeStyle.getLineCap();\n      const strokeStyleLineDash = strokeStyle.getLineDash();\n      const strokeStyleLineDashOffset = strokeStyle.getLineDashOffset();\n      const strokeStyleLineJoin = strokeStyle.getLineJoin();\n      const strokeStyleWidth = strokeStyle.getWidth();\n      const strokeStyleMiterLimit = strokeStyle.getMiterLimit();\n      const lineDash = strokeStyleLineDash\n        ? strokeStyleLineDash\n        : defaultLineDash;\n      const strokeOffset = strokeStyle.getOffset();\n      this.strokeState_ = {\n        lineCap:\n          strokeStyleLineCap !== undefined\n            ? strokeStyleLineCap\n            : defaultLineCap,\n        lineDash:\n          this.pixelRatio_ === 1\n            ? lineDash\n            : lineDash.map((n) => n * this.pixelRatio_),\n        lineDashOffset:\n          (strokeStyleLineDashOffset\n            ? strokeStyleLineDashOffset\n            : defaultLineDashOffset) * this.pixelRatio_,\n        lineJoin:\n          strokeStyleLineJoin !== undefined\n            ? strokeStyleLineJoin\n            : defaultLineJoin,\n        lineWidth:\n          (strokeStyleWidth !== undefined\n            ? strokeStyleWidth\n            : defaultLineWidth) * this.pixelRatio_,\n        miterLimit:\n          strokeStyleMiterLimit !== undefined\n            ? strokeStyleMiterLimit\n            : defaultMiterLimit,\n        strokeStyle: asColorLike(\n          strokeStyleColor ? strokeStyleColor : defaultStrokeStyle,\n        ),\n        strokeOffset: (strokeOffset ?? 0) * this.pixelRatio_,\n      };\n    }\n  }\n\n  /**\n   * Set the image style for subsequent draw operations.  Pass null to remove\n   * the image style.\n   *\n   * @param {import(\"../../style/Image.js\").default} imageStyle Image style.\n   * @override\n   */\n  setImageStyle(imageStyle) {\n    let imageSize;\n    if (!imageStyle || !(imageSize = imageStyle.getSize())) {\n      this.image_ = null;\n      return;\n    }\n    const imagePixelRatio = imageStyle.getPixelRatio(this.pixelRatio_);\n    const imageAnchor = imageStyle.getAnchor();\n    const imageOrigin = imageStyle.getOrigin();\n    this.image_ = imageStyle.getImage(this.pixelRatio_);\n    this.imageAnchorX_ = imageAnchor[0] * imagePixelRatio;\n    this.imageAnchorY_ = imageAnchor[1] * imagePixelRatio;\n    this.imageHeight_ = imageSize[1] * imagePixelRatio;\n    this.imageOpacity_ = imageStyle.getOpacity();\n    this.imageOriginX_ = imageOrigin[0];\n    this.imageOriginY_ = imageOrigin[1];\n    this.imageRotateWithView_ = imageStyle.getRotateWithView();\n    this.imageRotation_ = imageStyle.getRotation();\n    const imageScale = imageStyle.getScaleArray();\n    this.imageScale_ = [\n      (imageScale[0] * this.pixelRatio_) / imagePixelRatio,\n      (imageScale[1] * this.pixelRatio_) / imagePixelRatio,\n    ];\n    this.imageWidth_ = imageSize[0] * imagePixelRatio;\n  }\n\n  /**\n   * Set the text style for subsequent draw operations.  Pass null to\n   * remove the text style.\n   *\n   * @param {import(\"../../style/Text.js\").default} textStyle Text style.\n   * @override\n   */\n  setTextStyle(textStyle) {\n    if (!textStyle) {\n      this.text_ = '';\n    } else {\n      const textFillStyle = textStyle.getFill();\n      if (!textFillStyle) {\n        this.textFillState_ = null;\n      } else {\n        const textFillStyleColor = textFillStyle.getColor();\n        this.textFillState_ = {\n          fillStyle: asColorLike(\n            textFillStyleColor ? textFillStyleColor : defaultFillStyle,\n          ),\n        };\n      }\n      const textStrokeStyle = textStyle.getStroke();\n      if (!textStrokeStyle) {\n        this.textStrokeState_ = null;\n      } else {\n        const textStrokeStyleColor = textStrokeStyle.getColor();\n        const textStrokeStyleLineCap = textStrokeStyle.getLineCap();\n        const textStrokeStyleLineDash = textStrokeStyle.getLineDash();\n        const textStrokeStyleLineDashOffset =\n          textStrokeStyle.getLineDashOffset();\n        const textStrokeStyleLineJoin = textStrokeStyle.getLineJoin();\n        const textStrokeStyleWidth = textStrokeStyle.getWidth();\n        const textStrokeStyleMiterLimit = textStrokeStyle.getMiterLimit();\n        this.textStrokeState_ = {\n          lineCap:\n            textStrokeStyleLineCap !== undefined\n              ? textStrokeStyleLineCap\n              : defaultLineCap,\n          lineDash: textStrokeStyleLineDash\n            ? textStrokeStyleLineDash\n            : defaultLineDash,\n          lineDashOffset: textStrokeStyleLineDashOffset\n            ? textStrokeStyleLineDashOffset\n            : defaultLineDashOffset,\n          lineJoin:\n            textStrokeStyleLineJoin !== undefined\n              ? textStrokeStyleLineJoin\n              : defaultLineJoin,\n          lineWidth:\n            textStrokeStyleWidth !== undefined\n              ? textStrokeStyleWidth\n              : defaultLineWidth,\n          miterLimit:\n            textStrokeStyleMiterLimit !== undefined\n              ? textStrokeStyleMiterLimit\n              : defaultMiterLimit,\n          strokeStyle: asColorLike(\n            textStrokeStyleColor ? textStrokeStyleColor : defaultStrokeStyle,\n          ),\n        };\n      }\n      const textFont = textStyle.getFont();\n      const textOffsetX = textStyle.getOffsetX();\n      const textOffsetY = textStyle.getOffsetY();\n      const textRotateWithView = textStyle.getRotateWithView();\n      const textRotation = textStyle.getRotation();\n      const textScale = textStyle.getScaleArray();\n      const textText = textStyle.getText();\n      const textTextAlign = textStyle.getTextAlign();\n      const textTextBaseline = textStyle.getTextBaseline();\n      this.textState_ = {\n        font: textFont !== undefined ? textFont : defaultFont,\n        textAlign:\n          textTextAlign !== undefined ? textTextAlign : defaultTextAlign,\n        textBaseline:\n          textTextBaseline !== undefined\n            ? textTextBaseline\n            : defaultTextBaseline,\n      };\n      this.text_ =\n        textText !== undefined\n          ? Array.isArray(textText)\n            ? textText.reduce((acc, t, i) => (acc += i % 2 ? ' ' : t), '')\n            : textText\n          : '';\n      this.textOffsetX_ =\n        textOffsetX !== undefined ? this.pixelRatio_ * textOffsetX : 0;\n      this.textOffsetY_ =\n        textOffsetY !== undefined ? this.pixelRatio_ * textOffsetY : 0;\n      this.textRotateWithView_ =\n        textRotateWithView !== undefined ? textRotateWithView : false;\n      this.textRotation_ = textRotation !== undefined ? textRotation : 0;\n      this.textScale_ = [\n        this.pixelRatio_ * textScale[0],\n        this.pixelRatio_ * textScale[1],\n      ];\n    }\n  }\n}\n\nexport default CanvasImmediateRenderer;\n", "/**\n * @module ol/render/canvas/hitdetect\n */\n\nimport {ascending} from '../../array.js';\nimport {createCanvasContext2D} from '../../dom.js';\nimport {intersects} from '../../extent.js';\nimport {clamp} from '../../math.js';\nimport {\n  getTransformFromProjections,\n  getUserProjection,\n  toUserExtent,\n} from '../../proj.js';\nimport Icon from '../../style/Icon.js';\nimport CanvasImmediateRenderer from './Immediate.js';\n\nexport const HIT_DETECT_RESOLUTION = 0.5;\n\n/**\n * @param {import(\"../../size.js\").Size} size Canvas size in css pixels.\n * @param {Array<import(\"../../transform.js\").Transform>} transforms Transforms\n * for rendering features to all worlds of the viewport, from coordinates to css\n * pixels.\n * @param {Array<import(\"../../Feature.js\").FeatureLike>} features\n * Features to consider for hit detection.\n * @param {import(\"../../style/Style.js\").StyleFunction|undefined} styleFunction\n * Layer style function.\n * @param {import(\"../../extent.js\").Extent} extent Extent in render projection.\n * @param {number} resolution Resolution.\n * @param {number} rotation Rotation.\n * @param {number} [squaredTolerance] Squared tolerance.\n * @param {import(\"../../proj/Projection.js\").default} [projection] Render projection.\n * @return {ImageData} Hit detection image data.\n */\nexport function createHitDetectionImageData(\n  size,\n  transforms,\n  features,\n  styleFunction,\n  extent,\n  resolution,\n  rotation,\n  squaredTolerance,\n  projection,\n) {\n  const userExtent = projection ? toUserExtent(extent, projection) : extent;\n  const width = size[0] * HIT_DETECT_RESOLUTION;\n  const height = size[1] * HIT_DETECT_RESOLUTION;\n  const context = createCanvasContext2D(width, height);\n  context.imageSmoothingEnabled = false;\n  const canvas = context.canvas;\n  const renderer = new CanvasImmediateRenderer(\n    context,\n    HIT_DETECT_RESOLUTION,\n    extent,\n    null,\n    rotation,\n    squaredTolerance,\n    projection\n      ? getTransformFromProjections(getUserProjection(), projection)\n      : null,\n  );\n  const featureCount = features.length;\n  // Stretch hit detection index to use the whole available color range\n  const indexFactor = Math.floor((256 * 256 * 256 - 1) / featureCount);\n  const featuresByZIndex = {};\n  for (let i = 1; i <= featureCount; ++i) {\n    const feature = features[i - 1];\n    const featureStyleFunction = feature.getStyleFunction() || styleFunction;\n    if (!featureStyleFunction) {\n      continue;\n    }\n    let styles = featureStyleFunction(feature, resolution);\n    if (!styles) {\n      continue;\n    }\n    if (!Array.isArray(styles)) {\n      styles = [styles];\n    }\n    const index = i * indexFactor;\n    const color = index.toString(16).padStart(7, '#00000');\n    for (let j = 0, jj = styles.length; j < jj; ++j) {\n      const originalStyle = styles[j];\n      const geometry = originalStyle.getGeometryFunction()(feature);\n      if (!geometry || !intersects(userExtent, geometry.getExtent())) {\n        continue;\n      }\n      const style = originalStyle.clone();\n      const fill = style.getFill();\n      if (fill) {\n        fill.setColor(color);\n      }\n      const stroke = style.getStroke();\n      if (stroke) {\n        stroke.setColor(color);\n        stroke.setLineDash(null);\n      }\n      style.setText(undefined);\n      const image = originalStyle.getImage();\n      if (image) {\n        const imgSize = image.getImageSize();\n        if (!imgSize) {\n          continue;\n        }\n\n        const imgContext = createCanvasContext2D(\n          imgSize[0],\n          imgSize[1],\n          undefined,\n          {alpha: false},\n        );\n        const img = imgContext.canvas;\n        imgContext.fillStyle = color;\n        imgContext.fillRect(0, 0, img.width, img.height);\n        style.setImage(\n          new Icon({\n            img: img,\n            anchor: image.getAnchor(),\n            anchorXUnits: 'pixels',\n            anchorYUnits: 'pixels',\n            offset: image.getOrigin(),\n            opacity: 1,\n            size: image.getSize(),\n            scale: image.getScale(),\n            rotation: image.getRotation(),\n            rotateWithView: image.getRotateWithView(),\n          }),\n        );\n      }\n      const zIndex = style.getZIndex() || 0;\n      let byGeometryType = featuresByZIndex[zIndex];\n      if (!byGeometryType) {\n        byGeometryType = {};\n        featuresByZIndex[zIndex] = byGeometryType;\n        byGeometryType['Polygon'] = [];\n        byGeometryType['Circle'] = [];\n        byGeometryType['LineString'] = [];\n        byGeometryType['Point'] = [];\n      }\n      const type = geometry.getType();\n      if (type === 'GeometryCollection') {\n        const geometries =\n          /** @type {import(\"../../geom/GeometryCollection.js\").default} */ (\n            geometry\n          ).getGeometriesArrayRecursive();\n        for (let i = 0, ii = geometries.length; i < ii; ++i) {\n          const geometry = geometries[i];\n          byGeometryType[geometry.getType().replace('Multi', '')].push(\n            geometry,\n            style,\n          );\n        }\n      } else {\n        byGeometryType[type.replace('Multi', '')].push(geometry, style);\n      }\n    }\n  }\n\n  const zIndexKeys = Object.keys(featuresByZIndex).map(Number).sort(ascending);\n  for (let i = 0, ii = zIndexKeys.length; i < ii; ++i) {\n    const byGeometryType = featuresByZIndex[zIndexKeys[i]];\n    for (const type in byGeometryType) {\n      const geomAndStyle = byGeometryType[type];\n      for (let j = 0, jj = geomAndStyle.length; j < jj; j += 2) {\n        renderer.setStyle(geomAndStyle[j + 1]);\n        for (let k = 0, kk = transforms.length; k < kk; ++k) {\n          renderer.setTransform(transforms[k]);\n          renderer.drawGeometry(geomAndStyle[j]);\n        }\n      }\n    }\n  }\n  return context.getImageData(0, 0, canvas.width, canvas.height);\n}\n\n/**\n * @param {import(\"../../pixel.js\").Pixel} pixel Pixel coordinate on the hit\n * detection canvas in css pixels.\n * @param {Array<F>} features Features. Has to\n * match the `features` array that was passed to `createHitDetectionImageData()`.\n * @param {ImageData} imageData Hit detection image data generated by\n * `createHitDetectionImageData()`.\n * @return {Array<F>} Features.\n * @template {import(\"../../Feature.js\").FeatureLike} F\n */\nexport function hitDetect(pixel, features, imageData) {\n  /** @type {Array<F>} */\n  const resultFeatures = [];\n  if (imageData) {\n    const x = Math.floor(Math.round(pixel[0]) * HIT_DETECT_RESOLUTION);\n    const y = Math.floor(Math.round(pixel[1]) * HIT_DETECT_RESOLUTION);\n    // The pixel coordinate is clamped down to the hit-detect canvas' size to account\n    // for browsers returning coordinates slightly larger than the actual canvas size\n    // due to a non-integer pixel ratio.\n    const index =\n      (clamp(x, 0, imageData.width - 1) +\n        clamp(y, 0, imageData.height - 1) * imageData.width) *\n      4;\n    const r = imageData.data[index];\n    const g = imageData.data[index + 1];\n    const b = imageData.data[index + 2];\n    const i = b + 256 * (g + 256 * r);\n    const indexFactor = Math.floor((256 * 256 * 256 - 1) / features.length);\n    if (i && i % indexFactor === 0) {\n      resultFeatures.push(features[i / indexFactor - 1]);\n    }\n  }\n  return resultFeatures;\n}\n", "/**\n * @module ol/renderer/vector\n */\nimport ImageState from '../ImageState.js';\nimport {getUid} from '../util.js';\n\n/**\n * Feature callback. The callback will be called with three arguments. The first\n * argument is one {@link module:ol/Feature~Feature feature} or {@link module:ol/render/Feature~RenderFeature render feature}\n * at the pixel, the second is the {@link module:ol/layer/Layer~Layer layer} of the feature and will be null for\n * unmanaged layers. The third is the {@link module:ol/geom/SimpleGeometry~SimpleGeometry} of the feature. For features\n * with a GeometryCollection geometry, it will be the first detected geometry from the collection.\n * @template T\n * @typedef {function(import(\"../Feature.js\").FeatureLike, import(\"../layer/Layer.js\").default<import(\"../source/Source.js\").default>, import(\"../geom/SimpleGeometry.js\").default): T} FeatureCallback\n */\n\n/**\n * Tolerance for geometry simplification in device pixels.\n * @type {number}\n */\nconst SIMPLIFY_TOLERANCE = 0.5;\n\n/**\n * @const\n * @type {Object<import(\"../geom/Geometry.js\").Type,\n *                function(import(\"../render/canvas/BuilderGroup.js\").default, import(\"../geom/Geometry.js\").default,\n *                         import(\"../style/Style.js\").default, Object): void>}\n */\nconst GEOMETRY_RENDERERS = {\n  'Point': renderPointGeometry,\n  'LineString': renderLineStringGeometry,\n  'Polygon': renderPolygonGeometry,\n  'MultiPoint': renderMultiPointGeometry,\n  'MultiLineString': renderMultiLineStringGeometry,\n  'MultiPolygon': renderMultiPolygonGeometry,\n  'GeometryCollection': renderGeometryCollectionGeometry,\n  'Circle': renderCircleGeometry,\n};\n\n/**\n * @param {import(\"../Feature.js\").FeatureLike} feature1 Feature 1.\n * @param {import(\"../Feature.js\").FeatureLike} feature2 Feature 2.\n * @return {number} Order.\n */\nexport function defaultOrder(feature1, feature2) {\n  return parseInt(getUid(feature1), 10) - parseInt(getUid(feature2), 10);\n}\n\n/**\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n * @return {number} Squared pixel tolerance.\n */\nexport function getSquaredTolerance(resolution, pixelRatio) {\n  const tolerance = getTolerance(resolution, pixelRatio);\n  return tolerance * tolerance;\n}\n\n/**\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n * @return {number} Pixel tolerance.\n */\nexport function getTolerance(resolution, pixelRatio) {\n  return (SIMPLIFY_TOLERANCE * resolution) / pixelRatio;\n}\n\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} builderGroup Builder group.\n * @param {import(\"../geom/Circle.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").default} feature Feature.\n * @param {number} [index] Render order index.\n */\nfunction renderCircleGeometry(builderGroup, geometry, style, feature, index) {\n  const fillStyle = style.getFill();\n  const strokeStyle = style.getStroke();\n  if (fillStyle || strokeStyle) {\n    const circleReplay = builderGroup.getBuilder(style.getZIndex(), 'Circle');\n    circleReplay.setFillStrokeStyle(fillStyle, strokeStyle);\n    circleReplay.drawCircle(geometry, feature, index);\n  }\n  const textStyle = style.getText();\n  if (textStyle && textStyle.getText()) {\n    const textReplay = builderGroup.getBuilder(style.getZIndex(), 'Text');\n    textReplay.setTextStyle(textStyle);\n    textReplay.drawText(geometry, feature, index);\n  }\n}\n\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} replayGroup Replay group.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {function(import(\"../events/Event.js\").default): void} listener Listener function.\n * @param {import(\"../proj.js\").TransformFunction} [transform] Transform from user to view projection.\n * @param {boolean} [declutter] Enable decluttering.\n * @param {number} [index] Render order index..\n * @return {boolean} `true` if style is loading.\n */\nexport function renderFeature(\n  replayGroup,\n  feature,\n  style,\n  squaredTolerance,\n  listener,\n  transform,\n  declutter,\n  index,\n) {\n  const loadingPromises = [];\n  const imageStyle = style.getImage();\n  if (imageStyle) {\n    let loading = true;\n    const imageState = imageStyle.getImageState();\n    if (imageState == ImageState.LOADED || imageState == ImageState.ERROR) {\n      loading = false;\n    } else {\n      if (imageState == ImageState.IDLE) {\n        imageStyle.load();\n      }\n    }\n    if (loading) {\n      loadingPromises.push(imageStyle.ready());\n    }\n  }\n  const fillStyle = style.getFill();\n  if (fillStyle && fillStyle.loading()) {\n    loadingPromises.push(fillStyle.ready());\n  }\n  const loading = loadingPromises.length > 0;\n  if (loading) {\n    Promise.all(loadingPromises).then(() => listener(null));\n  }\n  renderFeatureInternal(\n    replayGroup,\n    feature,\n    style,\n    squaredTolerance,\n    transform,\n    declutter,\n    index,\n  );\n\n  return loading;\n}\n\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} replayGroup Replay group.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {import(\"../proj.js\").TransformFunction} [transform] Optional transform function.\n * @param {boolean} [declutter] Enable decluttering.\n * @param {number} [index] Render order index..\n */\nfunction renderFeatureInternal(\n  replayGroup,\n  feature,\n  style,\n  squaredTolerance,\n  transform,\n  declutter,\n  index,\n) {\n  const geometry = style.getGeometryFunction()(feature);\n  if (!geometry) {\n    return;\n  }\n  const simplifiedGeometry = geometry.simplifyTransformed(\n    squaredTolerance,\n    transform,\n  );\n  const renderer = style.getRenderer();\n  if (renderer) {\n    renderGeometry(replayGroup, simplifiedGeometry, style, feature, index);\n  } else {\n    const geometryRenderer = GEOMETRY_RENDERERS[simplifiedGeometry.getType()];\n    geometryRenderer(\n      replayGroup,\n      simplifiedGeometry,\n      style,\n      feature,\n      index,\n      declutter,\n    );\n  }\n}\n\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} replayGroup Replay group.\n * @param {import(\"../geom/Geometry.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {number} [index] Render order index.\n */\nfunction renderGeometry(replayGroup, geometry, style, feature, index) {\n  if (geometry.getType() == 'GeometryCollection') {\n    const geometries =\n      /** @type {import(\"../geom/GeometryCollection.js\").default} */ (\n        geometry\n      ).getGeometries();\n    for (let i = 0, ii = geometries.length; i < ii; ++i) {\n      renderGeometry(replayGroup, geometries[i], style, feature, index);\n    }\n    return;\n  }\n  const replay = replayGroup.getBuilder(style.getZIndex(), 'Default');\n  replay.drawCustom(\n    /** @type {import(\"../geom/SimpleGeometry.js\").default} */ (geometry),\n    feature,\n    style.getRenderer(),\n    style.getHitDetectionRenderer(),\n    index,\n  );\n}\n\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} replayGroup Replay group.\n * @param {import(\"../geom/GeometryCollection.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").default} feature Feature.\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} [declutterBuilderGroup] Builder for decluttering.\n * @param {number} [index] Render order index.\n */\nfunction renderGeometryCollectionGeometry(\n  replayGroup,\n  geometry,\n  style,\n  feature,\n  declutterBuilderGroup,\n  index,\n) {\n  const geometries = geometry.getGeometriesArray();\n  let i, ii;\n  for (i = 0, ii = geometries.length; i < ii; ++i) {\n    const geometryRenderer = GEOMETRY_RENDERERS[geometries[i].getType()];\n    geometryRenderer(\n      replayGroup,\n      geometries[i],\n      style,\n      feature,\n      declutterBuilderGroup,\n      index,\n    );\n  }\n}\n\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} builderGroup Replay group.\n * @param {import(\"../geom/LineString.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {number} [index] Render order index.\n */\nfunction renderLineStringGeometry(\n  builderGroup,\n  geometry,\n  style,\n  feature,\n  index,\n) {\n  const strokeStyle = style.getStroke();\n  if (strokeStyle) {\n    const lineStringReplay = builderGroup.getBuilder(\n      style.getZIndex(),\n      'LineString',\n    );\n    lineStringReplay.setFillStrokeStyle(null, strokeStyle);\n    lineStringReplay.drawLineString(geometry, feature, index);\n  }\n  const textStyle = style.getText();\n  if (textStyle && textStyle.getText()) {\n    const textReplay = builderGroup.getBuilder(style.getZIndex(), 'Text');\n    textReplay.setTextStyle(textStyle);\n    textReplay.drawText(geometry, feature, index);\n  }\n}\n\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} builderGroup Replay group.\n * @param {import(\"../geom/MultiLineString.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {number} [index] Render order index.\n */\nfunction renderMultiLineStringGeometry(\n  builderGroup,\n  geometry,\n  style,\n  feature,\n  index,\n) {\n  const strokeStyle = style.getStroke();\n  if (strokeStyle) {\n    const lineStringReplay = builderGroup.getBuilder(\n      style.getZIndex(),\n      'LineString',\n    );\n    lineStringReplay.setFillStrokeStyle(null, strokeStyle);\n    lineStringReplay.drawMultiLineString(geometry, feature, index);\n  }\n  const textStyle = style.getText();\n  if (textStyle && textStyle.getText()) {\n    const textReplay = builderGroup.getBuilder(style.getZIndex(), 'Text');\n    textReplay.setTextStyle(textStyle);\n    textReplay.drawText(geometry, feature, index);\n  }\n}\n\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} builderGroup Replay group.\n * @param {import(\"../geom/MultiPolygon.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").default} feature Feature.\n * @param {number} [index] Render order index.\n */\nfunction renderMultiPolygonGeometry(\n  builderGroup,\n  geometry,\n  style,\n  feature,\n  index,\n) {\n  const fillStyle = style.getFill();\n  const strokeStyle = style.getStroke();\n  if (strokeStyle || fillStyle) {\n    const polygonReplay = builderGroup.getBuilder(style.getZIndex(), 'Polygon');\n    polygonReplay.setFillStrokeStyle(fillStyle, strokeStyle);\n    polygonReplay.drawMultiPolygon(geometry, feature, index);\n  }\n  const textStyle = style.getText();\n  if (textStyle && textStyle.getText()) {\n    const textReplay = builderGroup.getBuilder(style.getZIndex(), 'Text');\n    textReplay.setTextStyle(textStyle);\n    textReplay.drawText(geometry, feature, index);\n  }\n}\n\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} builderGroup Replay group.\n * @param {import(\"../geom/Point.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {number} [index] Render order index.\n * @param {boolean} [declutter] Enable decluttering.\n */\nfunction renderPointGeometry(\n  builderGroup,\n  geometry,\n  style,\n  feature,\n  index,\n  declutter,\n) {\n  const imageStyle = style.getImage();\n  const textStyle = style.getText();\n  const hasText = textStyle && textStyle.getText();\n  /** @type {import(\"../render/canvas.js\").DeclutterImageWithText} */\n  const declutterImageWithText =\n    declutter && imageStyle && hasText ? {} : undefined;\n  if (imageStyle) {\n    if (imageStyle.getImageState() != ImageState.LOADED) {\n      return;\n    }\n    const imageReplay = builderGroup.getBuilder(style.getZIndex(), 'Image');\n    imageReplay.setImageStyle(imageStyle, declutterImageWithText);\n    imageReplay.drawPoint(geometry, feature, index);\n  }\n  if (hasText) {\n    const textReplay = builderGroup.getBuilder(style.getZIndex(), 'Text');\n    textReplay.setTextStyle(textStyle, declutterImageWithText);\n    textReplay.drawText(geometry, feature, index);\n  }\n}\n\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} builderGroup Replay group.\n * @param {import(\"../geom/MultiPoint.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {number} [index] Render order index.\n * @param {boolean} [declutter] Enable decluttering.\n */\nfunction renderMultiPointGeometry(\n  builderGroup,\n  geometry,\n  style,\n  feature,\n  index,\n  declutter,\n) {\n  const imageStyle = style.getImage();\n  const hasImage = imageStyle && imageStyle.getOpacity() !== 0;\n  const textStyle = style.getText();\n  const hasText = textStyle && textStyle.getText();\n  /** @type {import(\"../render/canvas.js\").DeclutterImageWithText} */\n  const declutterImageWithText =\n    declutter && hasImage && hasText ? {} : undefined;\n  if (hasImage) {\n    if (imageStyle.getImageState() != ImageState.LOADED) {\n      return;\n    }\n    const imageReplay = builderGroup.getBuilder(style.getZIndex(), 'Image');\n    imageReplay.setImageStyle(imageStyle, declutterImageWithText);\n    imageReplay.drawMultiPoint(geometry, feature, index);\n  }\n  if (hasText) {\n    const textReplay = builderGroup.getBuilder(style.getZIndex(), 'Text');\n    textReplay.setTextStyle(textStyle, declutterImageWithText);\n    textReplay.drawText(geometry, feature, index);\n  }\n}\n\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} builderGroup Replay group.\n * @param {import(\"../geom/Polygon.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {number} [index] Render order index.\n */\nfunction renderPolygonGeometry(builderGroup, geometry, style, feature, index) {\n  const fillStyle = style.getFill();\n  const strokeStyle = style.getStroke();\n  if (fillStyle || strokeStyle) {\n    const polygonReplay = builderGroup.getBuilder(style.getZIndex(), 'Polygon');\n    polygonReplay.setFillStrokeStyle(fillStyle, strokeStyle);\n    polygonReplay.drawPolygon(geometry, feature, index);\n  }\n  const textStyle = style.getText();\n  if (textStyle && textStyle.getText()) {\n    const textReplay = builderGroup.getBuilder(style.getZIndex(), 'Text');\n    textReplay.setTextStyle(textStyle);\n    textReplay.drawText(geometry, feature, index);\n  }\n}\n", "/**\n * @module ol/render/Event\n */\n\nimport Event from '../events/Event.js';\n\nclass RenderEvent extends Event {\n  /**\n   * @param {import(\"./EventType.js\").default} type Type.\n   * @param {import(\"../transform.js\").Transform} [inversePixelTransform] Transform for\n   *     CSS pixels to rendered pixels.\n   * @param {import(\"../Map.js\").FrameState} [frameState] Frame state.\n   * @param {?(CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D|WebGLRenderingContext)} [context] Context.\n   */\n  constructor(type, inversePixelTransform, frameState, context) {\n    super(type);\n\n    /**\n     * Transform from CSS pixels (relative to the top-left corner of the map viewport)\n     * to rendered pixels on this event's `context`. Only available when a Canvas renderer is used, null otherwise.\n     * @type {import(\"../transform.js\").Transform|undefined}\n     * @api\n     */\n    this.inversePixelTransform = inversePixelTransform;\n\n    /**\n     * An object representing the current render frame state.\n     * @type {import(\"../Map.js\").FrameState|undefined}\n     * @api\n     */\n    this.frameState = frameState;\n\n    /**\n     * Canvas context. Not available when the event is dispatched by the map. For Canvas 2D layers,\n     * the context will be the 2D rendering context.  For WebGL layers, the context will be the WebGL\n     * context.\n     * @type {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D|WebGLRenderingContext|undefined}\n     * @api\n     */\n    this.context = context;\n  }\n}\n\nexport default RenderEvent;\n", "/**\n * @module ol/renderer/Layer\n */\nimport ImageState from '../ImageState.js';\nimport Observable from '../Observable.js';\nimport EventType from '../events/EventType.js';\nimport {abstract} from '../util.js';\n\nconst maxStaleKeys = 5;\n\n/**\n * @template {import(\"../layer/Layer.js\").default} LayerType\n */\nclass LayerRenderer extends Observable {\n  /**\n   * @param {LayerType} layer Layer.\n   */\n  constructor(layer) {\n    super();\n\n    /**\n     * The renderer is initialized and ready to render.\n     * @type {boolean}\n     */\n    this.ready = true;\n\n    /** @private */\n    this.boundHandleImageChange_ = this.handleImageChange_.bind(this);\n\n    /**\n     * @private\n     * @type {LayerType}\n     */\n    this.layer_ = layer;\n\n    /**\n     * @type {Array<string>}\n     * @private\n     */\n    this.staleKeys_ = new Array();\n\n    /**\n     * @type {number}\n     * @protected\n     */\n    this.maxStaleKeys = maxStaleKeys;\n\n    /**\n     * @type {string}\n     * @protected\n     */\n    this.renderedSourceKey_;\n  }\n\n  /**\n   * @return {Array<string>} Get the list of stale keys.\n   */\n  getStaleKeys() {\n    return this.staleKeys_;\n  }\n\n  /**\n   * @param {string} key The new stale key.\n   */\n  prependStaleKey(key) {\n    this.staleKeys_.unshift(key);\n    if (this.staleKeys_.length > this.maxStaleKeys) {\n      this.staleKeys_.length = this.maxStaleKeys;\n    }\n  }\n\n  /**\n   * Remember the previous source key as stale when the key changes.\n   * @param {string} sourceKey The current source key.\n   * @protected\n   */\n  updateStaleKeys(sourceKey) {\n    if (!this.renderedSourceKey_) {\n      this.renderedSourceKey_ = sourceKey;\n    } else if (this.renderedSourceKey_ !== sourceKey) {\n      this.prependStaleKey(this.renderedSourceKey_);\n      this.renderedSourceKey_ = sourceKey;\n    }\n  }\n\n  /**\n   * Asynchronous layer level hit detection.\n   * @param {import(\"../pixel.js\").Pixel} pixel Pixel.\n   * @return {Promise<Array<import(\"../Feature.js\").FeatureLike>>} Promise that resolves with\n   * an array of features.\n   */\n  getFeatures(pixel) {\n    return abstract();\n  }\n\n  /**\n   * @param {import(\"../pixel.js\").Pixel} pixel Pixel.\n   * @return {Uint8ClampedArray|Uint8Array|Float32Array|DataView|null} Pixel data.\n   */\n  getData(pixel) {\n    return null;\n  }\n\n  /**\n   * Determine whether render should be called.\n   * @abstract\n   * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n   * @return {boolean} Layer is ready to be rendered.\n   */\n  prepareFrame(frameState) {\n    return abstract();\n  }\n\n  /**\n   * Render the layer.\n   * @abstract\n   * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n   * @param {HTMLElement|null} target Target that may be used to render content to.\n   * @return {HTMLElement} The rendered element.\n   */\n  renderFrame(frameState, target) {\n    return abstract();\n  }\n\n  /**\n   * @abstract\n   * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n   * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n   * @param {number} hitTolerance Hit tolerance in pixels.\n   * @param {import(\"./vector.js\").FeatureCallback<T>} callback Feature callback.\n   * @param {Array<import(\"./Map.js\").HitMatch<T>>} matches The hit detected matches with tolerance.\n   * @return {T|undefined} Callback result.\n   * @template T\n   */\n  forEachFeatureAtCoordinate(\n    coordinate,\n    frameState,\n    hitTolerance,\n    callback,\n    matches,\n  ) {\n    return undefined;\n  }\n\n  /**\n   * @return {LayerType} Layer.\n   */\n  getLayer() {\n    return this.layer_;\n  }\n\n  /**\n   * Perform action necessary to get the layer rendered after new fonts have loaded\n   * @abstract\n   */\n  handleFontsChanged() {}\n\n  /**\n   * Handle changes in image state.\n   * @param {import(\"../events/Event.js\").default} event Image change event.\n   * @private\n   */\n  handleImageChange_(event) {\n    const image = /** @type {import(\"../Image.js\").default} */ (event.target);\n    if (\n      image.getState() === ImageState.LOADED ||\n      image.getState() === ImageState.ERROR\n    ) {\n      this.renderIfReadyAndVisible();\n    }\n  }\n\n  /**\n   * Load the image if not already loaded, and register the image change\n   * listener if needed.\n   * @param {import(\"../Image.js\").default} image Image.\n   * @return {boolean} `true` if the image is already loaded, `false` otherwise.\n   * @protected\n   */\n  loadImage(image) {\n    let imageState = image.getState();\n    if (imageState != ImageState.LOADED && imageState != ImageState.ERROR) {\n      image.addEventListener(EventType.CHANGE, this.boundHandleImageChange_);\n    }\n    if (imageState == ImageState.IDLE) {\n      image.load();\n      imageState = image.getState();\n    }\n    return imageState == ImageState.LOADED;\n  }\n\n  /**\n   * @protected\n   */\n  renderIfReadyAndVisible() {\n    const layer = this.getLayer();\n    if (layer && layer.getVisible() && layer.getSourceState() === 'ready') {\n      layer.changed();\n    }\n  }\n\n  /**\n   * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n   */\n  renderDeferred(frameState) {}\n\n  /**\n   * Clean up.\n   * @override\n   */\n  disposeInternal() {\n    delete this.layer_;\n    super.disposeInternal();\n  }\n}\n\nexport default LayerRenderer;\n", "/**\n * @module ol/renderer/canvas/Layer\n */\nimport {equals} from '../../array.js';\nimport {asArray} from '../../color.js';\nimport {createCanvasContext2D, createMockDiv, isCanvas} from '../../dom.js';\nimport {\n  getBottomLeft,\n  getBottomRight,\n  getHeight,\n  getTopLeft,\n  getTopRight,\n  getWidth,\n} from '../../extent.js';\nimport {WORKER_OFFSCREEN_CANVAS} from '../../has.js';\nimport RenderEvent from '../../render/Event.js';\nimport RenderEventType from '../../render/EventType.js';\nimport ZIndexContext from '../../render/canvas/ZIndexContext.js';\nimport {\n  apply as applyTransform,\n  compose as composeTransform,\n  create as createTransform,\n  equivalent,\n  makeInverse,\n  toString as toTransformString,\n} from '../../transform.js';\nimport LayerRenderer from '../Layer.js';\n\n/**\n * @type {Array<HTMLCanvasElement|OffscreenCanvas>}\n */\nexport const canvasPool = [];\n\n/**\n * @type {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D}\n */\nlet pixelContext = null;\n\nfunction createPixelContext() {\n  pixelContext = createCanvasContext2D(1, 1, undefined, {\n    willReadFrequently: true,\n  });\n}\n\n/**\n * @abstract\n * @template {import(\"../../layer/Layer.js\").default} LayerType\n * @extends {LayerRenderer<LayerType>}\n */\nclass CanvasLayerRenderer extends LayerRenderer {\n  /**\n   * @param {LayerType} layer Layer.\n   */\n  constructor(layer) {\n    super(layer);\n\n    /**\n     * HTMLElement container for the layer to be rendered in.\n     * @protected\n     * @type {HTMLElement}\n     */\n    this.container = null;\n\n    /**\n     * @protected\n     * @type {number}\n     */\n    this.renderedResolution;\n\n    /**\n     * A temporary transform.  The values in this transform should only be used in a\n     * function that sets the values.\n     * @protected\n     * @type {import(\"../../transform.js\").Transform}\n     */\n    this.tempTransform = createTransform();\n\n    /**\n     * The transform for rendered pixels to viewport CSS pixels.  This transform must\n     * be set when rendering a frame and may be used by other functions after rendering.\n     * @protected\n     * @type {import(\"../../transform.js\").Transform}\n     */\n    this.pixelTransform = createTransform();\n\n    /**\n     * The transform for viewport CSS pixels to rendered pixels.  This transform must\n     * be set when rendering a frame and may be used by other functions after rendering.\n     * @protected\n     * @type {import(\"../../transform.js\").Transform}\n     */\n    this.inversePixelTransform = createTransform();\n\n    /**\n     * @type {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D}\n     */\n    this.context = null;\n\n    /**\n     * @private\n     * @type {ZIndexContext}\n     */\n    this.deferredContext_ = null;\n\n    /**\n     * true if the container has been reused from the previous renderer\n     * @type {boolean}\n     */\n    this.containerReused = false;\n\n    /**\n     * @protected\n     * @type {import(\"../../Map.js\").FrameState|null}\n     */\n    this.frameState = null;\n  }\n\n  /**\n   * @param {import('../../DataTile.js').ImageLike} image Image.\n   * @param {number} col The column index.\n   * @param {number} row The row index.\n   * @return {Uint8ClampedArray|null} The image data.\n   */\n  getImageData(image, col, row) {\n    if (!pixelContext) {\n      createPixelContext();\n    }\n    pixelContext.clearRect(0, 0, 1, 1);\n\n    let data;\n    try {\n      pixelContext.drawImage(image, col, row, 1, 1, 0, 0, 1, 1);\n      data = pixelContext.getImageData(0, 0, 1, 1).data;\n    } catch {\n      pixelContext = null;\n      return null;\n    }\n    return data;\n  }\n\n  /**\n   * @param {import('../../Map.js').FrameState} frameState Frame state.\n   * @return {string} Background color.\n   */\n  getBackground(frameState) {\n    const layer = this.getLayer();\n    let background = layer.getBackground();\n    if (typeof background === 'function') {\n      background = background(frameState.viewState.resolution);\n    }\n    return background || undefined;\n  }\n\n  /**\n   * Get a rendering container from an existing target, if compatible.\n   * @param {HTMLElement} target Potential render target.\n   * @param {string} transform CSS transform matrix.\n   * @param {string} [backgroundColor] Background color.\n   * @param {number} [width] Physical pixel width of the rendering canvas.\n   * @param {number} [height] Physical pixel height of the rendering canvas.\n   */\n  useContainer(target, transform, backgroundColor, width, height) {\n    // Render directly into the target canvas when there is no rotation or\n    // offset (no CSS transform needed) and the physical dimensions match.\n    if (\n      isCanvas(target) &&\n      this.pixelTransform[1] === 0 &&\n      this.pixelTransform[2] === 0 &&\n      this.pixelTransform[4] === 0 &&\n      this.pixelTransform[5] === 0 &&\n      target.width === width &&\n      target.height === height\n    ) {\n      const targetCanvas = /** @type {HTMLCanvasElement} */ (target);\n      const context = targetCanvas.getContext('2d');\n      if (context) {\n        this.container = target;\n        this.context = context;\n        this.containerReused = true;\n        if (backgroundColor) {\n          context.fillStyle = backgroundColor;\n          context.fillRect(0, 0, targetCanvas.width, targetCanvas.height);\n        }\n        return;\n      }\n    }\n    const layerClassName = this.getLayer().getClassName();\n    let container, context;\n    if (\n      target &&\n      target.className === layerClassName &&\n      (!backgroundColor ||\n        (target &&\n          target.style.backgroundColor &&\n          equals(\n            asArray(target.style.backgroundColor),\n            asArray(backgroundColor),\n          )))\n    ) {\n      const canvas = target.firstElementChild;\n      if (isCanvas(canvas)) {\n        context = canvas.getContext('2d');\n      }\n    }\n    if (context && equivalent(context.canvas.style.transform, transform)) {\n      // Container of the previous layer renderer can be used.\n      this.container = target;\n      this.context = context;\n      this.containerReused = true;\n    } else if (this.containerReused) {\n      // Previously reused container cannot be used any more.\n      this.container = null;\n      this.context = null;\n      this.containerReused = false;\n    } else if (this.container) {\n      this.container.style.backgroundColor = null;\n    }\n    if (!this.container) {\n      container = WORKER_OFFSCREEN_CANVAS\n        ? createMockDiv()\n        : document.createElement('div');\n      container.className = layerClassName;\n      let style = container.style;\n      style.position = 'absolute';\n      style.width = '100%';\n      style.height = '100%';\n      context = createCanvasContext2D();\n      const canvas = /** @type {HTMLCanvasElement} */ (context.canvas);\n      container.appendChild(canvas);\n      style = canvas.style;\n      style.position = 'absolute';\n      style.left = '0';\n      style.transformOrigin = 'top left';\n      this.container = container;\n      this.context = context;\n    }\n    if (\n      !this.containerReused &&\n      backgroundColor &&\n      !this.container.style.backgroundColor\n    ) {\n      this.container.style.backgroundColor = backgroundColor;\n    }\n  }\n\n  /**\n   * @param {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} context Context.\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   * @param {import(\"../../extent.js\").Extent} extent Clip extent.\n   * @protected\n   */\n  clipUnrotated(context, frameState, extent) {\n    const topLeft = getTopLeft(extent);\n    const topRight = getTopRight(extent);\n    const bottomRight = getBottomRight(extent);\n    const bottomLeft = getBottomLeft(extent);\n\n    applyTransform(frameState.coordinateToPixelTransform, topLeft);\n    applyTransform(frameState.coordinateToPixelTransform, topRight);\n    applyTransform(frameState.coordinateToPixelTransform, bottomRight);\n    applyTransform(frameState.coordinateToPixelTransform, bottomLeft);\n\n    const inverted = this.inversePixelTransform;\n    applyTransform(inverted, topLeft);\n    applyTransform(inverted, topRight);\n    applyTransform(inverted, bottomRight);\n    applyTransform(inverted, bottomLeft);\n\n    context.save();\n    context.beginPath();\n    context.moveTo(Math.round(topLeft[0]), Math.round(topLeft[1]));\n    context.lineTo(Math.round(topRight[0]), Math.round(topRight[1]));\n    context.lineTo(Math.round(bottomRight[0]), Math.round(bottomRight[1]));\n    context.lineTo(Math.round(bottomLeft[0]), Math.round(bottomLeft[1]));\n    context.clip();\n  }\n\n  /**\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   * @param {HTMLElement} target Target that may be used to render content to.\n   * @protected\n   */\n  prepareContainer(frameState, target) {\n    const extent = frameState.extent;\n    const resolution = frameState.viewState.resolution;\n    const rotation = frameState.viewState.rotation;\n    const pixelRatio = frameState.pixelRatio;\n    const width = Math.round((getWidth(extent) / resolution) * pixelRatio);\n    const height = Math.round((getHeight(extent) / resolution) * pixelRatio);\n    // set forward and inverse pixel transforms\n    composeTransform(\n      this.pixelTransform,\n      frameState.size[0] / 2,\n      frameState.size[1] / 2,\n      1 / pixelRatio,\n      1 / pixelRatio,\n      rotation,\n      -width / 2,\n      -height / 2,\n    );\n    makeInverse(this.inversePixelTransform, this.pixelTransform);\n\n    const canvasTransform = toTransformString(this.pixelTransform);\n    const backgroundColor = this.getBackground(frameState);\n    this.useContainer(target, canvasTransform, backgroundColor, width, height);\n    if (!this.containerReused) {\n      const canvas = this.context.canvas;\n      if (canvas.width != width || canvas.height != height) {\n        canvas.width = width;\n        canvas.height = height;\n      } else {\n        this.context.clearRect(0, 0, width, height);\n      }\n      if (\n        canvasTransform !==\n        /** @type {HTMLCanvasElement} */ (canvas).style.transform\n      ) {\n        /** @type {HTMLCanvasElement} */ (canvas).style.transform =\n          canvasTransform;\n      }\n    }\n  }\n\n  /**\n   * @param {import(\"../../render/EventType.js\").default} type Event type.\n   * @param {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} context Context.\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   * @private\n   */\n  dispatchRenderEvent_(type, context, frameState) {\n    const layer = this.getLayer();\n    if (layer.hasListener(type)) {\n      const event = new RenderEvent(\n        type,\n        this.inversePixelTransform,\n        frameState,\n        context,\n      );\n      layer.dispatchEvent(event);\n    }\n  }\n\n  /**\n   * @param {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} context Context.\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   * @protected\n   */\n  preRender(context, frameState) {\n    this.frameState = frameState;\n    if (frameState.declutter) {\n      return;\n    }\n    this.dispatchRenderEvent_(RenderEventType.PRERENDER, context, frameState);\n  }\n\n  /**\n   * @param {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} context Context.\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   * @protected\n   */\n  postRender(context, frameState) {\n    if (frameState.declutter) {\n      return;\n    }\n    this.dispatchRenderEvent_(RenderEventType.POSTRENDER, context, frameState);\n  }\n\n  /**\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   */\n  renderDeferredInternal(frameState) {}\n\n  /**\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   * @return {import('../../render/canvas/ZIndexContext.js').ZIndexContextProxy} Context.\n   */\n  getRenderContext(frameState) {\n    if (frameState.declutter && !this.deferredContext_) {\n      this.deferredContext_ = new ZIndexContext();\n    }\n    return frameState.declutter\n      ? this.deferredContext_.getContext()\n      : this.context;\n  }\n\n  /**\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   * @override\n   */\n  renderDeferred(frameState) {\n    if (!frameState.declutter) {\n      return;\n    }\n    this.dispatchRenderEvent_(\n      RenderEventType.PRERENDER,\n      this.context,\n      frameState,\n    );\n    if (frameState.declutter && this.deferredContext_) {\n      this.deferredContext_.draw(this.context);\n      this.deferredContext_.clear();\n    }\n    this.renderDeferredInternal(frameState);\n    this.dispatchRenderEvent_(\n      RenderEventType.POSTRENDER,\n      this.context,\n      frameState,\n    );\n  }\n\n  /**\n   * Creates a transform for rendering to an element that will be rotated after rendering.\n   * @param {import(\"../../coordinate.js\").Coordinate} center Center.\n   * @param {number} resolution Resolution.\n   * @param {number} rotation Rotation.\n   * @param {number} pixelRatio Pixel ratio.\n   * @param {number} width Width of the rendered element (in pixels).\n   * @param {number} height Height of the rendered element (in pixels).\n   * @param {number} offsetX Offset on the x-axis in view coordinates.\n   * @protected\n   * @return {!import(\"../../transform.js\").Transform} Transform.\n   */\n  getRenderTransform(\n    center,\n    resolution,\n    rotation,\n    pixelRatio,\n    width,\n    height,\n    offsetX,\n  ) {\n    const dx1 = width / 2;\n    const dy1 = height / 2;\n    const sx = pixelRatio / resolution;\n    const sy = -sx;\n    const dx2 = -center[0] + offsetX;\n    const dy2 = -center[1];\n    return composeTransform(\n      this.tempTransform,\n      dx1,\n      dy1,\n      sx,\n      sy,\n      -rotation,\n      dx2,\n      dy2,\n    );\n  }\n\n  /**\n   * Clean up.\n   * @override\n   */\n  disposeInternal() {\n    delete this.frameState;\n    super.disposeInternal();\n  }\n}\n\nexport default CanvasLayerRenderer;\n", "/**\n * @module ol/renderer/canvas/VectorLayer\n */\nimport ViewHint from '../../ViewHint.js';\nimport {equals} from '../../array.js';\nimport {wrapX as wrapCoordinateX} from '../../coordinate.js';\nimport {createCanvasContext2D, releaseCanvas} from '../../dom.js';\nimport {\n  buffer,\n  containsExtent,\n  createEmpty,\n  getHeight,\n  getWidth,\n  intersects as intersectsExtent,\n  isEmpty,\n  wrapX as wrapExtentX,\n} from '../../extent.js';\nimport {\n  fromUserExtent,\n  getTransformFromProjections,\n  getUserProjection,\n  toUserExtent,\n  toUserResolution,\n} from '../../proj.js';\nimport RenderEventType from '../../render/EventType.js';\nimport CanvasBuilderGroup from '../../render/canvas/BuilderGroup.js';\nimport ExecutorGroup, {\n  ALL,\n  DECLUTTER,\n  NON_DECLUTTER,\n} from '../../render/canvas/ExecutorGroup.js';\nimport {\n  HIT_DETECT_RESOLUTION,\n  createHitDetectionImageData,\n  hitDetect,\n} from '../../render/canvas/hitdetect.js';\nimport {getUid} from '../../util.js';\nimport {\n  defaultOrder as defaultRenderOrder,\n  getTolerance as getRenderTolerance,\n  getSquaredTolerance as getSquaredRenderTolerance,\n  renderFeature,\n} from '../vector.js';\nimport CanvasLayerRenderer, {canvasPool} from './Layer.js';\n\n/**\n * @classdesc\n * Canvas renderer for vector layers.\n * @api\n */\nclass CanvasVectorLayerRenderer extends CanvasLayerRenderer {\n  /**\n   * @param {import(\"../../layer/BaseVector.js\").default} vectorLayer Vector layer.\n   */\n  constructor(vectorLayer) {\n    super(vectorLayer);\n\n    /** @private */\n    this.boundHandleStyleImageChange_ = this.handleStyleImageChange_.bind(this);\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.animatingOrInteracting_;\n\n    /**\n     * @private\n     * @type {ImageData|null}\n     */\n    this.hitDetectionImageData_ = null;\n\n    /**\n     * @private\n     * @type {import(\"../../extent.js\").Extent}\n     */\n    this.clipExtent_ = null;\n\n    /**\n     * Do we need to extend the rendered area on the x-axis to handle\n     * features that cross the antimeridian?\n     * @private\n     * @type {boolean}\n     */\n    this.extendX_ = false;\n\n    /**\n     * @private\n     * @type {Array<import(\"../../Feature.js\").default>}\n     */\n    this.renderedFeatures_ = null;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.renderedRevision_ = -1;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.renderedResolution_ = NaN;\n\n    /**\n     * @private\n     * @type {import(\"../../extent.js\").Extent}\n     */\n    this.renderedExtent_ = createEmpty();\n\n    /**\n     * @private\n     * @type {import(\"../../extent.js\").Extent}\n     */\n    this.wrappedRenderedExtent_ = createEmpty();\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.renderedRotation_;\n\n    /**\n     * @private\n     * @type {import(\"../../coordinate.js\").Coordinate}\n     */\n    this.renderedCenter_ = null;\n\n    /**\n     * @private\n     * @type {import(\"../../proj/Projection.js\").default}\n     */\n    this.renderedProjection_ = null;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.renderedPixelRatio_ = 1;\n\n    /**\n     * @private\n     * @type {import(\"../../render.js\").OrderFunction|null}\n     */\n    this.renderedRenderOrder_ = null;\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.renderedFrameDeclutter_;\n\n    /**\n     * @private\n     * @type {import(\"../../render/canvas/ExecutorGroup.js\").default}\n     */\n    this.replayGroup_ = null;\n\n    /**\n     * A new replay group had to be created by `prepareFrame()`\n     * @type {boolean}\n     */\n    this.replayGroupChanged = true;\n\n    /**\n     * Clipping to be performed by `renderFrame()`\n     * @type {boolean}\n     */\n    this.clipping = true;\n\n    /**\n     * @private\n     * @type {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D}\n     */\n    this.targetContext_ = null;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.opacity_ = 1;\n  }\n\n  /**\n   * @param {ExecutorGroup} executorGroup Executor group.\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   * @param {boolean} [declutterable] `true` to only render declutterable items,\n   *     `false` to only render non-declutterable items, `undefined` to render all.\n   */\n  renderWorlds(executorGroup, frameState, declutterable) {\n    const extent = frameState.extent;\n    const viewState = frameState.viewState;\n    const center = viewState.center;\n    const resolution = viewState.resolution;\n    const projection = viewState.projection;\n    const rotation = viewState.rotation;\n    const projectionExtent = projection.getExtent();\n    const vectorSource = this.getLayer().getSource();\n    const declutter = this.getLayer().getDeclutter();\n    const pixelRatio = frameState.pixelRatio;\n    const viewHints = frameState.viewHints;\n    const snapToPixel = !(\n      viewHints[ViewHint.ANIMATING] || viewHints[ViewHint.INTERACTING]\n    );\n    const context = this.context;\n    const width = Math.round((getWidth(extent) / resolution) * pixelRatio);\n    const height = Math.round((getHeight(extent) / resolution) * pixelRatio);\n\n    const multiWorld = vectorSource.getWrapX() && projection.canWrapX();\n    const worldWidth = multiWorld ? getWidth(projectionExtent) : null;\n    const endWorld = multiWorld\n      ? Math.ceil((extent[2] - projectionExtent[2]) / worldWidth) +\n        (this.extendX_ ? 2 : 1)\n      : 1;\n    let world = multiWorld\n      ? Math.floor((extent[0] - projectionExtent[0]) / worldWidth) -\n        (this.extendX_ ? 1 : 0)\n      : 0;\n    do {\n      let transform = this.getRenderTransform(\n        center,\n        resolution,\n        0,\n        pixelRatio,\n        width,\n        height,\n        world * worldWidth,\n      );\n      if (frameState.declutter) {\n        transform = transform.slice(0);\n      }\n      executorGroup.execute(\n        context,\n        [context.canvas.width, context.canvas.height],\n        transform,\n        rotation,\n        snapToPixel,\n        declutterable === undefined\n          ? ALL\n          : declutterable\n            ? DECLUTTER\n            : NON_DECLUTTER,\n        declutterable\n          ? declutter && frameState.declutter[declutter]\n          : undefined,\n      );\n    } while (++world < endWorld);\n  }\n\n  /**\n   * @private\n   */\n  setDrawContext_() {\n    if (this.opacity_ !== 1) {\n      this.targetContext_ = this.context;\n      this.context = createCanvasContext2D(\n        this.context.canvas.width,\n        this.context.canvas.height,\n        canvasPool,\n      );\n    }\n  }\n\n  /**\n   * @private\n   */\n  resetDrawContext_() {\n    if (this.opacity_ !== 1 && this.targetContext_) {\n      const alpha = this.targetContext_.globalAlpha;\n      this.targetContext_.globalAlpha = this.opacity_;\n      this.targetContext_.drawImage(this.context.canvas, 0, 0);\n      this.targetContext_.globalAlpha = alpha;\n      releaseCanvas(this.context);\n      canvasPool.push(this.context.canvas);\n      this.context = this.targetContext_;\n      this.targetContext_ = null;\n    }\n  }\n\n  /**\n   * Render declutter items for this layer\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   */\n  renderDeclutter(frameState) {\n    if (!this.replayGroup_ || !this.getLayer().getDeclutter()) {\n      return;\n    }\n    this.renderWorlds(this.replayGroup_, frameState, true);\n  }\n\n  /**\n   * Render deferred instructions.\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   * @override\n   */\n  renderDeferredInternal(frameState) {\n    if (!this.replayGroup_) {\n      return;\n    }\n    if (this.clipExtent_) {\n      this.clipUnrotated(this.context, frameState, this.clipExtent_);\n    }\n    this.replayGroup_.renderDeferred();\n    if (this.clipExtent_) {\n      this.context.restore();\n      this.clipExtent_ = null;\n    }\n    this.resetDrawContext_();\n  }\n\n  /**\n   * Render the layer.\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   * @param {HTMLElement|null} target Target that may be used to render content to.\n   * @return {HTMLElement} The rendered element.\n   * @override\n   */\n  renderFrame(frameState, target) {\n    const layerState = frameState.layerStatesArray[frameState.layerIndex];\n    this.opacity_ = layerState.opacity;\n    const viewState = frameState.viewState;\n\n    this.prepareContainer(frameState, target);\n    const context = this.context;\n\n    const replayGroup = this.replayGroup_;\n    let render = replayGroup && !replayGroup.isEmpty();\n    if (!render) {\n      const hasRenderListeners =\n        this.getLayer().hasListener(RenderEventType.PRERENDER) ||\n        this.getLayer().hasListener(RenderEventType.POSTRENDER);\n      if (!hasRenderListeners) {\n        return this.container;\n      }\n    }\n\n    this.setDrawContext_();\n\n    this.preRender(context, frameState);\n\n    const projection = viewState.projection;\n\n    // clipped rendering if layer extent is set\n    this.clipExtent_ = null;\n    let clipped = false;\n    if (render && layerState.extent && this.clipping) {\n      const layerExtent = fromUserExtent(layerState.extent, projection);\n      render = intersectsExtent(layerExtent, frameState.extent);\n      const needsClip =\n        render && !containsExtent(layerExtent, frameState.extent);\n      if (needsClip) {\n        if (frameState.declutter) {\n          // Store extent for deferred clipping\n          this.clipExtent_ = layerExtent;\n        } else {\n          // Apply clipping immediately for non-declutter rendering\n          this.clipUnrotated(context, frameState, layerExtent);\n          clipped = true;\n        }\n      }\n    }\n\n    if (render) {\n      this.renderWorlds(\n        replayGroup,\n        frameState,\n        this.getLayer().getDeclutter() ? false : undefined,\n      );\n    }\n\n    if (clipped) {\n      context.restore();\n    }\n\n    this.postRender(context, frameState);\n\n    if (this.renderedRotation_ !== viewState.rotation) {\n      this.renderedRotation_ = viewState.rotation;\n      this.hitDetectionImageData_ = null;\n    }\n    if (!frameState.declutter) {\n      this.resetDrawContext_();\n    }\n    return this.container;\n  }\n\n  /**\n   * Asynchronous layer level hit detection.\n   * @param {import(\"../../pixel.js\").Pixel} pixel Pixel.\n   * @return {Promise<Array<import(\"../../Feature.js\").default>>} Promise\n   * that resolves with an array of features.\n   * @override\n   */\n  getFeatures(pixel) {\n    return new Promise((resolve) => {\n      if (\n        this.frameState &&\n        !this.hitDetectionImageData_ &&\n        !this.animatingOrInteracting_\n      ) {\n        const size = this.frameState.size.slice();\n        const center = this.renderedCenter_;\n        const resolution = this.renderedResolution_;\n        const rotation = this.renderedRotation_;\n        const projection = this.renderedProjection_;\n        const extent = this.wrappedRenderedExtent_;\n        const layer = this.getLayer();\n        const transforms = [];\n        const width = size[0] * HIT_DETECT_RESOLUTION;\n        const height = size[1] * HIT_DETECT_RESOLUTION;\n        transforms.push(\n          this.getRenderTransform(\n            center,\n            resolution,\n            rotation,\n            HIT_DETECT_RESOLUTION,\n            width,\n            height,\n            0,\n          ).slice(),\n        );\n        const source = layer.getSource();\n        const projectionExtent = projection.getExtent();\n        if (\n          source.getWrapX() &&\n          projection.canWrapX() &&\n          !containsExtent(projectionExtent, extent)\n        ) {\n          let startX = extent[0];\n          const worldWidth = getWidth(projectionExtent);\n          let world = 0;\n          let offsetX;\n          while (startX < projectionExtent[0]) {\n            --world;\n            offsetX = worldWidth * world;\n            transforms.push(\n              this.getRenderTransform(\n                center,\n                resolution,\n                rotation,\n                HIT_DETECT_RESOLUTION,\n                width,\n                height,\n                offsetX,\n              ).slice(),\n            );\n            startX += worldWidth;\n          }\n          world = 0;\n          startX = extent[2];\n          while (startX > projectionExtent[2]) {\n            ++world;\n            offsetX = worldWidth * world;\n            transforms.push(\n              this.getRenderTransform(\n                center,\n                resolution,\n                rotation,\n                HIT_DETECT_RESOLUTION,\n                width,\n                height,\n                offsetX,\n              ).slice(),\n            );\n            startX -= worldWidth;\n          }\n        }\n        const userProjection = getUserProjection();\n        this.hitDetectionImageData_ = createHitDetectionImageData(\n          size,\n          transforms,\n          this.renderedFeatures_,\n          layer.getStyleFunction(),\n          extent,\n          resolution,\n          rotation,\n          getSquaredRenderTolerance(resolution, this.renderedPixelRatio_),\n          userProjection ? projection : null,\n        );\n      }\n      resolve(\n        hitDetect(pixel, this.renderedFeatures_, this.hitDetectionImageData_),\n      );\n    });\n  }\n\n  /**\n   * @param {import(\"../../coordinate.js\").Coordinate} coordinate Coordinate.\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   * @param {number} hitTolerance Hit tolerance in pixels.\n   * @param {import(\"../vector.js\").FeatureCallback<T>} callback Feature callback.\n   * @param {Array<import(\"../Map.js\").HitMatch<T>>} matches The hit detected matches with tolerance.\n   * @return {T|undefined} Callback result.\n   * @template T\n   * @override\n   */\n  forEachFeatureAtCoordinate(\n    coordinate,\n    frameState,\n    hitTolerance,\n    callback,\n    matches,\n  ) {\n    if (!this.replayGroup_) {\n      return undefined;\n    }\n    const resolution = frameState.viewState.resolution;\n    const rotation = frameState.viewState.rotation;\n    const layer = this.getLayer();\n\n    /** @type {!Object<string, import(\"../Map.js\").HitMatch<T>|true>} */\n    const features = {};\n\n    /**\n     * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n     * @param {import(\"../../geom/SimpleGeometry.js\").default} geometry Geometry.\n     * @param {number} distanceSq The squared distance to the click position\n     * @return {T|undefined} Callback result.\n     */\n    const featureCallback = function (feature, geometry, distanceSq) {\n      const key = getUid(feature);\n      const match = features[key];\n      if (!match) {\n        if (distanceSq === 0) {\n          features[key] = true;\n          return callback(feature, layer, geometry);\n        }\n        matches.push(\n          (features[key] = {\n            feature: feature,\n            layer: layer,\n            geometry: geometry,\n            distanceSq: distanceSq,\n            callback: callback,\n          }),\n        );\n      } else if (match !== true && distanceSq < match.distanceSq) {\n        if (distanceSq === 0) {\n          features[key] = true;\n          matches.splice(matches.lastIndexOf(match), 1);\n          return callback(feature, layer, geometry);\n        }\n        match.geometry = geometry;\n        match.distanceSq = distanceSq;\n      }\n      return undefined;\n    };\n\n    const declutter = this.getLayer().getDeclutter();\n    return this.replayGroup_.forEachFeatureAtCoordinate(\n      coordinate,\n      resolution,\n      rotation,\n      hitTolerance,\n      featureCallback,\n      declutter\n        ? frameState.declutter?.[declutter]?.all().map((item) => item.value)\n        : null,\n    );\n  }\n\n  /**\n   * Perform action necessary to get the layer rendered after new fonts have loaded\n   * @override\n   */\n  handleFontsChanged() {\n    const layer = this.getLayer();\n    if (layer.getVisible() && this.replayGroup_) {\n      layer.changed();\n    }\n  }\n\n  /**\n   * Handle changes in image style state.\n   * @param {import(\"../../events/Event.js\").default} event Image style change event.\n   * @private\n   */\n  handleStyleImageChange_(event) {\n    this.renderIfReadyAndVisible();\n  }\n\n  /**\n   * Determine whether render should be called.\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   * @return {boolean} Layer is ready to be rendered.\n   * @override\n   */\n  prepareFrame(frameState) {\n    const vectorLayer = this.getLayer();\n    const vectorSource = vectorLayer.getSource();\n    if (!vectorSource) {\n      return false;\n    }\n\n    const animating = frameState.viewHints[ViewHint.ANIMATING];\n    const interacting = frameState.viewHints[ViewHint.INTERACTING];\n    const updateWhileAnimating = vectorLayer.getUpdateWhileAnimating();\n    const updateWhileInteracting = vectorLayer.getUpdateWhileInteracting();\n\n    if (\n      (this.ready && !updateWhileAnimating && animating) ||\n      (!updateWhileInteracting && interacting)\n    ) {\n      this.animatingOrInteracting_ = true;\n      return true;\n    }\n    this.animatingOrInteracting_ = false;\n\n    const frameStateExtent = frameState.extent;\n    const viewState = frameState.viewState;\n    const projection = viewState.projection;\n    const resolution = viewState.resolution;\n    const pixelRatio = frameState.pixelRatio;\n    const vectorLayerRevision = vectorLayer.getRevision();\n    const vectorLayerRenderBuffer = vectorLayer.getRenderBuffer();\n    let vectorLayerRenderOrder = vectorLayer.getRenderOrder();\n\n    if (vectorLayerRenderOrder === undefined) {\n      vectorLayerRenderOrder = defaultRenderOrder;\n    }\n\n    const center = viewState.center.slice();\n    const extent = buffer(\n      frameStateExtent,\n      vectorLayerRenderBuffer * resolution,\n    );\n    const renderedExtent = extent.slice();\n    const loadExtents = [extent.slice()];\n    const projectionExtent = projection.getExtent();\n\n    const canWrapX = vectorSource.getWrapX() && projection.canWrapX();\n    this.extendX_ = false;\n    if (canWrapX) {\n      const sourceExtent = vectorSource.getExtent();\n      if (sourceExtent && !isEmpty(sourceExtent)) {\n        this.extendX_ =\n          sourceExtent[0] < projectionExtent[0] ||\n          sourceExtent[2] > projectionExtent[2];\n      }\n    }\n\n    if (\n      canWrapX &&\n      (!containsExtent(projectionExtent, frameState.extent) || this.extendX_)\n    ) {\n      // For the replay group, we need an extent that intersects the real world\n      // (-180\u00B0 to +180\u00B0). To support geometries in a coordinate range from -540\u00B0\n      // to +540\u00B0, we add at least 1 world width on each side of the projection\n      // extent. If the viewport is wider than the world, we need to add half of\n      // the viewport width to make sure we cover the whole viewport.\n      const worldWidth = getWidth(projectionExtent);\n      const gutter = Math.max(getWidth(extent) / 2, worldWidth);\n      let projMinX = projectionExtent[0];\n      let projMaxX = projectionExtent[2];\n      if (this.extendX_) {\n        projMinX -= worldWidth;\n        projMaxX += worldWidth;\n      }\n      extent[0] = projMinX - gutter;\n      extent[2] = projMaxX + gutter;\n      wrapCoordinateX(center, projection);\n      const loadExtent = wrapExtentX(loadExtents[0], projection);\n      // If the extent crosses the date line, we load data for both edges of the worlds\n      if (\n        loadExtent[0] < projectionExtent[0] &&\n        loadExtent[2] < projectionExtent[2]\n      ) {\n        loadExtents.push([\n          loadExtent[0] + worldWidth,\n          loadExtent[1],\n          loadExtent[2] + worldWidth,\n          loadExtent[3],\n        ]);\n      } else if (\n        loadExtent[0] > projectionExtent[0] &&\n        loadExtent[2] > projectionExtent[2]\n      ) {\n        loadExtents.push([\n          loadExtent[0] - worldWidth,\n          loadExtent[1],\n          loadExtent[2] - worldWidth,\n          loadExtent[3],\n        ]);\n      }\n    }\n\n    if (\n      this.ready &&\n      this.renderedResolution_ == resolution &&\n      this.renderedPixelRatio_ === pixelRatio &&\n      this.renderedRevision_ == vectorLayerRevision &&\n      this.renderedRenderOrder_ == vectorLayerRenderOrder &&\n      this.renderedFrameDeclutter_ === !!frameState.declutter &&\n      containsExtent(this.wrappedRenderedExtent_, extent)\n    ) {\n      if (!equals(this.renderedExtent_, renderedExtent)) {\n        this.hitDetectionImageData_ = null;\n        this.renderedExtent_ = renderedExtent;\n      }\n      this.renderedCenter_ = center;\n      this.replayGroupChanged = false;\n      return true;\n    }\n\n    this.replayGroup_ = null;\n\n    const replayGroup = new CanvasBuilderGroup(\n      getRenderTolerance(resolution, pixelRatio),\n      extent,\n      resolution,\n      pixelRatio,\n    );\n\n    const userProjection = getUserProjection();\n    let userTransform;\n    if (userProjection) {\n      for (let i = 0, ii = loadExtents.length; i < ii; ++i) {\n        const extent = loadExtents[i];\n        const userExtent = toUserExtent(extent, projection);\n        vectorSource.loadFeatures(\n          userExtent,\n          toUserResolution(resolution, projection),\n          userProjection,\n        );\n      }\n      userTransform = getTransformFromProjections(userProjection, projection);\n    } else {\n      for (let i = 0, ii = loadExtents.length; i < ii; ++i) {\n        vectorSource.loadFeatures(loadExtents[i], resolution, projection);\n      }\n    }\n\n    const squaredTolerance = getSquaredRenderTolerance(resolution, pixelRatio);\n    let ready = true;\n    const render =\n      /**\n       * @param {import(\"../../Feature.js\").default} feature Feature.\n       * @param {number} index Index.\n       */\n      (feature, index) => {\n        let styles;\n        const styleFunction =\n          feature.getStyleFunction() || vectorLayer.getStyleFunction();\n        if (styleFunction) {\n          styles = styleFunction(feature, resolution);\n        }\n        if (styles) {\n          const dirty = this.renderFeature(\n            feature,\n            squaredTolerance,\n            styles,\n            replayGroup,\n            userTransform,\n            this.getLayer().getDeclutter(),\n            index,\n          );\n          ready = ready && !dirty;\n        }\n      };\n\n    const userExtent = toUserExtent(extent, projection);\n    /** @type {Array<import(\"../../Feature.js\").default>} */\n    const features = vectorSource.getFeaturesInExtent(userExtent);\n    if (vectorLayerRenderOrder) {\n      features.sort(vectorLayerRenderOrder);\n    }\n    for (let i = 0, ii = features.length; i < ii; ++i) {\n      render(features[i], i);\n    }\n    this.renderedFeatures_ = features;\n    this.ready = ready;\n\n    const replayGroupInstructions = replayGroup.finish();\n    const executorGroup = new ExecutorGroup(\n      extent,\n      resolution,\n      pixelRatio,\n      vectorSource.getOverlaps(),\n      replayGroupInstructions,\n      vectorLayer.getRenderBuffer(),\n      !!frameState.declutter,\n    );\n\n    this.renderedResolution_ = resolution;\n    this.renderedRevision_ = vectorLayerRevision;\n    this.renderedRenderOrder_ = vectorLayerRenderOrder;\n    this.renderedFrameDeclutter_ = !!frameState.declutter;\n    this.renderedExtent_ = renderedExtent;\n    this.wrappedRenderedExtent_ = extent;\n    this.renderedCenter_ = center;\n    this.renderedProjection_ = projection;\n    this.renderedPixelRatio_ = pixelRatio;\n    this.replayGroup_ = executorGroup;\n    this.hitDetectionImageData_ = null;\n\n    this.replayGroupChanged = true;\n    return true;\n  }\n\n  /**\n   * @param {import(\"../../Feature.js\").default} feature Feature.\n   * @param {number} squaredTolerance Squared render tolerance.\n   * @param {import(\"../../style/Style.js\").default|Array<import(\"../../style/Style.js\").default>} styles The style or array of styles.\n   * @param {import(\"../../render/canvas/BuilderGroup.js\").default} builderGroup Builder group.\n   * @param {import(\"../../proj.js\").TransformFunction} [transform] Transform from user to view projection.\n   * @param {boolean} [declutter] Enable decluttering.\n   * @param {number} [index] Render order index.\n   * @return {boolean} `true` if an image is loading.\n   */\n  renderFeature(\n    feature,\n    squaredTolerance,\n    styles,\n    builderGroup,\n    transform,\n    declutter,\n    index,\n  ) {\n    if (!styles) {\n      return false;\n    }\n    let loading = false;\n    if (Array.isArray(styles)) {\n      for (let i = 0, ii = styles.length; i < ii; ++i) {\n        loading =\n          renderFeature(\n            builderGroup,\n            feature,\n            styles[i],\n            squaredTolerance,\n            this.boundHandleStyleImageChange_,\n            transform,\n            declutter,\n            index,\n          ) || loading;\n      }\n    } else {\n      loading = renderFeature(\n        builderGroup,\n        feature,\n        styles,\n        squaredTolerance,\n        this.boundHandleStyleImageChange_,\n        transform,\n        declutter,\n        index,\n      );\n    }\n    return loading;\n  }\n}\n\nexport default CanvasVectorLayerRenderer;\n", "/**\n * @module ol/expr/expression\n */\nimport {ascending} from '../array.js';\nimport {fromString as colorFromString} from '../color.js';\nimport {toSize} from '../size.js';\n\n/**\n * @fileoverview This module includes types and functions for parsing array encoded expressions.\n * The result of parsing an encoded expression is one of the specific expression classes.\n * During parsing, information is added to the parsing context about the data accessed by the\n * expression.\n */\n\n/**\n * Base type used for literal style parameters; can be a number literal or the output of an operator,\n * which in turns takes {@link import(\"./expression.js\").ExpressionValue} arguments.\n *\n * See below for details on the available operators (with notes for those that are WebGL or Canvas only).\n *\n * Reading operators:\n *   * `['band', bandIndex, xOffset, yOffset]` For tile layers only. Fetches pixel values from band\n *     `bandIndex` of the source's data. The first `bandIndex` of the source data is `1`. Fetched values\n *     are in the 0..1 range. {@link import(\"../source/TileImage.js\").default} sources have 4 bands: red,\n *     green, blue and alpha. {@link import(\"../source/DataTile.js\").default} sources can have any number\n *     of bands, depending on the underlying data source and\n *     {@link import(\"../source/GeoTIFF.js\").Options configuration}. `xOffset` and `yOffset` are optional\n *     and allow specifying pixel offsets for x and y. This is used for sampling data from neighboring pixels (WebGL only).\n *   * `['get', attributeName]` fetches a feature property value, similar to `feature.get('attributeName')`.\n *   * `['get', attributeName, keyOrArrayIndex, ...]` (Canvas only) Access nested properties and array items of a\n *     feature property. The result is `undefined` when there is nothing at the specified key or index.\n *   * `['geometry-type']` returns a feature's geometry type as string, either: 'LineString', 'Point' or 'Polygon'\n *     `Multi*` values are returned as their singular equivalent\n *     `Circle` geometries are returned as 'Polygon'\n *     `GeometryCollection` geometries are returned as the type of the first geometry found in the collection (WebGL only).\n *   * `['resolution']` returns the current resolution\n *   * `['time']` The time in seconds since the creation of the layer (WebGL only).\n *   * `['var', 'varName']` fetches a value from the style variables; will throw an error if that variable is undefined\n *   * `['zoom']` The current zoom level (WebGL only).\n *   * `['line-metric']` returns the M component of the current point on a line (WebGL only); in case where the geometry layout of the line\n *      does not contain an M component (e.g. XY or XYZ), 0 is returned; 0 is also returned for geometries other than lines.\n *      Please note that the M component will be linearly interpolated between the two points composing a segment.\n *\n * Math operators:\n *   * `['*', value1, value2, ...]` multiplies the values (either numbers or colors)\n *   * `['/', value1, value2]` divides `value1` by `value2`\n *   * `['+', value1, value2, ...]` adds the values\n *   * `['-', value1, value2]` subtracts `value2` from `value1`\n *   * `['clamp', value, low, high]` clamps `value` between `low` and `high`\n *   * `['%', value1, value2]` returns the result of `value1 % value2` (modulo)\n *   * `['^', value1, value2]` returns the value of `value1` raised to the `value2` power\n *   * `['abs', value1]` returns the absolute value of `value1`\n *   * `['floor', value1]` returns the nearest integer less than or equal to `value1`\n *   * `['round', value1]` returns the nearest integer to `value1`\n *   * `['ceil', value1]` returns the nearest integer greater than or equal to `value1`\n *   * `['sin', value1]` returns the sine of `value1`\n *   * `['cos', value1]` returns the cosine of `value1`\n *   * `['atan', value1, value2]` returns `atan2(value1, value2)`. If `value2` is not provided, returns `atan(value1)`\n *   * `['sqrt', value1]` returns the square root of `value1`\n *\n * * Transform operators:\n *   * `['case', condition1, output1, ...conditionN, outputN, fallback]` selects the first output whose corresponding\n *     condition evaluates to `true`. If no match is found, returns the `fallback` value.\n *     All conditions should be `boolean`, output and fallback can be any kind.\n *   * `['match', input, match1, output1, ...matchN, outputN, fallback]` compares the `input` value against all\n *     provided `matchX` values, returning the output associated with the first valid match. If no match is found,\n *     returns the `fallback` value.\n *     `input` and `matchX` values must all be of the same type, and can be `number` or `string`. `outputX` and\n *     `fallback` values must be of the same type, and can be of any kind.\n *   * `['interpolate', interpolation, input, stop1, output1, ...stopN, outputN]` returns a value by interpolating between\n *     pairs of inputs and outputs; `interpolation` can either be `['linear']` or `['exponential', base]` where `base` is\n *     the rate of increase from stop A to stop B (i.e. power to which the interpolation ratio is raised); a value\n *     of 1 is equivalent to `['linear']`.\n *     `input` and `stopX` values must all be of type `number`. `outputX` values can be `number` or `color` values.\n *     Note: `input` will be clamped between `stop1` and `stopN`, meaning that all output values will be comprised\n *     between `output1` and `outputN`.\n *   * `['string', value1, value2, ...]` returns the first value in the list that evaluates to a string.\n *     An example would be to provide a default value for get: `['string', ['get', 'propertyname'], 'default value']]`\n *     (Canvas only).\n *   * `['number', value1, value2, ...]` returns the first value in the list that evaluates to a number.\n *     An example would be to provide a default value for get: `['string', ['get', 'propertyname'], 42]]`\n *     (Canvas only).\n *   * `['coalesce', value1, value2, ...]` returns the first value in the list which is not null or undefined.\n *     An example would be to provide a default value for get: `['coalesce', ['get','propertyname'], 'default value']]`\n *     (Canvas only).\n *\n * * Logical operators:\n *   * `['<', value1, value2]` returns `true` if `value1` is strictly lower than `value2`, or `false` otherwise.\n *   * `['<=', value1, value2]` returns `true` if `value1` is lower than or equals `value2`, or `false` otherwise.\n *   * `['>', value1, value2]` returns `true` if `value1` is strictly greater than `value2`, or `false` otherwise.\n *   * `['>=', value1, value2]` returns `true` if `value1` is greater than or equals `value2`, or `false` otherwise.\n *   * `['==', value1, value2]` returns `true` if `value1` equals `value2`, or `false` otherwise.\n *   * `['!=', value1, value2]` returns `true` if `value1` does not equal `value2`, or `false` otherwise.\n *   * `['!', value1]` returns `false` if `value1` is `true` or greater than `0`, or `true` otherwise.\n *   * `['all', value1, value2, ...]` returns `true` if all the inputs are `true`, `false` otherwise.\n *   * `['any', value1, value2, ...]` returns `true` if any of the inputs are `true`, `false` otherwise.\n *   * `['has', attributeName, keyOrArrayIndex, ...]` returns `true` if feature properties include the (nested) key `attributeName`,\n *     `false` otherwise.\n *     Note that for WebGL layers, the hardcoded value `-9999999` is used to distinguish when a property is not defined.\n *   * `['between', value1, value2, value3]` returns `true` if `value1` is contained between `value2` and `value3`\n *     (inclusively), or `false` otherwise.\n *   * `['in', needle, haystack]` returns `true` if `needle` is found in `haystack`, and\n *     `false` otherwise.\n *     This operator has the following limitations:\n *     * `haystack` has to be an array of numbers or strings (searching for a substring in a string is not supported yet)\n *     * Only literal arrays are supported as `haystack` for now; this means that `haystack` cannot be the result of an\n *     expression. If `haystack` is an array of strings, use the `literal` operator to disambiguate from an expression:\n *     `['literal', ['abc', 'def', 'ghi']]`\n *     This works as well for number arrays although it is not required. Mixing types (numbers and strings) will produce undefined results.\n *\n * * Conversion operators:\n *   * `['array', value1, ...valueN]` creates a numerical array from `number` values; please note that the amount of\n *     values can currently only be 2, 3 or 4 (WebGL only).\n *   * `['color', red, green, blue, alpha]` or `['color', shade, alpha]` creates a `color` value from `number` values;\n *     the `alpha` parameter is optional; if not specified, it will be set to 1 (WebGL only).\n *     Note: `red`, `green` and `blue` or `shade` components must be values between 0 and 255; `alpha` between 0 and 1.\n *   * `['palette', index, colors]` picks a `color` value from an array of colors using the given index; the `index`\n *     expression must evaluate to a number; the items in the `colors` array must be strings with hex colors\n *     (e.g. `'#86A136'`), colors using the rgba[a] functional notation (e.g. `'rgb(134, 161, 54)'` or `'rgba(134, 161, 54, 1)'`),\n *     named colors (e.g. `'red'`), or array literals with 3 ([r, g, b]) or 4 ([r, g, b, a]) values (with r, g, and b\n *     in the 0-255 range and a in the 0-1 range) (WebGL only).\n *   * `['to-string', value]` converts the input value to a string. If the input is a boolean, the result is \"true\" or \"false\".\n *     If the input is a number, it is converted to a string as specified by the \"NumberToString\" algorithm of the ECMAScript\n *     Language Specification. If the input is a color, it is converted to a string of the form \"rgba(r,g,b,a)\". (Canvas only)\n *\n * Values can either be literals or another operator, as they will be evaluated recursively.\n * Literal values can be of the following types:\n * * `boolean`\n * * `number`\n * * `number[]` (number arrays can only have a length of 2, 3 or 4)\n * * `string`\n * * {@link module:ol/color~Color}\n *\n * @typedef {Array<*>|import(\"../color.js\").Color|string|number|boolean} ExpressionValue\n * @api\n */\n\n/**\n * @typedef {number} ValueType\n */\n\nlet numTypes = 0;\nexport const NoneType = 0;\nexport const BooleanType = 1 << numTypes++;\nexport const NumberType = 1 << numTypes++;\nexport const StringType = 1 << numTypes++;\nexport const ColorType = 1 << numTypes++;\nexport const NumberArrayType = 1 << numTypes++;\nexport const SizeType = 1 << numTypes++;\nexport const AnyType = Math.pow(2, numTypes) - 1;\n\nconst typeNames = {\n  [BooleanType]: 'boolean',\n  [NumberType]: 'number',\n  [StringType]: 'string',\n  [ColorType]: 'color',\n  [NumberArrayType]: 'number[]',\n  [SizeType]: 'size',\n};\n\nconst namedTypes = Object.keys(typeNames).map(Number).sort(ascending);\n\n/**\n * @param {ValueType} type The type.\n * @return {boolean} The type is one of the specific types (not any or a union type).\n */\nfunction isSpecific(type) {\n  return type in typeNames;\n}\n\n/**\n * Get a string representation for a type.\n * @param {ValueType} type The type.\n * @return {string} The type name.\n */\nexport function typeName(type) {\n  const names = [];\n  for (const namedType of namedTypes) {\n    if (includesType(type, namedType)) {\n      names.push(typeNames[namedType]);\n    }\n  }\n  if (names.length === 0) {\n    return 'untyped';\n  }\n  if (names.length < 3) {\n    return names.join(' or ');\n  }\n  return names.slice(0, -1).join(', ') + ', or ' + names[names.length - 1];\n}\n\n/**\n * @param {ValueType} broad The broad type.\n * @param {ValueType} specific The specific type.\n * @return {boolean} The broad type includes the specific type.\n */\nexport function includesType(broad, specific) {\n  return (broad & specific) === specific;\n}\n\n/**\n * @param {ValueType} oneType One type.\n * @param {ValueType} otherType Another type.\n * @return {boolean} The set of types overlap (share a common specific type)\n */\nexport function overlapsType(oneType, otherType) {\n  return !!(oneType & otherType);\n}\n\n/**\n * @param {ValueType} type The type.\n * @param {ValueType} expected The expected type.\n * @return {boolean} The given type is exactly the expected type.\n */\nexport function isType(type, expected) {\n  return type === expected;\n}\n\n/**\n * @typedef {boolean|number|string|Array<number>} LiteralValue\n */\n\nexport class LiteralExpression {\n  /**\n   * @param {ValueType} type The value type.\n   * @param {LiteralValue} value The literal value.\n   */\n  constructor(type, value) {\n    if (!isSpecific(type)) {\n      throw new Error(\n        `literal expressions must have a specific type, got ${typeName(type)}`,\n      );\n    }\n    this.type = type;\n    this.value = value;\n  }\n}\n\nexport class CallExpression {\n  /**\n   * @param {ValueType} type The return type.\n   * @param {string} operator The operator.\n   * @param {...Expression} args The arguments.\n   */\n  constructor(type, operator, ...args) {\n    this.type = type;\n    this.operator = operator;\n    this.args = args;\n  }\n}\n\n/**\n * @typedef {LiteralExpression|CallExpression} Expression\n */\n\n/**\n * @typedef {Object} ParsingContext\n * @property {Map<string, ValueType>} variables Variables referenced with the 'var' operator; key is name, value is type.\n * @property {Map<string, ValueType>} properties Properties referenced with the 'get' operator; key is name, value is type.\n * @property {boolean} featureId The style uses the feature id.\n * @property {boolean} geometryType The style uses the feature geometry type.\n * @property {boolean} mCoordinate The style uses the M coordinate of geometries\n * @property {boolean} mapState The style uses the map state (view state or time elapsed).\n * @property {import('../style/flat.js').StyleVariables} [inputVariables] Variable values (i.e. style variables) given as input during parsing to help with type narrowing\n */\n\n/**\n * @param {import('../style/flat.js').StyleVariables} [inputVariables] Variable values (i.e. style variables) given as input during parsing to help with type narrowing\n * @return {ParsingContext} A new parsing context.\n */\nexport function newParsingContext(inputVariables) {\n  return {\n    variables: new Map(),\n    properties: new Map(),\n    featureId: false,\n    geometryType: false,\n    mCoordinate: false,\n    mapState: false,\n    inputVariables,\n  };\n}\n\n/**\n * @typedef {LiteralValue|Array} EncodedExpression\n */\n\n/**\n * @param {EncodedExpression} encoded The encoded expression.\n * @param {ValueType} expectedType The expected type.\n * @param {ParsingContext} context The parsing context.\n * @return {Expression} The parsed expression result.\n */\nexport function parse(encoded, expectedType, context) {\n  switch (typeof encoded) {\n    case 'boolean': {\n      if (isType(expectedType, StringType)) {\n        return new LiteralExpression(StringType, encoded ? 'true' : 'false');\n      }\n      if (!includesType(expectedType, BooleanType)) {\n        throw new Error(\n          `got a boolean, but expected ${typeName(expectedType)}`,\n        );\n      }\n      return new LiteralExpression(BooleanType, encoded);\n    }\n    case 'number': {\n      if (isType(expectedType, SizeType)) {\n        return new LiteralExpression(SizeType, toSize(encoded));\n      }\n      if (isType(expectedType, BooleanType)) {\n        return new LiteralExpression(BooleanType, !!encoded);\n      }\n      if (isType(expectedType, StringType)) {\n        return new LiteralExpression(StringType, encoded.toString());\n      }\n      if (!includesType(expectedType, NumberType)) {\n        throw new Error(`got a number, but expected ${typeName(expectedType)}`);\n      }\n      return new LiteralExpression(NumberType, encoded);\n    }\n    case 'string': {\n      if (isType(expectedType, ColorType)) {\n        return new LiteralExpression(ColorType, colorFromString(encoded));\n      }\n      if (isType(expectedType, BooleanType)) {\n        return new LiteralExpression(BooleanType, !!encoded);\n      }\n      if (!includesType(expectedType, StringType)) {\n        throw new Error(`got a string, but expected ${typeName(expectedType)}`);\n      }\n      return new LiteralExpression(StringType, encoded);\n    }\n    default: {\n      // pass\n    }\n  }\n\n  if (!Array.isArray(encoded)) {\n    throw new Error('expression must be an array or a primitive value');\n  }\n\n  if (encoded.length === 0) {\n    throw new Error('empty expression');\n  }\n\n  if (typeof encoded[0] === 'string') {\n    return parseCallExpression(encoded, expectedType, context);\n  }\n\n  for (const item of encoded) {\n    if (typeof item !== 'number') {\n      throw new Error('expected an array of numbers');\n    }\n  }\n\n  if (isType(expectedType, SizeType)) {\n    if (encoded.length !== 2) {\n      throw new Error(\n        `expected an array of two values for a size, got ${encoded.length}`,\n      );\n    }\n    return new LiteralExpression(SizeType, encoded);\n  }\n\n  if (isType(expectedType, ColorType)) {\n    if (encoded.length === 3) {\n      return new LiteralExpression(ColorType, [...encoded, 1]);\n    }\n    if (encoded.length === 4) {\n      return new LiteralExpression(ColorType, encoded);\n    }\n    throw new Error(\n      `expected an array of 3 or 4 values for a color, got ${encoded.length}`,\n    );\n  }\n\n  if (!includesType(expectedType, NumberArrayType)) {\n    throw new Error(\n      `got an array of numbers, but expected ${typeName(expectedType)}`,\n    );\n  }\n\n  return new LiteralExpression(NumberArrayType, encoded);\n}\n\n/**\n * @type {Object<string, string>}\n */\nexport const Ops = {\n  Get: 'get',\n  Var: 'var',\n  Concat: 'concat',\n  GeometryType: 'geometry-type',\n  LineMetric: 'line-metric',\n  Any: 'any',\n  All: 'all',\n  Not: '!',\n  Resolution: 'resolution',\n  Zoom: 'zoom',\n  Time: 'time',\n  Equal: '==',\n  NotEqual: '!=',\n  GreaterThan: '>',\n  GreaterThanOrEqualTo: '>=',\n  LessThan: '<',\n  LessThanOrEqualTo: '<=',\n  Multiply: '*',\n  Divide: '/',\n  Add: '+',\n  Subtract: '-',\n  Clamp: 'clamp',\n  Mod: '%',\n  Pow: '^',\n  Abs: 'abs',\n  Floor: 'floor',\n  Ceil: 'ceil',\n  Round: 'round',\n  Sin: 'sin',\n  Cos: 'cos',\n  Atan: 'atan',\n  Sqrt: 'sqrt',\n  Match: 'match',\n  Between: 'between',\n  Interpolate: 'interpolate',\n  Coalesce: 'coalesce',\n  Case: 'case',\n  In: 'in',\n  Number: 'number',\n  String: 'string',\n  Array: 'array',\n  Color: 'color',\n  Id: 'id',\n  Band: 'band',\n  Palette: 'palette',\n  ToString: 'to-string',\n  Has: 'has',\n};\n\n/**\n * @typedef {function(Array, number, ParsingContext):Expression} Parser\n *\n * Second argument is the expected type.\n */\n\n/**\n * @type {Object<string, Parser>}\n */\nconst parsers = {\n  [Ops.Get]: createCallExpressionParser(hasArgsCount(1, Infinity), withGetArgs),\n  [Ops.Var]: createVarExpressionParser(),\n  [Ops.Has]: createCallExpressionParser(hasArgsCount(1, Infinity), withGetArgs),\n  [Ops.Id]: createCallExpressionParser(usesFeatureId, withNoArgs),\n  [Ops.Concat]: createCallExpressionParser(\n    hasArgsCount(2, Infinity),\n    withArgsOfType(StringType),\n  ),\n  [Ops.GeometryType]: createCallExpressionParser(usesGeometryType, withNoArgs),\n  [Ops.LineMetric]: createCallExpressionParser(usesMCoordinate, withNoArgs),\n  [Ops.Resolution]: createCallExpressionParser(usesMapState, withNoArgs),\n  [Ops.Zoom]: createCallExpressionParser(usesMapState, withNoArgs),\n  [Ops.Time]: createCallExpressionParser(usesMapState, withNoArgs),\n  [Ops.Any]: createCallExpressionParser(\n    hasArgsCount(2, Infinity),\n    withArgsOfType(BooleanType),\n  ),\n  [Ops.All]: createCallExpressionParser(\n    hasArgsCount(2, Infinity),\n    withArgsOfType(BooleanType),\n  ),\n  [Ops.Not]: createCallExpressionParser(\n    hasArgsCount(1, 1),\n    withArgsOfType(BooleanType),\n  ),\n  [Ops.Equal]: createCallExpressionParser(\n    hasArgsCount(2, 2),\n    withArgsOfIdenticalType(),\n  ),\n  [Ops.NotEqual]: createCallExpressionParser(\n    hasArgsCount(2, 2),\n    withArgsOfIdenticalType(),\n  ),\n  [Ops.GreaterThan]: createCallExpressionParser(\n    hasArgsCount(2, 2),\n    withArgsOfType(NumberType),\n  ),\n  [Ops.GreaterThanOrEqualTo]: createCallExpressionParser(\n    hasArgsCount(2, 2),\n    withArgsOfType(NumberType),\n  ),\n  [Ops.LessThan]: createCallExpressionParser(\n    hasArgsCount(2, 2),\n    withArgsOfType(NumberType),\n  ),\n  [Ops.LessThanOrEqualTo]: createCallExpressionParser(\n    hasArgsCount(2, 2),\n    withArgsOfType(NumberType),\n  ),\n  [Ops.Multiply]: createCallExpressionParser(\n    hasArgsCount(2, Infinity),\n    withArgsOfReturnType,\n  ),\n  [Ops.Coalesce]: createCallExpressionParser(\n    hasArgsCount(2, Infinity),\n    withArgsOfReturnType,\n  ),\n  [Ops.Divide]: createCallExpressionParser(\n    hasArgsCount(2, 2),\n    withArgsOfType(NumberType),\n  ),\n  [Ops.Add]: createCallExpressionParser(\n    hasArgsCount(2, Infinity),\n    withArgsOfType(NumberType),\n  ),\n  [Ops.Subtract]: createCallExpressionParser(\n    hasArgsCount(2, 2),\n    withArgsOfType(NumberType),\n  ),\n  [Ops.Clamp]: createCallExpressionParser(\n    hasArgsCount(3, 3),\n    withArgsOfType(NumberType),\n  ),\n  [Ops.Mod]: createCallExpressionParser(\n    hasArgsCount(2, 2),\n    withArgsOfType(NumberType),\n  ),\n  [Ops.Pow]: createCallExpressionParser(\n    hasArgsCount(2, 2),\n    withArgsOfType(NumberType),\n  ),\n  [Ops.Abs]: createCallExpressionParser(\n    hasArgsCount(1, 1),\n    withArgsOfType(NumberType),\n  ),\n  [Ops.Floor]: createCallExpressionParser(\n    hasArgsCount(1, 1),\n    withArgsOfType(NumberType),\n  ),\n  [Ops.Ceil]: createCallExpressionParser(\n    hasArgsCount(1, 1),\n    withArgsOfType(NumberType),\n  ),\n  [Ops.Round]: createCallExpressionParser(\n    hasArgsCount(1, 1),\n    withArgsOfType(NumberType),\n  ),\n  [Ops.Sin]: createCallExpressionParser(\n    hasArgsCount(1, 1),\n    withArgsOfType(NumberType),\n  ),\n  [Ops.Cos]: createCallExpressionParser(\n    hasArgsCount(1, 1),\n    withArgsOfType(NumberType),\n  ),\n  [Ops.Atan]: createCallExpressionParser(\n    hasArgsCount(1, 2),\n    withArgsOfType(NumberType),\n  ),\n  [Ops.Sqrt]: createCallExpressionParser(\n    hasArgsCount(1, 1),\n    withArgsOfType(NumberType),\n  ),\n  [Ops.Match]: createCallExpressionParser(\n    hasArgsCount(4, Infinity),\n    hasEvenArgs,\n    withMatchArgs,\n  ),\n  [Ops.Between]: createCallExpressionParser(\n    hasArgsCount(3, 3),\n    withArgsOfType(NumberType),\n  ),\n  [Ops.Interpolate]: createCallExpressionParser(\n    hasArgsCount(6, Infinity),\n    hasEvenArgs,\n    withInterpolateArgs,\n  ),\n  [Ops.Case]: createCallExpressionParser(\n    hasArgsCount(3, Infinity),\n    hasOddArgs,\n    withCaseArgs,\n  ),\n  [Ops.In]: createCallExpressionParser(hasArgsCount(2, 2), withInArgs),\n  [Ops.Number]: createCallExpressionParser(\n    hasArgsCount(1, Infinity),\n    withArgsOfType(AnyType),\n  ),\n  [Ops.String]: createCallExpressionParser(\n    hasArgsCount(1, Infinity),\n    withArgsOfType(AnyType),\n  ),\n  [Ops.Array]: createCallExpressionParser(\n    hasArgsCount(1, Infinity),\n    withArgsOfType(NumberType),\n  ),\n  [Ops.Color]: createCallExpressionParser(\n    hasArgsCount(1, 4),\n    withArgsOfType(NumberType),\n  ),\n  [Ops.Band]: createCallExpressionParser(\n    hasArgsCount(1, 3),\n    withArgsOfType(NumberType),\n  ),\n  [Ops.Palette]: createCallExpressionParser(\n    hasArgsCount(2, 2),\n    withPaletteArgs,\n  ),\n  [Ops.ToString]: createCallExpressionParser(\n    hasArgsCount(1, 1),\n    withArgsOfType(BooleanType | NumberType | StringType | ColorType),\n  ),\n};\n\n/**\n * @typedef {function(Array<EncodedExpression>, ValueType, ParsingContext):Array<Expression>|void} ArgValidator\n *\n * An argument validator applies various checks to an encoded expression arguments and\n * returns the parsed arguments if any.  The second argument is the return type of the call expression.\n */\n\n/**\n * @type {ArgValidator}\n */\nfunction withGetArgs(encoded, returnType, context) {\n  const argsCount = encoded.length - 1;\n  const args = new Array(argsCount);\n  for (let i = 0; i < argsCount; ++i) {\n    const key = encoded[i + 1];\n    switch (typeof key) {\n      case 'number': {\n        args[i] = new LiteralExpression(NumberType, key);\n        break;\n      }\n      case 'string': {\n        args[i] = new LiteralExpression(StringType, key);\n        break;\n      }\n      default: {\n        throw new Error(\n          `expected a string key or numeric array index for a get operation, got ${key}`,\n        );\n      }\n    }\n    if (i === 0) {\n      context.properties.set(String(key), returnType);\n    }\n  }\n  return args;\n}\n\n/**\n * This special expression parser reads style variables present in the context to narrow down\n * the expected return type of the 'var' operator\n * @return {Parser} The parser.\n */\nfunction createVarExpressionParser() {\n  return function (encoded, returnType, context) {\n    const name = encoded[1];\n    if (typeof name !== 'string') {\n      throw new Error('expected a string argument for var operation');\n    }\n    let type = returnType;\n\n    const variableValue = context.inputVariables?.[name];\n    if (variableValue !== undefined) {\n      const parsedInput = parse(variableValue, AnyType, context);\n      if (!(parsedInput instanceof LiteralExpression)) {\n        throw new Error(\n          `style variables should only be literal values (no expressions!), variable name: ${name}`,\n        );\n      }\n      let parsedType = parsedInput.type;\n\n      // special cases (because variables are not embedded in expressions and as such are harder to figure out their types)\n      // * if the variable is a string (e.g. 'blue') and we know that the expected type is not\n      //   StringType but ColorType, assume that the variable is indeed a color and not a string\n      // * if the variable is 2-elements a number array and we know that the expected type is SizeType\n      //   and not NumberArrayType, assume that the variable is indeed a size\n      if (\n        typeof variableValue === 'string' &&\n        overlapsType(type, ColorType) &&\n        !overlapsType(type, StringType)\n      ) {\n        parsedType = ColorType;\n      } else if (\n        Array.isArray(variableValue) &&\n        variableValue.length === 2 &&\n        overlapsType(type, SizeType) &&\n        !overlapsType(type, NumberArrayType)\n      ) {\n        parsedType = SizeType;\n      }\n\n      type &= parsedType;\n      if (type === NoneType) {\n        throw new Error(\n          `the type expected from the var operator (${typeName(returnType)}) did not have any overlap with the type of the corresponding style variables (${typeName(parsedType)}), variable name: ${name}`,\n        );\n      }\n    }\n\n    if (context.variables.has(name)) {\n      const existingType = context.variables.get(name);\n      type &= existingType;\n      if (type === NoneType) {\n        throw new Error(\n          `a new type expected from the var operator (${typeName(returnType)}) did not have any overlap with the previous type expected for it (${typeName(existingType)}), variable name: ${name}`,\n        );\n      }\n    }\n\n    context.variables.set(name, type);\n\n    return new CallExpression(\n      type,\n      'var',\n      new LiteralExpression(StringType, name),\n    );\n  };\n}\n\n/**\n * @type {ArgValidator}\n */\nfunction usesFeatureId(encoded, returnType, context) {\n  context.featureId = true;\n}\n\n/**\n * @type {ArgValidator}\n */\nfunction usesGeometryType(encoded, returnType, context) {\n  context.geometryType = true;\n}\n\n/**\n * @type {ArgValidator}\n */\nfunction usesMCoordinate(encoded, returnType, context) {\n  context.mCoordinate = true;\n}\n\n/**\n * @type {ArgValidator}\n */\nfunction usesMapState(encoded, returnType, context) {\n  context.mapState = true;\n}\n\n/**\n * @type {ArgValidator}\n */\nfunction withNoArgs(encoded, returnType, context) {\n  const operation = encoded[0];\n  if (encoded.length !== 1) {\n    throw new Error(`expected no arguments for ${operation} operation`);\n  }\n  return [];\n}\n\n/**\n * @param {number} minArgs The minimum number of arguments.\n * @param {number} maxArgs The maximum number of arguments.\n * @return {ArgValidator} The argument validator\n */\nfunction hasArgsCount(minArgs, maxArgs) {\n  return function (encoded, returnType, context) {\n    const operation = encoded[0];\n    const argCount = encoded.length - 1;\n    if (minArgs === maxArgs) {\n      if (argCount !== minArgs) {\n        const plural = minArgs === 1 ? '' : 's';\n        throw new Error(\n          `expected ${minArgs} argument${plural} for ${operation}, got ${argCount}`,\n        );\n      }\n    } else if (argCount < minArgs || argCount > maxArgs) {\n      const range =\n        maxArgs === Infinity\n          ? `${minArgs} or more`\n          : `${minArgs} to ${maxArgs}`;\n      throw new Error(\n        `expected ${range} arguments for ${operation}, got ${argCount}`,\n      );\n    }\n  };\n}\n\n/**\n * @type {ArgValidator}\n */\nfunction withArgsOfReturnType(encoded, returnType, context) {\n  const argCount = encoded.length - 1;\n  /**\n   * @type {Array<Expression>}\n   */\n  const args = new Array(argCount);\n  for (let i = 0; i < argCount; ++i) {\n    const expression = parse(encoded[i + 1], returnType, context);\n    args[i] = expression;\n  }\n  return args;\n}\n\n/**\n * @param {ValueType} argType The argument type.\n * @return {ArgValidator} The argument validator\n */\nfunction withArgsOfType(argType) {\n  return function (encoded, returnType, context) {\n    const argCount = encoded.length - 1;\n    /**\n     * @type {Array<Expression>}\n     */\n    const args = new Array(argCount);\n    for (let i = 0; i < argCount; ++i) {\n      const expression = parse(encoded[i + 1], argType, context);\n      args[i] = expression;\n    }\n    return args;\n  };\n}\n\n/**\n * @return {ArgValidator} The argument validator\n */\nfunction withArgsOfIdenticalType() {\n  return function (encoded, returnType, context) {\n    const operation = encoded[0];\n    const argCount = encoded.length - 1;\n    /**\n     * @type {Array<Expression>}\n     */\n    const args = new Array(argCount);\n    let commonType = AnyType;\n    for (let i = 0; i < argCount; ++i) {\n      const expression = parse(encoded[i + 1], commonType, context);\n      commonType &= expression.type;\n    }\n    if (commonType === NoneType) {\n      throw new Error(\n        `no common type was found among the arguments of ${operation}`,\n      );\n    }\n    // second loop to compile actual args\n    for (let i = 0; i < argCount; ++i) {\n      const expression = parse(encoded[i + 1], commonType, context);\n      args[i] = expression;\n    }\n    return args;\n  };\n}\n\n/**\n * @type {ArgValidator}\n */\nfunction hasOddArgs(encoded, returnType, context) {\n  const operation = encoded[0];\n  const argCount = encoded.length - 1;\n  if (argCount % 2 === 0) {\n    throw new Error(\n      `expected an odd number of arguments for ${operation}, got ${argCount} instead`,\n    );\n  }\n}\n\n/**\n * @type {ArgValidator}\n */\nfunction hasEvenArgs(encoded, returnType, context) {\n  const operation = encoded[0];\n  const argCount = encoded.length - 1;\n  if (argCount % 2 === 1) {\n    throw new Error(\n      `expected an even number of arguments for operation ${operation}, got ${argCount} instead`,\n    );\n  }\n}\n\n/**\n * @type {ArgValidator}\n */\nfunction withMatchArgs(encoded, returnType, context) {\n  const argsCount = encoded.length - 1;\n\n  const fallback = parse(encoded[encoded.length - 1], returnType, context);\n\n  let inputType = StringType | NumberType | BooleanType;\n  const args = new Array(argsCount - 2);\n\n  // first round to determine input type\n  for (let i = 0; i < argsCount - 2; i += 2) {\n    try {\n      const match = parse(encoded[i + 2], inputType, context);\n      inputType &= match.type;\n    } catch (err) {\n      throw new Error(\n        `failed to parse argument ${i + 1} of match expression: ${err.message}`,\n      );\n    }\n    if (inputType === NoneType) {\n      throw new Error(\n        `no common type was found among the arguments of match expression`,\n      );\n    }\n  }\n\n  for (let i = 0; i < argsCount - 2; i += 2) {\n    try {\n      const match = parse(encoded[i + 2], inputType, context);\n      args[i] = match;\n    } catch (err) {\n      throw new Error(\n        `failed to parse argument ${i + 1} of match expression: ${err.message}`,\n      );\n    }\n    try {\n      const output = parse(encoded[i + 3], fallback.type, context);\n      args[i + 1] = output;\n    } catch (err) {\n      throw new Error(\n        `failed to parse argument ${i + 2} of match expression: ${err.message}`,\n      );\n    }\n  }\n\n  const input = parse(encoded[1], inputType, context);\n\n  return [input, ...args, fallback];\n}\n\n/**\n * @type {ArgValidator}\n */\nfunction withInterpolateArgs(encoded, returnType, context) {\n  const interpolationType = encoded[1];\n  /**\n   * @type {number}\n   */\n  let base;\n  switch (interpolationType[0]) {\n    case 'linear':\n      base = 1;\n      break;\n    case 'exponential':\n      const b = interpolationType[1];\n      if (typeof b !== 'number' || b <= 0) {\n        throw new Error(\n          `expected a number base for exponential interpolation` +\n            `, got ${JSON.stringify(b)} instead`,\n        );\n      }\n      base = b;\n      break;\n    default:\n      throw new Error(\n        `invalid interpolation type: ${JSON.stringify(interpolationType)}`,\n      );\n  }\n\n  const interpolation = new LiteralExpression(NumberType, base);\n\n  let input;\n  try {\n    input = parse(encoded[2], NumberType, context);\n  } catch (err) {\n    throw new Error(\n      `failed to parse argument 1 in interpolate expression: ${err.message}`,\n    );\n  }\n\n  const args = new Array(encoded.length - 3);\n  for (let i = 0; i < args.length; i += 2) {\n    try {\n      const stop = parse(encoded[i + 3], NumberType, context);\n      args[i] = stop;\n    } catch (err) {\n      throw new Error(\n        `failed to parse argument ${i + 2} for interpolate expression: ${err.message}`,\n      );\n    }\n    try {\n      const output = parse(encoded[i + 4], returnType, context);\n      args[i + 1] = output;\n    } catch (err) {\n      throw new Error(\n        `failed to parse argument ${i + 3} for interpolate expression: ${err.message}`,\n      );\n    }\n  }\n\n  return [interpolation, input, ...args];\n}\n\n/**\n * @type {ArgValidator}\n */\nfunction withCaseArgs(encoded, returnType, context) {\n  const fallback = parse(encoded[encoded.length - 1], returnType, context);\n\n  const args = new Array(encoded.length - 1);\n  for (let i = 0; i < args.length - 1; i += 2) {\n    try {\n      const condition = parse(encoded[i + 1], BooleanType, context);\n      args[i] = condition;\n    } catch (err) {\n      throw new Error(\n        `failed to parse argument ${i} of case expression: ${err.message}`,\n      );\n    }\n    try {\n      const output = parse(encoded[i + 2], fallback.type, context);\n      args[i + 1] = output;\n    } catch (err) {\n      throw new Error(\n        `failed to parse argument ${i + 1} of case expression: ${err.message}`,\n      );\n    }\n  }\n\n  args[args.length - 1] = fallback;\n  return args;\n}\n\n/**\n * @type {ArgValidator}\n */\nfunction withInArgs(encoded, returnType, context) {\n  let haystack = encoded[2];\n  if (!Array.isArray(haystack)) {\n    throw new Error(\n      `the second argument for the \"in\" operator must be an array`,\n    );\n  }\n  /**\n   * @type {ValueType}\n   */\n  let needleType;\n\n  // check if we're using the 'literal' operator for the haystack\n  if (haystack[0] === 'literal') {\n    haystack = haystack[1];\n    if (!Array.isArray(haystack)) {\n      throw new Error(\n        `failed to parse \"in\" expression: the literal operator must be followed by an array`,\n      );\n    }\n  } else if (typeof haystack[0] === 'string') {\n    throw new Error(\n      `for the \"in\" operator, a string array should be wrapped in a \"literal\" operator to disambiguate from expressions`,\n    );\n  }\n\n  if (typeof haystack[0] === 'string') {\n    needleType = StringType;\n  } else {\n    needleType = NumberType;\n  }\n\n  const args = new Array(haystack.length);\n  for (let i = 0; i < args.length; i++) {\n    try {\n      const arg = parse(haystack[i], needleType, context);\n      args[i] = arg;\n    } catch (err) {\n      throw new Error(\n        `failed to parse haystack item ${i} for \"in\" expression: ${err.message}`,\n      );\n    }\n  }\n\n  const needle = parse(encoded[1], needleType, context);\n  return [needle, ...args];\n}\n\n/**\n * @type {ArgValidator}\n */\nfunction withPaletteArgs(encoded, returnType, context) {\n  let index;\n  try {\n    index = parse(encoded[1], NumberType, context);\n  } catch (err) {\n    throw new Error(\n      `failed to parse first argument in palette expression: ${err.message}`,\n    );\n  }\n  const colors = encoded[2];\n  if (!Array.isArray(colors)) {\n    throw new Error('the second argument of palette must be an array');\n  }\n  const parsedColors = new Array(colors.length);\n  for (let i = 0; i < parsedColors.length; i++) {\n    let color;\n    try {\n      color = parse(colors[i], ColorType, context);\n    } catch (err) {\n      throw new Error(\n        `failed to parse color at index ${i} in palette expression: ${err.message}`,\n      );\n    }\n    if (!(color instanceof LiteralExpression)) {\n      throw new Error(\n        `the palette color at index ${i} must be a literal value`,\n      );\n    }\n    parsedColors[i] = color;\n  }\n  return [index, ...parsedColors];\n}\n\n/**\n * @param {Array<ArgValidator>} validators A chain of argument validators.  The last validator is expected\n * to return the parsed arguments.\n * @return {Parser} The parser.\n */\nfunction createCallExpressionParser(...validators) {\n  return function (encoded, returnType, context) {\n    const operator = encoded[0];\n\n    /**\n     * @type {Array<Expression>}\n     */\n    let args;\n    for (let i = 0; i < validators.length; i++) {\n      const parsed = validators[i](encoded, returnType, context);\n      if (i == validators.length - 1) {\n        if (!parsed) {\n          throw new Error(\n            'expected last argument validator to return the parsed args',\n          );\n        }\n        args = parsed;\n      }\n    }\n    return new CallExpression(returnType, operator, ...args);\n  };\n}\n\n/**\n * @param {Array} encoded The encoded expression.\n * @param {ValueType} returnType The expected return type of the call expression.\n * @param {ParsingContext} context The parsing context.\n * @return {Expression} The parsed expression.\n */\nfunction parseCallExpression(encoded, returnType, context) {\n  const operator = encoded[0];\n\n  const parser = parsers[operator];\n  if (!parser) {\n    throw new Error(`unknown operator: ${operator}`);\n  }\n  return parser(encoded, returnType, context);\n}\n\n/**\n * Returns a simplified geometry type suited for the `geometry-type` operator\n * @param {import('../geom/Geometry.js').default|import('../render/Feature.js').default} geometry Geometry object\n * @return {'Point'|'LineString'|'Polygon'|''} Simplified geometry type; empty string of no geometry found\n */\nexport function computeGeometryType(geometry) {\n  if (!geometry) {\n    return '';\n  }\n  const type = geometry.getType();\n  switch (type) {\n    case 'Point':\n    case 'LineString':\n    case 'Polygon':\n      return type;\n    case 'MultiPoint':\n    case 'MultiLineString':\n    case 'MultiPolygon':\n      return /** @type {'Point'|'LineString'|'Polygon'} */ (type.substring(5));\n    case 'Circle':\n      return 'Polygon';\n    case 'GeometryCollection':\n      return computeGeometryType(\n        /** @type {import(\"../geom/GeometryCollection.js\").default} */ (\n          geometry\n        ).getGeometries()[0],\n      );\n    default:\n      return '';\n  }\n}\n", "/**\n * @module ol/expr/cpu\n */\n\nimport {\n  fromString,\n  lchaToRgba,\n  rgbaToLcha,\n  toString,\n  withAlpha,\n} from '../color.js';\nimport {ColorType, LiteralExpression, Ops, parse} from './expression.js';\n\n/**\n * @typedef {import('./expression.js').ValueType} ValueType\n */\n\n/**\n * @fileoverview This module includes functions to build expressions for evaluation on the CPU.\n * Building is composed of two steps: parsing and compiling.  The parsing step takes an encoded\n * expression and returns an instance of one of the expression classes.  The compiling step takes\n * the expression instance and returns a function that can be evaluated in to return a literal\n * value.  The evaluator function should do as little allocation and work as possible.\n */\n\n/**\n * @typedef {Object} EvaluationContext\n * @property {Object} properties The values for properties used in 'get' expressions.\n * @property {Object} variables The values for variables used in 'var' expressions.\n * @property {number} resolution The map resolution.\n * @property {string|number|null} featureId The feature id.\n * @property {string} geometryType Geometry type of the current object.\n */\n\n/**\n * @return {EvaluationContext} A new evaluation context.\n */\nexport function newEvaluationContext() {\n  return {\n    variables: {},\n    properties: {},\n    resolution: NaN,\n    featureId: null,\n    geometryType: '',\n  };\n}\n\n/**\n * @typedef {function(EvaluationContext):import(\"./expression.js\").LiteralValue} ExpressionEvaluator\n */\n\n/**\n * @typedef {function(EvaluationContext):boolean} BooleanEvaluator\n */\n\n/**\n * @typedef {function(EvaluationContext):number} NumberEvaluator\n */\n\n/**\n * @typedef {function(EvaluationContext):string} StringEvaluator\n */\n\n/**\n * @typedef {function(EvaluationContext):(Array<number>|string)} ColorLikeEvaluator\n */\n\n/**\n * @typedef {function(EvaluationContext):Array<number>} NumberArrayEvaluator\n */\n\n/**\n * @typedef {function(EvaluationContext):Array<number>} CoordinateEvaluator\n */\n\n/**\n * @typedef {function(EvaluationContext):(Array<number>)} SizeEvaluator\n */\n\n/**\n * @typedef {function(EvaluationContext):(Array<number>|number)} SizeLikeEvaluator\n */\n\n/**\n * @param {import('./expression.js').EncodedExpression} encoded The encoded expression.\n * @param {ValueType} type The expected type.\n * @param {import('./expression.js').ParsingContext} context The parsing context.\n * @return {ExpressionEvaluator} The expression evaluator.\n */\nexport function buildExpression(encoded, type, context) {\n  const expression = parse(encoded, type, context);\n  return compileExpression(expression, context);\n}\n\n/**\n * @param {import(\"./expression.js\").Expression} expression The expression.\n * @param {import('./expression.js').ParsingContext} context The parsing context.\n * @return {ExpressionEvaluator} The evaluator function.\n */\nfunction compileExpression(expression, context) {\n  if (expression instanceof LiteralExpression) {\n    // convert colors to array if possible\n    if (expression.type === ColorType && typeof expression.value === 'string') {\n      const colorValue = fromString(expression.value);\n      return function () {\n        return colorValue;\n      };\n    }\n    return function () {\n      return expression.value;\n    };\n  }\n  const operator = expression.operator;\n  switch (operator) {\n    case Ops.Number:\n    case Ops.String:\n    case Ops.Coalesce: {\n      return compileAssertionExpression(expression, context);\n    }\n    case Ops.Get:\n    case Ops.Var:\n    case Ops.Has: {\n      return compileAccessorExpression(expression, context);\n    }\n    case Ops.Id: {\n      return (context) => context.featureId;\n    }\n    case Ops.GeometryType: {\n      return (context) => context.geometryType;\n    }\n    case Ops.Concat: {\n      const args = expression.args.map((e) => compileExpression(e, context));\n      return (context) =>\n        ''.concat(...args.map((arg) => arg(context).toString()));\n    }\n    case Ops.Resolution: {\n      return (context) => context.resolution;\n    }\n    case Ops.Any:\n    case Ops.All:\n    case Ops.Between:\n    case Ops.In:\n    case Ops.Not: {\n      return compileLogicalExpression(expression, context);\n    }\n    case Ops.Equal:\n    case Ops.NotEqual:\n    case Ops.LessThan:\n    case Ops.LessThanOrEqualTo:\n    case Ops.GreaterThan:\n    case Ops.GreaterThanOrEqualTo: {\n      return compileComparisonExpression(expression, context);\n    }\n    case Ops.Multiply:\n    case Ops.Divide:\n    case Ops.Add:\n    case Ops.Subtract:\n    case Ops.Clamp:\n    case Ops.Mod:\n    case Ops.Pow:\n    case Ops.Abs:\n    case Ops.Floor:\n    case Ops.Ceil:\n    case Ops.Round:\n    case Ops.Sin:\n    case Ops.Cos:\n    case Ops.Atan:\n    case Ops.Sqrt: {\n      return compileNumericExpression(expression, context);\n    }\n    case Ops.Case: {\n      return compileCaseExpression(expression, context);\n    }\n    case Ops.Match: {\n      return compileMatchExpression(expression, context);\n    }\n    case Ops.Interpolate: {\n      return compileInterpolateExpression(expression, context);\n    }\n    case Ops.ToString: {\n      return compileConvertExpression(expression, context);\n    }\n    default: {\n      throw new Error(`Unsupported operator ${operator}`);\n    }\n    // TODO: unimplemented\n    // Ops.Zoom\n    // Ops.Time\n    // Ops.Array\n    // Ops.Color\n    // Ops.Band\n    // Ops.Palette\n  }\n}\n\n/**\n * @param {import('./expression.js').CallExpression} expression The call expression.\n * @param {import('./expression.js').ParsingContext} context The parsing context.\n * @return {ExpressionEvaluator} The evaluator function.\n */\nfunction compileAssertionExpression(expression, context) {\n  const type = expression.operator;\n  const length = expression.args.length;\n\n  const args = new Array(length);\n  for (let i = 0; i < length; ++i) {\n    args[i] = compileExpression(expression.args[i], context);\n  }\n  switch (type) {\n    case Ops.Coalesce: {\n      return (context) => {\n        for (let i = 0; i < length; ++i) {\n          const value = args[i](context);\n          if (typeof value !== 'undefined' && value !== null) {\n            return value;\n          }\n        }\n        throw new Error('Expected one of the values to be non-null');\n      };\n    }\n    case Ops.Number:\n    case Ops.String: {\n      return (context) => {\n        for (let i = 0; i < length; ++i) {\n          const value = args[i](context);\n          if (typeof value === type) {\n            return value;\n          }\n        }\n        throw new Error(`Expected one of the values to be a ${type}`);\n      };\n    }\n    default: {\n      throw new Error(`Unsupported assertion operator ${type}`);\n    }\n  }\n}\n\n/**\n * @param {import('./expression.js').CallExpression} expression The call expression.\n * @param {import('./expression.js').ParsingContext} context The parsing context.\n * @return {ExpressionEvaluator} The evaluator function.\n */\nfunction compileAccessorExpression(expression, context) {\n  const nameExpression = /** @type {LiteralExpression} */ (expression.args[0]);\n  const name = /** @type {string} */ (nameExpression.value);\n  switch (expression.operator) {\n    case Ops.Get: {\n      return (context) => {\n        const args = expression.args;\n        let value = context.properties[name];\n        for (let i = 1, ii = args.length; i < ii; ++i) {\n          const keyExpression = /** @type {LiteralExpression} */ (args[i]);\n          const key = /** @type {string|number} */ (keyExpression.value);\n          value = value[key];\n        }\n        return value;\n      };\n    }\n    case Ops.Var: {\n      return (context) => context.variables[name];\n    }\n    case Ops.Has: {\n      return (context) => {\n        const args = expression.args;\n        if (!(name in context.properties)) {\n          return false;\n        }\n        let value = context.properties[name];\n        for (let i = 1, ii = args.length; i < ii; ++i) {\n          const keyExpression = /** @type {LiteralExpression} */ (args[i]);\n          const key = /** @type {string|number} */ (keyExpression.value);\n          if (!value || !Object.hasOwn(value, key)) {\n            return false;\n          }\n          value = value[key];\n        }\n        return true;\n      };\n    }\n    default: {\n      throw new Error(`Unsupported accessor operator ${expression.operator}`);\n    }\n  }\n}\n\n/**\n * @param {import('./expression.js').CallExpression} expression The call expression.\n * @param {import('./expression.js').ParsingContext} context The parsing context.\n * @return {BooleanEvaluator} The evaluator function.\n */\nfunction compileComparisonExpression(expression, context) {\n  const op = expression.operator;\n  const left = compileExpression(expression.args[0], context);\n  const right = compileExpression(expression.args[1], context);\n  switch (op) {\n    case Ops.Equal: {\n      return (context) => left(context) === right(context);\n    }\n    case Ops.NotEqual: {\n      return (context) => left(context) !== right(context);\n    }\n    case Ops.LessThan: {\n      return (context) => left(context) < right(context);\n    }\n    case Ops.LessThanOrEqualTo: {\n      return (context) => left(context) <= right(context);\n    }\n    case Ops.GreaterThan: {\n      return (context) => left(context) > right(context);\n    }\n    case Ops.GreaterThanOrEqualTo: {\n      return (context) => left(context) >= right(context);\n    }\n    default: {\n      throw new Error(`Unsupported comparison operator ${op}`);\n    }\n  }\n}\n\n/**\n * @param {import('./expression.js').CallExpression} expression The call expression.\n * @param {import('./expression.js').ParsingContext} context The parsing context.\n * @return {BooleanEvaluator} The evaluator function.\n */\nfunction compileLogicalExpression(expression, context) {\n  const op = expression.operator;\n  const length = expression.args.length;\n\n  const args = new Array(length);\n  for (let i = 0; i < length; ++i) {\n    args[i] = compileExpression(expression.args[i], context);\n  }\n  switch (op) {\n    case Ops.Any: {\n      return (context) => {\n        for (let i = 0; i < length; ++i) {\n          if (args[i](context)) {\n            return true;\n          }\n        }\n        return false;\n      };\n    }\n    case Ops.All: {\n      return (context) => {\n        for (let i = 0; i < length; ++i) {\n          if (!args[i](context)) {\n            return false;\n          }\n        }\n        return true;\n      };\n    }\n    case Ops.Between: {\n      return (context) => {\n        const value = args[0](context);\n        const min = args[1](context);\n        const max = args[2](context);\n        return value >= min && value <= max;\n      };\n    }\n    case Ops.In: {\n      return (context) => {\n        const value = args[0](context);\n        for (let i = 1; i < length; ++i) {\n          if (value === args[i](context)) {\n            return true;\n          }\n        }\n        return false;\n      };\n    }\n    case Ops.Not: {\n      return (context) => !args[0](context);\n    }\n    default: {\n      throw new Error(`Unsupported logical operator ${op}`);\n    }\n  }\n}\n\n/**\n * @param {import('./expression.js').CallExpression} expression The call expression.\n * @param {import('./expression.js').ParsingContext} context The parsing context.\n * @return {NumberEvaluator} The evaluator function.\n */\nfunction compileNumericExpression(expression, context) {\n  const op = expression.operator;\n  const length = expression.args.length;\n\n  const args = new Array(length);\n  for (let i = 0; i < length; ++i) {\n    args[i] = compileExpression(expression.args[i], context);\n  }\n  switch (op) {\n    case Ops.Multiply: {\n      return (context) => {\n        let value = 1;\n        for (let i = 0; i < length; ++i) {\n          value *= args[i](context);\n        }\n        return value;\n      };\n    }\n    case Ops.Divide: {\n      return (context) => args[0](context) / args[1](context);\n    }\n    case Ops.Add: {\n      return (context) => {\n        let value = 0;\n        for (let i = 0; i < length; ++i) {\n          value += args[i](context);\n        }\n        return value;\n      };\n    }\n    case Ops.Subtract: {\n      return (context) => args[0](context) - args[1](context);\n    }\n    case Ops.Clamp: {\n      return (context) => {\n        const value = args[0](context);\n        const min = args[1](context);\n        if (value < min) {\n          return min;\n        }\n        const max = args[2](context);\n        if (value > max) {\n          return max;\n        }\n        return value;\n      };\n    }\n    case Ops.Mod: {\n      return (context) => args[0](context) % args[1](context);\n    }\n    case Ops.Pow: {\n      return (context) => Math.pow(args[0](context), args[1](context));\n    }\n    case Ops.Abs: {\n      return (context) => Math.abs(args[0](context));\n    }\n    case Ops.Floor: {\n      return (context) => Math.floor(args[0](context));\n    }\n    case Ops.Ceil: {\n      return (context) => Math.ceil(args[0](context));\n    }\n    case Ops.Round: {\n      return (context) => Math.round(args[0](context));\n    }\n    case Ops.Sin: {\n      return (context) => Math.sin(args[0](context));\n    }\n    case Ops.Cos: {\n      return (context) => Math.cos(args[0](context));\n    }\n    case Ops.Atan: {\n      if (length === 2) {\n        return (context) => Math.atan2(args[0](context), args[1](context));\n      }\n      return (context) => Math.atan(args[0](context));\n    }\n    case Ops.Sqrt: {\n      return (context) => Math.sqrt(args[0](context));\n    }\n    default: {\n      throw new Error(`Unsupported numeric operator ${op}`);\n    }\n  }\n}\n\n/**\n * @param {import('./expression.js').CallExpression} expression The call expression.\n * @param {import('./expression.js').ParsingContext} context The parsing context.\n * @return {ExpressionEvaluator} The evaluator function.\n */\nfunction compileCaseExpression(expression, context) {\n  const length = expression.args.length;\n  const args = new Array(length);\n  for (let i = 0; i < length; ++i) {\n    args[i] = compileExpression(expression.args[i], context);\n  }\n  return (context) => {\n    for (let i = 0; i < length - 1; i += 2) {\n      const condition = args[i](context);\n      if (condition) {\n        return args[i + 1](context);\n      }\n    }\n    return args[length - 1](context);\n  };\n}\n\n/**\n * @param {import('./expression.js').CallExpression} expression The call expression.\n * @param {import('./expression.js').ParsingContext} context The parsing context.\n * @return {ExpressionEvaluator} The evaluator function.\n */\nfunction compileMatchExpression(expression, context) {\n  const length = expression.args.length;\n  const args = new Array(length);\n  for (let i = 0; i < length; ++i) {\n    args[i] = compileExpression(expression.args[i], context);\n  }\n  return (context) => {\n    const value = args[0](context);\n    for (let i = 1; i < length - 1; i += 2) {\n      if (value === args[i](context)) {\n        return args[i + 1](context);\n      }\n    }\n    return args[length - 1](context);\n  };\n}\n\n/**\n * @param {import('./expression.js').CallExpression} expression The call expression.\n * @param {import('./expression.js').ParsingContext} context The parsing context.\n * @return {ExpressionEvaluator} The evaluator function.\n */\nfunction compileInterpolateExpression(expression, context) {\n  const length = expression.args.length;\n  const args = new Array(length);\n  for (let i = 0; i < length; ++i) {\n    args[i] = compileExpression(expression.args[i], context);\n  }\n  return (context) => {\n    const base = args[0](context);\n    const value = args[1](context);\n\n    let previousInput;\n    let previousOutput;\n    for (let i = 2; i < length; i += 2) {\n      const input = args[i](context);\n      let output = args[i + 1](context);\n      const isColor = Array.isArray(output);\n      if (isColor) {\n        output = withAlpha(output);\n      }\n      if (input >= value) {\n        if (i === 2) {\n          return output;\n        }\n        if (isColor) {\n          return interpolateColor(\n            base,\n            value,\n            previousInput,\n            previousOutput,\n            input,\n            output,\n          );\n        }\n        return interpolateNumber(\n          base,\n          value,\n          previousInput,\n          previousOutput,\n          input,\n          output,\n        );\n      }\n      previousInput = input;\n      previousOutput = output;\n    }\n    return previousOutput;\n  };\n}\n\n/**\n * @param {import('./expression.js').CallExpression} expression The call expression.\n * @param {import('./expression.js').ParsingContext} context The parsing context.\n * @return {ExpressionEvaluator} The evaluator function.\n */\nfunction compileConvertExpression(expression, context) {\n  const op = expression.operator;\n  const length = expression.args.length;\n\n  const args = new Array(length);\n  for (let i = 0; i < length; ++i) {\n    args[i] = compileExpression(expression.args[i], context);\n  }\n  switch (op) {\n    case Ops.ToString: {\n      return (context) => {\n        const value = args[0](context);\n        if (expression.args[0].type === ColorType) {\n          return toString(value);\n        }\n        return value.toString();\n      };\n    }\n    default: {\n      throw new Error(`Unsupported convert operator ${op}`);\n    }\n  }\n}\n\n/**\n * @param {number} base The base.\n * @param {number} value The value.\n * @param {number} input1 The first input value.\n * @param {number} output1 The first output value.\n * @param {number} input2 The second input value.\n * @param {number} output2 The second output value.\n * @return {number} The interpolated value.\n */\nfunction interpolateNumber(base, value, input1, output1, input2, output2) {\n  const delta = input2 - input1;\n  if (delta === 0) {\n    return output1;\n  }\n  const along = value - input1;\n  const factor =\n    base === 1\n      ? along / delta\n      : (Math.pow(base, along) - 1) / (Math.pow(base, delta) - 1);\n  return output1 + factor * (output2 - output1);\n}\n\n/**\n * @param {number} base The base.\n * @param {number} value The value.\n * @param {number} input1 The first input value.\n * @param {import('../color.js').Color} rgba1 The first output value.\n * @param {number} input2 The second input value.\n * @param {import('../color.js').Color} rgba2 The second output value.\n * @return {import('../color.js').Color} The interpolated color.\n */\nfunction interpolateColor(base, value, input1, rgba1, input2, rgba2) {\n  const delta = input2 - input1;\n  if (delta === 0) {\n    return rgba1;\n  }\n  const lcha1 = rgbaToLcha(rgba1);\n  const lcha2 = rgbaToLcha(rgba2);\n  let deltaHue = lcha2[2] - lcha1[2];\n  if (deltaHue > 180) {\n    deltaHue -= 360;\n  } else if (deltaHue < -180) {\n    deltaHue += 360;\n  }\n\n  const lcha = [\n    interpolateNumber(base, value, input1, lcha1[0], input2, lcha2[0]),\n    interpolateNumber(base, value, input1, lcha1[1], input2, lcha2[1]),\n    lcha1[2] + interpolateNumber(base, value, input1, 0, input2, deltaHue),\n    interpolateNumber(base, value, input1, rgba1[3], input2, rgba2[3]),\n  ];\n  return lchaToRgba(lcha);\n}\n", "/**\n * @module ol/style/Text\n */\nimport {toSize} from '../size.js';\nimport Fill from './Fill.js';\n\n/**\n * @typedef {'point' | 'line'} TextPlacement\n * Default text placement is `'point'`. Note that\n * `'line'` requires the underlying geometry to be a {@link module:ol/geom/LineString~LineString},\n * {@link module:ol/geom/Polygon~Polygon}, {@link module:ol/geom/MultiLineString~MultiLineString} or\n * {@link module:ol/geom/MultiPolygon~MultiPolygon}.\n */\n\n/**\n * @typedef {'left' | 'center' | 'right'} TextJustify\n */\n\n/**\n * The default fill color to use if no fill was set at construction time; a\n * blackish `#333`.\n *\n * @const {string}\n */\nconst DEFAULT_FILL_COLOR = '#333';\n\n/**\n * @typedef {Object} Options\n * @property {string} [font] Font style as CSS `font` value, see:\n * https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/font. Default is `'10px sans-serif'`\n * @property {number} [maxAngle=Math.PI/4] When `placement` is set to `'line'`, allow a maximum angle between adjacent characters.\n * The expected value is in radians, and the default is 45\u00B0 (`Math.PI / 4`).\n * @property {number} [offsetX=0] Horizontal text offset in pixels. A positive will shift the text right.\n * @property {number} [offsetY=0] Vertical text offset in pixels. A positive will shift the text down.\n * @property {boolean} [overflow=false] For polygon labels or when `placement` is set to `'line'`, allow text to exceed\n * the width of the polygon at the label position or the length of the path that it follows.\n * @property {TextPlacement} [placement='point'] Text placement.\n * @property {number} [repeat] Repeat interval. When set, the text will be repeated at this interval, which specifies\n * the distance between two text anchors in pixels. Only available when `placement` is set to `'line'`. Overrides 'textAlign'.\n * @property {number|import(\"../size.js\").Size} [scale] Scale.\n * @property {boolean} [rotateWithView=false] Whether to rotate the text with the view.\n * @property {boolean} [keepUpright=true] Whether the text can be rotated 180\u00B0 to prevent being rendered upside down.\n * @property {number} [rotation=0] Rotation in radians (positive rotation clockwise).\n * @property {string|Array<string>} [text] Text content or rich text content. For plain text provide a string, which can\n * contain line breaks (`\\n`). For rich text provide an array of text/font tuples. A tuple consists of the text to\n * render and the font to use (or `''` to use the text style's font). A line break has to be a separate tuple (i.e. `'\\n', ''`).\n * **Example:** `['foo', 'bold 10px sans-serif', ' bar', 'italic 10px sans-serif', ' baz', '']` will yield \"**foo** *bar* baz\".\n * **Note:** Rich text is not supported for `placement: 'line'` or the immediate rendering API.\n * @property {CanvasTextAlign} [textAlign] Text alignment. Possible values: `'left'`, `'right'`, `'center'`, `'end'` or `'start'`.\n * Default is `'center'` for `placement: 'point'`. For `placement: 'line'`, the default is to let the renderer choose a\n * placement where `maxAngle` is not exceeded.\n * @property {TextJustify} [justify] Text justification within the text box.\n * If not set, text is justified towards the `textAlign` anchor.\n * Otherwise, use options `'left'`, `'center'`, or `'right'` to justify the text within the text box.\n * **Note:** `justify` is ignored for immediate rendering and also for `placement: 'line'`.\n * @property {CanvasTextBaseline} [textBaseline='middle'] Text base line. Possible values: `'bottom'`, `'top'`, `'middle'`, `'alphabetic'`,\n * `'hanging'`, `'ideographic'`.\n * @property {import(\"./Fill.js\").default|null} [fill] Fill style. If none is provided, we'll use a dark fill-style (#333). Specify `null` for no fill.\n * @property {import(\"./Stroke.js\").default} [stroke] Stroke style.\n * @property {import(\"./Fill.js\").default} [backgroundFill] Fill style for the text background when `placement` is\n * `'point'`. Default is no fill.\n * @property {import(\"./Stroke.js\").default} [backgroundStroke] Stroke style for the text background  when `placement`\n * is `'point'`. Default is no stroke.\n * @property {Array<number>} [padding=[0, 0, 0, 0]] Padding in pixels around the text for decluttering and background. The order of\n * values in the array is `[top, right, bottom, left]`.\n * @property {import('../style/Style.js').DeclutterMode} [declutterMode] Declutter mode: `declutter`, `obstacle`, `none`\n */\n\n/**\n * @classdesc\n * Set text style for vector features.\n * @api\n */\nclass Text {\n  /**\n   * @param {Options} [options] Options.\n   */\n  constructor(options) {\n    options = options || {};\n\n    /**\n     * @private\n     * @type {string|undefined}\n     */\n    this.font_ = options.font;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.rotation_ = options.rotation;\n\n    /**\n     * @private\n     * @type {boolean|undefined}\n     */\n    this.rotateWithView_ = options.rotateWithView;\n\n    /**\n     * @private\n     * @type {boolean|undefined}\n     */\n    this.keepUpright_ = options.keepUpright;\n\n    /**\n     * @private\n     * @type {number|import(\"../size.js\").Size|undefined}\n     */\n    this.scale_ = options.scale;\n\n    /**\n     * @private\n     * @type {import(\"../size.js\").Size}\n     */\n    this.scaleArray_ = toSize(options.scale !== undefined ? options.scale : 1);\n\n    /**\n     * @private\n     * @type {string|Array<string>|undefined}\n     */\n    this.text_ = options.text;\n\n    /**\n     * @private\n     * @type {CanvasTextAlign|undefined}\n     */\n    this.textAlign_ = options.textAlign;\n\n    /**\n     * @private\n     * @type {TextJustify|undefined}\n     */\n    this.justify_ = options.justify;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.repeat_ = options.repeat;\n\n    /**\n     * @private\n     * @type {CanvasTextBaseline|undefined}\n     */\n    this.textBaseline_ = options.textBaseline;\n\n    /**\n     * @private\n     * @type {import(\"./Fill.js\").default|null}\n     */\n    this.fill_ =\n      options.fill !== undefined\n        ? options.fill\n        : new Fill({color: DEFAULT_FILL_COLOR});\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.maxAngle_ =\n      options.maxAngle !== undefined ? options.maxAngle : Math.PI / 4;\n\n    /**\n     * @private\n     * @type {TextPlacement}\n     */\n    this.placement_ =\n      options.placement !== undefined ? options.placement : 'point';\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.overflow_ = !!options.overflow;\n\n    /**\n     * @private\n     * @type {import(\"./Stroke.js\").default|null}\n     */\n    this.stroke_ = options.stroke !== undefined ? options.stroke : null;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.offsetX_ = options.offsetX !== undefined ? options.offsetX : 0;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.offsetY_ = options.offsetY !== undefined ? options.offsetY : 0;\n\n    /**\n     * @private\n     * @type {import(\"./Fill.js\").default|null}\n     */\n    this.backgroundFill_ = options.backgroundFill\n      ? options.backgroundFill\n      : null;\n\n    /**\n     * @private\n     * @type {import(\"./Stroke.js\").default|null}\n     */\n    this.backgroundStroke_ = options.backgroundStroke\n      ? options.backgroundStroke\n      : null;\n\n    /**\n     * @private\n     * @type {Array<number>|null}\n     */\n    this.padding_ = options.padding === undefined ? null : options.padding;\n\n    /**\n     * @private\n     * @type {import('../style/Style.js').DeclutterMode}\n     */\n    this.declutterMode_ = options.declutterMode;\n  }\n\n  /**\n   * Clones the style.\n   * @return {Text} The cloned style.\n   * @api\n   */\n  clone() {\n    const scale = this.getScale();\n    return new Text({\n      font: this.getFont(),\n      placement: this.getPlacement(),\n      repeat: this.getRepeat(),\n      maxAngle: this.getMaxAngle(),\n      overflow: this.getOverflow(),\n      rotation: this.getRotation(),\n      rotateWithView: this.getRotateWithView(),\n      keepUpright: this.getKeepUpright(),\n      scale: Array.isArray(scale) ? scale.slice() : scale,\n      text: this.getText(),\n      textAlign: this.getTextAlign(),\n      justify: this.getJustify(),\n      textBaseline: this.getTextBaseline(),\n      fill:\n        this.getFill() instanceof Fill\n          ? this.getFill().clone()\n          : this.getFill(),\n      stroke: this.getStroke() ? this.getStroke().clone() : undefined,\n      offsetX: this.getOffsetX(),\n      offsetY: this.getOffsetY(),\n      backgroundFill: this.getBackgroundFill()\n        ? this.getBackgroundFill().clone()\n        : undefined,\n      backgroundStroke: this.getBackgroundStroke()\n        ? this.getBackgroundStroke().clone()\n        : undefined,\n      padding: this.getPadding() || undefined,\n      declutterMode: this.getDeclutterMode(),\n    });\n  }\n\n  /**\n   * Get the `overflow` configuration.\n   * @return {boolean} Let text overflow the length of the path they follow.\n   * @api\n   */\n  getOverflow() {\n    return this.overflow_;\n  }\n\n  /**\n   * Get the font name.\n   * @return {string|undefined} Font.\n   * @api\n   */\n  getFont() {\n    return this.font_;\n  }\n\n  /**\n   * Get the maximum angle between adjacent characters.\n   * @return {number} Angle in radians.\n   * @api\n   */\n  getMaxAngle() {\n    return this.maxAngle_;\n  }\n\n  /**\n   * Get the label placement.\n   * @return {TextPlacement} Text placement.\n   * @api\n   */\n  getPlacement() {\n    return this.placement_;\n  }\n\n  /**\n   * Get the repeat interval of the text.\n   * @return {number|undefined} Repeat interval in pixels.\n   * @api\n   */\n  getRepeat() {\n    return this.repeat_;\n  }\n\n  /**\n   * Get the x-offset for the text.\n   * @return {number} Horizontal text offset.\n   * @api\n   */\n  getOffsetX() {\n    return this.offsetX_;\n  }\n\n  /**\n   * Get the y-offset for the text.\n   * @return {number} Vertical text offset.\n   * @api\n   */\n  getOffsetY() {\n    return this.offsetY_;\n  }\n\n  /**\n   * Get the fill style for the text.\n   * @return {import(\"./Fill.js\").default|null} Fill style.\n   * @api\n   */\n  getFill() {\n    return this.fill_;\n  }\n\n  /**\n   * Determine whether the text rotates with the map.\n   * @return {boolean|undefined} Rotate with map.\n   * @api\n   */\n  getRotateWithView() {\n    return this.rotateWithView_;\n  }\n\n  /**\n   * Determine whether the text can be rendered upside down.\n   * @return {boolean|undefined} Keep text upright.\n   * @api\n   */\n  getKeepUpright() {\n    return this.keepUpright_;\n  }\n\n  /**\n   * Get the text rotation.\n   * @return {number|undefined} Rotation.\n   * @api\n   */\n  getRotation() {\n    return this.rotation_;\n  }\n\n  /**\n   * Get the text scale.\n   * @return {number|import(\"../size.js\").Size|undefined} Scale.\n   * @api\n   */\n  getScale() {\n    return this.scale_;\n  }\n\n  /**\n   * Get the symbolizer scale array.\n   * @return {import(\"../size.js\").Size} Scale array.\n   */\n  getScaleArray() {\n    return this.scaleArray_;\n  }\n\n  /**\n   * Get the stroke style for the text.\n   * @return {import(\"./Stroke.js\").default|null} Stroke style.\n   * @api\n   */\n  getStroke() {\n    return this.stroke_;\n  }\n\n  /**\n   * Get the text to be rendered.\n   * @return {string|Array<string>|undefined} Text.\n   * @api\n   */\n  getText() {\n    return this.text_;\n  }\n\n  /**\n   * Get the text alignment.\n   * @return {CanvasTextAlign|undefined} Text align.\n   * @api\n   */\n  getTextAlign() {\n    return this.textAlign_;\n  }\n\n  /**\n   * Get the justification.\n   * @return {TextJustify|undefined} Justification.\n   * @api\n   */\n  getJustify() {\n    return this.justify_;\n  }\n\n  /**\n   * Get the text baseline.\n   * @return {CanvasTextBaseline|undefined} Text baseline.\n   * @api\n   */\n  getTextBaseline() {\n    return this.textBaseline_;\n  }\n\n  /**\n   * Get the background fill style for the text.\n   * @return {import(\"./Fill.js\").default|null} Fill style.\n   * @api\n   */\n  getBackgroundFill() {\n    return this.backgroundFill_;\n  }\n\n  /**\n   * Get the background stroke style for the text.\n   * @return {import(\"./Stroke.js\").default|null} Stroke style.\n   * @api\n   */\n  getBackgroundStroke() {\n    return this.backgroundStroke_;\n  }\n\n  /**\n   * Get the padding for the text.\n   * @return {Array<number>|null} Padding.\n   * @api\n   */\n  getPadding() {\n    return this.padding_;\n  }\n\n  /**\n   * Get the declutter mode of the shape\n   * @return {import(\"./Style.js\").DeclutterMode} Shape's declutter mode\n   * @api\n   */\n  getDeclutterMode() {\n    return this.declutterMode_;\n  }\n\n  /**\n   * Set the `overflow` property.\n   *\n   * @param {boolean} overflow Let text overflow the path that it follows.\n   * @api\n   */\n  setOverflow(overflow) {\n    this.overflow_ = overflow;\n  }\n\n  /**\n   * Set the font.\n   *\n   * @param {string|undefined} font Font.\n   * @api\n   */\n  setFont(font) {\n    this.font_ = font;\n  }\n\n  /**\n   * Set the maximum angle between adjacent characters.\n   *\n   * @param {number} maxAngle Angle in radians.\n   * @api\n   */\n  setMaxAngle(maxAngle) {\n    this.maxAngle_ = maxAngle;\n  }\n\n  /**\n   * Set the x offset.\n   *\n   * @param {number} offsetX Horizontal text offset.\n   * @api\n   */\n  setOffsetX(offsetX) {\n    this.offsetX_ = offsetX;\n  }\n\n  /**\n   * Set the y offset.\n   *\n   * @param {number} offsetY Vertical text offset.\n   * @api\n   */\n  setOffsetY(offsetY) {\n    this.offsetY_ = offsetY;\n  }\n\n  /**\n   * Set the text placement.\n   *\n   * @param {TextPlacement} placement Placement.\n   * @api\n   */\n  setPlacement(placement) {\n    this.placement_ = placement;\n  }\n\n  /**\n   * Set the repeat interval of the text.\n   * @param {number|undefined} [repeat] Repeat interval in pixels.\n   * @api\n   */\n  setRepeat(repeat) {\n    this.repeat_ = repeat;\n  }\n\n  /**\n   * Set whether to rotate the text with the view.\n   *\n   * @param {boolean} rotateWithView Rotate with map.\n   * @api\n   */\n  setRotateWithView(rotateWithView) {\n    this.rotateWithView_ = rotateWithView;\n  }\n\n  /**\n   * Set whether the text can be rendered upside down.\n   *\n   * @param {boolean} keepUpright Keep text upright.\n   * @api\n   */\n  setKeepUpright(keepUpright) {\n    this.keepUpright_ = keepUpright;\n  }\n\n  /**\n   * Set the fill.\n   *\n   * @param {import(\"./Fill.js\").default|null} fill Fill style.\n   * @api\n   */\n  setFill(fill) {\n    this.fill_ = fill;\n  }\n\n  /**\n   * Set the rotation.\n   *\n   * @param {number|undefined} rotation Rotation.\n   * @api\n   */\n  setRotation(rotation) {\n    this.rotation_ = rotation;\n  }\n\n  /**\n   * Set the scale.\n   *\n   * @param {number|import(\"../size.js\").Size|undefined} scale Scale.\n   * @api\n   */\n  setScale(scale) {\n    this.scale_ = scale;\n    this.scaleArray_ = toSize(scale !== undefined ? scale : 1);\n  }\n\n  /**\n   * Set the stroke.\n   *\n   * @param {import(\"./Stroke.js\").default|null} stroke Stroke style.\n   * @api\n   */\n  setStroke(stroke) {\n    this.stroke_ = stroke;\n  }\n\n  /**\n   * Set the text.\n   *\n   * @param {string|Array<string>|undefined} text Text.\n   * @api\n   */\n  setText(text) {\n    this.text_ = text;\n  }\n\n  /**\n   * Set the text alignment.\n   *\n   * @param {CanvasTextAlign|undefined} textAlign Text align.\n   * @api\n   */\n  setTextAlign(textAlign) {\n    this.textAlign_ = textAlign;\n  }\n\n  /**\n   * Set the justification.\n   *\n   * @param {TextJustify|undefined} justify Justification.\n   * @api\n   */\n  setJustify(justify) {\n    this.justify_ = justify;\n  }\n\n  /**\n   * Set the text baseline.\n   *\n   * @param {CanvasTextBaseline|undefined} textBaseline Text baseline.\n   * @api\n   */\n  setTextBaseline(textBaseline) {\n    this.textBaseline_ = textBaseline;\n  }\n\n  /**\n   * Set the background fill.\n   *\n   * @param {import(\"./Fill.js\").default|null} fill Fill style.\n   * @api\n   */\n  setBackgroundFill(fill) {\n    this.backgroundFill_ = fill;\n  }\n\n  /**\n   * Set the background stroke.\n   *\n   * @param {import(\"./Stroke.js\").default|null} stroke Stroke style.\n   * @api\n   */\n  setBackgroundStroke(stroke) {\n    this.backgroundStroke_ = stroke;\n  }\n\n  /**\n   * Set the padding (`[top, right, bottom, left]`).\n   *\n   * @param {Array<number>|null} padding Padding.\n   * @api\n   */\n  setPadding(padding) {\n    this.padding_ = padding;\n  }\n}\n\nexport default Text;\n", "/**\n * @module ol/render/canvas/style\n */\n\nimport {NO_COLOR} from '../../color.js';\nimport {buildExpression, newEvaluationContext} from '../../expr/cpu.js';\nimport {\n  BooleanType,\n  ColorType,\n  computeGeometryType,\n  newParsingContext,\n  NumberArrayType,\n  NumberType,\n  StringType,\n} from '../../expr/expression.js';\nimport {isEmpty} from '../../obj.js';\nimport {toSize} from '../../size.js';\nimport Circle from '../../style/Circle.js';\nimport Fill from '../../style/Fill.js';\nimport Icon from '../../style/Icon.js';\nimport RegularShape from '../../style/RegularShape.js';\nimport Stroke from '../../style/Stroke.js';\nimport Style from '../../style/Style.js';\nimport Text from '../../style/Text.js';\n\n/**\n * @fileoverview This module includes functions to build styles for the canvas renderer.  Building\n * is composed of two steps: parsing and compiling.  The parsing step takes an encoded expression\n * and returns an instance of one of the expression classes.  The compiling step takes the\n * expression instance and returns a function that can be evaluated to return a literal value.  The\n * evaluator function should do as little allocation and work as possible.\n */\n\n/**\n * @typedef {import(\"../../style/flat.js\").FlatStyle} FlatStyle\n */\n\n/**\n * @typedef {import(\"../../expr/expression.js\").EncodedExpression} EncodedExpression\n */\n\n/**\n * @typedef {import(\"../../expr/expression.js\").ParsingContext} ParsingContext\n */\n\n/**\n * @typedef {import(\"../../expr/expression.js\").CallExpression} CallExpression\n */\n\n/**\n * @typedef {import(\"../../expr/cpu.js\").EvaluationContext} EvaluationContext\n */\n\n/**\n * @typedef {import(\"../../expr/cpu.js\").ExpressionEvaluator} ExpressionEvaluator\n */\n\n/**\n * @param {EvaluationContext} context The evaluation context.\n * @return {boolean} Always true.\n */\nfunction always(context) {\n  return true;\n}\n\n/**\n * This function adapts a rule evaluator to the existing style function interface.\n * After we have deprecated the style function, we can use the compiled rules directly\n * and pass a more complete evaluation context (variables, zoom, time, etc.).\n *\n * @param {Array<import('../../style/flat.js').Rule>} rules The rules.\n * @param {ParsingContext} [parsingContext] Optional parsing context; will create a new one if not provided\n * @return {import('../../style/Style.js').StyleFunction} A style function.\n */\nexport function rulesToStyleFunction(rules, parsingContext) {\n  parsingContext = parsingContext ?? newParsingContext();\n  const evaluator = buildRuleSet(rules, parsingContext);\n  const evaluationContext = newEvaluationContext();\n  return function (feature, resolution) {\n    evaluationContext.properties = feature.getPropertiesInternal();\n    evaluationContext.resolution = resolution;\n    if (parsingContext.featureId) {\n      const id = feature.getId();\n      if (id !== undefined) {\n        evaluationContext.featureId = id;\n      } else {\n        evaluationContext.featureId = null;\n      }\n    }\n    if (parsingContext.geometryType) {\n      evaluationContext.geometryType = computeGeometryType(\n        feature.getGeometry(),\n      );\n    }\n    return evaluator(evaluationContext);\n  };\n}\n\n/**\n * This function adapts a style evaluator to the existing style function interface.\n * After we have deprecated the style function, we can use the compiled rules directly\n * and pass a more complete evaluation context (variables, zoom, time, etc.).\n *\n * @param {Array<import('../../style/flat.js').FlatStyle>} flatStyles The flat styles.\n * @param {ParsingContext} [parsingContext] Optional parsing context; will create a new one if not provided\n * @return {import('../../style/Style.js').StyleFunction} A style function.\n */\nexport function flatStylesToStyleFunction(flatStyles, parsingContext) {\n  parsingContext = parsingContext ?? newParsingContext();\n  const length = flatStyles.length;\n\n  /**\n   * @type {Array<StyleEvaluator>}\n   */\n  const evaluators = new Array(length);\n  for (let i = 0; i < length; ++i) {\n    evaluators[i] = buildStyle(flatStyles[i], parsingContext);\n  }\n  const evaluationContext = newEvaluationContext();\n\n  /**\n   * @type {Array<Style>}\n   */\n  const styles = new Array(length);\n\n  return function (feature, resolution) {\n    evaluationContext.properties = feature.getPropertiesInternal();\n    evaluationContext.resolution = resolution;\n    if (parsingContext.featureId) {\n      const id = feature.getId();\n      if (id !== undefined) {\n        evaluationContext.featureId = id;\n      } else {\n        evaluationContext.featureId = null;\n      }\n    }\n    if (parsingContext.geometryType) {\n      evaluationContext.geometryType = computeGeometryType(\n        feature.getGeometry(),\n      );\n    }\n    let nonNullCount = 0;\n    for (let i = 0; i < length; ++i) {\n      const style = evaluators[i](evaluationContext);\n      if (style) {\n        styles[nonNullCount] = style;\n        nonNullCount += 1;\n      }\n    }\n    styles.length = nonNullCount;\n    return styles;\n  };\n}\n\n/**\n * This function handles any kind of style that matches the FlatStyleLike type.\n *\n * @param {import('../../style/flat.js').FlatStyleLike} flatStyleLike The flat style.\n * @param {ParsingContext} [parsingContext] Optional parsing context; will create a new one if not provided\n * @return {import('../../style/Style.js').StyleFunction} A style function.\n */\nexport function flatStyleLikeToStyleFunction(flatStyleLike, parsingContext) {\n  parsingContext = parsingContext ?? newParsingContext();\n\n  // single FlatStyle\n  if (!Array.isArray(flatStyleLike)) {\n    return flatStylesToStyleFunction([flatStyleLike], parsingContext);\n  }\n\n  const length = flatStyleLike.length;\n  const first = flatStyleLike[0];\n\n  // array of Rule\n  if ('style' in first) {\n    /**\n     * @type {Array<import(\"../../style/flat.js\").Rule>}\n     */\n    const rules = new Array(length);\n    for (let i = 0; i < length; ++i) {\n      const candidate = flatStyleLike[i];\n      if (!('style' in candidate)) {\n        throw new Error('Expected a list of rules with a style property');\n      }\n      rules[i] = candidate;\n    }\n    return rulesToStyleFunction(rules, parsingContext);\n  }\n\n  // array of FlatStyle\n  const flatStyles =\n    /** @type {Array<import(\"../../style/flat.js\").FlatStyle>} */ (\n      flatStyleLike\n    );\n  return flatStylesToStyleFunction(flatStyles, parsingContext);\n}\n\n/**\n * @typedef {function(EvaluationContext):Array<Style>} RuleSetEvaluator\n */\n\n/**\n * @typedef {Object} CompiledRule\n * @property {ExpressionEvaluator} filter The compiled filter evaluator.\n * @property {Array<StyleEvaluator>} styles The list of compiled style evaluators.\n */\n\n/**\n * @param {Array<import('../../style/flat.js').Rule>} rules The rules.\n * @param {ParsingContext} context The parsing context.\n * @return {RuleSetEvaluator} The evaluator function.\n */\nexport function buildRuleSet(rules, context) {\n  const length = rules.length;\n\n  /**\n   * @type {Array<CompiledRule>}\n   */\n  const compiledRules = new Array(length);\n\n  for (let i = 0; i < length; ++i) {\n    const rule = rules[i];\n    const filter =\n      'filter' in rule\n        ? buildExpression(rule.filter, BooleanType, context)\n        : always;\n\n    /**\n     * @type {Array<StyleEvaluator>}\n     */\n    let styles;\n    if (Array.isArray(rule.style)) {\n      const styleLength = rule.style.length;\n      styles = new Array(styleLength);\n      for (let j = 0; j < styleLength; ++j) {\n        styles[j] = buildStyle(rule.style[j], context);\n      }\n    } else {\n      styles = [buildStyle(rule.style, context)];\n    }\n\n    compiledRules[i] = {filter, styles};\n  }\n\n  return function (context) {\n    /**\n     * @type {Array<Style>}\n     */\n    const styles = [];\n\n    let someMatched = false;\n    for (let i = 0; i < length; ++i) {\n      const filterEvaluator = compiledRules[i].filter;\n      if (!filterEvaluator(context)) {\n        continue;\n      }\n      if (rules[i].else && someMatched) {\n        continue;\n      }\n      someMatched = true;\n      for (const styleEvaluator of compiledRules[i].styles) {\n        const style = styleEvaluator(context);\n        if (!style) {\n          continue;\n        }\n        styles.push(style);\n      }\n    }\n\n    return styles;\n  };\n}\n\n/**\n * @typedef {function(EvaluationContext):Style|null} StyleEvaluator\n */\n\n/**\n * @param {FlatStyle} flatStyle A flat style literal.\n * @param {ParsingContext} context The parsing context.\n * @return {StyleEvaluator} A function that evaluates to a style.  The style returned by\n * this function will be reused between invocations.\n */\nexport function buildStyle(flatStyle, context) {\n  const evaluateFill = buildFill(flatStyle, '', context);\n  const evaluateStroke = buildStroke(flatStyle, '', context);\n  const evaluateText = buildText(flatStyle, context);\n  const evaluateImage = buildImage(flatStyle, context);\n  const evaluateZIndex = numberEvaluator(flatStyle, 'z-index', context);\n\n  if (\n    !evaluateFill &&\n    !evaluateStroke &&\n    !evaluateText &&\n    !evaluateImage &&\n    !isEmpty(flatStyle)\n  ) {\n    // assume this is a user error\n    // would be nice to check the properties and suggest \"did you mean...\"\n    throw new Error(\n      'No fill, stroke, point, or text symbolizer properties in style: ' +\n        JSON.stringify(flatStyle),\n    );\n  }\n\n  const style = new Style();\n  return function (context) {\n    let empty = true;\n    if (evaluateFill) {\n      const fill = evaluateFill(context);\n      if (fill) {\n        empty = false;\n      }\n      style.setFill(fill);\n    }\n    if (evaluateStroke) {\n      const stroke = evaluateStroke(context);\n      if (stroke) {\n        empty = false;\n      }\n      style.setStroke(stroke);\n    }\n    if (evaluateText) {\n      const text = evaluateText(context);\n      if (text) {\n        empty = false;\n      }\n      style.setText(text);\n    }\n    if (evaluateImage) {\n      const image = evaluateImage(context);\n      if (image) {\n        empty = false;\n      }\n      style.setImage(image);\n    }\n    if (evaluateZIndex) {\n      style.setZIndex(evaluateZIndex(context));\n    }\n    if (empty) {\n      return null;\n    }\n    return style;\n  };\n}\n\n/**\n * @typedef {function(EvaluationContext):Fill|null} FillEvaluator\n */\n\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {string} prefix The property prefix.\n * @param {ParsingContext} context The parsing context.\n * @return {FillEvaluator?} A function that evaluates to a fill.\n */\nfunction buildFill(flatStyle, prefix, context) {\n  let evaluateColor;\n  if (prefix + 'fill-pattern-src' in flatStyle) {\n    evaluateColor = patternEvaluator(flatStyle, prefix + 'fill-', context);\n  } else {\n    if (flatStyle[prefix + 'fill-color'] === 'none') {\n      // avoids hit detection\n      return (context) => null;\n    }\n\n    evaluateColor = colorLikeEvaluator(\n      flatStyle,\n      prefix + 'fill-color',\n      context,\n    );\n  }\n  if (!evaluateColor) {\n    return null;\n  }\n\n  const fill = new Fill();\n  return function (context) {\n    const color = evaluateColor(context);\n    if (color === NO_COLOR) {\n      return null;\n    }\n    fill.setColor(color);\n    return fill;\n  };\n}\n\n/**\n * @typedef {function(EvaluationContext):Stroke|null} StrokeEvaluator\n */\n\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {string} prefix The property prefix.\n * @param {ParsingContext} context The parsing context.\n * @return {StrokeEvaluator?} A function the evaluates to a stroke.\n */\nfunction buildStroke(flatStyle, prefix, context) {\n  const evaluateWidth = numberEvaluator(\n    flatStyle,\n    prefix + 'stroke-width',\n    context,\n  );\n\n  const evaluateColor = colorLikeEvaluator(\n    flatStyle,\n    prefix + 'stroke-color',\n    context,\n  );\n\n  if (!evaluateWidth && !evaluateColor) {\n    return null;\n  }\n\n  const evaluateLineCap = stringEvaluator(\n    flatStyle,\n    prefix + 'stroke-line-cap',\n    context,\n  );\n\n  const evaluateLineJoin = stringEvaluator(\n    flatStyle,\n    prefix + 'stroke-line-join',\n    context,\n  );\n\n  const evaluateLineDash = numberArrayEvaluator(\n    flatStyle,\n    prefix + 'stroke-line-dash',\n    context,\n  );\n\n  const evaluateLineDashOffset = numberEvaluator(\n    flatStyle,\n    prefix + 'stroke-line-dash-offset',\n    context,\n  );\n\n  const evaluateMiterLimit = numberEvaluator(\n    flatStyle,\n    prefix + 'stroke-miter-limit',\n    context,\n  );\n\n  const evaluateOffset = numberEvaluator(\n    flatStyle,\n    prefix + 'stroke-offset',\n    context,\n  );\n\n  const stroke = new Stroke();\n  return function (context) {\n    if (evaluateColor) {\n      const color = evaluateColor(context);\n      if (color === NO_COLOR) {\n        return null;\n      }\n      stroke.setColor(color);\n    }\n\n    if (evaluateWidth) {\n      stroke.setWidth(evaluateWidth(context));\n    }\n\n    if (evaluateLineCap) {\n      const lineCap = evaluateLineCap(context);\n      if (lineCap !== 'butt' && lineCap !== 'round' && lineCap !== 'square') {\n        throw new Error('Expected butt, round, or square line cap');\n      }\n      stroke.setLineCap(lineCap);\n    }\n\n    if (evaluateLineJoin) {\n      const lineJoin = evaluateLineJoin(context);\n      if (\n        lineJoin !== 'bevel' &&\n        lineJoin !== 'round' &&\n        lineJoin !== 'miter'\n      ) {\n        throw new Error('Expected bevel, round, or miter line join');\n      }\n      stroke.setLineJoin(lineJoin);\n    }\n\n    if (evaluateLineDash) {\n      stroke.setLineDash(evaluateLineDash(context));\n    }\n\n    if (evaluateLineDashOffset) {\n      stroke.setLineDashOffset(evaluateLineDashOffset(context));\n    }\n\n    if (evaluateMiterLimit) {\n      stroke.setMiterLimit(evaluateMiterLimit(context));\n    }\n\n    if (evaluateOffset) {\n      stroke.setOffset(evaluateOffset(context));\n    }\n\n    return stroke;\n  };\n}\n\n/**\n * @typedef {function(EvaluationContext):Text} TextEvaluator\n */\n\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {ParsingContext} context The parsing context.\n * @return {TextEvaluator?} A function that evaluates to a text symbolizer.\n */\nfunction buildText(flatStyle, context) {\n  const prefix = 'text-';\n\n  // Currently, an Array<string> may be used for rich text support.  This doesn't\n  // work with our expression syntax where arrays of strings are interpreted as\n  // call expressions.  To support rich text, we could add a 'strings' operator\n  // where all the following arguments would be string values.\n  const evaluateValue = stringEvaluator(flatStyle, prefix + 'value', context);\n  if (!evaluateValue) {\n    return null;\n  }\n\n  const evaluateFill = buildFill(flatStyle, prefix, context);\n\n  const evaluateBackgroundFill = buildFill(\n    flatStyle,\n    prefix + 'background-',\n    context,\n  );\n\n  const evaluateStroke = buildStroke(flatStyle, prefix, context);\n\n  const evaluateBackgroundStroke = buildStroke(\n    flatStyle,\n    prefix + 'background-',\n    context,\n  );\n\n  const evaluateFont = stringEvaluator(flatStyle, prefix + 'font', context);\n\n  const evaluateMaxAngle = numberEvaluator(\n    flatStyle,\n    prefix + 'max-angle',\n    context,\n  );\n\n  const evaluateOffsetX = numberEvaluator(\n    flatStyle,\n    prefix + 'offset-x',\n    context,\n  );\n\n  const evaluateOffsetY = numberEvaluator(\n    flatStyle,\n    prefix + 'offset-y',\n    context,\n  );\n\n  const evaluateOverflow = booleanEvaluator(\n    flatStyle,\n    prefix + 'overflow',\n    context,\n  );\n\n  const evaluatePlacement = stringEvaluator(\n    flatStyle,\n    prefix + 'placement',\n    context,\n  );\n\n  const evaluateRepeat = numberEvaluator(flatStyle, prefix + 'repeat', context);\n\n  const evaluateScale = sizeLikeEvaluator(flatStyle, prefix + 'scale', context);\n\n  const evaluateRotateWithView = booleanEvaluator(\n    flatStyle,\n    prefix + 'rotate-with-view',\n    context,\n  );\n\n  const evaluateRotation = numberEvaluator(\n    flatStyle,\n    prefix + 'rotation',\n    context,\n  );\n\n  const evaluateAlign = stringEvaluator(flatStyle, prefix + 'align', context);\n\n  const evaluateJustify = stringEvaluator(\n    flatStyle,\n    prefix + 'justify',\n    context,\n  );\n\n  const evaluateBaseline = stringEvaluator(\n    flatStyle,\n    prefix + 'baseline',\n    context,\n  );\n\n  const evaluateKeepUpright = booleanEvaluator(\n    flatStyle,\n    prefix + 'keep-upright',\n    context,\n  );\n\n  const evaluatePadding = numberArrayEvaluator(\n    flatStyle,\n    prefix + 'padding',\n    context,\n  );\n\n  // The following properties are not currently settable\n  const declutterMode = optionalDeclutterMode(\n    flatStyle,\n    prefix + 'declutter-mode',\n  );\n\n  const text = new Text({declutterMode});\n\n  return function (context) {\n    text.setText(evaluateValue(context));\n\n    if (evaluateFill) {\n      text.setFill(evaluateFill(context));\n    }\n\n    if (evaluateBackgroundFill) {\n      text.setBackgroundFill(evaluateBackgroundFill(context));\n    }\n\n    if (evaluateStroke) {\n      text.setStroke(evaluateStroke(context));\n    }\n\n    if (evaluateBackgroundStroke) {\n      text.setBackgroundStroke(evaluateBackgroundStroke(context));\n    }\n\n    if (evaluateFont) {\n      text.setFont(evaluateFont(context));\n    }\n\n    if (evaluateMaxAngle) {\n      text.setMaxAngle(evaluateMaxAngle(context));\n    }\n\n    if (evaluateOffsetX) {\n      text.setOffsetX(evaluateOffsetX(context));\n    }\n\n    if (evaluateOffsetY) {\n      text.setOffsetY(evaluateOffsetY(context));\n    }\n\n    if (evaluateOverflow) {\n      text.setOverflow(evaluateOverflow(context));\n    }\n\n    if (evaluatePlacement) {\n      const placement = evaluatePlacement(context);\n      if (placement !== 'point' && placement !== 'line') {\n        throw new Error('Expected point or line for text-placement');\n      }\n      text.setPlacement(placement);\n    }\n\n    if (evaluateRepeat) {\n      text.setRepeat(evaluateRepeat(context));\n    }\n\n    if (evaluateScale) {\n      text.setScale(evaluateScale(context));\n    }\n\n    if (evaluateRotateWithView) {\n      text.setRotateWithView(evaluateRotateWithView(context));\n    }\n\n    if (evaluateRotation) {\n      text.setRotation(evaluateRotation(context));\n    }\n\n    if (evaluateAlign) {\n      const textAlign = evaluateAlign(context);\n      if (\n        textAlign !== 'left' &&\n        textAlign !== 'center' &&\n        textAlign !== 'right' &&\n        textAlign !== 'end' &&\n        textAlign !== 'start'\n      ) {\n        throw new Error(\n          'Expected left, right, center, start, or end for text-align',\n        );\n      }\n      text.setTextAlign(textAlign);\n    }\n\n    if (evaluateJustify) {\n      const justify = evaluateJustify(context);\n      if (justify !== 'left' && justify !== 'right' && justify !== 'center') {\n        throw new Error('Expected left, right, or center for text-justify');\n      }\n      text.setJustify(justify);\n    }\n\n    if (evaluateBaseline) {\n      const textBaseline = evaluateBaseline(context);\n      if (\n        textBaseline !== 'bottom' &&\n        textBaseline !== 'top' &&\n        textBaseline !== 'middle' &&\n        textBaseline !== 'alphabetic' &&\n        textBaseline !== 'hanging'\n      ) {\n        throw new Error(\n          'Expected bottom, top, middle, alphabetic, or hanging for text-baseline',\n        );\n      }\n      text.setTextBaseline(textBaseline);\n    }\n\n    if (evaluatePadding) {\n      text.setPadding(evaluatePadding(context));\n    }\n\n    if (evaluateKeepUpright) {\n      text.setKeepUpright(evaluateKeepUpright(context));\n    }\n\n    return text;\n  };\n}\n\n/**\n * @typedef {function(EvaluationContext):import(\"../../style/Image.js\").default} ImageEvaluator\n */\n\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {ParsingContext} context The parsing context.\n * @return {ImageEvaluator?} A function that evaluates to an image symbolizer.\n */\nfunction buildImage(flatStyle, context) {\n  if ('icon-src' in flatStyle) {\n    return buildIcon(flatStyle, context);\n  }\n\n  if ('shape-points' in flatStyle) {\n    return buildShape(flatStyle, context);\n  }\n\n  if ('circle-radius' in flatStyle) {\n    return buildCircle(flatStyle, context);\n  }\n\n  return null;\n}\n\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {ParsingContext} context The parsing context.\n * @return {ImageEvaluator} A function that evaluates to an image symbolizer.\n */\nfunction buildIcon(flatStyle, context) {\n  const prefix = 'icon-';\n\n  // required property\n  const srcName = prefix + 'src';\n  const src = requireString(flatStyle[srcName], srcName);\n\n  // settable properties\n  const evaluateAnchor = coordinateEvaluator(\n    flatStyle,\n    prefix + 'anchor',\n    context,\n  );\n\n  const evaluateScale = sizeLikeEvaluator(flatStyle, prefix + 'scale', context);\n\n  const evaluateOpacity = numberEvaluator(\n    flatStyle,\n    prefix + 'opacity',\n    context,\n  );\n\n  const evaluateDisplacement = coordinateEvaluator(\n    flatStyle,\n    prefix + 'displacement',\n    context,\n  );\n\n  const evaluateRotation = numberEvaluator(\n    flatStyle,\n    prefix + 'rotation',\n    context,\n  );\n\n  const evaluateRotateWithView = booleanEvaluator(\n    flatStyle,\n    prefix + 'rotate-with-view',\n    context,\n  );\n\n  // the remaining symbolizer properties are not currently settable\n  const anchorOrigin = optionalIconOrigin(flatStyle, prefix + 'anchor-origin');\n  const anchorXUnits = optionalIconAnchorUnits(\n    flatStyle,\n    prefix + 'anchor-x-units',\n  );\n  const anchorYUnits = optionalIconAnchorUnits(\n    flatStyle,\n    prefix + 'anchor-y-units',\n  );\n  const colorValue = getExpressionValue(flatStyle, prefix + 'color');\n  let color;\n  let evaluateColor = null;\n  if (colorValue !== undefined) {\n    const isColorExpression =\n      Array.isArray(colorValue) &&\n      colorValue.length > 0 &&\n      typeof colorValue[0] === 'string';\n    if (isColorExpression) {\n      evaluateColor = colorLikeEvaluator(flatStyle, prefix + 'color', context);\n    } else {\n      color = requireColorLike(colorValue, prefix + 'color');\n    }\n  }\n  const crossOrigin = optionalString(flatStyle, prefix + 'cross-origin');\n  const offset = optionalNumberArray(flatStyle, prefix + 'offset');\n  const offsetOrigin = optionalIconOrigin(flatStyle, prefix + 'offset-origin');\n  const width = optionalNumber(flatStyle, prefix + 'width');\n  const height = optionalNumber(flatStyle, prefix + 'height');\n  const size = optionalSize(flatStyle, prefix + 'size');\n  const declutterMode = optionalDeclutterMode(\n    flatStyle,\n    prefix + 'declutter-mode',\n  );\n\n  const iconOptions = {\n    src,\n    anchorOrigin,\n    anchorXUnits,\n    anchorYUnits,\n    crossOrigin,\n    offset,\n    offsetOrigin,\n    height,\n    width,\n    size,\n    declutterMode,\n  };\n\n  let icon = null;\n\n  return function (context) {\n    if (!icon) {\n      // lazily create the icon to allow for expression evaluation\n      const initialColor = evaluateColor ? evaluateColor(context) : color;\n      icon = new Icon(\n        initialColor !== undefined\n          ? Object.assign({}, iconOptions, {color: initialColor})\n          : Object.assign({}, iconOptions),\n      );\n    } else if (evaluateColor) {\n      icon.setColor(evaluateColor(context));\n    }\n    if (evaluateOpacity) {\n      icon.setOpacity(evaluateOpacity(context));\n    }\n\n    if (evaluateDisplacement) {\n      icon.setDisplacement(evaluateDisplacement(context));\n    }\n\n    if (evaluateRotation) {\n      icon.setRotation(evaluateRotation(context));\n    }\n\n    if (evaluateRotateWithView) {\n      icon.setRotateWithView(evaluateRotateWithView(context));\n    }\n\n    if (evaluateScale) {\n      icon.setScale(evaluateScale(context));\n    }\n\n    if (evaluateAnchor) {\n      icon.setAnchor(evaluateAnchor(context));\n    }\n    return icon;\n  };\n}\n\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {ParsingContext} context The parsing context.\n * @return {ImageEvaluator} A function that evaluates to an icon symbolizer.\n */\nfunction buildShape(flatStyle, context) {\n  const prefix = 'shape-';\n\n  // required property\n  const pointsName = prefix + 'points';\n  const radiusName = prefix + 'radius';\n  const points = requireNumber(flatStyle[pointsName], pointsName);\n  if (!(radiusName in flatStyle)) {\n    throw new Error(`Expected a number for ${radiusName}`);\n  }\n  const evaluateRadius = numberEvaluator(flatStyle, radiusName, context);\n  const initialRadius =\n    typeof flatStyle[radiusName] === 'number' ? flatStyle[radiusName] : 5;\n  const radius2Name = prefix + 'radius2';\n  const evaluateRadius2 = numberEvaluator(flatStyle, radius2Name, context);\n  const initialRadius2 =\n    typeof flatStyle[radius2Name] === 'number'\n      ? flatStyle[radius2Name]\n      : undefined;\n\n  // settable properties\n  const evaluateFill = buildFill(flatStyle, prefix, context);\n  const evaluateStroke = buildStroke(flatStyle, prefix, context);\n  const evaluateScale = sizeLikeEvaluator(flatStyle, prefix + 'scale', context);\n  const evaluateDisplacement = coordinateEvaluator(\n    flatStyle,\n    prefix + 'displacement',\n    context,\n  );\n  const evaluateRotation = numberEvaluator(\n    flatStyle,\n    prefix + 'rotation',\n    context,\n  );\n  const evaluateRotateWithView = booleanEvaluator(\n    flatStyle,\n    prefix + 'rotate-with-view',\n    context,\n  );\n\n  // the remaining properties are not currently settable\n  const angle = optionalNumber(flatStyle, prefix + 'angle');\n  const declutterMode = optionalDeclutterMode(\n    flatStyle,\n    prefix + 'declutter-mode',\n  );\n\n  const shape = new RegularShape({\n    points,\n    radius: initialRadius,\n    radius2: initialRadius2,\n    angle,\n    declutterMode,\n  });\n\n  return function (context) {\n    if (evaluateRadius) {\n      shape.setRadius(evaluateRadius(context));\n    }\n    if (evaluateRadius2) {\n      shape.setRadius2(evaluateRadius2(context));\n    }\n    if (evaluateFill) {\n      shape.setFill(evaluateFill(context));\n    }\n    if (evaluateStroke) {\n      shape.setStroke(evaluateStroke(context));\n    }\n    if (evaluateDisplacement) {\n      shape.setDisplacement(evaluateDisplacement(context));\n    }\n    if (evaluateRotation) {\n      shape.setRotation(evaluateRotation(context));\n    }\n    if (evaluateRotateWithView) {\n      shape.setRotateWithView(evaluateRotateWithView(context));\n    }\n    if (evaluateScale) {\n      shape.setScale(evaluateScale(context));\n    }\n\n    return shape;\n  };\n}\n\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {ParsingContext} context The parsing context.\n * @return {ImageEvaluator} A function that evaluates to a circle symbolizer.\n */\nfunction buildCircle(flatStyle, context) {\n  const prefix = 'circle-';\n\n  // settable properties\n  const evaluateFill = buildFill(flatStyle, prefix, context);\n  const evaluateStroke = buildStroke(flatStyle, prefix, context);\n  const evaluateRadius = numberEvaluator(flatStyle, prefix + 'radius', context);\n  const evaluateScale = sizeLikeEvaluator(flatStyle, prefix + 'scale', context);\n  const evaluateDisplacement = coordinateEvaluator(\n    flatStyle,\n    prefix + 'displacement',\n    context,\n  );\n  const evaluateRotation = numberEvaluator(\n    flatStyle,\n    prefix + 'rotation',\n    context,\n  );\n  const evaluateRotateWithView = booleanEvaluator(\n    flatStyle,\n    prefix + 'rotate-with-view',\n    context,\n  );\n\n  // the remaining properties are not currently settable\n  const declutterMode = optionalDeclutterMode(\n    flatStyle,\n    prefix + 'declutter-mode',\n  );\n\n  const circle = new Circle({\n    radius: 5, // this is arbitrary, but required - the evaluated radius is used below\n    declutterMode,\n  });\n\n  return function (context) {\n    if (evaluateRadius) {\n      circle.setRadius(evaluateRadius(context));\n    }\n    if (evaluateFill) {\n      circle.setFill(evaluateFill(context));\n    }\n    if (evaluateStroke) {\n      circle.setStroke(evaluateStroke(context));\n    }\n    if (evaluateDisplacement) {\n      circle.setDisplacement(evaluateDisplacement(context));\n    }\n    if (evaluateRotation) {\n      circle.setRotation(evaluateRotation(context));\n    }\n    if (evaluateRotateWithView) {\n      circle.setRotateWithView(evaluateRotateWithView(context));\n    }\n    if (evaluateScale) {\n      circle.setScale(evaluateScale(context));\n    }\n\n    return circle;\n  };\n}\n\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {string} name The property name.\n * @return {any|undefined} The encoded value, or undefined if not provided.\n */\nfunction getExpressionValue(flatStyle, name) {\n  if (!(name in flatStyle)) {\n    return undefined;\n  }\n  const value = flatStyle[name];\n  return value === undefined ? undefined : value;\n}\n\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {string} name The property name.\n * @param {ParsingContext} context The parsing context.\n * @return {import('../../expr/cpu.js').NumberEvaluator|undefined} The expression evaluator or undefined.\n */\nfunction numberEvaluator(flatStyle, name, context) {\n  const encoded = getExpressionValue(flatStyle, name);\n  if (encoded === undefined) {\n    return undefined;\n  }\n  const evaluator = buildExpression(encoded, NumberType, context);\n  return function (context) {\n    return requireNumber(evaluator(context), name);\n  };\n}\n\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {string} name The property name.\n * @param {ParsingContext} context The parsing context.\n * @return {import('../../expr/cpu.js').StringEvaluator?} The expression evaluator.\n */\nfunction stringEvaluator(flatStyle, name, context) {\n  const encoded = getExpressionValue(flatStyle, name);\n  if (encoded === undefined) {\n    return null;\n  }\n  const evaluator = buildExpression(encoded, StringType, context);\n  return function (context) {\n    return requireString(evaluator(context), name);\n  };\n}\n\nfunction patternEvaluator(flatStyle, prefix, context) {\n  const srcEvaluator = stringEvaluator(\n    flatStyle,\n    prefix + 'pattern-src',\n    context,\n  );\n  const offsetEvaluator = sizeEvaluator(\n    flatStyle,\n    prefix + 'pattern-offset',\n    context,\n  );\n  const patternSizeEvaluator = sizeEvaluator(\n    flatStyle,\n    prefix + 'pattern-size',\n    context,\n  );\n  const colorEvaluator = colorLikeEvaluator(\n    flatStyle,\n    prefix + 'color',\n    context,\n  );\n  return function (context) {\n    return {\n      src: srcEvaluator(context),\n      offset: offsetEvaluator && offsetEvaluator(context),\n      size: patternSizeEvaluator && patternSizeEvaluator(context),\n      color: colorEvaluator && colorEvaluator(context),\n    };\n  };\n}\n\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {string} name The property name.\n * @param {ParsingContext} context The parsing context.\n * @return {import('../../expr/cpu.js').BooleanEvaluator?} The expression evaluator.\n */\nfunction booleanEvaluator(flatStyle, name, context) {\n  const encoded = getExpressionValue(flatStyle, name);\n  if (encoded === undefined) {\n    return null;\n  }\n  const evaluator = buildExpression(encoded, BooleanType, context);\n  return function (context) {\n    const value = evaluator(context);\n    if (typeof value !== 'boolean') {\n      throw new Error(`Expected a boolean for ${name}`);\n    }\n    return value;\n  };\n}\n\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {string} name The property name.\n * @param {ParsingContext} context The parsing context.\n * @return {import('../../expr/cpu.js').ColorLikeEvaluator?} The expression evaluator.\n */\nfunction colorLikeEvaluator(flatStyle, name, context) {\n  const encoded = getExpressionValue(flatStyle, name);\n  if (encoded === undefined) {\n    return null;\n  }\n  const evaluator = buildExpression(encoded, ColorType, context);\n  return function (context) {\n    return requireColorLike(evaluator(context), name);\n  };\n}\n\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {string} name The property name.\n * @param {ParsingContext} context The parsing context.\n * @return {import('../../expr/cpu.js').NumberArrayEvaluator?} The expression evaluator.\n */\nfunction numberArrayEvaluator(flatStyle, name, context) {\n  const encoded = getExpressionValue(flatStyle, name);\n  if (encoded === undefined) {\n    return null;\n  }\n  if (\n    Array.isArray(encoded) &&\n    (encoded.length === 0 || typeof encoded[0] !== 'string')\n  ) {\n    /** @type {Array<import('../../expr/cpu.js').NumberEvaluator>} */\n    const evaluators = encoded.map((value, index) => {\n      if (typeof value === 'number') {\n        return () => value;\n      }\n      const evaluator = buildExpression(value, NumberType, context);\n      return function (context) {\n        return requireNumber(evaluator(context), `${name}[${index}]`);\n      };\n    });\n    return function (context) {\n      const array = new Array(evaluators.length);\n      for (let i = 0; i < evaluators.length; ++i) {\n        array[i] = evaluators[i](context);\n      }\n      return array;\n    };\n  }\n  const evaluator = buildExpression(encoded, NumberArrayType, context);\n  return function (context) {\n    return requireNumberArray(evaluator(context), name);\n  };\n}\n\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {string} name The property name.\n * @param {ParsingContext} context The parsing context.\n * @return {import('../../expr/cpu.js').CoordinateEvaluator?} The expression evaluator.\n */\nfunction coordinateEvaluator(flatStyle, name, context) {\n  const encoded = getExpressionValue(flatStyle, name);\n  if (encoded === undefined) {\n    return null;\n  }\n  const evaluator = buildExpression(encoded, NumberArrayType, context);\n  return function (context) {\n    const array = requireNumberArray(evaluator(context), name);\n    if (array.length !== 2) {\n      throw new Error(`Expected two numbers for ${name}`);\n    }\n    return array;\n  };\n}\n\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {string} name The property name.\n * @param {ParsingContext} context The parsing context.\n * @return {import('../../expr/cpu.js').SizeEvaluator?} The expression evaluator.\n */\nfunction sizeEvaluator(flatStyle, name, context) {\n  const encoded = getExpressionValue(flatStyle, name);\n  if (encoded === undefined) {\n    return null;\n  }\n  const evaluator = buildExpression(encoded, NumberArrayType, context);\n  return function (context) {\n    return requireSize(evaluator(context), name);\n  };\n}\n\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {string} name The property name.\n * @param {ParsingContext} context The parsing context.\n * @return {import('../../expr/cpu.js').SizeLikeEvaluator?} The expression evaluator.\n */\nfunction sizeLikeEvaluator(flatStyle, name, context) {\n  const encoded = getExpressionValue(flatStyle, name);\n  if (encoded === undefined) {\n    return null;\n  }\n  const evaluator = buildExpression(\n    encoded,\n    NumberArrayType | NumberType,\n    context,\n  );\n  return function (context) {\n    return requireSizeLike(evaluator(context), name);\n  };\n}\n\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {string} property The symbolizer property.\n * @return {number|undefined} A number or undefined.\n */\nfunction optionalNumber(flatStyle, property) {\n  const value = flatStyle[property];\n  if (value === undefined) {\n    return undefined;\n  }\n  if (typeof value !== 'number') {\n    throw new Error(`Expected a number for ${property}`);\n  }\n  return value;\n}\n\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {string} property The symbolizer property.\n * @return {import(\"../../size.js\").Size|undefined} A size or undefined.\n */\nfunction optionalSize(flatStyle, property) {\n  const encoded = flatStyle[property];\n  if (encoded === undefined) {\n    return undefined;\n  }\n  if (typeof encoded === 'number') {\n    return toSize(encoded);\n  }\n  if (!Array.isArray(encoded)) {\n    throw new Error(`Expected a number or size array for ${property}`);\n  }\n  if (\n    encoded.length !== 2 ||\n    typeof encoded[0] !== 'number' ||\n    typeof encoded[1] !== 'number'\n  ) {\n    throw new Error(`Expected a number or size array for ${property}`);\n  }\n  return encoded;\n}\n\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {string} property The symbolizer property.\n * @return {string|undefined} A string or undefined.\n */\nfunction optionalString(flatStyle, property) {\n  const encoded = flatStyle[property];\n  if (encoded === undefined) {\n    return undefined;\n  }\n  if (typeof encoded !== 'string') {\n    throw new Error(`Expected a string for ${property}`);\n  }\n  return encoded;\n}\n\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {string} property The symbolizer property.\n * @return {import(\"../../style/Icon.js\").IconOrigin|undefined} An icon origin or undefined.\n */\nfunction optionalIconOrigin(flatStyle, property) {\n  const encoded = flatStyle[property];\n  if (encoded === undefined) {\n    return undefined;\n  }\n  if (\n    encoded !== 'bottom-left' &&\n    encoded !== 'bottom-right' &&\n    encoded !== 'top-left' &&\n    encoded !== 'top-right'\n  ) {\n    throw new Error(\n      `Expected bottom-left, bottom-right, top-left, or top-right for ${property}`,\n    );\n  }\n  return encoded;\n}\n\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {string} property The symbolizer property.\n * @return {import(\"../../style/Icon.js\").IconAnchorUnits|undefined} Icon anchor units or undefined.\n */\nfunction optionalIconAnchorUnits(flatStyle, property) {\n  const encoded = flatStyle[property];\n  if (encoded === undefined) {\n    return undefined;\n  }\n  if (encoded !== 'pixels' && encoded !== 'fraction') {\n    throw new Error(`Expected pixels or fraction for ${property}`);\n  }\n  return encoded;\n}\n\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {string} property The symbolizer property.\n * @return {Array<number>|undefined} An array of numbers or undefined.\n */\nfunction optionalNumberArray(flatStyle, property) {\n  const encoded = flatStyle[property];\n  if (encoded === undefined) {\n    return undefined;\n  }\n  return requireNumberArray(encoded, property);\n}\n\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {string} property The symbolizer property.\n * @return {import('../../style/Style.js').DeclutterMode} Icon declutter mode.\n */\nfunction optionalDeclutterMode(flatStyle, property) {\n  const encoded = flatStyle[property];\n  if (encoded === undefined) {\n    return undefined;\n  }\n  if (typeof encoded !== 'string') {\n    throw new Error(`Expected a string for ${property}`);\n  }\n  if (encoded !== 'declutter' && encoded !== 'obstacle' && encoded !== 'none') {\n    throw new Error(`Expected declutter, obstacle, or none for ${property}`);\n  }\n  return encoded;\n}\n\n/**\n * @param {any} value The value.\n * @param {string} property The property.\n * @return {Array<number>} An array of numbers.\n */\nfunction requireNumberArray(value, property) {\n  if (!Array.isArray(value)) {\n    throw new Error(`Expected an array for ${property}`);\n  }\n  const length = value.length;\n  for (let i = 0; i < length; ++i) {\n    if (typeof value[i] !== 'number') {\n      throw new Error(`Expected an array of numbers for ${property}`);\n    }\n  }\n  return value;\n}\n\n/**\n * @param {any} value The value.\n * @param {string} property The property.\n * @return {string} A string.\n */\nfunction requireString(value, property) {\n  if (typeof value !== 'string') {\n    throw new Error(`Expected a string for ${property}`);\n  }\n  return value;\n}\n\n/**\n * @param {any} value The value.\n * @param {string} property The property.\n * @return {number} A number.\n */\nfunction requireNumber(value, property) {\n  if (typeof value !== 'number') {\n    throw new Error(`Expected a number for ${property}`);\n  }\n  return value;\n}\n\n/**\n * @param {any} value The value.\n * @param {string} property The property.\n * @return {Array<number>|string} A color.\n */\nfunction requireColorLike(value, property) {\n  if (typeof value === 'string') {\n    return value;\n  }\n  const array = requireNumberArray(value, property);\n  const length = array.length;\n  if (length < 3 || length > 4) {\n    throw new Error(`Expected a color with 3 or 4 values for ${property}`);\n  }\n  return array;\n}\n\n/**\n * @param {any} value The value.\n * @param {string} property The property.\n * @return {Array<number>} A number or an array of two numbers.\n */\nfunction requireSize(value, property) {\n  const size = requireNumberArray(value, property);\n  if (size.length !== 2) {\n    throw new Error(`Expected an array of two numbers for ${property}`);\n  }\n  return size;\n}\n\n/**\n * @param {any} value The value.\n * @param {string} property The property.\n * @return {number|Array<number>} A number or an array of two numbers.\n */\nfunction requireSizeLike(value, property) {\n  if (typeof value === 'number') {\n    return value;\n  }\n  return requireSize(value, property);\n}\n", "/**\n * @module ol/ViewProperty\n */\n\n/**\n * @enum {string}\n */\nexport default {\n  CENTER: 'center',\n  RESOLUTION: 'resolution',\n  ROTATION: 'rotation',\n};\n", "/**\n * @module ol/centerconstraint\n */\nimport {clamp} from './math.js';\n\n/**\n * @typedef {function((import(\"./coordinate.js\").Coordinate|undefined), number, import(\"./size.js\").Size, boolean=, Array<number>=): (import(\"./coordinate.js\").Coordinate|undefined)} Type\n */\n\n/**\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {boolean} onlyCenter If true, the constraint will only apply to the view center.\n * @param {boolean} smooth If true, the view will be able to go slightly out of the given extent\n * (only during interaction and animation).\n * @return {Type} The constraint.\n */\nexport function createExtent(extent, onlyCenter, smooth) {\n  return (\n    /**\n     * @param {import(\"./coordinate.js\").Coordinate|undefined} center Center.\n     * @param {number|undefined} resolution Resolution.\n     * @param {import(\"./size.js\").Size} size Viewport size; unused if `onlyCenter` was specified.\n     * @param {boolean} [isMoving] True if an interaction or animation is in progress.\n     * @param {Array<number>} [centerShift] Shift between map center and viewport center.\n     * @return {import(\"./coordinate.js\").Coordinate|undefined} Center.\n     */\n    function (center, resolution, size, isMoving, centerShift) {\n      if (!center) {\n        return undefined;\n      }\n      if (!resolution && !onlyCenter) {\n        return center;\n      }\n      const viewWidth = onlyCenter ? 0 : size[0] * resolution;\n      const viewHeight = onlyCenter ? 0 : size[1] * resolution;\n      const shiftX = centerShift ? centerShift[0] : 0;\n      const shiftY = centerShift ? centerShift[1] : 0;\n      let minX = extent[0] + viewWidth / 2 + shiftX;\n      let maxX = extent[2] - viewWidth / 2 + shiftX;\n      let minY = extent[1] + viewHeight / 2 + shiftY;\n      let maxY = extent[3] - viewHeight / 2 + shiftY;\n\n      // note: when zooming out of bounds, min and max values for x and y may\n      // end up inverted (min > max); this has to be accounted for\n      if (minX > maxX) {\n        minX = (maxX + minX) / 2;\n        maxX = minX;\n      }\n      if (minY > maxY) {\n        minY = (maxY + minY) / 2;\n        maxY = minY;\n      }\n\n      let x = clamp(center[0], minX, maxX);\n      let y = clamp(center[1], minY, maxY);\n\n      // during an interaction, allow some overscroll\n      if (isMoving && smooth && resolution) {\n        const ratio = 30 * resolution;\n        x +=\n          -ratio * Math.log(1 + Math.max(0, minX - center[0]) / ratio) +\n          ratio * Math.log(1 + Math.max(0, center[0] - maxX) / ratio);\n        y +=\n          -ratio * Math.log(1 + Math.max(0, minY - center[1]) / ratio) +\n          ratio * Math.log(1 + Math.max(0, center[1] - maxY) / ratio);\n      }\n\n      return [x, y];\n    }\n  );\n}\n\n/**\n * @param {import(\"./coordinate.js\").Coordinate} [center] Center.\n * @return {import(\"./coordinate.js\").Coordinate|undefined} Center.\n */\nexport function none(center) {\n  return center;\n}\n", "/**\n * @module ol/easing\n */\n\n/**\n * Start slow and speed up.\n * @param {number} t Input between 0 and 1.\n * @return {number} Output between 0 and 1.\n * @api\n */\nexport function easeIn(t) {\n  return Math.pow(t, 3);\n}\n\n/**\n * Start fast and slow down.\n * @param {number} t Input between 0 and 1.\n * @return {number} Output between 0 and 1.\n * @api\n */\nexport function easeOut(t) {\n  return 1 - easeIn(1 - t);\n}\n\n/**\n * Start slow, speed up, and then slow down again.\n * @param {number} t Input between 0 and 1.\n * @return {number} Output between 0 and 1.\n * @api\n */\nexport function inAndOut(t) {\n  return 3 * t * t - 2 * t * t * t;\n}\n\n/**\n * Maintain a constant speed over time.\n * @param {number} t Input between 0 and 1.\n * @return {number} Output between 0 and 1.\n * @api\n */\nexport function linear(t) {\n  return t;\n}\n\n/**\n * Start slow, speed up, and at the very end slow down again.  This has the\n * same general behavior as {@link module:ol/easing.inAndOut}, but the final\n * slowdown is delayed.\n * @param {number} t Input between 0 and 1.\n * @return {number} Output between 0 and 1.\n * @api\n */\nexport function upAndDown(t) {\n  if (t < 0.5) {\n    return inAndOut(2 * t);\n  }\n  return 1 - inAndOut(2 * (t - 0.5));\n}\n", "/**\n * @module ol/resolutionconstraint\n */\nimport {linearFindNearest} from './array.js';\nimport {getHeight, getWidth} from './extent.js';\nimport {clamp} from './math.js';\n\n/**\n * @typedef {function((number|undefined), number, import(\"./size.js\").Size, boolean=): (number|undefined)} Type\n */\n\n/**\n * Returns a modified resolution taking into account the viewport size and maximum\n * allowed extent.\n * @param {number} resolution Resolution\n * @param {import(\"./extent.js\").Extent} maxExtent Maximum allowed extent.\n * @param {import(\"./size.js\").Size} viewportSize Viewport size.\n * @param {boolean} showFullExtent Whether to show the full extent.\n * @return {number} Capped resolution.\n */\nfunction getViewportClampedResolution(\n  resolution,\n  maxExtent,\n  viewportSize,\n  showFullExtent,\n) {\n  const xResolution = getWidth(maxExtent) / viewportSize[0];\n  const yResolution = getHeight(maxExtent) / viewportSize[1];\n\n  if (showFullExtent) {\n    return Math.min(resolution, Math.max(xResolution, yResolution));\n  }\n  return Math.min(resolution, Math.min(xResolution, yResolution));\n}\n\n/**\n * Returns a modified resolution to be between maxResolution and minResolution while\n * still allowing the value to be slightly out of bounds.\n * Note: the computation is based on the logarithm function (ln):\n *  - at 1, ln(x) is 0\n *  - above 1, ln(x) keeps increasing but at a much slower pace than x\n * The final result is clamped to prevent getting too far away from bounds.\n * @param {number} resolution Resolution.\n * @param {number} maxResolution Max resolution.\n * @param {number} minResolution Min resolution.\n * @return {number} Smoothed resolution.\n */\nfunction getSmoothClampedResolution(resolution, maxResolution, minResolution) {\n  let result = Math.min(resolution, maxResolution);\n  const ratio = 50;\n\n  result *=\n    Math.log(1 + ratio * Math.max(0, resolution / maxResolution - 1)) / ratio +\n    1;\n  if (minResolution) {\n    result = Math.max(result, minResolution);\n    result /=\n      Math.log(1 + ratio * Math.max(0, minResolution / resolution - 1)) /\n        ratio +\n      1;\n  }\n  return clamp(result, minResolution / 2, maxResolution * 2);\n}\n\n/**\n * @param {Array<number>} resolutions Resolutions.\n * @param {boolean} [smooth] If true, the view will be able to slightly exceed resolution limits. Default: true.\n * @param {import(\"./extent.js\").Extent} [maxExtent] Maximum allowed extent.\n * @param {boolean} [showFullExtent] If true, allows us to show the full extent. Default: false.\n * @return {Type} Zoom function.\n */\nexport function createSnapToResolutions(\n  resolutions,\n  smooth,\n  maxExtent,\n  showFullExtent,\n) {\n  smooth = smooth !== undefined ? smooth : true;\n  return (\n    /**\n     * @param {number|undefined} resolution Resolution.\n     * @param {number} direction Direction.\n     * @param {import(\"./size.js\").Size} size Viewport size.\n     * @param {boolean} [isMoving] True if an interaction or animation is in progress.\n     * @return {number|undefined} Resolution.\n     */\n    function (resolution, direction, size, isMoving) {\n      if (resolution !== undefined) {\n        const maxResolution = resolutions[0];\n        const minResolution = resolutions[resolutions.length - 1];\n        const cappedMaxRes = maxExtent\n          ? getViewportClampedResolution(\n              maxResolution,\n              maxExtent,\n              size,\n              showFullExtent,\n            )\n          : maxResolution;\n\n        // during interacting or animating, allow intermediary values\n        if (isMoving) {\n          if (!smooth) {\n            return clamp(resolution, minResolution, cappedMaxRes);\n          }\n          return getSmoothClampedResolution(\n            resolution,\n            cappedMaxRes,\n            minResolution,\n          );\n        }\n\n        const capped = Math.min(cappedMaxRes, resolution);\n        const z = Math.floor(linearFindNearest(resolutions, capped, direction));\n        if (resolutions[z] > cappedMaxRes && z < resolutions.length - 1) {\n          return resolutions[z + 1];\n        }\n        return resolutions[z];\n      }\n      return undefined;\n    }\n  );\n}\n\n/**\n * @param {number} power Power.\n * @param {number} maxResolution Maximum resolution.\n * @param {number} [minResolution] Minimum resolution.\n * @param {boolean} [smooth] If true, the view will be able to slightly exceed resolution limits. Default: true.\n * @param {import(\"./extent.js\").Extent} [maxExtent] Maximum allowed extent.\n * @param {boolean} [showFullExtent] If true, allows us to show the full extent. Default: false.\n * @return {Type} Zoom function.\n */\nexport function createSnapToPower(\n  power,\n  maxResolution,\n  minResolution,\n  smooth,\n  maxExtent,\n  showFullExtent,\n) {\n  smooth = smooth !== undefined ? smooth : true;\n  minResolution = minResolution !== undefined ? minResolution : 0;\n\n  return (\n    /**\n     * @param {number|undefined} resolution Resolution.\n     * @param {number} direction Direction.\n     * @param {import(\"./size.js\").Size} size Viewport size.\n     * @param {boolean} [isMoving] True if an interaction or animation is in progress.\n     * @return {number|undefined} Resolution.\n     */\n    function (resolution, direction, size, isMoving) {\n      if (resolution !== undefined) {\n        const cappedMaxRes = maxExtent\n          ? getViewportClampedResolution(\n              maxResolution,\n              maxExtent,\n              size,\n              showFullExtent,\n            )\n          : maxResolution;\n\n        // during interacting or animating, allow intermediary values\n        if (isMoving) {\n          if (!smooth) {\n            return clamp(resolution, minResolution, cappedMaxRes);\n          }\n          return getSmoothClampedResolution(\n            resolution,\n            cappedMaxRes,\n            minResolution,\n          );\n        }\n\n        const tolerance = 1e-9;\n        const minZoomLevel = Math.ceil(\n          Math.log(maxResolution / cappedMaxRes) / Math.log(power) - tolerance,\n        );\n        const offset = -direction * (0.5 - tolerance) + 0.5;\n        const capped = Math.min(cappedMaxRes, resolution);\n        const cappedZoomLevel = Math.floor(\n          Math.log(maxResolution / capped) / Math.log(power) + offset,\n        );\n        const zoomLevel = Math.max(minZoomLevel, cappedZoomLevel);\n        const newResolution = maxResolution / Math.pow(power, zoomLevel);\n        return clamp(newResolution, minResolution, cappedMaxRes);\n      }\n      return undefined;\n    }\n  );\n}\n\n/**\n * @param {number} maxResolution Max resolution.\n * @param {number} minResolution Min resolution.\n * @param {boolean} [smooth] If true, the view will be able to slightly exceed resolution limits. Default: true.\n * @param {import(\"./extent.js\").Extent} [maxExtent] Maximum allowed extent.\n * @param {boolean} [showFullExtent] If true, allows us to show the full extent. Default: false.\n * @return {Type} Zoom function.\n */\nexport function createMinMaxResolution(\n  maxResolution,\n  minResolution,\n  smooth,\n  maxExtent,\n  showFullExtent,\n) {\n  smooth = smooth !== undefined ? smooth : true;\n\n  return (\n    /**\n     * @param {number|undefined} resolution Resolution.\n     * @param {number} direction Direction.\n     * @param {import(\"./size.js\").Size} size Viewport size.\n     * @param {boolean} [isMoving] True if an interaction or animation is in progress.\n     * @return {number|undefined} Resolution.\n     */\n    function (resolution, direction, size, isMoving) {\n      if (resolution !== undefined) {\n        const cappedMaxRes = maxExtent\n          ? getViewportClampedResolution(\n              maxResolution,\n              maxExtent,\n              size,\n              showFullExtent,\n            )\n          : maxResolution;\n\n        if (!smooth || !isMoving) {\n          return clamp(resolution, minResolution, cappedMaxRes);\n        }\n        return getSmoothClampedResolution(\n          resolution,\n          cappedMaxRes,\n          minResolution,\n        );\n      }\n      return undefined;\n    }\n  );\n}\n", "/**\n * @module ol/rotationconstraint\n */\nimport {toRadians} from './math.js';\n\n/**\n * @typedef {function((number|undefined), boolean=): (number|undefined)} Type\n */\n\n/**\n * @param {number|undefined} rotation Rotation.\n * @return {number|undefined} Rotation.\n */\nexport function disable(rotation) {\n  if (rotation !== undefined) {\n    return 0;\n  }\n  return undefined;\n}\n\n/**\n * @param {number|undefined} rotation Rotation.\n * @return {number|undefined} Rotation.\n */\nexport function none(rotation) {\n  if (rotation !== undefined) {\n    return rotation;\n  }\n  return undefined;\n}\n\n/**\n * @param {number} n N.\n * @return {Type} Rotation constraint.\n */\nexport function createSnapToN(n) {\n  const theta = (2 * Math.PI) / n;\n  return (\n    /**\n     * @param {number|undefined} rotation Rotation.\n     * @param {boolean} [isMoving] True if an interaction or animation is in progress.\n     * @return {number|undefined} Rotation.\n     */\n    function (rotation, isMoving) {\n      if (isMoving) {\n        return rotation;\n      }\n\n      if (rotation !== undefined) {\n        rotation = Math.floor(rotation / theta + 0.5) * theta;\n        return rotation;\n      }\n      return undefined;\n    }\n  );\n}\n\n/**\n * @param {number} [tolerance] Tolerance.\n * @return {Type} Rotation constraint.\n */\nexport function createSnapToZero(tolerance) {\n  const t = tolerance === undefined ? toRadians(5) : tolerance;\n  return (\n    /**\n     * @param {number|undefined} rotation Rotation.\n     * @param {boolean} [isMoving] True if an interaction or animation is in progress.\n     * @return {number|undefined} Rotation.\n     */\n    function (rotation, isMoving) {\n      if (isMoving || rotation === undefined) {\n        return rotation;\n      }\n\n      if (Math.abs(rotation) <= t) {\n        return 0;\n      }\n      return rotation;\n    }\n  );\n}\n", "/**\n * @module ol/tilegrid/common\n */\n\n/**\n * Default maximum zoom for default tile grids.\n * @type {number}\n */\nexport const DEFAULT_MAX_ZOOM = 42;\n\n/**\n * Default tile size.\n * @type {number}\n */\nexport const DEFAULT_TILE_SIZE = 256;\n", "/**\n * @module ol/View\n */\nimport BaseObject from './Object.js';\nimport ViewHint from './ViewHint.js';\nimport ViewProperty from './ViewProperty.js';\nimport {linearFindNearest} from './array.js';\nimport {assert} from './asserts.js';\nimport {none as centerNone, createExtent} from './centerconstraint.js';\nimport {\n  add as addCoordinate,\n  equals as coordinatesEqual,\n  equals,\n  rotate as rotateCoordinate,\n} from './coordinate.js';\nimport {easeOut, inAndOut} from './easing.js';\nimport {\n  getCenter,\n  getForViewAndSize,\n  getHeight,\n  getWidth,\n  isEmpty,\n} from './extent.js';\nimport {VOID} from './functions.js';\nimport {fromExtent as polygonFromExtent} from './geom/Polygon.js';\nimport {clamp, modulo} from './math.js';\nimport {\n  METERS_PER_UNIT,\n  createProjection,\n  disableCoordinateWarning,\n  fromUserCoordinate,\n  fromUserExtent,\n  getUserProjection,\n  toUserCoordinate,\n  toUserExtent,\n} from './proj.js';\nimport {\n  createMinMaxResolution,\n  createSnapToPower,\n  createSnapToResolutions,\n} from './resolutionconstraint.js';\nimport {\n  createSnapToN,\n  createSnapToZero,\n  disable,\n  none as rotationNone,\n} from './rotationconstraint.js';\nimport {DEFAULT_TILE_SIZE} from './tilegrid/common.js';\n\n/**\n * An animation configuration\n *\n * @typedef {Object} Animation\n * @property {import(\"./coordinate.js\").Coordinate} [sourceCenter] Source center.\n * @property {import(\"./coordinate.js\").Coordinate} [targetCenter] Target center.\n * @property {number} [sourceResolution] Source resolution.\n * @property {number} [targetResolution] Target resolution.\n * @property {number} [sourceRotation] Source rotation.\n * @property {number} [targetRotation] Target rotation.\n * @property {import(\"./coordinate.js\").Coordinate} [anchor] Anchor.\n * @property {number} start Start.\n * @property {number} duration Duration.\n * @property {boolean} complete Complete.\n * @property {function(number):number} easing Easing.\n * @property {function(boolean):void} callback Callback.\n */\n\n/**\n * @typedef {Object} Constraints\n * @property {import(\"./centerconstraint.js\").Type} center Center.\n * @property {import(\"./resolutionconstraint.js\").Type} resolution Resolution.\n * @property {import(\"./rotationconstraint.js\").Type} rotation Rotation.\n */\n\n/**\n * @typedef {Object} FitOptions\n * @property {import(\"./size.js\").Size} [size] The size in pixels of the box to\n * fit the extent into. Defaults to the size of the map the view is associated with.\n * If no map or multiple maps are connected to the view, provide the desired box size\n * (e.g. `map.getSize()`).\n * @property {!Array<number>} [padding=[0, 0, 0, 0]] Padding (in pixels) to be\n * cleared inside the view. Values in the array are top, right, bottom and left\n * padding.\n * @property {boolean} [nearest=false] If the view `constrainResolution` option is `true`,\n * get the nearest extent instead of the closest that actually fits the view.\n * @property {number} [minResolution=0] Minimum resolution that we zoom to.\n * @property {number} [maxZoom] Maximum zoom level that we zoom to. If\n * `minResolution` is given, this property is ignored.\n * @property {number} [duration] The duration of the animation in milliseconds.\n * By default, there is no animation to the target extent.\n * @property {function(number):number} [easing] The easing function used during\n * the animation (defaults to {@link module:ol/easing.inAndOut}).\n * The function will be called for each frame with a number representing a\n * fraction of the animation's duration.  The function should return a number\n * between 0 and 1 representing the progress toward the destination state.\n * @property {function(boolean):void} [callback] Function called when the view is in\n * its final position. The callback will be called with `true` if the animation\n * series completed on its own or `false` if it was cancelled.\n */\n\n/**\n * @typedef {Object} ViewOptions\n * @property {import(\"./coordinate.js\").Coordinate} [center] The initial center for\n * the view. If a user projection is not set, the coordinate system for the center is\n * specified with the `projection` option. Layer sources will not be fetched if this\n * is not set, but the center can be set later with {@link #setCenter}.\n * @property {boolean|number} [constrainRotation=true] Rotation constraint.\n * `false` means no constraint. `true` means no constraint, but snap to zero\n * near zero. A number constrains the rotation to that number of values. For\n * example, `4` will constrain the rotation to 0, 90, 180, and 270 degrees.\n * @property {boolean} [enableRotation=true] Enable rotation.\n * If `false`, a rotation constraint that always sets the rotation to zero is\n * used. The `constrainRotation` option has no effect if `enableRotation` is\n * `false`.\n * @property {import(\"./extent.js\").Extent} [extent] The extent that constrains the\n * view, in other words, nothing outside of this extent can be visible on the map.\n * @property {boolean} [constrainOnlyCenter=false] If true, the extent\n * constraint will only apply to the view center and not the whole extent.\n * @property {boolean} [smoothExtentConstraint=true] If true, the extent\n * constraint will be applied smoothly, i.e. allow the view to go slightly outside\n * of the given `extent`.\n * @property {number} [maxResolution] The maximum resolution used to determine\n * the resolution constraint. It is used together with `minResolution` (or\n * `maxZoom`) and `zoomFactor`. If unspecified it is calculated in such a way\n * that the projection's validity extent fits in a 256x256 px tile. If the\n * projection is Spherical Mercator (the default) then `maxResolution` defaults\n * to `40075016.68557849 / 256 = 156543.03392804097`.\n * @property {number} [minResolution] The minimum resolution used to determine\n * the resolution constraint.  It is used together with `maxResolution` (or\n * `minZoom`) and `zoomFactor`.  If unspecified it is calculated assuming 29\n * zoom levels (with a factor of 2). If the projection is Spherical Mercator\n * (the default) then `minResolution` defaults to\n * `40075016.68557849 / 256 / Math.pow(2, 28) = 0.0005831682455839253`.\n * @property {number} [maxZoom=28] The maximum zoom level used to determine the\n * resolution constraint. It is used together with `minZoom` (or\n * `maxResolution`) and `zoomFactor`.  Note that if `minResolution` is also\n * provided, it is given precedence over `maxZoom`.\n * @property {number} [minZoom=0] The minimum zoom level used to determine the\n * resolution constraint. It is used together with `maxZoom` (or\n * `minResolution`) and `zoomFactor`.  Note that if `maxResolution` is also\n * provided, it is given precedence over `minZoom`.\n * @property {boolean} [multiWorld=false] If `false` the view is constrained so\n * only one world is visible, and you cannot pan off the edge.  If `true` the map\n * may show multiple worlds at low zoom levels.  Only used if the `projection` is\n * global.  Note that if `extent` is also provided it is given precedence.\n * @property {boolean} [constrainResolution=false] If true, the view will always\n * animate to the closest zoom level after an interaction; false means\n * intermediary zoom levels are allowed.\n * @property {boolean} [smoothResolutionConstraint=true] If true, the resolution\n * min/max values will be applied smoothly, i. e. allow the view to exceed slightly\n * the given resolution or zoom bounds.\n * @property {boolean} [showFullExtent=false] Allow the view to be zoomed out to\n * show the full configured extent. By default, when a view is configured with an\n * extent, users will not be able to zoom out so the viewport exceeds the extent in\n * either dimension. This means the full extent may not be visible if the viewport\n * is taller or wider than the aspect ratio of the configured extent. If\n * showFullExtent is true, the user will be able to zoom out so that the viewport\n * exceeds the height or width of the configured extent, but not both, allowing the\n * full extent to be shown.\n * @property {import(\"./proj.js\").ProjectionLike} [projection='EPSG:3857'] The\n * projection. The default is Spherical Mercator.\n * @property {number} [resolution] The initial resolution for the view. The\n * units are `projection` units per pixel (e.g. meters per pixel). An\n * alternative to setting this is to set `zoom`. Layer sources will not be\n * fetched if neither this nor `zoom` are defined, but they can be set later\n * with {@link #setZoom} or {@link #setResolution}.\n * @property {Array<number>} [resolutions] Resolutions that determine the\n * zoom levels if specified. The index in the array corresponds to the zoom level,\n * therefore the resolution values have to be in descending order. It also constrains\n * the resolution by the minimum and maximum value. If set the `maxResolution`,\n * `minResolution`, `minZoom`, `maxZoom`, and `zoomFactor` options are ignored.\n * @property {number} [rotation=0] The initial rotation for the view in radians\n * (positive rotation clockwise, 0 means North).\n * @property {number} [zoom] Only used if `resolution` is not defined. Zoom\n * level used to calculate the initial resolution for the view.\n * @property {number} [zoomFactor=2] The zoom factor used to compute the\n * corresponding resolution.\n * @property {!Array<number>} [padding=[0, 0, 0, 0]] Padding (in css pixels).\n * If the map viewport is partially covered with other content (overlays) along\n * its edges, this setting allows to shift the center of the viewport away from\n * that content. The order of the values is top, right, bottom, left.\n */\n\n/**\n * @typedef {Object} AnimationOptions\n * @property {import(\"./coordinate.js\").Coordinate} [center] The center of the view at the end of\n * the animation.\n * @property {number} [zoom] The zoom level of the view at the end of the\n * animation. This takes precedence over `resolution`.\n * @property {number} [resolution] The resolution of the view at the end\n * of the animation.  If `zoom` is also provided, this option will be ignored.\n * @property {number} [rotation] The rotation of the view at the end of\n * the animation.\n * @property {import(\"./coordinate.js\").Coordinate} [anchor] Optional anchor to remain fixed\n * during a rotation or resolution animation.\n * @property {number} [duration=1000] The duration of the animation in milliseconds.\n * @property {function(number):number} [easing] The easing function used\n * during the animation (defaults to {@link module:ol/easing.inAndOut}).\n * The function will be called for each frame with a number representing a\n * fraction of the animation's duration.  The function should return a number\n * between 0 and 1 representing the progress toward the destination state.\n */\n\n/**\n * @typedef {Object} State\n * @property {import(\"./coordinate.js\").Coordinate} center Center (in view projection coordinates).\n * @property {import(\"./proj/Projection.js\").default} projection Projection.\n * @property {number} resolution Resolution.\n * @property {import(\"./coordinate.js\").Coordinate} [nextCenter] The next center during an animation series.\n * @property {number} [nextResolution] The next resolution during an animation series.\n * @property {number} [nextRotation] The next rotation during an animation series.\n * @property {number} rotation Rotation.\n * @property {number} zoom Zoom.\n */\n\n/**\n * Like {@link import(\"./Map.js\").FrameState}, but just `viewState` and `extent`.\n * @typedef {Object} ViewStateLayerStateExtent\n * @property {State} viewState View state.\n * @property {import(\"./extent.js\").Extent} extent Extent (in user projection coordinates).\n * @property {Array<import(\"./layer/Layer.js\").State>} [layerStatesArray] Layer states.\n */\n\n/**\n * Default min zoom level for the map view.\n * @type {number}\n */\nconst DEFAULT_MIN_ZOOM = 0;\n\n/**\n * @typedef {import(\"./ObjectEventType.js\").Types|'change:center'|'change:resolution'|'change:rotation'} ViewObjectEventTypes\n */\n\n/***\n * @template Return\n * @typedef {import(\"./Observable.js\").OnSignature<import(\"./Observable.js\").EventTypes, import(\"./events/Event.js\").default, Return> &\n *   import(\"./Observable.js\").OnSignature<ViewObjectEventTypes, import(\"./Object.js\").ObjectEvent, Return> &\n *   import(\"./Observable.js\").CombinedOnSignature<import(\"./Observable.js\").EventTypes|ViewObjectEventTypes, Return>} ViewOnSignature\n */\n\n/**\n * @classdesc\n * A View object represents a simple 2D view of the map.\n *\n * This is the object to act upon to change the center, resolution,\n * and rotation of the map.\n *\n * A View has a `projection`. The projection determines the\n * coordinate system of the center, and its units determine the units of the\n * resolution (projection units per pixel). The default projection is\n * Web Mercator (EPSG:3857).\n *\n * ### The view states\n *\n * A View is determined by three states: `center`, `resolution`,\n * and `rotation`. Each state has a corresponding getter and setter, e.g.\n * `getCenter` and `setCenter` for the `center` state.\n *\n * The `zoom` state is actually not saved on the view: all computations\n * internally use the `resolution` state. Still, the `setZoom` and `getZoom`\n * methods are available, as well as `getResolutionForZoom` and\n * `getZoomForResolution` to switch from one system to the other.\n *\n * ### The constraints\n *\n * `setCenter`, `setResolution` and `setRotation` can be used to change the\n * states of the view, but any constraint defined in the constructor will\n * be applied along the way.\n *\n * A View object can have a *resolution constraint*, a *rotation constraint*\n * and a *center constraint*.\n *\n * The *resolution constraint* typically restricts min/max values and\n * snaps to specific resolutions. It is determined by the following\n * options: `resolutions`, `maxResolution`, `maxZoom` and `zoomFactor`.\n * If `resolutions` is set, the other three options are ignored. See\n * documentation for each option for more information. By default, the view\n * only has a min/max restriction and allow intermediary zoom levels when\n * pinch-zooming for example.\n *\n * The *rotation constraint* snaps to specific angles. It is determined\n * by the following options: `enableRotation` and `constrainRotation`.\n * By default rotation is allowed and its value is snapped to zero when approaching the\n * horizontal.\n *\n * The *center constraint* is determined by the `extent` option. By\n * default the view center is not constrained at all.\n *\n * ### Changing the view state\n *\n * It is important to note that `setZoom`, `setResolution`, `setCenter` and\n * `setRotation` are subject to the above mentioned constraints. As such, it\n * may sometimes not be possible to know in advance the resulting state of the\n * View. For example, calling `setResolution(10)` does not guarantee that\n * `getResolution()` will return `10`.\n *\n * A consequence of this is that, when applying a delta on the view state, one\n * should use `adjustCenter`, `adjustRotation`, `adjustZoom` and `adjustResolution`\n * rather than the corresponding setters. This will let view do its internal\n * computations. Besides, the `adjust*` methods also take an `anchor`\n * argument which allows specifying an origin for the transformation.\n *\n * ### Interacting with the view\n *\n * View constraints are usually only applied when the view is *at rest*, meaning that\n * no interaction or animation is ongoing. As such, if the user puts the view in a\n * state that is not equivalent to a constrained one (e.g. rotating the view when\n * the snap angle is 0), an animation will be triggered at the interaction end to\n * put back the view to a stable state;\n *\n * @api\n * @extends {BaseObject<ViewOptions>}\n */\nclass View extends BaseObject {\n  /**\n   * @param {ViewOptions} [options] View options.\n   */\n  constructor(options) {\n    super();\n\n    /***\n     * @type {ViewOnSignature<import(\"./events.js\").EventsKey>}\n     */\n    this.on;\n\n    /***\n     * @type {ViewOnSignature<import(\"./events.js\").EventsKey>}\n     */\n    this.once;\n\n    /***\n     * @type {ViewOnSignature<void>}\n     */\n    this.un;\n\n    options = Object.assign({}, options);\n\n    /**\n     * @private\n     * @type {Array<number>}\n     */\n    this.hints_ = [0, 0];\n\n    /**\n     * @private\n     * @type {Array<Array<Animation>>}\n     */\n    this.animations_ = [];\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.updateAnimationKey_;\n\n    /**\n     * @private\n     * @const\n     * @type {import(\"./proj/Projection.js\").default}\n     */\n    this.projection_ = createProjection(options.projection, 'EPSG:3857');\n\n    /**\n     * @private\n     * @type {import(\"./size.js\").Size}\n     */\n    this.viewportSize_ = [100, 100];\n\n    /**\n     * @private\n     * @type {import(\"./coordinate.js\").Coordinate|undefined}\n     */\n    this.targetCenter_ = null;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.targetResolution_;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.targetRotation_;\n\n    /**\n     * @private\n     * @type {import(\"./coordinate.js\").Coordinate}\n     */\n    this.nextCenter_ = null;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.nextResolution_;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.nextRotation_;\n\n    /**\n     * @private\n     * @type {import(\"./coordinate.js\").Coordinate|undefined}\n     */\n    this.cancelAnchor_ = undefined;\n\n    if (options.projection) {\n      disableCoordinateWarning();\n    }\n    if (options.center) {\n      options.center = fromUserCoordinate(options.center, this.projection_);\n    }\n    if (options.extent) {\n      options.extent = fromUserExtent(options.extent, this.projection_);\n    }\n\n    this.applyOptions_(options);\n  }\n\n  /**\n   * Set up the view with the given options.\n   * @param {ViewOptions} options View options.\n   */\n  applyOptions_(options) {\n    const properties = Object.assign({}, options);\n    for (const key in ViewProperty) {\n      delete properties[key];\n    }\n    this.setProperties(properties, true);\n\n    const resolutionConstraintInfo = createResolutionConstraint(options);\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.maxResolution_ = resolutionConstraintInfo.maxResolution;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.minResolution_ = resolutionConstraintInfo.minResolution;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.zoomFactor_ = resolutionConstraintInfo.zoomFactor;\n\n    /**\n     * @private\n     * @type {Array<number>|undefined}\n     */\n    this.resolutions_ = options.resolutions;\n\n    /**\n     * @type {Array<number>|undefined}\n     * @private\n     */\n    this.padding_ = options.padding;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.minZoom_ = resolutionConstraintInfo.minZoom;\n\n    const centerConstraint = createCenterConstraint(options);\n    const resolutionConstraint = resolutionConstraintInfo.constraint;\n    const rotationConstraint = createRotationConstraint(options);\n\n    /**\n     * @private\n     * @type {Constraints}\n     */\n    this.constraints_ = {\n      center: centerConstraint,\n      resolution: resolutionConstraint,\n      rotation: rotationConstraint,\n    };\n\n    this.setRotation(options.rotation !== undefined ? options.rotation : 0);\n    this.setCenterInternal(\n      options.center !== undefined ? options.center : null,\n    );\n    if (options.resolution !== undefined) {\n      this.setResolution(options.resolution);\n    } else if (options.zoom !== undefined) {\n      this.setZoom(options.zoom);\n    }\n  }\n\n  /**\n   * Padding (in css pixels).\n   * If the map viewport is partially covered with other content (overlays) along\n   * its edges, this setting allows to shift the center of the viewport away from that\n   * content. The order of the values in the array is top, right, bottom, left.\n   * The default is no padding, which is equivalent to `[0, 0, 0, 0]`.\n   * @type {Array<number>|undefined}\n   * @api\n   */\n  get padding() {\n    return this.padding_;\n  }\n  set padding(padding) {\n    let oldPadding = this.padding_;\n    this.padding_ = padding;\n    const center = this.getCenterInternal();\n    if (center) {\n      const newPadding = padding || [0, 0, 0, 0];\n      oldPadding = oldPadding || [0, 0, 0, 0];\n      const resolution = this.getResolution();\n      const offsetX =\n        (resolution / 2) *\n        (newPadding[3] - oldPadding[3] + oldPadding[1] - newPadding[1]);\n      const offsetY =\n        (resolution / 2) *\n        (newPadding[0] - oldPadding[0] + oldPadding[2] - newPadding[2]);\n      this.setCenterInternal([center[0] + offsetX, center[1] - offsetY]);\n    }\n  }\n\n  /**\n   * Get an updated version of the view options used to construct the view.  The\n   * current resolution (or zoom), center, and rotation are applied to any stored\n   * options.  The provided options can be used to apply new min/max zoom or\n   * resolution limits.\n   * @param {ViewOptions} newOptions New options to be applied.\n   * @return {ViewOptions} New options updated with the current view state.\n   */\n  getUpdatedOptions_(newOptions) {\n    const options = this.getProperties();\n\n    // preserve resolution (or zoom)\n    if (options.resolution !== undefined) {\n      options.resolution = this.getResolution();\n    } else {\n      options.zoom = this.getZoom();\n    }\n\n    // preserve center\n    options.center = this.getCenterInternal();\n\n    // preserve rotation\n    options.rotation = this.getRotation();\n\n    return Object.assign({}, options, newOptions);\n  }\n\n  /**\n   * Animate the view.  The view's center, zoom (or resolution), and rotation\n   * can be animated for smooth transitions between view states.  For example,\n   * to animate the view to a new zoom level:\n   *\n   *     view.animate({zoom: view.getZoom() + 1});\n   *\n   * By default, the animation lasts one second and uses in-and-out easing.  You\n   * can customize this behavior by including `duration` (in milliseconds) and\n   * `easing` options (see {@link module:ol/easing}).\n   *\n   * To chain together multiple animations, call the method with multiple\n   * animation objects.  For example, to first zoom and then pan:\n   *\n   *     view.animate({zoom: 10}, {center: [0, 0]});\n   *\n   * If you provide a function as the last argument to the animate method, it\n   * will get called at the end of an animation series.  The callback will be\n   * called with `true` if the animation series completed on its own or `false`\n   * if it was cancelled.\n   *\n   * Animations are cancelled by user interactions (e.g. dragging the map) or by\n   * calling `view.setCenter()`, `view.setResolution()`, or `view.setRotation()`\n   * (or another method that calls one of these).\n   *\n   * @param {...(AnimationOptions|function(boolean): void)} var_args Animation\n   *     options.  Multiple animations can be run in series by passing multiple\n   *     options objects.  To run multiple animations in parallel, call the method\n   *     multiple times.  An optional callback can be provided as a final\n   *     argument.  The callback will be called with a boolean indicating whether\n   *     the animation completed without being cancelled.\n   * @api\n   */\n  animate(var_args) {\n    if (this.isDef() && !this.getAnimating()) {\n      this.resolveConstraints(0);\n    }\n    const args = new Array(arguments.length);\n    for (let i = 0; i < args.length; ++i) {\n      let options = arguments[i];\n      if (options.center) {\n        options = Object.assign({}, options);\n        options.center = fromUserCoordinate(\n          options.center,\n          this.getProjection(),\n        );\n      }\n      if (options.anchor) {\n        options = Object.assign({}, options);\n        options.anchor = fromUserCoordinate(\n          options.anchor,\n          this.getProjection(),\n        );\n      }\n      args[i] = options;\n    }\n    this.animateInternal.apply(this, args);\n  }\n\n  /**\n   * @param {...(AnimationOptions|function(boolean): void)} var_args Animation options.\n   */\n  animateInternal(var_args) {\n    let animationCount = arguments.length;\n    let callback;\n    if (\n      animationCount > 1 &&\n      typeof arguments[animationCount - 1] === 'function'\n    ) {\n      callback = arguments[animationCount - 1];\n      --animationCount;\n    }\n\n    let i = 0;\n    for (; i < animationCount && !this.isDef(); ++i) {\n      // if view properties are not yet set, shortcut to the final state\n      const state = arguments[i];\n      if (state.center) {\n        this.setCenterInternal(state.center);\n      }\n      if (state.zoom !== undefined) {\n        this.setZoom(state.zoom);\n      } else if (state.resolution) {\n        this.setResolution(state.resolution);\n      }\n      if (state.rotation !== undefined) {\n        this.setRotation(state.rotation);\n      }\n    }\n    if (i === animationCount) {\n      if (callback) {\n        animationCallback(callback, true);\n      }\n      return;\n    }\n\n    let start = Date.now();\n    let center = this.targetCenter_.slice();\n    let resolution = this.targetResolution_;\n    let rotation = this.targetRotation_;\n    const series = [];\n    for (; i < animationCount; ++i) {\n      const options = /** @type {AnimationOptions} */ (arguments[i]);\n\n      const animation = {\n        start: start,\n        complete: false,\n        anchor: options.anchor,\n        duration: options.duration !== undefined ? options.duration : 1000,\n        easing: options.easing || inAndOut,\n        callback: callback,\n      };\n\n      if (options.center) {\n        animation.sourceCenter = center;\n        animation.targetCenter = options.center.slice();\n        center = animation.targetCenter;\n      }\n\n      if (options.zoom !== undefined) {\n        animation.sourceResolution = resolution;\n        animation.targetResolution = this.getResolutionForZoom(options.zoom);\n        resolution = animation.targetResolution;\n      } else if (options.resolution) {\n        animation.sourceResolution = resolution;\n        animation.targetResolution = options.resolution;\n        resolution = animation.targetResolution;\n      }\n\n      if (options.rotation !== undefined) {\n        animation.sourceRotation = rotation;\n        const delta =\n          modulo(options.rotation - rotation + Math.PI, 2 * Math.PI) - Math.PI;\n        animation.targetRotation = rotation + delta;\n        rotation = animation.targetRotation;\n      }\n\n      // check if animation is a no-op\n      if (isNoopAnimation(animation)) {\n        animation.complete = true;\n        // we still push it onto the series for callback handling\n      } else {\n        start += animation.duration;\n      }\n      series.push(animation);\n    }\n    this.animations_.push(series);\n    this.setHint(ViewHint.ANIMATING, 1);\n    this.updateAnimations_();\n  }\n\n  /**\n   * Determine if the view is being animated.\n   * @return {boolean} The view is being animated.\n   * @api\n   */\n  getAnimating() {\n    return this.hints_[ViewHint.ANIMATING] > 0;\n  }\n\n  /**\n   * Determine if the user is interacting with the view, such as panning or zooming.\n   * @return {boolean} The view is being interacted with.\n   * @api\n   */\n  getInteracting() {\n    return this.hints_[ViewHint.INTERACTING] > 0;\n  }\n\n  /**\n   * Cancel any ongoing animations.\n   * @api\n   */\n  cancelAnimations() {\n    this.setHint(ViewHint.ANIMATING, -this.hints_[ViewHint.ANIMATING]);\n    let anchor;\n    for (let i = 0, ii = this.animations_.length; i < ii; ++i) {\n      const series = this.animations_[i];\n      if (series[0].callback) {\n        animationCallback(series[0].callback, false);\n      }\n      if (!anchor) {\n        for (let j = 0, jj = series.length; j < jj; ++j) {\n          const animation = series[j];\n          if (!animation.complete) {\n            anchor = animation.anchor;\n            break;\n          }\n        }\n      }\n    }\n    this.animations_.length = 0;\n    this.cancelAnchor_ = anchor;\n    this.nextCenter_ = null;\n    this.nextResolution_ = NaN;\n    this.nextRotation_ = NaN;\n  }\n\n  /**\n   * Update all animations.\n   */\n  updateAnimations_() {\n    if (this.updateAnimationKey_ !== undefined) {\n      cancelAnimationFrame(this.updateAnimationKey_);\n      this.updateAnimationKey_ = undefined;\n    }\n    if (!this.getAnimating()) {\n      return;\n    }\n    const now = Date.now();\n    let more = false;\n    for (let i = this.animations_.length - 1; i >= 0; --i) {\n      const series = this.animations_[i];\n      let seriesComplete = true;\n      for (let j = 0, jj = series.length; j < jj; ++j) {\n        const animation = series[j];\n        if (animation.complete) {\n          continue;\n        }\n        const elapsed = now - animation.start;\n        let fraction =\n          animation.duration > 0 ? elapsed / animation.duration : 1;\n        if (fraction >= 1) {\n          animation.complete = true;\n          fraction = 1;\n        } else {\n          seriesComplete = false;\n        }\n        const progress = animation.easing(fraction);\n        if (animation.sourceCenter) {\n          const x0 = animation.sourceCenter[0];\n          const y0 = animation.sourceCenter[1];\n          const x1 = animation.targetCenter[0];\n          const y1 = animation.targetCenter[1];\n          this.nextCenter_ = animation.targetCenter;\n          const x = x0 + progress * (x1 - x0);\n          const y = y0 + progress * (y1 - y0);\n          this.targetCenter_ = [x, y];\n        }\n        if (animation.sourceResolution && animation.targetResolution) {\n          const resolution =\n            progress === 1\n              ? animation.targetResolution\n              : animation.sourceResolution +\n                progress *\n                  (animation.targetResolution - animation.sourceResolution);\n          if (animation.anchor) {\n            const size = this.getViewportSize_(this.getRotation());\n            const constrainedResolution = this.constraints_.resolution(\n              resolution,\n              0,\n              size,\n              true,\n            );\n            this.targetCenter_ = this.calculateCenterZoom(\n              constrainedResolution,\n              animation.anchor,\n            );\n          }\n          this.nextResolution_ = animation.targetResolution;\n          this.targetResolution_ = resolution;\n          this.applyTargetState_(true);\n        }\n        if (\n          animation.sourceRotation !== undefined &&\n          animation.targetRotation !== undefined\n        ) {\n          const rotation =\n            progress === 1\n              ? modulo(animation.targetRotation + Math.PI, 2 * Math.PI) -\n                Math.PI\n              : animation.sourceRotation +\n                progress *\n                  (animation.targetRotation - animation.sourceRotation);\n          if (animation.anchor) {\n            const constrainedRotation = this.constraints_.rotation(\n              rotation,\n              true,\n            );\n            this.targetCenter_ = this.calculateCenterRotate(\n              constrainedRotation,\n              animation.anchor,\n            );\n          }\n          this.nextRotation_ = animation.targetRotation;\n          this.targetRotation_ = rotation;\n        }\n        this.applyTargetState_(true);\n        more = true;\n        if (!animation.complete) {\n          break;\n        }\n      }\n      if (seriesComplete) {\n        this.animations_[i] = null;\n        this.setHint(ViewHint.ANIMATING, -1);\n        this.nextCenter_ = null;\n        this.nextResolution_ = NaN;\n        this.nextRotation_ = NaN;\n        const callback = series[0].callback;\n        if (callback) {\n          animationCallback(callback, true);\n        }\n      }\n    }\n    // prune completed series\n    this.animations_ = this.animations_.filter(Boolean);\n    if (more && this.updateAnimationKey_ === undefined) {\n      this.updateAnimationKey_ = requestAnimationFrame(\n        this.updateAnimations_.bind(this),\n      );\n    }\n  }\n\n  /**\n   * @param {number} rotation Target rotation.\n   * @param {import(\"./coordinate.js\").Coordinate} anchor Rotation anchor.\n   * @return {import(\"./coordinate.js\").Coordinate|undefined} Center for rotation and anchor.\n   */\n  calculateCenterRotate(rotation, anchor) {\n    let center;\n    const currentCenter = this.getCenterInternal();\n    if (currentCenter !== undefined) {\n      center = [currentCenter[0] - anchor[0], currentCenter[1] - anchor[1]];\n      rotateCoordinate(center, rotation - this.getRotation());\n      addCoordinate(center, anchor);\n    }\n    return center;\n  }\n\n  /**\n   * @param {number} resolution Target resolution.\n   * @param {import(\"./coordinate.js\").Coordinate} anchor Zoom anchor.\n   * @return {import(\"./coordinate.js\").Coordinate|undefined} Center for resolution and anchor.\n   */\n  calculateCenterZoom(resolution, anchor) {\n    let center;\n    const currentCenter = this.getCenterInternal();\n    const currentResolution = this.getResolution();\n    if (currentCenter !== undefined && currentResolution !== undefined) {\n      const x =\n        anchor[0] -\n        (resolution * (anchor[0] - currentCenter[0])) / currentResolution;\n      const y =\n        anchor[1] -\n        (resolution * (anchor[1] - currentCenter[1])) / currentResolution;\n      center = [x, y];\n    }\n    return center;\n  }\n\n  /**\n   * Returns the current viewport size.\n   * @private\n   * @param {number} [rotation] Take into account the rotation of the viewport when giving the size\n   * @return {import(\"./size.js\").Size} Viewport size or `[100, 100]` when no viewport is found.\n   */\n  getViewportSize_(rotation) {\n    const size = this.viewportSize_;\n    if (rotation) {\n      const w = size[0];\n      const h = size[1];\n      return [\n        Math.abs(w * Math.cos(rotation)) + Math.abs(h * Math.sin(rotation)),\n        Math.abs(w * Math.sin(rotation)) + Math.abs(h * Math.cos(rotation)),\n      ];\n    }\n    return size;\n  }\n\n  /**\n   * Stores the viewport size on the view. The viewport size is not read every time from the DOM\n   * to avoid performance hit and layout reflow.\n   * This should be done on map size change.\n   * Note: the constraints are not resolved during an animation to avoid stopping it\n   * @param {import(\"./size.js\").Size} [size] Viewport size; if undefined, [100, 100] is assumed\n   */\n  setViewportSize(size) {\n    this.viewportSize_ = Array.isArray(size) ? size.slice() : [100, 100];\n    if (!this.getAnimating()) {\n      this.resolveConstraints(0);\n    }\n  }\n\n  /**\n   * Get the view center.\n   * @return {import(\"./coordinate.js\").Coordinate|undefined} The center of the view.\n   * @observable\n   * @api\n   */\n  getCenter() {\n    const center = this.getCenterInternal();\n    if (!center) {\n      return center;\n    }\n    return toUserCoordinate(center, this.getProjection());\n  }\n\n  /**\n   * Get the view center without transforming to user projection.\n   * @return {import(\"./coordinate.js\").Coordinate|undefined} The center of the view.\n   */\n  getCenterInternal() {\n    return /** @type {import(\"./coordinate.js\").Coordinate|undefined} */ (\n      this.get(ViewProperty.CENTER)\n    );\n  }\n\n  /**\n   * @return {Constraints} Constraints.\n   */\n  getConstraints() {\n    return this.constraints_;\n  }\n\n  /**\n   * @return {boolean} Resolution constraint is set\n   */\n  getConstrainResolution() {\n    return this.get('constrainResolution');\n  }\n\n  /**\n   * @param {Array<number>} [hints] Destination array.\n   * @return {Array<number>} Hint.\n   */\n  getHints(hints) {\n    if (hints !== undefined) {\n      hints[0] = this.hints_[0];\n      hints[1] = this.hints_[1];\n      return hints;\n    }\n    return this.hints_.slice();\n  }\n\n  /**\n   * Calculate the extent for the current view state and the passed box size.\n   * @param {import(\"./size.js\").Size} [size] The pixel dimensions of the box\n   * into which the calculated extent should fit. Defaults to the size of the\n   * map the view is associated with.\n   * If no map or multiple maps are connected to the view, provide the desired\n   * box size (e.g. `map.getSize()`).\n   * @return {import(\"./extent.js\").Extent} Extent.\n   * @api\n   */\n  calculateExtent(size) {\n    const extent = this.calculateExtentInternal(size);\n    return toUserExtent(extent, this.getProjection());\n  }\n\n  /**\n   * @param {import(\"./size.js\").Size} [size] Box pixel size. If not provided,\n   * the map's last known viewport size will be used.\n   * @return {import(\"./extent.js\").Extent} Extent.\n   */\n  calculateExtentInternal(size) {\n    size = size || this.getViewportSizeMinusPadding_();\n    const center = /** @type {!import(\"./coordinate.js\").Coordinate} */ (\n      this.getCenterInternal()\n    );\n    assert(center, 'The view center is not defined');\n    const resolution = /** @type {!number} */ (this.getResolution());\n    assert(resolution !== undefined, 'The view resolution is not defined');\n    const rotation = /** @type {!number} */ (this.getRotation());\n    assert(rotation !== undefined, 'The view rotation is not defined');\n\n    return getForViewAndSize(center, resolution, rotation, size);\n  }\n\n  /**\n   * Get the maximum resolution of the view.\n   * @return {number} The maximum resolution of the view.\n   * @api\n   */\n  getMaxResolution() {\n    return this.maxResolution_;\n  }\n\n  /**\n   * Get the minimum resolution of the view.\n   * @return {number} The minimum resolution of the view.\n   * @api\n   */\n  getMinResolution() {\n    return this.minResolution_;\n  }\n\n  /**\n   * Get the maximum zoom level for the view.\n   * @return {number} The maximum zoom level.\n   * @api\n   */\n  getMaxZoom() {\n    return /** @type {number} */ (\n      this.getZoomForResolution(this.minResolution_)\n    );\n  }\n\n  /**\n   * Set a new maximum zoom level for the view.\n   * @param {number} zoom The maximum zoom level.\n   * @api\n   */\n  setMaxZoom(zoom) {\n    this.applyOptions_(this.getUpdatedOptions_({maxZoom: zoom}));\n  }\n\n  /**\n   * Get the minimum zoom level for the view.\n   * @return {number} The minimum zoom level.\n   * @api\n   */\n  getMinZoom() {\n    return /** @type {number} */ (\n      this.getZoomForResolution(this.maxResolution_)\n    );\n  }\n\n  /**\n   * Set a new minimum zoom level for the view.\n   * @param {number} zoom The minimum zoom level.\n   * @api\n   */\n  setMinZoom(zoom) {\n    this.applyOptions_(this.getUpdatedOptions_({minZoom: zoom}));\n  }\n\n  /**\n   * Set whether the view should allow intermediary zoom levels.\n   * @param {boolean} enabled Whether the resolution is constrained.\n   * @api\n   */\n  setConstrainResolution(enabled) {\n    this.applyOptions_(this.getUpdatedOptions_({constrainResolution: enabled}));\n  }\n\n  /**\n   * Get the view projection.\n   * @return {import(\"./proj/Projection.js\").default} The projection of the view.\n   * @api\n   */\n  getProjection() {\n    return this.projection_;\n  }\n\n  /**\n   * Get the view resolution.\n   * @return {number|undefined} The resolution of the view.\n   * @observable\n   * @api\n   */\n  getResolution() {\n    return /** @type {number|undefined} */ (this.get(ViewProperty.RESOLUTION));\n  }\n\n  /**\n   * Get the resolutions for the view. This returns the array of resolutions\n   * passed to the constructor of the View, or undefined if none were given.\n   * @return {Array<number>|undefined} The resolutions of the view.\n   * @api\n   */\n  getResolutions() {\n    return this.resolutions_;\n  }\n\n  /**\n   * Get the resolution for a provided extent (in map units) and size (in pixels).\n   * @param {import(\"./extent.js\").Extent} extent Extent.\n   * @param {import(\"./size.js\").Size} [size] Box pixel size.\n   * @return {number} The resolution at which the provided extent will render at\n   *     the given size.\n   * @api\n   */\n  getResolutionForExtent(extent, size) {\n    return this.getResolutionForExtentInternal(\n      fromUserExtent(extent, this.getProjection()),\n      size,\n    );\n  }\n\n  /**\n   * Get the resolution for a provided extent (in map units) and size (in pixels).\n   * @param {import(\"./extent.js\").Extent} extent Extent.\n   * @param {import(\"./size.js\").Size} [size] Box pixel size.\n   * @return {number} The resolution at which the provided extent will render at\n   *     the given size.\n   */\n  getResolutionForExtentInternal(extent, size) {\n    size = size || this.getViewportSizeMinusPadding_();\n    const xResolution = getWidth(extent) / size[0];\n    const yResolution = getHeight(extent) / size[1];\n    return Math.max(xResolution, yResolution);\n  }\n\n  /**\n   * Return a function that returns a value between 0 and 1 for a\n   * resolution. Exponential scaling is assumed.\n   * @param {number} [power] Power.\n   * @return {function(number): number} Resolution for value function.\n   */\n  getResolutionForValueFunction(power) {\n    power = power || 2;\n    const maxResolution = this.getConstrainedResolution(this.maxResolution_);\n    const minResolution = this.minResolution_;\n    const max = Math.log(maxResolution / minResolution) / Math.log(power);\n    return (\n      /**\n       * @param {number} value Value.\n       * @return {number} Resolution.\n       */\n      function (value) {\n        const resolution = maxResolution / Math.pow(power, value * max);\n        return resolution;\n      }\n    );\n  }\n\n  /**\n   * Get the view rotation.\n   * @return {number} The rotation of the view in radians.\n   * @observable\n   * @api\n   */\n  getRotation() {\n    return /** @type {number} */ (this.get(ViewProperty.ROTATION));\n  }\n\n  /**\n   * Return a function that returns a resolution for a value between\n   * 0 and 1. Exponential scaling is assumed.\n   * @param {number} [power] Power.\n   * @return {function(number): number} Value for resolution function.\n   */\n  getValueForResolutionFunction(power) {\n    const logPower = Math.log(power || 2);\n    const maxResolution = this.getConstrainedResolution(this.maxResolution_);\n    const minResolution = this.minResolution_;\n    const max = Math.log(maxResolution / minResolution) / logPower;\n    return (\n      /**\n       * @param {number} resolution Resolution.\n       * @return {number} Value.\n       */\n      function (resolution) {\n        const value = Math.log(maxResolution / resolution) / logPower / max;\n        return value;\n      }\n    );\n  }\n\n  /**\n   * Returns the size of the viewport minus padding.\n   * @private\n   * @param {number} [rotation] Take into account the rotation of the viewport when giving the size\n   * @return {import(\"./size.js\").Size} Viewport size reduced by the padding.\n   */\n  getViewportSizeMinusPadding_(rotation) {\n    let size = this.getViewportSize_(rotation);\n    const padding = this.padding_;\n    if (padding) {\n      size = [\n        size[0] - padding[1] - padding[3],\n        size[1] - padding[0] - padding[2],\n      ];\n    }\n    return size;\n  }\n\n  /**\n   * @return {State} View state.\n   */\n  getState() {\n    const projection = this.getProjection();\n    const resolution = this.getResolution();\n    const rotation = this.getRotation();\n    let center = /** @type {import(\"./coordinate.js\").Coordinate} */ (\n      this.getCenterInternal()\n    );\n    const padding = this.padding_;\n    if (padding) {\n      const reducedSize = this.getViewportSizeMinusPadding_();\n      center = calculateCenterOn(\n        center,\n        this.getViewportSize_(),\n        [reducedSize[0] / 2 + padding[3], reducedSize[1] / 2 + padding[0]],\n        resolution,\n        rotation,\n      );\n    }\n    return {\n      center: center.slice(0),\n      projection: projection !== undefined ? projection : null,\n      resolution: resolution,\n      nextCenter: this.nextCenter_,\n      nextResolution: this.nextResolution_,\n      nextRotation: this.nextRotation_,\n      rotation: rotation,\n      zoom: this.getZoom(),\n    };\n  }\n\n  /**\n   * @return {ViewStateLayerStateExtent} Like `FrameState`, but just `viewState` and `extent`.\n   */\n  getViewStateAndExtent() {\n    return {\n      viewState: this.getState(),\n      extent: this.calculateExtent(),\n    };\n  }\n\n  /**\n   * Get the current zoom level. This method may return non-integer zoom levels\n   * if the view does not constrain the resolution, or if an interaction or\n   * animation is underway.\n   * @return {number|undefined} Zoom.\n   * @api\n   */\n  getZoom() {\n    let zoom;\n    const resolution = this.getResolution();\n    if (resolution !== undefined) {\n      zoom = this.getZoomForResolution(resolution);\n    }\n    return zoom;\n  }\n\n  /**\n   * Get the zoom level for a resolution.\n   * @param {number} resolution The resolution.\n   * @return {number|undefined} The zoom level for the provided resolution.\n   * @api\n   */\n  getZoomForResolution(resolution) {\n    let offset = this.minZoom_ || 0;\n    let max, zoomFactor;\n    if (this.resolutions_) {\n      const nearest = linearFindNearest(this.resolutions_, resolution, 1);\n      offset = nearest;\n      max = this.resolutions_[nearest];\n      if (nearest == this.resolutions_.length - 1) {\n        zoomFactor = 2;\n      } else {\n        zoomFactor = max / this.resolutions_[nearest + 1];\n      }\n    } else {\n      max = this.maxResolution_;\n      zoomFactor = this.zoomFactor_;\n    }\n    return offset + Math.log(max / resolution) / Math.log(zoomFactor);\n  }\n\n  /**\n   * Get the resolution for a zoom level.\n   * @param {number} zoom Zoom level.\n   * @return {number} The view resolution for the provided zoom level.\n   * @api\n   */\n  getResolutionForZoom(zoom) {\n    if (this.resolutions_?.length) {\n      if (this.resolutions_.length === 1) {\n        return this.resolutions_[0];\n      }\n      const baseLevel = clamp(\n        Math.floor(zoom),\n        0,\n        this.resolutions_.length - 2,\n      );\n      const zoomFactor =\n        this.resolutions_[baseLevel] / this.resolutions_[baseLevel + 1];\n      return (\n        this.resolutions_[baseLevel] /\n        Math.pow(zoomFactor, clamp(zoom - baseLevel, 0, 1))\n      );\n    }\n    return (\n      this.maxResolution_ / Math.pow(this.zoomFactor_, zoom - this.minZoom_)\n    );\n  }\n\n  /**\n   * Fit the given geometry or extent based on the given map size and border.\n   * The size is pixel dimensions of the box to fit the extent into.\n   * In most cases you will want to use the map size, that is `map.getSize()`.\n   * Takes care of the map angle.\n   * @param {import(\"./geom/SimpleGeometry.js\").default|import(\"./extent.js\").Extent} geometryOrExtent The geometry or\n   *     extent to fit the view to.\n   * @param {FitOptions} [options] Options.\n   * @api\n   */\n  fit(geometryOrExtent, options) {\n    /** @type {import(\"./geom/SimpleGeometry.js\").default} */\n    let geometry;\n    assert(\n      Array.isArray(geometryOrExtent) ||\n        typeof (/** @type {?} */ (geometryOrExtent).getSimplifiedGeometry) ===\n          'function',\n      'Invalid extent or geometry provided as `geometry`',\n    );\n    if (Array.isArray(geometryOrExtent)) {\n      assert(\n        !isEmpty(geometryOrExtent),\n        'Cannot fit empty extent provided as `geometry`',\n      );\n      const extent = fromUserExtent(geometryOrExtent, this.getProjection());\n      geometry = polygonFromExtent(extent);\n    } else if (geometryOrExtent.getType() === 'Circle') {\n      const extent = fromUserExtent(\n        geometryOrExtent.getExtent(),\n        this.getProjection(),\n      );\n      geometry = polygonFromExtent(extent);\n      geometry.rotate(this.getRotation(), getCenter(extent));\n    } else {\n      const userProjection = getUserProjection();\n      if (userProjection) {\n        geometry = /** @type {import(\"./geom/SimpleGeometry.js\").default} */ (\n          geometryOrExtent\n            .clone()\n            .transform(userProjection, this.getProjection())\n        );\n      } else {\n        geometry = geometryOrExtent;\n      }\n    }\n\n    this.fitInternal(geometry, options);\n  }\n\n  /**\n   * Calculate rotated extent\n   * @param {import(\"./geom/SimpleGeometry.js\").default} geometry The geometry.\n   * @return {import(\"./extent.js\").Extent} The rotated extent for the geometry.\n   */\n  rotatedExtentForGeometry(geometry) {\n    const rotation = this.getRotation();\n    const cosAngle = Math.cos(rotation);\n    const sinAngle = Math.sin(-rotation);\n    const coords = geometry.getFlatCoordinates();\n    const stride = geometry.getStride();\n    let minRotX = +Infinity;\n    let minRotY = +Infinity;\n    let maxRotX = -Infinity;\n    let maxRotY = -Infinity;\n    for (let i = 0, ii = coords.length; i < ii; i += stride) {\n      const rotX = coords[i] * cosAngle - coords[i + 1] * sinAngle;\n      const rotY = coords[i] * sinAngle + coords[i + 1] * cosAngle;\n      minRotX = Math.min(minRotX, rotX);\n      minRotY = Math.min(minRotY, rotY);\n      maxRotX = Math.max(maxRotX, rotX);\n      maxRotY = Math.max(maxRotY, rotY);\n    }\n    return [minRotX, minRotY, maxRotX, maxRotY];\n  }\n\n  /**\n   * @param {import(\"./geom/SimpleGeometry.js\").default} geometry The geometry.\n   * @param {FitOptions} [options] Options.\n   */\n  fitInternal(geometry, options) {\n    options = options || {};\n    let size = options.size;\n    if (!size) {\n      size = this.getViewportSizeMinusPadding_();\n    }\n    const padding =\n      options.padding !== undefined ? options.padding : [0, 0, 0, 0];\n    const nearest = options.nearest !== undefined ? options.nearest : false;\n    let minResolution;\n    if (options.minResolution !== undefined) {\n      minResolution = options.minResolution;\n    } else if (options.maxZoom !== undefined) {\n      minResolution = this.getResolutionForZoom(options.maxZoom);\n    } else {\n      minResolution = 0;\n    }\n\n    const rotatedExtent = this.rotatedExtentForGeometry(geometry);\n\n    // calculate resolution\n    let resolution = this.getResolutionForExtentInternal(rotatedExtent, [\n      size[0] - padding[1] - padding[3],\n      size[1] - padding[0] - padding[2],\n    ]);\n    resolution = isNaN(resolution)\n      ? minResolution\n      : Math.max(resolution, minResolution);\n    resolution = this.getConstrainedResolution(resolution, nearest ? 0 : 1);\n\n    // calculate center\n    const rotation = this.getRotation();\n    const sinAngle = Math.sin(rotation);\n    const cosAngle = Math.cos(rotation);\n    const centerRot = getCenter(rotatedExtent);\n    centerRot[0] += ((padding[1] - padding[3]) / 2) * resolution;\n    centerRot[1] += ((padding[0] - padding[2]) / 2) * resolution;\n    const centerX = centerRot[0] * cosAngle - centerRot[1] * sinAngle;\n    const centerY = centerRot[1] * cosAngle + centerRot[0] * sinAngle;\n    const center = this.getConstrainedCenter([centerX, centerY], resolution);\n    const callback = options.callback ? options.callback : VOID;\n\n    if (options.duration !== undefined) {\n      this.animateInternal(\n        {\n          resolution: resolution,\n          center: center,\n          duration: options.duration,\n          easing: options.easing,\n        },\n        callback,\n      );\n    } else {\n      this.targetResolution_ = resolution;\n      this.targetCenter_ = center;\n      this.applyTargetState_(false, true);\n      animationCallback(callback, true);\n    }\n  }\n\n  /**\n   * Center on coordinate and view position.\n   * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate.\n   * @param {import(\"./size.js\").Size} size Box pixel size.\n   * @param {import(\"./pixel.js\").Pixel} position Position on the view to center on.\n   * @api\n   */\n  centerOn(coordinate, size, position) {\n    this.centerOnInternal(\n      fromUserCoordinate(coordinate, this.getProjection()),\n      size,\n      position,\n    );\n  }\n\n  /**\n   * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate.\n   * @param {import(\"./size.js\").Size} size Box pixel size.\n   * @param {import(\"./pixel.js\").Pixel} position Position on the view to center on.\n   */\n  centerOnInternal(coordinate, size, position) {\n    this.setCenterInternal(\n      calculateCenterOn(\n        coordinate,\n        size,\n        position,\n        this.getResolution(),\n        this.getRotation(),\n      ),\n    );\n  }\n\n  /**\n   * Calculates the shift between map and viewport center.\n   * @param {import(\"./coordinate.js\").Coordinate} center Center.\n   * @param {number} resolution Resolution.\n   * @param {number} rotation Rotation.\n   * @param {import(\"./size.js\").Size} size Size.\n   * @return {Array<number>|undefined} Center shift.\n   */\n  calculateCenterShift(center, resolution, rotation, size) {\n    let centerShift;\n    const padding = this.padding_;\n    if (padding && center) {\n      const reducedSize = this.getViewportSizeMinusPadding_(-rotation);\n      const shiftedCenter = calculateCenterOn(\n        center,\n        size,\n        [reducedSize[0] / 2 + padding[3], reducedSize[1] / 2 + padding[0]],\n        resolution,\n        rotation,\n      );\n      centerShift = [\n        center[0] - shiftedCenter[0],\n        center[1] - shiftedCenter[1],\n      ];\n    }\n    return centerShift;\n  }\n\n  /**\n   * @return {boolean} Is defined.\n   */\n  isDef() {\n    return !!this.getCenterInternal() && this.getResolution() !== undefined;\n  }\n\n  /**\n   * Adds relative coordinates to the center of the view. Any extent constraint will apply.\n   * @param {import(\"./coordinate.js\").Coordinate} deltaCoordinates Relative value to add.\n   * @api\n   */\n  adjustCenter(deltaCoordinates) {\n    const center = toUserCoordinate(this.targetCenter_, this.getProjection());\n    this.setCenter([\n      center[0] + deltaCoordinates[0],\n      center[1] + deltaCoordinates[1],\n    ]);\n  }\n\n  /**\n   * Adds relative coordinates to the center of the view. Any extent constraint will apply.\n   * @param {import(\"./coordinate.js\").Coordinate} deltaCoordinates Relative value to add.\n   */\n  adjustCenterInternal(deltaCoordinates) {\n    const center = this.targetCenter_;\n    this.setCenterInternal([\n      center[0] + deltaCoordinates[0],\n      center[1] + deltaCoordinates[1],\n    ]);\n  }\n\n  /**\n   * Multiply the view resolution by a ratio, optionally using an anchor. Any resolution\n   * constraint will apply.\n   * @param {number} ratio The ratio to apply on the view resolution.\n   * @param {import(\"./coordinate.js\").Coordinate} [anchor] The origin of the transformation.\n   * @api\n   */\n  adjustResolution(ratio, anchor) {\n    anchor = anchor && fromUserCoordinate(anchor, this.getProjection());\n    this.adjustResolutionInternal(ratio, anchor);\n  }\n\n  /**\n   * Multiply the view resolution by a ratio, optionally using an anchor. Any resolution\n   * constraint will apply.\n   * @param {number} ratio The ratio to apply on the view resolution.\n   * @param {import(\"./coordinate.js\").Coordinate} [anchor] The origin of the transformation.\n   */\n  adjustResolutionInternal(ratio, anchor) {\n    const isMoving = this.getAnimating() || this.getInteracting();\n    const size = this.getViewportSize_(this.getRotation());\n    const newResolution = this.constraints_.resolution(\n      this.targetResolution_ * ratio,\n      0,\n      size,\n      isMoving,\n    );\n\n    if (anchor) {\n      this.targetCenter_ = this.calculateCenterZoom(newResolution, anchor);\n    }\n\n    this.targetResolution_ *= ratio;\n    this.applyTargetState_();\n  }\n\n  /**\n   * Adds a value to the view zoom level, optionally using an anchor. Any resolution\n   * constraint will apply.\n   * @param {number} delta Relative value to add to the zoom level.\n   * @param {import(\"./coordinate.js\").Coordinate} [anchor] The origin of the transformation.\n   * @api\n   */\n  adjustZoom(delta, anchor) {\n    this.adjustResolution(Math.pow(this.zoomFactor_, -delta), anchor);\n  }\n\n  /**\n   * Adds a value to the view rotation, optionally using an anchor. Any rotation\n   * constraint will apply.\n   * @param {number} delta Relative value to add to the zoom rotation, in radians.\n   * @param {import(\"./coordinate.js\").Coordinate} [anchor] The rotation center.\n   * @api\n   */\n  adjustRotation(delta, anchor) {\n    if (anchor) {\n      anchor = fromUserCoordinate(anchor, this.getProjection());\n    }\n    this.adjustRotationInternal(delta, anchor);\n  }\n\n  /**\n   * @param {number} delta Relative value to add to the zoom rotation, in radians.\n   * @param {import(\"./coordinate.js\").Coordinate} [anchor] The rotation center.\n   */\n  adjustRotationInternal(delta, anchor) {\n    const isMoving = this.getAnimating() || this.getInteracting();\n    const newRotation = this.constraints_.rotation(\n      this.targetRotation_ + delta,\n      isMoving,\n    );\n    if (anchor) {\n      this.targetCenter_ = this.calculateCenterRotate(newRotation, anchor);\n    }\n    this.targetRotation_ += delta;\n    this.applyTargetState_();\n  }\n\n  /**\n   * Set the center of the current view. Any extent constraint will apply.\n   * @param {import(\"./coordinate.js\").Coordinate|undefined} center The center of the view.\n   * @observable\n   * @api\n   */\n  setCenter(center) {\n    this.setCenterInternal(\n      center ? fromUserCoordinate(center, this.getProjection()) : center,\n    );\n  }\n\n  /**\n   * Set the center using the view projection (not the user projection).\n   * @param {import(\"./coordinate.js\").Coordinate|undefined} center The center of the view.\n   */\n  setCenterInternal(center) {\n    this.targetCenter_ = center;\n    this.applyTargetState_();\n  }\n\n  /**\n   * @param {import(\"./ViewHint.js\").default} hint Hint.\n   * @param {number} delta Delta.\n   * @return {number} New value.\n   */\n  setHint(hint, delta) {\n    this.hints_[hint] += delta;\n    this.changed();\n    return this.hints_[hint];\n  }\n\n  /**\n   * Set the resolution for this view. Any resolution constraint will apply.\n   * @param {number|undefined} resolution The resolution of the view.\n   * @observable\n   * @api\n   */\n  setResolution(resolution) {\n    this.targetResolution_ = resolution;\n    this.applyTargetState_();\n  }\n\n  /**\n   * Set the rotation for this view. Any rotation constraint will apply.\n   * @param {number} rotation The rotation of the view in radians.\n   * @observable\n   * @api\n   */\n  setRotation(rotation) {\n    this.targetRotation_ = rotation;\n    this.applyTargetState_();\n  }\n\n  /**\n   * Zoom to a specific zoom level. Any resolution constrain will apply.\n   * @param {number} zoom Zoom level.\n   * @api\n   */\n  setZoom(zoom) {\n    this.setResolution(this.getResolutionForZoom(zoom));\n  }\n\n  /**\n   * Recompute rotation/resolution/center based on target values.\n   * Note: we have to compute rotation first, then resolution and center considering that\n   * parameters can influence one another in case a view extent constraint is present.\n   * @param {boolean} [doNotCancelAnims] Do not cancel animations.\n   * @param {boolean} [forceMoving] Apply constraints as if the view is moving.\n   * @private\n   */\n  applyTargetState_(doNotCancelAnims, forceMoving) {\n    const isMoving =\n      this.getAnimating() || this.getInteracting() || forceMoving;\n\n    // compute rotation\n    const newRotation = this.constraints_.rotation(\n      this.targetRotation_,\n      isMoving,\n    );\n    const size = this.getViewportSize_(newRotation);\n    const newResolution = this.constraints_.resolution(\n      this.targetResolution_,\n      0,\n      size,\n      isMoving,\n    );\n    const newCenter = this.constraints_.center(\n      this.targetCenter_,\n      newResolution,\n      size,\n      isMoving,\n      this.calculateCenterShift(\n        this.targetCenter_,\n        newResolution,\n        newRotation,\n        size,\n      ),\n    );\n\n    if (this.get(ViewProperty.ROTATION) !== newRotation) {\n      this.set(ViewProperty.ROTATION, newRotation);\n    }\n    if (this.get(ViewProperty.RESOLUTION) !== newResolution) {\n      this.set(ViewProperty.RESOLUTION, newResolution);\n      this.set('zoom', this.getZoom(), true);\n    }\n    if (\n      !newCenter ||\n      !this.get(ViewProperty.CENTER) ||\n      !equals(this.get(ViewProperty.CENTER), newCenter)\n    ) {\n      this.set(ViewProperty.CENTER, newCenter);\n    }\n\n    if (this.getAnimating() && !doNotCancelAnims) {\n      this.cancelAnimations();\n    }\n    this.cancelAnchor_ = undefined;\n  }\n\n  /**\n   * If any constraints need to be applied, an animation will be triggered.\n   * This is typically done on interaction end.\n   * Note: calling this with a duration of 0 will apply the constrained values straight away,\n   * without animation.\n   * @param {number} [duration] The animation duration in ms.\n   * @param {number} [resolutionDirection] Which direction to zoom.\n   * @param {import(\"./coordinate.js\").Coordinate} [anchor] The origin of the transformation.\n   */\n  resolveConstraints(duration, resolutionDirection, anchor) {\n    duration = duration !== undefined ? duration : 200;\n    const direction = resolutionDirection || 0;\n\n    const newRotation = this.constraints_.rotation(this.targetRotation_);\n    const size = this.getViewportSize_(newRotation);\n    const newResolution = this.constraints_.resolution(\n      this.targetResolution_,\n      direction,\n      size,\n    );\n    const newCenter = this.constraints_.center(\n      this.targetCenter_,\n      newResolution,\n      size,\n      false,\n      this.calculateCenterShift(\n        this.targetCenter_,\n        newResolution,\n        newRotation,\n        size,\n      ),\n    );\n\n    if (duration === 0 && !this.cancelAnchor_) {\n      this.targetResolution_ = newResolution;\n      this.targetRotation_ = newRotation;\n      this.targetCenter_ = newCenter;\n      this.applyTargetState_();\n      return;\n    }\n\n    anchor = anchor || (duration === 0 ? this.cancelAnchor_ : undefined);\n    this.cancelAnchor_ = undefined;\n\n    if (\n      this.getResolution() !== newResolution ||\n      this.getRotation() !== newRotation ||\n      !this.getCenterInternal() ||\n      !equals(this.getCenterInternal(), newCenter)\n    ) {\n      if (this.getAnimating()) {\n        this.cancelAnimations();\n      }\n\n      this.animateInternal({\n        rotation: newRotation,\n        center: newCenter,\n        resolution: newResolution,\n        duration: duration,\n        easing: easeOut,\n        anchor: anchor,\n      });\n    }\n  }\n\n  /**\n   * Notify the View that an interaction has started.\n   * The view state will be resolved to a stable one if needed\n   * (depending on its constraints).\n   * @api\n   */\n  beginInteraction() {\n    this.resolveConstraints(0);\n\n    this.setHint(ViewHint.INTERACTING, 1);\n  }\n\n  /**\n   * Notify the View that an interaction has ended. The view state will be resolved\n   * to a stable one if needed (depending on its constraints).\n   * @param {number} [duration] Animation duration in ms.\n   * @param {number} [resolutionDirection] Which direction to zoom.\n   * @param {import(\"./coordinate.js\").Coordinate} [anchor] The origin of the transformation.\n   * @api\n   */\n  endInteraction(duration, resolutionDirection, anchor) {\n    anchor = anchor && fromUserCoordinate(anchor, this.getProjection());\n    this.endInteractionInternal(duration, resolutionDirection, anchor);\n  }\n\n  /**\n   * Notify the View that an interaction has ended. The view state will be resolved\n   * to a stable one if needed (depending on its constraints).\n   * @param {number} [duration] Animation duration in ms.\n   * @param {number} [resolutionDirection] Which direction to zoom.\n   * @param {import(\"./coordinate.js\").Coordinate} [anchor] The origin of the transformation.\n   */\n  endInteractionInternal(duration, resolutionDirection, anchor) {\n    if (!this.getInteracting()) {\n      return;\n    }\n    this.setHint(ViewHint.INTERACTING, -1);\n    this.resolveConstraints(duration, resolutionDirection, anchor);\n  }\n\n  /**\n   * Get a valid position for the view center according to the current constraints.\n   * @param {import(\"./coordinate.js\").Coordinate|undefined} targetCenter Target center position.\n   * @param {number} [targetResolution] Target resolution. If not supplied, the current one will be used.\n   * This is useful to guess a valid center position at a different zoom level.\n   * @return {import(\"./coordinate.js\").Coordinate|undefined} Valid center position.\n   */\n  getConstrainedCenter(targetCenter, targetResolution) {\n    const size = this.getViewportSize_(this.getRotation());\n    return this.constraints_.center(\n      targetCenter,\n      targetResolution || this.getResolution(),\n      size,\n    );\n  }\n\n  /**\n   * Get a valid zoom level according to the current view constraints.\n   * @param {number|undefined} targetZoom Target zoom.\n   * @param {number} [direction] Indicate which resolution should be used\n   * by a renderer if the view resolution does not match any resolution of the tile source.\n   * If 0, the nearest resolution will be used. If 1, the nearest lower resolution\n   * will be used. If -1, the nearest higher resolution will be used.\n   * @return {number|undefined} Valid zoom level.\n   */\n  getConstrainedZoom(targetZoom, direction) {\n    const targetRes = this.getResolutionForZoom(targetZoom);\n    return this.getZoomForResolution(\n      this.getConstrainedResolution(targetRes, direction),\n    );\n  }\n\n  /**\n   * Get a valid resolution according to the current view constraints.\n   * @param {number|undefined} targetResolution Target resolution.\n   * @param {number} [direction] Indicate which resolution should be used\n   * by a renderer if the view resolution does not match any resolution of the tile source.\n   * If 0, the nearest resolution will be used. If 1, the nearest lower resolution\n   * will be used. If -1, the nearest higher resolution will be used.\n   * @return {number|undefined} Valid resolution.\n   */\n  getConstrainedResolution(targetResolution, direction) {\n    direction = direction || 0;\n    const size = this.getViewportSize_(this.getRotation());\n\n    return this.constraints_.resolution(targetResolution, direction, size);\n  }\n}\n\n/**\n * @param {Function} callback Callback.\n * @param {*} returnValue Return value.\n */\nfunction animationCallback(callback, returnValue) {\n  setTimeout(function () {\n    callback(returnValue);\n  }, 0);\n}\n\n/**\n * @param {ViewOptions} options View options.\n * @return {import(\"./centerconstraint.js\").Type} The constraint.\n */\nexport function createCenterConstraint(options) {\n  if (options.extent !== undefined) {\n    const smooth =\n      options.smoothExtentConstraint !== undefined\n        ? options.smoothExtentConstraint\n        : true;\n    return createExtent(options.extent, options.constrainOnlyCenter, smooth);\n  }\n\n  const projection = createProjection(options.projection, 'EPSG:3857');\n  if (options.multiWorld !== true && projection.isGlobal()) {\n    const extent = projection.getExtent().slice();\n    extent[0] = -Infinity;\n    extent[2] = Infinity;\n    return createExtent(extent, false, false);\n  }\n\n  return centerNone;\n}\n\n/**\n * @param {ViewOptions} options View options.\n * @return {{constraint: import(\"./resolutionconstraint.js\").Type, maxResolution: number,\n *     minResolution: number, minZoom: number, zoomFactor: number}} The constraint.\n */\nexport function createResolutionConstraint(options) {\n  let resolutionConstraint;\n  let maxResolution;\n  let minResolution;\n\n  // TODO: move these to be ol constants\n  // see https://github.com/openlayers/openlayers/issues/2076\n  const defaultMaxZoom = 28;\n  const defaultZoomFactor = 2;\n\n  let minZoom =\n    options.minZoom !== undefined ? options.minZoom : DEFAULT_MIN_ZOOM;\n\n  let maxZoom =\n    options.maxZoom !== undefined ? options.maxZoom : defaultMaxZoom;\n\n  const zoomFactor =\n    options.zoomFactor !== undefined ? options.zoomFactor : defaultZoomFactor;\n\n  const multiWorld =\n    options.multiWorld !== undefined ? options.multiWorld : false;\n\n  const smooth =\n    options.smoothResolutionConstraint !== undefined\n      ? options.smoothResolutionConstraint\n      : true;\n\n  const showFullExtent =\n    options.showFullExtent !== undefined ? options.showFullExtent : false;\n\n  const projection = createProjection(options.projection, 'EPSG:3857');\n  const projExtent = projection.getExtent();\n  let constrainOnlyCenter = options.constrainOnlyCenter;\n  let extent = options.extent;\n  if (!multiWorld && !extent && projection.isGlobal()) {\n    constrainOnlyCenter = false;\n    extent = projExtent;\n  }\n\n  if (options.resolutions !== undefined) {\n    const resolutions = options.resolutions;\n    maxResolution = resolutions[minZoom];\n    minResolution =\n      resolutions[maxZoom] !== undefined\n        ? resolutions[maxZoom]\n        : resolutions[resolutions.length - 1];\n\n    if (options.constrainResolution) {\n      resolutionConstraint = createSnapToResolutions(\n        resolutions,\n        smooth,\n        !constrainOnlyCenter && extent,\n        showFullExtent,\n      );\n    } else {\n      resolutionConstraint = createMinMaxResolution(\n        maxResolution,\n        minResolution,\n        smooth,\n        !constrainOnlyCenter && extent,\n        showFullExtent,\n      );\n    }\n  } else {\n    // calculate the default min and max resolution\n    const size = !projExtent\n      ? // use an extent that can fit the whole world if need be\n        (360 * METERS_PER_UNIT.degrees) / projection.getMetersPerUnit()\n      : Math.max(getWidth(projExtent), getHeight(projExtent));\n\n    const defaultMaxResolution =\n      size / DEFAULT_TILE_SIZE / Math.pow(defaultZoomFactor, DEFAULT_MIN_ZOOM);\n\n    const defaultMinResolution =\n      defaultMaxResolution /\n      Math.pow(defaultZoomFactor, defaultMaxZoom - DEFAULT_MIN_ZOOM);\n\n    // user provided maxResolution takes precedence\n    maxResolution = options.maxResolution;\n    if (maxResolution !== undefined) {\n      minZoom = 0;\n    } else {\n      maxResolution = defaultMaxResolution / Math.pow(zoomFactor, minZoom);\n    }\n\n    // user provided minResolution takes precedence\n    minResolution = options.minResolution;\n    if (minResolution === undefined) {\n      if (options.maxZoom !== undefined) {\n        if (options.maxResolution !== undefined) {\n          minResolution = maxResolution / Math.pow(zoomFactor, maxZoom);\n        } else {\n          minResolution = defaultMaxResolution / Math.pow(zoomFactor, maxZoom);\n        }\n      } else {\n        minResolution = defaultMinResolution;\n      }\n    }\n\n    // given discrete zoom levels, minResolution may be different than provided\n    maxZoom =\n      minZoom +\n      Math.floor(\n        Math.log(maxResolution / minResolution) / Math.log(zoomFactor),\n      );\n    minResolution = maxResolution / Math.pow(zoomFactor, maxZoom - minZoom);\n\n    if (options.constrainResolution) {\n      resolutionConstraint = createSnapToPower(\n        zoomFactor,\n        maxResolution,\n        minResolution,\n        smooth,\n        !constrainOnlyCenter && extent,\n        showFullExtent,\n      );\n    } else {\n      resolutionConstraint = createMinMaxResolution(\n        maxResolution,\n        minResolution,\n        smooth,\n        !constrainOnlyCenter && extent,\n        showFullExtent,\n      );\n    }\n  }\n  return {\n    constraint: resolutionConstraint,\n    maxResolution: maxResolution,\n    minResolution: minResolution,\n    minZoom: minZoom,\n    zoomFactor: zoomFactor,\n  };\n}\n\n/**\n * @param {ViewOptions} options View options.\n * @return {import(\"./rotationconstraint.js\").Type} Rotation constraint.\n */\nexport function createRotationConstraint(options) {\n  const enableRotation =\n    options.enableRotation !== undefined ? options.enableRotation : true;\n  if (enableRotation) {\n    const constrainRotation = options.constrainRotation;\n    if (constrainRotation === undefined || constrainRotation === true) {\n      return createSnapToZero();\n    }\n    if (constrainRotation === false) {\n      return rotationNone;\n    }\n    if (typeof constrainRotation === 'number') {\n      return createSnapToN(constrainRotation);\n    }\n    return rotationNone;\n  }\n  return disable;\n}\n\n/**\n * Determine if an animation involves no view change.\n * @param {Animation} animation The animation.\n * @return {boolean} The animation involves no view change.\n */\nexport function isNoopAnimation(animation) {\n  if (animation.sourceCenter && animation.targetCenter) {\n    if (!coordinatesEqual(animation.sourceCenter, animation.targetCenter)) {\n      return false;\n    }\n  }\n  if (animation.sourceResolution !== animation.targetResolution) {\n    return false;\n  }\n  if (animation.sourceRotation !== animation.targetRotation) {\n    return false;\n  }\n  return true;\n}\n\n/**\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {import(\"./size.js\").Size} size Box pixel size.\n * @param {import(\"./pixel.js\").Pixel} position Position on the view to center on.\n * @param {number} resolution Resolution.\n * @param {number} rotation Rotation.\n * @return {import(\"./coordinate.js\").Coordinate} Shifted center.\n */\nfunction calculateCenterOn(coordinate, size, position, resolution, rotation) {\n  // calculate rotated position\n  const cosAngle = Math.cos(-rotation);\n  let sinAngle = Math.sin(-rotation);\n  let rotX = coordinate[0] * cosAngle - coordinate[1] * sinAngle;\n  let rotY = coordinate[1] * cosAngle + coordinate[0] * sinAngle;\n  rotX += (size[0] / 2 - position[0]) * resolution;\n  rotY += (position[1] - size[1] / 2) * resolution;\n\n  // go back to original angle\n  sinAngle = -sinAngle; // go back to original rotation\n  const centerX = rotX * cosAngle - rotY * sinAngle;\n  const centerY = rotY * cosAngle + rotX * sinAngle;\n\n  return [centerX, centerY];\n}\n\nexport default View;\n\n/**\n * @typedef {function(ViewOptions):ViewOptions} ViewTransform\n */\n\n/**\n * Adds higher resolutions.\n * @param {number} num The number of higher resolution levels to use.\n * @return {ViewTransform} A view transform.\n */\nexport function withHigherResolutions(num) {\n  return function (options) {\n    if (!options.resolutions) {\n      return options;\n    }\n    const resolutions = [...options.resolutions];\n    const highest = resolutions[resolutions.length - 1];\n    for (let i = 0; i < num; ++i) {\n      resolutions.push(highest / Math.pow(2, i + 1));\n    }\n    return {\n      ...options,\n      resolutions,\n    };\n  };\n}\n\n/**\n * Adds lower resolutions.\n * @param {number} num The number of lower resolution levels to use.\n * @return {ViewTransform} A view transform.\n * @api\n */\nexport function withLowerResolutions(num) {\n  return function (options) {\n    if (!options.resolutions) {\n      return options;\n    }\n    const resolutions = [...options.resolutions];\n    const lowest = resolutions[0];\n    for (let i = 0; i < num; ++i) {\n      resolutions.unshift(lowest * Math.pow(2, i + 1));\n    }\n    return {\n      ...options,\n      resolutions,\n    };\n  };\n}\n\n/**\n * Applies a center based on the extent.\n * @return {ViewTransform} A view transform.\n * @api\n */\nexport function withExtentCenter() {\n  return function (options) {\n    if (!options.extent) {\n      return options;\n    }\n    const center = getCenter(options.extent);\n    const newOptions = {...options, center};\n    delete newOptions.extent;\n    return newOptions;\n  };\n}\n\n/**\n * Applies a zoom level.\n * @param {number} z The zoom level.\n * @return {ViewTransform} A view transform.\n * @api\n */\nexport function withZoom(z) {\n  return function (options) {\n    return {...options, zoom: z};\n  };\n}\n\n/**\n * Applies a series of transforms to a view that is resolved from a source.\n * @param {import(\"./source/Source.js\").default} source The source.\n * @param {...ViewTransform} transforms The transforms to apply.\n * @return {Promise<ViewOptions>} The view options.\n * @api\n */\nexport async function getView(source, ...transforms) {\n  let config = await source.getView();\n  for (const transform of transforms) {\n    config = transform(config);\n  }\n  return config;\n}\n", "/**\n * @module ol/layer/Property\n */\n\n/**\n * @enum {string}\n */\nexport default {\n  OPACITY: 'opacity',\n  VISIBLE: 'visible',\n  EXTENT: 'extent',\n  Z_INDEX: 'zIndex',\n  MAX_RESOLUTION: 'maxResolution',\n  MIN_RESOLUTION: 'minResolution',\n  MAX_ZOOM: 'maxZoom',\n  MIN_ZOOM: 'minZoom',\n  SOURCE: 'source',\n  MAP: 'map',\n};\n", "/**\n * @module ol/layer/Base\n */\nimport BaseObject from '../Object.js';\nimport {assert} from '../asserts.js';\nimport {clamp} from '../math.js';\nimport {abstract} from '../util.js';\nimport LayerProperty from './Property.js';\n\n/**\n * A css color, or a function called with a view resolution returning a css color.\n *\n * @typedef {string|function(number):string} BackgroundColor\n * @api\n */\n\n/**\n * @typedef {import(\"../ObjectEventType.js\").Types|'change:extent'|'change:maxResolution'|'change:maxZoom'|\n *    'change:minResolution'|'change:minZoom'|'change:opacity'|'change:visible'|'change:zIndex'} BaseLayerObjectEventTypes\n */\n\n/***\n * @template Return\n * @typedef {import(\"../Observable.js\").OnSignature<import(\"../Observable.js\").EventTypes, import(\"../events/Event.js\").default, Return> &\n *   import(\"../Observable.js\").OnSignature<BaseLayerObjectEventTypes, import(\"../Object.js\").ObjectEvent, Return> &\n *   import(\"../Observable.js\").CombinedOnSignature<import(\"../Observable.js\").EventTypes|BaseLayerObjectEventTypes, Return>} BaseLayerOnSignature\n */\n\n/**\n * @template {Object<string, *>} [Properties=Object<string, *>]\n * @typedef {Object} Options\n * @property {string} [className='ol-layer'] A CSS class name to set to the layer element.\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering.  The layer will not be\n * rendered outside of this extent.\n * @property {number | undefined} [zIndex] The z-index for layer rendering.  At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {BackgroundColor} [background] Background color for the layer. If not specified, no background\n * will be rendered.\n * @property {Properties} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.\n */\n\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Note that with {@link module:ol/layer/Base~BaseLayer} and all its subclasses, any property set in\n * the options is set as a {@link module:ol/Object~BaseObject} property on the layer object, so\n * is observable, and has get/set accessors.\n *\n * @api\n * @template {Object<string, *>} [Properties=Object<string, *>]\n * @extends {BaseObject<NoInfer<Properties> & Object<string, *>>}\n */\nclass BaseLayer extends BaseObject {\n  /**\n   * @param {Options<NoInfer<Properties>>} options Layer options.\n   */\n  constructor(options) {\n    super();\n\n    /***\n     * @type {BaseLayerOnSignature<import(\"../events.js\").EventsKey>}\n     */\n    this.on;\n\n    /***\n     * @type {BaseLayerOnSignature<import(\"../events.js\").EventsKey>}\n     */\n    this.once;\n\n    /***\n     * @type {BaseLayerOnSignature<void>}\n     */\n    this.un;\n\n    /**\n     * @type {BackgroundColor|false}\n     * @private\n     */\n    this.background_ = options.background;\n\n    /**\n     * @type {?}\n     */\n    const properties = Object.assign({}, options);\n    if (typeof options.properties === 'object') {\n      delete properties.properties;\n      Object.assign(properties, options.properties);\n    }\n\n    properties[LayerProperty.OPACITY] =\n      options.opacity !== undefined ? options.opacity : 1;\n    assert(\n      typeof properties[LayerProperty.OPACITY] === 'number',\n      'Layer opacity must be a number',\n    );\n\n    properties[LayerProperty.VISIBLE] =\n      options.visible !== undefined ? options.visible : true;\n    properties[LayerProperty.Z_INDEX] = options.zIndex;\n    properties[LayerProperty.MAX_RESOLUTION] =\n      options.maxResolution !== undefined ? options.maxResolution : Infinity;\n    properties[LayerProperty.MIN_RESOLUTION] =\n      options.minResolution !== undefined ? options.minResolution : 0;\n    properties[LayerProperty.MIN_ZOOM] =\n      options.minZoom !== undefined ? options.minZoom : -Infinity;\n    properties[LayerProperty.MAX_ZOOM] =\n      options.maxZoom !== undefined ? options.maxZoom : Infinity;\n\n    /**\n     * @type {string}\n     * @private\n     */\n    this.className_ =\n      properties.className !== undefined ? properties.className : 'ol-layer';\n    delete properties.className;\n\n    this.setProperties(properties);\n\n    /**\n     * @type {import(\"./Layer.js\").State}\n     * @private\n     */\n    this.state_ = null;\n  }\n\n  /**\n   * Get the background for this layer.\n   * @return {BackgroundColor|false} Layer background.\n   */\n  getBackground() {\n    return this.background_;\n  }\n\n  /**\n   * @return {string} CSS class name.\n   */\n  getClassName() {\n    return this.className_;\n  }\n\n  /**\n   * This method is not meant to be called by layers or layer renderers because the state\n   * is incorrect if the layer is included in a layer group.\n   *\n   * @param {boolean} [managed] Layer is managed.\n   * @return {import(\"./Layer.js\").State} Layer state.\n   */\n  getLayerState(managed) {\n    /** @type {import(\"./Layer.js\").State} */\n    const state =\n      this.state_ ||\n      /** @type {?} */ ({\n        layer: this,\n        managed: managed === undefined ? true : managed,\n      });\n    const zIndex = this.getZIndex();\n    state.opacity = clamp(Math.round(this.getOpacity() * 100) / 100, 0, 1);\n    state.visible = this.getVisible();\n    state.extent = this.getExtent();\n    state.zIndex = zIndex === undefined && !state.managed ? Infinity : zIndex;\n    state.maxResolution = this.getMaxResolution();\n    state.minResolution = Math.max(this.getMinResolution(), 0);\n    state.minZoom = this.getMinZoom();\n    state.maxZoom = this.getMaxZoom();\n    this.state_ = state;\n\n    return state;\n  }\n\n  /**\n   * @abstract\n   * @param {Array<import(\"./Layer.js\").default>} [array] Array of layers (to be\n   *     modified in place).\n   * @return {Array<import(\"./Layer.js\").default>} Array of layers.\n   */\n  getLayersArray(array) {\n    return abstract();\n  }\n\n  /**\n   * @abstract\n   * @param {Array<import(\"./Layer.js\").State>} [states] Optional list of layer\n   *     states (to be modified in place).\n   * @return {Array<import(\"./Layer.js\").State>} List of layer states.\n   */\n  getLayerStatesArray(states) {\n    return abstract();\n  }\n\n  /**\n   * Return the {@link module:ol/extent~Extent extent} of the layer or `undefined` if it\n   * will be visible regardless of extent.\n   * @return {import(\"../extent.js\").Extent|undefined} The layer extent.\n   * @observable\n   * @api\n   */\n  getExtent() {\n    return /** @type {import(\"../extent.js\").Extent|undefined} */ (\n      this.get(LayerProperty.EXTENT)\n    );\n  }\n\n  /**\n   * Return the maximum resolution of the layer. Returns Infinity if\n   * the layer has no maximum resolution set.\n   * @return {number} The maximum resolution of the layer.\n   * @observable\n   * @api\n   */\n  getMaxResolution() {\n    return /** @type {number} */ (this.get(LayerProperty.MAX_RESOLUTION));\n  }\n\n  /**\n   * Return the minimum resolution of the layer. Returns 0 if\n   * the layer has no minimum resolution set.\n   * @return {number} The minimum resolution of the layer.\n   * @observable\n   * @api\n   */\n  getMinResolution() {\n    return /** @type {number} */ (this.get(LayerProperty.MIN_RESOLUTION));\n  }\n\n  /**\n   * Return the minimum zoom level of the layer. Returns -Infinity if\n   * the layer has no minimum zoom set.\n   * @return {number} The minimum zoom level of the layer.\n   * @observable\n   * @api\n   */\n  getMinZoom() {\n    return /** @type {number} */ (this.get(LayerProperty.MIN_ZOOM));\n  }\n\n  /**\n   * Return the maximum zoom level of the layer. Returns Infinity if\n   * the layer has no maximum zoom set.\n   * @return {number} The maximum zoom level of the layer.\n   * @observable\n   * @api\n   */\n  getMaxZoom() {\n    return /** @type {number} */ (this.get(LayerProperty.MAX_ZOOM));\n  }\n\n  /**\n   * Return the opacity of the layer (between 0 and 1).\n   * @return {number} The opacity of the layer.\n   * @observable\n   * @api\n   */\n  getOpacity() {\n    return /** @type {number} */ (this.get(LayerProperty.OPACITY));\n  }\n\n  /**\n   * @abstract\n   * @return {import(\"../source/Source.js\").State} Source state.\n   */\n  getSourceState() {\n    return abstract();\n  }\n\n  /**\n   * Return the value of this layer's `visible` property. To find out whether the layer\n   * is visible on a map, use `isVisible()` instead.\n   * @return {boolean} The value of the `visible` property of the layer.\n   * @observable\n   * @api\n   */\n  getVisible() {\n    return /** @type {boolean} */ (this.get(LayerProperty.VISIBLE));\n  }\n\n  /**\n   * Return the Z-index of the layer, which is used to order layers before\n   * rendering. Returns undefined if the layer is unmanaged.\n   * @return {number|undefined} The Z-index of the layer.\n   * @observable\n   * @api\n   */\n  getZIndex() {\n    return /** @type {number|undefined} */ (this.get(LayerProperty.Z_INDEX));\n  }\n\n  /**\n   * Sets the background color.\n   * @param {BackgroundColor} [background] Background color.\n   */\n  setBackground(background) {\n    this.background_ = background;\n    this.changed();\n  }\n\n  /**\n   * Set the extent at which the layer is visible.  If `undefined`, the layer\n   * will be visible at all extents.\n   * @param {import(\"../extent.js\").Extent|undefined} extent The extent of the layer.\n   * @observable\n   * @api\n   */\n  setExtent(extent) {\n    this.set(LayerProperty.EXTENT, extent);\n  }\n\n  /**\n   * Set the maximum resolution at which the layer is visible.\n   * @param {number} maxResolution The maximum resolution of the layer.\n   * @observable\n   * @api\n   */\n  setMaxResolution(maxResolution) {\n    this.set(LayerProperty.MAX_RESOLUTION, maxResolution);\n  }\n\n  /**\n   * Set the minimum resolution at which the layer is visible.\n   * @param {number} minResolution The minimum resolution of the layer.\n   * @observable\n   * @api\n   */\n  setMinResolution(minResolution) {\n    this.set(LayerProperty.MIN_RESOLUTION, minResolution);\n  }\n\n  /**\n   * Set the maximum zoom (exclusive) at which the layer is visible.\n   * Note that the zoom levels for layer visibility are based on the\n   * view zoom level, which may be different from a tile source zoom level.\n   * @param {number} maxZoom The maximum zoom of the layer.\n   * @observable\n   * @api\n   */\n  setMaxZoom(maxZoom) {\n    this.set(LayerProperty.MAX_ZOOM, maxZoom);\n  }\n\n  /**\n   * Set the minimum zoom (inclusive) at which the layer is visible.\n   * Note that the zoom levels for layer visibility are based on the\n   * view zoom level, which may be different from a tile source zoom level.\n   * @param {number} minZoom The minimum zoom of the layer.\n   * @observable\n   * @api\n   */\n  setMinZoom(minZoom) {\n    this.set(LayerProperty.MIN_ZOOM, minZoom);\n  }\n\n  /**\n   * Set the opacity of the layer, allowed values range from 0 to 1.\n   * @param {number} opacity The opacity of the layer.\n   * @observable\n   * @api\n   */\n  setOpacity(opacity) {\n    assert(typeof opacity === 'number', 'Layer opacity must be a number');\n    this.set(LayerProperty.OPACITY, opacity);\n  }\n\n  /**\n   * Set the visibility of the layer (`true` or `false`).\n   * @param {boolean} visible The visibility of the layer.\n   * @observable\n   * @api\n   */\n  setVisible(visible) {\n    this.set(LayerProperty.VISIBLE, visible);\n  }\n\n  /**\n   * Set Z-index of the layer, which is used to order layers before rendering.\n   * The default Z-index is 0.\n   * @param {number} zindex The z-index of the layer.\n   * @observable\n   * @api\n   */\n  setZIndex(zindex) {\n    this.set(LayerProperty.Z_INDEX, zindex);\n  }\n\n  /**\n   * Clean up.\n   * @override\n   */\n  disposeInternal() {\n    if (this.state_) {\n      this.state_.layer = null;\n      this.state_ = null;\n    }\n    super.disposeInternal();\n  }\n}\n\nexport default BaseLayer;\n", "/**\n * @module ol/layer/Layer\n */\nimport View from '../View.js';\nimport {assert} from '../asserts.js';\nimport {listen, unlistenByKey} from '../events.js';\nimport EventType from '../events/EventType.js';\nimport {intersects} from '../extent.js';\nimport RenderEventType from '../render/EventType.js';\nimport BaseLayer from './Base.js';\nimport LayerProperty from './Property.js';\n\n/**\n * @typedef {function(import(\"../Map.js\").FrameState):HTMLElement} RenderFunction\n */\n\n/**\n * @typedef {'sourceready'|'change:source'} LayerEventType\n */\n\n/***\n * @template Return\n * @typedef {import(\"../Observable.js\").OnSignature<import(\"../Observable.js\").EventTypes, import(\"../events/Event.js\").default, Return> &\n *   import(\"../Observable.js\").OnSignature<import(\"./Base.js\").BaseLayerObjectEventTypes|\n *     LayerEventType, import(\"../Object.js\").ObjectEvent, Return> &\n *   import(\"../Observable.js\").OnSignature<import(\"../render/EventType.js\").LayerRenderEventTypes, import(\"../render/Event.js\").default, Return> &\n *   import(\"../Observable.js\").CombinedOnSignature<import(\"../Observable.js\").EventTypes|import(\"./Base.js\").BaseLayerObjectEventTypes|LayerEventType|\n *     import(\"../render/EventType.js\").LayerRenderEventTypes, Return>} LayerOnSignature\n */\n\n/**\n * @template {import(\"../source/Source.js\").default} [SourceType=import(\"../source/Source.js\").default]\n * @template {Object<string, *>} [Properties=Object<string, *>]\n * @typedef {Object} Options\n * @property {string} [className='ol-layer'] A CSS class name to set to the layer element.\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering.  The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering.  At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {SourceType} [source] Source for this layer.  If not provided to the constructor,\n * the source can be set by calling {@link module:ol/layer/Layer~Layer#setSource layer.setSource(source)} after\n * construction.\n * @property {import(\"../Map.js\").default|null} [map] Map.\n * @property {RenderFunction} [render] Render function. Takes the frame state as input and is expected to return an\n * HTML element. Will overwrite the default rendering for the layer.\n * @property {import(\"./Base.js\").BackgroundColor} [background] Background color for the layer. If not specified, no background\n * will be rendered.\n * @property {Properties} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.\n */\n\n/**\n * @typedef {Object} State\n * @property {import(\"./Layer.js\").default} layer Layer.\n * @property {number} opacity Opacity, the value is rounded to two digits to appear after the decimal point.\n * @property {boolean} visible Visible.\n * @property {boolean} managed Managed.\n * @property {import(\"../extent.js\").Extent} [extent] Extent.\n * @property {number} zIndex ZIndex.\n * @property {number} maxResolution Maximum resolution.\n * @property {number} minResolution Minimum resolution.\n * @property {number} minZoom Minimum zoom.\n * @property {number} maxZoom Maximum zoom.\n */\n\n/**\n * @classdesc\n * Base class from which all layer types are derived. This should only be instantiated\n * in the case where a custom layer is added to the map with a custom `render` function.\n * Such a function can be specified in the `options` object, and is expected to return an HTML element.\n *\n * A visual representation of raster or vector map data.\n * Layers group together those properties that pertain to how the data is to be\n * displayed, irrespective of the source of that data.\n *\n * Layers are usually added to a map with [map.addLayer()]{@link import(\"../Map.js\").default#addLayer}.\n * Components like {@link module:ol/interaction/Draw~Draw} use unmanaged layers\n * internally. These unmanaged layers are associated with the map using\n * [layer.setMap()]{@link module:ol/layer/Layer~Layer#setMap} instead.\n *\n * A generic `change` event is fired when the state of the source changes.\n * A `sourceready` event is fired when the layer's source is ready.\n *\n * @fires import(\"../render/Event.js\").RenderEvent#prerender\n * @fires import(\"../render/Event.js\").RenderEvent#postrender\n * @fires import(\"../events/Event.js\").BaseEvent#sourceready\n *\n * @template {import(\"../source/Source.js\").default} [SourceType=import(\"../source/Source.js\").default]\n * @template {import(\"../renderer/Layer.js\").default} [RendererType=import(\"../renderer/Layer.js\").default]\n * @template {Object<string, *>} [Properties=Object<string, *>]\n * @extends {BaseLayer<NoInfer<Properties>>}\n * @api\n */\nclass Layer extends BaseLayer {\n  /**\n   * @param {Options<SourceType, NoInfer<Properties>>} options Layer options.\n   */\n  constructor(options) {\n    const baseOptions = Object.assign({}, options);\n    delete baseOptions.source;\n\n    super(baseOptions);\n\n    /***\n     * @type {LayerOnSignature<import(\"../events.js\").EventsKey>}\n     */\n    this.on;\n\n    /***\n     * @type {LayerOnSignature<import(\"../events.js\").EventsKey>}\n     */\n    this.once;\n\n    /***\n     * @type {LayerOnSignature<void>}\n     */\n    this.un;\n\n    /**\n     * @private\n     * @type {?import(\"../events.js\").EventsKey}\n     */\n    this.mapPrecomposeKey_ = null;\n\n    /**\n     * @private\n     * @type {?import(\"../events.js\").EventsKey}\n     */\n    this.mapRenderKey_ = null;\n\n    /**\n     * @private\n     * @type {?import(\"../events.js\").EventsKey}\n     */\n    this.sourceChangeKey_ = null;\n\n    /**\n     * @private\n     * @type {RendererType}\n     */\n    this.renderer_ = null;\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.sourceReady_ = false;\n\n    /**\n     * @protected\n     * @type {boolean}\n     */\n    this.rendered = false;\n\n    // Overwrite default render method with a custom one\n    if (options.render) {\n      this.render = options.render;\n    }\n\n    if (options.map) {\n      this.setMap(options.map);\n    }\n\n    this.addChangeListener(\n      LayerProperty.SOURCE,\n      this.handleSourcePropertyChange_,\n    );\n\n    const source = options.source\n      ? /** @type {SourceType} */ (options.source)\n      : null;\n    this.setSource(source);\n  }\n\n  /**\n   * @param {Array<import(\"./Layer.js\").default>} [array] Array of layers (to be modified in place).\n   * @return {Array<import(\"./Layer.js\").default>} Array of layers.\n   * @override\n   */\n  getLayersArray(array) {\n    array = array ? array : [];\n    array.push(this);\n    return array;\n  }\n\n  /**\n   * @param {Array<import(\"./Layer.js\").State>} [states] Optional list of layer states (to be modified in place).\n   * @return {Array<import(\"./Layer.js\").State>} List of layer states.\n   * @override\n   */\n  getLayerStatesArray(states) {\n    states = states ? states : [];\n    states.push(this.getLayerState());\n    return states;\n  }\n\n  /**\n   * Get the layer source.\n   * @return {SourceType|null} The layer source (or `null` if not yet set).\n   * @observable\n   * @api\n   */\n  getSource() {\n    return /** @type {SourceType} */ (this.get(LayerProperty.SOURCE)) || null;\n  }\n\n  /**\n   * @return {SourceType|null} The source being rendered.\n   */\n  getRenderSource() {\n    return this.getSource();\n  }\n\n  /**\n   * @return {import(\"../source/Source.js\").State} Source state.\n   * @override\n   */\n  getSourceState() {\n    const source = this.getSource();\n    return !source ? 'undefined' : source.getState();\n  }\n\n  /**\n   * @private\n   */\n  handleSourceChange_() {\n    this.changed();\n    if (this.sourceReady_ || this.getSource().getState() !== 'ready') {\n      return;\n    }\n    this.sourceReady_ = true;\n    this.dispatchEvent('sourceready');\n  }\n\n  /**\n   * @private\n   */\n  handleSourcePropertyChange_() {\n    if (this.sourceChangeKey_) {\n      unlistenByKey(this.sourceChangeKey_);\n      this.sourceChangeKey_ = null;\n    }\n    this.sourceReady_ = false;\n    const source = this.getSource();\n    if (source) {\n      this.sourceChangeKey_ = listen(\n        source,\n        EventType.CHANGE,\n        this.handleSourceChange_,\n        this,\n      );\n      if (source.getState() === 'ready') {\n        this.sourceReady_ = true;\n        setTimeout(() => {\n          this.dispatchEvent('sourceready');\n        }, 0);\n      }\n    }\n    this.changed();\n  }\n\n  /**\n   * @param {import(\"../pixel.js\").Pixel} pixel Pixel.\n   * @return {Promise<Array<import(\"../Feature.js\").FeatureLike>>} Promise that resolves with\n   * an array of features.\n   */\n  getFeatures(pixel) {\n    if (!this.renderer_) {\n      return Promise.resolve([]);\n    }\n    return this.renderer_.getFeatures(pixel);\n  }\n\n  /**\n   * @param {import(\"../pixel.js\").Pixel} pixel Pixel.\n   * @return {Uint8ClampedArray|Uint8Array|Float32Array|DataView|null} Pixel data.\n   */\n  getData(pixel) {\n    if (!this.renderer_ || !this.rendered) {\n      return null;\n    }\n    return this.renderer_.getData(pixel);\n  }\n\n  /**\n   * The layer is visible on the map view, i.e. within its min/max resolution or zoom and\n   * extent, not set to `visible: false`, and not inside a layer group that is set\n   * to `visible: false`.\n   * @param {View|import(\"../View.js\").ViewStateLayerStateExtent} [view] View or {@link import(\"../Map.js\").FrameState}.\n   * Only required when the layer is not added to a map.\n   * @return {boolean} The layer is visible in the map view.\n   * @api\n   */\n  isVisible(view) {\n    let frameState;\n    const map = this.getMapInternal();\n    if (!view && map) {\n      view = map.getView();\n    }\n    if (view instanceof View) {\n      frameState = {\n        viewState: view.getState(),\n        extent: view.calculateExtent(),\n      };\n    } else {\n      frameState = view;\n    }\n    if (!frameState.layerStatesArray && map) {\n      frameState.layerStatesArray = map.getLayerGroup().getLayerStatesArray();\n    }\n    let layerState;\n    if (frameState.layerStatesArray) {\n      layerState = frameState.layerStatesArray.find(\n        (layerState) => layerState.layer === this,\n      );\n      if (!layerState) {\n        return false;\n      }\n    } else {\n      layerState = this.getLayerState();\n    }\n\n    const layerExtent = this.getExtent();\n\n    return (\n      inView(layerState, frameState.viewState) &&\n      (!layerExtent || intersects(layerExtent, frameState.extent))\n    );\n  }\n\n  /**\n   * Get the attributions of the source of this layer for the given view.\n   * @param {View|import(\"../View.js\").ViewStateLayerStateExtent} [view] View or {@link import(\"../Map.js\").FrameState}.\n   * Only required when the layer is not added to a map.\n   * @return {Array<string>} Attributions for this layer at the given view.\n   * @api\n   */\n  getAttributions(view) {\n    if (!this.isVisible(view)) {\n      return [];\n    }\n    const getAttributions = this.getSource()?.getAttributions();\n    if (!getAttributions) {\n      return [];\n    }\n    const frameState =\n      view instanceof View ? view.getViewStateAndExtent() : view;\n    let attributions = getAttributions(frameState);\n    if (!Array.isArray(attributions)) {\n      attributions = [attributions];\n    }\n    return attributions;\n  }\n\n  /**\n   * In charge to manage the rendering of the layer. One layer type is\n   * bounded with one layer renderer.\n   * @param {?import(\"../Map.js\").FrameState} frameState Frame state.\n   * @param {HTMLElement} target Target which the renderer may (but need not) use\n   * for rendering its content.\n   * @return {HTMLElement|null} The rendered element.\n   */\n  render(frameState, target) {\n    const layerRenderer = this.getRenderer();\n\n    if (layerRenderer.prepareFrame(frameState)) {\n      this.rendered = true;\n      return layerRenderer.renderFrame(frameState, target);\n    }\n    return null;\n  }\n\n  /**\n   * Called when a layer is not visible during a map render.\n   */\n  unrender() {\n    this.rendered = false;\n  }\n\n  /** @return {string} Declutter */\n  getDeclutter() {\n    return undefined;\n  }\n\n  /**\n   * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n   * @param {import(\"../layer/Layer.js\").State} layerState Layer state.\n   */\n  renderDeclutter(frameState, layerState) {}\n\n  /**\n   * When the renderer follows a layout -> render approach, do the final rendering here.\n   * @param {import('../Map.js').FrameState} frameState Frame state\n   */\n  renderDeferred(frameState) {\n    const layerRenderer = this.getRenderer();\n    if (!layerRenderer) {\n      return;\n    }\n    layerRenderer.renderDeferred(frameState);\n  }\n\n  /**\n   * For use inside the library only.\n   * @param {import(\"../Map.js\").default|null} map Map.\n   */\n  setMapInternal(map) {\n    if (!map) {\n      this.unrender();\n    }\n    this.set(LayerProperty.MAP, map);\n  }\n\n  /**\n   * For use inside the library only.\n   * @return {import(\"../Map.js\").default|null} Map.\n   */\n  getMapInternal() {\n    return this.get(LayerProperty.MAP);\n  }\n\n  /**\n   * Sets the layer to be rendered on top of other layers on a map. The map will\n   * not manage this layer in its layers collection. This\n   * is useful for temporary layers. To remove an unmanaged layer from the map,\n   * use `#setMap(null)`.\n   *\n   * To add the layer to a map and have it managed by the map, use\n   * {@link module:ol/Map~Map#addLayer} instead.\n   * @param {import(\"../Map.js\").default|null} map Map.\n   * @api\n   */\n  setMap(map) {\n    if (this.mapPrecomposeKey_) {\n      unlistenByKey(this.mapPrecomposeKey_);\n      this.mapPrecomposeKey_ = null;\n    }\n    if (!map) {\n      this.changed();\n    }\n    if (this.mapRenderKey_) {\n      unlistenByKey(this.mapRenderKey_);\n      this.mapRenderKey_ = null;\n    }\n    if (map) {\n      this.mapPrecomposeKey_ = listen(\n        map,\n        RenderEventType.PRECOMPOSE,\n        this.handlePrecompose_,\n        this,\n      );\n      this.mapRenderKey_ = listen(this, EventType.CHANGE, map.render, map);\n      this.changed();\n    }\n  }\n\n  /**\n   * @param {import(\"../events/Event.js\").default} renderEvent Render event\n   * @private\n   */\n  handlePrecompose_(renderEvent) {\n    const layerStatesArray =\n      /** @type {import(\"../render/Event.js\").default} */ (renderEvent)\n        .frameState.layerStatesArray;\n    const layerState = this.getLayerState(false);\n    assert(\n      !layerStatesArray.some(\n        (arrayLayerState) => arrayLayerState.layer === layerState.layer,\n      ),\n      'A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both.',\n    );\n    layerStatesArray.push(layerState);\n  }\n\n  /**\n   * Set the layer source.\n   * @param {SourceType|null} source The layer source.\n   * @observable\n   * @api\n   */\n  setSource(source) {\n    this.set(LayerProperty.SOURCE, source);\n  }\n\n  /**\n   * Get the renderer for this layer.\n   * @return {RendererType|null} The layer renderer.\n   */\n  getRenderer() {\n    if (!this.renderer_) {\n      this.renderer_ = this.createRenderer();\n    }\n    return this.renderer_;\n  }\n\n  /**\n   * @return {boolean} The layer has a renderer.\n   */\n  hasRenderer() {\n    return !!this.renderer_;\n  }\n\n  /**\n   * Create a renderer for this layer.\n   * @return {RendererType} A layer renderer.\n   * @protected\n   */\n  createRenderer() {\n    return null;\n  }\n\n  /**\n   * This will clear the renderer so that a new one can be created next time it is needed\n   */\n  clearRenderer() {\n    if (this.renderer_) {\n      this.renderer_.dispose();\n      delete this.renderer_;\n    }\n  }\n\n  /**\n   * Clean up.\n   * @override\n   */\n  disposeInternal() {\n    this.clearRenderer();\n    this.setSource(null);\n    super.disposeInternal();\n  }\n}\n\n/**\n * Return `true` if the layer is visible and if the provided view state\n * has resolution and zoom levels that are in range of the layer's min/max.\n * @param {State} layerState Layer state.\n * @param {import(\"../View.js\").State} viewState View state.\n * @return {boolean} The layer is visible at the given view state.\n */\nexport function inView(layerState, viewState) {\n  if (!layerState.visible) {\n    return false;\n  }\n  const resolution = viewState.resolution;\n  if (\n    resolution < layerState.minResolution ||\n    resolution >= layerState.maxResolution\n  ) {\n    return false;\n  }\n  const zoom = viewState.zoom;\n  return zoom > layerState.minZoom && zoom <= layerState.maxZoom;\n}\n\nexport default Layer;\n", "/**\n * @module ol/layer/BaseVector\n */\nimport RBush from 'rbush';\nimport {flatStyleLikeToStyleFunction} from '../render/canvas/style.js';\nimport Style, {\n  createDefaultStyle,\n  toFunction as toStyleFunction,\n} from '../style/Style.js';\nimport Layer from './Layer.js';\n\n/***\n * @template T\n * @typedef {T extends import(\"../source/Vector.js\").default<infer U extends import(\"../Feature.js\").FeatureLike> ? U : never} ExtractedFeatureType\n */\n\n/**\n * @template {import('../Feature.js').FeatureLike} FeatureType\n * @template {import(\"../source/Vector.js\").default<FeatureType>|import(\"../source/VectorTile.js\").default<FeatureType>} VectorSourceType<FeatureType>\n * @typedef {Object} Options\n * @property {string} [className='ol-layer'] A CSS class name to set to the layer element.\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering.  The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering.  At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {import(\"../render.js\").OrderFunction} [renderOrder] Render order. Function to be used when sorting\n * features before rendering. By default features are drawn in the order that they are created. Use\n * `null` to avoid the sort, but get an undefined draw order.\n * @property {number} [renderBuffer=100] The buffer in pixels around the viewport extent used by the\n * renderer when getting features from the vector source for the rendering or hit-detection.\n * Recommended value: the size of the largest symbol, line width or label.\n * @property {VectorSourceType} [source] Source.\n * @property {import(\"../Map.js\").default} [map] Sets the layer as overlay on a map. The map will not manage\n * this layer in its layers collection, and the layer will be rendered on top. This is useful for\n * temporary layers. The standard way to add a layer to a map and have it managed by the map is to\n * use [map.addLayer()]{@link import(\"../Map.js\").default#addLayer}.\n * @property {boolean|string|number} [declutter=false] Declutter images and text. Any truthy value will enable\n * decluttering. Within a layer, a feature rendered before another has higher priority. All layers with the\n * same `declutter` value will be decluttered together. The priority is determined by the drawing order of the\n * layers with the same `declutter` value. Higher in the layer stack means higher priority. To declutter distinct\n * layers or groups of layers separately, use different truthy values for `declutter`.\n * @property {import(\"../style/Style.js\").StyleLike|import(\"../style/flat.js\").FlatStyleLike|null} [style] Layer style. When set to `null`, only\n * features that have their own style will be rendered. See {@link module:ol/style/Style~Style} for the default style\n * which will be used if this is not set.\n * @property {import(\"./Base.js\").BackgroundColor} [background] Background color for the layer. If not specified, no background\n * will be rendered.\n * @property {boolean} [updateWhileAnimating=false] When set to `true`, feature batches will\n * be recreated during animations. This means that no vectors will be shown clipped, but the\n * setting will have a performance impact for large amounts of vector data. When set to `false`,\n * batches will be recreated when no animation is active.\n * @property {boolean} [updateWhileInteracting=false] When set to `true`, feature batches will\n * be recreated during interactions. See also `updateWhileAnimating`.\n * @property {Object<string, *>} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.\n */\n\n/**\n * @enum {string}\n * @private\n */\nconst Property = {\n  RENDER_ORDER: 'renderOrder',\n};\n\n/**\n * @classdesc\n * Vector data that is rendered client-side.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @template {import('../Feature.js').FeatureLike} FeatureType\n * @template {import(\"../source/Vector.js\").default<FeatureType>|import(\"../source/VectorTile.js\").default<FeatureType>} VectorSourceType<FeatureType>\n * @extends {Layer<VectorSourceType, RendererType>}\n * @template {import(\"../renderer/canvas/VectorLayer.js\").default|import(\"../renderer/canvas/VectorTileLayer.js\").default|import(\"../renderer/canvas/VectorImageLayer.js\").default|import(\"../renderer/webgl/VectorLayer.js\").default|import(\"../renderer/webgl/PointsLayer.js\").default} RendererType\n * @api\n */\nclass BaseVectorLayer extends Layer {\n  /**\n   * @param {Options<FeatureType, VectorSourceType>} [options] Options.\n   */\n  constructor(options) {\n    options = options ? options : {};\n\n    const baseOptions = Object.assign({}, options);\n\n    delete baseOptions.style;\n    delete baseOptions.renderBuffer;\n    delete baseOptions.updateWhileAnimating;\n    delete baseOptions.updateWhileInteracting;\n    super(baseOptions);\n\n    /**\n     * @private\n     * @type {string}\n     */\n    this.declutter_ = options.declutter ? String(options.declutter) : undefined;\n\n    /**\n     * @type {number}\n     * @private\n     */\n    this.renderBuffer_ =\n      options.renderBuffer !== undefined ? options.renderBuffer : 100;\n\n    /**\n     * User provided style.\n     * @type {import(\"../style/Style.js\").StyleLike|import(\"../style/flat.js\").FlatStyleLike}\n     * @private\n     */\n    this.style_ = null;\n\n    /**\n     * Style function for use within the library.\n     * @type {import(\"../style/Style.js\").StyleFunction|undefined}\n     * @private\n     */\n    this.styleFunction_ = undefined;\n\n    this.setStyle(options.style);\n\n    /**\n     * @type {boolean}\n     * @private\n     */\n    this.updateWhileAnimating_ =\n      options.updateWhileAnimating !== undefined\n        ? options.updateWhileAnimating\n        : false;\n\n    /**\n     * @type {boolean}\n     * @private\n     */\n    this.updateWhileInteracting_ =\n      options.updateWhileInteracting !== undefined\n        ? options.updateWhileInteracting\n        : false;\n  }\n\n  /**\n   * @return {string} Declutter group.\n   * @override\n   */\n  getDeclutter() {\n    return this.declutter_;\n  }\n\n  /**\n   * Get the topmost feature that intersects the given pixel on the viewport. Returns a promise\n   * that resolves with an array of features. The array will either contain the topmost feature\n   * when a hit was detected, or it will be empty.\n   *\n   * The hit detection algorithm used for this method is optimized for performance, but is less\n   * accurate than the one used in [map.getFeaturesAtPixel()]{@link import(\"../Map.js\").default#getFeaturesAtPixel}.\n   * Text is not considered, and icons are only represented by their bounding box instead of the exact\n   * image.\n   *\n   * @param {import(\"../pixel.js\").Pixel} pixel Pixel.\n   * @return {Promise<Array<import(\"../Feature.js\").FeatureLike>>} Promise that resolves with an array of features.\n   * @api\n   * @override\n   */\n  getFeatures(pixel) {\n    return super.getFeatures(pixel);\n  }\n\n  /**\n   * @return {number|undefined} Render buffer.\n   */\n  getRenderBuffer() {\n    return this.renderBuffer_;\n  }\n\n  /**\n   * @return {import(\"../render.js\").OrderFunction|null|undefined} Render order.\n   */\n  getRenderOrder() {\n    return /** @type {import(\"../render.js\").OrderFunction|null|undefined} */ (\n      this.get(Property.RENDER_ORDER)\n    );\n  }\n\n  /**\n   * Get the style for features.  This returns whatever was passed to the `style`\n   * option at construction or to the `setStyle` method.\n   * @return {import(\"../style/Style.js\").StyleLike|import(\"../style/flat.js\").FlatStyleLike|null|undefined} Layer style.\n   * @api\n   */\n  getStyle() {\n    return this.style_;\n  }\n\n  /**\n   * Get the style function.\n   * @return {import(\"../style/Style.js\").StyleFunction|undefined} Layer style function.\n   * @api\n   */\n  getStyleFunction() {\n    return this.styleFunction_;\n  }\n\n  /**\n   * @return {boolean} Whether the rendered layer should be updated while\n   *     animating.\n   */\n  getUpdateWhileAnimating() {\n    return this.updateWhileAnimating_;\n  }\n\n  /**\n   * @return {boolean} Whether the rendered layer should be updated while\n   *     interacting.\n   */\n  getUpdateWhileInteracting() {\n    return this.updateWhileInteracting_;\n  }\n\n  /**\n   * Render declutter items for this layer\n   * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n   * @param {import(\"../layer/Layer.js\").State} layerState Layer state.\n   * @override\n   */\n  renderDeclutter(frameState, layerState) {\n    const declutterGroup = this.getDeclutter();\n    if (declutterGroup in frameState.declutter === false) {\n      frameState.declutter[declutterGroup] = new RBush(9);\n    }\n    this.getRenderer().renderDeclutter(frameState, layerState);\n  }\n\n  /**\n   * @param {import(\"../render.js\").OrderFunction|null|undefined} renderOrder\n   *     Render order.\n   */\n  setRenderOrder(renderOrder) {\n    this.set(Property.RENDER_ORDER, renderOrder);\n  }\n\n  /**\n   * Set the style for features.  This can be a single style object, an array\n   * of styles, or a function that takes a feature and resolution and returns\n   * an array of styles. If set to `null`, the layer has no style (a `null` style),\n   * so only features that have their own styles will be rendered in the layer. Call\n   * `setStyle()` without arguments to reset to the default style. See\n   * [the ol/style/Style module]{@link module:ol/style/Style~Style} for information on the default style.\n   *\n   * If your layer has a static style, you can use [flat style]{@link module:ol/style/flat~FlatStyle} object\n   * literals instead of using the `Style` and symbolizer constructors (`Fill`, `Stroke`, etc.):\n   * ```js\n   * vectorLayer.setStyle({\n   *   \"fill-color\": \"yellow\",\n   *   \"stroke-color\": \"black\",\n   *   \"stroke-width\": 4\n   * })\n   * ```\n   *\n   * @param {import(\"../style/Style.js\").StyleLike|import(\"../style/flat.js\").FlatStyleLike|null} [style] Layer style.\n   * @api\n   */\n  setStyle(style) {\n    this.style_ = style === undefined ? createDefaultStyle : style;\n    const styleLike = toStyleLike(style);\n    this.styleFunction_ =\n      style === null ? undefined : toStyleFunction(styleLike);\n    this.changed();\n  }\n\n  /**\n   * @param {boolean|string|number} declutter Declutter images and text.\n   * @api\n   */\n  setDeclutter(declutter) {\n    this.declutter_ = declutter ? String(declutter) : undefined;\n    this.changed();\n  }\n}\n\n/**\n * Coerce the allowed style types into a shorter list of types.  Flat styles, arrays of flat\n * styles, and arrays of rules are converted into style functions.\n *\n * @param {import(\"../style/Style.js\").StyleLike|import(\"../style/flat.js\").FlatStyleLike|null} [style] Layer style.\n * @return {import(\"../style/Style.js\").StyleLike|null} The style.\n */\nfunction toStyleLike(style) {\n  if (style === undefined) {\n    return createDefaultStyle;\n  }\n  if (!style) {\n    return null;\n  }\n  if (typeof style === 'function') {\n    return style;\n  }\n  if (style instanceof Style) {\n    return style;\n  }\n  if (Array.isArray(style) && style.length === 0) {\n    return [];\n  }\n  if (Array.isArray(style) && style[0] instanceof Style) {\n    const length = style.length;\n    const styles = new Array(length);\n    for (let i = 0; i < length; ++i) {\n      const candidate = style[i];\n      if (!(candidate instanceof Style)) {\n        throw new Error('Expected a list of style instances');\n      }\n      styles[i] = candidate;\n    }\n    return styles;\n  }\n\n  const flatStyleLike =\n    /** @type {import(\"../style/flat.js\").FlatStyleLike} */ (style);\n  return flatStyleLikeToStyleFunction(flatStyleLike);\n}\n\nexport default BaseVectorLayer;\n", "/**\n * @module ol/layer/Vector\n */\nimport CanvasVectorLayerRenderer from '../renderer/canvas/VectorLayer.js';\nimport BaseVectorLayer from './BaseVector.js';\n\n/**\n * @template {import(\"../source/Vector.js\").default<FeatureType>} [VectorSourceType=import(\"../source/Vector.js\").default<*>]\n * @template {import('../Feature.js').FeatureLike} [FeatureType=import(\"./BaseVector.js\").ExtractedFeatureType<VectorSourceType>]\n * @typedef {Object} Options\n * @property {string} [className='ol-layer'] A CSS class name to set to the layer element.\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering.  The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering.  At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {import(\"../render.js\").OrderFunction} [renderOrder] Render order. Function to be used when sorting\n * features before rendering. By default features are drawn in the order that they are created. Use\n * `null` to avoid the sort, but get an undefined draw order.\n * @property {number} [renderBuffer=100] The buffer in pixels around the viewport extent used by the\n * renderer when getting features from the vector source for the rendering or hit-detection.\n * Recommended value: the size of the largest symbol, line width or label.\n * @property {VectorSourceType} [source] Source.\n * @property {import(\"../Map.js\").default} [map] Sets the layer as overlay on a map. The map will not manage\n * this layer in its layers collection, and the layer will be rendered on top. This is useful for\n * temporary layers. The standard way to add a layer to a map and have it managed by the map is to\n * use [map.addLayer()]{@link import(\"../Map.js\").default#addLayer}.\n * @property {boolean|string|number} [declutter=false] Declutter images and text. Any truthy value will enable\n * decluttering. Within a layer, a feature rendered before another has higher priority. All layers with the\n * same `declutter` value will be decluttered together. The priority is determined by the drawing order of the\n * layers with the same `declutter` value. Higher in the layer stack means higher priority. To declutter distinct\n * layers or groups of layers separately, use different truthy values for `declutter`.\n * @property {import(\"../style/Style.js\").StyleLike|import(\"../style/flat.js\").FlatStyleLike|null} [style] Layer style. When set to `null`, only\n * features that have their own style will be rendered. See {@link module:ol/style/Style~Style} for the default style\n * which will be used if this is not set.\n * @property {import(\"./Base.js\").BackgroundColor} [background] Background color for the layer. If not specified, no background\n * will be rendered.\n * @property {boolean} [updateWhileAnimating=false] When set to `true`, feature batches will\n * be recreated during animations. This means that no vectors will be shown clipped, but the\n * setting will have a performance impact for large amounts of vector data. When set to `false`,\n * batches will be recreated when no animation is active.\n * @property {boolean} [updateWhileInteracting=false] When set to `true`, feature batches will\n * be recreated during interactions. See also `updateWhileAnimating`.\n * @property {Object<string, *>} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.\n */\n\n/**\n * @classdesc\n * Vector data is rendered client-side, as vectors. This layer type provides most accurate rendering\n * even during animations. Points and labels stay upright on rotated views. For very large\n * amounts of vector data, performance may suffer during pan and zoom animations. In this case,\n * try {@link module:ol/layer/VectorImage~VectorImageLayer}.\n *\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @template {import(\"../source/Vector.js\").default<FeatureType>} [VectorSourceType=import(\"../source/Vector.js\").default<*>]\n * @template {import('../Feature.js').FeatureLike} [FeatureType=import(\"./BaseVector.js\").ExtractedFeatureType<VectorSourceType>]\n * @extends {BaseVectorLayer<FeatureType, VectorSourceType, CanvasVectorLayerRenderer>}\n * @api\n */\nclass VectorLayer extends BaseVectorLayer {\n  /**\n   * @param {Options<VectorSourceType, FeatureType>} [options] Options.\n   */\n  constructor(options) {\n    super(options);\n  }\n\n  /**\n   * @override\n   */\n  createRenderer() {\n    return new CanvasVectorLayerRenderer(this);\n  }\n}\n\nexport default VectorLayer;\n", "/**\n * @module ol/MapBrowserEventType\n */\nimport EventType from './events/EventType.js';\n\n/**\n * Constants for event names.\n * @enum {string}\n */\nexport default {\n  /**\n   * A true single click with no dragging and no double click. Note that this\n   * event is delayed by 250 ms to ensure that it is not a double click.\n   * @event module:ol/MapBrowserEvent~MapBrowserEvent#singleclick\n   * @api\n   */\n  SINGLECLICK: 'singleclick',\n\n  /**\n   * A click with no dragging. A double click will fire two of this.\n   * @event module:ol/MapBrowserEvent~MapBrowserEvent#click\n   * @api\n   */\n  CLICK: EventType.CLICK,\n\n  /**\n   * A true double click, with no dragging.\n   * @event module:ol/MapBrowserEvent~MapBrowserEvent#dblclick\n   * @api\n   */\n  DBLCLICK: EventType.DBLCLICK,\n\n  /**\n   * Triggered when a pointer is dragged.\n   * @event module:ol/MapBrowserEvent~MapBrowserEvent#pointerdrag\n   * @api\n   */\n  POINTERDRAG: 'pointerdrag',\n\n  /**\n   * Triggered when a pointer is moved. Note that on touch devices this is\n   * triggered when the map is panned, so is not the same as mousemove.\n   * @event module:ol/MapBrowserEvent~MapBrowserEvent#pointermove\n   * @api\n   */\n  POINTERMOVE: 'pointermove',\n\n  POINTERDOWN: 'pointerdown',\n  POINTERUP: 'pointerup',\n  POINTEROVER: 'pointerover',\n  POINTEROUT: 'pointerout',\n  POINTERENTER: 'pointerenter',\n  POINTERLEAVE: 'pointerleave',\n  POINTERCANCEL: 'pointercancel',\n};\n\n/***\n * @typedef {'singleclick'|'click'|'dblclick'|'pointerdrag'|'pointermove'} Types\n */\n", "/**\n * @module ol/interaction/Property\n */\n\n/**\n * @enum {string}\n */\nexport default {\n  ACTIVE: 'active',\n};\n", "/**\n * @module ol/interaction/Interaction\n */\nimport BaseObject from '../Object.js';\nimport {easeOut, linear} from '../easing.js';\nimport InteractionProperty from './Property.js';\n\n/***\n * @template Return\n * @typedef {import(\"../Observable.js\").OnSignature<import(\"../Observable.js\").EventTypes, import(\"../events/Event.js\").default, Return> &\n *   import(\"../Observable.js\").OnSignature<import(\"../ObjectEventType.js\").Types|\n *     'change:active', import(\"../Object.js\").ObjectEvent, Return> &\n *   import(\"../Observable.js\").CombinedOnSignature<import(\"../Observable.js\").EventTypes|import(\"../ObjectEventType.js\").Types|\n *     'change:active', Return>} InteractionOnSignature\n */\n\n/**\n * Object literal with config options for interactions.\n * @typedef {Object} InteractionOptions\n * @property {function(import(\"../MapBrowserEvent.js\").default):boolean} [handleEvent]\n * Method called by the map to notify the interaction that a browser event was\n * dispatched to the map. If the function returns a falsy value, propagation of\n * the event to other interactions in the map's interactions chain will be\n * prevented (this includes functions with no explicit return). The interactions\n * are traversed in reverse order of the interactions collection of the map.\n */\n\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * User actions that change the state of the map. Some are similar to controls,\n * but are not associated with a DOM element.\n * For example, {@link module:ol/interaction/KeyboardZoom~KeyboardZoom} is\n * functionally the same as {@link module:ol/control/Zoom~Zoom}, but triggered\n * by a keyboard event not a button element event.\n * Although interactions do not have a DOM element, some of them do render\n * vectors and so are visible on the screen.\n * @api\n */\nclass Interaction extends BaseObject {\n  /**\n   * @param {InteractionOptions} [options] Options.\n   */\n  constructor(options) {\n    super();\n\n    /***\n     * @type {InteractionOnSignature<import(\"../events.js\").EventsKey>}\n     */\n    this.on;\n\n    /***\n     * @type {InteractionOnSignature<import(\"../events.js\").EventsKey>}\n     */\n    this.once;\n\n    /***\n     * @type {InteractionOnSignature<void>}\n     */\n    this.un;\n\n    if (options && options.handleEvent) {\n      this.handleEvent = options.handleEvent;\n    }\n\n    /**\n     * @private\n     * @type {import(\"../Map.js\").default|null}\n     */\n    this.map_ = null;\n\n    this.setActive(true);\n  }\n\n  /**\n   * Return whether the interaction is currently active.\n   * @return {boolean} `true` if the interaction is active, `false` otherwise.\n   * @observable\n   * @api\n   */\n  getActive() {\n    return /** @type {boolean} */ (this.get(InteractionProperty.ACTIVE));\n  }\n\n  /**\n   * Get the map associated with this interaction.\n   * @return {import(\"../Map.js\").default|null} Map.\n   * @api\n   */\n  getMap() {\n    return this.map_;\n  }\n\n  /**\n   * Handles the {@link module:ol/MapBrowserEvent~MapBrowserEvent map browser event}.\n   * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n   * @return {boolean} `false` to stop event propagation.\n   * @api\n   */\n  handleEvent(mapBrowserEvent) {\n    return true;\n  }\n\n  /**\n   * Activate or deactivate the interaction.\n   * @param {boolean} active Active.\n   * @observable\n   * @api\n   */\n  setActive(active) {\n    this.set(InteractionProperty.ACTIVE, active);\n  }\n\n  /**\n   * Remove the interaction from its current map and attach it to the new map.\n   * Subclasses may set up event handlers to get notified about changes to\n   * the map here.\n   * @param {import(\"../Map.js\").default|null} map Map.\n   */\n  setMap(map) {\n    this.map_ = map;\n  }\n}\n\n/**\n * @param {import(\"../View.js\").default} view View.\n * @param {import(\"../coordinate.js\").Coordinate} delta Delta.\n * @param {number} [duration] Duration.\n */\nexport function pan(view, delta, duration) {\n  const currentCenter = view.getCenterInternal();\n  if (currentCenter) {\n    const center = [currentCenter[0] + delta[0], currentCenter[1] + delta[1]];\n    view.animateInternal({\n      duration: duration !== undefined ? duration : 250,\n      easing: linear,\n      center: view.getConstrainedCenter(center),\n    });\n  }\n}\n\n/**\n * @param {import(\"../View.js\").default} view View.\n * @param {number} delta Delta from previous zoom level.\n * @param {import(\"../coordinate.js\").Coordinate} [anchor] Anchor coordinate in the user projection.\n * @param {number} [duration] Duration.\n */\nexport function zoomByDelta(view, delta, anchor, duration) {\n  const currentZoom = view.getZoom();\n\n  if (currentZoom === undefined) {\n    return;\n  }\n\n  const newZoom = view.getConstrainedZoom(currentZoom + delta);\n  const newResolution = view.getResolutionForZoom(newZoom);\n\n  if (view.getAnimating()) {\n    view.cancelAnimations();\n  }\n  view.animate({\n    resolution: newResolution,\n    anchor: anchor,\n    duration: duration !== undefined ? duration : 250,\n    easing: easeOut,\n  });\n}\n\nexport default Interaction;\n", "/**\n * @module ol/interaction/Pointer\n */\nimport MapBrowserEventType from '../MapBrowserEventType.js';\nimport Interaction from './Interaction.js';\n\n/**\n * @typedef {Object} Options\n * @property {function(import(\"../MapBrowserEvent.js\").default):boolean} [handleDownEvent]\n * Function handling \"down\" events. If the function returns `true` then a drag\n * sequence is started.\n * @property {function(import(\"../MapBrowserEvent.js\").default):void} [handleDragEvent]\n * Function handling \"drag\" events. This function is called on \"move\" events\n * during a drag sequence.\n * @property {function(import(\"../MapBrowserEvent.js\").default):boolean} [handleEvent]\n * Method called by the map to notify the interaction that a browser event was\n * dispatched to the map. The function may return `false` to prevent the\n * propagation of the event to other interactions in the map's interactions\n * chain.\n * @property {function(import(\"../MapBrowserEvent.js\").default):void} [handleMoveEvent]\n * Function handling \"move\" events. This function is called on \"move\" events.\n * This functions is also called during a drag sequence, so during a drag\n * sequence both the `handleDragEvent` function and this function are called.\n * If `handleDownEvent` is defined and it returns true this function will not\n * be called during a drag sequence.\n * @property {function(import(\"../MapBrowserEvent.js\").default):boolean} [handleUpEvent]\n *  Function handling \"up\" events. If the function returns `false` then the\n * current drag sequence is stopped.\n * @property {function(boolean):boolean} [stopDown]\n * Should the down event be propagated to other interactions, or should be\n * stopped?\n */\n\n/**\n * @classdesc\n * Base class that calls user-defined functions on `down`, `move` and `up`\n * events. This class also manages \"drag sequences\".\n *\n * When the `handleDownEvent` user function returns `true` a drag sequence is\n * started. During a drag sequence the `handleDragEvent` user function is\n * called on `move` events. The drag sequence ends when the `handleUpEvent`\n * user function is called and returns `false`.\n * @api\n */\nclass PointerInteraction extends Interaction {\n  /**\n   * @param {Options} [options] Options.\n   */\n  constructor(options) {\n    options = options ? options : {};\n\n    super(\n      /** @type {import(\"./Interaction.js\").InteractionOptions} */ (options),\n    );\n\n    if (options.handleDownEvent) {\n      this.handleDownEvent = options.handleDownEvent;\n    }\n\n    if (options.handleDragEvent) {\n      this.handleDragEvent = options.handleDragEvent;\n    }\n\n    if (options.handleMoveEvent) {\n      this.handleMoveEvent = options.handleMoveEvent;\n    }\n\n    if (options.handleUpEvent) {\n      this.handleUpEvent = options.handleUpEvent;\n    }\n\n    if (options.stopDown) {\n      this.stopDown = options.stopDown;\n    }\n\n    /**\n     * @type {boolean}\n     * @protected\n     */\n    this.handlingDownUpSequence = false;\n\n    /**\n     * @type {Array<PointerEvent>}\n     * @protected\n     */\n    this.targetPointers = [];\n  }\n\n  /**\n   * Returns the current number of pointers involved in the interaction,\n   * e.g. `2` when two fingers are used.\n   * @return {number} The number of pointers.\n   * @api\n   */\n  getPointerCount() {\n    return this.targetPointers.length;\n  }\n\n  /**\n   * Handle pointer down events.\n   * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n   * @return {boolean} If the event was consumed.\n   * @protected\n   */\n  handleDownEvent(mapBrowserEvent) {\n    return false;\n  }\n\n  /**\n   * Handle pointer drag events.\n   * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n   * @protected\n   */\n  handleDragEvent(mapBrowserEvent) {}\n\n  /**\n   * Handles the {@link module:ol/MapBrowserEvent~MapBrowserEvent map browser event} and may call into\n   * other functions, if event sequences like e.g. 'drag' or 'down-up' etc. are\n   * detected.\n   * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n   * @return {boolean} `false` to stop event propagation.\n   * @api\n   * @override\n   */\n  handleEvent(mapBrowserEvent) {\n    if (!mapBrowserEvent.originalEvent) {\n      return true;\n    }\n\n    let stopEvent = false;\n    this.updateTrackedPointers_(mapBrowserEvent);\n    if (this.handlingDownUpSequence) {\n      if (mapBrowserEvent.type == MapBrowserEventType.POINTERDRAG) {\n        this.handleDragEvent(mapBrowserEvent);\n        // prevent page scrolling during dragging\n        mapBrowserEvent.originalEvent.preventDefault();\n      } else if (mapBrowserEvent.type == MapBrowserEventType.POINTERUP) {\n        const handledUp = this.handleUpEvent(mapBrowserEvent);\n        this.handlingDownUpSequence =\n          handledUp && this.targetPointers.length > 0;\n      }\n    } else {\n      if (mapBrowserEvent.type == MapBrowserEventType.POINTERDOWN) {\n        const handled = this.handleDownEvent(mapBrowserEvent);\n        this.handlingDownUpSequence = handled;\n        stopEvent = this.stopDown(handled);\n      } else if (mapBrowserEvent.type == MapBrowserEventType.POINTERMOVE) {\n        this.handleMoveEvent(mapBrowserEvent);\n      }\n    }\n    return !stopEvent;\n  }\n\n  /**\n   * Handle pointer move events.\n   * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n   * @protected\n   */\n  handleMoveEvent(mapBrowserEvent) {}\n\n  /**\n   * Handle pointer up events.\n   * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n   * @return {boolean} If the event was consumed.\n   * @protected\n   */\n  handleUpEvent(mapBrowserEvent) {\n    return false;\n  }\n\n  /**\n   * This function is used to determine if \"down\" events should be propagated\n   * to other interactions or should be stopped.\n   * @param {boolean} handled Was the event handled by the interaction?\n   * @return {boolean} Should the `down` event be stopped?\n   */\n  stopDown(handled) {\n    return handled;\n  }\n\n  /**\n   * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n   * @private\n   */\n  updateTrackedPointers_(mapBrowserEvent) {\n    if (mapBrowserEvent.activePointers) {\n      this.targetPointers = mapBrowserEvent.activePointers;\n    }\n  }\n}\n\n/**\n * @param {Array<PointerEvent>} pointerEvents List of events.\n * @return {{clientX: number, clientY: number}} Centroid pixel.\n */\nexport function centroid(pointerEvents) {\n  const length = pointerEvents.length;\n  let clientX = 0;\n  let clientY = 0;\n  for (let i = 0; i < length; i++) {\n    clientX += pointerEvents[i].clientX;\n    clientY += pointerEvents[i].clientY;\n  }\n  return {clientX: clientX / length, clientY: clientY / length};\n}\n\nexport default PointerInteraction;\n", "/**\n * @module ol/MapEvent\n */\nimport Event from './events/Event.js';\n\n/**\n * @classdesc\n * Events emitted as map events are instances of this type.\n * See {@link module:ol/Map~Map} for which events trigger a map event.\n */\nclass MapEvent extends Event {\n  /**\n   * @param {string} type Event type.\n   * @param {import(\"./Map.js\").default} map Map.\n   * @param {?import(\"./Map.js\").FrameState} [frameState] Frame state.\n   */\n  constructor(type, map, frameState) {\n    super(type);\n\n    /**\n     * The map where the event occurred.\n     * @type {import(\"./Map.js\").default}\n     * @api\n     */\n    this.map = map;\n\n    /**\n     * The frame state at the time of the event.\n     * @type {?import(\"./Map.js\").FrameState}\n     * @api\n     */\n    this.frameState = frameState !== undefined ? frameState : null;\n  }\n}\n\nexport default MapEvent;\n", "/**\n * @module ol/MapBrowserEvent\n */\nimport MapEvent from './MapEvent.js';\n\n/**\n * @classdesc\n * Events emitted as map browser events are instances of this type.\n * See {@link module:ol/Map~Map} for which events trigger a map browser event.\n * @template {PointerEvent|KeyboardEvent|WheelEvent} [EVENT=PointerEvent|KeyboardEvent|WheelEvent]\n */\nclass MapBrowserEvent extends MapEvent {\n  /**\n   * @param {string} type Event type.\n   * @param {import(\"./Map.js\").default} map Map.\n   * @param {EVENT} originalEvent Original event.\n   * @param {boolean} [dragging] Is the map currently being dragged?\n   * @param {import(\"./Map.js\").FrameState} [frameState] Frame state.\n   * @param {Array<PointerEvent>} [activePointers] Active pointers.\n   */\n  constructor(type, map, originalEvent, dragging, frameState, activePointers) {\n    super(type, map, frameState);\n\n    /**\n     * The original browser event.\n     * @const\n     * @type {EVENT}\n     * @api\n     */\n    this.originalEvent = originalEvent;\n\n    /**\n     * The map pixel relative to the viewport corresponding to the original browser event.\n     * @type {?import(\"./pixel.js\").Pixel}\n     * @private\n     */\n    this.pixel_ = null;\n\n    /**\n     * The coordinate in the user projection corresponding to the original browser event.\n     * @type {?import(\"./coordinate.js\").Coordinate}\n     * @private\n     */\n    this.coordinate_ = null;\n\n    /**\n     * Indicates if the map is currently being dragged. Only set for\n     * `POINTERDRAG` and `POINTERMOVE` events. Default is `false`.\n     *\n     * @type {boolean}\n     * @api\n     */\n    this.dragging = dragging !== undefined ? dragging : false;\n\n    /**\n     * @type {Array<PointerEvent>|undefined}\n     */\n    this.activePointers = activePointers;\n  }\n\n  /**\n   * The map pixel relative to the viewport corresponding to the original event.\n   * @type {import(\"./pixel.js\").Pixel}\n   * @api\n   */\n  get pixel() {\n    if (!this.pixel_) {\n      this.pixel_ = this.map.getEventPixel(this.originalEvent);\n    }\n    return this.pixel_;\n  }\n  set pixel(pixel) {\n    this.pixel_ = pixel;\n  }\n\n  /**\n   * The coordinate corresponding to the original browser event.  This will be in the user\n   * projection if one is set.  Otherwise it will be in the view projection.\n   * @type {import(\"./coordinate.js\").Coordinate}\n   * @api\n   */\n  get coordinate() {\n    if (!this.coordinate_) {\n      this.coordinate_ = this.map.getCoordinateFromPixel(this.pixel);\n    }\n    return this.coordinate_;\n  }\n  set coordinate(coordinate) {\n    this.coordinate_ = coordinate;\n  }\n\n  /**\n   * Prevents the default browser action.\n   * See https://developer.mozilla.org/en-US/docs/Web/API/event.preventDefault.\n   * @api\n   * @override\n   */\n  preventDefault() {\n    super.preventDefault();\n    if ('preventDefault' in this.originalEvent) {\n      /** @type {UIEvent} */ (this.originalEvent).preventDefault();\n    }\n  }\n\n  /**\n   * Prevents further propagation of the current event.\n   * See https://developer.mozilla.org/en-US/docs/Web/API/event.stopPropagation.\n   * @api\n   * @override\n   */\n  stopPropagation() {\n    super.stopPropagation();\n    if ('stopPropagation' in this.originalEvent) {\n      /** @type {UIEvent} */ (this.originalEvent).stopPropagation();\n    }\n  }\n}\n\nexport default MapBrowserEvent;\n", "/**\n * @module ol/pointer/EventType\n */\n\n/**\n * Constants for event names.\n * @enum {string}\n */\nexport default {\n  POINTERMOVE: 'pointermove',\n  POINTERDOWN: 'pointerdown',\n  POINTERUP: 'pointerup',\n  POINTEROVER: 'pointerover',\n  POINTEROUT: 'pointerout',\n  POINTERENTER: 'pointerenter',\n  POINTERLEAVE: 'pointerleave',\n  POINTERCANCEL: 'pointercancel',\n};\n", "/**\n * @module ol/MapBrowserEventHandler\n */\n\nimport MapBrowserEvent from './MapBrowserEvent.js';\nimport MapBrowserEventType from './MapBrowserEventType.js';\nimport {listen, unlistenByKey} from './events.js';\nimport EventType from './events/EventType.js';\nimport Target from './events/Target.js';\nimport {PASSIVE_EVENT_LISTENERS} from './has.js';\nimport PointerEventType from './pointer/EventType.js';\n\nclass MapBrowserEventHandler extends Target {\n  /**\n   * @param {import(\"./Map.js\").default} map The map with the viewport to listen to events on.\n   * @param {number} [moveTolerance] The minimal distance the pointer must travel to trigger a move.\n   */\n  constructor(map, moveTolerance) {\n    super(map);\n\n    /**\n     * This is the element that we will listen to the real events on.\n     * @type {import(\"./Map.js\").default}\n     * @private\n     */\n    this.map_ = map;\n\n    /**\n     * @type {ReturnType<typeof setTimeout>}\n     * @private\n     */\n    this.clickTimeoutId_;\n\n    /**\n     * Emulate dblclick and singleclick. Will be true when only one pointer is active.\n     * @type {boolean}\n     */\n    this.emulateClicks_ = false;\n\n    /**\n     * @type {boolean}\n     * @private\n     */\n    this.dragging_ = false;\n\n    /**\n     * @type {!Array<import(\"./events.js\").EventsKey>}\n     * @private\n     */\n    this.dragListenerKeys_ = [];\n\n    /**\n     * @type {number}\n     * @private\n     */\n    this.moveTolerance_ = moveTolerance === undefined ? 1 : moveTolerance;\n\n    /**\n     * The most recent \"down\" type event (or null if none have occurred).\n     * Set on pointerdown.\n     * @type {PointerEvent|null}\n     * @private\n     */\n    this.down_ = null;\n\n    const element = this.map_.getViewport();\n\n    /**\n     * @type {Array<PointerEvent>}\n     * @private\n     */\n    this.activePointers_ = [];\n\n    /**\n     * @type {!Object<number, Event>}\n     * @private\n     */\n    this.trackedTouches_ = {};\n\n    /**\n     * @private\n     */\n    this.element_ = element;\n\n    /**\n     * @type {?import(\"./events.js\").EventsKey}\n     * @private\n     */\n    this.pointerdownListenerKey_ = listen(\n      element,\n      PointerEventType.POINTERDOWN,\n      this.handlePointerDown_,\n      this,\n    );\n\n    /**\n     * @type {PointerEvent}\n     * @private\n     */\n    this.originalPointerMoveEvent_;\n\n    /**\n     * @type {?import(\"./events.js\").EventsKey}\n     * @private\n     */\n    this.relayedListenerKey_ = listen(\n      element,\n      PointerEventType.POINTERMOVE,\n      this.relayMoveEvent_,\n      this,\n    );\n\n    /**\n     * @private\n     */\n    this.boundHandleTouchMove_ = this.handleTouchMove_.bind(this);\n\n    this.element_.addEventListener(\n      EventType.TOUCHMOVE,\n      this.boundHandleTouchMove_,\n      PASSIVE_EVENT_LISTENERS ? {passive: false} : false,\n    );\n  }\n\n  /**\n   * @param {PointerEvent} pointerEvent Pointer\n   * event.\n   * @private\n   */\n  emulateClick_(pointerEvent) {\n    let newEvent = new MapBrowserEvent(\n      MapBrowserEventType.CLICK,\n      this.map_,\n      pointerEvent,\n    );\n    this.dispatchEvent(newEvent);\n    if (this.clickTimeoutId_ !== undefined) {\n      // double-click\n      clearTimeout(this.clickTimeoutId_);\n      this.clickTimeoutId_ = undefined;\n      newEvent = new MapBrowserEvent(\n        MapBrowserEventType.DBLCLICK,\n        this.map_,\n        pointerEvent,\n      );\n      this.dispatchEvent(newEvent);\n    } else {\n      // click\n      this.clickTimeoutId_ = setTimeout(() => {\n        this.clickTimeoutId_ = undefined;\n        const newEvent = new MapBrowserEvent(\n          MapBrowserEventType.SINGLECLICK,\n          this.map_,\n          pointerEvent,\n        );\n        this.dispatchEvent(newEvent);\n      }, 250);\n    }\n  }\n\n  /**\n   * Keeps track on how many pointers are currently active.\n   *\n   * @param {PointerEvent} pointerEvent Pointer\n   * event.\n   * @private\n   */\n  updateActivePointers_(pointerEvent) {\n    const event = pointerEvent;\n    const id = event.pointerId;\n\n    if (\n      event.type == MapBrowserEventType.POINTERUP ||\n      event.type == MapBrowserEventType.POINTERCANCEL\n    ) {\n      delete this.trackedTouches_[id];\n      for (const pointerId in this.trackedTouches_) {\n        if (this.trackedTouches_[pointerId].target !== event.target) {\n          // Some platforms assign a new pointerId when the target changes.\n          // If this happens, delete one tracked pointer. If there is more\n          // than one tracked pointer for the old target, it will be cleared\n          // by subsequent POINTERUP events from other pointers.\n          delete this.trackedTouches_[pointerId];\n          break;\n        }\n      }\n    } else if (\n      event.type == MapBrowserEventType.POINTERDOWN ||\n      event.type == MapBrowserEventType.POINTERMOVE\n    ) {\n      this.trackedTouches_[id] = event;\n    }\n    this.activePointers_ = Object.values(this.trackedTouches_);\n  }\n\n  /**\n   * @param {PointerEvent} pointerEvent Pointer\n   * event.\n   * @private\n   */\n  handlePointerUp_(pointerEvent) {\n    this.updateActivePointers_(pointerEvent);\n    const newEvent = new MapBrowserEvent(\n      MapBrowserEventType.POINTERUP,\n      this.map_,\n      pointerEvent,\n      undefined,\n      undefined,\n      this.activePointers_,\n    );\n    this.dispatchEvent(newEvent);\n\n    // We emulate click events on left mouse button click, touch contact, and pen\n    // contact. isMouseActionButton returns true in these cases (evt.button is set\n    // to 0).\n    // See http://www.w3.org/TR/pointerevents/#button-states\n    // We only fire click, singleclick, and doubleclick if nobody has called\n    // event.preventDefault().\n    if (\n      this.emulateClicks_ &&\n      !newEvent.defaultPrevented &&\n      !this.dragging_ &&\n      this.isMouseActionButton_(pointerEvent)\n    ) {\n      this.emulateClick_(this.down_);\n    }\n\n    if (this.activePointers_.length === 0) {\n      this.dragListenerKeys_.forEach(unlistenByKey);\n      this.dragListenerKeys_.length = 0;\n      this.dragging_ = false;\n      this.down_ = null;\n    }\n  }\n\n  /**\n   * @param {PointerEvent} pointerEvent Pointer\n   * event.\n   * @return {boolean} If the left mouse button was pressed.\n   * @private\n   */\n  isMouseActionButton_(pointerEvent) {\n    return pointerEvent.button === 0;\n  }\n\n  /**\n   * @param {PointerEvent} pointerEvent Pointer\n   * event.\n   * @private\n   */\n  handlePointerDown_(pointerEvent) {\n    this.emulateClicks_ = this.activePointers_.length === 0;\n    this.updateActivePointers_(pointerEvent);\n    const newEvent = new MapBrowserEvent(\n      MapBrowserEventType.POINTERDOWN,\n      this.map_,\n      pointerEvent,\n      undefined,\n      undefined,\n      this.activePointers_,\n    );\n    this.dispatchEvent(newEvent);\n\n    this.down_ = new PointerEvent(pointerEvent.type, pointerEvent);\n    Object.defineProperty(this.down_, 'target', {\n      writable: false,\n      value: pointerEvent.target,\n    });\n\n    if (this.dragListenerKeys_.length === 0) {\n      const doc = this.map_.getOwnerDocument();\n      this.dragListenerKeys_.push(\n        listen(\n          doc,\n          MapBrowserEventType.POINTERMOVE,\n          this.handlePointerMove_,\n          this,\n        ),\n        listen(doc, MapBrowserEventType.POINTERUP, this.handlePointerUp_, this),\n        /* Note that the listener for `pointercancel is set up on\n         * `pointerEventHandler_` and not `documentPointerEventHandler_` like\n         * the `pointerup` and `pointermove` listeners.\n         *\n         * The reason for this is the following: `TouchSource.vacuumTouches_()`\n         * issues `pointercancel` events, when there was no `touchend` for a\n         * `touchstart`. Now, let's say a first `touchstart` is registered on\n         * `pointerEventHandler_`. The `documentPointerEventHandler_` is set up.\n         * But `documentPointerEventHandler_` doesn't know about the first\n         * `touchstart`. If there is no `touchend` for the `touchstart`, we can\n         * only receive a `touchcancel` from `pointerEventHandler_`, because it is\n         * only registered there.\n         */\n        listen(\n          this.element_,\n          MapBrowserEventType.POINTERCANCEL,\n          this.handlePointerUp_,\n          this,\n        ),\n      );\n      if (this.element_.getRootNode && this.element_.getRootNode() !== doc) {\n        this.dragListenerKeys_.push(\n          listen(\n            this.element_.getRootNode(),\n            MapBrowserEventType.POINTERUP,\n            this.handlePointerUp_,\n            this,\n          ),\n        );\n      }\n    }\n  }\n\n  /**\n   * @param {PointerEvent} pointerEvent Pointer\n   * event.\n   * @private\n   */\n  handlePointerMove_(pointerEvent) {\n    // Between pointerdown and pointerup, pointermove events are triggered.\n    // To avoid a 'false' touchmove event to be dispatched, we test if the pointer\n    // moved a significant distance.\n    if (this.isMoving_(pointerEvent)) {\n      this.updateActivePointers_(pointerEvent);\n      this.dragging_ = true;\n      const newEvent = new MapBrowserEvent(\n        MapBrowserEventType.POINTERDRAG,\n        this.map_,\n        pointerEvent,\n        this.dragging_,\n        undefined,\n        this.activePointers_,\n      );\n      this.dispatchEvent(newEvent);\n    }\n  }\n\n  /**\n   * Wrap and relay a pointermove event.\n   * @param {PointerEvent} pointerEvent Pointer\n   * event.\n   * @private\n   */\n  relayMoveEvent_(pointerEvent) {\n    this.originalPointerMoveEvent_ = pointerEvent;\n    const dragging = !!(this.down_ && this.isMoving_(pointerEvent));\n    this.dispatchEvent(\n      new MapBrowserEvent(\n        MapBrowserEventType.POINTERMOVE,\n        this.map_,\n        pointerEvent,\n        dragging,\n      ),\n    );\n  }\n\n  /**\n   * Flexible handling of a `touch-action: none` css equivalent: because calling\n   * `preventDefault()` on a `pointermove` event does not stop native page scrolling\n   * and zooming, we also listen for `touchmove` and call `preventDefault()` on it\n   * when an interaction (currently `DragPan` handles the event.\n   * @param {TouchEvent} event Event.\n   * @private\n   */\n  handleTouchMove_(event) {\n    // Due to https://github.com/mpizenberg/elm-pep/issues/2, `this.originalPointerMoveEvent_`\n    // may not be initialized yet when we get here on a platform without native pointer events,\n    // when elm-pep is used as pointer events polyfill.\n    const originalEvent = this.originalPointerMoveEvent_;\n    if (\n      (!originalEvent || originalEvent.defaultPrevented) &&\n      (typeof event.cancelable !== 'boolean' || event.cancelable === true)\n    ) {\n      event.preventDefault();\n    }\n  }\n\n  /**\n   * @param {PointerEvent} pointerEvent Pointer\n   * event.\n   * @return {boolean} Is moving.\n   * @private\n   */\n  isMoving_(pointerEvent) {\n    return (\n      this.dragging_ ||\n      Math.abs(pointerEvent.clientX - this.down_.clientX) >\n        this.moveTolerance_ ||\n      Math.abs(pointerEvent.clientY - this.down_.clientY) > this.moveTolerance_\n    );\n  }\n\n  /**\n   * Clean up.\n   * @override\n   */\n  disposeInternal() {\n    if (this.relayedListenerKey_) {\n      unlistenByKey(this.relayedListenerKey_);\n      this.relayedListenerKey_ = null;\n    }\n    this.element_.removeEventListener(\n      EventType.TOUCHMOVE,\n      this.boundHandleTouchMove_,\n    );\n\n    if (this.pointerdownListenerKey_) {\n      unlistenByKey(this.pointerdownListenerKey_);\n      this.pointerdownListenerKey_ = null;\n    }\n\n    this.dragListenerKeys_.forEach(unlistenByKey);\n    this.dragListenerKeys_.length = 0;\n\n    this.element_ = null;\n    super.disposeInternal();\n  }\n}\n\nexport default MapBrowserEventHandler;\n", "/**\n * @module ol/MapEventType\n */\n\n/**\n * @enum {string}\n */\nexport default {\n  /**\n   * Triggered after a map frame is rendered.\n   * @event module:ol/MapEvent~MapEvent#postrender\n   * @api\n   */\n  POSTRENDER: 'postrender',\n\n  /**\n   * Triggered when the map starts moving.\n   * @event module:ol/MapEvent~MapEvent#movestart\n   * @api\n   */\n  MOVESTART: 'movestart',\n\n  /**\n   * Triggered after the map is moved.\n   * @event module:ol/MapEvent~MapEvent#moveend\n   * @api\n   */\n  MOVEEND: 'moveend',\n\n  /**\n   * Triggered when loading of additional map data (tiles, images, features) starts.\n   * @event module:ol/MapEvent~MapEvent#loadstart\n   * @api\n   */\n  LOADSTART: 'loadstart',\n\n  /**\n   * Triggered when loading of additional map data has completed.\n   * @event module:ol/MapEvent~MapEvent#loadend\n   * @api\n   */\n  LOADEND: 'loadend',\n};\n\n/***\n * @typedef {'postrender'|'movestart'|'moveend'|'loadstart'|'loadend'} Types\n */\n", "/**\n * @module ol/MapProperty\n */\n\n/**\n * @enum {string}\n */\nexport default {\n  LAYERGROUP: 'layergroup',\n  SIZE: 'size',\n  TARGET: 'target',\n  VIEW: 'view',\n};\n", "/**\n * @module ol/TileState\n */\n\n/**\n * @enum {number}\n */\nexport default {\n  IDLE: 0,\n  LOADING: 1,\n  LOADED: 2,\n  /**\n   * Indicates that tile loading failed\n   * @type {number}\n   */\n  ERROR: 3,\n  EMPTY: 4,\n};\n", "/**\n * @module ol/structs/PriorityQueue\n */\nimport {assert} from '../asserts.js';\nimport {clear} from '../obj.js';\n\n/**\n * @type {number}\n */\nexport const DROP = Infinity;\n\n/**\n * @classdesc\n * Priority queue.\n *\n * The implementation is inspired from the Closure Library's Heap class and\n * Python's heapq module.\n *\n * See https://github.com/google/closure-library/blob/master/closure/goog/structs/heap.js\n * and https://hg.python.org/cpython/file/2.7/Lib/heapq.py.\n *\n * @template T\n */\nclass PriorityQueue {\n  /**\n   * @param {function(T): number} priorityFunction Priority function.\n   * @param {function(T): string} keyFunction Key function.\n   */\n  constructor(priorityFunction, keyFunction) {\n    /**\n     * @type {function(T): number}\n     * @private\n     */\n    this.priorityFunction_ = priorityFunction;\n\n    /**\n     * @type {function(T): string}\n     * @private\n     */\n    this.keyFunction_ = keyFunction;\n\n    /**\n     * @type {Array<T>}\n     * @private\n     */\n    this.elements_ = [];\n\n    /**\n     * @type {Array<number>}\n     * @private\n     */\n    this.priorities_ = [];\n\n    /**\n     * @type {!Object<string, boolean>}\n     * @private\n     */\n    this.queuedElements_ = {};\n  }\n\n  /**\n   * FIXME empty description for jsdoc\n   */\n  clear() {\n    this.elements_.length = 0;\n    this.priorities_.length = 0;\n    clear(this.queuedElements_);\n  }\n\n  /**\n   * Remove and return the highest-priority element. O(log N).\n   * @return {T} Element.\n   */\n  dequeue() {\n    const elements = this.elements_;\n    const priorities = this.priorities_;\n    const element = elements[0];\n    if (elements.length == 1) {\n      elements.length = 0;\n      priorities.length = 0;\n    } else {\n      elements[0] = /** @type {T} */ (elements.pop());\n      priorities[0] = /** @type {number} */ (priorities.pop());\n      this.siftUp_(0);\n    }\n    const elementKey = this.keyFunction_(element);\n    delete this.queuedElements_[elementKey];\n    return element;\n  }\n\n  /**\n   * Enqueue an element. O(log N).\n   * @param {T} element Element.\n   * @return {boolean} The element was added to the queue.\n   */\n  enqueue(element) {\n    assert(\n      !(this.keyFunction_(element) in this.queuedElements_),\n      'Tried to enqueue an `element` that was already added to the queue',\n    );\n    const priority = this.priorityFunction_(element);\n    if (priority != DROP) {\n      this.elements_.push(element);\n      this.priorities_.push(priority);\n      this.queuedElements_[this.keyFunction_(element)] = true;\n      this.siftDown_(0, this.elements_.length - 1);\n      return true;\n    }\n    return false;\n  }\n\n  /**\n   * @return {number} Count.\n   */\n  getCount() {\n    return this.elements_.length;\n  }\n\n  /**\n   * Gets the index of the left child of the node at the given index.\n   * @param {number} index The index of the node to get the left child for.\n   * @return {number} The index of the left child.\n   * @private\n   */\n  getLeftChildIndex_(index) {\n    return index * 2 + 1;\n  }\n\n  /**\n   * Gets the index of the right child of the node at the given index.\n   * @param {number} index The index of the node to get the right child for.\n   * @return {number} The index of the right child.\n   * @private\n   */\n  getRightChildIndex_(index) {\n    return index * 2 + 2;\n  }\n\n  /**\n   * Gets the index of the parent of the node at the given index.\n   * @param {number} index The index of the node to get the parent for.\n   * @return {number} The index of the parent.\n   * @private\n   */\n  getParentIndex_(index) {\n    return (index - 1) >> 1;\n  }\n\n  /**\n   * Make this a heap. O(N).\n   * @private\n   */\n  heapify_() {\n    let i;\n    for (i = (this.elements_.length >> 1) - 1; i >= 0; i--) {\n      this.siftUp_(i);\n    }\n  }\n\n  /**\n   * @return {boolean} Is empty.\n   */\n  isEmpty() {\n    return this.elements_.length === 0;\n  }\n\n  /**\n   * @param {string} key Key.\n   * @return {boolean} Is key queued.\n   */\n  isKeyQueued(key) {\n    return key in this.queuedElements_;\n  }\n\n  /**\n   * @param {T} element Element.\n   * @return {boolean} Is queued.\n   */\n  isQueued(element) {\n    return this.isKeyQueued(this.keyFunction_(element));\n  }\n\n  /**\n   * @param {number} index The index of the node to move down.\n   * @private\n   */\n  siftUp_(index) {\n    const elements = this.elements_;\n    const priorities = this.priorities_;\n    const count = elements.length;\n    const element = elements[index];\n    const priority = priorities[index];\n    const startIndex = index;\n\n    while (index < count >> 1) {\n      const lIndex = this.getLeftChildIndex_(index);\n      const rIndex = this.getRightChildIndex_(index);\n\n      const smallerChildIndex =\n        rIndex < count && priorities[rIndex] < priorities[lIndex]\n          ? rIndex\n          : lIndex;\n\n      elements[index] = elements[smallerChildIndex];\n      priorities[index] = priorities[smallerChildIndex];\n      index = smallerChildIndex;\n    }\n\n    elements[index] = element;\n    priorities[index] = priority;\n    this.siftDown_(startIndex, index);\n  }\n\n  /**\n   * @param {number} startIndex The index of the root.\n   * @param {number} index The index of the node to move up.\n   * @private\n   */\n  siftDown_(startIndex, index) {\n    const elements = this.elements_;\n    const priorities = this.priorities_;\n    const element = elements[index];\n    const priority = priorities[index];\n\n    while (index > startIndex) {\n      const parentIndex = this.getParentIndex_(index);\n      if (priorities[parentIndex] > priority) {\n        elements[index] = elements[parentIndex];\n        priorities[index] = priorities[parentIndex];\n        index = parentIndex;\n      } else {\n        break;\n      }\n    }\n    elements[index] = element;\n    priorities[index] = priority;\n  }\n\n  /**\n   * FIXME empty description for jsdoc\n   */\n  reprioritize() {\n    const priorityFunction = this.priorityFunction_;\n    const elements = this.elements_;\n    const priorities = this.priorities_;\n    let index = 0;\n    const n = elements.length;\n    let element, i, priority;\n    for (i = 0; i < n; ++i) {\n      element = elements[i];\n      priority = priorityFunction(element);\n      if (priority == DROP) {\n        delete this.queuedElements_[this.keyFunction_(element)];\n      } else {\n        priorities[index] = priority;\n        elements[index++] = element;\n      }\n    }\n    elements.length = index;\n    priorities.length = index;\n    this.heapify_();\n  }\n}\n\nexport default PriorityQueue;\n", "/**\n * @module ol/TileQueue\n */\nimport TileState from './TileState.js';\nimport EventType from './events/EventType.js';\nimport PriorityQueue, {DROP} from './structs/PriorityQueue.js';\n\n/**\n * @typedef {function(import(\"./Tile.js\").default, string, import('./tilecoord.js').TileCoord, number): number} PriorityFunction\n */\n\n/**\n * @typedef {[import('./Tile.js').default, string, import('./tilecoord.js').TileCoord, number]} TileQueueElement\n */\n\n/**\n * @extends PriorityQueue<TileQueueElement>}\n */\nclass TileQueue extends PriorityQueue {\n  /**\n   * @param {PriorityFunction} tilePriorityFunction Tile priority function.\n   * @param {function(): ?} tileChangeCallback Function called on each tile change event.\n   */\n  constructor(tilePriorityFunction, tileChangeCallback) {\n    super(\n      (element) => tilePriorityFunction.apply(null, element),\n      (element) => element[0].getKey(),\n    );\n\n    /** @private */\n    this.boundHandleTileChange_ = this.handleTileChange.bind(this);\n\n    /**\n     * @private\n     * @type {function(): ?}\n     */\n    this.tileChangeCallback_ = tileChangeCallback;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.tilesLoading_ = 0;\n\n    /**\n     * @private\n     * @type {!Object<string,boolean>}\n     */\n    this.tilesLoadingKeys_ = {};\n  }\n\n  /**\n   * @param {TileQueueElement} element Element.\n   * @return {boolean} The element was added to the queue.\n   * @override\n   */\n  enqueue(element) {\n    const added = super.enqueue(element);\n    if (added) {\n      const tile = element[0];\n      tile.addEventListener(EventType.CHANGE, this.boundHandleTileChange_);\n    }\n    return added;\n  }\n\n  /**\n   * @return {number} Number of tiles loading.\n   */\n  getTilesLoading() {\n    return this.tilesLoading_;\n  }\n\n  /**\n   * @param {import(\"./events/Event.js\").default} event Event.\n   * @protected\n   */\n  handleTileChange(event) {\n    const tile = /** @type {import(\"./Tile.js\").default} */ (event.target);\n    const state = tile.getState();\n    if (\n      state === TileState.LOADED ||\n      state === TileState.ERROR ||\n      state === TileState.EMPTY\n    ) {\n      if (state !== TileState.ERROR) {\n        tile.removeEventListener(EventType.CHANGE, this.boundHandleTileChange_);\n      }\n      const tileKey = tile.getKey();\n      if (tileKey in this.tilesLoadingKeys_) {\n        delete this.tilesLoadingKeys_[tileKey];\n        --this.tilesLoading_;\n      }\n      this.tileChangeCallback_();\n    }\n  }\n\n  /**\n   * @param {number} maxTotalLoading Maximum number tiles to load simultaneously.\n   * @param {number} maxNewLoads Maximum number of new tiles to load.\n   */\n  loadMoreTiles(maxTotalLoading, maxNewLoads) {\n    let newLoads = 0;\n    while (\n      this.tilesLoading_ < maxTotalLoading &&\n      newLoads < maxNewLoads &&\n      this.getCount() > 0\n    ) {\n      const tile = this.dequeue()[0];\n      const tileKey = tile.getKey();\n      const state = tile.getState();\n      if (state === TileState.IDLE && !(tileKey in this.tilesLoadingKeys_)) {\n        this.tilesLoadingKeys_[tileKey] = true;\n        ++this.tilesLoading_;\n        ++newLoads;\n        tile.load();\n      }\n    }\n  }\n}\n\nexport default TileQueue;\n\n/**\n * @param {import('./Map.js').FrameState} frameState Frame state.\n * @param {import(\"./Tile.js\").default} tile Tile.\n * @param {string} tileSourceKey Tile source key.\n * @param {import(\"./coordinate.js\").Coordinate} tileCenter Tile center.\n * @param {number} tileResolution Tile resolution.\n * @return {number} Tile priority.\n */\nexport function getTilePriority(\n  frameState,\n  tile,\n  tileSourceKey,\n  tileCenter,\n  tileResolution,\n) {\n  // Filter out tiles at higher zoom levels than the current zoom level, or that\n  // are outside the visible extent.\n  if (!frameState || !(tileSourceKey in frameState.wantedTiles)) {\n    return DROP;\n  }\n  if (!frameState.wantedTiles[tileSourceKey][tile.getKey()]) {\n    return DROP;\n  }\n  // Prioritize the highest zoom level tiles closest to the focus.\n  // Tiles at higher zoom levels are prioritized using Math.log(tileResolution).\n  // Within a zoom level, tiles are prioritized by the distance in pixels between\n  // the center of the tile and the center of the viewport.  The factor of 65536\n  // means that the prioritization should behave as desired for tiles up to\n  // 65536 * Math.log(2) = 45426 pixels from the focus.\n  const center = frameState.viewState.center;\n  const deltaX = tileCenter[0] - center[0];\n  const deltaY = tileCenter[1] - center[1];\n  return (\n    65536 * Math.log(tileResolution) +\n    Math.sqrt(deltaX * deltaX + deltaY * deltaY) / tileResolution\n  );\n}\n", "/**\n * @module ol/control/Control\n */\nimport MapEventType from '../MapEventType.js';\nimport BaseObject from '../Object.js';\nimport {listen, unlistenByKey} from '../events.js';\nimport {VOID} from '../functions.js';\n\n/**\n * @typedef {Object} Options\n * @property {HTMLElement} [element] The element is the control's\n * container element. This only needs to be specified if you're developing\n * a custom control.\n * @property {function(import(\"../MapEvent.js\").default):void} [render] Function called when\n * the control should be re-rendered. This is called in a `requestAnimationFrame`\n * callback.\n * @property {HTMLElement|string} [target] Specify a target if you want\n * the control to be rendered outside of the map's viewport.\n */\n\n/**\n * @classdesc\n * A control is a visible widget with a DOM element in a fixed position on the\n * screen. They can involve user input (buttons), or be informational only;\n * the position is determined using CSS. By default these are placed in the\n * container with CSS class name `ol-overlaycontainer-stopevent`, but can use\n * any outside DOM element.\n *\n * This is the base class for controls. You can use it for simple custom\n * controls by creating the element with listeners, creating an instance:\n * ```js\n * const myControl = new Control({element: myElement});\n * ```\n * and then adding this to the map.\n *\n * The main advantage of having this as a control rather than a simple separate\n * DOM element is that preventing propagation is handled for you. Controls\n * will also be objects in a {@link module:ol/Collection~Collection}, so you can use their methods.\n *\n * You can also extend this base for your own control class. See\n * examples/custom-controls for an example of how to do this.\n *\n * @api\n */\nclass Control extends BaseObject {\n  /**\n   * @param {Options} options Control options.\n   */\n  constructor(options) {\n    super();\n\n    const element = options.element;\n    if (element && !options.target && !element.style.pointerEvents) {\n      element.style.pointerEvents = 'auto';\n    }\n\n    /**\n     * @protected\n     * @type {HTMLElement}\n     */\n    this.element = element ? element : null;\n\n    /**\n     * @private\n     * @type {HTMLElement}\n     */\n    this.target_ = null;\n\n    /**\n     * @private\n     * @type {import(\"../Map.js\").default|null}\n     */\n    this.map_ = null;\n\n    /**\n     * @protected\n     * @type {!Array<import(\"../events.js\").EventsKey>}\n     */\n    this.listenerKeys = [];\n\n    if (options.render) {\n      this.render = options.render;\n    }\n\n    if (options.target) {\n      this.setTarget(options.target);\n    }\n  }\n\n  /**\n   * Clean up.\n   * @override\n   */\n  disposeInternal() {\n    this.element?.remove();\n    super.disposeInternal();\n  }\n\n  /**\n   * Get the map associated with this control.\n   * @return {import(\"../Map.js\").default|null} Map.\n   * @api\n   */\n  getMap() {\n    return this.map_;\n  }\n\n  /**\n   * Remove the control from its current map and attach it to the new map.\n   * Pass `null` to just remove the control from the current map.\n   * Subclasses may set up event handlers to get notified about changes to\n   * the map here.\n   * @param {import(\"../Map.js\").default|null} map Map.\n   * @api\n   */\n  setMap(map) {\n    if (this.map_) {\n      this.element?.remove();\n    }\n    for (let i = 0, ii = this.listenerKeys.length; i < ii; ++i) {\n      unlistenByKey(this.listenerKeys[i]);\n    }\n    this.listenerKeys.length = 0;\n    this.map_ = map;\n    if (map) {\n      const target = this.target_ ?? map.getOverlayContainerStopEvent();\n      if (this.element) {\n        target.appendChild(this.element);\n      }\n      if (this.render !== VOID) {\n        this.listenerKeys.push(\n          listen(map, MapEventType.POSTRENDER, this.render, this),\n        );\n      }\n      map.render();\n    }\n  }\n\n  /**\n   * Renders the control.\n   * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n   * @api\n   */\n  render(mapEvent) {}\n\n  /**\n   * This function is used to set a target element for the control. It has no\n   * effect if it is called after the control has been added to the map (i.e.\n   * after `setMap` is called on the control). If no `target` is set in the\n   * options passed to the control constructor and if `setTarget` is not called\n   * then the control is added to the map's overlay container.\n   * @param {HTMLElement|string} target Target.\n   * @api\n   */\n  setTarget(target) {\n    this.target_ =\n      typeof target === 'string' ? document.getElementById(target) : target;\n  }\n}\n\nexport default Control;\n", "/**\n * @module ol/control/Attribution\n */\nimport {equals} from '../array.js';\nimport {CLASS_COLLAPSED, CLASS_CONTROL, CLASS_UNSELECTABLE} from '../css.js';\nimport {removeChildren, replaceNode} from '../dom.js';\nimport EventType from '../events/EventType.js';\nimport {toPromise} from '../functions.js';\nimport Control from './Control.js';\n\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-attribution'] CSS class name.\n * @property {HTMLElement|string} [target] Specify a target if you\n * want the control to be rendered outside of the map's\n * viewport.\n * @property {boolean} [collapsible] Specify if attributions can\n * be collapsed. If not specified, sources control this behavior with their\n * `attributionsCollapsible` setting.\n * @property {boolean} [collapsed=true] Specify if attributions should\n * be collapsed at startup.\n * @property {string} [tipLabel='Attributions'] Text label to use for the button tip.\n * @property {string|HTMLElement} [label='i'] Text label to use for the\n * collapsed attributions button.\n * Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {string} [expandClassName=className + '-expand'] CSS class name for the\n * collapsed attributions button.\n * @property {string|HTMLElement} [collapseLabel='\u203A'] Text label to use\n * for the expanded attributions button.\n * Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {string} [collapseClassName=className + '-collapse'] CSS class name for the\n * expanded attributions button.\n * @property {function(import(\"../MapEvent.js\").default):void} [render] Function called when\n * the control should be re-rendered. This is called in a `requestAnimationFrame`\n * callback.\n * @property {string|Array<string>|undefined} [attributions] Optional attribution(s) that will always be\n * displayed regardless of the layers rendered.\n * **Caution:** Attributions are rendered dynamically using `innerHTML`, which can lead to potential\n * [**XSS (Cross-Site Scripting)**](https://en.wikipedia.org/wiki/Cross-site_scripting) vulnerabilities.\n * Use this feature only for trusted content\n * or ensure that the content is properly sanitized before inserting it.\n */\n\n/**\n * @classdesc\n * Control to show all the attributions associated with the layer sources\n * in the map. This control is one of the default controls included in maps.\n * By default it will show in the bottom right portion of the map, but this can\n * be changed by using a css selector for `.ol-attribution`.\n *\n * @api\n */\nclass Attribution extends Control {\n  /**\n   * @param {Options} [options] Attribution options.\n   */\n  constructor(options) {\n    options = options ? options : {};\n\n    super({\n      element: document.createElement('div'),\n      render: options.render,\n      target: options.target,\n    });\n\n    /**\n     * @private\n     * @type {HTMLElement}\n     */\n    this.ulElement_ = document.createElement('ul');\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.collapsed_ =\n      options.collapsed !== undefined ? options.collapsed : true;\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.userCollapsed_ = this.collapsed_;\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.overrideCollapsible_ = options.collapsible !== undefined;\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.collapsible_ =\n      options.collapsible !== undefined ? options.collapsible : true;\n\n    if (!this.collapsible_) {\n      this.collapsed_ = false;\n    }\n\n    /**\n     * @private\n     * @type {string | Array<string> | undefined}\n     */\n    this.attributions_ = options.attributions;\n\n    const className =\n      options.className !== undefined ? options.className : 'ol-attribution';\n\n    const tipLabel =\n      options.tipLabel !== undefined ? options.tipLabel : 'Attributions';\n\n    const expandClassName =\n      options.expandClassName !== undefined\n        ? options.expandClassName\n        : className + '-expand';\n\n    const collapseLabel =\n      options.collapseLabel !== undefined ? options.collapseLabel : '\\u203A';\n\n    const collapseClassName =\n      options.collapseClassName !== undefined\n        ? options.collapseClassName\n        : className + '-collapse';\n\n    if (typeof collapseLabel === 'string') {\n      /**\n       * @private\n       * @type {HTMLElement}\n       */\n      this.collapseLabel_ = document.createElement('span');\n      this.collapseLabel_.textContent = collapseLabel;\n      this.collapseLabel_.className = collapseClassName;\n    } else {\n      this.collapseLabel_ = collapseLabel;\n    }\n\n    const label = options.label !== undefined ? options.label : 'i';\n\n    if (typeof label === 'string') {\n      /**\n       * @private\n       * @type {HTMLElement}\n       */\n      this.label_ = document.createElement('span');\n      this.label_.textContent = label;\n      this.label_.className = expandClassName;\n    } else {\n      this.label_ = label;\n    }\n\n    const activeLabel =\n      this.collapsible_ && !this.collapsed_ ? this.collapseLabel_ : this.label_;\n\n    /**\n     * @private\n     * @type {HTMLElement}\n     */\n    this.toggleButton_ = document.createElement('button');\n    this.toggleButton_.setAttribute('type', 'button');\n    this.toggleButton_.setAttribute('aria-expanded', String(!this.collapsed_));\n    this.toggleButton_.title = tipLabel;\n    this.toggleButton_.appendChild(activeLabel);\n\n    this.toggleButton_.addEventListener(\n      EventType.CLICK,\n      this.handleClick_.bind(this),\n      false,\n    );\n\n    const cssClasses =\n      className +\n      ' ' +\n      CLASS_UNSELECTABLE +\n      ' ' +\n      CLASS_CONTROL +\n      (this.collapsed_ && this.collapsible_ ? ' ' + CLASS_COLLAPSED : '') +\n      (this.collapsible_ ? '' : ' ol-uncollapsible');\n    const element = this.element;\n    element.className = cssClasses;\n    element.appendChild(this.toggleButton_);\n    element.appendChild(this.ulElement_);\n\n    /**\n     * A list of currently rendered resolutions.\n     * @type {Array<string>}\n     * @private\n     */\n    this.renderedAttributions_ = [];\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.renderedVisible_ = true;\n  }\n\n  /**\n   * Collect a list of visible attributions and set the collapsible state.\n   * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n   * @return {Array<string>} Attributions.\n   * @private\n   */\n  collectSourceAttributions_(frameState) {\n    const layers = this.getMap().getAllLayers();\n    const visibleAttributions = new Set(\n      layers.flatMap((layer) => layer.getAttributions(frameState)),\n    );\n    if (this.attributions_ !== undefined) {\n      Array.isArray(this.attributions_)\n        ? this.attributions_.forEach((item) => visibleAttributions.add(item))\n        : visibleAttributions.add(this.attributions_);\n    }\n\n    if (!this.overrideCollapsible_) {\n      const collapsible = !layers.some(\n        (layer) => layer.getSource()?.getAttributionsCollapsible() === false,\n      );\n      this.setCollapsible(collapsible);\n    }\n    return Array.from(visibleAttributions);\n  }\n\n  /**\n   * @private\n   * @param {?import(\"../Map.js\").FrameState} frameState Frame state.\n   */\n  async updateElement_(frameState) {\n    if (!frameState) {\n      if (this.renderedVisible_) {\n        this.element.style.display = 'none';\n        this.renderedVisible_ = false;\n      }\n      return;\n    }\n\n    const attributions = await Promise.all(\n      this.collectSourceAttributions_(frameState).map((attribution) =>\n        toPromise(() => attribution),\n      ),\n    );\n\n    const visible = attributions.length > 0;\n    if (this.renderedVisible_ != visible) {\n      this.element.style.display = visible ? '' : 'none';\n      this.renderedVisible_ = visible;\n    }\n\n    if (equals(attributions, this.renderedAttributions_)) {\n      return;\n    }\n\n    removeChildren(this.ulElement_);\n\n    // append the attributions\n    for (let i = 0, ii = attributions.length; i < ii; ++i) {\n      const element = document.createElement('li');\n      element.innerHTML = attributions[i];\n      this.ulElement_.appendChild(element);\n    }\n\n    this.renderedAttributions_ = attributions;\n  }\n\n  /**\n   * @param {MouseEvent} event The event to handle\n   * @private\n   */\n  handleClick_(event) {\n    event.preventDefault();\n    this.handleToggle_();\n    this.userCollapsed_ = this.collapsed_;\n  }\n\n  /**\n   * @private\n   */\n  handleToggle_() {\n    this.element.classList.toggle(CLASS_COLLAPSED);\n    if (this.collapsed_) {\n      replaceNode(this.collapseLabel_, this.label_);\n    } else {\n      replaceNode(this.label_, this.collapseLabel_);\n    }\n    this.collapsed_ = !this.collapsed_;\n    this.toggleButton_.setAttribute('aria-expanded', String(!this.collapsed_));\n  }\n\n  /**\n   * Return `true` if the attribution is collapsible, `false` otherwise.\n   * @return {boolean} True if the widget is collapsible.\n   * @api\n   */\n  getCollapsible() {\n    return this.collapsible_;\n  }\n\n  /**\n   * Set whether the attribution should be collapsible.\n   * @param {boolean} collapsible True if the widget is collapsible.\n   * @api\n   */\n  setCollapsible(collapsible) {\n    if (this.collapsible_ === collapsible) {\n      return;\n    }\n    this.collapsible_ = collapsible;\n    this.element.classList.toggle('ol-uncollapsible');\n    if (this.userCollapsed_) {\n      this.handleToggle_();\n    }\n  }\n\n  /**\n   * Collapse or expand the attribution according to the passed parameter. Will\n   * not do anything if the attribution isn't collapsible or if the current\n   * collapsed state is already the one requested.\n   * @param {boolean} collapsed True if the widget is collapsed.\n   * @api\n   */\n  setCollapsed(collapsed) {\n    this.userCollapsed_ = collapsed;\n    if (!this.collapsible_ || this.collapsed_ === collapsed) {\n      return;\n    }\n    this.handleToggle_();\n  }\n\n  /**\n   * Return `true` when the attribution is currently collapsed or `false`\n   * otherwise.\n   * @return {boolean} True if the widget is collapsed.\n   * @api\n   */\n  getCollapsed() {\n    return this.collapsed_;\n  }\n\n  /**\n   * Update the attribution element.\n   * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n   * @override\n   */\n  render(mapEvent) {\n    this.updateElement_(mapEvent.frameState);\n  }\n}\n\nexport default Attribution;\n", "/**\n * @module ol/control/Rotate\n */\nimport {CLASS_CONTROL, CLASS_HIDDEN, CLASS_UNSELECTABLE} from '../css.js';\nimport {easeOut} from '../easing.js';\nimport EventType from '../events/EventType.js';\nimport Control from './Control.js';\n\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-rotate'] CSS class name.\n * @property {string|HTMLElement} [label='\u21E7'] Text label to use for the rotate button.\n * Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {string} [tipLabel='Reset rotation'] Text label to use for the rotate tip.\n * @property {string} [compassClassName='ol-compass'] CSS class name for the compass.\n * @property {number} [duration=250] Animation duration in milliseconds.\n * @property {boolean} [autoHide=true] Hide the control when rotation is 0.\n * @property {function(import(\"../MapEvent.js\").default):void} [render] Function called when the control should\n * be re-rendered. This is called in a `requestAnimationFrame` callback.\n * @property {function():void} [resetNorth] Function called when the control is clicked.\n * This will override the default `resetNorth`.\n * @property {HTMLElement|string} [target] Specify a target if you want the control to be\n * rendered outside of the map's viewport.\n */\n\n/**\n * @classdesc\n * A button control to reset rotation to 0.\n * To style this control use css selector `.ol-rotate`. A `.ol-hidden` css\n * selector is added to the button when the rotation is 0.\n *\n * @api\n */\nclass Rotate extends Control {\n  /**\n   * @param {Options} [options] Rotate options.\n   */\n  constructor(options) {\n    options = options ? options : {};\n\n    super({\n      element: document.createElement('div'),\n      render: options.render,\n      target: options.target,\n    });\n\n    const className =\n      options.className !== undefined ? options.className : 'ol-rotate';\n\n    const label = options.label !== undefined ? options.label : '\\u21E7';\n\n    const compassClassName =\n      options.compassClassName !== undefined\n        ? options.compassClassName\n        : 'ol-compass';\n\n    /**\n     * @type {HTMLElement}\n     * @private\n     */\n    this.label_ = null;\n\n    if (typeof label === 'string') {\n      this.label_ = document.createElement('span');\n      this.label_.className = compassClassName;\n      this.label_.textContent = label;\n    } else {\n      this.label_ = label;\n      this.label_.classList.add(compassClassName);\n    }\n\n    const tipLabel = options.tipLabel ? options.tipLabel : 'Reset rotation';\n\n    const button = document.createElement('button');\n    button.className = className + '-reset';\n    button.setAttribute('type', 'button');\n    button.title = tipLabel;\n    button.appendChild(this.label_);\n\n    button.addEventListener(\n      EventType.CLICK,\n      this.handleClick_.bind(this),\n      false,\n    );\n\n    const cssClasses =\n      className + ' ' + CLASS_UNSELECTABLE + ' ' + CLASS_CONTROL;\n    const element = this.element;\n    element.className = cssClasses;\n    element.appendChild(button);\n\n    /**\n     * @private\n     */\n    this.callResetNorth_ = options.resetNorth ? options.resetNorth : undefined;\n\n    /**\n     * @type {number}\n     * @private\n     */\n    this.duration_ = options.duration !== undefined ? options.duration : 250;\n\n    /**\n     * @type {boolean}\n     * @private\n     */\n    this.autoHide_ = options.autoHide !== undefined ? options.autoHide : true;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.rotation_ = undefined;\n\n    if (this.autoHide_) {\n      this.element.classList.add(CLASS_HIDDEN);\n    }\n  }\n\n  /**\n   * @param {MouseEvent} event The event to handle\n   * @private\n   */\n  handleClick_(event) {\n    event.preventDefault();\n    if (this.callResetNorth_ !== undefined) {\n      this.callResetNorth_();\n    } else {\n      this.resetNorth_();\n    }\n  }\n\n  /**\n   * @private\n   */\n  resetNorth_() {\n    const map = this.getMap();\n    const view = map.getView();\n    if (!view) {\n      // the map does not have a view, so we can't act\n      // upon it\n      return;\n    }\n    const rotation = view.getRotation();\n    if (rotation !== undefined) {\n      if (this.duration_ > 0 && rotation % (2 * Math.PI) !== 0) {\n        view.animate({\n          rotation: 0,\n          duration: this.duration_,\n          easing: easeOut,\n        });\n      } else {\n        view.setRotation(0);\n      }\n    }\n  }\n\n  /**\n   * Update the rotate control element.\n   * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n   * @override\n   */\n  render(mapEvent) {\n    const frameState = mapEvent.frameState;\n    if (!frameState) {\n      return;\n    }\n    const rotation = frameState.viewState.rotation;\n    if (rotation != this.rotation_) {\n      const transform = 'rotate(' + rotation + 'rad)';\n      if (this.autoHide_) {\n        const contains = this.element.classList.contains(CLASS_HIDDEN);\n        if (!contains && rotation === 0) {\n          this.element.classList.add(CLASS_HIDDEN);\n        } else if (contains && rotation !== 0) {\n          this.element.classList.remove(CLASS_HIDDEN);\n        }\n      }\n      this.label_.style.transform = transform;\n    }\n    this.rotation_ = rotation;\n  }\n}\n\nexport default Rotate;\n", "/**\n * @module ol/control/Zoom\n */\nimport {CLASS_CONTROL, CLASS_UNSELECTABLE} from '../css.js';\nimport {easeOut} from '../easing.js';\nimport EventType from '../events/EventType.js';\nimport Control from './Control.js';\n\n/**\n * @typedef {Object} Options\n * @property {number} [duration=250] Animation duration in milliseconds.\n * @property {string} [className='ol-zoom'] CSS class name.\n * @property {string} [zoomInClassName=className + '-in'] CSS class name for the zoom-in button.\n * @property {string} [zoomOutClassName=className + '-out'] CSS class name for the zoom-out button.\n * @property {string|HTMLElement} [zoomInLabel='+'] Text label to use for the zoom-in\n * button. Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {string|HTMLElement} [zoomOutLabel='\u2013'] Text label to use for the zoom-out button.\n * Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {string} [zoomInTipLabel='Zoom in'] Text label to use for the button tip.\n * @property {string} [zoomOutTipLabel='Zoom out'] Text label to use for the button tip.\n * @property {number} [delta=1] The zoom delta applied on each click.\n * @property {HTMLElement|string} [target] Specify a target if you want the control to be\n * rendered outside of the map's viewport.\n */\n\n/**\n * @classdesc\n * A control with 2 buttons, one for zoom in and one for zoom out.\n * This control is one of the default controls of a map. To style this control\n * use css selectors `.ol-zoom-in` and `.ol-zoom-out`.\n *\n * @api\n */\nclass Zoom extends Control {\n  /**\n   * @param {Options} [options] Zoom options.\n   */\n  constructor(options) {\n    options = options ? options : {};\n\n    super({\n      element: document.createElement('div'),\n      target: options.target,\n    });\n\n    const className =\n      options.className !== undefined ? options.className : 'ol-zoom';\n\n    const delta = options.delta !== undefined ? options.delta : 1;\n\n    const zoomInClassName =\n      options.zoomInClassName !== undefined\n        ? options.zoomInClassName\n        : className + '-in';\n\n    const zoomOutClassName =\n      options.zoomOutClassName !== undefined\n        ? options.zoomOutClassName\n        : className + '-out';\n\n    const zoomInLabel =\n      options.zoomInLabel !== undefined ? options.zoomInLabel : '+';\n    const zoomOutLabel =\n      options.zoomOutLabel !== undefined ? options.zoomOutLabel : '\\u2013';\n\n    const zoomInTipLabel =\n      options.zoomInTipLabel !== undefined ? options.zoomInTipLabel : 'Zoom in';\n    const zoomOutTipLabel =\n      options.zoomOutTipLabel !== undefined\n        ? options.zoomOutTipLabel\n        : 'Zoom out';\n\n    const inElement = document.createElement('button');\n    inElement.className = zoomInClassName;\n    inElement.setAttribute('type', 'button');\n    inElement.title = zoomInTipLabel;\n    inElement.appendChild(\n      typeof zoomInLabel === 'string'\n        ? document.createTextNode(zoomInLabel)\n        : zoomInLabel,\n    );\n\n    inElement.addEventListener(\n      EventType.CLICK,\n      this.handleClick_.bind(this, delta),\n      false,\n    );\n\n    const outElement = document.createElement('button');\n    outElement.className = zoomOutClassName;\n    outElement.setAttribute('type', 'button');\n    outElement.title = zoomOutTipLabel;\n    outElement.appendChild(\n      typeof zoomOutLabel === 'string'\n        ? document.createTextNode(zoomOutLabel)\n        : zoomOutLabel,\n    );\n\n    outElement.addEventListener(\n      EventType.CLICK,\n      this.handleClick_.bind(this, -delta),\n      false,\n    );\n\n    const cssClasses =\n      className + ' ' + CLASS_UNSELECTABLE + ' ' + CLASS_CONTROL;\n    const element = this.element;\n    element.className = cssClasses;\n    element.appendChild(inElement);\n    element.appendChild(outElement);\n\n    /**\n     * @type {number}\n     * @private\n     */\n    this.duration_ = options.duration !== undefined ? options.duration : 250;\n  }\n\n  /**\n   * @param {number} delta Zoom delta.\n   * @param {MouseEvent} event The event to handle\n   * @private\n   */\n  handleClick_(delta, event) {\n    event.preventDefault();\n    this.zoomByDelta_(delta);\n  }\n\n  /**\n   * @param {number} delta Zoom delta.\n   * @private\n   */\n  zoomByDelta_(delta) {\n    const map = this.getMap();\n    const view = map.getView();\n    if (!view) {\n      // the map does not have a view, so we can't act\n      // upon it\n      return;\n    }\n    const currentZoom = view.getZoom();\n    if (currentZoom !== undefined) {\n      const newZoom = view.getConstrainedZoom(currentZoom + delta);\n      if (this.duration_ > 0) {\n        if (view.getAnimating()) {\n          view.cancelAnimations();\n        }\n        view.animate({\n          zoom: newZoom,\n          duration: this.duration_,\n          easing: easeOut,\n        });\n      } else {\n        view.setZoom(newZoom);\n      }\n    }\n  }\n}\n\nexport default Zoom;\n", "/**\n * @module ol/control/defaults\n */\nimport Collection from '../Collection.js';\nimport Attribution from './Attribution.js';\nimport Rotate from './Rotate.js';\nimport Zoom from './Zoom.js';\n\n/**\n * @typedef {Object} DefaultsOptions\n * @property {boolean} [attribution=true] Include\n * {@link module:ol/control/Attribution~Attribution}.\n * @property {import(\"./Attribution.js\").Options} [attributionOptions]\n * Options for {@link module:ol/control/Attribution~Attribution}.\n * @property {boolean} [rotate=true] Include\n * {@link module:ol/control/Rotate~Rotate}.\n * @property {import(\"./Rotate.js\").Options} [rotateOptions] Options\n * for {@link module:ol/control/Rotate~Rotate}.\n * @property {boolean} [zoom] Include {@link module:ol/control/Zoom~Zoom}.\n * @property {import(\"./Zoom.js\").Options} [zoomOptions] Options for\n * {@link module:ol/control/Zoom~Zoom}.\n */\n\n/**\n * Set of controls included in maps by default. Unless configured otherwise,\n * this returns a collection containing an instance of each of the following\n * controls:\n * {@link module:ol/control/Zoom~Zoom}\n * {@link module:ol/control/Rotate~Rotate}\n * {@link module:ol/control/Attribution~Attribution}\n *\n * @param {DefaultsOptions} [options] Options for the default controls.\n * @return {Collection<import(\"./Control.js\").default>} A collection of controls\n * to be used with the {@link module:ol/Map~Map} constructor's `controls` option.\n * @api\n */\nexport function defaults(options) {\n  options = options ? options : {};\n\n  /** @type {Collection<import(\"./Control.js\").default>} */\n  const controls = new Collection();\n\n  const zoomControl = options.zoom !== undefined ? options.zoom : true;\n  if (zoomControl) {\n    controls.push(new Zoom(options.zoomOptions));\n  }\n\n  const rotateControl = options.rotate !== undefined ? options.rotate : true;\n  if (rotateControl) {\n    controls.push(new Rotate(options.rotateOptions));\n  }\n\n  const attributionControl =\n    options.attribution !== undefined ? options.attribution : true;\n  if (attributionControl) {\n    controls.push(new Attribution(options.attributionOptions));\n  }\n\n  return controls;\n}\n", "/**\n * @module ol/Kinetic\n */\n\n/**\n * @classdesc\n * Implementation of inertial deceleration for map movement.\n *\n * @api\n */\nclass Kinetic {\n  /**\n   * @param {number} decay Rate of decay (must be negative).\n   * @param {number} minVelocity Minimum velocity (pixels/millisecond).\n   * @param {number} delay Delay to consider to calculate the kinetic\n   *     initial values (milliseconds).\n   */\n  constructor(decay, minVelocity, delay) {\n    /**\n     * @private\n     * @type {number}\n     */\n    this.decay_ = decay;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.minVelocity_ = minVelocity;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.delay_ = delay;\n\n    /**\n     * @private\n     * @type {Array<number>}\n     */\n    this.points_ = [];\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.angle_ = 0;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.initialVelocity_ = 0;\n  }\n\n  /**\n   * FIXME empty description for jsdoc\n   */\n  begin() {\n    this.points_.length = 0;\n    this.angle_ = 0;\n    this.initialVelocity_ = 0;\n  }\n\n  /**\n   * @param {number} x X.\n   * @param {number} y Y.\n   */\n  update(x, y) {\n    this.points_.push(x, y, Date.now());\n  }\n\n  /**\n   * @return {boolean} Whether we should do kinetic animation.\n   */\n  end() {\n    if (this.points_.length < 6) {\n      // at least 2 points are required (i.e. there must be at least 6 elements\n      // in the array)\n      return false;\n    }\n    const delay = Date.now() - this.delay_;\n    const lastIndex = this.points_.length - 3;\n    if (this.points_[lastIndex + 2] < delay) {\n      // the last tracked point is too old, which means that the user stopped\n      // panning before releasing the map\n      return false;\n    }\n\n    // get the first point which still falls into the delay time\n    let firstIndex = lastIndex - 3;\n    while (firstIndex > 0 && this.points_[firstIndex + 2] > delay) {\n      firstIndex -= 3;\n    }\n\n    const duration = this.points_[lastIndex + 2] - this.points_[firstIndex + 2];\n    // we don't want a duration of 0 (divide by zero)\n    // we also make sure the user panned for a duration of at least one frame\n    // (1/60s) to compute sane displacement values\n    if (duration < 1000 / 60) {\n      return false;\n    }\n\n    const dx = this.points_[lastIndex] - this.points_[firstIndex];\n    const dy = this.points_[lastIndex + 1] - this.points_[firstIndex + 1];\n    this.angle_ = Math.atan2(dy, dx);\n    this.initialVelocity_ = Math.sqrt(dx * dx + dy * dy) / duration;\n    return this.initialVelocity_ > this.minVelocity_;\n  }\n\n  /**\n   * @return {number} Total distance travelled (pixels).\n   */\n  getDistance() {\n    return (this.minVelocity_ - this.initialVelocity_) / this.decay_;\n  }\n\n  /**\n   * @return {number} Angle of the kinetic panning animation (radians).\n   */\n  getAngle() {\n    return this.angle_;\n  }\n}\n\nexport default Kinetic;\n", "/**\n * @module ol/interaction/DoubleClickZoom\n */\nimport MapBrowserEventType from '../MapBrowserEventType.js';\nimport Interaction, {zoomByDelta} from './Interaction.js';\n\n/**\n * @typedef {Object} Options\n * @property {number} [duration=250] Animation duration in milliseconds.\n * @property {number} [delta=1] The zoom delta applied on each double click.\n */\n\n/**\n * @classdesc\n * Allows the user to zoom by double-clicking on the map.\n * @api\n */\nclass DoubleClickZoom extends Interaction {\n  /**\n   * @param {Options} [options] Options.\n   */\n  constructor(options) {\n    super();\n\n    options = options ? options : {};\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.delta_ = options.delta ? options.delta : 1;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.duration_ = options.duration !== undefined ? options.duration : 250;\n  }\n\n  /**\n   * Handles the {@link module:ol/MapBrowserEvent~MapBrowserEvent map browser event} (if it was a\n   * doubleclick) and eventually zooms the map.\n   * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n   * @return {boolean} `false` to stop event propagation.\n   * @override\n   */\n  handleEvent(mapBrowserEvent) {\n    let stopEvent = false;\n    if (mapBrowserEvent.type == MapBrowserEventType.DBLCLICK) {\n      const browserEvent = /** @type {MouseEvent} */ (\n        mapBrowserEvent.originalEvent\n      );\n      const map = mapBrowserEvent.map;\n      const anchor = mapBrowserEvent.coordinate;\n      const delta = browserEvent.shiftKey ? -this.delta_ : this.delta_;\n      const view = map.getView();\n      zoomByDelta(view, delta, anchor, this.duration_);\n      browserEvent.preventDefault();\n      stopEvent = true;\n    }\n    return !stopEvent;\n  }\n}\n\nexport default DoubleClickZoom;\n", "/**\n * @module ol/events/condition\n */\nimport MapBrowserEventType from '../MapBrowserEventType.js';\nimport {FALSE, TRUE} from '../functions.js';\nimport {MAC, WEBKIT} from '../has.js';\n\n/**\n * A function that takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * `{boolean}`. If the condition is met, true should be returned.\n *\n * @typedef {function(this: ?, import(\"../MapBrowserEvent.js\").default): boolean} Condition\n */\n\n/**\n * Creates a condition function that passes when all provided conditions pass.\n * @param {...Condition} var_args Conditions to check.\n * @return {Condition} Condition function.\n */\nexport function all(var_args) {\n  const conditions = arguments;\n  /**\n   * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n   * @return {boolean} All conditions passed.\n   */\n  return function (event) {\n    let pass = true;\n    for (let i = 0, ii = conditions.length; i < ii; ++i) {\n      pass = pass && conditions[i](event);\n      if (!pass) {\n        break;\n      }\n    }\n    return pass;\n  };\n}\n\n/**\n * Return `true` if only the alt-key is pressed, `false` otherwise (e.g. when\n * additionally the shift-key is pressed).\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if only the alt key is pressed.\n * @api\n */\nexport const altKeyOnly = function (mapBrowserEvent) {\n  const originalEvent = mapBrowserEvent.originalEvent;\n  return (\n    originalEvent.altKey &&\n    !(originalEvent.metaKey || originalEvent.ctrlKey) &&\n    !originalEvent.shiftKey\n  );\n};\n\n/**\n * Return `true` if only the alt-key and shift-key is pressed, `false` otherwise\n * (e.g. when additionally the platform-modifier-key is pressed).\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if only the alt and shift keys are pressed.\n * @api\n */\nexport const altShiftKeysOnly = function (mapBrowserEvent) {\n  const originalEvent = mapBrowserEvent.originalEvent;\n  return (\n    originalEvent.altKey &&\n    !(originalEvent.metaKey || originalEvent.ctrlKey) &&\n    originalEvent.shiftKey\n  );\n};\n\n/**\n * Return `true` if the map has the focus. This condition requires a map target\n * element with a `tabindex` attribute, e.g. `<div id=\"map\" tabindex=\"1\">`.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} event Map browser event.\n * @return {boolean} The map has the focus.\n * @api\n */\nexport const focus = function (event) {\n  const targetElement = event.map.getTargetElement();\n  const rootNode = targetElement.getRootNode();\n  const activeElement = event.map.getOwnerDocument().activeElement;\n\n  return rootNode instanceof ShadowRoot\n    ? rootNode.host.contains(activeElement)\n    : targetElement.contains(activeElement);\n};\n\n/**\n * Return `true` if the map has the focus or no 'tabindex' attribute set.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} event Map browser event.\n * @return {boolean} The map container has the focus or no 'tabindex' attribute.\n */\nexport const focusWithTabindex = function (event) {\n  const targetElement = event.map.getTargetElement();\n  const rootNode = targetElement.getRootNode();\n  const tabIndexCandidate =\n    rootNode instanceof ShadowRoot ? rootNode.host : targetElement;\n\n  return tabIndexCandidate.hasAttribute('tabindex') ? focus(event) : true;\n};\n\n/**\n * Return always true.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True.\n * @api\n */\nexport const always = TRUE;\n\n/**\n * Return `true` if the event is a `click` event, `false` otherwise.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the event is a map `click` event.\n * @api\n */\nexport const click = function (mapBrowserEvent) {\n  return mapBrowserEvent.type == MapBrowserEventType.CLICK;\n};\n\n/**\n * Return `true` if the event 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 * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} The result.\n */\nexport const mouseActionButton = function (mapBrowserEvent) {\n  const originalEvent = mapBrowserEvent.originalEvent;\n  return (\n    'pointerId' in originalEvent &&\n    originalEvent.button == 0 &&\n    !(WEBKIT && MAC && originalEvent.ctrlKey)\n  );\n};\n\n/**\n * Return always false.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} False.\n * @api\n */\nexport const never = FALSE;\n\n/**\n * Return `true` if the browser event is a `pointermove` event, `false`\n * otherwise.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the browser event is a `pointermove` event.\n * @api\n */\nexport const pointerMove = function (mapBrowserEvent) {\n  return mapBrowserEvent.type == 'pointermove';\n};\n\n/**\n * Return `true` if the event is a map `singleclick` event, `false` otherwise.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the event is a map `singleclick` event.\n * @api\n */\nexport const singleClick = function (mapBrowserEvent) {\n  return mapBrowserEvent.type == MapBrowserEventType.SINGLECLICK;\n};\n\n/**\n * Return `true` if the event is a map `dblclick` event, `false` otherwise.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the event is a map `dblclick` event.\n * @api\n */\nexport const doubleClick = function (mapBrowserEvent) {\n  return mapBrowserEvent.type == MapBrowserEventType.DBLCLICK;\n};\n\n/**\n * Return `true` if no modifier key (alt-, shift- or platform-modifier-key) is\n * pressed.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True only if there no modifier keys are pressed.\n * @api\n */\nexport const noModifierKeys = function (mapBrowserEvent) {\n  const originalEvent = /** @type {KeyboardEvent|MouseEvent|TouchEvent} */ (\n    mapBrowserEvent.originalEvent\n  );\n  return (\n    !originalEvent.altKey &&\n    !(originalEvent.metaKey || originalEvent.ctrlKey) &&\n    !originalEvent.shiftKey\n  );\n};\n\n/**\n * Return `true` if only the platform-modifier-key (the meta-key on Mac,\n * ctrl-key otherwise) is pressed, `false` otherwise (e.g. when additionally\n * the shift-key is pressed).\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if only the platform modifier key is pressed.\n * @api\n */\nexport const platformModifierKeyOnly = function (mapBrowserEvent) {\n  const originalEvent = mapBrowserEvent.originalEvent;\n  return (\n    !originalEvent.altKey &&\n    (MAC ? originalEvent.metaKey : originalEvent.ctrlKey) &&\n    !originalEvent.shiftKey\n  );\n};\n\n/**\n * Return `true` if the platform-modifier-key (the meta-key on Mac,\n * ctrl-key otherwise) is pressed.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the platform modifier key is pressed.\n * @api\n */\nexport const platformModifierKey = function (mapBrowserEvent) {\n  const originalEvent = mapBrowserEvent.originalEvent;\n  return MAC ? originalEvent.metaKey : originalEvent.ctrlKey;\n};\n\n/**\n * Return `true` if only the shift-key is pressed, `false` otherwise (e.g. when\n * additionally the alt-key is pressed).\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if only the shift key is pressed.\n * @api\n */\nexport const shiftKeyOnly = function (mapBrowserEvent) {\n  const originalEvent = mapBrowserEvent.originalEvent;\n  return (\n    !originalEvent.altKey &&\n    !(originalEvent.metaKey || originalEvent.ctrlKey) &&\n    originalEvent.shiftKey\n  );\n};\n\n/**\n * Return `true` if the target element is not editable, i.e. not an `input`,\n * `select`, or `textarea` element and no `contenteditable` attribute is\n * set or inherited, `false` otherwise.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True only if the target element is not editable.\n * @api\n */\nexport const targetNotEditable = function (mapBrowserEvent) {\n  const originalEvent = mapBrowserEvent.originalEvent;\n  const tagName = /** @type {Element} */ (originalEvent.target).tagName;\n  return (\n    tagName !== 'INPUT' &&\n    tagName !== 'SELECT' &&\n    tagName !== 'TEXTAREA' &&\n    // `isContentEditable` is only available on `HTMLElement`, but it may also be a\n    // different type like `SVGElement`.\n    // @ts-ignore\n    !originalEvent.target.isContentEditable\n  );\n};\n\n/**\n * Return `true` if the event originates from a mouse device.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the event originates from a mouse device.\n * @api\n */\nexport const mouseOnly = function (mapBrowserEvent) {\n  const pointerEvent = mapBrowserEvent.originalEvent;\n  // see https://www.w3.org/TR/pointerevents/#widl-PointerEvent-pointerType\n  return 'pointerId' in pointerEvent && pointerEvent.pointerType == 'mouse';\n};\n\n/**\n * Return `true` if the event originates from a touchable device.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the event originates from a touchable device.\n * @api\n */\nexport const touchOnly = function (mapBrowserEvent) {\n  const pointerEvt = mapBrowserEvent.originalEvent;\n  // see https://www.w3.org/TR/pointerevents/#widl-PointerEvent-pointerType\n  return 'pointerId' in pointerEvt && pointerEvt.pointerType === 'touch';\n};\n\n/**\n * Return `true` if the event originates from a digital pen.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the event originates from a digital pen.\n * @api\n */\nexport const penOnly = function (mapBrowserEvent) {\n  const pointerEvt = mapBrowserEvent.originalEvent;\n  // see https://www.w3.org/TR/pointerevents/#widl-PointerEvent-pointerType\n  return 'pointerId' in pointerEvt && pointerEvt.pointerType === 'pen';\n};\n\n/**\n * Return `true` if the event originates from a primary pointer in\n * contact with the surface or if the left mouse button is pressed.\n * See https://www.w3.org/TR/pointerevents/#button-states.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the event originates from a primary pointer.\n * @api\n */\nexport const primaryAction = function (mapBrowserEvent) {\n  const pointerEvent = mapBrowserEvent.originalEvent;\n  return (\n    'pointerId' in pointerEvent &&\n    pointerEvent.isPrimary &&\n    pointerEvent.button === 0\n  );\n};\n", "/**\n * @module ol/interaction/DragPan\n */\nimport {\n  rotate as rotateCoordinate,\n  scale as scaleCoordinate,\n} from '../coordinate.js';\nimport {easeOut} from '../easing.js';\nimport {\n  all,\n  focusWithTabindex,\n  noModifierKeys,\n  primaryAction,\n} from '../events/condition.js';\nimport {FALSE} from '../functions.js';\nimport PointerInteraction, {\n  centroid as centroidFromPointers,\n} from './Pointer.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean\n * to indicate whether that event should be handled.\n * Default is {@link module:ol/events/condition.noModifierKeys} and {@link module:ol/events/condition.primaryAction}.\n * @property {boolean} [onFocusOnly=false] When the map's target has a `tabindex` attribute set,\n * the interaction will only handle events when the map has the focus.\n * @property {import(\"../Kinetic.js\").default} [kinetic] Kinetic inertia to apply to the pan.\n */\n\n/**\n * @classdesc\n * Allows the user to pan the map by dragging the map.\n * @api\n */\nclass DragPan extends PointerInteraction {\n  /**\n   * @param {Options} [options] Options.\n   */\n  constructor(options) {\n    super({\n      stopDown: FALSE,\n    });\n\n    options = options ? options : {};\n\n    /**\n     * @private\n     * @type {import(\"../Kinetic.js\").default|undefined}\n     */\n    this.kinetic_ = options.kinetic;\n\n    /**\n     * @type {import(\"../pixel.js\").Pixel}\n     */\n    this.lastCentroid = null;\n\n    /**\n     * @type {number}\n     * @private\n     */\n    this.lastPointersCount_;\n\n    /**\n     * @type {boolean}\n     * @private\n     */\n    this.panning_ = false;\n\n    const condition = options.condition\n      ? options.condition\n      : all(noModifierKeys, primaryAction);\n\n    /**\n     * @private\n     * @type {import(\"../events/condition.js\").Condition}\n     */\n    this.condition_ = options.onFocusOnly\n      ? all(focusWithTabindex, condition)\n      : condition;\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.noKinetic_ = false;\n  }\n\n  /**\n   * Handle pointer drag events.\n   * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n   * @override\n   */\n  handleDragEvent(mapBrowserEvent) {\n    const map = mapBrowserEvent.map;\n    if (!this.panning_) {\n      this.panning_ = true;\n      map.getView().beginInteraction();\n    }\n    const targetPointers = this.targetPointers;\n    const centroid = map.getEventPixel(centroidFromPointers(targetPointers));\n    if (targetPointers.length == this.lastPointersCount_) {\n      if (this.kinetic_) {\n        this.kinetic_.update(centroid[0], centroid[1]);\n      }\n      if (this.lastCentroid) {\n        const delta = [\n          this.lastCentroid[0] - centroid[0],\n          centroid[1] - this.lastCentroid[1],\n        ];\n        const map = mapBrowserEvent.map;\n        const view = map.getView();\n        scaleCoordinate(delta, view.getResolution());\n        rotateCoordinate(delta, view.getRotation());\n        view.adjustCenterInternal(delta);\n      }\n    } else if (this.kinetic_) {\n      // reset so we don't overestimate the kinetic energy after\n      // after one finger down, tiny drag, second finger down\n      this.kinetic_.begin();\n    }\n    this.lastCentroid = centroid;\n    this.lastPointersCount_ = targetPointers.length;\n    mapBrowserEvent.originalEvent.preventDefault();\n  }\n\n  /**\n   * Handle pointer up events.\n   * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n   * @return {boolean} If the event was consumed.\n   * @override\n   */\n  handleUpEvent(mapBrowserEvent) {\n    const map = mapBrowserEvent.map;\n    const view = map.getView();\n    if (this.targetPointers.length === 0) {\n      if (!this.noKinetic_ && this.kinetic_ && this.kinetic_.end()) {\n        const distance = this.kinetic_.getDistance();\n        const angle = this.kinetic_.getAngle();\n        const center = view.getCenterInternal();\n        const centerpx = map.getPixelFromCoordinateInternal(center);\n        const dest = map.getCoordinateFromPixelInternal([\n          centerpx[0] - distance * Math.cos(angle),\n          centerpx[1] - distance * Math.sin(angle),\n        ]);\n        view.animateInternal({\n          center: view.getConstrainedCenter(dest),\n          duration: 500,\n          easing: easeOut,\n        });\n      }\n      if (this.panning_) {\n        this.panning_ = false;\n        view.endInteraction();\n      }\n      return false;\n    }\n    if (this.kinetic_) {\n      // reset so we don't overestimate the kinetic energy after\n      // after one finger up, tiny drag, second finger up\n      this.kinetic_.begin();\n    }\n    this.lastCentroid = null;\n    return true;\n  }\n\n  /**\n   * Handle pointer down events.\n   * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n   * @return {boolean} If the event was consumed.\n   * @override\n   */\n  handleDownEvent(mapBrowserEvent) {\n    if (this.targetPointers.length > 0 && this.condition_(mapBrowserEvent)) {\n      const map = mapBrowserEvent.map;\n      const view = map.getView();\n      this.lastCentroid = null;\n      // stop any current animation\n      if (view.getAnimating()) {\n        view.cancelAnimations();\n      }\n      if (this.kinetic_) {\n        this.kinetic_.begin();\n      }\n      // No kinetic as soon as more than one pointer on the screen is\n      // detected. This is to prevent nasty pans after pinch.\n      this.noKinetic_ = this.targetPointers.length > 1;\n      return true;\n    }\n    return false;\n  }\n}\n\nexport default DragPan;\n", "/**\n * @module ol/interaction/DragRotate\n */\nimport {\n  altShiftKeysOnly,\n  mouseActionButton,\n  mouseOnly,\n} from '../events/condition.js';\nimport {FALSE} from '../functions.js';\nimport {disable} from '../rotationconstraint.js';\nimport PointerInteraction from './Pointer.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that takes a\n * {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean\n * to indicate whether that event should be handled.\n * Default is {@link module:ol/events/condition.altShiftKeysOnly}.\n * @property {number} [duration=250] Animation duration in milliseconds.\n */\n\n/**\n * @classdesc\n * Allows the user to rotate the map by clicking and dragging on the map,\n * normally combined with a {@link module:ol/events/condition} that limits\n * it to when the alt and shift keys are held down.\n *\n * This interaction is only supported for mouse devices.\n * @api\n */\nclass DragRotate extends PointerInteraction {\n  /**\n   * @param {Options} [options] Options.\n   */\n  constructor(options) {\n    options = options ? options : {};\n\n    super({\n      stopDown: FALSE,\n    });\n\n    /**\n     * @private\n     * @type {import(\"../events/condition.js\").Condition}\n     */\n    this.condition_ = options.condition ? options.condition : altShiftKeysOnly;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.lastAngle_ = undefined;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.duration_ = options.duration !== undefined ? options.duration : 250;\n  }\n\n  /**\n   * Handle pointer drag events.\n   * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n   * @override\n   */\n  handleDragEvent(mapBrowserEvent) {\n    if (!mouseOnly(mapBrowserEvent)) {\n      return;\n    }\n\n    const map = mapBrowserEvent.map;\n    const view = map.getView();\n    if (view.getConstraints().rotation === disable) {\n      return;\n    }\n    const size = map.getSize();\n    const offset = mapBrowserEvent.pixel;\n    const theta = Math.atan2(size[1] / 2 - offset[1], offset[0] - size[0] / 2);\n    if (this.lastAngle_ !== undefined) {\n      const delta = theta - this.lastAngle_;\n      view.adjustRotationInternal(-delta);\n    }\n    this.lastAngle_ = theta;\n  }\n\n  /**\n   * Handle pointer up events.\n   * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n   * @return {boolean} If the event was consumed.\n   * @override\n   */\n  handleUpEvent(mapBrowserEvent) {\n    if (!mouseOnly(mapBrowserEvent)) {\n      return true;\n    }\n\n    const map = mapBrowserEvent.map;\n    const view = map.getView();\n    view.endInteraction(this.duration_);\n    return false;\n  }\n\n  /**\n   * Handle pointer down events.\n   * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n   * @return {boolean} If the event was consumed.\n   * @override\n   */\n  handleDownEvent(mapBrowserEvent) {\n    if (!mouseOnly(mapBrowserEvent)) {\n      return false;\n    }\n\n    if (\n      mouseActionButton(mapBrowserEvent) &&\n      this.condition_(mapBrowserEvent)\n    ) {\n      const map = mapBrowserEvent.map;\n      map.getView().beginInteraction();\n      this.lastAngle_ = undefined;\n      return true;\n    }\n    return false;\n  }\n}\n\nexport default DragRotate;\n", "/**\n * @module ol/render/Box\n */\n\nimport Disposable from '../Disposable.js';\nimport Polygon from '../geom/Polygon.js';\n\nclass RenderBox extends Disposable {\n  /**\n   * @param {string} className CSS class name.\n   */\n  constructor(className) {\n    super();\n\n    /**\n     * @type {import(\"../geom/Polygon.js\").default}\n     * @private\n     */\n    this.geometry_ = null;\n\n    /**\n     * @type {HTMLDivElement}\n     * @private\n     */\n    this.element_ = document.createElement('div');\n    this.element_.style.position = 'absolute';\n    this.element_.style.pointerEvents = 'auto';\n    this.element_.className = 'ol-box ' + className;\n\n    /**\n     * @private\n     * @type {import(\"../Map.js\").default|null}\n     */\n    this.map_ = null;\n\n    /**\n     * @private\n     * @type {import(\"../pixel.js\").Pixel}\n     */\n    this.startPixel_ = null;\n\n    /**\n     * @private\n     * @type {import(\"../pixel.js\").Pixel}\n     */\n    this.endPixel_ = null;\n  }\n\n  /**\n   * Clean up.\n   * @override\n   */\n  disposeInternal() {\n    this.setMap(null);\n  }\n\n  /**\n   * @private\n   */\n  render_() {\n    const startPixel = this.startPixel_;\n    const endPixel = this.endPixel_;\n    const px = 'px';\n    const style = this.element_.style;\n    style.left = Math.min(startPixel[0], endPixel[0]) + px;\n    style.top = Math.min(startPixel[1], endPixel[1]) + px;\n    style.width = Math.abs(endPixel[0] - startPixel[0]) + px;\n    style.height = Math.abs(endPixel[1] - startPixel[1]) + px;\n  }\n\n  /**\n   * @param {import(\"../Map.js\").default|null} map Map.\n   */\n  setMap(map) {\n    if (this.map_) {\n      this.map_.getOverlayContainer().removeChild(this.element_);\n      const style = this.element_.style;\n      style.left = 'inherit';\n      style.top = 'inherit';\n      style.width = 'inherit';\n      style.height = 'inherit';\n    }\n    this.map_ = map;\n    if (this.map_) {\n      this.map_.getOverlayContainer().appendChild(this.element_);\n    }\n  }\n\n  /**\n   * @param {import(\"../pixel.js\").Pixel} startPixel Start pixel.\n   * @param {import(\"../pixel.js\").Pixel} endPixel End pixel.\n   */\n  setPixels(startPixel, endPixel) {\n    this.startPixel_ = startPixel;\n    this.endPixel_ = endPixel;\n    this.createOrUpdateGeometry();\n    this.render_();\n  }\n\n  /**\n   * Creates or updates the cached geometry.\n   */\n  createOrUpdateGeometry() {\n    if (!this.map_) {\n      return;\n    }\n\n    const startPixel = this.startPixel_;\n    const endPixel = this.endPixel_;\n    const pixels = [\n      startPixel,\n      [startPixel[0], endPixel[1]],\n      endPixel,\n      [endPixel[0], startPixel[1]],\n    ];\n    const coordinates = pixels.map(\n      this.map_.getCoordinateFromPixelInternal,\n      this.map_,\n    );\n    // close the polygon\n    coordinates[4] = coordinates[0].slice();\n    if (!this.geometry_) {\n      this.geometry_ = new Polygon([coordinates]);\n    } else {\n      this.geometry_.setCoordinates([coordinates]);\n    }\n  }\n\n  /**\n   * @return {import(\"../geom/Polygon.js\").default} Geometry.\n   */\n  getGeometry() {\n    return this.geometry_;\n  }\n}\n\nexport default RenderBox;\n", "/**\n * @module ol/interaction/DragBox\n */\n// FIXME draw drag box\nimport Event from '../events/Event.js';\nimport {mouseActionButton} from '../events/condition.js';\nimport RenderBox from '../render/Box.js';\nimport PointerInteraction from './Pointer.js';\n\n/**\n * A function that takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and two\n * {@link module:ol/pixel~Pixel}s and returns a `{boolean}`. If the condition is met,\n * true should be returned.\n * @typedef {function(this: ?, import(\"../MapBrowserEvent.js\").default, import(\"../pixel.js\").Pixel, import(\"../pixel.js\").Pixel):boolean} EndCondition\n */\n\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-dragbox'] CSS class name for styling the box.\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean\n * to indicate whether that event should be handled.\n * Default is {@link ol/events/condition~mouseActionButton}.\n * @property {number} [minArea=64] The minimum area of the box in pixel, this value is used by the default\n * `boxEndCondition` function.\n * @property {EndCondition} [boxEndCondition] A function that takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and two\n * {@link module:ol/pixel~Pixel}s to indicate whether a `boxend` event should be fired.\n * Default is `true` if the area of the box is bigger than the `minArea` option.\n * @property {function(this:DragBox, import(\"../MapBrowserEvent.js\").default):void} [onBoxEnd] Code to execute just\n * before `boxend` is fired.\n */\n\n/**\n * @enum {string}\n */\nconst DragBoxEventType = {\n  /**\n   * Triggered upon drag box start.\n   * @event DragBoxEvent#boxstart\n   * @api\n   */\n  BOXSTART: 'boxstart',\n\n  /**\n   * Triggered on drag when box is active.\n   * @event DragBoxEvent#boxdrag\n   * @api\n   */\n  BOXDRAG: 'boxdrag',\n\n  /**\n   * Triggered upon drag box end.\n   * @event DragBoxEvent#boxend\n   * @api\n   */\n  BOXEND: 'boxend',\n\n  /**\n   * Triggered upon drag box canceled.\n   * @event DragBoxEvent#boxcancel\n   * @api\n   */\n  BOXCANCEL: 'boxcancel',\n};\n\n/**\n * @classdesc\n * Events emitted by {@link module:ol/interaction/DragBox~DragBox} instances are instances of\n * this type.\n */\nexport class DragBoxEvent extends Event {\n  /**\n   * @param {string} type The event type.\n   * @param {import(\"../coordinate.js\").Coordinate} coordinate The event coordinate.\n   * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Originating event.\n   */\n  constructor(type, coordinate, mapBrowserEvent) {\n    super(type);\n\n    /**\n     * The coordinate of the drag event.\n     * @const\n     * @type {import(\"../coordinate.js\").Coordinate}\n     * @api\n     */\n    this.coordinate = coordinate;\n\n    /**\n     * @const\n     * @type {import(\"../MapBrowserEvent.js\").default}\n     * @api\n     */\n    this.mapBrowserEvent = mapBrowserEvent;\n  }\n}\n\n/***\n * @template Return\n * @typedef {import(\"../Observable.js\").OnSignature<import(\"../Observable.js\").EventTypes, import(\"../events/Event.js\").default, Return> &\n *   import(\"../Observable.js\").OnSignature<import(\"../ObjectEventType.js\").Types|\n *     'change:active', import(\"../Object.js\").ObjectEvent, Return> &\n *   import(\"../Observable.js\").OnSignature<'boxcancel'|'boxdrag'|'boxend'|'boxstart', DragBoxEvent, Return> &\n *   import(\"../Observable.js\").CombinedOnSignature<import(\"../Observable.js\").EventTypes|import(\"../ObjectEventType.js\").Types|\n *     'change:active'|'boxcancel'|'boxdrag'|'boxend', Return>} DragBoxOnSignature\n */\n\n/**\n * @classdesc\n * Allows the user to draw a vector box by clicking and dragging on the map,\n * normally combined with a {@link module:ol/events/condition} that limits\n * it to when the shift or other key is held down. This is used, for example,\n * for zooming to a specific area of the map\n * (see {@link module:ol/interaction/DragZoom~DragZoom} and\n * {@link module:ol/interaction/DragRotateAndZoom~DragRotateAndZoom}).\n *\n * @fires DragBoxEvent\n * @api\n */\nclass DragBox extends PointerInteraction {\n  /**\n   * @param {Options} [options] Options.\n   */\n  constructor(options) {\n    super();\n\n    /***\n     * @type {DragBoxOnSignature<import(\"../events.js\").EventsKey>}\n     */\n    this.on;\n\n    /***\n     * @type {DragBoxOnSignature<import(\"../events.js\").EventsKey>}\n     */\n    this.once;\n\n    /***\n     * @type {DragBoxOnSignature<void>}\n     */\n    this.un;\n\n    options = options ?? {};\n\n    /**\n     * @type {import(\"../render/Box.js\").default}\n     * @private\n     */\n    this.box_ = new RenderBox(options.className || 'ol-dragbox');\n\n    /**\n     * @type {number}\n     * @private\n     */\n    this.minArea_ = options.minArea ?? 64;\n\n    if (options.onBoxEnd) {\n      this.onBoxEnd = options.onBoxEnd;\n    }\n\n    /**\n     * @type {import(\"../pixel.js\").Pixel}\n     * @private\n     */\n    this.startPixel_ = null;\n\n    /**\n     * @private\n     * @type {import(\"../events/condition.js\").Condition}\n     */\n    this.condition_ = options.condition ?? mouseActionButton;\n\n    /**\n     * @private\n     * @type {EndCondition}\n     */\n    this.boxEndCondition_ =\n      options.boxEndCondition ?? this.defaultBoxEndCondition;\n  }\n\n  /**\n   * The default condition for determining whether the boxend event\n   * should fire.\n   * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent The originating MapBrowserEvent\n   *     leading to the box end.\n   * @param {import(\"../pixel.js\").Pixel} startPixel The starting pixel of the box.\n   * @param {import(\"../pixel.js\").Pixel} endPixel The end pixel of the box.\n   * @return {boolean} Whether or not the boxend condition should be fired.\n   */\n  defaultBoxEndCondition(mapBrowserEvent, startPixel, endPixel) {\n    const width = endPixel[0] - startPixel[0];\n    const height = endPixel[1] - startPixel[1];\n    return width * width + height * height >= this.minArea_;\n  }\n\n  /**\n   * Returns geometry of last drawn box.\n   * @return {import(\"../geom/Polygon.js\").default} Geometry.\n   * @api\n   */\n  getGeometry() {\n    return this.box_.getGeometry();\n  }\n\n  /**\n   * Handle pointer drag events.\n   * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n   * @override\n   */\n  handleDragEvent(mapBrowserEvent) {\n    if (!this.startPixel_) {\n      return;\n    }\n\n    this.box_.setPixels(this.startPixel_, mapBrowserEvent.pixel);\n\n    this.dispatchEvent(\n      new DragBoxEvent(\n        DragBoxEventType.BOXDRAG,\n        mapBrowserEvent.coordinate,\n        mapBrowserEvent,\n      ),\n    );\n  }\n\n  /**\n   * Handle pointer up events.\n   * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n   * @return {boolean} If the event was consumed.\n   * @override\n   */\n  handleUpEvent(mapBrowserEvent) {\n    if (!this.startPixel_) {\n      return false;\n    }\n\n    const completeBox = this.boxEndCondition_(\n      mapBrowserEvent,\n      this.startPixel_,\n      mapBrowserEvent.pixel,\n    );\n    if (completeBox) {\n      this.onBoxEnd(mapBrowserEvent);\n    }\n    this.dispatchEvent(\n      new DragBoxEvent(\n        completeBox ? DragBoxEventType.BOXEND : DragBoxEventType.BOXCANCEL,\n        mapBrowserEvent.coordinate,\n        mapBrowserEvent,\n      ),\n    );\n\n    this.box_.setMap(null);\n    this.startPixel_ = null;\n\n    return false;\n  }\n\n  /**\n   * Handle pointer down events.\n   * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n   * @return {boolean} If the event was consumed.\n   * @override\n   */\n  handleDownEvent(mapBrowserEvent) {\n    if (this.condition_(mapBrowserEvent)) {\n      this.startPixel_ = mapBrowserEvent.pixel;\n      this.box_.setMap(mapBrowserEvent.map);\n      this.box_.setPixels(this.startPixel_, this.startPixel_);\n      this.dispatchEvent(\n        new DragBoxEvent(\n          DragBoxEventType.BOXSTART,\n          mapBrowserEvent.coordinate,\n          mapBrowserEvent,\n        ),\n      );\n      return true;\n    }\n    return false;\n  }\n\n  /**\n   * Function to execute just before `onboxend` is fired\n   * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n   */\n  onBoxEnd(event) {}\n\n  /**\n   * Activate or deactivate the interaction.\n   * @param {boolean} active Active.\n   * @observable\n   * @api\n   * @override\n   */\n  setActive(active) {\n    if (!active) {\n      this.box_.setMap(null);\n      if (this.startPixel_) {\n        this.dispatchEvent(\n          new DragBoxEvent(DragBoxEventType.BOXCANCEL, this.startPixel_, null),\n        );\n        this.startPixel_ = null;\n      }\n    }\n\n    super.setActive(active);\n  }\n\n  /**\n   * @param {import(\"../Map.js\").default|null} map Map.\n   * @override\n   */\n  setMap(map) {\n    const oldMap = this.getMap();\n\n    if (oldMap) {\n      this.box_.setMap(null);\n\n      if (this.startPixel_) {\n        this.dispatchEvent(\n          new DragBoxEvent(DragBoxEventType.BOXCANCEL, this.startPixel_, null),\n        );\n        this.startPixel_ = null;\n      }\n    }\n\n    super.setMap(map);\n  }\n}\n\nexport default DragBox;\n", "/**\n * @module ol/interaction/DragZoom\n */\nimport {easeOut} from '../easing.js';\nimport {shiftKeyOnly} from '../events/condition.js';\nimport DragBox from './DragBox.js';\n\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-dragzoom'] CSS class name for styling the\n * box.\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that\n * takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled.\n * Default is {@link module:ol/events/condition.shiftKeyOnly}.\n * @property {number} [duration=200] Animation duration in milliseconds.\n * @property {boolean} [out=false] Use interaction for zooming out.\n * @property {number} [minArea=64] The minimum area of the box in pixel, this value is used by the parent default\n * `boxEndCondition` function.\n */\n\n/**\n * @classdesc\n * Allows the user to zoom the map by clicking and dragging on the map,\n * normally combined with a {@link module:ol/events/condition} that limits\n * it to when a key, shift by default, is held down.\n *\n * To change the style of the box, use CSS and the `.ol-dragzoom` selector, or\n * your custom one configured with `className`.\n * @api\n */\nclass DragZoom extends DragBox {\n  /**\n   * @param {Options} [options] Options.\n   */\n  constructor(options) {\n    options = options ? options : {};\n\n    const condition = options.condition ? options.condition : shiftKeyOnly;\n\n    super({\n      condition: condition,\n      className: options.className || 'ol-dragzoom',\n      minArea: options.minArea,\n    });\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.duration_ = options.duration !== undefined ? options.duration : 200;\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.out_ = options.out !== undefined ? options.out : false;\n  }\n\n  /**\n   * Function to execute just before `onboxend` is fired\n   * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n   * @override\n   */\n  onBoxEnd(event) {\n    const map = this.getMap();\n    const view = /** @type {!import(\"../View.js\").default} */ (map.getView());\n    let geometry = this.getGeometry();\n\n    if (this.out_) {\n      const rotatedExtent = view.rotatedExtentForGeometry(geometry);\n      const resolution = view.getResolutionForExtentInternal(rotatedExtent);\n      const factor = view.getResolution() / resolution;\n      geometry = geometry.clone();\n      geometry.scale(factor * factor);\n    }\n\n    view.fitInternal(geometry, {\n      duration: this.duration_,\n      easing: easeOut,\n    });\n  }\n}\n\nexport default DragZoom;\n", "/**\n * @module ol/events/Key\n */\n\n/**\n * @enum {string}\n * @const\n */\nexport default {\n  LEFT: 'ArrowLeft',\n  UP: 'ArrowUp',\n  RIGHT: 'ArrowRight',\n  DOWN: 'ArrowDown',\n};\n", "/**\n * @module ol/interaction/KeyboardPan\n */\nimport {rotate as rotateCoordinate} from '../coordinate.js';\nimport EventType from '../events/EventType.js';\nimport Key from '../events/Key.js';\nimport {noModifierKeys, targetNotEditable} from '../events/condition.js';\nimport Interaction, {pan} from './Interaction.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that\n * takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled. Default is\n * {@link module:ol/events/condition.noModifierKeys} and\n * {@link module:ol/events/condition.targetNotEditable}.\n * @property {number} [duration=100] Animation duration in milliseconds.\n * @property {number} [pixelDelta=128] The amount of pixels to pan on each key\n * press.\n */\n\n/**\n * @classdesc\n * Allows the user to pan the map using keyboard arrows.\n * Note that, although this interaction is by default included in maps,\n * the keys can only be used when browser focus is on the element to which\n * the keyboard events are attached. By default, this is the map div,\n * though you can change this with the `keyboardEventTarget` in\n * {@link module:ol/Map~Map}. `document` never loses focus but, for any other\n * element, focus will have to be on, and returned to, this element if the keys\n * are to function.\n * See also {@link module:ol/interaction/KeyboardZoom~KeyboardZoom}.\n * @api\n */\nclass KeyboardPan extends Interaction {\n  /**\n   * @param {Options} [options] Options.\n   */\n  constructor(options) {\n    super();\n\n    options = options || {};\n\n    /**\n     * @private\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Browser event.\n     * @return {boolean} Combined condition result.\n     */\n    this.defaultCondition_ = function (mapBrowserEvent) {\n      return (\n        noModifierKeys(mapBrowserEvent) && targetNotEditable(mapBrowserEvent)\n      );\n    };\n\n    /**\n     * @private\n     * @type {import(\"../events/condition.js\").Condition}\n     */\n    this.condition_ =\n      options.condition !== undefined\n        ? options.condition\n        : this.defaultCondition_;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.duration_ = options.duration !== undefined ? options.duration : 100;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.pixelDelta_ =\n      options.pixelDelta !== undefined ? options.pixelDelta : 128;\n  }\n\n  /**\n   * Handles the {@link module:ol/MapBrowserEvent~MapBrowserEvent map browser event} if it was a\n   * `KeyEvent`, and decides the direction to pan to (if an arrow key was\n   * pressed).\n   * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n   * @return {boolean} `false` to stop event propagation.\n   * @override\n   */\n  handleEvent(mapBrowserEvent) {\n    let stopEvent = false;\n    if (mapBrowserEvent.type == EventType.KEYDOWN) {\n      const keyEvent = /** @type {KeyboardEvent} */ (\n        mapBrowserEvent.originalEvent\n      );\n      const key = keyEvent.key;\n      if (\n        this.condition_(mapBrowserEvent) &&\n        (key == Key.DOWN ||\n          key == Key.LEFT ||\n          key == Key.RIGHT ||\n          key == Key.UP)\n      ) {\n        const map = mapBrowserEvent.map;\n        const view = map.getView();\n        const mapUnitsDelta = view.getResolution() * this.pixelDelta_;\n        let deltaX = 0,\n          deltaY = 0;\n        if (key == Key.DOWN) {\n          deltaY = -mapUnitsDelta;\n        } else if (key == Key.LEFT) {\n          deltaX = -mapUnitsDelta;\n        } else if (key == Key.RIGHT) {\n          deltaX = mapUnitsDelta;\n        } else {\n          deltaY = mapUnitsDelta;\n        }\n        const delta = [deltaX, deltaY];\n        rotateCoordinate(delta, view.getRotation());\n        pan(view, delta, this.duration_);\n        keyEvent.preventDefault();\n        stopEvent = true;\n      }\n    }\n    return !stopEvent;\n  }\n}\n\nexport default KeyboardPan;\n", "/**\n * @module ol/interaction/KeyboardZoom\n */\nimport EventType from '../events/EventType.js';\nimport {platformModifierKey, targetNotEditable} from '../events/condition.js';\nimport Interaction, {zoomByDelta} from './Interaction.js';\n\n/**\n * @typedef {Object} Options\n * @property {number} [duration=100] Animation duration in milliseconds.\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that\n * takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled. The default condition is\n * that {@link module:ol/events/condition.targetNotEditable} is fulfilled and that\n * the platform modifier key isn't pressed\n * (!{@link module:ol/events/condition.platformModifierKey}).\n * @property {number} [delta=1] The zoom level delta on each key press.\n */\n\n/**\n * @classdesc\n * Allows the user to zoom the map using keyboard + and -.\n * Note that, although this interaction is by default included in maps,\n * the keys can only be used when browser focus is on the element to which\n * the keyboard events are attached. By default, this is the map div,\n * though you can change this with the `keyboardEventTarget` in\n * {@link module:ol/Map~Map}. `document` never loses focus but, for any other\n * element, focus will have to be on, and returned to, this element if the keys\n * are to function.\n * See also {@link module:ol/interaction/KeyboardPan~KeyboardPan}.\n * @api\n */\nclass KeyboardZoom extends Interaction {\n  /**\n   * @param {Options} [options] Options.\n   */\n  constructor(options) {\n    super();\n\n    options = options ? options : {};\n\n    /**\n     * @private\n     * @type {import(\"../events/condition.js\").Condition}\n     */\n    this.condition_ = options.condition\n      ? options.condition\n      : function (mapBrowserEvent) {\n          return (\n            !platformModifierKey(mapBrowserEvent) &&\n            targetNotEditable(mapBrowserEvent)\n          );\n        };\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.delta_ = options.delta ? options.delta : 1;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.duration_ = options.duration !== undefined ? options.duration : 100;\n  }\n\n  /**\n   * Handles the {@link module:ol/MapBrowserEvent~MapBrowserEvent map browser event} if it was a\n   * `KeyEvent`, and decides whether to zoom in or out (depending on whether the\n   * key pressed was '+' or '-').\n   * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n   * @return {boolean} `false` to stop event propagation.\n   * @override\n   */\n  handleEvent(mapBrowserEvent) {\n    let stopEvent = false;\n    if (\n      mapBrowserEvent.type == EventType.KEYDOWN ||\n      mapBrowserEvent.type == EventType.KEYPRESS\n    ) {\n      const keyEvent = /** @type {KeyboardEvent} */ (\n        mapBrowserEvent.originalEvent\n      );\n      const key = keyEvent.key;\n      if (this.condition_(mapBrowserEvent) && (key === '+' || key === '-')) {\n        const map = mapBrowserEvent.map;\n        const delta = key === '+' ? this.delta_ : -this.delta_;\n        const view = map.getView();\n        zoomByDelta(view, delta, undefined, this.duration_);\n        keyEvent.preventDefault();\n        stopEvent = true;\n      }\n    }\n    return !stopEvent;\n  }\n}\n\nexport default KeyboardZoom;\n", "/**\n * @module ol/interaction/MouseWheelZoom\n */\nimport {listen, unlistenByKey} from '../events.js';\nimport EventType from '../events/EventType.js';\nimport {all, always, focusWithTabindex} from '../events/condition.js';\nimport {clamp} from '../math.js';\nimport Interaction, {zoomByDelta} from './Interaction.js';\n\n/**\n * @typedef {'trackpad' | 'wheel'} Mode\n */\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that\n * takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled. Default is\n * {@link module:ol/events/condition.always}.\n * @property {boolean} [onFocusOnly=false] When the map's target has a `tabindex` attribute set,\n * the interaction will only handle events when the map has the focus.\n * @property {number} [maxDelta=1] Maximum mouse wheel delta.\n * @property {number} [duration=250] Animation duration in milliseconds.\n * @property {number} [timeout=80] Mouse wheel timeout duration in milliseconds.\n * @property {boolean} [useAnchor=true] Enable zooming using the mouse's\n * location as the anchor. When set to `false`, zooming in and out will zoom to\n * the center of the screen instead of zooming on the mouse's location.\n * @property {boolean} [constrainResolution=false] If true, the mouse wheel zoom\n * event will always animate to the closest zoom level after an interaction;\n * false means intermediary zoom levels are allowed.\n */\n\n/**\n * Mutliplier for the DOM_DELTA_LINE delta value.\n * @type {number}\n */\nconst DELTA_LINE_MULTIPLIER = 40;\n\n/**\n * Mutliplier for the DOM_DELTA_PAGE delta value.\n * @type {number}\n */\nconst DELTA_PAGE_MULTIPLIER = 300;\n\n/**\n * Mutliplier for the delta value when using pinch-to-zoom\n * @type {number}\n */\nconst DELTA_TRACKPAD_PINCH_TO_ZOOM_MULTIPLIER = 3; // 5 = google maps. 3 = apple maps, MapLibre.\n/**\n * @classdesc\n * Allows the user to zoom the map by scrolling the mouse wheel.\n * @api\n */\nclass MouseWheelZoom extends Interaction {\n  /**\n   * @param {Options} [options] Options.\n   */\n  constructor(options) {\n    options = options ? options : {};\n\n    super(\n      /** @type {import(\"./Interaction.js\").InteractionOptions} */ (options),\n    );\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.totalDelta_ = 0;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.lastDelta_ = 0;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.maxDelta_ = options.maxDelta !== undefined ? options.maxDelta : 1;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.duration_ = options.duration !== undefined ? options.duration : 250;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.timeout_ = options.timeout !== undefined ? options.timeout : 80;\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.useAnchor_ =\n      options.useAnchor !== undefined ? options.useAnchor : true;\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.constrainResolution_ =\n      options.constrainResolution !== undefined\n        ? options.constrainResolution\n        : false;\n\n    const condition = options.condition ? options.condition : always;\n\n    /**\n     * @private\n     * @type {import(\"../events/condition.js\").Condition}\n     */\n    this.condition_ = options.onFocusOnly\n      ? all(focusWithTabindex, condition)\n      : condition;\n\n    /**\n     * @private\n     * @type {?import(\"../pixel.js\").Pixel}\n     */\n    this.lastAnchor_ = null;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.startTime_ = undefined;\n\n    /**\n     * @private\n     * @type {ReturnType<typeof setTimeout>}\n     */\n    this.timeoutId_;\n\n    /**\n     * @private\n     * @type {Mode|undefined}\n     */\n    this.mode_ = undefined;\n\n    /**\n     * Trackpad events separated by this delay will be considered separate\n     * interactions.\n     * @private\n     * @type {number}\n     */\n    this.trackpadEventGap_ = 400;\n\n    /**\n     * @private\n     * @type {ReturnType<typeof setTimeout>}\n     */\n    this.trackpadTimeoutId_;\n\n    /**\n     * The number of delta values per zoom level\n     * @private\n     * @type {number}\n     */\n    this.deltaPerZoom_ = 300;\n\n    /**\n     * Tracks whether the Ctrl key is physically held down (as opposed to the\n     * browser synthesizing ctrlKey=true for pinch-to-zoom trackpad gestures).\n     * @private\n     * @type {boolean}\n     */\n    this.ctrlKeyPressed_ = false;\n\n    /**\n     * @private\n     * @type {Array<import('../events.js').EventsKey>}\n     */\n    this.ctrlKeyListenerKeys_ = [];\n  }\n\n  /**\n   * @param {import('../Map.js').default|null} map Map.\n   * @override\n   */\n  setMap(map) {\n    this.ctrlKeyListenerKeys_.forEach(unlistenByKey);\n    this.ctrlKeyListenerKeys_.length = 0;\n    this.ctrlKeyPressed_ = false;\n    super.setMap(map);\n    if (map) {\n      const doc = map.getOwnerDocument();\n      this.ctrlKeyListenerKeys_.push(\n        listen(doc, 'keydown', (/** @type {KeyboardEvent} */ e) => {\n          if (e.key === 'Control') {\n            this.ctrlKeyPressed_ = true;\n          }\n        }),\n        listen(doc, 'keyup', (/** @type {KeyboardEvent} */ e) => {\n          if (e.key === 'Control') {\n            this.ctrlKeyPressed_ = false;\n          }\n        }),\n      );\n    }\n  }\n\n  /**\n   * @private\n   */\n  endInteraction_() {\n    this.trackpadTimeoutId_ = undefined;\n    const map = this.getMap();\n    if (!map) {\n      return;\n    }\n    const view = map.getView();\n    const direction = this.lastDelta_ ? (this.lastDelta_ > 0 ? 1 : -1) : 0;\n    view.endInteraction(\n      this.constrainResolution_ || view.getConstrainResolution()\n        ? 100\n        : undefined,\n      direction,\n      this.lastAnchor_ ? map.getCoordinateFromPixel(this.lastAnchor_) : null,\n    );\n  }\n\n  /**\n   * Handles the {@link module:ol/MapBrowserEvent~MapBrowserEvent map browser event} (if it was a mousewheel-event) and eventually\n   * zooms the map.\n   * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n   * @return {boolean} `false` to stop event propagation.\n   * @override\n   */\n  handleEvent(mapBrowserEvent) {\n    if (!this.condition_(mapBrowserEvent)) {\n      return true;\n    }\n    const type = mapBrowserEvent.type;\n    if (type !== EventType.WHEEL) {\n      return true;\n    }\n\n    const map = mapBrowserEvent.map;\n    const wheelEvent = /** @type {WheelEvent} */ (\n      mapBrowserEvent.originalEvent\n    );\n    wheelEvent.preventDefault();\n\n    const isPinchToZoom = wheelEvent.ctrlKey && !this.ctrlKeyPressed_;\n    if (!wheelEvent.ctrlKey) {\n      this.ctrlKeyPressed_ = false;\n    }\n\n    if (this.useAnchor_) {\n      this.lastAnchor_ = mapBrowserEvent.pixel;\n    }\n\n    // Delta normalisation inspired by\n    // https://github.com/mapbox/mapbox-gl-js/blob/001c7b9/js/ui/handler/scroll_zoom.js\n    let delta = wheelEvent.deltaY;\n\n    switch (wheelEvent.deltaMode) {\n      case WheelEvent.DOM_DELTA_LINE:\n        delta *= DELTA_LINE_MULTIPLIER;\n        break;\n      case WheelEvent.DOM_DELTA_PAGE:\n        delta *= DELTA_PAGE_MULTIPLIER;\n        break;\n      default:\n      // pass\n    }\n\n    if (delta === 0) {\n      return false;\n    }\n    this.lastDelta_ = delta;\n\n    const now = Date.now();\n\n    if (this.startTime_ === undefined) {\n      this.startTime_ = now;\n    }\n\n    if (!this.mode_ || now - this.startTime_ > this.trackpadEventGap_) {\n      this.mode_ = Math.abs(delta) < 4 ? 'trackpad' : 'wheel';\n    }\n\n    const view = map.getView();\n    if (this.mode_ === 'trackpad') {\n      if (this.trackpadTimeoutId_) {\n        clearTimeout(this.trackpadTimeoutId_);\n      } else {\n        if (view.getAnimating()) {\n          view.cancelAnimations();\n        }\n        view.beginInteraction();\n      }\n      this.trackpadTimeoutId_ = setTimeout(\n        this.endInteraction_.bind(this),\n        this.timeout_,\n      );\n      if (isPinchToZoom) {\n        delta = delta * DELTA_TRACKPAD_PINCH_TO_ZOOM_MULTIPLIER;\n      }\n      view.adjustZoom(\n        -delta / this.deltaPerZoom_,\n        this.lastAnchor_ ? map.getCoordinateFromPixel(this.lastAnchor_) : null,\n      );\n      this.startTime_ = now;\n      return false;\n    }\n\n    this.totalDelta_ += delta;\n\n    const timeLeft = Math.max(this.timeout_ - (now - this.startTime_), 0);\n\n    clearTimeout(this.timeoutId_);\n    this.timeoutId_ = setTimeout(\n      this.handleWheelZoom_.bind(this, map),\n      timeLeft,\n    );\n\n    return false;\n  }\n\n  /**\n   * @private\n   * @param {import(\"../Map.js\").default} map Map.\n   */\n  handleWheelZoom_(map) {\n    const view = map.getView();\n    if (view.getAnimating()) {\n      view.cancelAnimations();\n    }\n    let delta =\n      -clamp(\n        this.totalDelta_,\n        -this.maxDelta_ * this.deltaPerZoom_,\n        this.maxDelta_ * this.deltaPerZoom_,\n      ) / this.deltaPerZoom_;\n    if (view.getConstrainResolution() || this.constrainResolution_) {\n      // view has a zoom constraint, zoom by 1\n      delta = delta ? (delta > 0 ? 1 : -1) : 0;\n    }\n    zoomByDelta(\n      view,\n      delta,\n      this.lastAnchor_ ? map.getCoordinateFromPixel(this.lastAnchor_) : null,\n      this.duration_,\n    );\n\n    this.mode_ = undefined;\n    this.totalDelta_ = 0;\n    this.lastAnchor_ = null;\n    this.startTime_ = undefined;\n    this.timeoutId_ = undefined;\n  }\n\n  /**\n   * Enable or disable using the mouse's location as an anchor when zooming\n   * @param {boolean} useAnchor true to zoom to the mouse's location, false\n   * to zoom to the center of the map\n   * @api\n   */\n  setMouseAnchor(useAnchor) {\n    this.useAnchor_ = useAnchor;\n    if (!useAnchor) {\n      this.lastAnchor_ = null;\n    }\n  }\n}\n\nexport default MouseWheelZoom;\n", "/**\n * @module ol/interaction/PinchRotate\n */\nimport {FALSE} from '../functions.js';\nimport {disable} from '../rotationconstraint.js';\nimport PointerInteraction, {\n  centroid as centroidFromPointers,\n} from './Pointer.js';\n\n/**\n * @typedef {Object} Options\n * @property {number} [duration=250] The duration of the animation in\n * milliseconds.\n * @property {number} [threshold=0.3] Minimal angle in radians to start a rotation.\n */\n\n/**\n * @classdesc\n * Allows the user to rotate the map by twisting with two fingers\n * on a touch screen.\n * @api\n */\nclass PinchRotate extends PointerInteraction {\n  /**\n   * @param {Options} [options] Options.\n   */\n  constructor(options) {\n    options = options ? options : {};\n\n    const pointerOptions = /** @type {import(\"./Pointer.js\").Options} */ (\n      options\n    );\n\n    if (!pointerOptions.stopDown) {\n      pointerOptions.stopDown = FALSE;\n    }\n\n    super(pointerOptions);\n\n    /**\n     * @private\n     * @type {import(\"../coordinate.js\").Coordinate}\n     */\n    this.anchor_ = null;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.lastAngle_ = undefined;\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.rotating_ = false;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.rotationDelta_ = 0.0;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.threshold_ = options.threshold !== undefined ? options.threshold : 0.3;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.duration_ = options.duration !== undefined ? options.duration : 250;\n  }\n\n  /**\n   * Handle pointer drag events.\n   * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n   * @override\n   */\n  handleDragEvent(mapBrowserEvent) {\n    let rotationDelta = 0.0;\n\n    const touch0 = this.targetPointers[0];\n    const touch1 = this.targetPointers[1];\n\n    // angle between touches\n    const angle = Math.atan2(\n      touch1.clientY - touch0.clientY,\n      touch1.clientX - touch0.clientX,\n    );\n\n    if (this.lastAngle_ !== undefined) {\n      const delta = angle - this.lastAngle_;\n      this.rotationDelta_ += delta;\n      if (!this.rotating_ && Math.abs(this.rotationDelta_) > this.threshold_) {\n        this.rotating_ = true;\n      }\n      rotationDelta = delta;\n    }\n    this.lastAngle_ = angle;\n\n    const map = mapBrowserEvent.map;\n    const view = map.getView();\n    if (view.getConstraints().rotation === disable) {\n      return;\n    }\n\n    // rotate anchor point.\n    // FIXME: should be the intersection point between the lines:\n    //     touch0,touch1 and previousTouch0,previousTouch1\n    this.anchor_ = map.getCoordinateFromPixelInternal(\n      map.getEventPixel(centroidFromPointers(this.targetPointers)),\n    );\n\n    // rotate\n    if (this.rotating_) {\n      map.render();\n      view.adjustRotationInternal(rotationDelta, this.anchor_);\n    }\n  }\n\n  /**\n   * Handle pointer up events.\n   * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n   * @return {boolean} If the event was consumed.\n   * @override\n   */\n  handleUpEvent(mapBrowserEvent) {\n    if (this.targetPointers.length < 2) {\n      const map = mapBrowserEvent.map;\n      const view = map.getView();\n      view.endInteraction(this.duration_);\n      return false;\n    }\n    return true;\n  }\n\n  /**\n   * Handle pointer down events.\n   * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n   * @return {boolean} If the event was consumed.\n   * @override\n   */\n  handleDownEvent(mapBrowserEvent) {\n    if (this.targetPointers.length >= 2) {\n      const map = mapBrowserEvent.map;\n      this.anchor_ = null;\n      this.lastAngle_ = undefined;\n      this.rotating_ = false;\n      this.rotationDelta_ = 0.0;\n      if (!this.handlingDownUpSequence) {\n        map.getView().beginInteraction();\n      }\n      return true;\n    }\n    return false;\n  }\n}\n\nexport default PinchRotate;\n", "/**\n * @module ol/interaction/PinchZoom\n */\nimport {FALSE} from '../functions.js';\nimport PointerInteraction, {\n  centroid as centroidFromPointers,\n} from './Pointer.js';\n\n/**\n * @typedef {Object} Options\n * @property {number} [duration=400] Animation duration in milliseconds.\n */\n\n/**\n * @classdesc\n * Allows the user to zoom the map by pinching with two fingers\n * on a touch screen.\n * @api\n */\nclass PinchZoom extends PointerInteraction {\n  /**\n   * @param {Options} [options] Options.\n   */\n  constructor(options) {\n    options = options ? options : {};\n\n    const pointerOptions = /** @type {import(\"./Pointer.js\").Options} */ (\n      options\n    );\n\n    if (!pointerOptions.stopDown) {\n      pointerOptions.stopDown = FALSE;\n    }\n\n    super(pointerOptions);\n\n    /**\n     * @private\n     * @type {import(\"../coordinate.js\").Coordinate}\n     */\n    this.anchor_ = null;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.duration_ = options.duration !== undefined ? options.duration : 400;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.lastDistance_ = undefined;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.lastScaleDelta_ = 1;\n  }\n\n  /**\n   * Handle pointer drag events.\n   * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n   * @override\n   */\n  handleDragEvent(mapBrowserEvent) {\n    let scaleDelta = 1.0;\n\n    const touch0 = this.targetPointers[0];\n    const touch1 = this.targetPointers[1];\n    const dx = touch0.clientX - touch1.clientX;\n    const dy = touch0.clientY - touch1.clientY;\n\n    // distance between touches\n    const distance = Math.sqrt(dx * dx + dy * dy);\n\n    if (this.lastDistance_ !== undefined) {\n      scaleDelta = this.lastDistance_ / distance;\n    }\n    this.lastDistance_ = distance;\n\n    const map = mapBrowserEvent.map;\n    const view = map.getView();\n\n    if (scaleDelta != 1.0) {\n      this.lastScaleDelta_ = scaleDelta;\n    }\n\n    // scale anchor point.\n    this.anchor_ = map.getCoordinateFromPixelInternal(\n      map.getEventPixel(centroidFromPointers(this.targetPointers)),\n    );\n\n    // scale, bypass the resolution constraint\n    map.render();\n    view.adjustResolutionInternal(scaleDelta, this.anchor_);\n  }\n\n  /**\n   * Handle pointer up events.\n   * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n   * @return {boolean} If the event was consumed.\n   * @override\n   */\n  handleUpEvent(mapBrowserEvent) {\n    if (this.targetPointers.length < 2) {\n      const map = mapBrowserEvent.map;\n      const view = map.getView();\n      const direction = this.lastScaleDelta_ > 1 ? 1 : -1;\n      view.endInteraction(this.duration_, direction);\n      return false;\n    }\n    return true;\n  }\n\n  /**\n   * Handle pointer down events.\n   * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n   * @return {boolean} If the event was consumed.\n   * @override\n   */\n  handleDownEvent(mapBrowserEvent) {\n    if (this.targetPointers.length >= 2) {\n      const map = mapBrowserEvent.map;\n      this.anchor_ = null;\n      this.lastDistance_ = undefined;\n      this.lastScaleDelta_ = 1;\n      if (!this.handlingDownUpSequence) {\n        map.getView().beginInteraction();\n      }\n      return true;\n    }\n    return false;\n  }\n}\n\nexport default PinchZoom;\n", "/**\n * @module ol/interaction/defaults\n */\nimport Collection from '../Collection.js';\nimport Kinetic from '../Kinetic.js';\nimport DoubleClickZoom from './DoubleClickZoom.js';\nimport DragPan from './DragPan.js';\nimport DragRotate from './DragRotate.js';\nimport DragZoom from './DragZoom.js';\nimport KeyboardPan from './KeyboardPan.js';\nimport KeyboardZoom from './KeyboardZoom.js';\nimport MouseWheelZoom from './MouseWheelZoom.js';\nimport PinchRotate from './PinchRotate.js';\nimport PinchZoom from './PinchZoom.js';\n\n/**\n * @typedef {Object} DefaultsOptions\n * @property {boolean} [altShiftDragRotate=true] Whether Alt-Shift-drag rotate is\n * desired.\n * @property {boolean} [onFocusOnly=false] Interact only when the map has the\n * focus. This affects the `MouseWheelZoom` and `DragPan` interactions and is\n * useful when page scroll is desired for maps that do not have the browser's\n * focus.\n * @property {boolean} [doubleClickZoom=true] Whether double click zoom is\n * desired.\n * @property {boolean} [keyboard=true] Whether keyboard interaction is desired.\n * @property {boolean} [mouseWheelZoom=true] Whether mousewheel zoom is desired.\n * @property {boolean} [shiftDragZoom=true] Whether Shift-drag zoom is desired.\n * @property {boolean} [dragPan=true] Whether drag pan is desired.\n * @property {boolean} [pinchRotate=true] Whether pinch rotate is desired.\n * @property {boolean} [pinchZoom=true] Whether pinch zoom is desired.\n * @property {number} [zoomDelta] Zoom level delta when using keyboard or double click zoom.\n * @property {number} [zoomDuration] Duration of the zoom animation in\n * milliseconds.\n */\n\n/**\n * Set of interactions included in maps by default. Specific interactions can be\n * excluded by setting the appropriate option to false in the constructor\n * options, but the order of the interactions is fixed.  If you want to specify\n * a different order for interactions, you will need to create your own\n * {@link module:ol/interaction/Interaction~Interaction} instances and insert\n * them into a {@link module:ol/Collection~Collection} in the order you want\n * before creating your {@link module:ol/Map~Map} instance. Changing the order can\n * be of interest if the event propagation needs to be stopped at a point.\n * The default set of interactions, in sequence, is:\n * {@link module:ol/interaction/DragRotate~DragRotate}\n * {@link module:ol/interaction/DoubleClickZoom~DoubleClickZoom}\n * {@link module:ol/interaction/DragPan~DragPan}\n * {@link module:ol/interaction/PinchRotate~PinchRotate}\n * {@link module:ol/interaction/PinchZoom~PinchZoom}\n * {@link module:ol/interaction/KeyboardPan~KeyboardPan}\n * {@link module:ol/interaction/KeyboardZoom~KeyboardZoom}\n * {@link module:ol/interaction/MouseWheelZoom~MouseWheelZoom}\n * {@link module:ol/interaction/DragZoom~DragZoom}\n *\n * @param {DefaultsOptions} [options] Defaults options.\n * @return {Collection<import(\"./Interaction.js\").default>}\n * A collection of interactions to be used with the {@link module:ol/Map~Map}\n * constructor's `interactions` option.\n * @api\n */\nexport function defaults(options) {\n  options = options ? options : {};\n\n  /** @type {Collection<import(\"./Interaction.js\").default>} */\n  const interactions = new Collection();\n\n  const kinetic = new Kinetic(-0.005, 0.05, 100);\n\n  const altShiftDragRotate =\n    options.altShiftDragRotate !== undefined\n      ? options.altShiftDragRotate\n      : true;\n  if (altShiftDragRotate) {\n    interactions.push(new DragRotate());\n  }\n\n  const doubleClickZoom =\n    options.doubleClickZoom !== undefined ? options.doubleClickZoom : true;\n  if (doubleClickZoom) {\n    interactions.push(\n      new DoubleClickZoom({\n        delta: options.zoomDelta,\n        duration: options.zoomDuration,\n      }),\n    );\n  }\n\n  const dragPan = options.dragPan !== undefined ? options.dragPan : true;\n  if (dragPan) {\n    interactions.push(\n      new DragPan({\n        onFocusOnly: options.onFocusOnly,\n        kinetic: kinetic,\n      }),\n    );\n  }\n\n  const pinchRotate =\n    options.pinchRotate !== undefined ? options.pinchRotate : true;\n  if (pinchRotate) {\n    interactions.push(new PinchRotate());\n  }\n\n  const pinchZoom = options.pinchZoom !== undefined ? options.pinchZoom : true;\n  if (pinchZoom) {\n    interactions.push(\n      new PinchZoom({\n        duration: options.zoomDuration,\n      }),\n    );\n  }\n\n  const keyboard = options.keyboard !== undefined ? options.keyboard : true;\n  if (keyboard) {\n    interactions.push(new KeyboardPan());\n    interactions.push(\n      new KeyboardZoom({\n        delta: options.zoomDelta,\n        duration: options.zoomDuration,\n      }),\n    );\n  }\n\n  const mouseWheelZoom =\n    options.mouseWheelZoom !== undefined ? options.mouseWheelZoom : true;\n  if (mouseWheelZoom) {\n    interactions.push(\n      new MouseWheelZoom({\n        onFocusOnly: options.onFocusOnly,\n        duration: options.zoomDuration,\n      }),\n    );\n  }\n\n  const shiftDragZoom =\n    options.shiftDragZoom !== undefined ? options.shiftDragZoom : true;\n  if (shiftDragZoom) {\n    interactions.push(\n      new DragZoom({\n        duration: options.zoomDuration,\n      }),\n    );\n  }\n\n  return interactions;\n}\n", "/**\n * @module ol/layer/Group\n */\nimport Collection from '../Collection.js';\nimport CollectionEventType from '../CollectionEventType.js';\nimport ObjectEventType from '../ObjectEventType.js';\nimport {assert} from '../asserts.js';\nimport {listen, unlistenByKey} from '../events.js';\nimport Event from '../events/Event.js';\nimport EventType from '../events/EventType.js';\nimport {getIntersection} from '../extent.js';\nimport {clear} from '../obj.js';\nimport {getUid} from '../util.js';\nimport BaseLayer from './Base.js';\n\n/**\n * @enum {string}\n */\nconst GroupEventType = {\n  /**\n   * Triggered when a layer is added\n   * @event GroupEvent#addlayer\n   * @api\n   */\n  ADDLAYER: 'addlayer',\n  /**\n   * Triggered when a layer is removed\n   * @event GroupEvent#removelayer\n   * @api\n   */\n  REMOVELAYER: 'removelayer',\n};\n\n/**\n * @classdesc\n * A layer group triggers 'addlayer' and 'removelayer' events when layers are added to or removed from\n * the group or one of its child groups.  When a layer group is added to or removed from another layer group,\n * a single event will be triggered (instead of one per layer in the group added or removed).\n */\nexport class GroupEvent extends Event {\n  /**\n   * @param {GroupEventType} type The event type.\n   * @param {BaseLayer} layer The layer.\n   */\n  constructor(type, layer) {\n    super(type);\n\n    /**\n     * The added or removed layer.\n     * @type {BaseLayer}\n     * @api\n     */\n    this.layer = layer;\n  }\n}\n\n/***\n * @template Return\n * @typedef {import(\"../Observable.js\").OnSignature<import(\"../Observable.js\").EventTypes, import(\"../events/Event.js\").default, Return> &\n *   import(\"../Observable.js\").OnSignature<import(\"./Base.js\").BaseLayerObjectEventTypes|\n *     'change:layers', import(\"../Object.js\").ObjectEvent, Return> &\n *   import(\"../Observable.js\").OnSignature<'addlayer'|'removelayer', GroupEvent, Return> &\n *   import(\"../Observable.js\").CombinedOnSignature<import(\"../Observable.js\").EventTypes|import(\"./Base.js\").BaseLayerObjectEventTypes|'addlayer'|'removelayer'|'change:layers', Return>} GroupOnSignature\n */\n\n/**\n * @typedef {Object} Options\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering.  The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering.  At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {Array<import(\"./Base.js\").default>|Collection<import(\"./Base.js\").default>} [layers] Child layers.\n * @property {Object<string, *>} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.\n */\n\n/**\n * @enum {string}\n * @private\n */\nconst Property = {\n  LAYERS: 'layers',\n};\n\n/**\n * @classdesc\n * A {@link module:ol/Collection~Collection} of layers that are handled together.\n *\n * A generic `change` event is triggered when the group/Collection changes.\n *\n * @fires GroupEvent\n * @api\n */\nclass LayerGroup extends BaseLayer {\n  /**\n   * @param {Options} [options] Layer options.\n   */\n  constructor(options) {\n    options = options || {};\n    const baseOptions = /** @type {Options} */ (Object.assign({}, options));\n    delete baseOptions.layers;\n\n    let layers = options.layers;\n\n    super(baseOptions);\n\n    /***\n     * @type {GroupOnSignature<import(\"../events.js\").EventsKey>}\n     */\n    this.on;\n\n    /***\n     * @type {GroupOnSignature<import(\"../events.js\").EventsKey>}\n     */\n    this.once;\n\n    /***\n     * @type {GroupOnSignature<void>}\n     */\n    this.un;\n\n    /**\n     * @private\n     * @type {Array<import(\"../events.js\").EventsKey>}\n     */\n    this.layersListenerKeys_ = [];\n\n    /**\n     * @private\n     * @type {Object<string, Array<import(\"../events.js\").EventsKey>>}\n     */\n    this.listenerKeys_ = {};\n\n    this.addChangeListener(Property.LAYERS, this.handleLayersChanged_);\n\n    if (layers) {\n      if (Array.isArray(layers)) {\n        layers = new Collection(layers.slice(), {unique: true});\n      } else {\n        assert(\n          typeof (/** @type {?} */ (layers).getArray) === 'function',\n          'Expected `layers` to be an array or a `Collection`',\n        );\n      }\n    } else {\n      layers = new Collection(undefined, {unique: true});\n    }\n\n    this.setLayers(layers);\n  }\n\n  /**\n   * @private\n   */\n  handleLayerChange_() {\n    this.changed();\n  }\n\n  /**\n   * @private\n   */\n  handleLayersChanged_() {\n    this.layersListenerKeys_.forEach(unlistenByKey);\n    this.layersListenerKeys_.length = 0;\n\n    const layers = this.getLayers();\n    this.layersListenerKeys_.push(\n      listen(layers, CollectionEventType.ADD, this.handleLayersAdd_, this),\n      listen(\n        layers,\n        CollectionEventType.REMOVE,\n        this.handleLayersRemove_,\n        this,\n      ),\n    );\n\n    for (const id in this.listenerKeys_) {\n      this.listenerKeys_[id].forEach(unlistenByKey);\n    }\n    clear(this.listenerKeys_);\n\n    const layersArray = layers.getArray();\n    for (let i = 0, ii = layersArray.length; i < ii; i++) {\n      const layer = layersArray[i];\n      this.registerLayerListeners_(layer);\n      this.dispatchEvent(new GroupEvent(GroupEventType.ADDLAYER, layer));\n    }\n    this.changed();\n  }\n\n  /**\n   * @param {BaseLayer} layer The layer.\n   */\n  registerLayerListeners_(layer) {\n    const listenerKeys = [\n      listen(\n        layer,\n        ObjectEventType.PROPERTYCHANGE,\n        this.handleLayerChange_,\n        this,\n      ),\n      listen(layer, EventType.CHANGE, this.handleLayerChange_, this),\n    ];\n\n    if (layer instanceof LayerGroup) {\n      listenerKeys.push(\n        listen(layer, GroupEventType.ADDLAYER, this.handleLayerGroupAdd_, this),\n        listen(\n          layer,\n          GroupEventType.REMOVELAYER,\n          this.handleLayerGroupRemove_,\n          this,\n        ),\n      );\n    }\n\n    this.listenerKeys_[getUid(layer)] = listenerKeys;\n  }\n\n  /**\n   * @param {GroupEvent} event The layer group event.\n   */\n  handleLayerGroupAdd_(event) {\n    this.dispatchEvent(new GroupEvent(GroupEventType.ADDLAYER, event.layer));\n  }\n\n  /**\n   * @param {GroupEvent} event The layer group event.\n   */\n  handleLayerGroupRemove_(event) {\n    this.dispatchEvent(new GroupEvent(GroupEventType.REMOVELAYER, event.layer));\n  }\n\n  /**\n   * @param {import(\"../Collection.js\").CollectionEvent<import(\"./Base.js\").default>} collectionEvent CollectionEvent.\n   * @private\n   */\n  handleLayersAdd_(collectionEvent) {\n    const layer = collectionEvent.element;\n    this.registerLayerListeners_(layer);\n    this.dispatchEvent(new GroupEvent(GroupEventType.ADDLAYER, layer));\n    this.changed();\n  }\n\n  /**\n   * @param {import(\"../Collection.js\").CollectionEvent<import(\"./Base.js\").default>} collectionEvent CollectionEvent.\n   * @private\n   */\n  handleLayersRemove_(collectionEvent) {\n    const layer = collectionEvent.element;\n    const key = getUid(layer);\n    this.listenerKeys_[key].forEach(unlistenByKey);\n    delete this.listenerKeys_[key];\n    this.dispatchEvent(new GroupEvent(GroupEventType.REMOVELAYER, layer));\n    this.changed();\n  }\n\n  /**\n   * Returns the {@link module:ol/Collection~Collection collection} of {@link module:ol/layer/Layer~Layer layers}\n   * in this group.\n   * @return {!Collection<import(\"./Base.js\").default>} Collection of\n   *   {@link module:ol/layer/Base~BaseLayer layers} that are part of this group.\n   * @observable\n   * @api\n   */\n  getLayers() {\n    return /** @type {!Collection<import(\"./Base.js\").default>} */ (\n      this.get(Property.LAYERS)\n    );\n  }\n\n  /**\n   * Set the {@link module:ol/Collection~Collection collection} of {@link module:ol/layer/Layer~Layer layers}\n   * in this group.\n   * @param {!Collection<import(\"./Base.js\").default>} layers Collection of\n   *   {@link module:ol/layer/Base~BaseLayer layers} that are part of this group.\n   * @observable\n   * @api\n   */\n  setLayers(layers) {\n    const collection = this.getLayers();\n    if (collection) {\n      const currentLayers = collection.getArray();\n      for (let i = 0, ii = currentLayers.length; i < ii; ++i) {\n        this.dispatchEvent(\n          new GroupEvent(GroupEventType.REMOVELAYER, currentLayers[i]),\n        );\n      }\n    }\n\n    this.set(Property.LAYERS, layers);\n  }\n\n  /**\n   * @param {Array<import(\"./Layer.js\").default>} [array] Array of layers (to be modified in place).\n   * @return {Array<import(\"./Layer.js\").default>} Array of layers.\n   * @override\n   */\n  getLayersArray(array) {\n    array = array !== undefined ? array : [];\n    this.getLayers().forEach(function (layer) {\n      layer.getLayersArray(array);\n    });\n    return array;\n  }\n\n  /**\n   * Get the layer states list and use this groups z-index as the default\n   * for all layers in this and nested groups, if it is unset at this point.\n   * If dest is not provided and this group's z-index is undefined\n   * 0 is used a the default z-index.\n   * @param {Array<import(\"./Layer.js\").State>} [dest] Optional list\n   * of layer states (to be modified in place).\n   * @return {Array<import(\"./Layer.js\").State>} List of layer states.\n   * @override\n   */\n  getLayerStatesArray(dest) {\n    const states = dest !== undefined ? dest : [];\n    const pos = states.length;\n\n    this.getLayers().forEach(function (layer) {\n      layer.getLayerStatesArray(states);\n    });\n\n    const ownLayerState = this.getLayerState();\n    let defaultZIndex = ownLayerState.zIndex;\n    if (!dest && ownLayerState.zIndex === undefined) {\n      defaultZIndex = 0;\n    }\n    for (let i = pos, ii = states.length; i < ii; i++) {\n      const layerState = states[i];\n      layerState.opacity *= ownLayerState.opacity;\n      layerState.visible = layerState.visible && ownLayerState.visible;\n      layerState.maxResolution = Math.min(\n        layerState.maxResolution,\n        ownLayerState.maxResolution,\n      );\n      layerState.minResolution = Math.max(\n        layerState.minResolution,\n        ownLayerState.minResolution,\n      );\n      layerState.minZoom = Math.max(layerState.minZoom, ownLayerState.minZoom);\n      layerState.maxZoom = Math.min(layerState.maxZoom, ownLayerState.maxZoom);\n      if (ownLayerState.extent !== undefined) {\n        if (layerState.extent !== undefined) {\n          layerState.extent = getIntersection(\n            layerState.extent,\n            ownLayerState.extent,\n          );\n        } else {\n          layerState.extent = ownLayerState.extent;\n        }\n      }\n      if (layerState.zIndex === undefined) {\n        layerState.zIndex = defaultZIndex;\n      }\n    }\n\n    return states;\n  }\n\n  /**\n   * @return {import(\"../source/Source.js\").State} Source state.\n   * @override\n   */\n  getSourceState() {\n    return 'ready';\n  }\n}\n\nexport default LayerGroup;\n", "/**\n * @module ol/renderer/Map\n */\nimport Disposable from '../Disposable.js';\nimport {wrapX} from '../coordinate.js';\nimport {getWidth} from '../extent.js';\nimport {TRUE} from '../functions.js';\nimport {inView} from '../layer/Layer.js';\nimport {shared as iconImageCache} from '../style/IconImageCache.js';\nimport {compose as composeTransform, makeInverse} from '../transform.js';\nimport {abstract} from '../util.js';\n\n/**\n * @template T\n * @typedef HitMatch\n * @property {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @property {import(\"../layer/Layer.js\").default} layer Layer.\n * @property {import(\"../geom/SimpleGeometry.js\").default} geometry Geometry.\n * @property {number} distanceSq Squared distance.\n * @property {import(\"./vector.js\").FeatureCallback<T>} callback Callback.\n */\n\n/**\n * @abstract\n */\nclass MapRenderer extends Disposable {\n  /**\n   * @param {import(\"../Map.js\").default} map Map.\n   */\n  constructor(map) {\n    super();\n\n    /**\n     * @private\n     * @type {import(\"../Map.js\").default}\n     */\n    this.map_ = map;\n  }\n\n  /**\n   * @abstract\n   * @param {import(\"../render/EventType.js\").default} type Event type.\n   * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n   */\n  dispatchRenderEvent(type, frameState) {\n    abstract();\n  }\n\n  /**\n   * @param {import(\"../Map.js\").FrameState} frameState FrameState.\n   * @protected\n   */\n  calculateMatrices2D(frameState) {\n    const viewState = frameState.viewState;\n    const coordinateToPixelTransform = frameState.coordinateToPixelTransform;\n    const pixelToCoordinateTransform = frameState.pixelToCoordinateTransform;\n\n    composeTransform(\n      coordinateToPixelTransform,\n      frameState.size[0] / 2,\n      frameState.size[1] / 2,\n      1 / viewState.resolution,\n      -1 / viewState.resolution,\n      -viewState.rotation,\n      -viewState.center[0],\n      -viewState.center[1],\n    );\n\n    makeInverse(pixelToCoordinateTransform, coordinateToPixelTransform);\n  }\n\n  /**\n   * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n   * @param {import(\"../Map.js\").FrameState} frameState FrameState.\n   * @param {number} hitTolerance Hit tolerance in pixels.\n   * @param {boolean} checkWrapped Check for wrapped geometries.\n   * @param {import(\"./vector.js\").FeatureCallback<T>} callback Feature callback.\n   * @param {S} thisArg Value to use as `this` when executing `callback`.\n   * @param {function(this: U, import(\"../layer/Layer.js\").default): boolean} layerFilter Layer filter\n   *     function, only layers which are visible and for which this function\n   *     returns `true` will be tested for features.  By default, all visible\n   *     layers will be tested.\n   * @param {U} thisArg2 Value to use as `this` when executing `layerFilter`.\n   * @return {T|undefined} Callback result.\n   * @template S,T,U\n   */\n  forEachFeatureAtCoordinate(\n    coordinate,\n    frameState,\n    hitTolerance,\n    checkWrapped,\n    callback,\n    thisArg,\n    layerFilter,\n    thisArg2,\n  ) {\n    let result;\n    const viewState = frameState.viewState;\n\n    /**\n     * @param {boolean} managed Managed layer.\n     * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n     * @param {import(\"../layer/Layer.js\").default} layer Layer.\n     * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n     * @return {T|undefined} Callback result.\n     */\n    function forEachFeatureAtCoordinate(managed, feature, layer, geometry) {\n      return callback.call(thisArg, feature, managed ? layer : null, geometry);\n    }\n\n    const projection = viewState.projection;\n\n    const translatedCoordinate = wrapX(coordinate.slice(), projection);\n    const offsets = [[0, 0]];\n    if (projection.canWrapX() && checkWrapped) {\n      const projectionExtent = projection.getExtent();\n      const worldWidth = getWidth(projectionExtent);\n      offsets.push([-worldWidth, 0], [worldWidth, 0]);\n    }\n\n    const layerStates = frameState.layerStatesArray;\n    const numLayers = layerStates.length;\n\n    const matches = /** @type {Array<HitMatch<T>>} */ ([]);\n    const tmpCoord = [];\n    for (let i = 0; i < offsets.length; i++) {\n      for (let j = numLayers - 1; j >= 0; --j) {\n        const layerState = layerStates[j];\n        const layer = layerState.layer;\n        if (\n          layer.hasRenderer() &&\n          inView(layerState, viewState) &&\n          layerFilter.call(thisArg2, layer)\n        ) {\n          const layerRenderer = layer.getRenderer();\n          const source = layer.getSource();\n          if (layerRenderer && source) {\n            const coordinates = source.getWrapX()\n              ? translatedCoordinate\n              : coordinate;\n            const callback = forEachFeatureAtCoordinate.bind(\n              null,\n              layerState.managed,\n            );\n            tmpCoord[0] = coordinates[0] + offsets[i][0];\n            tmpCoord[1] = coordinates[1] + offsets[i][1];\n            result = layerRenderer.forEachFeatureAtCoordinate(\n              tmpCoord,\n              frameState,\n              hitTolerance,\n              callback,\n              matches,\n            );\n          }\n          if (result) {\n            return result;\n          }\n        }\n      }\n    }\n    if (matches.length === 0) {\n      return undefined;\n    }\n    const order = 1 / matches.length;\n    matches.forEach((m, i) => (m.distanceSq += i * order));\n    matches.sort((a, b) => a.distanceSq - b.distanceSq);\n    matches.some((m) => {\n      return (result = m.callback(m.feature, m.layer, m.geometry));\n    });\n    return result;\n  }\n\n  /**\n   * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n   * @param {import(\"../Map.js\").FrameState} frameState FrameState.\n   * @param {number} hitTolerance Hit tolerance in pixels.\n   * @param {boolean} checkWrapped Check for wrapped geometries.\n   * @param {function(this: U, import(\"../layer/Layer.js\").default): boolean} layerFilter Layer filter\n   *     function, only layers which are visible and for which this function\n   *     returns `true` will be tested for features.  By default, all visible\n   *     layers will be tested.\n   * @param {U} thisArg Value to use as `this` when executing `layerFilter`.\n   * @return {boolean} Is there a feature at the given coordinate?\n   * @template U\n   */\n  hasFeatureAtCoordinate(\n    coordinate,\n    frameState,\n    hitTolerance,\n    checkWrapped,\n    layerFilter,\n    thisArg,\n  ) {\n    const hasFeature = this.forEachFeatureAtCoordinate(\n      coordinate,\n      frameState,\n      hitTolerance,\n      checkWrapped,\n      TRUE,\n      this,\n      layerFilter,\n      thisArg,\n    );\n\n    return hasFeature !== undefined;\n  }\n\n  /**\n   * @return {import(\"../Map.js\").default} Map.\n   */\n  getMap() {\n    return this.map_;\n  }\n\n  /**\n   * Render.\n   * @abstract\n   * @param {?import(\"../Map.js\").FrameState} frameState Frame state.\n   */\n  renderFrame(frameState) {\n    abstract();\n  }\n\n  /**\n   * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n   * @protected\n   */\n  scheduleExpireIconCache(frameState) {\n    if (iconImageCache.canExpireCache()) {\n      frameState.postRenderFunctions.push(expireIconCache);\n    }\n  }\n}\n\n/**\n * @param {import(\"../Map.js\").default} map Map.\n * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n */\nfunction expireIconCache(map, frameState) {\n  iconImageCache.expire();\n}\n\nexport default MapRenderer;\n", "/**\n * @module ol/renderer/Composite\n */\nimport ObjectEventType from '../ObjectEventType.js';\nimport {CLASS_UNSELECTABLE} from '../css.js';\nimport {createMockDiv, isCanvas, replaceChildren} from '../dom.js';\nimport {listen, unlistenByKey} from '../events.js';\nimport {WORKER_OFFSCREEN_CANVAS} from '../has.js';\nimport BaseVectorLayer from '../layer/BaseVector.js';\nimport {inView} from '../layer/Layer.js';\nimport RenderEvent from '../render/Event.js';\nimport RenderEventType from '../render/EventType.js';\nimport {checkedFonts} from '../render/canvas.js';\nimport {fromString} from '../transform.js';\nimport MapRenderer from './Map.js';\n\n/**\n * @classdesc\n * Canvas map renderer.\n * @api\n */\nclass CompositeMapRenderer extends MapRenderer {\n  /**\n   * @param {import(\"../Map.js\").default} map Map.\n   */\n  constructor(map) {\n    super(map);\n\n    /**\n     * @private\n     * @type {import(\"../events.js\").EventsKey}\n     */\n    this.fontChangeListenerKey_ = listen(\n      checkedFonts,\n      ObjectEventType.PROPERTYCHANGE,\n      map.redrawText,\n      map,\n    );\n\n    /**\n     * @private\n     * @type {HTMLDivElement}\n     */\n    this.element_ = WORKER_OFFSCREEN_CANVAS\n      ? createMockDiv()\n      : document.createElement('div');\n    const style = this.element_.style;\n    style.position = 'absolute';\n    style.width = '100%';\n    style.height = '100%';\n    style.zIndex = '0';\n\n    this.element_.className = CLASS_UNSELECTABLE + ' ol-layers';\n\n    const container = map.getViewport();\n    if (container) {\n      // maps in a worker do not have a viewport.\n      container.insertBefore(this.element_, container.firstChild || null);\n    }\n\n    /**\n     * @private\n     * @type {Array<HTMLElement>}\n     */\n    this.children_ = [];\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.renderedVisible_ = true;\n  }\n\n  /**\n   * @param {import(\"../render/EventType.js\").default} type Event type.\n   * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n   * @override\n   */\n  dispatchRenderEvent(type, frameState) {\n    const map = this.getMap();\n    if (map.hasListener(type)) {\n      const event = new RenderEvent(type, undefined, frameState);\n      map.dispatchEvent(event);\n    }\n  }\n\n  /**\n   * @override\n   */\n  disposeInternal() {\n    unlistenByKey(this.fontChangeListenerKey_);\n    this.element_.remove();\n    super.disposeInternal();\n  }\n\n  /**\n   * Render.\n   * @param {?import(\"../Map.js\").FrameState} frameState Frame state.\n   * @override\n   */\n  renderFrame(frameState) {\n    if (!frameState) {\n      if (this.renderedVisible_) {\n        this.element_.style.display = 'none';\n        this.renderedVisible_ = false;\n      }\n      return;\n    }\n\n    this.calculateMatrices2D(frameState);\n    this.dispatchRenderEvent(RenderEventType.PRECOMPOSE, frameState);\n\n    const layerStatesArray = frameState.layerStatesArray.sort(\n      (a, b) => a.zIndex - b.zIndex,\n    );\n    const declutter = layerStatesArray.some(\n      (layerState) =>\n        layerState.layer instanceof BaseVectorLayer &&\n        layerState.layer.getDeclutter(),\n    );\n    if (declutter) {\n      // Some layers need decluttering, turn on deferred rendering hint\n      frameState.declutter = {};\n    }\n    const viewState = frameState.viewState;\n\n    this.children_.length = 0;\n\n    const map = this.getMap();\n    const mapCanvas = map.getTargetElement();\n    /** @type {CanvasRenderingContext2D|undefined} */\n    let mapContext;\n    if (isCanvas(mapCanvas)) {\n      mapContext = /** @type {CanvasRenderingContext2D} */ (\n        mapCanvas.getContext('2d')\n      );\n      mapContext.setTransform(1, 0, 0, 1, 0, 0);\n      mapContext.clearRect(0, 0, mapCanvas.width, mapCanvas.height);\n    }\n\n    const renderedLayerStates = [];\n    let previousElement = mapContext ? mapCanvas : null;\n    for (let i = 0, ii = layerStatesArray.length; i < ii; ++i) {\n      const layerState = layerStatesArray[i];\n      frameState.layerIndex = i;\n\n      const layer = layerState.layer;\n      const sourceState = layer.getSourceState();\n      if (\n        !inView(layerState, viewState) ||\n        (sourceState != 'ready' && sourceState != 'undefined')\n      ) {\n        layer.unrender();\n        continue;\n      }\n\n      const element = layer.render(frameState, previousElement);\n      if (!element) {\n        continue;\n      }\n      if (element !== previousElement) {\n        this.children_.push(element);\n        previousElement = element;\n      }\n\n      renderedLayerStates.push(layerState);\n    }\n\n    this.declutter(frameState, renderedLayerStates);\n\n    replaceChildren(this.element_, this.children_);\n\n    for (const container of mapContext ? this.children_ : []) {\n      const canvas = container.firstElementChild || container;\n      const backgroundColor = container.style.backgroundColor;\n      if (backgroundColor && (!isCanvas(canvas) || canvas.width > 0)) {\n        mapContext.fillStyle = backgroundColor;\n        mapContext.fillRect(\n          0,\n          0,\n          mapContext.canvas.width,\n          mapContext.canvas.height,\n        );\n      }\n      if (!isCanvas(canvas) || canvas.width === 0) {\n        continue;\n      }\n      mapContext.save();\n      const opacity = container.style.opacity || canvas.style.opacity;\n      mapContext.globalAlpha = opacity === '' ? 1 : Number(opacity);\n      const transform = canvas.style.transform;\n      if (transform) {\n        // Get the transform parameters from the style's transform matrix\n        mapContext.transform(\n          .../** @type {[number, number, number, number, number, number]} */ (\n            fromString(transform)\n          ),\n        );\n      } else {\n        const w = parseFloat(canvas.style.width) / canvas.width;\n        const h = parseFloat(canvas.style.height) / canvas.height;\n        mapContext.transform(w, 0, 0, h, 0, 0);\n      }\n      mapContext.drawImage(canvas, 0, 0);\n      mapContext.restore();\n    }\n\n    this.dispatchRenderEvent(RenderEventType.POSTCOMPOSE, frameState);\n\n    if (!this.renderedVisible_) {\n      this.element_.style.display = '';\n      this.renderedVisible_ = true;\n    }\n\n    this.scheduleExpireIconCache(frameState);\n  }\n\n  /**\n   * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n   * @param {Array<import('../layer/Layer.js').State>} layerStates Layers.\n   */\n  declutter(frameState, layerStates) {\n    if (!frameState.declutter) {\n      return;\n    }\n    for (let i = layerStates.length - 1; i >= 0; --i) {\n      const layerState = layerStates[i];\n      const layer = layerState.layer;\n      if (layer.getDeclutter()) {\n        layer.renderDeclutter(frameState, layerState);\n      }\n    }\n    layerStates.forEach((layerState) =>\n      layerState.layer.renderDeferred(frameState),\n    );\n  }\n}\n\nexport default CompositeMapRenderer;\n", "/**\n * @module ol/Map\n */\nimport Collection from './Collection.js';\nimport CollectionEventType from './CollectionEventType.js';\nimport MapBrowserEvent from './MapBrowserEvent.js';\nimport MapBrowserEventHandler from './MapBrowserEventHandler.js';\nimport MapBrowserEventType from './MapBrowserEventType.js';\nimport MapEvent from './MapEvent.js';\nimport MapEventType from './MapEventType.js';\nimport MapProperty from './MapProperty.js';\nimport BaseObject from './Object.js';\nimport ObjectEventType from './ObjectEventType.js';\nimport TileQueue, {getTilePriority} from './TileQueue.js';\nimport View from './View.js';\nimport ViewHint from './ViewHint.js';\nimport {equals} from './array.js';\nimport {assert} from './asserts.js';\nimport {warn} from './console.js';\nimport {defaults as defaultControls} from './control/defaults.js';\nimport {isCanvas} from './dom.js';\nimport {listen, unlistenByKey} from './events.js';\nimport EventType from './events/EventType.js';\nimport {\n  clone,\n  createOrUpdateEmpty,\n  equals as equalsExtent,\n  getForViewAndSize,\n  isEmpty,\n} from './extent.js';\nimport {TRUE} from './functions.js';\nimport {\n  DEVICE_PIXEL_RATIO,\n  PASSIVE_EVENT_LISTENERS,\n  WORKER_OFFSCREEN_CANVAS,\n} from './has.js';\nimport {defaults as defaultInteractions} from './interaction/defaults.js';\nimport LayerGroup, {GroupEvent} from './layer/Group.js';\nimport Layer from './layer/Layer.js';\nimport PointerEventType from './pointer/EventType.js';\nimport {fromUserCoordinate, toUserCoordinate} from './proj.js';\nimport RenderEventType from './render/EventType.js';\nimport CompositeMapRenderer from './renderer/Composite.js';\nimport {hasArea} from './size.js';\nimport {\n  apply as applyTransform,\n  create as createTransform,\n} from './transform.js';\nimport {getUid} from './util.js';\n\n/**\n * State of the current frame. Only `pixelRatio`, `time` and `viewState` should\n * be used in applications.\n * @typedef {Object} FrameState\n * @property {number} pixelRatio The pixel ratio of the frame.\n * @property {number} time The time when rendering of the frame was requested.\n * @property {import(\"./View.js\").State} viewState The state of the current view.\n * @property {boolean} animate Animate.\n * @property {import(\"./transform.js\").Transform} coordinateToPixelTransform CoordinateToPixelTransform.\n * @property {Object<string, import(\"rbush\").default<import('./render/canvas/Executor.js').DeclutterEntry>>|null} declutter\n * Declutter trees by declutter group.\n * When null, no decluttering is needed because no layers have decluttering enabled.\n * @property {null|import(\"./extent.js\").Extent} extent Extent (in view projection coordinates).\n * @property {import(\"./extent.js\").Extent} [nextExtent] Next extent during an animation series.\n * @property {number} index Index.\n * @property {Array<import(\"./layer/Layer.js\").State>} layerStatesArray LayerStatesArray.\n * @property {number} layerIndex LayerIndex.\n * @property {import(\"./transform.js\").Transform} pixelToCoordinateTransform PixelToCoordinateTransform.\n * @property {Array<PostRenderFunction>} postRenderFunctions PostRenderFunctions.\n * @property {import(\"./size.js\").Size} size Size.\n * @property {TileQueue} tileQueue TileQueue.\n * @property {!Object<string, Object<string, boolean>>} usedTiles UsedTiles.\n * @property {Array<number>} viewHints ViewHints.\n * @property {!Object<string, Object<string, boolean>>} wantedTiles WantedTiles.\n * @property {string} mapId The id of the map.\n * @property {Object<string, boolean>} renderTargets Identifiers of previously rendered elements.\n */\n\n/**\n * @typedef {function(Map, FrameState): any} PostRenderFunction\n */\n\n/**\n * @typedef {Object} AtPixelOptions\n * @property {undefined|function(import(\"./layer/Layer.js\").default<import(\"./source/Source.js\").default>): boolean} [layerFilter] Layer filter\n * function. The filter function will receive one argument, the\n * {@link module:ol/layer/Layer~Layer layer-candidate} and it should return a boolean value.\n * Only layers which are visible and for which this function returns `true`\n * will be tested for features. By default, all visible layers will be tested.\n * @property {number} [hitTolerance=0] Hit-detection tolerance in css pixels. Pixels\n * inside the radius around the given position will be checked for features.\n * @property {boolean} [checkWrapped=true] Check-Wrapped Will check for wrapped geometries inside the range of\n *   +/- 1 world width. Works only if a projection is used that can be wrapped.\n */\n\n/**\n * @typedef {Object} MapOptionsInternal\n * @property {Collection<import(\"./control/Control.js\").default>} [controls] Controls.\n * @property {Collection<import(\"./interaction/Interaction.js\").default>} [interactions] Interactions.\n * @property {HTMLElement|Document} keyboardEventTarget KeyboardEventTarget.\n * @property {Collection<import(\"./Overlay.js\").default>} overlays Overlays.\n * @property {Object<string, *>} values Values.\n */\n\n/**\n * @typedef {import(\"./ObjectEventType.js\").Types|'change:layergroup'|'change:size'|'change:target'|'change:view'} MapObjectEventTypes\n */\n\n/***\n * @template Return\n * @typedef {import(\"./Observable.js\").OnSignature<import(\"./Observable.js\").EventTypes, import(\"./events/Event.js\").default, Return> &\n *    import(\"./Observable.js\").OnSignature<MapObjectEventTypes, import(\"./Object.js\").ObjectEvent, Return> &\n *    import(\"./Observable.js\").OnSignature<import(\"./MapBrowserEventType.js\").Types, import(\"./MapBrowserEvent.js\").default, Return> &\n *    import(\"./Observable.js\").OnSignature<import(\"./MapEventType.js\").Types, import(\"./MapEvent.js\").default, Return> &\n *    import(\"./Observable.js\").OnSignature<import(\"./render/EventType.js\").MapRenderEventTypes, import(\"./render/Event.js\").default, Return> &\n *    import(\"./Observable.js\").CombinedOnSignature<import(\"./Observable.js\").EventTypes|MapObjectEventTypes|\n *      import(\"./MapBrowserEventType.js\").Types|import(\"./MapEventType.js\").Types|\n *      import(\"./render/EventType.js\").MapRenderEventTypes, Return>} MapEventHandler\n */\n\n/**\n * Object literal with config options for the map.\n * @typedef {Object} MapOptions\n * @property {Collection<import(\"./control/Control.js\").default>|Array<import(\"./control/Control.js\").default>} [controls]\n * Controls initially added to the map. If not specified,\n * {@link module:ol/control/defaults.defaults} is used. In a worker, no controls are added by default.\n * @property {number} [pixelRatio=window.devicePixelRatio] The ratio between\n * physical pixels and device-independent pixels (dips) on the device.\n * @property {Collection<import(\"./interaction/Interaction.js\").default>|Array<import(\"./interaction/Interaction.js\").default>} [interactions]\n * Interactions that are initially added to the map. If not specified,\n * {@link module:ol/interaction/defaults.defaults} is used. In a worker, no interactions are added by default.\n * @property {HTMLElement|Document|string} [keyboardEventTarget] The element to\n * listen to keyboard events on. This determines when the `KeyboardPan` and\n * `KeyboardZoom` interactions trigger. For example, if this option is set to\n * `document` the keyboard interactions will always trigger. If this option is\n * not specified, the element the library listens to keyboard events on is the\n * map target (i.e. the user-provided div for the map). If this is not\n * `document`, the target element needs to be focused for key events to be\n * emitted, requiring that the target element has a `tabindex` attribute.\n * @property {Array<import(\"./layer/Base.js\").default>|Collection<import(\"./layer/Base.js\").default>|LayerGroup} [layers]\n * Layers. If this is not defined, a map with no layers will be rendered. Note\n * that layers are rendered in the order supplied, so if you want, for example,\n * a vector layer to appear on top of a tile layer, it must come after the tile\n * layer.\n * @property {number} [maxTilesLoading=16] Maximum number tiles to load\n * simultaneously.\n * @property {number} [moveTolerance=1] The minimum distance in pixels the\n * cursor must move to be detected as a map move event instead of a click.\n * Increasing this value can make it easier to click on the map.\n * @property {Collection<import(\"./Overlay.js\").default>|Array<import(\"./Overlay.js\").default>} [overlays]\n * Overlays initially added to the map. By default, no overlays are added.\n * @property {HTMLElement|string|HTMLCanvasElement|OffscreenCanvas} [target] The container for the map, either the\n * element itself or the `id` of the element. If not specified at construction\n * time, {@link module:ol/Map~Map#setTarget} must be called for the map to be\n * rendered. If passed by element, the container can be in a secondary document.\n * For use in workers or when exporting a map, use an `OffscreenCanvas` or `HTMLCanvasElement` as target,\n * with a width and height in physical pixels, optionally multiplied by and a scale transform matching\n * the map's pixel ratio.\n * For accessibility (focus and keyboard events for map navigation), the `target` element must have a\n *  properly configured `tabindex` attribute. If the `target` element is inside a Shadow DOM, the\n *  `tabindex` atribute must be set on the custom element's host element.\n * **Note:** CSS `transform` support for the target element is limited to `scale`.\n * @property {View|Promise<import(\"./View.js\").ViewOptions>} [view] The map's view.  No layer sources will be\n * fetched unless this is specified at construction time or through\n * {@link module:ol/Map~Map#setView}.\n */\n\n/**\n * @param {import(\"./layer/Base.js\").default} layer Layer.\n */\nfunction removeLayerMapProperty(layer) {\n  if (layer instanceof Layer) {\n    layer.setMapInternal(null);\n    return;\n  }\n  if (layer instanceof LayerGroup) {\n    layer.getLayers().forEach(removeLayerMapProperty);\n  }\n}\n\n/**\n * @param {import(\"./layer/Base.js\").default} layer Layer.\n * @param {Map} map Map.\n */\nfunction setLayerMapProperty(layer, map) {\n  if (layer instanceof Layer) {\n    layer.setMapInternal(map);\n    return;\n  }\n  if (layer instanceof LayerGroup) {\n    const layers = layer.getLayers().getArray();\n    for (let i = 0, ii = layers.length; i < ii; ++i) {\n      setLayerMapProperty(layers[i], map);\n    }\n  }\n}\n\n/**\n * @classdesc\n * The map is the core component of OpenLayers. For a map to render, a view,\n * one or more layers, and a target container are needed:\n *\n *     import Map from 'ol/Map.js';\n *     import View from 'ol/View.js';\n *     import TileLayer from 'ol/layer/Tile.js';\n *     import OSM from 'ol/source/OSM.js';\n *\n *     const map = new Map({\n *       view: new View({\n *         center: [0, 0],\n *         zoom: 1,\n *       }),\n *       layers: [\n *         new TileLayer({\n *           source: new OSM(),\n *         }),\n *       ],\n *       target: 'map',\n *     });\n *\n * The above snippet creates a map using a {@link module:ol/layer/Tile~TileLayer} to\n * display {@link module:ol/source/OSM~OSM} OSM data and render it to a DOM\n * element with the id `map`.\n *\n * The constructor places a viewport container (with CSS class name\n * `ol-viewport`) in the target element (see `getViewport()`), and then two\n * further elements within the viewport: one with CSS class name\n * `ol-overlaycontainer-stopevent` for controls and some overlays, and one with\n * CSS class name `ol-overlaycontainer` for other overlays (see the `stopEvent`\n * option of {@link module:ol/Overlay~Overlay} for the difference). The map\n * itself is placed in a further element within the viewport.\n *\n * Layers are stored as a {@link module:ol/Collection~Collection} in\n * layerGroups. A top-level group is provided by the library. This is what is\n * accessed by `getLayerGroup` and `setLayerGroup`. Layers entered in the\n * options are added to this group, and `addLayer` and `removeLayer` change the\n * layer collection in the group. `getLayers` is a convenience function for\n * `getLayerGroup().getLayers()`. Note that {@link module:ol/layer/Group~LayerGroup}\n * is a subclass of {@link module:ol/layer/Base~BaseLayer}, so layers entered in the\n * options or added with `addLayer` can be groups, which can contain further\n * groups, and so on.\n *\n * @fires import(\"./MapBrowserEvent.js\").MapBrowserEvent\n * @fires import(\"./MapEvent.js\").MapEvent\n * @fires import(\"./render/Event.js\").default#precompose\n * @fires import(\"./render/Event.js\").default#postcompose\n * @fires import(\"./render/Event.js\").default#rendercomplete\n * @api\n */\nclass Map extends BaseObject {\n  /**\n   * @param {MapOptions} [options] Map options.\n   */\n  constructor(options) {\n    super();\n\n    options = options || {};\n\n    /***\n     * @type {MapEventHandler<import(\"./events.js\").EventsKey>}\n     */\n    this.on;\n\n    /***\n     * @type {MapEventHandler<import(\"./events.js\").EventsKey>}\n     */\n    this.once;\n\n    /***\n     * @type {MapEventHandler<void>}\n     */\n    this.un;\n\n    const optionsInternal = createOptionsInternal(options);\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.renderComplete_ = false;\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.loaded_ = true;\n\n    /** @private */\n    this.boundHandleBrowserEvent_ = this.handleBrowserEvent.bind(this);\n\n    /**\n     * @type {number}\n     * @private\n     */\n    this.maxTilesLoading_ =\n      options.maxTilesLoading !== undefined ? options.maxTilesLoading : 16;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.pixelRatio_ =\n      options.pixelRatio !== undefined\n        ? options.pixelRatio\n        : DEVICE_PIXEL_RATIO;\n\n    /**\n     * @private\n     * @type {ReturnType<typeof setTimeout>}\n     */\n    this.postRenderTimeoutHandle_;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.animationDelayKey_;\n\n    /**\n     * @private\n     */\n    this.animationDelay_ = this.animationDelay_.bind(this);\n\n    /**\n     * @private\n     * @type {import(\"./transform.js\").Transform}\n     */\n    this.coordinateToPixelTransform_ = createTransform();\n\n    /**\n     * @private\n     * @type {import(\"./transform.js\").Transform}\n     */\n    this.pixelToCoordinateTransform_ = createTransform();\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.frameIndex_ = 0;\n\n    /**\n     * @private\n     * @type {?FrameState}\n     */\n    this.frameState_ = null;\n\n    /**\n     * The extent at the previous 'moveend' event.\n     * @private\n     * @type {import(\"./extent.js\").Extent}\n     */\n    this.previousExtent_ = null;\n\n    /**\n     * @private\n     * @type {?import(\"./events.js\").EventsKey}\n     */\n    this.viewPropertyListenerKey_ = null;\n\n    /**\n     * @private\n     * @type {?import(\"./events.js\").EventsKey}\n     */\n    this.viewChangeListenerKey_ = null;\n\n    /**\n     * @private\n     * @type {?Array<import(\"./events.js\").EventsKey>}\n     */\n    this.layerGroupPropertyListenerKeys_ = null;\n\n    /**\n     * @private\n     * @type {!HTMLElement}\n     */\n    if (!WORKER_OFFSCREEN_CANVAS) {\n      this.viewport_ = document.createElement('div');\n      this.viewport_.className =\n        'ol-viewport' + ('ontouchstart' in window ? ' ol-touch' : '');\n      this.viewport_.style.position = 'relative';\n      this.viewport_.style.overflow = 'hidden';\n      this.viewport_.style.width = '100%';\n      this.viewport_.style.height = '100%';\n\n      /**\n       * @private\n       * @type {!HTMLElement}\n       */\n      this.overlayContainer_ = document.createElement('div');\n      this.overlayContainer_.style.position = 'absolute';\n      this.overlayContainer_.style.zIndex = '0';\n      this.overlayContainer_.style.width = '100%';\n      this.overlayContainer_.style.height = '100%';\n      this.overlayContainer_.style.pointerEvents = 'none';\n      this.overlayContainer_.className = 'ol-overlaycontainer';\n      this.viewport_.appendChild(this.overlayContainer_);\n\n      /**\n       * @private\n       * @type {!HTMLElement}\n       */\n      this.overlayContainerStopEvent_ = document.createElement('div');\n      this.overlayContainerStopEvent_.style.position = 'absolute';\n      this.overlayContainerStopEvent_.style.zIndex = '0';\n      this.overlayContainerStopEvent_.style.width = '100%';\n      this.overlayContainerStopEvent_.style.height = '100%';\n      this.overlayContainerStopEvent_.style.pointerEvents = 'none';\n      this.overlayContainerStopEvent_.className =\n        'ol-overlaycontainer-stopevent';\n      this.viewport_.appendChild(this.overlayContainerStopEvent_);\n    }\n\n    /**\n     * @private\n     * @type {MapBrowserEventHandler}\n     */\n    this.mapBrowserEventHandler_ = null;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.moveTolerance_ = options.moveTolerance;\n\n    /**\n     * @private\n     * @type {HTMLElement|Document}\n     */\n    this.keyboardEventTarget_ = optionsInternal.keyboardEventTarget;\n\n    /**\n     * @private\n     * @type {?Array<import(\"./events.js\").EventsKey>}\n     */\n    this.targetChangeHandlerKeys_ = null;\n\n    /**\n     * @private\n     * @type {HTMLElement|null}\n     */\n    this.targetElement_ = null;\n\n    if (!WORKER_OFFSCREEN_CANVAS) {\n      /**\n       * @private\n       * @type {ResizeObserver}\n       */\n      this.resizeObserver_ = new ResizeObserver(() => this.updateSize());\n    }\n\n    /**\n     * @type {Collection<import(\"./control/Control.js\").default>}\n     * @protected\n     */\n    this.controls =\n      optionsInternal.controls ||\n      (WORKER_OFFSCREEN_CANVAS ? new Collection() : defaultControls());\n\n    /**\n     * @type {Collection<import(\"./interaction/Interaction.js\").default>}\n     * @protected\n     */\n    this.interactions =\n      optionsInternal.interactions ||\n      (WORKER_OFFSCREEN_CANVAS\n        ? new Collection()\n        : defaultInteractions({\n            onFocusOnly: true,\n          }));\n\n    /**\n     * @type {Collection<import(\"./Overlay.js\").default>}\n     * @private\n     */\n    this.overlays_ = optionsInternal.overlays;\n\n    /**\n     * A lookup of overlays by id.\n     * @private\n     * @type {Object<string, import(\"./Overlay.js\").default>}\n     */\n    this.overlayIdIndex_ = {};\n\n    /**\n     * @type {import(\"./renderer/Map.js\").default|null}\n     * @private\n     */\n    this.renderer_ = null;\n\n    /**\n     * @private\n     * @type {!Array<PostRenderFunction>}\n     */\n    this.postRenderFunctions_ = [];\n\n    /**\n     * @private\n     * @type {TileQueue}\n     */\n    this.tileQueue_ = new TileQueue(\n      this.getTilePriority.bind(this),\n      this.handleTileChange_.bind(this),\n    );\n\n    this.addChangeListener(\n      MapProperty.LAYERGROUP,\n      this.handleLayerGroupChanged_,\n    );\n    this.addChangeListener(MapProperty.VIEW, this.handleViewChanged_);\n    this.addChangeListener(MapProperty.SIZE, this.handleSizeChanged_);\n    this.addChangeListener(MapProperty.TARGET, this.handleTargetChanged_);\n\n    // setProperties will trigger the rendering of the map if the map\n    // is \"defined\" already.\n    this.setProperties(optionsInternal.values);\n\n    const map = this;\n    if (options.view && !(options.view instanceof View)) {\n      options.view.then(function (viewOptions) {\n        map.setView(new View(viewOptions));\n      });\n    }\n\n    this.controls.addEventListener(\n      CollectionEventType.ADD,\n      /**\n       * @param {import(\"./Collection.js\").CollectionEvent<import(\"./control/Control.js\").default>} event CollectionEvent\n       */\n      (event) => {\n        event.element.setMap(this);\n      },\n    );\n\n    this.controls.addEventListener(\n      CollectionEventType.REMOVE,\n      /**\n       * @param {import(\"./Collection.js\").CollectionEvent<import(\"./control/Control.js\").default>} event CollectionEvent.\n       */\n      (event) => {\n        event.element.setMap(null);\n      },\n    );\n\n    this.interactions.addEventListener(\n      CollectionEventType.ADD,\n      /**\n       * @param {import(\"./Collection.js\").CollectionEvent<import(\"./interaction/Interaction.js\").default>} event CollectionEvent.\n       */\n      (event) => {\n        event.element.setMap(this);\n      },\n    );\n\n    this.interactions.addEventListener(\n      CollectionEventType.REMOVE,\n      /**\n       * @param {import(\"./Collection.js\").CollectionEvent<import(\"./interaction/Interaction.js\").default>} event CollectionEvent.\n       */\n      (event) => {\n        event.element.setMap(null);\n      },\n    );\n\n    this.overlays_.addEventListener(\n      CollectionEventType.ADD,\n      /**\n       * @param {import(\"./Collection.js\").CollectionEvent<import(\"./Overlay.js\").default>} event CollectionEvent.\n       */\n      (event) => {\n        this.addOverlayInternal_(event.element);\n      },\n    );\n\n    this.overlays_.addEventListener(\n      CollectionEventType.REMOVE,\n      /**\n       * @param {import(\"./Collection.js\").CollectionEvent<import(\"./Overlay.js\").default>} event CollectionEvent.\n       */\n      (event) => {\n        const id = event.element.getId();\n        if (id !== undefined) {\n          delete this.overlayIdIndex_[id.toString()];\n        }\n        event.element.setMap(null);\n      },\n    );\n\n    this.controls.forEach(\n      /**\n       * @param {import(\"./control/Control.js\").default} control Control.\n       */\n      (control) => {\n        control.setMap(this);\n      },\n    );\n\n    this.interactions.forEach(\n      /**\n       * @param {import(\"./interaction/Interaction.js\").default} interaction Interaction.\n       */\n      (interaction) => {\n        interaction.setMap(this);\n      },\n    );\n\n    this.overlays_.forEach(this.addOverlayInternal_.bind(this));\n  }\n\n  /**\n   * Add the given control to the map.\n   * @param {import(\"./control/Control.js\").default} control Control.\n   * @api\n   */\n  addControl(control) {\n    this.getControls().push(control);\n  }\n\n  /**\n   * Add the given interaction to the map. If you want to add an interaction\n   * at another point of the collection use `getInteractions()` and the methods\n   * available on {@link module:ol/Collection~Collection}. This can be used to\n   * stop the event propagation from the handleEvent function. The interactions\n   * get to handle the events in the reverse order of this collection.\n   * @param {import(\"./interaction/Interaction.js\").default} interaction Interaction to add.\n   * @api\n   */\n  addInteraction(interaction) {\n    this.getInteractions().push(interaction);\n  }\n\n  /**\n   * Adds the given layer to the top of this map. If you want to add a layer\n   * elsewhere in the stack, use `getLayers()` and the methods available on\n   * {@link module:ol/Collection~Collection}.\n   * @param {import(\"./layer/Base.js\").default} layer Layer.\n   * @api\n   */\n  addLayer(layer) {\n    const layers = this.getLayerGroup().getLayers();\n    layers.push(layer);\n  }\n\n  /**\n   * @param {import(\"./layer/Group.js\").GroupEvent} event The layer add event.\n   * @private\n   */\n  handleLayerAdd_(event) {\n    setLayerMapProperty(event.layer, this);\n  }\n\n  /**\n   * Add the given overlay to the map.\n   * @param {import(\"./Overlay.js\").default} overlay Overlay.\n   * @api\n   */\n  addOverlay(overlay) {\n    this.getOverlays().push(overlay);\n  }\n\n  /**\n   * This deals with map's overlay collection changes.\n   * @param {import(\"./Overlay.js\").default} overlay Overlay.\n   * @private\n   */\n  addOverlayInternal_(overlay) {\n    const id = overlay.getId();\n    if (id !== undefined) {\n      this.overlayIdIndex_[id.toString()] = overlay;\n    }\n    overlay.setMap(this);\n  }\n\n  /**\n   *\n   * Clean up.\n   * @override\n   */\n  disposeInternal() {\n    this.controls.clear();\n    this.interactions.clear();\n    this.overlays_.clear();\n    this.resizeObserver_?.disconnect();\n    this.setTarget(null);\n    super.disposeInternal();\n  }\n\n  /**\n   * Detect features that intersect a pixel on the viewport, and execute a\n   * callback with each intersecting feature. Layers included in the detection can\n   * be configured through the `layerFilter` option in `options`.\n   * For polygons without a fill, only the stroke will be used for hit detection.\n   * Polygons must have a fill style applied to ensure that pixels inside a polygon are detected.\n   * The fill can be transparent.\n   * @param {import(\"./pixel.js\").Pixel} pixel Pixel.\n   * @param {function(import(\"./Feature.js\").FeatureLike, import(\"./layer/Layer.js\").default<import(\"./source/Source.js\").default>, import(\"./geom/SimpleGeometry.js\").default): T} callback Feature callback. The callback will be\n   *     called with two arguments. The first argument is one\n   *     {@link module:ol/Feature~Feature feature} or\n   *     {@link module:ol/render/Feature~RenderFeature render feature} at the pixel, the second is\n   *     the {@link module:ol/layer/Layer~Layer layer} of the feature and will be null for\n   *     unmanaged layers. To stop detection, callback functions can return a\n   *     truthy value.\n   * @param {AtPixelOptions} [options] Optional options.\n   * @return {T|undefined} Callback result, i.e. the return value of last\n   * callback execution, or the first truthy callback return value.\n   * @template T\n   * @api\n   */\n  forEachFeatureAtPixel(pixel, callback, options) {\n    if (!this.frameState_ || !this.renderer_) {\n      return;\n    }\n    const coordinate = this.getCoordinateFromPixelInternal(pixel);\n    options = options !== undefined ? options : {};\n    const hitTolerance =\n      options.hitTolerance !== undefined ? options.hitTolerance : 0;\n    const layerFilter =\n      options.layerFilter !== undefined ? options.layerFilter : TRUE;\n    const checkWrapped = options.checkWrapped !== false;\n    return this.renderer_.forEachFeatureAtCoordinate(\n      coordinate,\n      this.frameState_,\n      hitTolerance,\n      checkWrapped,\n      callback,\n      null,\n      layerFilter,\n      null,\n    );\n  }\n\n  /**\n   * Get all features that intersect a pixel on the viewport.\n   * For polygons without a fill, only the stroke will be used for hit detection.\n   * Polygons must have a fill style applied to ensure that pixels inside a polygon are detected.\n   * The fill can be transparent.\n   * @param {import(\"./pixel.js\").Pixel} pixel Pixel.\n   * @param {AtPixelOptions} [options] Optional options.\n   * @return {Array<import(\"./Feature.js\").FeatureLike>} The detected features or\n   * an empty array if none were found.\n   * @api\n   */\n  getFeaturesAtPixel(pixel, options) {\n    const features = [];\n    this.forEachFeatureAtPixel(\n      pixel,\n      function (feature) {\n        features.push(feature);\n      },\n      options,\n    );\n    return features;\n  }\n\n  /**\n   * Get all layers from all layer groups.\n   * @return {Array<import(\"./layer/Layer.js\").default>} Layers.\n   * @api\n   */\n  getAllLayers() {\n    const layers = [];\n    function addLayersFrom(layerGroup) {\n      layerGroup.forEach(function (layer) {\n        if (layer instanceof LayerGroup) {\n          addLayersFrom(layer.getLayers());\n        } else {\n          layers.push(layer);\n        }\n      });\n    }\n    addLayersFrom(this.getLayers());\n    return layers;\n  }\n\n  /**\n   * Detect if features intersect a pixel on the viewport. Layers included in the\n   * detection can be configured through the `layerFilter` option.\n   * For polygons without a fill, only the stroke will be used for hit detection.\n   * Polygons must have a fill style applied to ensure that pixels inside a polygon are detected.\n   * The fill can be transparent.\n   * @param {import(\"./pixel.js\").Pixel} pixel Pixel.\n   * @param {AtPixelOptions} [options] Optional options.\n   * @return {boolean} Is there a feature at the given pixel?\n   * @api\n   */\n  hasFeatureAtPixel(pixel, options) {\n    if (!this.frameState_ || !this.renderer_) {\n      return false;\n    }\n    const coordinate = this.getCoordinateFromPixelInternal(pixel);\n    options = options !== undefined ? options : {};\n    const layerFilter =\n      options.layerFilter !== undefined ? options.layerFilter : TRUE;\n    const hitTolerance =\n      options.hitTolerance !== undefined ? options.hitTolerance : 0;\n    const checkWrapped = options.checkWrapped !== false;\n    return this.renderer_.hasFeatureAtCoordinate(\n      coordinate,\n      this.frameState_,\n      hitTolerance,\n      checkWrapped,\n      layerFilter,\n      null,\n    );\n  }\n\n  /**\n   * Returns the coordinate in user projection for a browser event.\n   * @param {MouseEvent} event Event.\n   * @return {import(\"./coordinate.js\").Coordinate} Coordinate.\n   * @api\n   */\n  getEventCoordinate(event) {\n    return this.getCoordinateFromPixel(this.getEventPixel(event));\n  }\n\n  /**\n   * Returns the coordinate in view projection for a browser event.\n   * @param {MouseEvent} event Event.\n   * @return {import(\"./coordinate.js\").Coordinate} Coordinate.\n   */\n  getEventCoordinateInternal(event) {\n    return this.getCoordinateFromPixelInternal(this.getEventPixel(event));\n  }\n\n  /**\n   * Returns the map pixel position for a browser event relative to the viewport.\n   * @param {UIEvent|{clientX: number, clientY: number}} event Event.\n   * @return {import(\"./pixel.js\").Pixel} Pixel.\n   * @api\n   */\n  getEventPixel(event) {\n    const viewport = this.viewport_;\n    const viewportPosition = viewport.getBoundingClientRect();\n    const viewportSize = this.getSize();\n    const scaleX = viewportPosition.width / viewportSize[0];\n    const scaleY = viewportPosition.height / viewportSize[1];\n    const eventPosition =\n      //FIXME Are we really calling this with a TouchEvent anywhere?\n      'changedTouches' in event\n        ? /** @type {TouchEvent} */ (event).changedTouches[0]\n        : /** @type {MouseEvent} */ (event);\n\n    return [\n      (eventPosition.clientX - viewportPosition.left) / scaleX,\n      (eventPosition.clientY - viewportPosition.top) / scaleY,\n    ];\n  }\n\n  /**\n   * Get the target in which this map is rendered.\n   * Note that this returns what is entered as an option or in setTarget:\n   * if that was an element, it returns an element; if a string, it returns that.\n   * @return {HTMLElement|string|undefined} The Element or id of the Element that the\n   *     map is rendered in.\n   * @observable\n   * @api\n   */\n  getTarget() {\n    return /** @type {HTMLElement|string|undefined} */ (\n      this.get(MapProperty.TARGET)\n    );\n  }\n\n  /**\n   * Get the DOM element into which this map is rendered. In contrast to\n   * `getTarget` this method always return an `Element`, or `null` if the\n   * map has no target.\n   * @return {HTMLElement} The element that the map is rendered in.\n   * @api\n   */\n  getTargetElement() {\n    return this.targetElement_;\n  }\n\n  /**\n   * Get the coordinate for a given pixel.  This returns a coordinate in the\n   * user projection.\n   * @param {import(\"./pixel.js\").Pixel} pixel Pixel position in the map viewport.\n   * @return {import(\"./coordinate.js\").Coordinate} The coordinate for the pixel position.\n   * @api\n   */\n  getCoordinateFromPixel(pixel) {\n    return toUserCoordinate(\n      this.getCoordinateFromPixelInternal(pixel),\n      this.getView().getProjection(),\n    );\n  }\n\n  /**\n   * Get the coordinate for a given pixel.  This returns a coordinate in the\n   * map view projection.\n   * @param {import(\"./pixel.js\").Pixel} pixel Pixel position in the map viewport.\n   * @return {import(\"./coordinate.js\").Coordinate} The coordinate for the pixel position.\n   */\n  getCoordinateFromPixelInternal(pixel) {\n    const frameState = this.frameState_;\n    if (!frameState) {\n      return null;\n    }\n    return applyTransform(frameState.pixelToCoordinateTransform, pixel.slice());\n  }\n\n  /**\n   * Get the map controls. Modifying this collection changes the controls\n   * associated with the map.\n   * @return {Collection<import(\"./control/Control.js\").default>} Controls.\n   * @api\n   */\n  getControls() {\n    return this.controls;\n  }\n\n  /**\n   * Get the map overlays. Modifying this collection changes the overlays\n   * associated with the map.\n   * @return {Collection<import(\"./Overlay.js\").default>} Overlays.\n   * @api\n   */\n  getOverlays() {\n    return this.overlays_;\n  }\n\n  /**\n   * Get an overlay by its identifier (the value returned by overlay.getId()).\n   * Note that the index treats string and numeric identifiers as the same. So\n   * `map.getOverlayById(2)` will return an overlay with id `'2'` or `2`.\n   * @param {string|number} id Overlay identifier.\n   * @return {import(\"./Overlay.js\").default|null} Overlay.\n   * @api\n   */\n  getOverlayById(id) {\n    const overlay = this.overlayIdIndex_[id.toString()];\n    return overlay !== undefined ? overlay : null;\n  }\n\n  /**\n   * Get the map interactions. Modifying this collection changes the interactions\n   * associated with the map.\n   *\n   * Interactions are used for e.g. pan, zoom and rotate.\n   * @return {Collection<import(\"./interaction/Interaction.js\").default>} Interactions.\n   * @api\n   */\n  getInteractions() {\n    return this.interactions;\n  }\n\n  /**\n   * Get the layergroup associated with this map.\n   * @return {LayerGroup} A layer group containing the layers in this map.\n   * @observable\n   * @api\n   */\n  getLayerGroup() {\n    return /** @type {LayerGroup} */ (this.get(MapProperty.LAYERGROUP));\n  }\n\n  /**\n   * Clear any existing layers and add layers to the map.\n   * @param {Array<import(\"./layer/Base.js\").default>|Collection<import(\"./layer/Base.js\").default>} layers The layers to be added to the map.\n   * @api\n   */\n  setLayers(layers) {\n    const group = this.getLayerGroup();\n    if (layers instanceof Collection) {\n      group.setLayers(layers);\n      return;\n    }\n\n    const collection = group.getLayers();\n    collection.clear();\n    collection.extend(layers);\n  }\n\n  /**\n   * Get the collection of layers associated with this map.\n   * @return {!Collection<import(\"./layer/Base.js\").default>} Layers.\n   * @api\n   */\n  getLayers() {\n    const layers = this.getLayerGroup().getLayers();\n    return layers;\n  }\n\n  /**\n   * @return {boolean} Layers have sources that are still loading.\n   */\n  getLoadingOrNotReady() {\n    const layerStatesArray = this.getLayerGroup().getLayerStatesArray();\n    for (let i = 0, ii = layerStatesArray.length; i < ii; ++i) {\n      const state = layerStatesArray[i];\n      if (!state.visible) {\n        continue;\n      }\n      const renderer = state.layer.getRenderer();\n      if (renderer && !renderer.ready) {\n        return true;\n      }\n      const source = state.layer.getSource();\n      if (source && source.loading) {\n        return true;\n      }\n    }\n    return false;\n  }\n\n  /**\n   * Get the pixel for a coordinate.  This takes a coordinate in the user\n   * projection and returns the corresponding pixel.\n   * @param {import(\"./coordinate.js\").Coordinate} coordinate A map coordinate.\n   * @return {import(\"./pixel.js\").Pixel} A pixel position in the map viewport.\n   * @api\n   */\n  getPixelFromCoordinate(coordinate) {\n    const viewCoordinate = fromUserCoordinate(\n      coordinate,\n      this.getView().getProjection(),\n    );\n    return this.getPixelFromCoordinateInternal(viewCoordinate);\n  }\n\n  /**\n   * Get the pixel for a coordinate.  This takes a coordinate in the map view\n   * projection and returns the corresponding pixel.\n   * @param {import(\"./coordinate.js\").Coordinate} coordinate A map coordinate.\n   * @return {import(\"./pixel.js\").Pixel} A pixel position in the map viewport.\n   */\n  getPixelFromCoordinateInternal(coordinate) {\n    const frameState = this.frameState_;\n    if (!frameState) {\n      return null;\n    }\n    return applyTransform(\n      frameState.coordinateToPixelTransform,\n      coordinate.slice(0, 2),\n    );\n  }\n\n  /**\n   * Get the pixel ratio of the rendered map.\n   * @return {number} Pixel ratio.\n   * @api\n   */\n  getPixelRatio() {\n    return this.pixelRatio_;\n  }\n\n  /**\n   * Set the pixel ratio of the rendered map.\n   * @param {number} pixelRatio Pixel ratio.\n   * @api\n   */\n  setPixelRatio(pixelRatio) {\n    if (this.pixelRatio_ === pixelRatio) {\n      return;\n    }\n    this.pixelRatio_ = pixelRatio;\n    this.render();\n  }\n\n  /**\n   * Get the map renderer.\n   * @return {import(\"./renderer/Map.js\").default|null} Renderer\n   */\n  getRenderer() {\n    return this.renderer_;\n  }\n\n  /**\n   * Get the size of this map.\n   * @return {import(\"./size.js\").Size|undefined} The size in pixels of the map in the DOM.\n   * @observable\n   * @api\n   */\n  getSize() {\n    return /** @type {import(\"./size.js\").Size|undefined} */ (\n      this.get(MapProperty.SIZE)\n    );\n  }\n\n  /**\n   * Get the view associated with this map. A view manages properties such as\n   * center and resolution.\n   * @return {View} The view that controls this map.\n   * @observable\n   * @api\n   */\n  getView() {\n    return /** @type {View} */ (this.get(MapProperty.VIEW));\n  }\n\n  /**\n   * Get the element that serves as the map viewport.\n   * @return {HTMLElement} Viewport.\n   * @api\n   */\n  getViewport() {\n    return this.viewport_;\n  }\n\n  /**\n   * Get the element that serves as the container for overlays.  Elements added to\n   * this container will let mousedown and touchstart events through to the map,\n   * so clicks and gestures on an overlay will trigger {@link module:ol/MapBrowserEvent~MapBrowserEvent}\n   * events.\n   * @return {!HTMLElement} The map's overlay container.\n   */\n  getOverlayContainer() {\n    return this.overlayContainer_;\n  }\n\n  /**\n   * Get the element that serves as a container for overlays that don't allow\n   * event propagation. Elements added to this container won't let mousedown and\n   * touchstart events through to the map, so clicks and gestures on an overlay\n   * don't trigger any {@link module:ol/MapBrowserEvent~MapBrowserEvent}.\n   * @return {!HTMLElement} The map's overlay container that stops events.\n   */\n  getOverlayContainerStopEvent() {\n    return this.overlayContainerStopEvent_;\n  }\n\n  /**\n   * @return {!Document} The document where the map is displayed.\n   */\n  getOwnerDocument() {\n    const targetElement = this.getTargetElement();\n    return targetElement ? targetElement.ownerDocument : document;\n  }\n\n  /**\n   * @param {import(\"./Tile.js\").default} tile Tile.\n   * @param {string} tileSourceKey Tile source key.\n   * @param {import(\"./coordinate.js\").Coordinate} tileCenter Tile center.\n   * @param {number} tileResolution Tile resolution.\n   * @return {number} Tile priority.\n   */\n  getTilePriority(tile, tileSourceKey, tileCenter, tileResolution) {\n    return getTilePriority(\n      this.frameState_,\n      tile,\n      tileSourceKey,\n      tileCenter,\n      tileResolution,\n    );\n  }\n\n  /**\n   * @param {PointerEvent|KeyboardEvent|WheelEvent} browserEvent Browser event.\n   * @param {string} [type] Type.\n   */\n  handleBrowserEvent(browserEvent, type) {\n    type = type || browserEvent.type;\n    const mapBrowserEvent = new MapBrowserEvent(type, this, browserEvent);\n    this.handleMapBrowserEvent(mapBrowserEvent);\n  }\n\n  /**\n   * @param {MapBrowserEvent} mapBrowserEvent The event to handle.\n   */\n  handleMapBrowserEvent(mapBrowserEvent) {\n    if (!this.frameState_) {\n      // With no view defined, we cannot translate pixels into geographical\n      // coordinates so interactions cannot be used.\n      return;\n    }\n    const originalEvent = mapBrowserEvent.originalEvent;\n    const eventType = originalEvent.type;\n    if (\n      eventType === PointerEventType.POINTERDOWN ||\n      eventType === EventType.WHEEL ||\n      eventType === EventType.KEYDOWN\n    ) {\n      const doc = this.getOwnerDocument();\n      const rootNode = this.viewport_.getRootNode\n        ? this.viewport_.getRootNode()\n        : doc;\n      const target = /** @type {Node} */ (originalEvent.target);\n\n      const currentDoc =\n        rootNode instanceof ShadowRoot\n          ? rootNode.host === target\n            ? rootNode.host.ownerDocument\n            : rootNode\n          : rootNode === doc\n            ? doc.documentElement\n            : rootNode;\n      if (\n        // Abort if the target is a child of the container for elements whose events are not meant\n        // to be handled by map interactions.\n        this.overlayContainerStopEvent_.contains(target) ||\n        // Abort if the event target is a child of the container that is no longer in the page.\n        // It's possible for the target to no longer be in the page if it has been removed in an\n        // event listener, this might happen in a Control that recreates it's content based on\n        // user interaction either manually or via a render in something like https://reactjs.org/\n        !currentDoc.contains(target)\n      ) {\n        return;\n      }\n    }\n    mapBrowserEvent.frameState = this.frameState_;\n    if (this.dispatchEvent(mapBrowserEvent) !== false) {\n      const interactionsArray = this.getInteractions().getArray().slice();\n      for (let i = interactionsArray.length - 1; i >= 0; i--) {\n        const interaction = interactionsArray[i];\n        if (\n          interaction.getMap() !== this ||\n          !interaction.getActive() ||\n          !this.getTargetElement()\n        ) {\n          continue;\n        }\n        const cont = interaction.handleEvent(mapBrowserEvent);\n        if (!cont || mapBrowserEvent.propagationStopped) {\n          break;\n        }\n      }\n    }\n  }\n\n  /**\n   * @protected\n   */\n  handlePostRender() {\n    const frameState = this.frameState_;\n\n    // Manage the tile queue\n    // Image loads are expensive and a limited resource, so try to use them\n    // efficiently:\n    // * When the view is static we allow a large number of parallel tile loads\n    //   to complete the frame as quickly as possible.\n    // * When animating or interacting, image loads can cause janks, so we reduce\n    //   the maximum number of loads per frame and limit the number of parallel\n    //   tile loads to remain reactive to view changes and to reduce the chance of\n    //   loading tiles that will quickly disappear from view.\n    const tileQueue = this.tileQueue_;\n    if (!tileQueue.isEmpty()) {\n      let maxTotalLoading = this.maxTilesLoading_;\n      let maxNewLoads = maxTotalLoading;\n      const hints = frameState ? frameState.viewHints : undefined;\n      const animatingOrInteracting = hints\n        ? hints[ViewHint.ANIMATING] || hints[ViewHint.INTERACTING]\n        : false;\n      if (animatingOrInteracting) {\n        const lowOnFrameBudget = Date.now() - frameState.time > 8;\n        maxTotalLoading = lowOnFrameBudget ? 0 : 8;\n        maxNewLoads = lowOnFrameBudget ? 0 : 2;\n      }\n      if (tileQueue.getTilesLoading() < maxTotalLoading) {\n        if (animatingOrInteracting) {\n          tileQueue.reprioritize();\n        }\n        tileQueue.loadMoreTiles(maxTotalLoading, maxNewLoads);\n      }\n    }\n\n    if (frameState && this.renderer_ && !frameState.animate) {\n      if (this.renderComplete_) {\n        if (this.hasListener(RenderEventType.RENDERCOMPLETE)) {\n          this.renderer_.dispatchRenderEvent(\n            RenderEventType.RENDERCOMPLETE,\n            frameState,\n          );\n        }\n        if (this.loaded_ === false) {\n          this.loaded_ = true;\n          this.dispatchEvent(\n            new MapEvent(MapEventType.LOADEND, this, frameState),\n          );\n        }\n      } else if (this.loaded_ === true) {\n        this.loaded_ = false;\n        this.dispatchEvent(\n          new MapEvent(MapEventType.LOADSTART, this, frameState),\n        );\n      }\n    }\n\n    const postRenderFunctions = this.postRenderFunctions_;\n    if (frameState) {\n      for (let i = 0, ii = postRenderFunctions.length; i < ii; ++i) {\n        postRenderFunctions[i](this, frameState);\n      }\n    }\n    postRenderFunctions.length = 0;\n  }\n\n  /**\n   * @private\n   */\n  handleSizeChanged_() {\n    if (this.getView() && !this.getView().getAnimating()) {\n      this.getView().resolveConstraints(0);\n    }\n\n    this.render();\n  }\n\n  /**\n   * @private\n   */\n  handleTargetChanged_() {\n    if (this.mapBrowserEventHandler_) {\n      for (let i = 0, ii = this.targetChangeHandlerKeys_.length; i < ii; ++i) {\n        unlistenByKey(this.targetChangeHandlerKeys_[i]);\n      }\n      this.targetChangeHandlerKeys_ = null;\n      this.viewport_.removeEventListener(\n        EventType.CONTEXTMENU,\n        this.boundHandleBrowserEvent_,\n      );\n      this.viewport_.removeEventListener(\n        EventType.WHEEL,\n        this.boundHandleBrowserEvent_,\n      );\n      this.mapBrowserEventHandler_.dispose();\n      this.mapBrowserEventHandler_ = null;\n      this.viewport_.remove();\n    }\n\n    if (this.targetElement_ && !isCanvas(this.targetElement_)) {\n      this.resizeObserver_?.unobserve(this.targetElement_);\n      const rootNode = this.targetElement_.getRootNode();\n      if (rootNode instanceof ShadowRoot) {\n        this.resizeObserver_.unobserve(rootNode.host);\n      }\n      this.setSize(undefined);\n    }\n\n    // target may be undefined, null, a string or an Element.\n    // If it's a string we convert it to an Element before proceeding.\n    // If it's not now an Element we remove the viewport from the DOM.\n    // If it's an Element we append the viewport element to it.\n\n    const target = this.getTarget();\n    const targetElement =\n      typeof target === 'string' ? document.getElementById(target) : target;\n    this.targetElement_ = targetElement;\n    if (!targetElement) {\n      if (this.renderer_) {\n        clearTimeout(this.postRenderTimeoutHandle_);\n        this.postRenderTimeoutHandle_ = undefined;\n        this.postRenderFunctions_.length = 0;\n        this.renderer_.dispose();\n        this.renderer_ = null;\n      }\n      if (this.animationDelayKey_) {\n        cancelAnimationFrame(this.animationDelayKey_);\n        this.animationDelayKey_ = undefined;\n      }\n    } else {\n      if (!isCanvas(targetElement)) {\n        targetElement.appendChild(this.viewport_);\n      }\n      if (!this.renderer_) {\n        this.renderer_ = new CompositeMapRenderer(this);\n      }\n\n      if (!isCanvas(targetElement)) {\n        this.mapBrowserEventHandler_ = new MapBrowserEventHandler(\n          this,\n          this.moveTolerance_,\n        );\n        for (const key in MapBrowserEventType) {\n          this.mapBrowserEventHandler_.addEventListener(\n            MapBrowserEventType[key],\n            this.handleMapBrowserEvent.bind(this),\n          );\n        }\n        this.viewport_.addEventListener(\n          EventType.CONTEXTMENU,\n          this.boundHandleBrowserEvent_,\n          false,\n        );\n        this.viewport_.addEventListener(\n          EventType.WHEEL,\n          this.boundHandleBrowserEvent_,\n          PASSIVE_EVENT_LISTENERS ? {passive: false} : false,\n        );\n\n        let keyboardEventTarget;\n        if (!this.keyboardEventTarget_) {\n          // check if map target is in shadowDOM, if yes use host element as target\n          const targetRoot = targetElement.getRootNode();\n          const targetCandidate =\n            targetRoot instanceof ShadowRoot ? targetRoot.host : targetElement;\n          keyboardEventTarget = targetCandidate;\n        } else {\n          keyboardEventTarget = this.keyboardEventTarget_;\n        }\n\n        this.targetChangeHandlerKeys_ = [\n          listen(\n            keyboardEventTarget,\n            EventType.KEYDOWN,\n            this.handleBrowserEvent,\n            this,\n          ),\n          listen(\n            keyboardEventTarget,\n            EventType.KEYPRESS,\n            this.handleBrowserEvent,\n            this,\n          ),\n        ];\n        if (!isCanvas(targetElement)) {\n          const rootNode = targetElement.getRootNode();\n          if (rootNode instanceof ShadowRoot) {\n            this.resizeObserver_.observe(rootNode.host);\n          }\n          this.resizeObserver_?.observe(targetElement);\n        }\n      }\n\n      this.updateSize();\n    }\n    // updateSize calls setSize, so no need to call this.render\n    // ourselves here.\n  }\n\n  /**\n   * @private\n   */\n  handleTileChange_() {\n    this.render();\n  }\n\n  /**\n   * @private\n   */\n  handleViewPropertyChanged_() {\n    this.render();\n  }\n\n  /**\n   * @private\n   */\n  handleViewChanged_() {\n    if (this.viewPropertyListenerKey_) {\n      unlistenByKey(this.viewPropertyListenerKey_);\n      this.viewPropertyListenerKey_ = null;\n    }\n    if (this.viewChangeListenerKey_) {\n      unlistenByKey(this.viewChangeListenerKey_);\n      this.viewChangeListenerKey_ = null;\n    }\n    const view = this.getView();\n    if (view) {\n      this.updateViewportSize_(this.getSize());\n\n      this.viewPropertyListenerKey_ = listen(\n        view,\n        ObjectEventType.PROPERTYCHANGE,\n        this.handleViewPropertyChanged_,\n        this,\n      );\n      this.viewChangeListenerKey_ = listen(\n        view,\n        EventType.CHANGE,\n        this.handleViewPropertyChanged_,\n        this,\n      );\n\n      view.resolveConstraints(0);\n    }\n    this.render();\n  }\n\n  /**\n   * @private\n   */\n  handleLayerGroupChanged_() {\n    if (this.layerGroupPropertyListenerKeys_) {\n      this.layerGroupPropertyListenerKeys_.forEach(unlistenByKey);\n      this.layerGroupPropertyListenerKeys_ = null;\n    }\n    const layerGroup = this.getLayerGroup();\n    if (layerGroup) {\n      this.handleLayerAdd_(new GroupEvent('addlayer', layerGroup));\n      this.layerGroupPropertyListenerKeys_ = [\n        listen(layerGroup, ObjectEventType.PROPERTYCHANGE, this.render, this),\n        listen(layerGroup, EventType.CHANGE, this.render, this),\n        listen(layerGroup, 'addlayer', this.handleLayerAdd_, this),\n        listen(layerGroup, 'removelayer', this.handleLayerRemove_, this),\n      ];\n    }\n    this.render();\n  }\n\n  /**\n   * @return {boolean} Is rendered.\n   */\n  isRendered() {\n    return !!this.frameState_;\n  }\n\n  /**\n   * @private\n   */\n  animationDelay_() {\n    this.animationDelayKey_ = undefined;\n    this.renderFrame_(Date.now());\n  }\n\n  /**\n   * Requests an immediate render in a synchronous manner.\n   * @api\n   */\n  renderSync() {\n    if (this.animationDelayKey_) {\n      cancelAnimationFrame(this.animationDelayKey_);\n    }\n    this.animationDelay_();\n  }\n\n  /**\n   * Redraws all text after new fonts have loaded\n   */\n  redrawText() {\n    if (!this.frameState_) {\n      return;\n    }\n    const layerStates = this.frameState_.layerStatesArray;\n    for (let i = 0, ii = layerStates.length; i < ii; ++i) {\n      const layer = layerStates[i].layer;\n      if (layer.hasRenderer()) {\n        layer.getRenderer().handleFontsChanged();\n      }\n    }\n  }\n\n  /**\n   * Request a map rendering (at the next animation frame).\n   * @api\n   */\n  render() {\n    if (this.renderer_ && this.animationDelayKey_ === undefined) {\n      this.animationDelayKey_ = requestAnimationFrame(this.animationDelay_);\n    }\n  }\n\n  /**\n   * Remove the given control from the map.\n   * @param {import(\"./control/Control.js\").default} control Control.\n   * @return {import(\"./control/Control.js\").default|undefined} The removed control (or undefined\n   *     if the control was not found).\n   * @api\n   */\n  removeControl(control) {\n    return this.getControls().remove(control);\n  }\n\n  /**\n   * Remove the given interaction from the map.\n   * @param {import(\"./interaction/Interaction.js\").default} interaction Interaction to remove.\n   * @return {import(\"./interaction/Interaction.js\").default|undefined} The removed interaction (or\n   *     undefined if the interaction was not found).\n   * @api\n   */\n  removeInteraction(interaction) {\n    return this.getInteractions().remove(interaction);\n  }\n\n  /**\n   * Removes the given layer from the map.\n   * @param {import(\"./layer/Base.js\").default} layer Layer.\n   * @return {import(\"./layer/Base.js\").default|undefined} The removed layer (or undefined if the\n   *     layer was not found).\n   * @api\n   */\n  removeLayer(layer) {\n    const layers = this.getLayerGroup().getLayers();\n    return layers.remove(layer);\n  }\n\n  /**\n   * @param {import(\"./layer/Group.js\").GroupEvent} event The layer remove event.\n   * @private\n   */\n  handleLayerRemove_(event) {\n    removeLayerMapProperty(event.layer);\n  }\n\n  /**\n   * Remove the given overlay from the map.\n   * @param {import(\"./Overlay.js\").default} overlay Overlay.\n   * @return {import(\"./Overlay.js\").default|undefined} The removed overlay (or undefined\n   *     if the overlay was not found).\n   * @api\n   */\n  removeOverlay(overlay) {\n    return this.getOverlays().remove(overlay);\n  }\n\n  /**\n   * @param {number} time Time.\n   * @private\n   */\n  renderFrame_(time) {\n    const size = this.getSize();\n    const view = this.getView();\n    const previousFrameState = this.frameState_;\n    /** @type {?FrameState} */\n    let frameState = null;\n    if (size !== undefined && hasArea(size) && view && view.isDef()) {\n      const viewHints = view.getHints(\n        this.frameState_ ? this.frameState_.viewHints : undefined,\n      );\n      const viewState = view.getState();\n      frameState = {\n        animate: false,\n        coordinateToPixelTransform: this.coordinateToPixelTransform_,\n        declutter: null,\n        extent: getForViewAndSize(\n          viewState.center,\n          viewState.resolution,\n          viewState.rotation,\n          size,\n        ),\n        index: this.frameIndex_++,\n        layerIndex: 0,\n        layerStatesArray: this.getLayerGroup().getLayerStatesArray(),\n        pixelRatio: this.pixelRatio_,\n        pixelToCoordinateTransform: this.pixelToCoordinateTransform_,\n        postRenderFunctions: [],\n        size: size,\n        tileQueue: this.tileQueue_,\n        time: time,\n        usedTiles: {},\n        viewState: viewState,\n        viewHints: viewHints,\n        wantedTiles: {},\n        mapId: getUid(this),\n        renderTargets: {},\n      };\n      if (viewState.nextCenter && viewState.nextResolution) {\n        const rotation = isNaN(viewState.nextRotation)\n          ? viewState.rotation\n          : viewState.nextRotation;\n\n        frameState.nextExtent = getForViewAndSize(\n          viewState.nextCenter,\n          viewState.nextResolution,\n          rotation,\n          size,\n        );\n      }\n    }\n\n    this.frameState_ = frameState;\n    this.renderer_.renderFrame(frameState);\n\n    if (frameState) {\n      if (frameState.animate) {\n        this.render();\n      }\n      Array.prototype.push.apply(\n        this.postRenderFunctions_,\n        frameState.postRenderFunctions,\n      );\n\n      if (previousFrameState) {\n        const moveStart =\n          !this.previousExtent_ ||\n          (!isEmpty(this.previousExtent_) &&\n            !equalsExtent(frameState.extent, this.previousExtent_));\n        if (moveStart) {\n          this.dispatchEvent(\n            new MapEvent(MapEventType.MOVESTART, this, previousFrameState),\n          );\n          this.previousExtent_ = createOrUpdateEmpty(this.previousExtent_);\n        }\n      }\n\n      const idle =\n        this.previousExtent_ &&\n        !frameState.viewHints[ViewHint.ANIMATING] &&\n        !frameState.viewHints[ViewHint.INTERACTING] &&\n        !equalsExtent(frameState.extent, this.previousExtent_);\n\n      if (idle) {\n        this.dispatchEvent(\n          new MapEvent(MapEventType.MOVEEND, this, frameState),\n        );\n        clone(frameState.extent, this.previousExtent_);\n      }\n    }\n\n    this.dispatchEvent(new MapEvent(MapEventType.POSTRENDER, this, frameState));\n\n    this.renderComplete_ =\n      (this.hasListener(MapEventType.LOADSTART) ||\n        this.hasListener(MapEventType.LOADEND) ||\n        this.hasListener(RenderEventType.RENDERCOMPLETE)) &&\n      !this.tileQueue_.getTilesLoading() &&\n      !this.tileQueue_.getCount() &&\n      !this.getLoadingOrNotReady();\n\n    if (!this.postRenderTimeoutHandle_) {\n      this.postRenderTimeoutHandle_ = setTimeout(() => {\n        this.postRenderTimeoutHandle_ = undefined;\n        this.handlePostRender();\n      }, 0);\n    }\n  }\n\n  /**\n   * Sets the layergroup of this map.\n   * @param {LayerGroup} layerGroup A layer group containing the layers in this map.\n   * @observable\n   * @api\n   */\n  setLayerGroup(layerGroup) {\n    const oldLayerGroup = this.getLayerGroup();\n    if (oldLayerGroup) {\n      this.handleLayerRemove_(new GroupEvent('removelayer', oldLayerGroup));\n    }\n    this.set(MapProperty.LAYERGROUP, layerGroup);\n  }\n\n  /**\n   * Set the size of this map.\n   * @param {import(\"./size.js\").Size|undefined} size The size in pixels of the map in the DOM.\n   * @observable\n   * @api\n   */\n  setSize(size) {\n    this.set(MapProperty.SIZE, size);\n  }\n\n  /**\n   * Set the target element to render this map into.\n   * For accessibility (focus and keyboard events for map navigation), the `target` element must have a\n   *  properly configured `tabindex` attribute. If the `target` element is inside a Shadow DOM, the\n   *  `tabindex` atribute must be set on the custom element's host element.\n   * @param {HTMLElement|string} [target] The Element or id of the Element\n   *     that the map is rendered in.\n   * @observable\n   * @api\n   */\n  setTarget(target) {\n    this.set(MapProperty.TARGET, target);\n  }\n\n  /**\n   * Set the view for this map.\n   * @param {View|Promise<import(\"./View.js\").ViewOptions>|null} view The view that controls this map.\n   * It is also possible to pass a promise that resolves to options for constructing a view.  This\n   * alternative allows view properties to be resolved by sources or other components that load\n   * view-related metadata.\n   * @observable\n   * @api\n   */\n  setView(view) {\n    if (!view || view instanceof View) {\n      this.set(MapProperty.VIEW, view);\n      return;\n    }\n    this.set(MapProperty.VIEW, new View());\n\n    const map = this;\n    view.then(function (viewOptions) {\n      map.setView(new View(viewOptions));\n    });\n  }\n\n  /**\n   * Force a recalculation of the map viewport size.  This should be called when\n   * third-party code changes the size of the map viewport.\n   * @api\n   */\n  updateSize() {\n    const targetElement = this.getTargetElement();\n\n    let size = undefined;\n    if (targetElement) {\n      let width, height;\n      if (isCanvas(targetElement)) {\n        const transform = targetElement.getContext('2d').getTransform();\n        // Use scale components of the transform to calculate the size in CSS pixels\n        width = targetElement.width / transform.a;\n        height = targetElement.height / transform.d;\n      } else {\n        const computedStyle = getComputedStyle(targetElement);\n        width =\n          targetElement.offsetWidth -\n          parseFloat(computedStyle['borderLeftWidth']) -\n          parseFloat(computedStyle['paddingLeft']) -\n          parseFloat(computedStyle['paddingRight']) -\n          parseFloat(computedStyle['borderRightWidth']);\n        height =\n          targetElement.offsetHeight -\n          parseFloat(computedStyle['borderTopWidth']) -\n          parseFloat(computedStyle['paddingTop']) -\n          parseFloat(computedStyle['paddingBottom']) -\n          parseFloat(computedStyle['borderBottomWidth']);\n      }\n      if (!isNaN(width) && !isNaN(height)) {\n        size = [Math.max(0, width), Math.max(0, height)];\n        if (\n          !hasArea(size) &&\n          !!(\n            targetElement.offsetWidth ||\n            targetElement.offsetHeight ||\n            targetElement.getClientRects().length\n          )\n        ) {\n          warn(\n            \"No map visible because the map container's width or height are 0.\",\n          );\n        }\n      }\n    }\n\n    const oldSize = this.getSize();\n    if (size && (!oldSize || !equals(size, oldSize))) {\n      this.updateViewportSize_(size);\n      this.setSize(size);\n    }\n  }\n\n  /**\n   * Recomputes the viewport size and save it on the view object (if any)\n   * @param {import(\"./size.js\").Size|undefined} size The size.\n   * @private\n   */\n  updateViewportSize_(size) {\n    const view = this.getView();\n    if (view) {\n      view.setViewportSize(size);\n    }\n  }\n}\n\n/**\n * @param {MapOptions} options Map options.\n * @return {MapOptionsInternal} Internal map options.\n */\nfunction createOptionsInternal(options) {\n  /**\n   * @type {HTMLElement|Document}\n   */\n  let keyboardEventTarget = null;\n  if (options.keyboardEventTarget !== undefined) {\n    keyboardEventTarget =\n      typeof options.keyboardEventTarget === 'string'\n        ? document.getElementById(options.keyboardEventTarget)\n        : options.keyboardEventTarget;\n  }\n\n  /**\n   * @type {Object<string, *>}\n   */\n  const values = {};\n\n  const layerGroup =\n    options.layers &&\n    typeof (/** @type {?} */ (options.layers).getLayers) === 'function'\n      ? /** @type {LayerGroup} */ (options.layers)\n      : new LayerGroup({\n          layers:\n            /** @type {Collection<import(\"./layer/Base.js\").default>|Array<import(\"./layer/Base.js\").default>} */ (\n              options.layers\n            ),\n        });\n  values[MapProperty.LAYERGROUP] = layerGroup;\n\n  values[MapProperty.TARGET] = options.target;\n\n  values[MapProperty.VIEW] =\n    options.view instanceof View ? options.view : new View();\n\n  /** @type {Collection<import(\"./control/Control.js\").default>} */\n  let controls;\n  if (options.controls !== undefined) {\n    if (Array.isArray(options.controls)) {\n      controls = new Collection(options.controls.slice());\n    } else {\n      assert(\n        typeof (/** @type {?} */ (options.controls).getArray) === 'function',\n        'Expected `controls` to be an array or an `ol/Collection.js`',\n      );\n      controls = options.controls;\n    }\n  }\n\n  /** @type {Collection<import(\"./interaction/Interaction.js\").default>} */\n  let interactions;\n  if (options.interactions !== undefined) {\n    if (Array.isArray(options.interactions)) {\n      interactions = new Collection(options.interactions.slice());\n    } else {\n      assert(\n        typeof (/** @type {?} */ (options.interactions).getArray) ===\n          'function',\n        'Expected `interactions` to be an array or an `ol/Collection.js`',\n      );\n      interactions = options.interactions;\n    }\n  }\n\n  /** @type {Collection<import(\"./Overlay.js\").default>} */\n  let overlays;\n  if (options.overlays !== undefined) {\n    if (Array.isArray(options.overlays)) {\n      overlays = new Collection(options.overlays.slice());\n    } else {\n      assert(\n        typeof (/** @type {?} */ (options.overlays).getArray) === 'function',\n        'Expected `overlays` to be an array or an `ol/Collection.js`',\n      );\n      overlays = options.overlays;\n    }\n  } else {\n    overlays = new Collection();\n  }\n\n  return {\n    controls: controls,\n    interactions: interactions,\n    keyboardEventTarget: keyboardEventTarget,\n    overlays: overlays,\n    values: values,\n  };\n}\nexport default Map;\n", "/** Vanilla JS geographic inputs\n * color, size, width, font, symboles, dash, arrow, pattern\n */\nimport ol_Object from 'ol/Object.js'\n\n/** Abstract base class; normally only used for creating subclasses and not instantiated in apps.    \n * @constructor\n * @extends {ol_Object}\n * @param {*} options\n *  @param {Element} [options.input] input element, if none create one\n *  @param {string} [options.type] input type, if no input\n *  @param {number} [options.min] input min, if no input\n *  @param {number} [options.max] input max, if no input\n *  @param {number} [options.step] input step, if no input\n *  @param {string|number} [options.val] input value\n *  @param {boolean} [options.checked] check input\n *  @param {boolean} [options.hidden] the input is display:none\n *  @param {boolean} [options.disabled] disable input\n *  @param {Element} [options.parent] parent element, if no input\n */\nvar ol_ext_input_Base = class olextinputBase extends ol_Object {\n  constructor(options) {\n    options = options || {};\n    super();\n\n    var input = this.input = options.input;\n    if (!input) {\n      input = this.input = document.createElement('input');\n      if (options.type) {\n        input.setAttribute('type', options.type);\n      }\n      if (options.min !== undefined) {\n        input.setAttribute('min', options.min);\n      }\n      if (options.max !== undefined) {\n        input.setAttribute('max', options.max);\n      }\n      if (options.step !== undefined) {\n        input.setAttribute('step', options.step);\n      }\n      if (options.parent) {\n        options.parent.appendChild(input);\n      }\n    }\n    if (options.disabled) {\n      input.disabled = true;\n    }\n    if (options.checked !== undefined) {\n      input.checked = !!options.checked;\n    }\n    if (options.val !== undefined) {\n      input.value = options.val;\n    }\n    if (options.hidden) { \n      input.classList.add('ol-input-hidden');\n    }\n    input.addEventListener('focus', function () {\n      if (this.element)\n        this.element.classList.add('ol-focus');\n    }.bind(this));\n    var tout;\n    input.addEventListener('focusout', function () {\n      if (this.element) {\n        if (tout)\n          clearTimeout(tout);\n        tout = setTimeout(function () {\n          this.element.classList.remove('ol-focus');\n        }.bind(this), 0);\n      }\n    }.bind(this));\n  }\n  /** Listen to drag event\n   * @param {Element} elt\n   * @param {function} cback when draggin on the element\n   * @private\n   */\n  _listenDrag(elt, cback) {\n    var handle = function (e) {\n      this.moving = true;\n      this.element.classList.add('ol-moving');\n      var listen = function (e) {\n        if (e.type === 'pointerup') {\n          document.removeEventListener('pointermove', listen);\n          document.removeEventListener('pointerup', listen);\n          document.removeEventListener('pointercancel', listen);\n          setTimeout(function () {\n            this.moving = false;\n            this.element.classList.remove('ol-moving');\n          }.bind(this));\n        }\n        if (e.target === elt)\n          cback(e);\n        e.stopPropagation();\n        e.preventDefault();\n      }.bind(this);\n      document.addEventListener('pointermove', listen, false);\n      document.addEventListener('pointerup', listen, false);\n      document.addEventListener('pointercancel', listen, false);\n      e.stopPropagation();\n      e.preventDefault();\n    }.bind(this);\n    elt.addEventListener('mousedown', handle, false);\n    elt.addEventListener('touchstart', handle, false);\n  }\n  /** Set the current value\n   */\n  setValue(v) {\n    if (v !== undefined)\n      this.input.value = v;\n    this.input.dispatchEvent(new Event('change'));\n  }\n  /** Get the current getValue\n   * @returns {string}\n   */\n  getValue() {\n    return this.input.value;\n  }\n  /** Get the input element\n   * @returns {Element}\n   */\n  getInputElement() {\n    return this.input;\n  }\n}\n\nexport default ol_ext_input_Base\n", "import ol_ext_input_Base from './Base.js'\n\n/** Checkbox input\n * @constructor\n * @extends {ol_ext_input_Base}\n * @fires check\n * @param {*} options\n *  @param {string} [options.className]\n *  @param {Element|string} [options.html] label content\n *  @param {string} [options.after] label garnish (placed after)\n *  @param {Element} [options.input] input element, if non create one\n *  @param {Element} [options.parent] parent element, if create an input\n *  @param {boolean} [options.autoClose=true]\n *  @param {boolean} [options.visible=false] display the input\n */\nvar ol_ext_input_Checkbox = class olextinputCheckbox extends ol_ext_input_Base {\n  constructor(options) {\n    options = options || {};\n\n    super(options);\n\n    var label = this.element = document.createElement('label');\n    if (options.html instanceof Element)\n      label.appendChild(options.html);\n    else if (options.html !== undefined)\n      label.innerHTML = options.html;\n    label.className = ('ol-ext-check ol-ext-checkbox ' + (options.className || '')).trim();\n\n    if (this.input.parentNode)\n      this.input.parentNode.insertBefore(label, this.input);\n    label.appendChild(this.input);\n    label.appendChild(document.createElement('span'));\n    if (options.after) {\n      label.appendChild(document.createTextNode(options.after));\n    }\n\n    // Handle change\n    this.input.addEventListener('change', function () {\n      this.dispatchEvent({ type: 'check', checked: this.input.checked, value: this.input.value });\n    }.bind(this));\n\n  }\n  isChecked() {\n    return this.input.checked;\n  }\n}\n\nexport default ol_ext_input_Checkbox\n", "import ol_ext_input_Checkbox from './Checkbox.js'\n\n/** Switch input\n * @constructor\n * @extends {ol_ext_input_Checkbox}\n * @fires check\n * @param {*} options\n *  @param {string} [options.className]\n *  @param {Element} [options.input] input element, if non create one\n *  @param {Element} [options.parent] parent element, if create an input\n */\nvar ol_ext_input_Switch = class olextinputSwitch extends ol_ext_input_Checkbox {\n  constructor(options) {\n    options = options || {};\n\n    super(options);\n\n    this.element.className = ('ol-ext-toggle-switch ' + (options.className || '')).trim();\n  }\n};\n  \nexport default ol_ext_input_Switch\n", "import ol_ext_input_Checkbox from './Checkbox.js'\n\n/** Switch input\n * @constructor\n * @extends {ol_ext_input_Checkbox}\n * @fires check\n * @param {*} options\n *  @param {string} [options.className]\n *  @param {Element} [options.input] input element, if non create one\n *  @param {Element} [options.parent] parent element, if create an input\n */\nvar ol_ext_input_Radio = class olextinputRadio extends ol_ext_input_Checkbox {\n  constructor(options) {\n    options = options || {};\n\n    super(options);\n\n    this.element.className = ('ol-ext-check ol-ext-radio ' + (options.className || '')).trim();\n  }\n}\n  \nexport default ol_ext_input_Radio\n", "/** Vanilla JS helper to manipulate DOM without jQuery\n * @see https://github.com/nefe/You-Dont-Need-jQuery\n * @see https://plainjs.com/javascript/\n * @see http://youmightnotneedjquery.com/\n */\nimport ol_Map from 'ol/Map.js'\nimport ol_ext_input_Checkbox from './input/Checkbox.js'\nimport ol_ext_input_Switch from './input/Switch.js'\nimport ol_ext_input_Radio from './input/Radio.js'\n\n/** @namespace ol.ext.element */\nvar ol_ext_element = {};\n\n/**\n * Create an element\n * @param {string} tagName The element tag, use 'TEXT' to create a text node\n * @param {*} options\n *  @param {string} options.className className The element class name \n *  @param {Element} options.parent Parent to append the element as child\n *  @param {Element|string} [options.html] Content of the element (if text is not set)\n *  @param {string} [options.text] Text content (if html is not set)\n *  @param {Element|string} [options.options] when tagName = SELECT a list of options as key:value to add to the select\n *  @param {string} options.* Any other attribut to add to the element\n */\nol_ext_element.create = function (tagName, options) {\n  options = options || {};\n  var elt;\n  // Create text node\n  if (tagName === 'TEXT') {\n    elt = document.createTextNode(options.html||'');\n    if (options.parent) options.parent.appendChild(elt);\n  } else {\n    // Other element\n    elt = document.createElement(tagName.toLowerCase());\n    if (/button/i.test(tagName)) elt.setAttribute('type', 'button');\n    for (var attr in options) {\n      switch (attr) {\n        case 'className': {\n          if (options.className && options.className.trim) elt.setAttribute('class', options.className.trim());\n          break;\n        }\n        case 'text': {\n          elt.innerText = options.text;\n          break;\n        }\n        case 'html': {\n          if (options.html instanceof Element) elt.appendChild(options.html)\n          else if (options.html!==undefined) elt.innerHTML = options.html;\n          break;\n        }\n        case 'parent': {\n          if (options.parent) options.parent.appendChild(elt);\n          break;\n        }\n        case 'options': {\n          if (/select/i.test(tagName)) {\n            for (var i in options.options) {\n              ol_ext_element.create('OPTION', {\n                html: i,\n                value: options.options[i],\n                parent: elt          \n              })\n            }\n          }\n          break;\n        }\n        case 'style': {\n          ol_ext_element.setStyle(elt, options.style);\n          break;\n        }\n        case 'change':\n        case 'click': {\n          ol_ext_element.addListener(elt, attr, options[attr]);\n          break;\n        }\n        case 'on': {\n          for (var e in options.on) {\n            ol_ext_element.addListener(elt, e, options.on[e]);\n          }\n          break;\n        }\n        case 'checked': {\n          elt.checked = !!options.checked;\n          break;\n        }\n        default: {\n          elt.setAttribute(attr, options[attr]);\n          break;\n        }\n      }\n    }\n  }\n  return elt;\n};\n\n/** Create a toggle switch input\n * @param {*} options\n *  @param {string|Element} options.html\n *  @param {string|Element} options.after\n *  @param {boolean} options.checked\n *  @param {*} [options.on] a list of actions\n *  @param {function} [options.click]\n *  @param {function} [options.change]\n *  @param {Element} options.parent\n */\nol_ext_element.createSwitch = function (options) {\n  var input = ol_ext_element.create('INPUT', {\n    type: 'checkbox',\n    on: options.on,\n    click: options.click,\n    change: options.change,\n    parent: options.parent\n  });\n  var opt = Object.assign ({ input: input }, options || {});\n  new ol_ext_input_Switch(opt);\n  return input;\n};\n\n/** Create a toggle switch input\n * @param {*} options\n *  @param {string|Element} options.html\n *  @param {string|Element} options.after\n *  @param {string} [options.name] input name\n *  @param {string} [options.type=checkbox] input type: radio or checkbox\n *  @param {string} options.value input value\n *  @param {*} [options.on] a list of actions\n *  @param {function} [options.click]\n *  @param {function} [options.change]\n *  @param {Element} options.parent\n */\nol_ext_element.createCheck = function (options) {\n  var input = ol_ext_element.create('INPUT', {\n    name: options.name,\n    type: (options.type==='radio' ? 'radio' : 'checkbox'),\n    on: options.on,\n    parent: options.parent\n  });\n  var opt = Object.assign ({ input: input }, options || {});\n  if (options.type === 'radio') {\n    new ol_ext_input_Radio(opt);\n  } else {\n    new ol_ext_input_Checkbox(opt);\n  }\n  return input;\n};\n\n/** Set inner html or append a child element to an element\n * @param {Element} element\n * @param {Element|string} html Content of the element\n */\nol_ext_element.setHTML = function(element, html) {\n  if (html instanceof Element) element.appendChild(html)\n  else if (html!==undefined) element.innerHTML = html;\n};\n\n/** Append text into an elemnt\n * @param {Element} element\n * @param {string} text text content\n */\nol_ext_element.appendText = function(element, text) {\n  element.appendChild(document.createTextNode(text||''));\n};\n\n/**\n * Add a set of event listener to an element\n * @param {Element} element\n * @param {string|Array<string>} eventType\n * @param {function} fn\n */\nol_ext_element.addListener = function (element, eventType, fn, useCapture ) {\n  if (typeof eventType === 'string') eventType = eventType.split(' ');\n  eventType.forEach(function(e) {\n    element.addEventListener(e, fn, useCapture);\n  });\n};\n\n/**\n * Add a set of event listener to an element\n * @param {Element} element\n * @param {string|Array<string>} eventType\n * @param {function} fn\n */\nol_ext_element.removeListener = function (element, eventType, fn) {\n  if (typeof eventType === 'string') eventType = eventType.split(' ');\n  eventType.forEach(function(e) {\n    element.removeEventListener(e, fn);\n  });\n};\n\n/**\n * Show an element\n * @param {Element} element\n */\nol_ext_element.show = function (element) {\n  element.style.display = '';\n};\n\n/**\n * Hide an element\n * @param {Element} element\n */\nol_ext_element.hide = function (element) {\n  element.style.display = 'none';\n};\n\n/**\n * Test if an element is hihdden\n * @param {Element} element\n * @return {boolean}\n */\nol_ext_element.hidden = function (element) {\n  return ol_ext_element.getStyle(element, 'display') === 'none';\n};\n\n/**\n * Toggle an element\n * @param {Element} element\n */\nol_ext_element.toggle = function (element) {\n  element.style.display = (element.style.display==='none' ? '' : 'none');\n};\n\n/** Set style of an element\n * @param {DOMElement} el the element\n * @param {*} st list of style\n */\nol_ext_element.setStyle = function(el, st) {\n  for (var s in st) {\n    switch (s) {\n      case 'top':\n      case 'left':\n      case 'bottom':\n      case 'right':\n      case 'minWidth':\n      case 'maxWidth':\n      case 'width':\n      case 'height': {\n        if (typeof(st[s]) === 'number') {\n          el.style[s] = st[s]+'px';\n        } else {\n          el.style[s] = st[s];\n        }\n        break;\n      }\n      default: {\n        el.style[s] = st[s];\n      }\n    }\n  }\n};\n\n/**\n * Get style propertie of an element\n * @param {DOMElement} el the element\n * @param {string} styleProp Propertie name\n * @return {*} style value\n */\nol_ext_element.getStyle = function(el, styleProp) {\n  var value, defaultView = (el.ownerDocument || document).defaultView;\n  // W3C standard way:\n  if (defaultView && defaultView.getComputedStyle) {\n    // sanitize property name to css notation\n    // (hypen separated words eg. font-Size)\n    styleProp = styleProp.replace(/([A-Z])/g, \"-$1\").toLowerCase();\n    value = defaultView.getComputedStyle(el, null).getPropertyValue(styleProp);\n  } else if (el.currentStyle) { // IE\n    // sanitize property name to camelCase\n    styleProp = styleProp.replace(/-(\\w)/g, function(str, letter) {\n      return letter.toUpperCase();\n    });\n    value = el.currentStyle[styleProp];\n    // convert other units to pixels on IE\n    if (/^\\d+(em|pt|%|ex)?$/i.test(value)) { \n      return (function(value) {\n        var oldLeft = el.style.left, oldRsLeft = el.runtimeStyle.left;\n        el.runtimeStyle.left = el.currentStyle.left;\n        el.style.left = value || 0;\n        value = el.style.pixelLeft + \"px\";\n        el.style.left = oldLeft;\n        el.runtimeStyle.left = oldRsLeft;\n        return value;\n      })(value);\n    }\n  }\n  if (/px$/.test(value)) return parseInt(value);\n  return value;\n};\n\n/** Get outerHeight of an elemen\n * @param {DOMElement} elt\n * @return {number}\n */\nol_ext_element.outerHeight = function(elt) {\n  return elt.offsetHeight + ol_ext_element.getStyle(elt, 'marginBottom')\n};\n\n/** Get outerWidth of an elemen\n * @param {DOMElement} elt\n * @return {number}\n */\nol_ext_element.outerWidth = function(elt) {\n  return elt.offsetWidth + ol_ext_element.getStyle(elt, 'marginLeft')\n};\n\n/** Get element offset rect\n * @param {DOMElement} elt\n * @return {*} \n */\nol_ext_element.offsetRect = function(elt) {\n  var rect = elt.getBoundingClientRect();\n  return {\n    top: rect.top + (window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0),\n    left: rect.left + (window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft || 0),\n    height: rect.height || (rect.bottom - rect.top),\n    width: rect.width || (rect.right - rect.left)\n  }\n};\n\n/** Get element offset \n * @param {ELement} elt\n * @returns {Object} top/left offset\n */\nol_ext_element.getFixedOffset = function(elt) {\n  var offset = {\n    left:0,\n    top:0\n  };\n  var getOffset = function(parent) {\n    if (!parent) return offset;\n    // Check position when transform\n    if (ol_ext_element.getStyle(parent, 'position') === 'absolute'\n      && ol_ext_element.getStyle(parent, 'transform') !== \"none\") {\n      var r = parent.getBoundingClientRect();\n      offset.left += r.left; \n      offset.top += r.top; \n      return offset;\n    }\n    return getOffset(parent.offsetParent)\n  }\n  return getOffset(elt.offsetParent)\n};\n\n/** Get element offset rect\n * @param {DOMElement} elt\n * @param {boolean} fixed get fixed position\n * @return {Object} \n */\nol_ext_element.positionRect = function(elt, fixed) {\n  var gleft = 0;\n  var gtop = 0;\n\n  var getRect = function( parent ) {\n    if (parent) {\n      gleft += parent.offsetLeft;\n      gtop += parent.offsetTop;\n      return getRect(parent.offsetParent);\n    } else {\n      var r = {\n        top: elt.offsetTop + gtop,\n        left: elt.offsetLeft + gleft\n      };\n      if (fixed) {\n        r.top -= (window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0);\n        r.left -= (window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft || 0);\n      }\n      r.bottom = r.top + elt.offsetHeight;\n      r.right = r.top + elt.offsetWidth;\n      return r;\n    }\n  }; \n  return getRect(elt.offsetParent);\n}\n\n/** Make a div scrollable without scrollbar.\n * On touch devices the default behavior is preserved\n * @param {DOMElement} elt\n * @param {*} options\n *  @param {function} [options.onmove] a function that takes a boolean indicating that the div is scrolling\n *  @param {boolean} [options.vertical=false] \n *  @param {boolean} [options.animate=true] add kinetic to scroll\n *  @param {boolean} [options.mousewheel=false] enable mousewheel to scroll\n *  @param {boolean} [options.minibar=false] add a mini scrollbar to the parent element (only vertical scrolling)\n * @returns {Object} an object with a refresh function\n */\nol_ext_element.scrollDiv = function(elt, options) {\n  options = options || {};\n  var pos = false;\n  var speed = 0;\n  var d, dt = 0;\n\n  var onmove = (typeof(options.onmove) === 'function' ? options.onmove : function(){});\n  //var page = options.vertical ? 'pageY' : 'pageX';\n  var page = options.vertical ? 'screenY' : 'screenX';\n  var scroll = options.vertical ? 'scrollTop' : 'scrollLeft';\n  var moving = false;\n  // Factor scale content / container\n  var scale, isbar;\n\n  // Update the minibar\n  var updateCounter = 0;\n  var updateMinibar = function() {\n    if (scrollbar) {\n      updateCounter++;\n      setTimeout(updateMinibarDelay);\n    }\n  }\n  var updateMinibarDelay = function() {\n    if (scrollbar) {\n      updateCounter--;\n      // Prevent multi call\n      if (updateCounter) return;\n      // Container height\n      var pheight = elt.clientHeight;\n      // Content height\n      var height = elt.scrollHeight;\n      // Set scrollbar value\n      scale = pheight / height;\n      scrollbar.style.height = scale * 100 + '%';\n      scrollbar.style.top = (elt.scrollTop / height * 100) + '%';\n      scrollContainer.style.height = pheight + 'px';\n      // No scroll\n      if (pheight > height - .5) scrollContainer.classList.add('ol-100pc');\n      else scrollContainer.classList.remove('ol-100pc');\n    }\n  }\n  \n  // Handle pointer down\n  var onPointerDown = function(e) {\n    // Prevent scroll\n    if (e.target.classList.contains('ol-noscroll')) return;\n    // Start scrolling\n    moving = false;\n    pos = e[page];\n    dt = new Date();\n    elt.classList.add('ol-move');\n    // Prevent elt dragging\n    e.preventDefault();\n    // Listen scroll\n    window.addEventListener('pointermove', onPointerMove);\n    ol_ext_element.addListener(window, ['pointerup','pointercancel'], onPointerUp);\n  }\n\n  // Register scroll\n  var onPointerMove = function(e) {\n    if (pos !== false) {\n      var delta = (isbar ? -1/scale : 1) * (pos - e[page]);\n      moving = moving || Math.round(delta)\n      elt[scroll] += delta;\n      d = new Date();\n      if (d-dt) {\n        speed = (speed + delta / (d - dt))/2;\n      }\n      pos = e[page];\n      dt = d;\n      // Tell we are moving\n      if (delta) onmove(true);\n    } else {\n      moving = true;\n    }\n  };\n  \n  // Animate scroll\n  var animate = function(to) {\n    var step = (to>0) ? Math.min(100, to/2) : Math.max(-100, to/2);\n    to -= step;\n    elt[scroll] += step;\n    if (-1 < to && to < 1) {\n      if (moving) setTimeout(function() { elt.classList.remove('ol-move'); });\n      else elt.classList.remove('ol-move');\n      moving = false;\n      onmove(false);\n    } else {\n      setTimeout(function() {\n        animate(to);\n      }, 40);\n    }\n  }\n  \n  // Initialize scroll container for minibar\n  var scrollContainer, scrollbar;\n  if (options.vertical && options.minibar) {\n    var init = function(b) {\n      // only once\n      elt.removeEventListener('pointermove', init);\n      elt.parentNode.classList.add('ol-miniscroll');\n      scrollbar = ol_ext_element.create('DIV');\n      scrollContainer = ol_ext_element.create('DIV', {\n        className: 'ol-scroll',\n        html: scrollbar\n      });\n      elt.parentNode.insertBefore(scrollContainer, elt);\n      // Move scrollbar\n      scrollbar.addEventListener('pointerdown', function(e) {\n        isbar = true;\n        onPointerDown(e)\n      });\n      // Handle mousewheel\n      if (options.mousewheel) {\n        ol_ext_element.addListener(scrollContainer, \n          ['mousewheel', 'DOMMouseScroll', 'onmousewheel'], \n          function(e) { onMouseWheel(e) }\n        );\n        ol_ext_element.addListener(scrollbar, \n          ['mousewheel', 'DOMMouseScroll', 'onmousewheel'], \n          function(e) { onMouseWheel(e) }\n        );\n      }\n      // Update on enter\n      elt.parentNode.addEventListener('pointerenter', updateMinibar);\n      // Update on resize\n      window.addEventListener('resize', updateMinibar);\n      // Update\n      if (b!==false) updateMinibar();\n    };\n    // Allready inserted in the DOM\n    if (elt.parentNode) init(false);\n    // or wait when ready\n    else elt.addEventListener('pointermove', init);\n    // Update on scroll\n    elt.addEventListener('scroll', function() {\n      updateMinibar();\n    });\n  }\n\n  // Enable scroll\n  elt.style['touch-action'] = 'none';\n  elt.style['overflow'] = 'hidden';\n  elt.classList.add('ol-scrolldiv');\n  \n  // Start scrolling\n  ol_ext_element.addListener(elt, ['pointerdown'], function(e) {\n    isbar = false;\n    onPointerDown(e)\n  });\n\n  // Prevet click when moving...\n  elt.addEventListener('click', function(e) {\n    if (elt.classList.contains('ol-move')) {\n      e.preventDefault();\n      e.stopPropagation();\n    }\n  }, true);\n\n  // Stop scrolling\n  var onPointerUp = function(e) {\n    dt = new Date() - dt;\n    if (dt>100 || isbar) {\n      // User stop: no speed\n      speed = 0;\n    } else if (dt>0) {\n      // Calculate new speed\n      speed = ((speed||0) + (pos - e[page]) / dt) / 2;\n    }\n    animate(options.animate===false ? 0 : speed*200);\n    pos = false;\n    speed = 0;\n    dt = 0;\n    // Add class to handle click (on iframe / double-click)\n    if (!elt.classList.contains('ol-move')) {\n      elt.classList.add('ol-hasClick')\n      setTimeout(function() { elt.classList.remove('ol-hasClick'); }, 500);\n    } else {\n      elt.classList.remove('ol-hasClick');\n    }\n    isbar = false;\n    window.removeEventListener('pointermove', onPointerMove)\n    ol_ext_element.removeListener(window, ['pointerup','pointercancel'], onPointerUp);\n  };\n\n  // Handle mousewheel\n  var onMouseWheel = function(e) {\n    var delta = Math.max(-1, Math.min(1, (e.wheelDelta || -e.detail)));\n    elt.classList.add('ol-move');\n    elt[scroll] -= delta*30;\n    elt.classList.remove('ol-move');\n    return false;\n  }\n  if (options.mousewheel) { // && !elt.classList.contains('ol-touch')) {\n    ol_ext_element.addListener(elt, \n      ['mousewheel', 'DOMMouseScroll', 'onmousewheel'], \n      onMouseWheel\n    );\n  }\n\n  return { \n    refresh: updateMinibar\n  }\n};\n\n/** Dispatch an event to an Element \n * @param {string} eventName\n * @param {Element} element\n */\nol_ext_element.dispatchEvent = function (eventName, element) {\n  var event;\n  try {\n    event = new CustomEvent(eventName);\n  } catch(e) {\n    // Try customevent on IE\n    event = document.createEvent(\"CustomEvent\");\n    event.initCustomEvent(eventName, true, true, {});\n  }\n  element.dispatchEvent(event);\n};\n\n/** Set cursor\n * @param {Element|ol/Map} elt\n * @param {string} cursor\n */\nol_ext_element.setCursor = function(elt, cursor) {\n  if (elt instanceof ol_Map) elt = elt.getTargetElement()\n  // prevent flashing on mobile device\n  if (!('ontouchstart' in window) && elt instanceof Element) {\n    elt.style.cursor = cursor;\n  }\n}\n\nexport default ol_ext_element\n", "import ol_style_Style from 'ol/style/Style.js'\nimport ol_style_Stroke from 'ol/style/Stroke.js'\nimport ol_source_Vector from 'ol/source/Vector.js'\nimport ol_style_Fill from 'ol/style/Fill.js'\nimport ol_layer_Vector from 'ol/layer/Vector.js'\nimport ol_geom_Point from 'ol/geom/Point.js'\nimport ol_Feature from 'ol/Feature.js'\nimport ol_Collection from 'ol/Collection.js'\nimport ol_interaction_Pointer from 'ol/interaction/Pointer.js'\nimport ol_style_RegularShape from 'ol/style/RegularShape.js'\nimport {fromExtent as ol_geom_Polygon_fromExtent} from 'ol/geom/Polygon.js'\nimport {boundingExtent as ol_extent_boundingExtent, buffer as ol_extent_buffer, createEmpty as ol_extent_createEmpty, extend as ol_extent_extend, getCenter as ol_extent_getCenter} from 'ol/extent.js'\nimport {unByKey as ol_Observable_unByKey} from 'ol/Observable.js'\nimport ol_geom_Polygon from 'ol/geom/Polygon.js'\nimport ol_ext_element from '../util/element.js'\n\n/** Interaction rotate\n * @constructor\n * @extends {ol_interaction_Pointer}\n * @fires select | rotatestart | rotating | rotateend | translatestart | translating | translateend | scalestart | scaling | scaleend\n * @param {any} options\n *  @param {function} options.filter A function that takes a Feature and a Layer and returns true if the feature may be transformed or false otherwise.\n *  @param {Array<ol.Layer>} options.layers array of layers to transform,\n *  @param {ol.Collection<ol.Feature>} options.features collection of feature to transform,\n *  @param {ol.interaction.Select} [options.select] a select interaction to synchronize with\n *\t@param {ol.EventsConditionType|undefined} options.condition A function that takes an ol.MapBrowserEvent and a feature collection and returns a boolean to indicate whether that event should be handled. default: ol.events.condition.always.\n *\t@param {ol.EventsConditionType|undefined} options.addCondition A function that takes an ol.MapBrowserEvent and returns a boolean to indicate whether that event should be handled ie. the feature will be added to the transforms features. default: ol.events.condition.never.\n *\t@param {number | undefined} options.hitTolerance Tolerance to select feature in pixel, default 0\n *\t@param {bool} options.translateFeature Translate when click on feature\n *\t@param {bool} options.translate Can translate the feature\n *  @param {bool} options.translateBBox Enable translate when the user drags inside the bounding box\n *\t@param {bool} options.stretch can stretch the feature\n *\t@param {bool} options.scale can scale the feature\n *\t@param {bool} options.rotate can rotate the feature\n *\t@param {bool} options.noFlip prevent the feature geometry to flip, default false\n *\t@param {bool} options.selection the intraction handle selection/deselection, if not use the select prototype to add features to transform, default true\n *\t@param {ol.events.ConditionType | undefined} options.keepAspectRatio A function that takes an ol.MapBrowserEvent and returns a boolean to keep aspect ratio, default ol.events.condition.shiftKeyOnly.\n *\t@param {ol.events.ConditionType | undefined} options.modifyCenter A function that takes an ol.MapBrowserEvent and returns a boolean to apply scale & strech from the center, default ol.events.condition.metaKey or ol.events.condition.ctrlKey.\n *\t@param {boolean} options.enableRotatedTransform Enable transform when map is rotated\n *\t@param {boolean} [options.keepRectangle=false] keep rectangle when possible\n *  @param {number} [options.buffer] Increase the extent used as bounding box, default 0\n *\t@param {*} options.style list of ol.style for handles\n *  @param {number|Array<number>|function} [options.pointRadius=0] radius for points or a function that takes a feature and returns the radius (or [radiusX, radiusY]). If not null show handles to transform the points\n */\nvar ol_interaction_Transform = class olinteractionTransform extends ol_interaction_Pointer {\n  constructor(options) {\n    options = options || {}\n    // Extend pointer\n    super({\n      handleDownEvent: function(e) { return self.handleDownEvent_(e) },\n      handleDragEvent: function(e) { return this.handleDragEvent_(e) },\n      handleMoveEvent: function(e) { return this.handleMoveEvent_(e) },\n      handleUpEvent: function(e) { return this.handleUpEvent_(e) },\n    })\n    \n    var self = this\n    this.selection_ = new ol_Collection()\n\n    // Create a new overlay layer for the sketch\n    this.handles_ = new ol_Collection()\n    this.overlayLayer_ = new ol_layer_Vector({\n      source: new ol_source_Vector({\n        features: this.handles_,\n        useSpatialIndex: false,\n        wrapX: false // For vector editing across the -180\u00B0 and 180\u00B0 meridians to work properly, this should be set to false\n      }),\n      name: 'Transform overlay',\n      displayInLayerSwitcher: false,\n      // Return the style according to the handle type\n      style: function (feature) {\n        return (self.style[(feature.get('handle') || 'default') + (feature.get('constraint') || '') + (feature.get('option') || '')])\n      },\n      updateWhileAnimating: true,\n      updateWhileInteracting: true,\n    })\n\n    // Collection of feature to transform\n    this.features_ = options.features\n    // Filter or list of layers to transform\n    if (typeof (options.filter) === 'function')\n      this._filter = options.filter\n    this.layers_ = options.layers ? (options.layers instanceof Array) ? options.layers : [options.layers] : null\n\n    this._handleEvent = options.condition || function () { return true }\n    this.addFn_ = options.addCondition || function () { return false }\n    this.setPointRadius(options.pointRadius)\n    /* Translate when click on feature */\n    this.set('translateFeature', (options.translateFeature !== false))\n    /* Can translate the feature */\n    this.set('translate', (options.translate !== false))\n    /* Translate when click on the bounding box */\n    this.set('translateBBox', (options.translateBBox === true))\n    /* Can stretch the feature */\n    this.set('stretch', (options.stretch !== false))\n    /* Can scale the feature */\n    this.set('scale', (options.scale !== false))\n    /* Can rotate the feature */\n    this.set('rotate', (options.rotate !== false))\n    /* Keep aspect ratio */\n    this.set('keepAspectRatio', (options.keepAspectRatio || function (e) { return e.originalEvent.shiftKey }))\n    /* Modify center */\n    this.set('modifyCenter', (options.modifyCenter || function (e) { return e.originalEvent.metaKey || e.originalEvent.ctrlKey }))\n    /* Prevent flip */\n    this.set('noFlip', (options.noFlip || false))\n    /* Handle selection */\n    this.set('selection', (options.selection !== false))\n    /*  */\n    this.set('hitTolerance', (options.hitTolerance || 0))\n    /* Enable view rotated transforms */\n    this.set('enableRotatedTransform', (options.enableRotatedTransform || false))\n    /* Keep rectangle angles 90 degrees */\n    this.set('keepRectangle', (options.keepRectangle || false))\n    /* Add buffer to the feature's extent */\n    this.set('buffer', (options.buffer || 0))\n\n    // Force redraw when changed\n    this.on('propertychange', function () {\n      this.drawSketch_()\n    })\n\n    // setstyle\n    this.setDefaultStyle()\n\n    // Synchronize selection\n    if (options.select) {\n      // this.selection_ = options.select.getFeatures();\n      this.on('change:active', function(e) {\n        if (this.getActive()) {\n          this.setSelection(options.select.getFeatures().getArray())\n        } else {\n          options.select.getFeatures().extend(this.selection_)\n          this.selection_.forEach(function(f) {\n            options.select.getFeatures().push(f)\n          })\n          this.select(null)\n        }\n      }.bind(this))\n    } else {\n      this.on('change:active', function(e) {\n        this.select(null)\n      }.bind(this))\n    }\n\n  }\n  /**\n   * Remove the interaction from its current map, if any,  and attach it to a new\n   * map, if any. Pass `null` to just remove the interaction from the current map.\n   * @param {ol.Map} map Map.\n   * @api stable\n   */\n  setMap(map) {\n    var oldMap = this.getMap()\n    if (oldMap) {\n      oldMap.removeLayer(this.overlayLayer_)\n      if (this.previousCursor_) {\n        ol_ext_element.setCursor(oldMap, this.previousCursor_)\n      }\n      this.previousCursor_ = undefined\n    }\n    super.setMap(map)\n    this.overlayLayer_.setMap(map)\n    if (map === null) {\n      this.select(null)\n    }\n    if (map !== null) {\n      this.isTouch = /touch/.test(map.getViewport().className)\n      this.setDefaultStyle()\n    }\n  }\n  /**\n   * Activate/deactivate interaction\n   * @param {bool}\n   * @api stable\n   */\n  setActive(b) {\n    // this.select(null)\n    if (this.overlayLayer_) this.overlayLayer_.setVisible(b)\n    super.setActive(b)\n  }\n  /** Set default sketch style\n   * @param {Object} [options]\n   *  @param {ol_style_Stroke} [stroke] stroke style for selection rectangle, default red dash\n   *  @param {ol_style_Fill} [fill] fill style for selection rectangle, default red\n   *  @param {ol_style_Stroke} [pointStroke] stroke style for handles, default red\n   *  @param {ol_style_Fill} [pointFill] fill style for handles, default white\n   */\n  setDefaultStyle(options) {\n    options = options || {}\n    // Style\n    var stroke = options.pointStroke || new ol_style_Stroke({ color: [255, 0, 0, 1], width: 1 })\n    var strokedash = options.stroke || new ol_style_Stroke({ color: [255, 0, 0, 1], width: 1, lineDash: [4, 4] })\n    var fill0 = options.fill || new ol_style_Fill({ color: [255, 0, 0, 0.01] })\n    var fill = options.pointFill || new ol_style_Fill({ color: [255, 255, 255, 0.8] })\n    var circle = new ol_style_RegularShape({\n      fill: fill,\n      stroke: stroke,\n      radius: this.isTouch ? 12 : 6,\n      displacement: this.isTouch ? [24, -24] : [12, -12],\n      points: 15\n    })\n    // Old version with no displacement\n    if (!circle.setDisplacement)\n      circle.getAnchor()[0] = this.isTouch ? -10 : -5\n    var bigpt = new ol_style_RegularShape({\n      fill: fill,\n      stroke: stroke,\n      radius: this.isTouch ? 16 : 8,\n      points: 4,\n      angle: Math.PI / 4\n    })\n    var smallpt = new ol_style_RegularShape({\n      fill: fill,\n      stroke: stroke,\n      radius: this.isTouch ? 12 : 6,\n      points: 4,\n      angle: Math.PI / 4\n    })\n    function createStyle(img, stroke, fill) {\n      return [new ol_style_Style({ image: img, stroke: stroke, fill: fill })]\n    }\n    /** Style for handles */\n    this.style = {\n      'default': createStyle(bigpt, strokedash, fill0),\n      'translate': createStyle(bigpt, stroke, fill),\n      'rotate': createStyle(circle, stroke, fill),\n      'rotate0': createStyle(bigpt, stroke, fill),\n      'scale': createStyle(bigpt, stroke, fill),\n      'scale1': createStyle(bigpt, stroke, fill),\n      'scale2': createStyle(bigpt, stroke, fill),\n      'scale3': createStyle(bigpt, stroke, fill),\n      'scalev': createStyle(smallpt, stroke, fill),\n      'scaleh1': createStyle(smallpt, stroke, fill),\n      'scalev2': createStyle(smallpt, stroke, fill),\n      'scaleh3': createStyle(smallpt, stroke, fill),\n    }\n    this.drawSketch_()\n  }\n  /**\n   * Set sketch style.\n   * @param {style} style Style name: 'default','translate','rotate','rotate0','scale','scale1','scale2','scale3','scalev','scaleh1','scalev2','scaleh3'\n   * @param {ol.style.Style|Array<ol.style.Style>} olstyle\n   * @api stable\n   */\n  setStyle(style, olstyle) {\n    if (!olstyle)\n      return\n    if (olstyle instanceof Array)\n      this.style[style] = olstyle\n    else\n      this.style[style] = [olstyle]\n    for (var i = 0; i < this.style[style].length; i++) {\n      var im = this.style[style][i].getImage()\n      if (im) {\n        if (style == 'rotate') {\n          im.getAnchor()[0] = -5\n        }\n        if (this.isTouch)\n          im.setScale(1.8)\n      }\n      var tx = this.style[style][i].getText()\n      if (tx) {\n        if (style == 'rotate')\n          tx.setOffsetX(this.isTouch ? 14 : 7)\n        if (this.isTouch)\n          tx.setScale(1.8)\n      }\n    }\n    this.drawSketch_()\n  }\n  /** Get Feature at pixel\n   * @param {ol.Pixel}\n   * @return {ol.feature}\n   * @private\n   */\n  getFeatureAtPixel_(pixel) {\n    var self = this\n    return this.getMap().forEachFeatureAtPixel(pixel,\n      function (feature, layer) {\n        var found = false\n        // Overlay ?\n        if (!layer) {\n          if (feature === self.bbox_) {\n            if (self.get('translateBBox')) {\n              return { feature: feature, handle: 'translate', constraint: '', option: '' }\n            } else {\n              return false\n            }\n          }\n          self.handles_.forEach(function (f) {\n            if (f === feature)\n              found = true\n          })\n          if (found)\n            return { feature: feature, handle: feature.get('handle'), constraint: feature.get('constraint'), option: feature.get('option') }\n        }\n        // No seletion\n        if (!self.get('selection')) {\n          // Return the currently selected feature the user is interacting with.\n          if (self.selection_.getArray().some(function (f) { return feature === f })) {\n            return { feature: feature }\n          }\n          return null\n        }\n        // filter condition\n        if (self._filter) {\n          if (self._filter(feature, layer))\n            return { feature: feature }\n          else\n            return null\n        }\n\n        // feature belong to a layer\n        else if (self.layers_) {\n          for (var i = 0; i < self.layers_.length; i++) {\n            if (self.layers_[i] === layer)\n              return { feature: feature }\n          }\n          return null\n        }\n\n        // feature in the collection\n        else if (self.features_) {\n          self.features_.forEach(function (f) {\n            if (f === feature)\n              found = true\n          })\n          if (found)\n            return { feature: feature }\n          else\n            return null\n        }\n\n        // Others\n        else\n          return { feature: feature }\n      },\n      { hitTolerance: this.get('hitTolerance') }\n    ) || {}\n  }\n  /** Rotate feature from map view rotation\n   * @param {ol.Feature} f the feature\n   * @param {boolean} clone clone resulting geom\n   * @returns {ol.geom.Geometry | undefined} rotated geometry if no/bad geom\n   */\n  getGeometryRotateToZero_(f, clone) {\n    var origGeom = f.getGeometry()\n    var viewRotation = this.getMap().getView().getRotation()\n    if (viewRotation === 0 || !this.get('enableRotatedTransform')) {\n      return (clone) ? origGeom.clone() : origGeom\n    }\n    var rotGeom = origGeom.clone()\n    rotGeom.rotate(viewRotation * -1, this.getMap().getView().getCenter())\n    return rotGeom\n  }\n  /** Test if rectangle\n   * @param {ol.Geometry} geom\n   * @returns {boolean}\n   * @private\n   */\n  _isRectangle(geom) {\n    if (this.get('keepRectangle') && geom.getType() === 'Polygon') {\n      var coords = geom.getCoordinates()[0]\n      return coords.length === 5\n    }\n    return false\n  }\n  /** Draw transform sketch\n  * @param {boolean} draw only the center\n  */\n  drawSketch_(center) {\n    var i, f, geom\n    var keepRectangle = this.selection_.item(0) && this._isRectangle(this.selection_.item(0).getGeometry())\n    this.overlayLayer_.getSource().clear()\n    // No selection or bad geometry\n    if (!this.selection_.getLength() || !this.selection_.item(0).getGeometry()) {\n      return\n    }\n    var viewRotation = this.getMap().getView().getRotation()\n    var ext = this.getGeometryRotateToZero_(this.selection_.item(0)).getExtent()\n    var coords\n    if (keepRectangle) {\n      coords = this.getGeometryRotateToZero_(this.selection_.item(0)).getCoordinates()[0].slice(0, 4)\n      coords.unshift(coords[3])\n    }\n    // Clone and extend\n    ext = ol_extent_buffer(ext, this.get('buffer'))\n    this.selection_.forEach(function (f) {\n      var extendExt = this.getGeometryRotateToZero_(f).getExtent()\n      ol_extent_extend(ext, extendExt)\n    }.bind(this))\n\n    var ptRadius = (this.selection_.getLength() === 1 ? this._pointRadius(this.selection_.item(0)) : 0)\n    if (ptRadius && !(ptRadius instanceof Array))\n      ptRadius = [ptRadius, ptRadius]\n\n    if (center === true) {\n      if (!this.ispt_) {\n        this.overlayLayer_.getSource().addFeature(new ol_Feature({ geometry: new ol_geom_Point(this.center_), handle: 'rotate0' }))\n        geom = ol_geom_Polygon_fromExtent(ext)\n        if (this.get('enableRotatedTransform') && viewRotation !== 0) {\n          geom.rotate(viewRotation, this.getMap().getView().getCenter())\n        }\n        f = this.bbox_ = new ol_Feature(geom)\n        this.overlayLayer_.getSource().addFeature(f)\n      }\n    } else {\n      if (this.ispt_) {\n        // Calculate extent arround the point\n        var p = this.getMap().getPixelFromCoordinate(ol_extent_getCenter(ext))\n        if (p) {\n          var dx = ptRadius ? ptRadius[0] || 10 : 10\n          var dy = ptRadius ? ptRadius[1] || 10 : 10\n          ext = ol_extent_boundingExtent([\n            this.getMap().getCoordinateFromPixel([p[0] - dx, p[1] - dy]),\n            this.getMap().getCoordinateFromPixel([p[0] + dx, p[1] + dy])\n          ])\n        }\n      }\n      geom = keepRectangle ? new ol_geom_Polygon([coords]) : ol_geom_Polygon_fromExtent(ext)\n      if (this.get('enableRotatedTransform') && viewRotation !== 0) {\n        geom.rotate(viewRotation, this.getMap().getView().getCenter())\n      }\n      f = this.bbox_ = new ol_Feature(geom)\n      var features = []\n      var g = geom.getCoordinates()[0]\n      if (!this.ispt_ || ptRadius) {\n        features.push(f)\n        // Middle\n        if (!this.iscircle_ && !this.ispt_ && this.get('stretch') && this.get('scale'))\n          for (i = 0; i < g.length - 1; i++) {\n            f = new ol_Feature({ geometry: new ol_geom_Point([(g[i][0] + g[i + 1][0]) / 2, (g[i][1] + g[i + 1][1]) / 2]), handle: 'scale', constraint: i % 2 ? \"h\" : \"v\", option: i })\n            features.push(f)\n          }\n        // Handles\n        if (this.get('scale'))\n          for (i = 0; i < g.length - 1; i++) {\n            f = new ol_Feature({ geometry: new ol_geom_Point(g[i]), handle: 'scale', option: i })\n            features.push(f)\n          }\n        // Center\n        if (this.get('translate') && !this.get('translateFeature')) {\n          f = new ol_Feature({ geometry: new ol_geom_Point([(g[0][0] + g[2][0]) / 2, (g[0][1] + g[2][1]) / 2]), handle: 'translate' })\n          features.push(f)\n        }\n      }\n      // Rotate\n      if (!this.iscircle_ && this.get('rotate')) {\n        f = new ol_Feature({ geometry: new ol_geom_Point(g[3]), handle: 'rotate' })\n        features.push(f)\n      }\n      // Add sketch\n      this.overlayLayer_.getSource().addFeatures(features)\n    }\n\n  }\n  /** Select a feature to transform\n  * @param {ol.Feature} feature the feature to transform\n  * @param {boolean} add true to add the feature to the selection, default false\n  */\n  select(feature, add) {\n    if (!feature) {\n      if (this.selection_) {\n        this.selection_.clear()\n        this.drawSketch_()\n      }\n      return\n    }\n    if (!feature.getGeometry || !feature.getGeometry()) return\n    // Add to selection\n    if (add) {\n      this.selection_.push(feature)\n    } else {\n      var index = this.selection_.getArray().indexOf(feature)\n      this.selection_.removeAt(index)\n    }\n    this.ispt_ = (this.selection_.getLength() === 1 ? (this.selection_.item(0).getGeometry().getType() == \"Point\") : false)\n    this.iscircle_ = (this.selection_.getLength() === 1 ? (this.selection_.item(0).getGeometry().getType() == \"Circle\") : false)\n    this.drawSketch_()\n    this.watchFeatures_()\n    // select event\n    this.dispatchEvent({ type: 'select', feature: feature, features: this.selection_ })\n  }\n  /** Update the selection collection.\n  * @param {ol.Collection<ol.Feature>} features the features to transform\n  */\n  setSelection(features) {\n    this.selection_.clear()\n    features.forEach(function (feature) {\n      this.selection_.push(feature)\n    }.bind(this))\n\n    this.ispt_ = (this.selection_.getLength() === 1 ? (this.selection_.item(0).getGeometry().getType() == \"Point\") : false)\n    this.iscircle_ = (this.selection_.getLength() === 1 ? (this.selection_.item(0).getGeometry().getType() == \"Circle\") : false)\n    this.drawSketch_()\n    this.watchFeatures_()\n    // select event\n    this.dispatchEvent({ type: 'select', features: this.selection_ })\n  }\n  /** Watch selected features\n   * @private\n   */\n  watchFeatures_() {\n    // Listen to feature modification\n    if (this._featureListeners) {\n      this._featureListeners.forEach(function (l) {\n        ol_Observable_unByKey(l)\n      })\n    }\n    this._featureListeners = []\n    this.selection_.forEach(function (f) {\n      this._featureListeners.push(\n        f.on('change', function () {\n          if (!this.isUpdating_) {\n            this.drawSketch_()\n          }\n        }.bind(this))\n      )\n    }.bind(this))\n  }\n  /**\n   * @param {ol.MapBrowserEvent} evt Map browser event.\n   * @return {boolean} `true` to start the drag sequence.\n   * @private\n   */\n  handleDownEvent_(evt) {\n    if (!this._handleEvent(evt, this.selection_))\n      return\n    var sel = this.getFeatureAtPixel_(evt.pixel)\n    var feature = sel.feature\n    if (this.selection_.getLength()\n      && this.selection_.getArray().indexOf(feature) >= 0\n      && ((this.ispt_ && this.get('translate')) || this.get('translateFeature'))) {\n      sel.handle = 'translate'\n    }\n    if (sel.handle) {\n      this.mode_ = sel.handle\n      this.opt_ = sel.option\n      this.constraint_ = sel.constraint\n      // Save info\n      var viewRotation = this.getMap().getView().getRotation()\n      // Get coordinate of the handle (for snapping)\n      this.coordinate_ = feature.get('handle') ? feature.getGeometry().getCoordinates() : evt.coordinate;\n      this.pixel_ = this.getMap().getCoordinateFromPixel(this.coordinate_) // evt.pixel;\n      this.geoms_ = []\n      this.rotatedGeoms_ = []\n      var extent = ol_extent_createEmpty()\n      var rotExtent = ol_extent_createEmpty()\n      this.hasChanged_ = false;\n      for (var i = 0, f; f = this.selection_.item(i); i++) {\n        this.geoms_.push(f.getGeometry().clone())\n        extent = ol_extent_extend(extent, f.getGeometry().getExtent())\n        if (this.get('enableRotatedTransform') && viewRotation !== 0) {\n          var rotGeom = this.getGeometryRotateToZero_(f, true)\n          this.rotatedGeoms_.push(rotGeom)\n          rotExtent = ol_extent_extend(rotExtent, rotGeom.getExtent())\n        }\n      }\n      this.extent_ = (ol_geom_Polygon_fromExtent(extent)).getCoordinates()[0]\n      if (this.get('enableRotatedTransform') && viewRotation !== 0) {\n        this.rotatedExtent_ = (ol_geom_Polygon_fromExtent(rotExtent)).getCoordinates()[0]\n      }\n      if (this.mode_ === 'rotate') {\n        this.center_ = this.getCenter() || ol_extent_getCenter(extent)\n        // we are now rotating (cursor down on rotate mode), so apply the grabbing cursor\n        var element = evt.map.getTargetElement()\n        ol_ext_element.setCursor(element, this.Cursors.rotate0)\n        this.previousCursor_ = element.style.cursor\n      } else {\n        this.center_ = ol_extent_getCenter(extent)\n      }\n      this.angle_ = Math.atan2(this.center_[1] - evt.coordinate[1], this.center_[0] - evt.coordinate[0])\n\n      this.dispatchEvent({\n        type: this.mode_ + 'start',\n        feature: this.selection_.item(0),\n        features: this.selection_,\n        pixel: evt.pixel,\n        coordinate: evt.coordinate\n      })\n      return true\n    }\n    else if (this.get('selection')) {\n      if (feature) {\n        if (!this.addFn_(evt))\n          this.selection_.clear()\n        var index = this.selection_.getArray().indexOf(feature)\n        if (index < 0)\n          this.selection_.push(feature)\n        else\n          this.selection_.removeAt(index)\n      } else {\n        this.selection_.clear()\n      }\n      this.ispt_ = this.selection_.getLength() === 1 ? (this.selection_.item(0).getGeometry().getType() == \"Point\") : false\n      this.iscircle_ = (this.selection_.getLength() === 1 ? (this.selection_.item(0).getGeometry().getType() == \"Circle\") : false)\n      this.drawSketch_()\n      this.watchFeatures_()\n      this.dispatchEvent({ type: 'select', feature: feature, features: this.selection_, pixel: evt.pixel, coordinate: evt.coordinate })\n      return false\n    }\n  }\n  /**\n   * Get the rotation center\n   * @return {ol.coordinate|undefined}\n   */\n  getCenter() {\n    return this.get('center')\n  }\n  /**\n   * Set the rotation center\n   * @param {ol.coordinate|undefined} c the center point, default center on the objet\n   */\n  setCenter(c) {\n    return this.set('center', c)\n  }\n  /**\n   * @param {ol.MapBrowserEvent} evt Map browser event.\n   * @private\n   */\n  handleDragEvent_(evt) {\n    if (!this._handleEvent(evt, this.features_))\n      return\n    var viewRotation = this.getMap().getView().getRotation()\n    var i, j, f, geometry\n    var pt0 = [this.coordinate_[0], this.coordinate_[1]]\n    var pt = [evt.coordinate[0], evt.coordinate[1]]\n    this.isUpdating_ = true\n    this.hasChanged_ = true\n    switch (this.mode_) {\n      case 'rotate': {\n        var a = Math.atan2(this.center_[1] - pt[1], this.center_[0] - pt[0])\n        if (!this.ispt) {\n          // var geometry = this.geom_.clone();\n          // geometry.rotate(a-this.angle_, this.center_);\n          // this.feature_.setGeometry(geometry);\n          for (i = 0, f; f = this.selection_.item(i); i++) {\n            geometry = this.geoms_[i].clone()\n            geometry.rotate(a - this.angle_, this.center_)\n            // bug: ol, bad calculation circle geom extent\n            if (geometry.getType() == 'Circle')\n              geometry.setCenterAndRadius(geometry.getCenter(), geometry.getRadius())\n            f.setGeometry(geometry)\n          }\n        }\n        this.drawSketch_(true)\n        this.dispatchEvent({\n          type: 'rotating',\n          feature: this.selection_.item(0),\n          features: this.selection_,\n          angle: a - this.angle_,\n          pixel: evt.pixel,\n          coordinate: evt.coordinate\n        })\n        break\n      }\n      case 'translate': {\n        var deltaX = pt[0] - pt0[0]\n        var deltaY = pt[1] - pt0[1]\n\n        //this.feature_.getGeometry().translate(deltaX, deltaY);\n        for (i = 0, f; f = this.selection_.item(i); i++) {\n          f.getGeometry().translate(deltaX, deltaY)\n        }\n        this.handles_.forEach(function (f) {\n          f.getGeometry().translate(deltaX, deltaY)\n        })\n\n        this.coordinate_ = evt.coordinate\n        this.dispatchEvent({\n          type: 'translating',\n          feature: this.selection_.item(0),\n          features: this.selection_,\n          delta: [deltaX, deltaY],\n          pixel: evt.pixel,\n          coordinate: evt.coordinate\n        })\n        break\n      }\n      case 'scale': {\n        var center = this.center_\n        if (this.get('modifyCenter')(evt)) {\n          var extentCoordinates = this.extent_\n          if (this.get('enableRotatedTransform') && viewRotation !== 0) {\n            extentCoordinates = this.rotatedExtent_\n          }\n          center = extentCoordinates[(Number(this.opt_) + 2) % 4]\n        }\n        var keepRectangle = (this.geoms_.length == 1 && this._isRectangle(this.geoms_[0]))\n        var stretch = this.constraint_\n        var opt = this.opt_\n\n        var downCoordinate = this.coordinate_\n        var dragCoordinate = evt.coordinate\n        if (this.get('enableRotatedTransform') && viewRotation !== 0) {\n          var downPoint = new ol_geom_Point(this.coordinate_)\n          downPoint.rotate(viewRotation * -1, center)\n          downCoordinate = downPoint.getCoordinates()\n\n          var dragPoint = new ol_geom_Point(evt.coordinate)\n          dragPoint.rotate(viewRotation * -1, center)\n          dragCoordinate = dragPoint.getCoordinates()\n        }\n\n        var scx = ((dragCoordinate)[0] - (center)[0]) / (downCoordinate[0] - (center)[0])\n        var scy = ((dragCoordinate)[1] - (center)[1]) / (downCoordinate[1] - (center)[1])\n        var displacementVector = [dragCoordinate[0] - downCoordinate[0], (dragCoordinate)[1] - downCoordinate[1]]\n\n        if (this.get('enableRotatedTransform') && viewRotation !== 0) {\n          var centerPoint = new ol_geom_Point(center)\n          centerPoint.rotate(viewRotation * -1, this.getMap().getView().getCenter())\n          center = centerPoint.getCoordinates()\n        }\n\n        if (this.get('noFlip')) {\n          if (scx < 0)\n            scx = -scx\n          if (scy < 0)\n            scy = -scy\n        }\n\n        if (this.constraint_) {\n          if (this.constraint_ == \"h\")\n            scx = 1\n          else\n            scy = 1\n        } else {\n          if (this.get('keepAspectRatio')(evt)) {\n            scx = scy = Math.min(scx, scy)\n          }\n        }\n\n        var keepAspectRatio = this.get('keepAspectRatio')(evt)\n\n        for (i = 0, f; f = this.selection_.item(i); i++) {\n          geometry = (viewRotation === 0 || !this.get('enableRotatedTransform')) ? this.geoms_[i].clone() : this.rotatedGeoms_[i].clone()\n          geometry.applyTransform(function (g1, g2, dim) {\n            if (dim < 2) return g2\n\n            if (!keepRectangle) {\n              for (j = 0; j < g1.length; j += dim) {\n                if (scx != 1)\n                  g2[j] = center[0] + (g1[j] - center[0]) * scx\n                if (scy != 1)\n                  g2[j + 1] = center[1] + (g1[j + 1] - center[1]) * scy\n              }\n            } else {\n              var pointArray = [[6], [0, 8], [2], [4]]\n              var pointA = [g1[0], g1[1]]\n              var pointB = [g1[2], g1[3]]\n              var pointC = [g1[4], g1[5]]\n              var pointD = [g1[6], g1[7]]\n              var pointA1 = [g1[8], g1[9]]\n\n              if (stretch) {\n                var base = (opt % 2 === 0) ? this._countVector(pointA, pointB) : this._countVector(pointD, pointA)\n                var projectedVector = this._projectVectorOnVector(displacementVector, base)\n                var nextIndex = opt + 1 < pointArray.length ? opt + 1 : 0\n                var coordsToChange = [...pointArray[opt], ...pointArray[nextIndex]]\n\n                for (j = 0; j < g1.length; j += dim) {\n                  g2[j] = coordsToChange.includes(j) ? g1[j] + projectedVector[0] : g1[j]\n                  g2[j + 1] = coordsToChange.includes(j) ? g1[j + 1] + projectedVector[1] : g1[j + 1]\n                }\n              } else {\n                var projectedLeft, projectedRight, snapped\n\n                switch (opt) {\n                  case 0: // Dragging D\n                    if (keepAspectRatio) {\n                      snapped = this._snapToDiagonal(pointD, pointB, dragCoordinate);\n                      displacementVector = this._countVector(pointD, snapped);\n                    } else {\n                      displacementVector = this._countVector(pointD, dragCoordinate);\n                    }\n\n                    projectedLeft = this._projectVectorOnVector(displacementVector, this._countVector(pointC, pointD))\n                    projectedRight = this._projectVectorOnVector(displacementVector, this._countVector(pointA, pointD));\n                    [g2[0], g2[1]] = this._movePoint(pointA, projectedLeft);\n                    [g2[4], g2[5]] = this._movePoint(pointC, projectedRight);\n                    [g2[6], g2[7]] = this._movePoint(pointD, displacementVector);\n                    [g2[8], g2[9]] = this._movePoint(pointA1, projectedLeft)\n                    break\n                  case 1: // Dragging A\n                    if (keepAspectRatio) {\n                      snapped = this._snapToDiagonal(pointA, pointC, dragCoordinate);\n                      displacementVector = this._countVector(pointA, snapped);\n                    } else {\n                      displacementVector = this._countVector(pointA, dragCoordinate);\n                    }\n\n                    projectedLeft = this._projectVectorOnVector(displacementVector, this._countVector(pointD, pointA))\n                    projectedRight = this._projectVectorOnVector(displacementVector, this._countVector(pointB, pointA));\n                    [g2[0], g2[1]] = this._movePoint(pointA, displacementVector);\n                    [g2[2], g2[3]] = this._movePoint(pointB, projectedLeft);\n                    [g2[6], g2[7]] = this._movePoint(pointD, projectedRight);\n                    [g2[8], g2[9]] = this._movePoint(pointA1, displacementVector)\n                    break\n                  case 2: // Dragging B\n                    if (keepAspectRatio) {\n                      snapped = this._snapToDiagonal(pointB, pointD, dragCoordinate);\n                      displacementVector = this._countVector(pointB, snapped);\n                    } else {\n                      displacementVector = this._countVector(pointB, dragCoordinate);\n                    }\n\n                    projectedLeft = this._projectVectorOnVector(displacementVector, this._countVector(pointA, pointB))\n                    projectedRight = this._projectVectorOnVector(displacementVector, this._countVector(pointC, pointB));\n                    [g2[0], g2[1]] = this._movePoint(pointA, projectedRight);\n                    [g2[2], g2[3]] = this._movePoint(pointB, displacementVector);\n                    [g2[4], g2[5]] = this._movePoint(pointC, projectedLeft);\n                    [g2[8], g2[9]] = this._movePoint(pointA1, projectedRight)\n                    break\n                  case 3: // Dragging C\n                    if (keepAspectRatio) {\n                      snapped = this._snapToDiagonal(pointC, pointA, dragCoordinate);\n                      displacementVector = this._countVector(pointC, snapped);\n                    } else {\n                       displacementVector = this._countVector(pointC, dragCoordinate);\n                    }\n\n                    projectedLeft = this._projectVectorOnVector(displacementVector, this._countVector(pointB, pointC))\n                    projectedRight = this._projectVectorOnVector(displacementVector, this._countVector(pointD, pointC));\n                    [g2[2], g2[3]] = this._movePoint(pointB, projectedRight);\n                    [g2[4], g2[5]] = this._movePoint(pointC, displacementVector);\n                    [g2[6], g2[7]] = this._movePoint(pointD, projectedLeft)\n                    break\n                }\n              }\n            }\n\n            // bug: ol, bad calculation circle geom extent\n            if (geometry.getType() == 'Circle') geometry.setCenterAndRadius(geometry.getCenter(), geometry.getRadius())\n            return g2\n          }.bind(this))\n          if (this.get('enableRotatedTransform') && viewRotation !== 0) {\n            //geometry.rotate(viewRotation, rotationCenter);\n            geometry.rotate(viewRotation, this.getMap().getView().getCenter())\n          }\n          f.setGeometry(geometry)\n        }\n        this.drawSketch_()\n        this.dispatchEvent({\n          type: 'scaling',\n          feature: this.selection_.item(0),\n          features: this.selection_,\n          scale: [scx, scy],\n          pixel: evt.pixel,\n          coordinate: evt.coordinate\n        })\n        break\n      }\n      default: break\n    }\n    this.isUpdating_ = false\n  }\n  /**\n   * @param {ol.MapBrowserEvent} evt Event.\n   * @private\n   */\n  handleMoveEvent_(evt) {\n    if (!this._handleEvent(evt, this.features_))\n      return\n    // console.log(\"handleMoveEvent\");\n    if (!this.mode_) {\n      var sel = this.getFeatureAtPixel_(evt.pixel)\n      var element = evt.map.getTargetElement()\n      if (sel.feature) {\n        var c = sel.handle ? this.Cursors[(sel.handle || 'default') + (sel.constraint || '') + (sel.option || '')] : this.Cursors.select\n\n        if (this.previousCursor_ === undefined) {\n          this.previousCursor_ = element.style.cursor\n        }\n        ol_ext_element.setCursor(element, c);\n      } else {\n        if (this.previousCursor_ !== undefined) {\n          ol_ext_element.setCursor(element, this.previousCursor_)\n        }\n        this.previousCursor_ = undefined\n      }\n    }\n  }\n  /**\n   * @param {ol.MapBrowserEvent} evt Map browser event.\n   * @return {boolean} `false` to stop the drag sequence.\n   */\n  handleUpEvent_(evt) {\n    // remove rotate0 cursor on Up event, otherwise it's stuck on grab/grabbing\n    if (this.mode_ === 'rotate') {\n      var element = evt.map.getTargetElement()\n      ol_ext_element.setCursor(element, this.Cursors.default)\n      this.previousCursor_ = undefined\n    }\n\n    //dispatchEvent\n    this.dispatchEvent({\n      type: this.mode_ + 'end',\n      feature: this.selection_.item(0),\n      features: this.selection_,\n      oldgeom: this.geoms_[0],\n      oldgeoms: this.geoms_,\n      // handle changes\n      transformed: this.hasChanged_,\n    })\n    \n    this.drawSketch_()\n    this.hasChanged_ = false;\n    this.mode_ = null\n    return false\n  }\n  /** Set the point radius to calculate handles on points\n   *  @param {number|Array<number>|function} [pointRadius=0] radius for points or a function that takes a feature and returns the radius (or [radiusX, radiusY]). If not null show handles to transform the points\n   */\n  setPointRadius(pointRadius) {\n    if (typeof (pointRadius) === 'function') {\n      this._pointRadius = pointRadius\n    } else {\n      this._pointRadius = function () { return pointRadius }\n    }\n  }\n  /** Get the features that are selected for transform\n   * @return ol.Collection\n   */\n  getFeatures() {\n    return this.selection_;\n  }\n  /**\n   * @private\n   */\n  _projectVectorOnVector(displacement_vector, base) {\n    var k = (displacement_vector[0] * base[0] + displacement_vector[1] * base[1]) / (base[0] * base[0] + base[1] * base[1]);\n    return [base[0] * k, base[1] * k];\n  }\n  /**\n   * @private\n   */\n  _countVector(start, end) {\n    return [end[0] - start[0], end[1] - start[1]];\n  }\n  /**\n   * @private\n   */\n  _movePoint(point, displacementVector) {\n    return [point[0]+displacementVector[0], point[1]+displacementVector[1]];\n  }\n\n  /**\n   * @private\n   */\n  _snapToDiagonal(handle, anchor, mouse) {\n    var rail = [handle[0] - anchor[0], handle[1] - anchor[1]];\n    var pull = [mouse[0] - anchor[0], mouse[1] - anchor[1]];\n    var dot = pull[0] * rail[0] + pull[1] * rail[1];\n    var magSq = rail[0] * rail[0] + rail[1] * rail[1];\n    var s = dot / magSq;\n    return [anchor[0] + rail[0] * s, anchor[1] + rail[1] * s];\n  }\n\n\n}\n\n/** Cursors for transform\n*/\nol_interaction_Transform.prototype.Cursors = {\n  'default': 'auto',\n  'select': 'pointer',\n  'translate': 'move',\n  'rotate': 'move',\n  'rotate0': 'move',\n  'scale': 'nesw-resize',\n  'scale1': 'nwse-resize',\n  'scale2': 'nesw-resize',\n  'scale3': 'nwse-resize',\n  'scalev': 'ew-resize',\n  'scaleh1': 'ns-resize',\n  'scalev2': 'ew-resize',\n  'scaleh3': 'ns-resize'\n};\n\nexport default ol_interaction_Transform\n", "import Transform from \"ol-ext/interaction/Transform\";\nimport { alertDialog } from \"../../../../controllers/components/ir_dialog/helper\";\n\nexport default class BuildingImagePlacementsTransformInteractionManager {\n  constructor(controller, feature) {\n    this.controller = controller;\n    this.mapModelSynchronizer = controller.mapModelSynchronizer;\n    this.mapManager = controller.mapManager;\n    this.project = controller.project;\n\n    this.feature = feature;\n    this.placementUuid = feature.get(\"uuid\");\n\n    this.feature.set(\"selected\", false);\n    this.added = false;\n  }\n\n  add() {\n    if (this.added) return;\n    if (this.controller.buildingImagesLocked) return;\n\n    this.transform = new Transform({\n      features: [this.feature],\n      keepAspectRatio: () => true,\n      stretch: false,\n      noFlip: true,\n      enableRotatedTransform: true,\n      keepRectangle: true,\n    });\n\n    this.startImageAngle = this.feature.get(\"imageRotation\");\n\n    this.transform.on(\"select\", this.selectHandler);\n    this.transform.on([\"rotatestart\", \"scalestart\", \"translatestart\"], this.transformStartHandler);\n    this.transform.on(\"rotating\", this.rotatingHandler);\n    this.transform.on([\"rotateend\", \"scaleend\", \"translateend\"], this.rotateScaleTranslateEndHandler);\n\n    this.mapManager.map.addInteraction(this.transform);\n\n    this.added = true;\n  }\n\n  selectHandler = (e) => {\n    const selected = !!e.feature;\n    this.feature.set(\"selected\", selected);\n  };\n\n  transformStartHandler = (e) => {\n    this.startImageAngle = e.feature.get(\"imageRotation\");\n    this.startGeometry = e.feature.getGeometry().clone();\n  };\n\n  rotatingHandler = (e) => {\n    e.feature.set(\"imageRotation\", this.startImageAngle - e.angle);\n  };\n\n  rotateScaleTranslateEndHandler = (_e) => {\n    if (this.#geometryHasNaNCoordinates()) {\n      this.feature.setGeometry(this.startGeometry);\n      alertDialog(\"The building image could not be resized. Please try again.\", () => {}, {\n        title: \"Building Image Error\",\n        headerColor: \"red\",\n      });\n      return;\n    }\n    this.mapModelSynchronizer.saveBuildingImagePlacementCoordinatesAndRotationToModel(this.feature);\n  };\n\n  remove() {\n    if (!this.added) return;\n\n    this.transform.un(\"select\", this.selectHandler);\n    this.transform.un([\"rotatestart\", \"scalestart\", \"translatestart\"], this.transformStartHandler);\n    this.transform.un(\"rotating\", this.rotatingHandler);\n    this.transform.un([\"rotateend\", \"scaleend\", \"translateend\"], this.rotateScaleTranslateEndHandler);\n\n    this.mapManager.map.removeInteraction(this.transform);\n    this.feature.set(\"selected\", false);\n\n    this.added = false;\n  }\n\n  get isSelected() {\n    return this.feature.get(\"selected\");\n  }\n\n  #geometryHasNaNCoordinates() {\n    const coords = this.feature.getGeometry().getCoordinates()[0];\n    return coords.some((c) => !Number.isFinite(c[0]) || !Number.isFinite(c[1]));\n  }\n}\n", "export const EDITOR_MODE_DRAW = \"draw\";\nexport const EDITOR_MODE_PAINT = \"paint\";\nexport const EDITOR_MODE_PAINT_ZONES = \"paintZones\";\nexport const EDITOR_MODE_PAINT_MODULE_POSITIONS = \"paintModulePositions\";\nexport const EDITOR_MODE_PAINT_CONTOUR = \"paintContour\";\nexport const EDITOR_MODE_SELECT = \"select\";\nexport const EDITOR_MODE_MEASURE = \"measure\";\nexport const EDITOR_MODE_PAN_MAP = \"panMap\";\nexport const EDITOR_MODE_SHAPES = \"shapes\";\n\nexport const OBSTRUCTION_EDIT_MODE_VERTICES = \"vertices\";\nexport const OBSTRUCTION_EDIT_MODE_TRANSFORM = \"transform\";\n\nexport const PANEL_ORIENTATION_PORTRAIT = \"portrait\";\nexport const PANEL_ORIENTATION_LANDSCAPE = \"landscape\";\n\nexport const PANEL_MODE_ADD = \"add\";\nexport const PANEL_MODE_REMOVE = \"remove\";\nexport const PANEL_MODE_TOGGLE = \"toggle\";\n\nexport const SELECT_TYPE_PANELS = \"panels\";\nexport const SELECT_TYPE_SEGMENTS = \"segments\";\nexport const SELECT_TYPE_MEASURES = \"measures\";\nexport const SELECT_TYPE_SETBACK = \"setback\";\nexport const SELECT_TYPE_THERMAL_EXPANSIONS = \"thermalExpansions\";\n", "import * as localStore from \"../../../helpers/local-store\";\n\nconst LOCAL_STORAGE_PREFIX = \"le--settings\";\n\nexport const SETTINGS_EVENT = {\n  CHANGED: \"settingChanged\",\n};\n\nexport const SETTINGS = {\n  SHOW_SHAPE_GUIDE_LINES: \"showShapeGuideLines\",\n  SHOW_SHAPE_GUIDE_LINES_FOR_ROOF_PLANES: \"showShapeGuideLinesForRoofPlanes\",\n  SHOW_SHAPE_GUIDE_LINES_FOR_ROOF_SECTIONS: \"showShapeGuideLinesForRoofSections\",\n  SHOW_SHAPE_GUIDE_LINES_FOR_OBSTRUCTIONS: \"showShapeGuideLinesForObstructions\",\n  SHOW_SHAPE_GUIDE_LINES_FOR_MEASURES: \"showShapeGuideLinesForMeasures\",\n  SNAP_DISTANCE: \"snapDistance\",\n};\n\nexport const SHOW_SHAPE_GUIDE_LINES_OPTIONS = {\n  DRAWING: \"drawing\",\n  DRAWING_AND_SELECTING: \"drawing_and_selecting\",\n  ALWAYS: \"always\",\n  NEVER: \"never\",\n};\n\nexport const SNAP_DISTANCE_OPTIONS = {\n  PRECISE: 3,\n  DEFAULT: 5,\n  MODERATE: 8,\n  GENEROUS: 12,\n  MAXIMUM: 16,\n};\n\nconst SHOW_SHAPE_GUIDE_LINES_DEFAULT = SHOW_SHAPE_GUIDE_LINES_OPTIONS.DRAWING;\nconst SHOW_SHAPE_GUIDE_LINES_FOR_ROOF_PLANES_DEFAULT = true;\nconst SHOW_SHAPE_GUIDE_LINES_FOR_ROOF_SECTIONS_DEFAULT = true;\nconst SHOW_SHAPE_GUIDE_LINES_FOR_OBSTRUCTIONS_DEFAULT = true;\nconst SHOW_SHAPE_GUIDE_LINES_FOR_MEASURES_DEFAULT = true;\nconst SNAP_DISTANCE_DEFAULT = SNAP_DISTANCE_OPTIONS.DEFAULT;\n\nexport default class LayoutEditorSettings {\n  get showShapeGuideLines() {\n    return this.#get(SETTINGS.SHOW_SHAPE_GUIDE_LINES) || SHOW_SHAPE_GUIDE_LINES_DEFAULT;\n  }\n\n  get showShapeGuideLinesWhenDrawing() {\n    return [\n      SHOW_SHAPE_GUIDE_LINES_OPTIONS.DRAWING,\n      SHOW_SHAPE_GUIDE_LINES_OPTIONS.DRAWING_AND_SELECTING,\n      SHOW_SHAPE_GUIDE_LINES_OPTIONS.ALWAYS,\n    ].includes(this.showShapeGuideLines);\n  }\n\n  get showShapeGuideLinesWhenSelecting() {\n    return [SHOW_SHAPE_GUIDE_LINES_OPTIONS.DRAWING_AND_SELECTING, SHOW_SHAPE_GUIDE_LINES_OPTIONS.ALWAYS].includes(\n      this.showShapeGuideLines,\n    );\n  }\n\n  get showShapeGuideLinesAlways() {\n    return [SHOW_SHAPE_GUIDE_LINES_OPTIONS.ALWAYS].includes(this.showShapeGuideLines);\n  }\n\n  set showShapeGuideLines(value) {\n    this.#set(SETTINGS.SHOW_SHAPE_GUIDE_LINES, value);\n  }\n\n  get showShapeGuideLinesForRoofPlanes() {\n    const storedValue = this.#get(SETTINGS.SHOW_SHAPE_GUIDE_LINES_FOR_ROOF_PLANES);\n    return storedValue !== null ? storedValue === \"true\" : SHOW_SHAPE_GUIDE_LINES_FOR_ROOF_PLANES_DEFAULT;\n  }\n\n  set showShapeGuideLinesForRoofPlanes(value) {\n    this.#set(SETTINGS.SHOW_SHAPE_GUIDE_LINES_FOR_ROOF_PLANES, String(value));\n  }\n\n  get showShapeGuideLinesForRoofSections() {\n    const storedValue = this.#get(SETTINGS.SHOW_SHAPE_GUIDE_LINES_FOR_ROOF_SECTIONS);\n    return storedValue !== null ? storedValue === \"true\" : SHOW_SHAPE_GUIDE_LINES_FOR_ROOF_SECTIONS_DEFAULT;\n  }\n\n  set showShapeGuideLinesForRoofSections(value) {\n    this.#set(SETTINGS.SHOW_SHAPE_GUIDE_LINES_FOR_ROOF_SECTIONS, String(value));\n  }\n\n  get showShapeGuideLinesForObstructions() {\n    const storedValue = this.#get(SETTINGS.SHOW_SHAPE_GUIDE_LINES_FOR_OBSTRUCTIONS);\n    return storedValue !== null ? storedValue === \"true\" : SHOW_SHAPE_GUIDE_LINES_FOR_OBSTRUCTIONS_DEFAULT;\n  }\n\n  set showShapeGuideLinesForObstructions(value) {\n    this.#set(SETTINGS.SHOW_SHAPE_GUIDE_LINES_FOR_OBSTRUCTIONS, String(value));\n  }\n\n  get showShapeGuideLinesForMeasures() {\n    const storedValue = this.#get(SETTINGS.SHOW_SHAPE_GUIDE_LINES_FOR_MEASURES);\n    return storedValue !== null ? storedValue === \"true\" : SHOW_SHAPE_GUIDE_LINES_FOR_MEASURES_DEFAULT;\n  }\n\n  set showShapeGuideLinesForMeasures(value) {\n    this.#set(SETTINGS.SHOW_SHAPE_GUIDE_LINES_FOR_MEASURES, String(value));\n  }\n\n  get snapDistance() {\n    const storedValue = this.#get(SETTINGS.SNAP_DISTANCE);\n    return storedValue !== null ? parseInt(storedValue, 10) : SNAP_DISTANCE_DEFAULT;\n  }\n\n  set snapDistance(value) {\n    this.#set(SETTINGS.SNAP_DISTANCE, String(value));\n  }\n\n  #get(key) {\n    return localStore.get(`${LOCAL_STORAGE_PREFIX}--${key}`);\n  }\n\n  #set(key, value) {\n    localStore.set(`${LOCAL_STORAGE_PREFIX}--${key}`, value);\n  }\n}\n", "import { SETTINGS, SHOW_SHAPE_GUIDE_LINES_OPTIONS } from \"./index\";\n\nexport default class SettingChangeApplier {\n  static call(controller, change) {\n    new SettingChangeApplier(controller, change).call();\n  }\n\n  constructor(controller, change) {\n    this.controller = controller;\n    this.change = change;\n    this.setting = change.setting;\n    this.from = change.from;\n    this.to = change.to;\n\n    this.mapManager = controller.mapManager;\n\n    this.shapeGuideLinesInteractionManager = controller.shapeGuideLinesInteractionManager;\n    this.drawInteractionManager = controller.drawInteractionManager;\n    this.selectInteractionManager = controller.selectInteractionManager;\n  }\n\n  call() {\n    if (this.setting === SETTINGS.SHOW_SHAPE_GUIDE_LINES) {\n      this.#applyShowGuideLinesChange();\n    } else if (\n      this.setting === SETTINGS.SHOW_SHAPE_GUIDE_LINES_FOR_ROOF_PLANES ||\n      this.setting === SETTINGS.SHOW_SHAPE_GUIDE_LINES_FOR_ROOF_SECTIONS ||\n      this.setting === SETTINGS.SHOW_SHAPE_GUIDE_LINES_FOR_OBSTRUCTIONS ||\n      this.setting === SETTINGS.SHOW_SHAPE_GUIDE_LINES_FOR_MEASURES\n    ) {\n      this.#applyShowGuideLinesFiltersChange();\n    } else if (this.setting === SETTINGS.SNAP_DISTANCE) {\n      // Handled by snap interaction manager's event listener\n    } else {\n      throw new Error(`Unknown setting change: ${this.change}`);\n    }\n  }\n\n  #applyShowGuideLinesChange() {\n    if (!this.shapeGuideLinesInteractionManager) return;\n\n    const drawingFeature = this.drawInteractionManager?.currentDrawInteraction?.feature;\n\n    let features = [];\n\n    switch (this.to) {\n      case SHOW_SHAPE_GUIDE_LINES_OPTIONS.NEVER:\n        this.shapeGuideLinesInteractionManager.clear();\n        return;\n\n      case SHOW_SHAPE_GUIDE_LINES_OPTIONS.ALWAYS:\n        const vectorSources = [\n          this.mapManager.roofPlanesVectorSource,\n          this.mapManager.roofSectionsVectorSource,\n          this.mapManager.obstructionsVectorSource,\n          this.mapManager.measuresVectorSource,\n        ];\n\n        features = vectorSources.flatMap((vectorSource) => {\n          if (!vectorSource) return [];\n          return vectorSource.getFeatures();\n        });\n\n        const currentDrawingFeature = this.controller.drawInteractionManager?.currentDrawInteraction?.feature;\n        if (currentDrawingFeature) features.push(currentDrawingFeature);\n\n        const currentMeasureFeature = this.controller.measureInteractionManager?.currentMeasureInteraction?.feature;\n        if (currentMeasureFeature) features.push(currentMeasureFeature);\n        break;\n\n      case SHOW_SHAPE_GUIDE_LINES_OPTIONS.DRAWING:\n        if (drawingFeature) features.push(drawingFeature);\n        break;\n\n      case SHOW_SHAPE_GUIDE_LINES_OPTIONS.DRAWING_AND_SELECTING:\n        features = this.selectInteractionManager.selectedFeatures;\n        if (drawingFeature) features.push(drawingFeature);\n        break;\n\n      default:\n        throw new Error(`Unknown show guide lines option: ${this.to}`);\n    }\n\n    this.shapeGuideLinesInteractionManager.clear();\n\n    if (features.length > 0) {\n      this.shapeGuideLinesInteractionManager.add(features, \"SettingsChangeApplier\");\n    }\n  }\n\n  #applyShowGuideLinesFiltersChange() {\n    const showShapeGuideLinesSetting = this.controller.settings.showShapeGuideLines;\n    const neverShow = showShapeGuideLinesSetting === SHOW_SHAPE_GUIDE_LINES_OPTIONS.NEVER;\n    if (!this.shapeGuideLinesInteractionManager || neverShow) return;\n\n    this.shapeGuideLinesInteractionManager.render();\n  }\n}\n", "import * as Turbo from \"@hotwired/turbo\";\nimport { Controller } from \"@hotwired/stimulus\";\nimport { applySnapshot, getSnapshot } from \"mobx-state-tree\";\n\nimport { radiansToDegrees } from \"../../../helpers/geometry\";\nimport * as toolbarBtn from \"../../../da/layout-editor/helpers/toolbar-btns\";\nimport { alertDialog } from \"../../components/ir_dialog/helper\";\nimport UndoQueue from \"../../../da/map/undo-queue\";\nimport { fromLonLat } from \"ol/proj\";\nimport BuildingImagePlacementCreator from \"../../../da/map/building-images/placement-creator\";\nimport BuildingImagePlacementsTransformInteractionManager from \"../../../da/map/interaction-managers/transform/building-image-placement\";\nimport { EDITOR_MODE_SELECT } from \"../../../da/layout-editor/helpers/toolbar-constants\";\nimport LayoutEditorSettings, { SETTINGS_EVENT } from \"../../../da/layout-editor/settings\";\nimport SettingChangeApplier from \"../../../da/layout-editor/settings/change-applier\";\nimport * as animate from \"../../../helpers/animate\";\n\nexport default class MapBaseController extends Controller {\n  settings = new LayoutEditorSettings();\n\n  connect() {\n    this.projectData = JSON.parse(this.element.dataset.project);\n    this.authToken = new URL(location.href).searchParams.get(\"auth_token\");\n    this.savePath = this.element.dataset.savePath;\n    if (this.authToken) {\n      this.savePath = `${this.savePath}?auth_token=${this.authToken}`;\n    }\n    this.bingApiKey = this.element.dataset.bingApiKey;\n    this.azureApiKey = this.element.dataset.azureApiKey;\n    this.openLayersTileProvider = this.element.dataset.openLayersTileProvider;\n    this.page = this.element.dataset.page;\n    this.dirty = false;\n    this.debugMode = this.element.dataset.debugMode;\n\n    this.element[this.identifier] = this;\n    this.element.mapController = this;\n    if (!this.suppressGlobalCreation) window.mapController = this;\n\n    this.buildingImagePlacementTransformInteractionManagers = [];\n    this.buildingImagesLocked = false;\n\n    document.addEventListener(SETTINGS_EVENT.CHANGED, this.handleLayoutEditorSettingChanged);\n\n    this.setupGuideVertexInputListeners();\n  }\n\n  setupGuideVertexInputListeners() {\n    if (this.hasGuideVertexFeetTarget) {\n      this.guideVertexFeetTarget.addEventListener(\"input\", this.handleGuideVertexInput);\n    }\n\n    if (this.hasGuideVertexInchesTarget) {\n      this.guideVertexInchesTarget.addEventListener(\"input\", this.handleGuideVertexInput);\n    }\n  }\n\n  disconnect() {\n    document.removeEventListener(SETTINGS_EVENT.CHANGED, this.handleLayoutEditorSettingChanged);\n  }\n\n  handleLayoutEditorSettingChanged = (event) => {\n    SettingChangeApplier.call(this, event.detail.change);\n  };\n\n  // Rotate map clockwise\n  rotateCounterClockwise(event) {\n    let degrees = -1;\n    if (event.shiftKey) degrees = -10;\n    if (event.altKey) degrees = -0.1;\n    if (event.shiftKey && event.altKey) degrees = -0.01;\n    this.mapManager.rotateBy(degrees);\n  }\n\n  rotateClockwise(event) {\n    let degrees = 1;\n    if (event.shiftKey) degrees = 10;\n    if (event.altKey) degrees = 0.1;\n    if (event.shiftKey && event.altKey) degrees = 0.01;\n    this.mapManager.rotateBy(degrees);\n  }\n\n  // When clicking the compass, rotate back to 0 (North)\n  rotateNorth(_event) {\n    this.mapManager.rotateTo(0);\n  }\n\n  zoomOut(event) {\n    let amount = -0.25;\n    if (event.shiftKey) amount = -1;\n    if (event.altKey) amount = -0.05;\n    if (event.shiftKey && event.altKey) amount = -0.01;\n    this.mapManager.zoomBy(amount);\n  }\n\n  zoomIn(event) {\n    let amount = 0.25;\n    if (event.shiftKey) amount = 1;\n    if (event.altKey) amount = 0.05;\n    if (event.shiftKey && event.altKey) amount = 0.01;\n    this.mapManager.zoomBy(amount);\n  }\n\n  get isViewerPage() {\n    return this.page === \"viewer\";\n  }\n\n  get isRoofPlanesPage() {\n    return this.page === \"roofPlanes\";\n  }\n\n  get isRoofSectionsPage() {\n    return this.page === \"roofSections\";\n  }\n\n  get isEditArrayPage() {\n    return this.page === \"editArray\";\n  }\n\n  markDirty({ force } = { force: false }) {\n    this.dirty = this.project.needsSave;\n\n    if (this.dirty || force) {\n      this.saveBtnTarget.classList.add(\"ol-map__btn--dirty\");\n      this.populateStatusbar();\n    } else {\n      this.saveBtnTarget.classList.remove(\"ol-map__btn--dirty\");\n    }\n  }\n\n  populateStatusbar() {\n    // When a value like rotation updates, we need to wait for OL to finish doing its thing\n    setTimeout(() => {\n      this.setZoomAndRotationInStatusBar();\n      this.setMapSpecificStatusBarItems();\n    }, 500);\n  }\n\n  setZoomAndRotationInStatusBar() {\n    if (this.hasStatusItemZoomTarget) {\n      this.statusItemZoomTarget.innerText = this.mapManager.zoom.toFixed(3);\n    }\n\n    if (this.hasStatusItemRotationTarget) {\n      this.statusItemRotationTarget.innerText = `${radiansToDegrees(this.mapManager.rotation).toFixed(2)}\u00B0`;\n    }\n  }\n\n  setMapSpecificStatusBarItems() {\n    // override in sub class\n  }\n\n  get isDirty() {\n    return this.dirty;\n  }\n\n  markClean() {\n    this.dirty = false;\n    this.saveBtnTarget.classList.remove(\"ol-map__btn--dirty\");\n  }\n\n  removeSelectedFeatures(event) {\n    this.selectInteractionManager.removeSelectedFeatures(event);\n    this.removeSelectedBuildingImagePlacements();\n    this.markDirty();\n  }\n\n  saveAndThenRedirect(url) {\n    const event = {};\n    this.save(event, () => Turbo.visit(url));\n  }\n\n  alignViewToFeature = (feature, options = { markClean: true }) => {\n    const view = this.mapManager.map.getView();\n    const geometry = feature.getGeometry();\n    view.fit(geometry, { padding: [100, 30, 80, 30] });\n\n    if (!options.markClean) return;\n\n    setTimeout(() => {\n      this.markClean();\n    }, 50);\n  };\n\n  onValidationError = (model, json) => {\n    const title = \"Unable to Save\";\n\n    let message = \"<p>We encountered the following errors:</p>\";\n    message += \"<ul>\";\n    json.errorMessages.forEach((errorMessage) => {\n      message += `<li>${errorMessage}</li>`;\n    });\n    message += \"</ul>\";\n\n    this.#errorAlert({ model, title, message });\n  };\n\n  onServerError = (model, response, json = {}) => {\n    const title = `Server Error (${response.status})`;\n\n    let message;\n    if (json.message) {\n      message = `<p>${json.message}</p>`;\n    } else {\n      message =\n        \"<p>We encountered a server error while trying to process your request. An admin has been notified of the problem.  We apologize for the inconvenience.</p>\";\n    }\n\n    this.#errorAlert({ model, title, message });\n  };\n\n  setEnabledForBtnGroup(group, enabled) {\n    const enableDisable = enabled ? \"enable\" : \"disable\";\n    const buttons = this.btnGroups[group];\n    toolbarBtn[enableDisable](...buttons);\n  }\n\n  #errorAlert({ model, title, message }) {\n    if (this.hasSaveBtnTarget) {\n      setTimeout(() => {\n        toolbarBtn.hideSpinner(this.saveBtnTarget);\n      }, 500);\n    }\n\n    if (model.setNotSaving) model.setNotSaving();\n\n    alertDialog(message, () => {}, {\n      title,\n      headerColor: \"red\",\n      confirmBtnColor: \"red\",\n    });\n  }\n\n  addSnapshotToUndoQueue(enableUndoBtn = true) {\n    if (!this.hasUndoBtnTarget) return;\n\n    if (!this.undoQueue) {\n      this.undoQueue = new UndoQueue();\n    }\n\n    const newSnapshot = getSnapshot(this.project);\n    if (!newSnapshot) debugger;\n    this.undoQueue.push(newSnapshot);\n\n    if (enableUndoBtn && this.undoQueue.hasUndoSteps) toolbarBtn.enable(this.undoBtnTarget);\n    // a push that matched the current state is a no-op and leaves the redo history intact\n    if (this.undoQueue.hasZeroRedoSteps) toolbarBtn.disable(this.redoBtnTarget);\n  }\n\n  undo(event) {\n    if (toolbarBtn.isDisabled(event.currentTarget)) return;\n\n    const snapshot = this.undoQueue.undo();\n    toolbarBtn.enable(this.redoBtnTarget);\n    if (this.undoQueue.hasZeroUndoSteps) toolbarBtn.disable(this.undoBtnTarget);\n    this.undoRedoApplySnapshot(snapshot);\n  }\n\n  redo(event) {\n    if (toolbarBtn.isDisabled(event.currentTarget)) return;\n\n    const snapshot = this.undoQueue.redo();\n    toolbarBtn.enable(this.undoBtnTarget);\n    if (this.undoQueue.hasZeroRedoSteps) toolbarBtn.disable(this.redoBtnTarget);\n    this.undoRedoApplySnapshot(snapshot);\n  }\n\n  undoRedoApplySnapshot(snapshot) {\n    if (!snapshot) return;\n\n    this.undoRedoInProgress = true;\n    if (this.undoRedoInProgressResetTimeout) {\n      clearTimeout(this.undoRedoInProgressResetTimeout);\n    }\n    this.mapManager.clearFeaturesBeforeSnapshotUpdate();\n    try {\n      applySnapshot(this.project, snapshot);\n    } catch (e) {\n      debugger;\n    }\n    this.mapManager.renderFeaturesAfterSnapshotUpdate();\n\n    this.project.setDirty(true);\n    this.markDirty();\n\n    // Need to give the map time to register the onMoveEnd event\n    this.undoRedoInProgressResetTimeout = setTimeout(() => {\n      this.undoRedoInProgress = false;\n    }, 1000);\n  }\n\n  updateProjectSiteValuesForOtherMaps(otherMapController) {\n    if (!otherMapController) return;\n\n    // Need to give the map time to finish rotating, zooming, moving, etc.\n    setTimeout(() => {\n      const projectSite = this.project.projectSite;\n      const viewerData = {\n        viewerLat: projectSite.viewerLat,\n        viewerLng: projectSite.viewerLng,\n        viewerRotation: projectSite.viewerRotation,\n        viewerZoom: projectSite.viewerZoom,\n      };\n\n      otherMapController.skipNextMapMoveEndEvent = true;\n      otherMapController.setProjectSiteValuesFromOtherMap(viewerData);\n    }, 500);\n  }\n\n  setProjectSiteValuesFromOtherMap(newValues) {\n    this.project.projectSite.setViewerSettings({\n      rotation: newValues.viewerRotation,\n      lat: newValues.viewerLat,\n      lng: newValues.viewerLng,\n      zoom: newValues.viewerZoom,\n    });\n\n    const coordinate = fromLonLat([newValues.viewerLng, newValues.viewerLat]);\n\n    this.mapManager.setZoomRotationAndPosition(newValues.viewerZoom, newValues.viewerRotation, coordinate);\n  }\n\n  clearUndoQueue() {\n    if (!this.undoQueue) return;\n\n    this.undoQueue.clear();\n    toolbarBtn.disable(this.undoBtnTarget);\n    toolbarBtn.disable(this.redoBtnTarget);\n  }\n\n  createBuildingImagePlacement({ imagePath, uploadedBuildingImageId, width, height, feetPerPixel }) {\n    const creator = new BuildingImagePlacementCreator(\n      this.mapManager,\n      imagePath,\n      uploadedBuildingImageId,\n      width,\n      height,\n      feetPerPixel,\n    );\n    const placement = creator.create();\n\n    this.markDirty();\n\n    const feature = this.mapManager.addBuildingImagePlacementToMap(placement);\n    const interactionManager = this.addBuildingImagePlacementTransformInteractionManager(feature);\n    this.activateSelectMode();\n\n    interactionManager.transform.setSelection([feature]);\n\n    feature.set(\"selected\", true);\n    feature.changed();\n  }\n\n  // startSelectMode only handles adding and removing interaction managers.  It does not handle changing\n  // the editor mode or updating the menu item because it is intended to be called from a button click.\n  activateSelectMode() {\n    this.startSelectMode();\n\n    this.editorMode = EDITOR_MODE_SELECT;\n    this.editorModeMenuTarget.selectGroupController.selectOption(EDITOR_MODE_SELECT);\n    toolbarBtn.showEnabledAndHideDisabledPinnedFlyoutMenus();\n  }\n\n  addBuildingImagePlacementTransformInteractionManager(feature) {\n    const interactionManager = new BuildingImagePlacementsTransformInteractionManager(this, feature);\n    this.buildingImagePlacementTransformInteractionManagers.push(interactionManager);\n    return interactionManager;\n  }\n\n  addBuildingImagePlacementTransformInteractions() {\n    this.buildingImagePlacementTransformInteractionManagers.forEach((interactionManager) => {\n      interactionManager.add();\n    });\n  }\n\n  removeBuildingImagePlacementTransformInteractions() {\n    this.buildingImagePlacementTransformInteractionManagers.forEach((interactionManager) => {\n      interactionManager.remove();\n    });\n  }\n\n  setupBuildingImagePlacementInteractionManagers() {\n    this.mapManager.buildingImagePlacementFeatures.forEach((feature) => {\n      const interactionManager = this.addBuildingImagePlacementTransformInteractionManager(feature);\n      if (this.editorMode === EDITOR_MODE_SELECT) {\n        interactionManager.add();\n      }\n    });\n  }\n\n  removeSelectedBuildingImagePlacements() {\n    const interactionManagers = [];\n    this.buildingImagePlacementTransformInteractionManagers.forEach((im) => {\n      if (im.isSelected) {\n        im.remove();\n\n        const uuid = im.placementUuid;\n        this.mapManager.removeBuildingImagePlacementFromMap(uuid);\n\n        this.project.destroyBuildingImagePlacement(uuid);\n      } else {\n        interactionManagers.push(im);\n      }\n    });\n\n    this.buildingImagePlacementTransformInteractionManagers = interactionManagers;\n  }\n\n  // Note that this is called after an uploaded building image is destroyed on the server\n  // so we don't need to figure out if the placement models have been persisted or not.  If\n  // they're persisted, they would have already been removed from the backend.  We don't need\n  // to pass a \"_destroy\" flag to the backend.\n  removeUploadedBuildingImage(id) {\n    const uploadedBuildingImage = this.project.getUploadedBuildingImage(id);\n    const placementUuids = uploadedBuildingImage.buildingImagePlacements.map((bip) => bip.uuid);\n\n    placementUuids.forEach((uuid) => {\n      this.mapManager.removeBuildingImagePlacementFromMap(uuid);\n      this.removeBuildingImagePlacementInteractionManager(uuid);\n    });\n\n    this.project.destroyUploadedBuildingImage(id);\n  }\n\n  removeBuildingImagePlacementInteractionManager(placementUuid) {\n    const interactionManager = this.buildingImagePlacementTransformInteractionManagers.find(\n      (im) => im.placementUuid === placementUuid,\n    );\n    if (!interactionManager) return;\n\n    interactionManager.remove();\n    this.buildingImagePlacementTransformInteractionManagers =\n      this.buildingImagePlacementTransformInteractionManagers.filter((im) => im.placementUuid !== placementUuid);\n  }\n\n  toggleBuildingImagesLock() {\n    this.buildingImagesLocked = !this.buildingImagesLocked;\n\n    if (this.buildingImagesLocked) {\n      this.removeBuildingImagePlacementTransformInteractions();\n    } else if (this.editorMode === EDITOR_MODE_SELECT) {\n      this.addBuildingImagePlacementTransformInteractions();\n    }\n  }\n\n  showLineLengthMenu() {\n    if (this.hasLineLengthMenuTarget) {\n      animate.show(this.lineLengthMenuTarget);\n      this.focusGuideVertexField();\n    }\n  }\n\n  focusGuideVertexField() {\n    if (this.hasGuideVertexFeetTarget) {\n      this.guideVertexFeetTarget.focus();\n      this.guideVertexFeetTarget.select();\n    }\n  }\n\n  hideLineLengthMenu() {\n    if (this.hasLineLengthMenuTarget) {\n      animate.hide(this.lineLengthMenuTarget);\n\n      if (this.hasGuideVertexFeetTarget) {\n        this.guideVertexFeetTarget.value = \"\";\n      }\n\n      if (this.hasGuideVertexInchesTarget) {\n        this.guideVertexInchesTarget.value = \"\";\n      }\n\n      if (this.drawInteractionManager) {\n        this.drawInteractionManager.guideVertexDistance = 0;\n      }\n\n      if (this.measureInteractionManager) {\n        this.measureInteractionManager.guideVertexDistance = 0;\n      }\n    }\n  }\n\n  updateLineLengthMenuValues(feet, inches) {\n    if (this.hasLineLengthFeetTarget) this.lineLengthFeetTarget.textContent = feet;\n    if (this.hasLineLengthInchesTarget) this.lineLengthInchesTarget.textContent = inches;\n  }\n\n  handleGuideVertexInput = () => {\n    this.updateGuideVertex();\n  };\n\n  updateGuideVertex() {\n    // Read directly from the visible fields for real-time updates\n    const feet = parseFloat(this.guideVertexFeetTarget.value) || 0;\n    const inches = parseFloat(this.guideVertexInchesTarget.value) || 0;\n    const totalInches = feet * 12 + inches;\n\n    if (this.drawInteractionManager) {\n      this.drawInteractionManager.guideVertexDistance = totalInches;\n    }\n\n    if (this.measureInteractionManager) {\n      this.measureInteractionManager.guideVertexDistance = totalInches;\n    }\n\n    if (this.drawInteractionManager?.currentDrawInteraction?.feature) {\n      this.drawInteractionManager.updateExtendedGuideline(\n        this.drawInteractionManager.currentDrawInteraction.feature.getGeometry(),\n      );\n    }\n\n    if (this.measureInteractionManager?.currentMeasureInteraction?.feature) {\n      this.measureInteractionManager.updateExtendedGuideline(\n        this.measureInteractionManager.currentMeasureInteraction.feature.getGeometry(),\n      );\n    }\n  }\n}\n", "/**\n * @module ol/geom/Circle\n */\nimport {createOrUpdate, forEachCorner, intersects} from '../extent.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport {deflateCoordinate} from './flat/deflate.js';\nimport {rotate} from './flat/transform.js';\n\n/**\n * @classdesc\n * Circle geometry.\n *\n * @api\n */\nclass Circle extends SimpleGeometry {\n  /**\n   * @param {!import(\"../coordinate.js\").Coordinate} center Center.\n   *     For internal use, flat coordinates in combination with `layout` and no\n   *     `radius` are also accepted.\n   * @param {number} [radius] Radius in units of the projection.\n   * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n   */\n  constructor(center, radius, layout) {\n    super();\n    if (layout !== undefined && radius === undefined) {\n      this.setFlatCoordinates(layout, center);\n    } else {\n      radius = radius ? radius : 0;\n      this.setCenterAndRadius(center, radius, layout);\n    }\n  }\n\n  /**\n   * Make a complete copy of the geometry.\n   * @return {!Circle} Clone.\n   * @api\n   * @override\n   */\n  clone() {\n    const circle = new Circle(\n      this.flatCoordinates.slice(),\n      undefined,\n      this.layout,\n    );\n    circle.applyProperties(this);\n    return circle;\n  }\n\n  /**\n   * @param {number} x X.\n   * @param {number} y Y.\n   * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n   * @param {number} minSquaredDistance Minimum squared distance.\n   * @return {number} Minimum squared distance.\n   * @override\n   */\n  closestPointXY(x, y, closestPoint, minSquaredDistance) {\n    const flatCoordinates = this.flatCoordinates;\n    const dx = x - flatCoordinates[0];\n    const dy = y - flatCoordinates[1];\n    const squaredDistance = dx * dx + dy * dy;\n    if (squaredDistance < minSquaredDistance) {\n      if (squaredDistance === 0) {\n        for (let i = 0; i < this.stride; ++i) {\n          closestPoint[i] = flatCoordinates[i];\n        }\n      } else {\n        const delta = this.getRadius() / Math.sqrt(squaredDistance);\n        closestPoint[0] = flatCoordinates[0] + delta * dx;\n        closestPoint[1] = flatCoordinates[1] + delta * dy;\n        for (let i = 2; i < this.stride; ++i) {\n          closestPoint[i] = flatCoordinates[i];\n        }\n      }\n      closestPoint.length = this.stride;\n      return squaredDistance;\n    }\n    return minSquaredDistance;\n  }\n\n  /**\n   * @param {number} x X.\n   * @param {number} y Y.\n   * @return {boolean} Contains (x, y).\n   * @override\n   */\n  containsXY(x, y) {\n    const flatCoordinates = this.flatCoordinates;\n    const dx = x - flatCoordinates[0];\n    const dy = y - flatCoordinates[1];\n    return dx * dx + dy * dy <= this.getRadiusSquared_();\n  }\n\n  /**\n   * Return the center of the circle as {@link module:ol/coordinate~Coordinate coordinate}.\n   * @return {import(\"../coordinate.js\").Coordinate} Center.\n   * @api\n   */\n  getCenter() {\n    return this.flatCoordinates.slice(0, this.stride);\n  }\n\n  /**\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @protected\n   * @return {import(\"../extent.js\").Extent} extent Extent.\n   * @override\n   */\n  computeExtent(extent) {\n    const flatCoordinates = this.flatCoordinates;\n    const radius = flatCoordinates[this.stride] - flatCoordinates[0];\n    return createOrUpdate(\n      flatCoordinates[0] - radius,\n      flatCoordinates[1] - radius,\n      flatCoordinates[0] + radius,\n      flatCoordinates[1] + radius,\n      extent,\n    );\n  }\n\n  /**\n   * Return the radius of the circle.\n   * @return {number} Radius.\n   * @api\n   */\n  getRadius() {\n    return Math.sqrt(this.getRadiusSquared_());\n  }\n\n  /**\n   * @private\n   * @return {number} Radius squared.\n   */\n  getRadiusSquared_() {\n    const dx = this.flatCoordinates[this.stride] - this.flatCoordinates[0];\n    const dy = this.flatCoordinates[this.stride + 1] - this.flatCoordinates[1];\n    return dx * dx + dy * dy;\n  }\n\n  /**\n   * Get the type of this geometry.\n   * @return {import(\"./Geometry.js\").Type} Geometry type.\n   * @api\n   * @override\n   */\n  getType() {\n    return 'Circle';\n  }\n\n  /**\n   * Test if the geometry and the passed extent intersect.\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @return {boolean} `true` if the geometry and the extent intersect.\n   * @api\n   * @override\n   */\n  intersectsExtent(extent) {\n    const circleExtent = this.getExtent();\n    if (intersects(extent, circleExtent)) {\n      const center = this.getCenter();\n\n      if (extent[0] <= center[0] && extent[2] >= center[0]) {\n        return true;\n      }\n      if (extent[1] <= center[1] && extent[3] >= center[1]) {\n        return true;\n      }\n\n      return forEachCorner(extent, this.intersectsCoordinate.bind(this));\n    }\n    return false;\n  }\n\n  /**\n   * Set the center of the circle as {@link module:ol/coordinate~Coordinate coordinate}.\n   * @param {import(\"../coordinate.js\").Coordinate} center Center.\n   * @api\n   */\n  setCenter(center) {\n    const stride = this.stride;\n    const radius = this.flatCoordinates[stride] - this.flatCoordinates[0];\n    const flatCoordinates = center.slice();\n    flatCoordinates[stride] = flatCoordinates[0] + radius;\n    for (let i = 1; i < stride; ++i) {\n      flatCoordinates[stride + i] = center[i];\n    }\n    this.setFlatCoordinates(this.layout, flatCoordinates);\n    this.changed();\n  }\n\n  /**\n   * Set the center (as {@link module:ol/coordinate~Coordinate coordinate}) and the radius (as\n   * number) of the circle.\n   * @param {!import(\"../coordinate.js\").Coordinate} center Center.\n   * @param {number} radius Radius.\n   * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n   * @api\n   */\n  setCenterAndRadius(center, radius, layout) {\n    this.setLayout(layout, center, 0);\n    if (!this.flatCoordinates) {\n      this.flatCoordinates = [];\n    }\n    /** @type {Array<number>} */\n    const flatCoordinates = this.flatCoordinates;\n    let offset = deflateCoordinate(flatCoordinates, 0, center, this.stride);\n    flatCoordinates[offset++] = flatCoordinates[0] + radius;\n    for (let i = 1, ii = this.stride; i < ii; ++i) {\n      flatCoordinates[offset++] = flatCoordinates[i];\n    }\n    flatCoordinates.length = offset;\n    this.changed();\n  }\n\n  /**\n   * @override\n   */\n  getCoordinates() {\n    return null;\n  }\n\n  /**\n   * @override\n   */\n  setCoordinates(coordinates, layout) {}\n\n  /**\n   * Set the radius of the circle. The radius is in the units of the projection.\n   * @param {number} radius Radius.\n   * @api\n   */\n  setRadius(radius) {\n    this.flatCoordinates[this.stride] = this.flatCoordinates[0] + radius;\n    this.changed();\n  }\n\n  /**\n   * Rotate the geometry around a given coordinate. This modifies the geometry\n   * coordinates in place.\n   * @param {number} angle Rotation angle in counter-clockwise radians.\n   * @param {import(\"../coordinate.js\").Coordinate} anchor The rotation center.\n   * @api\n   * @override\n   */\n  rotate(angle, anchor) {\n    const center = this.getCenter();\n    const stride = this.getStride();\n    this.setCenter(\n      rotate(center, 0, center.length, stride, angle, anchor, center),\n    );\n    this.changed();\n  }\n}\n\n/**\n * Transform each coordinate of the circle from one coordinate reference system\n * to another. The geometry is modified in place.\n * If you do not want the geometry modified in place, first clone() it and\n * then use this function on the clone.\n *\n * Internally a circle is currently represented by two points: the center of\n * the circle `[cx, cy]`, and the point to the right of the circle\n * `[cx + r, cy]`. This `transform` function just transforms these two points.\n * So the resulting geometry is also a circle, and that circle does not\n * correspond to the shape that would be obtained by transforming every point\n * of the original circle.\n *\n * @param {import(\"../proj.js\").ProjectionLike} source The current projection.  Can be a\n *     string identifier or a {@link module:ol/proj/Projection~Projection} object.\n * @param {import(\"../proj.js\").ProjectionLike} destination The desired projection.  Can be a\n *     string identifier or a {@link module:ol/proj/Projection~Projection} object.\n * @return {Circle} This geometry.  Note that original geometry is\n *     modified in place.\n * @function\n * @api\n */\nCircle.prototype.transform;\nexport default Circle;\n", "/**\n * @module ol/geom/GeometryCollection\n */\nimport {listen, unlistenByKey} from '../events.js';\nimport EventType from '../events/EventType.js';\nimport {\n  closestSquaredDistanceXY,\n  createOrUpdateEmpty,\n  extend,\n  getCenter,\n} from '../extent.js';\nimport Geometry from './Geometry.js';\n\n/**\n * @classdesc\n * An array of {@link module:ol/geom/Geometry~Geometry} objects.\n *\n * @api\n */\nclass GeometryCollection extends Geometry {\n  /**\n   * @param {Array<Geometry>} geometries Geometries.\n   */\n  constructor(geometries) {\n    super();\n\n    /**\n     * @private\n     * @type {Array<Geometry>}\n     */\n    this.geometries_ = geometries;\n\n    /**\n     * @private\n     * @type {Array<import(\"../events.js\").EventsKey>}\n     */\n    this.changeEventsKeys_ = [];\n\n    this.listenGeometriesChange_();\n  }\n\n  /**\n   * @private\n   */\n  unlistenGeometriesChange_() {\n    this.changeEventsKeys_.forEach(unlistenByKey);\n    this.changeEventsKeys_.length = 0;\n  }\n\n  /**\n   * @private\n   */\n  listenGeometriesChange_() {\n    const geometries = this.geometries_;\n    for (let i = 0, ii = geometries.length; i < ii; ++i) {\n      this.changeEventsKeys_.push(\n        listen(geometries[i], EventType.CHANGE, this.changed, this),\n      );\n    }\n  }\n\n  /**\n   * Make a complete copy of the geometry.\n   * @return {!GeometryCollection} Clone.\n   * @api\n   * @override\n   */\n  clone() {\n    const geometryCollection = new GeometryCollection(\n      cloneGeometries(this.geometries_),\n    );\n    geometryCollection.applyProperties(this);\n    return geometryCollection;\n  }\n\n  /**\n   * @param {number} x X.\n   * @param {number} y Y.\n   * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n   * @param {number} minSquaredDistance Minimum squared distance.\n   * @return {number} Minimum squared distance.\n   * @override\n   */\n  closestPointXY(x, y, closestPoint, minSquaredDistance) {\n    if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {\n      return minSquaredDistance;\n    }\n    const geometries = this.geometries_;\n    for (let i = 0, ii = geometries.length; i < ii; ++i) {\n      minSquaredDistance = geometries[i].closestPointXY(\n        x,\n        y,\n        closestPoint,\n        minSquaredDistance,\n      );\n    }\n    return minSquaredDistance;\n  }\n\n  /**\n   * @param {number} x X.\n   * @param {number} y Y.\n   * @return {boolean} Contains (x, y).\n   * @override\n   */\n  containsXY(x, y) {\n    const geometries = this.geometries_;\n    for (let i = 0, ii = geometries.length; i < ii; ++i) {\n      if (geometries[i].containsXY(x, y)) {\n        return true;\n      }\n    }\n    return false;\n  }\n\n  /**\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @protected\n   * @return {import(\"../extent.js\").Extent} extent Extent.\n   * @override\n   */\n  computeExtent(extent) {\n    createOrUpdateEmpty(extent);\n    const geometries = this.geometries_;\n    for (let i = 0, ii = geometries.length; i < ii; ++i) {\n      extend(extent, geometries[i].getExtent());\n    }\n    return extent;\n  }\n\n  /**\n   * Return the geometries that make up this geometry collection.\n   * @return {Array<Geometry>} Geometries.\n   * @api\n   */\n  getGeometries() {\n    return cloneGeometries(this.geometries_);\n  }\n\n  /**\n   * @return {Array<Geometry>} Geometries.\n   */\n  getGeometriesArray() {\n    return this.geometries_;\n  }\n\n  /**\n   * @return {Array<Geometry>} Geometries.\n   */\n  getGeometriesArrayRecursive() {\n    /** @type {Array<Geometry>} */\n    let geometriesArray = [];\n    const geometries = this.geometries_;\n    for (let i = 0, ii = geometries.length; i < ii; ++i) {\n      if (geometries[i].getType() === this.getType()) {\n        geometriesArray = geometriesArray.concat(\n          /** @type {GeometryCollection} */ (\n            geometries[i]\n          ).getGeometriesArrayRecursive(),\n        );\n      } else {\n        geometriesArray.push(geometries[i]);\n      }\n    }\n    return geometriesArray;\n  }\n\n  /**\n   * Create a simplified version of this geometry using the Douglas Peucker algorithm.\n   * @param {number} squaredTolerance Squared tolerance.\n   * @return {GeometryCollection} Simplified GeometryCollection.\n   * @override\n   */\n  getSimplifiedGeometry(squaredTolerance) {\n    if (this.simplifiedGeometryRevision !== this.getRevision()) {\n      this.simplifiedGeometryMaxMinSquaredTolerance = 0;\n      this.simplifiedGeometryRevision = this.getRevision();\n    }\n    if (\n      squaredTolerance < 0 ||\n      (this.simplifiedGeometryMaxMinSquaredTolerance !== 0 &&\n        squaredTolerance < this.simplifiedGeometryMaxMinSquaredTolerance)\n    ) {\n      return this;\n    }\n\n    const simplifiedGeometries = [];\n    const geometries = this.geometries_;\n    let simplified = false;\n    for (let i = 0, ii = geometries.length; i < ii; ++i) {\n      const geometry = geometries[i];\n      const simplifiedGeometry =\n        geometry.getSimplifiedGeometry(squaredTolerance);\n      simplifiedGeometries.push(simplifiedGeometry);\n      if (simplifiedGeometry !== geometry) {\n        simplified = true;\n      }\n    }\n    if (simplified) {\n      const simplifiedGeometryCollection = new GeometryCollection(\n        simplifiedGeometries,\n      );\n      return simplifiedGeometryCollection;\n    }\n    this.simplifiedGeometryMaxMinSquaredTolerance = squaredTolerance;\n    return this;\n  }\n\n  /**\n   * Get the type of this geometry.\n   * @return {import(\"./Geometry.js\").Type} Geometry type.\n   * @api\n   * @override\n   */\n  getType() {\n    return 'GeometryCollection';\n  }\n\n  /**\n   * Test if the geometry and the passed extent intersect.\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @return {boolean} `true` if the geometry and the extent intersect.\n   * @api\n   * @override\n   */\n  intersectsExtent(extent) {\n    const geometries = this.geometries_;\n    for (let i = 0, ii = geometries.length; i < ii; ++i) {\n      if (geometries[i].intersectsExtent(extent)) {\n        return true;\n      }\n    }\n    return false;\n  }\n\n  /**\n   * @return {boolean} Is empty.\n   */\n  isEmpty() {\n    return this.geometries_.length === 0;\n  }\n\n  /**\n   * Rotate the geometry around a given coordinate. This modifies the geometry\n   * coordinates in place.\n   * @param {number} angle Rotation angle in radians.\n   * @param {import(\"../coordinate.js\").Coordinate} anchor The rotation center.\n   * @api\n   * @override\n   */\n  rotate(angle, anchor) {\n    const geometries = this.geometries_;\n    for (let i = 0, ii = geometries.length; i < ii; ++i) {\n      geometries[i].rotate(angle, anchor);\n    }\n    this.changed();\n  }\n\n  /**\n   * Scale the geometry (with an optional origin).  This modifies the geometry\n   * coordinates in place.\n   * @abstract\n   * @param {number} sx The scaling factor in the x-direction.\n   * @param {number} [sy] The scaling factor in the y-direction (defaults to sx).\n   * @param {import(\"../coordinate.js\").Coordinate} [anchor] The scale origin (defaults to the center\n   *     of the geometry extent).\n   * @api\n   * @override\n   */\n  scale(sx, sy, anchor) {\n    if (!anchor) {\n      anchor = getCenter(this.getExtent());\n    }\n    const geometries = this.geometries_;\n    for (let i = 0, ii = geometries.length; i < ii; ++i) {\n      geometries[i].scale(sx, sy, anchor);\n    }\n    this.changed();\n  }\n\n  /**\n   * Set the geometries that make up this geometry collection.\n   * @param {Array<Geometry>} geometries Geometries.\n   * @api\n   */\n  setGeometries(geometries) {\n    this.setGeometriesArray(cloneGeometries(geometries));\n  }\n\n  /**\n   * @param {Array<Geometry>} geometries Geometries.\n   */\n  setGeometriesArray(geometries) {\n    this.unlistenGeometriesChange_();\n    this.geometries_ = geometries;\n    this.listenGeometriesChange_();\n    this.changed();\n  }\n\n  /**\n   * Apply a transform function to the coordinates of the geometry.\n   * The geometry is modified in place.\n   * If you do not want the geometry modified in place, first `clone()` it and\n   * then use this function on the clone.\n   * @param {import(\"../proj.js\").TransformFunction} transformFn Transform function.\n   * Called with a flat array of geometry coordinates.\n   * @api\n   * @override\n   */\n  applyTransform(transformFn) {\n    const geometries = this.geometries_;\n    for (let i = 0, ii = geometries.length; i < ii; ++i) {\n      geometries[i].applyTransform(transformFn);\n    }\n    this.changed();\n  }\n\n  /**\n   * Translate the geometry.  This modifies the geometry coordinates in place.  If\n   * instead you want a new geometry, first `clone()` this geometry.\n   * @param {number} deltaX Delta X.\n   * @param {number} deltaY Delta Y.\n   * @api\n   * @override\n   */\n  translate(deltaX, deltaY) {\n    const geometries = this.geometries_;\n    for (let i = 0, ii = geometries.length; i < ii; ++i) {\n      geometries[i].translate(deltaX, deltaY);\n    }\n    this.changed();\n  }\n\n  /**\n   * Clean up.\n   * @override\n   */\n  disposeInternal() {\n    this.unlistenGeometriesChange_();\n    super.disposeInternal();\n  }\n}\n\n/**\n * @param {Array<Geometry>} geometries Geometries.\n * @return {Array<Geometry>} Cloned geometries.\n */\nfunction cloneGeometries(geometries) {\n  return geometries.map((geometry) => geometry.clone());\n}\n\nexport default GeometryCollection;\n", "/**\n * Coordinate type when drawing lines.\n * @typedef {Array<import(\"../coordinate.js\").Coordinate>} LineCoordType\n */\n\nimport {distance} from '../coordinate.js';\nimport GeometryCollection from '../geom/GeometryCollection.js';\nimport LineString from '../geom/LineString.js';\nimport MultiLineString from '../geom/MultiLineString.js';\nimport MultiPolygon from '../geom/MultiPolygon.js';\nimport Polygon from '../geom/Polygon.js';\nimport {clamp, squaredDistance, toFixed} from '../math.js';\n\n/**\n * @param {LineCoordType} coordinates The ring coordinates.\n * @param {number} index The index.  May be wrapped.\n * @return {import(\"../coordinate.js\").Coordinate} The coordinate.\n */\nexport function getCoordinate(coordinates, index) {\n  const count = coordinates.length;\n  if (index < 0) {\n    return coordinates[index + count];\n  }\n  if (index >= count) {\n    return coordinates[index - count];\n  }\n  return coordinates[index];\n}\n\n/**\n * @param {LineCoordType} coordinates The coordinates.\n * @param {number} index The index.  May be fractional and may wrap.\n * @return {import(\"../coordinate.js\").Coordinate} The interpolated coordinate.\n */\nexport function interpolateCoordinate(coordinates, index) {\n  const count = coordinates.length;\n\n  let startIndex = Math.floor(index);\n  const along = index - startIndex;\n  if (startIndex >= count) {\n    startIndex -= count;\n  } else if (startIndex < 0) {\n    startIndex += count;\n  }\n\n  let endIndex = startIndex + 1;\n  if (endIndex >= count) {\n    endIndex -= count;\n  }\n\n  const start = coordinates[startIndex];\n  const x0 = start[0];\n  const y0 = start[1];\n  const end = coordinates[endIndex];\n  const dx = end[0] - x0;\n  const dy = end[1] - y0;\n\n  return [x0 + dx * along, y0 + dy * along];\n}\n\n/**\n * @typedef {Object} TraceTarget\n * @property {Array<import(\"../coordinate.js\").Coordinate>} coordinates Target coordinates.\n * @property {boolean} ring The target coordinates are a linear ring.\n * @property {number} startIndex The index of first traced coordinate.  A fractional index represents an\n * edge intersection.  Index values for rings will wrap (may be negative or larger than coordinates length).\n * @property {number} endIndex The index of last traced coordinate.  Details from startIndex also apply here.\n */\n\n/**\n * @typedef {Object} TraceState\n * @property {boolean} active Tracing active.\n * @property {import(\"../coordinate.js\").Coordinate} [startCoord] The initially clicked coordinate.\n * @property {Array<TraceTarget>} [targets] Targets available for tracing.\n * @property {number} [targetIndex] The index of the currently traced target.  A value of -1 indicates\n * that no trace target is active.\n */\n\n/**\n * @typedef {Object} TraceTargetUpdateInfo\n * @property {number} index The new target index.\n * @property {number} endIndex The new segment end index.\n * @property {number} closestTargetDistance The squared distance to the closest target.\n */\n\n/**\n * @type {TraceTargetUpdateInfo}\n */\nconst sharedUpdateInfo = {\n  index: -1,\n  endIndex: NaN,\n  closestTargetDistance: Infinity,\n};\n\n/**\n * @param {import(\"../coordinate.js\").Coordinate} coordinate The coordinate.\n * @param {TraceState} traceState The trace state.\n * @param {import(\"../Map.js\").default} map The map.\n * @param {number} snapTolerance The snap tolerance.\n * @return {TraceTargetUpdateInfo} Information about the new trace target.  The returned\n * object is reused between calls and must not be modified by the caller.\n */\nexport function getTraceTargetUpdate(\n  coordinate,\n  traceState,\n  map,\n  snapTolerance,\n) {\n  const x = coordinate[0];\n  const y = coordinate[1];\n\n  let closestTargetDistance = Infinity;\n\n  let newTargetIndex = -1;\n  let newEndIndex = NaN;\n\n  for (\n    let targetIndex = 0;\n    targetIndex < traceState.targets.length;\n    ++targetIndex\n  ) {\n    const target = traceState.targets[targetIndex];\n    const coordinates = target.coordinates;\n\n    let minSegmentDistance = Infinity;\n    let endIndex;\n    for (\n      let coordinateIndex = 0;\n      coordinateIndex < coordinates.length - 1;\n      ++coordinateIndex\n    ) {\n      const start = coordinates[coordinateIndex];\n      const end = coordinates[coordinateIndex + 1];\n      const rel = getPointSegmentRelationship(x, y, start, end);\n      if (rel.squaredDistance < minSegmentDistance) {\n        minSegmentDistance = rel.squaredDistance;\n        endIndex = coordinateIndex + rel.along;\n      }\n    }\n\n    if (minSegmentDistance < closestTargetDistance) {\n      closestTargetDistance = minSegmentDistance;\n      if (target.ring && traceState.targetIndex === targetIndex) {\n        // same target, maintain the same trace direction\n        if (target.endIndex > target.startIndex) {\n          // forward trace\n          if (endIndex < target.startIndex) {\n            endIndex += coordinates.length;\n          }\n        } else if (target.endIndex < target.startIndex) {\n          // reverse trace\n          if (endIndex > target.startIndex) {\n            endIndex -= coordinates.length;\n          }\n        }\n      }\n      newEndIndex = endIndex;\n      newTargetIndex = targetIndex;\n    }\n  }\n\n  const newTarget = traceState.targets[newTargetIndex];\n  let considerBothDirections = newTarget.ring;\n  if (traceState.targetIndex === newTargetIndex && considerBothDirections) {\n    // only consider switching trace direction if close to the start\n    const newCoordinate = interpolateCoordinate(\n      newTarget.coordinates,\n      newEndIndex,\n    );\n    const pixel = map.getPixelFromCoordinate(newCoordinate);\n    const startPx = map.getPixelFromCoordinate(traceState.startCoord);\n    if (distance(pixel, startPx) > snapTolerance) {\n      considerBothDirections = false;\n    }\n  }\n\n  if (considerBothDirections) {\n    const coordinates = newTarget.coordinates;\n    const count = coordinates.length;\n    const startIndex = newTarget.startIndex;\n    const endIndex = newEndIndex;\n    if (startIndex < endIndex) {\n      const forwardDistance = getCumulativeSquaredDistance(\n        coordinates,\n        startIndex,\n        endIndex,\n      );\n      const reverseDistance = getCumulativeSquaredDistance(\n        coordinates,\n        startIndex,\n        endIndex - count,\n      );\n      if (reverseDistance < forwardDistance) {\n        newEndIndex -= count;\n      }\n    } else {\n      const reverseDistance = getCumulativeSquaredDistance(\n        coordinates,\n        startIndex,\n        endIndex,\n      );\n      const forwardDistance = getCumulativeSquaredDistance(\n        coordinates,\n        startIndex,\n        endIndex + count,\n      );\n      if (forwardDistance < reverseDistance) {\n        newEndIndex += count;\n      }\n    }\n  }\n\n  sharedUpdateInfo.index = newTargetIndex;\n  sharedUpdateInfo.endIndex = newEndIndex;\n  sharedUpdateInfo.closestTargetDistance = closestTargetDistance;\n  return sharedUpdateInfo;\n}\n\n/**\n * @param {import(\"../coordinate.js\").Coordinate} coordinate The coordinate.\n * @param {Array<import(\"../Feature.js\").default>} features The candidate features.\n * @return {Array<TraceTarget>} The trace targets.\n */\nexport function getTraceTargets(coordinate, features) {\n  /**\n   * @type {Array<TraceTarget>}\n   */\n  const targets = [];\n\n  for (let i = 0; i < features.length; ++i) {\n    const feature = features[i];\n    const geometry = feature.getGeometry();\n    appendGeometryTraceTargets(coordinate, geometry, targets);\n  }\n\n  return targets;\n}\n\n/**\n * @param {import(\"../coordinate.js\").Coordinate} coordinate The coordinate.\n * @param {import(\"../geom/Geometry.js\").default} geometry The candidate geometry.\n * @param {Array<TraceTarget>} targets The trace targets.\n */\nfunction appendGeometryTraceTargets(coordinate, geometry, targets) {\n  if (geometry instanceof LineString) {\n    appendTraceTarget(coordinate, geometry.getCoordinates(), false, targets);\n    return;\n  }\n  if (geometry instanceof MultiLineString) {\n    const coordinates = geometry.getCoordinates();\n    for (let i = 0, ii = coordinates.length; i < ii; ++i) {\n      appendTraceTarget(coordinate, coordinates[i], false, targets);\n    }\n    return;\n  }\n  if (geometry instanceof Polygon) {\n    const coordinates = geometry.getCoordinates();\n    for (let i = 0, ii = coordinates.length; i < ii; ++i) {\n      appendTraceTarget(coordinate, coordinates[i], true, targets);\n    }\n    return;\n  }\n  if (geometry instanceof MultiPolygon) {\n    const polys = geometry.getCoordinates();\n    for (let i = 0, ii = polys.length; i < ii; ++i) {\n      const coordinates = polys[i];\n      for (let j = 0, jj = coordinates.length; j < jj; ++j) {\n        appendTraceTarget(coordinate, coordinates[j], true, targets);\n      }\n    }\n    return;\n  }\n  if (geometry instanceof GeometryCollection) {\n    const geometries = geometry.getGeometries();\n    for (let i = 0; i < geometries.length; ++i) {\n      appendGeometryTraceTargets(coordinate, geometries[i], targets);\n    }\n    return;\n  }\n  // other types cannot be traced\n}\n\n/**\n * @param {import(\"../coordinate.js\").Coordinate} coordinate The clicked coordinate.\n * @param {Array<import(\"../coordinate.js\").Coordinate>} coordinates The geometry component coordinates.\n * @param {boolean} ring The coordinates represent a linear ring.\n * @param {Array<TraceTarget>} targets The trace targets.\n */\nfunction appendTraceTarget(coordinate, coordinates, ring, targets) {\n  const x = coordinate[0];\n  const y = coordinate[1];\n  for (let i = 0, ii = coordinates.length - 1; i < ii; ++i) {\n    const start = coordinates[i];\n    const end = coordinates[i + 1];\n    const rel = getPointSegmentRelationship(x, y, start, end);\n    if (rel.squaredDistance === 0) {\n      const index = i + rel.along;\n      targets.push({\n        coordinates: coordinates,\n        ring: ring,\n        startIndex: index,\n        endIndex: index,\n      });\n      return;\n    }\n  }\n}\n\n/**\n * @param {import(\"../coordinate.js\").Coordinate} a One coordinate.\n * @param {import(\"../coordinate.js\").Coordinate} b Another coordinate.\n * @return {number} The squared distance between the two coordinates.\n */\nfunction getSquaredDistance(a, b) {\n  return squaredDistance(a[0], a[1], b[0], b[1]);\n}\n\n/**\n * Get the cumulative squared distance along a ring path.  The end index index may be \"wrapped\" and it may\n * be less than the start index to indicate the direction of travel.  The start and end index may have\n * a fractional part to indicate a point between two coordinates.\n * @param {LineCoordType} coordinates Ring coordinates.\n * @param {number} startIndex The start index.\n * @param {number} endIndex The end index.\n * @return {number} The cumulative squared distance along the ring path.\n */\nfunction getCumulativeSquaredDistance(coordinates, startIndex, endIndex) {\n  let lowIndex, highIndex;\n  if (startIndex < endIndex) {\n    lowIndex = startIndex;\n    highIndex = endIndex;\n  } else {\n    lowIndex = endIndex;\n    highIndex = startIndex;\n  }\n  const lowWholeIndex = Math.ceil(lowIndex);\n  const highWholeIndex = Math.floor(highIndex);\n\n  if (lowWholeIndex > highWholeIndex) {\n    // both start and end are on the same segment\n    const start = interpolateCoordinate(coordinates, lowIndex);\n    const end = interpolateCoordinate(coordinates, highIndex);\n    return getSquaredDistance(start, end);\n  }\n\n  let sd = 0;\n\n  if (lowIndex < lowWholeIndex) {\n    const start = interpolateCoordinate(coordinates, lowIndex);\n    const end = getCoordinate(coordinates, lowWholeIndex);\n    sd += getSquaredDistance(start, end);\n  }\n\n  if (highWholeIndex < highIndex) {\n    const start = getCoordinate(coordinates, highWholeIndex);\n    const end = interpolateCoordinate(coordinates, highIndex);\n    sd += getSquaredDistance(start, end);\n  }\n\n  for (let i = lowWholeIndex; i < highWholeIndex - 1; ++i) {\n    const start = getCoordinate(coordinates, i);\n    const end = getCoordinate(coordinates, i + 1);\n    sd += getSquaredDistance(start, end);\n  }\n\n  return sd;\n}\n\n/**\n * @typedef {Object} PointSegmentRelationship\n * @property {number} along The closest point expressed as a fraction along the segment length.\n * @property {number} squaredDistance The squared distance of the point to the segment.\n */\n\n/**\n * @type {PointSegmentRelationship}\n */\nconst sharedRel = {along: 0, squaredDistance: 0};\n\n/**\n * @param {number} x The point x.\n * @param {number} y The point y.\n * @param {import(\"../coordinate.js\").Coordinate} start The segment start.\n * @param {import(\"../coordinate.js\").Coordinate} end The segment end.\n * @return {PointSegmentRelationship} The point segment relationship.  The returned object is\n * shared between calls and must not be modified by the caller.\n */\nexport function getPointSegmentRelationship(x, y, start, end) {\n  const x1 = start[0];\n  const y1 = start[1];\n  const x2 = end[0];\n  const y2 = end[1];\n  const dx = x2 - x1;\n  const dy = y2 - y1;\n  let along = 0;\n  let px = x1;\n  let py = y1;\n  if (dx !== 0 || dy !== 0) {\n    along = clamp(((x - x1) * dx + (y - y1) * dy) / (dx * dx + dy * dy), 0, 1);\n    px += dx * along;\n    py += dy * along;\n  }\n\n  sharedRel.along = along;\n  sharedRel.squaredDistance = toFixed(squaredDistance(x, y, px, py), 10);\n  return sharedRel;\n}\n", "/**\n * @module ol/interaction/Draw\n */\nimport Feature from '../Feature.js';\nimport MapBrowserEvent from '../MapBrowserEvent.js';\nimport MapBrowserEventType from '../MapBrowserEventType.js';\nimport {\n  distance,\n  squaredDistance as squaredCoordinateDistance,\n} from '../coordinate.js';\nimport Event from '../events/Event.js';\nimport EventType from '../events/EventType.js';\nimport {\n  always,\n  never,\n  noModifierKeys,\n  shiftKeyOnly,\n} from '../events/condition.js';\nimport {\n  boundingExtent,\n  getBottomLeft,\n  getBottomRight,\n  getTopLeft,\n  getTopRight,\n} from '../extent.js';\nimport {FALSE, TRUE} from '../functions.js';\nimport Circle from '../geom/Circle.js';\nimport LineString from '../geom/LineString.js';\nimport MultiLineString from '../geom/MultiLineString.js';\nimport MultiPoint from '../geom/MultiPoint.js';\nimport MultiPolygon from '../geom/MultiPolygon.js';\nimport Point from '../geom/Point.js';\nimport Polygon, {fromCircle, makeRegular} from '../geom/Polygon.js';\nimport {getStrideForLayout} from '../geom/SimpleGeometry.js';\nimport VectorLayer from '../layer/Vector.js';\nimport {fromUserCoordinate, getUserProjection} from '../proj.js';\nimport VectorSource from '../source/Vector.js';\nimport {createEditingStyle} from '../style/Style.js';\nimport PointerInteraction from './Pointer.js';\nimport InteractionProperty from './Property.js';\nimport {\n  getCoordinate,\n  getTraceTargetUpdate,\n  getTraceTargets,\n  interpolateCoordinate,\n} from './tracing.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../geom/Geometry.js\").Type} type Geometry type of\n * the geometries being drawn with this instance.\n * @property {number} [clickTolerance=6] The maximum distance in pixels between\n * \"down\" and \"up\" for a \"up\" event to be considered a \"click\" event and\n * actually add a point/vertex to the geometry being drawn.  The default of `6`\n * was chosen for the draw interaction to behave correctly on mouse as well as\n * on touch devices.\n * @property {import(\"../Collection.js\").default<Feature>} [features]\n * Destination collection for the drawn features.\n * @property {VectorSource} [source] Destination source for\n * the drawn features.\n * @property {number} [dragVertexDelay=500] Delay in milliseconds after pointerdown\n * before the current vertex can be dragged to its exact position.\n * @property {number} [snapTolerance=12] Pixel distance for snapping to the\n * drawing finish. Must be greater than `0`.\n * @property {boolean} [stopClick=false] Stop click, singleclick, and\n * doubleclick events from firing during drawing.\n * @property {number} [maxPoints] The number of points that can be drawn before\n * a polygon ring or line string is finished. By default there is no\n * restriction.\n * @property {number} [minPoints] The number of points that must be drawn\n * before a polygon ring or line string can be finished. Default is `3` for\n * polygon rings and `2` for line strings.\n * @property {import(\"../events/condition.js\").Condition} [finishCondition] A function\n * that takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether the drawing can be finished. Not used when drawing\n * POINT or MULTI_POINT geometries.\n * @property {import(\"../style/Style.js\").StyleLike|import(\"../style/flat.js\").FlatStyleLike} [style]\n * Style for sketch features. The draw interaction can have up to three sketch features, depending on the mode.\n * It will always contain a feature with a `Point` geometry that corresponds to the current cursor position.\n * If the mode is `LineString` or `Polygon`, and there is at least one drawn point, it will also contain a feature with\n * a `LineString` geometry that corresponds to the line between the already drawn points and the current cursor position.\n * If the mode is `Polygon`, and there is at least one drawn point, it will also contain a feature with a `Polygon`\n * geometry that corresponds to the polygon between the already drawn points and the current cursor position\n * (note that this polygon has only two points if only one point is drawn).\n * If the mode is `Circle`, and there is one point drawn, it will also contain a feature with a `Circle` geometry whose\n * center is the drawn point and the radius is determined by the distance between the drawn point and the cursor.\n * @property {GeometryFunction} [geometryFunction]\n * Function that is called when a geometry's coordinates are updated.\n * @property {string} [geometryName] Geometry name to use for features created\n * by the draw interaction.\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that\n * takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled.\n * By default {@link module:ol/events/condition.noModifierKeys}, i.e. a click,\n * adds a vertex or deactivates freehand drawing.\n * @property {boolean} [freehand=false] Operate in freehand mode for lines,\n * polygons, and circles.  This makes the interaction always operate in freehand\n * mode and takes precedence over any `freehandCondition` option.\n * @property {import(\"../events/condition.js\").Condition} [freehandCondition]\n * Condition that activates freehand drawing for lines and polygons. This\n * function takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and\n * returns a boolean to indicate whether that event should be handled. The\n * default is {@link module:ol/events/condition.shiftKeyOnly}, meaning that the\n * Shift key activates freehand drawing.\n * @property {boolean|import(\"../events/condition.js\").Condition} [trace=false] Trace a portion of another geometry.\n * Ignored when in freehand mode.\n * @property {VectorSource} [traceSource] Source for features to trace.  If tracing is active and a `traceSource` is\n * not provided, the interaction's `source` will be used.  Tracing requires that the interaction is configured with\n * either a `traceSource` or a `source`.\n * @property {boolean} [wrapX=false] Wrap the world horizontally on the sketch\n * overlay.\n * @property {import(\"../geom/Geometry.js\").GeometryLayout} [geometryLayout='XY'] Layout of the\n * feature geometries created by the draw interaction.\n */\n\n/**\n * Coordinate type when drawing points.\n * @typedef {import(\"../coordinate.js\").Coordinate} PointCoordType\n */\n\n/**\n * @typedef {import('./tracing.js').LineCoordType} LineCoordType\n */\n\n/**\n * Coordinate type when drawing polygons.\n * @typedef {Array<Array<import(\"../coordinate.js\").Coordinate>>} PolyCoordType\n */\n\n/**\n * Types used for drawing coordinates.\n * @typedef {PointCoordType|LineCoordType|PolyCoordType} SketchCoordType\n */\n\n/** @typedef {import('./tracing.js').TraceState} TraceState */\n\n/** @typedef {import('./tracing.js').TraceTarget} TraceTarget */\n\n/**\n * Function that takes an array of coordinates and an optional existing geometry\n * and a projection as arguments, and returns a geometry. The optional existing\n * geometry is the geometry that is returned when the function is called without\n * a second argument.\n * @typedef {function(!SketchCoordType, import(\"../geom/SimpleGeometry.js\").default,\n *     import(\"../proj/Projection.js\").default):\n *     import(\"../geom/SimpleGeometry.js\").default} GeometryFunction\n */\n\n/**\n * @typedef {'Point' | 'LineString' | 'Polygon' | 'Circle'} Mode\n * Draw mode.  This collapses multi-part geometry types with their single-part\n * cousins.\n */\n\n/**\n * @enum {string}\n */\nconst DrawEventType = {\n  /**\n   * Triggered upon feature draw start\n   * @event DrawEvent#drawstart\n   * @api\n   */\n  DRAWSTART: 'drawstart',\n  /**\n   * Triggered upon feature draw end\n   * @event DrawEvent#drawend\n   * @api\n   */\n  DRAWEND: 'drawend',\n  /**\n   * Triggered upon feature draw abortion\n   * @event DrawEvent#drawabort\n   * @api\n   */\n  DRAWABORT: 'drawabort',\n};\n\n/**\n * @classdesc\n * Events emitted by {@link module:ol/interaction/Draw~Draw} instances are\n * instances of this type.\n */\nexport class DrawEvent extends Event {\n  /**\n   * @param {DrawEventType} type Type.\n   * @param {Feature} feature The feature drawn.\n   */\n  constructor(type, feature) {\n    super(type);\n\n    /**\n     * The feature being drawn.\n     * @type {Feature}\n     * @api\n     */\n    this.feature = feature;\n  }\n}\n\n/***\n * @template Return\n * @typedef {import(\"../Observable.js\").OnSignature<import(\"../Observable.js\").EventTypes, import(\"../events/Event.js\").default, Return> &\n *   import(\"../Observable.js\").OnSignature<import(\"../ObjectEventType.js\").Types|\n *     'change:active', import(\"../Object.js\").ObjectEvent, Return> &\n *   import(\"../Observable.js\").OnSignature<'drawabort'|'drawend'|'drawstart', DrawEvent, Return> &\n *   import(\"../Observable.js\").CombinedOnSignature<import(\"../Observable.js\").EventTypes|import(\"../ObjectEventType.js\").Types|\n *     'change:active'|'drawabort'|'drawend'|'drawstart', Return>} DrawOnSignature\n */\n\n/**\n * @classdesc\n * Interaction for drawing feature geometries.\n *\n * @fires DrawEvent\n * @api\n */\nclass Draw extends PointerInteraction {\n  /**\n   * @param {Options} options Options.\n   */\n  constructor(options) {\n    const pointerOptions = /** @type {import(\"./Pointer.js\").Options} */ (\n      options\n    );\n    if (!pointerOptions.stopDown) {\n      pointerOptions.stopDown = FALSE;\n    }\n\n    super(pointerOptions);\n\n    /***\n     * @type {DrawOnSignature<import(\"../events.js\").EventsKey>}\n     */\n    this.on;\n\n    /***\n     * @type {DrawOnSignature<import(\"../events.js\").EventsKey>}\n     */\n    this.once;\n\n    /***\n     * @type {DrawOnSignature<void>}\n     */\n    this.un;\n\n    /**\n     * @type {Options}\n     * @private\n     */\n    this.options_ = options;\n\n    /**\n     * @type {boolean}\n     * @private\n     */\n    this.shouldHandle_ = false;\n\n    /**\n     * @type {import(\"../pixel.js\").Pixel}\n     * @private\n     */\n    this.downPx_ = null;\n\n    /**\n     * @type {ReturnType<typeof setTimeout>}\n     * @private\n     */\n    this.downTimeout_;\n\n    /**\n     * @type {number|undefined}\n     * @private\n     */\n    this.lastDragTime_;\n\n    /**\n     * Pointer type of the last pointermove event\n     * @type {string}\n     * @private\n     */\n    this.pointerType_;\n\n    /**\n     * @type {boolean}\n     * @private\n     */\n    this.freehand_ = false;\n\n    /**\n     * Target source for drawn features.\n     * @type {VectorSource|null}\n     * @private\n     */\n    this.source_ = options.source ? options.source : null;\n\n    /**\n     * Target collection for drawn features.\n     * @type {import(\"../Collection.js\").default<Feature>|null}\n     * @private\n     */\n    this.features_ = options.features ? options.features : null;\n\n    /**\n     * Pixel distance for snapping.\n     * @type {number}\n     * @private\n     */\n    this.snapTolerance_ = options.snapTolerance ? options.snapTolerance : 12;\n\n    /**\n     * Geometry type.\n     * @type {import(\"../geom/Geometry.js\").Type}\n     * @private\n     */\n    this.type_ = /** @type {import(\"../geom/Geometry.js\").Type} */ (\n      options.type\n    );\n\n    /**\n     * Drawing mode (derived from geometry type.\n     * @type {Mode}\n     * @private\n     */\n    this.mode_ = getMode(this.type_);\n\n    /**\n     * Stop click, singleclick, and doubleclick events from firing during drawing.\n     * Default is `false`.\n     * @type {boolean}\n     * @private\n     */\n    this.stopClick_ = !!options.stopClick;\n\n    /**\n     * Ignore the next up event. This is set to `true` when a drag event is encountered,\n     * e.g. when the user pans the map while drawing. In this case, we do not want to bail\n     * out of tracing.\n     * @type {boolean}\n     * @private\n     */\n    this.ignoreNextUpEvent_ = false;\n\n    /**\n     * The number of points that must be drawn before a polygon ring or line\n     * string can be finished.  The default is 3 for polygon rings and 2 for\n     * line strings.\n     * @type {number}\n     * @private\n     */\n    this.minPoints_ = options.minPoints\n      ? options.minPoints\n      : this.mode_ === 'Polygon'\n        ? 3\n        : 2;\n\n    /**\n     * The number of points that can be drawn before a polygon ring or line string\n     * is finished. The default is no restriction.\n     * @type {number}\n     * @private\n     */\n    this.maxPoints_ =\n      this.mode_ === 'Circle'\n        ? 2\n        : options.maxPoints\n          ? options.maxPoints\n          : Infinity;\n\n    /**\n     * A function to decide if a potential finish coordinate is permissible\n     * @private\n     * @type {import(\"../events/condition.js\").Condition}\n     */\n    this.finishCondition_ = options.finishCondition\n      ? options.finishCondition\n      : TRUE;\n\n    /**\n     * @private\n     * @type {import(\"../geom/Geometry.js\").GeometryLayout}\n     */\n    this.geometryLayout_ = options.geometryLayout\n      ? options.geometryLayout\n      : 'XY';\n\n    let geometryFunction = options.geometryFunction;\n    if (!geometryFunction) {\n      const mode = this.mode_;\n      if (mode === 'Circle') {\n        /**\n         * @param {!LineCoordType} coordinates The coordinates.\n         * @param {import(\"../geom/SimpleGeometry.js\").default|undefined} geometry Optional geometry.\n         * @param {import(\"../proj/Projection.js\").default} projection The view projection.\n         * @return {import(\"../geom/SimpleGeometry.js\").default} A geometry.\n         */\n        geometryFunction = (coordinates, geometry, projection) => {\n          const circle = geometry\n            ? /** @type {Circle} */ (geometry)\n            : new Circle([NaN, NaN]);\n          const center = fromUserCoordinate(coordinates[0], projection);\n          const squaredLength = squaredCoordinateDistance(\n            center,\n            fromUserCoordinate(coordinates[coordinates.length - 1], projection),\n          );\n          circle.setCenterAndRadius(\n            center,\n            Math.sqrt(squaredLength),\n            this.geometryLayout_,\n          );\n          const userProjection = getUserProjection();\n          if (userProjection) {\n            circle.transform(projection, userProjection);\n          }\n          return circle;\n        };\n      } else {\n        let Constructor;\n        if (mode === 'Point') {\n          Constructor = Point;\n        } else if (mode === 'LineString') {\n          Constructor = LineString;\n        } else if (mode === 'Polygon') {\n          Constructor = Polygon;\n        }\n        /**\n         * @param {!LineCoordType} coordinates The coordinates.\n         * @param {import(\"../geom/SimpleGeometry.js\").default|undefined} geometry Optional geometry.\n         * @param {import(\"../proj/Projection.js\").default} projection The view projection.\n         * @return {import(\"../geom/SimpleGeometry.js\").default} A geometry.\n         */\n        geometryFunction = (coordinates, geometry, projection) => {\n          if (geometry) {\n            if (mode === 'Polygon') {\n              if (coordinates[0].length) {\n                // Add a closing coordinate to match the first\n                geometry.setCoordinates(\n                  [coordinates[0].concat([coordinates[0][0]])],\n                  this.geometryLayout_,\n                );\n              } else {\n                geometry.setCoordinates([], this.geometryLayout_);\n              }\n            } else {\n              geometry.setCoordinates(coordinates, this.geometryLayout_);\n            }\n          } else {\n            geometry = new Constructor(coordinates, this.geometryLayout_);\n          }\n          return geometry;\n        };\n      }\n    }\n\n    /**\n     * @type {GeometryFunction}\n     * @private\n     */\n    this.geometryFunction_ = geometryFunction;\n\n    /**\n     * @type {number}\n     * @private\n     */\n    this.dragVertexDelay_ =\n      options.dragVertexDelay !== undefined ? options.dragVertexDelay : 500;\n\n    /**\n     * Finish coordinate for the feature (first point for polygons, last point for\n     * linestrings).\n     * @type {import(\"../coordinate.js\").Coordinate}\n     * @private\n     */\n    this.finishCoordinate_ = null;\n\n    /**\n     * Sketch feature.\n     * @type {Feature<import('../geom/SimpleGeometry.js').default>}\n     * @private\n     */\n    this.sketchFeature_ = null;\n\n    /**\n     * Sketch point.\n     * @type {Feature<Point>}\n     * @private\n     */\n    this.sketchPoint_ = null;\n\n    /**\n     * Sketch coordinates. Used when drawing a line or polygon.\n     * @type {SketchCoordType}\n     * @private\n     */\n    this.sketchCoords_ = null;\n\n    /**\n     * Sketch line. Used when drawing polygon.\n     * @type {Feature<LineString>}\n     * @private\n     */\n    this.sketchLine_ = null;\n\n    /**\n     * Sketch line coordinates. Used when drawing a polygon or circle.\n     * @type {LineCoordType}\n     * @private\n     */\n    this.sketchLineCoords_ = null;\n\n    /**\n     * Squared tolerance for handling up events.  If the squared distance\n     * between a down and up event is greater than this tolerance, up events\n     * will not be handled.\n     * @type {number}\n     * @private\n     */\n    this.squaredClickTolerance_ = options.clickTolerance\n      ? options.clickTolerance * options.clickTolerance\n      : 36;\n\n    /**\n     * Draw overlay where our sketch features are drawn.\n     * @type {VectorLayer}\n     * @private\n     */\n    this.overlay_ = new VectorLayer({\n      source: new VectorSource({\n        useSpatialIndex: false,\n        wrapX: options.wrapX ? options.wrapX : false,\n      }),\n      style: options.style ? options.style : getDefaultStyleFunction(),\n      updateWhileInteracting: true,\n    });\n\n    /**\n     * Name of the geometry attribute for newly created features.\n     * @type {string|undefined}\n     * @private\n     */\n    this.geometryName_ = options.geometryName;\n\n    /**\n     * @private\n     * @type {import(\"../events/condition.js\").Condition}\n     */\n    this.condition_ = options.condition ? options.condition : noModifierKeys;\n\n    /**\n     * @private\n     * @type {import(\"../events/condition.js\").Condition}\n     */\n    this.freehandCondition_;\n    if (options.freehand) {\n      this.freehandCondition_ = always;\n    } else {\n      this.freehandCondition_ = options.freehandCondition\n        ? options.freehandCondition\n        : shiftKeyOnly;\n    }\n\n    /**\n     * @type {import(\"../events/condition.js\").Condition}\n     * @private\n     */\n    this.traceCondition_;\n    this.setTrace(options.trace || false);\n\n    /**\n     * @type {TraceState}\n     * @private\n     */\n    this.traceState_ = {active: false};\n\n    /**\n     * @type {VectorSource|null}\n     * @private\n     */\n    this.traceSource_ = options.traceSource || options.source || null;\n\n    this.addChangeListener(InteractionProperty.ACTIVE, this.updateState_);\n  }\n\n  /**\n   * Toggle tracing mode or set a tracing condition.\n   *\n   * @param {boolean|import(\"../events/condition.js\").Condition} trace A boolean to toggle tracing mode or an event\n   *     condition that will be checked when a feature is clicked to determine if tracing should be active.\n   */\n  setTrace(trace) {\n    let condition;\n    if (!trace) {\n      condition = never;\n    } else if (trace === true) {\n      condition = always;\n    } else {\n      condition = trace;\n    }\n    this.traceCondition_ = condition;\n  }\n\n  /**\n   * Remove the interaction from its current map and attach it to the new map.\n   * Subclasses may set up event handlers to get notified about changes to\n   * the map here.\n   * @param {import(\"../Map.js\").default} map Map.\n   * @override\n   */\n  setMap(map) {\n    super.setMap(map);\n    this.updateState_();\n  }\n\n  /**\n   * Set whether the drawing is done in freehand mode.\n   *\n   * @param {boolean} freehand Freehand drawing.\n   * @api\n   */\n  setFreehand(freehand) {\n    this.freehand_ = freehand;\n    if (this.freehand_) {\n      this.freehandCondition_ = always;\n    } else {\n      this.freehandCondition_ =\n        this.options_ && this.options_.freehandCondition\n          ? this.options_.freehandCondition\n          : shiftKeyOnly;\n    }\n  }\n\n  /**\n   * Get the overlay layer that this interaction renders sketch features to.\n   * @return {VectorLayer} Overlay layer.\n   * @api\n   */\n  getOverlay() {\n    return this.overlay_;\n  }\n\n  /**\n   * Get if this interaction is in freehand mode.\n   * @return {boolean} Freehand drawing.\n   * @api\n   */\n  getFreehand() {\n    return this.freehand_;\n  }\n\n  /**\n   * Handles the {@link module:ol/MapBrowserEvent~MapBrowserEvent map browser event} and may actually draw or finish the drawing.\n   * @param {import(\"../MapBrowserEvent.js\").default<PointerEvent>} event Map browser event.\n   * @return {boolean} `false` to stop event propagation.\n   * @api\n   * @override\n   */\n  handleEvent(event) {\n    if (event.originalEvent.type === EventType.CONTEXTMENU) {\n      // Avoid context menu for long taps when drawing on mobile\n      event.originalEvent.preventDefault();\n    }\n    this.freehand_ = this.mode_ !== 'Point' && this.freehandCondition_(event);\n    let move = event.type === MapBrowserEventType.POINTERMOVE;\n    let pass = true;\n    if (\n      !this.freehand_ &&\n      this.lastDragTime_ &&\n      event.type === MapBrowserEventType.POINTERDRAG\n    ) {\n      const now = Date.now();\n      if (now - this.lastDragTime_ >= this.dragVertexDelay_) {\n        this.downPx_ = event.pixel;\n        this.shouldHandle_ = !this.freehand_;\n        move = true;\n      } else {\n        this.lastDragTime_ = undefined;\n      }\n      if (this.shouldHandle_ && this.downTimeout_ !== undefined) {\n        clearTimeout(this.downTimeout_);\n        this.downTimeout_ = undefined;\n      }\n    }\n    if (\n      this.freehand_ &&\n      event.type === MapBrowserEventType.POINTERDRAG &&\n      this.sketchFeature_ !== null\n    ) {\n      this.addToDrawing_(event.coordinate);\n      pass = false;\n    } else if (\n      this.freehand_ &&\n      event.type === MapBrowserEventType.POINTERDOWN\n    ) {\n      pass = false;\n    } else if (move && this.getPointerCount() < 2) {\n      pass = event.type === MapBrowserEventType.POINTERMOVE;\n      if (pass && this.freehand_) {\n        this.handlePointerMove_(event);\n        if (this.shouldHandle_) {\n          // Avoid page scrolling when freehand drawing on mobile\n          event.originalEvent.preventDefault();\n        }\n      } else if (\n        event.originalEvent.pointerType === 'mouse' ||\n        (event.type === MapBrowserEventType.POINTERDRAG &&\n          this.downTimeout_ === undefined)\n      ) {\n        this.handlePointerMove_(event);\n      }\n    } else if (event.type === MapBrowserEventType.DBLCLICK) {\n      pass = false;\n    }\n\n    return super.handleEvent(event) && pass;\n  }\n\n  /**\n   * Handle pointer down events.\n   * @param {import(\"../MapBrowserEvent.js\").default<PointerEvent>} event Event.\n   * @return {boolean} If the event was consumed.\n   * @override\n   */\n  handleDownEvent(event) {\n    this.shouldHandle_ = !this.freehand_;\n\n    if (this.freehand_) {\n      this.downPx_ = event.pixel;\n      if (!this.finishCoordinate_) {\n        this.startDrawing_(event.coordinate);\n      }\n      return true;\n    }\n\n    if (!this.condition_(event)) {\n      this.lastDragTime_ = undefined;\n      return false;\n    }\n\n    this.lastDragTime_ = Date.now();\n    this.downTimeout_ = setTimeout(() => {\n      this.handlePointerMove_(\n        new MapBrowserEvent(\n          MapBrowserEventType.POINTERMOVE,\n          event.map,\n          event.originalEvent,\n          false,\n          event.frameState,\n        ),\n      );\n    }, this.dragVertexDelay_);\n    this.downPx_ = event.pixel;\n    return true;\n  }\n\n  /**\n   * @private\n   */\n  deactivateTrace_() {\n    this.traceState_ = {active: false};\n  }\n\n  /**\n   * Activate or deactivate trace state based on a browser event.\n   * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n   * @private\n   */\n  toggleTraceState_(event) {\n    if (!this.traceSource_ || !this.traceCondition_(event)) {\n      return;\n    }\n\n    if (this.traceState_.active) {\n      this.deactivateTrace_();\n      return;\n    }\n\n    const map = this.getMap();\n    const lowerLeft = map.getCoordinateFromPixel([\n      event.pixel[0] - this.snapTolerance_,\n      event.pixel[1] + this.snapTolerance_,\n    ]);\n    const upperRight = map.getCoordinateFromPixel([\n      event.pixel[0] + this.snapTolerance_,\n      event.pixel[1] - this.snapTolerance_,\n    ]);\n    const extent = boundingExtent([lowerLeft, upperRight]);\n    const features = this.traceSource_.getFeaturesInExtent(extent);\n    if (features.length === 0) {\n      return;\n    }\n\n    const targets = getTraceTargets(event.coordinate, features);\n    if (targets.length) {\n      this.traceState_ = {\n        active: true,\n        startCoord: event.coordinate.slice(),\n        targets: targets,\n        targetIndex: -1,\n      };\n    }\n  }\n\n  /**\n   * @param {TraceTarget} target The trace target.\n   * @param {number} endIndex The new end index of the trace.\n   * @private\n   */\n  addOrRemoveTracedCoordinates_(target, endIndex) {\n    // three cases to handle:\n    //  1. traced in the same direction and points need adding\n    //  2. traced in the same direction and points need removing\n    //  3. traced in a new direction\n    const previouslyForward = target.startIndex <= target.endIndex;\n    const currentlyForward = target.startIndex <= endIndex;\n    if (previouslyForward === currentlyForward) {\n      // same direction\n      if (\n        (previouslyForward && endIndex > target.endIndex) ||\n        (!previouslyForward && endIndex < target.endIndex)\n      ) {\n        // case 1 - add new points\n        this.addTracedCoordinates_(target, target.endIndex, endIndex);\n      } else if (\n        (previouslyForward && endIndex < target.endIndex) ||\n        (!previouslyForward && endIndex > target.endIndex)\n      ) {\n        // case 2 - remove old points\n        this.removeTracedCoordinates_(endIndex, target.endIndex);\n      }\n    } else {\n      // case 3 - remove old points, add new points\n      this.removeTracedCoordinates_(target.startIndex, target.endIndex);\n      this.addTracedCoordinates_(target, target.startIndex, endIndex);\n    }\n  }\n\n  /**\n   * @param {number} fromIndex The start index.\n   * @param {number} toIndex The end index.\n   * @private\n   */\n  removeTracedCoordinates_(fromIndex, toIndex) {\n    if (fromIndex === toIndex) {\n      return;\n    }\n\n    let remove = 0;\n    if (fromIndex < toIndex) {\n      const start = Math.ceil(fromIndex);\n      let end = Math.floor(toIndex);\n      if (end === toIndex) {\n        end -= 1;\n      }\n      remove = end - start + 1;\n    } else {\n      const start = Math.floor(fromIndex);\n      let end = Math.ceil(toIndex);\n      if (end === toIndex) {\n        end += 1;\n      }\n      remove = start - end + 1;\n    }\n\n    if (remove > 0) {\n      this.removeLastPoints_(remove);\n    }\n  }\n\n  /**\n   * @param {TraceTarget} target The trace target.\n   * @param {number} fromIndex The start index.\n   * @param {number} toIndex The end index.\n   * @private\n   */\n  addTracedCoordinates_(target, fromIndex, toIndex) {\n    if (fromIndex === toIndex) {\n      return;\n    }\n\n    const coordinates = [];\n    if (fromIndex < toIndex) {\n      // forward trace\n      const start = Math.ceil(fromIndex);\n      let end = Math.floor(toIndex);\n      if (end === toIndex) {\n        // if end is snapped to a vertex, it will be added later\n        end -= 1;\n      }\n      for (let i = start; i <= end; ++i) {\n        coordinates.push(getCoordinate(target.coordinates, i));\n      }\n    } else {\n      // reverse trace\n      const start = Math.floor(fromIndex);\n      let end = Math.ceil(toIndex);\n      if (end === toIndex) {\n        end += 1;\n      }\n      for (let i = start; i >= end; --i) {\n        coordinates.push(getCoordinate(target.coordinates, i));\n      }\n    }\n    if (coordinates.length) {\n      this.appendCoordinates(coordinates);\n    }\n  }\n\n  /**\n   * Update the trace.\n   * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n   * @private\n   */\n  updateTrace_(event) {\n    const traceState = this.traceState_;\n    if (!traceState.active) {\n      return;\n    }\n\n    if (traceState.targetIndex === -1) {\n      // check if we are ready to pick a target\n      const startPx = event.map.getPixelFromCoordinate(traceState.startCoord);\n      if (distance(startPx, event.pixel) < this.snapTolerance_) {\n        return;\n      }\n    }\n\n    const updatedTraceTarget = getTraceTargetUpdate(\n      event.coordinate,\n      traceState,\n      this.getMap(),\n      this.snapTolerance_,\n    );\n\n    if (traceState.targetIndex !== updatedTraceTarget.index) {\n      // target changed\n      if (traceState.targetIndex !== -1) {\n        // remove points added during previous trace\n        const oldTarget = traceState.targets[traceState.targetIndex];\n        this.removeTracedCoordinates_(oldTarget.startIndex, oldTarget.endIndex);\n      }\n      // add points for the new target\n      const newTarget = traceState.targets[updatedTraceTarget.index];\n      this.addTracedCoordinates_(\n        newTarget,\n        newTarget.startIndex,\n        updatedTraceTarget.endIndex,\n      );\n    } else {\n      // target stayed the same\n      const target = traceState.targets[traceState.targetIndex];\n      this.addOrRemoveTracedCoordinates_(target, updatedTraceTarget.endIndex);\n    }\n\n    // modify the state with updated info\n    traceState.targetIndex = updatedTraceTarget.index;\n    const target = traceState.targets[traceState.targetIndex];\n    target.endIndex = updatedTraceTarget.endIndex;\n\n    // update event coordinate and pixel to match end point of final segment\n    const coordinate = interpolateCoordinate(\n      target.coordinates,\n      target.endIndex,\n    );\n    const pixel = this.getMap().getPixelFromCoordinate(coordinate);\n    event.coordinate = coordinate;\n    event.pixel = [Math.round(pixel[0]), Math.round(pixel[1])];\n  }\n\n  /**\n   * Handle drag events.\n   * @param {import(\"../MapBrowserEvent.js\").default<PointerEvent>} event Event.\n   * @override\n   */\n  handleDragEvent(event) {\n    this.ignoreNextUpEvent_ = true;\n    super.handleDragEvent(event);\n  }\n\n  /**\n   * Handle pointer up events.\n   * @param {import(\"../MapBrowserEvent.js\").default<PointerEvent>} event Event.\n   * @return {boolean} If the event was consumed.\n   * @override\n   */\n  handleUpEvent(event) {\n    let pass = true;\n\n    if (this.getPointerCount() === 0) {\n      if (this.downTimeout_) {\n        clearTimeout(this.downTimeout_);\n        this.downTimeout_ = undefined;\n      }\n\n      this.handlePointerMove_(event);\n      const tracing = this.traceState_.active;\n      if (!this.ignoreNextUpEvent_) {\n        this.toggleTraceState_(event);\n      }\n\n      if (this.shouldHandle_) {\n        const startingToDraw = !this.finishCoordinate_;\n        if (startingToDraw) {\n          this.startDrawing_(event.coordinate);\n        }\n        if (!startingToDraw && this.freehand_) {\n          this.finishDrawing();\n        } else if (\n          !this.freehand_ &&\n          (!startingToDraw || this.mode_ === 'Point')\n        ) {\n          if (this.atFinish_(event.pixel, tracing)) {\n            if (this.finishCondition_(event)) {\n              this.finishDrawing();\n            }\n          } else {\n            this.addToDrawing_(event.coordinate);\n          }\n        }\n        pass = false;\n      } else if (this.freehand_) {\n        this.abortDrawing();\n      }\n    }\n    this.ignoreNextUpEvent_ = false;\n\n    if (!pass && this.stopClick_) {\n      event.preventDefault();\n    }\n    return pass;\n  }\n\n  /**\n   * Handle move events.\n   * @param {import(\"../MapBrowserEvent.js\").default<PointerEvent>} event A move event.\n   * @private\n   */\n  handlePointerMove_(event) {\n    this.pointerType_ = event.originalEvent.pointerType;\n    if (\n      this.downPx_ &&\n      ((!this.freehand_ && this.shouldHandle_) ||\n        (this.freehand_ && !this.shouldHandle_))\n    ) {\n      const downPx = this.downPx_;\n      const clickPx = event.pixel;\n      const dx = downPx[0] - clickPx[0];\n      const dy = downPx[1] - clickPx[1];\n      const squaredDistance = dx * dx + dy * dy;\n      this.shouldHandle_ = this.freehand_\n        ? squaredDistance > this.squaredClickTolerance_\n        : squaredDistance <= this.squaredClickTolerance_;\n      if (!this.shouldHandle_) {\n        return;\n      }\n    }\n\n    if (!this.finishCoordinate_) {\n      this.createOrUpdateSketchPoint_(event.coordinate.slice());\n      return;\n    }\n\n    this.updateTrace_(event);\n    this.modifyDrawing_(event.coordinate);\n  }\n\n  /**\n   * Determine if an event is within the snapping tolerance of the start coord.\n   * @param {import(\"../pixel.js\").Pixel} pixel Pixel.\n   * @param {boolean} [tracing] Drawing in trace mode (only stop if at the starting point).\n   * @return {boolean} The event is within the snapping tolerance of the start.\n   * @private\n   */\n  atFinish_(pixel, tracing) {\n    let at = false;\n    if (this.sketchFeature_) {\n      let potentiallyDone = false;\n      let potentiallyFinishCoordinates = [this.finishCoordinate_];\n      const mode = this.mode_;\n      if (mode === 'Point') {\n        at = true;\n      } else if (mode === 'Circle') {\n        at = this.sketchCoords_.length === 2;\n      } else if (mode === 'LineString') {\n        potentiallyDone =\n          !tracing && this.sketchCoords_.length > this.minPoints_;\n      } else if (mode === 'Polygon') {\n        const sketchCoords = /** @type {PolyCoordType} */ (this.sketchCoords_);\n        potentiallyDone = sketchCoords[0].length > this.minPoints_;\n        potentiallyFinishCoordinates = [\n          sketchCoords[0][0],\n          sketchCoords[0][sketchCoords[0].length - 2],\n        ];\n        if (tracing) {\n          potentiallyFinishCoordinates = [sketchCoords[0][0]];\n        } else {\n          potentiallyFinishCoordinates = [\n            sketchCoords[0][0],\n            sketchCoords[0][sketchCoords[0].length - 2],\n          ];\n        }\n      }\n      if (potentiallyDone) {\n        const map = this.getMap();\n        for (let i = 0, ii = potentiallyFinishCoordinates.length; i < ii; i++) {\n          const finishCoordinate = potentiallyFinishCoordinates[i];\n          const finishPixel = map.getPixelFromCoordinate(finishCoordinate);\n          const dx = pixel[0] - finishPixel[0];\n          const dy = pixel[1] - finishPixel[1];\n          const snapTolerance = this.freehand_ ? 1 : this.snapTolerance_;\n          at = Math.sqrt(dx * dx + dy * dy) <= snapTolerance;\n          if (at) {\n            this.finishCoordinate_ = finishCoordinate;\n            break;\n          }\n        }\n      }\n    }\n    return at;\n  }\n\n  /**\n   * @param {import(\"../coordinate.js\").Coordinate} coordinates Coordinate.\n   * @private\n   */\n  createOrUpdateSketchPoint_(coordinates) {\n    if (!this.sketchPoint_) {\n      this.sketchPoint_ = new Feature(new Point(coordinates));\n      this.updateSketchFeatures_();\n    } else {\n      const sketchPointGeom = this.sketchPoint_.getGeometry();\n      sketchPointGeom.setCoordinates(coordinates);\n    }\n  }\n\n  /**\n   * @param {import(\"../geom/Polygon.js\").default} geometry Polygon geometry.\n   * @private\n   */\n  createOrUpdateCustomSketchLine_(geometry) {\n    if (!this.sketchLine_) {\n      this.sketchLine_ = new Feature();\n    }\n    const ring = geometry.getLinearRing(0);\n    let sketchLineGeom = this.sketchLine_.getGeometry();\n    if (!sketchLineGeom) {\n      sketchLineGeom = new LineString(\n        ring.getFlatCoordinates(),\n        ring.getLayout(),\n      );\n      this.sketchLine_.setGeometry(sketchLineGeom);\n    } else {\n      sketchLineGeom.setFlatCoordinates(\n        ring.getLayout(),\n        ring.getFlatCoordinates(),\n      );\n      sketchLineGeom.changed();\n    }\n  }\n\n  /**\n   * Start the drawing.\n   * @param {import(\"../coordinate.js\").Coordinate} start Start coordinate.\n   * @private\n   */\n  startDrawing_(start) {\n    const projection = this.getMap().getView().getProjection();\n    const stride = getStrideForLayout(this.geometryLayout_);\n    while (start.length < stride) {\n      start.push(0);\n    }\n    this.finishCoordinate_ = start;\n    if (this.mode_ === 'Point') {\n      this.sketchCoords_ = start.slice();\n    } else if (this.mode_ === 'Polygon') {\n      this.sketchCoords_ = [[start.slice(), start.slice()]];\n      this.sketchLineCoords_ = this.sketchCoords_[0];\n    } else {\n      this.sketchCoords_ = [start.slice(), start.slice()];\n    }\n    if (this.sketchLineCoords_) {\n      this.sketchLine_ = new Feature(new LineString(this.sketchLineCoords_));\n    }\n    const geometry = this.geometryFunction_(\n      this.sketchCoords_,\n      undefined,\n      projection,\n    );\n    this.sketchFeature_ = new Feature();\n    if (this.geometryName_) {\n      this.sketchFeature_.setGeometryName(this.geometryName_);\n    }\n    this.sketchFeature_.setGeometry(geometry);\n    this.updateSketchFeatures_();\n    this.dispatchEvent(\n      new DrawEvent(DrawEventType.DRAWSTART, this.sketchFeature_),\n    );\n  }\n\n  /**\n   * Modify the drawing.\n   * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n   * @private\n   */\n  modifyDrawing_(coordinate) {\n    const map = this.getMap();\n    const geometry = this.sketchFeature_.getGeometry();\n    const projection = map.getView().getProjection();\n    const stride = getStrideForLayout(this.geometryLayout_);\n    let coordinates, last;\n    while (coordinate.length < stride) {\n      coordinate.push(0);\n    }\n    if (this.mode_ === 'Point') {\n      last = this.sketchCoords_;\n    } else if (this.mode_ === 'Polygon') {\n      coordinates = /** @type {PolyCoordType} */ (this.sketchCoords_)[0];\n      last = coordinates[coordinates.length - 1];\n      if (this.atFinish_(map.getPixelFromCoordinate(coordinate))) {\n        // snap to finish\n        coordinate = this.finishCoordinate_.slice();\n      }\n    } else {\n      coordinates = this.sketchCoords_;\n      last = coordinates[coordinates.length - 1];\n    }\n    last[0] = coordinate[0];\n    last[1] = coordinate[1];\n    this.geometryFunction_(\n      /** @type {!LineCoordType} */ (this.sketchCoords_),\n      geometry,\n      projection,\n    );\n    if (this.sketchPoint_) {\n      const sketchPointGeom = this.sketchPoint_.getGeometry();\n      sketchPointGeom.setCoordinates(coordinate);\n    }\n    if (geometry.getType() === 'Polygon' && this.mode_ !== 'Polygon') {\n      this.createOrUpdateCustomSketchLine_(/** @type {Polygon} */ (geometry));\n    } else if (this.sketchLineCoords_) {\n      const sketchLineGeom = this.sketchLine_.getGeometry();\n      sketchLineGeom.setCoordinates(this.sketchLineCoords_);\n    }\n    this.updateSketchFeatures_();\n  }\n\n  /**\n   * Add a new coordinate to the drawing.\n   * @param {!PointCoordType} coordinate Coordinate\n   * @return {Feature<import(\"../geom/SimpleGeometry.js\").default>} The sketch feature.\n   * @private\n   */\n  addToDrawing_(coordinate) {\n    const geometry = this.sketchFeature_.getGeometry();\n    const projection = this.getMap().getView().getProjection();\n    let done;\n    let coordinates;\n    const mode = this.mode_;\n    if (mode === 'LineString' || mode === 'Circle') {\n      this.finishCoordinate_ = coordinate.slice();\n      coordinates = /** @type {LineCoordType} */ (this.sketchCoords_);\n      if (coordinates.length >= this.maxPoints_) {\n        if (this.freehand_) {\n          coordinates.pop();\n        } else {\n          done = true;\n        }\n      }\n      coordinates.push(coordinate.slice());\n      this.geometryFunction_(coordinates, geometry, projection);\n    } else if (mode === 'Polygon') {\n      coordinates = /** @type {PolyCoordType} */ (this.sketchCoords_)[0];\n      if (coordinates.length >= this.maxPoints_) {\n        if (this.freehand_) {\n          coordinates.pop();\n        } else {\n          done = true;\n        }\n      }\n      coordinates.push(coordinate.slice());\n      if (done) {\n        this.finishCoordinate_ = coordinates[0];\n      }\n      this.geometryFunction_(this.sketchCoords_, geometry, projection);\n    }\n    this.createOrUpdateSketchPoint_(coordinate.slice());\n    this.updateSketchFeatures_();\n    if (done) {\n      return this.finishDrawing();\n    }\n    return this.sketchFeature_;\n  }\n\n  /**\n   * @param {number} n The number of points to remove.\n   */\n  removeLastPoints_(n) {\n    if (!this.sketchFeature_) {\n      return;\n    }\n    const geometry = this.sketchFeature_.getGeometry();\n    const projection = this.getMap().getView().getProjection();\n    const mode = this.mode_;\n    for (let i = 0; i < n; ++i) {\n      let coordinates;\n      if (mode === 'LineString' || mode === 'Circle') {\n        coordinates = /** @type {LineCoordType} */ (this.sketchCoords_);\n        coordinates.splice(-2, 1);\n        if (coordinates.length >= 2) {\n          this.finishCoordinate_ = coordinates[coordinates.length - 2].slice();\n          const finishCoordinate = this.finishCoordinate_.slice();\n          coordinates[coordinates.length - 1] = finishCoordinate;\n          this.createOrUpdateSketchPoint_(finishCoordinate);\n        }\n        this.geometryFunction_(coordinates, geometry, projection);\n        if (geometry.getType() === 'Polygon' && this.sketchLine_) {\n          this.createOrUpdateCustomSketchLine_(\n            /** @type {Polygon} */ (geometry),\n          );\n        }\n      } else if (mode === 'Polygon') {\n        coordinates = /** @type {PolyCoordType} */ (this.sketchCoords_)[0];\n        coordinates.splice(-2, 1);\n        const sketchLineGeom = this.sketchLine_.getGeometry();\n        if (coordinates.length >= 2) {\n          const finishCoordinate = coordinates[coordinates.length - 2].slice();\n          coordinates[coordinates.length - 1] = finishCoordinate;\n          this.createOrUpdateSketchPoint_(finishCoordinate);\n        }\n        sketchLineGeom.setCoordinates(coordinates);\n        this.geometryFunction_(this.sketchCoords_, geometry, projection);\n      }\n\n      if (coordinates.length === 1) {\n        this.abortDrawing();\n        break;\n      }\n    }\n\n    this.updateSketchFeatures_();\n  }\n\n  /**\n   * Remove last point of the feature currently being drawn. Does not do anything when\n   * drawing POINT or MULTI_POINT geometries.\n   * @api\n   */\n  removeLastPoint() {\n    this.removeLastPoints_(1);\n  }\n\n  /**\n   * Stop drawing and add the sketch feature to the target layer.\n   * The {@link module:ol/interaction/Draw~DrawEventType.DRAWEND} event is\n   * dispatched before inserting the feature.\n   * @return {Feature<import(\"../geom/SimpleGeometry.js\").default>|null} The drawn feature.\n   * @api\n   */\n  finishDrawing() {\n    const sketchFeature = this.abortDrawing_();\n    if (!sketchFeature) {\n      return null;\n    }\n    let coordinates = this.sketchCoords_;\n    const geometry = sketchFeature.getGeometry();\n    const projection = this.getMap().getView().getProjection();\n    if (this.mode_ === 'LineString') {\n      // remove the redundant last point\n      coordinates.pop();\n      this.geometryFunction_(coordinates, geometry, projection);\n    } else if (this.mode_ === 'Polygon') {\n      // remove the redundant last point in ring\n      /** @type {PolyCoordType} */ (coordinates)[0].pop();\n      this.geometryFunction_(coordinates, geometry, projection);\n      coordinates = geometry.getCoordinates();\n    }\n\n    // cast multi-part geometries\n    if (this.type_ === 'MultiPoint') {\n      sketchFeature.setGeometry(\n        new MultiPoint([/** @type {PointCoordType} */ (coordinates)]),\n      );\n    } else if (this.type_ === 'MultiLineString') {\n      sketchFeature.setGeometry(\n        new MultiLineString([/** @type {LineCoordType} */ (coordinates)]),\n      );\n    } else if (this.type_ === 'MultiPolygon') {\n      sketchFeature.setGeometry(\n        new MultiPolygon([/** @type {PolyCoordType} */ (coordinates)]),\n      );\n    }\n\n    // First dispatch event to allow full set up of feature\n    this.dispatchEvent(new DrawEvent(DrawEventType.DRAWEND, sketchFeature));\n\n    // Then insert feature\n    if (this.features_) {\n      this.features_.push(sketchFeature);\n    }\n    if (this.source_) {\n      this.source_.addFeature(sketchFeature);\n    }\n    return sketchFeature;\n  }\n\n  /**\n   * Stop drawing without adding the sketch feature to the target layer.\n   * @return {Feature<import(\"../geom/SimpleGeometry.js\").default>|null} The sketch feature (or null if none).\n   * @private\n   */\n  abortDrawing_() {\n    this.finishCoordinate_ = null;\n    const sketchFeature = this.sketchFeature_;\n    this.sketchFeature_ = null;\n    this.sketchPoint_ = null;\n    this.sketchLine_ = null;\n    this.overlay_.getSource().clear(true);\n    this.deactivateTrace_();\n    return sketchFeature;\n  }\n\n  /**\n   * Stop drawing without adding the sketch feature to the target layer.\n   * @api\n   */\n  abortDrawing() {\n    const sketchFeature = this.abortDrawing_();\n    if (sketchFeature) {\n      this.dispatchEvent(new DrawEvent(DrawEventType.DRAWABORT, sketchFeature));\n    }\n  }\n\n  /**\n   * Append coordinates to the end of the geometry that is currently being drawn.\n   * This can be used when drawing LineStrings or Polygons. Coordinates will\n   * either be appended to the current LineString or the outer ring of the current\n   * Polygon. If no geometry is being drawn, a new one will be created.\n   * @param {!LineCoordType} coordinates Linear coordinates to be appended to\n   * the coordinate array.\n   * @api\n   */\n  appendCoordinates(coordinates) {\n    const mode = this.mode_;\n    const newDrawing = !this.sketchFeature_;\n    if (newDrawing) {\n      this.startDrawing_(coordinates[0]);\n    }\n    /** @type {LineCoordType} */\n    let sketchCoords;\n    if (mode === 'LineString' || mode === 'Circle') {\n      sketchCoords = /** @type {LineCoordType} */ (this.sketchCoords_);\n    } else if (mode === 'Polygon') {\n      sketchCoords =\n        this.sketchCoords_ && this.sketchCoords_.length\n          ? /** @type {PolyCoordType} */ (this.sketchCoords_)[0]\n          : [];\n    } else {\n      return;\n    }\n\n    if (newDrawing) {\n      sketchCoords.shift();\n    }\n\n    // Remove last coordinate from sketch drawing (this coordinate follows cursor position)\n    sketchCoords.pop();\n\n    // Append coordinate list\n    for (let i = 0; i < coordinates.length; i++) {\n      this.addToDrawing_(coordinates[i]);\n    }\n\n    const ending = coordinates[coordinates.length - 1];\n    // Duplicate last coordinate for sketch drawing (cursor position)\n    this.sketchFeature_ = this.addToDrawing_(ending);\n    this.modifyDrawing_(ending);\n  }\n\n  /**\n   * Initiate draw mode by starting from an existing geometry which will\n   * receive new additional points. This only works on features with\n   * `LineString` geometries, where the interaction will extend lines by adding\n   * points to the end of the coordinates array.\n   * This will change the original feature, instead of drawing a copy.\n   *\n   * The function will dispatch a `drawstart` event.\n   *\n   * @param {!Feature<LineString>} feature Feature to be extended.\n   * @api\n   */\n  extend(feature) {\n    const geometry = feature.getGeometry();\n    const lineString = geometry;\n    this.sketchFeature_ = feature;\n    this.sketchCoords_ = lineString.getCoordinates();\n    const last = this.sketchCoords_[this.sketchCoords_.length - 1];\n    this.finishCoordinate_ = last.slice();\n    this.sketchCoords_.push(last.slice());\n    this.sketchPoint_ = new Feature(new Point(last));\n    this.updateSketchFeatures_();\n    this.dispatchEvent(\n      new DrawEvent(DrawEventType.DRAWSTART, this.sketchFeature_),\n    );\n  }\n\n  /**\n   * Redraw the sketch features.\n   * @private\n   */\n  updateSketchFeatures_() {\n    const sketchFeatures = [];\n    if (this.sketchFeature_) {\n      sketchFeatures.push(this.sketchFeature_);\n    }\n    if (this.sketchLine_) {\n      sketchFeatures.push(this.sketchLine_);\n    }\n    if (this.sketchPoint_) {\n      sketchFeatures.push(this.sketchPoint_);\n    }\n    const overlaySource = this.overlay_.getSource();\n    overlaySource.clear(true);\n    overlaySource.addFeatures(sketchFeatures);\n  }\n\n  /**\n   * @private\n   */\n  updateState_() {\n    const map = this.getMap();\n    const active = this.getActive();\n    if (!map || !active) {\n      this.abortDrawing();\n    }\n    this.overlay_.setMap(active ? map : null);\n  }\n}\n\n/**\n * @return {import(\"../style/Style.js\").StyleFunction} Styles.\n */\nfunction getDefaultStyleFunction() {\n  const styles = createEditingStyle();\n  return function (feature, resolution) {\n    return styles[feature.getGeometry().getType()];\n  };\n}\n\n/**\n * Create a `geometryFunction` for `type: 'Circle'` that will create a regular\n * polygon with a user specified number of sides and start angle instead of a\n * {@link import(\"../geom/Circle.js\").Circle} geometry.\n * @param {number} [sides] Number of sides of the regular polygon.\n *     Default is 32.\n * @param {number} [angle] Angle of the first point in counter-clockwise\n *     radians. 0 means East.\n *     Default is the angle defined by the heading from the center of the\n *     regular polygon to the current pointer position.\n * @return {GeometryFunction} Function that draws a polygon.\n * @api\n */\nexport function createRegularPolygon(sides, angle) {\n  return function (coordinates, geometry, projection) {\n    const center = fromUserCoordinate(\n      /** @type {LineCoordType} */ (coordinates)[0],\n      projection,\n    );\n    const end = fromUserCoordinate(\n      /** @type {LineCoordType} */ (coordinates)[coordinates.length - 1],\n      projection,\n    );\n    const radius = Math.sqrt(squaredCoordinateDistance(center, end));\n    geometry = geometry || fromCircle(new Circle(center), sides);\n\n    let internalAngle = angle;\n    if (!angle && angle !== 0) {\n      const x = end[0] - center[0];\n      const y = end[1] - center[1];\n      internalAngle = Math.atan2(y, x);\n    }\n    makeRegular(\n      /** @type {Polygon} */ (geometry),\n      center,\n      radius,\n      internalAngle,\n    );\n\n    const userProjection = getUserProjection();\n    if (userProjection) {\n      geometry.transform(projection, userProjection);\n    }\n    return geometry;\n  };\n}\n\n/**\n * Create a `geometryFunction` that will create a box-shaped polygon (aligned\n * with the coordinate system axes).  Use this with the draw interaction and\n * `type: 'Circle'` to return a box instead of a circle geometry.\n * @return {GeometryFunction} Function that draws a box-shaped polygon.\n * @api\n */\nexport function createBox() {\n  return function (coordinates, geometry, projection) {\n    const extent = boundingExtent(\n      /** @type {LineCoordType} */ ([\n        coordinates[0],\n        coordinates[coordinates.length - 1],\n      ]).map(function (coordinate) {\n        return fromUserCoordinate(coordinate, projection);\n      }),\n    );\n    const boxCoordinates = [\n      [\n        getBottomLeft(extent),\n        getBottomRight(extent),\n        getTopRight(extent),\n        getTopLeft(extent),\n        getBottomLeft(extent),\n      ],\n    ];\n    if (geometry) {\n      geometry.setCoordinates(boxCoordinates);\n    } else {\n      geometry = new Polygon(boxCoordinates);\n    }\n    const userProjection = getUserProjection();\n    if (userProjection) {\n      geometry.transform(projection, userProjection);\n    }\n    return geometry;\n  };\n}\n\n/**\n * Get the drawing mode.  The mode for multi-part geometries is the same as for\n * their single-part cousins.\n * @param {import(\"../geom/Geometry.js\").Type} type Geometry type.\n * @return {Mode} Drawing mode.\n */\nfunction getMode(type) {\n  switch (type) {\n    case 'Point':\n    case 'MultiPoint':\n      return 'Point';\n    case 'LineString':\n    case 'MultiLineString':\n      return 'LineString';\n    case 'Polygon':\n    case 'MultiPolygon':\n      return 'Polygon';\n    case 'Circle':\n      return 'Circle';\n    default:\n      throw new Error('Invalid type: ' + type);\n  }\n}\n\nexport default Draw;\n", "/**\n * @module ol/interaction/Modify\n */\nimport Collection from '../Collection.js';\nimport CollectionEventType from '../CollectionEventType.js';\nimport Feature from '../Feature.js';\nimport MapBrowserEventType from '../MapBrowserEventType.js';\nimport ObjectEventType from '../ObjectEventType.js';\nimport {equals} from '../array.js';\nimport {\n  closestOnSegment,\n  distance as coordinateDistance,\n  equals as coordinatesEqual,\n  squaredDistance as squaredCoordinateDistance,\n  squaredDistanceToSegment,\n} from '../coordinate.js';\nimport Event from '../events/Event.js';\nimport EventType from '../events/EventType.js';\nimport {\n  altKeyOnly,\n  always,\n  never,\n  primaryAction,\n  singleClick,\n} from '../events/condition.js';\nimport {\n  boundingExtent,\n  buffer as bufferExtent,\n  createOrUpdateFromCoordinate as createExtent,\n} from '../extent.js';\nimport Point from '../geom/Point.js';\nimport {fromCircle} from '../geom/Polygon.js';\nimport VectorLayer from '../layer/Vector.js';\nimport {\n  fromUserCoordinate,\n  fromUserExtent,\n  getUserProjection,\n  toUserCoordinate,\n  toUserExtent,\n} from '../proj.js';\nimport VectorSource from '../source/Vector.js';\nimport VectorEventType from '../source/VectorEventType.js';\nimport RBush from '../structs/RBush.js';\nimport {createEditingStyle} from '../style/Style.js';\nimport {getUid} from '../util.js';\nimport PointerInteraction from './Pointer.js';\nimport {\n  getCoordinate,\n  getTraceTargetUpdate,\n  getTraceTargets,\n  interpolateCoordinate,\n} from './tracing.js';\n\n/**\n * The segment index assigned to a circle's center when\n * breaking up a circle into ModifySegmentDataType segments.\n * @type {number}\n */\nconst CIRCLE_CENTER_INDEX = 0;\n\n/**\n * The segment index assigned to a circle's circumference when\n * breaking up a circle into ModifySegmentDataType segments.\n * @type {number}\n */\nconst CIRCLE_CIRCUMFERENCE_INDEX = 1;\n\nconst tempExtent = [0, 0, 0, 0];\nconst tempSegment = [];\n\n/**\n * @enum {string}\n */\nconst ModifyEventType = {\n  /**\n   * Triggered upon feature modification start\n   * @event ModifyEvent#modifystart\n   * @api\n   */\n  MODIFYSTART: 'modifystart',\n  /**\n   * Triggered upon feature modification end\n   * @event ModifyEvent#modifyend\n   * @api\n   */\n  MODIFYEND: 'modifyend',\n};\n\n/**\n * @typedef {Object} SegmentData\n * @property {Array<number>} [depth] Depth.\n * @property {Feature} feature Feature.\n * @property {import(\"../geom/SimpleGeometry.js\").default} geometry Geometry.\n * @property {number} [index] Index.\n * @property {Array<Array<number>>} segment Segment.\n * @property {Array<SegmentData>} [featureSegments] FeatureSegments.\n */\n\n/**\n * A function that takes a {@link module:ol/Feature~Feature} and  returns `true` if\n * the feature may be modified or `false` otherwise.\n * @typedef {function(Feature):boolean} FilterFunction\n */\n\n/**\n * @typedef {[SegmentData, number]} DragSegment\n */\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that\n * takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event will be considered to add or move a\n * vertex to the sketch. Default is\n * {@link module:ol/events/condition.primaryAction}.\n * @property {import(\"../events/condition.js\").Condition} [deleteCondition] A function\n * that takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled. By default,\n * {@link module:ol/events/condition.singleClick} with\n * {@link module:ol/events/condition.altKeyOnly} results in a vertex deletion.\n * This combination is handled by wrapping the two condition checks in a single function:\n * ```js\n * import { altKeyOnly, singleClick } from 'ol/events/condition.js';\n *\n * function (event) {\n *   return altKeyOnly(event) && singleClick(event)\n * }\n * ```\n * @property {import(\"../events/condition.js\").Condition} [insertVertexCondition] A\n * function that takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and\n * returns a boolean to indicate whether a new vertex should be added to the sketch\n * features. Default is {@link module:ol/events/condition.always}.\n * @property {number} [pixelTolerance=10] Pixel tolerance for considering the\n * pointer close enough to a segment or vertex for editing.\n * @property {import(\"../style/Style.js\").StyleLike|import(\"../style/flat.js\").FlatStyleLike} [style]\n * Style used for the modification point or vertex. For linestrings and polygons, this will\n * be the affected vertex, for circles a point along the circle, and for points the actual\n * point. If not configured, the default edit style is used (see {@link module:ol/style/Style~Style}).\n * When using a style function, the point feature passed to the function will have an `existing` property -\n * indicating whether there is an existing vertex underneath or not, a `features`\n * property - an array whose entries are the features that are being modified, and a `geometries`\n * property - an array whose entries are the geometries that are being modified. Both arrays are\n * in the same order. The `geometries` are only useful when modifying geometry collections, where\n * the geometry will be the particular geometry from the collection that is being modified.\n * @property {VectorSource} [source] The vector source with\n * features to modify.  If a vector source is not provided, a feature collection\n * must be provided with the `features` option.\n * @property {boolean|import(\"../layer/BaseVector.js\").default} [hitDetection] When configured, point\n * features will be considered for modification based on their visual appearance, instead of being within\n * the `pixelTolerance` from the pointer location. When a {@link module:ol/layer/BaseVector~BaseVectorLayer} is\n * provided, only the rendered representation of the features on that layer will be considered.\n * @property {Collection<Feature>} [features]\n * The features the interaction works on.  If a feature collection is not\n * provided, a vector source must be provided with the `source` option.\n * @property {FilterFunction} [filter] A function that takes a {@link module:ol/Feature~Feature}\n * and returns `true` if the feature may be modified or `false` otherwise.\n * @property {boolean|import(\"../events/condition.js\").Condition} [trace=false] Trace a portion of another geometry.\n * Tracing starts when two neighboring vertices are dragged onto a trace target, without any other modification in between..\n * @property {VectorSource} [traceSource] Source for features to trace.  If tracing is active and a `traceSource` is\n * not provided, the interaction's `source` will be used.  Tracing requires that the interaction is configured with\n * either a `traceSource` or a `source`.\n * @property {boolean} [wrapX=false] Wrap the world horizontally on the sketch\n * overlay.\n * @property {boolean} [snapToPointer=!hitDetection] The vertex, point or segment being modified snaps to the\n * pointer coordinate when clicked within the `pixelTolerance`.\n * @property {function(import(\"../coordinate.js\").Coordinate, import(\"../coordinate.js\").Coordinate): boolean} [sharedVerticesEqual]\n * A function that takes two coordinates and returns whether they should be\n * considered equal for vertex matching purposes. By default, all coordinate\n * dimensions are compared. This is useful when features have mixed coordinate\n * dimensions (e.g., XY and XYZ) but should still be treated as sharing vertices\n * at the same 2D position.\n */\n\nfunction getCoordinatesArray(coordinates, geometryType, depth) {\n  let coordinatesArray;\n  switch (geometryType) {\n    case 'LineString':\n      coordinatesArray = coordinates;\n      break;\n    case 'MultiLineString':\n    case 'Polygon':\n      coordinatesArray = coordinates[depth[0]];\n      break;\n    case 'MultiPolygon':\n      coordinatesArray = coordinates[depth[1]][depth[0]];\n      break;\n    default:\n    // pass\n  }\n  return coordinatesArray;\n}\n\n/**\n * @classdesc\n * Events emitted by {@link module:ol/interaction/Modify~Modify} instances are\n * instances of this type.\n */\nexport class ModifyEvent extends Event {\n  /**\n   * @param {ModifyEventType} type Type.\n   * @param {Collection<Feature>} features\n   * The features modified.\n   * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent\n   * Associated {@link module:ol/MapBrowserEvent~MapBrowserEvent}.\n   */\n  constructor(type, features, mapBrowserEvent) {\n    super(type);\n\n    /**\n     * The features being modified.\n     * @type {Collection<Feature>}\n     * @api\n     */\n    this.features = features;\n\n    /**\n     * Associated {@link module:ol/MapBrowserEvent~MapBrowserEvent}.\n     * @type {import(\"../MapBrowserEvent.js\").default}\n     * @api\n     */\n    this.mapBrowserEvent = mapBrowserEvent;\n  }\n}\n\n/***\n * @template Return\n * @typedef {import(\"../Observable.js\").OnSignature<import(\"../Observable.js\").EventTypes, import(\"../events/Event.js\").default, Return> &\n *   import(\"../Observable.js\").OnSignature<import(\"../ObjectEventType.js\").Types|\n *     'change:active', import(\"../Object.js\").ObjectEvent, Return> &\n *   import(\"../Observable.js\").OnSignature<'modifyend'|'modifystart', ModifyEvent, Return> &\n *   import(\"../Observable.js\").CombinedOnSignature<import(\"../Observable.js\").EventTypes|import(\"../ObjectEventType.js\").Types|\n *     'change:active'|'modifyend'|'modifystart', Return>} ModifyOnSignature\n */\n\n/**\n * @classdesc\n * Interaction for modifying feature geometries.  To modify features that have\n * been added to an existing source, construct the modify interaction with the\n * `source` option.  If you want to modify features in a collection (for example,\n * the collection used by a select interaction), construct the interaction with\n * the `features` option.  The interaction must be constructed with either a\n * `source` or `features` option.\n *\n * Cartesian distance from the pointer is used to determine the features that\n * will be modified. This means that geometries will only be considered for\n * modification when they are within the configured `pixelTolerance`. For point\n * geometries, the `hitDetection` option can be used to match their visual\n * appearance.\n *\n * By default, the interaction will allow deletion of vertices when the `alt`\n * key is pressed.  To configure the interaction with a different condition\n * for deletion, use the `deleteCondition` option.\n * @fires ModifyEvent\n * @api\n */\nclass Modify extends PointerInteraction {\n  /**\n   * @param {Options} options Options.\n   */\n  constructor(options) {\n    super(/** @type {import(\"./Pointer.js\").Options} */ (options));\n\n    //Maintain a ref to event handlers for later unregistering\n    /** @private */\n    this.handleSourceAdd_ = this.handleSourceAdd_.bind(this);\n\n    /** @private */\n    this.handleSourceRemove_ = this.handleSourceRemove_.bind(this);\n\n    /** @private */\n    this.handleExternalCollectionAdd_ =\n      this.handleExternalCollectionAdd_.bind(this);\n\n    /** @private */\n    this.handleExternalCollectionRemove_ =\n      this.handleExternalCollectionRemove_.bind(this);\n\n    /** @private */\n    this.handleFeatureChange_ = this.handleFeatureChange_.bind(this);\n\n    /***\n     * @type {ModifyOnSignature<import(\"../events.js\").EventsKey>}\n     */\n    this.on;\n\n    /***\n     * @type {ModifyOnSignature<import(\"../events.js\").EventsKey>}\n     */\n    this.once;\n\n    /***\n     * @type {ModifyOnSignature<void>}\n     */\n    this.un;\n\n    /**\n     * @private\n     * @type {import(\"../events/condition.js\").Condition}\n     */\n    this.condition_ = options.condition ? options.condition : primaryAction;\n\n    /**\n     * @private\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Browser event.\n     * @return {boolean} Combined condition result.\n     */\n    this.defaultDeleteCondition_ = function (mapBrowserEvent) {\n      return altKeyOnly(mapBrowserEvent) && singleClick(mapBrowserEvent);\n    };\n\n    /**\n     * @type {import(\"../events/condition.js\").Condition}\n     * @private\n     */\n    this.deleteCondition_ = options.deleteCondition\n      ? options.deleteCondition\n      : this.defaultDeleteCondition_;\n\n    /**\n     * @type {import(\"../events/condition.js\").Condition}\n     * @private\n     */\n    this.insertVertexCondition_ = options.insertVertexCondition\n      ? options.insertVertexCondition\n      : always;\n\n    /**\n     * Editing vertex.\n     * @type {Feature<Point>}\n     * @private\n     */\n    this.vertexFeature_ = null;\n\n    /**\n     * Segments intersecting {@link this.vertexFeature_} by segment uid.\n     * @type {Object<string, boolean>}\n     * @private\n     */\n    this.vertexSegments_ = null;\n\n    /**\n     * @type {import(\"../coordinate.js\").Coordinate}\n     * @private\n     */\n    this.lastCoordinate_ = [0, 0];\n\n    /**\n     * Tracks if the next `singleclick` event should be ignored to prevent\n     * accidental deletion right after vertex creation.\n     * @type {boolean}\n     * @private\n     */\n    this.ignoreNextSingleClick_ = false;\n\n    /**\n     * @type {Collection<Feature>}\n     * @private\n     */\n    this.featuresBeingModified_ = null;\n\n    /**\n     * Segment RTree for each layer\n     * @type {RBush<SegmentData>}\n     * @private\n     */\n    this.rBush_ = new RBush();\n\n    /**\n     * @type {number}\n     * @private\n     */\n    this.pixelTolerance_ =\n      options.pixelTolerance !== undefined ? options.pixelTolerance : 10;\n\n    /**\n     * @type {boolean}\n     * @private\n     */\n    this.snappedToVertex_ = false;\n\n    /**\n     * Indicate whether the interaction is currently changing a feature's\n     * coordinates.\n     * @type {boolean}\n     * @private\n     */\n    this.changingFeature_ = false;\n\n    /**\n     * @type {Array<DragSegment>}\n     * @private\n     */\n    this.dragSegments_ = [];\n\n    /**\n     * Draw overlay where sketch features are drawn.\n     * @type {VectorLayer}\n     * @private\n     */\n    this.overlay_ = new VectorLayer({\n      source: new VectorSource({\n        useSpatialIndex: false,\n        wrapX: !!options.wrapX,\n      }),\n      style: options.style ? options.style : getDefaultStyleFunction(),\n      updateWhileAnimating: true,\n      updateWhileInteracting: true,\n    });\n\n    /**\n     * @const\n     * @private\n     * @type {!Object<string, function(Feature, import(\"../geom/Geometry.js\").default): void>}\n     */\n    this.SEGMENT_WRITERS_ = {\n      Point: this.writePointGeometry_.bind(this),\n      LineString: this.writeLineStringGeometry_.bind(this),\n      LinearRing: this.writeLineStringGeometry_.bind(this),\n      Polygon: this.writePolygonGeometry_.bind(this),\n      MultiPoint: this.writeMultiPointGeometry_.bind(this),\n      MultiLineString: this.writeMultiLineStringGeometry_.bind(this),\n      MultiPolygon: this.writeMultiPolygonGeometry_.bind(this),\n      Circle: this.writeCircleGeometry_.bind(this),\n      GeometryCollection: this.writeGeometryCollectionGeometry_.bind(this),\n    };\n\n    /**\n     * @type {VectorSource}\n     * @private\n     */\n    this.source_ = null;\n\n    /**\n     * @type {VectorSource|null}\n     * @private\n     */\n    this.traceSource_ = options.traceSource || options.source || null;\n\n    /**\n     * @type {import(\"../events/condition.js\").Condition}\n     * @private\n     */\n    this.traceCondition_;\n    this.setTrace(options.trace || false);\n\n    /**\n     * @type {import('./tracing.js').TraceState}\n     * @private\n     */\n    this.traceState_ = {active: false};\n\n    /**\n     * @type {Array<DragSegment>|null}\n     * @private\n     */\n    this.traceSegments_ = null;\n\n    /**\n     * @type {boolean|import(\"../layer/BaseVector.js\").default}\n     * @private\n     */\n    this.hitDetection_ = null;\n\n    /**\n     * Useful for performance optimization\n     * @private\n     * @type boolean\n     */\n    this.filterFunctionWasSupplied_ =\n      options.filter != undefined ? true : false;\n\n    /**\n     * @private\n     * @type {FilterFunction}\n     */\n    this.filter_ = options.filter ? options.filter : () => true;\n\n    /**\n     * @private\n     * @type {function(import(\"../coordinate.js\").Coordinate, import(\"../coordinate.js\").Coordinate): boolean}\n     */\n    this.coordinatesEqual_ = options.sharedVerticesEqual\n      ? options.sharedVerticesEqual\n      : coordinatesEqual;\n\n    if (!(options.features || options.source)) {\n      throw new Error(\n        'The modify interaction requires features collection or a source',\n      );\n    }\n    /** @type {Array<Feature>} */\n    let features;\n    if (options.features) {\n      features = options.features.getArray();\n      //setup listeners on external features collection and features\n      options.features.addEventListener(\n        CollectionEventType.ADD,\n        this.handleExternalCollectionAdd_,\n      );\n      options.features.addEventListener(\n        CollectionEventType.REMOVE,\n        this.handleExternalCollectionRemove_,\n      );\n      //keep ref for unsubscribe on dispose\n      this.featuresCollection_ = options.features;\n    } else if (options.source) {\n      features = options.source.getFeatures();\n      //setup listeners on external source and features\n      options.source.addEventListener(\n        VectorEventType.ADDFEATURE,\n        this.handleSourceAdd_,\n      );\n      options.source.addEventListener(\n        VectorEventType.REMOVEFEATURE,\n        this.handleSourceRemove_,\n      );\n      //keep ref for unsubscribe on dispose\n      this.source_ = options.source;\n    }\n    features.forEach((feature) => {\n      //any modification to the feature requires filter to be re-run\n      feature.addEventListener(EventType.CHANGE, this.handleFeatureChange_);\n      //prop change handler is only to re-run the filter\n      if (this.filterFunctionWasSupplied_) {\n        feature.addEventListener(\n          ObjectEventType.PROPERTYCHANGE,\n          this.handleFeatureChange_,\n        );\n      }\n    });\n\n    if (options.hitDetection) {\n      this.hitDetection_ = options.hitDetection;\n    }\n\n    /**\n     * Internal features array.  When adding or removing features, be sure to use\n     * addFeature_()/removeFeature_() so that the the segment index is adjusted.\n     * @type {Array<Feature>}\n     * @private\n     */\n    this.features_ = [];\n    features\n      .filter(this.filter_)\n      .forEach((feature) => this.addFeature_(feature));\n\n    /**\n     * @type {import(\"../MapBrowserEvent.js\").default}\n     * @private\n     */\n    this.lastPointerEvent_ = null;\n\n    /**\n     * Delta (x, y in map units) between matched rtree vertex and pointer vertex.\n     * @type {Array<number>}\n     * @private\n     */\n    this.delta_ = [0, 0];\n\n    /**\n     * @private\n     */\n    this.snapToPointer_ =\n      options.snapToPointer === undefined\n        ? !this.hitDetection_\n        : options.snapToPointer;\n  }\n\n  /**\n   * Toggle tracing mode or set a tracing condition.\n   *\n   * @param {boolean|import(\"../events/condition.js\").Condition} trace A boolean to toggle tracing mode or an event\n   *     condition that will be checked when a feature is clicked to determine if tracing should be active.\n   */\n  setTrace(trace) {\n    let condition;\n    if (!trace) {\n      condition = never;\n    } else if (trace === true) {\n      condition = always;\n    } else {\n      condition = trace;\n    }\n    this.traceCondition_ = condition;\n  }\n\n  /**\n   * Called when a feature is added to the internal features collection\n   * @param {Feature} feature Feature.\n   * @private\n   */\n  addFeature_(feature) {\n    this.features_.push(feature);\n    const geometry = feature.getGeometry();\n    if (geometry) {\n      const writer = this.SEGMENT_WRITERS_[geometry.getType()];\n      if (writer) {\n        writer(feature, geometry);\n      }\n    }\n    const map = this.getMap();\n    if (map && map.isRendered() && this.getActive()) {\n      this.handlePointerAtPixel_(this.lastCoordinate_);\n    }\n  }\n\n  /**\n   * @param {import(\"../MapBrowserEvent.js\").default} evt Map browser event.\n   * @param {Array<SegmentData>} segments The segments subject to modification.\n   * @private\n   */\n  willModifyFeatures_(evt, segments) {\n    if (!this.featuresBeingModified_) {\n      this.featuresBeingModified_ = new Collection();\n      const features = this.featuresBeingModified_.getArray();\n      for (let i = 0, ii = segments.length; i < ii; ++i) {\n        const feature = segments[i].feature;\n        if (feature && !features.includes(feature)) {\n          this.featuresBeingModified_.push(feature);\n        }\n      }\n      if (this.featuresBeingModified_.getLength() === 0) {\n        this.featuresBeingModified_ = null;\n      } else {\n        this.dispatchEvent(\n          new ModifyEvent(\n            ModifyEventType.MODIFYSTART,\n            this.featuresBeingModified_,\n            evt,\n          ),\n        );\n      }\n    }\n  }\n\n  /**\n   * Removes a feature from the internal features collection and updates internal state\n   * accordingly.\n   * @param {Feature} feature Feature.\n   * @private\n   */\n  removeFeature_(feature) {\n    const itemIndex = this.features_.indexOf(feature);\n    this.features_.splice(itemIndex, 1);\n    this.removeFeatureSegmentData_(feature);\n    // Remove the vertex feature if the collection of candidate features is empty.\n    if (this.vertexFeature_ && this.features_.length === 0) {\n      this.overlay_.getSource().removeFeature(this.vertexFeature_);\n      this.vertexFeature_ = null;\n    }\n  }\n\n  /**\n   * @param {Feature} feature Feature.\n   * @private\n   */\n  removeFeatureSegmentData_(feature) {\n    const rBush = this.rBush_;\n    /** @type {Array<SegmentData>} */\n    const nodesToRemove = [];\n    rBush.forEach(\n      /**\n       * @param {SegmentData} node RTree node.\n       */\n      function (node) {\n        if (feature === node.feature) {\n          nodesToRemove.push(node);\n        }\n      },\n    );\n    for (let i = nodesToRemove.length - 1; i >= 0; --i) {\n      const nodeToRemove = nodesToRemove[i];\n      for (let j = this.dragSegments_.length - 1; j >= 0; --j) {\n        if (this.dragSegments_[j][0] === nodeToRemove) {\n          this.dragSegments_.splice(j, 1);\n        }\n      }\n      rBush.remove(nodeToRemove);\n    }\n  }\n\n  /**\n   * Activate or deactivate the interaction.\n   * @param {boolean} active Active.\n   * @observable\n   * @api\n   * @override\n   */\n  setActive(active) {\n    if (this.vertexFeature_ && !active) {\n      this.overlay_.getSource().removeFeature(this.vertexFeature_);\n      this.vertexFeature_ = null;\n    }\n    super.setActive(active);\n  }\n\n  /**\n   * Remove the interaction from its current map and attach it to the new map.\n   * Subclasses may set up event handlers to get notified about changes to\n   * the map here.\n   * @param {import(\"../Map.js\").default} map Map.\n   * @override\n   */\n  setMap(map) {\n    this.overlay_.setMap(map);\n    super.setMap(map);\n  }\n\n  /**\n   * Get the overlay layer that this interaction renders the modification point or vertex to.\n   * @return {VectorLayer} Overlay layer.\n   * @api\n   */\n  getOverlay() {\n    return this.overlay_;\n  }\n\n  /**\n   * @param {import(\"../source/Vector.js\").VectorSourceEvent} event Event.\n   * @private\n   */\n  handleSourceAdd_(event) {\n    const feature = event.feature;\n    if (feature) {\n      this.externalAddFeatureHandler_(feature);\n    }\n  }\n\n  /**\n   * @param {import(\"../source/Vector.js\").VectorSourceEvent} event Event.\n   * @private\n   */\n  handleSourceRemove_(event) {\n    const feature = event.feature;\n    if (feature) {\n      this.externalRemoveFeatureHandler_(feature);\n    }\n  }\n\n  /**\n   * @param {import(\"../Collection.js\").CollectionEvent} event Event.\n   * @private\n   */\n  handleExternalCollectionAdd_(event) {\n    const feature = event.element;\n    if (feature) {\n      this.externalAddFeatureHandler_(feature);\n    }\n  }\n\n  /**\n   * @param {import(\"../Collection.js\").CollectionEvent} event Event.\n   * @private\n   */\n  handleExternalCollectionRemove_(event) {\n    const feature = event.element;\n    if (feature) {\n      this.externalRemoveFeatureHandler_(feature);\n    }\n  }\n\n  /**\n   * Common handler for event signaling addition of feature to the supplied features source\n   * or collection.\n   * @param {Feature} feature Feature.\n   */\n  externalAddFeatureHandler_(feature) {\n    feature.addEventListener(EventType.CHANGE, this.handleFeatureChange_);\n    //prop change handler is only for reapplying the filter\n    if (this.filterFunctionWasSupplied_) {\n      feature.addEventListener(\n        ObjectEventType.PROPERTYCHANGE,\n        this.handleFeatureChange_,\n      );\n    }\n    if (this.filter_(feature)) {\n      this.addFeature_(feature);\n    }\n  }\n\n  /**\n   * Common handler for event signaling removal of feature from the supplied features source\n   * or collection.\n   * @param {Feature} feature Feature.\n   */\n  externalRemoveFeatureHandler_(feature) {\n    feature.removeEventListener(EventType.CHANGE, this.handleFeatureChange_);\n    if (this.filterFunctionWasSupplied_) {\n      feature.removeEventListener(\n        ObjectEventType.PROPERTYCHANGE,\n        this.handleFeatureChange_,\n      );\n    }\n    this.removeFeature_(feature);\n  }\n\n  /**\n   * Listener for features in external source or features collection.  Ensures the feature filter\n   * is re-run and segment data is updated.\n   * @param {import(\"../events/Event.js\").default | import(\"../Object.js\").ObjectEvent} evt Event.\n   * @private\n   */\n  handleFeatureChange_(evt) {\n    if (!this.changingFeature_) {\n      const feature = /** @type {Feature} */ (evt.target);\n      this.removeFeature_(feature);\n      //safe to remove handler on a feature if there isn't one, but need to apply the filter\n      // before adding the feature.\n      this.filter_(feature) && this.addFeature_(feature);\n    }\n  }\n\n  /**\n   * @param {Feature} feature Feature\n   * @param {Point} geometry Geometry.\n   * @private\n   */\n  writePointGeometry_(feature, geometry) {\n    const coordinates = geometry.getCoordinates();\n\n    /** @type {SegmentData} */\n    const segmentData = {\n      feature: feature,\n      geometry: geometry,\n      segment: [coordinates, coordinates],\n    };\n\n    this.rBush_.insert(geometry.getExtent(), segmentData);\n  }\n\n  /**\n   * @param {Feature} feature Feature\n   * @param {import(\"../geom/MultiPoint.js\").default} geometry Geometry.\n   * @private\n   */\n  writeMultiPointGeometry_(feature, geometry) {\n    const points = geometry.getCoordinates();\n    for (let i = 0, ii = points.length; i < ii; ++i) {\n      const coordinates = points[i];\n\n      /** @type {SegmentData} */\n      const segmentData = {\n        feature: feature,\n        geometry: geometry,\n        depth: [i],\n        index: i,\n        segment: [coordinates, coordinates],\n      };\n\n      this.rBush_.insert(geometry.getExtent(), segmentData);\n    }\n  }\n\n  /**\n   * @param {Feature} feature Feature\n   * @param {import(\"../geom/LineString.js\").default} geometry Geometry.\n   * @private\n   */\n  writeLineStringGeometry_(feature, geometry) {\n    const coordinates = geometry.getCoordinates();\n    for (let i = 0, ii = coordinates.length - 1; i < ii; ++i) {\n      const segment = coordinates.slice(i, i + 2);\n\n      /** @type {SegmentData} */\n      const segmentData = {\n        feature: feature,\n        geometry: geometry,\n        index: i,\n        segment: segment,\n      };\n\n      this.rBush_.insert(boundingExtent(segment), segmentData);\n    }\n  }\n\n  /**\n   * @param {Feature} feature Feature\n   * @param {import(\"../geom/MultiLineString.js\").default} geometry Geometry.\n   * @private\n   */\n  writeMultiLineStringGeometry_(feature, geometry) {\n    const lines = geometry.getCoordinates();\n    for (let j = 0, jj = lines.length; j < jj; ++j) {\n      const coordinates = lines[j];\n      for (let i = 0, ii = coordinates.length - 1; i < ii; ++i) {\n        const segment = coordinates.slice(i, i + 2);\n\n        /** @type {SegmentData} */\n        const segmentData = {\n          feature: feature,\n          geometry: geometry,\n          depth: [j],\n          index: i,\n          segment: segment,\n        };\n\n        this.rBush_.insert(boundingExtent(segment), segmentData);\n      }\n    }\n  }\n\n  /**\n   * @param {Feature} feature Feature\n   * @param {import(\"../geom/Polygon.js\").default} geometry Geometry.\n   * @private\n   */\n  writePolygonGeometry_(feature, geometry) {\n    const rings = geometry.getCoordinates();\n    for (let j = 0, jj = rings.length; j < jj; ++j) {\n      const coordinates = rings[j];\n      for (let i = 0, ii = coordinates.length - 1; i < ii; ++i) {\n        const segment = coordinates.slice(i, i + 2);\n\n        /** @type {SegmentData} */\n        const segmentData = {\n          feature: feature,\n          geometry: geometry,\n          depth: [j],\n          index: i,\n          segment: segment,\n        };\n\n        this.rBush_.insert(boundingExtent(segment), segmentData);\n      }\n    }\n  }\n\n  /**\n   * @param {Feature} feature Feature\n   * @param {import(\"../geom/MultiPolygon.js\").default} geometry Geometry.\n   * @private\n   */\n  writeMultiPolygonGeometry_(feature, geometry) {\n    const polygons = geometry.getCoordinates();\n    for (let k = 0, kk = polygons.length; k < kk; ++k) {\n      const rings = polygons[k];\n      for (let j = 0, jj = rings.length; j < jj; ++j) {\n        const coordinates = rings[j];\n        for (let i = 0, ii = coordinates.length - 1; i < ii; ++i) {\n          const segment = coordinates.slice(i, i + 2);\n\n          /** @type {SegmentData} */\n          const segmentData = {\n            feature: feature,\n            geometry: geometry,\n            depth: [j, k],\n            index: i,\n            segment: segment,\n          };\n\n          this.rBush_.insert(boundingExtent(segment), segmentData);\n        }\n      }\n    }\n  }\n\n  /**\n   * We convert a circle into two segments.  The segment at index\n   * {@link CIRCLE_CENTER_INDEX} is the\n   * circle's center (a point).  The segment at index\n   * {@link CIRCLE_CIRCUMFERENCE_INDEX} is\n   * the circumference, and is not a line segment.\n   *\n   * @param {Feature} feature Feature.\n   * @param {import(\"../geom/Circle.js\").default} geometry Geometry.\n   * @private\n   */\n  writeCircleGeometry_(feature, geometry) {\n    const coordinates = geometry.getCenter();\n\n    /** @type {SegmentData} */\n    const centerSegmentData = {\n      feature: feature,\n      geometry: geometry,\n      index: CIRCLE_CENTER_INDEX,\n      segment: [coordinates, coordinates],\n    };\n\n    /** @type {SegmentData} */\n    const circumferenceSegmentData = {\n      feature: feature,\n      geometry: geometry,\n      index: CIRCLE_CIRCUMFERENCE_INDEX,\n      segment: [coordinates, coordinates],\n    };\n\n    const featureSegments = [centerSegmentData, circumferenceSegmentData];\n    centerSegmentData.featureSegments = featureSegments;\n    circumferenceSegmentData.featureSegments = featureSegments;\n    this.rBush_.insert(createExtent(coordinates), centerSegmentData);\n    let circleGeometry = /** @type {import(\"../geom/Geometry.js\").default} */ (\n      geometry\n    );\n    const userProjection = getUserProjection();\n    if (userProjection && this.getMap()) {\n      const projection = this.getMap().getView().getProjection();\n      circleGeometry = circleGeometry\n        .clone()\n        .transform(userProjection, projection);\n      circleGeometry = fromCircle(\n        /** @type {import(\"../geom/Circle.js\").default} */ (circleGeometry),\n      ).transform(projection, userProjection);\n    }\n    this.rBush_.insert(circleGeometry.getExtent(), circumferenceSegmentData);\n  }\n\n  /**\n   * @param {Feature} feature Feature\n   * @param {import(\"../geom/GeometryCollection.js\").default} geometry Geometry.\n   * @private\n   */\n  writeGeometryCollectionGeometry_(feature, geometry) {\n    const geometries = geometry.getGeometriesArray();\n    for (let i = 0; i < geometries.length; ++i) {\n      const geometry = geometries[i];\n      const writer = this.SEGMENT_WRITERS_[geometry.getType()];\n      writer(feature, geometry);\n    }\n  }\n\n  /**\n   * @param {import(\"../coordinate.js\").Coordinate} coordinates Coordinates.\n   * @param {Array<Feature>} features The features being modified.\n   * @param {Array<import(\"../geom/SimpleGeometry.js\").default>} geometries The geometries being modified.\n   * @param {boolean} existing The vertex represents an existing vertex.\n   * @return {Feature} Vertex feature.\n   * @private\n   */\n  createOrUpdateVertexFeature_(coordinates, features, geometries, existing) {\n    let vertexFeature = this.vertexFeature_;\n    if (!vertexFeature) {\n      vertexFeature = new Feature(new Point(coordinates));\n      this.vertexFeature_ = vertexFeature;\n      this.overlay_.getSource().addFeature(vertexFeature);\n    } else {\n      const geometry = vertexFeature.getGeometry();\n      geometry.setCoordinates(coordinates);\n    }\n    vertexFeature.set('features', features);\n    vertexFeature.set('geometries', geometries);\n    vertexFeature.set('existing', existing);\n    return vertexFeature;\n  }\n\n  /**\n   * Handles the {@link module:ol/MapBrowserEvent~MapBrowserEvent map browser event} and may modify the geometry.\n   * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n   * @return {boolean} `false` to stop event propagation.\n   * @override\n   */\n  handleEvent(mapBrowserEvent) {\n    if (!mapBrowserEvent.originalEvent) {\n      return true;\n    }\n    this.lastPointerEvent_ = mapBrowserEvent;\n\n    let handled;\n    if (\n      !mapBrowserEvent.map.getView().getInteracting() &&\n      mapBrowserEvent.type == MapBrowserEventType.POINTERMOVE &&\n      !this.handlingDownUpSequence\n    ) {\n      this.handlePointerMove_(mapBrowserEvent);\n    }\n    if (this.vertexFeature_ && this.deleteCondition_(mapBrowserEvent)) {\n      if (\n        mapBrowserEvent.type != MapBrowserEventType.SINGLECLICK ||\n        !this.ignoreNextSingleClick_\n      ) {\n        handled = this.removePoint();\n      } else {\n        handled = true;\n      }\n    }\n\n    if (mapBrowserEvent.type == MapBrowserEventType.SINGLECLICK) {\n      this.ignoreNextSingleClick_ = false;\n    }\n\n    return super.handleEvent(mapBrowserEvent) && !handled;\n  }\n\n  /**\n   * @param {import(\"../coordinate.js\").Coordinate} pixelCoordinate Pixel coordinate.\n   * @return {Array<SegmentData>|undefined} Insert vertices and update drag segments.\n   * @private\n   */\n  findInsertVerticesAndUpdateDragSegments_(pixelCoordinate) {\n    this.handlePointerAtPixel_(pixelCoordinate);\n    this.dragSegments_.length = 0;\n    this.featuresBeingModified_ = null;\n    const vertexFeature = this.vertexFeature_;\n    if (!vertexFeature) {\n      return;\n    }\n\n    const projection = this.getMap().getView().getProjection();\n    /** @type {Array<SegmentData>} */\n    const insertVertices = [];\n    const vertex = this.vertexFeature_.getGeometry().getCoordinates();\n    const vertexExtent = boundingExtent([vertex]);\n    const segmentDataMatches = this.rBush_.getInExtent(vertexExtent);\n    const componentSegments = {};\n    segmentDataMatches.sort(compareIndexes);\n    for (let i = 0, ii = segmentDataMatches.length; i < ii; ++i) {\n      const segmentDataMatch = segmentDataMatches[i];\n      const segment = segmentDataMatch.segment;\n      let uid = getUid(segmentDataMatch.geometry);\n      const depth = segmentDataMatch.depth;\n      if (depth) {\n        uid += '-' + depth.join('-'); // separate feature components\n      }\n      if (!componentSegments[uid]) {\n        componentSegments[uid] = new Array(2);\n      }\n\n      if (\n        segmentDataMatch.geometry.getType() === 'Circle' &&\n        segmentDataMatch.index === CIRCLE_CIRCUMFERENCE_INDEX\n      ) {\n        const closestVertex = closestOnSegmentData(\n          pixelCoordinate,\n          segmentDataMatch,\n          projection,\n        );\n        if (\n          this.coordinatesEqual_(closestVertex, vertex) &&\n          !componentSegments[uid][0]\n        ) {\n          this.dragSegments_.push([segmentDataMatch, 0]);\n          componentSegments[uid][0] = segmentDataMatch;\n        }\n        continue;\n      }\n\n      if (\n        this.coordinatesEqual_(segment[0], vertex) &&\n        !componentSegments[uid][0]\n      ) {\n        this.dragSegments_.push([segmentDataMatch, 0]);\n        componentSegments[uid][0] = segmentDataMatch;\n        continue;\n      }\n\n      if (\n        this.coordinatesEqual_(segment[1], vertex) &&\n        !componentSegments[uid][1]\n      ) {\n        if (\n          componentSegments[uid][0] &&\n          componentSegments[uid][0].index === 0\n        ) {\n          let coordinates = segmentDataMatch.geometry.getCoordinates();\n          switch (segmentDataMatch.geometry.getType()) {\n            // prevent dragging closed linestrings by the connecting node\n            case 'LineString':\n            case 'MultiLineString':\n              continue;\n            // if dragging the first vertex of a polygon, ensure the other segment\n            // belongs to the closing vertex of the linear ring\n            case 'MultiPolygon':\n              coordinates = coordinates[depth[1]];\n            /* falls through */\n            case 'Polygon':\n              if (segmentDataMatch.index !== coordinates[depth[0]].length - 2) {\n                continue;\n              }\n              break;\n            default:\n            // pass\n          }\n        }\n\n        this.dragSegments_.push([segmentDataMatch, 1]);\n        componentSegments[uid][1] = segmentDataMatch;\n        continue;\n      }\n\n      if (\n        getUid(segment) in this.vertexSegments_ &&\n        !componentSegments[uid][0] &&\n        !componentSegments[uid][1]\n      ) {\n        insertVertices.push(segmentDataMatch);\n      }\n    }\n\n    return insertVertices;\n  }\n\n  /**\n   * @private\n   */\n  deactivateTrace_() {\n    this.traceState_ = {active: false};\n  }\n\n  /**\n   * Determine whether a trace from `fromIndex` to `toIndex` passes at least one\n   * vertex of the target (i.e. whether it would add any traced coordinates).\n   * The index math mirrors {@link addTracedCoordinates_}.\n   * @param {number} fromIndex The start index.\n   * @param {number} toIndex The end index.\n   * @return {boolean} At least one target vertex lies between the indices.\n   * @private\n   */\n  tracePassesVertex_(fromIndex, toIndex) {\n    if (fromIndex === toIndex) {\n      return false;\n    }\n    if (fromIndex < toIndex) {\n      const start = Math.ceil(fromIndex);\n      let end = Math.floor(toIndex);\n      if (end === toIndex) {\n        end -= 1;\n      }\n      return start <= end;\n    }\n    const start = Math.floor(fromIndex);\n    let end = Math.ceil(toIndex);\n    if (end === toIndex) {\n      end += 1;\n    }\n    return start >= end;\n  }\n\n  /**\n   * Update the trace.\n   * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n   * @return {import('../coordinate.js').Coordinate|undefined} The coordinate the\n   * dragged vertex was snapped onto a target edge, if any.\n   * @private\n   */\n  updateTrace_(event) {\n    const traceState = this.traceState_;\n    if (!traceState.active) {\n      return;\n    }\n\n    if (traceState.targetIndex === -1) {\n      // check if we are ready to pick a target\n      const startPx = event.map.getPixelFromCoordinate(traceState.startCoord);\n      if (coordinateDistance(startPx, event.pixel) < this.pixelTolerance_) {\n        return;\n      }\n    }\n\n    const updatedTraceTarget = getTraceTargetUpdate(\n      event.coordinate,\n      traceState,\n      event.map,\n      this.pixelTolerance_,\n    );\n\n    if (\n      traceState.targetIndex === -1 &&\n      Math.sqrt(updatedTraceTarget.closestTargetDistance) /\n        event.map.getView().getResolution() >\n        this.pixelTolerance_\n    ) {\n      return;\n    }\n\n    // Only commit to tracing a target once the drag has passed one of its\n    // vertices.  Before that we still snap the dragged vertex onto the target\n    // edge (below), but we keep `targetIndex` at -1 so that pulling the pointer\n    // beyond the tolerance releases the vertex instead of getting stuck on the\n    // target.\n    let commit = true;\n    if (traceState.targetIndex === -1) {\n      const candidateTarget = traceState.targets[updatedTraceTarget.index];\n      commit = this.tracePassesVertex_(\n        candidateTarget.startIndex,\n        updatedTraceTarget.endIndex,\n      );\n    }\n\n    if (commit) {\n      if (traceState.targetIndex !== updatedTraceTarget.index) {\n        // target changed\n        if (traceState.targetIndex !== -1) {\n          // remove points added during previous trace\n          const oldTarget = traceState.targets[traceState.targetIndex];\n          this.removeTracedCoordinates_(\n            oldTarget.startIndex,\n            oldTarget.endIndex,\n          );\n        }\n        // add points for the new target\n        const newTarget = traceState.targets[updatedTraceTarget.index];\n        this.addTracedCoordinates_(\n          newTarget,\n          newTarget.startIndex,\n          updatedTraceTarget.endIndex,\n        );\n      } else {\n        // target stayed the same\n        const target = traceState.targets[traceState.targetIndex];\n        this.addOrRemoveTracedCoordinates_(target, updatedTraceTarget.endIndex);\n      }\n\n      // modify the state with updated info\n      traceState.targetIndex = updatedTraceTarget.index;\n      traceState.targets[traceState.targetIndex].endIndex =\n        updatedTraceTarget.endIndex;\n    }\n\n    // Snap the dragged vertex (the moving end of the trace) onto the target\n    // edge so that the trace follows edges, not only vertices, and the geometry\n    // stays consistent with the vertex marker.  Moving all of the dragged\n    // vertex' segments keeps polygon rings closed.\n    const snapTarget = traceState.targets[updatedTraceTarget.index];\n    const snappedVertex = interpolateCoordinate(\n      snapTarget.coordinates,\n      updatedTraceTarget.endIndex,\n    );\n    for (const dragSegment of this.dragSegments_) {\n      this.updateGeometry_(snappedVertex.slice(), dragSegment);\n    }\n    return snappedVertex;\n  }\n\n  getTraceCandidates_(event) {\n    const map = this.getMap();\n    const tolerance = this.pixelTolerance_;\n    const lowerLeft = map.getCoordinateFromPixel([\n      event.pixel[0] - tolerance,\n      event.pixel[1] + tolerance,\n    ]);\n    const upperRight = map.getCoordinateFromPixel([\n      event.pixel[0] + tolerance,\n      event.pixel[1] - tolerance,\n    ]);\n    const extent = boundingExtent([lowerLeft, upperRight]);\n    const features = this.traceSource_.getFeaturesInExtent(extent);\n    return features;\n  }\n\n  /**\n   * Activate or deactivate trace state based on a browser event.\n   * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n   * @private\n   */\n  toggleTraceState_(event) {\n    if (!this.traceSource_ || !this.traceCondition_(event)) {\n      return;\n    }\n\n    if (this.traceState_.active) {\n      this.deactivateTrace_();\n      this.traceSegments_ = null;\n      return;\n    }\n\n    const features = this.getTraceCandidates_(event);\n    if (features.length === 0) {\n      return;\n    }\n\n    const targets = getTraceTargets(event.coordinate, features);\n    if (targets.length) {\n      this.traceState_ = {\n        active: true,\n        startCoord: event.coordinate.slice(),\n        targets: targets,\n        targetIndex: -1,\n      };\n    }\n  }\n\n  /**\n   * @param {import('./tracing.js').TraceTarget} target The trace target.\n   * @param {number} endIndex The new end index of the trace.\n   * @private\n   */\n  addOrRemoveTracedCoordinates_(target, endIndex) {\n    // three cases to handle:\n    //  1. traced in the same direction and points need adding\n    //  2. traced in the same direction and points need removing\n    //  3. traced in a new direction\n    const previouslyForward = target.startIndex <= target.endIndex;\n    const currentlyForward = target.startIndex <= endIndex;\n    if (previouslyForward === currentlyForward) {\n      // same direction\n      if (\n        (previouslyForward && endIndex > target.endIndex) ||\n        (!previouslyForward && endIndex < target.endIndex)\n      ) {\n        // case 1 - add new points\n        this.addTracedCoordinates_(target, target.endIndex, endIndex);\n      } else if (\n        (previouslyForward && endIndex < target.endIndex) ||\n        (!previouslyForward && endIndex > target.endIndex)\n      ) {\n        // case 2 - remove old points\n        this.removeTracedCoordinates_(endIndex, target.endIndex);\n      }\n    } else {\n      // case 3 - remove old points, add new points\n      this.removeTracedCoordinates_(target.startIndex, target.endIndex);\n      this.addTracedCoordinates_(target, target.startIndex, endIndex);\n    }\n  }\n\n  /**\n   * Tracing splices coordinates into a ring next to the dragged vertex, but only\n   * adjusts the index of the trace segment itself.  The dragged vertex' other\n   * segments in `dragSegments_` reference the same ring, so their stored index\n   * must be shifted too - otherwise the next {@link updateGeometry_} writes the\n   * dragged vertex to the wrong coordinate and scrambles the ring.\n   * @param {SegmentData} traceSegmentData The trace segment (adjusted by the\n   * caller and skipped here).\n   * @param {number} atIndex Segments at or after this coordinate index shift.\n   * @param {number} delta Coordinates added (positive) or removed (negative).\n   * @private\n   */\n  shiftTracedSegmentIndices_(traceSegmentData, atIndex, delta) {\n    for (const dragSegment of this.dragSegments_) {\n      const segmentData = dragSegment[0];\n      if (\n        segmentData !== traceSegmentData &&\n        segmentData.geometry === traceSegmentData.geometry &&\n        (segmentData.depth === undefined ||\n          traceSegmentData.depth === undefined ||\n          equals(segmentData.depth, traceSegmentData.depth)) &&\n        segmentData.index >= atIndex\n      ) {\n        segmentData.index += delta;\n      }\n    }\n  }\n\n  /**\n   * @param {number} fromIndex The start index.\n   * @param {number} toIndex The end index.\n   * @private\n   */\n  removeTracedCoordinates_(fromIndex, toIndex) {\n    if (fromIndex === toIndex) {\n      return;\n    }\n\n    let remove = 0;\n    if (fromIndex < toIndex) {\n      const start = Math.ceil(fromIndex);\n      let end = Math.floor(toIndex);\n      if (end === toIndex) {\n        end -= 1;\n      }\n      remove = end - start + 1;\n    } else {\n      const start = Math.floor(fromIndex);\n      let end = Math.ceil(toIndex);\n      if (end === toIndex) {\n        end += 1;\n      }\n      remove = start - end + 1;\n    }\n\n    if (remove > 0) {\n      for (const traceSegment of this.traceSegments_) {\n        const segmentData = traceSegment[0];\n        const geometry = segmentData.geometry;\n        const index = traceSegment[1];\n        let removeIndex = traceSegment[0].index + 1;\n        if (index === 1) {\n          removeIndex -= remove;\n        }\n        const coordinates = geometry.getCoordinates();\n        const coordinatesArray = getCoordinatesArray(\n          coordinates,\n          geometry.getType(),\n          segmentData.depth,\n        );\n        coordinatesArray.splice(removeIndex, remove);\n        this.setGeometryCoordinates_(geometry, coordinates);\n        this.shiftTracedSegmentIndices_(\n          segmentData,\n          removeIndex + remove,\n          -remove,\n        );\n        if (index === 1) {\n          segmentData.index -= remove;\n        }\n      }\n    }\n  }\n\n  /**\n   * @param {import('./tracing.js').TraceTarget} target The trace target.\n   * @param {number} fromIndex The start index.\n   * @param {number} toIndex The end index.\n   * @private\n   */\n  addTracedCoordinates_(target, fromIndex, toIndex) {\n    if (fromIndex === toIndex) {\n      return;\n    }\n\n    const newCoordinates = [];\n    if (fromIndex < toIndex) {\n      // forward trace\n      const start = Math.ceil(fromIndex);\n      let end = Math.floor(toIndex);\n      if (end === toIndex) {\n        // if end is snapped to a vertex, it will be added later\n        end -= 1;\n      }\n      for (let i = start; i <= end; ++i) {\n        newCoordinates.push(getCoordinate(target.coordinates, i));\n      }\n    } else {\n      // reverse trace\n      const start = Math.floor(fromIndex);\n      let end = Math.ceil(toIndex);\n      if (end === toIndex) {\n        end += 1;\n      }\n      for (let i = start; i >= end; --i) {\n        newCoordinates.push(getCoordinate(target.coordinates, i));\n      }\n    }\n\n    if (newCoordinates.length) {\n      for (const traceSegment of this.traceSegments_) {\n        const segmentData = traceSegment[0];\n        const geometry = segmentData.geometry;\n        const index = traceSegment[1];\n        const insertIndex = segmentData.index + 1;\n        if (index === 0) {\n          newCoordinates.reverse();\n        }\n        const coordinates = geometry.getCoordinates();\n        const coordinatesArray = getCoordinatesArray(\n          coordinates,\n          geometry.getType(),\n          segmentData.depth,\n        );\n        coordinatesArray.splice(insertIndex, 0, ...newCoordinates);\n        this.setGeometryCoordinates_(geometry, coordinates);\n        this.shiftTracedSegmentIndices_(\n          segmentData,\n          insertIndex,\n          newCoordinates.length,\n        );\n        if (index === 1) {\n          segmentData.index += newCoordinates.length;\n        }\n      }\n    }\n  }\n\n  /**\n   * @param {import('../coordinate.js').Coordinate} vertex Vertex.\n   * @param {DragSegment} dragSegment Drag segment.\n   */\n  updateGeometry_(vertex, dragSegment) {\n    const segmentData = dragSegment[0];\n    const depth = segmentData.depth;\n    let coordinates;\n    const segment = segmentData.segment;\n    const geometry = segmentData.geometry;\n    const index = dragSegment[1];\n\n    const stride = geometry.getStride();\n    for (let i = 2; i < stride; ++i) {\n      vertex[i] = segment[index][i];\n    }\n    vertex.length = stride;\n    switch (geometry.getType()) {\n      case 'Point':\n        coordinates = vertex;\n        segment[0] = vertex;\n        segment[1] = vertex;\n        break;\n      case 'MultiPoint':\n        coordinates = geometry.getCoordinates();\n        coordinates[segmentData.index] = vertex;\n        segment[0] = vertex;\n        segment[1] = vertex;\n        break;\n      case 'LineString':\n        coordinates = geometry.getCoordinates();\n        coordinates[segmentData.index + index] = vertex;\n        segment[index] = vertex;\n        break;\n      case 'MultiLineString':\n        coordinates = geometry.getCoordinates();\n        coordinates[depth[0]][segmentData.index + index] = vertex;\n        segment[index] = vertex;\n        break;\n      case 'Polygon': {\n        coordinates = geometry.getCoordinates();\n        const ring = coordinates[depth[0]];\n        const targetIndex = segmentData.index + index;\n\n        // Prevent duplicate change events when vertex already at position\n        if (\n          ring[targetIndex][0] === vertex[0] &&\n          ring[targetIndex][1] === vertex[1]\n        ) {\n          coordinates = null;\n        } else {\n          ring[targetIndex] = vertex;\n          if (targetIndex === 0) {\n            ring[ring.length - 1] = vertex;\n          } else if (targetIndex === ring.length - 1) {\n            ring[0] = vertex;\n          }\n        }\n        segment[index] = vertex;\n        break;\n      }\n      case 'MultiPolygon': {\n        coordinates = geometry.getCoordinates();\n        const mRing = coordinates[depth[1]][depth[0]];\n        const mTargetIndex = segmentData.index + index;\n\n        // Prevent duplicate change events when vertex already at position\n        if (\n          mRing[mTargetIndex][0] === vertex[0] &&\n          mRing[mTargetIndex][1] === vertex[1]\n        ) {\n          coordinates = null;\n        } else {\n          mRing[mTargetIndex] = vertex;\n          if (mTargetIndex === 0) {\n            mRing[mRing.length - 1] = vertex;\n          } else if (mTargetIndex === mRing.length - 1) {\n            mRing[0] = vertex;\n          }\n        }\n        segment[index] = vertex;\n        break;\n      }\n      case 'Circle':\n        const circle = /** @type {import(\"../geom/Circle.js\").default} */ (\n          geometry\n        );\n        segment[0] = vertex;\n        segment[1] = vertex;\n        if (segmentData.index === CIRCLE_CENTER_INDEX) {\n          this.changingFeature_ = true;\n          circle.setCenter(vertex);\n          this.changingFeature_ = false;\n        } else {\n          // We're dragging the circle's circumference:\n          this.changingFeature_ = true;\n          const projection = this.getMap().getView().getProjection();\n          let radius = coordinateDistance(\n            fromUserCoordinate(circle.getCenter(), projection),\n            fromUserCoordinate(vertex, projection),\n          );\n          const userProjection = getUserProjection();\n          if (userProjection) {\n            const circleGeometry = circle\n              .clone()\n              .transform(userProjection, projection);\n            circleGeometry.setRadius(radius);\n            radius = circleGeometry\n              .transform(projection, userProjection)\n              .getRadius();\n          }\n          circle.setRadius(radius);\n          this.changingFeature_ = false;\n        }\n        break;\n      default:\n      // pass\n    }\n    if (coordinates) {\n      this.setGeometryCoordinates_(geometry, coordinates);\n    }\n  }\n\n  /**\n   * Handle pointer drag events.\n   * @param {import(\"../MapBrowserEvent.js\").default} evt Event.\n   * @override\n   */\n  handleDragEvent(evt) {\n    this.ignoreNextSingleClick_ = false;\n    this.willModifyFeatures_(\n      evt,\n      this.dragSegments_.map(([segment]) => segment),\n    );\n\n    const vertex = [\n      evt.coordinate[0] + this.delta_[0],\n      evt.coordinate[1] + this.delta_[1],\n    ];\n    const features = [];\n    const geometries = [];\n    const startTraceCoord =\n      this.traceState_.active && !this.traceSegments_\n        ? this.traceState_.startCoord\n        : null;\n    if (startTraceCoord) {\n      this.traceSegments_ = [];\n      for (const dragSegment of this.dragSegments_) {\n        const segmentData = dragSegment[0];\n        const eligibleForTracing =\n          coordinateDistance(\n            closestOnSegment(startTraceCoord, segmentData.segment),\n            startTraceCoord,\n          ) /\n            evt.map.getView().getResolution() <\n          1;\n        if (eligibleForTracing) {\n          this.traceSegments_.push(dragSegment);\n        }\n      }\n      if (this.traceSegments_.length > 1) {\n        // Both segments of the dragged vertex are anchored at the trace start,\n        // i.e. the grabbed vertex is the anchor itself.  Tracing needs a fixed\n        // anchor distinct from the moving vertex, so cancel tracing and let this\n        // drag move the vertex freely.\n        this.deactivateTrace_();\n        this.traceSegments_ = null;\n      }\n    }\n    for (let i = 0, ii = this.dragSegments_.length; i < ii; ++i) {\n      const dragSegment = this.dragSegments_[i];\n      const segmentData = dragSegment[0];\n      const feature = segmentData.feature;\n      if (!features.includes(feature)) {\n        features.push(feature);\n      }\n      const geometry = segmentData.geometry;\n      if (!geometries.includes(geometry)) {\n        geometries.push(geometry);\n      }\n\n      this.updateGeometry_(vertex, dragSegment);\n    }\n    // when tracing snaps the dragged vertex onto a target edge, show the vertex\n    // marker at the snapped location rather than at the raw pointer\n    const snappedVertex = this.updateTrace_(evt);\n    this.createOrUpdateVertexFeature_(\n      snappedVertex || vertex,\n      features,\n      geometries,\n      true,\n    );\n  }\n\n  /**\n   * Handle pointer down events.\n   * @param {import(\"../MapBrowserEvent.js\").default} evt Event.\n   * @return {boolean} If the event was consumed.\n   * @override\n   */\n  handleDownEvent(evt) {\n    if (!this.condition_(evt)) {\n      return false;\n    }\n    const pixelCoordinate = evt.coordinate;\n    const insertVertices =\n      this.findInsertVerticesAndUpdateDragSegments_(pixelCoordinate);\n\n    if (insertVertices?.length && this.insertVertexCondition_(evt)) {\n      this.willModifyFeatures_(evt, insertVertices);\n\n      if (this.vertexFeature_) {\n        const vertex = this.vertexFeature_.getGeometry().getCoordinates();\n        for (let j = insertVertices.length - 1; j >= 0; --j) {\n          this.insertVertex_(insertVertices[j], vertex);\n        }\n        this.ignoreNextSingleClick_ = true;\n      }\n    }\n\n    return !!this.vertexFeature_;\n  }\n\n  /**\n   * Handle pointer up events.\n   * @param {import(\"../MapBrowserEvent.js\").default} evt Event.\n   * @return {boolean} If the event was consumed.\n   * @override\n   */\n  handleUpEvent(evt) {\n    // Tracing inserts and removes vertices with guarded geometry mutations (so\n    // that dragSegments_ survive the drag). Those guarded mutations skip the\n    // segment rBush rebuild that handleFeatureChange_ would normally do, so the\n    // rBush no longer matches the traced geometry. Collect the affected features\n    // here and rebuild their segment data once the drag is over.\n    const tracedFeatures = this.traceState_.active ? new Set() : null;\n    for (let i = this.dragSegments_.length - 1; i >= 0; --i) {\n      const segmentData = this.dragSegments_[i][0];\n      if (tracedFeatures) {\n        tracedFeatures.add(segmentData.feature);\n      }\n      const geometry = segmentData.geometry;\n      if (geometry.getType() === 'Circle') {\n        const circle = /** @type {import(\"../geom/Circle.js\").default} */ (\n          geometry\n        );\n        // Update a circle object in the R* bush:\n        const coordinates = circle.getCenter();\n        const centerSegmentData = segmentData.featureSegments[0];\n        const circumferenceSegmentData = segmentData.featureSegments[1];\n        centerSegmentData.segment[0] = coordinates;\n        centerSegmentData.segment[1] = coordinates;\n        circumferenceSegmentData.segment[0] = coordinates;\n        circumferenceSegmentData.segment[1] = coordinates;\n        this.rBush_.update(createExtent(coordinates), centerSegmentData);\n        /** @type {import(\"../geom/Circle.js\").default | import(\"../geom/Polygon.js\").default} */\n        let circleGeometry = circle;\n        const userProjection = getUserProjection();\n        if (userProjection) {\n          const projection = evt.map.getView().getProjection();\n          circleGeometry = circleGeometry\n            .clone()\n            .transform(userProjection, projection);\n          circleGeometry = fromCircle(circleGeometry).transform(\n            projection,\n            userProjection,\n          );\n        }\n        this.rBush_.update(\n          circleGeometry.getExtent(),\n          circumferenceSegmentData,\n        );\n      } else {\n        this.rBush_.update(boundingExtent(segmentData.segment), segmentData);\n      }\n    }\n    if (tracedFeatures) {\n      for (const feature of tracedFeatures) {\n        this.removeFeature_(feature);\n        if (this.filter_(feature)) {\n          this.addFeature_(feature);\n        }\n      }\n    }\n    if (this.featuresBeingModified_) {\n      this.toggleTraceState_(evt);\n      this.dispatchEvent(\n        new ModifyEvent(\n          ModifyEventType.MODIFYEND,\n          this.featuresBeingModified_,\n          evt,\n        ),\n      );\n      this.featuresBeingModified_ = null;\n    }\n    return false;\n  }\n\n  /**\n   * @param {import(\"../MapBrowserEvent.js\").default} evt Event.\n   * @private\n   */\n  handlePointerMove_(evt) {\n    this.lastCoordinate_ = evt.coordinate;\n    this.handlePointerAtPixel_(this.lastCoordinate_);\n  }\n\n  /**\n   * @param {import(\"../coordinate.js\").Coordinate} pixelCoordinate The pixel Coordinate.\n   * @private\n   */\n  handlePointerAtPixel_(pixelCoordinate) {\n    const map = this.getMap();\n    const pixel = map.getPixelFromCoordinate(pixelCoordinate);\n    const projection = map.getView().getProjection();\n    const sortByDistance = function (a, b) {\n      return (\n        projectedDistanceToSegmentDataSquared(pixelCoordinate, a, projection) -\n        projectedDistanceToSegmentDataSquared(pixelCoordinate, b, projection)\n      );\n    };\n\n    /** @type {Array<SegmentData>|undefined} */\n    let nodes;\n    /** @type {Point|undefined} */\n    let hitPointGeometry;\n    if (this.hitDetection_) {\n      const layerFilter =\n        typeof this.hitDetection_ === 'object'\n          ? (layer) => layer === this.hitDetection_\n          : undefined;\n      map.forEachFeatureAtPixel(\n        pixel,\n        (feature, layer, geometry) => {\n          if (geometry && geometry.getType() === 'Point') {\n            geometry = new Point(\n              toUserCoordinate(geometry.getCoordinates(), projection),\n            );\n          }\n          const geom = geometry || feature.getGeometry();\n\n          if (\n            geom &&\n            geom.getType() === 'Point' &&\n            feature instanceof Feature &&\n            this.features_.includes(feature)\n          ) {\n            hitPointGeometry = /** @type {Point} */ (geom);\n            const coordinate = /** @type {Point} */ (feature.getGeometry())\n              .getFlatCoordinates()\n              .slice(0, 2);\n            nodes = [\n              {\n                feature,\n                geometry: hitPointGeometry,\n                segment: [coordinate, coordinate],\n              },\n            ];\n          }\n          return true;\n        },\n        {layerFilter},\n      );\n    }\n    if (!nodes) {\n      const viewExtent = fromUserExtent(\n        createExtent(pixelCoordinate, tempExtent),\n        projection,\n      );\n      const buffer = map.getView().getResolution() * this.pixelTolerance_;\n      const box = toUserExtent(\n        bufferExtent(viewExtent, buffer, tempExtent),\n        projection,\n      );\n      nodes = this.rBush_.getInExtent(box);\n    }\n\n    if (nodes && nodes.length > 0) {\n      const node = nodes.sort(sortByDistance)[0];\n      const closestSegment = node.segment;\n      let vertex = closestOnSegmentData(pixelCoordinate, node, projection);\n      const vertexPixel = map.getPixelFromCoordinate(vertex);\n      let dist = coordinateDistance(pixel, vertexPixel);\n      if (hitPointGeometry || dist <= this.pixelTolerance_) {\n        /** @type {Object<string, boolean>} */\n        const vertexSegments = {};\n        vertexSegments[getUid(closestSegment)] = true;\n\n        if (!this.snapToPointer_) {\n          this.delta_[0] = vertex[0] - pixelCoordinate[0];\n          this.delta_[1] = vertex[1] - pixelCoordinate[1];\n        }\n        if (\n          node.geometry.getType() === 'Circle' &&\n          node.index === CIRCLE_CIRCUMFERENCE_INDEX\n        ) {\n          this.snappedToVertex_ = true;\n          this.createOrUpdateVertexFeature_(\n            vertex,\n            [node.feature],\n            [node.geometry],\n            this.snappedToVertex_,\n          );\n        } else {\n          const pixel1 = map.getPixelFromCoordinate(closestSegment[0]);\n          const pixel2 = map.getPixelFromCoordinate(closestSegment[1]);\n          const squaredDist1 = squaredCoordinateDistance(vertexPixel, pixel1);\n          const squaredDist2 = squaredCoordinateDistance(vertexPixel, pixel2);\n          dist = Math.sqrt(Math.min(squaredDist1, squaredDist2));\n          this.snappedToVertex_ = dist <= this.pixelTolerance_;\n          // Stop and cleanup overlay vertex feature if a segment was hit and new vertex creation is not allowed by the insertVertexCondition\n          if (\n            !this.snappedToVertex_ &&\n            !this.insertVertexCondition_(this.lastPointerEvent_)\n          ) {\n            if (this.vertexFeature_) {\n              this.overlay_.getSource().removeFeature(this.vertexFeature_);\n              this.vertexFeature_ = null;\n            }\n            return;\n          }\n          if (this.snappedToVertex_) {\n            vertex =\n              squaredDist1 > squaredDist2\n                ? closestSegment[1]\n                : closestSegment[0];\n          }\n          this.createOrUpdateVertexFeature_(\n            vertex,\n            [node.feature],\n            [node.geometry],\n            this.snappedToVertex_,\n          );\n          const geometries = {};\n          geometries[getUid(node.geometry)] = true;\n          for (let i = 1, ii = nodes.length; i < ii; ++i) {\n            const segment = nodes[i].segment;\n            if (\n              (this.coordinatesEqual_(closestSegment[0], segment[0]) &&\n                this.coordinatesEqual_(closestSegment[1], segment[1])) ||\n              (this.coordinatesEqual_(closestSegment[0], segment[1]) &&\n                this.coordinatesEqual_(closestSegment[1], segment[0]))\n            ) {\n              const geometryUid = getUid(nodes[i].geometry);\n              if (!(geometryUid in geometries)) {\n                geometries[geometryUid] = true;\n                vertexSegments[getUid(segment)] = true;\n              }\n            } else {\n              break;\n            }\n          }\n        }\n\n        this.vertexSegments_ = vertexSegments;\n        return;\n      }\n    }\n    if (this.vertexFeature_) {\n      this.overlay_.getSource().removeFeature(this.vertexFeature_);\n      this.vertexFeature_ = null;\n    }\n  }\n\n  /**\n   * @param {SegmentData} segmentData Segment data.\n   * @param {import(\"../coordinate.js\").Coordinate} vertex Vertex.\n   * @return {boolean} A vertex was inserted.\n   * @private\n   */\n  insertVertex_(segmentData, vertex) {\n    const segment = segmentData.segment;\n    const feature = segmentData.feature;\n    const geometry = segmentData.geometry;\n    const depth = segmentData.depth;\n    const index = segmentData.index;\n    let coordinates;\n\n    while (vertex.length < geometry.getStride()) {\n      vertex.push(0);\n    }\n\n    switch (geometry.getType()) {\n      case 'MultiLineString':\n        coordinates = geometry.getCoordinates();\n        coordinates[depth[0]].splice(index + 1, 0, vertex);\n        break;\n      case 'Polygon':\n        coordinates = geometry.getCoordinates();\n        coordinates[depth[0]].splice(index + 1, 0, vertex);\n        break;\n      case 'MultiPolygon':\n        coordinates = geometry.getCoordinates();\n        coordinates[depth[1]][depth[0]].splice(index + 1, 0, vertex);\n        break;\n      case 'LineString':\n        coordinates = geometry.getCoordinates();\n        coordinates.splice(index + 1, 0, vertex);\n        break;\n      default:\n        return false;\n    }\n\n    this.setGeometryCoordinates_(geometry, coordinates);\n    const rTree = this.rBush_;\n    rTree.remove(segmentData);\n    this.updateSegmentIndices_(geometry, index, depth, 1);\n\n    /** @type {SegmentData} */\n    const newSegmentData = {\n      segment: [segment[0], vertex],\n      feature: feature,\n      geometry: geometry,\n      depth: depth,\n      index: index,\n    };\n\n    rTree.insert(boundingExtent(newSegmentData.segment), newSegmentData);\n    this.dragSegments_.push([newSegmentData, 1]);\n\n    /** @type {SegmentData} */\n    const newSegmentData2 = {\n      segment: [vertex, segment[1]],\n      feature: feature,\n      geometry: geometry,\n      depth: depth,\n      index: index + 1,\n    };\n\n    rTree.insert(boundingExtent(newSegmentData2.segment), newSegmentData2);\n    this.dragSegments_.push([newSegmentData2, 0]);\n    return true;\n  }\n\n  /**\n   * @param {import(\"../coordinate.js\").Coordinate} coordinate The coordinate.\n   * @return {import(\"../coordinate.js\").Coordinate} The updated pointer coordinate.\n   * @private\n   */\n  updatePointer_(coordinate) {\n    if (coordinate) {\n      this.findInsertVerticesAndUpdateDragSegments_(coordinate);\n    }\n    return this.vertexFeature_?.getGeometry().getCoordinates();\n  }\n\n  /**\n   * Get the current pointer position.\n   * @return {import(\"../coordinate.js\").Coordinate | null} The current pointer coordinate.\n   */\n  getPoint() {\n    const coordinate = this.vertexFeature_?.getGeometry().getCoordinates();\n    if (!coordinate) {\n      return null;\n    }\n    return toUserCoordinate(\n      coordinate,\n      this.getMap().getView().getProjection(),\n    );\n  }\n\n  /**\n   * Check if a point can be removed from the current linestring or polygon at the current\n   * pointer position.\n   * @return {boolean} A point can be deleted at the current pointer position.\n   * @api\n   */\n  canRemovePoint() {\n    if (!this.vertexFeature_) {\n      return false;\n    }\n    if (\n      this.vertexFeature_\n        .get('geometries')\n        .every(\n          (geometry) =>\n            geometry.getType() === 'Circle' ||\n            geometry.getType().endsWith('Point'),\n        )\n    ) {\n      return false;\n    }\n    const coordinate = this.vertexFeature_.getGeometry().getCoordinates();\n    const segments = this.rBush_.getInExtent(boundingExtent([coordinate]));\n    return segments.some(\n      ({segment}) =>\n        this.coordinatesEqual_(segment[0], coordinate) ||\n        this.coordinatesEqual_(segment[1], coordinate),\n    );\n  }\n\n  /**\n   * Removes the vertex currently being pointed from the current linestring or polygon.\n   * @param {import('../coordinate.js').Coordinate} [coordinate] If provided, the pointer\n   * will be set to the provided coordinate. If not, the current pointer coordinate will be used.\n   * @return {boolean} True when a vertex was removed.\n   * @api\n   */\n  removePoint(coordinate) {\n    if (coordinate) {\n      coordinate = fromUserCoordinate(\n        coordinate,\n        this.getMap().getView().getProjection(),\n      );\n      this.updatePointer_(coordinate);\n    }\n    if (\n      !this.lastPointerEvent_ ||\n      (this.lastPointerEvent_ &&\n        this.lastPointerEvent_.type != MapBrowserEventType.POINTERDRAG)\n    ) {\n      const evt = this.lastPointerEvent_;\n      this.willModifyFeatures_(\n        evt,\n        this.dragSegments_.map(([segment]) => segment),\n      );\n      const removed = this.removeVertex_();\n      if (this.featuresBeingModified_) {\n        this.dispatchEvent(\n          new ModifyEvent(\n            ModifyEventType.MODIFYEND,\n            this.featuresBeingModified_,\n            evt,\n          ),\n        );\n      }\n\n      this.featuresBeingModified_ = null;\n      return removed;\n    }\n    return false;\n  }\n\n  /**\n   * Removes a vertex from all matching features.\n   * @return {boolean} True when a vertex was removed.\n   * @private\n   */\n  removeVertex_() {\n    const dragSegments = this.dragSegments_;\n    const segmentsByFeature = {};\n    let deleted = false;\n    let component, coordinates, dragSegment, geometry, i, index, left;\n    let newIndex, right, segmentData, uid;\n    for (i = dragSegments.length - 1; i >= 0; --i) {\n      dragSegment = dragSegments[i];\n      segmentData = dragSegment[0];\n      uid = getUid(segmentData.feature);\n      if (segmentData.depth) {\n        // separate feature components\n        uid += '-' + segmentData.depth.join('-');\n      }\n      if (!(uid in segmentsByFeature)) {\n        segmentsByFeature[uid] = {};\n      }\n      if (dragSegment[1] === 0) {\n        segmentsByFeature[uid].right = segmentData;\n        segmentsByFeature[uid].index = segmentData.index;\n      } else if (dragSegment[1] == 1) {\n        segmentsByFeature[uid].left = segmentData;\n        segmentsByFeature[uid].index = segmentData.index + 1;\n      }\n    }\n    for (uid in segmentsByFeature) {\n      right = segmentsByFeature[uid].right;\n      left = segmentsByFeature[uid].left;\n      index = segmentsByFeature[uid].index;\n      newIndex = index - 1;\n      if (left !== undefined) {\n        segmentData = left;\n      } else {\n        segmentData = right;\n      }\n      if (newIndex < 0) {\n        newIndex = 0;\n      }\n      geometry = segmentData.geometry;\n      coordinates = geometry.getCoordinates();\n      component = coordinates;\n      deleted = false;\n      switch (geometry.getType()) {\n        case 'MultiLineString':\n          if (coordinates[segmentData.depth[0]].length > 2) {\n            coordinates[segmentData.depth[0]].splice(index, 1);\n            deleted = true;\n          }\n          break;\n        case 'LineString':\n          if (coordinates.length > 2) {\n            coordinates.splice(index, 1);\n            deleted = true;\n          }\n          break;\n        case 'MultiPolygon':\n          component = component[segmentData.depth[1]];\n        /* falls through */\n        case 'Polygon':\n          component = component[segmentData.depth[0]];\n          if (component.length > 4) {\n            if (index == component.length - 1) {\n              index = 0;\n            }\n            component.splice(index, 1);\n            deleted = true;\n            if (index === 0) {\n              // close the ring again\n              component.pop();\n              component.push(component[0]);\n              newIndex = component.length - 1;\n            }\n          }\n          break;\n        default:\n        // pass\n      }\n\n      if (deleted) {\n        this.setGeometryCoordinates_(geometry, coordinates);\n        const segments = [];\n        if (left !== undefined) {\n          this.rBush_.remove(left);\n          segments.push(left.segment[0]);\n        }\n        if (right !== undefined) {\n          this.rBush_.remove(right);\n          segments.push(right.segment[1]);\n        }\n        if (left !== undefined && right !== undefined) {\n          /** @type {SegmentData} */\n          const newSegmentData = {\n            depth: segmentData.depth,\n            feature: segmentData.feature,\n            geometry: segmentData.geometry,\n            index: newIndex,\n            segment: segments,\n          };\n\n          this.rBush_.insert(\n            boundingExtent(newSegmentData.segment),\n            newSegmentData,\n          );\n        }\n        this.updateSegmentIndices_(geometry, index, segmentData.depth, -1);\n        if (this.vertexFeature_) {\n          this.overlay_.getSource().removeFeature(this.vertexFeature_);\n          this.vertexFeature_ = null;\n        }\n        dragSegments.length = 0;\n      }\n    }\n    return deleted;\n  }\n\n  /**\n   * Check if a point can be inserted to the current linestring or polygon at the current\n   * pointer position.\n   * @return {boolean} A point can be inserted at the current pointer position.\n   * @api\n   */\n  canInsertPoint() {\n    if (!this.vertexFeature_) {\n      return false;\n    }\n    if (\n      this.vertexFeature_\n        .get('geometries')\n        .every(\n          (geometry) =>\n            geometry.getType() === 'Circle' ||\n            geometry.getType().endsWith('Point'),\n        )\n    ) {\n      return false;\n    }\n    const coordinate = this.vertexFeature_.getGeometry().getCoordinates();\n    const segments = this.rBush_.getInExtent(boundingExtent([coordinate]));\n    return segments.some(\n      ({segment}) =>\n        !(\n          this.coordinatesEqual_(segment[0], coordinate) ||\n          this.coordinatesEqual_(segment[1], coordinate)\n        ),\n    );\n  }\n\n  /**\n   * Inserts the vertex currently being pointed to the current linestring or polygon.\n   * @param {import('../coordinate.js').Coordinate} [coordinate] If provided, the pointer\n   * will be set to the provided coordinate. If not, the current pointer coordinate will be used.\n   * @return {boolean} A vertex was inserted.\n   * @api\n   */\n  insertPoint(coordinate) {\n    const pixelCoordinate = coordinate\n      ? fromUserCoordinate(coordinate, this.getMap().getView().getProjection())\n      : this.vertexFeature_?.getGeometry().getCoordinates();\n    if (!pixelCoordinate) {\n      return false;\n    }\n    const insertVertices =\n      this.findInsertVerticesAndUpdateDragSegments_(pixelCoordinate);\n    return insertVertices.reduce(\n      (prev, segmentData) =>\n        prev || this.insertVertex_(segmentData, pixelCoordinate),\n      false,\n    );\n  }\n\n  /**\n   * @param {import(\"../geom/SimpleGeometry.js\").default} geometry Geometry.\n   * @param {Array} coordinates Coordinates.\n   * @private\n   */\n  setGeometryCoordinates_(geometry, coordinates) {\n    this.changingFeature_ = true;\n    geometry.setCoordinates(coordinates);\n    this.changingFeature_ = false;\n  }\n\n  /**\n   * @param {import(\"../geom/SimpleGeometry.js\").default} geometry Geometry.\n   * @param {number} index Index.\n   * @param {Array<number>|undefined} depth Depth.\n   * @param {number} delta Delta (1 or -1).\n   * @private\n   */\n  updateSegmentIndices_(geometry, index, depth, delta) {\n    this.rBush_.forEachInExtent(\n      geometry.getExtent(),\n      function (segmentDataMatch) {\n        if (\n          segmentDataMatch.geometry === geometry &&\n          (depth === undefined ||\n            segmentDataMatch.depth === undefined ||\n            equals(segmentDataMatch.depth, depth)) &&\n          segmentDataMatch.index > index\n        ) {\n          segmentDataMatch.index += delta;\n        }\n      },\n    );\n  }\n\n  /**\n   * @override\n   */\n  disposeInternal() {\n    super.disposeInternal();\n    if (this.featuresCollection_) {\n      this.featuresCollection_.removeEventListener(\n        CollectionEventType.ADD,\n        this.handleExternalCollectionAdd_,\n      );\n      this.featuresCollection_.removeEventListener(\n        CollectionEventType.REMOVE,\n        this.handleExternalCollectionRemove_,\n      );\n      //change and propertychange event handlers were placed on all features in the external\n      // collection, not just the ones that passed the filter.  Remove these too.\n      for (const feature of this.featuresCollection_.getArray()) {\n        feature.removeEventListener(\n          EventType.CHANGE,\n          this.handleFeatureChange_,\n        );\n        if (this.filterFunctionWasSupplied_) {\n          feature.removeEventListener(\n            ObjectEventType.PROPERTYCHANGE,\n            this.handleFeatureChange_,\n          );\n        }\n      }\n    } else if (this.source_) {\n      this.source_.removeEventListener(\n        VectorEventType.ADDFEATURE,\n        this.handleSourceAdd_,\n      );\n      this.source_.removeEventListener(\n        VectorEventType.REMOVEFEATURE,\n        this.handleSourceRemove_,\n      );\n      //change and propertychange event handlers were placed on all features in the source, not\n      // just the ones that passed the filter.  Remove these too.\n      for (const feature of this.source_.getFeatures()) {\n        feature.removeEventListener(\n          EventType.CHANGE,\n          this.handleFeatureChange_,\n        );\n        if (this.filterFunctionWasSupplied_) {\n          feature.removeEventListener(\n            ObjectEventType.PROPERTYCHANGE,\n            this.handleFeatureChange_,\n          );\n        }\n      }\n    }\n  }\n}\n\n/**\n * @param {SegmentData} a The first segment data.\n * @param {SegmentData} b The second segment data.\n * @return {number} The difference in indexes.\n */\nfunction compareIndexes(a, b) {\n  return a.index - b.index;\n}\n\n/**\n * Returns the distance from a point to a line segment.\n *\n * @param {import(\"../coordinate.js\").Coordinate} pointCoordinates The coordinates of the point from\n *        which to calculate the distance.\n * @param {SegmentData} segmentData The object describing the line\n *        segment we are calculating the distance to.\n * @param {import(\"../proj/Projection.js\").default} projection The view projection.\n * @return {number} The square of the distance between a point and a line segment.\n */\nfunction projectedDistanceToSegmentDataSquared(\n  pointCoordinates,\n  segmentData,\n  projection,\n) {\n  const geometry = segmentData.geometry;\n\n  if (geometry.getType() === 'Circle') {\n    let circleGeometry = /** @type {import(\"../geom/Circle.js\").default} */ (\n      geometry\n    );\n\n    if (segmentData.index === CIRCLE_CIRCUMFERENCE_INDEX) {\n      const userProjection = getUserProjection();\n      if (userProjection) {\n        circleGeometry = circleGeometry\n          .clone()\n          .transform(userProjection, projection);\n      }\n      const distanceToCenterSquared = squaredCoordinateDistance(\n        circleGeometry.getCenter(),\n        fromUserCoordinate(pointCoordinates, projection),\n      );\n      const distanceToCircumference =\n        Math.sqrt(distanceToCenterSquared) - circleGeometry.getRadius();\n      return distanceToCircumference * distanceToCircumference;\n    }\n  }\n\n  const coordinate = fromUserCoordinate(pointCoordinates, projection);\n  tempSegment[0] = fromUserCoordinate(segmentData.segment[0], projection);\n  tempSegment[1] = fromUserCoordinate(segmentData.segment[1], projection);\n  return squaredDistanceToSegment(coordinate, tempSegment);\n}\n\n/**\n * Returns the point closest to a given line segment.\n *\n * @param {import(\"../coordinate.js\").Coordinate} pointCoordinates The point to which a closest point\n *        should be found.\n * @param {SegmentData} segmentData The object describing the line\n *        segment which should contain the closest point.\n * @param {import(\"../proj/Projection.js\").default} projection The view projection.\n * @return {import(\"../coordinate.js\").Coordinate} The point closest to the specified line segment.\n */\nfunction closestOnSegmentData(pointCoordinates, segmentData, projection) {\n  const geometry = segmentData.geometry;\n\n  if (\n    geometry.getType() === 'Circle' &&\n    segmentData.index === CIRCLE_CIRCUMFERENCE_INDEX\n  ) {\n    let circleGeometry = /** @type {import(\"../geom/Circle.js\").default} */ (\n      geometry\n    );\n    const userProjection = getUserProjection();\n    if (userProjection) {\n      circleGeometry = circleGeometry\n        .clone()\n        .transform(userProjection, projection);\n    }\n    return toUserCoordinate(\n      circleGeometry.getClosestPoint(\n        fromUserCoordinate(pointCoordinates, projection),\n      ),\n      projection,\n    );\n  }\n  const coordinate = fromUserCoordinate(pointCoordinates, projection);\n  tempSegment[0] = fromUserCoordinate(segmentData.segment[0], projection);\n  tempSegment[1] = fromUserCoordinate(segmentData.segment[1], projection);\n  return toUserCoordinate(\n    closestOnSegment(coordinate, tempSegment),\n    projection,\n  );\n}\n\n/**\n * @return {import(\"../style/Style.js\").StyleFunction} Styles.\n */\nfunction getDefaultStyleFunction() {\n  const style = createEditingStyle();\n  return function (feature, resolution) {\n    return style['Point'];\n  };\n}\n\nexport default Modify;\n", "/**\n * @module ol/interaction/Select\n */\nimport Collection from '../Collection.js';\nimport CollectionEventType from '../CollectionEventType.js';\nimport Feature from '../Feature.js';\nimport {extend} from '../array.js';\nimport Event from '../events/Event.js';\nimport {never, shiftKeyOnly, singleClick} from '../events/condition.js';\nimport {TRUE} from '../functions.js';\nimport VectorLayer from '../layer/Vector.js';\nimport {createEditingStyle} from '../style/Style.js';\nimport {getUid} from '../util.js';\nimport Interaction from './Interaction.js';\n\n/**\n * @enum {string}\n */\nconst SelectEventType = {\n  /**\n   * Triggered when feature(s) has been (de)selected.\n   * @event SelectEvent#select\n   * @api\n   */\n  SELECT: 'select',\n};\n\n/**\n * A function that takes a {@link module:ol/Feature~Feature} and returns `true` if the feature may be\n * selected or `false` otherwise.\n * @typedef {function(import(\"../Feature.js\").default, import(\"../layer/Layer.js\").default<import(\"../source/Source.js\").default> | undefined):boolean} FilterFunction\n */\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../events/condition.js\").Condition} [addCondition] A function\n * that takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled.\n * By default, this is {@link module:ol/events/condition.never}. Use this if you\n * want to use different events for add and remove instead of `toggle`.\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that\n * takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled. This is the event\n * for the selected features as a whole. By default, this is\n * {@link module:ol/events/condition.singleClick}. Clicking on a feature selects that\n * feature and removes any that were in the selection. Clicking outside any\n * feature removes all from the selection.\n * See `toggle`, `add`, `remove` options for adding/removing extra features to/\n * from the selection.\n * @property {Array<import(\"../layer/Layer.js\").default>|function(import(\"../layer/Layer.js\").default<import(\"../source/Source.js\").default>): boolean} [layers]\n * A list of layers from which features should be selected. Alternatively, a\n * filter function can be provided. The function will be called for each layer\n * in the map and should return `true` for layers that you want to be\n * selectable. If the option is absent, all visible layers will be considered\n * selectable.\n * @property {import(\"../style/Style.js\").StyleLike|null} [style]\n * Style for the selected features. By default the default edit style is used\n * (see {@link module:ol/style/Style~Style}). Set to `null` if this interaction should not apply\n * any style changes for selected features.\n * If set to a falsey value, the selected feature's style will not change.\n * @property {import(\"../events/condition.js\").Condition} [removeCondition] A function\n * that takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled.\n * By default, this is {@link module:ol/events/condition.never}. Use this if you\n * want to use different events for add and remove instead of `toggle`.\n * @property {import(\"../events/condition.js\").Condition} [toggleCondition] A function\n * that takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled. This is in addition\n * to the `condition` event. By default,\n * {@link module:ol/events/condition.shiftKeyOnly}, i.e. pressing `shift` as\n * well as the `condition` event, adds that feature to the current selection if\n * it is not currently selected, and removes it if it is. See `add` and `remove`\n * if you want to use different events instead of a toggle.\n * @property {boolean} [multi=false] A boolean that determines if the default\n * behaviour should select only single features or all (overlapping) features at\n * the clicked map position. The default of `false` means single select.\n * @property {Collection<Feature>} [features]\n * Collection where the interaction will place selected features. Optional. If\n * not set the interaction will create a collection. In any case the collection\n * used by the interaction is returned by\n * {@link module:ol/interaction/Select~Select#getFeatures}.\n * @property {FilterFunction} [filter] A function\n * that takes a {@link module:ol/Feature~Feature} and a\n * {@link module:ol/layer/Layer~Layer} and returns `true` if the feature may be\n * selected or `false` otherwise.\n * @property {number} [hitTolerance=0] Hit-detection tolerance. Pixels inside\n * the radius around the given position will be checked for features.\n */\n\n/**\n * @classdesc\n * Events emitted by {@link module:ol/interaction/Select~Select} instances are instances of\n * this type.\n */\nexport class SelectEvent extends Event {\n  /**\n   * @param {SelectEventType} type The event type.\n   * @param {Array<import(\"../Feature.js\").default>} selected Selected features.\n   * @param {Array<import(\"../Feature.js\").default>} deselected Deselected features.\n   * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Associated\n   *     {@link module:ol/MapBrowserEvent~MapBrowserEvent}.\n   */\n  constructor(type, selected, deselected, mapBrowserEvent) {\n    super(type);\n\n    /**\n     * Selected features array.\n     * @type {Array<import(\"../Feature.js\").default>}\n     * @api\n     */\n    this.selected = selected;\n\n    /**\n     * Deselected features array.\n     * @type {Array<import(\"../Feature.js\").default>}\n     * @api\n     */\n    this.deselected = deselected;\n\n    /**\n     * Associated {@link module:ol/MapBrowserEvent~MapBrowserEvent}.\n     * @type {import(\"../MapBrowserEvent.js\").default}\n     * @api\n     */\n    this.mapBrowserEvent = mapBrowserEvent;\n  }\n}\n\n/**\n * Original feature styles to reset to when features are no longer selected.\n * @type {Object<number, import(\"../style/Style.js\").default|Array<import(\"../style/Style.js\").default>|import(\"../style/Style.js\").StyleFunction>}\n */\nconst originalFeatureStyles = {};\n\n/***\n * @template Return\n * @typedef {import(\"../Observable.js\").OnSignature<import(\"../Observable.js\").EventTypes, import(\"../events/Event.js\").default, Return> &\n *   import(\"../Observable.js\").OnSignature<import(\"../ObjectEventType.js\").Types|\n *     'change:active', import(\"../Object.js\").ObjectEvent, Return> &\n *   import(\"../Observable.js\").OnSignature<'select', SelectEvent, Return> &\n *   import(\"../Observable.js\").CombinedOnSignature<import(\"../Observable.js\").EventTypes|import(\"../ObjectEventType.js\").Types|\n *     'change:active'|'select', Return>} SelectOnSignature\n */\n\n/**\n * @classdesc\n * Interaction for selecting vector features. By default, selected features are\n * styled differently, so this interaction can be used for visual highlighting,\n * as well as selecting features for other actions, such as modification or\n * output. There are three ways of controlling which features are selected:\n * using the browser event as defined by the `condition` and optionally the\n * `toggle`, `add`/`remove`, and `multi` options; a `layers` filter; and a\n * further feature filter using the `filter` option.\n *\n * @fires SelectEvent\n * @api\n */\nclass Select extends Interaction {\n  /**\n   * @param {Options} [options] Options.\n   */\n  constructor(options) {\n    super();\n\n    /***\n     * @type {SelectOnSignature<import(\"../events.js\").EventsKey>}\n     */\n    this.on;\n\n    /***\n     * @type {SelectOnSignature<import(\"../events.js\").EventsKey>}\n     */\n    this.once;\n\n    /***\n     * @type {SelectOnSignature<void>}\n     */\n    this.un;\n\n    options = options ? options : {};\n\n    /**\n     * @private\n     */\n    this.boundAddFeature_ = this.addFeature_.bind(this);\n\n    /**\n     * @private\n     */\n    this.boundRemoveFeature_ = this.removeFeature_.bind(this);\n\n    /**\n     * @private\n     * @type {import(\"../events/condition.js\").Condition}\n     */\n    this.condition_ = options.condition ? options.condition : singleClick;\n\n    /**\n     * @private\n     * @type {import(\"../events/condition.js\").Condition}\n     */\n    this.addCondition_ = options.addCondition ? options.addCondition : never;\n\n    /**\n     * @private\n     * @type {import(\"../events/condition.js\").Condition}\n     */\n    this.removeCondition_ = options.removeCondition\n      ? options.removeCondition\n      : never;\n\n    /**\n     * @private\n     * @type {import(\"../events/condition.js\").Condition}\n     */\n    this.toggleCondition_ = options.toggleCondition\n      ? options.toggleCondition\n      : shiftKeyOnly;\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.multi_ = options.multi ? options.multi : false;\n\n    /**\n     * @private\n     * @type {FilterFunction}\n     */\n    this.filter_ = options.filter ? options.filter : TRUE;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.hitTolerance_ = options.hitTolerance ? options.hitTolerance : 0;\n\n    /**\n     * @private\n     * @type {import(\"../style/Style.js\").default|Array<import(\"../style/Style.js\").default>|import(\"../style/Style.js\").StyleFunction|null}\n     */\n    this.style_ =\n      options.style !== undefined ? options.style : getDefaultStyleFunction();\n\n    /**\n     * @private\n     * @type {Collection<Feature>}\n     */\n    this.features_ = options.features || new Collection();\n\n    /** @type {function(import(\"../layer/Layer.js\").default<import(\"../source/Source.js\").default>): boolean} */\n    let layerFilter;\n    if (options.layers) {\n      if (typeof options.layers === 'function') {\n        layerFilter = options.layers;\n      } else {\n        const layers = options.layers;\n        layerFilter = function (layer) {\n          return layers.includes(layer);\n        };\n      }\n    } else {\n      layerFilter = TRUE;\n    }\n\n    /**\n     * @private\n     * @type {function(import(\"../layer/Layer.js\").default<import(\"../source/Source.js\").default>): boolean}\n     */\n    this.layerFilter_ = layerFilter;\n\n    /**\n     * An association between selected feature (key)\n     * and layer (value)\n     * @private\n     * @type {Object<string, import(\"../layer/Layer.js\").default>}\n     */\n    this.featureLayerAssociation_ = {};\n  }\n\n  /**\n   * @param {import(\"../Feature.js\").default} feature Feature.\n   * @param {import(\"../layer/Layer.js\").default} layer Layer.\n   * @private\n   */\n  addFeatureLayerAssociation_(feature, layer) {\n    this.featureLayerAssociation_[getUid(feature)] = layer;\n  }\n\n  /**\n   * Get the selected features.\n   * @return {Collection<Feature>} Features collection.\n   * @api\n   */\n  getFeatures() {\n    return this.features_;\n  }\n\n  /**\n   * Returns the Hit-detection tolerance.\n   * @return {number} Hit tolerance in pixels.\n   * @api\n   */\n  getHitTolerance() {\n    return this.hitTolerance_;\n  }\n\n  /**\n   * Returns the associated {@link module:ol/layer/Vector~VectorLayer vector layer} of\n   * a selected feature.\n   * @param {import(\"../Feature.js\").default} feature Feature\n   * @return {import('../layer/Vector.js').default} Layer.\n   * @api\n   */\n  getLayer(feature) {\n    return /** @type {import('../layer/Vector.js').default} */ (\n      this.featureLayerAssociation_[getUid(feature)]\n    );\n  }\n\n  /**\n   * Hit-detection tolerance. Pixels inside the radius around the given position\n   * will be checked for features.\n   * @param {number} hitTolerance Hit tolerance in pixels.\n   * @api\n   */\n  setHitTolerance(hitTolerance) {\n    this.hitTolerance_ = hitTolerance;\n  }\n\n  /**\n   * Remove the interaction from its current map, if any,  and attach it to a new\n   * map, if any. Pass `null` to just remove the interaction from the current map.\n   * @param {import(\"../Map.js\").default|null} map Map.\n   * @api\n   * @override\n   */\n  setMap(map) {\n    const currentMap = this.getMap();\n    if (currentMap && this.style_) {\n      this.features_.forEach(this.restorePreviousStyle_.bind(this));\n    }\n    super.setMap(map);\n    if (map) {\n      this.features_.addEventListener(\n        CollectionEventType.ADD,\n        this.boundAddFeature_,\n      );\n      this.features_.addEventListener(\n        CollectionEventType.REMOVE,\n        this.boundRemoveFeature_,\n      );\n\n      if (this.style_) {\n        this.features_.forEach(this.applySelectedStyle_.bind(this));\n      }\n    } else {\n      this.features_.removeEventListener(\n        CollectionEventType.ADD,\n        this.boundAddFeature_,\n      );\n      this.features_.removeEventListener(\n        CollectionEventType.REMOVE,\n        this.boundRemoveFeature_,\n      );\n    }\n  }\n\n  /**\n   * @param {import(\"../Collection.js\").CollectionEvent<Feature>} evt Event.\n   * @private\n   */\n  addFeature_(evt) {\n    const feature = evt.element;\n    if (this.style_) {\n      this.applySelectedStyle_(feature);\n    }\n    if (!this.getLayer(feature)) {\n      const layer = this.findLayerOfFeature_(feature);\n      if (layer) {\n        this.addFeatureLayerAssociation_(feature, layer);\n      }\n    }\n  }\n\n  /**\n   * @param {import(\"../Collection.js\").CollectionEvent<Feature>} evt Event.\n   * @private\n   */\n  removeFeature_(evt) {\n    if (this.style_) {\n      this.restorePreviousStyle_(evt.element);\n    }\n    this.removeFeatureLayerAssociation_(evt.element);\n  }\n\n  /**\n   * @param {Feature} feature Feature of which to get the layer\n   * @return {VectorLayer} layer, if one was found.\n   * @private\n   */\n  findLayerOfFeature_(feature) {\n    const layer = /** @type {VectorLayer} */ (\n      this.getMap()\n        .getAllLayers()\n        .find(function (layer) {\n          if (\n            layer instanceof VectorLayer &&\n            layer.getSource() &&\n            layer.getSource().hasFeature(feature)\n          ) {\n            return layer;\n          }\n        })\n    );\n    return layer;\n  }\n\n  /**\n   * @return {import(\"../style/Style.js\").StyleLike|null} Select style.\n   */\n  getStyle() {\n    return this.style_;\n  }\n\n  /**\n   * @param {Feature} feature Feature\n   * @private\n   */\n  applySelectedStyle_(feature) {\n    const key = getUid(feature);\n    if (!(key in originalFeatureStyles)) {\n      originalFeatureStyles[key] = feature.getStyle();\n    }\n    feature.setStyle(this.style_);\n  }\n\n  /**\n   * @param {Feature} feature Feature\n   * @private\n   */\n  restorePreviousStyle_(feature) {\n    const interactions = this.getMap().getInteractions().getArray();\n    for (let i = interactions.length - 1; i >= 0; --i) {\n      const interaction = interactions[i];\n      if (\n        interaction !== this &&\n        interaction instanceof Select &&\n        interaction.getStyle() &&\n        interaction.getFeatures().getArray().lastIndexOf(feature) !== -1\n      ) {\n        feature.setStyle(interaction.getStyle());\n        return;\n      }\n    }\n\n    const key = getUid(feature);\n    feature.setStyle(originalFeatureStyles[key]);\n    delete originalFeatureStyles[key];\n  }\n\n  /**\n   * @param {Feature} feature Feature.\n   * @private\n   */\n  removeFeatureLayerAssociation_(feature) {\n    delete this.featureLayerAssociation_[getUid(feature)];\n  }\n\n  /**\n   * Try to select a feature as if it was clicked and `addCondition` evaluated to True.\n   * Unlike modifying `select.getFeatures()` directly, this respects the `filter` and `layers` options (except `multi`, which is ignored).\n   * The {@link module:ol/interaction/Select~SelectEvent} fired by this won't have a mapBrowserEvent property\n   * @param {Feature} feature The feature to select\n   * @return {boolean} True if the feature was selected\n   * @api\n   */\n  selectFeature(feature) {\n    const layer = this.findLayerOfFeature_(feature);\n    if (!this.layerFilter_(layer) || !this.filter_(feature, layer)) {\n      return false;\n    }\n    const features = this.getFeatures();\n    if (features.getArray().includes(feature)) {\n      return false;\n    }\n    this.addFeatureLayerAssociation_(feature, layer);\n    features.push(feature);\n    this.dispatchEvent(\n      new SelectEvent(SelectEventType.SELECT, [feature], [], undefined),\n    );\n    return true;\n  }\n\n  /**\n   * Try to deselect a feature as if it was clicked.\n   * Compared to `select.getFeatures().remove(feature)` this causes a SelectEvent.\n   * The {@link module:ol/interaction/Select~SelectEvent} fired by this won't have a mapBrowserEvent property\n   * @param {Feature} feature The feature to deselect\n   * @return {boolean} True if the feature was deselected\n   * @api\n   */\n  deselectFeature(feature) {\n    const features = this.getFeatures();\n    const index = features.getArray().indexOf(feature);\n    if (index === -1) {\n      return false;\n    }\n    features.removeAt(index);\n    this.dispatchEvent(\n      new SelectEvent(SelectEventType.SELECT, [], [feature], undefined),\n    );\n    return true;\n  }\n\n  /**\n   * Try to toggle a feature as if it was clicked and `toggleCondition` was True.\n   * Unlike modifying `select.getFeatures()` directly, this respects the `filter` and `layers` options (except `multi`, which is ignored).\n   * The {@link module:ol/interaction/Select~SelectEvent} fired by this won't have a mapBrowserEvent property\n   * @param {Feature} feature The feature to deselect\n   * @api\n   */\n  toggleFeature(feature) {\n    if (!this.deselectFeature(feature)) {\n      this.selectFeature(feature);\n    }\n  }\n\n  /**\n   * Deselect all features as if a user deselected them.\n   * Compared to `select.getFeatures().clear()` this causes a SelectEvent.\n   * The {@link module:ol/interaction/Select~SelectEvent} fired by this won't have a mapBrowserEvent property\n   * @api\n   */\n  clearSelection() {\n    const features = this.getFeatures();\n    if (features.getLength() !== 0) {\n      const deselected = features.getArray().slice(); // shallow copy\n      features.clear();\n      this.dispatchEvent(\n        new SelectEvent(SelectEventType.SELECT, [], deselected, undefined),\n      );\n    }\n  }\n\n  /**\n   * Handles the {@link module:ol/MapBrowserEvent~MapBrowserEvent map browser event} and may change the\n   * selected state of features.\n   * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n   * @return {boolean} `false` to stop event propagation.\n   * @override\n   */\n  handleEvent(mapBrowserEvent) {\n    if (!this.condition_(mapBrowserEvent)) {\n      return true;\n    }\n    const add = this.addCondition_(mapBrowserEvent);\n    const remove = this.removeCondition_(mapBrowserEvent);\n    const toggle = this.toggleCondition_(mapBrowserEvent);\n    const set = !add && !remove && !toggle;\n    const map = mapBrowserEvent.map;\n    const features = this.getFeatures();\n\n    /**\n     * @type {Array<Feature>}\n     */\n    const deselected = [];\n\n    /**\n     * @type {Array<Feature>}\n     */\n    const selected = [];\n\n    if (set) {\n      // Replace the currently selected feature(s) with the feature(s) at the\n      // pixel, or clear the selected feature(s) if there is no feature at\n      // the pixel.\n      map.forEachFeatureAtPixel(\n        mapBrowserEvent.pixel,\n        (feature, layer) => {\n          if (!(feature instanceof Feature) || !this.filter_(feature, layer)) {\n            return;\n          }\n          this.addFeatureLayerAssociation_(feature, layer);\n          selected.push(feature);\n          return !this.multi_;\n        },\n        {\n          layerFilter: this.layerFilter_,\n          hitTolerance: this.hitTolerance_,\n        },\n      );\n\n      for (let i = features.getLength() - 1; i >= 0; --i) {\n        const feature = features.item(i);\n        const index = selected.indexOf(feature);\n        if (index === -1) {\n          features.removeAt(i);\n          deselected.push(feature);\n        } else {\n          // feature is already selected\n          selected.splice(index, 1);\n        }\n      }\n      if (selected.length !== 0) {\n        features.extend(selected);\n      }\n    } else {\n      // Modify the currently selected feature(s).\n      map.forEachFeatureAtPixel(\n        mapBrowserEvent.pixel,\n        (feature, layer) => {\n          if (!(feature instanceof Feature) || !this.filter_(feature, layer)) {\n            return;\n          }\n          const hasFeature = features.getArray().includes(feature);\n          if (hasFeature && (remove || toggle)) {\n            deselected.push(feature);\n          } else if (!hasFeature && (add || toggle)) {\n            this.addFeatureLayerAssociation_(feature, layer);\n            selected.push(feature);\n          }\n          return !this.multi_; // stop if not multi\n        },\n        {\n          layerFilter: this.layerFilter_,\n          hitTolerance: this.hitTolerance_,\n        },\n      );\n      for (let j = deselected.length - 1; j >= 0; --j) {\n        features.remove(deselected[j]);\n      }\n      features.extend(selected);\n    }\n    if (selected.length > 0 || deselected.length > 0) {\n      this.dispatchEvent(\n        new SelectEvent(\n          SelectEventType.SELECT,\n          selected,\n          deselected,\n          mapBrowserEvent,\n        ),\n      );\n    }\n    return true;\n  }\n}\n\n/**\n * @return {import(\"../style/Style.js\").StyleFunction} Styles.\n */\nfunction getDefaultStyleFunction() {\n  const styles = createEditingStyle();\n  extend(styles['Polygon'], styles['LineString']);\n  extend(styles['GeometryCollection'], styles['LineString']);\n\n  return function (feature) {\n    if (!feature.getGeometry()) {\n      return null;\n    }\n    return styles[feature.getGeometry().getType()];\n  };\n}\n\nexport default Select;\n", "/**\n * @module ol/events/SnapEvent\n */\nimport Event from './Event.js';\n\n/**\n * @enum {string}\n */\nexport const SnapEventType = {\n  /**\n   * Triggered upon snapping to vertex or edge\n   * @event SnapEvent#snap\n   * @api\n   */\n  SNAP: 'snap',\n  /**\n   * Triggered if no longer snapped\n   * @event SnapEvent#unsnap\n   * @api\n   */\n  UNSNAP: 'unsnap',\n};\n\n/**\n * @classdesc\n * Events emitted by {@link module:ol/interaction/Snap~Snap} instances are instances of this\n */\nexport class SnapEvent extends Event {\n  /**\n   * @param {SnapEventType} type Type.\n   * @param {Object} options Options.\n   * @param {import(\"../coordinate.js\").Coordinate} options.vertex The snapped vertex.\n   * @param {import(\"../coordinate.js\").Coordinate} options.vertexPixel The pixel of the snapped vertex.\n   * @param {import(\"../Feature.js\").default} options.feature The feature being snapped.\n   * @param {Array<import(\"../coordinate.js\").Coordinate>|null} options.segment Segment, or `null` if snapped to a vertex.\n   */\n  constructor(type, options) {\n    super(type);\n    /**\n     * The Map coordinate of the snapped point.\n     * @type {import(\"../coordinate.js\").Coordinate}\n     * @api\n     */\n    this.vertex = options.vertex;\n    /**\n     * The Map pixel of the snapped point.\n     * @type {Array<number>&Array<number>}\n     * @api\n     */\n    this.vertexPixel = options.vertexPixel;\n    /**\n     * The feature closest to the snapped point.\n     * @type {import(\"../Feature.js\").default<import(\"../geom/Geometry.js\").default>}\n     * @api\n     */\n    this.feature = options.feature;\n    /**\n     * The segment closest to the snapped point, if snapped to a segment.\n     * @type {Array<import(\"../coordinate.js\").Coordinate>|null}\n     * @api\n     */\n    this.segment = options.segment;\n  }\n}\n", "/**\n * @module ol/interaction/Snap\n */\nimport CollectionEventType from '../CollectionEventType.js';\nimport {\n  closestOnCircle,\n  closestOnSegment,\n  squaredDistance,\n} from '../coordinate.js';\nimport {listen, unlistenByKey} from '../events.js';\nimport EventType from '../events/EventType.js';\nimport {SnapEvent, SnapEventType} from '../events/SnapEvent.js';\nimport {\n  boundingExtent,\n  buffer,\n  createEmpty,\n  intersects as intersectsExtent,\n} from '../extent.js';\nimport {FALSE, TRUE} from '../functions.js';\nimport {fromCircle} from '../geom/Polygon.js';\nimport {getIntersectionPoint} from '../geom/flat/segments.js';\nimport {clear} from '../obj.js';\nimport {\n  fromUserCoordinate,\n  getUserProjection,\n  toUserCoordinate,\n  toUserExtent,\n} from '../proj.js';\nimport VectorEventType from '../source/VectorEventType.js';\nimport RBush from '../structs/RBush.js';\nimport {getUid} from '../util.js';\nimport PointerInteraction from './Pointer.js';\n\n/**\n * @typedef {Array<import(\"../coordinate.js\").Coordinate>} Segment\n * An array of two coordinates representing a line segment, or an array of one\n * coordinate representing a point.\n */\n\n/**\n * @typedef {Object} SegmentData\n * @property {import(\"../Feature.js\").default} feature Feature.\n * @property {import(\"../Feature.js\").default} [intersectionFeature] Feature which intersects.\n * @property {Segment} segment Segment.\n */\n\n/**\n * @template {import(\"../geom/Geometry.js\").default} [GeometryType=import(\"../geom/Geometry.js\").default]\n * @typedef {(geometry: GeometryType, projection?: import(\"../proj/Projection.js\").default) => Array<Segment>} Segmenter\n * A function taking a {@link module:ol/geom/Geometry~Geometry} as argument and returning an array of {@link Segment}s.\n */\n\n/**\n * Each segmenter specified here will override the default segmenter for the\n * corresponding geometry type. To exclude all geometries of a specific geometry type from being snapped to,\n * set the segmenter to `null`.\n * @typedef {Object} Segmenters\n * @property {Segmenter<import(\"../geom/Point.js\").default>|null} [Point] Point segmenter.\n * @property {Segmenter<import(\"../geom/LineString.js\").default>|null} [LineString] LineString segmenter.\n * @property {Segmenter<import(\"../geom/Polygon.js\").default>|null} [Polygon] Polygon segmenter.\n * @property {Segmenter<import(\"../geom/Circle.js\").default>|null} [Circle] Circle segmenter.\n * @property {Segmenter<import(\"../geom/GeometryCollection.js\").default>|null} [GeometryCollection] GeometryCollection segmenter.\n * @property {Segmenter<import(\"../geom/MultiPoint.js\").default>|null} [MultiPoint] MultiPoint segmenter.\n * @property {Segmenter<import(\"../geom/MultiLineString.js\").default>|null} [MultiLineString] MultiLineString segmenter.\n * @property {Segmenter<import(\"../geom/MultiPolygon.js\").default>|null} [MultiPolygon] MultiPolygon segmenter.\n */\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../Collection.js\").default<import(\"../Feature.js\").default>} [features] Snap to these features. Either this option or source should be provided.\n * @property {import(\"../source/Vector.js\").default} [source] Snap to features from this source. Either this option or features should be provided\n * @property {boolean} [edge=true] Snap to edges.\n * @property {boolean} [vertex=true] Snap to vertices.\n * @property {boolean} [intersection=false] Snap to intersections between segments.\n * @property {number} [pixelTolerance=10] Pixel tolerance for considering the pointer close enough to a segment or\n * vertex for snapping.\n * @property {Segmenters} [segmenters] Custom segmenters by {@link module:ol/geom/Geometry~Type}. By default, the\n * following segmenters are used:\n *   - `Point`: A one-dimensional segment (e.g. `[[10, 20]]`) representing the point.\n *   - `LineString`: One two-dimensional segment (e.g. `[[10, 20], [30, 40]]`) for each segment of the linestring.\n *   - `Polygon`: One two-dimensional segment for each segment of the exterior ring and the interior rings.\n *   - `Circle`: One two-dimensional segment for each segment of a regular polygon with 32 points representing the circle circumference.\n *   - `GeometryCollection`: All segments of the contained geometries.\n *   - `MultiPoint`: One one-dimensional segment for each point.\n *   - `MultiLineString`: One two-dimensional segment for each segment of the linestrings.\n *   - `MultiPolygon`: One two-dimensional segment for each segment of the polygons.\n */\n\n/**\n * Information about the last snapped state.\n * @typedef {Object} SnappedInfo\n * @property {import(\"../coordinate.js\").Coordinate|null} vertex - The snapped vertex.\n * @property {import(\"../pixel.js\").Pixel|null} vertexPixel - The pixel of the snapped vertex.\n * @property {import(\"../Feature.js\").default|null} feature - The feature being snapped.\n * @property {Segment|null} segment - Segment, or `null` if snapped to a vertex.\n */\n\n/***\n * @type {Object<string, Segmenter>}\n */\nconst GEOMETRY_SEGMENTERS = {\n  /**\n   * @param {import(\"../geom/Circle.js\").default} geometry Geometry.\n   * @param {import(\"../proj/Projection.js\").default} projection Projection.\n   * @return {Array<Segment>} Segments\n   */\n  Circle(geometry, projection) {\n    let circleGeometry = geometry;\n    const userProjection = getUserProjection();\n    if (userProjection) {\n      circleGeometry = circleGeometry\n        .clone()\n        .transform(userProjection, projection);\n    }\n    const polygon = fromCircle(circleGeometry);\n    if (userProjection) {\n      polygon.transform(projection, userProjection);\n    }\n    return GEOMETRY_SEGMENTERS.Polygon(polygon);\n  },\n\n  /**\n   * @param {import(\"../geom/GeometryCollection.js\").default} geometry Geometry.\n   * @param {import(\"../proj/Projection.js\").default} projection Projection.\n   * @return {Array<Segment>} Segments\n   */\n  GeometryCollection(geometry, projection) {\n    /** @type {Array<Array<Segment>>} */\n    const segments = [];\n    const geometries = geometry.getGeometriesArray();\n    for (let i = 0; i < geometries.length; ++i) {\n      const segmenter = this[geometries[i].getType()];\n      if (segmenter) {\n        segments.push(segmenter(geometries[i], projection));\n      }\n    }\n    return segments.flat();\n  },\n\n  /**\n   * @param {import(\"../geom/LineString.js\").default} geometry Geometry.\n   * @return {Array<Segment>} Segments\n   */\n  LineString(geometry) {\n    /** @type {Array<Segment>} */\n    const segments = [];\n    const coordinates = geometry.getFlatCoordinates();\n    const stride = geometry.getStride();\n    for (let i = 0, ii = coordinates.length - stride; i < ii; i += stride) {\n      segments.push([\n        coordinates.slice(i, i + 2),\n        coordinates.slice(i + stride, i + stride + 2),\n      ]);\n    }\n    return segments;\n  },\n\n  /**\n   * @param {import(\"../geom/MultiLineString.js\").default} geometry Geometry.\n   * @return {Array<Segment>} Segments\n   */\n  MultiLineString(geometry) {\n    /** @type {Array<Segment>} */\n    const segments = [];\n    const coordinates = geometry.getFlatCoordinates();\n    const stride = geometry.getStride();\n    const ends = geometry.getEnds();\n    let offset = 0;\n    for (let i = 0, ii = ends.length; i < ii; ++i) {\n      const end = ends[i];\n      for (let j = offset, jj = end - stride; j < jj; j += stride) {\n        segments.push([\n          coordinates.slice(j, j + 2),\n          coordinates.slice(j + stride, j + stride + 2),\n        ]);\n      }\n      offset = end;\n    }\n    return segments;\n  },\n\n  /**\n   * @param {import(\"../geom/MultiPoint.js\").default} geometry Geometry.\n   * @return {Array<Segment>} Segments\n   */\n  MultiPoint(geometry) {\n    /** @type {Array<Segment>} */\n    const segments = [];\n    const coordinates = geometry.getFlatCoordinates();\n    const stride = geometry.getStride();\n    for (let i = 0, ii = coordinates.length; i < ii; i += stride) {\n      segments.push([coordinates.slice(i, i + 2)]);\n    }\n    return segments;\n  },\n\n  /**\n   * @param {import(\"../geom/MultiPolygon.js\").default} geometry Geometry.\n   * @return {Array<Segment>} Segments\n   */\n  MultiPolygon(geometry) {\n    /** @type {Array<Segment>} */\n    const segments = [];\n    const coordinates = geometry.getFlatCoordinates();\n    const stride = geometry.getStride();\n    const endss = geometry.getEndss();\n    let offset = 0;\n    for (let i = 0, ii = endss.length; i < ii; ++i) {\n      const ends = endss[i];\n      for (let j = 0, jj = ends.length; j < jj; ++j) {\n        const end = ends[j];\n        for (let k = offset, kk = end - stride; k < kk; k += stride) {\n          segments.push([\n            coordinates.slice(k, k + 2),\n            coordinates.slice(k + stride, k + stride + 2),\n          ]);\n        }\n        offset = end;\n      }\n    }\n    return segments;\n  },\n\n  /**\n   * @param {import(\"../geom/Point.js\").default} geometry Geometry.\n   * @return {Array<Segment>} Segments\n   */\n  Point(geometry) {\n    return [[geometry.getFlatCoordinates().slice(0, 2)]];\n  },\n\n  /**\n   * @param {import(\"../geom/Polygon.js\").default} geometry Geometry.\n   * @return {Array<Segment>} Segments\n   */\n  Polygon(geometry) {\n    /** @type {Array<Segment>} */\n    const segments = [];\n    const coordinates = geometry.getFlatCoordinates();\n    const stride = geometry.getStride();\n    const ends = geometry.getEnds();\n    let offset = 0;\n    for (let i = 0, ii = ends.length; i < ii; ++i) {\n      const end = ends[i];\n      for (let j = offset, jj = end - stride; j < jj; j += stride) {\n        segments.push([\n          coordinates.slice(j, j + 2),\n          coordinates.slice(j + stride, j + stride + 2),\n        ]);\n      }\n      offset = end;\n    }\n    return segments;\n  },\n};\n\n/**\n * @param  {import(\"../source/Vector.js\").VectorSourceEvent|import(\"../Collection.js\").CollectionEvent<import(\"../Feature.js\").default>} evt Event.\n * @return {import(\"../Feature.js\").default|null} Feature.\n */\nfunction getFeatureFromEvent(evt) {\n  if (\n    /** @type {import(\"../source/Vector.js\").VectorSourceEvent} */ (evt).feature\n  ) {\n    return /** @type {import(\"../source/Vector.js\").VectorSourceEvent} */ (evt)\n      .feature;\n  }\n  if (\n    /** @type {import(\"../Collection.js\").CollectionEvent<import(\"../Feature.js\").default>} */ (\n      evt\n    ).element\n  ) {\n    return /** @type {import(\"../Collection.js\").CollectionEvent<import(\"../Feature.js\").default>} */ (\n      evt\n    ).element;\n  }\n  return null;\n}\n\nconst tempSegment = [];\n/** @type {Array<import('../extent.js').Extent>} */\nconst tempExtents = [];\n/** @type {Array<SegmentData>} */\nconst tempSegmentData = [];\n\n/***\n * @template Return\n * @typedef {import(\"../Observable.js\").OnSignature<import(\"../Observable.js\").EventTypes, import(\"../events/Event.js\").default, Return> &\n *   import(\"../Observable.js\").OnSignature<import(\"../ObjectEventType.js\").Types|\n *     'change:active', import(\"../Object.js\").ObjectEvent, Return> &\n *   import(\"../Observable.js\").OnSignature<'snap'|'unsnap', SnapEvent, Return> &\n *   import(\"../Observable.js\").CombinedOnSignature<import(\"../Observable.js\").EventTypes|import(\"../ObjectEventType.js\").Types|\n *     'change:active'|'snap'|'unsnap', Return>} SnapOnSignature\n */\n\n/**\n * @classdesc\n * Handles snapping of vector features while modifying or drawing them.  The\n * features can come from a {@link module:ol/source/Vector~VectorSource} or {@link module:ol/Collection~Collection}\n * Any interaction object that allows the user to interact\n * with the features using the mouse can benefit from the snapping, as long\n * as it is added before.\n *\n * The snap interaction modifies map browser event `coordinate` and `pixel`\n * properties to force the snap to occur to any interaction that uses them.\n *\n * Example:\n *\n *     import Snap from 'ol/interaction/Snap.js';\n *\n *     const snap = new Snap({\n *       source: source\n *     });\n *\n *     map.addInteraction(snap);\n *\n * @fires SnapEvent\n * @api\n */\nclass Snap extends PointerInteraction {\n  /**\n   * @param {Options} [options] Options.\n   */\n  constructor(options) {\n    options = options ? options : {};\n\n    super({\n      handleDownEvent: TRUE,\n      stopDown: FALSE,\n    });\n\n    /***\n     * @type {SnapOnSignature<import(\"../events.js\").EventsKey>}\n     */\n    this.on;\n\n    /***\n     * @type {SnapOnSignature<import(\"../events.js\").EventsKey>}\n     */\n    this.once;\n\n    /***\n     * @type {SnapOnSignature<void>}\n     */\n    this.un;\n\n    /**\n     * @type {import(\"../source/Vector.js\").default|null}\n     * @private\n     */\n    this.source_ = options.source ? options.source : null;\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.vertex_ = options.vertex !== undefined ? options.vertex : true;\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.edge_ = options.edge !== undefined ? options.edge : true;\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.intersection_ =\n      options.intersection !== undefined ? options.intersection : false;\n\n    /**\n     * @type {import(\"../Collection.js\").default<import(\"../Feature.js\").default>|null}\n     * @private\n     */\n    this.features_ = options.features ? options.features : null;\n\n    /**\n     * @type {Array<import(\"../events.js\").EventsKey>}\n     * @private\n     */\n    this.featuresListenerKeys_ = [];\n\n    /**\n     * @type {Object<string, import(\"../events.js\").EventsKey>}\n     * @private\n     */\n    this.featureChangeListenerKeys_ = {};\n\n    /**\n     * Extents are preserved so indexed segment can be quickly removed\n     * when its feature geometry changes\n     * @type {Object<string, import(\"../extent.js\").Extent>}\n     * @private\n     */\n    this.indexedFeaturesExtents_ = {};\n\n    /**\n     * If a feature geometry changes while a pointer drag|move event occurs, the\n     * feature doesn't get updated right away.  It will be at the next 'pointerup'\n     * event fired.\n     * @type {!Object<string, import(\"../Feature.js\").default>}\n     * @private\n     */\n    this.pendingFeatures_ = {};\n\n    /**\n     * @type {number}\n     * @private\n     */\n    this.pixelTolerance_ =\n      options.pixelTolerance !== undefined ? options.pixelTolerance : 10;\n\n    /**\n     * Segment RTree for each layer\n     * @type {import(\"../structs/RBush.js\").default<SegmentData>}\n     * @private\n     */\n    this.rBush_ = new RBush();\n\n    /**\n     * Holds information about the last snapped state.\n     * @type {SnappedInfo|null}\n     * @private\n     */\n    this.snapped_ = null;\n\n    /**\n     * @type {Object<string, Segmenter>}\n     * @private\n     */\n    this.segmenters_ = Object.assign(\n      {},\n      GEOMETRY_SEGMENTERS,\n      options.segmenters,\n    );\n  }\n\n  /**\n   * Add a feature to the collection of features that we may snap to.\n   * @param {import(\"../Feature.js\").default} feature Feature.\n   * @param {boolean} [register] Whether to listen to the feature change or not\n   *     Defaults to `true`.\n   * @api\n   */\n  addFeature(feature, register) {\n    register = register !== undefined ? register : true;\n    const feature_uid = getUid(feature);\n    const geometry = feature.getGeometry();\n    if (geometry) {\n      const segmenter = this.segmenters_[geometry.getType()];\n      if (segmenter) {\n        this.indexedFeaturesExtents_[feature_uid] =\n          geometry.getExtent(createEmpty());\n        const segments = segmenter.call(\n          this.segmenters_,\n          geometry,\n          this.getMap().getView().getProjection(),\n        );\n        let segmentCount = segments.length;\n        for (let i = 0; i < segmentCount; ++i) {\n          const segment = segments[i];\n          tempExtents[i] = boundingExtent(segment);\n          tempSegmentData[i] = {\n            feature: feature,\n            segment: segment,\n          };\n        }\n\n        if (this.intersection_) {\n          for (let j = 0, jj = segments.length; j < jj; ++j) {\n            const segment = segments[j];\n            if (segment.length === 1) {\n              continue;\n            }\n            const extent = tempExtents[j];\n            // Calculate intersections with own segments excluding self and\n            // neighbors\n            for (let k = 0, kk = j - 1; k < kk; ++k) {\n              const otherSegment = segments[k];\n              if (\n                otherSegment.length === 1 ||\n                !intersectsExtent(extent, tempExtents[k])\n              ) {\n                continue;\n              }\n              const intersection = getIntersectionPoint(segment, otherSegment);\n              if (!intersection) {\n                continue;\n              }\n              const intersectionSegment = [intersection];\n              tempExtents[segmentCount] = boundingExtent(intersectionSegment);\n              tempSegmentData[segmentCount++] = {\n                feature,\n                intersectionFeature: feature,\n                segment: intersectionSegment,\n              };\n            }\n            // Calculate intersections with existing segments\n            const otherSegments = this.rBush_.getInExtent(tempExtents[j]);\n            for (let k = 0, kk = otherSegments.length; k < kk; ++k) {\n              const otherSegment = otherSegments[k].segment;\n              if (otherSegment.length === 1) {\n                continue;\n              }\n              const intersection = getIntersectionPoint(segment, otherSegment);\n              if (!intersection) {\n                continue;\n              }\n              const intersectionSegment = [intersection];\n              tempExtents[segmentCount] = boundingExtent(intersectionSegment);\n              tempSegmentData[segmentCount++] = {\n                feature,\n                intersectionFeature: otherSegments[k].feature,\n                segment: intersectionSegment,\n              };\n            }\n          }\n        }\n\n        if (segmentCount === 1) {\n          this.rBush_.insert(tempExtents[0], tempSegmentData[0]);\n        } else {\n          tempExtents.length = segmentCount;\n          tempSegmentData.length = segmentCount;\n          this.rBush_.load(tempExtents, tempSegmentData);\n        }\n      }\n    }\n\n    if (register) {\n      if (this.featureChangeListenerKeys_[feature_uid]) {\n        unlistenByKey(this.featureChangeListenerKeys_[feature_uid]);\n      }\n      this.featureChangeListenerKeys_[feature_uid] = listen(\n        feature,\n        EventType.CHANGE,\n        this.handleFeatureChange_,\n        this,\n      );\n    }\n  }\n\n  /**\n   * @return {import(\"../Collection.js\").default<import(\"../Feature.js\").default>|Array<import(\"../Feature.js\").default>} Features.\n   * @private\n   */\n  getFeatures_() {\n    /** @type {import(\"../Collection.js\").default<import(\"../Feature.js\").default>|Array<import(\"../Feature.js\").default>} */\n    let features;\n    if (this.features_) {\n      features = this.features_;\n    } else if (this.source_) {\n      features = this.source_.getFeatures();\n    }\n    return features;\n  }\n\n  /**\n   * Checks if two snap data sets are equal.\n   * Compares the segment and the feature.\n   *\n   * @param {SnappedInfo} data1 The first snap data set.\n   * @param {SnappedInfo} data2 The second snap data set.\n   * @return {boolean} `true` if the data sets are equal, otherwise `false`.\n   * @private\n   */\n  areSnapDataEqual_(data1, data2) {\n    return data1.segment === data2.segment && data1.feature === data2.feature;\n  }\n\n  /**\n   * @param {import(\"../MapBrowserEvent.js\").default} evt Map browser event.\n   * @return {boolean} `false` to stop event propagation.\n   * @api\n   * @override\n   */\n  handleEvent(evt) {\n    const result = this.snapTo(evt.pixel, evt.coordinate, evt.map);\n\n    if (result) {\n      evt.coordinate = result.vertex.slice(0, 2);\n      evt.pixel = result.vertexPixel;\n\n      // Dispatch UNSNAP event if already snapped\n      if (this.snapped_ && !this.areSnapDataEqual_(this.snapped_, result)) {\n        this.dispatchEvent(new SnapEvent(SnapEventType.UNSNAP, this.snapped_));\n      }\n\n      this.snapped_ = {\n        vertex: evt.coordinate,\n        vertexPixel: evt.pixel,\n        feature: result.feature,\n        segment: result.segment,\n      };\n      this.dispatchEvent(new SnapEvent(SnapEventType.SNAP, this.snapped_));\n    } else if (this.snapped_) {\n      // Dispatch UNSNAP event if no longer snapped\n      this.dispatchEvent(new SnapEvent(SnapEventType.UNSNAP, this.snapped_));\n      this.snapped_ = null;\n    }\n\n    return super.handleEvent(evt);\n  }\n\n  /**\n   * @param {import(\"../source/Vector.js\").VectorSourceEvent|import(\"../Collection.js\").CollectionEvent<import(\"../Feature.js\").default>} evt Event.\n   * @private\n   */\n  handleFeatureAdd_(evt) {\n    const feature = getFeatureFromEvent(evt);\n    if (feature) {\n      this.addFeature(feature);\n    }\n  }\n\n  /**\n   * @param {import(\"../source/Vector.js\").VectorSourceEvent|import(\"../Collection.js\").CollectionEvent<import(\"../Feature.js\").default>} evt Event.\n   * @private\n   */\n  handleFeatureRemove_(evt) {\n    const feature = getFeatureFromEvent(evt);\n    if (feature) {\n      this.removeFeature(feature);\n      delete this.pendingFeatures_[getUid(feature)];\n    }\n  }\n\n  /**\n   * @param {import(\"../events/Event.js\").default} evt Event.\n   * @private\n   */\n  handleFeatureChange_(evt) {\n    const feature = /** @type {import(\"../Feature.js\").default} */ (evt.target);\n    if (this.handlingDownUpSequence) {\n      this.pendingFeatures_[getUid(feature)] = feature;\n    } else {\n      this.updateFeature_(feature);\n    }\n  }\n\n  /**\n   * Handle pointer up events.\n   * @param {import(\"../MapBrowserEvent.js\").default} evt Event.\n   * @return {boolean} If the event was consumed.\n   * @override\n   */\n  handleUpEvent(evt) {\n    const featuresToUpdate = Object.values(this.pendingFeatures_);\n    if (featuresToUpdate.length) {\n      for (const feature of featuresToUpdate) {\n        this.updateFeature_(feature);\n      }\n      clear(this.pendingFeatures_);\n    }\n    return false;\n  }\n\n  /**\n   * Remove a feature from the collection of features that we may snap to.\n   * @param {import(\"../Feature.js\").default} feature Feature\n   * @param {boolean} [unlisten] Whether to unlisten to the feature change\n   *     or not. Defaults to `true`.\n   * @api\n   */\n  removeFeature(feature, unlisten) {\n    const unregister = unlisten !== undefined ? unlisten : true;\n    const feature_uid = getUid(feature);\n    const extent = this.indexedFeaturesExtents_[feature_uid];\n    if (extent) {\n      const rBush = this.rBush_;\n      rBush.getInExtent(extent).forEach((node) => {\n        if (feature === node.feature || feature === node.intersectionFeature) {\n          rBush.remove(node);\n        }\n      });\n    }\n\n    if (unregister) {\n      unlistenByKey(this.featureChangeListenerKeys_[feature_uid]);\n      delete this.featureChangeListenerKeys_[feature_uid];\n    }\n  }\n\n  /**\n   * Remove the interaction from its current map and attach it to the new map.\n   * Subclasses may set up event handlers to get notified about changes to\n   * the map here.\n   * @param {import(\"../Map.js\").default} map Map.\n   * @override\n   */\n  setMap(map) {\n    const currentMap = this.getMap();\n    const keys = this.featuresListenerKeys_;\n    let features = this.getFeatures_();\n    if (!Array.isArray(features)) {\n      features = features.getArray();\n    }\n\n    if (currentMap) {\n      keys.forEach(unlistenByKey);\n      keys.length = 0;\n      this.rBush_.clear();\n      Object.values(this.featureChangeListenerKeys_).forEach(unlistenByKey);\n      this.featureChangeListenerKeys_ = {};\n    }\n    super.setMap(map);\n\n    if (map) {\n      if (this.features_) {\n        keys.push(\n          listen(\n            this.features_,\n            CollectionEventType.ADD,\n            this.handleFeatureAdd_,\n            this,\n          ),\n          listen(\n            this.features_,\n            CollectionEventType.REMOVE,\n            this.handleFeatureRemove_,\n            this,\n          ),\n        );\n      } else if (this.source_) {\n        keys.push(\n          listen(\n            this.source_,\n            VectorEventType.ADDFEATURE,\n            this.handleFeatureAdd_,\n            this,\n          ),\n          listen(\n            this.source_,\n            VectorEventType.REMOVEFEATURE,\n            this.handleFeatureRemove_,\n            this,\n          ),\n        );\n      }\n      for (const feature of features) {\n        this.addFeature(feature);\n      }\n    }\n  }\n\n  /**\n   * @param {import(\"../pixel.js\").Pixel} pixel Pixel\n   * @param {import(\"../coordinate.js\").Coordinate} pixelCoordinate Coordinate\n   * @param {import(\"../Map.js\").default} map Map.\n   * @return {SnappedInfo|null} Snap result\n   */\n  snapTo(pixel, pixelCoordinate, map) {\n    const projection = map.getView().getProjection();\n    const projectedCoordinate = fromUserCoordinate(pixelCoordinate, projection);\n\n    const box = toUserExtent(\n      buffer(\n        boundingExtent([projectedCoordinate]),\n        map.getView().getResolution() * this.pixelTolerance_,\n      ),\n      projection,\n    );\n\n    const segments = this.rBush_.getInExtent(box);\n    const segmentsLength = segments.length;\n    if (segmentsLength === 0) {\n      return null;\n    }\n\n    let closestVertex;\n    let minSquaredDistance = Infinity;\n    let closestFeature;\n    let closestSegment = null;\n\n    const squaredPixelTolerance = this.pixelTolerance_ * this.pixelTolerance_;\n    const getResult = () => {\n      if (!closestVertex) {\n        return null;\n      }\n      const vertexPixel = map.getPixelFromCoordinate(closestVertex);\n      const squaredPixelDistance = squaredDistance(pixel, vertexPixel);\n      if (squaredPixelDistance > squaredPixelTolerance) {\n        return null;\n      }\n      return {\n        vertex: closestVertex,\n        vertexPixel: [Math.round(vertexPixel[0]), Math.round(vertexPixel[1])],\n        feature: closestFeature,\n        segment: closestSegment,\n      };\n    };\n\n    if (this.vertex_ || this.intersection_) {\n      for (let i = 0; i < segmentsLength; ++i) {\n        const segmentData = segments[i];\n        if (segmentData.feature.getGeometry().getType() !== 'Circle') {\n          for (const vertex of segmentData.segment) {\n            const tempVertexCoord = fromUserCoordinate(vertex, projection);\n            const delta = squaredDistance(projectedCoordinate, tempVertexCoord);\n            if (\n              delta < minSquaredDistance &&\n              ((this.intersection_ && segmentData.intersectionFeature) ||\n                (this.vertex_ && !segmentData.intersectionFeature))\n            ) {\n              closestVertex = vertex;\n              minSquaredDistance = delta;\n              closestFeature = segmentData.feature;\n            }\n          }\n        }\n      }\n      const result = getResult();\n      if (result) {\n        return result;\n      }\n    }\n\n    if (this.edge_) {\n      for (let i = 0; i < segmentsLength; ++i) {\n        let vertex = null;\n        const segmentData = segments[i];\n        if (segmentData.feature.getGeometry().getType() === 'Circle') {\n          let circleGeometry = segmentData.feature.getGeometry();\n          const userProjection = getUserProjection();\n          if (userProjection) {\n            circleGeometry = circleGeometry\n              .clone()\n              .transform(userProjection, projection);\n          }\n          vertex = closestOnCircle(\n            projectedCoordinate,\n            /** @type {import(\"../geom/Circle.js\").default} */ (circleGeometry),\n          );\n        } else {\n          const [segmentStart, segmentEnd] = segmentData.segment;\n          // points have only one coordinate\n          if (segmentEnd) {\n            tempSegment[0] = fromUserCoordinate(segmentStart, projection);\n            tempSegment[1] = fromUserCoordinate(segmentEnd, projection);\n            vertex = closestOnSegment(projectedCoordinate, tempSegment);\n          }\n        }\n        if (vertex) {\n          const delta = squaredDistance(projectedCoordinate, vertex);\n          if (delta < minSquaredDistance) {\n            closestVertex = toUserCoordinate(vertex, projection);\n            closestSegment =\n              segmentData.feature.getGeometry().getType() === 'Circle'\n                ? null\n                : segmentData.segment;\n            minSquaredDistance = delta;\n            closestFeature = segmentData.feature;\n          }\n        }\n      }\n\n      const result = getResult();\n      if (result) {\n        return result;\n      }\n    }\n\n    return null;\n  }\n\n  /**\n   * @param {import(\"../Feature.js\").default} feature Feature\n   * @private\n   */\n  updateFeature_(feature) {\n    this.removeFeature(feature, false);\n    this.addFeature(feature, false);\n  }\n}\n\nexport default Snap;\n", "/**\n * @module ol/interaction/Translate\n */\nimport Collection from '../Collection.js';\nimport Feature from '../Feature.js';\nimport Event from '../events/Event.js';\nimport {always} from '../events/condition.js';\nimport {TRUE} from '../functions.js';\nimport {fromUserCoordinate, getUserProjection} from '../proj.js';\nimport PointerInteraction from './Pointer.js';\nimport InteractionProperty from './Property.js';\n\n/**\n * @enum {string}\n */\nconst TranslateEventType = {\n  /**\n   * Triggered upon feature translation start.\n   * @event TranslateEvent#translatestart\n   * @api\n   */\n  TRANSLATESTART: 'translatestart',\n  /**\n   * Triggered upon feature translation.\n   * @event TranslateEvent#translating\n   * @api\n   */\n  TRANSLATING: 'translating',\n  /**\n   * Triggered upon feature translation end.\n   * @event TranslateEvent#translateend\n   * @api\n   */\n  TRANSLATEEND: 'translateend',\n};\n\n/**\n * A function that takes a {@link module:ol/Feature~Feature} or\n * {@link module:ol/render/Feature~RenderFeature} and a\n * {@link module:ol/layer/Layer~Layer} and returns `true` if the feature may be\n * translated or `false` otherwise.\n * @typedef {function(Feature, import(\"../layer/Layer.js\").default<import(\"../source/Source.js\").default>):boolean} FilterFunction\n */\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that\n * takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled.\n * Default is {@link module:ol/events/condition.always}.\n * @property {Collection<Feature>} [features] Features contained in this collection will be able to be translated together.\n * @property {Array<import(\"../layer/Layer.js\").default>|function(import(\"../layer/Layer.js\").default<import(\"../source/Source.js\").default>): boolean} [layers] A list of layers from which features should be\n * translated. Alternatively, a filter function can be provided. The\n * function will be called for each layer in the map and should return\n * `true` for layers that you want to be translatable. If the option is\n * absent, all visible layers will be considered translatable.\n * Not used if `features` is provided.\n * @property {FilterFunction} [filter] A function\n * that takes a {@link module:ol/Feature~Feature} and an\n * {@link module:ol/layer/Layer~Layer} and returns `true` if the feature may be\n * translated or `false` otherwise. Not used if `features` is provided.\n * @property {number} [hitTolerance=0] Hit-detection tolerance. Pixels inside the radius around the given position\n * will be checked for features.\n */\n\n/**\n * @classdesc\n * Events emitted by {@link module:ol/interaction/Translate~Translate} instances\n * are instances of this type.\n */\nexport class TranslateEvent extends Event {\n  /**\n   * @param {TranslateEventType} type Type.\n   * @param {Collection<Feature>} features The features translated.\n   * @param {import(\"../coordinate.js\").Coordinate} coordinate The event coordinate.\n   * @param {import(\"../coordinate.js\").Coordinate} startCoordinate The original coordinates before.translation started\n   * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n   */\n  constructor(type, features, coordinate, startCoordinate, mapBrowserEvent) {\n    super(type);\n\n    /**\n     * The features being translated.\n     * @type {Collection<Feature>}\n     * @api\n     */\n    this.features = features;\n\n    /**\n     * The coordinate of the drag event.\n     * @const\n     * @type {import(\"../coordinate.js\").Coordinate}\n     * @api\n     */\n    this.coordinate = coordinate;\n\n    /**\n     * The coordinate of the start position before translation started.\n     * @const\n     * @type {import(\"../coordinate.js\").Coordinate}\n     * @api\n     */\n    this.startCoordinate = startCoordinate;\n\n    /**\n     * Associated {@link module:ol/MapBrowserEvent~MapBrowserEvent}.\n     * @type {import(\"../MapBrowserEvent.js\").default}\n     * @api\n     */\n    this.mapBrowserEvent = mapBrowserEvent;\n  }\n}\n\n/***\n * @template Return\n * @typedef {import(\"../Observable.js\").OnSignature<import(\"../Observable.js\").EventTypes, import(\"../events/Event.js\").default, Return> &\n *   import(\"../Observable.js\").OnSignature<import(\"../ObjectEventType.js\").Types|\n *     'change:active', import(\"../Object.js\").ObjectEvent, Return> &\n *   import(\"../Observable.js\").OnSignature<'translateend'|'translatestart'|'translating', TranslateEvent, Return> &\n *   import(\"../Observable.js\").CombinedOnSignature<import(\"../Observable.js\").EventTypes|import(\"../ObjectEventType.js\").Types|\n *     'change:active'|'translateend'|'translatestart'|'translating', Return>} TranslateOnSignature\n */\n\n/**\n * @classdesc\n * Interaction for translating (moving) features.\n * If you want to translate multiple features in a single action (for example,\n * the collection used by a select interaction), construct the interaction with\n * the `features` option.\n *\n * @fires TranslateEvent\n * @api\n */\nclass Translate extends PointerInteraction {\n  /**\n   * @param {Options} [options] Options.\n   */\n  constructor(options) {\n    options = options ? options : {};\n\n    super(/** @type {import(\"./Pointer.js\").Options} */ (options));\n\n    /***\n     * @type {TranslateOnSignature<import(\"../events.js\").EventsKey>}\n     */\n    this.on;\n\n    /***\n     * @type {TranslateOnSignature<import(\"../events.js\").EventsKey>}\n     */\n    this.once;\n\n    /***\n     * @type {TranslateOnSignature<void>}\n     */\n    this.un;\n\n    /**\n     * The last position we translated to.\n     * @type {import(\"../coordinate.js\").Coordinate}\n     * @private\n     */\n    this.lastCoordinate_ = null;\n\n    /**\n     * The start position before translation started.\n     * @type {import(\"../coordinate.js\").Coordinate}\n     * @private\n     */\n    this.startCoordinate_ = null;\n\n    /**\n     * @type {Collection<Feature>|null}\n     * @private\n     */\n    this.features_ = options.features !== undefined ? options.features : null;\n\n    /** @type {function(import(\"../layer/Layer.js\").default<import(\"../source/Source.js\").default>): boolean} */\n    let layerFilter;\n    if (options.layers && !this.features_) {\n      if (typeof options.layers === 'function') {\n        layerFilter = options.layers;\n      } else {\n        const layers = options.layers;\n        layerFilter = function (layer) {\n          return layers.includes(layer);\n        };\n      }\n    } else {\n      layerFilter = TRUE;\n    }\n\n    /**\n     * @private\n     * @type {function(import(\"../layer/Layer.js\").default<import(\"../source/Source.js\").default>): boolean}\n     */\n    this.layerFilter_ = layerFilter;\n\n    /**\n     * @private\n     * @type {FilterFunction}\n     */\n    this.filter_ = options.filter && !this.features_ ? options.filter : TRUE;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.hitTolerance_ = options.hitTolerance ? options.hitTolerance : 0;\n\n    /**\n     * @private\n     * @type {import(\"../events/condition.js\").Condition}\n     */\n    this.condition_ = options.condition ? options.condition : always;\n\n    /**\n     * @type {Feature}\n     * @private\n     */\n    this.lastFeature_ = null;\n\n    this.addChangeListener(\n      InteractionProperty.ACTIVE,\n      this.handleActiveChanged_,\n    );\n  }\n\n  /**\n   * Handle pointer down events.\n   * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n   * @return {boolean} If the event was consumed.\n   * @override\n   */\n  handleDownEvent(event) {\n    if (!event.originalEvent || !this.condition_(event)) {\n      return false;\n    }\n    this.lastFeature_ = this.featuresAtPixel_(event.pixel, event.map);\n    if (!this.lastCoordinate_ && this.lastFeature_) {\n      this.startCoordinate_ = event.coordinate;\n      this.lastCoordinate_ = event.coordinate;\n      this.handleMoveEvent(event);\n\n      const features = this.features_ || new Collection([this.lastFeature_]);\n\n      this.dispatchEvent(\n        new TranslateEvent(\n          TranslateEventType.TRANSLATESTART,\n          features,\n          event.coordinate,\n          this.startCoordinate_,\n          event,\n        ),\n      );\n      return true;\n    }\n    return false;\n  }\n\n  /**\n   * Handle pointer up events.\n   * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n   * @return {boolean} If the event was consumed.\n   * @override\n   */\n  handleUpEvent(event) {\n    if (this.lastCoordinate_) {\n      this.lastCoordinate_ = null;\n      this.handleMoveEvent(event);\n\n      const features = this.features_ || new Collection([this.lastFeature_]);\n\n      this.dispatchEvent(\n        new TranslateEvent(\n          TranslateEventType.TRANSLATEEND,\n          features,\n          event.coordinate,\n          this.startCoordinate_,\n          event,\n        ),\n      );\n      // cleanup\n      this.startCoordinate_ = null;\n      return true;\n    }\n    return false;\n  }\n\n  /**\n   * Handle pointer drag events.\n   * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n   * @override\n   */\n  handleDragEvent(event) {\n    if (this.lastCoordinate_) {\n      const newCoordinate = event.coordinate;\n      const projection = event.map.getView().getProjection();\n\n      const newViewCoordinate = fromUserCoordinate(newCoordinate, projection);\n      const lastViewCoordinate = fromUserCoordinate(\n        this.lastCoordinate_,\n        projection,\n      );\n      const deltaX = newViewCoordinate[0] - lastViewCoordinate[0];\n      const deltaY = newViewCoordinate[1] - lastViewCoordinate[1];\n\n      const features = this.features_ || new Collection([this.lastFeature_]);\n      const userProjection = getUserProjection();\n\n      features.forEach(function (feature) {\n        const geom = feature.getGeometry();\n        if (userProjection) {\n          geom.transform(userProjection, projection);\n          geom.translate(deltaX, deltaY);\n          geom.transform(projection, userProjection);\n        } else {\n          geom.translate(deltaX, deltaY);\n        }\n        feature.setGeometry(geom);\n      });\n\n      this.lastCoordinate_ = newCoordinate;\n\n      this.dispatchEvent(\n        new TranslateEvent(\n          TranslateEventType.TRANSLATING,\n          features,\n          newCoordinate,\n          this.startCoordinate_,\n          event,\n        ),\n      );\n    }\n  }\n\n  /**\n   * Handle pointer move events.\n   * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n   * @override\n   */\n  handleMoveEvent(event) {\n    const elem = event.map.getViewport();\n\n    // Change the cursor to grab/grabbing if hovering any of the features managed\n    // by the interaction\n    if (this.featuresAtPixel_(event.pixel, event.map)) {\n      elem.classList.remove(this.lastCoordinate_ ? 'ol-grab' : 'ol-grabbing');\n      elem.classList.add(this.lastCoordinate_ ? 'ol-grabbing' : 'ol-grab');\n    } else {\n      elem.classList.remove('ol-grab', 'ol-grabbing');\n    }\n  }\n\n  /**\n   * Tests to see if the given coordinates intersects any of our selected\n   * features.\n   * @param {import(\"../pixel.js\").Pixel} pixel Pixel coordinate to test for intersection.\n   * @param {import(\"../Map.js\").default} map Map to test the intersection on.\n   * @return {Feature} Returns the feature found at the specified pixel\n   * coordinates.\n   * @private\n   */\n  featuresAtPixel_(pixel, map) {\n    return map.forEachFeatureAtPixel(\n      pixel,\n      (feature, layer) => {\n        if (!(feature instanceof Feature) || !this.filter_(feature, layer)) {\n          return undefined;\n        }\n        if (this.features_ && !this.features_.getArray().includes(feature)) {\n          return undefined;\n        }\n        return feature;\n      },\n      {\n        layerFilter: this.layerFilter_,\n        hitTolerance: this.hitTolerance_,\n      },\n    );\n  }\n\n  /**\n   * Returns the Hit-detection tolerance.\n   * @return {number} Hit tolerance in pixels.\n   * @api\n   */\n  getHitTolerance() {\n    return this.hitTolerance_;\n  }\n\n  /**\n   * Hit-detection tolerance. Pixels inside the radius around the given position\n   * will be checked for features.\n   * @param {number} hitTolerance Hit tolerance in pixels.\n   * @api\n   */\n  setHitTolerance(hitTolerance) {\n    this.hitTolerance_ = hitTolerance;\n  }\n\n  /**\n   * Remove the interaction from its current map and attach it to the new map.\n   * Subclasses may set up event handlers to get notified about changes to\n   * the map here.\n   * @param {import(\"../Map.js\").default} map Map.\n   * @override\n   */\n  setMap(map) {\n    const oldMap = this.getMap();\n    super.setMap(map);\n    this.updateState_(oldMap);\n  }\n\n  /**\n   * @private\n   */\n  handleActiveChanged_() {\n    this.updateState_(null);\n  }\n\n  /**\n   * @param {import(\"../Map.js\").default} oldMap Old map.\n   * @private\n   */\n  updateState_(oldMap) {\n    let map = this.getMap();\n    const active = this.getActive();\n    if (!map || !active) {\n      map = map || oldMap;\n      if (map) {\n        const elem = map.getViewport();\n        elem.classList.remove('ol-grab', 'ol-grabbing');\n      }\n    }\n  }\n}\n\nexport default Translate;\n", "import { applySnapshot } from \"mobx-state-tree\";\n\nconst ERRORS_THAT_DONT_GET_REPORTED = [422, 404];\nconst ERRORS_WITH_SYSTEM_LEVEL_MESSAGE = [401, 403, 404, 500];\n\nexport function requestHeaders() {\n  const csrfMetaTag = document.querySelector('meta[name=\"csrf-token\"]');\n  const csrfToken = csrfMetaTag ? csrfMetaTag.getAttribute(\"content\") : \"no-token\";\n\n  return {\n    \"X-CSRF-Token\": csrfToken,\n    \"X-Requested-With\": \"XMLHttpRequest\",\n    \"Content-Type\": \"application/json\",\n    \"X-Tab-Id\": window.sessionStorage.getItem(\"tabId\"),\n    Accept: \"application/json\",\n  };\n}\n\nfunction reportErrors(action, response) {\n  if (!response.ok && !ERRORS_THAT_DONT_GET_REPORTED.includes(response.status)) {\n    const message = `${response.status} ${response.statusText}: ${action} to ${response.url}`;\n    reportError(message);\n  }\n}\n\nexport function reportError(message) {\n  if (process.env.NODE_ENV !== \"test\") {\n    // then we are running in browser\n    console.log(`[Api] ${message}`);\n  }\n}\n\nfunction processResponseWithJsonPayload({\n  response,\n  model,\n  onSuccess = undefined,\n  onValidationError = undefined,\n  onServerError = undefined,\n}) {\n  if (ERRORS_WITH_SYSTEM_LEVEL_MESSAGE.includes(response.status)) {\n    if (onServerError) {\n      response.json().then(\n        (json) => {\n          onServerError(model, response, json);\n        },\n        (thing) => {\n          onServerError(model, response);\n        },\n      );\n    }\n    return;\n  }\n\n  response.json().then(\n    (json) => {\n      if (response.status === 422) {\n        if (onValidationError) {\n          onValidationError(model, json);\n        } else {\n          applySnapshot(model.errors, json);\n        }\n      } else {\n        const modelData = json.model ? json.model : json;\n        applySnapshot(model, modelData);\n\n        if (onSuccess) onSuccess(json);\n      }\n    },\n    (thing) => {\n      reportError(\"Failed to parse JSON\");\n    },\n  );\n}\n\nfunction processResponseWithoutJsonPayload(response, _model) {\n  if (ERRORS_WITH_SYSTEM_LEVEL_MESSAGE.includes(response.status)) {\n    const message = `${response.status} ${response.statusText}`;\n    reportError(message);\n  }\n}\n\nfunction processResponseNetworkError(model) {\n  const message = \"Network error: Could not connect to server\";\n  reportError(message);\n}\n\nexport function get({ model, path, onSuccess = undefined, onValidationError = undefined, onServerError = undefined }) {\n  return (\n    window\n      .fetch(path, {\n        headers: requestHeaders(),\n      })\n      // Elliot: Added this .then so we can see whether the promise solves or rejects\n      .then(\n        (response) => {\n          reportErrors(\"GET\", response);\n          processResponseWithJsonPayload({\n            response,\n            model,\n            onSuccess,\n            onValidationError,\n            onServerError,\n          });\n        },\n        (_response) => {\n          processResponseNetworkError(model);\n        },\n      )\n  );\n}\n\nfunction putPost({ model, path, body, action, onSuccess, onValidationError, onServerError }) {\n  return window\n    .fetch(path, {\n      method: action,\n      headers: requestHeaders(),\n      body: JSON.stringify(body),\n    })\n    .then(\n      (response) => {\n        reportErrors(action, response);\n        processResponseWithJsonPayload({\n          response,\n          model,\n          onSuccess,\n          onValidationError,\n          onServerError,\n        });\n      },\n      (response) => {\n        processResponseNetworkError(model);\n      },\n    );\n}\n\nexport function post({\n  model,\n  path,\n  body,\n  onSuccess = undefined,\n  onValidationError = undefined,\n  onServerError = undefined,\n}) {\n  return putPost({ model, path, body, action: \"POST\", onSuccess, onValidationError, onServerError });\n}\n\nexport function put({\n  model,\n  path,\n  body,\n  onSuccess = undefined,\n  onValidationError = undefined,\n  onServerError = undefined,\n}) {\n  return putPost({ model, path, body, action: \"PUT\", onSuccess, onValidationError, onServerError });\n}\n\nexport function destroy({ model, path, onSuccess = undefined }) {\n  if (model.id) {\n    return window\n      .fetch(path, {\n        method: \"DELETE\",\n        headers: requestHeaders(),\n      })\n      .then(\n        (response) => {\n          reportErrors(\"DELETE\", response);\n          processResponseWithoutJsonPayload(response, model);\n          if (onSuccess) onSuccess();\n        },\n        (response) => {\n          processResponseNetworkError(model);\n        },\n      );\n  } else {\n    return Promise.resolve(onSuccess());\n  }\n}\n", "import { types } from \"mobx-state-tree\";\n\nconst CellPositionModel = types.model(\"CellPosition\", {\n  row: types.number,\n  column: types.number,\n});\n\nexport default CellPositionModel;\n", "import { types } from \"mobx-state-tree\";\n\nconst WithDirtyTracking = types\n  .model({\n    dirty: types.optional(types.boolean, false),\n  })\n  .actions((self) => ({\n    markDirty() {\n      self.dirty = true;\n    },\n  }));\n\nexport default WithDirtyTracking;\n", "// cSpell:ignore unobstruct\n\nimport { types, getParent, clone } from \"mobx-state-tree\";\n\nimport { reportError } from \"../../helpers/api-mobx\";\nimport CellPositionModel from \"./cell-position-model\";\nimport WithDirtyTracking from \"../../da/models/with-dirty-tracking\";\n\nimport { logger } from \"../../helpers/logger\";\n\nconst CELL_STATUS_EMPTY = 0;\nconst CELL_STATUS_PRESENT = 1;\nconst CELL_STATUS_OUT_OF_BOUNDS = 2;\nconst CELL_STATUS_PRESENT_WITH_ERROR = 3;\n\n// Used on save to update the design\nconst CELL_STATUS_EMPTY_STRING = \"0\";\nconst CELL_STATUS_PRESENT_STRING = \"1\";\nconst CELL_STATUS_OUT_OF_BOUNDS_STRING = \"2\";\n\nconst CELL_STATUS_OBSTRUCTED_DELTA = 5;\nconst CELL_STATUS_OBSTRUCTED_EMPTY = CELL_STATUS_OBSTRUCTED_DELTA + CELL_STATUS_EMPTY;\nconst CELL_STATUS_OBSTRUCTED_PRESENT = CELL_STATUS_OBSTRUCTED_DELTA + CELL_STATUS_PRESENT;\nconst CELL_STATUS_OBSTRUCTED_OUT_OF_BOUNDS = CELL_STATUS_OBSTRUCTED_DELTA + CELL_STATUS_OUT_OF_BOUNDS;\nconst CELL_STATUS_OBSTRUCTED_PRESENT_WITH_ERROR = CELL_STATUS_OBSTRUCTED_DELTA + CELL_STATUS_PRESENT_WITH_ERROR;\n\nconst CELL_STATUS_OBSTRUCTED_EMPTY_STRING = \"5\";\nconst CELL_STATUS_OBSTRUCTED_PRESENT_STRING = \"6\";\nconst CELL_STATUS_OBSTRUCTED_OUT_OF_BOUNDS_STRING = \"7\";\n\n// use the cell status (numeric) as an index into the array to get the string translation\n// present elements with or without errors are saved as present\nconst CELL_STATUS_SAVE_TRANSLATION = [\n  CELL_STATUS_EMPTY_STRING,\n  CELL_STATUS_PRESENT_STRING,\n  CELL_STATUS_OUT_OF_BOUNDS_STRING,\n  CELL_STATUS_PRESENT_STRING,\n  undefined,\n  CELL_STATUS_OBSTRUCTED_EMPTY_STRING,\n  CELL_STATUS_OBSTRUCTED_PRESENT_STRING,\n  CELL_STATUS_OBSTRUCTED_OUT_OF_BOUNDS_STRING,\n  CELL_STATUS_OBSTRUCTED_PRESENT_STRING,\n];\n\nexport const CELL_DRAW_STYLE_EMPTY = CELL_STATUS_EMPTY;\nexport const CELL_DRAW_STYLE_PRESENT = CELL_STATUS_PRESENT;\nexport const CELL_DRAW_STYLE_OUT_OF_BOUNDS = CELL_STATUS_OUT_OF_BOUNDS;\nexport const CELL_DRAW_STYLE_PRESENT_WITH_ERROR = CELL_STATUS_PRESENT_WITH_ERROR;\n\nexport const CELL_DRAW_STYLE_OBSTRUCTED_EMPTY = CELL_STATUS_OBSTRUCTED_EMPTY;\nexport const CELL_DRAW_STYLE_OBSTRUCTED_PRESENT = CELL_STATUS_OBSTRUCTED_PRESENT;\nexport const CELL_DRAW_STYLE_OBSTRUCTED_OUT_OF_BOUNDS = CELL_STATUS_OBSTRUCTED_OUT_OF_BOUNDS;\nexport const CELL_DRAW_STYLE_OBSTRUCTED_PRESENT_WITH_ERROR = CELL_STATUS_OBSTRUCTED_PRESENT_WITH_ERROR;\n\n// use the cell status (numeric) as an index into the array to get the string translation\nconst CELL_STATUS_DRAW_STYLE_TRANSLATION = [\n  CELL_DRAW_STYLE_EMPTY,\n  CELL_DRAW_STYLE_PRESENT,\n  CELL_DRAW_STYLE_OUT_OF_BOUNDS,\n  CELL_DRAW_STYLE_PRESENT_WITH_ERROR,\n  undefined,\n  CELL_DRAW_STYLE_OBSTRUCTED_EMPTY,\n  CELL_DRAW_STYLE_OBSTRUCTED_PRESENT,\n  CELL_DRAW_STYLE_OBSTRUCTED_OUT_OF_BOUNDS,\n  CELL_DRAW_STYLE_OBSTRUCTED_PRESENT_WITH_ERROR,\n];\n\nconst LayoutModelBase = types\n  .model(\"LayoutModel\", {\n    id: types.maybe(types.integer),\n    deleted: types.optional(types.boolean, false),\n    rows: types.integer,\n    columns: types.integer,\n    design: types.string,\n    cells: types.array(types.array(types.integer)),\n    activePanelsCount: types.optional(types.integer, 0),\n    fresh: types.optional(types.boolean, true),\n    cellErrorPositions: types.array(CellPositionModel),\n  })\n  .views((self) => ({\n    get roofSection() {\n      return getParent(self);\n    },\n    illegalRowColumn(row, column) {\n      if (row > self.rows || row < 1 || column > self.columns || column < 1) {\n        reportError(`Out of bounds access to Grid: ${row}, ${column}`);\n        return true;\n      }\n      return false;\n    },\n\n    isEmpty(row, column) {\n      const status = self.cellStatus(row, column);\n      return self.isEmptyStatus(status);\n    },\n    isEmptyStatus(status) {\n      return status === CELL_STATUS_EMPTY || status === CELL_STATUS_OBSTRUCTED_EMPTY;\n    },\n    isPresent(row, column) {\n      const status = self.cellStatus(row, column);\n      return self.isPresentStatus(status);\n    },\n    isPresentStatus(status) {\n      return status === CELL_STATUS_PRESENT || status === CELL_STATUS_OBSTRUCTED_PRESENT;\n    },\n    isOutOfBounds(row, column) {\n      const status = self.cellStatus(row, column);\n      return self.isOutOfBoundsStatus(status);\n    },\n    isOutOfBoundsStatus(status) {\n      return status === CELL_STATUS_OUT_OF_BOUNDS || status === CELL_STATUS_OBSTRUCTED_OUT_OF_BOUNDS;\n    },\n    isPresentWithError(row, column) {\n      const status = self.cellStatus(row, column);\n      return self.isPresentWithErrorStatus(status);\n    },\n    isPresentWithErrorStatus(status) {\n      return status === CELL_STATUS_PRESENT_WITH_ERROR || status === CELL_STATUS_OBSTRUCTED_PRESENT_WITH_ERROR;\n    },\n    isObstructed(row, column) {\n      const status = self.cellStatus(row, column);\n      return self.isObstructedStatus(status);\n    },\n    isObstructedStatus(status) {\n      return status >= CELL_STATUS_OBSTRUCTED_EMPTY;\n    },\n    // This should be considered a private method\n    cellStatus(row, column) {\n      if (self.illegalRowColumn(row, column)) return undefined;\n\n      return self.cells[row - 1][column - 1];\n    },\n\n    get panelsPresent() {\n      if (self.deleted) return 0;\n      return self.activePanelsCount;\n    },\n    get needsSave() {\n      return self.dirty || !self.id;\n    },\n    get isPersisted() {\n      return self.id !== undefined;\n    },\n    get interRowSpacing() {\n      return self.roofSection.interRowSpacing;\n    },\n    get interColumnSpacing() {\n      return self.roofSection.interColumnSpacing;\n    },\n    get isDeficient() {\n      return self.rows < 1 || self.columns < 1;\n    },\n    cellDrawStyle(row, column) {\n      const status = self.cellStatus(row, column);\n\n      return CELL_STATUS_DRAW_STYLE_TRANSLATION[status];\n    },\n    valueWithErrorAdded(currentValue) {\n      if (currentValue >= CELL_STATUS_OBSTRUCTED_EMPTY) {\n        return CELL_STATUS_OBSTRUCTED_PRESENT_WITH_ERROR;\n      } else {\n        return CELL_STATUS_PRESENT_WITH_ERROR;\n      }\n    },\n  }))\n  .actions((self) => ({\n    setupCells() {\n      const cells = self.initializeCellsAsPresent();\n      self.transferDesignToCells(cells);\n      self.markCellsWithErrors(cells);\n\n      self.cells = cells;\n    },\n    initializeCellsAsPresent() {\n      const defaultRow = new Array(self.columns);\n      for (let i = 0; i < self.columns; i++) {\n        defaultRow[i] = CELL_STATUS_PRESENT;\n      }\n\n      const cells = new Array(self.rows);\n      for (let i = 0; i < self.rows; i++) {\n        cells[i] = defaultRow.slice();\n      }\n\n      self.activePanelsCount = self.rows * self.columns;\n\n      return cells;\n    },\n    transferDesignToCells(cells) {\n      for (let row = 0; row < self.rows; row++) {\n        for (let column = 0; column < self.columns; column++) {\n          const position = row * self.columns + column;\n          const valueAtPosition = self.design[position];\n          if (valueAtPosition === CELL_STATUS_OBSTRUCTED_PRESENT_STRING) {\n            cells[row][column] = CELL_STATUS_OBSTRUCTED_PRESENT;\n          } else if (valueAtPosition !== CELL_STATUS_PRESENT_STRING) {\n            cells[row][column] = Number.parseInt(valueAtPosition);\n            self.activePanelsCount--;\n          }\n        }\n      }\n    },\n    markCellsWithErrors(cells) {\n      self.cellErrorPositions.forEach((cellPosition) => {\n        const { row, column } = cellPosition;\n        const currentValue = cells[row - 1][column - 1];\n        cells[row - 1][column - 1] = self.valueWithErrorAdded(currentValue);\n      });\n    },\n    transferCellsToDesign() {\n      let result = \"\";\n\n      for (let row = 0; row < self.rows; row++) {\n        for (let column = 0; column < self.columns; column++) {\n          const status = self.cells[row][column];\n          result += CELL_STATUS_SAVE_TRANSLATION[status];\n        }\n      }\n\n      self.design = result;\n    },\n    removePanel(row, column) {\n      if (self.illegalRowColumn(row, column)) return;\n\n      const currentStatus = self.cells[row - 1][column - 1];\n      if (self.isEmptyStatus(currentStatus)) return;\n\n      self.markDirty();\n      if (self.isPresentStatus(currentStatus) || self.isPresentWithErrorStatus(currentStatus)) {\n        self.activePanelsCount--;\n        self.clearErrorAt(row, column);\n      }\n      self.setCellEmpty(row, column, currentStatus);\n    },\n    addPanel(row, column) {\n      if (self.illegalRowColumn(row, column)) return;\n\n      const currentStatus = self.cells[row - 1][column - 1];\n      if (self.isPresentStatus(currentStatus) || self.isPresentWithErrorStatus(currentStatus)) return;\n\n      self.markDirty();\n      self.activePanelsCount++;\n      self.setCellPresent(row, column, currentStatus);\n    },\n    togglePanel(row, column) {\n      if (self.illegalRowColumn(row, column)) return;\n\n      const currentStatus = self.cells[row - 1][column - 1];\n      if (self.isOutOfBoundsStatus(currentStatus)) return;\n\n      self.markDirty();\n      if (self.isEmptyStatus(currentStatus)) {\n        self.activePanelsCount++;\n        self.setCellPresent(row, column, currentStatus);\n      } else {\n        // PRESENT OR PRESENT_WITH_ERRORS\n        self.activePanelsCount--;\n        self.clearErrorAt(row, column);\n        self.setCellEmpty(row, column, currentStatus);\n      }\n    },\n    outOfBoundsPanel(row, column) {\n      if (self.illegalRowColumn(row, column)) return;\n\n      const currentStatus = self.cells[row - 1][column - 1];\n      if (self.isOutOfBoundsStatus(currentStatus)) return;\n\n      self.markDirty();\n      if (self.isPresentStatus(currentStatus)) {\n        self.activePanelsCount--;\n      }\n      self.setCellOutOfBounds(row, column, currentStatus);\n    },\n    obstructPanel(row, column) {\n      if (self.illegalRowColumn(row, column)) return;\n\n      const currentStatus = self.cells[row - 1][column - 1];\n      if (self.isObstructedStatus(currentStatus)) return;\n\n      self.markDirty();\n      self.setCellObstructed(row, column, currentStatus);\n    },\n    unobstructPanel(row, column) {\n      if (self.illegalRowColumn(row, column)) return;\n\n      const currentStatus = self.cells[row - 1][column - 1];\n      if (!self.isObstructedStatus(currentStatus)) return;\n\n      self.markDirty();\n      self.setCellUnobstructed(row, column, currentStatus);\n    },\n    flagDeleted() {\n      if (self.deleted) return;\n\n      self.markDirty();\n      self.deleted = true;\n    },\n    overlayPresentPanels(priorLayout) {\n      const commonRows = Math.min(self.rows, priorLayout.rows);\n      const commonColumns = Math.min(self.columns, priorLayout.columns);\n\n      for (let row = 1; row <= commonRows; row++) {\n        for (let column = 1; column <= commonColumns; column++) {\n          if (priorLayout.isPresent(row, column) || priorLayout.isPresentWithError(row, column)) {\n            self.addPanel(row, column);\n          }\n        }\n      }\n\n      priorLayout.cellErrorPositions.forEach((cellError) => {\n        if (cellError.row <= commonRows && cellError.column <= commonColumns) {\n          self.cellErrorPositions.push(clone(cellError));\n        }\n      });\n      self.markCellsWithErrors(self.cells);\n      self.markDirty();\n    },\n    // from the row & column, you could get the currentStatus, but in the context\n    // where these are used, we already have it, so we're saving extra array lookups\n    setCellEmpty(row, column, currentStatus) {\n      if (self.isObstructedStatus(currentStatus)) {\n        self.cells[row - 1][column - 1] = CELL_STATUS_OBSTRUCTED_EMPTY;\n      } else {\n        self.cells[row - 1][column - 1] = CELL_STATUS_EMPTY;\n      }\n    },\n    setCellPresent(row, column, currentStatus) {\n      if (self.isObstructedStatus(currentStatus)) {\n        self.cells[row - 1][column - 1] = CELL_STATUS_OBSTRUCTED_PRESENT;\n      } else {\n        self.cells[row - 1][column - 1] = CELL_STATUS_PRESENT;\n      }\n    },\n    setCellOutOfBounds(row, column, currentStatus) {\n      if (self.isObstructedStatus(currentStatus)) {\n        self.cells[row - 1][column - 1] = CELL_STATUS_OBSTRUCTED_OUT_OF_BOUNDS;\n      } else {\n        self.cells[row - 1][column - 1] = CELL_STATUS_OUT_OF_BOUNDS;\n      }\n    },\n    setCellObstructed(row, column, currentStatus) {\n      if (self.isObstructedStatus(currentStatus)) return;\n\n      self.cells[row - 1][column - 1] = currentStatus + CELL_STATUS_OBSTRUCTED_DELTA;\n    },\n    setCellUnobstructed(row, column, currentStatus) {\n      if (!self.isObstructedStatus(currentStatus)) return;\n\n      self.cells[row - 1][column - 1] = currentStatus - CELL_STATUS_OBSTRUCTED_DELTA;\n    },\n    clearErrorAt(row, column) {\n      const updatedCellErrorPositions = self.cellErrorPositions.filter((cellPosition) => {\n        return cellPosition.row != row || cellPosition.column != column;\n      });\n\n      self.cellErrorPositions = updatedCellErrorPositions;\n    },\n    migrateEmptyPanels(columnShift, rowShift) {\n      if (columnShift === 0 && rowShift === 0) return;\n\n      self.markDirty();\n\n      const originalActivePanelsCount = self.activePanelsCount;\n      const newCells = self.initializeCellsAsPresent();\n      self.activePanelsCount = originalActivePanelsCount;\n\n      // First, copy all non-empty cells to new array\n      for (let row = 1; row <= self.rows; row++) {\n        for (let column = 1; column <= self.columns; column++) {\n          const currentStatus = self.cellStatus(row, column);\n\n          if (!self.isEmptyStatus(currentStatus)) {\n            newCells[row - 1][column - 1] = currentStatus;\n          }\n        }\n      }\n\n      // Then, migrate empty cells (this may overwrite present cells at destination)\n      for (let row = 1; row <= self.rows; row++) {\n        for (let column = 1; column <= self.columns; column++) {\n          const currentStatus = self.cellStatus(row, column);\n\n          if (self.isEmptyStatus(currentStatus)) {\n            const newRow = row + rowShift;\n            const newColumn = column + columnShift;\n\n            if (newRow >= 1 && newRow <= self.rows && newColumn >= 1 && newColumn <= self.columns) {\n              newCells[newRow - 1][newColumn - 1] = currentStatus;\n            }\n          }\n        }\n      }\n\n      self.cells = newCells;\n      self.transferCellsToDesign();\n    },\n  }));\n\nexport function layoutPersistenceData(layout) {\n  saveDescription(layout);\n\n  if (layout === undefined || !layout.needsSave) {\n    logger(\"--Undefined or !needsSave. Skipping\");\n    return undefined;\n  }\n\n  let design;\n  if (layout.deleted) {\n    design = \"\";\n    logger(\"--Deleted. Blanking design.\");\n  } else {\n    layout.transferCellsToDesign();\n    design = layout.design;\n  }\n\n  return {\n    id: layout.id,\n    rows: layout.rows,\n    columns: layout.columns,\n    inter_row_spacing: layout.interRowSpacing,\n    inter_column_spacing: layout.interColumnSpacing,\n    design,\n    fresh: layout.fresh,\n    _destroy: layout.deleted,\n  };\n}\n\nfunction saveDescription(layout) {\n  if (layout) {\n    if (layout.id) {\n      logger(`Persisting Layout #${layout.id}`);\n    } else {\n      logger(\"Persisting Layout -- new & unsaved\");\n    }\n  } else {\n    logger(\"Persisting Layout -- undefined\");\n  }\n}\n\nexport function emptyDesign(rows, columns) {\n  const initialStatus = CELL_STATUS_EMPTY_STRING;\n  const row = initialStatus.repeat(columns);\n  return row.repeat(rows);\n}\n\nexport function presentDesign(rows, columns) {\n  const initialStatus = CELL_STATUS_PRESENT_STRING;\n  const row = initialStatus.repeat(columns);\n  return row.repeat(rows);\n}\n\nconst LayoutModel = types.compose(LayoutModelBase, WithDirtyTracking);\nexport default LayoutModel;\n", "import { Fill, Stroke, Style } from \"ol/style\";\n\nimport {\n  CELL_DRAW_STYLE_OBSTRUCTED_EMPTY,\n  CELL_DRAW_STYLE_OBSTRUCTED_PRESENT,\n  CELL_DRAW_STYLE_OBSTRUCTED_PRESENT_WITH_ERROR,\n  CELL_DRAW_STYLE_PRESENT,\n  CELL_DRAW_STYLE_PRESENT_WITH_ERROR,\n} from \"../../../bx/models/layout-model\";\nimport { BOUNDING_BOX_DATA_TYPE } from \"../data-types\";\n\nconst BOUNDING_BOX_STYLE = new Style({\n  stroke: new Stroke({ color: \"rgba(0, 250, 255, 0.6)\", width: 3 }),\n});\n\nconst FRESH_CELL_STROKE = new Stroke({ color: \"rgba(0, 141, 249, 1.0)\", width: 3 });\nconst FRESH_CELL_FILL = new Fill({ color: \"rgba(0, 141, 249, 0.4)\" });\n// This should match the encroaching roof sections colors\nconst STALE_CELL_STROKE = new Stroke({ color: \"rgba(255, 109, 0, 0.7)\", width: 3 });\nconst STALE_CELL_FILL = new Fill({ color: \"rgba(255, 109, 0, 0.2)\" });\nconst ERROR_CELL_STROKE = new Stroke({ color: \"rgba(255,0, 0, 1.0)\", width: 3 });\nconst ERROR_CELL_FILL = new Fill({ color: \"rgba(255,0, 0, 0.3)\" });\n\nconst PRESENT_FRESH_STYLE = new Style({\n  stroke: FRESH_CELL_STROKE,\n  fill: FRESH_CELL_FILL,\n});\nconst PRESENT_STALE_STYLE = new Style({\n  stroke: STALE_CELL_STROKE,\n  fill: STALE_CELL_FILL,\n});\nconst PRESENT_ERROR_STYLE = new Style({\n  stroke: ERROR_CELL_STROKE,\n  fill: ERROR_CELL_FILL,\n});\n\nconst EMPTY_CELL_STYLE = new Style({\n  stroke: new Stroke({ color: `rgba(160, 160, 160, 1.0)`, width: 1 }),\n  fill: new Fill({ color: `rgba(0, 0, 0, 0.0)` }),\n});\n\nconst OBSTRUCTED_PRESENT_FRESH_STYLE = new Style({\n  stroke: new Stroke({ color: `rgba(133, 97, 140, 1.0)`, width: 3 }),\n  fill: new Fill({ color: `rgba(133, 97, 140, 0.4)` }),\n});\nconst OBSTRUCTED_EMPTY_CELL_STYLE = EMPTY_CELL_STYLE;\n\nconst OTHER_ROOF_SECTION_STYLE = new Style({\n  stroke: new Stroke({ color: \"rgba(128, 128, 128, 0.5)\", width: 1 }),\n  fill: new Fill({ color: \"rgba(0, 0, 0, 0)\" }),\n});\n\nexport function arraysStyle(feature, { hideEmptyCells = false, isProjectReport = false }) {\n  if (feature.get(\"isOtherRoofSection\")) {\n    const cellDrawStyle = feature.get(\"cellDrawStyle\");\n    if (\n      cellDrawStyle === CELL_DRAW_STYLE_PRESENT ||\n      cellDrawStyle === CELL_DRAW_STYLE_OBSTRUCTED_PRESENT ||\n      cellDrawStyle === CELL_DRAW_STYLE_PRESENT_WITH_ERROR ||\n      cellDrawStyle === CELL_DRAW_STYLE_OBSTRUCTED_PRESENT_WITH_ERROR\n    ) {\n      return OTHER_ROOF_SECTION_STYLE;\n    }\n    return null;\n  }\n\n  if (feature.get(\"dataType\") === BOUNDING_BOX_DATA_TYPE) {\n    return BOUNDING_BOX_STYLE;\n  } else {\n    const cellDrawStyle = feature.get(\"cellDrawStyle\");\n    if (cellDrawStyle >= CELL_DRAW_STYLE_OBSTRUCTED_EMPTY) {\n      return arrayStyleObstructed(feature, cellDrawStyle, hideEmptyCells, isProjectReport);\n    } else {\n      return arrayStyleUnobstructed(feature, cellDrawStyle, hideEmptyCells);\n    }\n  }\n}\n\nfunction arrayStyleUnobstructed(feature, cellDrawStyle, hideEmptyCells) {\n  if (cellDrawStyle === CELL_DRAW_STYLE_PRESENT) {\n    return feature.get(\"fresh\") ? PRESENT_FRESH_STYLE : PRESENT_STALE_STYLE;\n  } else if (cellDrawStyle === CELL_DRAW_STYLE_PRESENT_WITH_ERROR) {\n    return PRESENT_ERROR_STYLE;\n  } else if (!hideEmptyCells) {\n    return EMPTY_CELL_STYLE;\n  }\n}\n\nfunction arrayStyleObstructed(feature, cellDrawStyle, hideEmptyCells, isProjectReport) {\n  if (cellDrawStyle === CELL_DRAW_STYLE_OBSTRUCTED_PRESENT) {\n    if (feature.get(\"fresh\")) {\n      return isProjectReport ? PRESENT_FRESH_STYLE : OBSTRUCTED_PRESENT_FRESH_STYLE;\n    } else {\n      return PRESENT_STALE_STYLE;\n    }\n  } else if (cellDrawStyle === CELL_DRAW_STYLE_OBSTRUCTED_PRESENT_WITH_ERROR) {\n    return PRESENT_ERROR_STYLE;\n  } else if (!hideEmptyCells) {\n    return OBSTRUCTED_EMPTY_CELL_STYLE;\n  }\n}\n", "import { Fill, Stroke, Style, Text } from \"ol/style\";\n\n// Obstructions\n\nfunction legalObstructionStyle(label) {\n  return new Style({\n    stroke: new Stroke({ color: \"rgba(255, 148, 3, 1.0)\", width: 1 }),\n    fill: new Fill({ color: \"rgba(255, 148, 3, 0.4)\" }),\n    text: new Text({ text: label, scale: 2, fill: new Fill({ color: \"rgba(255, 255, 255, 1.0)\" }) }),\n  });\n}\n\nfunction illegalObstructionStyle(label) {\n  return new Style({\n    stroke: new Stroke({ color: \"rgba(255, 0, 0, 1.0)\", width: 1 }),\n    fill: new Fill({ color: `rgba(255, 0, 0, 0.4)` }),\n    text: new Text({ text: label, scale: 2, fill: new Fill({ color: \"rgba(255, 255, 255, 1.0)\" }) }),\n  });\n}\n\nexport function obstructionStyle(feature, project) {\n  const uuid = feature.get(\"uuid\");\n  const obstruction = project.getObstruction(uuid);\n  let label = obstruction.identifier;\n\n  if (feature.get(\"illegalShape\")) {\n    return illegalObstructionStyle(label);\n  } else {\n    return legalObstructionStyle(label);\n  }\n}\n\nexport function selectObstructionPolygonStrokeAndFillColors(_feature, _controller) {\n  return [\"rgba(255, 148, 3, 1.0)\", \"rgba(255, 148, 3, 0.6)\"];\n}\n\n// Obstruction Buffers\n\nconst OBSTRUCTION_BUFFER_STYLE = new Style({\n  stroke: new Stroke({ color: \"rgba(255, 228, 196, 1.0)\", width: 1 }),\n  fill: new Fill({ color: `rgba(255, 228, 196, 0.4)` }),\n});\n\nexport function obstructionBufferStyle(feature, project) {\n  return OBSTRUCTION_BUFFER_STYLE;\n}\n\nconst OBSTRUCTION_SETBACK_BUFFER_STYLE = new Style({\n  stroke: new Stroke({ color: \"rgba(245, 115, 55, 1.0)\", width: 1 }),\n  fill: new Fill({ color: `rgba(245, 115, 55, 0.4)` }),\n});\n\nexport function obstructionSetbackBufferStyle(feature, project) {\n  return OBSTRUCTION_SETBACK_BUFFER_STYLE;\n}\n", "/**\n * @module ol/Tile\n */\nimport TileState from './TileState.js';\nimport {easeIn} from './easing.js';\nimport EventType from './events/EventType.js';\nimport EventTarget from './events/Target.js';\nimport {abstract} from './util.js';\n\n/**\n * A function that takes a {@link module:ol/Tile~Tile} for the tile and a\n * `{string}` for the url as arguments. The default is\n * ```js\n * source.setTileLoadFunction(function(tile, src) {\n *   tile.getImage().src = src;\n * });\n * ```\n * For more fine grained control, the load function can use fetch or XMLHttpRequest and involve\n * error handling:\n *\n * ```js\n * import TileState from 'ol/TileState.js';\n *\n * source.setTileLoadFunction(function(tile, src) {\n *   const xhr = new XMLHttpRequest();\n *   xhr.responseType = 'blob';\n *   xhr.addEventListener('loadend', function (evt) {\n *     const data = this.response;\n *     if (data !== undefined) {\n *       tile.getImage().src = URL.createObjectURL(data);\n *     } else {\n *       tile.setState(TileState.ERROR);\n *     }\n *   });\n *   xhr.addEventListener('error', function () {\n *     tile.setState(TileState.ERROR);\n *   });\n *   xhr.open('GET', src);\n *   xhr.send();\n * });\n * ```\n *\n * @typedef {function(Tile, string): void} LoadFunction\n * @api\n */\n\n/**\n * {@link module:ol/source/Tile~TileSource} sources use a function of this type to get\n * the url that provides a tile for a given tile coordinate.\n *\n * This function takes a {@link module:ol/tilecoord~TileCoord} for the tile\n * coordinate, a `{number}` representing the pixel ratio and a\n * {@link module:ol/proj/Projection~Projection} for the projection  as arguments\n * and returns a `{string}` representing the tile URL, or undefined if no tile\n * should be requested for the passed tile coordinate.\n *\n * @typedef {function(import(\"./tilecoord.js\").TileCoord, number,\n *           import(\"./proj/Projection.js\").default): (string|undefined)} UrlFunction\n * @api\n */\n\n/**\n * @typedef {Object} Options\n * @property {number} [transition=250] A duration for tile opacity\n * transitions in milliseconds. A duration of 0 disables the opacity transition.\n * @property {boolean} [interpolate=false] Use interpolated values when resampling.  By default,\n * the nearest neighbor is used when resampling.\n * @api\n */\n\n/**\n * @classdesc\n * Base class for tiles.\n *\n * @abstract\n */\nclass Tile extends EventTarget {\n  /**\n   * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n   * @param {import(\"./TileState.js\").default} state State.\n   * @param {Options} [options] Tile options.\n   */\n  constructor(tileCoord, state, options) {\n    super();\n\n    options = options ? options : {};\n\n    /**\n     * @type {import(\"./tilecoord.js\").TileCoord}\n     */\n    this.tileCoord = tileCoord;\n\n    /**\n     * @protected\n     * @type {import(\"./TileState.js\").default}\n     */\n    this.state = state;\n\n    /**\n     * A key assigned to the tile. This is used in conjunction with a source key\n     * to determine if a cached version of this tile may be used by the renderer.\n     * @type {string}\n     */\n    this.key = '';\n\n    /**\n     * The duration for the opacity transition.\n     * @private\n     * @type {number}\n     */\n    this.transition_ =\n      options.transition === undefined ? 250 : options.transition;\n\n    /**\n     * Lookup of start times for rendering transitions.  If the start time is\n     * equal to -1, the transition is complete.\n     * @private\n     * @type {Object<string, number>}\n     */\n    this.transitionStarts_ = {};\n\n    /**\n     * @type {boolean}\n     */\n    this.interpolate = !!options.interpolate;\n  }\n\n  /**\n   * @protected\n   */\n  changed() {\n    this.dispatchEvent(EventType.CHANGE);\n  }\n\n  /**\n   * Called by the tile cache when the tile is removed from the cache due to expiry\n   */\n  release() {\n    // to remove the `change` listener on this tile in `ol/TileQueue#handleTileChange`\n    this.setState(TileState.EMPTY);\n  }\n\n  /**\n   * @return {string} Key.\n   */\n  getKey() {\n    return this.key + '/' + this.tileCoord;\n  }\n\n  /**\n   * Get the tile coordinate for this tile.\n   * @return {import(\"./tilecoord.js\").TileCoord} The tile coordinate.\n   * @api\n   */\n  getTileCoord() {\n    return this.tileCoord;\n  }\n\n  /**\n   * @return {import(\"./TileState.js\").default} State.\n   */\n  getState() {\n    return this.state;\n  }\n\n  /**\n   * Sets the state of this tile. If you write your own {@link module:ol/Tile~LoadFunction tileLoadFunction} ,\n   * it is important to set the state correctly to {@link module:ol/TileState~ERROR}\n   * when the tile cannot be loaded. Otherwise the tile cannot be removed from\n   * the tile queue and will block other requests.\n   * @param {import(\"./TileState.js\").default} state State.\n   * @api\n   */\n  setState(state) {\n    if (this.state === TileState.EMPTY) {\n      // no more state changes\n      return;\n    }\n    if (this.state !== TileState.ERROR && this.state > state) {\n      throw new Error('Tile load sequence violation');\n    }\n    this.state = state;\n    this.changed();\n  }\n\n  /**\n   * Load the image or retry if loading previously failed.\n   * Loading is taken care of by the tile queue, and calling this method is\n   * only needed for preloading or for reloading in case of an error.\n   * @abstract\n   * @api\n   */\n  load() {\n    abstract();\n  }\n\n  /**\n   * Get the alpha value for rendering.\n   * @param {string} id An id for the renderer.\n   * @param {number} time The render frame time.\n   * @return {number} A number between 0 and 1.\n   */\n  getAlpha(id, time) {\n    if (!this.transition_) {\n      return 1;\n    }\n\n    let start = this.transitionStarts_[id];\n    if (!start) {\n      start = time;\n      this.transitionStarts_[id] = start;\n    } else if (start === -1) {\n      return 1;\n    }\n\n    const delta = time - start + 1000 / 60; // avoid rendering at 0\n    if (delta >= this.transition_) {\n      return 1;\n    }\n    return easeIn(delta / this.transition_);\n  }\n\n  /**\n   * Determine if a tile is in an alpha transition.  A tile is considered in\n   * transition if tile.getAlpha() has not yet been called or has been called\n   * and returned 1.\n   * @param {string} id An id for the renderer.\n   * @return {boolean} The tile is in transition.\n   */\n  inTransition(id) {\n    if (!this.transition_) {\n      return false;\n    }\n    return this.transitionStarts_[id] !== -1;\n  }\n\n  /**\n   * Mark a transition as complete.\n   * @param {string} id An id for the renderer.\n   */\n  endTransition(id) {\n    if (this.transition_) {\n      this.transitionStarts_[id] = -1;\n    }\n  }\n\n  /**\n   * @override\n   */\n  disposeInternal() {\n    this.release();\n    super.disposeInternal();\n  }\n}\n\nexport default Tile;\n", "/**\n * @module ol/ImageTile\n */\nimport {listenImage} from './Image.js';\nimport Tile from './Tile.js';\nimport TileState from './TileState.js';\nimport {createCanvasContext2D} from './dom.js';\nimport {WORKER_OFFSCREEN_CANVAS} from './has.js';\n\nclass ImageTile extends Tile {\n  /**\n   * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n   * @param {import(\"./TileState.js\").default} state State.\n   * @param {string} src Image source URI.\n   * @param {import('./dom.js').ImageAttributes} imageAttributes Image attributes options.\n   * @param {import(\"./Tile.js\").LoadFunction} tileLoadFunction Tile load function.\n   * @param {import(\"./Tile.js\").Options} [options] Tile options.\n   */\n  constructor(\n    tileCoord,\n    state,\n    src,\n    imageAttributes,\n    tileLoadFunction,\n    options,\n  ) {\n    super(tileCoord, state, options);\n\n    /**\n     * @private\n     * @type {?string}\n     */\n    this.crossOrigin_ = imageAttributes?.crossOrigin;\n\n    /**\n     * @private\n     * @type {ReferrerPolicy}\n     */\n    this.referrerPolicy_ = imageAttributes?.referrerPolicy;\n\n    /**\n     * Image URI\n     *\n     * @private\n     * @type {string}\n     */\n    this.src_ = src;\n\n    this.key = src;\n\n    /**\n     * @private\n     * @type {HTMLImageElement|HTMLCanvasElement|OffscreenCanvas}\n     */\n    this.image_;\n\n    if (WORKER_OFFSCREEN_CANVAS) {\n      this.image_ = new OffscreenCanvas(1, 1);\n    } else {\n      this.image_ = new Image();\n      if (this.crossOrigin_ !== null) {\n        this.image_.crossOrigin = this.crossOrigin_;\n      }\n      if (this.referrerPolicy_ !== undefined) {\n        this.image_.referrerPolicy = this.referrerPolicy_;\n      }\n    }\n\n    /**\n     * @private\n     * @type {?function():void}\n     */\n    this.unlisten_ = null;\n\n    /**\n     * @private\n     * @type {import(\"./Tile.js\").LoadFunction}\n     */\n    this.tileLoadFunction_ = tileLoadFunction;\n  }\n\n  /**\n   * Get the HTML image element for this tile (may be a Canvas, OffscreenCanvas, Image, or Video).\n   * @return {HTMLCanvasElement|OffscreenCanvas|HTMLImageElement|HTMLVideoElement} Image.\n   * @api\n   */\n  getImage() {\n    return this.image_;\n  }\n\n  /**\n   * Sets an HTML image element for this tile (may be a Canvas or preloaded Image).\n   * @param {HTMLCanvasElement|OffscreenCanvas|HTMLImageElement} element Element.\n   */\n  setImage(element) {\n    this.image_ = element;\n    this.state = TileState.LOADED;\n    this.unlistenImage_();\n    this.changed();\n  }\n\n  /**\n   * Get the cross origin of the ImageTile.\n   * @return {string} Cross origin.\n   */\n  getCrossOrigin() {\n    return this.crossOrigin_;\n  }\n\n  /**\n   * Get the referrer policy of the ImageTile.\n   * @return {ReferrerPolicy} Referrer policy.\n   */\n  getReferrerPolicy() {\n    return this.referrerPolicy_;\n  }\n\n  /**\n   * Tracks loading or read errors.\n   *\n   * @private\n   */\n  handleImageError_() {\n    this.state = TileState.ERROR;\n    this.unlistenImage_();\n    this.image_ = getBlankImage();\n    this.changed();\n  }\n\n  /**\n   * Tracks successful image load.\n   *\n   * @private\n   */\n  handleImageLoad_() {\n    if (WORKER_OFFSCREEN_CANVAS) {\n      // OffscreenCanvas does not have naturalWidth and naturalHeight\n      this.state = TileState.LOADED;\n    } else {\n      const image = /** @type {HTMLImageElement} */ (this.image_);\n      if (image.naturalWidth && image.naturalHeight) {\n        this.state = TileState.LOADED;\n      } else {\n        this.state = TileState.EMPTY;\n      }\n    }\n    this.unlistenImage_();\n    this.changed();\n  }\n\n  /**\n   * Load the image or retry if loading previously failed.\n   * Loading is taken care of by the tile queue, and calling this method is\n   * only needed for preloading or for reloading in case of an error.\n   *\n   * To retry loading tiles on failed requests, use a custom `tileLoadFunction`\n   * that checks for error status codes and reloads only when the status code is\n   * 408, 429, 500, 502, 503 and 504, and only when not too many retries have been\n   * made already:\n   *\n   * ```js\n   * const retryCodes = [408, 429, 500, 502, 503, 504];\n   * const retries = {};\n   * source.setTileLoadFunction((tile, src) => {\n   *   const image = tile.getImage();\n   *   fetch(src)\n   *     .then((response) => {\n   *       if (retryCodes.includes(response.status)) {\n   *         retries[src] = (retries[src] || 0) + 1;\n   *         if (retries[src] <= 3) {\n   *           setTimeout(() => tile.load(), retries[src] * 1000);\n   *         }\n   *         return Promise.reject();\n   *       }\n   *       return response.blob();\n   *     })\n   *     .then((blob) => {\n   *       const imageUrl = URL.createObjectURL(blob);\n   *       image.src = imageUrl;\n   *       setTimeout(() => URL.revokeObjectURL(imageUrl), 5000);\n   *     })\n   *     .catch(() => tile.setState(3)); // error\n   * });\n   * ```\n   * @api\n   * @override\n   */\n  load() {\n    if (this.state == TileState.ERROR) {\n      this.state = TileState.IDLE;\n      this.image_ = new Image();\n      if (this.crossOrigin_ !== null) {\n        this.image_.crossOrigin = this.crossOrigin_;\n      }\n      if (this.referrerPolicy_ !== undefined) {\n        this.image_.referrerPolicy = this.referrerPolicy_;\n      }\n    }\n    if (this.state == TileState.IDLE) {\n      this.state = TileState.LOADING;\n      this.changed();\n      this.tileLoadFunction_(this, this.src_);\n      this.unlisten_ = listenImage(\n        this.image_,\n        this.handleImageLoad_.bind(this),\n        this.handleImageError_.bind(this),\n      );\n    }\n  }\n\n  /**\n   * Discards event handlers which listen for load completion or errors.\n   *\n   * @private\n   */\n  unlistenImage_() {\n    if (this.unlisten_) {\n      this.unlisten_();\n      this.unlisten_ = null;\n    }\n  }\n\n  /**\n   * @override\n   */\n  disposeInternal() {\n    this.unlistenImage_();\n    this.image_ = null;\n    super.disposeInternal();\n  }\n}\n\n/**\n * Get a 1-pixel blank image.\n * @return {HTMLCanvasElement|OffscreenCanvas} Blank image.\n */\nfunction getBlankImage() {\n  const ctx = createCanvasContext2D(1, 1);\n  ctx.fillStyle = 'rgba(0,0,0,0)';\n  ctx.fillRect(0, 0, 1, 1);\n  return ctx.canvas;\n}\n\nexport default ImageTile;\n", "/**\n * @module ol/TileRange\n */\n\n/**\n * A representation of a contiguous block of tiles.  A tile range is specified\n * by its min/max tile coordinates and is inclusive of coordinates.\n */\nclass TileRange {\n  /**\n   * @param {number} minX Minimum X.\n   * @param {number} maxX Maximum X.\n   * @param {number} minY Minimum Y.\n   * @param {number} maxY Maximum Y.\n   */\n  constructor(minX, maxX, minY, maxY) {\n    /**\n     * @type {number}\n     */\n    this.minX = minX;\n\n    /**\n     * @type {number}\n     */\n    this.maxX = maxX;\n\n    /**\n     * @type {number}\n     */\n    this.minY = minY;\n\n    /**\n     * @type {number}\n     */\n    this.maxY = maxY;\n  }\n\n  /**\n   * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n   * @return {boolean} Contains tile coordinate.\n   */\n  contains(tileCoord) {\n    return this.containsXY(tileCoord[1], tileCoord[2]);\n  }\n\n  /**\n   * @param {TileRange} tileRange Tile range.\n   * @return {boolean} Contains.\n   */\n  containsTileRange(tileRange) {\n    return (\n      this.minX <= tileRange.minX &&\n      tileRange.maxX <= this.maxX &&\n      this.minY <= tileRange.minY &&\n      tileRange.maxY <= this.maxY\n    );\n  }\n\n  /**\n   * @param {number} x Tile coordinate x.\n   * @param {number} y Tile coordinate y.\n   * @return {boolean} Contains coordinate.\n   */\n  containsXY(x, y) {\n    return this.minX <= x && x <= this.maxX && this.minY <= y && y <= this.maxY;\n  }\n\n  /**\n   * @param {TileRange} tileRange Tile range.\n   * @return {boolean} Equals.\n   */\n  equals(tileRange) {\n    return (\n      this.minX == tileRange.minX &&\n      this.minY == tileRange.minY &&\n      this.maxX == tileRange.maxX &&\n      this.maxY == tileRange.maxY\n    );\n  }\n\n  /**\n   * @param {TileRange} tileRange Tile range.\n   */\n  extend(tileRange) {\n    if (tileRange.minX < this.minX) {\n      this.minX = tileRange.minX;\n    }\n    if (tileRange.maxX > this.maxX) {\n      this.maxX = tileRange.maxX;\n    }\n    if (tileRange.minY < this.minY) {\n      this.minY = tileRange.minY;\n    }\n    if (tileRange.maxY > this.maxY) {\n      this.maxY = tileRange.maxY;\n    }\n  }\n\n  /**\n   * @return {number} Height.\n   */\n  getHeight() {\n    return this.maxY - this.minY + 1;\n  }\n\n  /**\n   * @return {import(\"./size.js\").Size} Size.\n   */\n  getSize() {\n    return [this.getWidth(), this.getHeight()];\n  }\n\n  /**\n   * @return {number} Width.\n   */\n  getWidth() {\n    return this.maxX - this.minX + 1;\n  }\n\n  /**\n   * @param {TileRange} tileRange Tile range.\n   * @return {boolean} Intersects.\n   */\n  intersects(tileRange) {\n    return (\n      this.minX <= tileRange.maxX &&\n      this.maxX >= tileRange.minX &&\n      this.minY <= tileRange.maxY &&\n      this.maxY >= tileRange.minY\n    );\n  }\n}\n\n/**\n * @param {number} minX Minimum X.\n * @param {number} maxX Maximum X.\n * @param {number} minY Minimum Y.\n * @param {number} maxY Maximum Y.\n * @param {TileRange} [tileRange] TileRange.\n * @return {TileRange} Tile range.\n */\nexport function createOrUpdate(minX, maxX, minY, maxY, tileRange) {\n  if (tileRange !== undefined) {\n    tileRange.minX = minX;\n    tileRange.maxX = maxX;\n    tileRange.minY = minY;\n    tileRange.maxY = maxY;\n    return tileRange;\n  }\n  return new TileRange(minX, maxX, minY, maxY);\n}\n\nexport default TileRange;\n", "import { Fill, Stroke, Style, Text } from \"ol/style\";\nimport Point from \"ol/geom/Point\";\n\nexport function numberVertices(feature, styles) {\n  const geometry = feature.getGeometry();\n  const coordinates = geometry.getLinearRing(0).getCoordinates();\n  coordinates.forEach((coordinate, index) => {\n    const vertexLabel = new Style({\n      text: new Text({\n        text: `P${index + 1}`,\n        scale: 2,\n        stroke: new Stroke({ color: \"rgba(255, 255, 255, 1.0)\", width: 3 }),\n        fill: new Fill({ color: \"rgba(170, 51, 0, 1.0)\" }),\n      }),\n      geometry: new Point(coordinate),\n    });\n    if (index !== coordinates.length - 1) styles.push(vertexLabel);\n  });\n}\n\nexport function pill({ width, height, strokeColor = \"#000\", fillColor = \"#000\", strokeWidth = 2 }) {\n  const canvas = document.createElement(\"canvas\");\n  canvas.height = height;\n  canvas.width = width;\n  const context = canvas.getContext(\"2d\");\n\n  const radius = height / 2;\n\n  const top = strokeWidth;\n  const left = strokeWidth;\n  const bottom = height - strokeWidth;\n  const right = width - strokeWidth;\n\n  context.beginPath();\n  context.moveTo(width - radius, top);\n  context.arcTo(right, top, right, radius, radius);\n  context.arcTo(right, bottom, right - radius, bottom, radius);\n  context.arcTo(left, bottom, left, radius, radius);\n  context.arcTo(left, top, radius, top, radius);\n  context.closePath();\n\n  context.strokeStyle = strokeColor;\n  context.fillStyle = fillColor;\n  context.lineWidth = strokeWidth;\n\n  context.fill();\n  context.stroke();\n\n  return canvas;\n}\n", "import { Fill, Stroke, Style, Text } from \"ol/style\";\nimport { numberVertices } from \"./helpers\";\n\nconst LEGAL_ROOF_SECTION_STROKE_COLOR = \"rgba(16, 183, 0, 0.6)\";\nconst LEGAL_ROOF_SECTION_FILL_COLOR = \"rgba(16, 183, 0, 0.1)\";\nconst LEGAL_ROOF_SECTION_STROKE = new Stroke({ color: LEGAL_ROOF_SECTION_STROKE_COLOR, width: 3 });\nconst LEGAL_ROOF_SECTION_FILL = new Fill({ color: LEGAL_ROOF_SECTION_FILL_COLOR });\n\nconst ILLEGAL_ROOF_SECTION_STROKE = new Stroke({ color: \"rgba(255,0, 0, 1.0)\", width: 3 });\nconst ILLEGAL_ROOF_SECTION_FILL = new Fill({ color: \"rgba(255,0, 0, 0.3)\" });\n\nconst ENCROACHING_ROOF_SECTION_STROKE_COLOR = \"rgba(255, 109, 0, 1.0)\";\nconst ENCROACHING_ROOF_SECTION_FILL_COLOR = \"rgba(255, 109, 0, 0.2)\";\nconst ENCROACHING_ROOF_SECTION_STROKE = new Stroke({ color: ENCROACHING_ROOF_SECTION_STROKE_COLOR, width: 3 });\nconst ENCROACHING_ROOF_SECTION_FILL = new Fill({ color: ENCROACHING_ROOF_SECTION_FILL_COLOR });\n\nexport function roofSectionsStyle(feature, controller, project) {\n  const roofSection = project.getRoofSection(feature.get(\"uuid\"));\n  const roofPlane = roofSection.roofPlane;\n  const label = roofSection ? roofSection.displayIdentifier : \"x\";\n  const labelText = new Text({ text: label, scale: 2, fill: new Fill({ color: \"rgba(255, 255, 255, 1.0)\" }) });\n\n  let style;\n  const showAsIllegal =\n    feature.get(\"illegalShape\") || feature.get(\"cellsWithErrors\") || (project.isBX && roofSection.isDeficientLayout);\n  if (showAsIllegal) {\n    style = new Style({\n      stroke: ILLEGAL_ROOF_SECTION_STROKE,\n      fill: ILLEGAL_ROOF_SECTION_FILL,\n      text: labelText,\n    });\n  } else if (roofPlane.stale || feature.get(\"encroaching\") || feature.get(\"fresh\") === false) {\n    // have to explicitly check if fresh is false rather than undefined because PR doesn't\n    // have that attribute\n    style = new Style({\n      stroke: ENCROACHING_ROOF_SECTION_STROKE,\n      fill: ENCROACHING_ROOF_SECTION_FILL,\n      text: labelText,\n    });\n  } else {\n    // legal style\n    style = new Style({\n      stroke: LEGAL_ROOF_SECTION_STROKE,\n      fill: LEGAL_ROOF_SECTION_FILL,\n      text: labelText,\n    });\n  }\n  const styles = [style];\n\n  if (controller.debugMode === \"YES\") numberVertices(feature, styles);\n\n  return styles;\n}\n\nexport function selectRoofSectionPolygonStrokeAndFillColors(feature) {\n  if (feature.get(\"encroaching\")) {\n    return [ENCROACHING_ROOF_SECTION_STROKE_COLOR, \"rgba(255, 109, 0, 0.3)\"];\n  } else {\n    return [LEGAL_ROOF_SECTION_STROKE_COLOR, \"rgba(16, 183, 0, 0.2)\"];\n  }\n}\n", "import { Fill, Stroke, Style, Text } from \"ol/style\";\nimport { sentryException } from \"../../../config/sentry\";\nimport { numberVertices } from \"./helpers\";\n\nexport function roofPlaneStyle(feature, controller, project) {\n  const styles = [];\n\n  const opacity = controller.isRoofPlanesPage ? 0.3 : 0.1;\n  const uuid = feature.get(\"uuid\");\n  const roofPlane = project.getRoofPlane(uuid);\n\n  if (!roofPlane) {\n    // const deletedRoofPlane = project.deletedRoofPlane(uuid);\n    // if (deletedRoofPlane === undefined) {\n    //   const extras = {\n    //     uuid: uuid,\n    //     project: project.id,\n    //     feature: feature.getProperties(),\n    //   };\n    //   sentryException(\n    //     `[Handled Error] Trying to render a roof plane that is not in the array of deleted roof planes for project.`,\n    //     extras,\n    //   );\n    // } else {\n    //   const extras = {\n    //     saveStatus: deletedRoofPlane.id === undefined ? \"unpersisted\" : \"persisted\",\n    //     uuid: uuid,\n    //     project: project.id,\n    //     deletedAt: deletedRoofPlane.deletedAt,\n    //   };\n    //   sentryException(`[Handled Error] Trying to render a deleted roof plane for project.`, extras);\n    // }\n\n    return [];\n  }\n\n  let label = roofPlane.identifier;\n  if (!controller.isRoofPlanesPage && roofPlane.hasActiveRoofSections) {\n    label = \"\";\n  }\n\n  const warningStrokeColor = controller.isRoofSectionsPage ? \"rgba(255, 0, 0, 1.0)\" : \"rgba(77, 151, 246, 1.0)\";\n\n  if (roofPlane.illegalShape) {\n    styles.push(illegalRoofPlaneStyle(opacity, label));\n  } else if (!controller.isRoofSectionsPage && roofPlane.hasIllegalRoofSections) {\n    styles.push(legalRoofPlaneWithIllegalRoofSections(label, opacity));\n  } else if (roofPlane.isRoofSectionRequired) {\n    styles.push(roofPlaneWithoutRoofSectionsStyle(label, opacity, warningStrokeColor));\n  } else if (controller.isRoofPlanesPage && roofPlane.modifyingTraceLocked) {\n    styles.push(lockedRoofPlaneStyle(label));\n  } else {\n    styles.push(legalRoofPlaneStyle(opacity, label));\n  }\n\n  if (controller.debugMode === \"YES\") numberVertices(feature, styles);\n\n  return styles;\n}\n\nfunction legalRoofPlaneStyle(opacity, label) {\n  return new Style({\n    stroke: new Stroke({ color: \"rgba(77, 151, 246, 1.0)\", width: 3 }),\n    fill: new Fill({ color: `rgba(77, 151, 246, ${opacity})` }),\n    text: new Text({ text: label, scale: 2, fill: new Fill({ color: \"rgba(255, 255, 255, 1.0)\" }) }),\n  });\n}\n\nfunction illegalRoofPlaneStyle(opacity, label) {\n  return new Style({\n    stroke: new Stroke({ color: \"rgba(255, 0, 0, 1.0)\", width: 3 }),\n    fill: new Fill({ color: `rgba(255, 0, 0, ${opacity})` }),\n    text: new Text({ text: label, scale: 2, fill: new Fill({ color: \"rgba(255, 255, 255, 1.0)\" }) }),\n    zIndex: 3,\n  });\n}\n\nfunction legalRoofPlaneWithIllegalRoofSections(label, opacity) {\n  return new Style({\n    stroke: new Stroke({ color: \"rgba(77, 151, 246, 1.0)\", width: 3 }),\n    fill: new Fill({ color: `rgba(255, 0, 0, ${opacity})` }),\n    text: new Text({ text: label, scale: 2, fill: new Fill({ color: \"rgba(255, 255, 255, 1.0)\" }) }),\n    zIndex: 3,\n  });\n}\n\nfunction roofPlaneWithoutRoofSectionsStyle(label, opacity, warningStrokeColor) {\n  return new Style({\n    stroke: new Stroke({ color: warningStrokeColor, width: 3 }),\n    fill: new Fill({ color: `rgba(255, 0, 0, ${opacity})` }),\n    text: new Text({ text: label, scale: 2, fill: new Fill({ color: \"rgba(255, 255, 255, 1.0)\" }) }),\n    zIndex: 2,\n  });\n}\n\nfunction lockedRoofPlaneStyle(label) {\n  return new Style({\n    stroke: new Stroke({ color: \"rgba(246, 240, 56, 1.0)\", width: 3 }),\n    fill: new Fill({ color: `rgba(246, 240, 56, 0.3)` }),\n    text: new Text({ text: label, scale: 2, fill: new Fill({ color: \"rgba(255, 255, 255, 1.0)\" }) }),\n  });\n}\n\nexport function selectRoofPlanePolygonStrokeAndFillColors(feature, controller) {\n  const roofPlane = controller.project.getRoofPlane(feature.get(\"uuid\"));\n\n  if (roofPlane.hasIllegalRoofSections) {\n    return [\"rgba(77, 151, 246, 1.0)\", `rgba(255, 0, 0, 0.4)`];\n  } else if (roofPlane.isRoofSectionRequired) {\n    return [\"rgba(77, 151, 246, 1.0)\", `rgba(255, 0, 0, 0.4)`];\n  } else {\n    return [\"rgba(77, 151, 246, 1.0)\", \"rgba(77, 151, 246, 0.4)\"];\n  }\n}\n", "import { getDistance } from \"ol/sphere\";\nimport { toLonLat } from \"ol/proj\";\nimport { distanceBetweenCoordinatesInInches, isARoofPlane } from \"./ol-helpers\";\nimport { debugIt } from \"../../helpers/logger\";\nimport { degreesToRadians } from \"../../helpers/geometry\";\n\nexport function buildSimpleEdgeList(coordinates) {\n  const edgeList = convertCoordinatesToEdges(coordinates);\n  edgeList.forEach((edge) => {\n    const [startPoint, endPoint] = edge.segment;\n    // distance is the OL calculated distance between adjacent\n    // vertices. This is accurate for an 0 degree sloped roof.\n    edge.distance = distanceBetweenCoordinatesInInches(startPoint, endPoint);\n  });\n\n  return edgeList;\n}\n\n// builds an edge list, but the distance of the edge takes into\n// account the actual size of things by adjusting for roof slope\nexport function buildLengthCorrectedEdgeList(feature, controller) {\n  const geometry = feature.getGeometry().getLinearRing(0);\n  const coordinates = geometry.getCoordinates();\n\n  const roofPlane = getRoofPlaneForFeature(feature, controller);\n  const anchorPoint = findAnchorPoint(coordinates, roofPlane);\n  if (!anchorPoint) return buildSimpleEdgeList(coordinates);\n\n  // each element is:\n  //   original: a point in OL coordinates\n  //   distanceCoordinates: same point in distance from anchor point\n  //   rotatedDistanceCoordinates: rotated so eave is aligned to X axis\n  //   adjustedDistanceCoordinates: rotated point with Y value scaled by 1/cos(roofSlope)\n  const coordinateVariations = coordinates.map((c) => ({ original: c }));\n  addDistanceCoordinates(coordinateVariations, anchorPoint);\n\n  const farEndOfEaveInDistanceCoordinates = coordinateVariations[roofPlane.eaveEdgeIndex + 1].distanceCoordinates;\n  const rotationAngle = rotateFeature(farEndOfEaveInDistanceCoordinates, coordinateVariations, roofPlane);\n  scaleYAxis(coordinateVariations, roofPlane);\n\n  const edgeList = convertCoordinatesToEdges(coordinates);\n  addAdjustedDistanceToEdgeList(edgeList, coordinateVariations);\n  // stick the rotationAngle into the first element of the edgeList so\n  // we can get to it\n  edgeList[0].rotationAngle = rotationAngle;\n\n  return edgeList;\n}\n\nexport function buildLengthCorrectedMeasure(rpFeature, controller, measureFeature) {\n  const geometry = rpFeature.getGeometry().getLinearRing(0);\n  const coordinates = geometry.getCoordinates();\n  const measureCoordinates = measureFeature.getGeometry().getCoordinates();\n\n  const roofPlane = getRoofPlaneForFeature(rpFeature, controller);\n  const anchorPoint = findAnchorPoint(coordinates, roofPlane);\n  if (!anchorPoint) return undefined;\n\n  // Need to get eave of roofPlane in distance coordinates\n  const coordinateVariations = coordinates.map((c) => ({ original: c }));\n  addDistanceCoordinates(coordinateVariations, anchorPoint);\n  const farEndOfEaveInDistanceCoordinates = coordinateVariations[roofPlane.eaveEdgeIndex + 1].distanceCoordinates;\n\n  // build an edge list (of 1 element) based on the measure and containing its length\n  // corrected for the roof slope of the roof plane\n  const measureCoordinateVariations = measureCoordinates.map((c) => ({ original: c }));\n  addDistanceCoordinates(measureCoordinateVariations, anchorPoint);\n  rotateFeature(farEndOfEaveInDistanceCoordinates, measureCoordinateVariations, roofPlane);\n  scaleYAxis(measureCoordinateVariations, roofPlane);\n  const edgeList = convertCoordinatesToEdges(measureCoordinates);\n  addAdjustedDistanceToEdgeList(edgeList, measureCoordinateVariations);\n\n  return edgeList;\n}\n\nfunction convertCoordinatesToEdges(coordinates) {\n  const edgeList = [];\n\n  for (let i = 0; i < coordinates.length - 1; i++) {\n    const startPoint = coordinates[i];\n    const endPoint = coordinates[i + 1];\n\n    const edge = {\n      segment: [startPoint, endPoint],\n    };\n    edgeList.push(edge);\n  }\n\n  return edgeList;\n}\n\nfunction addAdjustedDistanceToEdgeList(edgeList, coordinateVariations) {\n  for (let i = 0; i < edgeList.length; i++) {\n    const edge = edgeList[i];\n\n    const adjustedStart = coordinateVariations[i].adjustedDistanceCoordinates;\n    const adjustedEnd = coordinateVariations[i + 1].adjustedDistanceCoordinates;\n\n    const dx = adjustedEnd[0] - adjustedStart[0];\n    const dy = adjustedEnd[1] - adjustedStart[1];\n\n    const distanceInFeet = Math.sqrt(dx * dx + dy * dy);\n\n    // this distance is the value between two adjacent points\n    // in adjustedDistanceCoordinates.\n    edge.distance = distanceInFeet * 12.0;\n  }\n}\n\nfunction getRoofPlaneForFeature(feature, controller) {\n  let uuid;\n  if (isARoofPlane(feature)) {\n    uuid = feature.get(\"uuid\");\n  } else {\n    uuid = feature.get(\"roofPlaneUuid\");\n  }\n  if (!uuid) debugIt();\n\n  return controller.project.getRoofPlane(uuid);\n}\n\nfunction findAnchorPoint(coordinates, roofPlane) {\n  if (roofPlane.eaveEdgeIndex !== null) {\n    return coordinates[roofPlane.eaveEdgeIndex];\n  } else {\n    return undefined;\n  }\n}\n\nfunction addDistanceCoordinates(coordinateVariations, anchorPoint) {\n  const anchorPointLonLat = toLonLat(anchorPoint);\n\n  coordinateVariations.forEach((coordinate) => {\n    const vertex = coordinate.original;\n\n    const vertexLonLat = toLonLat(vertex);\n    const cornerLonLat = [vertexLonLat[0], anchorPointLonLat[1]];\n\n    const distanceLng = getDistance(anchorPointLonLat, cornerLonLat) * 3.28084;\n    const distanceLat = getDistance(cornerLonLat, vertexLonLat) * 3.28084;\n\n    // As lng gets more negative, x gets smaller\n    const signLng = vertexLonLat[0] < anchorPointLonLat[0] ? -1 : 1;\n    // as lat gets bigger, y gets bigger\n    const signLat = vertexLonLat[1] > anchorPointLonLat[1] ? 1 : -1;\n\n    coordinate.distanceCoordinates = [signLng * distanceLng, signLat * distanceLat];\n  });\n}\n\nfunction rotateFeature(farEndOfEaveInDistanceCoordinates, coordinateVariations, roofPlane) {\n  const angle = Math.atan2(farEndOfEaveInDistanceCoordinates[1], farEndOfEaveInDistanceCoordinates[0]);\n  const rotation = -angle;\n\n  coordinateVariations.forEach((variation) => {\n    const coordinates = variation.distanceCoordinates;\n\n    const x = coordinates[0];\n    const y = coordinates[1];\n\n    const xPrime = x * Math.cos(rotation) - y * Math.sin(rotation);\n    const yPrime = x * Math.sin(rotation) + y * Math.cos(rotation);\n\n    variation.rotatedDistanceCoordinates = [xPrime, yPrime];\n  });\n\n  return rotation;\n}\n\nfunction scaleYAxis(coordinateVariations, roofPlane) {\n  const roofSlopeRadians = degreesToRadians(roofPlane.roofSlope);\n  const scaling = 1.0 / Math.cos(roofSlopeRadians);\n\n  coordinateVariations.forEach((variation) => {\n    const coordinates = variation.rotatedDistanceCoordinates;\n\n    const x = coordinates[0];\n    const y = coordinates[1];\n\n    variation.adjustedDistanceCoordinates = [x, y * scaling];\n  });\n}\n", "import { Fill, Style, Text, Icon, Stroke, Circle } from \"ol/style\";\nimport Point from \"ol/geom/Point\";\nimport { distanceBetweenCoordinatesInInches, GeometryType } from \"../ol-helpers\";\nimport { debounce } from \"lodash\";\n\nimport { inchesToFeetAndInches, logger } from \"../../../helpers/app\";\nimport { lineTooShortToShowOrnamentation } from \"../ol-helpers\";\nimport { buildSimpleEdgeList, buildLengthCorrectedEdgeList } from \"../edge-list\";\nimport { pill } from \"./helpers\";\n\nexport function lineWithDistancePills(feature, map, activeLineRGB, inactiveRGB, lineStringStrokeWidth, showEndDots) {\n  const geometry = feature.getGeometry();\n  const geometryType = geometry.getType();\n\n  const activeLineColor = `rgba(${activeLineRGB})`;\n  const inactiveColorOpaque = `rgba(${inactiveRGB}, 1.0)`;\n  const inactiveColorTransparent = `rgba(${inactiveRGB}, 0.5)`;\n\n  const lineStringStroke = new Stroke({ color: activeLineColor, width: lineStringStrokeWidth });\n  const polygonStroke = new Stroke({ color: inactiveColorOpaque, width: 3 });\n  const stroke = geometryType === GeometryType.POLYGON ? polygonStroke : lineStringStroke;\n\n  let image;\n  if (showEndDots) {\n    image = new Circle({\n      radius: 5,\n      fill: new Fill({ color: inactiveColorOpaque }),\n      snapToPixel: true,\n    });\n  }\n  const styles = [\n    new Style({\n      stroke,\n      fill: new Fill({ color: inactiveColorTransparent }),\n      image,\n    }),\n  ];\n\n  if (geometryType === GeometryType.LINE_STRING) {\n    const [startPoint, endPoint] = lastSegment(geometry);\n\n    const distanceInInches =\n      feature.get(\"slopeAdjustedDistance\") || distanceBetweenCoordinatesInInches(startPoint, endPoint);\n\n    if (!lineTooShortToShowOrnamentation(map, startPoint, endPoint, 70)) {\n      styles.push(buildDimensionStyle(startPoint, endPoint, activeLineColor, distanceInInches, map));\n    }\n    printDimensionMarkerDistance(distanceInInches);\n  }\n\n  return styles;\n}\n\nconst printDimensionMarkerDistance = debounce((distance) => {\n  logger(`dimension marker distance: ${inchesToFeetAndInches(distance)} (${distance}\")`);\n}, 200);\n\nfunction lastSegment(lineString) {\n  let priorPoint;\n  let currentPoint;\n\n  lineString.forEachSegment((start, end) => {\n    priorPoint = start.slice();\n    currentPoint = end.slice();\n  });\n\n  return [priorPoint, currentPoint];\n}\n\nfunction buildDimensionStyle(startPoint, endPoint, strokeColor, distanceInInches, map) {\n  const dx = endPoint[0] - startPoint[0];\n  const dy = endPoint[1] - startPoint[1];\n  const rotationStartToEnd = Math.atan2(dy, dx);\n\n  // OpenLayers has positive rotation to the SE\n  const pillRotation = -rotationStartToEnd;\n\n  const mapRotation = map.getView().getRotation();\n  let netRotation = mapRotation + pillRotation;\n\n  // keep netRotation between -PI and +PI\n  if (netRotation < -Math.PI) {\n    netRotation += Math.PI;\n  } else if (netRotation > Math.PI) {\n    netRotation -= Math.PI;\n  }\n\n  // flip text over if it in quadrant 2 or 3\n  let textRotation = netRotation;\n  if (netRotation > Math.PI / 2.0) {\n    textRotation -= Math.PI;\n  } else if (netRotation < -Math.PI / 2.0) {\n    textRotation += Math.PI;\n  }\n\n  const midPoint = [(startPoint[0] + endPoint[0]) / 2.0, (startPoint[1] + endPoint[1]) / 2.0];\n  const label = inchesToFeetAndInches(distanceInInches);\n\n  const width = IR_GLOBALS.dimensionLabelsPrecision ? 60 + 5 * IR_GLOBALS.dimensionLabelsPrecision : 60;\n\n  const dimensionStyle = new Style({\n    geometry: new Point(midPoint),\n    image: new Icon({\n      img: pill({ width, height: 25, strokeColor }),\n      imgSize: [width, 25],\n      rotateWithView: true,\n      rotation: netRotation - mapRotation,\n    }),\n    text: new Text({\n      text: label,\n      font: \"bold 12px sans-serif\",\n      fill: new Fill({ color: \"white\" }),\n      rotateWithView: true,\n      rotation: textRotation - mapRotation,\n    }),\n    zIndex: 5,\n  });\n\n  return dimensionStyle;\n}\n\nexport function addDimensionMarkersToEdges(feature, controller, styles, lineColor) {\n  const geometry = feature.getGeometry();\n  const geometryType = geometry.getType();\n  if (geometryType === GeometryType.POLYGON) {\n    let edgeList;\n    if (controller.project.shouldLengthCorrectEdges) {\n      edgeList = buildLengthCorrectedEdgeList(feature, controller);\n    } else {\n      const coordinates = geometry.getLinearRing(0).getCoordinates();\n      edgeList = buildSimpleEdgeList(coordinates);\n    }\n    const { map } = controller.mapManager;\n    addDimensionMarkersToSegmentsBetweenCoordinates(styles, map, lineColor, edgeList);\n  }\n}\n\nexport function addDimensionMarkersToSegmentsBetweenCoordinates(styles, map, lineColor, edgeList) {\n  edgeList.forEach((edge) => {\n    const [startPoint, endPoint] = edge.segment;\n    const { distance } = edge;\n\n    if (!lineTooShortToShowOrnamentation(map, startPoint, endPoint, 70)) {\n      styles.push(buildDimensionStyle(startPoint, endPoint, lineColor, distance, map));\n    }\n  });\n}\n", "import { Stroke, Style, Circle, Text, Fill } from \"ol/style\";\nimport MultiPoint from \"ol/geom/MultiPoint\";\nimport { GeometryType } from \"../ol-helpers\";\n\nimport { buildSimpleEdgeList } from \"../edge-list\";\nimport { addDimensionMarkersToSegmentsBetweenCoordinates, lineWithDistancePills } from \"./distance-markers\";\n\nconst MEASURE_COLOR = \"241, 0, 200\";\nconst MEASURE_ADJUSTED_COLOR = \"12, 187, 170\";\n\nexport function measureDrawStyle(feature, map) {\n  const color = measureColor(feature);\n  return lineWithDistancePills(feature, map, color, color, 3, true);\n}\n\nfunction measureColor(feature) {\n  return feature.get(\"slopeAdjustedDistance\") ? MEASURE_ADJUSTED_COLOR : MEASURE_COLOR;\n}\n\nexport function selectMeasureStyle(feature, controller, map) {\n  const styles = [];\n\n  const color = measureColor(feature);\n  const strokeColor = `rgba(${color}, 1.0)`;\n  const fillColor = `rgba(${color}, 0.3)`;\n\n  const lineStringStyle = new Style({\n    stroke: new Stroke({ color: strokeColor, width: 3 }),\n    fill: new Fill({ color: fillColor }),\n    zIndex: 1,\n  });\n  styles.push(lineStringStyle);\n\n  const vertices = verticesOfSelectedMeasure(feature);\n\n  const vertexOuterCircleStyle = new Style({\n    image: new Circle({\n      radius: 6,\n      fill: new Fill({ color: strokeColor }),\n      snapToPixel: true,\n    }),\n    geometry: vertices,\n  });\n  styles.push(vertexOuterCircleStyle);\n\n  const vertexInnerCircleStyle = new Style({\n    image: new Circle({\n      radius: 4,\n      fill: new Fill({ color: \"rgba(255, 255, 255, 1.0)\" }),\n      snapToPixel: true,\n    }),\n    geometry: vertices,\n    zIndex: 2,\n  });\n  styles.push(vertexInnerCircleStyle);\n\n  addDimensionMarkerToMeasure(feature, styles, map, strokeColor);\n\n  return styles;\n}\n\nfunction addDimensionMarkerToMeasure(feature, styles, map, lineColor) {\n  const geometry = feature.getGeometry();\n  const geometryType = geometry.getType();\n  if (geometryType === GeometryType.LINE_STRING) {\n    const coordinates = geometry.getCoordinates();\n\n    let edgeList;\n    const slopeAdjustedDistance = feature.get(\"slopeAdjustedDistance\");\n\n    if (slopeAdjustedDistance) {\n      const lineStringCoordinates = geometry.getCoordinates();\n      edgeList = [{ segment: lineStringCoordinates, distance: slopeAdjustedDistance }];\n    } else {\n      edgeList = buildSimpleEdgeList(coordinates);\n    }\n\n    addDimensionMarkersToSegmentsBetweenCoordinates(styles, map, lineColor, edgeList);\n  }\n}\n\nfunction verticesOfSelectedMeasure(feature) {\n  const geometry = feature.getGeometry();\n  const coordinates = geometry.getCoordinates();\n\n  return new MultiPoint(coordinates);\n}\n", "import { Text, Circle, Fill, Stroke, Style } from \"ol/style\";\n\nexport function visualMarkerStyle(feature) {\n  const fillColor = feature.get(\"fillColor\") || \"#520077\";\n  const radius = feature.get(\"radius\") || 8;\n  const strokeColor = feature.get(\"strokeColor\") || \"#fff\";\n  const strokeWidth = feature.get(\"strokeWidth\") || 1;\n\n  const image = new Circle({\n    fill: new Fill({ color: fillColor }),\n    stroke: new Stroke({ color: strokeColor, width: strokeWidth }),\n    radius,\n  });\n\n  let text;\n  if (feature.get(\"text\")) {\n    text = new Text({\n      text: feature.get(\"text\"),\n      font: \"bold 12px sans-serif\",\n      fill: new Fill({ color: \"white\" }),\n    });\n  }\n  return new Style({ image, text });\n}\n", "import { Circle, Fill, Stroke, Style } from \"ol/style\";\nimport { GeometryType } from \"../ol-helpers\";\nimport { GUIDE_VERTEX_DATA_TYPE } from \"../data-types\";\n\nconst SHAPE_GUIDE_LINE_STYLE = new Style({\n  stroke: new Stroke({ color: `rgba(255, 0, 0, 0.5)`, width: 1 }),\n  zIndex: 10,\n});\n\nconst MARKER_STYLE = new Style({\n  stroke: new Stroke({ color: `rgba(255, 0, 0)`, width: 1 }),\n  zIndex: 20,\n});\n\nconst GUIDE_VERTEX_STYLE = new Style({\n  image: new Circle({\n    radius: 5,\n    fill: new Fill({ color: `rgba(255, 0, 0, 0)` }),\n    stroke: new Stroke({ color: `rgba(255, 0, 0, 0.5)`, width: 5 }),\n  }),\n  zIndex: 30,\n});\n\nexport function shapeGuideLinesStyle(feature) {\n  const geometry = feature.getGeometry();\n  const geometryType = geometry.getType();\n  const featureType = feature.get(\"type\");\n\n  if (featureType === GUIDE_VERTEX_DATA_TYPE) {\n    return GUIDE_VERTEX_STYLE;\n  }\n\n  if (geometryType === GeometryType.LINE_STRING) {\n    return SHAPE_GUIDE_LINE_STYLE;\n  } else {\n    return MARKER_STYLE;\n  }\n}\n", "import { Fill, Style } from \"ol/style\";\nimport { SETBACK_DATA_TYPE } from \"../data-types\";\n\nconst SETBACK_STYLE = new Style({\n  fill: new Fill({ color: `rgba(231, 201, 6, 0.4)` }),\n});\n\nexport function setbacksStyle(_feature) {\n  return SETBACK_STYLE;\n}\n\nexport function isSetback(feature) {\n  return feature.get(\"dataType\") === SETBACK_DATA_TYPE;\n}\n\nexport function selectSetbackPolygonStrokeAndFillColors() {\n  return [\"rgba(246, 240, 56, 1.0)\", \"rgba(246, 240, 56, 0.3)\"];\n}\n", "/**\n * @module ol/format/Feature\n */\nimport Feature from '../Feature.js';\nimport GeometryCollection from '../geom/GeometryCollection.js';\nimport LineString from '../geom/LineString.js';\nimport MultiLineString from '../geom/MultiLineString.js';\nimport MultiPoint from '../geom/MultiPoint.js';\nimport MultiPolygon from '../geom/MultiPolygon.js';\nimport Point from '../geom/Point.js';\nimport Polygon from '../geom/Polygon.js';\nimport {\n  linearRingsAreOriented,\n  linearRingssAreOriented,\n  orientLinearRings,\n  orientLinearRingsArray,\n} from '../geom/flat/orient.js';\nimport {\n  equivalent as equivalentProjection,\n  get as getProjection,\n  getTransform,\n  transformExtent,\n} from '../proj.js';\nimport RenderFeature from '../render/Feature.js';\nimport {abstract} from '../util.js';\n\n/**\n * @typedef {Object} ReadOptions\n * @property {import(\"../proj.js\").ProjectionLike} [dataProjection] Projection of the data we are reading.\n * If not provided, the projection will be derived from the data (where possible) or\n * the `dataProjection` of the format is assigned (where set). If the projection\n * can not be derived from the data and if no `dataProjection` is set for a format,\n * the features will not be reprojected.\n * @property {import(\"../extent.js\").Extent} [extent] Tile extent in map units of the tile being read.\n * This is only required when reading data with tile pixels as geometry units. When configured,\n * a `dataProjection` with `TILE_PIXELS` as `units` and the tile's pixel extent as `extent` needs to be\n * provided.\n * @property {import(\"../proj.js\").ProjectionLike} [featureProjection] Projection of the feature geometries\n * created by the format reader. If not provided, features will be returned in the\n * `dataProjection`.\n */\n\n/**\n * @typedef {Object} WriteOptions\n * @property {import(\"../proj.js\").ProjectionLike} [dataProjection] Projection of the data we are writing.\n * If not provided, the `dataProjection` of the format is assigned (where set).\n * If no `dataProjection` is set for a format, the features will be returned\n * in the `featureProjection`.\n * @property {import(\"../proj.js\").ProjectionLike} [featureProjection] Projection of the feature geometries\n * that will be serialized by the format writer. If not provided, geometries are assumed\n * to be in the `dataProjection` if that is set; in other words, they are not transformed.\n * @property {boolean} [rightHanded] When writing geometries, follow the right-hand\n * rule for linear ring orientation.  This means that polygons will have counter-clockwise\n * exterior rings and clockwise interior rings.  By default, coordinates are serialized\n * as they are provided at construction.  If `true`, the right-hand rule will\n * be applied.  If `false`, the left-hand rule will be applied (clockwise for\n * exterior and counter-clockwise for interior rings).  Note that not all\n * formats support this.  The GeoJSON format does use this property when writing\n * geometries.\n * @property {number} [decimals] Maximum number of decimal places for coordinates.\n * Coordinates are stored internally as floats, but floating-point arithmetic can create\n * coordinates with a large number of decimal places, not generally wanted on output.\n * Set a number here to round coordinates. Can also be used to ensure that\n * coordinates read in can be written back out with the same number of decimals.\n * Default is no rounding.\n */\n\n/**\n * @typedef {'arraybuffer' | 'json' | 'text' | 'xml'} Type\n */\n\n/**\n * @typedef {Object} SimpleGeometryObject\n * @property {import('../geom/Geometry.js').Type} type Type.\n * @property {Array<number>} flatCoordinates Flat coordinates.\n * @property {Array<number>|Array<Array<number>>} [ends] Ends or endss.\n * @property {import('../geom/Geometry.js').GeometryLayout} [layout] Layout.\n */\n\n/**\n * @typedef {Array<GeometryObject>} GeometryCollectionObject\n */\n\n/**\n * @typedef {SimpleGeometryObject|GeometryCollectionObject} GeometryObject\n */\n\n/**\n * @typedef {Object} FeatureObject\n * @property {string|number} [id] Id.\n * @property {GeometryObject} [geometry] Geometry.\n * @property {Object<string, *>} [properties] Properties.\n */\n\n/***\n * @template {import('../Feature.js').FeatureLike} T\n * @typedef {T extends RenderFeature ? typeof RenderFeature : typeof Feature} FeatureToFeatureClass\n */\n\n/***\n * @template {import(\"../Feature.js\").FeatureClass} T\n * @typedef {T[keyof T] extends RenderFeature ? RenderFeature : Feature} FeatureClassToFeature\n */\n\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Base class for feature formats.\n * {@link module:ol/format/Feature~FeatureFormat} subclasses provide the ability to decode and encode\n * {@link module:ol/Feature~Feature} objects from a variety of commonly used geospatial\n * file formats.  See the documentation for each format for more details.\n *\n * @template {import('../Feature.js').FeatureLike} [FeatureType=import(\"../Feature.js\").default]\n * @abstract\n * @api\n */\nclass FeatureFormat {\n  constructor() {\n    /**\n     * @protected\n     * @type {import(\"../proj/Projection.js\").default|undefined}\n     */\n    this.dataProjection = undefined;\n\n    /**\n     * @protected\n     * @type {import(\"../proj/Projection.js\").default|undefined}\n     */\n    this.defaultFeatureProjection = undefined;\n\n    /**\n     * @protected\n     * @type {FeatureToFeatureClass<FeatureType>}\n     */\n    this.featureClass = /** @type {FeatureToFeatureClass<FeatureType>} */ (\n      Feature\n    );\n\n    /**\n     * A list media types supported by the format in descending order of preference.\n     * @type {Array<string>}\n     */\n    this.supportedMediaTypes = null;\n  }\n\n  /**\n   * Adds the data projection to the read options.\n   * @param {Document|Element|Object|string} source Source.\n   * @param {ReadOptions} [options] Options.\n   * @return {ReadOptions|undefined} Options.\n   * @protected\n   */\n  getReadOptions(source, options) {\n    if (options) {\n      let dataProjection = options.dataProjection\n        ? getProjection(options.dataProjection)\n        : this.readProjection(source);\n      if (\n        options.extent &&\n        dataProjection &&\n        dataProjection.getUnits() === 'tile-pixels'\n      ) {\n        dataProjection = getProjection(dataProjection);\n        dataProjection.setWorldExtent(options.extent);\n      }\n      options = {\n        dataProjection: dataProjection,\n        featureProjection: options.featureProjection,\n      };\n    }\n    return this.adaptOptions(options);\n  }\n\n  /**\n   * Sets the `dataProjection` on the options, if no `dataProjection`\n   * is set.\n   * @param {WriteOptions|ReadOptions|undefined} options\n   *     Options.\n   * @protected\n   * @return {WriteOptions|ReadOptions|undefined}\n   *     Updated options.\n   */\n  adaptOptions(options) {\n    return Object.assign(\n      {\n        dataProjection: this.dataProjection,\n        featureProjection: this.defaultFeatureProjection,\n        featureClass: this.featureClass,\n      },\n      options,\n    );\n  }\n\n  /**\n   * @abstract\n   * @return {Type} The format type.\n   */\n  getType() {\n    return abstract();\n  }\n\n  /**\n   * Read a single feature from a source.\n   *\n   * @abstract\n   * @param {Document|Element|Object|string} source Source.\n   * @param {ReadOptions} [options] Read options.\n   * @return {FeatureType|Array<FeatureType>} Feature.\n   */\n  readFeature(source, options) {\n    return abstract();\n  }\n\n  /**\n   * Read all features from a source.\n   *\n   * @abstract\n   * @param {Document|Element|ArrayBuffer|Object|string} source Source.\n   * @param {ReadOptions} [options] Read options.\n   * @return {Array<FeatureType>} Features.\n   */\n  readFeatures(source, options) {\n    return abstract();\n  }\n\n  /**\n   * Read a single geometry from a source.\n   *\n   * @abstract\n   * @param {Document|Element|Object|string} source Source.\n   * @param {ReadOptions} [options] Read options.\n   * @return {import(\"../geom/Geometry.js\").default} Geometry.\n   */\n  readGeometry(source, options) {\n    return abstract();\n  }\n\n  /**\n   * Read the projection from a source.\n   *\n   * @abstract\n   * @param {Document|Element|Object|string} source Source.\n   * @return {import(\"../proj/Projection.js\").default|undefined} Projection.\n   */\n  readProjection(source) {\n    return abstract();\n  }\n\n  /**\n   * Encode a feature in this format.\n   *\n   * @abstract\n   * @param {Feature} feature Feature.\n   * @param {WriteOptions} [options] Write options.\n   * @return {string|ArrayBuffer} Result.\n   */\n  writeFeature(feature, options) {\n    return abstract();\n  }\n\n  /**\n   * Encode an array of features in this format.\n   *\n   * @abstract\n   * @param {Array<Feature>} features Features.\n   * @param {WriteOptions} [options] Write options.\n   * @return {string|ArrayBuffer} Result.\n   */\n  writeFeatures(features, options) {\n    return abstract();\n  }\n\n  /**\n   * Write a single geometry in this format.\n   *\n   * @abstract\n   * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n   * @param {WriteOptions} [options] Write options.\n   * @return {string|ArrayBuffer} Result.\n   */\n  writeGeometry(geometry, options) {\n    return abstract();\n  }\n}\n\nexport default FeatureFormat;\n\n/**\n * @template {import(\"../geom/Geometry.js\").default|RenderFeature} T\n * @param {T} geometry Geometry.\n * @param {boolean} write Set to true for writing, false for reading.\n * @param {WriteOptions|ReadOptions} [options] Options.\n * @return {T} Transformed geometry.\n */\nexport function transformGeometryWithOptions(geometry, write, options) {\n  const featureProjection = options\n    ? getProjection(options.featureProjection)\n    : null;\n  const dataProjection = options ? getProjection(options.dataProjection) : null;\n\n  let transformed = geometry;\n  if (\n    featureProjection &&\n    dataProjection &&\n    !equivalentProjection(featureProjection, dataProjection)\n  ) {\n    if (write) {\n      transformed = /** @type {T} */ (geometry.clone());\n    }\n    const fromProjection = write ? featureProjection : dataProjection;\n    const toProjection = write ? dataProjection : featureProjection;\n    if (fromProjection.getUnits() === 'tile-pixels') {\n      transformed.transform(fromProjection, toProjection);\n    } else {\n      transformed.applyTransform(getTransform(fromProjection, toProjection));\n    }\n  }\n  if (\n    write &&\n    options &&\n    /** @type {WriteOptions} */ (options).decimals !== undefined\n  ) {\n    const power = Math.pow(10, /** @type {WriteOptions} */ (options).decimals);\n    // if decimals option on write, round each coordinate appropriately\n    /**\n     * @param {Array<number>} coordinates Coordinates.\n     * @return {Array<number>} Transformed coordinates.\n     */\n    const transform = function (coordinates) {\n      for (let i = 0, ii = coordinates.length; i < ii; ++i) {\n        coordinates[i] = Math.round(coordinates[i] * power) / power;\n      }\n      return coordinates;\n    };\n    if (transformed === geometry) {\n      transformed = /** @type {T} */ (geometry.clone());\n    }\n    transformed.applyTransform(transform);\n  }\n  return transformed;\n}\n\n/**\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {ReadOptions} [options] Read options.\n * @return {import(\"../extent.js\").Extent} Transformed extent.\n */\nexport function transformExtentWithOptions(extent, options) {\n  const featureProjection = options\n    ? getProjection(options.featureProjection)\n    : null;\n  const dataProjection = options ? getProjection(options.dataProjection) : null;\n\n  if (\n    featureProjection &&\n    dataProjection &&\n    !equivalentProjection(featureProjection, dataProjection)\n  ) {\n    return transformExtent(extent, dataProjection, featureProjection);\n  }\n  return extent;\n}\n\nconst GeometryConstructor = {\n  Point: Point,\n  LineString: LineString,\n  Polygon: Polygon,\n  MultiPoint: MultiPoint,\n  MultiLineString: MultiLineString,\n  MultiPolygon: MultiPolygon,\n};\n\nfunction orientFlatCoordinates(flatCoordinates, ends, stride) {\n  if (Array.isArray(ends[0])) {\n    // MultiPolagon\n    if (!linearRingssAreOriented(flatCoordinates, 0, ends, stride)) {\n      flatCoordinates = flatCoordinates.slice();\n      orientLinearRingsArray(flatCoordinates, 0, ends, stride);\n    }\n    return flatCoordinates;\n  }\n  if (!linearRingsAreOriented(flatCoordinates, 0, ends, stride)) {\n    flatCoordinates = flatCoordinates.slice();\n    orientLinearRings(flatCoordinates, 0, ends, stride);\n  }\n  return flatCoordinates;\n}\n\n/**\n * @param {FeatureObject} object Feature object.\n * @param {WriteOptions|ReadOptions} [options] Options.\n * @return {RenderFeature|Array<RenderFeature>} Render feature.\n */\nexport function createRenderFeature(object, options) {\n  const geometry = object.geometry;\n  if (!geometry) {\n    return [];\n  }\n  if (Array.isArray(geometry)) {\n    return geometry\n      .map((geometry) => createRenderFeature({...object, geometry}))\n      .flat();\n  }\n\n  const geometryType =\n    geometry.type === 'MultiPolygon' ? 'Polygon' : geometry.type;\n  if (geometryType === 'GeometryCollection' || geometryType === 'Circle') {\n    throw new Error('Unsupported geometry type: ' + geometryType);\n  }\n\n  const stride = geometry.layout.length;\n  return transformGeometryWithOptions(\n    new RenderFeature(\n      geometryType,\n      geometryType === 'Polygon'\n        ? orientFlatCoordinates(geometry.flatCoordinates, geometry.ends, stride)\n        : geometry.flatCoordinates,\n      geometry.ends?.flat(),\n      stride,\n      object.properties || {},\n      object.id,\n    ).enableSimplifyTransformed(),\n    false,\n    options,\n  );\n}\n\n/**\n * @param {GeometryObject|null} object Geometry object.\n * @param {WriteOptions|ReadOptions} [options] Options.\n * @return {import(\"../geom/Geometry.js\").default} Geometry.\n */\nexport function createGeometry(object, options) {\n  if (!object) {\n    return null;\n  }\n  if (Array.isArray(object)) {\n    const geometries = object.map((geometry) =>\n      createGeometry(geometry, options),\n    );\n    return new GeometryCollection(geometries);\n  }\n  const Geometry = GeometryConstructor[object.type];\n  return transformGeometryWithOptions(\n    new Geometry(object.flatCoordinates, object.layout || 'XY', object.ends),\n    false,\n    options,\n  );\n}\n", "/**\n * @module ol/format/JSONFeature\n */\nimport {abstract} from '../util.js';\nimport FeatureFormat from './Feature.js';\n\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Base class for JSON feature formats.\n *\n * @template {import('../Feature.js').FeatureLike} [FeatureType=import(\"../Feature.js\").default]\n * @extends {FeatureFormat<FeatureType>}\n * @abstract\n */\nclass JSONFeature extends FeatureFormat {\n  constructor() {\n    super();\n  }\n\n  /**\n   * @return {import(\"./Feature.js\").Type} Format.\n   * @override\n   */\n  getType() {\n    return 'json';\n  }\n\n  /**\n   * Read a feature.  Only works for a single feature. Use `readFeatures` to\n   * read a feature collection.\n   *\n   * @param {ArrayBuffer|Document|Element|Object|string} source Source.\n   * @param {import(\"./Feature.js\").ReadOptions} [options] Read options.\n   * @return {FeatureType|Array<FeatureType>} Feature.\n   * @api\n   * @override\n   */\n  readFeature(source, options) {\n    return this.readFeatureFromObject(\n      getObject(source),\n      this.getReadOptions(source, options),\n    );\n  }\n\n  /**\n   * Read all features.  Works with both a single feature and a feature\n   * collection.\n   *\n   * @param {ArrayBuffer|Document|Element|Object|string} source Source.\n   * @param {import(\"./Feature.js\").ReadOptions} [options] Read options.\n   * @return {Array<FeatureType>} Features.\n   * @api\n   * @override\n   */\n  readFeatures(source, options) {\n    return this.readFeaturesFromObject(\n      getObject(source),\n      this.getReadOptions(source, options),\n    );\n  }\n\n  /**\n   * @abstract\n   * @param {Object} object Object.\n   * @param {import(\"./Feature.js\").ReadOptions} [options] Read options.\n   * @protected\n   * @return {FeatureType|Array<FeatureType>} Feature.\n   */\n  readFeatureFromObject(object, options) {\n    return abstract();\n  }\n\n  /**\n   * @abstract\n   * @param {Object} object Object.\n   * @param {import(\"./Feature.js\").ReadOptions} [options] Read options.\n   * @protected\n   * @return {Array<FeatureType>} Features.\n   */\n  readFeaturesFromObject(object, options) {\n    return abstract();\n  }\n\n  /**\n   * Read a geometry.\n   *\n   * @param {ArrayBuffer|Document|Element|Object|string} source Source.\n   * @param {import(\"./Feature.js\").ReadOptions} [options] Read options.\n   * @return {import(\"../geom/Geometry.js\").default} Geometry.\n   * @api\n   * @override\n   */\n  readGeometry(source, options) {\n    return this.readGeometryFromObject(\n      getObject(source),\n      this.getReadOptions(source, options),\n    );\n  }\n\n  /**\n   * @abstract\n   * @param {Object} object Object.\n   * @param {import(\"./Feature.js\").ReadOptions} [options] Read options.\n   * @protected\n   * @return {import(\"../geom/Geometry.js\").default} Geometry.\n   */\n  readGeometryFromObject(object, options) {\n    return abstract();\n  }\n\n  /**\n   * Read the projection.\n   *\n   * @param {ArrayBuffer|Document|Element|Object|string} source Source.\n   * @return {import(\"../proj/Projection.js\").default} Projection.\n   * @api\n   * @override\n   */\n  readProjection(source) {\n    return this.readProjectionFromObject(getObject(source));\n  }\n\n  /**\n   * @abstract\n   * @param {Object} object Object.\n   * @protected\n   * @return {import(\"../proj/Projection.js\").default} Projection.\n   */\n  readProjectionFromObject(object) {\n    return abstract();\n  }\n\n  /**\n   * Encode a feature as string.\n   *\n   * @param {import(\"../Feature.js\").default} feature Feature.\n   * @param {import(\"./Feature.js\").WriteOptions} [options] Write options.\n   * @return {string} Encoded feature.\n   * @api\n   * @override\n   */\n  writeFeature(feature, options) {\n    return JSON.stringify(this.writeFeatureObject(feature, options));\n  }\n\n  /**\n   * @abstract\n   * @param {import(\"../Feature.js\").default} feature Feature.\n   * @param {import(\"./Feature.js\").WriteOptions} [options] Write options.\n   * @return {Object} Object.\n   */\n  writeFeatureObject(feature, options) {\n    return abstract();\n  }\n\n  /**\n   * Encode an array of features as string.\n   *\n   * @param {Array<import(\"../Feature.js\").default>} features Features.\n   * @param {import(\"./Feature.js\").WriteOptions} [options] Write options.\n   * @return {string} Encoded features.\n   * @api\n   * @override\n   */\n  writeFeatures(features, options) {\n    return JSON.stringify(this.writeFeaturesObject(features, options));\n  }\n\n  /**\n   * @abstract\n   * @param {Array<import(\"../Feature.js\").default>} features Features.\n   * @param {import(\"./Feature.js\").WriteOptions} [options] Write options.\n   * @return {Object} Object.\n   */\n  writeFeaturesObject(features, options) {\n    return abstract();\n  }\n\n  /**\n   * Encode a geometry as string.\n   *\n   * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n   * @param {import(\"./Feature.js\").WriteOptions} [options] Write options.\n   * @return {string} Encoded geometry.\n   * @api\n   * @override\n   */\n  writeGeometry(geometry, options) {\n    return JSON.stringify(this.writeGeometryObject(geometry, options));\n  }\n\n  /**\n   * @abstract\n   * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n   * @param {import(\"./Feature.js\").WriteOptions} [options] Write options.\n   * @return {Object} Object.\n   */\n  writeGeometryObject(geometry, options) {\n    return abstract();\n  }\n}\n\n/**\n * @param {Document|Element|Object|string} source Source.\n * @return {Object} Object.\n */\nfunction getObject(source) {\n  if (typeof source === 'string') {\n    const object = JSON.parse(source);\n    return object ? /** @type {Object} */ (object) : null;\n  }\n  if (source !== null) {\n    return source;\n  }\n  return null;\n}\n\nexport default JSONFeature;\n", "/**\n * @module ol/format/GeoJSON\n */\n\nimport {getLayoutForStride} from '../geom/SimpleGeometry.js';\nimport {\n  deflateCoordinatesArray,\n  deflateMultiCoordinatesArray,\n} from '../geom/flat/deflate.js';\nimport {isEmpty} from '../obj.js';\nimport {get as getProjection} from '../proj.js';\nimport RenderFeature from '../render/Feature.js';\nimport {\n  createGeometry,\n  createRenderFeature,\n  transformGeometryWithOptions,\n} from './Feature.js';\nimport JSONFeature from './JSONFeature.js';\n\n/**\n * @typedef {import(\"geojson\").GeoJSON} GeoJSONObject\n * @typedef {import(\"geojson\").Feature} GeoJSONFeature\n * @typedef {import(\"geojson\").FeatureCollection} GeoJSONFeatureCollection\n * @typedef {import(\"geojson\").Geometry} GeoJSONGeometry\n * @typedef {import(\"geojson\").Point} GeoJSONPoint\n * @typedef {import(\"geojson\").LineString} GeoJSONLineString\n * @typedef {import(\"geojson\").Polygon} GeoJSONPolygon\n * @typedef {import(\"geojson\").MultiPoint} GeoJSONMultiPoint\n * @typedef {import(\"geojson\").MultiLineString} GeoJSONMultiLineString\n * @typedef {import(\"geojson\").MultiPolygon} GeoJSONMultiPolygon\n * @typedef {import(\"geojson\").GeometryCollection} GeoJSONGeometryCollection\n */\n\n/**\n * @template {import(\"../Feature.js\").FeatureLike} [FeatureType=import(\"../Feature.js\").default]\n * @typedef {Object} Options\n *\n * @property {import(\"../proj.js\").ProjectionLike} [dataProjection='EPSG:4326'] Default data projection.\n * @property {import(\"../proj.js\").ProjectionLike} [featureProjection] Projection for features read or\n * written by the format.  Options passed to read or write methods will take precedence.\n * @property {string} [geometryName] Geometry name to use when creating features.\n * @property {boolean} [extractGeometryName=false] Certain GeoJSON providers include\n * the geometry_name field in the feature GeoJSON. If set to `true` the GeoJSON reader\n * will look for that field to set the geometry name. If both this field is set to `true`\n * and a `geometryName` is provided, the `geometryName` will take precedence.\n * @property {import('./Feature.js').FeatureToFeatureClass<FeatureType>} [featureClass] Feature class\n * to be used when reading features. The default is {@link module:ol/Feature~Feature}. If performance is\n * the primary concern, and features are not going to be modified or round-tripped through the format,\n * consider using {@link module:ol/render/Feature~RenderFeature}\n */\n\n/**\n * @classdesc\n * Feature format for reading and writing data in the GeoJSON format.\n *\n * @template {import('../Feature.js').FeatureLike} [FeatureType=import(\"../Feature.js\").default]\n * @extends {JSONFeature<FeatureType>}\n * @api\n */\nclass GeoJSON extends JSONFeature {\n  /**\n   * @param {Options<FeatureType>} [options] Options.\n   */\n  constructor(options) {\n    options = options ? options : {};\n\n    super();\n\n    /**\n     * @type {import(\"../proj/Projection.js\").default}\n     */\n    this.dataProjection = getProjection(\n      options.dataProjection ? options.dataProjection : 'EPSG:4326',\n    );\n\n    if (options.featureProjection) {\n      /**\n       * @type {import(\"../proj/Projection.js\").default}\n       */\n      this.defaultFeatureProjection = getProjection(options.featureProjection);\n    }\n\n    if (options.featureClass) {\n      this.featureClass = options.featureClass;\n    }\n\n    /**\n     * Name of the geometry attribute for features.\n     * @type {string|undefined}\n     * @private\n     */\n    this.geometryName_ = options.geometryName;\n\n    /**\n     * Look for the `geometry_name` in the feature GeoJSON\n     * @type {boolean|undefined}\n     * @private\n     */\n    this.extractGeometryName_ = options.extractGeometryName;\n\n    this.supportedMediaTypes = [\n      'application/geo+json',\n      'application/vnd.geo+json',\n    ];\n  }\n\n  /**\n   * @param {Object} object Object.\n   * @param {import(\"./Feature.js\").ReadOptions} [options] Read options.\n   * @protected\n   * @return {FeatureType|Array<FeatureType>} Feature.\n   * @override\n   */\n  readFeatureFromObject(object, options) {\n    /**\n     * @type {GeoJSONFeature}\n     */\n    let geoJSONFeature = null;\n    if (object['type'] === 'Feature') {\n      geoJSONFeature = /** @type {GeoJSONFeature} */ (object);\n    } else {\n      geoJSONFeature = {\n        'type': 'Feature',\n        'geometry': /** @type {GeoJSONGeometry} */ (object),\n        'properties': null,\n      };\n    }\n\n    const geometry = readGeometryInternal(geoJSONFeature['geometry'], options);\n    if (this.featureClass === RenderFeature) {\n      return /** @type {FeatureType|Array<FeatureType>} */ (\n        createRenderFeature(\n          {\n            geometry,\n            id: geoJSONFeature['id'],\n            properties: geoJSONFeature['properties'],\n          },\n          options,\n        )\n      );\n    }\n\n    const FeatureClass = /** @type {typeof import(\"../Feature.js\").default} */ (\n      this.featureClass\n    );\n    const feature = new FeatureClass();\n    if (this.geometryName_) {\n      feature.setGeometryName(this.geometryName_);\n    } else if (this.extractGeometryName_ && geoJSONFeature['geometry_name']) {\n      feature.setGeometryName(geoJSONFeature['geometry_name']);\n    }\n    feature.setGeometry(createGeometry(geometry, options));\n\n    if ('id' in geoJSONFeature) {\n      feature.setId(geoJSONFeature['id']);\n    }\n\n    if (geoJSONFeature['properties']) {\n      feature.setProperties(geoJSONFeature['properties'], true);\n    }\n    return /** @type {FeatureType|Array<FeatureType>} */ (feature);\n  }\n\n  /**\n   * @param {Object} object Object.\n   * @param {import(\"./Feature.js\").ReadOptions} [options] Read options.\n   * @protected\n   * @return {Array<FeatureType>} Features.\n   * @override\n   */\n  readFeaturesFromObject(object, options) {\n    const geoJSONObject = /** @type {GeoJSONObject} */ (object);\n    let features = null;\n    if (geoJSONObject['type'] === 'FeatureCollection') {\n      const geoJSONFeatureCollection = /** @type {GeoJSONFeatureCollection} */ (\n        object\n      );\n      features = [];\n      const geoJSONFeatures = geoJSONFeatureCollection['features'];\n      for (let i = 0, ii = geoJSONFeatures.length; i < ii; ++i) {\n        const featureObject = this.readFeatureFromObject(\n          geoJSONFeatures[i],\n          options,\n        );\n        if (!featureObject) {\n          continue;\n        }\n        features.push(featureObject);\n      }\n    } else {\n      features = [this.readFeatureFromObject(object, options)];\n    }\n    return /** @type {Array<FeatureType>} */ (features.flat());\n  }\n\n  /**\n   * @param {GeoJSONGeometry} object Object.\n   * @param {import(\"./Feature.js\").ReadOptions} [options] Read options.\n   * @protected\n   * @return {import(\"../geom/Geometry.js\").default} Geometry.\n   * @override\n   */\n  readGeometryFromObject(object, options) {\n    return readGeometry(object, options);\n  }\n\n  /**\n   * @param {Object} object Object.\n   * @protected\n   * @return {import(\"../proj/Projection.js\").default} Projection.\n   * @override\n   */\n  readProjectionFromObject(object) {\n    const crs = object['crs'];\n    let projection;\n    if (crs) {\n      if (crs['type'] == 'name') {\n        projection = getProjection(crs['properties']['name']);\n      } else if (crs['type'] === 'EPSG') {\n        projection = getProjection('EPSG:' + crs['properties']['code']);\n      } else {\n        throw new Error('Unknown SRS type');\n      }\n    } else {\n      projection = this.dataProjection;\n    }\n    return /** @type {import(\"../proj/Projection.js\").default} */ (projection);\n  }\n\n  /**\n   * Encode a feature as a GeoJSON Feature object.\n   *\n   * @param {import(\"../Feature.js\").default} feature Feature.\n   * @param {import(\"./Feature.js\").WriteOptions} [options] Write options.\n   * @return {GeoJSONFeature} Object.\n   * @api\n   * @override\n   */\n  writeFeatureObject(feature, options) {\n    options = this.adaptOptions(options);\n\n    /** @type {GeoJSONFeature} */\n    const object = {\n      'type': 'Feature',\n      geometry: null,\n      properties: null,\n    };\n\n    const id = feature.getId();\n    if (id !== undefined) {\n      object.id = id;\n    }\n\n    if (!feature.hasProperties()) {\n      return object;\n    }\n\n    const properties = feature.getProperties();\n    const geometry = feature.getGeometry();\n    if (geometry) {\n      object.geometry = writeGeometry(geometry, options);\n\n      delete properties[feature.getGeometryName()];\n    }\n\n    if (!isEmpty(properties)) {\n      object.properties = properties;\n    }\n\n    return object;\n  }\n\n  /**\n   * Encode an array of features as a GeoJSON object.\n   *\n   * @param {Array<import(\"../Feature.js\").default>} features Features.\n   * @param {import(\"./Feature.js\").WriteOptions} [options] Write options.\n   * @return {GeoJSONFeatureCollection} GeoJSON Object.\n   * @api\n   * @override\n   */\n  writeFeaturesObject(features, options) {\n    options = this.adaptOptions(options);\n    const objects = [];\n    for (let i = 0, ii = features.length; i < ii; ++i) {\n      objects.push(this.writeFeatureObject(features[i], options));\n    }\n    return {\n      type: 'FeatureCollection',\n      features: objects,\n    };\n  }\n\n  /**\n   * Encode a geometry as a GeoJSON object.\n   *\n   * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n   * @param {import(\"./Feature.js\").WriteOptions} [options] Write options.\n   * @return {GeoJSONGeometry|GeoJSONGeometryCollection} Object.\n   * @api\n   * @override\n   */\n  writeGeometryObject(geometry, options) {\n    return writeGeometry(geometry, this.adaptOptions(options));\n  }\n}\n\n/**\n * @param {GeoJSONGeometry|GeoJSONGeometryCollection} object Object.\n * @param {import(\"./Feature.js\").ReadOptions} [options] Read options.\n * @return {import(\"./Feature.js\").GeometryObject} Geometry.\n */\nfunction readGeometryInternal(object, options) {\n  if (!object) {\n    return null;\n  }\n\n  /** @type {import(\"./Feature.js\").GeometryObject} */\n  let geometry;\n  switch (object['type']) {\n    case 'Point': {\n      geometry = readPointGeometry(/** @type {GeoJSONPoint} */ (object));\n      break;\n    }\n    case 'LineString': {\n      geometry = readLineStringGeometry(\n        /** @type {GeoJSONLineString} */ (object),\n      );\n      break;\n    }\n    case 'Polygon': {\n      geometry = readPolygonGeometry(/** @type {GeoJSONPolygon} */ (object));\n      break;\n    }\n    case 'MultiPoint': {\n      geometry = readMultiPointGeometry(\n        /** @type {GeoJSONMultiPoint} */ (object),\n      );\n      break;\n    }\n    case 'MultiLineString': {\n      geometry = readMultiLineStringGeometry(\n        /** @type {GeoJSONMultiLineString} */ (object),\n      );\n      break;\n    }\n    case 'MultiPolygon': {\n      geometry = readMultiPolygonGeometry(\n        /** @type {GeoJSONMultiPolygon} */ (object),\n      );\n      break;\n    }\n    case 'GeometryCollection': {\n      geometry = readGeometryCollectionGeometry(\n        /** @type {GeoJSONGeometryCollection} */ (object),\n      );\n      break;\n    }\n    default: {\n      throw new Error('Unsupported GeoJSON type: ' + object['type']);\n    }\n  }\n  return geometry;\n}\n\n/**\n * @param {GeoJSONGeometry|GeoJSONGeometryCollection} object Object.\n * @param {import(\"./Feature.js\").ReadOptions} [options] Read options.\n * @return {import(\"../geom/Geometry.js\").default} Geometry.\n */\nfunction readGeometry(object, options) {\n  const geometryObject = readGeometryInternal(object, options);\n  return createGeometry(geometryObject, options);\n}\n\n/**\n * @param {GeoJSONGeometryCollection} object Object.\n * @param {import(\"./Feature.js\").ReadOptions} [options] Read options.\n * @return {import(\"./Feature.js\").GeometryCollectionObject} Geometry collection.\n */\nfunction readGeometryCollectionGeometry(object, options) {\n  const geometries = object['geometries'].map(\n    /**\n     * @param {GeoJSONGeometry} geometry Geometry.\n     * @return {import(\"./Feature.js\").GeometryObject} geometry Geometry.\n     */\n    function (geometry) {\n      return readGeometryInternal(geometry, options);\n    },\n  );\n  return geometries;\n}\n\n/**\n * @param {GeoJSONPoint} object Input object.\n * @return {import(\"./Feature.js\").GeometryObject} Point geometry.\n */\nfunction readPointGeometry(object) {\n  const flatCoordinates = object['coordinates'];\n  return {\n    type: 'Point',\n    flatCoordinates,\n    layout: getLayoutForStride(flatCoordinates.length),\n  };\n}\n\n/**\n * @param {GeoJSONLineString} object Object.\n * @return {import(\"./Feature.js\").GeometryObject} LineString geometry.\n */\nfunction readLineStringGeometry(object) {\n  const coordinates = object['coordinates'];\n  const flatCoordinates = coordinates.flat();\n  return {\n    type: 'LineString',\n    flatCoordinates,\n    ends: [flatCoordinates.length],\n    layout: getLayoutForStride(coordinates[0]?.length || 2),\n  };\n}\n\n/**\n * @param {GeoJSONMultiLineString} object Object.\n * @return {import(\"./Feature.js\").GeometryObject} MultiLineString geometry.\n */\nfunction readMultiLineStringGeometry(object) {\n  const coordinates = object['coordinates'];\n  const stride = coordinates[0]?.[0]?.length || 2;\n  const flatCoordinates = [];\n  const ends = deflateCoordinatesArray(flatCoordinates, 0, coordinates, stride);\n  return {\n    type: 'MultiLineString',\n    flatCoordinates,\n    ends,\n    layout: getLayoutForStride(stride),\n  };\n}\n\n/**\n * @param {GeoJSONMultiPoint} object Object.\n * @return {import(\"./Feature.js\").GeometryObject} MultiPoint geometry.\n */\nfunction readMultiPointGeometry(object) {\n  const coordinates = object['coordinates'];\n  return {\n    type: 'MultiPoint',\n    flatCoordinates: coordinates.flat(),\n    layout: getLayoutForStride(coordinates[0]?.length || 2),\n  };\n}\n\n/**\n * @param {GeoJSONMultiPolygon} object Object.\n * @return {import(\"./Feature.js\").GeometryObject} MultiPolygon geometry.\n */\nfunction readMultiPolygonGeometry(object) {\n  const coordinates = object['coordinates'];\n  const flatCoordinates = [];\n  const stride = coordinates[0]?.[0]?.[0].length || 2;\n  const endss = deflateMultiCoordinatesArray(\n    flatCoordinates,\n    0,\n    coordinates,\n    stride,\n  );\n  return {\n    type: 'MultiPolygon',\n    flatCoordinates,\n    ends: endss,\n    layout: getLayoutForStride(stride),\n  };\n}\n\n/**\n * @param {GeoJSONPolygon} object Object.\n * @return {import(\"./Feature.js\").GeometryObject} Polygon.\n */\nfunction readPolygonGeometry(object) {\n  const coordinates = object['coordinates'];\n  const flatCoordinates = [];\n  const stride = coordinates[0]?.[0]?.length;\n  const ends = deflateCoordinatesArray(flatCoordinates, 0, coordinates, stride);\n  return {\n    type: 'Polygon',\n    flatCoordinates,\n    ends,\n    layout: getLayoutForStride(stride),\n  };\n}\n\n/**\n * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions} [options] Write options.\n * @return {GeoJSONGeometry} GeoJSON geometry.\n */\nfunction writeGeometry(geometry, options) {\n  geometry = transformGeometryWithOptions(geometry, true, options);\n\n  const type = geometry.getType();\n\n  /** @type {GeoJSONGeometry} */\n  let geoJSON;\n  switch (type) {\n    case 'Point': {\n      geoJSON = writePointGeometry(\n        /** @type {import(\"../geom/Point.js\").default} */ (geometry),\n        options,\n      );\n      break;\n    }\n    case 'LineString': {\n      geoJSON = writeLineStringGeometry(\n        /** @type {import(\"../geom/LineString.js\").default} */ (geometry),\n        options,\n      );\n      break;\n    }\n    case 'Polygon': {\n      geoJSON = writePolygonGeometry(\n        /** @type {import(\"../geom/Polygon.js\").default} */ (geometry),\n        options,\n      );\n      break;\n    }\n    case 'MultiPoint': {\n      geoJSON = writeMultiPointGeometry(\n        /** @type {import(\"../geom/MultiPoint.js\").default} */ (geometry),\n        options,\n      );\n      break;\n    }\n    case 'MultiLineString': {\n      geoJSON = writeMultiLineStringGeometry(\n        /** @type {import(\"../geom/MultiLineString.js\").default} */ (geometry),\n        options,\n      );\n      break;\n    }\n    case 'MultiPolygon': {\n      geoJSON = writeMultiPolygonGeometry(\n        /** @type {import(\"../geom/MultiPolygon.js\").default} */ (geometry),\n        options,\n      );\n      break;\n    }\n    case 'GeometryCollection': {\n      geoJSON = writeGeometryCollectionGeometry(\n        /** @type {import(\"../geom/GeometryCollection.js\").default} */ (\n          geometry\n        ),\n        options,\n      );\n      break;\n    }\n    case 'Circle': {\n      geoJSON = {\n        type: 'GeometryCollection',\n        geometries: [],\n      };\n      break;\n    }\n    default: {\n      throw new Error('Unsupported geometry type: ' + type);\n    }\n  }\n  return geoJSON;\n}\n\n/**\n * @param {import(\"../geom/GeometryCollection.js\").default} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions} [options] Write options.\n * @return {GeoJSONGeometryCollection} GeoJSON geometry collection.\n */\nfunction writeGeometryCollectionGeometry(geometry, options) {\n  options = Object.assign({}, options);\n  delete options.featureProjection;\n  const geometries = geometry.getGeometriesArray().map(function (geometry) {\n    return writeGeometry(geometry, options);\n  });\n  return {\n    type: 'GeometryCollection',\n    geometries: geometries,\n  };\n}\n\n/**\n * @param {import(\"../geom/LineString.js\").default} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions} [options] Write options.\n * @return {GeoJSONGeometry} GeoJSON geometry.\n */\nfunction writeLineStringGeometry(geometry, options) {\n  return {\n    type: 'LineString',\n    coordinates: geometry.getCoordinates(),\n  };\n}\n\n/**\n * @param {import(\"../geom/MultiLineString.js\").default} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions} [options] Write options.\n * @return {GeoJSONGeometry} GeoJSON geometry.\n */\nfunction writeMultiLineStringGeometry(geometry, options) {\n  return {\n    type: 'MultiLineString',\n    coordinates: geometry.getCoordinates(),\n  };\n}\n\n/**\n * @param {import(\"../geom/MultiPoint.js\").default} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions} [options] Write options.\n * @return {GeoJSONGeometry} GeoJSON geometry.\n */\nfunction writeMultiPointGeometry(geometry, options) {\n  return {\n    type: 'MultiPoint',\n    coordinates: geometry.getCoordinates(),\n  };\n}\n\n/**\n * @param {import(\"../geom/MultiPolygon.js\").default} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions} [options] Write options.\n * @return {GeoJSONGeometry} GeoJSON geometry.\n */\nfunction writeMultiPolygonGeometry(geometry, options) {\n  let right;\n  if (options) {\n    right = options.rightHanded;\n  }\n  return {\n    type: 'MultiPolygon',\n    coordinates: geometry.getCoordinates(right),\n  };\n}\n\n/**\n * @param {import(\"../geom/Point.js\").default} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions} [options] Write options.\n * @return {GeoJSONGeometry} GeoJSON geometry.\n */\nfunction writePointGeometry(geometry, options) {\n  return {\n    type: 'Point',\n    coordinates: geometry.getCoordinates(),\n  };\n}\n\n/**\n * @param {import(\"../geom/Polygon.js\").default} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions} [options] Write options.\n * @return {GeoJSONGeometry} GeoJSON geometry.\n */\nfunction writePolygonGeometry(geometry, options) {\n  let right;\n  if (options) {\n    right = options.rightHanded;\n  }\n  return {\n    type: 'Polygon',\n    coordinates: geometry.getCoordinates(right),\n  };\n}\n\nexport default GeoJSON;\n", "import {\n  BBox,\n  Feature,\n  FeatureCollection,\n  Geometry,\n  GeometryCollection,\n  GeometryObject,\n  LineString,\n  MultiLineString,\n  MultiPoint,\n  MultiPolygon,\n  Point,\n  Polygon,\n  Position,\n  GeoJsonProperties,\n  GeoJSON,\n} from \"geojson\";\n\nimport { Id } from \"./lib/geojson.js\";\nexport * from \"./lib/geojson.js\";\n\n/**\n * @module helpers\n */\n\n// TurfJS Combined Types\nexport type Coord = Feature<Point> | Point | Position;\n\n/**\n * Linear measurement units.\n *\n * ⚠️ Warning. Be aware of the implications of using radian or degree units to\n * measure distance. The distance represented by a degree of longitude *varies*\n * depending on latitude.\n *\n * See https://www.thoughtco.com/degree-of-latitude-and-longitude-distance-4070616\n * for an illustration of this behaviour.\n *\n * @typedef\n */\nexport type Units =\n  | \"meters\"\n  | \"metres\"\n  | \"m\"\n  | \"millimeters\"\n  | \"millimetres\"\n  | \"mm\"\n  | \"centimeters\"\n  | \"centimetres\"\n  | \"cm\"\n  | \"kilometers\"\n  | \"kilometres\"\n  | \"km\"\n  | \"miles\"\n  | \"mi\"\n  | \"nauticalmiles\"\n  | \"nmi\"\n  | \"inches\"\n  | \"in\"\n  | \"yards\"\n  | \"yd\"\n  | \"feet\"\n  | \"ft\"\n  | \"radians\"\n  | \"rad\"\n  | \"degrees\"\n  | \"deg\";\n\n/**\n * Area measurement units.\n *\n * @typedef\n */\nexport type AreaUnits =\n  | Exclude<Units, \"radians\" | \"rad\" | \"degrees\" | \"deg\">\n  | \"acres\"\n  | \"ac\"\n  | \"hectares\"\n  | \"ha\";\n\n/**\n * Grid types.\n *\n * @typedef\n */\nexport type Grid = \"point\" | \"square\" | \"hex\" | \"triangle\";\n\n/**\n * Shorthand corner identifiers.\n *\n * @typedef\n */\nexport type Corners = \"sw\" | \"se\" | \"nw\" | \"ne\" | \"center\" | \"centroid\";\n\n/**\n * Geometries made up of lines i.e. lines and polygons.\n *\n * @typedef\n */\nexport type Lines = LineString | MultiLineString | Polygon | MultiPolygon;\n\n/**\n * Convenience type for all possible GeoJSON.\n *\n * @typedef\n */\nexport type AllGeoJSON =\n  Feature | FeatureCollection | Geometry | GeometryCollection;\n\n/**\n * The Earth radius in meters. Used by Turf modules that model the Earth as a sphere. The {@link https://en.wikipedia.org/wiki/Earth_radius#Arithmetic_mean_radius mean radius} was selected because it is {@link https://rosettacode.org/wiki/Haversine_formula#:~:text=This%20value%20is%20recommended recommended } by the Haversine formula (used by turf/distance) to reduce error.\n *\n * @constant\n */\nexport const earthRadius = 6371008.8;\n\n/**\n * Unit of measurement factors based on earthRadius.\n *\n * Keys are the name of the unit, values are the number of that unit in a single radian\n *\n * @constant\n */\nexport const factors: Record<Units, number> = {\n  centimeters: earthRadius * 100,\n  centimetres: earthRadius * 100,\n  cm: earthRadius * 100,\n  degrees: 360 / (2 * Math.PI),\n  deg: 360 / (2 * Math.PI),\n  feet: earthRadius * 3.28084,\n  ft: earthRadius * 3.28084,\n  inches: earthRadius * 39.37,\n  in: earthRadius * 39.37,\n  kilometers: earthRadius / 1000,\n  kilometres: earthRadius / 1000,\n  km: earthRadius / 1000,\n  meters: earthRadius,\n  metres: earthRadius,\n  m: earthRadius,\n  miles: earthRadius / 1609.344,\n  mi: earthRadius / 1609.344,\n  millimeters: earthRadius * 1000,\n  millimetres: earthRadius * 1000,\n  mm: earthRadius * 1000,\n  nauticalmiles: earthRadius / 1852,\n  nmi: earthRadius / 1852,\n  radians: 1,\n  rad: 1,\n  yards: earthRadius * 1.0936,\n  yd: earthRadius * 1.0936,\n};\n\n/**\n\n * Area of measurement factors based on 1 square meter.\n *\n * @constant\n */\nexport const areaFactors: Record<AreaUnits, number> = {\n  acres: 0.000247105,\n  ac: 0.000247105,\n  centimeters: 10000,\n  centimetres: 10000,\n  cm: 10000,\n  feet: 10.763910417,\n  ft: 10.763910417,\n  hectares: 0.0001,\n  ha: 0.0001,\n  inches: 1550.003100006,\n  in: 1550.003100006,\n  kilometers: 0.000001,\n  kilometres: 0.000001,\n  km: 0.000001,\n  meters: 1,\n  metres: 1,\n  m: 1,\n  miles: 3.86e-7,\n  mi: 3.86e-7,\n  nauticalmiles: 2.9155334959812285e-7,\n  nmi: 2.9155334959812285e-7,\n  millimeters: 1000000,\n  millimetres: 1000000,\n  mm: 1000000,\n  yards: 1.195990046,\n  yd: 1.195990046,\n};\n\n/**\n * Wraps a GeoJSON {@link Geometry} in a GeoJSON {@link Feature}.\n *\n * @function\n * @param {GeometryObject} geometry input geometry\n * @param {GeoJsonProperties} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {BBox} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {Id} [options.id] Identifier associated with the Feature\n * @returns {Feature<GeometryObject, GeoJsonProperties>} a GeoJSON Feature\n * @example\n * var geometry = {\n *   \"type\": \"Point\",\n *   \"coordinates\": [110, 50]\n * };\n *\n * var feature = turf.feature(geometry);\n *\n * //=feature\n */\nexport function feature<\n  G extends GeometryObject = Geometry,\n  P extends GeoJsonProperties = GeoJsonProperties,\n>(\n  geom: G | null,\n  properties?: P,\n  options: { bbox?: BBox; id?: Id } = {}\n): Feature<G, P> {\n  const feat: any = { type: \"Feature\" };\n  if (options.id === 0 || options.id) {\n    feat.id = options.id;\n  }\n  if (options.bbox) {\n    feat.bbox = options.bbox;\n  }\n  feat.properties = properties || {};\n  feat.geometry = geom;\n  return feat;\n}\n\n/**\n * Creates a GeoJSON {@link Geometry} from a Geometry string type & coordinates.\n * For GeometryCollection type use `helpers.geometryCollection`\n *\n * @function\n * @param {(\"Point\" | \"LineString\" | \"Polygon\" | \"MultiPoint\" | \"MultiLineString\" | \"MultiPolygon\")} type Geometry Type\n * @param {Array<any>} coordinates Coordinates\n * @param {Object} [options={}] Optional Parameters\n * @returns {Geometry} a GeoJSON Geometry\n * @example\n * var type = \"Point\";\n * var coordinates = [110, 50];\n * var geometry = turf.geometry(type, coordinates);\n * // => geometry\n */\nexport function geometry<\n  T extends\n    | \"Point\"\n    | \"LineString\"\n    | \"Polygon\"\n    | \"MultiPoint\"\n    | \"MultiLineString\"\n    | \"MultiPolygon\",\n>(\n  type: T,\n  coordinates: any[],\n  _options: Record<string, never> = {}\n): Extract<Geometry, { type: T }> {\n  switch (type) {\n    case \"Point\":\n      return point(coordinates).geometry as Extract<Geometry, { type: T }>;\n    case \"LineString\":\n      return lineString(coordinates).geometry as Extract<Geometry, { type: T }>;\n    case \"Polygon\":\n      return polygon(coordinates).geometry as Extract<Geometry, { type: T }>;\n    case \"MultiPoint\":\n      return multiPoint(coordinates).geometry as Extract<Geometry, { type: T }>;\n    case \"MultiLineString\":\n      return multiLineString(coordinates).geometry as Extract<\n        Geometry,\n        { type: T }\n      >;\n    case \"MultiPolygon\":\n      return multiPolygon(coordinates).geometry as Extract<\n        Geometry,\n        { type: T }\n      >;\n    default:\n      throw new Error(type + \" is invalid\");\n  }\n}\n\n/**\n * Creates a {@link Point} {@link Feature} from a Position.\n *\n * @function\n * @param {Position} coordinates longitude, latitude position (each in decimal degrees)\n * @param {GeoJsonProperties} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {BBox} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {Id} [options.id] Identifier associated with the Feature\n * @returns {Feature<Point, GeoJsonProperties>} a Point feature\n * @example\n * var point = turf.point([-75.343, 39.984]);\n *\n * //=point\n */\nexport function point<P extends GeoJsonProperties = GeoJsonProperties>(\n  coordinates: Position,\n  properties?: P,\n  options: { bbox?: BBox; id?: Id } = {}\n): Feature<Point, P> {\n  if (!coordinates) {\n    throw new Error(\"coordinates is required\");\n  }\n  if (!Array.isArray(coordinates)) {\n    throw new Error(\"coordinates must be an Array\");\n  }\n  if (coordinates.length < 2) {\n    throw new Error(\"coordinates must be at least 2 numbers long\");\n  }\n  if (!isNumber(coordinates[0]) || !isNumber(coordinates[1])) {\n    throw new Error(\"coordinates must contain numbers\");\n  }\n\n  const geom: Point = {\n    type: \"Point\",\n    coordinates,\n  };\n  return feature(geom, properties, options);\n}\n\n/**\n * Creates a {@link Point} {@link FeatureCollection} from an Array of Point coordinates.\n *\n * @function\n * @param {Position[]} coordinates an array of Points\n * @param {GeoJsonProperties} [properties={}] Translate these properties to each Feature\n * @param {Object} [options={}] Optional Parameters\n * @param {BBox} [options.bbox] Bounding Box Array [west, south, east, north]\n * associated with the FeatureCollection\n * @param {Id} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<Point>} Point Feature\n * @example\n * var points = turf.points([\n *   [-75, 39],\n *   [-80, 45],\n *   [-78, 50]\n * ]);\n *\n * //=points\n */\nexport function points<P extends GeoJsonProperties = GeoJsonProperties>(\n  coordinates: Position[],\n  properties?: P,\n  options: { bbox?: BBox; id?: Id } = {}\n): FeatureCollection<Point, P> {\n  return featureCollection(\n    coordinates.map((coords) => {\n      return point(coords, properties);\n    }),\n    options\n  );\n}\n\n/**\n * Creates a {@link Polygon} {@link Feature} from an Array of LinearRings.\n *\n * @function\n * @param {Position[][]} coordinates an array of LinearRings\n * @param {GeoJsonProperties} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {BBox} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {Id} [options.id] Identifier associated with the Feature\n * @returns {Feature<Polygon, GeoJsonProperties>} Polygon Feature\n * @example\n * var polygon = turf.polygon([[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]], { name: 'poly1' });\n *\n * //=polygon\n */\nexport function polygon<P extends GeoJsonProperties = GeoJsonProperties>(\n  coordinates: Position[][],\n  properties?: P,\n  options: { bbox?: BBox; id?: Id } = {}\n): Feature<Polygon, P> {\n  for (const ring of coordinates) {\n    if (ring.length < 4) {\n      throw new Error(\n        \"Each LinearRing of a Polygon must have 4 or more Positions.\"\n      );\n    }\n\n    if (ring[ring.length - 1].length !== ring[0].length) {\n      throw new Error(\"First and last Position are not equivalent.\");\n    }\n\n    for (let j = 0; j < ring[ring.length - 1].length; j++) {\n      // Check if first point of Polygon contains two numbers\n      if (ring[ring.length - 1][j] !== ring[0][j]) {\n        throw new Error(\"First and last Position are not equivalent.\");\n      }\n    }\n  }\n  const geom: Polygon = {\n    type: \"Polygon\",\n    coordinates,\n  };\n  return feature(geom, properties, options);\n}\n\n/**\n * Creates a {@link Polygon} {@link FeatureCollection} from an Array of Polygon coordinates.\n *\n * @function\n * @param {Position[][][]} coordinates an array of Polygon coordinates\n * @param {GeoJsonProperties} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {BBox} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {Id} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<Polygon, GeoJsonProperties>} Polygon FeatureCollection\n * @example\n * var polygons = turf.polygons([\n *   [[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]],\n *   [[[-15, 42], [-14, 46], [-12, 41], [-17, 44], [-15, 42]]],\n * ]);\n *\n * //=polygons\n */\nexport function polygons<P extends GeoJsonProperties = GeoJsonProperties>(\n  coordinates: Position[][][],\n  properties?: P,\n  options: { bbox?: BBox; id?: Id } = {}\n): FeatureCollection<Polygon, P> {\n  return featureCollection(\n    coordinates.map((coords) => {\n      return polygon(coords, properties);\n    }),\n    options\n  );\n}\n\n/**\n * Creates a {@link LineString} {@link Feature} from an Array of Positions.\n *\n * @function\n * @param {Position[]} coordinates an array of Positions\n * @param {GeoJsonProperties} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {BBox} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {Id} [options.id] Identifier associated with the Feature\n * @returns {Feature<LineString, GeoJsonProperties>} LineString Feature\n * @example\n * var linestring1 = turf.lineString([[-24, 63], [-23, 60], [-25, 65], [-20, 69]], {name: 'line 1'});\n * var linestring2 = turf.lineString([[-14, 43], [-13, 40], [-15, 45], [-10, 49]], {name: 'line 2'});\n *\n * //=linestring1\n * //=linestring2\n */\nexport function lineString<P extends GeoJsonProperties = GeoJsonProperties>(\n  coordinates: Position[],\n  properties?: P,\n  options: { bbox?: BBox; id?: Id } = {}\n): Feature<LineString, P> {\n  if (coordinates.length < 2) {\n    throw new Error(\"coordinates must be an array of two or more positions\");\n  }\n  const geom: LineString = {\n    type: \"LineString\",\n    coordinates,\n  };\n  return feature(geom, properties, options);\n}\n\n/**\n * Creates a {@link LineString} {@link FeatureCollection} from an Array of LineString coordinates.\n *\n * @function\n * @param {Position[][]} coordinates an array of LinearRings\n * @param {GeoJsonProperties} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {BBox} [options.bbox] Bounding Box Array [west, south, east, north]\n * associated with the FeatureCollection\n * @param {Id} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<LineString, GeoJsonProperties>} LineString FeatureCollection\n * @example\n * var linestrings = turf.lineStrings([\n *   [[-24, 63], [-23, 60], [-25, 65], [-20, 69]],\n *   [[-14, 43], [-13, 40], [-15, 45], [-10, 49]]\n * ]);\n *\n * //=linestrings\n */\nexport function lineStrings<P extends GeoJsonProperties = GeoJsonProperties>(\n  coordinates: Position[][],\n  properties?: P,\n  options: { bbox?: BBox; id?: Id } = {}\n): FeatureCollection<LineString, P> {\n  return featureCollection(\n    coordinates.map((coords) => {\n      return lineString(coords, properties);\n    }),\n    options\n  );\n}\n\n/**\n * Takes one or more {@link Feature|Features} and creates a {@link FeatureCollection}.\n *\n * @function\n * @param {Array<Feature<GeometryObject, GeoJsonProperties>>} features input features\n * @param {Object} [options={}] Optional Parameters\n * @param {BBox} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {Id} [options.id] Identifier associated with the Feature\n * @returns {FeatureCollection<GeometryObject, GeoJsonProperties>} FeatureCollection of Features\n * @example\n * var locationA = turf.point([-75.343, 39.984], {name: 'Location A'});\n * var locationB = turf.point([-75.833, 39.284], {name: 'Location B'});\n * var locationC = turf.point([-75.534, 39.123], {name: 'Location C'});\n *\n * var collection = turf.featureCollection([\n *   locationA,\n *   locationB,\n *   locationC\n * ]);\n *\n * //=collection\n */\nexport function featureCollection<\n  G extends GeometryObject = Geometry,\n  P extends GeoJsonProperties = GeoJsonProperties,\n>(\n  features: Array<Feature<G, P>>,\n  options: { bbox?: BBox; id?: Id } = {}\n): FeatureCollection<G, P> {\n  const fc: any = { type: \"FeatureCollection\" };\n  if (options.id) {\n    fc.id = options.id;\n  }\n  if (options.bbox) {\n    fc.bbox = options.bbox;\n  }\n  fc.features = features;\n  return fc;\n}\n\n/**\n * Creates a {@link Feature}<{@link MultiLineString}> based on a\n * coordinate array. Properties can be added optionally.\n *\n * @function\n * @param {Position[][]} coordinates an array of LineStrings\n * @param {GeoJsonProperties} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {BBox} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {Id} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiLineString, GeoJsonProperties>} a MultiLineString feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiLine = turf.multiLineString([[[0,0],[10,10]]]);\n *\n * //=multiLine\n */\nexport function multiLineString<\n  P extends GeoJsonProperties = GeoJsonProperties,\n>(\n  coordinates: Position[][],\n  properties?: P,\n  options: { bbox?: BBox; id?: Id } = {}\n): Feature<MultiLineString, P> {\n  const geom: MultiLineString = {\n    type: \"MultiLineString\",\n    coordinates,\n  };\n  return feature(geom, properties, options);\n}\n\n/**\n * Creates a {@link Feature}<{@link MultiPoint}> based on a\n * coordinate array. Properties can be added optionally.\n *\n * @function\n * @param {Position[]} coordinates an array of Positions\n * @param {GeoJsonProperties} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {BBox} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {Id} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiPoint, GeoJsonProperties>} a MultiPoint feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiPt = turf.multiPoint([[0,0],[10,10]]);\n *\n * //=multiPt\n */\nexport function multiPoint<P extends GeoJsonProperties = GeoJsonProperties>(\n  coordinates: Position[],\n  properties?: P,\n  options: { bbox?: BBox; id?: Id } = {}\n): Feature<MultiPoint, P> {\n  const geom: MultiPoint = {\n    type: \"MultiPoint\",\n    coordinates,\n  };\n  return feature(geom, properties, options);\n}\n\n/**\n * Creates a {@link Feature}<{@link MultiPolygon}> based on a\n * coordinate array. Properties can be added optionally.\n *\n * @function\n * @param {Position[][][]} coordinates an array of Polygons\n * @param {GeoJsonProperties} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {BBox} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {Id} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiPolygon, GeoJsonProperties>} a multipolygon feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiPoly = turf.multiPolygon([[[[0,0],[0,10],[10,10],[10,0],[0,0]]]]);\n *\n * //=multiPoly\n *\n */\nexport function multiPolygon<P extends GeoJsonProperties = GeoJsonProperties>(\n  coordinates: Position[][][],\n  properties?: P,\n  options: { bbox?: BBox; id?: Id } = {}\n): Feature<MultiPolygon, P> {\n  const geom: MultiPolygon = {\n    type: \"MultiPolygon\",\n    coordinates,\n  };\n  return feature(geom, properties, options);\n}\n\n/**\n * Creates a Feature<GeometryCollection> based on a\n * coordinate array. Properties can be added optionally.\n *\n * @function\n * @param {Array<Point | LineString | Polygon | MultiPoint | MultiLineString | MultiPolygon>} geometries an array of GeoJSON Geometries\n * @param {GeoJsonProperties} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {BBox} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {Id} [options.id] Identifier associated with the Feature\n * @returns {Feature<GeometryCollection, GeoJsonProperties>} a GeoJSON GeometryCollection Feature\n * @example\n * var pt = turf.geometry(\"Point\", [100, 0]);\n * var line = turf.geometry(\"LineString\", [[101, 0], [102, 1]]);\n * var collection = turf.geometryCollection([pt, line]);\n *\n * // => collection\n */\nexport function geometryCollection<\n  G extends\n    Point | LineString | Polygon | MultiPoint | MultiLineString | MultiPolygon,\n  P extends GeoJsonProperties = GeoJsonProperties,\n>(\n  geometries: Array<G>,\n  properties?: P,\n  options: { bbox?: BBox; id?: Id } = {}\n): Feature<GeometryCollection<G>, P> {\n  const geom: GeometryCollection<G> = {\n    type: \"GeometryCollection\",\n    geometries,\n  };\n  return feature(geom, properties, options);\n}\n\n/**\n * Round number to precision\n *\n * @function\n * @param {number} num Number\n * @param {number} [precision=0] Precision\n * @returns {number} rounded number\n * @example\n * turf.round(120.4321)\n * //=120\n *\n * turf.round(120.4321, 2)\n * //=120.43\n */\nexport function round(num: number, precision = 0): number {\n  if (precision && !(precision >= 0)) {\n    throw new Error(\"precision must be a positive number\");\n  }\n  const multiplier = Math.pow(10, precision || 0);\n  return Math.round(num * multiplier) / multiplier;\n}\n\n/**\n * Convert a distance measurement (assuming a spherical Earth) from radians to a more friendly unit.\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @function\n * @param {number} radians in radians across the sphere\n * @param {Units} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} distance\n */\nexport function radiansToLength(\n  radians: number,\n  units: Units = \"kilometers\"\n): number {\n  const factor = factors[units];\n  if (!factor) {\n    throw new Error(units + \" units is invalid\");\n  }\n  return radians * factor;\n}\n\n/**\n * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into radians\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @function\n * @param {number} distance in real units\n * @param {Units} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} radians\n */\nexport function lengthToRadians(\n  distance: number,\n  units: Units = \"kilometers\"\n): number {\n  const factor = factors[units];\n  if (!factor) {\n    throw new Error(units + \" units is invalid\");\n  }\n  return distance / factor;\n}\n\n/**\n * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into degrees\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, centimeters, kilometres, feet\n *\n * @function\n * @param {number} distance in real units\n * @param {Units} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} degrees\n */\nexport function lengthToDegrees(distance: number, units?: Units): number {\n  return radiansToDegrees(lengthToRadians(distance, units));\n}\n\n/**\n * Converts any bearing angle from the north line direction (positive clockwise)\n * and returns an angle between 0-360 degrees (positive clockwise), 0 being the north line\n *\n * @function\n * @param {number} bearing angle, between -180 and +180 degrees\n * @returns {number} angle between 0 and 360 degrees\n */\nexport function bearingToAzimuth(bearing: number): number {\n  let angle = bearing % 360;\n  if (angle < 0) {\n    angle += 360;\n  }\n  return angle;\n}\n\n/**\n * Converts any azimuth angle from the north line direction (positive clockwise)\n * and returns an angle between -180 and +180 degrees (positive clockwise), 0 being the north line\n *\n * @function\n * @param {number} angle between 0 and 360 degrees\n * @returns {number} bearing between -180 and +180 degrees\n */\nexport function azimuthToBearing(angle: number): number {\n  // Ignore full revolutions (multiples of 360)\n  angle = angle % 360;\n\n  if (angle > 180) {\n    return angle - 360;\n  } else if (angle < -180) {\n    return angle + 360;\n  }\n\n  return angle;\n}\n\n/**\n * Converts an angle in radians to degrees\n *\n * @function\n * @param {number} radians angle in radians\n * @returns {number} degrees between 0 and 360 degrees\n */\nexport function radiansToDegrees(radians: number): number {\n  // % (2 * Math.PI) radians in case someone passes value > 2π\n  const normalisedRadians = radians % (2 * Math.PI);\n  return (normalisedRadians * 180) / Math.PI;\n}\n\n/**\n * Converts an angle in degrees to radians\n *\n * @function\n * @param {number} degrees angle between 0 and 360 degrees\n * @returns {number} angle in radians\n */\nexport function degreesToRadians(degrees: number): number {\n  // % 360 degrees in case someone passes value > 360\n  const normalisedDegrees = degrees % 360;\n  return (normalisedDegrees * Math.PI) / 180;\n}\n\n/**\n * Converts a length from one unit to another.\n *\n * @function\n * @param {number} length Length to be converted\n * @param {Units} [originalUnit=\"kilometers\"] Input length unit\n * @param {Units} [finalUnit=\"kilometers\"] Returned length unit\n * @returns {number} The converted length\n */\nexport function convertLength(\n  length: number,\n  originalUnit: Units = \"kilometers\",\n  finalUnit: Units = \"kilometers\"\n): number {\n  if (!(length >= 0)) {\n    throw new Error(\"length must be a positive number\");\n  }\n  return radiansToLength(lengthToRadians(length, originalUnit), finalUnit);\n}\n\n/**\n * Converts an area from one unit to another.\n *\n * @function\n * @param {number} area Area to be converted\n * @param {AreaUnits} [originalUnit=\"meters\"] Input area unit\n * @param {AreaUnits} [finalUnit=\"kilometers\"] Returned area unit\n * @returns {number} The converted length\n */\nexport function convertArea(\n  area: number,\n  originalUnit: AreaUnits = \"meters\",\n  finalUnit: AreaUnits = \"kilometers\"\n): number {\n  if (!(area >= 0)) {\n    throw new Error(\"area must be a positive number\");\n  }\n\n  const startFactor = areaFactors[originalUnit];\n  if (!startFactor) {\n    throw new Error(\"invalid original units\");\n  }\n\n  const finalFactor = areaFactors[finalUnit];\n  if (!finalFactor) {\n    throw new Error(\"invalid final units\");\n  }\n\n  return (area / startFactor) * finalFactor;\n}\n\n/**\n * isNumber\n *\n * @function\n * @param {any} num Number to validate\n * @returns {boolean} true/false\n * @example\n * turf.isNumber(123)\n * //=true\n * turf.isNumber('foo')\n * //=false\n */\nexport function isNumber(num: any): boolean {\n  return !isNaN(num) && num !== null && !Array.isArray(num);\n}\n\n/**\n * isObject\n *\n * @function\n * @param {any} input variable to validate\n * @returns {boolean} true/false, including false for Arrays and Functions\n * @example\n * turf.isObject({elevation: 10})\n * //=true\n * turf.isObject('foo')\n * //=false\n */\nexport function isObject(input: any): boolean {\n  return input !== null && typeof input === \"object\" && !Array.isArray(input);\n}\n\n/**\n * Recursively removes bounding boxes from a GeoJSON object.\n *\n * This function mutates the input GeoJSON object.\n *\n * @function\n * @param {GeoJSON} geojson GeoJSON object whose bounding boxes should be removed\n * @returns {void}\n */\nexport function removeBbox(geojson: GeoJSON): void {\n  delete geojson.bbox;\n\n  if (geojson.type === \"Feature\") {\n    if (geojson.geometry) removeBbox(geojson.geometry);\n  } else if (geojson.type === \"FeatureCollection\") {\n    geojson.features.forEach(removeBbox);\n  } else if (geojson.type === \"GeometryCollection\") {\n    geojson.geometries.forEach(removeBbox);\n  }\n}\n\n/**\n * Validate BBox\n *\n * @private\n * @param {any} bbox BBox to validate\n * @returns {void}\n * @throws {Error} if BBox is not valid\n * @example\n * validateBBox([-180, -40, 110, 50])\n * //=OK\n * validateBBox([-180, -40])\n * //=Error\n * validateBBox('Foo')\n * //=Error\n * validateBBox(5)\n * //=Error\n * validateBBox(null)\n * //=Error\n * validateBBox(undefined)\n * //=Error\n */\nexport function validateBBox(bbox: any): void {\n  if (!bbox) {\n    throw new Error(\"bbox is required\");\n  }\n  if (!Array.isArray(bbox)) {\n    throw new Error(\"bbox must be an Array\");\n  }\n  if (bbox.length !== 4 && bbox.length !== 6) {\n    throw new Error(\"bbox must be an Array of 4 or 6 numbers\");\n  }\n  bbox.forEach((num) => {\n    if (!isNumber(num)) {\n      throw new Error(\"bbox must only contain numbers\");\n    }\n  });\n}\n\n/**\n * Validate Id\n *\n * @private\n * @param {any} id Id to validate\n * @returns {void}\n * @throws {Error} if Id is not valid\n * @example\n * validateId([-180, -40, 110, 50])\n * //=Error\n * validateId([-180, -40])\n * //=Error\n * validateId('Foo')\n * //=OK\n * validateId(5)\n * //=OK\n * validateId(null)\n * //=Error\n * validateId(undefined)\n * //=Error\n */\nexport function validateId(id: any): void {\n  if (!id) {\n    throw new Error(\"id is required\");\n  }\n  if ([\"string\", \"number\"].indexOf(typeof id) === -1) {\n    throw new Error(\"id must be a number or a string\");\n  }\n}\n", "import { feature, point, lineString, isObject } from \"@turf/helpers\";\nimport {\n  Point,\n  LineString,\n  Polygon,\n  MultiLineString,\n  MultiPolygon,\n  FeatureCollection,\n  Feature,\n  Geometry,\n  GeometryObject,\n  GeometryCollection,\n  GeoJsonProperties,\n  BBox,\n  GeoJsonTypes,\n} from \"geojson\";\nimport { AllGeoJSON, Lines, Id } from \"@turf/helpers\";\n\n/**\n * Callback for coordEach\n *\n * @callback coordEachCallback\n * @param {number[]} currentCoord The current coordinate being processed.\n * @param {number} coordIndex The current index of the coordinate being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n * @param {number} geometryIndex The current index of the Geometry being processed.\n * @returns {void}\n */\n\n/**\n * Iterate over coordinates in any GeoJSON object, similar to Array.forEach()\n *\n * @function\n * @param {AllGeoJSON} geojson any GeoJSON object\n * @param {coordEachCallback} callback a method that takes (currentCoord, coordIndex, featureIndex, multiFeatureIndex)\n * @param {boolean} [excludeWrapCoord=false] whether or not to include the final coordinate of LinearRings that wraps the ring in its iteration.\n * @returns {void}\n * @example\n * var features = turf.featureCollection([\n *   turf.point([26, 37], {\"foo\": \"bar\"}),\n *   turf.point([36, 53], {\"hello\": \"world\"})\n * ]);\n *\n * turf.coordEach(features, function (currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {\n *   //=currentCoord\n *   //=coordIndex\n *   //=featureIndex\n *   //=multiFeatureIndex\n *   //=geometryIndex\n * });\n */\nfunction coordEach(\n  geojson: AllGeoJSON,\n  callback: (\n    currentCoord: number[],\n    coordIndex: number,\n    featureIndex: number,\n    multiFeatureIndex: number,\n    geometryIndex: number\n  ) => void,\n  excludeWrapCoord?: boolean\n): void {\n  // Handles null Geometry -- Skips this GeoJSON\n  if (geojson === null) return;\n  var j,\n    k,\n    l,\n    geometry,\n    stopG,\n    coords,\n    geometryMaybeCollection,\n    wrapShrink = 0,\n    coordIndex = 0,\n    isGeometryCollection,\n    type = geojson.type,\n    isFeatureCollection = type === \"FeatureCollection\",\n    isFeature = type === \"Feature\",\n    // @ts-expect-error: Known type conflict\n    stop = isFeatureCollection ? geojson.features.length : 1;\n\n  // This logic may look a little weird. The reason why it is that way\n  // is because it's trying to be fast. GeoJSON supports multiple kinds\n  // of objects at its root: FeatureCollection, Features, Geometries.\n  // This function has the responsibility of handling all of them, and that\n  // means that some of the `for` loops you see below actually just don't apply\n  // to certain inputs. For instance, if you give this just a\n  // Point geometry, then both loops are short-circuited and all we do\n  // is gradually rename the input until it's called 'geometry'.\n  //\n  // This also aims to allocate as few resources as possible: just a\n  // few numbers and booleans, rather than any temporary arrays as would\n  // be required with the normalization approach.\n  for (var featureIndex = 0; featureIndex < stop; featureIndex++) {\n    geometryMaybeCollection = isFeatureCollection\n      ? // @ts-expect-error: Known type conflict\n        geojson.features[featureIndex].geometry\n      : isFeature\n        ? // @ts-expect-error: Known type conflict\n          geojson.geometry\n        : geojson;\n    isGeometryCollection = geometryMaybeCollection\n      ? geometryMaybeCollection.type === \"GeometryCollection\"\n      : false;\n    stopG = isGeometryCollection\n      ? geometryMaybeCollection.geometries.length\n      : 1;\n\n    for (var geomIndex = 0; geomIndex < stopG; geomIndex++) {\n      var multiFeatureIndex = 0;\n      var geometryIndex = 0;\n      geometry = isGeometryCollection\n        ? geometryMaybeCollection.geometries[geomIndex]\n        : geometryMaybeCollection;\n\n      // Handles null Geometry -- Skips this geometry\n      if (geometry === null) continue;\n      coords = geometry.coordinates;\n      var geomType = geometry.type;\n\n      wrapShrink =\n        excludeWrapCoord &&\n        (geomType === \"Polygon\" || geomType === \"MultiPolygon\")\n          ? 1\n          : 0;\n\n      switch (geomType) {\n        case null:\n          break;\n        case \"Point\":\n          if (\n            // @ts-expect-error: Known type conflict\n            callback(\n              coords,\n              coordIndex,\n              featureIndex,\n              multiFeatureIndex,\n              geometryIndex\n            ) === false\n          )\n            // @ts-expect-error: Known type conflict\n            return false;\n          coordIndex++;\n          multiFeatureIndex++;\n          break;\n        case \"LineString\":\n        case \"MultiPoint\":\n          for (j = 0; j < coords.length; j++) {\n            if (\n              // @ts-expect-error: Known type conflict\n              callback(\n                coords[j],\n                coordIndex,\n                featureIndex,\n                multiFeatureIndex,\n                geometryIndex\n              ) === false\n            )\n              // @ts-expect-error: Known type conflict\n              return false;\n            coordIndex++;\n            if (geomType === \"MultiPoint\") multiFeatureIndex++;\n          }\n          if (geomType === \"LineString\") multiFeatureIndex++;\n          break;\n        case \"Polygon\":\n        case \"MultiLineString\":\n          for (j = 0; j < coords.length; j++) {\n            for (k = 0; k < coords[j].length - wrapShrink; k++) {\n              if (\n                // @ts-expect-error: Known type conflict\n                callback(\n                  coords[j][k],\n                  coordIndex,\n                  featureIndex,\n                  multiFeatureIndex,\n                  geometryIndex\n                ) === false\n              )\n                // @ts-expect-error: Known type conflict\n                return false;\n              coordIndex++;\n            }\n            if (geomType === \"MultiLineString\") multiFeatureIndex++;\n            if (geomType === \"Polygon\") geometryIndex++;\n          }\n          if (geomType === \"Polygon\") multiFeatureIndex++;\n          break;\n        case \"MultiPolygon\":\n          for (j = 0; j < coords.length; j++) {\n            geometryIndex = 0;\n            for (k = 0; k < coords[j].length; k++) {\n              for (l = 0; l < coords[j][k].length - wrapShrink; l++) {\n                if (\n                  // @ts-expect-error: Known type conflict\n                  callback(\n                    coords[j][k][l],\n                    coordIndex,\n                    featureIndex,\n                    multiFeatureIndex,\n                    geometryIndex\n                  ) === false\n                )\n                  // @ts-expect-error: Known type conflict\n                  return false;\n                coordIndex++;\n              }\n              geometryIndex++;\n            }\n            multiFeatureIndex++;\n          }\n          break;\n        case \"GeometryCollection\":\n          for (j = 0; j < geometry.geometries.length; j++)\n            if (\n              // @ts-expect-error: Known type conflict\n              coordEach(geometry.geometries[j], callback, excludeWrapCoord) ===\n              false\n            )\n              // @ts-expect-error: Known type conflict\n              return false;\n          break;\n        default:\n          throw new Error(\"Unknown Geometry Type\");\n      }\n    }\n  }\n}\n\n/**\n * Callback for coordReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n *  - The previousValue argument is initialValue.\n *  - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n *  - The previousValue argument is the value of the first element present in the array.\n *  - The currentValue argument is the value of the second element present in the array.\n *\n * @callback coordReduceCallback\n * @param {Reducer} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {number[]} currentCoord The current coordinate being processed.\n * @param {number} coordIndex The current index of the coordinate being processed.\n * Starts at index 0, if an initialValue is provided, and at index 1 otherwise.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n * @param {number} geometryIndex The current index of the Geometry being processed.\n * @returns {Reducer}\n */\n\n/**\n * Reduce coordinates in any GeoJSON object, similar to Array.reduce()\n *\n * @function\n * @param {AllGeoJSON} geojson any GeoJSON object\n * @param {coordReduceCallback} callback a method that takes (previousValue, currentCoord, coordIndex)\n * @param {Reducer} [initialValue] Value to use as the first argument to the first call of the callback.\n * @param {boolean} [excludeWrapCoord=false] whether or not to include the final coordinate of LinearRings that wraps the ring in its iteration.\n * @returns {Reducer} The value that results from the reduction.\n * @example\n * var features = turf.featureCollection([\n *   turf.point([26, 37], {\"foo\": \"bar\"}),\n *   turf.point([36, 53], {\"hello\": \"world\"})\n * ]);\n *\n * turf.coordReduce(features, function (previousValue, currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {\n *   //=previousValue\n *   //=currentCoord\n *   //=coordIndex\n *   //=featureIndex\n *   //=multiFeatureIndex\n *   //=geometryIndex\n *   return currentCoord;\n * });\n */\nfunction coordReduce<Reducer>(\n  geojson: AllGeoJSON,\n  callback: (\n    previousValue: Reducer,\n    currentCoord: number[],\n    coordIndex: number,\n    featureIndex: number,\n    multiFeatureIndex: number,\n    geometryIndex: number\n  ) => Reducer,\n  initialValue?: Reducer,\n  excludeWrapCoord?: boolean\n): Reducer {\n  var previousValue = initialValue;\n  coordEach(\n    geojson,\n    function (\n      currentCoord,\n      coordIndex,\n      featureIndex,\n      multiFeatureIndex,\n      geometryIndex\n    ) {\n      if (coordIndex === 0 && initialValue === undefined)\n        // @ts-expect-error: Known type conflict\n        previousValue = currentCoord;\n      else\n        previousValue = callback(\n          // @ts-expect-error: Known type conflict\n          previousValue,\n          currentCoord,\n          coordIndex,\n          featureIndex,\n          multiFeatureIndex,\n          geometryIndex\n        );\n    },\n    excludeWrapCoord\n  );\n  // @ts-expect-error: Known type conflict\n  return previousValue;\n}\n\n/**\n * Callback for propEach\n *\n * @callback propEachCallback\n * @param {GeoJsonProperties} currentProperties The current Properties being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @returns {void}\n */\n\n/**\n * Iterate over properties in any GeoJSON object, similar to Array.forEach()\n *\n * @function\n * @param {FeatureCollection|Feature} geojson any GeoJSON object\n * @param {propEachCallback} callback a method that takes (currentProperties, featureIndex)\n * @returns {void}\n * @example\n * var features = turf.featureCollection([\n *     turf.point([26, 37], {foo: 'bar'}),\n *     turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * turf.propEach(features, function (currentProperties, featureIndex) {\n *   //=currentProperties\n *   //=featureIndex\n * });\n */\nfunction propEach<Props extends GeoJsonProperties>(\n  geojson: Feature<any> | FeatureCollection<any> | Feature<GeometryCollection>,\n  callback: (currentProperties: Props, featureIndex: number) => void\n): void {\n  var i;\n  switch (geojson.type) {\n    case \"FeatureCollection\":\n      for (i = 0; i < geojson.features.length; i++) {\n        // @ts-expect-error: Known type conflict\n        if (callback(geojson.features[i].properties, i) === false) break;\n      }\n      break;\n    case \"Feature\":\n      // @ts-expect-error: Known type conflict\n      callback(geojson.properties, 0);\n      break;\n  }\n}\n\n/**\n * Callback for propReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n *  - The previousValue argument is initialValue.\n *  - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n *  - The previousValue argument is the value of the first element present in the array.\n *  - The currentValue argument is the value of the second element present in the array.\n *\n * @callback propReduceCallback\n * @param {Reducer} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {GeoJsonProperties} currentProperties The current Properties being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @returns {Reducer}\n */\n\n/**\n * Reduce properties in any GeoJSON object into a single value,\n * similar to how Array.reduce works. However, in this case we lazily run\n * the reduction, so an array of all properties is unnecessary.\n *\n * @function\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {propReduceCallback} callback a method that takes (previousValue, currentProperties, featureIndex)\n * @param {Reducer} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {Reducer} The value that results from the reduction.\n * @example\n * var features = turf.featureCollection([\n *     turf.point([26, 37], {foo: 'bar'}),\n *     turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * turf.propReduce(features, function (previousValue, currentProperties, featureIndex) {\n *   //=previousValue\n *   //=currentProperties\n *   //=featureIndex\n *   return currentProperties\n * });\n */\nfunction propReduce<Reducer, P extends GeoJsonProperties = GeoJsonProperties>(\n  geojson: Feature<any, P> | FeatureCollection<any, P> | Geometry,\n  callback: (\n    previousValue: Reducer,\n    currentProperties: P,\n    featureIndex: number\n  ) => Reducer,\n  initialValue?: Reducer\n): Reducer {\n  var previousValue = initialValue;\n  // @ts-expect-error: Known type conflict\n  propEach(geojson, function (currentProperties, featureIndex) {\n    if (featureIndex === 0 && initialValue === undefined)\n      // @ts-expect-error: Known type conflict\n      previousValue = currentProperties;\n    else\n      // @ts-expect-error: Known type conflict\n      previousValue = callback(previousValue, currentProperties, featureIndex);\n  });\n  // @ts-expect-error: Known type conflict\n  return previousValue;\n}\n\n/**\n * Callback for featureEach\n *\n * @callback featureEachCallback\n * @param {Feature<any>} currentFeature The current Feature being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @returns {void}\n */\n\n/**\n * Iterate over features in any GeoJSON object, similar to\n * Array.forEach.\n *\n * @function\n * @param {FeatureCollection|Feature|Feature<GeometryCollection>} geojson any GeoJSON object\n * @param {featureEachCallback} callback a method that takes (currentFeature, featureIndex)\n * @returns {void}\n * @example\n * var features = turf.featureCollection([\n *   turf.point([26, 37], {foo: 'bar'}),\n *   turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * turf.featureEach(features, function (currentFeature, featureIndex) {\n *   //=currentFeature\n *   //=featureIndex\n * });\n */\nfunction featureEach<\n  G extends GeometryObject,\n  P extends GeoJsonProperties = GeoJsonProperties,\n>(\n  geojson:\n    Feature<G, P> | FeatureCollection<G, P> | Feature<GeometryCollection, P>,\n  callback: (currentFeature: Feature<G, P>, featureIndex: number) => void\n): void {\n  if (geojson.type === \"Feature\") {\n    // @ts-expect-error: Known type conflict\n    callback(geojson, 0);\n  } else if (geojson.type === \"FeatureCollection\") {\n    for (var i = 0; i < geojson.features.length; i++) {\n      // @ts-expect-error: Known type conflict\n      if (callback(geojson.features[i], i) === false) break;\n    }\n  }\n}\n\n/**\n * Callback for featureReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n *  - The previousValue argument is initialValue.\n *  - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n *  - The previousValue argument is the value of the first element present in the array.\n *  - The currentValue argument is the value of the second element present in the array.\n *\n * @callback featureReduceCallback\n * @param {Reducer} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Feature} currentFeature The current Feature being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @returns {Reducer}\n */\n\n/**\n * Reduce features in any GeoJSON object, similar to Array.reduce().\n *\n * @function\n * @param {FeatureCollection|Feature|Feature<GeometryCollection>} geojson any GeoJSON object\n * @param {featureReduceCallback} callback a method that takes (previousValue, currentFeature, featureIndex)\n * @param {Reducer} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {Reducer} The value that results from the reduction.\n * @example\n * var features = turf.featureCollection([\n *   turf.point([26, 37], {\"foo\": \"bar\"}),\n *   turf.point([36, 53], {\"hello\": \"world\"})\n * ]);\n *\n * turf.featureReduce(features, function (previousValue, currentFeature, featureIndex) {\n *   //=previousValue\n *   //=currentFeature\n *   //=featureIndex\n *   return currentFeature\n * });\n */\nfunction featureReduce<\n  Reducer,\n  G extends GeometryObject,\n  P extends GeoJsonProperties = GeoJsonProperties,\n>(\n  geojson:\n    Feature<G, P> | FeatureCollection<G, P> | Feature<GeometryCollection, P>,\n  callback: (\n    previousValue: Reducer,\n    currentFeature: Feature<G, P>,\n    featureIndex: number\n  ) => Reducer,\n  initialValue?: Reducer\n): Reducer {\n  var previousValue = initialValue;\n  featureEach(geojson, function (currentFeature, featureIndex) {\n    if (featureIndex === 0 && initialValue === undefined)\n      // @ts-expect-error: Known type conflict\n      previousValue = currentFeature;\n    // @ts-expect-error: Known type conflict\n    else previousValue = callback(previousValue, currentFeature, featureIndex);\n  });\n  // @ts-expect-error: Known type conflict\n  return previousValue;\n}\n\n/**\n * Get all coordinates from any GeoJSON object.\n *\n * @function\n * @param {AllGeoJSON} geojson any GeoJSON object\n * @returns {Array<Array<number>>} coordinate position array\n * @example\n * var features = turf.featureCollection([\n *   turf.point([26, 37], {foo: 'bar'}),\n *   turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * var coords = turf.coordAll(features);\n * //= [[26, 37], [36, 53]]\n */\nfunction coordAll(geojson: AllGeoJSON): number[][] {\n  // @ts-expect-error: Known type conflict\n  var coords = [];\n  coordEach(geojson, function (coord) {\n    coords.push(coord);\n  });\n  // @ts-expect-error: Known type conflict\n  return coords;\n}\n\n/**\n * Callback for geomEach\n *\n * @callback geomEachCallback\n * @param {GeometryObject} currentGeometry The current Geometry being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {GeoJsonProperties} featureProperties The current Feature Properties being processed.\n * @param {BBox} featureBBox The current Feature BBox being processed.\n * @param {Id} featureId The current Feature Id being processed.\n * @returns {void}\n */\n\n/**\n * Iterate over each geometry in any GeoJSON object, similar to Array.forEach()\n *\n * Note: Nested GeometryCollections are not recursively unwrapped.\n *\n * @function\n * @param {FeatureCollection|Feature|Geometry|GeometryObject|Feature<GeometryCollection>} geojson any GeoJSON object\n * @param {geomEachCallback} callback a method that takes (currentGeometry, featureIndex, featureProperties, featureBBox, featureId)\n * @returns {void}\n * @example\n * var features = turf.featureCollection([\n *     turf.point([26, 37], {foo: 'bar'}),\n *     turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * turf.geomEach(features, function (currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {\n *   //=currentGeometry\n *   //=featureIndex\n *   //=featureProperties\n *   //=featureBBox\n *   //=featureId\n * });\n */\nfunction geomEach<\n  G extends GeometryObject | null,\n  P extends GeoJsonProperties = GeoJsonProperties,\n>(\n  geojson:\n    | Feature<G, P>\n    | FeatureCollection<G, P>\n    | G\n    | GeometryCollection\n    | Feature<GeometryCollection, P>,\n  callback: (\n    currentGeometry: G,\n    featureIndex: number,\n    featureProperties: P,\n    featureBBox: BBox,\n    featureId: Id\n  ) => void\n): void {\n  var i,\n    j,\n    g,\n    geometry,\n    stopG,\n    geometryMaybeCollection,\n    isGeometryCollection,\n    featureProperties,\n    featureBBox,\n    featureId,\n    featureIndex = 0,\n    // @ts-expect-error: Known type conflict\n    isFeatureCollection = geojson.type === \"FeatureCollection\",\n    // @ts-expect-error: Known type conflict\n    isFeature = geojson.type === \"Feature\",\n    // @ts-expect-error: Known type conflict\n    stop = isFeatureCollection ? geojson.features.length : 1;\n\n  // This logic may look a little weird. The reason why it is that way\n  // is because it's trying to be fast. GeoJSON supports multiple kinds\n  // of objects at its root: FeatureCollection, Features, Geometries.\n  // This function has the responsibility of handling all of them, and that\n  // means that some of the `for` loops you see below actually just don't apply\n  // to certain inputs. For instance, if you give this just a\n  // Point geometry, then both loops are short-circuited and all we do\n  // is gradually rename the input until it's called 'geometry'.\n  //\n  // This also aims to allocate as few resources as possible: just a\n  // few numbers and booleans, rather than any temporary arrays as would\n  // be required with the normalization approach.\n  for (i = 0; i < stop; i++) {\n    geometryMaybeCollection = isFeatureCollection\n      ? // @ts-expect-error: Known type conflict\n        geojson.features[i].geometry\n      : isFeature\n        ? // @ts-expect-error: Known type conflict\n          geojson.geometry\n        : geojson;\n    featureProperties = isFeatureCollection\n      ? // @ts-expect-error: Known type conflict\n        geojson.features[i].properties\n      : isFeature\n        ? // @ts-expect-error: Known type conflict\n          geojson.properties\n        : {};\n    featureBBox = isFeatureCollection\n      ? // @ts-expect-error: Known type conflict\n        geojson.features[i].bbox\n      : isFeature\n        ? // @ts-expect-error: Known type conflict\n          geojson.bbox\n        : undefined;\n    featureId = isFeatureCollection\n      ? // @ts-expect-error: Known type conflict\n        geojson.features[i].id\n      : isFeature\n        ? // @ts-expect-error: Known type conflict\n          geojson.id\n        : undefined;\n    isGeometryCollection = geometryMaybeCollection\n      ? geometryMaybeCollection.type === \"GeometryCollection\"\n      : false;\n    stopG = isGeometryCollection\n      ? geometryMaybeCollection.geometries.length\n      : 1;\n\n    for (g = 0; g < stopG; g++) {\n      geometry = isGeometryCollection\n        ? geometryMaybeCollection.geometries[g]\n        : geometryMaybeCollection;\n\n      // Handle null Geometry\n      if (geometry === null) {\n        if (\n          // @ts-expect-error: Known type conflict\n          callback(\n            // @ts-expect-error: Known type conflict\n            null,\n            featureIndex,\n            featureProperties,\n            featureBBox,\n            featureId\n          ) === false\n        )\n          // @ts-expect-error: Known type conflict\n          return false;\n        continue;\n      }\n      switch (geometry.type) {\n        case \"Point\":\n        case \"LineString\":\n        case \"MultiPoint\":\n        case \"Polygon\":\n        case \"MultiLineString\":\n        case \"MultiPolygon\": {\n          if (\n            // @ts-expect-error: Known type conflict\n            callback(\n              geometry,\n              featureIndex,\n              featureProperties,\n              featureBBox,\n              featureId\n            ) === false\n          )\n            // @ts-expect-error: Known type conflict\n            return false;\n          break;\n        }\n        case \"GeometryCollection\": {\n          for (j = 0; j < geometry.geometries.length; j++) {\n            if (\n              // @ts-expect-error: Known type conflict\n              callback(\n                geometry.geometries[j],\n                featureIndex,\n                featureProperties,\n                featureBBox,\n                featureId\n              ) === false\n            )\n              // @ts-expect-error: Known type conflict\n              return false;\n          }\n          break;\n        }\n        default:\n          throw new Error(\"Unknown Geometry Type\");\n      }\n    }\n    // Only increase `featureIndex` per each feature\n    featureIndex++;\n  }\n}\n\n/**\n * Callback for geomReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n *  - The previousValue argument is initialValue.\n *  - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n *  - The previousValue argument is the value of the first element present in the array.\n *  - The currentValue argument is the value of the second element present in the array.\n *\n * @callback geomReduceCallback\n * @param {Reducer} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {GeometryObject} currentGeometry The current Geometry being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {GeoJsonProperties} featureProperties The current Feature Properties being processed.\n * @param {BBox} featureBBox The current Feature BBox being processed.\n * @param {Id} featureId The current Feature Id being processed.\n * @returns {Reducer}\n */\n\n/**\n * Reduce geometry in any GeoJSON object, similar to Array.reduce().\n *\n * @function\n * @param {FeatureCollection|Feature|GeometryObject|GeometryCollection|Feature<GeometryCollection>} geojson any GeoJSON object\n * @param {geomReduceCallback} callback a method that takes (previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId)\n * @param {Reducer} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {Reducer} The value that results from the reduction.\n * @example\n * var features = turf.featureCollection([\n *     turf.point([26, 37], {foo: 'bar'}),\n *     turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * turf.geomReduce(features, function (previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {\n *   //=previousValue\n *   //=currentGeometry\n *   //=featureIndex\n *   //=featureProperties\n *   //=featureBBox\n *   //=featureId\n *   return currentGeometry\n * });\n */\nfunction geomReduce<\n  Reducer,\n  G extends GeometryObject,\n  P extends GeoJsonProperties = GeoJsonProperties,\n>(\n  geojson:\n    | Feature<G, P>\n    | FeatureCollection<G, P>\n    | G\n    | GeometryCollection\n    | Feature<GeometryCollection, P>,\n  callback: (\n    previousValue: Reducer,\n    currentGeometry: G,\n    featureIndex: number,\n    featureProperties: P,\n    featureBBox: BBox,\n    featureId: Id\n  ) => Reducer,\n  initialValue?: Reducer\n): Reducer {\n  var previousValue = initialValue;\n  geomEach(\n    geojson,\n    function (\n      currentGeometry,\n      featureIndex,\n      featureProperties,\n      featureBBox,\n      featureId\n    ) {\n      if (featureIndex === 0 && initialValue === undefined)\n        // @ts-expect-error: Known type conflict\n        previousValue = currentGeometry;\n      else\n        previousValue = callback(\n          // @ts-expect-error: Known type conflict\n          previousValue,\n          currentGeometry,\n          featureIndex,\n          featureProperties,\n          featureBBox,\n          featureId\n        );\n    }\n  );\n  // @ts-expect-error: Known type conflict\n  return previousValue;\n}\n\n/**\n * Callback for flattenEach\n *\n * @callback flattenEachCallback\n * @param {Feature} currentFeature The current flattened feature being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n * @returns {void}\n */\n\n/**\n * Iterate over flattened features in any GeoJSON object, similar to\n * Array.forEach.\n *\n * @function\n * @param {FeatureCollection|Feature|GeometryObject|GeometryCollection|Feature<GeometryCollection>} geojson any GeoJSON object\n * @param {flattenEachCallback} callback a method that takes (currentFeature, featureIndex, multiFeatureIndex)\n * @returns {void}\n * @example\n * var features = turf.featureCollection([\n *     turf.point([26, 37], {foo: 'bar'}),\n *     turf.multiPoint([[40, 30], [36, 53]], {hello: 'world'})\n * ]);\n *\n * turf.flattenEach(features, function (currentFeature, featureIndex, multiFeatureIndex) {\n *   //=currentFeature\n *   //=featureIndex\n *   //=multiFeatureIndex\n * });\n */\nfunction flattenEach<\n  G extends GeometryObject = GeometryObject,\n  P extends GeoJsonProperties = GeoJsonProperties,\n>(\n  geojson:\n    | Feature<G, P>\n    | FeatureCollection<G, P>\n    | G\n    | GeometryCollection\n    | Feature<GeometryCollection, P>,\n  callback: (\n    currentFeature: Feature<G, P>,\n    featureIndex: number,\n    multiFeatureIndex: number\n  ) => void\n): void {\n  geomEach(geojson, function (geometry, featureIndex, properties, bbox, id) {\n    // Callback for single geometry\n    var type = geometry === null ? null : geometry.type;\n    switch (type) {\n      case null:\n      case \"Point\":\n      case \"LineString\":\n      case \"Polygon\":\n        if (\n          // @ts-expect-error: Known type conflict\n          callback(\n            feature(geometry, properties, { bbox: bbox, id: id }),\n            featureIndex,\n            0\n          ) === false\n        )\n          return false;\n        return;\n    }\n\n    var geomType;\n\n    // Callback for multi-geometry\n    switch (type) {\n      case \"MultiPoint\":\n        geomType = \"Point\";\n        break;\n      case \"MultiLineString\":\n        geomType = \"LineString\";\n        break;\n      case \"MultiPolygon\":\n        geomType = \"Polygon\";\n        break;\n    }\n\n    for (\n      var multiFeatureIndex = 0;\n      // @ts-expect-error: Known type conflict\n      multiFeatureIndex < geometry.coordinates.length;\n      multiFeatureIndex++\n    ) {\n      // @ts-expect-error: Known type conflict\n      var coordinate = geometry.coordinates[multiFeatureIndex];\n      var geom = {\n        type: geomType,\n        coordinates: coordinate,\n      };\n      if (\n        // @ts-expect-error: Known type conflict\n        callback(feature(geom, properties), featureIndex, multiFeatureIndex) ===\n        false\n      )\n        return false;\n    }\n  });\n}\n\n/**\n * Callback for flattenReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n *  - The previousValue argument is initialValue.\n *  - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n *  - The previousValue argument is the value of the first element present in the array.\n *  - The currentValue argument is the value of the second element present in the array.\n *\n * @callback flattenReduceCallback\n * @param {Reducer} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Feature} currentFeature The current Feature being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n * @returns {Reducer}\n */\n\n/**\n * Reduce flattened features in any GeoJSON object, similar to Array.reduce().\n *\n * @function\n * @param {FeatureCollection|Feature|GeometryObject|GeometryCollection|Feature<GeometryCollection>} geojson any GeoJSON object\n * @param {flattenReduceCallback} callback a method that takes (previousValue, currentFeature, featureIndex, multiFeatureIndex)\n * @param {Reducer} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {Reducer} The value that results from the reduction.\n * @example\n * var features = turf.featureCollection([\n *     turf.point([26, 37], {foo: 'bar'}),\n *     turf.multiPoint([[40, 30], [36, 53]], {hello: 'world'})\n * ]);\n *\n * turf.flattenReduce(features, function (previousValue, currentFeature, featureIndex, multiFeatureIndex) {\n *   //=previousValue\n *   //=currentFeature\n *   //=featureIndex\n *   //=multiFeatureIndex\n *   return currentFeature\n * });\n */\nfunction flattenReduce<\n  Reducer,\n  G extends GeometryObject,\n  P extends GeoJsonProperties = GeoJsonProperties,\n>(\n  geojson:\n    | Feature<G, P>\n    | FeatureCollection<G, P>\n    | G\n    | GeometryCollection\n    | Feature<GeometryCollection, P>,\n  callback: (\n    previousValue: Reducer,\n    currentFeature: Feature<G, P>,\n    featureIndex: number,\n    multiFeatureIndex: number\n  ) => Reducer,\n  initialValue?: Reducer\n): Reducer {\n  var previousValue = initialValue;\n  flattenEach(\n    geojson,\n    function (currentFeature, featureIndex, multiFeatureIndex) {\n      if (\n        featureIndex === 0 &&\n        multiFeatureIndex === 0 &&\n        initialValue === undefined\n      )\n        // @ts-expect-error: Known type conflict\n        previousValue = currentFeature;\n      else\n        previousValue = callback(\n          // @ts-expect-error: Known type conflict\n          previousValue,\n          currentFeature,\n          featureIndex,\n          multiFeatureIndex\n        );\n    }\n  );\n  // @ts-expect-error: Known type conflict\n  return previousValue;\n}\n\n/**\n * Callback for segmentEach\n *\n * @callback segmentEachCallback\n * @param {Feature<LineString>} currentSegment The current Segment being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n * @param {number} geometryIndex The current index of the Geometry being processed.\n * @param {number} segmentIndex The current index of the Segment being processed.\n * @returns {void}\n */\n\n/**\n * Iterate over 2-vertex line segment in any GeoJSON object, similar to Array.forEach()\n * (Multi)Point geometries do not contain segments therefore they are ignored during this operation.\n *\n * @param {AllGeoJSON} geojson any GeoJSON\n * @param {segmentEachCallback} callback a method that takes (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex)\n * @returns {void}\n * @example\n * var polygon = turf.polygon([[[-50, 5], [-40, -10], [-50, -10], [-40, 5], [-50, 5]]]);\n *\n * // Iterate over GeoJSON by 2-vertex segments\n * turf.segmentEach(polygon, function (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {\n *   //=currentSegment\n *   //=featureIndex\n *   //=multiFeatureIndex\n *   //=geometryIndex\n *   //=segmentIndex\n * });\n *\n * // Calculate the total number of segments\n * var total = 0;\n * turf.segmentEach(polygon, function () {\n *     total++;\n * });\n */\nfunction segmentEach<P extends GeoJsonProperties = GeoJsonProperties>(\n  geojson: AllGeoJSON,\n  callback: (\n    currentSegment?: Feature<LineString, P>,\n    featureIndex?: number,\n    multiFeatureIndex?: number,\n    segmentIndex?: number,\n    geometryIndex?: number\n  ) => void\n): void {\n  flattenEach(geojson, function (feature, featureIndex, multiFeatureIndex) {\n    var segmentIndex = 0;\n\n    // Exclude null Geometries\n    if (!feature.geometry) return;\n    // (Multi)Point geometries do not contain segments therefore they are ignored during this operation.\n    var type = feature.geometry.type;\n    if (type === \"Point\" || type === \"MultiPoint\") return;\n\n    // Generate 2-vertex line segments\n    // @ts-expect-error: Known type conflict\n    var previousCoords;\n    var previousFeatureIndex = 0;\n    var previousMultiIndex = 0;\n    var prevGeomIndex = 0;\n    if (\n      // @ts-expect-error: Known type conflict\n      coordEach(\n        feature,\n        function (\n          currentCoord,\n          coordIndex,\n          featureIndexCoord,\n          multiPartIndexCoord,\n          geometryIndex\n        ) {\n          // Simulating a meta.coordReduce() since `reduce` operations cannot be stopped by returning `false`\n          if (\n            // @ts-expect-error: Known type conflict\n            previousCoords === undefined ||\n            featureIndex > previousFeatureIndex ||\n            multiPartIndexCoord > previousMultiIndex ||\n            geometryIndex > prevGeomIndex\n          ) {\n            previousCoords = currentCoord;\n            previousFeatureIndex = featureIndex;\n            previousMultiIndex = multiPartIndexCoord;\n            prevGeomIndex = geometryIndex;\n            segmentIndex = 0;\n            return;\n          }\n          var currentSegment = lineString(\n            // @ts-expect-error: Known type conflict\n            [previousCoords, currentCoord],\n            feature.properties\n          );\n          if (\n            // @ts-expect-error: Known type conflict\n            callback(\n              // @ts-expect-error: Known type conflict\n              currentSegment,\n              featureIndex,\n              multiFeatureIndex,\n              geometryIndex,\n              segmentIndex\n            ) === false\n          )\n            return false;\n          segmentIndex++;\n          previousCoords = currentCoord;\n        }\n      ) === false\n    )\n      return false;\n  });\n}\n\n/**\n * Callback for segmentReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n *  - The previousValue argument is initialValue.\n *  - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n *  - The previousValue argument is the value of the first element present in the array.\n *  - The currentValue argument is the value of the second element present in the array.\n *\n * @callback segmentReduceCallback\n * @param {Reducer} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Feature<LineString>} currentSegment The current Segment being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n * @param {number} geometryIndex The current index of the Geometry being processed.\n * @param {number} segmentIndex The current index of the Segment being processed.\n * @returns {Reducer}\n */\n\n/**\n * Reduce 2-vertex line segment in any GeoJSON object, similar to Array.reduce()\n * (Multi)Point geometries do not contain segments therefore they are ignored during this operation.\n *\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON\n * @param {segmentReduceCallback} callback a method that takes (previousValue, currentSegment, currentIndex)\n * @param {Reducer} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {Reducer}\n * @example\n * var polygon = turf.polygon([[[-50, 5], [-40, -10], [-50, -10], [-40, 5], [-50, 5]]]);\n *\n * // Iterate over GeoJSON by 2-vertex segments\n * turf.segmentReduce(polygon, function (previousSegment, currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {\n *   //= previousSegment\n *   //= currentSegment\n *   //= featureIndex\n *   //= multiFeatureIndex\n *   //= geometryIndex\n *   //= segmentIndex\n *   return currentSegment\n * });\n *\n * // Calculate the total number of segments\n * var initialValue = 0\n * var total = turf.segmentReduce(polygon, function (previousValue) {\n *     previousValue++;\n *     return previousValue;\n * }, initialValue);\n */\nfunction segmentReduce<\n  Reducer,\n  P extends GeoJsonProperties = GeoJsonProperties,\n>(\n  geojson:\n    | FeatureCollection<Lines, P>\n    | Feature<Lines, P>\n    | Lines\n    | Feature<GeometryCollection, P>\n    | GeometryCollection,\n  callback: (\n    previousValue?: Reducer,\n    currentSegment?: Feature<LineString, P>,\n    featureIndex?: number,\n    multiFeatureIndex?: number,\n    segmentIndex?: number,\n    geometryIndex?: number\n  ) => Reducer,\n  initialValue?: Reducer\n): Reducer {\n  var previousValue = initialValue;\n  var started = false;\n  segmentEach(\n    geojson,\n    function (\n      currentSegment,\n      featureIndex,\n      multiFeatureIndex,\n      geometryIndex,\n      segmentIndex\n    ) {\n      if (started === false && initialValue === undefined)\n        // @ts-expect-error: Known type conflict\n        previousValue = currentSegment;\n      else\n        previousValue = callback(\n          previousValue,\n          // @ts-expect-error: Known type conflict\n          currentSegment,\n          featureIndex,\n          multiFeatureIndex,\n          geometryIndex,\n          segmentIndex\n        );\n      started = true;\n    }\n  );\n  // @ts-expect-error: Known type conflict\n  return previousValue;\n}\n\n/**\n * Callback for lineEach\n *\n * @callback lineEachCallback\n * @param {Feature<LineString>} currentLine The current LineString|LinearRing being processed\n * @param {number} featureIndex The current index of the Feature being processed\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed\n * @param {number} geometryIndex The current index of the Geometry being processed\n * @returns {void}\n */\n\n/**\n * Iterate over line or ring coordinates in LineString, Polygon, MultiLineString, MultiPolygon Features or Geometries,\n * similar to Array.forEach.\n *\n * @function\n * @param {FeatureCollection<Lines>|Feature<Lines>|Lines|Feature<GeometryCollection>|GeometryCollection} geojson object\n * @param {lineEachCallback} callback a method that takes (currentLine, featureIndex, multiFeatureIndex, geometryIndex)\n * @returns {void}\n * @example\n * var multiLine = turf.multiLineString([\n *   [[26, 37], [35, 45]],\n *   [[36, 53], [38, 50], [41, 55]]\n * ]);\n *\n * turf.lineEach(multiLine, function (currentLine, featureIndex, multiFeatureIndex, geometryIndex) {\n *   //=currentLine\n *   //=featureIndex\n *   //=multiFeatureIndex\n *   //=geometryIndex\n * });\n */\nfunction lineEach<P extends GeoJsonProperties = GeoJsonProperties>(\n  geojson:\n    | FeatureCollection<Lines, P>\n    | Feature<Lines, P>\n    | Lines\n    | Feature<GeometryCollection, P>\n    | GeometryCollection,\n  callback: (\n    currentLine: Feature<LineString, P>,\n    featureIndex?: number,\n    multiFeatureIndex?: number,\n    geometryIndex?: number\n  ) => void\n): void {\n  // validation\n  if (!geojson) throw new Error(\"geojson is required\");\n\n  flattenEach(geojson, function (feature, featureIndex, multiFeatureIndex) {\n    if (feature.geometry === null) return;\n    var type = feature.geometry.type;\n    var coords = feature.geometry.coordinates;\n    switch (type) {\n      case \"LineString\":\n        // @ts-expect-error: Known type conflict\n        if (callback(feature, featureIndex, multiFeatureIndex, 0, 0) === false)\n          return false;\n        break;\n      case \"Polygon\":\n        for (\n          var geometryIndex = 0;\n          geometryIndex < coords.length;\n          geometryIndex++\n        ) {\n          if (\n            // @ts-expect-error: Known type conflict\n            callback(\n              // @ts-expect-error: Known type conflict\n              lineString(coords[geometryIndex], feature.properties),\n              featureIndex,\n              multiFeatureIndex,\n              geometryIndex\n            ) === false\n          )\n            return false;\n        }\n        break;\n    }\n  });\n}\n\n/**\n * Callback for lineReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n *  - The previousValue argument is initialValue.\n *  - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n *  - The previousValue argument is the value of the first element present in the array.\n *  - The currentValue argument is the value of the second element present in the array.\n *\n * @callback lineReduceCallback\n * @param {Reducer} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Feature<LineString>} currentLine The current LineString|LinearRing being processed.\n * @param {number} featureIndex The current index of the Feature being processed\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed\n * @param {number} geometryIndex The current index of the Geometry being processed\n * @returns {Reducer}\n */\n\n/**\n * Reduce features in any GeoJSON object, similar to Array.reduce().\n *\n * @function\n * @param {FeatureCollection<Lines>|Feature<Lines>|Lines|Feature<GeometryCollection>|GeometryCollection} geojson object\n * @param {Function} callback a method that takes (previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex)\n * @param {Reducer} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {Reducer} The value that results from the reduction.\n * @example\n * var multiPoly = turf.multiPolygon([\n *   turf.polygon([[[12,48],[2,41],[24,38],[12,48]], [[9,44],[13,41],[13,45],[9,44]]]),\n *   turf.polygon([[[5, 5], [0, 0], [2, 2], [4, 4], [5, 5]]])\n * ]);\n *\n * turf.lineReduce(multiPoly, function (previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex) {\n *   //=previousValue\n *   //=currentLine\n *   //=featureIndex\n *   //=multiFeatureIndex\n *   //=geometryIndex\n *   return currentLine\n * });\n */\nfunction lineReduce<Reducer, P extends GeoJsonProperties = GeoJsonProperties>(\n  geojson:\n    | FeatureCollection<Lines, P>\n    | Feature<Lines, P>\n    | Lines\n    | Feature<GeometryCollection, P>\n    | GeometryCollection,\n  callback: (\n    previousValue?: Reducer,\n    currentLine?: Feature<LineString, P>,\n    featureIndex?: number,\n    multiFeatureIndex?: number,\n    geometryIndex?: number\n  ) => Reducer,\n  initialValue?: Reducer\n): Reducer {\n  var previousValue = initialValue;\n  lineEach(\n    geojson,\n    function (currentLine, featureIndex, multiFeatureIndex, geometryIndex) {\n      if (featureIndex === 0 && initialValue === undefined)\n        // @ts-expect-error: Known type conflict\n        previousValue = currentLine;\n      else\n        previousValue = callback(\n          previousValue,\n          currentLine,\n          featureIndex,\n          multiFeatureIndex,\n          geometryIndex\n        );\n    }\n  );\n  // @ts-expect-error: Known type conflict\n  return previousValue;\n}\n\n/**\n * Finds a particular 2-vertex LineString Segment from a GeoJSON using `@turf/meta` indexes.\n *\n * Negative indexes are permitted.\n * Point & MultiPoint will always return null.\n *\n * @param {FeatureCollection|Feature|Geometry} geojson Any GeoJSON Feature or Geometry\n * @param {Object} [options={}] Optional parameters\n * @param {number} [options.featureIndex=0] Feature Index\n * @param {number} [options.multiFeatureIndex=0] Multi-Feature Index\n * @param {number} [options.geometryIndex=0] Geometry Index\n * @param {number} [options.segmentIndex=0] Segment Index\n * @param {Object} [options.properties={}] Translate Properties to output LineString\n * @param {BBox} [options.bbox={}] Translate BBox to output LineString\n * @param {number|string} [options.id={}] Translate Id to output LineString\n * @returns {Feature<LineString>} 2-vertex GeoJSON Feature LineString\n * @example\n * var multiLine = turf.multiLineString([\n *     [[10, 10], [50, 30], [30, 40]],\n *     [[-10, -10], [-50, -30], [-30, -40]]\n * ]);\n *\n * // First Segment (defaults are 0)\n * turf.findSegment(multiLine);\n * // => Feature<LineString<[[10, 10], [50, 30]]>>\n *\n * // First Segment of 2nd Multi Feature\n * turf.findSegment(multiLine, {multiFeatureIndex: 1});\n * // => Feature<LineString<[[-10, -10], [-50, -30]]>>\n *\n * // Last Segment of Last Multi Feature\n * turf.findSegment(multiLine, {multiFeatureIndex: -1, segmentIndex: -1});\n * // => Feature<LineString<[[-50, -30], [-30, -40]]>>\n */\nfunction findSegment<\n  G extends LineString | MultiLineString | Polygon | MultiPolygon,\n  P extends GeoJsonProperties = GeoJsonProperties,\n>(\n  geojson: Feature<G, P> | FeatureCollection<G, P> | G,\n  options?: {\n    featureIndex?: number;\n    multiFeatureIndex?: number;\n    geometryIndex?: number;\n    segmentIndex?: number;\n    properties?: P;\n    bbox?: BBox;\n    id?: Id;\n  }\n): Feature<LineString, P> {\n  // Optional Parameters\n  options = options || {};\n  if (!isObject(options)) throw new Error(\"options is invalid\");\n  var featureIndex = options.featureIndex || 0;\n  var multiFeatureIndex = options.multiFeatureIndex || 0;\n  var geometryIndex = options.geometryIndex || 0;\n  var segmentIndex = options.segmentIndex || 0;\n\n  // Find FeatureIndex\n  var properties = options.properties;\n  var geometry;\n\n  switch (geojson.type) {\n    case \"FeatureCollection\":\n      if (featureIndex < 0)\n        featureIndex = geojson.features.length + featureIndex;\n      properties = properties || geojson.features[featureIndex].properties;\n      geometry = geojson.features[featureIndex].geometry;\n      break;\n    case \"Feature\":\n      properties = properties || geojson.properties;\n      geometry = geojson.geometry;\n      break;\n    case \"Point\" as GeoJsonTypes:\n    case \"MultiPoint\" as GeoJsonTypes:\n      // @ts-expect-error: Known type conflict\n      return null;\n    case \"LineString\":\n    case \"Polygon\":\n    case \"MultiLineString\":\n    case \"MultiPolygon\":\n      geometry = geojson;\n      break;\n    default:\n      throw new Error(\"geojson is invalid\");\n  }\n\n  // Find SegmentIndex\n  // @ts-expect-error: Known type conflict\n  if (geometry === null) return null;\n  var coords = geometry.coordinates;\n  switch (geometry.type) {\n    case \"Point\" as GeoJsonTypes:\n    case \"MultiPoint\" as GeoJsonTypes:\n      // @ts-expect-error: Known type conflict\n      return null;\n    case \"LineString\":\n      if (segmentIndex < 0) segmentIndex = coords.length + segmentIndex - 1;\n      return lineString(\n        // @ts-expect-error: Known type conflict\n        [coords[segmentIndex], coords[segmentIndex + 1]],\n        properties,\n        options\n      );\n    case \"Polygon\":\n      if (geometryIndex < 0) geometryIndex = coords.length + geometryIndex;\n      if (segmentIndex < 0)\n        segmentIndex = coords[geometryIndex].length + segmentIndex - 1;\n      return lineString(\n        [\n          // @ts-expect-error: Known type conflict\n          coords[geometryIndex][segmentIndex],\n          // @ts-expect-error: Known type conflict\n          coords[geometryIndex][segmentIndex + 1],\n        ],\n        properties,\n        options\n      );\n    case \"MultiLineString\":\n      if (multiFeatureIndex < 0)\n        multiFeatureIndex = coords.length + multiFeatureIndex;\n      if (segmentIndex < 0)\n        segmentIndex = coords[multiFeatureIndex].length + segmentIndex - 1;\n      return lineString(\n        [\n          // @ts-expect-error: Known type conflict\n          coords[multiFeatureIndex][segmentIndex],\n          // @ts-expect-error: Known type conflict\n          coords[multiFeatureIndex][segmentIndex + 1],\n        ],\n        properties,\n        options\n      );\n    case \"MultiPolygon\":\n      if (multiFeatureIndex < 0)\n        multiFeatureIndex = coords.length + multiFeatureIndex;\n      if (geometryIndex < 0)\n        geometryIndex = coords[multiFeatureIndex].length + geometryIndex;\n      if (segmentIndex < 0)\n        segmentIndex =\n          // @ts-expect-error: Known type conflict\n          coords[multiFeatureIndex][geometryIndex].length - segmentIndex - 1;\n      return lineString(\n        [\n          // @ts-expect-error: Known type conflict\n          coords[multiFeatureIndex][geometryIndex][segmentIndex],\n          // @ts-expect-error: Known type conflict\n          coords[multiFeatureIndex][geometryIndex][segmentIndex + 1],\n        ],\n        properties,\n        options\n      );\n  }\n  throw new Error(\"geojson is invalid\");\n}\n\n/**\n * Finds a particular Point from a GeoJSON using `@turf/meta` indexes.\n *\n * Negative indexes are permitted.\n *\n * @param {FeatureCollection|Feature|Geometry} geojson Any GeoJSON Feature or Geometry\n * @param {Object} [options={}] Optional parameters\n * @param {number} [options.featureIndex=0] Feature Index\n * @param {number} [options.multiFeatureIndex=0] Multi-Feature Index\n * @param {number} [options.geometryIndex=0] Geometry Index\n * @param {number} [options.coordIndex=0] Coord Index\n * @param {Object} [options.properties={}] Translate Properties to output Point\n * @param {BBox} [options.bbox={}] Translate BBox to output Point\n * @param {number|string} [options.id={}] Translate Id to output Point\n * @returns {Feature<Point>} 2-vertex GeoJSON Feature Point\n * @example\n * var multiLine = turf.multiLineString([\n *     [[10, 10], [50, 30], [30, 40]],\n *     [[-10, -10], [-50, -30], [-30, -40]]\n * ]);\n *\n * // First Segment (defaults are 0)\n * turf.findPoint(multiLine);\n * // => Feature<Point<[10, 10]>>\n *\n * // First Segment of the 2nd Multi-Feature\n * turf.findPoint(multiLine, {multiFeatureIndex: 1});\n * // => Feature<Point<[-10, -10]>>\n *\n * // Last Segment of last Multi-Feature\n * turf.findPoint(multiLine, {multiFeatureIndex: -1, coordIndex: -1});\n * // => Feature<Point<[-30, -40]>>\n */\nfunction findPoint<\n  G extends GeometryObject,\n  P extends GeoJsonProperties = GeoJsonProperties,\n>(\n  geojson: Feature<G, P> | FeatureCollection<G, P> | G,\n  options?: {\n    featureIndex?: number;\n    multiFeatureIndex?: number;\n    geometryIndex?: number;\n    coordIndex?: number;\n    properties?: P;\n    bbox?: BBox;\n    id?: Id;\n  }\n): Feature<Point, P> {\n  // Optional Parameters\n  options = options || {};\n  if (!isObject(options)) throw new Error(\"options is invalid\");\n  var featureIndex = options.featureIndex || 0;\n  var multiFeatureIndex = options.multiFeatureIndex || 0;\n  var geometryIndex = options.geometryIndex || 0;\n  var coordIndex = options.coordIndex || 0;\n\n  // Find FeatureIndex\n  var properties = options.properties;\n  var geometry;\n\n  switch (geojson.type) {\n    case \"FeatureCollection\":\n      if (featureIndex < 0)\n        featureIndex = geojson.features.length + featureIndex;\n      properties = properties || geojson.features[featureIndex].properties;\n      geometry = geojson.features[featureIndex].geometry;\n      break;\n    case \"Feature\":\n      properties = properties || geojson.properties;\n      geometry = geojson.geometry;\n      break;\n    case \"Point\":\n    case \"MultiPoint\":\n      // @ts-expect-error: Known type conflict\n      return null;\n    case \"LineString\":\n    case \"Polygon\":\n    case \"MultiLineString\":\n    case \"MultiPolygon\":\n      geometry = geojson;\n      break;\n    default:\n      throw new Error(\"geojson is invalid\");\n  }\n\n  // Find Coord Index\n  // @ts-expect-error: Known type conflict\n  if (geometry === null) return null;\n  // @ts-expect-error: Known type conflict\n  var coords = geometry.coordinates;\n  switch (geometry.type) {\n    case \"Point\":\n      return point(coords, properties, options);\n    case \"MultiPoint\":\n      if (multiFeatureIndex < 0)\n        multiFeatureIndex = coords.length + multiFeatureIndex;\n      return point(coords[multiFeatureIndex], properties, options);\n    case \"LineString\":\n      if (coordIndex < 0) coordIndex = coords.length + coordIndex;\n      return point(coords[coordIndex], properties, options);\n    case \"Polygon\":\n      if (geometryIndex < 0) geometryIndex = coords.length + geometryIndex;\n      if (coordIndex < 0)\n        coordIndex = coords[geometryIndex].length + coordIndex;\n      return point(coords[geometryIndex][coordIndex], properties, options);\n    case \"MultiLineString\":\n      if (multiFeatureIndex < 0)\n        multiFeatureIndex = coords.length + multiFeatureIndex;\n      if (coordIndex < 0)\n        coordIndex = coords[multiFeatureIndex].length + coordIndex;\n      return point(coords[multiFeatureIndex][coordIndex], properties, options);\n    case \"MultiPolygon\":\n      if (multiFeatureIndex < 0)\n        multiFeatureIndex = coords.length + multiFeatureIndex;\n      if (geometryIndex < 0)\n        geometryIndex = coords[multiFeatureIndex].length + geometryIndex;\n      if (coordIndex < 0)\n        coordIndex =\n          coords[multiFeatureIndex][geometryIndex].length - coordIndex;\n      return point(\n        coords[multiFeatureIndex][geometryIndex][coordIndex],\n        properties,\n        options\n      );\n  }\n  throw new Error(\"geojson is invalid\");\n}\n\nexport {\n  coordReduce,\n  coordEach,\n  propEach,\n  propReduce,\n  featureReduce,\n  featureEach,\n  coordAll,\n  geomReduce,\n  geomEach,\n  flattenReduce,\n  flattenEach,\n  segmentReduce,\n  segmentEach,\n  lineReduce,\n  lineEach,\n  findSegment,\n  findPoint,\n};\n", "import { BBox } from \"geojson\";\nimport { AllGeoJSON } from \"@turf/helpers\";\nimport { coordEach } from \"@turf/meta\";\n\n/**\n * Calculates the bounding box for any GeoJSON object, including FeatureCollection.\n * Uses geojson.bbox if available and options.recompute is not set.\n *\n * @function\n * @param {GeoJSON} geojson any GeoJSON object\n * @param {Object} [options={}] Optional parameters\n * @param {boolean} [options.recompute] Whether to ignore an existing bbox property on geojson\n * @returns {BBox} bbox extent in [minX, minY, maxX, maxY] order\n * @example\n * var line = turf.lineString([[-74, 40], [-78, 42], [-82, 35]]);\n * var bbox = turf.bbox(line);\n * var bboxPolygon = turf.bboxPolygon(bbox);\n *\n * //addToMap\n * var addToMap = [line, bboxPolygon]\n */\nfunction bbox(\n  geojson: AllGeoJSON,\n  options: {\n    recompute?: boolean;\n  } = {}\n): BBox {\n  if (geojson.bbox != null && true !== options.recompute) {\n    return geojson.bbox;\n  }\n  const result: BBox = [Infinity, Infinity, -Infinity, -Infinity];\n  coordEach(geojson, (coord) => {\n    if (result[0] > coord[0]) {\n      result[0] = coord[0];\n    }\n    if (result[1] > coord[1]) {\n      result[1] = coord[1];\n    }\n    if (result[2] < coord[0]) {\n      result[2] = coord[0];\n    }\n    if (result[3] < coord[1]) {\n      result[3] = coord[1];\n    }\n  });\n  return result;\n}\n\nexport { bbox };\nexport default bbox;\n", "import { BBox, Feature, GeoJsonProperties, Point } from \"geojson\";\nimport { bbox } from \"@turf/bbox\";\nimport { point, Id, AllGeoJSON } from \"@turf/helpers\";\n\n/**\n * Takes a {@link Feature} or {@link FeatureCollection} and returns the absolute center point of all features.\n *\n * @function\n * @param {GeoJSON} geojson GeoJSON to be centered\n * @param {Object} [options={}] Optional parameters\n * @param {Object} [options.properties={}] Translate GeoJSON Properties to Point\n * @param {Object} [options.bbox={}] Translate GeoJSON BBox to Point\n * @param {Object} [options.id={}] Translate GeoJSON Id to Point\n * @returns {Feature<Point>} a Point feature at the absolute center point of all input features\n * @example\n * var features = turf.points([\n *   [-97.522259, 35.4691],\n *   [-97.502754, 35.463455],\n *   [-97.508269, 35.463245]\n * ]);\n *\n * var center = turf.center(features);\n *\n * //addToMap\n * var addToMap = [features, center]\n * center.properties['marker-size'] = 'large';\n * center.properties['marker-color'] = '#000';\n */\nfunction center<P extends GeoJsonProperties = GeoJsonProperties>(\n  geojson: AllGeoJSON,\n  options: { properties?: P; bbox?: BBox; id?: Id } = {}\n): Feature<Point, P> {\n  const ext = bbox(geojson);\n  const x = (ext[0] + ext[2]) / 2;\n  const y = (ext[1] + ext[3]) / 2;\n  return point([x, y], options.properties, options);\n}\n\nexport { center };\nexport default center;\n", "import { center } from \"@turf/center\";\n// @ts-expect-error We're hopefully dropping @turf/jsts entirely soon, so lets just go without types for now\nimport jsts from \"@turf/jsts\";\nimport { geomEach, featureEach } from \"@turf/meta\";\nimport { geoAzimuthalEquidistant, GeoProjection } from \"d3-geo\";\nimport {\n  feature,\n  featureCollection,\n  radiansToLength,\n  lengthToRadians,\n  earthRadius,\n  Units,\n} from \"@turf/helpers\";\nimport {\n  Feature,\n  FeatureCollection,\n  GeometryCollection,\n  MultiPolygon,\n  Polygon,\n} from \"geojson\";\n\nconst { BufferOp, GeoJSONReader, GeoJSONWriter } = jsts;\n\n/**\n * Calculates a buffer for input features for a given radius.\n *\n * When using a negative radius, the resulting geometry may be invalid if\n * it's too small compared to the radius magnitude. If the input is a\n * FeatureCollection, only valid members will be returned in the output\n * FeatureCollection - i.e., the output collection may have fewer members than\n * the input, or even be empty.\n *\n * @function\n * @param {FeatureCollection|Geometry|Feature<any>} geojson input to be buffered\n * @param {number} radius distance to draw the buffer (negative values are allowed)\n * @param {Object} [options={}] Optional parameters\n * @param {Units} [options.units=\"kilometers\"] Supports all valid Turf {@link https://turfjs.org/docs/api/types/Units Units}.\n * @param {number} [options.steps=8] number of steps\n * @returns {FeatureCollection|Feature<Polygon|MultiPolygon>|undefined} buffered features\n * @example\n * var point = turf.point([-90.548630, 14.616599]);\n * var buffered = turf.buffer(point, 500, {units: 'miles'});\n *\n * //addToMap\n * var addToMap = [point, buffered]\n */\nfunction buffer<T extends GeoJSON.GeoJSON>(\n  geojson: T,\n  radius?: number,\n  options?: { units?: Units; steps?: number }\n): T extends FeatureCollection | GeometryCollection\n  ? FeatureCollection<Polygon | MultiPolygon> | undefined\n  : Feature<Polygon | MultiPolygon> | undefined {\n  // Optional params\n  options = options || {};\n\n  // use user supplied options or default values\n  var units = options.units || \"kilometers\";\n  var steps = options.steps || 8;\n\n  // validation\n  if (!geojson) throw new Error(\"geojson is required\");\n  if (typeof options !== \"object\") throw new Error(\"options must be an object\");\n  if (typeof steps !== \"number\") throw new Error(\"steps must be an number\");\n\n  // Allow negative buffers (\"erosion\") or zero-sized buffers (\"repair geometry\")\n  if (radius === undefined) throw new Error(\"radius is required\");\n  if (steps <= 0) throw new Error(\"steps must be greater than 0\");\n\n  var results: any[] = [];\n  switch (geojson.type) {\n    case \"GeometryCollection\":\n      geomEach(geojson, function (geometry) {\n        var buffered = bufferFeature(geometry, radius, units, steps);\n        if (buffered) results.push(buffered);\n      });\n      return featureCollection(results) as any;\n    case \"FeatureCollection\":\n      featureEach(geojson, function (feature) {\n        var multiBuffered = bufferFeature(feature, radius, units, steps);\n        if (multiBuffered) {\n          featureEach(multiBuffered as Feature, function (buffered) {\n            if (buffered) results.push(buffered);\n          });\n        }\n      });\n      return featureCollection(results) as any;\n  }\n  return bufferFeature(geojson, radius, units, steps) as any;\n}\n\n/**\n * Buffer single Feature/Geometry\n *\n * @private\n * @param {Feature<any>} geojson input to be buffered\n * @param {number} radius distance to draw the buffer\n * @param {Units} [units='kilometers'] Supports all valid Turf {@link https://turfjs.org/docs/api/types/Units Units}.\n * @param {number} [steps=8] number of steps\n * @returns {Feature<Polygon|MultiPolygon>} buffered feature\n */\nfunction bufferFeature(\n  geojson: any,\n  radius: number,\n  units: Units,\n  steps: number\n) {\n  var properties = geojson.properties || {};\n  var geometry = geojson.type === \"Feature\" ? geojson.geometry : geojson;\n\n  // Geometry Types faster than jsts\n  if (geometry.type === \"GeometryCollection\") {\n    var results: any[] = [];\n    geomEach(geojson, function (geometry) {\n      var buffered = bufferFeature(geometry, radius, units, steps);\n      if (buffered) results.push(buffered);\n    });\n    return featureCollection(results);\n  }\n\n  // Project GeoJSON to Azimuthal Equidistant projection (convert to Meters)\n  var projection = defineProjection(geometry);\n  var projected = {\n    type: geometry.type,\n    coordinates: projectCoords(geometry.coordinates, projection),\n  };\n\n  // JSTS buffer operation\n  var reader = new GeoJSONReader();\n  var geom = reader.read(projected);\n  var distance = radiansToLength(lengthToRadians(radius, units), \"meters\");\n  var buffered = BufferOp.bufferOp(geom, distance, steps);\n  var writer = new GeoJSONWriter();\n  buffered = writer.write(buffered);\n\n  // Detect if empty geometries\n  if (coordsIsNaN(buffered.coordinates)) return undefined;\n\n  // Unproject coordinates (convert to Degrees)\n  var result = {\n    type: buffered.type,\n    coordinates: unprojectCoords(buffered.coordinates, projection),\n  };\n\n  return feature(result, properties);\n}\n\n/**\n * Coordinates isNaN\n *\n * @private\n * @param {Array<any>} coords GeoJSON Coordinates\n * @returns {boolean} if NaN exists\n */\nfunction coordsIsNaN(coords: any[]) {\n  if (Array.isArray(coords[0])) return coordsIsNaN(coords[0]);\n  return isNaN(coords[0]);\n}\n\n/**\n * Project coordinates to projection\n *\n * @private\n * @param {Array<any>} coords to project\n * @param {GeoProjection} proj D3 Geo Projection\n * @returns {Array<any>} projected coordinates\n */\nfunction projectCoords(coords: any[], proj: GeoProjection): any[] {\n  if (typeof coords[0] !== \"object\") {\n    return proj(coords as [number, number])!;\n  }\n  return coords.map(function (coord) {\n    return projectCoords(coord, proj);\n  });\n}\n\n/**\n * Un-Project coordinates to projection\n *\n * @private\n * @param {Array<any>} coords to un-project\n * @param {GeoProjection} proj D3 Geo Projection\n * @returns {Array<any>} un-projected coordinates\n */\nfunction unprojectCoords(coords: any[], proj: GeoProjection): any[] {\n  if (typeof coords[0] !== \"object\") {\n    return proj.invert!(coords as [number, number])!;\n  }\n  return coords.map(function (coord) {\n    return unprojectCoords(coord, proj);\n  });\n}\n\n/**\n * Define Azimuthal Equidistant projection\n *\n * @private\n * @param {Geometry|Feature<any>} geojson Base projection on center of GeoJSON\n * @returns {GeoProjection} D3 Geo Azimuthal Equidistant Projection\n */\nfunction defineProjection(geojson: GeoJSON.GeoJSON) {\n  var coords = center(geojson).geometry.coordinates;\n  var rotation: [number, number] = [-coords[0], -coords[1]];\n  return geoAzimuthalEquidistant().rotate(rotation).scale(earthRadius);\n}\n\nexport { buffer };\nexport default buffer;\n", "// https://github.com/python/cpython/blob/a74eea238f5baba15797e2e8b570d153bc8690a7/Modules/mathmodule.c#L1423\nexport class Adder {\n  constructor() {\n    this._partials = new Float64Array(32);\n    this._n = 0;\n  }\n  add(x) {\n    const p = this._partials;\n    let i = 0;\n    for (let j = 0; j < this._n && j < 32; j++) {\n      const y = p[j],\n        hi = x + y,\n        lo = Math.abs(x) < Math.abs(y) ? x - (hi - y) : y - (hi - x);\n      if (lo) p[i++] = lo;\n      x = hi;\n    }\n    p[i] = x;\n    this._n = i + 1;\n    return this;\n  }\n  valueOf() {\n    const p = this._partials;\n    let n = this._n, x, y, lo, hi = 0;\n    if (n > 0) {\n      hi = p[--n];\n      while (n > 0) {\n        x = hi;\n        y = p[--n];\n        hi = x + y;\n        lo = y - (hi - x);\n        if (lo) break;\n      }\n      if (n > 0 && ((lo < 0 && p[n - 1] < 0) || (lo > 0 && p[n - 1] > 0))) {\n        y = lo * 2;\n        x = hi + y;\n        if (y == x - hi) hi = x;\n      }\n    }\n    return hi;\n  }\n}\n\nexport function fsum(values, valueof) {\n  const adder = new Adder();\n  if (valueof === undefined) {\n    for (let value of values) {\n      if (value = +value) {\n        adder.add(value);\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if (value = +valueof(value, ++index, values)) {\n        adder.add(value);\n      }\n    }\n  }\n  return +adder;\n}\n\nexport function fcumsum(values, valueof) {\n  const adder = new Adder();\n  let index = -1;\n  return Float64Array.from(values, valueof === undefined\n      ? v => adder.add(+v || 0)\n      : v => adder.add(+valueof(v, ++index, values) || 0)\n  );\n}\n", "function* flatten(arrays) {\n  for (const array of arrays) {\n    yield* array;\n  }\n}\n\nexport default function merge(arrays) {\n  return Array.from(flatten(arrays));\n}\n", "export var epsilon = 1e-6;\nexport var epsilon2 = 1e-12;\nexport var pi = Math.PI;\nexport var halfPi = pi / 2;\nexport var quarterPi = pi / 4;\nexport var tau = pi * 2;\n\nexport var degrees = 180 / pi;\nexport var radians = pi / 180;\n\nexport var abs = Math.abs;\nexport var atan = Math.atan;\nexport var atan2 = Math.atan2;\nexport var cos = Math.cos;\nexport var ceil = Math.ceil;\nexport var exp = Math.exp;\nexport var floor = Math.floor;\nexport var hypot = Math.hypot;\nexport var log = Math.log;\nexport var pow = Math.pow;\nexport var sin = Math.sin;\nexport var sign = Math.sign || function(x) { return x > 0 ? 1 : x < 0 ? -1 : 0; };\nexport var sqrt = Math.sqrt;\nexport var tan = Math.tan;\n\nexport function acos(x) {\n  return x > 1 ? 0 : x < -1 ? pi : Math.acos(x);\n}\n\nexport function asin(x) {\n  return x > 1 ? halfPi : x < -1 ? -halfPi : Math.asin(x);\n}\n\nexport function haversin(x) {\n  return (x = sin(x / 2)) * x;\n}\n", "export default function noop() {}\n", "function streamGeometry(geometry, stream) {\n  if (geometry && streamGeometryType.hasOwnProperty(geometry.type)) {\n    streamGeometryType[geometry.type](geometry, stream);\n  }\n}\n\nvar streamObjectType = {\n  Feature: function(object, stream) {\n    streamGeometry(object.geometry, stream);\n  },\n  FeatureCollection: function(object, stream) {\n    var features = object.features, i = -1, n = features.length;\n    while (++i < n) streamGeometry(features[i].geometry, stream);\n  }\n};\n\nvar streamGeometryType = {\n  Sphere: function(object, stream) {\n    stream.sphere();\n  },\n  Point: function(object, stream) {\n    object = object.coordinates;\n    stream.point(object[0], object[1], object[2]);\n  },\n  MultiPoint: function(object, stream) {\n    var coordinates = object.coordinates, i = -1, n = coordinates.length;\n    while (++i < n) object = coordinates[i], stream.point(object[0], object[1], object[2]);\n  },\n  LineString: function(object, stream) {\n    streamLine(object.coordinates, stream, 0);\n  },\n  MultiLineString: function(object, stream) {\n    var coordinates = object.coordinates, i = -1, n = coordinates.length;\n    while (++i < n) streamLine(coordinates[i], stream, 0);\n  },\n  Polygon: function(object, stream) {\n    streamPolygon(object.coordinates, stream);\n  },\n  MultiPolygon: function(object, stream) {\n    var coordinates = object.coordinates, i = -1, n = coordinates.length;\n    while (++i < n) streamPolygon(coordinates[i], stream);\n  },\n  GeometryCollection: function(object, stream) {\n    var geometries = object.geometries, i = -1, n = geometries.length;\n    while (++i < n) streamGeometry(geometries[i], stream);\n  }\n};\n\nfunction streamLine(coordinates, stream, closed) {\n  var i = -1, n = coordinates.length - closed, coordinate;\n  stream.lineStart();\n  while (++i < n) coordinate = coordinates[i], stream.point(coordinate[0], coordinate[1], coordinate[2]);\n  stream.lineEnd();\n}\n\nfunction streamPolygon(coordinates, stream) {\n  var i = -1, n = coordinates.length;\n  stream.polygonStart();\n  while (++i < n) streamLine(coordinates[i], stream, 1);\n  stream.polygonEnd();\n}\n\nexport default function(object, stream) {\n  if (object && streamObjectType.hasOwnProperty(object.type)) {\n    streamObjectType[object.type](object, stream);\n  } else {\n    streamGeometry(object, stream);\n  }\n}\n", "import {asin, atan2, cos, sin, sqrt} from \"./math.js\";\n\nexport function spherical(cartesian) {\n  return [atan2(cartesian[1], cartesian[0]), asin(cartesian[2])];\n}\n\nexport function cartesian(spherical) {\n  var lambda = spherical[0], phi = spherical[1], cosPhi = cos(phi);\n  return [cosPhi * cos(lambda), cosPhi * sin(lambda), sin(phi)];\n}\n\nexport function cartesianDot(a, b) {\n  return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];\n}\n\nexport function cartesianCross(a, b) {\n  return [a[1] * b[2] - a[2] * b[1], a[2] * b[0] - a[0] * b[2], a[0] * b[1] - a[1] * b[0]];\n}\n\n// TODO return a\nexport function cartesianAddInPlace(a, b) {\n  a[0] += b[0], a[1] += b[1], a[2] += b[2];\n}\n\nexport function cartesianScale(vector, k) {\n  return [vector[0] * k, vector[1] * k, vector[2] * k];\n}\n\n// TODO return d\nexport function cartesianNormalizeInPlace(d) {\n  var l = sqrt(d[0] * d[0] + d[1] * d[1] + d[2] * d[2]);\n  d[0] /= l, d[1] /= l, d[2] /= l;\n}\n", "export default function(a, b) {\n\n  function compose(x, y) {\n    return x = a(x, y), b(x[0], x[1]);\n  }\n\n  if (a.invert && b.invert) compose.invert = function(x, y) {\n    return x = b.invert(x, y), x && a.invert(x[0], x[1]);\n  };\n\n  return compose;\n}\n", "import compose from \"./compose.js\";\nimport {abs, asin, atan2, cos, degrees, pi, radians, sin, tau} from \"./math.js\";\n\nfunction rotationIdentity(lambda, phi) {\n  return [abs(lambda) > pi ? lambda + Math.round(-lambda / tau) * tau : lambda, phi];\n}\n\nrotationIdentity.invert = rotationIdentity;\n\nexport function rotateRadians(deltaLambda, deltaPhi, deltaGamma) {\n  return (deltaLambda %= tau) ? (deltaPhi || deltaGamma ? compose(rotationLambda(deltaLambda), rotationPhiGamma(deltaPhi, deltaGamma))\n    : rotationLambda(deltaLambda))\n    : (deltaPhi || deltaGamma ? rotationPhiGamma(deltaPhi, deltaGamma)\n    : rotationIdentity);\n}\n\nfunction forwardRotationLambda(deltaLambda) {\n  return function(lambda, phi) {\n    return lambda += deltaLambda, [lambda > pi ? lambda - tau : lambda < -pi ? lambda + tau : lambda, phi];\n  };\n}\n\nfunction rotationLambda(deltaLambda) {\n  var rotation = forwardRotationLambda(deltaLambda);\n  rotation.invert = forwardRotationLambda(-deltaLambda);\n  return rotation;\n}\n\nfunction rotationPhiGamma(deltaPhi, deltaGamma) {\n  var cosDeltaPhi = cos(deltaPhi),\n      sinDeltaPhi = sin(deltaPhi),\n      cosDeltaGamma = cos(deltaGamma),\n      sinDeltaGamma = sin(deltaGamma);\n\n  function rotation(lambda, phi) {\n    var cosPhi = cos(phi),\n        x = cos(lambda) * cosPhi,\n        y = sin(lambda) * cosPhi,\n        z = sin(phi),\n        k = z * cosDeltaPhi + x * sinDeltaPhi;\n    return [\n      atan2(y * cosDeltaGamma - k * sinDeltaGamma, x * cosDeltaPhi - z * sinDeltaPhi),\n      asin(k * cosDeltaGamma + y * sinDeltaGamma)\n    ];\n  }\n\n  rotation.invert = function(lambda, phi) {\n    var cosPhi = cos(phi),\n        x = cos(lambda) * cosPhi,\n        y = sin(lambda) * cosPhi,\n        z = sin(phi),\n        k = z * cosDeltaGamma - y * sinDeltaGamma;\n    return [\n      atan2(y * cosDeltaGamma + z * sinDeltaGamma, x * cosDeltaPhi + k * sinDeltaPhi),\n      asin(k * cosDeltaPhi - x * sinDeltaPhi)\n    ];\n  };\n\n  return rotation;\n}\n\nexport default function(rotate) {\n  rotate = rotateRadians(rotate[0] * radians, rotate[1] * radians, rotate.length > 2 ? rotate[2] * radians : 0);\n\n  function forward(coordinates) {\n    coordinates = rotate(coordinates[0] * radians, coordinates[1] * radians);\n    return coordinates[0] *= degrees, coordinates[1] *= degrees, coordinates;\n  }\n\n  forward.invert = function(coordinates) {\n    coordinates = rotate.invert(coordinates[0] * radians, coordinates[1] * radians);\n    return coordinates[0] *= degrees, coordinates[1] *= degrees, coordinates;\n  };\n\n  return forward;\n}\n", "import {cartesian, cartesianNormalizeInPlace, spherical} from \"./cartesian.js\";\nimport constant from \"./constant.js\";\nimport {acos, cos, degrees, epsilon, radians, sin, tau} from \"./math.js\";\nimport {rotateRadians} from \"./rotation.js\";\n\n// Generates a circle centered at [0\u00B0, 0\u00B0], with a given radius and precision.\nexport function circleStream(stream, radius, delta, direction, t0, t1) {\n  if (!delta) return;\n  var cosRadius = cos(radius),\n      sinRadius = sin(radius),\n      step = direction * delta;\n  if (t0 == null) {\n    t0 = radius + direction * tau;\n    t1 = radius - step / 2;\n  } else {\n    t0 = circleRadius(cosRadius, t0);\n    t1 = circleRadius(cosRadius, t1);\n    if (direction > 0 ? t0 < t1 : t0 > t1) t0 += direction * tau;\n  }\n  for (var point, t = t0; direction > 0 ? t > t1 : t < t1; t -= step) {\n    point = spherical([cosRadius, -sinRadius * cos(t), -sinRadius * sin(t)]);\n    stream.point(point[0], point[1]);\n  }\n}\n\n// Returns the signed angle of a cartesian point relative to [cosRadius, 0, 0].\nfunction circleRadius(cosRadius, point) {\n  point = cartesian(point), point[0] -= cosRadius;\n  cartesianNormalizeInPlace(point);\n  var radius = acos(-point[1]);\n  return ((-point[2] < 0 ? -radius : radius) + tau - epsilon) % tau;\n}\n\nexport default function() {\n  var center = constant([0, 0]),\n      radius = constant(90),\n      precision = constant(6),\n      ring,\n      rotate,\n      stream = {point: point};\n\n  function point(x, y) {\n    ring.push(x = rotate(x, y));\n    x[0] *= degrees, x[1] *= degrees;\n  }\n\n  function circle() {\n    var c = center.apply(this, arguments),\n        r = radius.apply(this, arguments) * radians,\n        p = precision.apply(this, arguments) * radians;\n    ring = [];\n    rotate = rotateRadians(-c[0] * radians, -c[1] * radians, 0).invert;\n    circleStream(stream, r, p, 1);\n    c = {type: \"Polygon\", coordinates: [ring]};\n    ring = rotate = null;\n    return c;\n  }\n\n  circle.center = function(_) {\n    return arguments.length ? (center = typeof _ === \"function\" ? _ : constant([+_[0], +_[1]]), circle) : center;\n  };\n\n  circle.radius = function(_) {\n    return arguments.length ? (radius = typeof _ === \"function\" ? _ : constant(+_), circle) : radius;\n  };\n\n  circle.precision = function(_) {\n    return arguments.length ? (precision = typeof _ === \"function\" ? _ : constant(+_), circle) : precision;\n  };\n\n  return circle;\n}\n", "import noop from \"../noop.js\";\n\nexport default function() {\n  var lines = [],\n      line;\n  return {\n    point: function(x, y, m) {\n      line.push([x, y, m]);\n    },\n    lineStart: function() {\n      lines.push(line = []);\n    },\n    lineEnd: noop,\n    rejoin: function() {\n      if (lines.length > 1) lines.push(lines.pop().concat(lines.shift()));\n    },\n    result: function() {\n      var result = lines;\n      lines = [];\n      line = null;\n      return result;\n    }\n  };\n}\n", "import {abs, epsilon} from \"./math.js\";\n\nexport default function(a, b) {\n  return abs(a[0] - b[0]) < epsilon && abs(a[1] - b[1]) < epsilon;\n}\n", "import pointEqual from \"../pointEqual.js\";\nimport {epsilon} from \"../math.js\";\n\nfunction Intersection(point, points, other, entry) {\n  this.x = point;\n  this.z = points;\n  this.o = other; // another intersection\n  this.e = entry; // is an entry?\n  this.v = false; // visited\n  this.n = this.p = null; // next & previous\n}\n\n// A generalized polygon clipping algorithm: given a polygon that has been cut\n// into its visible line segments, and rejoins the segments by interpolating\n// along the clip edge.\nexport default function(segments, compareIntersection, startInside, interpolate, stream) {\n  var subject = [],\n      clip = [],\n      i,\n      n;\n\n  segments.forEach(function(segment) {\n    if ((n = segment.length - 1) <= 0) return;\n    var n, p0 = segment[0], p1 = segment[n], x;\n\n    if (pointEqual(p0, p1)) {\n      if (!p0[2] && !p1[2]) {\n        stream.lineStart();\n        for (i = 0; i < n; ++i) stream.point((p0 = segment[i])[0], p0[1]);\n        stream.lineEnd();\n        return;\n      }\n      // handle degenerate cases by moving the point\n      p1[0] += 2 * epsilon;\n    }\n\n    subject.push(x = new Intersection(p0, segment, null, true));\n    clip.push(x.o = new Intersection(p0, null, x, false));\n    subject.push(x = new Intersection(p1, segment, null, false));\n    clip.push(x.o = new Intersection(p1, null, x, true));\n  });\n\n  if (!subject.length) return;\n\n  clip.sort(compareIntersection);\n  link(subject);\n  link(clip);\n\n  for (i = 0, n = clip.length; i < n; ++i) {\n    clip[i].e = startInside = !startInside;\n  }\n\n  var start = subject[0],\n      points,\n      point;\n\n  while (1) {\n    // Find first unvisited intersection.\n    var current = start,\n        isSubject = true;\n    while (current.v) if ((current = current.n) === start) return;\n    points = current.z;\n    stream.lineStart();\n    do {\n      current.v = current.o.v = true;\n      if (current.e) {\n        if (isSubject) {\n          for (i = 0, n = points.length; i < n; ++i) stream.point((point = points[i])[0], point[1]);\n        } else {\n          interpolate(current.x, current.n.x, 1, stream);\n        }\n        current = current.n;\n      } else {\n        if (isSubject) {\n          points = current.p.z;\n          for (i = points.length - 1; i >= 0; --i) stream.point((point = points[i])[0], point[1]);\n        } else {\n          interpolate(current.x, current.p.x, -1, stream);\n        }\n        current = current.p;\n      }\n      current = current.o;\n      points = current.z;\n      isSubject = !isSubject;\n    } while (!current.v);\n    stream.lineEnd();\n  }\n}\n\nfunction link(array) {\n  if (!(n = array.length)) return;\n  var n,\n      i = 0,\n      a = array[0],\n      b;\n  while (++i < n) {\n    a.n = b = array[i];\n    b.p = a;\n    a = b;\n  }\n  a.n = b = array[0];\n  b.p = a;\n}\n", "import {Adder} from \"d3-array\";\nimport {cartesian, cartesianCross, cartesianNormalizeInPlace} from \"./cartesian.js\";\nimport {abs, asin, atan2, cos, epsilon, epsilon2, halfPi, pi, quarterPi, sign, sin, tau} from \"./math.js\";\n\nfunction longitude(point) {\n  if (abs(point[0]) <= pi)\n    return point[0];\n  else\n    return sign(point[0]) * ((abs(point[0]) + pi) % tau - pi);\n}\n\nexport default function(polygon, point) {\n  var lambda = longitude(point),\n      phi = point[1],\n      sinPhi = sin(phi),\n      normal = [sin(lambda), -cos(lambda), 0],\n      angle = 0,\n      winding = 0;\n\n  var sum = new Adder();\n\n  if (sinPhi === 1) phi = halfPi + epsilon;\n  else if (sinPhi === -1) phi = -halfPi - epsilon;\n\n  for (var i = 0, n = polygon.length; i < n; ++i) {\n    if (!(m = (ring = polygon[i]).length)) continue;\n    var ring,\n        m,\n        point0 = ring[m - 1],\n        lambda0 = longitude(point0),\n        phi0 = point0[1] / 2 + quarterPi,\n        sinPhi0 = sin(phi0),\n        cosPhi0 = cos(phi0);\n\n    for (var j = 0; j < m; ++j, lambda0 = lambda1, sinPhi0 = sinPhi1, cosPhi0 = cosPhi1, point0 = point1) {\n      var point1 = ring[j],\n          lambda1 = longitude(point1),\n          phi1 = point1[1] / 2 + quarterPi,\n          sinPhi1 = sin(phi1),\n          cosPhi1 = cos(phi1),\n          delta = lambda1 - lambda0,\n          sign = delta >= 0 ? 1 : -1,\n          absDelta = sign * delta,\n          antimeridian = absDelta > pi,\n          k = sinPhi0 * sinPhi1;\n\n      sum.add(atan2(k * sign * sin(absDelta), cosPhi0 * cosPhi1 + k * cos(absDelta)));\n      angle += antimeridian ? delta + sign * tau : delta;\n\n      // Are the longitudes either side of the point\u2019s meridian (lambda),\n      // and are the latitudes smaller than the parallel (phi)?\n      if (antimeridian ^ lambda0 >= lambda ^ lambda1 >= lambda) {\n        var arc = cartesianCross(cartesian(point0), cartesian(point1));\n        cartesianNormalizeInPlace(arc);\n        var intersection = cartesianCross(normal, arc);\n        cartesianNormalizeInPlace(intersection);\n        var phiArc = (antimeridian ^ delta >= 0 ? -1 : 1) * asin(intersection[2]);\n        if (phi > phiArc || phi === phiArc && (arc[0] || arc[1])) {\n          winding += antimeridian ^ delta >= 0 ? 1 : -1;\n        }\n      }\n    }\n  }\n\n  // First, determine whether the South pole is inside or outside:\n  //\n  // It is inside if:\n  // * the polygon winds around it in a clockwise direction.\n  // * the polygon does not (cumulatively) wind around it, but has a negative\n  //   (counter-clockwise) area.\n  //\n  // Second, count the (signed) number of times a segment crosses a lambda\n  // from the point to the South pole.  If it is zero, then the point is the\n  // same side as the South pole.\n\n  return (angle < -epsilon || angle < epsilon && sum < -epsilon2) ^ (winding & 1);\n}\n", "import clipBuffer from \"./buffer.js\";\nimport clipRejoin from \"./rejoin.js\";\nimport {epsilon, halfPi} from \"../math.js\";\nimport polygonContains from \"../polygonContains.js\";\nimport {merge} from \"d3-array\";\n\nexport default function(pointVisible, clipLine, interpolate, start) {\n  return function(sink) {\n    var line = clipLine(sink),\n        ringBuffer = clipBuffer(),\n        ringSink = clipLine(ringBuffer),\n        polygonStarted = false,\n        polygon,\n        segments,\n        ring;\n\n    var clip = {\n      point: point,\n      lineStart: lineStart,\n      lineEnd: lineEnd,\n      polygonStart: function() {\n        clip.point = pointRing;\n        clip.lineStart = ringStart;\n        clip.lineEnd = ringEnd;\n        segments = [];\n        polygon = [];\n      },\n      polygonEnd: function() {\n        clip.point = point;\n        clip.lineStart = lineStart;\n        clip.lineEnd = lineEnd;\n        segments = merge(segments);\n        var startInside = polygonContains(polygon, start);\n        if (segments.length) {\n          if (!polygonStarted) sink.polygonStart(), polygonStarted = true;\n          clipRejoin(segments, compareIntersection, startInside, interpolate, sink);\n        } else if (startInside) {\n          if (!polygonStarted) sink.polygonStart(), polygonStarted = true;\n          sink.lineStart();\n          interpolate(null, null, 1, sink);\n          sink.lineEnd();\n        }\n        if (polygonStarted) sink.polygonEnd(), polygonStarted = false;\n        segments = polygon = null;\n      },\n      sphere: function() {\n        sink.polygonStart();\n        sink.lineStart();\n        interpolate(null, null, 1, sink);\n        sink.lineEnd();\n        sink.polygonEnd();\n      }\n    };\n\n    function point(lambda, phi) {\n      if (pointVisible(lambda, phi)) sink.point(lambda, phi);\n    }\n\n    function pointLine(lambda, phi) {\n      line.point(lambda, phi);\n    }\n\n    function lineStart() {\n      clip.point = pointLine;\n      line.lineStart();\n    }\n\n    function lineEnd() {\n      clip.point = point;\n      line.lineEnd();\n    }\n\n    function pointRing(lambda, phi) {\n      ring.push([lambda, phi]);\n      ringSink.point(lambda, phi);\n    }\n\n    function ringStart() {\n      ringSink.lineStart();\n      ring = [];\n    }\n\n    function ringEnd() {\n      pointRing(ring[0][0], ring[0][1]);\n      ringSink.lineEnd();\n\n      var clean = ringSink.clean(),\n          ringSegments = ringBuffer.result(),\n          i, n = ringSegments.length, m,\n          segment,\n          point;\n\n      ring.pop();\n      polygon.push(ring);\n      ring = null;\n\n      if (!n) return;\n\n      // No intersections.\n      if (clean & 1) {\n        segment = ringSegments[0];\n        if ((m = segment.length - 1) > 0) {\n          if (!polygonStarted) sink.polygonStart(), polygonStarted = true;\n          sink.lineStart();\n          for (i = 0; i < m; ++i) sink.point((point = segment[i])[0], point[1]);\n          sink.lineEnd();\n        }\n        return;\n      }\n\n      // Rejoin connected segments.\n      // TODO reuse ringBuffer.rejoin()?\n      if (n > 1 && clean & 2) ringSegments.push(ringSegments.pop().concat(ringSegments.shift()));\n\n      segments.push(ringSegments.filter(validSegment));\n    }\n\n    return clip;\n  };\n}\n\nfunction validSegment(segment) {\n  return segment.length > 1;\n}\n\n// Intersections are sorted along the clip edge. For both antimeridian cutting\n// and circle clipping, the same comparison is used.\nfunction compareIntersection(a, b) {\n  return ((a = a.x)[0] < 0 ? a[1] - halfPi - epsilon : halfPi - a[1])\n       - ((b = b.x)[0] < 0 ? b[1] - halfPi - epsilon : halfPi - b[1]);\n}\n", "import clip from \"./index.js\";\nimport {abs, atan, cos, epsilon, halfPi, pi, sin} from \"../math.js\";\n\nexport default clip(\n  function() { return true; },\n  clipAntimeridianLine,\n  clipAntimeridianInterpolate,\n  [-pi, -halfPi]\n);\n\n// Takes a line and cuts into visible segments. Return values: 0 - there were\n// intersections or the line was empty; 1 - no intersections; 2 - there were\n// intersections, and the first and last segments should be rejoined.\nfunction clipAntimeridianLine(stream) {\n  var lambda0 = NaN,\n      phi0 = NaN,\n      sign0 = NaN,\n      clean; // no intersections\n\n  return {\n    lineStart: function() {\n      stream.lineStart();\n      clean = 1;\n    },\n    point: function(lambda1, phi1) {\n      var sign1 = lambda1 > 0 ? pi : -pi,\n          delta = abs(lambda1 - lambda0);\n      if (abs(delta - pi) < epsilon) { // line crosses a pole\n        stream.point(lambda0, phi0 = (phi0 + phi1) / 2 > 0 ? halfPi : -halfPi);\n        stream.point(sign0, phi0);\n        stream.lineEnd();\n        stream.lineStart();\n        stream.point(sign1, phi0);\n        stream.point(lambda1, phi0);\n        clean = 0;\n      } else if (sign0 !== sign1 && delta >= pi) { // line crosses antimeridian\n        if (abs(lambda0 - sign0) < epsilon) lambda0 -= sign0 * epsilon; // handle degeneracies\n        if (abs(lambda1 - sign1) < epsilon) lambda1 -= sign1 * epsilon;\n        phi0 = clipAntimeridianIntersect(lambda0, phi0, lambda1, phi1);\n        stream.point(sign0, phi0);\n        stream.lineEnd();\n        stream.lineStart();\n        stream.point(sign1, phi0);\n        clean = 0;\n      }\n      stream.point(lambda0 = lambda1, phi0 = phi1);\n      sign0 = sign1;\n    },\n    lineEnd: function() {\n      stream.lineEnd();\n      lambda0 = phi0 = NaN;\n    },\n    clean: function() {\n      return 2 - clean; // if intersections, rejoin first and last segments\n    }\n  };\n}\n\nfunction clipAntimeridianIntersect(lambda0, phi0, lambda1, phi1) {\n  var cosPhi0,\n      cosPhi1,\n      sinLambda0Lambda1 = sin(lambda0 - lambda1);\n  return abs(sinLambda0Lambda1) > epsilon\n      ? atan((sin(phi0) * (cosPhi1 = cos(phi1)) * sin(lambda1)\n          - sin(phi1) * (cosPhi0 = cos(phi0)) * sin(lambda0))\n          / (cosPhi0 * cosPhi1 * sinLambda0Lambda1))\n      : (phi0 + phi1) / 2;\n}\n\nfunction clipAntimeridianInterpolate(from, to, direction, stream) {\n  var phi;\n  if (from == null) {\n    phi = direction * halfPi;\n    stream.point(-pi, phi);\n    stream.point(0, phi);\n    stream.point(pi, phi);\n    stream.point(pi, 0);\n    stream.point(pi, -phi);\n    stream.point(0, -phi);\n    stream.point(-pi, -phi);\n    stream.point(-pi, 0);\n    stream.point(-pi, phi);\n  } else if (abs(from[0] - to[0]) > epsilon) {\n    var lambda = from[0] < to[0] ? pi : -pi;\n    phi = direction * lambda / 2;\n    stream.point(-lambda, phi);\n    stream.point(0, phi);\n    stream.point(lambda, phi);\n  } else {\n    stream.point(to[0], to[1]);\n  }\n}\n", "import {cartesian, cartesianAddInPlace, cartesianCross, cartesianDot, cartesianScale, spherical} from \"../cartesian.js\";\nimport {circleStream} from \"../circle.js\";\nimport {abs, cos, epsilon, pi, radians, sqrt} from \"../math.js\";\nimport pointEqual from \"../pointEqual.js\";\nimport clip from \"./index.js\";\n\nexport default function(radius) {\n  var cr = cos(radius),\n      delta = 6 * radians,\n      smallRadius = cr > 0,\n      notHemisphere = abs(cr) > epsilon; // TODO optimise for this common case\n\n  function interpolate(from, to, direction, stream) {\n    circleStream(stream, radius, delta, direction, from, to);\n  }\n\n  function visible(lambda, phi) {\n    return cos(lambda) * cos(phi) > cr;\n  }\n\n  // Takes a line and cuts into visible segments. Return values used for polygon\n  // clipping: 0 - there were intersections or the line was empty; 1 - no\n  // intersections 2 - there were intersections, and the first and last segments\n  // should be rejoined.\n  function clipLine(stream) {\n    var point0, // previous point\n        c0, // code for previous point\n        v0, // visibility of previous point\n        v00, // visibility of first point\n        clean; // no intersections\n    return {\n      lineStart: function() {\n        v00 = v0 = false;\n        clean = 1;\n      },\n      point: function(lambda, phi) {\n        var point1 = [lambda, phi],\n            point2,\n            v = visible(lambda, phi),\n            c = smallRadius\n              ? v ? 0 : code(lambda, phi)\n              : v ? code(lambda + (lambda < 0 ? pi : -pi), phi) : 0;\n        if (!point0 && (v00 = v0 = v)) stream.lineStart();\n        if (v !== v0) {\n          point2 = intersect(point0, point1);\n          if (!point2 || pointEqual(point0, point2) || pointEqual(point1, point2))\n            point1[2] = 1;\n        }\n        if (v !== v0) {\n          clean = 0;\n          if (v) {\n            // outside going in\n            stream.lineStart();\n            point2 = intersect(point1, point0);\n            stream.point(point2[0], point2[1]);\n          } else {\n            // inside going out\n            point2 = intersect(point0, point1);\n            stream.point(point2[0], point2[1], 2);\n            stream.lineEnd();\n          }\n          point0 = point2;\n        } else if (notHemisphere && point0 && smallRadius ^ v) {\n          var t;\n          // If the codes for two points are different, or are both zero,\n          // and there this segment intersects with the small circle.\n          if (!(c & c0) && (t = intersect(point1, point0, true))) {\n            clean = 0;\n            if (smallRadius) {\n              stream.lineStart();\n              stream.point(t[0][0], t[0][1]);\n              stream.point(t[1][0], t[1][1]);\n              stream.lineEnd();\n            } else {\n              stream.point(t[1][0], t[1][1]);\n              stream.lineEnd();\n              stream.lineStart();\n              stream.point(t[0][0], t[0][1], 3);\n            }\n          }\n        }\n        if (v && (!point0 || !pointEqual(point0, point1))) {\n          stream.point(point1[0], point1[1]);\n        }\n        point0 = point1, v0 = v, c0 = c;\n      },\n      lineEnd: function() {\n        if (v0) stream.lineEnd();\n        point0 = null;\n      },\n      // Rejoin first and last segments if there were intersections and the first\n      // and last points were visible.\n      clean: function() {\n        return clean | ((v00 && v0) << 1);\n      }\n    };\n  }\n\n  // Intersects the great circle between a and b with the clip circle.\n  function intersect(a, b, two) {\n    var pa = cartesian(a),\n        pb = cartesian(b);\n\n    // We have two planes, n1.p = d1 and n2.p = d2.\n    // Find intersection line p(t) = c1 n1 + c2 n2 + t (n1 \u2A2F n2).\n    var n1 = [1, 0, 0], // normal\n        n2 = cartesianCross(pa, pb),\n        n2n2 = cartesianDot(n2, n2),\n        n1n2 = n2[0], // cartesianDot(n1, n2),\n        determinant = n2n2 - n1n2 * n1n2;\n\n    // Two polar points.\n    if (!determinant) return !two && a;\n\n    var c1 =  cr * n2n2 / determinant,\n        c2 = -cr * n1n2 / determinant,\n        n1xn2 = cartesianCross(n1, n2),\n        A = cartesianScale(n1, c1),\n        B = cartesianScale(n2, c2);\n    cartesianAddInPlace(A, B);\n\n    // Solve |p(t)|^2 = 1.\n    var u = n1xn2,\n        w = cartesianDot(A, u),\n        uu = cartesianDot(u, u),\n        t2 = w * w - uu * (cartesianDot(A, A) - 1);\n\n    if (t2 < 0) return;\n\n    var t = sqrt(t2),\n        q = cartesianScale(u, (-w - t) / uu);\n    cartesianAddInPlace(q, A);\n    q = spherical(q);\n\n    if (!two) return q;\n\n    // Two intersection points.\n    var lambda0 = a[0],\n        lambda1 = b[0],\n        phi0 = a[1],\n        phi1 = b[1],\n        z;\n\n    if (lambda1 < lambda0) z = lambda0, lambda0 = lambda1, lambda1 = z;\n\n    var delta = lambda1 - lambda0,\n        polar = abs(delta - pi) < epsilon,\n        meridian = polar || delta < epsilon;\n\n    if (!polar && phi1 < phi0) z = phi0, phi0 = phi1, phi1 = z;\n\n    // Check that the first point is between a and b.\n    if (meridian\n        ? polar\n          ? phi0 + phi1 > 0 ^ q[1] < (abs(q[0] - lambda0) < epsilon ? phi0 : phi1)\n          : phi0 <= q[1] && q[1] <= phi1\n        : delta > pi ^ (lambda0 <= q[0] && q[0] <= lambda1)) {\n      var q1 = cartesianScale(u, (-w + t) / uu);\n      cartesianAddInPlace(q1, A);\n      return [q, spherical(q1)];\n    }\n  }\n\n  // Generates a 4-bit vector representing the location of a point relative to\n  // the small circle's bounding box.\n  function code(lambda, phi) {\n    var r = smallRadius ? radius : pi - radius,\n        code = 0;\n    if (lambda < -r) code |= 1; // left\n    else if (lambda > r) code |= 2; // right\n    if (phi < -r) code |= 4; // below\n    else if (phi > r) code |= 8; // above\n    return code;\n  }\n\n  return clip(visible, clipLine, interpolate, smallRadius ? [0, -radius] : [-pi, radius - pi]);\n}\n", "export default function(a, b, x0, y0, x1, y1) {\n  var ax = a[0],\n      ay = a[1],\n      bx = b[0],\n      by = b[1],\n      t0 = 0,\n      t1 = 1,\n      dx = bx - ax,\n      dy = by - ay,\n      r;\n\n  r = x0 - ax;\n  if (!dx && r > 0) return;\n  r /= dx;\n  if (dx < 0) {\n    if (r < t0) return;\n    if (r < t1) t1 = r;\n  } else if (dx > 0) {\n    if (r > t1) return;\n    if (r > t0) t0 = r;\n  }\n\n  r = x1 - ax;\n  if (!dx && r < 0) return;\n  r /= dx;\n  if (dx < 0) {\n    if (r > t1) return;\n    if (r > t0) t0 = r;\n  } else if (dx > 0) {\n    if (r < t0) return;\n    if (r < t1) t1 = r;\n  }\n\n  r = y0 - ay;\n  if (!dy && r > 0) return;\n  r /= dy;\n  if (dy < 0) {\n    if (r < t0) return;\n    if (r < t1) t1 = r;\n  } else if (dy > 0) {\n    if (r > t1) return;\n    if (r > t0) t0 = r;\n  }\n\n  r = y1 - ay;\n  if (!dy && r < 0) return;\n  r /= dy;\n  if (dy < 0) {\n    if (r > t1) return;\n    if (r > t0) t0 = r;\n  } else if (dy > 0) {\n    if (r < t0) return;\n    if (r < t1) t1 = r;\n  }\n\n  if (t0 > 0) a[0] = ax + t0 * dx, a[1] = ay + t0 * dy;\n  if (t1 < 1) b[0] = ax + t1 * dx, b[1] = ay + t1 * dy;\n  return true;\n}\n", "import {abs, epsilon} from \"../math.js\";\nimport clipBuffer from \"./buffer.js\";\nimport clipLine from \"./line.js\";\nimport clipRejoin from \"./rejoin.js\";\nimport {merge} from \"d3-array\";\n\nvar clipMax = 1e9, clipMin = -clipMax;\n\n// TODO Use d3-polygon\u2019s polygonContains here for the ring check?\n// TODO Eliminate duplicate buffering in clipBuffer and polygon.push?\n\nexport default function clipRectangle(x0, y0, x1, y1) {\n\n  function visible(x, y) {\n    return x0 <= x && x <= x1 && y0 <= y && y <= y1;\n  }\n\n  function interpolate(from, to, direction, stream) {\n    var a = 0, a1 = 0;\n    if (from == null\n        || (a = corner(from, direction)) !== (a1 = corner(to, direction))\n        || comparePoint(from, to) < 0 ^ direction > 0) {\n      do stream.point(a === 0 || a === 3 ? x0 : x1, a > 1 ? y1 : y0);\n      while ((a = (a + direction + 4) % 4) !== a1);\n    } else {\n      stream.point(to[0], to[1]);\n    }\n  }\n\n  function corner(p, direction) {\n    return abs(p[0] - x0) < epsilon ? direction > 0 ? 0 : 3\n        : abs(p[0] - x1) < epsilon ? direction > 0 ? 2 : 1\n        : abs(p[1] - y0) < epsilon ? direction > 0 ? 1 : 0\n        : direction > 0 ? 3 : 2; // abs(p[1] - y1) < epsilon\n  }\n\n  function compareIntersection(a, b) {\n    return comparePoint(a.x, b.x);\n  }\n\n  function comparePoint(a, b) {\n    var ca = corner(a, 1),\n        cb = corner(b, 1);\n    return ca !== cb ? ca - cb\n        : ca === 0 ? b[1] - a[1]\n        : ca === 1 ? a[0] - b[0]\n        : ca === 2 ? a[1] - b[1]\n        : b[0] - a[0];\n  }\n\n  return function(stream) {\n    var activeStream = stream,\n        bufferStream = clipBuffer(),\n        segments,\n        polygon,\n        ring,\n        x__, y__, v__, // first point\n        x_, y_, v_, // previous point\n        first,\n        clean;\n\n    var clipStream = {\n      point: point,\n      lineStart: lineStart,\n      lineEnd: lineEnd,\n      polygonStart: polygonStart,\n      polygonEnd: polygonEnd\n    };\n\n    function point(x, y) {\n      if (visible(x, y)) activeStream.point(x, y);\n    }\n\n    function polygonInside() {\n      var winding = 0;\n\n      for (var i = 0, n = polygon.length; i < n; ++i) {\n        for (var ring = polygon[i], j = 1, m = ring.length, point = ring[0], a0, a1, b0 = point[0], b1 = point[1]; j < m; ++j) {\n          a0 = b0, a1 = b1, point = ring[j], b0 = point[0], b1 = point[1];\n          if (a1 <= y1) { if (b1 > y1 && (b0 - a0) * (y1 - a1) > (b1 - a1) * (x0 - a0)) ++winding; }\n          else { if (b1 <= y1 && (b0 - a0) * (y1 - a1) < (b1 - a1) * (x0 - a0)) --winding; }\n        }\n      }\n\n      return winding;\n    }\n\n    // Buffer geometry within a polygon and then clip it en masse.\n    function polygonStart() {\n      activeStream = bufferStream, segments = [], polygon = [], clean = true;\n    }\n\n    function polygonEnd() {\n      var startInside = polygonInside(),\n          cleanInside = clean && startInside,\n          visible = (segments = merge(segments)).length;\n      if (cleanInside || visible) {\n        stream.polygonStart();\n        if (cleanInside) {\n          stream.lineStart();\n          interpolate(null, null, 1, stream);\n          stream.lineEnd();\n        }\n        if (visible) {\n          clipRejoin(segments, compareIntersection, startInside, interpolate, stream);\n        }\n        stream.polygonEnd();\n      }\n      activeStream = stream, segments = polygon = ring = null;\n    }\n\n    function lineStart() {\n      clipStream.point = linePoint;\n      if (polygon) polygon.push(ring = []);\n      first = true;\n      v_ = false;\n      x_ = y_ = NaN;\n    }\n\n    // TODO rather than special-case polygons, simply handle them separately.\n    // Ideally, coincident intersection points should be jittered to avoid\n    // clipping issues.\n    function lineEnd() {\n      if (segments) {\n        linePoint(x__, y__);\n        if (v__ && v_) bufferStream.rejoin();\n        segments.push(bufferStream.result());\n      }\n      clipStream.point = point;\n      if (v_) activeStream.lineEnd();\n    }\n\n    function linePoint(x, y) {\n      var v = visible(x, y);\n      if (polygon) ring.push([x, y]);\n      if (first) {\n        x__ = x, y__ = y, v__ = v;\n        first = false;\n        if (v) {\n          activeStream.lineStart();\n          activeStream.point(x, y);\n        }\n      } else {\n        if (v && v_) activeStream.point(x, y);\n        else {\n          var a = [x_ = Math.max(clipMin, Math.min(clipMax, x_)), y_ = Math.max(clipMin, Math.min(clipMax, y_))],\n              b = [x = Math.max(clipMin, Math.min(clipMax, x)), y = Math.max(clipMin, Math.min(clipMax, y))];\n          if (clipLine(a, b, x0, y0, x1, y1)) {\n            if (!v_) {\n              activeStream.lineStart();\n              activeStream.point(a[0], a[1]);\n            }\n            activeStream.point(b[0], b[1]);\n            if (!v) activeStream.lineEnd();\n            clean = false;\n          } else if (v) {\n            activeStream.lineStart();\n            activeStream.point(x, y);\n            clean = false;\n          }\n        }\n      }\n      x_ = x, y_ = y, v_ = v;\n    }\n\n    return clipStream;\n  };\n}\n", "export default x => x;\n", "import noop from \"../noop.js\";\n\nvar x0 = Infinity,\n    y0 = x0,\n    x1 = -x0,\n    y1 = x1;\n\nvar boundsStream = {\n  point: boundsPoint,\n  lineStart: noop,\n  lineEnd: noop,\n  polygonStart: noop,\n  polygonEnd: noop,\n  result: function() {\n    var bounds = [[x0, y0], [x1, y1]];\n    x1 = y1 = -(y0 = x0 = Infinity);\n    return bounds;\n  }\n};\n\nfunction boundsPoint(x, y) {\n  if (x < x0) x0 = x;\n  if (x > x1) x1 = x;\n  if (y < y0) y0 = y;\n  if (y > y1) y1 = y;\n}\n\nexport default boundsStream;\n", "export default function(methods) {\n  return {\n    stream: transformer(methods)\n  };\n}\n\nexport function transformer(methods) {\n  return function(stream) {\n    var s = new TransformStream;\n    for (var key in methods) s[key] = methods[key];\n    s.stream = stream;\n    return s;\n  };\n}\n\nfunction TransformStream() {}\n\nTransformStream.prototype = {\n  constructor: TransformStream,\n  point: function(x, y) { this.stream.point(x, y); },\n  sphere: function() { this.stream.sphere(); },\n  lineStart: function() { this.stream.lineStart(); },\n  lineEnd: function() { this.stream.lineEnd(); },\n  polygonStart: function() { this.stream.polygonStart(); },\n  polygonEnd: function() { this.stream.polygonEnd(); }\n};\n", "import {default as geoStream} from \"../stream.js\";\nimport boundsStream from \"../path/bounds.js\";\n\nfunction fit(projection, fitBounds, object) {\n  var clip = projection.clipExtent && projection.clipExtent();\n  projection.scale(150).translate([0, 0]);\n  if (clip != null) projection.clipExtent(null);\n  geoStream(object, projection.stream(boundsStream));\n  fitBounds(boundsStream.result());\n  if (clip != null) projection.clipExtent(clip);\n  return projection;\n}\n\nexport function fitExtent(projection, extent, object) {\n  return fit(projection, function(b) {\n    var w = extent[1][0] - extent[0][0],\n        h = extent[1][1] - extent[0][1],\n        k = Math.min(w / (b[1][0] - b[0][0]), h / (b[1][1] - b[0][1])),\n        x = +extent[0][0] + (w - k * (b[1][0] + b[0][0])) / 2,\n        y = +extent[0][1] + (h - k * (b[1][1] + b[0][1])) / 2;\n    projection.scale(150 * k).translate([x, y]);\n  }, object);\n}\n\nexport function fitSize(projection, size, object) {\n  return fitExtent(projection, [[0, 0], size], object);\n}\n\nexport function fitWidth(projection, width, object) {\n  return fit(projection, function(b) {\n    var w = +width,\n        k = w / (b[1][0] - b[0][0]),\n        x = (w - k * (b[1][0] + b[0][0])) / 2,\n        y = -k * b[0][1];\n    projection.scale(150 * k).translate([x, y]);\n  }, object);\n}\n\nexport function fitHeight(projection, height, object) {\n  return fit(projection, function(b) {\n    var h = +height,\n        k = h / (b[1][1] - b[0][1]),\n        x = -k * b[0][0],\n        y = (h - k * (b[1][1] + b[0][1])) / 2;\n    projection.scale(150 * k).translate([x, y]);\n  }, object);\n}\n", "import {cartesian} from \"../cartesian.js\";\nimport {abs, asin, atan2, cos, epsilon, radians, sqrt} from \"../math.js\";\nimport {transformer} from \"../transform.js\";\n\nvar maxDepth = 16, // maximum depth of subdivision\n    cosMinDistance = cos(30 * radians); // cos(minimum angular distance)\n\nexport default function(project, delta2) {\n  return +delta2 ? resample(project, delta2) : resampleNone(project);\n}\n\nfunction resampleNone(project) {\n  return transformer({\n    point: function(x, y) {\n      x = project(x, y);\n      this.stream.point(x[0], x[1]);\n    }\n  });\n}\n\nfunction resample(project, delta2) {\n\n  function resampleLineTo(x0, y0, lambda0, a0, b0, c0, x1, y1, lambda1, a1, b1, c1, depth, stream) {\n    var dx = x1 - x0,\n        dy = y1 - y0,\n        d2 = dx * dx + dy * dy;\n    if (d2 > 4 * delta2 && depth--) {\n      var a = a0 + a1,\n          b = b0 + b1,\n          c = c0 + c1,\n          m = sqrt(a * a + b * b + c * c),\n          phi2 = asin(c /= m),\n          lambda2 = abs(abs(c) - 1) < epsilon || abs(lambda0 - lambda1) < epsilon ? (lambda0 + lambda1) / 2 : atan2(b, a),\n          p = project(lambda2, phi2),\n          x2 = p[0],\n          y2 = p[1],\n          dx2 = x2 - x0,\n          dy2 = y2 - y0,\n          dz = dy * dx2 - dx * dy2;\n      if (dz * dz / d2 > delta2 // perpendicular projected distance\n          || abs((dx * dx2 + dy * dy2) / d2 - 0.5) > 0.3 // midpoint close to an end\n          || a0 * a1 + b0 * b1 + c0 * c1 < cosMinDistance) { // angular distance\n        resampleLineTo(x0, y0, lambda0, a0, b0, c0, x2, y2, lambda2, a /= m, b /= m, c, depth, stream);\n        stream.point(x2, y2);\n        resampleLineTo(x2, y2, lambda2, a, b, c, x1, y1, lambda1, a1, b1, c1, depth, stream);\n      }\n    }\n  }\n  return function(stream) {\n    var lambda00, x00, y00, a00, b00, c00, // first point\n        lambda0, x0, y0, a0, b0, c0; // previous point\n\n    var resampleStream = {\n      point: point,\n      lineStart: lineStart,\n      lineEnd: lineEnd,\n      polygonStart: function() { stream.polygonStart(); resampleStream.lineStart = ringStart; },\n      polygonEnd: function() { stream.polygonEnd(); resampleStream.lineStart = lineStart; }\n    };\n\n    function point(x, y) {\n      x = project(x, y);\n      stream.point(x[0], x[1]);\n    }\n\n    function lineStart() {\n      x0 = NaN;\n      resampleStream.point = linePoint;\n      stream.lineStart();\n    }\n\n    function linePoint(lambda, phi) {\n      var c = cartesian([lambda, phi]), p = project(lambda, phi);\n      resampleLineTo(x0, y0, lambda0, a0, b0, c0, x0 = p[0], y0 = p[1], lambda0 = lambda, a0 = c[0], b0 = c[1], c0 = c[2], maxDepth, stream);\n      stream.point(x0, y0);\n    }\n\n    function lineEnd() {\n      resampleStream.point = point;\n      stream.lineEnd();\n    }\n\n    function ringStart() {\n      lineStart();\n      resampleStream.point = ringPoint;\n      resampleStream.lineEnd = ringEnd;\n    }\n\n    function ringPoint(lambda, phi) {\n      linePoint(lambda00 = lambda, phi), x00 = x0, y00 = y0, a00 = a0, b00 = b0, c00 = c0;\n      resampleStream.point = linePoint;\n    }\n\n    function ringEnd() {\n      resampleLineTo(x0, y0, lambda0, a0, b0, c0, x00, y00, lambda00, a00, b00, c00, maxDepth, stream);\n      resampleStream.lineEnd = lineEnd;\n      lineEnd();\n    }\n\n    return resampleStream;\n  };\n}\n", "import clipAntimeridian from \"../clip/antimeridian.js\";\nimport clipCircle from \"../clip/circle.js\";\nimport clipRectangle from \"../clip/rectangle.js\";\nimport compose from \"../compose.js\";\nimport identity from \"../identity.js\";\nimport {cos, degrees, radians, sin, sqrt} from \"../math.js\";\nimport {rotateRadians} from \"../rotation.js\";\nimport {transformer} from \"../transform.js\";\nimport {fitExtent, fitSize, fitWidth, fitHeight} from \"./fit.js\";\nimport resample from \"./resample.js\";\n\nvar transformRadians = transformer({\n  point: function(x, y) {\n    this.stream.point(x * radians, y * radians);\n  }\n});\n\nfunction transformRotate(rotate) {\n  return transformer({\n    point: function(x, y) {\n      var r = rotate(x, y);\n      return this.stream.point(r[0], r[1]);\n    }\n  });\n}\n\nfunction scaleTranslate(k, dx, dy, sx, sy) {\n  function transform(x, y) {\n    x *= sx; y *= sy;\n    return [dx + k * x, dy - k * y];\n  }\n  transform.invert = function(x, y) {\n    return [(x - dx) / k * sx, (dy - y) / k * sy];\n  };\n  return transform;\n}\n\nfunction scaleTranslateRotate(k, dx, dy, sx, sy, alpha) {\n  if (!alpha) return scaleTranslate(k, dx, dy, sx, sy);\n  var cosAlpha = cos(alpha),\n      sinAlpha = sin(alpha),\n      a = cosAlpha * k,\n      b = sinAlpha * k,\n      ai = cosAlpha / k,\n      bi = sinAlpha / k,\n      ci = (sinAlpha * dy - cosAlpha * dx) / k,\n      fi = (sinAlpha * dx + cosAlpha * dy) / k;\n  function transform(x, y) {\n    x *= sx; y *= sy;\n    return [a * x - b * y + dx, dy - b * x - a * y];\n  }\n  transform.invert = function(x, y) {\n    return [sx * (ai * x - bi * y + ci), sy * (fi - bi * x - ai * y)];\n  };\n  return transform;\n}\n\nexport default function projection(project) {\n  return projectionMutator(function() { return project; })();\n}\n\nexport function projectionMutator(projectAt) {\n  var project,\n      k = 150, // scale\n      x = 480, y = 250, // translate\n      lambda = 0, phi = 0, // center\n      deltaLambda = 0, deltaPhi = 0, deltaGamma = 0, rotate, // pre-rotate\n      alpha = 0, // post-rotate angle\n      sx = 1, // reflectX\n      sy = 1, // reflectX\n      theta = null, preclip = clipAntimeridian, // pre-clip angle\n      x0 = null, y0, x1, y1, postclip = identity, // post-clip extent\n      delta2 = 0.5, // precision\n      projectResample,\n      projectTransform,\n      projectRotateTransform,\n      cache,\n      cacheStream;\n\n  function projection(point) {\n    return projectRotateTransform(point[0] * radians, point[1] * radians);\n  }\n\n  function invert(point) {\n    point = projectRotateTransform.invert(point[0], point[1]);\n    return point && [point[0] * degrees, point[1] * degrees];\n  }\n\n  projection.stream = function(stream) {\n    return cache && cacheStream === stream ? cache : cache = transformRadians(transformRotate(rotate)(preclip(projectResample(postclip(cacheStream = stream)))));\n  };\n\n  projection.preclip = function(_) {\n    return arguments.length ? (preclip = _, theta = undefined, reset()) : preclip;\n  };\n\n  projection.postclip = function(_) {\n    return arguments.length ? (postclip = _, x0 = y0 = x1 = y1 = null, reset()) : postclip;\n  };\n\n  projection.clipAngle = function(_) {\n    return arguments.length ? (preclip = +_ ? clipCircle(theta = _ * radians) : (theta = null, clipAntimeridian), reset()) : theta * degrees;\n  };\n\n  projection.clipExtent = function(_) {\n    return arguments.length ? (postclip = _ == null ? (x0 = y0 = x1 = y1 = null, identity) : clipRectangle(x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1]), reset()) : x0 == null ? null : [[x0, y0], [x1, y1]];\n  };\n\n  projection.scale = function(_) {\n    return arguments.length ? (k = +_, recenter()) : k;\n  };\n\n  projection.translate = function(_) {\n    return arguments.length ? (x = +_[0], y = +_[1], recenter()) : [x, y];\n  };\n\n  projection.center = function(_) {\n    return arguments.length ? (lambda = _[0] % 360 * radians, phi = _[1] % 360 * radians, recenter()) : [lambda * degrees, phi * degrees];\n  };\n\n  projection.rotate = function(_) {\n    return arguments.length ? (deltaLambda = _[0] % 360 * radians, deltaPhi = _[1] % 360 * radians, deltaGamma = _.length > 2 ? _[2] % 360 * radians : 0, recenter()) : [deltaLambda * degrees, deltaPhi * degrees, deltaGamma * degrees];\n  };\n\n  projection.angle = function(_) {\n    return arguments.length ? (alpha = _ % 360 * radians, recenter()) : alpha * degrees;\n  };\n\n  projection.reflectX = function(_) {\n    return arguments.length ? (sx = _ ? -1 : 1, recenter()) : sx < 0;\n  };\n\n  projection.reflectY = function(_) {\n    return arguments.length ? (sy = _ ? -1 : 1, recenter()) : sy < 0;\n  };\n\n  projection.precision = function(_) {\n    return arguments.length ? (projectResample = resample(projectTransform, delta2 = _ * _), reset()) : sqrt(delta2);\n  };\n\n  projection.fitExtent = function(extent, object) {\n    return fitExtent(projection, extent, object);\n  };\n\n  projection.fitSize = function(size, object) {\n    return fitSize(projection, size, object);\n  };\n\n  projection.fitWidth = function(width, object) {\n    return fitWidth(projection, width, object);\n  };\n\n  projection.fitHeight = function(height, object) {\n    return fitHeight(projection, height, object);\n  };\n\n  function recenter() {\n    var center = scaleTranslateRotate(k, 0, 0, sx, sy, alpha).apply(null, project(lambda, phi)),\n        transform = scaleTranslateRotate(k, x - center[0], y - center[1], sx, sy, alpha);\n    rotate = rotateRadians(deltaLambda, deltaPhi, deltaGamma);\n    projectTransform = compose(project, transform);\n    projectRotateTransform = compose(rotate, projectTransform);\n    projectResample = resample(projectTransform, delta2);\n    return reset();\n  }\n\n  function reset() {\n    cache = cacheStream = null;\n    return projection;\n  }\n\n  return function() {\n    project = projectAt.apply(this, arguments);\n    projection.invert = project.invert && invert;\n    return recenter();\n  };\n}\n", "import {asin, atan2, cos, sin, sqrt} from \"../math.js\";\n\nexport function azimuthalRaw(scale) {\n  return function(x, y) {\n    var cx = cos(x),\n        cy = cos(y),\n        k = scale(cx * cy);\n        if (k === Infinity) return [2, 0];\n    return [\n      k * cy * sin(x),\n      k * sin(y)\n    ];\n  }\n}\n\nexport function azimuthalInvert(angle) {\n  return function(x, y) {\n    var z = sqrt(x * x + y * y),\n        c = angle(z),\n        sc = sin(c),\n        cc = cos(c);\n    return [\n      atan2(x * sc, z * cc),\n      asin(z && y * sc / z)\n    ];\n  }\n}\n", "import {acos, sin} from \"../math.js\";\nimport {azimuthalRaw, azimuthalInvert} from \"./azimuthal.js\";\nimport projection from \"./index.js\";\n\nexport var azimuthalEquidistantRaw = azimuthalRaw(function(c) {\n  return (c = acos(c)) && c / sin(c);\n});\n\nazimuthalEquidistantRaw.invert = azimuthalInvert(function(z) {\n  return z;\n});\n\nexport default function() {\n  return projection(azimuthalEquidistantRaw)\n      .scale(79.4188)\n      .clipAngle(180 - 1e-3);\n}\n", "import ClipperLib from \"clipper-lib\";\nimport { featureCollection } from \"@turf/helpers\";\nimport { offset as offsetOnSphere } from \"ol/sphere\";\nimport { degreesToRadians } from \"../../../helpers/geometry\";\nimport { EARTH_RADIUS_EQUATORIAL_METERS } from \"../ol-geometry\";\n\nconst CLIPPER_SCALE = 1000; // Clipper uses integers; this scales meters to 1mm precision\nconst FEET_TO_METERS = 0.3048;\nconst CLIPPER_ARC_TOLERANCE = 0.05; // 5cm\n\nfunction distanceAndBearing(originLonLat, pointLonLat) {\n  const [originLng, originLat] = originLonLat;\n  const [pointLng, pointLat] = pointLonLat;\n\n  const lat1 = degreesToRadians(originLat);\n  const lat2 = degreesToRadians(pointLat);\n  const deltaLat = lat2 - lat1;\n  const deltaLng = degreesToRadians(pointLng - originLng);\n\n  const a =\n    Math.sin(deltaLat / 2) * Math.sin(deltaLat / 2) +\n    Math.cos(lat1) * Math.cos(lat2) * Math.sin(deltaLng / 2) * Math.sin(deltaLng / 2);\n  const arc = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n  const distance = EARTH_RADIUS_EQUATORIAL_METERS * arc;\n\n  const y = Math.sin(deltaLng) * Math.cos(lat2);\n  const x = Math.cos(lat1) * Math.sin(lat2) - Math.sin(lat1) * Math.cos(lat2) * Math.cos(deltaLng);\n  const bearing = Math.atan2(y, x); // radians from north\n\n  return { distance, bearing };\n}\n\n/**\n * Converts GeoJSON coordinates to a Clipper path.\n *\n * Clipper paths are arrays of {X, Y} points in a flat coordinate system.\n * We project lat/lng to meters using a great-circle projection relative to the\n * provided origin, then scale to Clipper units. We intentionally avoid rounding\n * here; Clipper will coerce to integers internally.\n *\n * @param {Array} coords - GeoJSON coordinates [[lng, lat], ...]\n * @returns {Object} { path, originLonLat }\n */\nexport function coordsToClipperPath(coords, originLonLat) {\n  const path = [];\n  for (let i = 0; i < coords.length - 1; i++) {\n    const [lng, lat] = coords[i];\n    const { distance, bearing } = distanceAndBearing(originLonLat, [lng, lat]);\n    const x = Math.sin(bearing) * distance;\n    const y = Math.cos(bearing) * distance;\n    path.push({\n      X: x * CLIPPER_SCALE,\n      Y: y * CLIPPER_SCALE,\n    });\n  }\n\n  return {\n    path,\n    originLonLat,\n  };\n}\n\n/**\n * @param {Array} path - Clipper path [{X, Y}, ...]\n * @param {Array<number>} originLonLat\n * @returns {Array} GeoJSON coordinates [[lng, lat], ...]\n */\nexport function clipperPathToCoords(path, originLonLat) {\n  const coords = [];\n  for (const point of path) {\n    const xMeters = point.X / CLIPPER_SCALE;\n    const yMeters = point.Y / CLIPPER_SCALE;\n    const distance = Math.hypot(xMeters, yMeters);\n    const bearing = Math.atan2(xMeters, yMeters); // radians from north\n    const [lng, lat] = offsetOnSphere(originLonLat, distance, bearing, EARTH_RADIUS_EQUATORIAL_METERS);\n    coords.push([lng, lat]);\n  }\n  return coords;\n}\n\n/**\n * Builds buffered polygons using Clipper's offset algorithm.\n *\n * ClipperOffset is the offset engine. We configure it with:\n * - AddPath(path, joinType, endType): adds a polygon to offset\n *   - jtRound: round corners using arcs\n *   - etClosedPolygon: treat as closed shape (not open line)\n * - ArcTolerance: max deviation from true arc (controls point density on curves)\n *\n * Execute(solution, delta) runs the offset:\n * - solution: empty Paths array that receives results\n * - delta: offset distance (positive=outward, negative=inward)\n *\n * Solution may contain multiple polygons (e.g., if inset splits the shape)\n * or zero polygons (if inset is larger than the shape can support).\n *\n * @param {Object} featuresCollection - GeoJSON FeatureCollection\n * @param {number} sizeFeet - Buffer size in feet (negative for inward buffer)\n * @param {Array<number>} originLonLat\n * @returns {Object} GeoJSON FeatureCollection with buffered features\n */\nexport function buildClipperBufferFeatures(featuresCollection, sizeFeet, originLonLat) {\n  const result = [];\n  const sizeMeters = sizeFeet * FEET_TO_METERS;\n\n  featuresCollection.features.forEach((feature) => {\n    // GeoJSON Polygon coordinates: [exterior, ...holes] - we only process exterior\n    const exteriorRing = feature.geometry.coordinates[0];\n\n    const { path: clipperPath, originLonLat: origin } = coordsToClipperPath(exteriorRing, originLonLat);\n\n    const co = new ClipperLib.ClipperOffset();\n    co.AddPath(clipperPath, ClipperLib.JoinType.jtRound, ClipperLib.EndType.etClosedPolygon);\n    co.ArcTolerance = CLIPPER_ARC_TOLERANCE * CLIPPER_SCALE;\n\n    const solution = new ClipperLib.Paths();\n    const delta = sizeMeters * CLIPPER_SCALE;\n    co.Execute(solution, delta);\n\n    solution.forEach((solutionPath) => {\n      const coords = clipperPathToCoords(solutionPath, origin);\n      if (coords.length > 0) {\n        coords.push([...coords[0]]);\n      }\n\n      result.push({\n        type: \"Feature\",\n        properties: feature.properties || {},\n        geometry: {\n          type: \"Polygon\",\n          coordinates: [coords],\n        },\n      });\n    });\n  });\n\n  return featureCollection(result.flat());\n}\n", "export default class SimpleLatLng {\n  static fromLatLngModel(latLngModel) {\n    return new SimpleLatLng(latLngModel.lat, latLngModel.lng);\n  }\n\n  static fromLonLat(lonLat) {\n    return new SimpleLatLng(lonLat[1], lonLat[0]);\n  }\n\n  constructor(lat, lng) {\n    this.lat = lat;\n    this.lng = lng;\n  }\n\n  get toLonLat() {\n    return [this.lng, this.lat];\n  }\n\n  get toSimpleObject() {\n    return { lat: this.lat, lng: this.lng };\n  }\n\n  plus(other) {\n    return new SimpleLatLng(this.lat + other.lat, this.lng + other.lng);\n  }\n\n  minus(other) {\n    return new SimpleLatLng(this.lat - other.lat, this.lng - other.lng);\n  }\n\n  times(multiplier) {\n    return new SimpleLatLng(this.lat * multiplier, this.lng * multiplier);\n  }\n\n  dividedBy(divisor) {\n    return new SimpleLatLng(this.lat / divisor, this.lng / divisor);\n  }\n}\n", "import { types } from \"mobx-state-tree\";\n\nconst CartesianModel = types\n  .model(\"CartesianModel\", {\n    x: types.number,\n    y: types.number,\n  })\n  .views((self) => ({\n    get toArray() {\n      return [self.x, self.y];\n    },\n    get toStringValue() {\n      return JSON.stringify(this.toArray);\n    },\n    get toSimpleObject() {\n      return {\n        x: self.x,\n        y: self.y,\n      };\n    },\n    // If you are using a CartesianModel to represent a vector, these operations\n    // are useful\n    plus(other) {\n      return CartesianModel.create({\n        x: self.x + other.x,\n        y: self.y + other.y,\n      });\n    },\n    minus(other) {\n      return CartesianModel.create({\n        x: self.x - other.x,\n        y: self.y - other.y,\n      });\n    },\n    times(multiplier) {\n      return CartesianModel.create({\n        x: self.x * multiplier,\n        y: self.y * multiplier,\n      });\n    },\n    dividedBy(divisor) {\n      return self.times(1.0 / divisor);\n    },\n    distanceTo(other) {\n      const deltaX = other.x - self.x;\n      const deltaY = other.y - self.y;\n\n      return Math.sqrt(deltaX * deltaX + deltaY * deltaY);\n    },\n  }));\n\nexport default CartesianModel;\n", "import { toLonLat } from \"ol/proj\";\nimport { getDistance, offset as offsetOnSphere } from \"ol/sphere\";\n\nimport SimpleLatLng from \"./models/simple-lat-lng\";\nimport CartesianPoint from \"../models/cartesian-model\";\n\nimport { relativePosition } from \"./ol-helpers\";\n\nexport const METERS_TO_INCHES = 39.3700787;\nexport const METERS_PER_DEGREE_LAT = 111111.0;\nexport const EARTH_RADIUS_EQUATORIAL_METERS = 6378137;\n\nexport function calculateUnitPerpendicularEdgeVectorLatLng(startPointCoordinates, endPointCoordinates) {\n  const startPointLonLat = toLonLat(startPointCoordinates);\n  const endPointLonLat = toLonLat(endPointCoordinates);\n\n  const startPointLatLng = SimpleLatLng.fromLonLat(startPointLonLat);\n  const endPointLatLng = SimpleLatLng.fromLonLat(endPointLonLat);\n\n  const edgeVectorLatLng = endPointLatLng.minus(startPointLatLng);\n  const edgeVectorLength = getDistance(startPointLonLat, endPointLonLat) * METERS_TO_INCHES;\n  const unitEdgeVectorLatLng = edgeVectorLatLng.dividedBy(edgeVectorLength);\n  const midPointLatLng = startPointLatLng.plus(edgeVectorLatLng.times(0.5));\n\n  const rightAngleCornerLatLng = new SimpleLatLng(startPointLatLng.lat, endPointLatLng.lng);\n\n  const xEdgeDistance = getDistance(startPointLatLng.toLonLat, rightAngleCornerLatLng.toLonLat); // meters\n  let xEdgeVectorLatLng;\n  let xEdgeUnitVectorLatLng;\n  if (xEdgeDistance === 0) {\n    // the points are vertical, i.e. at the same longitude\n    xEdgeVectorLatLng = new SimpleLatLng(0, 1);\n    const oneDegreePosition = startPointLatLng.plus(xEdgeVectorLatLng);\n    const oneDegreeDistance = getDistance(startPointLatLng.toLonLat, oneDegreePosition.toLonLat);\n    xEdgeUnitVectorLatLng = xEdgeVectorLatLng.dividedBy(oneDegreeDistance);\n  } else {\n    xEdgeVectorLatLng = rightAngleCornerLatLng.minus(startPointLatLng);\n    xEdgeUnitVectorLatLng = xEdgeVectorLatLng.dividedBy(xEdgeDistance);\n  }\n\n  const yEdgeDistance = getDistance(endPointLatLng.toLonLat, rightAngleCornerLatLng.toLonLat);\n  let yEdgeVectorLatLng;\n  let yEdgeUnitVectorLatLng;\n  if (yEdgeDistance === 0) {\n    // the points are horizontal, i.e. at the same latitude\n    yEdgeVectorLatLng = new SimpleLatLng(1, 0);\n    const oneDegreePosition = startPointLatLng.plus(yEdgeVectorLatLng);\n    const oneDegreeDistance = getDistance(startPointLatLng.toLonLat, oneDegreePosition.toLonLat);\n    yEdgeUnitVectorLatLng = yEdgeVectorLatLng.dividedBy(oneDegreeDistance);\n  } else {\n    yEdgeVectorLatLng = endPointLatLng.minus(rightAngleCornerLatLng);\n    yEdgeUnitVectorLatLng = yEdgeVectorLatLng.dividedBy(yEdgeDistance);\n  }\n\n  const scaledXEdgeVectorLatLng = xEdgeUnitVectorLatLng.times(yEdgeDistance);\n  const scaledYEdgeVectorLatLng = yEdgeUnitVectorLatLng.times(xEdgeDistance);\n  const perpendicularEdgeVectorLatLng = scaledXEdgeVectorLatLng\n    .minus(scaledYEdgeVectorLatLng)\n    .times(directionalAdjustment(startPointLatLng, endPointLatLng));\n\n  const pointOnPerpendicularLatLon = midPointLatLng.plus(perpendicularEdgeVectorLatLng);\n  const perpendicularEdgeLength =\n    getDistance(pointOnPerpendicularLatLon.toLonLat, midPointLatLng.toLonLat) * METERS_TO_INCHES;\n\n  const unitPerpendicularEdgeVectorLatLng = perpendicularEdgeVectorLatLng.dividedBy(perpendicularEdgeLength);\n\n  // [coordinate, degrees/inch, degrees/inch]\n  return [midPointLatLng, unitPerpendicularEdgeVectorLatLng, unitEdgeVectorLatLng];\n}\n\nfunction directionalAdjustment(startPointLatLng, endPointLatLng) {\n  const latDelta = endPointLatLng.lat - startPointLatLng.lat;\n  const lngDelta = endPointLatLng.lng - startPointLatLng.lng;\n\n  if (\n    (latDelta > 0 && lngDelta > 0) ||\n    (latDelta < 0 && lngDelta < 0) ||\n    (latDelta === 0 && lngDelta > 0) ||\n    (latDelta > 0 && lngDelta === 0)\n  ) {\n    return -1;\n  } else {\n    return 1;\n  }\n}\n\n// Lines are [ [x1, y1], [x2, y2]] with x's and y's in OpenLayers coordinates\n// returns undefined if lines are coincident or parallel\n// otherwise returns a point in OL coordinates [x, y] where the lines intersect\nexport function lineIntersectionInCoordinates(firstLine, secondLine) {\n  const x1 = firstLine[0][0];\n  const y1 = firstLine[0][1];\n  const x2 = firstLine[1][0];\n  const y2 = firstLine[1][1];\n\n  const x3 = secondLine[0][0];\n  const y3 = secondLine[0][1];\n  const x4 = secondLine[1][0];\n  const y4 = secondLine[1][1];\n\n  const denominator = (x1 - x2) * (y3 - y4) - (y1 - y2) * (x3 - x4);\n  // if denominator is 0 then the lines are are coincident or parallel\n  if (Math.abs(denominator) < 0.000001) return undefined;\n\n  const pointX = ((x1 * y2 - y1 * x2) * (x3 - x4) - (x1 - x2) * (x3 * y4 - y3 * x4)) / denominator;\n  const pointY = ((x1 * y2 - y1 * x2) * (y3 - y4) - (y1 - y2) * (x3 * y4 - y3 * x4)) / denominator;\n\n  return [pointX, pointY];\n}\n\nexport function findTopLeftLonLat(latLngPoints) {\n  let topLat;\n  let leftmostLng;\n\n  latLngPoints.forEach((p) => {\n    if (topLat === undefined || p.lat > topLat) topLat = p.lat;\n    if (leftmostLng === undefined || p.lng < leftmostLng) leftmostLng = p.lng;\n  });\n\n  // returning these in LonLat order because OL wants that format for distance calcs\n  return [leftmostLng, topLat];\n}\n\nexport function setCartesianPointsForModelRelativeToOrigin(origin, model) {\n  const newPoints = cartesianPointsRelativeToOrigin(origin, model.latLngPoints);\n  model.setCartesianPoints(newPoints);\n}\n\nexport function cartesianPointsRelativeToOrigin(origin, latLngPoints, radius) {\n  return latLngPoints.map((latLng) => {\n    return cartesianPointRelativeTo(latLng.toLonLat, origin, radius);\n  });\n}\n\nexport function cartesianPointRelativeTo(pointLonLat, originLonLat, radius) {\n  const originLat = originLonLat[1];\n  const pointLon = pointLonLat[0];\n\n  const cornerLonLat = [pointLon, originLat];\n\n  const [pointSignLng, pointSignLat] = relativePosition(pointLonLat, originLonLat);\n  const pointX = pointSignLng * getDistance(originLonLat, cornerLonLat, radius) * METERS_TO_INCHES;\n  // flip sign on Y because we want to match BXR which has the NW corner as (0,0) and has Y increase\n  // as you go down\n  const pointY = -1 * (pointSignLat * getDistance(cornerLonLat, pointLonLat, radius) * METERS_TO_INCHES);\n\n  return CartesianPoint.create({ x: pointX, y: pointY });\n}\n\nexport function globalCartesianOffset(latLngPoints, globalOriginLat, globalOriginLng) {\n  const latLngObjects = latLngPoints.map(([lat, lng]) => new SimpleLatLng(lat, lng));\n  const topLeftLonLat = findTopLeftLonLat(latLngObjects);\n  const delta = cartesianPointRelativeTo(topLeftLonLat, [globalOriginLng, globalOriginLat]);\n\n  return [delta.x, delta.y];\n}\n\nexport function cartesianToLatLng(positions, originLat, originLng) {\n  return positions.map((pos) => {\n    const distance = Math.hypot(pos.x, pos.y);\n    const bearing = Math.atan2(pos.x, pos.y);\n    const [lng, lat] = offsetOnSphere([originLng, originLat], distance, bearing, EARTH_RADIUS_EQUATORIAL_METERS);\n\n    return new SimpleLatLng(lat, lng);\n  });\n}\n\nexport function cartesianPointToLatLng(cartesianPoint, originLonLat, radius) {\n  const originLat = originLonLat[1];\n  const originLng = originLonLat[0];\n\n  const xMeters = cartesianPoint.x / METERS_TO_INCHES;\n  const yMeters = -cartesianPoint.y / METERS_TO_INCHES; // Y is flipped (negative going south)\n\n  const metersPerDegreeLat = radius ? (2 * Math.PI * radius) / 360 : METERS_PER_DEGREE_LAT;\n  const latOffset = yMeters / metersPerDegreeLat;\n  const metersPerDegreeLng = metersPerDegreeLat * Math.cos((originLat * Math.PI) / 180.0);\n  const lngOffset = xMeters / metersPerDegreeLng;\n\n  return new SimpleLatLng(originLat + latOffset, originLng + lngOffset);\n}\n", "// Turf buffer settings shared by the browser buffer builders and the server-side\n// obstruction geometry. steps: 2 is deliberately coarse; changing it changes every\n// persisted buffer ring in the app.\nexport const BUFFER_UNITS = \"feet\";\nexport const BUFFER_STEPS = 2;\n", "import { GeoJSON } from \"ol/format\";\nimport { featureCollection } from \"@turf/helpers\";\nimport buffer from \"@turf/buffer\";\nimport Feature from \"ol/Feature\";\n\nimport { isMultiPolygon } from \"../ol-helpers\";\nimport { buildClipperBufferFeatures } from \"./clipper-buffer\";\nimport { BUFFER_STEPS, BUFFER_UNITS } from \"./buffer-options.mjs\";\n\nexport default class BufferBuilder {\n  get smoothInwardCorners() {\n    return false;\n  }\n\n  translateOpenLayersFeaturesToTurf(feature) {\n    const projectionMap = this.#getProjectionMap;\n    const projectionTurf = this.#getProjectionTurf;\n\n    const format = new GeoJSON();\n\n    const collection = [];\n    collection.push(\n      format.writeFeatureObject(feature, {\n        dataProjection: projectionTurf,\n        featureProjection: projectionMap,\n      }),\n    );\n\n    return featureCollection(collection);\n  }\n\n  buildBufferFeatures(featuresCollection, size) {\n    if (this.smoothInwardCorners) {\n      const site = this.project.projectSite;\n      return buildClipperBufferFeatures(featuresCollection, size, [site.lng, site.lat]);\n    }\n\n    return this.buildTurfBufferFeatures(featuresCollection, size);\n  }\n\n  buildTurfBufferFeatures(featuresCollection, size) {\n    const result = [];\n    featuresCollection.features.forEach((feature) => {\n      const featureAsFeatureCollection = featureCollection([feature]);\n      const collectionOfSingleBufferedFeature = buffer(featureAsFeatureCollection, size, {\n        units: BUFFER_UNITS,\n        steps: BUFFER_STEPS,\n      });\n      result.push(collectionOfSingleBufferedFeature.features);\n    });\n\n    return featureCollection(result.flat());\n  }\n\n  translateTurfFeaturesToModels(features) {\n    const projectionMap = this.#getProjectionMap;\n    const projectionTurf = this.#getProjectionTurf;\n\n    const format = new GeoJSON();\n\n    // Some roof planes when combined with large setbacks may create multiple\n    // distinct buffered interior polygons. Those are returned as MultiPolygons.\n    const initialResult = format.readFeatures(features, {\n      dataProjection: projectionTurf,\n      featureProjection: projectionMap,\n    });\n\n    // This converts any MultiPolygons into separate simple polygons and flattens\n    // the collection\n    this.buildModelsFromTurfFeatures(initialResult);\n  }\n\n  mapMultiPolygon(feature) {\n    let polygonFeatures;\n    if (isMultiPolygon(feature)) {\n      const geometry = feature.getGeometry();\n\n      polygonFeatures = geometry.getPolygons().map((polygon) => {\n        return new Feature({ geometry: polygon });\n      });\n    } else {\n      polygonFeatures = [feature];\n    }\n\n    return polygonFeatures;\n  }\n\n  get #getProjectionMap() {\n    let projectionMap = \"EPSG:3857\";\n    const projection = this.map.getView().getProjection();\n    if (projection !== undefined) {\n      projectionMap = projection.getCode();\n    }\n    return projectionMap;\n  }\n\n  get #getProjectionTurf() {\n    return \"EPSG:4326\";\n  }\n}\n", "export function linkFeatureToModel(feature, model) {\n  feature.set(\"uuid\", model.uuid);\n  feature.set(\"dataType\", model.dataType);\n  feature.set(\"illegalShape\", model.illegalShape);\n  if (model.dataType === \"RoofSection\") {\n    feature.set(\"identifier\", model.displayIdentifier);\n    feature.set(\"roofPlaneUuid\", model.roofPlane.uuid);\n    feature.set(\"custom\", model.custom);\n    feature.set(\"encroaching\", model.encroaching);\n    feature.set(\"fresh\", model.fresh);\n    feature.set(\"cellsWithErrors\", model.cellsWithErrors);\n  } else {\n    feature.set(\"identifier\", model.identifier);\n  }\n}\n", "import { PROXIMITY_CUTOFF } from \"./geometry\";\n\n// true if the point is inside the polygon or on an edge\nexport function pointInOrOnPolygon(p, polygon) {\n  const testResult = pointRelativeToPolygon(p, polygon);\n\n  return testResult === true || testResult === 0;\n}\n\n// true if the point is inside the polygon and NOT on an edge\nexport function pointInPolygon(p, polygon) {\n  const testResult = pointRelativeToPolygon(p, polygon);\n\n  return testResult === true;\n}\n\n// true if the point is outside the polygon and NOT on an edge\nexport function pointOutsidePolygon(p, polygon) {\n  const testResult = pointRelativeToPolygon(p, polygon);\n\n  return testResult === false;\n}\n\n// https://github.com/rowanwins/point-in-polygon-hao\n/*\n  Returns\n    true - point is in Polygon\n    false - point is not inside Polygon\n    0 - point is on an edge\n*/\nexport function pointRelativeToPolygon(p, polygon) {\n  let i = 0; // which ring of the polygon you are testing\n  let ii = 0; // which point on the ring you are testing\n  let k = 0;\n  let determinant = 0;\n  let determinantNearZero = false;\n  let x1 = 0; // x coordinate of start of current line segment\n  let y1 = 0; // y coordinate of start of current line segment\n  let x2 = 0; // x coordinate of end of current line segment\n  let y2 = 0; // y coordinate of end of current line segment\n  let currentPoint = null;\n  let nextPoint = null;\n\n  const x = p[0]; // x coordinate of point being tested\n  const y = p[1]; // y coordinate of point being tested\n\n  const numContours = polygon.length;\n  for (i; i < numContours; i++) {\n    ii = 0;\n    const contourLen = polygon[i].length - 1;\n    const contour = polygon[i];\n\n    currentPoint = contour[0];\n    x1 = currentPoint[0] - x;\n    y1 = currentPoint[1] - y;\n\n    for (ii; ii < contourLen; ii++) {\n      nextPoint = contour[ii + 1];\n\n      y2 = nextPoint[1] - y;\n\n      if ((y1 < 0 && y2 < 0) || (y1 > 0 && y2 > 0)) {\n        // Line is either entirely below or entirely above point\n        currentPoint = nextPoint;\n        y1 = y2;\n        x1 = currentPoint[0] - x;\n        continue;\n      }\n\n      x2 = nextPoint[0] - x;\n      determinant = x1 * y2 - x2 * y1;\n      // NOTE: when you have an almost horizontal edge where one end is exactly\n      // at the some Y value as the point, the determinant collapses to just one\n      // of the two terms (since either y1 or y2 is 0). In that case, the other y\n      // can be very small and the determinant can become smaller than the cutoff.\n      // Making the cutoff smaller is problematic because it increases the tolerances\n      // for trying to create manual roof sections that are inside a roof plane.\n      // We left this \"as is\" and started the R1C1 cell offset 0.1\" down from the\n      // bounding box (in addition to the 0.1\" over it was already using)\n      determinantNearZero = Math.abs(determinant) < PROXIMITY_CUTOFF;\n\n      if (y2 > 0 && y1 <= 0) {\n        // lineEnd above point & lineStart equal or below point\n        if (determinantNearZero) return 0;\n        if (determinant > 0) k = k + 1;\n      } else if (y1 > 0 && y2 <= 0) {\n        // lineStart above point & lineEnd equal or below point\n        if (determinantNearZero) return 0;\n        if (determinant < 0) k = k + 1;\n      } else if (y2 === 0 && y1 < 0) {\n        // lineEnd same height as point & lineStart below\n        if (determinantNearZero) return 0;\n      } else if (y1 === 0 && y2 < 0) {\n        // lineStart same height as point & lineEnd below\n        if (determinantNearZero) return 0;\n      } else if (y1 === 0 && y2 === 0) {\n        // lineStart and lineEnd at the same height as point (e.g. horizontal line)\n        if (x2 <= 0 && x1 >= 0) {\n          // lineEnd is left of point and lineStart is at or right of point\n          return 0;\n        } else if (x1 <= 0 && x2 >= 0) {\n          // lineStart is left of point and lineEnd is at or right of point\n          return 0;\n        }\n      }\n\n      currentPoint = nextPoint;\n      y1 = y2;\n      x1 = x2;\n    }\n  }\n\n  if (k % 2 === 0) return false;\n  return true;\n}\n", "import { hasSameSlope, linesAreIntersectingAndDontOverlap } from \"../../../helpers/geometry\";\nimport { pointInPolygon } from \"../../../helpers/point-in-polygon\";\n\nexport function featureEdgesIntersect(feature, otherFeature) {\n  const coordinatesOfFeatureAsPoints = verticesFromFeatureToPoints(feature);\n  const coordinatesOfOtherFeatureAsPoints = verticesFromFeatureToPoints(otherFeature);\n\n  return polygonsAsPointListsIntersect(coordinatesOfFeatureAsPoints, coordinatesOfOtherFeatureAsPoints);\n}\n\nexport function polygonsAsPointListsIntersect(coordinatesOfFeatureAsPoints, coordinatesOfOtherFeatureAsPoints) {\n  for (let i = 0; i < coordinatesOfFeatureAsPoints.length - 1; i++) {\n    const p1 = coordinatesOfFeatureAsPoints[i];\n    const p2 = coordinatesOfFeatureAsPoints[i + 1];\n\n    for (let j = 0; j < coordinatesOfOtherFeatureAsPoints.length - 1; j++) {\n      const p3 = coordinatesOfOtherFeatureAsPoints[j];\n      const p4 = coordinatesOfOtherFeatureAsPoints[j + 1];\n\n      const parallel = hasSameSlope(p1, p2, p3, p4);\n      if (!parallel && linesAreIntersectingAndDontOverlap(p1, p2, p3, p4)) {\n        // console.log(\"Intersection found\");\n        // console.log(\"Feature\", coordinatesOfFeatureAsPoints);\n        // console.log(\"Other\", coordinatesOfOtherFeatureAsPoints);\n\n        // console.log(`Line 1 (${p1[0]}, ${p1[1]})-(${p2[0]}, ${p2[1]})`);\n        // console.log(`Line 2 (${p3[0]}, ${p3[1]})-(${p4[0]}, ${p4[1]})`);\n        return true;\n      }\n    }\n  }\n\n  return false;\n}\n\nexport function markIllegalIfFeatureHasPointsInsideFeature(feature, otherFeature) {\n  return checkAndMarkIllegalIfFeatureHasPointsInsideFeature(feature, otherFeature, true);\n}\n\nexport function checkIfFeatureHasPointsInsideFeature(feature, otherFeature) {\n  return checkAndMarkIllegalIfFeatureHasPointsInsideFeature(feature, otherFeature, false);\n}\n\nexport function markIllegalIfFeatureHasPointsInsideFeatureIncludingInteriorPoint(feature, otherFeature) {\n  const isIllegal = checkIfFeatureHasPointsInsideFeatureIncludingInteriorPoint(feature, otherFeature);\n  if (isIllegal) feature.set(\"illegalShape\", true);\n  return isIllegal;\n}\n\nexport function checkIfFeatureHasPointsInsideFeatureIncludingInteriorPoint(feature, otherFeature) {\n  const hasInteriorPointInside = checkIfFeatureHasInteriorPointInsideFeature(feature, otherFeature);\n  if (hasInteriorPointInside) return true;\n  return checkIfFeatureHasPointsInsideFeature(feature, otherFeature);\n}\n\nexport function checkIfFeatureHasInteriorPointInsideFeature(feature, otherFeature) {\n  const internalPointCoordinate = feature.getGeometry().getInteriorPoint().getCoordinates();\n  const otherFeatureCoordinates = verticesFromFeatureToPoints(otherFeature);\n  const isInside = pointInPolygon(internalPointCoordinate, [otherFeatureCoordinates]);\n  return isInside;\n}\n\nfunction checkAndMarkIllegalIfFeatureHasPointsInsideFeature(feature, otherFeature, markFeatures) {\n  const featureVertices = verticesFromFeatureToPoints(feature);\n  const featureVerticesPlusNearbyPoints = verticesPlusNearbyPointsFromFeature(feature);\n  const otherFeatureVertices = verticesFromFeatureToPoints(otherFeature);\n  const otherFeatureVerticesPlusNearbyPoints = verticesPlusNearbyPointsFromFeature(otherFeature);\n\n  const check1 = checkPointSetAgainstPolygonVertices(\n    feature,\n    featureVerticesPlusNearbyPoints,\n    otherFeatureVertices,\n    markFeatures,\n  );\n  const check2 = checkPointSetAgainstPolygonVertices(\n    otherFeature,\n    otherFeatureVerticesPlusNearbyPoints,\n    featureVertices,\n    markFeatures,\n  );\n\n  return check1 || check2;\n}\n\nexport function checkPointSetAgainstPolygonVertices(\n  feature,\n  featureVerticesPlusNearbyPoints,\n  otherFeatureVertices,\n  markFeatures,\n) {\n  // console.log(\"Calling checkPointSetAgainstPolygonVertices\");\n  return featureVerticesPlusNearbyPoints.some((vertex) => {\n    const vertexInOtherFeature = pointInPolygon(vertex, [otherFeatureVertices]);\n    if (vertexInOtherFeature) {\n      // console.log(\"Checking if vertex:\", vertex, \"is inside\", otherFeatureVertices);\n      // console.log(\"Result\", vertexInOtherFeature);\n      if (markFeatures) {\n        feature.set(\"illegalShape\", true);\n      }\n      return true;\n    }\n    return false;\n  });\n}\n\nexport function verticesFromFeatureToPoints(feature) {\n  const geometry = feature.getGeometry();\n  const coordinates = geometry.getLinearRing(0).getCoordinates();\n\n  return coordinates.map((c) => [c[0], c[1]]);\n}\n\nexport function verticesPlusNearbyPointsFromFeature(feature) {\n  const coordinates = verticesFromFeatureToPoints(feature);\n\n  const result = [];\n\n  for (let i = 0; i < coordinates.length - 1; i++) {\n    const p1 = coordinates[i];\n    const p2 = coordinates[i + 1];\n\n    const vectorBetweenPoints = [p2[0] - p1[0], p2[1] - p1[1]];\n    const scaledVectorBetweenPoints = [0.01 * vectorBetweenPoints[0], 0.01 * vectorBetweenPoints[1]];\n\n    const nearbyP1 = [p1[0] + scaledVectorBetweenPoints[0], p1[1] + scaledVectorBetweenPoints[1]];\n    const nearbyP2 = [p2[0] - scaledVectorBetweenPoints[0], p2[1] - scaledVectorBetweenPoints[1]];\n\n    result.push(p1);\n    result.push(nearbyP1);\n    result.push(nearbyP2);\n  }\n\n  return result;\n}\n", "import { polygon } from \"@turf/helpers\";\nimport BufferBuilder from \"./buffer-builder\";\n\nexport default class FeatureExpander extends BufferBuilder {\n  constructor(map, feature, outset) {\n    super();\n\n    this.map = map;\n    this.feature = feature;\n    this.outset = outset;\n  }\n\n  expand() {\n    const translatedFeaturesCollection = this.translateOpenLayersFeaturesToTurf(this.feature);\n    const bufferedFeatures = this.buildBufferFeatures(translatedFeaturesCollection, this.outset);\n    this.translateTurfFeaturesToModels(bufferedFeatures);\n  }\n\n  buildModelsFromTurfFeatures(featuresFromBuffering) {\n    this.expandedFeatures = [];\n    featuresFromBuffering.forEach((feature) => {\n      const polygonFeatures = this.mapMultiPolygon(feature);\n      polygonFeatures.forEach((polygonFeature) => {\n        this.expandedFeatures.push(polygonFeature);\n      });\n    });\n  }\n\n  get expandedFeature() {\n    return this.expandedFeatures[0];\n  }\n}\n", "import { featureEdgesIntersect, markIllegalIfFeatureHasPointsInsideFeature } from \"./polygon-helpers\";\nimport { pointOutsidePolygon, pointInPolygon } from \"../../../helpers/point-in-polygon\";\nimport FeatureExpander from \"../buffering/feature-expander\";\n\nexport default class RoofSectionLegalityChecker {\n  constructor(roofPlaneFeature, roofSectionsFeatures, mapModelSynchronizer) {\n    this.roofPlaneFeature = roofPlaneFeature;\n    this.roofSectionsFeatures = roofSectionsFeatures;\n    this.mapModelSynchronizer = mapModelSynchronizer;\n\n    this.roofPlane = mapModelSynchronizer.getRoofPlaneForFeature(roofPlaneFeature);\n    this.collectDefaultRoofSectionsFeatures();\n  }\n\n  markIllegalPolygons(justCompletedFeature = undefined) {\n    let features = this.siblingRoofSections();\n    if (justCompletedFeature) {\n      features = [...features, justCompletedFeature];\n    }\n\n    this.cleanLegalityFlags(features);\n\n    for (let i = 0; i < features.length; i++) {\n      const feature = features[i];\n\n      // if roof section is default, then can't be illegal or encroaching\n      if (!feature.get(\"custom\")) continue;\n\n      // if it has any vertices outside of it's roof plane\n      const hasVertexOutsideOfRoofPlane = this.roofSectionOutsideOfRoofPlane(feature);\n      if (hasVertexOutsideOfRoofPlane) {\n        feature.set(\"illegalShape\", true);\n      }\n\n      // If feature edges intersect other edges of same feature, it should be illegal\n      if (featureEdgesIntersect(feature, feature)) {\n        feature.set(\"illegalShape\", true);\n      }\n\n      this.checkAgainstSiblingRoofSections(feature, features);\n      if (!hasVertexOutsideOfRoofPlane) {\n        // if it has any vertices outside of the roof plane, then it's illegal, not encroaching\n        this.checkForEncroachment(feature);\n      }\n    }\n\n    this.saveIllegalityIntoModels(justCompletedFeature);\n  }\n\n  collectDefaultRoofSectionsFeatures() {\n    this.defaultRoofSectionsFeatures = this.roofPlane.defaultRoofSections.map((drs) => {\n      if (drs.active) {\n        return this.mapModelSynchronizer.getFeatureForRoofSection(drs);\n      } else {\n        // inactive default roof sections aren't shown, so they don't have features\n        // this creates a feature, but doesn't add it to any vector source\n        return this.mapModelSynchronizer.createFeatureForModel(drs);\n      }\n    });\n  }\n\n  checkAgainstSiblingRoofSections(feature, features) {\n    for (let j = 0; j < features.length; j++) {\n      const otherFeature = features[j];\n\n      if (feature.get(\"uuid\") === otherFeature.get(\"uuid\")) continue;\n\n      // it has an edge that intersects the edge of another active roof section\n      // it has 1+ vertices that are inside another active roof section\n      if (featureEdgesIntersect(feature, otherFeature)) {\n        feature.set(\"illegalShape\", true);\n        otherFeature.set(\"illegalShape\", true);\n      } else {\n        markIllegalIfFeatureHasPointsInsideFeature(feature, otherFeature);\n      }\n    }\n  }\n\n  checkForEncroachment(feature) {\n    this.expandDefaultRoofSections();\n\n    if (\n      this.encroachmentAnyVertexOutsideOfAllDefaultRoofSections(feature) ||\n      this.encroachmentAnyDefaultRoofSectionIntersection(feature) ||\n      this.encroachmentAnyDefaultRoofSectionVertexInsideFeature(feature)\n    ) {\n      feature.set(\"encroaching\", true);\n    }\n  }\n\n  // When OL buffers an inward pointing corner, it creates vertices that are marginally out\n  // of alignment with the incoming / outgoing edges. This was causing custom roof sections\n  // that followed the guidelines to intersect and show encroachment. To avoid that, we'll\n  // expand the default roof section by 0.001 feet and check the custom roof section against\n  // that polygon (which is slightly closer to the roof plane and creates something marginally\n  // smaller than the setback)\n  expandDefaultRoofSections() {\n    this.expandedDefaultRoofSectionFeatures = this.defaultRoofSectionsFeatures.map((drsf) => {\n      return this.expandedDefaultRoofSection(drsf);\n    });\n  }\n\n  expandedDefaultRoofSection(defaultRoofSectionFeature) {\n    const outset = 0.001; // 0.001 ft = 0.012 inches\n    const featureExpander = new FeatureExpander(\n      this.mapModelSynchronizer.controller.mapManager.map,\n      defaultRoofSectionFeature,\n      outset,\n    );\n    featureExpander.expand();\n    return featureExpander.expandedFeature;\n  }\n\n  encroachmentAnyVertexOutsideOfAllDefaultRoofSections(feature) {\n    console.log(\"encroachmentAnyVertexOutsideOfAllDefaultRoofSections\");\n    const geometry = feature.getGeometry();\n    const coordinates = geometry.getLinearRing(0).getCoordinates();\n\n    return coordinates.some((c) => {\n      return this.expandedDefaultRoofSectionFeatures.every((drsf) => {\n        return this.vertexOutsideOfRoofSection(c, drsf);\n      });\n    });\n  }\n\n  encroachmentAnyDefaultRoofSectionIntersection(feature) {\n    console.log(\"encroachmentAnyDefaultRoofSectionIntersection\");\n    return this.expandedDefaultRoofSectionFeatures.some((drsf) => {\n      return featureEdgesIntersect(feature, drsf);\n    });\n  }\n\n  encroachmentAnyDefaultRoofSectionVertexInsideFeature(feature) {\n    console.log(\"encroachmentAnyDefaultRoofSectionVertexInsideFeature\");\n    return this.expandedDefaultRoofSectionFeatures.some((drsf) => {\n      const drsfGeometry = drsf.getGeometry();\n      const coordinates = drsfGeometry.getCoordinates()[0];\n\n      return coordinates.some((c) => {\n        return this.vertexInsideOfRoofSection(c, feature);\n      });\n    });\n  }\n\n  siblingRoofSections() {\n    return this.roofSectionsFeatures.filter((rs) => {\n      return rs.get(\"roofPlaneUuid\") === this.roofPlane.uuid;\n    });\n  }\n\n  cleanLegalityFlags(features) {\n    features.forEach((feature) => {\n      feature.set(\"illegalShape\", false);\n      feature.set(\"encroaching\", false);\n    });\n  }\n\n  roofSectionOutsideOfRoofPlane(feature) {\n    return featureEdgesIntersect(feature, this.roofPlaneFeature) || this.firstVertexOutsideOfPolygon(feature);\n  }\n\n  vertexOutsideOfRoofSection(vertex, feature) {\n    const featurePolygon = feature.getGeometry().getCoordinates();\n    const isOutsideFeature = pointOutsidePolygon(vertex, featurePolygon);\n\n    return isOutsideFeature;\n  }\n\n  vertexInsideOfRoofSection(vertex, feature) {\n    const featurePolygon = feature.getGeometry().getCoordinates();\n    const isInsideFeature = pointInPolygon(vertex, featurePolygon);\n\n    return isInsideFeature;\n  }\n\n  firstVertexOutsideOfPolygon(feature) {\n    const coordinates = feature.getGeometry().getLinearRing(0).getCoordinates();\n    const firstVertex = coordinates[0];\n    const roofPlanePolygon = this.roofPlaneFeature.getGeometry().getCoordinates();\n    const isOutsideRoofPlane = pointOutsidePolygon(firstVertex, roofPlanePolygon);\n\n    return isOutsideRoofPlane;\n  }\n\n  saveIllegalityIntoModels(justCompletedFeature) {\n    const extraFeatures = justCompletedFeature ? [justCompletedFeature] : undefined;\n    this.mapModelSynchronizer.updateAllRoofSectionsIllegalityFromFeature(extraFeatures);\n  }\n}\n", "// Two polygons are coincident if they occupy the same position and shape \u2014\n// i.e. they have the same vertices up to winding order and starting vertex.\nexport function polygonsAreCoincident(featureA, featureB, epsilon = 1.0e-6) {\n  const ringA = ringFromFeature(featureA);\n  const ringB = ringFromFeature(featureB);\n  if (ringA.length !== ringB.length) return false;\n\n  const normalizedA = normalizeRing(ringA, true);\n  const normalizedB = normalizeRing(ringB, true);\n  if (ringsEqual(normalizedA, normalizedB, epsilon)) return true;\n\n  const normalizedBReverse = normalizeRing(ringB, false);\n  return ringsEqual(normalizedA, normalizedBReverse, epsilon);\n}\n\nfunction ringFromFeature(feature) {\n  const geometry = feature.getGeometry();\n  const coordinates = geometry.getLinearRing(0).getCoordinates();\n  const ring = coordinates.map((c) => [c[0], c[1]]);\n\n  const first = ring[0];\n  const last = ring[ring.length - 1];\n  if (first[0] === last[0] && first[1] === last[1]) {\n    ring.pop();\n  }\n  return ring;\n}\n\nfunction normalizeRing(ring, clockwise) {\n  const area = signedArea(ring);\n  const isClockwise = area < 0;\n  let result = ring.slice();\n\n  if (isClockwise !== clockwise) {\n    result = result.reverse();\n  }\n\n  const startIdx = lexicographicIndex(result);\n  return result.slice(startIdx).concat(result.slice(0, startIdx));\n}\n\nfunction signedArea(ring) {\n  let sum = 0;\n  for (let i = 0; i < ring.length; i++) {\n    const [x1, y1] = ring[i];\n    const [x2, y2] = ring[(i + 1) % ring.length];\n    sum += x1 * y2 - x2 * y1;\n  }\n  return sum / 2;\n}\n\nfunction lexicographicIndex(ring) {\n  let minIdx = 0;\n  for (let i = 1; i < ring.length; i++) {\n    const [x, y] = ring[i];\n    const [mx, my] = ring[minIdx];\n    if (x < mx || (x === mx && y < my)) minIdx = i;\n  }\n  return minIdx;\n}\n\nfunction ringsEqual(ringA, ringB, epsilon) {\n  if (ringA.length !== ringB.length) return false;\n  for (let i = 0; i < ringA.length; i++) {\n    const [x1, y1] = ringA[i];\n    const [x2, y2] = ringB[i];\n    if (Math.abs(x1 - x2) > epsilon || Math.abs(y1 - y2) > epsilon) return false;\n  }\n  return true;\n}\n", "import BufferBuilder from \"./buffering/buffer-builder\";\nimport { linkFeatureToModel } from \"./modification-helpers/base\";\nimport RoofSectionLegalityChecker from \"./legality-checkers/roof-section\";\n\nimport { polygonsAreCoincident } from \"../../helpers/polygon-coincident\";\nimport { featureEdgesIntersect, checkIfFeatureHasPointsInsideFeature } from \"./legality-checkers/polygon-helpers\";\n\nexport default class DefaultRoofSectionsBuilder extends BufferBuilder {\n  constructor(controller, map, roofPlaneFeatures, roofPlaneWithPriorLayout) {\n    super();\n\n    this.controller = controller;\n    this.map = map;\n    this.roofPlaneFeatures = roofPlaneFeatures;\n    // only used by BX will be undefined when called from PR or BX contexts other than\n    // modifying an existing roof plane\n    this.roofPlaneWithPriorLayout = roofPlaneWithPriorLayout;\n\n    this.project = controller.project;\n    this.mapModelSynchronizer = controller.mapModelSynchronizer;\n\n    this.buildDefaultRoofSectionsForNewRoofPlanes();\n  }\n\n  buildDefaultRoofSectionsForNewRoofPlanes() {\n    this.project.roofPlanes.forEach((roofPlane) => {\n      if (roofPlane.deleted) return;\n      if (roofPlane.hasDefaultRoofSections) return;\n      if (isNaN(roofPlane.setback) || roofPlane.setback < 0.0) return;\n      if (!roofPlane.display) return;\n\n      this.buildDefaultRoofSectionsForRoofPlane(roofPlane);\n      this.postBuildDaSpecificActions(roofPlane);\n      this.controller.markDirty();\n    });\n  }\n\n  rebuildRoofSectionsForRoofPlane(roofPlane) {\n    this.controller.mapManager.roofSectionsFeatures.forEach((rsf) => {\n      this.controller.mapManager.roofSectionsVectorSource.removeFeature(rsf);\n    });\n    roofPlane.clearRoofSections();\n    this.buildDefaultRoofSectionsForRoofPlane(roofPlane);\n  }\n\n  // override in sub-class if you have anything to do after building the defaults for a roofPlane\n  postBuildDaSpecificActions(roofPlane) {}\n\n  buildDefaultRoofSectionsForRoofPlane(roofPlane) {\n    const matchingRoofPlaneFeature = this.roofPlaneFeatures.find((feature) => {\n      return feature.get(\"uuid\") === roofPlane.uuid;\n    });\n\n    if (!matchingRoofPlaneFeature) {\n      debugger;\n    }\n\n    const inset = -1 * roofPlane.setback;\n\n    const translatedFeaturesCollection = this.translateOpenLayersFeaturesToTurf(matchingRoofPlaneFeature);\n    const bufferedFeatures = this.buildBufferFeatures(translatedFeaturesCollection, inset);\n    this.translateTurfFeaturesToModels(bufferedFeatures);\n\n    // check the custom roof sections for the roof plane incase they encroach into the new setback\n    new RoofSectionLegalityChecker(\n      matchingRoofPlaneFeature,\n      this.controller.mapManager.roofSectionsFeatures,\n      this.mapModelSynchronizer,\n    ).markIllegalPolygons();\n  }\n\n  buildModelsFromTurfFeatures(featuresFromBuffering) {\n    return featuresFromBuffering.flatMap((feature) => {\n      const roofPlaneUuid = feature.get(\"uuid\");\n      const roofPlane = this.project.getRoofPlane(roofPlaneUuid);\n\n      const polygonFeatures = this.mapMultiPolygon(feature);\n\n      this.doNotTransferPriorLayoutIfRoofPlaneNowHasMultipleRoofSections(roofPlane, polygonFeatures);\n\n      polygonFeatures.forEach((polygonFeature) => {\n        const activityForNewDefaultRoofSection = this.doesNotOverlapAnyCustomRoofSections(roofPlane, polygonFeature);\n\n        const roofSection = roofPlane.addRoofSection({ custom: false, active: activityForNewDefaultRoofSection });\n\n        const latLngPoints = this.mapModelSynchronizer.latLngPointsFromFeature(polygonFeature);\n        roofSection.setLatLngPoints(latLngPoints);\n        if (roofSection.setDefaultLatLngPoints) roofSection.setDefaultLatLngPoints(latLngPoints);\n\n        if (activityForNewDefaultRoofSection) {\n          this.addRoofSectionPolygonFeatureToMap(polygonFeature, roofSection);\n        }\n      });\n    });\n  }\n\n  // If the roof plane now has multiple roof sections we don't know which one the old layout should go into\n  doNotTransferPriorLayoutIfRoofPlaneNowHasMultipleRoofSections(roofPlane, polygonFeatures) {\n    if (!this.roofPlaneWithPriorLayout) return;\n    if (this.roofPlaneWithPriorLayout.uuid !== roofPlane.uuid) return;\n    if (polygonFeatures.length < 2) return;\n\n    this.roofPlaneWithPriorLayout = undefined;\n  }\n\n  addRoofSectionPolygonFeatureToMap(polygonFeature, roofSection) {\n    linkFeatureToModel(polygonFeature, roofSection);\n    this.controller.mapManager.roofSectionsVectorSource.addFeature(polygonFeature);\n  }\n\n  doesNotOverlapAnyCustomRoofSections(roofPlane, polygonFeature) {\n    if (!roofPlane.hasCustomRoofSections) return true;\n\n    for (let i = 0; i < roofPlane.customRoofSections.length; i++) {\n      const roofSection = roofPlane.customRoofSections[i];\n      const roofSectionFeature = this.mapModelSynchronizer.getFeatureForRoofSection(roofSection);\n\n      if (this.newDefaultOverlapsExistingFeature(polygonFeature, roofSectionFeature)) return false;\n    }\n\n    return true;\n  }\n\n  newDefaultOverlapsExistingFeature(polygonFeature, roofSectionFeature) {\n    const edgeIntersection = featureEdgesIntersect(polygonFeature, roofSectionFeature);\n    const pointsInside = checkIfFeatureHasPointsInsideFeature(polygonFeature, roofSectionFeature);\n    // Coincident roof sections can occur when a Helioscope import creates a custom roof section\n    // and DA buffering subsequently generates a default roof section with the same geometry.\n    // This happens when our computed setback precisely matches Helioscope's \u2014 a closer match\n    // made possible by using Clipper for buffering and the equatorial earth radius when converting\n    // Helioscope's x/y coordinates to lat/lng.\n    const coincident = polygonsAreCoincident(polygonFeature, roofSectionFeature);\n\n    return edgeIntersection || pointsInside || coincident;\n  }\n}\n", "import BaseEvent from \"ol/events/Event\";\n\nexport const BEFORE_MAP_FEATURES_RENDERING_EVENT = \"beforeMapFeaturesRendering\";\nexport const AFTER_MAP_FEATURES_RENDERING_EVENT = \"afterMapFeaturesRendering\";\n\nexport function dispatchBeforeMapFeaturesRendering(map, eventOptions = {}) {\n  const event = new BaseEvent(BEFORE_MAP_FEATURES_RENDERING_EVENT);\n\n  Object.keys(eventOptions).forEach((key) => {\n    event[key] = eventOptions[key];\n  });\n\n  map.dispatchEvent(event);\n}\n\nexport function dispatchAfterMapFeaturesRendering(map, eventOptions = {}) {\n  const event = new BaseEvent(AFTER_MAP_FEATURES_RENDERING_EVENT);\n\n  Object.keys(eventOptions).forEach((key) => {\n    event[key] = eventOptions[key];\n  });\n\n  map.dispatchEvent(event);\n}\n", "import { Map, View } from \"ol\";\nimport VectorLayer from \"ol/layer/Vector\";\nimport VectorSource from \"ol/source/Vector\";\nimport { fromLonLat, getPointResolution, toLonLat } from \"ol/proj\";\nimport { defaults as interactionDefaults } from \"ol/interaction\";\nimport MouseWheelZoom from \"ol/interaction/MouseWheelZoom\";\nimport Point from \"ol/geom/Point\";\nimport Feature from \"ol/Feature\";\n\nimport { roofSectionsStyle } from \"./styles/roof-sections\";\nimport { roofPlaneStyle } from \"./styles/roof-planes\";\nimport { measureDrawStyle } from \"./styles/measures\";\nimport { visualMarkerStyle } from \"./styles/visual-markers\";\nimport { shapeGuideLinesStyle } from \"./styles/shape-guide-lines\";\nimport { setbacksStyle } from \"./styles/setbacks\";\nimport {\n  ROOF_PLANE_DATA_TYPE,\n  ROOF_SECTION_DATA_TYPE,\n  MEASURE_DATA_TYPE,\n  SHAPE_GUIDE_LINE_DATA_TYPE,\n  SETBACK_DATA_TYPE,\n  VISUAL_MARKER_DATA_TYPE,\n  GUIDE_LINE_DATA_TYPE,\n  GUIDE_LINES_INTERSECTION_CIRCLE_DATA_TYPE,\n  BUILDING_IMAGE_PLACEMENT_DATA_TYPE,\n} from \"./data-types\";\nimport { isARoofPlane, isARoofSection, isAnObstruction } from \"./ol-helpers\";\nimport DefaultRoofSectionsBuilder from \"./default-roof-sections-builder\";\nimport * as events from \"./events\";\nimport { debounce } from \"lodash\";\nimport { guideLinesIntersectionCirclesStyle, guideLinesStyle } from \"../../pr/map/styles/guide-lines\";\nimport TileLayerFactory from \"./tile-layers-factory\";\nimport { logger } from \"../../helpers/app\";\n\nexport default class MapManager {\n  constructor(controller) {\n    this.controller = controller;\n\n    this.bingApiKey = controller.bingApiKey;\n    this.azureApiKey = controller.azureApiKey;\n    this.openLayersTileProvider = controller.openLayersTileProvider;\n    this.project = controller.project;\n    this.mapModelSynchronizer = controller.mapModelSynchronizer;\n    this.saveEditorLocation = this.mapModelSynchronizer.saveEditorLocation;\n    this.setProjectSiteValuesOnMoveEnd = true;\n\n    this.compassTarget = controller.compassTarget;\n\n    const rotationKey = controller.isViewerPage ? \"viewerRotation\" : \"editorRotation\";\n    this.rotateCompassTo(this.project.projectSite[rotationKey]);\n\n    window.map = this.map; // for dev/debug purposes\n\n    this.dispatchAfterMapFeaturesRendering = debounce(this.dispatchAfterMapFeaturesRendering, 50);\n\n    this.buildingImagePlacementLayers = [];\n    this.buildingImagePlacementFeatures = [];\n\n    // The shape guide line interaction manager will be initialized after the map manager is initialized\n    // so we need to keep track of the features that need to have shape guide lines rendered for them\n    // until the shape guide line interaction manager is initialized\n    this.featuresToRenderShapeGuideLinesFor = [];\n  }\n\n  dispatchBeforeMapFeaturesRendering(eventOptions = {}) {\n    events.dispatchBeforeMapFeaturesRendering(this.map, eventOptions);\n  }\n\n  dispatchAfterMapFeaturesRendering(eventOptions = {}) {\n    events.dispatchAfterMapFeaturesRendering(this.map, eventOptions);\n  }\n\n  buildMap(overrides) {\n    const defaults = {\n      target: this.controller.mapTarget,\n      layers: [this.tileLayer],\n      view: this.mapView,\n      controls: [], // Controls initially added to the map. If not specified, module:ol/control~defaults is used.\n      interactions: interactionDefaults({ doubleClickZoom: false }), // turning off double click zoom (it's awkward with drawing)\n    };\n    const map = new Map({ ...defaults, ...overrides });\n\n    map.on(\"rendercomplete\", (_event) => {\n      document.body.dataset.screenshotReady = \"true\";\n      if (this.controller.shapeGuideLinesInteractionManager && this.featuresToRenderShapeGuideLinesFor.length > 0) {\n        this.shapeGuideLinesCall(\"add\", this.featuresToRenderShapeGuideLinesFor, \"map rendercomplete\");\n        this.featuresToRenderShapeGuideLinesFor = [];\n      }\n    });\n\n    return map;\n  }\n\n  addMouseWheelZoomInteraction() {\n    if (this.scrollWheelInteractionAdded) return;\n\n    this.map.addInteraction(new MouseWheelZoom());\n    this.scrollWheelInteractionAdded = true;\n  }\n\n  get mapView() {\n    const { projectSite } = this.project;\n\n    if (this.controller.isViewerPage) {\n      return new View({\n        constrainRotation: false, // Remove snapping around 0 degrees (makes rotation behave funky)\n        center: fromLonLat([projectSite.effectiveViewerLng, projectSite.effectiveViewerLat]),\n        zoom: projectSite.effectiveViewerZoom,\n        rotation: projectSite.effectiveViewerRotation,\n      });\n    } else {\n      return new View({\n        constrainRotation: false, // Remove snapping around 0 degrees (makes rotation behave funky)\n        center: fromLonLat([projectSite.effectiveEditorLng, projectSite.effectiveEditorLat]),\n        zoom: projectSite.effectiveEditorZoom,\n        rotation: projectSite.effectiveEditorRotation,\n      });\n    }\n  }\n\n  get tileLayer() {\n    const provider = this.openLayersTileProvider;\n    const apiKey = this.openLayersTileProvider === \"bing\" ? this.bingApiKey : this.azureApiKey;\n    const factory = new TileLayerFactory(provider, apiKey);\n    return factory.tileLayer;\n  }\n\n  buildRoofPlanesVectorSource() {\n    this.roofPlanesVectorSource = new VectorSource();\n    this.roofPlanesVectorSource.on(\"addfeature\", this.autoDeleteFlaggedFeatures);\n    this.roofPlanesVectorSource.on(\"addfeature\", (event) => {\n      this.shapeGuideLinesCall(\"add\", event.feature, \"roofPlanesVectorSource addfeature\");\n    });\n    this.roofPlanesVectorSource.on(\"removefeature\", (event) => {\n      this.shapeGuideLinesCall(\"remove\", event.feature, \"roofPlanesVectorSource removefeature\");\n    });\n\n    const features = this.mapModelSynchronizer.featuresForDisplayableRoofPlanes();\n    if (this.controller.settings.showShapeGuideLinesAlways) this.featuresToRenderShapeGuideLinesFor.push(...features);\n    this.roofPlanesVectorSource.addFeatures(features);\n  }\n\n  get showShapeGuideLinesForRenderedPolygons() {\n    return this.controller.shapeGuideLinesInteractionManager && this.controller.settings.showShapeGuideLinesAlways;\n  }\n\n  shapeGuideLinesCall(method, features, from) {\n    if (!this.showShapeGuideLinesForRenderedPolygons) return;\n\n    this.controller.shapeGuideLinesInteractionManager[method](features, `render ${from}`);\n  }\n\n  // The vector layer for roof plane drawing, which uses the vector source for roof section data\n  get roofPlanesVectorLayer() {\n    if (!this.memoRoofPlaneVectorLayer) {\n      this.memoRoofPlaneVectorLayer = new VectorLayer({\n        source: this.roofPlanesVectorSource,\n        style: (feature) => roofPlaneStyle(feature, this.controller, this.project),\n        zIndex: 10,\n      });\n      this.memoRoofPlaneVectorLayer.set(\"dataType\", ROOF_PLANE_DATA_TYPE);\n    }\n    return this.memoRoofPlaneVectorLayer;\n  }\n\n  clearRoofPlaneFeatures() {\n    this.roofPlanesVectorSource.clear();\n  }\n\n  renderRoofPlaneFeatures() {\n    const features = this.mapModelSynchronizer.featuresForDisplayableRoofPlanes();\n    this.roofPlanesVectorSource.addFeatures(features);\n  }\n\n  // Data for the roof section vector layer, contains roof section polygon data\n  buildRoofSectionsVectorSource() {\n    this.roofSectionsVectorSource = new VectorSource();\n    this.roofSectionsVectorSource.on(\"addfeature\", this.autoDeleteFlaggedFeatures);\n    this.roofSectionsVectorSource.on(\"addfeature\", (event) => {\n      this.shapeGuideLinesCall(\"add\", event.feature, \"roofSectionsVectorSource addfeature\");\n    });\n    this.roofSectionsVectorSource.on(\"removefeature\", (event) => {\n      this.shapeGuideLinesCall(\"remove\", event.feature, \"roofSectionsVectorSource removefeature\");\n    });\n\n    const features = this.mapModelSynchronizer.featuresForDisplayableRoofSections();\n    if (this.controller.settings.showShapeGuideLinesAlways) this.featuresToRenderShapeGuideLinesFor.push(...features);\n    this.roofSectionsVectorSource.addFeatures(features);\n  }\n\n  renderRoofSectionFeatures() {\n    const features = this.mapModelSynchronizer.featuresForDisplayableRoofSections();\n    this.roofSectionsVectorSource.addFeatures(features);\n  }\n\n  autoDeleteFlaggedFeatures = (event) => {\n    const feature = event.feature;\n\n    if (feature.get(\"flaggedForAutoDeleteByVectorSource\")) {\n      if (isARoofPlane(feature)) {\n        this.roofPlanesVectorSource.removeFeature(feature);\n      } else if (isARoofSection(feature)) {\n        this.roofSectionsVectorSource.removeFeature(feature);\n      } else if (isAnObstruction(feature)) {\n        this.obstructionsVectorSource.removeFeature(feature);\n      } else {\n        console.error(\"Request to auto delete a feature, but don't know dataType\", feature);\n      }\n    }\n  };\n\n  // The vector layer for roof section drawing, which uses the vector source for roof section data\n  get roofSectionsVectorLayer() {\n    if (!this.memoRoofSectionsVectorLayer) {\n      this.memoRoofSectionsVectorLayer = new VectorLayer({\n        source: this.roofSectionsVectorSource,\n        style: (feature) => roofSectionsStyle(feature, this.controller, this.project),\n        zIndex: 30,\n      });\n      this.memoRoofSectionsVectorLayer.set(\"dataType\", ROOF_SECTION_DATA_TYPE);\n    }\n    return this.memoRoofSectionsVectorLayer;\n  }\n\n  clearRoofSectionFeatures() {\n    this.roofSectionsVectorSource.clear();\n  }\n\n  get roofSectionsFeatures() {\n    return this.roofSectionsVectorSource.getFeatures();\n  }\n\n  // The vector layer for setbacks drawing, which uses the vector source for setbacks data\n  get setbacksVectorLayer() {\n    if (!this.memoSetbacksVectorLayer) {\n      this.memoSetbacksVectorLayer = new VectorLayer({\n        source: this.setbacksVectorSource,\n        style: (feature) => setbacksStyle(feature),\n        zIndex: 20,\n      });\n      this.memoSetbacksVectorLayer.set(\"dataType\", SETBACK_DATA_TYPE);\n    }\n    return this.memoSetbacksVectorLayer;\n  }\n\n  buildNewDefaultRoofSectionsAndSetbacks() {\n    // have to add this after the map is created because we need the map to\n    // calculate the default roof sections\n    this.roofSectionsBuilder = new DefaultRoofSectionsBuilder(this.controller, this.map, this.roofPlanesFeatures);\n\n    // TODO: Optimization only add setbacks that are newly created for\n    //       newly constructed default roof sections.\n    this.updateSetbacksVectorSource();\n  }\n\n  // Data for the setbacks vector layer, contains setbacks polygon data\n  buildSetbacksVectorSource() {\n    this.setbacksVectorSource = new VectorSource({\n      features: this.mapModelSynchronizer.loadSetbacks(),\n    });\n  }\n\n  addSetbacksVectorLayer() {\n    this.map.addLayer(this.setbacksVectorLayer);\n  }\n\n  updateSetbacksVectorSource() {\n    this.buildSetbacksVectorSource();\n    this.setbacksVectorLayer.setSource(this.setbacksVectorSource);\n  }\n\n  addRoofSectionsAndSetbacksVectorLayers() {\n    this.map.addLayer(this.roofSectionsVectorLayer);\n    this.map.addLayer(this.setbacksVectorLayer);\n  }\n\n  buildMeasuresVectorSource() {\n    this.measuresVectorSource = new VectorSource();\n    this.measuresVectorSource.on(\"addfeature\", (event) => {\n      this.shapeGuideLinesCall(\"add\", event.feature, \"measuresVectorSource addfeature\");\n    });\n    this.measuresVectorSource.on(\"removefeature\", (event) => {\n      this.shapeGuideLinesCall(\"remove\", event.feature, \"measuresVectorSource removefeature\");\n    });\n  }\n\n  get measuresVectorLayer() {\n    if (!this.memoMeasuresVectorLayer) {\n      this.memoMeasuresVectorLayer = new VectorLayer({\n        source: this.measuresVectorSource,\n        style: (feature) => measureDrawStyle(feature, this.map),\n        zIndex: 100,\n      });\n      this.memoMeasuresVectorLayer.set(\"dataType\", MEASURE_DATA_TYPE);\n    }\n    return this.memoMeasuresVectorLayer;\n  }\n\n  addMeasuresVectorLayer() {\n    this.map.addLayer(this.measuresVectorLayer);\n  }\n\n  buildShapeGuideLinesVectorSource() {\n    this.shapeGuideLinesVectorSource = new VectorSource({});\n  }\n\n  get shapeGuideLinesVectorLayer() {\n    if (!this.memoShapeGuideLinesVectorLayer) {\n      this.memoShapeGuideLinesVectorLayer = new VectorLayer({\n        source: this.shapeGuideLinesVectorSource,\n        style: (feature) => shapeGuideLinesStyle(feature),\n        zIndex: 30,\n      });\n      this.memoShapeGuideLinesVectorLayer.set(\"dataType\", SHAPE_GUIDE_LINE_DATA_TYPE);\n    }\n    return this.memoShapeGuideLinesVectorLayer;\n  }\n\n  onMoveEnd = (event) => {\n    this.onMoveEndHandler(event);\n  };\n\n  onMoveEndHandler(event) {\n    // This gets called automatically when the map gets loaded for some reason\n    // TODO: figure out why this is happening\n    if (!this.firstMoveEnd) {\n      this.firstMoveEnd = true;\n      return false;\n    }\n\n    if (this.controller.skipNextMapMoveEndEvent) {\n      this.controller.skipNextMapMoveEndEvent = false;\n      return false;\n    }\n\n    this.updateShapeGuideLines();\n\n    if (this.setProjectSiteValuesOnMoveEnd) {\n      this.saveEditorLocation();\n      this.controller.markDirty();\n    }\n\n    return true;\n  }\n\n  get roofPlanesFeatures() {\n    return this.roofPlanesVectorSource.getFeatures();\n  }\n\n  // Useful for manually triggering a call of the style functions for all roof planes\n  forceRedrawRoofPlanes() {\n    this.forceRedrawFeatures(this.roofPlanesVectorSource);\n  }\n\n  forceRedrawObstructions() {\n    this.forceRedrawFeatures(this.obstructionsVectorSource);\n  }\n\n  forceRedrawRoofSections() {\n    this.forceRedrawFeatures(this.roofSectionsVectorSource);\n  }\n\n  forceRedrawSetbacks() {\n    this.forceRedrawFeatures(this.setbacksVectorSource);\n  }\n\n  forceRedrawMeasures() {\n    this.forceRedrawFeatures(this.measuresVectorSource);\n  }\n\n  forceRedrawFeatures(vectorSource) {\n    const features = vectorSource?.getFeatures() || [];\n    features.forEach((feature) => feature.dispatchEvent(\"change\"));\n  }\n\n  rotateBy(degrees) {\n    const radians = (degrees * Math.PI) / 180;\n    const view = this.map.getView();\n\n    const currentRotation = view.getRotation();\n    const newRotation = currentRotation + radians;\n\n    this.rotateTo(newRotation);\n  }\n\n  rotateTo(newRotation) {\n    const view = this.map.getView();\n    const startAngle = view.getRotation();\n\n    view.animate({ rotation: newRotation, duration: 100 });\n\n    this.rotateCompassTo(newRotation);\n    this.updateShapeGuideLines();\n    this.forceRedrawRoofPlanes();\n    this.forceRedrawRoofSections();\n    this.forceRedrawSetbacks();\n    this.forceRedrawMeasures();\n\n    this.rotateBuildingImagePlacementsAfterMapRotation(startAngle, newRotation);\n  }\n\n  rotateCompassTo(radians) {\n    const degrees = (radians * 180) / Math.PI;\n    this.compassTarget.style.transform = `rotate(${degrees}deg)`;\n    const compassMarkers = Array.from(this.compassTarget.querySelectorAll(\".ol-map__compass__marker\"));\n    compassMarkers.forEach((marker) => {\n      marker.style.transform = `rotate(${-degrees}deg)`;\n    });\n  }\n\n  setCenter(coordinate) {\n    const view = this.map.getView();\n    view.setCenter(coordinate);\n  }\n\n  zoomBy(amount) {\n    const newZoom = this.zoom + amount;\n    this.zoomTo(newZoom);\n  }\n\n  zoomTo(newZoom) {\n    const view = this.map.getView();\n\n    view.animate({ zoom: newZoom, duration: 50 });\n    this.updateShapeGuideLines();\n  }\n\n  setZoomRotationAndPosition(zoom, rotation, coordinate) {\n    const view = this.map.getView();\n    view.setZoom(zoom);\n    view.setRotation(rotation);\n    view.setCenter(coordinate);\n  }\n\n  updateShapeGuideLines() {\n    if (this.controller.shapeGuideLinesInteractionManager) {\n      setTimeout(this.controller.shapeGuideLinesInteractionManager.onMapChange, 500);\n    }\n  }\n\n  get zoom() {\n    return this.map.getView().getZoom();\n  }\n\n  get rotation() {\n    return this.map.getView().getRotation();\n  }\n\n  get rotationDegrees() {\n    return this.rotation * (180 / Math.PI);\n  }\n\n  onClick(method) {\n    this.map.on(\"click\", method);\n  }\n\n  unClick(method) {\n    this.map.un(\"click\", method);\n  }\n\n  get visualMarkersVectorLayer() {\n    if (!this.memoVisualMarkersVectorLayer) {\n      this.visualMarkersVectorSource = new VectorSource();\n      this.memoVisualMarkersVectorLayer = new VectorLayer({\n        source: this.visualMarkersVectorSource,\n        style: (feature) => visualMarkerStyle(feature),\n        zIndex: 100,\n      });\n      this.memoVisualMarkersVectorLayer.set(\"dataType\", VISUAL_MARKER_DATA_TYPE);\n    }\n    return this.memoVisualMarkersVectorLayer;\n  }\n\n  addVisualMarker(coordinate) {\n    const point = new Point(coordinate);\n    const feature = new Feature({ geometry: point });\n    this.visualMarkersVectorSource.addFeature(feature);\n    return feature;\n  }\n\n  clearVisualMarkers() {\n    this.visualMarkersVectorSource.clear();\n  }\n\n  highlightSegment(uuid, highlight = true) {\n    this.highlightFeatureInVectorSource(this.segmentsVectorSource, uuid, highlight);\n  }\n\n  highlightPanel(uuid, highlight = true) {\n    this.highlightFeatureInVectorSource(this.panelsVectorSource, uuid, highlight);\n  }\n\n  highlightFeatureInVectorSource(vectorSource, uuid, highlight) {\n    const feature = vectorSource.getFeatures().find((f) => f.get(\"uuid\") === uuid);\n\n    if (!feature) {\n      console.log(\"Could not find feature with that uuid\", uuid);\n      return;\n    }\n\n    feature.set(\"highlighted\", highlight);\n  }\n\n  addMouseWheelZoomWhenCtrlKeyPressedInteraction() {\n    const mouseWheelZoomInteraction = new MouseWheelZoom({\n      condition: (event) => {\n        return event.originalEvent.ctrlKey;\n      },\n    });\n    this.map.addInteraction(mouseWheelZoomInteraction);\n  }\n\n  keepTrackOfDrawingCoordinates = (event) => {\n    this.addDrawingCoordinateToProjectModel(event);\n  };\n\n  addDrawingCoordinateToProjectModel(event) {\n    if (!this.controller.drawInteractionManager || !this.controller.drawInteractionManager.currentDrawInteraction) {\n      return;\n    }\n\n    this.controller.project.addDrawingCoordinate(event.coordinate);\n  }\n\n  buildGuideLinesVectorSource() {\n    this.guideLinesVectorSource = new VectorSource({\n      features: this.mapModelSynchronizer.loadGuideLines(),\n    });\n  }\n\n  reloadGuideLineFeatures() {\n    this.guideLinesVectorSource.clear();\n    this.mapModelSynchronizer.loadGuideLines().forEach((feature) => {\n      this.guideLinesVectorSource.addFeature(feature);\n    });\n\n    this.guideLinesIntersectionCirclesVectorSource.clear();\n    this.mapModelSynchronizer\n      .loadGuideLinesIntersectionCircles(\n        this.guideLinesVectorSource.getFeatures(),\n        this.roofPlanesVectorSource.getFeatures(),\n      )\n      .forEach((feature) => {\n        this.guideLinesIntersectionCirclesVectorSource.addFeature(feature);\n      });\n  }\n\n  get guideLinesVectorLayer() {\n    if (!this.memoGuideLinesVectorLayer) {\n      this.memoGuideLinesVectorLayer = new VectorLayer({\n        source: this.guideLinesVectorSource,\n        style: (feature) => guideLinesStyle(feature, this.map, this.project.displayableRoofPlanes),\n        zIndex: 25,\n      });\n      this.memoGuideLinesVectorLayer.set(\"dataType\", GUIDE_LINE_DATA_TYPE);\n    }\n    return this.memoGuideLinesVectorLayer;\n  }\n\n  buildGuideLinesIntersectionCirclesVectorSource() {\n    this.guideLinesIntersectionCirclesVectorSource = new VectorSource({\n      features: this.mapModelSynchronizer.loadGuideLinesIntersectionCircles(\n        this.guideLinesVectorSource.getFeatures(),\n        this.roofPlanesVectorSource.getFeatures(),\n      ),\n    });\n  }\n\n  get guideLinesIntersectionCirclesVectorLayer() {\n    if (!this.memoGuideLinesIntersectionCirclesVectorLayer) {\n      this.memoGuideLinesIntersectionCirclesVectorLayer = new VectorLayer({\n        source: this.guideLinesIntersectionCirclesVectorSource,\n        style: (feature) => guideLinesIntersectionCirclesStyle(feature, this.map),\n        zIndex: 25,\n      });\n      this.memoGuideLinesIntersectionCirclesVectorLayer.set(\"dataType\", GUIDE_LINES_INTERSECTION_CIRCLE_DATA_TYPE);\n    }\n    return this.memoGuideLinesIntersectionCirclesVectorLayer;\n  }\n\n  get mapCenter() {\n    return this.map.getView().getCenter();\n  }\n\n  get mapCenterLonLat() {\n    return toLonLat(this.mapCenter);\n  }\n\n  get mapCenterLatLngObj() {\n    const lonLat = this.mapCenterLonLat;\n    return { lat: lonLat[1], lng: lonLat[0] };\n  }\n\n  allLayerFeatures(visibleLayersOnly = true) {\n    if (!this.map) return [];\n\n    const mapLayers = this.map\n      .getLayers()\n      .getArray()\n      .filter((layer) => layer.getSource && typeof layer.getSource === \"function\");\n\n    const filteredLayers = visibleLayersOnly ? mapLayers.filter((layer) => layer.getVisible()) : mapLayers;\n\n    return filteredLayers.flatMap((layer) => {\n      const source = layer.getSource();\n      if (!source || !source.getFeatures || typeof source.getFeatures !== \"function\") {\n        return [];\n      }\n\n      return source.getFeatures();\n    });\n  }\n\n  get mapBaseResolution() {\n    return this.map.getView().getResolution();\n  }\n\n  get mapLocalResolution() {\n    return getPointResolution(this.mapProjection, this.mapBaseResolution, this.mapCenter);\n  }\n\n  get mapProjection() {\n    return this.map.getView().getProjection();\n  }\n\n  addBuildingImagePlacementToMap(placement) {\n    const feature = this.mapModelSynchronizer.createBuildingImagePlacementFeature(placement);\n\n    // Adjust rotation when on viewer page to account for difference between editor and viewer rotations\n    if (this.controller.isViewerPage) {\n      const { projectSite } = this.project;\n      const rotationDifference = projectSite.effectiveViewerRotation - projectSite.effectiveEditorRotation;\n      const currentImageRotation = feature.get(\"imageRotation\") || 0;\n      feature.set(\"imageRotation\", currentImageRotation + rotationDifference);\n    }\n\n    const layer = new VectorLayer({\n      source: new VectorSource({\n        features: [feature],\n      }),\n      // This allows the building image placement to be rendered at a higher resolution where\n      // the center of the feature is out of map view.  By default this results in the image\n      // disappearing from view.  This increases the render buffer to 5000 pixels, allowing the\n      // user to zoom in closely on an edge of a building image.\n      renderBuffer: 5000,\n    });\n    layer.set(\"dataType\", BUILDING_IMAGE_PLACEMENT_DATA_TYPE);\n    layer.set(\"placementUuid\", feature.get(\"uuid\"));\n\n    this.map.addLayer(layer);\n\n    this.buildingImagePlacementLayers.push(layer);\n    this.buildingImagePlacementFeatures.push(feature);\n\n    return feature;\n  }\n\n  removeBuildingImagePlacementFromMap(uuid) {\n    this.buildingImagePlacementFeatures = this.buildingImagePlacementFeatures.filter((f) => f.get(\"uuid\") !== uuid);\n    const layer = this.buildingImagePlacementLayers.find((layer) => {\n      return layer.get(\"placementUuid\") === uuid;\n    });\n    this.buildingImagePlacementLayers = this.buildingImagePlacementLayers.filter((l) => l !== layer);\n    this.map.removeLayer(layer);\n  }\n\n  addBuildingImagePlacementLayers() {\n    this.project.notDeletedBuildingImagePlacements.forEach((placement) => {\n      this.addBuildingImagePlacementToMap(placement);\n    });\n  }\n\n  rotateBuildingImagePlacementsAfterMapRotation(startAngle, endAngle) {\n    const rotationDelta = endAngle - startAngle;\n    this.buildingImagePlacementFeatures.forEach((feature) => {\n      const currentImageRotation = feature.get(\"imageRotation\") || 0;\n      feature.set(\"imageRotation\", currentImageRotation + rotationDelta);\n      feature.changed();\n\n      this.mapModelSynchronizer.saveBuildingImagePlacementCoordinatesAndRotationToModel(feature);\n    });\n  }\n}\n", "import { Circle, Text, Fill, Stroke, Style } from \"ol/style\";\nimport Point from \"ol/geom/Point\";\n\nexport function lineNumberMarkerStyle({\n  startPoint,\n  endPoint,\n  lineNumber,\n  lineColor,\n  lineWidth,\n  circleColor,\n  zIndex = 1,\n  radius = 20,\n  fontSize = 16,\n}) {\n  const lineNumberMarkerStyle = new Style({\n    geometry: new Point(midPoint(startPoint, endPoint)),\n    image: new Circle({\n      radius,\n      fill: new Fill({ color: circleColor }),\n      stroke: new Stroke({ color: lineColor, width: lineWidth }),\n      snapToPixel: true,\n    }),\n    text: new Text({\n      text: `${lineNumber}`,\n      font: `bold ${fontSize}px sans-serif`,\n      fill: new Fill({ color: \"#fff\" }),\n    }),\n    zIndex,\n  });\n  return lineNumberMarkerStyle;\n}\n\nexport function midPoint(startPoint, endPoint) {\n  return [(startPoint[0] + endPoint[0]) / 2.0, (startPoint[1] + endPoint[1]) / 2.0];\n}\n", "import { Circle, Text, Fill, Stroke, Style } from \"ol/style\";\nimport Point from \"ol/geom/Point\";\n\nimport { lineNumberMarkerStyle, midPoint } from \"./helpers\";\nimport { distanceForPixels } from \"../../../da/map/ol-helpers\";\n\nconst GUIDE_LINE_COLOR = \"rgba(148, 0, 255, 1)\";\n\nexport function guideLinesStyle(feature, map, roofPlanes) {\n  const styles = [];\n  styles.push(\n    new Style({\n      stroke: new Stroke({ color: GUIDE_LINE_COLOR, width: 1 }),\n    }),\n  );\n  const [startPoint, endPoint] = feature.getGeometry().getCoordinates();\n  const lineNumber = feature.get(\"lineNumber\");\n  styles.push(\n    lineNumberMarkerStyle({\n      startPoint,\n      endPoint,\n      lineNumber,\n      lineColor: GUIDE_LINE_COLOR,\n      lineWidth: 3,\n      circleColor: GUIDE_LINE_COLOR,\n      radius: 12,\n      fontSize: 15,\n    }),\n  );\n\n  const roofPlane = roofPlanes.find((rp) => rp.uuid === feature.get(\"roofPlaneUuid\"));\n  styles.push(guideLineDistanceMarker(feature, roofPlane, map, startPoint, endPoint));\n  return styles;\n}\n\nfunction guideLineDistanceMarker(feature, roofPlane, map, startPoint, endPoint) {\n  const guideLine = roofPlane.guideLineForSegmentIndex(feature.get(\"segmentIndex\"));\n  if (!guideLine) debugger;\n\n  const distance = distanceForPixels(map, 35);\n  const midPointCoordinate = midPoint(startPoint, endPoint);\n  let vectorX = midPointCoordinate[0] - endPoint[0];\n  let vectorY = midPointCoordinate[1] - endPoint[1];\n  const factor = distance / Math.sqrt(vectorX * vectorX + vectorY * vectorY);\n  vectorX *= factor;\n  vectorY *= factor;\n  const position = [midPointCoordinate[0] + vectorX, midPointCoordinate[1] + vectorY];\n\n  return new Style({\n    geometry: new Point(position),\n    text: new Text({\n      text: `${guideLine.distance}\"`,\n      font: \"bold 15px sans-serif\",\n      fill: new Fill({ color: \"#fff\" }),\n      stroke: new Stroke({ color: GUIDE_LINE_COLOR, width: 3 }),\n    }),\n    zIndex: 25,\n  });\n}\n\nexport function guideLinesIntersectionCirclesStyle(_feature, _map) {\n  return new Style({\n    image: new Circle({\n      fill: new Fill({ color: GUIDE_LINE_COLOR }),\n      radius: 3,\n    }),\n  });\n}\n", "/**\n * @module ol/DataTile\n */\nimport Tile from './Tile.js';\nimport TileState from './TileState.js';\nimport {createCanvasContext2D} from './dom.js';\n\n/**\n * @typedef {HTMLImageElement|HTMLCanvasElement|OffscreenCanvas|HTMLVideoElement|ImageBitmap} ImageLike\n */\n\n/**\n * @typedef {Uint8Array|Uint8ClampedArray|Float32Array|DataView} ArrayLike\n */\n\n/**\n * Data that can be used with a DataTile.\n * @typedef {ArrayLike|ImageLike} Data\n */\n\n/**\n * @param {Data} data Tile data.\n * @return {ImageLike|null} The image-like data.\n */\nexport function asImageLike(data) {\n  return data instanceof Image ||\n    data instanceof HTMLCanvasElement ||\n    data instanceof HTMLVideoElement ||\n    data instanceof ImageBitmap\n    ? data\n    : null;\n}\n\n/**\n * @param {Data} data Tile data.\n * @return {ArrayLike|null} The array-like data.\n */\nexport function asArrayLike(data) {\n  return data instanceof Uint8Array ||\n    data instanceof Uint8ClampedArray ||\n    data instanceof Float32Array ||\n    data instanceof DataView\n    ? data\n    : null;\n}\n\n/**\n * This is set as the cancellation reason when a tile is disposed.\n */\nexport const disposedError = new Error('disposed');\n\n/**\n * @type {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D|null}\n */\nlet sharedContext = null;\n\n/**\n * @param {ImageLike} image The image.\n * @return {Uint8ClampedArray} The data.\n */\nexport function toArray(image) {\n  if (!sharedContext) {\n    sharedContext = createCanvasContext2D(\n      image.width,\n      image.height,\n      undefined,\n      {willReadFrequently: true},\n    );\n  }\n  const canvas = sharedContext.canvas;\n  const width = image.width;\n  if (canvas.width !== width) {\n    canvas.width = width;\n  }\n  const height = image.height;\n  if (canvas.height !== height) {\n    canvas.height = height;\n  }\n  sharedContext.clearRect(0, 0, width, height);\n  sharedContext.drawImage(image, 0, 0);\n  return sharedContext.getImageData(0, 0, width, height).data;\n}\n\n/**\n * @type {import('./size.js').Size}\n */\nconst defaultSize = [256, 256];\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @property {function(): Promise<Data>} loader Data loader.  For loaders that generate images,\n * the promise should not resolve until the image is loaded.\n * @property {number} [transition=250] A duration for tile opacity\n * transitions in milliseconds. A duration of 0 disables the opacity transition.\n * @property {boolean} [interpolate=false] Use interpolated values when resampling.  By default,\n * the nearest neighbor is used when resampling.\n * @property {import('./size.js').Size} [size=[256, 256]] Tile size.\n * @property {AbortController} [controller] An abort controller.\n * @api\n */\n\nclass DataTile extends Tile {\n  /**\n   * @param {Options} options Tile options.\n   */\n  constructor(options) {\n    const state = TileState.IDLE;\n\n    super(options.tileCoord, state, {\n      transition: options.transition,\n      interpolate: options.interpolate,\n    });\n\n    /**\n     * @type {function(): Promise<Data>}\n     * @private\n     */\n    this.loader_ = options.loader;\n\n    /**\n     * @type {Data}\n     * @private\n     */\n    this.data_ = null;\n\n    /**\n     * @type {Error}\n     * @private\n     */\n    this.error_ = null;\n\n    /**\n     * @type {import('./size.js').Size|null}\n     * @private\n     */\n    this.size_ = options.size || null;\n\n    /**\n     * @type {AbortController|null}\n     * @private\n     */\n    this.controller_ = options.controller || null;\n  }\n\n  /**\n   * Get the tile size.\n   * @return {import('./size.js').Size} Tile size.\n   */\n  getSize() {\n    if (this.size_) {\n      return this.size_;\n    }\n    const imageData = asImageLike(this.data_);\n    if (imageData) {\n      return [imageData.width, imageData.height];\n    }\n    return defaultSize;\n  }\n\n  /**\n   * Get the data for the tile.\n   * @return {Data} Tile data.\n   * @api\n   */\n  getData() {\n    return this.data_;\n  }\n\n  /**\n   * Get any loading error.\n   * @return {Error} Loading error.\n   * @api\n   */\n  getError() {\n    return this.error_;\n  }\n\n  /**\n   * Load the tile data.\n   * @api\n   * @override\n   */\n  load() {\n    if (this.state !== TileState.IDLE && this.state !== TileState.ERROR) {\n      return;\n    }\n    this.state = TileState.LOADING;\n    this.changed();\n\n    const self = this;\n    this.loader_()\n      .then(function (data) {\n        self.data_ = data;\n        self.state = TileState.LOADED;\n        self.changed();\n      })\n      .catch(function (error) {\n        self.error_ = error;\n        self.state = TileState.ERROR;\n        self.changed();\n      });\n  }\n\n  /**\n   * Clean up.\n   * @override\n   */\n  disposeInternal() {\n    if (this.controller_) {\n      this.controller_.abort(disposedError);\n      this.controller_ = null;\n    }\n    super.disposeInternal();\n  }\n}\n\nexport default DataTile;\n", "/**\n * @module ol/reproj\n */\nimport {createCanvasContext2D, releaseCanvas} from './dom.js';\nimport {\n  containsCoordinate,\n  createEmpty,\n  extend,\n  forEachCorner,\n  getCenter,\n  getHeight,\n  getTopLeft,\n  getWidth,\n} from './extent.js';\nimport {solveLinearSystem} from './math.js';\nimport {getPointResolution, transform} from './proj.js';\n\nlet brokenDiagonalRendering_;\n\n/**\n * @type {Array<HTMLCanvasElement|OffscreenCanvas>}\n */\nexport const canvasPool = [];\n\n/**\n * This draws a small triangle into a canvas by setting the triangle as the clip region\n * and then drawing a (too large) rectangle\n *\n * @param {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} ctx The context in which to draw the triangle\n * @param {number} u1 The x-coordinate of the second point. The first point is 0,0.\n * @param {number} v1 The y-coordinate of the second point.\n * @param {number} u2 The x-coordinate of the third point.\n * @param {number} v2 The y-coordinate of the third point.\n */\nfunction drawTestTriangle(ctx, u1, v1, u2, v2) {\n  ctx.beginPath();\n  ctx.moveTo(0, 0);\n  ctx.lineTo(u1, v1);\n  ctx.lineTo(u2, v2);\n  ctx.closePath();\n  ctx.save();\n  ctx.clip();\n  ctx.fillRect(0, 0, Math.max(u1, u2) + 1, Math.max(v1, v2));\n  ctx.restore();\n}\n\n/**\n * Given the data from getImageData, see if the right values appear at the provided offset.\n * Returns true if either the color or transparency is off\n *\n * @param {Uint8ClampedArray} data The data returned from getImageData\n * @param {number} offset The pixel offset from the start of data.\n * @return {boolean} true if the diagonal rendering is broken\n */\nfunction verifyBrokenDiagonalRendering(data, offset) {\n  // the values ought to be close to the rgba(210, 0, 0, 0.75)\n  return (\n    Math.abs(data[offset * 4] - 210) > 2 ||\n    Math.abs(data[offset * 4 + 3] - 0.75 * 255) > 2\n  );\n}\n\n/**\n * Determines if the current browser configuration can render triangular clip regions correctly.\n * This value is cached so the function is only expensive the first time called.\n * Firefox on Windows (as of now) does not if HWA is enabled. See https://bugzilla.mozilla.org/show_bug.cgi?id=1606976\n * Chrome works, and everything seems to work on OSX and Android. This function caches the\n * result. I suppose that it is conceivably possible that a browser might flip modes while the app is\n * running, but lets hope not.\n *\n * @return {boolean} true if the Diagonal Rendering is broken.\n */\nfunction isBrokenDiagonalRendering() {\n  if (brokenDiagonalRendering_ === undefined) {\n    const ctx = createCanvasContext2D(6, 6, canvasPool);\n    ctx.globalCompositeOperation = 'lighter';\n    ctx.fillStyle = 'rgba(210, 0, 0, 0.75)';\n    drawTestTriangle(ctx, 4, 5, 4, 0);\n    drawTestTriangle(ctx, 4, 5, 0, 5);\n    const data = ctx.getImageData(0, 0, 3, 3).data;\n    brokenDiagonalRendering_ =\n      verifyBrokenDiagonalRendering(data, 0) ||\n      verifyBrokenDiagonalRendering(data, 4) ||\n      verifyBrokenDiagonalRendering(data, 8);\n    releaseCanvas(ctx);\n    canvasPool.push(ctx.canvas);\n  }\n\n  return brokenDiagonalRendering_;\n}\n\n/**\n * Calculates ideal resolution to use from the source in order to achieve\n * pixel mapping as close as possible to 1:1 during reprojection.\n * The resolution is calculated regardless of what resolutions\n * are actually available in the dataset (TileGrid, Image, ...).\n *\n * @param {import(\"./proj/Projection.js\").default} sourceProj Source projection.\n * @param {import(\"./proj/Projection.js\").default} targetProj Target projection.\n * @param {import(\"./coordinate.js\").Coordinate} targetCenter Target center.\n * @param {number} targetResolution Target resolution.\n * @return {number} The best resolution to use. Can be +-Infinity, NaN or 0.\n */\nexport function calculateSourceResolution(\n  sourceProj,\n  targetProj,\n  targetCenter,\n  targetResolution,\n) {\n  const sourceCenter = transform(targetCenter, targetProj, sourceProj);\n\n  // calculate the ideal resolution of the source data\n  let sourceResolution = getPointResolution(\n    targetProj,\n    targetResolution,\n    targetCenter,\n  );\n\n  const targetMetersPerUnit = targetProj.getMetersPerUnit();\n  if (targetMetersPerUnit !== undefined) {\n    sourceResolution *= targetMetersPerUnit;\n  }\n  const sourceMetersPerUnit = sourceProj.getMetersPerUnit();\n  if (sourceMetersPerUnit !== undefined) {\n    sourceResolution /= sourceMetersPerUnit;\n  }\n\n  // Based on the projection properties, the point resolution at the specified\n  // coordinates may be slightly different. We need to reverse-compensate this\n  // in order to achieve optimal results.\n\n  const sourceExtent = sourceProj.getExtent();\n  if (!sourceExtent || containsCoordinate(sourceExtent, sourceCenter)) {\n    const compensationFactor =\n      getPointResolution(sourceProj, sourceResolution, sourceCenter) /\n      sourceResolution;\n    if (isFinite(compensationFactor) && compensationFactor > 0) {\n      sourceResolution /= compensationFactor;\n    }\n  }\n\n  return sourceResolution;\n}\n\n/**\n * Calculates ideal resolution to use from the source in order to achieve\n * pixel mapping as close as possible to 1:1 during reprojection.\n * The resolution is calculated regardless of what resolutions\n * are actually available in the dataset (TileGrid, Image, ...).\n *\n * @param {import(\"./proj/Projection.js\").default} sourceProj Source projection.\n * @param {import(\"./proj/Projection.js\").default} targetProj Target projection.\n * @param {import(\"./extent.js\").Extent} targetExtent Target extent\n * @param {number} targetResolution Target resolution.\n * @return {number} The best resolution to use. Can be +-Infinity, NaN or 0.\n */\nexport function calculateSourceExtentResolution(\n  sourceProj,\n  targetProj,\n  targetExtent,\n  targetResolution,\n) {\n  const targetCenter = getCenter(targetExtent);\n  let sourceResolution = calculateSourceResolution(\n    sourceProj,\n    targetProj,\n    targetCenter,\n    targetResolution,\n  );\n\n  if (!isFinite(sourceResolution) || sourceResolution <= 0) {\n    forEachCorner(targetExtent, function (corner) {\n      sourceResolution = calculateSourceResolution(\n        sourceProj,\n        targetProj,\n        corner,\n        targetResolution,\n      );\n      return isFinite(sourceResolution) && sourceResolution > 0;\n    });\n  }\n\n  return sourceResolution;\n}\n\n/**\n * @typedef {Object} ImageExtent\n * @property {import(\"./extent.js\").Extent} extent Extent.\n * @property {import(\"./extent.js\").Extent} [clipExtent] Clip extent.\n * @property {import('./DataTile.js').ImageLike} image Image.\n */\n\n/**\n * Renders the source data into new canvas based on the triangulation.\n *\n * @param {number} width Width of the canvas.\n * @param {number} height Height of the canvas.\n * @param {number} pixelRatio Pixel ratio.\n * @param {number} sourceResolution Source resolution.\n * @param {import(\"./extent.js\").Extent} sourceExtent Extent of the data source.\n * @param {number} targetResolution Target resolution.\n * @param {import(\"./extent.js\").Extent} targetExtent Target extent.\n * @param {import(\"./reproj/Triangulation.js\").default} triangulation Calculated triangulation.\n * @param {Array<ImageExtent>} sources Array of sources.\n * @param {number} gutter Gutter of the sources.\n * @param {boolean} [renderEdges] Render reprojection edges.\n * @param {boolean} [interpolate] Use linear interpolation when resampling.\n * @param {boolean} [drawSingle] Draw single source images directly without stitchContext.\n * @param {boolean} [clipExtent] Clip stitchContext to sourceExtent.\n * @return {HTMLCanvasElement|OffscreenCanvas} Canvas with reprojected data.\n */\nexport function render(\n  width,\n  height,\n  pixelRatio,\n  sourceResolution,\n  sourceExtent,\n  targetResolution,\n  targetExtent,\n  triangulation,\n  sources,\n  gutter,\n  renderEdges,\n  interpolate,\n  drawSingle,\n  clipExtent,\n) {\n  const context = createCanvasContext2D(\n    Math.round(pixelRatio * width),\n    Math.round(pixelRatio * height),\n    canvasPool,\n  );\n\n  if (!interpolate) {\n    context.imageSmoothingEnabled = false;\n  }\n\n  if (sources.length === 0) {\n    return context.canvas;\n  }\n\n  context.scale(pixelRatio, pixelRatio);\n\n  function pixelRound(value) {\n    return Math.round(value * pixelRatio) / pixelRatio;\n  }\n\n  context.globalCompositeOperation = 'lighter';\n\n  const sourceDataExtent = createEmpty();\n  sources.forEach(function (src, i, arr) {\n    extend(sourceDataExtent, src.extent);\n  });\n\n  let stitchContext;\n  const stitchScale = pixelRatio / sourceResolution;\n  // Round up Float32 scale values to prevent interpolation in Firefox.\n  const inverseScale = (interpolate ? 1 : 1 + Math.pow(2, -24)) / stitchScale;\n\n  if (!drawSingle || sources.length !== 1 || gutter !== 0) {\n    stitchContext = createCanvasContext2D(\n      Math.round(getWidth(sourceDataExtent) * stitchScale),\n      Math.round(getHeight(sourceDataExtent) * stitchScale),\n      canvasPool,\n    );\n\n    if (!interpolate) {\n      stitchContext.imageSmoothingEnabled = false;\n    }\n    if (sourceExtent && clipExtent) {\n      const xPos = (sourceExtent[0] - sourceDataExtent[0]) * stitchScale;\n      const yPos = -(sourceExtent[3] - sourceDataExtent[3]) * stitchScale;\n      const width = getWidth(sourceExtent) * stitchScale;\n      const height = getHeight(sourceExtent) * stitchScale;\n      stitchContext.rect(xPos, yPos, width, height);\n      stitchContext.clip();\n    }\n\n    sources.forEach(function (src, i, arr) {\n      // This test should never fail -- but it does. Need to find a fix the upstream condition\n      if (src.image.width > 0 && src.image.height > 0) {\n        if (src.clipExtent) {\n          stitchContext.save();\n          const xPos = (src.clipExtent[0] - sourceDataExtent[0]) * stitchScale;\n          const yPos = -(src.clipExtent[3] - sourceDataExtent[3]) * stitchScale;\n          const width = getWidth(src.clipExtent) * stitchScale;\n          const height = getHeight(src.clipExtent) * stitchScale;\n          stitchContext.rect(\n            interpolate ? xPos : Math.round(xPos),\n            interpolate ? yPos : Math.round(yPos),\n            interpolate ? width : Math.round(xPos + width) - Math.round(xPos),\n            interpolate ? height : Math.round(yPos + height) - Math.round(yPos),\n          );\n          stitchContext.clip();\n        }\n\n        const xPos = (src.extent[0] - sourceDataExtent[0]) * stitchScale;\n        const yPos = -(src.extent[3] - sourceDataExtent[3]) * stitchScale;\n        const srcWidth = getWidth(src.extent) * stitchScale;\n        const srcHeight = getHeight(src.extent) * stitchScale;\n        stitchContext.drawImage(\n          src.image,\n          gutter,\n          gutter,\n          src.image.width - 2 * gutter,\n          src.image.height - 2 * gutter,\n          interpolate ? xPos : Math.round(xPos),\n          interpolate ? yPos : Math.round(yPos),\n          interpolate\n            ? srcWidth\n            : Math.round(xPos + srcWidth) - Math.round(xPos),\n          interpolate\n            ? srcHeight\n            : Math.round(yPos + srcHeight) - Math.round(yPos),\n        );\n\n        if (src.clipExtent) {\n          stitchContext.restore();\n        }\n      }\n    });\n  }\n  const targetTopLeft = getTopLeft(targetExtent);\n\n  triangulation.getTriangles().forEach(function (triangle, i, arr) {\n    /* Calculate affine transform (src -> dst)\n     * Resulting matrix can be used to transform coordinate\n     * from `sourceProjection` to destination pixels.\n     *\n     * To optimize number of context calls and increase numerical stability,\n     * we also do the following operations:\n     * trans(-topLeftExtentCorner), scale(1 / targetResolution), scale(1, -1)\n     * here before solving the linear system so [ui, vi] are pixel coordinates.\n     *\n     * Src points: xi, yi\n     * Dst points: ui, vi\n     * Affine coefficients: aij\n     *\n     * | x0 y0 1  0  0 0 |   |a00|   |u0|\n     * | x1 y1 1  0  0 0 |   |a01|   |u1|\n     * | x2 y2 1  0  0 0 | x |a02| = |u2|\n     * |  0  0 0 x0 y0 1 |   |a10|   |v0|\n     * |  0  0 0 x1 y1 1 |   |a11|   |v1|\n     * |  0  0 0 x2 y2 1 |   |a12|   |v2|\n     */\n    const source = triangle.source;\n    const target = triangle.target;\n    let x0 = source[0][0],\n      y0 = source[0][1];\n    let x1 = source[1][0],\n      y1 = source[1][1];\n    let x2 = source[2][0],\n      y2 = source[2][1];\n    // Make sure that everything is on pixel boundaries\n    const u0 = pixelRound((target[0][0] - targetTopLeft[0]) / targetResolution);\n    const v0 = pixelRound(\n      -(target[0][1] - targetTopLeft[1]) / targetResolution,\n    );\n    const u1 = pixelRound((target[1][0] - targetTopLeft[0]) / targetResolution);\n    const v1 = pixelRound(\n      -(target[1][1] - targetTopLeft[1]) / targetResolution,\n    );\n    const u2 = pixelRound((target[2][0] - targetTopLeft[0]) / targetResolution);\n    const v2 = pixelRound(\n      -(target[2][1] - targetTopLeft[1]) / targetResolution,\n    );\n\n    // Shift all the source points to improve numerical stability\n    // of all the subsequent calculations. The [x0, y0] is used here.\n    // This is also used to simplify the linear system.\n    const sourceNumericalShiftX = x0;\n    const sourceNumericalShiftY = y0;\n    x0 = 0;\n    y0 = 0;\n    x1 -= sourceNumericalShiftX;\n    y1 -= sourceNumericalShiftY;\n    x2 -= sourceNumericalShiftX;\n    y2 -= sourceNumericalShiftY;\n\n    const augmentedMatrix = [\n      [x1, y1, 0, 0, u1 - u0],\n      [x2, y2, 0, 0, u2 - u0],\n      [0, 0, x1, y1, v1 - v0],\n      [0, 0, x2, y2, v2 - v0],\n    ];\n    const affineCoefs = solveLinearSystem(augmentedMatrix);\n    if (!affineCoefs) {\n      return;\n    }\n\n    context.save();\n    context.beginPath();\n\n    if (isBrokenDiagonalRendering() || !interpolate) {\n      // Make sure that all lines are horizontal or vertical\n      context.moveTo(u1, v1);\n      // This is the diagonal line. Do it in 4 steps\n      const steps = 4;\n      const ud = u0 - u1;\n      const vd = v0 - v1;\n      for (let step = 0; step < steps; step++) {\n        // Go horizontally\n        context.lineTo(\n          u1 + pixelRound(((step + 1) * ud) / steps),\n          v1 + pixelRound((step * vd) / (steps - 1)),\n        );\n        // Go vertically\n        if (step != steps - 1) {\n          context.lineTo(\n            u1 + pixelRound(((step + 1) * ud) / steps),\n            v1 + pixelRound(((step + 1) * vd) / (steps - 1)),\n          );\n        }\n      }\n      // We are almost at u0r, v0r\n      context.lineTo(u2, v2);\n    } else {\n      context.moveTo(u1, v1);\n      context.lineTo(u0, v0);\n      context.lineTo(u2, v2);\n    }\n\n    context.clip();\n\n    context.transform(\n      affineCoefs[0],\n      affineCoefs[2],\n      affineCoefs[1],\n      affineCoefs[3],\n      u0,\n      v0,\n    );\n\n    context.translate(\n      sourceDataExtent[0] - sourceNumericalShiftX,\n      sourceDataExtent[3] - sourceNumericalShiftY,\n    );\n\n    let image;\n    if (stitchContext) {\n      image = stitchContext.canvas;\n      context.scale(inverseScale, -inverseScale);\n    } else {\n      const source = sources[0];\n      const extent = source.extent;\n      image = source.image;\n      context.scale(\n        getWidth(extent) / image.width,\n        -getHeight(extent) / image.height,\n      );\n    }\n\n    context.drawImage(image, 0, 0);\n    context.restore();\n  });\n\n  if (stitchContext) {\n    releaseCanvas(stitchContext);\n    canvasPool.push(stitchContext.canvas);\n  }\n\n  if (renderEdges) {\n    context.save();\n\n    context.globalCompositeOperation = 'source-over';\n    context.strokeStyle = 'black';\n    context.lineWidth = 1;\n\n    triangulation.getTriangles().forEach(function (triangle, i, arr) {\n      const target = triangle.target;\n      const u0 = (target[0][0] - targetTopLeft[0]) / targetResolution;\n      const v0 = -(target[0][1] - targetTopLeft[1]) / targetResolution;\n      const u1 = (target[1][0] - targetTopLeft[0]) / targetResolution;\n      const v1 = -(target[1][1] - targetTopLeft[1]) / targetResolution;\n      const u2 = (target[2][0] - targetTopLeft[0]) / targetResolution;\n      const v2 = -(target[2][1] - targetTopLeft[1]) / targetResolution;\n\n      context.beginPath();\n      context.moveTo(u1, v1);\n      context.lineTo(u0, v0);\n      context.lineTo(u2, v2);\n      context.closePath();\n      context.stroke();\n    });\n\n    context.restore();\n  }\n  return context.canvas;\n}\n", "/**\n * @module ol/reproj/Triangulation\n */\nimport {\n  boundingExtent,\n  createEmpty,\n  extendCoordinate,\n  getArea,\n  getBottomLeft,\n  getBottomRight,\n  getTopLeft,\n  getTopRight,\n  getWidth,\n  intersects,\n} from '../extent.js';\nimport {modulo} from '../math.js';\nimport {\n  createTransformFromCoordinateTransform,\n  getTransform,\n  transform,\n} from '../proj.js';\nimport {apply as applyMatrix} from '../transform.js';\n\n/**\n * Single triangle; consists of 3 source points and 3 target points.\n * @typedef {Object} Triangle\n * @property {Array<import(\"../coordinate.js\").Coordinate>} source Source.\n * @property {Array<import(\"../coordinate.js\").Coordinate>} target Target.\n */\n\n/**\n * Maximum number of subdivision steps during raster reprojection triangulation.\n * Prevents high memory usage and large number of proj4 calls (for certain\n * transformations and areas). At most `2*(2^this)` triangles are created for\n * each triangulated extent (tile/image).\n * @type {number}\n */\nconst MAX_SUBDIVISION = 10;\n\n/**\n * Maximum allowed size of triangle relative to world width. When transforming\n * corners of world extent between certain projections, the resulting\n * triangulation seems to have zero error and no subdivision is performed. If\n * the triangle width is more than this (relative to world width; 0-1),\n * subdivison is forced (up to `MAX_SUBDIVISION`). Default is `0.25`.\n * @type {number}\n */\nconst MAX_TRIANGLE_WIDTH = 0.25;\n\n/**\n * @classdesc\n * Class containing triangulation of the given target extent.\n * Used for determining source data and the reprojection itself.\n */\nclass Triangulation {\n  /**\n   * @param {import(\"../proj/Projection.js\").default} sourceProj Source projection.\n   * @param {import(\"../proj/Projection.js\").default} targetProj Target projection.\n   * @param {import(\"../extent.js\").Extent} targetExtent Target extent to triangulate.\n   * @param {import(\"../extent.js\").Extent} maxSourceExtent Maximal source extent that can be used.\n   * @param {number} errorThreshold Acceptable error (in source units).\n   * @param {?number} destinationResolution The (optional) resolution of the destination.\n   * @param {import(\"../transform.js\").Transform} [sourceMatrix] Source transform matrix.\n   */\n  constructor(\n    sourceProj,\n    targetProj,\n    targetExtent,\n    maxSourceExtent,\n    errorThreshold,\n    destinationResolution,\n    sourceMatrix,\n  ) {\n    /**\n     * @type {import(\"../proj/Projection.js\").default}\n     * @private\n     */\n    this.sourceProj_ = sourceProj;\n\n    /**\n     * @type {import(\"../proj/Projection.js\").default}\n     * @private\n     */\n    this.targetProj_ = targetProj;\n\n    /** @type {!Object<string, import(\"../coordinate.js\").Coordinate>} */\n    let transformInvCache = {};\n    const transformInv = sourceMatrix\n      ? createTransformFromCoordinateTransform((input) =>\n          applyMatrix(\n            sourceMatrix,\n            transform(input, this.targetProj_, this.sourceProj_),\n          ),\n        )\n      : getTransform(this.targetProj_, this.sourceProj_);\n\n    /**\n     * @param {import(\"../coordinate.js\").Coordinate} c A coordinate.\n     * @return {import(\"../coordinate.js\").Coordinate} Transformed coordinate.\n     * @private\n     */\n    this.transformInv_ = function (c) {\n      const key = c[0] + '/' + c[1];\n      if (!transformInvCache[key]) {\n        transformInvCache[key] = transformInv(c);\n      }\n      return transformInvCache[key];\n    };\n\n    /**\n     * @type {import(\"../extent.js\").Extent}\n     * @private\n     */\n    this.maxSourceExtent_ = maxSourceExtent;\n\n    /**\n     * @type {number}\n     * @private\n     */\n    this.errorThresholdSquared_ = errorThreshold * errorThreshold;\n\n    /**\n     * @type {Array<Triangle>}\n     * @private\n     */\n    this.triangles_ = [];\n\n    /**\n     * Indicates that the triangulation crosses edge of the source projection.\n     * @type {boolean}\n     * @private\n     */\n    this.wrapsXInSource_ = false;\n\n    /**\n     * @type {boolean}\n     * @private\n     */\n    this.canWrapXInSource_ =\n      this.sourceProj_.canWrapX() &&\n      !!maxSourceExtent &&\n      !!this.sourceProj_.getExtent() &&\n      getWidth(maxSourceExtent) >= getWidth(this.sourceProj_.getExtent());\n\n    /**\n     * @type {?number}\n     * @private\n     */\n    this.sourceWorldWidth_ = this.sourceProj_.getExtent()\n      ? getWidth(this.sourceProj_.getExtent())\n      : null;\n\n    /**\n     * @type {?number}\n     * @private\n     */\n    this.targetWorldWidth_ = this.targetProj_.getExtent()\n      ? getWidth(this.targetProj_.getExtent())\n      : null;\n\n    const destinationTopLeft = getTopLeft(targetExtent);\n    const destinationTopRight = getTopRight(targetExtent);\n    const destinationBottomRight = getBottomRight(targetExtent);\n    const destinationBottomLeft = getBottomLeft(targetExtent);\n    const sourceTopLeft = this.transformInv_(destinationTopLeft);\n    const sourceTopRight = this.transformInv_(destinationTopRight);\n    const sourceBottomRight = this.transformInv_(destinationBottomRight);\n    const sourceBottomLeft = this.transformInv_(destinationBottomLeft);\n\n    /*\n     * The maxSubdivision controls how many splittings of the target area can\n     * be done. The idea here is to do a linear mapping of the target areas\n     * but the actual overall reprojection (can be) extremely non-linear. The\n     * default value of MAX_SUBDIVISION was chosen based on mapping a 256x256\n     * tile size. However this function is also called to remap canvas rendered\n     * layers which can be much larger. This calculation increases the maxSubdivision\n     * value by the right factor so that each 256x256 pixel area has\n     * MAX_SUBDIVISION divisions.\n     */\n    const maxSubdivision =\n      MAX_SUBDIVISION +\n      (destinationResolution\n        ? Math.max(\n            0,\n            Math.ceil(\n              Math.log2(\n                getArea(targetExtent) /\n                  (destinationResolution * destinationResolution * 256 * 256),\n              ),\n            ),\n          )\n        : 0);\n\n    this.addQuad_(\n      destinationTopLeft,\n      destinationTopRight,\n      destinationBottomRight,\n      destinationBottomLeft,\n      sourceTopLeft,\n      sourceTopRight,\n      sourceBottomRight,\n      sourceBottomLeft,\n      maxSubdivision,\n    );\n\n    if (this.wrapsXInSource_) {\n      let leftBound = Infinity;\n      this.triangles_.forEach(function (triangle, i, arr) {\n        leftBound = Math.min(\n          leftBound,\n          triangle.source[0][0],\n          triangle.source[1][0],\n          triangle.source[2][0],\n        );\n      });\n\n      // Shift triangles to be as close to `leftBound` as possible\n      // (if the distance is more than `worldWidth / 2` it can be closer.\n      this.triangles_.forEach((triangle) => {\n        if (\n          Math.max(\n            triangle.source[0][0],\n            triangle.source[1][0],\n            triangle.source[2][0],\n          ) -\n            leftBound >\n          this.sourceWorldWidth_ / 2\n        ) {\n          const newTriangle = [\n            [triangle.source[0][0], triangle.source[0][1]],\n            [triangle.source[1][0], triangle.source[1][1]],\n            [triangle.source[2][0], triangle.source[2][1]],\n          ];\n          if (newTriangle[0][0] - leftBound > this.sourceWorldWidth_ / 2) {\n            newTriangle[0][0] -= this.sourceWorldWidth_;\n          }\n          if (newTriangle[1][0] - leftBound > this.sourceWorldWidth_ / 2) {\n            newTriangle[1][0] -= this.sourceWorldWidth_;\n          }\n          if (newTriangle[2][0] - leftBound > this.sourceWorldWidth_ / 2) {\n            newTriangle[2][0] -= this.sourceWorldWidth_;\n          }\n\n          // Rarely (if the extent contains both the dateline and prime meridian)\n          // the shift can in turn break some triangles.\n          // Detect this here and don't shift in such cases.\n          const minX = Math.min(\n            newTriangle[0][0],\n            newTriangle[1][0],\n            newTriangle[2][0],\n          );\n          const maxX = Math.max(\n            newTriangle[0][0],\n            newTriangle[1][0],\n            newTriangle[2][0],\n          );\n          if (maxX - minX < this.sourceWorldWidth_ / 2) {\n            triangle.source = newTriangle;\n          }\n        }\n      });\n    }\n\n    transformInvCache = {};\n  }\n\n  /**\n   * Adds triangle to the triangulation.\n   * @param {import(\"../coordinate.js\").Coordinate} a The target a coordinate.\n   * @param {import(\"../coordinate.js\").Coordinate} b The target b coordinate.\n   * @param {import(\"../coordinate.js\").Coordinate} c The target c coordinate.\n   * @param {import(\"../coordinate.js\").Coordinate} aSrc The source a coordinate.\n   * @param {import(\"../coordinate.js\").Coordinate} bSrc The source b coordinate.\n   * @param {import(\"../coordinate.js\").Coordinate} cSrc The source c coordinate.\n   * @private\n   */\n  addTriangle_(a, b, c, aSrc, bSrc, cSrc) {\n    this.triangles_.push({\n      source: [aSrc, bSrc, cSrc],\n      target: [a, b, c],\n    });\n  }\n\n  /**\n   * Adds quad (points in clock-wise order) to the triangulation\n   * (and reprojects the vertices) if valid.\n   * Performs quad subdivision if needed to increase precision.\n   *\n   * @param {import(\"../coordinate.js\").Coordinate} a The target a coordinate.\n   * @param {import(\"../coordinate.js\").Coordinate} b The target b coordinate.\n   * @param {import(\"../coordinate.js\").Coordinate} c The target c coordinate.\n   * @param {import(\"../coordinate.js\").Coordinate} d The target d coordinate.\n   * @param {import(\"../coordinate.js\").Coordinate} aSrc The source a coordinate.\n   * @param {import(\"../coordinate.js\").Coordinate} bSrc The source b coordinate.\n   * @param {import(\"../coordinate.js\").Coordinate} cSrc The source c coordinate.\n   * @param {import(\"../coordinate.js\").Coordinate} dSrc The source d coordinate.\n   * @param {number} maxSubdivision Maximal allowed subdivision of the quad.\n   * @private\n   */\n  addQuad_(a, b, c, d, aSrc, bSrc, cSrc, dSrc, maxSubdivision) {\n    const sourceQuadExtent = boundingExtent([aSrc, bSrc, cSrc, dSrc]);\n    const sourceCoverageX = this.sourceWorldWidth_\n      ? getWidth(sourceQuadExtent) / this.sourceWorldWidth_\n      : null;\n    const sourceWorldWidth = /** @type {number} */ (this.sourceWorldWidth_);\n\n    // when the quad is wrapped in the source projection\n    // it covers most of the projection extent, but not fully\n    const wrapsX =\n      this.sourceProj_.canWrapX() &&\n      sourceCoverageX > 0.5 &&\n      sourceCoverageX < 1;\n\n    let needsSubdivision = false;\n\n    if (maxSubdivision > 0) {\n      if (this.targetProj_.isGlobal() && this.targetWorldWidth_) {\n        const targetQuadExtent = boundingExtent([a, b, c, d]);\n        const targetCoverageX =\n          getWidth(targetQuadExtent) / this.targetWorldWidth_;\n        needsSubdivision =\n          targetCoverageX > MAX_TRIANGLE_WIDTH || needsSubdivision;\n      }\n      if (!wrapsX && this.sourceProj_.isGlobal() && sourceCoverageX) {\n        needsSubdivision =\n          sourceCoverageX > MAX_TRIANGLE_WIDTH || needsSubdivision;\n      }\n    }\n\n    if (!needsSubdivision && this.maxSourceExtent_) {\n      if (\n        isFinite(sourceQuadExtent[0]) &&\n        isFinite(sourceQuadExtent[1]) &&\n        isFinite(sourceQuadExtent[2]) &&\n        isFinite(sourceQuadExtent[3])\n      ) {\n        if (!intersects(sourceQuadExtent, this.maxSourceExtent_)) {\n          // whole quad outside source projection extent -> ignore\n          return;\n        }\n      }\n    }\n\n    let isNotFinite = 0;\n\n    if (!needsSubdivision) {\n      if (\n        !isFinite(aSrc[0]) ||\n        !isFinite(aSrc[1]) ||\n        !isFinite(bSrc[0]) ||\n        !isFinite(bSrc[1]) ||\n        !isFinite(cSrc[0]) ||\n        !isFinite(cSrc[1]) ||\n        !isFinite(dSrc[0]) ||\n        !isFinite(dSrc[1])\n      ) {\n        if (maxSubdivision > 0) {\n          needsSubdivision = true;\n        } else {\n          // It might be the case that only 1 of the points is infinite. In this case\n          // we can draw a single triangle with the other three points\n          isNotFinite =\n            (!isFinite(aSrc[0]) || !isFinite(aSrc[1]) ? 8 : 0) +\n            (!isFinite(bSrc[0]) || !isFinite(bSrc[1]) ? 4 : 0) +\n            (!isFinite(cSrc[0]) || !isFinite(cSrc[1]) ? 2 : 0) +\n            (!isFinite(dSrc[0]) || !isFinite(dSrc[1]) ? 1 : 0);\n          if (\n            isNotFinite != 1 &&\n            isNotFinite != 2 &&\n            isNotFinite != 4 &&\n            isNotFinite != 8\n          ) {\n            return;\n          }\n        }\n      }\n    }\n\n    if (maxSubdivision > 0) {\n      if (!needsSubdivision) {\n        const center = [(a[0] + c[0]) / 2, (a[1] + c[1]) / 2];\n        const centerSrc = this.transformInv_(center);\n\n        let dx;\n        if (wrapsX) {\n          const centerSrcEstimX =\n            (modulo(aSrc[0], sourceWorldWidth) +\n              modulo(cSrc[0], sourceWorldWidth)) /\n            2;\n          dx = centerSrcEstimX - modulo(centerSrc[0], sourceWorldWidth);\n        } else {\n          dx = (aSrc[0] + cSrc[0]) / 2 - centerSrc[0];\n        }\n        const dy = (aSrc[1] + cSrc[1]) / 2 - centerSrc[1];\n        const centerSrcErrorSquared = dx * dx + dy * dy;\n        needsSubdivision = centerSrcErrorSquared > this.errorThresholdSquared_;\n      }\n      if (needsSubdivision) {\n        if (Math.abs(a[0] - c[0]) <= Math.abs(a[1] - c[1])) {\n          // split horizontally (top & bottom)\n          const bc = [(b[0] + c[0]) / 2, (b[1] + c[1]) / 2];\n          const bcSrc = this.transformInv_(bc);\n          const da = [(d[0] + a[0]) / 2, (d[1] + a[1]) / 2];\n          const daSrc = this.transformInv_(da);\n\n          this.addQuad_(\n            a,\n            b,\n            bc,\n            da,\n            aSrc,\n            bSrc,\n            bcSrc,\n            daSrc,\n            maxSubdivision - 1,\n          );\n          this.addQuad_(\n            da,\n            bc,\n            c,\n            d,\n            daSrc,\n            bcSrc,\n            cSrc,\n            dSrc,\n            maxSubdivision - 1,\n          );\n        } else {\n          // split vertically (left & right)\n          const ab = [(a[0] + b[0]) / 2, (a[1] + b[1]) / 2];\n          const abSrc = this.transformInv_(ab);\n          const cd = [(c[0] + d[0]) / 2, (c[1] + d[1]) / 2];\n          const cdSrc = this.transformInv_(cd);\n\n          this.addQuad_(\n            a,\n            ab,\n            cd,\n            d,\n            aSrc,\n            abSrc,\n            cdSrc,\n            dSrc,\n            maxSubdivision - 1,\n          );\n          this.addQuad_(\n            ab,\n            b,\n            c,\n            cd,\n            abSrc,\n            bSrc,\n            cSrc,\n            cdSrc,\n            maxSubdivision - 1,\n          );\n        }\n        return;\n      }\n    }\n\n    if (wrapsX) {\n      if (!this.canWrapXInSource_) {\n        return;\n      }\n      this.wrapsXInSource_ = true;\n    }\n\n    // Exactly zero or one of *Src is not finite\n    // The triangles must have the diagonal line as the first side\n    // This is to allow easy code in reproj.s to make it straight for broken\n    // browsers that can't handle diagonal clipping\n    if ((isNotFinite & 0xb) == 0) {\n      this.addTriangle_(a, c, d, aSrc, cSrc, dSrc);\n    }\n    if ((isNotFinite & 0xe) == 0) {\n      this.addTriangle_(a, c, b, aSrc, cSrc, bSrc);\n    }\n    if (isNotFinite) {\n      // Try the other two triangles\n      if ((isNotFinite & 0xd) == 0) {\n        this.addTriangle_(b, d, a, bSrc, dSrc, aSrc);\n      }\n      if ((isNotFinite & 0x7) == 0) {\n        this.addTriangle_(b, d, c, bSrc, dSrc, cSrc);\n      }\n    }\n  }\n\n  /**\n   * Calculates extent of the `source` coordinates from all the triangles.\n   *\n   * @return {import(\"../extent.js\").Extent} Calculated extent.\n   */\n  calculateSourceExtent() {\n    const extent = createEmpty();\n\n    this.triangles_.forEach(function (triangle, i, arr) {\n      const src = triangle.source;\n      extendCoordinate(extent, src[0]);\n      extendCoordinate(extent, src[1]);\n      extendCoordinate(extent, src[2]);\n    });\n\n    return extent;\n  }\n\n  /**\n   * @return {Array<Triangle>} Array of the calculated triangles.\n   */\n  getTriangles() {\n    return this.triangles_;\n  }\n}\n\nexport default Triangulation;\n", "/**\n * @module ol/reproj/common\n */\n\n/**\n * Default maximum allowed threshold  (in pixels) for reprojection\n * triangulation.\n * @type {number}\n */\nexport const ERROR_THRESHOLD = 0.5;\n", "/**\n * @module ol/reproj/Tile\n */\n\nimport Tile from '../Tile.js';\nimport TileState from '../TileState.js';\nimport {releaseCanvas} from '../dom.js';\nimport {listen, unlistenByKey} from '../events.js';\nimport EventType from '../events/EventType.js';\nimport {getArea, getIntersection, getWidth, wrapAndSliceX} from '../extent.js';\nimport {clamp} from '../math.js';\nimport {\n  calculateSourceExtentResolution,\n  canvasPool,\n  render as renderReprojected,\n} from '../reproj.js';\nimport Triangulation from './Triangulation.js';\nimport {ERROR_THRESHOLD} from './common.js';\n\n/**\n * @typedef {function(number, number, number, number) : (import(\"../ImageTile.js\").default)} FunctionType\n */\n\n/**\n * @typedef {Object} TileOffset\n * @property {import(\"../ImageTile.js\").default} [tile] Tile.\n * @property {function(): import(\"../ImageTile.js\").default} getTile Tile getter.\n * @property {number} offset Offset.\n */\n\n/**\n * @classdesc\n * Class encapsulating single reprojected tile.\n * See {@link module:ol/source/TileImage~TileImage}.\n *\n */\nclass ReprojTile extends Tile {\n  /**\n   * @param {import(\"../proj/Projection.js\").default} sourceProj Source projection.\n   * @param {import(\"../tilegrid/TileGrid.js\").default} sourceTileGrid Source tile grid.\n   * @param {import(\"../proj/Projection.js\").default} targetProj Target projection.\n   * @param {import(\"../tilegrid/TileGrid.js\").default} targetTileGrid Target tile grid.\n   * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Coordinate of the tile.\n   * @param {import(\"../tilecoord.js\").TileCoord} wrappedTileCoord Coordinate of the tile wrapped in X.\n   * @param {number} pixelRatio Pixel ratio.\n   * @param {number} gutter Gutter of the source tiles.\n   * @param {FunctionType} getTileFunction\n   *     Function returning source tiles (z, x, y, pixelRatio).\n   * @param {number} [errorThreshold] Acceptable reprojection error (in px).\n   * @param {boolean} [renderEdges] Render reprojection edges.\n   * @param {import(\"../Tile.js\").Options} [options] Tile options.\n   */\n  constructor(\n    sourceProj,\n    sourceTileGrid,\n    targetProj,\n    targetTileGrid,\n    tileCoord,\n    wrappedTileCoord,\n    pixelRatio,\n    gutter,\n    getTileFunction,\n    errorThreshold,\n    renderEdges,\n    options,\n  ) {\n    super(tileCoord, TileState.IDLE, options);\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.renderEdges_ = renderEdges !== undefined ? renderEdges : false;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.pixelRatio_ = pixelRatio;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.gutter_ = gutter;\n\n    /**\n     * @private\n     * @type {HTMLCanvasElement|OffscreenCanvas}\n     */\n    this.canvas_ = null;\n\n    /**\n     * @private\n     * @type {import(\"../tilegrid/TileGrid.js\").default}\n     */\n    this.sourceTileGrid_ = sourceTileGrid;\n\n    /**\n     * @private\n     * @type {import(\"../tilegrid/TileGrid.js\").default}\n     */\n    this.targetTileGrid_ = targetTileGrid;\n\n    /**\n     * @private\n     * @type {import(\"../tilecoord.js\").TileCoord}\n     */\n    this.wrappedTileCoord_ = wrappedTileCoord ? wrappedTileCoord : tileCoord;\n\n    /**\n     * @private\n     * @type {!Array<TileOffset>}\n     */\n    this.sourceTiles_ = [];\n\n    /**\n     * @private\n     * @type {?Array<import(\"../events.js\").EventsKey>}\n     */\n    this.sourcesListenerKeys_ = null;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.sourceZ_ = 0;\n\n    /**\n     * @private\n     * @type {import(\"../extent.js\").Extent}\n     */\n    this.clipExtent_ = sourceProj.canWrapX()\n      ? sourceProj.getExtent()\n      : undefined;\n\n    const targetExtent = targetTileGrid.getTileCoordExtent(\n      this.wrappedTileCoord_,\n    );\n    const maxTargetExtent = this.targetTileGrid_.getExtent();\n    let maxSourceExtent = this.sourceTileGrid_.getExtent();\n\n    const limitedTargetExtent = maxTargetExtent\n      ? getIntersection(targetExtent, maxTargetExtent)\n      : targetExtent;\n\n    if (getArea(limitedTargetExtent) === 0) {\n      // Tile is completely outside range -> EMPTY\n      // TODO: is it actually correct that the source even creates the tile ?\n      this.state = TileState.EMPTY;\n      return;\n    }\n\n    const sourceProjExtent = sourceProj.getExtent();\n    if (sourceProjExtent) {\n      if (!maxSourceExtent) {\n        maxSourceExtent = sourceProjExtent;\n      } else {\n        maxSourceExtent = getIntersection(maxSourceExtent, sourceProjExtent);\n      }\n    }\n\n    const targetResolution = targetTileGrid.getResolution(\n      this.wrappedTileCoord_[0],\n    );\n\n    const sourceResolution = calculateSourceExtentResolution(\n      sourceProj,\n      targetProj,\n      limitedTargetExtent,\n      targetResolution,\n    );\n\n    if (!isFinite(sourceResolution) || sourceResolution <= 0) {\n      // invalid sourceResolution -> EMPTY\n      // probably edges of the projections when no extent is defined\n      this.state = TileState.EMPTY;\n      return;\n    }\n\n    const errorThresholdInPixels =\n      errorThreshold !== undefined ? errorThreshold : ERROR_THRESHOLD;\n\n    /**\n     * @private\n     * @type {!import(\"./Triangulation.js\").default}\n     */\n    this.triangulation_ = new Triangulation(\n      sourceProj,\n      targetProj,\n      limitedTargetExtent,\n      maxSourceExtent,\n      sourceResolution * errorThresholdInPixels,\n      targetResolution,\n    );\n\n    if (this.triangulation_.getTriangles().length === 0) {\n      // no valid triangles -> EMPTY\n      this.state = TileState.EMPTY;\n      return;\n    }\n\n    this.sourceZ_ = sourceTileGrid.getZForResolution(sourceResolution);\n    let sourceExtent = this.triangulation_.calculateSourceExtent();\n\n    if (maxSourceExtent) {\n      if (sourceProj.canWrapX()) {\n        sourceExtent[1] = clamp(\n          sourceExtent[1],\n          maxSourceExtent[1],\n          maxSourceExtent[3],\n        );\n        sourceExtent[3] = clamp(\n          sourceExtent[3],\n          maxSourceExtent[1],\n          maxSourceExtent[3],\n        );\n      } else {\n        sourceExtent = getIntersection(sourceExtent, maxSourceExtent);\n      }\n    }\n\n    if (!getArea(sourceExtent)) {\n      this.state = TileState.EMPTY;\n    } else {\n      let worldWidth = 0;\n      let worldsAway = 0;\n      if (sourceProj.canWrapX()) {\n        worldWidth = getWidth(sourceProjExtent);\n        worldsAway = Math.floor(\n          (sourceExtent[0] - sourceProjExtent[0]) / worldWidth,\n        );\n      }\n\n      const sourceExtents = wrapAndSliceX(\n        sourceExtent.slice(),\n        sourceProj,\n        true,\n      );\n      sourceExtents.forEach((extent) => {\n        const sourceRange = sourceTileGrid.getTileRangeForExtentAndZ(\n          extent,\n          this.sourceZ_,\n        );\n\n        for (let srcX = sourceRange.minX; srcX <= sourceRange.maxX; srcX++) {\n          for (let srcY = sourceRange.minY; srcY <= sourceRange.maxY; srcY++) {\n            const offset = worldsAway * worldWidth;\n            this.sourceTiles_.push({\n              getTile: () =>\n                getTileFunction(this.sourceZ_, srcX, srcY, pixelRatio),\n              offset,\n            });\n          }\n        }\n        ++worldsAway;\n      });\n\n      if (this.sourceTiles_.length === 0) {\n        this.state = TileState.EMPTY;\n      }\n    }\n  }\n\n  /**\n   * Get the HTML Canvas element for this tile.\n   * @return {HTMLCanvasElement|OffscreenCanvas} Canvas.\n   */\n  getImage() {\n    return this.canvas_;\n  }\n\n  /**\n   * @private\n   */\n  reproject_() {\n    const sources = [];\n    this.sourceTiles_.forEach((source) => {\n      const tile = source.tile;\n      if (tile && tile.getState() == TileState.LOADED) {\n        const extent = this.sourceTileGrid_.getTileCoordExtent(tile.tileCoord);\n        extent[0] += source.offset;\n        extent[2] += source.offset;\n        const clipExtent = this.clipExtent_?.slice();\n        if (clipExtent) {\n          clipExtent[0] += source.offset;\n          clipExtent[2] += source.offset;\n        }\n        sources.push({\n          extent: extent,\n          clipExtent: clipExtent,\n          image: tile.getImage(),\n        });\n      }\n    });\n    this.sourceTiles_.length = 0;\n\n    if (sources.length === 0) {\n      this.state = TileState.ERROR;\n    } else {\n      const z = this.wrappedTileCoord_[0];\n      const size = this.targetTileGrid_.getTileSize(z);\n      const width = typeof size === 'number' ? size : size[0];\n      const height = typeof size === 'number' ? size : size[1];\n      const targetResolution = this.targetTileGrid_.getResolution(z);\n      const sourceResolution = this.sourceTileGrid_.getResolution(\n        this.sourceZ_,\n      );\n\n      const targetExtent = this.targetTileGrid_.getTileCoordExtent(\n        this.wrappedTileCoord_,\n      );\n\n      this.canvas_ = renderReprojected(\n        width,\n        height,\n        this.pixelRatio_,\n        sourceResolution,\n        this.sourceTileGrid_.getExtent(),\n        targetResolution,\n        targetExtent,\n        this.triangulation_,\n        sources,\n        this.gutter_,\n        this.renderEdges_,\n        this.interpolate,\n      );\n\n      this.state = TileState.LOADED;\n    }\n    this.changed();\n  }\n\n  /**\n   * Load not yet loaded URI.\n   * @override\n   */\n  load() {\n    for (const sourceTile of this.sourceTiles_) {\n      sourceTile.tile = sourceTile.getTile();\n    }\n    if (this.state == TileState.IDLE) {\n      this.state = TileState.LOADING;\n      this.changed();\n\n      let leftToLoad = 0;\n\n      this.sourcesListenerKeys_ = [];\n      this.sourceTiles_.forEach(({tile}) => {\n        const state = tile.getState();\n        if (state == TileState.IDLE || state == TileState.LOADING) {\n          leftToLoad++;\n\n          const sourceListenKey = listen(tile, EventType.CHANGE, (e) => {\n            const state = tile.getState();\n            if (\n              state == TileState.LOADED ||\n              state == TileState.ERROR ||\n              state == TileState.EMPTY\n            ) {\n              unlistenByKey(sourceListenKey);\n              leftToLoad--;\n              if (leftToLoad === 0) {\n                this.unlistenSources_();\n                this.reproject_();\n              }\n            }\n          });\n          this.sourcesListenerKeys_.push(sourceListenKey);\n        }\n      });\n\n      if (leftToLoad === 0) {\n        setTimeout(this.reproject_.bind(this), 0);\n      } else {\n        this.sourceTiles_.forEach(function ({tile}, i, arr) {\n          const state = tile.getState();\n          if (state == TileState.IDLE) {\n            tile.load();\n          }\n        });\n      }\n    }\n  }\n\n  /**\n   * @private\n   */\n  unlistenSources_() {\n    this.sourcesListenerKeys_.forEach(unlistenByKey);\n    this.sourcesListenerKeys_ = null;\n  }\n\n  /**\n   * Remove from the cache due to expiry\n   * @override\n   */\n  release() {\n    if (this.canvas_) {\n      releaseCanvas(\n        /** @type {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} */ (\n          this.canvas_.getContext('2d')\n        ),\n      );\n      canvasPool.push(this.canvas_);\n      this.canvas_ = null;\n    }\n    this.sourceTiles_.length = 0;\n    super.release();\n  }\n}\n\nexport default ReprojTile;\n", "/**\n * @module ol/structs/LRUCache\n */\n\nimport Disposable from '../Disposable.js';\nimport {assert} from '../asserts.js';\n\n/**\n * @typedef {Object} Entry\n * @property {string} key_ Key.\n * @property {Entry|null} newer Newer.\n * @property {Entry|null} older Older.\n * @property {*} value_ Value.\n */\n\n/**\n * @classdesc\n * Implements a Least-Recently-Used cache where the keys do not conflict with\n * Object's properties (e.g. 'hasOwnProperty' is not allowed as a key). Expiring\n * items from the cache is the responsibility of the user.\n *\n * @fires import(\"../events/Event.js\").default\n * @template T\n */\nclass LRUCache {\n  /**\n   * @param {number} [highWaterMark] High water mark.\n   */\n  constructor(highWaterMark) {\n    /**\n     * Desired max cache size after expireCache(). If set to 0, no cache entries\n     * will be pruned at all.\n     * @type {number}\n     */\n    this.highWaterMark = highWaterMark !== undefined ? highWaterMark : 2048;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.count_ = 0;\n\n    /**\n     * @private\n     * @type {!Object<string, Entry>}\n     */\n    this.entries_ = {};\n\n    /**\n     * @private\n     * @type {?Entry}\n     */\n    this.oldest_ = null;\n\n    /**\n     * @private\n     * @type {?Entry}\n     */\n    this.newest_ = null;\n  }\n\n  deleteOldest() {\n    const entry = this.pop();\n    if (entry instanceof Disposable) {\n      entry.dispose();\n    }\n  }\n\n  /**\n   * @return {boolean} Can expire cache.\n   */\n  canExpireCache() {\n    return this.highWaterMark > 0 && this.getCount() > this.highWaterMark;\n  }\n\n  /**\n   * Expire the cache. When the cache entry is a {@link module:ol/Disposable~Disposable},\n   * the entry will be disposed.\n   * @param {!Object<string, boolean>} [keep] Keys to keep. To be implemented by subclasses.\n   */\n  expireCache(keep) {\n    while (this.canExpireCache()) {\n      this.deleteOldest();\n    }\n  }\n\n  /**\n   * FIXME empty description for jsdoc\n   */\n  clear() {\n    while (this.oldest_) {\n      this.deleteOldest();\n    }\n  }\n\n  /**\n   * @param {string} key Key.\n   * @return {boolean} Contains key.\n   */\n  containsKey(key) {\n    return this.entries_.hasOwnProperty(key);\n  }\n\n  /**\n   * @param {function(T, string, LRUCache<T>): ?} f The function\n   *     to call for every entry from the oldest to the newer. This function takes\n   *     3 arguments (the entry value, the entry key and the LRUCache object).\n   *     The return value is ignored.\n   */\n  forEach(f) {\n    let entry = this.oldest_;\n    while (entry) {\n      f(entry.value_, entry.key_, this);\n      entry = entry.newer;\n    }\n  }\n\n  /**\n   * @param {string} key Key.\n   * @param {*} [options] Options (reserved for subclasses).\n   * @return {T} Value.\n   */\n  get(key, options) {\n    const entry = this.entries_[key];\n    assert(\n      entry !== undefined,\n      'Tried to get a value for a key that does not exist in the cache',\n    );\n    if (entry === this.newest_) {\n      return entry.value_;\n    }\n    if (entry === this.oldest_) {\n      this.oldest_ = /** @type {Entry} */ (this.oldest_.newer);\n      this.oldest_.older = null;\n    } else {\n      entry.newer.older = entry.older;\n      entry.older.newer = entry.newer;\n    }\n    entry.newer = null;\n    entry.older = this.newest_;\n    this.newest_.newer = entry;\n    this.newest_ = entry;\n    return entry.value_;\n  }\n\n  /**\n   * Remove an entry from the cache.\n   * @param {string} key The entry key.\n   * @return {T} The removed entry.\n   */\n  remove(key) {\n    const entry = this.entries_[key];\n    assert(\n      entry !== undefined,\n      'Tried to get a value for a key that does not exist in the cache',\n    );\n    if (entry === this.newest_) {\n      this.newest_ = /** @type {Entry} */ (entry.older);\n      if (this.newest_) {\n        this.newest_.newer = null;\n      }\n    } else if (entry === this.oldest_) {\n      this.oldest_ = /** @type {Entry} */ (entry.newer);\n      if (this.oldest_) {\n        this.oldest_.older = null;\n      }\n    } else {\n      entry.newer.older = entry.older;\n      entry.older.newer = entry.newer;\n    }\n    delete this.entries_[key];\n    --this.count_;\n    return entry.value_;\n  }\n\n  /**\n   * @return {number} Count.\n   */\n  getCount() {\n    return this.count_;\n  }\n\n  /**\n   * @return {Array<string>} Keys.\n   */\n  getKeys() {\n    const keys = new Array(this.count_);\n    let i = 0;\n    let entry;\n    for (entry = this.newest_; entry; entry = entry.older) {\n      keys[i++] = entry.key_;\n    }\n    return keys;\n  }\n\n  /**\n   * @return {Array<T>} Values.\n   */\n  getValues() {\n    const values = new Array(this.count_);\n    let i = 0;\n    let entry;\n    for (entry = this.newest_; entry; entry = entry.older) {\n      values[i++] = entry.value_;\n    }\n    return values;\n  }\n\n  /**\n   * @return {T} Last value.\n   */\n  peekLast() {\n    return this.oldest_.value_;\n  }\n\n  /**\n   * @return {string} Last key.\n   */\n  peekLastKey() {\n    return this.oldest_.key_;\n  }\n\n  /**\n   * Get the key of the newest item in the cache.  Throws if the cache is empty.\n   * @return {string} The newest key.\n   */\n  peekFirstKey() {\n    return this.newest_.key_;\n  }\n\n  /**\n   * Return an entry without updating least recently used time.\n   * @param {string} key Key.\n   * @return {T|undefined} Value.\n   */\n  peek(key) {\n    return this.entries_[key]?.value_;\n  }\n\n  /**\n   * @return {T} value Value.\n   */\n  pop() {\n    const entry = this.oldest_;\n    delete this.entries_[entry.key_];\n    if (entry.newer) {\n      entry.newer.older = null;\n    }\n    this.oldest_ = /** @type {Entry} */ (entry.newer);\n    if (!this.oldest_) {\n      this.newest_ = null;\n    }\n    --this.count_;\n    return entry.value_;\n  }\n\n  /**\n   * @param {string} key Key.\n   * @param {T} value Value.\n   */\n  replace(key, value) {\n    this.get(key); // update `newest_`\n    this.entries_[key].value_ = value;\n  }\n\n  /**\n   * @param {string} key Key.\n   * @param {T} value Value.\n   */\n  set(key, value) {\n    assert(\n      !(key in this.entries_),\n      'Tried to set a value for a key that is used already',\n    );\n    const entry = {\n      key_: key,\n      newer: null,\n      older: this.newest_,\n      value_: value,\n    };\n    if (!this.newest_) {\n      this.oldest_ = entry;\n    } else {\n      this.newest_.newer = entry;\n    }\n    this.newest_ = entry;\n    this.entries_[key] = entry;\n    ++this.count_;\n  }\n\n  /**\n   * Set a maximum number of entries for the cache.\n   * @param {number} size Cache size.\n   * @api\n   */\n  setSize(size) {\n    this.highWaterMark = size;\n  }\n}\n\nexport default LRUCache;\n", "/**\n * @module ol/tilecoord\n */\n\nimport {getUid} from './util.js';\n\n/**\n * An array of three numbers representing the location of a tile in a tile\n * grid. The order is `z` (zoom level), `x` (column), and `y` (row).\n * @typedef {Array<number>} TileCoord\n * @api\n */\n\n/**\n * @param {number} z Z.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {TileCoord} [tileCoord] Tile coordinate.\n * @return {TileCoord} Tile coordinate.\n */\nexport function createOrUpdate(z, x, y, tileCoord) {\n  if (tileCoord !== undefined) {\n    tileCoord[0] = z;\n    tileCoord[1] = x;\n    tileCoord[2] = y;\n    return tileCoord;\n  }\n  return [z, x, y];\n}\n\n/**\n * @param {number} z Z.\n * @param {number} x X.\n * @param {number} y Y.\n * @return {string} Key.\n */\nexport function getKeyZXY(z, x, y) {\n  return z + '/' + x + '/' + y;\n}\n\n/**\n * Get the key for a tile coord.\n * @param {TileCoord} tileCoord The tile coord.\n * @return {string} Key.\n */\nexport function getKey(tileCoord) {\n  return getKeyZXY(tileCoord[0], tileCoord[1], tileCoord[2]);\n}\n\n/**\n * Get the tile cache key for a tile key obtained through `tile.getKey()`.\n * @param {string} tileKey The tile key.\n * @return {string} The cache key.\n */\nexport function getCacheKeyForTileKey(tileKey) {\n  const [z, x, y] = tileKey\n    .substring(tileKey.lastIndexOf('/') + 1, tileKey.length)\n    .split(',')\n    .map(Number);\n  return getKeyZXY(z, x, y);\n}\n\n/**\n * @param {import(\"./source/Tile.js\").default} source The tile source.\n * @param {string} sourceKey The source key.\n * @param {number} z The tile z level.\n * @param {number} x The tile x level.\n * @param {number} y The tile y level.\n * @return {string} The cache key.\n */\nexport function getCacheKey(source, sourceKey, z, x, y) {\n  return `${getUid(source)},${sourceKey},${getKeyZXY(z, x, y)}`;\n}\n\n/**\n * Get a tile coord given a key.\n * @param {string} key The tile coord key.\n * @return {TileCoord} The tile coord.\n */\nexport function fromKey(key) {\n  return key.split('/').map(Number);\n}\n\n/**\n * @param {TileCoord} tileCoord Tile coord.\n * @return {number} Hash.\n */\nexport function hash(tileCoord) {\n  return hashZXY(tileCoord[0], tileCoord[1], tileCoord[2]);\n}\n\n/**\n * @param {number} z The tile z coordinate.\n * @param {number} x The tile x coordinate.\n * @param {number} y The tile y coordinate.\n * @return {number} Hash.\n */\nexport function hashZXY(z, x, y) {\n  return (x << z) + y;\n}\n\n/**\n * @param {TileCoord} tileCoord Tile coordinate.\n * @param {!import(\"./tilegrid/TileGrid.js\").default} tileGrid Tile grid.\n * @return {boolean} Tile coordinate is within extent and zoom level range.\n */\nexport function withinExtentAndZ(tileCoord, tileGrid) {\n  const z = tileCoord[0];\n  const x = tileCoord[1];\n  const y = tileCoord[2];\n\n  if (tileGrid.getMinZoom() > z || z > tileGrid.getMaxZoom()) {\n    return false;\n  }\n  const tileRange = tileGrid.getFullTileRange(z);\n  if (!tileRange) {\n    return true;\n  }\n  return tileRange.containsXY(x, y);\n}\n", "/**\n * @module ol/renderer/canvas/TileLayer\n */\nimport DataTile, {asImageLike} from '../../DataTile.js';\nimport ImageTile from '../../ImageTile.js';\nimport TileRange from '../../TileRange.js';\nimport TileState from '../../TileState.js';\nimport {ascending} from '../../array.js';\nimport {\n  containsCoordinate,\n  createEmpty,\n  equals,\n  getIntersection,\n  getRotatedViewport,\n  getTopLeft,\n  intersects,\n  subtractExtents,\n} from '../../extent.js';\nimport {equivalent, fromUserExtent} from '../../proj.js';\nimport ReprojTile from '../../reproj/Tile.js';\nimport {toSize} from '../../size.js';\nimport LRUCache from '../../structs/LRUCache.js';\nimport {\n  createOrUpdate as createTileCoord,\n  getCacheKey,\n} from '../../tilecoord.js';\nimport {\n  apply as applyTransform,\n  compose as composeTransform,\n} from '../../transform.js';\nimport {getUid} from '../../util.js';\nimport CanvasLayerRenderer from './Layer.js';\n\n/**\n * @typedef {Object<number, Set<import(\"../../Tile.js\").default>>} TileLookup\n */\n\n/**\n * Add a tile to the lookup.\n * @param {TileLookup} tilesByZ Lookup of tiles by zoom level.\n * @param {import(\"../../Tile.js\").default} tile A tile.\n * @param {number} z The zoom level.\n * @return {boolean} The tile was added to the lookup.\n */\nfunction addTileToLookup(tilesByZ, tile, z) {\n  if (!(z in tilesByZ)) {\n    tilesByZ[z] = new Set([tile]);\n    return true;\n  }\n  const set = tilesByZ[z];\n  const existing = set.has(tile);\n  if (!existing) {\n    set.add(tile);\n  }\n  return !existing;\n}\n\n/**\n * Remove a tile from the lookup.\n * @param {TileLookup} tilesByZ Lookup of tiles by zoom level.\n * @param {import(\"../../Tile.js\").default} tile A tile.\n * @param {number} z The zoom level.\n * @return {boolean} The tile was removed from the lookup.\n */\nfunction removeTileFromLookup(tilesByZ, tile, z) {\n  const set = tilesByZ[z];\n  if (set) {\n    return set.delete(tile);\n  }\n  return false;\n}\n\n/**\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @param {import(\"../../extent.js\").Extent} extent The frame extent.\n * @return {import(\"../../extent.js\").Extent} Frame extent intersected with layer extents.\n */\nfunction getRenderExtent(frameState, extent) {\n  const layerState = frameState.layerStatesArray[frameState.layerIndex];\n  if (layerState.extent) {\n    extent = getIntersection(\n      extent,\n      fromUserExtent(layerState.extent, frameState.viewState.projection),\n    );\n  }\n  const source = /** @type {import(\"../../source/Tile.js\").default} */ (\n    layerState.layer.getRenderSource()\n  );\n  if (!source.getWrapX()) {\n    const gridExtent = source\n      .getTileGridForProjection(frameState.viewState.projection)\n      .getExtent();\n    if (gridExtent) {\n      extent = getIntersection(extent, gridExtent);\n    }\n  }\n  return extent;\n}\n\n/**\n * @typedef {Object} Options\n * @property {number} [cacheSize=512] The cache size.\n */\n\n/**\n * @classdesc\n * Canvas renderer for tile layers.\n * @api\n * @template {import(\"../../layer/Tile.js\").default|import(\"../../layer/VectorTile.js\").default} [LayerType=import(\"../../layer/Tile.js\").default<import(\"../../source/Tile.js\").default>|import(\"../../layer/VectorTile.js\").default]\n * @extends {CanvasLayerRenderer<LayerType>}\n */\nclass CanvasTileLayerRenderer extends CanvasLayerRenderer {\n  /**\n   * @param {LayerType} tileLayer Tile layer.\n   * @param {Options} [options] Options.\n   */\n  constructor(tileLayer, options) {\n    super(tileLayer);\n\n    options = options || {};\n\n    /**\n     * Rendered extent has changed since the previous `renderFrame()` call\n     * @type {boolean}\n     */\n    this.extentChanged = true;\n\n    /**\n     * The last call to `renderFrame` was completed with all tiles loaded\n     * @type {boolean}\n     */\n    this.renderComplete = false;\n\n    /**\n     * @private\n     * @type {?import(\"../../extent.js\").Extent}\n     */\n    this.renderedExtent_ = null;\n\n    /**\n     * @protected\n     * @type {number}\n     */\n    this.renderedPixelRatio;\n\n    /**\n     * @protected\n     * @type {import(\"../../proj/Projection.js\").default|null}\n     */\n    this.renderedProjection = null;\n\n    /**\n     * @protected\n     * @type {!Array<import(\"../../Tile.js\").default>}\n     */\n    this.renderedTiles = [];\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.renderedSourceRevision_;\n\n    /**\n     * @protected\n     * @type {import(\"../../extent.js\").Extent}\n     */\n    this.tempExtent = createEmpty();\n\n    /**\n     * @private\n     * @type {import(\"../../TileRange.js\").default}\n     */\n    this.tempTileRange_ = new TileRange(0, 0, 0, 0);\n\n    /**\n     * @type {import(\"../../tilecoord.js\").TileCoord}\n     * @private\n     */\n    this.tempTileCoord_ = createTileCoord(0, 0, 0);\n\n    const cacheSize = options.cacheSize !== undefined ? options.cacheSize : 512;\n\n    /**\n     * @type {import(\"../../structs/LRUCache.js\").default<import(\"../../Tile.js\").default>}\n     * @private\n     */\n    this.tileCache_ = new LRUCache(cacheSize);\n\n    /**\n     * @type {import(\"../../structs/LRUCache.js\").default<import(\"../../Tile.js\").default|null>}\n     * @private\n     */\n    this.sourceTileCache_ = null;\n\n    /**\n     * @protected\n     * @type {import(\"../../extent.js\").Extent|null}\n     */\n    this.layerExtent = null;\n\n    this.maxStaleKeys = cacheSize * 0.5;\n  }\n\n  /**\n   * @return {LRUCache} Tile cache.\n   */\n  getTileCache() {\n    return this.tileCache_;\n  }\n\n  /**\n   * @return {LRUCache} Tile cache.\n   */\n  getSourceTileCache() {\n    if (!this.sourceTileCache_) {\n      this.sourceTileCache_ = new LRUCache(512);\n    }\n    return this.sourceTileCache_;\n  }\n\n  /**\n   * Get a tile from the cache or create one if needed.\n   *\n   * @param {number} z Tile coordinate z.\n   * @param {number} x Tile coordinate x.\n   * @param {number} y Tile coordinate y.\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   * @return {import(\"../../Tile.js\").default|null} Tile (or null if outside source extent).\n   * @protected\n   */\n  getOrCreateTile(z, x, y, frameState) {\n    const tileCache = this.tileCache_;\n    const tileLayer = this.getLayer();\n    const tileSource = tileLayer.getSource();\n    const cacheKey = getCacheKey(tileSource, tileSource.getKey(), z, x, y);\n\n    /** @type {import(\"../../Tile.js\").default} */\n    let tile;\n\n    if (tileCache.containsKey(cacheKey)) {\n      tile = tileCache.get(cacheKey);\n    } else {\n      const projection = frameState.viewState.projection;\n      const sourceProjection = tileSource.getProjection();\n      tile = tileSource.getTile(\n        z,\n        x,\n        y,\n        frameState.pixelRatio,\n        projection,\n        !sourceProjection || equivalent(sourceProjection, projection)\n          ? undefined\n          : this.getSourceTileCache(),\n      );\n      if (!tile) {\n        return null;\n      }\n      tileCache.set(cacheKey, tile);\n    }\n    return tile;\n  }\n\n  /**\n   * @param {number} z Tile coordinate z.\n   * @param {number} x Tile coordinate x.\n   * @param {number} y Tile coordinate y.\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   * @return {import(\"../../Tile.js\").default|null} Tile (or null if outside source extent).\n   * @protected\n   */\n  getTile(z, x, y, frameState) {\n    const tile = this.getOrCreateTile(z, x, y, frameState);\n    if (!tile) {\n      return null;\n    }\n    return tile;\n  }\n\n  /**\n   * @param {import(\"../../pixel.js\").Pixel} pixel Pixel.\n   * @return {Uint8ClampedArray} Data at the pixel location.\n   * @override\n   */\n  getData(pixel) {\n    const frameState = this.frameState;\n    if (!frameState) {\n      return null;\n    }\n\n    const layer = this.getLayer();\n    const coordinate = applyTransform(\n      frameState.pixelToCoordinateTransform,\n      pixel.slice(),\n    );\n\n    const layerExtent = layer.getExtent();\n    if (layerExtent) {\n      if (!containsCoordinate(layerExtent, coordinate)) {\n        return null;\n      }\n    }\n\n    const viewState = frameState.viewState;\n    const source = layer.getRenderSource();\n    const tileGrid = source.getTileGridForProjection(viewState.projection);\n    const tilePixelRatio = source.getTilePixelRatio(frameState.pixelRatio);\n\n    for (\n      let z = tileGrid.getZForResolution(viewState.resolution);\n      z >= tileGrid.getMinZoom();\n      --z\n    ) {\n      const tileCoord = tileGrid.getTileCoordForCoordAndZ(coordinate, z);\n      const tile = this.getTile(z, tileCoord[1], tileCoord[2], frameState);\n      if (!tile || tile.getState() !== TileState.LOADED) {\n        continue;\n      }\n\n      const tileOrigin = tileGrid.getOrigin(z);\n      const tileSize = toSize(tileGrid.getTileSize(z));\n      const tileResolution = tileGrid.getResolution(z);\n\n      /**\n       * @type {import('../../DataTile.js').ImageLike}\n       */\n      let image;\n      if (tile instanceof ImageTile || tile instanceof ReprojTile) {\n        image = tile.getImage();\n      } else if (tile instanceof DataTile) {\n        image = asImageLike(tile.getData());\n        if (!image) {\n          continue;\n        }\n      } else {\n        continue;\n      }\n\n      const col = Math.floor(\n        tilePixelRatio *\n          ((coordinate[0] - tileOrigin[0]) / tileResolution -\n            tileCoord[1] * tileSize[0]),\n      );\n\n      const row = Math.floor(\n        tilePixelRatio *\n          ((tileOrigin[1] - coordinate[1]) / tileResolution -\n            tileCoord[2] * tileSize[1]),\n      );\n\n      const gutter = Math.round(\n        tilePixelRatio * source.getGutterForProjection(viewState.projection),\n      );\n\n      return this.getImageData(image, col + gutter, row + gutter);\n    }\n\n    return null;\n  }\n\n  /**\n   * Determine whether render should be called.\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   * @return {boolean} Layer is ready to be rendered.\n   * @override\n   */\n  prepareFrame(frameState) {\n    if (!this.renderedProjection) {\n      this.renderedProjection = frameState.viewState.projection;\n    } else if (frameState.viewState.projection !== this.renderedProjection) {\n      this.tileCache_.clear();\n      this.renderedProjection = frameState.viewState.projection;\n    }\n\n    const source = this.getLayer().getSource();\n    if (!source) {\n      return false;\n    }\n    const sourceRevision = source.getRevision();\n    if (!this.renderedSourceRevision_) {\n      this.renderedSourceRevision_ = sourceRevision;\n    } else if (this.renderedSourceRevision_ !== sourceRevision) {\n      this.renderedSourceRevision_ = sourceRevision;\n      if (this.renderedSourceKey_ === source.getKey()) {\n        this.tileCache_.clear();\n        this.sourceTileCache_?.clear();\n      }\n    }\n    return true;\n  }\n\n  /**\n   * Determine whether tiles for next extent should be enqueued for rendering.\n   * @return {boolean} Rendering tiles for next extent is supported.\n   * @protected\n   */\n  enqueueTilesForNextExtent() {\n    return true;\n  }\n\n  /**\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   * @param {import(\"../../extent.js\").Extent} extent The extent to be rendered.\n   * @param {number} initialZ The zoom level.\n   * @param {TileLookup} tilesByZ Lookup of tiles by zoom level.\n   * @param {number} preload Number of additional levels to load.\n   */\n  enqueueTiles(frameState, extent, initialZ, tilesByZ, preload) {\n    const viewState = frameState.viewState;\n    const tileLayer = this.getLayer();\n    const tileSource = tileLayer.getRenderSource();\n    const tileGrid = tileSource.getTileGridForProjection(viewState.projection);\n\n    const tileSourceKey = getUid(tileSource);\n    if (!(tileSourceKey in frameState.wantedTiles)) {\n      frameState.wantedTiles[tileSourceKey] = {};\n    }\n\n    const wantedTiles = frameState.wantedTiles[tileSourceKey];\n\n    const map = tileLayer.getMapInternal();\n    const minZ = Math.max(\n      initialZ - preload,\n      tileGrid.getMinZoom(),\n      tileGrid.getZForResolution(\n        Math.min(\n          tileLayer.getMaxResolution(),\n          map\n            ? map\n                .getView()\n                .getResolutionForZoom(Math.max(tileLayer.getMinZoom(), 0))\n            : tileGrid.getResolution(0),\n        ),\n        tileSource.zDirection,\n      ),\n    );\n    const rotation = viewState.rotation;\n    const viewport = rotation\n      ? getRotatedViewport(\n          viewState.center,\n          viewState.resolution,\n          rotation,\n          frameState.size,\n        )\n      : undefined;\n    for (let z = initialZ; z >= minZ; --z) {\n      const tileRange = tileGrid.getTileRangeForExtentAndZ(\n        extent,\n        z,\n        this.tempTileRange_,\n      );\n\n      const tileResolution = tileGrid.getResolution(z);\n\n      for (let x = tileRange.minX; x <= tileRange.maxX; ++x) {\n        for (let y = tileRange.minY; y <= tileRange.maxY; ++y) {\n          if (\n            rotation &&\n            !tileGrid.tileCoordIntersectsViewport([z, x, y], viewport)\n          ) {\n            continue;\n          }\n          const tile = this.getTile(z, x, y, frameState);\n          if (!tile) {\n            continue;\n          }\n          const added = addTileToLookup(tilesByZ, tile, z);\n          if (!added) {\n            continue;\n          }\n\n          const tileQueueKey = tile.getKey();\n          wantedTiles[tileQueueKey] = true;\n\n          if (tile.getState() === TileState.IDLE) {\n            if (!frameState.tileQueue.isKeyQueued(tileQueueKey)) {\n              const tileCoord = createTileCoord(z, x, y, this.tempTileCoord_);\n              frameState.tileQueue.enqueue([\n                tile,\n                tileSourceKey,\n                tileGrid.getTileCoordCenter(tileCoord),\n                tileResolution,\n              ]);\n            }\n          }\n        }\n      }\n    }\n  }\n\n  /**\n   * Look for tiles covering the provided tile coordinate at an alternate\n   * zoom level.  Loaded tiles will be added to the provided tile texture lookup.\n   * @param {import(\"../../tilecoord.js\").TileCoord} tileCoord The target tile coordinate.\n   * @param {TileLookup} tilesByZ Lookup of tiles by zoom level.\n   * @return {boolean} The tile coordinate is covered by loaded tiles at the alternate zoom level.\n   * @private\n   */\n  findStaleTile_(tileCoord, tilesByZ) {\n    const tileCache = this.tileCache_;\n    const z = tileCoord[0];\n    const x = tileCoord[1];\n    const y = tileCoord[2];\n    const staleKeys = this.getStaleKeys();\n    for (let i = 0; i < staleKeys.length; ++i) {\n      const cacheKey = getCacheKey(\n        this.getLayer().getSource(),\n        staleKeys[i],\n        z,\n        x,\n        y,\n      );\n      if (tileCache.containsKey(cacheKey)) {\n        const tile = tileCache.peek(cacheKey);\n        if (tile.getState() === TileState.LOADED) {\n          tile.endTransition(getUid(this));\n          addTileToLookup(tilesByZ, tile, z);\n          return true;\n        }\n      }\n    }\n    return false;\n  }\n\n  /**\n   * Look for tiles covering the provided tile coordinate at an alternate\n   * zoom level.  Loaded tiles will be added to the provided tile texture lookup.\n   * @param {import(\"../../tilegrid/TileGrid.js\").default} tileGrid The tile grid.\n   * @param {import(\"../../tilecoord.js\").TileCoord} tileCoord The target tile coordinate.\n   * @param {number} altZ The alternate zoom level.\n   * @param {TileLookup} tilesByZ Lookup of tiles by zoom level.\n   * @return {boolean} The tile coordinate is covered by loaded tiles at the alternate zoom level.\n   * @private\n   */\n  findAltTiles_(tileGrid, tileCoord, altZ, tilesByZ) {\n    const tileRange = tileGrid.getTileRangeForTileCoordAndZ(\n      tileCoord,\n      altZ,\n      this.tempTileRange_,\n    );\n\n    if (!tileRange) {\n      return false;\n    }\n\n    let covered = true;\n    const tileCache = this.tileCache_;\n    const source = this.getLayer().getRenderSource();\n    const sourceKey = source.getKey();\n    for (let x = tileRange.minX; x <= tileRange.maxX; ++x) {\n      for (let y = tileRange.minY; y <= tileRange.maxY; ++y) {\n        const cacheKey = getCacheKey(source, sourceKey, altZ, x, y);\n        let loaded = false;\n        if (tileCache.containsKey(cacheKey)) {\n          const tile = tileCache.peek(cacheKey);\n          if (tile.getState() === TileState.LOADED) {\n            addTileToLookup(tilesByZ, tile, altZ);\n            loaded = true;\n          }\n        }\n        if (!loaded) {\n          covered = false;\n        }\n      }\n    }\n    return covered;\n  }\n\n  /**\n   * Render the layer.\n   *\n   * The frame rendering logic has three parts:\n   *\n   *  1. Enqueue tiles\n   *  2. Find alt tiles for those that are not yet loaded\n   *  3. Render loaded tiles\n   *\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   * @param {HTMLElement} target Target that may be used to render content to.\n   * @return {HTMLElement} The rendered element.\n   * @override\n   */\n  renderFrame(frameState, target) {\n    this.renderComplete = true;\n    /**\n     * TODO:\n     *  maybe skip transition when not fully opaque\n     *  decide if this.renderComplete is useful\n     */\n\n    const layerState = frameState.layerStatesArray[frameState.layerIndex];\n    const viewState = frameState.viewState;\n    const projection = viewState.projection;\n    const viewResolution = viewState.resolution;\n    const viewCenter = viewState.center;\n    const pixelRatio = frameState.pixelRatio;\n\n    const tileLayer = this.getLayer();\n    const tileSource = tileLayer.getSource();\n    const tileGrid = tileSource.getTileGridForProjection(projection);\n    const z = tileGrid.getZForResolution(viewResolution, tileSource.zDirection);\n    const tileResolution = tileGrid.getResolution(z);\n\n    this.updateStaleKeys(tileSource.getKey());\n\n    let frameExtent = frameState.extent;\n    const tilePixelRatio = tileSource.getTilePixelRatio(pixelRatio);\n\n    this.prepareContainer(frameState, target);\n\n    // desired dimensions of the canvas in pixels\n    const width = this.context.canvas.width;\n    const height = this.context.canvas.height;\n\n    this.layerExtent = layerState.extent\n      ? fromUserExtent(layerState.extent, projection)\n      : null;\n    if (this.layerExtent) {\n      frameExtent = getIntersection(frameExtent, this.layerExtent);\n    }\n\n    const dx = (tileResolution * width) / 2 / tilePixelRatio;\n    const dy = (tileResolution * height) / 2 / tilePixelRatio;\n    const canvasExtent = [\n      viewCenter[0] - dx,\n      viewCenter[1] - dy,\n      viewCenter[0] + dx,\n      viewCenter[1] + dy,\n    ];\n\n    /**\n     * @type {TileLookup}\n     */\n    const tilesByZ = {};\n\n    this.renderedTiles.length = 0;\n\n    /**\n     * Part 1: Enqueue tiles\n     */\n\n    const preload = tileLayer.getPreload();\n    if (frameState.nextExtent && this.enqueueTilesForNextExtent()) {\n      const targetZ = tileGrid.getZForResolution(\n        viewState.nextResolution,\n        tileSource.zDirection,\n      );\n      const nextExtent = getRenderExtent(frameState, frameState.nextExtent);\n      this.enqueueTiles(frameState, nextExtent, targetZ, tilesByZ, preload);\n    }\n\n    const renderExtent = getRenderExtent(frameState, frameExtent);\n    this.enqueueTiles(frameState, renderExtent, z, tilesByZ, 0);\n    if (preload > 0) {\n      setTimeout(() => {\n        this.enqueueTiles(\n          frameState,\n          renderExtent,\n          z - 1,\n          tilesByZ,\n          preload - 1,\n        );\n      }, 0);\n    }\n\n    if (!(z in tilesByZ)) {\n      return this.container;\n    }\n\n    /**\n     * Part 2: Find alt tiles for those that are not yet loaded\n     */\n\n    const uid = getUid(this);\n    const time = frameState.time;\n\n    // look for cached tiles to use if a target tile is not ready\n    for (const tile of tilesByZ[z]) {\n      const tileState = tile.getState();\n      if (tileState === TileState.EMPTY) {\n        continue;\n      }\n      const tileCoord = tile.tileCoord;\n\n      if (tileState === TileState.LOADED) {\n        const alpha = tile.getAlpha(uid, time);\n        if (alpha === 1) {\n          // no need to look for alt tiles\n          tile.endTransition(uid);\n          continue;\n        }\n      }\n      if (tileState !== TileState.ERROR) {\n        this.renderComplete = false;\n      }\n\n      const hasStaleTile = this.findStaleTile_(tileCoord, tilesByZ);\n      if (hasStaleTile) {\n        // use the stale tile before the new tile's transition has completed\n        removeTileFromLookup(tilesByZ, tile, z);\n        frameState.animate = true;\n        continue;\n      }\n\n      // first look for child tiles (at z + 1)\n      const coveredByChildren = this.findAltTiles_(\n        tileGrid,\n        tileCoord,\n        z + 1,\n        tilesByZ,\n      );\n\n      if (coveredByChildren) {\n        continue;\n      }\n\n      // next look for parent tiles\n      const minZoom = tileGrid.getMinZoom();\n      for (let parentZ = z - 1; parentZ >= minZoom; --parentZ) {\n        const coveredByParent = this.findAltTiles_(\n          tileGrid,\n          tileCoord,\n          parentZ,\n          tilesByZ,\n        );\n\n        if (coveredByParent) {\n          break;\n        }\n      }\n    }\n\n    /**\n     * Part 3: Render loaded tiles\n     */\n\n    const canvasScale =\n      ((tileResolution / viewResolution) * pixelRatio) / tilePixelRatio;\n\n    const context = this.getRenderContext(frameState);\n\n    // set scale transform for calculating tile positions on the canvas\n    composeTransform(\n      this.tempTransform,\n      width / 2,\n      height / 2,\n      canvasScale,\n      canvasScale,\n      0,\n      -width / 2,\n      -height / 2,\n    );\n\n    if (this.layerExtent) {\n      this.clipUnrotated(context, frameState, this.layerExtent);\n    }\n\n    if (!tileSource.getInterpolate()) {\n      context.imageSmoothingEnabled = false;\n    }\n\n    this.preRender(context, frameState);\n\n    const zs = Object.keys(tilesByZ).map(Number);\n    zs.sort(ascending);\n\n    /** @type {Array<import(\"../../extent.js\").Extent>} */\n    const clips = [];\n    /** @type {Array<number>} */\n    const clipZs = [];\n    // Tiles at the target zoom that are still fading in. They are drawn in a\n    // second pass on top of the (fully drawn) lower-z fallback, so the fade\n    // reads as a coarse-to-fine sharpen instead of revealing the background.\n    /** @type {Array<{tile: import(\"../../Tile.js\").default, x: number, y: number, w: number, h: number, gutter: number}>} */\n    const fadingTiles = [];\n    for (let i = zs.length - 1; i >= 0; --i) {\n      const currentZ = zs[i];\n      const currentTilePixelSize = tileSource.getTilePixelSize(\n        currentZ,\n        pixelRatio,\n        projection,\n      );\n      const currentResolution = tileGrid.getResolution(currentZ);\n      const currentScale = currentResolution / tileResolution;\n      const dx = currentTilePixelSize[0] * currentScale * canvasScale;\n      const dy = currentTilePixelSize[1] * currentScale * canvasScale;\n      const originTileCoord = tileGrid.getTileCoordForCoordAndZ(\n        getTopLeft(canvasExtent),\n        currentZ,\n      );\n      const originTileExtent = tileGrid.getTileCoordExtent(originTileCoord);\n      const origin = applyTransform(this.tempTransform, [\n        (tilePixelRatio * (originTileExtent[0] - canvasExtent[0])) /\n          tileResolution,\n        (tilePixelRatio * (canvasExtent[3] - originTileExtent[3])) /\n          tileResolution,\n      ]);\n      const tileGutter =\n        tilePixelRatio * tileSource.getGutterForProjection(projection);\n      for (const tile of tilesByZ[currentZ]) {\n        if (tile.getState() !== TileState.LOADED) {\n          continue;\n        }\n        const tileCoord = tile.tileCoord;\n\n        // Calculate integer positions and sizes so that tiles align\n        const xIndex = originTileCoord[1] - tileCoord[1];\n        const nextX = Math.round(origin[0] - (xIndex - 1) * dx);\n        const yIndex = originTileCoord[2] - tileCoord[2];\n        const nextY = Math.round(origin[1] - (yIndex - 1) * dy);\n        const x = Math.round(origin[0] - xIndex * dx);\n        const y = Math.round(origin[1] - yIndex * dy);\n        const w = nextX - x;\n        const h = nextY - y;\n        // Only the target zoom tiles fade in; lower-z fallback tiles are just\n        // gap fillers and must not animate. `inTransition` is false when\n        // transitions are disabled, so this whole path is skipped then.\n        const transition = currentZ === z;\n\n        if (transition && tile.inTransition(uid)) {\n          // Still fading in - defer to the second pass and keep the fallback\n          // beneath it by not adding it to the clips.\n          fadingTiles.push({tile, x, y, w, h, gutter: tileGutter});\n          this.renderedTiles.unshift(tile);\n          this.updateUsedTiles(frameState.usedTiles, tileSource, tile);\n          continue;\n        }\n\n        // Draw only the parts of this tile that are not already covered by a\n        // higher-z tile.\n        const currentRect = [x, y, x + w, y + h];\n        /** @type {Array<import(\"../../extent.js\").Extent>} */\n        const covered = [];\n        for (let j = 0, jj = clips.length; j < jj; ++j) {\n          if (currentZ < clipZs[j] && intersects(currentRect, clips[j])) {\n            covered.push(clips[j]);\n          }\n        }\n        let clipRects;\n        if (covered.length > 0) {\n          clipRects = subtractExtents(currentRect, covered);\n        }\n        clips.push(currentRect);\n        clipZs.push(currentZ);\n\n        this.drawTile(\n          tile,\n          frameState,\n          x,\n          y,\n          w,\n          h,\n          tileGutter,\n          transition,\n          clipRects,\n        );\n\n        this.renderedTiles.unshift(tile);\n\n        // TODO: decide if this is necessary\n        this.updateUsedTiles(frameState.usedTiles, tileSource, tile);\n      }\n    }\n\n    // Second pass: draw the fading target zoom tiles on top of the fallback.\n    for (let i = 0, ii = fadingTiles.length; i < ii; ++i) {\n      const {tile, x, y, w, h, gutter} = fadingTiles[i];\n      this.drawTile(tile, frameState, x, y, w, h, gutter, true, undefined);\n    }\n\n    this.renderedResolution = tileResolution;\n    this.extentChanged =\n      !this.renderedExtent_ || !equals(this.renderedExtent_, canvasExtent);\n    this.renderedExtent_ = canvasExtent;\n    this.renderedPixelRatio = pixelRatio;\n\n    this.postRender(this.context, frameState);\n\n    if (this.layerExtent) {\n      context.restore();\n    }\n    context.imageSmoothingEnabled = true;\n\n    if (this.renderComplete) {\n      /**\n       * @param {import(\"../../Map.js\").default} map Map.\n       * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n       */\n      const postRenderFunction = (map, frameState) => {\n        const tileSourceKey = getUid(tileSource);\n        const wantedTiles = frameState.wantedTiles[tileSourceKey];\n        const tilesCount = wantedTiles ? Object.keys(wantedTiles).length : 0;\n        this.updateCacheSize(tilesCount);\n        this.tileCache_.expireCache();\n        this.sourceTileCache_?.expireCache();\n      };\n\n      frameState.postRenderFunctions.push(postRenderFunction);\n    }\n\n    // this normally is `div.ol-layer` and is a mocked div in worker\n    return this.container;\n  }\n\n  /**\n   * Increases the cache size if needed\n   * @param {number} tileCount Minimum number of tiles needed.\n   */\n  updateCacheSize(tileCount) {\n    this.tileCache_.highWaterMark = Math.max(\n      this.tileCache_.highWaterMark,\n      tileCount * 2,\n    );\n  }\n\n  /**\n   * @param {import(\"../../Tile.js\").default} tile Tile.\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   * @param {number} x Left of the tile.\n   * @param {number} y Top of the tile.\n   * @param {number} w Width of the tile.\n   * @param {number} h Height of the tile.\n   * @param {number} gutter Tile gutter.\n   * @param {boolean} transition Apply an alpha transition.\n   * @param {Array<import(\"../../extent.js\").Extent>} [clipRects] Sub-rectangles\n   *     of the tile to draw. When not provided, the whole tile is drawn; when an\n   *     empty array is provided, nothing is drawn (the tile is fully covered by\n   *     higher-z tiles).\n   * @protected\n   */\n  drawTile(tile, frameState, x, y, w, h, gutter, transition, clipRects) {\n    let image;\n    if (tile instanceof DataTile) {\n      image = asImageLike(tile.getData());\n      if (!image) {\n        throw new Error('Rendering array data is not yet supported');\n      }\n    } else {\n      image = this.getTileImage(\n        /** @type {import(\"../../ImageTile.js\").default} */ (tile),\n      );\n    }\n\n    if (!image) {\n      return;\n    }\n    const context = this.getRenderContext(frameState);\n    const uid = getUid(this);\n    const layerState = frameState.layerStatesArray[frameState.layerIndex];\n    const alpha =\n      layerState.opacity *\n      (transition ? tile.getAlpha(uid, frameState.time) : 1);\n    const alphaChanged = alpha !== context.globalAlpha;\n    if (alphaChanged) {\n      context.save();\n      context.globalAlpha = alpha;\n    }\n    const imageWidth = image.width - 2 * gutter;\n    const imageHeight = image.height - 2 * gutter;\n    if (clipRects) {\n      const scaleX = imageWidth / w;\n      const scaleY = imageHeight / h;\n      for (let i = 0, ii = clipRects.length; i < ii; ++i) {\n        const rect = clipRects[i];\n        const rx = rect[0];\n        const ry = rect[1];\n        const rw = rect[2] - rect[0];\n        const rh = rect[3] - rect[1];\n        context.drawImage(\n          image,\n          gutter + (rx - x) * scaleX,\n          gutter + (ry - y) * scaleY,\n          rw * scaleX,\n          rh * scaleY,\n          rx,\n          ry,\n          rw,\n          rh,\n        );\n      }\n    } else {\n      context.drawImage(\n        image,\n        gutter,\n        gutter,\n        imageWidth,\n        imageHeight,\n        x,\n        y,\n        w,\n        h,\n      );\n    }\n\n    if (alphaChanged) {\n      context.restore();\n    }\n    if (alpha !== layerState.opacity) {\n      frameState.animate = true;\n    } else if (transition) {\n      tile.endTransition(uid);\n    }\n  }\n\n  /**\n   * @return {HTMLCanvasElement|OffscreenCanvas} Image\n   */\n  getImage() {\n    const context = this.context;\n    return context ? context.canvas : null;\n  }\n\n  /**\n   * Get the image from a tile.\n   * @param {import(\"../../ImageTile.js\").default} tile Tile.\n   * @return {HTMLCanvasElement|OffscreenCanvas|HTMLImageElement|HTMLVideoElement} Image.\n   * @protected\n   */\n  getTileImage(tile) {\n    return tile.getImage();\n  }\n\n  /**\n   * @param {!Object<string, !Object<string, boolean>>} usedTiles Used tiles.\n   * @param {import(\"../../source/Tile.js\").default} tileSource Tile source.\n   * @param {import('../../Tile.js').default} tile Tile.\n   * @protected\n   */\n  updateUsedTiles(usedTiles, tileSource, tile) {\n    // FIXME should we use tilesToDrawByZ instead?\n    const tileSourceKey = getUid(tileSource);\n    if (!(tileSourceKey in usedTiles)) {\n      usedTiles[tileSourceKey] = {};\n    }\n    usedTiles[tileSourceKey][tile.getKey()] = true;\n  }\n}\n\nexport default CanvasTileLayerRenderer;\n", "/**\n * @module ol/layer/TileProperty\n */\n\n/**\n * @enum {string}\n */\nexport default {\n  PRELOAD: 'preload',\n  USE_INTERIM_TILES_ON_ERROR: 'useInterimTilesOnError',\n};\n", "/**\n * @module ol/layer/BaseTile\n */\nimport Layer from './Layer.js';\nimport TileProperty from './TileProperty.js';\n\n/***\n * @template Return\n * @typedef {import(\"../Observable.js\").OnSignature<import(\"../Observable.js\").EventTypes, import(\"../events/Event.js\").default, Return> &\n *   import(\"../Observable.js\").OnSignature<import(\"./Base.js\").BaseLayerObjectEventTypes|\n *     import(\"./Layer.js\").LayerEventType|'change:preload'|'change:useInterimTilesOnError', import(\"../Object.js\").ObjectEvent, Return> &\n *   import(\"../Observable.js\").OnSignature<import(\"../render/EventType.js\").LayerRenderEventTypes, import(\"../render/Event.js\").default, Return> &\n *   import(\"../Observable.js\").CombinedOnSignature<import(\"../Observable.js\").EventTypes|import(\"./Base.js\").BaseLayerObjectEventTypes|\n *   import(\"./Layer.js\").LayerEventType|'change:preload'|'change:useInterimTilesOnError'|import(\"../render/EventType.js\").LayerRenderEventTypes, Return>} BaseTileLayerOnSignature\n */\n\n/**\n * @template {import(\"../source/Tile.js\").default} TileSourceType\n * @typedef {Object} Options\n * @property {string} [className='ol-layer'] A CSS class name to set to the layer element.\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering.  The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering.  At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {number} [preload=0] Preload. Load low-resolution tiles up to `preload` levels. `0`\n * means no preloading.\n * @property {TileSourceType} [source] Source for this layer.\n * @property {import(\"../Map.js\").default} [map] Sets the layer as overlay on a map. The map will not manage\n * this layer in its layers collection, and the layer will be rendered on top. This is useful for\n * temporary layers. The standard way to add a layer to a map and have it managed by the map is to\n * use {@link import(\"../Map.js\").default#addLayer map.addLayer()}.\n * @property {import(\"./Base.js\").BackgroundColor} [background] Background color for the layer. If not specified, no background\n * will be rendered.\n * @property {boolean} [useInterimTilesOnError=true] Deprecated.  Use interim tiles on error.\n * @property {Object<string, *>} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.\n * @property {number} [cacheSize=512] The internal tile cache size.  This needs to be large enough to render\n * two zoom levels worth of tiles.\n */\n\n/**\n * @classdesc\n * For layer sources that provide pre-rendered, tiled images in grids that are\n * organized by zoom levels for specific resolutions.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @template {import(\"../source/Tile.js\").default} TileSourceType\n * @template {import(\"../renderer/Layer.js\").default} RendererType\n * @extends {Layer<TileSourceType, RendererType>}\n * @api\n */\nclass BaseTileLayer extends Layer {\n  /**\n   * @param {Options<TileSourceType>} [options] Tile layer options.\n   */\n  constructor(options) {\n    options = options ? options : {};\n\n    const baseOptions = Object.assign({}, options);\n\n    const cacheSize = options.cacheSize;\n    delete options.cacheSize;\n\n    delete baseOptions.preload;\n    delete baseOptions.useInterimTilesOnError;\n    super(baseOptions);\n\n    /***\n     * @type {BaseTileLayerOnSignature<import(\"../events.js\").EventsKey>}\n     */\n    this.on;\n\n    /***\n     * @type {BaseTileLayerOnSignature<import(\"../events.js\").EventsKey>}\n     */\n    this.once;\n\n    /***\n     * @type {BaseTileLayerOnSignature<void>}\n     */\n    this.un;\n\n    /**\n     * @type {number|undefined}\n     * @private\n     */\n    this.cacheSize_ = cacheSize;\n\n    this.setPreload(options.preload !== undefined ? options.preload : 0);\n    this.setUseInterimTilesOnError(\n      options.useInterimTilesOnError !== undefined\n        ? options.useInterimTilesOnError\n        : true,\n    );\n  }\n\n  /**\n   * @return {number|undefined} The suggested cache size\n   * @protected\n   */\n  getCacheSize() {\n    return this.cacheSize_;\n  }\n\n  /**\n   * Return the level as number to which we will preload tiles up to.\n   * @return {number} The level to preload tiles up to.\n   * @observable\n   * @api\n   */\n  getPreload() {\n    return /** @type {number} */ (this.get(TileProperty.PRELOAD));\n  }\n\n  /**\n   * Set the level as number to which we will preload tiles up to.\n   * @param {number} preload The level to preload tiles up to.\n   * @observable\n   * @api\n   */\n  setPreload(preload) {\n    this.set(TileProperty.PRELOAD, preload);\n  }\n\n  /**\n   * Deprecated.  Whether we use interim tiles on error.\n   * @return {boolean} Use interim tiles on error.\n   * @observable\n   * @api\n   */\n  getUseInterimTilesOnError() {\n    return /** @type {boolean} */ (\n      this.get(TileProperty.USE_INTERIM_TILES_ON_ERROR)\n    );\n  }\n\n  /**\n   * Deprecated.  Set whether we use interim tiles on error.\n   * @param {boolean} useInterimTilesOnError Use interim tiles on error.\n   * @observable\n   * @api\n   */\n  setUseInterimTilesOnError(useInterimTilesOnError) {\n    this.set(TileProperty.USE_INTERIM_TILES_ON_ERROR, useInterimTilesOnError);\n  }\n\n  /**\n   * Get data for a pixel location.  The return type depends on the source data.  For image tiles,\n   * a four element RGBA array will be returned.  For data tiles, the array length will match the\n   * number of bands in the dataset.  For requests outside the layer extent, `null` will be returned.\n   * Data for a image tiles can only be retrieved if the source's `crossOrigin` property is set.\n   *\n   * ```js\n   * // display layer data on every pointer move\n   * map.on('pointermove', (event) => {\n   *   console.log(layer.getData(event.pixel));\n   * });\n   * ```\n   * @param {import(\"../pixel.js\").Pixel} pixel Pixel.\n   * @return {Uint8ClampedArray|Uint8Array|Float32Array|DataView|null} Pixel data.\n   * @api\n   * @override\n   */\n  getData(pixel) {\n    return super.getData(pixel);\n  }\n}\n\nexport default BaseTileLayer;\n", "/**\n * @module ol/layer/Tile\n */\nimport CanvasTileLayerRenderer from '../renderer/canvas/TileLayer.js';\nimport BaseTileLayer from './BaseTile.js';\n\n/**\n * @classdesc\n * For layer sources that provide pre-rendered, tiled images in grids that are\n * organized by zoom levels for specific resolutions.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @template {import(\"../source/Tile.js\").default} [TileSourceType=import(\"../source/Tile.js\").default]\n * @extends BaseTileLayer<TileSourceType, CanvasTileLayerRenderer>\n * @api\n */\nclass TileLayer extends BaseTileLayer {\n  /**\n   * @param {import(\"./BaseTile.js\").Options<TileSourceType>} [options] Tile layer options.\n   */\n  constructor(options) {\n    super(options);\n  }\n\n  /**\n   * @override\n   */\n  createRenderer() {\n    return new CanvasTileLayerRenderer(this, {\n      cacheSize: this.getCacheSize(),\n    });\n  }\n}\n\nexport default TileLayer;\n", "/**\n * @module ol/tilegrid/TileGrid\n */\nimport TileRange, {\n  createOrUpdate as createOrUpdateTileRange,\n} from '../TileRange.js';\nimport {isSorted, linearFindNearest} from '../array.js';\nimport {assert} from '../asserts.js';\nimport {createOrUpdate, getTopLeft} from '../extent.js';\nimport {intersectsLinearRing} from '../geom/flat/intersectsextent.js';\nimport {ceil, clamp, floor} from '../math.js';\nimport {toSize} from '../size.js';\nimport {createOrUpdate as createOrUpdateTileCoord} from '../tilecoord.js';\nimport {DEFAULT_TILE_SIZE} from './common.js';\n\n/**\n * @private\n * @type {import(\"../tilecoord.js\").TileCoord}\n */\nconst tmpTileCoord = [0, 0, 0];\n\n/**\n * Number of decimal digits to consider in integer values when rounding.\n * @type {number}\n */\nconst DECIMALS = 5;\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../extent.js\").Extent} [extent] Extent for the tile grid. No tiles outside this\n * extent will be requested by {@link module:ol/source/Tile~TileSource} sources. When no `origin` or\n * `origins` are configured, the `origin` will be set to the top-left corner of the extent.\n * @property {number} [minZoom=0] Minimum zoom.\n * @property {import(\"../coordinate.js\").Coordinate} [origin] The tile grid origin, i.e. where the `x`\n * and `y` axes meet (`[z, 0, 0]`). Tile coordinates increase left to right and downwards. If not\n * specified, `extent` or `origins` must be provided.\n * @property {Array<import(\"../coordinate.js\").Coordinate>} [origins] Tile grid origins, i.e. where\n * the `x` and `y` axes meet (`[z, 0, 0]`), for each zoom level. If given, the array length\n * should match the length of the `resolutions` array, i.e. each resolution can have a different\n * origin. Tile coordinates increase left to right and downwards. If not specified, `extent` or\n * `origin` must be provided.\n * @property {!Array<number>} resolutions Resolutions. The array index of each resolution needs\n * to match the zoom level. This means that even if a `minZoom` is configured, the resolutions\n * array will have a length of `maxZoom + 1`.\n * @property {Array<import(\"../size.js\").Size>} [sizes] Number of tile rows and columns\n * of the grid for each zoom level. If specified the values\n * define each zoom level's extent together with the `origin` or `origins`.\n * A grid `extent` can be configured in addition, and will further limit the extent\n * for which tile requests are made by sources. If the bottom-left corner of\n * an extent is used as `origin` or `origins`, then the `y` value must be\n * negative because OpenLayers tile coordinates use the top left as the origin.\n * @property {Array<import(\"../TileRange.js\").default>} [tileRanges] Pre-built tile ranges for each\n * zoom level. When provided, these are used directly as the full tile ranges instead of computing\n * them from `sizes`. Useful for setting per-level tile index bounds (e.g. from WMTS `TileMatrixSetLimits`).\n * @property {number|import(\"../size.js\").Size} [tileSize] Tile size.\n * Default is `[256, 256]`.\n * @property {Array<number|import(\"../size.js\").Size>} [tileSizes] Tile sizes. If given, the array length\n * should match the length of the `resolutions` array, i.e. each resolution can have a different\n * tile size.\n */\n\n/**\n * @classdesc\n * Base class for setting the grid pattern for sources accessing tiled-image\n * servers.\n * @api\n */\nclass TileGrid {\n  /**\n   * @param {Options} options Tile grid options.\n   */\n  constructor(options) {\n    let minZoom = options.minZoom;\n    const resolutions = options.resolutions;\n    if (minZoom === undefined && resolutions) {\n      minZoom = resolutions.findIndex((resolution) => resolution !== undefined);\n    }\n    /**\n     * @protected\n     * @type {number}\n     */\n    this.minZoom = minZoom !== undefined ? minZoom : 0;\n\n    /**\n     * @private\n     * @type {!Array<number>}\n     */\n    this.resolutions_ = resolutions;\n    assert(\n      isSorted(\n        this.resolutions_,\n        /**\n         * @param {number} a First resolution\n         * @param {number} b Second resolution\n         * @return {number} Comparison result\n         */\n        (a, b) => b - a,\n        true,\n      ),\n      '`resolutions` must be sorted in descending order',\n    );\n\n    // check if we've got a consistent zoom factor and origin\n    let zoomFactor;\n    if (!options.origins) {\n      for (let i = 0, ii = this.resolutions_.length - 1; i < ii; ++i) {\n        if (!zoomFactor) {\n          zoomFactor = this.resolutions_[i] / this.resolutions_[i + 1];\n        } else {\n          if (this.resolutions_[i] / this.resolutions_[i + 1] !== zoomFactor) {\n            zoomFactor = undefined;\n            break;\n          }\n        }\n      }\n    }\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.zoomFactor_ = zoomFactor;\n\n    /**\n     * @protected\n     * @type {number}\n     */\n    this.maxZoom = this.resolutions_.length - 1;\n\n    /**\n     * @private\n     * @type {import(\"../coordinate.js\").Coordinate|null}\n     */\n    this.origin_ = options.origin !== undefined ? options.origin : null;\n\n    /**\n     * @private\n     * @type {Array<import(\"../coordinate.js\").Coordinate>}\n     */\n    this.origins_ = null;\n    if (options.origins !== undefined) {\n      this.origins_ = options.origins;\n      assert(\n        this.origins_.length == this.resolutions_.length,\n        'Number of `origins` and `resolutions` must be equal',\n      );\n    }\n\n    const extent = options.extent;\n\n    if (extent !== undefined && !this.origin_ && !this.origins_) {\n      this.origin_ = getTopLeft(extent);\n    }\n\n    assert(\n      (!this.origin_ && this.origins_) || (this.origin_ && !this.origins_),\n      'Either `origin` or `origins` must be configured, never both',\n    );\n\n    /**\n     * @private\n     * @type {Array<number|import(\"../size.js\").Size>}\n     */\n    this.tileSizes_ = null;\n    if (options.tileSizes !== undefined) {\n      this.tileSizes_ = options.tileSizes;\n      assert(\n        this.tileSizes_.length == this.resolutions_.length,\n        'Number of `tileSizes` and `resolutions` must be equal',\n      );\n    }\n\n    /**\n     * @private\n     * @type {number|import(\"../size.js\").Size}\n     */\n    this.tileSize_ =\n      options.tileSize !== undefined\n        ? options.tileSize\n        : !this.tileSizes_\n          ? DEFAULT_TILE_SIZE\n          : null;\n    assert(\n      (!this.tileSize_ && this.tileSizes_) ||\n        (this.tileSize_ && !this.tileSizes_),\n      'Either `tileSize` or `tileSizes` must be configured, never both',\n    );\n\n    /**\n     * @private\n     * @type {import(\"../extent.js\").Extent}\n     */\n    this.extent_ = extent !== undefined ? extent : null;\n\n    /**\n     * @private\n     * @type {Array<import(\"../TileRange.js\").default>}\n     */\n    this.fullTileRanges_ = null;\n\n    /**\n     * @private\n     * @type {import(\"../size.js\").Size}\n     */\n    this.tmpSize_ = [0, 0];\n\n    /**\n     * @private\n     * @type {import(\"../extent.js\").Extent}\n     */\n    this.tmpExtent_ = [0, 0, 0, 0];\n\n    if (options.tileRanges !== undefined) {\n      this.fullTileRanges_ = options.tileRanges;\n    } else if (options.sizes !== undefined) {\n      this.fullTileRanges_ = options.sizes.map((size, z) => {\n        const tileRange = new TileRange(\n          Math.min(0, size[0]),\n          Math.max(size[0] - 1, -1),\n          Math.min(0, size[1]),\n          Math.max(size[1] - 1, -1),\n        );\n        if (extent) {\n          const restrictedTileRange = this.getTileRangeForExtentAndZ(extent, z);\n          tileRange.minX = Math.max(restrictedTileRange.minX, tileRange.minX);\n          tileRange.maxX = Math.min(restrictedTileRange.maxX, tileRange.maxX);\n          tileRange.minY = Math.max(restrictedTileRange.minY, tileRange.minY);\n          tileRange.maxY = Math.min(restrictedTileRange.maxY, tileRange.maxY);\n        }\n        return tileRange;\n      });\n    } else if (extent) {\n      this.calculateTileRanges_(extent);\n    }\n  }\n\n  /**\n   * Call a function with each tile coordinate for a given extent and zoom level.\n   *\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @param {number} zoom Integer zoom level.\n   * @param {function(import(\"../tilecoord.js\").TileCoord): void} callback Function called with each tile coordinate.\n   * @api\n   */\n  forEachTileCoord(extent, zoom, callback) {\n    const tileRange = this.getTileRangeForExtentAndZ(extent, zoom);\n    for (let i = tileRange.minX, ii = tileRange.maxX; i <= ii; ++i) {\n      for (let j = tileRange.minY, jj = tileRange.maxY; j <= jj; ++j) {\n        callback([zoom, i, j]);\n      }\n    }\n  }\n\n  /**\n   * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n   * @param {function(number, import(\"../TileRange.js\").default): boolean} callback Callback.\n   * @param {import(\"../TileRange.js\").default} [tempTileRange] Temporary import(\"../TileRange.js\").default object.\n   * @param {import(\"../extent.js\").Extent} [tempExtent] Temporary import(\"../extent.js\").Extent object.\n   * @return {boolean} Callback succeeded.\n   */\n  forEachTileCoordParentTileRange(\n    tileCoord,\n    callback,\n    tempTileRange,\n    tempExtent,\n  ) {\n    let tileRange, x, y;\n    let tileCoordExtent = null;\n    let z = tileCoord[0] - 1;\n    if (this.zoomFactor_ === 2) {\n      x = tileCoord[1];\n      y = tileCoord[2];\n    } else {\n      tileCoordExtent = this.getTileCoordExtent(tileCoord, tempExtent);\n    }\n    while (z >= this.minZoom) {\n      if (x !== undefined && y !== undefined) {\n        x = Math.floor(x / 2);\n        y = Math.floor(y / 2);\n        tileRange = createOrUpdateTileRange(x, x, y, y, tempTileRange);\n      } else {\n        tileRange = this.getTileRangeForExtentAndZ(\n          tileCoordExtent,\n          z,\n          tempTileRange,\n        );\n      }\n      if (callback(z, tileRange)) {\n        return true;\n      }\n      --z;\n    }\n    return false;\n  }\n\n  /**\n   * Get the extent for this tile grid, if it was configured.\n   * @return {import(\"../extent.js\").Extent} Extent.\n   * @api\n   */\n  getExtent() {\n    return this.extent_;\n  }\n\n  /**\n   * Get the maximum zoom level for the grid.\n   * @return {number} Max zoom.\n   * @api\n   */\n  getMaxZoom() {\n    return this.maxZoom;\n  }\n\n  /**\n   * Get the minimum zoom level for the grid.\n   * @return {number} Min zoom.\n   * @api\n   */\n  getMinZoom() {\n    return this.minZoom;\n  }\n\n  /**\n   * Get the origin for the grid at the given zoom level.\n   * @param {number} z Integer zoom level.\n   * @return {import(\"../coordinate.js\").Coordinate} Origin.\n   * @api\n   */\n  getOrigin(z) {\n    if (this.origin_) {\n      return this.origin_;\n    }\n    return this.origins_[z];\n  }\n\n  /**\n   * Get the list of origins for the grid.\n   * @return {Array<import(\"../coordinate.js\").Coordinate>|null} Origin.\n   */\n  getOrigins() {\n    return this.origins_;\n  }\n\n  /**\n   * Get the resolution for the given zoom level.\n   * @param {number} z Integer zoom level.\n   * @return {number} Resolution.\n   * @api\n   */\n  getResolution(z) {\n    return this.resolutions_[z];\n  }\n\n  /**\n   * Get the list of resolutions for the tile grid.\n   * @return {Array<number>} Resolutions.\n   * @api\n   */\n  getResolutions() {\n    return this.resolutions_;\n  }\n\n  /**\n   * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n   * @param {import(\"../TileRange.js\").default} [tempTileRange] Temporary import(\"../TileRange.js\").default object.\n   * @param {import(\"../extent.js\").Extent} [tempExtent] Temporary import(\"../extent.js\").Extent object.\n   * @return {import(\"../TileRange.js\").default|null} Tile range.\n   */\n  getTileCoordChildTileRange(tileCoord, tempTileRange, tempExtent) {\n    if (tileCoord[0] < this.maxZoom) {\n      if (this.zoomFactor_ === 2) {\n        const minX = tileCoord[1] * 2;\n        const minY = tileCoord[2] * 2;\n        return createOrUpdateTileRange(\n          minX,\n          minX + 1,\n          minY,\n          minY + 1,\n          tempTileRange,\n        );\n      }\n      const tileCoordExtent = this.getTileCoordExtent(\n        tileCoord,\n        tempExtent || this.tmpExtent_,\n      );\n      return this.getTileRangeForExtentAndZ(\n        tileCoordExtent,\n        tileCoord[0] + 1,\n        tempTileRange,\n      );\n    }\n    return null;\n  }\n\n  /**\n   * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n   * @param {number} z Integer zoom level.\n   * @param {import(\"../TileRange.js\").default} [tempTileRange] Temporary import(\"../TileRange.js\").default object.\n   * @return {import(\"../TileRange.js\").default|null} Tile range.\n   */\n  getTileRangeForTileCoordAndZ(tileCoord, z, tempTileRange) {\n    if (z > this.maxZoom || z < this.minZoom) {\n      return null;\n    }\n\n    const tileCoordZ = tileCoord[0];\n    const tileCoordX = tileCoord[1];\n    const tileCoordY = tileCoord[2];\n\n    if (z === tileCoordZ) {\n      return createOrUpdateTileRange(\n        tileCoordX,\n        tileCoordY,\n        tileCoordX,\n        tileCoordY,\n        tempTileRange,\n      );\n    }\n\n    if (this.zoomFactor_) {\n      const factor = Math.pow(this.zoomFactor_, z - tileCoordZ);\n      const minX = Math.floor(tileCoordX * factor);\n      const minY = Math.floor(tileCoordY * factor);\n      if (z < tileCoordZ) {\n        return createOrUpdateTileRange(minX, minX, minY, minY, tempTileRange);\n      }\n\n      const maxX = Math.floor(factor * (tileCoordX + 1)) - 1;\n      const maxY = Math.floor(factor * (tileCoordY + 1)) - 1;\n      return createOrUpdateTileRange(minX, maxX, minY, maxY, tempTileRange);\n    }\n\n    const tileCoordExtent = this.getTileCoordExtent(tileCoord, this.tmpExtent_);\n    return this.getTileRangeForExtentAndZ(tileCoordExtent, z, tempTileRange);\n  }\n\n  /**\n   * Get a tile range for the given extent and integer zoom level.\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @param {number} z Integer zoom level.\n   * @param {import(\"../TileRange.js\").default} [tempTileRange] Temporary tile range object.\n   * @return {import(\"../TileRange.js\").default} Tile range.\n   */\n  getTileRangeForExtentAndZ(extent, z, tempTileRange) {\n    this.getTileCoordForXYAndZ_(extent[0], extent[3], z, false, tmpTileCoord);\n    const minX = tmpTileCoord[1];\n    const minY = tmpTileCoord[2];\n    this.getTileCoordForXYAndZ_(extent[2], extent[1], z, true, tmpTileCoord);\n    const maxX = tmpTileCoord[1];\n    const maxY = tmpTileCoord[2];\n    return createOrUpdateTileRange(minX, maxX, minY, maxY, tempTileRange);\n  }\n\n  /**\n   * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n   * @return {import(\"../coordinate.js\").Coordinate} Tile center.\n   */\n  getTileCoordCenter(tileCoord) {\n    const origin = this.getOrigin(tileCoord[0]);\n    const resolution = this.getResolution(tileCoord[0]);\n    const tileSize = toSize(this.getTileSize(tileCoord[0]), this.tmpSize_);\n    return [\n      origin[0] + (tileCoord[1] + 0.5) * tileSize[0] * resolution,\n      origin[1] - (tileCoord[2] + 0.5) * tileSize[1] * resolution,\n    ];\n  }\n\n  /**\n   * Get the extent of a tile coordinate.\n   *\n   * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n   * @param {import(\"../extent.js\").Extent} [tempExtent] Temporary extent object.\n   * @return {import(\"../extent.js\").Extent} Extent.\n   * @api\n   */\n  getTileCoordExtent(tileCoord, tempExtent) {\n    const origin = this.getOrigin(tileCoord[0]);\n    const resolution = this.getResolution(tileCoord[0]);\n    const tileSize = toSize(this.getTileSize(tileCoord[0]), this.tmpSize_);\n    const minX = origin[0] + tileCoord[1] * tileSize[0] * resolution;\n    const minY = origin[1] - (tileCoord[2] + 1) * tileSize[1] * resolution;\n    const maxX = minX + tileSize[0] * resolution;\n    const maxY = minY + tileSize[1] * resolution;\n    return createOrUpdate(minX, minY, maxX, maxY, tempExtent);\n  }\n\n  /**\n   * Get the tile coordinate for the given map coordinate and resolution.  This\n   * method considers that coordinates that intersect tile boundaries should be\n   * assigned the higher tile coordinate.\n   *\n   * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n   * @param {number} resolution Resolution.\n   * @param {import(\"../tilecoord.js\").TileCoord} [opt_tileCoord] Destination import(\"../tilecoord.js\").TileCoord object.\n   * @return {import(\"../tilecoord.js\").TileCoord} Tile coordinate.\n   * @api\n   */\n  getTileCoordForCoordAndResolution(coordinate, resolution, opt_tileCoord) {\n    return this.getTileCoordForXYAndResolution_(\n      coordinate[0],\n      coordinate[1],\n      resolution,\n      false,\n      opt_tileCoord,\n    );\n  }\n\n  /**\n   * Note that this method should not be called for resolutions that correspond\n   * to an integer zoom level.  Instead call the `getTileCoordForXYAndZ_` method.\n   * @param {number} x X.\n   * @param {number} y Y.\n   * @param {number} resolution Resolution (for a non-integer zoom level).\n   * @param {boolean} reverseIntersectionPolicy Instead of letting edge\n   *     intersections go to the higher tile coordinate, let edge intersections\n   *     go to the lower tile coordinate.\n   * @param {import(\"../tilecoord.js\").TileCoord} [opt_tileCoord] Temporary import(\"../tilecoord.js\").TileCoord object.\n   * @return {import(\"../tilecoord.js\").TileCoord} Tile coordinate.\n   * @private\n   */\n  getTileCoordForXYAndResolution_(\n    x,\n    y,\n    resolution,\n    reverseIntersectionPolicy,\n    opt_tileCoord,\n  ) {\n    const z = this.getZForResolution(resolution);\n    const scale = resolution / this.getResolution(z);\n    const origin = this.getOrigin(z);\n    const tileSize = toSize(this.getTileSize(z), this.tmpSize_);\n\n    let tileCoordX = (scale * (x - origin[0])) / resolution / tileSize[0];\n    let tileCoordY = (scale * (origin[1] - y)) / resolution / tileSize[1];\n\n    if (reverseIntersectionPolicy) {\n      tileCoordX = ceil(tileCoordX, DECIMALS) - 1;\n      tileCoordY = ceil(tileCoordY, DECIMALS) - 1;\n    } else {\n      tileCoordX = floor(tileCoordX, DECIMALS);\n      tileCoordY = floor(tileCoordY, DECIMALS);\n    }\n\n    return createOrUpdateTileCoord(z, tileCoordX, tileCoordY, opt_tileCoord);\n  }\n\n  /**\n   * Although there is repetition between this method and `getTileCoordForXYAndResolution_`,\n   * they should have separate implementations.  This method is for integer zoom\n   * levels.  The other method should only be called for resolutions corresponding\n   * to non-integer zoom levels.\n   * @param {number} x Map x coordinate.\n   * @param {number} y Map y coordinate.\n   * @param {number} z Integer zoom level.\n   * @param {boolean} reverseIntersectionPolicy Instead of letting edge\n   *     intersections go to the higher tile coordinate, let edge intersections\n   *     go to the lower tile coordinate.\n   * @param {import(\"../tilecoord.js\").TileCoord} [opt_tileCoord] Temporary import(\"../tilecoord.js\").TileCoord object.\n   * @return {import(\"../tilecoord.js\").TileCoord} Tile coordinate.\n   * @private\n   */\n  getTileCoordForXYAndZ_(x, y, z, reverseIntersectionPolicy, opt_tileCoord) {\n    const origin = this.getOrigin(z);\n    const resolution = this.getResolution(z);\n    const tileSize = toSize(this.getTileSize(z), this.tmpSize_);\n\n    let tileCoordX = (x - origin[0]) / resolution / tileSize[0];\n    let tileCoordY = (origin[1] - y) / resolution / tileSize[1];\n\n    if (reverseIntersectionPolicy) {\n      tileCoordX = ceil(tileCoordX, DECIMALS) - 1;\n      tileCoordY = ceil(tileCoordY, DECIMALS) - 1;\n    } else {\n      tileCoordX = floor(tileCoordX, DECIMALS);\n      tileCoordY = floor(tileCoordY, DECIMALS);\n    }\n\n    return createOrUpdateTileCoord(z, tileCoordX, tileCoordY, opt_tileCoord);\n  }\n\n  /**\n   * Get a tile coordinate given a map coordinate and zoom level.\n   * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n   * @param {number} z Integer zoom level, e.g. the result of a `getZForResolution()` method call\n   * @param {import(\"../tilecoord.js\").TileCoord} [opt_tileCoord] Destination import(\"../tilecoord.js\").TileCoord object.\n   * @return {import(\"../tilecoord.js\").TileCoord} Tile coordinate.\n   * @api\n   */\n  getTileCoordForCoordAndZ(coordinate, z, opt_tileCoord) {\n    return this.getTileCoordForXYAndZ_(\n      coordinate[0],\n      coordinate[1],\n      z,\n      false,\n      opt_tileCoord,\n    );\n  }\n\n  /**\n   * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n   * @return {number} Tile resolution.\n   */\n  getTileCoordResolution(tileCoord) {\n    return this.resolutions_[tileCoord[0]];\n  }\n\n  /**\n   * Get the tile size for a zoom level. The type of the return value matches the\n   * `tileSize` or `tileSizes` that the tile grid was configured with. To always\n   * get an {@link import(\"../size.js\").Size}, run the result through {@link module:ol/size.toSize}.\n   * @param {number} z Z.\n   * @return {number|import(\"../size.js\").Size} Tile size.\n   * @api\n   */\n  getTileSize(z) {\n    if (this.tileSize_) {\n      return this.tileSize_;\n    }\n    return this.tileSizes_[z];\n  }\n\n  /**\n   * @param {number} z Zoom level.\n   * @return {import(\"../TileRange.js\").default|null} Extent tile range for the specified zoom level.\n   */\n  getFullTileRange(z) {\n    if (!this.fullTileRanges_) {\n      return this.extent_\n        ? this.getTileRangeForExtentAndZ(this.extent_, z)\n        : null;\n    }\n    return this.fullTileRanges_[z];\n  }\n\n  /**\n   * @param {number} resolution Resolution.\n   * @param {number|import(\"../array.js\").NearestDirectionFunction} [opt_direction]\n   *     If 0, the nearest resolution will be used.\n   *     If 1, the nearest higher resolution (lower Z) will be used. If -1, the\n   *     nearest lower resolution (higher Z) will be used. Default is 0.\n   *     Use a {@link module:ol/array~NearestDirectionFunction} for more precise control.\n   *\n   * For example to change tile Z at the midpoint of zoom levels\n   * ```js\n   * function(value, high, low) {\n   *   return value - low * Math.sqrt(high / low);\n   * }\n   * ```\n   * @return {number} Z.\n   * @api\n   */\n  getZForResolution(resolution, opt_direction) {\n    const z = linearFindNearest(\n      this.resolutions_,\n      resolution,\n      opt_direction || 0,\n    );\n    return clamp(z, this.minZoom, this.maxZoom);\n  }\n\n  /**\n   * The tile with the provided tile coordinate intersects the given viewport.\n   * @param {import('../tilecoord.js').TileCoord} tileCoord Tile coordinate.\n   * @param {Array<number>} viewport Viewport as returned from {@link module:ol/extent.getRotatedViewport}.\n   * @return {boolean} The tile with the provided tile coordinate intersects the given viewport.\n   */\n  tileCoordIntersectsViewport(tileCoord, viewport) {\n    return intersectsLinearRing(\n      viewport,\n      0,\n      viewport.length,\n      2,\n      this.getTileCoordExtent(tileCoord),\n    );\n  }\n\n  /**\n   * @param {!import(\"../extent.js\").Extent} extent Extent for this tile grid.\n   * @private\n   */\n  calculateTileRanges_(extent) {\n    const length = this.resolutions_.length;\n    const fullTileRanges = new Array(length);\n    for (let z = this.minZoom; z < length; ++z) {\n      fullTileRanges[z] = this.getTileRangeForExtentAndZ(extent, z);\n    }\n    this.fullTileRanges_ = fullTileRanges;\n  }\n}\n\nexport default TileGrid;\n", "/**\n * @module ol/tilegrid\n */\nimport {\n  containsCoordinate,\n  createOrUpdate,\n  getCorner,\n  getHeight,\n  getWidth,\n} from './extent.js';\nimport {METERS_PER_UNIT, get as getProjection} from './proj.js';\nimport {toSize} from './size.js';\nimport TileGrid from './tilegrid/TileGrid.js';\nimport {DEFAULT_MAX_ZOOM, DEFAULT_TILE_SIZE} from './tilegrid/common.js';\n\nexport {default as WMTS} from './tilegrid/WMTS.js';\nexport {TileGrid};\n\n/**\n * @param {import(\"./proj/Projection.js\").default} projection Projection.\n * @return {!TileGrid} Default tile grid for the\n * passed projection.\n */\nexport function getForProjection(projection) {\n  let tileGrid = projection.getDefaultTileGrid();\n  if (!tileGrid) {\n    tileGrid = createForProjection(projection);\n    projection.setDefaultTileGrid(tileGrid);\n  }\n  return tileGrid;\n}\n\n/**\n * @param {TileGrid} tileGrid Tile grid.\n * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @param {import(\"./proj/Projection.js\").default} projection Projection.\n * @return {import(\"./tilecoord.js\").TileCoord} Tile coordinate.\n */\nexport function wrapX(tileGrid, tileCoord, projection) {\n  const z = tileCoord[0];\n  const center = tileGrid.getTileCoordCenter(tileCoord);\n  const projectionExtent = extentFromProjection(projection);\n  if (!containsCoordinate(projectionExtent, center)) {\n    const worldWidth = getWidth(projectionExtent);\n    const worldsAway = Math.ceil(\n      (projectionExtent[0] - center[0]) / worldWidth,\n    );\n    center[0] += worldWidth * worldsAway;\n    return tileGrid.getTileCoordForCoordAndZ(center, z);\n  }\n  return tileCoord;\n}\n\n/**\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number} [maxZoom] Maximum zoom level (default is\n *     DEFAULT_MAX_ZOOM).\n * @param {number|import(\"./size.js\").Size} [tileSize] Tile size (default uses\n *     DEFAULT_TILE_SIZE).\n * @param {import(\"./extent.js\").Corner} [corner] Extent corner (default is `'top-left'`).\n * @return {!TileGrid} TileGrid instance.\n */\nexport function createForExtent(extent, maxZoom, tileSize, corner) {\n  corner = corner !== undefined ? corner : 'top-left';\n\n  const resolutions = resolutionsFromExtent(extent, maxZoom, tileSize);\n\n  return new TileGrid({\n    extent: extent,\n    origin: getCorner(extent, corner),\n    resolutions: resolutions,\n    tileSize: tileSize,\n  });\n}\n\n/**\n * @typedef {Object} XYZOptions\n * @property {import(\"./extent.js\").Extent} [extent] Extent for the tile grid. The origin for an XYZ tile grid is the\n * top-left corner of the extent. If `maxResolution` is not provided the zero level of the grid is defined by the resolution\n * at which one tile fits in the provided extent. If not provided, the extent of the EPSG:3857 projection is used.\n * @property {number} [maxResolution] Resolution at level zero.\n * @property {number} [maxZoom] Maximum zoom. The default is `42`. This determines the number of levels\n * in the grid set. For example, a `maxZoom` of 21 means there are 22 levels in the grid set.\n * @property {number} [minZoom=0] Minimum zoom.\n * @property {number|import(\"./size.js\").Size} [tileSize=[256, 256]] Tile size in pixels.\n */\n\n/**\n * Creates a tile grid with a standard XYZ tiling scheme.\n * @param {XYZOptions} [options] Tile grid options.\n * @return {!TileGrid} Tile grid instance.\n * @api\n */\nexport function createXYZ(options) {\n  const xyzOptions = options || {};\n\n  const extent = xyzOptions.extent || getProjection('EPSG:3857').getExtent();\n\n  const gridOptions = {\n    extent: extent,\n    minZoom: xyzOptions.minZoom,\n    tileSize: xyzOptions.tileSize,\n    resolutions: resolutionsFromExtent(\n      extent,\n      xyzOptions.maxZoom,\n      xyzOptions.tileSize,\n      xyzOptions.maxResolution,\n    ),\n  };\n  return new TileGrid(gridOptions);\n}\n\n/**\n * Create a resolutions array from an extent.  A zoom factor of 2 is assumed.\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number} [maxZoom] Maximum zoom level (default is\n *     DEFAULT_MAX_ZOOM).\n * @param {number|import(\"./size.js\").Size} [tileSize] Tile size (default uses\n *     DEFAULT_TILE_SIZE).\n * @param {number} [maxResolution] Resolution at level zero.\n * @return {!Array<number>} Resolutions array.\n */\nfunction resolutionsFromExtent(extent, maxZoom, tileSize, maxResolution) {\n  maxZoom = maxZoom !== undefined ? maxZoom : DEFAULT_MAX_ZOOM;\n  tileSize = toSize(tileSize !== undefined ? tileSize : DEFAULT_TILE_SIZE);\n\n  const height = getHeight(extent);\n  const width = getWidth(extent);\n\n  maxResolution =\n    maxResolution > 0\n      ? maxResolution\n      : Math.max(width / tileSize[0], height / tileSize[1]);\n\n  const length = maxZoom + 1;\n  const resolutions = new Array(length);\n  for (let z = 0; z < length; ++z) {\n    resolutions[z] = maxResolution / Math.pow(2, z);\n  }\n  return resolutions;\n}\n\n/**\n * @param {import(\"./proj.js\").ProjectionLike} projection Projection.\n * @param {number} [maxZoom] Maximum zoom level (default is\n *     DEFAULT_MAX_ZOOM).\n * @param {number|import(\"./size.js\").Size} [tileSize] Tile size (default uses\n *     DEFAULT_TILE_SIZE).\n * @param {import(\"./extent.js\").Corner} [corner] Extent corner (default is `'top-left'`).\n * @return {!TileGrid} TileGrid instance.\n */\nexport function createForProjection(projection, maxZoom, tileSize, corner) {\n  const extent = extentFromProjection(projection);\n  return createForExtent(extent, maxZoom, tileSize, corner);\n}\n\n/**\n * Generate a tile grid extent from a projection.  If the projection has an\n * extent, it is used.  If not, a global extent is assumed.\n * @param {import(\"./proj.js\").ProjectionLike} projection Projection.\n * @return {import(\"./extent.js\").Extent} Extent.\n */\nexport function extentFromProjection(projection) {\n  projection = getProjection(projection);\n  let extent = projection.getExtent();\n  if (!extent) {\n    const half =\n      (180 * METERS_PER_UNIT.degrees) / projection.getMetersPerUnit();\n    extent = createOrUpdate(-half, -half, half, half);\n  }\n  return extent;\n}\n", "/**\n * @module ol/uri\n */\n\nimport {modulo} from './math.js';\nimport {hashZXY} from './tilecoord.js';\n\n/**\n * Appends query parameters to a URI.\n *\n * @param {string} uri The original URI, which may already have query data.\n * @param {!Object} params An object where keys are URI-encoded parameter keys,\n *     and the values are arbitrary types or arrays.\n * @return {string} The new URI.\n */\nexport function appendParams(uri, params) {\n  /** @type {Array<string>} */\n  const keyParams = [];\n  // Skip any null or undefined parameter values\n  Object.keys(params).forEach(function (k) {\n    if (params[k] !== null && params[k] !== undefined) {\n      keyParams.push(k + '=' + encodeURIComponent(params[k]));\n    }\n  });\n  const qs = keyParams.join('&');\n  // remove any trailing ? or &\n  uri = uri.replace(/[?&]$/, '');\n  // append ? or & depending on whether uri has existing parameters\n  uri += uri.includes('?') ? '&' : '?';\n  return uri + qs;\n}\n\nconst zRegEx = /\\{z\\}/g;\nconst xRegEx = /\\{x\\}/g;\nconst yRegEx = /\\{y\\}/g;\nconst dashYRegEx = /\\{-y\\}/g;\n\n/**\n * @param {string} template The URL template.  Should have `{x}`, `{y}`, and `{z}` placeholders.  If\n * the template has a `{-y}` placeholder, the `maxY` parameter must be supplied.\n * @param {number} z The tile z coordinate.\n * @param {number} x The tile x coordinate.\n * @param {number} y The tile y coordinate.\n * @param {number} [maxY] The maximum y coordinate at the given z level.\n * @return {string} The URL.\n */\nexport function renderXYZTemplate(template, z, x, y, maxY) {\n  return template\n    .replace(zRegEx, z.toString())\n    .replace(xRegEx, x.toString())\n    .replace(yRegEx, y.toString())\n    .replace(dashYRegEx, function () {\n      if (maxY === undefined) {\n        throw new Error(\n          'If the URL template has a {-y} placeholder, the grid extent must be known',\n        );\n      }\n      return (maxY - y).toString();\n    });\n}\n\n/**\n * @param {Array<string>} urls List of URLs.\n * @param {number} z The tile z coordinate.\n * @param {number} x The tile x coordinate.\n * @param {number} y The tile y coordinate.\n * @return {string} The chosen URL.\n */\nexport function pickUrl(urls, z, x, y) {\n  const hash = hashZXY(z, x, y);\n  const index = modulo(hash, urls.length);\n  return urls[index];\n}\n\n/**\n * @param {string} url URL.\n * @return {Array<string>} Array of urls.\n */\nexport function expandUrl(url) {\n  const urls = [];\n  let match = /\\{([a-z])-([a-z])\\}/.exec(url);\n  if (match) {\n    // char range\n    const startCharCode = match[1].charCodeAt(0);\n    const stopCharCode = match[2].charCodeAt(0);\n    let charCode;\n    for (charCode = startCharCode; charCode <= stopCharCode; ++charCode) {\n      urls.push(url.replace(match[0], String.fromCharCode(charCode)));\n    }\n    return urls;\n  }\n  match = /\\{(\\d+)-(\\d+)\\}/.exec(url);\n  if (match) {\n    // number range\n    const stop = parseInt(match[2], 10);\n    for (let i = parseInt(match[1], 10); i <= stop; i++) {\n      urls.push(url.replace(match[0], i.toString()));\n    }\n    return urls;\n  }\n  urls.push(url);\n  return urls;\n}\n", "/**\n * @module ol/tileurlfunction\n */\nimport {modulo} from './math.js';\nimport {hash as tileCoordHash} from './tilecoord.js';\nimport {renderXYZTemplate} from './uri.js';\n\n/**\n * @param {string} template Template.\n * @param {import(\"./tilegrid/TileGrid.js\").default|null} tileGrid Tile grid.\n * @return {import(\"./Tile.js\").UrlFunction} Tile URL function.\n */\nexport function createFromTemplate(template, tileGrid) {\n  return (\n    /**\n     * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile Coordinate.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"./proj/Projection.js\").default} projection Projection.\n     * @return {string|undefined} Tile URL.\n     */\n    function (tileCoord, pixelRatio, projection) {\n      if (!tileCoord) {\n        return undefined;\n      }\n      let maxY;\n      const z = tileCoord[0];\n      if (tileGrid) {\n        // The `{-y}` placeholder only works for sources that have a tile grid at construction\n        const range = tileGrid.getFullTileRange(z);\n        if (range) {\n          maxY = range.getHeight() - 1;\n        }\n      }\n      return renderXYZTemplate(template, z, tileCoord[1], tileCoord[2], maxY);\n    }\n  );\n}\n\n/**\n * @param {Array<string>} templates Templates.\n * @param {import(\"./tilegrid/TileGrid.js\").default} tileGrid Tile grid.\n * @return {import(\"./Tile.js\").UrlFunction} Tile URL function.\n */\nexport function createFromTemplates(templates, tileGrid) {\n  const len = templates.length;\n  const tileUrlFunctions = new Array(len);\n  for (let i = 0; i < len; ++i) {\n    tileUrlFunctions[i] = createFromTemplate(templates[i], tileGrid);\n  }\n  return createFromTileUrlFunctions(tileUrlFunctions);\n}\n\n/**\n * @param {Array<import(\"./Tile.js\").UrlFunction>} tileUrlFunctions Tile URL Functions.\n * @return {import(\"./Tile.js\").UrlFunction} Tile URL function.\n */\nexport function createFromTileUrlFunctions(tileUrlFunctions) {\n  if (tileUrlFunctions.length === 1) {\n    return tileUrlFunctions[0];\n  }\n  return (\n    /**\n     * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile Coordinate.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"./proj/Projection.js\").default} projection Projection.\n     * @return {string|undefined} Tile URL.\n     */\n    function (tileCoord, pixelRatio, projection) {\n      if (!tileCoord) {\n        return undefined;\n      }\n      const h = tileCoordHash(tileCoord);\n      const index = modulo(h, tileUrlFunctions.length);\n      return tileUrlFunctions[index](tileCoord, pixelRatio, projection);\n    }\n  );\n}\n\n/**\n * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"./proj/Projection.js\").default} projection Projection.\n * @return {string|undefined} Tile URL.\n */\nexport function nullTileUrlFunction(tileCoord, pixelRatio, projection) {\n  return undefined;\n}\n", "/**\n * @module ol/source/Tile\n */\nimport Event from '../events/Event.js';\nimport {scale as scaleSize, toSize} from '../size.js';\nimport {withinExtentAndZ} from '../tilecoord.js';\nimport {\n  getForProjection as getTileGridForProjection,\n  wrapX,\n} from '../tilegrid.js';\nimport {abstract, getUid} from '../util.js';\nimport Source from './Source.js';\n\n/***\n * @template Return\n * @typedef {import(\"../Observable.js\").OnSignature<import(\"../Observable.js\").EventTypes, import(\"../events/Event.js\").default, Return> &\n *   import(\"../Observable.js\").OnSignature<import(\"../ObjectEventType.js\").Types, import(\"../Object.js\").ObjectEvent, Return> &\n *   import(\"../Observable.js\").OnSignature<import(\"./TileEventType.js\").TileSourceEventTypes, TileSourceEvent, Return> &\n *   import(\"../Observable.js\").CombinedOnSignature<import(\"../Observable.js\").EventTypes|import(\"../ObjectEventType.js\").Types|\n *     import(\"./TileEventType.js\").TileSourceEventTypes, Return>} TileSourceOnSignature\n */\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.\n * @property {number} [cacheSize] Deprecated.  Use the cacheSize option on the layer instead.\n * @property {number} [tilePixelRatio] TilePixelRatio.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection.\n * @property {import(\"./Source.js\").State} [state] State.\n * @property {import(\"../tilegrid/TileGrid.js\").default} [tileGrid] TileGrid.\n * @property {boolean} [wrapX=false] WrapX.\n * @property {number} [transition] Transition.\n * @property {string} [key] Key.\n * @property {number|import(\"../array.js\").NearestDirectionFunction} [zDirection=0] ZDirection.\n * @property {boolean} [interpolate=false] Use interpolated values when resampling.  By default,\n * the nearest neighbor is used when resampling.\n */\n\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Base class for sources providing images divided into a tile grid.\n *\n * @template {import(\"../Tile.js\").default} [TileType=import(\"../Tile.js\").default]\n * @abstract\n * @api\n */\nclass TileSource extends Source {\n  /**\n   * @param {Options} options SourceTile source options.\n   */\n  constructor(options) {\n    super({\n      attributions: options.attributions,\n      attributionsCollapsible: options.attributionsCollapsible,\n      projection: options.projection,\n      state: options.state,\n      wrapX: options.wrapX,\n      interpolate: options.interpolate,\n    });\n\n    /***\n     * @type {TileSourceOnSignature<import(\"../events.js\").EventsKey>}\n     */\n    this.on;\n\n    /***\n     * @type {TileSourceOnSignature<import(\"../events.js\").EventsKey>}\n     */\n    this.once;\n\n    /***\n     * @type {TileSourceOnSignature<void>}\n     */\n    this.un;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.tilePixelRatio_ =\n      options.tilePixelRatio !== undefined ? options.tilePixelRatio : 1;\n\n    /**\n     * @type {import(\"../tilegrid/TileGrid.js\").default|null}\n     * @protected\n     */\n    this.tileGrid = options.tileGrid !== undefined ? options.tileGrid : null;\n\n    const tileSize = [256, 256];\n    if (this.tileGrid) {\n      toSize(this.tileGrid.getTileSize(this.tileGrid.getMinZoom()), tileSize);\n    }\n\n    /**\n     * @protected\n     * @type {import(\"../size.js\").Size}\n     */\n    this.tmpSize = [0, 0];\n\n    /**\n     * @private\n     * @type {string}\n     */\n    this.key_ = options.key || getUid(this);\n\n    /**\n     * @protected\n     * @type {import(\"../Tile.js\").Options}\n     */\n    this.tileOptions = {\n      transition: options.transition,\n      interpolate: options.interpolate,\n    };\n\n    /**\n     * zDirection hint, read by the renderer. Indicates which resolution should be used\n     * by a renderer if the views resolution does not match any resolution of the tile source.\n     * If 0, the nearest resolution will be used. If 1, the nearest lower resolution\n     * will be used. If -1, the nearest higher resolution will be used.\n     * @type {number|import(\"../array.js\").NearestDirectionFunction}\n     */\n    this.zDirection = options.zDirection ? options.zDirection : 0;\n  }\n\n  /**\n   * @param {import(\"../proj/Projection.js\").default} projection Projection.\n   * @return {number} Gutter.\n   */\n  getGutterForProjection(projection) {\n    return 0;\n  }\n\n  /**\n   * Return the key to be used for all tiles in the source.\n   * @return {string} The key for all tiles.\n   */\n  getKey() {\n    return this.key_;\n  }\n\n  /**\n   * Set the value to be used as the key for all tiles in the source.\n   * @param {string} key The key for tiles.\n   * @protected\n   */\n  setKey(key) {\n    if (this.key_ !== key) {\n      this.key_ = key;\n      this.changed();\n    }\n  }\n\n  /**\n   * @param {import(\"../proj/Projection.js\").default} [projection] Projection.\n   * @return {Array<number>|null} Resolutions.\n   * @override\n   */\n  getResolutions(projection) {\n    const tileGrid = projection\n      ? this.getTileGridForProjection(projection)\n      : this.tileGrid;\n    if (!tileGrid) {\n      return null;\n    }\n    return tileGrid.getResolutions();\n  }\n\n  /**\n   * @abstract\n   * @param {number} z Tile coordinate z.\n   * @param {number} x Tile coordinate x.\n   * @param {number} y Tile coordinate y.\n   * @param {number} pixelRatio Pixel ratio.\n   * @param {import(\"../proj/Projection.js\").default} projection Projection.\n   * @param {import(\"../structs/LRUCache.js\").default<import(\"../Tile.js\").default>} [tileCache] Tile cache.\n   * @return {TileType|null} Tile.\n   */\n  getTile(z, x, y, pixelRatio, projection, tileCache) {\n    return abstract();\n  }\n\n  /**\n   * Return the tile grid of the tile source.\n   * @return {import(\"../tilegrid/TileGrid.js\").default|null} Tile grid.\n   * @api\n   */\n  getTileGrid() {\n    return this.tileGrid;\n  }\n\n  /**\n   * @param {import(\"../proj/Projection.js\").default} projection Projection.\n   * @return {!import(\"../tilegrid/TileGrid.js\").default} Tile grid.\n   */\n  getTileGridForProjection(projection) {\n    if (!this.tileGrid) {\n      return getTileGridForProjection(projection);\n    }\n    return this.tileGrid;\n  }\n\n  /**\n   * Get the tile pixel ratio for this source. Subclasses may override this\n   * method, which is meant to return a supported pixel ratio that matches the\n   * provided `pixelRatio` as close as possible.\n   * @param {number} pixelRatio Pixel ratio.\n   * @return {number} Tile pixel ratio.\n   */\n  getTilePixelRatio(pixelRatio) {\n    return this.tilePixelRatio_;\n  }\n\n  /**\n   * @param {number} z Z.\n   * @param {number} pixelRatio Pixel ratio.\n   * @param {import(\"../proj/Projection.js\").default} projection Projection.\n   * @return {import(\"../size.js\").Size} Tile size.\n   */\n  getTilePixelSize(z, pixelRatio, projection) {\n    const tileGrid = this.getTileGridForProjection(projection);\n    const tilePixelRatio = this.getTilePixelRatio(pixelRatio);\n    const tileSize = toSize(tileGrid.getTileSize(z), this.tmpSize);\n    if (tilePixelRatio == 1) {\n      return tileSize;\n    }\n    return scaleSize(tileSize, tilePixelRatio, this.tmpSize);\n  }\n\n  /**\n   * Returns a tile coordinate wrapped around the x-axis. When the tile coordinate\n   * is outside the resolution and extent range of the tile grid, `null` will be\n   * returned.\n   * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n   * @param {import(\"../proj/Projection.js\").default} [projection] Projection.\n   * @return {import(\"../tilecoord.js\").TileCoord} Tile coordinate to be passed to the tileUrlFunction or\n   *     null if no tile URL should be created for the passed `tileCoord`.\n   */\n  getTileCoordForTileUrlFunction(tileCoord, projection) {\n    const gridProjection =\n      projection !== undefined ? projection : this.getProjection();\n    const tileGrid =\n      projection !== undefined\n        ? this.getTileGridForProjection(gridProjection)\n        : this.tileGrid || this.getTileGridForProjection(gridProjection);\n    if (this.getWrapX() && gridProjection.isGlobal()) {\n      tileCoord = wrapX(tileGrid, tileCoord, gridProjection);\n    }\n    return withinExtentAndZ(tileCoord, tileGrid) ? tileCoord : null;\n  }\n\n  /**\n   * Remove all cached reprojected tiles from the source. The next render cycle will create new tiles.\n   * @api\n   */\n  clear() {}\n\n  /**\n   * @override\n   */\n  refresh() {\n    this.clear();\n    super.refresh();\n  }\n}\n\n/**\n * @classdesc\n * Events emitted by {@link module:ol/source/Tile~TileSource} instances are instances of this\n * type.\n */\nexport class TileSourceEvent extends Event {\n  /**\n   * @param {string} type Type.\n   * @param {import(\"../Tile.js\").default} tile The tile.\n   */\n  constructor(type, tile) {\n    super(type);\n\n    /**\n     * The tile related to the event.\n     * @type {import(\"../Tile.js\").default}\n     * @api\n     */\n    this.tile = tile;\n  }\n}\n\nexport default TileSource;\n", "/**\n * @module ol/source/TileEventType\n */\n\n/**\n * @enum {string}\n */\nexport default {\n  /**\n   * Triggered when a tile starts loading.\n   * @event module:ol/source/Tile.TileSourceEvent#tileloadstart\n   * @api\n   */\n  TILELOADSTART: 'tileloadstart',\n\n  /**\n   * Triggered when a tile finishes loading, either when its data is loaded,\n   * or when loading was aborted because the tile is no longer needed.\n   * @event module:ol/source/Tile.TileSourceEvent#tileloadend\n   * @api\n   */\n  TILELOADEND: 'tileloadend',\n\n  /**\n   * Triggered if tile loading results in an error. Note that this is not the\n   * right place to re-fetch tiles. See {@link module:ol/ImageTile~ImageTile#load}\n   * for details.\n   * @event module:ol/source/Tile.TileSourceEvent#tileloaderror\n   * @api\n   */\n  TILELOADERROR: 'tileloaderror',\n};\n\n/**\n * @typedef {'tileloadstart'|'tileloadend'|'tileloaderror'} TileSourceEventTypes\n */\n", "/**\n * @module ol/source/UrlTile\n */\nimport TileState from '../TileState.js';\nimport {createFromTemplates} from '../tileurlfunction.js';\nimport {expandUrl} from '../uri.js';\nimport {getUid} from '../util.js';\nimport TileSource, {TileSourceEvent} from './Tile.js';\nimport TileEventType from './TileEventType.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.\n * @property {number} [cacheSize] Deprecated.  Use the cacheSize option on the layer instead.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection.\n * @property {import(\"./Source.js\").State} [state] State.\n * @property {import(\"../tilegrid/TileGrid.js\").default} [tileGrid] TileGrid.\n * @property {import(\"../Tile.js\").LoadFunction} tileLoadFunction TileLoadFunction.\n * @property {number} [tilePixelRatio] TilePixelRatio.\n * @property {import(\"../Tile.js\").UrlFunction} [tileUrlFunction] Deprecated.  Use an ImageTile source and provide a function\n * for the url option instead.\n * @property {string} [url] Url.\n * @property {Array<string>} [urls] Urls.\n * @property {boolean} [wrapX=true] WrapX.\n * @property {number} [transition] Transition.\n * @property {string} [key] Key.\n * @property {number|import(\"../array.js\").NearestDirectionFunction} [zDirection=0] ZDirection.\n * @property {boolean} [interpolate=false] Use interpolated values when resampling.  By default,\n * the nearest neighbor is used when resampling.\n */\n\n/**\n * @deprecated Use the ol/source/ImageTile.js instead.\n *\n * @fires import(\"./Tile.js\").TileSourceEvent\n */\nclass UrlTile extends TileSource {\n  /**\n   * @param {Options} options Image tile options.\n   */\n  constructor(options) {\n    super({\n      attributions: options.attributions,\n      cacheSize: options.cacheSize,\n      projection: options.projection,\n      state: options.state,\n      tileGrid: options.tileGrid,\n      tilePixelRatio: options.tilePixelRatio,\n      wrapX: options.wrapX,\n      transition: options.transition,\n      interpolate: options.interpolate,\n      key: options.key,\n      attributionsCollapsible: options.attributionsCollapsible,\n      zDirection: options.zDirection,\n    });\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.generateTileUrlFunction_ =\n      this.tileUrlFunction === UrlTile.prototype.tileUrlFunction;\n\n    /**\n     * @protected\n     * @type {import(\"../Tile.js\").LoadFunction}\n     */\n    this.tileLoadFunction = options.tileLoadFunction;\n\n    if (options.tileUrlFunction) {\n      this.tileUrlFunction = options.tileUrlFunction;\n    }\n\n    /**\n     * @protected\n     * @type {!Array<string>|null}\n     */\n    this.urls = null;\n\n    if (options.urls) {\n      this.setUrls(options.urls);\n    } else if (options.url) {\n      this.setUrl(options.url);\n    }\n\n    /**\n     * @private\n     * @type {!Object<string, boolean>}\n     */\n    this.tileLoadingKeys_ = {};\n  }\n\n  /**\n   * Deprecated.  Use an ImageTile source instead.\n   * Return the tile load function of the source.\n   * @return {import(\"../Tile.js\").LoadFunction} TileLoadFunction\n   * @api\n   */\n  getTileLoadFunction() {\n    return this.tileLoadFunction;\n  }\n\n  /**\n   * Deprecated.  Use an ImageTile source instead.\n   * Return the tile URL function of the source.\n   * @return {import(\"../Tile.js\").UrlFunction} TileUrlFunction\n   * @api\n   */\n  getTileUrlFunction() {\n    return Object.getPrototypeOf(this).tileUrlFunction === this.tileUrlFunction\n      ? this.tileUrlFunction.bind(this)\n      : this.tileUrlFunction;\n  }\n\n  /**\n   * Deprecated.  Use an ImageTile source instead.\n   * Return the URLs used for this source.\n   * When a tileUrlFunction is used instead of url or urls,\n   * null will be returned.\n   * @return {!Array<string>|null} URLs.\n   * @api\n   */\n  getUrls() {\n    return this.urls;\n  }\n\n  /**\n   * Handle tile change events.\n   * @param {import(\"../events/Event.js\").default} event Event.\n   * @protected\n   */\n  handleTileChange(event) {\n    const tile = /** @type {import(\"../Tile.js\").default} */ (event.target);\n    const uid = getUid(tile);\n    const tileState = tile.getState();\n    let type;\n    if (tileState == TileState.LOADING) {\n      this.tileLoadingKeys_[uid] = true;\n      type = TileEventType.TILELOADSTART;\n    } else if (uid in this.tileLoadingKeys_) {\n      delete this.tileLoadingKeys_[uid];\n      type =\n        tileState == TileState.ERROR\n          ? TileEventType.TILELOADERROR\n          : tileState == TileState.LOADED\n            ? TileEventType.TILELOADEND\n            : undefined;\n    }\n    if (type != undefined) {\n      this.dispatchEvent(new TileSourceEvent(type, tile));\n    }\n  }\n\n  /**\n   * Deprecated.  Use an ImageTile source instead.\n   * Set the tile load function of the source.\n   * @param {import(\"../Tile.js\").LoadFunction} tileLoadFunction Tile load function.\n   * @api\n   */\n  setTileLoadFunction(tileLoadFunction) {\n    this.tileLoadFunction = tileLoadFunction;\n    this.changed();\n  }\n\n  /**\n   * Deprecated.  Use an ImageTile source instead.\n   * Set the tile URL function of the source.\n   * @param {import(\"../Tile.js\").UrlFunction} tileUrlFunction Tile URL function.\n   * @param {string} [key] Optional new tile key for the source.\n   * @api\n   */\n  setTileUrlFunction(tileUrlFunction, key) {\n    this.tileUrlFunction = tileUrlFunction;\n    if (typeof key !== 'undefined') {\n      this.setKey(key);\n    } else {\n      this.changed();\n    }\n  }\n\n  /**\n   * Set the URL to use for requests.\n   * @param {string} url URL.\n   * @api\n   */\n  setUrl(url) {\n    const urls = expandUrl(url);\n    this.urls = urls;\n    this.setUrls(urls);\n  }\n\n  /**\n   * Deprecated.  Use an ImageTile source instead.\n   * Set the URLs to use for requests.\n   * @param {Array<string>} urls URLs.\n   * @api\n   */\n  setUrls(urls) {\n    this.urls = urls;\n    const key = urls.join('\\n');\n    if (this.generateTileUrlFunction_) {\n      this.setTileUrlFunction(createFromTemplates(urls, this.tileGrid), key);\n    } else {\n      this.setKey(key);\n    }\n  }\n\n  /**\n   * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n   * @param {number} pixelRatio Pixel ratio.\n   * @param {import(\"../proj/Projection.js\").default} projection Projection.\n   * @return {string|undefined} Tile URL.\n   */\n  tileUrlFunction(tileCoord, pixelRatio, projection) {\n    return undefined;\n  }\n}\n\nexport default UrlTile;\n", "/**\n * @module ol/source/TileImage\n */\nimport ImageTile from '../ImageTile.js';\nimport TileState from '../TileState.js';\nimport EventType from '../events/EventType.js';\nimport {WORKER_OFFSCREEN_CANVAS} from '../has.js';\nimport {equivalent, get as getProjection} from '../proj.js';\nimport ReprojTile from '../reproj/Tile.js';\nimport {getCacheKey} from '../tilecoord.js';\nimport {getForProjection as getTileGridForProjection} from '../tilegrid.js';\nimport {getUid} from '../util.js';\nimport UrlTile from './UrlTile.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.\n * @property {number} [cacheSize] Deprecated.  Use the cacheSize option on the layer instead.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images.  Note that\n * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {ReferrerPolicy} [referrerPolicy] The `referrerPolicy` property for loaded images.\n * @property {boolean} [interpolate=true] Use interpolated values when resampling.  By default,\n * linear interpolation is used when resampling.  Set to false to use the nearest neighbor instead.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection. Default is the view projection.\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {import(\"./Source.js\").State} [state] Source state.\n * @property {typeof import(\"../ImageTile.js\").default} [tileClass] Class used to instantiate image tiles.\n * Default is {@link module:ol/ImageTile~ImageTile}.\n * @property {import(\"../tilegrid/TileGrid.js\").default} [tileGrid] Tile grid.\n * @property {import(\"../Tile.js\").LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL. The default is\n * ```js\n * function(imageTile, src) {\n *   imageTile.getImage().src = src;\n * };\n * ```\n * @property {number} [tilePixelRatio=1] The pixel ratio used by the tile service. For example, if the tile\n * service advertizes 256px by 256px tiles but actually sends 512px\n * by 512px images (for retina/hidpi devices) then `tilePixelRatio`\n * should be set to `2`.\n * @property {import(\"../Tile.js\").UrlFunction} [tileUrlFunction] Deprecated.  Use an ImageTile source and provide a function\n * for the url option instead.\n * @property {string} [url] URL template. Must include `{x}`, `{y}` or `{-y}`, and `{z}` placeholders.\n * A `{?-?}` template pattern, for example `subdomain{a-f}.domain.com`, may be\n * used instead of defining each one separately in the `urls` option.\n * @property {Array<string>} [urls] An array of URL templates.\n * @property {boolean} [wrapX] Whether to wrap the world horizontally. The default, is to\n * request out-of-bounds tiles from the server. When set to `false`, only one\n * world will be rendered. When set to `true`, tiles will be requested for one\n * world only, but they will be wrapped horizontally to render multiple worlds.\n * @property {number} [transition] Duration of the opacity transition for rendering.\n * To disable the opacity transition, pass `transition: 0`.\n * @property {string} [key] Optional tile key for proper cache fetching\n * @property {number|import(\"../array.js\").NearestDirectionFunction} [zDirection=0]\n * Choose whether to use tiles with a higher or lower zoom level when between integer\n * zoom levels. See {@link module:ol/tilegrid/TileGrid~TileGrid#getZForResolution}.\n */\n\n/**\n * @deprecated Use the ol/source/ImageTile.js instead.\n *\n * @fires import(\"./Tile.js\").TileSourceEvent\n * @api\n */\nclass TileImage extends UrlTile {\n  /**\n   * @param {!Options} options Image tile options.\n   */\n  constructor(options) {\n    super({\n      attributions: options.attributions,\n      cacheSize: options.cacheSize,\n      projection: options.projection,\n      state: options.state,\n      tileGrid: options.tileGrid,\n      tileLoadFunction: options.tileLoadFunction\n        ? options.tileLoadFunction\n        : defaultTileLoadFunction,\n      tilePixelRatio: options.tilePixelRatio,\n      tileUrlFunction: options.tileUrlFunction,\n      url: options.url,\n      urls: options.urls,\n      wrapX: options.wrapX,\n      transition: options.transition,\n      interpolate:\n        options.interpolate !== undefined ? options.interpolate : true,\n      key: options.key,\n      attributionsCollapsible: options.attributionsCollapsible,\n      zDirection: options.zDirection,\n    });\n\n    /**\n     * @protected\n     * @type {?string}\n     */\n    this.crossOrigin =\n      options.crossOrigin !== undefined ? options.crossOrigin : null;\n\n    /**\n     * @protected\n     * @type {ReferrerPolicy}\n     */\n    this.referrerPolicy = options.referrerPolicy;\n\n    /**\n     * @protected\n     * @type {typeof ImageTile}\n     */\n    this.tileClass =\n      options.tileClass !== undefined ? options.tileClass : ImageTile;\n\n    /**\n     * @protected\n     * @type {!Object<string, import(\"../tilegrid/TileGrid.js\").default>}\n     */\n    this.tileGridForProjection = {};\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.reprojectionErrorThreshold_ = options.reprojectionErrorThreshold;\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.renderReprojectionEdges_ = false;\n  }\n\n  /**\n   * @param {import(\"../proj/Projection.js\").default} projection Projection.\n   * @return {number} Gutter.\n   * @override\n   */\n  getGutterForProjection(projection) {\n    if (\n      this.getProjection() &&\n      projection &&\n      !equivalent(this.getProjection(), projection)\n    ) {\n      return 0;\n    }\n    return this.getGutter();\n  }\n\n  /**\n   * @return {number} Gutter.\n   */\n  getGutter() {\n    return 0;\n  }\n\n  /**\n   * Return the key to be used for all tiles in the source.\n   * @return {string} The key for all tiles.\n   * @override\n   */\n  getKey() {\n    let key = super.getKey();\n    if (!this.getInterpolate()) {\n      key += ':disable-interpolation';\n    }\n    return key;\n  }\n\n  /**\n   * @param {import(\"../proj/Projection.js\").default} projection Projection.\n   * @return {!import(\"../tilegrid/TileGrid.js\").default} Tile grid.\n   * @override\n   */\n  getTileGridForProjection(projection) {\n    const thisProj = this.getProjection();\n    if (this.tileGrid && (!thisProj || equivalent(thisProj, projection))) {\n      return this.tileGrid;\n    }\n    const projKey = getUid(projection);\n    if (!(projKey in this.tileGridForProjection)) {\n      this.tileGridForProjection[projKey] =\n        getTileGridForProjection(projection);\n    }\n    return this.tileGridForProjection[projKey];\n  }\n\n  /**\n   * @param {number} z Tile coordinate z.\n   * @param {number} x Tile coordinate x.\n   * @param {number} y Tile coordinate y.\n   * @param {number} pixelRatio Pixel ratio.\n   * @param {import(\"../proj/Projection.js\").default} projection Projection.\n   * @param {string} key The key set on the tile.\n   * @return {!ImageTile} Tile.\n   * @private\n   */\n  createTile_(z, x, y, pixelRatio, projection, key) {\n    const tileCoord = [z, x, y];\n    const urlTileCoord = this.getTileCoordForTileUrlFunction(\n      tileCoord,\n      projection,\n    );\n    const tileUrl = urlTileCoord\n      ? this.tileUrlFunction(urlTileCoord, pixelRatio, projection)\n      : undefined;\n    const tile = new this.tileClass(\n      tileCoord,\n      tileUrl !== undefined ? TileState.IDLE : TileState.EMPTY,\n      tileUrl !== undefined ? tileUrl : '',\n      {\n        crossOrigin: this.crossOrigin,\n        referrerPolicy: this.referrerPolicy,\n      },\n      this.tileLoadFunction,\n      this.tileOptions,\n    );\n    tile.key = key;\n    tile.addEventListener(EventType.CHANGE, this.handleTileChange.bind(this));\n    return tile;\n  }\n\n  /**\n   * @param {number} z Tile coordinate z.\n   * @param {number} x Tile coordinate x.\n   * @param {number} y Tile coordinate y.\n   * @param {number} pixelRatio Pixel ratio.\n   * @param {import(\"../proj/Projection.js\").default} projection Projection.\n   * @param {import(\"../structs/LRUCache.js\").default<import(\"../Tile.js\").default>} [tileCache] Tile cache.\n   * @return {!(ImageTile|ReprojTile)} Tile.\n   * @override\n   */\n  getTile(z, x, y, pixelRatio, projection, tileCache) {\n    const sourceProjection = this.getProjection();\n    if (\n      !sourceProjection ||\n      !projection ||\n      equivalent(sourceProjection, projection)\n    ) {\n      return this.getTileInternal(\n        z,\n        x,\n        y,\n        pixelRatio,\n        sourceProjection || projection,\n      );\n    }\n    const tileCoord = [z, x, y];\n    const key = this.getKey();\n    const sourceTileGrid = this.getTileGridForProjection(sourceProjection);\n    const targetTileGrid = this.getTileGridForProjection(projection);\n    const wrappedTileCoord = this.getTileCoordForTileUrlFunction(\n      tileCoord,\n      projection,\n    );\n    const tile = new ReprojTile(\n      sourceProjection,\n      sourceTileGrid,\n      projection,\n      targetTileGrid,\n      tileCoord,\n      wrappedTileCoord,\n      this.getTilePixelRatio(pixelRatio),\n      this.getGutter(),\n      (z, x, y, pixelRatio) =>\n        this.getTileInternal(z, x, y, pixelRatio, sourceProjection, tileCache),\n      this.reprojectionErrorThreshold_,\n      this.renderReprojectionEdges_,\n      this.tileOptions,\n    );\n    tile.key = key;\n    return tile;\n  }\n\n  /**\n   * @param {number} z Tile coordinate z.\n   * @param {number} x Tile coordinate x.\n   * @param {number} y Tile coordinate y.\n   * @param {number} pixelRatio Pixel ratio.\n   * @param {!import(\"../proj/Projection.js\").default} projection Projection.\n   * @param {import(\"../structs/LRUCache.js\").default<import(\"../Tile.js\").default>} [tileCache] Tile cache.\n   * @return {!ImageTile} Tile.\n   * @protected\n   */\n  getTileInternal(z, x, y, pixelRatio, projection, tileCache) {\n    const key = this.getKey();\n    const cacheKey = getCacheKey(this, key, z, x, y);\n    if (tileCache && tileCache.containsKey(cacheKey)) {\n      const tile = /** @type {!ImageTile} */ (tileCache.get(cacheKey));\n      return tile;\n    }\n    const tile = this.createTile_(z, x, y, pixelRatio, projection, key);\n    tileCache?.set(cacheKey, tile);\n    return tile;\n  }\n\n  /**\n   * Sets whether to render reprojection edges or not (usually for debugging).\n   * @param {boolean} render Render the edges.\n   * @api\n   */\n  setRenderReprojectionEdges(render) {\n    if (this.renderReprojectionEdges_ == render) {\n      return;\n    }\n    this.renderReprojectionEdges_ = render;\n    this.changed();\n  }\n\n  /**\n   * Sets the tile grid to use when reprojecting the tiles to the given\n   * projection instead of the default tile grid for the projection.\n   *\n   * This can be useful when the default tile grid cannot be created\n   * (e.g. projection has no extent defined) or\n   * for optimization reasons (custom tile size, resolutions, ...).\n   *\n   * @param {import(\"../proj.js\").ProjectionLike} projection Projection.\n   * @param {import(\"../tilegrid/TileGrid.js\").default} tilegrid Tile grid to use for the projection.\n   * @api\n   */\n  setTileGridForProjection(projection, tilegrid) {\n    const proj = getProjection(projection);\n    if (proj) {\n      const projKey = getUid(proj);\n      if (!(projKey in this.tileGridForProjection)) {\n        this.tileGridForProjection[projKey] = tilegrid;\n      }\n    }\n  }\n}\n\n/**\n * @param {ImageTile} imageTile Image tile.\n * @param {string} src Source.\n */\nexport function defaultTileLoadFunction(imageTile, src) {\n  if (WORKER_OFFSCREEN_CANVAS) {\n    // special treatment for offscreen canvas\n    const crossOrigin = imageTile.getCrossOrigin();\n\n    /** @type {RequestMode} */\n    let mode = 'same-origin';\n    /** @type {RequestCredentials} */\n    let credentials = 'same-origin';\n    if (crossOrigin === 'anonymous' || crossOrigin === '') {\n      mode = 'cors';\n      credentials = 'omit';\n    } else if (crossOrigin === 'use-credentials') {\n      mode = 'cors';\n      credentials = 'include';\n    }\n\n    const options = {\n      mode,\n      credentials,\n      referrerPolicy: imageTile.getReferrerPolicy(),\n    };\n\n    fetch(src, options)\n      .then((response) => {\n        if (!response.ok) {\n          throw new Error(`HTTP ${response.status}`);\n        }\n        return response.blob();\n      })\n      .then((blob) => {\n        return createImageBitmap(blob);\n      })\n      .then((imageBitmap) => {\n        const canvas = imageTile.getImage();\n        canvas.width = imageBitmap.width;\n        canvas.height = imageBitmap.height;\n        const ctx = /** @type {OffscreenCanvas} */ (canvas).getContext('2d');\n        ctx.drawImage(imageBitmap, 0, 0);\n        imageBitmap.close?.();\n        // mock the image 'load' event\n        canvas.dispatchEvent(new Event('load'));\n      })\n      .catch(() => {\n        const canvas = imageTile.getImage();\n        canvas.dispatchEvent(new Event('error'));\n      });\n    return;\n  }\n\n  /** @type {HTMLImageElement|HTMLVideoElement} */ (imageTile.getImage()).src =\n    src;\n}\n\nexport default TileImage;\n", "/**\n * @module ol/source/BingMaps\n */\n\nimport {applyTransform, intersects} from '../extent.js';\nimport {get as getProjection, getTransformFromProjections} from '../proj.js';\nimport {createOrUpdate} from '../tilecoord.js';\nimport {createXYZ, extentFromProjection} from '../tilegrid.js';\nimport {createFromTileUrlFunctions} from '../tileurlfunction.js';\nimport TileImage from './TileImage.js';\n\n/**\n * @param {import('../tilecoord.js').TileCoord} tileCoord Tile coord.\n * @return {string} Quad key.\n */\nexport function quadKey(tileCoord) {\n  const z = tileCoord[0];\n  const digits = new Array(z);\n  let mask = 1 << (z - 1);\n  let i, charCode;\n  for (i = 0; i < z; ++i) {\n    // 48 is charCode for 0 - '0'.charCodeAt(0)\n    charCode = 48;\n    if (tileCoord[1] & mask) {\n      charCode += 1;\n    }\n    if (tileCoord[2] & mask) {\n      charCode += 2;\n    }\n    digits[i] = String.fromCharCode(charCode);\n    mask >>= 1;\n  }\n  return digits.join('');\n}\n\n/**\n * The attribution containing a link to the Microsoft\u00AE Bing\u2122 Maps Platform APIs\u2019\n * Terms Of Use.\n * @const\n * @type {string}\n */\nconst TOS_ATTRIBUTION =\n  '<a class=\"ol-attribution-bing-tos\" ' +\n  'href=\"https://www.microsoft.com/maps/product/terms.html\" target=\"_blank\">' +\n  'Terms of Use</a>';\n\n/**\n * @typedef {Object} Options\n * @property {number} [cacheSize] Deprecated.  Use the cacheSize option on the layer instead.\n * @property {boolean} [hidpi=false] If `true` hidpi tiles will be requested.\n * @property {string} [culture='en-us'] Culture code.\n * @property {string} key Bing Maps API key. Get yours at https://www.bingmapsportal.com/.\n * @property {string} imagerySet Type of imagery.\n * @property {boolean} [interpolate=true] Use interpolated values when resampling.  By default,\n * linear interpolation is used when resampling.  Set to false to use the nearest neighbor instead.\n * @property {number} [maxZoom=21] Max zoom. Default is what's advertized by the BingMaps service.\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {import(\"../Tile.js\").LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL. The default is\n * ```js\n * function(imageTile, src) {\n *   imageTile.getImage().src = src;\n * };\n * ```\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n * @property {number} [transition] Duration of the opacity transition for rendering.\n * To disable the opacity transition, pass `transition: 0`.\n * @property {number|import(\"../array.js\").NearestDirectionFunction} [zDirection=0]\n * Choose whether to use tiles with a higher or lower zoom level when between integer\n * zoom levels. See {@link module:ol/tilegrid/TileGrid~TileGrid#getZForResolution}.\n * @property {boolean} [placeholderTiles] Whether to show BingMaps placeholder tiles when zoomed past the maximum level provided in an area. When `false`, requests beyond\n * the maximum zoom level will return no tile. When `true`, the placeholder tile will be returned. When not set, the default behaviour of the imagery set takes place,\n * which is unique for each imagery set in BingMaps.\n * @property {string} [url='https://dev.virtualearth.net/REST/v1/Imagery/Metadata/'] The Bing Map Metadata API URL.\n */\n\n/**\n * @typedef {Object} BingMapsImageryMetadataResponse\n * @property {number} statusCode The response status code\n * @property {string} statusDescription The response status description\n * @property {string} authenticationResultCode The authentication result code\n * @property {Array<ResourceSet>} resourceSets The array of resource sets\n */\n\n/**\n * @typedef {Object} ResourceSet\n * @property {Array<Resource>} resources Resources.\n */\n\n/**\n * @typedef {Object} Resource\n * @property {number} imageHeight The image height\n * @property {number} imageWidth The image width\n * @property {number} zoomMin The minimum zoom level\n * @property {number} zoomMax The maximum zoom level\n * @property {string} imageUrl The image URL\n * @property {Array<string>} imageUrlSubdomains The image URL subdomains for rotation\n * @property {Array<ImageryProvider>} [imageryProviders] The array of ImageryProviders\n */\n\n/**\n * @typedef {Object} ImageryProvider\n * @property {Array<CoverageArea>} coverageAreas The coverage areas\n * @property {string} [attribution] The attribution\n */\n\n/**\n * @typedef {Object} CoverageArea\n * @property {number} zoomMin The minimum zoom\n * @property {number} zoomMax The maximum zoom\n * @property {Array<number>} bbox The coverage bounding box\n */\n\n/**\n * @classdesc\n * Layer source for Bing Maps tile data.\n * @deprecated Bing Maps for Enterprise is being retired on June 30th, 2028. Use\n * `ol/source/ImageTile` with the Azure Maps tile API instead. See the azure-maps\n * example for guidance.\n * @api\n */\nclass BingMaps extends TileImage {\n  /**\n   * @param {Options} options Bing Maps options.\n   */\n  constructor(options) {\n    const hidpi = options.hidpi !== undefined ? options.hidpi : false;\n\n    super({\n      cacheSize: options.cacheSize,\n      crossOrigin: 'anonymous',\n      interpolate: options.interpolate,\n      projection: getProjection('EPSG:3857'),\n      reprojectionErrorThreshold: options.reprojectionErrorThreshold,\n      state: 'loading',\n      tileLoadFunction: options.tileLoadFunction,\n      tilePixelRatio: hidpi ? 2 : 1,\n      wrapX: options.wrapX !== undefined ? options.wrapX : true,\n      transition: options.transition,\n      zDirection: options.zDirection,\n    });\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.hidpi_ = hidpi;\n\n    /**\n     * @private\n     * @type {string}\n     */\n    this.culture_ = options.culture !== undefined ? options.culture : 'en-us';\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.maxZoom_ = options.maxZoom !== undefined ? options.maxZoom : -1;\n\n    /**\n     * @private\n     * @type {string}\n     */\n    this.apiKey_ = options.key;\n\n    /**\n     * @private\n     * @type {string}\n     */\n    this.imagerySet_ = options.imagerySet;\n\n    /**\n     * @private\n     * @type {boolean|undefined}\n     */\n    this.placeholderTiles_ = options.placeholderTiles;\n\n    const url =\n      (options.url ||\n        'https://dev.virtualearth.net/REST/v1/Imagery/Metadata/') +\n      this.imagerySet_ +\n      '?uriScheme=https&include=ImageryProviders&key=' +\n      this.apiKey_ +\n      '&c=' +\n      this.culture_;\n\n    fetch(url)\n      .then((response) => response.json())\n      .then((json) => this.handleImageryMetadataResponse(json));\n  }\n\n  /**\n   * Get the api key used for this source.\n   *\n   * @return {string} The api key.\n   * @api\n   */\n  getApiKey() {\n    return this.apiKey_;\n  }\n\n  /**\n   * Get the imagery set associated with this source.\n   *\n   * @return {string} The imagery set.\n   * @api\n   */\n  getImagerySet() {\n    return this.imagerySet_;\n  }\n\n  /**\n   * @param {BingMapsImageryMetadataResponse} response Response.\n   */\n  handleImageryMetadataResponse(response) {\n    if (\n      response.statusCode != 200 ||\n      response.statusDescription != 'OK' ||\n      response.authenticationResultCode != 'ValidCredentials' ||\n      response.resourceSets.length != 1 ||\n      response.resourceSets[0].resources.length != 1\n    ) {\n      this.setState('error');\n      return;\n    }\n\n    const resource = response.resourceSets[0].resources[0];\n    const maxZoom = this.maxZoom_ == -1 ? resource.zoomMax : this.maxZoom_;\n\n    const sourceProjection = this.getProjection();\n    const extent = extentFromProjection(sourceProjection);\n    const scale = this.hidpi_ ? 2 : 1;\n    const tileSize =\n      resource.imageWidth == resource.imageHeight\n        ? resource.imageWidth / scale\n        : [resource.imageWidth / scale, resource.imageHeight / scale];\n\n    const tileGrid = createXYZ({\n      extent: extent,\n      minZoom: resource.zoomMin,\n      maxZoom: maxZoom,\n      tileSize: tileSize,\n    });\n    this.tileGrid = tileGrid;\n\n    const culture = this.culture_;\n    const hidpi = this.hidpi_;\n    const placeholderTiles = this.placeholderTiles_;\n    this.tileUrlFunction = createFromTileUrlFunctions(\n      resource.imageUrlSubdomains.map(function (subdomain) {\n        /** @type {import('../tilecoord.js').TileCoord} */\n        const quadKeyTileCoord = [0, 0, 0];\n        const imageUrl = resource.imageUrl\n          .replace('{subdomain}', subdomain)\n          .replace('{culture}', culture);\n        return (\n          /**\n           * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n           * @param {number} pixelRatio Pixel ratio.\n           * @param {import(\"../proj/Projection.js\").default} projection Projection.\n           * @return {string|undefined} Tile URL.\n           */\n          function (tileCoord, pixelRatio, projection) {\n            if (!tileCoord) {\n              return undefined;\n            }\n            createOrUpdate(\n              tileCoord[0],\n              tileCoord[1],\n              tileCoord[2],\n              quadKeyTileCoord,\n            );\n            const url = new URL(\n              imageUrl.replace('{quadkey}', quadKey(quadKeyTileCoord)),\n            );\n            const params = url.searchParams;\n            if (hidpi) {\n              params.set('dpi', 'd1');\n              params.set('device', 'mobile');\n            }\n            if (placeholderTiles === true) {\n              params.delete('n');\n            } else if (placeholderTiles === false) {\n              params.set('n', 'z');\n            }\n            return url.toString();\n          }\n        );\n      }),\n    );\n\n    if (resource.imageryProviders) {\n      const transform = getTransformFromProjections(\n        getProjection('EPSG:4326'),\n        this.getProjection(),\n      );\n\n      this.setAttributions((frameState) => {\n        const attributions = [];\n        const viewState = frameState.viewState;\n        const tileGrid = this.getTileGrid();\n        const z = tileGrid.getZForResolution(\n          viewState.resolution,\n          this.zDirection,\n        );\n        const tileCoord = tileGrid.getTileCoordForCoordAndZ(\n          viewState.center,\n          z,\n        );\n        const zoom = tileCoord[0];\n        resource.imageryProviders.map(function (imageryProvider) {\n          let intersecting = false;\n          const coverageAreas = imageryProvider.coverageAreas;\n          for (let i = 0, ii = coverageAreas.length; i < ii; ++i) {\n            const coverageArea = coverageAreas[i];\n            if (zoom >= coverageArea.zoomMin && zoom <= coverageArea.zoomMax) {\n              const bbox = coverageArea.bbox;\n              const epsg4326Extent = [bbox[1], bbox[0], bbox[3], bbox[2]];\n              const extent = applyTransform(epsg4326Extent, transform);\n              if (intersects(extent, frameState.extent)) {\n                intersecting = true;\n                break;\n              }\n            }\n          }\n          if (intersecting) {\n            attributions.push(imageryProvider.attribution);\n          }\n        });\n\n        attributions.push(TOS_ATTRIBUTION);\n        return attributions;\n      });\n    }\n\n    this.setState('ready');\n  }\n}\n\nexport default BingMaps;\n", "/**\n * @module ol/source/XYZ\n */\n\nimport {createXYZ, extentFromProjection} from '../tilegrid.js';\nimport TileImage from './TileImage.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.\n * @property {number} [cacheSize] Deprecated.  Use the cacheSize option on the layer instead.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images.  Note that\n * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {ReferrerPolicy} [referrerPolicy] The `referrerPolicy` property for loaded images.\n * @property {boolean} [interpolate=true] Use interpolated values when resampling.  By default,\n * linear interpolation is used when resampling.  Set to false to use the nearest neighbor instead.\n * @property {import(\"../proj.js\").ProjectionLike} [projection='EPSG:3857'] Projection.\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {number} [maxZoom=42] Optional max zoom level. Not used if `tileGrid` is provided.\n * @property {number} [minZoom=0] Optional min zoom level. Not used if `tileGrid` is provided.\n * @property {number} [maxResolution] Optional tile grid resolution at level zero. Not used if `tileGrid` is provided.\n * @property {import(\"../tilegrid/TileGrid.js\").default} [tileGrid] Tile grid.\n * @property {import(\"../Tile.js\").LoadFunction} [tileLoadFunction] Deprecated.  Use an ImageTile source with a loader\n * instead.  Optional function to load a tile given a URL. The default is\n * ```js\n * function(imageTile, src) {\n *   imageTile.getImage().src = src;\n * };\n * ```\n * @property {number} [tilePixelRatio=1] The pixel ratio used by the tile service.\n * For example, if the tile service advertizes 256px by 256px tiles but actually sends 512px\n * by 512px images (for retina/hidpi devices) then `tilePixelRatio`\n * should be set to `2`.\n * @property {number|import(\"../size.js\").Size} [tileSize=[256, 256]] The tile size used by the tile service.\n * Not used if `tileGrid` is provided.\n * @property {number} [gutter=0] The size in pixels of the gutter around image tiles to ignore.\n * This allows artifacts of rendering at tile edges to be ignored.\n * Supported images should be wider and taller than the tile size by a value of `2 x gutter`.\n * @property {import(\"../Tile.js\").UrlFunction} [tileUrlFunction] Deprecated.  Use an ImageTile source and provide a function\n * for the url option instead.\n * @property {string} [url] URL template. Must include `{x}`, `{y}` or `{-y}`,\n * and `{z}` placeholders. A `{?-?}` template pattern, for example `subdomain{a-f}.domain.com`,\n * may be used instead of defining each one separately in the `urls` option.\n * @property {Array<string>} [urls] Deprecated.  Use an ImageTile source and provide an array of URLs for the\n * url option instead.\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n * @property {number} [transition=250] Duration of the opacity transition for rendering.\n * To disable the opacity transition, pass `transition: 0`.\n * @property {number|import(\"../array.js\").NearestDirectionFunction} [zDirection=0]\n * Choose whether to use tiles with a higher or lower zoom level when between integer\n * zoom levels. See {@link module:ol/tilegrid/TileGrid~TileGrid#getZForResolution}.\n */\n\n/**\n * @classdesc\n * Layer source for tile data with URLs in a set XYZ format that are\n * defined in a URL template. By default, this follows the widely-used\n * Google grid where `x` 0 and `y` 0 are in the top left. Grids like\n * TMS where `x` 0 and `y` 0 are in the bottom left can be used by\n * using the `{-y}` placeholder in the URL template, so long as the\n * source does not have a custom tile grid. In this case\n * a `tileUrlFunction` can be used, such as:\n * ```js\n *  tileUrlFunction: function(coordinate) {\n *    return 'http://mapserver.com/' + coordinate[0] + '/' +\n *      coordinate[1] + '/' + (-coordinate[2] - 1) + '.png';\n *  }\n * ```\n * @api\n */\nclass XYZ extends TileImage {\n  /**\n   * @param {Options} [options] XYZ options.\n   */\n  constructor(options) {\n    options = options || {};\n\n    const projection =\n      options.projection !== undefined ? options.projection : 'EPSG:3857';\n\n    const tileGrid =\n      options.tileGrid !== undefined\n        ? options.tileGrid\n        : createXYZ({\n            extent: extentFromProjection(projection),\n            maxResolution: options.maxResolution,\n            maxZoom: options.maxZoom,\n            minZoom: options.minZoom,\n            tileSize: options.tileSize,\n          });\n\n    super({\n      attributions: options.attributions,\n      cacheSize: options.cacheSize,\n      crossOrigin: options.crossOrigin,\n      referrerPolicy: options.referrerPolicy,\n      interpolate: options.interpolate,\n      projection: projection,\n      reprojectionErrorThreshold: options.reprojectionErrorThreshold,\n      tileGrid: tileGrid,\n      tileLoadFunction: options.tileLoadFunction,\n      tilePixelRatio: options.tilePixelRatio,\n      tileUrlFunction: options.tileUrlFunction,\n      url: options.url,\n      urls: options.urls,\n      wrapX: options.wrapX !== undefined ? options.wrapX : true,\n      transition: options.transition,\n      attributionsCollapsible: options.attributionsCollapsible,\n      zDirection: options.zDirection,\n    });\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.gutter_ = options.gutter !== undefined ? options.gutter : 0;\n  }\n\n  /**\n   * @return {number} Gutter.\n   * @override\n   */\n  getGutter() {\n    return this.gutter_;\n  }\n}\n\nexport default XYZ;\n", "import XYZ from \"ol/source/XYZ\";\nimport { toSize } from \"ol/size\";\nimport { createCanvasContext2D } from \"ol/dom\";\n\nexport default class GridTileSource extends XYZ {\n  constructor(argOptions = {}) {\n    const defaultOptions = {\n      gridDivisions: 20,\n      tileSize: 256,\n      wrapX: true,\n      projection: \"EPSG:3857\",\n      url: \"z:{z} x:{x} y:{y}\",\n      backgroundColor: \"#DEF7FF\",\n      strokeColor: \"#BAE5F4\",\n    };\n\n    const options = { ...defaultOptions, ...argOptions };\n\n    super({\n      projection: options.projection,\n      wrapX: options.wrapX,\n      zDirection: options.zDirection,\n      url: options.url,\n      tileLoadFunction: (tile, _text) => this.loadGridTile(tile, _text, options),\n    });\n  }\n\n  loadGridTile(tile, _text, options) {\n    const z = tile.getTileCoord()[0];\n    const tileSize = toSize(this.tileGrid.getTileSize(z));\n    const context = createCanvasContext2D(tileSize[0], tileSize[1]);\n\n    context.fillStyle = options.backgroundColor;\n    context.fillRect(0, 0, tileSize[0], tileSize[1]);\n\n    context.strokeStyle = options.strokeColor;\n    context.strokeRect(0.5, 0.5, tileSize[0] - 0.5, tileSize[1] - 0.5);\n\n    const cellSize = tileSize[0] / options.gridDivisions;\n    for (let x = cellSize; x < tileSize[0]; x += cellSize) {\n      context.beginPath();\n      context.moveTo(x, 0);\n      context.lineTo(x, tileSize[1]);\n      context.stroke();\n    }\n\n    for (let y = cellSize; y < tileSize[1]; y += cellSize) {\n      context.beginPath();\n      context.moveTo(0, y);\n      context.lineTo(tileSize[0], y);\n      context.stroke();\n    }\n\n    tile.setImage(context.canvas);\n  }\n}\n", "import TileLayer from \"ol/layer/Tile\";\nimport BingMaps from \"ol/source/BingMaps\";\nimport XYZ from \"ol/source/XYZ\";\n\nimport GridTileSource from \"./grid-tile-source\";\n\nexport default class TileLayerFactory {\n  constructor(provider, providerApiKey) {\n    this.provider = provider;\n    this.providerApiKey = providerApiKey;\n  }\n\n  get tileLayer() {\n    return new TileLayer({\n      visible: true,\n      preload: Infinity,\n      source: this.#source,\n    });\n  }\n\n  get #source() {\n    switch (this.provider) {\n      case \"bing\":\n        return this.#bingSource;\n      case \"azure\":\n        return this.#azureSource;\n      case \"grid\":\n        return this.#gridSource;\n      default:\n        new Error(`Unknown tile provider: ${this.provider}`);\n    }\n  }\n\n  get #bingSource() {\n    return new BingMaps({ key: this.providerApiKey, imagerySet: \"AerialWithLabelsOnDemand\" });\n  }\n\n  get #azureSource() {\n    const url = \"https://atlas.microsoft.com/map/tile\";\n    const params = [\n      `subscription-key=${this.providerApiKey}`,\n      \"api-version=2.0\",\n      \"tilesetId=microsoft.imagery\",\n      \"zoom={z}\",\n      \"x={x}\",\n      \"y={y}\",\n    ];\n    const azureMapsUrlTemplate = `${url}?${params.join(\"&\")}`;\n    return new XYZ({ url: azureMapsUrlTemplate });\n  }\n\n  get #gridSource() {\n    return new GridTileSource();\n  }\n}\n", "import { types } from \"mobx-state-tree\";\n\nconst LatLngModel = types\n  .model(\"LatLngModel\", {\n    lat: types.number,\n    lng: types.number,\n  })\n  .views((self) => ({\n    get toLatLng() {\n      return [self.lat, self.lng];\n    },\n    get toLonLat() {\n      return [self.lng, self.lat];\n    },\n    get toLatLngString() {\n      return JSON.stringify(this.toLatLng);\n    },\n    get clone() {\n      return LatLngModel.create({\n        lat: self.lat,\n        lng: self.lng,\n      });\n    },\n    get toObjectLiteral() {\n      return {\n        lat: self.lat,\n        lng: self.lng,\n      };\n    },\n    plus(other) {\n      return LatLngModel.create({\n        lat: self.lat + other.lat,\n        lng: self.lng + other.lng,\n      });\n    },\n    minus(other) {\n      return LatLngModel.create({\n        lat: self.lat - other.lat,\n        lng: self.lng - other.lng,\n      });\n    },\n    times(multiplier) {\n      return LatLngModel.create({\n        lat: self.lat * multiplier,\n        lng: self.lng * multiplier,\n      });\n    },\n    dividedBy(divisor) {\n      return self.times(1.0 / divisor);\n    },\n  }));\n\nexport default LatLngModel;\n", "import Feature from \"ol/Feature\";\nimport Polygon from \"ol/geom/Polygon\";\nimport { fromLonLat, toLonLat } from \"ol/proj\";\n\nimport LatLngModel from \"../../../da/models/lat-lng-model\";\n\nimport { degreesToRadians } from \"../../../helpers/geometry\";\nimport { linkFeatureToModel } from \"../../../da/map/modification-helpers/base\";\nimport { findTopLeftLonLat, cartesianPointsRelativeToOrigin } from \"../../../da/map/ol-geometry\";\n\nimport { BOUNDING_BOX_DATA_TYPE } from \"../../../da/map/data-types\";\n\nexport default class BoundingBoxBuilder {\n  constructor(project, roofSection, roofSectionFeature) {\n    this.project = project;\n    this.roofSection = roofSection;\n    this.roofPlane = roofSection.roofPlane;\n    this.roofSectionFeature = roofSectionFeature;\n  }\n\n  build() {\n    console.log(`Updating BB for ${this.roofSection.displayIdentifier}`);\n    this.calculateBoundingBox();\n    this.roofSection.setBoundingBox(this.boundingBox);\n    this.roofSection.setBoundingBoxCartesianPoints(this.boundingBoxCartesianPoints);\n  }\n\n  calculateBoundingBox() {\n    const combinedRotationInRadians = this.calculateBoundingBoxRotation();\n    const center = fromLonLat([this.project.projectSite.editorLng, this.project.projectSite.editorLat]);\n    const rotatedRoofSection = this.buildRotatedRoofSection(combinedRotationInRadians, center);\n    const rotatedRoofSectionLatLngs = this.convertToLatLngs(rotatedRoofSection);\n    const [minLat, minLng, maxLat, maxLng] = this.findMinAndMax(rotatedRoofSectionLatLngs);\n    const rotatedBoundingBoxInLatLngs = this.buildRectangle(minLat, minLng, maxLat, maxLng);\n    const rotatedBoundingBoxCoordinates = rotatedBoundingBoxInLatLngs.map((latLng) =>\n      fromLonLat([latLng.lng, latLng.lat]),\n    );\n    const rotatedBoundingBoxPolygon = new Polygon([rotatedBoundingBoxCoordinates]);\n    const antiRotatedBoundingBoxPolygon = this.buildRotatedGeometry(\n      rotatedBoundingBoxPolygon,\n      -combinedRotationInRadians,\n      center,\n    );\n    this.boundingBoxFeature = buildBoundingBoxFeatureFromGeometry(this.roofSection, antiRotatedBoundingBoxPolygon);\n    this.boundingBox = this.convertToLatLngs(antiRotatedBoundingBoxPolygon);\n    this.syncBoundingBoxCartesianPoints();\n  }\n\n  syncBoundingBoxCartesianPoints() {\n    const topLeftLonLat = findTopLeftLonLat(this.roofPlane.latLngPoints);\n    this.boundingBoxCartesianPoints = cartesianPointsRelativeToOrigin(topLeftLonLat, this.boundingBox);\n  }\n\n  buildRotatedRoofSection(combinedRotationInRadians, center) {\n    const geometry = this.roofSectionFeature.getGeometry();\n    return this.buildRotatedGeometry(geometry, combinedRotationInRadians, center);\n  }\n\n  buildRotatedGeometry(original, rotation, center) {\n    const geometry = original.clone();\n    geometry.rotate(rotation, center);\n\n    return geometry;\n  }\n\n  convertToLatLngs(rotatedRoofSection) {\n    const outerRing = rotatedRoofSection.getLinearRing(0).getCoordinates();\n    return outerRing.map((c) => {\n      const lonLat = toLonLat(c);\n      return LatLngModel.create({ lat: lonLat[1], lng: lonLat[0] });\n    });\n  }\n\n  calculateBoundingBoxRotation() {\n    const azimuth = this.roofSection.azimuth;\n    const azimuthRotationInDegrees = azimuth - 180;\n    const azimuthRotationInRadians = degreesToRadians(azimuthRotationInDegrees);\n\n    return azimuthRotationInRadians;\n  }\n\n  findMinAndMax(latLngs) {\n    let minLat;\n    let maxLat;\n    let minLng;\n    let maxLng;\n\n    latLngs.forEach((latLng) => {\n      if (minLat === undefined || minLat > latLng.lat) minLat = latLng.lat;\n      if (maxLat === undefined || maxLat < latLng.lat) maxLat = latLng.lat;\n\n      if (minLng === undefined || minLng > latLng.lng) minLng = latLng.lng;\n      if (maxLng === undefined || maxLng < latLng.lng) maxLng = latLng.lng;\n    });\n\n    return [minLat, minLng, maxLat, maxLng];\n  }\n\n  buildRectangle(minLat, minLng, maxLat, maxLng) {\n    return [\n      LatLngModel.create({ lat: maxLat, lng: minLng }),\n      LatLngModel.create({ lat: maxLat, lng: maxLng }),\n      LatLngModel.create({ lat: minLat, lng: maxLng }),\n      LatLngModel.create({ lat: minLat, lng: minLng }),\n      LatLngModel.create({ lat: maxLat, lng: minLng }),\n    ];\n  }\n}\n\nexport function buildBoundingBoxFeatureFromGeometry(roofSection, geometry) {\n  const feature = new Feature({ geometry });\n  linkFeatureToModel(feature, roofSection);\n  feature.set(\"roofSectionUuid\", roofSection.uuid);\n  feature.set(\"dataType\", BOUNDING_BOX_DATA_TYPE);\n\n  return feature;\n}\n", "import { getDistance } from \"ol/sphere\";\n\nimport SimpleLatLng from \"../../../da/map/models/simple-lat-lng\";\nimport { METERS_TO_INCHES } from \"../../../da/map/ol-geometry\";\n\n// we have to nudge the panels a tiny bit off the bounding box or the first column is\n// considered out of bounds and (sometimes) we get errors where panels are thought\n// to be inside the roof section when they are not.\n// Must stay in sync with app/services/bx/results/non_rectangular/cell_positioner.rb\nconst NUDGE_OFFSET = 0.1; // inches\n\nexport default class CellPositioner {\n  constructor(project, roofSection) {\n    this.project = project;\n    this.roofSection = roofSection;\n\n    this.saveKeyVertices();\n    this.calculateAnchorPoint();\n    this.calculateWidthAndHeight();\n    this.calculateRowsAndColumns();\n    this.calculatorVectors();\n    this.calculateZeroZeroPosition();\n    this.calculatePaddedSizes();\n  }\n\n  cellAt(row, column) {\n    const topLeft = this.positionOf(row, column);\n    const topRight = topLeft.plus(this.panelWidthVector);\n    const bottomRight = topRight.plus(this.panelHeightVector);\n    const bottomLeft = topLeft.plus(this.panelHeightVector);\n\n    return [topLeft, topRight, bottomRight, bottomLeft, topLeft];\n  }\n\n  // This is the panel plus the north and south tray extensions\n  extendedCellAt(row, column) {\n    const cellTopLeft = this.positionOf(row, column);\n\n    const topLeft = cellTopLeft.minus(this.northExtensionVector);\n    const topRight = topLeft.plus(this.panelWidthVector);\n    const bottomLeft = cellTopLeft.plus(this.panelHeightVector).plus(this.southExtensionVector);\n    const bottomRight = bottomLeft.plus(this.panelWidthVector);\n\n    return [topLeft, topRight, bottomRight, bottomLeft, topLeft];\n  }\n\n  saveKeyVertices() {\n    this.firstVertex = SimpleLatLng.fromLatLngModel(this.roofSection.boundingBox[0]);\n    this.secondVertex = SimpleLatLng.fromLatLngModel(this.roofSection.boundingBox[1]);\n    this.thirdVertex = SimpleLatLng.fromLatLngModel(this.roofSection.boundingBox[2]);\n\n    this.firstVertexLonLat = this.firstVertex.toLonLat;\n    this.secondVertexLonLat = this.secondVertex.toLonLat;\n    this.thirdVertexLonLat = this.thirdVertex.toLonLat;\n  }\n\n  calculateAnchorPoint() {\n    this.anchor = this.firstVertex.plus(this.roofSection.offset);\n  }\n\n  calculateWidthAndHeight() {\n    this.width = getDistance(this.firstVertexLonLat, this.secondVertexLonLat) * METERS_TO_INCHES;\n    this.height = getDistance(this.secondVertexLonLat, this.thirdVertexLonLat) * METERS_TO_INCHES;\n  }\n\n  calculateRowsAndColumns() {\n    const usableHeight = this.height - this.project.northExtension - this.project.southExtension - NUDGE_OFFSET;\n    this.rows = Math.floor(\n      (usableHeight + this.project.interRowSpacing) / (this.project.panelWidth + this.project.interRowSpacing),\n    );\n\n    const usableWidth = this.width - NUDGE_OFFSET;\n    this.columns = Math.floor(\n      (usableWidth + this.project.interColumnSpacing) / (this.project.panelLength + this.project.interColumnSpacing),\n    );\n  }\n\n  // Because bounding box is based on azimuth, creating vectors between the BB vertices gives\n  // you orientation parallel to / perpendicular to the azimuth\n  calculatorVectors() {\n    this.calculatorLatLngVectors();\n    this.calculatorCartesianVectors();\n  }\n\n  calculatorLatLngVectors() {\n    const widthVector = this.secondVertex.minus(this.firstVertex);\n    const widthDistance = getDistance(this.firstVertexLonLat, this.secondVertexLonLat) * METERS_TO_INCHES;\n    this.unitWidthVector = widthVector.dividedBy(widthDistance);\n    this.panelWidthVector = this.unitWidthVector.times(this.project.panelLength);\n\n    const heightVector = this.thirdVertex.minus(this.secondVertex);\n    const heightDistance = getDistance(this.secondVertexLonLat, this.thirdVertexLonLat) * METERS_TO_INCHES;\n    this.unitHeightVector = heightVector.dividedBy(heightDistance);\n    this.panelHeightVector = this.unitHeightVector.times(this.project.panelWidth);\n\n    this.northExtensionVector = this.unitHeightVector.times(this.project.northExtension);\n    this.southExtensionVector = this.unitHeightVector.times(this.project.southExtension);\n  }\n\n  calculatorCartesianVectors() {\n    const firstVertexCartesian = this.roofSection.boundingBoxCartesianPoints[0];\n    const secondVertexCartesian = this.roofSection.boundingBoxCartesianPoints[1];\n    const thirdVertexCartesian = this.roofSection.boundingBoxCartesianPoints[2];\n\n    const widthVector = secondVertexCartesian.minus(firstVertexCartesian);\n    const widthDistance = firstVertexCartesian.distanceTo(secondVertexCartesian);\n    this.unitWidthVectorCartesian = widthVector.dividedBy(widthDistance);\n\n    const heightVector = thirdVertexCartesian.minus(secondVertexCartesian);\n    const heightDistance = secondVertexCartesian.distanceTo(thirdVertexCartesian);\n    this.unitHeightVectorCartesian = heightVector.dividedBy(heightDistance);\n  }\n\n  // This is the top left corner of the north most / west most panel\n  calculateZeroZeroPosition() {\n    const nudgeEwVector = this.unitWidthVector.times(NUDGE_OFFSET);\n    const nudgeNsVector = this.unitHeightVector.times(NUDGE_OFFSET);\n    this.zeroZero = this.anchor.plus(this.northExtensionVector).plus(nudgeEwVector).plus(nudgeNsVector);\n  }\n\n  calculatePaddedSizes() {\n    this.paddedColumnWidth = this.project.panelLength + this.project.interColumnSpacing;\n    this.paddedRowHeight = this.project.panelWidth + this.project.interRowSpacing;\n  }\n\n  positionOf(row, column) {\n    const columnsWidth = (column - 1) * this.paddedColumnWidth;\n    const rowsHeight = (row - 1) * this.paddedRowHeight;\n\n    return this.zeroZero.plus(this.unitWidthVector.times(columnsWidth)).plus(this.unitHeightVector.times(rowsHeight));\n  }\n}\n", "import { polygonsAsPointListsIntersect } from \"../../da/map/legality-checkers/polygon-helpers\";\nimport { pointInPolygon } from \"../../helpers/point-in-polygon\";\n\nexport function objectsOverlap(\n  object1InOpenLayersCoordinates,\n  object1AsPoints,\n  object2InOpenLayersCoordinates,\n  object2AsPoints,\n) {\n  return (\n    objectHasAVertexInsideOtherObject(object1InOpenLayersCoordinates, object2InOpenLayersCoordinates) ||\n    objectHasAVertexInsideOtherObject(object2InOpenLayersCoordinates, object1InOpenLayersCoordinates) ||\n    edgesIntersect(object1AsPoints, object2AsPoints)\n  );\n}\n\nexport function polygonHasVertexInsideOtherPolygon(\n  polygonInOpenLayersCoordinates,\n  possibleContainerInOpenLayersCoordinates,\n) {\n  // wrap the possible container in [] because pointInPolygon expects rings\n  const possibleContainerWrappedAsRing = [possibleContainerInOpenLayersCoordinates];\n\n  return polygonInOpenLayersCoordinates.some((vertex) => {\n    return pointInPolygon(vertex, possibleContainerWrappedAsRing);\n  });\n}\n\n// Internal methods\nfunction objectHasAVertexInsideOtherObject(object1InOpenLayersCoordinates, object2InOpenLayersCoordinates) {\n  return polygonHasVertexInsideOtherPolygon(object1InOpenLayersCoordinates, object2InOpenLayersCoordinates);\n}\n\nfunction edgesIntersect(object1AsPoints, object2AsPoints) {\n  return polygonsAsPointListsIntersect(object1AsPoints, object2AsPoints);\n}\n", "// cSpell:ignore obstructedness, unobstruct\n\nimport { fromLonLat } from \"ol/proj\";\n\nimport { emptyDesign, presentDesign } from \"../../models/layout-model\";\n\nimport CellPositioner from \"./cell-positioner\";\nimport { pointOutsidePolygon } from \"../../../helpers/point-in-polygon\";\nimport { polygonsAsPointListsIntersect } from \"../../../da/map/legality-checkers/polygon-helpers\";\nimport { benchmark, logger } from \"../../../helpers/logger\";\nimport { objectsOverlap, polygonHasVertexInsideOtherPolygon } from \"../overlap-checker\";\n\nexport default class LayoutBuilder {\n  constructor(project, roofSection) {\n    this.project = project;\n    this.roofSection = roofSection;\n  }\n\n  build(priorLayout) {\n    const fromOld = priorLayout ? ` (from old ${priorLayout.rows}r x ${priorLayout.columns}c)` : \"\";\n    console.log(`Building Layout for ${this.roofSection.displayIdentifier}${fromOld}`);\n\n    this.#buildCellPositioner();\n    if (priorLayout) {\n      this.#buildAllEmptyLayout();\n      this.overlayPresentPanels(priorLayout);\n    } else {\n      this.#buildAllPresentLayout();\n    }\n    this.#disableOutOfBoundsCells();\n  }\n\n  reprocessExistingLayout() {\n    this.#buildCellPositioner();\n    this.#updateOutOfBoundsCells();\n  }\n\n  overlayPresentPanels(priorLayout) {\n    // new shape might be too small to get a layout\n    const newLayout = this.roofSection.layout;\n    if (!newLayout) return;\n\n    newLayout.overlayPresentPanels(priorLayout);\n  }\n\n  #buildCellPositioner() {\n    this.cellPositioner = new CellPositioner(this.project, this.roofSection);\n    this.rows = this.cellPositioner.rows;\n    this.columns = this.cellPositioner.columns;\n  }\n\n  #buildAllPresentLayout() {\n    this.#buildFilledLayout(presentDesign);\n  }\n\n  #buildAllEmptyLayout() {\n    this.#buildFilledLayout(emptyDesign);\n  }\n\n  #buildFilledLayout(designBuilder) {\n    if (this.rows < 1 || this.columns < 1) {\n      // delete the existing layout (if one exists)\n      this.roofSection.deleteLayout();\n    } else {\n      const design = designBuilder(this.rows, this.columns);\n\n      this.roofSection.addLayout(this.rows, this.columns, design, true, []);\n    }\n  }\n\n  #disableOutOfBoundsCells() {\n    const cellUpdater = (layout, row, column, cellOutOfBounds, cellObstructed) => {\n      if (cellOutOfBounds) {\n        layout.outOfBoundsPanel(row, column);\n      }\n      this.#updateObstructedness(layout, row, column, cellObstructed);\n    };\n    this.#processCells(cellUpdater);\n  }\n\n  #updateOutOfBoundsCells() {\n    const cellUpdater = (layout, row, column, cellOutOfBounds, cellObstructed) => {\n      if (cellOutOfBounds) {\n        layout.outOfBoundsPanel(row, column);\n      } else {\n        if (layout.isOutOfBounds(row, column)) {\n          layout.addPanel(row, column);\n        }\n      }\n      this.#updateObstructedness(layout, row, column, cellObstructed);\n    };\n    this.#processCells(cellUpdater);\n  }\n\n  #updateObstructedness(layout, row, column, cellObstructed) {\n    if (cellObstructed) {\n      layout.obstructPanel(row, column);\n    } else {\n      layout.unobstructPanel(row, column);\n    }\n  }\n\n  #processCells(cellUpdater) {\n    benchmark(`Layout: processCells for roofSection ${this.roofSection.displayIdentifier}`, () => {\n      const layout = this.roofSection.layout;\n      if (!layout) return;\n\n      const roofSectionInOpenLayersCoordinates = this.roofSection.latLngPointsToArray.map((p) =>\n        fromLonLat([p[1], p[0]]),\n      );\n      const roofSectionAsPoints = roofSectionInOpenLayersCoordinates.map((c) => [c[0], c[1]]);\n      this.#convertObstructionsAndBuffers(roofSectionInOpenLayersCoordinates, roofSectionAsPoints);\n\n      for (let row = 1; row <= this.rows; row++) {\n        for (let column = 1; column <= this.columns; column++) {\n          const cellAt = this.cellPositioner.cellAt(row, column);\n          const cellAtInOpenLayersCoordinates = cellAt.map((latLng) => fromLonLat(latLng.toLonLat));\n          const cellAtAsPoints = cellAtInOpenLayersCoordinates.map((p) => [p[0], p[1]]);\n\n          const extendedCellAt = this.cellPositioner.extendedCellAt(row, column);\n          const extendedCellAtInOpenLayersCoordinates = extendedCellAt.map((latLng) => fromLonLat(latLng.toLonLat));\n          const firstVertexOfExtendedCellInOpenLayersCoordinates = extendedCellAtInOpenLayersCoordinates[0];\n          const extendedCellAtAsPoints = extendedCellAtInOpenLayersCoordinates.map((p) => [p[0], p[1]]);\n\n          const cellOutOfBounds =\n            this.#outsideOfRoofSection(firstVertexOfExtendedCellInOpenLayersCoordinates, [\n              roofSectionInOpenLayersCoordinates,\n            ]) ||\n            this.#anyEdgesIntersect(extendedCellAtAsPoints, roofSectionAsPoints) ||\n            this.#overlapsObstruction(extendedCellAtInOpenLayersCoordinates, extendedCellAtAsPoints) ||\n            this.#overlapsObstructionSetbackBuffer(cellAtInOpenLayersCoordinates, cellAtAsPoints);\n\n          const cellObstructed = this.#overlapsObstructionBuffer(cellAtInOpenLayersCoordinates, cellAtAsPoints);\n\n          cellUpdater(layout, row, column, cellOutOfBounds, cellObstructed);\n        }\n      }\n\n      // make sure the design matches the updated status in each cells. Keeping things in sync is good,\n      // but its especially important for newly built arrays which are created with an all present layout\n      layout.transferCellsToDesign();\n    });\n  }\n\n  #outsideOfRoofSection(vertex, roofSectionInOpenLayersCoordinates) {\n    return pointOutsidePolygon(vertex, roofSectionInOpenLayersCoordinates);\n  }\n\n  #anyEdgesIntersect(cellAtAsPoints, roofSectionAsPoints) {\n    return polygonsAsPointListsIntersect(cellAtAsPoints, roofSectionAsPoints);\n  }\n\n  #convertObstructionsAndBuffers(roofSectionInOpenLayersCoordinates, roofSectionAsPoints) {\n    this.obstructionsInOpenLayersCoordinates = [];\n    this.obstructionsAsPoints = [];\n\n    this.obstructionBuffersInOpenLayersCoordinates = [];\n    this.obstructionBuffersAsPoints = [];\n\n    this.obstructionSetbackBuffersInOpenLayersCoordinates = [];\n    this.obstructionSetbackBuffersAsPoints = [];\n\n    this.project.notDeletedObstructions.forEach((obstruction) => {\n      this.#convertObject(\n        obstruction,\n        roofSectionInOpenLayersCoordinates,\n        roofSectionAsPoints,\n        this.obstructionsInOpenLayersCoordinates,\n        this.obstructionsAsPoints,\n      );\n      this.#convertObject(\n        obstruction.buffer,\n        roofSectionInOpenLayersCoordinates,\n        roofSectionAsPoints,\n        this.obstructionBuffersInOpenLayersCoordinates,\n        this.obstructionBuffersAsPoints,\n      );\n      this.#convertObject(\n        obstruction.setbackBuffer,\n        roofSectionInOpenLayersCoordinates,\n        roofSectionAsPoints,\n        this.obstructionSetbackBuffersInOpenLayersCoordinates,\n        this.obstructionSetbackBuffersAsPoints,\n      );\n    });\n  }\n\n  #convertObject(\n    object,\n    roofSectionInOpenLayersCoordinates,\n    roofSectionAsPoints,\n    objectsInCoordinates,\n    objectsAsPoints,\n  ) {\n    if (object === null || object === undefined) return;\n\n    const objectInOpenLayersCoordinates = object.latLngPointsToArray.map((p) => fromLonLat([p[1], p[0]]));\n    const objectAsPoints = objectInOpenLayersCoordinates.map((c) => [c[0], c[1]]);\n\n    if (\n      objectsOverlap(\n        objectInOpenLayersCoordinates,\n        objectAsPoints,\n        roofSectionInOpenLayersCoordinates,\n        roofSectionAsPoints,\n      )\n    ) {\n      logger(`Considering object #${object.identifier}`);\n      objectsInCoordinates.push(objectInOpenLayersCoordinates);\n      objectsAsPoints.push(objectAsPoints);\n    } else {\n      logger(`Skipping object #${object.identifier}`);\n    }\n  }\n\n  #overlapsObstruction(cellAtInOpenLayersCoordinates, cellAtAsPoints) {\n    return (\n      this.#cellVertexInsideObstructionOrBuffer(\n        cellAtInOpenLayersCoordinates,\n        this.obstructionsInOpenLayersCoordinates,\n      ) ||\n      this.#cellEdgeIntersectsObstructionOrBufferEdge(cellAtAsPoints, this.obstructionsAsPoints) ||\n      this.#obstructionOrBufferVertexInsideCell(cellAtInOpenLayersCoordinates, this.obstructionsInOpenLayersCoordinates)\n    );\n  }\n\n  #overlapsObstructionBuffer(cellAtInOpenLayersCoordinates, cellAtAsPoints) {\n    return (\n      this.#cellVertexInsideObstructionOrBuffer(\n        cellAtInOpenLayersCoordinates,\n        this.obstructionBuffersInOpenLayersCoordinates,\n      ) ||\n      this.#cellEdgeIntersectsObstructionOrBufferEdge(cellAtAsPoints, this.obstructionBuffersAsPoints) ||\n      this.#obstructionOrBufferVertexInsideCell(\n        cellAtInOpenLayersCoordinates,\n        this.obstructionBuffersInOpenLayersCoordinates,\n      )\n    );\n  }\n\n  #overlapsObstructionSetbackBuffer(cellAtInOpenLayersCoordinates, cellAtAsPoints) {\n    return (\n      this.#cellVertexInsideObstructionOrBuffer(\n        cellAtInOpenLayersCoordinates,\n        this.obstructionSetbackBuffersInOpenLayersCoordinates,\n      ) ||\n      this.#cellEdgeIntersectsObstructionOrBufferEdge(cellAtAsPoints, this.obstructionSetbackBuffersAsPoints) ||\n      this.#obstructionOrBufferVertexInsideCell(\n        cellAtInOpenLayersCoordinates,\n        this.obstructionSetbackBuffersInOpenLayersCoordinates,\n      )\n    );\n  }\n\n  #cellVertexInsideObstructionOrBuffer(cellAtInOpenLayersCoordinates, obstructionsOrBuffers) {\n    return obstructionsOrBuffers.some((obstructionInOpenLayersCoordinates) => {\n      return polygonHasVertexInsideOtherPolygon(cellAtInOpenLayersCoordinates, obstructionInOpenLayersCoordinates);\n    });\n  }\n\n  #cellEdgeIntersectsObstructionOrBufferEdge(cellAtAsPoints, obstructionsOrBuffers) {\n    return obstructionsOrBuffers.some((obstructionAsPoints) => {\n      return polygonsAsPointListsIntersect(cellAtAsPoints, obstructionAsPoints);\n    });\n  }\n\n  #obstructionOrBufferVertexInsideCell(cellAtInOpenLayersCoordinates, obstructionsOrBuffers) {\n    return obstructionsOrBuffers.some((obstructionInOpenLayersCoordinates) => {\n      return polygonHasVertexInsideOtherPolygon(obstructionInOpenLayersCoordinates, cellAtInOpenLayersCoordinates);\n    });\n  }\n}\n", "import Polygon from \"ol/geom/Polygon\";\nimport Feature from \"ol/Feature\";\nimport { fromLonLat } from \"ol/proj\";\n\nimport {\n  CELL_DRAW_STYLE_EMPTY,\n  CELL_DRAW_STYLE_OBSTRUCTED_OUT_OF_BOUNDS,\n  CELL_DRAW_STYLE_OUT_OF_BOUNDS,\n} from \"../../models/layout-model\";\n\nimport CellPositioner from \"./cell-positioner\";\n\nimport { benchmark, logger } from \"../../../helpers/app\";\nimport { ARRAY_CELL_DATA_TYPE } from \"../../../da/map/data-types\";\n\nexport default class ArrayBuilder {\n  constructor(project, roofSection, isOtherRoofSection = false) {\n    this.project = project;\n    this.roofSection = roofSection;\n    this.isOtherRoofSection = isOtherRoofSection;\n\n    this.cellPositioner = new CellPositioner(this.project, this.roofSection);\n    this.features = [];\n  }\n\n  build() {\n    const rows = this.cellPositioner.rows;\n    const columns = this.cellPositioner.columns;\n    const layout = this.roofSection.layout;\n    if (!layout) {\n      // This typically happens if the roof section is so small that rows or columns < 1\n      return;\n    }\n\n    const roofSectionUuid = this.roofSection.uuid;\n    const layoutFresh = layout.fresh;\n\n    const maxRow = layout.rows;\n    const maxColumn = layout.columns;\n\n    benchmark(\"array build\", () => {\n      let resizeMessage = \"\";\n      if (rows !== layout.rows || columns !== layout.columns) {\n        resizeMessage = ` (old layout ${layout.rows}x${layout.columns})`;\n      }\n      logger(`Building Array for ${this.roofSection.displayIdentifier}: ${rows}x${columns}${resizeMessage}`);\n\n      for (let row = 1; row <= rows; row++) {\n        for (let column = 1; column <= columns; column++) {\n          let cellDrawStyle;\n          if (row > maxRow || column > maxColumn) {\n            cellDrawStyle = CELL_DRAW_STYLE_EMPTY;\n          } else {\n            cellDrawStyle = layout.cellDrawStyle(row, column);\n          }\n\n          if (\n            cellDrawStyle === CELL_DRAW_STYLE_OUT_OF_BOUNDS ||\n            cellDrawStyle === CELL_DRAW_STYLE_OBSTRUCTED_OUT_OF_BOUNDS\n          )\n            continue;\n\n          const cell = this.cellPositioner.cellAt(row, column);\n          const rectangleCoordinatesInOpenLayersCoordinates = cell.map((vertex) => fromLonLat(vertex.toLonLat));\n\n          const rectangle = new Polygon([rectangleCoordinatesInOpenLayersCoordinates]);\n          const rectangleFeature = new Feature({ geometry: rectangle });\n          rectangleFeature.set(\"cellDrawStyle\", cellDrawStyle);\n          rectangleFeature.set(\"roofSectionUuid\", roofSectionUuid);\n          rectangleFeature.set(\"row\", row);\n          rectangleFeature.set(\"column\", column);\n          rectangleFeature.set(\"dataType\", ARRAY_CELL_DATA_TYPE);\n          rectangleFeature.set(\"fresh\", layoutFresh);\n          if (this.isOtherRoofSection) {\n            rectangleFeature.set(\"isOtherRoofSection\", true);\n          }\n\n          this.features.push(rectangleFeature);\n        }\n      }\n    });\n  }\n}\n", "import buffer from \"@turf/buffer\";\nimport { polygon } from \"@turf/helpers\";\nimport { fromLonLat } from \"ol/proj\";\n\nimport { BUFFER_STEPS, BUFFER_UNITS } from \"../../../da/map/buffering/buffer-options.mjs\";\nimport { objectsOverlap } from \"../overlap-checker\";\n\nconst MINIMUM_RING_LENGTH = 4;\n\nexport function closeRing(latLngPoints) {\n  if (!latLngPoints || latLngPoints.length === 0) return [];\n\n  const first = latLngPoints[0];\n  const last = latLngPoints[latLngPoints.length - 1];\n  return first[0] === last[0] && first[1] === last[1] ? latLngPoints : [...latLngPoints, first];\n}\n\n// Persisted rings are [lat, lng]; GeoJSON and Turf are [lng, lat]. Returns the outer\n// ring only, matching what the browser buffer builders persist.\nexport function bufferRing(latLngPoints, outsetFt) {\n  const ring = closeRing(latLngPoints);\n  if (ring.length < MINIMUM_RING_LENGTH) return [];\n  if (!Number.isFinite(outsetFt) || outsetFt < 0) return [];\n\n  const buffered = buffer(polygon([ring.map(([lat, lng]) => [lng, lat])]), outsetFt, {\n    units: BUFFER_UNITS,\n    steps: BUFFER_STEPS,\n  });\n  if (!buffered) return [];\n\n  const coordinates =\n    buffered.geometry.type === \"MultiPolygon\" ? buffered.geometry.coordinates[0][0] : buffered.geometry.coordinates[0];\n\n  return coordinates.map(([lng, lat]) => [lat, lng]);\n}\n\n// The overlap rule: a vertex of either ring inside the other, or crossing edges.\n// Collinear and touch-only contact do not count.\nexport function ringsOverlap(latLngPointsA, latLngPointsB) {\n  const a = projectRing(latLngPointsA);\n  const b = projectRing(latLngPointsB);\n  if (a.length === 0 || b.length === 0) return false;\n\n  return objectsOverlap(a, a, b, b);\n}\n\nexport function nearbyRoofNodes(bufferLatLngPoints, roofPlanes) {\n  const nearbyRoofPlanes = [];\n  const nearbyRoofSections = [];\n  if (!bufferLatLngPoints || bufferLatLngPoints.length === 0) {\n    return { nearbyRoofPlanes, nearbyRoofSections };\n  }\n\n  (roofPlanes || []).forEach((roofPlane) => {\n    if (!ringsOverlap(roofPlane.lat_lng_points, bufferLatLngPoints)) return;\n\n    nearbyRoofPlanes.push(roofPlane.uuid);\n    (roofPlane.roof_sections || []).forEach((roofSection) => {\n      if (!roofSection.active) return;\n      if (!ringsOverlap(roofSection.lat_lng_points, bufferLatLngPoints)) return;\n\n      nearbyRoofSections.push(roofSection.uuid);\n    });\n  });\n\n  return { nearbyRoofPlanes, nearbyRoofSections };\n}\n\nfunction projectRing(latLngPoints) {\n  return closeRing(latLngPoints).map(([lat, lng]) => fromLonLat([lng, lat]));\n}\n", "import { ringsOverlap } from \"./proximity-geometry.mjs\";\n\nexport default class ObstructionsProximityDetector {\n  constructor(project) {\n    this.project = project;\n  }\n\n  // TODO: Think about the cases where changing a roof plane causes\n  // roof sections to be deleted or inactivated (e.g. modifying a default)\n  // without the user explicitly doing a deleteRoofSection. Make sure those\n  // come out of the obstruction's list (also, custom: false, active: false)\n\n  findNearbyObstructionsForRoofPlane(roofPlane) {\n    this.#obstructions.forEach((obstruction) => {\n      this.#manageObstructionAndRoofPlane(obstruction, roofPlane);\n    });\n  }\n\n  deleteRoofPlane(roofPlane) {\n    this.#obstructions.forEach((obstruction) => {\n      obstruction.removeRoofPlane(roofPlane);\n      this.#removeRoofSectionsFromObstructionForRoofPlane(obstruction, roofPlane);\n    });\n  }\n\n  findNearbyObstructionsForRoofSection(roofSection) {\n    this.#obstructions.forEach((obstruction) => {\n      this.#manageObstructionAndRoofSection(obstruction, roofSection);\n      this.#discardOrphanRoofPlanes(obstruction);\n      this.#discardOrphanRoofSections(obstruction);\n    });\n  }\n\n  deleteRoofSection(roofSection) {\n    this.#obstructions.forEach((obstruction) => {\n      obstruction.removeRoofSection(roofSection);\n    });\n  }\n\n  findNearbyRoofPlanesAndSectionsForObstruction(obstruction) {\n    this.project.roofPlanes.forEach((roofPlane) => {\n      this.#manageObstructionAndRoofPlane(obstruction, roofPlane);\n    });\n\n    this.#discardOrphanRoofPlanes(obstruction);\n    this.#discardOrphanRoofSections(obstruction);\n  }\n\n  get #obstructions() {\n    return this.project.obstructions;\n  }\n\n  #shouldSkipObstruction(obstruction) {\n    return obstruction.deleted || !obstruction.hasBuffer;\n  }\n\n  #removeRoofSectionsFromObstructionForRoofPlane(obstruction, roofPlane) {\n    roofPlane.roofSections.forEach((roofSection) => {\n      obstruction.removeRoofSection(roofSection);\n    });\n  }\n\n  #manageObstructionAndRoofPlane(obstruction, roofPlane) {\n    if (this.#shouldSkipObstruction(obstruction)) return;\n\n    if (!roofPlane.deleted && this.#objectOverlapsObstructionBuffer(roofPlane, obstruction)) {\n      obstruction.addRoofPlane(roofPlane);\n      roofPlane.roofSections.forEach((roofSection) => {\n        this.#manageObstructionAndRoofSection(obstruction, roofSection);\n      });\n    } else {\n      obstruction.removeRoofPlane(roofPlane);\n      this.#removeRoofSectionsFromObstructionForRoofPlane(obstruction, roofPlane);\n    }\n\n    this.#discardOrphanRoofPlanes(obstruction);\n    this.#discardOrphanRoofSections(obstruction);\n  }\n\n  #discardOrphanRoofPlanes(obstruction) {\n    if (this.#shouldSkipObstruction(obstruction)) return;\n\n    obstruction.nearbyRoofPlanes.slice().forEach((roofPlaneUuid) => {\n      if (this.#noRoofPlaneWithUuid(roofPlaneUuid)) {\n        obstruction.clearRoofPlaneUuid(roofPlaneUuid);\n      }\n    });\n  }\n\n  #noRoofPlaneWithUuid(roofPlaneUuid) {\n    return !this.project.roofPlanes.some((roofPlane) => roofPlane.uuid === roofPlaneUuid);\n  }\n\n  #discardOrphanRoofSections(obstruction) {\n    if (this.#shouldSkipObstruction(obstruction)) return;\n\n    obstruction.nearbyRoofSections.slice().forEach((roofSectionUuid) => {\n      if (this.#noRoofPlaneContainsRoofSectionWithId(roofSectionUuid)) {\n        obstruction.clearRoofSectionUuid(roofSectionUuid);\n      }\n    });\n  }\n\n  #noRoofPlaneContainsRoofSectionWithId(roofSectionUuid) {\n    return !this.project.roofPlanes.some((roofPlane) => {\n      return roofPlane.roofSections.some((roofSection) => {\n        return roofSection.uuid === roofSectionUuid && roofSection.active;\n      });\n    });\n  }\n\n  #manageObstructionAndRoofSection(obstruction, roofSection) {\n    if (this.#shouldSkipObstruction(obstruction)) return;\n\n    if (!roofSection.deleted && roofSection.active && this.#objectOverlapsObstructionBuffer(roofSection, obstruction)) {\n      obstruction.addRoofSection(roofSection);\n    } else {\n      obstruction.removeRoofSection(roofSection);\n    }\n  }\n\n  #objectOverlapsObstructionBuffer(object, obstruction) {\n    const buffer = obstruction.buffer;\n    if (buffer === null || buffer === undefined) return;\n\n    return ringsOverlap(object.latLngPointsToArray, buffer.latLngPointsToArray);\n  }\n}\n", "import { ARRAY_CELL_DATA_TYPE } from \"../../da/map/data-types\";\nimport { removeFeaturesDescendedFromRoofPlaneUuid, removeFeaturesMatchingUuid } from \"../../da/map/ol-helpers\";\n\nexport function removeFeaturesForRoofPlane(roofPlane, mapManager) {\n  removeFeaturesDescendedFromRoofPlaneUuid(mapManager.setbacksVectorSource, roofPlane.uuid);\n  removeFeaturesMatchingUuid(mapManager.roofPlanesVectorSource, roofPlane.uuid);\n}\n\nexport function removeFeaturesForObstruction(obstruction, mapManager) {\n  removeFeaturesMatchingUuid(mapManager.obstructionBuffersVectorSource, obstruction.uuid);\n  removeFeaturesMatchingUuid(mapManager.obstructionSetbackBuffersVectorSource, obstruction.uuid);\n  removeFeaturesMatchingUuid(mapManager.obstructionsVectorSource, obstruction.uuid);\n}\n\nexport function removeArrayCellFeaturesDescendedFromRoofSectionUuid(vectorSource, roofSectionUuid) {\n  const features = vectorSource.getFeatures();\n\n  features.forEach((feature) => {\n    if (feature.get(\"roofSectionUuid\") === roofSectionUuid && feature.get(\"dataType\") === ARRAY_CELL_DATA_TYPE) {\n      vectorSource.removeFeature(feature);\n    }\n  });\n}\n\nexport function logState(mapModelSynchronizer, includeArrays = true) {\n  const { project, controller } = mapModelSynchronizer;\n\n  LogRoofPlane(project, controller, mapModelSynchronizer);\n  LogObstructions(project, controller, mapModelSynchronizer);\n  LogRoofSections(project, controller, mapModelSynchronizer);\n  LogLayouts(project);\n  logArrays(controller, includeArrays);\n\n  logFeatures(controller.mapManager.roofPlanesVectorSource, \"Roof Planes\");\n  logFeatures(controller.mapManager.obstructionsVectorSource, \"Obstructions\");\n  logFeatures(controller.mapManager.obstructionBuffersVectorSource, \"Obstruction Buffers\");\n  logFeatures(controller.mapManager.obstructionSetbackBuffersVectorSource, \"Obstruction Setback Buffers\");\n  logFeatures(controller.mapManager.roofSectionsVectorSource, \"Roof Sections\");\n  if (includeArrays) {\n    logFeatures(controller.mapManager.arraysVectorSource, \"Arrays\");\n  }\n  logFeatures(controller.mapManager.setbacksVectorSource, \"Setbacks\");\n}\n\nfunction logFeatures(source, label) {\n  console.log(`All features in: ${label}`);\n\n  source.getFeatures().forEach((f) => {\n    console.log(f);\n  });\n}\n\nfunction LogItem(model, feature) {\n  const fPrint = (attr) => {\n    return feature === undefined ? \"NA\" : feature.get(attr);\n  };\n\n  this.mDbId = model.id;\n  this.mIdentifier = model.displayIdentifier;\n  this.mDirty = model.dirty;\n\n  this.fIdentifier = fPrint(\"identifier\");\n\n  this.mUuid = model.uuid;\n  this.fUuid = fPrint(\"uuid\");\n\n  this.mIllegal = model.illegalShape;\n  this.fIllegal = fPrint(\"illegalShape\");\n\n  this.fDataType = fPrint(\"dataType\");\n\n  if (model.dataType === \"RoofSection\") {\n    this.mCellsErr = model.cellsWithErrors;\n    this.fCellsErr = fPrint(\"cellsWithErrors\");\n    this.mRpUuid = model.roofPlane.uuid;\n    this.fRpUuid = fPrint(\"roofPlaneUuid\");\n    this.mCustom = model.custom;\n    this.fCustom = fPrint(\"custom\");\n    this.mActive = model.active;\n    this.mEncroaching = model.encroaching;\n    this.fEncroaching = fPrint(\"encroaching\");\n  }\n\n  if (model.dataType === \"Obstruction\") {\n    this.height = model.height;\n  }\n\n  this.mDeleted = model.deleted;\n}\n\nfunction LogLayout(model) {\n  this.mDbId = model.id;\n  this.mDirty = model.dirty;\n  this.mRsIdentifier = model.roofSection.displayIdentifier;\n  this.mRsUuid = model.roofSection.uuid;\n  this.rows = model.rows;\n  this.columns = model.columns;\n  this.panelsPresent = model.panelsPresent;\n  this.mDeleted = model.deleted;\n}\n\nfunction LogRoofPlane(project, controller, mapModelSynchronizer) {\n  console.log(\"ROOF PLANES\");\n\n  const roofPlaneLogItems = project.roofPlanes.map((rp) => {\n    const feature = mapModelSynchronizer.getFeatureForRoofPlane(rp);\n    return new LogItem(rp, feature);\n  });\n  console.table(roofPlaneLogItems);\n\n  const roofPlaneFeatures = [];\n  controller.mapManager.roofPlanesFeatures.forEach((feature) => {\n    const uuid = feature.get(\"uuid\");\n    const model = project.getRoofPlane(uuid);\n    if (model === undefined) {\n      roofPlaneFeatures.push(feature);\n    }\n  });\n  if (roofPlaneFeatures.length > 0) {\n    console.log(\"Unmatched roof plane features\");\n    roofPlaneFeatures.forEach((f) => {\n      console.log(\"Feature\", f.get(\"uuid\"), f);\n    });\n  }\n}\n\nfunction LogObstructions(project, controller, mapModelSynchronizer) {\n  if (project.isBX) {\n    console.log(\"OBSTRUCTIONS\");\n\n    const obstructionLogItems = project.obstructions.map((obstruction) => {\n      const feature = mapModelSynchronizer.getFeatureForObstruction(obstruction);\n      return new LogItem(obstruction, feature);\n    });\n    console.table(obstructionLogItems);\n\n    const obstructionFeatures = [];\n    controller.mapManager.obstructionsFeatures.forEach((feature) => {\n      const uuid = feature.get(\"uuid\");\n      const model = project.getObstruction(uuid);\n      if (model === undefined) {\n        obstructionFeatures.push(feature);\n      }\n    });\n    if (obstructionFeatures.length > 0) {\n      console.log(\"Unmatched obstruction features\");\n      obstructionFeatures.forEach((f) => {\n        console.log(\"Feature\", f.get(\"uuid\"), f);\n      });\n    }\n  }\n}\n\nfunction LogRoofSections(project, controller, mapModelSynchronizer) {\n  console.log(\"ROOF SECTIONS\");\n\n  const roofSectionLogItems = project.roofPlanes.flatMap((rp) => {\n    return rp.roofSections.map((rs) => {\n      const feature = mapModelSynchronizer.getFeatureForRoofSection(rs, false);\n      return new LogItem(rs, feature);\n    });\n  });\n  console.table(roofSectionLogItems);\n\n  const roofSectionFeatures = [];\n  controller.mapManager.roofSectionsFeatures.forEach((feature) => {\n    const uuid = feature.get(\"uuid\");\n    const model = project.getRoofSection(uuid);\n    if (model === undefined) {\n      roofSectionFeatures.push(feature);\n    }\n  });\n  if (roofSectionFeatures.length > 0) {\n    console.log(\"Unmatched roof section features\");\n    roofSectionFeatures.forEach((f) => {\n      console.log(\"Feature\", f.get(\"uuid\"), f);\n    });\n  }\n}\n\nfunction LogLayouts(project) {\n  console.log(\"LAYOUTS\");\n\n  const LayoutLogItems = project.roofPlanes.flatMap((rp) => {\n    return rp.roofSections.map((rs) => {\n      return rs.layout && new LogLayout(rs.layout);\n    });\n  });\n  console.table(LayoutLogItems);\n}\n\nfunction logArrays(controller, includeArrays) {\n  if (includeArrays) {\n    console.log(\"ROOF SECTIONS ARRAY FEATURES\");\n    controller.mapManager.arraysVectorSource.getFeatures().map((feature) => {\n      console.log(feature.get(\"uuid\"));\n    });\n  }\n}\n", "import { clone, destroy } from \"mobx-state-tree\";\n\nimport { ROOF_SECTION_DATA_TYPE } from \"../../../da/map/data-types\";\n\nimport RoofSectionLegalityChecker from \"../../../da/map/legality-checkers/roof-section\";\nimport { pointInOrOnPolygon } from \"../../../helpers/point-in-polygon\";\nimport BoundingBoxBuilder from \"../panel-grid/bounding-box-builder\";\nimport LayoutBuilder from \"../panel-grid/layout-builder\";\nimport ArrayBuilder from \"../panel-grid/array-builder\";\nimport ObstructionsProximityDetector from \"../obstructions/proximity-detector\";\n\nimport { removeArrayCellFeaturesDescendedFromRoofSectionUuid } from \"../ol-helpers\";\nimport { removeFeaturesMatchingUuid, removeFeaturesDescendedFromRoofSectionUuid } from \"../../../da/map/ol-helpers\";\nimport {\n  setCartesianPointsForModelRelativeToOrigin,\n  cartesianPointsRelativeToOrigin,\n} from \"../../../da/map/ol-geometry\";\nimport { linkFeatureToModel } from \"../../../da/map/modification-helpers/base\";\nimport { logger } from \"../../../helpers/app\";\n\nexport function createRoofSection(rsFeature, project, mapModelSynchronizer, mapManager) {\n  const rpFeature = findRoofPlaneFeatureForRoofSectionFeature(rsFeature, mapManager);\n\n  if (rpFeature) {\n    const roofPlane = mapModelSynchronizer.getRoofPlaneForFeature(\n      rpFeature,\n      \"BxRoofSectionModificationHelper.createRoofSection\",\n    );\n    const roofSection = roofPlane.addRoofSection({ custom: true });\n    linkFeatureToModel(rsFeature, roofSection);\n    mapModelSynchronizer.updateRoofSectionLatLngFromFeature(rsFeature);\n\n    addLayoutAndArrayForRoofSection(rsFeature, roofSection, project, mapManager);\n\n    new RoofSectionLegalityChecker(\n      rpFeature,\n      mapManager.roofSectionsFeatures,\n      mapModelSynchronizer,\n    ).markIllegalPolygons(rsFeature);\n    new ObstructionsProximityDetector(project).findNearbyObstructionsForRoofSection(roofSection);\n    mapManager.forceRedrawRoofPlanes();\n  } else {\n    rsFeature.set(\"flaggedForAutoDeleteByVectorSource\", true);\n    rsFeature.set(\"dataType\", ROOF_SECTION_DATA_TYPE);\n    alert(\"Roof sections must be inside a roof plane\");\n  }\n}\n\nexport function translateRoofSection(rsFeature, project, mapModelSynchronizer, mapManager, controller) {\n  const roofPlaneFeature = mapModelSynchronizer.getRoofPlaneFeatureByUuid(rsFeature.get(\"roofPlaneUuid\"));\n\n  if (roofPlaneFeature) {\n    let roofSection = mapModelSynchronizer.getRoofSectionForFeature(rsFeature);\n    if (roofSection.isDefault) {\n      // this preserves the setback against the roof plane\n      removeExistingBoundingBoxAndArrayFeatures(roofSection, mapManager);\n      roofSection = swapInNewCustomRoofSection(rsFeature, roofSection, true);\n      controller.updateRestoreDefaultRoofSectionsUI();\n    }\n    repositionRoofSection(rsFeature, roofSection, roofPlaneFeature, project, mapModelSynchronizer, mapManager);\n    updateBoundingBoxAndReAddLayoutForRoofSection(rsFeature, roofSection, project, mapManager);\n  } else {\n    // should never happen\n    console.error(\"Could not find roof plane for roof section feature\", rsFeature);\n    debugger;\n  }\n}\n\nexport function modifyRoofSection(rsFeature, project, mapModelSynchronizer, mapManager, controller) {\n  const roofPlaneFeature = mapModelSynchronizer.getRoofPlaneFeatureByUuid(rsFeature.get(\"roofPlaneUuid\"));\n\n  if (roofPlaneFeature) {\n    let roofSection = mapModelSynchronizer.getRoofSectionForFeature(rsFeature);\n    const currentLayout = roofSection.layout && clone(roofSection.layout);\n    if (roofSection.isDefault) {\n      // this preserves the setback against the roof plane\n      removeExistingBoundingBoxAndArrayFeatures(roofSection, mapManager);\n      roofSection = swapInNewCustomRoofSection(rsFeature, roofSection, false);\n      controller.updateRestoreDefaultRoofSectionsUI();\n    }\n    repositionRoofSection(rsFeature, roofSection, roofPlaneFeature, project, mapModelSynchronizer, mapManager);\n    addLayoutAndArrayForRoofSection(rsFeature, roofSection, project, mapManager, currentLayout);\n    if (currentLayout) destroy(currentLayout);\n  } else {\n    // should never happen\n    console.error(\"Could not find roof plane for roof section feature\", rsFeature);\n    debugger;\n  }\n}\n\nexport function deleteRoofSection(rsFeature, project, mapModelSynchronizer, mapManager, controller) {\n  const uuid = rsFeature.get(\"uuid\");\n\n  if (uuid) {\n    const roofSection = project.getRoofSection(uuid);\n    const roofPlane = roofSection.roofPlane;\n    const rpFeature = mapModelSynchronizer.getRoofPlaneFeatureByUuid(roofPlane.uuid);\n\n    removeExistingBoundingBoxAndArrayFeatures(roofSection, mapManager);\n    removeFeaturesForRoofSection(roofSection, mapModelSynchronizer, mapManager);\n\n    new ObstructionsProximityDetector(project).deleteRoofSection(roofSection);\n\n    if (roofSection.isDefault) {\n      roofSection.deactivate();\n      controller.updateRestoreDefaultRoofSectionsUI();\n    } else if (roofSection.id) {\n      roofSection.flagDeleted();\n    } else {\n      roofPlane.destroyRoofSection(roofSection);\n    }\n\n    new RoofSectionLegalityChecker(\n      rpFeature,\n      mapManager.roofSectionsFeatures,\n      mapModelSynchronizer,\n    ).markIllegalPolygons();\n\n    roofPlane.resequenceRoofSectionsIdentifiers();\n    mapModelSynchronizer.syncIdentifiersOnFeatures();\n\n    mapManager.forceRedrawRoofPlanes();\n  } else {\n    console.log(\"No UUID. Skipping\", rsFeature);\n  }\n}\n\nexport function deleteRoofSectionAndRemoveFromVectorSource(roofSection, mapModelSynchronizer, mapManager) {\n  removeFeaturesForRoofSection(roofSection, mapModelSynchronizer, mapManager);\n\n  new ObstructionsProximityDetector(mapManager.project).deleteRoofSection(roofSection);\n\n  if (roofSection.id) {\n    roofSection.flagDeleted();\n  } else {\n    roofSection.roofPlane.destroyRoofSection(roofSection);\n  }\n}\n\nexport function removeFeaturesForRoofSection(roofSection, mapModelSynchronizer, mapManager) {\n  removeExistingBoundingBoxAndArrayFeatures(roofSection, mapManager);\n  removeFeaturesMatchingUuid(mapManager.roofSectionsVectorSource, roofSection.uuid);\n}\n\nexport function reactivateRoofSection(roofSection, project, mapModelSynchronizer, mapManager) {\n  roofSection.activate();\n  const rsFeature = mapModelSynchronizer.createFeatureForModel(roofSection);\n  mapManager.roofSectionsVectorSource.addFeature(rsFeature);\n  addLayoutAndArrayForRoofSection(rsFeature, roofSection, project, mapManager);\n  new ObstructionsProximityDetector(mapManager.project).findNearbyObstructionsForRoofSection(roofSection);\n}\n\nfunction repositionRoofSection(rsFeature, roofSection, rpFeature, project, mapModelSynchronizer, mapManager) {\n  mapModelSynchronizer.updateRoofSectionLatLngFromFeature(rsFeature);\n\n  new RoofSectionLegalityChecker(\n    rpFeature,\n    mapManager.roofSectionsFeatures,\n    mapModelSynchronizer,\n  ).markIllegalPolygons();\n\n  new ObstructionsProximityDetector(project).findNearbyObstructionsForRoofSection(roofSection);\n}\n\n// NOTE: This only moves the underlying model. At this time, there is no point in moving the features\n// because this is only used when translating a roof plane. Which happens on a page where roof sections\n// are not shown. When the user switches to the roof section page, new features are generated on load.\nexport function moveRoofSectionByDelta(roofSection, deltaLat, deltaLng) {\n  roofSection.shiftLatLngPointsByDelta(deltaLat, deltaLng);\n  roofSection.shiftBoundingBoxByDelta(deltaLat, deltaLng);\n  // NOTE: The bounding box cartesian coordinates are relative to the roof plane. Since this method\n  //       is only used to move a roofSection in sync with the of its containing roofPlane, the\n  //       position of the roofSection and its boundingBox relative to the roofPlane don't change.\n  //       So there is no change to the cartesian points of the roof section or the cartesian points\n  //       of the bounding box.\n}\n\nfunction swapInNewCustomRoofSection(rsFeature, roofSection, copyLayout) {\n  const roofPlane = roofSection.roofPlane;\n  const replacement = roofPlane.addNewCustomRoofSectionBasedOnADefaultBeingDeactivated(roofSection, copyLayout);\n  linkFeatureToModel(rsFeature, replacement);\n\n  return replacement;\n}\n\nfunction findRoofPlaneFeatureForRoofSectionFeature(feature, mapManager) {\n  const coordinates = feature.getGeometry().getLinearRing(0).getCoordinates();\n  const roofPlaneFeatures = mapManager.roofPlanesFeatures;\n\n  for (let i = 0; i < coordinates.length; i++) {\n    for (let j = 0; j < roofPlaneFeatures.length; j++) {\n      const isInRoofPlane = pointInOrOnPolygon(coordinates[i], roofPlaneFeatures[j].getGeometry().getCoordinates());\n      if (isInRoofPlane) return roofPlaneFeatures[j];\n    }\n  }\n  return undefined;\n}\n\nexport function addLayoutAndArrayForRoofSection(rsFeature, roofSection, project, mapManager, priorLayout) {\n  removeExistingBoundingBoxAndArrayFeatures(roofSection, mapManager);\n  addBoundingBox(rsFeature, roofSection, project, mapManager, true);\n  new LayoutBuilder(project, roofSection).build(priorLayout);\n  buildArrayAndAddFeatures(roofSection, project, mapManager);\n}\n\nexport function addLayoutForRoofSection(rsFeature, roofSection, project, mapManager, priorLayout) {\n  removeExistingBoundingBoxAndArrayFeatures(roofSection, mapManager);\n  addBoundingBox(rsFeature, roofSection, project, mapManager, false);\n  new LayoutBuilder(project, roofSection).build(priorLayout);\n}\n\nexport function updateBoundingBoxAndReAddLayoutForRoofSection(rsFeature, roofSection, project, mapManager) {\n  removeExistingBoundingBoxAndArrayFeatures(roofSection, mapManager);\n  addBoundingBox(rsFeature, roofSection, project, mapManager, true);\n  new LayoutBuilder(project, roofSection).reprocessExistingLayout();\n  buildArrayAndAddFeatures(roofSection, project, mapManager);\n}\n\nfunction addBoundingBox(rsFeature, roofSection, project, mapManager, addFeatureForPowerUsers) {\n  const boundingBoxBuilder = new BoundingBoxBuilder(project, roofSection, rsFeature);\n  boundingBoxBuilder.build();\n  if (project.powerUser && addFeatureForPowerUsers && mapManager.controller.showBoundingBoxes) {\n    mapManager.arraysVectorSource.addFeature(boundingBoxBuilder.boundingBoxFeature);\n  }\n}\n\nexport function adjustArrayAfterNudge(roofSection, project, mapManager) {\n  const layoutBuilder = new LayoutBuilder(project, roofSection);\n  layoutBuilder.reprocessExistingLayout();\n  removeArrayCellFeaturesDescendedFromRoofSectionUuid(mapManager.arraysVectorSource, roofSection.uuid);\n  buildArrayAndAddFeatures(roofSection, project, mapManager);\n}\n\nfunction buildArrayAndAddFeatures(roofSection, project, mapManager) {\n  const arrayBuilder = new ArrayBuilder(project, roofSection);\n  arrayBuilder.build();\n  arrayBuilder.features.forEach((feature) => mapManager.arraysVectorSource.addFeature(feature));\n}\n\nfunction removeExistingBoundingBoxAndArrayFeatures(roofSection, mapManager) {\n  removeFeaturesDescendedFromRoofSectionUuid(mapManager.arraysVectorSource, roofSection.uuid);\n}\n\nexport function syncRoofSectionCartesianPoints(topLeftLonLat, roofSection) {\n  setCartesianPointsForModelRelativeToOrigin(topLeftLonLat, roofSection);\n  logger(`RoofSection ${roofSection.displayIdentifier}: Set cartesian Points`, roofSection.cartesianPointsToArray);\n}\n\nexport function syncRoofSectionBoundingBoxCartesianPoints(topLeftLonLat, roofSection) {\n  const newPoints = cartesianPointsRelativeToOrigin(topLeftLonLat, roofSection.boundingBox);\n  roofSection.setBoundingBoxCartesianPoints(newPoints);\n\n  logger(\n    `RoofSection ${roofSection.displayIdentifier}: Updated bounding box cartesian points`,\n    roofSection.boundingBoxCartesianPointsToArray,\n  );\n}\n", "import DaDefaultRoofSectionsBuilder from \"../../da/map/default-roof-sections-builder\";\nimport {\n  addLayoutAndArrayForRoofSection,\n  syncRoofSectionBoundingBoxCartesianPoints,\n  syncRoofSectionCartesianPoints,\n} from \"./modification-helpers/roof-section\";\nimport { findTopLeftLonLat } from \"../../da/map/ol-geometry\";\nimport ObstructionsProximityDetector from \"./obstructions/proximity-detector\";\n\nexport default class DefaultRoofSectionsBuilder extends DaDefaultRoofSectionsBuilder {\n  get smoothInwardCorners() {\n    return this.project.smoothInwardCorners ?? false;\n  }\n\n  addRoofSectionPolygonFeatureToMap(polygonFeature, roofSection) {\n    super.addRoofSectionPolygonFeatureToMap(polygonFeature, roofSection);\n\n    const roofPlane = roofSection.roofPlane;\n    let priorLayout;\n    if (this.roofPlaneWithPriorLayout && this.roofPlaneWithPriorLayout.uuid === roofPlane.uuid) {\n      priorLayout = this.roofPlaneWithPriorLayout.priorLayout;\n    }\n    addLayoutAndArrayForRoofSection(polygonFeature, roofSection, this.project, this.controller.mapManager, priorLayout);\n  }\n\n  postBuildDaSpecificActions(roofPlane) {\n    const topLeftLonLat = findTopLeftLonLat(roofPlane.latLngPoints);\n    roofPlane.defaultRoofSections.forEach((rs) => {\n      syncRoofSectionCartesianPoints(topLeftLonLat, rs);\n      syncRoofSectionBoundingBoxCartesianPoints(topLeftLonLat, rs);\n    });\n\n    new ObstructionsProximityDetector(this.project).findNearbyObstructionsForRoofPlane(roofPlane);\n  }\n}\n", "import { polygonsAsPointListsIntersect } from \"../../../da/map/legality-checkers/polygon-helpers\";\n\nexport default class SetbackLegalityChecker {\n  constructor(setbackFeature, mapModelSynchronizer) {\n    this.setbackFeature = setbackFeature;\n    const setbackCoordinates = setbackFeature.getGeometry().getCoordinates();\n\n    this.roofPlaneCoordinates = setbackCoordinates[0];\n    // The inner ring of of the setback is the outer boundary of the roofSection\n    this.roofSectionsCoordinates = setbackCoordinates.slice(1, setbackCoordinates.length);\n\n    this.mapModelSynchronizer = mapModelSynchronizer;\n  }\n\n  check() {\n    this.clearIllegal();\n\n    this.roofSectionsCoordinates.forEach((roofSectionCoordinates) => {\n      if (this.roofSectionOutsideOfRoofPlane(roofSectionCoordinates)) this.markIllegal();\n      if (this.roofSectionIntersectsItself(roofSectionCoordinates)) this.markIllegal();\n      if (this.roofSectionIntersectsSibling(roofSectionCoordinates)) this.markIllegal();\n    });\n\n    this.saveIllegalityIntoModels();\n  }\n\n  clearIllegal() {\n    this.setbackFeature.set(\"illegalShape\", false);\n  }\n\n  roofSectionOutsideOfRoofPlane(roofSectionCoordinates) {\n    return polygonsAsPointListsIntersect(roofSectionCoordinates, this.roofPlaneCoordinates);\n  }\n\n  roofSectionIntersectsItself(roofSectionCoordinates) {\n    return polygonsAsPointListsIntersect(roofSectionCoordinates, roofSectionCoordinates);\n  }\n\n  roofSectionIntersectsSibling(roofSectionCoordinates) {\n    for (let i = 0; i < this.roofSectionsCoordinates.length; i++) {\n      const siblingCoordinates = this.roofSectionsCoordinates[i];\n\n      const isSameRoofSection = JSON.stringify(roofSectionCoordinates) === JSON.stringify(siblingCoordinates);\n      if (isSameRoofSection) continue;\n\n      if (polygonsAsPointListsIntersect(roofSectionCoordinates, siblingCoordinates)) return true;\n    }\n    return false;\n  }\n\n  markIllegal() {\n    this.setbackFeature.set(\"illegalShape\", true);\n  }\n\n  saveIllegalityIntoModels() {\n    if (!this.mapModelSynchronizer.setRoofPlaneRoofSectionsLegality) return;\n\n    this.mapModelSynchronizer.setRoofPlaneRoofSectionsLegality(\n      this.setbackFeature.get(\"roofPlaneUuid\"),\n      this.setbackFeature.get(\"illegalShape\"),\n    );\n  }\n}\n", "import VectorLayer from \"ol/layer/Vector\";\nimport VectorSource from \"ol/source/Vector\";\nimport { defaults as interactionDefaults } from \"ol/interaction\";\n\nimport { arraysStyle } from \"../../da/map/styles/arrays\";\nimport {\n  obstructionStyle,\n  obstructionBufferStyle,\n  obstructionSetbackBufferStyle,\n} from \"../../da/map/styles/obstructions\";\nimport {\n  ARRAY_DATA_TYPE,\n  OBSTRUCTION_BUFFER_DATA_TYPE,\n  OBSTRUCTION_SETBACK_BUFFER_DATA_TYPE,\n  OBSTRUCTION_DATA_TYPE,\n} from \"../../da/map/data-types\";\n\nimport DaMapManager from \"../../da/map/map-manager\";\n\nimport { adjustArrayAfterNudge } from \"./modification-helpers/roof-section\";\nimport CellPositioner from \"./panel-grid/cell-positioner\";\nimport DefaultRoofSectionsBuilder from \"./default-roof-sections-builder\";\n\nimport * as events from \"../../da/map/events\";\nimport { logger } from \"../../helpers/app\";\nimport SetbackLegalityChecker from \"../../pr/map/legality-checkers/setback\";\n\nexport default class MapManager extends DaMapManager {\n  #scrollReferences = new Map();\n\n  buildArraysVectorSource() {\n    this.arraysVectorSource = new VectorSource({\n      features: this.arraysFeatures,\n    });\n  }\n\n  get arraysFeatures() {\n    let limitTo = \"all\";\n    if (this.controller.isRoofPlanesPage) {\n      limitTo = \"none\";\n    } else if (this.controller.isEditArrayPage) {\n      limitTo = \"roofSection\";\n    }\n    return this.mapModelSynchronizer.featuresForArrays(limitTo, this.project.focusedRoofSection);\n  }\n\n  get arraysVectorLayer() {\n    if (!this.memoArraysVectorLayer) {\n      this.memoArraysVectorLayer = new VectorLayer({\n        source: this.arraysVectorSource,\n        style: (feature) =>\n          arraysStyle(feature, {\n            hideEmptyCells: this.controller.hideEmptyCells,\n            isProjectReport: this.controller.isProjectReport,\n          }),\n        zIndex: 40,\n      });\n      this.memoArraysVectorLayer.set(\"dataType\", ARRAY_DATA_TYPE);\n    }\n    return this.memoArraysVectorLayer;\n  }\n\n  addArraysVectorLayer() {\n    this.map.addLayer(this.arraysVectorLayer);\n  }\n\n  clearArrayFeatures() {\n    this.arraysVectorSource.clear();\n  }\n\n  renderArrayFeatures() {\n    this.arraysVectorSource.addFeatures(this.arraysFeatures);\n  }\n\n  add() {\n    this.buildRoofPlanesVectorSource();\n    this.buildObstructionsVectorSource();\n    this.buildObstructionBuffersVectorSource();\n    this.buildObstructionSetbackBuffersVectorSource();\n    this.buildRoofSectionsVectorSource();\n    this.buildArraysVectorSource();\n    this.buildMeasuresVectorSource();\n    this.buildShapeGuideLinesVectorSource();\n    const mapParams = {\n      layers: [\n        this.tileLayer,\n        this.roofPlanesVectorLayer,\n        this.obstructionSetbackBuffersVectorLayer,\n        this.obstructionBuffersVectorLayer,\n        this.obstructionsVectorLayer,\n        this.measuresVectorLayer,\n        this.shapeGuideLinesVectorLayer,\n        this.visualMarkersVectorLayer,\n      ],\n    };\n\n    if (this.controller.useGuideLines) {\n      this.buildGuideLinesVectorSource();\n      this.buildGuideLinesIntersectionCirclesVectorSource();\n\n      mapParams.layers.push(this.guideLinesVectorLayer);\n      mapParams.layers.push(this.guideLinesIntersectionCirclesVectorLayer);\n    }\n\n    if (this.controller.viewOnlyMap) {\n      mapParams.interactions = interactionDefaults({ doubleClickZoom: false, mouseWheelZoom: false });\n    }\n\n    this.map = this.buildMap(mapParams);\n\n    this.addBuildingImagePlacementLayers();\n\n    if (this.controller.viewOnlyMap) this.addMouseWheelZoomWhenCtrlKeyPressedInteraction();\n\n    this.map.on(\"moveend\", this.onMoveEnd);\n    this.map.on(\"click\", this.keepTrackOfDrawingCoordinates);\n    this.map.on(events.AFTER_MAP_FEATURES_RENDERING_EVENT, (event) => {\n      logger(`Dispatch ${events.AFTER_MAP_FEATURES_RENDERING_EVENT} called from ${event.calledFrom}`);\n\n      this.controller.addSnapshotToUndoQueue();\n\n      if (this.controller.isRoofSectionsPage) {\n        this.#checkSetbacksLegality();\n      }\n    });\n  }\n\n  buildObstructionsVectorSource() {\n    this.obstructionsVectorSource = new VectorSource();\n    this.obstructionsVectorSource.on(\"addfeature\", this.autoDeleteFlaggedFeatures);\n    this.obstructionsVectorSource.on(\"addfeature\", (event) => {\n      this.shapeGuideLinesCall(\"add\", event.feature, \"obstructionsVectorSource addfeature\");\n    });\n    this.obstructionsVectorSource.on(\"removefeature\", (event) => {\n      this.shapeGuideLinesCall(\"remove\", event.feature, \"obstructionsVectorSource removefeature\");\n    });\n\n    const features = this.mapModelSynchronizer.featuresForObstructions();\n    const showGuideLines = this.controller.settings.showShapeGuideLinesAlways;\n\n    if (showGuideLines) this.featuresToRenderShapeGuideLinesFor.push(...features);\n\n    this.obstructionsVectorSource.addFeatures(features);\n  }\n\n  get obstructionsVectorLayer() {\n    if (!this.memoObstructionVectorLayer) {\n      this.memoObstructionVectorLayer = new VectorLayer({\n        source: this.obstructionsVectorSource,\n        style: (feature) => obstructionStyle(feature, this.controller.project),\n        zIndex: 17,\n      });\n      this.memoObstructionVectorLayer.set(\"dataType\", OBSTRUCTION_DATA_TYPE);\n    }\n    return this.memoObstructionVectorLayer;\n  }\n\n  buildObstructionBuffersVectorSource() {\n    this.obstructionBuffersVectorSource = new VectorSource({\n      features: this.mapModelSynchronizer.featuresForObstructionBuffers(),\n    });\n    this.obstructionBuffersVectorSource.on(\"addfeature\", this.autoDeleteFlaggedFeatures);\n  }\n\n  get obstructionBuffersVectorLayer() {\n    if (!this.memoObstructionBufferVectorLayer) {\n      this.memoObstructionBufferVectorLayer = new VectorLayer({\n        source: this.obstructionBuffersVectorSource,\n        style: (feature) => obstructionBufferStyle(feature, this.controller.project),\n        zIndex: 14,\n      });\n      this.memoObstructionBufferVectorLayer.set(\"dataType\", OBSTRUCTION_BUFFER_DATA_TYPE);\n    }\n    return this.memoObstructionBufferVectorLayer;\n  }\n\n  buildObstructionSetbackBuffersVectorSource() {\n    this.obstructionSetbackBuffersVectorSource = new VectorSource({\n      features: this.mapModelSynchronizer.featuresForObstructionSetbackBuffers(),\n    });\n    this.obstructionSetbackBuffersVectorSource.on(\"addfeature\", this.autoDeleteFlaggedFeatures);\n  }\n\n  get obstructionSetbackBuffersVectorLayer() {\n    if (!this.memoObstructionSetbackBufferVectorLayer) {\n      this.memoObstructionSetbackBufferVectorLayer = new VectorLayer({\n        source: this.obstructionSetbackBuffersVectorSource,\n        style: (feature) => obstructionSetbackBufferStyle(feature, this.controller.project),\n        zIndex: 15,\n      });\n      this.memoObstructionSetbackBufferVectorLayer.set(\"dataType\", OBSTRUCTION_SETBACK_BUFFER_DATA_TYPE);\n    }\n    return this.memoObstructionSetbackBufferVectorLayer;\n  }\n\n  get obstructionSetbackBuffersFeatures() {\n    return this.obstructionSetbackBuffersVectorSource.getFeatures();\n  }\n\n  #checkSetbacksLegality() {\n    this.setbacksVectorSource.forEachFeature((feature) => {\n      new SetbackLegalityChecker(feature, this.mapModelSynchronizer).check();\n    });\n  }\n\n  addDrawingCoordinateToProjectModel(event) {\n    super.addDrawingCoordinateToProjectModel(event);\n\n    this.dispatchAfterMapFeaturesRendering({\n      calledFrom: \"BxMapManager#addDrawingCoordinateToProjectModel\",\n    });\n  }\n\n  clearFeaturesBeforeSnapshotUpdate() {\n    this.clearRoofPlaneFeatures();\n    this.clearRoofSectionFeatures();\n    this.clearArrayFeatures();\n    this.clearSetbackFeatures();\n  }\n\n  renderFeaturesAfterSnapshotUpdate() {\n    this.renderRoofPlaneFeatures();\n    this.renderRoofSectionFeatures();\n    this.renderArrayFeatures();\n    this.renderSetbackFeatures();\n  }\n\n  clearSetbackFeatures() {\n    this.setbacksVectorSource.clear();\n  }\n\n  renderSetbackFeatures() {\n    this.setbacksVectorSource.addFeatures(this.mapModelSynchronizer.loadSetbacks());\n  }\n\n  buildNewDefaultRoofSectionsAndSetbacks(roofPlaneWithPriorLayout) {\n    // have to add this after the map is created because we need the map to\n    // calculate the default roof sections\n    this.roofSectionsBuilder = new DefaultRoofSectionsBuilder(\n      this.controller,\n      this.map,\n      this.roofPlanesFeatures,\n      roofPlaneWithPriorLayout,\n    );\n\n    // TODO: Optimization only add setbacks that are newly created for\n    //       newly constructed default roof sections.\n    this.updateSetbacksVectorSource();\n  }\n\n  nudgeAlongAzimuth(roofSection, rsFeature, inchesToNudge) {\n    this.nudgeRelativeToAzimuth(roofSection, rsFeature, inchesToNudge, \"unitHeightVector\");\n  }\n\n  nudgePerpendicularToAzimuth(roofSection, rsFeature, inchesToNudge) {\n    this.nudgeRelativeToAzimuth(roofSection, rsFeature, inchesToNudge, \"unitWidthVector\");\n  }\n\n  nudgeRelativeToAzimuth(roofSection, rsFeature, inchesToNudge, direction) {\n    const cellPositioner = new CellPositioner(this.project, roofSection);\n\n    const adjustmentVector = cellPositioner[direction].times(inchesToNudge);\n\n    const key = `${direction}Cartesian`;\n    const adjustmentVectorCartesian = cellPositioner[key].times(inchesToNudge);\n\n    roofSection.adjustOffset(adjustmentVector, adjustmentVectorCartesian);\n\n    const { columnShift, rowShift } = this.infiniteScrollOffsetCorrection(roofSection, cellPositioner);\n\n    if (columnShift !== 0 || rowShift !== 0) {\n      roofSection.layout?.migrateEmptyPanels(columnShift, rowShift);\n    }\n\n    adjustArrayAfterNudge(roofSection, this.project, this);\n\n    this.dispatchAfterMapFeaturesRendering({ calledFrom: \"BxMapManager#nudgeRelativeToAzimuth\" });\n  }\n\n  infiniteScrollOffsetCorrection(roofSection, cellPositioner) {\n    const offsetCartesian = roofSection.offsetCartesianPoint;\n    const columnWidthInches = this.project.panelLength + this.project.interColumnSpacing;\n    const rowHeightInches = this.project.panelWidth + this.project.interRowSpacing;\n\n    const horizontalDistanceInches =\n      offsetCartesian.x * cellPositioner.unitWidthVectorCartesian.x +\n      offsetCartesian.y * cellPositioner.unitWidthVectorCartesian.y;\n    const verticalDistanceInches =\n      offsetCartesian.x * cellPositioner.unitHeightVectorCartesian.x +\n      offsetCartesian.y * cellPositioner.unitHeightVectorCartesian.y;\n\n    const home = this.#getScrollHome(roofSection.uuid, horizontalDistanceInches, verticalDistanceInches);\n\n    let columnShift = 0;\n    let rowShift = 0;\n\n    const horizontalDeviation = horizontalDistanceInches - home.horizontal;\n    if (Math.abs(horizontalDeviation) > columnWidthInches) {\n      const direction = Math.sign(horizontalDeviation);\n      const columnsExceeded = Math.floor(Math.abs(horizontalDeviation) / columnWidthInches);\n      const resetAmountInches = direction * columnsExceeded * columnWidthInches;\n      columnShift = direction * columnsExceeded;\n\n      const resetVector = cellPositioner.unitWidthVector.times(-resetAmountInches);\n      const resetCartesian = cellPositioner.unitWidthVectorCartesian.times(-resetAmountInches);\n      roofSection.adjustOffset(resetVector, resetCartesian);\n    }\n\n    const verticalDeviation = verticalDistanceInches - home.vertical;\n    if (Math.abs(verticalDeviation) > rowHeightInches) {\n      const direction = Math.sign(verticalDeviation);\n      const rowsExceeded = Math.floor(Math.abs(verticalDeviation) / rowHeightInches);\n      const resetAmountInches = direction * rowsExceeded * rowHeightInches;\n      rowShift = direction * rowsExceeded;\n\n      const resetVector = cellPositioner.unitHeightVector.times(-resetAmountInches);\n      const resetCartesian = cellPositioner.unitHeightVectorCartesian.times(-resetAmountInches);\n      roofSection.adjustOffset(resetVector, resetCartesian);\n    }\n\n    return { columnShift, rowShift };\n  }\n\n  nudgeReset(roofSection) {\n    roofSection.resetOffset();\n    this.#scrollReferences.delete(roofSection.uuid);\n    adjustArrayAfterNudge(roofSection, this.project, this);\n\n    this.dispatchAfterMapFeaturesRendering({ calledFrom: \"BxMapManager#nudgeReset\" });\n  }\n\n  #getScrollHome(roofSectionUuid, currentHorizontal, currentVertical) {\n    if (!this.#scrollReferences.has(roofSectionUuid)) {\n      this.#scrollReferences.set(roofSectionUuid, {\n        horizontal: currentHorizontal,\n        vertical: currentVertical,\n      });\n    }\n    return this.#scrollReferences.get(roofSectionUuid);\n  }\n\n  onMoveEndHandler(event) {\n    const result = super.onMoveEndHandler(event);\n    if (!result) return;\n\n    if (this.controller.draggingAzimuth) return;\n    if (this.controller.undoRedoInProgress) return;\n\n    this.dispatchAfterMapFeaturesRendering({ calledFrom: \"BxMapManager#onMoveEnd\" });\n  }\n\n  get obstructionsFeatures() {\n    return this.obstructionsVectorSource.getFeatures();\n  }\n\n  get obstructionBuffersFeatures() {\n    return this.obstructionBuffersVectorSource.getFeatures();\n  }\n}\n", "import { getCenter } from \"ol/extent\";\nimport { Point } from \"ol/geom\";\nimport { Fill, Icon, Stroke, Style } from \"ol/style\";\n\nexport const buildingImagePlacementStyleFunction = (placement) => {\n  const iconStyle = new Style({\n    geometry: (feature) => {\n      return new Point(getCenter(feature.getGeometry().getExtent()));\n    },\n    image: new Icon({\n      src: placement.imagePath,\n      crossOrigin: \"anonymous\",\n    }),\n  });\n\n  const styles = [\n    new Style({\n      stroke: new Stroke({\n        width: 1,\n        // color: \"#f00\", // For debugging\n        color: \"transparent\",\n      }),\n      fill: new Fill({\n        color: \"transparent\",\n      }),\n      zIndex: 1,\n    }),\n    iconStyle,\n  ];\n\n  return (feature, resolution) => {\n    function distance(p1, p2) {\n      const dx = p2[0] - p1[0];\n      const dy = p2[1] - p1[1];\n      return Math.sqrt(dx * dx + dy * dy);\n    }\n\n    const iconImage = iconStyle.getImage();\n    const icon = iconImage.getImage();\n\n    const coords = feature.getGeometry().getCoordinates()[0];\n    const width = distance(coords[0], coords[1]);\n    const height = distance(coords[1], coords[2]);\n\n    const scaleX = width / resolution / icon.naturalWidth;\n    const scaleY = height / resolution / icon.naturalHeight;\n\n    iconImage.setScale([scaleX, scaleY]);\n    iconImage.setRotation(feature.get(\"imageRotation\"));\n    iconImage.setOpacity(feature.get(\"selected\") ? 0.7 : 1.0);\n\n    return styles;\n  };\n};\n", "import { toLonLat, fromLonLat } from \"ol/proj\";\nimport Feature from \"ol/Feature\";\nimport Polygon from \"ol/geom/Polygon\";\nimport { getDistance } from \"ol/sphere\";\nimport { Point } from \"ol/geom\";\n\nimport {\n  calculateUnitPerpendicularEdgeVectorLatLng,\n  cartesianPointRelativeTo,\n  findTopLeftLonLat,\n  lineIntersectionInCoordinates,\n  METERS_TO_INCHES,\n} from \"./ol-geometry\";\nimport {\n  buildLineStringSegmentFeaturesFromPolygonCoordinates,\n  coordinateToLatLngObj,\n  isPolygon,\n  relativePosition,\n  segmentCoordinatesFromPolygon,\n} from \"./ol-helpers\";\n\nimport {\n  BUILDING_IMAGE_PLACEMENT_DATA_TYPE,\n  GUIDE_LINES_INTERSECTION_CIRCLE_DATA_TYPE,\n  GUIDE_LINE_DATA_TYPE,\n  OBSTRUCTION_DATA_TYPE,\n  ROOF_PLANE_DATA_TYPE,\n  ROOF_SECTION_DATA_TYPE,\n  SETBACK_DATA_TYPE,\n} from \"./data-types\";\nimport SimpleLatLng from \"./models/simple-lat-lng\";\nimport { buildLengthCorrectedEdgeList } from \"./edge-list\";\nimport { degreesToRadians } from \"../../helpers/geometry\";\nimport { buildingImagePlacementStyleFunction } from \"./styles/building-image-placements\";\nimport Sentry, { sentryException } from \"../../config/sentry\";\nimport { debugIt } from \"../../helpers/logger\";\n\nexport default class MapModelSynchronizer {\n  constructor(controller) {\n    this.controller = controller;\n\n    this.project = controller.project;\n    this.buildingImagePlacementFeatures = [];\n  }\n\n  get saveBtnTarget() {\n    return controller.saveBtnTarget;\n  }\n\n  // Translate lon/lat coordinates to projection coordinates and create polygon features\n  featuresForDisplayableRoofPlanes() {\n    return this.project.displayableRoofPlanes.map((roofPlane) => {\n      const feature = this.createFeatureForModel(roofPlane);\n\n      // TODO: PRIB: Remove once we've got legacy projects updated to have rotation angles (just projects on staging)\n      // This is to catch existing projects that were saved before we persisted rotation angle\n      if (roofPlane.eaveRotationAngleRadians === -1 && roofPlane.eaveEdgeIndex !== null) {\n        const edgeList = buildLengthCorrectedEdgeList(feature, this.controller);\n        const eaveRotationAngleRadians = Math.PI - edgeList[0].rotationAngle;\n        roofPlane.setEaveRotationAngleRadians(eaveRotationAngleRadians);\n      }\n\n      return feature;\n    });\n  }\n\n  featuresForDisplayableRoofSections() {\n    return this.project.displayableRoofPlanes.flatMap((roofPlane) => {\n      return roofPlane.displayableRoofSections.map((roofSection) => this.createFeatureForModel(roofSection));\n    });\n  }\n\n  updateRoofPlaneLatLngFromFeature(feature) {\n    const roofPlane = this.getRoofPlaneForFeature(feature, \"DaMapModelSynchronizer#updateRoofPlaneLatLngFromFeature\");\n    if (!roofPlane) return;\n\n    const latLngPoints = this.latLngPointsFromFeature(feature);\n    roofPlane.setLatLngPoints(latLngPoints);\n\n    if (this.project.isBX) {\n      this.setGlobalCartesianOffset(latLngPoints, roofPlane);\n    }\n  }\n\n  updateObstructionLatLngFromFeature(feature) {\n    const obstruction = this.getObstructionForFeature(\n      feature,\n      \"DaMapModelSynchronizer#updateObstructionLatLngFromFeature\",\n    );\n    if (!obstruction) return;\n\n    const latLngPoints = this.latLngPointsFromFeature(feature);\n    obstruction.setLatLngPoints(latLngPoints);\n\n    this.setGlobalCartesianOffset(latLngPoints, obstruction);\n  }\n\n  setGlobalCartesianOffset(latLngPoints, model) {\n    if (!this.project.isBX) return;\n\n    const topLeftLonLat = findTopLeftLonLat(latLngPoints);\n    const globalOriginLonLat = this.project.globalOrigin.toLonLat;\n    const delta = cartesianPointRelativeTo(topLeftLonLat, globalOriginLonLat);\n    model.setGlobalCartesianOffset(delta);\n  }\n\n  getRoofSectionForFeature(feature) {\n    if (!isPolygon(feature)) return;\n    if (feature.get(\"dataType\") !== ROOF_SECTION_DATA_TYPE) return;\n    if (feature.get(\"flaggedForAutoDeleteByVectorSource\")) return;\n\n    const uuid = feature.get(\"uuid\");\n\n    Sentry.addBreadcrumb({\n      category: \"map-sync\",\n      message: \"Looking up roof section by feature UUID\",\n      level: \"info\",\n      data: {\n        uuid,\n        dataType: feature.get(\"dataType\"),\n      },\n    });\n\n    const roofSection = this.project.getRoofSection(uuid);\n\n    if (!roofSection) {\n      const allRoofSections = this.project.roofPlanes.flatMap((rp) => rp.roofSections || []);\n      const { geometry, ...featureProperties } = feature.getProperties();\n      const errorDetails = {\n        uuid,\n        dataType: feature.get(\"dataType\"),\n        totalRoofSections: allRoofSections.length,\n        totalRoofPlanes: this.project.roofPlanes.length,\n        allRoofSections: JSON.stringify(allRoofSections.map((rs) => [rs.uuid, rs.id, rs.deleted])),\n        featureProperties: JSON.stringify(featureProperties),\n      };\n\n      console.error(\"No matching roof section found for feature\", errorDetails);\n      sentryException(new Error(\"No matching roof section\"), errorDetails);\n\n      debugIt();\n      throw new Error(`No matching roof section for ${uuid}`);\n    }\n\n    return roofSection;\n  }\n\n  getFeatureForRoofSection(roofSection, requireMatch = true) {\n    const mapManager = this.controller.mapManager;\n    const roofSectionsVectorSource = mapManager.roofSectionsVectorSource;\n\n    return this.matchFeatureByUuid(roofSectionsVectorSource, roofSection.uuid, requireMatch);\n  }\n\n  updateAllRoofSectionsIllegalityFromFeature(inFlightFeatures = []) {\n    const features = inFlightFeatures.concat(this.controller.mapManager.roofSectionsFeatures);\n\n    features.forEach((feature) => {\n      const roofSection = this.getRoofSectionForFeature(feature);\n      if (!roofSection) return;\n\n      roofSection.setIllegalShape(feature.get(\"illegalShape\"));\n      roofSection.setEncroaching(feature.get(\"encroaching\"));\n    });\n  }\n\n  updateRoofSectionLatLngFromFeature(feature) {\n    const roofSection = this.getRoofSectionForFeature(feature);\n    if (!roofSection) return;\n\n    const latLngPoints = this.latLngPointsFromFeature(feature);\n    roofSection.setLatLngPoints(latLngPoints);\n  }\n\n  latLngPointsFromFeature(feature) {\n    return feature\n      .getGeometry()\n      .getCoordinates()\n      .map((featureCoordinates) => {\n        return featureCoordinates.map((c) => {\n          const lonLat = toLonLat(c);\n          return { lat: lonLat[1], lng: lonLat[0] };\n        });\n      })[0];\n  }\n\n  getRoofPlaneForFeature(feature, calledFrom) {\n    if (!isPolygon(feature)) return;\n    if (feature.get(\"dataType\") !== ROOF_PLANE_DATA_TYPE) return;\n    if (feature.get(\"flaggedForAutoDeleteByVectorSource\")) return;\n\n    const uuid = feature.get(\"uuid\");\n\n    Sentry.addBreadcrumb({\n      category: \"map-sync\",\n      message: \"Looking up roof plane by feature UUID\",\n      level: \"info\",\n      data: {\n        uuid,\n        dataType: feature.get(\"dataType\"),\n        calledFrom,\n        allRoofPlaneUuids: this.project.roofPlanes.map((rp) => rp.uuid),\n      },\n    });\n\n    const roofPlane = this.project.getRoofPlane(uuid);\n    if (!roofPlane) {\n      const { geometry, ...featureProperties } = feature.getProperties();\n      const errorDetails = {\n        uuid,\n        dataType: feature.get(\"dataType\"),\n        calledFrom,\n        totalRoofPlanes: this.project.roofPlanes.length,\n        allRoofPlanes: JSON.stringify(this.project.roofPlanes.map((rp) => [rp.uuid, rp.id, rp.deleted])),\n        deletedRoofPlanes: this.project.roofPlanes.filter((rp) => rp.deleted).length,\n        featureProperties: JSON.stringify(featureProperties),\n      };\n\n      console.error(\"No matching roof plane found for feature\", errorDetails);\n      sentryException(new Error(\"No matching roof plane\"), errorDetails);\n\n      debugIt();\n      throw new Error(`No matching roof plane for ${uuid} (called from ${calledFrom})`);\n    }\n\n    return roofPlane;\n  }\n\n  getFeatureForRoofPlane(roofPlane) {\n    if (roofPlane.deleted) return;\n\n    const mapManager = this.controller.mapManager;\n    const roofPlanesVectorSource = mapManager.roofPlanesVectorSource;\n\n    return this.matchFeatureByUuid(roofPlanesVectorSource, roofPlane.uuid, true);\n  }\n\n  getRoofPlaneFeatureByUuid(uuid) {\n    const mapManager = this.controller.mapManager;\n    const roofPlanesVectorSource = mapManager.roofPlanesVectorSource;\n\n    return this.matchFeatureByUuid(roofPlanesVectorSource, uuid, true);\n  }\n\n  getObstructionForFeature(feature, calledFrom) {\n    if (!isPolygon(feature)) return;\n    if (feature.get(\"dataType\") !== OBSTRUCTION_DATA_TYPE) return;\n    if (feature.get(\"flaggedForAutoDeleteByVectorSource\")) return;\n\n    const uuid = feature.get(\"uuid\");\n\n    Sentry.addBreadcrumb({\n      category: \"map-sync\",\n      message: \"Looking up obstruction by feature UUID\",\n      level: \"info\",\n      data: {\n        uuid,\n        dataType: feature.get(\"dataType\"),\n        calledFrom,\n      },\n    });\n\n    const obstruction = this.project.getObstruction(uuid);\n    if (!obstruction) {\n      const { geometry, ...featureProperties } = feature.getProperties();\n      const errorDetails = {\n        uuid,\n        dataType: feature.get(\"dataType\"),\n        calledFrom,\n        totalObstructions: this.project.obstructions?.length || 0,\n        allObstructions: JSON.stringify(this.project.obstructions.map((o) => [o.uuid, o.id, o.deleted])),\n        featureProperties: JSON.stringify(featureProperties),\n      };\n\n      console.error(\"No matching obstruction found for feature\", errorDetails);\n      sentryException(new Error(\"No matching obstruction\"), errorDetails);\n\n      debugIt();\n      throw new Error(`No matching obstruction for ${uuid} (called from ${calledFrom})`);\n    }\n\n    return obstruction;\n  }\n\n  getFeatureForObstruction(obstruction) {\n    if (obstruction.deleted) return;\n\n    const mapManager = this.controller.mapManager;\n    const obstructionsVectorSource = mapManager.obstructionsVectorSource;\n\n    return this.matchFeatureByUuid(obstructionsVectorSource, obstruction.uuid, true);\n  }\n\n  matchFeatureByUuid(source, uuid, requireMatch = false) {\n    const features = source.getFeatures();\n    const matchingFeature = features.find((feature) => feature.get(\"uuid\") === uuid);\n\n    if (!matchingFeature && requireMatch) {\n      debugIt();\n    }\n\n    return matchingFeature;\n  }\n\n  updateAllRoofPlanesIllegalityFromFeature(inFlightFeatures = []) {\n    const features = inFlightFeatures.concat(this.controller.mapManager.roofPlanesFeatures);\n\n    features.forEach((feature) => {\n      const roofPlane = this.getRoofPlaneForFeature(\n        feature,\n        \"DaMapModelSynchronizer#updateAllRoofPlanesIllegalityFromFeature\",\n      );\n      if (!roofPlane) return;\n\n      roofPlane.setIllegalShape(feature.get(\"illegalShape\"));\n    });\n  }\n\n  updateAllObstructionsIllegalityFromFeature(inFlightFeatures = []) {\n    const features = inFlightFeatures.concat(this.controller.mapManager.obstructionsFeatures);\n\n    features.forEach((feature) => {\n      const obstruction = this.getObstructionForFeature(\n        feature,\n        \"DaMapModelSynchronizer#updateAllObstructionsIllegalityFromFeature\",\n      );\n      if (!obstruction) return;\n\n      obstruction.setIllegalShape(feature.get(\"illegalShape\"));\n    });\n  }\n\n  saveEditorLocation = (_event) => {\n    const { map } = this.controller.mapManager;\n    const view = map.getView();\n\n    const center = toLonLat(view.getCenter());\n    const zoom = view.getZoom();\n    const rotation = view.getRotation();\n\n    const site = this.project.projectSite;\n    if (this.controller.isViewerPage) {\n      site.setViewerSettings({ lat: center[1], lng: center[0], zoom, rotation });\n    } else if (this.controller.isUnpersistedZoomRotationPositionPage) {\n      site.setUnpersistedSettings({ lat: center[1], lng: center[0], zoom, rotation });\n    } else if (this.shouldSetEditorSettings) {\n      site.setEditorSettings({ lat: center[1], lng: center[0], zoom, rotation });\n    }\n  };\n\n  shouldSetEditorSettings() {\n    return true;\n  }\n\n  syncIdentifiersOnFeatures() {\n    const mapManager = this.controller.mapManager;\n\n    mapManager.roofPlanesFeatures.forEach((feature) => {\n      const roofPlane = this.getRoofPlaneForFeature(feature, \"DaMapModelSynchronizer#syncIdentifiersOnFeatures\");\n      feature.set(\"identifier\", roofPlane.displayIdentifier);\n    });\n  }\n\n  loadSetbacks() {\n    return this.project.roofPlanesWithDefaultRoofSections.map((roofPlane) => this.buildSetbackForRoofPlane(roofPlane));\n  }\n\n  buildSetbackForRoofPlane(roofPlane) {\n    const outerCoordinates = roofPlane.latLngPoints.map((p) => fromLonLat(p.toLonLat));\n    const polygonCoordinates = [outerCoordinates];\n\n    roofPlane.defaultRoofSections.forEach((roofSection) => {\n      const innerCoordinates = roofSection.latLngPoints.map((p) => fromLonLat(p.toLonLat));\n      polygonCoordinates.push(innerCoordinates);\n    });\n\n    const setbackPolygon = new Polygon(polygonCoordinates);\n    const setbackFeature = new Feature({ geometry: setbackPolygon });\n    setbackFeature.set(\"roofPlaneUuid\", roofPlane.uuid);\n    setbackFeature.set(\"dataType\", SETBACK_DATA_TYPE);\n\n    return setbackFeature;\n  }\n\n  /*\n  The following methods are wrappers around OpenLayers methods we use quite a bit in our system.  OpenLayers\n  doesn't play well with Jest, and the imports for these methods end up throwing an error when running\n  a test on a file that uses them: `SyntaxError: Cannot use import statement outside a module`.  Using these\n  methods makes it possible to easily mock out the mapModelSynchronizer when writing unit tests, which\n  sidesteps the import error that pops up.\n  */\n  getDistanceInInches(latLng1, latLng2) {\n    return getDistance(latLng1.toLonLat, latLng2.toLonLat) * METERS_TO_INCHES;\n  }\n\n  toLonLat(olCoordinate) {\n    return toLonLat(olCoordinate);\n  }\n\n  fromLonLat(lonLat) {\n    return fromLonLat(lonLat);\n  }\n\n  simpleLatLngFromCoordinate(coordinate) {\n    return SimpleLatLng.fromLonLat(toLonLat(coordinate));\n  }\n\n  buildRoofPlaneGuideLineStringFeatures(roofPlane, options) {\n    const roofPlaneCoordinates = roofPlane.latLngPoints.map((p) => fromLonLat(p.toLonLat));\n    const features = buildLineStringSegmentFeaturesFromPolygonCoordinates(roofPlaneCoordinates);\n\n    let eaveLonLats;\n    const eave = roofPlane.eaveLatLngPoints; // [ [lat, lng], [lat, lng]]\n    if (eave) {\n      eaveLonLats = eave.map((point) => point.toLonLat);\n    }\n    const roofSlopeRadians = degreesToRadians(roofPlane.roofSlope);\n\n    features.forEach((feature, i) => {\n      feature.set(\"dataType\", GUIDE_LINE_DATA_TYPE);\n      feature.set(\"roofPlaneUuid\", roofPlane.uuid);\n      feature.set(\"lineNumber\", i + 1);\n      feature.set(\"segmentIndex\", i);\n      const guideLine = roofPlane[options.guideLinesKey][i];\n      if (!guideLine) return;\n      this.moveGuideLineInsideRoofPlaneAndExtend(feature, guideLine, eaveLonLats, roofSlopeRadians);\n    });\n\n    return features.filter((_feature, i) => {\n      const guideLine = roofPlane[options.guideLinesKey][i];\n      return guideLine?.visible && guideLine?.displayed !== false;\n    });\n  }\n\n  moveGuideLineInsideRoofPlaneAndExtend(lineStringFeature, guideLine, eaveLonLats, roofSlopeRadians) {\n    const lineStringGeometry = lineStringFeature.getGeometry();\n    const lineStringCoordinates = lineStringGeometry.getCoordinates();\n\n    const [startPointCoordinates, endPointCoordinates] = lineStringCoordinates;\n\n    const startPointLonLat = toLonLat(startPointCoordinates);\n    const endPointLonLat = toLonLat(endPointCoordinates);\n\n    const startPointLatLng = SimpleLatLng.fromLonLat(startPointLonLat);\n    const endPointLatLng = SimpleLatLng.fromLonLat(endPointLonLat);\n\n    const [_midPointLatLng, unitPerpendicularEdgeVectorLatLng, unitEdgeVectorLatLng] =\n      calculateUnitPerpendicularEdgeVectorLatLng(startPointCoordinates, endPointCoordinates); // [coordinate, inches]\n\n    const rawDistance = -1 * guideLine.distance; // inches inset from edge\n    let distance = rawDistance;\n    if (eaveLonLats !== undefined) {\n      distance = this.scaleDistance(rawDistance, unitPerpendicularEdgeVectorLatLng, eaveLonLats, roofSlopeRadians);\n    }\n    const offsetVectorLatLng = unitPerpendicularEdgeVectorLatLng.times(distance);\n\n    // new end points in SimpleLatLng format\n    const insetStartPointLatLng = startPointLatLng.plus(offsetVectorLatLng);\n    const insetEndPointLatLng = endPointLatLng.plus(offsetVectorLatLng);\n\n    const extensionDistance = 30 * 12; // 30 feet in inches\n    const fullExtensionVector = unitEdgeVectorLatLng.times(extensionDistance);\n\n    const fullyExtendedStartPointLatLng = insetStartPointLatLng.minus(fullExtensionVector);\n    const fullyExtendedEndPointLatLng = insetEndPointLatLng.plus(fullExtensionVector);\n\n    // new end points in OL LngLat\n    const insetStartPointLonLat = fullyExtendedStartPointLatLng.toLonLat;\n    const insetEndPointLonLat = fullyExtendedEndPointLatLng.toLonLat;\n\n    // new end points in OL coordinates\n    const insetStartPointCoordinates = fromLonLat(insetStartPointLonLat);\n    const insetEndPointCoordinates = fromLonLat(insetEndPointLonLat);\n\n    lineStringGeometry.setCoordinates([insetStartPointCoordinates, insetEndPointCoordinates]);\n  }\n\n  scaleDistance(distance, unitPerpendicularEdgeVectorLatLng, eaveLonLats, roofSlopeRadians) {\n    const angleToPerpendicularRadians = this.angleBetweenPerpendicularAndEave(\n      unitPerpendicularEdgeVectorLatLng,\n      eaveLonLats,\n    );\n    const scaling = this.distanceScalingFactor(angleToPerpendicularRadians, roofSlopeRadians);\n\n    return distance / scaling;\n  }\n\n  angleBetweenPerpendicularAndEave(unitPerpendicularEdgeVectorLatLng, eaveLonLats) {\n    const [eaveStartLonLat, eaveEndLonLat] = eaveLonLats;\n    const eaveCornerLonLat = [eaveEndLonLat[0], eaveStartLonLat[1]];\n\n    const [eaveSignLng, eaveSignLat] = relativePosition(eaveEndLonLat, eaveStartLonLat);\n\n    const eaveX = eaveSignLng * getDistance(eaveStartLonLat, eaveCornerLonLat);\n    const eaveY = eaveSignLat * getDistance(eaveCornerLonLat, eaveEndLonLat);\n\n    const perpendicularEndLonLat = [\n      eaveStartLonLat[0] + unitPerpendicularEdgeVectorLatLng.lng,\n      eaveStartLonLat[1] + unitPerpendicularEdgeVectorLatLng.lat,\n    ];\n    const perpendicularCornerLonLat = [eaveStartLonLat[0] + unitPerpendicularEdgeVectorLatLng.lng, eaveStartLonLat[1]];\n\n    const [perpendicularSignLng, perpendicularSignLat] = relativePosition(perpendicularEndLonLat, eaveStartLonLat);\n\n    const perpendicularX = perpendicularSignLng * getDistance(eaveStartLonLat, perpendicularCornerLonLat);\n    const perpendicularY = perpendicularSignLat * getDistance(perpendicularCornerLonLat, perpendicularEndLonLat);\n\n    const angle = Math.atan2(perpendicularY, perpendicularX) - Math.atan2(eaveY, eaveX);\n\n    return angle;\n  }\n\n  distanceScalingFactor(angleToPerpendicularRadians, roofSlopeRadians) {\n    const firstTerm = Math.cos(angleToPerpendicularRadians);\n    const secondTerm = Math.sin(angleToPerpendicularRadians) / Math.cos(roofSlopeRadians);\n    const scalingFactor = Math.sqrt(firstTerm ** 2 + secondTerm ** 2);\n\n    return scalingFactor;\n  }\n\n  loadGuideLinesIntersectionCircles(guideLineFeatures, roofPlaneFeatures) {\n    const intersectionPoints = [];\n\n    const guideLineLines = guideLineFeatures.map((sgf) => sgf.getGeometry().getCoordinates());\n    const roofPlaneLines = roofPlaneFeatures.flatMap((rpf) => segmentCoordinatesFromPolygon(rpf));\n\n    const addPointFromIntersection = (line, otherLine) => {\n      const intersection = lineIntersectionInCoordinates(line, otherLine);\n      if (!intersection) return;\n\n      if (!this.intersectionPointOnSegment(intersection, otherLine)) return;\n\n      const point = new Point(intersection);\n      const feature = new Feature({ geometry: point });\n      feature.set(\"dataType\", GUIDE_LINES_INTERSECTION_CIRCLE_DATA_TYPE);\n      intersectionPoints.push(feature);\n    };\n\n    guideLineLines.forEach((line) => {\n      guideLineLines.forEach((otherLine) => {\n        addPointFromIntersection(line, otherLine);\n      });\n\n      roofPlaneLines.forEach((otherLine) => {\n        addPointFromIntersection(line, otherLine);\n      });\n    });\n\n    return intersectionPoints;\n  }\n\n  // Since the intersection is on the infinite line, it will\n  // be on the small line segment if it's X is between the\n  // X's of the line's start and end and it's Y is between the\n  // line's Y.\n  // This is a simple, special case since we know the intersection\n  // is actually on the infinite version of the line.\n  intersectionPointOnSegment(intersection, line) {\n    const [lineStart, lineEnd] = line;\n    const [lineStartX, lineStartY] = lineStart;\n    const [lineEndX, lineEndY] = lineEnd;\n\n    const [intersectionX, intersectionY] = intersection;\n\n    const lineXMin = Math.min(lineStartX, lineEndX);\n    const lineXMax = Math.max(lineStartX, lineEndX);\n\n    const lineYMin = Math.min(lineStartY, lineEndY);\n    const lineYMax = Math.max(lineStartY, lineEndY);\n\n    return (\n      lineXMin <= intersectionX && intersectionX <= lineXMax && lineYMin <= intersectionY && intersectionY <= lineYMax\n    );\n  }\n\n  createBuildingImagePlacementFeature(placement) {\n    const coordinates = placement.latLngPoints.map((l) => fromLonLat(l.toLonLat));\n    const polygonCoordinates = [[...coordinates, coordinates[0]]];\n\n    const geometry = new Polygon(polygonCoordinates);\n    const feature = new Feature({ geometry });\n\n    feature.set(\"dataType\", BUILDING_IMAGE_PLACEMENT_DATA_TYPE);\n    feature.set(\"uuid\", placement.uuid);\n\n    feature.set(\"imageRotation\", placement.imageRotation);\n\n    feature.setStyle(buildingImagePlacementStyleFunction(placement));\n\n    this.addBuildingImagePlacementFeature(feature);\n\n    return feature;\n  }\n\n  addBuildingImagePlacementFeature(feature) {\n    this.buildingImagePlacementFeatures.push(feature);\n  }\n\n  removeBuildingImagePlacementFeature(feature) {\n    this.buildingImagePlacementFeatures = this.buildingImagePlacementFeatures.filter(\n      (f) => f.get(\"uuid\") !== feature.get(\"uuid\"),\n    );\n  }\n\n  getBuildingImagePlacementFeatureForUuid(uuid) {\n    return this.buildingImagePlacementFeatures.find((f) => f.get(\"uuid\") === uuid);\n  }\n\n  saveBuildingImagePlacementCoordinatesAndRotationToModel(feature) {\n    const uuid = feature.get(\"uuid\");\n    const placement = this.project.getBuildingImagePlacement(uuid);\n\n    if (!placement) {\n      console.error(\"Placement not found\");\n      debugIt();\n      return;\n    }\n\n    const coordinates = feature.getGeometry().getCoordinates();\n    const outerRing = coordinates[0].slice(0, 4);\n    const latLngs = outerRing.map((c) => coordinateToLatLngObj(c));\n\n    if (latLngs.some((p) => !Number.isFinite(p.lat) || !Number.isFinite(p.lng))) return;\n\n    placement.setLatLngPoints(latLngs);\n\n    const updatedRotation = feature.get(\"imageRotation\");\n    placement.setImageRotation(updatedRotation);\n\n    this.controller.markDirty();\n  }\n}\n", "import Feature from \"ol/Feature\";\nimport { fromLonLat } from \"ol/proj\";\nimport Polygon from \"ol/geom/Polygon\";\n\nimport { linkFeatureToModel } from \"../../da/map/modification-helpers/base\";\nimport BoundingBoxBuilder, { buildBoundingBoxFeatureFromGeometry } from \"./panel-grid/bounding-box-builder\";\nimport LayoutBuilder from \"./panel-grid/layout-builder\";\nimport ArrayBuilder from \"./panel-grid/array-builder\";\nimport DaMapModelSynchronizer from \"../../da/map/map-model-synchronizer\";\nimport { findTopLeftLonLat } from \"../../da/map/ol-geometry\";\nimport { syncRoofSectionCartesianPoints } from \"./modification-helpers/roof-section\";\nimport { logger } from \"../../helpers/app\";\nimport ObstructionsProximityDetector from \"./obstructions/proximity-detector\";\n\n// A deserialized [0, 0] is the sentinel a legacy repair task wrote, not a\n// computed offset, so it has to be recomputed like a missing one.\nfunction hasMissingGlobalCartesianOffset(model) {\n  const gco = model.globalCartesianOffset;\n\n  return gco === undefined || (gco.x === 0 && gco.y === 0);\n}\n\nexport default class MapModelSynchronizer extends DaMapModelSynchronizer {\n  featuresForDisplayableRoofPlanes() {\n    const features = super.featuresForDisplayableRoofPlanes();\n\n    // update old projects that were created before the global cartesian offset was added\n    this.project.roofPlanes.forEach((roofPlane) => {\n      if (!hasMissingGlobalCartesianOffset(roofPlane)) return;\n\n      const feature = features.find((feature) => feature.get(\"uuid\") === roofPlane.uuid);\n\n      if (feature) {\n        const latLngPoints = this.latLngPointsFromFeature(feature);\n        this.setGlobalCartesianOffset(latLngPoints, roofPlane);\n      } else {\n        debugger;\n      }\n    });\n\n    return features;\n  }\n\n  featuresForObstructions() {\n    const opd = new ObstructionsProximityDetector(this.project);\n\n    return this.project.notDeletedObstructions.map((obstruction) => {\n      if (hasMissingGlobalCartesianOffset(obstruction)) {\n        // update the global offset for obstructions that don't have them\n        this.setGlobalCartesianOffset(obstruction.latLngPoints, obstruction);\n      }\n\n      if (obstruction.needsProximityDetection) {\n        opd.findNearbyRoofPlanesAndSectionsForObstruction(obstruction);\n      }\n      return this.createFeatureForModel(obstruction);\n    });\n  }\n\n  featuresForObstructionBuffers() {\n    const obstructionBuffersFeatures = [];\n    this.project.notDeletedObstructions.forEach((obstruction) => {\n      const obstructionBuffer = obstruction.buffer;\n      if (obstructionBuffer) {\n        if (hasMissingGlobalCartesianOffset(obstructionBuffer)) {\n          // update the global offset for obstruction buffers that don't have them\n          this.setGlobalCartesianOffset(obstructionBuffer.latLngPoints, obstructionBuffer);\n        }\n        obstructionBuffersFeatures.push(this.createFeatureForModel(obstructionBuffer));\n      }\n    });\n\n    return obstructionBuffersFeatures;\n  }\n\n  featuresForObstructionSetbackBuffers() {\n    const obstructionSetbackBuffersFeatures = [];\n    this.project.notDeletedObstructions.forEach((obstruction) => {\n      const obstructionSetbackBuffer = obstruction.setbackBuffer;\n      if (obstructionSetbackBuffer) {\n        if (hasMissingGlobalCartesianOffset(obstructionSetbackBuffer)) {\n          this.setGlobalCartesianOffset(obstructionSetbackBuffer.latLngPoints, obstructionSetbackBuffer);\n        }\n        obstructionSetbackBuffersFeatures.push(this.createFeatureForModel(obstructionSetbackBuffer));\n      }\n    });\n\n    return obstructionSetbackBuffersFeatures;\n  }\n\n  featuresForArrays(limitTo, focusedRoofSection) {\n    if (limitTo === \"none\") return [];\n\n    return this.project.displayableRoofPlanes.flatMap((roofPlane) => {\n      return roofPlane.displayableRoofSections.flatMap((roofSection) => {\n        const isOtherRoofSection = limitTo === \"roofSection\" && roofSection.id !== focusedRoofSection;\n\n        // this ensures the bounding box exists\n        const boundingBoxFeature = this.roofSectionBoundingBoxFeature(roofSection);\n\n        const arrayFeatures = this.roofSectionArrayFeatures(roofSection, isOtherRoofSection);\n\n        if (this.controller.showBoundingBoxes && !isOtherRoofSection) {\n          // only display bounding box for power users (focused section only)\n          return [boundingBoxFeature].concat(arrayFeatures);\n        }\n        return arrayFeatures;\n      });\n    });\n  }\n\n  roofSectionBoundingBoxFeature(roofSection) {\n    if (\n      !roofSection.boundingBox ||\n      !roofSection.boundingBox.length ||\n      !roofSection.boundingBoxCartesianPoints ||\n      !roofSection.boundingBoxCartesianPoints.length\n    ) {\n      // This is to catch any old projects that were saved without bounding boxes\n      console.log(`creating missing BB for ${roofSection.displayIdentifier} (ID: ${roofSection.id})`);\n      const rsFeature = this.getFeatureForRoofSection(roofSection);\n      const boundingBoxBuilder = new BoundingBoxBuilder(this.project, roofSection, rsFeature);\n      boundingBoxBuilder.build();\n      roofSection.markDirty();\n      this.controller.markDirty();\n      return boundingBoxBuilder.boundingBoxFeature;\n    } else {\n      // TODO: BXNR: Switch to createFeatureForModel once they use .lat and .lng\n      logger(`using saved BB for ${roofSection.displayIdentifier} (ID: ${roofSection.id})`);\n      const coordinates = roofSection.boundingBox.map((p) => fromLonLat([p.lng, p.lat]));\n      const geometry = new Polygon([coordinates]);\n      return buildBoundingBoxFeatureFromGeometry(roofSection, geometry);\n    }\n  }\n\n  roofSectionArrayFeatures(roofSection, isOtherRoofSection = false) {\n    if (!roofSection.layout) {\n      console.log(`building missing layout for ${roofSection.displayIdentifier} (ID: ${roofSection.id})`);\n      new LayoutBuilder(this.project, roofSection).build();\n    }\n\n    const arrayBuilder = new ArrayBuilder(this.project, roofSection, isOtherRoofSection);\n    arrayBuilder.build();\n    return arrayBuilder.features;\n  }\n\n  createFeatureForModel(model) {\n    const coordinates = model.latLngPoints.map((p) => fromLonLat(p.toLonLat));\n    const geometry = new Polygon([coordinates]);\n    const feature = new Feature({ geometry });\n    linkFeatureToModel(feature, model);\n\n    return feature;\n  }\n\n  syncIdentifiersOnFeatures() {\n    super.syncIdentifiersOnFeatures();\n\n    // NOTE: This method is also used to resequence obstructions. In that case,\n    //       this section is unnecessary because roof planes have the same identifiers,\n    //       so roof sections will have the same displayIdentifiers.\n    const mapManager = this.controller.mapManager;\n    mapManager.roofSectionsFeatures.forEach((feature) => {\n      const roofSection = this.getRoofSectionForFeature(feature);\n      feature.set(\"identifier\", roofSection.displayIdentifier);\n    });\n  }\n\n  shouldSetEditorSettings() {\n    return this.controller.isRoofPlanesPage || this.controller.isRoofSectionsPage;\n  }\n\n  updateRoofSectionLatLngFromFeature(feature) {\n    super.updateRoofSectionLatLngFromFeature(feature);\n\n    const roofSection = this.getRoofSectionForFeature(feature);\n    const roofPlane = roofSection.roofPlane;\n    syncRoofSectionCartesianPoints(findTopLeftLonLat(roofPlane.latLngPoints), roofSection);\n  }\n\n  loadGuideLines() {\n    const guideLineFeatures = this.project.displayableRoofPlanes.flatMap((roofPlane) => {\n      return this.buildRoofPlaneGuideLineStringFeatures(roofPlane, { guideLinesKey: \"guideLines\" });\n    });\n\n    return guideLineFeatures;\n  }\n\n  toggleRoofPlaneGuideLineVisibility(roofPlaneIdentifier, segmentIndex) {\n    const guideLine = this.guideLineForSegmentIndex(roofPlaneIdentifier, segmentIndex);\n    guideLine.toggleVisibility();\n\n    this.controller.mapManager.reloadGuideLineFeatures();\n\n    return guideLine.visible;\n  }\n\n  setGuideLineDistance(roofPlaneIdentifier, segmentIndex, distance) {\n    this.guideLineForSegmentIndex(roofPlaneIdentifier, segmentIndex).setDistance(distance);\n    this.controller.mapManager.reloadGuideLineFeatures();\n\n    this.controller.mapManager.dispatchAfterMapFeaturesRendering({\n      calledFrom: \"BxMapModelSynchronizer#setGuideLineDistance\",\n    });\n  }\n\n  guideLineForSegmentIndex(roofPlaneIdentifier, segmentIndex) {\n    const roofPlane = this.project.getRoofPlaneForIdentifier(roofPlaneIdentifier);\n    const guideLine = roofPlane.guideLineForSegmentIndex(segmentIndex);\n    return guideLine;\n  }\n\n  showAllRoofPlaneGuideLines(roofPlaneIdentifier) {\n    this.setAllRoofPlaneGuideLinesVisibility(roofPlaneIdentifier, true);\n  }\n\n  hideAllGuideLines() {\n    this.project.displayableRoofPlanes.forEach((roofPlane) => {\n      roofPlane.guideLines.forEach((g) => g.setVisibility(false));\n    });\n  }\n\n  hideAllRoofPlaneGuideLines(roofPlaneIdentifier) {\n    this.setAllRoofPlaneGuideLinesVisibility(roofPlaneIdentifier, false);\n  }\n\n  setAllRoofPlaneGuideLinesVisibility(roofPlaneIdentifier, visible) {\n    const roofPlane = this.project.getRoofPlaneForIdentifier(roofPlaneIdentifier);\n    roofPlane.guideLines.forEach((g) => g.setVisibility(visible));\n    this.controller.mapManager.reloadGuideLineFeatures();\n  }\n\n  showOnlyRoofPlaneGuideLines(roofPlaneIdentifier) {\n    this.project.displayableRoofPlanes.forEach((roofPlane) => {\n      const displayed = roofPlane.identifier === roofPlaneIdentifier;\n      roofPlane.guideLines.forEach((g) => g.setDisplayed(displayed));\n    });\n    this.controller.mapManager.reloadGuideLineFeatures();\n  }\n}\n", "import { getSnapshot, types } from \"mobx-state-tree\";\nimport sumBy from \"lodash/sumBy\";\n\nimport ProjectSiteModel from \"./project-site-model\";\nimport { buildAlphabeticalIdentifier } from \"../../helpers/identifier-builder\";\nimport WithDirtyTracking from \"./with-dirty-tracking\";\nimport CoordinateModel from \"./coordinate-model\";\nimport UploadedBuildingImageModel from \"./uploaded-building-image-model\";\n\n// Meant to be an abstract project class\n// assumes that child classes will have roofPlanes of the appropriate type\nconst DaProjectModelBase = types\n  .model(\"DaProjectModel\", {\n    id: types.maybe(types.integer),\n    name: types.maybe(types.string),\n    type: types.string,\n    projectSite: ProjectSiteModel,\n    detailId: types.number,\n    panelWidth: types.number,\n    panelLength: types.number,\n    panelWattage: types.number,\n    interRowSpacing: types.number,\n    interColumnSpacing: types.number,\n    powerUser: false,\n    saving: false,\n    drawingCoordinates: types.array(CoordinateModel),\n    uploadedBuildingImages: types.array(UploadedBuildingImageModel),\n  })\n  .views((self) => ({\n    get roofPlanesWithDefaultRoofSections() {\n      return self.roofPlanes.filter((rp) => rp.hasDefaultRoofSections);\n    },\n    getRoofPlane(uuid) {\n      return self.roofPlanes.find((roofPlane) => roofPlane.uuid === uuid);\n    },\n    getRoofPlaneForIdentifier(identifier) {\n      return self.roofPlanes.find((roofPlane) => roofPlane.identifier === identifier);\n    },\n    getRoofSection(uuid) {\n      return self.roofPlanes\n        .map((roofPlane) => {\n          return roofPlane.getRoofSection(uuid);\n        })\n        .find((roofSection) => roofSection !== undefined);\n    },\n    getUploadedBuildingImage(id) {\n      return self.uploadedBuildingImages.find((ubi) => ubi.id === id);\n    },\n    getNextSequentialRoofPlaneIdentifier() {\n      const numActiveRoofPlanes = self.roofPlanes.filter((rp) => !rp.deleted).length;\n      const identifier = buildAlphabeticalIdentifier(numActiveRoofPlanes);\n      return identifier;\n    },\n    get displayableRoofPlanes() {\n      return self.roofPlanes.filter((rp) => rp.displayable);\n    },\n    get notDeletedRoofPlanes() {\n      return self.roofPlanes.filter((rp) => rp.notDeleted);\n    },\n    get anyRoofPlaneNeedsSave() {\n      return self.roofPlanes.some((rp) => rp.needsSave);\n    },\n    get anyUploadedBuildingImageNeedsSave() {\n      return self.uploadedBuildingImages.some((ubi) => ubi.needsSave);\n    },\n    get hasDetailAndNeedsSave() {\n      if (self.detail) {\n        // Only the PR subclass of project has a detail\n        return self.detail.needsSave;\n      } else {\n        return false;\n      }\n    },\n    get needsSave() {\n      return (\n        self.dirty ||\n        self.projectSite.needsSave ||\n        self.hasDetailAndNeedsSave ||\n        self.anyRoofPlaneNeedsSave ||\n        self.anyUploadedBuildingImageNeedsSave\n      );\n    },\n    get panelsCount() {\n      return sumBy(self.notDeletedRoofPlanes, \"panelsCount\");\n    },\n    deletedRoofPlane(roofPlaneUuid) {\n      return self.deletedRoofPlanes.find((drp) => drp.uuid === roofPlaneUuid);\n    },\n    get isBX() {\n      return self.type === \"Bx::Project\";\n    },\n    get buildingImagePlacements() {\n      return self.uploadedBuildingImages.flatMap((ubi) => {\n        return ubi.buildingImagePlacements;\n      });\n    },\n    get notDeletedBuildingImagePlacements() {\n      return self.buildingImagePlacements.filter((bip) => !bip.deleted);\n    },\n    getBuildingImagePlacement(uuid) {\n      return self.buildingImagePlacements.find((bip) => bip.uuid === uuid);\n    },\n  }))\n  .actions((self) => ({\n    setName(name) {\n      self.name = name;\n    },\n    setDirty(dirty) {\n      self.dirty = dirty;\n    },\n    setSaving() {\n      self.saving = true;\n    },\n    setNotSaving() {\n      self.saving = false;\n    },\n    destroyRoofPlane(roofPlane) {\n      self.snapshotRoofPlaneDeletion(roofPlane);\n      roofPlane.destroyRoofSections();\n      self.roofPlanes.remove(roofPlane);\n    },\n    snapshotRoofPlaneDeletion(roofPlane) {\n      roofPlane.setDeletedAt();\n      self.deletedRoofPlanes.push(getSnapshot(roofPlane));\n    },\n    resequenceRoofPlanesIdentifiers() {\n      const notDeletedRoofPlanes = self.roofPlanes\n        .slice()\n        .sort((a, b) => a.identifier.localeCompare(b.identifier))\n        .filter((rp) => !rp.deleted);\n      notDeletedRoofPlanes.forEach((rp, i) => {\n        rp.setIdentifier(buildAlphabeticalIdentifier(i));\n      });\n    },\n    addDrawingCoordinate(coordinate) {\n      const model = CoordinateModel.createFromCoordinate(coordinate);\n      self.drawingCoordinates.push(model);\n      return model;\n    },\n    clearDrawingCoordinates() {\n      self.drawingCoordinates = [];\n    },\n    addUploadedBuildingImage(uploadedBuildingImage) {\n      const model = UploadedBuildingImageModel.create(uploadedBuildingImage);\n      self.uploadedBuildingImages.push(model);\n      return model;\n    },\n    destroyBuildingImagePlacement(uuid) {\n      const placement = self.getBuildingImagePlacement(uuid);\n      placement.uploadedBuildingImage.destroyPlacement(placement);\n      self.markDirty();\n    },\n    destroyUploadedBuildingImage(id) {\n      self.uploadedBuildingImages = self.uploadedBuildingImages.filter((ubi) => ubi.id !== id);\n    },\n  }));\n\nconst DaProjectModel = types.compose(DaProjectModelBase, WithDirtyTracking);\nexport default DaProjectModel;\n", "import { types, getParent } from \"mobx-state-tree\";\n\nimport * as Api from \"../../helpers/api-mobx\";\nimport { logger } from \"../../helpers/logger\";\nimport WithDirtyTracking from \"./with-dirty-tracking\";\n\nconst ProjectSiteBase = types\n  .model(\"ProjectSiteModel\", {\n    id: types.integer,\n    lat: types.number,\n    lng: types.number,\n    zoom: types.number,\n    viewerLat: types.maybeNull(types.number),\n    viewerLng: types.maybeNull(types.number),\n    viewerZoom: types.maybeNull(types.number),\n    viewerRotation: types.maybeNull(types.number),\n    editorLat: types.maybeNull(types.number),\n    editorLng: types.maybeNull(types.number),\n    editorZoom: types.maybeNull(types.number),\n    editorRotation: types.maybeNull(types.number),\n    // Keeping track of location and zoom values that only show on the map and do not get persisted\n    unpersistedLat: types.maybeNull(types.number),\n    unpersistedLng: types.maybeNull(types.number),\n    unpersistedZoom: types.maybeNull(types.number),\n    unpersistedRotation: types.maybeNull(types.number),\n  })\n  .views((self) => ({\n    get project() {\n      return getParent(self, 1);\n    },\n    get effectiveViewerLat() {\n      return self.viewerLat || self.lat;\n    },\n    get effectiveViewerLng() {\n      return self.viewerLng || self.lng;\n    },\n    get effectiveViewerZoom() {\n      return self.viewerZoom || self.zoom;\n    },\n    get effectiveViewerRotation() {\n      return self.viewerRotation || 0.0;\n    },\n    get effectiveEditorLat() {\n      return self.editorLat || self.lat;\n    },\n    get effectiveEditorLng() {\n      return self.editorLng || self.lng;\n    },\n    get effectiveEditorZoom() {\n      return self.editorZoom || self.zoom;\n    },\n    get effectiveEditorRotation() {\n      return self.editorRotation || 0.0;\n    },\n    get needsSave() {\n      return self.dirty;\n    },\n  }))\n  .actions((self) => ({\n    setViewerSettings({ lat, lng, zoom, rotation }) {\n      self.markDirty();\n\n      self.viewerLat = lat;\n      self.viewerLng = lng;\n      self.viewerZoom = zoom;\n      self.viewerRotation = rotation;\n    },\n    setEditorSettings({ lat, lng, zoom, rotation }) {\n      self.markDirty();\n\n      self.editorLat = lat;\n      self.editorLng = lng;\n      self.editorZoom = zoom;\n      self.editorRotation = rotation;\n    },\n    setUnpersistedSettings({ lat, lng, zoom, rotation }) {\n      self.unpersistedLat = lat;\n      self.unpersistedLng = lng;\n      self.unpersistedZoom = zoom;\n      self.unpersistedRotation = rotation;\n    },\n    save({ path, onSuccess, onValidationError = () => {}, onServerError = () => {} }) {\n      logger(`Direct save of Project Site #${self.id}`);\n\n      if (!self.needsSave) {\n        logger(\"--!needsSave. Skipping\");\n        onSuccess(undefined);\n        return undefined;\n      }\n\n      const payload = persistenceData(self);\n      return Api.put({ model: self, path, body: payload, onSuccess, onValidationError, onServerError });\n    },\n  }));\n\nfunction persistenceData(projectSite) {\n  return {\n    project_site: projectSitePersistenceData(projectSite),\n  };\n}\n\nexport function projectSitePersistenceData(projectSite) {\n  logger(`Persisting Project Site #${projectSite.id}`);\n\n  if (!projectSite.needsSave) {\n    logger(\"--!needsSave. Skipping\");\n    return undefined;\n  }\n\n  return {\n    id: projectSite.id,\n    viewer_lat: projectSite.effectiveViewerLat,\n    viewer_lng: projectSite.effectiveViewerLng,\n    viewer_zoom: projectSite.effectiveViewerZoom,\n    viewer_rotation: projectSite.effectiveViewerRotation,\n    editor_lat: projectSite.effectiveEditorLat,\n    editor_lng: projectSite.effectiveEditorLng,\n    editor_zoom: projectSite.effectiveEditorZoom,\n    editor_rotation: projectSite.effectiveEditorRotation,\n  };\n}\n\nconst ProjectSiteModel = types.compose(ProjectSiteBase, WithDirtyTracking);\nexport default ProjectSiteModel;\n", "import { types } from \"mobx-state-tree\";\n\nconst CoordinateModel = types\n  .model(\"CoordinateModel\", {\n    y: types.number,\n    x: types.number,\n  })\n  .views((self) => ({\n    get toCoordinate() {\n      return [self.y, self.x];\n    },\n  }));\n\nCoordinateModel.createFromCoordinate = (coordinate) => {\n  return CoordinateModel.create({ x: coordinate[1], y: coordinate[0] });\n};\n\nexport default CoordinateModel;\n", "import { types } from \"mobx-state-tree\";\n\nimport LatLngModel from \"./lat-lng-model\";\n\nconst WithLatLngPoints = types\n  .model({\n    latLngPoints: types.array(LatLngModel),\n    // Any model that uses WithLatLngPoints must respond to markDirty()\n  })\n  .views((self) => ({\n    get latLngPointsToArray() {\n      return self.latLngPoints.map((point) => point.toLatLng);\n    },\n    get latLngPointsToString() {\n      return JSON.stringify(self.latLngPointsToArray);\n    },\n    get lineSegmentsLength() {\n      return self.latLngPoints.length - 1;\n    },\n  }))\n  .actions((self) => ({\n    shiftLatLngPointsByDelta(latDelta, lngDelta) {\n      self.markDirty();\n      shiftPointsDelta(self.latLngPoints, latDelta, lngDelta);\n    },\n    setLatLngPoints(newPoints) {\n      const oldLatLngPointsString = JSON.stringify(self.latLngPoints);\n      const newLatLngPointsString = JSON.stringify(newPoints);\n      if (oldLatLngPointsString === newLatLngPointsString) return;\n\n      self.markDirty();\n      self.latLngPoints = newPoints;\n    },\n  }));\n\nfunction shiftPointsDelta(points, latDelta, lngDelta) {\n  points.forEach((point) => {\n    point.lat += latDelta;\n    point.lng += lngDelta;\n  });\n}\n\nexport default WithLatLngPoints;\n", "import { logger } from \"../../helpers/logger\";\n\nexport function pointsForSave(model, pointsSelector) {\n  if (model.deleted) {\n    logger(`--Deleted. Blanking ${pointsSelector}`);\n    return \"[]\";\n  } else if (model.dirty) {\n    const points = model[`${pointsSelector}ToArray`];\n    const sanitized = sanitizePoints(points);\n    return JSON.stringify(sanitized);\n  } else {\n    logger(`--Not dirty. Omitting ${pointsSelector}`);\n    return undefined;\n  }\n}\n\nfunction sanitizePoints(points) {\n  return points.map((point) => point.map((v) => (Number.isFinite(v) ? v : 0)));\n}\n", "import { getParent, types } from \"mobx-state-tree\";\n\nimport WithLatLngPoints from \"./with-lat-lng-points\";\nimport WithDirtyTracking from \"./with-dirty-tracking\";\nimport { pointsForSave } from \"./points-utilities\";\n\nconst BuildingImagePlacementBase = types\n  .model(\"BuildingImagePlacementModel\", {\n    id: types.maybe(types.integer),\n    uuid: types.identifier,\n    uploadedBuildingImageId: types.maybe(types.integer),\n    imageRotation: types.optional(types.number, 0),\n    feetPerPixel: types.maybeNull(types.number),\n  })\n  .views((self) => ({\n    get needsSave() {\n      return self.dirty;\n    },\n    get uploadedBuildingImage() {\n      return getParent(self, 2);\n    },\n    get imagePath() {\n      return self.uploadedBuildingImage.imagePath;\n    },\n    get isPersisted() {\n      return !!self.id;\n    },\n    get width() {\n      return self.uploadedBuildingImage.width;\n    },\n    get height() {\n      return self.uploadedBuildingImage.height;\n    },\n  }))\n  .actions((self) => ({\n    flagDeleted() {\n      if (self.deleted) return;\n\n      self.deleted = true;\n      self.markDirty();\n    },\n    setImageRotation(imageRotation) {\n      self.imageRotation = imageRotation;\n      self.markDirty();\n    },\n  }));\n\nexport function buildingImagePlacementPersistenceData(buildingImagePlacement) {\n  const latLngPoints = pointsForSave(buildingImagePlacement, \"latLngPoints\");\n  const result = {\n    uuid: buildingImagePlacement.uuid,\n    id: buildingImagePlacement.id,\n    lat_lng_points: latLngPoints,\n    image_rotation: buildingImagePlacement.imageRotation,\n    uploaded_building_image_id: buildingImagePlacement.uploadedBuildingImageId,\n    feet_per_pixel: buildingImagePlacement.feetPerPixel,\n    _destroy: buildingImagePlacement.deleted,\n  };\n\n  return result;\n}\n\nconst BuildingImagePlacementModel = types.compose(BuildingImagePlacementBase, WithLatLngPoints, WithDirtyTracking);\nexport default BuildingImagePlacementModel;\n", "import { types } from \"mobx-state-tree\";\nimport WithDirtyTracking from \"./with-dirty-tracking\";\nimport BuildingImagePlacementModel, { buildingImagePlacementPersistenceData } from \"./building-image-placement-model\";\nimport { v4 as uuid } from \"uuid\";\n\nconst UploadedBuildingImageBase = types\n  .model(\"UploadedBuildingImageModel\", {\n    id: types.maybe(types.integer),\n    imagePath: types.string,\n    width: types.number,\n    height: types.number,\n    buildingImagePlacements: types.array(BuildingImagePlacementModel),\n  })\n  .views((self) => ({\n    get project() {\n      return getParent(self, 1);\n    },\n    get needsSave() {\n      return self.dirty || self.buildingImagePlacements.some((bip) => bip.needsSave);\n    },\n  }))\n  .actions((self) => ({\n    addBuildingImagePlacement({ latLngPoints, feetPerPixel }) {\n      const model = BuildingImagePlacementModel.create({\n        uploadedBuildingImageId: self.id,\n        uuid: uuid(),\n        latLngPoints,\n        feetPerPixel,\n        dirty: true,\n      });\n\n      self.buildingImagePlacements.push(model);\n      self.markDirty();\n\n      return model;\n    },\n    destroyPlacement(placement) {\n      if (placement.isPersisted) {\n        placement.flagDeleted();\n      } else {\n        self.buildingImagePlacements = self.buildingImagePlacements.filter((bip) => bip.uuid !== placement.uuid);\n      }\n      self.markDirty();\n    },\n  }));\n\nexport function uploadedBuildingImagePersistenceData(uploadedBuildingImage) {\n  const result = {\n    id: uploadedBuildingImage.id,\n    building_image_placements_attributes: [],\n  };\n\n  uploadedBuildingImage.buildingImagePlacements.forEach((bip) => {\n    if (!bip.needsSave) return;\n\n    result.building_image_placements_attributes.push(buildingImagePlacementPersistenceData(bip));\n  });\n\n  return result;\n}\n\nconst UploadedBuildingImageModel = types.compose(UploadedBuildingImageBase, WithDirtyTracking);\nexport default UploadedBuildingImageModel;\n", "import { types, getParent } from \"mobx-state-tree\";\n\nimport WithLatLngPoints from \"./with-lat-lng-points\";\nimport WithDirtyTracking from \"./with-dirty-tracking\";\n\nimport { ROOF_SECTION_DATA_TYPE } from \"../map/data-types\";\n\nconst RoofSectionBase = types\n  .model(\"RoofSectionModel\", {\n    uuid: types.identifier,\n    id: types.maybe(types.integer),\n    deleted: types.optional(types.boolean, false),\n    identifier: types.optional(types.integer, 1),\n    illegalShape: types.optional(types.boolean, false),\n    encroaching: types.optional(types.boolean, false),\n    display: types.optional(types.boolean, true),\n  })\n  .views((self) => ({\n    get roofPlane() {\n      return getParent(self, 2);\n    },\n    get dataType() {\n      return ROOF_SECTION_DATA_TYPE;\n    },\n    get notDeleted() {\n      return !self.deleted;\n    },\n  }))\n  .actions((self) => ({\n    setIllegalShape(legality) {\n      if (self.illegalShape === legality) return;\n\n      self.markDirty();\n      self.illegalShape = legality;\n    },\n    setIdentifier(newIdentifier) {\n      if (self.identifier === newIdentifier) return;\n\n      self.markDirty();\n      self.identifier = newIdentifier;\n    },\n    setEncroaching(status) {\n      if (self.encroaching === status) return;\n\n      self.markDirty();\n      self.encroaching = status;\n    },\n  }));\n\nconst DaRoofSectionModel = types.compose(RoofSectionBase, WithLatLngPoints, WithDirtyTracking);\nexport default DaRoofSectionModel;\n", "import { types } from \"mobx-state-tree\";\n\nimport CartesianModel from \"./cartesian-model\";\n\nconst WithCartesianPoints = types\n  .model({\n    cartesianPoints: types.array(CartesianModel),\n    // Any model that uses WithCartesianPoints must respond to markDirty()\n  })\n  .views((self) => ({\n    get cartesianPointsToArray() {\n      return self.cartesianPoints.map((point) => point.toArray);\n    },\n    get cartesianPointsToString() {\n      return JSON.stringify(self.cartesianPointsToArray);\n    },\n  }))\n  .actions((self) => ({\n    setCartesianPoints(newPoints) {\n      const oldCartesianPointsString = JSON.stringify(self.cartesianPoints);\n      const newCartesianPointsString = JSON.stringify(newPoints);\n      if (oldCartesianPointsString === newCartesianPointsString) return;\n\n      self.markDirty();\n      self.cartesianPoints = newPoints;\n    },\n  }));\n\nexport default WithCartesianPoints;\n", "import { toJS } from \"mobx\";\nimport { types } from \"mobx-state-tree\";\n\nimport LayoutModel, { layoutPersistenceData } from \"./layout-model\";\nimport LatLngModel from \"../../da/models/lat-lng-model\";\nimport CartesianModel from \"../../da/models/cartesian-model\";\n\nimport { logger } from \"../../helpers/app\";\n\nimport DaRoofSectionModel from \"../../da/models/roof-section-model\";\nimport WithCartesianPoints from \"../../da/models/with-cartesian-points\";\n\nconst RoofSectionBase = types\n  .model(\"RoofSectionModel\", {\n    azimuth: types.number, // in degrees\n    custom: types.boolean,\n    active: types.boolean,\n    layout: types.maybe(LayoutModel),\n    boundingBox: types.array(LatLngModel),\n    boundingBoxCartesianPoints: types.array(CartesianModel),\n    offset: LatLngModel,\n    offsetCartesianPoint: CartesianModel,\n    fresh: types.optional(types.boolean, true),\n    cellsWithErrors: types.optional(types.boolean, false),\n  })\n  .views((self) => ({\n    get displayIdentifier() {\n      let prefix = \"\";\n      if (!self.active) prefix = \"Inactive-\";\n      if (self.deleted) prefix = \"Deleted-\";\n\n      return `${prefix}${self.roofPlane.identifier}${self.identifier}`;\n    },\n    get isDefault() {\n      return !self.custom;\n    },\n    get isStale() {\n      return !self.fresh;\n    },\n    get displayable() {\n      return !self.deleted && self.active && self.display;\n    },\n    get boundingBoxToString() {\n      if (!self.boundingBox) return \"[]\";\n\n      const boundingBoxArray = self.boundingBox.map((point) => point.toLatLng);\n      return JSON.stringify(boundingBoxArray);\n    },\n    get boundingBoxCartesianPointsToArray() {\n      if (!self.boundingBoxCartesianPoints) return [];\n\n      return self.boundingBoxCartesianPoints.map((point) => point.toArray);\n    },\n    get boundingBoxCartesianPointsToString() {\n      if (!self.boundingBoxCartesianPoints) return \"[]\";\n\n      return JSON.stringify(self.boundingBoxCartesianPointsToArray);\n    },\n    get needsSave() {\n      return self.dirty || !self.id || (self.layout && self.layout.needsSave);\n    },\n    get panelsPresent() {\n      if (self.deleted || !self.active || !self.layout) return 0;\n      return self.layout.panelsPresent;\n    },\n    get wattage() {\n      // don't need to worry about checking deleted, active, or not layout since panelsPresent will be 0 if any are\n      return self.panelsPresent * self.roofPlane.panelWattage;\n    },\n    get interRowSpacing() {\n      return self.roofPlane.interRowSpacing;\n    },\n    get interColumnSpacing() {\n      return self.roofPlane.interColumnSpacing;\n    },\n    get isDeficientLayout() {\n      return self.active && (self.layout === undefined || self.layout.deleted || self.layout.isDeficient);\n    },\n  }))\n  .actions((self) => ({\n    flagDeleted() {\n      if (self.deleted && !self.active) return;\n\n      self.markDirty();\n      self.deleted = true;\n      self.active = false;\n      self.deleteLayout();\n    },\n    deactivate() {\n      if (!self.active) return;\n\n      self.markDirty();\n      self.active = false;\n      self.illegalShape = false;\n      self.deleteLayout();\n    },\n    deleteLayout() {\n      if (!self.layout) return;\n\n      if (self.layout.isPersisted) {\n        self.layout.flagDeleted();\n      } else {\n        self.markDirty();\n        self.layout = undefined;\n      }\n    },\n    activate() {\n      if (self.active) return;\n\n      self.markDirty();\n      self.active = true;\n    },\n    setAzimuth(newAzimuth) {\n      if (self.azimuth === newAzimuth) return;\n\n      self.markDirty();\n      self.azimuth = newAzimuth;\n    },\n    setBoundingBox(newBoundingBox) {\n      const oldBoundingBoxString = JSON.stringify(self.boundingBox);\n      const newBoundingBoxString = JSON.stringify(newBoundingBox);\n      if (oldBoundingBoxString === newBoundingBoxString) return;\n\n      self.markDirty();\n      self.boundingBox = newBoundingBox;\n    },\n    setBoundingBoxCartesianPoints(newBoundingBoxCartesianPoints) {\n      const oldBoundingBoxCartesianPointsString = JSON.stringify(self.boundingBoxCartesianPoints);\n      const newBoundingBoxCartesianPointsString = JSON.stringify(newBoundingBoxCartesianPoints);\n      if (oldBoundingBoxCartesianPointsString === newBoundingBoxCartesianPointsString) return;\n\n      self.markDirty();\n      self.boundingBoxCartesianPoints = newBoundingBoxCartesianPoints;\n    },\n    shiftBoundingBoxByDelta(deltaLat, deltaLng) {\n      self.markDirty();\n      self.boundingBox.forEach((point) => {\n        point.lat += deltaLat;\n        point.lng += deltaLng;\n      });\n    },\n    addLayout(rows, columns, design, fresh, cellErrorPositions) {\n      self.markDirty();\n\n      const cloneCellErrorPositions = toJS(cellErrorPositions);\n\n      self.layout = LayoutModel.create({\n        rows,\n        columns,\n        design,\n        fresh,\n        cellErrorPositions: cloneCellErrorPositions,\n      });\n      self.layout.setupCells();\n    },\n    copyLayoutFrom(otherRoofSection) {\n      const otherLayout = otherRoofSection.layout;\n\n      if (otherLayout) {\n        self.addLayout(\n          otherLayout.rows,\n          otherLayout.columns,\n          otherLayout.design,\n          otherLayout.fresh,\n          otherLayout.cellErrorPositions,\n        );\n      }\n    },\n    adjustOffset(offsetDelta, offsetCartesianDelta) {\n      self.markDirty();\n      self.offset.lat += offsetDelta.lat;\n      self.offset.lng += offsetDelta.lng;\n      self.offsetCartesianPoint.x += offsetCartesianDelta.x;\n      self.offsetCartesianPoint.y += offsetCartesianDelta.y;\n    },\n    resetOffset() {\n      if (self.offset.lat === 0 && self.offset.lng === 0) return;\n\n      self.markDirty();\n      self.offset.lat = 0;\n      self.offset.lng = 0;\n      self.offsetCartesianPoint.x = 0;\n      self.offsetCartesianPoint.y = 0;\n    },\n    applyUpdatesReturnedBySave(json) {\n      if (json) {\n        self.cellsWithErrors = json[\"cellsWithErrors\"];\n      }\n\n      if (self.layout) {\n        self.layout.setupCells();\n      }\n    },\n    freshen() {\n      if (self.fresh) return;\n\n      self.markDirty();\n      self.fresh = true;\n    },\n  }));\n\nexport function roofSectionPersistenceData(roofSection) {\n  logger(`Persisting Roof Section ${roofSection.displayIdentifier}`);\n\n  if (!roofSection.needsSave) {\n    logger(\"--!needsSave. Skipping.\");\n    return undefined;\n  }\n\n  const [latLngPoints, boundingBox, boundingBoxCartesianPoints, cartesianPoints] = pointsForSave(roofSection);\n\n  let layout_attributes;\n  let clearLayout;\n\n  if (roofSection.layout) {\n    layout_attributes = layoutPersistenceData(roofSection.layout);\n  } else {\n    clearLayout = true;\n  }\n\n  return {\n    bx_roof_plane_id: roofSection.roofPlane.id,\n    uuid: roofSection.uuid,\n    id: roofSection.id,\n    azimuth: roofSection.azimuth,\n    identifier: roofSection.identifier,\n    custom: roofSection.custom,\n    active: roofSection.active,\n    illegal_shape: roofSection.illegalShape,\n    encroaching: roofSection.encroaching,\n    lat_lng_points: latLngPoints,\n    cartesian_points: cartesianPoints,\n    bounding_box: boundingBox,\n    bounding_box_cartesian_points: boundingBoxCartesianPoints,\n    offset_lat: roofSection.offset.lat,\n    offset_lng: roofSection.offset.lng,\n    offset_y: roofSection.offsetCartesianPoint.y,\n    offset_x: roofSection.offsetCartesianPoint.x,\n    fresh: roofSection.fresh,\n    _destroy: roofSection.deleted,\n    // only 1 of these two will be something other than undefined\n    clear_layout: clearLayout,\n    layout_attributes,\n  };\n}\n\nfunction pointsForSave(roofSection) {\n  let latLngPoints;\n  let boundingBox;\n  let boundingBoxCartesianPoints;\n  let cartesianPoints;\n\n  if (roofSection.deleted) {\n    logger(\"--Deleted. Blanking latLng & boundingBox\");\n    latLngPoints = \"[]\";\n    boundingBox = \"[]\";\n    boundingBoxCartesianPoints = \"[]\";\n    cartesianPoints = \"[]\";\n  } else if (roofSection.dirty) {\n    latLngPoints = roofSection.latLngPointsToString;\n    if (roofSection.active) {\n      boundingBox = roofSection.boundingBoxToString;\n      boundingBoxCartesianPoints = roofSection.boundingBoxCartesianPointsToString;\n    } else {\n      logger(\"--Not active. Blanking boundingBox\");\n      boundingBox = \"[]\";\n      boundingBoxCartesianPoints = \"[]\";\n    }\n    cartesianPoints = roofSection.cartesianPointsToString;\n  } else {\n    logger(\"--Not dirty. Omitting latLng & boundingBox\");\n    latLngPoints = undefined;\n    boundingBox = undefined;\n    boundingBoxCartesianPoints = undefined;\n    cartesianPoints = undefined;\n  }\n\n  return [latLngPoints, boundingBox, boundingBoxCartesianPoints, cartesianPoints];\n}\n\nconst RoofSectionModel = types.compose(DaRoofSectionModel, WithCartesianPoints, RoofSectionBase);\nexport default RoofSectionModel;\n", "import { types, getParent } from \"mobx-state-tree\";\n\nimport WithLatLngPoints from \"./with-lat-lng-points\";\nimport WithDirtyTracking from \"./with-dirty-tracking\";\n\nimport { ROOF_PLANE_DATA_TYPE } from \"../map/data-types\";\n\nimport { logger } from \"../../helpers/logger\";\n\nconst DaRoofPlaneModelBase = types\n  .model(\"RoofPlaneModel\", {\n    uuid: types.identifier,\n    id: types.maybe(types.integer),\n    deleted: types.optional(types.boolean, false),\n    identifier: types.optional(types.string, \"\"),\n    display: types.optional(types.boolean, true),\n    illegalShape: types.optional(types.boolean, false),\n    setback: types.maybe(types.number),\n    deletedAt: types.maybeNull(types.Date),\n  })\n  .views((self) => ({\n    get baseNeedsSave() {\n      const anyRoofSectionsNeedsSave = self.roofSections.some((rs) => rs.needsSave);\n      return self.dirty || !self.id || anyRoofSectionsNeedsSave;\n    },\n    get defaultRoofSections() {\n      return self.roofSections.filter((roofSection) => !roofSection.custom && !roofSection.deleted);\n    },\n    get notDeletedRoofSections() {\n      return self.roofSections.filter((roofSection) => !roofSection.deleted);\n    },\n    get hasDefaultRoofSections() {\n      return self.defaultRoofSections.length > 0;\n    },\n    get activeRoofSections() {\n      return self.roofSections.filter((rs) => rs.active);\n    },\n    get hasActiveRoofSections() {\n      return self.activeRoofSections.length > 0;\n    },\n    get project() {\n      return getParent(self, 2);\n    },\n    getRoofSection(uuid) {\n      return self.roofSections.find((roofSection) => roofSection.uuid === uuid);\n    },\n    get dataType() {\n      return ROOF_PLANE_DATA_TYPE;\n    },\n    get displayIdentifier() {\n      return self.identifier;\n    },\n    get displayable() {\n      return !self.deleted && self.display;\n    },\n    get notDeleted() {\n      return !self.deleted;\n    },\n    getNextSequentialRoofSectionIdentifier() {\n      const numActiveRoofSections = self.roofSections.filter((rs) => rs.active).length;\n      return numActiveRoofSections + 1;\n    },\n    get hasIllegalRoofSections() {\n      return self.roofSections.some((rs) => rs.illegalShape);\n    },\n    get displayableRoofSections() {\n      return self.roofSections.filter((rs) => rs.displayable);\n    },\n  }))\n  .actions((self) => ({\n    setIllegalShape(legality) {\n      if (self.illegalShape === legality) return;\n\n      self.markDirty();\n      self.illegalShape = legality;\n    },\n    setIdentifier(newIdentifier) {\n      if (self.identifier === newIdentifier) return;\n\n      self.markDirty();\n      self.identifier = newIdentifier;\n    },\n    destroyRoofSections() {\n      self.roofSections.forEach((rs) => self.destroyRoofSection(rs));\n    },\n    destroyRoofSection(roofSection) {\n      self.roofSections.remove(roofSection);\n    },\n    resequenceRoofSectionsIdentifiers() {\n      const notDeletedRoofSections = self.roofSections\n        .slice()\n        .sort((rs) => rs.identifier)\n        .filter((rs) => !rs.deleted && rs.active);\n      notDeletedRoofSections.forEach((rs, i) => {\n        rs.setIdentifier(i + 1);\n      });\n    },\n    setDeletedAt() {\n      self.deletedAt = new Date();\n    },\n  }));\n\nconst DaRoofPlaneModel = types.compose(DaRoofPlaneModelBase, WithLatLngPoints, WithDirtyTracking);\nexport default DaRoofPlaneModel;\n", "import { types } from \"mobx-state-tree\";\n\nimport WithDirtyTracking from \"../../models/with-dirty-tracking\";\n\nconst GuideLineModelBase = types\n  .model(\"GuideLineModel\", {\n    segmentIndex: types.number,\n    visible: types.boolean,\n    distance: types.number,\n    displayed: types.optional(types.boolean, true),\n  })\n  .views((self) => ({\n    get needsSave() {\n      return self.dirty;\n    },\n  }))\n  .actions((self) => ({\n    setVisibility(visible) {\n      if (self.visible === visible) return;\n\n      self.markDirty();\n      self.visible = visible;\n    },\n    toggleVisibility() {\n      self.setVisibility(!self.visible);\n    },\n    setDisplayed(displayed) {\n      self.displayed = displayed;\n    },\n    setDistance(distance) {\n      if (self.distance === distance) return;\n\n      self.markDirty();\n      self.distance = distance;\n    },\n  }));\n\nexport function guideLinePersistenceData(guideLine) {\n  return {\n    segment_index: guideLine.segmentIndex,\n    visible: guideLine.visible,\n    distance: guideLine.distance,\n  };\n}\n\nconst GuideLineModel = types.compose(GuideLineModelBase, WithDirtyTracking);\nexport default GuideLineModel;\n", "import { types } from \"mobx-state-tree\";\nimport { v4 as uuid } from \"uuid\";\n\nimport RoofSectionModel, { roofSectionPersistenceData } from \"./roof-section-model\";\nimport LatLngModel from \"../../da/models/lat-lng-model\";\nimport DaRoofPlaneModel from \"../../da/models/roof-plane-model\";\nimport { pointsForSave } from \"../../da/models/points-utilities\";\nimport GuideLineModel, { guideLinePersistenceData } from \"../../da/map/models/guide-line-model\";\nimport WithCartesianPoints from \"../../da/models/with-cartesian-points\";\nimport CartesianModel from \"../../da/models/cartesian-model\";\n\nimport { logger } from \"../../helpers/app\";\n\nconst RoofPlaneBase = types\n  .model(\"RoofPlaneModel\", {\n    roofSections: types.array(RoofSectionModel),\n    guideLines: types.array(GuideLineModel),\n    globalCartesianOffset: types.maybe(CartesianModel),\n  })\n  .views((self) => ({\n    get customRoofSections() {\n      return self.roofSections.filter((roofSection) => roofSection.custom && !roofSection.deleted);\n    },\n    get hasCustomRoofSections() {\n      return self.customRoofSections.length > 0;\n    },\n    get isRoofSectionRequired() {\n      return !self.hasActiveRoofSections && self.hasDefaultRoofSections;\n    },\n    get hasInactiveDefaultRoofSections() {\n      return self.defaultRoofSections.some((rs) => !rs.active);\n    },\n    get panelsPresent() {\n      if (self.deleted) return 0;\n\n      return self.roofSections.reduce((count, roofSection) => {\n        return count + roofSection.panelsPresent;\n      }, 0);\n    },\n    get panelWattage() {\n      return self.project.panelWattage;\n    },\n    get wattage() {\n      // don't need to worry about checking deleted since panelsPresent will be 0 if it is\n      return self.panelsPresent * self.panelWattage;\n    },\n    get interRowSpacing() {\n      return self.project.interRowSpacing;\n    },\n    get interColumnSpacing() {\n      return self.project.interColumnSpacing;\n    },\n    guideLineForSegmentIndex(segmentIndex) {\n      return self.guideLines.find((sg) => sg.segmentIndex === segmentIndex);\n    },\n    get needsSave() {\n      const anyGuideLinesNeedSave = self.guideLines.some((sg) => sg.needsSave);\n      return self.baseNeedsSave || anyGuideLinesNeedSave;\n    },\n  }))\n  .actions((self) => ({\n    addRoofSection(params) {\n      const defaultParams = {\n        uuid: uuid(),\n        azimuth: self.project.azimuth,\n        custom: true,\n        active: true,\n        identifier: self.getNextSequentialRoofSectionIdentifier(),\n        offset: LatLngModel.create({ lat: 0, lng: 0 }),\n        offsetCartesianPoint: CartesianModel.create({ x: 0, y: 0 }),\n        fresh: true,\n      };\n      const mergedParams = { ...defaultParams, ...params };\n      const roofSection = RoofSectionModel.create(mergedParams);\n      self.roofSections.push(roofSection);\n\n      return roofSection;\n    },\n    addNewCustomRoofSectionBasedOnADefaultBeingDeactivated(sourceRoofSection, copyLayout) {\n      const roofSection = RoofSectionModel.create({\n        uuid: uuid(),\n        azimuth: sourceRoofSection.azimuth,\n        identifier: sourceRoofSection.identifier,\n        custom: true,\n        active: true,\n        illegalShape: sourceRoofSection.illegalShape,\n        offset: LatLngModel.create({ ...sourceRoofSection.offset }),\n        offsetCartesianPoint: CartesianModel.create({\n          ...sourceRoofSection.offsetCartesianPoint,\n        }),\n        fresh: sourceRoofSection.fresh,\n      });\n      if (copyLayout) {\n        roofSection.copyLayoutFrom(sourceRoofSection);\n      }\n      self.roofSections.push(roofSection);\n\n      sourceRoofSection.deactivate();\n\n      return roofSection;\n    },\n    applyUpdatesReturnedBySave(json) {\n      const roofSectionsJson = json?.[\"roofSections\"];\n\n      self.roofSections.forEach((roofSection) => {\n        const roofSectionJson = roofSectionsJson?.find((rsJson) => rsJson[\"uuid\"] === roofSection.uuid);\n        roofSection.applyUpdatesReturnedBySave(roofSectionJson);\n      });\n    },\n    flagDeleted() {\n      if (!self.deleted) {\n        self.markDirty();\n        self.deleted = true;\n        self.project.snapshotRoofPlaneDeletion(self);\n      }\n      self.roofSections.forEach((rs) => rs.flagDeleted());\n    },\n    clearGuideLines() {\n      if (self.guideLines.length > 0) self.markDirty();\n      self.guideLines = [];\n    },\n    setGuideLines(newGuideLines) {\n      self.markDirty();\n      self.guideLines = newGuideLines;\n    },\n    setGlobalCartesianOffset(delta) {\n      if (\n        self.globalCartesianOffset &&\n        self.globalCartesianOffset.x === delta.x &&\n        self.globalCartesianOffset.y === delta.y\n      )\n        return;\n\n      self.markDirty();\n      self.globalCartesianOffset = delta;\n    },\n  }));\n\nexport function roofPlanePersistenceData(roofPlane) {\n  logger(`Persisting Roof Plane ${roofPlane.displayIdentifier}`);\n\n  if (!roofPlane.needsSave) {\n    logger(\"--!needsSave. Skipping\");\n    return undefined;\n  }\n\n  const latLngPoints = pointsForSave(roofPlane, \"latLngPoints\");\n  const cartesianPoints = pointsForSave(roofPlane, \"cartesianPoints\");\n  const globalCartesianOffset = roofPlane.globalCartesianOffset?.toArray || [0, 0];\n\n  const data = {\n    uuid: roofPlane.uuid,\n    id: roofPlane.id,\n    identifier: roofPlane.identifier,\n    lat_lng_points: latLngPoints,\n    cartesian_points: cartesianPoints,\n    illegal_shape: roofPlane.illegalShape,\n    global_cartesian_offset: globalCartesianOffset,\n    _destroy: roofPlane.deleted,\n    roof_sections_attributes: roofPlane.roofSections.map((roofSection) => roofSectionPersistenceData(roofSection)),\n  };\n\n  if (roofPlane.guideLines.length > 0) {\n    data.guide_lines = roofPlane.guideLines.map(guideLinePersistenceData);\n  }\n  return data;\n}\n\nconst RoofPlaneModel = types.compose(DaRoofPlaneModel, WithCartesianPoints, RoofPlaneBase);\nexport default RoofPlaneModel;\n", "import { getParent, types } from \"mobx-state-tree\";\n\nimport WithLatLngPoints from \"../../da/models/with-lat-lng-points\";\nimport WithCartesianPoints from \"../../da/models/with-cartesian-points\";\nimport WithDirtyTracking from \"../../da/models/with-dirty-tracking\";\nimport CartesianModel from \"../../da/models/cartesian-model\";\n\nimport { OBSTRUCTION_BUFFER_DATA_TYPE } from \"../../da/map/data-types\";\n\nconst ObstructionBufferModelBase = types\n  .model(\"ObstructionBufferModel\", {\n    globalCartesianOffset: types.maybe(CartesianModel),\n  })\n  .views((self) => ({\n    get dataType() {\n      return OBSTRUCTION_BUFFER_DATA_TYPE;\n    },\n    get obstruction() {\n      return getParent(self, 1);\n    },\n    get uuid() {\n      return this.obstruction.uuid;\n    },\n    get identifier() {\n      return `Buffer_${self.obstruction.identifier}`;\n    },\n  }))\n  .actions((self) => ({\n    setGlobalCartesianOffset(delta) {\n      self.globalCartesianOffset = delta;\n    },\n  }));\n\nexport function obstructionBufferPersistenceData(obstructionBuffer) {\n  if (obstructionBuffer) {\n    return {\n      lat_lng_points: obstructionBuffer.latLngPointsToString,\n      cartesian_points: obstructionBuffer.cartesianPointsToString,\n      global_cartesian_offset: obstructionBuffer.globalCartesianOffset?.toArray || [0, 0],\n    };\n  } else {\n    return {\n      lat_lng_points: \"[]\",\n      cartesian_points: \"[]\",\n      global_cartesian_offset: [0, 0],\n    };\n  }\n}\n\nconst ObstructionBufferModel = types.compose(\n  ObstructionBufferModelBase,\n  WithLatLngPoints,\n  WithCartesianPoints,\n  WithDirtyTracking,\n);\nexport default ObstructionBufferModel;\n", "import { getParent, types } from \"mobx-state-tree\";\n\nimport ObstructionBufferModel, { obstructionBufferPersistenceData } from \"./obstruction-buffer-model\";\nimport WithLatLngPoints from \"../../da/models/with-lat-lng-points\";\nimport WithCartesianPoints from \"../../da/models/with-cartesian-points\";\nimport WithDirtyTracking from \"../../da/models/with-dirty-tracking\";\nimport CartesianModel from \"../../da/models/cartesian-model\";\n\nimport { OBSTRUCTION_DATA_TYPE } from \"../../da/map/data-types\";\nimport { pointsForSave } from \"../../da/models/points-utilities\";\nimport { logger } from \"../../helpers/app\";\n\nconst ObstructionModelBase = types\n  .model(\"ObstructionModel\", {\n    uuid: types.identifier,\n    id: types.maybe(types.integer),\n    deleted: types.optional(types.boolean, false),\n    identifier: types.optional(types.string, \"\"),\n    illegalShape: types.optional(types.boolean, false),\n    height: types.maybeNull(types.number),\n    globalCartesianOffset: types.maybe(CartesianModel),\n    buffer: types.maybeNull(ObstructionBufferModel),\n    useSetback: types.optional(types.boolean, true),\n    setbackFt: types.optional(types.number, 0.0),\n    setbackBuffer: types.maybeNull(ObstructionBufferModel),\n    // store UUIDs to handle both saved and unsaved roof planes/sections\n    nearbyRoofPlanes: types.array(types.string),\n    nearbyRoofSections: types.array(types.string),\n  })\n  .views((self) => ({\n    get dataType() {\n      return OBSTRUCTION_DATA_TYPE;\n    },\n    get project() {\n      return getParent(self, 2);\n    },\n    get needsSave() {\n      return self.dirty || !self.id;\n    },\n    get hasBuffer() {\n      return self.buffer !== null;\n    },\n    get hasSetbackBuffer() {\n      return self.setbackBuffer !== null;\n    },\n    get shouldRenderSetbackBuffer() {\n      return self.useSetback && self.setbackFt > 0.0;\n    },\n    get displayIdentifier() {\n      return self.identifier;\n    },\n    get notDeleted() {\n      return !self.deleted;\n    },\n    get needsProximityDetection() {\n      if (self.nearbyRoofPlanes.length === 0 || self.nearbyRoofSections.length === 0) return true;\n\n      return (\n        self.nearbyRoofPlanes.some((uuid) => !self.project.getRoofPlane(uuid)) ||\n        self.nearbyRoofSections.some((uuid) => !self.project.getRoofSection(uuid))\n      );\n    },\n  }))\n  .actions((self) => ({\n    setIdentifier(newIdentifier) {\n      if (self.identifier === newIdentifier) return;\n\n      self.markDirty();\n      self.identifier = newIdentifier;\n    },\n    setIllegalShape(legality) {\n      if (self.illegalShape === legality) return;\n\n      self.markDirty();\n      self.illegalShape = legality;\n    },\n    setHeight(height) {\n      const newHeight = Number.parseFloat(height);\n      if (self.height === newHeight) return;\n\n      self.markDirty();\n      self.height = newHeight;\n    },\n    flagDeleted() {\n      if (!self.deleted) {\n        self.markDirty();\n        self.deleted = true;\n      }\n    },\n    addBuffer() {\n      self.buffer = ObstructionBufferModel.create();\n      self.markDirty();\n\n      return self.buffer;\n    },\n    removeBuffer() {\n      if (!self.buffer) return;\n\n      self.markDirty();\n      self.buffer = null;\n    },\n    setUseSetback(useSetback) {\n      const newValue = Boolean(useSetback);\n      if (self.useSetback === newValue) return;\n\n      self.markDirty();\n      self.useSetback = newValue;\n    },\n    setSetbackFt(setbackFt) {\n      const newValue = Number.parseFloat(setbackFt);\n      if (self.setbackFt === newValue) return;\n\n      self.markDirty();\n      self.setbackFt = newValue;\n    },\n    addSetbackBuffer() {\n      self.setbackBuffer = ObstructionBufferModel.create();\n      self.markDirty();\n\n      return self.setbackBuffer;\n    },\n    removeSetbackBuffer() {\n      if (!self.setbackBuffer) return;\n\n      self.markDirty();\n      self.setbackBuffer = null;\n    },\n    setGlobalCartesianOffset(delta) {\n      if (\n        self.globalCartesianOffset &&\n        self.globalCartesianOffset.x === delta.x &&\n        self.globalCartesianOffset.y === delta.y\n      )\n        return;\n\n      self.markDirty();\n      self.globalCartesianOffset = delta;\n    },\n    addRoofPlane(roofPlane) {\n      if (self.nearbyRoofPlanes.includes(roofPlane.uuid)) return;\n\n      self.markDirty();\n      self.nearbyRoofPlanes.push(roofPlane.uuid);\n    },\n    removeRoofPlane(roofPlane) {\n      self.clearRoofPlaneUuid(roofPlane.uuid);\n    },\n    clearRoofPlaneUuid(roofPlaneUuid) {\n      if (!self.nearbyRoofPlanes.includes(roofPlaneUuid)) return;\n\n      self.markDirty();\n      self.nearbyRoofPlanes = self.nearbyRoofPlanes.filter((item) => item !== roofPlaneUuid);\n    },\n    addRoofSection(roofSection) {\n      if (self.nearbyRoofSections.includes(roofSection.uuid)) return;\n\n      self.markDirty();\n      self.nearbyRoofSections.push(roofSection.uuid);\n    },\n    removeRoofSection(roofSection) {\n      self.clearRoofSectionUuid(roofSection.uuid);\n    },\n    clearRoofSectionUuid(roofSectionUuid) {\n      if (!self.nearbyRoofSections.includes(roofSectionUuid)) return;\n\n      self.markDirty();\n      self.nearbyRoofSections = self.nearbyRoofSections.filter((item) => item !== roofSectionUuid);\n    },\n  }));\n\nexport function obstructionPersistenceData(obstruction) {\n  logger(`Persisting Obstruction ${obstruction.identifier}`);\n\n  if (!obstruction.needsSave) {\n    logger(\"--!needsSave. Skipping\");\n    return undefined;\n  }\n\n  const latLngPoints = pointsForSave(obstruction, \"latLngPoints\");\n  const cartesianPoints = pointsForSave(obstruction, \"cartesianPoints\");\n  const globalCartesianOffset = obstruction.globalCartesianOffset?.toArray || [0, 0];\n\n  const bufferData = obstructionBufferPersistenceData(obstruction.buffer);\n  const setbackBufferData = obstructionBufferPersistenceData(obstruction.setbackBuffer);\n\n  const data = {\n    uuid: obstruction.uuid,\n    id: obstruction.id,\n    identifier: obstruction.identifier,\n    lat_lng_points: latLngPoints,\n    cartesian_points: cartesianPoints,\n    illegal_shape: obstruction.illegalShape,\n    _destroy: obstruction.deleted,\n    height: obstruction.height,\n    allow_blank_height: true,\n    global_cartesian_offset: globalCartesianOffset,\n    buffer_lat_lng_points: bufferData.lat_lng_points,\n    buffer_cartesian_points: bufferData.cartesian_points,\n    buffer_global_cartesian_offset: bufferData.global_cartesian_offset,\n    use_setback: obstruction.useSetback,\n    setback_ft: obstruction.setbackFt,\n    allow_blank_setback: true,\n    setback_buffer_lat_lng_points: setbackBufferData.lat_lng_points,\n    setback_buffer_cartesian_points: setbackBufferData.cartesian_points,\n    setback_buffer_global_cartesian_offset: setbackBufferData.global_cartesian_offset,\n    nearby_roof_planes: obstruction.nearbyRoofPlanes,\n    nearby_roof_sections: obstruction.nearbyRoofSections,\n  };\n\n  return data;\n}\n\nconst ObstructionModel = types.compose(ObstructionModelBase, WithLatLngPoints, WithCartesianPoints, WithDirtyTracking);\nexport default ObstructionModel;\n", "import { types } from \"mobx-state-tree\";\nimport { v4 as uuid } from \"uuid\";\n\nimport DaProjectModel from \"../../da/models/project-model\";\nimport RoofPlaneModel, { roofPlanePersistenceData } from \"./roof-plane-model\";\nimport ObstructionModel, { obstructionPersistenceData } from \"./obstruction-model\";\nimport LatLngModel from \"../../da/models/lat-lng-model\";\nimport { projectSitePersistenceData } from \"../../da/models/project-site-model\";\nimport { logger } from \"../../helpers/app\";\nimport * as Api from \"../../helpers/api-mobx\";\nimport { uploadedBuildingImagePersistenceData } from \"../../da/models/uploaded-building-image-model\";\n\nconst ProjectModelBase = types\n  .model(\"ProjectModel\", {\n    roofPlanes: types.array(RoofPlaneModel),\n    deletedRoofPlanes: types.array(RoofPlaneModel),\n    obstructions: types.array(ObstructionModel),\n    azimuth: types.number,\n    northExtension: types.number,\n    southExtension: types.number,\n    focusedRoofSection: types.maybe(types.integer),\n    globalOrigin: LatLngModel,\n    obstructionsSetbackFt: types.optional(types.number, 0.0),\n    obstructionsFresh: types.optional(types.boolean, true),\n    smoothInwardCorners: types.optional(types.boolean, false),\n  })\n  .views((self) => ({\n    get shouldLengthCorrectEdges() {\n      return false;\n    },\n    get panelsPresent() {\n      return self.roofPlanes.reduce((count, roofPlane) => {\n        return count + roofPlane.panelsPresent;\n      }, 0);\n    },\n    get wattage() {\n      return self.panelsPresent * self.panelWattage;\n    },\n    getNextSequentialObstructionIdentifier() {\n      const numActiveObstructions = self.obstructions.filter((o) => !o.deleted).length;\n      return `${numActiveObstructions + 1}`;\n    },\n    get notDeletedObstructions() {\n      return self.obstructions.filter((obstruction) => obstruction.notDeleted);\n    },\n    getObstruction(uuid) {\n      return self.obstructions.find((obstruction) => obstruction.uuid === uuid);\n    },\n    get anyObstructionNeedsSave() {\n      return self.obstructions.some((obstruction) => obstruction.needsSave);\n    },\n    get needsSave() {\n      return (\n        self.dirty ||\n        self.projectSite.needsSave ||\n        self.hasDetailAndNeedsSave ||\n        self.anyObstructionNeedsSave ||\n        self.anyRoofPlaneNeedsSave ||\n        self.anyUploadedBuildingImageNeedsSave\n      );\n    },\n  }))\n  .actions((self) => ({\n    setAzimuth(newAzimuth) {\n      if (self.azimuth === newAzimuth) return;\n\n      self.markDirty();\n      self.azimuth = newAzimuth;\n    },\n    addRoofPlane(params) {\n      const defaultParams = {\n        uuid: uuid(),\n        identifier: self.getNextSequentialRoofPlaneIdentifier(),\n      };\n      const mergedParams = { ...defaultParams, ...params };\n      const roofPlane = RoofPlaneModel.create(mergedParams);\n      self.roofPlanes.push(roofPlane);\n\n      return roofPlane;\n    },\n    addObstruction() {\n      const params = {\n        uuid: uuid(),\n        identifier: self.getNextSequentialObstructionIdentifier(),\n      };\n      const obstruction = ObstructionModel.create(params);\n      self.obstructions.push(obstruction);\n\n      return obstruction;\n    },\n    destroyObstruction(obstruction) {\n      if (obstruction.id) {\n        obstruction.flagDeleted();\n      } else {\n        self.obstructions.remove(obstruction);\n      }\n    },\n    resequenceObstructionsIdentifiers() {\n      const notDeletedObstructions = self.obstructions\n        .slice()\n        .sort((a, b) => parseInt(a.identifier) - parseInt(b.identifier))\n        .filter((rp) => !rp.deleted);\n      notDeletedObstructions.forEach((rp, i) => {\n        rp.setIdentifier(`${i + 1}`);\n      });\n    },\n    applyUpdatesReturnedBySave(json) {\n      const roofPlanesJson = json?.[\"model\"]?.[\"roofPlanes\"];\n\n      self.roofPlanes.forEach((rp) => {\n        const roofPlaneJson = roofPlanesJson?.find((rpJson) => rpJson[\"uuid\"] === rp.uuid);\n        rp.applyUpdatesReturnedBySave(roofPlaneJson);\n      });\n    },\n    save({\n      path,\n      onSuccess = () => {},\n      onValidationError = () => {},\n      onServerError = () => {},\n      includeProjectSite = true,\n      includeUploadedBuildingImages = true,\n    }) {\n      if (self.saving) {\n        logger(\"Already saving. Ignoring request.\");\n        return;\n      }\n      self.setSaving();\n\n      const payload = persistenceData(self, includeProjectSite, includeUploadedBuildingImages);\n      const onSuccessWithModelUpdates = (json) => {\n        self.applyUpdatesReturnedBySave(json);\n        onSuccess(json);\n      };\n      return Api.put({\n        model: self,\n        path,\n        body: payload,\n        onSuccess: onSuccessWithModelUpdates,\n        onValidationError,\n        onServerError,\n      });\n    },\n    processResponse() {},\n  }));\n\nfunction persistenceData(project, includeProjectSite, includeUploadedBuildingImages) {\n  logger(`Persisting Project #${project.id}`);\n\n  const projectSiteAttributes = includeProjectSite ? projectSitePersistenceData(project.projectSite) : undefined;\n\n  const detailAttributes = project.dirty\n    ? { id: project.detailId, azimuth: project.azimuth, obstructions_setback_ft: project.obstructionsSetbackFt }\n    : undefined;\n\n  const data = {\n    detail_attributes: detailAttributes,\n    project_site_attributes: projectSiteAttributes,\n    roof_planes_attributes: project.roofPlanes.map((roofPlane) => roofPlanePersistenceData(roofPlane)),\n    obstructions_attributes: project.obstructions.map((obstruction) => obstructionPersistenceData(obstruction)),\n  };\n\n  if (includeUploadedBuildingImages) {\n    data.uploaded_building_images_attributes = project.uploadedBuildingImages.map((ubi) =>\n      uploadedBuildingImagePersistenceData(ubi),\n    );\n  }\n\n  return { bx_project: data };\n}\n\nconst ProjectModel = types.compose(DaProjectModel, ProjectModelBase);\nexport default ProjectModel;\n", "import { fromLonLat } from \"ol/proj\";\n\nimport DaMapBaseController from \"../../da/layout_editor/map_base_controller\";\nimport MapManager from \"../../../bx/map/map-manager\";\nimport MapModelSynchronizer from \"../../../bx/map/map-model-synchronizer\";\n\nimport ProjectModel from \"../../../bx/models/project-model\";\nimport { logState } from \"../../../bx/map/ol-helpers\";\n\nexport default class MapBaseController extends DaMapBaseController {\n  static targets = [\n    \"map\",\n    \"compass\",\n    \"drawBtn\",\n    \"selectBtn\",\n    \"measureBtn\",\n    \"shapesBtn\",\n    \"shapesSubMenuBtn\",\n    \"rectangleShapeBtn\",\n    \"polygonShapeBtn\",\n    \"hexadecagonShapeBtn\",\n    \"selectSubMenuBtn\",\n    \"editVerticesBtn\",\n    \"transformShapeBtn\",\n    \"saveBtn\",\n    \"panelStatusMenuBtn\",\n    \"addPanelsBtn\",\n    \"removePanelsBtn\",\n    \"togglePanelsBtn\",\n    \"paintPanelsBtn\",\n    \"statusItemZoom\",\n    \"statusItemRotation\",\n    \"statusItemPanels\",\n    \"statusItemPanelsContainer\",\n    \"statusItemWattage\",\n    \"statusItemWattageContainer\",\n    \"editModeBtnGroup\",\n    \"editorModeMenu\",\n    \"undoBtn\",\n    \"redoBtn\",\n    \"lineLengthMenu\",\n    \"lineLengthFeet\",\n    \"lineLengthInches\",\n    \"guideVertexFeet\",\n    \"guideVertexInches\",\n  ];\n\n  connect() {\n    super.connect();\n\n    this.project = ProjectModel.create(this.projectData);\n    this.project.applyUpdatesReturnedBySave();\n    window.IR_GLOBALS.projectModel = this.project;\n\n    this.mapModelSynchronizer = new MapModelSynchronizer(this);\n\n    this.mapManager = new MapManager(this);\n    this.mapManager.add();\n  }\n\n  showGlobalOrigin() {\n    this.mapManager.addVisualMarker(fromLonLat(this.project.globalOrigin.toLonLat));\n  }\n\n  get logShort() {\n    return logState(this.mapModelSynchronizer, false);\n  }\n\n  get log() {\n    return logState(this.mapModelSynchronizer, true);\n  }\n}\n", "import { Fill, Stroke, Style, Circle } from \"ol/style\";\nimport { GeometryType } from \"../ol-helpers\";\nimport MultiPoint from \"ol/geom/MultiPoint\";\n\nimport { pointAtFeatureVertex } from \"../ol-helpers\";\nimport { addDimensionMarkersToEdges } from \"./distance-markers\";\nimport { OBSTRUCTION_DATA_TYPE, ROOF_PLANE_DATA_TYPE, ROOF_SECTION_DATA_TYPE, SETBACK_DATA_TYPE } from \"../data-types\";\nimport { selectMeasureStyle } from \"./measures\";\nimport { isSetback, selectSetbackPolygonStrokeAndFillColors } from \"./setbacks\";\nimport { selectRoofPlanePolygonStrokeAndFillColors } from \"./roof-planes\";\nimport { selectObstructionPolygonStrokeAndFillColors } from \"./obstructions\";\nimport { selectRoofSectionPolygonStrokeAndFillColors } from \"./roof-sections\";\n\nexport function selectStyle(feature, controller, map) {\n  const geometry = feature.getGeometry();\n  const geometryType = geometry.getType();\n\n  if (geometryType === GeometryType.LINE_STRING) {\n    return selectMeasureStyle(feature, controller, map);\n  } else {\n    return selectStylePolygon(feature, controller, map);\n  }\n}\n\nexport function selectStylePolygon(feature, controller, map) {\n  const strokeAndFill = selectPolygonStrokeAndFillColors(feature, controller);\n  if (!strokeAndFill) return [];\n\n  const [strokeColor, fillColor] = selectPolygonStrokeAndFillColors(feature, controller);\n\n  const styles = [];\n\n  const polylineStyle = new Style({\n    stroke: new Stroke({ color: strokeColor, width: 3 }),\n    fill: new Fill({ color: fillColor }),\n    zIndex: 1,\n  });\n  styles.push(polylineStyle);\n\n  addDimensionMarkersToEdges(feature, controller, styles, strokeColor);\n\n  const selectedVertexOuterCircleStyle = new Style({\n    image: new Circle({\n      radius: 10,\n      fill: new Fill({ color: \"rgba(255, 0, 0, 1.0)\" }),\n      snapToPixel: true,\n    }),\n    geometry: individuallySelectedVertices(feature),\n  });\n  styles.push(selectedVertexOuterCircleStyle);\n\n  const selectedVertexInnerCircleStyle = new Style({\n    image: new Circle({\n      radius: 6,\n      fill: new Fill({ color: \"rgba(255, 255, 255, 1.0)\" }),\n      snapToPixel: true,\n    }),\n    geometry: individuallySelectedVertices(feature),\n    zIndex: 2,\n  });\n  styles.push(selectedVertexInnerCircleStyle);\n\n  const vertexCirclesMultiPoint = unselectedVerticesOfSelectedPolygon(\n    feature,\n    isSetback(feature) ? { withoutFirstRing: true } : {},\n  );\n\n  const vertexOuterCircleStyle = new Style({\n    image: new Circle({\n      radius: 6,\n      fill: new Fill({ color: strokeColor }),\n      snapToPixel: true,\n    }),\n    geometry: vertexCirclesMultiPoint,\n  });\n  styles.push(vertexOuterCircleStyle);\n\n  const vertexInnerCircleStyle = new Style({\n    image: new Circle({\n      radius: 4,\n      fill: new Fill({ color: \"rgba(255, 255, 255, 1.0)\" }),\n      snapToPixel: true,\n    }),\n    geometry: vertexCirclesMultiPoint,\n    zIndex: 2,\n  });\n  styles.push(vertexInnerCircleStyle);\n\n  return styles;\n}\n\nfunction selectPolygonStrokeAndFillColors(feature, controller) {\n  if (feature.get(\"illegalShape\")) return [\"rgba(255, 0, 0, 1.0)\", \"rgba(255, 0, 0, 0.4)\"];\n\n  switch (feature.get(\"dataType\")) {\n    case ROOF_PLANE_DATA_TYPE:\n      return selectRoofPlanePolygonStrokeAndFillColors(feature, controller);\n    case OBSTRUCTION_DATA_TYPE:\n      return selectObstructionPolygonStrokeAndFillColors(feature, controller);\n    case ROOF_SECTION_DATA_TYPE:\n      return selectRoofSectionPolygonStrokeAndFillColors(feature);\n    case SETBACK_DATA_TYPE:\n      return selectSetbackPolygonStrokeAndFillColors();\n    default:\n      // This may be a building image selection polygon, which we don't style\n      console.log(\"Unknown feature data type for select styling:\", feature);\n      return undefined;\n  }\n}\n\nfunction individuallySelectedVertices(feature) {\n  const selectedVertexCoordinates = feature.get(\"selectedVertexCoordinates\");\n  if (selectedVertexCoordinates && pointAtFeatureVertex(feature, selectedVertexCoordinates)) {\n    return new MultiPoint([selectedVertexCoordinates]);\n  }\n\n  return new MultiPoint([]);\n}\n\nfunction unselectedVerticesOfSelectedPolygon(feature, argumentOptions = {}) {\n  const defaultOptions = { withoutFirstRing: false };\n  const options = { ...defaultOptions, ...argumentOptions };\n\n  const geometry = feature.getGeometry();\n\n  let geometryCoordinates = geometry.getCoordinates();\n  if (options.withoutFirstRing) {\n    geometryCoordinates = geometryCoordinates.slice(1, geometryCoordinates.length);\n  }\n\n  // Combine all ring coordinates. For every ring, the first coordinate is repeated at the end, so remove it.\n  const coordinates = geometryCoordinates.flatMap((ringCoordinates) => ringCoordinates.slice(0, -1));\n  const selectedVertexCoordinates = feature.get(\"selectedVertexCoordinates\");\n\n  if (selectedVertexCoordinates) {\n    const unselectedVertexCoordinates = coordinates.filter((coordinate) => {\n      return coordinate[0] !== selectedVertexCoordinates[0] && coordinate[1] !== selectedVertexCoordinates[1];\n    });\n    return new MultiPoint(unselectedVertexCoordinates);\n  } else {\n    return new MultiPoint(coordinates);\n  }\n}\n", "import { MEASURE_DATA_TYPE } from \"../../data-types\";\n\nexport default class MeasureSelectManager {\n  constructor(map, measuresVectorSource, selectInteractionManager) {\n    this.map = map;\n    this.measuresVectorSource = measuresVectorSource;\n    this.selectInteractionManager = selectInteractionManager;\n  }\n\n  removeSelectedMeasures() {\n    this.currentSelectInteraction.getFeatures().forEach((feature) => {\n      if (feature.get(\"dataType\") === MEASURE_DATA_TYPE) {\n        this.measuresVectorSource.removeFeature(feature);\n      }\n    });\n  }\n\n  get currentSelectInteraction() {\n    return this.selectInteractionManager.currentSelectInteraction;\n  }\n}\n", "import Select from \"ol/interaction/Select\";\nimport { click } from \"ol/events/condition\";\nimport { Collection } from \"ol\";\n\nimport {\n  isPolygon,\n  isARoofPlane,\n  isAnObstruction,\n  isARoofSection,\n  isPoint,\n  pointAtFeatureVertex,\n  ensureFeatureIsClockwise,\n  isAMeasure,\n} from \"../../ol-helpers\";\n\nimport { selectStyle } from \"../../styles/select\";\nimport MeasureSelectManager from \"./measure-select-manager\";\n\nexport default class Base {\n  constructor(controller) {\n    this.controller = controller;\n    this.settings = controller.settings;\n\n    if (controller.hasSelectBtnTarget) this.selectBtnTarget = controller.selectBtnTarget;\n\n    this.project = controller.project;\n    this.mapModelSynchronizer = controller.mapModelSynchronizer;\n    this.mapManager = controller.mapManager;\n    this.map = this.mapManager.map;\n\n    this.measureSelectManager = new MeasureSelectManager(\n      this.map,\n      this.controller.mapManager.measuresVectorSource,\n      this,\n    );\n\n    this.currentSelectInteraction = undefined;\n  }\n\n  add() {\n    this.clearCurrentInteraction();\n\n    this.currentSelectInteraction = this.buildSelectInteraction;\n    this.map.addInteraction(this.currentSelectInteraction);\n    this.currentSelectInteraction.on(\"select\", this.updateShapeGuideLines);\n    this.currentSelectInteraction.on(\"select\", this.selectClick);\n  }\n\n  get buildSelectInteraction() {\n    return new Select({\n      style: this.selectStyle,\n      hitTolerance: 3,\n      multi: false,\n      filter: this.filterSelects,\n      // this improves responsiveness because select doesn't need to wait to\n      // determine if the user single vs double clicked\n      condition: this.selectCondition,\n    });\n  }\n\n  selectStyle = (feature) => {\n    return selectStyle(feature, this.controller, this.map);\n  };\n\n  filterSelects = (_feature, _layer) => {\n    // override in sub class\n  };\n\n  selectCondition = click;\n\n  remove() {\n    this.clearCurrentInteraction();\n  }\n\n  get features() {\n    console.warn(\"[Deprecation warning] Use selectionCollection instead of features on the select interaction manager\");\n    // should we check if there is no current select interaction?\n    return this.currentSelectInteraction.getFeatures();\n  }\n\n  get selectedFeatures() {\n    return this.selectionCollection.getArray();\n  }\n\n  get selectionCollection() {\n    if (!this.currentSelectInteraction) return new Collection([]);\n\n    return this.currentSelectInteraction.getFeatures();\n  }\n\n  removeSelectedFeatures(_event) {\n    if (!this.currentSelectInteraction || this.selectionCollection.getLength() === 0) return;\n\n    if (this.anyFeaturesWithSelectedVertices()) {\n      this.removeSelectedVertices();\n      this.shapeGuideLinesCall(\"update\", [], \"removeSelectedFeatures\");\n    } else {\n      this.shapeGuideLinesCall(\"remove\", this.selectedPolygonFeatures, \"removeSelectedFeatures\");\n      this.removeSelectedShapes();\n    }\n\n    this.controller.markDirty();\n  }\n\n  shapeGuideLinesCall(method, features, from) {\n    if (!this.showShapeGuideLinesWhenSelecting) return;\n\n    this.controller.shapeGuideLinesInteractionManager[method](features, `select ${from}`);\n  }\n\n  get showShapeGuideLinesWhenSelecting() {\n    return this.controller.shapeGuideLinesInteractionManager && this.settings.showShapeGuideLinesWhenSelecting;\n  }\n\n  get selectedPolygonFeatures() {\n    if (!this.selectedFeatures) return [];\n\n    return this.selectedFeatures.filter((f) => {\n      const geometryType = f.getGeometry().getType();\n      return geometryType === \"Polygon\" || geometryType === \"LineString\";\n    });\n  }\n\n  anyFeaturesWithSelectedVertices() {\n    if (this.selectedFeatures.find((feature) => feature.get(\"selectedVertexCoordinates\"))) return true;\n    return false;\n  }\n\n  removeSelectedVertices() {\n    // override in sub class\n  }\n\n  getCoordinatesIfVertexDeletionAllowed(feature) {\n    const selectedVertexCoordinates = feature.get(\"selectedVertexCoordinates\");\n    const geometry = feature.getGeometry();\n    if (!selectedVertexCoordinates || !isPolygon(feature)) return;\n\n    // get coordinates of outer ring\n    const coordinates = geometry.getLinearRing(0).getCoordinates();\n    // a triangle will have 4 coordinates and it is the smallest legal polygon\n    if (coordinates.length <= 4) {\n      alert(\"Vertices can only be deleted from features with at least four corners.\");\n      return;\n    }\n\n    return coordinates;\n  }\n\n  coordinatesWithoutVertexAtIndex(coordinates, index) {\n    const newCoordinates = [...coordinates];\n    const isFirstOrLastIndex = index === 0 || index === coordinates.length - 1;\n\n    if (isFirstOrLastIndex) {\n      newCoordinates.splice(0, 1); // remove first element\n      newCoordinates.pop(); // take off last element\n      newCoordinates.push(newCoordinates[0]); // add the first one again at the end to close the ring\n    } else {\n      newCoordinates.splice(index, 1);\n    }\n\n    return newCoordinates;\n  }\n\n  updateFeatureToNewCoordinates(feature, newCoordinates) {\n    const geometry = feature.getGeometry();\n    geometry.setCoordinates([newCoordinates]);\n\n    ensureFeatureIsClockwise(feature);\n  }\n\n  indexOfMatchingCoordinate(selectedVertexCoordinates, coordinates) {\n    return coordinates.findIndex((coordinate) => {\n      return coordinate[0] === selectedVertexCoordinates[0] && coordinate[1] === selectedVertexCoordinates[1];\n    });\n  }\n\n  baseRemoveSelectedShapes = () => {\n    this.measureSelectManager.removeSelectedMeasures();\n    this.deselectSelected();\n    this.controller.modifyInteractionManager.refresh();\n  };\n\n  clearCurrentInteraction() {\n    if (this.currentSelectInteraction) {\n      this.shapeGuideLinesCall(\"remove\", this.selectedPolygonFeatures, \"clearCurrentInteraction\");\n      this.currentSelectInteraction.un(\"select\", this.selectClick);\n      this.map.removeInteraction(this.currentSelectInteraction);\n      delete this.currentSelectInteraction;\n      this.currentSelectInteraction = undefined;\n    }\n  }\n\n  // Called when selecting or deselecting a feature\n  updateShapeGuideLines = (event) => {\n    const { selected, deselected } = event;\n\n    const shapesAndMeasures = (features) =>\n      features.filter((f) => {\n        const geometryType = f.getGeometry().getType();\n        return geometryType === \"Polygon\" || geometryType === \"LineString\";\n      });\n\n    if (this.showShapeGuideLinesWhenSelecting) {\n      this.shapeGuideLinesCall(\"add\", shapesAndMeasures(selected), \"updateShapeGuideLines\");\n\n      if (!this.settings.showShapeGuideLinesAlways) {\n        this.shapeGuideLinesCall(\"remove\", shapesAndMeasures(deselected), \"updateShapeGuideLines\");\n      }\n    }\n  };\n\n  // Event fired when clicking a polygon\n  selectClick = (event) => {\n    event.deselected.forEach((feature) => this.clearDeselectFeature(feature));\n\n    if (event.selected && event.selected.length > 0) {\n      event.selected.forEach((feature) => {\n        // If it's none of these things, it's assumed to be point feature over the top of a roof plane or roof section vertex\n        if (!isAMeasure(feature) && !isARoofPlane(feature) && !isAnObstruction(feature) && !isARoofSection(feature)) {\n          // it's a point\n          const coordinates = feature.getGeometry().getCoordinates();\n\n          let roofPlaneFeatures = [];\n          if (this.controller.mapManager.roofPlanesVectorSource) {\n            roofPlaneFeatures = this.controller.mapManager.roofPlanesVectorSource.getFeatures();\n          }\n\n          let obstructionFeatures = [];\n          if (this.controller.mapManager.obstructionsVectorSource) {\n            obstructionFeatures = this.controller.mapManager.obstructionsVectorSource.getFeatures();\n          }\n\n          let roofSectionFeatures = [];\n          if (this.controller.mapManager.roofSectionsVectorSource) {\n            roofSectionFeatures = this.controller.mapManager.roofSectionsVectorSource.getFeatures();\n          }\n\n          const allFeatures = [...roofPlaneFeatures, ...obstructionFeatures, ...roofSectionFeatures];\n\n          allFeatures.forEach((f) => {\n            if (pointAtFeatureVertex(f, coordinates)) {\n              f.set(\"selectedVertexCoordinates\", coordinates);\n              this.addToSelection(f);\n              this.shapeGuideLinesCall(\"add\", f, \"selectClick\");\n            }\n          });\n        }\n      });\n      // because modify and translate only work on the selected polygon, we\n      // need to refresh them after the selections change\n      this.selectClickResetInteractionManagers();\n    }\n  };\n\n  clearDeselectFeature(feature) {\n    feature.unset(\"selectedVertexCoordinates\");\n  }\n\n  selectClickResetInteractionManagers() {\n    // override in sub class\n  }\n\n  deselectSelected() {\n    if (!this.currentSelectInteraction) return;\n\n    this.selectionCollection.clear();\n  }\n\n  removeSelectedVertexFromSelectInteractionFeatures() {\n    const selectedVertexPoints = [];\n    this.selectionCollection.forEach((feature) => {\n      if (isPoint(feature)) selectedVertexPoints.push(feature);\n    });\n\n    selectedVertexPoints.forEach((feature) => this.selectionCollection.remove(feature));\n  }\n\n  addToSelection(features) {\n    if (!this.currentSelectInteraction) return;\n\n    const add = (feature) => {\n      const alreadySelected = this.selectionCollection.getArray().find((f) => f === feature);\n      if (!alreadySelected) this.selectionCollection.push(feature);\n    };\n\n    if (features instanceof Array) {\n      features.forEach((feature) => add(feature));\n    } else {\n      add(features);\n    }\n  }\n\n  removeFromSelection(features) {\n    if (!this.currentSelectInteraction) return;\n\n    if (features instanceof Array) {\n      features.forEach((feature) => this.selectionCollection.remove(feature));\n    } else {\n      this.selectionCollection.remove(features);\n    }\n  }\n}\n", "import DaBase from \"../../../../da/map/interaction-managers/select/base\";\nimport { MEASURE_DATA_TYPE } from \"../../../../da/map/data-types\";\n\nexport default class EditArrays extends DaBase {\n  filterSelects = (_feature, layer) => {\n    const layerDataType = layer && layer.get(\"dataType\");\n    return layerDataType === MEASURE_DATA_TYPE;\n  };\n\n  selectClickResetInteractionManagers() {\n    this.controller.translateInteractionManager.add();\n    this.controller.modifyInteractionManager.add();\n  }\n\n  removeSelectedShapes = () => {\n    this.baseRemoveSelectedShapes();\n  };\n}\n", "import { Snap } from \"ol/interaction\";\nimport LayoutEditorSettings, { SETTINGS, SETTINGS_EVENT } from \"../../../layout-editor/settings\";\n\nexport default class Base {\n  constructor(controller) {\n    this.controller = controller;\n\n    this.mapManager = controller.mapManager;\n    this.map = this.mapManager.map;\n\n    this.snaps = [];\n    this.settings = new LayoutEditorSettings();\n\n    document.addEventListener(SETTINGS_EVENT.CHANGED, this.#handleSettingChanged);\n  }\n\n  get pixelTolerance() {\n    return this.settings.snapDistance;\n  }\n\n  // Override this in subclasses to provide custom snap sources\n  // Sources are snapped in order (first = highest priority)\n  get snapSources() {\n    return [];\n  }\n\n  // The snap interaction must be added after the Modify and Draw interactions\n  // in order for its map browser event handlers to be fired first. Its handlers\n  // are responsible of doing the snapping.\n  add() {\n    // Remove the existing interactions, so we can add it again, but after the\n    // other interactions have been added\n    this.remove();\n\n    if (this.mapManager.measuresVectorSource) {\n      this.addSnap(this.mapManager.measuresVectorSource);\n    }\n    if (this.mapManager.shapeGuideLinesVectorSource) {\n      this.addSnap(this.mapManager.shapeGuideLinesVectorSource);\n    }\n\n    // Add custom snap sources from subclass\n    this.snapSources.forEach((source) => this.addSnap(source));\n  }\n\n  remove() {\n    this.snaps.forEach((snap) => {\n      if (snap) {\n        this.map.removeInteraction(snap);\n      }\n    });\n    this.snaps = [];\n  }\n\n  addSnap(snapSource) {\n    if (snapSource) {\n      const snap = new Snap({\n        source: snapSource,\n        pixelTolerance: this.pixelTolerance,\n      });\n      this.map.addInteraction(snap);\n      this.snaps.push(snap);\n    }\n  }\n\n  refresh() {\n    this.add();\n  }\n\n  #handleSettingChanged = (event) => {\n    if (event.detail.change.setting === SETTINGS.SNAP_DISTANCE) {\n      this.refresh();\n    }\n  };\n}\n", "import DaBase from \"../../../../da/map/interaction-managers/snap/base\";\n\nexport default class EditArrays extends DaBase {\n  get snapSources() {\n    return [\n      this.mapManager.setbacksVectorSource,\n      this.mapManager.roofSectionsVectorSource,\n      this.mapManager.arraysVectorSource,\n      this.mapManager.obstructionsVectorSource,\n      this.mapManager.obstructionBuffersVectorSource,\n      this.mapManager.obstructionSetbackBuffersVectorSource,\n    ];\n  }\n}\n", "import { BOUNDING_BOX_DATA_TYPE } from \"../../../da/map/data-types\";\n\nexport default function applyPanelModeToArrayFeature(controller, layout, feature) {\n  if (feature.get(\"dataType\") === BOUNDING_BOX_DATA_TYPE) return;\n\n  const row = Number.parseInt(feature.get(\"row\"));\n  const column = Number.parseInt(feature.get(\"column\"));\n\n  if (layout.isOutOfBounds(row, column)) return;\n\n  if (controller.isPanelModeAdd) {\n    layout.addPanel(row, column);\n  } else if (controller.isPanelModeRemove) {\n    layout.removePanel(row, column);\n  } else {\n    layout.togglePanel(row, column);\n  }\n  const finalCellDrawStyle = layout.cellDrawStyle(row, column);\n  feature.set(\"cellDrawStyle\", finalCellDrawStyle);\n}\n", "import { DragBox } from \"ol/interaction\";\nimport { always } from \"ol/events/condition\";\n\nimport applyPanelModeToArrayFeature from \"./apply-panel-mode-to-array-feature\";\nimport { ARRAY_CELL_DATA_TYPE } from \"../../../da/map/data-types\";\n\nexport default class DragBoxInteractionManager {\n  constructor(controller) {\n    this.controller = controller;\n\n    this.mapManager = controller.mapManager;\n    this.map = this.mapManager.map;\n\n    this.roofSection = controller.roofSection;\n\n    this.dragging = false;\n  }\n\n  add() {\n    this.clearCurrentInteraction();\n\n    this.currentDragBoxInteraction = new DragBox({ className: \"ol-map__drag-box\", condition: always });\n    this.map.addInteraction(this.currentDragBoxInteraction);\n    this.currentDragBoxInteraction.on(\"boxdrag\", this.boxDrag);\n    this.currentDragBoxInteraction.on(\"boxend\", this.boxEnd);\n  }\n\n  remove() {\n    this.clearCurrentInteraction();\n  }\n\n  clearCurrentInteraction() {\n    if (!this.currentDragBoxInteraction) return;\n\n    this.map.removeInteraction(this.currentDragBoxInteraction);\n    this.currentDragBoxInteraction.un(\"boxdrag\", this.boxDrag);\n    this.currentDragBoxInteraction.un(\"boxend\", this.boxEnd);\n    delete this.currentDragBoxInteraction;\n    this.currentDragBoxInteraction = undefined;\n  }\n\n  boxDrag = (_event) => {\n    this.dragging = true;\n\n    const features = this.#collectFeaturesUnderBoundingBox();\n\n    const marqueeMarker = this.controller.marqueeMarker;\n\n    if (features.length === 0) {\n      marqueeMarker.hide();\n      return;\n    }\n\n    const dragBoxPx = this.#dragBoxTopLeftPx;\n\n    const markerTopOffset = 27;\n    marqueeMarker.position(dragBoxPx[1] - markerTopOffset, dragBoxPx[0]);\n    marqueeMarker.updateContent(features.length);\n    marqueeMarker.show();\n  };\n\n  boxEnd = (_event) => {\n    this.dragging = false;\n\n    const features = this.#collectFeaturesUnderBoundingBox();\n    const layout = this.roofSection.layout;\n\n    features.forEach((feature) => {\n      applyPanelModeToArrayFeature(this.controller, layout, feature);\n    });\n\n    this.controller.marqueeMarker.hide();\n\n    this.controller.markDirty();\n\n    this.mapManager.dispatchAfterMapFeaturesRendering({ calledFrom: \"DragBoxInteractionManager#boxEnd\" });\n  };\n\n  #collectFeaturesUnderBoundingBox() {\n    let features = [];\n    const extent = this.currentDragBoxInteraction.getGeometry().getExtent();\n\n    this.mapManager.arraysVectorSource.forEachFeatureIntersectingExtent(extent, (feature) => {\n      features.push(feature);\n    });\n\n    features = this.#selectCandidatesAfterConsideringRotation(features);\n\n    return features;\n  }\n\n  #selectCandidatesAfterConsideringRotation(features) {\n    const rotation = this.map.getView().getRotation();\n    const anchor = [0, 0];\n    const rotatedGeometry = this.currentDragBoxInteraction.getGeometry().clone();\n    rotatedGeometry.rotate(-rotation, anchor);\n    const rotatedExtent = rotatedGeometry.getExtent();\n\n    return features.filter((feature) => {\n      const rotatedFeatureGeometry = feature.getGeometry().clone();\n      rotatedFeatureGeometry.rotate(-rotation, anchor);\n      return rotatedFeatureGeometry.intersectsExtent(rotatedExtent) && feature.get(\"dataType\") === ARRAY_CELL_DATA_TYPE;\n    });\n  }\n\n  get #dragBoxTopLeftPx() {\n    const dragBox = this.currentDragBoxInteraction;\n    const dragBoxCoordinates = dragBox.getGeometry().getCoordinates()[0];\n    const dragBoxPixelCoordinates = dragBoxCoordinates.map((coordinate) => this.map.getPixelFromCoordinate(coordinate));\n    let minX;\n    let minY;\n\n    dragBoxPixelCoordinates.forEach((dragBoxPixelCoordinate) => {\n      if (!minX || dragBoxPixelCoordinate[0] < minX) minX = dragBoxPixelCoordinate[0];\n      if (!minY || dragBoxPixelCoordinate[1] < minY) minY = dragBoxPixelCoordinate[1];\n    });\n\n    return [minX, minY];\n  }\n}\n", "import Select from \"ol/interaction/Select\";\nimport { click } from \"ol/events/condition\";\n\nimport applyPanelModeToArrayFeature from \"./apply-panel-mode-to-array-feature\";\n\nexport default class PaintSelectInteractionManager {\n  constructor(controller) {\n    this.controller = controller;\n\n    this.mapManager = controller.mapManager;\n    this.map = this.mapManager.map;\n\n    this.roofSection = controller.roofSection;\n  }\n\n  add() {\n    this.clearCurrentInteraction();\n\n    this.currentPaintSelectInteraction = new Select({ condition: click, layers: [this.mapManager.arraysVectorLayer] });\n    this.map.addInteraction(this.currentPaintSelectInteraction);\n    this.currentPaintSelectInteraction.on(\"select\", this.selectClick);\n  }\n\n  remove() {\n    this.clearCurrentInteraction();\n  }\n\n  clearCurrentInteraction() {\n    if (!this.currentPaintSelectInteraction) return;\n\n    this.map.removeInteraction(this.currentPaintSelectInteraction);\n    this.currentPaintSelectInteraction.un(\"select\", this.selectClick);\n    delete this.currentPaintSelectInteraction;\n    this.currentPaintSelectInteraction = undefined;\n  }\n\n  selectClick = (event) => {\n    const layout = this.roofSection.layout;\n\n    event.selected.forEach((feature) => {\n      applyPanelModeToArrayFeature(this.controller, layout, feature);\n    });\n\n    this.currentPaintSelectInteraction.getFeatures().clear();\n    this.controller.markDirty();\n\n    this.mapManager.dispatchAfterMapFeaturesRendering({ calledFrom: \"PaintSelectInteractionManager#selectClick\" });\n  };\n}\n", "import { pointInOrOnPolygon } from \"../../../../helpers/point-in-polygon\";\nimport { buildLengthCorrectedMeasure } from \"../../edge-list\";\n\nexport function calculateMeasureSlopeAdjustedDistance(measureFeature, controller) {\n  if (!controller.slopeAdjustedMeasures) return;\n\n  const containingRoofPlaneFeature = getContainingRoofPlaneFeature(measureFeature, controller);\n  if (!containingRoofPlaneFeature) return undefined;\n\n  const edgeList = buildLengthCorrectedMeasure(containingRoofPlaneFeature, controller, measureFeature);\n  return edgeList[0].distance;\n}\n\nfunction getContainingRoofPlaneFeature(measureFeature, controller) {\n  const [coordinateOne, coordinateTwo] = measureFeature.getGeometry().getCoordinates();\n  if (coordinateOne === undefined || coordinateTwo === undefined) return;\n\n  const roofPlaneFeatures = controller.mapManager.roofPlanesVectorSource.getFeatures();\n  const containingRoofPlaneFeature = roofPlaneFeatures.find((rpFeature) => {\n    const coordinateOneIsInside = pointInOrOnPolygon(coordinateOne, rpFeature.getGeometry().getCoordinates());\n    const coordinateTwoIsInside = pointInOrOnPolygon(coordinateTwo, rpFeature.getGeometry().getCoordinates());\n    return coordinateOneIsInside && coordinateTwoIsInside;\n  });\n\n  return containingRoofPlaneFeature;\n}\n", "import { Collection } from \"ol\";\nimport { Modify } from \"ol/interaction\";\nimport { never as neverCondition } from \"ol/events/condition\";\n\nimport { pointAtFeatureVertex, ensureFeatureIsClockwise } from \"../../ol-helpers\";\nimport { MEASURE_DATA_TYPE } from \"../../data-types\";\nimport { calculateMeasureSlopeAdjustedDistance } from \"../measure/helpers\";\n\nexport default class Base {\n  constructor(controller) {\n    this.controller = controller;\n    this.settings = controller.settings;\n\n    this.project = controller.project;\n    this.mapModelSynchronizer = controller.mapModelSynchronizer;\n    this.mapManager = controller.mapManager;\n    this.map = this.mapManager.map;\n\n    this.currentModifyInteraction = undefined;\n  }\n\n  add() {\n    this.clearCurrentInteraction();\n    this.addPolygonModifyInteraction();\n    this.addMeasureModifyInteraction();\n    this.controller.snapInteractionManager.refresh();\n  }\n\n  addPolygonModifyInteraction() {\n    this.currentModifyInteraction = new Modify(this.polygonModifyInteractionParams);\n\n    this.currentModifyInteraction.on(\"modifystart\", this.modifyStart);\n    this.currentModifyInteraction.on(\"modifystart\", (event) => {\n      this.#hideGuidelinesForModifyingVertices(event);\n    });\n\n    this.currentModifyInteraction.on(\"modifyend\", this.modifyEnd);\n    this.currentModifyInteraction.on(\"modifyend\", (_event) => {\n      this.#showGuidelinesAfterModification();\n    });\n\n    this.map.addInteraction(this.currentModifyInteraction);\n  }\n\n  get polygonModifyInteractionParams() {\n    return { features: this.selectedPolygonFeatures };\n  }\n\n  get showShapeGuideLinesWhenModifying() {\n    return this.controller.shapeGuideLinesInteractionManager && this.settings.showShapeGuideLinesWhenSelecting;\n  }\n\n  shapeGuideLinesCall(method, features, from) {\n    if (!this.showShapeGuideLinesWhenModifying) return;\n\n    this.controller.shapeGuideLinesInteractionManager[method](features, `modify ${from}`);\n  }\n\n  addMeasureModifyInteraction() {\n    this.measureModifyInteraction = new Modify({\n      features: this.selectedMeasureFeatures,\n      insertVertexCondition: neverCondition,\n      condition: (event) => {\n        if (event.type !== \"pointerdown\") return false;\n\n        const map = event.map;\n        const pixel = event.pixel;\n        let isNearVertex = false;\n\n        map.forEachFeatureAtPixel(\n          pixel,\n          (feature) => {\n            const geometry = feature.getGeometry();\n\n            if (geometry.getType() !== \"LineString\") return;\n\n            const vertices = geometry.getCoordinates();\n            const coordinate = map.getCoordinateFromPixel(pixel);\n            const threshold = 10;\n            const thresholdDistance = map.getView().getResolution() * threshold;\n\n            isNearVertex = vertices.some((vertex) => {\n              const dx = vertex[0] - coordinate[0];\n              const dy = vertex[1] - coordinate[1];\n              return Math.sqrt(dx * dx + dy * dy) < thresholdDistance;\n            });\n          },\n          {\n            layerFilter: (layer) => {\n              return layer !== this.mapManager.shapeGuideLinesVectorLayer;\n            },\n          },\n        );\n\n        return isNearVertex;\n      },\n    });\n\n    this.measureModifyInteraction.on(\"modifystart\", this.measureModifyStart);\n    this.measureModifyInteraction.on(\"modifystart\", (event) => {\n      this.#hideGuidelinesForModifyingVertices(event);\n    });\n\n    this.measureModifyInteraction.on(\"modifyend\", this.measureModifyEnd);\n    this.measureModifyInteraction.on(\"modifyend\", (_event) => {\n      this.#showGuidelinesAfterModification();\n    });\n\n    this.map.addInteraction(this.measureModifyInteraction);\n  }\n\n  measureModifyStart = (_event) => {\n    const measuresVectorSource = this.mapManager.measuresVectorSource;\n    const measureFeaturesArray = measuresVectorSource.getFeatures();\n  };\n\n  measureModifyEnd = (_event) => {\n    const selectInteractionManager = this.controller.selectInteractionManager;\n    const selectedMeasures = selectInteractionManager.currentSelectInteraction\n      .getFeatures()\n      .getArray()\n      .filter((feature) => {\n        return feature.get(\"dataType\") === MEASURE_DATA_TYPE;\n      });\n    selectedMeasures.forEach((measureFeature) => {\n      measureFeature.set(\n        \"slopeAdjustedDistance\",\n        calculateMeasureSlopeAdjustedDistance(measureFeature, this.controller),\n      );\n    });\n  };\n\n  get selectedPolygonFeatures() {\n    const polygonFeatures = this.selectedFeatures.filter((feature) => {\n      const featureDataType = feature.get(\"dataType\");\n      return featureDataType && featureDataType !== MEASURE_DATA_TYPE;\n    });\n\n    return new Collection(polygonFeatures);\n  }\n\n  get selectedFeatures() {\n    return this.controller.selectInteractionManager.selectedFeatures;\n  }\n\n  get selectedMeasureFeatures() {\n    const measureFeatures = this.selectedFeatures.filter((feature) => {\n      return feature.get(\"dataType\") === MEASURE_DATA_TYPE;\n    });\n\n    return new Collection(measureFeatures);\n  }\n\n  remove() {\n    this.clearCurrentInteraction();\n  }\n\n  refresh() {\n    this.add();\n  }\n\n  modifyStart = (event) => {\n    const { features } = event;\n\n    if (!features) return;\n    features.forEach((feature) => this.modifyStartForFeature(feature));\n  };\n\n  modifyEnd = (event) => {\n    const { features } = event;\n\n    if (!features) return;\n\n    features.forEach((feature) => {\n      const selectedVertex = feature.get(\"selectedVertexCoordinates\");\n      if (selectedVertex) {\n        if (!pointAtFeatureVertex(feature, selectedVertex)) {\n          feature.unset(\"selectedVertexCoordinates\");\n        }\n      }\n\n      ensureFeatureIsClockwise(feature);\n      this.modifyEndForFeature(feature);\n    });\n\n    this.controller.markDirty();\n  };\n\n  modifyStartForFeature(_feature) {\n    // override in sub class\n  }\n\n  modifyEndForFeature(_feature) {\n    // override in sub class\n  }\n\n  #hideGuidelinesForModifyingVertices(event) {\n    if (!this.controller.shapeGuideLinesInteractionManager) return;\n\n    const { mapBrowserEvent } = event;\n    if (!mapBrowserEvent) return;\n\n    const clickCoordinate = mapBrowserEvent.coordinate;\n    const pixel = mapBrowserEvent.pixel;\n    const map = this.map;\n    const threshold = 10;\n    const thresholdDistance = map.getView().getResolution() * threshold;\n\n    const verticesToExclude = [];\n\n    map.forEachFeatureAtPixel(\n      pixel,\n      (feature) => {\n        const geometry = feature.getGeometry();\n        const geometryType = geometry.getType();\n\n        let coordinates = [];\n        if (geometryType === \"Polygon\") {\n          coordinates = geometry.getLinearRing(0).getCoordinates();\n        } else if (geometryType === \"LineString\") {\n          coordinates = geometry.getCoordinates();\n        }\n\n        coordinates.forEach((vertex) => {\n          const dx = vertex[0] - clickCoordinate[0];\n          const dy = vertex[1] - clickCoordinate[1];\n          const distance = Math.sqrt(dx * dx + dy * dy);\n\n          if (distance < thresholdDistance) {\n            verticesToExclude.push(vertex);\n          }\n        });\n      },\n      {\n        layerFilter: (layer) => {\n          return layer !== this.mapManager.shapeGuideLinesVectorLayer;\n        },\n      },\n    );\n\n    if (verticesToExclude.length > 0) {\n      this.controller.shapeGuideLinesInteractionManager.excludeVertices(verticesToExclude);\n      this.controller.shapeGuideLinesInteractionManager.render();\n    }\n  }\n\n  #showGuidelinesAfterModification() {\n    if (!this.controller.shapeGuideLinesInteractionManager) return;\n\n    this.controller.shapeGuideLinesInteractionManager.clearExcludedVertices();\n    this.shapeGuideLinesCall(\"update\", [], \"modifyend\");\n  }\n\n  clearCurrentInteraction() {\n    if (this.currentModifyInteraction) {\n      this.currentModifyInteraction.un(\"modifyend\", this.modifyEnd);\n      this.map.removeInteraction(this.currentModifyInteraction);\n      delete this.currentModifyInteraction;\n      this.currentModifyInteraction = undefined;\n    }\n\n    if (this.measureModifyInteraction) {\n      this.map.removeInteraction(this.measureModifyInteraction);\n      delete this.measureModifyInteraction;\n      this.measureModifyInteraction = undefined;\n    }\n  }\n}\n", "import DaBase from \"../../../../da/map/interaction-managers/modify/base\";\n\nexport default class EditArrays extends DaBase {}\n", "import { Translate } from \"ol/interaction\";\nimport { Collection } from \"ol\";\n\nimport { isARoofPlane, isARoofSection, isAMeasure, isAnObstruction, isAThermalExpansion } from \"../../ol-helpers\";\nimport { logger } from \"../../../../helpers/app\";\nimport { calculateMeasureSlopeAdjustedDistance } from \"../measure/helpers\";\n\nexport default class Base {\n  constructor(controller) {\n    this.controller = controller;\n    this.settings = controller.settings;\n\n    this.project = controller.project;\n    this.mapModelSynchronizer = controller.mapModelSynchronizer;\n    this.mapManager = controller.mapManager;\n    this.map = this.mapManager.map;\n\n    this.currentTranslationInteraction = undefined;\n  }\n\n  add() {\n    this.clearCurrentInteraction();\n\n    this.currentTranslationInteraction = new Translate({\n      features: this.translatableFeatures,\n      filter: this.isFeatureTranslatable,\n    });\n\n    this.currentTranslationInteraction.on(\"translatestart\", this.translateStart);\n\n    // We do this in the \"translating\" event handler because the \"translatestart\"\n    // event gets fired even when a user only selects a feature but doesn't move it\n    this.currentTranslationInteraction.on(\"translating\", (event) => {\n      const { features } = event;\n\n      if (!this.translatingFeatures) {\n        this.translatingFeatures = features.getArray();\n        this.addRemoveShapeGuideLines(this.translatingFeatures, \"remove\");\n      }\n    });\n\n    this.currentTranslationInteraction.on(\"translateend\", this.translateEnd);\n    this.currentTranslationInteraction.on(\"translateend\", (_event) => {\n      if (this.translatingFeatures) {\n        this.addRemoveShapeGuideLines(this.translatingFeatures, \"add\");\n        this.translatingFeatures = undefined;\n      }\n    });\n\n    this.map.addInteraction(this.currentTranslationInteraction);\n  }\n\n  addRemoveShapeGuideLines(features, type) {\n    if (!this.controller.shapeGuideLinesInteractionManager) return;\n\n    const shapesAndMeasures = features.filter((f) => {\n      const geometryType = f.getGeometry().getType();\n      return geometryType === \"Polygon\" || geometryType === \"LineString\";\n    });\n    this.shapeGuideLinesCall(type, shapesAndMeasures, \"addRemoveShapeGuideLines\");\n  }\n\n  get showShapeGuideLinesWhenTranslating() {\n    return this.controller.shapeGuideLinesInteractionManager && this.settings.showShapeGuideLinesWhenSelecting;\n  }\n\n  shapeGuideLinesCall(method, features, from) {\n    if (!this.showShapeGuideLinesWhenTranslating) return;\n\n    this.controller.shapeGuideLinesInteractionManager[method](features, `translate ${from}`);\n  }\n\n  isFeatureTranslatable(_feature) {\n    return true;\n  }\n\n  get translatableFeatures() {\n    const features = this.controller.selectInteractionManager.selectionCollection.getArray();\n    const filteredFeatures = features.filter((f) => !isAThermalExpansion(f));\n    return new Collection(filteredFeatures);\n  }\n\n  remove() {\n    this.clearCurrentInteraction();\n  }\n\n  clearCurrentInteraction() {\n    if (this.currentTranslationInteraction) {\n      this.map.removeInteraction(this.currentTranslationInteraction);\n      this.currentTranslationInteraction.un(\"translateend\", this.translateEnd);\n\n      delete this.currentTranslationInteraction;\n      this.currentTranslationInteraction = undefined;\n    }\n  }\n\n  translateStart = (event) => {\n    const { features } = event;\n\n    if (!features) return;\n    features.forEach((feature) => this.translateStartForFeature(feature));\n  };\n\n  translateEnd = (event) => {\n    const { features, startCoordinate, coordinate } = event;\n\n    if (!features) return;\n    if (startCoordinate[0] === coordinate[0] && startCoordinate[0] === coordinate[0]) return;\n\n    features.forEach((feature) => {\n      if (isARoofPlane(feature) || isARoofSection(feature) || isAnObstruction(feature)) {\n        this.translateEndForFeature(feature);\n      } else if (isAMeasure(feature)) {\n        logger(\"Translating measure\");\n        feature.set(\"slopeAdjustedDistance\", calculateMeasureSlopeAdjustedDistance(feature, this.controller));\n      }\n    });\n\n    this.controller.markDirty();\n    this.alreadyRemovedArray = false;\n  };\n\n  translateEndForFeature(_feature) {\n    // override in sub class\n  }\n\n  translateStartForFeature(_feature) {\n    // override in sub class\n  }\n}\n", "import { LineString, Polygon } from \"ol/geom\";\nimport { logger } from \"../../../../helpers/app\";\n\n// This function constrains a line being drawn to horizontal, vertical, or 45-degree diagonal orientation\n// when the user holds the \"c\" key. The constraint is relative to the browser window - after drawing,\n// the line becomes fixed map coordinates, so if the map is rotated the line will rotate with it.\n//\n// To use this functionality in your interaction manager class:\n//\n// 1. Import both the function and the mixin:\n//    import { constraintGeometryFunction, withConstraintMixin } from \"../helpers/constraint\";\n//\n// 2. Add the mixin to your class after the class definition:\n//    Object.assign(YourClass.prototype, withConstraintMixin);\n//\n// 3. Initialize the constraint functionality in your constructor:\n//    constructor(controller) {\n//      // ... your initialization code ...\n//      this.initConstraint();\n//    }\n//\n// 4. Add the geometry function to your Draw interaction:\n//    new Draw({\n//      // ... other options ...\n//      geometryFunction: (coordinates, geometry) =>\n//        constraintGeometryFunction(coordinates, geometry, this.map, this.constrainPressed),\n//    });\n//\n// 5. Attach/detach listeners in your add/remove methods:\n//    add() {\n//      this.attachConstraintListeners();\n//      // ... rest of add logic ...\n//    }\n//\n//    remove() {\n//      this.detachConstraintListeners();\n//      // ... rest of remove logic ...\n//    }\n//\n// See app/javascript/da/map/interaction-managers/measure/base.js for a complete example.\n\nconst DEBUG_LOGGING = false;\nconst SUPPORTED_GEOMETRY_TYPES = [\"LineString\", \"Polygon\"];\n\nexport const constraintGeometryFunction = (coordinates, geometry, map, constrainPressed, geometryType) => {\n  if (!SUPPORTED_GEOMETRY_TYPES.includes(geometryType)) {\n    throw new Error(`Unsupported geometry type passed to constraintGeometryFunction: ${geometryType}`);\n  }\n\n  if (DEBUG_LOGGING) {\n    logger(\"[constraint] constraintGeometryFunction\", {\n      geometryType,\n      coordinates,\n      constrainPressed,\n    });\n  }\n\n  if (!geometry) {\n    if (geometryType === \"LineString\") geometry = new LineString([]);\n    if (geometryType === \"Polygon\") geometry = new Polygon([coordinates]);\n  }\n\n  if (!constrainPressed) {\n    geometry.setCoordinates(coordinates);\n    return geometry;\n  }\n\n  let newCoords;\n\n  if (geometryType === \"LineString\") {\n    if (DEBUG_LOGGING) logger(\"[constraint] constraining line string\");\n\n    newCoords = constrainLineString(coordinates, map);\n  }\n\n  if (geometryType === \"Polygon\") {\n    if (DEBUG_LOGGING) logger(\"[constraint] constraining polygon\");\n\n    newCoords = constrainPolygon(coordinates, map);\n  }\n\n  geometry.setCoordinates(newCoords);\n  return geometry;\n};\n\n// Constrain the last segment of a line string\nfunction constrainLineString(coordinates, map) {\n  if (coordinates.length > 1) {\n    const lastIndex = coordinates.length - 1;\n    const secondLastIndex = lastIndex - 1;\n    const startCoord = coordinates[secondLastIndex];\n    const endCoord = coordinates[lastIndex];\n\n    const lockedEnd = applyAngleLock(startCoord, endCoord, map);\n    coordinates[lastIndex] = lockedEnd;\n  }\n  return coordinates;\n}\n\n// Constrain the last segment of a polygon\nfunction constrainPolygon(coordinates, map) {\n  if (coordinates.length > 0) {\n    const ring = coordinates[0];\n    if (ring.length > 1) {\n      const lastIndex = ring.length - 1;\n      const secondLastIndex = lastIndex - 1;\n\n      const startCoord = ring[secondLastIndex];\n      const endCoord = ring[lastIndex];\n      const lockedEnd = applyAngleLock(startCoord, endCoord, map);\n      ring[lastIndex] = lockedEnd;\n    }\n    coordinates[0] = ring;\n  }\n  return coordinates;\n}\n\nfunction applyAngleLock(startCoord, endCoord, map) {\n  const startPixel = map.getPixelFromCoordinate(startCoord);\n  const endPixel = map.getPixelFromCoordinate(endCoord);\n\n  const dx = endPixel[0] - startPixel[0];\n  const dy = endPixel[1] - startPixel[1];\n\n  // Screen Y increases downward, so negate dy for angle calculation\n  const angleRad = Math.atan2(-dy, dx);\n  const angleDeg = angleRad * (180 / Math.PI);\n\n  const normalizedAngle = ((angleDeg % 360) + 360) % 360;\n  const snappedAngle = Math.round(normalizedAngle / 45) * 45;\n  const distance = Math.sqrt(dx * dx + dy * dy);\n  const snappedRad = (snappedAngle * Math.PI) / 180;\n\n  const newEndPixel = [\n    startPixel[0] + distance * Math.cos(snappedRad),\n    startPixel[1] - distance * Math.sin(snappedRad),\n  ];\n\n  return map.getCoordinateFromPixel(newEndPixel);\n}\n\nexport function isRingClosed(ring) {\n  if (!ring || !ring.length) return false;\n  const firstCoordinate = ring[0];\n  const lastCoordinate = ring[ring.length - 1];\n  return (\n    firstCoordinate &&\n    lastCoordinate &&\n    firstCoordinate[0] === lastCoordinate[0] &&\n    firstCoordinate[1] === lastCoordinate[1]\n  );\n}\n\nexport const withConstraintMixin = {\n  initConstraint() {\n    this.constrainPressed = false;\n    this.constraintListenersAttached = false;\n\n    this.handleConstraintKeyDown = this.handleConstraintKeyDown.bind(this);\n    this.handleConstraintKeyUp = this.handleConstraintKeyUp.bind(this);\n\n    if (DEBUG_LOGGING) logger(\"[constraint] initialized constraint\");\n  },\n\n  attachConstraintListeners() {\n    if (!this.constraintListenersAttached) {\n      document.addEventListener(\"keydown\", this.handleConstraintKeyDown);\n      document.addEventListener(\"keyup\", this.handleConstraintKeyUp);\n      this.constraintListenersAttached = true;\n\n      if (DEBUG_LOGGING) logger(\"[constraint] attached constraint listeners\");\n    }\n  },\n\n  detachConstraintListeners() {\n    if (this.constraintListenersAttached) {\n      document.removeEventListener(\"keydown\", this.handleConstraintKeyDown);\n      document.removeEventListener(\"keyup\", this.handleConstraintKeyUp);\n      this.constraintListenersAttached = false;\n\n      if (DEBUG_LOGGING) logger(\"[constraint] detached constraint listeners\");\n    }\n  },\n\n  handleConstraintKeyDown(event) {\n    if (!event || !event.key) return;\n\n    if (event.key.toLowerCase() === \"c\") {\n      if (DEBUG_LOGGING) logger(\"[constraint] pressed 'c', now constraining\");\n\n      this.constrainPressed = true;\n    }\n  },\n\n  handleConstraintKeyUp(event) {\n    if (!event || !event.key) return;\n\n    if (event.key.toLowerCase() === \"c\") {\n      if (DEBUG_LOGGING) logger(\"[constraint] released 'c', now unconstrained\");\n\n      this.constrainPressed = false;\n    }\n  },\n\n  // Closing the polygon ring if not already closed. OpenLayers does this automatically\n  // when not supplying a custom geometry function for the draw interaction. However,\n  // if you supply a custom geometry function, like constraintGeometryFunction, you\n  // are on your own for closing the ring. Unfortunately, you can't just do this step\n  // in the geometry function itself because OpenLayers still does some cleanup after\n  // the drawing is complete, which ends up removing the closing coordinate for some\n  // reason. But, you can still do this step in the drawend event handler, which\n  // happens after OpenLayers is finished with its work.\n  constraintPolygonOnDrawEnd(event) {\n    const feature = event.feature;\n    if (!feature) return;\n\n    const geom = feature.getGeometry();\n    if (geom.getType() !== \"Polygon\") return;\n\n    const coords = geom.getCoordinates();\n    const ring = coords[0];\n\n    if (ring && ring.length && !isRingClosed(ring)) {\n      ring.push(ring[0]);\n      geom.setCoordinates([ring]);\n    }\n  },\n};\n", "// This mixin provides angle lock functionality for drawing interactions. When the user holds\n// the \"s\" key, the current line angle is locked, allowing distance-only adjustments while\n// keeping the direction fixed. This is useful for drawing precisely aligned segments.\n//\n// To use this functionality in your interaction manager class:\n//\n// 1. Import the mixin:\n//    import { withAngleLockMixin } from \"../helpers/angle-lock\";\n//\n// 2. Add the mixin to your class after the class definition:\n//    Object.assign(YourClass.prototype, withAngleLockMixin);\n//\n// 3. Initialize the angle lock functionality in your constructor:\n//    constructor(controller) {\n//      // ... your initialization code ...\n//      this.initAngleLock();\n//    }\n//\n// 4. Attach/detach listeners in your add/remove methods:\n//    add() {\n//      this.attachAngleLockListeners();\n//      // ... rest of add logic ...\n//    }\n//\n//    remove() {\n//      this.detachAngleLockListeners();\n//      // ... rest of remove logic ...\n//    }\n//\n// 5. Use getAngleForGuideline() to get the current or locked angle:\n//    const angle = this.getAngleForGuideline(lastVertex, currentPoint);\n\nexport const withAngleLockMixin = {\n  initAngleLock() {\n    this.angleLockPressed = false;\n    this.lockedAngleRad = null;\n    this.angleLockListenersAttached = false;\n\n    this.handleAngleLockKeyDown = this.handleAngleLockKeyDown.bind(this);\n    this.handleAngleLockKeyUp = this.handleAngleLockKeyUp.bind(this);\n  },\n\n  attachAngleLockListeners() {\n    if (!this.angleLockListenersAttached) {\n      document.addEventListener(\"keydown\", this.handleAngleLockKeyDown);\n      document.addEventListener(\"keyup\", this.handleAngleLockKeyUp);\n      this.angleLockListenersAttached = true;\n    }\n  },\n\n  detachAngleLockListeners() {\n    if (this.angleLockListenersAttached) {\n      document.removeEventListener(\"keydown\", this.handleAngleLockKeyDown);\n      document.removeEventListener(\"keyup\", this.handleAngleLockKeyUp);\n      this.angleLockListenersAttached = false;\n    }\n  },\n\n  handleAngleLockKeyDown(event) {\n    if (!event || !event.key) return;\n\n    if (event.key.toLowerCase() === \"s\") {\n      this.lockCurrentAngle();\n    }\n  },\n\n  handleAngleLockKeyUp(event) {\n    if (!event || !event.key) return;\n    // Don't check INPUT on keyup - we want to unlock even if focus moved to an input\n    // This handles the case where user presses 's' to lock, then clicks in input while\n    // still holding 's', then releases 's' - we need to unlock properly\n\n    if (event.key.toLowerCase() === \"s\") {\n      this.unlockAngle();\n    }\n  },\n\n  lockCurrentAngle() {\n    const interaction = this.currentDrawInteraction || this.currentMeasureInteraction;\n    if (!interaction || !interaction.feature) return;\n\n    const geometry = interaction.feature.getGeometry();\n    const geometryType = geometry.getType();\n    const coordinates = geometryType === \"Polygon\" ? geometry.getCoordinates()[0] : geometry.getCoordinates();\n\n    if (coordinates.length < 2) return;\n\n    const lastVertex = coordinates[coordinates.length - 2];\n    const currentPoint = coordinates[coordinates.length - 1];\n\n    const startPixel = this.map.getPixelFromCoordinate(lastVertex);\n    const endPixel = this.map.getPixelFromCoordinate(currentPoint);\n\n    const dx = endPixel[0] - startPixel[0];\n    const dy = endPixel[1] - startPixel[1];\n\n    this.lockedAngleRad = Math.atan2(dy, dx);\n    this.angleLockPressed = true;\n  },\n\n  unlockAngle() {\n    this.angleLockPressed = false;\n    this.lockedAngleRad = null;\n  },\n\n  getAngleForGuideline(lastVertex, currentPoint) {\n    if (this.angleLockPressed && this.lockedAngleRad !== null) {\n      return this.lockedAngleRad;\n    }\n\n    const startPixel = this.map.getPixelFromCoordinate(lastVertex);\n    const endPixel = this.map.getPixelFromCoordinate(currentPoint);\n\n    const dx = endPixel[0] - startPixel[0];\n    const dy = endPixel[1] - startPixel[1];\n\n    return Math.atan2(dy, dx);\n  },\n\n  // Apply angle lock to coordinates - projects the cursor position onto the locked angle\n  applyAngleLockToCoordinates(coordinates) {\n    if (!this.angleLockPressed || this.lockedAngleRad === null) {\n      return coordinates;\n    }\n\n    if (coordinates.length < 2) {\n      return coordinates;\n    }\n\n    const lastIndex = coordinates.length - 1;\n    const secondLastIndex = lastIndex - 1;\n    const startCoord = coordinates[secondLastIndex];\n    const endCoord = coordinates[lastIndex];\n\n    const startPixel = this.map.getPixelFromCoordinate(startCoord);\n    const endPixel = this.map.getPixelFromCoordinate(endCoord);\n\n    const dx = endPixel[0] - startPixel[0];\n    const dy = endPixel[1] - startPixel[1];\n\n    // Calculate signed distance along locked angle using dot product\n    // This allows negative distances (dragging past start vertex)\n    const cosAngle = Math.cos(this.lockedAngleRad);\n    const sinAngle = Math.sin(this.lockedAngleRad);\n    const signedDistance = dx * cosAngle + dy * sinAngle;\n\n    const newEndPixel = [startPixel[0] + signedDistance * cosAngle, startPixel[1] + signedDistance * sinAngle];\n\n    coordinates[lastIndex] = this.map.getCoordinateFromPixel(newEndPixel);\n    return coordinates;\n  },\n};\n", "import { distanceBetweenCoordinatesInInches } from \"../../ol-helpers\";\n\nexport const withLineLengthMenuMixin = {\n  startLineLengthMenu(feature) {\n    this.controller.showLineLengthMenu();\n    this.lineLengthMenuActive = true;\n\n    const geometry = feature.getGeometry();\n\n    this.geometryChangeListener = geometry.on(\"change\", () => {\n      this.updateLineLengthFromGeometry(geometry);\n    });\n  },\n\n  updateLineLengthFromGeometry(geometry) {\n    const geometryType = geometry.getType();\n    let coordinates;\n\n    if (geometryType === \"Polygon\") {\n      coordinates = geometry.getCoordinates()[0];\n    } else if (geometryType === \"LineString\") {\n      coordinates = geometry.getCoordinates();\n    } else {\n      return;\n    }\n\n    if (coordinates.length < 2) {\n      this.controller.updateLineLengthMenuValues(0, 0);\n      if (this.lineLengthMenuActive && this.controller.shapeGuideLinesInteractionManager) {\n        this.controller.shapeGuideLinesInteractionManager.clearExtendedGuideline();\n      }\n      return;\n    }\n\n    const lastVertex = coordinates[coordinates.length - 2];\n    const currentPoint = coordinates[coordinates.length - 1];\n\n    const distanceInInches = distanceBetweenCoordinatesInInches(lastVertex, currentPoint);\n    let feet = Math.floor(distanceInInches / 12);\n    let inches = Math.round(distanceInInches % 12);\n\n    if (inches === 12) {\n      feet += 1;\n      inches = 0;\n    }\n\n    this.controller.updateLineLengthMenuValues(feet, inches);\n\n    if (this.lineLengthMenuActive) {\n      this.updateExtendedGuideline(geometry);\n    }\n  },\n\n  updateExtendedGuideline(geometry) {\n    const geometryType = geometry.getType();\n    const coordinates = geometryType === \"Polygon\" ? geometry.getCoordinates()[0] : geometry.getCoordinates();\n\n    if (coordinates.length < 2 || !this.controller.settings.showShapeGuideLinesWhenDrawing) {\n      if (this.controller.shapeGuideLinesInteractionManager) {\n        this.controller.shapeGuideLinesInteractionManager.clearExtendedGuideline();\n        this.controller.shapeGuideLinesInteractionManager.clearGuideVertex();\n      }\n      return;\n    }\n\n    const lastVertex = coordinates[coordinates.length - 2];\n    const currentPoint = coordinates[coordinates.length - 1];\n\n    const angle = this.getAngleForGuideline(lastVertex, currentPoint);\n\n    if (this.controller.shapeGuideLinesInteractionManager) {\n      this.controller.shapeGuideLinesInteractionManager.addExtendedGuidelineAtAngle(lastVertex, angle);\n\n      if (this.guideVertexDistance > 0) {\n        this.controller.shapeGuideLinesInteractionManager.addGuideVertex(lastVertex, angle, this.guideVertexDistance);\n      } else {\n        this.controller.shapeGuideLinesInteractionManager.clearGuideVertex();\n      }\n    }\n  },\n\n  stopLineLengthMenu(feature) {\n    this.lineLengthMenuActive = false;\n\n    if (this.geometryChangeListener) {\n      const geometry = feature.getGeometry();\n      geometry.un(\"change\", this.geometryChangeListener);\n      this.geometryChangeListener = null;\n    }\n\n    this.controller.hideLineLengthMenu();\n\n    if (this.controller.shapeGuideLinesInteractionManager) {\n      this.controller.shapeGuideLinesInteractionManager.clearExtendedGuideline();\n      this.controller.shapeGuideLinesInteractionManager.clearGuideVertex();\n    }\n  },\n};\n", "import { Draw } from \"ol/interaction\";\nimport { LineString } from \"ol/geom\";\n\nimport { measureDrawStyle } from \"../../styles/measures\";\nimport { MEASURE_DATA_TYPE } from \"../../data-types\";\nimport { calculateMeasureSlopeAdjustedDistance } from \"./helpers\";\nimport { constraintGeometryFunction, withConstraintMixin } from \"../helpers/constraint\";\nimport { withAngleLockMixin } from \"../helpers/angle-lock\";\nimport { withLineLengthMenuMixin } from \"../helpers/line-length-menu\";\n\nexport default class Base {\n  constructor(controller) {\n    this.controller = controller;\n    this.settings = controller.settings;\n\n    this.mapManager = controller.mapManager;\n    this.map = this.mapManager.map;\n    this.measuresVectorSource = this.mapManager.measuresVectorSource;\n\n    this.measureBtnTarget = controller.measureBtnTarget;\n\n    this.initConstraint();\n    this.initAngleLock();\n\n    this.guideVertexDistance = 0;\n  }\n\n  add() {\n    if (this.currentMeasureInteraction) return;\n\n    this.attachConstraintListeners();\n    this.attachAngleLockListeners();\n    this.clearCurrentInteraction();\n\n    this.currentMeasureInteraction = new Draw({\n      source: this.measuresVectorSource,\n      type: \"LineString\",\n      maxPoints: 2,\n      style: (feature) => measureDrawStyle(feature, this.map),\n      geometryFunction: (coordinates, geometry) => {\n        // Apply 'c' key constraint first\n        let modifiedCoords = coordinates;\n        if (this.constrainPressed) {\n          const tempGeometry = constraintGeometryFunction(\n            coordinates,\n            geometry,\n            this.map,\n            this.constrainPressed,\n            \"LineString\",\n          );\n          modifiedCoords = tempGeometry.getCoordinates();\n        }\n\n        // Apply 's' key angle lock\n        if (this.angleLockPressed && this.lockedAngleRad !== null) {\n          if (modifiedCoords.length > 0) {\n            modifiedCoords = this.applyAngleLockToCoordinates(modifiedCoords);\n          }\n        }\n\n        // Set final coordinates on geometry\n        if (!geometry) {\n          geometry = new LineString(modifiedCoords);\n        } else {\n          geometry.setCoordinates(modifiedCoords);\n        }\n\n        return geometry;\n      },\n    });\n\n    this.currentMeasureInteraction.on(\"drawstart\", this.onDrawStart);\n    this.currentMeasureInteraction.on(\"drawstart\", (e) => {\n      const { feature } = e;\n\n      feature.set(\"dataType\", MEASURE_DATA_TYPE);\n      feature.set(\"drawing\", true);\n      this.currentMeasureInteraction.feature = feature;\n    });\n    this.currentMeasureInteraction.on(\"drawstart\", this.addFeatureToShapeGuideLines);\n\n    this.mapManager.onClick(this.updateFeatureInShapeGuideLines);\n\n    this.currentMeasureInteraction.on(\"drawend\", (e) => {\n      e.feature.set(\"drawing\", false);\n      this.currentMeasureInteraction.feature = undefined;\n    });\n    this.currentMeasureInteraction.on(\"drawend\", this.removeFeatureFromShapeGuideLines);\n    this.currentMeasureInteraction.on(\"drawend\", this.onDrawEnd);\n\n    this.map.addInteraction(this.currentMeasureInteraction);\n    this.controller.snapInteractionManager.refresh();\n  }\n\n  remove() {\n    if (!this.currentMeasureInteraction) return;\n\n    this.detachConstraintListeners();\n    this.detachAngleLockListeners();\n    this.clearCurrentInteraction();\n  }\n\n  clearCurrentInteraction() {\n    if (this.currentMeasureInteraction) {\n      this.mapManager.unClick(this.updateFeatureInShapeGuideLines);\n      this.shapeGuideLinesCall(\"remove\", this.currentMeasureInteraction.feature, \"clearCurrentInteraction\");\n\n      this.map.removeInteraction(this.currentMeasureInteraction);\n      delete this.currentMeasureInteraction;\n      this.currentMeasureInteraction = undefined;\n    }\n  }\n\n  onDrawStart = (event) => {\n    this.startLineLengthMenu(event.feature);\n  };\n\n  onDrawEnd = (event) => {\n    const measureFeature = event.feature;\n\n    this.stopLineLengthMenu(measureFeature);\n    measureFeature.set(\"slopeAdjustedDistance\", calculateMeasureSlopeAdjustedDistance(measureFeature, this.controller));\n  };\n\n  finish() {\n    if (!this.currentMeasureInteraction) return;\n\n    this.currentMeasureInteraction.finishDrawing();\n\n    const drawingSource = this.mapManager.measuresVectorSource;\n    const features = drawingSource.getFeatures();\n    const lastFeature = features[features.length - 1];\n    drawingSource.removeFeature(lastFeature);\n  }\n\n  shapeGuideLinesCall(method, features, from) {\n    if (!this.showShapeGuideLinesWhenDrawing) return;\n\n    this.controller.shapeGuideLinesInteractionManager[method](features, `measure ${from}`);\n  }\n\n  get showShapeGuideLinesWhenDrawing() {\n    return this.controller.shapeGuideLinesInteractionManager && this.settings.showShapeGuideLinesWhenDrawing;\n  }\n\n  addFeatureToShapeGuideLines = (event) => {\n    this.shapeGuideLinesCall(\"add\", event.feature, \"drawstart addFeatureToShapeGuideLines\");\n  };\n\n  updateFeatureInShapeGuideLines = (_event) => {\n    this.shapeGuideLinesCall(\n      \"update\",\n      this.currentMeasureInteraction.feature,\n      \"drawclick updateFeatureInShapeGuideLines\",\n    );\n  };\n\n  removeFeatureFromShapeGuideLines = (event) => {\n    this.shapeGuideLinesCall(\"remove\", event.feature, \"drawend removeFeatureFromShapeGuideLines\");\n  };\n}\n\nObject.assign(Base.prototype, withConstraintMixin);\nObject.assign(Base.prototype, withAngleLockMixin);\nObject.assign(Base.prototype, withLineLengthMenuMixin);\n", "import Feature from \"ol/Feature\";\nimport LineString from \"ol/geom/LineString\";\nimport { Point } from \"ol/geom\";\n\nimport { logger, warn } from \"../../../../helpers/app\";\nimport { distanceBetweenCoordinatesInInches } from \"../../ol-helpers\";\nimport {\n  OBSTRUCTION_DATA_TYPE,\n  ROOF_PLANE_DATA_TYPE,\n  ROOF_SECTION_DATA_TYPE,\n  MEASURE_DATA_TYPE,\n  EXTENDED_GUIDELINE_DATA_TYPE,\n  GUIDE_VERTEX_DATA_TYPE,\n  EXTENDED_GUIDELINE_SNAP_POINT_DATA_TYPE,\n} from \"../../data-types\";\n\nconst DEBUG_LOGGING = false;\n\nexport default class Base {\n  constructor(controller) {\n    this.controller = controller;\n    this.mapManager = controller.mapManager;\n    this.sourceFeatures = [];\n    this.settings = controller.settings;\n    this.excludedVertices = new Set();\n  }\n\n  add(features, from) {\n    logger(`[shapeGuideLines] add`, from, features);\n\n    const featuresToAdd = Array.isArray(features) ? features : [features];\n\n    featuresToAdd.forEach((feature) => {\n      if (this.sourceFeatures.includes(feature)) return;\n      if (!this.#validFeature(feature)) return;\n\n      this.sourceFeatures.push(feature);\n    });\n\n    this.render();\n  }\n\n  update(features = [], from) {\n    logger(`[shapeGuideLines] update`, from, features);\n\n    const featuresToUpdate = Array.isArray(features) ? features : [features];\n\n    featuresToUpdate.forEach((feature) => {\n      if (!this.sourceFeatures.includes(feature)) {\n        this.sourceFeatures.push(feature);\n      }\n    });\n\n    this.render();\n  }\n\n  remove(features, from) {\n    logger(`[shapeGuideLines] remove`, from, features);\n\n    const featuresToRemove = Array.isArray(features) ? features : [features];\n\n    this.sourceFeatures = this.sourceFeatures.filter((f) => !featuresToRemove.includes(f));\n\n    this.render();\n  }\n\n  clear() {\n    this.sourceFeatures = [];\n    this.clearFeatures();\n  }\n\n  clearFeatures() {\n    this.mapManager.shapeGuideLinesVectorSource.clear();\n  }\n\n  excludeVertices(vertices) {\n    vertices.forEach((vertex) => {\n      const key = vertex.join(\",\");\n      this.excludedVertices.add(key);\n    });\n  }\n\n  clearExcludedVertices() {\n    this.excludedVertices.clear();\n  }\n\n  addExtendedGuideline(startVertex, cursorPosition) {\n    if (!startVertex || !cursorPosition) return;\n\n    const startPixel = this.mapManager.map.getPixelFromCoordinate(startVertex);\n    const cursorPixel = this.mapManager.map.getPixelFromCoordinate(cursorPosition);\n\n    const dx = cursorPixel[0] - startPixel[0];\n    const dy = cursorPixel[1] - startPixel[1];\n    const angle = Math.atan2(dy, dx);\n\n    this.addExtendedGuidelineAtAngle(startVertex, angle);\n  }\n\n  addExtendedGuidelineAtAngle(startVertex, angleRad) {\n    if (!startVertex) return;\n\n    this.clearExtendedGuideline();\n\n    const lineCoordinates = this.#calculateExtendedGuidelineCoordinatesAtAngle(startVertex, angleRad);\n\n    const geometry = new LineString(lineCoordinates);\n    const feature = new Feature({ geometry, type: EXTENDED_GUIDELINE_DATA_TYPE });\n\n    this.extendedGuidelineFeature = feature;\n    this.#addFeature(feature);\n\n    this.#addExtendedGuidelineIntersectionSnapPoints(lineCoordinates);\n  }\n\n  clearExtendedGuideline() {\n    if (this.extendedGuidelineFeature) {\n      this.mapManager.shapeGuideLinesVectorSource.removeFeature(this.extendedGuidelineFeature);\n      this.extendedGuidelineFeature = null;\n    }\n\n    if (this.extendedGuidelineSnapPoints) {\n      this.extendedGuidelineSnapPoints.forEach((feature) => {\n        this.mapManager.shapeGuideLinesVectorSource.removeFeature(feature);\n      });\n      this.extendedGuidelineSnapPoints = [];\n    }\n  }\n\n  addGuideVertex(startVertex, angleRad, distanceInches) {\n    if (!startVertex || distanceInches <= 0) {\n      this.clearGuideVertex();\n      return;\n    }\n\n    this.clearGuideVertex();\n\n    const coordinate = this.#calculatePointAtDistance(startVertex, angleRad, distanceInches);\n\n    const geometry = new Point(coordinate);\n    const feature = new Feature({ geometry, type: GUIDE_VERTEX_DATA_TYPE });\n\n    this.guideVertexFeature = feature;\n    this.#addFeature(feature);\n  }\n\n  clearGuideVertex() {\n    if (this.guideVertexFeature) {\n      this.mapManager.shapeGuideLinesVectorSource.removeFeature(this.guideVertexFeature);\n      this.guideVertexFeature = null;\n    }\n  }\n\n  #calculatePointAtDistance(startVertex, angleRad, distanceInches) {\n    const map = this.mapManager.map;\n\n    // Start from startVertex and extend along the angle until we reach the desired distance\n    // We'll use binary search to find the coordinate at the exact distance\n    const startPixel = map.getPixelFromCoordinate(startVertex);\n\n    // Estimate initial pixel distance (rough approximation)\n    const pixelDistance = distanceInches * 10; // rough guess: 10 pixels per inch at typical zoom\n\n    const endPixel = [\n      startPixel[0] + pixelDistance * Math.cos(angleRad),\n      startPixel[1] + pixelDistance * Math.sin(angleRad),\n    ];\n\n    let testCoord = map.getCoordinateFromPixel(endPixel);\n    let actualDistance = distanceBetweenCoordinatesInInches(startVertex, testCoord);\n\n    // Adjust by the ratio to get closer\n    const ratio = distanceInches / actualDistance;\n    const adjustedPixelDistance = pixelDistance * ratio;\n\n    const finalPixel = [\n      startPixel[0] + adjustedPixelDistance * Math.cos(angleRad),\n      startPixel[1] + adjustedPixelDistance * Math.sin(angleRad),\n    ];\n\n    return map.getCoordinateFromPixel(finalPixel);\n  }\n\n  #addExtendedGuidelineIntersectionSnapPoints(extendedLineCoords) {\n    const intersectionPoints = [];\n\n    this.shapeGuideLineLineFeatures.forEach((guideLineFeature) => {\n      const guideLineCoords = guideLineFeature.getGeometry().getCoordinates();\n      const intersection = this.#getSegmentIntersection(extendedLineCoords, guideLineCoords);\n\n      if (intersection) {\n        const key = intersection.join(\",\");\n        intersectionPoints.push({ key, point: intersection });\n      }\n    });\n\n    const uniquePoints = new Map();\n    intersectionPoints.forEach(({ key, point }) => {\n      if (!uniquePoints.has(key)) {\n        uniquePoints.set(key, point);\n      }\n    });\n\n    this.extendedGuidelineSnapPoints = [];\n\n    uniquePoints.forEach((point) => {\n      const geometry = new Point(point);\n      const feature = new Feature({ geometry, type: EXTENDED_GUIDELINE_SNAP_POINT_DATA_TYPE });\n\n      this.extendedGuidelineSnapPoints.push(feature);\n      this.#addFeature(feature);\n    });\n  }\n\n  #calculateExtendedGuidelineCoordinatesAtAngle(startVertex, angleRad) {\n    const map = this.mapManager.map;\n    const [sizeX, sizeY] = map.getSize();\n\n    const startPixel = map.getPixelFromCoordinate(startVertex);\n    const maxDistance = Math.sqrt(sizeX * sizeX + sizeY * sizeY) * 2;\n\n    const forwardEndPixel = [\n      startPixel[0] + Math.cos(angleRad) * maxDistance,\n      startPixel[1] + Math.sin(angleRad) * maxDistance,\n    ];\n    const backwardEndPixel = [\n      startPixel[0] - Math.cos(angleRad) * maxDistance,\n      startPixel[1] - Math.sin(angleRad) * maxDistance,\n    ];\n\n    const forwardEndCoord = map.getCoordinateFromPixel(forwardEndPixel);\n    const backwardEndCoord = map.getCoordinateFromPixel(backwardEndPixel);\n\n    return [backwardEndCoord, forwardEndCoord];\n  }\n\n  render() {\n    this.clearFeatures();\n\n    this.shapeGuideLineLines = new Set();\n    this.shapeGuideLineLineFeatures = [];\n\n    const seenVertices = new Set();\n    this.#sourceFeatureVertices.forEach((vertex) => {\n      try {\n        const key = vertex.join(\",\");\n        if (!seenVertices.has(key) && !this.excludedVertices.has(key)) {\n          seenVertices.add(key);\n          this.#addShapeGuideLineAtVertex(vertex);\n        }\n      } catch (e) {\n        debugger;\n      }\n    });\n\n    this.#addSnapPoints();\n  }\n\n  // rotate, zoom, or drag\n  onMapChange = () => {\n    this.render();\n  };\n\n  #validFeature(feature) {\n    const geometry = feature.getGeometry();\n    const drawing = feature.get(\"drawing\");\n    const geometryType = geometry.getType();\n    const isValidGeometry =\n      drawing ||\n      (geometryType === \"LineString\" && geometry.getCoordinates().length > 0) ||\n      (geometryType === \"Polygon\" && geometry.getArea() > 0);\n\n    if (!isValidGeometry) {\n      // Sometimes OpenLayers will add a feature with an area of 0 to a vector source, but\n      // then do cleanup later and remove the feature.  We are tying into some of the\n      // vector sources' addfeature events, and for some reason, the cleanup that removes\n      // the feature doesn't trigger the removefeature event.  So we need to check for and\n      // ignore these features.\n      logger(\"[shapeGuideLines]\", feature, \"ignoring feature with area 0\");\n\n      return false;\n    }\n\n    const dataType = feature.get(\"dataType\");\n\n    if (!dataType) {\n      warn(`[shapeGuideLines] empty data type`, feature);\n      return false;\n    }\n\n    const validDataTypes = [ROOF_PLANE_DATA_TYPE, ROOF_SECTION_DATA_TYPE, OBSTRUCTION_DATA_TYPE, MEASURE_DATA_TYPE];\n    if (!validDataTypes.includes(dataType)) {\n      warn(`[shapeGuideLines] invalid data type`, dataType);\n      return false;\n    }\n\n    return this.#isFeatureInMapLayers(feature);\n  }\n\n  #isFeatureInMapLayers(feature) {\n    if (feature.get(\"drawing\")) return true;\n\n    if (!this.mapManager || !this.mapManager.map) return false;\n\n    const mapLayers = this.mapManager.map\n      .getLayers()\n      .getArray()\n      .filter((layer) => layer.getSource && typeof layer.getSource === \"function\");\n\n    return mapLayers.some((layer) => {\n      if (!layer.getVisible()) return false;\n\n      const source = layer.getSource();\n      if (!source || !source.getFeatures || typeof source.getFeatures !== \"function\") {\n        return false;\n      }\n\n      return source.getFeatures().some((f) => f === feature);\n    });\n  }\n\n  #addShapeGuideLineAtVertex(vertex) {\n    if (!vertex) return;\n\n    const [topBottomLine, leftRightLine] = this.#shapeGuideLineLineCoordinatesForVertex(vertex);\n\n    this.addShapeGuideLineLine(topBottomLine, \"lineVertical\");\n    this.addShapeGuideLineLine(leftRightLine, \"lineHorizontal\");\n  }\n\n  addShapeGuideLineLine(coordinates, type) {\n    const key = coordinates.map((c) => c.join(\",\")).join(\";\");\n    if (this.shapeGuideLineLines.has(key)) return;\n\n    this.shapeGuideLineLines.add(key);\n    const geometry = new LineString(coordinates);\n    const feature = new Feature({ geometry, type });\n\n    this.shapeGuideLineLineFeatures.push(feature);\n    this.#addFeature(feature);\n  }\n\n  get #sourceFeatureVertices() {\n    return this.#sourceFeaturesRenderedOnMap.flatMap((f) => {\n      const geometry = f.getGeometry();\n\n      if (geometry.getType() === \"Polygon\") {\n        const coordinates = geometry.getLinearRing(0).getCoordinates();\n\n        // If polygon is being drawn, exclude the last coordinate (undropped vertex)\n        if (f.get(\"drawing\") && coordinates.length > 1) {\n          return coordinates.slice(0, -1);\n        }\n\n        return coordinates;\n      } else if (geometry.getType() === \"LineString\") {\n        return geometry.getCoordinates();\n      } else if (geometry.getType() === \"Point\") {\n        return [];\n      } else {\n        debugger;\n      }\n    });\n  }\n\n  get #sourceFeaturesRenderedOnMap() {\n    return this.sourceFeatures.filter((feature) => {\n      const shownOnMap = this.#isFeatureInMapLayers(feature);\n\n      let showFeature = true;\n\n      const dataType = feature.get(\"dataType\");\n      if (dataType === ROOF_PLANE_DATA_TYPE && !this.settings.showShapeGuideLinesForRoofPlanes) {\n        showFeature = false;\n      }\n\n      if (dataType === ROOF_SECTION_DATA_TYPE && !this.settings.showShapeGuideLinesForRoofSections) {\n        showFeature = false;\n      }\n\n      if (dataType === OBSTRUCTION_DATA_TYPE && !this.settings.showShapeGuideLinesForObstructions) {\n        showFeature = false;\n      }\n\n      if (dataType === MEASURE_DATA_TYPE && !this.settings.showShapeGuideLinesForMeasures) {\n        showFeature = false;\n      }\n\n      return shownOnMap && showFeature;\n    });\n  }\n\n  #addFeature(feature) {\n    this.mapManager.shapeGuideLinesVectorSource.addFeature(feature);\n  }\n\n  #shapeGuideLineLineCoordinatesForVertex(vertex) {\n    const map = this.mapManager.map;\n    const [sizeX, sizeY] = map.getSize();\n\n    const vertexPixels = map.getPixelFromCoordinate(vertex);\n    const [vertexX, vertexY] = vertexPixels;\n\n    const topPixels = [vertexX, 0];\n    const bottomPixels = [vertexX, sizeY];\n\n    const leftPixels = [0, vertexY];\n    const rightPixels = [sizeX, vertexY];\n\n    const topCoordinates = map.getCoordinateFromPixel(topPixels);\n    const bottomCoordinates = map.getCoordinateFromPixel(bottomPixels);\n    const leftCoordinates = map.getCoordinateFromPixel(leftPixels);\n    const rightCoordinates = map.getCoordinateFromPixel(rightPixels);\n\n    return [\n      [topCoordinates, bottomCoordinates],\n      [leftCoordinates, rightCoordinates],\n    ];\n  }\n\n  // You can snap to the shapeGuideLine lines but when the lines intersect you need another feature\n  // to snap to the intersection, otherwise the snap will follow one line edge or the other.\n  #addSnapPoints() {\n    const snapPointsSet = new Set();\n    const snapPoints = [];\n\n    for (let i = 0; i < this.shapeGuideLineLineFeatures.length; i++) {\n      const line1 = this.shapeGuideLineLineFeatures[i].getGeometry().getCoordinates();\n      for (let j = i + 1; j < this.shapeGuideLineLineFeatures.length; j++) {\n        const line2 = this.shapeGuideLineLineFeatures[j].getGeometry().getCoordinates();\n        const intersection = this.#getSegmentIntersection(line1, line2);\n        if (intersection) {\n          const key = intersection.join(\",\");\n          if (!snapPointsSet.has(key)) {\n            snapPointsSet.add(key);\n            snapPoints.push(intersection);\n          }\n        }\n      }\n    }\n\n    if (DEBUG_LOGGING) logger(`[shapeGuideLine] addSnapPoints (${snapPoints.length})`, snapPoints);\n\n    snapPoints.forEach((vertex) => {\n      const geometry = new Point(vertex);\n      const feature = new Feature({ geometry, type: \"snapPoint\" });\n      this.#addFeature(feature);\n    });\n  }\n\n  #getSegmentIntersection(segment1, segment2) {\n    const [[x1, y1], [x2, y2]] = segment1;\n    const [[x3, y3], [x4, y4]] = segment2;\n\n    const denominator = (x1 - x2) * (y3 - y4) - (y1 - y2) * (x3 - x4);\n    if (denominator === 0) return null;\n\n    const t = ((x1 - x3) * (y3 - y4) - (y1 - y3) * (x3 - x4)) / denominator;\n    const u = ((x1 - x3) * (y1 - y2) - (y1 - y3) * (x1 - x2)) / denominator;\n\n    if (t >= 0 && t <= 1 && u >= 0 && u <= 1) {\n      const intersectX = x1 + t * (x2 - x1);\n      const intersectY = y1 + t * (y2 - y1);\n      return [intersectX, intersectY];\n    }\n\n    return null;\n  }\n}\n", "import { fromLonLat, toLonLat } from \"ol/proj\";\nimport CellPositioner from \"./cell-positioner\";\nimport {\n  CELL_DRAW_STYLE_EMPTY,\n  CELL_DRAW_STYLE_PRESENT,\n  CELL_DRAW_STYLE_PRESENT_WITH_ERROR,\n  CELL_DRAW_STYLE_OBSTRUCTED_EMPTY,\n  CELL_DRAW_STYLE_OBSTRUCTED_PRESENT,\n  CELL_DRAW_STYLE_OBSTRUCTED_PRESENT_WITH_ERROR,\n} from \"../../models/layout-model\";\n\nconst CHAR_PRESENT = \"P\";\nconst CHAR_EMPTY = \"0\";\nconst CHAR_OBSTRUCTED = \"B\";\nconst CHAR_ERROR = \"E\";\nconst CHAR_NOT_RENDERED = \" \";\nconst CHAR_UNKNOWN = \"?\";\n\n/**\n * Panel Grid State for debugging and testing.\n * Provides live information about grid positioning, rendering, and geometry.\n * All getters read current state - no caching.\n */\nexport class PanelGridState {\n  constructor(controller) {\n    if (!controller?.mapManager?.map) {\n      throw new Error(\"Controller with map is required\");\n    }\n\n    if (!controller.roofSection?.layout) {\n      throw new Error(\"Controller must have a roofSection with layout\");\n    }\n\n    this.controller = controller;\n  }\n\n  get viewport() {\n    const mapSize = this.controller.mapManager.map.getSize();\n    return {\n      width: mapSize ? mapSize[0] : null,\n      height: mapSize ? mapSize[1] : null,\n    };\n  }\n\n  get offset() {\n    const roofSection = this.controller.roofSection;\n    return {\n      latLng: {\n        lat: roofSection.offset.lat,\n        lng: roofSection.offset.lng,\n      },\n      cartesian: {\n        x: roofSection.offsetCartesianPoint.x,\n        y: roofSection.offsetCartesianPoint.y,\n      },\n    };\n  }\n\n  get anchor() {\n    const roofSection = this.controller.roofSection;\n    const firstVertex = roofSection.boundingBox?.[0];\n    if (!firstVertex) return null;\n\n    const lat = firstVertex.lat + roofSection.offset.lat;\n    const lng = firstVertex.lng + roofSection.offset.lng;\n    return {\n      latLng: { lat, lng },\n      pixels: this.#toPixels(lat, lng),\n    };\n  }\n\n  get offsetState() {\n    const roofSection = this.controller.roofSection;\n    const project = this.controller.project;\n    const firstVertex = roofSection.boundingBox?.[0];\n\n    if (!firstVertex) return null;\n\n    // First vertex position (fixed reference point)\n    const firstVertexData = {\n      latLng: { lat: firstVertex.lat, lng: firstVertex.lng },\n      pixels: this.#toPixels(firstVertex.lat, firstVertex.lng),\n    };\n\n    // Offset as lat/lng delta\n    const offsetLatLng = {\n      lat: roofSection.offset.lat,\n      lng: roofSection.offset.lng,\n    };\n\n    // Offset as cartesian (meters)\n    const offsetCartesian = {\n      x: roofSection.offsetCartesianPoint.x,\n      y: roofSection.offsetCartesianPoint.y,\n    };\n\n    // Calculate offset in pixels (delta from firstVertex to anchor)\n    const anchor = this.anchor;\n    let offsetPixels = null;\n    if (firstVertexData.pixels && anchor?.pixels) {\n      offsetPixels = {\n        x: anchor.pixels.x - firstVertexData.pixels.x,\n        y: anchor.pixels.y - firstVertexData.pixels.y,\n      };\n    }\n\n    const cellPositioner = new CellPositioner(project, roofSection);\n\n    const horizontalInches = Math.abs(\n      offsetCartesian.x * cellPositioner.unitWidthVectorCartesian.x +\n        offsetCartesian.y * cellPositioner.unitWidthVectorCartesian.y,\n    );\n    const verticalInches = Math.abs(\n      offsetCartesian.x * cellPositioner.unitHeightVectorCartesian.x +\n        offsetCartesian.y * cellPositioner.unitHeightVectorCartesian.y,\n    );\n    const horizontalMeters = horizontalInches / 39.3701;\n    const verticalMeters = verticalInches / 39.3701;\n\n    // Calculate total distance magnitude\n    const totalMeters = Math.sqrt(offsetCartesian.x ** 2 + offsetCartesian.y ** 2);\n    const totalInches = totalMeters * 39.3701;\n\n    // Calculate pixel distances\n    let horizontalPixels = null;\n    let verticalPixels = null;\n    let totalPixels = null;\n    if (offsetPixels) {\n      horizontalPixels = Math.abs(offsetPixels.x);\n      verticalPixels = Math.abs(offsetPixels.y);\n      totalPixels = Math.sqrt(offsetPixels.x ** 2 + offsetPixels.y ** 2);\n    }\n\n    // Calculate column width and row height dimensions\n    const columnWidthInches = project.panelLength + project.interColumnSpacing;\n    const rowHeightInches = project.panelWidth + project.interRowSpacing;\n    const columnWidthMeters = columnWidthInches / 39.3701;\n    const rowHeightMeters = rowHeightInches / 39.3701;\n\n    // Calculate pixel dimensions using same CellPositioner instance\n    const pos1 = cellPositioner.positionOf(1, 1);\n    const pos2 = cellPositioner.positionOf(1, 2);\n    const pos3 = cellPositioner.positionOf(2, 1);\n\n    const pixels1 = this.#toPixels(pos1.lat, pos1.lng);\n    const pixels2 = this.#toPixels(pos2.lat, pos2.lng);\n    const pixels3 = this.#toPixels(pos3.lat, pos3.lng);\n\n    let columnWidthPixels = null;\n    let rowHeightPixels = null;\n    if (pixels1 && pixels2) {\n      columnWidthPixels = Math.sqrt((pixels2.x - pixels1.x) ** 2 + (pixels2.y - pixels1.y) ** 2);\n    }\n    if (pixels1 && pixels3) {\n      rowHeightPixels = Math.sqrt((pixels3.x - pixels1.x) ** 2 + (pixels3.y - pixels1.y) ** 2);\n    }\n\n    // Calculate nudge amounts in pixels (using horizontal direction as reference)\n    const nudgeRegularInches = 6;\n    const nudgeShiftInches = 24;\n    const nudgeAltInches = 1;\n\n    let nudgeRegularPixels = null;\n    let nudgeShiftPixels = null;\n    let nudgeAltPixels = null;\n\n    if (columnWidthPixels && columnWidthInches) {\n      const pixelsPerInch = columnWidthPixels / columnWidthInches;\n      nudgeRegularPixels = nudgeRegularInches * pixelsPerInch;\n      nudgeShiftPixels = nudgeShiftInches * pixelsPerInch;\n      nudgeAltPixels = nudgeAltInches * pixelsPerInch;\n    }\n\n    // Calculate nudges needed to trigger reset\n    const nudgesRegularH = Math.ceil(columnWidthInches / nudgeRegularInches);\n    const nudgesRegularV = Math.ceil(rowHeightInches / nudgeRegularInches);\n    const nudgesShiftH = Math.ceil(columnWidthInches / nudgeShiftInches);\n    const nudgesShiftV = Math.ceil(rowHeightInches / nudgeShiftInches);\n    const nudgesAltH = Math.ceil(columnWidthInches / nudgeAltInches);\n    const nudgesAltV = Math.ceil(rowHeightInches / nudgeAltInches);\n\n    // Format comparison text\n    const horizontalExceedsColumn = horizontalInches > columnWidthInches;\n    const verticalExceedsRow = verticalInches > rowHeightInches;\n\n    const comparisonLines = [\n      `Offset and Grid Details: ${roofSection.displayIdentifier}`,\n      \"\",\n      `${\"[Horizontal]\".padEnd(15)} ${horizontalInches.toFixed(2)}\" (${(horizontalPixels || 0).toFixed(1)}px) ${horizontalExceedsColumn ? \"\u26A0\uFE0F\" : \"\u2713\"}`,\n      `${\"[Vertical]\".padEnd(15)} ${verticalInches.toFixed(2)}\" (${(verticalPixels || 0).toFixed(1)}px) ${verticalExceedsRow ? \"\u26A0\uFE0F\" : \"\u2713\"}`,\n      \"\",\n      `${\"[Column width]\".padEnd(15)} ${columnWidthInches.toFixed(2)}\" (${(columnWidthPixels || 0).toFixed(1)}px)`,\n      `${\"[Row height]\".padEnd(15)} ${rowHeightInches.toFixed(2)}\" (${(rowHeightPixels || 0).toFixed(1)}px)`,\n      \"\",\n      `[Nudge]           Regular: ${nudgeRegularInches}\" (${(nudgeRegularPixels || 0).toFixed(1)}px), Shift: ${nudgeShiftInches}\" (${(nudgeShiftPixels || 0).toFixed(1)}px), Alt: ${nudgeAltInches}\" (${(nudgeAltPixels || 0).toFixed(1)}px)`,\n      `[Nudges to reset] Regular: ${nudgesRegularH} (H) / ${nudgesRegularV} (V), Shift: ${nudgesShiftH} (H) / ${nudgesShiftV} (V), Alt: ${nudgesAltH} (H) / ${nudgesAltV} (V)`,\n    ];\n\n    const comparisonText = comparisonLines.join(\"\\n\");\n\n    // Log comparison text when accessed\n    console.log(\"\\n\" + comparisonText + \"\\n\");\n\n    return {\n      comparisonText,\n      firstVertex: firstVertexData,\n      offset: {\n        latLng: offsetLatLng,\n        cartesian: offsetCartesian,\n        pixels: offsetPixels,\n      },\n      distance: {\n        horizontal: {\n          inches: horizontalInches,\n          meters: horizontalMeters,\n          pixels: horizontalPixels,\n        },\n        vertical: {\n          inches: verticalInches,\n          meters: verticalMeters,\n          pixels: verticalPixels,\n        },\n        total: {\n          inches: totalInches,\n          meters: totalMeters,\n          pixels: totalPixels,\n        },\n      },\n      columnWidth: {\n        inches: columnWidthInches,\n        meters: columnWidthMeters,\n        pixels: columnWidthPixels,\n      },\n      rowHeight: {\n        inches: rowHeightInches,\n        meters: rowHeightMeters,\n        pixels: rowHeightPixels,\n      },\n    };\n  }\n\n  get roofSections() {\n    return this.#buildRoofSectionsData();\n  }\n\n  get obstructions() {\n    return this.#buildObstructionsData();\n  }\n\n  get grid() {\n    return this.#buildGridData();\n  }\n\n  get dimensions() {\n    const project = this.controller.project;\n    const cellPositioner = new CellPositioner(project, this.controller.roofSection);\n\n    const columnWidthInches = project.panelLength + project.interColumnSpacing;\n    const rowHeightInches = project.panelWidth + project.interRowSpacing;\n\n    const columnWidthMeters = columnWidthInches / 39.3701;\n    const rowHeightMeters = rowHeightInches / 39.3701;\n\n    const pos1 = cellPositioner.positionOf(1, 1);\n    const pos2 = cellPositioner.positionOf(1, 2);\n    const pos3 = cellPositioner.positionOf(2, 1);\n\n    const pixels1 = this.#toPixels(pos1.lat, pos1.lng);\n    const pixels2 = this.#toPixels(pos2.lat, pos2.lng);\n    const pixels3 = this.#toPixels(pos3.lat, pos3.lng);\n\n    const columnWidthPixels =\n      pixels1 && pixels2 ? Math.sqrt((pixels2.x - pixels1.x) ** 2 + (pixels2.y - pixels1.y) ** 2) : null;\n\n    const rowHeightPixels =\n      pixels1 && pixels3 ? Math.sqrt((pixels3.x - pixels1.x) ** 2 + (pixels3.y - pixels1.y) ** 2) : null;\n\n    return {\n      columnWidth: {\n        inches: columnWidthInches,\n        meters: columnWidthMeters,\n        pixels: columnWidthPixels,\n      },\n      rowHeight: {\n        inches: rowHeightInches,\n        meters: rowHeightMeters,\n        pixels: rowHeightPixels,\n      },\n    };\n  }\n\n  get extents() {\n    const self = this;\n    return {\n      get grid() {\n        return self.#getGridExtent();\n      },\n      get renderedPanels() {\n        return self.#getRenderedPanelsExtent();\n      },\n      get roofSection() {\n        return self.#getRoofSectionExtent();\n      },\n    };\n  }\n\n  get renderedPanels() {\n    return this.grid.panels.filter((p) => p.rendered);\n  }\n\n  get nonRenderedPanels() {\n    return this.grid.panels.filter((p) => !p.rendered);\n  }\n\n  get presentPanels() {\n    return this.panelsByStyle(CELL_DRAW_STYLE_PRESENT);\n  }\n\n  get obstructedPresentPanels() {\n    return this.panelsByStyle(CELL_DRAW_STYLE_OBSTRUCTED_PRESENT);\n  }\n\n  get errorPanels() {\n    return this.grid.panels.filter(\n      (p) =>\n        p.cellDrawStyle === CELL_DRAW_STYLE_PRESENT_WITH_ERROR ||\n        p.cellDrawStyle === CELL_DRAW_STYLE_OBSTRUCTED_PRESENT_WITH_ERROR,\n    );\n  }\n\n  panelsByStyle(style) {\n    return this.grid.panels.filter((p) => p.cellDrawStyle === style);\n  }\n\n  visualizationText(options = {}) {\n    const { compact = false } = options;\n    const grid = this.grid;\n    return compact ? this.#formatGridCompact(grid.visualization) : this.#formatGridWithSeparators(grid.visualization);\n  }\n\n  print(options = {}) {\n    console.log(\"\\n\" + this.visualizationText(options) + \"\\n\");\n    return this;\n  }\n\n  printExtents() {\n    console.log(\"\\n\" + this.extentVisualization() + \"\\n\");\n    return this;\n  }\n\n  printOffsetState() {\n    console.log(\"\\n\" + this.offsetState.comparisonText + \"\\n\");\n    return this;\n  }\n\n  extentVisualization() {\n    const gridExt = this.extents.grid;\n    const roofExt = this.extents.roofSection;\n\n    // Get axis-aligned bounding box for grid (all 4 corners)\n    const gridCorners = [gridExt.topLeft, gridExt.topRight, gridExt.bottomRight, gridExt.bottomLeft];\n    const gridPixels = gridCorners.map((c) => c.pixels).filter((p) => p);\n\n    // Calculate grid extent rectangle from min/max of all corners\n    const gridMinX = Math.min(...gridPixels.map((p) => p.x));\n    const gridMaxX = Math.max(...gridPixels.map((p) => p.x));\n    const gridMinY = Math.min(...gridPixels.map((p) => p.y));\n    const gridMaxY = Math.max(...gridPixels.map((p) => p.y));\n\n    const gridRectPixels = [\n      { x: gridMinX, y: gridMinY },\n      { x: gridMaxX, y: gridMinY },\n      { x: gridMaxX, y: gridMaxY },\n      { x: gridMinX, y: gridMaxY },\n    ];\n\n    // Get roof section extent rectangle from min/max\n    // Note: OpenLayers extent is [minX, minY, maxX, maxY]\n    // In screen coordinates, smaller Y is at the top, larger Y is at the bottom\n    const roofMinX = Math.min(roofExt.min.pixels[0], roofExt.max.pixels[0]);\n    const roofMaxX = Math.max(roofExt.min.pixels[0], roofExt.max.pixels[0]);\n    const roofMinY = Math.min(roofExt.min.pixels[1], roofExt.max.pixels[1]);\n    const roofMaxY = Math.max(roofExt.min.pixels[1], roofExt.max.pixels[1]);\n\n    const roofRectPixels = [\n      { x: roofMinX, y: roofMinY },\n      { x: roofMaxX, y: roofMinY },\n      { x: roofMaxX, y: roofMaxY },\n      { x: roofMinX, y: roofMaxY },\n    ];\n\n    const allPixels = [...gridRectPixels, ...roofRectPixels].filter((p) => p);\n    if (allPixels.length === 0) return \"No pixel data available\";\n\n    const minX = Math.min(...allPixels.map((p) => p.x));\n    const maxX = Math.max(...allPixels.map((p) => p.x));\n    const minY = Math.min(...allPixels.map((p) => p.y));\n    const maxY = Math.max(...allPixels.map((p) => p.y));\n\n    const pixelWidth = maxX - minX;\n    const pixelHeight = maxY - minY;\n\n    // Terminal characters are ~2x taller than wide\n    // To maintain aspect ratio, we need to compensate by reducing height\n    const charHeightToWidthRatio = 2.0;\n    const adjustedHeight = pixelHeight / charHeightToWidthRatio;\n    const visualAspectRatio = pixelWidth / adjustedHeight;\n\n    const maxWidth = 80;\n    const maxHeight = 40;\n\n    let width, height;\n    if (visualAspectRatio > maxWidth / maxHeight) {\n      width = maxWidth;\n      height = Math.round(maxWidth / visualAspectRatio);\n    } else {\n      height = maxHeight;\n      width = Math.round(maxHeight * visualAspectRatio);\n    }\n\n    const scaleX = pixelWidth / width;\n    const scaleY = pixelHeight / height;\n\n    const toGridCoord = (pixel) => ({\n      x: Math.round((pixel.x - minX) / scaleX),\n      y: Math.round((pixel.y - minY) / scaleY),\n    });\n\n    const canvas = Array.from({ length: height }, () => Array(width).fill(\" \"));\n\n    const setPixel = (x, y, char) => {\n      if (y >= 0 && y < height && x >= 0 && x < width) {\n        const existing = canvas[y][x];\n        // Use 'X' when both G and R overlap\n        if ((existing === \"G\" && char === \"R\") || (existing === \"R\" && char === \"G\")) {\n          canvas[y][x] = \"X\";\n        } else if (existing === \" \" || existing === char) {\n          canvas[y][x] = char;\n        }\n      }\n    };\n\n    const drawRect = (pixels, char) => {\n      const coords = pixels.map(toGridCoord);\n\n      // Clamp coordinates to canvas bounds\n      const clamp = (coord) => ({\n        x: Math.max(0, Math.min(width - 1, coord.x)),\n        y: Math.max(0, Math.min(height - 1, coord.y)),\n      });\n\n      const topLeft = clamp(coords[0]);\n      const topRight = clamp(coords[1]);\n      const bottomRight = clamp(coords[2]);\n      const bottomLeft = clamp(coords[3]);\n\n      // Draw top edge (from top-left to top-right)\n      for (let x = topLeft.x; x <= topRight.x; x++) {\n        setPixel(x, topLeft.y, char);\n      }\n\n      // Draw right edge (from top-right to bottom-right)\n      for (let y = topRight.y; y <= bottomRight.y; y++) {\n        setPixel(topRight.x, y, char);\n      }\n\n      // Draw bottom edge (from bottom-right to bottom-left)\n      for (let x = bottomRight.x; x >= bottomLeft.x; x--) {\n        setPixel(x, bottomRight.y, char);\n      }\n\n      // Draw left edge (from bottom-left to top-left)\n      for (let y = bottomLeft.y; y >= topLeft.y; y--) {\n        setPixel(topLeft.x, y, char);\n      }\n    };\n\n    // Draw roof section extent first\n    drawRect(roofRectPixels, \"R\");\n\n    // Draw grid extent second\n    drawRect(gridRectPixels, \"G\");\n\n    if (this.anchor?.pixels) {\n      const anchorCoord = toGridCoord(this.anchor.pixels);\n      if (anchorCoord.y >= 0 && anchorCoord.y < height && anchorCoord.x >= 0 && anchorCoord.x < width) {\n        canvas[anchorCoord.y][anchorCoord.x] = \"*\";\n      }\n    }\n\n    const extentInfo = {\n      gridExtent: {\n        left: Math.round(gridMinX),\n        right: Math.round(gridMaxX),\n        top: Math.round(gridMinY),\n        bottom: Math.round(gridMaxY),\n        width: Math.round(gridMaxX - gridMinX),\n        height: Math.round(gridMaxY - gridMinY),\n      },\n      roofExtent: {\n        left: Math.round(roofMinX),\n        right: Math.round(roofMaxX),\n        top: Math.round(roofMinY),\n        bottom: Math.round(roofMaxY),\n        width: Math.round(roofMaxX - roofMinX),\n        height: Math.round(roofMaxY - roofMinY),\n      },\n    };\n\n    const roofSection = this.controller.roofSection;\n    const lines = [\n      `Extents: ${roofSection.displayIdentifier}`,\n      \"\",\n      \"Grid Extent (pixels):\",\n      `  left: ${extentInfo.gridExtent.left}, right: ${extentInfo.gridExtent.right}, top: ${extentInfo.gridExtent.top}, bottom: ${extentInfo.gridExtent.bottom}`,\n      `  width: ${extentInfo.gridExtent.width}, height: ${extentInfo.gridExtent.height}`,\n      \"\",\n      \"Roof Extent (pixels):\",\n      `  left: ${extentInfo.roofExtent.left}, right: ${extentInfo.roofExtent.right}, top: ${extentInfo.roofExtent.top}, bottom: ${extentInfo.roofExtent.bottom}`,\n      `  width: ${extentInfo.roofExtent.width}, height: ${extentInfo.roofExtent.height}`,\n      \"\",\n      \"Legend: G=grid extent, R=roof section extent, X=overlap, *=anchor\",\n      \"\",\n    ];\n    canvas.forEach((row) => lines.push(row.join(\"\")));\n\n    return lines.join(\"\\n\");\n  }\n\n  #getRenderedPanelsExtent() {\n    const extent = this.controller.mapManager.arraysVectorSource.getExtent();\n    return this.#convertOlExtentToData(extent);\n  }\n\n  #getGridExtent() {\n    const cellPositioner = new CellPositioner(this.controller.project, this.controller.roofSection);\n    const layout = this.controller.roofSection.layout;\n\n    const topLeft = cellPositioner.cellAt(1, 1)[0];\n    const topRight = cellPositioner.cellAt(1, layout.columns)[1];\n    const bottomRight = cellPositioner.cellAt(layout.rows, layout.columns)[2];\n    const bottomLeft = cellPositioner.cellAt(layout.rows, 1)[3];\n\n    return {\n      topLeft: this.#pointWithPixels(topLeft),\n      topRight: this.#pointWithPixels(topRight),\n      bottomRight: this.#pointWithPixels(bottomRight),\n      bottomLeft: this.#pointWithPixels(bottomLeft),\n    };\n  }\n\n  #getRoofSectionExtent() {\n    const extent = this.controller.rsFeature.getGeometry().getExtent();\n    const vertices = this.controller.roofSection.latLngPointsToArray.map((point) => ({\n      latLng: { lat: point[0], lng: point[1] },\n      pixels: this.#toPixels(point[0], point[1]),\n    }));\n\n    return {\n      ...this.#convertOlExtentToData(extent),\n      vertices,\n    };\n  }\n\n  #convertOlExtentToData(extent) {\n    const [minX, minY, maxX, maxY] = extent;\n    const minLatLng = toLonLat([minX, minY]);\n    const maxLatLng = toLonLat([maxX, maxY]);\n\n    return {\n      minX,\n      minY,\n      maxX,\n      maxY,\n      min: {\n        latLng: { lat: minLatLng[1], lng: minLatLng[0] },\n        pixels: this.controller.mapManager.map.getPixelFromCoordinate([minX, minY]),\n      },\n      max: {\n        latLng: { lat: maxLatLng[1], lng: maxLatLng[0] },\n        pixels: this.controller.mapManager.map.getPixelFromCoordinate([maxX, maxY]),\n      },\n    };\n  }\n\n  #pointWithPixels(point) {\n    return {\n      latLng: { lat: point.lat, lng: point.lng },\n      pixels: this.#toPixels(point.lat, point.lng),\n    };\n  }\n\n  #toPixels(lat, lng) {\n    const coord = fromLonLat([lng, lat]);\n    const pixel = this.controller.mapManager.map.getPixelFromCoordinate(coord);\n    return pixel ? { x: pixel[0], y: pixel[1] } : null;\n  }\n\n  #buildRoofSectionsData() {\n    const roofSections = [];\n    const focusedRoofSectionId = this.controller.roofSection.id;\n\n    this.controller.project.displayableRoofPlanes.forEach((roofPlane) => {\n      roofPlane.displayableRoofSections.forEach((rs) => {\n        const vertices = rs.latLngPointsToArray.map((point, index) => ({\n          index,\n          latLng: { lat: point[0], lng: point[1] },\n          pixels: this.#toPixels(point[0], point[1]),\n        }));\n\n        roofSections.push({\n          id: rs.id,\n          displayIdentifier: rs.displayIdentifier,\n          isFocused: rs.id === focusedRoofSectionId,\n          vertices,\n        });\n      });\n    });\n    return roofSections;\n  }\n\n  #buildObstructionsData() {\n    return this.controller.project.notDeletedObstructions.map((obstruction) => {\n      const vertices = obstruction.latLngPointsToArray.map((point, index) => ({\n        index,\n        latLng: { lat: point[0], lng: point[1] },\n        pixels: this.#toPixels(point[0], point[1]),\n      }));\n\n      return {\n        id: obstruction.id,\n        identifier: obstruction.identifier,\n        vertices,\n      };\n    });\n  }\n\n  #buildGridData() {\n    const layout = this.controller.roofSection.layout;\n    const features = this.controller.mapManager.arraysVectorSource.getFeatures();\n    const renderedPanels = this.#indexRenderedFeatures(features);\n\n    const panels = [];\n    const gridVisualization = [];\n\n    for (let row = 1; row <= layout.rows; row++) {\n      const rowChars = [];\n      for (let col = 1; col <= layout.columns; col++) {\n        const { displayChar, panelInfo } = this.#buildPanelInfo(row, col, renderedPanels);\n        rowChars.push(displayChar);\n        panels.push(panelInfo);\n      }\n      gridVisualization.push(rowChars);\n    }\n\n    return {\n      rows: layout.rows,\n      columns: layout.columns,\n      visualization: gridVisualization,\n      panels,\n    };\n  }\n\n  #indexRenderedFeatures(features) {\n    const renderedPanels = {};\n    const roofSectionUuid = this.controller.roofSection.uuid;\n    const map = this.controller.mapManager.map;\n\n    features.forEach((feature) => {\n      if (feature.get(\"roofSectionUuid\") === roofSectionUuid) {\n        const row = feature.get(\"row\");\n        const col = feature.get(\"column\");\n        const cellDrawStyle = feature.get(\"cellDrawStyle\");\n\n        const key = `${row},${col}`;\n        const geometry = feature.getGeometry();\n        const coordinates = geometry.getCoordinates()[0];\n        const topLeftCoord = coordinates[0];\n        const topLeftPixel = map.getPixelFromCoordinate(topLeftCoord);\n\n        renderedPanels[key] = {\n          cellDrawStyle,\n          pixels: topLeftPixel ? { x: topLeftPixel[0], y: topLeftPixel[1] } : null,\n        };\n      }\n    });\n\n    return renderedPanels;\n  }\n\n  #buildPanelInfo(row, col, renderedPanels) {\n    const key = `${row},${col}`;\n    const featureData = renderedPanels[key];\n    const cellStatus = this.controller.roofSection.layout.cellStatus(row, col);\n\n    if (!featureData) {\n      return {\n        displayChar: CHAR_NOT_RENDERED,\n        panelInfo: { row, col, rendered: false, cellStatus },\n      };\n    }\n\n    const displayChar = this.#getDisplayChar(featureData.cellDrawStyle);\n    const panelInfo = {\n      row,\n      col,\n      rendered: true,\n      cellStatus,\n      cellDrawStyle: featureData.cellDrawStyle,\n      pixels: featureData.pixels,\n    };\n\n    return { displayChar, panelInfo };\n  }\n\n  #getDisplayChar(style) {\n    if (style === CELL_DRAW_STYLE_PRESENT) return CHAR_PRESENT;\n    if (style === CELL_DRAW_STYLE_OBSTRUCTED_PRESENT) return CHAR_OBSTRUCTED;\n    if (style === CELL_DRAW_STYLE_EMPTY || style === CELL_DRAW_STYLE_OBSTRUCTED_EMPTY) return CHAR_EMPTY;\n    if (style === CELL_DRAW_STYLE_PRESENT_WITH_ERROR || style === CELL_DRAW_STYLE_OBSTRUCTED_PRESENT_WITH_ERROR)\n      return CHAR_ERROR;\n    return CHAR_UNKNOWN;\n  }\n\n  #formatGridWithSeparators(gridVisualization) {\n    const layout = this.controller.roofSection.layout;\n    const roofSection = this.controller.roofSection;\n    const rowNumWidth = layout.rows.toString().length;\n\n    const columnHeaders = [];\n    for (let col = 1; col <= layout.columns; col++) {\n      const colStr = col.toString();\n      const padded = colStr.length === 1 ? ` ${colStr} ` : colStr.padStart(2, \" \").padEnd(3, \" \");\n      columnHeaders.push(padded);\n    }\n    const headerRow = \" \".repeat(rowNumWidth + 1) + \" \" + columnHeaders.join(\" \");\n\n    const rows = gridVisualization.map((row, index) => {\n      const rowNum = (index + 1).toString().padStart(rowNumWidth, \" \");\n      return `${rowNum} | ${row.join(\" | \")} |`;\n    });\n\n    const separatorLine =\n      rows.length > 0 ? \" \".repeat(rowNumWidth + 1) + \"-\".repeat(rows[0].length - rowNumWidth - 1) : \"\";\n\n    const gridLines = [\n      `Grid: ${roofSection.displayIdentifier} (${layout.rows}\u00D7${layout.columns})`,\n      headerRow,\n      separatorLine,\n    ];\n    rows.forEach((row) => {\n      gridLines.push(row);\n      gridLines.push(separatorLine);\n    });\n\n    return gridLines.join(\"\\n\");\n  }\n\n  #formatGridCompact(gridVisualization) {\n    const layout = this.controller.roofSection.layout;\n    const roofSection = this.controller.roofSection;\n    const rowNumWidth = layout.rows.toString().length;\n\n    const headerRow =\n      \" \".repeat(rowNumWidth + 1) +\n      Array.from({ length: layout.columns }, (_, i) => {\n        const colNum = (i + 1).toString();\n        return colNum.length === 1 ? ` ${colNum} ` : ` ${colNum}`;\n      }).join(\"\");\n\n    const rows = gridVisualization.map((row, index) => {\n      const rowNum = (index + 1).toString().padStart(rowNumWidth, \" \");\n      return `${rowNum} ${row.map((char) => ` ${char === CHAR_NOT_RENDERED ? \"`\" : char} `).join(\"\")}`;\n    });\n\n    return [`Grid: ${roofSection.displayIdentifier} (${layout.rows}\u00D7${layout.columns})`, headerRow, ...rows].join(\"\\n\");\n  }\n}\n", "export function applyDomUpdatesFromResponse(json) {\n  if (!json.domUpdates) return;\n\n  json.domUpdates.forEach(({ selector, html }) => {\n    const elements = document.querySelectorAll(selector);\n    Array.from(elements).forEach((element) => {\n      element.innerHTML = html;\n    });\n  });\n}\n", "import { ARRAY_CELL_DATA_TYPE } from \"../../da/map/data-types\";\n\nexport function applyOpenLayersUpdatesFromModels(project, mapModelSynchronizer, mapManager) {\n  const layouts = layoutsIndexedByRoofSectionUuid(project);\n\n  updateRoofSections(project, mapModelSynchronizer);\n  updateLayouts(layouts, mapManager);\n}\n\nfunction layoutsIndexedByRoofSectionUuid(project) {\n  const layouts = {};\n\n  project.roofPlanes.forEach((roofPlane) => {\n    roofPlane.activeRoofSections.forEach((roofSection) => {\n      layouts[roofSection.uuid] = roofSection.layout;\n    });\n  });\n\n  return layouts;\n}\n\nfunction updateRoofSections(project, mapModelSynchronizer) {\n  project.roofPlanes.forEach((roofPlane) => {\n    roofPlane.activeRoofSections.forEach((roofSection) => {\n      const roofSectionFeature = mapModelSynchronizer.getFeatureForRoofSection(roofSection);\n      roofSectionFeature.set(\"cellsWithErrors\", roofSection.cellsWithErrors);\n    });\n  });\n}\n\nfunction updateLayouts(layouts, mapManager) {\n  const arrayFeatures = mapManager.arraysVectorSource.getFeatures();\n  arrayFeatures.forEach((feature) => {\n    if (feature.get(\"dataType\") == ARRAY_CELL_DATA_TYPE) {\n      const row = feature.get(\"row\");\n      const column = feature.get(\"column\");\n      const layout = layouts[feature.get(\"roofSectionUuid\")];\n      feature.set(\"cellDrawStyle\", layout.cellDrawStyle(row, column));\n    }\n  });\n}\n", "import * as store from \"../../../helpers/local-store\";\n\nexport function getState(toggleName, defaultSelection) {\n  return store.get(`le--selectGroup--${toggleName}`, defaultSelection);\n}\n\nexport function setDefaultOption(selectGroupContainerElement, option) {\n  selectGroupContainerElement.setAttribute(\"data-da--layout-editor--btn-select-group-default-option-value\", option);\n}\n", "import * as animate from \"../../helpers/animate\";\nimport { isVisible } from \"../../helpers/app\";\n\nexport default class MarqueeMarker {\n  constructor() {\n    this.#setMarker();\n\n    this.showAnimating = false;\n  }\n\n  show() {\n    if (isVisible(this.marker) || this.showAnimating) return;\n\n    this.showAnimating = true;\n\n    animate.show(this.marker, {\n      completedCallback: this.afterShowAnimationComplete,\n    });\n  }\n\n  hide() {\n    if (this.showAnimating) {\n      this.hideAfterShowAnimationComplete = true;\n      return;\n    }\n\n    animate.hide(this.marker, { fadeOut: false });\n  }\n\n  updateContent(newContent) {\n    this.marker.innerHTML = newContent;\n  }\n\n  position(top, left) {\n    this.marker.style.top = `${top}px`;\n    this.marker.style.left = `${left}px`;\n  }\n\n  addTo(container) {\n    container.appendChild(this.marker);\n  }\n\n  afterShowAnimationComplete = () => {\n    this.showAnimating = false;\n\n    if (this.hideAfterShowAnimationComplete) {\n      this.hideAfterShowAnimationComplete = false;\n      this.hide();\n    }\n  };\n\n  #setMarker() {\n    this.marker = document.createElement(\"div\");\n    this.marker.classList.add(\"ol-map__marquee-marker\");\n    this.marker.classList.add(\"d-none\");\n    this.updateContent(\"-\");\n  }\n}\n", "import { clone, destroy } from \"mobx-state-tree\";\n\nimport MapBaseController from \"./map_base_controller\";\nimport SelectInteractionManager from \"../../../bx/map/interaction-managers/select/edit-arrays\";\nimport SnapInteractionManager from \"../../../bx/map/interaction-managers/snap/edit-arrays\";\nimport DragBoxInteractionManager from \"../../../bx/map/edit-array/drag-box-interaction-manager\";\nimport PaintSelectInteractionManager from \"../../../bx/map/edit-array/paint-select-interaction-manager\";\nimport ModifyInteractionManager from \"../../../bx/map/interaction-managers/modify/edit-arrays\";\nimport TranslateInteractionManager from \"../../../da/map/interaction-managers/translate/base\";\nimport MeasureInteractionManager from \"../../../da/map/interaction-managers/measure/base\";\nimport ShapeGuideLinesInteractionManager from \"../../../da/map/interaction-managers/shape-guide-lines/base\";\nimport { PanelGridState } from \"../../../bx/map/panel-grid/panel-grid-state\";\n\nimport { applyDomUpdatesFromResponse } from \"../../../helpers/api-dom-helpers\";\nimport { applyOpenLayersUpdatesFromModels } from \"../api_open_layers_helpers\";\nimport { degreesToRadians } from \"../../../helpers/geometry\";\nimport { logger, humanizeWattage } from \"../../../helpers/app\";\nimport {\n  addLayoutAndArrayForRoofSection,\n  addLayoutForRoofSection,\n} from \"../../../bx/map/modification-helpers/roof-section\";\nimport * as toolbarBtn from \"../../../da/layout-editor/helpers/toolbar-btns\";\nimport {\n  EDITOR_MODE_PAINT,\n  EDITOR_MODE_MEASURE,\n  EDITOR_MODE_SELECT,\n  PANEL_MODE_ADD,\n  PANEL_MODE_REMOVE,\n  PANEL_MODE_TOGGLE,\n} from \"../../../da/layout-editor/helpers/toolbar-constants\";\nimport * as toolbarSelectGroup from \"../../../da/layout-editor/helpers/toolbar-select-group\";\n\nimport MarqueeMarker from \"../../../da/map/marquee-marker\";\nimport { fromLonLat } from \"ol/proj\";\n\nexport default class MapEditArrayController extends MapBaseController {\n  allowNudgingWithArrowKeys = true;\n\n  connect() {\n    this.showBoundingBoxes = this.element.dataset.showBoundingBoxes === \"true\";\n\n    super.connect();\n\n    this.roofSectionUuid = this.element.dataset.roofSectionUuid;\n\n    this.roofSection = this.project.getRoofSection(this.roofSectionUuid);\n    this.rsFeature = this.mapModelSynchronizer.getFeatureForRoofSection(this.roofSection);\n\n    this.mapManager.buildSetbacksVectorSource();\n    this.mapManager.addRoofSectionsAndSetbacksVectorLayers();\n    this.mapManager.addArraysVectorLayer();\n\n    this.setupMapInteractionManagers();\n\n    this.mapManager.rotateTo(this.negateAzimuthRotationRadians);\n\n    this.initializeMode();\n\n    document.addEventListener(\"keydown\", this.handleKeydown);\n\n    this.populateStatusbar();\n\n    this.marqueeMarker = new MarqueeMarker();\n    this.marqueeMarker.addTo(this.mapTarget);\n\n    this.isUnpersistedZoomRotationPositionPage = true;\n    setTimeout(() => {\n      this.alignViewToSelectedRoofSection(true);\n    }, 200);\n\n    setTimeout(() => {\n      this.addSnapshotToUndoQueue(false);\n    }, 1000);\n  }\n\n  disconnect() {\n    super.disconnect();\n\n    document.removeEventListener(\"keydown\", this.handleKeydown);\n  }\n\n  get panelGridState() {\n    if (!this.roofSection?.layout) return null;\n\n    return new PanelGridState(this);\n  }\n\n  undo(event) {\n    super.undo(event);\n    this.afterUndoRedo();\n  }\n\n  redo(event) {\n    super.redo(event);\n    this.afterUndoRedo();\n  }\n\n  afterUndoRedo() {\n    this.mapManager.rotateTo(this.negateAzimuthRotationRadians);\n    // Allow rotation to finish\n    setTimeout(() => {\n      this.updateAzimuthFormWithValueFromProjectDetail();\n      this.setZoomAndPositionFromProjectSite();\n    }, 300);\n  }\n\n  updateAzimuthFormWithValueFromProjectDetail() {\n    const azimuthForm = document.querySelector(\"[data-controller='bx--layout-editor--azimuth-management']\");\n    const azimuthFormController = azimuthForm.controller;\n\n    const roofPlane = this.project.displayableRoofPlanes[0];\n    const roofSection = roofPlane.roofSections[0];\n    azimuthFormController.setAzimuthValue(roofSection.azimuth);\n  }\n\n  setZoomAndPositionFromProjectSite() {\n    const { projectSite } = this.project;\n    this.mapManager.map.getView().setZoom(projectSite.unpersistedZoom);\n\n    const coordinate = fromLonLat([projectSite.unpersistedLng, projectSite.unpersistedLat]);\n    this.mapManager.setCenter(coordinate);\n  }\n\n  zoomIn(event) {\n    super.zoomIn(event);\n    this.zoomInAndOut(\"zoomIn\");\n  }\n\n  zoomOut(event) {\n    super.zoomOut(event);\n    this.zoomInAndOut(\"zoomOut\");\n  }\n\n  zoomInAndOut(from) {\n    // Need to wait for the zooming animation to finish\n    setTimeout(() => {\n      this.skipNextMapMoveEndEvent = true;\n      this.mapModelSynchronizer.saveEditorLocation();\n      this.populateStatusbar();\n      this.mapManager.dispatchAfterMapFeaturesRendering({ calledFrom: `EditArrayController#${from}` });\n    }, 300);\n  }\n\n  setupMapInteractionManagers() {\n    this.selectInteractionManager = new SelectInteractionManager(this);\n    this.selectInteractionManager.add();\n\n    this.snapInteractionManager = new SnapInteractionManager(this);\n    this.snapInteractionManager.add();\n\n    this.shapeGuideLinesInteractionManager = new ShapeGuideLinesInteractionManager(this);\n\n    this.dragBoxInteractionManager = new DragBoxInteractionManager(this);\n    this.paintSelectInteractionManager = new PaintSelectInteractionManager(this);\n    this.modifyInteractionManager = new ModifyInteractionManager(this);\n    this.translateInteractionManager = new TranslateInteractionManager(this);\n    this.measureInteractionManager = new MeasureInteractionManager(this);\n  }\n\n  initializeMode() {\n    this.editorMode = toolbarSelectGroup.getState(\"bxArraysEditorMode\", EDITOR_MODE_PAINT);\n    this.panelMode = toolbarSelectGroup.getState(\"bxPanelModificationType\", PANEL_MODE_ADD);\n\n    this.initializeEditorMode();\n  }\n\n  initializeEditorMode() {\n    switch (this.editorMode) {\n      case EDITOR_MODE_PAINT:\n        this.startPaintPanels();\n        break;\n      case EDITOR_MODE_MEASURE:\n        this.startMeasureMode();\n        break;\n      case EDITOR_MODE_SELECT:\n        this.startSelectMode();\n        break;\n      default:\n        this.startPaintPanels();\n    }\n  }\n\n  setMapSpecificStatusBarItems() {\n    this.statusItemPanelsTarget.innerText = `${this.roofSection.panelsPresent} / ${this.project.panelsPresent}`;\n    const section = humanizeWattage(this.roofSection.wattage);\n    const total = humanizeWattage(this.project.wattage);\n    this.statusItemWattageTarget.innerText = `${section} / ${total}`;\n  }\n\n  get negateAzimuthRotationRadians() {\n    return degreesToRadians(180.0 - this.roofSection.azimuth);\n  }\n\n  alignViewToSelectedRoofSection = (shouldMarkClean) => {\n    const view = this.mapManager.map.getView();\n    const roofSectionGeometry = this.rsFeature.getGeometry();\n    view.fit(roofSectionGeometry, { padding: [100, 30, 30, 30] });\n    // Fit considers our original rotation, but may modify it. So we set things back to\n    // the rotation we want to have the grid exactly up / down\n    this.mapManager.rotateTo(this.negateAzimuthRotationRadians);\n    this.mapModelSynchronizer.saveEditorLocation();\n\n    if (!shouldMarkClean) return;\n\n    setTimeout(() => {\n      this.markClean();\n    }, 50);\n  };\n\n  handleKeydown = (event) => {\n    if (event.key === \"Backspace\") {\n      if (event.target.tagName !== \"INPUT\") {\n        event.preventDefault();\n        this.selectInteractionManager.removeSelectedFeatures(event);\n      }\n    } else if (event.key === \"Escape\") {\n      this.measureInteractionManager.finish();\n    }\n\n    if (!this.allowNudgingWithArrowKeys) return;\n\n    if (event.key === \"ArrowUp\") this.nudgeUp(event, \"up\");\n    if (event.key === \"ArrowRight\") this.nudgeRight(event, \"right\");\n    if (event.key === \"ArrowDown\") this.nudgeDown(event, \"down\");\n    if (event.key === \"ArrowLeft\") this.nudgeLeft(event, \"left\");\n  };\n\n  // Called by both Stimulus event handler and saveAndThenRedirect triggered by auto save controller\n  save(_event, onSuccess = () => {}) {\n    toolbarBtn.showSpinner(this.saveBtnTarget);\n    this.project.save({\n      path: this.savePath,\n      onSuccess: (json) => {\n        if (this.undoQueue) {\n          this.clearUndoQueue();\n          this.addSnapshotToUndoQueue(false);\n        }\n        if (json) applyDomUpdatesFromResponse(json);\n        applyOpenLayersUpdatesFromModels(this.project, this.mapModelSynchronizer, this.mapManager);\n        this.markClean();\n        onSuccess();\n        setTimeout(() => {\n          toolbarBtn.hideSpinner(this.saveBtnTarget);\n        }, 500);\n      },\n      onValidationError: this.onValidationError,\n      onServerError: this.onServerError,\n      includeProjectSite: false,\n      includeUploadedBuildingImages: false,\n    });\n  }\n\n  nudgeUp(event) {\n    this.mapManager.nudgeAlongAzimuth(this.roofSection, this.rsFeature, -1 * this.nudgeAmount(event));\n    this.markDirty();\n  }\n\n  nudgeDown(event) {\n    this.mapManager.nudgeAlongAzimuth(this.roofSection, this.rsFeature, this.nudgeAmount(event));\n    this.markDirty();\n  }\n\n  nudgeRight(event) {\n    this.mapManager.nudgePerpendicularToAzimuth(this.roofSection, this.rsFeature, this.nudgeAmount(event));\n    this.markDirty();\n  }\n\n  nudgeLeft(event) {\n    this.mapManager.nudgePerpendicularToAzimuth(this.roofSection, this.rsFeature, -1 * this.nudgeAmount(event));\n    this.markDirty();\n  }\n\n  nudgeAmount(event) {\n    let amount = 6;\n    if (event.shiftKey) amount = 24;\n    if (event.altKey) amount = 1;\n    if (event.shiftKey && event.altKey) amount = 0.1;\n\n    return amount;\n  }\n\n  center(_event) {\n    this.mapManager.nudgeReset(this.roofSection);\n    this.markDirty();\n  }\n\n  get isEditorModePaintPanels() {\n    return this.editorMode === EDITOR_MODE_PAINT;\n  }\n\n  get isEditorModeMeasure() {\n    return this.editorMode === EDITOR_MODE_MEASURE;\n  }\n\n  get isEditorModeSelect() {\n    return this.editorMode === EDITOR_MODE_SELECT;\n  }\n\n  get isPanelModeAdd() {\n    return this.panelMode === PANEL_MODE_ADD;\n  }\n\n  get isPanelModeRemove() {\n    return this.panelMode === PANEL_MODE_REMOVE;\n  }\n\n  get isPanelModeToggle() {\n    return this.panelMode === PANEL_MODE_TOGGLE;\n  }\n\n  startPaintPanels() {\n    this.enableAllPaintSubModeBtns();\n\n    this.selectInteractionManager.remove();\n    this.snapInteractionManager.remove();\n    this.dragBoxInteractionManager.add();\n    this.paintSelectInteractionManager.add();\n    this.modifyInteractionManager.remove();\n    this.measureInteractionManager.remove();\n\n    toolbarBtn.showEnabledAndHideDisabledPinnedFlyoutMenus();\n  }\n\n  startSelectMode() {\n    this.disableAllPaintSubModeBtns();\n\n    this.selectInteractionManager.add();\n    this.snapInteractionManager.remove();\n    this.dragBoxInteractionManager.remove();\n    this.paintSelectInteractionManager.remove();\n    this.modifyInteractionManager.add();\n    this.measureInteractionManager.remove();\n\n    toolbarBtn.showEnabledAndHideDisabledPinnedFlyoutMenus();\n  }\n\n  startMeasureMode() {\n    this.disableAllPaintSubModeBtns();\n\n    this.selectInteractionManager.remove();\n    this.snapInteractionManager.remove();\n    this.dragBoxInteractionManager.remove();\n    this.paintSelectInteractionManager.remove();\n    this.modifyInteractionManager.remove();\n    this.measureInteractionManager.add();\n\n    toolbarBtn.showEnabledAndHideDisabledPinnedFlyoutMenus();\n  }\n\n  addPanels() {\n    this.panelMode = PANEL_MODE_ADD;\n  }\n\n  removePanels() {\n    this.panelMode = PANEL_MODE_REMOVE;\n  }\n\n  togglePanels() {\n    this.panelMode = PANEL_MODE_TOGGLE;\n  }\n\n  enableAllPaintSubModeBtns() {\n    toolbarBtn.enable(this.addPanelsBtnTarget);\n    toolbarBtn.enable(this.removePanelsBtnTarget);\n    toolbarBtn.enable(this.togglePanelsBtnTarget);\n    toolbarBtn.enable(this.panelStatusMenuBtnTarget);\n  }\n\n  disableAllPaintSubModeBtns() {\n    toolbarBtn.disable(this.addPanelsBtnTarget);\n    toolbarBtn.disable(this.removePanelsBtnTarget);\n    toolbarBtn.disable(this.togglePanelsBtnTarget);\n    toolbarBtn.disable(this.panelStatusMenuBtnTarget);\n  }\n\n  azimuthUpdated(currentRotationDegrees, allRsInRp, allRs, newProjectDefault, dragging) {\n    this.draggingAzimuth = dragging;\n\n    if (newProjectDefault) {\n      if (currentRotationDegrees === this.project.azimuth) return;\n\n      this.project.setAzimuth(currentRotationDegrees);\n    }\n\n    this.project.displayableRoofPlanes.forEach((roofPlane) => {\n      roofPlane.displayableRoofSections.forEach((roofSection) => {\n        if (currentRotationDegrees === roofSection.azimuth) return;\n\n        let shouldUpdate = roofSection.uuid === this.roofSection.uuid;\n\n        if (allRsInRp && roofSection.roofPlane.uuid === this.roofSection.roofPlane.uuid) {\n          shouldUpdate = true;\n        }\n\n        if (allRs) {\n          shouldUpdate = true;\n        }\n\n        if (shouldUpdate && currentRotationDegrees !== roofSection.azimuth) {\n          logger(`setting azimuth to ${currentRotationDegrees} for ${roofSection.displayIdentifier}`);\n          roofSection.setAzimuth(currentRotationDegrees);\n\n          // only adjust the visible array for the roof section being focused on\n          const rsFeature = this.mapModelSynchronizer.getFeatureForRoofSection(roofSection);\n          const currentLayout = roofSection.layout && clone(roofSection.layout);\n          if (roofSection.uuid === this.roofSection.uuid) {\n            addLayoutAndArrayForRoofSection(rsFeature, roofSection, this.project, this.mapManager, currentLayout);\n          } else {\n            addLayoutForRoofSection(rsFeature, roofSection, this.project, this.mapManager, currentLayout);\n          }\n          if (currentLayout) destroy(currentLayout);\n        }\n      });\n    });\n\n    this.mapManager.rotateTo(this.negateAzimuthRotationRadians);\n    setTimeout(() => {\n      this.alignViewToSelectedRoofSection(false);\n    }, 200);\n\n    this.markDirty();\n  }\n}\n", "import MapBaseController from \"./map_base_controller\";\n\nimport { applyOpenLayersUpdatesFromModels } from \"../api_open_layers_helpers\";\nimport { applyDomUpdatesFromResponse } from \"../../../helpers/api-dom-helpers\";\nimport { removeMatchingKeys } from \"../../../helpers/local-store\";\nimport * as toolbarBtn from \"../../../da/layout-editor/helpers/toolbar-btns\";\nimport {\n  EDITOR_MODE_DRAW,\n  EDITOR_MODE_MEASURE,\n  EDITOR_MODE_SELECT,\n} from \"../../../da/layout-editor/helpers/toolbar-constants\";\n\nexport default class MapRoofPlanesAndSectionsController extends MapBaseController {\n  connect() {\n    this.showBoundingBoxes = this.element.dataset.showBoundingBoxes === \"true\";\n\n    super.connect();\n\n    if (this.project.roofPlanes.length === 0) {\n      removeMatchingKeys((k) => k.match(/^le--selectGroup--bx.*/));\n    }\n\n    this.mapManager.buildSetbacksVectorSource();\n    this.mapSpecificConnect();\n    this.setupMapInteractionManagers();\n\n    this.initializeEditorMode();\n\n    this.populateStatusbar();\n\n    document.addEventListener(\"keydown\", this.handleKeydown);\n  }\n\n  disconnect() {\n    super.disconnect();\n\n    document.removeEventListener(\"keydown\", this.handleKeydown);\n\n    this.drawInteractionManager.remove();\n  }\n\n  mapSpecificConnect() {\n    // override in sub class\n  }\n\n  setupMapInteractionManagers() {\n    // override in sub class\n  }\n\n  initializeEditorMode() {\n    switch (this.editorMode) {\n      case EDITOR_MODE_DRAW:\n        this.startDrawMode();\n        break;\n      case EDITOR_MODE_MEASURE:\n        this.startMeasureMode();\n        break;\n      case EDITOR_MODE_SELECT:\n        this.startSelectMode();\n        break;\n      default:\n        this.startDrawMode();\n    }\n  }\n\n  handleKeydown = (event) => {\n    if (event.key === \"Backspace\") {\n      if (event.target.tagName !== \"INPUT\") {\n        event.preventDefault();\n        this.removeSelectedFeatures(event);\n      }\n    } else if (event.key === \"Escape\") {\n      this.drawInteractionManager.finish();\n      this.measureInteractionManager.finish();\n    }\n  };\n\n  startDrawMode(_event) {\n    this.drawInteractionManager.add();\n    this.selectInteractionManager.remove();\n    this.modifyInteractionManager.remove();\n    this.translateInteractionManager.remove();\n    this.measureInteractionManager.remove();\n    if (this.page === \"roofPlanes\") {\n      this.removeBuildingImagePlacementTransformInteractions();\n    }\n  }\n\n  startSelectMode(_event) {\n    this.drawInteractionManager.remove();\n    this.selectInteractionManager.add();\n    this.modifyInteractionManager.remove();\n    this.translateInteractionManager.remove();\n    this.measureInteractionManager.remove();\n    if (this.page === \"roofPlanes\") {\n      this.addBuildingImagePlacementTransformInteractions();\n    }\n  }\n\n  startMeasureMode(_event) {\n    this.drawInteractionManager.remove();\n    this.modifyInteractionManager.remove();\n    this.selectInteractionManager.remove();\n    this.translateInteractionManager.remove();\n    this.measureInteractionManager.add();\n    if (this.page === \"roofPlanes\") {\n      this.removeBuildingImagePlacementTransformInteractions();\n    }\n  }\n\n  // Called by both Stimulus event handler and saveAndThenRedirect triggered by auto save controller\n  save(_event, onSuccess = () => {}) {\n    this.preSaveForPage();\n    toolbarBtn.showSpinner(this.saveBtnTarget);\n    this.project.save({\n      path: this.savePath,\n      onSuccess: (json) => {\n        if (this.undoQueue) {\n          this.clearUndoQueue();\n          this.addSnapshotToUndoQueue(false);\n        }\n        if (json) applyDomUpdatesFromResponse(json);\n        applyOpenLayersUpdatesFromModels(this.project, this.mapModelSynchronizer, this.mapManager);\n        this.markClean();\n        onSuccess();\n        setTimeout(() => {\n          toolbarBtn.hideSpinner(this.saveBtnTarget);\n        }, 500);\n      },\n      onValidationError: this.onValidationError,\n      onServerError: this.onServerError,\n      includeProjectSite: true,\n      includeUploadedBuildingImages: true,\n    });\n  }\n\n  preSaveForPage() {\n    // override in child\n  }\n}\n", "import { lineWithDistancePills } from \"./distance-markers\";\n\nexport function drawStyle(feature, map) {\n  return lineWithDistancePills(feature, map, \"239, 156, 0\", \"13, 190, 224\", 5, true);\n}\n", "import { Draw } from \"ol/interaction\";\nimport { Polygon } from \"ol/geom\";\n\nimport { drawStyle } from \"../../styles/draw\";\nimport { ensureFeatureIsClockwise } from \"../../ol-helpers\";\nimport { constraintGeometryFunction, withConstraintMixin } from \"../helpers/constraint\";\nimport { withAngleLockMixin } from \"../helpers/angle-lock\";\nimport { withLineLengthMenuMixin } from \"../helpers/line-length-menu\";\nimport { logger } from \"../../../../helpers/app\";\n\nexport default class Base {\n  constructor(controller) {\n    this.controller = controller;\n    this.settings = controller.settings;\n    this.mapModelSynchronizer = controller.mapModelSynchronizer;\n    this.drawBtnTarget = controller.drawBtnTarget;\n\n    this.mapManager = controller.mapManager;\n    this.map = this.mapManager.map;\n\n    this.initConstraint();\n    this.initAngleLock();\n\n    this.guideVertexDistance = 0;\n\n    this.currentDrawInteraction = undefined;\n  }\n\n  // Add polygon drawing interaction to the vector source\n  add() {\n    this.clearCurrentInteraction();\n\n    this.attachConstraintListeners();\n    this.attachAngleLockListeners();\n\n    this.currentDrawInteraction = new Draw({\n      source: this.targetDrawingSource,\n      type: \"Polygon\",\n      style: (feature) => drawStyle(feature, this.map),\n      geometryFunction: (coordinates, geometry) => {\n        // Apply 'c' key constraint first\n        let modifiedCoords = coordinates;\n        if (this.constrainPressed) {\n          const tempGeometry = constraintGeometryFunction(\n            coordinates,\n            geometry,\n            this.map,\n            this.constrainPressed,\n            \"Polygon\",\n          );\n          modifiedCoords = tempGeometry.getCoordinates();\n        }\n\n        // Apply 's' key angle lock\n        if (this.angleLockPressed && this.lockedAngleRad !== null) {\n          if (modifiedCoords.length > 0 && modifiedCoords[0].length > 0) {\n            modifiedCoords[0] = this.applyAngleLockToCoordinates(modifiedCoords[0]);\n          }\n        }\n\n        // Set final coordinates on geometry\n        if (!geometry) {\n          geometry = new Polygon(modifiedCoords);\n        } else {\n          geometry.setCoordinates(modifiedCoords);\n        }\n\n        return geometry;\n      },\n    });\n\n    this.currentDrawInteraction.on(\"drawstart\", this.onDrawStart);\n    this.currentDrawInteraction.on(\"drawstart\", (e) => {\n      const { feature } = e;\n\n      feature.set(\"dataType\", this.featureDataType);\n      feature.set(\"drawing\", true);\n      this.currentDrawInteraction.feature = feature;\n    });\n    this.currentDrawInteraction.on(\"drawstart\", this.addFeatureToShapeGuideLines);\n\n    this.mapManager.onClick(this.onDrawClick);\n    this.mapManager.onClick(this.updateFeatureInShapeGuideLines);\n\n    this.currentDrawInteraction.on(\"drawend\", (e) => {\n      e.feature.set(\"drawing\", false);\n      this.currentDrawInteraction.feature = undefined;\n    });\n    this.currentDrawInteraction.on(\"drawend\", this.constraintPolygonOnDrawEnd);\n    this.currentDrawInteraction.on(\"drawend\", this.removeFeatureFromShapeGuideLines);\n    this.currentDrawInteraction.on(\"drawend\", this.onDrawEnd);\n\n    this.map.addInteraction(this.currentDrawInteraction);\n    this.controller.snapInteractionManager.refresh();\n  }\n\n  finish() {\n    if (!this.currentDrawInteraction) return;\n\n    this.currentDrawInteraction.finishDrawing();\n\n    this.controller.project.clearDrawingCoordinates();\n\n    // If we end up with only a line, remove it\n    const features = this.targetDrawingSource.getFeatures();\n    const lastFeature = features[features.length - 1];\n    if (lastFeature && lastFeature.getGeometry().getArea() === 0) {\n      this.targetDrawingSource.removeFeature(lastFeature);\n    }\n  }\n\n  remove() {\n    this.detachConstraintListeners();\n    this.detachAngleLockListeners();\n    this.unlockAngle();\n    this.guideVertexDistance = 0;\n\n    this.controller.project.clearDrawingCoordinates();\n\n    if (\n      this.controller.shapeGuideLinesInteractionManager &&\n      !this.settings.showShapeGuideLinesAlways &&\n      this.controller.drawInteractionManager.currentDrawInteraction?.feature\n    ) {\n      const feature = this.controller.drawInteractionManager.currentDrawInteraction.feature;\n      this.controller.shapeGuideLinesInteractionManager.remove(feature, \"draw\");\n    }\n\n    this.clearCurrentInteraction();\n  }\n\n  clearCurrentInteraction() {\n    if (this.currentDrawInteraction) {\n      this.mapManager.unClick(this.onDrawClick);\n      this.mapManager.unClick(this.updateFeatureInShapeGuideLines);\n      this.shapeGuideLinesCall(\"remove\", this.currentDrawInteraction.feature, \"clearCurrentInteraction\");\n\n      this.map.removeInteraction(this.currentDrawInteraction);\n      delete this.currentDrawInteraction;\n      this.currentDrawInteraction = undefined;\n    }\n  }\n\n  shapeGuideLinesCall(method, features, from) {\n    if (!this.showShapeGuideLinesWhenDrawing) return;\n\n    this.controller.shapeGuideLinesInteractionManager[method](features, `draw ${from}`);\n  }\n\n  get showShapeGuideLinesWhenDrawing() {\n    return this.controller.shapeGuideLinesInteractionManager && this.settings.showShapeGuideLinesWhenDrawing;\n  }\n\n  reset() {\n    this.remove();\n    this.add();\n  }\n\n  get featureDataType() {\n    // override in sub class\n  }\n\n  onDrawStart = (event) => {\n    this.startLineLengthMenu(event.feature);\n  };\n\n  onDrawClick = (_event) => {\n    this.unlockAngle();\n    this.controller.focusGuideVertexField();\n  };\n\n  onDrawEnd = (event) => {\n    const { feature } = event;\n\n    this.stopLineLengthMenu(feature);\n    this.controller.project.clearDrawingCoordinates();\n    this.featureSpecificDrawEndProcessing(event);\n\n    if (feature.getGeometry().getArea() === 0) {\n      feature.set(\"flaggedForAutoDeleteByVectorSource\", true);\n      feature.set(\"dataType\", this.featureDataType);\n\n      return;\n    }\n\n    // TODO: How can we get a feature with an id?\n    if (feature.getId()) {\n      console.error(\"New feature already has an id\");\n      debugger;\n    }\n\n    if (feature.get(\"uuid\")) {\n      console.error(\"New feature already has a UUID\");\n      debugger;\n    }\n\n    ensureFeatureIsClockwise(feature);\n    this.createModelFromFeature(feature);\n\n    this.controller.markDirty();\n  };\n\n  // onDrawStart\n  addFeatureToShapeGuideLines = (event) => {\n    this.shapeGuideLinesCall(\"add\", event.feature, \"drawstart addFeatureToShapeGuideLines\");\n  };\n\n  // onDrawClick\n  updateFeatureInShapeGuideLines = (_event) => {\n    this.shapeGuideLinesCall(\"update\", this.currentDrawInteraction.feature, \"drawclick updateFeatureInShapeGuideLines\");\n  };\n\n  // onDrawEnd\n  removeFeatureFromShapeGuideLines = (event) => {\n    this.shapeGuideLinesCall(\"remove\", event.feature, \"drawend removeFeatureFromShapeGuideLines\");\n  };\n\n  initializeDrawingFromProjectDrawingCoordinates() {\n    const coordinates = this.controller.project.drawingCoordinates;\n    if (coordinates.length === 0) return;\n\n    const olCoordinates = coordinates.map((c) => c.toCoordinate);\n\n    this.reset();\n\n    this.currentDrawInteraction.appendCoordinates(olCoordinates);\n  }\n\n  createModelFromFeature(_feature) {\n    // override in sub class\n  }\n\n  featureSpecificDrawEndProcessing(_event) {}\n}\n\nObject.assign(Base.prototype, withConstraintMixin);\nObject.assign(Base.prototype, withAngleLockMixin);\nObject.assign(Base.prototype, withLineLengthMenuMixin);\n", "import { featureEdgesIntersect, markIllegalIfFeatureHasPointsInsideFeature } from \"./polygon-helpers\";\n\nexport default class SimplePolygonLegalityChecker {\n  constructor(existingFeatures, mapModelSynchronizer) {\n    this.existingFeatures = existingFeatures;\n    this.mapModelSynchronizer = mapModelSynchronizer;\n  }\n\n  markIllegalPolygons(justCompletedFeature = undefined) {\n    let features = this.existingFeatures;\n    if (justCompletedFeature) {\n      features = [...features, justCompletedFeature];\n    }\n\n    this.cleanIllegalShapeFlags();\n\n    for (let i = 0; i < features.length; i++) {\n      const feature = features[i];\n\n      // If feature edges intersect other edges of same feature, it should be illegal\n      if (featureEdgesIntersect(feature, feature)) {\n        feature.set(\"illegalShape\", true);\n      }\n\n      for (let j = 0; j < features.length; j++) {\n        const otherFeature = features[j];\n\n        if (feature.get(\"uuid\") === otherFeature.get(\"uuid\")) continue;\n\n        if (featureEdgesIntersect(feature, otherFeature)) {\n          feature.set(\"illegalShape\", true);\n          otherFeature.set(\"illegalShape\", true);\n        } else {\n          markIllegalIfFeatureHasPointsInsideFeature(feature, otherFeature);\n        }\n      }\n    }\n\n    this.saveIllegalityIntoModels(justCompletedFeature);\n  }\n\n  cleanIllegalShapeFlags() {\n    this.existingFeatures.forEach((feature) => feature.set(\"illegalShape\", false));\n  }\n\n  saveIllegalityIntoModels(justCompletedFeature) {\n    const extraFeatures = justCompletedFeature ? [justCompletedFeature] : undefined;\n    this.updateAllUnderlyingModelsIllegalityFromFeature(extraFeatures);\n  }\n}\n", "import SimplePolygonLegalityChecker from \"./simple-polygon\";\n\nexport default class ObstructionLegalityChecker extends SimplePolygonLegalityChecker {\n  updateAllUnderlyingModelsIllegalityFromFeature(extraFeatures) {\n    this.mapModelSynchronizer.updateAllObstructionsIllegalityFromFeature(extraFeatures);\n  }\n}\n", "import BufferBuilder from \"../../../da/map/buffering/buffer-builder\";\nimport { linkFeatureToModel } from \"../../../da/map/modification-helpers/base\";\nimport { syncObstructionCartesianPoints } from \"../modification-helpers/obstruction\";\n\nexport default class ObstructionsBufferBuilder extends BufferBuilder {\n  constructor(controller, map, obstructionFeatures, obstructionBufferFeatures) {\n    super();\n\n    this.controller = controller;\n    this.map = map;\n    this.obstructionFeatures = obstructionFeatures;\n    this.obstructionBufferFeatures = obstructionBufferFeatures;\n\n    this.project = controller.project;\n    this.mapModelSynchronizer = controller.mapModelSynchronizer;\n\n    this.bufferObstructions();\n  }\n\n  bufferObstructions() {\n    this.project.notDeletedObstructions.forEach((obstruction) => {\n      if (isNaN(obstruction.height) || obstruction.height < 0.0) return;\n\n      if (obstruction.dirty || !obstruction.hasBuffer) {\n        this.buildBufferForObstruction(obstruction);\n        this.controller.markDirty();\n      }\n    });\n  }\n\n  buildBufferForObstruction(obstruction) {\n    const matchingObstructionFeature = this.obstructionFeatures.find((feature) => {\n      return feature.get(\"uuid\") === obstruction.uuid;\n    });\n    this.#removeOldObstructionBuffer(obstruction);\n\n    // this prevents building a new buffer for illegal shapes\n    if (obstruction.illegalShape) return;\n\n    if (!matchingObstructionFeature) {\n      debugger;\n    }\n\n    const outset = obstruction.height;\n\n    const translatedFeaturesCollection = this.translateOpenLayersFeaturesToTurf(matchingObstructionFeature);\n    const bufferedFeatures = this.buildBufferFeatures(translatedFeaturesCollection, outset);\n    this.translateTurfFeaturesToModels(bufferedFeatures);\n  }\n\n  buildModelsFromTurfFeatures(featuresFromBuffering) {\n    return featuresFromBuffering.flatMap((feature) => {\n      const obstructionUuid = feature.get(\"uuid\");\n      const obstruction = this.project.getObstruction(obstructionUuid);\n\n      const polygonFeatures = this.mapMultiPolygon(feature);\n\n      polygonFeatures.forEach((polygonFeature) => {\n        // only use the outer ring because thats all we save and restore\n        const polygonGeometry = polygonFeature.getGeometry();\n        const outerRingCoordinates = polygonGeometry.getLinearRing(0).getCoordinates();\n        polygonGeometry.setCoordinates([outerRingCoordinates]);\n\n        const obstructionBuffer = obstruction.addBuffer();\n\n        const latLngPoints = this.mapModelSynchronizer.latLngPointsFromFeature(polygonFeature);\n        obstructionBuffer.setLatLngPoints(latLngPoints);\n        syncObstructionCartesianPoints(obstructionBuffer);\n\n        this.controller.mapModelSynchronizer.setGlobalCartesianOffset(latLngPoints, obstructionBuffer);\n\n        this.addObstructionBufferPolygonFeatureToMap(polygonFeature, obstructionBuffer);\n      });\n    });\n  }\n\n  addObstructionBufferPolygonFeatureToMap(polygonFeature, obstructionBuffer) {\n    linkFeatureToModel(polygonFeature, obstructionBuffer);\n    this.controller.mapManager.obstructionBuffersVectorSource.addFeature(polygonFeature);\n  }\n\n  #removeOldObstructionBuffer(obstruction) {\n    const matchingObstructionBufferFeature = this.obstructionBufferFeatures.find((feature) => {\n      return feature.get(\"uuid\") === obstruction.uuid;\n    });\n\n    obstruction.removeBuffer();\n    this.controller.mapManager.obstructionBuffersVectorSource.removeFeature(matchingObstructionBufferFeature);\n  }\n}\n", "import BufferBuilder from \"../../../da/map/buffering/buffer-builder\";\nimport { linkFeatureToModel } from \"../../../da/map/modification-helpers/base\";\nimport { syncObstructionCartesianPoints } from \"../modification-helpers/obstruction\";\n\nexport default class ObstructionsSetbackBufferBuilder extends BufferBuilder {\n  constructor(controller, map, obstructionFeatures, obstructionSetbackBufferFeatures, obstructionsToBuffer = null) {\n    super();\n\n    this.controller = controller;\n    this.map = map;\n    this.obstructionFeatures = obstructionFeatures;\n    this.obstructionSetbackBufferFeatures = obstructionSetbackBufferFeatures;\n    this.obstructionsToBuffer = obstructionsToBuffer;\n\n    this.project = controller.project;\n    this.mapModelSynchronizer = controller.mapModelSynchronizer;\n\n    this.bufferObstructions();\n  }\n\n  bufferObstructions() {\n    const obstructions = this.obstructionsToBuffer || this.project.notDeletedObstructions;\n\n    obstructions.forEach((obstruction) => {\n      if (!obstruction.shouldRenderSetbackBuffer) {\n        this.#removeOldObstructionSetbackBuffer(obstruction);\n        return;\n      }\n\n      if (obstruction.dirty || !obstruction.hasSetbackBuffer) {\n        this.buildSetbackBufferForObstruction(obstruction);\n        this.controller.markDirty();\n      }\n    });\n  }\n\n  buildSetbackBufferForObstruction(obstruction) {\n    const matchingObstructionFeature = this.obstructionFeatures.find((feature) => {\n      return feature.get(\"uuid\") === obstruction.uuid;\n    });\n    this.#removeOldObstructionSetbackBuffer(obstruction);\n\n    if (obstruction.illegalShape) return;\n\n    if (!matchingObstructionFeature) return;\n\n    const outset = obstruction.setbackFt;\n\n    const translatedFeaturesCollection = this.translateOpenLayersFeaturesToTurf(matchingObstructionFeature);\n    const bufferedFeatures = this.buildBufferFeatures(translatedFeaturesCollection, outset);\n    this.translateTurfFeaturesToModels(bufferedFeatures);\n  }\n\n  buildModelsFromTurfFeatures(featuresFromBuffering) {\n    return featuresFromBuffering.flatMap((feature) => {\n      const obstructionUuid = feature.get(\"uuid\");\n      const obstruction = this.project.getObstruction(obstructionUuid);\n\n      const polygonFeatures = this.mapMultiPolygon(feature);\n\n      polygonFeatures.forEach((polygonFeature) => {\n        const polygonGeometry = polygonFeature.getGeometry();\n        const outerRingCoordinates = polygonGeometry.getLinearRing(0).getCoordinates();\n        polygonGeometry.setCoordinates([outerRingCoordinates]);\n\n        const obstructionSetbackBuffer = obstruction.addSetbackBuffer();\n\n        const latLngPoints = this.mapModelSynchronizer.latLngPointsFromFeature(polygonFeature);\n        obstructionSetbackBuffer.setLatLngPoints(latLngPoints);\n        syncObstructionCartesianPoints(obstructionSetbackBuffer);\n\n        this.controller.mapModelSynchronizer.setGlobalCartesianOffset(latLngPoints, obstructionSetbackBuffer);\n\n        this.addObstructionSetbackBufferPolygonFeatureToMap(polygonFeature, obstructionSetbackBuffer);\n      });\n    });\n  }\n\n  addObstructionSetbackBufferPolygonFeatureToMap(polygonFeature, obstructionSetbackBuffer) {\n    linkFeatureToModel(polygonFeature, obstructionSetbackBuffer);\n    this.controller.mapManager.obstructionSetbackBuffersVectorSource.addFeature(polygonFeature);\n  }\n\n  #removeOldObstructionSetbackBuffer(obstruction) {\n    const matchingObstructionSetbackBufferFeature = this.obstructionSetbackBufferFeatures.find((feature) => {\n      return feature.get(\"uuid\") === obstruction.uuid;\n    });\n\n    obstruction.removeSetbackBuffer();\n    this.controller.mapManager.obstructionSetbackBuffersVectorSource.removeFeature(\n      matchingObstructionSetbackBufferFeature,\n    );\n  }\n}\n", "import ObstructionLegalityChecker from \"../../../da/map/legality-checkers/obstructions\";\nimport ObstructionsBufferBuilder from \"../obstructions/buffer-builder\";\nimport ObstructionsSetbackBufferBuilder from \"../obstructions/setback-buffer-builder\";\nimport ObstructionsProximityDetector from \"../obstructions/proximity-detector\";\nimport { linkFeatureToModel } from \"../../../da/map/modification-helpers/base\";\nimport { findTopLeftLonLat, setCartesianPointsForModelRelativeToOrigin } from \"../../../da/map/ol-geometry\";\nimport { removeFeaturesForObstruction } from \"../ol-helpers\";\nimport { removeFeaturesMatchingUuid } from \"../../../da/map/ol-helpers\";\nimport LayoutBuilder from \"../panel-grid/layout-builder\";\n\nexport function createObstruction(oFeature, project, mapModelSynchronizer, mapManager) {\n  const obstruction = project.addObstruction({});\n  linkFeatureToModel(oFeature, obstruction);\n\n  obstruction.setUseSetback(true);\n  obstruction.setSetbackFt(project.obstructionsSetbackFt);\n\n  mapModelSynchronizer.updateObstructionLatLngFromFeature(oFeature);\n  syncObstructionCartesianPoints(obstruction);\n  new ObstructionLegalityChecker(mapManager.obstructionsFeatures, mapModelSynchronizer).markIllegalPolygons(oFeature);\n\n  // Build setback buffer after a short delay to ensure feature is in vector source\n  setTimeout(() => {\n    rebuildObstructionBuffers(obstruction, mapManager, mapModelSynchronizer);\n  }, 5);\n\n  reprocessRoofSectionsDueToObstructionChange(project);\n\n  return obstruction;\n}\n\nexport function modifyObstruction(oFeature, mapModelSynchronizer, mapManager) {\n  repositionObstruction(oFeature, mapModelSynchronizer, mapManager);\n  mapManager.forceRedrawObstructions();\n}\n\nexport function repositionObstruction(oFeature, mapModelSynchronizer, mapManager) {\n  const obstruction = mapModelSynchronizer.getObstructionForFeature(\n    oFeature,\n    \"BxObstructionModificationHelper.repositionObstruction\",\n  );\n\n  mapModelSynchronizer.updateObstructionLatLngFromFeature(oFeature);\n  syncObstructionCartesianPoints(obstruction);\n  new ObstructionLegalityChecker(mapManager.obstructionsFeatures, mapModelSynchronizer).markIllegalPolygons();\n\n  rebuildObstructionBuffers(obstruction, mapManager, mapModelSynchronizer);\n}\n\nexport function rebuildObstructionBuffers(obstruction, mapManager, mapModelSynchronizer) {\n  new ObstructionsBufferBuilder(\n    mapManager.controller,\n    mapManager.map,\n    mapManager.obstructionsFeatures,\n    mapManager.obstructionBuffersFeatures,\n  );\n\n  new ObstructionsSetbackBufferBuilder(\n    mapManager.controller,\n    mapManager.map,\n    mapManager.obstructionsFeatures,\n    mapManager.obstructionSetbackBuffersFeatures,\n  );\n\n  reprocessRoofSectionsDueToObstructionChange(mapModelSynchronizer.project);\n\n  // Only run proximity detection if obstruction has a height - proximity detection\n  // calculates which roof sections are affected by the height buffer, so it's pointless\n  // without a height value\n  if (!isNaN(obstruction.height) && obstruction.height >= 0.0) {\n    new ObstructionsProximityDetector(mapManager.project).findNearbyRoofPlanesAndSectionsForObstruction(obstruction);\n  }\n}\n\nexport function deleteObstruction(rpFeature, project, mapModelSynchronizer, mapManager) {\n  const obstruction = mapModelSynchronizer.getObstructionForFeature(\n    rpFeature,\n    \"BxObstructionModificationHelper.deleteObstruction\",\n  );\n\n  if (!obstruction) {\n    console.log(\"Deleted feature not a polygon. Skipping.\");\n    return;\n  }\n\n  removeFeaturesForObstruction(obstruction, mapManager);\n\n  project.destroyObstruction(obstruction);\n\n  // This is less efficient if multiple roof planes are being deleted, but it's cleaner\n  // because we can be confident that each call to deleteObstruction will leave things in\n  // a valid final state.\n  new ObstructionLegalityChecker(mapManager.obstructionsFeatures, mapModelSynchronizer).markIllegalPolygons();\n  project.resequenceObstructionsIdentifiers();\n  mapModelSynchronizer.syncIdentifiersOnFeatures();\n\n  new ObstructionsBufferBuilder(\n    mapManager.controller,\n    mapManager.map,\n    mapManager.obstructionsFeatures,\n    mapManager.obstructionBuffersFeatures,\n  );\n\n  new ObstructionsSetbackBufferBuilder(\n    mapManager.controller,\n    mapManager.map,\n    mapManager.obstructionsFeatures,\n    mapManager.obstructionSetbackBuffersFeatures,\n  );\n\n  reprocessRoofSectionsDueToObstructionChange(project);\n}\n\nexport function syncObstructionCartesianPoints(obstructionOrBuffer) {\n  const topLeftLonLat = findTopLeftLonLat(obstructionOrBuffer.latLngPoints);\n\n  setCartesianPointsForModelRelativeToOrigin(topLeftLonLat, obstructionOrBuffer);\n}\n\nexport function removeObstructionBuffer(oFeature, mapModelSynchronizer, mapManager) {\n  const obstruction = mapModelSynchronizer.getObstructionForFeature(oFeature, \"removeObstructionBuffer\");\n  removeFeaturesMatchingUuid(mapManager.obstructionBuffersVectorSource, obstruction.uuid);\n  removeFeaturesMatchingUuid(mapManager.obstructionSetbackBuffersVectorSource, obstruction.uuid);\n  obstruction.removeBuffer();\n  obstruction.removeSetbackBuffer();\n}\n\nexport function reprocessRoofSectionsDueToObstructionChange(project) {\n  project.notDeletedRoofPlanes.forEach((roofPlane) => {\n    roofPlane.activeRoofSections.forEach((roofSection) => {\n      new LayoutBuilder(project, roofSection).reprocessExistingLayout();\n    });\n  });\n}\n", "import DaBase from \"../../../../da/map/interaction-managers/draw/base\";\nimport { OBSTRUCTION_DATA_TYPE } from \"../../../../da/map/data-types\";\nimport { createObstruction } from \"../../modification-helpers/obstruction\";\n\nexport default class RoofPlanes extends DaBase {\n  get targetDrawingSource() {\n    return this.mapManager.obstructionsVectorSource;\n  }\n\n  get featureDataType() {\n    return OBSTRUCTION_DATA_TYPE;\n  }\n\n  createModelFromFeature(feature) {\n    const obstruction = createObstruction(feature, this.controller.project, this.mapModelSynchronizer, this.mapManager);\n    this.controller.bxLayoutEditorObstructionHeightsFormOutlet.add(obstruction);\n  }\n}\n", "import { Feature } from \"ol\";\nimport { Polygon } from \"ol/geom\";\nimport { Draw } from \"ol/interaction\";\nimport { getPointResolution } from \"ol/proj\";\nimport Base from \"./base\";\nimport { drawStyle } from \"../../styles/draw\";\nimport { buildSimpleEdgeList } from \"../../edge-list\";\nimport { addDimensionMarkersToSegmentsBetweenCoordinates } from \"../../styles/distance-markers\";\nimport { ensureFeatureIsClockwise, FEET_TO_METERS } from \"../../ol-helpers\";\nimport { dynamicDialog, getDialogElem, hideDialog } from \"../../../../controllers/components/ir_dialog/helper\";\n\nexport const SHAPE_TYPE_RECTANGLE = \"rectangle\";\n\nconst SHAPE_DIALOG_IDENTIFIER = \"shape-dimensions-dialog\";\nconst MAX_SHAPE_QUANTITY = 50;\n\nexport default class ShapeBase extends Base {\n  clickCoordinate;\n\n  #onShiftClick = (event) => {\n    if (!event.originalEvent.shiftKey) return;\n    this.#openShapeDialog(event);\n  };\n\n  constructor(controller) {\n    super(controller);\n    this.shapeType = SHAPE_TYPE_RECTANGLE;\n  }\n\n  get targetDrawingSource() {\n    throw new Error(\"Subclasses must implement targetDrawingSource\");\n  }\n\n  get featureDataType() {\n    throw new Error(\"Subclasses must implement featureDataType\");\n  }\n\n  get dialogHeader() {\n    return \"Shape\";\n  }\n\n  add() {\n    this.clearCurrentInteraction();\n\n    const geometryFunction = this.getGeometryFunction();\n\n    this.currentDrawInteraction = new Draw({\n      source: this.targetDrawingSource,\n      type: \"Circle\",\n      style: (feature) => this.#shapeDrawStyle(feature),\n      geometryFunction,\n      condition: (e) => !e.originalEvent.shiftKey,\n    });\n\n    this.currentDrawInteraction.on(\"drawstart\", (e) => {\n      const { feature } = e;\n      feature.set(\"dataType\", this.featureDataType);\n      feature.set(\"drawing\", true);\n      this.currentDrawInteraction.feature = feature;\n    });\n\n    this.currentDrawInteraction.on(\"drawend\", (e) => {\n      e.feature.set(\"drawing\", false);\n      this.currentDrawInteraction.feature = undefined;\n    });\n    this.currentDrawInteraction.on(\"drawend\", this.onDrawEnd);\n\n    this.map.addInteraction(this.currentDrawInteraction);\n    this.mapManager.onClick(this.#onShiftClick);\n    this.controller.snapInteractionManager.refresh();\n  }\n\n  getGeometryFunction() {\n    return this.#createRotationAwareBox();\n  }\n\n  remove() {\n    this.clearCurrentInteraction();\n  }\n\n  clearCurrentInteraction() {\n    this.mapManager.unClick(this.#onShiftClick);\n    super.clearCurrentInteraction();\n  }\n\n  showDimensionMenu() {}\n\n  hideDimensionMenu() {\n    const dialog = getDialogElem(SHAPE_DIALOG_IDENTIFIER);\n    if (dialog) hideDialog(dialog);\n  }\n\n  updateGuideShape() {}\n\n  finish() {\n    this.currentDrawInteraction?.abortDrawing();\n  }\n\n  buildDialogContent() {\n    return `\n      <div class=\"ir-form\">\n        <div class=\"row\">\n          <div class=\"form-group col\">\n            <label>Width</label>\n            ${this.feetAndInchesFieldHtml(\"shape-width-field\")}\n          </div>\n          <div class=\"form-group col\">\n            <label>Height</label>\n            ${this.feetAndInchesFieldHtml(\"shape-height-field\")}\n          </div>\n          <div class=\"form-group col\">\n            <label>Quantity</label>\n            ${this.quantityFieldHtml()}\n          </div>\n        </div>\n      </div>`;\n  }\n\n  buildDialogFooter() {\n    return `\n      <button class=\"ir-btn ir-btn--icon-prepend ir-btn--blue\" id=\"shape-add-to-map-btn\" type=\"button\">\n        <span class=\"ir-btn__icon\"><i class=\"fas fa-plus\"></i></span>\n        <span class=\"ir-btn__text\">Add to map</span>\n      </button>`;\n  }\n\n  attachDialogListeners() {\n    const addBtn = document.getElementById(\"shape-add-to-map-btn\");\n    addBtn.addEventListener(\"click\", () => this.addShapesToMap());\n  }\n\n  addShapesToMap() {\n    const widthFeet = parseFloat(document.getElementById(\"shape-width-field\").value) || 0;\n    const heightFeet = parseFloat(document.getElementById(\"shape-height-field\").value) || 0;\n    if (widthFeet <= 0 || heightFeet <= 0) return;\n\n    const quantityInput = document.querySelector(\".shape-quantity-field\");\n    const quantity = Math.min(MAX_SHAPE_QUANTITY, Math.max(1, parseInt(quantityInput.value, 10) || 1));\n\n    const center = this.clickCoordinate;\n    const widthMap = this.feetToMapUnits(widthFeet, center);\n    const heightMap = this.feetToMapUnits(heightFeet, center);\n\n    const rotation = this.map.getView().getRotation();\n    const halfW = widthMap / 2;\n    const halfH = heightMap / 2;\n    const cos = Math.cos(rotation);\n    const sin = Math.sin(rotation);\n    const offsetX = halfW * cos + halfH * sin;\n    const offsetY = halfW * sin - halfH * cos;\n\n    const newFeatures = [];\n\n    for (let i = 0; i < quantity; i++) {\n      const shapeCenter = [center[0] + offsetX * i, center[1] + offsetY * i];\n      const coords = this.createRectangleAtCenter(shapeCenter, widthMap, heightMap);\n\n      const feature = new Feature({\n        geometry: new Polygon([coords]),\n        dataType: this.featureDataType,\n      });\n\n      ensureFeatureIsClockwise(feature);\n      this.targetDrawingSource.addFeature(feature);\n      this.createModelFromFeature(feature);\n      newFeatures.push(feature);\n    }\n\n    this.postBatchCreate(newFeatures);\n    this.controller.markDirty();\n    this.hideDimensionMenu();\n  }\n\n  postBatchCreate(_features) {}\n\n  featureSpecificDrawEndProcessing(_event) {}\n\n  feetAndInchesFieldHtml(hiddenId) {\n    return `\n      <div data-controller=\"components--ir-feet-and-inches-field\">\n        <input type=\"hidden\" id=\"${hiddenId}\"\n          data-components--ir-feet-and-inches-field-target=\"hiddenField\" />\n        <div class=\"ir-feet-and-inches-field\">\n          <input type=\"text\" class=\"form-control ir-feet-and-inches-field__field ir-feet-and-inches-field__field--feet\"\n            data-components--ir-feet-and-inches-field-target=\"feetField\"\n            data-type=\"feet\"\n            data-action=\"keydown->components--ir-feet-and-inches-field#onlyAllowNumber keyup->components--ir-feet-and-inches-field#keyupFeet blur->components--ir-feet-and-inches-field#fieldBlur\" />\n          <div class=\"ir-feet-and-inches-field__marker ir-feet-and-inches-field__marker--feet\">ft</div>\n          <input type=\"text\" class=\"form-control ir-feet-and-inches-field__field ir-feet-and-inches-field__field--inches\"\n            data-components--ir-feet-and-inches-field-target=\"inchesField\"\n            data-type=\"inches\"\n            data-action=\"keydown->components--ir-feet-and-inches-field#onlyAllowNumber keyup->components--ir-feet-and-inches-field#keyupInches blur->components--ir-feet-and-inches-field#fieldBlur\" />\n          <div class=\"ir-feet-and-inches-field__marker ir-feet-and-inches-field__marker--inches\">in</div>\n        </div>\n      </div>`;\n  }\n\n  quantityFieldHtml() {\n    return `\n      <div style=\"max-width: 140px\">\n      <div class=\"input-group\" data-controller=\"components--ir-number-scroll\"\n           data-components--ir-number-scroll-min-value=\"1\"\n           data-components--ir-number-scroll-max-value=\"${MAX_SHAPE_QUANTITY}\"\n           data-components--ir-number-scroll-unsigned-value=\"true\">\n        <input type=\"text\" class=\"form-control shape-quantity-field\" value=\"1\"\n          data-components--ir-number-scroll-target=\"scrollField\"\n          data-action=\"input->components--ir-number-scroll#fieldInput\" />\n        <div class=\"input-group-append ir-number-scroll__container\">\n          <button class=\"ir-number-scroll__up\" type=\"button\"\n            data-action=\"components--ir-number-scroll#increase\">\n            <i class=\"fas fa-caret-up\"></i>\n          </button>\n          <button class=\"ir-number-scroll__down\" type=\"button\"\n            data-action=\"components--ir-number-scroll#decrease\">\n            <i class=\"fas fa-caret-down\"></i>\n          </button>\n        </div>\n      </div>\n      </div>`;\n  }\n\n  feetToMapUnits(feet, coordinate) {\n    const meters = feet * FEET_TO_METERS;\n    const projection = this.map.getView().getProjection();\n    const resolution = this.map.getView().getResolution();\n    const localResolution = getPointResolution(projection, resolution, coordinate);\n    return meters * (resolution / localResolution);\n  }\n\n  createRectangleAtCenter(center, widthMapUnits, heightMapUnits) {\n    const rotation = this.map.getView().getRotation();\n    const halfW = widthMapUnits / 2;\n    const halfH = heightMapUnits / 2;\n\n    const screenCorners = [\n      [-halfW, -halfH],\n      [halfW, -halfH],\n      [halfW, halfH],\n      [-halfW, halfH],\n      [-halfW, -halfH],\n    ];\n\n    const cos = Math.cos(rotation);\n    const sin = Math.sin(rotation);\n    return screenCorners.map(([cx, cy]) => [center[0] + cx * cos - cy * sin, center[1] + cx * sin + cy * cos]);\n  }\n\n  createModelFromFeature(_feature) {\n    throw new Error(\"Subclasses must implement createModelFromFeature\");\n  }\n\n  #openShapeDialog(event) {\n    this.clickCoordinate = event.coordinate;\n    const pixel = this.map.getPixelFromCoordinate(event.coordinate);\n    const mapRect = this.map.getTargetElement().getBoundingClientRect();\n    const pageX = pixel[0] + mapRect.left + window.scrollX;\n    const pageY = pixel[1] + mapRect.top + window.scrollY;\n\n    this.#ensureDialogElement();\n\n    dynamicDialog({\n      header: this.dialogHeader,\n      content: this.buildDialogContent(),\n      footer: this.buildDialogFooter(),\n      width: 420,\n      dialogIdentifier: SHAPE_DIALOG_IDENTIFIER,\n      showNearClickPosition: true,\n      clickPosition: { x: pageX, y: pageY },\n    });\n\n    this.attachDialogListeners();\n  }\n\n  #ensureDialogElement() {\n    if (getDialogElem(SHAPE_DIALOG_IDENTIFIER)) return;\n\n    const dialogHTML = `\n      <div class=\"ir-dialog__container\" data-controller=\"components--ir-dialog--base\">\n        <div class=\"ir-dialog ir-dialog--solid-header ir-dialog--modal\"\n          data-dialog-identifier=\"${SHAPE_DIALOG_IDENTIFIER}\"\n          data-dialog-width=\"420\"\n          data-dialog-modal=\"true\"\n          data-components--ir-dialog--base-target=\"dialog\"\n          data-dialog-escape-closes=\"true\"\n          data-closable=\"true\">\n          <div class=\"ir-dialog__drag\" data-action=\"mousedown->components--ir-dialog--base#dragMouseDown\">\n            <i class=\"fas fa-grip-lines\" aria-hidden=\"true\"></i>\n          </div>\n          <a class=\"ir-dialog__close\" data-action=\"components--ir-dialog--base#close\" href=\"#\">\n            &times;\n          </a>\n          <div class=\"ir-dialog__container__contents\"></div>\n        </div>\n      </div>`;\n\n    document.body.insertAdjacentHTML(\"beforeend\", dialogHTML);\n  }\n\n  #shapeDrawStyle(feature) {\n    const styles = drawStyle(feature, this.map);\n    const geometry = feature.getGeometry();\n    if (geometry.getType() === \"Polygon\") {\n      const coordinates = geometry.getLinearRing(0).getCoordinates();\n      const edgeList = buildSimpleEdgeList(coordinates);\n      const lineColor = \"rgba(239, 156, 0)\";\n      addDimensionMarkersToSegmentsBetweenCoordinates(styles, this.map, lineColor, edgeList);\n    }\n    return styles;\n  }\n\n  #createRotationAwareBox() {\n    return (coordinates, geometry) => {\n      const rotation = this.map.getView().getRotation();\n      const start = coordinates[0];\n      const end = coordinates[coordinates.length - 1];\n\n      const dx = end[0] - start[0];\n      const dy = end[1] - start[1];\n\n      const cosNeg = Math.cos(-rotation);\n      const sinNeg = Math.sin(-rotation);\n      const screenDx = dx * cosNeg - dy * sinNeg;\n      const screenDy = dx * sinNeg + dy * cosNeg;\n\n      const corners = [\n        [0, 0],\n        [screenDx, 0],\n        [screenDx, screenDy],\n        [0, screenDy],\n        [0, 0],\n      ];\n\n      const cosPos = Math.cos(rotation);\n      const sinPos = Math.sin(rotation);\n      const mapCoords = corners.map(([cx, cy]) => [\n        start[0] + cx * cosPos - cy * sinPos,\n        start[1] + cx * sinPos + cy * cosPos,\n      ]);\n\n      if (!geometry) {\n        geometry = new Polygon([mapCoords]);\n      } else {\n        geometry.setCoordinates([mapCoords]);\n      }\n      return geometry;\n    };\n  }\n}\n", "import ShapeBase, { SHAPE_TYPE_RECTANGLE } from \"../../../../da/map/interaction-managers/draw/shape-base\";\nimport { OBSTRUCTION_DATA_TYPE } from \"../../../../da/map/data-types\";\nimport { createObstruction } from \"../../modification-helpers/obstruction\";\nimport ObstructionsBufferBuilder from \"../../obstructions/buffer-builder\";\nimport ObstructionsSetbackBufferBuilder from \"../../obstructions/setback-buffer-builder\";\nimport { Feature } from \"ol\";\nimport { Polygon } from \"ol/geom\";\nimport { ensureFeatureIsClockwise } from \"../../../../da/map/ol-helpers\";\nimport * as animate from \"../../../../helpers/animate\";\n\nexport { SHAPE_TYPE_RECTANGLE };\nexport const SHAPE_TYPE_POLYGON = \"polygon\";\nexport const DEFAULT_POLYGON_SIDES = 8;\nexport const MIN_POLYGON_SIDES = 5;\nexport const MAX_POLYGON_SIDES = 16;\n\nconst RECTANGLE_SIDES = 4;\nconst MAX_SHAPE_QUANTITY = 50;\n\nexport default class ObstructionShapes extends ShapeBase {\n  constructor(controller) {\n    super(controller);\n    this.polygonSides = DEFAULT_POLYGON_SIDES;\n  }\n\n  get targetDrawingSource() {\n    return this.mapManager.obstructionsVectorSource;\n  }\n\n  get featureDataType() {\n    return OBSTRUCTION_DATA_TYPE;\n  }\n\n  get dialogHeader() {\n    return \"Shape Obstructions\";\n  }\n\n  createModelFromFeature(feature) {\n    const obstruction = createObstruction(feature, this.controller.project, this.mapModelSynchronizer, this.mapManager);\n    if (this.controller.hasBxLayoutEditorObstructionHeightsFormOutlet) {\n      this.controller.bxLayoutEditorObstructionHeightsFormOutlet.add(obstruction);\n    }\n    return obstruction;\n  }\n\n  getGeometryFunction() {\n    return this.shapeType === SHAPE_TYPE_RECTANGLE\n      ? super.getGeometryFunction()\n      : this.#createFixedOrientationRegularPolygon(this.polygonSides);\n  }\n\n  setPolygonSides(sides) {\n    const clamped = Math.max(MIN_POLYGON_SIDES, Math.min(MAX_POLYGON_SIDES, sides));\n    if (clamped === this.polygonSides) return;\n    this.polygonSides = clamped;\n    if (this.shapeType === SHAPE_TYPE_POLYGON && this.currentDrawInteraction) {\n      this.add();\n    }\n  }\n\n  buildDialogContent() {\n    const defaultSides = this.shapeType === SHAPE_TYPE_RECTANGLE ? RECTANGLE_SIDES : this.polygonSides;\n    const isRectangle = defaultSides === RECTANGLE_SIDES;\n    return `\n      <div class=\"ir-form\">\n        <div class=\"mb-3\">\n          <label>Shape sides</label>\n          <div class=\"shape-dialog__toggle\">\n            <button type=\"button\" class=\"shape-dialog__toggle__btn ${defaultSides === 4 ? \"shape-dialog__toggle__btn--active\" : \"\"}\" data-sides=\"4\">\n              ${this.#shapeSvg(4)}\n              <span class=\"shape-dialog__toggle__btn__name\">Rectangle</span>\n            </button>\n            <button type=\"button\" class=\"shape-dialog__toggle__btn ${defaultSides === 8 ? \"shape-dialog__toggle__btn--active\" : \"\"}\" data-sides=\"8\">\n              ${this.#shapeSvg(8)}\n              <span class=\"shape-dialog__toggle__btn__name\">Octagon</span>\n            </button>\n            <button type=\"button\" class=\"shape-dialog__toggle__btn ${defaultSides === 16 ? \"shape-dialog__toggle__btn--active\" : \"\"}\" data-sides=\"16\">\n              ${this.#shapeSvg(16)}\n              <span class=\"shape-dialog__toggle__btn__name\">Hexadecagon</span>\n            </button>\n          </div>\n          <input type=\"hidden\" id=\"shape-sides-field\" value=\"${defaultSides}\" />\n        </div>\n        <div id=\"shape-rect-fields\" style=\"display: ${isRectangle ? \"block\" : \"none\"}\">\n          <div class=\"row\">\n            <div class=\"form-group col\">\n              <label>Width</label>\n              ${this.feetAndInchesFieldHtml(\"shape-width-field\")}\n            </div>\n            <div class=\"form-group col\">\n              <label>Height</label>\n              ${this.feetAndInchesFieldHtml(\"shape-height-field\")}\n            </div>\n            <div class=\"form-group col\">\n              <label>Quantity</label>\n              ${this.quantityFieldHtml()}\n            </div>\n          </div>\n        </div>\n        <div id=\"shape-polygon-fields\" style=\"display: ${isRectangle ? \"none\" : \"block\"}\">\n          <div class=\"row\">\n            <div class=\"form-group col\">\n              <label>Diameter</label>\n              ${this.feetAndInchesFieldHtml(\"shape-diameter-field\")}\n            </div>\n            <div class=\"form-group col\">\n              <label>Quantity</label>\n              ${this.quantityFieldHtml()}\n            </div>\n          </div>\n        </div>\n      </div>`;\n  }\n\n  attachDialogListeners() {\n    const sidesField = document.getElementById(\"shape-sides-field\");\n    const rectFields = document.getElementById(\"shape-rect-fields\");\n    const polygonFields = document.getElementById(\"shape-polygon-fields\");\n    const addBtn = document.getElementById(\"shape-add-to-map-btn\");\n    const toggleBtns = document.querySelectorAll(\".shape-dialog__toggle__btn\");\n\n    toggleBtns.forEach((btn) => {\n      btn.addEventListener(\"click\", () => {\n        toggleBtns.forEach((b) => b.classList.remove(\"shape-dialog__toggle__btn--active\"));\n        btn.classList.add(\"shape-dialog__toggle__btn--active\");\n        const sides = parseInt(btn.dataset.sides, 10);\n        sidesField.value = sides;\n        const isRectangle = sides === RECTANGLE_SIDES;\n        animate.toggle(rectFields, isRectangle, { fadeOut: false });\n        animate.toggle(polygonFields, !isRectangle, { fadeOut: false });\n      });\n    });\n\n    addBtn.addEventListener(\"click\", () => this.addShapesToMap());\n  }\n\n  addShapesToMap() {\n    const sides = parseInt(document.getElementById(\"shape-sides-field\").value, 10);\n    const visibleFields =\n      sides === RECTANGLE_SIDES\n        ? document.getElementById(\"shape-rect-fields\")\n        : document.getElementById(\"shape-polygon-fields\");\n    const quantityInput = visibleFields.querySelector(\".shape-quantity-field\");\n    const quantity = Math.min(MAX_SHAPE_QUANTITY, Math.max(1, parseInt(quantityInput.value, 10) || 1));\n\n    let widthFeet, heightFeet;\n    if (sides === RECTANGLE_SIDES) {\n      widthFeet = parseFloat(document.getElementById(\"shape-width-field\").value) || 0;\n      heightFeet = parseFloat(document.getElementById(\"shape-height-field\").value) || 0;\n      if (widthFeet <= 0 || heightFeet <= 0) return;\n    } else {\n      const diameterFeet = parseFloat(document.getElementById(\"shape-diameter-field\").value) || 0;\n      if (diameterFeet <= 0) return;\n      widthFeet = diameterFeet;\n      heightFeet = diameterFeet;\n    }\n\n    const center = this.clickCoordinate;\n    const widthMap = this.feetToMapUnits(widthFeet, center);\n    const heightMap = this.feetToMapUnits(heightFeet, center);\n\n    const rotation = this.map.getView().getRotation();\n    const halfW = widthMap / 2;\n    const halfH = heightMap / 2;\n    const cos = Math.cos(rotation);\n    const sin = Math.sin(rotation);\n    const offsetX = halfW * cos + halfH * sin;\n    const offsetY = halfW * sin - halfH * cos;\n\n    for (let i = 0; i < quantity; i++) {\n      const shapeCenter = [center[0] + offsetX * i, center[1] + offsetY * i];\n\n      let coords;\n      if (sides === RECTANGLE_SIDES) {\n        coords = this.createRectangleAtCenter(shapeCenter, widthMap, heightMap);\n      } else {\n        const radius = widthMap / 2;\n        coords = this.#createPolygonAtCenter(shapeCenter, radius, sides);\n      }\n\n      const feature = new Feature({\n        geometry: new Polygon([coords]),\n        dataType: OBSTRUCTION_DATA_TYPE,\n      });\n\n      ensureFeatureIsClockwise(feature);\n      this.targetDrawingSource.addFeature(feature);\n      this.createModelFromFeature(feature);\n    }\n\n    new ObstructionsBufferBuilder(\n      this.controller,\n      this.map,\n      this.mapManager.obstructionsFeatures,\n      this.mapManager.obstructionBuffersFeatures,\n    );\n\n    new ObstructionsSetbackBufferBuilder(\n      this.controller,\n      this.map,\n      this.mapManager.obstructionsFeatures,\n      this.mapManager.obstructionSetbackBuffersFeatures,\n    );\n\n    this.controller.markDirty();\n    this.hideDimensionMenu();\n  }\n\n  #createFixedOrientationRegularPolygon(sides) {\n    return (coordinates, geometry) => {\n      const center = coordinates[0];\n      const end = coordinates[coordinates.length - 1];\n      const radius = Math.sqrt(Math.pow(end[0] - center[0], 2) + Math.pow(end[1] - center[1], 2));\n\n      const mapRotation = this.map.getView().getRotation();\n      const startAngle = mapRotation + Math.PI / 2 + Math.PI / sides;\n\n      const coords = [];\n      for (let i = 0; i < sides; i++) {\n        const angle = startAngle + (i * 2 * Math.PI) / sides;\n        coords.push([center[0] + radius * Math.cos(angle), center[1] + radius * Math.sin(angle)]);\n      }\n      coords.push(coords[0].slice());\n\n      if (!geometry) {\n        geometry = new Polygon([coords]);\n      } else {\n        geometry.setCoordinates([coords]);\n      }\n      return geometry;\n    };\n  }\n\n  #createPolygonAtCenter(center, radius, sides) {\n    const mapRotation = this.map.getView().getRotation();\n    const startAngle = mapRotation + Math.PI / 2 + Math.PI / sides;\n\n    const coords = [];\n    for (let i = 0; i < sides; i++) {\n      const angle = startAngle + (i * 2 * Math.PI) / sides;\n      coords.push([center[0] + radius * Math.cos(angle), center[1] + radius * Math.sin(angle)]);\n    }\n    coords.push(coords[0].slice());\n    return coords;\n  }\n\n  #shapeSvg(sides) {\n    const size = 48;\n    const cx = size / 2;\n    const cy = size / 2;\n\n    if (sides === 4) {\n      const hw = size / 2 - 2.5;\n      const hh = hw * 0.7;\n      const points = `${cx - hw},${cy - hh} ${cx + hw},${cy - hh} ${cx + hw},${cy + hh} ${cx - hw},${cy + hh}`;\n      return `<svg viewBox=\"0 0 ${size} ${size}\"><polygon points=\"${points}\" class=\"shape-dialog__toggle__btn__shape\" stroke=\"currentColor\" stroke-width=\"2\"/><text x=\"${cx}\" y=\"${cy}\" class=\"shape-dialog__toggle__btn__sides-text\" dominant-baseline=\"central\" text-anchor=\"middle\">${sides}</text></svg>`;\n    }\n\n    const r = size / 2 - 2.5;\n    const startAngle = -Math.PI / 2 + Math.PI / sides;\n\n    const points = [];\n    for (let i = 0; i < sides; i++) {\n      const angle = startAngle + (i * 2 * Math.PI) / sides;\n      points.push(`${(cx + r * Math.cos(angle)).toFixed(1)},${(cy + r * Math.sin(angle)).toFixed(1)}`);\n    }\n\n    return `<svg viewBox=\"0 0 ${size} ${size}\"><polygon points=\"${points.join(\" \")}\" class=\"shape-dialog__toggle__btn__shape\" stroke=\"currentColor\" stroke-width=\"2\"/><text x=\"${cx}\" y=\"${cy}\" class=\"shape-dialog__toggle__btn__sides-text\" dominant-baseline=\"central\" text-anchor=\"middle\">${sides}</text></svg>`;\n  }\n}\n", "import Base from \"../../../../da/map/interaction-managers/select/base\";\nimport { modifyObstruction } from \"../../modification-helpers/obstruction\";\nimport { MEASURE_DATA_TYPE, OBSTRUCTION_DATA_TYPE } from \"../../../../da/map/data-types\";\nimport { OBSTRUCTION_EDIT_MODE_TRANSFORM } from \"../../../../da/layout-editor/helpers/toolbar-constants\";\n\nexport default class Obstructions extends Base {\n  constructor(controller) {\n    super(controller);\n\n    this.modifyObstruction = modifyObstruction;\n  }\n\n  filterSelects = (_feature, layer) => {\n    const layerDataType = layer && layer.get(\"dataType\");\n    const selectedBubbleAtVertex = layer === null;\n\n    return selectedBubbleAtVertex || layerDataType === OBSTRUCTION_DATA_TYPE || layerDataType === MEASURE_DATA_TYPE;\n  };\n\n  removeSelectedVertices() {\n    this.removeSelectedVerticesFromObstruction();\n    this.removeSelectedVertexFromSelectInteractionFeatures();\n  }\n\n  removeSelectedVerticesFromObstruction() {\n    const featuresToModify = this.selectionCollection.getArray().slice();\n    featuresToModify.forEach((oFeature) => {\n      const selectedVertexCoordinates = oFeature.get(\"selectedVertexCoordinates\");\n\n      const coordinates = this.getCoordinatesIfVertexDeletionAllowed(oFeature);\n      if (!coordinates) return;\n\n      const index = this.indexOfMatchingCoordinate(selectedVertexCoordinates, coordinates);\n      if (index === -1) return;\n\n      const newCoordinates = this.coordinatesWithoutVertexAtIndex(coordinates, index);\n      this.updateFeatureToNewCoordinates(oFeature, newCoordinates);\n      oFeature.unset(\"selectedVertexCoordinates\");\n\n      this.modifyObstruction(oFeature, this.mapModelSynchronizer, this.mapManager);\n    });\n  }\n\n  removeSelectedShapes = () => {\n    this.removeSelectedObstructions();\n    this.baseRemoveSelectedShapes();\n  };\n\n  removeSelectedObstructions = () => {\n    const featuresToDelete = this.selectionCollection.getArray().filter((feature) => {\n      return feature.get(\"dataType\") === OBSTRUCTION_DATA_TYPE;\n    });\n\n    this.selectionCollection.clear();\n\n    featuresToDelete.forEach((feature) => {\n      this.controller.deleteObstructionFeature(feature);\n    });\n  };\n\n  selectClickResetInteractionManagers() {\n    if (this.controller.obstructionEditMode === OBSTRUCTION_EDIT_MODE_TRANSFORM) return;\n\n    // The translate interaction has to be before the modify, or modify doesn't work\n    this.controller.translateInteractionManager.add();\n    this.controller.modifyInteractionManager.add();\n  }\n}\n", "import DaBase from \"../../../../da/map/interaction-managers/snap/base\";\n\nexport default class Obstructions extends DaBase {\n  get snapSources() {\n    return [\n      this.mapManager.roofPlanesVectorSource,\n      this.mapManager.obstructionsVectorSource,\n      this.mapManager.obstructionBuffersVectorSource,\n      this.mapManager.obstructionSetbackBuffersVectorSource,\n    ];\n  }\n}\n", "import { OBSTRUCTION_DATA_TYPE } from \"../../../../da/map/data-types\";\nimport DaBase from \"../../../../da/map/interaction-managers/translate/base\";\nimport { removeObstructionBuffer, repositionObstruction } from \"../../modification-helpers/obstruction\";\n\nexport default class Obstructions extends DaBase {\n  add() {\n    super.add();\n    this.currentTranslationInteraction.on(\"translating\", this.translating);\n  }\n\n  translating = (event) => {\n    if (this.alreadyRemovedArray) return;\n\n    const { features } = event;\n\n    features.forEach((oFeature) => {\n      if (oFeature.get(\"dataType\") === OBSTRUCTION_DATA_TYPE) {\n        removeObstructionBuffer(oFeature, this.mapModelSynchronizer, this.mapManager);\n      }\n    });\n\n    this.alreadyRemovedArray = true;\n  };\n\n  translateEndForFeature(oFeature) {\n    if (oFeature.get(\"dataType\") !== OBSTRUCTION_DATA_TYPE) return;\n\n    repositionObstruction(oFeature, this.mapModelSynchronizer, this.mapManager);\n  }\n}\n", "import DaBase from \"../../../../da/map/interaction-managers/modify/base\";\nimport { modifyObstruction, removeObstructionBuffer } from \"../../modification-helpers/obstruction\";\n\nexport default class Obstructions extends DaBase {\n  modifyStartForFeature(oFeature) {\n    removeObstructionBuffer(oFeature, this.mapModelSynchronizer, this.mapManager);\n  }\n\n  modifyEndForFeature(oFeature) {\n    modifyObstruction(oFeature, this.mapModelSynchronizer, this.mapManager);\n  }\n}\n", "import Transform from \"ol-ext/interaction/Transform\";\nimport { Collection } from \"ol\";\nimport { ensureFeatureIsClockwise } from \"../../../../da/map/ol-helpers\";\nimport { modifyObstruction, removeObstructionBuffer } from \"../../modification-helpers/obstruction\";\n\nexport default class ObstructionsTransformInteractionManager {\n  constructor(controller) {\n    this.controller = controller;\n    this.mapModelSynchronizer = controller.mapModelSynchronizer;\n    this.mapManager = controller.mapManager;\n    this.map = this.mapManager.map;\n\n    this.transform = null;\n    this.added = false;\n    this.startGeometry = null;\n  }\n\n  add() {\n    this.clearCurrentInteraction();\n\n    const features = this.#obstructionFeatures;\n    if (features.getLength() === 0) return;\n\n    this.transform = new Transform({\n      features,\n      keepAspectRatio: (e) => e.originalEvent?.shiftKey ?? false,\n      stretch: true,\n      rotate: true,\n      scale: true,\n      translate: true,\n      noFlip: true,\n      enableRotatedTransform: true,\n      keepRectangle: true,\n    });\n\n    this.transform.on([\"rotatestart\", \"scalestart\", \"translatestart\"], this.transformStartHandler);\n    this.transform.on([\"rotateend\", \"scaleend\", \"translateend\"], this.transformEndHandler);\n\n    this.map.addInteraction(this.transform);\n    this.added = true;\n  }\n\n  remove() {\n    this.clearCurrentInteraction();\n  }\n\n  refresh() {\n    this.add();\n  }\n\n  selectFeature(feature) {\n    if (!this.transform || !feature) return;\n    this.transform.select(feature, true);\n  }\n\n  get selectedFeature() {\n    if (!this.transform) return null;\n    const selected = this.transform.selection_?.getArray();\n    return selected?.length > 0 ? selected[0] : null;\n  }\n\n  transformStartHandler = (e) => {\n    this.startGeometry = e.feature.getGeometry().clone();\n\n    removeObstructionBuffer(e.feature, this.mapModelSynchronizer, this.mapManager);\n\n    this.#fixKeepRectangleCornerScaling(e);\n  };\n\n  transformEndHandler = (e) => {\n    if (this.#geometryHasNaNCoordinates(e.feature)) {\n      e.feature.setGeometry(this.startGeometry);\n      return;\n    }\n\n    ensureFeatureIsClockwise(e.feature);\n    modifyObstruction(e.feature, this.mapModelSynchronizer, this.mapManager);\n    this.controller.markDirty();\n  };\n\n  clearCurrentInteraction() {\n    if (!this.added || !this.transform) return;\n\n    this.transform.un([\"rotatestart\", \"scalestart\", \"translatestart\"], this.transformStartHandler);\n    this.transform.un([\"rotateend\", \"scaleend\", \"translateend\"], this.transformEndHandler);\n\n    this.map.removeInteraction(this.transform);\n    this.transform = null;\n    this.added = false;\n  }\n\n  get #obstructionFeatures() {\n    const features = this.mapManager.obstructionsVectorSource.getFeatures();\n    return new Collection(features);\n  }\n\n  // ol-ext keepRectangle corner scaling bug: when enableRotatedTransform is\n  // active and the view is rotated, ol-ext rotates drag coordinates around\n  // center_ (extent center) but gets vertex positions from rotatedGeoms_\n  // (rotated around view center). This mismatch causes a size jump on the\n  // first drag. Setting center_ to the view center for rectangle corner\n  // handles aligns both coordinate spaces. Safe because the keepRectangle\n  // corner path uses displacement vectors, not center-based scaling.\n  #fixKeepRectangleCornerScaling(e) {\n    if (e.type !== \"scalestart\" || !this.transform) return;\n\n    const viewRotation = this.map.getView().getRotation();\n    if (viewRotation === 0) return;\n\n    const coords = e.feature.getGeometry().getCoordinates()[0];\n    const isRectangle = coords.length === 5;\n    const isCornerHandle = !this.transform.constraint_;\n    if (isRectangle && isCornerHandle) {\n      this.transform.center_ = this.map.getView().getCenter();\n    }\n  }\n\n  #geometryHasNaNCoordinates(feature) {\n    const coords = feature.getGeometry().getCoordinates()[0];\n    return coords.some((c) => !Number.isFinite(c[0]) || !Number.isFinite(c[1]));\n  }\n}\n", "import MapRoofPlanesAndSectionsController from \"./map_roof_planes_and_sections_controller\";\nimport DrawInteractionManager from \"../../../bx/map/interaction-managers/draw/obstructions\";\nimport ShapeDrawInteractionManager, {\n  SHAPE_TYPE_RECTANGLE,\n  SHAPE_TYPE_POLYGON,\n  DEFAULT_POLYGON_SIDES,\n} from \"../../../bx/map/interaction-managers/draw/obstruction-shapes\";\nimport SelectInteractionManager from \"../../../bx/map/interaction-managers/select/obstructions\";\nimport SnapInteractionManager from \"../../../bx/map/interaction-managers/snap/obstructions\";\nimport TranslateInteractionManager from \"../../../bx/map/interaction-managers/translate/obstructions\";\nimport ModifyInteractionManager from \"../../../bx/map/interaction-managers/modify/obstructions\";\nimport TransformInteractionManager from \"../../../bx/map/interaction-managers/transform/obstructions\";\nimport MeasureInteractionManager from \"../../../da/map/interaction-managers/measure/base\";\nimport ShapeGuideLinesInteractionManager from \"../../../da/map/interaction-managers/shape-guide-lines/base\";\n\nimport * as toolbarSelectGroup from \"../../../da/layout-editor/helpers/toolbar-select-group\";\nimport {\n  EDITOR_MODE_DRAW,\n  EDITOR_MODE_SHAPES,\n  OBSTRUCTION_EDIT_MODE_VERTICES,\n  OBSTRUCTION_EDIT_MODE_TRANSFORM,\n} from \"../../../da/layout-editor/helpers/toolbar-constants\";\nimport * as toolbarBtn from \"../../../da/layout-editor/helpers/toolbar-btns\";\nimport ObstructionsBufferBuilder from \"../../../bx/map/obstructions/buffer-builder\";\nimport ObstructionsSetbackBufferBuilder from \"../../../bx/map/obstructions/setback-buffer-builder\";\nimport ObstructionsProximityDetector from \"../../../bx/map/obstructions/proximity-detector\";\nimport {\n  createObstruction,\n  deleteObstruction,\n  rebuildObstructionBuffers,\n  reprocessRoofSectionsDueToObstructionChange,\n} from \"../../../bx/map/modification-helpers/obstruction\";\nimport { removeFeaturesForObstruction } from \"../../../bx/map/ol-helpers\";\nimport { distanceForPixels } from \"../../../da/map/ol-helpers\";\nimport { OBSTRUCTION_DATA_TYPE } from \"../../../da/map/data-types\";\nimport { Feature } from \"ol\";\n\nconst HEXADECAGON_OPTION = \"hexadecagon\";\nconst HEXADECAGON_SIDES = 16;\n\nexport default class MapObstructionsController extends MapRoofPlanesAndSectionsController {\n  static outlets = [\"bx--layout-editor--obstruction-heights-form\"];\n\n  connect() {\n    super.connect();\n\n    this.showBoundingBoxes = false;\n    this.obstructionClipboard = [];\n  }\n\n  disconnect() {\n    super.disconnect();\n\n    this.drawInteractionManager.remove();\n    this.shapeDrawInteractionManager.hideDimensionMenu();\n    this.shapeDrawInteractionManager.remove();\n    this.transformInteractionManager.remove();\n  }\n\n  mapSpecificConnect() {\n    this.editorMode = toolbarSelectGroup.getState(\"bxObstructionEditorMode\", EDITOR_MODE_DRAW);\n\n    const obstructionsWereStale = !this.project.obstructionsFresh;\n\n    if (obstructionsWereStale) {\n      this.project.obstructions.forEach((obstruction) => {\n        obstruction.removeSetbackBuffer();\n      });\n      this.mapManager.obstructionSetbackBuffersVectorSource.clear();\n    }\n\n    new ObstructionsSetbackBufferBuilder(\n      this,\n      this.mapManager.map,\n      this.mapManager.obstructionsFeatures,\n      this.mapManager.obstructionSetbackBuffersFeatures,\n    );\n\n    if (obstructionsWereStale) {\n      this.markDirty();\n    }\n  }\n\n  setupMapInteractionManagers() {\n    this.drawInteractionManager = new DrawInteractionManager(this);\n    this.shapeDrawInteractionManager = new ShapeDrawInteractionManager(this);\n\n    this.selectInteractionManager = new SelectInteractionManager(this);\n\n    this.snapInteractionManager = new SnapInteractionManager(this);\n    this.snapInteractionManager.add();\n\n    this.translateInteractionManager = new TranslateInteractionManager(this);\n    this.modifyInteractionManager = new ModifyInteractionManager(this);\n    this.transformInteractionManager = new TransformInteractionManager(this);\n    this.obstructionEditMode = this.#savedObstructionEditMode;\n\n    this.measureInteractionManager = new MeasureInteractionManager(this);\n    this.shapeGuideLinesInteractionManager = new ShapeGuideLinesInteractionManager(this);\n  }\n\n  handleKeydown = (event) => {\n    if (event.key === \"Backspace\") {\n      if (event.target.tagName !== \"INPUT\") {\n        event.preventDefault();\n        this.removeSelectedFeatures(event);\n      }\n    } else if (event.key === \"Escape\") {\n      this.drawInteractionManager.finish();\n      this.shapeDrawInteractionManager.finish();\n      this.measureInteractionManager.finish();\n    } else if (event.key === \"c\" && (event.ctrlKey || event.metaKey)) {\n      if (this.shouldInterceptCopy()) {\n        event.preventDefault();\n        this.copySelectedObstructions();\n      }\n    } else if (event.key === \"v\" && (event.ctrlKey || event.metaKey)) {\n      if (this.shouldInterceptPaste()) {\n        event.preventDefault();\n        this.pasteObstructions();\n      }\n    }\n  };\n\n  shouldInterceptCopy() {\n    if (this.#isEditingText) return false;\n\n    const selectedText = window.getSelection().toString();\n    if (selectedText.length > 0) return false;\n\n    return this.#selectedObstructionFeatures.length > 0;\n  }\n\n  shouldInterceptPaste() {\n    if (this.#isEditingText) return false;\n    if (this.obstructionClipboard.length === 0) return false;\n\n    const selectedText = window.getSelection().toString();\n    return selectedText.length === 0;\n  }\n\n  copySelectedObstructions() {\n    if (this.#selectedObstructionFeatures.length === 0) return;\n\n    this.obstructionClipboard = this.#selectedObstructionFeatures.map((feature) => {\n      const obstruction = this.mapModelSynchronizer.getObstructionForFeature(feature);\n      return {\n        geometry: feature.getGeometry().clone(),\n        height: obstruction.height,\n        useSetback: obstruction.useSetback,\n        setbackFt: obstruction.setbackFt,\n      };\n    });\n  }\n\n  get #selectedObstructionFeatures() {\n    if (this.obstructionEditMode === OBSTRUCTION_EDIT_MODE_TRANSFORM) {\n      const feature = this.transformInteractionManager.selectedFeature;\n      return feature && feature.get(\"dataType\") === OBSTRUCTION_DATA_TYPE ? [feature] : [];\n    }\n    const selectedFeatures = this.selectInteractionManager.selectedFeatures;\n    return selectedFeatures.filter((feature) => feature.get(\"dataType\") === OBSTRUCTION_DATA_TYPE);\n  }\n\n  get #isEditingText() {\n    const activeElement = document.activeElement;\n    return activeElement && (activeElement.tagName === \"INPUT\" || activeElement.tagName === \"TEXTAREA\");\n  }\n\n  pasteObstructions() {\n    if (this.obstructionClipboard.length === 0) return;\n\n    const map = this.mapManager.map;\n    const offsetX = distanceForPixels(map, 30);\n    const offsetY = distanceForPixels(map, 18);\n\n    const newFeatures = [];\n    const newObstructions = [];\n\n    this.obstructionClipboard.forEach((clipboardData) => {\n      const geometry = clipboardData.geometry.clone();\n      const coordinates = geometry.getCoordinates()[0];\n\n      const offsetCoordinates = coordinates.map(([lon, lat]) => [lon + offsetX, lat - offsetY]);\n\n      geometry.setCoordinates([offsetCoordinates]);\n\n      const newFeature = new Feature({\n        geometry,\n        dataType: OBSTRUCTION_DATA_TYPE,\n      });\n\n      this.mapManager.obstructionsVectorSource.addFeature(newFeature);\n      const obstruction = createObstruction(newFeature, this.project, this.mapModelSynchronizer, this.mapManager);\n\n      if (clipboardData.height !== null) {\n        obstruction.setHeight(clipboardData.height);\n      }\n      obstruction.setUseSetback(clipboardData.useSetback);\n      obstruction.setSetbackFt(clipboardData.setbackFt);\n\n      newFeatures.push(newFeature);\n      newObstructions.push(obstruction);\n    });\n\n    if (this.hasBxLayoutEditorObstructionHeightsFormOutlet) {\n      newObstructions.forEach((obstruction) => {\n        this.bxLayoutEditorObstructionHeightsFormOutlet.add(obstruction);\n      });\n    }\n\n    new ObstructionsBufferBuilder(\n      this,\n      this.mapManager.map,\n      this.mapManager.obstructionsFeatures,\n      this.mapManager.obstructionBuffersFeatures,\n    );\n\n    new ObstructionsSetbackBufferBuilder(\n      this,\n      this.mapManager.map,\n      this.mapManager.obstructionsFeatures,\n      this.mapManager.obstructionSetbackBuffersFeatures,\n      newObstructions,\n    );\n\n    if (this.obstructionEditMode === OBSTRUCTION_EDIT_MODE_TRANSFORM) {\n      this.transformInteractionManager.refresh();\n    } else {\n      this.selectInteractionManager.selectionCollection.clear();\n      newFeatures.forEach((feature) => {\n        this.selectInteractionManager.selectionCollection.push(feature);\n      });\n\n      this.translateInteractionManager.remove();\n      this.translateInteractionManager.add();\n    }\n\n    this.markDirty();\n  }\n\n  startShapeDrawMode(event) {\n    const option = event?.currentTarget?.dataset?.option;\n    const shapeOption = [SHAPE_TYPE_RECTANGLE, SHAPE_TYPE_POLYGON, HEXADECAGON_OPTION].includes(option)\n      ? option\n      : this.#savedShapeType;\n    const shapeType = shapeOption === HEXADECAGON_OPTION ? SHAPE_TYPE_POLYGON : shapeOption;\n\n    this.editorMode = EDITOR_MODE_SHAPES;\n\n    this.drawInteractionManager.remove();\n    this.selectInteractionManager.remove();\n    this.modifyInteractionManager.remove();\n    this.translateInteractionManager.remove();\n    this.measureInteractionManager.remove();\n    this.transformInteractionManager.remove();\n\n    this.shapeDrawInteractionManager.remove();\n    this.shapeDrawInteractionManager.shapeType = shapeType;\n    if (shapeOption === HEXADECAGON_OPTION) {\n      this.shapeDrawInteractionManager.setPolygonSides(HEXADECAGON_SIDES);\n    } else if (shapeType === SHAPE_TYPE_POLYGON) {\n      this.shapeDrawInteractionManager.setPolygonSides(DEFAULT_POLYGON_SIDES);\n    }\n    this.shapeDrawInteractionManager.add();\n    this.shapeDrawInteractionManager.showDimensionMenu();\n\n    this.#enableShapesSubMenu();\n    this.#disableSelectSubMenu();\n    toolbarBtn.showEnabledAndHideDisabledPinnedFlyoutMenus();\n  }\n\n  startDrawMode(event) {\n    this.shapeDrawInteractionManager.hideDimensionMenu();\n    this.shapeDrawInteractionManager.remove();\n    this.#disableShapesSubMenu();\n    this.transformInteractionManager.remove();\n    this.#disableSelectSubMenu();\n    super.startDrawMode(event);\n    toolbarBtn.showEnabledAndHideDisabledPinnedFlyoutMenus();\n  }\n\n  startSelectMode(event) {\n    this.shapeDrawInteractionManager.hideDimensionMenu();\n    this.shapeDrawInteractionManager.remove();\n    this.#disableShapesSubMenu();\n    super.startSelectMode(event);\n    this.#enableSelectSubMenu();\n    this.obstructionEditMode = this.#savedObstructionEditMode;\n    this.#applyObstructionEditMode();\n    toolbarBtn.showEnabledAndHideDisabledPinnedFlyoutMenus();\n  }\n\n  startMeasureMode(event) {\n    this.shapeDrawInteractionManager.hideDimensionMenu();\n    this.shapeDrawInteractionManager.remove();\n    this.#disableShapesSubMenu();\n    this.transformInteractionManager.remove();\n    this.#disableSelectSubMenu();\n    super.startMeasureMode(event);\n    toolbarBtn.showEnabledAndHideDisabledPinnedFlyoutMenus();\n  }\n\n  initializeEditorMode() {\n    if (this.editorMode === EDITOR_MODE_SHAPES) {\n      this.startShapeDrawMode();\n    } else {\n      super.initializeEditorMode();\n    }\n  }\n\n  #enableShapesSubMenu() {\n    if (!this.hasShapesSubMenuBtnTarget) return;\n    toolbarBtn.enable(this.shapesSubMenuBtnTarget);\n    toolbarBtn.enable(this.rectangleShapeBtnTarget);\n    toolbarBtn.enable(this.polygonShapeBtnTarget);\n    toolbarBtn.enable(this.hexadecagonShapeBtnTarget);\n  }\n\n  #disableShapesSubMenu() {\n    if (!this.hasShapesSubMenuBtnTarget) return;\n    toolbarBtn.disable(this.shapesSubMenuBtnTarget);\n    toolbarBtn.disable(this.rectangleShapeBtnTarget);\n    toolbarBtn.disable(this.polygonShapeBtnTarget);\n    toolbarBtn.disable(this.hexadecagonShapeBtnTarget);\n  }\n\n  setObstructionEditMode(event) {\n    const mode = event?.currentTarget?.dataset?.option;\n    if (!mode || mode === this.obstructionEditMode) return;\n\n    this.obstructionEditMode = mode;\n    this.#applyObstructionEditMode();\n  }\n\n  #applyObstructionEditMode() {\n    if (this.obstructionEditMode === OBSTRUCTION_EDIT_MODE_TRANSFORM) {\n      const selectedFeatures = this.selectInteractionManager.selectedFeatures;\n      const firstFeature = selectedFeatures.length > 0 ? selectedFeatures[0] : null;\n\n      this.selectInteractionManager.remove();\n      this.modifyInteractionManager.remove();\n      this.translateInteractionManager.remove();\n      this.transformInteractionManager.refresh();\n      this.transformInteractionManager.selectFeature(firstFeature);\n    } else {\n      const selectedFeature = this.transformInteractionManager.selectedFeature;\n\n      this.transformInteractionManager.remove();\n      this.selectInteractionManager.add();\n      this.translateInteractionManager.add();\n      this.modifyInteractionManager.add();\n\n      if (selectedFeature) {\n        this.selectInteractionManager.addToSelection(selectedFeature);\n        this.selectInteractionManager.shapeGuideLinesCall(\"add\", [selectedFeature], \"applyObstructionEditMode\");\n        this.selectInteractionManager.selectClickResetInteractionManagers();\n      }\n    }\n    this.snapInteractionManager.refresh();\n  }\n\n  #enableSelectSubMenu() {\n    if (!this.hasSelectSubMenuBtnTarget) return;\n    toolbarBtn.enable(this.selectSubMenuBtnTarget);\n    toolbarBtn.enable(this.editVerticesBtnTarget);\n    toolbarBtn.enable(this.transformShapeBtnTarget);\n  }\n\n  #disableSelectSubMenu() {\n    if (!this.hasSelectSubMenuBtnTarget) return;\n    toolbarBtn.disable(this.selectSubMenuBtnTarget);\n    toolbarBtn.disable(this.editVerticesBtnTarget);\n    toolbarBtn.disable(this.transformShapeBtnTarget);\n  }\n\n  get #savedShapeType() {\n    return toolbarSelectGroup.getState(\"bxObstructionShapeType\", SHAPE_TYPE_RECTANGLE);\n  }\n\n  get #savedObstructionEditMode() {\n    return toolbarSelectGroup.getState(\"bxObstructionEditMode\", OBSTRUCTION_EDIT_MODE_VERTICES);\n  }\n\n  setObstructionHeight(uuid, height) {\n    const obstruction = this.project.getObstruction(uuid);\n    obstruction.setHeight(height);\n    if (obstruction.dirty) {\n      // mark controller dirty to light up save button\n      this.markDirty();\n      new ObstructionsBufferBuilder(\n        this,\n        this.mapManager.map,\n        this.mapManager.obstructionsFeatures,\n        this.mapManager.obstructionBuffersFeatures,\n      );\n      reprocessRoofSectionsDueToObstructionChange(this.project);\n\n      new ObstructionsProximityDetector(this.project).findNearbyRoofPlanesAndSectionsForObstruction(obstruction);\n    }\n  }\n\n  setObstructionUseSetback(uuid, useSetback) {\n    const obstruction = this.project.getObstruction(uuid);\n    obstruction.setUseSetback(useSetback);\n    if (obstruction.dirty) {\n      this.markDirty();\n      this.rebuildSetbackBuffersForObstruction(obstruction);\n      reprocessRoofSectionsDueToObstructionChange(this.project);\n    }\n  }\n\n  setObstructionSetbackFt(uuid, setbackFt) {\n    const obstruction = this.project.getObstruction(uuid);\n    obstruction.setSetbackFt(setbackFt);\n    if (obstruction.dirty) {\n      this.markDirty();\n      this.rebuildSetbackBuffersForObstruction(obstruction);\n      reprocessRoofSectionsDueToObstructionChange(this.project);\n    }\n  }\n\n  rebuildSetbackBuffersForObstruction(obstruction) {\n    new ObstructionsSetbackBufferBuilder(\n      this,\n      this.mapManager.map,\n      this.mapManager.obstructionsFeatures,\n      this.mapManager.obstructionSetbackBuffersFeatures,\n      [obstruction],\n    );\n  }\n\n  preSaveForPage() {\n    this.project.obstructions.forEach((obstruction) => {\n      rebuildObstructionBuffers(obstruction, this.mapManager, this.mapModelSynchronizer);\n    });\n  }\n\n  removeSelectedFeatures(event) {\n    if (this.obstructionEditMode === OBSTRUCTION_EDIT_MODE_TRANSFORM) {\n      const feature = this.transformInteractionManager.selectedFeature;\n      if (!feature) return;\n\n      this.deleteObstructionFeature(feature);\n      this.transformInteractionManager.refresh();\n      this.markDirty();\n      return;\n    }\n    super.removeSelectedFeatures(event);\n  }\n\n  deleteObstructionFeature(feature) {\n    deleteObstruction(feature, this.project, this.mapModelSynchronizer, this.mapManager);\n    if (this.hasBxLayoutEditorObstructionHeightsFormOutlet) {\n      this.bxLayoutEditorObstructionHeightsFormOutlet.remove(feature.get(\"uuid\"), this.project.notDeletedObstructions);\n    }\n  }\n\n  removeObstruction(obstructionUuid) {\n    const obstruction = this.project.getObstruction(obstructionUuid);\n    const obstructionFeature = this.mapModelSynchronizer.getFeatureForObstruction(obstruction);\n    deleteObstruction(obstructionFeature, this.project, this.mapModelSynchronizer, this.mapManager);\n    this.markDirty();\n  }\n}\n", "import SimplePolygonLegalityChecker from \"./simple-polygon\";\n\nexport default class RoofPlaneLegalityChecker extends SimplePolygonLegalityChecker {\n  updateAllUnderlyingModelsIllegalityFromFeature(extraFeatures) {\n    this.mapModelSynchronizer.updateAllRoofPlanesIllegalityFromFeature(extraFeatures);\n  }\n}\n", "// cSpell:ignore rpls,Lngs,resequence\n\nimport { clone, destroy } from \"mobx-state-tree\";\nimport { toLonLat } from \"ol/proj\";\n\nimport RoofPlaneLegalityChecker from \"../../../da/map/legality-checkers/roof-plane\";\nimport RoofSectionLegalityChecker from \"../../../da/map/legality-checkers/roof-section\";\nimport ObstructionsProximityDetector from \"../obstructions/proximity-detector\";\n\nimport { linkFeatureToModel } from \"../../../da/map/modification-helpers/base\";\nimport {\n  removeFeaturesForRoofSection,\n  deleteRoofSectionAndRemoveFromVectorSource,\n  syncRoofSectionCartesianPoints,\n  syncRoofSectionBoundingBoxCartesianPoints,\n} from \"./roof-section\";\n\nimport { findTopLeftLonLat, setCartesianPointsForModelRelativeToOrigin } from \"../../../da/map/ol-geometry\";\nimport { removeFeaturesForRoofPlane } from \"../ol-helpers\";\nimport { logger } from \"../../../helpers/app\";\nimport SimpleLatLng from \"../../../da/map/models/simple-lat-lng\";\n\nexport function createRoofPlane(rpFeature, project, mapModelSynchronizer, mapManager) {\n  const roofPlane = project.addRoofPlane({});\n  linkFeatureToModel(rpFeature, roofPlane);\n\n  mapModelSynchronizer.updateRoofPlaneLatLngFromFeature(rpFeature);\n  syncRoofPlaneCartesianPoints(roofPlane);\n  new RoofPlaneLegalityChecker(mapManager.roofPlanesFeatures, mapModelSynchronizer).markIllegalPolygons(rpFeature);\n\n  new ObstructionsProximityDetector(project).findNearbyObstructionsForRoofPlane(roofPlane);\n}\n\nexport function modifyRoofPlane(rpFeature, mapModelSynchronizer, mapManager) {\n  const roofPlane = mapModelSynchronizer.getRoofPlaneForFeature(\n    rpFeature,\n    \"BxRoofPlaneModificationHelper.modifyRoofPlane\",\n  );\n\n  updateRoofPlaneGuideLines(rpFeature, roofPlane);\n  repositionRoofPlane(rpFeature, mapModelSynchronizer, mapManager);\n  deleteAndRebuildDefaultRoofSectionsForRoofPlane(roofPlane, mapModelSynchronizer, mapManager);\n\n  new RoofSectionLegalityChecker(\n    rpFeature,\n    mapManager.roofSectionsFeatures,\n    mapModelSynchronizer,\n  ).markIllegalPolygons();\n  mapManager.forceRedrawRoofPlanes();\n}\n\nfunction updateRoofPlaneGuideLines(rpFeature, roofPlane) {\n  if (!roofPlane.guideLines || roofPlane.guideLines.length === 0) return;\n\n  const lineSegmentsFromPoints = (points) => {\n    const segments = [];\n    for (let i = 0; i < points.length - 1; i++) {\n      segments.push([points[i], points[i + 1]]);\n    }\n    return segments;\n  };\n\n  const featureLatLngs = rpFeature\n    .getGeometry()\n    .getLinearRing(0)\n    .getCoordinates()\n    .map((c) => SimpleLatLng.fromLonLat(toLonLat(c)));\n  const featureLineSegments = lineSegmentsFromPoints(featureLatLngs);\n\n  const roofPlaneLatLngs = roofPlane.latLngPoints.map((ll) => ll.toJSON());\n  const roofPlaneLineSegments = lineSegmentsFromPoints(roofPlaneLatLngs);\n\n  const defaultGuideLineDistance = Math.round(roofPlane.setback * 12);\n\n  const newGuideLines = [];\n  for (let i = 0; i < featureLineSegments.length; i++) {\n    const lineSegment = featureLineSegments[i];\n    const existingSegmentLineIndex = roofPlaneLineSegments.findIndex((rpls) => {\n      return (\n        rpls[0].lat === lineSegment[0].lat &&\n        rpls[0].lng === lineSegment[0].lng &&\n        rpls[1].lat === lineSegment[1].lat &&\n        rpls[1].lng === lineSegment[1].lng\n      );\n    });\n\n    const defaultGuideLine = { segmentIndex: i, visible: true, distance: defaultGuideLineDistance };\n\n    if (existingSegmentLineIndex !== -1) {\n      const existingGuideLine = roofPlane.guideLineForSegmentIndex(existingSegmentLineIndex);\n      if (existingGuideLine) {\n        const newGuideLine = { ...existingGuideLine.toJSON(), segmentIndex: i };\n        newGuideLines.push(newGuideLine);\n      } else {\n        newGuideLines.push(defaultGuideLine);\n      }\n    } else {\n      newGuideLines.push(defaultGuideLine);\n    }\n  }\n\n  roofPlane.setGuideLines(newGuideLines);\n}\n\nexport function repositionRoofPlane(rpFeature, mapModelSynchronizer, mapManager) {\n  const roofPlane = mapModelSynchronizer.getRoofPlaneForFeature(\n    rpFeature,\n    \"BxRoofPlaneModificationHelper.repositionRoofPlane\",\n  );\n\n  mapModelSynchronizer.updateRoofPlaneLatLngFromFeature(rpFeature);\n  syncRoofPlaneCartesianPoints(roofPlane);\n  new RoofPlaneLegalityChecker(mapManager.roofPlanesFeatures, mapModelSynchronizer).markIllegalPolygons();\n  new ObstructionsProximityDetector(mapManager.project).findNearbyObstructionsForRoofPlane(roofPlane);\n}\n\nexport function deleteRoofPlane(rpFeature, project, mapModelSynchronizer, mapManager) {\n  const roofPlane = mapModelSynchronizer.getRoofPlaneForFeature(\n    rpFeature,\n    \"BxRoofPlaneModificationHelper.deleteRoofPlane\",\n  );\n\n  if (!roofPlane) {\n    console.log(\"Deleted feature not a polygon. Skipping.\");\n    return;\n  }\n\n  removeRoofSectionsFromVectorSourceForRoofPlane(roofPlane, mapModelSynchronizer, mapManager);\n  removeFeaturesForRoofPlane(roofPlane, mapManager);\n  new ObstructionsProximityDetector(project).deleteRoofPlane(roofPlane);\n\n  if (roofPlane.id) {\n    // this also flags its roof sections for deletion\n    roofPlane.flagDeleted();\n  } else {\n    // currently an unsaved roof plane can't have any roof sections\n    // but this method will remove them automatically if future code\n    // allows them to be created (e.g. with a default setback)\n    project.destroyRoofPlane(roofPlane);\n  }\n\n  // This is less efficient if multiple roof planes are being deleted, but it's cleaner\n  // because we can be confident that each call to deleteRoofPlane will leave things in\n  // a valid final state.\n  new RoofPlaneLegalityChecker(mapManager.roofPlanesFeatures, mapModelSynchronizer).markIllegalPolygons();\n  project.resequenceRoofPlanesIdentifiers();\n  mapModelSynchronizer.syncIdentifiersOnFeatures();\n}\n\nexport function deleteAndRebuildDefaultRoofSectionsForRoofPlane(roofPlane, mapModelSynchronizer, mapManager) {\n  if (!roofPlane.hasDefaultRoofSections) return;\n\n  let priorLayout;\n  // You might have 2 if the shape of the roof plane and the setback combine to create\n  // multiple separate roof sections (e.g. a vertex that comes really close to another edge)\n  // or you might have a default roof section with no layout because there is a custom roof section\n  if (roofPlane.defaultRoofSections.length === 1 && roofPlane.defaultRoofSections[0].layout) {\n    priorLayout = clone(roofPlane.defaultRoofSections[0].layout);\n  }\n  roofPlane.defaultRoofSections.forEach((roofSection) => {\n    deleteRoofSectionAndRemoveFromVectorSource(roofSection, mapModelSynchronizer, mapManager);\n  });\n  mapManager.buildNewDefaultRoofSectionsAndSetbacks({ uuid: roofPlane.uuid, priorLayout });\n  if (priorLayout) {\n    destroy(priorLayout);\n  }\n\n  new ObstructionsProximityDetector(mapManager.project).findNearbyObstructionsForRoofPlane(roofPlane);\n}\n\nfunction removeRoofSectionsFromVectorSourceForRoofPlane(roofPlane, mapModelSynchronizer, mapManager) {\n  roofPlane.roofSections.forEach((roofSection) => {\n    removeFeaturesForRoofSection(roofSection, mapModelSynchronizer, mapManager);\n  });\n}\n\nfunction syncRoofPlaneCartesianPoints(roofPlane) {\n  const topLeftLonLat = findTopLeftLonLat(roofPlane.latLngPoints);\n\n  setCartesianPointsForModelRelativeToOrigin(topLeftLonLat, roofPlane);\n  logger(`RoofPlane ${roofPlane.identifier}: Set cartesian Points`, roofPlane.cartesianPointsToArray);\n\n  roofPlane.roofSections.forEach((rs) => {\n    if (!rs.deleted) {\n      syncRoofSectionCartesianPoints(topLeftLonLat, rs);\n      syncRoofSectionBoundingBoxCartesianPoints(topLeftLonLat, rs);\n    }\n  });\n}\n", "import DaBase from \"../../../../da/map/interaction-managers/draw/base\";\nimport { ROOF_PLANE_DATA_TYPE } from \"../../../../da/map/data-types\";\nimport { createRoofPlane } from \"../../modification-helpers/roof-plane\";\n\nexport default class RoofPlanes extends DaBase {\n  get targetDrawingSource() {\n    return this.mapManager.roofPlanesVectorSource;\n  }\n\n  get featureDataType() {\n    return ROOF_PLANE_DATA_TYPE;\n  }\n\n  createModelFromFeature(feature) {\n    createRoofPlane(feature, this.controller.project, this.mapModelSynchronizer, this.mapManager);\n  }\n}\n", "import ShapeBase from \"../../../../da/map/interaction-managers/draw/shape-base\";\nimport { ROOF_PLANE_DATA_TYPE } from \"../../../../da/map/data-types\";\nimport { createRoofPlane } from \"../../modification-helpers/roof-plane\";\n\nexport default class RoofPlaneShapes extends ShapeBase {\n  get targetDrawingSource() {\n    return this.mapManager.roofPlanesVectorSource;\n  }\n\n  get featureDataType() {\n    return ROOF_PLANE_DATA_TYPE;\n  }\n\n  get dialogHeader() {\n    return \"Shape Roof Planes\";\n  }\n\n  createModelFromFeature(feature) {\n    createRoofPlane(feature, this.controller.project, this.mapModelSynchronizer, this.mapManager);\n  }\n}\n", "import Base from \"./base\";\nimport { ROOF_PLANE_DATA_TYPE } from \"../../data-types\";\n\nexport default class DaRoofPlanes extends Base {\n  filterSelects = (_feature, _layer) => {\n    return true;\n  };\n\n  removeSelectedVertices() {\n    this.removeSelectedVerticesFromRoofPlane();\n    this.removeSelectedVertexFromSelectInteractionFeatures();\n  }\n\n  removeSelectedVerticesFromRoofPlane() {\n    this.selectionCollection.forEach((rpFeature) => {\n      const selectedVertexCoordinates = rpFeature.get(\"selectedVertexCoordinates\");\n\n      const coordinates = this.getCoordinatesIfVertexDeletionAllowed(rpFeature);\n      if (!coordinates) return;\n\n      const index = this.indexOfMatchingCoordinate(selectedVertexCoordinates, coordinates);\n      if (index === -1) return;\n\n      const newCoordinates = this.coordinatesWithoutVertexAtIndex(coordinates, index);\n      this.updateFeatureToNewCoordinates(rpFeature, newCoordinates);\n      rpFeature.unset(\"selectedVertexCoordinates\");\n\n      this.modifyRoofPlane(rpFeature, this.mapModelSynchronizer, this.mapManager);\n    });\n  }\n\n  removeSelectedShapes = () => {\n    this.removeSelectedRoofPlanes();\n    this.baseRemoveSelectedShapes();\n  };\n\n  removeSelectedRoofPlanes = () => {\n    this.selectionCollection.forEach((feature) => {\n      if (feature.get(\"dataType\") === ROOF_PLANE_DATA_TYPE) {\n        this.deleteRoofPlane(feature, this.project, this.mapModelSynchronizer, this.mapManager);\n      }\n    });\n  };\n\n  selectClickResetInteractionManagers() {\n    // The translate interaction has to be before the modify, or modify doesn't work\n    this.controller.translateInteractionManager.add();\n    this.controller.modifyInteractionManager.add();\n  }\n}\n", "import DaRoofPlanes from \"../../../../da/map/interaction-managers/select/roof-planes\";\nimport { modifyRoofPlane, deleteRoofPlane } from \"../../modification-helpers/roof-plane\";\nimport {\n  BUILDING_IMAGE_PLACEMENT_DATA_TYPE,\n  MEASURE_DATA_TYPE,\n  ROOF_PLANE_DATA_TYPE,\n} from \"../../../../da/map/data-types\";\nimport { isPoint } from \"../../../../da/map/ol-helpers\";\nimport { OBSTRUCTION_EDIT_MODE_TRANSFORM } from \"../../../../da/layout-editor/helpers/toolbar-constants\";\n\nexport default class RoofPlanes extends DaRoofPlanes {\n  constructor(controller) {\n    super(controller);\n\n    this.modifyRoofPlane = modifyRoofPlane;\n    this.deleteRoofPlane = deleteRoofPlane;\n  }\n\n  selectClickResetInteractionManagers() {\n    if (this.controller.roofPlaneEditMode === OBSTRUCTION_EDIT_MODE_TRANSFORM) return;\n    super.selectClickResetInteractionManagers();\n  }\n\n  filterSelects = (feature, layer) => {\n    const layerDataType = layer && layer.get(\"dataType\");\n    const featureDataType = feature && feature.get(\"dataType\");\n\n    // If it's a point, this is a vertex selection and we're good\n    if (feature && isPoint(feature)) return true;\n\n    // If it's a building image placement, we don't want to select it.  The\n    // transform interaction manager will handle that.\n    if (featureDataType === BUILDING_IMAGE_PLACEMENT_DATA_TYPE) return false;\n    if (layerDataType === BUILDING_IMAGE_PLACEMENT_DATA_TYPE) return false;\n\n    const roofPlaneLayer = layerDataType === ROOF_PLANE_DATA_TYPE;\n    const measureLayer = layerDataType === MEASURE_DATA_TYPE;\n\n    return roofPlaneLayer || measureLayer;\n  };\n}\n", "import DaBase from \"../../../../da/map/interaction-managers/snap/base\";\n\nexport default class RoofPlanes extends DaBase {\n  get snapSources() {\n    return [\n      this.mapManager.roofPlanesVectorSource,\n      this.mapManager.obstructionsVectorSource,\n      this.mapManager.obstructionBuffersVectorSource,\n      this.mapManager.obstructionSetbackBuffersVectorSource,\n    ];\n  }\n}\n", "import { toLonLat } from \"ol/proj\";\nimport DaBase from \"../../../../da/map/interaction-managers/translate/base\";\nimport { repositionRoofPlane } from \"../../modification-helpers/roof-plane\";\nimport { moveRoofSectionByDelta } from \"../../modification-helpers/roof-section\";\n\nexport default class RoofPlanes extends DaBase {\n  translateEndForFeature(rpFeature) {\n    this.moveRoofSectionsOfRoofPlane(rpFeature);\n    repositionRoofPlane(rpFeature, this.mapModelSynchronizer, this.mapManager);\n  }\n\n  moveRoofSectionsOfRoofPlane(rpFeature) {\n    const roofPlane = this.mapModelSynchronizer.getRoofPlaneForFeature(\n      rpFeature,\n      \"BxRoofPlanesTranslateInteractionManager#moveRoofSectionsOfRoofPlane\",\n    );\n    const delta = this.deltaInLatLng(rpFeature, roofPlane);\n\n    roofPlane.roofSections.forEach((rs) => moveRoofSectionByDelta(rs, delta[0], delta[1]));\n  }\n\n  deltaInLatLng(rpFeature, roofPlane) {\n    const geometry = rpFeature.getGeometry();\n    const rpFeatureCoordinates = geometry.getLinearRing(0).getCoordinates(); // get outermost ring\n    const firstPointFromFeature = rpFeatureCoordinates[0];\n    const firstPointFromFeatureInLonLat = toLonLat(firstPointFromFeature);\n    const firstPointFromFeatureInLatLng = [firstPointFromFeatureInLonLat[1], firstPointFromFeatureInLonLat[0]];\n\n    const roofPlaneCoordinates = roofPlane.latLngPoints;\n    const firstPointFromRoofPlane = roofPlaneCoordinates[0];\n    const firstPointFromRoofPlaneInLatLng = firstPointFromRoofPlane.toLatLng;\n\n    return [\n      firstPointFromFeatureInLatLng[0] - firstPointFromRoofPlaneInLatLng[0],\n      firstPointFromFeatureInLatLng[1] - firstPointFromRoofPlaneInLatLng[1],\n    ];\n  }\n}\n", "import DaBase from \"../../../../da/map/interaction-managers/modify/base\";\nimport { modifyRoofPlane } from \"../../modification-helpers/roof-plane\";\n\nexport default class RoofPlanes extends DaBase {\n  modifyEndForFeature(rpFeature) {\n    modifyRoofPlane(rpFeature, this.mapModelSynchronizer, this.mapManager);\n  }\n}\n", "import Transform from \"ol-ext/interaction/Transform\";\nimport { Collection } from \"ol\";\nimport { ensureFeatureIsClockwise } from \"../../../../da/map/ol-helpers\";\nimport { modifyRoofPlane } from \"../../modification-helpers/roof-plane\";\n\nexport default class RoofPlanesTransformInteractionManager {\n  constructor(controller) {\n    this.controller = controller;\n    this.mapModelSynchronizer = controller.mapModelSynchronizer;\n    this.mapManager = controller.mapManager;\n    this.map = this.mapManager.map;\n\n    this.transform = null;\n    this.added = false;\n    this.startGeometry = null;\n  }\n\n  add() {\n    this.clearCurrentInteraction();\n\n    const features = this.#roofPlaneFeatures;\n    if (features.getLength() === 0) return;\n\n    this.transform = new Transform({\n      features,\n      keepAspectRatio: (e) => e.originalEvent?.shiftKey ?? false,\n      stretch: true,\n      rotate: true,\n      scale: true,\n      translate: true,\n      noFlip: true,\n      enableRotatedTransform: true,\n      keepRectangle: true,\n    });\n\n    this.transform.on([\"rotatestart\", \"scalestart\", \"translatestart\"], this.transformStartHandler);\n    this.transform.on([\"rotateend\", \"scaleend\", \"translateend\"], this.transformEndHandler);\n\n    this.map.addInteraction(this.transform);\n    this.added = true;\n  }\n\n  remove() {\n    this.clearCurrentInteraction();\n  }\n\n  refresh() {\n    this.add();\n  }\n\n  selectFeature(feature) {\n    if (!this.transform || !feature) return;\n    this.transform.select(feature, true);\n  }\n\n  get selectedFeature() {\n    if (!this.transform) return null;\n    const selected = this.transform.selection_?.getArray();\n    return selected?.length > 0 ? selected[0] : null;\n  }\n\n  transformStartHandler = (e) => {\n    this.startGeometry = e.feature.getGeometry().clone();\n\n    this.#fixKeepRectangleCornerScaling(e);\n  };\n\n  transformEndHandler = (e) => {\n    if (this.#geometryHasNaNCoordinates(e.feature)) {\n      e.feature.setGeometry(this.startGeometry);\n      return;\n    }\n\n    ensureFeatureIsClockwise(e.feature);\n    modifyRoofPlane(e.feature, this.mapModelSynchronizer, this.mapManager);\n    this.controller.markDirty();\n  };\n\n  clearCurrentInteraction() {\n    if (!this.added || !this.transform) return;\n\n    this.transform.un([\"rotatestart\", \"scalestart\", \"translatestart\"], this.transformStartHandler);\n    this.transform.un([\"rotateend\", \"scaleend\", \"translateend\"], this.transformEndHandler);\n\n    this.map.removeInteraction(this.transform);\n    this.transform = null;\n    this.added = false;\n  }\n\n  get #roofPlaneFeatures() {\n    const features = this.mapManager.roofPlanesVectorSource.getFeatures();\n    return new Collection(features);\n  }\n\n  // ol-ext keepRectangle corner scaling bug workaround \u2014 see obstructions.js\n  #fixKeepRectangleCornerScaling(e) {\n    if (e.type !== \"scalestart\" || !this.transform) return;\n\n    const viewRotation = this.map.getView().getRotation();\n    if (viewRotation === 0) return;\n\n    const coords = e.feature.getGeometry().getCoordinates()[0];\n    const isRectangle = coords.length === 5;\n    const isCornerHandle = !this.transform.constraint_;\n    if (isRectangle && isCornerHandle) {\n      this.transform.center_ = this.map.getView().getCenter();\n    }\n  }\n\n  #geometryHasNaNCoordinates(feature) {\n    const coords = feature.getGeometry().getCoordinates()[0];\n    return coords.some((c) => !Number.isFinite(c[0]) || !Number.isFinite(c[1]));\n  }\n}\n", "import { Feature } from \"ol\";\nimport MapRoofPlanesAndSectionsController from \"./map_roof_planes_and_sections_controller\";\nimport DrawInteractionManager from \"../../../bx/map/interaction-managers/draw/roof-planes\";\nimport ShapeDrawInteractionManager from \"../../../bx/map/interaction-managers/draw/roof-plane-shapes\";\nimport { SHAPE_TYPE_RECTANGLE } from \"../../../da/map/interaction-managers/draw/shape-base\";\nimport SelectInteractionManager from \"../../../bx/map/interaction-managers/select/roof-planes\";\nimport SnapInteractionManager from \"../../../bx/map/interaction-managers/snap/roof-planes\";\nimport TranslateInteractionManager from \"../../../bx/map/interaction-managers/translate/roof-planes\";\nimport ModifyInteractionManager from \"../../../bx/map/interaction-managers/modify/roof-planes\";\nimport TransformInteractionManager from \"../../../bx/map/interaction-managers/transform/roof-planes\";\nimport MeasureInteractionManager from \"../../../da/map/interaction-managers/measure/base\";\nimport ShapeGuideLinesInteractionManager from \"../../../da/map/interaction-managers/shape-guide-lines/base\";\nimport {\n  EDITOR_MODE_DRAW,\n  EDITOR_MODE_SHAPES,\n  OBSTRUCTION_EDIT_MODE_VERTICES,\n  OBSTRUCTION_EDIT_MODE_TRANSFORM,\n} from \"../../../da/layout-editor/helpers/toolbar-constants\";\nimport * as toolbarSelectGroup from \"../../../da/layout-editor/helpers/toolbar-select-group\";\nimport * as toolbarBtn from \"../../../da/layout-editor/helpers/toolbar-btns\";\nimport { distanceForPixels } from \"../../../da/map/ol-helpers\";\nimport { ROOF_PLANE_DATA_TYPE } from \"../../../da/map/data-types\";\nimport { createRoofPlane, deleteRoofPlane } from \"../../../bx/map/modification-helpers/roof-plane\";\n\nexport default class MapRoofPlanesController extends MapRoofPlanesAndSectionsController {\n  mapSpecificConnect() {\n    this.editorMode = toolbarSelectGroup.getState(\"bxRoofPlaneEditorMode\", EDITOR_MODE_DRAW);\n    this.roofPlaneClipboard = [];\n  }\n\n  setupMapInteractionManagers() {\n    this.drawInteractionManager = new DrawInteractionManager(this);\n    this.shapeDrawInteractionManager = new ShapeDrawInteractionManager(this);\n\n    this.selectInteractionManager = new SelectInteractionManager(this);\n\n    this.snapInteractionManager = new SnapInteractionManager(this);\n    this.snapInteractionManager.add();\n\n    this.translateInteractionManager = new TranslateInteractionManager(this);\n\n    this.modifyInteractionManager = new ModifyInteractionManager(this);\n\n    this.measureInteractionManager = new MeasureInteractionManager(this);\n\n    this.shapeGuideLinesInteractionManager = new ShapeGuideLinesInteractionManager(this);\n\n    this.transformInteractionManager = new TransformInteractionManager(this);\n    this.roofPlaneEditMode = this.#savedRoofPlaneEditMode;\n\n    this.setupBuildingImagePlacementInteractionManagers();\n  }\n\n  disconnect() {\n    super.disconnect();\n    this.shapeDrawInteractionManager.hideDimensionMenu();\n    this.shapeDrawInteractionManager.remove();\n    this.transformInteractionManager.remove();\n  }\n\n  initializeEditorMode() {\n    if (this.editorMode === EDITOR_MODE_SHAPES) {\n      this.startShapeDrawMode();\n    } else {\n      super.initializeEditorMode();\n    }\n  }\n\n  handleKeydown = (event) => {\n    if (event.key === \"Backspace\") {\n      if (event.target.tagName !== \"INPUT\") {\n        event.preventDefault();\n        this.removeSelectedFeatures(event);\n      }\n    } else if (event.key === \"Escape\") {\n      this.drawInteractionManager.finish();\n      this.shapeDrawInteractionManager.finish();\n      this.measureInteractionManager.finish();\n    } else if (event.key === \"c\" && (event.ctrlKey || event.metaKey)) {\n      if (this.#shouldInterceptCopy()) {\n        event.preventDefault();\n        this.#copySelectedRoofPlanes();\n      }\n    } else if (event.key === \"v\" && (event.ctrlKey || event.metaKey)) {\n      if (this.#shouldInterceptPaste()) {\n        event.preventDefault();\n        this.#pasteRoofPlanes();\n      }\n    }\n  };\n\n  setRoofPlaneEditMode(event) {\n    const mode = event?.currentTarget?.dataset?.option;\n    if (!mode || mode === this.roofPlaneEditMode) return;\n\n    this.roofPlaneEditMode = mode;\n    this.#applyRoofPlaneEditMode();\n  }\n\n  removeSelectedFeatures(event) {\n    if (this.roofPlaneEditMode === OBSTRUCTION_EDIT_MODE_TRANSFORM) {\n      const feature = this.transformInteractionManager.selectedFeature;\n      if (feature) {\n        deleteRoofPlane(feature, this.project, this.mapModelSynchronizer, this.mapManager);\n        this.transformInteractionManager.refresh();\n      }\n      this.removeSelectedBuildingImagePlacements();\n      this.markDirty();\n      return;\n    }\n    super.removeSelectedFeatures(event);\n  }\n\n  startShapeDrawMode(_event) {\n    this.editorMode = EDITOR_MODE_SHAPES;\n\n    this.drawInteractionManager.remove();\n    this.selectInteractionManager.remove();\n    this.modifyInteractionManager.remove();\n    this.translateInteractionManager.remove();\n    this.measureInteractionManager.remove();\n    this.transformInteractionManager.remove();\n    this.removeBuildingImagePlacementTransformInteractions();\n\n    this.shapeDrawInteractionManager.remove();\n    this.shapeDrawInteractionManager.shapeType = SHAPE_TYPE_RECTANGLE;\n    this.shapeDrawInteractionManager.add();\n    this.shapeDrawInteractionManager.showDimensionMenu();\n    this.#disableSelectSubMenu();\n    toolbarBtn.showEnabledAndHideDisabledPinnedFlyoutMenus();\n  }\n\n  startDrawMode(event) {\n    this.shapeDrawInteractionManager.hideDimensionMenu();\n    this.shapeDrawInteractionManager.remove();\n    this.transformInteractionManager.remove();\n    this.#disableSelectSubMenu();\n    super.startDrawMode(event);\n    toolbarBtn.showEnabledAndHideDisabledPinnedFlyoutMenus();\n  }\n\n  startSelectMode(event) {\n    this.shapeDrawInteractionManager.hideDimensionMenu();\n    this.shapeDrawInteractionManager.remove();\n    super.startSelectMode(event);\n    this.#enableSelectSubMenu();\n    this.roofPlaneEditMode = this.#savedRoofPlaneEditMode;\n    this.#applyRoofPlaneEditMode();\n    toolbarBtn.showEnabledAndHideDisabledPinnedFlyoutMenus();\n  }\n\n  startMeasureMode(event) {\n    this.shapeDrawInteractionManager.hideDimensionMenu();\n    this.shapeDrawInteractionManager.remove();\n    this.transformInteractionManager.remove();\n    this.#disableSelectSubMenu();\n    super.startMeasureMode(event);\n    toolbarBtn.showEnabledAndHideDisabledPinnedFlyoutMenus();\n  }\n\n  #shouldInterceptCopy() {\n    if (this.#isEditingText) return false;\n    if (window.getSelection().toString().length > 0) return false;\n    return this.#selectedRoofPlaneFeatures.length > 0;\n  }\n\n  #shouldInterceptPaste() {\n    if (this.#isEditingText) return false;\n    if (this.roofPlaneClipboard.length === 0) return false;\n    return window.getSelection().toString().length === 0;\n  }\n\n  get #isEditingText() {\n    const activeElement = document.activeElement;\n    return activeElement && (activeElement.tagName === \"INPUT\" || activeElement.tagName === \"TEXTAREA\");\n  }\n\n  get #selectedRoofPlaneFeatures() {\n    if (this.roofPlaneEditMode === OBSTRUCTION_EDIT_MODE_TRANSFORM) {\n      const feature = this.transformInteractionManager.selectedFeature;\n      return feature && feature.get(\"dataType\") === ROOF_PLANE_DATA_TYPE ? [feature] : [];\n    }\n    return this.selectInteractionManager.selectedFeatures.filter(\n      (feature) => feature.get(\"dataType\") === ROOF_PLANE_DATA_TYPE,\n    );\n  }\n\n  #copySelectedRoofPlanes() {\n    if (this.#selectedRoofPlaneFeatures.length === 0) return;\n\n    this.roofPlaneClipboard = this.#selectedRoofPlaneFeatures.map((feature) => ({\n      geometry: feature.getGeometry().clone(),\n    }));\n  }\n\n  #pasteRoofPlanes() {\n    if (this.roofPlaneClipboard.length === 0) return;\n\n    const map = this.mapManager.map;\n    const offsetX = distanceForPixels(map, 30);\n    const offsetY = distanceForPixels(map, 18);\n\n    const newFeatures = [];\n\n    this.roofPlaneClipboard.forEach((clipboardData) => {\n      const geometry = clipboardData.geometry.clone();\n      const coordinates = geometry.getCoordinates()[0];\n      const offsetCoordinates = coordinates.map(([lon, lat]) => [lon + offsetX, lat - offsetY]);\n      geometry.setCoordinates([offsetCoordinates]);\n\n      const newFeature = new Feature({ geometry, dataType: ROOF_PLANE_DATA_TYPE });\n      this.mapManager.roofPlanesVectorSource.addFeature(newFeature);\n      createRoofPlane(newFeature, this.project, this.mapModelSynchronizer, this.mapManager);\n      newFeatures.push(newFeature);\n    });\n\n    if (this.roofPlaneEditMode === OBSTRUCTION_EDIT_MODE_TRANSFORM) {\n      this.transformInteractionManager.refresh();\n    } else {\n      this.selectInteractionManager.selectionCollection.clear();\n      newFeatures.forEach((feature) => {\n        this.selectInteractionManager.selectionCollection.push(feature);\n      });\n      this.translateInteractionManager.remove();\n      this.translateInteractionManager.add();\n    }\n\n    this.markDirty();\n  }\n\n  #applyRoofPlaneEditMode() {\n    if (this.roofPlaneEditMode === OBSTRUCTION_EDIT_MODE_TRANSFORM) {\n      const selectedFeatures = this.selectInteractionManager.selectedFeatures;\n      const firstFeature = selectedFeatures.length > 0 ? selectedFeatures[0] : null;\n\n      this.selectInteractionManager.remove();\n      this.modifyInteractionManager.remove();\n      this.translateInteractionManager.remove();\n      this.transformInteractionManager.refresh();\n      this.transformInteractionManager.selectFeature(firstFeature);\n    } else {\n      const selectedFeature = this.transformInteractionManager.selectedFeature;\n\n      this.transformInteractionManager.remove();\n      this.selectInteractionManager.add();\n      this.translateInteractionManager.add();\n      this.modifyInteractionManager.add();\n\n      if (selectedFeature) {\n        this.selectInteractionManager.addToSelection(selectedFeature);\n        this.selectInteractionManager.shapeGuideLinesCall(\"add\", [selectedFeature], \"applyRoofPlaneEditMode\");\n        this.selectInteractionManager.selectClickResetInteractionManagers();\n      }\n    }\n    this.snapInteractionManager.refresh();\n  }\n\n  #enableSelectSubMenu() {\n    if (!this.hasSelectSubMenuBtnTarget) return;\n    toolbarBtn.enable(this.selectSubMenuBtnTarget);\n    toolbarBtn.enable(this.editVerticesBtnTarget);\n    toolbarBtn.enable(this.transformShapeBtnTarget);\n  }\n\n  #disableSelectSubMenu() {\n    if (!this.hasSelectSubMenuBtnTarget) return;\n    toolbarBtn.disable(this.selectSubMenuBtnTarget);\n    toolbarBtn.disable(this.editVerticesBtnTarget);\n    toolbarBtn.disable(this.transformShapeBtnTarget);\n  }\n\n  get #savedRoofPlaneEditMode() {\n    return toolbarSelectGroup.getState(\"bxRoofPlaneEditMode\", OBSTRUCTION_EDIT_MODE_VERTICES);\n  }\n}\n", "import DaBase from \"../../../../da/map/interaction-managers/draw/base\";\nimport { ROOF_SECTION_DATA_TYPE } from \"../../../../da/map/data-types\";\nimport { createRoofSection } from \"../../modification-helpers/roof-section\";\n\nexport default class RoofSections extends DaBase {\n  get targetDrawingSource() {\n    return this.mapManager.roofSectionsVectorSource;\n  }\n\n  get featureDataType() {\n    return ROOF_SECTION_DATA_TYPE;\n  }\n\n  createModelFromFeature(feature) {\n    createRoofSection(feature, this.controller.project, this.mapModelSynchronizer, this.mapManager);\n  }\n}\n", "import DaBase from \"../../../../da/map/interaction-managers/select/base\";\nimport { MEASURE_DATA_TYPE, ROOF_SECTION_DATA_TYPE, SETBACK_DATA_TYPE } from \"../../../../da/map/data-types\";\nimport { modifyRoofSection, deleteRoofSection } from \"../../modification-helpers/roof-section\";\n\nexport default class RoofSections extends DaBase {\n  filterSelects = (_feature, layer) => {\n    const layerDataType = layer && layer.get(\"dataType\");\n    const selectedBubbleAtVertex = layer === null;\n\n    // Current.rollout?(:bx_editable_setbacks)\n    if (!this.controller.canEditSetbacks && layerDataType === SETBACK_DATA_TYPE) return false;\n\n    return (\n      selectedBubbleAtVertex ||\n      layerDataType === ROOF_SECTION_DATA_TYPE ||\n      layerDataType === MEASURE_DATA_TYPE ||\n      layerDataType === SETBACK_DATA_TYPE\n    );\n  };\n\n  removeSelectedVertices() {\n    // if feature is default roof section\n    // make a copy of selected roof section & set that to default / inactive\n    // change the selected roof to custom\n    this.removeSelectedVerticesFromRoofSection();\n    this.removeSelectedVertexFromSelectInteractionFeatures();\n  }\n\n  removeSelectedVerticesFromRoofSection() {\n    this.selectionCollection.forEach((rsFeature) => {\n      const selectedVertexCoordinates = rsFeature.get(\"selectedVertexCoordinates\");\n\n      const coordinates = this.getCoordinatesIfVertexDeletionAllowed(rsFeature);\n      if (!coordinates) return;\n\n      const index = this.indexOfMatchingCoordinate(selectedVertexCoordinates, coordinates);\n      if (index === -1) return;\n\n      const newCoordinates = this.coordinatesWithoutVertexAtIndex(coordinates, index);\n      this.updateFeatureToNewCoordinates(rsFeature, newCoordinates);\n      rsFeature.unset(\"selectedVertexCoordinates\");\n\n      modifyRoofSection(rsFeature, this.project, this.mapModelSynchronizer, this.mapManager, this.controller);\n    });\n\n    this.controller.mapManager.dispatchAfterMapFeaturesRendering({\n      calledFrom: \"RoofSectionsSelectInteractionManager#removeSelectedVerticesFromRoofSection\",\n    });\n  }\n\n  removeSelectedShapes = () => {\n    this.removeSelectedRoofSections();\n    this.baseRemoveSelectedShapes();\n  };\n\n  removeSelectedRoofSections() {\n    this.selectionCollection.forEach((feature) => {\n      if (feature.get(\"dataType\") === ROOF_SECTION_DATA_TYPE) {\n        deleteRoofSection(feature, this.project, this.mapModelSynchronizer, this.mapManager, this.controller);\n      }\n    });\n\n    this.controller.mapManager.dispatchAfterMapFeaturesRendering({\n      calledFrom: \"RoofSectionsSelectInteractionManager#removeSelectedRoofSections\",\n    });\n  }\n\n  selectClickResetInteractionManagers() {\n    // The translate interaction has to be before the modify, or modify doesn't work\n    this.controller.translateInteractionManager.add();\n    this.controller.modifyInteractionManager.add();\n  }\n}\n", "import DaBase from \"../../../../da/map/interaction-managers/snap/base\";\n\nexport default class RoofSections extends DaBase {\n  get snapSources() {\n    return [\n      this.mapManager.setbacksVectorSource,\n      this.mapManager.roofSectionsVectorSource,\n      this.mapManager.arraysVectorSource,\n      this.mapManager.guideLinesVectorSource,\n      this.mapManager.guideLinesIntersectionCirclesVectorSource,\n      this.mapManager.obstructionsVectorSource,\n      this.mapManager.obstructionBuffersVectorSource,\n      this.mapManager.obstructionSetbackBuffersVectorSource,\n    ];\n  }\n}\n", "import Collection from \"ol/Collection\";\n\nimport { SETBACK_DATA_TYPE } from \"../../../../da/map/data-types\";\nimport DaBase from \"../../../../da/map/interaction-managers/translate/base\";\nimport { removeFeaturesDescendedFromRoofSectionUuid } from \"../../../../da/map/ol-helpers\";\nimport { translateRoofSection } from \"../../modification-helpers/roof-section\";\n\nexport default class RoofSections extends DaBase {\n  translating = (event) => {\n    if (this.alreadyRemovedArray) return;\n\n    const { features, startCoordinate, coordinate } = event;\n\n    if (startCoordinate[0] === coordinate[0] && startCoordinate[0] === coordinate[0]) return;\n\n    // for performance reasons, pull the array of panels out of OpenLayers while the user is dragging\n    features.forEach((rsFeature) => {\n      const uuid = rsFeature.get(\"uuid\");\n      removeFeaturesDescendedFromRoofSectionUuid(this.mapManager.arraysVectorSource, uuid);\n    });\n    this.alreadyRemovedArray = true;\n  };\n\n  get translatableFeatures() {\n    const features = this.controller.selectInteractionManager.selectionCollection.getArray();\n    const filteredFeatures = features.filter((f) => f.get(\"dataType\") !== SETBACK_DATA_TYPE);\n    return new Collection(filteredFeatures);\n  }\n\n  translateEndForFeature(rsFeature) {\n    translateRoofSection(rsFeature, this.project, this.mapModelSynchronizer, this.mapManager, this.controller);\n\n    this.controller.mapManager.dispatchAfterMapFeaturesRendering({\n      calledFrom: \"RoofSectionsTranslateInteractionManager#translateEndForFeature\",\n    });\n  }\n}\n", "import { toLonLat } from \"ol/proj\";\nimport { setCartesianPointsForModelRelativeToOrigin } from \"../../../da/map/ol-geometry\";\n\nexport function ensureSetbackOuterRingRemainsUnmodified(mapManager, setbackFeature) {\n  const roofPlaneUuid = setbackFeature.get(\"roofPlaneUuid\");\n  const roofPlaneFeature = mapManager.roofPlanesVectorSource\n    .getFeatures()\n    .find((rpf) => rpf.get(\"uuid\") === roofPlaneUuid);\n  const roofPlaneOuterRingCoordinates = roofPlaneFeature.getGeometry().getLinearRing(0).getCoordinates();\n\n  const setbackFeatureGeometry = setbackFeature.getGeometry();\n  const setbackFeatureCoordinates = setbackFeatureGeometry.getCoordinates();\n  setbackFeatureCoordinates[0] = roofPlaneOuterRingCoordinates;\n  setbackFeatureGeometry.setCoordinates(setbackFeatureCoordinates);\n}\n\nexport function updateRoofSectionsFromModifiedSetbackCoordinates(project, setbackFeature) {\n  const setbackCoordinates = setbackFeature.getGeometry().getCoordinates();\n  const innerRings = setbackCoordinates.slice(1, setbackCoordinates.length);\n  const roofPlane = project.getRoofPlane(setbackFeature.get(\"roofPlaneUuid\"));\n  const originLonLat = project.detail.originLatLng.toLonLat;\n\n  roofPlane.notDeletedRoofSections.forEach((roofSection, i) => {\n    const newCoordinates = innerRings[i].map((c) => {\n      const lonLat = toLonLat(c);\n      return { lat: lonLat[1], lng: lonLat[0] };\n    });\n    roofSection.setLatLngPoints(newCoordinates);\n    setCartesianPointsForModelRelativeToOrigin(originLonLat, roofSection);\n  });\n}\n", "import { toLonLat } from \"ol/proj\";\n\nimport { ROOF_SECTION_DATA_TYPE, SETBACK_DATA_TYPE } from \"../../../../da/map/data-types\";\nimport DaBase from \"../../../../da/map/interaction-managers/modify/base\";\nimport RoofSectionLegalityChecker from \"../../../../da/map/legality-checkers/roof-section\";\nimport SimpleLatLng from \"../../../../da/map/models/simple-lat-lng\";\nimport { findTopLeftLonLat, setCartesianPointsForModelRelativeToOrigin } from \"../../../../da/map/ol-geometry\";\nimport { ensureSetbackOuterRingRemainsUnmodified } from \"../../../../pr/map/modification-helpers/roof-section\";\nimport {\n  adjustArrayAfterNudge,\n  modifyRoofSection,\n  updateBoundingBoxAndReAddLayoutForRoofSection,\n} from \"../../modification-helpers/roof-section\";\n\nexport default class RoofSections extends DaBase {\n  modifyEndForFeature(feature) {\n    let dataType = feature.get(\"dataType\");\n\n    if (dataType === ROOF_SECTION_DATA_TYPE) {\n      modifyRoofSection(feature, this.project, this.mapModelSynchronizer, this.mapManager, this.controller);\n    } else if (dataType === SETBACK_DATA_TYPE) {\n      ensureSetbackOuterRingRemainsUnmodified(this.mapManager, feature);\n      this.#updateDefaultRoofSectionFromModifiedSetback(feature);\n    }\n\n    this.controller.mapManager.dispatchAfterMapFeaturesRendering({\n      calledFrom: \"RoofSectionsModifyInteractionManager#modifyEndForFeature\",\n    });\n  }\n\n  get polygonModifyInteractionParams() {\n    return {\n      features: this.selectedPolygonFeatures,\n      insertVertexCondition: (_mapBrowserEvent) => {\n        const selectedFeatures = this.selectedPolygonFeatures.getArray();\n        if (selectedFeatures.some((f) => f.get(\"dataType\") === SETBACK_DATA_TYPE)) {\n          return false; // disallow adding vertexes\n        } else {\n          return true;\n        }\n      },\n    };\n  }\n\n  #updateDefaultRoofSectionFromModifiedSetback(setbackFeature) {\n    const roofPlane = this.project.getRoofPlane(setbackFeature.get(\"roofPlaneUuid\"));\n    const defaultRoofSections = roofPlane.defaultRoofSections;\n\n    setbackFeature\n      .getGeometry()\n      .getCoordinates()\n      .forEach((linearRing, i) => {\n        if (i === 0) return; // This is the outer setback ring\n\n        const roofSection = defaultRoofSections[i - 1];\n        const latLngPoints = linearRing.map((c) => SimpleLatLng.fromLonLat(toLonLat(c)).toSimpleObject);\n        roofSection.setLatLngPoints(latLngPoints);\n\n        const topLeftLonLat = findTopLeftLonLat(roofPlane.latLngPoints);\n        setCartesianPointsForModelRelativeToOrigin(topLeftLonLat, roofSection);\n      });\n\n    this.mapManager.clearRoofSectionFeatures();\n    this.mapManager.renderRoofSectionFeatures();\n\n    roofPlane.notDeletedRoofSections.forEach((roofSection) => {\n      let roofSectionFeature = this.mapManager.roofSectionsVectorSource\n        .getFeatures()\n        .find((rsf) => rsf.get(\"uuid\") === roofSection.uuid);\n\n      if (!roofSectionFeature) return;\n\n      const roofPlaneFeature = this.mapModelSynchronizer.getFeatureForRoofPlane(roofPlane);\n\n      new RoofSectionLegalityChecker(\n        roofPlaneFeature,\n        this.mapManager.roofSectionsFeatures,\n        this.mapModelSynchronizer,\n      ).markIllegalPolygons(roofSectionFeature);\n\n      updateBoundingBoxAndReAddLayoutForRoofSection(roofSectionFeature, roofSection, this.project, this.mapManager);\n      adjustArrayAfterNudge(roofSection, this.project, this.mapManager);\n    });\n  }\n}\n", "import { clone, destroy } from \"mobx-state-tree\";\nimport { fromLonLat } from \"ol/proj\";\n\nimport MapRoofPlanesAndSectionsController from \"./map_roof_planes_and_sections_controller\";\nimport RoofSectionLegalityChecker from \"../../../da/map/legality-checkers/roof-section\";\nimport DrawInteractionManager from \"../../../bx/map/interaction-managers/draw/roof-sections\";\nimport SelectInteractionManager from \"../../../bx/map/interaction-managers/select/roof-sections\";\nimport SnapInteractionManager from \"../../../bx/map/interaction-managers/snap/roof-sections\";\nimport TranslateInteractionManager from \"../../../bx/map/interaction-managers/translate/roof-sections\";\nimport ModifyInteractionManager from \"../../../bx/map/interaction-managers/modify/roof-sections\";\nimport MeasureInteractionManager from \"../../../da/map/interaction-managers/measure/base\";\nimport ShapeGuideLinesInteractionManager from \"../../../da/map/interaction-managers/shape-guide-lines/base\";\nimport {\n  deleteRoofSectionAndRemoveFromVectorSource,\n  reactivateRoofSection,\n  addLayoutAndArrayForRoofSection,\n} from \"../../../bx/map/modification-helpers/roof-section\";\nimport { deleteAndRebuildDefaultRoofSectionsForRoofPlane } from \"../../../bx/map/modification-helpers/roof-plane\";\nimport { logger, humanizeWattage } from \"../../../helpers/app\";\nimport { EDITOR_MODE_SELECT } from \"../../../da/layout-editor/helpers/toolbar-constants\";\nimport * as toolbarSelectGroup from \"../../../da/layout-editor/helpers/toolbar-select-group\";\n\nexport default class MapRoofSectionsController extends MapRoofPlanesAndSectionsController {\n  useGuideLines = true;\n\n  connect() {\n    super.connect();\n\n    // Current.rollout?(:bx_editable_setbacks)\n    this.canEditSetbacks = this.element.dataset.canEditSetbacks === \"true\";\n\n    this.element.controller = this;\n\n    setTimeout(() => {\n      this.addSnapshotToUndoQueue(false);\n    }, 1000);\n  }\n\n  disconnect() {\n    super.disconnect();\n\n    this.drawInteractionManager.remove();\n  }\n\n  setupMapInteractionManagers() {\n    this.drawInteractionManager = new DrawInteractionManager(this);\n\n    this.selectInteractionManager = new SelectInteractionManager(this);\n\n    this.translateInteractionManager = new TranslateInteractionManager(this);\n\n    this.modifyInteractionManager = new ModifyInteractionManager(this);\n\n    this.measureInteractionManager = new MeasureInteractionManager(this);\n\n    this.shapeGuideLinesInteractionManager = new ShapeGuideLinesInteractionManager(this);\n\n    this.snapInteractionManager = new SnapInteractionManager(this);\n    this.snapInteractionManager.add();\n  }\n\n  mapSpecificConnect() {\n    this.mapManager.buildNewDefaultRoofSectionsAndSetbacks();\n    this.statusItemPanelsContainerTarget.classList.remove(\"d-none\");\n    this.statusItemWattageContainerTarget.classList.remove(\"d-none\");\n    this.#autoFixProject();\n    this.mapManager.addRoofSectionsAndSetbacksVectorLayers();\n    this.mapManager.addArraysVectorLayer();\n    this.editorMode = toolbarSelectGroup.getState(\"bxRoofSectionEditorMode\", EDITOR_MODE_SELECT);\n\n    // Passing the editorMode forward so that when the BtnSelectGroup is\n    // instantiated, is can enable the correct btn for the editorMode\n    this.editModeBtnGroupTarget.dataset[\"da-LayoutEditor-BtnSelectGroupDefaultOptionValue\"] = this.editorMode;\n  }\n\n  undo(event) {\n    super.undo(event);\n    this.afterUndoRedo();\n  }\n\n  redo(event) {\n    super.redo(event);\n    this.afterUndoRedo();\n  }\n\n  afterUndoRedo() {\n    this.updateAzimuthFormWithValueFromProjectDetail();\n    this.setRotationZoomAndPositionFromProjectSite();\n    this.resetDrawingModeAndRenderDrawPoints();\n    this.updateRestoreDefaultRoofSectionsUI();\n    this.reRenderGuideLinesAndUpdateGuideLinesForm();\n    this.snapInteractionManager.refresh();\n  }\n\n  updateAzimuthFormWithValueFromProjectDetail() {\n    const azimuthForm = document.querySelector(\"[data-controller='bx--layout-editor--azimuth-management']\");\n    const azimuthFormController = azimuthForm.controller;\n    azimuthFormController.setAzimuthValue(this.project.azimuth);\n  }\n\n  setRotationZoomAndPositionFromProjectSite() {\n    this.mapManager.rotateCompassTo(this.project.projectSite.editorRotation);\n    this.mapManager.map.getView().setRotation(this.project.projectSite.editorRotation);\n\n    this.mapManager.map.getView().setZoom(this.project.projectSite.editorZoom);\n\n    const coordinate = fromLonLat([this.project.projectSite.editorLng, this.project.projectSite.editorLat]);\n    this.mapManager.setCenter(coordinate);\n  }\n\n  resetDrawingModeAndRenderDrawPoints() {\n    if (!this.drawInteractionManager.currentDrawInteraction && this.project.drawingCoordinates.length > 0) {\n      this.startDrawMode();\n      this.editModeBtnGroupTarget.selectGroupController.selectOption(\"draw\");\n    }\n\n    this.drawInteractionManager.initializeDrawingFromProjectDrawingCoordinates();\n  }\n\n  reRenderGuideLinesAndUpdateGuideLinesForm() {\n    this.mapManager.reloadGuideLineFeatures();\n\n    const form = document.querySelector(\"[data-controller='bx--layout-editor--guide-lines-form']\");\n    const formController = form.controller;\n    formController.updateDistanceValues(this.project);\n  }\n\n  setMapSpecificStatusBarItems() {\n    this.statusItemPanelsTarget.innerText = this.project.panelsPresent;\n    this.statusItemWattageTarget.innerText = humanizeWattage(this.project.wattage);\n  }\n\n  restoreRoofPlaneDefaultRoofSectionGivenIdentifier(rpIdentifier) {\n    let roofPlanes;\n    if (rpIdentifier === \"all\") {\n      roofPlanes = this.project.roofPlanes;\n    } else {\n      const roofPlane = this.project.roofPlanes.find((rp) => rp.identifier === rpIdentifier);\n      if (!roofPlane) {\n        console.error(`Unable to find roof plane for identifier`, rpIdentifier);\n        return;\n      }\n      roofPlanes = [roofPlane];\n    }\n\n    const updates = roofPlanes.map((rp) => this.restoreRoofPlaneDefaultRoofSections(rp));\n    if (updates.some((u) => u)) this.markDirty();\n\n    this.mapManager.forceRedrawRoofPlanes();\n    this.updateRestoreDefaultRoofSectionsUI();\n  }\n\n  restoreRoofPlaneDefaultRoofSections(roofPlane) {\n    let didUpdateOccur = false;\n\n    const activeCustomRoofSections = roofPlane.customRoofSections.filter((rp) => rp.active);\n    activeCustomRoofSections.forEach((roofSection) => {\n      deleteRoofSectionAndRemoveFromVectorSource(roofSection, this.mapModelSynchronizer, this.mapManager);\n      didUpdateOccur = true;\n    });\n\n    roofPlane.defaultRoofSections.forEach((defaultRoofSection) => {\n      if (defaultRoofSection.active) return;\n\n      reactivateRoofSection(defaultRoofSection, this.project, this.mapModelSynchronizer, this.mapManager);\n      didUpdateOccur = true;\n    });\n\n    roofPlane.resequenceRoofSectionsIdentifiers();\n\n    const roofPlaneFeature = this.mapModelSynchronizer.getFeatureForRoofPlane(roofPlane);\n    new RoofSectionLegalityChecker(\n      roofPlaneFeature,\n      this.mapManager.roofSectionsFeatures,\n      this.mapModelSynchronizer,\n    ).markIllegalPolygons();\n\n    if (didUpdateOccur) {\n      this.mapManager.dispatchAfterMapFeaturesRendering({\n        calledFrom: \"MapRoofSectionsController#restoreRoofPlaneDefaultRoofSections\",\n      });\n    }\n\n    return didUpdateOccur;\n  }\n\n  updateRestoreDefaultRoofSectionsUI() {\n    if (!this.restoreDefaultRoofSectionsController) return;\n\n    this.restoreDefaultRoofSectionsController.updateUI(this.project.roofPlanes);\n  }\n\n  get restoreDefaultRoofSectionsController() {\n    return document.querySelector(\"[data-controller='bx--layout-editor--restore-roof-section-defaults']\")[\n      \"bx--layout-editor--restore-roof-section-defaults\"\n    ];\n  }\n\n  azimuthUpdated(currentRotationDegrees, _allRsInRp, _allRs, _newProjectDefault, dragging) {\n    this.project.setAzimuth(currentRotationDegrees);\n\n    this.project.displayableRoofPlanes.forEach((roofPlane) => {\n      roofPlane.displayableRoofSections.forEach((roofSection) => {\n        if (currentRotationDegrees === roofSection.azimuth) return;\n\n        logger(`setting azimuth to ${currentRotationDegrees} for ${roofSection.displayIdentifier}`);\n        const rsFeature = this.mapModelSynchronizer.getFeatureForRoofSection(roofSection);\n        roofSection.setAzimuth(currentRotationDegrees);\n        const currentLayout = roofSection.layout && clone(roofSection.layout);\n        addLayoutAndArrayForRoofSection(rsFeature, roofSection, this.project, this.mapManager, currentLayout);\n        if (currentLayout) destroy(currentLayout);\n      });\n    });\n\n    this.markDirty();\n\n    if (!dragging) {\n      this.mapManager.dispatchAfterMapFeaturesRendering({\n        calledFrom: \"MapRoofSectionsController#azimuthUpdated\",\n      });\n    }\n  }\n\n  rotateCounterClockwise(event) {\n    super.rotateCounterClockwise(event);\n\n    this.mapManager.dispatchAfterMapFeaturesRendering({\n      calledFrom: \"MapRoofSectionsController#rotateCounterClockwise\",\n    });\n  }\n\n  rotateClockwise(event) {\n    super.rotateClockwise(event);\n\n    this.mapManager.dispatchAfterMapFeaturesRendering({\n      calledFrom: \"MapRoofSectionsController#rotateClockwise\",\n    });\n  }\n\n  #autoFixProject() {\n    logger(\"AutoFix Project\");\n    this.project.roofPlanes.forEach((roofPlane) => {\n      this.#autoFixRooSections(roofPlane);\n\n      roofPlane.roofSections.forEach((roofSection) => {\n        this.#autoFixLayout(roofPlane, roofSection);\n      });\n    });\n  }\n\n  #autoFixRooSections(roofPlane) {\n    const hasStaleDefaultRoofSections = roofPlane.defaultRoofSections.some((rs) => rs.isStale);\n    if (hasStaleDefaultRoofSections) {\n      logger(`Roof Plane ${roofPlane.displayIdentifier} -- rebuilding default roof section`);\n      deleteAndRebuildDefaultRoofSectionsForRoofPlane(roofPlane, this.mapModelSynchronizer, this.mapManager);\n    }\n\n    roofPlane.customRoofSections.forEach((roofSection) => {\n      if (roofSection.fresh) return;\n\n      const rsFeature = this.mapModelSynchronizer.getFeatureForRoofSection(roofSection);\n      roofSection.freshen();\n      rsFeature.set(\"fresh\", true);\n      this.markDirty();\n    });\n\n    const rpFeature = this.mapModelSynchronizer.getFeatureForRoofPlane(roofPlane);\n    new RoofSectionLegalityChecker(\n      rpFeature,\n      this.mapManager.roofSectionsFeatures,\n      this.mapModelSynchronizer,\n    ).markIllegalPolygons();\n    this.mapManager.forceRedrawRoofPlanes();\n  }\n\n  #autoFixLayout(roofPlane, roofSection) {\n    const layout = roofSection.layout;\n    if (!layout || layout.fresh) return;\n\n    logger(`Roof Section ${roofSection.displayIdentifier} -- rebuilding layout`);\n\n    const rsFeature = this.mapModelSynchronizer.getFeatureForRoofSection(roofSection);\n    const currentLayout = roofSection.layout && clone(roofSection.layout);\n    addLayoutAndArrayForRoofSection(rsFeature, roofSection, this.project, this.mapManager, currentLayout);\n    if (currentLayout) destroy(currentLayout);\n    this.markDirty();\n  }\n}\n", "import MapBaseController from \"./map_base_controller\";\nimport * as toolbarBtn from \"../../../da/layout-editor/helpers/toolbar-btns\";\n\nexport default class extends MapBaseController {\n  static targets = [\"layoutEditorBtn\"];\n\n  connect() {\n    this.viewOnlyMap = true;\n    this.showBoundingBoxes = this.element.dataset.showBoundingBoxes === \"true\";\n\n    super.connect();\n\n    this.mapManager.buildSetbacksVectorSource();\n    this.mapManager.addRoofSectionsAndSetbacksVectorLayers();\n\n    this.mapManager.addArraysVectorLayer();\n  }\n\n  // Called by both Stimulus event handler and saveAndThenRedirect triggered by auto save controller\n  save(_event, onSuccess = () => {}) {\n    toolbarBtn.showSpinner(this.saveBtnTarget);\n    this.project.projectSite.save({\n      path: this.savePath,\n      onSuccess: (_json) => {\n        this.markClean();\n        onSuccess();\n        setTimeout(() => {\n          toolbarBtn.hideSpinner(this.saveBtnTarget);\n        }, 500);\n      },\n      onValidationError: this.onValidationError,\n      onServerError: this.onServerError,\n    });\n  }\n\n  clickLayoutEditorLink(event) {\n    if (!this.dirty) return;\n\n    event.preventDefault();\n\n    const url = event.currentTarget.href;\n    this.saveAndThenRedirect(url);\n  }\n\n  populateStatusbar() {\n    // Don't do anything. We don't have a status bar on this map.\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\n\nimport * as animate from \"../../../helpers/animate\";\n\nexport default class extends Controller {\n  static targets = [\n    \"heightInput\",\n    \"heightContainer\",\n    \"template\",\n    \"tableContainer\",\n    \"obstructionHeightInputsContainer\",\n    \"setAllHeightsInput\",\n    \"setAllSetbacksInput\",\n    \"applicationMode\",\n    \"setbackFtInput\",\n  ];\n  static outlets = [\"bx--layout-editor--map-obstructions\"];\n\n  connect() {\n    if (this.obstructionsCount() > 0) {\n      this.tableContainerTarget.classList.remove(\"d-none\");\n    }\n  }\n\n  add(obstruction) {\n    const template = this.templateTarget.innerHTML\n      .replaceAll(\"[identifier]\", obstruction.identifier)\n      .replaceAll(\"[uuid]\", obstruction.uuid);\n\n    this.obstructionHeightInputsContainerTarget.insertAdjacentHTML(\"beforeend\", template);\n\n    const container = this.#getHeightContainerForUUID(obstruction.uuid);\n    if (container) {\n      const heightInput = container.querySelector(\n        `[data-identifier=\"${obstruction.uuid}\"][data-bx--layout-editor--obstruction-heights-form-target=\"heightInput\"]`,\n      );\n      if (heightInput && obstruction.height !== null) {\n        const heightValue = Number(obstruction.height);\n        heightInput.value = Number.isInteger(heightValue) ? heightValue.toFixed(1) : heightValue;\n        const fieldWrapper = heightInput.closest(\"[data-identifier='heightFieldWrapper']\");\n        if (fieldWrapper) {\n          fieldWrapper.classList.remove(\"field_with_errors\");\n        }\n      }\n\n      const setbackFtInput = container.querySelector(\n        `[data-identifier=\"${obstruction.uuid}\"][data-bx--layout-editor--obstruction-heights-form-target=\"setbackFtInput\"]`,\n      );\n      if (setbackFtInput && obstruction.setbackFt !== null) {\n        setbackFtInput.value = obstruction.setbackFt;\n      }\n    }\n\n    animate.show(this.tableContainerTarget, { duration: 250 });\n  }\n\n  remove(uuid, obstructions) {\n    const container = this.#getHeightContainerForUUID(uuid);\n    if (container) {\n      container.remove();\n    }\n\n    obstructions.forEach((obstruction) => {\n      const container = this.#getHeightContainerForUUID(obstruction.uuid);\n      if (container) {\n        container.querySelector(\".bx-obstructions-form__col-number\").innerHTML = obstruction.identifier;\n      }\n    });\n\n    if (this.obstructionsCount() === 0) {\n      animate.hide(this.tableContainerTarget, { fadeOut: false });\n    }\n  }\n\n  obstructionsCount() {\n    return this.heightInputTargets.length;\n  }\n\n  updateHeightHandler(event) {\n    const field = event.currentTarget;\n\n    this.updateHeight(field);\n  }\n\n  updateHeight(field) {\n    const uuid = field.dataset.identifier;\n    const height = this.#extractValidFloat(field.value);\n\n    field.value = height;\n    const container = field.closest(\"[data-identifier='heightFieldWrapper']\");\n    if (field.value === \"\") {\n      container.classList.add(\"field_with_errors\");\n    } else {\n      container.classList.remove(\"field_with_errors\");\n    }\n    this.bxLayoutEditorMapObstructionsOutlet.setObstructionHeight(uuid, height);\n  }\n\n  iconRemove(event) {\n    const obstructionUuid = event.params.uuid;\n    this.bxLayoutEditorMapObstructionsOutlet.removeObstruction(obstructionUuid);\n    this.remove(obstructionUuid, this.bxLayoutEditorMapObstructionsOutlet.project.notDeletedObstructions);\n  }\n\n  applyAll(event) {\n    if (event) event.preventDefault();\n\n    const height = this.setAllHeightsInputTarget.value;\n    const setback = this.setAllSetbacksInputTarget.value;\n    const applicationType = this.applicationModeTarget.value;\n\n    if (height !== \"\") {\n      this.heightInputTargets.forEach((input) => {\n        if (applicationType === \"all\" || (applicationType === \"empty\" && input.value === \"\")) {\n          input.value = height;\n          this.updateHeight(input);\n        }\n      });\n    }\n\n    if (setback !== \"\") {\n      this.setbackFtInputTargets.forEach((input) => {\n        if (applicationType === \"all\" || (applicationType === \"empty\" && input.value === \"\")) {\n          input.value = setback;\n          this.updateSetbackFt(input);\n        }\n      });\n    }\n\n    this.setAllHeightsInputTarget.value = \"\";\n    this.setAllSetbacksInputTarget.value = \"\";\n    this.updateSetAllEmptyState();\n  }\n\n  handleApplyKeydown(event) {\n    if (event.key === \"Enter\") {\n      event.preventDefault();\n      this.applyAll();\n    }\n  }\n\n  updateSetAllEmptyState() {\n    const bothEmpty = this.setAllHeightsInputTarget.value === \"\" && this.setAllSetbacksInputTarget.value === \"\";\n    this.applicationModeTarget.classList.toggle(\"bx-obstructions-form__set-all-input--empty\", bothEmpty);\n  }\n\n  updateSetbackFtHandler(event) {\n    this.updateSetbackFt(event.currentTarget);\n  }\n\n  updateSetbackFt(field) {\n    const uuid = field.dataset.identifier;\n    const setback = this.#extractValidFloat(field.value);\n\n    field.value = setback;\n    const container = field.closest(\"[data-identifier='setbackFieldWrapper']\");\n    if (field.value === \"\") {\n      container.classList.add(\"field_with_errors\");\n    } else {\n      container.classList.remove(\"field_with_errors\");\n    }\n    this.bxLayoutEditorMapObstructionsOutlet.setObstructionSetbackFt(uuid, setback);\n  }\n\n  setSetbackFtForObstruction(uuid, ft) {\n    const field = this.setbackFtInputTargets.find((input) => input.dataset.identifier === uuid);\n    if (!field) return;\n\n    field.value = ft;\n    field.dispatchEvent(new Event(\"input\"));\n  }\n\n  #getHeightContainerForUUID(uuid) {\n    return this.heightContainerTargets.find((container) => container.dataset.uuid === uuid);\n  }\n\n  #extractValidFloat(value) {\n    let result = value.replace(/[^\\d\\.]/g, \"\");\n\n    // get rid of a second .\n    if (result.match(/\\.\\d*\\./)) {\n      result = Number.parseFloat(result);\n    }\n\n    return result;\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport * as animate from \"../../../helpers/animate\";\n\nexport default class extends Controller {\n  static targets = [\"allBtn\", \"identifierBtn\"];\n\n  connect() {\n    this.element[this.identifier] = this;\n  }\n\n  btnClick(event) {\n    const identifier = event.currentTarget.dataset.identifier;\n    this.mapController.restoreRoofPlaneDefaultRoofSectionGivenIdentifier(identifier);\n  }\n\n  get mapController() {\n    return document.querySelector(\"[data-controller='bx--layout-editor--map-roof-sections']\")[\n      \"bx--layout-editor--map-roof-sections\"\n    ];\n  }\n\n  updateUI(roofPlanes) {\n    const roofPlanesWithInactiveDefaults = roofPlanes.filter((rp) => rp.hasInactiveDefaultRoofSections);\n\n    animate.toggle(this.element, roofPlanesWithInactiveDefaults.length > 0);\n    this.allBtnTarget.disabled = roofPlanesWithInactiveDefaults.length === 1;\n\n    const roofPlanesWithInactiveDefaultsIdentifiers = roofPlanesWithInactiveDefaults.map((rp) => rp.identifier);\n    this.identifierBtnTargets.forEach((btnTarget) => {\n      const identifier = btnTarget.dataset.identifier;\n      btnTarget.disabled = !roofPlanesWithInactiveDefaultsIdentifiers.includes(identifier);\n      btnTarget.classList.remove(\"ir-btn--disabled\");\n    });\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport { flashlight } from \"../../../helpers/animate\";\n\nexport default class extends Controller {\n  static targets = [\n    \"buildingHeightField\",\n    \"roofSlopeSelect\",\n    \"fireSetbackField\",\n    \"parapetHeightInField\",\n    \"parapetThicknessInField\",\n    \"hasRoofingInformationRadioYes\",\n    \"hasRoofingInformationRadioNo\",\n    \"roofMaterialSelect\",\n    \"roofManufacturerSelect\",\n    \"colorSelect\",\n    \"thicknessSelect\",\n    \"projectSeismicDesignField\",\n    \"projectSetbackField\",\n    \"setbackField\",\n    \"seismicDesignField\",\n    \"previousValueMessage\",\n    \"projectSupplementalChassisField\",\n    \"supplementalChassisRadioYes\",\n    \"supplementalChassisRadioNo\",\n  ];\n\n  connect() {\n    this.defaultData = JSON.parse(this.element.dataset.projectDetail);\n  }\n\n  applyDefaults(event) {\n    event.preventDefault();\n\n    this.buildingHeightFieldTarget.value = this.defaultData.buildingHeight;\n    this.roofSlopeSelectTarget.value = this.defaultData.roofSlope;\n    this.fireSetbackFieldTarget.value = this.defaultData.fireSetback;\n    this.parapetHeightInFieldTarget.value = this.defaultData.parapetHeightIn;\n    this.parapetThicknessInFieldTarget.value = this.defaultData.parapetThicknessIn;\n    if (this.defaultData.hasRoofingInformation) {\n      this.hasRoofingInformationRadioYesTarget.click();\n    } else {\n      this.hasRoofingInformationRadioNoTarget.click();\n    }\n    this.roofMaterialSelectTarget.value = this.defaultData.roofMaterial;\n\n    const changeEvent = new CustomEvent(\"change\", { bubbles: true });\n    this.roofMaterialSelectTarget.dispatchEvent(changeEvent);\n\n    this.roofManufacturerSelectTarget.value = this.defaultData.roofManufacturer;\n    this.colorSelectTarget.value = this.defaultData.color;\n    this.thicknessSelectTarget.value = this.defaultData.thickness;\n\n    this.projectSeismicDesignFieldTarget.value = this.defaultData.seismicDesign;\n    this.projectSetbackFieldTarget.value = this.defaultData.setback;\n    this.projectSupplementalChassisFieldTarget.value = this.defaultData.supplementalChassis;\n\n    if (this.hasSetbackFieldTarget) {\n      this.setbackFieldTarget.value = this.defaultData.setback;\n      flashlight(this.setbackFieldTarget);\n    }\n\n    if (this.hasSeismicDesignFieldTarget) {\n      this.seismicDesignFieldTarget.value = this.defaultData.seismicDesign;\n      flashlight(this.seismicDesignFieldTarget);\n    }\n    if (this.hasSupplementalChassisRadioYesTarget) {\n      if (this.defaultData.supplementalChassis) {\n        this.supplementalChassisRadioYesTarget.click();\n      } else {\n        this.supplementalChassisRadioNoTarget.click();\n      }\n    }\n  }\n\n  setbackInvalidated() {\n    this.projectSetbackFieldTarget.value = \"\";\n    if (this.hasSetbackFieldTarget) {\n      const originalValue = this.setbackFieldTarget.dataset.originalValue;\n      const currentValue = this.setbackFieldTarget.value;\n\n      console.log({ originalValue, currentValue });\n\n      if (originalValue !== currentValue) {\n        this.setbackFieldTarget.value = originalValue;\n        flashlight(this.setbackFieldTarget);\n        this.previousValueMessageTarget.classList.remove(\"d-none\");\n      }\n    }\n  }\n}\n", "import MapBaseController from \"./layout_editor/map_base_controller\";\n\nexport default class extends MapBaseController {\n  connect() {\n    this.viewOnlyMap = true;\n    this.showBoundingBoxes = false;\n    this.hideEmptyCells = true;\n    this.isProjectReport = true;\n\n    super.connect();\n\n    this.mapManager.roofPlanesVectorSource.clear();\n\n    this.mapManager.obstructionsVectorSource.clear();\n    this.mapManager.obstructionBuffersVectorSource.clear();\n    this.mapManager.obstructionSetbackBuffersVectorSource.clear();\n\n    this.mapManager.addArraysVectorLayer();\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport * as animate from \"../../helpers/animate\";\n\nexport default class extends Controller {\n  static targets = [\n    \"mountKitCount\",\n    \"mountKitNa\",\n    \"powerElectronicsAttachmentNa\",\n    \"powerElectronicsAttachmentContainer\",\n    \"powerElectronicsAttachment\",\n    \"mlpeWarning\",\n  ];\n\n  connect() {\n    this.mountKitCompatibleElectronics = JSON.parse(this.data.get(\"mountKitCompatible\"));\n    this.powerElectronicsAttachmentCompatibleElectronics = JSON.parse(\n      this.data.get(\"powerElectronicsAttachmentCompatible\"),\n    );\n  }\n\n  changedElectronics(event) {\n    const powerElectronicsControl = event.target;\n    const powerElectronics = powerElectronicsControl.value;\n\n    const mountKitCompatible = this.mountKitCompatibleElectronics.indexOf(powerElectronics) > -1;\n    const powerElectronicsAttachmentCompatible =\n      this.powerElectronicsAttachmentCompatibleElectronics.indexOf(powerElectronics) > -1;\n\n    this.toggleMountKits(mountKitCompatible);\n    this.togglePowerElectronicsAttachment(powerElectronicsAttachmentCompatible);\n  }\n\n  toggleMountKits(compatible) {\n    if (!this.hasMountKitCountTarget) {\n      return;\n    }\n\n    if (compatible) {\n      if (this.currentlyHidden(this.mountKitCountTarget)) {\n        animate.show(this.mountKitCountTarget);\n        this.mountKitNaTarget.classList.add(\"d-none\");\n      }\n    } else {\n      this.mountKitCountTarget.value = \"0\";\n      this.mountKitCountTarget.classList.add(\"d-none\");\n      animate.show(this.mountKitNaTarget);\n    }\n  }\n\n  togglePowerElectronicsAttachment(compatible) {\n    if (compatible) {\n      if (this.currentlyHidden(this.powerElectronicsAttachmentContainerTarget)) {\n        animate.show(this.powerElectronicsAttachmentContainerTarget);\n        if (this.isUsingMlpe) {\n          animate.show(this.mlpeWarningTarget);\n        } else {\n          animate.hide(this.mlpeWarningTarget);\n        }\n        this.powerElectronicsAttachmentNaTarget.classList.add(\"d-none\");\n      }\n    } else {\n      this.powerElectronicsAttachmentTarget.value = \"none\";\n      this.powerElectronicsAttachmentContainerTarget.classList.add(\"d-none\");\n      this.mlpeWarningTarget.classList.add(\"d-none\");\n      animate.show(this.powerElectronicsAttachmentNaTarget);\n    }\n  }\n\n  changedPowerElectronicsAttachment(_event) {\n    if (this.isUsingMlpe) {\n      animate.show(this.mlpeWarningTarget);\n    } else {\n      this.mlpeWarningTarget.classList.add(\"d-none\");\n    }\n  }\n\n  currentlyHidden(target) {\n    return target.style.display === \"none\" || target.classList.contains(\"d-none\");\n  }\n\n  get isUsingMlpe() {\n    return this.powerElectronicsAttachmentTarget.value === \"mlpe\";\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport { dynamicDialog } from \"../components/ir_dialog/helper\";\n\nexport default class extends Controller {\n  static values = {\n    powerUser: Boolean,\n  };\n\n  powerUserCellDialogWidth = 850;\n  regularCellDialogWidth = 550;\n\n  powerUserChassisDialogWidth = 650;\n  regularChassisDialogWidth = 550;\n\n  click(event) {\n    const { elementIdentifier, elementType, contentData } = event.params;\n\n    const header = this.#dialogHeader(elementType, elementIdentifier);\n    const content = this.#dialogContents(contentData);\n    const width = this.#dialogWidth(elementType);\n\n    dynamicDialog({ header, content, width });\n\n    this.#highlight(event.currentTarget);\n  }\n\n  #dialogHeader(elementType, identifier) {\n    return elementType === \"module\" ? `Module: ${identifier}` : `Chassis: ${identifier}`;\n  }\n\n  #dialogContents(contentData) {\n    const contentDataRow = (key, value) => {\n      return `\n        <tr>\n          <th>${key}</th>\n          <td>${value}</td>\n        </tr>\n      `;\n    };\n\n    const contentDataRows = Object.keys(contentData)\n      .map((key) => {\n        return contentDataRow(key, contentData[key]);\n      })\n      .join(\"\\n\");\n\n    const content = `\n      <div class=\"bx-result__details\">\n        <table class=\"bx-result__dialog__table\">\n          <tbody>\n            ${contentDataRows}\n          </tbody>\n        </table>\n      </div>\n    `;\n\n    return content;\n  }\n\n  #dialogWidth(elementType) {\n    if (elementType === \"chassis\") {\n      return this.powerUserValue ? this.powerUserChassisDialogWidth : this.regularChassisDialogWidth;\n    } else {\n      return this.powerUserValue ? this.powerUserCellDialogWidth : this.regularCellDialogWidth;\n    }\n  }\n\n  #highlight(div) {\n    const selectedClassName = \"bx-result--selected-item\";\n\n    Array.from(document.querySelectorAll(`.${selectedClassName}`)).forEach((el) => {\n      el.classList.remove(selectedClassName);\n    });\n\n    const detailsDiv = div.querySelector(\".bx-result__details\");\n    if (!detailsDiv || detailsDiv.innerHTML === \"\") return;\n\n    div.classList.add(selectedClassName);\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport { Form } from \"../helpers/form\";\n\nexport default class extends Controller {\n  static values = {\n    url: String,\n    method: { type: String, default: \"post\" },\n    remote: { type: Boolean, default: true },\n  };\n\n  submitted = false;\n\n  submit(event) {\n    event.preventDefault();\n    if (this.submitted) return;\n\n    this.submitted = true;\n\n    const link = event.target;\n    link.disabled = true;\n\n    const data = {};\n    for (let [name, value] of Object.entries(event.params)) {\n      const snakeCaseName = name.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`);\n      data[snakeCaseName] = value;\n    }\n\n    Form[this.methodValue](this.urlValue, data, { remote: this.remoteValue });\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport { submitWithTabId } from \"../helpers/form\";\n\nexport default class extends Controller {\n  static targets = [\"role\"];\n\n  submit(event) {\n    event.preventDefault();\n    if (event.target.querySelector(\"[name='company_join_request[role]']\")) {\n      event.target.querySelector(\"[name='company_join_request[role]']\").value = this.roleTarget.value;\n    }\n    submitWithTabId(event.target);\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport debounce from \"lodash/debounce\";\n\nimport { showDialog, getDialogElem } from \"./components/ir_dialog/helper\";\n\nexport default class CompanySwitchedNoticeController extends Controller {\n  static values = {\n    updatingTabId: String,\n    newCompanyName: String,\n    oldCompanyName: String,\n  };\n\n  static show(updatingTabId, currentTabId, newCompanyName, oldCompanyName) {\n    if (updatingTabId === currentTabId) return;\n\n    const dialog = getDialogElem(\"company-switched-notice-dialog\");\n    dialog.querySelector(\"[data-identifier='old-company-name']\").textContent = `\"${oldCompanyName}\"`;\n    dialog.querySelector(\"[data-identifier='new-company-name']\").textContent = `\"${newCompanyName}\"`;\n\n    showDialog(\"company-switched-notice-dialog\");\n  }\n\n  static debouncedShow = debounce(CompanySwitchedNoticeController.show, 1000);\n\n  connect() {\n    CompanySwitchedNoticeController.debouncedShow(\n      this.updatingTabIdValue,\n      this.currentTabId,\n      this.newCompanyNameValue,\n      this.oldCompanyNameValue,\n    );\n  }\n\n  get currentTabId() {\n    return window.sessionStorage.getItem(\"tabId\");\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport * as animate from \"../../helpers/animate\";\n\nexport default class extends Controller {\n  static targets = [\"warning\"];\n\n  toggle(event) {\n    const value = event.target.value;\n\n    if (!this.hasWarningTarget) {\n      return;\n    }\n\n    if (!value || value === \"\") {\n      animate.show(this.warningTarget, { fadeIn: true });\n    } else {\n      animate.hide(this.warningTarget, { fadeOut: true });\n    }\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport { animate as anime } from \"animejs\";\nimport * as store from \"../../helpers/local-store\";\nimport { isVisible } from \"../../helpers/app\";\n\n// Handles the behavior of showing and hiding ir-alert messages.  We use\n// this mostly for displaying validation errors on the page.\nexport default class extends Controller {\n  static targets = [\"container\"];\n\n  connect() {\n    if (store.get(this.storeIdentifier)) {\n      this.containerTarget.remove();\n      return;\n    }\n\n    this.animateIn();\n  }\n\n  animateIn() {\n    if (!isVisible(this.containerTarget)) return;\n\n    this.containerTarget.style.display = \"block\";\n    this.containerTarget.style.opacity = 0;\n\n    anime(this.containerTarget, {\n      opacity: 1,\n      top: [0, 2],\n      ease: \"outQuad\",\n      duration: 500,\n    });\n  }\n\n  animateOut(timing = 200) {\n    anime(this.containerTarget, {\n      opacity: 0,\n      top: [2, 0],\n      ease: \"inQuad\",\n      duration: timing,\n      onComplete: () => {\n        this.afterAnimatedOut();\n      },\n    });\n  }\n\n  close(event) {\n    event.preventDefault();\n\n    if (this.rememberClose) store.set(this.storeIdentifier, true);\n\n    this.animateOut();\n  }\n\n  get rememberClose() {\n    return this.containerTarget.dataset.rememberClose !== undefined;\n  }\n\n  get storeIdentifier() {\n    return `ir-alert-closed-${this.containerTarget.dataset.identifier}`;\n  }\n\n  afterAnimatedOut() {\n    this.containerTarget.classList.add(\"d-none\");\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\n\nexport default class IrAutoGrowTextAreaController extends Controller {\n  static targets = [\"input\"];\n\n  connect() {\n    this.inputTarget.style.resize = \"none\";\n    if (this.inputTarget.value !== \"\") this.inputTarget.style.height = `${this.inputTarget.scrollHeight}px`;\n    this.inputTarget.style.overflow = \"hidden\";\n  }\n\n  resize(event) {\n    event.target.style.height = `${event.target.scrollHeight}px`;\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\n\nexport default class extends Controller {\n  spin(_event) {\n    this.element.classList.add(\"ir-btn--spinner-shown\");\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport Siema from \"siema\";\nimport { v4 as uuid } from \"uuid\";\n\nexport default class extends Controller {\n  static targets = [\"carousel\", \"pageLink\"];\n\n  connect() {\n    if (this.isAlreadyConnected) return;\n\n    this.addIdentifierToCarousel();\n\n    this.initialized = false;\n    this.element.controller = this;\n\n    // We use this inside of introduction dialogs.  We need to give the dialog some\n    // time to load, and then get moved to a new place in the DOM before initializing\n    // otherwise Siema seems to intermittently come to the conclusion the width of the\n    // content area is 0.\n    setTimeout(() => {\n      // If the element isn't visible, then we need to defer initializing Siema.  If we\n      // don't Siema will compute the necessary width it needs to zero.\n      const isVisible = this.element.offsetParent !== null;\n      if (isVisible) this.initSiema();\n    }, 300);\n  }\n\n  get isAlreadyConnected() {\n    return this.carouselTarget.dataset.identifier !== undefined;\n  }\n\n  addIdentifierToCarousel() {\n    this.uuid = uuid();\n    this.carouselTarget.dataset.identifier = this.uuid;\n  }\n\n  initSiema() {\n    if (this.initialized) return;\n\n    this.siema = new Siema({\n      selector: `[data-identifier='${this.uuid}']`,\n      onChange: this.onChange.bind(this),\n      loop: true,\n    });\n\n    this.initialized = true;\n  }\n\n  onChange = () => {\n    const currentPage = this.siema.currentSlide + 1;\n    this.pageLinkTargets.forEach((pageLink) => {\n      const li = pageLink.closest(\"li\");\n      const linkPage = Number.parseInt(pageLink.dataset.page);\n      const meth = linkPage === currentPage ? \"add\" : \"remove\";\n      li.classList[meth](\"active\");\n    });\n  };\n\n  goTo(event) {\n    event.preventDefault();\n    const link = event.currentTarget;\n    const index = Number.parseInt(link.dataset.page) - 1;\n    this.siema.goTo(index);\n  }\n\n  next(event) {\n    event.preventDefault();\n    this.siema.next();\n  }\n\n  prev(event) {\n    event.preventDefault();\n    this.siema.prev();\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport { showFlashMessage } from \"../../helpers/app\";\nimport * as animate from \"../../helpers/animate\";\n\nexport default class extends Controller {\n  static targets = [\"copyIcon\", \"checkIcon\"];\n\n  static values = {\n    // This is optional. If you don't supply it, just the clipboard value will be\n    // copied. If supplied, it should be a string with %s at the location you'd like\n    // the copied value to be placed. For example:\n    // mapController.mapManager.highlightSegment(\u201C%s\u201D)\n    formatString: String,\n  };\n\n  copy(event) {\n    event.preventDefault();\n\n    let clipboardValue = event.params.value;\n\n    if (this.#hasCheckAndCopyIcons) {\n      animate.hide(this.copyIconTarget, { fadeOut: false });\n      animate.show(this.checkIconTarget, { display: \"inline-block\" });\n\n      setTimeout(() => {\n        animate.show(this.copyIconTarget, { display: \"inline-block\" });\n        animate.hide(this.checkIconTarget, { fadeOut: false });\n      }, 500);\n    }\n\n    if (this.hasFormatStringValue) {\n      clipboardValue = this.formatStringValue.replace(\"%s\", clipboardValue);\n    }\n\n    navigator.clipboard.writeText(clipboardValue);\n\n    showFlashMessage({ message: \"Copied to clipboard\", flashType: \"success\" });\n  }\n\n  get #hasCheckAndCopyIcons() {\n    return this.hasCopyIconTarget && this.hasCheckIconTarget;\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\n\nconst IN_TO_MM_CONVERSION_FACTOR = 25.4;\nconst KG_TO_LB_CONVERSION_FACTOR = 2.205;\n\nexport default class extends Controller {\n  static targets = [\"display\"];\n\n  conversions = {\n    millimetersToInches: {\n      converter: (v) => (v / IN_TO_MM_CONVERSION_FACTOR).toFixed(2),\n      toMeasurementAbbr: '\"',\n      toMeasurementSystem: \"imperial\",\n    },\n    kilogramsToPounds: {\n      converter: (v) => (v * KG_TO_LB_CONVERSION_FACTOR).toFixed(2),\n      toMeasurementAbbr: \" lbs\",\n      toMeasurementSystem: \"imperial\",\n    },\n  };\n\n  convert(event) {\n    const field = event.currentTarget;\n    const value = field.value;\n    const conversionType = field.dataset.conversionType;\n    const allowedConversions = Object.keys(this.conversions);\n    if (!allowedConversions.includes(conversionType)) {\n      throw `The conversion type \\\"${conversionType}\\\" was not recognized.\n        The available types are: ${allowedConversions.join(\",\")}`;\n    }\n\n    this.displayTarget.innerHTML = this.convertedDisplayValue(value, conversionType);\n  }\n\n  convertedDisplayValue(value, conversionType) {\n    const { converter, toMeasurementAbbr, toMeasurementSystem } = this.conversions[conversionType];\n\n    if (!isFinite(value)) return `${toMeasurementSystem}: ?`;\n\n    return `${toMeasurementSystem}: ${converter(value)}${toMeasurementAbbr}`;\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport React from \"react\";\nimport { createRoot } from \"react-dom/client\";\nimport CountdownTimer from \"../../components/CountdownTimer\";\n\nexport default class extends Controller {\n  connect() {\n    if (!this.root) {\n      this.root = createRoot(this.element);\n    }\n    this.root.render(<CountdownTimer untilDateString={this.element.dataset.untilDateString} />);\n  }\n\n  disconnect() {\n    if (this.root) {\n      this.root.unmount();\n      this.root = null;\n    }\n  }\n}\n", "import React, { Component } from \"react\";\nimport PropTypes from \"prop-types\";\nimport * as timePieces from \"../../helpers/time-pieces\";\nimport moment from \"moment\";\n\nconst CountdownSection = ({ value, label }) => {\n  return (\n    <div className=\"countdown-timer__part\">\n      <div className=\"countdown-timer__part__value\" data-testid={`${value}-${label}`}>\n        {value}\n      </div>\n      <div className=\"countdown-timer__part__label\">{label}</div>\n    </div>\n  );\n};\n\nclass CountdownTimer extends Component {\n  static propTypes = {\n    untilDateString: PropTypes.string.isRequired,\n  };\n\n  constructor(props) {\n    super(props);\n\n    this.state = {\n      dateUntil: moment.parseZone(props.untilDateString),\n      years: 0,\n      months: 0,\n      days: 0,\n      hours: 0,\n      minutes: 0,\n      seconds: 0,\n    };\n  }\n\n  componentDidMount() {\n    this.setTimeParts();\n    setInterval(() => {\n      this.setTimeParts();\n    }, 1000);\n  }\n\n  setTimeParts() {\n    const duration = timePieces.until(this.state.dateUntil);\n    this.setState({\n      years: duration.years,\n      months: duration.months,\n      days: duration.days,\n      hours: duration.hours,\n      minutes: duration.minutes,\n      seconds: duration.seconds,\n    });\n  }\n\n  render() {\n    const { years, months, days, hours, minutes, seconds } = this.state;\n\n    return (\n      <div className=\"countdown-timer__container\">\n        {years > 0 && <CountdownSection label=\"years\" value={years} />}\n        {(years > 0 || months > 0) && <CountdownSection label=\"months\" value={months} />}\n        <CountdownSection label=\"days\" value={days} />\n        <CountdownSection label=\"hours\" value={hours} />\n        <CountdownSection label=\"minutes\" value={minutes} />\n        <CountdownSection label=\"seconds\" value={seconds} />\n      </div>\n    );\n  }\n}\n\nexport default CountdownTimer;\n", "import moment from \"moment\";\n\nexport const diff = (start, end) => {\n  start = moment(start);\n  end = moment(end);\n  const duration = moment.duration(end.diff(start));\n  return {\n    years: duration.get(\"years\"),\n    months: duration.get(\"months\"),\n    days: duration.get(\"days\"),\n    hours: duration.get(\"hours\"),\n    minutes: duration.get(\"minutes\"),\n    seconds: duration.get(\"seconds\"),\n    milliseconds: duration.get(\"milliseconds\"),\n  };\n};\n\nexport const until = (end) => {\n  if (moment().isAfter(end)) {\n    return {\n      years: 0,\n      months: 0,\n      days: 0,\n      hours: 0,\n      minutes: 0,\n      seconds: 0,\n      milliseconds: 0,\n    };\n  }\n  return diff(new Date(), end);\n};\n", "import { Controller } from \"@hotwired/stimulus\";\nimport { showDialog, hideDialog, zIndexForDialog } from \"./helper\";\nimport { elementInfo, logger } from \"../../../helpers/app\";\nimport { sentryException } from \"../../../config/sentry\";\n\nconst escape = 27;\n\nexport default class extends Controller {\n  static targets = [\"dialog\"];\n  static values = { autoCloseIfConfirmed: Boolean };\n\n  connect() {\n    if (!this.hasDialogTarget) return;\n\n    this.opts = this.dialogTarget.dataset;\n    this.setModalWidth();\n    this.showDialog();\n    this.#moveDialogContainer();\n    this.dialogIdentifier = this.dialogTarget.dataset.dialogIdentifier;\n\n    // Focus the primary confirm button (if present) so Enter activates Okay\n    // instead of re-triggering the underlying form's implicit submit, which\n    // would stack another confirmation dialog on top. Done here (not in\n    // confirmDialog) because #moveDialogContainer above re-appends the\n    // dialog and would clear any focus set earlier.\n    this.dialogTarget\n      .querySelector('[data-action~=\"components--ir-dialog--base#confirmYes\"]')\n      ?.focus({ preventScroll: true });\n\n    if (this.opts.dialogEscapeCloses) {\n      document.addEventListener(\"keyup\", this.keyUpHandler);\n    }\n  }\n\n  disconnect() {\n    this.dragRemoveDocumentEvents();\n    if (this.opts.dialogEscapeCloses) {\n      document.removeEventListener(\"keyup\", this.keyUpHandler);\n    }\n  }\n\n  setModalWidth() {\n    const width = this.opts.dialogWidth;\n    if (width) {\n      this.dialogTarget.style.width = `${width}px`;\n    }\n  }\n\n  isTrue(value) {\n    return value && value.toString() === \"true\";\n  }\n\n  showDialog() {\n    if (this.isTrue(this.opts.dialogAutoOpen)) {\n      const ignoreScroll = this.isTrue(this.opts.dialogIgnoreScroll);\n      showDialog(this.dialogTarget, () => {}, { ignoreScroll });\n    }\n  }\n\n  close(event) {\n    event.preventDefault();\n    this.closeWithEventDefault();\n  }\n\n  closeWithEventDefault(_) {\n    if (this.hasDialogTarget) {\n      hideDialog(this.dialogTarget);\n      if (this.dialogTarget.focusOnClose) this.dialogTarget.focusOnClose.focus();\n    } else {\n      const message = `[Handled Error] Missing dialog in closeWithEventDefault: ${this.dialogIdentifier}.`;\n      logger(message);\n      sentryException(message);\n    }\n  }\n\n  keyUpHandler = (event) => {\n    if (event.key !== \"Escape\" || (this.hasDialogTarget && !this.dialogIsVisible)) return;\n    if (this.isTrue(this.opts.closable)) this.closeWithEventDefault();\n  };\n\n  get dialogIsVisible() {\n    return this.dialogTarget.offsetParent !== null;\n  }\n\n  dragMouseDown(event) {\n    this.dragCurrentX = event.clientX;\n    this.dragCurrentY = event.clientY;\n\n    // Override the default positioning based on percentages and remove the default translateX transform\n    const { left, top } = elementInfo(this.dialogTarget);\n    this.dialogTarget.style.left = `${left}px`;\n    this.dialogTarget.style.top = `${top}px`;\n    this.dialogTarget.style.transform = \"none\";\n\n    this.dialogTarget.style.zIndex = zIndexForDialog(this.dialogTarget);\n\n    this.dragAddDocumentEvents();\n  }\n\n  clickAndBringToTop(_event) {\n    this.dialogTarget.style.zIndex = zIndexForDialog(this.dialogTarget);\n  }\n\n  dragAddDocumentEvents() {\n    document.addEventListener(\"mousemove\", this.dragMouseMove);\n    document.addEventListener(\"mouseup\", this.dragMouseUp);\n  }\n\n  dragMouseMove = (event) => {\n    const deltaX = event.clientX - this.dragCurrentX;\n    const deltaY = event.clientY - this.dragCurrentY;\n\n    const { left, top } = elementInfo(this.dialogTarget);\n    this.dialogTarget.style.left = `${left + deltaX}px`;\n    this.dialogTarget.style.top = `${top + deltaY}px`;\n\n    this.dragCurrentX = event.clientX;\n    this.dragCurrentY = event.clientY;\n  };\n\n  dragMouseUp = (_event) => {\n    this.dragRemoveDocumentEvents();\n  };\n\n  dragRemoveDocumentEvents() {\n    document.removeEventListener(\"mousemove\", this.dragMouseMove);\n    document.removeEventListener(\"mouseup\", this.dragMouseUp);\n  }\n\n  confirmYes(event) {\n    const button = event.currentTarget;\n\n    if (!button.classList.contains(\"ir-btn--spinner-shown\")) {\n      button.classList.add(\"ir-btn--spinner-shown\");\n      button.classList.add(\"btn--disabled\");\n      button.disabled = true;\n    }\n\n    setTimeout(() => this.callConfirmCallback(true, this.autoCloseIfConfirmedValue), 250);\n  }\n\n  confirmNo(_event) {\n    this.callConfirmCallback(false, true);\n  }\n\n  callConfirmCallback(confirmed, shouldHideDialog) {\n    const callback = this.dialogTarget.confirmCallback;\n    if (callback === undefined) {\n      throw new Error(\"Expected a confirmCallback to be assigned on this dialog\");\n    }\n    if (shouldHideDialog) {\n      hideDialog(this.dialogTarget);\n    }\n    callback(confirmed);\n  }\n\n  get #dialogsContainer() {\n    let dialogsContainer = document.querySelector(\".dialogs-container\");\n\n    if (!dialogsContainer) {\n      dialogsContainer = document.createElement(\"div\");\n      dialogsContainer.classList.add(\"dialogs-container\");\n      document.body.appendChild(dialogsContainer);\n    }\n\n    return dialogsContainer;\n  }\n\n  #moveDialogContainer() {\n    const dialogsContainer = this.#dialogsContainer;\n    if (this.element.parentNode == dialogsContainer) return;\n\n    const dialogIdentifier = this.dialogTarget.dataset.dialogIdentifier;\n    const oldDialog = dialogsContainer.querySelector(`[data-dialog-identifier=\"${dialogIdentifier}\"]`);\n\n    if (oldDialog) {\n      logger(`Removing old dialog for ${dialogIdentifier}`);\n      const oldDialogContainer = oldDialog.parentNode;\n      dialogsContainer.removeChild(oldDialogContainer);\n    }\n\n    this.element.parentNode.removeChild(this.element);\n    dialogsContainer.appendChild(this.element);\n  }\n}\n", "import { sentryException } from \"../config/sentry\";\n\n// Executes a `text/javascript` response body (our .js.erb templates) the way\n// rails-ujs does, instead of window.eval: eval is blocked by our CSP's\n// script-src, an appended <script> is not.\n//\n// The Content-Type check mirrors rails-ujs's. Without it, any same-origin\n// endpoint that echoes text back \u2014 a JSON API, a text/plain body, a Rails\n// error page \u2014 is a way to get a string executed on the page, which widens\n// the injected-markup attack surface this helper sits behind.\nexport async function runScriptResponse(response) {\n  const contentType = response.headers.get(\"Content-Type\") || \"\";\n  if (!/\\b(?:java|ecma)script\\b/.test(contentType)) {\n    // Loud rather than silent: a non-script response here means the endpoint\n    // is broken, and swallowing it hides that.\n    sentryException(`Refused to run a \"${contentType}\" response from ${response.url} as JavaScript`);\n    return;\n  }\n\n  const nonce = document.querySelector(\"meta[name=csp-nonce]\")?.content;\n\n  const script = document.createElement(\"script\");\n  // Redundant under 'strict-dynamic' (this script is already trusted, so the\n  // one it appends inherits that trust), but keeps the injection working if\n  // the policy ever drops strict-dynamic for a plain nonce allowlist.\n  if (nonce) script.setAttribute(\"nonce\", nonce);\n  script.text = await response.text();\n\n  document.head.appendChild(script).remove();\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport { confirmDialog } from \"./helper\";\nimport * as request from \"@rails/request.js\";\nimport { Form, submitWithTabId } from \"../../../helpers/form\";\nimport { runScriptResponse } from \"../../../helpers/run-script\";\nimport { Turbo } from \"@hotwired/turbo-rails\";\n\nexport default class ConfirmationController extends Controller {\n  static values = {\n    url: String,\n    urlMethod: { type: String, default: \"get\" },\n    responseKind: { type: String, default: \"html\" }, // can also be \"js\" or \"turbo_stream\"\n    color: { type: String, default: \"orange\" },\n    title: { type: String, default: \"Confirmation\" },\n    message: { type: String, default: \"Are you sure?\" },\n    useEventClickPosition: { type: Boolean, default: true },\n  };\n\n  static targets = [\"form\"];\n\n  open(event) {\n    event.preventDefault();\n\n    const callback = (confirmed) => {\n      if (!confirmed) return;\n\n      const url = this.urlValue;\n      const method = this.urlMethodValue;\n      const tabId = window.sessionStorage.getItem(\"tabId\");\n\n      if (this.hasFormTarget) {\n        if (this.responseKindValue === \"turbo_stream\") {\n          let formData = new FormData(this.formTarget);\n          formData.append(\"request_format\", \"turbo_stream\");\n\n          fetch(this.formTarget.action, {\n            method: \"POST\",\n            body: formData,\n            headers: {\n              Accept: \"text/vnd.turbo-stream.html\",\n              \"X-CSRF-Token\": document.querySelector(\"[name='csrf-token']\").content,\n              \"X-Tab-Id\": tabId,\n            },\n            credentials: \"same-origin\",\n          })\n            .then((response) => response.text())\n            .then((html) => {\n              Turbo.renderStreamMessage(html);\n            });\n        } else if (this.responseKindValue === \"js\") {\n          const body = new FormData(this.formTarget);\n\n          fetch(this.formTarget.action, {\n            method: \"POST\",\n            body,\n            headers: {\n              Accept: \"text/javascript\",\n              \"X-Requested-With\": \"XMLHttpRequest\",\n              \"X-CSRF-Token\": document.querySelector(\"[name='csrf-token']\").content,\n              \"X-Tab-Id\": tabId,\n            },\n            credentials: \"same-origin\",\n          }).then(runScriptResponse);\n        } else {\n          submitWithTabId(this.formTarget);\n        }\n      } else if (this.responseKindValue === \"html\") {\n        Form[method](url);\n      } else {\n        request[method](url, { responseKind: this.responseKindValue, headers: { \"X-Tab-Id\": tabId } });\n      }\n    };\n\n    const clickPosition = this.useEventClickPositionValue ? { x: event.pageX, y: event.pageY } : undefined;\n    confirmDialog(this.messageValue, callback, {\n      title: this.titleValue,\n      confirmBtnColor: this.colorValue,\n      headerColor: this.colorValue,\n      showNearClickPosition: this.useEventClickPositionValue,\n      clickPosition,\n    });\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport { hideDialog } from \"./helper\";\nimport * as animate from \"../../../helpers/animate\";\n\nexport default class extends Controller {\n  static targets = [\"overlay\"];\n\n  hideModalDialogs() {\n    const dialogs = document.querySelectorAll(\".ir-dialog--modal\");\n\n    const dialogsArr = Array.from(dialogs).filter((d) => {\n      return d.dataset.dialogModal === \"true\" && d.style.display === \"block\";\n    });\n    const anyNonClosable = dialogsArr.some((dialog) => dialog.dataset.closable === \"false\");\n    if (anyNonClosable) return;\n\n    dialogsArr.forEach((dialog) => hideDialog(dialog));\n  }\n}\n", "'use strict';\n\n/**\n * Create a bound version of a function with a specified `this` context\n *\n * @param {Function} fn - The function to bind\n * @param {*} thisArg - The value to be passed as the `this` parameter\n * @returns {Function} A new function that will call the original function with the specified `this` context\n */\nexport default function bind(fn, thisArg) {\n  return function wrap() {\n    return fn.apply(thisArg, arguments);\n  };\n}\n", "'use strict';\n\nimport bind from './helpers/bind.js';\n\n// utils is a library of generic helper functions non-specific to axios\n\nconst { toString } = Object.prototype;\nconst { getPrototypeOf } = Object;\nconst { iterator, toStringTag } = Symbol;\n\n/* Creating a function that will check if an object has a property. */\nconst hasOwnProperty = (\n  ({ hasOwnProperty }) =>\n  (obj, prop) =>\n    hasOwnProperty.call(obj, prop)\n)(Object.prototype);\n\nconst isUnsafeObjectKey = (prop) =>\n  typeof prop === 'string' &&\n  (prop === '__proto__' || prop === 'constructor' || prop === 'prototype');\n\n/**\n * Determine whether an inherited object must be treated as a shared-prototype\n * boundary. Cross-realm Object.prototype objects cannot be distinguished\n * reliably from application-created null-prototype objects because their\n * properties are mutable, so all inherited terminal prototypes are excluded\n * as a fail-closed boundary. A null-prototype source still keeps its own\n * properties, as produced by mergeConfig and other safe materialization paths.\n *\n * @param {*} obj The object to inspect\n * @param {*} prototype The object's prototype\n * @param {boolean} source Whether obj is the original traversal source\n *\n * @returns {boolean} True when obj is a safe prototype traversal boundary\n */\nconst isPrototypeBoundary = (obj, prototype, source) =>\n  obj === Object.prototype || (!source && prototype === null);\n\n/**\n * Determine whether an object can retain its identity through code paths that\n * add, replace, and remove config properties without bypassing unsafe-key\n * filtering. Immutable objects, unsafe-key-bearing objects, and objects with\n * accessor or restricted data properties must be materialized instead.\n *\n * @param {*} obj The object to inspect\n *\n * @returns {boolean} True when every own property is safe and fully mutable\n */\nconst isSafeAndFullyMutable = (obj) => {\n  if (!Object.isExtensible(obj)) {\n    return false;\n  }\n\n  const props = Object.getOwnPropertyNames(obj);\n\n  if (Object.getOwnPropertySymbols) {\n    props.push(...Object.getOwnPropertySymbols(obj));\n  }\n\n  return props.every((prop) => {\n    if (isUnsafeObjectKey(prop)) {\n      return false;\n    }\n\n    const descriptor = Object.getOwnPropertyDescriptor(obj, prop);\n\n    return !!descriptor && descriptor.configurable && descriptor.writable === true;\n  });\n};\n\n/**\n * Walk the prototype chain (excluding the source realm's Object.prototype)\n * looking for an own `prop`. This distinguishes genuine own/inherited members\n * \u2014 including class accessors and template prototypes \u2014 from members injected\n * via Object.prototype pollution (e.g. `Object.prototype.username = '...'`),\n * which live on Object.prototype itself and are therefore never matched.\n *\n * @param {*} thing The value whose chain to inspect\n * @param {string|symbol} prop The property key to look for\n *\n * @returns {boolean} True when `prop` is owned below Object.prototype\n */\nconst hasOwnInPrototypeChain = (thing, prop) => {\n  let obj = thing;\n  const seen = [];\n\n  while (obj != null) {\n    if (seen.indexOf(obj) !== -1) {\n      return false;\n    }\n    seen.push(obj);\n\n    const prototype = getPrototypeOf(obj);\n\n    if (isPrototypeBoundary(obj, prototype, obj === thing)) {\n      return false;\n    }\n\n    if (hasOwnProperty(obj, prop)) {\n      return true;\n    }\n    obj = prototype;\n  }\n  return false;\n};\n\n/**\n * Read `obj[prop]` only when it is safe from Object.prototype pollution. Own\n * properties and members inherited from a non-Object.prototype source (a class\n * instance or template object) are honored; a value reachable only through a\n * polluted Object.prototype is ignored and `undefined` is returned.\n *\n * @param {*} obj The source object\n * @param {string|symbol} prop The property key to read\n *\n * @returns {*} The resolved value, or undefined when unsafe/absent\n */\nconst getSafeProp = (obj, prop) =>\n  obj != null && hasOwnInPrototypeChain(obj, prop) ? obj[prop] : undefined;\n\n/**\n * Flatten an object and its application-defined prototype chain into a\n * null-prototype object. Members inherited only from the source realm's\n * Object.prototype are deliberately excluded, while class/template members\n * below that boundary are preserved.\n *\n * @param {*} thing The value to flatten\n *\n * @returns {*} A null-prototype copy, or the original value when it is already\n * structurally safe or is not an object\n */\nconst toSafeFlatObject = (thing) => {\n  if (thing == null || (typeof thing !== 'object' && typeof thing !== 'function')) {\n    return thing;\n  }\n\n  const sourcePrototype = getPrototypeOf(thing);\n\n  if (sourcePrototype === null && isSafeAndFullyMutable(thing)) {\n    return thing;\n  }\n\n  const result = Object.create(null);\n  const merged = Object.create(null);\n  const seen = [];\n  let current = thing;\n\n  while (current != null) {\n    if (seen.indexOf(current) !== -1) {\n      break;\n    }\n\n    seen.push(current);\n\n    const prototype = current === thing ? sourcePrototype : getPrototypeOf(current);\n\n    if (isPrototypeBoundary(current, prototype, current === thing)) {\n      break;\n    }\n\n    const props = Object.getOwnPropertyNames(current);\n\n    if (Object.getOwnPropertySymbols) {\n      props.push(...Object.getOwnPropertySymbols(current));\n    }\n\n    for (const prop of props) {\n      if (isUnsafeObjectKey(prop)) {\n        continue;\n      }\n\n      if (!hasOwnProperty(merged, prop)) {\n        result[prop] = thing[prop];\n        merged[prop] = true;\n      }\n    }\n\n    current = prototype;\n  }\n\n  return result;\n};\n\nconst kindOf = ((cache) => (thing) => {\n  const str = toString.call(thing);\n  return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n})(Object.create(null));\n\nconst kindOfTest = (type) => {\n  type = type.toLowerCase();\n  return (thing) => kindOf(thing) === type;\n};\n\nconst typeOfTest = (type) => (thing) => typeof thing === type;\n\n/**\n * Determine if a value is a non-null object\n *\n * @param {Object} val The value to test\n *\n * @returns {boolean} True if value is an Array, otherwise false\n */\nconst { isArray } = Array;\n\n/**\n * Determine if a value is undefined\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nconst isUndefined = typeOfTest('undefined');\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n  return (\n    val !== null &&\n    !isUndefined(val) &&\n    val.constructor !== null &&\n    !isUndefined(val.constructor) &&\n    isFunction(val.constructor.isBuffer) &&\n    val.constructor.isBuffer(val)\n  );\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nconst isArrayBuffer = kindOfTest('ArrayBuffer');\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n  let result;\n  if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView) {\n    result = ArrayBuffer.isView(val);\n  } else {\n    result = val && val.buffer && isArrayBuffer(val.buffer);\n  }\n  return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a String, otherwise false\n */\nconst isString = typeOfTest('string');\n\n/**\n * Determine if a value is a Function\n *\n * @param {*} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nconst isFunction = typeOfTest('function');\n\n/**\n * Determine if a value is a Number\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Number, otherwise false\n */\nconst isNumber = typeOfTest('number');\n\n/**\n * Determine if a value is an Object\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an Object, otherwise false\n */\nconst isObject = (thing) => thing !== null && typeof thing === 'object';\n\n/**\n * Determine if a value is a Boolean\n *\n * @param {*} thing The value to test\n * @returns {boolean} True if value is a Boolean, otherwise false\n */\nconst isBoolean = (thing) => thing === true || thing === false;\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a plain Object, otherwise false\n */\nconst isPlainObject = (val) => {\n  if (!isObject(val)) {\n    return false;\n  }\n\n  const prototype = getPrototypeOf(val);\n  return (\n    (prototype === null || prototype === Object.prototype || getPrototypeOf(prototype) === null) &&\n    // Treat safe own/inherited Symbol.toStringTag or Symbol.iterator members as\n    // evidence the value is tagged/iterable, while ignoring members reachable\n    // only through shared or terminal prototype boundaries.\n    !hasOwnInPrototypeChain(val, toStringTag) &&\n    !hasOwnInPrototypeChain(val, iterator)\n  );\n};\n\n/**\n * Determine if a value is an empty object (safely handles Buffers)\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an empty object, otherwise false\n */\nconst isEmptyObject = (val) => {\n  // Early return for non-objects or Buffers to prevent RangeError\n  if (!isObject(val) || isBuffer(val)) {\n    return false;\n  }\n\n  try {\n    return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype;\n  } catch (e) {\n    // Fallback for any other objects that might cause RangeError with Object.keys()\n    return false;\n  }\n};\n\n/**\n * Determine if a value is a Date\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Date, otherwise false\n */\nconst isDate = kindOfTest('Date');\n\n/**\n * Determine if a value is a File\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFile = kindOfTest('File');\n\n/**\n * Determine if a value is a React Native Blob\n * React Native \"blob\": an object with a `uri` attribute. Optionally, it can\n * also have a `name` and `type` attribute to specify filename and content type\n *\n * @see https://github.com/facebook/react-native/blob/26684cf3adf4094eb6c405d345a75bf8c7c0bf88/Libraries/Network/FormData.js#L68-L71\n *\n * @param {*} value The value to test\n *\n * @returns {boolean} True if value is a React Native Blob, otherwise false\n */\nconst isReactNativeBlob = (value) => {\n  return !!(value && typeof value.uri !== 'undefined');\n};\n\n/**\n * Determine if environment is React Native\n * ReactNative `FormData` has a non-standard `getParts()` method\n *\n * @param {*} formData The formData to test\n *\n * @returns {boolean} True if environment is React Native, otherwise false\n */\nconst isReactNative = (formData) => formData && typeof formData.getParts !== 'undefined';\n\n/**\n * Determine if a value is a Blob\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nconst isBlob = kindOfTest('Blob');\n\n/**\n * Determine if a value is a FileList\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a FileList, otherwise false\n */\nconst isFileList = kindOfTest('FileList');\nconst isSet = kindOfTest('Set');\n\n/**\n * Determine if a value is a Stream\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nconst isStream = (val) => isObject(val) && isFunction(val.pipe);\n\n/**\n * Determine if a value is a FormData\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nfunction getGlobal() {\n  if (typeof globalThis !== 'undefined') return globalThis;\n  if (typeof self !== 'undefined') return self;\n  if (typeof window !== 'undefined') return window;\n  if (typeof global !== 'undefined') return global;\n  return {};\n}\n\nconst G = getGlobal();\nconst FormDataCtor = typeof G.FormData !== 'undefined' ? G.FormData : undefined;\n\nconst isFormData = (thing) => {\n  if (!thing) return false;\n  if (FormDataCtor && thing instanceof FormDataCtor) return true;\n  // Reject plain objects inheriting directly from Object.prototype so prototype-pollution gadgets can't spoof FormData.\n  const proto = getPrototypeOf(thing);\n  if (!proto || proto === Object.prototype) return false;\n  if (!isFunction(thing.append)) return false;\n  const kind = kindOf(thing);\n  return (\n    kind === 'formdata' ||\n    // detect form-data instance\n    (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')\n  );\n};\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nconst isURLSearchParams = kindOfTest('URLSearchParams');\n\nconst [isReadableStream, isRequest, isResponse, isHeaders] = [\n  'ReadableStream',\n  'Request',\n  'Response',\n  'Headers',\n].map(kindOfTest);\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n *\n * @returns {String} The String freed of excess whitespace\n */\nconst trim = (str) => {\n  return str.trim ? str.trim() : str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n};\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array<unknown>} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n *\n * @param {Object} [options]\n * @param {Boolean} [options.allOwnKeys = false]\n * @returns {any}\n */\nfunction forEach(obj, fn, { allOwnKeys = false } = {}) {\n  // Don't bother if no value provided\n  if (obj === null || typeof obj === 'undefined') {\n    return;\n  }\n\n  let i;\n  let l;\n\n  // Force an array if not already something iterable\n  if (typeof obj !== 'object') {\n    /*eslint no-param-reassign:0*/\n    obj = [obj];\n  }\n\n  if (isArray(obj)) {\n    // Iterate over array values\n    for (i = 0, l = obj.length; i < l; i++) {\n      fn.call(null, obj[i], i, obj);\n    }\n  } else {\n    // Buffer check\n    if (isBuffer(obj)) {\n      return;\n    }\n\n    // Iterate over object keys\n    const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);\n    const len = keys.length;\n    let key;\n\n    for (i = 0; i < len; i++) {\n      key = keys[i];\n      fn.call(null, obj[key], key, obj);\n    }\n  }\n}\n\n/**\n * Finds a key in an object, case-insensitive, returning the actual key name.\n * Returns null if the object is a Buffer or if no match is found.\n *\n * @param {Object} obj - The object to search.\n * @param {string} key - The key to find (case-insensitive).\n * @returns {?string} The actual key name if found, otherwise null.\n */\nfunction findKey(obj, key) {\n  if (isBuffer(obj)) {\n    return null;\n  }\n\n  key = key.toLowerCase();\n  const keys = Object.keys(obj);\n  let i = keys.length;\n  let _key;\n  while (i-- > 0) {\n    _key = keys[i];\n    if (key === _key.toLowerCase()) {\n      return _key;\n    }\n  }\n  return null;\n}\n\nconst _global = (() => {\n  /*eslint no-undef:0*/\n  if (typeof globalThis !== 'undefined') return globalThis;\n  return typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : global;\n})();\n\nconst isContextDefined = (context) => !isUndefined(context) && context !== _global;\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * const result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n *\n * @returns {Object} Result of all merge properties\n */\nfunction merge(...objs) {\n  const { caseless, skipUndefined } = (isContextDefined(this) && this) || {};\n  const result = {};\n  const assignValue = (val, key) => {\n    // Skip dangerous property names to prevent prototype pollution\n    if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n      return;\n    }\n\n    // findKey lowercases the key, so caseless lookup only applies to strings \u2014\n    // symbol keys are identity-matched.\n    const targetKey = (caseless && typeof key === 'string' && findKey(result, key)) || key;\n    // Read via own-prop only \u2014 a bare `result[targetKey]` walks the prototype\n    // chain, so a polluted Object.prototype value could surface here and get\n    // copied into the merged result.\n    const existing = hasOwnProperty(result, targetKey) ? result[targetKey] : undefined;\n    if (isPlainObject(existing) && isPlainObject(val)) {\n      result[targetKey] = merge(existing, val);\n    } else if (isPlainObject(val)) {\n      result[targetKey] = merge({}, val);\n    } else if (isArray(val)) {\n      result[targetKey] = val.slice();\n    } else if (!skipUndefined || !isUndefined(val)) {\n      result[targetKey] = val;\n    }\n  };\n\n  for (let i = 0, l = objs.length; i < l; i++) {\n    const source = objs[i];\n    if (!source || isBuffer(source)) {\n      continue;\n    }\n\n    forEach(source, assignValue);\n\n    if (typeof source !== 'object' || isArray(source)) {\n      continue;\n    }\n\n    const symbols = Object.getOwnPropertySymbols(source);\n    for (let j = 0; j < symbols.length; j++) {\n      const symbol = symbols[j];\n      if (propertyIsEnumerable.call(source, symbol)) {\n        assignValue(source[symbol], symbol);\n      }\n    }\n  }\n  return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n *\n * @param {Object} [options]\n * @param {Boolean} [options.allOwnKeys]\n * @returns {Object} The resulting value of object a\n */\nconst extend = (a, b, thisArg, { allOwnKeys } = {}) => {\n  forEach(\n    b,\n    (val, key) => {\n      if (thisArg && isFunction(val)) {\n        Object.defineProperty(a, key, {\n          // Null-proto descriptor so a polluted Object.prototype.get cannot\n          // hijack defineProperty's accessor-vs-data resolution.\n          __proto__: null,\n          value: bind(val, thisArg),\n          writable: true,\n          enumerable: true,\n          configurable: true,\n        });\n      } else {\n        Object.defineProperty(a, key, {\n          __proto__: null,\n          value: val,\n          writable: true,\n          enumerable: true,\n          configurable: true,\n        });\n      }\n    },\n    { allOwnKeys }\n  );\n  return a;\n};\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n *\n * @returns {string} content value without BOM\n */\nconst stripBOM = (content) => {\n  if (content.charCodeAt(0) === 0xfeff) {\n    content = content.slice(1);\n  }\n  return content;\n};\n\n/**\n * Inherit the prototype methods from one constructor into another\n * @param {function} constructor\n * @param {function} superConstructor\n * @param {object} [props]\n * @param {object} [descriptors]\n *\n * @returns {void}\n */\nconst inherits = (constructor, superConstructor, props, descriptors) => {\n  constructor.prototype = Object.create(superConstructor.prototype, descriptors);\n  Object.defineProperty(constructor.prototype, 'constructor', {\n    __proto__: null,\n    value: constructor,\n    writable: true,\n    enumerable: false,\n    configurable: true,\n  });\n  Object.defineProperty(constructor, 'super', {\n    __proto__: null,\n    value: superConstructor.prototype,\n  });\n  props && Object.assign(constructor.prototype, props);\n};\n\n/**\n * Resolve object with deep prototype chain to a flat object\n * @param {Object} sourceObj source object\n * @param {Object} [destObj]\n * @param {Function|Boolean} [filter]\n * @param {Function} [propFilter]\n *\n * @returns {Object}\n */\nconst toFlatObject = (sourceObj, destObj, filter, propFilter) => {\n  let props;\n  let i;\n  let prop;\n  const merged = {};\n\n  destObj = destObj || {};\n  // eslint-disable-next-line no-eq-null,eqeqeq\n  if (sourceObj == null) return destObj;\n\n  do {\n    props = Object.getOwnPropertyNames(sourceObj);\n    i = props.length;\n    while (i-- > 0) {\n      prop = props[i];\n      if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {\n        destObj[prop] = sourceObj[prop];\n        merged[prop] = true;\n      }\n    }\n    sourceObj = filter !== false && getPrototypeOf(sourceObj);\n  } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);\n\n  return destObj;\n};\n\n/**\n * Determines whether a string ends with the characters of a specified string\n *\n * @param {String} str\n * @param {String} searchString\n * @param {Number} [position= 0]\n *\n * @returns {boolean}\n */\nconst endsWith = (str, searchString, position) => {\n  str = String(str);\n  if (position === undefined || position > str.length) {\n    position = str.length;\n  }\n  position -= searchString.length;\n  const lastIndex = str.indexOf(searchString, position);\n  return lastIndex !== -1 && lastIndex === position;\n};\n\n/**\n * Returns new array from array like object or null if failed\n *\n * @param {*} [thing]\n *\n * @returns {?Array}\n */\nconst toArray = (thing) => {\n  if (!thing) return null;\n  if (isArray(thing)) return thing;\n  let i = thing.length;\n  if (!isNumber(i)) return null;\n  const arr = new Array(i);\n  while (i-- > 0) {\n    arr[i] = thing[i];\n  }\n  return arr;\n};\n\n/**\n * Checking if the Uint8Array exists and if it does, it returns a function that checks if the\n * thing passed in is an instance of Uint8Array\n *\n * @param {TypedArray}\n *\n * @returns {Array}\n */\n// eslint-disable-next-line func-names\nconst isTypedArray = ((TypedArray) => {\n  // eslint-disable-next-line func-names\n  return (thing) => {\n    return TypedArray && thing instanceof TypedArray;\n  };\n})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));\n\n/**\n * For each entry in the object, call the function with the key and value.\n *\n * @param {Object<any, any>} obj - The object to iterate over.\n * @param {Function} fn - The function to call for each entry.\n *\n * @returns {void}\n */\nconst forEachEntry = (obj, fn) => {\n  const generator = obj && obj[iterator];\n\n  const _iterator = generator.call(obj);\n\n  let result;\n\n  while ((result = _iterator.next()) && !result.done) {\n    const pair = result.value;\n    fn.call(obj, pair[0], pair[1]);\n  }\n};\n\n/**\n * It takes a regular expression and a string, and returns an array of all the matches\n *\n * @param {string} regExp - The regular expression to match against.\n * @param {string} str - The string to search.\n *\n * @returns {Array<boolean>}\n */\nconst matchAll = (regExp, str) => {\n  let matches;\n  const arr = [];\n\n  while ((matches = regExp.exec(str)) !== null) {\n    arr.push(matches);\n  }\n\n  return arr;\n};\n\n/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */\nconst isHTMLForm = kindOfTest('HTMLFormElement');\n\nconst toCamelCase = (str) => {\n  return str.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g, function replacer(m, p1, p2) {\n    return p1.toUpperCase() + p2;\n  });\n};\n\nconst { propertyIsEnumerable } = Object.prototype;\n\n/**\n * Determine if a value is a RegExp object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a RegExp object, otherwise false\n */\nconst isRegExp = kindOfTest('RegExp');\n\nconst reduceDescriptors = (obj, reducer) => {\n  const descriptors = Object.getOwnPropertyDescriptors(obj);\n  const reducedDescriptors = {};\n\n  forEach(descriptors, (descriptor, name) => {\n    let ret;\n    if ((ret = reducer(descriptor, name, obj)) !== false) {\n      reducedDescriptors[name] = ret || descriptor;\n    }\n  });\n\n  Object.defineProperties(obj, reducedDescriptors);\n};\n\n/**\n * Makes all methods read-only\n * @param {Object} obj\n */\n\nconst freezeMethods = (obj) => {\n  reduceDescriptors(obj, (descriptor, name) => {\n    // skip restricted props in strict mode\n    if (isFunction(obj) && ['arguments', 'caller', 'callee'].includes(name)) {\n      return false;\n    }\n\n    const value = obj[name];\n\n    if (!isFunction(value)) return;\n\n    descriptor.enumerable = false;\n\n    if ('writable' in descriptor) {\n      descriptor.writable = false;\n      return;\n    }\n\n    if (!descriptor.set) {\n      descriptor.set = () => {\n        throw Error(\"Can not rewrite read-only method '\" + name + \"'\");\n      };\n    }\n  });\n};\n\n/**\n * Converts an array or a delimited string into an object set with values as keys and true as values.\n * Useful for fast membership checks.\n *\n * @param {Array|string} arrayOrString - The array or string to convert.\n * @param {string} delimiter - The delimiter to use if input is a string.\n * @returns {Object} An object with keys from the array or string, values set to true.\n */\nconst toObjectSet = (arrayOrString, delimiter) => {\n  const obj = {};\n\n  const define = (arr) => {\n    arr.forEach((value) => {\n      obj[value] = true;\n    });\n  };\n\n  isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));\n\n  return obj;\n};\n\nconst noop = () => {};\n\nconst toFiniteNumber = (value, defaultValue) => {\n  return value != null && Number.isFinite((value = +value)) ? value : defaultValue;\n};\n\n/**\n * If the thing is a FormData object, return true, otherwise return false.\n *\n * @param {unknown} thing - The thing to check.\n *\n * @returns {boolean}\n */\nfunction isSpecCompliantForm(thing) {\n  return !!(\n    thing &&\n    isFunction(thing.append) &&\n    thing[toStringTag] === 'FormData' &&\n    thing[iterator]\n  );\n}\n\n/**\n * Recursively converts an object to a JSON-compatible object, handling circular references and Buffers.\n *\n * @param {Object} obj - The object to convert.\n * @returns {Object} The JSON-compatible object.\n */\nconst toJSONObject = (obj) => {\n  const visited = new WeakSet();\n\n  const visit = (source) => {\n    if (isObject(source)) {\n      if (visited.has(source)) {\n        return;\n      }\n\n      //Buffer check\n      if (isBuffer(source)) {\n        return source;\n      }\n\n      if (!('toJSON' in source)) {\n        // add-on descent / delete-on-ascent: preserves path semantics, so DAG nodes serialise at every occurrence (see #7230).\n        visited.add(source);\n\n        let target;\n\n        if (isSet(source)) {\n          target = [];\n          for (const value of source) {\n            const reducedValue = visit(value);\n            !isUndefined(reducedValue) && target.push(reducedValue);\n          }\n        } else {\n          target = isArray(source) ? [] : {};\n\n          forEach(source, (value, key) => {\n            const reducedValue = visit(value);\n            !isUndefined(reducedValue) && (target[key] = reducedValue);\n          });\n        }\n\n        visited.delete(source);\n\n        return target;\n      }\n    }\n\n    return source;\n  };\n\n  return visit(obj);\n};\n\n/**\n * Determines if a value is an async function.\n *\n * @param {*} thing - The value to test.\n * @returns {boolean} True if value is an async function, otherwise false.\n */\nconst isAsyncFn = kindOfTest('AsyncFunction');\n\n/**\n * Determines if a value is thenable (has then and catch methods).\n *\n * @param {*} thing - The value to test.\n * @returns {boolean} True if value is thenable, otherwise false.\n */\nconst isThenable = (thing) =>\n  thing &&\n  (isObject(thing) || isFunction(thing)) &&\n  isFunction(thing.then) &&\n  isFunction(thing.catch);\n\n// original code\n// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34\n\n/**\n * Provides a cross-platform setImmediate implementation.\n * Uses native setImmediate if available, otherwise falls back to postMessage or setTimeout.\n *\n * @param {boolean} setImmediateSupported - Whether setImmediate is supported.\n * @param {boolean} postMessageSupported - Whether postMessage is supported.\n * @returns {Function} A function to schedule a callback asynchronously.\n */\nconst _setImmediate = ((setImmediateSupported, postMessageSupported) => {\n  if (setImmediateSupported) {\n    return setImmediate;\n  }\n\n  return postMessageSupported\n    ? ((token, callbacks) => {\n        _global.addEventListener(\n          'message',\n          ({ source, data }) => {\n            if (source === _global && data === token) {\n              callbacks.length && callbacks.shift()();\n            }\n          },\n          false\n        );\n\n        return (cb) => {\n          callbacks.push(cb);\n          _global.postMessage(token, '*');\n        };\n      })(`axios@${Math.random()}`, [])\n    : (cb) => setTimeout(cb);\n})(typeof setImmediate === 'function', isFunction(_global.postMessage));\n\n/**\n * Schedules a microtask or asynchronous callback as soon as possible.\n * Uses queueMicrotask if available, otherwise falls back to process.nextTick or _setImmediate.\n *\n * @type {Function}\n */\nconst asap =\n  typeof queueMicrotask !== 'undefined'\n    ? queueMicrotask.bind(_global)\n    : (typeof process !== 'undefined' && process.nextTick) || _setImmediate;\n\n// *********************\n\nconst isIterable = (thing) => thing != null && isFunction(thing[iterator]);\n\n/**\n * Determine if a value is iterable via an iterator that is NOT sourced solely\n * from a polluted Object.prototype. Use this instead of `isIterable` whenever\n * the iterable comes from untrusted input (e.g. user-supplied header sources),\n * so `Object.prototype[Symbol.iterator] = ...` cannot turn an ordinary object\n * into an attacker-controlled entries iterator.\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value has a non-polluted iterator\n */\nconst isSafeIterable = (thing) =>\n  thing != null && hasOwnInPrototypeChain(thing, iterator) && isIterable(thing);\n\nexport default {\n  isArray,\n  isArrayBuffer,\n  isBuffer,\n  isFormData,\n  isArrayBufferView,\n  isString,\n  isNumber,\n  isBoolean,\n  isObject,\n  isPlainObject,\n  isEmptyObject,\n  isReadableStream,\n  isRequest,\n  isResponse,\n  isHeaders,\n  isUndefined,\n  isDate,\n  isFile,\n  isReactNativeBlob,\n  isReactNative,\n  isBlob,\n  isRegExp,\n  isFunction,\n  isStream,\n  isURLSearchParams,\n  isTypedArray,\n  isFileList,\n  forEach,\n  merge,\n  extend,\n  trim,\n  stripBOM,\n  inherits,\n  toFlatObject,\n  kindOf,\n  kindOfTest,\n  endsWith,\n  toArray,\n  forEachEntry,\n  matchAll,\n  isHTMLForm,\n  hasOwnProperty,\n  hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection\n  hasOwnInPrototypeChain,\n  getSafeProp,\n  toSafeFlatObject,\n  reduceDescriptors,\n  freezeMethods,\n  toObjectSet,\n  toCamelCase,\n  noop,\n  toFiniteNumber,\n  findKey,\n  global: _global,\n  isContextDefined,\n  isSpecCompliantForm,\n  toJSONObject,\n  isAsyncFn,\n  isThenable,\n  setImmediate: _setImmediate,\n  asap,\n  isIterable,\n  isSafeIterable,\n};\n", "'use strict';\n\nimport utils from '../utils.js';\n\n// RawAxiosHeaders whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nconst ignoreDuplicateOf = utils.toObjectSet([\n  'age',\n  'authorization',\n  'content-length',\n  'content-type',\n  'etag',\n  'expires',\n  'from',\n  'host',\n  'if-modified-since',\n  'if-unmodified-since',\n  'last-modified',\n  'location',\n  'max-forwards',\n  'proxy-authorization',\n  'referer',\n  'retry-after',\n  'user-agent',\n]);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} rawHeaders Headers needing to be parsed\n *\n * @returns {Object} Headers parsed into an object\n */\nexport default (rawHeaders) => {\n  const parsed = {};\n  let key;\n  let val;\n  let i;\n\n  rawHeaders &&\n    rawHeaders.split('\\n').forEach(function parser(line) {\n      i = line.indexOf(':');\n      key = line.substring(0, i).trim().toLowerCase();\n      val = line.substring(i + 1).trim();\n\n      const hasKey = utils.hasOwnProp(parsed, key);\n\n      if (!key || (hasKey && utils.hasOwnProp(ignoreDuplicateOf, key))) {\n        return;\n      }\n\n      if (key === 'set-cookie') {\n        if (hasKey) {\n          parsed[key].push(val);\n        } else {\n          parsed[key] = [val];\n        }\n      } else {\n        parsed[key] = hasKey ? parsed[key] + ', ' + val : val;\n      }\n    });\n\n  return parsed;\n};\n", "'use strict';\n\nimport utils from '../utils.js';\n\nfunction trimSPorHTAB(str) {\n  let start = 0;\n  let end = str.length;\n\n  while (start < end) {\n    const code = str.charCodeAt(start);\n\n    if (code !== 0x09 && code !== 0x20) {\n      break;\n    }\n\n    start += 1;\n  }\n\n  while (end > start) {\n    const code = str.charCodeAt(end - 1);\n\n    if (code !== 0x09 && code !== 0x20) {\n      break;\n    }\n\n    end -= 1;\n  }\n\n  return start === 0 && end === str.length ? str : str.slice(start, end);\n}\n\n// The control-code ranges are intentional: header sanitization strips C0/DEL bytes.\n// eslint-disable-next-line no-control-regex\nconst INVALID_UNICODE_HEADER_VALUE_CHARS = new RegExp('[\\\\u0000-\\\\u0008\\\\u000a-\\\\u001f\\\\u007f]+', 'g');\n// eslint-disable-next-line no-control-regex\nconst INVALID_BYTE_STRING_HEADER_VALUE_CHARS = new RegExp('[^\\\\u0009\\\\u0020-\\\\u007e\\\\u0080-\\\\u00ff]+', 'g');\n\nfunction sanitizeValue(value, invalidChars) {\n  if (utils.isArray(value)) {\n    return value.map((item) => sanitizeValue(item, invalidChars));\n  }\n\n  return trimSPorHTAB(String(value).replace(invalidChars, ''));\n}\n\nexport const sanitizeHeaderValue = (value) =>\n  sanitizeValue(value, INVALID_UNICODE_HEADER_VALUE_CHARS);\n\nexport const sanitizeByteStringHeaderValue = (value) =>\n  sanitizeValue(value, INVALID_BYTE_STRING_HEADER_VALUE_CHARS);\n\nexport function toByteStringHeaderObject(headers) {\n  const byteStringHeaders = Object.create(null);\n\n  utils.forEach(headers.toJSON(), (value, header) => {\n    byteStringHeaders[header] = sanitizeByteStringHeaderValue(value);\n  });\n\n  return byteStringHeaders;\n}\n", "'use strict';\n\nimport utils from '../utils.js';\nimport parseHeaders from '../helpers/parseHeaders.js';\nimport { sanitizeHeaderValue } from '../helpers/sanitizeHeaderValue.js';\n\nconst $internals = Symbol('internals');\n\nfunction normalizeHeader(header) {\n  return header && String(header).trim().toLowerCase();\n}\n\nfunction normalizeValue(value) {\n  if (value === false || value == null) {\n    return value;\n  }\n\n  return utils.isArray(value) ? value.map(normalizeValue) : sanitizeHeaderValue(String(value));\n}\n\nfunction parseTokens(str) {\n  const tokens = Object.create(null);\n  const tokensRE = /([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;\n  let match;\n\n  while ((match = tokensRE.exec(str))) {\n    tokens[match[1]] = match[2];\n  }\n\n  return tokens;\n}\n\nconst parameterNameRE = /^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$/;\n\nfunction trimOWS(value) {\n  let start = 0;\n  let end = value.length;\n\n  while (start < end) {\n    const code = value.charCodeAt(start);\n\n    if (code !== 0x09 && code !== 0x20) {\n      break;\n    }\n\n    start += 1;\n  }\n\n  while (end > start) {\n    const code = value.charCodeAt(end - 1);\n\n    if (code !== 0x09 && code !== 0x20) {\n      break;\n    }\n\n    end -= 1;\n  }\n\n  return start === 0 && end === value.length ? value : value.slice(start, end);\n}\n\nfunction decodeQuotedString(value) {\n  const last = value.length - 1;\n\n  if (last < 1 || value.charCodeAt(0) !== 0x22 || value.charCodeAt(last) !== 0x22) {\n    return value;\n  }\n\n  let decoded = '';\n\n  for (let i = 1; i < last; i++) {\n    const code = value.charCodeAt(i);\n\n    if (code === 0x22) {\n      return value;\n    }\n\n    if (code === 0x5c) {\n      i += 1;\n\n      if (i >= last) {\n        return value;\n      }\n    }\n\n    decoded += value[i];\n  }\n\n  return decoded;\n}\n\nfunction parseParameters(value) {\n  const parameters = Object.create(null);\n  const str = String(value);\n  let start = 0;\n  let quoted = false;\n  let escaped = false;\n\n  function parseParameter(end) {\n    const part = trimOWS(str.slice(start, end));\n    const equals = part.indexOf('=');\n\n    if (equals < 1) {\n      return;\n    }\n\n    const name = trimOWS(part.slice(0, equals));\n\n    if (!parameterNameRE.test(name)) {\n      return;\n    }\n\n    const normalizedName = name.toLowerCase();\n\n    if (\n      normalizedName === '__proto__' ||\n      normalizedName === 'constructor' ||\n      normalizedName === 'prototype'\n    ) {\n      return;\n    }\n\n    const parameterValue = trimOWS(part.slice(equals + 1));\n    parameters[normalizedName] = decodeQuotedString(parameterValue);\n  }\n\n  for (let i = 0; i < str.length; i++) {\n    const code = str.charCodeAt(i);\n\n    if (quoted) {\n      if (escaped) {\n        escaped = false;\n      } else if (code === 0x5c) {\n        escaped = true;\n      } else if (code === 0x22) {\n        quoted = false;\n      }\n    } else if (code === 0x22) {\n      quoted = true;\n    } else if (code === 0x2c || code === 0x3b) {\n      parseParameter(i);\n      start = i + 1;\n    }\n  }\n\n  parseParameter(str.length);\n\n  return parameters;\n}\n\nconst isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());\n\nfunction matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {\n  if (utils.isFunction(filter)) {\n    return filter.call(this, value, header);\n  }\n\n  if (isHeaderNameFilter) {\n    value = header;\n  }\n\n  if (!utils.isString(value)) return;\n\n  if (utils.isString(filter)) {\n    return value.indexOf(filter) !== -1;\n  }\n\n  if (utils.isRegExp(filter)) {\n    return filter.test(value);\n  }\n}\n\nfunction formatHeader(header) {\n  return header\n    .trim()\n    .toLowerCase()\n    .replace(/([a-z\\d])(\\w*)/g, (w, char, str) => {\n      return char.toUpperCase() + str;\n    });\n}\n\nfunction buildAccessors(obj, header) {\n  const accessorName = utils.toCamelCase(' ' + header);\n\n  ['get', 'set', 'has'].forEach((methodName) => {\n    Object.defineProperty(obj, methodName + accessorName, {\n      // Null-proto descriptor so a polluted Object.prototype.get cannot turn\n      // this data descriptor into an accessor descriptor on the way in.\n      __proto__: null,\n      value: function (arg1, arg2, arg3) {\n        return this[methodName].call(this, header, arg1, arg2, arg3);\n      },\n      configurable: true,\n    });\n  });\n}\n\nclass AxiosHeaders {\n  constructor(headers) {\n    headers && this.set(headers);\n  }\n\n  set(header, valueOrRewrite, rewrite) {\n    const self = this;\n\n    function setHeader(_value, _header, _rewrite) {\n      const lHeader = normalizeHeader(_header);\n\n      if (!lHeader) {\n        return;\n      }\n\n      const key = utils.findKey(self, lHeader);\n\n      if (\n        !key ||\n        self[key] === undefined ||\n        _rewrite === true ||\n        (_rewrite === undefined && self[key] !== false)\n      ) {\n        self[key || _header] = normalizeValue(_value);\n      }\n    }\n\n    const setHeaders = (headers, _rewrite) =>\n      utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));\n\n    if (utils.isPlainObject(header) || header instanceof this.constructor) {\n      setHeaders(header, valueOrRewrite);\n    } else if (utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {\n      setHeaders(parseHeaders(header), valueOrRewrite);\n    } else if (utils.isObject(header) && utils.isSafeIterable(header)) {\n      let obj = Object.create(null),\n        dest,\n        key;\n      for (const entry of header) {\n        if (!utils.isArray(entry)) {\n          throw new TypeError('Object iterator must return a key-value pair');\n        }\n\n        key = entry[0];\n\n        if (utils.hasOwnProp(obj, key)) {\n          dest = obj[key];\n          obj[key] = utils.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]];\n        } else {\n          obj[key] = entry[1];\n        }\n      }\n\n      setHeaders(obj, valueOrRewrite);\n    } else {\n      header != null && setHeader(valueOrRewrite, header, rewrite);\n    }\n\n    return this;\n  }\n\n  get(header, parser) {\n    header = normalizeHeader(header);\n\n    if (header) {\n      const key = utils.findKey(this, header);\n\n      if (key) {\n        const value = this[key];\n\n        if (!parser) {\n          return value;\n        }\n\n        if (parser === true) {\n          return parseTokens(value);\n        }\n\n        if (utils.isFunction(parser)) {\n          return parser.call(this, value, key);\n        }\n\n        if (utils.isRegExp(parser)) {\n          return parser.exec(value);\n        }\n\n        throw new TypeError('parser must be boolean|regexp|function');\n      }\n    }\n  }\n\n  has(header, matcher) {\n    header = normalizeHeader(header);\n\n    if (header) {\n      const key = utils.findKey(this, header);\n\n      return !!(\n        key &&\n        this[key] !== undefined &&\n        (!matcher || matchHeaderValue(this, this[key], key, matcher))\n      );\n    }\n\n    return false;\n  }\n\n  delete(header, matcher) {\n    const self = this;\n    let deleted = false;\n\n    function deleteHeader(_header) {\n      _header = normalizeHeader(_header);\n\n      if (_header) {\n        const key = utils.findKey(self, _header);\n\n        if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {\n          delete self[key];\n\n          deleted = true;\n        }\n      }\n    }\n\n    if (utils.isArray(header)) {\n      header.forEach(deleteHeader);\n    } else {\n      deleteHeader(header);\n    }\n\n    return deleted;\n  }\n\n  clear(matcher) {\n    const keys = Object.keys(this);\n    let i = keys.length;\n    let deleted = false;\n\n    while (i--) {\n      const key = keys[i];\n      if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {\n        delete this[key];\n        deleted = true;\n      }\n    }\n\n    return deleted;\n  }\n\n  normalize(format) {\n    const self = this;\n    const headers = {};\n\n    utils.forEach(this, (value, header) => {\n      const key = utils.findKey(headers, header);\n\n      if (key) {\n        self[key] = normalizeValue(value);\n        delete self[header];\n        return;\n      }\n\n      const normalized = format ? formatHeader(header) : String(header).trim();\n\n      if (normalized !== header) {\n        delete self[header];\n      }\n\n      self[normalized] = normalizeValue(value);\n\n      headers[normalized] = true;\n    });\n\n    return this;\n  }\n\n  concat(...targets) {\n    return this.constructor.concat(this, ...targets);\n  }\n\n  toJSON(asStrings) {\n    const obj = Object.create(null);\n\n    utils.forEach(this, (value, header) => {\n      value != null &&\n        value !== false &&\n        (obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value);\n    });\n\n    return obj;\n  }\n\n  [Symbol.iterator]() {\n    return Object.entries(this.toJSON())[Symbol.iterator]();\n  }\n\n  toString() {\n    return Object.entries(this.toJSON())\n      .map(([header, value]) => header + ': ' + value)\n      .join('\\n');\n  }\n\n  getSetCookie() {\n    const value = this.get('set-cookie');\n    return utils.isArray(value) ? value : value == null || value === false ? [] : [value];\n  }\n\n  get [Symbol.toStringTag]() {\n    return 'AxiosHeaders';\n  }\n\n  static from(thing) {\n    return thing instanceof this ? thing : new this(thing);\n  }\n\n  static parseParameters(value) {\n    return parseParameters(value);\n  }\n\n  static concat(first, ...targets) {\n    const computed = new this(first);\n\n    targets.forEach((target) => computed.set(target));\n\n    return computed;\n  }\n\n  static accessor(header) {\n    const internals =\n      (this[$internals] =\n      this[$internals] =\n        {\n          accessors: {},\n        });\n\n    const accessors = internals.accessors;\n    const prototype = this.prototype;\n\n    function defineAccessor(_header) {\n      const lHeader = normalizeHeader(_header);\n\n      if (!accessors[lHeader]) {\n        buildAccessors(prototype, _header);\n        accessors[lHeader] = true;\n      }\n    }\n\n    utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);\n\n    return this;\n  }\n}\n\nAxiosHeaders.accessor([\n  'Content-Type',\n  'Content-Length',\n  'Accept',\n  'Accept-Encoding',\n  'User-Agent',\n  'Authorization',\n]);\n\n// reserved names hotfix\nutils.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {\n  let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`\n  return {\n    get: () => value,\n    set(headerValue) {\n      this[mapped] = headerValue;\n    },\n  };\n});\n\nutils.freezeMethods(AxiosHeaders);\n\nexport default AxiosHeaders;\n", "'use strict';\n\nimport utils from '../utils.js';\nimport AxiosHeaders from './AxiosHeaders.js';\n\nexport const REDACTED = '[REDACTED ****]';\n\nfunction hasOwnOrPrototypeToJSON(source) {\n  if (utils.hasOwnProp(source, 'toJSON')) {\n    return true;\n  }\n\n  let prototype = Object.getPrototypeOf(source);\n\n  while (prototype && prototype !== Object.prototype) {\n    if (utils.hasOwnProp(prototype, 'toJSON')) {\n      return true;\n    }\n\n    prototype = Object.getPrototypeOf(prototype);\n  }\n\n  return false;\n}\n\n// Build a plain-object snapshot of `config` and replace the value of any key\n// (case-insensitive) listed in `redactKeys` with REDACTED. Walks through arrays\n// and AxiosHeaders, and short-circuits on circular references.\nfunction redactConfig(config, redactKeys) {\n  const lowerKeys = new Set(redactKeys.map((k) => String(k).toLowerCase()));\n  const seen = [];\n\n  const visit = (source) => {\n    if (source === null || typeof source !== 'object') return source;\n    if (utils.isBuffer(source)) return source;\n    if (seen.indexOf(source) !== -1) return undefined;\n\n    if (source instanceof AxiosHeaders) {\n      source = source.toJSON();\n    }\n\n    seen.push(source);\n\n    let result;\n    if (utils.isArray(source)) {\n      result = [];\n      source.forEach((v, i) => {\n        const reducedValue = visit(v);\n        if (!utils.isUndefined(reducedValue)) {\n          result[i] = reducedValue;\n        }\n      });\n    } else {\n      if (!utils.isPlainObject(source) && hasOwnOrPrototypeToJSON(source)) {\n        seen.pop();\n        return source;\n      }\n\n      result = Object.create(null);\n      for (const [key, value] of Object.entries(source)) {\n        const reducedValue = lowerKeys.has(key.toLowerCase()) ? REDACTED : visit(value);\n        if (!utils.isUndefined(reducedValue)) {\n          result[key] = reducedValue;\n        }\n      }\n    }\n\n    seen.pop();\n    return result;\n  };\n\n  return visit(config);\n}\n\nfunction stringifySafely(value) {\n  try {\n    return String(value);\n  } catch (err) {\n    return '';\n  }\n}\n\nfunction aggregateErrorMessage(error) {\n  const message = error.errors\n    .map((entry) => {\n      try {\n        return entry && entry.message ? stringifySafely(entry.message) : stringifySafely(entry);\n      } catch (err) {\n        return '';\n      }\n    })\n    .filter(Boolean)\n    .join('; ');\n\n  return message || error.name || 'AggregateError';\n}\n\nclass AxiosError extends Error {\n  static from(error, code, config, request, response, customProps) {\n    // `AggregateError` (thrown by Node on dual-stack/Happy-Eyeballs connection\n    // failures) has an empty `message`; its detail lives in `errors[]`. Without\n    // this, the wrapped error surfaces with a blank message (see #6721).\n    let message = error.message;\n    if (!message && utils.isArray(error.errors) && error.errors.length) {\n      message = aggregateErrorMessage(error);\n    }\n\n    const axiosError = new AxiosError(message, code || error.code, config, request, response);\n    // Match native `Error` `cause` semantics: non-enumerable. The wrapped\n    // error often carries circular internals (sockets, requests, agents), so\n    // an enumerable `cause` makes structured loggers (pino/winston) and any\n    // own-property walk throw \"Converting circular structure to JSON\".\n    // Regression from #6982; see #7205. `__proto__: null` mirrors the\n    // `message` descriptor below (prototype-pollution-safe descriptor).\n    Object.defineProperty(axiosError, 'cause', {\n      __proto__: null,\n      value: error,\n      writable: true,\n      enumerable: false,\n      configurable: true,\n    });\n    axiosError.name = error.name;\n\n    // Preserve status from the original error if not already set from response\n    if (error.status != null && axiosError.status == null) {\n      axiosError.status = error.status;\n    }\n\n    customProps && Object.assign(axiosError, customProps);\n    return axiosError;\n  }\n\n  /**\n   * Create an Error with the specified message, config, error code, request and response.\n   *\n   * @param {string} message The error message.\n   * @param {string} [code] The error code (for example, 'ECONNABORTED').\n   * @param {Object} [config] The config.\n   * @param {Object} [request] The request.\n   * @param {Object} [response] The response.\n   *\n   * @returns {Error} The created error.\n   */\n  constructor(message, code, config, request, response) {\n    super(message);\n\n    // Make message enumerable to maintain backward compatibility\n    // The native Error constructor sets message as non-enumerable,\n    // but axios < v1.13.3 had it as enumerable\n    Object.defineProperty(this, 'message', {\n      // Null-proto descriptor so a polluted Object.prototype.get cannot turn\n      // this data descriptor into an accessor descriptor on the way in.\n      __proto__: null,\n      value: message,\n      enumerable: true,\n      writable: true,\n      configurable: true,\n    });\n\n    this.name = 'AxiosError';\n    this.isAxiosError = true;\n    code && (this.code = code);\n    config && (this.config = config);\n    request && (this.request = request);\n    if (response) {\n      this.response = response;\n      this.status = response.status;\n    }\n  }\n\n  toJSON() {\n    // Opt-in redaction: when the request config carries a `redact` array, the\n    // value of any matching key (case-insensitive, at any depth) is replaced\n    // with REDACTED in the serialized snapshot. Undefined or empty leaves the\n    // existing serialization behavior unchanged.\n    const config = this.config;\n    const redactKeys = config && utils.hasOwnProp(config, 'redact') ? config.redact : undefined;\n    const serializedConfig =\n      utils.isArray(redactKeys) && redactKeys.length > 0\n        ? redactConfig(config, redactKeys)\n        : utils.toJSONObject(config);\n\n    return {\n      // Standard\n      message: this.message,\n      name: this.name,\n      // Microsoft\n      description: this.description,\n      number: this.number,\n      // Mozilla\n      fileName: this.fileName,\n      lineNumber: this.lineNumber,\n      columnNumber: this.columnNumber,\n      stack: this.stack,\n      // Axios\n      config: serializedConfig,\n      code: this.code,\n      status: this.status,\n    };\n  }\n}\n\n// This can be changed to static properties as soon as the parser options in .eslint.cjs are updated.\nAxiosError.ERR_BAD_OPTION_VALUE = 'ERR_BAD_OPTION_VALUE';\nAxiosError.ERR_BAD_OPTION = 'ERR_BAD_OPTION';\nAxiosError.ECONNABORTED = 'ECONNABORTED';\nAxiosError.ETIMEDOUT = 'ETIMEDOUT';\nAxiosError.ECONNREFUSED = 'ECONNREFUSED';\nAxiosError.ERR_NETWORK = 'ERR_NETWORK';\nAxiosError.ERR_FR_TOO_MANY_REDIRECTS = 'ERR_FR_TOO_MANY_REDIRECTS';\nAxiosError.ERR_DEPRECATED = 'ERR_DEPRECATED';\nAxiosError.ERR_BAD_RESPONSE = 'ERR_BAD_RESPONSE';\nAxiosError.ERR_BAD_REQUEST = 'ERR_BAD_REQUEST';\nAxiosError.ERR_CANCELED = 'ERR_CANCELED';\nAxiosError.ERR_NOT_SUPPORT = 'ERR_NOT_SUPPORT';\nAxiosError.ERR_INVALID_URL = 'ERR_INVALID_URL';\nAxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED = 'ERR_FORM_DATA_DEPTH_EXCEEDED';\n\nexport default AxiosError;\n", "// eslint-disable-next-line strict\nexport default null;\n", "'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\n// temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored\nimport PlatformFormData from '../platform/node/classes/FormData.js';\nimport PlatformBuffer from '../platform/node/classes/Buffer.js';\n\n// Default nesting limit shared with the inverse transform (formDataToJSON) so\n// the FormData <-> JSON round-trip stays symmetric.\nexport const DEFAULT_FORM_DATA_MAX_DEPTH = 100;\n\n/**\n * Determines if the given thing is a array or js object.\n *\n * @param {string} thing - The object or array to be visited.\n *\n * @returns {boolean}\n */\nfunction isVisitable(thing) {\n  return utils.isPlainObject(thing) || utils.isArray(thing);\n}\n\n/**\n * It removes the brackets from the end of a string\n *\n * @param {string} key - The key of the parameter.\n *\n * @returns {string} the key without the brackets.\n */\nfunction removeBrackets(key) {\n  return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;\n}\n\n/**\n * It takes a path, a key, and a boolean, and returns a string\n *\n * @param {string} path - The path to the current key.\n * @param {string} key - The key of the current object being iterated over.\n * @param {string} dots - If true, the key will be rendered with dots instead of brackets.\n *\n * @returns {string} The path to the current key.\n */\nfunction renderKey(path, key, dots) {\n  if (!path) return key;\n  return path\n    .concat(key)\n    .map(function each(token, i) {\n      // eslint-disable-next-line no-param-reassign\n      token = removeBrackets(token);\n      return !dots && i ? '[' + token + ']' : token;\n    })\n    .join(dots ? '.' : '');\n}\n\n/**\n * If the array is an array and none of its elements are visitable, then it's a flat array.\n *\n * @param {Array<any>} arr - The array to check\n *\n * @returns {boolean}\n */\nfunction isFlatArray(arr) {\n  return utils.isArray(arr) && !arr.some(isVisitable);\n}\n\nconst predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {\n  return /^is[A-Z]/.test(prop);\n});\n\n/**\n * Convert a data object to FormData\n *\n * @param {Object} obj\n * @param {?Object} [formData]\n * @param {?Object} [options]\n * @param {Function} [options.visitor]\n * @param {Boolean} [options.metaTokens = true]\n * @param {Boolean} [options.dots = false]\n * @param {?Boolean} [options.indexes = false]\n *\n * @returns {Object}\n **/\n\n/**\n * It converts an object into a FormData object\n *\n * @param {Object<any, any>} obj - The object to convert to form data.\n * @param {string} formData - The FormData object to append to.\n * @param {Object<string, any>} options\n *\n * @returns\n */\nfunction toFormData(obj, formData, options) {\n  if (!utils.isObject(obj)) {\n    throw new TypeError('target must be an object');\n  }\n\n  // eslint-disable-next-line no-param-reassign\n  formData = formData || new (PlatformFormData || FormData)();\n\n  const option = (name, fallback) => {\n    const value = utils.getSafeProp(options, name);\n    return utils.isUndefined(value) ? fallback : value;\n  };\n\n  const metaTokens = option('metaTokens', true);\n  // eslint-disable-next-line no-use-before-define\n  const visitor = option('visitor') || defaultVisitor;\n  const dots = option('dots', false);\n  const indexes = option('indexes', false);\n  const _Blob = option('Blob') || (typeof Blob !== 'undefined' && Blob);\n  const maxDepth = option('maxDepth', DEFAULT_FORM_DATA_MAX_DEPTH);\n  const useBlob = _Blob && utils.isSpecCompliantForm(formData);\n  const stack = [];\n\n  if (!utils.isFunction(visitor)) {\n    throw new TypeError('visitor must be a function');\n  }\n\n  function convertValue(value) {\n    if (value === null) return '';\n\n    if (utils.isDate(value)) {\n      return value.toISOString();\n    }\n\n    if (utils.isBoolean(value)) {\n      return value.toString();\n    }\n\n    if (!useBlob && utils.isBlob(value)) {\n      throw new AxiosError('Blob is not supported. Use a Buffer instead.');\n    }\n\n    if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {\n      if (useBlob && typeof _Blob === 'function') {\n        return new _Blob([value]);\n      }\n      if (PlatformBuffer && PlatformBuffer.isBufferAvailable()) {\n        return PlatformBuffer.from(value);\n      }\n      throw new AxiosError(\n        'Blob is not supported. Use a Buffer instead.',\n        AxiosError.ERR_NOT_SUPPORT\n      );\n    }\n\n    return value;\n  }\n\n  function throwIfMaxDepthExceeded(depth) {\n    if (depth > maxDepth) {\n      throw new AxiosError(\n        'Object is too deeply nested (' + depth + ' levels). Max depth: ' + maxDepth,\n        AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED\n      );\n    }\n  }\n\n  function stringifyWithDepthLimit(value, depth) {\n    if (maxDepth === Infinity) {\n      return JSON.stringify(value);\n    }\n\n    const ancestors = [];\n\n    return JSON.stringify(value, function limitDepth(_key, currentValue) {\n      if (!utils.isObject(currentValue)) {\n        return currentValue;\n      }\n\n      while (ancestors.length && ancestors[ancestors.length - 1] !== this) {\n        ancestors.pop();\n      }\n\n      ancestors.push(currentValue);\n      throwIfMaxDepthExceeded(depth + ancestors.length - 1);\n\n      return currentValue;\n    });\n  }\n\n  /**\n   * Default visitor.\n   *\n   * @param {*} value\n   * @param {String|Number} key\n   * @param {Array<String|Number>} path\n   * @this {FormData}\n   *\n   * @returns {boolean} return true to visit the each prop of the value recursively\n   */\n  function defaultVisitor(value, key, path) {\n    let arr = value;\n\n    if (utils.isReactNative(formData) && utils.isReactNativeBlob(value)) {\n      formData.append(renderKey(path, key, dots), convertValue(value));\n      return false;\n    }\n\n    if (value && !path && typeof value === 'object') {\n      if (utils.endsWith(key, '{}')) {\n        // eslint-disable-next-line no-param-reassign\n        key = metaTokens ? key : key.slice(0, -2);\n        // eslint-disable-next-line no-param-reassign\n        value = stringifyWithDepthLimit(value, 1);\n      } else if (\n        (utils.isArray(value) && isFlatArray(value)) ||\n        ((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value)))\n      ) {\n        // eslint-disable-next-line no-param-reassign\n        key = removeBrackets(key);\n\n        arr.forEach(function each(el, index) {\n          !(utils.isUndefined(el) || el === null) &&\n            formData.append(\n              // eslint-disable-next-line no-nested-ternary\n              indexes === true\n                ? renderKey([key], index, dots)\n                : indexes === null\n                  ? key\n                  : key + '[]',\n              convertValue(el)\n            );\n        });\n        return false;\n      }\n    }\n\n    if (isVisitable(value)) {\n      return true;\n    }\n\n    formData.append(renderKey(path, key, dots), convertValue(value));\n\n    return false;\n  }\n\n  const exposedHelpers = Object.assign(predicates, {\n    defaultVisitor,\n    convertValue,\n    isVisitable,\n  });\n\n  function build(value, path, depth = 0) {\n    if (utils.isUndefined(value)) return;\n\n    throwIfMaxDepthExceeded(depth);\n\n    if (stack.indexOf(value) !== -1) {\n      throw new Error('Circular reference detected in ' + path.join('.'));\n    }\n\n    stack.push(value);\n\n    utils.forEach(value, function each(el, key) {\n      const result =\n        !(utils.isUndefined(el) || el === null) &&\n        visitor.call(formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers);\n\n      if (result === true) {\n        build(el, path ? path.concat(key) : [key], depth + 1);\n      }\n    });\n\n    stack.pop();\n  }\n\n  if (!utils.isObject(obj)) {\n    throw new TypeError('data must be an object');\n  }\n\n  build(obj);\n\n  return formData;\n}\n\nexport default toFormData;\n", "'use strict';\n\nimport toFormData from './toFormData.js';\n\n/**\n * It encodes a string by replacing all characters that are not in the unreserved set with\n * their percent-encoded equivalents\n *\n * @param {string} str - The string to encode.\n *\n * @returns {string} The encoded string.\n */\nfunction encode(str) {\n  const charMap = {\n    '!': '%21',\n    \"'\": '%27',\n    '(': '%28',\n    ')': '%29',\n    '~': '%7E',\n    '%20': '+',\n  };\n  return encodeURIComponent(str).replace(/[!'()~]|%20/g, function replacer(match) {\n    return charMap[match];\n  });\n}\n\n/**\n * It takes a params object and converts it to a FormData object\n *\n * @param {Object<string, any>} params - The parameters to be converted to a FormData object.\n * @param {Object<string, any>} options - The options object passed to the Axios constructor.\n *\n * @returns {void}\n */\nfunction AxiosURLSearchParams(params, options) {\n  this._pairs = [];\n\n  params && toFormData(params, this, options);\n}\n\nconst prototype = AxiosURLSearchParams.prototype;\n\nprototype.append = function append(name, value) {\n  this._pairs.push([name, value]);\n};\n\nprototype.toString = function toString(encoder) {\n  const _encode = encoder\n    ? (value) => encoder.call(this, value, encode)\n    : encode;\n\n  return this._pairs\n    .map(function each(pair) {\n      return _encode(pair[0]) + '=' + _encode(pair[1]);\n    }, '')\n    .join('&');\n};\n\nexport default AxiosURLSearchParams;\n", "'use strict';\n\nimport utils from '../utils.js';\nimport AxiosURLSearchParams from './AxiosURLSearchParams.js';\n\n/**\n * It replaces URL-encoded forms of `:`, `$`, `,`, and spaces with\n * their plain counterparts (`:`, `$`, `,`, `+`).\n *\n * @param {string} val The value to be encoded.\n *\n * @returns {string} The encoded value.\n */\nexport function encode(val) {\n  return encodeURIComponent(val)\n    .replace(/%3A/gi, ':')\n    .replace(/%24/g, '$')\n    .replace(/%2C/gi, ',')\n    .replace(/%20/g, '+');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @param {?(object|Function)} options\n *\n * @returns {string} The formatted url\n */\nexport default function buildURL(url, params, options) {\n  if (!params) {\n    return url;\n  }\n  url = url || '';\n\n  const _options = utils.isFunction(options)\n    ? {\n        serialize: options,\n      }\n    : options;\n\n  // Read serializer options pollution-safely: own properties and methods on a\n  // class/template prototype are honored, but values injected onto a polluted\n  // Object.prototype are ignored.\n  const _encode = utils.getSafeProp(_options, 'encode') || encode;\n  const serializeFn = utils.getSafeProp(_options, 'serialize');\n\n  let serializedParams;\n\n  if (serializeFn) {\n    serializedParams = serializeFn(params, _options);\n  } else {\n    serializedParams = utils.isURLSearchParams(params)\n      ? params.toString()\n      : new AxiosURLSearchParams(params, _options).toString(_encode);\n  }\n\n  if (serializedParams) {\n    const hashmarkIndex = url.indexOf('#');\n\n    if (hashmarkIndex !== -1) {\n      url = url.slice(0, hashmarkIndex);\n    }\n    url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n  }\n\n  return url;\n}\n", "'use strict';\n\nimport utils from '../utils.js';\n\nconst $internals = Symbol('internals');\n\n// `handlers` is public and may be replaced with a nullish value by user code;\n// `clear()` has always tolerated that. Treat it as an empty stack rather than\n// dereferencing it.\nfunction countHandlers(handlers) {\n  return handlers ? handlers.length : 0;\n}\n\nfunction trimHandlers(handlers) {\n  if (!handlers) {\n    return;\n  }\n\n  while (handlers.length && handlers[handlers.length - 1] === null) {\n    handlers.pop();\n  }\n}\n\nfunction syncHandlerEntries(manager, internals) {\n  const handlers = manager.handlers;\n  const length = countHandlers(handlers);\n\n  if (handlers !== internals.handlersRef) {\n    internals.handlersRef = handlers;\n    internals.handlerEntries.clear();\n  } else if (length !== internals.handlersLength) {\n    if (!length) {\n      internals.handlerEntries.clear();\n    } else {\n      internals.handlerEntries.forEach(function removeStaleEntry(entry, id) {\n        if (handlers[entry.index] !== entry.handler) {\n          internals.handlerEntries.delete(id);\n        }\n      });\n    }\n  }\n\n  internals.handlersLength = length;\n}\n\nclass InterceptorManager {\n  constructor() {\n    this.handlers = [];\n    this[$internals] = {\n      handlersRef: this.handlers,\n      handlersLength: this.handlers.length,\n      handlerEntries: new Map(),\n      iterationDepth: 0,\n      nextId: 0,\n    };\n  }\n\n  /**\n   * Add a new interceptor to the stack\n   *\n   * @param {Function} fulfilled The function to handle `then` for a `Promise`\n   * @param {Function} rejected The function to handle `reject` for a `Promise`\n   * @param {Object} options The options for the interceptor, synchronous and runWhen\n   *\n   * @return {Number} An ID used to remove interceptor later\n   */\n  use(fulfilled, rejected, options) {\n    const handler = {\n      fulfilled,\n      rejected,\n      synchronous: options ? options.synchronous : false,\n      runWhen: options ? options.runWhen : null,\n    };\n    const internals = this[$internals];\n\n    if (this.handlers == null) {\n      this.handlers = [];\n    }\n\n    syncHandlerEntries(this, internals);\n\n    const id = internals.nextId++;\n\n    this.handlers.push(handler);\n    internals.handlerEntries.set(id, {\n      handler,\n      index: this.handlers.length - 1,\n    });\n    internals.handlersLength = this.handlers.length;\n\n    return id;\n  }\n\n  /**\n   * Remove an interceptor from the stack\n   *\n   * @param {Number} id The ID that was returned by `use`\n   *\n   * @returns {void}\n   */\n  eject(id) {\n    const internals = this[$internals];\n\n    syncHandlerEntries(this, internals);\n\n    const entry = internals.handlerEntries.get(id);\n\n    if (entry) {\n      internals.handlerEntries.delete(id);\n\n      // Ignore IDs invalidated by clear or direct replacement of handlers.\n      if (this.handlers[entry.index] !== entry.handler) {\n        return;\n      }\n\n      this.handlers[entry.index] = null;\n\n      // Do not reuse an index while forEach is walking its length snapshot.\n      if (!internals.iterationDepth) {\n        trimHandlers(this.handlers);\n        internals.handlersLength = this.handlers.length;\n      }\n    }\n  }\n\n  /**\n   * Clear all interceptors from the stack\n   *\n   * @returns {void}\n   */\n  clear() {\n    if (this.handlers) {\n      this.handlers = [];\n      syncHandlerEntries(this, this[$internals]);\n    }\n  }\n\n  /**\n   * Iterate over all the registered interceptors\n   *\n   * This method is particularly useful for skipping over any\n   * interceptors that may have become `null` calling `eject`.\n   *\n   * @param {Function} fn The function to call for each interceptor\n   *\n   * @returns {void}\n   */\n  forEach(fn) {\n    const internals = this[$internals];\n\n    syncHandlerEntries(this, internals);\n\n    internals.iterationDepth++;\n\n    try {\n      utils.forEach(this.handlers, function forEachHandler(h) {\n        if (h !== null) {\n          fn(h);\n        }\n      });\n    } finally {\n      if (!--internals.iterationDepth) {\n        syncHandlerEntries(this, internals);\n        trimHandlers(this.handlers);\n        internals.handlersLength = countHandlers(this.handlers);\n      }\n    }\n  }\n}\n\nexport default InterceptorManager;\n", "'use strict';\n\nexport default {\n  silentJSONParsing: true,\n  forcedJSONParsing: true,\n  clarifyTimeoutError: false,\n  legacyInterceptorReqResOrdering: true,\n  advertiseZstdAcceptEncoding: false,\n  validateStatusUndefinedResolves: true,\n};\n", "'use strict';\n\nimport AxiosURLSearchParams from '../../../helpers/AxiosURLSearchParams.js';\nexport default typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;\n", "'use strict';\n\nexport default typeof FormData !== 'undefined' ? FormData : null;\n", "'use strict';\n\nexport default typeof Blob !== 'undefined' ? Blob : null;\n", "import URLSearchParams from './classes/URLSearchParams.js';\nimport FormData from './classes/FormData.js';\nimport Blob from './classes/Blob.js';\n\nexport default {\n  isBrowser: true,\n  classes: {\n    URLSearchParams,\n    FormData,\n    Blob,\n  },\n  protocols: ['http', 'https', 'file', 'blob', 'url', 'data'],\n};\n", "const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';\n\nconst _navigator = (typeof navigator === 'object' && navigator) || undefined;\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n *  typeof window -> undefined\n *  typeof document -> undefined\n *\n * react-native:\n *  navigator.product -> 'ReactNative'\n * nativescript\n *  navigator.product -> 'NativeScript' or 'NS'\n *\n * @returns {boolean}\n */\nconst hasStandardBrowserEnv =\n  hasBrowserEnv &&\n  (!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0);\n\n/**\n * Determine if we're running in a standard browser webWorker environment\n *\n * Although the `isStandardBrowserEnv` method indicates that\n * `allows axios to run in a web worker`, the WebWorker will still be\n * filtered out due to its judgment standard\n * `typeof window !== 'undefined' && typeof document !== 'undefined'`.\n * This leads to a problem when axios post `FormData` in webWorker\n */\nconst hasStandardBrowserWebWorkerEnv = (() => {\n  return (\n    typeof WorkerGlobalScope !== 'undefined' &&\n    // eslint-disable-next-line no-undef\n    self instanceof WorkerGlobalScope &&\n    typeof self.importScripts === 'function'\n  );\n})();\n\nconst origin = (hasBrowserEnv && window.location.href) || 'http://localhost';\n\nexport {\n  hasBrowserEnv,\n  hasStandardBrowserWebWorkerEnv,\n  hasStandardBrowserEnv,\n  _navigator as navigator,\n  origin,\n};\n", "import platform from './node/index.js';\nimport * as utils from './common/utils.js';\n\nexport default {\n  ...utils,\n  ...platform,\n};\n", "'use strict';\n\nimport utils from '../utils.js';\nimport toFormData from './toFormData.js';\nimport platform from '../platform/index.js';\n\nexport default function toURLEncodedForm(data, options) {\n  return toFormData(data, new platform.classes.URLSearchParams(), {\n    visitor: function (value, key, path, helpers) {\n      if (platform.isNode && utils.isBuffer(value)) {\n        this.append(key, value.toString('base64'));\n        return false;\n      }\n\n      return helpers.defaultVisitor.apply(this, arguments);\n    },\n    ...options,\n  });\n}\n", "'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\nimport { DEFAULT_FORM_DATA_MAX_DEPTH } from './toFormData.js';\n\nconst MAX_DEPTH = DEFAULT_FORM_DATA_MAX_DEPTH;\n\nfunction throwIfDepthExceeded(index) {\n  if (index > MAX_DEPTH) {\n    throw new AxiosError(\n      'FormData field is too deeply nested (' + index + ' levels). Max depth: ' + MAX_DEPTH,\n      AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED\n    );\n  }\n}\n\n/**\n * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']\n *\n * @param {string} name - The name of the property to get.\n *\n * @returns An array of strings.\n */\nfunction parsePropPath(name) {\n  // foo[x][y][z] -> ['foo', 'x', 'y', 'z']\n  // foo.x.y.z    -> ['foo', 'x', 'y', 'z']\n  // A path is split on `.` and on `[...]` groups. A segment \u2014 whether written\n  // in dot notation or captured inside brackets \u2014 may contain any character\n  // except `.`, `[` and `]`, so a key like `user-name` or `user name` is kept\n  // literal instead of being split (#5402). `.`, `[` and `]` keep their existing\n  // meaning, e.g. `foo[bar.baz]` -> ['foo', 'bar', 'baz'] and `[]` is an array push.\n  // Excluding `[` from the bracket group also makes the match fail fast at the\n  // next `[`, so a malformed name cannot rescan to the end of the string from\n  // every unmatched `[` \u2014 parsing stays linear in the length of the name.\n  const path = [];\n  const pattern = /[^.[\\]]+|\\[([^.[\\]]*)]/g;\n  let match;\n\n  while ((match = pattern.exec(name)) !== null) {\n    throwIfDepthExceeded(path.length);\n    path.push(match[0] === '[]' ? '' : match[1] || match[0]);\n  }\n\n  return path;\n}\n\n/**\n * Convert an array to an object.\n *\n * @param {Array<any>} arr - The array to convert to an object.\n *\n * @returns An object with the same keys and values as the array.\n */\nfunction arrayToObject(arr) {\n  const obj = {};\n  const keys = Object.keys(arr);\n  let i;\n  const len = keys.length;\n  let key;\n  for (i = 0; i < len; i++) {\n    key = keys[i];\n    obj[key] = arr[key];\n  }\n  return obj;\n}\n\n/**\n * It takes a FormData object and returns a JavaScript object\n *\n * @param {string} formData The FormData object to convert to JSON.\n *\n * @returns {Object<string, any> | null} The converted object.\n */\nfunction formDataToJSON(formData) {\n  function buildPath(path, value, target, index) {\n    throwIfDepthExceeded(index);\n\n    let name = path[index++];\n\n    if (name === '__proto__') return true;\n\n    const isNumericKey = Number.isFinite(+name);\n    const isLast = index >= path.length;\n    name = !name && utils.isArray(target) ? target.length : name;\n\n    if (isLast) {\n      if (utils.hasOwnProp(target, name)) {\n        target[name] = utils.isArray(target[name])\n          ? target[name].concat(value)\n          : [target[name], value];\n      } else {\n        target[name] = value;\n      }\n\n      return !isNumericKey;\n    }\n\n    if (!utils.hasOwnProp(target, name) || !utils.isObject(target[name])) {\n      target[name] = [];\n    }\n\n    const result = buildPath(path, value, target[name], index);\n\n    if (result && utils.isArray(target[name])) {\n      target[name] = arrayToObject(target[name]);\n    }\n\n    return !isNumericKey;\n  }\n\n  if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {\n    const obj = {};\n\n    utils.forEachEntry(formData, (name, value) => {\n      buildPath(parsePropPath(name), value, obj, 0);\n    });\n\n    return obj;\n  }\n\n  return null;\n}\n\nexport default formDataToJSON;\n", "'use strict';\n\nconst methodList = Object.freeze([\n  'get',\n  'delete',\n  'head',\n  'options',\n  'post',\n  'put',\n  'patch',\n  'purge',\n  'link',\n  'unlink',\n  'query',\n]);\n\nexport default methodList;\n", "'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\nimport transitionalDefaults from './transitional.js';\nimport toFormData from '../helpers/toFormData.js';\nimport toURLEncodedForm from '../helpers/toURLEncodedForm.js';\nimport platform from '../platform/index.js';\nimport formDataToJSON from '../helpers/formDataToJSON.js';\nimport methodList from '../core/methodList.js';\n\nconst own = (obj, key) => (obj != null && utils.hasOwnProp(obj, key) ? obj[key] : undefined);\n\n/**\n * It takes a string, tries to parse it, and if it fails, it returns the stringified version\n * of the input\n *\n * @param {any} rawValue - The value to be stringified.\n * @param {Function} parser - A function that parses a string into a JavaScript object.\n * @param {Function} encoder - A function that takes a value and returns a string.\n *\n * @returns {string} A stringified version of the rawValue.\n */\nfunction stringifySafely(rawValue, parser, encoder) {\n  if (utils.isString(rawValue)) {\n    try {\n      (parser || JSON.parse)(rawValue);\n      return utils.trim(rawValue);\n    } catch (e) {\n      if (e.name !== 'SyntaxError') {\n        throw e;\n      }\n    }\n  }\n\n  return (encoder || JSON.stringify)(rawValue);\n}\n\nconst defaults = {\n  transitional: transitionalDefaults,\n\n  adapter: ['xhr', 'http', 'fetch'],\n\n  transformRequest: [\n    function transformRequest(data, headers) {\n      const contentType = headers.getContentType() || '';\n      const hasJSONContentType = contentType.indexOf('application/json') > -1;\n      const isObjectPayload = utils.isObject(data);\n\n      if (isObjectPayload && utils.isHTMLForm(data)) {\n        data = new FormData(data);\n      }\n\n      const isFormData = utils.isFormData(data);\n\n      if (isFormData) {\n        return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;\n      }\n\n      if (\n        utils.isArrayBuffer(data) ||\n        utils.isBuffer(data) ||\n        utils.isStream(data) ||\n        utils.isFile(data) ||\n        utils.isBlob(data) ||\n        utils.isReadableStream(data)\n      ) {\n        return data;\n      }\n      if (utils.isArrayBufferView(data)) {\n        return data.buffer;\n      }\n      if (utils.isURLSearchParams(data)) {\n        headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);\n        return data.toString();\n      }\n\n      let isFileList;\n\n      if (isObjectPayload) {\n        const formSerializer = own(this, 'formSerializer');\n        if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {\n          return toURLEncodedForm(data, formSerializer).toString();\n        }\n\n        if (\n          (isFileList = utils.isFileList(data)) ||\n          contentType.indexOf('multipart/form-data') > -1\n        ) {\n          const env = own(this, 'env');\n          const _FormData = env && env.FormData;\n\n          return toFormData(\n            isFileList ? { 'files[]': data } : data,\n            _FormData && new _FormData(),\n            formSerializer\n          );\n        }\n      }\n\n      if (isObjectPayload || hasJSONContentType) {\n        headers.setContentType('application/json', false);\n        return stringifySafely(data);\n      }\n\n      return data;\n    },\n  ],\n\n  transformResponse: [\n    function transformResponse(data) {\n      const transitional = own(this, 'transitional') || defaults.transitional;\n      const forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n      const responseType = own(this, 'responseType');\n      const JSONRequested = responseType === 'json';\n\n      if (utils.isResponse(data) || utils.isReadableStream(data)) {\n        return data;\n      }\n\n      if (\n        data &&\n        utils.isString(data) &&\n        ((forcedJSONParsing && !responseType) || JSONRequested)\n      ) {\n        const silentJSONParsing = transitional && transitional.silentJSONParsing;\n        const strictJSONParsing = !silentJSONParsing && JSONRequested;\n\n        try {\n          return JSON.parse(data, own(this, 'parseReviver'));\n        } catch (e) {\n          if (strictJSONParsing) {\n            if (e.name === 'SyntaxError') {\n              throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, own(this, 'response'));\n            }\n            throw e;\n          }\n        }\n      }\n\n      return data;\n    },\n  ],\n\n  /**\n   * A timeout in milliseconds to abort a request. If set to 0 (default) a\n   * timeout is not created.\n   */\n  timeout: 0,\n\n  xsrfCookieName: 'XSRF-TOKEN',\n  xsrfHeaderName: 'X-XSRF-TOKEN',\n\n  maxContentLength: -1,\n  maxBodyLength: -1,\n\n  env: {\n    FormData: platform.classes.FormData,\n    Blob: platform.classes.Blob,\n  },\n\n  validateStatus: function validateStatus(status) {\n    return status >= 200 && status < 300;\n  },\n\n  headers: {\n    common: {\n      Accept: 'application/json, text/plain, */*',\n      'Content-Type': undefined,\n    },\n  },\n};\n\nutils.forEach(methodList, (method) => {\n  defaults.headers[method] = {};\n});\n\nexport default defaults;\n", "'use strict';\n\nimport utils from '../utils.js';\nimport defaults from '../defaults/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Array|Function} fns A single function or Array of functions\n * @param {?Object} response The response object\n *\n * @returns {*} The resulting transformed data\n */\nexport default function transformData(fns, response) {\n  const config = this || defaults;\n  const context = response || config;\n  const headers = AxiosHeaders.from(context.headers);\n  let data = context.data;\n\n  utils.forEach(fns, function transform(fn) {\n    data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);\n  });\n\n  headers.normalize();\n\n  return data;\n}\n", "'use strict';\n\nexport default function isCancel(value) {\n  return !!(value && value.__CANCEL__);\n}\n", "'use strict';\n\nimport AxiosError from '../core/AxiosError.js';\n\nclass CanceledError extends AxiosError {\n  /**\n   * A `CanceledError` is an object that is thrown when an operation is canceled.\n   *\n   * @param {string=} message The message.\n   * @param {Object=} config The config.\n   * @param {Object=} request The request.\n   *\n   * @returns {CanceledError} The created error.\n   */\n  constructor(message, config, request) {\n    super(message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);\n    this.name = 'CanceledError';\n    this.__CANCEL__ = true;\n  }\n}\n\nexport default CanceledError;\n", "'use strict';\n\nimport AxiosError from './AxiosError.js';\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n *\n * @returns {object} The response.\n */\nexport default function settle(resolve, reject, response) {\n  const validateStatus = response.config.validateStatus;\n  if (!response.status || !validateStatus || validateStatus(response.status)) {\n    resolve(response);\n  } else {\n    reject(new AxiosError(\n      'Request failed with status code ' + response.status,\n      response.status >= 400 && response.status < 500 ? AxiosError.ERR_BAD_REQUEST : AxiosError.ERR_BAD_RESPONSE,\n      response.config,\n      response.request,\n      response\n    ));\n  }\n}\n", "'use strict';\n\nconst urlParserControlCharacters = /[\\t\\n\\r]/g;\n\n/**\n * Match WHATWG URL preprocessing before checking a URL's protocol.\n *\n * @param {string} url\n *\n * @returns {string}\n */\nexport default function normalizeURLForProtocolCheck(url) {\n  if (typeof url !== 'string') {\n    return url;\n  }\n\n  let start = 0;\n\n  while (start < url.length && url.charCodeAt(start) <= 0x20) {\n    start++;\n  }\n\n  return url.slice(start).replace(urlParserControlCharacters, '');\n}\n", "'use strict';\n\nexport default function parseProtocol(url) {\n  const match = /^([-+\\w]{1,25}):(?:\\/\\/)?/.exec(url);\n  return (match && match[1]) || '';\n}\n", "'use strict';\n\n/**\n * Calculate data maxRate\n * @param {Number} [samplesCount= 10]\n * @param {Number} [min= 1000]\n * @returns {Function}\n */\nfunction speedometer(samplesCount, min) {\n  samplesCount = samplesCount || 10;\n  const bytes = new Array(samplesCount);\n  const timestamps = new Array(samplesCount);\n  let head = 0;\n  let tail = 0;\n  let firstSampleTS;\n\n  min = min !== undefined ? min : 1000;\n\n  return function push(chunkLength) {\n    const now = Date.now();\n\n    const startedAt = timestamps[tail];\n\n    if (!firstSampleTS) {\n      firstSampleTS = now;\n    }\n\n    bytes[head] = chunkLength;\n    timestamps[head] = now;\n\n    let i = tail;\n    let bytesCount = 0;\n\n    while (i !== head) {\n      bytesCount += bytes[i++];\n      i = i % samplesCount;\n    }\n\n    head = (head + 1) % samplesCount;\n\n    if (head === tail) {\n      tail = (tail + 1) % samplesCount;\n    }\n\n    if (now - firstSampleTS < min) {\n      return;\n    }\n\n    const passed = startedAt && now - startedAt;\n\n    return passed ? Math.round((bytesCount * 1000) / passed) : undefined;\n  };\n}\n\nexport default speedometer;\n", "/**\n * Throttle decorator\n * @param {Function} fn\n * @param {Number} freq\n * @return {Array<Function>}\n */\nfunction throttle(fn, freq) {\n  let timestamp = 0;\n  let threshold = 1000 / freq;\n  let lastArgs;\n  let timer;\n\n  const invoke = (args, now = Date.now()) => {\n    timestamp = now;\n    lastArgs = null;\n    if (timer) {\n      clearTimeout(timer);\n      timer = null;\n    }\n    fn(...args);\n  };\n\n  const throttled = (...args) => {\n    const now = Date.now();\n    const passed = now - timestamp;\n    if (passed >= threshold) {\n      invoke(args, now);\n    } else {\n      lastArgs = args;\n      if (!timer) {\n        timer = setTimeout(() => {\n          timer = null;\n          invoke(lastArgs);\n        }, threshold - passed);\n      }\n    }\n  };\n\n  const flush = () => lastArgs && invoke(lastArgs);\n  const flushWith = (...args) => invoke(args);\n\n  return [throttled, flush, flushWith];\n}\n\nexport default throttle;\n", "import speedometer from './speedometer.js';\nimport throttle from './throttle.js';\nimport utils from '../utils.js';\n\nexport const progressEventReducer = (listener, isDownloadStream, freq = 3) => {\n  let bytesNotified = 0;\n  const _speedometer = speedometer(50, 250);\n\n  return throttle((e) => {\n    if (!e || !utils.isNumber(e.loaded)) {\n      return;\n    }\n    const rawLoaded = e.loaded;\n    const total = e.lengthComputable ? e.total : undefined;\n    const loaded = Math.max(0, total != null ? Math.min(rawLoaded, total) : rawLoaded);\n    const progressBytes = Math.max(0, loaded - bytesNotified);\n    const rate = _speedometer(progressBytes);\n\n    bytesNotified = Math.max(bytesNotified, loaded);\n\n    const data = {\n      loaded,\n      total,\n      progress: total ? loaded / total : undefined,\n      bytes: progressBytes,\n      rate: rate ? rate : undefined,\n      estimated: rate && total ? (total - loaded) / rate : undefined,\n      event: e,\n      lengthComputable: total != null,\n      [isDownloadStream ? 'download' : 'upload']: true,\n    };\n\n    listener(data);\n  }, freq);\n};\n\nexport const progressEventDecorator = (total, throttled) => {\n  const lengthComputable = total != null;\n\n  return [\n    (loaded) =>\n      throttled[0]({\n        lengthComputable,\n        total,\n        loaded,\n      }),\n    throttled[1],\n  ];\n};\n\nexport const asyncDecorator =\n  (fn, scheduler = utils.asap) =>\n  (...args) =>\n    scheduler(() => fn(...args));\n", "import platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv\n  ? ((origin, isMSIE) => (url) => {\n      url = new URL(url, platform.origin);\n\n      return (\n        origin.protocol === url.protocol &&\n        origin.host === url.host &&\n        (isMSIE || origin.port === url.port)\n      );\n    })(\n      new URL(platform.origin),\n      platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)\n    )\n  : () => true;\n", "import utils from '../utils.js';\nimport platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv\n  ? // Standard browser envs support document.cookie\n    {\n      write(name, value, expires, path, domain, secure, sameSite) {\n        if (typeof document === 'undefined') return;\n\n        const cookie = [`${name}=${encodeURIComponent(value)}`];\n\n        if (utils.isNumber(expires)) {\n          cookie.push(`expires=${new Date(expires).toUTCString()}`);\n        }\n        if (utils.isString(path)) {\n          cookie.push(`path=${path}`);\n        }\n        if (utils.isString(domain)) {\n          cookie.push(`domain=${domain}`);\n        }\n        if (secure === true) {\n          cookie.push('secure');\n        }\n        if (utils.isString(sameSite)) {\n          cookie.push(`SameSite=${sameSite}`);\n        }\n\n        document.cookie = cookie.join('; ');\n      },\n\n      read(name) {\n        if (typeof document === 'undefined') return null;\n        // Match name=value by splitting on the semicolon separator instead of building a\n        // RegExp from `name` \u2014 interpolating an unescaped string into a RegExp would let\n        // metacharacters (e.g. `.+?` in an attacker-influenced cookie name) cause ReDoS or\n        // match the wrong cookie. Browsers may serialize cookie pairs as either \";\" or\n        // \"; \", so ignore optional whitespace before each cookie name.\n        const cookies = document.cookie.split(';');\n        for (let i = 0; i < cookies.length; i++) {\n          const cookie = cookies[i].replace(/^\\s+/, '');\n          const eq = cookie.indexOf('=');\n          if (eq !== -1 && cookie.slice(0, eq) === name) {\n            try {\n              return decodeURIComponent(cookie.slice(eq + 1));\n            } catch (e) {\n              return cookie.slice(eq + 1);\n            }\n          }\n        }\n        return null;\n      },\n\n      remove(name) {\n        this.write(name, '', Date.now() - 86400000, '/');\n      },\n    }\n  : // Non-standard browser env (web workers, react-native) lack needed support.\n    {\n      write() {},\n      read() {\n        return null;\n      },\n      remove() {},\n    };\n", "'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n *\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nexport default function isAbsoluteURL(url) {\n  // A URL is considered absolute if it begins with \"<scheme>://\" or \"//\" (protocol-relative URL).\n  // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n  // by any combination of letters, digits, plus, period, or hyphen.\n  if (typeof url !== 'string') {\n    return false;\n  }\n\n  return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n", "'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nexport default function combineURLs(baseURL, relativeURL) {\n  if (!relativeURL) {\n    return baseURL;\n  }\n\n  let end = baseURL.length;\n\n  while (end > 0 && baseURL.charCodeAt(end - 1) === 47) {\n    end--;\n  }\n\n  return baseURL.slice(0, end) + '/' + relativeURL.replace(/^\\/+/, '');\n}\n", "'use strict';\n\nimport AxiosError, { REDACTED } from './AxiosError.js';\nimport isAbsoluteURL from '../helpers/isAbsoluteURL.js';\nimport combineURLs from '../helpers/combineURLs.js';\nimport normalizeURLForProtocolCheck from '../helpers/normalizeURLForProtocolCheck.js';\n\nconst malformedHttpProtocol = /^https?:(?!\\/\\/)/i;\n\n// Redact the parts of a URL that can carry secrets before it is embedded in an\n// error message. AxiosError.toJSON() serializes `message` verbatim and errors\n// are commonly logged, while the opt-in `config.redact` model only cleans\n// config keys \u2014 it cannot reach the message. Redact only the genuinely\n// sensitive substrings \u2014 userinfo (credentials), query parameter values and\n// fragment contents \u2014 with the same REDACTED marker the config redaction uses,\n// while keeping the scheme, host, path and parameter names so the offending\n// request stays accurately identifiable.\nfunction redactFragment(fragment) {\n  if (!fragment) {\n    return fragment;\n  }\n\n  return fragment.replace(/(^|&)([^=&]*=)?[^&]+/g, (match, separator, parameterName = '') => {\n    return `${separator}${parameterName}${REDACTED}`;\n  });\n}\n\nfunction redactSensitiveURLParts(url) {\n  const redactedURL = url.replace(/^(https?:\\/{0,2})[^/?#]*@/i, `$1${REDACTED}@`);\n  const fragmentIndex = redactedURL.indexOf('#');\n  const urlWithoutFragment =\n    fragmentIndex === -1 ? redactedURL : redactedURL.slice(0, fragmentIndex);\n  const redactedURLWithoutFragment = urlWithoutFragment.replace(\n    /([?&][^=&#]*=)[^&#]*/g,\n    `$1${REDACTED}`\n  );\n\n  if (fragmentIndex === -1) {\n    return redactedURLWithoutFragment;\n  }\n\n  return `${redactedURLWithoutFragment}#${redactFragment(redactedURL.slice(fragmentIndex + 1))}`;\n}\n\nfunction assertValidHttpProtocolURL(url, config) {\n  if (typeof url === 'string') {\n    const normalizedURL = normalizeURLForProtocolCheck(url);\n    if (malformedHttpProtocol.test(normalizedURL)) {\n      throw new AxiosError(\n        `Invalid URL ${JSON.stringify(redactSensitiveURLParts(normalizedURL))}: missing \"//\" after protocol`,\n        AxiosError.ERR_INVALID_URL,\n        config\n      );\n    }\n  }\n}\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n *\n * @returns {string} The combined full path\n */\nexport default function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls, config) {\n  assertValidHttpProtocolURL(requestedURL, config);\n  let isRelativeUrl = !isAbsoluteURL(requestedURL);\n  if (baseURL && (isRelativeUrl || allowAbsoluteUrls === false)) {\n    assertValidHttpProtocolURL(baseURL, config);\n    return combineURLs(baseURL, requestedURL);\n  }\n  return requestedURL;\n}\n", "'use strict';\n\nimport utils from '../utils.js';\nimport AxiosHeaders from './AxiosHeaders.js';\n\nconst headersToObject = (thing) => (thing instanceof AxiosHeaders ? { ...thing } : thing);\n\nconst ownEnumerableKeys = (thing) => {\n  if (Object.getOwnPropertySymbols && Object.getOwnPropertyDescriptor) {\n    return Object.keys(thing).concat(\n      Object.getOwnPropertySymbols(thing).filter(\n        (symbol) => Object.getOwnPropertyDescriptor(thing, symbol).enumerable\n      )\n    );\n  }\n  return Object.keys(thing);\n};\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n *\n * @returns {Object} New object resulting from merging config2 to config1\n */\nexport default function mergeConfig(config1, config2) {\n  // eslint-disable-next-line no-param-reassign\n  config1 = config1 || {};\n  config2 = config2 || {};\n\n  // Use a null-prototype object so that downstream reads such as `config.auth`\n  // or `config.baseURL` cannot inherit polluted values from Object.prototype.\n  // `hasOwnProperty` is restored as a non-enumerable own slot to preserve\n  // ergonomics for user code that relies on it.\n  const config = Object.create(null);\n  Object.defineProperty(config, 'hasOwnProperty', {\n    // Null-proto descriptor so a polluted Object.prototype.get cannot turn\n    // this data descriptor into an accessor descriptor on the way in.\n    __proto__: null,\n    value: Object.prototype.hasOwnProperty,\n    enumerable: false,\n    writable: true,\n    configurable: true,\n  });\n\n  function getMergedValue(target, source, prop, caseless) {\n    if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n      return utils.merge.call({ caseless }, target, source);\n    } else if (utils.isPlainObject(source)) {\n      return utils.merge({}, source);\n    } else if (utils.isArray(source)) {\n      return source.slice();\n    }\n    return source;\n  }\n\n  function mergeDeepProperties(a, b, prop, caseless) {\n    if (!utils.isUndefined(b)) {\n      return getMergedValue(a, b, prop, caseless);\n    } else if (!utils.isUndefined(a)) {\n      return getMergedValue(undefined, a, prop, caseless);\n    }\n  }\n\n  // eslint-disable-next-line consistent-return\n  function valueFromConfig2(a, b) {\n    if (!utils.isUndefined(b)) {\n      return getMergedValue(undefined, b);\n    }\n  }\n\n  // eslint-disable-next-line consistent-return\n  function defaultToConfig2(a, b) {\n    if (!utils.isUndefined(b)) {\n      return getMergedValue(undefined, b);\n    } else if (!utils.isUndefined(a)) {\n      return getMergedValue(undefined, a);\n    }\n  }\n\n  function getMergedTransitionalOption(prop) {\n    const transitional2 = utils.hasOwnProp(config2, 'transitional')\n      ? config2.transitional\n      : undefined;\n\n    if (!utils.isUndefined(transitional2)) {\n      if (utils.isPlainObject(transitional2)) {\n        if (utils.hasOwnProp(transitional2, prop)) {\n          return transitional2[prop];\n        }\n      } else {\n        return undefined;\n      }\n    }\n\n    const transitional1 = utils.hasOwnProp(config1, 'transitional')\n      ? config1.transitional\n      : undefined;\n\n    if (utils.isPlainObject(transitional1) && utils.hasOwnProp(transitional1, prop)) {\n      return transitional1[prop];\n    }\n\n    return undefined;\n  }\n\n  // eslint-disable-next-line consistent-return\n  function mergeDirectKeys(a, b, prop) {\n    if (utils.hasOwnProp(config2, prop)) {\n      return getMergedValue(a, b);\n    } else if (utils.hasOwnProp(config1, prop)) {\n      return getMergedValue(undefined, a);\n    }\n  }\n\n  const mergeMap = {\n    url: valueFromConfig2,\n    method: valueFromConfig2,\n    data: valueFromConfig2,\n    baseURL: defaultToConfig2,\n    transformRequest: defaultToConfig2,\n    transformResponse: defaultToConfig2,\n    paramsSerializer: defaultToConfig2,\n    timeout: defaultToConfig2,\n    timeoutErrorMessage: defaultToConfig2,\n    withCredentials: defaultToConfig2,\n    withXSRFToken: defaultToConfig2,\n    adapter: defaultToConfig2,\n    responseType: defaultToConfig2,\n    xsrfCookieName: defaultToConfig2,\n    xsrfHeaderName: defaultToConfig2,\n    onUploadProgress: defaultToConfig2,\n    onDownloadProgress: defaultToConfig2,\n    decompress: defaultToConfig2,\n    maxContentLength: defaultToConfig2,\n    maxBodyLength: defaultToConfig2,\n    beforeRedirect: defaultToConfig2,\n    transport: defaultToConfig2,\n    httpAgent: defaultToConfig2,\n    httpsAgent: defaultToConfig2,\n    cancelToken: defaultToConfig2,\n    socketPath: defaultToConfig2,\n    allowedSocketPaths: defaultToConfig2,\n    responseEncoding: defaultToConfig2,\n    validateStatus: mergeDirectKeys,\n    headers: (a, b, prop) =>\n      mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true),\n  };\n\n  utils.forEach(ownEnumerableKeys({ ...config1, ...config2 }), function computeConfigValue(prop) {\n    if (prop === '__proto__' || prop === 'constructor' || prop === 'prototype') return;\n    const merge = utils.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;\n    const a = utils.hasOwnProp(config1, prop) ? config1[prop] : undefined;\n    const b = utils.hasOwnProp(config2, prop) ? config2[prop] : undefined;\n    const configValue = merge(a, b, prop);\n    (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n  });\n\n  if (\n    utils.hasOwnProp(config2, 'validateStatus') &&\n    utils.isUndefined(config2.validateStatus) &&\n    getMergedTransitionalOption('validateStatusUndefinedResolves') === false\n  ) {\n    if (utils.hasOwnProp(config1, 'validateStatus')) {\n      config.validateStatus = getMergedValue(undefined, config1.validateStatus);\n    } else {\n      delete config.validateStatus;\n    }\n  }\n\n  return config;\n}\n", "'use strict';\n\nconst FORM_DATA_CONTENT_HEADERS = ['content-type', 'content-length'];\n\n/**\n * Apply the headers generated by a FormData implementation to the request headers,\n * honoring the `formDataHeaderPolicy` option: with 'content-only', copy only the\n * content-* headers; otherwise merge all of them.\n *\n * @param {AxiosHeaders} headers - the request headers to mutate\n * @param {Object | null | undefined} formHeaders - headers produced by the FormData implementation\n * @param {String} [policy] - the resolved `formDataHeaderPolicy` config value\n *\n * @returns {void}\n */\nexport default function setFormDataHeaders(headers, formHeaders, policy) {\n  if (policy !== 'content-only') {\n    headers.set(formHeaders);\n    return;\n  }\n\n  Object.entries(formHeaders || {}).forEach(([key, val]) => {\n    if (FORM_DATA_CONTENT_HEADERS.includes(key.toLowerCase())) {\n      headers.set(key, val);\n    }\n  });\n}\n", "import platform from '../platform/index.js';\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\nimport isURLSameOrigin from './isURLSameOrigin.js';\nimport cookies from './cookies.js';\nimport buildFullPath from '../core/buildFullPath.js';\nimport mergeConfig from '../core/mergeConfig.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport setFormDataHeaders from '../core/setFormDataHeaders.js';\nimport buildURL from './buildURL.js';\n\n/**\n * Encode a UTF-8 string to a Latin-1 byte string for use with btoa().\n * This is a modern replacement for the deprecated unescape(encodeURIComponent(str)) pattern.\n *\n * @param {string} str The string to encode\n *\n * @returns {string} UTF-8 bytes as a Latin-1 string\n */\nconst encodeUTF8 = (str) =>\n  encodeURIComponent(str).replace(/%([0-9A-F]{2})/gi, (_, hex) =>\n    String.fromCharCode(parseInt(hex, 16))\n  );\n\nfunction resolveConfig(config) {\n  const newConfig = mergeConfig({}, config);\n\n  // Read only own properties to prevent prototype pollution gadgets\n  // (e.g. Object.prototype.baseURL = 'https://evil.com').\n  const own = (key) => (utils.hasOwnProp(newConfig, key) ? newConfig[key] : undefined);\n\n  const data = own('data');\n  let withXSRFToken = own('withXSRFToken');\n  const xsrfHeaderName = own('xsrfHeaderName');\n  const xsrfCookieName = own('xsrfCookieName');\n  let headers = own('headers');\n  const auth = own('auth');\n  const baseURL = own('baseURL');\n  const allowAbsoluteUrls = own('allowAbsoluteUrls');\n  const url = own('url');\n\n  newConfig.headers = headers = AxiosHeaders.from(headers);\n\n  newConfig.url = buildURL(\n    buildFullPath(baseURL, url, allowAbsoluteUrls, newConfig),\n    own('params'),\n    own('paramsSerializer')\n  );\n\n  // HTTP basic authentication\n  if (auth) {\n    const username = utils.getSafeProp(auth, 'username') || '';\n    const password = utils.getSafeProp(auth, 'password') || '';\n\n    try {\n      headers.set(\n        'Authorization',\n        'Basic ' + btoa(username + ':' + (password ? encodeUTF8(password) : ''))\n      );\n    } catch (e) {\n      throw AxiosError.from(e, AxiosError.ERR_BAD_OPTION_VALUE, config);\n    }\n  }\n\n  if (utils.isFormData(data)) {\n    const getHeaders = utils.getSafeProp(data, 'getHeaders');\n\n    if (\n      platform.hasStandardBrowserEnv ||\n      platform.hasStandardBrowserWebWorkerEnv ||\n      utils.isReactNative(data)\n    ) {\n      headers.setContentType(undefined); // browser/web worker/RN handles it\n    } else if (utils.isFunction(getHeaders)) {\n      // Node.js FormData (like form-data package)\n      setFormDataHeaders(headers, getHeaders.call(data), own('formDataHeaderPolicy'));\n    }\n  }\n\n  // Add xsrf header\n  // This is only done if running in a standard browser environment.\n  // Specifically not if we're in a web worker, or react-native.\n\n  if (platform.hasStandardBrowserEnv) {\n    if (utils.isFunction(withXSRFToken)) {\n      withXSRFToken = withXSRFToken(newConfig);\n    }\n\n    // Strict boolean check \u2014 prevents proto-pollution gadgets (e.g. Object.prototype.withXSRFToken = 1)\n    // and misconfigurations (e.g. \"false\") from short-circuiting the same-origin check and leaking\n    // the XSRF token cross-origin.\n    const shouldSendXSRF =\n      withXSRFToken === true || (withXSRFToken == null && isURLSameOrigin(newConfig.url));\n\n    if (shouldSendXSRF) {\n      const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);\n\n      if (xsrfValue) {\n        headers.set(xsrfHeaderName, xsrfValue);\n      }\n    }\n  }\n\n  return newConfig;\n}\n\nexport default resolveConfig;\n", "import utils from '../utils.js';\nimport settle from '../core/settle.js';\nimport transitionalDefaults from '../defaults/transitional.js';\nimport AxiosError from '../core/AxiosError.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport normalizeURLForProtocolCheck from '../helpers/normalizeURLForProtocolCheck.js';\nimport parseProtocol from '../helpers/parseProtocol.js';\nimport platform from '../platform/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport { progressEventReducer } from '../helpers/progressEventReducer.js';\nimport resolveConfig from '../helpers/resolveConfig.js';\nimport { toByteStringHeaderObject } from '../helpers/sanitizeHeaderValue.js';\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\nexport default isXHRAdapterSupported &&\n  function (config) {\n    return new Promise(function dispatchXhrRequest(resolve, reject) {\n      const _config = resolveConfig(config);\n      let requestData = _config.data;\n      const requestHeaders = AxiosHeaders.from(_config.headers).normalize();\n      let { responseType, onUploadProgress, onDownloadProgress } = _config;\n      let onCanceled;\n      let uploadThrottled, downloadThrottled;\n      let flushUpload, flushDownload, flushDownloadWithEvent;\n\n      function done() {\n        flushUpload && flushUpload(); // flush events\n        flushDownload && flushDownload(); // flush events\n\n        _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);\n\n        _config.signal && _config.signal.removeEventListener('abort', onCanceled);\n      }\n\n      let request = new XMLHttpRequest();\n\n      request.open(_config.method.toUpperCase(), _config.url, true);\n\n      // Set the request timeout in MS\n      request.timeout = _config.timeout;\n\n      function onloadend(event) {\n        if (!request) {\n          return;\n        }\n\n        // Status 0 means no response was received, which onerror and onabort normally\n        // reject before this runs. Firefox 152 fires only readystatechange and loadend for\n        // navigation-canceled requests (https://bugzilla.mozilla.org/show_bug.cgi?id=1505389),\n        // leaving settle() to resolve them as an empty success. ECONNABORTED is the error\n        // onabort raised on Firefox 151. Reads over file:, which some environments report as\n        // status 0 on success, are excluded by the request URL's scheme after browser-style\n        // preprocessing, by the page origin's scheme for relative URLs (which inherit it), or\n        // by responseURL where implemented.\n        if (\n          request.status === 0 &&\n          (parseProtocol(normalizeURLForProtocolCheck(_config.url)) ||\n            parseProtocol(platform.origin)) !== 'file' &&\n          !(request.responseURL && request.responseURL.startsWith('file:'))\n        ) {\n          reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n          done();\n\n          // Clean up request\n          request = null;\n          return;\n        }\n\n        // When loadend is still dispatching, flushing with it gives progress\n        // listeners a final delivery whose event has a live target. The legacy\n        // ready-state fallback has no event, so replay its pending progress.\n        // A throwing listener must not block settlement; rethrow asynchronously,\n        // matching how listener errors surface on the throttle timer path.\n        try {\n          if (event) {\n            flushDownloadWithEvent && flushDownloadWithEvent(event);\n          } else {\n            flushDownload && flushDownload();\n          }\n        } catch (err) {\n          setTimeout(() => {\n            throw err;\n          });\n        }\n\n        // A final progress callback can cancel the request synchronously.\n        if (!request) {\n          return;\n        }\n\n        // Prepare the response\n        const responseHeaders = AxiosHeaders.from(\n          'getAllResponseHeaders' in request && request.getAllResponseHeaders()\n        );\n        const responseData =\n          !responseType || responseType === 'text' || responseType === 'json'\n            ? request.responseText\n            : request.response;\n        const response = {\n          data: responseData,\n          status: request.status,\n          statusText: request.statusText,\n          headers: responseHeaders,\n          config,\n          request,\n        };\n\n        settle(\n          function _resolve(value) {\n            resolve(value);\n            done();\n          },\n          function _reject(err) {\n            reject(err);\n            done();\n          },\n          response\n        );\n\n        // Clean up request\n        request = null;\n      }\n\n      if ('onloadend' in request) {\n        // Use onloadend if available\n        request.onloadend = onloadend;\n      } else {\n        // Listen for ready state to emulate onloadend\n        request.onreadystatechange = function handleLoad() {\n          if (!request || request.readyState !== 4) {\n            return;\n          }\n\n          // The request errored out and we didn't get a response, this will be\n          // handled by onerror instead\n          // With one exception: request that using file: protocol, most browsers\n          // will return status as 0 even though it's a successful request\n          if (\n            request.status === 0 &&\n            !(request.responseURL && request.responseURL.startsWith('file:'))\n          ) {\n            return;\n          }\n          // readystate handler is calling before onerror or ontimeout handlers,\n          // so we should call onloadend on the next 'tick'\n          setTimeout(onloadend);\n        };\n      }\n\n      // Handle browser request cancellation (as opposed to a manual cancellation)\n      request.onabort = function handleAbort() {\n        if (!request) {\n          return;\n        }\n\n        reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n        done();\n\n        // Clean up request\n        request = null;\n      };\n\n      // Handle low level network errors\n      request.onerror = function handleError(event) {\n        // Browsers deliver a ProgressEvent in XHR onerror\n        // (message may be empty; when present, surface it)\n        // See https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/error_event\n        const msg = event && event.message ? event.message : 'Network Error';\n        const err = new AxiosError(msg, AxiosError.ERR_NETWORK, config, request);\n        // attach the underlying event for consumers who want details\n        err.event = event || null;\n        reject(err);\n        done();\n        request = null;\n      };\n\n      // Handle timeout\n      request.ontimeout = function handleTimeout() {\n        let timeoutErrorMessage = _config.timeout\n          ? 'timeout of ' + _config.timeout + 'ms exceeded'\n          : 'timeout exceeded';\n        const transitional = _config.transitional || transitionalDefaults;\n        if (_config.timeoutErrorMessage) {\n          timeoutErrorMessage = _config.timeoutErrorMessage;\n        }\n        reject(\n          new AxiosError(\n            timeoutErrorMessage,\n            transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n            config,\n            request\n          )\n        );\n        done();\n\n        // Clean up request\n        request = null;\n      };\n\n      // Remove Content-Type if data is undefined\n      requestData === undefined && requestHeaders.setContentType(null);\n\n      // Add headers to the request\n      if ('setRequestHeader' in request) {\n        utils.forEach(toByteStringHeaderObject(requestHeaders), function setRequestHeader(val, key) {\n          request.setRequestHeader(key, val);\n        });\n      }\n\n      // Add withCredentials to request if needed\n      if (!utils.isUndefined(_config.withCredentials)) {\n        request.withCredentials = !!_config.withCredentials;\n      }\n\n      // Add responseType to request if needed\n      if (responseType && responseType !== 'json') {\n        request.responseType = _config.responseType;\n      }\n\n      // Handle progress if needed\n      if (onDownloadProgress) {\n        [downloadThrottled, flushDownload, flushDownloadWithEvent] = progressEventReducer(\n          onDownloadProgress,\n          true\n        );\n        request.addEventListener('progress', downloadThrottled);\n      }\n\n      // Not all browsers support upload events\n      if (onUploadProgress && request.upload) {\n        [uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress);\n\n        request.upload.addEventListener('progress', uploadThrottled);\n\n        request.upload.addEventListener('loadend', flushUpload);\n      }\n\n      if (_config.cancelToken || _config.signal) {\n        // Handle cancellation\n        // eslint-disable-next-line func-names\n        onCanceled = (cancel) => {\n          if (!request) {\n            return;\n          }\n          reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);\n          request.abort();\n          done();\n          request = null;\n        };\n\n        _config.cancelToken && _config.cancelToken.subscribe(onCanceled);\n        if (_config.signal) {\n          _config.signal.aborted\n            ? onCanceled()\n            : _config.signal.addEventListener('abort', onCanceled);\n        }\n      }\n\n      const protocol = parseProtocol(_config.url);\n\n      if (protocol && !platform.protocols.includes(protocol)) {\n        reject(\n          new AxiosError(\n            'Unsupported protocol ' + protocol + ':',\n            AxiosError.ERR_BAD_REQUEST,\n            config\n          )\n        );\n        done();\n        return;\n      }\n\n      // Send the request\n      request.send(requestData || null);\n    });\n  };\n", "import CanceledError from '../cancel/CanceledError.js';\nimport AxiosError from '../core/AxiosError.js';\nimport utils from '../utils.js';\n\nconst composeSignals = (signals, timeout) => {\n  signals = signals ? signals.filter(Boolean) : [];\n\n  if (!timeout && !signals.length) {\n    return;\n  }\n\n  const controller = new AbortController();\n\n  let aborted = false;\n\n  const onabort = function (reason) {\n    if (!aborted) {\n      aborted = true;\n      unsubscribe();\n      const err = reason instanceof Error ? reason : this.reason;\n      controller.abort(\n        err instanceof AxiosError\n          ? err\n          : new CanceledError(err instanceof Error ? err.message : err)\n      );\n    }\n  };\n\n  let timer =\n    timeout &&\n    setTimeout(() => {\n      timer = null;\n      onabort(new AxiosError(`timeout of ${timeout}ms exceeded`, AxiosError.ETIMEDOUT));\n    }, timeout);\n\n  const unsubscribe = () => {\n    if (!signals) { return; }\n    timer && clearTimeout(timer);\n    timer = null;\n    signals.forEach((signal) => {\n      signal.unsubscribe\n        ? signal.unsubscribe(onabort)\n        : signal.removeEventListener('abort', onabort);\n    });\n    signals = null;\n  };\n\n  signals.forEach((signal) => {\n    if (aborted) {\n      return;\n    }\n\n    if (signal.aborted) {\n      onabort.call(signal);\n      return;\n    }\n\n    signal.addEventListener('abort', onabort, { once: true });\n  });\n\n  const { signal } = controller;\n\n  signal.unsubscribe = () => utils.asap(unsubscribe);\n\n  return signal;\n};\n\nexport default composeSignals;\n", "export const streamChunk = function* (chunk, chunkSize) {\n  let len = chunk.byteLength;\n\n  if (!chunkSize || len < chunkSize) {\n    yield chunk;\n    return;\n  }\n\n  let pos = 0;\n  let end;\n\n  while (pos < len) {\n    end = pos + chunkSize;\n    yield chunk.slice(pos, end);\n    pos = end;\n  }\n};\n\nexport const readBytes = async function* (iterable, chunkSize) {\n  for await (const chunk of readStream(iterable)) {\n    yield* streamChunk(chunk, chunkSize);\n  }\n};\n\nconst readStream = async function* (stream) {\n  if (stream[Symbol.asyncIterator]) {\n    yield* stream;\n    return;\n  }\n\n  const reader = stream.getReader();\n  try {\n    for (;;) {\n      const { done, value } = await reader.read();\n      if (done) {\n        break;\n      }\n      yield value;\n    }\n  } finally {\n    await reader.cancel();\n  }\n};\n\nexport const trackStream = (stream, chunkSize, onProgress, onFinish) => {\n  const iterator = readBytes(stream, chunkSize);\n\n  let bytes = 0;\n  let done;\n  let _onFinish = (e) => {\n    if (!done) {\n      done = true;\n      onFinish && onFinish(e);\n    }\n  };\n\n  return new ReadableStream(\n    {\n      async pull(controller) {\n        try {\n          const { done, value } = await iterator.next();\n\n          if (done) {\n            _onFinish();\n            controller.close();\n            return;\n          }\n\n          let len = value.byteLength;\n          if (onProgress) {\n            let loadedBytes = (bytes += len);\n            onProgress(loadedBytes);\n          }\n          controller.enqueue(new Uint8Array(value));\n        } catch (err) {\n          _onFinish(err);\n          throw err;\n        }\n      },\n      cancel(reason) {\n        _onFinish(reason);\n        return iterator.return();\n      },\n    },\n    {\n      highWaterMark: 2,\n    }\n  );\n};\n", "/**\n * Estimate data: URL byte lengths *without* allocating large buffers.\n * - Fetch percent-decodes a base64 body before decoding it.\n * - Node's Buffer.from(body, 'base64') sizes its backing allocation from the\n *   raw body, including ignored characters and content after padding.\n * - Non-base64 data is percent-decoded and then encoded as UTF-8.\n */\nconst isHexDigit = (charCode) =>\n  (charCode >= 48 && charCode <= 57) ||\n  (charCode >= 65 && charCode <= 70) ||\n  (charCode >= 97 && charCode <= 102);\n\nconst isPercentEncodedByte = (str, i, len) =>\n  i + 2 < len && isHexDigit(str.charCodeAt(i + 1)) && isHexDigit(str.charCodeAt(i + 2));\n\nconst hexValue = (charCode) => (charCode <= 57 ? charCode - 48 : (charCode & 0xdf) - 55);\n\nconst isBase64Char = (charCode) =>\n  (charCode >= 65 && charCode <= 90) || // A-Z\n  (charCode >= 97 && charCode <= 122) || // a-z\n  (charCode >= 48 && charCode <= 57) || // 0-9\n  charCode === 43 || // +\n  charCode === 47 || // /\n  charCode === 45 || // - (base64url)\n  charCode === 95; // _ (base64url)\n\nconst isBase64Whitespace = (charCode) =>\n  charCode === 9 || charCode === 10 || charCode === 12 || charCode === 13 || charCode === 32;\n\nconst base64Bytes = (significant) => {\n  const groups = Math.floor(significant / 4);\n  const remainder = significant % 4;\n  return groups * 3 + (remainder === 2 ? 1 : remainder === 3 ? 2 : 0);\n};\n\n// Buffer.byteLength(body, 'base64') uses the raw string length as an allocation\n// upper bound even when Buffer.from later ignores characters or stops at '='.\nconst estimateBase64BufferAllocation = (body) => {\n  const len = body.length;\n  let padding = 0;\n\n  if (len > 0 && body.charCodeAt(len - 1) === 61 /* '=' */) {\n    padding++;\n\n    if (len > 1 && body.charCodeAt(len - 2) === 61 /* '=' */) {\n      padding++;\n    }\n  }\n\n  return Math.floor(((len - padding) * 3) / 4);\n};\n\nconst estimatePercentDecodedBase64Bytes = (body) => {\n  const len = body.length;\n  let significant = 0;\n  let padding = 0;\n  let invalid = false;\n\n  for (let i = 0; i < len; i++) {\n    let code = body.charCodeAt(i);\n\n    if (code === 37 /* '%' */ && isPercentEncodedByte(body, i, len)) {\n      code = hexValue(body.charCodeAt(i + 1)) * 16 + hexValue(body.charCodeAt(i + 2));\n      i += 2;\n    }\n\n    if (isBase64Whitespace(code)) {\n      continue;\n    }\n\n    if (code === 61 /* '=' */) {\n      padding++;\n      continue;\n    }\n\n    if (!isBase64Char(code) || padding > 0) {\n      invalid = true;\n      continue;\n    }\n\n    significant++;\n  }\n\n  // Fetch rejects malformed forgiving-base64 input. Returning the raw-size\n  // allocation bound keeps that invalid input from becoming a pre-check bypass.\n  if (\n    invalid ||\n    padding > 2 ||\n    (padding > 0 && (significant + padding) % 4 !== 0) ||\n    significant % 4 === 1\n  ) {\n    return estimateBase64BufferAllocation(body);\n  }\n\n  return base64Bytes(significant);\n};\n\nconst estimateDataURLBytes = (url, estimateBase64) => {\n  if (!url || typeof url !== 'string') return 0;\n  if (!url.startsWith('data:')) return 0;\n\n  const comma = url.indexOf(',');\n  if (comma < 0) return 0;\n\n  const meta = url.slice(5, comma);\n  const body = url.slice(comma + 1);\n  const isBase64 = /;base64/i.test(meta);\n\n  if (isBase64) {\n    return estimateBase64(body);\n  }\n\n  // Compute UTF-8 byte length directly from UTF-16 code units without allocating\n  // a byte buffer (TextEncoder.encode would defeat the DoS guard on large bodies).\n  // Valid %XX triplets count as one decoded byte; this matches the bytes that\n  // decodeURIComponent(body) would produce before Buffer re-encodes the string.\n  let bytes = 0;\n  for (let i = 0, len = body.length; i < len; i++) {\n    const c = body.charCodeAt(i);\n    if (c === 37 /* '%' */ && isPercentEncodedByte(body, i, len)) {\n      bytes += 1;\n      i += 2;\n    } else if (c < 0x80) {\n      bytes += 1;\n    } else if (c < 0x800) {\n      bytes += 2;\n    } else if (c >= 0xd800 && c <= 0xdbff && i + 1 < len) {\n      const next = body.charCodeAt(i + 1);\n      if (next >= 0xdc00 && next <= 0xdfff) {\n        bytes += 4;\n        i++;\n      } else {\n        bytes += 3;\n      }\n    } else {\n      bytes += 3;\n    }\n  }\n  return bytes;\n};\n\n/**\n * Estimate the percent-decoded payload size used by Fetch data: URLs.\n *\n * @param {string} url\n * @returns {number}\n */\nexport default function estimateDataURLDecodedBytes(url) {\n  // Fetch removes URL fragments before processing a data: URL.\n  const fragmentIndex = typeof url === 'string' ? url.indexOf('#') : -1;\n\n  return estimateDataURLBytes(\n    fragmentIndex === -1 ? url : url.slice(0, fragmentIndex),\n    estimatePercentDecodedBase64Bytes\n  );\n}\n\n/**\n * Estimate the Buffer backing allocation used by Node's raw base64 decoder.\n *\n * @param {string} url\n * @returns {number}\n */\nexport function estimateDataURLBufferAllocation(url) {\n  return estimateDataURLBytes(url, estimateBase64BufferAllocation);\n}\n", "export const VERSION = \"1.20.0\";", "import platform from '../platform/index.js';\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\nimport composeSignals from '../helpers/composeSignals.js';\nimport { trackStream } from '../helpers/trackStream.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport {\n  progressEventReducer,\n  progressEventDecorator,\n  asyncDecorator,\n} from '../helpers/progressEventReducer.js';\nimport resolveConfig from '../helpers/resolveConfig.js';\nimport settle from '../core/settle.js';\nimport estimateDataURLDecodedBytes from '../helpers/estimateDataURLDecodedBytes.js';\nimport { VERSION } from '../env/data.js';\nimport { toByteStringHeaderObject } from '../helpers/sanitizeHeaderValue.js';\n\nconst DEFAULT_CHUNK_SIZE = 64 * 1024;\n\nconst DEFAULT_REQUEST_OPTIONS = {\n  cache: 'default',\n  redirect: 'follow',\n  referrer: 'about:client',\n  referrerPolicy: '',\n  mode: 'cors',\n  integrity: '',\n  keepalive: false,\n  priority: 'auto',\n  window: null,\n};\n\nconst { isFunction } = utils;\n\n/**\n * Encode a UTF-8 string to a Latin-1 byte string for use with btoa().\n * This is a modern replacement for the deprecated unescape(encodeURIComponent(str)) pattern.\n *\n * @param {string} str The string to encode\n *\n * @returns {string} UTF-8 bytes as a Latin-1 string\n */\nconst encodeUTF8 = (str) =>\n  encodeURIComponent(str).replace(/%([0-9A-F]{2})/gi, (_, hex) =>\n    String.fromCharCode(parseInt(hex, 16))\n  );\n\n// Node's WHATWG URL parser returns `username` and `password` percent-encoded.\n// Decode before composing the `auth` option so credentials such as\n// `my%40email.com:pass` are sent as `my@email.com:pass`. Falls back to the\n// original value for malformed input so a bad encoding never throws.\nconst decodeURIComponentSafe = (value) => {\n  if (!utils.isString(value)) {\n    return value;\n  }\n\n  try {\n    return decodeURIComponent(value);\n  } catch (error) {\n    return value;\n  }\n};\n\nconst test = (fn, ...args) => {\n  try {\n    return !!fn(...args);\n  } catch (e) {\n    return false;\n  }\n};\n\nconst maybeWithAuthCredentials = (url) => {\n  const protocolIndex = url.indexOf('://');\n  let urlToCheck = url;\n  if (protocolIndex !== -1) {\n    urlToCheck = urlToCheck.slice(protocolIndex + 3);\n  }\n  return urlToCheck.includes('@') || urlToCheck.includes(':');\n};\n\nconst factory = (env) => {\n  const globalObject =\n    utils.global !== undefined && utils.global !== null ? utils.global : globalThis;\n  const { ReadableStream, TextEncoder } = globalObject;\n\n  env = utils.merge.call(\n    {\n      skipUndefined: true,\n    },\n    {\n      Request: globalObject.Request,\n      Response: globalObject.Response,\n    },\n    env\n  );\n\n  const { fetch: envFetch, Request, Response } = env;\n  const isFetchSupported = envFetch ? isFunction(envFetch) : typeof fetch === 'function';\n  const isRequestSupported = isFunction(Request);\n  const isResponseSupported = isFunction(Response);\n\n  if (!isFetchSupported) {\n    return false;\n  }\n\n  const isReadableStreamSupported = isFetchSupported && isFunction(ReadableStream);\n\n  const encodeText =\n    isFetchSupported &&\n    (typeof TextEncoder === 'function'\n      ? (\n          (encoder) => (str) =>\n            encoder.encode(str)\n        )(new TextEncoder())\n      : async (str) => new Uint8Array(await new Request(str).arrayBuffer()));\n\n  const supportsRequestStream =\n    isRequestSupported &&\n    isReadableStreamSupported &&\n    test(() => {\n      let duplexAccessed = false;\n\n      const request = new Request(platform.origin, {\n        body: new ReadableStream(),\n        method: 'POST',\n        get duplex() {\n          duplexAccessed = true;\n          return 'half';\n        },\n      });\n\n      const hasContentType = request.headers.has('Content-Type');\n\n      if (request.body != null) {\n        request.body.cancel();\n      }\n\n      return duplexAccessed && !hasContentType;\n    });\n\n  const supportsResponseStream =\n    isResponseSupported &&\n    isReadableStreamSupported &&\n    test(() => utils.isReadableStream(new Response('').body));\n\n  const resolvers = {\n    stream: supportsResponseStream && ((res) => res.body),\n  };\n\n  isFetchSupported &&\n    (() => {\n      ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach((type) => {\n        !resolvers[type] &&\n          (resolvers[type] = (res, config) => {\n            let method = res && res[type];\n\n            if (method) {\n              return method.call(res);\n            }\n\n            throw new AxiosError(\n              `Response type '${type}' is not supported`,\n              AxiosError.ERR_NOT_SUPPORT,\n              config\n            );\n          });\n      });\n    })();\n\n  const getBodyLength = async (body) => {\n    if (body == null) {\n      return 0;\n    }\n\n    if (utils.isBlob(body)) {\n      return body.size;\n    }\n\n    if (utils.isSpecCompliantForm(body)) {\n      const _request = new Request(platform.origin, {\n        method: 'POST',\n        body,\n      });\n      return (await _request.arrayBuffer()).byteLength;\n    }\n\n    if (utils.isArrayBufferView(body) || utils.isArrayBuffer(body)) {\n      return body.byteLength;\n    }\n\n    if (utils.isURLSearchParams(body)) {\n      body = body + '';\n    }\n\n    if (utils.isString(body)) {\n      return (await encodeText(body)).byteLength;\n    }\n  };\n\n  const resolveBodyLength = async (headers, body) => {\n    const length = utils.toFiniteNumber(headers.getContentLength());\n\n    return length == null ? getBodyLength(body) : length;\n  };\n\n  return async (config) => {\n    let {\n      url,\n      method,\n      data,\n      signal,\n      cancelToken,\n      timeout,\n      onDownloadProgress,\n      onUploadProgress,\n      responseType,\n      headers,\n      withCredentials = 'same-origin',\n      fetchOptions,\n      maxContentLength,\n      maxBodyLength,\n      maxRedirects,\n    } = resolveConfig(config);\n\n    const hasMaxContentLength = utils.isNumber(maxContentLength) && maxContentLength > -1;\n    const hasMaxBodyLength = utils.isNumber(maxBodyLength) && maxBodyLength > -1;\n    const own = (key) => (utils.hasOwnProp(config, key) ? config[key] : undefined);\n\n    let _fetch = envFetch || fetch;\n\n    responseType = responseType ? (responseType + '').toLowerCase() : 'text';\n\n    let composedSignal = composeSignals(\n      [signal, cancelToken && cancelToken.toAbortSignal()],\n      timeout\n    );\n\n    let request = null;\n\n    const unsubscribe =\n      composedSignal &&\n      composedSignal.unsubscribe &&\n      (() => {\n        composedSignal.unsubscribe();\n      });\n\n    let requestContentLength;\n\n    // AxiosError we raise while the request body is being streamed. Captured\n    // by identity so the catch block can surface it directly, regardless of\n    // how the runtime wraps the resulting fetch rejection (undici exposes it\n    // as `err.cause`; some browsers drop the original error entirely).\n    let pendingBodyError = null;\n\n    const maxBodyLengthError = () =>\n      new AxiosError(\n        'Request body larger than maxBodyLength limit',\n        AxiosError.ERR_BAD_REQUEST,\n        config,\n        request\n      );\n\n    try {\n      // HTTP basic authentication\n      let auth = undefined;\n      const configAuth = own('auth');\n\n      if (configAuth) {\n        const username = utils.getSafeProp(configAuth, 'username') || '';\n        const password = utils.getSafeProp(configAuth, 'password') || '';\n        auth = {\n          username,\n          password,\n        };\n      }\n\n      if (maybeWithAuthCredentials(url)) {\n        const parsedURL = new URL(url, platform.origin);\n\n        if (!auth && (parsedURL.username || parsedURL.password)) {\n          const urlUsername = decodeURIComponentSafe(parsedURL.username);\n          const urlPassword = decodeURIComponentSafe(parsedURL.password);\n          auth = {\n            username: urlUsername,\n            password: urlPassword,\n          };\n        }\n\n        if (parsedURL.username || parsedURL.password) {\n          parsedURL.username = '';\n          parsedURL.password = '';\n          url = parsedURL.href;\n        }\n      }\n\n      if (auth) {\n        headers.delete('authorization');\n        headers.set(\n          'Authorization',\n          'Basic ' + btoa(encodeUTF8((auth.username || '') + ':' + (auth.password || '')))\n        );\n      }\n\n      // Enforce maxContentLength for data: URLs up-front so we never materialize\n      // an oversized payload. The HTTP adapter applies the same check (see http.js\n      // \"if (protocol === 'data:')\" branch).\n      if (hasMaxContentLength && typeof url === 'string' && url.startsWith('data:')) {\n        const estimated = estimateDataURLDecodedBytes(url);\n        if (estimated > maxContentLength) {\n          throw new AxiosError(\n            'maxContentLength size of ' + maxContentLength + ' exceeded',\n            AxiosError.ERR_BAD_RESPONSE,\n            config,\n            request\n          );\n        }\n      }\n\n      // Enforce maxBodyLength against known-size bodies before dispatch using\n      // the body's *actual* size \u2014 never a caller-declared Content-Length,\n      // which could under-report to slip an oversized body past the check.\n      // Unknown-size streams return undefined here and are counted per-chunk\n      // below as fetch consumes them.\n      if (hasMaxBodyLength && method !== 'get' && method !== 'head') {\n        const outboundLength = await getBodyLength(data);\n        if (typeof outboundLength === 'number' && isFinite(outboundLength)) {\n          requestContentLength = outboundLength;\n          if (outboundLength > maxBodyLength) {\n            throw maxBodyLengthError();\n          }\n        }\n      }\n\n      // A streamed body under maxBodyLength must be counted as fetch consumes\n      // it; its size is never trusted from a caller-declared Content-Length.\n      const mustEnforceStreamBody =\n        hasMaxBodyLength && (utils.isReadableStream(data) || utils.isStream(data));\n\n      const trackRequestStream = (stream, onProgress, flush) =>\n        trackStream(\n          stream,\n          DEFAULT_CHUNK_SIZE,\n          (loadedBytes) => {\n            if (hasMaxBodyLength && loadedBytes > maxBodyLength) {\n              throw (pendingBodyError = maxBodyLengthError());\n            }\n            onProgress && onProgress(loadedBytes);\n          },\n          flush\n        );\n\n      if (\n        supportsRequestStream &&\n        method !== 'get' &&\n        method !== 'head' &&\n        (onUploadProgress || mustEnforceStreamBody)\n      ) {\n        requestContentLength =\n          requestContentLength == null\n            ? await resolveBodyLength(headers, data)\n            : requestContentLength;\n\n        // A declared length of 0 is only trusted to skip the wrap when we are\n        // not enforcing a stream limit (which must not rely on that header).\n        if (requestContentLength !== 0 || mustEnforceStreamBody) {\n          let _request = new Request(url, {\n            method: 'POST',\n            body: data,\n            duplex: 'half',\n          });\n\n          let contentTypeHeader;\n\n          if (\n            utils.isFormData(data) &&\n            (contentTypeHeader = _request.headers.get('content-type'))\n          ) {\n            headers.setContentType(contentTypeHeader);\n          }\n\n          if (_request.body) {\n            const [onProgress, flush] =\n              (onUploadProgress &&\n                progressEventDecorator(\n                  requestContentLength,\n                  progressEventReducer(asyncDecorator(onUploadProgress))\n                )) ||\n              [];\n\n            data = trackRequestStream(_request.body, onProgress, flush);\n          }\n        }\n      } else if (\n        mustEnforceStreamBody &&\n        !isRequestSupported &&\n        isReadableStreamSupported &&\n        method !== 'get' &&\n        method !== 'head'\n      ) {\n        data = trackRequestStream(data);\n      } else if (\n        mustEnforceStreamBody &&\n        isRequestSupported &&\n        !supportsRequestStream &&\n        method !== 'get' &&\n        method !== 'head'\n      ) {\n        throw new AxiosError(\n          'Stream request bodies are not supported by the current fetch implementation',\n          AxiosError.ERR_NOT_SUPPORT,\n          config,\n          request\n        );\n      }\n\n      if (!utils.isString(withCredentials)) {\n        withCredentials = withCredentials ? 'include' : 'omit';\n      }\n\n      // Cloudflare Workers throws when credentials are defined\n      // see https://github.com/cloudflare/workerd/issues/902\n      const isCredentialsSupported = isRequestSupported && 'credentials' in Request.prototype;\n\n      // If data is FormData and Content-Type is multipart/form-data without boundary,\n      // delete it so fetch can set it correctly with the boundary\n      if (utils.isFormData(data)) {\n        const contentType = headers.getContentType();\n        if (\n          contentType &&\n          /^multipart\\/form-data/i.test(contentType) &&\n          !/boundary=/i.test(contentType)\n        ) {\n          headers.delete('content-type');\n        }\n      }\n\n      // Set User-Agent header if not already set (fetch defaults to 'node' in Node.js)\n      headers.set('User-Agent', 'axios/' + VERSION, false);\n\n      const safeFetchOptions =\n        fetchOptions == null ? fetchOptions : Object.assign(Object.create(null), fetchOptions);\n\n      if (safeFetchOptions) {\n        // These options are owned by Axios and are already reflected in the\n        // resolved Request passed to fetch.\n        delete safeFetchOptions.body;\n        delete safeFetchOptions.headers;\n        delete safeFetchOptions.method;\n        delete safeFetchOptions.signal;\n        delete safeFetchOptions.duplex;\n        delete safeFetchOptions.credentials;\n      }\n\n      const resolvedOptions = Object.assign(Object.create(null), safeFetchOptions, {\n        signal: composedSignal,\n        method: method.toUpperCase(),\n        headers: toByteStringHeaderObject(headers.normalize()),\n        body: data,\n        duplex: 'half',\n        credentials: isCredentialsSupported ? withCredentials : undefined,\n      });\n\n      if (isRequestSupported) {\n        utils.forEach(DEFAULT_REQUEST_OPTIONS, (value, key) => {\n          if (resolvedOptions[key] === undefined) {\n            resolvedOptions[key] = value;\n          }\n        });\n\n        if (resolvedOptions.signal === undefined) {\n          resolvedOptions.signal = null;\n        }\n\n        if (resolvedOptions.body === undefined) {\n          resolvedOptions.body = null;\n        }\n      }\n\n      if (maxRedirects === 0) {\n        resolvedOptions.redirect = 'manual';\n\n        if (safeFetchOptions) {\n          safeFetchOptions.redirect = 'manual';\n        }\n      }\n\n      request = isRequestSupported && new Request(url, resolvedOptions);\n\n      let response = await (isRequestSupported\n        ? _fetch(request, safeFetchOptions)\n        : _fetch(url, resolvedOptions));\n\n      const responseHeaders = AxiosHeaders.from(response.headers);\n\n      // Cheap pre-check: if the server honestly declares a content-length that\n      // already exceeds the cap, reject before we start streaming.\n      if (hasMaxContentLength) {\n        const declaredLength = utils.toFiniteNumber(responseHeaders.getContentLength());\n        if (declaredLength != null && declaredLength > maxContentLength) {\n          throw new AxiosError(\n            'maxContentLength size of ' + maxContentLength + ' exceeded',\n            AxiosError.ERR_BAD_RESPONSE,\n            config,\n            request\n          );\n        }\n      }\n\n      const isStreamResponse =\n        supportsResponseStream && (responseType === 'stream' || responseType === 'response');\n\n      if (\n        supportsResponseStream &&\n        response.body &&\n        (onDownloadProgress || hasMaxContentLength || (isStreamResponse && unsubscribe))\n      ) {\n        const options = {};\n\n        ['status', 'statusText', 'headers'].forEach((prop) => {\n          options[prop] = response[prop];\n        });\n\n        const responseContentLength = utils.toFiniteNumber(responseHeaders.getContentLength());\n\n        const [onProgress, flush] =\n          (onDownloadProgress &&\n            progressEventDecorator(\n              responseContentLength,\n              progressEventReducer(asyncDecorator(onDownloadProgress), true)\n            )) ||\n          [];\n\n        let bytesRead = 0;\n        const onChunkProgress = (loadedBytes) => {\n          if (hasMaxContentLength) {\n            bytesRead = loadedBytes;\n            if (bytesRead > maxContentLength) {\n              throw new AxiosError(\n                'maxContentLength size of ' + maxContentLength + ' exceeded',\n                AxiosError.ERR_BAD_RESPONSE,\n                config,\n                request\n              );\n            }\n          }\n          onProgress && onProgress(loadedBytes);\n        };\n\n        response = new Response(\n          trackStream(response.body, DEFAULT_CHUNK_SIZE, onChunkProgress, () => {\n            flush && flush();\n            unsubscribe && unsubscribe();\n          }),\n          options\n        );\n      }\n\n      responseType = responseType || 'text';\n\n      let responseData = await resolvers[utils.findKey(resolvers, responseType) || 'text'](\n        response,\n        config\n      );\n\n      // Fallback enforcement for environments without ReadableStream support\n      // (legacy runtimes). Detect materialized size from typed output; skip\n      // streams/Response passthrough since the user will read those themselves.\n      if (hasMaxContentLength && !supportsResponseStream && !isStreamResponse) {\n        let materializedSize;\n        if (responseData != null) {\n          if (typeof responseData.byteLength === 'number') {\n            materializedSize = responseData.byteLength;\n          } else if (typeof responseData.size === 'number') {\n            materializedSize = responseData.size;\n          } else if (typeof responseData === 'string') {\n            materializedSize =\n              typeof TextEncoder === 'function'\n                ? new TextEncoder().encode(responseData).byteLength\n                : responseData.length;\n          }\n        }\n        if (typeof materializedSize === 'number' && materializedSize > maxContentLength) {\n          throw new AxiosError(\n            'maxContentLength size of ' + maxContentLength + ' exceeded',\n            AxiosError.ERR_BAD_RESPONSE,\n            config,\n            request\n          );\n        }\n      }\n\n      !isStreamResponse && unsubscribe && unsubscribe();\n\n      return await new Promise((resolve, reject) => {\n        settle(resolve, reject, {\n          data: responseData,\n          headers: AxiosHeaders.from(response.headers),\n          status: response.status,\n          statusText: response.statusText,\n          config,\n          request,\n        });\n      });\n    } catch (err) {\n      unsubscribe && unsubscribe();\n\n      // Safari can surface fetch aborts as a DOMException-like object whose\n      // branded getters throw. Prefer our composed signal reason before reading\n      // the caught error, preserving timeout vs cancellation semantics.\n      if (composedSignal && composedSignal.aborted && composedSignal.reason instanceof AxiosError) {\n        const canceledError = composedSignal.reason;\n        canceledError.config = config;\n        request && (canceledError.request = request);\n        if (err !== canceledError) {\n          // Non-enumerable to match native Error `cause` semantics so loggers\n          // don't recurse into circular fetch internals (see #7205).\n          Object.defineProperty(canceledError, 'cause', {\n            __proto__: null,\n            value: err,\n            writable: true,\n            enumerable: false,\n            configurable: true,\n          });\n        }\n        throw canceledError;\n      }\n\n      // Surface a maxBodyLength violation we raised while the request body was\n      // being streamed. Matching by identity (rather than reading\n      // `err.cause.isAxiosError`) keeps the error deterministic across runtimes\n      // and avoids both prototype-pollution reads and mis-attributing a foreign\n      // AxiosError that merely happened to land in `err.cause`.\n      if (pendingBodyError) {\n        request && !pendingBodyError.request && (pendingBodyError.request = request);\n        throw pendingBodyError;\n      }\n\n      // Re-throw AxiosErrors we raised synchronously (data: URL / content-length\n      // pre-checks, response size enforcement) without re-wrapping them.\n      if (err instanceof AxiosError) {\n        request && !err.request && (err.request = request);\n        throw err;\n      }\n\n      if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {\n        const networkError = new AxiosError(\n          'Network Error',\n          AxiosError.ERR_NETWORK,\n          config,\n          request,\n          err && err.response\n        );\n        // Non-enumerable to match native Error `cause` semantics so loggers\n        // don't recurse into circular fetch internals (see #7205).\n        Object.defineProperty(networkError, 'cause', {\n          __proto__: null,\n          value: err.cause || err,\n          writable: true,\n          enumerable: false,\n          configurable: true,\n        });\n        throw networkError;\n      }\n\n      throw AxiosError.from(err, err && err.code, config, request, err && err.response);\n    }\n  };\n};\n\nconst seedCache = new Map();\n\nexport const getFetch = (config) => {\n  let env = (config && config.env) || {};\n  const { fetch, Request, Response } = env;\n  const seeds = [Request, Response, fetch];\n\n  let len = seeds.length,\n    i = len,\n    seed,\n    target,\n    map = seedCache;\n\n  while (i--) {\n    seed = seeds[i];\n    target = map.get(seed);\n\n    target === undefined && map.set(seed, (target = i ? new Map() : factory(env)));\n\n    map = target;\n  }\n\n  return target;\n};\n\nconst adapter = getFetch();\n\nexport default adapter;\n", "import utils from '../utils.js';\nimport httpAdapter from './http.js';\nimport xhrAdapter from './xhr.js';\nimport * as fetchAdapter from './fetch.js';\nimport AxiosError from '../core/AxiosError.js';\n\n/**\n * Known adapters mapping.\n * Provides environment-specific adapters for Axios:\n * - `http` for Node.js\n * - `xhr` for browsers\n * - `fetch` for fetch API-based requests\n *\n * @type {Object<string, Function|Object>}\n */\nconst knownAdapters = {\n  http: httpAdapter,\n  xhr: xhrAdapter,\n  fetch: {\n    get: fetchAdapter.getFetch,\n  },\n};\n\n// Assign adapter names for easier debugging and identification\nutils.forEach(knownAdapters, (fn, value) => {\n  if (fn) {\n    try {\n      // Null-proto descriptors so a polluted Object.prototype.get cannot turn\n      // these data descriptors into accessor descriptors on the way in.\n      Object.defineProperty(fn, 'name', { __proto__: null, value });\n    } catch (e) {\n      // eslint-disable-next-line no-empty\n    }\n    Object.defineProperty(fn, 'adapterName', { __proto__: null, value });\n  }\n});\n\n/**\n * Render a rejection reason string for unknown or unsupported adapters\n *\n * @param {string} reason\n * @returns {string}\n */\nconst renderReason = (reason) => `- ${reason}`;\n\n/**\n * Check if the adapter is resolved (function, null, or false)\n *\n * @param {Function|null|false} adapter\n * @returns {boolean}\n */\nconst isResolvedHandle = (adapter) =>\n  utils.isFunction(adapter) || adapter === null || adapter === false;\n\n/**\n * Get the first suitable adapter from the provided list.\n * Tries each adapter in order until a supported one is found.\n * Throws an AxiosError if no adapter is suitable.\n *\n * @param {Array<string|Function>|string|Function} adapters - Adapter(s) by name or function.\n * @param {Object} config - Axios request configuration\n * @throws {AxiosError} If no suitable adapter is available\n * @returns {Function} The resolved adapter function\n */\nfunction getAdapter(adapters, config) {\n  adapters = utils.isArray(adapters) ? adapters : [adapters];\n\n  const { length } = adapters;\n  let nameOrAdapter;\n  let adapter;\n\n  const rejectedReasons = {};\n\n  for (let i = 0; i < length; i++) {\n    nameOrAdapter = adapters[i];\n    let id;\n\n    adapter = nameOrAdapter;\n\n    if (!isResolvedHandle(nameOrAdapter)) {\n      adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];\n\n      if (adapter === undefined) {\n        throw new AxiosError(`Unknown adapter '${id}'`);\n      }\n    }\n\n    if (adapter && (utils.isFunction(adapter) || (adapter = adapter.get(config)))) {\n      break;\n    }\n\n    rejectedReasons[id || '#' + i] = adapter;\n  }\n\n  if (!adapter) {\n    const reasons = Object.entries(rejectedReasons).map(\n      ([id, state]) =>\n        `adapter ${id} ` +\n        (state === false ? 'is not supported by the environment' : 'is not available in the build')\n    );\n\n    let s = length\n      ? reasons.length > 1\n        ? 'since :\\n' + reasons.map(renderReason).join('\\n')\n        : ' ' + renderReason(reasons[0])\n      : 'as no adapter specified';\n\n    throw new AxiosError(\n      `There is no suitable adapter to dispatch the request ` + s,\n      AxiosError.ERR_NOT_SUPPORT\n    );\n  }\n\n  return adapter;\n}\n\n/**\n * Exports Axios adapters and utility to resolve an adapter\n */\nexport default {\n  /**\n   * Resolve an adapter from a list of adapter names or functions.\n   * @type {Function}\n   */\n  getAdapter,\n\n  /**\n   * Exposes all known adapters\n   * @type {Object<string, Function|Object>}\n   */\n  adapters: knownAdapters,\n};\n", "'use strict';\n\nimport transformData from './transformData.js';\nimport isCancel from '../cancel/isCancel.js';\nimport defaults from '../defaults/index.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport adapters from '../adapters/adapters.js';\nimport utils from '../utils.js';\n\n/**\n * Throws a `CanceledError` if cancellation has been requested.\n *\n * @param {Object} config The config that is to be used for the request\n *\n * @returns {void}\n */\nfunction throwIfCancellationRequested(config) {\n  if (config.cancelToken) {\n    config.cancelToken.throwIfRequested();\n  }\n\n  if (config.signal && config.signal.aborted) {\n    throw new CanceledError(null, config);\n  }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n *\n * @returns {Promise} The Promise to be fulfilled\n */\nexport default function dispatchRequest(_config) {\n  // Interceptors may replace the merged config with an ordinary object. Flatten\n  // it at the dispatch boundary so shared prototype members cannot become\n  // request behavior, while preserving intentional template/class members.\n  const config = utils.toSafeFlatObject(_config);\n\n  throwIfCancellationRequested(config);\n\n  config.headers = AxiosHeaders.from(utils.getSafeProp(config, 'headers'));\n\n  // Transform request data\n  config.data = transformData.call(config, config.transformRequest);\n\n  if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {\n    config.headers.setContentType('application/x-www-form-urlencoded', false);\n  }\n\n  const adapter = adapters.getAdapter(config.adapter || defaults.adapter, config);\n\n  return adapter(config).then(\n    function onAdapterResolution(response) {\n      throwIfCancellationRequested(config);\n\n      // Expose the current response on config so that transformResponse can\n      // attach it to any AxiosError it throws (e.g. on JSON parse failure).\n      // We clean it up afterwards to avoid polluting the config object.\n      config.response = response;\n      try {\n        response.data = transformData.call(config, config.transformResponse, response);\n      } finally {\n        delete config.response;\n      }\n\n      response.headers = AxiosHeaders.from(response.headers);\n\n      return response;\n    },\n    function onAdapterRejection(reason) {\n      if (!isCancel(reason)) {\n        throwIfCancellationRequested(config);\n\n        // Transform response data\n        if (reason && reason.response) {\n          config.response = reason.response;\n          try {\n            reason.response.data = transformData.call(\n              config,\n              config.transformResponse,\n              reason.response\n            );\n          } finally {\n            delete config.response;\n          }\n          reason.response.headers = AxiosHeaders.from(reason.response.headers);\n        }\n      }\n\n      return Promise.reject(reason);\n    }\n  );\n}\n", "'use strict';\n\nimport { VERSION } from '../env/data.js';\nimport AxiosError from '../core/AxiosError.js';\n\nconst validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {\n  validators[type] = function validator(thing) {\n    return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n  };\n});\n\nconst deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n *\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n *\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n  function formatMessage(opt, desc) {\n    return (\n      '[Axios v' +\n      VERSION +\n      \"] Transitional option '\" +\n      opt +\n      \"'\" +\n      desc +\n      (message ? '. ' + message : '')\n    );\n  }\n\n  // eslint-disable-next-line func-names\n  return (value, opt, opts) => {\n    if (validator === false) {\n      throw new AxiosError(\n        formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),\n        AxiosError.ERR_DEPRECATED\n      );\n    }\n\n    if (version && !deprecatedWarnings[opt]) {\n      deprecatedWarnings[opt] = true;\n      // eslint-disable-next-line no-console\n      console.warn(\n        formatMessage(\n          opt,\n          ' has been deprecated since v' + version + ' and will be removed in the near future'\n        )\n      );\n    }\n\n    return validator ? validator(value, opt, opts) : true;\n  };\n};\n\nvalidators.spelling = function spelling(correctSpelling) {\n  return (value, opt) => {\n    // eslint-disable-next-line no-console\n    console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);\n    return true;\n  };\n};\n\n/**\n * Assert object's properties type\n *\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n *\n * @returns {object}\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n  if (typeof options !== 'object' || options === null) {\n    throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);\n  }\n  const keys = Object.keys(options);\n  let i = keys.length;\n  while (i-- > 0) {\n    const opt = keys[i];\n    // Use hasOwnProperty so a polluted Object.prototype.<opt> cannot supply\n    // a non-function validator and cause a TypeError.\n    const validator = Object.prototype.hasOwnProperty.call(schema, opt) ? schema[opt] : undefined;\n    if (validator) {\n      const value = options[opt];\n      const result = value === undefined || validator(value, opt, options);\n      if (result !== true) {\n        throw new AxiosError(\n          'option ' + opt + ' must be ' + result,\n          AxiosError.ERR_BAD_OPTION_VALUE\n        );\n      }\n      continue;\n    }\n    if (allowUnknown !== true) {\n      throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);\n    }\n  }\n}\n\nexport default {\n  assertOptions,\n  validators,\n};\n", "'use strict';\n\nimport utils from '../utils.js';\nimport buildURL from '../helpers/buildURL.js';\nimport InterceptorManager from './InterceptorManager.js';\nimport dispatchRequest from './dispatchRequest.js';\nimport mergeConfig from './mergeConfig.js';\nimport buildFullPath from './buildFullPath.js';\nimport methodList from './methodList.js';\nimport validator from '../helpers/validator.js';\nimport AxiosHeaders from './AxiosHeaders.js';\nimport transitionalDefaults from '../defaults/transitional.js';\n\nconst validators = validator.validators;\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n *\n * @return {Axios} A new instance of Axios\n */\nclass Axios {\n  constructor(instanceConfig) {\n    this.defaults = instanceConfig || {};\n    this.interceptors = {\n      request: new InterceptorManager(),\n      response: new InterceptorManager(),\n    };\n  }\n\n  /**\n   * Dispatch a request\n   *\n   * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)\n   * @param {?Object} config\n   *\n   * @returns {Promise} The Promise to be fulfilled\n   */\n  async request(configOrUrl, config) {\n    try {\n      return await this._request(configOrUrl, config);\n    } catch (err) {\n      if (err instanceof Error) {\n        try {\n          let dummy = {};\n\n          Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error());\n\n          const dummyStack = dummy.stack;\n          let stack = '';\n\n          // slice off the Error: ... line\n          if (typeof dummyStack === 'string') {\n            const firstNewlineIndex = dummyStack.indexOf('\\n');\n\n            stack = firstNewlineIndex === -1 ? '' : dummyStack.slice(firstNewlineIndex + 1);\n          }\n\n          if (!err.stack) {\n            err.stack = stack;\n            // match without the 2 top stack lines\n          } else if (stack) {\n            const firstNewlineIndex = stack.indexOf('\\n');\n            const secondNewlineIndex =\n              firstNewlineIndex === -1 ? -1 : stack.indexOf('\\n', firstNewlineIndex + 1);\n            const stackWithoutTwoTopLines =\n              secondNewlineIndex === -1 ? '' : stack.slice(secondNewlineIndex + 1);\n\n            if (!String(err.stack).endsWith(stackWithoutTwoTopLines)) {\n              err.stack += '\\n' + stack;\n            }\n          }\n        } catch (e) {\n          // Ignore failures from custom stack hooks or un-writable stack properties.\n        }\n      }\n\n      throw err;\n    }\n  }\n\n  _request(configOrUrl, config) {\n    /*eslint no-param-reassign:0*/\n    // Allow for axios('example/url'[, config]) a la fetch API\n    if (typeof configOrUrl === 'string') {\n      config = config || {};\n      config.url = configOrUrl;\n    } else {\n      config = configOrUrl || {};\n    }\n\n    config = mergeConfig(this.defaults, config);\n\n    const { transitional, paramsSerializer, headers } = config;\n\n    if (transitional !== undefined) {\n      validator.assertOptions(\n        transitional,\n        {\n          silentJSONParsing: validators.transitional(validators.boolean),\n          forcedJSONParsing: validators.transitional(validators.boolean),\n          clarifyTimeoutError: validators.transitional(validators.boolean),\n          legacyInterceptorReqResOrdering: validators.transitional(validators.boolean),\n          advertiseZstdAcceptEncoding: validators.transitional(validators.boolean),\n          validateStatusUndefinedResolves: validators.transitional(validators.boolean),\n        },\n        false\n      );\n    }\n\n    if (paramsSerializer != null) {\n      if (utils.isFunction(paramsSerializer)) {\n        config.paramsSerializer = {\n          serialize: paramsSerializer,\n        };\n      } else {\n        validator.assertOptions(\n          paramsSerializer,\n          {\n            encode: validators.function,\n            serialize: validators.function,\n          },\n          true\n        );\n      }\n    }\n\n    // Set config.allowAbsoluteUrls\n    if (config.allowAbsoluteUrls !== undefined) {\n      // do nothing\n    } else if (this.defaults.allowAbsoluteUrls !== undefined) {\n      config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;\n    } else {\n      config.allowAbsoluteUrls = true;\n    }\n\n    validator.assertOptions(\n      config,\n      {\n        baseUrl: validators.spelling('baseURL'),\n        withXsrfToken: validators.spelling('withXSRFToken'),\n      },\n      true\n    );\n\n    // Set config.method\n    config.method = (\n      utils.getSafeProp(config, 'method') ||\n      utils.getSafeProp(this.defaults, 'method') ||\n      'get'\n    ).toLowerCase();\n\n    // Flatten headers\n    let contextHeaders = headers && utils.merge(headers.common, headers[config.method]);\n\n    headers &&\n      utils.forEach(methodList.concat('common'), (method) => {\n        delete headers[method];\n      });\n\n    config.headers = AxiosHeaders.concat(contextHeaders, headers);\n\n    // filter out skipped interceptors\n    const requestInterceptorChain = [];\n    let synchronousRequestInterceptors = true;\n    this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n      if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n        return;\n      }\n\n      synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n      const transitional = config.transitional || transitionalDefaults;\n      const legacyInterceptorReqResOrdering =\n        transitional && transitional.legacyInterceptorReqResOrdering;\n\n      if (legacyInterceptorReqResOrdering) {\n        requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n      } else {\n        requestInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n      }\n    });\n\n    const responseInterceptorChain = [];\n    this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n      responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n    });\n\n    let promise;\n    let i = 0;\n    let len;\n\n    if (!synchronousRequestInterceptors) {\n      const chain = [dispatchRequest.bind(this), undefined];\n      chain.unshift(...requestInterceptorChain);\n      chain.push(...responseInterceptorChain);\n      len = chain.length;\n\n      promise = Promise.resolve(config);\n\n      while (i < len) {\n        promise = promise.then(chain[i++], chain[i++]);\n      }\n\n      return promise;\n    }\n\n    len = requestInterceptorChain.length;\n\n    let newConfig = config;\n\n    while (i < len) {\n      const onFulfilled = requestInterceptorChain[i++];\n      const onRejected = requestInterceptorChain[i++];\n      try {\n        newConfig = onFulfilled ? onFulfilled(newConfig) : newConfig;\n      } catch (error) {\n        if (!onRejected) {\n          promise = Promise.reject(error);\n          break;\n        }\n\n        try {\n          const rejectedResult = onRejected.call(this, error);\n\n          if (utils.isThenable(rejectedResult)) {\n            promise = Promise.resolve(rejectedResult).then(() =>\n              dispatchRequest.call(this, newConfig)\n            );\n          }\n        } catch (rejectedError) {\n          promise = Promise.reject(rejectedError);\n        }\n\n        break;\n      }\n    }\n\n    if (!promise) {\n      try {\n        promise = dispatchRequest.call(this, newConfig);\n      } catch (error) {\n        promise = Promise.reject(error);\n      }\n    }\n\n    i = 0;\n    len = responseInterceptorChain.length;\n\n    while (i < len) {\n      promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);\n    }\n\n    return promise;\n  }\n\n  getUri(config) {\n    config = mergeConfig(this.defaults, config);\n    const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls, config);\n    return buildURL(fullPath, config.params, config.paramsSerializer);\n  }\n}\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n  /*eslint func-names:0*/\n  Axios.prototype[method] = function (url, config) {\n    return this.request(\n      mergeConfig(config || {}, {\n        method,\n        url,\n        data: config && utils.hasOwnProp(config, 'data') ? config.data : undefined,\n      })\n    );\n  };\n});\n\nutils.forEach(['post', 'put', 'patch', 'query'], function forEachMethodWithData(method) {\n  function generateHTTPMethod(isForm) {\n    return function httpMethod(url, data, config) {\n      return this.request(\n        mergeConfig(config || {}, {\n          method,\n          headers: isForm\n            ? {\n                'Content-Type': 'multipart/form-data',\n              }\n            : {},\n          url,\n          data,\n        })\n      );\n    };\n  }\n\n  Axios.prototype[method] = generateHTTPMethod();\n\n  // QUERY is a safe/idempotent read method; multipart form bodies don't fit\n  // its semantics, so no queryForm shorthand is generated.\n  if (method !== 'query') {\n    Axios.prototype[method + 'Form'] = generateHTTPMethod(true);\n  }\n});\n\nexport default Axios;\n", "'use strict';\n\nimport CanceledError from './CanceledError.js';\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @param {Function} executor The executor function.\n *\n * @returns {CancelToken}\n */\nclass CancelToken {\n  constructor(executor) {\n    if (typeof executor !== 'function') {\n      throw new TypeError('executor must be a function.');\n    }\n\n    let resolvePromise;\n\n    this.promise = new Promise(function promiseExecutor(resolve) {\n      resolvePromise = resolve;\n    });\n\n    const token = this;\n\n    // eslint-disable-next-line func-names\n    this.promise.then((cancel) => {\n      if (!token._listeners) return;\n\n      let i = token._listeners.length;\n\n      while (i-- > 0) {\n        token._listeners[i](cancel);\n      }\n      token._listeners = null;\n    });\n\n    // eslint-disable-next-line func-names\n    this.promise.then = (onfulfilled) => {\n      let _resolve;\n      // eslint-disable-next-line func-names\n      const promise = new Promise((resolve) => {\n        token.subscribe(resolve);\n        _resolve = resolve;\n      }).then(onfulfilled);\n\n      promise.cancel = function reject() {\n        token.unsubscribe(_resolve);\n      };\n\n      return promise;\n    };\n\n    executor(function cancel(message, config, request) {\n      if (token.reason) {\n        // Cancellation has already been requested\n        return;\n      }\n\n      token.reason = new CanceledError(message, config, request);\n      resolvePromise(token.reason);\n    });\n  }\n\n  /**\n   * Throws a `CanceledError` if cancellation has been requested.\n   */\n  throwIfRequested() {\n    if (this.reason) {\n      throw this.reason;\n    }\n  }\n\n  /**\n   * Subscribe to the cancel signal\n   */\n\n  subscribe(listener) {\n    if (this.reason) {\n      listener(this.reason);\n      return;\n    }\n\n    if (this._listeners) {\n      this._listeners.push(listener);\n    } else {\n      this._listeners = [listener];\n    }\n  }\n\n  /**\n   * Unsubscribe from the cancel signal\n   */\n\n  unsubscribe(listener) {\n    if (!this._listeners) {\n      return;\n    }\n    const index = this._listeners.indexOf(listener);\n    if (index !== -1) {\n      this._listeners.splice(index, 1);\n    }\n  }\n\n  toAbortSignal() {\n    const controller = new AbortController();\n\n    const abort = (err) => {\n      controller.abort(err);\n    };\n\n    this.subscribe(abort);\n\n    controller.signal.unsubscribe = () => this.unsubscribe(abort);\n\n    return controller.signal;\n  }\n\n  /**\n   * Returns an object that contains a new `CancelToken` and a function that, when called,\n   * cancels the `CancelToken`.\n   */\n  static source() {\n    let cancel;\n    const token = new CancelToken(function executor(c) {\n      cancel = c;\n    });\n    return {\n      token,\n      cancel,\n    };\n  }\n}\n\nexport default CancelToken;\n", "'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n *  ```js\n *  function f(x, y, z) {}\n *  const args = [1, 2, 3];\n *  f.apply(null, args);\n *  ```\n *\n * With `spread` this example can be re-written.\n *\n *  ```js\n *  spread(function(x, y, z) {})([1, 2, 3]);\n *  ```\n *\n * @param {Function} callback\n *\n * @returns {Function}\n */\nexport default function spread(callback) {\n  return function wrap(arr) {\n    return callback.apply(null, arr);\n  };\n}\n", "'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n *\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nexport default function isAxiosError(payload) {\n  return utils.isObject(payload) && payload.isAxiosError === true;\n}\n", "const HttpStatusCode = {\n  Continue: 100,\n  SwitchingProtocols: 101,\n  Processing: 102,\n  EarlyHints: 103,\n  Ok: 200,\n  Created: 201,\n  Accepted: 202,\n  NonAuthoritativeInformation: 203,\n  NoContent: 204,\n  ResetContent: 205,\n  PartialContent: 206,\n  MultiStatus: 207,\n  AlreadyReported: 208,\n  ImUsed: 226,\n  MultipleChoices: 300,\n  MovedPermanently: 301,\n  Found: 302,\n  SeeOther: 303,\n  NotModified: 304,\n  UseProxy: 305,\n  Unused: 306,\n  TemporaryRedirect: 307,\n  PermanentRedirect: 308,\n  BadRequest: 400,\n  Unauthorized: 401,\n  PaymentRequired: 402,\n  Forbidden: 403,\n  NotFound: 404,\n  MethodNotAllowed: 405,\n  NotAcceptable: 406,\n  ProxyAuthenticationRequired: 407,\n  RequestTimeout: 408,\n  Conflict: 409,\n  Gone: 410,\n  LengthRequired: 411,\n  PreconditionFailed: 412,\n  /**\n   * @deprecated Use `ContentTooLarge` instead.\n   */\n  PayloadTooLarge: 413,\n  ContentTooLarge: 413,\n  UriTooLong: 414,\n  UnsupportedMediaType: 415,\n  RangeNotSatisfiable: 416,\n  ExpectationFailed: 417,\n  ImATeapot: 418,\n  MisdirectedRequest: 421,\n  /**\n   * @deprecated Use `UnprocessableContent` instead.\n   */\n  UnprocessableEntity: 422,\n  UnprocessableContent: 422,\n  Locked: 423,\n  FailedDependency: 424,\n  TooEarly: 425,\n  UpgradeRequired: 426,\n  PreconditionRequired: 428,\n  TooManyRequests: 429,\n  RequestHeaderFieldsTooLarge: 431,\n  UnavailableForLegalReasons: 451,\n  InternalServerError: 500,\n  NotImplemented: 501,\n  BadGateway: 502,\n  ServiceUnavailable: 503,\n  GatewayTimeout: 504,\n  HttpVersionNotSupported: 505,\n  VariantAlsoNegotiates: 506,\n  InsufficientStorage: 507,\n  LoopDetected: 508,\n  NotExtended: 510,\n  NetworkAuthenticationRequired: 511,\n  WebServerReturnsAnUnknownError: 520,\n  WebServerIsDown: 521,\n  ConnectionTimedOut: 522,\n  OriginIsUnreachable: 523,\n  TimeoutOccurred: 524,\n  SslHandshakeFailed: 525,\n  InvalidSslCertificate: 526,\n};\n\nObject.entries(HttpStatusCode).forEach(([key, value]) => {\n  if (HttpStatusCode[value] === undefined) {\n    HttpStatusCode[value] = key;\n  }\n});\n\nexport default HttpStatusCode;\n", "'use strict';\n\nimport utils from './utils.js';\nimport bind from './helpers/bind.js';\nimport Axios from './core/Axios.js';\nimport mergeConfig from './core/mergeConfig.js';\nimport defaults from './defaults/index.js';\nimport formDataToJSON from './helpers/formDataToJSON.js';\nimport CanceledError from './cancel/CanceledError.js';\nimport CancelToken from './cancel/CancelToken.js';\nimport isCancel from './cancel/isCancel.js';\nimport { VERSION } from './env/data.js';\nimport toFormData from './helpers/toFormData.js';\nimport AxiosError from './core/AxiosError.js';\nimport spread from './helpers/spread.js';\nimport isAxiosError from './helpers/isAxiosError.js';\nimport AxiosHeaders from './core/AxiosHeaders.js';\nimport adapters from './adapters/adapters.js';\nimport HttpStatusCode from './helpers/HttpStatusCode.js';\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n *\n * @returns {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n  const context = new Axios(defaultConfig);\n  const instance = bind(Axios.prototype.request, context);\n\n  // Copy axios.prototype to instance\n  utils.extend(instance, Axios.prototype, context, { allOwnKeys: true });\n\n  // Copy context to instance\n  utils.extend(instance, context, null, { allOwnKeys: true });\n\n  // Factory for creating new instances\n  instance.create = function create(instanceConfig) {\n    return createInstance(mergeConfig(defaultConfig, instanceConfig));\n  };\n\n  return instance;\n}\n\n// Create the default instance to be exported\nconst axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Expose Cancel & CancelToken\naxios.CanceledError = CanceledError;\naxios.CancelToken = CancelToken;\naxios.isCancel = isCancel;\naxios.VERSION = VERSION;\naxios.toFormData = toFormData;\n\n// Expose AxiosError class\naxios.AxiosError = AxiosError;\n\n// alias for CanceledError for backward compatibility\naxios.Cancel = axios.CanceledError;\n\n// Expose all/spread\naxios.all = function all(promises) {\n  return Promise.all(promises);\n};\n\naxios.spread = spread;\n\n// Expose isAxiosError\naxios.isAxiosError = isAxiosError;\n\n// Expose mergeConfig\naxios.mergeConfig = mergeConfig;\n\naxios.AxiosHeaders = AxiosHeaders;\n\naxios.formToJSON = (thing) => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);\n\naxios.getAdapter = adapters.getAdapter;\n\naxios.HttpStatusCode = HttpStatusCode;\n\naxios.default = axios;\n\n// this module should only have a default export\nexport default axios;\n", "import axios from './lib/axios.js';\n\n// This module is intended to unwrap Axios default export as named.\n// Keep top-level export same with static properties\n// so that it can keep same with es module or cjs\nconst {\n  Axios,\n  AxiosError,\n  CanceledError,\n  isCancel,\n  CancelToken,\n  VERSION,\n  all,\n  Cancel,\n  isAxiosError,\n  spread,\n  toFormData,\n  AxiosHeaders,\n  HttpStatusCode,\n  formToJSON,\n  getAdapter,\n  mergeConfig,\n  create,\n} = axios;\n\nexport {\n  axios as default,\n  create,\n  Axios,\n  AxiosError,\n  CanceledError,\n  isCancel,\n  CancelToken,\n  VERSION,\n  all,\n  Cancel,\n  isAxiosError,\n  spread,\n  toFormData,\n  AxiosHeaders,\n  HttpStatusCode,\n  formToJSON,\n  getAdapter,\n  mergeConfig,\n};\n", "import { sentryException } from \"../config/sentry\";\nimport { showFlashMessage } from \"./app\";\n\nexport const RESPONSE_ERROR_401_MESSAGE = \"Access denied.  You may have been logged out.\";\n\nexport const RESPONSE_ERROR_403_MESSAGE =\n  \"Access denied.  You do not appear to have permission to carry out that action.\";\n\nexport const RESPONSE_ERROR_500_MESSAGE =\n  \"We experienced a server error.  We've been notified of the problem and apologize for the inconvenience.\";\n\nexport const REQUEST_ERROR_MESSAGE = \"The server did not respond.  Please try again.\";\n\nexport function defaultHeaders() {\n  const csrfMetaTag = document.querySelector('meta[name=\"csrf-token\"]');\n  const csrfToken = csrfMetaTag ? csrfMetaTag.getAttribute(\"content\") : \"no-token\";\n  const tabId = window.sessionStorage.getItem(\"tabId\");\n\n  return {\n    \"X-CSRF-Token\": csrfToken,\n    \"X-Requested-With\": \"XMLHttpRequest\",\n    \"Content-Type\": \"application/json\",\n    \"X-Tab-Id\": tabId,\n  };\n}\n\nexport const errorHandler = (error) => {\n  if (typeof error === \"string\") {\n    sentryException(error);\n    return;\n  }\n\n  const status = error.response ? error.response.status : undefined;\n\n  if ([401, 403, 404].includes(status)) {\n    // If we encounter one of these, let the standard Rails request/response mechanism deal with it.\n    window.location.reload();\n  } else if (status === 500) {\n    // Let the user know, but the backend should notify us of the 500\n    showFlashMessage({\n      message: \"Sorry, we encountered a server error. An admin has been notified.\",\n      flashType: \"error\",\n    });\n  } else {\n    sentryException(error);\n    console.error(error);\n  }\n};\n\nexport const errorTypeAndMessageFromErrorObj = (error) => {\n  let message;\n  let type;\n  if (error.response) {\n    type = \"response\";\n    const { status } = error.response;\n    if (status === 401) {\n      message = RESPONSE_ERROR_401_MESSAGE;\n    } else if (status === 403) {\n      message = RESPONSE_ERROR_403_MESSAGE;\n    } else if (status === 500) {\n      message = RESPONSE_ERROR_500_MESSAGE;\n    } else {\n      message = `${status} error occurred`;\n    }\n  } else if (error.request) {\n    type = \"request\";\n    message = REQUEST_ERROR_MESSAGE;\n  } else {\n    type = \"code\";\n    message = error.message;\n  }\n  return { type, message };\n};\n", "import { Controller } from \"@hotwired/stimulus\";\nimport axios from \"axios\";\n\nimport { showDialog, zIndexForDialog, isDialogVisible } from \"./helper\";\nimport * as store from \"../../../helpers/local-store\";\nimport * as api from \"../../../helpers/api\";\nimport { elementInfo } from \"../../../helpers/app\";\n\n// Handles the behavior of opening an ir-dialog\nexport default class extends Controller {\n  static values = {\n    closeDialogIdentifier: String,\n    introductionToMarkAsSeen: String,\n    isCurrentUserPresent: Boolean, // Used for tracking introduction dismissals\n    ignore: Boolean,\n    ignoreIfOpenerValueEquals: String, // When the opener is a form element\n    showIfOpenerValueInList: Array, // Show dialog only if opener value is in this list\n    centerDialogOverOpener: { type: Boolean, default: true },\n  };\n\n  connect() {\n    this.valueOnLastEnter = undefined;\n  }\n\n  shouldBlockOpen(openerElement) {\n    if (this.hasIgnoreValue && this.ignoreValue) return true;\n    if (this.hasIgnoreIfOpenerValueEqualsValue) return this.ignoreIfOpenerValueEqualsValue === openerElement.value;\n    if (this.hasShowIfOpenerValueInListValue) return !this.showIfOpenerValueInListValue.includes(openerElement.value);\n    return false;\n  }\n\n  open(event) {\n    event.preventDefault();\n    event.stopPropagation();\n\n    const dialog = this.dialogToOpen(event);\n    if (!dialog) return;\n    if (isDialogVisible(dialog)) return;\n\n    let clickPosition = false;\n    if (this.centerDialogOverOpenerValue) {\n      if (event.type === \"change\") {\n        const elemInfo = elementInfo(event.currentTarget);\n        clickPosition = elemInfo.center;\n      } else if (event.pageX !== undefined) {\n        clickPosition = { x: event.pageX, y: event.pageY };\n      }\n    }\n\n    dialog.focusOnClose = event.currentTarget;\n    if (this.hasCloseDialogIdentifierValue) {\n      const dialogToClose = document.querySelector(`[data-dialog-identifier=\"${this.closeDialogIdentifierValue}\"]`);\n      dialogToClose.style.display = \"none\";\n    }\n\n    const currentValue = event.currentTarget.value;\n    this.valueOnLastEnter = currentValue;\n\n    this.openDialog(dialog, clickPosition);\n\n    if (this.hasIntroductionToMarkAsSeenValue) {\n      this.markIntroductionAsSeen();\n    }\n  }\n\n  openOnEnter(event) {\n    const currentValue = event.currentTarget.value;\n\n    if (event.key === \"Enter\" && currentValue !== this.valueOnLastEnter) {\n      this.valueOnLastEnter = currentValue;\n      this.open(event);\n    }\n  }\n\n  dialogToOpen(event) {\n    if (this.shouldBlockOpen(event.currentTarget)) return;\n    if (event.currentTarget.classList.contains(\"disabled\")) return;\n\n    const dialogIdentifier = event.currentTarget.dataset.dialog;\n    const dialog = document.querySelector(`[data-dialog-identifier=\"${dialogIdentifier}\"]`);\n    if (!dialog) throw `Dialog not found: ${dialogIdentifier}`;\n\n    return dialog;\n  }\n\n  markIntroductionAsSeen() {\n    store.set(this.introductionToMarkAsSeenValue, true);\n\n    if (this.hasIsCurrentUserPresentValue && this.isCurrentUserPresentValue) {\n      axios({\n        method: \"POST\",\n        headers: api.defaultHeaders(),\n        url: \"/introduction_dismissals\",\n        data: { introduction_name: this.introductionToMarkAsSeenValue },\n      }).catch(api.errorHandler);\n    }\n  }\n\n  openDialog = (dialog, clickPosition) => {\n    // Restore default positioning in case the dialog has been dragged to a new position\n    dialog.style.left = \"50%\";\n    dialog.style.top = \"20%\";\n    dialog.style.transform = \"translateX(-50%)\";\n\n    dialog.style.zIndex = zIndexForDialog(dialog);\n\n    let showDialogOpts = {};\n    if (clickPosition) {\n      showDialogOpts.showNearClickPosition = true;\n      showDialogOpts.clickPosition = clickPosition;\n    }\n\n    showDialog(\n      dialog,\n      () => {\n        if (dialog.dataset.autoFocusElementSelector !== undefined) this.focusFirstElement(dialog);\n        const carouselContainer = dialog.querySelector(\".ir-carousel\");\n        if (carouselContainer) {\n          // If the dialog has a carousel, we may need to initialize it because\n          // we can't initialize it while the dialog is hidden.\n          carouselContainer.controller.initSiema();\n        }\n      },\n      showDialogOpts,\n    );\n  };\n\n  focusFirstElement(dialog) {\n    const selector = dialog.dataset.autoFocusElementSelector;\n    const element = dialog.querySelector(selector);\n    if (!element) return;\n    element.focus();\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport { dynamicDialog, showDialog, zIndexForDialog } from \"./helper\";\n\nexport default class extends Controller {\n  clickToOpen(event) {\n    event.preventDefault();\n    event.stopPropagation();\n\n    const clickPosition = { x: event.pageX, y: event.pageY };\n    this.showDetailsDialog(event.params, clickPosition);\n  }\n\n  showDetailsDialog(eventParams, clickPosition) {\n    const { dialogHeader, dialogIdentifier, dialogWidth, dialogBodyMinHeight, turboFrameSrc, turboFrameId } =\n      eventParams;\n\n    const dialog = document.querySelector(`[data-dialog-identifier='${dialogIdentifier}']`);\n\n    if (dialog) {\n      dialog.style.zIndex = zIndexForDialog(dialog);\n      showDialog(dialog, () => {}, { showNearClickPosition: true, clickPosition });\n    } else {\n      dynamicDialog({\n        header: dialogHeader,\n        content: this.detailsTurboFrame(dialogBodyMinHeight, turboFrameId, turboFrameSrc),\n        width: dialogWidth || 600,\n        showNearClickPosition: true,\n        dialogIdentifier,\n        clickPosition,\n      });\n    }\n  }\n\n  detailsTurboFrame(dialogBodyMinHeight, turboFrameId, turboFrameSrc) {\n    return `\n      <div style=\"min-height: ${dialogBodyMinHeight || 450}px;\">\n        <turbo-frame id=\"${turboFrameId}\" src=\"${turboFrameSrc}\">Loading...</turbo-frame>\n      </div>\n      `;\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport * as animate from \"../../helpers/animate\";\n\n// Used to show an element (usually a save button) when fields it saves\n// have changed.\n// your form should start out with an item wrapped in\n//   {style: 'display: none', data: { components__ir_dirty_tracker_target: 'enableable' }}\n// each field that should cause that to be changed to display normally should have\n//   data: { action: 'change->components--ir-dirty-tracker#dirtied' }\n// with text fields or text areas use the input event\n//   data: { action: 'input->components--ir-dirty-tracker#dirtied' }\n\nexport default class extends Controller {\n  static targets = [\"enableable\", \"hideable\"];\n\n  dirtied() {\n    animate.show(this.enableableTarget);\n\n    this.hideableTargets.forEach((h) => animate.hide(h));\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\n\nexport default class extends Controller {\n  static targets = [\"hiddenField\", \"feetField\", \"inchesField\"];\n\n  connect() {\n    this.feet = Number.parseInt(this.feetFieldTarget.value) || 0;\n    this.inches = Number.parseInt(this.inchesFieldTarget.value) || 0;\n  }\n\n  keyupFeet = (event) => {\n    this.setUpdatedValue(\"feet\", event);\n  };\n\n  keyupInches = (event) => {\n    this.setUpdatedValue(\"inches\", event);\n  };\n\n  onlyAllowNumber = (event) => {\n    if (!event.key || event.key.length > 1) return;\n\n    if (!/\\d/.test(event.key)) event.preventDefault();\n  };\n\n  setUpdatedValue(type, event) {\n    this[type] = Number.parseInt(event.currentTarget.value) || 0;\n    this.setHiddenFieldValue();\n  }\n\n  setHiddenFieldValue() {\n    let feetWithInches;\n    if (this.inches === 2 || this.inches === 5 || this.inches === 8 || this.inches === 11) {\n      // subtract 0.0001 to make sure rounding never causes the re-inflated\n      // value to exceed what the user typed, e.g. 11 inches -> 10.9992 rather\n      // than 11.00399999\n      feetWithInches = (this.feet + this.inches / 12 - 0.0001).toFixed(4);\n    } else {\n      feetWithInches = (this.feet + this.inches / 12).toFixed(4);\n    }\n\n    this.hiddenFieldTarget.value = feetWithInches;\n    const changeEvent = new CustomEvent(\"change\", { bubbles: true });\n    this.hiddenFieldTarget.dispatchEvent(changeEvent);\n  }\n\n  fieldBlur = (event) => {\n    const field = event.currentTarget;\n    const value = field.value;\n    const type = field.dataset.type;\n    if (value === \"\") field.value = 0;\n    if (type === \"inches\" && value >= 12) {\n      this.updateDisplayFromHiddenField();\n    }\n  };\n\n  updateDisplayFromHiddenField() {\n    const value = Number.parseFloat(this.hiddenFieldTarget.value) || 0.0;\n    this.feet = Math.floor(value);\n    this.inches = Math.round((value - this.feet) * 12);\n    this.feetFieldTarget.value = this.feet;\n    this.inchesFieldTarget.value = this.inches;\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport * as animate from \"../../helpers/animate\";\n\nexport default class extends Controller {\n  static targets = [\"showOnSubmit\", \"button\", \"fileField\", \"fileDisplay\", \"clearFileLink\"];\n\n  defaultFileDisplayText = \"No file chosen\";\n\n  static values = {\n    autoSubmit: { type: Boolean, default: false },\n  };\n\n  chooseFile(event) {\n    event.preventDefault();\n\n    this.fileFieldTarget.click();\n  }\n\n  fileChosen(_event) {\n    if (this.autoSubmitValue) {\n      this.submit();\n    } else {\n      this.showFileName();\n    }\n  }\n\n  showFileName() {\n    const files = this.fileFieldTarget.files;\n    const maxLength = 40;\n\n    if (files.length === 0) {\n      this.fileDisplayTarget.textContent = this.defaultFileDisplayText;\n      this.fileDisplayTarget.removeAttribute(\"title\");\n      this.clearFileLinkTarget.classList.add(\"d-none\");\n      return;\n    }\n\n    let displayText;\n    let titleText;\n\n    if (files.length === 1) {\n      // Single file - show the filename\n      const fileName = files[0].name;\n      titleText = fileName;\n\n      if (fileName.length > maxLength) {\n        const extension = fileName.split(\".\").pop();\n        displayText = fileName.slice(0, maxLength - extension.length - 6) + \"... \" + \".\" + extension;\n      } else {\n        displayText = fileName;\n      }\n    } else {\n      // Multiple files - show count in display, all filenames in tooltip\n      displayText = `${files.length} files selected`;\n      titleText = Array.from(files)\n        .map((f) => f.name)\n        .join(\", \");\n    }\n\n    this.fileDisplayTarget.textContent = displayText;\n    this.fileDisplayTarget.setAttribute(\"title\", titleText);\n    this.clearFileLinkTarget.classList.remove(\"d-none\");\n  }\n\n  submit() {\n    this.showOnSubmitTargets.forEach((element) => {\n      animate.show(element);\n    });\n\n    this.element.closest(\"form\").requestSubmit();\n  }\n\n  clearFile(event) {\n    event.preventDefault();\n\n    this.fileFieldTarget.value = null;\n    this.fileDisplayTarget.textContent = this.defaultFileDisplayText;\n    this.clearFileLinkTarget.classList.add(\"d-none\");\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport { animate as anime } from \"animejs\";\n\n// Behavior for showing and hiding the ir-flash message element\nexport default class extends Controller {\n  static targets = [\"flash\"];\n\n  delayBeforeShowTiming = 600;\n  showMessageTiming = 3000;\n  autoHideTimeout = undefined;\n\n  connect() {\n    setTimeout(() => {\n      this.animateIn();\n      this.autoHideAfterDelay();\n    }, this.delayBeforeShowTiming);\n  }\n\n  autoHideAfterDelay() {\n    this.autoHideTimeout = setTimeout(() => {\n      this.animateOut(400);\n    }, this.showMessageTiming);\n  }\n\n  close(event) {\n    event.preventDefault();\n    this.animateOut(200);\n  }\n\n  mouseOver(_event) {\n    clearTimeout(this.autoHideTimeout);\n  }\n\n  mouseOut(_event) {\n    this.autoHideAfterDelay();\n  }\n\n  animateIn() {\n    this.flashTarget.style.display = \"block\";\n    anime(this.flashTarget, {\n      opacity: 1,\n      top: [\"9%\", \"7%\"],\n      ease: \"outQuad\",\n      duration: 500,\n    });\n  }\n\n  animateOut(timing) {\n    anime(this.flashTarget, {\n      opacity: 0,\n      top: [\"7%\", \"4%\"],\n      ease: \"inQuad\",\n      duration: timing,\n      onComplete: () => {\n        this.flashTarget.style.display = \"none\";\n      },\n    });\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\n\nexport default class extends Controller {\n  static values = {\n    data: Object,\n    filename: String,\n  };\n\n  download(event) {\n    event.preventDefault();\n\n    const data = this.dataValue;\n    const filename = this.filenameValue || \"data.json\";\n\n    // Create and download the JSON file\n    const jsonString = JSON.stringify(data, null, 2);\n    const blob = new Blob([jsonString], { type: \"application/json\" });\n    const url = URL.createObjectURL(blob);\n\n    const link = document.createElement(\"a\");\n    link.href = url;\n    link.download = filename;\n    document.body.appendChild(link);\n    link.click();\n    document.body.removeChild(link);\n    URL.revokeObjectURL(url);\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\n\nexport default class extends Controller {\n  static targets = [\"image\", \"magnifier\"];\n\n  static values = {\n    zoomLevel: { type: Number, default: 5 },\n    magnifierWidth: { type: Number, default: 150 },\n    magnifierHeight: { type: Number, default: 150 },\n  };\n\n  magnifierActive = false;\n\n  connect() {\n    this.setupMagnifier();\n  }\n\n  disconnect() {\n    this.removeMagnifierHandlers();\n  }\n\n  setupMagnifier() {\n    if (this.hasImageTarget && this.hasMagnifierTarget) {\n      this.imageTarget.addEventListener(\"mousemove\", this.handleMouseMove);\n      this.imageTarget.addEventListener(\"mouseenter\", this.handleMouseEnter);\n      this.imageTarget.addEventListener(\"mouseleave\", this.handleMouseLeave);\n    }\n  }\n\n  removeMagnifierHandlers() {\n    if (this.hasImageTarget) {\n      this.imageTarget.removeEventListener(\"mousemove\", this.handleMouseMove);\n      this.imageTarget.removeEventListener(\"mouseenter\", this.handleMouseEnter);\n      this.imageTarget.removeEventListener(\"mouseleave\", this.handleMouseLeave);\n    }\n  }\n\n  handleMouseEnter = () => {\n    this.magnifierActive = true;\n    this.magnifierTarget.classList.remove(\"ir-magnifier__overlay--hidden\");\n  };\n\n  handleMouseLeave = () => {\n    this.magnifierActive = false;\n    this.magnifierTarget.classList.add(\"ir-magnifier__overlay--hidden\");\n  };\n\n  handleMouseMove = (e) => {\n    if (!this.magnifierActive || !this.hasMagnifierTarget) return;\n\n    const { left, top, width, height } = this.imageTarget.getBoundingClientRect();\n    const x = e.clientX - left;\n    const y = e.clientY - top;\n\n    const zoomLevel = this.zoomLevelValue;\n\n    const magnifierWidth = this.magnifierWidthValue;\n    const magnifierHeight = this.magnifierHeightValue;\n    const magnifierLeft = Math.max(0, Math.min(x - magnifierWidth / 2, width - magnifierWidth));\n    const magnifierTop = Math.max(0, Math.min(y - magnifierHeight / 2, height - magnifierHeight));\n\n    this.magnifierTarget.style.left = `${magnifierLeft}px`;\n    this.magnifierTarget.style.top = `${magnifierTop}px`;\n\n    const imgUrl = this.imageTarget.src;\n    const imgX = x * zoomLevel - magnifierWidth / 2;\n    const imgY = y * zoomLevel - magnifierHeight / 2;\n\n    this.magnifierTarget.style.backgroundImage = `url(${imgUrl})`;\n    this.magnifierTarget.style.backgroundSize = `${width * zoomLevel}px ${height * zoomLevel}px`;\n    this.magnifierTarget.style.backgroundPosition = `-${imgX}px -${imgY}px`;\n  };\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport React from \"react\";\nimport { createRoot } from \"react-dom/client\";\n\nexport default class extends Controller {\n  static targets = [\"searchField\", \"searchResultsContainer\", \"selectionsContainer\"];\n\n  static values = {\n    allOptions: Array,\n    fieldName: String,\n    selections: Array,\n  };\n\n  #searchResultsRoot;\n  #selectionsRoot;\n\n  connect() {\n    this.#searchResultsRoot = createRoot(this.searchResultsContainerTarget);\n    this.#selectionsRoot = createRoot(this.selectionsContainerTarget);\n    this.#renderResults();\n  }\n\n  onSelect(e) {\n    const selection = e.target;\n    const value = selection.dataset.value;\n    const label = selection.textContent;\n\n    if (!this.selectionsValue.includes(value)) {\n      selection.classList.add(\"bg-anakiwa\");\n\n      this.selectionsValue = [...this.selectionsValue, value];\n\n      this.#renderResults();\n\n      // The search field blur should get called first\n      setTimeout(() => {\n        this.searchFieldTarget.value = \"\";\n        this.searchFieldTarget.focus();\n      }, 450);\n    }\n  }\n\n  onSearchFieldBlur(event) {\n    // Need to allow for a slight delay so that if the user is clicking one of the\n    // options, the menu is still visible when the event fires.  Otherwise, Stimulus\n    // appears to ignore the click event.\n    setTimeout(() => {\n      this.searchResultsContainerTarget.classList.add(\"d-none\");\n    }, 300);\n  }\n\n  onSearchFieldKeypress(event) {\n    if (event.key === \"Enter\") {\n      event.preventDefault();\n      event.stopPropagation();\n      return false;\n    }\n  }\n\n  onRemoveClick(event) {\n    event.preventDefault();\n\n    const link = event.target;\n    const hiddenField = link.closest(\"div.ir-multi-select__result\").querySelector(\"input\");\n    const value = hiddenField.value;\n\n    this.selectionsValue = this.selectionsValue.filter((sv) => `${sv}` !== value);\n\n    this.#renderResults();\n  }\n\n  search(e) {\n    const searchFieldValue = e.target.value.toLowerCase();\n\n    if (searchFieldValue.length < 3) {\n      this.searchResultsContainerTarget.classList.add(\"d-none\");\n      return;\n    }\n    this.searchResultsContainerTarget.classList.remove(\"d-none\");\n\n    // try not to block the keyboard since search can take a long time\n    return Promise.resolve().then(() => {\n      this.#addOptionTags();\n    });\n  }\n\n  #addOptionTags() {\n    this.#searchResultsRoot.render(\n      <div>\n        {this.#filteredOptions.map((option) => {\n          const [label, value] = option;\n          return (\n            <div\n              key={value}\n              className=\"ir-multi-select__option\"\n              data-value={value}\n              data-action=\"click->components--ir-multi-select#onSelect\"\n            >\n              {label}\n            </div>\n          );\n        })}\n      </div>,\n    );\n  }\n\n  get #filteredOptions() {\n    return this.allOptionsValue.filter((option) => {\n      if (!this.selectionsValue.includes(`${option[1]}`)) {\n        const searchFieldValue = this.searchFieldTarget.value.toLowerCase();\n        return option[0].toLowerCase().includes(searchFieldValue);\n      } else {\n        return false;\n      }\n    });\n  }\n\n  #renderResults() {\n    this.#selectionsRoot.render(\n      <div className=\"ir-multi-select__result__container\">\n        {this.selectionsValue.map((selection) => {\n          const label = this.allOptionsValue.find((o) => `${o[1]}` === `${selection}`)[0];\n          return (\n            <div className=\"ir-multi-select__result d-flex\" key={label}>\n              <input type=\"hidden\" name={this.fieldNameValue} value={selection} />\n              <div>{label}</div>\n              <div>\n                <small>\n                  <a href=\"#\" data-action=\"components--ir-multi-select#onRemoveClick\" className=\"text-red-600 ms-3\">\n                    <i className=\"fas fa-times pe-2\"></i>\n                    remove\n                  </a>\n                </small>\n              </div>\n            </div>\n          );\n        })}\n      </div>,\n    );\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\n\nexport default class extends Controller {\n  static targets = [\"scrollField\"];\n\n  static values = {\n    max: { type: Number, default: 10000000000 },\n    min: { type: Number, default: -10000000000 },\n    unsigned: { type: Boolean, default: false },\n  };\n\n  connect() {\n    const value = this.scrollFieldTarget.value;\n    if (value !== \"\" && isNaN(Number.parseInt(value))) {\n      this.scrollFieldTarget.value = 0;\n    }\n  }\n\n  increase(event) {\n    this.scrollBy(event, 1);\n  }\n\n  decrease(event) {\n    this.scrollBy(event, -1);\n  }\n\n  fieldInput(event) {\n    const value = event.currentTarget.value;\n    if (value === \"\") return;\n\n    const regex = this.unsignedValue ? /[^\\d]/ : /[^\\d-]/;\n    let newValue = value.replace(regex, \"\");\n    if (newValue === \"\") {\n      this.scrollFieldTarget.value = \"\";\n      return;\n    }\n\n    newValue = Number.parseInt(newValue);\n\n    this.#setValue(newValue);\n  }\n\n  scrollBy(event, amount) {\n    event.preventDefault();\n\n    if (event.shiftKey) amount *= 10;\n\n    const scrollField = this.scrollFieldTarget;\n    const fieldVal = scrollField.value;\n    let number = Number.parseInt(fieldVal);\n    if (isNaN(number)) number = 0;\n\n    const newValue = number + amount;\n\n    this.#setValue(newValue);\n  }\n\n  #setValue(newValue) {\n    let value = newValue;\n\n    if (this.unsignedValue && value < 0) value = 0;\n    if (value < this.minValue) value = this.minValue;\n    if (value > this.maxValue) value = this.maxValue;\n\n    const scrollField = this.scrollFieldTarget;\n    scrollField.value = value;\n    // We need to manually trigger the change event in order for other\n    // Stimulus actions tied to the change event to get called\n    const changeEvent = new CustomEvent(\"change\", { bubbles: true });\n    scrollField.dispatchEvent(changeEvent);\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\n\nexport default class extends Controller {\n  static values = {\n    turboFrame: String,\n    basePath: String,\n  };\n\n  change(event) {\n    const select = event.currentTarget;\n    const turboFrame = document.querySelector(`#${this.turboFrameValue}`);\n    turboFrame.src = `${this.basePathValue}?items_per_page=${select.value}`;\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\n\nexport default class extends Controller {\n  static targets = [\"selectAllCheckbox\", \"checkbox\", \"submitButton\"];\n\n  toggleSelectAll(_e) {\n    this.checkboxTargets.forEach((checkbox) => {\n      checkbox.checked = this.selectAllCheckboxTarget.checked;\n    });\n\n    if (this.hasSubmitButtonTarget) {\n      this.submitButtonTarget.disabled = !this.selectAllCheckboxTarget.checked;\n    }\n  }\n\n  toggleSubmit(_e) {\n    if (this.hasSubmitButtonTarget) {\n      this.submitButtonTarget.disabled = this.checkboxTargets.every((checkbox) => !checkbox.checked);\n    }\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport * as animate from \"../../helpers/animate\";\n\n// Standard behavior for showing and hiding an element\nexport default class extends Controller {\n  static targets = [\"content\"];\n  animating = false;\n\n  connect() {\n    const el = this.contentTarget;\n    // if d-none Bootstrap class is applied to element initially to\n    // hide it, remove it and set the element style display to none\n    if (el.classList.contains(\"d-none\")) {\n      el.classList.remove(\"d-none\");\n      el.style.display = \"none\";\n    }\n  }\n\n  toggle(event) {\n    event.preventDefault();\n    if (this.animating) {\n      return;\n    }\n    this.animating = true;\n\n    const link = event.currentTarget;\n    const el = this.contentTarget;\n\n    const displayProp = window.getComputedStyle(this.contentTarget).display;\n    const contentHidden = displayProp === \"none\";\n\n    this[contentHidden ? \"showContent\" : \"hideContent\"](el);\n    this.setLinkIcon(link, contentHidden ? \"up\" : \"down\");\n  }\n\n  setLinkIcon(link, iconDir) {\n    const i = link.querySelector(\"i\");\n    // in case the link isn't using a disclosure chevron\n    if (i === null) return;\n\n    if (iconDir == \"down\") {\n      i.classList.replace(\"fa-angle-up\", \"fa-angle-down\");\n    } else {\n      i.classList.replace(\"fa-angle-down\", \"fa-angle-up\");\n    }\n  }\n\n  showContent(el) {\n    animate.show(el, {\n      completedCallback: () => {\n        this.animating = false;\n      },\n    });\n  }\n\n  hideContent(el) {\n    animate.hide(el, {\n      completedCallback: () => {\n        this.animating = false;\n      },\n    });\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\n\n// Behavior added to the ir-submit-btn which prevent double click\n// and adds a spinner animation\nexport default class extends Controller {\n  lastButton = null;\n\n  handleSubmit = (event) => {\n    const button = event.currentTarget;\n    event.preventDefault();\n    if (!button.classList.contains(\"ir-btn--spinner-shown\")) {\n      const clickEvent = new MouseEvent(\"click\", { bubbles: true });\n      button.classList.add(\"ir-btn--spinner-shown\");\n      this.lastButton = button;\n      // this is to give the browser time to show the animation\n      setTimeout(() => button.dispatchEvent(clickEvent), 200);\n    }\n  };\n\n  handleResetSubmit = (_event) => {\n    if (this.lastButton.classList.contains(\"ir-btn--spinner-shown\")) {\n      this.lastButton.classList.remove(\"ir-btn--spinner-shown\");\n    }\n  };\n}\n", "import { Controller } from \"@hotwired/stimulus\";\n\nimport * as animate from \"../../helpers/animate\";\n\nexport default class IrTabs extends Controller {\n  static targets = [\"link\", \"content\"];\n  static values = { activeTabClass: { type: String, default: \"ir-content-tabs__link--active\" } };\n\n  connect() {\n    const activeIndex = this.#activeIndex;\n\n    this.linkTargets.forEach((linkTarget, i) => {\n      const addRemove = i === activeIndex ? \"add\" : \"remove\";\n      linkTarget.classList[addRemove](this.activeTabClassValue);\n    });\n\n    this.contentTargets.forEach((contentTarget, i) => {\n      if (i !== activeIndex) {\n        contentTarget.classList.add(\"d-none\");\n      }\n    });\n\n    this.element.tabsController = this;\n  }\n\n  setTabWithValueToActive(tabValue) {\n    let selectedIndex = 0;\n\n    this.linkTargets.forEach((linkTarget, i) => {\n      if (linkTarget.dataset.tabValue === tabValue) selectedIndex = i;\n\n      this.toggleLink(linkTarget, linkTarget.dataset.tabValue === tabValue);\n    });\n\n    this.contentTargets.forEach((contentTarget, i) => {\n      this.toggleContent(contentTarget, i === selectedIndex);\n    });\n  }\n\n  toggleLink(linkTarget, isActive) {\n    if (isActive) {\n      linkTarget.dataset.active = true;\n      linkTarget.classList.add(this.activeTabClassValue);\n    } else {\n      delete linkTarget.dataset.active;\n      linkTarget.classList.remove(this.activeTabClassValue);\n    }\n  }\n\n  toggleContent(contentTarget, isActive) {\n    if (isActive) {\n      animate.show(contentTarget);\n    } else {\n      animate.hide(contentTarget, { fadeOut: false });\n    }\n  }\n\n  toggle(event) {\n    event.preventDefault();\n\n    const currentActiveIndex = this.#activeIndex;\n    const newActiveIndex = this.linkTargets.findIndex((linkTarget) => linkTarget === event.currentTarget);\n\n    if (currentActiveIndex === newActiveIndex) return;\n\n    this.linkTargets.forEach((linkTarget, i) => {\n      this.toggleLink(linkTarget, i === newActiveIndex);\n    });\n\n    this.contentTargets.forEach((contentTarget, i) => {\n      this.toggleContent(contentTarget, i === newActiveIndex);\n    });\n  }\n\n  selectTab(event) {\n    const newActiveIndex = Number(event.target.value);\n\n    this.contentTargets.forEach((contentTarget, i) => {\n      this.toggleContent(contentTarget, i === newActiveIndex);\n    });\n  }\n\n  get #activeIndex() {\n    let result = 0;\n    this.linkTargets.forEach((linkTarget, i) => {\n      if (linkTarget.dataset.active) result = i;\n    });\n    return result;\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\n\nexport default class extends Controller {\n  static targets = [\"tagsContainer\"];\n\n  static values = {\n    formObjectName: String,\n    tags: Array,\n  };\n\n  connect() {\n    this.tags = this.tagsValue;\n  }\n\n  removeTag(event) {\n    event.preventDefault();\n    const tag = event.params.tag;\n    this.tags = this.tags.filter((t) => t !== tag);\n    event.currentTarget.remove();\n  }\n\n  textFieldInput(event) {\n    if (event.type === \"blur\" || event.key === \"Enter\") {\n      if (event.type !== \"blur\") event.preventDefault();\n\n      const textField = event.currentTarget;\n      this.#addTagsFromTextFieldText(textField.value);\n      textField.value = \"\";\n    }\n  }\n\n  #addTagsFromTextFieldText(text) {\n    if (text === \"\") return;\n    const tags = this.#tagsFromText(text);\n    tags.forEach((tag) => this.#addTag(tag));\n  }\n\n  #tagsFromText(text) {\n    if (text.trim() === \"\") return [];\n\n    let tags = text\n      .split(\",\")\n      .map((t) => {\n        return t\n          .trim()\n          .toLowerCase()\n          .replace(/\\s+/g, \"_\")\n          .replace(/-+/g, \"_\")\n          .replace(/[^a-zA-Z0-9_]+/, \"\");\n      })\n      .filter((t) => t !== \"\" && !this.tags.includes(t));\n\n    tags = [...new Set(tags)];\n\n    tags.forEach((t) => this.tags.push(t));\n\n    return tags;\n  }\n\n  #addTag(tagName) {\n    if (tagName.trim() === \"\") return;\n\n    const html = `\n      <a class=\"tags-manager__tag-link\"\n        data-action=\"click->components--ir-tags-manager#removeTag\"\n        data-components--ir-tags-manager-tag-param=\"${tagName}\"\n        data-controller=\"components--ir-tooltip\"\n        data-components--ir-tooltip-content-value=\"remove\" href=\"#\">\n        <input value=\"${tagName}\" multiple=\"multiple\" autocomplete=\"off\" type=\"hidden\" name=\"s3_file[tags][]\">\n        <small class=\"ir-tag badge rounded-pill bg-yellow-100 text-yellow-800 text-nowrap\"><i class=\"fas fa-tag me-2\" aria-hidden=\"true\"></i>${tagName}</small>\n      </a>\n    `;\n\n    this.tagsContainerTarget.innerHTML += html;\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\n\nimport * as animate from \"../../helpers/animate\";\nimport * as store from \"../../helpers/local-store\";\n\nexport default class extends Controller {\n  static targets = [\n    \"toggleLink\",\n    \"onIsVisible\", // elements to make visible when the state is on\n    \"onIsHidden\", // elements to make hidden when the state is on\n  ];\n\n  static values = {\n    offLinkText: { type: String, default: \"\" }, // when the state is off (e.g. \"show stuff\")\n    onLinkText: { type: String, default: \"\" }, // when the state is on (e.g. \"hide stuff\")\n    rememberKey: { type: String, default: \"\" },\n  };\n\n  stateOff = \"off\";\n  stateOn = \"on\";\n  toggleState = this.stateOff; // initial state unless pulling from local storage\n\n  connect() {\n    if (this.rememberKeyValue === \"\") return;\n\n    this.#toggleTargets({ fadeIn: false });\n  }\n\n  toggle(event) {\n    event.preventDefault();\n\n    const newState = this.toggleState === this.stateOn ? this.stateOff : this.stateOn;\n    this.#setState(newState);\n    this.#toggleTargets({ fadeIn: true });\n  }\n\n  #toggleTargets(options) {\n    const fadeIn = options.fadeIn;\n    const state = this.#state;\n    const isStateOn = state === this.stateOn;\n\n    const show = (elem) => animate.show(elem, { fadeIn });\n    const hide = (elem) => animate.hide(elem, { fadeOut: false });\n\n    if (this.hasOnIsVisibleTarget) {\n      this.onIsVisibleTargets.forEach((elem) => {\n        isStateOn ? show(elem) : hide(elem);\n      });\n    }\n\n    if (this.hasOnIsHiddenTarget) {\n      this.onIsHiddenTargets.forEach((elem) => {\n        isStateOn ? hide(elem) : show(elem);\n      });\n    }\n\n    if (this.hasToggleLinkTarget) {\n      this.toggleLinkTarget.innerHTML = isStateOn ? this.onLinkTextValue : this.offLinkTextValue;\n    }\n  }\n\n  get #state() {\n    if (this.rememberKeyValue === \"\") {\n      return this.toggleState;\n    }\n\n    let state = store.get(`ir-toggle-${this.rememberKeyValue}`);\n    if (!state) {\n      state = this.toggleState;\n      this.#setState(state);\n    } else {\n      this.toggleState = state;\n    }\n\n    return state;\n  }\n\n  #setState(state) {\n    this.toggleState = state;\n\n    if (this.rememberKeyValue === \"\") return;\n\n    store.set(`ir-toggle-${this.rememberKeyValue}`, state);\n  }\n}\n", "export var top = 'top';\nexport var bottom = 'bottom';\nexport var right = 'right';\nexport var left = 'left';\nexport var auto = 'auto';\nexport var basePlacements = [top, bottom, right, left];\nexport var start = 'start';\nexport var end = 'end';\nexport var clippingParents = 'clippingParents';\nexport var viewport = 'viewport';\nexport var popper = 'popper';\nexport var reference = 'reference';\nexport var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) {\n  return acc.concat([placement + \"-\" + start, placement + \"-\" + end]);\n}, []);\nexport var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {\n  return acc.concat([placement, placement + \"-\" + start, placement + \"-\" + end]);\n}, []); // modifiers that need to read the DOM\n\nexport var beforeRead = 'beforeRead';\nexport var read = 'read';\nexport var afterRead = 'afterRead'; // pure-logic modifiers\n\nexport var beforeMain = 'beforeMain';\nexport var main = 'main';\nexport var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)\n\nexport var beforeWrite = 'beforeWrite';\nexport var write = 'write';\nexport var afterWrite = 'afterWrite';\nexport var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];", "export default function getNodeName(element) {\n  return element ? (element.nodeName || '').toLowerCase() : null;\n}", "export default function getWindow(node) {\n  if (node == null) {\n    return window;\n  }\n\n  if (node.toString() !== '[object Window]') {\n    var ownerDocument = node.ownerDocument;\n    return ownerDocument ? ownerDocument.defaultView || window : window;\n  }\n\n  return node;\n}", "import getWindow from \"./getWindow.js\";\n\nfunction isElement(node) {\n  var OwnElement = getWindow(node).Element;\n  return node instanceof OwnElement || node instanceof Element;\n}\n\nfunction isHTMLElement(node) {\n  var OwnElement = getWindow(node).HTMLElement;\n  return node instanceof OwnElement || node instanceof HTMLElement;\n}\n\nfunction isShadowRoot(node) {\n  // IE 11 has no ShadowRoot\n  if (typeof ShadowRoot === 'undefined') {\n    return false;\n  }\n\n  var OwnElement = getWindow(node).ShadowRoot;\n  return node instanceof OwnElement || node instanceof ShadowRoot;\n}\n\nexport { isElement, isHTMLElement, isShadowRoot };", "import getNodeName from \"../dom-utils/getNodeName.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // This modifier takes the styles prepared by the `computeStyles` modifier\n// and applies them to the HTMLElements such as popper and arrow\n\nfunction applyStyles(_ref) {\n  var state = _ref.state;\n  Object.keys(state.elements).forEach(function (name) {\n    var style = state.styles[name] || {};\n    var attributes = state.attributes[name] || {};\n    var element = state.elements[name]; // arrow is optional + virtual elements\n\n    if (!isHTMLElement(element) || !getNodeName(element)) {\n      return;\n    } // Flow doesn't support to extend this property, but it's the most\n    // effective way to apply styles to an HTMLElement\n    // $FlowFixMe[cannot-write]\n\n\n    Object.assign(element.style, style);\n    Object.keys(attributes).forEach(function (name) {\n      var value = attributes[name];\n\n      if (value === false) {\n        element.removeAttribute(name);\n      } else {\n        element.setAttribute(name, value === true ? '' : value);\n      }\n    });\n  });\n}\n\nfunction effect(_ref2) {\n  var state = _ref2.state;\n  var initialStyles = {\n    popper: {\n      position: state.options.strategy,\n      left: '0',\n      top: '0',\n      margin: '0'\n    },\n    arrow: {\n      position: 'absolute'\n    },\n    reference: {}\n  };\n  Object.assign(state.elements.popper.style, initialStyles.popper);\n  state.styles = initialStyles;\n\n  if (state.elements.arrow) {\n    Object.assign(state.elements.arrow.style, initialStyles.arrow);\n  }\n\n  return function () {\n    Object.keys(state.elements).forEach(function (name) {\n      var element = state.elements[name];\n      var attributes = state.attributes[name] || {};\n      var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them\n\n      var style = styleProperties.reduce(function (style, property) {\n        style[property] = '';\n        return style;\n      }, {}); // arrow is optional + virtual elements\n\n      if (!isHTMLElement(element) || !getNodeName(element)) {\n        return;\n      }\n\n      Object.assign(element.style, style);\n      Object.keys(attributes).forEach(function (attribute) {\n        element.removeAttribute(attribute);\n      });\n    });\n  };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'applyStyles',\n  enabled: true,\n  phase: 'write',\n  fn: applyStyles,\n  effect: effect,\n  requires: ['computeStyles']\n};", "import { auto } from \"../enums.js\";\nexport default function getBasePlacement(placement) {\n  return placement.split('-')[0];\n}", "export var max = Math.max;\nexport var min = Math.min;\nexport var round = Math.round;", "export default function getUAString() {\n  var uaData = navigator.userAgentData;\n\n  if (uaData != null && uaData.brands && Array.isArray(uaData.brands)) {\n    return uaData.brands.map(function (item) {\n      return item.brand + \"/\" + item.version;\n    }).join(' ');\n  }\n\n  return navigator.userAgent;\n}", "import getUAString from \"../utils/userAgent.js\";\nexport default function isLayoutViewport() {\n  return !/^((?!chrome|android).)*safari/i.test(getUAString());\n}", "import { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport { round } from \"../utils/math.js\";\nimport getWindow from \"./getWindow.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getBoundingClientRect(element, includeScale, isFixedStrategy) {\n  if (includeScale === void 0) {\n    includeScale = false;\n  }\n\n  if (isFixedStrategy === void 0) {\n    isFixedStrategy = false;\n  }\n\n  var clientRect = element.getBoundingClientRect();\n  var scaleX = 1;\n  var scaleY = 1;\n\n  if (includeScale && isHTMLElement(element)) {\n    scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;\n    scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;\n  }\n\n  var _ref = isElement(element) ? getWindow(element) : window,\n      visualViewport = _ref.visualViewport;\n\n  var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;\n  var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;\n  var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;\n  var width = clientRect.width / scaleX;\n  var height = clientRect.height / scaleY;\n  return {\n    width: width,\n    height: height,\n    top: y,\n    right: x + width,\n    bottom: y + height,\n    left: x,\n    x: x,\n    y: y\n  };\n}", "import getBoundingClientRect from \"./getBoundingClientRect.js\"; // Returns the layout rect of an element relative to its offsetParent. Layout\n// means it doesn't take into account transforms.\n\nexport default function getLayoutRect(element) {\n  var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n  // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n  var width = element.offsetWidth;\n  var height = element.offsetHeight;\n\n  if (Math.abs(clientRect.width - width) <= 1) {\n    width = clientRect.width;\n  }\n\n  if (Math.abs(clientRect.height - height) <= 1) {\n    height = clientRect.height;\n  }\n\n  return {\n    x: element.offsetLeft,\n    y: element.offsetTop,\n    width: width,\n    height: height\n  };\n}", "import { isShadowRoot } from \"./instanceOf.js\";\nexport default function contains(parent, child) {\n  var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method\n\n  if (parent.contains(child)) {\n    return true;\n  } // then fallback to custom implementation with Shadow DOM support\n  else if (rootNode && isShadowRoot(rootNode)) {\n      var next = child;\n\n      do {\n        if (next && parent.isSameNode(next)) {\n          return true;\n        } // $FlowFixMe[prop-missing]: need a better way to handle this...\n\n\n        next = next.parentNode || next.host;\n      } while (next);\n    } // Give up, the result is false\n\n\n  return false;\n}", "import getWindow from \"./getWindow.js\";\nexport default function getComputedStyle(element) {\n  return getWindow(element).getComputedStyle(element);\n}", "import getNodeName from \"./getNodeName.js\";\nexport default function isTableElement(element) {\n  return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;\n}", "import { isElement } from \"./instanceOf.js\";\nexport default function getDocumentElement(element) {\n  // $FlowFixMe[incompatible-return]: assume body is always available\n  return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]\n  element.document) || window.document).documentElement;\n}", "import getNodeName from \"./getNodeName.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport { isShadowRoot } from \"./instanceOf.js\";\nexport default function getParentNode(element) {\n  if (getNodeName(element) === 'html') {\n    return element;\n  }\n\n  return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle\n    // $FlowFixMe[incompatible-return]\n    // $FlowFixMe[prop-missing]\n    element.assignedSlot || // step into the shadow DOM of the parent of a slotted node\n    element.parentNode || ( // DOM Element detected\n    isShadowRoot(element) ? element.host : null) || // ShadowRoot detected\n    // $FlowFixMe[incompatible-call]: HTMLElement is a Node\n    getDocumentElement(element) // fallback\n\n  );\n}", "import getWindow from \"./getWindow.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isHTMLElement, isShadowRoot } from \"./instanceOf.js\";\nimport isTableElement from \"./isTableElement.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getUAString from \"../utils/userAgent.js\";\n\nfunction getTrueOffsetParent(element) {\n  if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837\n  getComputedStyle(element).position === 'fixed') {\n    return null;\n  }\n\n  return element.offsetParent;\n} // `.offsetParent` reports `null` for fixed elements, while absolute elements\n// return the containing block\n\n\nfunction getContainingBlock(element) {\n  var isFirefox = /firefox/i.test(getUAString());\n  var isIE = /Trident/i.test(getUAString());\n\n  if (isIE && isHTMLElement(element)) {\n    // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n    var elementCss = getComputedStyle(element);\n\n    if (elementCss.position === 'fixed') {\n      return null;\n    }\n  }\n\n  var currentNode = getParentNode(element);\n\n  if (isShadowRoot(currentNode)) {\n    currentNode = currentNode.host;\n  }\n\n  while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n    var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n    // create a containing block.\n    // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n    if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n      return currentNode;\n    } else {\n      currentNode = currentNode.parentNode;\n    }\n  }\n\n  return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\n\n\nexport default function getOffsetParent(element) {\n  var window = getWindow(element);\n  var offsetParent = getTrueOffsetParent(element);\n\n  while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {\n    offsetParent = getTrueOffsetParent(offsetParent);\n  }\n\n  if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static')) {\n    return window;\n  }\n\n  return offsetParent || getContainingBlock(element) || window;\n}", "export default function getMainAxisFromPlacement(placement) {\n  return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';\n}", "import { max as mathMax, min as mathMin } from \"./math.js\";\nexport function within(min, value, max) {\n  return mathMax(min, mathMin(value, max));\n}\nexport function withinMaxClamp(min, value, max) {\n  var v = within(min, value, max);\n  return v > max ? max : v;\n}", "export default function getFreshSideObject() {\n  return {\n    top: 0,\n    right: 0,\n    bottom: 0,\n    left: 0\n  };\n}", "import getFreshSideObject from \"./getFreshSideObject.js\";\nexport default function mergePaddingObject(paddingObject) {\n  return Object.assign({}, getFreshSideObject(), paddingObject);\n}", "export default function expandToHashMap(value, keys) {\n  return keys.reduce(function (hashMap, key) {\n    hashMap[key] = value;\n    return hashMap;\n  }, {});\n}", "import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport contains from \"../dom-utils/contains.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport { within } from \"../utils/within.js\";\nimport mergePaddingObject from \"../utils/mergePaddingObject.js\";\nimport expandToHashMap from \"../utils/expandToHashMap.js\";\nimport { left, right, basePlacements, top, bottom } from \"../enums.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar toPaddingObject = function toPaddingObject(padding, state) {\n  padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {\n    placement: state.placement\n  })) : padding;\n  return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n};\n\nfunction arrow(_ref) {\n  var _state$modifiersData$;\n\n  var state = _ref.state,\n      name = _ref.name,\n      options = _ref.options;\n  var arrowElement = state.elements.arrow;\n  var popperOffsets = state.modifiersData.popperOffsets;\n  var basePlacement = getBasePlacement(state.placement);\n  var axis = getMainAxisFromPlacement(basePlacement);\n  var isVertical = [left, right].indexOf(basePlacement) >= 0;\n  var len = isVertical ? 'height' : 'width';\n\n  if (!arrowElement || !popperOffsets) {\n    return;\n  }\n\n  var paddingObject = toPaddingObject(options.padding, state);\n  var arrowRect = getLayoutRect(arrowElement);\n  var minProp = axis === 'y' ? top : left;\n  var maxProp = axis === 'y' ? bottom : right;\n  var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];\n  var startDiff = popperOffsets[axis] - state.rects.reference[axis];\n  var arrowOffsetParent = getOffsetParent(arrowElement);\n  var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;\n  var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is\n  // outside of the popper bounds\n\n  var min = paddingObject[minProp];\n  var max = clientSize - arrowRect[len] - paddingObject[maxProp];\n  var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;\n  var offset = within(min, center, max); // Prevents breaking syntax highlighting...\n\n  var axisProp = axis;\n  state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);\n}\n\nfunction effect(_ref2) {\n  var state = _ref2.state,\n      options = _ref2.options;\n  var _options$element = options.element,\n      arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;\n\n  if (arrowElement == null) {\n    return;\n  } // CSS selector\n\n\n  if (typeof arrowElement === 'string') {\n    arrowElement = state.elements.popper.querySelector(arrowElement);\n\n    if (!arrowElement) {\n      return;\n    }\n  }\n\n  if (!contains(state.elements.popper, arrowElement)) {\n    return;\n  }\n\n  state.elements.arrow = arrowElement;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'arrow',\n  enabled: true,\n  phase: 'main',\n  fn: arrow,\n  effect: effect,\n  requires: ['popperOffsets'],\n  requiresIfExists: ['preventOverflow']\n};", "export default function getVariation(placement) {\n  return placement.split('-')[1];\n}", "import { top, left, right, bottom, end } from \"../enums.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getWindow from \"../dom-utils/getWindow.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getComputedStyle from \"../dom-utils/getComputedStyle.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport { round } from \"../utils/math.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar unsetSides = {\n  top: 'auto',\n  right: 'auto',\n  bottom: 'auto',\n  left: 'auto'\n}; // Round the offsets to the nearest suitable subpixel based on the DPR.\n// Zooming can change the DPR, but it seems to report a value that will\n// cleanly divide the values into the appropriate subpixels.\n\nfunction roundOffsetsByDPR(_ref, win) {\n  var x = _ref.x,\n      y = _ref.y;\n  var dpr = win.devicePixelRatio || 1;\n  return {\n    x: round(x * dpr) / dpr || 0,\n    y: round(y * dpr) / dpr || 0\n  };\n}\n\nexport function mapToStyles(_ref2) {\n  var _Object$assign2;\n\n  var popper = _ref2.popper,\n      popperRect = _ref2.popperRect,\n      placement = _ref2.placement,\n      variation = _ref2.variation,\n      offsets = _ref2.offsets,\n      position = _ref2.position,\n      gpuAcceleration = _ref2.gpuAcceleration,\n      adaptive = _ref2.adaptive,\n      roundOffsets = _ref2.roundOffsets,\n      isFixed = _ref2.isFixed;\n  var _offsets$x = offsets.x,\n      x = _offsets$x === void 0 ? 0 : _offsets$x,\n      _offsets$y = offsets.y,\n      y = _offsets$y === void 0 ? 0 : _offsets$y;\n\n  var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({\n    x: x,\n    y: y\n  }) : {\n    x: x,\n    y: y\n  };\n\n  x = _ref3.x;\n  y = _ref3.y;\n  var hasX = offsets.hasOwnProperty('x');\n  var hasY = offsets.hasOwnProperty('y');\n  var sideX = left;\n  var sideY = top;\n  var win = window;\n\n  if (adaptive) {\n    var offsetParent = getOffsetParent(popper);\n    var heightProp = 'clientHeight';\n    var widthProp = 'clientWidth';\n\n    if (offsetParent === getWindow(popper)) {\n      offsetParent = getDocumentElement(popper);\n\n      if (getComputedStyle(offsetParent).position !== 'static' && position === 'absolute') {\n        heightProp = 'scrollHeight';\n        widthProp = 'scrollWidth';\n      }\n    } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it\n\n\n    offsetParent = offsetParent;\n\n    if (placement === top || (placement === left || placement === right) && variation === end) {\n      sideY = bottom;\n      var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]\n      offsetParent[heightProp];\n      y -= offsetY - popperRect.height;\n      y *= gpuAcceleration ? 1 : -1;\n    }\n\n    if (placement === left || (placement === top || placement === bottom) && variation === end) {\n      sideX = right;\n      var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]\n      offsetParent[widthProp];\n      x -= offsetX - popperRect.width;\n      x *= gpuAcceleration ? 1 : -1;\n    }\n  }\n\n  var commonStyles = Object.assign({\n    position: position\n  }, adaptive && unsetSides);\n\n  var _ref4 = roundOffsets === true ? roundOffsetsByDPR({\n    x: x,\n    y: y\n  }, getWindow(popper)) : {\n    x: x,\n    y: y\n  };\n\n  x = _ref4.x;\n  y = _ref4.y;\n\n  if (gpuAcceleration) {\n    var _Object$assign;\n\n    return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? \"translate(\" + x + \"px, \" + y + \"px)\" : \"translate3d(\" + x + \"px, \" + y + \"px, 0)\", _Object$assign));\n  }\n\n  return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + \"px\" : '', _Object$assign2[sideX] = hasX ? x + \"px\" : '', _Object$assign2.transform = '', _Object$assign2));\n}\n\nfunction computeStyles(_ref5) {\n  var state = _ref5.state,\n      options = _ref5.options;\n  var _options$gpuAccelerat = options.gpuAcceleration,\n      gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,\n      _options$adaptive = options.adaptive,\n      adaptive = _options$adaptive === void 0 ? true : _options$adaptive,\n      _options$roundOffsets = options.roundOffsets,\n      roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;\n  var commonStyles = {\n    placement: getBasePlacement(state.placement),\n    variation: getVariation(state.placement),\n    popper: state.elements.popper,\n    popperRect: state.rects.popper,\n    gpuAcceleration: gpuAcceleration,\n    isFixed: state.options.strategy === 'fixed'\n  };\n\n  if (state.modifiersData.popperOffsets != null) {\n    state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {\n      offsets: state.modifiersData.popperOffsets,\n      position: state.options.strategy,\n      adaptive: adaptive,\n      roundOffsets: roundOffsets\n    })));\n  }\n\n  if (state.modifiersData.arrow != null) {\n    state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {\n      offsets: state.modifiersData.arrow,\n      position: 'absolute',\n      adaptive: false,\n      roundOffsets: roundOffsets\n    })));\n  }\n\n  state.attributes.popper = Object.assign({}, state.attributes.popper, {\n    'data-popper-placement': state.placement\n  });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'computeStyles',\n  enabled: true,\n  phase: 'beforeWrite',\n  fn: computeStyles,\n  data: {}\n};", "import getWindow from \"../dom-utils/getWindow.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar passive = {\n  passive: true\n};\n\nfunction effect(_ref) {\n  var state = _ref.state,\n      instance = _ref.instance,\n      options = _ref.options;\n  var _options$scroll = options.scroll,\n      scroll = _options$scroll === void 0 ? true : _options$scroll,\n      _options$resize = options.resize,\n      resize = _options$resize === void 0 ? true : _options$resize;\n  var window = getWindow(state.elements.popper);\n  var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);\n\n  if (scroll) {\n    scrollParents.forEach(function (scrollParent) {\n      scrollParent.addEventListener('scroll', instance.update, passive);\n    });\n  }\n\n  if (resize) {\n    window.addEventListener('resize', instance.update, passive);\n  }\n\n  return function () {\n    if (scroll) {\n      scrollParents.forEach(function (scrollParent) {\n        scrollParent.removeEventListener('scroll', instance.update, passive);\n      });\n    }\n\n    if (resize) {\n      window.removeEventListener('resize', instance.update, passive);\n    }\n  };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'eventListeners',\n  enabled: true,\n  phase: 'write',\n  fn: function fn() {},\n  effect: effect,\n  data: {}\n};", "var hash = {\n  left: 'right',\n  right: 'left',\n  bottom: 'top',\n  top: 'bottom'\n};\nexport default function getOppositePlacement(placement) {\n  return placement.replace(/left|right|bottom|top/g, function (matched) {\n    return hash[matched];\n  });\n}", "var hash = {\n  start: 'end',\n  end: 'start'\n};\nexport default function getOppositeVariationPlacement(placement) {\n  return placement.replace(/start|end/g, function (matched) {\n    return hash[matched];\n  });\n}", "import getWindow from \"./getWindow.js\";\nexport default function getWindowScroll(node) {\n  var win = getWindow(node);\n  var scrollLeft = win.pageXOffset;\n  var scrollTop = win.pageYOffset;\n  return {\n    scrollLeft: scrollLeft,\n    scrollTop: scrollTop\n  };\n}", "import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nexport default function getWindowScrollBarX(element) {\n  // If <html> has a CSS width greater than the viewport, then this will be\n  // incorrect for RTL.\n  // Popper 1 is broken in this case and never had a bug report so let's assume\n  // it's not an issue. I don't think anyone ever specifies width on <html>\n  // anyway.\n  // Browsers where the left scrollbar doesn't cause an issue report `0` for\n  // this (e.g. Edge 2019, IE11, Safari)\n  return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;\n}", "import getWindow from \"./getWindow.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getViewportRect(element, strategy) {\n  var win = getWindow(element);\n  var html = getDocumentElement(element);\n  var visualViewport = win.visualViewport;\n  var width = html.clientWidth;\n  var height = html.clientHeight;\n  var x = 0;\n  var y = 0;\n\n  if (visualViewport) {\n    width = visualViewport.width;\n    height = visualViewport.height;\n    var layoutViewport = isLayoutViewport();\n\n    if (layoutViewport || !layoutViewport && strategy === 'fixed') {\n      x = visualViewport.offsetLeft;\n      y = visualViewport.offsetTop;\n    }\n  }\n\n  return {\n    width: width,\n    height: height,\n    x: x + getWindowScrollBarX(element),\n    y: y\n  };\n}", "import getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nimport { max } from \"../utils/math.js\"; // Gets the entire size of the scrollable document area, even extending outside\n// of the `<html>` and `<body>` rect bounds if horizontally scrollable\n\nexport default function getDocumentRect(element) {\n  var _element$ownerDocumen;\n\n  var html = getDocumentElement(element);\n  var winScroll = getWindowScroll(element);\n  var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n  var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n  var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n  var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n  var y = -winScroll.scrollTop;\n\n  if (getComputedStyle(body || html).direction === 'rtl') {\n    x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n  }\n\n  return {\n    width: width,\n    height: height,\n    x: x,\n    y: y\n  };\n}", "import getComputedStyle from \"./getComputedStyle.js\";\nexport default function isScrollParent(element) {\n  // Firefox wants us to check `-x` and `-y` variations as well\n  var _getComputedStyle = getComputedStyle(element),\n      overflow = _getComputedStyle.overflow,\n      overflowX = _getComputedStyle.overflowX,\n      overflowY = _getComputedStyle.overflowY;\n\n  return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);\n}", "import getParentNode from \"./getParentNode.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nexport default function getScrollParent(node) {\n  if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {\n    // $FlowFixMe[incompatible-return]: assume body is always available\n    return node.ownerDocument.body;\n  }\n\n  if (isHTMLElement(node) && isScrollParent(node)) {\n    return node;\n  }\n\n  return getScrollParent(getParentNode(node));\n}", "import getScrollParent from \"./getScrollParent.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getWindow from \"./getWindow.js\";\nimport isScrollParent from \"./isScrollParent.js\";\n/*\ngiven a DOM element, return the list of all scroll parents, up the list of ancesors\nuntil we get to the top window object. This list is what we attach scroll listeners\nto, because if any of these parent elements scroll, we'll need to re-calculate the\nreference element's position.\n*/\n\nexport default function listScrollParents(element, list) {\n  var _element$ownerDocumen;\n\n  if (list === void 0) {\n    list = [];\n  }\n\n  var scrollParent = getScrollParent(element);\n  var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n  var win = getWindow(scrollParent);\n  var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n  var updatedList = list.concat(target);\n  return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n  updatedList.concat(listScrollParents(getParentNode(target)));\n}", "export default function rectToClientRect(rect) {\n  return Object.assign({}, rect, {\n    left: rect.x,\n    top: rect.y,\n    right: rect.x + rect.width,\n    bottom: rect.y + rect.height\n  });\n}", "import { viewport } from \"../enums.js\";\nimport getViewportRect from \"./getViewportRect.js\";\nimport getDocumentRect from \"./getDocumentRect.js\";\nimport listScrollParents from \"./listScrollParents.js\";\nimport getOffsetParent from \"./getOffsetParent.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport contains from \"./contains.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport rectToClientRect from \"../utils/rectToClientRect.js\";\nimport { max, min } from \"../utils/math.js\";\n\nfunction getInnerBoundingClientRect(element, strategy) {\n  var rect = getBoundingClientRect(element, false, strategy === 'fixed');\n  rect.top = rect.top + element.clientTop;\n  rect.left = rect.left + element.clientLeft;\n  rect.bottom = rect.top + element.clientHeight;\n  rect.right = rect.left + element.clientWidth;\n  rect.width = element.clientWidth;\n  rect.height = element.clientHeight;\n  rect.x = rect.left;\n  rect.y = rect.top;\n  return rect;\n}\n\nfunction getClientRectFromMixedType(element, clippingParent, strategy) {\n  return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element)));\n} // A \"clipping parent\" is an overflowable container with the characteristic of\n// clipping (or hiding) overflowing elements with a position different from\n// `initial`\n\n\nfunction getClippingParents(element) {\n  var clippingParents = listScrollParents(getParentNode(element));\n  var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n  var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n  if (!isElement(clipperElement)) {\n    return [];\n  } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n  return clippingParents.filter(function (clippingParent) {\n    return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n  });\n} // Gets the maximum area that the element is visible in due to any number of\n// clipping parents\n\n\nexport default function getClippingRect(element, boundary, rootBoundary, strategy) {\n  var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);\n  var clippingParents = [].concat(mainClippingParents, [rootBoundary]);\n  var firstClippingParent = clippingParents[0];\n  var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {\n    var rect = getClientRectFromMixedType(element, clippingParent, strategy);\n    accRect.top = max(rect.top, accRect.top);\n    accRect.right = min(rect.right, accRect.right);\n    accRect.bottom = min(rect.bottom, accRect.bottom);\n    accRect.left = max(rect.left, accRect.left);\n    return accRect;\n  }, getClientRectFromMixedType(element, firstClippingParent, strategy));\n  clippingRect.width = clippingRect.right - clippingRect.left;\n  clippingRect.height = clippingRect.bottom - clippingRect.top;\n  clippingRect.x = clippingRect.left;\n  clippingRect.y = clippingRect.top;\n  return clippingRect;\n}", "import getBasePlacement from \"./getBasePlacement.js\";\nimport getVariation from \"./getVariation.js\";\nimport getMainAxisFromPlacement from \"./getMainAxisFromPlacement.js\";\nimport { top, right, bottom, left, start, end } from \"../enums.js\";\nexport default function computeOffsets(_ref) {\n  var reference = _ref.reference,\n      element = _ref.element,\n      placement = _ref.placement;\n  var basePlacement = placement ? getBasePlacement(placement) : null;\n  var variation = placement ? getVariation(placement) : null;\n  var commonX = reference.x + reference.width / 2 - element.width / 2;\n  var commonY = reference.y + reference.height / 2 - element.height / 2;\n  var offsets;\n\n  switch (basePlacement) {\n    case top:\n      offsets = {\n        x: commonX,\n        y: reference.y - element.height\n      };\n      break;\n\n    case bottom:\n      offsets = {\n        x: commonX,\n        y: reference.y + reference.height\n      };\n      break;\n\n    case right:\n      offsets = {\n        x: reference.x + reference.width,\n        y: commonY\n      };\n      break;\n\n    case left:\n      offsets = {\n        x: reference.x - element.width,\n        y: commonY\n      };\n      break;\n\n    default:\n      offsets = {\n        x: reference.x,\n        y: reference.y\n      };\n  }\n\n  var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;\n\n  if (mainAxis != null) {\n    var len = mainAxis === 'y' ? 'height' : 'width';\n\n    switch (variation) {\n      case start:\n        offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);\n        break;\n\n      case end:\n        offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);\n        break;\n\n      default:\n    }\n  }\n\n  return offsets;\n}", "import getClippingRect from \"../dom-utils/getClippingRect.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getBoundingClientRect from \"../dom-utils/getBoundingClientRect.js\";\nimport computeOffsets from \"./computeOffsets.js\";\nimport rectToClientRect from \"./rectToClientRect.js\";\nimport { clippingParents, reference, popper, bottom, top, right, basePlacements, viewport } from \"../enums.js\";\nimport { isElement } from \"../dom-utils/instanceOf.js\";\nimport mergePaddingObject from \"./mergePaddingObject.js\";\nimport expandToHashMap from \"./expandToHashMap.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport default function detectOverflow(state, options) {\n  if (options === void 0) {\n    options = {};\n  }\n\n  var _options = options,\n      _options$placement = _options.placement,\n      placement = _options$placement === void 0 ? state.placement : _options$placement,\n      _options$strategy = _options.strategy,\n      strategy = _options$strategy === void 0 ? state.strategy : _options$strategy,\n      _options$boundary = _options.boundary,\n      boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,\n      _options$rootBoundary = _options.rootBoundary,\n      rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,\n      _options$elementConte = _options.elementContext,\n      elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,\n      _options$altBoundary = _options.altBoundary,\n      altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,\n      _options$padding = _options.padding,\n      padding = _options$padding === void 0 ? 0 : _options$padding;\n  var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n  var altContext = elementContext === popper ? reference : popper;\n  var popperRect = state.rects.popper;\n  var element = state.elements[altBoundary ? altContext : elementContext];\n  var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy);\n  var referenceClientRect = getBoundingClientRect(state.elements.reference);\n  var popperOffsets = computeOffsets({\n    reference: referenceClientRect,\n    element: popperRect,\n    strategy: 'absolute',\n    placement: placement\n  });\n  var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));\n  var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect\n  // 0 or negative = within the clipping rect\n\n  var overflowOffsets = {\n    top: clippingClientRect.top - elementClientRect.top + paddingObject.top,\n    bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,\n    left: clippingClientRect.left - elementClientRect.left + paddingObject.left,\n    right: elementClientRect.right - clippingClientRect.right + paddingObject.right\n  };\n  var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element\n\n  if (elementContext === popper && offsetData) {\n    var offset = offsetData[placement];\n    Object.keys(overflowOffsets).forEach(function (key) {\n      var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;\n      var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';\n      overflowOffsets[key] += offset[axis] * multiply;\n    });\n  }\n\n  return overflowOffsets;\n}", "import getVariation from \"./getVariation.js\";\nimport { variationPlacements, basePlacements, placements as allPlacements } from \"../enums.js\";\nimport detectOverflow from \"./detectOverflow.js\";\nimport getBasePlacement from \"./getBasePlacement.js\";\nexport default function computeAutoPlacement(state, options) {\n  if (options === void 0) {\n    options = {};\n  }\n\n  var _options = options,\n      placement = _options.placement,\n      boundary = _options.boundary,\n      rootBoundary = _options.rootBoundary,\n      padding = _options.padding,\n      flipVariations = _options.flipVariations,\n      _options$allowedAutoP = _options.allowedAutoPlacements,\n      allowedAutoPlacements = _options$allowedAutoP === void 0 ? allPlacements : _options$allowedAutoP;\n  var variation = getVariation(placement);\n  var placements = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {\n    return getVariation(placement) === variation;\n  }) : basePlacements;\n  var allowedPlacements = placements.filter(function (placement) {\n    return allowedAutoPlacements.indexOf(placement) >= 0;\n  });\n\n  if (allowedPlacements.length === 0) {\n    allowedPlacements = placements;\n  } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...\n\n\n  var overflows = allowedPlacements.reduce(function (acc, placement) {\n    acc[placement] = detectOverflow(state, {\n      placement: placement,\n      boundary: boundary,\n      rootBoundary: rootBoundary,\n      padding: padding\n    })[getBasePlacement(placement)];\n    return acc;\n  }, {});\n  return Object.keys(overflows).sort(function (a, b) {\n    return overflows[a] - overflows[b];\n  });\n}", "import getOppositePlacement from \"../utils/getOppositePlacement.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getOppositeVariationPlacement from \"../utils/getOppositeVariationPlacement.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport computeAutoPlacement from \"../utils/computeAutoPlacement.js\";\nimport { bottom, top, start, right, left, auto } from \"../enums.js\";\nimport getVariation from \"../utils/getVariation.js\"; // eslint-disable-next-line import/no-unused-modules\n\nfunction getExpandedFallbackPlacements(placement) {\n  if (getBasePlacement(placement) === auto) {\n    return [];\n  }\n\n  var oppositePlacement = getOppositePlacement(placement);\n  return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];\n}\n\nfunction flip(_ref) {\n  var state = _ref.state,\n      options = _ref.options,\n      name = _ref.name;\n\n  if (state.modifiersData[name]._skip) {\n    return;\n  }\n\n  var _options$mainAxis = options.mainAxis,\n      checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n      _options$altAxis = options.altAxis,\n      checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,\n      specifiedFallbackPlacements = options.fallbackPlacements,\n      padding = options.padding,\n      boundary = options.boundary,\n      rootBoundary = options.rootBoundary,\n      altBoundary = options.altBoundary,\n      _options$flipVariatio = options.flipVariations,\n      flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,\n      allowedAutoPlacements = options.allowedAutoPlacements;\n  var preferredPlacement = state.options.placement;\n  var basePlacement = getBasePlacement(preferredPlacement);\n  var isBasePlacement = basePlacement === preferredPlacement;\n  var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));\n  var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {\n    return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {\n      placement: placement,\n      boundary: boundary,\n      rootBoundary: rootBoundary,\n      padding: padding,\n      flipVariations: flipVariations,\n      allowedAutoPlacements: allowedAutoPlacements\n    }) : placement);\n  }, []);\n  var referenceRect = state.rects.reference;\n  var popperRect = state.rects.popper;\n  var checksMap = new Map();\n  var makeFallbackChecks = true;\n  var firstFittingPlacement = placements[0];\n\n  for (var i = 0; i < placements.length; i++) {\n    var placement = placements[i];\n\n    var _basePlacement = getBasePlacement(placement);\n\n    var isStartVariation = getVariation(placement) === start;\n    var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;\n    var len = isVertical ? 'width' : 'height';\n    var overflow = detectOverflow(state, {\n      placement: placement,\n      boundary: boundary,\n      rootBoundary: rootBoundary,\n      altBoundary: altBoundary,\n      padding: padding\n    });\n    var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;\n\n    if (referenceRect[len] > popperRect[len]) {\n      mainVariationSide = getOppositePlacement(mainVariationSide);\n    }\n\n    var altVariationSide = getOppositePlacement(mainVariationSide);\n    var checks = [];\n\n    if (checkMainAxis) {\n      checks.push(overflow[_basePlacement] <= 0);\n    }\n\n    if (checkAltAxis) {\n      checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);\n    }\n\n    if (checks.every(function (check) {\n      return check;\n    })) {\n      firstFittingPlacement = placement;\n      makeFallbackChecks = false;\n      break;\n    }\n\n    checksMap.set(placement, checks);\n  }\n\n  if (makeFallbackChecks) {\n    // `2` may be desired in some cases \u2013 research later\n    var numberOfChecks = flipVariations ? 3 : 1;\n\n    var _loop = function _loop(_i) {\n      var fittingPlacement = placements.find(function (placement) {\n        var checks = checksMap.get(placement);\n\n        if (checks) {\n          return checks.slice(0, _i).every(function (check) {\n            return check;\n          });\n        }\n      });\n\n      if (fittingPlacement) {\n        firstFittingPlacement = fittingPlacement;\n        return \"break\";\n      }\n    };\n\n    for (var _i = numberOfChecks; _i > 0; _i--) {\n      var _ret = _loop(_i);\n\n      if (_ret === \"break\") break;\n    }\n  }\n\n  if (state.placement !== firstFittingPlacement) {\n    state.modifiersData[name]._skip = true;\n    state.placement = firstFittingPlacement;\n    state.reset = true;\n  }\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'flip',\n  enabled: true,\n  phase: 'main',\n  fn: flip,\n  requiresIfExists: ['offset'],\n  data: {\n    _skip: false\n  }\n};", "import { top, bottom, left, right } from \"../enums.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\n\nfunction getSideOffsets(overflow, rect, preventedOffsets) {\n  if (preventedOffsets === void 0) {\n    preventedOffsets = {\n      x: 0,\n      y: 0\n    };\n  }\n\n  return {\n    top: overflow.top - rect.height - preventedOffsets.y,\n    right: overflow.right - rect.width + preventedOffsets.x,\n    bottom: overflow.bottom - rect.height + preventedOffsets.y,\n    left: overflow.left - rect.width - preventedOffsets.x\n  };\n}\n\nfunction isAnySideFullyClipped(overflow) {\n  return [top, right, bottom, left].some(function (side) {\n    return overflow[side] >= 0;\n  });\n}\n\nfunction hide(_ref) {\n  var state = _ref.state,\n      name = _ref.name;\n  var referenceRect = state.rects.reference;\n  var popperRect = state.rects.popper;\n  var preventedOffsets = state.modifiersData.preventOverflow;\n  var referenceOverflow = detectOverflow(state, {\n    elementContext: 'reference'\n  });\n  var popperAltOverflow = detectOverflow(state, {\n    altBoundary: true\n  });\n  var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);\n  var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);\n  var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);\n  var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);\n  state.modifiersData[name] = {\n    referenceClippingOffsets: referenceClippingOffsets,\n    popperEscapeOffsets: popperEscapeOffsets,\n    isReferenceHidden: isReferenceHidden,\n    hasPopperEscaped: hasPopperEscaped\n  };\n  state.attributes.popper = Object.assign({}, state.attributes.popper, {\n    'data-popper-reference-hidden': isReferenceHidden,\n    'data-popper-escaped': hasPopperEscaped\n  });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'hide',\n  enabled: true,\n  phase: 'main',\n  requiresIfExists: ['preventOverflow'],\n  fn: hide\n};", "import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport { top, left, right, placements } from \"../enums.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport function distanceAndSkiddingToXY(placement, rects, offset) {\n  var basePlacement = getBasePlacement(placement);\n  var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;\n\n  var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {\n    placement: placement\n  })) : offset,\n      skidding = _ref[0],\n      distance = _ref[1];\n\n  skidding = skidding || 0;\n  distance = (distance || 0) * invertDistance;\n  return [left, right].indexOf(basePlacement) >= 0 ? {\n    x: distance,\n    y: skidding\n  } : {\n    x: skidding,\n    y: distance\n  };\n}\n\nfunction offset(_ref2) {\n  var state = _ref2.state,\n      options = _ref2.options,\n      name = _ref2.name;\n  var _options$offset = options.offset,\n      offset = _options$offset === void 0 ? [0, 0] : _options$offset;\n  var data = placements.reduce(function (acc, placement) {\n    acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);\n    return acc;\n  }, {});\n  var _data$state$placement = data[state.placement],\n      x = _data$state$placement.x,\n      y = _data$state$placement.y;\n\n  if (state.modifiersData.popperOffsets != null) {\n    state.modifiersData.popperOffsets.x += x;\n    state.modifiersData.popperOffsets.y += y;\n  }\n\n  state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'offset',\n  enabled: true,\n  phase: 'main',\n  requires: ['popperOffsets'],\n  fn: offset\n};", "import computeOffsets from \"../utils/computeOffsets.js\";\n\nfunction popperOffsets(_ref) {\n  var state = _ref.state,\n      name = _ref.name;\n  // Offsets are the actual position the popper needs to have to be\n  // properly positioned near its reference element\n  // This is the most basic placement, and will be adjusted by\n  // the modifiers in the next step\n  state.modifiersData[name] = computeOffsets({\n    reference: state.rects.reference,\n    element: state.rects.popper,\n    strategy: 'absolute',\n    placement: state.placement\n  });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'popperOffsets',\n  enabled: true,\n  phase: 'read',\n  fn: popperOffsets,\n  data: {}\n};", "export default function getAltAxis(axis) {\n  return axis === 'x' ? 'y' : 'x';\n}", "import { top, left, right, bottom, start } from \"../enums.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport getAltAxis from \"../utils/getAltAxis.js\";\nimport { within, withinMaxClamp } from \"../utils/within.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport getFreshSideObject from \"../utils/getFreshSideObject.js\";\nimport { min as mathMin, max as mathMax } from \"../utils/math.js\";\n\nfunction preventOverflow(_ref) {\n  var state = _ref.state,\n      options = _ref.options,\n      name = _ref.name;\n  var _options$mainAxis = options.mainAxis,\n      checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n      _options$altAxis = options.altAxis,\n      checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,\n      boundary = options.boundary,\n      rootBoundary = options.rootBoundary,\n      altBoundary = options.altBoundary,\n      padding = options.padding,\n      _options$tether = options.tether,\n      tether = _options$tether === void 0 ? true : _options$tether,\n      _options$tetherOffset = options.tetherOffset,\n      tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;\n  var overflow = detectOverflow(state, {\n    boundary: boundary,\n    rootBoundary: rootBoundary,\n    padding: padding,\n    altBoundary: altBoundary\n  });\n  var basePlacement = getBasePlacement(state.placement);\n  var variation = getVariation(state.placement);\n  var isBasePlacement = !variation;\n  var mainAxis = getMainAxisFromPlacement(basePlacement);\n  var altAxis = getAltAxis(mainAxis);\n  var popperOffsets = state.modifiersData.popperOffsets;\n  var referenceRect = state.rects.reference;\n  var popperRect = state.rects.popper;\n  var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {\n    placement: state.placement\n  })) : tetherOffset;\n  var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {\n    mainAxis: tetherOffsetValue,\n    altAxis: tetherOffsetValue\n  } : Object.assign({\n    mainAxis: 0,\n    altAxis: 0\n  }, tetherOffsetValue);\n  var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;\n  var data = {\n    x: 0,\n    y: 0\n  };\n\n  if (!popperOffsets) {\n    return;\n  }\n\n  if (checkMainAxis) {\n    var _offsetModifierState$;\n\n    var mainSide = mainAxis === 'y' ? top : left;\n    var altSide = mainAxis === 'y' ? bottom : right;\n    var len = mainAxis === 'y' ? 'height' : 'width';\n    var offset = popperOffsets[mainAxis];\n    var min = offset + overflow[mainSide];\n    var max = offset - overflow[altSide];\n    var additive = tether ? -popperRect[len] / 2 : 0;\n    var minLen = variation === start ? referenceRect[len] : popperRect[len];\n    var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go\n    // outside the reference bounds\n\n    var arrowElement = state.elements.arrow;\n    var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {\n      width: 0,\n      height: 0\n    };\n    var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();\n    var arrowPaddingMin = arrowPaddingObject[mainSide];\n    var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want\n    // to include its full size in the calculation. If the reference is small\n    // and near the edge of a boundary, the popper can overflow even if the\n    // reference is not overflowing as well (e.g. virtual elements with no\n    // width or height)\n\n    var arrowLen = within(0, referenceRect[len], arrowRect[len]);\n    var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;\n    var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;\n    var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);\n    var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;\n    var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;\n    var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;\n    var tetherMax = offset + maxOffset - offsetModifierValue;\n    var preventedOffset = within(tether ? mathMin(min, tetherMin) : min, offset, tether ? mathMax(max, tetherMax) : max);\n    popperOffsets[mainAxis] = preventedOffset;\n    data[mainAxis] = preventedOffset - offset;\n  }\n\n  if (checkAltAxis) {\n    var _offsetModifierState$2;\n\n    var _mainSide = mainAxis === 'x' ? top : left;\n\n    var _altSide = mainAxis === 'x' ? bottom : right;\n\n    var _offset = popperOffsets[altAxis];\n\n    var _len = altAxis === 'y' ? 'height' : 'width';\n\n    var _min = _offset + overflow[_mainSide];\n\n    var _max = _offset - overflow[_altSide];\n\n    var isOriginSide = [top, left].indexOf(basePlacement) !== -1;\n\n    var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;\n\n    var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;\n\n    var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;\n\n    var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);\n\n    popperOffsets[altAxis] = _preventedOffset;\n    data[altAxis] = _preventedOffset - _offset;\n  }\n\n  state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'preventOverflow',\n  enabled: true,\n  phase: 'main',\n  fn: preventOverflow,\n  requiresIfExists: ['offset']\n};", "export default function getHTMLElementScroll(element) {\n  return {\n    scrollLeft: element.scrollLeft,\n    scrollTop: element.scrollTop\n  };\n}", "import getWindowScroll from \"./getWindowScroll.js\";\nimport getWindow from \"./getWindow.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getHTMLElementScroll from \"./getHTMLElementScroll.js\";\nexport default function getNodeScroll(node) {\n  if (node === getWindow(node) || !isHTMLElement(node)) {\n    return getWindowScroll(node);\n  } else {\n    return getHTMLElementScroll(node);\n  }\n}", "import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getNodeScroll from \"./getNodeScroll.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport { round } from \"../utils/math.js\";\n\nfunction isElementScaled(element) {\n  var rect = element.getBoundingClientRect();\n  var scaleX = round(rect.width) / element.offsetWidth || 1;\n  var scaleY = round(rect.height) / element.offsetHeight || 1;\n  return scaleX !== 1 || scaleY !== 1;\n} // Returns the composite rect of an element relative to its offsetParent.\n// Composite means it takes into account transforms as well as layout.\n\n\nexport default function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n  if (isFixed === void 0) {\n    isFixed = false;\n  }\n\n  var isOffsetParentAnElement = isHTMLElement(offsetParent);\n  var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);\n  var documentElement = getDocumentElement(offsetParent);\n  var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);\n  var scroll = {\n    scrollLeft: 0,\n    scrollTop: 0\n  };\n  var offsets = {\n    x: 0,\n    y: 0\n  };\n\n  if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n    if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n    isScrollParent(documentElement)) {\n      scroll = getNodeScroll(offsetParent);\n    }\n\n    if (isHTMLElement(offsetParent)) {\n      offsets = getBoundingClientRect(offsetParent, true);\n      offsets.x += offsetParent.clientLeft;\n      offsets.y += offsetParent.clientTop;\n    } else if (documentElement) {\n      offsets.x = getWindowScrollBarX(documentElement);\n    }\n  }\n\n  return {\n    x: rect.left + scroll.scrollLeft - offsets.x,\n    y: rect.top + scroll.scrollTop - offsets.y,\n    width: rect.width,\n    height: rect.height\n  };\n}", "import { modifierPhases } from \"../enums.js\"; // source: https://stackoverflow.com/questions/49875255\n\nfunction order(modifiers) {\n  var map = new Map();\n  var visited = new Set();\n  var result = [];\n  modifiers.forEach(function (modifier) {\n    map.set(modifier.name, modifier);\n  }); // On visiting object, check for its dependencies and visit them recursively\n\n  function sort(modifier) {\n    visited.add(modifier.name);\n    var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n    requires.forEach(function (dep) {\n      if (!visited.has(dep)) {\n        var depModifier = map.get(dep);\n\n        if (depModifier) {\n          sort(depModifier);\n        }\n      }\n    });\n    result.push(modifier);\n  }\n\n  modifiers.forEach(function (modifier) {\n    if (!visited.has(modifier.name)) {\n      // check for visited object\n      sort(modifier);\n    }\n  });\n  return result;\n}\n\nexport default function orderModifiers(modifiers) {\n  // order based on dependencies\n  var orderedModifiers = order(modifiers); // order based on phase\n\n  return modifierPhases.reduce(function (acc, phase) {\n    return acc.concat(orderedModifiers.filter(function (modifier) {\n      return modifier.phase === phase;\n    }));\n  }, []);\n}", "export default function debounce(fn) {\n  var pending;\n  return function () {\n    if (!pending) {\n      pending = new Promise(function (resolve) {\n        Promise.resolve().then(function () {\n          pending = undefined;\n          resolve(fn());\n        });\n      });\n    }\n\n    return pending;\n  };\n}", "export default function mergeByName(modifiers) {\n  var merged = modifiers.reduce(function (merged, current) {\n    var existing = merged[current.name];\n    merged[current.name] = existing ? Object.assign({}, existing, current, {\n      options: Object.assign({}, existing.options, current.options),\n      data: Object.assign({}, existing.data, current.data)\n    }) : current;\n    return merged;\n  }, {}); // IE11 does not support Object.values\n\n  return Object.keys(merged).map(function (key) {\n    return merged[key];\n  });\n}", "import getCompositeRect from \"./dom-utils/getCompositeRect.js\";\nimport getLayoutRect from \"./dom-utils/getLayoutRect.js\";\nimport listScrollParents from \"./dom-utils/listScrollParents.js\";\nimport getOffsetParent from \"./dom-utils/getOffsetParent.js\";\nimport orderModifiers from \"./utils/orderModifiers.js\";\nimport debounce from \"./utils/debounce.js\";\nimport mergeByName from \"./utils/mergeByName.js\";\nimport detectOverflow from \"./utils/detectOverflow.js\";\nimport { isElement } from \"./dom-utils/instanceOf.js\";\nvar DEFAULT_OPTIONS = {\n  placement: 'bottom',\n  modifiers: [],\n  strategy: 'absolute'\n};\n\nfunction areValidElements() {\n  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n    args[_key] = arguments[_key];\n  }\n\n  return !args.some(function (element) {\n    return !(element && typeof element.getBoundingClientRect === 'function');\n  });\n}\n\nexport function popperGenerator(generatorOptions) {\n  if (generatorOptions === void 0) {\n    generatorOptions = {};\n  }\n\n  var _generatorOptions = generatorOptions,\n      _generatorOptions$def = _generatorOptions.defaultModifiers,\n      defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,\n      _generatorOptions$def2 = _generatorOptions.defaultOptions,\n      defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;\n  return function createPopper(reference, popper, options) {\n    if (options === void 0) {\n      options = defaultOptions;\n    }\n\n    var state = {\n      placement: 'bottom',\n      orderedModifiers: [],\n      options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),\n      modifiersData: {},\n      elements: {\n        reference: reference,\n        popper: popper\n      },\n      attributes: {},\n      styles: {}\n    };\n    var effectCleanupFns = [];\n    var isDestroyed = false;\n    var instance = {\n      state: state,\n      setOptions: function setOptions(setOptionsAction) {\n        var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction;\n        cleanupModifierEffects();\n        state.options = Object.assign({}, defaultOptions, state.options, options);\n        state.scrollParents = {\n          reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],\n          popper: listScrollParents(popper)\n        }; // Orders the modifiers based on their dependencies and `phase`\n        // properties\n\n        var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers\n\n        state.orderedModifiers = orderedModifiers.filter(function (m) {\n          return m.enabled;\n        });\n        runModifierEffects();\n        return instance.update();\n      },\n      // Sync update \u2013 it will always be executed, even if not necessary. This\n      // is useful for low frequency updates where sync behavior simplifies the\n      // logic.\n      // For high frequency updates (e.g. `resize` and `scroll` events), always\n      // prefer the async Popper#update method\n      forceUpdate: function forceUpdate() {\n        if (isDestroyed) {\n          return;\n        }\n\n        var _state$elements = state.elements,\n            reference = _state$elements.reference,\n            popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements\n        // anymore\n\n        if (!areValidElements(reference, popper)) {\n          return;\n        } // Store the reference and popper rects to be read by modifiers\n\n\n        state.rects = {\n          reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),\n          popper: getLayoutRect(popper)\n        }; // Modifiers have the ability to reset the current update cycle. The\n        // most common use case for this is the `flip` modifier changing the\n        // placement, which then needs to re-run all the modifiers, because the\n        // logic was previously ran for the previous placement and is therefore\n        // stale/incorrect\n\n        state.reset = false;\n        state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier\n        // is filled with the initial data specified by the modifier. This means\n        // it doesn't persist and is fresh on each update.\n        // To ensure persistent data, use `${name}#persistent`\n\n        state.orderedModifiers.forEach(function (modifier) {\n          return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);\n        });\n\n        for (var index = 0; index < state.orderedModifiers.length; index++) {\n          if (state.reset === true) {\n            state.reset = false;\n            index = -1;\n            continue;\n          }\n\n          var _state$orderedModifie = state.orderedModifiers[index],\n              fn = _state$orderedModifie.fn,\n              _state$orderedModifie2 = _state$orderedModifie.options,\n              _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,\n              name = _state$orderedModifie.name;\n\n          if (typeof fn === 'function') {\n            state = fn({\n              state: state,\n              options: _options,\n              name: name,\n              instance: instance\n            }) || state;\n          }\n        }\n      },\n      // Async and optimistically optimized update \u2013 it will not be executed if\n      // not necessary (debounced to run at most once-per-tick)\n      update: debounce(function () {\n        return new Promise(function (resolve) {\n          instance.forceUpdate();\n          resolve(state);\n        });\n      }),\n      destroy: function destroy() {\n        cleanupModifierEffects();\n        isDestroyed = true;\n      }\n    };\n\n    if (!areValidElements(reference, popper)) {\n      return instance;\n    }\n\n    instance.setOptions(options).then(function (state) {\n      if (!isDestroyed && options.onFirstUpdate) {\n        options.onFirstUpdate(state);\n      }\n    }); // Modifiers have the ability to execute arbitrary code before the first\n    // update cycle runs. They will be executed in the same order as the update\n    // cycle. This is useful when a modifier adds some persistent data that\n    // other modifiers need to use, but the modifier is run after the dependent\n    // one.\n\n    function runModifierEffects() {\n      state.orderedModifiers.forEach(function (_ref) {\n        var name = _ref.name,\n            _ref$options = _ref.options,\n            options = _ref$options === void 0 ? {} : _ref$options,\n            effect = _ref.effect;\n\n        if (typeof effect === 'function') {\n          var cleanupFn = effect({\n            state: state,\n            name: name,\n            instance: instance,\n            options: options\n          });\n\n          var noopFn = function noopFn() {};\n\n          effectCleanupFns.push(cleanupFn || noopFn);\n        }\n      });\n    }\n\n    function cleanupModifierEffects() {\n      effectCleanupFns.forEach(function (fn) {\n        return fn();\n      });\n      effectCleanupFns = [];\n    }\n\n    return instance;\n  };\n}\nexport var createPopper = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules\n\nexport { detectOverflow };", "import { popperGenerator, detectOverflow } from \"./createPopper.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nimport offset from \"./modifiers/offset.js\";\nimport flip from \"./modifiers/flip.js\";\nimport preventOverflow from \"./modifiers/preventOverflow.js\";\nimport arrow from \"./modifiers/arrow.js\";\nimport hide from \"./modifiers/hide.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles, offset, flip, preventOverflow, arrow, hide];\nvar createPopper = /*#__PURE__*/popperGenerator({\n  defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow }; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper as createPopperLite } from \"./popper-lite.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport * from \"./modifiers/index.js\";", "export const ROUND_ARROW =\n  '<svg width=\"16\" height=\"6\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M0 6s1.796-.013 4.67-3.615C5.851.9 6.93.006 8 0c1.07-.006 2.148.887 3.343 2.385C14.233 6.005 16 6 16 6H0z\"></svg>';\n\nexport const BOX_CLASS = `__NAMESPACE_PREFIX__-box`;\nexport const CONTENT_CLASS = `__NAMESPACE_PREFIX__-content`;\nexport const BACKDROP_CLASS = `__NAMESPACE_PREFIX__-backdrop`;\nexport const ARROW_CLASS = `__NAMESPACE_PREFIX__-arrow`;\nexport const SVG_ARROW_CLASS = `__NAMESPACE_PREFIX__-svg-arrow`;\n\nexport const TOUCH_OPTIONS = {passive: true, capture: true};\n\nexport const TIPPY_DEFAULT_APPEND_TO = () => document.body;\n", "import {BasePlacement, Placement} from './types';\n\nexport function hasOwnProperty(\n  obj: Record<string, unknown>,\n  key: string\n): boolean {\n  return {}.hasOwnProperty.call(obj, key);\n}\n\nexport function getValueAtIndexOrReturn<T>(\n  value: T | [T | null, T | null],\n  index: number,\n  defaultValue: T | [T, T]\n): T {\n  if (Array.isArray(value)) {\n    const v = value[index];\n    return v == null\n      ? Array.isArray(defaultValue)\n        ? defaultValue[index]\n        : defaultValue\n      : v;\n  }\n\n  return value;\n}\n\nexport function isType(value: any, type: string): boolean {\n  const str = {}.toString.call(value);\n  return str.indexOf('[object') === 0 && str.indexOf(`${type}]`) > -1;\n}\n\nexport function invokeWithArgsOrReturn(value: any, args: any[]): any {\n  return typeof value === 'function' ? value(...args) : value;\n}\n\nexport function debounce<T>(\n  fn: (arg: T) => void,\n  ms: number\n): (arg: T) => void {\n  // Avoid wrapping in `setTimeout` if ms is 0 anyway\n  if (ms === 0) {\n    return fn;\n  }\n\n  let timeout: any;\n\n  return (arg): void => {\n    clearTimeout(timeout);\n    timeout = setTimeout(() => {\n      fn(arg);\n    }, ms);\n  };\n}\n\nexport function removeProperties<T>(obj: T, keys: string[]): Partial<T> {\n  const clone = {...obj};\n  keys.forEach((key) => {\n    delete (clone as any)[key];\n  });\n  return clone;\n}\n\nexport function splitBySpaces(value: string): string[] {\n  return value.split(/\\s+/).filter(Boolean);\n}\n\nexport function normalizeToArray<T>(value: T | T[]): T[] {\n  return ([] as T[]).concat(value);\n}\n\nexport function pushIfUnique<T>(arr: T[], value: T): void {\n  if (arr.indexOf(value) === -1) {\n    arr.push(value);\n  }\n}\n\nexport function appendPxIfNumber(value: string | number): string {\n  return typeof value === 'number' ? `${value}px` : value;\n}\n\nexport function unique<T>(arr: T[]): T[] {\n  return arr.filter((item, index) => arr.indexOf(item) === index);\n}\n\nexport function getNumber(value: string | number): number {\n  return typeof value === 'number' ? value : parseFloat(value);\n}\n\nexport function getBasePlacement(placement: Placement): BasePlacement {\n  return placement.split('-')[0] as BasePlacement;\n}\n\nexport function arrayFrom(value: ArrayLike<any>): any[] {\n  return [].slice.call(value);\n}\n\nexport function removeUndefinedProps(\n  obj: Record<string, unknown>\n): Partial<Record<string, unknown>> {\n  return Object.keys(obj).reduce((acc, key) => {\n    if (obj[key] !== undefined) {\n      (acc as any)[key] = obj[key];\n    }\n\n    return acc;\n  }, {});\n}\n", "import {ReferenceElement, Targets} from './types';\nimport {PopperTreeData} from './types-internal';\nimport {arrayFrom, isType, normalizeToArray, getBasePlacement} from './utils';\n\nexport function div(): HTMLDivElement {\n  return document.createElement('div');\n}\n\nexport function isElement(value: unknown): value is Element | DocumentFragment {\n  return ['Element', 'Fragment'].some((type) => isType(value, type));\n}\n\nexport function isNodeList(value: unknown): value is NodeList {\n  return isType(value, 'NodeList');\n}\n\nexport function isMouseEvent(value: unknown): value is MouseEvent {\n  return isType(value, 'MouseEvent');\n}\n\nexport function isReferenceElement(value: any): value is ReferenceElement {\n  return !!(value && value._tippy && value._tippy.reference === value);\n}\n\nexport function getArrayOfElements(value: Targets): Element[] {\n  if (isElement(value)) {\n    return [value];\n  }\n\n  if (isNodeList(value)) {\n    return arrayFrom(value);\n  }\n\n  if (Array.isArray(value)) {\n    return value;\n  }\n\n  return arrayFrom(document.querySelectorAll(value));\n}\n\nexport function setTransitionDuration(\n  els: (HTMLDivElement | null)[],\n  value: number\n): void {\n  els.forEach((el) => {\n    if (el) {\n      el.style.transitionDuration = `${value}ms`;\n    }\n  });\n}\n\nexport function setVisibilityState(\n  els: (HTMLDivElement | null)[],\n  state: 'visible' | 'hidden'\n): void {\n  els.forEach((el) => {\n    if (el) {\n      el.setAttribute('data-state', state);\n    }\n  });\n}\n\nexport function getOwnerDocument(\n  elementOrElements: Element | Element[]\n): Document {\n  const [element] = normalizeToArray(elementOrElements);\n\n  // Elements created via a <template> have an ownerDocument with no reference to the body\n  return element?.ownerDocument?.body ? element.ownerDocument : document;\n}\n\nexport function isCursorOutsideInteractiveBorder(\n  popperTreeData: PopperTreeData[],\n  event: MouseEvent\n): boolean {\n  const {clientX, clientY} = event;\n\n  return popperTreeData.every(({popperRect, popperState, props}) => {\n    const {interactiveBorder} = props;\n    const basePlacement = getBasePlacement(popperState.placement);\n    const offsetData = popperState.modifiersData.offset;\n\n    if (!offsetData) {\n      return true;\n    }\n\n    const topDistance = basePlacement === 'bottom' ? offsetData.top!.y : 0;\n    const bottomDistance = basePlacement === 'top' ? offsetData.bottom!.y : 0;\n    const leftDistance = basePlacement === 'right' ? offsetData.left!.x : 0;\n    const rightDistance = basePlacement === 'left' ? offsetData.right!.x : 0;\n\n    const exceedsTop =\n      popperRect.top - clientY + topDistance > interactiveBorder;\n    const exceedsBottom =\n      clientY - popperRect.bottom - bottomDistance > interactiveBorder;\n    const exceedsLeft =\n      popperRect.left - clientX + leftDistance > interactiveBorder;\n    const exceedsRight =\n      clientX - popperRect.right - rightDistance > interactiveBorder;\n\n    return exceedsTop || exceedsBottom || exceedsLeft || exceedsRight;\n  });\n}\n\nexport function updateTransitionEndListener(\n  box: HTMLDivElement,\n  action: 'add' | 'remove',\n  listener: (event: TransitionEvent) => void\n): void {\n  const method = `${action}EventListener` as\n    | 'addEventListener'\n    | 'removeEventListener';\n\n  // some browsers apparently support `transition` (unprefixed) but only fire\n  // `webkitTransitionEnd`...\n  ['transitionend', 'webkitTransitionEnd'].forEach((event) => {\n    box[method](event, listener as EventListener);\n  });\n}\n\n/**\n * Compared to xxx.contains, this function works for dom structures with shadow\n * dom\n */\nexport function actualContains(parent: Element, child: Element): boolean {\n  let target = child;\n  while (target) {\n    if (parent.contains(target)) {\n      return true;\n    }\n    target = (target.getRootNode?.() as any)?.host;\n  }\n  return false;\n}\n", "import {TOUCH_OPTIONS} from './constants';\nimport {isReferenceElement} from './dom-utils';\n\nexport const currentInput = {isTouch: false};\nlet lastMouseMoveTime = 0;\n\n/**\n * When a `touchstart` event is fired, it's assumed the user is using touch\n * input. We'll bind a `mousemove` event listener to listen for mouse input in\n * the future. This way, the `isTouch` property is fully dynamic and will handle\n * hybrid devices that use a mix of touch + mouse input.\n */\nexport function onDocumentTouchStart(): void {\n  if (currentInput.isTouch) {\n    return;\n  }\n\n  currentInput.isTouch = true;\n\n  if (window.performance) {\n    document.addEventListener('mousemove', onDocumentMouseMove);\n  }\n}\n\n/**\n * When two `mousemove` event are fired consecutively within 20ms, it's assumed\n * the user is using mouse input again. `mousemove` can fire on touch devices as\n * well, but very rarely that quickly.\n */\nexport function onDocumentMouseMove(): void {\n  const now = performance.now();\n\n  if (now - lastMouseMoveTime < 20) {\n    currentInput.isTouch = false;\n\n    document.removeEventListener('mousemove', onDocumentMouseMove);\n  }\n\n  lastMouseMoveTime = now;\n}\n\n/**\n * When an element is in focus and has a tippy, leaving the tab/window and\n * returning causes it to show again. For mouse users this is unexpected, but\n * for keyboard use it makes sense.\n * TODO: find a better technique to solve this problem\n */\nexport function onWindowBlur(): void {\n  const activeElement = document.activeElement as HTMLElement | null;\n\n  if (isReferenceElement(activeElement)) {\n    const instance = activeElement._tippy!;\n\n    if (activeElement.blur && !instance.state.isVisible) {\n      activeElement.blur();\n    }\n  }\n}\n\nexport default function bindGlobalEventListeners(): void {\n  document.addEventListener('touchstart', onDocumentTouchStart, TOUCH_OPTIONS);\n  window.addEventListener('blur', onWindowBlur);\n}\n", "export const isBrowser =\n  typeof window !== 'undefined' && typeof document !== 'undefined';\n\nexport const isIE11 = isBrowser\n  ? // @ts-ignore\n    !!window.msCrypto\n  : false;\n", "import {Targets} from './types';\n\nexport function createMemoryLeakWarning(method: string): string {\n  const txt = method === 'destroy' ? 'n already-' : ' ';\n\n  return [\n    `${method}() was called on a${txt}destroyed instance. This is a no-op but`,\n    'indicates a potential memory leak.',\n  ].join(' ');\n}\n\nexport function clean(value: string): string {\n  const spacesAndTabs = /[ \\t]{2,}/g;\n  const lineStartWithSpaces = /^[ \\t]*/gm;\n\n  return value\n    .replace(spacesAndTabs, ' ')\n    .replace(lineStartWithSpaces, '')\n    .trim();\n}\n\nfunction getDevMessage(message: string): string {\n  return clean(`\n  %ctippy.js\n\n  %c${clean(message)}\n\n  %c👷‍ This is a development-only message. It will be removed in production.\n  `);\n}\n\nexport function getFormattedMessage(message: string): string[] {\n  return [\n    getDevMessage(message),\n    // title\n    'color: #00C584; font-size: 1.3em; font-weight: bold;',\n    // message\n    'line-height: 1.5',\n    // footer\n    'color: #a6a095;',\n  ];\n}\n\n// Assume warnings and errors never have the same message\nlet visitedMessages: Set<string>;\nif (__DEV__) {\n  resetVisitedMessages();\n}\n\nexport function resetVisitedMessages(): void {\n  visitedMessages = new Set();\n}\n\nexport function warnWhen(condition: boolean, message: string): void {\n  if (condition && !visitedMessages.has(message)) {\n    visitedMessages.add(message);\n    console.warn(...getFormattedMessage(message));\n  }\n}\n\nexport function errorWhen(condition: boolean, message: string): void {\n  if (condition && !visitedMessages.has(message)) {\n    visitedMessages.add(message);\n    console.error(...getFormattedMessage(message));\n  }\n}\n\nexport function validateTargets(targets: Targets): void {\n  const didPassFalsyValue = !targets;\n  const didPassPlainObject =\n    Object.prototype.toString.call(targets) === '[object Object]' &&\n    !(targets as any).addEventListener;\n\n  errorWhen(\n    didPassFalsyValue,\n    [\n      'tippy() was passed',\n      '`' + String(targets) + '`',\n      'as its targets (first) argument. Valid types are: String, Element,',\n      'Element[], or NodeList.',\n    ].join(' ')\n  );\n\n  errorWhen(\n    didPassPlainObject,\n    [\n      'tippy() was passed a plain object which is not supported as an argument',\n      'for virtual positioning. Use props.getReferenceClientRect instead.',\n    ].join(' ')\n  );\n}\n", "import {DefaultProps, Plugin, Props, ReferenceElement, Tippy} from './types';\nimport {\n  hasOwnProperty,\n  removeProperties,\n  invokeWithArgsOrReturn,\n} from './utils';\nimport {warnWhen} from './validation';\nimport {TIPPY_DEFAULT_APPEND_TO} from './constants';\n\nconst pluginProps = {\n  animateFill: false,\n  followCursor: false,\n  inlinePositioning: false,\n  sticky: false,\n};\n\nconst renderProps = {\n  allowHTML: false,\n  animation: 'fade',\n  arrow: true,\n  content: '',\n  inertia: false,\n  maxWidth: 350,\n  role: 'tooltip',\n  theme: '',\n  zIndex: 9999,\n};\n\nexport const defaultProps: DefaultProps = {\n  appendTo: TIPPY_DEFAULT_APPEND_TO,\n  aria: {\n    content: 'auto',\n    expanded: 'auto',\n  },\n  delay: 0,\n  duration: [300, 250],\n  getReferenceClientRect: null,\n  hideOnClick: true,\n  ignoreAttributes: false,\n  interactive: false,\n  interactiveBorder: 2,\n  interactiveDebounce: 0,\n  moveTransition: '',\n  offset: [0, 10],\n  onAfterUpdate() {},\n  onBeforeUpdate() {},\n  onCreate() {},\n  onDestroy() {},\n  onHidden() {},\n  onHide() {},\n  onMount() {},\n  onShow() {},\n  onShown() {},\n  onTrigger() {},\n  onUntrigger() {},\n  onClickOutside() {},\n  placement: 'top',\n  plugins: [],\n  popperOptions: {},\n  render: null,\n  showOnCreate: false,\n  touch: true,\n  trigger: 'mouseenter focus',\n  triggerTarget: null,\n  ...pluginProps,\n  ...renderProps,\n};\n\nconst defaultKeys = Object.keys(defaultProps);\n\nexport const setDefaultProps: Tippy['setDefaultProps'] = (partialProps) => {\n  /* istanbul ignore else */\n  if (__DEV__) {\n    validateProps(partialProps, []);\n  }\n\n  const keys = Object.keys(partialProps) as Array<keyof DefaultProps>;\n  keys.forEach((key) => {\n    (defaultProps as any)[key] = partialProps[key];\n  });\n};\n\nexport function getExtendedPassedProps(\n  passedProps: Partial<Props> & Record<string, unknown>\n): Partial<Props> {\n  const plugins = passedProps.plugins || [];\n  const pluginProps = plugins.reduce<Record<string, unknown>>((acc, plugin) => {\n    const {name, defaultValue} = plugin;\n\n    if (name) {\n      acc[name] =\n        passedProps[name] !== undefined\n          ? passedProps[name]\n          : (defaultProps as any)[name] ?? defaultValue;\n    }\n\n    return acc;\n  }, {});\n\n  return {\n    ...passedProps,\n    ...pluginProps,\n  };\n}\n\nexport function getDataAttributeProps(\n  reference: ReferenceElement,\n  plugins: Plugin[]\n): Record<string, unknown> {\n  const propKeys = plugins\n    ? Object.keys(getExtendedPassedProps({...defaultProps, plugins}))\n    : defaultKeys;\n\n  const props = propKeys.reduce(\n    (acc: Partial<Props> & Record<string, unknown>, key) => {\n      const valueAsString = (\n        reference.getAttribute(`data-tippy-${key}`) || ''\n      ).trim();\n\n      if (!valueAsString) {\n        return acc;\n      }\n\n      if (key === 'content') {\n        acc[key] = valueAsString;\n      } else {\n        try {\n          acc[key] = JSON.parse(valueAsString);\n        } catch (e) {\n          acc[key] = valueAsString;\n        }\n      }\n\n      return acc;\n    },\n    {}\n  );\n\n  return props;\n}\n\nexport function evaluateProps(\n  reference: ReferenceElement,\n  props: Props\n): Props {\n  const out = {\n    ...props,\n    content: invokeWithArgsOrReturn(props.content, [reference]),\n    ...(props.ignoreAttributes\n      ? {}\n      : getDataAttributeProps(reference, props.plugins)),\n  };\n\n  out.aria = {\n    ...defaultProps.aria,\n    ...out.aria,\n  };\n\n  out.aria = {\n    expanded:\n      out.aria.expanded === 'auto' ? props.interactive : out.aria.expanded,\n    content:\n      out.aria.content === 'auto'\n        ? props.interactive\n          ? null\n          : 'describedby'\n        : out.aria.content,\n  };\n\n  return out;\n}\n\nexport function validateProps(\n  partialProps: Partial<Props> = {},\n  plugins: Plugin[] = []\n): void {\n  const keys = Object.keys(partialProps) as Array<keyof Props>;\n  keys.forEach((prop) => {\n    const nonPluginProps = removeProperties(\n      defaultProps,\n      Object.keys(pluginProps)\n    );\n\n    let didPassUnknownProp = !hasOwnProperty(nonPluginProps, prop);\n\n    // Check if the prop exists in `plugins`\n    if (didPassUnknownProp) {\n      didPassUnknownProp =\n        plugins.filter((plugin) => plugin.name === prop).length === 0;\n    }\n\n    warnWhen(\n      didPassUnknownProp,\n      [\n        `\\`${prop}\\``,\n        \"is not a valid prop. You may have spelled it incorrectly, or if it's\",\n        'a plugin, forgot to pass it in an array as props.plugins.',\n        '\\n\\n',\n        'All props: https://atomiks.github.io/tippyjs/v6/all-props/\\n',\n        'Plugins: https://atomiks.github.io/tippyjs/v6/plugins/',\n      ].join(' ')\n    );\n  });\n}\n", "import {\n  ARROW_CLASS,\n  BACKDROP_CLASS,\n  BOX_CLASS,\n  CONTENT_CLASS,\n  SVG_ARROW_CLASS,\n} from './constants';\nimport {div, isElement} from './dom-utils';\nimport {Instance, PopperElement, Props} from './types';\nimport {PopperChildren} from './types-internal';\nimport {arrayFrom} from './utils';\n\n// Firefox extensions don't allow .innerHTML = \"...\" property. This tricks it.\nconst innerHTML = (): 'innerHTML' => 'innerHTML';\n\nfunction dangerouslySetInnerHTML(element: Element, html: string): void {\n  element[innerHTML()] = html;\n}\n\nfunction createArrowElement(value: Props['arrow']): HTMLDivElement {\n  const arrow = div();\n\n  if (value === true) {\n    arrow.className = ARROW_CLASS;\n  } else {\n    arrow.className = SVG_ARROW_CLASS;\n\n    if (isElement(value)) {\n      arrow.appendChild(value);\n    } else {\n      dangerouslySetInnerHTML(arrow, value as string);\n    }\n  }\n\n  return arrow;\n}\n\nexport function setContent(content: HTMLDivElement, props: Props): void {\n  if (isElement(props.content)) {\n    dangerouslySetInnerHTML(content, '');\n    content.appendChild(props.content);\n  } else if (typeof props.content !== 'function') {\n    if (props.allowHTML) {\n      dangerouslySetInnerHTML(content, props.content);\n    } else {\n      content.textContent = props.content;\n    }\n  }\n}\n\nexport function getChildren(popper: PopperElement): PopperChildren {\n  const box = popper.firstElementChild as HTMLDivElement;\n  const boxChildren = arrayFrom(box.children);\n\n  return {\n    box,\n    content: boxChildren.find((node) => node.classList.contains(CONTENT_CLASS)),\n    arrow: boxChildren.find(\n      (node) =>\n        node.classList.contains(ARROW_CLASS) ||\n        node.classList.contains(SVG_ARROW_CLASS)\n    ),\n    backdrop: boxChildren.find((node) =>\n      node.classList.contains(BACKDROP_CLASS)\n    ),\n  };\n}\n\nexport function render(\n  instance: Instance\n): {\n  popper: PopperElement;\n  onUpdate?: (prevProps: Props, nextProps: Props) => void;\n} {\n  const popper = div();\n\n  const box = div();\n  box.className = BOX_CLASS;\n  box.setAttribute('data-state', 'hidden');\n  box.setAttribute('tabindex', '-1');\n\n  const content = div();\n  content.className = CONTENT_CLASS;\n  content.setAttribute('data-state', 'hidden');\n\n  setContent(content, instance.props);\n\n  popper.appendChild(box);\n  box.appendChild(content);\n\n  onUpdate(instance.props, instance.props);\n\n  function onUpdate(prevProps: Props, nextProps: Props): void {\n    const {box, content, arrow} = getChildren(popper);\n\n    if (nextProps.theme) {\n      box.setAttribute('data-theme', nextProps.theme);\n    } else {\n      box.removeAttribute('data-theme');\n    }\n\n    if (typeof nextProps.animation === 'string') {\n      box.setAttribute('data-animation', nextProps.animation);\n    } else {\n      box.removeAttribute('data-animation');\n    }\n\n    if (nextProps.inertia) {\n      box.setAttribute('data-inertia', '');\n    } else {\n      box.removeAttribute('data-inertia');\n    }\n\n    box.style.maxWidth =\n      typeof nextProps.maxWidth === 'number'\n        ? `${nextProps.maxWidth}px`\n        : nextProps.maxWidth;\n\n    if (nextProps.role) {\n      box.setAttribute('role', nextProps.role);\n    } else {\n      box.removeAttribute('role');\n    }\n\n    if (\n      prevProps.content !== nextProps.content ||\n      prevProps.allowHTML !== nextProps.allowHTML\n    ) {\n      setContent(content, instance.props);\n    }\n\n    if (nextProps.arrow) {\n      if (!arrow) {\n        box.appendChild(createArrowElement(nextProps.arrow));\n      } else if (prevProps.arrow !== nextProps.arrow) {\n        box.removeChild(arrow);\n        box.appendChild(createArrowElement(nextProps.arrow));\n      }\n    } else if (arrow) {\n      box.removeChild(arrow!);\n    }\n  }\n\n  return {\n    popper,\n    onUpdate,\n  };\n}\n\n// Runtime check to identify if the render function is the default one; this\n// way we can apply default CSS transitions logic and it can be tree-shaken away\nrender.$$tippy = true;\n", "import {createPopper, StrictModifiers, Modifier} from '@popperjs/core';\nimport {currentInput} from './bindGlobalEventListeners';\nimport {isIE11} from './browser';\nimport {TIPPY_DEFAULT_APPEND_TO, TOUCH_OPTIONS} from './constants';\nimport {\n  actualContains,\n  div,\n  getOwnerDocument,\n  isCursorOutsideInteractiveBorder,\n  isMouseEvent,\n  setTransitionDuration,\n  setVisibilityState,\n  updateTransitionEndListener,\n} from './dom-utils';\nimport {defaultProps, evaluateProps, getExtendedPassedProps} from './props';\nimport {getChildren} from './template';\nimport {\n  Content,\n  Instance,\n  LifecycleHooks,\n  PopperElement,\n  Props,\n  ReferenceElement,\n} from './types';\nimport {ListenerObject, PopperTreeData, PopperChildren} from './types-internal';\nimport {\n  arrayFrom,\n  debounce,\n  getValueAtIndexOrReturn,\n  invokeWithArgsOrReturn,\n  normalizeToArray,\n  pushIfUnique,\n  splitBySpaces,\n  unique,\n  removeUndefinedProps,\n} from './utils';\nimport {createMemoryLeakWarning, errorWhen, warnWhen} from './validation';\n\nlet idCounter = 1;\nlet mouseMoveListeners: ((event: MouseEvent) => void)[] = [];\n\n// Used by `hideAll()`\nexport let mountedInstances: Instance[] = [];\n\nexport default function createTippy(\n  reference: ReferenceElement,\n  passedProps: Partial<Props>\n): Instance {\n  const props = evaluateProps(reference, {\n    ...defaultProps,\n    ...getExtendedPassedProps(removeUndefinedProps(passedProps)),\n  });\n\n  // ===========================================================================\n  // 🔒 Private members\n  // ===========================================================================\n  let showTimeout: any;\n  let hideTimeout: any;\n  let scheduleHideAnimationFrame: number;\n  let isVisibleFromClick = false;\n  let didHideDueToDocumentMouseDown = false;\n  let didTouchMove = false;\n  let ignoreOnFirstUpdate = false;\n  let lastTriggerEvent: Event | undefined;\n  let currentTransitionEndListener: (event: TransitionEvent) => void;\n  let onFirstUpdate: () => void;\n  let listeners: ListenerObject[] = [];\n  let debouncedOnMouseMove = debounce(onMouseMove, props.interactiveDebounce);\n  let currentTarget: Element;\n\n  // ===========================================================================\n  // 🔑 Public members\n  // ===========================================================================\n  const id = idCounter++;\n  const popperInstance = null;\n  const plugins = unique(props.plugins);\n\n  const state = {\n    // Is the instance currently enabled?\n    isEnabled: true,\n    // Is the tippy currently showing and not transitioning out?\n    isVisible: false,\n    // Has the instance been destroyed?\n    isDestroyed: false,\n    // Is the tippy currently mounted to the DOM?\n    isMounted: false,\n    // Has the tippy finished transitioning in?\n    isShown: false,\n  };\n\n  const instance: Instance = {\n    // properties\n    id,\n    reference,\n    popper: div(),\n    popperInstance,\n    props,\n    state,\n    plugins,\n    // methods\n    clearDelayTimeouts,\n    setProps,\n    setContent,\n    show,\n    hide,\n    hideWithInteractivity,\n    enable,\n    disable,\n    unmount,\n    destroy,\n  };\n\n  // TODO: Investigate why this early return causes a TDZ error in the tests —\n  // it doesn't seem to happen in the browser\n  /* istanbul ignore if */\n  if (!props.render) {\n    if (__DEV__) {\n      errorWhen(true, 'render() function has not been supplied.');\n    }\n\n    return instance;\n  }\n\n  // ===========================================================================\n  // Initial mutations\n  // ===========================================================================\n  const {popper, onUpdate} = props.render(instance);\n\n  popper.setAttribute('data-__NAMESPACE_PREFIX__-root', '');\n  popper.id = `__NAMESPACE_PREFIX__-${instance.id}`;\n\n  instance.popper = popper;\n  reference._tippy = instance;\n  popper._tippy = instance;\n\n  const pluginsHooks = plugins.map((plugin) => plugin.fn(instance));\n  const hasAriaExpanded = reference.hasAttribute('aria-expanded');\n\n  addListeners();\n  handleAriaExpandedAttribute();\n  handleStyles();\n\n  invokeHook('onCreate', [instance]);\n\n  if (props.showOnCreate) {\n    scheduleShow();\n  }\n\n  // Prevent a tippy with a delay from hiding if the cursor left then returned\n  // before it started hiding\n  popper.addEventListener('mouseenter', () => {\n    if (instance.props.interactive && instance.state.isVisible) {\n      instance.clearDelayTimeouts();\n    }\n  });\n\n  popper.addEventListener('mouseleave', () => {\n    if (\n      instance.props.interactive &&\n      instance.props.trigger.indexOf('mouseenter') >= 0\n    ) {\n      getDocument().addEventListener('mousemove', debouncedOnMouseMove);\n    }\n  });\n\n  return instance;\n\n  // ===========================================================================\n  // 🔒 Private methods\n  // ===========================================================================\n  function getNormalizedTouchSettings(): [string | boolean, number] {\n    const {touch} = instance.props;\n    return Array.isArray(touch) ? touch : [touch, 0];\n  }\n\n  function getIsCustomTouchBehavior(): boolean {\n    return getNormalizedTouchSettings()[0] === 'hold';\n  }\n\n  function getIsDefaultRenderFn(): boolean {\n    // @ts-ignore\n    return !!instance.props.render?.$$tippy;\n  }\n\n  function getCurrentTarget(): Element {\n    return currentTarget || reference;\n  }\n\n  function getDocument(): Document {\n    const parent = getCurrentTarget().parentNode as Element;\n    return parent ? getOwnerDocument(parent) : document;\n  }\n\n  function getDefaultTemplateChildren(): PopperChildren {\n    return getChildren(popper);\n  }\n\n  function getDelay(isShow: boolean): number {\n    // For touch or keyboard input, force `0` delay for UX reasons\n    // Also if the instance is mounted but not visible (transitioning out),\n    // ignore delay\n    if (\n      (instance.state.isMounted && !instance.state.isVisible) ||\n      currentInput.isTouch ||\n      (lastTriggerEvent && lastTriggerEvent.type === 'focus')\n    ) {\n      return 0;\n    }\n\n    return getValueAtIndexOrReturn(\n      instance.props.delay,\n      isShow ? 0 : 1,\n      defaultProps.delay\n    );\n  }\n\n  function handleStyles(fromHide = false): void {\n    popper.style.pointerEvents =\n      instance.props.interactive && !fromHide ? '' : 'none';\n    popper.style.zIndex = `${instance.props.zIndex}`;\n  }\n\n  function invokeHook(\n    hook: keyof LifecycleHooks,\n    args: [Instance, any?],\n    shouldInvokePropsHook = true\n  ): void {\n    pluginsHooks.forEach((pluginHooks) => {\n      if (pluginHooks[hook]) {\n        pluginHooks[hook]!(...args);\n      }\n    });\n\n    if (shouldInvokePropsHook) {\n      instance.props[hook](...args);\n    }\n  }\n\n  function handleAriaContentAttribute(): void {\n    const {aria} = instance.props;\n\n    if (!aria.content) {\n      return;\n    }\n\n    const attr = `aria-${aria.content}`;\n    const id = popper.id;\n    const nodes = normalizeToArray(instance.props.triggerTarget || reference);\n\n    nodes.forEach((node) => {\n      const currentValue = node.getAttribute(attr);\n\n      if (instance.state.isVisible) {\n        node.setAttribute(attr, currentValue ? `${currentValue} ${id}` : id);\n      } else {\n        const nextValue = currentValue && currentValue.replace(id, '').trim();\n\n        if (nextValue) {\n          node.setAttribute(attr, nextValue);\n        } else {\n          node.removeAttribute(attr);\n        }\n      }\n    });\n  }\n\n  function handleAriaExpandedAttribute(): void {\n    if (hasAriaExpanded || !instance.props.aria.expanded) {\n      return;\n    }\n\n    const nodes = normalizeToArray(instance.props.triggerTarget || reference);\n\n    nodes.forEach((node) => {\n      if (instance.props.interactive) {\n        node.setAttribute(\n          'aria-expanded',\n          instance.state.isVisible && node === getCurrentTarget()\n            ? 'true'\n            : 'false'\n        );\n      } else {\n        node.removeAttribute('aria-expanded');\n      }\n    });\n  }\n\n  function cleanupInteractiveMouseListeners(): void {\n    getDocument().removeEventListener('mousemove', debouncedOnMouseMove);\n    mouseMoveListeners = mouseMoveListeners.filter(\n      (listener) => listener !== debouncedOnMouseMove\n    );\n  }\n\n  function onDocumentPress(event: MouseEvent | TouchEvent): void {\n    // Moved finger to scroll instead of an intentional tap outside\n    if (currentInput.isTouch) {\n      if (didTouchMove || event.type === 'mousedown') {\n        return;\n      }\n    }\n\n    const actualTarget =\n      (event.composedPath && event.composedPath()[0]) || event.target;\n\n    // Clicked on interactive popper\n    if (\n      instance.props.interactive &&\n      actualContains(popper, actualTarget as Element)\n    ) {\n      return;\n    }\n\n    // Clicked on the event listeners target\n    if (\n      normalizeToArray(instance.props.triggerTarget || reference).some((el) =>\n        actualContains(el, actualTarget as Element)\n      )\n    ) {\n      if (currentInput.isTouch) {\n        return;\n      }\n\n      if (\n        instance.state.isVisible &&\n        instance.props.trigger.indexOf('click') >= 0\n      ) {\n        return;\n      }\n    } else {\n      invokeHook('onClickOutside', [instance, event]);\n    }\n\n    if (instance.props.hideOnClick === true) {\n      instance.clearDelayTimeouts();\n      instance.hide();\n\n      // `mousedown` event is fired right before `focus` if pressing the\n      // currentTarget. This lets a tippy with `focus` trigger know that it\n      // should not show\n      didHideDueToDocumentMouseDown = true;\n      setTimeout(() => {\n        didHideDueToDocumentMouseDown = false;\n      });\n\n      // The listener gets added in `scheduleShow()`, but this may be hiding it\n      // before it shows, and hide()'s early bail-out behavior can prevent it\n      // from being cleaned up\n      if (!instance.state.isMounted) {\n        removeDocumentPress();\n      }\n    }\n  }\n\n  function onTouchMove(): void {\n    didTouchMove = true;\n  }\n\n  function onTouchStart(): void {\n    didTouchMove = false;\n  }\n\n  function addDocumentPress(): void {\n    const doc = getDocument();\n    doc.addEventListener('mousedown', onDocumentPress, true);\n    doc.addEventListener('touchend', onDocumentPress, TOUCH_OPTIONS);\n    doc.addEventListener('touchstart', onTouchStart, TOUCH_OPTIONS);\n    doc.addEventListener('touchmove', onTouchMove, TOUCH_OPTIONS);\n  }\n\n  function removeDocumentPress(): void {\n    const doc = getDocument();\n    doc.removeEventListener('mousedown', onDocumentPress, true);\n    doc.removeEventListener('touchend', onDocumentPress, TOUCH_OPTIONS);\n    doc.removeEventListener('touchstart', onTouchStart, TOUCH_OPTIONS);\n    doc.removeEventListener('touchmove', onTouchMove, TOUCH_OPTIONS);\n  }\n\n  function onTransitionedOut(duration: number, callback: () => void): void {\n    onTransitionEnd(duration, () => {\n      if (\n        !instance.state.isVisible &&\n        popper.parentNode &&\n        popper.parentNode.contains(popper)\n      ) {\n        callback();\n      }\n    });\n  }\n\n  function onTransitionedIn(duration: number, callback: () => void): void {\n    onTransitionEnd(duration, callback);\n  }\n\n  function onTransitionEnd(duration: number, callback: () => void): void {\n    const box = getDefaultTemplateChildren().box;\n\n    function listener(event: TransitionEvent): void {\n      if (event.target === box) {\n        updateTransitionEndListener(box, 'remove', listener);\n        callback();\n      }\n    }\n\n    // Make callback synchronous if duration is 0\n    // `transitionend` won't fire otherwise\n    if (duration === 0) {\n      return callback();\n    }\n\n    updateTransitionEndListener(box, 'remove', currentTransitionEndListener);\n    updateTransitionEndListener(box, 'add', listener);\n\n    currentTransitionEndListener = listener;\n  }\n\n  function on(\n    eventType: string,\n    handler: EventListener,\n    options: boolean | Record<string, unknown> = false\n  ): void {\n    const nodes = normalizeToArray(instance.props.triggerTarget || reference);\n    nodes.forEach((node) => {\n      node.addEventListener(eventType, handler, options);\n      listeners.push({node, eventType, handler, options});\n    });\n  }\n\n  function addListeners(): void {\n    if (getIsCustomTouchBehavior()) {\n      on('touchstart', onTrigger, {passive: true});\n      on('touchend', onMouseLeave as EventListener, {passive: true});\n    }\n\n    splitBySpaces(instance.props.trigger).forEach((eventType) => {\n      if (eventType === 'manual') {\n        return;\n      }\n\n      on(eventType, onTrigger);\n\n      switch (eventType) {\n        case 'mouseenter':\n          on('mouseleave', onMouseLeave as EventListener);\n          break;\n        case 'focus':\n          on(isIE11 ? 'focusout' : 'blur', onBlurOrFocusOut as EventListener);\n          break;\n        case 'focusin':\n          on('focusout', onBlurOrFocusOut as EventListener);\n          break;\n      }\n    });\n  }\n\n  function removeListeners(): void {\n    listeners.forEach(({node, eventType, handler, options}: ListenerObject) => {\n      node.removeEventListener(eventType, handler, options);\n    });\n    listeners = [];\n  }\n\n  function onTrigger(event: Event): void {\n    let shouldScheduleClickHide = false;\n\n    if (\n      !instance.state.isEnabled ||\n      isEventListenerStopped(event) ||\n      didHideDueToDocumentMouseDown\n    ) {\n      return;\n    }\n\n    const wasFocused = lastTriggerEvent?.type === 'focus';\n\n    lastTriggerEvent = event;\n    currentTarget = event.currentTarget as Element;\n\n    handleAriaExpandedAttribute();\n\n    if (!instance.state.isVisible && isMouseEvent(event)) {\n      // If scrolling, `mouseenter` events can be fired if the cursor lands\n      // over a new target, but `mousemove` events don't get fired. This\n      // causes interactive tooltips to get stuck open until the cursor is\n      // moved\n      mouseMoveListeners.forEach((listener) => listener(event));\n    }\n\n    // Toggle show/hide when clicking click-triggered tooltips\n    if (\n      event.type === 'click' &&\n      (instance.props.trigger.indexOf('mouseenter') < 0 ||\n        isVisibleFromClick) &&\n      instance.props.hideOnClick !== false &&\n      instance.state.isVisible\n    ) {\n      shouldScheduleClickHide = true;\n    } else {\n      scheduleShow(event);\n    }\n\n    if (event.type === 'click') {\n      isVisibleFromClick = !shouldScheduleClickHide;\n    }\n\n    if (shouldScheduleClickHide && !wasFocused) {\n      scheduleHide(event);\n    }\n  }\n\n  function onMouseMove(event: MouseEvent): void {\n    const target = event.target as Node;\n    const isCursorOverReferenceOrPopper =\n      getCurrentTarget().contains(target) || popper.contains(target);\n\n    if (event.type === 'mousemove' && isCursorOverReferenceOrPopper) {\n      return;\n    }\n\n    const popperTreeData = getNestedPopperTree()\n      .concat(popper)\n      .map((popper) => {\n        const instance = popper._tippy!;\n        const state = instance.popperInstance?.state;\n\n        if (state) {\n          return {\n            popperRect: popper.getBoundingClientRect(),\n            popperState: state,\n            props,\n          };\n        }\n\n        return null;\n      })\n      .filter(Boolean) as PopperTreeData[];\n\n    if (isCursorOutsideInteractiveBorder(popperTreeData, event)) {\n      cleanupInteractiveMouseListeners();\n      scheduleHide(event);\n    }\n  }\n\n  function onMouseLeave(event: MouseEvent): void {\n    const shouldBail =\n      isEventListenerStopped(event) ||\n      (instance.props.trigger.indexOf('click') >= 0 && isVisibleFromClick);\n\n    if (shouldBail) {\n      return;\n    }\n\n    if (instance.props.interactive) {\n      instance.hideWithInteractivity(event);\n      return;\n    }\n\n    scheduleHide(event);\n  }\n\n  function onBlurOrFocusOut(event: FocusEvent): void {\n    if (\n      instance.props.trigger.indexOf('focusin') < 0 &&\n      event.target !== getCurrentTarget()\n    ) {\n      return;\n    }\n\n    // If focus was moved to within the popper\n    if (\n      instance.props.interactive &&\n      event.relatedTarget &&\n      popper.contains(event.relatedTarget as Element)\n    ) {\n      return;\n    }\n\n    scheduleHide(event);\n  }\n\n  function isEventListenerStopped(event: Event): boolean {\n    return currentInput.isTouch\n      ? getIsCustomTouchBehavior() !== event.type.indexOf('touch') >= 0\n      : false;\n  }\n\n  function createPopperInstance(): void {\n    destroyPopperInstance();\n\n    const {\n      popperOptions,\n      placement,\n      offset,\n      getReferenceClientRect,\n      moveTransition,\n    } = instance.props;\n\n    const arrow = getIsDefaultRenderFn() ? getChildren(popper).arrow : null;\n\n    const computedReference = getReferenceClientRect\n      ? {\n          getBoundingClientRect: getReferenceClientRect,\n          contextElement:\n            getReferenceClientRect.contextElement || getCurrentTarget(),\n        }\n      : reference;\n\n    const tippyModifier: Modifier<'$$tippy', Record<string, unknown>> = {\n      name: '$$tippy',\n      enabled: true,\n      phase: 'beforeWrite',\n      requires: ['computeStyles'],\n      fn({state}) {\n        if (getIsDefaultRenderFn()) {\n          const {box} = getDefaultTemplateChildren();\n\n          ['placement', 'reference-hidden', 'escaped'].forEach((attr) => {\n            if (attr === 'placement') {\n              box.setAttribute('data-placement', state.placement);\n            } else {\n              if (state.attributes.popper[`data-popper-${attr}`]) {\n                box.setAttribute(`data-${attr}`, '');\n              } else {\n                box.removeAttribute(`data-${attr}`);\n              }\n            }\n          });\n\n          state.attributes.popper = {};\n        }\n      },\n    };\n\n    type TippyModifier = Modifier<'$$tippy', Record<string, unknown>>;\n    type ExtendedModifiers = StrictModifiers | Partial<TippyModifier>;\n\n    const modifiers: Array<ExtendedModifiers> = [\n      {\n        name: 'offset',\n        options: {\n          offset,\n        },\n      },\n      {\n        name: 'preventOverflow',\n        options: {\n          padding: {\n            top: 2,\n            bottom: 2,\n            left: 5,\n            right: 5,\n          },\n        },\n      },\n      {\n        name: 'flip',\n        options: {\n          padding: 5,\n        },\n      },\n      {\n        name: 'computeStyles',\n        options: {\n          adaptive: !moveTransition,\n        },\n      },\n      tippyModifier,\n    ];\n\n    if (getIsDefaultRenderFn() && arrow) {\n      modifiers.push({\n        name: 'arrow',\n        options: {\n          element: arrow,\n          padding: 3,\n        },\n      });\n    }\n\n    modifiers.push(...(popperOptions?.modifiers || []));\n\n    instance.popperInstance = createPopper<ExtendedModifiers>(\n      computedReference,\n      popper,\n      {\n        ...popperOptions,\n        placement,\n        onFirstUpdate,\n        modifiers,\n      }\n    );\n  }\n\n  function destroyPopperInstance(): void {\n    if (instance.popperInstance) {\n      instance.popperInstance.destroy();\n      instance.popperInstance = null;\n    }\n  }\n\n  function mount(): void {\n    const {appendTo} = instance.props;\n\n    let parentNode: any;\n\n    // By default, we'll append the popper to the triggerTargets's parentNode so\n    // it's directly after the reference element so the elements inside the\n    // tippy can be tabbed to\n    // If there are clipping issues, the user can specify a different appendTo\n    // and ensure focus management is handled correctly manually\n    const node = getCurrentTarget();\n\n    if (\n      (instance.props.interactive && appendTo === TIPPY_DEFAULT_APPEND_TO) ||\n      appendTo === 'parent'\n    ) {\n      parentNode = node.parentNode;\n    } else {\n      parentNode = invokeWithArgsOrReturn(appendTo, [node]);\n    }\n\n    // The popper element needs to exist on the DOM before its position can be\n    // updated as Popper needs to read its dimensions\n    if (!parentNode.contains(popper)) {\n      parentNode.appendChild(popper);\n    }\n\n    instance.state.isMounted = true;\n\n    createPopperInstance();\n\n    /* istanbul ignore else */\n    if (__DEV__) {\n      // Accessibility check\n      warnWhen(\n        instance.props.interactive &&\n          appendTo === defaultProps.appendTo &&\n          node.nextElementSibling !== popper,\n        [\n          'Interactive tippy element may not be accessible via keyboard',\n          'navigation because it is not directly after the reference element',\n          'in the DOM source order.',\n          '\\n\\n',\n          'Using a wrapper <div> or <span> tag around the reference element',\n          'solves this by creating a new parentNode context.',\n          '\\n\\n',\n          'Specifying `appendTo: document.body` silences this warning, but it',\n          'assumes you are using a focus management solution to handle',\n          'keyboard navigation.',\n          '\\n\\n',\n          'See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity',\n        ].join(' ')\n      );\n    }\n  }\n\n  function getNestedPopperTree(): PopperElement[] {\n    return arrayFrom(\n      popper.querySelectorAll('[data-__NAMESPACE_PREFIX__-root]')\n    );\n  }\n\n  function scheduleShow(event?: Event): void {\n    instance.clearDelayTimeouts();\n\n    if (event) {\n      invokeHook('onTrigger', [instance, event]);\n    }\n\n    addDocumentPress();\n\n    let delay = getDelay(true);\n    const [touchValue, touchDelay] = getNormalizedTouchSettings();\n\n    if (currentInput.isTouch && touchValue === 'hold' && touchDelay) {\n      delay = touchDelay;\n    }\n\n    if (delay) {\n      showTimeout = setTimeout(() => {\n        instance.show();\n      }, delay);\n    } else {\n      instance.show();\n    }\n  }\n\n  function scheduleHide(event: Event): void {\n    instance.clearDelayTimeouts();\n\n    invokeHook('onUntrigger', [instance, event]);\n\n    if (!instance.state.isVisible) {\n      removeDocumentPress();\n\n      return;\n    }\n\n    // For interactive tippies, scheduleHide is added to a document.body handler\n    // from onMouseLeave so must intercept scheduled hides from mousemove/leave\n    // events when trigger contains mouseenter and click, and the tip is\n    // currently shown as a result of a click.\n    if (\n      instance.props.trigger.indexOf('mouseenter') >= 0 &&\n      instance.props.trigger.indexOf('click') >= 0 &&\n      ['mouseleave', 'mousemove'].indexOf(event.type) >= 0 &&\n      isVisibleFromClick\n    ) {\n      return;\n    }\n\n    const delay = getDelay(false);\n\n    if (delay) {\n      hideTimeout = setTimeout(() => {\n        if (instance.state.isVisible) {\n          instance.hide();\n        }\n      }, delay);\n    } else {\n      // Fixes a `transitionend` problem when it fires 1 frame too\n      // late sometimes, we don't want hide() to be called.\n      scheduleHideAnimationFrame = requestAnimationFrame(() => {\n        instance.hide();\n      });\n    }\n  }\n\n  // ===========================================================================\n  // 🔑 Public methods\n  // ===========================================================================\n  function enable(): void {\n    instance.state.isEnabled = true;\n  }\n\n  function disable(): void {\n    // Disabling the instance should also hide it\n    // https://github.com/atomiks/tippy.js-react/issues/106\n    instance.hide();\n    instance.state.isEnabled = false;\n  }\n\n  function clearDelayTimeouts(): void {\n    clearTimeout(showTimeout);\n    clearTimeout(hideTimeout);\n    cancelAnimationFrame(scheduleHideAnimationFrame);\n  }\n\n  function setProps(partialProps: Partial<Props>): void {\n    /* istanbul ignore else */\n    if (__DEV__) {\n      warnWhen(instance.state.isDestroyed, createMemoryLeakWarning('setProps'));\n    }\n\n    if (instance.state.isDestroyed) {\n      return;\n    }\n\n    invokeHook('onBeforeUpdate', [instance, partialProps]);\n\n    removeListeners();\n\n    const prevProps = instance.props;\n    const nextProps = evaluateProps(reference, {\n      ...prevProps,\n      ...removeUndefinedProps(partialProps),\n      ignoreAttributes: true,\n    });\n\n    instance.props = nextProps;\n\n    addListeners();\n\n    if (prevProps.interactiveDebounce !== nextProps.interactiveDebounce) {\n      cleanupInteractiveMouseListeners();\n      debouncedOnMouseMove = debounce(\n        onMouseMove,\n        nextProps.interactiveDebounce\n      );\n    }\n\n    // Ensure stale aria-expanded attributes are removed\n    if (prevProps.triggerTarget && !nextProps.triggerTarget) {\n      normalizeToArray(prevProps.triggerTarget).forEach((node) => {\n        node.removeAttribute('aria-expanded');\n      });\n    } else if (nextProps.triggerTarget) {\n      reference.removeAttribute('aria-expanded');\n    }\n\n    handleAriaExpandedAttribute();\n    handleStyles();\n\n    if (onUpdate) {\n      onUpdate(prevProps, nextProps);\n    }\n\n    if (instance.popperInstance) {\n      createPopperInstance();\n\n      // Fixes an issue with nested tippies if they are all getting re-rendered,\n      // and the nested ones get re-rendered first.\n      // https://github.com/atomiks/tippyjs-react/issues/177\n      // TODO: find a cleaner / more efficient solution(!)\n      getNestedPopperTree().forEach((nestedPopper) => {\n        // React (and other UI libs likely) requires a rAF wrapper as it flushes\n        // its work in one\n        requestAnimationFrame(nestedPopper._tippy!.popperInstance!.forceUpdate);\n      });\n    }\n\n    invokeHook('onAfterUpdate', [instance, partialProps]);\n  }\n\n  function setContent(content: Content): void {\n    instance.setProps({content});\n  }\n\n  function show(): void {\n    /* istanbul ignore else */\n    if (__DEV__) {\n      warnWhen(instance.state.isDestroyed, createMemoryLeakWarning('show'));\n    }\n\n    // Early bail-out\n    const isAlreadyVisible = instance.state.isVisible;\n    const isDestroyed = instance.state.isDestroyed;\n    const isDisabled = !instance.state.isEnabled;\n    const isTouchAndTouchDisabled =\n      currentInput.isTouch && !instance.props.touch;\n    const duration = getValueAtIndexOrReturn(\n      instance.props.duration,\n      0,\n      defaultProps.duration\n    );\n\n    if (\n      isAlreadyVisible ||\n      isDestroyed ||\n      isDisabled ||\n      isTouchAndTouchDisabled\n    ) {\n      return;\n    }\n\n    // Normalize `disabled` behavior across browsers.\n    // Firefox allows events on disabled elements, but Chrome doesn't.\n    // Using a wrapper element (i.e. <span>) is recommended.\n    if (getCurrentTarget().hasAttribute('disabled')) {\n      return;\n    }\n\n    invokeHook('onShow', [instance], false);\n    if (instance.props.onShow(instance) === false) {\n      return;\n    }\n\n    instance.state.isVisible = true;\n\n    if (getIsDefaultRenderFn()) {\n      popper.style.visibility = 'visible';\n    }\n\n    handleStyles();\n    addDocumentPress();\n\n    if (!instance.state.isMounted) {\n      popper.style.transition = 'none';\n    }\n\n    // If flipping to the opposite side after hiding at least once, the\n    // animation will use the wrong placement without resetting the duration\n    if (getIsDefaultRenderFn()) {\n      const {box, content} = getDefaultTemplateChildren();\n      setTransitionDuration([box, content], 0);\n    }\n\n    onFirstUpdate = (): void => {\n      if (!instance.state.isVisible || ignoreOnFirstUpdate) {\n        return;\n      }\n\n      ignoreOnFirstUpdate = true;\n\n      // reflow\n      void popper.offsetHeight;\n\n      popper.style.transition = instance.props.moveTransition;\n\n      if (getIsDefaultRenderFn() && instance.props.animation) {\n        const {box, content} = getDefaultTemplateChildren();\n        setTransitionDuration([box, content], duration);\n        setVisibilityState([box, content], 'visible');\n      }\n\n      handleAriaContentAttribute();\n      handleAriaExpandedAttribute();\n\n      pushIfUnique(mountedInstances, instance);\n\n      // certain modifiers (e.g. `maxSize`) require a second update after the\n      // popper has been positioned for the first time\n      instance.popperInstance?.forceUpdate();\n\n      invokeHook('onMount', [instance]);\n\n      if (instance.props.animation && getIsDefaultRenderFn()) {\n        onTransitionedIn(duration, () => {\n          instance.state.isShown = true;\n          invokeHook('onShown', [instance]);\n        });\n      }\n    };\n\n    mount();\n  }\n\n  function hide(): void {\n    /* istanbul ignore else */\n    if (__DEV__) {\n      warnWhen(instance.state.isDestroyed, createMemoryLeakWarning('hide'));\n    }\n\n    // Early bail-out\n    const isAlreadyHidden = !instance.state.isVisible;\n    const isDestroyed = instance.state.isDestroyed;\n    const isDisabled = !instance.state.isEnabled;\n    const duration = getValueAtIndexOrReturn(\n      instance.props.duration,\n      1,\n      defaultProps.duration\n    );\n\n    if (isAlreadyHidden || isDestroyed || isDisabled) {\n      return;\n    }\n\n    invokeHook('onHide', [instance], false);\n    if (instance.props.onHide(instance) === false) {\n      return;\n    }\n\n    instance.state.isVisible = false;\n    instance.state.isShown = false;\n    ignoreOnFirstUpdate = false;\n    isVisibleFromClick = false;\n\n    if (getIsDefaultRenderFn()) {\n      popper.style.visibility = 'hidden';\n    }\n\n    cleanupInteractiveMouseListeners();\n    removeDocumentPress();\n    handleStyles(true);\n\n    if (getIsDefaultRenderFn()) {\n      const {box, content} = getDefaultTemplateChildren();\n\n      if (instance.props.animation) {\n        setTransitionDuration([box, content], duration);\n        setVisibilityState([box, content], 'hidden');\n      }\n    }\n\n    handleAriaContentAttribute();\n    handleAriaExpandedAttribute();\n\n    if (instance.props.animation) {\n      if (getIsDefaultRenderFn()) {\n        onTransitionedOut(duration, instance.unmount);\n      }\n    } else {\n      instance.unmount();\n    }\n  }\n\n  function hideWithInteractivity(event: MouseEvent): void {\n    /* istanbul ignore else */\n    if (__DEV__) {\n      warnWhen(\n        instance.state.isDestroyed,\n        createMemoryLeakWarning('hideWithInteractivity')\n      );\n    }\n\n    getDocument().addEventListener('mousemove', debouncedOnMouseMove);\n    pushIfUnique(mouseMoveListeners, debouncedOnMouseMove);\n    debouncedOnMouseMove(event);\n  }\n\n  function unmount(): void {\n    /* istanbul ignore else */\n    if (__DEV__) {\n      warnWhen(instance.state.isDestroyed, createMemoryLeakWarning('unmount'));\n    }\n\n    if (instance.state.isVisible) {\n      instance.hide();\n    }\n\n    if (!instance.state.isMounted) {\n      return;\n    }\n\n    destroyPopperInstance();\n\n    // If a popper is not interactive, it will be appended outside the popper\n    // tree by default. This seems mainly for interactive tippies, but we should\n    // find a workaround if possible\n    getNestedPopperTree().forEach((nestedPopper) => {\n      nestedPopper._tippy!.unmount();\n    });\n\n    if (popper.parentNode) {\n      popper.parentNode.removeChild(popper);\n    }\n\n    mountedInstances = mountedInstances.filter((i) => i !== instance);\n\n    instance.state.isMounted = false;\n    invokeHook('onHidden', [instance]);\n  }\n\n  function destroy(): void {\n    /* istanbul ignore else */\n    if (__DEV__) {\n      warnWhen(instance.state.isDestroyed, createMemoryLeakWarning('destroy'));\n    }\n\n    if (instance.state.isDestroyed) {\n      return;\n    }\n\n    instance.clearDelayTimeouts();\n    instance.unmount();\n\n    removeListeners();\n\n    delete reference._tippy;\n\n    instance.state.isDestroyed = true;\n\n    invokeHook('onDestroy', [instance]);\n  }\n}\n", "import bindGlobalEventListeners, {\n  currentInput,\n} from './bindGlobalEventListeners';\nimport createTippy, {mountedInstances} from './createTippy';\nimport {getArrayOfElements, isElement, isReferenceElement} from './dom-utils';\nimport {defaultProps, setDefaultProps, validateProps} from './props';\nimport {HideAll, HideAllOptions, Instance, Props, Targets} from './types';\nimport {validateTargets, warnWhen} from './validation';\n\nfunction tippy(\n  targets: Targets,\n  optionalProps: Partial<Props> = {}\n): Instance | Instance[] {\n  const plugins = defaultProps.plugins.concat(optionalProps.plugins || []);\n\n  /* istanbul ignore else */\n  if (__DEV__) {\n    validateTargets(targets);\n    validateProps(optionalProps, plugins);\n  }\n\n  bindGlobalEventListeners();\n\n  const passedProps: Partial<Props> = {...optionalProps, plugins};\n\n  const elements = getArrayOfElements(targets);\n\n  /* istanbul ignore else */\n  if (__DEV__) {\n    const isSingleContentElement = isElement(passedProps.content);\n    const isMoreThanOneReferenceElement = elements.length > 1;\n    warnWhen(\n      isSingleContentElement && isMoreThanOneReferenceElement,\n      [\n        'tippy() was passed an Element as the `content` prop, but more than',\n        'one tippy instance was created by this invocation. This means the',\n        'content element will only be appended to the last tippy instance.',\n        '\\n\\n',\n        'Instead, pass the .innerHTML of the element, or use a function that',\n        'returns a cloned version of the element instead.',\n        '\\n\\n',\n        '1) content: element.innerHTML\\n',\n        '2) content: () => element.cloneNode(true)',\n      ].join(' ')\n    );\n  }\n\n  const instances = elements.reduce<Instance[]>(\n    (acc, reference): Instance[] => {\n      const instance = reference && createTippy(reference, passedProps);\n\n      if (instance) {\n        acc.push(instance);\n      }\n\n      return acc;\n    },\n    []\n  );\n\n  return isElement(targets) ? instances[0] : instances;\n}\n\ntippy.defaultProps = defaultProps;\ntippy.setDefaultProps = setDefaultProps;\ntippy.currentInput = currentInput;\n\nexport default tippy;\n\nexport const hideAll: HideAll = ({\n  exclude: excludedReferenceOrInstance,\n  duration,\n}: HideAllOptions = {}) => {\n  mountedInstances.forEach((instance) => {\n    let isExcluded = false;\n\n    if (excludedReferenceOrInstance) {\n      isExcluded = isReferenceElement(excludedReferenceOrInstance)\n        ? instance.reference === excludedReferenceOrInstance\n        : instance.popper === (excludedReferenceOrInstance as Instance).popper;\n    }\n\n    if (!isExcluded) {\n      const originalDuration = instance.props.duration;\n\n      instance.setProps({duration});\n      instance.hide();\n\n      if (!instance.state.isDestroyed) {\n        instance.setProps({duration: originalDuration});\n      }\n    }\n  });\n};\n", "import tippy from '..';\nimport {div} from '../dom-utils';\nimport {\n  CreateSingleton,\n  Plugin,\n  CreateSingletonProps,\n  ReferenceElement,\n  CreateSingletonInstance,\n  Instance,\n  Props,\n} from '../types';\nimport {normalizeToArray, removeProperties} from '../utils';\nimport {errorWhen} from '../validation';\nimport {applyStyles, Modifier} from '@popperjs/core';\n\n// The default `applyStyles` modifier has a cleanup function that gets called\n// every time the popper is destroyed (i.e. a new target), removing the styles\n// and causing transitions to break for singletons when the console is open, but\n// most notably for non-transform styles being used, `gpuAcceleration: false`.\nconst applyStylesModifier: Modifier<'applyStyles', Record<string, unknown>> = {\n  ...applyStyles,\n  effect({state}) {\n    const initialStyles = {\n      popper: {\n        position: state.options.strategy,\n        left: '0',\n        top: '0',\n        margin: '0',\n      },\n      arrow: {\n        position: 'absolute',\n      },\n      reference: {},\n    };\n\n    Object.assign(state.elements.popper.style, initialStyles.popper);\n    state.styles = initialStyles;\n\n    if (state.elements.arrow) {\n      Object.assign(state.elements.arrow.style, initialStyles.arrow);\n    }\n\n    // intentionally return no cleanup function\n    // return () => { ... }\n  },\n};\n\nconst createSingleton: CreateSingleton = (\n  tippyInstances,\n  optionalProps = {}\n) => {\n  /* istanbul ignore else */\n  if (__DEV__) {\n    errorWhen(\n      !Array.isArray(tippyInstances),\n      [\n        'The first argument passed to createSingleton() must be an array of',\n        'tippy instances. The passed value was',\n        String(tippyInstances),\n      ].join(' ')\n    );\n  }\n\n  let individualInstances = tippyInstances;\n  let references: Array<ReferenceElement> = [];\n  let triggerTargets: Array<Element> = [];\n  let currentTarget: Element | null;\n  let overrides = optionalProps.overrides;\n  let interceptSetPropsCleanups: Array<() => void> = [];\n  let shownOnCreate = false;\n\n  function setTriggerTargets(): void {\n    triggerTargets = individualInstances\n      .map((instance) =>\n        normalizeToArray(instance.props.triggerTarget || instance.reference)\n      )\n      .reduce((acc, item) => acc.concat(item), []);\n  }\n\n  function setReferences(): void {\n    references = individualInstances.map((instance) => instance.reference);\n  }\n\n  function enableInstances(isEnabled: boolean): void {\n    individualInstances.forEach((instance) => {\n      if (isEnabled) {\n        instance.enable();\n      } else {\n        instance.disable();\n      }\n    });\n  }\n\n  function interceptSetProps(singleton: Instance): Array<() => void> {\n    return individualInstances.map((instance) => {\n      const originalSetProps = instance.setProps;\n\n      instance.setProps = (props): void => {\n        originalSetProps(props);\n\n        if (instance.reference === currentTarget) {\n          singleton.setProps(props);\n        }\n      };\n\n      return (): void => {\n        instance.setProps = originalSetProps;\n      };\n    });\n  }\n\n  // have to pass singleton, as it maybe undefined on first call\n  function prepareInstance(\n    singleton: Instance,\n    target: ReferenceElement\n  ): void {\n    const index = triggerTargets.indexOf(target);\n\n    // bail-out\n    if (target === currentTarget) {\n      return;\n    }\n\n    currentTarget = target;\n\n    const overrideProps: Partial<Props> = (overrides || [])\n      .concat('content')\n      .reduce((acc, prop) => {\n        (acc as any)[prop] = individualInstances[index].props[prop];\n        return acc;\n      }, {});\n\n    singleton.setProps({\n      ...overrideProps,\n      getReferenceClientRect:\n        typeof overrideProps.getReferenceClientRect === 'function'\n          ? overrideProps.getReferenceClientRect\n          : (): ClientRect => references[index]?.getBoundingClientRect(),\n    });\n  }\n\n  enableInstances(false);\n  setReferences();\n  setTriggerTargets();\n\n  const plugin: Plugin = {\n    fn() {\n      return {\n        onDestroy(): void {\n          enableInstances(true);\n        },\n        onHidden(): void {\n          currentTarget = null;\n        },\n        onClickOutside(instance): void {\n          if (instance.props.showOnCreate && !shownOnCreate) {\n            shownOnCreate = true;\n            currentTarget = null;\n          }\n        },\n        onShow(instance): void {\n          if (instance.props.showOnCreate && !shownOnCreate) {\n            shownOnCreate = true;\n            prepareInstance(instance, references[0]);\n          }\n        },\n        onTrigger(instance, event): void {\n          prepareInstance(instance, event.currentTarget as Element);\n        },\n      };\n    },\n  };\n\n  const singleton = tippy(div(), {\n    ...removeProperties(optionalProps, ['overrides']),\n    plugins: [plugin, ...(optionalProps.plugins || [])],\n    triggerTarget: triggerTargets,\n    popperOptions: {\n      ...optionalProps.popperOptions,\n      modifiers: [\n        ...(optionalProps.popperOptions?.modifiers || []),\n        applyStylesModifier,\n      ],\n    },\n  }) as CreateSingletonInstance<CreateSingletonProps>;\n\n  const originalShow = singleton.show;\n\n  singleton.show = (target?: ReferenceElement | Instance | number): void => {\n    originalShow();\n\n    // first time, showOnCreate or programmatic call with no params\n    // default to showing first instance\n    if (!currentTarget && target == null) {\n      return prepareInstance(singleton, references[0]);\n    }\n\n    // triggered from event (do nothing as prepareInstance already called by onTrigger)\n    // programmatic call with no params when already visible (do nothing again)\n    if (currentTarget && target == null) {\n      return;\n    }\n\n    // target is index of instance\n    if (typeof target === 'number') {\n      return (\n        references[target] && prepareInstance(singleton, references[target])\n      );\n    }\n\n    // target is a child tippy instance\n    if (individualInstances.indexOf(target as Instance) >= 0) {\n      const ref = (target as Instance).reference;\n      return prepareInstance(singleton, ref);\n    }\n\n    // target is a ReferenceElement\n    if (references.indexOf(target as ReferenceElement) >= 0) {\n      return prepareInstance(singleton, target as ReferenceElement);\n    }\n  };\n\n  singleton.showNext = (): void => {\n    const first = references[0];\n    if (!currentTarget) {\n      return singleton.show(0);\n    }\n    const index = references.indexOf(currentTarget);\n    singleton.show(references[index + 1] || first);\n  };\n\n  singleton.showPrevious = (): void => {\n    const last = references[references.length - 1];\n    if (!currentTarget) {\n      return singleton.show(last);\n    }\n    const index = references.indexOf(currentTarget);\n    const target = references[index - 1] || last;\n    singleton.show(target);\n  };\n\n  const originalSetProps = singleton.setProps;\n\n  singleton.setProps = (props): void => {\n    overrides = props.overrides || overrides;\n    originalSetProps(props);\n  };\n\n  singleton.setInstances = (nextInstances): void => {\n    enableInstances(true);\n    interceptSetPropsCleanups.forEach((fn) => fn());\n\n    individualInstances = nextInstances;\n\n    enableInstances(false);\n    setReferences();\n    setTriggerTargets();\n    interceptSetPropsCleanups = interceptSetProps(singleton);\n\n    singleton.setProps({triggerTarget: triggerTargets});\n  };\n\n  interceptSetPropsCleanups = interceptSetProps(singleton);\n\n  return singleton;\n};\n\nexport default createSingleton;\n", "import tippy from '..';\nimport {TOUCH_OPTIONS} from '../constants';\nimport {defaultProps} from '../props';\nimport {Instance, Props, Targets} from '../types';\nimport {ListenerObject} from '../types-internal';\nimport {normalizeToArray, removeProperties} from '../utils';\nimport {errorWhen} from '../validation';\n\nconst BUBBLING_EVENTS_MAP = {\n  mouseover: 'mouseenter',\n  focusin: 'focus',\n  click: 'click',\n};\n\n/**\n * Creates a delegate instance that controls the creation of tippy instances\n * for child elements (`target` CSS selector).\n */\nfunction delegate(\n  targets: Targets,\n  props: Partial<Props> & {target: string}\n): Instance | Instance[] {\n  /* istanbul ignore else */\n  if (__DEV__) {\n    errorWhen(\n      !(props && props.target),\n      [\n        'You must specity a `target` prop indicating a CSS selector string matching',\n        'the target elements that should receive a tippy.',\n      ].join(' ')\n    );\n  }\n\n  let listeners: ListenerObject[] = [];\n  let childTippyInstances: Instance[] = [];\n  let disabled = false;\n\n  const {target} = props;\n\n  const nativeProps = removeProperties(props, ['target']);\n  const parentProps = {...nativeProps, trigger: 'manual', touch: false};\n  const childProps = {\n    touch: defaultProps.touch,\n    ...nativeProps,\n    showOnCreate: true,\n  };\n\n  const returnValue = tippy(targets, parentProps);\n  const normalizedReturnValue = normalizeToArray(returnValue);\n\n  function onTrigger(event: Event): void {\n    if (!event.target || disabled) {\n      return;\n    }\n\n    const targetNode = (event.target as Element).closest(target);\n\n    if (!targetNode) {\n      return;\n    }\n\n    // Get relevant trigger with fallbacks:\n    // 1. Check `data-tippy-trigger` attribute on target node\n    // 2. Fallback to `trigger` passed to `delegate()`\n    // 3. Fallback to `defaultProps.trigger`\n    const trigger =\n      targetNode.getAttribute('data-tippy-trigger') ||\n      props.trigger ||\n      defaultProps.trigger;\n\n    // @ts-ignore\n    if (targetNode._tippy) {\n      return;\n    }\n\n    if (event.type === 'touchstart' && typeof childProps.touch === 'boolean') {\n      return;\n    }\n\n    if (\n      event.type !== 'touchstart' &&\n      trigger.indexOf((BUBBLING_EVENTS_MAP as any)[event.type]) < 0\n    ) {\n      return;\n    }\n\n    const instance = tippy(targetNode, childProps);\n\n    if (instance) {\n      childTippyInstances = childTippyInstances.concat(instance);\n    }\n  }\n\n  function on(\n    node: Element,\n    eventType: string,\n    handler: EventListener,\n    options: boolean | Record<string, unknown> = false\n  ): void {\n    node.addEventListener(eventType, handler, options);\n    listeners.push({node, eventType, handler, options});\n  }\n\n  function addEventListeners(instance: Instance): void {\n    const {reference} = instance;\n\n    on(reference, 'touchstart', onTrigger, TOUCH_OPTIONS);\n    on(reference, 'mouseover', onTrigger);\n    on(reference, 'focusin', onTrigger);\n    on(reference, 'click', onTrigger);\n  }\n\n  function removeEventListeners(): void {\n    listeners.forEach(({node, eventType, handler, options}: ListenerObject) => {\n      node.removeEventListener(eventType, handler, options);\n    });\n    listeners = [];\n  }\n\n  function applyMutations(instance: Instance): void {\n    const originalDestroy = instance.destroy;\n    const originalEnable = instance.enable;\n    const originalDisable = instance.disable;\n\n    instance.destroy = (shouldDestroyChildInstances = true): void => {\n      if (shouldDestroyChildInstances) {\n        childTippyInstances.forEach((instance) => {\n          instance.destroy();\n        });\n      }\n\n      childTippyInstances = [];\n\n      removeEventListeners();\n      originalDestroy();\n    };\n\n    instance.enable = (): void => {\n      originalEnable();\n      childTippyInstances.forEach((instance) => instance.enable());\n      disabled = false;\n    };\n\n    instance.disable = (): void => {\n      originalDisable();\n      childTippyInstances.forEach((instance) => instance.disable());\n      disabled = true;\n    };\n\n    addEventListeners(instance);\n  }\n\n  normalizedReturnValue.forEach(applyMutations);\n\n  return returnValue;\n}\n\nexport default delegate;\n", "import {BACKDROP_CLASS} from '../constants';\nimport {div, setVisibilityState} from '../dom-utils';\nimport {getChildren} from '../template';\nimport {AnimateFill} from '../types';\nimport {errorWhen} from '../validation';\n\nconst animateFill: AnimateFill = {\n  name: 'animateFill',\n  defaultValue: false,\n  fn(instance) {\n    // @ts-ignore\n    if (!instance.props.render?.$$tippy) {\n      if (__DEV__) {\n        errorWhen(\n          instance.props.animateFill,\n          'The `animateFill` plugin requires the default render function.'\n        );\n      }\n\n      return {};\n    }\n\n    const {box, content} = getChildren(instance.popper);\n\n    const backdrop = instance.props.animateFill\n      ? createBackdropElement()\n      : null;\n\n    return {\n      onCreate(): void {\n        if (backdrop) {\n          box.insertBefore(backdrop, box.firstElementChild!);\n          box.setAttribute('data-animatefill', '');\n          box.style.overflow = 'hidden';\n\n          instance.setProps({arrow: false, animation: 'shift-away'});\n        }\n      },\n      onMount(): void {\n        if (backdrop) {\n          const {transitionDuration} = box.style;\n          const duration = Number(transitionDuration.replace('ms', ''));\n\n          // The content should fade in after the backdrop has mostly filled the\n          // tooltip element. `clip-path` is the other alternative but is not\n          // well-supported and is buggy on some devices.\n          content.style.transitionDelay = `${Math.round(duration / 10)}ms`;\n\n          backdrop.style.transitionDuration = transitionDuration;\n          setVisibilityState([backdrop], 'visible');\n        }\n      },\n      onShow(): void {\n        if (backdrop) {\n          backdrop.style.transitionDuration = '0ms';\n        }\n      },\n      onHide(): void {\n        if (backdrop) {\n          setVisibilityState([backdrop], 'hidden');\n        }\n      },\n    };\n  },\n};\n\nexport default animateFill;\n\nfunction createBackdropElement(): HTMLDivElement {\n  const backdrop = div();\n  backdrop.className = BACKDROP_CLASS;\n  setVisibilityState([backdrop], 'hidden');\n  return backdrop;\n}\n", "import {getOwnerDocument, isMouseEvent} from '../dom-utils';\nimport {FollowCursor, Instance} from '../types';\n\nlet mouseCoords = {clientX: 0, clientY: 0};\nlet activeInstances: Array<{instance: Instance; doc: Document}> = [];\n\nfunction storeMouseCoords({clientX, clientY}: MouseEvent): void {\n  mouseCoords = {clientX, clientY};\n}\n\nfunction addMouseCoordsListener(doc: Document): void {\n  doc.addEventListener('mousemove', storeMouseCoords);\n}\n\nfunction removeMouseCoordsListener(doc: Document): void {\n  doc.removeEventListener('mousemove', storeMouseCoords);\n}\n\nconst followCursor: FollowCursor = {\n  name: 'followCursor',\n  defaultValue: false,\n  fn(instance) {\n    const reference = instance.reference;\n    const doc = getOwnerDocument(instance.props.triggerTarget || reference);\n\n    let isInternalUpdate = false;\n    let wasFocusEvent = false;\n    let isUnmounted = true;\n    let prevProps = instance.props;\n\n    function getIsInitialBehavior(): boolean {\n      return (\n        instance.props.followCursor === 'initial' && instance.state.isVisible\n      );\n    }\n\n    function addListener(): void {\n      doc.addEventListener('mousemove', onMouseMove);\n    }\n\n    function removeListener(): void {\n      doc.removeEventListener('mousemove', onMouseMove);\n    }\n\n    function unsetGetReferenceClientRect(): void {\n      isInternalUpdate = true;\n      instance.setProps({getReferenceClientRect: null});\n      isInternalUpdate = false;\n    }\n\n    function onMouseMove(event: MouseEvent): void {\n      // If the instance is interactive, avoid updating the position unless it's\n      // over the reference element\n      const isCursorOverReference = event.target\n        ? reference.contains(event.target as Node)\n        : true;\n      const {followCursor} = instance.props;\n      const {clientX, clientY} = event;\n\n      const rect = reference.getBoundingClientRect();\n      const relativeX = clientX - rect.left;\n      const relativeY = clientY - rect.top;\n\n      if (isCursorOverReference || !instance.props.interactive) {\n        instance.setProps({\n          // @ts-ignore - unneeded DOMRect properties\n          getReferenceClientRect() {\n            const rect = reference.getBoundingClientRect();\n\n            let x = clientX;\n            let y = clientY;\n\n            if (followCursor === 'initial') {\n              x = rect.left + relativeX;\n              y = rect.top + relativeY;\n            }\n\n            const top = followCursor === 'horizontal' ? rect.top : y;\n            const right = followCursor === 'vertical' ? rect.right : x;\n            const bottom = followCursor === 'horizontal' ? rect.bottom : y;\n            const left = followCursor === 'vertical' ? rect.left : x;\n\n            return {\n              width: right - left,\n              height: bottom - top,\n              top,\n              right,\n              bottom,\n              left,\n            };\n          },\n        });\n      }\n    }\n\n    function create(): void {\n      if (instance.props.followCursor) {\n        activeInstances.push({instance, doc});\n        addMouseCoordsListener(doc);\n      }\n    }\n\n    function destroy(): void {\n      activeInstances = activeInstances.filter(\n        (data) => data.instance !== instance\n      );\n\n      if (activeInstances.filter((data) => data.doc === doc).length === 0) {\n        removeMouseCoordsListener(doc);\n      }\n    }\n\n    return {\n      onCreate: create,\n      onDestroy: destroy,\n      onBeforeUpdate(): void {\n        prevProps = instance.props;\n      },\n      onAfterUpdate(_, {followCursor}): void {\n        if (isInternalUpdate) {\n          return;\n        }\n\n        if (\n          followCursor !== undefined &&\n          prevProps.followCursor !== followCursor\n        ) {\n          destroy();\n\n          if (followCursor) {\n            create();\n\n            if (\n              instance.state.isMounted &&\n              !wasFocusEvent &&\n              !getIsInitialBehavior()\n            ) {\n              addListener();\n            }\n          } else {\n            removeListener();\n            unsetGetReferenceClientRect();\n          }\n        }\n      },\n      onMount(): void {\n        if (instance.props.followCursor && !wasFocusEvent) {\n          if (isUnmounted) {\n            onMouseMove(mouseCoords as MouseEvent);\n            isUnmounted = false;\n          }\n\n          if (!getIsInitialBehavior()) {\n            addListener();\n          }\n        }\n      },\n      onTrigger(_, event): void {\n        if (isMouseEvent(event)) {\n          mouseCoords = {clientX: event.clientX, clientY: event.clientY};\n        }\n        wasFocusEvent = event.type === 'focus';\n      },\n      onHidden(): void {\n        if (instance.props.followCursor) {\n          unsetGetReferenceClientRect();\n          removeListener();\n          isUnmounted = true;\n        }\n      },\n    };\n  },\n};\n\nexport default followCursor;\n", "import {Modifier, Placement} from '@popperjs/core';\nimport {isMouseEvent} from '../dom-utils';\nimport {BasePlacement, InlinePositioning, Props} from '../types';\nimport {arrayFrom, getBasePlacement} from '../utils';\n\nfunction getProps(props: Props, modifier: Modifier<any, any>): Partial<Props> {\n  return {\n    popperOptions: {\n      ...props.popperOptions,\n      modifiers: [\n        ...(props.popperOptions?.modifiers || []).filter(\n          ({name}) => name !== modifier.name\n        ),\n        modifier,\n      ],\n    },\n  };\n}\n\nconst inlinePositioning: InlinePositioning = {\n  name: 'inlinePositioning',\n  defaultValue: false,\n  fn(instance) {\n    const {reference} = instance;\n\n    function isEnabled(): boolean {\n      return !!instance.props.inlinePositioning;\n    }\n\n    let placement: Placement;\n    let cursorRectIndex = -1;\n    let isInternalUpdate = false;\n    let triedPlacements: Array<string> = [];\n\n    const modifier: Modifier<\n      'tippyInlinePositioning',\n      Record<string, unknown>\n    > = {\n      name: 'tippyInlinePositioning',\n      enabled: true,\n      phase: 'afterWrite',\n      fn({state}) {\n        if (isEnabled()) {\n          if (triedPlacements.indexOf(state.placement) !== -1) {\n            triedPlacements = [];\n          }\n\n          if (\n            placement !== state.placement &&\n            triedPlacements.indexOf(state.placement) === -1\n          ) {\n            triedPlacements.push(state.placement);\n            instance.setProps({\n              // @ts-ignore - unneeded DOMRect properties\n              getReferenceClientRect: () =>\n                getReferenceClientRect(state.placement),\n            });\n          }\n\n          placement = state.placement;\n        }\n      },\n    };\n\n    function getReferenceClientRect(placement: Placement): Partial<DOMRect> {\n      return getInlineBoundingClientRect(\n        getBasePlacement(placement),\n        reference.getBoundingClientRect(),\n        arrayFrom(reference.getClientRects()),\n        cursorRectIndex\n      );\n    }\n\n    function setInternalProps(partialProps: Partial<Props>): void {\n      isInternalUpdate = true;\n      instance.setProps(partialProps);\n      isInternalUpdate = false;\n    }\n\n    function addModifier(): void {\n      if (!isInternalUpdate) {\n        setInternalProps(getProps(instance.props, modifier));\n      }\n    }\n\n    return {\n      onCreate: addModifier,\n      onAfterUpdate: addModifier,\n      onTrigger(_, event): void {\n        if (isMouseEvent(event)) {\n          const rects = arrayFrom(instance.reference.getClientRects());\n          const cursorRect = rects.find(\n            (rect) =>\n              rect.left - 2 <= event.clientX &&\n              rect.right + 2 >= event.clientX &&\n              rect.top - 2 <= event.clientY &&\n              rect.bottom + 2 >= event.clientY\n          );\n          const index = rects.indexOf(cursorRect);\n          cursorRectIndex = index > -1 ? index : cursorRectIndex;\n        }\n      },\n      onHidden(): void {\n        cursorRectIndex = -1;\n      },\n    };\n  },\n};\n\nexport default inlinePositioning;\n\nexport function getInlineBoundingClientRect(\n  currentBasePlacement: BasePlacement | null,\n  boundingRect: DOMRect,\n  clientRects: DOMRect[],\n  cursorRectIndex: number\n): {\n  top: number;\n  bottom: number;\n  left: number;\n  right: number;\n  width: number;\n  height: number;\n} {\n  // Not an inline element, or placement is not yet known\n  if (clientRects.length < 2 || currentBasePlacement === null) {\n    return boundingRect;\n  }\n\n  // There are two rects and they are disjoined\n  if (\n    clientRects.length === 2 &&\n    cursorRectIndex >= 0 &&\n    clientRects[0].left > clientRects[1].right\n  ) {\n    return clientRects[cursorRectIndex] || boundingRect;\n  }\n\n  switch (currentBasePlacement) {\n    case 'top':\n    case 'bottom': {\n      const firstRect = clientRects[0];\n      const lastRect = clientRects[clientRects.length - 1];\n      const isTop = currentBasePlacement === 'top';\n\n      const top = firstRect.top;\n      const bottom = lastRect.bottom;\n      const left = isTop ? firstRect.left : lastRect.left;\n      const right = isTop ? firstRect.right : lastRect.right;\n      const width = right - left;\n      const height = bottom - top;\n\n      return {top, bottom, left, right, width, height};\n    }\n    case 'left':\n    case 'right': {\n      const minLeft = Math.min(...clientRects.map((rects) => rects.left));\n      const maxRight = Math.max(...clientRects.map((rects) => rects.right));\n      const measureRects = clientRects.filter((rect) =>\n        currentBasePlacement === 'left'\n          ? rect.left === minLeft\n          : rect.right === maxRight\n      );\n\n      const top = measureRects[0].top;\n      const bottom = measureRects[measureRects.length - 1].bottom;\n      const left = minLeft;\n      const right = maxRight;\n      const width = right - left;\n      const height = bottom - top;\n\n      return {top, bottom, left, right, width, height};\n    }\n    default: {\n      return boundingRect;\n    }\n  }\n}\n", "import {VirtualElement} from '@popperjs/core';\nimport {ReferenceElement, Sticky} from '../types';\n\nconst sticky: Sticky = {\n  name: 'sticky',\n  defaultValue: false,\n  fn(instance) {\n    const {reference, popper} = instance;\n\n    function getReference(): ReferenceElement | VirtualElement {\n      return instance.popperInstance\n        ? instance.popperInstance.state.elements.reference\n        : reference;\n    }\n\n    function shouldCheck(value: 'reference' | 'popper'): boolean {\n      return instance.props.sticky === true || instance.props.sticky === value;\n    }\n\n    let prevRefRect: ClientRect | null = null;\n    let prevPopRect: ClientRect | null = null;\n\n    function updatePosition(): void {\n      const currentRefRect = shouldCheck('reference')\n        ? getReference().getBoundingClientRect()\n        : null;\n      const currentPopRect = shouldCheck('popper')\n        ? popper.getBoundingClientRect()\n        : null;\n\n      if (\n        (currentRefRect && areRectsDifferent(prevRefRect, currentRefRect)) ||\n        (currentPopRect && areRectsDifferent(prevPopRect, currentPopRect))\n      ) {\n        if (instance.popperInstance) {\n          instance.popperInstance.update();\n        }\n      }\n\n      prevRefRect = currentRefRect;\n      prevPopRect = currentPopRect;\n\n      if (instance.state.isMounted) {\n        requestAnimationFrame(updatePosition);\n      }\n    }\n\n    return {\n      onMount(): void {\n        if (instance.props.sticky) {\n          updatePosition();\n        }\n      },\n    };\n  },\n};\n\nexport default sticky;\n\nfunction areRectsDifferent(\n  rectA: ClientRect | null,\n  rectB: ClientRect | null\n): boolean {\n  if (rectA && rectB) {\n    return (\n      rectA.top !== rectB.top ||\n      rectA.right !== rectB.right ||\n      rectA.bottom !== rectB.bottom ||\n      rectA.left !== rectB.left\n    );\n  }\n\n  return true;\n}\n", "import tippy from '../src';\nimport {render} from '../src/template';\n\ntippy.setDefaultProps({render});\n\nexport {default, hideAll} from '../src';\nexport {default as createSingleton} from '../src/addons/createSingleton';\nexport {default as delegate} from '../src/addons/delegate';\nexport {default as animateFill} from '../src/plugins/animateFill';\nexport {default as followCursor} from '../src/plugins/followCursor';\nexport {default as inlinePositioning} from '../src/plugins/inlinePositioning';\nexport {default as sticky} from '../src/plugins/sticky';\nexport {ROUND_ARROW as roundArrow} from '../src/constants';\n", "import tippy from \"tippy.js\";\nimport { Controller } from \"@hotwired/stimulus\";\n\nexport default class Tooltip extends Controller {\n  static values = {\n    content: String,\n    hideOnClick: { type: Boolean, default: false },\n    showMessageIfDisabled: { type: Boolean, default: false },\n    disabledMessage: { type: String, default: \"disabled\" },\n  };\n\n  connect() {\n    if (this.contentValue === \"\") return;\n\n    this.tippy = tippy(this.element, {\n      content: this.content,\n      theme: \"ir\",\n      zIndex: 101001 /* one more than the IR dialog container */,\n      animation: \"shift-away-subtle\",\n      allowHTML: true,\n      hideOnClick: this.hideOnClickValue,\n      onShow: this.onShow,\n    });\n  }\n\n  get content() {\n    let result = `<div class=\"text-center\">${this.contentValue}</div>`;\n    const showDisabledMessage = this.showMessageIfDisabledValue;\n    const elementIsDisabled = this.element.disabled || this.element.className.match(/--disabled/);\n\n    if (showDisabledMessage && elementIsDisabled) {\n      result += `<div class='ir-tooltip__disabled-msg'>(${this.disabledMessageValue})</div>`;\n    }\n    return result;\n  }\n\n  onShow = (tippy) => {\n    tippy.setContent(this.content);\n  };\n\n  disconnect() {\n    if (!this.tippy) return;\n\n    this.tippy.disable();\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\n\nexport default class extends Controller {\n  static values = {\n    allowAttachments: Boolean,\n    allowLinks: Boolean,\n  };\n\n  editorConnectionsCount = 0;\n\n  connect() {\n    this.connectEditor();\n  }\n\n  connectEditor() {\n    if (this.editorConnectionsCount > 30) return;\n\n    setTimeout(() => {\n      this.editorConnectionsCount += 1;\n\n      const trixToolbarId = this.element.getAttribute(\"toolbar\");\n      const trixToolbar = document.querySelector(`#${trixToolbarId}`);\n\n      if (!trixToolbar) {\n        this.connectEditor();\n        return;\n      }\n\n      if (!this.allowAttachmentsValue) {\n        trixToolbar.querySelector(\".trix-button-group--file-tools\").hidden = true;\n        this.element.addEventListener(\"trix-file-accept\", (e) => e.preventDefault());\n      }\n\n      if (!this.allowLinksValue) {\n        trixToolbar.querySelector(\".trix-button--icon-link\").hidden = true;\n      }\n    }, 100);\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport { pointOverlapsElement } from \"../helpers/app\";\n\nexport default class extends Controller {\n  static targets = [\"button\", \"menu\"];\n\n  connect() {\n    this.element.buttonMenuController = this;\n    document.body.addEventListener(\"click\", this.bodyClickClose.bind(this));\n  }\n\n  disconnect() {\n    document.body.removeEventListener(\"click\", this.bodyClickClose.bind(this));\n  }\n\n  open(event) {\n    event.preventDefault();\n    event.stopPropagation();\n\n    this.hideOtherMenusOnPage();\n\n    if (!this.menuTarget.classList.contains(\"ir-btn-menu--visible\")) {\n      this.menuTarget.classList.add(\"ir-btn-menu--visible\");\n    } else {\n      this.close(event);\n    }\n  }\n\n  bodyClickClose(event) {\n    if (!this.menuTarget.classList.contains(\"ir-btn-menu--visible\")) return;\n\n    const overlapping = pointOverlapsElement({ x: event.clientX, y: event.clientY, element: this.menuTarget });\n    if (overlapping) return;\n\n    this.close(event);\n  }\n\n  close(_event) {\n    this.menuTarget.classList.remove(\"ir-btn-menu--visible\");\n  }\n\n  hideOtherMenusOnPage() {\n    const menuContainers = document.querySelectorAll(\"[data-controller='components--ir-btn-menu']\");\n    menuContainers.forEach((menuContainer) => {\n      const otherMenuController = menuContainer.buttonMenuController;\n      if (otherMenuController !== this) otherMenuController.close();\n    });\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\n\nexport default class extends Controller {\n  static targets = [\"menu\", \"addBtn\"];\n\n  add = (_) => {\n    this.addBtnTarget.classList.add(\"ir-btn--spinner-shown\");\n    this.menuTarget.style.display = \"none\";\n    setTimeout(() => {\n      this.menuTarget.style.display = \"block\";\n    }, 1000);\n  };\n}\n", "import { Controller } from \"@hotwired/stimulus\";\n\n// When navigating to a project edit/configure page with an anchor ref in the URL,\n// the location you end up on the page can be under the floating header.  This\n// allows you to adjust the location by roughly 100 pixels so the anchor appears to\n// take you to the correct place.\nexport default class extends Controller {\n  connect() {\n    if (!this.isLinkingToAnchor) return;\n\n    setTimeout(() => {\n      window.scrollBy(0, -100);\n    }, 100);\n  }\n\n  get isLinkingToAnchor() {\n    return window.location.href.includes(this.anchor);\n  }\n\n  get anchor() {\n    return this.element.id;\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\n\nimport * as animate from \"../../helpers/animate\";\n\nexport default class extends Controller {\n  static targets = [\"cantileverAttachmentsNumberField\", \"suppressWarningRadioBtn\", \"fixWithAttachmentsRadioBtn\"];\n\n  toggleAttachments() {\n    const showAttachments = this.fixWithAttachmentsRadioBtnTarget.checked;\n    animate.toggle(this.cantileverAttachmentsNumberFieldTarget, showAttachments);\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport { sentryException } from \"../../config/sentry\";\nimport * as animate from \"../../helpers/animate\";\nimport { defaultHeaders } from \"../../helpers/api\";\nimport { runScriptResponse } from \"../../helpers/run-script\";\n\nexport default class extends Controller {\n  static values = {\n    clientSecret: String,\n    returnUrl: String,\n    stripePublishableKey: String,\n    projectId: String,\n    discountAllowed: Boolean,\n    updateReceiptEmailUrl: String,\n  };\n\n  static targets = [\n    \"paymentElement\",\n    \"errorContainer\",\n    \"errorStatus\",\n    \"haveCouponLinkContainer\",\n    \"couponCodeEntryBox\",\n    \"couponCodeTextField\",\n    \"newCardLink\",\n    \"existingCardRadioBtn\",\n    \"submitBtn\",\n    \"paymentFormTitle\",\n    \"receiptEmailTextField\",\n  ];\n\n  // Stripe custom elements styling:\n  // https://stripe.com/docs/js/appendix/style\n  appearance = {\n    theme: \"none\",\n    variables: {\n      fontFamily: \"Open Sans\",\n      fontSizeBase: \"10px\",\n      spacingGridColumn: \"20px\",\n      spacingGridRow: \"15px\",\n    },\n    rules: {\n      \".Input\": {\n        fontSize: \"1.6rem\",\n        border: \"1px solid #ddd\",\n        padding: \"0 0.75rem\",\n        lineHeight: \"3.5rem\",\n        borderRadius: \"2px\",\n        color: \"#444\",\n      },\n      \".Input::placeholder\": {\n        color: \"#bbb\",\n      },\n      \".Input:focus\": {\n        boxShadow: \"0 0 0 0.2rem #b9d8f9\",\n        outline: 0,\n      },\n      \".Input--invalid\": {\n        color: \"#d56262\",\n        backgroundColor: \"#fde7e7\",\n        border: \"1px solid #f3c9c9\",\n      },\n      \".Input--invalid::placeholder\": {\n        color: \"#E7A4A4\",\n      },\n      \".Label\": {\n        color: \"#888\",\n        fontSize: \"1.3rem\",\n        marginBottom: \"0.5rem\",\n        paddingLeft: \"0.2rem\",\n      },\n      \".Label--invalid\": {\n        color: \"#d56262\",\n      },\n      \".Error\": {\n        color: \"#d56262\",\n        padding: \"2px 0 0 2px\",\n        fontSize: \"1.2rem\",\n      },\n      \".Text--terms\": {\n        fontSize: \"10px\",\n      },\n    },\n  };\n\n  // CSS-source form only: the URL pins weight 400 and `appearance.variables.fontFamily`\n  // applies the family. Adding `family`/`weight` here makes Stripe warn (they belong to the\n  // mutually exclusive custom-font-source form that uses `src`, not `cssSrc`).\n  fonts = [{ cssSrc: \"https://fonts.googleapis.com/css?family=Open+Sans:400\" }];\n\n  connect() {\n    // `Stripe` comes from https://js.stripe.com/v3/. This should be included as a script tag\n    // wherever this controller is used.\n    if (this.hasPaymentElementTarget) {\n      this.stripe = Stripe(this.stripePublishableKeyValue);\n\n      this.elements = this.stripe.elements({\n        appearance: this.appearance,\n        fonts: this.fonts,\n        clientSecret: this.clientSecretValue,\n      });\n      const paymentElement = this.elements.create(\"payment\");\n      paymentElement.mount(this.paymentElementTarget);\n    }\n  }\n\n  async submitPayment(e) {\n    e.preventDefault();\n    const submitBtn = e.currentTarget;\n\n    if (submitBtn.classList.contains(\"ir-btn--spinner-shown\")) return;\n\n    submitBtn.classList.add(\"ir-btn--spinner-shown\");\n\n    const discountApplied = this.discountAllowedValue === false || (await this.applyDiscount());\n    const receiptEmailUpdated = await this.updateReceiptEmail();\n    if (discountApplied && receiptEmailUpdated) {\n      if (this.existingCardId) {\n        this.confirmPaymentWithExistingCard();\n      } else {\n        this.confirmPayment();\n      }\n    } else {\n      submitBtn.classList.remove(\"ir-btn--spinner-shown\");\n    }\n  }\n\n  get existingCardId() {\n    const existingCardRadioBtnTarget = this.existingCardRadioBtnTargets.find((radioBtn) => radioBtn.checked);\n    return existingCardRadioBtnTarget && existingCardRadioBtnTarget.value;\n  }\n\n  async confirmPaymentWithExistingCard() {\n    const result = await this.stripe.confirmCardPayment(this.clientSecretValue, {\n      payment_method: this.existingCardId,\n      return_url: this.returnUrlValue,\n    });\n\n    if (result.error) {\n      this.submitBtnTarget.classList.remove(\"ir-btn--spinner-shown\");\n      this.errorContainerTarget.classList.remove(\"d-none\");\n      this.errorStatusTarget.textContent = result.error.message;\n      if (result.error.type !== \"card_error\" && result.error.type !== \"validation_error\") {\n        sentryException(\n          `[Handled Error] Error confirming payment with existing card. Error: ${JSON.stringify(\n            result.error,\n          )}. Used card ID: ${this.existingCardId}`,\n        );\n      }\n    } else {\n      window.location = this.returnUrlValue;\n    }\n  }\n\n  async confirmPayment() {\n    const { error } = await this.stripe.confirmPayment({\n      elements: this.elements,\n      confirmParams: {\n        return_url: this.returnUrlValue,\n      },\n    });\n\n    // This point will only be reached if there is an immediate error when\n    // confirming the payment. Otherwise, your customer will be redirected to\n    // your `return_url`. For some payment methods like iDEAL, your customer will\n    // be redirected to an intermediate site first to authorize the payment, then\n    // redirected to the `return_url`.\n\n    setTimeout(() => {\n      if (error) {\n        this.submitBtnTarget.classList.remove(\"ir-btn--spinner-shown\");\n        this.errorContainerTarget.classList.remove(\"d-none\");\n        this.errorStatusTarget.textContent = error.message;\n        if (error.type !== \"card_error\" && error.type !== \"validation_error\") {\n          sentryException(`[Handled Error] Error confirming payment. Error: ${JSON.stringify(error)}`);\n        }\n      }\n    }, 300);\n  }\n\n  selectExistingCard(_event) {\n    this.paymentElementTarget.classList.add(\"d-none\");\n    this.paymentFormTitleTarget.classList.add(\"d-none\");\n    this.newCardLinkTarget.classList.remove(\"d-none\");\n  }\n\n  clickNewCardLink(_event) {\n    this.paymentElementTarget.classList.remove(\"d-none\");\n    this.paymentFormTitleTarget.classList.remove(\"d-none\");\n    this.newCardLinkTarget.classList.add(\"d-none\");\n    this.existingCardRadioBtnTargets.forEach((radioBtn) => {\n      radioBtn.checked = false;\n    });\n  }\n\n  async processZeroDollarTransaction(e) {\n    e.preventDefault();\n    const submitBtn = e.currentTarget;\n\n    if (submitBtn.classList.contains(\"ir-btn--spinner-shown\")) return;\n\n    submitBtn.classList.add(\"ir-btn--spinner-shown\");\n\n    if (await this.applyDiscount()) {\n      window.location = this.returnUrlValue;\n    }\n  }\n\n  async applyDiscount() {\n    const applyDiscountUrl = `/permit_packs/${this.projectIdValue}/payment/apply_discount`;\n    const applyDiscountResponse = await fetch(applyDiscountUrl, {\n      // Success is 204; a failure renders .js.erb, so negotiate js explicitly.\n      headers: { ...defaultHeaders(), Accept: \"text/javascript\" },\n      method: \"PUT\",\n      body: JSON.stringify({\n        payment: { client_secret: this.clientSecretValue },\n      }),\n    });\n    if (applyDiscountResponse.status === 204) {\n      return true;\n    } else {\n      // render coupon validation error (from app/views/payments/apply_discount.js.erb)\n      await runScriptResponse(applyDiscountResponse);\n      return false;\n    }\n  }\n\n  async updateReceiptEmail() {\n    const updateReceiptEmailResponse = await fetch(this.updateReceiptEmailUrlValue, {\n      // Success is 204; a failure renders .js.erb, so negotiate js explicitly.\n      headers: { ...defaultHeaders(), Accept: \"text/javascript\" },\n      method: \"PUT\",\n      body: JSON.stringify({\n        payment: { receipt_email: this.receiptEmailTextFieldTarget.value, client_secret: this.clientSecretValue },\n      }),\n    });\n    if (updateReceiptEmailResponse.status === 204) {\n      return true;\n    } else {\n      await runScriptResponse(updateReceiptEmailResponse);\n      return false;\n    }\n  }\n\n  haveCouponLinkClick(event) {\n    event.preventDefault();\n    animate.hide(this.haveCouponLinkContainerTarget);\n    animate.show(this.couponCodeEntryBoxTarget);\n    this.couponCodeTextFieldTarget.focus();\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\n\nexport default class extends Controller {\n  static targets = [\"contractorLicenseNumberFieldContainer\", \"contractorLicenseNumberField\"];\n\n  toggleContractorLicenseNumber(e) {\n    if (e.target.value === \"true\") {\n      this.contractorLicenseNumberFieldContainerTarget.classList.remove(\"d-none\");\n    } else {\n      this.contractorLicenseNumberFieldContainerTarget.classList.add(\"d-none\");\n      this.contractorLicenseNumberFieldTarget.value = \"\";\n    }\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport { hideDialog } from \"../../components/ir_dialog/helper\";\nimport * as animate from \"../../../helpers/animate\";\n\nexport default class extends Controller {\n  static targets = [\"lengthCheckbox\", \"customLengthField\", \"validationErrorContainer\"];\n  static outlets = [\"da--custom-rail-lengths--display\"];\n  static values = { allowedValues: Array };\n\n  updateCheckboxForLength(length, checked) {\n    const checkbox = this.checkBoxForLength(length);\n    checkbox.checked = checked;\n  }\n\n  checkBoxForLength(length) {\n    return this.lengthCheckboxTargets.find((checkbox) => checkbox.dataset.length === length);\n  }\n\n  updateSelections(_event) {\n    this.lengthCheckboxTargets.forEach((checkbox) => {\n      const length = checkbox.dataset.length;\n      this.daCustomRailLengthsDisplayOutlet.updateCheckboxForLength(length, checkbox.checked);\n    });\n  }\n\n  fieldInput(event) {\n    const field = event.currentTarget;\n    let value = field.value.replace(/[^0-9]/g, \"\");\n    field.value = value;\n  }\n\n  fieldEnterKeyup(event) {\n    if (event.key === \"Enter\") {\n      this.addCustomLength(event);\n    }\n  }\n\n  addCustomLength(_event) {\n    const length = Number.parseInt(this.customLengthFieldTarget.value);\n    if (this.allowedValuesValue.includes(length)) {\n      this.daCustomRailLengthsDisplayOutlet.updateCheckboxForLength(length, true);\n      this.customLengthFieldTarget.value = \"\";\n      animate.hide(this.validationErrorContainerTarget);\n      hideDialog(this.element.parentElement);\n    } else {\n      animate.show(this.validationErrorContainerTarget);\n    }\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport { showDialog } from \"../../components/ir_dialog/helper\";\nimport * as animate from \"../../../helpers/animate\";\n\nexport default class extends Controller {\n  static targets = [\"lengthCheckbox\", \"dialogLengthCheckbox\"];\n  static outlets = [\"da--custom-rail-lengths--dialog\"];\n  static values = { railPlatform: String };\n\n  openDialog(event) {\n    const clickPosition = { x: event.pageX, y: event.pageY };\n    showDialog(`custom-rail-lengths-${this.railPlatformValue}`, () => {}, {\n      showNearClickPosition: true,\n      clickPosition,\n    });\n    this.daCustomRailLengthsDialogOutlet.customLengthFieldTarget.focus();\n  }\n\n  updateCheckboxForLength(length, checked) {\n    const checkBox = this.checkBoxForLength(length);\n    checkBox.checked = checked;\n\n    const changeEvent = new CustomEvent(\"change\", { bubbles: true });\n    checkBox.dispatchEvent(changeEvent);\n\n    const checkBoxContainer = checkBox.closest(\"[data-identifier='checkBoxContainer']\");\n    animate.toggle(checkBoxContainer, checked);\n  }\n\n  checkBoxForLength(length) {\n    return this.lengthCheckboxTargets.find((checkbox) => checkbox.dataset.length === length + \"\");\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\n\nimport { defaultHeaders } from \"../../helpers/api\";\nimport { alertDialog, hideDialog } from \"../components/ir_dialog/helper\";\n\nexport default class extends Controller {\n  static values = {\n    path: String,\n    dialogId: String,\n    userSignedIn: Boolean,\n    timeEstimateMilliseconds: { type: Number, default: 0 },\n  };\n\n  #inFlight = false;\n  #retryBlockedUntil = 0;\n\n  download() {\n    if (!this.userSignedInValue) return;\n    if (this.#inFlight || Date.now() < this.#retryBlockedUntil) return;\n    this.#inFlight = true;\n\n    if (this.timeEstimateMillisecondsValue > 10_000) {\n      const rangeFrom = this.rounded(Number.parseInt(this.timeEstimateMillisecondsValue / 1000));\n      const rangeTo = this.rounded(\n        Number.parseInt((this.timeEstimateMillisecondsValue + this.timeEstimateMillisecondsValue * 0.3) / 1000),\n      );\n      const message = `We estimate this download could take ${rangeFrom} to ${rangeTo} seconds`;\n\n      this.dialog.querySelector(\"[data-identifier='timeEstimateWarning']\").innerHTML = message;\n      this.dialog.querySelector(\"[data-identifier='timeEstimateWarningContainer']\").classList.remove(\"d-none\");\n    }\n\n    setTimeout(() => {\n      fetch(this.pathValue, {\n        headers: { ...defaultHeaders(), Accept: \"text/javascript,*/*\" },\n      })\n        .then((response) => this.#downloadFile(response))\n        .finally(() => {\n          this.#inFlight = false;\n        });\n    }, 200);\n  }\n\n  rounded(value) {\n    return Number.parseInt(5 * Math.round(value / 5.0));\n  }\n\n  get dialog() {\n    return document.querySelector(`[data-dialog-identifier=\"${this.dialogIdValue}\"]`);\n  }\n\n  #downloadFile(response) {\n    if (!response.ok) {\n      if (response.status === 302) {\n        response.json().then((json) => {\n          window.location = json.redirect_path;\n        });\n        return;\n      }\n      if (response.status === 429) {\n        const retryAfter = response.headers.get(\"Retry-After\");\n        this.#blockImmediateRetry(retryAfter);\n        const wait = retryAfter ? ` Please try again in about ${retryAfter} seconds.` : \" Please try again shortly.\";\n        alertDialog(`<p>You've requested this report too many times in a short period.${wait}</p>`, () => {}, {\n          title: \"Too Many Requests\",\n          headerColor: \"red\",\n          confirmBtnColor: \"red\",\n        });\n        return;\n      }\n      this.#blockImmediateRetry();\n      const title = `Server Error (${response.status})`;\n      const message =\n        \"<p>We encountered a server error while trying to process your request. An admin has been notified of the problem.  We apologize for the inconvenience.</p>\";\n\n      alertDialog(message, () => {}, {\n        title,\n        headerColor: \"red\",\n        confirmBtnColor: \"red\",\n      });\n      return;\n    }\n\n    const contentDisposition = response.headers.get(\"Content-Disposition\");\n    const filename = contentDisposition.match(/filename=\"(.*)\";/)[1];\n    response.blob().then((blob) => {\n      const url = window.URL.createObjectURL(blob);\n      const a = document.createElement(\"a\");\n      a.style.display = \"none\";\n      a.href = url;\n      a.download = filename;\n      document.body.appendChild(a);\n      a.click();\n      window.URL.revokeObjectURL(url);\n      document.body.removeChild(a);\n\n      hideDialog(this.dialog);\n    });\n  }\n\n  #blockImmediateRetry(retryAfter) {\n    const retryAfterSeconds = Number.parseInt(retryAfter, 10);\n    const retryDelayMilliseconds =\n      Number.isFinite(retryAfterSeconds) && retryAfterSeconds > 0 ? retryAfterSeconds * 1000 : 10_000;\n\n    this.#retryBlockedUntil = Date.now() + retryDelayMilliseconds;\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\n\nexport default class EndClampController extends Controller {\n  changeEndClamp(event) {\n    const panelPickerElement = document.querySelector(\"[data-controller='da--panel-picker']\");\n    if (!panelPickerElement) return;\n\n    const panelPickerController = panelPickerElement.controller;\n\n    panelPickerController.updateEndClamp(event.target.value);\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\n\nexport default class extends Controller {\n  static targets = [\"changeWhenFixed\"];\n\n  fixedCssClass = \"project-header--fixed\";\n\n  connect() {\n    window.addEventListener(\"scroll\", this.scrollToggle);\n    this.headerHeight = this.element.offsetHeight;\n    this.#toggleFixedHeaderNav();\n  }\n\n  disconnect() {\n    window.removeEventListener(\"scroll\", this.scrollToggle);\n  }\n\n  scrollToggle = (_event) => {\n    this.#toggleFixedHeaderNav();\n  };\n\n  #toggleFixedHeaderNav() {\n    if (this.#isScrolledPastMainNavBar) {\n      this.#addFixedHeaderNavClass();\n    } else {\n      this.#removeFixedHeaderNavClass();\n    }\n  }\n\n  #addFixedHeaderNavClass() {\n    this.element.classList.add(this.fixedCssClass);\n    this.#bodyContainer.style.paddingTop = `${this.headerHeight}px`;\n    this.#changeWhenFixed(\"add\");\n  }\n\n  #removeFixedHeaderNavClass() {\n    this.element.classList.remove(this.fixedCssClass);\n    this.#changeWhenFixed(\"remove\");\n    this.#bodyContainer.style.paddingTop = 0;\n  }\n\n  get #isScrolledPastMainNavBar() {\n    return window.scrollY > this.#mainNavBar.offsetHeight;\n  }\n\n  get #mainNavBar() {\n    return document.querySelector(\"[data-identifier='main-navbar']\");\n  }\n\n  get #bodyContainer() {\n    return document.querySelector(\".ir-body-container\");\n  }\n\n  #changeWhenFixed(addRemove) {\n    this.changeWhenFixedTargets.forEach((element) => {\n      element.classList[addRemove](element.dataset.fixedCssClass);\n    });\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport React from \"react\";\nimport { createRoot } from \"react-dom/client\";\nimport axios from \"axios\";\nimport zip from \"lodash/zip\";\nimport chunk from \"lodash/chunk\";\n\nimport GraphicalLayoutTool from \"../../components/GraphicalLayoutTool\";\nimport SentryErrorHandler from \"../../components/SentryErrorHandler\";\nimport * as api from \"../../helpers/api\";\nimport { defaultEditorMode } from \"../../helpers/graphical-tool-helpers\";\n\nexport default class extends Controller {\n  connect() {\n    this.cleanupExistingDimensionCrosshairs();\n\n    const data = this.element.dataset;\n    this.cellHeight = Number.parseFloat(data.cellHeight);\n    this.cellWidth = Number.parseFloat(data.cellWidth);\n    this.columns = Number.parseInt(data.columns);\n    this.extensionTop = this.floatOrZero(data.extensionTop);\n    this.extensionRight = this.floatOrZero(data.extensionRight);\n    this.extensionBottom = this.floatOrZero(data.extensionBottom);\n    this.extensionLeft = this.floatOrZero(data.extensionLeft);\n    this.gridString = data.gridString;\n    this.interColumnSpacing = Number.parseFloat(data.interColumnSpacing);\n    this.interRowSpacing = Number.parseFloat(data.interRowSpacing);\n    this.maxEditorHeight = Number.parseInt(data.maxEditorHeight);\n    this.offerCropOnSave = data.offerCropOnSave !== undefined;\n    this.projectType = data.projectType;\n    this.roofSectionId = data.roofSectionId || data.identifier;\n    this.rows = Number.parseInt(data.rows);\n    this.setback = this.floatOrZero(data.setback);\n    this.spaceAroundCellsTop = this.floatOrZero(data.spaceAroundCellsTop);\n    this.spaceAroundCellsRight = this.floatOrZero(data.spaceAroundCellsRight);\n    this.spaceAroundCellsBottom = this.floatOrZero(data.spaceAroundCellsBottom);\n    this.spaceAroundCellsLeft = this.floatOrZero(data.spaceAroundCellsLeft);\n    this.updatePath = data.updatePath;\n    this.isRailOrientationNs = data.isRailOrientationNs === \"true\";\n    this.showRails = data.showRails !== undefined;\n    this.railPlatform = data.railPlatform;\n    this.thirdRailUsed = data.thirdRailUsed === \"true\";\n    this.clampHardwareDimensions = data.clampHardwareDimensions === \"true\";\n    this.maxHardwareHeight = this.floatOrZero(data.maxHardwareHeight);\n    this.maxHardwareWidth = this.floatOrZero(data.maxHardwareWidth);\n    this.expandable = data.expandable === \"true\";\n    this.contourGridString = data.contourGridString;\n    this.hiddenEndClamp = data.hiddenEndClamp !== undefined;\n    this.contourEastWestAvailable = data.contourEastWestAvailable !== undefined;\n    this.arrayEditingAllowed = data.arrayEditingAllowed !== undefined;\n    this.contourEditingAllowed = data.contourEditingAllowed !== undefined;\n    this.zoneGridString = data.zoneGridString;\n    this.zonePaintingAllowed = data.zonePaintingAllowed !== undefined;\n    this.modulePositionGridString = data.modulePositionGridString;\n    this.modulePositionPaintingAllowed = data.modulePositionPaintingAllowed !== undefined;\n    this.critterGuardDisplayAllowed = data.critterGuardDisplayAllowed !== undefined;\n    this.useCritterGuard = data.useCritterGuard !== undefined;\n    this.editableGrid = data.editableGrid !== undefined;\n    this.editorMode = defaultEditorMode({\n      roofSectionId: this.roofSectionId,\n      contourEditingAllowed: this.contourEditingAllowed,\n      arrayEditingAllowed: this.arrayEditingAllowed,\n    });\n    this.railLengthFtIn = data.railLengthFtIn;\n    this.minRows = data.minRows;\n    this.maxRows = data.maxRows;\n    this.minColumns = data.minColumns;\n    this.maxColumns = data.maxColumns;\n    this.isOpenSolar = data.isOpenSolar !== undefined;\n\n    this.element.controller = this;\n\n    this.instantiateGraphicalEditor();\n  }\n\n  changeModeToLayout() {\n    const changeEvent = new CustomEvent(\"changeModeToLayout\", { bubbles: true });\n    this.element.dispatchEvent(changeEvent);\n  }\n\n  changeModeToContour() {\n    const changeEvent = new CustomEvent(\"changeModeToContour\", { bubbles: true });\n    this.element.dispatchEvent(changeEvent);\n  }\n\n  cleanupExistingDimensionCrosshairs() {\n    const dimensionCrosshairsElem = document.querySelector(\"#graphical-tool__dimension-crosshairs__container\");\n    if (dimensionCrosshairsElem) dimensionCrosshairsElem.remove();\n  }\n\n  floatOrZero(value) {\n    return value === undefined ? 0 : Number.parseFloat(value);\n  }\n\n  convertToRailOrientationEw = (rows, columns, gridString) => ({\n    rows: columns,\n    columns: rows,\n    convertedGridString: zip(...chunk(gridString.split(\"\"), columns).reverse())\n      .flat()\n      .join(\"\"),\n  });\n\n  persist = ({ rows, columns, gridString, contourGridString, zoneGridString, modulePositionGridString, completed }) => {\n    const originalRows = rows;\n    const originalColumns = columns;\n\n    if (this.isRailOrientationNs && this.projectType !== \"GB4\") {\n      ({\n        rows,\n        columns,\n        convertedGridString: gridString,\n      } = this.convertToRailOrientationEw(originalRows, originalColumns, gridString));\n      ({ convertedGridString: contourGridString } = this.convertToRailOrientationEw(\n        originalRows,\n        originalColumns,\n        contourGridString,\n      ));\n      ({ convertedGridString: zoneGridString } = this.convertToRailOrientationEw(\n        originalRows,\n        originalColumns,\n        zoneGridString,\n      ));\n      ({ convertedGridString: modulePositionGridString } = this.convertToRailOrientationEw(\n        originalRows,\n        originalColumns,\n        modulePositionGridString,\n      ));\n    }\n\n    const data = {\n      da_layout: {\n        rows,\n        columns,\n        design: gridString,\n      },\n    };\n    if (this.projectType === \"PR4\" || this.projectType === \"AURORA\") {\n      data.da_layout.contour_design = contourGridString;\n    }\n    if (this.zonePaintingAllowed) {\n      data.da_layout.zone_design = zoneGridString;\n    }\n    if (this.modulePositionPaintingAllowed) {\n      data.da_layout.module_position_design = modulePositionGridString;\n    }\n\n    axios({\n      method: \"PATCH\",\n      url: this.updatePath,\n      headers: api.defaultHeaders(),\n      data,\n    })\n      .then((response) => {\n        this.persistenceResponsePageUpdates(response);\n        completed();\n      })\n      .catch(api.errorHandler);\n  };\n\n  persistenceResponsePageUpdates(response) {\n    if (response.data.updates === undefined) return;\n\n    response.data.updates.forEach((update) => {\n      const elem = document.querySelector(update.selector);\n      if (!elem) {\n        console.warn(`Element not found when trying to populate from JSON response: ${update.selector}`);\n      } else {\n        elem.innerHTML = update.html;\n      }\n    });\n  }\n\n  instantiateGraphicalEditor() {\n    this.graphicalTool = (\n      <GraphicalLayoutTool\n        cellHeight={this.cellHeight}\n        cellWidth={this.cellWidth}\n        columns={this.columns}\n        editableGrid={this.editableGrid}\n        extensionTop={this.extensionTop}\n        extensionRight={this.extensionRight}\n        extensionBottom={this.extensionBottom}\n        extensionLeft={this.extensionLeft}\n        gridString={this.gridString}\n        identifier={this.roofSectionId}\n        interColumnSpacing={this.interColumnSpacing}\n        interRowSpacing={this.interRowSpacing}\n        maxEditorHeight={this.maxEditorHeight}\n        offerCropOnSave={this.offerCropOnSave}\n        persistenceCallback={this.persist}\n        projectType={this.projectType}\n        rows={this.rows}\n        setback={this.setback}\n        spaceAroundCellsTop={this.spaceAroundCellsTop}\n        spaceAroundCellsRight={this.spaceAroundCellsRight}\n        spaceAroundCellsBottom={this.spaceAroundCellsBottom}\n        spaceAroundCellsLeft={this.spaceAroundCellsLeft}\n        isRailOrientationNs={this.isRailOrientationNs}\n        showRails={this.showRails}\n        railPlatform={this.railPlatform}\n        thirdRailUsed={this.thirdRailUsed}\n        clampHardwareDimensions={this.clampHardwareDimensions}\n        maxHardwareHeight={this.maxHardwareHeight}\n        maxHardwareWidth={this.maxHardwareWidth}\n        expandable={this.expandable}\n        editorMode={this.editorMode}\n        graphicalToolControllerElement={this.element}\n        contourGridString={this.contourGridString}\n        hiddenEndClamp={this.hiddenEndClamp}\n        contourEastWestAvailable={this.contourEastWestAvailable}\n        arrayEditingAllowed={this.arrayEditingAllowed}\n        contourEditingAllowed={this.contourEditingAllowed}\n        zoneGridString={this.zoneGridString}\n        zonePaintingAllowed={this.zonePaintingAllowed}\n        modulePositionGridString={this.modulePositionGridString}\n        modulePositionPaintingAllowed={this.modulePositionPaintingAllowed}\n        critterGuardDisplayAllowed={this.critterGuardDisplayAllowed}\n        useCritterGuard={this.useCritterGuard}\n        railLengthFtIn={this.railLengthFtIn}\n        minRows={this.minRows}\n        maxRows={this.maxRows}\n        minColumns={this.minColumns}\n        maxColumns={this.maxColumns}\n        isOpenSolar={this.isOpenSolar}\n      />\n    );\n\n    const root = createRoot(this.element);\n    root.render(<SentryErrorHandler>{this.graphicalTool}</SentryErrorHandler>);\n  }\n}\n", "import React, { useState, useEffect, useRef, useCallback } from \"react\";\nimport PropTypes from \"prop-types\";\n\nimport Title from \"./Title\";\nimport CompressedSpaceMarkers from \"./CompressedSpaceMarkers\";\nimport DragAndDrop from \"./DragAndDrop\";\nimport GridCells from \"./GridCells\";\nimport GridNumbers from \"./GridNumbers\";\nimport Toolbar from \"./Toolbar\";\nimport DimensionMarkers from \"./DimensionMarkers\";\nimport SetbackOutlines from \"./SetbackOutlines\";\nimport ExtensionsOutline from \"./ExtensionsOutline/ExtensionsOutline\";\nimport SelectionMarquee from \"./SelectionMarquee\";\nimport DimensionCrosshairs from \"./DimensionCrosshairs\";\nimport RoofOutline from \"./RoofOutline\";\n\nimport GridReal from \"./services/grid-real\";\nimport GridDisplay from \"./services/grid-display\";\nimport GridModifier from \"./services/grid-modifier\";\nimport GridDragSelection from \"./services/grid-drag-selection\";\nimport * as serializer from \"./helpers/grid-serializer\";\nimport { calculateSelectionMarqueeSizeAndPosition } from \"./helpers/marquee-size-and-position-calculator\";\nimport {\n  updateGridArraySelectionFromDragAndDrop,\n  updateGridCellValue,\n  cropGrid,\n  clearGrid,\n  shiftPanelsOnGrid,\n  gridIsCropable,\n  calculateCrop,\n  updateContourGridCellValue,\n  GRID_CELL_INACTIVE,\n  validContourModification,\n  clearIllegalContourInAdjacentCells,\n  invalidContourDesign,\n  cloneGridArray,\n} from \"./helpers/grid-helper\";\nimport { contourCodeToDirections, contourDirectionToggle, contourCodeGenerator } from \"../../helpers/contour\";\nimport { ZONE_CELL_DEFAULT, ZONE_DEFAULT, defaultZoneGridArray, zoneToChar } from \"./helpers/zone-helper\";\nimport {\n  MODULE_POSITION_CELL_DEFAULT,\n  MODULE_POSITION_DEFAULT,\n  defaultModulePositionGridArray,\n  modulePositionToChar,\n} from \"./helpers/module-position-helper\";\n\nimport * as store from \"../../helpers/local-store\";\nimport {\n  GRAPHICAL_TOOL_EDITOR_MODE_CONTOUR,\n  GRAPHICAL_TOOL_EDITOR_MODE_LAYOUT,\n} from \"../../helpers/graphical-tool-helpers\";\nimport { logger } from \"../../helpers/app\";\n\nfunction GraphicalLayoutTool({\n  cellHeight,\n  cellWidth,\n  columns: propsColumns,\n  extensionTop = 0,\n  extensionRight = 0,\n  extensionBottom = 0,\n  extensionLeft = 0,\n  gridString: propsGridString,\n  identifier,\n  interColumnSpacing,\n  interRowSpacing,\n  maxEditorHeight,\n  offerCropOnSave,\n  persistenceCallback,\n  projectType,\n  rows: propsRows,\n  setback = 0,\n  spaceAroundCellsTop = 0,\n  spaceAroundCellsRight = 0,\n  spaceAroundCellsBottom = 0,\n  spaceAroundCellsLeft = 0,\n  isRailOrientationNs = false,\n  showRails = false,\n  railPlatform,\n  thirdRailUsed = false,\n  clampHardwareDimensions = false,\n  maxHardwareHeight,\n  maxHardwareWidth,\n  expandable = false,\n  editorMode: propsEditorMode,\n  graphicalToolControllerElement,\n  contourGridString: propsContourGridString,\n  hiddenEndClamp,\n  contourEastWestAvailable,\n  editableGrid,\n  arrayEditingAllowed = false,\n  contourEditingAllowed = false,\n  zoneGridString: propsZoneGridString = \"\",\n  zonePaintingAllowed = false,\n  modulePositionGridString: propsModulePositionGridString = \"\",\n  modulePositionPaintingAllowed = false,\n  critterGuardDisplayAllowed,\n  useCritterGuard,\n  isOpenSolar,\n}) {\n  const containerRef = useRef(null);\n  const outlineRef = useRef(null);\n\n  const [askToSaveWithCropOrNot, setAskToSaveWithCropOrNot] = useState(false);\n  const [cellHovers, setCellHovers] = useState([[]]);\n  const [compressedSpace, setCompressedSpace] = useState({ top: 0, right: 0, bottom: 0, left: 0 });\n  const [compressedSpaceThresholds, setCompressedSpaceThresholds] = useState({\n    topY: 0,\n    rightX: 0,\n    bottomY: 0,\n    leftX: 0,\n  });\n  const [columns, setColumns] = useState(propsColumns);\n  const [compressedSpaceMarkers, setCompressedSpaceMarkers] = useState([]);\n  const [containerWidth, setContainerWidth] = useState(0);\n  const [dimensionMarkers, setDimensionMarkers] = useState([]);\n  const [displayCellHeight, setDisplayCellHeight] = useState(0);\n  const [displayCellWidth, setDisplayCellWidth] = useState(0);\n  const [displayCellPositions, setDisplayCellPositions] = useState([[]]);\n  const [displayHeight, setDisplayHeight] = useState(0);\n  const [extensionsOutline, setExtensionsOutline] = useState(undefined);\n  const [gridArray, setGridArray] = useState([[]]);\n  const [gridNumbers, setGridNumbers] = useState([]);\n  const [marqueeSelectionColumns, setMarqueeSelectionColumns] = useState(0);\n  const [marqueeSelectionRows, setMarqueeSelectionRows] = useState(0);\n  const [needsSaving, setNeedsSaving] = useState(false);\n  const [persistedGridString, setPersistedGridString] = useState(propsGridString);\n  const [persistedContourGridString, setPersistedContourGridString] = useState(propsContourGridString);\n  const [persistedZoneGridString, setPersistedZoneGridString] = useState(propsZoneGridString);\n  const [positionSnaps, setPositionSnaps] = useState({ xAxis: [], yAxis: [] });\n  const [realHeight, setRealHeight] = useState(0);\n  const [realWidth, setRealWidth] = useState(0);\n  const [roofOutline, setRoofOutline] = useState(null);\n  const [rows, setRows] = useState(propsRows);\n  const [saving, setSaving] = useState(false);\n  const [selectedToolbarItem, setSelectedToolbarItem] = useState(\"add\");\n  const [selectionMarquee, setSelectionMarquee] = useState({});\n  const [showSelectionMarquee, setShowSelectionMarquee] = useState(false);\n  const [showDimensionCrosshairs, setShowDimensionCrosshairs] = useState(false);\n  const [setbackOutlines, setSetbackOutlines] = useState(undefined);\n  const [snapDimensionCrosshairs, setSnapDimensionCrosshairs] = useState(true);\n\n  const expandKey = `${projectType}-graphical-tool-${identifier}-expand`;\n  const expandPreference = store.get(expandKey, false);\n  const [isExpanded, setIsExpanded] = useState(expandPreference);\n  const [editorMode, setEditorMode] = useState(propsEditorMode);\n  const firstLegalContourDirection = isRailOrientationNs && !hiddenEndClamp ? \"2\" : \"1\"; // 2 = west, 1 = south\n  const [contourPaintMode, setContourPaintMode] = useState(firstLegalContourDirection);\n  const [contourGridArray, setContourGridArray] = useState([[]]);\n  const [zoneGridArray, setZoneGridArray] = useState([[]]);\n  const [selectedZone, setSelectedZone] = useState(ZONE_DEFAULT);\n  const [persistedModulePositionGridString, setPersistedModulePositionGridString] =\n    useState(propsModulePositionGridString);\n  const [modulePositionGridArray, setModulePositionGridArray] = useState([[]]);\n  const [selectedModulePosition, setSelectedModulePosition] = useState(MODULE_POSITION_DEFAULT);\n\n  const persist = useCallback(\n    (rows, columns, gridArray, contourGridArray, zoneGridArray, modulePositionGridArray) => {\n      const dumper = projectType === \"GB4\" ? \"gbDump\" : \"dump\";\n      const gridString = serializer[dumper](gridArray);\n      const contourGridString = serializer[dumper](contourGridArray);\n      const zoneGridString = serializer[dumper](zoneGridArray);\n      const modulePositionGridString = serializer[dumper](modulePositionGridArray);\n      setSaving(true);\n\n      const saveCompleted = () => {\n        setNeedsSaving(false);\n        setSaving(false);\n        setPersistedGridString(serializer.dump(gridArray));\n        setPersistedContourGridString(serializer.dump(contourGridArray));\n        setPersistedZoneGridString(serializer.dump(zoneGridArray));\n        setPersistedModulePositionGridString(serializer.dump(modulePositionGridArray));\n      };\n\n      persistenceCallback({\n        rows,\n        columns,\n        gridString,\n        contourGridString,\n        zoneGridString,\n        modulePositionGridString,\n        completed: saveCompleted,\n      });\n    },\n    [persistenceCallback],\n  );\n\n  const recalculateGrid = useCallback(\n    (newGridArray, newContourGridArray, newZoneGridArray, newModulePositionGridArray, options = {}, fromMessage) => {\n      const containerWidth = containerRef.current.offsetWidth;\n      const rows = newGridArray.length;\n      const columns = newGridArray[0].length;\n\n      const realGrid = new GridReal({\n        cellWidth,\n        cellHeight,\n        columns,\n        extensionTop,\n        extensionRight,\n        extensionBottom,\n        extensionLeft,\n        rows,\n        rowSpacing: interRowSpacing,\n        columnSpacing: interColumnSpacing,\n        setback,\n        spaceAroundCellsTop,\n        spaceAroundCellsRight,\n        spaceAroundCellsBottom,\n        spaceAroundCellsLeft,\n      });\n\n      const displayGrid = new GridDisplay({\n        realGrid,\n        maxWidth: containerWidth,\n        maxHeight: isExpanded ? maxEditorHeight * 2 : maxEditorHeight,\n      });\n\n      setCompressedSpace({\n        top: realGrid.spaceAroundCellsTopCompressedSpace,\n        right: realGrid.spaceAroundCellsRightCompressedSpace,\n        bottom: realGrid.spaceAroundCellsBottomCompressedSpace,\n        left: realGrid.spaceAroundCellsLeftCompressedSpace,\n      });\n      setCompressedSpaceThresholds(displayGrid.compressedSpaceThresholds);\n      setColumns(columns);\n      setCompressedSpaceMarkers(displayGrid.compressedSpaceMarkers);\n      setContainerWidth(containerWidth);\n      setDimensionMarkers(displayGrid.dimensionMarkers);\n      setDisplayCellHeight(displayGrid.cellHeight);\n      setDisplayCellPositions(displayGrid.cellPositions);\n      setDisplayCellWidth(displayGrid.cellWidth);\n      setDisplayHeight(displayGrid.height);\n      setExtensionsOutline(displayGrid.extensionsOutline);\n      setContourGridArray(newContourGridArray);\n      setZoneGridArray(newZoneGridArray);\n      setModulePositionGridArray(newModulePositionGridArray);\n      setGridArray(newGridArray);\n      checkForInvalidContourGridDesign(`${fromMessage} -> recalculateGrid`, newGridArray, newContourGridArray);\n      setGridNumbers(displayGrid.numbers);\n      setPositionSnaps(displayGrid.positionSnaps);\n      setRealHeight(realGrid.height);\n      setRealWidth(realGrid.width);\n      setRoofOutline(displayGrid.roofOutline);\n      setRows(rows);\n      setSetbackOutlines(displayGrid.setbackOutlines);\n\n      if (options.withPersistence)\n        persist(rows, columns, newGridArray, newContourGridArray, newZoneGridArray, newModulePositionGridArray);\n    },\n    [\n      cellHeight,\n      cellWidth,\n      extensionBottom,\n      extensionLeft,\n      extensionRight,\n      extensionTop,\n      interColumnSpacing,\n      interRowSpacing,\n      maxEditorHeight,\n      persist,\n      setback,\n      spaceAroundCellsBottom,\n      spaceAroundCellsLeft,\n      spaceAroundCellsRight,\n      spaceAroundCellsTop,\n      isExpanded,\n    ],\n  );\n\n  const checkForInvalidContourGridDesign = useCallback(\n    (calledFrom, newGridArray, newContourGridArray) => {\n      if (projectType === \"GB4\") return;\n\n      if (invalidContourDesign(newGridArray, newContourGridArray)) {\n        logger(\"invalid contour design when set in\", calledFrom);\n        logger(\"invalid contour design when set in\", calledFrom);\n        logger(\"oldGridArray\", gridArray);\n        logger(\"oldContourGridArray\", contourGridArray);\n        logger(\"newGridArray\", newGridArray);\n        logger(\"newContourGridArray\", newContourGridArray);\n        debugger;\n      }\n    },\n    [gridArray, contourGridArray],\n  );\n\n  useEffect(() => {\n    const loader = projectType === \"GB4\" ? \"gbLoad\" : \"load\";\n    const newGridArray = serializer[loader](propsGridString, propsRows, propsColumns);\n    const newContourGridArray = serializer[loader](propsContourGridString, propsRows, propsColumns);\n    const newZoneGridArray = propsZoneGridString\n      ? serializer[loader](propsZoneGridString, propsRows, propsColumns)\n      : defaultZoneGridArray(propsRows, propsColumns);\n    const newModulePositionGridArray = propsModulePositionGridString\n      ? serializer[loader](propsModulePositionGridString, propsRows, propsColumns)\n      : defaultModulePositionGridArray(propsRows, propsColumns);\n    recalculateGrid(\n      newGridArray,\n      newContourGridArray,\n      newZoneGridArray,\n      newModulePositionGridArray,\n      {},\n      \"useEffect (grid props loading)\",\n    );\n  }, [\n    propsColumns,\n    propsGridString,\n    propsContourGridString,\n    propsZoneGridString,\n    propsModulePositionGridString,\n    propsRows,\n    recalculateGrid,\n  ]);\n\n  useEffect(() => {\n    if (gridArray[0].length !== 0)\n      recalculateGrid(\n        gridArray,\n        contourGridArray,\n        zoneGridArray,\n        modulePositionGridArray,\n        {},\n        \"useEffect (gridArray or contourGrid changed)\",\n      );\n    if (expandable) store.set(expandKey, isExpanded);\n  }, [isExpanded, gridArray, contourGridArray, zoneGridArray, modulePositionGridArray, recalculateGrid]);\n\n  useEffect(() => {\n    graphicalToolControllerElement.addEventListener(\n      \"changeModeToLayout\",\n      () => {\n        setEditorMode(GRAPHICAL_TOOL_EDITOR_MODE_LAYOUT);\n      },\n      false,\n    );\n  }, []);\n\n  useEffect(() => {\n    graphicalToolControllerElement.addEventListener(\n      \"changeModeToContour\",\n      () => {\n        setEditorMode(GRAPHICAL_TOOL_EDITOR_MODE_CONTOUR);\n      },\n      false,\n    );\n  }, []);\n\n  const handleSave = useCallback(() => {\n    if (editableGrid && offerCropOnSave && gridIsCropable(gridArray)) {\n      setAskToSaveWithCropOrNot(true);\n    } else {\n      persist(rows, columns, gridArray, contourGridArray, zoneGridArray, modulePositionGridArray);\n    }\n  }, [offerCropOnSave, gridArray, contourGridArray, zoneGridArray, modulePositionGridArray, persist, rows, columns]);\n\n  const saveWithOption = useCallback(\n    (option = null) => {\n      setAskToSaveWithCropOrNot(false);\n      if (option === \"crop\") {\n        const cropRowsAndColumns = calculateCrop(gridArray);\n        const croppedGridArray = cropGrid(gridArray, cropRowsAndColumns);\n        const croppedContourGridArray = cropGrid(contourGridArray, cropRowsAndColumns);\n        const croppedZoneGridArray = cropGrid(zoneGridArray, cropRowsAndColumns);\n        const croppedModulePositionGridArray = cropGrid(modulePositionGridArray, cropRowsAndColumns);\n\n        recalculateGrid(\n          croppedGridArray,\n          croppedContourGridArray,\n          croppedZoneGridArray,\n          croppedModulePositionGridArray,\n          { withPersistence: true },\n          \"saveWithOption (crop)\",\n        );\n      } else {\n        persist(rows, columns, gridArray, contourGridArray, zoneGridArray, modulePositionGridArray);\n      }\n    },\n    [recalculateGrid, gridArray, contourGridArray, zoneGridArray, modulePositionGridArray, persist, rows, columns],\n  );\n\n  const gridNeedsSaving = useCallback(\n    (gridArray, contourGridArray, zoneGridArray, modulePositionGridArray) => {\n      const serializedArray = serializer.dump(gridArray);\n      if (!serializedArray.includes(\"1\")) return false;\n\n      // TODO: check if the array is valid\n\n      const serializedContourArray = serializer.dump(contourGridArray);\n      const zoneChanged = zonePaintingAllowed && serializer.dump(zoneGridArray) !== persistedZoneGridString;\n      const modulePositionChanged =\n        modulePositionPaintingAllowed && serializer.dump(modulePositionGridArray) !== persistedModulePositionGridString;\n      return (\n        serializedArray !== persistedGridString ||\n        serializedContourArray !== persistedContourGridString ||\n        zoneChanged ||\n        modulePositionChanged\n      );\n    },\n    [\n      persistedGridString,\n      persistedContourGridString,\n      persistedZoneGridString,\n      persistedModulePositionGridString,\n      zonePaintingAllowed,\n      modulePositionPaintingAllowed,\n    ],\n  );\n\n  const handleGridCellClicked = useCallback(\n    (row, column) => {\n      const cga = cloneGridArray(contourGridArray);\n\n      if (editorMode === GRAPHICAL_TOOL_EDITOR_MODE_CONTOUR) {\n        if (gridArray[row][column] === GRID_CELL_INACTIVE) return;\n\n        const contourPaintDirections = contourCodeToDirections(contourPaintMode);\n        let contourUpdated = false;\n        contourPaintDirections.forEach((paintDirection) => {\n          if (validContourModification(gridArray, cga, row, column, selectedToolbarItem, paintDirection)) {\n            cga[row][column] = updateContourGridCellValue(cga[row][column], selectedToolbarItem, paintDirection);\n            setNeedsSaving(gridNeedsSaving(gridArray, cga, zoneGridArray, modulePositionGridArray));\n            contourUpdated = true;\n          }\n        });\n        if (contourUpdated) {\n          recalculateGrid(\n            gridArray,\n            cga,\n            zoneGridArray,\n            modulePositionGridArray,\n            {},\n            \"handleGridCellClicked (contour mode)\",\n          );\n        }\n      } else {\n        const currentValue = gridArray[row][column];\n        const newGridCellValue = updateGridCellValue(currentValue, selectedToolbarItem);\n        const zoneChar = zoneToChar(selectedZone);\n        const mpChar = modulePositionToChar(selectedModulePosition);\n        const becomesActive = newGridCellValue !== GRID_CELL_INACTIVE;\n        const cellChanged = currentValue !== newGridCellValue;\n        const repaintsBrush =\n          becomesActive && (zoneGridArray[row][column] !== zoneChar || modulePositionGridArray[row][column] !== mpChar);\n\n        if (cellChanged || repaintsBrush) {\n          const ga = cloneGridArray(gridArray);\n          const zga = cloneGridArray(zoneGridArray);\n          const mpga = cloneGridArray(modulePositionGridArray);\n          ga[row][column] = newGridCellValue;\n          if (newGridCellValue === GRID_CELL_INACTIVE) {\n            cga[row][column] = contourCodeGenerator(false, false, false);\n            zga[row][column] = ZONE_CELL_DEFAULT;\n            mpga[row][column] = MODULE_POSITION_CELL_DEFAULT;\n          } else {\n            if (cellChanged) clearIllegalContourInAdjacentCells(cga, row, column);\n            zga[row][column] = zoneChar;\n            mpga[row][column] = mpChar;\n          }\n          setNeedsSaving(gridNeedsSaving(ga, cga, zga, mpga));\n          recalculateGrid(ga, cga, zga, mpga, {}, \"handleGridCellClicked (layout mode)\");\n        }\n      }\n    },\n    [\n      gridArray,\n      contourGridArray,\n      zoneGridArray,\n      modulePositionGridArray,\n      selectedToolbarItem,\n      selectedZone,\n      selectedModulePosition,\n      contourPaintMode,\n      gridNeedsSaving,\n      recalculateGrid,\n      editorMode,\n    ],\n  );\n\n  const realGridParams = () => ({\n    cellWidth,\n    cellHeight,\n    columns,\n    extensionTop,\n    extensionRight,\n    extensionBottom,\n    extensionLeft,\n    rows,\n    rowSpacing: interRowSpacing,\n    columnSpacing: interColumnSpacing,\n    setback,\n    spaceAroundCellsTop,\n    spaceAroundCellsRight,\n    spaceAroundCellsBottom,\n    spaceAroundCellsLeft,\n  });\n\n  const handleGridRowsChange = useCallback(\n    (newRowCount) => {\n      const { arrayHardwareHeight } = new GridReal({ ...realGridParams(), rows: newRowCount });\n      const newGridArray = new GridModifier(\n        gridArray,\n        clampHardwareDimensions,\n        maxHardwareHeight,\n        maxHardwareWidth,\n      ).changeRowNumber(newRowCount, arrayHardwareHeight);\n\n      const newContourGridArray = new GridModifier(\n        contourGridArray,\n        clampHardwareDimensions,\n        maxHardwareHeight,\n        maxHardwareWidth,\n      ).changeRowNumber(newRowCount, arrayHardwareHeight);\n\n      const newZoneGridArray = new GridModifier(\n        zoneGridArray,\n        clampHardwareDimensions,\n        maxHardwareHeight,\n        maxHardwareWidth,\n      ).changeRowNumber(newRowCount, arrayHardwareHeight);\n\n      const newModulePositionGridArray = new GridModifier(\n        modulePositionGridArray,\n        clampHardwareDimensions,\n        maxHardwareHeight,\n        maxHardwareWidth,\n        MODULE_POSITION_CELL_DEFAULT,\n      ).changeRowNumber(newRowCount, arrayHardwareHeight);\n\n      setNeedsSaving(gridNeedsSaving(newGridArray, newContourGridArray, newZoneGridArray, newModulePositionGridArray));\n      recalculateGrid(\n        newGridArray,\n        newContourGridArray,\n        newZoneGridArray,\n        newModulePositionGridArray,\n        {},\n        \"handleGridRowsChange\",\n      );\n    },\n    [gridArray, contourGridArray, zoneGridArray, modulePositionGridArray, gridNeedsSaving, recalculateGrid],\n  );\n\n  const handleGridColumnsChange = useCallback(\n    (newColumnCount) => {\n      const { arrayHardwareWidth } = new GridReal({\n        ...realGridParams(),\n        columns: newColumnCount,\n      });\n\n      const newGridArray = new GridModifier(\n        gridArray,\n        clampHardwareDimensions,\n        maxHardwareHeight,\n        maxHardwareWidth,\n      ).changeColumnNumber(newColumnCount, arrayHardwareWidth);\n\n      const newContourGridArray = new GridModifier(\n        contourGridArray,\n        clampHardwareDimensions,\n        maxHardwareHeight,\n        maxHardwareWidth,\n      ).changeColumnNumber(newColumnCount, arrayHardwareWidth);\n\n      const newZoneGridArray = new GridModifier(\n        zoneGridArray,\n        clampHardwareDimensions,\n        maxHardwareHeight,\n        maxHardwareWidth,\n      ).changeColumnNumber(newColumnCount, arrayHardwareWidth);\n\n      const newModulePositionGridArray = new GridModifier(\n        modulePositionGridArray,\n        clampHardwareDimensions,\n        maxHardwareHeight,\n        maxHardwareWidth,\n        MODULE_POSITION_CELL_DEFAULT,\n      ).changeColumnNumber(newColumnCount, arrayHardwareWidth);\n\n      setNeedsSaving(gridNeedsSaving(newGridArray, newContourGridArray, newZoneGridArray, newModulePositionGridArray));\n      recalculateGrid(\n        newGridArray,\n        newContourGridArray,\n        newZoneGridArray,\n        newModulePositionGridArray,\n        {},\n        \"handleGridColumnsChange\",\n      );\n    },\n    [gridArray, contourGridArray, zoneGridArray, modulePositionGridArray, gridNeedsSaving, recalculateGrid],\n  );\n\n  const handleKeyDown = (event) => {\n    const arrowShift = (direction) => {\n      event.preventDefault();\n      handleShiftPanelsOnGrid(direction);\n    };\n\n    switch (event.key) {\n      case \"ArrowRight\":\n        if (editorMode === GRAPHICAL_TOOL_EDITOR_MODE_CONTOUR) {\n          event.preventDefault();\n          setContourPaintMode(contourDirectionToggle(contourPaintMode, \"east\"));\n        } else {\n          arrowShift(\"right\");\n        }\n        return;\n      case \"ArrowLeft\":\n        if (editorMode === GRAPHICAL_TOOL_EDITOR_MODE_CONTOUR) {\n          event.preventDefault();\n          setContourPaintMode(contourDirectionToggle(contourPaintMode, \"west\"));\n        } else {\n          arrowShift(\"left\");\n        }\n        return;\n      case \"ArrowUp\":\n        if (editorMode !== GRAPHICAL_TOOL_EDITOR_MODE_CONTOUR) {\n          arrowShift(\"up\");\n        }\n        return;\n      case \"ArrowDown\":\n        if (editorMode === GRAPHICAL_TOOL_EDITOR_MODE_CONTOUR) {\n          event.preventDefault();\n          setContourPaintMode(contourDirectionToggle(contourPaintMode, \"south\"));\n        } else {\n          arrowShift(\"down\");\n        }\n        return;\n      case \"a\":\n        setSelectedToolbarItem(\"add\");\n        return;\n      case \"r\":\n        setSelectedToolbarItem(\"remove\");\n        return;\n      case \"t\":\n        setSelectedToolbarItem(\"toggle\");\n        return;\n      case \"d\":\n        setShowDimensionCrosshairs(!showDimensionCrosshairs);\n    }\n  };\n\n  const handleContourPaintModeChange = (paintDirection) => {\n    setContourPaintMode(contourDirectionToggle(contourPaintMode, paintDirection));\n  };\n\n  const handleDragMove = useCallback(\n    (dragAndDrop) => {\n      if (\n        (!arrayEditingAllowed && editorMode === GRAPHICAL_TOOL_EDITOR_MODE_LAYOUT) ||\n        (!contourEditingAllowed && editorMode === GRAPHICAL_TOOL_EDITOR_MODE_CONTOUR)\n      )\n        return;\n\n      const selectionMarquee = calculateSelectionMarqueeSizeAndPosition(dragAndDrop, window);\n      const { cellHovers, marqueeColumns, marqueeRows } = new GridDragSelection({\n        cellHeight: displayCellHeight,\n        cellWidth: displayCellWidth,\n        cellPositions: displayCellPositions,\n        selectionMarquee,\n      });\n\n      setSelectionMarquee(selectionMarquee);\n      setCellHovers(cellHovers);\n      setMarqueeSelectionColumns(marqueeColumns);\n      setMarqueeSelectionRows(marqueeRows);\n      setShowSelectionMarquee(true);\n    },\n    [displayCellHeight, displayCellWidth, displayCellPositions],\n  );\n\n  const handleDragEnd = useCallback(\n    (dragAndDrop) => {\n      if (\n        (!arrayEditingAllowed && editorMode === GRAPHICAL_TOOL_EDITOR_MODE_LAYOUT) ||\n        (!contourEditingAllowed && editorMode === GRAPHICAL_TOOL_EDITOR_MODE_CONTOUR)\n      )\n        return;\n\n      const [newGridArray, newContourGridArray, newZoneGridArray, newModulePositionGridArray] =\n        updateGridArraySelectionFromDragAndDrop(\n          dragAndDrop,\n          displayCellPositions,\n          gridArray,\n          contourGridArray,\n          displayCellWidth,\n          displayCellHeight,\n          selectedToolbarItem,\n          editorMode,\n          contourPaintMode,\n          zoneGridArray,\n          selectedZone,\n          modulePositionGridArray,\n          selectedModulePosition,\n        );\n\n      setSelectionMarquee({ x: 0, y: 0, height: 0, width: 0 });\n      setShowSelectionMarquee(false);\n      setContourGridArray(newContourGridArray);\n      setZoneGridArray(newZoneGridArray);\n      setModulePositionGridArray(newModulePositionGridArray);\n      setGridArray(newGridArray);\n      checkForInvalidContourGridDesign(\"handleDragEnd\", newGridArray, newContourGridArray);\n      setNeedsSaving(gridNeedsSaving(newGridArray, newContourGridArray, newZoneGridArray, newModulePositionGridArray));\n      recalculateGrid(\n        newGridArray,\n        newContourGridArray,\n        newZoneGridArray,\n        newModulePositionGridArray,\n        {},\n        \"handleDragEnd\",\n      );\n      setCellHovers([[]]);\n    },\n    [\n      displayCellPositions,\n      gridArray,\n      contourGridArray,\n      zoneGridArray,\n      modulePositionGridArray,\n      displayCellWidth,\n      displayCellHeight,\n      selectedToolbarItem,\n      selectedZone,\n      selectedModulePosition,\n      editorMode,\n      contourPaintMode,\n      gridNeedsSaving,\n    ],\n  );\n\n  const afterModifyingGrid = useCallback(\n    (newGridArray, newContourGridArray, newZoneGridArray, newModulePositionGridArray, calledFrom) => {\n      setNeedsSaving(gridNeedsSaving(newGridArray, newContourGridArray, newZoneGridArray, newModulePositionGridArray));\n      setContourGridArray(newContourGridArray);\n      setZoneGridArray(newZoneGridArray);\n      setModulePositionGridArray(newModulePositionGridArray);\n      setGridArray(newGridArray);\n      checkForInvalidContourGridDesign(`${calledFrom} -> afterModifyingGrid`, newGridArray, newContourGridArray);\n      recalculateGrid(\n        newGridArray,\n        newContourGridArray,\n        newZoneGridArray,\n        newModulePositionGridArray,\n        {},\n        \"afterModifyingGrid\",\n      );\n    },\n    [gridNeedsSaving, recalculateGrid],\n  );\n\n  const handleShiftPanelsOnGrid = useCallback(\n    (direction) => {\n      afterModifyingGrid(\n        shiftPanelsOnGrid(gridArray, direction),\n        shiftPanelsOnGrid(contourGridArray, direction),\n        shiftPanelsOnGrid(zoneGridArray, direction),\n        shiftPanelsOnGrid(modulePositionGridArray, direction, MODULE_POSITION_CELL_DEFAULT),\n        \"handleShiftPanelsOnGrid\",\n      );\n    },\n    [afterModifyingGrid, gridArray, contourGridArray, zoneGridArray, modulePositionGridArray],\n  );\n\n  const closeSaveOptionsPopup = useCallback((event) => {\n    event.preventDefault();\n    setAskToSaveWithCropOrNot(false);\n  }, []);\n\n  const handleCropGrid = useCallback(() => {\n    const cropRowsAndColumns = calculateCrop(gridArray);\n    const croppedGridArray = cropGrid(gridArray, cropRowsAndColumns);\n    const croppedContourGridArray = cropGrid(contourGridArray, cropRowsAndColumns);\n    const croppedZoneGridArray = cropGrid(zoneGridArray, cropRowsAndColumns);\n    const croppedModulePositionGridArray = cropGrid(modulePositionGridArray, cropRowsAndColumns);\n    afterModifyingGrid(\n      croppedGridArray,\n      croppedContourGridArray,\n      croppedZoneGridArray,\n      croppedModulePositionGridArray,\n      \"handleCropGrid\",\n    );\n  }, [afterModifyingGrid, gridArray, contourGridArray, zoneGridArray, modulePositionGridArray]);\n\n  const handleClearGrid = useCallback(() => {\n    if (editorMode === GRAPHICAL_TOOL_EDITOR_MODE_CONTOUR) {\n      afterModifyingGrid(\n        gridArray,\n        clearGrid(contourGridArray),\n        zoneGridArray,\n        modulePositionGridArray,\n        \"handleClearGrid (contour mode)\",\n      );\n    } else {\n      afterModifyingGrid(\n        clearGrid(gridArray),\n        clearGrid(contourGridArray),\n        clearGrid(zoneGridArray),\n        clearGrid(modulePositionGridArray, MODULE_POSITION_CELL_DEFAULT),\n        \"handleClearGrid (layout mode)\",\n      );\n    }\n  }, [afterModifyingGrid, gridArray, editorMode, contourGridArray, zoneGridArray, modulePositionGridArray]);\n\n  const handleZoneSelected = useCallback((zone) => {\n    setSelectedZone(zone);\n  }, []);\n\n  const handleModulePositionSelected = useCallback((position) => {\n    setSelectedModulePosition(position);\n  }, []);\n\n  const handleToggleExpand = () => setIsExpanded(!isExpanded);\n\n  const classNames = [\"graphical-tool\"];\n  if (extensionsOutline) classNames.push(\"graphical-tool--with-extensions\");\n\n  const containerStyles = { height: `${displayHeight}px` };\n  if (containerWidth > 0) containerStyles.width = `${containerWidth}px`;\n\n  const getArrayHardwareHeight = useCallback(\n    () => new GridReal({ ...realGridParams(), rows }).arrayHardwareHeight,\n    [rows],\n  );\n  const showExpansionToggle = expandable && getArrayHardwareHeight() > 1350;\n\n  return (\n    <>\n      <Title projectType={projectType} />\n      <div className={classNames.join(\" \")} onKeyDown={handleKeyDown} tabIndex=\"0\" /* allows onKeyDown */>\n        <Toolbar\n          askToSaveWithCropOrNot={askToSaveWithCropOrNot}\n          columns={String(columns)}\n          closeSaveOptionsPopup={closeSaveOptionsPopup}\n          needsSaving={needsSaving}\n          onChangeActiveToolbarItem={setSelectedToolbarItem}\n          onClearGrid={handleClearGrid}\n          onColumnsChange={handleGridColumnsChange}\n          onColumnsFieldValueChange={setColumns}\n          onCropGrid={handleCropGrid}\n          onRowsChange={handleGridRowsChange}\n          onRowsFieldValueChange={setRows}\n          onSave={handleSave}\n          onShiftPanelsOnGrid={handleShiftPanelsOnGrid}\n          onToggleDimensionCrosshairs={setShowDimensionCrosshairs}\n          onToggleSnapDimensionCrosshairs={setSnapDimensionCrosshairs}\n          editableGrid={editableGrid}\n          rows={String(rows)}\n          saveWithOption={saveWithOption}\n          saving={saving}\n          selectedToolbarItem={selectedToolbarItem}\n          showDimensionCrosshairs={showDimensionCrosshairs}\n          snapDimensionCrosshairs={snapDimensionCrosshairs}\n          expandable={showExpansionToggle}\n          onToggleExpand={handleToggleExpand}\n          isExpanded={isExpanded}\n          gridArray={gridArray}\n          editorMode={editorMode}\n          contourPaintMode={contourPaintMode}\n          handleContourPaintModeChange={handleContourPaintModeChange}\n          isRailOrientationNs={isRailOrientationNs}\n          railPlatform={railPlatform}\n          hiddenEndClamp={hiddenEndClamp}\n          contourEastWestAvailable={contourEastWestAvailable}\n          arrayEditingAllowed={arrayEditingAllowed}\n          contourEditingAllowed={contourEditingAllowed}\n          zonePaintingAllowed={zonePaintingAllowed}\n          selectedZone={selectedZone}\n          onZoneSelected={handleZoneSelected}\n          modulePositionPaintingAllowed={modulePositionPaintingAllowed}\n          selectedModulePosition={selectedModulePosition}\n          onModulePositionSelected={handleModulePositionSelected}\n          critterGuardDisplayAllowed={critterGuardDisplayAllowed}\n          projectType={projectType}\n          isOpenSolar={isOpenSolar}\n        />\n        <DragAndDrop onDragMove={handleDragMove} onDragEnd={handleDragEnd}>\n          {showSelectionMarquee && (\n            <SelectionMarquee\n              selectionMarquee={selectionMarquee}\n              selectedToolbarItem={selectedToolbarItem}\n              columns={marqueeSelectionColumns}\n              rows={marqueeSelectionRows}\n            />\n          )}\n          <div className=\"graphical-tool__grid-container\" ref={containerRef} style={containerStyles}>\n            {setbackOutlines && setback !== 0 && <SetbackOutlines {...setbackOutlines} />}\n            {extensionsOutline && <ExtensionsOutline {...extensionsOutline} />}\n            <CompressedSpaceMarkers markers={compressedSpaceMarkers} rows={Number(rows)} columns={Number(columns)} />\n            <GridNumbers numbers={gridNumbers} />\n            <GridCells\n              cellPositions={displayCellPositions}\n              cellHeight={displayCellHeight}\n              cellWidth={displayCellWidth}\n              cellHovers={cellHovers}\n              handleClick={handleGridCellClicked}\n              gridArray={gridArray}\n              contourGridArray={contourGridArray}\n              zoneGridArray={zoneGridArray}\n              zonePaintingAllowed={zonePaintingAllowed}\n              modulePositionGridArray={modulePositionGridArray}\n              modulePositionPaintingAllowed={modulePositionPaintingAllowed}\n              showSelectionMarquee={showSelectionMarquee}\n              isRailOrientationNs={isRailOrientationNs}\n              showRails={showRails}\n              thirdRailUsed={thirdRailUsed}\n              arrayEditingAllowed={arrayEditingAllowed}\n              contourEditingAllowed={contourEditingAllowed}\n              useCritterGuard={useCritterGuard}\n              editorMode={editorMode}\n              hiddenEndClamp={hiddenEndClamp}\n              projectType={projectType}\n            />\n            {roofOutline && <RoofOutline {...roofOutline} outlineRef={outlineRef} />}\n            {roofOutline && showDimensionCrosshairs && (\n              <DimensionCrosshairs\n                {...roofOutline}\n                realHeight={realHeight}\n                realWidth={realWidth}\n                outlineRef={outlineRef}\n                containerRef={containerRef}\n                positionSnaps={positionSnaps}\n                snap={snapDimensionCrosshairs}\n                compressedSpace={compressedSpace}\n                compressedSpaceThresholds={compressedSpaceThresholds}\n              />\n            )}\n          </div>\n          <DimensionMarkers markers={dimensionMarkers} />\n        </DragAndDrop>\n      </div>\n    </>\n  );\n}\n\nGraphicalLayoutTool.propTypes = {\n  cellHeight: PropTypes.number.isRequired,\n  cellWidth: PropTypes.number.isRequired,\n  columns: PropTypes.number.isRequired,\n  editableGrid: PropTypes.bool.isRequired,\n  extensionTop: PropTypes.number,\n  extensionRight: PropTypes.number,\n  extensionBottom: PropTypes.number,\n  extensionLeft: PropTypes.number,\n  gridString: PropTypes.string.isRequired,\n  identifier: PropTypes.string.isRequired,\n  interColumnSpacing: PropTypes.number.isRequired,\n  interRowSpacing: PropTypes.number.isRequired,\n  maxEditorHeight: PropTypes.number.isRequired,\n  offerCropOnSave: PropTypes.bool.isRequired,\n  persistenceCallback: PropTypes.func.isRequired,\n  projectType: PropTypes.string.isRequired,\n  rows: PropTypes.number.isRequired,\n  setback: PropTypes.number,\n  spaceAroundCellsTop: PropTypes.number,\n  spaceAroundCellsRight: PropTypes.number,\n  spaceAroundCellsBottom: PropTypes.number,\n  spaceAroundCellsLeft: PropTypes.number,\n  isRailOrientationNs: PropTypes.bool.isRequired,\n  showRails: PropTypes.bool,\n  railPlatform: PropTypes.string,\n  thirdRailUsed: PropTypes.bool,\n  clampHardwareDimensions: PropTypes.bool,\n  maxHardwareHeight: PropTypes.number,\n  maxHardwareWidth: PropTypes.number,\n  expandable: PropTypes.bool,\n  arrayEditingAllowed: PropTypes.bool,\n  contourEditingAllowed: PropTypes.bool,\n  zoneGridString: PropTypes.string,\n  zonePaintingAllowed: PropTypes.bool,\n  modulePositionGridString: PropTypes.string,\n  modulePositionPaintingAllowed: PropTypes.bool,\n};\n\nexport default GraphicalLayoutTool;\n", "import React from \"react\";\nimport PropTypes from \"prop-types\";\n\nimport InfoPopupLink from \"../InfoPopupLink\";\n\nfunction Title({ projectType }) {\n  return (\n    projectType === \"BX\" && (\n      <div className=\"graphical-tool__title\">\n        <h2>Roof Array Editor</h2>\n        <div className=\"graphical-tool__title__what-is-this\">\n          What is this? <InfoPopupLink dialogIdentifier=\"bx-graphical-editor-what-is-this\" />\n        </div>\n      </div>\n    )\n  );\n}\n\nTitle.propTypes = {\n  projectType: PropTypes.string.isRequired,\n};\n\nexport default React.memo(Title);\n", "import React from \"react\";\nimport PropTypes from \"prop-types\";\n\nimport { showDialogWithIdentifier } from \"../../controllers/components/ir_dialog/helper\";\n\nfunction InfoPopupLink({ dialogIdentifier }) {\n  const onClick = (e) => {\n    e.preventDefault();\n    const clickPosition = { x: e.pageX, y: e.pageY };\n    showDialogWithIdentifier(dialogIdentifier, () => {}, { showNearClickPosition: true, clickPosition });\n  };\n\n  return (\n    <a href=\"#\" className=\"info-popup__link\" onClick={onClick} data-testid={dialogIdentifier}>\n      <i className=\"fas fa-info-circle\" />\n    </a>\n  );\n}\n\nInfoPopupLink.propTypes = {\n  dialogIdentifier: PropTypes.string.isRequired,\n};\n\nexport default React.memo(InfoPopupLink);\n", "import React from \"react\";\nimport PropTypes from \"prop-types\";\n\nimport Marker from \"./Marker\";\n\nfunction CompressedSpaceMarkers({ markers = [], rows, columns }) {\n  if (!markers || markers.length === 0) {\n    return null;\n  }\n\n  return markers.map(({ x, y, orientation }) => (\n    <Marker key={`${x}${y}${orientation}`} x={x} y={y} orientation={orientation} rows={rows} columns={columns} />\n  ));\n}\n\nCompressedSpaceMarkers.propTypes = {\n  columns: PropTypes.number.isRequired,\n  markers: PropTypes.arrayOf(\n    PropTypes.shape({\n      x: PropTypes.number.isRequired,\n      y: PropTypes.number.isRequired,\n    }),\n  ),\n  rows: PropTypes.number.isRequired,\n};\n\nexport default React.memo(CompressedSpaceMarkers);\n", "import React from \"react\";\nimport PropTypes from \"prop-types\";\n\nimport { showDialogWithIdentifier } from \"../../../controllers/components/ir_dialog/helper\";\nimport CompressionGraphic from \"./CompressionGraphic\";\n\nfunction Marker({ orientation, x, y, rows, columns }) {\n  const classNames = [\n    \"graphical-tool__compressed-space-marker\",\n    `graphical-tool__compressed-space-marker--${orientation}`,\n  ];\n\n  const styles = {\n    left: `${x}px`,\n    top: `${y}px`,\n  };\n\n  const onClick = (event) => {\n    const clickPosition = { x: event.pageX, y: event.pageY };\n    showDialogWithIdentifier(\"graphical-tool-extra-space-compressed\", () => {}, {\n      showNearClickPosition: true,\n      clickPosition,\n    });\n  };\n\n  const shortenedDisplay = (orientation === \"vertical\" && rows < 3) || (orientation === \"horizontal\" && columns < 3);\n\n  return (\n    <div\n      className={classNames.join(\" \")}\n      style={styles}\n      onClick={onClick}\n      data-testid={`marker-${x}-${y}-${orientation}`}\n    >\n      <CompressionGraphic />\n      {!shortenedDisplay && (\n        <>\n          <div className=\"graphical-tool__compressed-space-marker__text\">roof area truncated</div>\n          <CompressionGraphic />\n        </>\n      )}\n    </div>\n  );\n}\n\nMarker.propTypes = {\n  x: PropTypes.number.isRequired,\n  y: PropTypes.number.isRequired,\n  orientation: PropTypes.oneOf([\"vertical\", \"horizontal\"]).isRequired,\n  columns: PropTypes.number.isRequired,\n  rows: PropTypes.number.isRequired,\n};\n\nexport default React.memo(Marker);\n", "import React from \"react\";\n\nfunction CompressionGraphic() {\n  return (\n    <div>\n      <svg\n        width=\"49px\"\n        height=\"12px\"\n        viewBox=\"0 0 49 12\"\n        version=\"1.1\"\n        xmlns=\"http://www.w3.org/2000/svg\"\n        xmlnsXlink=\"http://www.w3.org/1999/xlink\"\n      >\n        <g id=\"Page-1\" stroke=\"none\" strokeWidth=\"1\" fill=\"none\" fillRule=\"evenodd\" strokeLinecap=\"square\">\n          <g\n            id=\"Group-2\"\n            transform=\"translate(0.000000, 1.000000)\"\n            className=\"graphical-tool__compressed-space-marker__graphic-line\"\n          >\n            <g id=\"Group\">\n              <path d=\"M0.335616438,5.8 L6.37671233,0.2\" id=\"Line\"></path>\n              <path\n                d=\"M6.37671233,5.8 L12.4178082,0.2\"\n                id=\"Line\"\n                transform=\"translate(9.397260, 3.000000) scale(1, -1) translate(-9.397260, -3.000000) \"\n              ></path>\n              <path d=\"M12.4178082,5.8 L18.4589041,0.2\" id=\"Line\"></path>\n              <path\n                d=\"M18.4589041,5.8 L24.5,0.2\"\n                id=\"Line\"\n                transform=\"translate(21.479452, 3.000000) scale(1, -1) translate(-21.479452, -3.000000) \"\n              ></path>\n              <path d=\"M24.5,5.8 L30.5410959,0.2\" id=\"Line\"></path>\n              <path\n                d=\"M30.5410959,5.8 L36.5821918,0.2\"\n                id=\"Line\"\n                transform=\"translate(33.561644, 3.000000) scale(1, -1) translate(-33.561644, -3.000000) \"\n              ></path>\n              <path d=\"M36.5821918,5.8 L42.6232877,0.2\" id=\"Line\"></path>\n              <path\n                d=\"M42.6232877,5.8 L48.6643836,0.2\"\n                id=\"Line\"\n                transform=\"translate(45.643836, 3.000000) scale(1, -1) translate(-45.643836, -3.000000) \"\n              ></path>\n            </g>\n            <g id=\"Group\" transform=\"translate(0.000000, 4.000000)\" fill=\"#FFFFFF\">\n              <path d=\"M0.335616438,5.8 L6.37671233,0.2\" id=\"Line\"></path>\n              <path\n                d=\"M6.37671233,5.8 L12.4178082,0.2\"\n                id=\"Line\"\n                transform=\"translate(9.397260, 3.000000) scale(1, -1) translate(-9.397260, -3.000000) \"\n              ></path>\n              <path d=\"M12.4178082,5.8 L18.4589041,0.2\" id=\"Line\"></path>\n              <path\n                d=\"M18.4589041,5.8 L24.5,0.2\"\n                id=\"Line\"\n                transform=\"translate(21.479452, 3.000000) scale(1, -1) translate(-21.479452, -3.000000) \"\n              ></path>\n              <path d=\"M24.5,5.8 L30.5410959,0.2\" id=\"Line\"></path>\n              <path\n                d=\"M30.5410959,5.8 L36.5821918,0.2\"\n                id=\"Line\"\n                transform=\"translate(33.561644, 3.000000) scale(1, -1) translate(-33.561644, -3.000000) \"\n              ></path>\n              <path d=\"M36.5821918,5.8 L42.6232877,0.2\" id=\"Line\"></path>\n              <path\n                d=\"M42.6232877,5.8 L48.6643836,0.2\"\n                id=\"Line\"\n                transform=\"translate(45.643836, 3.000000) scale(1, -1) translate(-45.643836, -3.000000) \"\n              ></path>\n            </g>\n          </g>\n        </g>\n      </svg>\n    </div>\n  );\n}\n\nexport default React.memo(CompressionGraphic);\n", "import React, { useState, useRef, useEffect } from \"react\";\nimport PropTypes from \"prop-types\";\nimport throttle from \"lodash/throttle\";\n\nfunction DragAndDrop({ onDragStart = () => {}, onDragMove, onDragEnd, children = undefined }) {\n  const containerRef = useRef();\n\n  const [mouseDown, setMouseDown] = useState(false);\n  const [startX, setStartX] = useState(null);\n  const [startY, setStartY] = useState(null);\n  const [endX, setEndX] = useState(null);\n  const [endY, setEndY] = useState(null);\n  const [spacebar, setSpacebar] = useState(false);\n  const [startScrollX, setStartScrollX] = useState(null);\n  const [startScrollY, setStartScrollY] = useState(null);\n\n  const onMouseDown = (event) => {\n    if (!containerRef) return;\n\n    const eventPos = eventPosition(event, containerRef.current);\n    const newStartX = eventPos.x;\n    const newStartY = eventPos.y;\n    const newEndX = eventPos.x;\n    const newEndY = eventPos.y;\n\n    setMouseDown(true);\n    setStartX(newStartX);\n    setStartY(newStartY);\n    setEndX(newEndX);\n    setEndY(newEndY);\n    setStartScrollX(window.pageXOffset);\n    setStartScrollY(window.pageYOffset);\n\n    onDragStart({ startX: newStartX, startY: newStartY, endX: newEndX, endY: newEndY, spacebar });\n  };\n\n  const eventPosition = (event, offsetTarget) => {\n    const target = offsetTarget || event.target;\n    const offset = target.getBoundingClientRect();\n    const x = event.clientX - offset.left - window.pageXOffset;\n    const y = event.clientY - offset.top - window.pageYOffset;\n    return { x, y };\n  };\n\n  useEffect(() => {\n    const calculateNewStart = (eventPos) => {\n      let newStartX = startX;\n      let newStartY = startY;\n\n      if (spacebar) {\n        const deltaX = eventPos.x - endX;\n        const deltaY = eventPos.y - endY;\n\n        newStartX += deltaX;\n        newStartY += deltaY;\n      }\n\n      const deltaScrollX = window.pageXOffset - startScrollX;\n      const deltaScrollY = window.pageYOffset - startScrollY;\n\n      if (Math.abs(deltaScrollX) > 0) {\n        newStartX -= deltaScrollX;\n        setStartScrollX(window.pageXOffset);\n      }\n      if (Math.abs(deltaScrollY) > 0) {\n        newStartY -= deltaScrollY;\n        setStartScrollY(window.pageYOffset);\n      }\n\n      setStartX(newStartX);\n      setStartY(newStartY);\n\n      return { newStartX, newStartY };\n    };\n\n    const onMouseMove = (event) => {\n      if (!mouseDown || !containerRef) return;\n\n      const eventPos = eventPosition(event, containerRef.current);\n\n      const { newStartX, newStartY } = calculateNewStart(eventPos);\n      const newEndX = eventPos.x;\n      const newEndY = eventPos.y;\n\n      setEndX(newEndX);\n      setEndY(newEndY);\n\n      onDragMove({ startX: newStartX, startY: newStartY, endX: newEndX, endY: newEndY, spacebar });\n    };\n\n    const throttledOnMouseMove = throttle(onMouseMove, 100, { leading: true });\n\n    const onMouseUp = (_event) => {\n      throttledOnMouseMove.cancel();\n\n      const didSomeDragging = Math.abs(endX - startX) > 2 || Math.abs(endY - startY) > 2;\n      if (didSomeDragging) onDragEnd({ startX, startY, endX, endY, spacebar: false });\n\n      setMouseDown(false);\n      setSpacebar(false);\n      setStartX(0);\n      setStartY(0);\n      setEndX(0);\n      setEndY(0);\n      setStartScrollX(0);\n      setStartScrollY(0);\n    };\n\n    const keyToggleSpacebar = (event, down) => {\n      // spacebar\n      if (event.keyCode !== 32 || !mouseDown) return;\n\n      event.preventDefault();\n      event.stopPropagation();\n      setSpacebar(down);\n    };\n\n    const onKeydown = (event) => keyToggleSpacebar(event, true);\n\n    const onKeyup = (event) => keyToggleSpacebar(event, false);\n\n    window.addEventListener(\"mousemove\", throttledOnMouseMove);\n    window.addEventListener(\"mouseup\", onMouseUp);\n    window.addEventListener(\"keydown\", onKeydown);\n    window.addEventListener(\"keyup\", onKeyup);\n\n    return () => {\n      window.removeEventListener(\"mousemove\", throttledOnMouseMove);\n      window.removeEventListener(\"mouseup\", onMouseUp);\n      window.removeEventListener(\"keydown\", onKeydown);\n      window.removeEventListener(\"keyup\", onKeyup);\n    };\n  }, [\n    mouseDown,\n    containerRef,\n    endX,\n    endY,\n    spacebar,\n    startX,\n    startY,\n    onDragMove,\n    onDragEnd,\n    startScrollX,\n    startScrollY,\n  ]);\n\n  return (\n    <div onMouseDown={onMouseDown} className=\"drag-and-drop\" ref={containerRef}>\n      {children}\n    </div>\n  );\n}\n\nDragAndDrop.propTypes = {\n  onDragStart: PropTypes.func,\n  onDragMove: PropTypes.func.isRequired,\n  onDragEnd: PropTypes.func.isRequired,\n  children: PropTypes.node,\n};\n\nexport default DragAndDrop;\n", "import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport GridCell from \"./GridCell\";\nimport { GRID_CELL_ACTIVE, GRID_CELL_INACTIVE } from \"./helpers/grid-helper\";\nimport { getCritterGuardDirections } from \"../../helpers/critter-guard\";\n\nfunction GridCells({\n  cellPositions,\n  cellHeight,\n  cellWidth,\n  cellHovers,\n  handleClick,\n  gridArray,\n  contourGridArray,\n  zoneGridArray,\n  zonePaintingAllowed = false,\n  modulePositionGridArray = null,\n  modulePositionPaintingAllowed = false,\n  showSelectionMarquee,\n  isRailOrientationNs = false,\n  showRails = false,\n  thirdRailUsed = false,\n  arrayEditingAllowed = false,\n  contourEditingAllowed = false,\n  editorMode,\n  hiddenEndClamp = false,\n  projectType,\n  useCritterGuard,\n}) {\n  return gridArray.map((row, i) => {\n    const isGb4 = projectType === \"GB4\";\n\n    return (\n      <div key={`row-${i}`} className=\"graphical-tool__grid-row\">\n        {row.map((cell, j) => {\n          // TODO: Calculate the Critter Gard grid setting\n          const { x, y } = cellPositions[i][j];\n          const marqueeHover = showSelectionMarquee && cellHovers && cellHovers[i] && cellHovers[i][j];\n          const contourGridSetting = contourGridArray[i][j];\n          const zoneGridSetting = zoneGridArray?.[i]?.[j];\n          const modulePositionGridSetting = modulePositionGridArray?.[i]?.[j];\n\n          let showRailOverhangLeft = true;\n          let showRailOverhangRight = true;\n          let showRailOverhangTop = true;\n          let showRailOverhangBottom = true;\n\n          if (hiddenEndClamp) {\n            if (cell === GRID_CELL_INACTIVE && projectType !== \"GB4\") {\n              showRailOverhangLeft = false;\n              showRailOverhangRight = false;\n              showRailOverhangTop = false;\n              showRailOverhangBottom = false;\n            } else {\n              if (row[j - 1] === undefined || (row[j - 1] === GRID_CELL_INACTIVE && !isGb4))\n                showRailOverhangLeft = false;\n              if (row[j + 1] === undefined || (row[j + 1] === GRID_CELL_INACTIVE && !isGb4))\n                showRailOverhangRight = false;\n              if (gridArray[i - 1] === undefined || (gridArray[i - 1][j] === GRID_CELL_INACTIVE && !isGb4))\n                showRailOverhangTop = false;\n              if (gridArray[i + 1] === undefined || (gridArray[i + 1][j] === GRID_CELL_INACTIVE && !isGb4))\n                showRailOverhangBottom = false;\n            }\n          }\n\n          let useCritterGuardNorth = false;\n          let useCritterGuardEast = false;\n          let useCritterGuardSouth = false;\n          let useCritterGuardWest = false;\n\n          if (useCritterGuard) {\n            const directions = getCritterGuardDirections(gridArray, i, j);\n            useCritterGuardNorth = directions[0] === \"1\";\n            useCritterGuardEast = directions[1] === \"1\";\n            useCritterGuardSouth = directions[2] === \"1\";\n            useCritterGuardWest = directions[3] === \"1\";\n          }\n\n          return (\n            <GridCell\n              key={`cell-${i}-${j}`}\n              selected={cell === GRID_CELL_ACTIVE}\n              marqueeHover={marqueeHover}\n              height={cellHeight}\n              width={cellWidth}\n              row={i}\n              column={j}\n              x={x}\n              y={y}\n              handleClick={handleClick}\n              isRailOrientationNs={isRailOrientationNs}\n              showRails={showRails}\n              showRailOverhangLeft={showRailOverhangLeft}\n              showRailOverhangRight={showRailOverhangRight}\n              showRailOverhangTop={showRailOverhangTop}\n              showRailOverhangBottom={showRailOverhangBottom}\n              thirdRailUsed={thirdRailUsed}\n              contourGridSetting={contourGridSetting}\n              zoneGridSetting={zoneGridSetting}\n              zonePaintingAllowed={zonePaintingAllowed}\n              modulePositionGridSetting={modulePositionGridSetting}\n              modulePositionPaintingAllowed={modulePositionPaintingAllowed}\n              arrayEditingAllowed={arrayEditingAllowed}\n              contourEditingAllowed={contourEditingAllowed}\n              editorMode={editorMode}\n              projectType={projectType}\n              useCritterGuardNorth={useCritterGuardNorth}\n              useCritterGuardEast={useCritterGuardEast}\n              useCritterGuardSouth={useCritterGuardSouth}\n              useCritterGuardWest={useCritterGuardWest}\n            />\n          );\n        })}\n      </div>\n    );\n  });\n}\n\nGridCells.propTypes = {\n  cellWidth: PropTypes.number.isRequired,\n  cellHeight: PropTypes.number.isRequired,\n  cellPositions: PropTypes.arrayOf(\n    PropTypes.arrayOf(\n      PropTypes.shape({\n        x: PropTypes.number.isRequired,\n        y: PropTypes.number.isRequired,\n      }).isRequired,\n    ),\n  ).isRequired,\n  handleClick: PropTypes.func.isRequired,\n  showSelectionMarquee: PropTypes.bool,\n  gridArray: PropTypes.arrayOf(PropTypes.arrayOf(PropTypes.oneOf([GRID_CELL_ACTIVE, GRID_CELL_INACTIVE]))),\n  cellHovers: PropTypes.arrayOf(PropTypes.arrayOf(PropTypes.bool)),\n  isRailOrientationNs: PropTypes.bool,\n  showRails: PropTypes.bool,\n  thirdRailUsed: PropTypes.bool,\n  arrayEditingAllowed: PropTypes.bool,\n  contourEditingAllowed: PropTypes.bool,\n  hiddenEndClamp: PropTypes.bool,\n  projectType: PropTypes.string,\n  zoneGridArray: PropTypes.arrayOf(PropTypes.arrayOf(PropTypes.string)),\n  zonePaintingAllowed: PropTypes.bool,\n  modulePositionGridArray: PropTypes.arrayOf(PropTypes.arrayOf(PropTypes.string)),\n  modulePositionPaintingAllowed: PropTypes.bool,\n};\n\nexport default React.memo(GridCells, areEqual);\n\nfunction areEqual(prevProps, nextProps) {\n  if (prevProps.cellWidth !== nextProps.cellWidth) return false;\n  if (prevProps.cellHeight !== nextProps.cellHeight) return false;\n  if (prevProps.handleClick !== nextProps.handleClick) return false;\n  if (prevProps.showSelectionMarquee !== nextProps.showSelectionMarquee) return false;\n  if (JSON.stringify(prevProps.cellHovers) !== JSON.stringify(nextProps.cellHovers)) {\n    return false;\n  }\n  if (JSON.stringify(prevProps.gridArray) !== JSON.stringify(nextProps.gridArray)) {\n    return false;\n  }\n  if (JSON.stringify(prevProps.contourGridArray) !== JSON.stringify(nextProps.contourGridArray)) {\n    return false;\n  }\n  if (JSON.stringify(prevProps.zoneGridArray) !== JSON.stringify(nextProps.zoneGridArray)) {\n    return false;\n  }\n  if (JSON.stringify(prevProps.modulePositionGridArray) !== JSON.stringify(nextProps.modulePositionGridArray)) {\n    return false;\n  }\n  if (prevProps.modulePositionPaintingAllowed !== nextProps.modulePositionPaintingAllowed) {\n    return false;\n  }\n  if (JSON.stringify(prevProps.cellPositions) !== JSON.stringify(nextProps.cellPositions)) {\n    return false;\n  }\n  return true;\n}\n", "import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport GridRails from \"./GridRails\";\nimport { isContourEast, isContourSouth, isContourWest } from \"../../../helpers/contour\";\nimport { charToZone, zoneColorFamily, zoneLabel } from \"../helpers/zone-helper\";\nimport { charToModulePosition, modulePositionLabelForWidth } from \"../helpers/module-position-helper\";\n\nconst CELL_SPACING = 1;\n\n// Below this cell height (px) a landscape panel is too short to stack the zone number above the\n// module-position initial without clipping, so the two render inline on one line instead.\nconst ZONE_INLINE_MAX_HEIGHT = 30;\n\nfunction GridCell({\n  height,\n  width,\n  x,\n  y,\n  row,\n  column,\n  marqueeHover = false,\n  selected,\n  handleClick,\n  isRailOrientationNs = false,\n  showRails = false,\n  thirdRailUsed = false,\n  contourGridSetting,\n  zoneGridSetting,\n  zonePaintingAllowed = false,\n  modulePositionGridSetting,\n  modulePositionPaintingAllowed = false,\n  arrayEditingAllowed = false,\n  contourEditingAllowed,\n  showRailOverhangLeft,\n  showRailOverhangRight,\n  showRailOverhangTop,\n  showRailOverhangBottom,\n  projectType,\n  useCritterGuardNorth,\n  useCritterGuardEast,\n  useCritterGuardSouth,\n  useCritterGuardWest,\n}) {\n  const onClick = (event) => {\n    event.preventDefault();\n\n    if (!(arrayEditingAllowed || contourEditingAllowed)) return;\n\n    handleClick(row, column, !selected);\n  };\n\n  const classNames = [\"graphical-tool__grid-cell\"];\n  if (selected) {\n    classNames.push(\"graphical-tool__grid-cell--selected\");\n  }\n  if (marqueeHover) {\n    classNames.push(\"graphical-tool__grid-cell--marquee-hover\");\n  }\n  if (!arrayEditingAllowed) {\n    classNames.push(\"graphical-tool__grid-cell--view-only\");\n  }\n\n  const styles = {\n    height: `${height}px`,\n    width: `${width}px`,\n    left: `${x}px`,\n    top: `${y}px`,\n  };\n\n  const panelOverlayStyles = {\n    width: `${width - CELL_SPACING}px`,\n    height: `${height - CELL_SPACING}px`,\n    top: 0,\n    left: 0,\n    position: \"absolute\",\n  };\n  if (!zonePaintingAllowed) {\n    panelOverlayStyles.background = \"rgba(54, 141, 214, 0.5)\";\n    panelOverlayStyles.border = \"2px solid #2573b4\";\n  }\n\n  const zone = zonePaintingAllowed ? charToZone(zoneGridSetting) : null;\n  const modulePosition = modulePositionPaintingAllowed ? charToModulePosition(modulePositionGridSetting) : null;\n\n  const doPanelsLookLikeLandscape = width > height;\n  const zoneLabelInline = doPanelsLookLikeLandscape && height < ZONE_INLINE_MAX_HEIGHT;\n  const thicknessMultiplier = doPanelsLookLikeLandscape ? 0.1 : 0.2;\n  const contourCritterGuardThickness = (width - CELL_SPACING) * thicknessMultiplier;\n\n  const contourCritterGuardWestAndEastStyles = {\n    width: `${contourCritterGuardThickness}px`,\n    height: `${height - CELL_SPACING}px`,\n  };\n\n  const contourCritterGuardNorthSouthStyles = {\n    width: `${width - CELL_SPACING}px`,\n    height: `${contourCritterGuardThickness}px`,\n  };\n\n  return (\n    <div className=\"graphical-tool__grid-cell__container\" style={styles}>\n      <div className={classNames.join(\" \")} onClick={onClick} draggable=\"false\" data-testid=\"grid-cell\">\n        {((showRails && selected) || projectType === \"GB4\") && (\n          <>\n            {zonePaintingAllowed && projectType !== \"GB4\" && (\n              <div className=\"graphical-tool__grid-cell__zone-base\" style={panelOverlayStyles} />\n            )}\n            <GridRails\n              height={height}\n              width={width}\n              isRailOrientationNs={isRailOrientationNs}\n              thirdRail={thirdRailUsed}\n              contourGridSetting={contourGridSetting}\n              showRailOverhangLeft={showRailOverhangLeft}\n              showRailOverhangRight={showRailOverhangRight}\n              showRailOverhangTop={showRailOverhangTop}\n              showRailOverhangBottom={showRailOverhangBottom}\n            />\n            {projectType !== \"GB4\" &&\n              (zonePaintingAllowed ? (\n                <div\n                  className={`graphical-tool__grid-cell__zone graphical-tool__grid-cell__zone--${zoneColorFamily(zone)}${\n                    zoneLabelInline ? \" graphical-tool__grid-cell__zone--inline\" : \"\"\n                  }`}\n                  style={panelOverlayStyles}\n                  onClick={onClick}\n                  draggable=\"false\"\n                  data-testid=\"grid-cell-zone\"\n                >\n                  <span className=\"graphical-tool__grid-cell__zone__label\">{zoneLabel(zone)}</span>\n                  {modulePositionPaintingAllowed && (\n                    <span className=\"graphical-tool__grid-cell__module-position\">\n                      {modulePositionLabelForWidth(modulePosition, width)}\n                    </span>\n                  )}\n                </div>\n              ) : (\n                <div style={panelOverlayStyles} onClick={onClick} draggable=\"false\" />\n              ))}\n\n            {isContourWest(contourGridSetting) && (\n              <div className=\"graphical-tool__grid-cell__contour--west\" style={contourCritterGuardWestAndEastStyles} />\n            )}\n            {isContourEast(contourGridSetting) && (\n              <div className=\"graphical-tool__grid-cell__contour--east\" style={contourCritterGuardWestAndEastStyles} />\n            )}\n            {isContourSouth(contourGridSetting) && (\n              <div className=\"graphical-tool__grid-cell__contour--south\" style={contourCritterGuardNorthSouthStyles} />\n            )}\n\n            {useCritterGuardNorth && (\n              <div\n                className=\"graphical-tool__grid-cell__critter-guard--north\"\n                style={contourCritterGuardNorthSouthStyles}\n              />\n            )}\n            {useCritterGuardEast && (\n              <div\n                className=\"graphical-tool__grid-cell__critter-guard--east\"\n                style={contourCritterGuardWestAndEastStyles}\n              />\n            )}\n            {useCritterGuardSouth && (\n              <div\n                className=\"graphical-tool__grid-cell__critter-guard--south\"\n                style={contourCritterGuardNorthSouthStyles}\n              />\n            )}\n            {useCritterGuardWest && (\n              <div\n                className=\"graphical-tool__grid-cell__critter-guard--west\"\n                style={contourCritterGuardWestAndEastStyles}\n              />\n            )}\n          </>\n        )}\n      </div>\n    </div>\n  );\n}\n\nGridCell.propTypes = {\n  selected: PropTypes.bool.isRequired,\n  height: PropTypes.number.isRequired,\n  width: PropTypes.number.isRequired,\n  x: PropTypes.number.isRequired,\n  y: PropTypes.number.isRequired,\n  row: PropTypes.number.isRequired,\n  column: PropTypes.number.isRequired,\n  handleClick: PropTypes.func.isRequired,\n  marqueeHover: PropTypes.bool,\n  isRailOrientationNs: PropTypes.bool,\n  showRails: PropTypes.bool,\n  thirdRailUsed: PropTypes.bool,\n  arrayEditingAllowed: PropTypes.bool,\n  showRailOverhangLeft: PropTypes.bool,\n  showRailOverhangRight: PropTypes.bool,\n  showRailOverhangTop: PropTypes.bool,\n  showRailOverhangBottom: PropTypes.bool,\n  projectType: PropTypes.string,\n  zoneGridSetting: PropTypes.string,\n  zonePaintingAllowed: PropTypes.bool,\n  modulePositionGridSetting: PropTypes.string,\n  modulePositionPaintingAllowed: PropTypes.bool,\n};\n\nexport default React.memo(GridCell);\n", "import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { isContourEast, isContourSouth, isContourWest } from \"../../../helpers/contour\";\n\nconst railStyles = {\n  backgroundColor: \"#1D5380\",\n  position: \"absolute\",\n};\n\nexport default function GridRails({\n  height,\n  width,\n  isRailOrientationNs,\n  thirdRail,\n  contourGridSetting,\n  showRailOverhangLeft,\n  showRailOverhangRight,\n  showRailOverhangTop,\n  showRailOverhangBottom,\n}) {\n  const scaledRailWidth = (actual) => Math.min(5, parseInt(actual / 5));\n\n  const contourWest = isContourWest(contourGridSetting);\n  const contourEast = isContourEast(contourGridSetting);\n  const contourSouth = isContourSouth(contourGridSetting);\n\n  const railStylesEw = {\n    height: `${scaledRailWidth(height)}px`,\n    ...railStyles,\n  };\n\n  if (showRailOverhangLeft && showRailOverhangRight) {\n    railStylesEw.width = contourEast || contourWest ? \"calc(100% - 2px)\" : \"calc(100% + 1px)\";\n    railStylesEw.left = contourEast || contourWest ? \"0\" : \"-1px\";\n  } else if (!showRailOverhangLeft && !showRailOverhangRight) {\n    railStylesEw.width = \"calc(100% - 2px)\";\n    railStylesEw.left = \"0\";\n  } else if (showRailOverhangLeft) {\n    railStylesEw.width = \"calc(100% + 1px)\";\n    railStylesEw.left = \"-2px\";\n  } else if (showRailOverhangRight) {\n    railStylesEw.width = \"calc(100%)\";\n    railStylesEw.left = \"0\";\n  }\n\n  const topRailStyle = {\n    ...railStylesEw,\n    top: `${0.2 * height}px`,\n  };\n\n  const middleEwRailStyle = {\n    ...railStylesEw,\n    top: `${0.45 * height}px`,\n  };\n\n  const bottomRailStyle = {\n    ...railStylesEw,\n    bottom: `${0.2 * height}px`,\n  };\n\n  const railStylesNs = {\n    width: `${scaledRailWidth(width)}px`,\n    ...railStyles,\n  };\n\n  if (showRailOverhangTop && showRailOverhangBottom) {\n    railStylesNs.height = contourSouth ? \"calc(100% - 2px)\" : \"calc(100% + 1px)\";\n    railStylesNs.top = contourSouth ? \"0\" : \"-1px\";\n  } else if (!showRailOverhangTop && !showRailOverhangBottom) {\n    railStylesNs.height = \"calc(100% - 2px)\";\n    railStylesNs.top = \"0\";\n  } else if (showRailOverhangTop) {\n    railStylesNs.height = \"calc(100% + 1px)\";\n    railStylesNs.top = \"-2px\";\n  } else if (showRailOverhangBottom) {\n    railStylesNs.height = \"calc(100%)\";\n    railStylesNs.top = \"0\";\n  }\n\n  const leftRailStyle = {\n    ...railStylesNs,\n    left: `${0.2 * width}px`,\n  };\n\n  const middleNsRailStyle = {\n    ...railStylesNs,\n    left: `${0.45 * width}px`,\n  };\n\n  const rightRailStyle = {\n    ...railStylesNs,\n    right: `${0.2 * width}px`,\n  };\n\n  return isRailOrientationNs ? (\n    <>\n      <div style={leftRailStyle} />\n      {thirdRail && <div style={middleNsRailStyle} />}\n      <div style={rightRailStyle} />\n    </>\n  ) : (\n    <>\n      <div style={topRailStyle} />\n      {thirdRail && <div style={middleEwRailStyle} />}\n      <div style={bottomRailStyle} />\n    </>\n  );\n}\n\nGridRails.propTypes = {\n  height: PropTypes.number.isRequired,\n  width: PropTypes.number.isRequired,\n  isRailOrientationNs: PropTypes.bool.isRequired,\n  thirdRail: PropTypes.bool,\n  showRailOverhangLeft: PropTypes.bool,\n  showRailOverhangRight: PropTypes.bool,\n  showRailOverhangTop: PropTypes.bool,\n  showRailOverhangBottom: PropTypes.bool,\n};\n", "export const CONTOUR_CODE_NONE = \"0\";\nexport const CONTOUR_CODE_SOUTH = \"1\";\nexport const CONTOUR_CODE_WEST = \"2\";\nexport const CONTOUR_CODE_SOUTH_AND_WEST = \"3\";\nexport const CONTOUR_CODE_EAST = \"4\";\nexport const CONTOUR_CODE_SOUTH_AND_EAST = \"5\";\nexport const CONTOUR_CODE_WEST_AND_EAST = \"6\";\nexport const CONTOUR_CODE_SOUTH_AND_WEST_AND_EAST = \"7\";\n\nexport const CONTOUR_DIRECTION_SOUTH = \"south\";\nexport const CONTOUR_DIRECTION_WEST = \"west\";\nexport const CONTOUR_DIRECTION_EAST = \"east\";\n\nexport function contourCodeGenerator(isWest, isEast, isSouth) {\n  return `${(isSouth ? 1 : 0) + (isWest ? 2 : 0) + (isEast ? 4 : 0)}`;\n}\n\nexport const isContourWest = (code) =>\n  [\n    CONTOUR_CODE_WEST,\n    CONTOUR_CODE_SOUTH_AND_WEST,\n    CONTOUR_CODE_WEST_AND_EAST,\n    CONTOUR_CODE_SOUTH_AND_WEST_AND_EAST,\n  ].includes(code);\n\nexport const isContourEast = (code) =>\n  [\n    CONTOUR_CODE_EAST,\n    CONTOUR_CODE_SOUTH_AND_EAST,\n    CONTOUR_CODE_WEST_AND_EAST,\n    CONTOUR_CODE_SOUTH_AND_WEST_AND_EAST,\n  ].includes(code);\n\nexport const isContourSouth = (code) =>\n  [\n    CONTOUR_CODE_SOUTH,\n    CONTOUR_CODE_SOUTH_AND_WEST,\n    CONTOUR_CODE_SOUTH_AND_EAST,\n    CONTOUR_CODE_SOUTH_AND_WEST_AND_EAST,\n  ].includes(code);\n\nexport const contourCodeToDirections = (code) => {\n  const contourPaintDirections = [];\n  if (isContourSouth(code)) contourPaintDirections.push(CONTOUR_DIRECTION_SOUTH);\n  if (isContourWest(code)) contourPaintDirections.push(CONTOUR_DIRECTION_WEST);\n  if (isContourEast(code)) contourPaintDirections.push(CONTOUR_DIRECTION_EAST);\n  return contourPaintDirections;\n};\n\nexport const contourDirectionsToCode = (directions) => {\n  const isWest = directions.includes(CONTOUR_DIRECTION_WEST);\n  const isEast = directions.includes(CONTOUR_DIRECTION_EAST);\n  const isSouth = directions.includes(CONTOUR_DIRECTION_SOUTH);\n  return contourCodeGenerator(isWest, isEast, isSouth);\n};\n\nexport const contourDirectionToggle = (existingCode, directionToggle) => {\n  let isWest = isContourWest(existingCode);\n  let isEast = isContourEast(existingCode);\n  let isSouth = isContourSouth(existingCode);\n\n  isWest = directionToggle === CONTOUR_DIRECTION_WEST ? !isWest : isWest;\n  isEast = directionToggle === CONTOUR_DIRECTION_EAST ? !isEast : isEast;\n  isSouth = directionToggle === CONTOUR_DIRECTION_SOUTH ? !isSouth : isSouth;\n\n  if (!isWest && !isEast && !isSouth) return existingCode;\n\n  return contourCodeGenerator(isWest, isEast, isSouth);\n};\n\nexport const contourCodeHumanized = (code) => {\n  switch (code) {\n    case CONTOUR_CODE_NONE:\n      return \"no contour\";\n    case CONTOUR_CODE_SOUTH:\n      return CONTOUR_DIRECTION_SOUTH;\n    case CONTOUR_CODE_WEST:\n      return CONTOUR_DIRECTION_WEST;\n    case CONTOUR_CODE_SOUTH_AND_WEST:\n      return `${CONTOUR_DIRECTION_SOUTH} + ${CONTOUR_DIRECTION_WEST}`;\n    case CONTOUR_CODE_EAST:\n      return CONTOUR_DIRECTION_EAST;\n    case CONTOUR_CODE_SOUTH_AND_EAST:\n      return `${CONTOUR_DIRECTION_SOUTH} + ${CONTOUR_DIRECTION_EAST}`;\n    case CONTOUR_CODE_WEST_AND_EAST:\n      return `${CONTOUR_DIRECTION_WEST} + ${CONTOUR_DIRECTION_EAST}`;\n    case CONTOUR_CODE_SOUTH_AND_WEST_AND_EAST:\n      return `${CONTOUR_DIRECTION_SOUTH} + ${CONTOUR_DIRECTION_WEST} + ${CONTOUR_DIRECTION_EAST}`;\n  }\n};\n", "import { ZONE_1, ZONE_2, ZONE_3, ZONES } from \"../../../helpers/zones-and-module-positions\";\n\nexport const ZONE_CELL_DEFAULT = \"0\";\nexport const ZONE_DEFAULT = ZONE_1;\nexport const TOOLBAR_ITEM_ZONE = \"zone\";\n\nexport const availableZones = () => [ZONE_1, ZONE_2, ZONE_3];\n\nexport const zoneToChar = (zone) => String(ZONES.indexOf(zone));\n\nexport const charToZone = (char) => ZONES[Number(char)];\n\nexport const zoneLabel = (zone) => zone.toUpperCase();\n\nexport const zoneColorFamily = (zone) => `zone${zone[0]}`;\n\nexport const defaultZoneGridArray = (rows, columns) =>\n  Array.from({ length: rows }, () => Array(columns).fill(ZONE_CELL_DEFAULT));\n", "import { MODULE_POSITION_N, MODULE_POSITION_EXP } from \"../../../helpers/zones-and-module-positions\";\n\nconst MODULE_POSITION_CELL_CODES = {\n  [MODULE_POSITION_N]: \"N\",\n  [MODULE_POSITION_EXP]: \"X\",\n};\n\nexport const MODULE_POSITION_CELL_DEFAULT = MODULE_POSITION_CELL_CODES[MODULE_POSITION_N];\nexport const MODULE_POSITION_DEFAULT = MODULE_POSITION_N;\nexport const TOOLBAR_ITEM_MODULE_POSITION = \"modulePosition\";\n\n// Below this cell width (px) the full label (e.g. \"EXP\") overflows the panel,\n// so the cell renders the single-letter form instead.\nexport const MODULE_POSITION_COMPACT_CELL_WIDTH = 38;\n\nexport const FR_MODULE_POSITIONS = [MODULE_POSITION_N, MODULE_POSITION_EXP];\n\nexport const availableModulePositions = () => FR_MODULE_POSITIONS;\n\nconst CHAR_TO_MODULE_POSITION = Object.fromEntries(\n  Object.entries(MODULE_POSITION_CELL_CODES).map(([position, code]) => [code, position]),\n);\n\nexport const modulePositionToChar = (position) => MODULE_POSITION_CELL_CODES[position] ?? MODULE_POSITION_CELL_DEFAULT;\n\nexport const charToModulePosition = (char) => CHAR_TO_MODULE_POSITION[char] ?? MODULE_POSITION_DEFAULT;\n\nexport const modulePositionLabel = (position) => position;\n\nexport const modulePositionCompactLabel = (position) => modulePositionToChar(position);\n\nexport const modulePositionLabelForWidth = (position, width) =>\n  width < MODULE_POSITION_COMPACT_CELL_WIDTH ? modulePositionCompactLabel(position) : modulePositionLabel(position);\n\nexport const defaultModulePositionGridArray = (rows, columns) =>\n  Array.from({ length: rows }, () => Array(columns).fill(MODULE_POSITION_CELL_DEFAULT));\n", "export const load = (gridString, rows, columns) => {\n  const ret = [];\n  for (let i = 0; i < rows; i++) {\n    const startPos = i * columns;\n    ret[i] = gridString.slice(startPos, startPos + columns).split(\"\");\n  }\n  return ret;\n};\n\nexport const gbLoad = (gridString, rows, columns) => {\n  let gridArray = gridString.split(\"\");\n  let result = Array.from({ length: rows }, () => Array(columns).fill(0));\n\n  for (let i = 0; i < gridArray.length; i++) {\n    let row = i % rows;\n    let column = Math.floor(i / rows);\n    result[row][column] = gridArray[i];\n  }\n\n  return result;\n};\n\nexport const dump = (gridArray) => {\n  return gridArray.map((row) => row.join(\"\")).join(\"\");\n};\n\nexport const gbDump = (gridArray) => {\n  return dump(transposeGridArray(gridArray));\n};\n\nexport const transposeGridArray = (gridArray) => {\n  return gridArray[0].map((_, colIndex) => gridArray.map((row) => row[colIndex]));\n};\n", "export const OFF_SCREEN_POSITION = -10000;\nexport const DRAGGING_TOLERANCE = 5;\n\nexport const calculateSelectionMarqueeSizeAndPosition = (dragAndDrop, window) => {\n  const { startX, startY, endX, endY } = dragAndDrop;\n  const { pageXOffset, pageYOffset } = window;\n\n  let width;\n  let height;\n  let x;\n  let y;\n\n  width = Math.abs(endX - startX);\n  height = Math.abs(endY - startY);\n\n  if (startX < endX) {\n    x = startX + pageXOffset;\n  } else if (startX > endX) {\n    x = startX - width + pageXOffset;\n  } else if (startX === endX && height >= DRAGGING_TOLERANCE) {\n    x = startX + pageXOffset;\n  } else {\n    x = OFF_SCREEN_POSITION;\n  }\n\n  if (startY < endY) {\n    y = startY + pageYOffset;\n  } else if (startY > endY) {\n    y = startY - height + pageYOffset;\n  } else if (startY === endY && width >= DRAGGING_TOLERANCE) {\n    y = startY + pageYOffset;\n  } else {\n    y = OFF_SCREEN_POSITION;\n  }\n\n  if (height < 1) height = 1;\n  if (width < 1) width = 1;\n\n  return { width, height, x, y };\n};\n", "import * as store from \"./local-store\";\n\nexport const GRAPHICAL_TOOL_EDITOR_MODE_LAYOUT = \"layout\";\nexport const GRAPHICAL_TOOL_EDITOR_MODE_CONTOUR = \"contour\";\n\nconst LOCAL_STORE_KEY_PREFIX = \"gtem\"; // Graphical tool editor mode\n\nexport function defaultEditorMode({ roofSectionId, arrayEditingAllowed, contourEditingAllowed }) {\n  const localStoreKey = `${LOCAL_STORE_KEY_PREFIX}-${roofSectionId}`;\n  if (store.get(localStoreKey) === GRAPHICAL_TOOL_EDITOR_MODE_CONTOUR && contourEditingAllowed)\n    return GRAPHICAL_TOOL_EDITOR_MODE_CONTOUR;\n  if (store.get(localStoreKey) === GRAPHICAL_TOOL_EDITOR_MODE_LAYOUT && arrayEditingAllowed)\n    return GRAPHICAL_TOOL_EDITOR_MODE_LAYOUT;\n\n  return !arrayEditingAllowed && contourEditingAllowed\n    ? GRAPHICAL_TOOL_EDITOR_MODE_CONTOUR\n    : GRAPHICAL_TOOL_EDITOR_MODE_LAYOUT;\n}\n\nexport function storeEditorMode({ roofSectionId, editorMode }) {\n  const localStoreKey = `${LOCAL_STORE_KEY_PREFIX}-${roofSectionId}`;\n  store.set(localStoreKey, editorMode);\n}\n", "import { dump } from \"./grid-serializer\";\nimport { linesAreIntersecting } from \"../../../helpers/geometry\";\nimport { calculateSelectionMarqueeSizeAndPosition } from \"./marquee-size-and-position-calculator\";\nimport { GRAPHICAL_TOOL_EDITOR_MODE_CONTOUR } from \"../../../helpers/graphical-tool-helpers\";\nimport {\n  contourCodeToDirections,\n  contourCodeGenerator,\n  CONTOUR_DIRECTION_EAST,\n  CONTOUR_DIRECTION_SOUTH,\n  CONTOUR_DIRECTION_WEST,\n  isContourEast,\n  isContourSouth,\n  isContourWest,\n} from \"../../../helpers/contour\";\nimport { ZONE_CELL_DEFAULT, ZONE_DEFAULT, zoneToChar } from \"./zone-helper\";\nimport { MODULE_POSITION_CELL_DEFAULT, MODULE_POSITION_DEFAULT, modulePositionToChar } from \"./module-position-helper\";\n\nexport const GRID_CELL_ACTIVE = \"1\";\nexport const GRID_CELL_INACTIVE = \"0\";\n\nexport const generateEmptyGridString = ({ rows, columns }) => {\n  const gridArray = generateEmptyGridArray({ rows, columns });\n  return dump(gridArray);\n};\n\nexport const generateEmptyGridArray = ({ rows, columns }) => {\n  return new Array(rows).fill(new Array(columns).fill(\"0\"));\n};\n\nexport const cloneGridArray = (gridArray) => gridArray.map((row) => [...row]);\n\nexport const gridCellInMarqueeSelection = ({\n  itemX,\n  itemY,\n  itemWidth,\n  itemHeight,\n  marqueeX,\n  marqueeY,\n  marqueeWidth,\n  marqueeHeight,\n}) => {\n  const itemBottomX = itemX + itemWidth;\n  const itemBottomY = itemY + itemHeight;\n  const marqueeBottomX = marqueeX + marqueeWidth;\n  const marqueeBottomY = marqueeY + marqueeHeight;\n\n  const marqueeLines = [\n    {\n      p1: { x: marqueeX, y: marqueeY },\n      p2: { x: marqueeBottomX, y: marqueeY },\n    },\n    {\n      p1: { x: marqueeBottomX, y: marqueeY },\n      p2: { x: marqueeBottomX, y: marqueeBottomY },\n    },\n    {\n      p1: { x: marqueeBottomX, y: marqueeBottomY },\n      p2: { x: marqueeX, y: marqueeBottomY },\n    },\n    {\n      p1: { x: marqueeX, y: marqueeBottomY },\n      p2: { x: marqueeX, y: marqueeY },\n    },\n  ];\n\n  const itemLines = [\n    {\n      p1: { x: itemX, y: itemY },\n      p2: { x: itemBottomX, y: itemY },\n    },\n    {\n      p1: { x: itemBottomX, y: itemY },\n      p2: { x: itemBottomX, y: itemBottomY },\n    },\n    {\n      p1: { x: itemBottomX, y: itemBottomY },\n      p2: { x: itemX, y: itemBottomY },\n    },\n    {\n      p1: { x: itemX, y: itemBottomY },\n      p2: { x: itemX, y: itemY },\n    },\n  ];\n\n  // does the marquee overlap the item at all\n  for (let i = 0; i < 4; i++) {\n    for (let j = 0; j < 4; j++) {\n      if (linesAreIntersecting(marqueeLines[i].p1, marqueeLines[i].p2, itemLines[j].p1, itemLines[j].p2)) {\n        return true;\n      }\n    }\n  }\n\n  // does the marquee completely wraps the item\n  if (itemX >= marqueeX && itemY >= marqueeY && itemBottomX <= marqueeBottomX && itemBottomY <= marqueeBottomY) {\n    return true;\n  }\n\n  return false;\n};\n\nexport const updateGridArraySelectionFromDragAndDrop = (\n  dragAndDrop,\n  gridPositions,\n  gridArray,\n  contourGridArray,\n  cellWidth,\n  cellHeight,\n  selectedToolbarItem,\n  editorMode,\n  contourPaintMode,\n  zoneGridArray = null,\n  selectedZone = ZONE_DEFAULT,\n  modulePositionGridArray = null,\n  selectedModulePosition = MODULE_POSITION_DEFAULT,\n) => {\n  const selectionMarquee = calculateSelectionMarqueeSizeAndPosition(dragAndDrop, window);\n\n  const newGridArray = cloneGridArray(gridArray);\n  const newContourGridArray = cloneGridArray(contourGridArray);\n  const newZoneGridArray = zoneGridArray === null ? null : cloneGridArray(zoneGridArray);\n  const newModulePositionGridArray = modulePositionGridArray === null ? null : cloneGridArray(modulePositionGridArray);\n  const contourPaintDirections = contourCodeToDirections(contourPaintMode);\n\n  gridPositions.forEach((row, i) => {\n    row.forEach((item, j) => {\n      if (\n        gridCellInMarqueeSelection({\n          itemX: item.x,\n          itemY: item.y,\n          itemWidth: cellWidth,\n          itemHeight: cellHeight,\n          marqueeX: selectionMarquee.x,\n          marqueeY: selectionMarquee.y,\n          marqueeWidth: selectionMarquee.width,\n          marqueeHeight: selectionMarquee.height,\n        })\n      ) {\n        if (editorMode === GRAPHICAL_TOOL_EDITOR_MODE_CONTOUR) {\n          contourPaintDirections.forEach((paintDirection) => {\n            if (\n              newGridArray[i][j] === GRID_CELL_ACTIVE &&\n              validContourModification(gridArray, newContourGridArray, i, j, selectedToolbarItem, paintDirection)\n            ) {\n              newContourGridArray[i][j] = updateContourGridCellValue(\n                newContourGridArray[i][j],\n                selectedToolbarItem,\n                paintDirection,\n              );\n            }\n          });\n        } else {\n          newGridArray[i][j] = updateGridCellValue(newGridArray[i][j], selectedToolbarItem);\n          if (newGridArray[i][j] === GRID_CELL_INACTIVE) {\n            newContourGridArray[i][j] = contourCodeGenerator(false, false, false);\n            if (newZoneGridArray) newZoneGridArray[i][j] = ZONE_CELL_DEFAULT;\n            if (newModulePositionGridArray) newModulePositionGridArray[i][j] = MODULE_POSITION_CELL_DEFAULT;\n          } else {\n            clearIllegalContourInAdjacentCells(newContourGridArray, i, j);\n            if (newZoneGridArray) newZoneGridArray[i][j] = zoneToChar(selectedZone);\n            if (newModulePositionGridArray) {\n              newModulePositionGridArray[i][j] = modulePositionToChar(selectedModulePosition);\n            }\n          }\n        }\n      }\n    });\n  });\n\n  return [newGridArray, newContourGridArray, newZoneGridArray, newModulePositionGridArray];\n};\n\nexport const updateGridCellValue = (currentValue, selectedToolbarItem) => {\n  switch (selectedToolbarItem) {\n    case \"toggle\":\n      return currentValue === \"1\" ? GRID_CELL_INACTIVE : GRID_CELL_ACTIVE;\n    case \"add\":\n      return GRID_CELL_ACTIVE;\n    case \"remove\":\n      return GRID_CELL_INACTIVE;\n    default:\n      return currentValue;\n  }\n};\n\nexport const validContourModification = (\n  gridArray,\n  contourGridArray,\n  row,\n  column,\n  selectedToolbarItem,\n  paintDirection,\n) => {\n  const currentContourValue = contourGridArray[row][column];\n\n  switch (selectedToolbarItem) {\n    case \"toggle\":\n      if (cellHasContourInDirection(currentContourValue, paintDirection)) {\n        return cellHasContourInDirection(currentContourValue, paintDirection);\n      } else {\n        return isContourModificationValid(gridArray, row, column, paintDirection);\n      }\n    case \"add\":\n      // already has contour on that side\n      if (cellHasContourInDirection(currentContourValue, paintDirection)) return false;\n\n      return isContourModificationValid(gridArray, row, column, paintDirection);\n    case \"remove\":\n      return cellHasContourInDirection(currentContourValue, paintDirection);\n  }\n};\n\nconst cellHasContourInDirection = (currentValue, paintDirection) => {\n  let isWest = isContourWest(currentValue);\n  let isEast = isContourEast(currentValue);\n  let isSouth = isContourSouth(currentValue);\n\n  return (\n    (paintDirection === CONTOUR_DIRECTION_WEST && isWest) ||\n    (paintDirection === CONTOUR_DIRECTION_SOUTH && isSouth) ||\n    (paintDirection === CONTOUR_DIRECTION_EAST && isEast)\n  );\n};\n\nconst isContourModificationValid = (gridArray, row, column, paintDirection) => {\n  let neighborRow = row;\n  let neighborColumn = column;\n\n  switch (paintDirection) {\n    case CONTOUR_DIRECTION_WEST:\n      neighborColumn = column - 1;\n      break;\n    case CONTOUR_DIRECTION_SOUTH:\n      neighborRow = row + 1;\n      break;\n    case CONTOUR_DIRECTION_EAST:\n      neighborColumn = column + 1;\n      break;\n  }\n\n  if (isBeyondEdge(gridArray, neighborRow, neighborColumn)) return true;\n\n  const neighbor = gridArray[neighborRow][neighborColumn];\n  return neighbor === GRID_CELL_INACTIVE;\n};\n\nconst isBeyondEdge = (gridArray, neighborRow, neighborColumn) => {\n  if (neighborRow < 0 || neighborColumn < 0) return true;\n\n  // off the bottom of the rows\n  if (neighborRow >= gridArray.length) return true;\n\n  // all rows have the same number of columns, so just check against the first\n  return neighborColumn >= gridArray[0].length;\n};\n\nexport const updateContourGridCellValue = (currentValue, selectedToolbarItem, paintDirection) => {\n  let isWest = isContourWest(currentValue);\n  let isEast = isContourEast(currentValue);\n  let isSouth = isContourSouth(currentValue);\n\n  switch (selectedToolbarItem) {\n    case \"toggle\":\n      isWest = paintDirection === CONTOUR_DIRECTION_WEST ? !isWest : isWest;\n      isEast = paintDirection === CONTOUR_DIRECTION_EAST ? !isEast : isEast;\n      isSouth = paintDirection === CONTOUR_DIRECTION_SOUTH ? !isSouth : isSouth;\n      break;\n    case \"add\":\n      isWest = paintDirection === CONTOUR_DIRECTION_WEST ? true : isWest;\n      isEast = paintDirection === CONTOUR_DIRECTION_EAST ? true : isEast;\n      isSouth = paintDirection === CONTOUR_DIRECTION_SOUTH ? true : isSouth;\n      break;\n    case \"remove\":\n      isWest = paintDirection === CONTOUR_DIRECTION_WEST ? false : isWest;\n      isEast = paintDirection === CONTOUR_DIRECTION_EAST ? false : isEast;\n      isSouth = paintDirection === CONTOUR_DIRECTION_SOUTH ? false : isSouth;\n      break;\n  }\n  return contourCodeGenerator(isWest, isEast, isSouth);\n};\n\nexport const gridIsCropable = (gridArray) => {\n  const rowLength = gridArray[0].length - 1;\n  const columnLength = gridArray.length - 1;\n\n  const borderSets = {\n    topRow: gridArray[0],\n    bottomRow: gridArray[columnLength],\n    leftColumn: gridArray.map((r) => r[0]),\n    rightColumn: gridArray.map((r) => r[rowLength]),\n  };\n\n  return Object.values(borderSets).some((borderSet) => borderSet.every((c) => c === EMPTY_CHAR));\n};\n\nexport const clearIllegalContourInAdjacentCells = (contourGridArray, row, column) => {\n  if (!isBeyondEdge(contourGridArray, row - 1, column)) {\n    clearContour(contourGridArray, row - 1, column, CONTOUR_DIRECTION_SOUTH);\n  }\n\n  if (!isBeyondEdge(contourGridArray, row, column - 1)) {\n    clearContour(contourGridArray, row, column - 1, CONTOUR_DIRECTION_EAST);\n  }\n\n  if (!isBeyondEdge(contourGridArray, row, column + 1)) {\n    clearContour(contourGridArray, row, column + 1, CONTOUR_DIRECTION_WEST);\n  }\n};\n\nconst clearContour = (contourGridArray, row, column, paintDirection) => {\n  const currentValue = contourGridArray[row][column];\n  contourGridArray[row][column] = updateContourGridCellValue(currentValue, \"remove\", paintDirection);\n};\n\nexport const calculateCrop = (gridArray) => {\n  const [columnStartIndex, columnStopIndex] = cropColumnsStartAndStopIndexes(gridArray);\n  const [rowStartIndex, rowStopIndex] = firstAndLastIndexesForGridString(convertRowsWithPanelsToGridString(gridArray));\n  return { rowStartIndex, rowStopIndex, columnStartIndex, columnStopIndex };\n};\n\nexport const cropGrid = (gridArray, cropRowsAndColumns) => {\n  const croppedGridArray = cropRows(cropColumns(gridArray, cropRowsAndColumns), cropRowsAndColumns);\n  return croppedGridArray.length === 0 ? gridArray : croppedGridArray;\n};\n\nconst cropColumns = (gridArray, cropRowsAndColumns) => {\n  const { columnStartIndex, columnStopIndex } = cropRowsAndColumns;\n  return gridArray.map((row) => row.slice(columnStartIndex, columnStopIndex + 1));\n};\n\nconst cropColumnsStartAndStopIndexes = (gridArray) => {\n  const firstIndexes = [];\n  const lastIndexes = [];\n\n  gridArray.forEach((row) => {\n    const [firstIndex, lastIndex] = firstAndLastIndexesForGridString(row.join(\"\"));\n    if (firstIndex !== -1) firstIndexes.push(firstIndex);\n    if (lastIndex !== -1) lastIndexes.push(lastIndex);\n  });\n\n  return [Math.min(...firstIndexes), Math.max(...lastIndexes)];\n};\n\nconst EMPTY_CHAR = \"0\";\nconst NON_EMPTY_CHAR = \"1\";\n\nconst firstAndLastIndexesForGridString = (gridString) => {\n  const firstIndex = gridString.indexOf(NON_EMPTY_CHAR);\n  const lastIndex = gridString.lastIndexOf(NON_EMPTY_CHAR);\n  return [firstIndex, lastIndex];\n};\n\nconst cropRows = (gridArray, cropRowsAndColumns) => {\n  const { rowStartIndex, rowStopIndex } = cropRowsAndColumns;\n  return gridArray.slice(rowStartIndex, rowStopIndex + 1);\n};\n\nconst convertRowsWithPanelsToGridString = (gridArray) => {\n  return gridArray.map((row) => (row.some((ri) => ri === GRID_CELL_ACTIVE) ? NON_EMPTY_CHAR : EMPTY_CHAR)).join(\"\");\n};\n\nexport const clearGrid = (gridArray, fillValue = GRID_CELL_INACTIVE) => {\n  return gridArray.map((row) => row.map((_) => fillValue));\n};\n\nexport const shiftPanelsOnGrid = (gridArray, direction, fillValue = GRID_CELL_INACTIVE) => {\n  if (direction === \"left\") {\n    return gridArray.map((row) => [...row, fillValue].slice(1));\n  }\n\n  if (direction === \"right\") {\n    return gridArray.map((row) => [fillValue, ...row].slice(0, -1));\n  }\n\n  const rowLength = gridArray[0].length;\n  const blankRow = Array(rowLength).fill(fillValue);\n\n  if (direction === \"up\") {\n    return [...gridArray, blankRow].slice(1);\n  }\n\n  if (direction === \"down\") {\n    return [blankRow, ...gridArray].slice(0, -1);\n  }\n\n  return gridArray;\n};\n\nexport const invalidContourDesign = (gridArray, contourGridArray) => {\n  for (let row = 0; row < gridArray.length; row++) {\n    for (let column = 0; column < gridArray[row].length; column++) {\n      if (gridArray[row][column] === GRID_CELL_INACTIVE && contourGridArray[row][column] !== GRID_CELL_INACTIVE) {\n        return true;\n      }\n    }\n  }\n  return false;\n};\n", "export function getCritterGuardDirections(gridArray, row, column) {\n  //                   0    1    2    3\n  //                   N    E    S    W\n  const directions = [\"0\", \"0\", \"0\", \"0\"];\n\n  const currentCell = gridArray[row][column];\n  if (currentCell === \"0\") return directions;\n\n  if (row === 0) {\n    // First row\n    directions[0] = \"1\";\n  } else if (row === gridArray.length - 1) {\n    // Last row\n    directions[2] = \"1\";\n  }\n\n  if (gridArray[row - 1] && gridArray[row - 1][column] === \"0\") {\n    // Previous row's cell is off\n    directions[0] = \"1\";\n  }\n\n  if (gridArray[row + 1] && gridArray[row + 1][column] === \"0\") {\n    // Next row's cell is off\n    directions[2] = \"1\";\n  }\n\n  if (column === 0) {\n    // First column\n    directions[3] = \"1\";\n  } else if (column === gridArray[row].length - 1) {\n    // Last column\n    directions[1] = \"1\";\n  }\n\n  if (gridArray[row][column - 1] && gridArray[row][column - 1] === \"0\") {\n    // Previous column's cell is off\n    directions[3] = \"1\";\n  }\n\n  if (gridArray[row][column + 1] && gridArray[row][column + 1] === \"0\") {\n    // Next column's cell is off\n    directions[1] = \"1\";\n  }\n\n  return directions;\n}\n", "import React from \"react\";\nimport PropTypes from \"prop-types\";\n\nimport GridNumber from \"./GridNumber\";\n\nfunction GridNumbers({ numbers }) {\n  return numbers.map((numbersArray) => {\n    return numbersArray.map((n) => (\n      <GridNumber key={`${n.x}${n.y}`} number={n.number} height={n.height} width={n.width} x={n.x} y={n.y} />\n    ));\n  });\n}\n\nGridNumbers.propTypes = {\n  numbers: PropTypes.arrayOf(\n    PropTypes.arrayOf(\n      PropTypes.shape({\n        x: PropTypes.number.isRequired,\n        y: PropTypes.number.isRequired,\n        height: PropTypes.number.isRequired,\n        width: PropTypes.number.isRequired,\n        number: PropTypes.number.isRequired,\n      }),\n    ),\n  ),\n};\n\nexport default React.memo(GridNumbers);\n", "import React from \"react\";\nimport PropTypes from \"prop-types\";\n\nfunction GridNumber({ height, width, x, y, number }) {\n  const styles = {\n    height: `${height}px`,\n    width: `${width}px`,\n    left: `${x}px`,\n    top: `${y}px`,\n  };\n\n  return (\n    <div className=\"graphical-tool__grid-cell-number no-select\" style={styles}>\n      <div>{number}</div>\n    </div>\n  );\n}\n\nGridNumber.propTypes = {\n  number: PropTypes.number.isRequired,\n  height: PropTypes.number.isRequired,\n  width: PropTypes.number.isRequired,\n  x: PropTypes.number.isRequired,\n  y: PropTypes.number.isRequired,\n};\n\nexport default React.memo(GridNumber);\n", "import React from \"react\";\nimport PropTypes from \"prop-types\";\n\nimport GridTools from \"./GridTools\";\nimport ModulePositionTools from \"./ModulePositionTools\";\nimport ZoneTools from \"./ZoneTools\";\nimport GridRowsAndColumns from \"../GridRowsAndColumns\";\nimport ToggleSwitchWithLabel from \"../../ToggleSwitchWithLabel\";\nimport { GRID_CELL_ACTIVE, GRID_CELL_INACTIVE } from \"../helpers/grid-helper\";\nimport InfoPopupLink from \"../../InfoPopupLink\";\n\nfunction Toolbar({\n  askToSaveWithCropOrNot,\n  closeSaveOptionsPopup,\n  columns,\n  needsSaving,\n  onChangeActiveToolbarItem,\n  onClearGrid,\n  onColumnsChange,\n  onColumnsFieldValueChange,\n  onCropGrid,\n  onRowsChange,\n  onRowsFieldValueChange,\n  onSave,\n  onShiftPanelsOnGrid,\n  rows,\n  saving,\n  saveWithOption,\n  selectedToolbarItem = \"add\",\n  showDimensionCrosshairs,\n  onToggleDimensionCrosshairs,\n  onToggleSnapDimensionCrosshairs,\n  snapDimensionCrosshairs,\n  expandable,\n  onToggleExpand,\n  isExpanded,\n  gridArray,\n  editorMode,\n  contourPaintMode,\n  handleContourPaintModeChange,\n  isRailOrientationNs,\n  railPlatform,\n  hiddenEndClamp,\n  contourEastWestAvailable,\n  editableGrid,\n  arrayEditingAllowed = false,\n  contourEditingAllowed = false,\n  zonePaintingAllowed = false,\n  selectedZone,\n  onZoneSelected,\n  modulePositionPaintingAllowed = false,\n  selectedModulePosition,\n  onModulePositionSelected,\n  critterGuardDisplayAllowed,\n  projectType,\n  isOpenSolar,\n}) {\n  const gridHasLoaded = gridArray[0].length > 0;\n  let hasAnySelectedCells = false;\n  let moduleCount = 0;\n  gridArray.forEach((row) => {\n    row.forEach((column) => {\n      moduleCount += column === GRID_CELL_ACTIVE ? 1 : 0;\n      if (column === GRID_CELL_ACTIVE) hasAnySelectedCells = true;\n    });\n  });\n\n  const transposedGrid = gridArray[0].map((_, i) => gridArray.map((row) => row[i]));\n  const hasAllZeroColumn = transposedGrid.some((column) => column.every((element) => element === \"0\"));\n\n  let isValidGrid = true;\n\n  if ((projectType === \"GB4\" && hasAllZeroColumn) || !hasAnySelectedCells) {\n    isValidGrid = false;\n  }\n\n  return (\n    <div className=\"graphical-tool__toolbar\" data-testid=\"toolbar\">\n      {isOpenSolar && !arrayEditingAllowed && contourEditingAllowed && (\n        <div className=\"ir-alert__alerts-group mb-4\">\n          <div className=\"ir-alert ir-alert--warning\">\n            Note that if you add Contour to this array and then change the array in OpenSolar the Contour you've added\n            will be removed and will need to be added again.\n          </div>\n        </div>\n      )}\n      <div className=\"graphical-tool__toolbar__row\">\n        {(arrayEditingAllowed || contourEditingAllowed || critterGuardDisplayAllowed) && (\n          <>\n            <GridTools\n              selectedToolbarItem={selectedToolbarItem}\n              onChangeActiveToolbarItem={onChangeActiveToolbarItem}\n              onClearGrid={onClearGrid}\n              saving={saving}\n              saveWithOption={saveWithOption}\n              onSave={onSave}\n              onShiftPanelsOnGrid={onShiftPanelsOnGrid}\n              needsSaving={needsSaving}\n              askToSaveWithCropOrNot={askToSaveWithCropOrNot}\n              closeSaveOptionsPopup={closeSaveOptionsPopup}\n              editorMode={editorMode}\n              contourPaintMode={contourPaintMode}\n              handleContourPaintModeChange={handleContourPaintModeChange}\n              isRailOrientationNs={isRailOrientationNs}\n              railPlatform={railPlatform}\n              hiddenEndClamp={hiddenEndClamp}\n              contourEastWestAvailable={contourEastWestAvailable}\n              editableGrid={editableGrid}\n              isValidGrid={isValidGrid}\n            />\n            <GridRowsAndColumns\n              columns={columns}\n              rows={rows}\n              onRowsChange={onRowsChange}\n              onColumnsChange={onColumnsChange}\n              onRowsFieldValueChange={onRowsFieldValueChange}\n              onColumnsFieldValueChange={onColumnsFieldValueChange}\n              onCropGrid={onCropGrid}\n              editableGrid={editableGrid}\n              expandable={expandable}\n              onToggleExpand={onToggleExpand}\n              isExpanded={isExpanded}\n              projectType={projectType}\n            />\n          </>\n        )}\n      </div>\n      <div\n        className={`graphical-tool__toolbar__row ${\n          arrayEditingAllowed ? \"\" : \"graphical-tool__toolbar__row--centered\"\n        }`}\n      >\n        {zonePaintingAllowed && <ZoneTools selectedZone={selectedZone} onZoneSelected={onZoneSelected} />}\n        {modulePositionPaintingAllowed && (\n          <ModulePositionTools\n            selectedModulePosition={selectedModulePosition}\n            onModulePositionSelected={onModulePositionSelected}\n          />\n        )}\n        <div className=\"graphical-tool__toolbar__dimension-group\">\n          <label className=\"graphical-tool__toolbar__group-label\">\n            Dimensions <InfoPopupLink dialogIdentifier=\"graphical-editor-dimension-crosshairs\" />\n          </label>\n          <div className=\"graphical-tool__toolbar__dimension-group__toggles\">\n            <ToggleSwitchWithLabel\n              on={showDimensionCrosshairs}\n              onClick={onToggleDimensionCrosshairs}\n              label=\"Crosshairs\"\n            />\n            {showDimensionCrosshairs && (\n              <ToggleSwitchWithLabel\n                on={snapDimensionCrosshairs}\n                onClick={onToggleSnapDimensionCrosshairs}\n                label=\"Snap crosshairs\"\n              />\n            )}\n          </div>\n        </div>\n        {gridHasLoaded && !hasAnySelectedCells && (\n          <div className=\"graphical-tool__toolbar__use-draw-tools-message\">\n            <i className=\"fas fa-arrow-up\" />\n            Use the grid tools to add modules to the grid\n            <InfoPopupLink dialogIdentifier=\"use-grid-tools-howto-dialog-pr\" />\n          </div>\n        )}\n        {projectType === \"GB4\" && hasAnySelectedCells && hasAllZeroColumn && (\n          <div className=\"graphical-tool__toolbar__use-draw-tools-message\">\n            <i className=\"fas fa-exclamation-triangle me-3\" />\n            You need to add at least one module to each column\n          </div>\n        )}\n        <div className=\"graphical-tool__toolbar__module-count\">\n          <label className=\"graphical-tool__toolbar__group-label\">Modules</label>\n          <div>Count: {moduleCount}</div>\n        </div>\n      </div>\n    </div>\n  );\n}\n\nToolbar.propTypes = {\n  askToSaveWithCropOrNot: PropTypes.bool.isRequired,\n  closeSaveOptionsPopup: PropTypes.func.isRequired,\n  columns: PropTypes.string.isRequired,\n  needsSaving: PropTypes.bool.isRequired,\n  onChangeActiveToolbarItem: PropTypes.func.isRequired,\n  onClearGrid: PropTypes.func.isRequired,\n  onColumnsChange: PropTypes.func.isRequired,\n  onColumnsFieldValueChange: PropTypes.func.isRequired,\n  onCropGrid: PropTypes.func.isRequired,\n  onRowsChange: PropTypes.func.isRequired,\n  onRowsFieldValueChange: PropTypes.func.isRequired,\n  onSave: PropTypes.func.isRequired,\n  onShiftPanelsOnGrid: PropTypes.func.isRequired,\n  onToggleDimensionCrosshairs: PropTypes.func.isRequired,\n  onToggleSnapDimensionCrosshairs: PropTypes.func.isRequired,\n  rows: PropTypes.string.isRequired,\n  saveWithOption: PropTypes.func.isRequired,\n  saving: PropTypes.bool.isRequired,\n  selectedToolbarItem: PropTypes.oneOf([\"toggle\", \"add\", \"remove\"]),\n  showDimensionCrosshairs: PropTypes.bool.isRequired,\n  snapDimensionCrosshairs: PropTypes.bool.isRequired,\n  expandable: PropTypes.bool,\n  onToggleExpand: PropTypes.func,\n  isExpanded: PropTypes.bool,\n  gridArray: PropTypes.arrayOf(PropTypes.arrayOf(PropTypes.oneOf([GRID_CELL_ACTIVE, GRID_CELL_INACTIVE]))),\n  editableGrid: PropTypes.bool.isRequired,\n  arrayEditingAllowed: PropTypes.bool,\n  contourEditingAllowed: PropTypes.bool,\n  zonePaintingAllowed: PropTypes.bool,\n  selectedZone: PropTypes.string,\n  onZoneSelected: PropTypes.func,\n  modulePositionPaintingAllowed: PropTypes.bool,\n  selectedModulePosition: PropTypes.string,\n  onModulePositionSelected: PropTypes.func,\n  railPlatform: PropTypes.string.isRequired,\n  projectType: PropTypes.string.isRequired,\n  isOpenSolar: PropTypes.bool,\n};\n\nexport default React.memo(Toolbar);\n", "import React from \"react\";\nimport PropTypes from \"prop-types\";\n\nimport ToolbarBtn from \"./ToolbarBtn\";\nimport SaveWithCropPopup from \"./SaveWithCropPopup\";\nimport InfoPopupLink from \"../../InfoPopupLink\";\nimport { isContourEast, isContourSouth, isContourWest } from \"../../../helpers/contour\";\n\nimport {\n  GRAPHICAL_TOOL_EDITOR_MODE_CONTOUR,\n  GRAPHICAL_TOOL_EDITOR_MODE_LAYOUT,\n} from \"../../../helpers/graphical-tool-helpers\";\n\nfunction GridTools({\n  selectedToolbarItem,\n  onChangeActiveToolbarItem,\n  onClearGrid,\n  saving,\n  saveWithOption,\n  onSave,\n  onShiftPanelsOnGrid,\n  needsSaving,\n  askToSaveWithCropOrNot,\n  closeSaveOptionsPopup,\n  editorMode,\n  contourPaintMode,\n  handleContourPaintModeChange,\n  isRailOrientationNs,\n  railPlatform,\n  hiddenEndClamp,\n  contourEastWestAvailable,\n  editableGrid,\n  isValidGrid,\n}) {\n  const onClickLeft = () => onShiftPanelsOnGrid(\"left\");\n  const onClickRight = () => onShiftPanelsOnGrid(\"right\");\n  const onClickDown = () => onShiftPanelsOnGrid(\"down\");\n  const onClickUp = () => onShiftPanelsOnGrid(\"up\");\n\n  const allowSouthContour = !isRailOrientationNs || hiddenEndClamp;\n  const allowEastWestContour = (isRailOrientationNs || hiddenEndClamp) && contourEastWestAvailable;\n\n  const isModeSouth = isContourSouth(contourPaintMode);\n  const isModeEast = isContourEast(contourPaintMode);\n  const isModeWest = isContourWest(contourPaintMode);\n\n  const contourDisabledMessage = \"Disabled: requires hidden end clamp\";\n\n  return (\n    <div className=\"ir-form graphical-tool__toolbar__buttons-container\">\n      <div className=\"graphical-tool__toolbar__button-group\">\n        <div>\n          <label>\n            Grid tools <InfoPopupLink dialogIdentifier=\"info-popup-pr-graphical-tool-grid-tools\" />\n          </label>\n        </div>\n        <ToolbarBtn\n          icon=\"pencil-alt\"\n          text=\"Add\"\n          selectedToolbarItem={selectedToolbarItem}\n          onClick={onChangeActiveToolbarItem}\n        />\n        <ToolbarBtn\n          icon=\"eraser\"\n          text=\"Remove\"\n          selectedToolbarItem={selectedToolbarItem}\n          onClick={onChangeActiveToolbarItem}\n        />\n        <ToolbarBtn\n          icon=\"toggle-on\"\n          text=\"Toggle\"\n          selectedToolbarItem={selectedToolbarItem}\n          onClick={onChangeActiveToolbarItem}\n        />\n      </div>\n      <ToolbarBtn icon=\"broom\" text=\"Clear all\" onClick={onClearGrid} />\n      {editorMode === GRAPHICAL_TOOL_EDITOR_MODE_LAYOUT && (\n        <div className=\"graphical-tool__toolbar__button-group\">\n          <div>\n            <label>\n              Shift <InfoPopupLink dialogIdentifier=\"info-popup-pr-graphical-tool-shift\" />\n            </label>\n          </div>\n          <ToolbarBtn icon=\"arrow-left\" text=\"Shift left\" iconOnly onClick={onClickLeft} showTooltip />\n          <ToolbarBtn icon=\"arrow-right\" text=\"Shift right\" iconOnly onClick={onClickRight} showTooltip />\n          <ToolbarBtn icon=\"arrow-down\" text=\"Shift down\" iconOnly onClick={onClickDown} showTooltip />\n          <ToolbarBtn icon=\"arrow-up\" text=\"Shift up\" iconOnly onClick={onClickUp} showTooltip />\n        </div>\n      )}\n      {editorMode === GRAPHICAL_TOOL_EDITOR_MODE_CONTOUR && contourEastWestAvailable && (\n        <div className=\"graphical-tool__toolbar__button-group\">\n          <div>\n            <label>\n              Contour <InfoPopupLink dialogIdentifier=\"info-popup-pr-graphical-tool-contour\" />\n            </label>\n          </div>\n          <ToolbarBtn\n            icon=\"border-bottom\"\n            text=\"South\"\n            iconOnly\n            selectedToolbarItem={isModeSouth ? \"south\" : \"\"}\n            onClick={() => {\n              handleContourPaintModeChange(\"south\");\n            }}\n            showTooltip\n            disabled={!allowSouthContour}\n            disabledTooltipMessage={contourDisabledMessage}\n          />\n          <ToolbarBtn\n            icon=\"border-left\"\n            text=\"West\"\n            iconOnly\n            selectedToolbarItem={isModeWest ? \"west\" : \"\"}\n            onClick={() => {\n              handleContourPaintModeChange(\"west\");\n            }}\n            showTooltip\n            disabled={!allowEastWestContour}\n            disabledTooltipMessage={contourDisabledMessage}\n          />\n          <ToolbarBtn\n            icon=\"border-right\"\n            text=\"East\"\n            iconOnly\n            selectedToolbarItem={isModeEast ? \"east\" : \"\"}\n            onClick={() => {\n              handleContourPaintModeChange(\"east\");\n            }}\n            showTooltip\n            disabled={!allowEastWestContour}\n            disabledTooltipMessage={contourDisabledMessage}\n          />\n        </div>\n      )}\n      {needsSaving && isValidGrid && (\n        <ToolbarBtn icon=\"check\" text=\"Save\" showSpinner={saving} onClick={onSave} preventDoubleClick />\n      )}\n      {editableGrid && askToSaveWithCropOrNot && (\n        <SaveWithCropPopup closeSaveOptionsPopup={closeSaveOptionsPopup} saveWithOption={saveWithOption} />\n      )}\n    </div>\n  );\n}\n\nGridTools.propTypes = {\n  selectedToolbarItem: PropTypes.string.isRequired,\n  onChangeActiveToolbarItem: PropTypes.func.isRequired,\n  onClearGrid: PropTypes.func.isRequired,\n  saving: PropTypes.bool.isRequired,\n  saveWithOption: PropTypes.func.isRequired,\n  onSave: PropTypes.func.isRequired,\n  onShiftPanelsOnGrid: PropTypes.func.isRequired,\n  needsSaving: PropTypes.bool.isRequired,\n  askToSaveWithCropOrNot: PropTypes.bool.isRequired,\n  closeSaveOptionsPopup: PropTypes.func.isRequired,\n  editableGrid: PropTypes.bool.isRequired,\n  railPlatform: PropTypes.string.isRequired,\n  isValidGrid: PropTypes.bool.isRequired,\n  hiddenEndClamp: PropTypes.bool,\n  contourEastWestAvailable: PropTypes.bool,\n};\n\nexport default React.memo(GridTools);\n", "import React, { useMemo } from \"react\";\nimport PropTypes from \"prop-types\";\nimport debounce from \"lodash/debounce\";\n\nconst ToolbarBtn = ({\n  icon,\n  text = \"\",\n  selectedToolbarItem = \"NONE\",\n  onClick,\n  showSpinner = false,\n  iconOnly = false,\n  preventDoubleClick = false,\n  showTooltip = false,\n  disabled = false,\n  disabledTooltipMessage = \"disabled\",\n}) => {\n  const cssName = text.toLowerCase().replace(/\\s/, \"-\");\n  const bemBase = \"graphical-tool__toolbar__button\";\n  const classNames = [bemBase, `${bemBase}--${cssName}`];\n  if (disabled) classNames.push(`${bemBase}--disabled`);\n  if (text.toLowerCase() === selectedToolbarItem) classNames.push(`${bemBase}--active`);\n  if (showSpinner) classNames.push(`${bemBase}--spinning`);\n  if (iconOnly) classNames.push(`${bemBase}--icon-only`);\n\n  const eventArgument = text.toLowerCase().replace(\" \", \"-\");\n\n  const debouncedOnBtnClick = useMemo(() => {\n    return debounce(\n      () => {\n        onClick(eventArgument);\n      },\n      preventDoubleClick ? 500 : 0,\n      { leading: true, trailing: false },\n    );\n  }, [preventDoubleClick, onClick, eventArgument]);\n\n  const onBtnClick = () => {\n    if (!disabled && !showSpinner) debouncedOnBtnClick();\n  };\n\n  return (\n    <button\n      className={classNames.join(\" \")}\n      onClick={onBtnClick}\n      type=\"button\"\n      data-controller={showTooltip ? \"components--ir-tooltip\" : undefined}\n      data-components--ir-tooltip-content-value={!iconOnly ? \"\" : text}\n      data-components--ir-tooltip-show-message-if-disabled-value={disabled || undefined}\n      data-components--ir-tooltip-disabled-message-value={disabled ? disabledTooltipMessage : undefined}\n    >\n      {showSpinner && <i className=\"spinner\" />}\n      {!showSpinner && <i className={`fas fa-${icon}`} />}\n      {!iconOnly && text}\n    </button>\n  );\n};\n\nToolbarBtn.propTypes = {\n  icon: PropTypes.string.isRequired,\n  text: PropTypes.string,\n  selectedToolbarItem: PropTypes.string,\n  onClick: PropTypes.func.isRequired,\n  showSpinner: PropTypes.bool,\n  iconOnly: PropTypes.bool,\n  preventDoubleClick: PropTypes.bool,\n  disabled: PropTypes.bool,\n  disabledTooltipMessage: PropTypes.string,\n  showTooltip: PropTypes.bool,\n};\n\nexport default React.memo(ToolbarBtn);\n", "import React from \"react\";\nimport PropTypes from \"prop-types\";\n\nimport Button from \"../../Button\";\n\nfunction SaveWithCropPopup({ closeSaveOptionsPopup, saveWithOption }) {\n  return (\n    <div className=\"graphical-tool__toolbar__save-options\">\n      <a href=\"#\" onClick={closeSaveOptionsPopup} className=\"graphical-tool__toolbar__save-options__close-link\">\n        &times;\n      </a>\n      <h4>Save</h4>\n      <Button\n        onButtonClick={() => {\n          saveWithOption(\"crop\");\n        }}\n        text=\"Crop first\"\n        actionStyle=\"green\"\n        icon=\"crop\"\n      />\n      <Button onButtonClick={saveWithOption} text=\"As is\" icon=\"check\" />\n    </div>\n  );\n}\n\nSaveWithCropPopup.propTypes = {\n  closeSaveOptionsPopup: PropTypes.func.isRequired,\n  saveWithOption: PropTypes.func.isRequired,\n};\n\nexport default React.memo(SaveWithCropPopup);\n", "import React, { Component } from \"react\";\nimport PropTypes from \"prop-types\";\n\nclass Button extends Component {\n  static propTypes = {\n    text: PropTypes.string.isRequired,\n    onButtonClick: PropTypes.func.isRequired,\n    type: PropTypes.oneOf([\"button\", \"submit\"]),\n    actionStyle: PropTypes.oneOf([\"green\", \"blue\", \"gray\"]),\n    icon: PropTypes.string,\n    iconPosition: PropTypes.oneOf([\"prepend\", \"append\"]),\n    disabled: PropTypes.bool,\n    showSpinner: PropTypes.bool,\n  };\n\n  static defaultProps = {\n    iconPosition: \"prepend\",\n    actionStyle: \"gray\",\n    type: \"button\",\n    disabled: false,\n    showSpinner: false,\n  };\n\n  onButtonClick = (event) => {\n    if (this.props.showSpinner || this.props.disabled) {\n      event.preventDefault();\n    } else {\n      this.props.onButtonClick(event);\n    }\n  };\n\n  renderIconAndSpinnerDiv() {\n    const { icon } = this.props;\n\n    const spinnerDiv = (\n      <div className=\"spinner\">\n        <div className=\"spinner-inner\" />\n      </div>\n    );\n\n    if (!icon) {\n      return spinnerDiv;\n    }\n\n    return (\n      <span className=\"ir-btn__icon\">\n        {spinnerDiv}\n        <i className={`fa fa-${icon}`} data-testid=\"btn-icon\" />\n      </span>\n    );\n  }\n\n  render() {\n    const { text, type, icon, iconPosition, actionStyle, disabled, showSpinner, onButtonClick } = this.props;\n\n    const classNames = [\"ir-btn\", `ir-btn--${actionStyle}`];\n    if (icon) {\n      classNames.push(`ir-btn--icon-${iconPosition}`);\n    }\n    if (showSpinner) {\n      classNames.push(\"ir-btn--spinner-shown\");\n    }\n\n    return (\n      <button className={classNames.join(\" \")} type={type} disabled={disabled} onClick={onButtonClick}>\n        {(!icon || iconPosition === \"prepend\") && this.renderIconAndSpinnerDiv()}\n        <span className=\"ir-btn__text\">{text}</span>\n        {icon && iconPosition === \"append\" && this.renderIconAndSpinnerDiv()}\n      </button>\n    );\n  }\n}\n\nexport default Button;\n", "import React from \"react\";\nimport PropTypes from \"prop-types\";\n\nimport InfoPopupLink from \"../../InfoPopupLink\";\nimport { availableModulePositions, modulePositionLabel } from \"../helpers/module-position-helper\";\n\nconst BASE_CLASS = \"graphical-tool__toolbar__module-position-chip\";\n\nfunction ModulePositionTools({ selectedModulePosition, onModulePositionSelected }) {\n  return (\n    <div className=\"graphical-tool__toolbar__button-group graphical-tool__toolbar__module-position-tools\">\n      <div>\n        <label className=\"graphical-tool__toolbar__group-label\">\n          Module position <InfoPopupLink dialogIdentifier=\"info-popup-fr-graphical-tool-module-positions\" />\n        </label>\n      </div>\n      <div className=\"graphical-tool__toolbar__module-position-chips\">\n        {availableModulePositions().map((position) => {\n          const classNames = [BASE_CLASS];\n          if (selectedModulePosition === position) classNames.push(`${BASE_CLASS}--active`);\n\n          return (\n            <button\n              key={position}\n              type=\"button\"\n              className={classNames.join(\" \")}\n              onClick={() => onModulePositionSelected(position)}\n              data-testid={`module-position-chip-${position}`}\n            >\n              <span className=\"graphical-tool__toolbar__module-position-chip__label\">\n                {modulePositionLabel(position)}\n              </span>\n            </button>\n          );\n        })}\n      </div>\n    </div>\n  );\n}\n\nModulePositionTools.propTypes = {\n  selectedModulePosition: PropTypes.string.isRequired,\n  onModulePositionSelected: PropTypes.func.isRequired,\n};\n\nexport default React.memo(ModulePositionTools);\n", "import React from \"react\";\nimport PropTypes from \"prop-types\";\n\nimport InfoPopupLink from \"../../InfoPopupLink\";\nimport { availableZones, zoneColorFamily, zoneLabel } from \"../helpers/zone-helper\";\n\nconst BASE_CLASS = \"graphical-tool__toolbar__zone-chip\";\n\nfunction ZoneTools({ selectedZone, onZoneSelected }) {\n  return (\n    <div className=\"graphical-tool__toolbar__button-group graphical-tool__toolbar__zone-tools\">\n      <div>\n        <label className=\"graphical-tool__toolbar__group-label\">\n          Zones <InfoPopupLink dialogIdentifier=\"info-popup-fr-graphical-tool-zones\" />\n        </label>\n      </div>\n      <div className=\"graphical-tool__toolbar__zone-chips\">\n        {availableZones().map((zone) => {\n          const classNames = [BASE_CLASS, `${BASE_CLASS}--${zoneColorFamily(zone)}`];\n          if (selectedZone === zone) classNames.push(`${BASE_CLASS}--active`);\n\n          return (\n            <button\n              key={zone}\n              type=\"button\"\n              className={classNames.join(\" \")}\n              onClick={() => onZoneSelected(zone)}\n              data-testid={`zone-chip-${zone}`}\n            >\n              <span className=\"graphical-tool__toolbar__zone-chip__label\">{zoneLabel(zone)}</span>\n            </button>\n          );\n        })}\n      </div>\n    </div>\n  );\n}\n\nZoneTools.propTypes = {\n  selectedZone: PropTypes.string.isRequired,\n  onZoneSelected: PropTypes.func.isRequired,\n};\n\nexport default React.memo(ZoneTools);\n", "import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport Editable from \"./Editable\";\nimport ViewOnly from \"./ViewOnly\";\n\nfunction GridRowsAndColumns({\n  onCropGrid,\n  rows,\n  columns,\n  onRowsChange,\n  onRowsFieldValueChange,\n  onColumnsChange,\n  onColumnsFieldValueChange,\n  expandable,\n  onToggleExpand,\n  isExpanded,\n  editableGrid,\n  projectType,\n}) {\n  if (projectType === \"GB4\") return <></>;\n\n  return (\n    <div className=\"ir-form graphical-tool__grid-rows-and-columns ms-auto\">\n      <div className=\"row align-items-end\">\n        {editableGrid ? (\n          <Editable\n            onCropGrid={onCropGrid}\n            rows={rows}\n            columns={columns}\n            onRowsChange={onRowsChange}\n            onRowsFieldValueChange={onRowsFieldValueChange}\n            onColumnsChange={onColumnsChange}\n            onColumnsFieldValueChange={onColumnsFieldValueChange}\n            expandable={expandable}\n            onToggleExpand={onToggleExpand}\n            isExpanded={isExpanded}\n          />\n        ) : (\n          <ViewOnly rows={rows} columns={columns} />\n        )}\n      </div>\n    </div>\n  );\n}\n\nGridRowsAndColumns.propTypes = {\n  rows: PropTypes.string.isRequired,\n  columns: PropTypes.string.isRequired,\n  onRowsChange: PropTypes.func.isRequired,\n  onColumnsChange: PropTypes.func.isRequired,\n  onRowsFieldValueChange: PropTypes.func.isRequired,\n  onColumnsFieldValueChange: PropTypes.func.isRequired,\n  onCropGrid: PropTypes.func.isRequired,\n  expandable: PropTypes.bool,\n  onToggleExpand: PropTypes.func,\n  isExpanded: PropTypes.bool,\n  editableGrid: PropTypes.bool.isRequired,\n  projectType: PropTypes.string.isRequired,\n};\n\nexport default React.memo(GridRowsAndColumns);\n", "import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport TextField from \"../../TextField\";\nimport ToolbarBtn from \"../Toolbar/ToolbarBtn\";\nimport Column from \"./Column\";\nimport InfoPopupLink from \"../../InfoPopupLink\";\n\nconst Editable = ({\n  onCropGrid,\n  rows,\n  columns,\n  onRowsChange,\n  onRowsFieldValueChange,\n  onColumnsChange,\n  onColumnsFieldValueChange,\n  expandable,\n  onToggleExpand,\n  isExpanded,\n}) => (\n  <>\n    <div\n      className=\"ir-form graphical-tool__toolbar__button-group col-auto\"\n      style={{ paddingBottom: \"1rem\" }}\n      data-testid=\"editable\"\n    >\n      <div>\n        <label>Grid {expandable && <InfoPopupLink dialogIdentifier=\"info-popup-graphical-tool-height\" />}</label>\n      </div>\n      <ToolbarBtn icon=\"crop\" text=\"Crop\" onClick={onCropGrid} />\n      {expandable && (\n        <ToolbarBtn\n          icon={`long-arrow-alt-${isExpanded ? \"up\" : \"down\"}`}\n          text={isExpanded ? \"Contract\" : \"Expand\"}\n          onClick={onToggleExpand}\n        />\n      )}\n    </div>\n\n    <Column>\n      <TextField\n        label=\"Rows\"\n        id={null}\n        value={rows}\n        onScrollButtonClick={(amount) => {\n          onRowsChange(Number.parseInt(rows) + Number.parseInt(amount));\n        }}\n        onFieldBlur={onRowsChange}\n        onFieldPressEnter={onRowsChange}\n        onFieldChange={onRowsFieldValueChange}\n      />\n    </Column>\n    <Column>\n      <TextField\n        label=\"Columns\"\n        id={null}\n        value={columns}\n        onScrollButtonClick={(amount) => {\n          onColumnsChange(Number.parseInt(columns) + Number.parseInt(amount));\n        }}\n        onFieldBlur={onColumnsChange}\n        onFieldPressEnter={onColumnsChange}\n        onFieldChange={onColumnsFieldValueChange}\n      />\n    </Column>\n  </>\n);\n\nEditable.propTypes = {\n  rows: PropTypes.string.isRequired,\n  columns: PropTypes.string.isRequired,\n  onCropGrid: PropTypes.func.isRequired,\n  onRowsChange: PropTypes.func.isRequired,\n  onRowsFieldValueChange: PropTypes.func.isRequired,\n  onColumnsChange: PropTypes.func.isRequired,\n  onColumnsFieldValueChange: PropTypes.func.isRequired,\n  expandable: PropTypes.bool,\n  onToggleExpand: PropTypes.func,\n  isExpanded: PropTypes.bool,\n};\n\nexport default React.memo(Editable);\n", "import React, { Component } from \"react\";\nimport PropTypes from \"prop-types\";\nimport InfoPopupLink from \"../InfoPopupLink\";\n\nclass TextField extends Component {\n  static propTypes = {\n    value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,\n    id: PropTypes.string,\n    label: PropTypes.string,\n    typeLabel: PropTypes.string,\n    infoIconDialogIdentifier: PropTypes.string,\n    gridCols: PropTypes.number,\n    onScrollButtonClick: PropTypes.func,\n    onFieldChange: PropTypes.func.isRequired,\n    onFieldPressEnter: PropTypes.func,\n    onFieldBlur: PropTypes.func,\n    onKeyPress: PropTypes.func,\n    onKeyDown: PropTypes.func,\n    autoFocus: PropTypes.bool,\n  };\n\n  static defaultProps = {\n    onScrollButtonClick: undefined,\n    autoFocus: false,\n    onFieldChange: () => {},\n    onFieldPressEnter: () => {},\n    onFieldBlur: () => {},\n    onKeyDown: () => {},\n  };\n\n  onTextFieldChange = (event) => {\n    const value = event.target.value;\n    this.props.onTextFieldChange(value);\n  };\n\n  scrollClick = (event, amount) => {\n    if (event.shiftKey) {\n      amount = amount * 10;\n    }\n    this.props.onScrollButtonClick(amount);\n  };\n\n  renderScrollButtons() {\n    if (this.props.onScrollButtonClick === undefined) {\n      return \"\";\n    }\n    return (\n      <div className=\"input-group-append ir-number-scroll__container\">\n        <button onClick={(event) => this.scrollClick(event, 1)} className=\"ir-number-scroll__up\" type=\"button\">\n          <i className=\"fas fa-caret-up\" />\n        </button>\n        <button onClick={(event) => this.scrollClick(event, -1)} className=\"ir-number-scroll__down\" type=\"button\">\n          <i className=\"fas fa-caret-down\" />\n        </button>\n      </div>\n    );\n  }\n\n  renderInfoPopup() {\n    const { infoIconDialogIdentifier } = this.props;\n    if (!infoIconDialogIdentifier) return \"\";\n    return (\n      <>\n        {\" \"}\n        <InfoPopupLink dialogIdentifier={infoIconDialogIdentifier} />\n      </>\n    );\n  }\n\n  handleKeyPress = (event) => {\n    if (this.props.onKeyPress) {\n      this.props.onKeyPress(event);\n    } else {\n      if (event.key === \"Enter\") {\n        const value = event.target.value;\n        this.props.onFieldPressEnter(value);\n      }\n    }\n  };\n\n  handleFieldBlur = (event) => {\n    const value = event.target.value;\n    this.props.onFieldBlur(value);\n  };\n\n  handleFieldChange = (event) => {\n    const value = event.target.value;\n    this.props.onFieldChange(value);\n  };\n\n  get idFromLabel() {\n    return this.props.label.replace(/\\s/, \"_\").toLowerCase();\n  }\n\n  renderInput() {\n    const { id, value, autoFocus, onKeyDown } = this.props;\n\n    let inputId;\n    if (id !== null) inputId = id || this.idFromLabel;\n\n    return (\n      <>\n        <input\n          type=\"text\"\n          className=\"form-control\"\n          id={inputId}\n          value={value}\n          onChange={this.handleFieldChange}\n          onKeyPress={this.handleKeyPress}\n          onBlur={this.handleFieldBlur}\n          onKeyDown={onKeyDown}\n          autoFocus={autoFocus}\n        />\n        {this.renderScrollButtons()}\n        {this.renderTypeLabel()}\n      </>\n    );\n  }\n\n  get renderWithInputGroup() {\n    const { onScrollButtonClick, typeLabel } = this.props;\n    return onScrollButtonClick !== undefined || typeLabel !== undefined;\n  }\n\n  renderTypeLabel() {\n    const { typeLabel } = this.props;\n    if (!typeLabel) return \"\";\n    return (\n      <div className=\"input-group-append\">\n        <div className=\"input-group-text\">{typeLabel}</div>\n      </div>\n    );\n  }\n\n  renderInputInInputGroup() {\n    return <div className=\"input-group\">{this.renderInput()}</div>;\n  }\n\n  render() {\n    const { id, label, gridCols } = this.props;\n\n    const formGroupClasses = [\"form-group\"];\n    if (gridCols) {\n      formGroupClasses.push(`col-${gridCols}`);\n    }\n\n    return (\n      <div className={formGroupClasses.join(\" \")}>\n        {label && <label htmlFor={id}>{label}</label>}\n        {this.renderInfoPopup()}\n        {this.renderWithInputGroup && this.renderInputInInputGroup()}\n        {!this.renderWithInputGroup && this.renderInput()}\n      </div>\n    );\n  }\n}\n\nexport default TextField;\n", "import React from \"react\";\nimport PropTypes from \"prop-types\";\n\nconst Column = ({ children, style = {} }) => (\n  <div className=\"col-auto graphical-tool__grid-rows-and-columns__form-group\" style={style}>\n    {children}\n  </div>\n);\n\nColumn.propTypes = {\n  children: PropTypes.node.isRequired,\n  style: PropTypes.object,\n};\n\nexport default React.memo(Column);\n", "import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport Column from \"./Column\";\nimport DisplayField from \"../../DisplayField\";\n\nconst ViewOnly = ({ rows, columns }) => (\n  <div data-testid=\"view-only\" className=\"d-flex align-items-end\" style={{ position: \"relative\", right: \"-2rem\" }}>\n    <Column>\n      <DisplayField label=\"Rows\" value={`${rows}`} />\n    </Column>\n    <Column>\n      <DisplayField label=\"Columns\" value={`${columns}`} />\n    </Column>\n  </div>\n);\n\nViewOnly.propTypes = {\n  rows: PropTypes.string.isRequired,\n  columns: PropTypes.string.isRequired,\n};\n\nexport default React.memo(ViewOnly);\n", "import React from \"react\";\nimport PropTypes from \"prop-types\";\n\nconst DisplayField = ({ label, value }) => (\n  <div className=\"form-group\">\n    <label>{label}</label>\n    <div className=\"form-display-text\">{value}</div>\n  </div>\n);\n\nDisplayField.propTypes = {\n  label: PropTypes.string.isRequired,\n  value: PropTypes.string.isRequired,\n};\n\nexport default DisplayField;\n", "import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport ToggleSwitch from \"../ToggleSwitch\";\nimport InfoPopupLink from \"../InfoPopupLink\";\n\nfunction ToggleSwitchWithLabel({ on, onClick, label, infoPopupIdentifier = undefined }) {\n  const classNames = [\"toggle-field__container\"];\n  if (on) classNames.push(\"toggle-field__container--on\");\n\n  return (\n    <div className={classNames.join(\" \")}>\n      <label>\n        <div className=\"d-flex\">\n          <ToggleSwitch on={on} onClick={onClick} />\n          <span className=\"toggle-field__container__label-text\">{label}</span>\n        </div>\n      </label>\n      {infoPopupIdentifier && (\n        <div className=\"toggle-field__info-popup-container\">\n          <InfoPopupLink dialogIdentifier={infoPopupIdentifier} />\n        </div>\n      )}\n    </div>\n  );\n}\n\nToggleSwitchWithLabel.propTypes = {\n  on: PropTypes.bool.isRequired,\n  onClick: PropTypes.func.isRequired,\n  label: PropTypes.string.isRequired,\n  infoPopupIdentifier: PropTypes.string,\n};\n\nexport default React.memo(ToggleSwitchWithLabel);\n", "import React from \"react\";\nimport PropTypes from \"prop-types\";\n\nfunction ToggleSwitch({ on, onClick }) {\n  const handleChange = (event) => onClick(event.target.checked);\n\n  const classNames = [\"toggle-field\", `toggle-field--${on ? \"on\" : \"off\"}`];\n\n  return (\n    <label className={classNames.join(\" \")} data-testid=\"toggleSwitch\">\n      <input className=\"toggle-field__input\" type=\"checkbox\" checked={on} onChange={handleChange} />\n      <span className=\"toggle-field__slider\" />\n    </label>\n  );\n}\n\nToggleSwitch.propTypes = {\n  on: PropTypes.bool.isRequired,\n  onClick: PropTypes.func.isRequired,\n};\n\nexport default ToggleSwitch;\n", "import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport DimensionMarker from \"./DimensionMarker\";\n\nfunction DimensionMarkers({ markers }) {\n  return markers.map(\n    ({ label, dimension, orientation, x, y, width, height, compressedBeginning, compressedEnd }, i) => (\n      <DimensionMarker\n        key={i}\n        label={label}\n        dimension={dimension}\n        orientation={orientation}\n        x={x}\n        y={y}\n        width={width}\n        height={height}\n        compressedBeginning={compressedBeginning}\n        compressedEnd={compressedEnd}\n      />\n    ),\n  );\n}\n\nDimensionMarkers.propTypes = {\n  markers: PropTypes.arrayOf(\n    PropTypes.shape({\n      x: PropTypes.number.isRequired,\n      y: PropTypes.number.isRequired,\n      dimension: PropTypes.string.isRequired,\n      orientation: PropTypes.string.isRequired,\n      label: PropTypes.string.isRequired,\n      height: PropTypes.number,\n      width: PropTypes.number,\n      compressedBeginning: PropTypes.bool.isRequired,\n      compressedEnd: PropTypes.bool.isRequired,\n    }),\n  ),\n};\n\nexport default React.memo(DimensionMarkers);\n", "import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport ArrowLineEnd from \"./ArrowLineEnd\";\nimport CompressedIcon from \"./CompressedIcon\";\n\nfunction DimensionMarker({ orientation, dimension, x, y, width = 0, height = 0, compressedBeginning, compressedEnd }) {\n  const styles = { left: `${x}px`, top: `${y}px` };\n  if (orientation === \"vertical\") styles.height = `${height}px`;\n  if (orientation === \"horizontal\") styles.width = `${width}px`;\n\n  const classNames = [\"graphical-tool__dimension-marker\", `graphical-tool__dimension-marker--${orientation}`];\n  if (compressedBeginning) {\n    classNames.push(\"graphical-tool__dimension-marker--compressed-beginning\");\n  }\n  if (compressedEnd) {\n    classNames.push(\"graphical-tool__dimension-marker--compressed-end\");\n  }\n\n  return (\n    <div className={classNames.join(\" \")} style={styles} data-testid=\"dimension-marker\">\n      {compressedBeginning && (\n        <>\n          <div\n            className={[\n              \"graphical-tool__dimension-marker__compressed-marker\",\n              `graphical-tool__dimension-marker__compressed-marker--beginning-${orientation}`,\n            ].join(\" \")}\n          >\n            <CompressedIcon />\n          </div>\n          <div\n            className={[\n              \"graphical-tool__dimension-marker__arrow\",\n              `graphical-tool__dimension-marker__arrow--beginning-${orientation}`,\n            ].join(\" \")}\n          >\n            <ArrowLineEnd />\n          </div>\n        </>\n      )}\n      {compressedEnd && (\n        <>\n          <div\n            className={[\n              \"graphical-tool__dimension-marker__compressed-marker\",\n              `graphical-tool__dimension-marker__compressed-marker--end-${orientation}`,\n            ].join(\" \")}\n          >\n            <CompressedIcon />\n          </div>\n          <div\n            className={[\n              \"graphical-tool__dimension-marker__arrow\",\n              `graphical-tool__dimension-marker__arrow--end-${orientation}`,\n            ].join(\" \")}\n          >\n            <ArrowLineEnd />\n          </div>\n        </>\n      )}\n      <div\n        className={[\n          \"graphical-tool__dimension-marker__bg-line\",\n          `graphical-tool__dimension-marker__bg-line--${orientation}`,\n        ].join(\" \")}\n      />\n      <div\n        className={[\n          \"graphical-tool__dimension-marker__marker\",\n          `graphical-tool__dimension-marker__marker--${orientation}`,\n        ].join(\" \")}\n      >\n        {dimension}\n      </div>\n    </div>\n  );\n}\n\nDimensionMarker.propTypes = {\n  orientation: PropTypes.oneOf([\"horizontal\", \"vertical\"]).isRequired,\n  dimension: PropTypes.string.isRequired,\n  x: PropTypes.number.isRequired,\n  y: PropTypes.number.isRequired,\n  width: PropTypes.number,\n  height: PropTypes.number,\n  compressedBeginning: PropTypes.bool.isRequired,\n  compressedEnd: PropTypes.bool.isRequired,\n};\n\nexport default React.memo(DimensionMarker);\n", "import React from \"react\";\n\nfunction ArrowLineEnd() {\n  return (\n    <svg\n      width=\"6px\"\n      height=\"12px\"\n      viewBox=\"0 0 6 12\"\n      version=\"1.1\"\n      xmlns=\"http://www.w3.org/2000/svg\"\n      xmlnsXlink=\"http://www.w3.org/1999/xlink\"\n    >\n      <g stroke=\"none\" strokeWidth=\"1\" fill=\"none\" fillRule=\"evenodd\" strokeLinecap=\"square\">\n        <polyline stroke=\"#ddd\" points=\"6 0 1 6 6 12\"></polyline>\n      </g>\n    </svg>\n  );\n}\n\nexport default ArrowLineEnd;\n", "import React from \"react\";\n\nfunction CompressedIcon() {\n  return (\n    <svg\n      width=\"9px\"\n      height=\"12px\"\n      viewBox=\"0 0 9 12\"\n      version=\"1.1\"\n      xmlns=\"http://www.w3.org/2000/svg\"\n      xmlnsXlink=\"http://www.w3.org/1999/xlink\"\n    >\n      <g stroke=\"none\" strokeWidth=\"1\" fill=\"none\" fillRule=\"evenodd\" strokeLinecap=\"square\">\n        <g transform=\"translate(1.000000, 0.000000)\" stroke=\"#ccc\">\n          <polyline points=\"0 0 2 2.58823529 0 5.17647059 2 8.2718601 0 11\"></polyline>\n          <polyline points=\"5 0 7 2.58823529 5 5.17647059 7 8.2718601 5 11\"></polyline>\n        </g>\n      </g>\n    </svg>\n  );\n}\n\nexport default CompressedIcon;\n", "import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport Outline from \"./Outline\";\n\nfunction Outlines({ outer, inner }) {\n  return (\n    <>\n      <Outline type=\"outer\" {...outer} />\n      <Outline type=\"inner\" {...inner} />\n    </>\n  );\n}\n\nOutlines.propTypes = {\n  outer: PropTypes.shape({\n    x: PropTypes.number.isRequired,\n    y: PropTypes.number.isRequired,\n    height: PropTypes.number.isRequired,\n    width: PropTypes.number.isRequired,\n  }).isRequired,\n  inner: PropTypes.shape({\n    x: PropTypes.number.isRequired,\n    y: PropTypes.number.isRequired,\n    height: PropTypes.number.isRequired,\n    width: PropTypes.number.isRequired,\n  }).isRequired,\n};\n\nexport default React.memo(Outlines);\n", "import React from \"react\";\nimport PropTypes from \"prop-types\";\n\nfunction Outline({ type, x, y, height, width }) {\n  const classNames = [\"graphical-tool__grid-setback-outline\", `graphical-tool__grid-setback-outline--${type}`];\n  const styles = {\n    height: `${height}px`,\n    width: `${width}px`,\n    left: `${x}px`,\n    top: `${y}px`,\n  };\n  return <div className={classNames.join(\" \")} style={styles} data-testid={type}></div>;\n}\n\nOutline.propTypes = {\n  type: PropTypes.string.isRequired,\n  height: PropTypes.number.isRequired,\n  width: PropTypes.number.isRequired,\n  x: PropTypes.number.isRequired,\n  y: PropTypes.number.isRequired,\n};\n\nexport default React.memo(Outline);\n", "import React from \"react\";\nimport PropTypes from \"prop-types\";\n\nfunction ExtensionsOutline({ x, y, height, width }) {\n  const styles = {\n    height: `${height}px`,\n    width: `${width}px`,\n    left: `${x}px`,\n    top: `${y}px`,\n  };\n\n  return <div style={styles} className=\"graphical-tool__extensions-outline\" data-testid=\"extensions-outline\" />;\n}\n\nExtensionsOutline.propTypes = {\n  height: PropTypes.number.isRequired,\n  width: PropTypes.number.isRequired,\n  x: PropTypes.number.isRequired,\n  y: PropTypes.number.isRequired,\n};\n\nexport default React.memo(ExtensionsOutline);\n", "import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport CountMarker from \"./CountMarker\";\nimport BaseSelectionMarquee from \"../../SelectionMarquee\";\n\nfunction SelectionMarquee({\n  selectionMarquee = { x: 0, y: 0, height: 0, width: 0 },\n  rows,\n  columns,\n  selectedToolbarItem,\n}) {\n  const { x, y, width, height } = selectionMarquee;\n\n  let color = \"blue\";\n  if (selectedToolbarItem === \"add\") {\n    color = \"green\";\n  } else if (selectedToolbarItem === \"remove\") {\n    color = \"red\";\n  }\n\n  const showCountMarker = rows > 1 || columns > 1;\n\n  return (\n    <>\n      {showCountMarker && <CountMarker x={x} y={y} rows={rows} columns={columns} />}\n      <BaseSelectionMarquee x={x} y={y} width={width} height={height} color={color} />\n    </>\n  );\n}\n\nSelectionMarquee.propTypes = {\n  selectionMarquee: PropTypes.shape({\n    height: PropTypes.number.isRequired,\n    width: PropTypes.number.isRequired,\n    x: PropTypes.number.isRequired,\n    y: PropTypes.number.isRequired,\n  }),\n  rows: PropTypes.number.isRequired,\n  columns: PropTypes.number.isRequired,\n  selectedToolbarItem: PropTypes.string.isRequired,\n};\n\nexport default React.memo(SelectionMarquee);\n", "import React from \"react\";\nimport PropTypes from \"prop-types\";\n\nfunction CountMarker({ rows, columns, x, y }) {\n  const styles = { left: `${x}px`, top: `${y}px` };\n\n  return (\n    <div className=\"graphical-tool__selection-marquee__row-col-marker\" style={styles} data-testid=\"count-marker\">\n      {rows} x {columns}\n    </div>\n  );\n}\n\nCountMarker.propTypes = {\n  rows: PropTypes.number.isRequired,\n  columns: PropTypes.number.isRequired,\n  x: PropTypes.number.isRequired,\n  y: PropTypes.number.isRequired,\n};\n\nexport default CountMarker;\n", "import React from \"react\";\nimport PropTypes from \"prop-types\";\n\nfunction SelectionMarquee({ x, y, width, height, color = \"blue\" }) {\n  const classNames = [\"graphical-tool__selection-marquee\", `graphical-tool__selection-marquee--${color}`];\n\n  const cursorOffset = 1;\n\n  return (\n    <svg\n      height={height + cursorOffset}\n      width={width + cursorOffset}\n      viewBox={`0 0 ${width} ${height}`}\n      preserveAspectRatio=\"none\"\n      className={classNames.join(\" \")}\n      style={{ left: `${x}px`, top: `${y}px`, width: `${width}px`, height: `${height}px` }}\n      data-testid=\"base-selection-marquee\"\n    >\n      <rect width={width} height={height} />\n    </svg>\n  );\n}\n\nSelectionMarquee.propTypes = {\n  x: PropTypes.number.isRequired,\n  y: PropTypes.number.isRequired,\n  width: PropTypes.number.isRequired,\n  height: PropTypes.number.isRequired,\n  color: PropTypes.string,\n};\n\nexport default SelectionMarquee;\n", "import React, { useEffect, useState, useMemo, useCallback } from \"react\";\nimport PropTypes from \"prop-types\";\nimport throttle from \"lodash/throttle\";\nimport sortBy from \"lodash/sortBy\";\nimport ReactDOM from \"react-dom\";\n\nimport Crosshairs from \"./Crosshairs\";\nimport GridCompressedSpaceThresholds from \"../services/grid-compressed-space-thresholds\";\n\n// Moving the crosshairs away from the cursor so you can click and select cells\nexport const CURSOR_OFFSET = 12;\n\n// Offset to account for the fact that the crosshair line is in the middle of a container\nexport const LINE_OFFSET = 2;\n\nexport const SNAP_TOLERANCE = 10;\n\nfunction DimensionCrosshairs({\n  height,\n  width,\n  realHeight,\n  realWidth,\n  outlineRef,\n  containerRef,\n  positionSnaps,\n  snap,\n  compressedSpace,\n  compressedSpaceThresholds,\n}) {\n  const containerElemRef = React.useRef(document.createElement(\"div\"));\n\n  useEffect(() => {\n    const id = \"graphical-tool__dimension-crosshairs__container\";\n    containerElemRef.current.id = id;\n    document.body.appendChild(containerElemRef.current);\n    return () => containerElemRef.current.remove();\n  }, []);\n\n  const [outlinePos, setOutlinePos] = useState(null);\n  const [mousePos, setMousePos] = useState(null);\n  const [compressedSpaceXQuadrant, setCompressedSpaceXQuadrant] = useState(\"split\");\n  const [compressedSpaceYQuadrant, setCompressedSpaceYQuadrant] = useState(\"split\");\n\n  const containerPageOffsets = useMemo(() => {\n    if (!containerRef) return { x: 0, y: 0 };\n    const container = containerRef.current;\n    const pe = container.parentElement;\n    return { x: pe.offsetLeft, y: pe.offsetTop };\n  }, [containerRef]);\n\n  const adjustXValue = useCallback(\n    (value) => value + containerPageOffsets.x - CURSOR_OFFSET / 2,\n    [containerPageOffsets.x],\n  );\n  const adjustYValue = useCallback(\n    (value) => value + containerPageOffsets.y - CURSOR_OFFSET / 2,\n    [containerPageOffsets.y],\n  );\n\n  const adjustedPageXSnaps = useMemo(() => {\n    if (!containerRef) return [];\n    return positionSnaps.xAxis.map((x) => adjustXValue(x)).sort();\n  }, [containerRef, positionSnaps.xAxis, adjustXValue]);\n\n  const adjustedPageYSnaps = useMemo(() => {\n    if (!containerRef) return [];\n    return positionSnaps.yAxis.map((y) => adjustYValue(y)).sort();\n  }, [adjustYValue, containerRef, positionSnaps.yAxis]);\n\n  const adjustedCompressedSpaceThresholds = useMemo(() => {\n    if (!containerRef) return compressedSpaceThresholds;\n    const { leftX, rightX, topY, bottomY } = compressedSpaceThresholds;\n    return {\n      leftX: adjustXValue(leftX),\n      rightX: adjustXValue(rightX),\n      topY: adjustYValue(topY),\n      bottomY: adjustYValue(bottomY),\n    };\n  }, [adjustXValue, adjustYValue, compressedSpaceThresholds, containerRef]);\n\n  useEffect(() => {\n    if (outlineRef === null) return;\n\n    const outline = outlineRef.current;\n    const outlineRect = outline.getBoundingClientRect();\n    const outlineTop = outlineRect.top + window.pageYOffset;\n    const outlineLeft = outlineRect.left + window.pageXOffset;\n    const outlinePos = {\n      top: outlineTop,\n      left: outlineLeft,\n      right: outlineLeft + width,\n      bottom: outlineTop + height,\n    };\n    setOutlinePos(outlinePos);\n  }, [height, outlineRef, width]);\n\n  useEffect(() => {\n    const snapPos = (eventPos, snaps) => {\n      const adjustedEventPos = eventPos - CURSOR_OFFSET;\n      if (!snap) return adjustedEventPos;\n\n      const snapsInRange = [];\n      for (let i = 0; i < snaps.length; i++) {\n        const inSnapRange =\n          adjustedEventPos >= snaps[i] - SNAP_TOLERANCE && adjustedEventPos <= snaps[i] + SNAP_TOLERANCE;\n        if (inSnapRange) {\n          const closeness = Math.abs(adjustedEventPos - snaps[i]);\n          snapsInRange.push({ pos: snaps[i], closeness });\n        }\n      }\n\n      if (snapsInRange.length === 0) return adjustedEventPos;\n\n      const sortedSnapsInRange = sortBy(snapsInRange, [\"closeness\"]);\n      return sortedSnapsInRange[0].pos;\n    };\n\n    const onMouseMove = (event) => {\n      const x = snapPos(event.pageX, adjustedPageXSnaps);\n      const y = snapPos(event.pageY, adjustedPageYSnaps);\n      setCompressedSpaceXQuadrant(GridCompressedSpaceThresholds.xQuadrant(adjustedCompressedSpaceThresholds, x));\n      setCompressedSpaceYQuadrant(GridCompressedSpaceThresholds.yQuadrant(adjustedCompressedSpaceThresholds, y));\n      setMousePos({ x, y });\n    };\n\n    const throttledOnMouseMove = throttle((e) => onMouseMove(e), 50, { leading: true });\n\n    document.addEventListener(\"mousemove\", throttledOnMouseMove);\n    return () => document.removeEventListener(\"mousemove\", throttledOnMouseMove);\n  }, [\n    adjustedCompressedSpaceThresholds,\n    adjustedPageXSnaps,\n    adjustedPageYSnaps,\n    compressedSpaceThresholds,\n    height,\n    snap,\n    width,\n  ]);\n\n  return ReactDOM.createPortal(\n    <Crosshairs\n      mousePos={mousePos}\n      outlinePos={outlinePos}\n      height={height}\n      width={width}\n      realHeight={realHeight}\n      realWidth={realWidth}\n      cursorOffset={CURSOR_OFFSET}\n      lineOffset={LINE_OFFSET}\n      compressedSpace={compressedSpace}\n      compressedSpaceXQuadrant={compressedSpaceXQuadrant}\n      compressedSpaceYQuadrant={compressedSpaceYQuadrant}\n    />,\n    containerElemRef.current,\n  );\n}\n\nDimensionCrosshairs.propTypes = {\n  height: PropTypes.number.isRequired,\n  width: PropTypes.number.isRequired,\n  realHeight: PropTypes.number.isRequired,\n  realWidth: PropTypes.number.isRequired,\n  outlineRef: PropTypes.object.isRequired,\n  positionSnaps: PropTypes.shape({\n    xAxis: PropTypes.arrayOf(PropTypes.number).isRequired,\n    yAxis: PropTypes.arrayOf(PropTypes.number).isRequired,\n  }).isRequired,\n  snap: PropTypes.bool.isRequired,\n  compressedSpace: PropTypes.shape({\n    top: PropTypes.number.isRequired,\n    right: PropTypes.number.isRequired,\n    bottom: PropTypes.number.isRequired,\n    left: PropTypes.number.isRequired,\n  }).isRequired,\n};\n\nexport default React.memo(DimensionCrosshairs);\n", "import React, { useMemo } from \"react\";\nimport PropTypes from \"prop-types\";\n\nimport Vertical from \"./Vertical\";\nimport Horizontal from \"./Horizontal\";\n\nfunction Crosshairs({\n  mousePos = undefined,\n  outlinePos = undefined,\n  height,\n  width,\n  realHeight,\n  realWidth,\n  cursorOffset,\n  lineOffset,\n  compressedSpace,\n  compressedSpaceXQuadrant,\n  compressedSpaceYQuadrant,\n}) {\n  const showLines = useMemo(() => {\n    const offset = cursorOffset / 2;\n    return (\n      outlinePos &&\n      mousePos &&\n      mousePos.x >= outlinePos.left - offset &&\n      mousePos.x <= outlinePos.right - offset &&\n      mousePos.y >= outlinePos.top - offset &&\n      mousePos.y <= outlinePos.bottom - offset\n    );\n  }, [cursorOffset, mousePos, outlinePos]);\n\n  return (\n    <>\n      {showLines && (\n        <Vertical\n          x={mousePos.x}\n          y={outlinePos.top}\n          intersectionY={mousePos.y}\n          height={height}\n          realHeight={realHeight}\n          cursorOffset={cursorOffset}\n          lineOffset={lineOffset}\n          compressedTop={compressedSpace.top}\n          compressedBottom={compressedSpace.bottom}\n          compressedSpaceYQuadrant={compressedSpaceYQuadrant}\n        />\n      )}\n      {showLines && (\n        <Horizontal\n          x={outlinePos.left}\n          y={mousePos.y}\n          intersectionX={mousePos.x}\n          width={width}\n          realWidth={realWidth}\n          cursorOffset={cursorOffset}\n          lineOffset={lineOffset}\n          compressedLeft={compressedSpace.left}\n          compressedRight={compressedSpace.right}\n          compressedSpaceXQuadrant={compressedSpaceXQuadrant}\n        />\n      )}\n    </>\n  );\n}\n\nCrosshairs.propTypes = {\n  mousePos: PropTypes.object,\n  outlinePos: PropTypes.object,\n  height: PropTypes.number.isRequired,\n  width: PropTypes.number.isRequired,\n  realHeight: PropTypes.number.isRequired,\n  realWidth: PropTypes.number.isRequired,\n  cursorOffset: PropTypes.number.isRequired,\n  lineOffset: PropTypes.number.isRequired,\n  compressedSpace: PropTypes.shape({\n    top: PropTypes.number.isRequired,\n    right: PropTypes.number.isRequired,\n    bottom: PropTypes.number.isRequired,\n    left: PropTypes.number.isRequired,\n  }).isRequired,\n  compressedSpaceXQuadrant: PropTypes.oneOf([\"split\", \"bothOnRight\", \"bothOnLeft\"]).isRequired,\n  compressedSpaceYQuadrant: PropTypes.oneOf([\"split\", \"bothOnTop\", \"bothOnBottom\"]).isRequired,\n};\n\nexport default React.memo(Crosshairs);\n", "import React from \"react\";\nimport PropTypes from \"prop-types\";\n\nimport Marker from \"./Marker\";\nimport Line from \"./Line\";\nimport { inchesToFeetAndInches } from \"../../../helpers/app\";\n\nfunction Vertical({\n  x,\n  y,\n  height,\n  intersectionY,\n  realHeight,\n  cursorOffset,\n  lineOffset,\n  compressedTop,\n  compressedBottom,\n  compressedSpaceYQuadrant,\n}) {\n  const offset = cursorOffset / 2;\n  const middleX = x + offset;\n  const middleY = intersectionY + offset;\n\n  let topCompressedAmount = 0;\n  let bottomCompressedAmount = 0;\n  if (compressedSpaceYQuadrant === \"bothOnTop\") {\n    topCompressedAmount += compressedTop + compressedBottom;\n  } else if (compressedSpaceYQuadrant === \"bothOnBottom\") {\n    bottomCompressedAmount += compressedTop + compressedBottom;\n  } else {\n    topCompressedAmount += compressedTop;\n    bottomCompressedAmount += compressedBottom;\n  }\n\n  const topHeight = middleY - y;\n  const topY = y + (middleY - y) / 2;\n  const topRealHeightInches = (topHeight / height) * realHeight + topCompressedAmount;\n\n  const bottomHeight = height - topHeight;\n  const bottomY = middleY + (y + height - middleY) / 2;\n  const bottomRealHeightInches = (bottomHeight / height) * realHeight + bottomCompressedAmount;\n\n  const topMarker = {\n    x: middleX,\n    y: topY,\n    label: inchesToFeetAndInches(topRealHeightInches),\n    includesCompressedSpace: topCompressedAmount > 0,\n  };\n\n  const bottomMarker = {\n    x: middleX,\n    y: bottomY,\n    label: inchesToFeetAndInches(bottomRealHeightInches),\n    includesCompressedSpace: bottomCompressedAmount > 0,\n  };\n\n  return (\n    <div data-testid=\"vertical\">\n      <Line x={x + lineOffset} y={y} length={height} type=\"vertical\" />\n      <Marker {...topMarker} />\n      <Marker {...bottomMarker} />\n    </div>\n  );\n}\n\nVertical.propTypes = {\n  x: PropTypes.number.isRequired,\n  y: PropTypes.number.isRequired,\n  height: PropTypes.number.isRequired,\n  intersectionY: PropTypes.number.isRequired,\n  realHeight: PropTypes.number.isRequired,\n  cursorOffset: PropTypes.number.isRequired,\n  lineOffset: PropTypes.number.isRequired,\n  compressedTop: PropTypes.number.isRequired,\n  compressedBottom: PropTypes.number.isRequired,\n  compressedSpaceYQuadrant: PropTypes.oneOf([\"split\", \"bothOnTop\", \"bothOnBottom\"]).isRequired,\n};\n\nexport default React.memo(Vertical);\n", "import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport CompressedIcon from \"./CompressedIcon\";\n\nfunction Marker({ x, y, label, includesCompressedSpace }) {\n  return (\n    <div\n      className=\"dimension-crosshairs__line__marker\"\n      style={{\n        left: `${x}px`,\n        top: `${y}px`,\n      }}\n      data-testid=\"marker\"\n    >\n      <div className=\"dimension-crosshairs__line__marker__text\">\u2248{label}</div>\n      {includesCompressedSpace && (\n        <div className=\"dimension-crosshairs__line__marker__compressed-icon\">\n          <CompressedIcon />\n        </div>\n      )}\n    </div>\n  );\n}\n\nMarker.propTypes = {\n  x: PropTypes.number.isRequired,\n  y: PropTypes.number.isRequired,\n  label: PropTypes.string.isRequired,\n  includesCompressedSpace: PropTypes.bool.isRequired,\n};\n\nexport default React.memo(Marker);\n", "import React from \"react\";\n\nfunction CompressedIcon() {\n  return (\n    <svg\n      width=\"9px\"\n      height=\"11px\"\n      viewBox=\"0 0 9 11\"\n      version=\"1.1\"\n      xmlns=\"http://www.w3.org/2000/svg\"\n      xmlnsXlink=\"http://www.w3.org/1999/xlink\"\n      data-testid=\"compressed-icon\"\n    >\n      <g stroke=\"none\" strokeWidth=\"1\" fill=\"none\" fillRule=\"evenodd\" strokeLinecap=\"square\">\n        <g transform=\"translate(1.000000, 0.000000)\" stroke=\"#fff\">\n          <polyline points=\"0 0 2 2.58823529 0 5.17647059 2 8.2718601 0 11\"></polyline>\n          <polyline points=\"5 0 7 2.58823529 5 5.17647059 7 8.2718601 5 11\"></polyline>\n        </g>\n      </g>\n    </svg>\n  );\n}\n\nexport default CompressedIcon;\n", "import React from \"react\";\nimport PropTypes from \"prop-types\";\n\nfunction Line({ x, y, type, length }) {\n  const styles = {\n    left: `${x}px`,\n    top: `${y}px`,\n  };\n  if (type === \"vertical\") {\n    styles.height = `${length}px`;\n  } else {\n    styles.width = `${length}px`;\n  }\n\n  return (\n    <div className={`dimension-crosshairs__line dimension-crosshairs__line--${type}`} style={styles} data-testid=\"line\">\n      <div className={`dimension-crosshairs__line--${type}__inner`}></div>\n    </div>\n  );\n}\n\nLine.propTypes = {\n  x: PropTypes.number.isRequired,\n  y: PropTypes.number.isRequired,\n  type: PropTypes.oneOf([\"vertical\", \"horizontal\"]).isRequired,\n  length: PropTypes.number.isRequired,\n};\n\nexport default React.memo(Line);\n", "import React from \"react\";\nimport PropTypes from \"prop-types\";\n\nimport { inchesToFeetAndInches } from \"../../../helpers/app\";\nimport Marker from \"./Marker\";\nimport Line from \"./Line\";\n\nfunction Horizontal({\n  x,\n  y,\n  width,\n  intersectionX,\n  realWidth,\n  cursorOffset,\n  lineOffset,\n  compressedLeft,\n  compressedRight,\n  compressedSpaceXQuadrant,\n}) {\n  const offset = cursorOffset / 2;\n  const middleY = y + offset;\n  const middleX = intersectionX + offset;\n\n  let rightCompressedAmount = 0;\n  let leftCompressedAmount = 0;\n  if (compressedSpaceXQuadrant === \"bothOnRight\") {\n    rightCompressedAmount += compressedLeft + compressedRight;\n  } else if (compressedSpaceXQuadrant === \"bothOnLeft\") {\n    leftCompressedAmount += compressedLeft + compressedRight;\n  } else {\n    leftCompressedAmount += compressedLeft;\n    rightCompressedAmount += compressedRight;\n  }\n\n  const leftWidth = middleX - x;\n  const leftX = x + (middleX - x) / 2;\n  const leftRealWidthInches = (leftWidth / width) * realWidth + leftCompressedAmount;\n\n  const rightWidth = width - leftWidth;\n  const rightX = middleX + (x + width - middleX) / 2;\n  const rightRealWidthInches = (rightWidth / width) * realWidth + rightCompressedAmount;\n\n  const leftMarker = {\n    x: leftX,\n    y: middleY,\n    label: inchesToFeetAndInches(leftRealWidthInches),\n    includesCompressedSpace: leftCompressedAmount > 0,\n  };\n\n  const rightMarker = {\n    x: rightX,\n    y: middleY,\n    label: inchesToFeetAndInches(rightRealWidthInches),\n    includesCompressedSpace: rightCompressedAmount > 0,\n  };\n\n  return (\n    <div data-testid=\"horizontal\">\n      <Line x={x} y={y + lineOffset} length={width} type=\"horizontal\" />\n      <Marker {...leftMarker} />\n      <Marker {...rightMarker} />\n    </div>\n  );\n}\n\nHorizontal.propTypes = {\n  x: PropTypes.number.isRequired,\n  y: PropTypes.number.isRequired,\n  width: PropTypes.number.isRequired,\n  intersectionX: PropTypes.number.isRequired,\n  realWidth: PropTypes.number.isRequired,\n  cursorOffset: PropTypes.number.isRequired,\n  lineOffset: PropTypes.number.isRequired,\n  compressedLeft: PropTypes.number.isRequired,\n  compressedRight: PropTypes.number.isRequired,\n  compressedSpaceXQuadrant: PropTypes.oneOf([\"split\", \"bothOnRight\", \"bothOnLeft\"]).isRequired,\n};\n\nexport default React.memo(Horizontal);\n", "/*\nUsed to help display the correct dimensions for the dimension crosshairs,\ndepending on where the event position is relative to the compressed space thresholds.\n*/\nexport default class GridCompressedSpaceThresholds {\n  static xQuadrant(thresholds, x) {\n    const { leftX, rightX } = thresholds;\n\n    if (x <= leftX) return \"bothOnRight\";\n    if (x >= rightX) return \"bothOnLeft\";\n    return \"split\";\n  }\n\n  static yQuadrant(thresholds, y) {\n    const { topY, bottomY } = thresholds;\n\n    if (y <= topY) return \"bothOnBottom\";\n    if (y >= bottomY) return \"bothOnTop\";\n    return \"split\";\n  }\n\n  static calculate(displayGrid) {\n    return new this(displayGrid).calculate();\n  }\n\n  constructor(displayGrid) {\n    this.markers = displayGrid.compressedSpaceMarkers;\n    this.roofOutline = displayGrid.roofOutline;\n  }\n\n  calculate() {\n    return {\n      leftX: this.valueFromMarker(\"left\", \"x\") || this.roofOutline.x,\n      rightX: this.valueFromMarker(\"right\", \"x\") || this.roofOutline.x + this.roofOutline.width,\n      topY: this.valueFromMarker(\"top\", \"y\") || this.roofOutline.y,\n      bottomY: this.valueFromMarker(\"bottom\", \"y\") || this.roofOutline.y + this.roofOutline.height,\n    };\n  }\n\n  valueFromMarker(position, attribute) {\n    const marker = this.markers.find((m) => m.key === position);\n    if (!marker) return undefined;\n    return marker[attribute];\n  }\n}\n", "import React from \"react\";\nimport PropTypes from \"prop-types\";\n\nfunction RoofOutline({ x, y, height, width, children = undefined, outlineRef }) {\n  const styles = {\n    left: `${x}px`,\n    top: `${y}px`,\n    height: `${height}px`,\n    width: `${width}px`,\n  };\n\n  return (\n    <div className=\"graphical-tool__roof-outline\" style={styles} ref={outlineRef}>\n      {children}\n    </div>\n  );\n}\n\nRoofOutline.propTypes = {\n  x: PropTypes.number.isRequired,\n  y: PropTypes.number.isRequired,\n  height: PropTypes.number.isRequired,\n  width: PropTypes.number.isRequired,\n  children: PropTypes.object,\n  outlineRef: PropTypes.object.isRequired,\n};\n\nexport default React.memo(RoofOutline);\n", "// A caching mixin for your object\nconst WithCaching = {\n  cached(key, valueMethod) {\n    if (this.__cachedValues === undefined) this.__cachedValues = {};\n\n    const cachedValue = this.__cachedValues[key];\n    if (cachedValue) return cachedValue;\n\n    const value = valueMethod();\n    this.__cachedValues[key] = value;\n    return value;\n  },\n};\n\nexport default WithCaching;\n", "import WithCaching from \"../../../helpers/with-caching\";\n\nexport default class GridReal {\n  spaceAroundCellsCap = 60;\n\n  constructor({\n    columns,\n    cellWidth,\n    cellHeight,\n    columnSpacing,\n    extensionTop,\n    extensionRight,\n    extensionBottom,\n    extensionLeft,\n    rows,\n    rowSpacing,\n    setback,\n    spaceAroundCellsTop,\n    spaceAroundCellsRight,\n    spaceAroundCellsBottom,\n    spaceAroundCellsLeft,\n    compressSpaceAroundCells = true,\n  }) {\n    Object.assign(this, WithCaching);\n\n    this.cellHeight = cellHeight;\n    this.cellWidth = cellWidth;\n    this.columns = columns;\n    this.columnSpacing = columnSpacing;\n    this.extensionTop = extensionTop;\n    this.extensionRight = extensionRight;\n    this.extensionBottom = extensionBottom;\n    this.extensionLeft = extensionLeft;\n    this.rows = rows;\n    this.rowSpacing = rowSpacing;\n    this.setbackHeight = setback;\n    this.setbackWidth = setback;\n\n    this.compressSpaceAroundCells = compressSpaceAroundCells;\n    this.setCompressedSpaceAroundCells(\n      spaceAroundCellsTop,\n      spaceAroundCellsRight,\n      spaceAroundCellsBottom,\n      spaceAroundCellsLeft,\n    );\n  }\n\n  setCompressedSpaceAroundCells(top, right, bottom, left) {\n    this.spaceAroundCellsTop = this.compressedSpace(top);\n    this.spaceAroundCellsTopIsCompressed = top > this.spaceAroundCellsCap;\n    this.spaceAroundCellsTopBeforeCapping = top;\n    this.spaceAroundCellsTopCompressedSpace = top - this.spaceAroundCellsTop;\n\n    this.spaceAroundCellsRight = this.compressedSpace(right);\n    this.spaceAroundCellsRightIsCompressed = right > this.spaceAroundCellsCap;\n    this.spaceAroundCellsRightBeforeCapping = right;\n    this.spaceAroundCellsRightCompressedSpace = right - this.spaceAroundCellsRight;\n\n    this.spaceAroundCellsBottom = this.compressedSpace(bottom);\n    this.spaceAroundCellsBottomIsCompressed = bottom > this.spaceAroundCellsCap;\n    this.spaceAroundCellsBottomBeforeCapping = bottom;\n    this.spaceAroundCellsBottomCompressedSpace = bottom - this.spaceAroundCellsBottom;\n\n    this.spaceAroundCellsLeft = this.compressedSpace(left);\n    this.spaceAroundCellsLeftIsCompressed = left > this.spaceAroundCellsCap;\n    this.spaceAroundCellsLeftBeforeCapping = left;\n    this.spaceAroundCellsLeftCompressedSpace = left - this.spaceAroundCellsLeft;\n  }\n\n  compressedSpace(value) {\n    return this.compressSpaceAroundCells && value > this.spaceAroundCellsCap ? this.spaceAroundCellsCap : value;\n  }\n\n  get setbacksWidth() {\n    return this.cached(\"setbacksWidth\", () => this.setbackWidth * 2);\n  }\n\n  get hasHorizontalSetback() {\n    return this.setbackWidth > 0;\n  }\n\n  get setbacksHeight() {\n    return this.cached(\"setbacksHeight\", () => this.setbackHeight * 2);\n  }\n\n  get hasVerticalSetback() {\n    return this.setbackHeight > 0;\n  }\n\n  get cellsWidth() {\n    return this.cached(\"cellsWidth\", () => this.cellWidth * this.columns);\n  }\n\n  get cellsHeight() {\n    return this.cached(\"cellsHeight\", () => this.cellHeight * this.rows);\n  }\n\n  get columnSpacingsWidth() {\n    return this.cached(\"columnSpacingsWidth\", () => this.columnSpacing * this.columnSpacesCount);\n  }\n\n  get rowSpacingsHeight() {\n    return this.cached(\"rowSpacingsHeight\", () => this.rowSpacing * this.rowSpacesCount);\n  }\n\n  get rowSpacesCount() {\n    return this.rows - 1;\n  }\n\n  get columnSpacesCount() {\n    return this.columns - 1;\n  }\n\n  get width() {\n    return this.cached(\"width\", () => {\n      return this.setbacksWidth + this.spaceAroundCellsLeft + this.arrayHardwareWidth + this.spaceAroundCellsRight;\n    });\n  }\n\n  get uncompressedWidth() {\n    return this.cached(\"uncompressedWidth\", () => {\n      return (\n        this.setbacksWidth +\n        this.spaceAroundCellsLeftBeforeCapping +\n        this.arrayHardwareWidth +\n        this.spaceAroundCellsRightBeforeCapping\n      );\n    });\n  }\n\n  get arrayHardwareWidth() {\n    return this.cached(\"arrayHardwareWidth\", () => {\n      return this.extensionLeft + this.cellsWidth + this.columnSpacingsWidth + this.extensionRight;\n    });\n  }\n\n  get height() {\n    return this.cached(\"height\", () => {\n      return this.setbacksHeight + this.spaceAroundCellsTop + this.arrayHardwareHeight + this.spaceAroundCellsBottom;\n    });\n  }\n\n  get uncompressedHeight() {\n    return this.cached(\"uncompressedHeight\", () => {\n      return (\n        this.setbacksHeight +\n        this.spaceAroundCellsTopBeforeCapping +\n        this.arrayHardwareHeight +\n        this.spaceAroundCellsBottomBeforeCapping\n      );\n    });\n  }\n\n  get arrayHardwareHeight() {\n    return this.cached(\n      \"arrayHardwareHeight\",\n      () => this.extensionTop + this.cellsHeight + this.rowSpacingsHeight + this.extensionBottom,\n    );\n  }\n\n  get isLongSideWidth() {\n    return this.longSide === \"width\";\n  }\n}\n", "export default class GridCellPositions {\n  static calculate(displayGrid) {\n    return new this(displayGrid).calculate();\n  }\n\n  constructor(displayGrid) {\n    this.displayGrid = displayGrid;\n  }\n\n  calculate() {\n    const { rows, columns } = this.displayGrid;\n\n    const positions = [];\n    for (let i = 0; i < rows; i++) {\n      positions[i] = [];\n      for (let j = 0; j < columns; j++) {\n        positions[i][j] = this.position(i, j);\n      }\n    }\n    return positions;\n  }\n\n  position(row, column) {\n    return {\n      x: this.xPosition(column),\n      y: this.yPosition(row),\n    };\n  }\n\n  xPosition(column) {\n    const {\n      cellWidth,\n      columnSpacing,\n      containerPadding,\n      extensionLeft,\n      horizontalCenteringOffset,\n      setbackWidth,\n      spaceAroundCellsLeft,\n    } = this.displayGrid;\n\n    const columnSpacingsUpToRow = column * columnSpacing;\n    const cellWidthsUpToRow = column * cellWidth;\n\n    return (\n      setbackWidth +\n      spaceAroundCellsLeft +\n      extensionLeft +\n      columnSpacingsUpToRow +\n      cellWidthsUpToRow +\n      containerPadding.left +\n      horizontalCenteringOffset\n    );\n  }\n\n  yPosition(row) {\n    const { cellHeight, containerPadding, extensionTop, rowSpacing, setbackHeight, spaceAroundCellsTop } =\n      this.displayGrid;\n\n    const rowSpacingsUpToColumn = row * rowSpacing;\n    const cellHeightsUpToColumn = row * cellHeight;\n\n    return (\n      setbackHeight +\n      spaceAroundCellsTop +\n      extensionTop +\n      rowSpacingsUpToColumn +\n      cellHeightsUpToColumn +\n      containerPadding.top\n    );\n  }\n}\n", "// 1\" = 1px and we scale from there\nexport default class GridDisplayScaleFactor {\n  cellLongSideMaxLength = 100;\n\n  static calculate(displayGrid) {\n    return new this(displayGrid).calculate();\n  }\n\n  constructor(displayGrid) {\n    this.displayGrid = displayGrid;\n    this.realGrid = displayGrid.realGrid;\n  }\n\n  calculate() {\n    const heightScaleFactor = this.containerMaxHeight / this.realGrid.height;\n    const widthScaleFactor = this.containerWidth / this.realGrid.width;\n    const scaleFactor = Math.min(heightScaleFactor, widthScaleFactor);\n    return this.augmentScaleFactorForCellMaxSize(scaleFactor);\n  }\n\n  get containerWidth() {\n    const { maxWidth, containerPadding } = this.displayGrid;\n    return maxWidth - containerPadding.horizontal;\n  }\n\n  get containerMaxHeight() {\n    const { maxHeight, containerPadding } = this.displayGrid;\n    return maxHeight - containerPadding.vertical;\n  }\n\n  augmentScaleFactorForCellMaxSize(scaleFactor) {\n    const scaledCell = this.scaledCell(scaleFactor);\n    if (this.cellSidesLessThanMax(scaledCell)) return scaleFactor;\n    return this.cellMaxLengthScaleFactor;\n  }\n\n  scaledCell(scaleFactor) {\n    const { cellWidth, cellHeight } = this.realGrid;\n    return {\n      width: cellWidth * scaleFactor,\n      height: cellHeight * scaleFactor,\n    };\n  }\n\n  cellSidesLessThanMax(cell) {\n    return cell.width <= this.cellLongSideMaxLength && cell.height <= this.cellLongSideMaxLength;\n  }\n\n  get cellMaxLengthScaleFactor() {\n    const { cellWidth, cellHeight } = this.realGrid;\n    const widthScaleFactor = this.cellLongSideMaxLength / cellWidth;\n    const heightScaleFactor = this.cellLongSideMaxLength / cellHeight;\n    return Math.min(widthScaleFactor, heightScaleFactor);\n  }\n}\n", "export default class GridNumbers {\n  rowNumberWidth = 25;\n\n  columnNumberHeight = 25;\n\n  static calculate(displayGrid) {\n    return new this(displayGrid).calculate();\n  }\n\n  constructor(displayGrid) {\n    this.displayGrid = displayGrid;\n  }\n\n  calculate() {\n    return [this.rowNumbers, this.columnNumbers];\n  }\n\n  get rowNumbers() {\n    const { cellHeight, cellPositions, extensionLeft, setbackWidth, spaceAroundCellsLeft } = this.displayGrid;\n\n    const cellsFirstColumn = cellPositions.map((pp) => pp[0]);\n    const rowNumbers = cellsFirstColumn.map((pfc, i) => {\n      return {\n        type: \"row\",\n        number: i + 1,\n        x: pfc.x - this.rowNumberWidth - setbackWidth - spaceAroundCellsLeft - extensionLeft,\n        y: pfc.y,\n        width: this.rowNumberWidth,\n        height: cellHeight,\n      };\n    });\n    return this.numbersLimitedToIncrements(rowNumbers);\n  }\n\n  numbersLimitedToIncrements(numbers) {\n    const minDimension = 15;\n    const smallSizeNumberIncrement = 5;\n    const { height: numHeight, width: numWidth } = numbers[0];\n\n    const numberLargerThanCutoff = numHeight >= minDimension && numWidth >= minDimension;\n    if (numberLargerThanCutoff) return numbers;\n\n    return numbers.filter((n) => n.number === 1 || n.number % smallSizeNumberIncrement === 0);\n  }\n\n  get columnNumbers() {\n    const { cellPositions, cellWidth, extensionTop, setbackHeight, spaceAroundCellsTop } = this.displayGrid;\n\n    const cellsFirstRow = cellPositions[0];\n    const columnNumbers = cellsFirstRow.map((pfr, i) => {\n      return {\n        type: \"column\",\n        number: i + 1,\n        x: pfr.x,\n        y: pfr.y - this.columnNumberHeight - setbackHeight - spaceAroundCellsTop - extensionTop,\n        width: cellWidth,\n        height: this.columnNumberHeight,\n      };\n    });\n    return this.numbersLimitedToIncrements(columnNumbers);\n  }\n}\n", "export const GRID_SETBACK_OUTLINE_INNER_PADDING = 2;\nexport const GRID_SETBACK_OUTLINE_BORDER = 1;\n\nexport default class GridSetbackOutlines {\n  innerPadding = 2;\n\n  static calculate(displayGrid) {\n    return new this(displayGrid).calculate();\n  }\n\n  constructor(displayGrid) {\n    this.displayGrid = displayGrid;\n  }\n\n  calculate() {\n    return {\n      outer: this.outer,\n      inner: this.inner,\n    };\n  }\n\n  get gridTopLeft() {\n    const { cellPositions, extensionLeft, extensionTop, spaceAroundCellsLeft, spaceAroundCellsTop } = this.displayGrid;\n    const firstCell = cellPositions[0][0];\n\n    return {\n      x: firstCell.x - spaceAroundCellsLeft - extensionLeft,\n      y: firstCell.y - spaceAroundCellsTop - extensionTop,\n    };\n  }\n\n  get gridBottomRight() {\n    const {\n      cellPositions,\n      columns,\n      cellHeight,\n      cellWidth,\n      extensionBottom,\n      extensionRight,\n      rows,\n      spaceAroundCellsBottom,\n      spaceAroundCellsRight,\n    } = this.displayGrid;\n    const bottomRightCell = cellPositions[rows - 1][columns - 1];\n\n    return {\n      x: bottomRightCell.x + cellWidth + 2 * GRID_SETBACK_OUTLINE_BORDER + spaceAroundCellsRight + extensionRight,\n      y: bottomRightCell.y + cellHeight + 2 * GRID_SETBACK_OUTLINE_BORDER + spaceAroundCellsBottom + extensionBottom,\n    };\n  }\n\n  get outer() {\n    const { setbackWidth, setbackHeight } = this.displayGrid;\n    const x = this.gridTopLeft.x - setbackWidth;\n    const y = this.gridTopLeft.y - setbackHeight;\n    const gridCellPaddingOffsetWidth = 5;\n    const width = Math.max(\n      0,\n      this.gridBottomRight.x + setbackWidth - x + 2 * GRID_SETBACK_OUTLINE_BORDER - gridCellPaddingOffsetWidth,\n    );\n    const gridCellPaddingOffsetHeight = 4;\n    const height = Math.max(\n      0,\n      this.gridBottomRight.y + setbackHeight - y + GRID_SETBACK_OUTLINE_BORDER - gridCellPaddingOffsetHeight,\n    );\n    return { x, y, height, width };\n  }\n\n  get inner() {\n    const x = this.gridTopLeft.x - GRID_SETBACK_OUTLINE_INNER_PADDING;\n    const y = this.gridTopLeft.y - GRID_SETBACK_OUTLINE_INNER_PADDING;\n    const gridCellPaddingOffset = 1;\n    const width = Math.max(0, this.gridBottomRight.x - x - gridCellPaddingOffset);\n    const height = Math.max(0, this.gridBottomRight.y - y - gridCellPaddingOffset);\n    return { x, y, height, width };\n  }\n}\n", "import { inchesToFeetAndInches } from \"../../../helpers/app\";\n\nimport { GRID_SETBACK_OUTLINE_INNER_PADDING } from \"./grid-setback-outlines\";\n\nexport const GRID_DIMENSION_MARKERS_SPACING = 20;\n\nexport default class GridDimensionMarkers {\n  dimensionMarkerOffset = 15;\n\n  static calculate(displayGrid) {\n    return new this(displayGrid).calculate();\n  }\n\n  constructor(displayGrid) {\n    this.displayGrid = displayGrid;\n    this.realGrid = displayGrid.realGrid;\n  }\n\n  calculate() {\n    const { setbackWidth, setbackHeight } = this.displayGrid;\n    const markers = [this.arrayHardwareWidth, this.arrayHardwareHeight];\n    if (setbackWidth) markers.push(this.widthWithSetbacks);\n    if (setbackHeight) markers.push(this.heightWithSetbacks);\n    return markers;\n  }\n\n  get arrayHardwareWidth() {\n    const { extensionLeft } = this.displayGrid;\n\n    return {\n      label: \"width without setbacks\",\n      orientation: \"horizontal\",\n      dimension: inchesToFeetAndInches(this.realGrid.arrayHardwareWidth),\n      x: this.firstRowFirstCell.x - extensionLeft,\n      y: this.horizontalYStartingPos,\n      width: this.hardwareWidth,\n      height: undefined,\n      compressedBeginning: false,\n      compressedEnd: false,\n    };\n  }\n\n  get setbackOutlineInnerPadding() {\n    const { setback } = this.displayGrid;\n    if (setback === 0) return 0;\n    return GRID_SETBACK_OUTLINE_INNER_PADDING;\n  }\n\n  get firstRowFirstCell() {\n    const { cellPositions } = this.displayGrid;\n    return cellPositions[0][0];\n  }\n\n  get horizontalYStartingPos() {\n    const { cellHeight, extensionBottom, setbackWidth, spaceAroundCellsBottom } = this.displayGrid;\n    return (\n      this.lastRowLastCell.y +\n      cellHeight +\n      setbackWidth +\n      spaceAroundCellsBottom +\n      this.dimensionMarkerOffset +\n      extensionBottom\n    );\n  }\n\n  get lastRowLastCell() {\n    const { cellPositions, rows, columns } = this.displayGrid;\n    return cellPositions[rows - 1][columns - 1];\n  }\n\n  get hardwareWidth() {\n    const { cellWidth, extensionLeft, extensionRight } = this.displayGrid;\n\n    return this.lastRowLastCell.x - this.firstRowFirstCell.x + cellWidth + extensionLeft + extensionRight - 1;\n  }\n\n  get arrayHardwareHeight() {\n    const { extensionTop } = this.displayGrid;\n\n    return {\n      label: \"height without setbacks\",\n      orientation: \"vertical\",\n      dimension: inchesToFeetAndInches(this.realGrid.arrayHardwareHeight),\n      x: this.verticalXStartingPos,\n      y: this.firstRowFirstCell.y - extensionTop,\n      width: undefined,\n      height: this.hardwareHeight,\n      compressedBeginning: false,\n      compressedEnd: false,\n    };\n  }\n\n  get verticalXStartingPos() {\n    const { cellWidth, extensionRight, setbackWidth, spaceAroundCellsRight } = this.displayGrid;\n\n    return (\n      this.lastRowLastCell.x +\n      cellWidth +\n      setbackWidth +\n      this.dimensionMarkerOffset +\n      spaceAroundCellsRight +\n      extensionRight\n    );\n  }\n\n  get hardwareHeight() {\n    const { cellHeight, extensionBottom, extensionTop } = this.displayGrid;\n\n    return this.lastRowLastCell.y - this.firstRowFirstCell.y + cellHeight + extensionTop + extensionBottom - 1;\n  }\n\n  get widthWithSetbacks() {\n    const {\n      uncompressedWidth,\n      spaceAroundCellsLeftIsCompressed: compressedOnLeft,\n      spaceAroundCellsRightIsCompressed: compressedOnRight,\n    } = this.realGrid;\n    const { extensionLeft, setbackWidth, spaceAroundCellsLeft, spaceAroundCellsHorizontal } = this.displayGrid;\n\n    const width = this.hardwareWidth + setbackWidth * 2 + spaceAroundCellsHorizontal;\n\n    return {\n      label: \"width with setbacks\",\n      orientation: \"horizontal\",\n      dimension: inchesToFeetAndInches(uncompressedWidth),\n      x: this.firstRowFirstCell.x - setbackWidth - spaceAroundCellsLeft - extensionLeft,\n      y: this.horizontalYStartingPos + GRID_DIMENSION_MARKERS_SPACING,\n      width,\n      height: undefined,\n      compressedBeginning: compressedOnLeft,\n      compressedEnd: compressedOnRight,\n    };\n  }\n\n  get heightWithSetbacks() {\n    const {\n      uncompressedHeight,\n      spaceAroundCellsTopIsCompressed: compressedOnTop,\n      spaceAroundCellsBottomIsCompressed: compressedOnBottom,\n    } = this.realGrid;\n    const { extensionTop, setbackHeight, spaceAroundCellsTop, spaceAroundCellsVertical } = this.displayGrid;\n\n    const height = this.hardwareHeight + setbackHeight * 2 + spaceAroundCellsVertical;\n\n    return {\n      label: \"height with setbacks\",\n      orientation: \"vertical\",\n      dimension: inchesToFeetAndInches(uncompressedHeight),\n      x: this.verticalXStartingPos + GRID_DIMENSION_MARKERS_SPACING,\n      y: this.firstRowFirstCell.y - setbackHeight - spaceAroundCellsTop - extensionTop,\n      width: undefined,\n      height,\n      compressedBeginning: compressedOnTop,\n      compressedEnd: compressedOnBottom,\n    };\n  }\n}\n", "export default class GridCompressedSpaceMarkers {\n  static calculate(displayGrid) {\n    return new this(displayGrid).calculate();\n  }\n\n  constructor(displayGrid) {\n    this.displayGrid = displayGrid;\n    this.realGrid = displayGrid.realGrid;\n    this.innerSetbackOutline = displayGrid.setbackOutlines.inner;\n    this.extensionsOutline = displayGrid.extensionsOutline;\n\n    this.markers = [];\n  }\n\n  calculate() {\n    this.addTopMarker();\n    this.addRightMarker();\n    this.addBottomMarker();\n    this.addLeftMarker();\n    return this.markers;\n  }\n\n  addTopMarker() {\n    if (!this.realGrid.spaceAroundCellsTopIsCompressed) return;\n\n    const eo = this.extensionsOutline;\n    const iso = this.innerSetbackOutline;\n\n    this.markers.push({\n      key: \"top\",\n      orientation: \"horizontal\",\n      x: eo.x + Math.floor(eo.width / 2),\n      y: iso.y + Math.floor((eo.y - iso.y) / 2),\n    });\n  }\n\n  addRightMarker() {\n    if (!this.realGrid.spaceAroundCellsRightIsCompressed) return;\n\n    const eo = this.extensionsOutline;\n    const iso = this.innerSetbackOutline;\n    eo.right = eo.x + eo.width;\n    iso.right = iso.x + iso.width;\n\n    this.markers.push({\n      key: \"right\",\n      orientation: \"vertical\",\n      x: eo.right + Math.floor((iso.right - eo.right) / 2),\n      y: eo.y + Math.floor(eo.height / 2),\n    });\n  }\n\n  addBottomMarker() {\n    if (!this.realGrid.spaceAroundCellsBottomIsCompressed) return;\n\n    const eo = this.extensionsOutline;\n    const iso = this.innerSetbackOutline;\n    eo.bottom = eo.y + eo.height;\n    iso.bottom = iso.y + iso.height;\n\n    this.markers.push({\n      key: \"bottom\",\n      orientation: \"horizontal\",\n      x: eo.x + Math.floor(eo.width / 2),\n      y: eo.bottom + Math.floor((iso.bottom - eo.bottom) / 2),\n    });\n  }\n\n  addLeftMarker() {\n    if (!this.realGrid.spaceAroundCellsLeftIsCompressed) return;\n\n    const eo = this.extensionsOutline;\n    const iso = this.innerSetbackOutline;\n\n    this.markers.push({\n      key: \"left\",\n      orientation: \"vertical\",\n      x: iso.x + Math.floor((eo.x - iso.x) / 2),\n      y: eo.y + Math.floor(eo.height / 2),\n    });\n  }\n}\n", "export default class GridExtensionsOutline {\n  static calculate(displayGrid) {\n    return new this(displayGrid).calculate();\n  }\n\n  constructor({\n    columns,\n    extensionBottom,\n    extensionLeft,\n    extensionRight,\n    extensionTop,\n    cellHeight,\n    cellPositions,\n    cellWidth,\n    rows,\n  }) {\n    this.columns = columns;\n    this.extensionBottom = extensionBottom;\n    this.extensionLeft = extensionLeft;\n    this.extensionRight = extensionRight;\n    this.extensionTop = extensionTop;\n    this.cellHeight = cellHeight;\n    this.cellPositions = cellPositions;\n    this.cellWidth = cellWidth;\n    this.rows = rows;\n  }\n\n  calculate() {\n    if (this.hasNoExtensions) return undefined;\n\n    return {\n      x: this.firstCell.x - this.extensionLeft,\n      y: this.firstCell.y - this.extensionTop,\n      height: this.height,\n      width: this.width,\n    };\n  }\n\n  get hasNoExtensions() {\n    return [this.extensionTop, this.extensionRight, this.extensionBottom, this.extensionLeft].every((s) => s === 0);\n  }\n\n  get firstCell() {\n    return this.cellPositions[0][0];\n  }\n\n  get lastCell() {\n    return this.cellPositions[this.rows - 1][this.columns - 1];\n  }\n\n  get height() {\n    return this.extensionTop + (this.lastCell.y - this.firstCell.y) + this.cellHeight + this.extensionBottom - 1;\n  }\n\n  get width() {\n    return this.extensionLeft + (this.lastCell.x - this.firstCell.x) + this.cellWidth + this.extensionRight - 1;\n  }\n}\n", "export default class GridPositionSnaps {\n  static calculate(displayGrid) {\n    return new this(displayGrid).calculate();\n  }\n\n  constructor(displayGrid) {\n    this.setbackWidth = displayGrid.setbackWidth;\n    this.setbackOutlines = displayGrid.setbackOutlines;\n    this.extensionsOutline = displayGrid.extensionsOutline;\n    this.cellWidth = displayGrid.cellWidth;\n    this.cellHeight = displayGrid.cellHeight;\n    this.cellPositions = displayGrid.cellPositions;\n\n    this.cellPadding = 1;\n\n    this.xAxis = new Set();\n    this.yAxis = new Set();\n  }\n\n  calculate() {\n    this.addCellRowYs();\n    this.addCellColumnXs();\n\n    const xAxis = [...this.xAxis];\n    const yAxis = [...this.yAxis];\n    return { xAxis, yAxis };\n  }\n\n  addCellRowYs() {\n    const firstColumnCells = this.cellPositions.map((row) => row[0]);\n    firstColumnCells.forEach((cell) => {\n      this.yAxis.add(cell.y);\n      this.yAxis.add(cell.y + this.cellHeight - this.cellPadding);\n    });\n  }\n\n  addCellColumnXs() {\n    const firstRowCells = this.cellPositions[0];\n    firstRowCells.forEach((cell) => {\n      this.xAxis.add(cell.x);\n      this.xAxis.add(cell.x + this.cellWidth - this.cellPadding);\n    });\n  }\n}\n", "import WithCaching from \"../../../helpers/with-caching\";\nimport GridCompressedSpaceThresholds from \"./grid-compressed-space-thresholds\";\nimport GridCellPositions from \"./grid-cell-positions\";\nimport GridDisplayScaleFactor from \"./grid-display-scale-factor\";\nimport GridNumbers from \"./grid-numbers\";\nimport GridDimensionMarkers, { GRID_DIMENSION_MARKERS_SPACING } from \"./grid-dimension-markers\";\nimport GridCompressedSpaceMarkers from \"./grid-compressed-space-markers\";\nimport GridSetbackOutlines from \"./grid-setback-outlines\";\nimport GridExtensionsOutline from \"./grid-extensions-outline\";\nimport GridPositionSnaps from \"./grid-position-snaps\";\n\nexport default class GridDisplay {\n  constructor({\n    realGrid,\n    maxWidth,\n    maxHeight,\n    floorValues = true, // flooring alleviates sub-pixel display funkiness\n  }) {\n    Object.assign(this, WithCaching);\n\n    this.realGrid = realGrid;\n    this.maxWidth = maxWidth;\n    this.maxHeight = maxHeight;\n\n    this.floorValues = floorValues;\n    this.rows = realGrid.rows;\n    this.columns = realGrid.columns;\n  }\n\n  get containerPadding() {\n    return this.cached(\"containerPadding\", () => {\n      const { hasHorizontalSetback, hasVerticalSetback } = this.realGrid;\n      const defaultPadding = 20;\n      const top = defaultPadding;\n      const right = hasHorizontalSetback > 0 ? defaultPadding + GRID_DIMENSION_MARKERS_SPACING : defaultPadding;\n      const bottom = hasVerticalSetback > 0 ? defaultPadding + GRID_DIMENSION_MARKERS_SPACING : defaultPadding;\n      const left = defaultPadding;\n      const horizontal = left + right;\n      const vertical = top + bottom;\n      return { top, right, bottom, left, horizontal, vertical };\n    });\n  }\n\n  get extensionTop() {\n    return this.scaledDisplayValue(\"extensionTop\");\n  }\n\n  scaledDisplayValue(realGridAttribute) {\n    return this.cached(realGridAttribute, () => {\n      const value = this.realGrid[realGridAttribute] * this.scaleFactor;\n      return this.displayValue(value);\n    });\n  }\n\n  get extensionRight() {\n    return this.scaledDisplayValue(\"extensionRight\");\n  }\n\n  get extensionBottom() {\n    return this.scaledDisplayValue(\"extensionBottom\");\n  }\n\n  get extensionLeft() {\n    return this.scaledDisplayValue(\"extensionLeft\");\n  }\n\n  get setbackWidth() {\n    return this.scaledDisplayValue(\"setbackWidth\");\n  }\n\n  get scaleFactor() {\n    return this.cached(\"scaleFactor\", () => {\n      return GridDisplayScaleFactor.calculate(this);\n    });\n  }\n\n  displayValue(value) {\n    if (this.floorValues) return Math.floor(value);\n    return value;\n  }\n\n  get setbackHeight() {\n    return this.scaledDisplayValue(\"setbackHeight\");\n  }\n\n  get cellWidth() {\n    return this.scaledDisplayValue(\"cellWidth\");\n  }\n\n  get cellHeight() {\n    return this.scaledDisplayValue(\"cellHeight\");\n  }\n\n  get rowSpacing() {\n    return this.scaledDisplayValue(\"rowSpacing\");\n  }\n\n  get columnSpacing() {\n    return this.scaledDisplayValue(\"columnSpacing\");\n  }\n\n  get spaceAroundCellsTop() {\n    return this.scaledDisplayValue(\"spaceAroundCellsTop\");\n  }\n\n  get spaceAroundCellsRight() {\n    return this.scaledDisplayValue(\"spaceAroundCellsRight\");\n  }\n\n  get spaceAroundCellsBottom() {\n    return this.scaledDisplayValue(\"spaceAroundCellsBottom\");\n  }\n\n  get spaceAroundCellsLeft() {\n    return this.scaledDisplayValue(\"spaceAroundCellsLeft\");\n  }\n\n  get spaceAroundCellsHorizontal() {\n    return this.cached(\"spaceAroundCellsHorizontal\", () => {\n      return this.spaceAroundCellsLeft + this.spaceAroundCellsRight;\n    });\n  }\n\n  get spaceAroundCellsVertical() {\n    return this.cached(\"spaceAroundCellsVertical\", () => {\n      return this.spaceAroundCellsTop + this.spaceAroundCellsBottom;\n    });\n  }\n\n  get height() {\n    return this.cached(\"height\", () => {\n      return (\n        this.setbackHeight * 2 +\n        this.rows * this.cellHeight +\n        this.rowSpacing * (this.rows - 1) +\n        this.containerPadding.vertical +\n        this.spaceAroundCellsVertical +\n        this.extensionTop +\n        this.extensionBottom\n      );\n    });\n  }\n\n  get width() {\n    return this.cached(\"width\", () => {\n      return (\n        this.setbackWidth * 2 +\n        this.columns * this.cellWidth +\n        this.columnSpacing * (this.columns - 1) +\n        this.containerPadding.horizontal +\n        this.spaceAroundCellsHorizontal +\n        this.extensionLeft +\n        this.extensionRight\n      );\n    });\n  }\n\n  get arrayHardwareWidth() {\n    return this.scaledDisplayValue(\"arrayHardwareWidth\");\n  }\n\n  get arrayHardwareHeight() {\n    return this.scaledDisplayValue(\"arrayHardwareHeight\");\n  }\n\n  get cellPositions() {\n    return this.cached(\"cellPositions\", () => {\n      return GridCellPositions.calculate(this);\n    });\n  }\n\n  get horizontalCenteringOffset() {\n    return this.cached(\"horizontalCenteringOffset\", () => {\n      const value = (this.maxWidth - this.width) / 2 - this.containerPadding.left / 2;\n      return this.displayValue(value);\n    });\n  }\n\n  get numbers() {\n    return GridNumbers.calculate(this);\n  }\n\n  get dimensionMarkers() {\n    return GridDimensionMarkers.calculate(this);\n  }\n\n  get setbackOutlines() {\n    return this.cached(\"setbackOutlines\", () => GridSetbackOutlines.calculate(this));\n  }\n\n  get extensionsOutline() {\n    return this.cached(\"extensionsOutline\", () => GridExtensionsOutline.calculate(this));\n  }\n\n  get roofOutline() {\n    return this.cached(\"roofOutline\", () => {\n      if (this.setbackWidth > 0) return this.setbackOutlines.outer;\n      if (this.extensionsOutline) return this.extensionsOutline;\n\n      const firstCell = this.cellPositions[0][0];\n      return {\n        x: firstCell.x,\n        y: firstCell.y,\n        width: this.width - this.containerPadding.horizontal - 1,\n        height: this.height - this.containerPadding.vertical - 1,\n      };\n    });\n  }\n\n  get positionSnaps() {\n    return GridPositionSnaps.calculate(this);\n  }\n\n  get compressedSpaceMarkers() {\n    return this.cached(\"compressedSpaceMarkers\", () => GridCompressedSpaceMarkers.calculate(this));\n  }\n\n  get compressedSpaceThresholds() {\n    return GridCompressedSpaceThresholds.calculate(this);\n  }\n}\n", "export const MIN_ROW_COUNT = 1;\nexport const MAX_ROW_COUNT = 30;\nexport const MIN_COLUMN_COUNT = 1;\nexport const MAX_COLUMN_COUNT = 60;\n\nconst DEFAULT_FILL_VALUE = \"0\";\n\nexport default class GridModifier {\n  constructor(gridArray, clampHardwareDimensions, maxHardwareHeight, maxHardwareWidth, fillValue = DEFAULT_FILL_VALUE) {\n    this.gridArray = gridArray.map((row) => [...row]); // make a copy of the grid array\n    this.gridRows = this.gridArray.length;\n    this.gridColumns = this.gridArray[0].length;\n    this.clampHardwareDimensions = clampHardwareDimensions;\n    this.maxHardwareHeight = maxHardwareHeight;\n    this.maxHardwareWidth = maxHardwareWidth;\n    this.fillValue = fillValue;\n  }\n\n  changeRowNumber(newRowCount, newArrayHardwareHeight) {\n    const rowCount = this.clampRowNumber(newRowCount, newArrayHardwareHeight);\n\n    if (rowCount === this.gridRows) return this.gridArray;\n\n    const meth = rowCount > this.gridRows ? \"addRows\" : \"removeRows\";\n    this[meth](rowCount);\n\n    return this.gridArray;\n  }\n\n  addRows(newRowCount) {\n    const numberOfNewRows = newRowCount - this.gridRows;\n    for (let i = 0; i < numberOfNewRows; i++) {\n      this.gridArray.push(new Array(this.gridColumns).fill(this.fillValue));\n    }\n  }\n\n  removeRows(newRowCount) {\n    this.gridArray = this.gridArray.slice(0, newRowCount);\n  }\n\n  clampRowNumber(numberValue, newArrayHardwareHeight) {\n    const maxRowCount = this.maxRowCount(numberValue, newArrayHardwareHeight);\n    return this.clamp(numberValue, MIN_ROW_COUNT, maxRowCount);\n  }\n\n  maxRowCount(newRowCount, newArrayHardwareHeight) {\n    newRowCount = Number.parseInt(newRowCount) || 0;\n\n    if (this.clampHardwareDimensions) {\n      return newArrayHardwareHeight > this.maxHardwareHeight ? this.gridRows : Math.max(newRowCount, MAX_ROW_COUNT);\n    } else {\n      return MAX_ROW_COUNT;\n    }\n  }\n\n  clamp(value, min, max) {\n    const number = Number.parseInt(value) || min; // handles the NaN possibility\n    return Math.min(Math.max(number, min), max);\n  }\n\n  changeColumnNumber(newColumnCount, newArrayHardwareWidth) {\n    newColumnCount = Number.parseInt(newColumnCount) || 0;\n\n    const columnCount = this.clampColumnNumber(newColumnCount, newArrayHardwareWidth);\n\n    if (columnCount === this.gridColumns) return this.gridArray;\n\n    const meth = columnCount > this.gridColumns ? \"addColumns\" : \"removeColumns\";\n    this[meth](columnCount);\n\n    return this.gridArray;\n  }\n\n  addColumns(newColumnCount) {\n    const numberOfNewColumns = newColumnCount - this.gridColumns;\n    this.gridArray = this.gridArray.map((row) => [...row, ...new Array(numberOfNewColumns).fill(this.fillValue)]);\n  }\n\n  removeColumns(newColumnCount) {\n    this.gridArray = this.gridArray.map((row) => row.slice(0, newColumnCount));\n  }\n\n  clampColumnNumber(numberValue, newArrayHardwareWidth) {\n    const maxColumnCount = this.maxColumnCount(numberValue, newArrayHardwareWidth);\n    return this.clamp(numberValue, MIN_COLUMN_COUNT, maxColumnCount);\n  }\n\n  maxColumnCount(newColumnCount, newArrayHardwareWidth) {\n    if (this.clampHardwareDimensions) {\n      return newArrayHardwareWidth > this.maxHardwareWidth\n        ? this.gridColumns\n        : Math.max(newColumnCount, MAX_COLUMN_COUNT);\n    } else {\n      return MAX_COLUMN_COUNT;\n    }\n  }\n}\n", "import { gridCellInMarqueeSelection } from \"../helpers/grid-helper\";\n\nexport default class GridDragSelection {\n  constructor({ cellHeight, cellWidth, cellPositions, selectionMarquee }) {\n    this.cellHeight = cellHeight;\n    this.cellWidth = cellWidth;\n    this.cellPositions = cellPositions;\n    this.selectionMarquee = selectionMarquee;\n\n    this.marqueeColumns = 0;\n    this.marqueeRows = 0;\n    this.cellHovers = [[]];\n\n    this.calculateHovers();\n  }\n\n  calculateHovers() {\n    for (let i = 0; i < this.cellPositions.length; i++) {\n      let rowHasHoveredGridCell = false;\n      this.cellHovers[i] = [];\n      let marqueeColumnsForRow = 0;\n\n      for (let j = 0; j < this.cellPositions[i].length; j++) {\n        const marqueeHover = this.marqueeHoverForGridCell(i, j);\n        this.cellHovers[i][j] = marqueeHover;\n        if (marqueeHover) {\n          rowHasHoveredGridCell = true;\n          marqueeColumnsForRow++;\n        }\n      }\n\n      if (rowHasHoveredGridCell) this.marqueeRows++;\n      if (marqueeColumnsForRow > this.marqueeColumns) {\n        this.marqueeColumns = marqueeColumnsForRow;\n      }\n    }\n  }\n\n  marqueeHoverForGridCell(row, column) {\n    return gridCellInMarqueeSelection({\n      itemX: this.cellPositions[row][column].x,\n      itemY: this.cellPositions[row][column].y,\n      itemWidth: this.cellWidth,\n      itemHeight: this.cellHeight,\n      marqueeX: this.selectionMarquee.x,\n      marqueeY: this.selectionMarquee.y,\n      marqueeWidth: this.selectionMarquee.width,\n      marqueeHeight: this.selectionMarquee.height,\n    });\n  }\n}\n", "import React, { Component } from \"react\";\nimport { sentryException } from \"../../config/sentry\";\n\nclass SentryErrorHandler extends Component {\n  constructor(props) {\n    super(props);\n    this.state = {\n      eventId: null,\n      error: props.error || null,\n      hasError: false,\n      firstChild: props.children[0],\n    };\n  }\n\n  static getDerivedStateFromError(error) {\n    // Update state so the next render will show the fallback UI.\n    return { hasError: true };\n  }\n\n  componentDidCatch(error, errorInfo) {\n    this.setState({ error });\n    sentryException(error, errorInfo, (eventId) => {\n      this.setState({ eventId });\n    });\n  }\n\n  get errorMessage() {\n    const { error } = this.state;\n    if (error === null) return null;\n    if (typeof error === \"string\") return error;\n    if (error.message !== undefined) return error.message;\n    return error;\n  }\n\n  render() {\n    if (this.state.hasError) {\n      return (\n        <div className=\"raven-error-container\">\n          <h4>Sorry, we encountered an error</h4>\n          <p>We've been notified about the problem</p>\n          <div className=\"nitty-gritty\">\n            <b>Error message:</b>\n            <br />\n            {this.errorMessage}\n            <br />\n            Event ID: {this.state.eventId}\n          </div>\n        </div>\n      );\n    }\n    return this.props.children;\n  }\n}\n\nexport default SentryErrorHandler;\n", "import { Controller } from \"@hotwired/stimulus\";\n\nexport default class extends Controller {\n  static targets = [\"signUp\", \"useExisting\", \"registrationFormContainer\", \"sessionFormContainer\"];\n\n  connect() {\n    this.showForm();\n  }\n\n  showForm() {\n    if (this.hasSignUpTarget) {\n      if (this.signUpTarget.checked) {\n        this.registrationFormContainerTarget.classList.remove(\"d-none\");\n        this.sessionFormContainerTarget.classList.add(\"d-none\");\n      } else {\n        this.registrationFormContainerTarget.classList.add(\"d-none\");\n        this.sessionFormContainerTarget.classList.remove(\"d-none\");\n      }\n    }\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport { createLinkAndClick } from \"../../helpers/app\";\nimport { confirmDialog } from \"../components/ir_dialog/helper\";\n\nexport default class extends Controller {\n  static values = {\n    projectType: String,\n    projectImageBased: Boolean,\n    projectTotalWatts: Number,\n  };\n\n  minWattsForShowingDialog = 200000;\n  maxWattsForGenericMessage = 500000;\n  secondsPerMegaWatt = 4.0;\n\n  click(event) {\n    event.preventDefault();\n\n    const href = event.currentTarget.href;\n    const target = event.metaKey ? \"_blank\" : \"_self\";\n\n    if (!this.shouldShowDialog) {\n      createLinkAndClick(href, target);\n      return;\n    }\n\n    const callback = (confirmed) => {\n      if (!confirmed) return;\n      createLinkAndClick(href, target);\n    };\n\n    const clickPosition = { x: event.pageX, y: event.pageY };\n    const options = {\n      showNearClickPosition: true,\n      clickPosition,\n      headerColor: \"orange\",\n      width: 350,\n      title: \"Large Project Notice\",\n      autoCloseIfConfirmed: false,\n    };\n    confirmDialog(this.message, callback, options);\n  }\n\n  get shouldShowDialog() {\n    return (\n      this.projectTypeValue === \"bx\" &&\n      this.projectImageBasedValue &&\n      this.projectTotalWattsValue > this.minWattsForShowingDialog\n    );\n  }\n\n  get message() {\n    if (this.projectTotalWattsValue <= this.maxWattsForGenericMessage) {\n      return \"The project you are navigating to is larger than 200 kW.  It may take a moment to load.\";\n    } else {\n      const estimatedLoadTime = Math.ceil((this.projectTotalWattsValue / 1000000) * this.secondsPerMegaWatt);\n      const roundedLoadTime = Math.ceil(estimatedLoadTime / 5.0) * 5;\n\n      return `The project you are navigating to is larger than 200 kW.  It may take up to ${roundedLoadTime} seconds to load.`;\n    }\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport * as Turbo from \"@hotwired/turbo\";\n\nexport default class extends Controller {\n  connect() {\n    this.mapIdentifier = this.element.dataset.mapIdentifier;\n    this.element[this.identifier] = this;\n  }\n\n  linkClick(event) {\n    event.preventDefault();\n\n    const url = event.currentTarget.href;\n    this.requestToNavigate(url);\n  }\n\n  requestToNavigate(url) {\n    if (this.isDirty) {\n      this.mapController.saveAndThenRedirect(url);\n    } else {\n      Turbo.visit(url);\n    }\n  }\n\n  get mapDomElement() {\n    // ~= matches the controller name even if it is not the only controller applied to the element\n    return document.querySelector(`[data-controller~='${this.mapIdentifier}']`);\n  }\n\n  get mapController() {\n    return this.mapDomElement[this.mapIdentifier];\n  }\n\n  get isDirty() {\n    return this.mapDomElement && this.mapController.dirty;\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport * as store from \"../../../helpers/local-store\";\n\nconst SHOW_MENU_CLASS = \"ol-map__btn__flyout__menu--active\";\nconst PINNED_MENU_CLASS = \"ol-map__btn__flyout__menu--pinned\";\nconst ACTIVE_PIN_BTN_CLASS = \"ol-map__btn__flyout__menu__actions__btn--active\";\n\nexport default class BtnFlyoutMenuController extends Controller {\n  static targets = [\"menu\", \"pinBtn\", \"flyoutMenuBtn\"];\n  static values = { localStorageKey: String };\n\n  hideMenuTimeout = undefined;\n\n  connect() {\n    this.element.flyoutMenuController = this;\n\n    this.pinBtnPinTooltip = this.pinBtnTarget.dataset.tooltip;\n    this.pinBtnUnpinTooltip = this.pinBtnTarget.dataset.tooltipPinned;\n\n    if (this.hasLocalStorageKeyValue && store.has(this.localStorageKey)) {\n      this.showMenu();\n      // Give Tippy some time to initialize\n      setTimeout(() => {\n        this.pinMenu();\n      }, 50);\n    }\n  }\n\n  get isFlyoutMenuBtnDisabled() {\n    const btn = this.flyoutMenuBtnTarget;\n    return btn.disabled || btn.className.match(/--disabled/);\n  }\n\n  get localStorageKey() {\n    return `le--pinnedMenu--${this.localStorageKeyValue}`;\n  }\n\n  showMenu(_event) {\n    if (this.isFlyoutMenuBtnDisabled) return;\n\n    if (this.hideMenuTimeout) window.clearTimeout(this.hideMenuTimeout);\n\n    this.menuTarget.classList.add(SHOW_MENU_CLASS);\n  }\n\n  hideMenu(_event) {\n    if (this.isMenuPinned) return;\n\n    this.hideMenuTimeout = window.setTimeout(() => {\n      this.menuTarget.classList.remove(SHOW_MENU_CLASS);\n    }, 100);\n  }\n\n  get isMenuPinned() {\n    return this.menuTarget.classList.contains(PINNED_MENU_CLASS);\n  }\n\n  toggleMenuPin(_event) {\n    if (this.isMenuPinned) {\n      this.unpinMenu();\n      if (this.hasLocalStorageKeyValue) store.del(this.localStorageKey);\n    } else {\n      this.pinMenu();\n      if (this.hasLocalStorageKeyValue) store.set(this.localStorageKey, true);\n    }\n  }\n\n  pinMenu() {\n    this.pinBtnTarget.classList.add(ACTIVE_PIN_BTN_CLASS);\n    this.menuTarget.classList.add(PINNED_MENU_CLASS);\n    this.pinBtnTarget._tippy.setContent(this.pinBtnUnpinTooltip);\n  }\n\n  unpinMenu() {\n    this.pinBtnTarget.classList.remove(ACTIVE_PIN_BTN_CLASS);\n    this.menuTarget.classList.remove(PINNED_MENU_CLASS);\n    this.menuTarget.classList.remove(SHOW_MENU_CLASS);\n    this.pinBtnTarget._tippy.setContent(this.pinBtnPinTooltip);\n  }\n\n  showEnabledAndHideDisabledPinnedMenu() {\n    if (this.isFlyoutMenuBtnDisabled) {\n      this.menuTarget.classList.remove(SHOW_MENU_CLASS);\n    } else if (this.isMenuPinned) {\n      this.menuTarget.classList.add(SHOW_MENU_CLASS);\n    }\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\n\nimport * as toolbarBtn from \"../../../da/layout-editor/helpers/toolbar-btns\";\nimport * as store from \"../../../helpers/local-store\";\n\nexport default class BtnMultiselectGroup extends Controller {\n  static values = {\n    localStorageKeyPrefix: String,\n    defaultSelectedOptions: Array,\n    disallowDeselectionOfLastOption: { type: Boolean, default: false },\n  };\n\n  static targets = [\"optionBtn\"];\n\n  connect() {\n    this.element.multiSelectGroupController = this;\n\n    const defaultOptions = this.defaultSelectedOptionsValue;\n    this.optionBtnTargets.forEach((btn) => {\n      const btnOption = this.#btnOption(btn);\n      const localStoreKey = this.optionStoreKey(btnOption);\n      const hasLocalStoreValue = store.has(localStoreKey);\n      const localStoreValue = store.get(localStoreKey);\n\n      const isDefaultOption = defaultOptions.includes(btnOption);\n      const noLocalStoreOptionAndIsDefaultOption = !hasLocalStoreValue && isDefaultOption;\n      const isLocalStoreValueTrue = localStoreValue === true;\n\n      if (noLocalStoreOptionAndIsDefaultOption || isLocalStoreValueTrue) {\n        toolbarBtn.activate(btn);\n      }\n    });\n  }\n\n  optionStoreKey(option) {\n    return `${this.localStorageKeyPrefixValue}-${option}`;\n  }\n\n  updateOptionSelect(event) {\n    const btn = event.currentTarget;\n    if (toolbarBtn.isDisabled(btn)) return;\n\n    const btnOption = event.params.option;\n    const localStoreKey = this.optionStoreKey(btnOption);\n\n    if (toolbarBtn.isActive(btn)) {\n      const activeBtns = this.optionBtnTargets.filter((btn) => toolbarBtn.isActive(btn));\n      if (this.disallowDeselectionOfLastOptionValue && activeBtns.length === 1) return;\n\n      store.set(localStoreKey, false);\n      toolbarBtn.deactivate(btn);\n    } else {\n      store.set(localStoreKey, true);\n      toolbarBtn.activate(btn);\n    }\n  }\n\n  get selectedOptions() {\n    const results = [];\n    this.optionBtnTargets.forEach((btn) => {\n      if (toolbarBtn.isActive(btn)) {\n        const btnOption = this.#btnOption(btn);\n        results.push(btnOption);\n      }\n    });\n    return results;\n  }\n\n  #btnOption(btn) {\n    return btn.dataset[\"da-LayoutEditor-BtnMultiselectGroupOptionParam\"];\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\n\nimport * as toolbarBtn from \"../../../da/layout-editor/helpers/toolbar-btns\";\nimport * as store from \"../../../helpers/local-store\";\n\nexport default class BtnSelectGroup extends Controller {\n  static targets = [\"flyoutMenuBtn\", \"optionBtn\"];\n  static values = { localStorageKey: String, defaultOption: String };\n\n  connect() {\n    this.element.selectGroupController = this;\n\n    let initialOption;\n    if (\n      this.hasLocalStorageKeyValue &&\n      store.has(this.localStorageKey) &&\n      this.hasButtonForOption(store.get(this.localStorageKey))\n    ) {\n      initialOption = store.get(this.localStorageKey);\n    } else if (this.hasDefaultOptionValue) {\n      initialOption = this.defaultOptionValue;\n    } else {\n      initialOption = this.optionBtnTargets[0].dataset.option;\n    }\n\n    this.selectOption(initialOption);\n  }\n\n  hasButtonForOption(option) {\n    return this.buttonForOption(option) !== undefined;\n  }\n\n  buttonForOption(option) {\n    return this.optionBtnTargets.find((btn) => btn.dataset.option === option);\n  }\n\n  get localStorageKey() {\n    return `le--selectGroup--${this.localStorageKeyValue}`;\n  }\n\n  optionBtnClick(event) {\n    const button = event.currentTarget;\n    if (toolbarBtn.isDisabled(button)) return;\n\n    this.selectOption(button.dataset.option);\n  }\n\n  selectOption(option) {\n    this.selectedOption = option;\n\n    const button = this.buttonForOption(option);\n    if (button === undefined) throw `BtnSelectGroup#selectionOptions: \"${option}Btn\" can not be found`;\n\n    const buttonIcon = button.querySelector(\".fas\");\n\n    if (buttonIcon) {\n      const iconName = buttonIcon.className.replace(\"fas fa-\", \"\");\n      if (this.hasFlyoutMenuBtnTarget) toolbarBtn.setIcon(this.flyoutMenuBtnTarget, iconName);\n    } else {\n      const buttonSpanContent = button.querySelector(\"span\").innerHTML;\n      if (this.hasFlyoutMenuBtnTarget) {\n        toolbarBtn.setSpanContent(this.flyoutMenuBtnTarget, buttonSpanContent);\n        const addRemove = option.length > 3 ? \"add\" : \"remove\";\n        this.flyoutMenuBtnTarget.classList[addRemove](\"ol-map__btn--small-font\");\n      }\n    }\n\n    this.optionBtnTargets.forEach((btn) => {\n      if (btn.dataset.option === this.selectedOption) {\n        toolbarBtn.activate(btn);\n      } else {\n        toolbarBtn.deactivate(btn);\n      }\n    });\n\n    if (this.hasLocalStorageKeyValue) store.set(this.localStorageKey, this.selectedOption);\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\n\nexport default class extends Controller {\n  static targets = [\"icon\"];\n  static values = {\n    tooltipLocked: { type: String, default: \"Unlock building images\" },\n    tooltipUnlocked: { type: String, default: \"Lock building images\" },\n  };\n\n  get mapController() {\n    return document.querySelector(\"[data-identifier='mapContainer']\").mapController;\n  }\n\n  get tooltipController() {\n    return this.application.getControllerForElementAndIdentifier(this.element, \"components--ir-tooltip\");\n  }\n\n  toggle(event) {\n    event.preventDefault();\n\n    this.mapController.toggleBuildingImagesLock();\n    this.#updateIcon();\n    this.#updateTooltip();\n    this.#updateButtonState();\n  }\n\n  #updateIcon() {\n    if (!this.hasIconTarget) return;\n\n    const locked = this.mapController.buildingImagesLocked;\n    this.iconTarget.classList.toggle(\"fa-lock\", locked);\n    this.iconTarget.classList.toggle(\"fa-unlock\", !locked);\n  }\n\n  #updateTooltip() {\n    const controller = this.tooltipController;\n    if (!controller) return;\n\n    const locked = this.mapController.buildingImagesLocked;\n    controller.contentValue = locked ? this.tooltipLockedValue : this.tooltipUnlockedValue;\n  }\n\n  #updateButtonState() {\n    const locked = this.mapController.buildingImagesLocked;\n    this.element.classList.toggle(\"ol-map__btn--active\", locked);\n  }\n}\n", "import * as animate from \"./animate\";\n\n// Sometimes you want to do something like validation errors in\n// JavaScript.  This class provides a simple way to manage errors\n// and display them in an IR alert element.\n//\n// The class accepts a reference to the IR alert element, probably\n// placed somewhere on the page with a `.d-none` class applied to\n// it.\n//\n// Commonly you'll do something like the following in Stimulus\n// controller:\n//\n// submit(event) {\n//   if (!this.isValid) return;\n//   // ... do something if valid\n// }\n//\n// get isValid() {\n//   const errors = new AlertErrorManager(this.errorMessageTarget);\n//\n//   if (this.myFieldTarget.value === \"\") {\n//     errors.add(\"Please enter a value);\n//   }\n//\n//   errors.showHide();\n//\n//   return errors.empty;\n// }\nexport default class AlertErrorManager {\n  errors = [];\n\n  constructor(errorsAlertElem) {\n    this.errorsAlertElem = errorsAlertElem;\n  }\n\n  add(error) {\n    this.errors.push(error);\n  }\n\n  get has() {\n    return this.length > 0;\n  }\n\n  get empty() {\n    return this.length === 0;\n  }\n\n  get length() {\n    return this.errors.length;\n  }\n\n  show() {\n    if (this.length === 1) {\n      this.errorContentContainer.innerHTML = this.errors[0];\n    } else if (this.length > 1) {\n      this.errorContentContainer.innerHTML = `<ul><li>${this.errors.join(\"</li><li>\")}</li></ul>`;\n    }\n\n    animate.show(this.errorsAlertElem);\n  }\n\n  hide() {\n    this.errorContentContainer.innerHTML = \"\";\n    animate.hide(this.errorsAlertElem);\n  }\n\n  showHide() {\n    this.has ? this.show() : this.hide();\n  }\n\n  get errorContentContainer() {\n    return this.errorsAlertElem.querySelector(\".ir-alert__content\");\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\n\nimport * as animate from \"../../../helpers/animate\";\nimport AlertErrorManager from \"../../../helpers/alert-error-manager\";\nimport { flashlightAndRemoveClass } from \"../../../helpers/app\";\n\nexport function calculateFeetPerPixel({ imageInches, realFeet, imageDpi }) {\n  const realInches = realFeet * 12;\n  const scaleFactorInchPerInch = realInches / imageInches;\n  const feetPerPixel = scaleFactorInchPerInch / imageDpi / 12;\n\n  return feetPerPixel;\n}\n\nexport default class extends Controller {\n  static targets = [\n    \"imageInchesField\",\n    \"realFeetField\",\n    \"feetPerPixelField\",\n    \"calculateErrorMessage\",\n    \"addToMapErrorMessage\",\n    \"imageDisplay\",\n    \"imageDimensions\",\n    \"dpiDisplay\",\n    \"dpiInfoIcon\",\n  ];\n\n  static outlets = [\"da--layout-editor--scale-building-image\"];\n\n  // This is used in a dialog, which is rendered in the DOM and then moved to be a child of the\n  // body element, which results in a double connect.  We only want to connect this controller\n  // once, so we use this flag to check if we've already connected.\n  connectedOnce = false;\n\n  imageData = null;\n\n  connect() {\n    if (!this.connectedOnce) {\n      this.connectedOnce = true;\n      return;\n    }\n\n    this.addEnterHandlers();\n  }\n\n  disconnect() {\n    this.removeEnterHandlers();\n  }\n\n  setImage(imageData) {\n    this.imageData = imageData;\n\n    this.clearFields();\n\n    this.imageDisplayTarget.src = imageData.imagePath;\n\n    this.imageDimensionsTarget.textContent = `${imageData.width} \u00D7 ${imageData.height} px`;\n\n    const dpi = imageData.dpi || 72;\n    this.dpiDisplayTarget.textContent = `${dpi} DPI`;\n\n    if (dpi !== 72) {\n      this.dpiInfoIconTarget.classList.remove(\"d-none\");\n    } else {\n      this.dpiInfoIconTarget.classList.add(\"d-none\");\n    }\n\n    return true;\n  }\n\n  addEnterHandlers() {\n    this.imageInchesFieldTarget.addEventListener(\"keydown\", this.enterCalculateHandler);\n    this.realFeetFieldTarget.addEventListener(\"keydown\", this.enterCalculateHandler);\n  }\n\n  enterCalculateHandler = (event) => {\n    if (event.key === \"Enter\") {\n      this.calculate();\n    }\n  };\n\n  removeEnterHandlers() {\n    this.imageInchesFieldTarget.removeEventListener(\"keydown\", this.enterCalculateHandler);\n    this.realFeetFieldTarget.removeEventListener(\"keydown\", this.enterCalculateHandler);\n  }\n\n  calculate() {\n    if (!this.isValid) return;\n\n    const feetPerPixel = calculateFeetPerPixel({\n      imageInches: this.imageInches,\n      realFeet: this.realFeet,\n      imageDpi: this.imageDpi,\n    });\n\n    this.feetPerPixelFieldTarget.value = feetPerPixel;\n\n    flashlightAndRemoveClass(this.feetPerPixelFieldTarget);\n  }\n\n  get imageInches() {\n    return parseFloat(this.imageInchesFieldTarget.value);\n  }\n\n  get realFeet() {\n    return parseFloat(this.realFeetFieldTarget.value);\n  }\n\n  get imageDpi() {\n    return this.imageData?.dpi || 72;\n  }\n\n  get feetPerPixel() {\n    return parseFloat(this.feetPerPixelFieldTarget.value);\n  }\n\n  get isValid() {\n    const errors = new AlertErrorManager(this.calculateErrorMessageTarget);\n\n    if (isNaN(this.imageInches) || this.imageInches === 0) {\n      errors.add(\"Please enter a value for the image scale\");\n    }\n\n    if (isNaN(this.realFeet) || this.realFeet === 0) {\n      errors.add(\"Please enter a value for the real scale\");\n    }\n\n    errors.showHide();\n\n    return errors.empty;\n  }\n\n  addScaledToMap(_event) {\n    const outlet = this.daLayoutEditorScaleBuildingImageOutlet;\n\n    const errors = new AlertErrorManager(this.addToMapErrorMessageTarget);\n    const feetPerPixel = this.feetPerPixel;\n\n    if (isNaN(feetPerPixel) || feetPerPixel === 0) {\n      errors.add(\"Please enter a value for the feet per pixel or use the calculator above to calculate the value\");\n    }\n\n    errors.showHide();\n\n    if (errors.has) return;\n\n    outlet.addManualScaledToMap(feetPerPixel);\n\n    this.clearFields();\n  }\n\n  clearFields() {\n    this.imageInchesFieldTarget.value = \"\";\n    this.realFeetFieldTarget.value = \"\";\n    this.feetPerPixelFieldTarget.value = \"\";\n  }\n\n  hideCalculateError() {\n    animate.hide(this.calculateErrorMessageTarget);\n  }\n\n  showCalculateError() {\n    animate.show(this.calculateErrorMessageTarget);\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport { isVisible } from \"../../../helpers/app\";\nimport * as animate from \"../../../helpers/animate\";\nimport * as store from \"../../../helpers/local-store\";\n\nexport default class MapLegendController extends Controller {\n  static targets = [\"list\", \"toggleIcon\"];\n\n  storeKey = \"pr-map-legend-collapsed\";\n\n  connect() {\n    if (store.has(this.storeKey)) {\n      if (store.get(this.storeKey)) {\n        this.hide();\n      } else {\n        this.show();\n      }\n    } else {\n      this.show();\n    }\n  }\n\n  toggle(event) {\n    event.preventDefault();\n\n    if (isVisible(this.listTarget)) {\n      this.hide();\n      store.set(this.storeKey, true);\n    } else {\n      store.set(this.storeKey, false);\n      this.show();\n    }\n  }\n\n  hide() {\n    animate.hide(this.listTarget, { fadeOut: false });\n    this.toggleIconTarget.classList.add(\"fa-circle-chevron-up\");\n    this.toggleIconTarget.classList.remove(\"fa-circle-chevron-down\");\n  }\n\n  show() {\n    animate.show(this.listTarget);\n    this.toggleIconTarget.classList.add(\"fa-circle-chevron-down\");\n    this.toggleIconTarget.classList.remove(\"fa-circle-chevron-up\");\n  }\n}\n", "const methods = {}\nconst names = []\n\nexport function registerMethods(name, m) {\n  if (Array.isArray(name)) {\n    for (const _name of name) {\n      registerMethods(_name, m)\n    }\n    return\n  }\n\n  if (typeof name === 'object') {\n    for (const _name in name) {\n      registerMethods(_name, name[_name])\n    }\n    return\n  }\n\n  addMethodNames(Object.getOwnPropertyNames(m))\n  methods[name] = Object.assign(methods[name] || {}, m)\n}\n\nexport function getMethodsFor(name) {\n  return methods[name] || {}\n}\n\nexport function getMethodNames() {\n  return [...new Set(names)]\n}\n\nexport function addMethodNames(_names) {\n  names.push(..._names)\n}\n", "'use strict';\nmodule.exports = function (exec) {\n  try {\n    return !!exec();\n  } catch (error) {\n    return true;\n  }\n};\n", "'use strict';\nvar fails = require('../internals/fails');\n\nmodule.exports = !fails(function () {\n  // eslint-disable-next-line es/no-function-prototype-bind -- safe\n  var test = function () { /* empty */ }.bind();\n  // eslint-disable-next-line no-prototype-builtins -- safe\n  return typeof test != 'function' || test.hasOwnProperty('prototype');\n});\n", "'use strict';\nvar NATIVE_BIND = require('../internals/function-bind-native');\n\nvar FunctionPrototype = Function.prototype;\nvar call = FunctionPrototype.call;\n// eslint-disable-next-line es/no-function-prototype-bind -- safe\nvar uncurryThisWithBind = NATIVE_BIND && FunctionPrototype.bind.bind(call, call);\n\nmodule.exports = NATIVE_BIND ? uncurryThisWithBind : function (fn) {\n  return function () {\n    return call.apply(fn, arguments);\n  };\n};\n", "'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\n\nmodule.exports = uncurryThis({}.isPrototypeOf);\n", "'use strict';\nvar check = function (it) {\n  return it && it.Math === Math && it;\n};\n\n// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nmodule.exports =\n  // eslint-disable-next-line es/no-global-this -- safe\n  check(typeof globalThis == 'object' && globalThis) ||\n  check(typeof window == 'object' && window) ||\n  // eslint-disable-next-line no-restricted-globals -- safe\n  check(typeof self == 'object' && self) ||\n  check(typeof global == 'object' && global) ||\n  check(typeof this == 'object' && this) ||\n  // eslint-disable-next-line no-new-func -- fallback\n  (function () { return this; })() || Function('return this')();\n", "'use strict';\nvar NATIVE_BIND = require('../internals/function-bind-native');\n\nvar FunctionPrototype = Function.prototype;\nvar apply = FunctionPrototype.apply;\nvar call = FunctionPrototype.call;\n\n// eslint-disable-next-line es/no-function-prototype-bind, es/no-reflect -- safe\nmodule.exports = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call.bind(apply) : function () {\n  return call.apply(apply, arguments);\n});\n", "'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\n\nvar toString = uncurryThis({}.toString);\nvar stringSlice = uncurryThis(''.slice);\n\nmodule.exports = function (it) {\n  return stringSlice(toString(it), 8, -1);\n};\n", "'use strict';\nvar classofRaw = require('../internals/classof-raw');\nvar uncurryThis = require('../internals/function-uncurry-this');\n\nmodule.exports = function (fn) {\n  // Nashorn bug:\n  //   https://github.com/zloirock/core-js/issues/1128\n  //   https://github.com/zloirock/core-js/issues/1130\n  if (classofRaw(fn) === 'Function') return uncurryThis(fn);\n};\n", "'use strict';\n// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot\nvar documentAll = typeof document == 'object' && document.all;\n\n// `IsCallable` abstract operation\n// https://tc39.es/ecma262/#sec-iscallable\n// eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing\nmodule.exports = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {\n  return typeof argument == 'function' || argument === documentAll;\n} : function (argument) {\n  return typeof argument == 'function';\n};\n", "'use strict';\nvar fails = require('../internals/fails');\n\n// Detect IE8's incomplete defineProperty implementation\nmodule.exports = !fails(function () {\n  // eslint-disable-next-line es/no-object-defineproperty -- required for testing\n  return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;\n});\n", "'use strict';\nvar NATIVE_BIND = require('../internals/function-bind-native');\n\nvar call = Function.prototype.call;\n// eslint-disable-next-line es/no-function-prototype-bind -- safe\nmodule.exports = NATIVE_BIND ? call.bind(call) : function () {\n  return call.apply(call, arguments);\n};\n", "'use strict';\nvar $propertyIsEnumerable = {}.propertyIsEnumerable;\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// Nashorn ~ JDK8 bug\nvar NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1);\n\n// `Object.prototype.propertyIsEnumerable` method implementation\n// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable\nexports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {\n  var descriptor = getOwnPropertyDescriptor(this, V);\n  return !!descriptor && descriptor.enumerable;\n} : $propertyIsEnumerable;\n", "'use strict';\nmodule.exports = function (bitmap, value) {\n  return {\n    enumerable: !(bitmap & 1),\n    configurable: !(bitmap & 2),\n    writable: !(bitmap & 4),\n    value: value\n  };\n};\n", "'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar fails = require('../internals/fails');\nvar classof = require('../internals/classof-raw');\n\nvar $Object = Object;\nvar split = uncurryThis(''.split);\n\n// fallback for non-array-like ES3 and non-enumerable old V8 strings\nmodule.exports = fails(function () {\n  // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346\n  // eslint-disable-next-line no-prototype-builtins -- safe\n  return !$Object('z').propertyIsEnumerable(0);\n}) ? function (it) {\n  return classof(it) === 'String' ? split(it, '') : $Object(it);\n} : $Object;\n", "'use strict';\n// we can't use just `it == null` since of `document.all` special case\n// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec\nmodule.exports = function (it) {\n  return it === null || it === undefined;\n};\n", "'use strict';\nvar isNullOrUndefined = require('../internals/is-null-or-undefined');\n\nvar $TypeError = TypeError;\n\n// `RequireObjectCoercible` abstract operation\n// https://tc39.es/ecma262/#sec-requireobjectcoercible\nmodule.exports = function (it) {\n  if (isNullOrUndefined(it)) throw new $TypeError(\"Can't call method on \" + it);\n  return it;\n};\n", "'use strict';\n// toObject with fallback for non-array-like ES3 strings\nvar IndexedObject = require('../internals/indexed-object');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\nmodule.exports = function (it) {\n  return IndexedObject(requireObjectCoercible(it));\n};\n", "'use strict';\nvar isCallable = require('../internals/is-callable');\n\nmodule.exports = function (it) {\n  return typeof it == 'object' ? it !== null : isCallable(it);\n};\n", "'use strict';\nmodule.exports = {};\n", "'use strict';\nvar path = require('../internals/path');\nvar globalThis = require('../internals/global-this');\nvar isCallable = require('../internals/is-callable');\n\nvar aFunction = function (variable) {\n  return isCallable(variable) ? variable : undefined;\n};\n\nmodule.exports = function (namespace, method) {\n  return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(globalThis[namespace])\n    : path[namespace] && path[namespace][method] || globalThis[namespace] && globalThis[namespace][method];\n};\n", "'use strict';\nvar globalThis = require('../internals/global-this');\n\nvar navigator = globalThis.navigator;\nvar userAgent = navigator && navigator.userAgent;\n\nmodule.exports = userAgent ? String(userAgent) : '';\n", "'use strict';\nvar globalThis = require('../internals/global-this');\nvar userAgent = require('../internals/environment-user-agent');\n\nvar process = globalThis.process;\nvar Deno = globalThis.Deno;\nvar versions = process && process.versions || Deno && Deno.version;\nvar v8 = versions && versions.v8;\nvar match, version;\n\nif (v8) {\n  match = v8.split('.');\n  // in old Chrome, versions of V8 isn't V8 = Chrome / 10\n  // but their correct versions are not interesting for us\n  version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);\n}\n\n// BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`\n// so check `userAgent` even if `.v8` exists, but 0\nif (!version && userAgent) {\n  match = userAgent.match(/Edge\\/(\\d+)/);\n  if (!match || match[1] >= 74) {\n    match = userAgent.match(/Chrome\\/(\\d+)/);\n    if (match) version = +match[1];\n  }\n}\n\nmodule.exports = version;\n", "'use strict';\n/* eslint-disable es/no-symbol -- required for testing */\nvar V8_VERSION = require('../internals/environment-v8-version');\nvar fails = require('../internals/fails');\nvar globalThis = require('../internals/global-this');\n\nvar $String = globalThis.String;\n\n// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing\nmodule.exports = !!Object.getOwnPropertySymbols && !fails(function () {\n  var symbol = Symbol('symbol detection');\n  // Chrome 38 Symbol has incorrect toString conversion\n  // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances\n  // nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will,\n  // of course, fail.\n  return !$String(symbol) || !(Object(symbol) instanceof Symbol) ||\n    // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances\n    !Symbol.sham && V8_VERSION && V8_VERSION < 41;\n});\n", "'use strict';\n/* eslint-disable es/no-symbol -- required for testing */\nvar NATIVE_SYMBOL = require('../internals/symbol-constructor-detection');\n\nmodule.exports = NATIVE_SYMBOL &&\n  !Symbol.sham &&\n  typeof Symbol.iterator == 'symbol';\n", "'use strict';\nvar getBuiltIn = require('../internals/get-built-in');\nvar isCallable = require('../internals/is-callable');\nvar isPrototypeOf = require('../internals/object-is-prototype-of');\nvar USE_SYMBOL_AS_UID = require('../internals/use-symbol-as-uid');\n\nvar $Object = Object;\n\nmodule.exports = USE_SYMBOL_AS_UID ? function (it) {\n  return typeof it == 'symbol';\n} : function (it) {\n  var $Symbol = getBuiltIn('Symbol');\n  return isCallable($Symbol) && isPrototypeOf($Symbol.prototype, $Object(it));\n};\n", "'use strict';\nvar $String = String;\n\nmodule.exports = function (argument) {\n  try {\n    return $String(argument);\n  } catch (error) {\n    return 'Object';\n  }\n};\n", "'use strict';\nvar isCallable = require('../internals/is-callable');\nvar tryToString = require('../internals/try-to-string');\n\nvar $TypeError = TypeError;\n\n// `Assert: IsCallable(argument) is true`\nmodule.exports = function (argument) {\n  if (isCallable(argument)) return argument;\n  throw new $TypeError(tryToString(argument) + ' is not a function');\n};\n", "'use strict';\nvar aCallable = require('../internals/a-callable');\nvar isNullOrUndefined = require('../internals/is-null-or-undefined');\n\n// `GetMethod` abstract operation\n// https://tc39.es/ecma262/#sec-getmethod\nmodule.exports = function (V, P) {\n  var func = V[P];\n  return isNullOrUndefined(func) ? undefined : aCallable(func);\n};\n", "'use strict';\nvar call = require('../internals/function-call');\nvar isCallable = require('../internals/is-callable');\nvar isObject = require('../internals/is-object');\n\nvar $TypeError = TypeError;\n\n// `OrdinaryToPrimitive` abstract operation\n// https://tc39.es/ecma262/#sec-ordinarytoprimitive\nmodule.exports = function (input, pref) {\n  var fn, val;\n  if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;\n  if (isCallable(fn = input.valueOf) && !isObject(val = call(fn, input))) return val;\n  if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;\n  throw new $TypeError(\"Can't convert object to primitive value\");\n};\n", "'use strict';\nmodule.exports = true;\n", "'use strict';\nvar globalThis = require('../internals/global-this');\n\n// eslint-disable-next-line es/no-object-defineproperty -- safe\nvar defineProperty = Object.defineProperty;\n\nmodule.exports = function (key, value) {\n  try {\n    defineProperty(globalThis, key, { value: value, configurable: true, writable: true });\n  } catch (error) {\n    globalThis[key] = value;\n  } return value;\n};\n", "'use strict';\nvar IS_PURE = require('../internals/is-pure');\nvar globalThis = require('../internals/global-this');\nvar defineGlobalProperty = require('../internals/define-global-property');\n\nvar SHARED = '__core-js_shared__';\nvar store = module.exports = globalThis[SHARED] || defineGlobalProperty(SHARED, {});\n\n(store.versions || (store.versions = [])).push({\n  version: '3.49.0',\n  mode: IS_PURE ? 'pure' : 'global',\n  copyright: '© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.',\n  license: 'https://github.com/zloirock/core-js/blob/v3.49.0/LICENSE',\n  source: 'https://github.com/zloirock/core-js'\n});\n", "'use strict';\nvar store = require('../internals/shared-store');\n\nmodule.exports = function (key, value) {\n  return store[key] || (store[key] = value || {});\n};\n", "'use strict';\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\nvar $Object = Object;\n\n// `ToObject` abstract operation\n// https://tc39.es/ecma262/#sec-toobject\nmodule.exports = function (argument) {\n  return $Object(requireObjectCoercible(argument));\n};\n", "'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar toObject = require('../internals/to-object');\n\nvar hasOwnProperty = uncurryThis({}.hasOwnProperty);\n\n// `HasOwnProperty` abstract operation\n// https://tc39.es/ecma262/#sec-hasownproperty\n// eslint-disable-next-line es/no-object-hasown -- safe\nmodule.exports = Object.hasOwn || function hasOwn(it, key) {\n  return hasOwnProperty(toObject(it), key);\n};\n", "'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\n\nvar id = 0;\nvar postfix = Math.random();\nvar toString = uncurryThis(1.1.toString);\n\nmodule.exports = function (key) {\n  return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);\n};\n", "'use strict';\nvar globalThis = require('../internals/global-this');\nvar shared = require('../internals/shared');\nvar hasOwn = require('../internals/has-own-property');\nvar uid = require('../internals/uid');\nvar NATIVE_SYMBOL = require('../internals/symbol-constructor-detection');\nvar USE_SYMBOL_AS_UID = require('../internals/use-symbol-as-uid');\n\nvar Symbol = globalThis.Symbol;\nvar WellKnownSymbolsStore = shared('wks');\nvar createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol['for'] || Symbol : Symbol && Symbol.withoutSetter || uid;\n\nmodule.exports = function (name) {\n  if (!hasOwn(WellKnownSymbolsStore, name)) {\n    WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn(Symbol, name)\n      ? Symbol[name]\n      : createWellKnownSymbol('Symbol.' + name);\n  } return WellKnownSymbolsStore[name];\n};\n", "'use strict';\nvar call = require('../internals/function-call');\nvar isObject = require('../internals/is-object');\nvar isSymbol = require('../internals/is-symbol');\nvar getMethod = require('../internals/get-method');\nvar ordinaryToPrimitive = require('../internals/ordinary-to-primitive');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar $TypeError = TypeError;\nvar TO_PRIMITIVE = wellKnownSymbol('toPrimitive');\n\n// `ToPrimitive` abstract operation\n// https://tc39.es/ecma262/#sec-toprimitive\nmodule.exports = function (input, pref) {\n  if (!isObject(input) || isSymbol(input)) return input;\n  var exoticToPrim = getMethod(input, TO_PRIMITIVE);\n  var result;\n  if (exoticToPrim) {\n    if (pref === undefined) pref = 'default';\n    result = call(exoticToPrim, input, pref);\n    if (!isObject(result) || isSymbol(result)) return result;\n    throw new $TypeError(\"Can't convert object to primitive value\");\n  }\n  if (pref === undefined) pref = 'number';\n  return ordinaryToPrimitive(input, pref);\n};\n", "'use strict';\nvar toPrimitive = require('../internals/to-primitive');\nvar isSymbol = require('../internals/is-symbol');\n\n// `ToPropertyKey` abstract operation\n// https://tc39.es/ecma262/#sec-topropertykey\nmodule.exports = function (argument) {\n  var key = toPrimitive(argument, 'string');\n  return isSymbol(key) ? key : key + '';\n};\n", "'use strict';\nvar globalThis = require('../internals/global-this');\nvar isObject = require('../internals/is-object');\n\nvar document = globalThis.document;\n// typeof document.createElement is 'object' in old IE\nvar EXISTS = isObject(document) && isObject(document.createElement);\n\nmodule.exports = function (it) {\n  return EXISTS ? document.createElement(it) : {};\n};\n", "'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar fails = require('../internals/fails');\nvar createElement = require('../internals/document-create-element');\n\n// Thanks to IE8 for its funny defineProperty\nmodule.exports = !DESCRIPTORS && !fails(function () {\n  // eslint-disable-next-line es/no-object-defineproperty -- required for testing\n  return Object.defineProperty(createElement('div'), 'a', {\n    get: function () { return 7; }\n  }).a !== 7;\n});\n", "'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar call = require('../internals/function-call');\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar toPropertyKey = require('../internals/to-property-key');\nvar hasOwn = require('../internals/has-own-property');\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define');\n\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// `Object.getOwnPropertyDescriptor` method\n// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor\nexports.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {\n  O = toIndexedObject(O);\n  P = toPropertyKey(P);\n  if (IE8_DOM_DEFINE) try {\n    return $getOwnPropertyDescriptor(O, P);\n  } catch (error) { /* empty */ }\n  if (hasOwn(O, P)) return createPropertyDescriptor(!call(propertyIsEnumerableModule.f, O, P), O[P]);\n};\n", "'use strict';\nvar fails = require('../internals/fails');\nvar isCallable = require('../internals/is-callable');\n\nvar replacement = /#|\\.prototype\\./;\n\nvar isForced = function (feature, detection) {\n  var value = data[normalize(feature)];\n  return value === POLYFILL ? true\n    : value === NATIVE ? false\n    : isCallable(detection) ? fails(detection)\n    : !!detection;\n};\n\nvar normalize = isForced.normalize = function (string) {\n  return String(string).replace(replacement, '.').toLowerCase();\n};\n\nvar data = isForced.data = {};\nvar NATIVE = isForced.NATIVE = 'N';\nvar POLYFILL = isForced.POLYFILL = 'P';\n\nmodule.exports = isForced;\n", "'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this-clause');\nvar aCallable = require('../internals/a-callable');\nvar NATIVE_BIND = require('../internals/function-bind-native');\n\nvar bind = uncurryThis(uncurryThis.bind);\n\n// optional / simple context binding\nmodule.exports = function (fn, that) {\n  aCallable(fn);\n  return that === undefined ? fn : NATIVE_BIND ? bind(fn, that) : function (/* ...args */) {\n    return fn.apply(that, arguments);\n  };\n};\n", "'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar fails = require('../internals/fails');\n\n// V8 ~ Chrome 36-\n// https://bugs.chromium.org/p/v8/issues/detail?id=3334\nmodule.exports = DESCRIPTORS && fails(function () {\n  // eslint-disable-next-line es/no-object-defineproperty -- required for testing\n  return Object.defineProperty(function () { /* empty */ }, 'prototype', {\n    value: 42,\n    writable: false\n  }).prototype !== 42;\n});\n", "'use strict';\nvar isObject = require('../internals/is-object');\n\nvar $String = String;\nvar $TypeError = TypeError;\n\n// `Assert: Type(argument) is Object`\nmodule.exports = function (argument) {\n  if (isObject(argument)) return argument;\n  throw new $TypeError($String(argument) + ' is not an object');\n};\n", "'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define');\nvar V8_PROTOTYPE_DEFINE_BUG = require('../internals/v8-prototype-define-bug');\nvar anObject = require('../internals/an-object');\nvar toPropertyKey = require('../internals/to-property-key');\n\nvar $TypeError = TypeError;\n// eslint-disable-next-line es/no-object-defineproperty -- safe\nvar $defineProperty = Object.defineProperty;\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar ENUMERABLE = 'enumerable';\nvar CONFIGURABLE = 'configurable';\nvar WRITABLE = 'writable';\n\n// `Object.defineProperty` method\n// https://tc39.es/ecma262/#sec-object.defineproperty\nexports.f = DESCRIPTORS ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {\n  anObject(O);\n  P = toPropertyKey(P);\n  anObject(Attributes);\n  if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {\n    var current = $getOwnPropertyDescriptor(O, P);\n    if (current && current[WRITABLE]) {\n      O[P] = Attributes.value;\n      Attributes = {\n        configurable: CONFIGURABLE in Attributes ? Attributes[CONFIGURABLE] : current[CONFIGURABLE],\n        enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],\n        writable: false\n      };\n    }\n  } return $defineProperty(O, P, Attributes);\n} : $defineProperty : function defineProperty(O, P, Attributes) {\n  anObject(O);\n  P = toPropertyKey(P);\n  anObject(Attributes);\n  if (IE8_DOM_DEFINE) try {\n    return $defineProperty(O, P, Attributes);\n  } catch (error) { /* empty */ }\n  if ('get' in Attributes || 'set' in Attributes) throw new $TypeError('Accessors not supported');\n  if ('value' in Attributes) O[P] = Attributes.value;\n  return O;\n};\n", "'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar definePropertyModule = require('../internals/object-define-property');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nmodule.exports = DESCRIPTORS ? function (object, key, value) {\n  return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));\n} : function (object, key, value) {\n  object[key] = value;\n  return object;\n};\n", "'use strict';\nvar globalThis = require('../internals/global-this');\nvar apply = require('../internals/function-apply');\nvar uncurryThis = require('../internals/function-uncurry-this-clause');\nvar isCallable = require('../internals/is-callable');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar isForced = require('../internals/is-forced');\nvar path = require('../internals/path');\nvar bind = require('../internals/function-bind-context');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar hasOwn = require('../internals/has-own-property');\n// add debugging info\nrequire('../internals/shared-store');\n\nvar wrapConstructor = function (NativeConstructor) {\n  var Wrapper = function (a, b, c) {\n    if (this instanceof Wrapper) {\n      switch (arguments.length) {\n        case 0: return new NativeConstructor();\n        case 1: return new NativeConstructor(a);\n        case 2: return new NativeConstructor(a, b);\n      } return new NativeConstructor(a, b, c);\n    } return apply(NativeConstructor, this, arguments);\n  };\n  Wrapper.prototype = NativeConstructor.prototype;\n  return Wrapper;\n};\n\n/*\n  options.target         - name of the target object\n  options.global         - target is the global object\n  options.stat           - export as static methods of target\n  options.proto          - export as prototype methods of target\n  options.real           - real prototype method for the `pure` version\n  options.forced         - export even if the native feature is available\n  options.bind           - bind methods to the target, required for the `pure` version\n  options.wrap           - wrap constructors to preventing global pollution, required for the `pure` version\n  options.unsafe         - use the simple assignment of property instead of delete + defineProperty\n  options.sham           - add a flag to not completely full polyfills\n  options.enumerable     - export as enumerable property\n  options.dontCallGetSet - prevent calling a getter on target\n  options.name           - the .name of the function if it does not match the key\n*/\nmodule.exports = function (options, source) {\n  var TARGET = options.target;\n  var GLOBAL = options.global;\n  var STATIC = options.stat;\n  var PROTO = options.proto;\n\n  var nativeSource = GLOBAL ? globalThis : STATIC ? globalThis[TARGET] : globalThis[TARGET] && globalThis[TARGET].prototype;\n\n  var target = GLOBAL ? path : path[TARGET] || createNonEnumerableProperty(path, TARGET, {})[TARGET];\n  var targetPrototype = target.prototype;\n\n  var FORCED, USE_NATIVE, VIRTUAL_PROTOTYPE;\n  var key, sourceProperty, targetProperty, nativeProperty, resultProperty, descriptor;\n\n  for (key in source) {\n    FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);\n    // contains in native\n    USE_NATIVE = !FORCED && nativeSource && hasOwn(nativeSource, key);\n\n    targetProperty = target[key];\n\n    if (USE_NATIVE) if (options.dontCallGetSet) {\n      descriptor = getOwnPropertyDescriptor(nativeSource, key);\n      nativeProperty = descriptor && descriptor.value;\n    } else nativeProperty = nativeSource[key];\n\n    // export native or implementation\n    sourceProperty = (USE_NATIVE && nativeProperty) ? nativeProperty : source[key];\n\n    if (!FORCED && !PROTO && typeof targetProperty == typeof sourceProperty) continue;\n\n    // bind methods to global for calling from export context\n    if (options.bind && USE_NATIVE) resultProperty = bind(sourceProperty, globalThis);\n    // wrap global constructors for prevent changes in this version\n    else if (options.wrap && USE_NATIVE) resultProperty = wrapConstructor(sourceProperty);\n    // make static versions for prototype methods\n    else if (PROTO && isCallable(sourceProperty)) resultProperty = uncurryThis(sourceProperty);\n    // default case\n    else resultProperty = sourceProperty;\n\n    // add a flag to not completely full polyfills\n    if (options.sham || (sourceProperty && sourceProperty.sham) || (targetProperty && targetProperty.sham)) {\n      createNonEnumerableProperty(resultProperty, 'sham', true);\n    }\n\n    createNonEnumerableProperty(target, key, resultProperty);\n\n    if (PROTO) {\n      VIRTUAL_PROTOTYPE = TARGET + 'Prototype';\n      if (!hasOwn(path, VIRTUAL_PROTOTYPE)) {\n        createNonEnumerableProperty(path, VIRTUAL_PROTOTYPE, {});\n      }\n      // export virtual prototype methods\n      createNonEnumerableProperty(path[VIRTUAL_PROTOTYPE], key, sourceProperty);\n      // export real prototype methods\n      if (options.real && targetPrototype && (FORCED || !targetPrototype[key])) {\n        createNonEnumerableProperty(targetPrototype, key, sourceProperty);\n      }\n    }\n  }\n};\n", "'use strict';\nvar ceil = Math.ceil;\nvar floor = Math.floor;\n\n// `Math.trunc` method\n// https://tc39.es/ecma262/#sec-math.trunc\n// eslint-disable-next-line es/no-math-trunc -- safe\nmodule.exports = Math.trunc || function trunc(x) {\n  var n = +x;\n  return (n > 0 ? floor : ceil)(n);\n};\n", "'use strict';\nvar trunc = require('../internals/math-trunc');\n\n// `ToIntegerOrInfinity` abstract operation\n// https://tc39.es/ecma262/#sec-tointegerorinfinity\nmodule.exports = function (argument) {\n  var number = +argument;\n  // eslint-disable-next-line no-self-compare -- NaN check\n  return number !== number || number === 0 ? 0 : trunc(number);\n};\n", "'use strict';\nvar toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\n\nvar max = Math.max;\nvar min = Math.min;\n\n// Helper for a popular repeating case of the spec:\n// Let integer be ? ToInteger(index).\n// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).\nmodule.exports = function (index, length) {\n  var integer = toIntegerOrInfinity(index);\n  return integer < 0 ? max(integer + length, 0) : min(integer, length);\n};\n", "'use strict';\nvar toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\n\nvar min = Math.min;\n\n// `ToLength` abstract operation\n// https://tc39.es/ecma262/#sec-tolength\nmodule.exports = function (argument) {\n  var len = toIntegerOrInfinity(argument);\n  return len > 0 ? min(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991\n};\n", "'use strict';\nvar toLength = require('../internals/to-length');\n\n// `LengthOfArrayLike` abstract operation\n// https://tc39.es/ecma262/#sec-lengthofarraylike\nmodule.exports = function (obj) {\n  return toLength(obj.length);\n};\n", "'use strict';\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\n\n// `Array.prototype.{ indexOf, includes }` methods implementation\nvar createMethod = function (IS_INCLUDES) {\n  return function ($this, el, fromIndex) {\n    var O = toIndexedObject($this);\n    var length = lengthOfArrayLike(O);\n    if (length === 0) return !IS_INCLUDES && -1;\n    var index = toAbsoluteIndex(fromIndex, length);\n    var value;\n    // Array#includes uses SameValueZero equality algorithm\n    // eslint-disable-next-line no-self-compare -- NaN check\n    if (IS_INCLUDES && el !== el) while (length > index) {\n      value = O[index++];\n      // eslint-disable-next-line no-self-compare -- NaN check\n      if (value !== value) return true;\n    // Array#indexOf ignores holes, Array#includes - not\n    } else for (;length > index; index++) {\n      if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;\n    } return !IS_INCLUDES && -1;\n  };\n};\n\nmodule.exports = {\n  // `Array.prototype.includes` method\n  // https://tc39.es/ecma262/#sec-array.prototype.includes\n  includes: createMethod(true),\n  // `Array.prototype.indexOf` method\n  // https://tc39.es/ecma262/#sec-array.prototype.indexof\n  indexOf: createMethod(false)\n};\n", "'use strict';\nmodule.exports = function () { /* empty */ };\n", "'use strict';\nvar $ = require('../internals/export');\nvar $includes = require('../internals/array-includes').includes;\nvar fails = require('../internals/fails');\nvar addToUnscopables = require('../internals/add-to-unscopables');\n\n// FF99+ bug\nvar BROKEN_ON_SPARSE = fails(function () {\n  // eslint-disable-next-line es/no-array-prototype-includes -- detection\n  return !Array(1).includes();\n});\n\n// Safari 26.4- bug\nvar BROKEN_ON_SPARSE_WITH_FROM_INDEX = fails(function () {\n  // eslint-disable-next-line no-sparse-arrays, es/no-array-prototype-includes -- detection\n  return [, 1].includes(undefined, 1);\n});\n\n// `Array.prototype.includes` method\n// https://tc39.es/ecma262/#sec-array.prototype.includes\n$({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE || BROKEN_ON_SPARSE_WITH_FROM_INDEX }, {\n  includes: function includes(el /* , fromIndex = 0 */) {\n    return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);\n  }\n});\n\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables('includes');\n", "'use strict';\nvar globalThis = require('../internals/global-this');\nvar path = require('../internals/path');\n\nmodule.exports = function (CONSTRUCTOR, METHOD) {\n  var Namespace = path[CONSTRUCTOR + 'Prototype'];\n  var pureMethod = Namespace && Namespace[METHOD];\n  if (pureMethod) return pureMethod;\n  var NativeConstructor = globalThis[CONSTRUCTOR];\n  var NativePrototype = NativeConstructor && NativeConstructor.prototype;\n  return NativePrototype && NativePrototype[METHOD];\n};\n", "'use strict';\nrequire('../../../modules/es.array.includes');\nvar getBuiltInPrototypeMethod = require('../../../internals/get-built-in-prototype-method');\n\nmodule.exports = getBuiltInPrototypeMethod('Array', 'includes');\n", "'use strict';\nvar isObject = require('../internals/is-object');\nvar classof = require('../internals/classof-raw');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar MATCH = wellKnownSymbol('match');\n\n// `IsRegExp` abstract operation\n// https://tc39.es/ecma262/#sec-isregexp\nmodule.exports = function (it) {\n  var isRegExp;\n  return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classof(it) === 'RegExp');\n};\n", "'use strict';\nvar isRegExp = require('../internals/is-regexp');\n\nvar $TypeError = TypeError;\n\nmodule.exports = function (it) {\n  if (isRegExp(it)) {\n    throw new $TypeError(\"The method doesn't accept regular expressions\");\n  } return it;\n};\n", "'use strict';\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar test = {};\n// eslint-disable-next-line unicorn/no-immediate-mutation -- ES3 syntax limitation\ntest[TO_STRING_TAG] = 'z';\n\nmodule.exports = String(test) === '[object z]';\n", "'use strict';\nvar TO_STRING_TAG_SUPPORT = require('../internals/to-string-tag-support');\nvar isCallable = require('../internals/is-callable');\nvar classofRaw = require('../internals/classof-raw');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar $Object = Object;\n\n// ES3 wrong here\nvar CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) === 'Arguments';\n\n// fallback for IE11 Script Access Denied error\nvar tryGet = function (it, key) {\n  try {\n    return it[key];\n  } catch (error) { /* empty */ }\n};\n\n// getting tag from ES6+ `Object.prototype.toString`\nmodule.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {\n  var O, tag, result;\n  return it === undefined ? 'Undefined' : it === null ? 'Null'\n    // @@toStringTag case\n    : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag\n    // builtinTag case\n    : CORRECT_ARGUMENTS ? classofRaw(O)\n    // ES3 arguments fallback\n    : (result = classofRaw(O)) === 'Object' && isCallable(O.callee) ? 'Arguments' : result;\n};\n", "'use strict';\nvar classof = require('../internals/classof');\n\nvar $String = String;\n\nmodule.exports = function (argument) {\n  if (classof(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string');\n  return $String(argument);\n};\n", "'use strict';\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar MATCH = wellKnownSymbol('match');\n\nmodule.exports = function (METHOD_NAME) {\n  var regexp = /./;\n  try {\n    '/./'[METHOD_NAME](regexp);\n  } catch (error1) {\n    try {\n      regexp[MATCH] = false;\n      return '/./'[METHOD_NAME](regexp);\n    } catch (error2) { /* empty */ }\n  } return false;\n};\n", "'use strict';\nvar $ = require('../internals/export');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar notARegExp = require('../internals/not-a-regexp');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar toString = require('../internals/to-string');\nvar correctIsRegExpLogic = require('../internals/correct-is-regexp-logic');\n\nvar stringIndexOf = uncurryThis(''.indexOf);\n\n// `String.prototype.includes` method\n// https://tc39.es/ecma262/#sec-string.prototype.includes\n$({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {\n  includes: function includes(searchString /* , position = 0 */) {\n    return !!~stringIndexOf(\n      toString(requireObjectCoercible(this)),\n      toString(notARegExp(searchString)),\n      arguments.length > 1 ? arguments[1] : undefined\n    );\n  }\n});\n", "'use strict';\nrequire('../../../modules/es.string.includes');\nvar getBuiltInPrototypeMethod = require('../../../internals/get-built-in-prototype-method');\n\nmodule.exports = getBuiltInPrototypeMethod('String', 'includes');\n", "'use strict';\nvar isPrototypeOf = require('../../internals/object-is-prototype-of');\nvar arrayMethod = require('../array/virtual/includes');\nvar stringMethod = require('../string/virtual/includes');\n\nvar ArrayPrototype = Array.prototype;\nvar StringPrototype = String.prototype;\n\nmodule.exports = function (it) {\n  var own = it.includes;\n  if (it === ArrayPrototype || (isPrototypeOf(ArrayPrototype, it) && own === ArrayPrototype.includes)) return arrayMethod;\n  if (typeof it == 'string' || it === StringPrototype || (isPrototypeOf(StringPrototype, it) && own === StringPrototype.includes)) {\n    return stringMethod;\n  } return own;\n};\n", "'use strict';\nvar parent = require('../../es/instance/includes');\n\nmodule.exports = parent;\n", "// Map function\nexport function map(array, block) {\n  let i\n  const il = array.length\n  const result = []\n\n  for (i = 0; i < il; i++) {\n    result.push(block(array[i]))\n  }\n\n  return result\n}\n\n// Filter function\nexport function filter(array, block) {\n  let i\n  const il = array.length\n  const result = []\n\n  for (i = 0; i < il; i++) {\n    if (block(array[i])) {\n      result.push(array[i])\n    }\n  }\n\n  return result\n}\n\n// Degrees to radians\nexport function radians(d) {\n  return ((d % 360) * Math.PI) / 180\n}\n\n// Radians to degrees\nexport function degrees(r) {\n  return ((r * 180) / Math.PI) % 360\n}\n\n// Convert camel cased string to dash separated\nexport function unCamelCase(s) {\n  return s.replace(/([A-Z])/g, function (m, g) {\n    return '-' + g.toLowerCase()\n  })\n}\n\n// Capitalize first letter of a string\nexport function capitalize(s) {\n  return s.charAt(0).toUpperCase() + s.slice(1)\n}\n\n// Calculate proportional width and height values when necessary\nexport function proportionalSize(element, width, height, box) {\n  if (width == null || height == null) {\n    box = box || element.bbox()\n\n    if (width == null) {\n      width = (box.width / box.height) * height\n    } else if (height == null) {\n      height = (box.height / box.width) * width\n    }\n  }\n\n  return {\n    width: width,\n    height: height\n  }\n}\n\n/**\n * This function adds support for string origins.\n * It searches for an origin in o.origin o.ox and o.originX.\n * This way, origin: {x: 'center', y: 50} can be passed as well as ox: 'center', oy: 50\n **/\nexport function getOrigin(o, element) {\n  const origin = o.origin\n  // First check if origin is in ox or originX\n  let ox = o.ox != null ? o.ox : o.originX != null ? o.originX : 'center'\n  let oy = o.oy != null ? o.oy : o.originY != null ? o.originY : 'center'\n\n  // Then check if origin was used and overwrite in that case\n  if (origin != null) {\n    ;[ox, oy] = Array.isArray(origin)\n      ? origin\n      : typeof origin === 'object'\n        ? [origin.x, origin.y]\n        : [origin, origin]\n  }\n\n  // Make sure to only call bbox when actually needed\n  const condX = typeof ox === 'string'\n  const condY = typeof oy === 'string'\n  if (condX || condY) {\n    const { height, width, x, y } = element.bbox()\n\n    // And only overwrite if string was passed for this specific axis\n    if (condX) {\n      ox = ox.includes('left')\n        ? x\n        : ox.includes('right')\n          ? x + width\n          : x + width / 2\n    }\n\n    if (condY) {\n      oy = oy.includes('top')\n        ? y\n        : oy.includes('bottom')\n          ? y + height\n          : y + height / 2\n    }\n  }\n\n  // Return the origin as it is if it wasn't a string\n  return [ox, oy]\n}\n\nconst descriptiveElements = new Set(['desc', 'metadata', 'title'])\nexport const isDescriptive = (element) =>\n  descriptiveElements.has(element.nodeName)\n\nexport const writeDataToDom = (element, data, defaults = {}) => {\n  const cloned = { ...data }\n\n  for (const key in cloned) {\n    if (cloned[key].valueOf() === defaults[key]) {\n      delete cloned[key]\n    }\n  }\n\n  if (Object.keys(cloned).length) {\n    element.node.setAttribute('data-svgjs', JSON.stringify(cloned)) // see #428\n  } else {\n    element.node.removeAttribute('data-svgjs')\n    element.node.removeAttribute('svgjs:data')\n  }\n}\n", "// Default namespaces\nexport const svg = 'http://www.w3.org/2000/svg'\nexport const html = 'http://www.w3.org/1999/xhtml'\nexport const xmlns = 'http://www.w3.org/2000/xmlns/'\nexport const xlink = 'http://www.w3.org/1999/xlink'\n", "export const globals = {\n  window: typeof window === 'undefined' ? null : window,\n  document: typeof document === 'undefined' ? null : document\n}\n\nexport function registerWindow(win = null, doc = null) {\n  globals.window = win\n  globals.document = doc\n}\n\nexport function withWindow(win, fn) {\n  const oldWindow = globals.window\n  const oldDocument = globals.document\n\n  registerWindow(win, win.document)\n  try {\n    return fn(win, win.document)\n  } finally {\n    registerWindow(oldWindow, oldDocument)\n  }\n}\n\nexport function getWindow() {\n  return globals.window\n}\n", "export default class Base {\n  // constructor (node/*, {extensions = []} */) {\n  //   // this.tags = []\n  //   //\n  //   // for (let extension of extensions) {\n  //   //   extension.setup.call(this, node)\n  //   //   this.tags.push(extension.name)\n  //   // }\n  // }\n}\n", "import { addMethodNames } from './methods.js'\nimport { capitalize } from './utils.js'\nimport { svg } from '../modules/core/namespaces.js'\nimport { globals } from '../utils/window.js'\nimport Base from '../types/Base.js'\n\nconst elements = {}\nexport const root = '___SYMBOL___ROOT___'\n\n// Method for element creation\nexport function create(name, ns = svg) {\n  // create element\n  return globals.document.createElementNS(ns, name)\n}\n\nexport function makeInstance(element, isHTML = false) {\n  if (element instanceof Base) return element\n\n  if (typeof element === 'object') {\n    return adopter(element)\n  }\n\n  if (element == null) {\n    return new elements[root]()\n  }\n\n  if (typeof element === 'string' && element.trim().charAt(0) !== '<') {\n    return adopter(globals.document.querySelector(element))\n  }\n\n  // Make sure, that HTML elements are created with the correct namespace\n  const wrapper = isHTML ? globals.document.createElement('div') : create('svg')\n  wrapper.innerHTML = element.trim()\n\n  // We use firstElementChild here to skip potential comment nodes (#1339),\n  element = adopter(wrapper.firstElementChild)\n\n  // make sure, that element doesn't have its wrapper attached\n  wrapper.removeChild(wrapper.firstElementChild)\n  return element\n}\n\nexport function nodeOrNew(name, node) {\n  return node &&\n    (node instanceof globals.window.Node ||\n      (node.ownerDocument &&\n        node instanceof node.ownerDocument.defaultView.Node))\n    ? node\n    : create(name)\n}\n\n// Adopt existing svg elements\nexport function adopt(node) {\n  // check for presence of node\n  if (!node) return null\n\n  // make sure a node isn't already adopted\n  if (node.instance instanceof Base) return node.instance\n\n  if (node.nodeName === '#document-fragment') {\n    return new elements.Fragment(node)\n  }\n\n  // initialize variables\n  let className = capitalize(node.nodeName || 'Dom')\n\n  // Make sure that gradients are adopted correctly\n  if (className === 'LinearGradient' || className === 'RadialGradient') {\n    className = 'Gradient'\n\n    // Fallback to Dom if element is not known\n  } else if (!elements[className]) {\n    className = 'Dom'\n  }\n\n  return new elements[className](node)\n}\n\nlet adopter = adopt\n\nexport function mockAdopt(mock = adopt) {\n  adopter = mock\n}\n\nexport function register(element, name = element.name, asRoot = false) {\n  elements[name] = element\n  if (asRoot) elements[root] = element\n\n  addMethodNames(Object.getOwnPropertyNames(element.prototype))\n\n  return element\n}\n\nexport function getClass(name) {\n  return elements[name]\n}\n\n// Element id sequence\nlet did = 1000\n\n// Get next named element id\nexport function eid(name) {\n  return 'Svgjs' + capitalize(name) + did++\n}\n\n// Deep new id assignment\nexport function assignNewId(node) {\n  // do the same for SVG child nodes as well\n  for (let i = node.children.length - 1; i >= 0; i--) {\n    assignNewId(node.children[i])\n  }\n\n  if (node.id) {\n    node.id = eid(node.nodeName)\n    return node\n  }\n\n  return node\n}\n\n// Method for extending objects\nexport function extend(modules, methods) {\n  let key, i\n\n  modules = Array.isArray(modules) ? modules : [modules]\n\n  for (i = modules.length - 1; i >= 0; i--) {\n    for (key in methods) {\n      modules[i].prototype[key] = methods[key]\n    }\n  }\n}\n\nexport function wrapWithAttrCheck(fn) {\n  return function (...args) {\n    const o = args[args.length - 1]\n\n    if (o && o.constructor === Object && !(o instanceof Array)) {\n      return fn.apply(this, args.slice(0, -1)).attr(o)\n    } else {\n      return fn.apply(this, args)\n    }\n  }\n}\n", "import { makeInstance } from '../../utils/adopter.js'\nimport { registerMethods } from '../../utils/methods.js'\n\n// Get all siblings, including myself\nexport function siblings() {\n  return this.parent().children()\n}\n\n// Get the current position siblings\nexport function position() {\n  return this.parent().index(this)\n}\n\n// Get the next element (will return null if there is none)\nexport function next() {\n  return this.siblings()[this.position() + 1]\n}\n\n// Get the next element (will return null if there is none)\nexport function prev() {\n  return this.siblings()[this.position() - 1]\n}\n\n// Send given element one step forward\nexport function forward() {\n  const i = this.position()\n  const p = this.parent()\n\n  // move node one step forward\n  p.add(this.remove(), i + 1)\n\n  return this\n}\n\n// Send given element one step backward\nexport function backward() {\n  const i = this.position()\n  const p = this.parent()\n\n  p.add(this.remove(), i ? i - 1 : 0)\n\n  return this\n}\n\n// Send given element all the way to the front\nexport function front() {\n  const p = this.parent()\n\n  // Move node forward\n  p.add(this.remove())\n\n  return this\n}\n\n// Send given element all the way to the back\nexport function back() {\n  const p = this.parent()\n\n  // Move node back\n  p.add(this.remove(), 0)\n\n  return this\n}\n\n// Inserts a given element before the targeted element\nexport function before(element) {\n  element = makeInstance(element)\n  element.remove()\n\n  const i = this.position()\n\n  this.parent().add(element, i)\n\n  return this\n}\n\n// Inserts a given element after the targeted element\nexport function after(element) {\n  element = makeInstance(element)\n  element.remove()\n\n  const i = this.position()\n\n  this.parent().add(element, i + 1)\n\n  return this\n}\n\nexport function insertBefore(element) {\n  element = makeInstance(element)\n  element.before(this)\n  return this\n}\n\nexport function insertAfter(element) {\n  element = makeInstance(element)\n  element.after(this)\n  return this\n}\n\nregisterMethods('Dom', {\n  siblings,\n  position,\n  next,\n  prev,\n  forward,\n  backward,\n  front,\n  back,\n  before,\n  after,\n  insertBefore,\n  insertAfter\n})\n", "// Parse unit value\nexport const numberAndUnit =\n  /^([+-]?(\\d+(\\.\\d*)?|\\.\\d+)(e[+-]?\\d+)?)([a-z%]*)$/i\n\n// Parse hex value\nexport const hex = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i\n\n// Parse rgb value\nexport const rgb = /rgb\\((\\d+),(\\d+),(\\d+)\\)/\n\n// Parse reference id\nexport const reference = /^(#[^\\s]+)$/\n\n// splits a transformation chain\nexport const transforms = /\\)\\s*,?\\s*/\n\n// Whitespace\nexport const whitespace = /\\s/g\n\n// Test hex value\nexport const isHex = /^#[a-f0-9]{3}$|^#[a-f0-9]{6}$/i\n\n// Test rgb value\nexport const isRgb = /^rgb\\(/\n\n// Test for blank string\nexport const isBlank = /^(\\s+)?$/\n\n// Test for numeric string\nexport const isNumber = /^[+-]?(\\d+(\\.\\d*)?|\\.\\d+)(e[+-]?\\d+)?$/i\n\n// Test for image url\nexport const isImage = /\\.(jpg|jpeg|png|gif|svg)(\\?[^=]+.*)?/i\n\n// split at whitespace and comma\nexport const delimiter = /[\\s,]+/\n\n// Test for path letter\nexport const isPathLetter = /[MLHVCSQTAZ]/i\n", "import { delimiter } from '../core/regex.js'\nimport { registerMethods } from '../../utils/methods.js'\n\n// Return array of classes on the node\nexport function classes() {\n  const attr = this.attr('class')\n  return attr == null ? [] : attr.trim().split(delimiter)\n}\n\n// Return true if class exists on the node, false otherwise\nexport function hasClass(name) {\n  return this.classes().indexOf(name) !== -1\n}\n\n// Add class to the node\nexport function addClass(name) {\n  if (!this.hasClass(name)) {\n    const array = this.classes()\n    array.push(name)\n    this.attr('class', array.join(' '))\n  }\n\n  return this\n}\n\n// Remove class from the node\nexport function removeClass(name) {\n  if (this.hasClass(name)) {\n    this.attr(\n      'class',\n      this.classes()\n        .filter(function (c) {\n          return c !== name\n        })\n        .join(' ')\n    )\n  }\n\n  return this\n}\n\n// Toggle the presence of a class on the node\nexport function toggleClass(name) {\n  return this.hasClass(name) ? this.removeClass(name) : this.addClass(name)\n}\n\nregisterMethods('Dom', {\n  classes,\n  hasClass,\n  addClass,\n  removeClass,\n  toggleClass\n})\n", "import { isBlank } from '../core/regex.js'\nimport { registerMethods } from '../../utils/methods.js'\nimport { unCamelCase } from '../../utils/utils.js'\n\nconst cssName = (name) => (name.startsWith('--') ? name : unCamelCase(name))\n\n// Dynamic style generator\nexport function css(style, val) {\n  const ret = {}\n  if (arguments.length === 0) {\n    const declaration = this.node.style\n\n    for (let i = 0; i < declaration.length; i++) {\n      const name = declaration.item(i)\n      const value = declaration.getPropertyValue(name)\n      const priority = declaration.getPropertyPriority(name)\n\n      ret[name] = priority ? `${value} !${priority}` : value\n    }\n\n    return ret\n  }\n\n  if (arguments.length < 2) {\n    // get style properties as array\n    if (Array.isArray(style)) {\n      for (const name of style) {\n        const cased = cssName(name)\n        ret[name] = this.node.style.getPropertyValue(cased)\n      }\n      return ret\n    }\n\n    // get style for property\n    if (typeof style === 'string') {\n      return this.node.style.getPropertyValue(cssName(style))\n    }\n\n    // set styles in object\n    if (typeof style === 'object') {\n      for (const name in style) {\n        // set empty string if null/undefined/'' was given\n        this.node.style.setProperty(\n          cssName(name),\n          style[name] == null || isBlank.test(style[name]) ? '' : style[name]\n        )\n      }\n    }\n  }\n\n  // set style for property\n  if (arguments.length === 2) {\n    this.node.style.setProperty(\n      cssName(style),\n      val == null || isBlank.test(val) ? '' : val\n    )\n  }\n\n  return this\n}\n\n// Show element\nexport function show() {\n  return this.css('display', '')\n}\n\n// Hide element\nexport function hide() {\n  return this.css('display', 'none')\n}\n\n// Is element visible?\nexport function visible() {\n  return this.css('display') !== 'none'\n}\n\nregisterMethods('Dom', {\n  css,\n  show,\n  hide,\n  visible\n})\n", "import { registerMethods } from '../../utils/methods.js'\nimport { filter, map } from '../../utils/utils.js'\n\n// Store data values on svg nodes\nexport function data(a, v, r) {\n  if (a == null) {\n    // get an object of attributes\n    return this.data(\n      map(\n        filter(\n          this.node.attributes,\n          (el) => el.nodeName.indexOf('data-') === 0\n        ),\n        (el) => el.nodeName.slice(5)\n      )\n    )\n  } else if (a instanceof Array) {\n    const data = {}\n    for (const key of a) {\n      data[key] = this.data(key)\n    }\n    return data\n  } else if (typeof a === 'object') {\n    for (v in a) {\n      this.data(v, a[v])\n    }\n  } else if (arguments.length < 2) {\n    try {\n      return JSON.parse(this.attr('data-' + a))\n    } catch (e) {\n      return this.attr('data-' + a)\n    }\n  } else {\n    this.attr(\n      'data-' + a,\n      v === null\n        ? null\n        : r === true || typeof v === 'string' || typeof v === 'number'\n          ? v\n          : JSON.stringify(v)\n    )\n  }\n\n  return this\n}\n\nregisterMethods('Dom', { data })\n", "import { registerMethods } from '../../utils/methods.js'\n\n// Remember arbitrary data\nexport function remember(k, v) {\n  // remember every item in an object individually\n  if (typeof arguments[0] === 'object') {\n    for (const key in k) {\n      this.remember(key, k[key])\n    }\n  } else if (arguments.length === 1) {\n    // retrieve memory\n    return this.memory()[k]\n  } else {\n    // store memory\n    this.memory()[k] = v\n  }\n\n  return this\n}\n\n// Erase a given memory\nexport function forget() {\n  if (arguments.length === 0) {\n    this._memory = {}\n  } else {\n    for (let i = arguments.length - 1; i >= 0; i--) {\n      delete this.memory()[arguments[i]]\n    }\n  }\n  return this\n}\n\n// This triggers creation of a new hidden class which is not performant\n// However, this function is not rarely used so it will not happen frequently\n// Return local memory object\nexport function memory() {\n  return (this._memory = this._memory || {})\n}\n\nregisterMethods('Dom', { remember, forget, memory })\n", "import { hex, isHex, isRgb, rgb, whitespace } from '../modules/core/regex.js'\n\nfunction sixDigitHex(hex) {\n  return hex.length === 4\n    ? [\n        '#',\n        hex.substring(1, 2),\n        hex.substring(1, 2),\n        hex.substring(2, 3),\n        hex.substring(2, 3),\n        hex.substring(3, 4),\n        hex.substring(3, 4)\n      ].join('')\n    : hex\n}\n\nfunction componentHex(component) {\n  const integer = Math.round(component)\n  const bounded = Math.max(0, Math.min(255, integer))\n  const hex = bounded.toString(16)\n  return hex.length === 1 ? '0' + hex : hex\n}\n\nfunction is(object, space) {\n  for (let i = space.length; i--;) {\n    if (object[space[i]] == null) {\n      return false\n    }\n  }\n  return true\n}\n\nfunction getParameters(a, b) {\n  const params = is(a, 'rgb')\n    ? { _a: a.r, _b: a.g, _c: a.b, _d: 0, space: 'rgb' }\n    : is(a, 'xyz')\n      ? { _a: a.x, _b: a.y, _c: a.z, _d: 0, space: 'xyz' }\n      : is(a, 'hsl')\n        ? { _a: a.h, _b: a.s, _c: a.l, _d: 0, space: 'hsl' }\n        : is(a, 'lab')\n          ? { _a: a.l, _b: a.a, _c: a.b, _d: 0, space: 'lab' }\n          : is(a, 'lch')\n            ? { _a: a.l, _b: a.c, _c: a.h, _d: 0, space: 'lch' }\n            : is(a, 'cmyk')\n              ? { _a: a.c, _b: a.m, _c: a.y, _d: a.k, space: 'cmyk' }\n              : { _a: 0, _b: 0, _c: 0, space: 'rgb' }\n\n  params.space = b || params.space\n  return params\n}\n\nfunction cieSpace(space) {\n  if (space === 'lab' || space === 'xyz' || space === 'lch') {\n    return true\n  } else {\n    return false\n  }\n}\n\nfunction hueToRgb(p, q, t) {\n  if (t < 0) t += 1\n  if (t > 1) t -= 1\n  if (t < 1 / 6) return p + (q - p) * 6 * t\n  if (t < 1 / 2) return q\n  if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6\n  return p\n}\n\nexport default class Color {\n  constructor(...inputs) {\n    this.init(...inputs)\n  }\n\n  // Test if given value is a color\n  static isColor(color) {\n    return (\n      color && (color instanceof Color || this.isRgb(color) || this.test(color))\n    )\n  }\n\n  // Test if given value is an rgb object\n  static isRgb(color) {\n    return (\n      color &&\n      typeof color.r === 'number' &&\n      typeof color.g === 'number' &&\n      typeof color.b === 'number'\n    )\n  }\n\n  /*\n  Generating random colors\n  */\n  static random(mode = 'vibrant', t) {\n    // Get the math modules\n    const { random, round, sin, PI: pi } = Math\n\n    // Run the correct generator\n    if (mode === 'vibrant') {\n      const l = (81 - 57) * random() + 57\n      const c = (83 - 45) * random() + 45\n      const h = 360 * random()\n      const color = new Color(l, c, h, 'lch')\n      return color\n    } else if (mode === 'sine') {\n      t = t == null ? random() : t\n      const r = round(80 * sin((2 * pi * t) / 0.5 + 0.01) + 150)\n      const g = round(50 * sin((2 * pi * t) / 0.5 + 4.6) + 200)\n      const b = round(100 * sin((2 * pi * t) / 0.5 + 2.3) + 150)\n      const color = new Color(r, g, b)\n      return color\n    } else if (mode === 'pastel') {\n      const l = (94 - 86) * random() + 86\n      const c = (26 - 9) * random() + 9\n      const h = 360 * random()\n      const color = new Color(l, c, h, 'lch')\n      return color\n    } else if (mode === 'dark') {\n      const l = 10 + 10 * random()\n      const c = (125 - 75) * random() + 86\n      const h = 360 * random()\n      const color = new Color(l, c, h, 'lch')\n      return color\n    } else if (mode === 'rgb') {\n      const r = 255 * random()\n      const g = 255 * random()\n      const b = 255 * random()\n      const color = new Color(r, g, b)\n      return color\n    } else if (mode === 'lab') {\n      const l = 100 * random()\n      const a = 256 * random() - 128\n      const b = 256 * random() - 128\n      const color = new Color(l, a, b, 'lab')\n      return color\n    } else if (mode === 'grey') {\n      const grey = 255 * random()\n      const color = new Color(grey, grey, grey)\n      return color\n    } else {\n      throw new Error('Unsupported random color mode')\n    }\n  }\n\n  // Test if given value is a color string\n  static test(color) {\n    return typeof color === 'string' && (isHex.test(color) || isRgb.test(color))\n  }\n\n  cmyk() {\n    // Get the rgb values for the current color\n    const { _a, _b, _c } = this.rgb()\n    const [r, g, b] = [_a, _b, _c].map((v) => v / 255)\n\n    // Get the cmyk values in an unbounded format\n    const k = Math.min(1 - r, 1 - g, 1 - b)\n\n    if (k === 1) {\n      // Catch the black case\n      return new Color(0, 0, 0, 1, 'cmyk')\n    }\n\n    const c = (1 - r - k) / (1 - k)\n    const m = (1 - g - k) / (1 - k)\n    const y = (1 - b - k) / (1 - k)\n\n    // Construct the new color\n    const color = new Color(c, m, y, k, 'cmyk')\n    return color\n  }\n\n  hsl() {\n    // Get the rgb values\n    const { _a, _b, _c } = this.rgb()\n    const [r, g, b] = [_a, _b, _c].map((v) => v / 255)\n\n    // Find the maximum and minimum values to get the lightness\n    const max = Math.max(r, g, b)\n    const min = Math.min(r, g, b)\n    const l = (max + min) / 2\n\n    // If the r, g, v values are identical then we are grey\n    const isGrey = max === min\n\n    // Calculate the hue and saturation\n    const delta = max - min\n    const s = isGrey\n      ? 0\n      : l > 0.5\n        ? delta / (2 - max - min)\n        : delta / (max + min)\n    const h = isGrey\n      ? 0\n      : max === r\n        ? ((g - b) / delta + (g < b ? 6 : 0)) / 6\n        : max === g\n          ? ((b - r) / delta + 2) / 6\n          : max === b\n            ? ((r - g) / delta + 4) / 6\n            : 0\n\n    // Construct and return the new color\n    const color = new Color(360 * h, 100 * s, 100 * l, 'hsl')\n    return color\n  }\n\n  init(a = 0, b = 0, c = 0, d = 0, space = 'rgb') {\n    // This catches the case when a falsy value is passed like ''\n    a = !a ? 0 : a\n\n    // Reset all values in case the init function is rerun with new color space\n    if (this.space) {\n      for (const component in this.space) {\n        delete this[this.space[component]]\n      }\n    }\n\n    if (typeof a === 'number') {\n      // Allow for the case that we don't need d...\n      space = typeof d === 'string' ? d : space\n      d = typeof d === 'string' ? 0 : d\n\n      // Assign the values straight to the color\n      Object.assign(this, { _a: a, _b: b, _c: c, _d: d, space })\n      // If the user gave us an array, make the color from it\n    } else if (a instanceof Array) {\n      this.space = b || (typeof a[3] === 'string' ? a[3] : a[4]) || 'rgb'\n      Object.assign(this, { _a: a[0], _b: a[1], _c: a[2], _d: a[3] || 0 })\n    } else if (a instanceof Object) {\n      // Set the object up and assign its values directly\n      const values = getParameters(a, b)\n      Object.assign(this, values)\n    } else if (typeof a === 'string') {\n      if (isRgb.test(a)) {\n        const noWhitespace = a.replace(whitespace, '')\n        const [_a, _b, _c] = rgb\n          .exec(noWhitespace)\n          .slice(1, 4)\n          .map((v) => parseInt(v))\n        Object.assign(this, { _a, _b, _c, _d: 0, space: 'rgb' })\n      } else if (isHex.test(a)) {\n        const hexParse = (v) => parseInt(v, 16)\n        const [, _a, _b, _c] = hex.exec(sixDigitHex(a)).map(hexParse)\n        Object.assign(this, { _a, _b, _c, _d: 0, space: 'rgb' })\n      } else throw Error(\"Unsupported string format, can't construct Color\")\n    }\n\n    // Now add the components as a convenience\n    const { _a, _b, _c, _d } = this\n    const components =\n      this.space === 'rgb'\n        ? { r: _a, g: _b, b: _c }\n        : this.space === 'xyz'\n          ? { x: _a, y: _b, z: _c }\n          : this.space === 'hsl'\n            ? { h: _a, s: _b, l: _c }\n            : this.space === 'lab'\n              ? { l: _a, a: _b, b: _c }\n              : this.space === 'lch'\n                ? { l: _a, c: _b, h: _c }\n                : this.space === 'cmyk'\n                  ? { c: _a, m: _b, y: _c, k: _d }\n                  : {}\n    Object.assign(this, components)\n  }\n\n  lab() {\n    // Get the xyz color\n    const { x, y, z } = this.xyz()\n\n    // Get the lab components\n    const l = 116 * y - 16\n    const a = 500 * (x - y)\n    const b = 200 * (y - z)\n\n    // Construct and return a new color\n    const color = new Color(l, a, b, 'lab')\n    return color\n  }\n\n  lch() {\n    // Get the lab color directly\n    const { l, a, b } = this.lab()\n\n    // Get the chromaticity and the hue using polar coordinates\n    const c = Math.sqrt(a ** 2 + b ** 2)\n    let h = (180 * Math.atan2(b, a)) / Math.PI\n    if (h < 0) {\n      h *= -1\n      h = 360 - h\n    }\n\n    // Make a new color and return it\n    const color = new Color(l, c, h, 'lch')\n    return color\n  }\n  /*\n  Conversion Methods\n  */\n\n  rgb() {\n    if (this.space === 'rgb') {\n      return this\n    } else if (cieSpace(this.space)) {\n      // Convert to the xyz color space\n      let { x, y, z } = this\n      if (this.space === 'lab' || this.space === 'lch') {\n        // Get the values in the lab space\n        let { l, a, b } = this\n        if (this.space === 'lch') {\n          const { c, h } = this\n          const dToR = Math.PI / 180\n          a = c * Math.cos(dToR * h)\n          b = c * Math.sin(dToR * h)\n        }\n\n        // Undo the nonlinear function\n        const yL = (l + 16) / 116\n        const xL = a / 500 + yL\n        const zL = yL - b / 200\n\n        // Get the xyz values\n        const ct = 16 / 116\n        const mx = 0.008856\n        const nm = 7.787\n        x = 0.95047 * (xL ** 3 > mx ? xL ** 3 : (xL - ct) / nm)\n        y = 1.0 * (yL ** 3 > mx ? yL ** 3 : (yL - ct) / nm)\n        z = 1.08883 * (zL ** 3 > mx ? zL ** 3 : (zL - ct) / nm)\n      }\n\n      // Convert xyz to unbounded rgb values\n      const rU = x * 3.2406 + y * -1.5372 + z * -0.4986\n      const gU = x * -0.9689 + y * 1.8758 + z * 0.0415\n      const bU = x * 0.0557 + y * -0.204 + z * 1.057\n\n      // Convert the values to true rgb values\n      const pow = Math.pow\n      const bd = 0.0031308\n      const r = rU > bd ? 1.055 * pow(rU, 1 / 2.4) - 0.055 : 12.92 * rU\n      const g = gU > bd ? 1.055 * pow(gU, 1 / 2.4) - 0.055 : 12.92 * gU\n      const b = bU > bd ? 1.055 * pow(bU, 1 / 2.4) - 0.055 : 12.92 * bU\n\n      // Make and return the color\n      const color = new Color(255 * r, 255 * g, 255 * b)\n      return color\n    } else if (this.space === 'hsl') {\n      // https://bgrins.github.io/TinyColor/docs/tinycolor.html\n      // Get the current hsl values\n      let { h, s, l } = this\n      h /= 360\n      s /= 100\n      l /= 100\n\n      // If we are grey, then just make the color directly\n      if (s === 0) {\n        l *= 255\n        const color = new Color(l, l, l)\n        return color\n      }\n\n      // TODO I have no idea what this does :D If you figure it out, tell me!\n      const q = l < 0.5 ? l * (1 + s) : l + s - l * s\n      const p = 2 * l - q\n\n      // Get the rgb values\n      const r = 255 * hueToRgb(p, q, h + 1 / 3)\n      const g = 255 * hueToRgb(p, q, h)\n      const b = 255 * hueToRgb(p, q, h - 1 / 3)\n\n      // Make a new color\n      const color = new Color(r, g, b)\n      return color\n    } else if (this.space === 'cmyk') {\n      // https://gist.github.com/felipesabino/5066336\n      // Get the normalised cmyk values\n      const { c, m, y, k } = this\n\n      // Get the rgb values\n      const r = 255 * (1 - Math.min(1, c * (1 - k) + k))\n      const g = 255 * (1 - Math.min(1, m * (1 - k) + k))\n      const b = 255 * (1 - Math.min(1, y * (1 - k) + k))\n\n      // Form the color and return it\n      const color = new Color(r, g, b)\n      return color\n    } else {\n      return this\n    }\n  }\n\n  toArray() {\n    const { _a, _b, _c, _d, space } = this\n    return [_a, _b, _c, _d, space]\n  }\n\n  toHex() {\n    const [r, g, b] = this._clamped().map(componentHex)\n    return `#${r}${g}${b}`\n  }\n\n  toRgb() {\n    const [rV, gV, bV] = this._clamped()\n    const string = `rgb(${rV},${gV},${bV})`\n    return string\n  }\n\n  toString() {\n    return this.toHex()\n  }\n\n  xyz() {\n    // Normalise the red, green and blue values\n    const { _a: r255, _b: g255, _c: b255 } = this.rgb()\n    const [r, g, b] = [r255, g255, b255].map((v) => v / 255)\n\n    // Convert to the lab rgb space\n    const rL = r > 0.04045 ? Math.pow((r + 0.055) / 1.055, 2.4) : r / 12.92\n    const gL = g > 0.04045 ? Math.pow((g + 0.055) / 1.055, 2.4) : g / 12.92\n    const bL = b > 0.04045 ? Math.pow((b + 0.055) / 1.055, 2.4) : b / 12.92\n\n    // Convert to the xyz color space without bounding the values\n    const xU = (rL * 0.4124 + gL * 0.3576 + bL * 0.1805) / 0.95047\n    const yU = (rL * 0.2126 + gL * 0.7152 + bL * 0.0722) / 1.0\n    const zU = (rL * 0.0193 + gL * 0.1192 + bL * 0.9505) / 1.08883\n\n    // Get the proper xyz values by applying the bounding\n    const x = xU > 0.008856 ? Math.pow(xU, 1 / 3) : 7.787 * xU + 16 / 116\n    const y = yU > 0.008856 ? Math.pow(yU, 1 / 3) : 7.787 * yU + 16 / 116\n    const z = zU > 0.008856 ? Math.pow(zU, 1 / 3) : 7.787 * zU + 16 / 116\n\n    // Make and return the color\n    const color = new Color(x, y, z, 'xyz')\n    return color\n  }\n\n  /*\n  Input and Output methods\n  */\n\n  _clamped() {\n    const { _a, _b, _c } = this.rgb()\n    const { max, min, round } = Math\n    const format = (v) => max(0, min(round(v), 255))\n    return [_a, _b, _c].map(format)\n  }\n\n  /*\n  Constructing colors\n  */\n}\n", "import Matrix from './Matrix.js'\n\nexport default class Point {\n  // Initialize\n  constructor(...args) {\n    this.init(...args)\n  }\n\n  // Clone point\n  clone() {\n    return new Point(this)\n  }\n\n  init(x, y) {\n    const base = { x: 0, y: 0 }\n\n    // ensure source as object\n    const source = Array.isArray(x)\n      ? { x: x[0], y: x[1] }\n      : typeof x === 'object'\n        ? { x: x.x, y: x.y }\n        : { x: x, y: y }\n\n    // merge source\n    this.x = source.x == null ? base.x : source.x\n    this.y = source.y == null ? base.y : source.y\n\n    return this\n  }\n\n  toArray() {\n    return [this.x, this.y]\n  }\n\n  transform(m) {\n    return this.clone().transformO(m)\n  }\n\n  // Transform point with matrix\n  transformO(m) {\n    if (!Matrix.isMatrixLike(m)) {\n      m = new Matrix(m)\n    }\n\n    const { x, y } = this\n\n    // Perform the matrix multiplication\n    this.x = m.a * x + m.c * y + m.e\n    this.y = m.b * x + m.d * y + m.f\n\n    return this\n  }\n}\n\nexport function point(x, y) {\n  return new Point(x, y).transformO(this.screenCTM().inverseO())\n}\n", "import { delimiter } from '../modules/core/regex.js'\nimport { radians } from '../utils/utils.js'\nimport { register } from '../utils/adopter.js'\nimport Element from '../elements/Element.js'\nimport Point from './Point.js'\n\nfunction closeEnough(a, b, threshold) {\n  return Math.abs(b - a) < (threshold || 1e-6)\n}\n\nexport default class Matrix {\n  constructor(...args) {\n    this.init(...args)\n  }\n\n  static formatTransforms(o) {\n    // Get all of the parameters required to form the matrix\n    const flipBoth = o.flip === 'both' || o.flip === true\n    const flipX = o.flip && (flipBoth || o.flip === 'x') ? -1 : 1\n    const flipY = o.flip && (flipBoth || o.flip === 'y') ? -1 : 1\n    const skewX =\n      o.skew && o.skew.length\n        ? o.skew[0]\n        : isFinite(o.skew)\n          ? o.skew\n          : isFinite(o.skewX)\n            ? o.skewX\n            : 0\n    const skewY =\n      o.skew && o.skew.length\n        ? o.skew[1]\n        : isFinite(o.skew)\n          ? o.skew\n          : isFinite(o.skewY)\n            ? o.skewY\n            : 0\n    const scaleX =\n      o.scale && o.scale.length\n        ? o.scale[0] * flipX\n        : isFinite(o.scale)\n          ? o.scale * flipX\n          : isFinite(o.scaleX)\n            ? o.scaleX * flipX\n            : flipX\n    const scaleY =\n      o.scale && o.scale.length\n        ? o.scale[1] * flipY\n        : isFinite(o.scale)\n          ? o.scale * flipY\n          : isFinite(o.scaleY)\n            ? o.scaleY * flipY\n            : flipY\n    const shear = o.shear || 0\n    const theta = o.rotate || o.theta || 0\n    const origin = new Point(\n      o.origin || o.around || o.ox || o.originX,\n      o.oy || o.originY\n    )\n    const ox = origin.x\n    const oy = origin.y\n    // We need Point to be invalid if nothing was passed because we cannot default to 0 here. That is why NaN\n    const position = new Point(\n      o.position ?? o.px ?? o.positionX ?? NaN,\n      o.py ?? o.positionY ?? NaN\n    )\n    const px = position.x\n    const py = position.y\n    const translate = new Point(\n      o.translate || o.tx || o.translateX,\n      o.ty || o.translateY\n    )\n    const tx = translate.x\n    const ty = translate.y\n    const relative = new Point(\n      o.relative || o.rx || o.relativeX,\n      o.ry || o.relativeY\n    )\n    const rx = relative.x\n    const ry = relative.y\n\n    // Populate all of the values\n    return {\n      scaleX,\n      scaleY,\n      skewX,\n      skewY,\n      shear,\n      theta,\n      rx,\n      ry,\n      tx,\n      ty,\n      ox,\n      oy,\n      px,\n      py\n    }\n  }\n\n  static fromArray(a) {\n    return { a: a[0], b: a[1], c: a[2], d: a[3], e: a[4], f: a[5] }\n  }\n\n  static isMatrixLike(o) {\n    return (\n      o.a != null ||\n      o.b != null ||\n      o.c != null ||\n      o.d != null ||\n      o.e != null ||\n      o.f != null\n    )\n  }\n\n  // left matrix, right matrix, target matrix which is overwritten\n  static matrixMultiply(l, r, o) {\n    // Work out the product directly\n    const a = l.a * r.a + l.c * r.b\n    const b = l.b * r.a + l.d * r.b\n    const c = l.a * r.c + l.c * r.d\n    const d = l.b * r.c + l.d * r.d\n    const e = l.e + l.a * r.e + l.c * r.f\n    const f = l.f + l.b * r.e + l.d * r.f\n\n    // make sure to use local variables because l/r and o could be the same\n    o.a = a\n    o.b = b\n    o.c = c\n    o.d = d\n    o.e = e\n    o.f = f\n\n    return o\n  }\n\n  around(cx, cy, matrix) {\n    return this.clone().aroundO(cx, cy, matrix)\n  }\n\n  // Transform around a center point\n  aroundO(cx, cy, matrix) {\n    const dx = cx || 0\n    const dy = cy || 0\n    return this.translateO(-dx, -dy).lmultiplyO(matrix).translateO(dx, dy)\n  }\n\n  // Clones this matrix\n  clone() {\n    return new Matrix(this)\n  }\n\n  // Decomposes this matrix into its affine parameters\n  decompose(cx = 0, cy = 0) {\n    // Get the parameters from the matrix\n    const a = this.a\n    const b = this.b\n    const c = this.c\n    const d = this.d\n    const e = this.e\n    const f = this.f\n\n    // Figure out if the winding direction is clockwise or counterclockwise\n    const determinant = a * d - b * c\n    const ccw = determinant > 0 ? 1 : -1\n\n    // Since we only shear in x, we can use the x basis to get the x scale\n    // and the rotation of the resulting matrix\n    const sx = ccw * Math.sqrt(a * a + b * b)\n    const thetaRad = Math.atan2(ccw * b, ccw * a)\n    const theta = (180 / Math.PI) * thetaRad\n\n    // We can then solve the y basis vector simultaneously to get the other\n    // two affine parameters directly from these parameters\n    const lam = (a * c + b * d) / determinant\n    const sy = (c * sx) / (lam * a - b) || (d * sx) / (lam * b + a)\n\n    // Use the translations\n    const tx = e - cx + cx * a + cy * c\n    const ty = f - cy + cx * b + cy * d\n\n    // Construct the decomposition and return it\n    return {\n      // Return the affine parameters\n      scaleX: sx,\n      scaleY: sy,\n      shear: lam,\n      rotate: theta,\n      translateX: tx,\n      translateY: ty,\n      originX: cx,\n      originY: cy,\n\n      // Return the matrix parameters\n      a: this.a,\n      b: this.b,\n      c: this.c,\n      d: this.d,\n      e: this.e,\n      f: this.f\n    }\n  }\n\n  // Check if two matrices are equal\n  equals(other) {\n    if (other === this) return true\n    const comp = new Matrix(other)\n    return (\n      closeEnough(this.a, comp.a) &&\n      closeEnough(this.b, comp.b) &&\n      closeEnough(this.c, comp.c) &&\n      closeEnough(this.d, comp.d) &&\n      closeEnough(this.e, comp.e) &&\n      closeEnough(this.f, comp.f)\n    )\n  }\n\n  // Flip matrix on x or y, at a given offset\n  flip(axis, around) {\n    return this.clone().flipO(axis, around)\n  }\n\n  flipO(axis, around) {\n    return axis === 'x'\n      ? this.scaleO(-1, 1, around, 0)\n      : axis === 'y'\n        ? this.scaleO(1, -1, 0, around)\n        : this.scaleO(-1, -1, axis, around || axis) // Define an x, y flip point\n  }\n\n  // Initialize\n  init(source) {\n    const base = Matrix.fromArray([1, 0, 0, 1, 0, 0])\n\n    // ensure source as object\n    source =\n      source instanceof Element\n        ? source.matrixify()\n        : typeof source === 'string'\n          ? Matrix.fromArray(source.split(delimiter).map(parseFloat))\n          : Array.isArray(source)\n            ? Matrix.fromArray(source)\n            : typeof source === 'object' && Matrix.isMatrixLike(source)\n              ? source\n              : typeof source === 'object'\n                ? new Matrix().transform(source)\n                : arguments.length === 6\n                  ? Matrix.fromArray([].slice.call(arguments))\n                  : base\n\n    // Merge the source matrix with the base matrix\n    this.a = source.a != null ? source.a : base.a\n    this.b = source.b != null ? source.b : base.b\n    this.c = source.c != null ? source.c : base.c\n    this.d = source.d != null ? source.d : base.d\n    this.e = source.e != null ? source.e : base.e\n    this.f = source.f != null ? source.f : base.f\n\n    return this\n  }\n\n  inverse() {\n    return this.clone().inverseO()\n  }\n\n  // Inverses matrix\n  inverseO() {\n    // Get the current parameters out of the matrix\n    const a = this.a\n    const b = this.b\n    const c = this.c\n    const d = this.d\n    const e = this.e\n    const f = this.f\n\n    // Invert the 2x2 matrix in the top left\n    const det = a * d - b * c\n    if (!det) throw new Error('Cannot invert ' + this)\n\n    // Calculate the top 2x2 matrix\n    const na = d / det\n    const nb = -b / det\n    const nc = -c / det\n    const nd = a / det\n\n    // Apply the inverted matrix to the top right\n    const ne = -(na * e + nc * f)\n    const nf = -(nb * e + nd * f)\n\n    // Construct the inverted matrix\n    this.a = na\n    this.b = nb\n    this.c = nc\n    this.d = nd\n    this.e = ne\n    this.f = nf\n\n    return this\n  }\n\n  lmultiply(matrix) {\n    return this.clone().lmultiplyO(matrix)\n  }\n\n  lmultiplyO(matrix) {\n    const r = this\n    const l = matrix instanceof Matrix ? matrix : new Matrix(matrix)\n\n    return Matrix.matrixMultiply(l, r, this)\n  }\n\n  // Left multiplies by the given matrix\n  multiply(matrix) {\n    return this.clone().multiplyO(matrix)\n  }\n\n  multiplyO(matrix) {\n    // Get the matrices\n    const l = this\n    const r = matrix instanceof Matrix ? matrix : new Matrix(matrix)\n\n    return Matrix.matrixMultiply(l, r, this)\n  }\n\n  // Rotate matrix\n  rotate(r, cx, cy) {\n    return this.clone().rotateO(r, cx, cy)\n  }\n\n  rotateO(r, cx = 0, cy = 0) {\n    // Convert degrees to radians\n    r = radians(r)\n\n    const cos = Math.cos(r)\n    const sin = Math.sin(r)\n\n    const { a, b, c, d, e, f } = this\n\n    this.a = a * cos - b * sin\n    this.b = b * cos + a * sin\n    this.c = c * cos - d * sin\n    this.d = d * cos + c * sin\n    this.e = e * cos - f * sin + cy * sin - cx * cos + cx\n    this.f = f * cos + e * sin - cx * sin - cy * cos + cy\n\n    return this\n  }\n\n  // Scale matrix\n  scale() {\n    return this.clone().scaleO(...arguments)\n  }\n\n  scaleO(x, y = x, cx = 0, cy = 0) {\n    // Support uniform scaling\n    if (arguments.length === 3) {\n      cy = cx\n      cx = y\n      y = x\n    }\n\n    const { a, b, c, d, e, f } = this\n\n    this.a = a * x\n    this.b = b * y\n    this.c = c * x\n    this.d = d * y\n    this.e = e * x - cx * x + cx\n    this.f = f * y - cy * y + cy\n\n    return this\n  }\n\n  // Shear matrix\n  shear(a, cx, cy) {\n    return this.clone().shearO(a, cx, cy)\n  }\n\n  // eslint-disable-next-line no-unused-vars\n  shearO(lx, cx = 0, cy = 0) {\n    const { a, b, c, d, e, f } = this\n\n    this.a = a + b * lx\n    this.c = c + d * lx\n    this.e = e + f * lx - cy * lx\n\n    return this\n  }\n\n  // Skew Matrix\n  skew() {\n    return this.clone().skewO(...arguments)\n  }\n\n  skewO(x, y = x, cx = 0, cy = 0) {\n    // support uniformal skew\n    if (arguments.length === 3) {\n      cy = cx\n      cx = y\n      y = x\n    }\n\n    // Convert degrees to radians\n    x = radians(x)\n    y = radians(y)\n\n    const lx = Math.tan(x)\n    const ly = Math.tan(y)\n\n    const { a, b, c, d, e, f } = this\n\n    this.a = a + b * lx\n    this.b = b + a * ly\n    this.c = c + d * lx\n    this.d = d + c * ly\n    this.e = e + f * lx - cy * lx\n    this.f = f + e * ly - cx * ly\n\n    return this\n  }\n\n  // SkewX\n  skewX(x, cx, cy) {\n    return this.skew(x, 0, cx, cy)\n  }\n\n  // SkewY\n  skewY(y, cx, cy) {\n    return this.skew(0, y, cx, cy)\n  }\n\n  toArray() {\n    return [this.a, this.b, this.c, this.d, this.e, this.f]\n  }\n\n  // Convert matrix to string\n  toString() {\n    return (\n      'matrix(' +\n      this.a +\n      ',' +\n      this.b +\n      ',' +\n      this.c +\n      ',' +\n      this.d +\n      ',' +\n      this.e +\n      ',' +\n      this.f +\n      ')'\n    )\n  }\n\n  // Transform a matrix into another matrix by manipulating the space\n  transform(o) {\n    // Check if o is a matrix and then left multiply it directly\n    if (Matrix.isMatrixLike(o)) {\n      const matrix = new Matrix(o)\n      return matrix.multiplyO(this)\n    }\n\n    // Get the proposed transformations and the current transformations\n    const t = Matrix.formatTransforms(o)\n    const current = this\n    const { x: ox, y: oy } = new Point(t.ox, t.oy).transform(current)\n\n    // Construct the resulting matrix\n    const transformer = new Matrix()\n      .translateO(t.rx, t.ry)\n      .lmultiplyO(current)\n      .translateO(-ox, -oy)\n      .scaleO(t.scaleX, t.scaleY)\n      .skewO(t.skewX, t.skewY)\n      .shearO(t.shear)\n      .rotateO(t.theta)\n      .translateO(ox, oy)\n\n    // If we want the origin at a particular place, we force it there\n    if (isFinite(t.px) || isFinite(t.py)) {\n      const origin = new Point(ox, oy).transform(transformer)\n      const dx = isFinite(t.px) ? t.px - origin.x : 0\n      const dy = isFinite(t.py) ? t.py - origin.y : 0\n      transformer.translateO(dx, dy)\n    }\n\n    // Translate now after positioning\n    transformer.translateO(t.tx, t.ty)\n    return transformer\n  }\n\n  // Translate matrix\n  translate(x, y) {\n    return this.clone().translateO(x, y)\n  }\n\n  translateO(x, y) {\n    this.e += x || 0\n    this.f += y || 0\n    return this\n  }\n\n  valueOf() {\n    return {\n      a: this.a,\n      b: this.b,\n      c: this.c,\n      d: this.d,\n      e: this.e,\n      f: this.f\n    }\n  }\n}\n\nexport function ctm() {\n  return new Matrix(this.node.getCTM())\n}\n\nexport function screenCTM() {\n  try {\n    /* https://bugzilla.mozilla.org/show_bug.cgi?id=1344537\n       This is needed because FF does not return the transformation matrix\n       for the inner coordinate system when getScreenCTM() is called on nested svgs.\n       However all other Browsers do that */\n    if (typeof this.isRoot === 'function' && !this.isRoot()) {\n      const rect = this.rect(1, 1)\n      const m = rect.node.getScreenCTM()\n      rect.remove()\n      return new Matrix(m)\n    }\n    return new Matrix(this.node.getScreenCTM())\n  } catch (e) {\n    console.warn(\n      `Cannot get CTM from SVG node ${this.node.nodeName}. Is the element rendered?`\n    )\n    return new Matrix()\n  }\n}\n\nregister(Matrix, 'Matrix')\n", "import { globals } from '../../utils/window.js'\nimport { makeInstance } from '../../utils/adopter.js'\n\nexport default function parser() {\n  // Reuse cached element if possible\n  if (\n    !parser.nodes ||\n    parser.nodes.svg.node.ownerDocument !== globals.document\n  ) {\n    const svg = makeInstance().size(2, 0)\n    svg.node.style.cssText = [\n      'opacity: 0',\n      'position: absolute',\n      'left: -100%',\n      'top: -100%',\n      'overflow: hidden'\n    ].join(';')\n\n    svg.attr('focusable', 'false')\n    svg.attr('aria-hidden', 'true')\n\n    const path = svg.path().node\n\n    parser.nodes = { svg, path }\n  }\n\n  if (!parser.nodes.svg.node.parentNode) {\n    const b = globals.document.body || globals.document.documentElement\n    parser.nodes.svg.addTo(b)\n  }\n\n  return parser.nodes\n}\n", "import { delimiter } from '../modules/core/regex.js'\nimport { globals } from '../utils/window.js'\nimport { register } from '../utils/adopter.js'\nimport { registerMethods } from '../utils/methods.js'\nimport Matrix from './Matrix.js'\nimport Point from './Point.js'\nimport parser from '../modules/core/parser.js'\n\nexport function isNulledBox(box) {\n  return !box.width && !box.height && !box.x && !box.y\n}\n\nexport function domContains(node) {\n  return (\n    node === globals.document ||\n    (\n      globals.document.documentElement.contains ||\n      function (node) {\n        // This is IE - it does not support contains() for top-level SVGs\n        while (node.parentNode) {\n          node = node.parentNode\n        }\n        return node === globals.document\n      }\n    ).call(globals.document.documentElement, node)\n  )\n}\n\nexport default class Box {\n  constructor(...args) {\n    this.init(...args)\n  }\n\n  addOffset() {\n    // offset by window scroll position, because getBoundingClientRect changes when window is scrolled\n    this.x += globals.window.pageXOffset\n    this.y += globals.window.pageYOffset\n    return new Box(this)\n  }\n\n  init(source) {\n    const base = [0, 0, 0, 0]\n    source =\n      typeof source === 'string'\n        ? source.split(delimiter).map(parseFloat)\n        : Array.isArray(source)\n          ? source\n          : typeof source === 'object'\n            ? [\n                source.left != null ? source.left : source.x,\n                source.top != null ? source.top : source.y,\n                source.width,\n                source.height\n              ]\n            : arguments.length === 4\n              ? [].slice.call(arguments)\n              : base\n\n    this.x = source[0] || 0\n    this.y = source[1] || 0\n    this.width = this.w = source[2] || 0\n    this.height = this.h = source[3] || 0\n\n    // Add more bounding box properties\n    this.x2 = this.x + this.w\n    this.y2 = this.y + this.h\n    this.cx = this.x + this.w / 2\n    this.cy = this.y + this.h / 2\n\n    return this\n  }\n\n  isNulled() {\n    return isNulledBox(this)\n  }\n\n  // Merge rect box with another, return a new instance\n  merge(box) {\n    const x = Math.min(this.x, box.x)\n    const y = Math.min(this.y, box.y)\n    const width = Math.max(this.x + this.width, box.x + box.width) - x\n    const height = Math.max(this.y + this.height, box.y + box.height) - y\n\n    return new Box(x, y, width, height)\n  }\n\n  toArray() {\n    return [this.x, this.y, this.width, this.height]\n  }\n\n  toString() {\n    return this.x + ' ' + this.y + ' ' + this.width + ' ' + this.height\n  }\n\n  transform(m) {\n    if (!(m instanceof Matrix)) {\n      m = new Matrix(m)\n    }\n\n    let xMin = Infinity\n    let xMax = -Infinity\n    let yMin = Infinity\n    let yMax = -Infinity\n\n    const pts = [\n      new Point(this.x, this.y),\n      new Point(this.x2, this.y),\n      new Point(this.x, this.y2),\n      new Point(this.x2, this.y2)\n    ]\n\n    pts.forEach(function (p) {\n      p = p.transform(m)\n      xMin = Math.min(xMin, p.x)\n      xMax = Math.max(xMax, p.x)\n      yMin = Math.min(yMin, p.y)\n      yMax = Math.max(yMax, p.y)\n    })\n\n    return new Box(xMin, yMin, xMax - xMin, yMax - yMin)\n  }\n}\n\nfunction getBox(el, getBBoxFn, retry) {\n  let box\n\n  try {\n    // Try to get the box with the provided function\n    box = getBBoxFn(el.node)\n\n    // If the box is worthless and not even in the dom, retry\n    // by throwing an error here...\n    if (isNulledBox(box) && !domContains(el.node)) {\n      throw new Error('Element not in the dom')\n    }\n  } catch (e) {\n    // ... and calling the retry handler here\n    box = retry(el)\n  }\n\n  return box\n}\n\nexport function bbox() {\n  // Function to get bbox is getBBox()\n  const getBBox = (node) => node.getBBox()\n\n  // Take all measures so that a stupid browser renders the element\n  // so we can get the bbox from it when we try again\n  const retry = (el) => {\n    try {\n      const clone = el.clone().addTo(parser().svg).show()\n      const box = clone.node.getBBox()\n      clone.remove()\n      return box\n    } catch (e) {\n      // We give up...\n      throw new Error(\n        `Getting bbox of element \"${\n          el.node.nodeName\n        }\" is not possible: ${e.toString()}`\n      )\n    }\n  }\n\n  const box = getBox(this, getBBox, retry)\n  const bbox = new Box(box)\n\n  return bbox\n}\n\nexport function rbox(el) {\n  const getRBox = (node) => node.getBoundingClientRect()\n  const retry = (el) => {\n    // There is no point in trying tricks here because if we insert the element into the dom ourselves\n    // it obviously will be at the wrong position\n    throw new Error(\n      `Getting rbox of element \"${el.node.nodeName}\" is not possible`\n    )\n  }\n\n  const box = getBox(this, getRBox, retry)\n  const rbox = new Box(box)\n\n  // If an element was passed, we want the bbox in the coordinate system of that element\n  if (el) {\n    return rbox.transform(el.screenCTM().inverseO())\n  }\n\n  // Else we want it in absolute screen coordinates\n  // Therefore we need to add the scrollOffset\n  return rbox.addOffset()\n}\n\n// Checks whether the given point is inside the bounding box\nexport function inside(x, y) {\n  const box = this.bbox()\n\n  return (\n    x > box.x && y > box.y && x < box.x + box.width && y < box.y + box.height\n  )\n}\n\nregisterMethods({\n  viewbox: {\n    viewbox(x, y, width, height) {\n      // act as getter\n      if (x == null) return new Box(this.attr('viewBox'))\n\n      // act as setter\n      return this.attr('viewBox', new Box(x, y, width, height))\n    },\n\n    zoom(level, point) {\n      // Its best to rely on the attributes here and here is why:\n      // clientXYZ: Doesn't work on non-root svgs because they dont have a CSSBox (silly!)\n      // getBoundingClientRect: Doesn't work because Chrome just ignores width and height of nested svgs completely\n      //                        that means, their clientRect is always as big as the content.\n      //                        Furthermore this size is incorrect if the element is further transformed by its parents\n      // computedStyle: Only returns meaningful values if css was used with px. We dont go this route here!\n      // getBBox: returns the bounding box of its content - that doesn't help!\n      let { width, height } = this.attr(['width', 'height'])\n\n      // Width and height is a string when a number with a unit is present which we can't use\n      // So we try clientXYZ\n      if (\n        (!width && !height) ||\n        typeof width === 'string' ||\n        typeof height === 'string'\n      ) {\n        width = this.node.clientWidth\n        height = this.node.clientHeight\n      }\n\n      // Giving up...\n      if (!width || !height) {\n        throw new Error(\n          'Impossible to get absolute width and height. Please provide an absolute width and height attribute on the zooming element'\n        )\n      }\n\n      const v = this.viewbox()\n\n      const zoomX = width / v.width\n      const zoomY = height / v.height\n      const zoom = Math.min(zoomX, zoomY)\n\n      if (level == null) {\n        return zoom\n      }\n\n      let zoomAmount = zoom / level\n\n      // Set the zoomAmount to the highest value which is safe to process and recover from\n      // The * 100 is a bit of wiggle room for the matrix transformation\n      if (zoomAmount === Infinity) zoomAmount = Number.MAX_SAFE_INTEGER / 100\n\n      point =\n        point || new Point(width / 2 / zoomX + v.x, height / 2 / zoomY + v.y)\n\n      const box = new Box(v).transform(\n        new Matrix({ scale: zoomAmount, origin: point })\n      )\n\n      return this.viewbox(box)\n    }\n  }\n})\n\nregister(Box, 'Box')\n", "import { extend } from '../utils/adopter.js'\n// import { subClassArray } from './ArrayPolyfill.js'\n\nclass List extends Array {\n  constructor(arr = [], ...args) {\n    super(arr, ...args)\n    if (typeof arr === 'number') return this\n    this.length = 0\n    this.push(...arr)\n  }\n}\n\n/* = subClassArray('List', Array, function (arr = []) {\n  // This catches the case, that native map tries to create an array with new Array(1)\n  if (typeof arr === 'number') return this\n  this.length = 0\n  this.push(...arr)\n}) */\n\nexport default List\n\nextend([List], {\n  each(fnOrMethodName, ...args) {\n    if (typeof fnOrMethodName === 'function') {\n      return this.map((el, i, arr) => {\n        return fnOrMethodName.call(el, el, i, arr)\n      })\n    } else {\n      return this.map((el) => {\n        return el[fnOrMethodName](...args)\n      })\n    }\n  },\n\n  toArray() {\n    return Array.prototype.concat.apply([], this)\n  }\n})\n\nconst reserved = ['toArray', 'constructor', 'each']\n\nList.extend = function (methods) {\n  methods = methods.reduce((obj, name) => {\n    // Don't overwrite own methods\n    if (reserved.includes(name)) return obj\n\n    // Don't add private methods\n    if (name[0] === '_') return obj\n\n    // Allow access to original Array methods through a prefix\n    if (name in Array.prototype) {\n      obj['$' + name] = Array.prototype[name]\n    }\n\n    // Relay every call to each()\n    obj[name] = function (...attrs) {\n      return this.each(name, ...attrs)\n    }\n    return obj\n  }, {})\n\n  extend([List], methods)\n}\n", "import { adopt } from '../../utils/adopter.js'\nimport { reference } from './regex.js'\nimport { globals } from '../../utils/window.js'\nimport List from '../../types/List.js'\n\nfunction getReferenceId(value) {\n  // Only local fragments resolve here. External URLs deliberately return null.\n  let referenceValue = (value + '').trim()\n  const url = referenceValue.match(/^url\\((.*)\\)$/i)\n\n  if (url) {\n    referenceValue = url[1].trim()\n\n    const quote = referenceValue[0]\n    if (quote === '\"' || quote === \"'\") {\n      if (referenceValue[referenceValue.length - 1] !== quote) return null\n      referenceValue = referenceValue.slice(1, -1)\n    }\n  }\n\n  const match = referenceValue.match(reference)\n  return match ? match[1].slice(1) : null\n}\n\nfunction findById(rootNode, id) {\n  const selector = `#${globals.window.CSS.escape(id)}`\n\n  // querySelector() does not include an Element root in its own search.\n  if (rootNode.nodeType === 1 && rootNode.matches(selector)) return rootNode\n\n  return rootNode.querySelector(selector)\n}\n\nexport function resolveReference(node, value) {\n  const id = getReferenceId(value)\n  return id ? findById(node.getRootNode(), id) : null\n}\n\nexport function findReferences(node, attribute, selector = `[${attribute}]`) {\n  const id = node.getAttribute('id')\n  const rootNode = node.getRootNode()\n\n  // With duplicate IDs, only the node resolved by a forward lookup owns targets.\n  if (!id || findById(rootNode, id) !== node) return new List()\n\n  const references = []\n\n  // querySelectorAll() also excludes an Element root from its results.\n  if (\n    rootNode.nodeType === 1 &&\n    rootNode.matches(selector) &&\n    getReferenceId(rootNode.getAttribute(attribute)) === id\n  ) {\n    references.push(adopt(rootNode))\n  }\n\n  // Parse candidate values so quoted/whitespace URL forms remain equivalent.\n  for (const element of rootNode.querySelectorAll(selector)) {\n    if (getReferenceId(element.getAttribute(attribute)) === id) {\n      references.push(adopt(element))\n    }\n  }\n\n  return new List(references)\n}\n", "import { adopt } from '../../utils/adopter.js'\nimport { globals } from '../../utils/window.js'\nimport { map } from '../../utils/utils.js'\nimport List from '../../types/List.js'\n\nexport default function baseFind(query, parent) {\n  return new List(\n    map((parent || globals.document).querySelectorAll(query), function (node) {\n      return adopt(node)\n    })\n  )\n}\n\n// Scoped find method\nexport function find(query) {\n  return baseFind(query, this.node)\n}\n\nexport function findOne(query) {\n  return adopt(this.node.querySelector(query))\n}\n", "import { delimiter } from './regex.js'\nimport { makeInstance } from '../../utils/adopter.js'\nimport { globals } from '../../utils/window.js'\n\nlet listenerId = 0\nconst eventStore = new WeakMap()\nconst listenerIds = new WeakMap()\nconst createEventMap = () => Object.create(null)\n\nexport function getEvents(instance) {\n  const holder = instance.getEventHolder()\n  let bag = eventStore.get(holder)\n\n  if (!bag) {\n    bag = createEventMap()\n    eventStore.set(holder, bag)\n  }\n\n  return bag\n}\n\nexport function getEventTarget(instance) {\n  return instance.getEventTarget()\n}\n\nexport function clearEvents(instance) {\n  eventStore.delete(instance.getEventHolder())\n}\n\n// Add event binder in the SVG namespace\nexport function on(node, events, listener, binding, options) {\n  const l = listener.bind(binding || node)\n  const listenerOptions = options || false\n  const instance = makeInstance(node)\n  const bag = getEvents(instance)\n  const n = getEventTarget(instance)\n\n  // events can be an array of events or a string of events\n  events = Array.isArray(events) ? events : events.split(delimiter)\n\n  let id = listenerIds.get(listener)\n  if (!id) {\n    id = ++listenerId\n    listenerIds.set(listener, id)\n  }\n\n  events.forEach(function (event) {\n    const ev = event.split('.')[0]\n    const ns = event.split('.')[1] || '*'\n\n    // ensure valid object\n    bag[ev] = bag[ev] || createEventMap()\n    bag[ev][ns] = bag[ev][ns] || createEventMap()\n\n    // reference listener\n    bag[ev][ns][id] = bag[ev][ns][id] || []\n    bag[ev][ns][id].push({ listener: l, options: listenerOptions })\n\n    // add listener\n    n.addEventListener(ev, l, listenerOptions)\n  })\n}\n\n// Add event unbinder in the SVG namespace\nexport function off(node, events, listener, options) {\n  const instance = makeInstance(node)\n  const bag = getEvents(instance)\n  const n = getEventTarget(instance)\n\n  // listener can be a function or a number\n  if (typeof listener === 'function') {\n    listener = listenerIds.get(listener)\n    if (!listener) return\n  }\n\n  // events can be an array of events or a string or undefined\n  events = Array.isArray(events) ? events : (events || '').split(delimiter)\n\n  events.forEach(function (event) {\n    const ev = event && event.split('.')[0]\n    const ns = event && event.split('.')[1]\n    let namespace, l\n\n    if (listener) {\n      // remove listener reference\n      if (bag[ev] && bag[ev][ns || '*']) {\n        const listeners = bag[ev][ns || '*'][listener]\n\n        if (!listeners) return\n\n        // removeListener\n        listeners.forEach(function (registration) {\n          n.removeEventListener(\n            ev,\n            registration.listener,\n            registration.options ?? options ?? false\n          )\n        })\n\n        delete bag[ev][ns || '*'][listener]\n      }\n    } else if (ev && ns) {\n      // remove all listeners for a namespaced event\n      if (bag[ev] && bag[ev][ns]) {\n        for (l in bag[ev][ns]) {\n          off(n, [ev, ns].join('.'), l)\n        }\n\n        delete bag[ev][ns]\n      }\n    } else if (ns) {\n      // remove all listeners for a specific namespace\n      for (event in bag) {\n        for (namespace in bag[event]) {\n          if (ns === namespace) {\n            off(n, [event, ns].join('.'))\n          }\n        }\n      }\n    } else if (ev) {\n      // remove all listeners for the event\n      if (bag[ev]) {\n        for (namespace in bag[ev]) {\n          off(n, [ev, namespace].join('.'))\n        }\n\n        delete bag[ev]\n      }\n    } else {\n      // remove all listeners on a given node\n      for (event in bag) {\n        off(n, event)\n      }\n\n      clearEvents(instance)\n    }\n  })\n}\n\nexport function dispatch(node, event, data, options) {\n  const n = getEventTarget(node)\n\n  // Dispatch event\n  if (event instanceof globals.window.Event) {\n    n.dispatchEvent(event)\n  } else {\n    event = new globals.window.CustomEvent(event, {\n      detail: data,\n      cancelable: true,\n      ...options\n    })\n    n.dispatchEvent(event)\n  }\n  return event\n}\n", "import { dispatch, getEvents, off, on } from '../modules/core/event.js'\nimport { register } from '../utils/adopter.js'\nimport Base from './Base.js'\n\nexport default class EventTarget extends Base {\n  addEventListener() {}\n\n  dispatch(event, data, options) {\n    return dispatch(this, event, data, options)\n  }\n\n  dispatchEvent(event) {\n    const bag = getEvents(this)\n\n    const events = bag[event.type]\n    if (!events) return true\n\n    for (const i in events) {\n      for (const j in events[i]) {\n        const listeners = events[i][j]\n\n        listeners.forEach(function (registration) {\n          registration.listener(event)\n        })\n      }\n    }\n\n    return !event.defaultPrevented\n  }\n\n  // Fire given event\n  fire(event, data, options) {\n    this.dispatch(event, data, options)\n    return this\n  }\n\n  getEventHolder() {\n    return this\n  }\n\n  getEventTarget() {\n    return this\n  }\n\n  // Unbind event from listener\n  off(event, listener, options) {\n    off(this, event, listener, options)\n    return this\n  }\n\n  // Bind given event to listener\n  on(event, listener, binding, options) {\n    on(this, event, listener, binding, options)\n    return this\n  }\n\n  removeEventListener() {}\n}\n\nregister(EventTarget, 'EventTarget')\n", "export function noop() {}\n\n// Default animation values\nexport const timeline = {\n  duration: 400,\n  ease: '>',\n  delay: 0\n}\n\n// Default attribute values\nexport const attrs = {\n  // fill and stroke\n  'fill-opacity': 1,\n  'stroke-opacity': 1,\n  'stroke-width': 0,\n  'stroke-linejoin': 'miter',\n  'stroke-linecap': 'butt',\n  fill: '#000000',\n  stroke: '#000000',\n  opacity: 1,\n\n  // position\n  x: 0,\n  y: 0,\n  cx: 0,\n  cy: 0,\n\n  // size\n  width: 0,\n  height: 0,\n\n  // radius\n  r: 0,\n  rx: 0,\n  ry: 0,\n\n  // gradient\n  offset: 0,\n  'stop-opacity': 1,\n  'stop-color': '#000000',\n\n  // text\n  'text-anchor': 'start'\n}\n", "import { delimiter } from '../modules/core/regex.js'\n\nexport default class SVGArray extends Array {\n  constructor(...args) {\n    super(...args)\n    this.init(...args)\n  }\n\n  clone() {\n    return new this.constructor(this)\n  }\n\n  init(arr) {\n    // This catches the case, that native map tries to create an array with new Array(1)\n    if (typeof arr === 'number') return this\n    this.length = 0\n    this.push(...this.parse(arr))\n    return this\n  }\n\n  // Parse whitespace separated string\n  parse(array = []) {\n    // If already is an array, no need to parse it\n    if (array instanceof Array) return array\n\n    return array.trim().split(delimiter).map(parseFloat)\n  }\n\n  toArray() {\n    return Array.prototype.concat.apply([], this)\n  }\n\n  toSet() {\n    return new Set(this)\n  }\n\n  toString() {\n    return this.join(' ')\n  }\n\n  // Flattens the array if needed\n  valueOf() {\n    const ret = []\n    ret.push(...this)\n    return ret\n  }\n}\n", "import { numberAndUnit } from '../modules/core/regex.js'\n\n// Module for unit conversions\nexport default class SVGNumber {\n  // Initialize\n  constructor(...args) {\n    this.init(...args)\n  }\n\n  convert(unit) {\n    return new SVGNumber(this.value, unit)\n  }\n\n  // Divide number\n  divide(number) {\n    number = new SVGNumber(number)\n    return new SVGNumber(this / number, this.unit || number.unit)\n  }\n\n  init(value, unit) {\n    unit = Array.isArray(value) ? value[1] : unit\n    value = Array.isArray(value) ? value[0] : value\n\n    // initialize defaults\n    this.value = 0\n    this.unit = unit || ''\n\n    // parse value\n    if (typeof value === 'number') {\n      // ensure a valid numeric value\n      this.value = isNaN(value)\n        ? 0\n        : !isFinite(value)\n          ? value < 0\n            ? -3.4e38\n            : +3.4e38\n          : value\n    } else if (typeof value === 'string') {\n      unit = value.match(numberAndUnit)\n\n      if (unit) {\n        // make value numeric\n        this.value = parseFloat(unit[1])\n\n        // normalize\n        if (unit[5] === '%') {\n          this.value /= 100\n        } else if (unit[5] === 's') {\n          this.value *= 1000\n        }\n\n        // store unit\n        this.unit = unit[5]\n      }\n    } else {\n      if (value instanceof SVGNumber) {\n        this.value = value.valueOf()\n        this.unit = value.unit\n      }\n    }\n\n    return this\n  }\n\n  // Subtract number\n  minus(number) {\n    number = new SVGNumber(number)\n    return new SVGNumber(this - number, this.unit || number.unit)\n  }\n\n  // Add number\n  plus(number) {\n    number = new SVGNumber(number)\n    return new SVGNumber(this + number, this.unit || number.unit)\n  }\n\n  // Multiply number\n  times(number) {\n    number = new SVGNumber(number)\n    return new SVGNumber(this * number, this.unit || number.unit)\n  }\n\n  toArray() {\n    return [this.value, this.unit]\n  }\n\n  toJSON() {\n    return this.toString()\n  }\n\n  toString() {\n    return (\n      (this.unit === '%'\n        ? ~~(this.value * 1e8) / 1e6\n        : this.unit === 's'\n          ? this.value / 1e3\n          : this.value) + this.unit\n    )\n  }\n\n  valueOf() {\n    return this.value\n  }\n}\n", "import { attrs as defaults } from './defaults.js'\nimport { isNumber } from './regex.js'\nimport Color from '../../types/Color.js'\nimport SVGArray from '../../types/SVGArray.js'\nimport SVGNumber from '../../types/SVGNumber.js'\n\nconst colorAttributes = new Set([\n  'fill',\n  'stroke',\n  'color',\n  'bgcolor',\n  'stop-color',\n  'flood-color',\n  'lighting-color'\n])\n\nconst hooks = []\nexport function registerAttrHook(fn) {\n  hooks.push(fn)\n}\n\n// Set svg element attribute\nexport default function attr(attr, val, ns) {\n  // act as full getter\n  if (attr == null) {\n    // get an object of attributes\n    attr = {}\n    val = this.node.attributes\n\n    for (const node of val) {\n      attr[node.nodeName] = isNumber.test(node.nodeValue)\n        ? parseFloat(node.nodeValue)\n        : node.nodeValue\n    }\n\n    return attr\n  } else if (attr instanceof Array) {\n    // loop through array and get all values\n    return attr.reduce((last, curr) => {\n      last[curr] = this.attr(curr)\n      return last\n    }, {})\n  } else if (typeof attr === 'object' && attr.constructor === Object) {\n    // apply every attribute individually if an object is passed\n    for (val in attr) this.attr(val, attr[val])\n  } else if (val === null) {\n    // remove value\n    this.node.removeAttribute(attr)\n  } else if (val == null) {\n    // act as a getter if the first and only argument is not an object\n    val = this.node.getAttribute(attr)\n    return val == null\n      ? defaults[attr]\n      : isNumber.test(val)\n        ? parseFloat(val)\n        : val\n  } else {\n    // Loop through hooks and execute them to convert value\n    val = hooks.reduce((_val, hook) => {\n      return hook(attr, _val, this)\n    }, val)\n\n    // ensure correct numeric values (also accepts NaN and Infinity)\n    if (typeof val === 'number') {\n      val = new SVGNumber(val)\n    } else if (colorAttributes.has(attr) && Color.isColor(val)) {\n      // ensure full hex color\n      val = new Color(val)\n    } else if (val.constructor === Array) {\n      // Check for plain arrays and parse array values\n      val = new SVGArray(val)\n    }\n\n    // if the passed attribute is leading...\n    if (attr === 'leading') {\n      // ... call the leading method instead\n      if (this.leading) {\n        this.leading(val)\n      }\n    } else {\n      // set given attribute on node\n      typeof ns === 'string'\n        ? this.node.setAttributeNS(ns, attr, val.toString())\n        : this.node.setAttribute(attr, val.toString())\n    }\n\n    // rebuild if required\n    if (this.rebuild && (attr === 'font-size' || attr === 'x')) {\n      this.rebuild()\n    }\n  }\n\n  return this\n}\n", "import {\n  adopt,\n  assignNewId,\n  eid,\n  extend,\n  makeInstance,\n  create,\n  register\n} from '../utils/adopter.js'\nimport { find, findOne } from '../modules/core/selector.js'\nimport { globals } from '../utils/window.js'\nimport { map } from '../utils/utils.js'\nimport { svg, html } from '../modules/core/namespaces.js'\nimport EventTarget from '../types/EventTarget.js'\nimport List from '../types/List.js'\nimport attr from '../modules/core/attr.js'\n\nexport default class Dom extends EventTarget {\n  constructor(node, attrs) {\n    super()\n    this.node = node\n    this.type = node.nodeName\n\n    if (attrs && node !== attrs) {\n      this.attr(attrs)\n    }\n  }\n\n  // Add given element at a position\n  add(element, i) {\n    element = makeInstance(element)\n\n    // If non-root svg nodes are added we have to remove their namespaces\n    if (\n      element.removeNamespace &&\n      this.node instanceof globals.window.SVGElement\n    ) {\n      element.removeNamespace()\n    }\n\n    if (i == null) {\n      this.node.appendChild(element.node)\n    } else if (element.node !== this.node.childNodes[i]) {\n      this.node.insertBefore(element.node, this.node.childNodes[i])\n    }\n\n    return this\n  }\n\n  // Add element to given container and return self\n  addTo(parent, i) {\n    return makeInstance(parent).put(this, i)\n  }\n\n  // Returns all child elements\n  children() {\n    return new List(\n      map(this.node.children, function (node) {\n        return adopt(node)\n      })\n    )\n  }\n\n  // Remove all elements in this container\n  clear() {\n    // remove children\n    while (this.node.hasChildNodes()) {\n      this.node.removeChild(this.node.lastChild)\n    }\n\n    return this\n  }\n\n  // Clone element\n  clone(deep = true, assignNewIds = true) {\n    // write dom data to the dom so the clone can pickup the data\n    this.writeDataToDom()\n\n    // clone element\n    let nodeClone = this.node.cloneNode(deep)\n    if (assignNewIds) {\n      // assign new id\n      nodeClone = assignNewId(nodeClone)\n    }\n    return new this.constructor(nodeClone)\n  }\n\n  // Iterates over all children and invokes a given block\n  each(block, deep) {\n    const children = this.children()\n    let i, il\n\n    for (i = 0, il = children.length; i < il; i++) {\n      block.apply(children[i], [i, children])\n\n      if (deep) {\n        children[i].each(block, deep)\n      }\n    }\n\n    return this\n  }\n\n  element(nodeName, attrs) {\n    return this.put(new Dom(create(nodeName), attrs))\n  }\n\n  // Get first child\n  first() {\n    return adopt(this.node.firstChild)\n  }\n\n  // Get a element at the given index\n  get(i) {\n    return adopt(this.node.childNodes[i])\n  }\n\n  getEventHolder() {\n    return this.node\n  }\n\n  getEventTarget() {\n    return this.node\n  }\n\n  // Checks if the given element is a child\n  has(element) {\n    return this.index(element) >= 0\n  }\n\n  html(htmlOrFn, outerHTML) {\n    return this.xml(htmlOrFn, outerHTML, html)\n  }\n\n  // Get / set id\n  id(id) {\n    // generate new id if no id set\n    if (typeof id === 'undefined' && !this.node.id) {\n      this.node.id = eid(this.type)\n    }\n\n    // don't set directly with this.node.id to make `null` work correctly\n    return this.attr('id', id)\n  }\n\n  // Gets index of given element\n  index(element) {\n    return [].slice.call(this.node.childNodes).indexOf(element.node)\n  }\n\n  // Get the last child\n  last() {\n    return adopt(this.node.lastChild)\n  }\n\n  // matches the element vs a css selector\n  matches(selector) {\n    const el = this.node\n    const matcher =\n      el.matches ||\n      el.matchesSelector ||\n      el.msMatchesSelector ||\n      el.mozMatchesSelector ||\n      el.webkitMatchesSelector ||\n      el.oMatchesSelector ||\n      null\n    return matcher && matcher.call(el, selector)\n  }\n\n  // Returns the parent element instance\n  parent(type) {\n    let parent = this\n\n    // check for parent\n    if (!parent.node.parentNode) return null\n\n    // get parent element\n    parent = adopt(parent.node.parentNode)\n\n    if (!type) return parent\n\n    // loop through ancestors if type is given\n    do {\n      if (\n        typeof type === 'string' ? parent.matches(type) : parent instanceof type\n      )\n        return parent\n    } while ((parent = adopt(parent.node.parentNode)))\n\n    return parent\n  }\n\n  // Basically does the same as `add()` but returns the added element instead\n  put(element, i) {\n    element = makeInstance(element)\n    this.add(element, i)\n    return element\n  }\n\n  // Add element to given container and return container\n  putIn(parent, i) {\n    return makeInstance(parent).add(this, i)\n  }\n\n  // Remove element\n  remove() {\n    if (this.parent()) {\n      this.parent().removeElement(this)\n    }\n\n    return this\n  }\n\n  // Remove a given child\n  removeElement(element) {\n    this.node.removeChild(element.node)\n\n    return this\n  }\n\n  // Replace this with element\n  replace(element) {\n    element = makeInstance(element)\n\n    if (this.node.parentNode) {\n      this.node.parentNode.replaceChild(element.node, this.node)\n    }\n\n    return element\n  }\n\n  round(precision = 2, map = null) {\n    const factor = 10 ** precision\n    const attrs = this.attr(map)\n\n    for (const i in attrs) {\n      if (typeof attrs[i] === 'number') {\n        attrs[i] = Math.round(attrs[i] * factor) / factor\n      }\n    }\n\n    this.attr(attrs)\n    return this\n  }\n\n  // Import / Export raw svg\n  svg(svgOrFn, outerSVG) {\n    return this.xml(svgOrFn, outerSVG, svg)\n  }\n\n  // Return id on string conversion\n  toString() {\n    return this.id()\n  }\n\n  words(text) {\n    // This is faster than removing all children and adding a new one\n    this.node.textContent = text\n    return this\n  }\n\n  wrap(node) {\n    const parent = this.parent()\n\n    if (!parent) {\n      return this.addTo(node)\n    }\n\n    const position = parent.index(this)\n    return parent.put(node, position).put(this)\n  }\n\n  // write svgjs data to the dom\n  writeDataToDom() {\n    // dump variables recursively\n    this.each(function () {\n      this.writeDataToDom()\n    })\n\n    return this\n  }\n\n  // Import / Export raw svg\n  xml(xmlOrFn, outerXML, ns) {\n    if (typeof xmlOrFn === 'boolean') {\n      ns = outerXML\n      outerXML = xmlOrFn\n      xmlOrFn = null\n    }\n\n    // act as getter if no svg string is given\n    if (xmlOrFn == null || typeof xmlOrFn === 'function') {\n      // The default for exports is, that the outerNode is included\n      outerXML = outerXML == null ? true : outerXML\n\n      // write svgjs data to the dom\n      this.writeDataToDom()\n      let current = this\n\n      // An export modifier was passed\n      if (xmlOrFn != null) {\n        current = adopt(current.node.cloneNode(true))\n\n        // If the user wants outerHTML we need to process this node, too\n        if (outerXML) {\n          const result = xmlOrFn(current)\n          current = result || current\n\n          // The user does not want this node? Well, then he gets nothing\n          if (result === false) return ''\n        }\n\n        // Deep loop through all children and apply modifier\n        current.each(function () {\n          const result = xmlOrFn(this)\n          const _this = result || this\n\n          // If modifier returns false, discard node\n          if (result === false) {\n            this.remove()\n\n            // If modifier returns new node, use it\n          } else if (result && this !== _this) {\n            this.replace(_this)\n          }\n        }, true)\n      }\n\n      // Return outer or inner content\n      return outerXML ? current.node.outerHTML : current.node.innerHTML\n    }\n\n    // Act as setter if we got a string\n\n    // The default for import is, that the current node is not replaced\n    outerXML = outerXML == null ? false : outerXML\n\n    // Create temporary holder\n    const well = create('wrapper', ns)\n    const fragment = globals.document.createDocumentFragment()\n\n    // Dump raw svg\n    well.innerHTML = xmlOrFn\n\n    // Transplant nodes into the fragment\n    for (let len = well.children.length; len--;) {\n      fragment.appendChild(well.firstElementChild)\n    }\n\n    const parent = this.parent()\n\n    // Add the whole fragment at once\n    return outerXML ? this.replace(fragment) && parent : this.add(fragment)\n  }\n}\n\nextend(Dom, { attr, find, findOne })\nregister(Dom, 'Dom')\n", "import { bbox, rbox, inside } from '../types/Box.js'\nimport { ctm, screenCTM } from '../types/Matrix.js'\nimport {\n  extend,\n  getClass,\n  makeInstance,\n  register,\n  root\n} from '../utils/adopter.js'\nimport { globals } from '../utils/window.js'\nimport { point } from '../types/Point.js'\nimport { proportionalSize, writeDataToDom } from '../utils/utils.js'\nimport { resolveReference } from '../modules/core/references.js'\nimport Dom from './Dom.js'\nimport List from '../types/List.js'\nimport SVGNumber from '../types/SVGNumber.js'\n\nexport default class Element extends Dom {\n  constructor(node, attrs) {\n    super(node, attrs)\n\n    // initialize data object\n    this.dom = {}\n\n    // create circular reference\n    this.node.instance = this\n\n    if (node.hasAttribute('data-svgjs') || node.hasAttribute('svgjs:data')) {\n      // pull svgjs data from the dom (getAttributeNS doesn't work in html5)\n      this.setData(\n        JSON.parse(node.getAttribute('data-svgjs')) ??\n          JSON.parse(node.getAttribute('svgjs:data')) ??\n          {}\n      )\n    }\n  }\n\n  // Move element by its center\n  center(x, y) {\n    return this.cx(x).cy(y)\n  }\n\n  // Move by center over x-axis\n  cx(x) {\n    return x == null\n      ? this.x() + this.width() / 2\n      : this.x(x - this.width() / 2)\n  }\n\n  // Move by center over y-axis\n  cy(y) {\n    return y == null\n      ? this.y() + this.height() / 2\n      : this.y(y - this.height() / 2)\n  }\n\n  // Get defs\n  defs() {\n    const root = this.root()\n    return root && root.defs()\n  }\n\n  // Relative move over x and y axes\n  dmove(x, y) {\n    return this.dx(x).dy(y)\n  }\n\n  // Relative move over x axis\n  dx(x = 0) {\n    return this.x(new SVGNumber(x).plus(this.x()))\n  }\n\n  // Relative move over y axis\n  dy(y = 0) {\n    return this.y(new SVGNumber(y).plus(this.y()))\n  }\n\n  getEventHolder() {\n    return this\n  }\n\n  // Set height of element\n  height(height) {\n    return this.attr('height', height)\n  }\n\n  // Move element to given x and y values\n  move(x, y) {\n    return this.x(x).y(y)\n  }\n\n  // return array of all ancestors of given type up to the root svg\n  parents(until = this.root()) {\n    const isSelector = typeof until === 'string'\n    const root = this.root()\n    const rootNode = root && root.node\n\n    if (!isSelector) {\n      until = until && makeInstance(until).node\n    }\n\n    const parents = new List()\n    let parent = this\n\n    while (\n      (parent = parent.parent()) &&\n      parent.node !== globals.document &&\n      parent.node.nodeName !== '#document-fragment'\n    ) {\n      parents.push(parent)\n\n      if (!isSelector && parent.node === until) {\n        break\n      }\n      if (isSelector && parent.matches(until)) {\n        break\n      }\n      if (rootNode && parent.node === rootNode) {\n        // We worked our way to the root and didn't match `until`\n        return null\n      }\n    }\n\n    return parents\n  }\n\n  // Get referenced element form attribute value\n  reference(attr) {\n    attr = this.attr(attr)\n    if (!attr) return null\n\n    const target = resolveReference(this.node, attr)\n    return target ? makeInstance(target) : null\n  }\n\n  // Get parent document\n  root() {\n    const p = this.parent(getClass(root))\n    return p && p.root()\n  }\n\n  // set given data to the elements data property\n  setData(o) {\n    this.dom = o\n    return this\n  }\n\n  // Set element size to given width and height\n  size(width, height) {\n    const p = proportionalSize(this, width, height)\n\n    return this.width(new SVGNumber(p.width)).height(new SVGNumber(p.height))\n  }\n\n  // Set width of element\n  width(width) {\n    return this.attr('width', width)\n  }\n\n  // write svgjs data to the dom\n  writeDataToDom(defaults) {\n    writeDataToDom(this, this.dom, defaults)\n    return super.writeDataToDom()\n  }\n\n  // Move over x-axis\n  x(x) {\n    return this.attr('x', x)\n  }\n\n  // Move over y-axis\n  y(y) {\n    return this.attr('y', y)\n  }\n}\n\nextend(Element, {\n  bbox,\n  rbox,\n  inside,\n  point,\n  ctm,\n  screenCTM\n})\n\nregister(Element, 'Element')\n", "import { registerMethods } from '../../utils/methods.js'\nimport Color from '../../types/Color.js'\nimport Element from '../../elements/Element.js'\nimport Matrix from '../../types/Matrix.js'\nimport Point from '../../types/Point.js'\nimport SVGNumber from '../../types/SVGNumber.js'\n\n// Define list of available attributes for stroke and fill\nconst sugar = {\n  stroke: [\n    'color',\n    'width',\n    'opacity',\n    'linecap',\n    'linejoin',\n    'miterlimit',\n    'dasharray',\n    'dashoffset'\n  ],\n  fill: ['color', 'opacity', 'rule'],\n  prefix: function (t, a) {\n    return a === 'color' ? t : t + '-' + a\n  }\n}\n\n// Add sugar for fill and stroke\n;['fill', 'stroke'].forEach(function (m) {\n  const extension = {}\n  let i\n\n  extension[m] = function (o) {\n    if (typeof o === 'undefined') {\n      return this.attr(m)\n    }\n    if (\n      typeof o === 'string' ||\n      o instanceof Color ||\n      Color.isRgb(o) ||\n      o instanceof Element\n    ) {\n      this.attr(m, o)\n    } else {\n      // set all attributes from sugar.fill and sugar.stroke list\n      for (i = sugar[m].length - 1; i >= 0; i--) {\n        if (o[sugar[m][i]] != null) {\n          this.attr(sugar.prefix(m, sugar[m][i]), o[sugar[m][i]])\n        }\n      }\n    }\n\n    return this\n  }\n\n  registerMethods(['Element', 'Runner'], extension)\n})\n\nregisterMethods(['Element', 'Runner'], {\n  // Let the user set the matrix directly\n  matrix: function (mat, b, c, d, e, f) {\n    // Act as a getter\n    if (mat == null) {\n      return new Matrix(this)\n    }\n\n    // Act as a setter, the user can pass a matrix or a set of numbers\n    return this.attr('transform', new Matrix(mat, b, c, d, e, f))\n  },\n\n  // Map rotation to transform\n  rotate: function (angle, cx, cy) {\n    return this.transform({ rotate: angle, ox: cx, oy: cy }, true)\n  },\n\n  // Map skew to transform\n  skew: function (x, y, cx, cy) {\n    return arguments.length === 1 || arguments.length === 3\n      ? this.transform({ skew: x, ox: y, oy: cx }, true)\n      : this.transform({ skew: [x, y], ox: cx, oy: cy }, true)\n  },\n\n  shear: function (lam, cx, cy) {\n    return this.transform({ shear: lam, ox: cx, oy: cy }, true)\n  },\n\n  // Map scale to transform\n  scale: function (x, y, cx, cy) {\n    return arguments.length === 1 || arguments.length === 3\n      ? this.transform({ scale: x, ox: y, oy: cx }, true)\n      : this.transform({ scale: [x, y], ox: cx, oy: cy }, true)\n  },\n\n  // Map translate to transform\n  translate: function (x, y) {\n    return this.transform({ translate: [x, y] }, true)\n  },\n\n  // Map relative translations to transform\n  relative: function (x, y) {\n    return this.transform({ relative: [x, y] }, true)\n  },\n\n  // Map flip to transform\n  flip: function (direction = 'both', origin = 'center') {\n    if ('xybothtrue'.indexOf(direction) === -1) {\n      origin = direction\n      direction = 'both'\n    }\n\n    return this.transform({ flip: direction, origin: origin }, true)\n  },\n\n  // Opacity\n  opacity: function (value) {\n    return this.attr('opacity', value)\n  }\n})\n\nregisterMethods('radius', {\n  // Add x and y radius\n  radius: function (x, y = x) {\n    const type = (this._element || this).type\n    return type === 'radialGradient'\n      ? this.attr('r', new SVGNumber(x))\n      : this.rx(x).ry(y)\n  }\n})\n\nregisterMethods('Path', {\n  // Get path length\n  length: function () {\n    return this.node.getTotalLength()\n  },\n  // Get point at length\n  pointAt: function (length) {\n    return new Point(this.node.getPointAtLength(length))\n  }\n})\n\nregisterMethods(['Element', 'Runner'], {\n  // Set font\n  font: function (a, v) {\n    if (typeof a === 'object') {\n      for (v in a) this.font(v, a[v])\n      return this\n    }\n\n    return a === 'leading'\n      ? this.leading(v)\n      : a === 'anchor'\n        ? this.attr('text-anchor', v)\n        : a === 'size' ||\n            a === 'family' ||\n            a === 'weight' ||\n            a === 'stretch' ||\n            a === 'variant' ||\n            a === 'style'\n          ? this.attr('font-' + a, v)\n          : this.attr(a, v)\n  }\n})\n\n// Add events to elements\nconst methods = [\n  'click',\n  'dblclick',\n  'mousedown',\n  'mouseup',\n  'mouseover',\n  'mouseout',\n  'mousemove',\n  'mouseenter',\n  'mouseleave',\n  'touchstart',\n  'touchmove',\n  'touchleave',\n  'touchend',\n  'touchcancel',\n  'contextmenu',\n  'wheel',\n  'pointerdown',\n  'pointermove',\n  'pointerup',\n  'pointerleave',\n  'pointercancel'\n].reduce(function (last, event) {\n  // add event to Element\n  const fn = function (f) {\n    if (f === null) {\n      this.off(event)\n    } else {\n      this.on(event, f)\n    }\n    return this\n  }\n\n  last[event] = fn\n  return last\n}, {})\n\nregisterMethods('Element', methods)\n", "import { getOrigin, isDescriptive } from '../../utils/utils.js'\nimport { delimiter, transforms } from '../core/regex.js'\nimport { registerMethods } from '../../utils/methods.js'\nimport Matrix from '../../types/Matrix.js'\n\n// Reset all transformations\nexport function untransform() {\n  return this.attr('transform', null)\n}\n\n// merge the whole transformation chain into one matrix and returns it\nexport function matrixify() {\n  const matrix = (this.attr('transform') || '')\n    // split transformations\n    .split(transforms)\n    .slice(0, -1)\n    .map(function (str) {\n      // generate key => value pairs\n      const kv = str.trim().split('(')\n      return [\n        kv[0].trim(),\n        kv[1].split(delimiter).map(function (str) {\n          return parseFloat(str)\n        })\n      ]\n    })\n    .reverse()\n    // merge every transformation into one matrix\n    .reduce(function (matrix, transform) {\n      if (transform[0] === 'matrix') {\n        return matrix.lmultiply(Matrix.fromArray(transform[1]))\n      }\n      return matrix[transform[0]].apply(matrix, transform[1])\n    }, new Matrix())\n\n  return matrix\n}\n\n// add an element to another parent without changing the visual representation on the screen\nexport function toParent(parent, i) {\n  if (this === parent) return this\n\n  if (isDescriptive(this.node)) return this.addTo(parent, i)\n\n  const ctm = this.screenCTM()\n  const pCtm = parent.screenCTM().inverse()\n\n  this.addTo(parent, i).untransform().transform(pCtm.multiply(ctm))\n\n  return this\n}\n\n// same as above with parent equals root-svg\nexport function toRoot(i) {\n  return this.toParent(this.root(), i)\n}\n\n// Add transformations\nexport function transform(o, relative) {\n  // Act as a getter if no object was passed\n  if (o == null || typeof o === 'string') {\n    const decomposed = new Matrix(this).decompose()\n    return o == null ? decomposed : decomposed[o]\n  }\n\n  if (!Matrix.isMatrixLike(o)) {\n    // Set the origin according to the defined transform\n    o = { ...o, origin: getOrigin(o, this) }\n  }\n\n  // The user can pass a boolean, an Element or an Matrix or nothing\n  const cleanRelative = relative === true ? this : relative || false\n  const result = new Matrix(cleanRelative).transform(o)\n  return this.attr('transform', result)\n}\n\nregisterMethods('Element', {\n  untransform,\n  matrixify,\n  toParent,\n  toRoot,\n  transform\n})\n", "import { register } from '../utils/adopter.js'\nimport Element from './Element.js'\n\nexport default class Container extends Element {\n  flatten() {\n    this.each(function () {\n      if (this instanceof Container) {\n        return this.flatten().ungroup()\n      }\n    })\n\n    return this\n  }\n\n  ungroup(parent = this.parent(), index = parent.index(this)) {\n    // when parent != this, we want append all elements to the end\n    index = index === -1 ? parent.children().length : index\n\n    this.each(function (i, children) {\n      // reverse each\n      return children[children.length - i - 1].toParent(parent, index)\n    })\n\n    return this.remove()\n  }\n}\n\nregister(Container, 'Container')\n", "import { nodeOrNew, register } from '../utils/adopter.js'\nimport Container from './Container.js'\n\nexport default class Defs extends Container {\n  constructor(node, attrs = node) {\n    super(nodeOrNew('defs', node), attrs)\n  }\n\n  flatten() {\n    return this\n  }\n\n  ungroup() {\n    return this\n  }\n}\n\nregister(Defs, 'Defs')\n", "import { register } from '../utils/adopter.js'\nimport Element from './Element.js'\n\nexport default class Shape extends Element {}\n\nregister(Shape, 'Shape')\n", "import SVGNumber from '../../types/SVGNumber.js'\n\n// Radius x value\nexport function rx(rx) {\n  return this.attr('rx', rx)\n}\n\n// Radius y value\nexport function ry(ry) {\n  return this.attr('ry', ry)\n}\n\n// Move over x-axis\nexport function x(x) {\n  return x == null ? this.cx() - this.rx() : this.cx(x + this.rx())\n}\n\n// Move over y-axis\nexport function y(y) {\n  return y == null ? this.cy() - this.ry() : this.cy(y + this.ry())\n}\n\n// Move by center over x-axis\nexport function cx(x) {\n  return this.attr('cx', x)\n}\n\n// Move by center over y-axis\nexport function cy(y) {\n  return this.attr('cy', y)\n}\n\n// Set width of element\nexport function width(width) {\n  return width == null ? this.rx() * 2 : this.rx(new SVGNumber(width).divide(2))\n}\n\n// Set height of element\nexport function height(height) {\n  return height == null\n    ? this.ry() * 2\n    : this.ry(new SVGNumber(height).divide(2))\n}\n", "import {\n  extend,\n  nodeOrNew,\n  register,\n  wrapWithAttrCheck\n} from '../utils/adopter.js'\nimport { proportionalSize } from '../utils/utils.js'\nimport { registerMethods } from '../utils/methods.js'\nimport SVGNumber from '../types/SVGNumber.js'\nimport Shape from './Shape.js'\nimport * as circled from '../modules/core/circled.js'\n\nexport default class Ellipse extends Shape {\n  constructor(node, attrs = node) {\n    super(nodeOrNew('ellipse', node), attrs)\n  }\n\n  size(width, height) {\n    const p = proportionalSize(this, width, height)\n\n    return this.rx(new SVGNumber(p.width).divide(2)).ry(\n      new SVGNumber(p.height).divide(2)\n    )\n  }\n}\n\nextend(Ellipse, circled)\n\nregisterMethods('Container', {\n  // Create an ellipse\n  ellipse: wrapWithAttrCheck(function (width = 0, height = width) {\n    return this.put(new Ellipse()).size(width, height).move(0, 0)\n  })\n})\n\nregister(Ellipse, 'Ellipse')\n", "import Dom from './Dom.js'\nimport { globals } from '../utils/window.js'\nimport { register, create } from '../utils/adopter.js'\n\nclass Fragment extends Dom {\n  constructor(node = globals.document.createDocumentFragment()) {\n    super(node)\n  }\n\n  // Import / Export raw xml\n  xml(xmlOrFn, outerXML, ns) {\n    if (typeof xmlOrFn === 'boolean') {\n      ns = outerXML\n      outerXML = xmlOrFn\n      xmlOrFn = null\n    }\n\n    // because this is a fragment we have to put all elements into a wrapper first\n    // before we can get the innerXML from it\n    if (xmlOrFn == null || typeof xmlOrFn === 'function') {\n      const wrapper = new Dom(create('wrapper', ns))\n      wrapper.add(this.node.cloneNode(true))\n\n      return wrapper.xml(false, ns)\n    }\n\n    // Act as setter if we got a string\n    return super.xml(xmlOrFn, false, ns)\n  }\n}\n\nregister(Fragment, 'Fragment')\n\nexport default Fragment\n", "import SVGNumber from '../../types/SVGNumber.js'\n\nexport function from(x, y) {\n  return (this._element || this).type === 'radialGradient'\n    ? this.attr({ fx: new SVGNumber(x), fy: new SVGNumber(y) })\n    : this.attr({ x1: new SVGNumber(x), y1: new SVGNumber(y) })\n}\n\nexport function to(x, y) {\n  return (this._element || this).type === 'radialGradient'\n    ? this.attr({ cx: new SVGNumber(x), cy: new SVGNumber(y) })\n    : this.attr({ x2: new SVGNumber(x), y2: new SVGNumber(y) })\n}\n", "import {\n  extend,\n  nodeOrNew,\n  register,\n  wrapWithAttrCheck\n} from '../utils/adopter.js'\nimport { registerMethods } from '../utils/methods.js'\nimport Box from '../types/Box.js'\nimport Container from './Container.js'\nimport { findReferences } from '../modules/core/references.js'\nimport * as gradiented from '../modules/core/gradiented.js'\n\nexport default class Gradient extends Container {\n  constructor(type, attrs) {\n    super(\n      nodeOrNew(type + 'Gradient', typeof type === 'string' ? null : type),\n      attrs\n    )\n  }\n\n  // custom attr to handle transform\n  attr(a, b, c) {\n    if (a === 'transform') a = 'gradientTransform'\n    return super.attr(a, b, c)\n  }\n\n  bbox() {\n    return new Box()\n  }\n\n  targets() {\n    return findReferences(this.node, 'fill')\n  }\n\n  // Alias string conversion to fill\n  toString() {\n    return this.url()\n  }\n\n  // Update gradient\n  update(block) {\n    // remove all stops\n    this.clear()\n\n    // invoke passed block\n    if (typeof block === 'function') {\n      block.call(this, this)\n    }\n\n    return this\n  }\n\n  // Return the fill id\n  url() {\n    return 'url(#' + this.id() + ')'\n  }\n}\n\nextend(Gradient, gradiented)\n\nregisterMethods({\n  Container: {\n    // Create gradient element in defs\n    gradient(...args) {\n      return this.defs().gradient(...args)\n    }\n  },\n  // define gradient\n  Defs: {\n    gradient: wrapWithAttrCheck(function (type, block) {\n      return this.put(new Gradient(type)).update(block)\n    })\n  }\n})\n\nregister(Gradient, 'Gradient')\n", "import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\nimport { registerMethods } from '../utils/methods.js'\nimport Box from '../types/Box.js'\nimport Container from './Container.js'\nimport { findReferences } from '../modules/core/references.js'\n\nexport default class Pattern extends Container {\n  // Initialize node\n  constructor(node, attrs = node) {\n    super(nodeOrNew('pattern', node), attrs)\n  }\n\n  // custom attr to handle transform\n  attr(a, b, c) {\n    if (a === 'transform') a = 'patternTransform'\n    return super.attr(a, b, c)\n  }\n\n  bbox() {\n    return new Box()\n  }\n\n  targets() {\n    return findReferences(this.node, 'fill')\n  }\n\n  // Alias string conversion to fill\n  toString() {\n    return this.url()\n  }\n\n  // Update pattern by rebuilding\n  update(block) {\n    // remove content\n    this.clear()\n\n    // invoke passed block\n    if (typeof block === 'function') {\n      block.call(this, this)\n    }\n\n    return this\n  }\n\n  // Return the fill id\n  url() {\n    return 'url(#' + this.id() + ')'\n  }\n}\n\nregisterMethods({\n  Container: {\n    // Create pattern element in defs\n    pattern(...args) {\n      return this.defs().pattern(...args)\n    }\n  },\n  Defs: {\n    pattern: wrapWithAttrCheck(function (width, height, block) {\n      return this.put(new Pattern()).update(block).attr({\n        x: 0,\n        y: 0,\n        width: width,\n        height: height,\n        patternUnits: 'userSpaceOnUse'\n      })\n    })\n  }\n})\n\nregister(Pattern, 'Pattern')\n", "import { isImage } from '../modules/core/regex.js'\nimport { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\nimport { off, on } from '../modules/core/event.js'\nimport { registerAttrHook } from '../modules/core/attr.js'\nimport { registerMethods } from '../utils/methods.js'\nimport { xlink } from '../modules/core/namespaces.js'\nimport Pattern from './Pattern.js'\nimport Shape from './Shape.js'\nimport { globals } from '../utils/window.js'\n\nexport default class Image extends Shape {\n  constructor(node, attrs = node) {\n    super(nodeOrNew('image', node), attrs)\n  }\n\n  // (re)load image\n  load(url, callback) {\n    if (!url) return this\n\n    const img = new globals.window.Image()\n\n    on(\n      img,\n      'load',\n      function (e) {\n        const p = this.parent(Pattern)\n\n        // ensure image size\n        if (this.width() === 0 && this.height() === 0) {\n          this.size(img.width, img.height)\n        }\n\n        if (p instanceof Pattern) {\n          // ensure pattern size if not set\n          if (p.width() === 0 && p.height() === 0) {\n            p.size(this.width(), this.height())\n          }\n        }\n\n        if (typeof callback === 'function') {\n          callback.call(this, e)\n        }\n      },\n      this\n    )\n\n    on(img, 'load error', function () {\n      // dont forget to unbind memory leaking events\n      off(img)\n    })\n\n    return this.attr('href', (img.src = url), xlink)\n  }\n}\n\nregisterAttrHook(function (attr, val, _this) {\n  // convert image fill and stroke to patterns\n  if (attr === 'fill' || attr === 'stroke') {\n    if (isImage.test(val)) {\n      val = _this.root().defs().image(val)\n    }\n  }\n\n  if (val instanceof Image) {\n    val = _this\n      .root()\n      .defs()\n      .pattern(0, 0, (pattern) => {\n        pattern.add(val)\n      })\n  }\n\n  return val\n})\n\nregisterMethods({\n  Container: {\n    // create image element, load image and set its size\n    image: wrapWithAttrCheck(function (source, callback) {\n      return this.put(new Image()).size(0, 0).load(source, callback)\n    })\n  }\n})\n\nregister(Image, 'Image')\n", "import { delimiter } from '../modules/core/regex.js'\nimport SVGArray from './SVGArray.js'\nimport Box from './Box.js'\nimport Matrix from './Matrix.js'\n\nexport default class PointArray extends SVGArray {\n  // Get bounding box of points\n  bbox() {\n    let maxX = -Infinity\n    let maxY = -Infinity\n    let minX = Infinity\n    let minY = Infinity\n    this.forEach(function (el) {\n      maxX = Math.max(el[0], maxX)\n      maxY = Math.max(el[1], maxY)\n      minX = Math.min(el[0], minX)\n      minY = Math.min(el[1], minY)\n    })\n    return new Box(minX, minY, maxX - minX, maxY - minY)\n  }\n\n  // Move point string\n  move(x, y) {\n    const box = this.bbox()\n\n    // get relative offset\n    x -= box.x\n    y -= box.y\n\n    // move every point\n    if (!isNaN(x) && !isNaN(y)) {\n      for (let i = this.length - 1; i >= 0; i--) {\n        this[i] = [this[i][0] + x, this[i][1] + y]\n      }\n    }\n\n    return this\n  }\n\n  // Parse point string and flat array\n  parse(array = [0, 0]) {\n    const points = []\n\n    // if it is an array, we flatten it and therefore clone it to 1 depths\n    if (array instanceof Array) {\n      array = Array.prototype.concat.apply([], array)\n    } else {\n      // Else, it is considered as a string\n      // parse points\n      array = array.trim().split(delimiter).map(parseFloat)\n    }\n\n    // validate points - https://svgwg.org/svg2-draft/shapes.html#DataTypePoints\n    // Odd number of coordinates is an error. In such cases, drop the last odd coordinate.\n    if (array.length % 2 !== 0) array.pop()\n\n    // wrap points in two-tuples\n    for (let i = 0, len = array.length; i < len; i = i + 2) {\n      points.push([array[i], array[i + 1]])\n    }\n\n    return points\n  }\n\n  // Resize poly string\n  size(width, height) {\n    let i\n    const box = this.bbox()\n\n    // recalculate position of all points according to new size\n    for (i = this.length - 1; i >= 0; i--) {\n      if (box.width)\n        this[i][0] = ((this[i][0] - box.x) * width) / box.width + box.x\n      if (box.height)\n        this[i][1] = ((this[i][1] - box.y) * height) / box.height + box.y\n    }\n\n    return this\n  }\n\n  // Convert array to line object\n  toLine() {\n    return {\n      x1: this[0][0],\n      y1: this[0][1],\n      x2: this[1][0],\n      y2: this[1][1]\n    }\n  }\n\n  // Convert array to string\n  toString() {\n    const array = []\n    // convert to a poly point string\n    for (let i = 0, il = this.length; i < il; i++) {\n      array.push(this[i].join(','))\n    }\n\n    return array.join(' ')\n  }\n\n  transform(m) {\n    return this.clone().transformO(m)\n  }\n\n  // transform points with matrix (similar to Point.transform)\n  transformO(m) {\n    if (!Matrix.isMatrixLike(m)) {\n      m = new Matrix(m)\n    }\n\n    for (let i = this.length; i--;) {\n      // Perform the matrix multiplication\n      const [x, y] = this[i]\n      this[i][0] = m.a * x + m.c * y + m.e\n      this[i][1] = m.b * x + m.d * y + m.f\n    }\n\n    return this\n  }\n}\n", "import PointArray from '../../types/PointArray.js'\n\nexport const MorphArray = PointArray\n\n// Move by left top corner over x-axis\nexport function x(x) {\n  return x == null ? this.bbox().x : this.move(x, this.bbox().y)\n}\n\n// Move by left top corner over y-axis\nexport function y(y) {\n  return y == null ? this.bbox().y : this.move(this.bbox().x, y)\n}\n\n// Set width of element\nexport function width(width) {\n  const b = this.bbox()\n  return width == null ? b.width : this.size(width, b.height)\n}\n\n// Set height of element\nexport function height(height) {\n  const b = this.bbox()\n  return height == null ? b.height : this.size(b.width, height)\n}\n", "import {\n  extend,\n  nodeOrNew,\n  register,\n  wrapWithAttrCheck\n} from '../utils/adopter.js'\nimport { proportionalSize } from '../utils/utils.js'\nimport { registerMethods } from '../utils/methods.js'\nimport PointArray from '../types/PointArray.js'\nimport Shape from './Shape.js'\nimport * as pointed from '../modules/core/pointed.js'\n\nexport default class Line extends Shape {\n  // Initialize node\n  constructor(node, attrs = node) {\n    super(nodeOrNew('line', node), attrs)\n  }\n\n  // Get array\n  array() {\n    return new PointArray([\n      [this.attr('x1'), this.attr('y1')],\n      [this.attr('x2'), this.attr('y2')]\n    ])\n  }\n\n  // Move by left top corner\n  move(x, y) {\n    return this.attr(this.array().move(x, y).toLine())\n  }\n\n  // Overwrite native plot() method\n  plot(x1, y1, x2, y2) {\n    if (x1 == null) {\n      return this.array()\n    } else if (typeof y1 !== 'undefined') {\n      x1 = { x1, y1, x2, y2 }\n    } else {\n      x1 = new PointArray(x1).toLine()\n    }\n\n    return this.attr(x1)\n  }\n\n  // Set element size to given width and height\n  size(width, height) {\n    const p = proportionalSize(this, width, height)\n    return this.attr(this.array().size(p.width, p.height).toLine())\n  }\n}\n\nextend(Line, pointed)\n\nregisterMethods({\n  Container: {\n    // Create a line element\n    line: wrapWithAttrCheck(function (...args) {\n      // make sure plot is called as a setter\n      // x1 is not necessarily a number, it can also be an array, a string and a PointArray\n      return Line.prototype.plot.apply(\n        this.put(new Line()),\n        args[0] != null ? args : [0, 0, 0, 0]\n      )\n    })\n  }\n})\n\nregister(Line, 'Line')\n", "import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\nimport { registerMethods } from '../utils/methods.js'\nimport Container from './Container.js'\n\nexport default class Marker extends Container {\n  // Initialize node\n  constructor(node, attrs = node) {\n    super(nodeOrNew('marker', node), attrs)\n  }\n\n  // Set height of element\n  height(height) {\n    return this.attr('markerHeight', height)\n  }\n\n  orient(orient) {\n    return this.attr('orient', orient)\n  }\n\n  // Set marker refX and refY\n  ref(x, y) {\n    return this.attr('refX', x).attr('refY', y)\n  }\n\n  // Return the fill id\n  toString() {\n    return 'url(#' + this.id() + ')'\n  }\n\n  // Update marker\n  update(block) {\n    // remove all content\n    this.clear()\n\n    // invoke passed block\n    if (typeof block === 'function') {\n      block.call(this, this)\n    }\n\n    return this\n  }\n\n  // Set width of element\n  width(width) {\n    return this.attr('markerWidth', width)\n  }\n}\n\nregisterMethods({\n  Container: {\n    marker(...args) {\n      // Create marker element in defs\n      return this.defs().marker(...args)\n    }\n  },\n  Defs: {\n    // Create marker\n    marker: wrapWithAttrCheck(function (width, height, block) {\n      // Set default viewbox to match the width and height, set ref to cx and cy and set orient to auto\n      return this.put(new Marker())\n        .size(width, height)\n        .ref(width / 2, height / 2)\n        .viewbox(0, 0, width, height)\n        .attr('orient', 'auto')\n        .update(block)\n    })\n  },\n  marker: {\n    // Create and attach markers\n    marker(marker, width, height, block) {\n      let attr = ['marker']\n\n      // Build attribute name\n      if (marker !== 'all') attr.push(marker)\n      attr = attr.join('-')\n\n      // Set marker attribute\n      marker =\n        arguments[1] instanceof Marker\n          ? arguments[1]\n          : this.defs().marker(width, height, block)\n\n      return this.attr(attr, marker)\n    }\n  }\n})\n\nregister(Marker, 'Marker')\n", "import { timeline } from '../modules/core/defaults.js'\nimport { extend } from '../utils/adopter.js'\n\n/***\nBase Class\n==========\nThe base stepper class that will be\n***/\n\nfunction makeSetterGetter(k, f) {\n  return function (v) {\n    if (v == null) return this[k]\n    this[k] = v\n    if (f) f.call(this)\n    return this\n  }\n}\n\nexport const easing = {\n  '-': function (pos) {\n    return pos\n  },\n  '<>': function (pos) {\n    return -Math.cos(pos * Math.PI) / 2 + 0.5\n  },\n  '>': function (pos) {\n    return Math.sin((pos * Math.PI) / 2)\n  },\n  '<': function (pos) {\n    return -Math.cos((pos * Math.PI) / 2) + 1\n  },\n  bezier: function (x1, y1, x2, y2) {\n    // see https://www.w3.org/TR/css-easing-1/#cubic-bezier-algo\n    return function (t) {\n      if (t < 0) {\n        if (x1 > 0) {\n          return (y1 / x1) * t\n        } else if (x2 > 0) {\n          return (y2 / x2) * t\n        } else {\n          return 0\n        }\n      } else if (t > 1) {\n        if (x2 < 1) {\n          return ((1 - y2) / (1 - x2)) * t + (y2 - x2) / (1 - x2)\n        } else if (x1 < 1) {\n          return ((1 - y1) / (1 - x1)) * t + (y1 - x1) / (1 - x1)\n        } else {\n          return 1\n        }\n      } else {\n        return 3 * t * (1 - t) ** 2 * y1 + 3 * t ** 2 * (1 - t) * y2 + t ** 3\n      }\n    }\n  },\n  // see https://www.w3.org/TR/css-easing-1/#step-timing-function-algo\n  steps: function (steps, stepPosition = 'end') {\n    // deal with \"jump-\" prefix\n    stepPosition = stepPosition.split('-').reverse()[0]\n\n    let jumps = steps\n    if (stepPosition === 'none') {\n      --jumps\n    } else if (stepPosition === 'both') {\n      ++jumps\n    }\n\n    // The beforeFlag is essentially useless\n    return (t, beforeFlag = false) => {\n      // Step is called currentStep in referenced url\n      let step = Math.floor(t * steps)\n      const jumping = (t * step) % 1 === 0\n\n      if (stepPosition === 'start' || stepPosition === 'both') {\n        ++step\n      }\n\n      if (beforeFlag && jumping) {\n        --step\n      }\n\n      if (t >= 0 && step < 0) {\n        step = 0\n      }\n\n      if (t <= 1 && step > jumps) {\n        step = jumps\n      }\n\n      return step / jumps\n    }\n  }\n}\n\nexport class Stepper {\n  done() {\n    return false\n  }\n}\n\n/***\nEasing Functions\n================\n***/\n\nexport class Ease extends Stepper {\n  constructor(fn = timeline.ease) {\n    super()\n    this.ease = easing[fn] || fn\n  }\n\n  step(from, to, pos) {\n    if (typeof from !== 'number') {\n      return pos < 1 ? from : to\n    }\n    return from + (to - from) * this.ease(pos)\n  }\n}\n\n/***\nController Types\n================\n***/\n\nexport class Controller extends Stepper {\n  constructor(fn) {\n    super()\n    this.stepper = fn\n  }\n\n  done(c) {\n    return c.done\n  }\n\n  step(current, target, dt, c) {\n    return this.stepper(current, target, dt, c)\n  }\n}\n\nfunction recalculate() {\n  // Apply the default parameters\n  const duration = (this._duration || 500) / 1000\n  const overshoot = this._overshoot || 0\n\n  // Calculate the PID natural response\n  const eps = 1e-10\n  const pi = Math.PI\n  const os = Math.log(overshoot / 100 + eps)\n  const zeta = -os / Math.sqrt(pi * pi + os * os)\n  const wn = 3.9 / (zeta * duration)\n\n  // Calculate the Spring values\n  this.d = 2 * zeta * wn\n  this.k = wn * wn\n}\n\nexport class Spring extends Controller {\n  constructor(duration = 500, overshoot = 0) {\n    super()\n    this.duration(duration).overshoot(overshoot)\n  }\n\n  step(current, target, dt, c) {\n    if (typeof current === 'string') return current\n    c.done = dt === Infinity\n    if (dt === Infinity) return target\n    if (dt === 0) return current\n\n    if (dt > 100) dt = 16\n\n    dt /= 1000\n\n    // Get the previous velocity\n    const velocity = c.velocity || 0\n\n    // Apply the control to get the new position and store it\n    const acceleration = -this.d * velocity - this.k * (current - target)\n    const newPosition = current + velocity * dt + (acceleration * dt * dt) / 2\n\n    // Store the velocity\n    c.velocity = velocity + acceleration * dt\n\n    // Figure out if we have converged, and if so, pass the value\n    c.done = Math.abs(target - newPosition) + Math.abs(velocity) < 0.002\n    return c.done ? target : newPosition\n  }\n}\n\nextend(Spring, {\n  duration: makeSetterGetter('_duration', recalculate),\n  overshoot: makeSetterGetter('_overshoot', recalculate)\n})\n\nexport class PID extends Controller {\n  constructor(p = 0.1, i = 0.01, d = 0, windup = 1000) {\n    super()\n    this.p(p).i(i).d(d).windup(windup)\n  }\n\n  step(current, target, dt, c) {\n    if (typeof current === 'string') return current\n    c.done = dt === Infinity\n\n    if (dt === Infinity) return target\n    if (dt === 0) return current\n\n    const p = target - current\n    let i = (c.integral || 0) + p * dt\n    const d = (p - (c.error || 0)) / dt\n    const windup = this._windup\n\n    // antiwindup\n    if (windup !== false) {\n      i = Math.max(-windup, Math.min(i, windup))\n    }\n\n    c.error = p\n    c.integral = i\n\n    c.done = Math.abs(p) < 0.001\n\n    return c.done ? target : current + (this.P * p + this.I * i + this.D * d)\n  }\n}\n\nextend(PID, {\n  windup: makeSetterGetter('_windup'),\n  p: makeSetterGetter('P'),\n  i: makeSetterGetter('I'),\n  d: makeSetterGetter('D')\n})\n", "import { isPathLetter } from '../modules/core/regex.js'\nimport Point from '../types/Point.js'\n\nconst segmentParameters = {\n  M: 2,\n  L: 2,\n  H: 1,\n  V: 1,\n  C: 6,\n  S: 4,\n  Q: 4,\n  T: 2,\n  A: 7,\n  Z: 0\n}\n\nconst pathHandlers = {\n  M: function (c, p, p0) {\n    p.x = p0.x = c[0]\n    p.y = p0.y = c[1]\n\n    return ['M', p.x, p.y]\n  },\n  L: function (c, p) {\n    p.x = c[0]\n    p.y = c[1]\n    return ['L', c[0], c[1]]\n  },\n  H: function (c, p) {\n    p.x = c[0]\n    return ['H', c[0]]\n  },\n  V: function (c, p) {\n    p.y = c[0]\n    return ['V', c[0]]\n  },\n  C: function (c, p) {\n    p.x = c[4]\n    p.y = c[5]\n    return ['C', c[0], c[1], c[2], c[3], c[4], c[5]]\n  },\n  S: function (c, p) {\n    p.x = c[2]\n    p.y = c[3]\n    return ['S', c[0], c[1], c[2], c[3]]\n  },\n  Q: function (c, p) {\n    p.x = c[2]\n    p.y = c[3]\n    return ['Q', c[0], c[1], c[2], c[3]]\n  },\n  T: function (c, p) {\n    p.x = c[0]\n    p.y = c[1]\n    return ['T', c[0], c[1]]\n  },\n  Z: function (c, p, p0) {\n    p.x = p0.x\n    p.y = p0.y\n    return ['Z']\n  },\n  A: function (c, p) {\n    p.x = c[5]\n    p.y = c[6]\n    return ['A', c[0], c[1], c[2], c[3], c[4], c[5], c[6]]\n  }\n}\n\nconst mlhvqtcsaz = 'mlhvqtcsaz'.split('')\n\nfor (let i = 0, il = mlhvqtcsaz.length; i < il; ++i) {\n  pathHandlers[mlhvqtcsaz[i]] = (function (i) {\n    return function (c, p, p0) {\n      if (i === 'H') c[0] = c[0] + p.x\n      else if (i === 'V') c[0] = c[0] + p.y\n      else if (i === 'A') {\n        c[5] = c[5] + p.x\n        c[6] = c[6] + p.y\n      } else {\n        for (let j = 0, jl = c.length; j < jl; ++j) {\n          c[j] = c[j] + (j % 2 ? p.y : p.x)\n        }\n      }\n\n      return pathHandlers[i](c, p, p0)\n    }\n  })(mlhvqtcsaz[i].toUpperCase())\n}\n\nfunction makeAbsolut(parser) {\n  const command = parser.segment[0]\n  return pathHandlers[command](parser.segment.slice(1), parser.p, parser.p0)\n}\n\nfunction segmentComplete(parser) {\n  return (\n    parser.segment.length &&\n    parser.segment.length - 1 ===\n      segmentParameters[parser.segment[0].toUpperCase()]\n  )\n}\n\nfunction startNewSegment(parser, token) {\n  parser.inNumber && finalizeNumber(parser, false)\n  const pathLetter = isPathLetter.test(token)\n\n  if (pathLetter) {\n    parser.segment = [token]\n  } else {\n    const lastCommand = parser.lastCommand\n    const small = lastCommand.toLowerCase()\n    const isSmall = lastCommand === small\n    parser.segment = [small === 'm' ? (isSmall ? 'l' : 'L') : lastCommand]\n  }\n\n  parser.inSegment = true\n  parser.lastCommand = parser.segment[0]\n\n  return pathLetter\n}\n\nfunction finalizeNumber(parser, inNumber) {\n  if (!parser.inNumber) throw new Error('Parser Error')\n  parser.number && parser.segment.push(parseFloat(parser.number))\n  parser.inNumber = inNumber\n  parser.number = ''\n  parser.pointSeen = false\n  parser.hasExponent = false\n\n  if (segmentComplete(parser)) {\n    finalizeSegment(parser)\n  }\n}\n\nfunction finalizeSegment(parser) {\n  parser.inSegment = false\n  if (parser.absolute) {\n    parser.segment = makeAbsolut(parser)\n  }\n  parser.segments.push(parser.segment)\n}\n\nfunction isArcFlag(parser) {\n  if (!parser.segment.length) return false\n  const isArc = parser.segment[0].toUpperCase() === 'A'\n  const length = parser.segment.length\n\n  return isArc && (length === 4 || length === 5)\n}\n\nfunction isExponential(parser) {\n  return parser.lastToken.toUpperCase() === 'E'\n}\n\nconst pathDelimiters = new Set([' ', ',', '\\t', '\\n', '\\r', '\\f'])\nexport function pathParser(d, toAbsolute = true) {\n  let index = 0\n  let token = ''\n  const parser = {\n    segment: [],\n    inNumber: false,\n    number: '',\n    lastToken: '',\n    inSegment: false,\n    segments: [],\n    pointSeen: false,\n    hasExponent: false,\n    absolute: toAbsolute,\n    p0: new Point(),\n    p: new Point()\n  }\n\n  while (((parser.lastToken = token), (token = d.charAt(index++)))) {\n    if (!parser.inSegment) {\n      if (startNewSegment(parser, token)) {\n        continue\n      }\n    }\n\n    if (token === '.') {\n      if (parser.pointSeen || parser.hasExponent) {\n        finalizeNumber(parser, false)\n        --index\n        continue\n      }\n      parser.inNumber = true\n      parser.pointSeen = true\n      parser.number += token\n      continue\n    }\n\n    if (!isNaN(parseInt(token))) {\n      if (parser.number === '0' || isArcFlag(parser)) {\n        parser.inNumber = true\n        parser.number = token\n        finalizeNumber(parser, true)\n        continue\n      }\n\n      parser.inNumber = true\n      parser.number += token\n      continue\n    }\n\n    if (pathDelimiters.has(token)) {\n      if (parser.inNumber) {\n        finalizeNumber(parser, false)\n      }\n      continue\n    }\n\n    if (token === '-' || token === '+') {\n      if (parser.inNumber && !isExponential(parser)) {\n        finalizeNumber(parser, false)\n        --index\n        continue\n      }\n      parser.number += token\n      parser.inNumber = true\n      continue\n    }\n\n    if (token.toUpperCase() === 'E') {\n      parser.number += token\n      parser.hasExponent = true\n      continue\n    }\n\n    if (isPathLetter.test(token)) {\n      if (parser.inNumber) {\n        finalizeNumber(parser, false)\n      } else if (!segmentComplete(parser)) {\n        throw new Error('parser Error')\n      } else {\n        finalizeSegment(parser)\n      }\n      --index\n    }\n  }\n\n  if (parser.inNumber) {\n    finalizeNumber(parser, false)\n  }\n\n  if (parser.inSegment && segmentComplete(parser)) {\n    finalizeSegment(parser)\n  }\n\n  return parser.segments\n}\n", "import SVGArray from './SVGArray.js'\nimport parser from '../modules/core/parser.js'\nimport Box from './Box.js'\nimport { pathParser } from '../utils/pathParser.js'\n\nfunction arrayToString(a) {\n  let s = ''\n  for (let i = 0, il = a.length; i < il; i++) {\n    s += a[i][0]\n\n    if (a[i][1] != null) {\n      s += a[i][1]\n\n      if (a[i][2] != null) {\n        s += ' '\n        s += a[i][2]\n\n        if (a[i][3] != null) {\n          s += ' '\n          s += a[i][3]\n          s += ' '\n          s += a[i][4]\n\n          if (a[i][5] != null) {\n            s += ' '\n            s += a[i][5]\n            s += ' '\n            s += a[i][6]\n\n            if (a[i][7] != null) {\n              s += ' '\n              s += a[i][7]\n            }\n          }\n        }\n      }\n    }\n  }\n\n  return s + ' '\n}\n\nexport default class PathArray extends SVGArray {\n  // Get bounding box of path\n  bbox() {\n    parser().path.setAttribute('d', this.toString())\n    return new Box(parser.nodes.path.getBBox())\n  }\n\n  // Move path string\n  move(x, y) {\n    // get bounding box of current situation\n    const box = this.bbox()\n\n    // get relative offset\n    x -= box.x\n    y -= box.y\n\n    if (!isNaN(x) && !isNaN(y)) {\n      // move every point\n      for (let l, i = this.length - 1; i >= 0; i--) {\n        l = this[i][0]\n\n        if (l === 'M' || l === 'L' || l === 'T') {\n          this[i][1] += x\n          this[i][2] += y\n        } else if (l === 'H') {\n          this[i][1] += x\n        } else if (l === 'V') {\n          this[i][1] += y\n        } else if (l === 'C' || l === 'S' || l === 'Q') {\n          this[i][1] += x\n          this[i][2] += y\n          this[i][3] += x\n          this[i][4] += y\n\n          if (l === 'C') {\n            this[i][5] += x\n            this[i][6] += y\n          }\n        } else if (l === 'A') {\n          this[i][6] += x\n          this[i][7] += y\n        }\n      }\n    }\n\n    return this\n  }\n\n  // Absolutize and parse path to array\n  parse(d = 'M0 0') {\n    if (Array.isArray(d)) {\n      d = Array.prototype.concat.apply([], d).toString()\n    }\n\n    return pathParser(d)\n  }\n\n  // Resize path string\n  size(width, height) {\n    // get bounding box of current situation\n    const box = this.bbox()\n    let i, l\n\n    // If the box width or height is 0 then we ignore\n    // transformations on the respective axis\n    box.width = box.width === 0 ? 1 : box.width\n    box.height = box.height === 0 ? 1 : box.height\n\n    // recalculate position of all points according to new size\n    for (i = this.length - 1; i >= 0; i--) {\n      l = this[i][0]\n\n      if (l === 'M' || l === 'L' || l === 'T') {\n        this[i][1] = ((this[i][1] - box.x) * width) / box.width + box.x\n        this[i][2] = ((this[i][2] - box.y) * height) / box.height + box.y\n      } else if (l === 'H') {\n        this[i][1] = ((this[i][1] - box.x) * width) / box.width + box.x\n      } else if (l === 'V') {\n        this[i][1] = ((this[i][1] - box.y) * height) / box.height + box.y\n      } else if (l === 'C' || l === 'S' || l === 'Q') {\n        this[i][1] = ((this[i][1] - box.x) * width) / box.width + box.x\n        this[i][2] = ((this[i][2] - box.y) * height) / box.height + box.y\n        this[i][3] = ((this[i][3] - box.x) * width) / box.width + box.x\n        this[i][4] = ((this[i][4] - box.y) * height) / box.height + box.y\n\n        if (l === 'C') {\n          this[i][5] = ((this[i][5] - box.x) * width) / box.width + box.x\n          this[i][6] = ((this[i][6] - box.y) * height) / box.height + box.y\n        }\n      } else if (l === 'A') {\n        // resize radii\n        this[i][1] = (this[i][1] * width) / box.width\n        this[i][2] = (this[i][2] * height) / box.height\n\n        // move position values\n        this[i][6] = ((this[i][6] - box.x) * width) / box.width + box.x\n        this[i][7] = ((this[i][7] - box.y) * height) / box.height + box.y\n      }\n    }\n\n    return this\n  }\n\n  // Convert array to string\n  toString() {\n    return arrayToString(this)\n  }\n}\n", "import { Ease } from './Controller.js'\nimport {\n  delimiter,\n  numberAndUnit,\n  isPathLetter\n} from '../modules/core/regex.js'\nimport { extend } from '../utils/adopter.js'\nimport Color from '../types/Color.js'\nimport PathArray from '../types/PathArray.js'\nimport SVGArray from '../types/SVGArray.js'\nimport SVGNumber from '../types/SVGNumber.js'\n\nconst getClassForType = (value) => {\n  const type = typeof value\n\n  if (type === 'number') {\n    return SVGNumber\n  } else if (type === 'string') {\n    if (Color.isColor(value)) {\n      return Color\n    } else if (delimiter.test(value)) {\n      return isPathLetter.test(value) ? PathArray : SVGArray\n    } else if (numberAndUnit.test(value)) {\n      return SVGNumber\n    } else {\n      return NonMorphable\n    }\n  } else if (morphableTypes.indexOf(value.constructor) > -1) {\n    return value.constructor\n  } else if (Array.isArray(value)) {\n    return SVGArray\n  } else if (type === 'object') {\n    return ObjectBag\n  } else {\n    return NonMorphable\n  }\n}\n\nexport default class Morphable {\n  constructor(stepper) {\n    this._stepper = stepper || new Ease('-')\n\n    this._from = null\n    this._to = null\n    this._type = null\n    this._context = null\n    this._morphObj = null\n  }\n\n  at(pos) {\n    return this._morphObj.morph(\n      this._from,\n      this._to,\n      pos,\n      this._stepper,\n      this._context\n    )\n  }\n\n  done() {\n    const complete = this._context.map(this._stepper.done).reduce(function (\n      last,\n      curr\n    ) {\n      return last && curr\n    }, true)\n    return complete\n  }\n\n  from(val) {\n    if (val == null) {\n      return this._from\n    }\n\n    this._from = this._set(val)\n    return this\n  }\n\n  stepper(stepper) {\n    if (stepper == null) return this._stepper\n    this._stepper = stepper\n    return this\n  }\n\n  to(val) {\n    if (val == null) {\n      return this._to\n    }\n\n    this._to = this._set(val)\n    return this\n  }\n\n  type(type) {\n    // getter\n    if (type == null) {\n      return this._type\n    }\n\n    // setter\n    this._type = type\n    return this\n  }\n\n  _set(value) {\n    if (!this._type) {\n      this.type(getClassForType(value))\n    }\n\n    let result = new this._type(value)\n    if (this._type === Color) {\n      result = this._to\n        ? result[this._to[4]]()\n        : this._from\n          ? result[this._from[4]]()\n          : result\n    }\n\n    if (this._type === ObjectBag) {\n      result = this._to\n        ? result.align(this._to)\n        : this._from\n          ? result.align(this._from)\n          : result\n    }\n\n    result = result.toConsumable()\n\n    this._morphObj = this._morphObj || new this._type()\n    this._context =\n      this._context ||\n      Array.apply(null, Array(result.length))\n        .map(Object)\n        .map(function (o) {\n          o.done = true\n          return o\n        })\n    return result\n  }\n}\n\nexport class NonMorphable {\n  constructor(...args) {\n    this.init(...args)\n  }\n\n  init(val) {\n    val = Array.isArray(val) ? val[0] : val\n    this.value = val\n    return this\n  }\n\n  toArray() {\n    return [this.value]\n  }\n\n  valueOf() {\n    return this.value\n  }\n}\n\nexport class TransformBag {\n  constructor(...args) {\n    this.init(...args)\n  }\n\n  init(obj) {\n    if (Array.isArray(obj)) {\n      obj = {\n        scaleX: obj[0],\n        scaleY: obj[1],\n        shear: obj[2],\n        rotate: obj[3],\n        translateX: obj[4],\n        translateY: obj[5],\n        originX: obj[6],\n        originY: obj[7]\n      }\n    }\n\n    Object.assign(this, TransformBag.defaults, obj)\n    return this\n  }\n\n  toArray() {\n    const v = this\n\n    return [\n      v.scaleX,\n      v.scaleY,\n      v.shear,\n      v.rotate,\n      v.translateX,\n      v.translateY,\n      v.originX,\n      v.originY\n    ]\n  }\n}\n\nTransformBag.defaults = {\n  scaleX: 1,\n  scaleY: 1,\n  shear: 0,\n  rotate: 0,\n  translateX: 0,\n  translateY: 0,\n  originX: 0,\n  originY: 0\n}\n\nconst sortByKey = (a, b) => {\n  return a[0] < b[0] ? -1 : a[0] > b[0] ? 1 : 0\n}\n\nexport class ObjectBag {\n  constructor(...args) {\n    this.init(...args)\n  }\n\n  align(other) {\n    const values = this.values\n    for (let i = 0, il = values.length; i < il; ++i) {\n      // If the type is the same we only need to check if the color is in the correct format\n      if (values[i + 1] === other[i + 1]) {\n        if (values[i + 1] === Color && other[i + 7] !== values[i + 7]) {\n          const space = other[i + 7]\n          const color = new Color(this.values.splice(i + 3, 5))\n            [space]()\n            .toArray()\n          this.values.splice(i + 3, 0, ...color)\n        }\n\n        i += values[i + 2] + 2\n        continue\n      }\n\n      if (!other[i + 1]) {\n        return this\n      }\n\n      // The types differ, so we overwrite the new type with the old one\n      // And initialize it with the types default (e.g. black for color or 0 for number)\n      const defaultObject = new other[i + 1]().toArray()\n\n      // Than we fix the values array\n      const toDelete = values[i + 2] + 3\n\n      values.splice(\n        i,\n        toDelete,\n        other[i],\n        other[i + 1],\n        other[i + 2],\n        ...defaultObject\n      )\n\n      i += values[i + 2] + 2\n    }\n    return this\n  }\n\n  init(objOrArr) {\n    this.values = []\n\n    if (Array.isArray(objOrArr)) {\n      this.values = objOrArr.slice()\n      return\n    }\n\n    objOrArr = objOrArr || {}\n    const entries = []\n\n    for (const i in objOrArr) {\n      const Type = getClassForType(objOrArr[i])\n      const val = new Type(objOrArr[i]).toArray()\n      entries.push([i, Type, val.length, ...val])\n    }\n\n    entries.sort(sortByKey)\n\n    this.values = entries.reduce((last, curr) => last.concat(curr), [])\n    return this\n  }\n\n  toArray() {\n    return this.values\n  }\n\n  valueOf() {\n    const obj = {}\n    const arr = this.values\n\n    // for (var i = 0, len = arr.length; i < len; i += 2) {\n    while (arr.length) {\n      const key = arr.shift()\n      const Type = arr.shift()\n      const num = arr.shift()\n      const values = arr.splice(0, num)\n      obj[key] = new Type(values) // .valueOf()\n    }\n\n    return obj\n  }\n}\n\nconst morphableTypes = [NonMorphable, TransformBag, ObjectBag]\n\nexport function registerMorphableType(type = []) {\n  morphableTypes.push(...[].concat(type))\n}\n\nexport function makeMorphable() {\n  extend(morphableTypes, {\n    to(val) {\n      return new Morphable()\n        .type(this.constructor)\n        .from(this.toArray()) // this.valueOf())\n        .to(val)\n    },\n    fromArray(arr) {\n      this.init(arr)\n      return this\n    },\n    toConsumable() {\n      return this.toArray()\n    },\n    morph(from, to, pos, stepper, context) {\n      const mapper = function (i, index) {\n        return stepper.step(i, to[index], pos, context[index], context)\n      }\n\n      return this.fromArray(from.map(mapper))\n    }\n  })\n}\n", "import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\nimport { proportionalSize } from '../utils/utils.js'\nimport { registerMethods } from '../utils/methods.js'\nimport PathArray from '../types/PathArray.js'\nimport Shape from './Shape.js'\n\nexport default class Path extends Shape {\n  // Initialize node\n  constructor(node, attrs = node) {\n    super(nodeOrNew('path', node), attrs)\n  }\n\n  // Get array\n  array() {\n    return this._array || (this._array = new PathArray(this.attr('d')))\n  }\n\n  // Clear array cache\n  clear() {\n    delete this._array\n    return this\n  }\n\n  // Set height of element\n  height(height) {\n    return height == null\n      ? this.bbox().height\n      : this.size(this.bbox().width, height)\n  }\n\n  // Move by left top corner\n  move(x, y) {\n    return this.attr('d', this.array().move(x, y))\n  }\n\n  // Plot new path\n  plot(d) {\n    return d == null\n      ? this.array()\n      : this.clear().attr(\n          'd',\n          typeof d === 'string' ? d : (this._array = new PathArray(d))\n        )\n  }\n\n  // Set element size to given width and height\n  size(width, height) {\n    const p = proportionalSize(this, width, height)\n    return this.attr('d', this.array().size(p.width, p.height))\n  }\n\n  // Set width of element\n  width(width) {\n    return width == null\n      ? this.bbox().width\n      : this.size(width, this.bbox().height)\n  }\n\n  // Move by left top corner over x-axis\n  x(x) {\n    return x == null ? this.bbox().x : this.move(x, this.bbox().y)\n  }\n\n  // Move by left top corner over y-axis\n  y(y) {\n    return y == null ? this.bbox().y : this.move(this.bbox().x, y)\n  }\n}\n\n// Define morphable array\nPath.prototype.MorphArray = PathArray\n\n// Add parent method\nregisterMethods({\n  Container: {\n    // Create a wrapped path element\n    path: wrapWithAttrCheck(function (d) {\n      // make sure plot is called as a setter\n      return this.put(new Path()).plot(d || new PathArray())\n    })\n  }\n})\n\nregister(Path, 'Path')\n", "import { proportionalSize } from '../../utils/utils.js'\nimport PointArray from '../../types/PointArray.js'\n\n// Get array\nexport function array() {\n  return this._array || (this._array = new PointArray(this.attr('points')))\n}\n\n// Clear array cache\nexport function clear() {\n  delete this._array\n  return this\n}\n\n// Move by left top corner\nexport function move(x, y) {\n  return this.attr('points', this.array().move(x, y))\n}\n\n// Plot new path\nexport function plot(p) {\n  return p == null\n    ? this.array()\n    : this.clear().attr(\n        'points',\n        typeof p === 'string' ? p : (this._array = new PointArray(p))\n      )\n}\n\n// Set element size to given width and height\nexport function size(width, height) {\n  const p = proportionalSize(this, width, height)\n  return this.attr('points', this.array().size(p.width, p.height))\n}\n", "import {\n  extend,\n  nodeOrNew,\n  register,\n  wrapWithAttrCheck\n} from '../utils/adopter.js'\nimport { registerMethods } from '../utils/methods.js'\nimport PointArray from '../types/PointArray.js'\nimport Shape from './Shape.js'\nimport * as pointed from '../modules/core/pointed.js'\nimport * as poly from '../modules/core/poly.js'\n\nexport default class Polygon extends Shape {\n  // Initialize node\n  constructor(node, attrs = node) {\n    super(nodeOrNew('polygon', node), attrs)\n  }\n}\n\nregisterMethods({\n  Container: {\n    // Create a wrapped polygon element\n    polygon: wrapWithAttrCheck(function (p) {\n      // make sure plot is called as a setter\n      return this.put(new Polygon()).plot(p || new PointArray())\n    })\n  }\n})\n\nextend(Polygon, pointed)\nextend(Polygon, poly)\nregister(Polygon, 'Polygon')\n", "import {\n  extend,\n  nodeOrNew,\n  register,\n  wrapWithAttrCheck\n} from '../utils/adopter.js'\nimport { registerMethods } from '../utils/methods.js'\nimport PointArray from '../types/PointArray.js'\nimport Shape from './Shape.js'\nimport * as pointed from '../modules/core/pointed.js'\nimport * as poly from '../modules/core/poly.js'\n\nexport default class Polyline extends Shape {\n  // Initialize node\n  constructor(node, attrs = node) {\n    super(nodeOrNew('polyline', node), attrs)\n  }\n}\n\nregisterMethods({\n  Container: {\n    // Create a wrapped polygon element\n    polyline: wrapWithAttrCheck(function (p) {\n      // make sure plot is called as a setter\n      return this.put(new Polyline()).plot(p || new PointArray())\n    })\n  }\n})\n\nextend(Polyline, pointed)\nextend(Polyline, poly)\nregister(Polyline, 'Polyline')\n", "import {\n  extend,\n  nodeOrNew,\n  register,\n  wrapWithAttrCheck\n} from '../utils/adopter.js'\nimport { registerMethods } from '../utils/methods.js'\nimport { rx, ry } from '../modules/core/circled.js'\nimport Shape from './Shape.js'\n\nexport default class Rect extends Shape {\n  // Initialize node\n  constructor(node, attrs = node) {\n    super(nodeOrNew('rect', node), attrs)\n  }\n}\n\nextend(Rect, { rx, ry })\n\nregisterMethods({\n  Container: {\n    // Create a rect element\n    rect: wrapWithAttrCheck(function (width, height) {\n      return this.put(new Rect()).size(width, height)\n    })\n  }\n})\n\nregister(Rect, 'Rect')\n", "export default class Queue {\n  constructor() {\n    this._first = null\n    this._last = null\n  }\n\n  // Shows us the first item in the list\n  first() {\n    return this._first && this._first.value\n  }\n\n  // Shows us the last item in the list\n  last() {\n    return this._last && this._last.value\n  }\n\n  push(value) {\n    // An item stores an id and the provided value\n    const item =\n      typeof value.next !== 'undefined'\n        ? value\n        : { value: value, next: null, prev: null }\n\n    // Deal with the queue being empty or populated\n    if (this._last) {\n      item.prev = this._last\n      this._last.next = item\n      this._last = item\n    } else {\n      this._last = item\n      this._first = item\n    }\n\n    // Return the current item\n    return item\n  }\n\n  // Removes the item that was returned from the push\n  remove(item) {\n    // Relink the previous item\n    if (item.prev) item.prev.next = item.next\n    if (item.next) item.next.prev = item.prev\n    if (item === this._last) this._last = item.prev\n    if (item === this._first) this._first = item.next\n\n    // Invalidate item\n    item.prev = null\n    item.next = null\n  }\n\n  shift() {\n    // Check if we have a value\n    const remove = this._first\n    if (!remove) return null\n\n    // If we do, remove it and relink things\n    this._first = remove.next\n    if (this._first) this._first.prev = null\n    this._last = this._first ? this._last : null\n    return remove.value\n  }\n}\n", "import { globals } from '../utils/window.js'\nimport Queue from './Queue.js'\n\nconst Animator = {\n  nextDraw: null,\n  frames: new Queue(),\n  timeouts: new Queue(),\n  immediates: new Queue(),\n  timer: () => globals.window.performance || globals.window.Date,\n\n  frame(fn) {\n    // Store the node\n    const node = Animator.frames.push({ run: fn })\n\n    // Request an animation frame if we don't have one\n    if (Animator.nextDraw === null) {\n      Animator.nextDraw = globals.window.requestAnimationFrame(Animator._draw)\n    }\n\n    // Return the node so we can remove it easily\n    return node\n  },\n\n  timeout(fn, delay) {\n    delay = delay || 0\n\n    // Work out when the event should fire\n    const time = Animator.timer().now() + delay\n\n    // Add the timeout to the end of the queue\n    const node = Animator.timeouts.push({ run: fn, time: time })\n\n    // Request another animation frame if we need one\n    if (Animator.nextDraw === null) {\n      Animator.nextDraw = globals.window.requestAnimationFrame(Animator._draw)\n    }\n\n    return node\n  },\n\n  immediate(fn) {\n    // Add the immediate fn to the end of the queue\n    const node = Animator.immediates.push(fn)\n    // Request another animation frame if we need one\n    if (Animator.nextDraw === null) {\n      Animator.nextDraw = globals.window.requestAnimationFrame(Animator._draw)\n    }\n\n    return node\n  },\n\n  cancelFrame(node) {\n    node != null && Animator.frames.remove(node)\n  },\n\n  clearTimeout(node) {\n    node != null && Animator.timeouts.remove(node)\n  },\n\n  cancelImmediate(node) {\n    node != null && Animator.immediates.remove(node)\n  },\n\n  _draw(now) {\n    try {\n      // Run all the timeouts we can run, if they are not ready yet, add them\n      // to the end of the queue immediately! (bad timeouts!!! [sarcasm])\n      let nextTimeout = null\n      const lastTimeout = Animator.timeouts.last()\n      while ((nextTimeout = Animator.timeouts.shift())) {\n        // Run the timeout if its time, or push it to the end\n        if (now >= nextTimeout.time) {\n          nextTimeout.run()\n        } else {\n          Animator.timeouts.push(nextTimeout)\n        }\n\n        // If we hit the last item, we should stop shifting out more items\n        if (nextTimeout === lastTimeout) break\n      }\n\n      // Run all of the animation frames\n      let nextFrame = null\n      const lastFrame = Animator.frames.last()\n      while (nextFrame !== lastFrame && (nextFrame = Animator.frames.shift())) {\n        nextFrame.run(now)\n      }\n\n      let nextImmediate = null\n      while ((nextImmediate = Animator.immediates.shift())) {\n        nextImmediate()\n      }\n    } finally {\n      // Callback errors intentionally propagate. Always restore the scheduler\n      // first so queued work can continue on a later frame.\n      const pending =\n        Animator.timeouts.first() ||\n        Animator.frames.first() ||\n        Animator.immediates.first()\n\n      Animator.nextDraw = pending\n        ? globals.window.requestAnimationFrame(Animator._draw)\n        : null\n    }\n  }\n}\n\nexport default Animator\n", "import { globals } from '../utils/window.js'\nimport { registerMethods } from '../utils/methods.js'\nimport Animator from './Animator.js'\nimport EventTarget from '../types/EventTarget.js'\n\nconst makeSchedule = function (runnerInfo) {\n  const start = runnerInfo.start\n  const duration = runnerInfo.runner.duration()\n  const end = start + duration\n  return {\n    start: start,\n    duration: duration,\n    end: end,\n    runner: runnerInfo.runner\n  }\n}\n\nconst defaultSource = function () {\n  const w = globals.window\n  return (w.performance || w.Date).now()\n}\n\nexport default class Timeline extends EventTarget {\n  // Construct a new timeline on the given element\n  constructor(timeSource = defaultSource) {\n    super()\n\n    this._timeSource = timeSource\n\n    // terminate resets all variables to their initial state\n    this.terminate()\n  }\n\n  active() {\n    return !!this._nextFrame\n  }\n\n  finish() {\n    // Seeking past the end drives the timed runners, retires whatever has\n    // outlived its persistence and fires 'finished' from the one place that\n    // knows whether anything is actually left to run. Controllers have no end\n    // in time, so _stepFn settles them in place while this flag is set. Doing\n    // it there rather than in a pass of its own keeps every runner in schedule\n    // order, so overlapping values end up with the precedence a seek gives them.\n    this._finishing = true\n    try {\n      this.time(this.getEndTimeOfTimeline() + 1)\n    } finally {\n      this._finishing = false\n    }\n    return this.pause()\n  }\n\n  // Calculates the end of the timeline\n  getEndTime() {\n    const lastRunnerInfo = this.getLastRunnerInfo()\n    const lastDuration = lastRunnerInfo ? lastRunnerInfo.runner.duration() : 0\n    const lastStartTime = lastRunnerInfo ? lastRunnerInfo.start : this._time\n    return lastStartTime + lastDuration\n  }\n\n  getEndTimeOfTimeline() {\n    const endTimes = this._runners.map((i) => i.start + i.runner.duration())\n    return Math.max(0, ...endTimes)\n  }\n\n  getLastRunnerInfo() {\n    return this.getRunnerInfoById(this._lastRunnerId)\n  }\n\n  getRunnerInfoById(id) {\n    return this._runners[this._runnerIds.indexOf(id)] || null\n  }\n\n  pause() {\n    this._paused = true\n    return this._continue()\n  }\n\n  persist(dtOrForever) {\n    if (dtOrForever == null) return this._persist\n    this._persist = dtOrForever\n    return this\n  }\n\n  play() {\n    // Now make sure we are not paused and continue the animation\n    this._paused = false\n    return this.updateTime()._continue()\n  }\n\n  reverse(yes) {\n    const currentSpeed = this.speed()\n    if (yes == null) return this.speed(-currentSpeed)\n\n    const positive = Math.abs(currentSpeed)\n    return this.speed(yes ? -positive : positive)\n  }\n\n  // schedules a runner on the timeline\n  schedule(runner, delay, when) {\n    if (runner == null) {\n      return this._runners.map(makeSchedule)\n    }\n\n    // The start time for the next animation can either be given explicitly,\n    // derived from the current timeline time or it can be relative to the\n    // last start time to chain animations directly\n\n    let absoluteStartTime = 0\n    const endTime = this.getEndTime()\n    delay = delay || 0\n\n    // Work out when to start the animation\n    if (when == null || when === 'last' || when === 'after') {\n      // Take the last time and increment\n      absoluteStartTime = endTime\n    } else if (when === 'absolute' || when === 'start') {\n      absoluteStartTime = delay\n      delay = 0\n    } else if (when === 'now') {\n      absoluteStartTime = this._time\n    } else if (when === 'relative') {\n      const runnerInfo = this.getRunnerInfoById(runner.id)\n      if (runnerInfo) {\n        absoluteStartTime = runnerInfo.start + delay\n        delay = 0\n      }\n    } else if (when === 'with-last') {\n      const lastRunnerInfo = this.getLastRunnerInfo()\n      const lastStartTime = lastRunnerInfo ? lastRunnerInfo.start : this._time\n      absoluteStartTime = lastStartTime\n    } else {\n      throw new Error('Invalid value for the \"when\" parameter')\n    }\n\n    // Manage runner\n    runner.unschedule()\n    runner.timeline(this)\n    runner._retired = false\n\n    const persist = runner.persist()\n    const runnerInfo = {\n      persist: persist === null ? this._persist : persist,\n      start: absoluteStartTime + delay,\n      runner\n    }\n\n    this._lastRunnerId = runner.id\n    // Let the runner point back at its live entry, so a step already walking a\n    // copy of the schedule can tell at a glance whether its entry is still the\n    // current one or a stale one a callback replaced\n    runner._runnerInfo = runnerInfo\n\n    this._runners.push(runnerInfo)\n    this._runners.sort((a, b) => a.start - b.start)\n    this._runnerIds = this._runners.map((info) => info.runner.id)\n\n    this.updateTime()._continue()\n    return this\n  }\n\n  seek(dt) {\n    return this.time(this._time + dt)\n  }\n\n  source(fn) {\n    if (fn == null) return this._timeSource\n    this._timeSource = fn\n    return this\n  }\n\n  speed(speed) {\n    if (speed == null) return this._speed\n    this._speed = speed\n    return this\n  }\n\n  stop() {\n    // Go to start and pause\n    this.time(0)\n    return this.pause()\n  }\n\n  time(time) {\n    if (time == null) return this._time\n    this._time = time\n    return this._continue(true)\n  }\n\n  // Remove the runner from this timeline\n  unschedule(runner) {\n    const index = this._runnerIds.indexOf(runner.id)\n    if (index < 0) return this\n\n    this._runners.splice(index, 1)\n    this._runnerIds.splice(index, 1)\n\n    runner.timeline(null)\n    runner._runnerInfo = null\n    // Nothing drives this runner anymore, so its transforms may now be folded\n    // into the element baseline. Scheduling it again takes that permission back.\n    runner._retired = true\n    return this\n  }\n\n  // Makes sure, that after pausing the time doesn't jump\n  updateTime() {\n    if (!this.active()) {\n      this._lastSourceTime = this._timeSource()\n    }\n    return this\n  }\n\n  // Checks if we are running and continues the animation\n  _continue(immediateStep = false) {\n    Animator.cancelFrame(this._nextFrame)\n    this._nextFrame = null\n\n    if (immediateStep) return this._stepImmediate()\n    if (this._paused) return this\n\n    this._nextFrame = Animator.frame(this._step)\n    return this\n  }\n\n  _stepFn(immediateStep = false) {\n    const generation = this._generation\n\n    // Get the time delta from the last time and update the time\n    const time = this._timeSource()\n    let dtSource = time - this._lastSourceTime\n\n    if (immediateStep) dtSource = 0\n\n    const dtTime = this._speed * dtSource + (this._time - this._lastStepTime)\n    this._lastSourceTime = time\n\n    // Only update the time if we use the timeSource.\n    // Otherwise use the current time\n    if (!immediateStep) {\n      // Update the time\n      this._time += dtTime\n      this._time = this._time < 0 ? 0 : this._time\n    }\n    this._lastStepTime = this._time\n    this.fire('time', this._time)\n\n    // This is for the case that the timeline was seeked so that the time\n    // is now before the startTime of the runner. That is why we need to set\n    // the runner to position 0\n\n    // FIXME:\n    // However, resetting in insertion order leads to bugs. Considering the case,\n    // where 2 runners change the same attribute but in different times,\n    // resetting both of them will lead to the case where the later defined\n    // runner always wins the reset even if the other runner started earlier\n    // and therefore should win the attribute battle\n    // this can be solved by resetting them backwards\n    // Iterate a copy here and below: resetting or stepping a runner fires\n    // events, and a handler is free to unschedule any runner it likes, which\n    // would shift the rest of the schedule out from under a live index\n    const scheduled = this._runners.slice()\n    for (let k = scheduled.length; k--;) {\n      // Get and run the current runner and ignore it if its inactive\n      const runnerInfo = scheduled[k]\n\n      // Leave out whatever left the schedule since we took the copy\n      if (runnerInfo.runner._runnerInfo !== runnerInfo) continue\n\n      const runner = runnerInfo.runner\n\n      // Make sure that we give the actual difference\n      // between runner start time and now\n      const dtToStart = this._time - runnerInfo.start\n\n      // Dont run runner if not started yet\n      // and try to reset it\n      if (dtToStart < 0) {\n        runner.reset(true)\n      }\n    }\n\n    // Run all of the runners directly\n    let runnersLeft = false\n    for (const runnerInfo of this._runners.slice()) {\n      if (runnerInfo.runner._runnerInfo !== runnerInfo) continue\n\n      // Get and run the current runner and ignore it if its inactive\n      const runner = runnerInfo.runner\n      let dt = dtTime\n\n      // Make sure that we give the actual difference\n      // between runner start time and now\n      const dtToStart = this._time - runnerInfo.start\n\n      // Dont run runner if not started yet\n      if (dtToStart < 0) {\n        runnersLeft = true\n        continue\n      } else if (dtToStart === 0) {\n        runner.reset()\n        runnersLeft = true\n        continue\n      } else if (dtToStart < dt) {\n        // Adjust dt to make sure that animation is on point\n        dt = dtToStart\n      }\n\n      if (!runner.active()) continue\n\n      // If this runner is still going, signal that we need another animation\n      // frame, otherwise, remove the completed runner. A controller cannot be\n      // ended by a seek, so while finishing we settle it at its target instead.\n      const settle = this._finishing && runner._isDeclarative\n      const finished = (settle ? runner.finish() : runner.step(dt)).done\n\n      // A callback may have removed or rescheduled this runner while stepping\n      // it. Do not apply the old entry's completion bookkeeping to its\n      // replacement.\n      if (runner._runnerInfo !== runnerInfo) continue\n\n      if (!finished) {\n        runnersLeft = true\n        // continue\n      } else if (runnerInfo.persist !== true) {\n        // runner is finished. And runner might get removed\n        const endTime = runner.duration() - runner.time() + this._time\n\n        if (endTime + runnerInfo.persist <= this._time) {\n          runner.unschedule()\n        }\n      }\n    }\n\n    // The loops above tolerate a callback emptying the schedule, but the\n    // bookkeeping below cannot: a terminated timeline must not announce that it\n    // finished, and reviving one is allowed to happen from inside a handler, so\n    // a flag we would have to clear again is not enough to recognise that.\n    if (generation !== this._generation) return this\n\n    if (!runnersLeft) {\n      // The loop walks a snapshot so callbacks can safely mutate the schedule.\n      // Check the live entries before stopping, because runners added or\n      // rescheduled by those callbacks were not part of that snapshot.\n      runnersLeft = this._runners.some(\n        ({ start, runner }) =>\n          start >= this._time || (runner.active() && !runner.done)\n      )\n    }\n\n    // Basically: we continue when there are runners right from us in time\n    // when -->, and when runners are left from us when <--\n    if (\n      (runnersLeft && !(this._speed < 0 && this._time === 0)) ||\n      (this._runnerIds.length && this._speed < 0 && this._time > 0)\n    ) {\n      this._continue()\n    } else {\n      this.pause()\n      this.fire('finished')\n    }\n\n    return this\n  }\n\n  terminate() {\n    // The Animator queue owns the bound step callback. Cancel it before\n    // dropping our handle so termination cannot retain or step this timeline.\n    Animator.cancelFrame(this._nextFrame)\n    // A frame that is already executing cannot be cancelled. Advancing this\n    // token lets it detect termination after synchronous event callbacks.\n    this._generation = (this._generation || 0) + 1\n\n    // Store the timing variables\n    this._startTime = 0\n    this._speed = 1.0\n\n    // Determines how long a runner is hold in memory. Can be a dt or true/false\n    this._persist = 0\n\n    // Let go of the runners we were driving. Retiring them matches what\n    // unscheduling one does: nothing steps them anymore, so their transforms\n    // may be folded into the element baseline. Dropping the entry back pointer\n    // also lets a frame that is already executing recognise them as gone.\n    for (const { runner } of this._runners || []) {\n      runner._retired = true\n      runner._runnerInfo = null\n    }\n\n    // Keep track of the running animations and their starting parameters\n    this._nextFrame = null\n    this._paused = true\n    this._finishing = false\n    this._runners = []\n    this._runnerIds = []\n    this._lastRunnerId = -1\n    this._time = 0\n    this._lastSourceTime = 0\n    this._lastStepTime = 0\n\n    // Make sure that step is always called in class context\n    this._step = this._stepFn.bind(this, false)\n    this._stepImmediate = this._stepFn.bind(this, true)\n  }\n}\n\nregisterMethods({\n  Element: {\n    timeline: function (timeline) {\n      if (timeline == null) {\n        this._timeline = this._timeline || new Timeline()\n        return this._timeline\n      } else {\n        this._timeline = timeline\n        return this\n      }\n    }\n  }\n})\n", "import { Controller, Ease, Stepper } from './Controller.js'\nimport { extend, register } from '../utils/adopter.js'\nimport { from, to } from '../modules/core/gradiented.js'\nimport { getOrigin, proportionalSize } from '../utils/utils.js'\nimport { noop, timeline } from '../modules/core/defaults.js'\nimport { registerMethods } from '../utils/methods.js'\nimport { rx, ry } from '../modules/core/circled.js'\nimport Animator from './Animator.js'\nimport Box from '../types/Box.js'\nimport EventTarget from '../types/EventTarget.js'\nimport Matrix from '../types/Matrix.js'\nimport Morphable, { TransformBag, ObjectBag } from './Morphable.js'\nimport Point from '../types/Point.js'\nimport SVGNumber from '../types/SVGNumber.js'\nimport Timeline from './Timeline.js'\n\nexport default class Runner extends EventTarget {\n  constructor(options) {\n    super()\n\n    // Store a unique id on the runner, so that we can identify it later\n    this.id = Runner.id++\n\n    // Ensure a default value\n    options = options == null ? timeline.duration : options\n\n    // Ensure that we get a controller\n    options = typeof options === 'function' ? new Controller(options) : options\n\n    // Declare all of the variables\n    this._element = null\n    this._timeline = null\n    this._runnerInfo = null\n    this.done = false\n    this._queue = []\n\n    // Work out the stepper and the duration\n    this._duration = typeof options === 'number' && options\n    this._isDeclarative = options instanceof Controller\n    this._stepper = this._isDeclarative ? options : new Ease()\n\n    // We copy the current values from the timeline because they can change\n    this._history = {}\n\n    // Store the state of the runner\n    this.enabled = true\n    this._time = 0\n    this._lastTime = 0\n\n    // At creation, the runner is in reset state\n    this._reseted = true\n\n    // Save transforms applied to this runner\n    this.transforms = new Matrix()\n    // Transform runners stay registered across seeks; these flags distinguish\n    // cached transform data from whether it currently contributes to the DOM.\n    this._isAbsoluteTransform = false\n    this._hasTransform = false\n    this._transformInitialised = false\n    this._transformActive = false\n\n    // A retired runner is one a timeline dropped for good. Only those may be\n    // folded into an element's transform baseline. Being done is not enough:\n    // a runner that reached its end can still be rewound or retargeted, and\n    // folding it would leave its own transform in the baseline it composes on.\n    this._retired = false\n\n    // Looping variables\n    this._reverse = false\n    this._swing = false\n    this._wait = 0\n    this._times = 1\n\n    // Stores how long a runner is stored after being done\n    this._persist = this._isDeclarative ? true : null\n  }\n\n  static sanitise(duration, delay, when) {\n    // Initialise the default parameters\n    let times = 1\n    let swing = false\n    let wait = 0\n    duration = duration ?? timeline.duration\n    delay = delay ?? timeline.delay\n    when = when || 'last'\n\n    // If we have an object, unpack the values\n    if (typeof duration === 'object' && !(duration instanceof Stepper)) {\n      delay = duration.delay ?? delay\n      when = duration.when ?? when\n      swing = duration.swing || swing\n      times = duration.times ?? times\n      wait = duration.wait ?? wait\n      duration = duration.duration ?? timeline.duration\n    }\n\n    return {\n      duration: duration,\n      delay: delay,\n      swing: swing,\n      times: times,\n      wait: wait,\n      when: when\n    }\n  }\n\n  active(enabled) {\n    if (enabled == null) return this.enabled\n    this.enabled = enabled\n    return this\n  }\n\n  /*\n  Private Methods\n  ===============\n  Methods that shouldn't be used externally\n  */\n  addTransform(transform) {\n    this.transforms.lmultiplyO(transform)\n    this._transformInitialised = true\n    this._transformActive = true\n    return this\n  }\n\n  after(fn) {\n    return this.on('finished', fn)\n  }\n\n  animate(duration, delay, when) {\n    const o = Runner.sanitise(duration, delay, when)\n    const runner = new Runner(o.duration)\n    if (this._timeline) runner.timeline(this._timeline)\n    if (this._element) runner.element(this._element)\n    return runner.loop(o).schedule(o.delay, o.when)\n  }\n\n  clearTransform() {\n    this.transforms = new Matrix()\n    return this\n  }\n\n  delay(delay) {\n    return this.animate(0, delay)\n  }\n\n  duration() {\n    return this._times * (this._wait + this._duration) - this._wait\n  }\n\n  during(fn) {\n    return this.queue(null, fn)\n  }\n\n  ease(fn) {\n    this._stepper = new Ease(fn)\n    return this\n  }\n  /*\n  Runner Definitions\n  ==================\n  These methods help us define the runtime behaviour of the Runner or they\n  help us make new runners from the current runner\n  */\n\n  element(element) {\n    if (element == null) return this._element\n    this._element = element\n    element._prepareRunner()\n    return this\n  }\n\n  finish() {\n    // A timed runner ends at its duration, which keeps Infinity out of _time\n    // and preserves time(), progress() and the persistence deadlines the\n    // timeline derives from them. One looping forever has no such end and\n    // still lands on Infinity.\n    if (!this._isDeclarative) return this.time(this.duration())\n\n    // A controller has no duration and settles only when handed dt = Infinity,\n    // which every Stepper reads as \"jump to the target and report done\". The\n    // clock must not keep that value though: rewinding a runner steps it by\n    // `target - _time`, and Infinity - Infinity would strand it at NaN.\n    const time = this._time\n    this.step(Infinity)\n    this._time = time\n    return this\n  }\n\n  loop(times, swing, wait) {\n    // Deal with the user passing in an object\n    if (typeof times === 'object') {\n      swing = times.swing\n      wait = times.wait\n      times = times.times\n    }\n\n    // Sanitise the values and store them\n    this._times = times || Infinity\n    this._swing = swing || false\n    this._wait = wait || 0\n\n    // Allow true to be passed\n    if (this._times === true) {\n      this._times = Infinity\n    }\n\n    return this\n  }\n\n  loops(p) {\n    const loopDuration = this._duration + this._wait\n    if (p == null) {\n      const loopsDone = Math.floor(this._time / loopDuration)\n      const relativeTime = this._time - loopsDone * loopDuration\n      const position = relativeTime / this._duration\n      return Math.min(loopsDone + position, this._times)\n    }\n    const whole = Math.floor(p)\n    const partial = p % 1\n    const time = loopDuration * whole + this._duration * partial\n    return this.time(time)\n  }\n\n  persist(dtOrForever) {\n    if (dtOrForever == null) return this._persist\n    this._persist = dtOrForever\n    return this\n  }\n\n  position(p) {\n    // Get all of the variables we need\n    const x = this._time\n    const d = this._duration\n    const w = this._wait\n    const t = this._times\n    const s = this._swing\n    const r = this._reverse\n    let position\n\n    if (p == null) {\n      /*\n      This function converts a time to a position in the range [0, 1]\n      The full explanation can be found in this desmos demonstration\n        https://www.desmos.com/calculator/u4fbavgche\n      The logic is slightly simplified here because we can use booleans\n      */\n\n      // Figure out the value without thinking about the start or end time\n      const f = function (x) {\n        const swinging = s * Math.floor((x % (2 * (w + d))) / (w + d))\n        const backwards = (swinging && !r) || (!swinging && r)\n        const uncliped =\n          (Math.pow(-1, backwards) * (x % (w + d))) / d + backwards\n        const clipped = Math.max(Math.min(uncliped, 1), 0)\n        return clipped\n      }\n\n      // Figure out the value by incorporating the start time\n      const endTime = t * (w + d) - w\n      position =\n        x <= 0\n          ? Math.round(f(1e-5))\n          : x < endTime\n            ? f(x)\n            : Math.round(f(endTime - 1e-5))\n      return position\n    }\n\n    // Work out the loops done and add the position to the loops done\n    const loopsDone = Math.floor(this.loops())\n    const swingForward = s && loopsDone % 2 === 0\n    const forwards = (swingForward && !r) || (r && swingForward)\n    position = loopsDone + (forwards ? p : 1 - p)\n    return this.loops(position)\n  }\n\n  progress(p) {\n    if (p == null) {\n      return Math.min(1, this._time / this.duration())\n    }\n    return this.time(p * this.duration())\n  }\n\n  /*\n  Basic Functionality\n  ===================\n  These methods allow us to attach basic functions to the runner directly\n  */\n  queue(initFn, runFn, retargetFn, isTransform) {\n    // A controller converges again once it has something new to chase. A timed\n    // runner cannot: past its duration the position is pinned, so step() never\n    // runs the queue again and would only rederive done on the very next frame.\n    if (this._isDeclarative) this.done = false\n\n    this._queue.push({\n      initialiser: initFn || noop,\n      runner: runFn || noop,\n      retarget: retargetFn,\n      isTransform: isTransform,\n      initialised: false,\n      finished: false\n    })\n    const timeline = this.timeline()\n    timeline && this.timeline()._continue()\n    return this\n  }\n\n  reset(deactivateTransform = false) {\n    if (this._reseted) {\n      const transformActive =\n        !deactivateTransform && this._hasTransform && this.position() !== 0\n\n      // Reversed runners can contribute at time zero before their queue has\n      // ever run, so initialise their endpoint before reactivating them.\n      if (transformActive && !this._transformInitialised) {\n        this.step(0)\n        this._reseted = true\n        return this\n      }\n\n      if (transformActive !== this._transformActive) {\n        this._transformActive = transformActive\n        this._element && this._element._addRunner(this)\n      }\n\n      return this\n    }\n\n    if (!this._reseted) {\n      this.time(0)\n      this._reseted = true\n    }\n\n    if (deactivateTransform && this._transformActive) {\n      this._transformActive = false\n      this._element && this._element._addRunner(this)\n    }\n\n    return this\n  }\n\n  reverse(reverse) {\n    this._reverse = reverse == null ? !this._reverse : reverse\n    return this\n  }\n\n  schedule(timeline, delay, when) {\n    // The user doesn't need to pass a timeline if we already have one\n    if (!(timeline instanceof Timeline)) {\n      when = delay\n      delay = timeline\n      timeline = this.timeline()\n    }\n\n    // If there is no timeline, yell at the user...\n    if (!timeline) {\n      throw Error('Runner cannot be scheduled without timeline')\n    }\n\n    // Schedule the runner on the timeline provided\n    timeline.schedule(this, delay, when)\n    return this\n  }\n\n  step(dt) {\n    // If we are inactive, this stepper just gets skipped\n    if (!this.enabled) return this\n\n    const wasDone = this.done\n\n    // Update the time and get the new position\n    dt = dt == null ? 16 : dt\n    this._time += dt\n    const position = this.position()\n\n    // Figure out if we need to run the stepper in this frame\n    const running = this._lastPosition !== position && this._time >= 0\n    this._lastPosition = position\n\n    // Figure out if we just started\n    const duration = this.duration()\n    const justStarted = this._lastTime <= 0 && this._time > 0\n    this._lastTime = this._time\n    if (justStarted) {\n      this.fire('start', this)\n    }\n\n    const declarative = this._isDeclarative\n    this.done = !declarative && this._time >= duration\n\n    // Runner is running. So its not in reset state anymore\n    this._reseted = false\n    const transformActive =\n      this._hasTransform && (this._time > 0 || position !== 0)\n    this._transformActive = transformActive\n\n    let converged = false\n    // Call initialise and the run function\n    if (running || declarative) {\n      this._initialise(running)\n\n      // clear the transforms on this runner so they dont get added again and again\n      this.transforms = new Matrix()\n      converged = this._run(declarative ? dt : position)\n      this._transformActive = transformActive\n\n      this.fire('step', this)\n    }\n    // Timed runners finish at their endpoint. Controller runners instead use\n    // convergence reported by their queued actions. Both paths emit the same\n    // event exactly once for each transition into the completed state.\n    this.done = this.done || (converged && declarative)\n    if (this.done && !wasDone) {\n      this.fire('finished', this)\n    }\n    return this\n  }\n\n  /*\n  Runner animation methods\n  ========================\n  Control how the animation plays\n  */\n  time(time) {\n    if (time == null) {\n      return this._time\n    }\n    const dt = time - this._time\n    this.step(dt)\n    return this\n  }\n\n  timeline(timeline) {\n    // check explicitly for undefined so we can set the timeline to null\n    if (typeof timeline === 'undefined') return this._timeline\n    this._timeline = timeline\n    return this\n  }\n\n  unschedule() {\n    const timeline = this.timeline()\n    timeline && timeline.unschedule(this)\n    return this\n  }\n\n  // Run each initialise function in the runner if required\n  _initialise(running) {\n    // If we aren't running, we shouldn't initialise when not declarative\n    if (!running && !this._isDeclarative) return\n\n    // Loop through all of the initialisers\n    for (let i = 0, len = this._queue.length; i < len; ++i) {\n      // Get the current initialiser\n      const current = this._queue[i]\n\n      // Determine whether we need to initialise\n      const needsIt = this._isDeclarative || (!current.initialised && running)\n      running = !current.finished\n\n      // Call the initialiser if we need to\n      if (needsIt && running) {\n        current.initialiser.call(this)\n        current.initialised = true\n      }\n    }\n  }\n\n  // Save a morpher to the morpher list so that we can retarget it later\n  _rememberMorpher(method, morpher) {\n    this._history[method] = {\n      morpher: morpher,\n      caller: this._queue[this._queue.length - 1]\n    }\n\n    // We have to resume the timeline in case a controller\n    // is already done without being ever run\n    // This can happen when e.g. this is done:\n    //    anim = el.animate(new SVG.Spring)\n    // and later\n    //    anim.move(...)\n    if (this._isDeclarative) {\n      const timeline = this.timeline()\n      timeline && timeline.play()\n    }\n  }\n\n  // Try to set the target for a morpher if the morpher exists, otherwise\n  // Run each run function for the position or dt given\n  _run(positionOrDt) {\n    // Run all of the _queue directly\n    let allfinished = true\n    for (let i = 0, len = this._queue.length; i < len; ++i) {\n      // Get the current function to run\n      const current = this._queue[i]\n\n      // Controller actions report convergence independently and can stop once\n      // complete. Timed callbacks still run at every sampled position, while\n      // transforms must be regenerated because their matrix is cleared first.\n      if (this._isDeclarative && current.finished && !current.isTransform) {\n        continue\n      }\n\n      const converged = current.runner.call(this, positionOrDt)\n      current.finished = current.finished || converged === true\n      allfinished = allfinished && current.finished\n    }\n\n    // We report when all of the constructors are finished\n    return allfinished\n  }\n\n  // do nothing and return false\n  _tryRetarget(method, target, extra) {\n    if (this._history[method]) {\n      // if the last method wasn't even initialised, throw it away\n      if (!this._history[method].caller.initialised) {\n        const index = this._queue.indexOf(this._history[method].caller)\n        this._queue.splice(index, 1)\n        return false\n      }\n\n      // for the case of transformations, we use the special retarget function\n      // which has access to the outer scope\n      if (this._history[method].caller.retarget) {\n        this._history[method].caller.retarget.call(this, target, extra)\n        // for everything else a simple morpher change is sufficient\n      } else {\n        this._history[method].morpher.to(target)\n      }\n\n      this._history[method].caller.finished = false\n      if (this._isDeclarative) this.done = false\n      const timeline = this.timeline()\n      timeline && timeline.play()\n      return true\n    }\n    return false\n  }\n}\n\nRunner.id = 0\n\nexport class FakeRunner {\n  constructor(\n    transforms = new Matrix(),\n    id = -1,\n    done = true,\n    isAbsoluteTransform = false\n  ) {\n    this.transforms = transforms\n    this.id = id\n    this.done = done\n    this._isAbsoluteTransform = isAbsoluteTransform\n    this._transformActive = true\n    // A fake runner only ever holds a frozen matrix, so it is always foldable\n    this._retired = true\n  }\n}\n\nextend([Runner, FakeRunner], {\n  mergeWith(runner) {\n    return new FakeRunner(\n      this._isAbsoluteTransform\n        ? this.transforms\n        : runner.transforms.lmultiply(this.transforms),\n      runner.id,\n      true,\n      runner._isAbsoluteTransform || this._isAbsoluteTransform\n    )\n  }\n})\n\n// FakeRunner.emptyRunner = new FakeRunner()\n\nconst lmultiply = (last, curr) => last.lmultiplyO(curr)\nconst getRunnerTransform = (runner) => runner.transforms\nconst isActiveTransform = (runner) => runner._transformActive\n\nfunction activeTransformRunners(runners) {\n  const activeRunners = runners.filter(isActiveTransform)\n  let firstRunner = 0\n\n  // An absolute transform replaces every transform before it, but keeping\n  // those runners registered allows a backward seek to expose them again.\n  for (let i = 0; i < activeRunners.length; ++i) {\n    if (activeRunners[i]._isAbsoluteTransform) firstRunner = i\n  }\n\n  return activeRunners.slice(firstRunner)\n}\n\nfunction mergeTransforms() {\n  // Find the matrix to apply to the element and apply it\n  const runners = activeTransformRunners(this._transformationRunners.runners)\n  const netTransform = runners\n    .map(getRunnerTransform)\n    .reduce(lmultiply, new Matrix())\n\n  this.transform(netTransform)\n\n  this._transformationRunners.merge()\n\n  if (this._transformationRunners.length() === 1) {\n    this._frameId = null\n  }\n}\n\nexport class RunnerArray {\n  constructor() {\n    this.runners = []\n  }\n\n  add(runner) {\n    if (this.runners.includes(runner)) return\n\n    this.runners.push(runner)\n\n    return this\n  }\n\n  edit(id, newRunner) {\n    const index = this.runners.findIndex((runner) => runner.id === id)\n    if (index >= 0) this.runners.splice(index, 1, newRunner)\n    return this\n  }\n\n  getByID(id) {\n    return this.runners.find((runner) => runner.id === id)\n  }\n\n  length() {\n    return this.runners.length\n  }\n\n  merge() {\n    let lastRunner = null\n    for (let i = 0; i < this.runners.length; ++i) {\n      const runner = this.runners[i]\n\n      // Only fold runners a timeline has retired for good. A runner that is\n      // merely done can still be rewound, looped or retargeted, and it composes\n      // on the baseline it would have been folded into.\n      const condition =\n        lastRunner &&\n        runner.done &&\n        lastRunner.done &&\n        runner._retired &&\n        lastRunner._retired\n\n      if (condition) {\n        this.remove(runner.id)\n        const newRunner = runner.mergeWith(lastRunner)\n        this.edit(lastRunner.id, newRunner)\n        lastRunner = newRunner\n        --i\n      } else {\n        lastRunner = runner\n      }\n    }\n\n    return this\n  }\n\n  remove(id) {\n    const index = this.runners.findIndex((runner) => runner.id === id)\n    if (index >= 0) this.runners.splice(index, 1)\n    return this\n  }\n}\n\nregisterMethods({\n  Element: {\n    animate(duration, delay, when) {\n      const o = Runner.sanitise(duration, delay, when)\n      const timeline = this.timeline()\n      return new Runner(o.duration)\n        .loop(o)\n        .element(this)\n        .timeline(timeline.play())\n        .schedule(o.delay, o.when)\n    },\n\n    delay(by, when) {\n      return this.animate(0, by, when)\n    },\n\n    _currentTransform(current) {\n      const runners = this._transformationRunners.runners\n      const currentIndex = runners.indexOf(current)\n\n      return activeTransformRunners(\n        // Registration order is composition order and can differ from runner\n        // ids. Include the current runner for transforms queued earlier on it.\n        runners.slice(0, currentIndex + 1)\n      )\n        .map(getRunnerTransform)\n        .reduce(lmultiply, new Matrix())\n    },\n\n    _addRunner(runner) {\n      if (\n        this._transformationRunners.length() === 1 &&\n        this._transformationRunners.runners[0].id === -1\n      ) {\n        // element() prepares transform composition before queued actions are\n        // initialised. Refresh that untouched baseline here so direct changes\n        // made between scheduling and the first frame are retained.\n        this._transformationRunners.runners[0].transforms = new Matrix(this)\n      }\n\n      this._transformationRunners.add(runner)\n\n      // Make sure that the runner merge is executed at the very end of\n      // all Animator functions. That is why we use immediate here to execute\n      // the merge right after all frames are run\n      Animator.cancelImmediate(this._frameId)\n      this._frameId = Animator.immediate(mergeTransforms.bind(this))\n    },\n\n    _prepareRunner() {\n      if (this._frameId == null) {\n        this._transformationRunners = new RunnerArray().add(\n          new FakeRunner(new Matrix(this))\n        )\n      }\n    }\n  }\n})\n\n// Will output the elements from array A that are not in the array B\nconst difference = (a, b) => a.filter((x) => !b.includes(x))\n\nextend(Runner, {\n  attr(a, v) {\n    return this.styleAttr('attr', a, v)\n  },\n\n  // Add animatable styles\n  css(s, v) {\n    return this.styleAttr('css', s, v)\n  },\n\n  styleAttr(type, nameOrAttrs, val) {\n    if (typeof nameOrAttrs === 'string') {\n      return this.styleAttr(type, { [nameOrAttrs]: val })\n    }\n\n    const attrs = nameOrAttrs\n    const history = this._history[type]\n    // Generic retargeting replaces an uninitialised queue entry. Attribute and\n    // style targets can be merged before their shared initialiser runs instead.\n    if (history && !history.caller.initialised && history.caller.retarget) {\n      history.caller.retarget.call(this, attrs)\n      return this\n    }\n    if (this._tryRetarget(type, attrs)) return this\n\n    let morpher = new Morphable(this._stepper).to(attrs)\n    let keys = Object.keys(attrs)\n\n    this.queue(\n      function () {\n        morpher = morpher.from(this.element()[type](keys))\n      },\n      function (pos) {\n        this.element()[type](morpher.at(pos).valueOf())\n        return morpher.done()\n      },\n      function (newToAttrs) {\n        // Check if any new keys were added\n        const newKeys = Object.keys(newToAttrs)\n        const differences = difference(newKeys, keys)\n\n        // If there are new keys, initialize them and add them to morpher\n        if (differences.length && morpher.from() != null) {\n          // Get the values\n          const addedFromAttrs = this.element()[type](differences)\n\n          // Get the already initialized values\n          const oldFromAttrs = new ObjectBag(morpher.from()).valueOf()\n\n          // Merge old and new\n          Object.assign(oldFromAttrs, addedFromAttrs)\n          morpher.from(oldFromAttrs)\n        }\n\n        // Get the object from the morpher\n        const mergedToAttrs = new ObjectBag(morpher.to()).valueOf()\n\n        // Merge in new attributes\n        Object.assign(mergedToAttrs, newToAttrs)\n\n        // Change morpher target\n        morpher.to(mergedToAttrs)\n\n        // Make sure that we save the work we did so we don't need it to do again\n        keys = Object.keys(mergedToAttrs)\n      }\n    )\n\n    this._rememberMorpher(type, morpher)\n    return this\n  },\n\n  zoom(level, point) {\n    if (this._tryRetarget('zoom', level, point)) return this\n\n    let morpher = new Morphable(this._stepper).to(new SVGNumber(level))\n\n    this.queue(\n      function () {\n        morpher = morpher.from(this.element().zoom())\n      },\n      function (pos) {\n        this.element().zoom(morpher.at(pos), point)\n        return morpher.done()\n      },\n      function (newLevel, newPoint) {\n        point = newPoint\n        morpher.to(newLevel)\n      }\n    )\n\n    this._rememberMorpher('zoom', morpher)\n    return this\n  },\n\n  /**\n   ** absolute transformations\n   **/\n\n  //\n  // M v -----|-----(D M v = F v)------|----->  T v\n  //\n  // 1. define the final state (T) and decompose it (once)\n  //    t = [tx, ty, the, lam, sy, sx]\n  // 2. on every frame: pull the current state of all previous transforms\n  //    (M - m can change)\n  //   and then write this as m = [tx0, ty0, the0, lam0, sy0, sx0]\n  // 3. Find the interpolated matrix F(pos) = m + pos * (t - m)\n  //   - Note F(0) = M\n  //   - Note F(1) = T\n  // 4. Now you get the delta matrix as a result: D = F * inv(M)\n\n  transform(transforms, relative, affine) {\n    // If we have a declarative function, we should retarget it if possible\n    relative = transforms.relative || relative\n    this._hasTransform = true\n    this._isAbsoluteTransform = this._isAbsoluteTransform || !relative\n    if (\n      this._isDeclarative &&\n      !relative &&\n      this._tryRetarget('transform', transforms)\n    ) {\n      return this\n    }\n\n    // Parse the parameters\n    const isMatrix = Matrix.isMatrixLike(transforms)\n    affine =\n      transforms.affine != null\n        ? transforms.affine\n        : affine != null\n          ? affine\n          : !isMatrix\n\n    // Create a morpher and set its type\n    const morpher = new Morphable(this._stepper).type(\n      affine ? TransformBag : Matrix\n    )\n    const matrixMorpher = affine\n      ? new Morphable(this._stepper).type(Matrix)\n      : morpher\n\n    let origin\n    let element\n    let current\n    let currentAngle\n    let startTransform\n\n    function setup() {\n      // make sure element and origin is defined\n      element = element || this.element()\n      origin = origin || getOrigin(transforms, element)\n\n      startTransform = new Matrix(relative ? undefined : element)\n\n      // add the runner to the element so it can merge transformations\n      element._addRunner(this)\n    }\n\n    function run(pos) {\n      // clear all other transforms before this in case something is saved\n      // on this runner. We are absolute. We dont need these!\n      if (!relative) this.clearTransform()\n\n      const { x, y } = new Point(origin).transform(\n        element._currentTransform(this)\n      )\n\n      const targetTransforms = { ...transforms, origin: [x, y] }\n      // `relative: true` selects relative runner composition, but Matrix also\n      // accepts `relative` as a translation alias where true becomes one unit.\n      if (targetTransforms.relative === true) {\n        delete targetTransforms.relative\n      }\n      let target = new Matrix(targetTransforms)\n      let start = this._isDeclarative && current ? current : startTransform\n      let activeMorpher = morpher\n\n      if (affine) {\n        const targetParameters = target.decompose(x, y)\n        const startParameters = start.decompose(x, y)\n        const parametersAreFinite = new TransformBag(targetParameters)\n          .toArray()\n          .concat(new TransformBag(startParameters).toArray())\n          .every(Number.isFinite)\n\n        // Singular matrices cannot always be decomposed into finite affine\n        // parameters, so interpolate their six matrix components instead.\n        if (!parametersAreFinite) {\n          activeMorpher = matrixMorpher\n        } else {\n          target = targetParameters\n          start = startParameters\n\n          // Get the current and target angle as it was set\n          const rTarget = target.rotate\n          const rCurrent = start.rotate\n\n          // Figure out the shortest path to rotate directly\n          const possibilities = [rTarget - 360, rTarget, rTarget + 360]\n          const distances = possibilities.map((a) => Math.abs(a - rCurrent))\n          const shortest = Math.min(...distances)\n          const index = distances.indexOf(shortest)\n          target.rotate = possibilities[index]\n        }\n      }\n\n      if (relative && activeMorpher === morpher) {\n        // we have to be careful here not to overwrite the rotation\n        // with the rotate method of Matrix\n        if (!isMatrix) {\n          target.rotate = transforms.rotate || 0\n        }\n        if (this._isDeclarative && currentAngle) {\n          start.rotate = currentAngle\n        }\n      }\n\n      activeMorpher.from(start)\n      activeMorpher.to(target)\n\n      const affineParameters = activeMorpher.at(pos)\n      currentAngle = affineParameters.rotate\n      current = new Matrix(affineParameters)\n\n      this.addTransform(current)\n      element._addRunner(this)\n      return activeMorpher.done()\n    }\n\n    function retarget(newTransforms) {\n      // Retargeting is user-driven rather than frame-driven. Resolving every\n      // time is both simpler and correct for zero-valued aliases and bounding\n      // boxes that changed since the previous target was established.\n      origin = getOrigin(newTransforms, element)\n      transforms = { ...newTransforms }\n    }\n\n    this.queue(setup, run, retarget, true)\n    this._isDeclarative && this._rememberMorpher('transform', morpher)\n    return this\n  },\n\n  // Animatable x-axis\n  x(x) {\n    return this._queueNumber('x', x)\n  },\n\n  // Animatable y-axis\n  y(y) {\n    return this._queueNumber('y', y)\n  },\n\n  ax(x) {\n    return this._queueNumber('ax', x)\n  },\n\n  ay(y) {\n    return this._queueNumber('ay', y)\n  },\n\n  dx(x = 0) {\n    return this._queueNumberDelta('x', x)\n  },\n\n  dy(y = 0) {\n    return this._queueNumberDelta('y', y)\n  },\n\n  dmove(x, y) {\n    return this.dx(x).dy(y)\n  },\n\n  _queueNumberDelta(method, to) {\n    to = new SVGNumber(to)\n\n    // Try to change the target if we have this method already registered\n    if (this._tryRetarget(method, to)) return this\n\n    // Make a morpher and queue the animation\n    const morpher = new Morphable(this._stepper).to(to)\n    let from = null\n    this.queue(\n      function () {\n        from = this.element()[method]()\n        morpher.from(from)\n        morpher.to(from + to)\n      },\n      function (pos) {\n        this.element()[method](morpher.at(pos))\n        return morpher.done()\n      },\n      function (newTo) {\n        morpher.to(from + new SVGNumber(newTo))\n      }\n    )\n\n    // Register the morpher so that if it is changed again, we can retarget it\n    this._rememberMorpher(method, morpher)\n    return this\n  },\n\n  _queueObject(method, to) {\n    // Try to change the target if we have this method already registered\n    if (this._tryRetarget(method, to)) return this\n\n    // Make a morpher and queue the animation\n    const morpher = new Morphable(this._stepper).to(to)\n    this.queue(\n      function () {\n        morpher.from(this.element()[method]())\n      },\n      function (pos) {\n        this.element()[method](morpher.at(pos))\n        return morpher.done()\n      }\n    )\n\n    // Register the morpher so that if it is changed again, we can retarget it\n    this._rememberMorpher(method, morpher)\n    return this\n  },\n\n  _queueNumber(method, value) {\n    return this._queueObject(method, new SVGNumber(value))\n  },\n\n  // Animatable center x-axis\n  cx(x) {\n    return this._queueNumber('cx', x)\n  },\n\n  // Animatable center y-axis\n  cy(y) {\n    return this._queueNumber('cy', y)\n  },\n\n  // Add animatable move\n  move(x, y) {\n    return this.x(x).y(y)\n  },\n\n  amove(x, y) {\n    return this.ax(x).ay(y)\n  },\n\n  // Add animatable center\n  center(x, y) {\n    return this.cx(x).cy(y)\n  },\n\n  // Add animatable size\n  size(width, height) {\n    const size = proportionalSize(this._element, width, height)\n\n    return this.width(size.width).height(size.height)\n  },\n\n  // Add animatable width\n  width(width) {\n    return this._queueNumber('width', width)\n  },\n\n  // Add animatable height\n  height(height) {\n    return this._queueNumber('height', height)\n  },\n\n  // Add animatable plot\n  plot(a, b, c, d) {\n    // Lines can be plotted with 4 arguments\n    if (arguments.length === 4) {\n      return this.plot([a, b, c, d])\n    }\n\n    if (this._tryRetarget('plot', a)) return this\n\n    const morpher = new Morphable(this._stepper)\n      .type(this._element.MorphArray)\n      .to(a)\n\n    this.queue(\n      function () {\n        morpher.from(this._element.array())\n      },\n      function (pos) {\n        this._element.plot(morpher.at(pos))\n        return morpher.done()\n      }\n    )\n\n    this._rememberMorpher('plot', morpher)\n    return this\n  },\n\n  // Add leading method\n  leading(value) {\n    return this._queueNumber('leading', value)\n  },\n\n  // Add animatable viewbox\n  viewbox(x, y, width, height) {\n    return this._queueObject('viewbox', new Box(x, y, width, height))\n  },\n\n  update(o) {\n    if (typeof o !== 'object') {\n      return this.update({\n        offset: arguments[0],\n        color: arguments[1],\n        opacity: arguments[2]\n      })\n    }\n\n    if (o.opacity != null) this.attr('stop-opacity', o.opacity)\n    if (o.color != null) this.attr('stop-color', o.color)\n    if (o.offset != null) this.attr('offset', o.offset)\n\n    return this\n  }\n})\n\nextend(Runner, { rx, ry, from, to })\nregister(Runner, 'Runner')\n", "import {\n  adopt,\n  nodeOrNew,\n  register,\n  wrapWithAttrCheck\n} from '../utils/adopter.js'\nimport { svg, xlink, xmlns } from '../modules/core/namespaces.js'\nimport { registerMethods } from '../utils/methods.js'\nimport Container from './Container.js'\nimport Defs from './Defs.js'\nimport { globals } from '../utils/window.js'\n\nexport default class Svg extends Container {\n  constructor(node, attrs = node) {\n    super(nodeOrNew('svg', node), attrs)\n    this.namespace()\n  }\n\n  // Creates and returns defs element\n  defs() {\n    if (!this.isRoot()) return this.root().defs()\n\n    return adopt(this.node.querySelector('defs')) || this.put(new Defs())\n  }\n\n  isRoot() {\n    return (\n      !this.node.parentNode ||\n      (!(this.node.parentNode instanceof globals.window.SVGElement) &&\n        this.node.parentNode.nodeName !== '#document-fragment')\n    )\n  }\n\n  // Add namespaces\n  namespace() {\n    if (!this.isRoot()) return this.root().namespace()\n    return this.attr({ xmlns: svg, version: '1.1' }).attr(\n      'xmlns:xlink',\n      xlink,\n      xmlns\n    )\n  }\n\n  removeNamespace() {\n    return this.attr({ xmlns: null, version: null })\n      .attr('xmlns:xlink', null, xmlns)\n      .attr('xmlns:svgjs', null, xmlns)\n  }\n\n  // Check if this is a root svg\n  // If not, call root() from this element\n  root() {\n    if (this.isRoot()) return this\n    return super.root()\n  }\n}\n\nregisterMethods({\n  Container: {\n    // Create nested svg document\n    nested: wrapWithAttrCheck(function () {\n      return this.put(new Svg())\n    })\n  }\n})\n\nregister(Svg, 'Svg', true)\n", "import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\nimport { registerMethods } from '../utils/methods.js'\nimport Container from './Container.js'\n\nexport default class Symbol extends Container {\n  // Initialize node\n  constructor(node, attrs = node) {\n    super(nodeOrNew('symbol', node), attrs)\n  }\n}\n\nregisterMethods({\n  Container: {\n    symbol: wrapWithAttrCheck(function () {\n      return this.put(new Symbol())\n    })\n  }\n})\n\nregister(Symbol, 'Symbol')\n", "import { globals } from '../../utils/window.js'\n\n// Create plain text node\nexport function plain(text) {\n  // clear if build mode is disabled\n  if (this._build === false) {\n    this.clear()\n  }\n\n  // create text node\n  this.node.appendChild(globals.document.createTextNode(text))\n\n  return this\n}\n\n// Get length of text element\nexport function length() {\n  return this.node.getComputedTextLength()\n}\n\n// Move over x-axis\n// Text is moved by its bounding box\n// text-anchor does NOT matter\nexport function x(x, box = this.bbox()) {\n  if (x == null) {\n    return box.x\n  }\n\n  return this.attr('x', this.attr('x') + x - box.x)\n}\n\n// Move over y-axis\nexport function y(y, box = this.bbox()) {\n  if (y == null) {\n    return box.y\n  }\n\n  return this.attr('y', this.attr('y') + y - box.y)\n}\n\nexport function move(x, y, box = this.bbox()) {\n  return this.x(x, box).y(y, box)\n}\n\n// Move center over x-axis\nexport function cx(x, box = this.bbox()) {\n  if (x == null) {\n    return box.cx\n  }\n\n  return this.attr('x', this.attr('x') + x - box.cx)\n}\n\n// Move center over y-axis\nexport function cy(y, box = this.bbox()) {\n  if (y == null) {\n    return box.cy\n  }\n\n  return this.attr('y', this.attr('y') + y - box.cy)\n}\n\nexport function center(x, y, box = this.bbox()) {\n  return this.cx(x, box).cy(y, box)\n}\n\nexport function ax(x) {\n  return this.attr('x', x)\n}\n\nexport function ay(y) {\n  return this.attr('y', y)\n}\n\nexport function amove(x, y) {\n  return this.ax(x).ay(y)\n}\n\n// Enable / disable build mode\nexport function build(build) {\n  this._build = !!build\n  return this\n}\n", "import {\n  adopt,\n  extend,\n  nodeOrNew,\n  register,\n  wrapWithAttrCheck\n} from '../utils/adopter.js'\nimport { registerMethods } from '../utils/methods.js'\nimport SVGNumber from '../types/SVGNumber.js'\nimport Shape from './Shape.js'\nimport { globals } from '../utils/window.js'\nimport * as textable from '../modules/core/textable.js'\nimport { isDescriptive } from '../utils/utils.js'\n\nexport default class Text extends Shape {\n  // Initialize node\n  constructor(node, attrs = node) {\n    super(nodeOrNew('text', node), attrs)\n\n    this.dom.leading = this.dom.leading ?? new SVGNumber(1.3) // store leading value for rebuilding\n    this._rebuild = true // enable automatic updating of dy values\n    this._build = false // disable build mode for adding multiple lines\n  }\n\n  // Set / get leading\n  leading(value) {\n    // act as getter\n    if (value == null) {\n      return this.dom.leading\n    }\n\n    // act as setter\n    this.dom.leading = new SVGNumber(value)\n\n    return this.rebuild()\n  }\n\n  // Rebuild appearance type\n  rebuild(rebuild) {\n    // store new rebuild flag if given\n    if (typeof rebuild === 'boolean') {\n      this._rebuild = rebuild\n    }\n\n    // define position of all lines\n    if (this._rebuild) {\n      const self = this\n      let blankLineOffset = 0\n      const leading = this.dom.leading\n\n      this.each(function (i) {\n        if (isDescriptive(this.node)) return\n\n        const fontSize = globals.window\n          .getComputedStyle(this.node)\n          .getPropertyValue('font-size')\n\n        const dy = leading * new SVGNumber(fontSize)\n\n        if (this.dom.newLined) {\n          this.attr('x', self.attr('x'))\n\n          if (this.text() === '\\n') {\n            blankLineOffset += dy\n          } else {\n            this.attr('dy', i ? dy + blankLineOffset : 0)\n            blankLineOffset = 0\n          }\n        }\n      })\n\n      this.fire('rebuild')\n    }\n\n    return this\n  }\n\n  // overwrite method from parent to set data properly\n  setData(o) {\n    this.dom = o\n    this.dom.leading = new SVGNumber(o.leading || 1.3)\n    return this\n  }\n\n  writeDataToDom() {\n    return super.writeDataToDom({ leading: 1.3 })\n  }\n\n  // Set the text content\n  text(text) {\n    // act as getter\n    if (text === undefined) {\n      const children = this.node.childNodes\n      let firstLine = 0\n      text = ''\n\n      for (let i = 0, len = children.length; i < len; ++i) {\n        // skip textPaths - they are no lines\n        if (children[i].nodeName === 'textPath' || isDescriptive(children[i])) {\n          if (i === 0) firstLine = i + 1\n          continue\n        }\n\n        // add newline if its not the first child and newLined is set to true\n        if (\n          i !== firstLine &&\n          children[i].nodeType !== 3 &&\n          adopt(children[i]).dom.newLined === true\n        ) {\n          text += '\\n'\n        }\n\n        // add content of this node\n        text += children[i].textContent\n      }\n\n      return text\n    }\n\n    // remove existing content\n    this.clear().build(true)\n\n    if (typeof text === 'function') {\n      // call block\n      text.call(this, this)\n    } else {\n      // store text and make sure text is not blank\n      text = (text + '').split('\\n')\n\n      // build new lines\n      for (let j = 0, jl = text.length; j < jl; j++) {\n        this.newLine(text[j])\n      }\n    }\n\n    // disable build mode and rebuild lines\n    return this.build(false).rebuild()\n  }\n}\n\nextend(Text, textable)\n\nregisterMethods({\n  Container: {\n    // Create text element\n    text: wrapWithAttrCheck(function (text = '') {\n      return this.put(new Text()).text(text)\n    }),\n\n    // Create plain text element\n    plain: wrapWithAttrCheck(function (text = '') {\n      return this.put(new Text()).plain(text)\n    })\n  }\n})\n\nregister(Text, 'Text')\n", "import {\n  extend,\n  nodeOrNew,\n  register,\n  wrapWithAttrCheck\n} from '../utils/adopter.js'\nimport { globals } from '../utils/window.js'\nimport { registerMethods } from '../utils/methods.js'\nimport SVGNumber from '../types/SVGNumber.js'\nimport Shape from './Shape.js'\nimport Text from './Text.js'\nimport * as textable from '../modules/core/textable.js'\n\nexport default class Tspan extends Shape {\n  // Initialize node\n  constructor(node, attrs = node) {\n    super(nodeOrNew('tspan', node), attrs)\n    this._build = false // disable build mode for adding multiple lines\n  }\n\n  // Shortcut dx\n  dx(dx) {\n    return this.attr('dx', dx)\n  }\n\n  // Shortcut dy\n  dy(dy) {\n    return this.attr('dy', dy)\n  }\n\n  // Create new line\n  newLine() {\n    // mark new line\n    this.dom.newLined = true\n\n    // fetch parent\n    const text = this.parent()\n\n    // early return in case we are not in a text element\n    if (!(text instanceof Text)) {\n      return this\n    }\n\n    const i = text.index(this)\n\n    const fontSize = globals.window\n      .getComputedStyle(this.node)\n      .getPropertyValue('font-size')\n    const dy = text.dom.leading * new SVGNumber(fontSize)\n\n    // apply new position\n    return this.dy(i ? dy : 0).attr('x', text.x())\n  }\n\n  // Set text content\n  text(text) {\n    if (text == null)\n      return this.node.textContent + (this.dom.newLined ? '\\n' : '')\n\n    if (typeof text === 'function') {\n      this.clear().build(true)\n      text.call(this, this)\n      this.build(false)\n    } else {\n      this.plain(text)\n    }\n\n    return this\n  }\n}\n\nextend(Tspan, textable)\n\nregisterMethods({\n  Tspan: {\n    tspan: wrapWithAttrCheck(function (text = '') {\n      const tspan = new Tspan()\n\n      // clear if build mode is disabled\n      if (!this._build) {\n        this.clear()\n      }\n\n      // add new tspan\n      return this.put(tspan).text(text)\n    })\n  },\n  Text: {\n    newLine: function (text = '') {\n      return this.tspan(text).newLine()\n    }\n  }\n})\n\nregister(Tspan, 'Tspan')\n", "import { cx, cy, height, width, x, y } from '../modules/core/circled.js'\nimport {\n  extend,\n  nodeOrNew,\n  register,\n  wrapWithAttrCheck\n} from '../utils/adopter.js'\nimport { registerMethods } from '../utils/methods.js'\nimport SVGNumber from '../types/SVGNumber.js'\nimport Shape from './Shape.js'\n\nexport default class Circle extends Shape {\n  constructor(node, attrs = node) {\n    super(nodeOrNew('circle', node), attrs)\n  }\n\n  radius(r) {\n    return this.attr('r', r)\n  }\n\n  // Radius x value\n  rx(rx) {\n    return this.attr('r', rx)\n  }\n\n  // Alias radius x value\n  ry(ry) {\n    return this.rx(ry)\n  }\n\n  size(size) {\n    return this.radius(new SVGNumber(size).divide(2))\n  }\n}\n\nextend(Circle, { x, y, cx, cy, width, height })\n\nregisterMethods({\n  Container: {\n    // Create circle element\n    circle: wrapWithAttrCheck(function (size = 0) {\n      return this.put(new Circle()).size(size).move(0, 0)\n    })\n  }\n})\n\nregister(Circle, 'Circle')\n", "import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\nimport { registerMethods } from '../utils/methods.js'\nimport Container from './Container.js'\nimport { findReferences } from '../modules/core/references.js'\n\nexport default class ClipPath extends Container {\n  constructor(node, attrs = node) {\n    super(nodeOrNew('clipPath', node), attrs)\n  }\n\n  // Unclip all clipped elements and remove itself\n  remove() {\n    // unclip all targets\n    this.targets().forEach(function (el) {\n      el.unclip()\n    })\n\n    // remove clipPath from parent\n    return super.remove()\n  }\n\n  targets() {\n    return findReferences(this.node, 'clip-path')\n  }\n}\n\nregisterMethods({\n  Container: {\n    // Create clipping element\n    clip: wrapWithAttrCheck(function () {\n      return this.defs().put(new ClipPath())\n    })\n  },\n  Element: {\n    // Distribute clipPath to svg element\n    clipper() {\n      return this.reference('clip-path')\n    },\n\n    clipWith(element) {\n      // use given clip or create a new one\n      const clipper =\n        element instanceof ClipPath\n          ? element\n          : this.parent().clip().add(element)\n\n      // apply mask\n      return this.attr('clip-path', 'url(#' + clipper.id() + ')')\n    },\n\n    // Unclip element\n    unclip() {\n      return this.attr('clip-path', null)\n    }\n  }\n})\n\nregister(ClipPath, 'ClipPath')\n", "import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\nimport { registerMethods } from '../utils/methods.js'\nimport Element from './Element.js'\n\nexport default class ForeignObject extends Element {\n  constructor(node, attrs = node) {\n    super(nodeOrNew('foreignObject', node), attrs)\n  }\n}\n\nregisterMethods({\n  Container: {\n    foreignObject: wrapWithAttrCheck(function (width, height) {\n      return this.put(new ForeignObject()).size(width, height)\n    })\n  }\n})\n\nregister(ForeignObject, 'ForeignObject')\n", "import Matrix from '../../types/Matrix.js'\nimport Point from '../../types/Point.js'\nimport Box from '../../types/Box.js'\nimport { proportionalSize } from '../../utils/utils.js'\nimport { getWindow } from '../../utils/window.js'\n\nexport function dmove(dx, dy) {\n  this.children().forEach((child) => {\n    let bbox\n\n    // We have to wrap this for elements that dont have a bbox\n    // e.g. title and other descriptive elements\n    try {\n      // Get the childs bbox\n      // Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1905039\n      // Because bbox for nested svgs returns the contents bbox in the coordinate space of the svg itself (weird!), we cant use bbox for svgs\n      // Therefore we have to use getBoundingClientRect. But THAT is broken (as explained in the bug).\n      // Funnily enough the broken behavior would work for us but that breaks it in chrome\n      // So we have to replicate the broken behavior of FF by just reading the attributes of the svg itself\n      bbox =\n        child.node instanceof getWindow().SVGSVGElement\n          ? new Box(child.attr(['x', 'y', 'width', 'height']))\n          : child.bbox()\n    } catch (e) {\n      return\n    }\n\n    // Get childs matrix\n    const m = new Matrix(child)\n    // Translate childs matrix by amount and\n    // transform it back into parents space\n    const matrix = m.translate(dx, dy).transform(m.inverse())\n    // Calculate new x and y from old box\n    const p = new Point(bbox.x, bbox.y).transform(matrix)\n    // Move element by the calculated bbox delta\n    child.dmove(p.x - bbox.x, p.y - bbox.y)\n  })\n\n  return this\n}\n\nexport function dx(dx) {\n  return this.dmove(dx, 0)\n}\n\nexport function dy(dy) {\n  return this.dmove(0, dy)\n}\n\nexport function height(height, box = this.bbox()) {\n  if (height == null) return box.height\n  return this.size(box.width, height, box)\n}\n\nexport function move(x = 0, y = 0, box = this.bbox()) {\n  const dx = x - box.x\n  const dy = y - box.y\n\n  return this.dmove(dx, dy)\n}\n\nexport function size(width, height, box = this.bbox()) {\n  const p = proportionalSize(this, width, height, box)\n  const scaleX = p.width / box.width\n  const scaleY = p.height / box.height\n\n  this.children().forEach((child) => {\n    const o = new Point(box).transform(new Matrix(child).inverse())\n    child.scale(scaleX, scaleY, o.x, o.y)\n  })\n\n  return this\n}\n\nexport function width(width, box = this.bbox()) {\n  if (width == null) return box.width\n  return this.size(width, box.height, box)\n}\n\nexport function x(x, box = this.bbox()) {\n  if (x == null) return box.x\n  return this.move(x, box.y, box)\n}\n\nexport function y(y, box = this.bbox()) {\n  if (y == null) return box.y\n  return this.move(box.x, y, box)\n}\n", "import {\n  nodeOrNew,\n  register,\n  wrapWithAttrCheck,\n  extend\n} from '../utils/adopter.js'\nimport { registerMethods } from '../utils/methods.js'\nimport Container from './Container.js'\nimport * as containerGeometry from '../modules/core/containerGeometry.js'\n\nexport default class G extends Container {\n  constructor(node, attrs = node) {\n    super(nodeOrNew('g', node), attrs)\n  }\n}\n\nextend(G, containerGeometry)\n\nregisterMethods({\n  Container: {\n    // Create a group element\n    group: wrapWithAttrCheck(function () {\n      return this.put(new G())\n    })\n  }\n})\n\nregister(G, 'G')\n", "import {\n  nodeOrNew,\n  register,\n  wrapWithAttrCheck,\n  extend\n} from '../utils/adopter.js'\nimport { registerMethods } from '../utils/methods.js'\nimport { xlink } from '../modules/core/namespaces.js'\nimport Container from './Container.js'\nimport * as containerGeometry from '../modules/core/containerGeometry.js'\n\nexport default class A extends Container {\n  constructor(node, attrs = node) {\n    super(nodeOrNew('a', node), attrs)\n  }\n\n  // Link target attribute\n  target(target) {\n    return this.attr('target', target)\n  }\n\n  // Link url\n  to(url) {\n    return this.attr('href', url, xlink)\n  }\n}\n\nextend(A, containerGeometry)\n\nregisterMethods({\n  Container: {\n    // Create a hyperlink element\n    link: wrapWithAttrCheck(function (url) {\n      return this.put(new A()).to(url)\n    })\n  },\n  Element: {\n    unlink() {\n      const link = this.linker()\n\n      if (!link) return this\n\n      const parent = link.parent()\n\n      if (!parent) {\n        return this.remove()\n      }\n\n      const index = parent.index(link)\n      parent.add(this, index)\n\n      link.remove()\n      return this\n    },\n    linkTo(url) {\n      // reuse old link if possible\n      let link = this.linker()\n\n      if (!link) {\n        link = new A()\n        this.wrap(link)\n      }\n\n      if (typeof url === 'function') {\n        url.call(link, link)\n      } else {\n        link.to(url)\n      }\n\n      return this\n    },\n    linker() {\n      const link = this.parent()\n      if (link && link.node.nodeName.toLowerCase() === 'a') {\n        return link\n      }\n\n      return null\n    }\n  }\n})\n\nregister(A, 'A')\n", "import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\nimport { registerMethods } from '../utils/methods.js'\nimport Container from './Container.js'\nimport { findReferences } from '../modules/core/references.js'\n\nexport default class Mask extends Container {\n  // Initialize node\n  constructor(node, attrs = node) {\n    super(nodeOrNew('mask', node), attrs)\n  }\n\n  // Unmask all masked elements and remove itself\n  remove() {\n    // unmask all targets\n    this.targets().forEach(function (el) {\n      el.unmask()\n    })\n\n    // remove mask from parent\n    return super.remove()\n  }\n\n  targets() {\n    return findReferences(this.node, 'mask')\n  }\n}\n\nregisterMethods({\n  Container: {\n    mask: wrapWithAttrCheck(function () {\n      return this.defs().put(new Mask())\n    })\n  },\n  Element: {\n    // Distribute mask to svg element\n    masker() {\n      return this.reference('mask')\n    },\n\n    maskWith(element) {\n      // use given mask or create a new one\n      const masker =\n        element instanceof Mask ? element : this.parent().mask().add(element)\n\n      // apply mask\n      return this.attr('mask', 'url(#' + masker.id() + ')')\n    },\n\n    // Unmask element\n    unmask() {\n      return this.attr('mask', null)\n    }\n  }\n})\n\nregister(Mask, 'Mask')\n", "import { nodeOrNew, register } from '../utils/adopter.js'\nimport Element from './Element.js'\nimport SVGNumber from '../types/SVGNumber.js'\nimport { registerMethods } from '../utils/methods.js'\n\nexport default class Stop extends Element {\n  constructor(node, attrs = node) {\n    super(nodeOrNew('stop', node), attrs)\n  }\n\n  // add color stops\n  update(o) {\n    if (typeof o === 'number' || o instanceof SVGNumber) {\n      o = {\n        offset: arguments[0],\n        color: arguments[1],\n        opacity: arguments[2]\n      }\n    }\n\n    // set attributes\n    if (o.opacity != null) this.attr('stop-opacity', o.opacity)\n    if (o.color != null) this.attr('stop-color', o.color)\n    if (o.offset != null) this.attr('offset', new SVGNumber(o.offset))\n\n    return this\n  }\n}\n\nregisterMethods({\n  Gradient: {\n    // Add a color stop\n    stop: function (offset, color, opacity) {\n      return this.put(new Stop()).update(offset, color, opacity)\n    }\n  }\n})\n\nregister(Stop, 'Stop')\n", "import { nodeOrNew, register } from '../utils/adopter.js'\nimport { registerMethods } from '../utils/methods.js'\nimport { unCamelCase } from '../utils/utils.js'\nimport Element from './Element.js'\n\nfunction cssRule(selector, rule) {\n  if (!selector) return ''\n  if (!rule) return selector\n\n  let ret = selector + '{'\n\n  for (const i in rule) {\n    ret += unCamelCase(i) + ':' + rule[i] + ';'\n  }\n\n  ret += '}'\n\n  return ret\n}\n\nexport default class Style extends Element {\n  constructor(node, attrs = node) {\n    super(nodeOrNew('style', node), attrs)\n  }\n\n  addText(w = '') {\n    this.node.textContent += w\n    return this\n  }\n\n  font(name, src, params = {}) {\n    return this.rule('@font-face', {\n      fontFamily: name,\n      src: src,\n      ...params\n    })\n  }\n\n  rule(selector, obj) {\n    return this.addText(cssRule(selector, obj))\n  }\n}\n\nregisterMethods('Dom', {\n  style(selector, obj) {\n    return this.put(new Style()).rule(selector, obj)\n  },\n  fontface(name, src, params) {\n    return this.put(new Style()).font(name, src, params)\n  }\n})\n\nregister(Style, 'Style')\n", "import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\nimport { registerMethods } from '../utils/methods.js'\nimport { xlink } from '../modules/core/namespaces.js'\nimport Path from './Path.js'\nimport PathArray from '../types/PathArray.js'\nimport Text from './Text.js'\nimport { findReferences } from '../modules/core/references.js'\n\nexport default class TextPath extends Text {\n  // Initialize node\n  constructor(node, attrs = node) {\n    super(nodeOrNew('textPath', node), attrs)\n  }\n\n  // return the array of the path track element\n  array() {\n    const track = this.track()\n\n    return track ? track.array() : null\n  }\n\n  // Plot path if any\n  plot(d) {\n    const track = this.track()\n    let pathArray = null\n\n    if (track) {\n      pathArray = track.plot(d)\n    }\n\n    return d == null ? pathArray : this\n  }\n\n  // Get the path element\n  track() {\n    return this.reference('href')\n  }\n}\n\nregisterMethods({\n  Container: {\n    textPath: wrapWithAttrCheck(function (text, path) {\n      // Convert text to instance if needed\n      if (!(text instanceof Text)) {\n        text = this.text(text)\n      }\n\n      return text.path(path)\n    })\n  },\n  Text: {\n    // Create path for text to run on\n    path: wrapWithAttrCheck(function (track, importNodes = true) {\n      const textPath = new TextPath()\n\n      // if track is a path, reuse it\n      if (!(track instanceof Path)) {\n        // create path element\n        track = this.defs().path(track)\n      }\n\n      // link textPath to path and add content\n      textPath.attr('href', '#' + track, xlink)\n\n      // Transplant all nodes from text to textPath\n      let node\n      if (importNodes) {\n        while ((node = this.node.firstChild)) {\n          textPath.node.appendChild(node)\n        }\n      }\n\n      // add textPath element as child node and return textPath\n      return this.put(textPath)\n    }),\n\n    // Get the textPath children\n    textPath() {\n      return this.findOne('textPath')\n    }\n  },\n  Path: {\n    // creates a textPath from this path\n    text: wrapWithAttrCheck(function (text) {\n      // Convert text to instance if needed\n      if (!(text instanceof Text)) {\n        text = new Text().addTo(this.parent()).text(text)\n      }\n\n      // Create textPath from text and path and return\n      return text.path(this)\n    }),\n\n    targets() {\n      return findReferences(this.node, 'href', 'textPath')\n    }\n  }\n})\n\nTextPath.prototype.MorphArray = PathArray\nregister(TextPath, 'TextPath')\n", "import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\nimport { registerMethods } from '../utils/methods.js'\nimport { xlink } from '../modules/core/namespaces.js'\nimport Shape from './Shape.js'\n\nexport default class Use extends Shape {\n  constructor(node, attrs = node) {\n    super(nodeOrNew('use', node), attrs)\n  }\n\n  // Use element as a reference\n  use(element, file) {\n    // Set lined element\n    return this.attr('href', (file || '') + '#' + element, xlink)\n  }\n}\n\nregisterMethods({\n  Container: {\n    // Create a use element\n    use: wrapWithAttrCheck(function (element, file) {\n      return this.put(new Use()).use(element, file)\n    })\n  }\n})\n\nregister(Use, 'Use')\n", "/* Optional Modules */\nimport './modules/optional/arrange.js'\nimport './modules/optional/class.js'\nimport './modules/optional/css.js'\nimport './modules/optional/data.js'\nimport './modules/optional/memory.js'\nimport './modules/optional/sugar.js'\nimport './modules/optional/transform.js'\n\nimport { extend, makeInstance } from './utils/adopter.js'\nimport { getMethodNames, getMethodsFor } from './utils/methods.js'\nimport Box from './types/Box.js'\nimport Color from './types/Color.js'\nimport Container from './elements/Container.js'\nimport Defs from './elements/Defs.js'\nimport Dom from './elements/Dom.js'\nimport Element from './elements/Element.js'\nimport Ellipse from './elements/Ellipse.js'\nimport EventTarget from './types/EventTarget.js'\nimport Fragment from './elements/Fragment.js'\nimport Gradient from './elements/Gradient.js'\nimport Image from './elements/Image.js'\nimport Line from './elements/Line.js'\nimport List from './types/List.js'\nimport Marker from './elements/Marker.js'\nimport Matrix from './types/Matrix.js'\nimport Morphable, {\n  NonMorphable,\n  ObjectBag,\n  TransformBag,\n  makeMorphable,\n  registerMorphableType\n} from './animation/Morphable.js'\nimport Path from './elements/Path.js'\nimport PathArray from './types/PathArray.js'\nimport Pattern from './elements/Pattern.js'\nimport PointArray from './types/PointArray.js'\nimport Point from './types/Point.js'\nimport Polygon from './elements/Polygon.js'\nimport Polyline from './elements/Polyline.js'\nimport Rect from './elements/Rect.js'\nimport Runner from './animation/Runner.js'\nimport SVGArray from './types/SVGArray.js'\nimport SVGNumber from './types/SVGNumber.js'\nimport Shape from './elements/Shape.js'\nimport Svg from './elements/Svg.js'\nimport Symbol from './elements/Symbol.js'\nimport Text from './elements/Text.js'\nimport Tspan from './elements/Tspan.js'\nimport * as defaults from './modules/core/defaults.js'\nimport * as utils from './utils/utils.js'\nimport * as namespaces from './modules/core/namespaces.js'\nimport * as regex from './modules/core/regex.js'\n\nexport {\n  Morphable,\n  registerMorphableType,\n  makeMorphable,\n  TransformBag,\n  ObjectBag,\n  NonMorphable\n}\n\nexport { defaults, utils, namespaces, regex }\nexport const SVG = makeInstance\nexport { default as parser } from './modules/core/parser.js'\nexport { default as find } from './modules/core/selector.js'\nexport { dispatch, off, on } from './modules/core/event.js'\nexport * from './utils/adopter.js'\nexport { getWindow, registerWindow, withWindow } from './utils/window.js'\n\n/* Animation Modules */\nexport { default as Animator } from './animation/Animator.js'\nexport {\n  Controller,\n  Ease,\n  PID,\n  Spring,\n  easing\n} from './animation/Controller.js'\nexport { default as Queue } from './animation/Queue.js'\nexport { default as Runner } from './animation/Runner.js'\nexport { default as Timeline } from './animation/Timeline.js'\n\n/* Types */\nexport { default as Array } from './types/SVGArray.js'\nexport { default as Box } from './types/Box.js'\nexport { default as Color } from './types/Color.js'\nexport { default as EventTarget } from './types/EventTarget.js'\nexport { default as Matrix } from './types/Matrix.js'\nexport { default as Number } from './types/SVGNumber.js'\nexport { default as PathArray } from './types/PathArray.js'\nexport { default as Point } from './types/Point.js'\nexport { default as PointArray } from './types/PointArray.js'\nexport { default as List } from './types/List.js'\n\n/* Elements */\nexport { default as Circle } from './elements/Circle.js'\nexport { default as ClipPath } from './elements/ClipPath.js'\nexport { default as Container } from './elements/Container.js'\nexport { default as Defs } from './elements/Defs.js'\nexport { default as Dom } from './elements/Dom.js'\nexport { default as Element } from './elements/Element.js'\nexport { default as Ellipse } from './elements/Ellipse.js'\nexport { default as ForeignObject } from './elements/ForeignObject.js'\nexport { default as Fragment } from './elements/Fragment.js'\nexport { default as Gradient } from './elements/Gradient.js'\nexport { default as G } from './elements/G.js'\nexport { default as A } from './elements/A.js'\nexport { default as Image } from './elements/Image.js'\nexport { default as Line } from './elements/Line.js'\nexport { default as Marker } from './elements/Marker.js'\nexport { default as Mask } from './elements/Mask.js'\nexport { default as Path } from './elements/Path.js'\nexport { default as Pattern } from './elements/Pattern.js'\nexport { default as Polygon } from './elements/Polygon.js'\nexport { default as Polyline } from './elements/Polyline.js'\nexport { default as Rect } from './elements/Rect.js'\nexport { default as Shape } from './elements/Shape.js'\nexport { default as Stop } from './elements/Stop.js'\nexport { default as Style } from './elements/Style.js'\nexport { default as Svg } from './elements/Svg.js'\nexport { default as Symbol } from './elements/Symbol.js'\nexport { default as Text } from './elements/Text.js'\nexport { default as TextPath } from './elements/TextPath.js'\nexport { default as Tspan } from './elements/Tspan.js'\nexport { default as Use } from './elements/Use.js'\n\nextend([Svg, Symbol, Image, Pattern, Marker], getMethodsFor('viewbox'))\n\nextend([Line, Polyline, Polygon, Path], getMethodsFor('marker'))\n\nextend(Text, getMethodsFor('Text'))\nextend(Path, getMethodsFor('Path'))\n\nextend(Defs, getMethodsFor('Defs'))\n\nextend([Text, Tspan], getMethodsFor('Tspan'))\n\nextend([Rect, Ellipse, Gradient, Runner], getMethodsFor('radius'))\n\nextend(EventTarget, getMethodsFor('EventTarget'))\nextend(Dom, getMethodsFor('Dom'))\nextend(Element, getMethodsFor('Element'))\nextend(Shape, getMethodsFor('Shape'))\nextend([Container, Fragment], getMethodsFor('Container'))\nextend(Gradient, getMethodsFor('Gradient'))\n\nextend(Runner, getMethodsFor('Runner'))\n\nList.extend(getMethodNames())\n\nregisterMorphableType([\n  SVGNumber,\n  Color,\n  Box,\n  Matrix,\n  SVGArray,\n  PointArray,\n  PathArray,\n  Point\n])\n\nmakeMorphable()\n", "import { Feature, GeoJsonProperties, Polygon } from \"geojson\";\nimport { AllGeoJSON, polygon } from \"@turf/helpers\";\nimport { coordEach } from \"@turf/meta\";\nimport concaveman from \"concaveman\";\n\n/**\n * Takes a {@link Feature} or a {@link FeatureCollection} and returns a convex hull {@link Polygon}.\n *\n * Internally this uses\n * the [convex-hull](https://github.com/mikolalysenko/convex-hull) module that implements a\n * [monotone chain hull](http://en.wikibooks.org/wiki/Algorithm_Implementation/Geometry/Convex_hull/Monotone_chain).\n *\n * @function\n * @param {GeoJSON} geojson input Feature or FeatureCollection\n * @param {Object} [options={}] Optional parameters\n * @param {number} [options.concavity=Infinity] 1 - thin shape. Infinity - convex hull.\n * @param {Object} [options.properties={}] Translate Properties to Feature\n * @returns {Feature<Polygon>} a convex hull\n * @example\n * var points = turf.featureCollection([\n *   turf.point([10.195312, 43.755225]),\n *   turf.point([10.404052, 43.8424511]),\n *   turf.point([10.579833, 43.659924]),\n *   turf.point([10.360107, 43.516688]),\n *   turf.point([10.14038, 43.588348]),\n *   turf.point([10.195312, 43.755225])\n * ]);\n *\n * var hull = turf.convex(points);\n *\n * //addToMap\n * var addToMap = [points, hull]\n */\nfunction convex<P extends GeoJsonProperties = GeoJsonProperties>(\n  geojson: AllGeoJSON,\n  options: {\n    concavity?: number;\n    properties?: P;\n  } = {}\n): Feature<Polygon, P> | null {\n  // Default parameters\n  options.concavity = options.concavity || Infinity;\n\n  // Container\n  const points: number[][] = [];\n\n  // Convert all points to flat 2D coordinate Array\n  coordEach(geojson, (coord) => {\n    points.push([coord[0], coord[1]]);\n  });\n  if (!points.length) {\n    return null;\n  }\n\n  const convexHull = concaveman(points, options.concavity);\n\n  // Convex hull should have at least 3 different vertices in order to create a valid polygon\n  if (convexHull.length > 3) {\n    return polygon([convexHull], options.properties);\n  }\n  return null;\n}\n\nexport { convex };\nexport default convex;\n", "import { Feature, GeoJsonProperties, Point } from \"geojson\";\nimport { point, AllGeoJSON } from \"@turf/helpers\";\nimport { coordEach } from \"@turf/meta\";\n\n/**\n * Computes the centroid as the mean of all vertices within the object.\n *\n * @function\n * @param {GeoJSON} geojson GeoJSON to be centered\n * @param {Object} [options={}] Optional Parameters\n * @param {Object} [options.properties={}] an Object that is used as the {@link Feature}'s properties\n * @returns {Feature<Point>} the centroid of the input object\n * @example\n * var polygon = turf.polygon([[[-81, 41], [-88, 36], [-84, 31], [-80, 33], [-77, 39], [-81, 41]]]);\n *\n * var centroid = turf.centroid(polygon);\n *\n * //addToMap\n * var addToMap = [polygon, centroid]\n */\nfunction centroid<P extends GeoJsonProperties = GeoJsonProperties>(\n  geojson: AllGeoJSON,\n  options: {\n    properties?: P;\n  } = {}\n): Feature<Point, P> {\n  let xSum = 0;\n  let ySum = 0;\n  let len = 0;\n  coordEach(\n    geojson,\n    function (coord) {\n      xSum += coord[0];\n      ySum += coord[1];\n      len++;\n    },\n    true\n  );\n  return point([xSum / len, ySum / len], options.properties);\n}\n\nexport { centroid };\nexport default centroid;\n", "import {\n  Feature,\n  FeatureCollection,\n  Geometry,\n  LineString,\n  MultiPoint,\n  MultiLineString,\n  MultiPolygon,\n  Point,\n  Polygon,\n} from \"geojson\";\nimport { isNumber } from \"@turf/helpers\";\n\n/**\n * Unwrap a coordinate from a Point Feature, Geometry or a single coordinate.\n *\n * @function\n * @param {Array<number>|Geometry<Point>|Feature<Point>} coord GeoJSON Point or an Array of numbers\n * @returns {Array<number>} coordinates\n * @example\n * var pt = turf.point([10, 10]);\n *\n * var coord = turf.getCoord(pt);\n * //= [10, 10]\n */\nfunction getCoord(coord: Feature<Point> | Point | number[]): number[] {\n  if (!coord) {\n    throw new Error(\"coord is required\");\n  }\n\n  if (!Array.isArray(coord)) {\n    if (\n      coord.type === \"Feature\" &&\n      coord.geometry !== null &&\n      coord.geometry.type === \"Point\"\n    ) {\n      return [...coord.geometry.coordinates];\n    }\n    if (coord.type === \"Point\") {\n      return [...coord.coordinates];\n    }\n  }\n  if (\n    Array.isArray(coord) &&\n    coord.length >= 2 &&\n    !Array.isArray(coord[0]) &&\n    !Array.isArray(coord[1])\n  ) {\n    return [...coord];\n  }\n\n  throw new Error(\"coord must be GeoJSON Point or an Array of numbers\");\n}\n\n/**\n * Unwrap coordinates from a Feature, Geometry Object or an Array\n *\n * @function\n * @param {Array<any>|Geometry|Feature} coords Feature, Geometry Object or an Array\n * @returns {Array<any>} coordinates\n * @example\n * var poly = turf.polygon([[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]);\n *\n * var coords = turf.getCoords(poly);\n * //= [[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]\n */\nfunction getCoords<\n  G extends\n    Point | LineString | Polygon | MultiPoint | MultiLineString | MultiPolygon,\n>(coords: any[] | Feature<G> | G): any[] {\n  if (Array.isArray(coords)) {\n    return coords;\n  }\n\n  // Feature\n  if (coords.type === \"Feature\") {\n    if (coords.geometry !== null) {\n      return coords.geometry.coordinates;\n    }\n  } else {\n    // Geometry\n    if (coords.coordinates) {\n      return coords.coordinates;\n    }\n  }\n\n  throw new Error(\n    \"coords must be GeoJSON Feature, Geometry Object or an Array\"\n  );\n}\n\n/**\n * Checks if coordinates contains a number\n *\n * @function\n * @param {Array<any>} coordinates GeoJSON Coordinates\n * @returns {boolean} true if Array contains a number\n */\nfunction containsNumber(coordinates: any[]): boolean {\n  if (\n    coordinates.length > 1 &&\n    isNumber(coordinates[0]) &&\n    isNumber(coordinates[1])\n  ) {\n    return true;\n  }\n\n  if (Array.isArray(coordinates[0]) && coordinates[0].length) {\n    return containsNumber(coordinates[0]);\n  }\n  throw new Error(\"coordinates must only contain numbers\");\n}\n\n/**\n * Enforce expectations about types of GeoJSON objects for Turf.\n *\n * @function\n * @param {GeoJSON} value any GeoJSON object\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} if value is not the expected type.\n */\nfunction geojsonType(value: any, type: string, name: string): void {\n  if (!type || !name) {\n    throw new Error(\"type and name required\");\n  }\n\n  if (!value || value.type !== type) {\n    throw new Error(\n      \"Invalid input to \" +\n        name +\n        \": must be a \" +\n        type +\n        \", given \" +\n        value.type\n    );\n  }\n}\n\n/**\n * Enforce expectations about types of {@link Feature} inputs for Turf.\n * Internally this uses {@link geojsonType} to judge geometry types.\n *\n * @function\n * @param {Feature} feature a feature with an expected geometry type\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} error if value is not the expected type.\n */\nfunction featureOf(feature: Feature<any>, type: string, name: string): void {\n  if (!feature) {\n    throw new Error(\"No feature passed\");\n  }\n  if (!name) {\n    throw new Error(\".featureOf() requires a name\");\n  }\n  if (!feature || feature.type !== \"Feature\" || !feature.geometry) {\n    throw new Error(\n      \"Invalid input to \" + name + \", Feature with geometry required\"\n    );\n  }\n  if (!feature.geometry || feature.geometry.type !== type) {\n    throw new Error(\n      \"Invalid input to \" +\n        name +\n        \": must be a \" +\n        type +\n        \", given \" +\n        feature.geometry.type\n    );\n  }\n}\n\n/**\n * Enforce expectations about types of {@link FeatureCollection} inputs for Turf.\n * Internally this uses {@link geojsonType} to judge geometry types.\n *\n * @function\n * @param {FeatureCollection} featureCollection a FeatureCollection for which features will be judged\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} if value is not the expected type.\n */\nfunction collectionOf(\n  featureCollection: FeatureCollection<any>,\n  type: string,\n  name: string\n) {\n  if (!featureCollection) {\n    throw new Error(\"No featureCollection passed\");\n  }\n  if (!name) {\n    throw new Error(\".collectionOf() requires a name\");\n  }\n  if (!featureCollection || featureCollection.type !== \"FeatureCollection\") {\n    throw new Error(\n      \"Invalid input to \" + name + \", FeatureCollection required\"\n    );\n  }\n  for (const feature of featureCollection.features) {\n    if (!feature || feature.type !== \"Feature\" || !feature.geometry) {\n      throw new Error(\n        \"Invalid input to \" + name + \", Feature with geometry required\"\n      );\n    }\n    if (!feature.geometry || feature.geometry.type !== type) {\n      throw new Error(\n        \"Invalid input to \" +\n          name +\n          \": must be a \" +\n          type +\n          \", given \" +\n          feature.geometry.type\n      );\n    }\n  }\n}\n\n/**\n * Get Geometry from Feature or Geometry Object\n *\n * @param {Feature|Geometry} geojson GeoJSON Feature or Geometry Object\n * @returns {Geometry|null} GeoJSON Geometry Object\n * @throws {Error} if geojson is not a Feature or Geometry Object\n * @example\n * var point = {\n *   \"type\": \"Feature\",\n *   \"properties\": {},\n *   \"geometry\": {\n *     \"type\": \"Point\",\n *     \"coordinates\": [110, 40]\n *   }\n * }\n * var geom = turf.getGeom(point)\n * //={\"type\": \"Point\", \"coordinates\": [110, 40]}\n */\nfunction getGeom<G extends Geometry>(geojson: Feature<G> | G): G {\n  if (geojson.type === \"Feature\") {\n    return geojson.geometry;\n  }\n  return geojson;\n}\n\n/**\n * Get GeoJSON object's type, Geometry type is prioritize.\n *\n * @param {GeoJSON} geojson GeoJSON object\n * @param {string} [name=\"geojson\"] name of the variable to display in error message (unused)\n * @returns {string} GeoJSON type\n * @example\n * var point = {\n *   \"type\": \"Feature\",\n *   \"properties\": {},\n *   \"geometry\": {\n *     \"type\": \"Point\",\n *     \"coordinates\": [110, 40]\n *   }\n * }\n * var geom = turf.getType(point)\n * //=\"Point\"\n */\nfunction getType(\n  geojson: Feature<any> | FeatureCollection<any> | Geometry,\n  _name?: string\n): string {\n  if (geojson.type === \"FeatureCollection\") {\n    return \"FeatureCollection\";\n  }\n  if (geojson.type === \"GeometryCollection\") {\n    return \"GeometryCollection\";\n  }\n  if (geojson.type === \"Feature\" && geojson.geometry !== null) {\n    return geojson.geometry.type;\n  }\n  return geojson.type;\n}\n\nexport {\n  getCoord,\n  getCoords,\n  containsNumber,\n  geojsonType,\n  featureOf,\n  collectionOf,\n  getGeom,\n  getType,\n};\n// No default export!\n", "import { Feature, GeoJsonProperties, Point, Position } from \"geojson\";\nimport { convex } from \"@turf/convex\";\nimport { centroid } from \"@turf/centroid\";\nimport { point } from \"@turf/helpers\";\nimport { getType, getCoord } from \"@turf/invariant\";\nimport { coordEach } from \"@turf/meta\";\n\n/**\n * Takes any {@link Feature} or a {@link FeatureCollection} and returns its [center of mass](https://en.wikipedia.org/wiki/Center_of_mass) using this formula: [Centroid of Polygon](https://en.wikipedia.org/wiki/Centroid#Centroid_of_polygon).\n *\n * @function\n * @param {GeoJSON} geojson GeoJSON to be centered\n * @param {Object} [options={}] Optional Parameters\n * @param {Object} [options.properties={}] Translate Properties to Feature\n * @returns {Feature<Point>} the center of mass\n * @example\n * var polygon = turf.polygon([[[-81, 41], [-88, 36], [-84, 31], [-80, 33], [-77, 39], [-81, 41]]]);\n *\n * var center = turf.centerOfMass(polygon);\n *\n * //addToMap\n * var addToMap = [polygon, center]\n */\nfunction centerOfMass<P extends GeoJsonProperties = GeoJsonProperties>(\n  geojson: any,\n  options: {\n    properties?: P;\n  } = {}\n): Feature<Point, P> {\n  switch (getType(geojson)) {\n    case \"Point\":\n      return point(getCoord(geojson), options.properties);\n    case \"Polygon\":\n      var coords: Position[] = [];\n      coordEach(geojson, function (coord) {\n        coords.push(coord);\n      });\n\n      // First, we neutralize the feature (set it around coordinates [0,0]) to prevent rounding errors\n      // We take any point to translate all the points around 0\n      var centre = centroid(geojson, { properties: options.properties });\n      var translation = centre.geometry.coordinates;\n      var sx = 0;\n      var sy = 0;\n      var sArea = 0;\n      var i, pi, pj, xi, xj, yi, yj, a;\n\n      var neutralizedPoints = coords.map(function (point) {\n        return [point[0] - translation[0], point[1] - translation[1]];\n      });\n\n      for (i = 0; i < coords.length - 1; i++) {\n        // pi is the current point\n        pi = neutralizedPoints[i];\n        xi = pi[0];\n        yi = pi[1];\n\n        // pj is the next point (pi+1)\n        pj = neutralizedPoints[i + 1];\n        xj = pj[0];\n        yj = pj[1];\n\n        // a is the common factor to compute the signed area and the final coordinates\n        a = xi * yj - xj * yi;\n\n        // sArea is the sum used to compute the signed area\n        sArea += a;\n\n        // sx and sy are the sums used to compute the final coordinates\n        sx += (xi + xj) * a;\n        sy += (yi + yj) * a;\n      }\n\n      // Shape has no area: fallback on turf.centroid\n      if (sArea === 0) {\n        return centre;\n      } else {\n        // Compute the signed area, and factorize 1/6A\n        var area = sArea * 0.5;\n        var areaFactor = 1 / (6 * area);\n\n        // Compute the final coordinates, adding back the values that have been neutralized\n        return point(\n          [translation[0] + areaFactor * sx, translation[1] + areaFactor * sy],\n          options.properties\n        );\n      }\n    default:\n      // Not a polygon: Compute the convex hull and work with that\n      var hull = convex(geojson);\n\n      if (hull) return centerOfMass(hull, { properties: options.properties });\n      // Hull is empty: fallback on the centroid\n      else return centroid(geojson, { properties: options.properties });\n  }\n}\n\nexport { centerOfMass };\nexport default centerOfMass;\n", "import { Controller } from \"@hotwired/stimulus\";\nimport { SVG } from \"@svgdotjs/svg.js\";\nimport * as Turbo from \"@hotwired/turbo\";\nimport { polygon as turfPolygon } from \"@turf/helpers\";\nimport centerOfMass from \"@turf/center-of-mass\";\nimport { getDistance } from \"ol/sphere\";\n\nimport { rotatePointAroundCenter } from \"../../../helpers/geometry\";\n\nconst HORIZONTAL_PADDING = 5;\nconst VERTICAL_PADDING = 10;\nconst MAX_HEIGHT = 350;\nconst IDENTIFIER_DIAMETER = 30;\nconst MIN_POLYGON_POINTS = 4;\n\nexport function filterValidPolygonItems(items) {\n  return items.filter((item) => (item.latLngPoints?.length ?? 0) >= MIN_POLYGON_POINTS);\n}\n\nexport default class extends Controller {\n  static values = {\n    displayOnly: Boolean, // Stimulus defaults to false\n  };\n\n  connect() {\n    this.miniMapItems = JSON.parse(this.element.dataset.miniMapItems).sort((mmi) => {\n      // We want the active item to render as the last item so it displays on top\n      return mmi.isActive ? 1 : -1;\n    });\n    this.centerLatLng = JSON.parse(this.element.dataset.centerLatLng);\n    this.rotationRadians = Number.parseFloat(this.element.dataset.rotationRadians || 0) * -1;\n\n    if (this.miniMapItems.length === 0) return;\n\n    this.miniMapItems = filterValidPolygonItems(this.miniMapItems);\n    if (this.miniMapItems.length === 0) return;\n\n    // sometimes turbo seems to call this twice\n    if (this.svgAlreadyRendered) return;\n\n    this.switchPointsToOpenLayersLonLat();\n    this.switchPointsToDistancesFromTopLeftCorner();\n    this.rotatePoints();\n    this.calculateActualSize();\n    this.calculateScalingFactor();\n    this.scaleDistancePoints();\n\n    this.renderSVG();\n  }\n\n  disconnect() {\n    this.element.innerHTML = \"\";\n    this.svg = undefined;\n  }\n\n  get svgAlreadyRendered() {\n    return this.element.innerHTML.includes(\"<svg\");\n  }\n\n  switchPointsToOpenLayersLonLat() {\n    // OpenLayers wants them in the opposite order\n    // Also flip Y axis since SVG uses Y axis increasing down\n    this.miniMapItems.forEach((mmi) => {\n      mmi.lonLatPoints = mmi.latLngPoints.map((latLng) => [latLng[1], -latLng[0]]);\n    });\n\n    this.centerLonLat = [this.centerLatLng[1], -this.centerLatLng[0]];\n  }\n\n  switchPointsToDistancesFromTopLeftCorner() {\n    const anchor = this.topLeftOfPoints(\"lonLatPoints\");\n\n    this.miniMapItems.forEach((mmi) => {\n      mmi.distancePoints = mmi.lonLatPoints.map((lonLat) => this.distanceFromAnchor(anchor, lonLat));\n    });\n\n    this.centerDistances = this.distanceFromAnchor(anchor, this.centerLonLat);\n  }\n\n  topLeftOfPoints(pointsAccessor) {\n    let top;\n    let left;\n\n    this.miniMapItems.forEach((mmi) => {\n      mmi[pointsAccessor].forEach((p) => {\n        if (left === undefined || p[0] < left) left = p[0];\n        if (top === undefined || p[1] < top) top = p[1];\n      });\n    });\n\n    return [left, top];\n  }\n\n  // given an anchor (in lonLat) and a lonLat, returns a vector expressed in distances (in meters)\n  // from the anchor point to the lonLat\n  distanceFromAnchor(anchor, lonLat) {\n    const left = anchor[0];\n    const top = anchor[1];\n\n    const xDistance = getDistance(anchor, [lonLat[0], top]);\n    const yDistance = getDistance(anchor, [left, lonLat[1]]);\n\n    return [xDistance, yDistance];\n  }\n\n  calculateActualSize() {\n    this.miniMapItems.forEach((mmi) => {\n      mmi.distancePoints.forEach((p) => {\n        if (this.actualWidth === undefined || p[0] > this.actualWidth) this.actualWidth = p[0];\n        if (this.actualHeight === undefined || p[1] > this.actualHeight) this.actualHeight = p[1];\n      });\n    });\n  }\n\n  rotatePoints() {\n    if (this.rotationRadians === 0) return;\n\n    this.miniMapItems.forEach((mmi) => {\n      mmi.distancePoints = mmi.distancePoints.map((p) =>\n        rotatePointAroundCenter(this.centerDistances, p, this.rotationRadians),\n      );\n    });\n\n    this.normalizeToEliminateNegativePositions();\n  }\n\n  normalizeToEliminateNegativePositions() {\n    const anchor = this.topLeftOfPoints(\"distancePoints\");\n\n    this.miniMapItems.forEach((mmi) => {\n      mmi.distancePoints = mmi.distancePoints.map((p) => {\n        const x = p[0];\n        const y = p[1];\n\n        return [x - anchor[0], y - anchor[1]];\n      });\n    });\n  }\n\n  calculateScalingFactor() {\n    const horizontalScalingFactor = (this.element.offsetWidth - 2 * HORIZONTAL_PADDING) / this.actualWidth;\n    const verticalScalingFactor = (MAX_HEIGHT - 2 * VERTICAL_PADDING) / this.actualHeight;\n    this.scalingFactor = Math.min(horizontalScalingFactor, verticalScalingFactor);\n  }\n\n  scaleDistancePoints() {\n    this.miniMapItems.forEach((mmi) => {\n      mmi.scaledNormalizedPoints = mmi.distancePoints.map((p) => {\n        const x = p[0] * this.scalingFactor + HORIZONTAL_PADDING;\n        const y = p[1] * this.scalingFactor + VERTICAL_PADDING;\n        return [x, y];\n      });\n    });\n  }\n\n  renderSVG() {\n    const width = this.actualWidth * this.scalingFactor + 2 * HORIZONTAL_PADDING;\n    const height = this.actualHeight * this.scalingFactor + 2 * VERTICAL_PADDING;\n\n    this.svg = SVG().addTo(this.element);\n    this.svg.size(width, height);\n    this.svg.viewbox(0, 0, width, height);\n    this.svg.fill(\"#999\");\n    this.miniMapItems.forEach((mmi) => this.addPolygonToSvg(mmi));\n  }\n\n  addPolygonToSvg(miniMapItem) {\n    const pointsString = miniMapItem.scaledNormalizedPoints.map((p) => `${p[0]},${p[1]}`).join(\" \");\n    const polygon = this.svg.polygon(pointsString);\n    this.addPolygonClasses(polygon, miniMapItem);\n    this.addPolygonIdentifierToSvg(miniMapItem);\n\n    polygon.click((event) => this.polygonClick(event, miniMapItem));\n  }\n\n  addPolygonIdentifierToSvg(miniMapItem) {\n    const scaledNormalizedPoints = miniMapItem.scaledNormalizedPoints;\n    const polygon = turfPolygon([scaledNormalizedPoints]);\n    const [x, y] = centerOfMass(polygon).geometry.coordinates;\n\n    const identSvg = this.svg.nested();\n    identSvg.width(IDENTIFIER_DIAMETER);\n    identSvg.height(IDENTIFIER_DIAMETER);\n    identSvg.x(x - IDENTIFIER_DIAMETER / 2);\n    identSvg.y(y - IDENTIFIER_DIAMETER / 2);\n\n    const circle = identSvg.circle(IDENTIFIER_DIAMETER);\n    circle.addClass(\"fs__mini-map__item__identifier\");\n\n    const text = identSvg.plain(miniMapItem.identifier);\n    text.addClass(\"fs__mini-map__item__identifier__text\");\n\n    // It turns out centering in SVG is hard.  This approximates for a single character\n    // TODO: This is sort of a centering hack.  Work on real centering\n    text.x(miniMapItem.identifier.length > 1 ? 5 : 9);\n    text.y(5);\n  }\n\n  addPolygonClasses(polygon, miniMapItem) {\n    polygon.addClass(\"fs__mini-map__item\");\n    if (this.displayOnlyValue) {\n      if (miniMapItem.isActive) {\n        polygon.addClass(\"fs__mini-map__item--no-link--active\");\n      } else {\n        polygon.addClass(\"fs__mini-map__item--no-link--inactive\");\n      }\n\n      return;\n    }\n\n    if (miniMapItem.isActive) polygon.addClass(\"fs__mini-map__item--active\");\n    if (miniMapItem.isCompleted) polygon.addClass(\"fs__mini-map__item--completed\");\n    if (miniMapItem.hasError) polygon.addClass(\"fs__mini-map__item--error\");\n    if (miniMapItem.hasWarning) polygon.addClass(\"fs__mini-map__item--warning\");\n  }\n\n  polygonClick(_event, miniMapItem) {\n    if (!miniMapItem.url) return;\n\n    if (this.autoSaveController) {\n      this.autoSaveController.requestToNavigate(miniMapItem.url);\n    } else {\n      Turbo.visit(miniMapItem.url);\n    }\n  }\n\n  get autoSaveController() {\n    return this.element[\"da--layout-editor--auto-save\"];\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport * as animate from \"../../../helpers/animate\";\nimport { elementInfo, getZIndex } from \"../../../helpers/app\";\n\nexport default class extends Controller {\n  static targets = [\"link\", \"menu\"];\n\n  static values = {\n    activeLinkClass: String,\n    hoverLinkClass: String,\n    rightAlignedMenuClass: String,\n    pinnedMenuClass: String,\n  };\n\n  connect() {\n    document.addEventListener(\"click\", this.hide.bind(this));\n  }\n\n  disconnect() {\n    document.removeEventListener(\"click\", this.hide.bind(this));\n  }\n\n  show(event) {\n    event.preventDefault();\n    event.stopPropagation();\n\n    if (this.#isMenuPinned || !this.hasMenuTarget) return;\n\n    if (this.linkTarget.classList.contains(this.activeLinkClassValue)) {\n      this.hide(event);\n    } else {\n      this.#updateMenuZIndex(1);\n      animate.show(this.menuTarget, { duration: 250 });\n      this.#setLinkStyleActive(true);\n      this.#alignMenuRightIfOffscreen();\n    }\n  }\n\n  hide(_event) {\n    if (this.#isMenuPinned || !this.hasMenuTarget) return;\n\n    this.#updateMenuZIndex(-1);\n\n    animate.hide(this.menuTarget, { duration: 150 });\n    this.#setLinkStyleActive(false);\n  }\n\n  #updateMenuZIndex(amount) {\n    const currentZIndex = getZIndex(this.menuTarget);\n    this.menuTarget.style.zIndex = currentZIndex + amount;\n  }\n\n  #setLinkStyleActive(active) {\n    // use the hover style, but only if the link doesn't have the active style\n    if (this.linkTarget.classList.contains(this.activeLinkClassValue)) return;\n\n    const meth = active ? \"add\" : \"remove\";\n    this.linkTarget.classList[meth](this.hoverLinkClassValue);\n  }\n\n  #alignMenuRightIfOffscreen() {\n    this.menuTarget.classList.remove(this.rightAlignedMenuClassValue);\n\n    const windowRight = window.innerWidth;\n    const menuInfo = elementInfo(this.menuTarget);\n    const { right: menuRight } = menuInfo;\n\n    if (menuRight > windowRight) {\n      this.menuTarget.classList.add(this.rightAlignedMenuClassValue);\n    }\n  }\n\n  // Pinning is used for debugging and inspecting menus\n  get #isMenuPinned() {\n    return this.menuTarget.classList.contains(this.pinnedMenuClassValue);\n  }\n}\n", "import { types } from \"mobx-state-tree\";\nimport { v4 as uuid } from \"uuid\";\nimport sumBy from \"lodash/sumBy\";\n\nimport * as Api from \"../../helpers/api-mobx\";\nimport { projectSitePersistenceData } from \"../../da/models/project-site-model\";\nimport DaProjectModel from \"../../da/models/project-model\";\nimport RoofPlaneModel, { roofPlanePersistenceData } from \"./roof-plane-model\";\nimport DetailModel, { detailPersistenceData } from \"./detail-model\";\nimport { logger } from \"../../helpers/logger\";\nimport { uploadedBuildingImagePersistenceData } from \"../../da/models/uploaded-building-image-model\";\n\nexport const ROOF_SHAPE_HIP = \"hip\";\nexport const ROOF_SHAPE_GABLE = \"gable\";\n\nconst ProjectModelBase = types\n  .model(\"ProjectModel\", {\n    roofPlanes: types.array(RoofPlaneModel),\n    deletedRoofPlanes: types.array(RoofPlaneModel),\n    detail: DetailModel,\n    asce: types.string,\n    hiddenEndClamp: types.boolean,\n    thermalExpansionLength: types.number,\n    maxLengthBeforeThermalExpansion: types.integer,\n  })\n  .views((self) => ({\n    get shouldLengthCorrectEdges() {\n      return true;\n    },\n    get is716() {\n      return self.asce === \"7.16\";\n    },\n    get is722() {\n      return self.asce === \"7.22\";\n    },\n    get is716Or722() {\n      return self.is716 || self.is722;\n    },\n    get segments() {\n      return self.roofPlanes.flatMap((rp) => {\n        return rp.roofSections.flatMap((rs) => {\n          return rs.segments;\n        });\n      });\n    },\n    get panelsCount() {\n      return sumBy(self.notDeletedRoofPlanes, \"panelsCount\");\n    },\n    roofPlaneForIdentifier(identifier) {\n      return self.roofPlanes.find((rp) => rp.identifier === identifier);\n    },\n  }))\n  .actions((self) => ({\n    addRoofPlane(params) {\n      const defaultParams = {\n        uuid: uuid(),\n        identifier: self.getNextSequentialRoofPlaneIdentifier(),\n        eaveRotationAngleRadians: 0,\n        boundingBoxCartesianPoints: [],\n      };\n      const mergedParams = { ...defaultParams, ...params };\n      const roofPlane = RoofPlaneModel.create(mergedParams);\n      self.roofPlanes.push(roofPlane);\n\n      return roofPlane;\n    },\n    save({\n      path,\n      onSuccess = () => {},\n      onValidationError = () => {},\n      onServerError = () => {},\n      includeProjectSite = true,\n      includeZonesAndModulePositions = false,\n      includeUploadedBuildingImages = true,\n    }) {\n      if (self.saving) {\n        logger(\"Already saving. Ignoring request.\");\n        return;\n      }\n      self.setSaving();\n\n      const payload = persistenceData(\n        self,\n        includeProjectSite,\n        includeZonesAndModulePositions,\n        includeUploadedBuildingImages,\n      );\n      return Api.put({ model: self, path, body: payload, onSuccess, onValidationError, onServerError });\n    },\n  }));\n\nfunction persistenceData(project, includeProjectSite, includeZonesAndModulePositions, includeUploadedBuildingImages) {\n  const projectSiteAttributes = includeProjectSite ? projectSitePersistenceData(project.projectSite) : undefined;\n\n  // TODO: pass include zones and positions value down the persistence data chain to segments\n  const data = {\n    project_site_attributes: projectSiteAttributes,\n    roof_planes_attributes: project.roofPlanes.map((roofPlane) =>\n      roofPlanePersistenceData(roofPlane, includeZonesAndModulePositions),\n    ),\n    detail_attributes: detailPersistenceData(project.detail),\n  };\n\n  if (includeUploadedBuildingImages) {\n    data.uploaded_building_images_attributes = project.uploadedBuildingImages.map((ubi) =>\n      uploadedBuildingImagePersistenceData(ubi),\n    );\n  }\n\n  return { pr_project: data };\n}\n\nconst ProjectModel = types.compose(DaProjectModel, ProjectModelBase);\nexport default ProjectModel;\n", "import { types } from \"mobx-state-tree\";\nimport { v4 as uuid } from \"uuid\";\nimport sumBy from \"lodash/sumBy\";\n\nimport DaRoofPlaneModel from \"../../da/models/roof-plane-model\";\nimport { pointsForSave } from \"../../da/models/points-utilities\";\nimport RoofSectionModel, { roofSectionPersistenceData } from \"./roof-section-model\";\nimport GuideLineModel, { guideLinePersistenceData } from \"../../da/map/models/guide-line-model\";\nimport LatLngModel from \"../../da/models/lat-lng-model\";\nimport { logger } from \"../../helpers/logger\";\nimport WithCartesianPoints from \"../../da/models/with-cartesian-points\";\nimport CartesianModel from \"../../da/models/cartesian-model\";\nimport { degreesToRadians } from \"../../helpers/geometry\";\n\nconst RoofPlaneBase = types\n  .model(\"RoofPlaneModel\", {\n    roofSlope: types.maybeNull(types.number),\n    modifyingTraceLocked: types.optional(types.boolean, false),\n    modifyingEaveOrPropertiesLocked: types.optional(types.boolean, false),\n    roofSections: types.array(RoofSectionModel),\n    setbackGuides: types.array(GuideLineModel),\n    eaveEdgeIndex: types.maybeNull(types.integer),\n    eaveMidpointLatLng: types.maybeNull(LatLngModel),\n    eavePerpendicularEdgeVectorLatLng: types.maybeNull(LatLngModel),\n    eaveEdgeVectorLatLng: types.maybeNull(LatLngModel),\n    eaveMidpointCartesianPoint: types.maybeNull(CartesianModel),\n    eavePerpendicularEdgeVectorCartesianPoint: types.maybeNull(CartesianModel),\n    eaveEdgeVectorCartesianPoint: types.maybeNull(CartesianModel),\n    eaveRotationAngleRadians: types.number,\n    rafterSpacing: types.maybeNull(types.integer),\n    rafterOffset: types.maybeNull(types.integer),\n    boundingBox: types.array(LatLngModel),\n    boundingBoxCartesianPoints: types.array(CartesianModel),\n    stale: types.optional(types.boolean, false),\n    useCritterGuard: types.optional(types.boolean, false),\n    height: types.maybeNull(types.integer),\n  })\n  .views((self) => ({\n    guideLineForSegmentIndex(segmentIndex) {\n      return self.setbackGuides.find((sg) => sg.segmentIndex === segmentIndex);\n    },\n    get eaveLatLngPoints() {\n      return [self.latLngPoints[self.eaveEdgeIndex], self.latLngPoints[self.eaveEdgeIndex + 1]];\n    },\n    get hasEaveEdge() {\n      return (\n        self.eaveEdgeIndex !== null && self.eaveEdgeIndex >= 0 && self.eaveEdgeIndex + 1 < self.latLngPoints.length\n      );\n    },\n    get eaveCartesianPoints() {\n      return [self.cartesianPoints[self.eaveEdgeIndex], self.cartesianPoints[self.eaveEdgeIndex + 1]];\n    },\n    get needsSave() {\n      const anySetbackGuidesNeedSave = self.setbackGuides.some((sg) => sg.needsSave);\n      return self.baseNeedsSave || anySetbackGuidesNeedSave;\n    },\n    panelLengthAlongEave(orientation) {\n      return orientation === \"portrait\" ? self.project.panelWidth : self.project.panelLength;\n    },\n    panelLengthPerpendicularToEave(orientation) {\n      return (\n        (orientation === \"portrait\" ? self.project.panelLength : self.project.panelWidth) *\n        Math.cos(self.roofSlopeRadians)\n      );\n    },\n    get activeRailedParentSegments() {\n      return self.roofSections.flatMap((roofSection) => roofSection.activeRailedParentSegments);\n    },\n    get temporarySegments() {\n      return self.roofSections.flatMap((roofSection) => roofSection.temporarySegments);\n    },\n    slopeAdjustedSpacedPanelSizeInRowDirection(orientation) {\n      return self.slopeAdjustedInterRowSpacing + self.panelLengthPerpendicularToEave(orientation);\n    },\n    spacedPanelSizeInColumnDirection(orientation) {\n      return self.project.interColumnSpacing + self.panelLengthAlongEave(orientation);\n    },\n    get roofSlopeRadians() {\n      return degreesToRadians(self.roofSlope);\n    },\n    get slopeAdjustedInterRowSpacing() {\n      return self.project.interRowSpacing * Math.cos(self.roofSlopeRadians);\n    },\n    get boundingBoxToArray() {\n      if (!self.boundingBox) return [];\n\n      return self.boundingBox.map((point) => point.toLatLng);\n    },\n    get boundingBoxToString() {\n      if (!self.boundingBox) return \"[]\";\n\n      return JSON.stringify(self.boundingBoxToArray);\n    },\n    get boundingBoxCartesianPointsToArray() {\n      if (!self.boundingBoxCartesianPoints) return [];\n\n      return self.boundingBoxCartesianPoints.map((point) => point.toArray);\n    },\n    get boundingBoxCartesianPointsToString() {\n      if (!self.boundingBoxCartesianPoints) return \"[]\";\n\n      return JSON.stringify(self.boundingBoxCartesianPointsToArray);\n    },\n    get notDeletedRoofSections() {\n      return self.roofSections.filter((rs) => !rs.deleted);\n    },\n    get panelsCount() {\n      return sumBy(self.notDeletedRoofSections, \"panelsCount\");\n    },\n    get isAttachmentPlanStatusLegal() {\n      return self.roofSections.every((rs) => rs.isAttachmentPlanStatusLegal);\n    },\n  }))\n  .actions((self) => ({\n    flagDeleted() {\n      if (!self.deleted) {\n        self.markDirty();\n        self.deleted = true;\n        self.project.snapshotRoofPlaneDeletion(self);\n      }\n    },\n    setEaveEdgeIndex(newIndex) {\n      if (self.eaveEdgeIndex !== newIndex) self.markDirty();\n      self.eaveEdgeIndex = newIndex;\n    },\n    clearEaveValues() {\n      if (self.eaveEdgeIndex === null) return;\n\n      self.markDirty();\n      self.eaveEdgeIndex = null;\n      self.eaveMidpointLatLng = null;\n      self.eaveEdgeVectorLatLng = null;\n      self.eavePerpendicularEdgeVectorLatLng = null;\n      self.eaveMidpointCartesianPoint = null;\n      self.eaveEdgeVectorCartesianPoint = null;\n      self.eavePerpendicularEdgeVectorCartesianPoint = null;\n    },\n    addRoofSection(params) {\n      const defaultParams = {\n        uuid: uuid(),\n        custom: true,\n        active: true,\n        identifier: self.getNextSequentialRoofSectionIdentifier(),\n      };\n      const mergedParams = { ...defaultParams, ...params };\n      const roofSection = RoofSectionModel.create(mergedParams);\n      self.roofSections.push(roofSection);\n\n      return roofSection;\n    },\n    setEaveMidpointLatLng(latLng) {\n      if (\n        self.eaveMidpointLatLng === null ||\n        self.eaveMidpointLatLng.lat !== latLng.lat ||\n        self.eaveMidpointLatLng.lng !== latLng.lng\n      ) {\n        self.markDirty();\n      }\n      self.eaveMidpointLatLng = latLng;\n    },\n    setEaveMidpointCartesianPoint(cartesianPoint) {\n      if (\n        self.eaveMidpointCartesianPoint === null ||\n        self.eaveMidpointCartesianPoint.x !== cartesianPoint.x ||\n        self.eaveMidpointCartesianPoint.y !== cartesianPoint.y\n      ) {\n        self.markDirty();\n      }\n      self.eaveMidpointCartesianPoint = cartesianPoint;\n    },\n    setEavePerpendicularEdgeVectorLatLng(latLng) {\n      if (\n        self.eavePerpendicularEdgeVectorLatLng === null ||\n        self.eavePerpendicularEdgeVectorLatLng.lat !== latLng.lat ||\n        self.eavePerpendicularEdgeVectorLatLng.lng !== latLng.lng\n      ) {\n        self.markDirty();\n      }\n      self.eavePerpendicularEdgeVectorLatLng = latLng;\n    },\n    setEavePerpendicularEdgeVectorCartesianPoint(cartesianPoint) {\n      if (\n        self.eavePerpendicularEdgeVectorCartesianPoint === null ||\n        self.eavePerpendicularEdgeVectorCartesianPoint.x !== cartesianPoint.x ||\n        self.eavePerpendicularEdgeVectorCartesianPoint.y !== cartesianPoint.y\n      ) {\n        self.markDirty();\n      }\n      self.eavePerpendicularEdgeVectorCartesianPoint = cartesianPoint;\n    },\n    setEaveEdgeVectorLatLng(latLng) {\n      if (\n        self.eaveEdgeVectorLatLng === null ||\n        self.eaveEdgeVectorLatLng.lat !== latLng.lat ||\n        self.eaveEdgeVectorLatLng.lng !== latLng.lng\n      ) {\n        self.markDirty();\n      }\n      self.eaveEdgeVectorLatLng = latLng;\n    },\n    setEaveEdgeVectorCartesianPoint(cartesianPoint) {\n      if (\n        self.eaveEdgeVectorCartesianPoint === null ||\n        self.eaveEdgeVectorCartesianPoint.x !== cartesianPoint.x ||\n        self.eaveEdgeVectorCartesianPoint.y !== cartesianPoint.y\n      ) {\n        self.markDirty();\n      }\n      self.eaveEdgeVectorCartesianPoint = cartesianPoint;\n    },\n    setEaveRotationAngleRadians(angle) {\n      if (self.eaveRotationAngleRadians === angle) return;\n\n      self.markDirty();\n      self.eaveRotationAngleRadians = angle;\n    },\n    setRafterOffset(newRafterOffset) {\n      if (self.rafterOffset !== newRafterOffset) self.markDirty();\n      self.rafterOffset = newRafterOffset;\n    },\n    clearSetbackGuides() {\n      if (self.setbackGuides.length > 0) self.markDirty();\n      self.setbackGuides = [];\n    },\n    deleteTemporarySegments() {\n      self.roofSections.forEach((roofSection) => roofSection.deleteTemporarySegments());\n    },\n    setBoundingBox(newBoundingBox) {\n      const oldBoundingBoxString = JSON.stringify(self.boundingBox);\n      const newBoundingBoxString = JSON.stringify(newBoundingBox);\n      if (oldBoundingBoxString === newBoundingBoxString) return;\n\n      self.markDirty();\n      self.boundingBox = newBoundingBox;\n    },\n    setBoundingBoxCartesianPoints(newBoundingBoxCartesianPoints) {\n      const oldBoundingBoxCartesianPointsString = JSON.stringify(self.boundingBoxCartesianPoints);\n      const newBoundingBoxCartesianPointsString = JSON.stringify(newBoundingBoxCartesianPoints);\n      if (oldBoundingBoxCartesianPointsString === newBoundingBoxCartesianPointsString) return;\n\n      self.markDirty();\n      self.boundingBoxCartesianPoints = newBoundingBoxCartesianPoints;\n    },\n    clearRoofSections() {\n      self.roofSections.forEach((rs) => {\n        if (rs.id === undefined) {\n          self.destroyRoofSection(rs);\n        } else {\n          rs.flagDeleted();\n        }\n      });\n      self.markDirty();\n    },\n    setStale(stale) {\n      if (self.stale !== stale) self.markDirty();\n      self.stale = stale;\n    },\n  }));\n\nexport function roofPlanePersistenceData(roofPlane, includeZonesAndModulePositions) {\n  logger(`Persisting Roof Plane ${roofPlane.displayIdentifier}`);\n\n  if (!roofPlane.needsSave) {\n    logger(\"--!needsSave. Skipping\");\n    return undefined;\n  }\n\n  const latLngPoints = pointsForSave(roofPlane, \"latLngPoints\");\n  const cartesianPoints = pointsForSave(roofPlane, \"cartesianPoints\");\n  const boundingBox = pointsForSave(roofPlane, \"boundingBox\");\n  const boundingBoxCartesianPoints = pointsForSave(roofPlane, \"boundingBoxCartesianPoints\");\n\n  const result = {\n    uuid: roofPlane.uuid,\n    id: roofPlane.id,\n    identifier: roofPlane.identifier,\n    lat_lng_points: latLngPoints,\n    cartesian_points: cartesianPoints,\n    illegal_shape: roofPlane.illegalShape,\n    eave_edge_index: roofPlane.eaveEdgeIndex,\n    eave_rotation_angle_radians: roofPlane.eaveRotationAngleRadians,\n    // Don't need to persist roofSlope because it is never changed in a JS model\n    _destroy: roofPlane.deleted,\n    roof_sections_attributes: roofPlane.roofSections.map((roofSection) =>\n      roofSectionPersistenceData(roofSection, includeZonesAndModulePositions),\n    ),\n    setback_guides: roofPlane.setbackGuides.map(guideLinePersistenceData),\n    rafter_offset: roofPlane.rafterOffset || 0,\n    bounding_box: boundingBox,\n    bounding_box_cartesian_points: boundingBoxCartesianPoints,\n    stale: roofPlane.stale,\n  };\n\n  if (roofPlane.eaveEdgeIndex === null) {\n    result.eave_midpoint_lat_lng = null;\n    result.eave_perpendicular_edge_vector_lat_lng = null;\n    result.eave_edge_vector_lat_lng = null;\n\n    result.eave_midpoint_cartesian_point = null;\n    result.eave_perpendicular_edge_vector_cartesian_point = null;\n    result.eave_edge_vector_cartesian_point = null;\n  } else {\n    result.eave_midpoint_lat_lng = roofPlane.eaveMidpointLatLng.toLatLngString;\n    result.eave_perpendicular_edge_vector_lat_lng = roofPlane.eavePerpendicularEdgeVectorLatLng.toLatLngString;\n    result.eave_edge_vector_lat_lng = roofPlane.eaveEdgeVectorLatLng.toLatLngString;\n\n    result.eave_midpoint_cartesian_point = roofPlane.eaveMidpointCartesianPoint.toStringValue;\n    result.eave_perpendicular_edge_vector_cartesian_point =\n      roofPlane.eavePerpendicularEdgeVectorCartesianPoint.toStringValue;\n    result.eave_edge_vector_cartesian_point = roofPlane.eaveEdgeVectorCartesianPoint.toStringValue;\n  }\n\n  return result;\n}\n\nconst RoofPlaneModel = types.compose(DaRoofPlaneModel, RoofPlaneBase, WithCartesianPoints);\nexport default RoofPlaneModel;\n", "import { types, getParent } from \"mobx-state-tree\";\nimport WithLatLngPoints from \"../../da/models/with-lat-lng-points\";\nimport WithDirtyTracking from \"../../da/models/with-dirty-tracking\";\nimport {\n  ZONE_1,\n  ZONES,\n  MODULE_POSITION_N,\n  MODULE_POSITIONS,\n  ZONES_MODULE_POSITIONS,\n} from \"../../helpers/zones-and-module-positions\";\nimport {\n  isContourEast,\n  isContourSouth,\n  isContourWest,\n  contourCodeToDirections,\n  contourDirectionsToCode,\n  CONTOUR_CODE_NONE,\n} from \"../../helpers/contour\";\n\nexport * from \"../../helpers/zones-and-module-positions\";\n\nconst PanelModelBase = types\n  .model(\"PanelModel\", {\n    uuid: types.identifier,\n    row: types.integer,\n    column: types.integer,\n    zone: types.optional(types.string, ZONE_1),\n    modulePosition: types.optional(types.string, MODULE_POSITION_N),\n    contourCode: types.optional(types.string, \"0\"),\n  })\n  .views((self) => ({\n    get segment() {\n      return getParent(self, 2);\n    },\n    get startLatLng() {\n      return self.latLngPoints[0];\n    },\n    get zoneLabel() {\n      return `Z${self.zone}`;\n    },\n    get modulePositionLabel() {\n      return `${self.modulePosition}`;\n    },\n    get zoneModulePosition() {\n      return ZONES_MODULE_POSITIONS.findIndex((zonePos) => zonePos === `${self.zone}:${self.modulePosition}`);\n    },\n    get legalContourDirections() {\n      const results = [];\n      if (self.segment.rows === self.row) results.push(\"south\");\n\n      if (!self.segment.project.hiddenEndClamp) return results;\n\n      if (self.segment.railed && self.column === 1) results.push(\"west\");\n      if (self.segment.isLastInRailGroup && self.segment.columns === self.column) results.push(\"east\");\n      return results;\n    },\n    get contourDirections() {\n      return contourCodeToDirections(self.contourCode);\n    },\n    get isContourWest() {\n      return isContourWest(self.contourCode);\n    },\n    get isContourEast() {\n      return isContourEast(self.contourCode);\n    },\n    get isContourSouth() {\n      return isContourSouth(self.contourCode);\n    },\n    get sideLatLngsTop() {\n      return [this.latLngPoints[0], this.latLngPoints[1]];\n    },\n    get sideLatLngsRight() {\n      return [this.latLngPoints[1], this.latLngPoints[2]];\n    },\n    get sideLatLngsBottom() {\n      return [this.latLngPoints[3], this.latLngPoints[2]];\n    },\n    get sideLatLngsLeft() {\n      return [this.latLngPoints[0], this.latLngPoints[3]];\n    },\n    get hasContour() {\n      return self.contourCode !== CONTOUR_CODE_NONE;\n    },\n    get isLastColumn() {\n      return self.column === self.segment.columns;\n    },\n    get isFirstColumn() {\n      return self.column === 1;\n    },\n    get isFirstRow() {\n      return self.row === 1;\n    },\n    get isLastRow() {\n      return self.row === self.segment.rows;\n    },\n  }))\n  .actions((self) => ({\n    setZone(newZone) {\n      const zone = newZone.replace(\"Z\", \"\");\n      if (!ZONES.includes(zone)) throw `Trying to set zone to an invalid value: ${zone}`;\n      if (self.zone !== zone) self.markDirty();\n\n      self.zone = zone;\n    },\n    setModulePosition(newModulePosition) {\n      if (!MODULE_POSITIONS.includes(newModulePosition))\n        throw `Trying to set position to an invalid value: ${newModulePosition}`;\n      if (self.modulePosition !== newModulePosition) self.markDirty();\n\n      self.modulePosition = newModulePosition;\n    },\n    setContourCodeFromDirections(directions) {\n      const legalDirections = self.legalContourDirections;\n      const directionsToApply = directions.filter((direction) => legalDirections.includes(direction));\n      const contourCode = contourDirectionsToCode(directionsToApply);\n      self.setContourCode(contourCode);\n    },\n    setContourCode(newContourCode) {\n      if (self.contourCode !== newContourCode) self.markDirty();\n\n      self.contourCode = newContourCode;\n      self.segment.refreshContourCodes();\n    },\n  }));\n\nconst PanelModel = types.compose(PanelModelBase, WithLatLngPoints, WithDirtyTracking);\nexport default PanelModel;\n", "import { types, getParent } from \"mobx-state-tree\";\nimport LatLngModel from \"../../da/models/lat-lng-model\";\nimport WithLatLngPoints from \"../../da/models/with-lat-lng-points\";\nimport CartesianModel from \"../../da/models/cartesian-model\";\nimport WithDirtyTracking from \"../../da/models/with-dirty-tracking\";\n\nexport const THERMAL_EXPANSION_FLAP_WIDTH = 4;\nexport const THERMAL_EXPANSION_FLAP_INSET = 6;\n\nconst ThermalExpansionModelBase = types\n  .model(\"ThermalExpansionModel\", {\n    uuid: types.identifier,\n    startLatLng: LatLngModel,\n    startCartesianPoint: types.maybeNull(CartesianModel),\n    legalityCheckLatLngPoints: types.array(LatLngModel),\n  })\n  .views((self) => ({\n    get segment() {\n      return getParent(self, 2);\n    },\n    get thermalExpansionLength() {\n      return self.segment.project.thermalExpansionLength;\n    },\n    thermalExpansionLatLngPoints(startLatLng) {\n      const { unitColumnVectorLatLng, unitRowVectorLatLng } = self.segment;\n      const totalHeight = self.segment.height;\n      const flapLength = totalHeight - THERMAL_EXPANSION_FLAP_INSET * 2;\n\n      const p2 = startLatLng.plus(unitColumnVectorLatLng.times(self.thermalExpansionLength));\n      const p3 = p2.plus(unitRowVectorLatLng.times(THERMAL_EXPANSION_FLAP_INSET));\n      const p4 = p3.plus(unitColumnVectorLatLng.times(THERMAL_EXPANSION_FLAP_WIDTH));\n      const p5 = p4.plus(unitRowVectorLatLng.times(flapLength));\n      const p6 = p5.minus(unitColumnVectorLatLng.times(THERMAL_EXPANSION_FLAP_WIDTH));\n      const p7 = p6.plus(unitRowVectorLatLng.times(THERMAL_EXPANSION_FLAP_INSET));\n      const p8 = p7.minus(unitColumnVectorLatLng.times(self.thermalExpansionLength));\n      const p9 = p8.minus(unitRowVectorLatLng.times(THERMAL_EXPANSION_FLAP_INSET));\n      const p10 = p9.minus(unitColumnVectorLatLng.times(THERMAL_EXPANSION_FLAP_WIDTH));\n      const p11 = p10.minus(unitRowVectorLatLng.times(flapLength));\n      const p12 = p11.plus(unitColumnVectorLatLng.times(THERMAL_EXPANSION_FLAP_WIDTH));\n      const latLngPoints = [startLatLng, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, startLatLng].map(\n        (ll) => ll.toObjectLiteral,\n      );\n      return latLngPoints;\n    },\n    thermalExpansionLegalityCheckLatLngPoints(startLatLng) {\n      const thermalExpansionDrawingParallelToEave = self.segment.unitColumnVectorLatLng.times(\n        self.thermalExpansionLength,\n      );\n      const thermalExpansionDrawingPerpendicularToEave = self.segment.unitRowVectorLatLng.times(self.segment.height);\n      const p2 = startLatLng.plus(thermalExpansionDrawingParallelToEave);\n      const p3 = p2.plus(thermalExpansionDrawingPerpendicularToEave);\n      const p4 = startLatLng.plus(thermalExpansionDrawingPerpendicularToEave);\n      const latLngPoints = [startLatLng, p2, p3, p4, startLatLng].map((ll) => ll.toObjectLiteral);\n      return latLngPoints;\n    },\n  }))\n  .actions((self) => ({\n    setStartLatLng(newStartLatLng) {\n      if (self.startLatLng.lat === newStartLatLng.lat && self.startLatLng.lng === newStartLatLng.lng) {\n        return;\n      }\n      self.startLatLng = newStartLatLng;\n      self.generateAndSetLatLngPoints(newStartLatLng);\n      self.markDirty();\n    },\n    setStartCartesianPoint(newStartCartesianPoint) {\n      if (\n        self.startCartesianPoint &&\n        self.startCartesianPoint.x === newStartCartesianPoint.x &&\n        self.startCartesianPoint.y === newStartCartesianPoint.y\n      ) {\n        return;\n      }\n      self.startCartesianPoint = newStartCartesianPoint;\n      self.markDirty();\n    },\n    setLegalityCheckLatLngPoints(newPoints) {\n      const oldLatLngPointsString = JSON.stringify(self.legalityCheckLatLngPoints);\n      const newLatLngPointsString = JSON.stringify(newPoints);\n      if (oldLatLngPointsString === newLatLngPointsString) return;\n\n      self.legalityCheckLatLngPoints = newPoints;\n    },\n    generateAndSetLatLngPoints(startLatLng) {\n      self.setLatLngPoints(self.thermalExpansionLatLngPoints(startLatLng));\n      self.setLegalityCheckLatLngPoints(self.thermalExpansionLegalityCheckLatLngPoints(startLatLng));\n    },\n  }));\n\nconst ThermalExpansionModel = types.compose(ThermalExpansionModelBase, WithLatLngPoints, WithDirtyTracking);\nexport default ThermalExpansionModel;\n", "import { types, getParent } from \"mobx-state-tree\";\n\nimport CartesianModel from \"../../da/models/cartesian-model\";\n\nimport WithLatLngPoints from \"../../da/models/with-lat-lng-points\";\nimport WithDirtyTracking from \"../../da/models/with-dirty-tracking\";\n\nexport const ADJOINMENT_HORIZONTAL_THRESHOLD = 2; // inches\nexport const ADJOINMENT_VERTICAL_THRESHOLD = 2; // inches\n\nexport const CONTOUR_LEGALITY_ADJOINMENT_HORIZONTAL_THRESHOLD = 12; // inches\nexport const CONTOUR_LEGALITY_ADJOINMENT_VERTICAL_THRESHOLD = 6; // inches\n\nconst AdjoinmentModelBase = types\n  .model(\"AdjoinmentModel\", {\n    segmentUuid: types.identifier,\n    adjoiningSegmentUuid: types.string,\n    adjoinmentSide: types.string,\n    cartesianPoints: types.array(CartesianModel),\n  })\n  .views((self) => ({\n    get segment() {\n      return getParent(self, 2);\n    },\n  }))\n  .actions((self) => ({\n    setCartesianPoints(cartesianPoints) {\n      self.markDirty();\n      self.cartesianPoints = cartesianPoints;\n    },\n    clearCartesianPoints() {\n      self.markDirty();\n      self.cartesianPoints = [];\n    },\n  }));\n\nconst AdjoinmentModel = types.compose(AdjoinmentModelBase, WithLatLngPoints, WithDirtyTracking);\nexport default AdjoinmentModel;\n", "import { types, getParent } from \"mobx-state-tree\";\n\nimport CartesianModel from \"../../da/models/cartesian-model\";\n\nimport WithLatLngPoints from \"../../da/models/with-lat-lng-points\";\nimport WithDirtyTracking from \"../../da/models/with-dirty-tracking\";\n\nconst ContourModelBase = types\n  .model(\"ContourModel\", {\n    segmentUuid: types.identifier,\n    side: types.string,\n    cartesianPoints: types.array(CartesianModel),\n  })\n  .views((self) => ({\n    get segment() {\n      return getParent(self, 2);\n    },\n  }))\n  .actions((self) => ({\n    setCartesianPoints(cartesianPoints) {\n      self.markDirty();\n      self.cartesianPoints = cartesianPoints;\n    },\n    clearCartesianPoints() {\n      self.markDirty();\n      self.cartesianPoints = [];\n    },\n  }));\n\nconst ContourModel = types.compose(ContourModelBase, WithLatLngPoints, WithDirtyTracking);\nexport default ContourModel;\n", "import { v4 as uuid } from \"uuid\";\nimport { types, getParent } from \"mobx-state-tree\";\n\nimport CartesianModel from \"../../da/models/cartesian-model\";\nimport LatLngModel from \"../../da/models/lat-lng-model\";\nimport WithDirtyTracking from \"../../da/models/with-dirty-tracking\";\nimport PanelModel, {\n  DEFAULT_ZONE_MODULE_POSITION,\n  MODULE_POSITION_N,\n  ZONE_1,\n  ZONES_MODULE_POSITIONS,\n} from \"./panel-model\";\nimport ThermalExpansionModel from \"./thermal-expansion-model\";\nimport AdjoinmentModel from \"./adjoinment-model\";\nimport { contourCodeGenerator, CONTOUR_CODE_NONE } from \"../../helpers/contour\";\nimport ContourModel from \"./contour-model\";\n\nexport const ATTACHMENT_PLAN_STATUS_LEGAL = \"legal\";\nexport const ATTACHMENT_PLAN_STATUS_CANTILEVER_PROBLEM = \"cantilever\";\nexport const ATTACHMENT_PLAN_STATUS_SPAN_PROBLEM = \"span\";\n\nconst SegmentModelBase = types\n  .model(\"SegmentModel\", {\n    id: types.maybe(types.integer),\n    uuid: types.identifier,\n    rows: types.integer,\n    columns: types.integer,\n    railed: types.boolean,\n    startLatLng: LatLngModel,\n    startCartesianPoint: types.maybeNull(CartesianModel),\n    orientation: types.string,\n    rowDirection: types.integer,\n    columnDirection: types.integer,\n    illegalShape: types.boolean,\n    deleted: types.optional(types.boolean, false),\n    temporary: types.optional(types.boolean, false),\n    railedParentUuid: types.maybeNull(types.string),\n    distanceFromRailedParentStart: types.maybeNull(types.number),\n    display: types.optional(types.boolean, true),\n    panels: types.array(PanelModel),\n    zonesAndModulePositions: types.optional(types.string, \"\"),\n    zonesAndModulePositionsPersisted: types.optional(types.boolean, false),\n    // this is either an empty array [] for an unrailed segment, or\n    // a nested structure like:\n    // [\n    //    [ // row 1\n    //      [1, 3, 5] // north rail of row 1\n    //      [2, 4, 6] // south rail of row 1\n    //    ],\n    //    [ ... ] // row 2, etc\n    // ]\n    attachmentPositions: types.array(types.array(types.array(types.integer))),\n    attachmentPlanStatus: types.optional(types.string, ATTACHMENT_PLAN_STATUS_LEGAL),\n    thermalExpansions: types.array(ThermalExpansionModel),\n    thermalExpansionsStartLatLngs: types.array(LatLngModel),\n    thermalExpansionsStartCartesianPoints: types.array(CartesianModel),\n    adjoinments: types.array(AdjoinmentModel),\n    contourLegalityAdjoinments: types.array(AdjoinmentModel),\n    contourCodes: types.optional(types.string, \"\"),\n    contours: types.array(ContourModel),\n    thermalExpansionGapExceedingBondingJumperLimit: types.optional(types.boolean, false),\n  })\n  .views((self) => ({\n    get roofSection() {\n      try {\n        return getParent(self, 2);\n      } catch (e) {\n        if (e.message.includes(\"Failed to find the parent of AnonymousModel\")) {\n          return undefined;\n        } else {\n          throw e;\n        }\n      }\n    },\n    get panelsGrid() {\n      const result = [];\n      for (let i = 0; i < self.rows; i++) {\n        const row = [];\n        for (let j = 0; j < self.columns; j++) {\n          const panel = self.panels.find((p) => p.row === i + 1 && p.column === j + 1);\n          row.push(panel);\n        }\n        result.push(row);\n      }\n      return result;\n    },\n    get panelsOnSideTop() {\n      return this.panelsGrid[0];\n    },\n    get panelsOnSideRight() {\n      return this.panelsGrid.map((row) => row[row.length - 1]);\n    },\n    get panelsOnSideBottom() {\n      return this.panelsGrid[this.panelsGrid.length - 1];\n    },\n    get panelsOnSideLeft() {\n      return this.panelsGrid.map((row) => row[0]);\n    },\n    get needsSave() {\n      return (\n        self.dirty ||\n        !self.id ||\n        self.panels.some((p) => p.dirty) ||\n        self.thermalExpansions.some((te) => te.dirty) ||\n        self.adjoinments.some((a) => a.dirty) ||\n        self.contourLegalityAdjoinments.some((a) => a.dirty)\n      );\n    },\n    get isEmpty() {\n      return self.rows === 0 || self.columns === 0;\n    },\n    get railedParent() {\n      if (self.railed) return undefined;\n\n      return self.roofSection.segments.find((s) => s.uuid === self.railedParentUuid);\n    },\n    get unrailedChildren() {\n      if (!self.railed) return [];\n      if (self.roofSection === undefined) return [];\n\n      return self.roofSection.segments\n        .filter((s) => !s.railed && s.railedParentUuid === self.uuid && !s.deleted)\n        .sort((a, b) => {\n          return a.distanceFromRailedParentStart - b.distanceFromRailedParentStart;\n        });\n    },\n    get hasUnrailedChildren() {\n      if (!self.railed) return false;\n\n      return self.unrailedChildren.length > 0;\n    },\n    get displayable() {\n      return !self.deleted;\n    },\n    get railedGroup() {\n      if (self.railed) {\n        return [self, ...self.unrailedChildren];\n      } else {\n        return self.railedParent.railedGroup;\n      }\n    },\n    get railGroupIndex() {\n      return self.railedGroup.indexOf(self);\n    },\n    get railGroupSegmentUuids() {\n      return self.railedGroup.map((s) => s.uuid);\n    },\n    get previousRailGroupSegment() {\n      const railedGroup = self.railedGroup;\n      const groupIndex = railedGroup.indexOf(self);\n      if (groupIndex === 0) return undefined;\n\n      return railedGroup[groupIndex - 1];\n    },\n    get nextRailGroupSegment() {\n      const railedGroup = self.railedGroup;\n      const groupIndex = railedGroup.indexOf(self);\n      if (groupIndex === railedGroup.length - 1) return undefined;\n\n      return railedGroup[groupIndex + 1];\n    },\n    get isLastInRailGroup() {\n      const railedGroup = self.railedGroup;\n      return railedGroup.indexOf(self) === railedGroup.length - 1;\n    },\n    get isOnTheOutsideOfRailGroup() {\n      return self.railed || self.isLastInRailGroup;\n    },\n    get isAtStartOfRailGroup() {\n      return self.railGroupIndex === 0;\n    },\n    get isAtEndOfRailGroup() {\n      return self.railGroupIndex === self.railedGroup.length - 1;\n    },\n    get width() {\n      if (self.spacedPanelSizeInColumnDirection === undefined) return undefined;\n\n      return self.columns * self.spacedPanelSizeInColumnDirection - self.project.interColumnSpacing;\n    },\n    get height() {\n      return self.rows * self.slopeAdjustedSpacedPanelSizeInRowDirection - self.roofPlane.slopeAdjustedInterRowSpacing;\n    },\n    get roofPlane() {\n      return self.roofSection.roofPlane;\n    },\n    get project() {\n      return self.roofPlane.project;\n    },\n    get panelLengthAlongEave() {\n      return self.roofPlane.panelLengthAlongEave(self.orientation);\n    },\n    get panelLengthPerpendicularToEave() {\n      return self.roofPlane.panelLengthPerpendicularToEave(self.orientation);\n    },\n    get unitRowVectorLatLng() {\n      return self.roofPlane.eavePerpendicularEdgeVectorLatLng.times(self.rowDirection);\n    },\n    get unitColumnVectorLatLng() {\n      return self.roofPlane.eaveEdgeVectorLatLng.times(self.columnDirection);\n    },\n    get slopeAdjustedSpacedPanelSizeInRowDirection() {\n      return self.roofPlane.slopeAdjustedSpacedPanelSizeInRowDirection(self.orientation);\n    },\n    get spacedPanelSizeInColumnDirection() {\n      return self.roofPlane.spacedPanelSizeInColumnDirection(self.orientation);\n    },\n    get latLngPoints() {\n      const rowOffset = self.unitRowVectorLatLng.times(\n        self.rows * self.slopeAdjustedSpacedPanelSizeInRowDirection - self.roofPlane.slopeAdjustedInterRowSpacing,\n      );\n      const columnOffset = self.unitColumnVectorLatLng.times(\n        self.columns * self.spacedPanelSizeInColumnDirection - self.project.interColumnSpacing,\n      );\n\n      const firstPoint = self.startLatLng;\n      const secondPoint = firstPoint.plus(columnOffset);\n      const thirdPoint = secondPoint.plus(rowOffset);\n      const fourthPoint = firstPoint.plus(rowOffset);\n\n      const latLngPoints = [firstPoint, secondPoint, thirdPoint, fourthPoint, firstPoint];\n      return latLngPoints;\n    },\n    panelModulePosition(row, column) {\n      const rowOffset = self.unitRowVectorLatLng.times((row - 1) * self.slopeAdjustedSpacedPanelSizeInRowDirection);\n      const columnOffset = self.unitColumnVectorLatLng.times((column - 1) * self.spacedPanelSizeInColumnDirection);\n      const position = self.startLatLng.plus(rowOffset).plus(columnOffset);\n      return position;\n    },\n    get panelDrawingPerpendicularToEave() {\n      return self.unitRowVectorLatLng.times(self.panelLengthPerpendicularToEave);\n    },\n    get panelDrawingParallelToEave() {\n      return self.unitColumnVectorLatLng.times(self.panelLengthAlongEave);\n    },\n    panelLatLngPoints(row, column) {\n      const startLatLng = self.panelModulePosition(row, column);\n      const p2 = startLatLng.plus(self.panelDrawingParallelToEave);\n      const p3 = p2.plus(self.panelDrawingPerpendicularToEave);\n      const p4 = startLatLng.plus(self.panelDrawingPerpendicularToEave);\n      const latLngPoints = [startLatLng, p2, p3, p4, startLatLng];\n      return latLngPoints;\n    },\n    get buildZonesAndModulePositions() {\n      return this.panels.map((panel) => panel.zoneModulePosition).join(\",\");\n    },\n    get zonesAndModulePositionsGrid() {\n      if (self.zonesAndModulePositions === \"\") return self.defaultZonesAndModulePositionsGrid;\n\n      const result = [];\n      let currentRow = [];\n      self.zonesAndModulePositions.split(\",\").forEach((zoneModulePositionIndexString, i) => {\n        if (i > 0 && i % self.columns === 0) {\n          result.push(currentRow);\n          currentRow = [];\n        }\n        currentRow.push(ZONES_MODULE_POSITIONS[Number.parseInt(zoneModulePositionIndexString)]);\n      });\n      result.push(currentRow);\n\n      return result;\n    },\n    get defaultZonesAndModulePositionsGrid() {\n      const singleRow = Array(self.columns).fill(DEFAULT_ZONE_MODULE_POSITION);\n      return Array.from({ length: self.rows }, () => [...singleRow]);\n    },\n    get notDeleted() {\n      return !self.deleted;\n    },\n    get panelsCount() {\n      return self.rows * self.columns;\n    },\n    get isAttachmentPlanStatusLegal() {\n      return self.attachmentPlanStatus === ATTACHMENT_PLAN_STATUS_LEGAL;\n    },\n    get thermalExpansionsStartLatLngsString() {\n      return `[${self.thermalExpansions\n        .map((thermalExpansion) => thermalExpansion.startLatLng.toLatLngString)\n        .join(\",\")}]`;\n    },\n    get thermalExpansionsStartCartesianPointsString() {\n      return `[${self.thermalExpansions\n        .map((thermalExpansion) => thermalExpansion.startCartesianPoint.toStringValue)\n        .join(\",\")}]`;\n    },\n    get hasThermalExpansions() {\n      return this.thermalExpansions.length > 0;\n    },\n    get adjoinmentsLatLngsString() {\n      return `[${self.adjoinments.flatMap((a) => a.latLngPoints.map((ll) => ll.toLatLngString)).join(\",\")}]`;\n    },\n    get adjoinmentsCartesianPointsString() {\n      return `[${self.adjoinments.flatMap((a) => a.cartesianPoints.map((cp) => cp.toStringValue)).join(\",\")}]`;\n    },\n    get adjoinmentsDetailsString() {\n      return `[${self.adjoinments.map((a) => JSON.stringify([a.adjoinmentSide, a.adjoiningSegmentUuid])).join(\",\")}]`;\n    },\n    adjoinmentsOn(side) {\n      return self.adjoinments.filter((a) => a.adjoinmentSide === side);\n    },\n    get contourLegalityAdjoinmentsLatLngsString() {\n      return `[${self.contourLegalityAdjoinments\n        .flatMap((a) => a.latLngPoints.map((ll) => ll.toLatLngString))\n        .join(\",\")}]`;\n    },\n    get contourLegalityAdjoinmentsCartesianPointsString() {\n      return `[${self.contourLegalityAdjoinments\n        .flatMap((a) => a.cartesianPoints.map((cp) => cp.toStringValue))\n        .join(\",\")}]`;\n    },\n    get contourLegalityAdjoinmentsDetailsString() {\n      return `[${self.contourLegalityAdjoinments\n        .map((a) => JSON.stringify([a.adjoinmentSide, a.adjoiningSegmentUuid]))\n        .join(\",\")}]`;\n    },\n    contourLegalityAdjoinmentsOn(side) {\n      return self.contourLegalityAdjoinments.filter((a) => a.adjoinmentSide === side);\n    },\n    get endDistanceFromRailedParentStart() {\n      return this.distanceFromRailedParentStart + this.width;\n    },\n    get contourCodesString() {\n      if (self.panels.length === 0 && self.contours.length > 0) {\n        return self.contourCodes;\n      } else {\n        return self.panels.map((panel) => panel.contourCode).join(\"\");\n      }\n    },\n    get contourCodesGrid() {\n      if (self.contourCodes === \"\") return self.defaultContourCodesGrid;\n\n      const result = [];\n      let currentRow = [];\n      self.contourCodes.split(\"\").forEach((panelContourCode, i) => {\n        if (i > 0 && i % self.columns === 0) {\n          result.push(currentRow);\n          currentRow = [];\n        }\n        currentRow.push(panelContourCode);\n      });\n      result.push(currentRow);\n\n      return result;\n    },\n    get defaultContourCodesGrid() {\n      const singleRow = Array(self.columns).fill(CONTOUR_CODE_NONE);\n      return Array.from({ length: self.rows }, () => [...singleRow]);\n    },\n    get contoursLatLngsString() {\n      return `[${self.contours.flatMap((c) => c.latLngPoints.map((ll) => ll.toLatLngString)).join(\",\")}]`;\n    },\n    get contoursCartesianPointsString() {\n      return `[${self.contours.flatMap((c) => c.cartesianPoints.map((cp) => cp.toStringValue)).join(\",\")}]`;\n    },\n    get contourDetailsString() {\n      return `[${self.contours.map((c) => JSON.stringify([c.side, c.segmentUuid])).join(\",\")}]`;\n    },\n    get hasContourCodesAndDetailsMismatch() {\n      return self.contoursCodeString === \"\" && self.contourDetailsString !== \"\";\n    },\n  }))\n  .actions((self) => ({\n    setIllegalShape(isIllegal) {\n      if (self.illegalShape !== isIllegal) {\n        self.markDirty();\n      }\n      self.illegalShape = isIllegal;\n    },\n    flagDeleted() {\n      if (!self.deleted) {\n        self.markDirty();\n      }\n      self.deleted = true;\n    },\n    setStartLatLng(newStartLatLng) {\n      if (self.startLatLng.lat === newStartLatLng.lat && self.startLatLng.lng === newStartLatLng.lng) {\n        return;\n      }\n      self.startLatLng = newStartLatLng;\n      self.markDirty();\n    },\n    setStartCartesianPoint(newStartCartesianPoint) {\n      if (\n        self.startCartesianPoint &&\n        self.startCartesianPoint.x === newStartCartesianPoint.x &&\n        self.startCartesianPoint.y === newStartCartesianPoint.y\n      ) {\n        return;\n      }\n      self.startCartesianPoint = newStartCartesianPoint;\n      self.markDirty();\n    },\n    addRow() {\n      self.rows++;\n      self.markDirty();\n    },\n    addColumn() {\n      self.columns++;\n      self.markDirty();\n    },\n    addColumns(num) {\n      self.columns += num;\n      self.markDirty();\n    },\n    setRows(newRows) {\n      if (self.rows !== newRows) self.markDirty();\n      self.rows = newRows;\n    },\n    setColumns(newColumns) {\n      if (self.columns !== newColumns) self.markDirty();\n      self.columns = newColumns;\n    },\n    setRailed(isRailed) {\n      if (self.railed !== isRailed) self.markDirty();\n      self.railed = isRailed;\n    },\n    setRailedParentUuid(railedParentUuid) {\n      if (self.railedParentUuid !== railedParentUuid) self.markDirty();\n      self.railedParentUuid = railedParentUuid;\n    },\n    setDistanceFromRailedParentStart(distanceFromRailedParentStart) {\n      if (self.distanceFromRailedParentStart !== distanceFromRailedParentStart) self.markDirty();\n      self.distanceFromRailedParentStart = distanceFromRailedParentStart;\n    },\n    setFullColumnSize(spacedPanelSizeInColumnDirection) {\n      if (self.spacedPanelSizeInColumnDirection !== spacedPanelSizeInColumnDirection) self.markDirty();\n      self.spacedPanelSizeInColumnDirection = spacedPanelSizeInColumnDirection;\n    },\n    setAdjustedFullRowSize(slopeAdjustedSpacedPanelSizeInRowDirection) {\n      if (self.slopeAdjustedSpacedPanelSizeInRowDirection !== slopeAdjustedSpacedPanelSizeInRowDirection)\n        self.markDirty();\n      self.slopeAdjustedSpacedPanelSizeInRowDirection = slopeAdjustedSpacedPanelSizeInRowDirection;\n    },\n    addPanel(params) {\n      const defaultParams = { uuid: uuid(), zone: ZONE_1, modulePosition: MODULE_POSITION_N };\n\n      const mergedParams = { ...defaultParams, ...params };\n      const panel = PanelModel.create(mergedParams);\n      self.panels.push(panel);\n\n      const latLngPoints = self.panelLatLngPoints(params.row, params.column);\n      panel.setLatLngPoints(\n        latLngPoints.map((llp) => {\n          return { lat: llp.lat, lng: llp.lng };\n        }),\n      );\n      panel.dirty = false;\n\n      return panel;\n    },\n    addThermalExpansion(params) {\n      const defaultParams = { uuid: uuid() };\n\n      const mergedParams = { ...defaultParams, ...params };\n      const thermalExpansion = ThermalExpansionModel.create(mergedParams);\n      self.thermalExpansions.push(thermalExpansion);\n\n      if (!params.latLngPoints) {\n        thermalExpansion.generateAndSetLatLngPoints(params.startLatLng);\n      }\n\n      return thermalExpansion;\n    },\n    deleteThermalExpansion(thermalExpansion) {\n      const index = self.thermalExpansions.indexOf(thermalExpansion);\n\n      self.thermalExpansions.splice(index, 1);\n      self.thermalExpansionsStartLatLngs.splice(index, 1);\n      self.thermalExpansionsStartCartesianPoints.splice(index, 1);\n\n      self.markDirty();\n    },\n    clearPanels() {\n      self.panels = [];\n    },\n    setTemporary(temporary) {\n      self.temporary = temporary;\n    },\n    setDefaultZonesAndModulePositionsIfNoneExist() {\n      if (self.zonesAndModulePositions !== \"\") return;\n\n      self.markDirty();\n      self.zonesAndModulePositions = self.buildZonesAndModulePositions;\n    },\n    refreshZonesAndModulePositions() {\n      self.zonesAndModulePositions = self.buildZonesAndModulePositions;\n    },\n    setZonesAndModulePositionsString(newString) {\n      if (newString !== self.zonesAndModulePositions) self.markDirty();\n      self.zonesAndModulePositions = newString;\n    },\n    clearId() {\n      self.id = undefined;\n    },\n    clearAdjoinments() {\n      if (self.adjoinments.length > 0) self.markDirty();\n\n      self.adjoinments = [];\n    },\n    addAdjoinment(adjoinmentData) {\n      self.markDirty();\n      const adjoinment = AdjoinmentModel.create(adjoinmentData);\n      self.adjoinments.push(adjoinment);\n    },\n    refreshContourCodes() {\n      self.markDirty();\n      self.contourCodes = self.panels.map((p) => p.contourCode).join(\"\");\n    },\n    clearContourLegalityAdjoinments() {\n      if (self.contourLegalityAdjoinments.length > 0) self.markDirty();\n\n      self.contourLegalityAdjoinments = [];\n    },\n    addContourLegalityAdjoinment(adjoinmentData) {\n      self.markDirty();\n      const adjoinment = AdjoinmentModel.create(adjoinmentData);\n      self.contourLegalityAdjoinments.push(adjoinment);\n    },\n    setContourCodes(newContourCodes) {\n      self.markDirty();\n      self.contourCodes = newContourCodes;\n    },\n    setThermalExpansionGapExceedingBondingJumperLimit(newValue) {\n      if (self.thermalExpansionGapExceedingBondingJumperLimit !== newValue) self.markDirty();\n\n      self.thermalExpansionGapExceedingBondingJumperLimit = newValue;\n    },\n    clearContours() {\n      if (self.contours.length > 0) self.markDirty();\n\n      self.contours = [];\n    },\n    addContour(contourData) {\n      self.markDirty();\n      const contour = ContourModel.create(contourData);\n      self.contours.push(contour);\n      return contour;\n    },\n    removeContour(contour) {\n      self.markDirty();\n      self.contours = self.contours.filter((c) => c !== contour);\n    },\n    removeIllegalPanelContour() {\n      self.panels.forEach((panel) => {\n        if (!panel.hasContour) return;\n\n        let isWest = panel.isContourWest;\n        let isEast = panel.isContourEast;\n        let isSouth = panel.isContourSouth;\n\n        if (isWest && !panel.isFirstColumn) isWest = false;\n        if (isEast && !panel.isLastColumn) isEast = false;\n        if (isSouth && !panel.isLastRow) isSouth = false;\n\n        const newCode = contourCodeGenerator(isWest, isEast, isSouth);\n        panel.setContourCode(newCode);\n      });\n    },\n  }));\n\nexport function segmentPersistenceData(segment, includeZonesAndModulePositions) {\n  if (segment.hasContourCodesAndDetailsMismatch) {\n    console.log(\"Warning: Contour Codes Mismatch\");\n    // Contour codes do not match other Contour related data\n    debugger;\n  }\n\n  const data = {\n    id: segment.id,\n    uuid: segment.uuid,\n    rows: segment.rows,\n    columns: segment.columns,\n    railed: segment.railed,\n    start_lat_lng: segment.startLatLng.toLatLngString,\n    start_cartesian_point: segment.startCartesianPoint.toStringValue,\n    rails_for_ew_coverage: \"[]\",\n    portrait: segment.orientation === \"portrait\",\n    row_direction: segment.rowDirection,\n    column_direction: segment.columnDirection,\n    illegal_shape: segment.illegalShape,\n    _destroy: segment.deleted,\n    railed_parent_uuid: segment.railedParentUuid,\n    distance_from_railed_parent_start: segment.distanceFromRailedParentStart,\n    thermal_expansions_start_lat_lngs: segment.thermalExpansionsStartLatLngsString,\n    thermal_expansions_start_cartesian_points: segment.thermalExpansionsStartCartesianPointsString,\n    adjoinments_lat_lngs: segment.adjoinmentsLatLngsString,\n    adjoinments_cartesian_points: segment.adjoinmentsCartesianPointsString,\n    adjoinments_details: segment.adjoinmentsDetailsString,\n    contour_codes: segment.contourCodesString,\n    contour_legality_adjoinments_lat_lngs: segment.contourLegalityAdjoinmentsLatLngsString,\n    contour_legality_adjoinments_cartesian_points: segment.contourLegalityAdjoinmentsCartesianPointsString,\n    contour_legality_adjoinments_details: segment.contourLegalityAdjoinmentsDetailsString,\n    thermal_expansion_gap_exceeding_bonding_jumper_limit: segment.thermalExpansionGapExceedingBondingJumperLimit,\n    contours_lat_lngs: segment.contoursLatLngsString,\n    contours_cartesian_points: segment.contoursCartesianPointsString,\n    contours_details: segment.contourDetailsString,\n  };\n\n  if (includeZonesAndModulePositions) {\n    data.zones_and_module_positions = segment.buildZonesAndModulePositions;\n  }\n\n  return data;\n}\n\nconst SegmentModel = types.compose(SegmentModelBase, WithDirtyTracking);\nexport default SegmentModel;\n", "import { types, detach, getSnapshot } from \"mobx-state-tree\";\n\nimport { logger } from \"../../helpers/logger\";\n\nimport DaRoofSectionModel from \"../../da/models/roof-section-model\";\nimport SegmentModel, { ATTACHMENT_PLAN_STATUS_LEGAL, segmentPersistenceData } from \"./segment-model\";\nimport WithCartesianPoints from \"../../da/models/with-cartesian-points\";\nimport sumBy from \"lodash/sumBy\";\nimport LatLngModel from \"../../da/models/lat-lng-model\";\nimport { pointsForSave } from \"../../da/models/points-utilities\";\n\nconst RoofSectionBase = types\n  .model(\"RoofSectionModel\", {\n    custom: types.boolean,\n    active: types.boolean,\n    segments: types.array(SegmentModel),\n    defaultLatLngPoints: types.array(LatLngModel),\n  })\n  .views((self) => ({\n    get railedParentSegments() {\n      return self.segments.filter((s) => s.railed);\n    },\n    get displayIdentifier() {\n      let prefix = \"\";\n      if (!self.active) prefix = \"Inactive-\";\n      if (self.deleted) prefix = \"Deleted-\";\n\n      return `${prefix}${self.roofPlane.identifier}${self.identifier}`;\n    },\n    get displayable() {\n      return !self.deleted && self.active && self.display;\n    },\n    get needsSave() {\n      const anySegmentsNeedsSave = self.segments.some((rs) => rs.needsSave);\n      return self.dirty || !self.id || anySegmentsNeedsSave;\n    },\n    get activeRailedParentSegments() {\n      return self.segments.filter((s) => s.railed && !s.deleted);\n    },\n    get temporarySegments() {\n      return self.segments.filter((s) => s.temporary);\n    },\n    get notDeletedSegments() {\n      return self.segments.filter((s) => !s.deleted);\n    },\n    get panelsCount() {\n      return sumBy(self.notDeletedSegments, \"panelsCount\");\n    },\n    get defaultLatLngPointsToArray() {\n      return self.defaultLatLngPoints.map((point) => point.toLatLng);\n    },\n    get defaultLatLngPointsToString() {\n      return JSON.stringify(self.defaultLatLngPointsToArray);\n    },\n    get isAttachmentPlanStatusLegal() {\n      return self.segments.every((s) => s.isAttachmentPlanStatusLegal);\n    },\n  }))\n  .actions((self) => ({\n    flagDeleted() {\n      if (!self.deleted) {\n        self.markDirty();\n        self.deleted = true;\n      }\n    },\n    addSegment(segment) {\n      self.segments.push(segment);\n    },\n    addExistingSegment(segment) {\n      const newSegment = detach(segment);\n      newSegment.clearId();\n      self.addSegment(newSegment);\n      self.markDirty();\n    },\n    deleteSegment(segment) {\n      if (segment.hasUnrailedChildren) {\n        const unrailedChildren = segment.unrailedChildren;\n        const previousFirstChild = unrailedChildren[0];\n        const previousFirstChildDistanceFromRailedParentStart = previousFirstChild.distanceFromRailedParentStart;\n\n        // Make the previous first child the new parent\n        previousFirstChild.setRailed(true);\n        previousFirstChild.setRailedParentUuid(null);\n        previousFirstChild.setDistanceFromRailedParentStart(null);\n        segment.thermalExpansions.forEach((thermalExpansion) => {\n          const thermalExpansionSnapShot = getSnapshot(thermalExpansion);\n          previousFirstChild.addThermalExpansion(thermalExpansionSnapShot);\n        });\n\n        unrailedChildren.forEach((childSegment, i) => {\n          if (i === 0) return;\n\n          // Assign any other children to the new parent\n          childSegment.setRailedParentUuid(previousFirstChild.uuid);\n          childSegment.setDistanceFromRailedParentStart(\n            childSegment.distanceFromRailedParentStart - previousFirstChildDistanceFromRailedParentStart,\n          );\n        });\n      }\n\n      if (segment.id) {\n        segment.flagDeleted();\n      } else {\n        self.segments = self.segments.filter((s) => s.uuid !== segment.uuid);\n      }\n    },\n    reassignSegments(otherRoofSection) {\n      self.segments.forEach((segment) => {\n        otherRoofSection.addExistingSegment(segment);\n      });\n      self.segments = [];\n      self.markDirty();\n      otherRoofSection.markDirty();\n    },\n    detachSegments() {\n      self.segments.forEach((segment) => {\n        detach(segment);\n        segment.clearId();\n      });\n      self.segments = [];\n    },\n    deleteTemporarySegments() {\n      self.temporarySegments.forEach((segment) => {\n        self.deleteSegment(segment);\n      });\n    },\n    setDefaultLatLngPoints(newPoints) {\n      const oldDefaultLatLngPointsString = JSON.stringify(self.defaultLatLngPoints);\n      const newDefaultLatLngPointsString = JSON.stringify(newPoints);\n      if (oldDefaultLatLngPointsString === newDefaultLatLngPointsString) return;\n\n      self.markDirty();\n      self.defaultLatLngPoints = newPoints;\n    },\n  }));\n\nexport function roofSectionPersistenceData(roofSection, includeZonesAndModulePositions) {\n  logger(`Persisting Roof Section ${roofSection.displayIdentifier}`);\n\n  if (!roofSection.needsSave) {\n    logger(\"--!needsSave. Skipping.\");\n    return undefined;\n  }\n\n  const latLngPoints = pointsForSave(roofSection, \"latLngPoints\");\n\n  const data = {\n    pr_roof_plane_id: roofSection.roofPlane.id,\n    // TODO: [PRIB] remove this when you update the system to use the new hierarchy of roof sections belonging to roof planes\n    project_id: roofSection.roofPlane.project.id,\n    uuid: roofSection.uuid,\n    id: roofSection.id,\n    identifier: roofSection.identifier,\n    custom: roofSection.custom,\n    active: roofSection.active,\n    illegal_shape: roofSection.illegalShape,\n    lat_lng_points: latLngPoints,\n    cartesian_points: roofSection.cartesianPointsToString,\n    encroaching: roofSection.encroaching,\n    _destroy: roofSection.deleted,\n    segments_attributes: roofSection.segments.map((segment) =>\n      segmentPersistenceData(segment, includeZonesAndModulePositions),\n    ),\n  };\n\n  if (!roofSection.id) {\n    data.default_lat_lng_points = roofSection.defaultLatLngPointsToString;\n  }\n\n  return data;\n}\n\nconst RoofSectionModel = types.compose(DaRoofSectionModel, RoofSectionBase, WithCartesianPoints);\nexport default RoofSectionModel;\n", "import { types } from \"mobx-state-tree\";\n\nimport LatLngModel from \"../../da/models/lat-lng-model\";\nimport WithDirtyTracking from \"../../da/models/with-dirty-tracking\";\n\nconst DetailModelBase = types\n  .model(\"DetailModel\", {\n    id: types.maybe(types.integer),\n    originLatLng: types.maybeNull(LatLngModel),\n    roofShape: types.string,\n    roofAttachment: types.string,\n    staggeredAttachments: types.boolean,\n    thirdRail: types.boolean,\n  })\n  .views((self) => ({\n    get needsSave() {\n      return self.dirty;\n    },\n    get isDeckAttached() {\n      return self.roofAttachment === \"fra\" || self.roofAttachment === \"qm_hug_d\";\n    },\n  }))\n  .actions((self) => ({\n    setOriginLatLng(newOriginLatLng) {\n      if (!originLatLngValuesMatch(self.originLatLng, newOriginLatLng)) self.markDirty();\n      self.originLatLng = newOriginLatLng;\n    },\n    setStaggeredAttachments(newStaggeredAttachments) {\n      if (self.staggeredAttachments !== newStaggeredAttachments) self.markDirty();\n      self.staggeredAttachments = newStaggeredAttachments;\n    },\n  }));\n\nfunction originLatLngValuesMatch(currentOriginLatLng, newOriginLatLng) {\n  if (currentOriginLatLng === null || newOriginLatLng === null) {\n    return currentOriginLatLng === newOriginLatLng;\n  }\n\n  return currentOriginLatLng.lat === newOriginLatLng.lat && currentOriginLatLng.lng === newOriginLatLng.lng;\n}\n\nexport function detailPersistenceData(detail) {\n  return {\n    id: detail.id,\n    origin_lat_lng: detail.originLatLng?.toLatLngString || null,\n    staggered_attachments: detail.staggeredAttachments,\n  };\n}\n\nconst DetailModel = types.compose(DetailModelBase, WithDirtyTracking);\nexport default DetailModel;\n", "import { Point, LineString } from \"ol/geom\";\nimport { Fill, Stroke, Style } from \"ol/style\";\nimport CircleStyle from \"ol/style/Circle\";\n\nconst COLOR_DRAWING = \"rgba(241, 0, 200, 0.5)\";\nconst COLOR_FINAL = \"rgba(241, 0, 200, 1.0)\";\n\nconst strokeDrawing = new Stroke({ color: COLOR_DRAWING, width: 3 });\nconst fillDrawing = new Fill({ color: COLOR_DRAWING });\nconst circleDrawing = new CircleStyle({ radius: 5, fill: fillDrawing, stroke: strokeDrawing });\n\nconst strokeFinal = new Stroke({ color: COLOR_FINAL, width: 3 });\n\nfunction createEndCapLine(lineGeometry, resolution, whichEnd, offsetPx) {\n  const coords = lineGeometry.getCoordinates();\n  if (coords.length < 2) return null;\n\n  let i1, i2;\n  if (whichEnd === \"last\") {\n    i1 = coords.length - 2;\n    i2 = coords.length - 1;\n  } else {\n    i1 = 1;\n    i2 = 0;\n  }\n\n  const [x1, y1] = coords[i1];\n  const [x2, y2] = coords[i2];\n\n  const dx = x2 - x1;\n  const dy = y2 - y1;\n  const length = Math.sqrt(dx * dx + dy * dy);\n  if (!length) return null;\n\n  let nx = -dy / length;\n  let ny = dx / length;\n\n  const offsetMapUnits = offsetPx * resolution;\n  const xEnd = x2;\n  const yEnd = y2;\n\n  const p1 = [xEnd + nx * offsetMapUnits, yEnd + ny * offsetMapUnits];\n  const p2 = [xEnd - nx * offsetMapUnits, yEnd - ny * offsetMapUnits];\n\n  return new LineString([p1, p2]);\n}\n\nexport function scaleLineStyle(type) {\n  if (type === \"drawing\") {\n    return scaleLineDrawingStyle;\n  } else if (type === \"final\") {\n    return scaleLineFinalStyle;\n  }\n}\n\nfunction scaleLineDrawingStyle(feature, resolution) {\n  const geometry = feature.getGeometry();\n  const type = geometry.getType();\n  const styles = [];\n\n  if (type === \"LineString\") {\n    styles.push(new Style({ stroke: strokeDrawing }));\n\n    const coords = geometry.getCoordinates();\n    if (coords.length > 1) {\n      styles.push(\n        new Style({\n          geometry: new Point(coords[0]),\n          image: circleDrawing,\n        }),\n      );\n      styles.push(\n        new Style({\n          geometry: (f) => createEndCapLine(f.getGeometry(), resolution, \"last\", 10),\n          stroke: strokeDrawing,\n        }),\n      );\n      styles.push(\n        new Style({\n          geometry: new Point(coords[coords.length - 1]),\n          image: circleDrawing,\n        }),\n      );\n    }\n  } else if (type === \"Point\") {\n    styles.push(new Style({ image: circleDrawing }));\n  }\n\n  return styles;\n}\n\nfunction scaleLineFinalStyle(feature, resolution) {\n  const geometry = feature.getGeometry();\n  const type = geometry.getType();\n  const styles = [];\n\n  if (type === \"LineString\") {\n    styles.push(new Style({ stroke: strokeFinal }));\n\n    styles.push(\n      new Style({\n        geometry: (f) => createEndCapLine(f.getGeometry(), resolution, \"first\", 6),\n        stroke: strokeFinal,\n      }),\n    );\n\n    styles.push(\n      new Style({\n        geometry: (f) => createEndCapLine(f.getGeometry(), resolution, \"last\", 6),\n        stroke: strokeFinal,\n      }),\n    );\n  }\n\n  return styles;\n}\n", "import VectorSource from \"ol/source/Vector\";\nimport VectorLayer from \"ol/layer/Vector\";\n\nimport { SCALE_LINE_DATA_TYPE } from \"../data-types\";\nimport MapManager from \"../map-manager\";\nimport { scaleLineStyle } from \"../styles/scale-line\";\n\nexport default class ScaleBuildingImageMapManager extends MapManager {\n  constructor(controller) {\n    super(controller);\n  }\n\n  rotateCompassTo(_radians) {\n    // Overriding this method to do nothing.  We don't have a compass on this map.\n  }\n\n  add() {\n    const mapParams = {\n      layers: [this.tileLayer, this.visualMarkersVectorLayer, this.scaleLinesVectorLayer],\n    };\n\n    this.map = this.buildMap(mapParams);\n\n    this.rotateTo(0); // For this map we don't care about the project map rotation.\n\n    this.addBuildingImagePlacementLayers();\n  }\n\n  get scaleLinesVectorLayer() {\n    if (!this.memoScaleLinesVectorLayer) {\n      this.scaleLinesVectorSource = new VectorSource();\n\n      this.memoScaleLinesVectorLayer = new VectorLayer({\n        source: this.scaleLinesVectorSource,\n        style: scaleLineStyle(\"final\"),\n        zIndex: 10,\n      });\n      this.memoScaleLinesVectorLayer.set(\"dataType\", SCALE_LINE_DATA_TYPE);\n    }\n    return this.memoScaleLinesVectorLayer;\n  }\n\n  clearScaleLines() {\n    this.scaleLinesVectorSource.clear();\n  }\n}\n", "import { Draw } from \"ol/interaction\";\n\nimport { scaleLineStyle } from \"../../styles/scale-line\";\nimport { SCALE_LINE_DATA_TYPE } from \"../../data-types\";\nimport { constraintGeometryFunction, withConstraintMixin } from \"../helpers/constraint\";\n\nexport default class Base {\n  constructor(controller) {\n    this.controller = controller;\n    this.mapManager = controller.mapManager;\n    this.map = this.mapManager.map;\n    this.scaleLinesVectorSource = this.mapManager.scaleLinesVectorSource;\n\n    this.initConstraint();\n  }\n\n  add() {\n    if (this.currentScaleLineInteraction) return;\n\n    this.attachConstraintListeners();\n    this.clearCurrentInteraction();\n\n    this.currentScaleLineInteraction = new Draw({\n      source: this.scaleLinesVectorSource,\n      type: \"LineString\",\n      maxPoints: 2,\n      style: scaleLineStyle(\"drawing\"),\n      geometryFunction: (coordinates, geometry) =>\n        constraintGeometryFunction(coordinates, geometry, this.map, this.constrainPressed, \"LineString\"),\n    });\n    this.map.addInteraction(this.currentScaleLineInteraction);\n    this.currentScaleLineInteraction.on(\"drawstart\", this.onDrawStart);\n    this.currentScaleLineInteraction.on(\"drawend\", this.onDrawEnd);\n  }\n\n  remove() {\n    if (!this.currentScaleLineInteraction) return;\n\n    this.detachConstraintListeners();\n    this.clearCurrentInteraction();\n  }\n\n  clearCurrentInteraction() {\n    if (this.currentScaleLineInteraction) {\n      this.map.removeInteraction(this.currentScaleLineInteraction);\n      delete this.currentScaleLineInteraction;\n      this.currentScaleLineInteraction = undefined;\n    }\n  }\n\n  onDrawStart = (_event) => {\n    this.clearOutLastFeature();\n  };\n\n  onDrawEnd = (event) => {\n    const scaleLineFeature = event.feature;\n    scaleLineFeature.set(\"dataType\", SCALE_LINE_DATA_TYPE);\n  };\n\n  finish() {\n    if (!this.currentScaleLineInteraction) return;\n\n    this.currentScaleLineInteraction.finishDrawing();\n    this.clearOutLastFeature();\n  }\n\n  clearOutLastFeature() {\n    const drawingSource = this.mapManager.scaleLinesVectorSource;\n    const features = drawingSource.getFeatures();\n    const lastFeature = features[features.length - 1];\n    drawingSource.removeFeature(lastFeature);\n  }\n}\n\nObject.assign(Base.prototype, withConstraintMixin);\n", "import { mercatorAdjustedLengthInMeters } from \"../../ol-helpers\";\n\nexport default class DrawnLine {\n  constructor(controller) {\n    this.controller = controller;\n    this.mapManager = controller.mapManager;\n    this.map = this.mapManager.map;\n    this.buildingImageFeature = controller.buildingImageFeature;\n    this.linesVectorSource = this.mapManager.scaleLinesVectorSource;\n    const uuid = this.buildingImageFeature.get(\"uuid\");\n    this.placement = this.controller.project.getBuildingImagePlacement(uuid);\n  }\n\n  get exists() {\n    return this.lineFeatures.length > 0;\n  }\n\n  get lineFeatures() {\n    return this.linesVectorSource.getFeatures();\n  }\n\n  get feature() {\n    return this.lineFeatures[0];\n  }\n\n  get coordinates() {\n    return this.feature.getGeometry().getCoordinates();\n  }\n\n  get lengthMeters() {\n    const rawLength = this.feature.getGeometry().getLength();\n    return mercatorAdjustedLengthInMeters(this.map, rawLength);\n  }\n\n  get lengthFeet() {\n    return this.lengthMeters * METERS_TO_FEET;\n  }\n\n  get enteredLengthFeet() {\n    return this.controller.lineLength;\n  }\n\n  get buildingImageMetersPerPixel() {\n    const polygonCoordinates = this.buildingImageFeature.getGeometry().getCoordinates();\n    const ring = polygonCoordinates[0];\n\n    const [x0, y0] = ring[0];\n    const [x1, y1] = ring[1];\n\n    const dx = x1 - x0;\n    const dy = y1 - y0;\n\n    const rawWidthMeters = Math.sqrt(dx * dx + dy * dy);\n    const adjustedWidthMeters = mercatorAdjustedLengthInMeters(this.map, rawWidthMeters);\n    const imageWidthPixels = this.placement.width;\n\n    return adjustedWidthMeters / imageWidthPixels;\n  }\n\n  get lengthInOriginalPixels() {\n    if (!this.exists) return 0;\n\n    return this.lengthMeters / this.buildingImageMetersPerPixel;\n  }\n\n  get feetPerPixel() {\n    if (!this.exists || !this.enteredLengthFeet) return null;\n\n    return this.enteredLengthFeet / this.lengthInOriginalPixels;\n  }\n}\n", "import MapBaseController from \"./map_base_controller\";\n\nimport BxProjectModel from \"../../../bx/models/project-model\";\nimport PrProjectModel from \"../../../pr/models/project-model\";\n\nimport { showDialog, hideDialog } from \"../../components/ir_dialog/helper\";\n\nimport ScaleBuildingImageMapManager from \"../../../da/map/map-managers/scale-building-image\";\nimport MapModelSynchronizer from \"../../../da/map/map-model-synchronizer\";\nimport BuildingImagePlacementCreator from \"../../../da/map/building-images/placement-creator\";\nimport ScaleLineInteractionManager from \"../../../da/map/interaction-managers/scale-line/base\";\nimport DrawnLine from \"../../../da/map/interaction-managers/scale-line/drawn-line\";\n\nimport { EDITOR_MODE_DRAW } from \"../../../da/layout-editor/helpers/toolbar-constants\";\nimport AlertErrorManager from \"../../../helpers/alert-error-manager\";\n\nexport default class extends MapBaseController {\n  static targets = [\"map\", \"doNotScaleImage\", \"form\", \"errorMessage\", \"tabsContainer\"];\n\n  static outlets = [\"da--layout-editor--manual-scale-building-image\"];\n\n  static values = {\n    projectType: String,\n  };\n\n  // This is used in a dialog, which is rendered in the DOM and then moved to be a child of the\n  // body element, which results in a double connect.  We only want to connect this controller\n  // once, so we use this flag to check if we've already connected.\n  connectedOnce = false;\n\n  connect() {\n    if (!this.connectedOnce) {\n      this.connectedOnce = true;\n      return;\n    }\n\n    this.suppressGlobalCreation = true;\n\n    super.connect();\n\n    if (this.projectTypeValue === \"bx\") {\n      this.project = BxProjectModel.create(this.projectData);\n    } else if (this.projectTypeValue === \"pr\") {\n      this.project = PrProjectModel.create(this.projectData);\n    }\n\n    this.mapModelSynchronizer = new MapModelSynchronizer(this);\n\n    this.mapManager = new ScaleBuildingImageMapManager(this);\n    this.mapManager.add();\n\n    this.scaleLineInteractionManager = new ScaleLineInteractionManager(this);\n\n    this.editorMode = EDITOR_MODE_DRAW;\n    this.initializeEditorMode();\n\n    this.element.mapController = this;\n    window.scaleMapController = this;\n\n    document.addEventListener(\"keydown\", this.handleKeydown);\n  }\n\n  disconnect() {\n    document.removeEventListener(\"keydown\", this.handleKeydown);\n    if (this.scaleLineInteractionManager) {\n      this.scaleLineInteractionManager.remove();\n    }\n  }\n\n  openWithImageData(imageData, mapController) {\n    this.imageData = imageData;\n\n    this.mapController = mapController;\n\n    this.doNotScaleImageTarget.src = imageData.imagePath;\n\n    this.setInitialTab();\n\n    this.daLayoutEditorManualScaleBuildingImageOutlet.setImage(imageData);\n    this.daLayoutEditorManualScaleBuildingImageOutlet.clearFields();\n\n    this.clearOutPreviousBuildingImage();\n\n    this.mapManager.clearScaleLines();\n    this.clearEnteredLineLength();\n\n    this.addNewImageToDataModelAndMap();\n\n    this.openDialog();\n\n    // We need to wait for the map to render before we do this\n    setTimeout(() => {\n      const view = this.mapManager.map.getView();\n      const feature = this.mapManager.buildingImagePlacementFeatures[0];\n      const fitGeometry = feature.getGeometry();\n\n      const size = this.mapManager.map.getSize();\n      const padding = [30, 30, 30, 30];\n\n      view.fit(fitGeometry, { padding, size, constrainResolution: false });\n    }, 500);\n  }\n\n  openDialog() {\n    // Make the dialog appear at the top middle of the browser window\n    const clickPosition = { x: window.innerWidth / 2, y: 0 };\n    showDialog(this.dialog, () => {}, { clickPosition, showNearClickPosition: true });\n  }\n\n  setInitialTab() {\n    this.tabsContainerTarget.tabsController.setTabWithValueToActive(\"line-scale\");\n  }\n\n  clearOutPreviousBuildingImage() {\n    if (this.buildingImagePlacement) {\n      this.mapManager.removeBuildingImagePlacementFromMap(this.buildingImagePlacement.uuid);\n      this.project.destroyBuildingImagePlacement(this.buildingImagePlacement.uuid);\n    }\n  }\n\n  addNewImageToDataModelAndMap() {\n    const creator = new BuildingImagePlacementCreator(\n      this.mapManager,\n      this.imageData.imagePath,\n      this.imageData.uploadedBuildingImageId,\n      this.imageData.width,\n      this.imageData.height,\n    );\n    this.buildingImagePlacement = creator.create();\n    this.buildingImageFeature = this.mapManager.addBuildingImagePlacementToMap(this.buildingImagePlacement);\n  }\n\n  initializeEditorMode() {\n    switch (this.editorMode) {\n      case EDITOR_MODE_DRAW:\n        this.startDrawMode();\n        break;\n      default:\n        this.startDrawMode();\n    }\n  }\n\n  startDrawMode(_event) {\n    this.editorMode = EDITOR_MODE_DRAW;\n    this.scaleLineInteractionManager.add();\n  }\n\n  handleKeydown = (event) => {\n    if (event.key === \"Escape\") {\n      this.scaleLineInteractionManager.finish();\n    }\n  };\n\n  addScaledToMap(event) {\n    event.preventDefault();\n\n    const drawnLine = new DrawnLine(this);\n    if (!this.isValid(drawnLine)) return;\n\n    const feetPerPixel = drawnLine.feetPerPixel;\n    const imageData = { ...this.imageData, feetPerPixel };\n    this.createPlacement(imageData);\n  }\n\n  addManualScaledToMap(feetPerPixel) {\n    const imageData = { ...this.imageData, feetPerPixel };\n    this.createPlacement(imageData);\n  }\n\n  addUnscaledToMap(event) {\n    event.preventDefault();\n    this.createPlacement(this.imageData);\n  }\n\n  createPlacement(data) {\n    this.mapController.createBuildingImagePlacement(data);\n    hideDialog(this.dialog);\n  }\n\n  isValid(drawnLine) {\n    const errors = new AlertErrorManager(this.errorMessageTarget);\n\n    if (!drawnLine.exists) {\n      errors.add(\"Please draw a line on the image\");\n    }\n\n    if (!this.hasLineLength) {\n      errors.add(\"Please enter a line length\");\n    }\n\n    errors.showHide();\n\n    return errors.empty;\n  }\n\n  get hasLine() {\n    return false;\n  }\n\n  get lineLength() {\n    return this.lineLengthField.value;\n  }\n\n  get lineLengthField() {\n    return this.formTarget.querySelector(\"input[name='da_scaled_building_image[length]']\");\n  }\n\n  clearEnteredLineLength() {\n    this.lineLengthField.value = \"\";\n  }\n\n  get hasLineLength() {\n    return this.lineLength !== \"\" && this.lineLength != 0;\n  }\n\n  get dialog() {\n    return document.querySelector(`[data-dialog-identifier=\"scale-building-image-dialog\"]`);\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\n\nimport LayoutEditorSettings, {\n  SETTINGS,\n  SETTINGS_EVENT,\n  SHOW_SHAPE_GUIDE_LINES_OPTIONS,\n  SNAP_DISTANCE_OPTIONS,\n} from \"../../../da/layout-editor/settings\";\nimport * as animate from \"../../../helpers/animate\";\nimport { elementInfo, isVisible, pointOverlapsElement } from \"../../../helpers/app\";\nimport * as toolbarBtn from \"../../../da/layout-editor/helpers/toolbar-btns\";\n\nexport default class extends Controller {\n  static targets = [\n    \"menu\",\n    \"button\",\n    \"showShapeGuideLinesSelect\",\n    \"showShapeGuideLinesForRoofPlanesCheckbox\",\n    \"showShapeGuideLinesForRoofSectionsCheckbox\",\n    \"showShapeGuideLinesForObstructionsCheckbox\",\n    \"showShapeGuideLinesForMeasuresCheckbox\",\n    \"showShapeGuideLinesCheckboxesContainer\",\n    \"snapDistanceSelect\",\n  ];\n\n  settings = new LayoutEditorSettings();\n\n  connect() {\n    this.#initializeGuideLinesSelect();\n    this.#initializeCheckboxes();\n    this.#initializeSnapDistanceSelect();\n    this.#toggleCheckboxPillsVisibility();\n    document.body.addEventListener(\"click\", this.#handleBodyClick.bind(this));\n    window.addEventListener(\"resize\", this.#handleResize.bind(this));\n  }\n\n  disconnect() {\n    document.body.removeEventListener(\"click\", this.#handleBodyClick.bind(this));\n    window.removeEventListener(\"resize\", this.#handleResize.bind(this));\n  }\n\n  toggle(event) {\n    event.preventDefault();\n    event.stopPropagation();\n\n    if (isVisible(this.menuTarget)) {\n      this.#hideMenu();\n    } else {\n      this.#positionMenu();\n      this.#showMenu();\n    }\n  }\n\n  hide(event) {\n    event.preventDefault();\n    this.#hideMenu();\n  }\n\n  handleShowShapeGuideLinesChange(event) {\n    const value = event.target.value;\n    const change = {\n      setting: SETTINGS.SHOW_SHAPE_GUIDE_LINES,\n      from: this.settings.showShapeGuideLines,\n      to: value,\n    };\n    this.settings.showShapeGuideLines = value;\n    this.#dispatchSettingChangedEvent(change);\n    this.#toggleCheckboxPillsVisibility();\n  }\n\n  handleShowShapeGuideLinesForRoofPlanesChange(event) {\n    const value = event.target.checked;\n    const change = {\n      setting: SETTINGS.SHOW_SHAPE_GUIDE_LINES_FOR_ROOF_PLANES,\n      from: this.settings.showShapeGuideLinesForRoofPlanes,\n      to: value,\n    };\n    this.settings.showShapeGuideLinesForRoofPlanes = value;\n    this.#dispatchSettingChangedEvent(change);\n  }\n\n  handleShowShapeGuideLinesForRoofSectionsChange(event) {\n    const value = event.target.checked;\n    const change = {\n      setting: SETTINGS.SHOW_SHAPE_GUIDE_LINES_FOR_ROOF_SECTIONS,\n      from: this.settings.showShapeGuideLinesForRoofSections,\n      to: value,\n    };\n    this.settings.showShapeGuideLinesForRoofSections = value;\n    this.#dispatchSettingChangedEvent(change);\n  }\n\n  handleShowShapeGuideLinesForObstructionsChange(event) {\n    const value = event.target.checked;\n    const change = {\n      setting: SETTINGS.SHOW_SHAPE_GUIDE_LINES_FOR_OBSTRUCTIONS,\n      from: this.settings.showShapeGuideLinesForObstructions,\n      to: value,\n    };\n    this.settings.showShapeGuideLinesForObstructions = value;\n    this.#dispatchSettingChangedEvent(change);\n  }\n\n  handleShowShapeGuideLinesForMeasuresChange(event) {\n    const value = event.target.checked;\n    const change = {\n      setting: SETTINGS.SHOW_SHAPE_GUIDE_LINES_FOR_MEASURES,\n      from: this.settings.showShapeGuideLinesForMeasures,\n      to: value,\n    };\n    this.settings.showShapeGuideLinesForMeasures = value;\n    this.#dispatchSettingChangedEvent(change);\n  }\n\n  handleSnapDistanceChange(event) {\n    const value = parseInt(event.target.value, 10);\n    const change = {\n      setting: SETTINGS.SNAP_DISTANCE,\n      from: this.settings.snapDistance,\n      to: value,\n    };\n    this.settings.snapDistance = value;\n    this.#dispatchSettingChangedEvent(change);\n  }\n\n  #hideMenu() {\n    animate.hide(this.menuTarget, { duration: 150 });\n    toolbarBtn.deactivate(this.buttonTarget);\n  }\n\n  #showMenu() {\n    animate.show(this.menuTarget, { duration: 200 });\n    toolbarBtn.activate(this.buttonTarget);\n  }\n\n  #toggleCheckboxPillsVisibility() {\n    const showShapeGuideLines = this.settings.showShapeGuideLines;\n    if (showShapeGuideLines === SHOW_SHAPE_GUIDE_LINES_OPTIONS.NEVER) {\n      if (isVisible(this.showShapeGuideLinesCheckboxesContainerTarget)) {\n        animate.hide(this.showShapeGuideLinesCheckboxesContainerTarget, { duration: 200 });\n      }\n    } else {\n      if (!isVisible(this.showShapeGuideLinesCheckboxesContainerTarget)) {\n        animate.show(this.showShapeGuideLinesCheckboxesContainerTarget, {\n          duration: 250,\n          display: \"flex\",\n        });\n      }\n    }\n  }\n\n  #handleBodyClick = (event) => {\n    if (!isVisible(this.menuTarget)) return;\n\n    const { clientX: x, clientY: y } = event;\n\n    const clickedOnMenu = pointOverlapsElement({ x, y, element: this.menuTarget });\n    const clickedOnButton = pointOverlapsElement({ x, y, element: this.buttonTarget });\n\n    if (!clickedOnMenu && !clickedOnButton) this.hide(event);\n  };\n\n  #positionMenu() {\n    const buttonInfo = elementInfo(this.buttonTarget);\n    const containerInfo = elementInfo(this.element);\n\n    const containerStyle = window.getComputedStyle(this.element);\n    const borderRightWidth = parseInt(containerStyle.borderRightWidth, 10) || 0;\n    const borderTopWidth = parseInt(containerStyle.borderTopWidth, 10) || 0;\n\n    const pixelOffset = 10; // Same padding as between toolbar buttons\n    const minLeftPadding = 15; // Same padding as other vertical toolbar buttons\n    const topOffset = buttonInfo.bottom - containerInfo.top + pixelOffset - borderTopWidth;\n\n    const menuWidth = this.#getMenuWidthOffScreen();\n\n    const expectedLeftPosition = buttonInfo.right - menuWidth;\n\n    this.menuTarget.style.top = `${topOffset}px`;\n\n    const hasEnoughSpaceOnLeft = expectedLeftPosition > containerInfo.left + minLeftPadding;\n    if (!hasEnoughSpaceOnLeft) {\n      this.menuTarget.style.left = `${minLeftPadding}px`;\n      this.menuTarget.style.right = \"auto\";\n    } else {\n      const rightOffset = containerInfo.right - buttonInfo.right - borderRightWidth;\n      this.menuTarget.style.right = `${rightOffset}px`;\n      this.menuTarget.style.left = \"auto\";\n    }\n  }\n\n  #dispatchSettingChangedEvent(change) {\n    const customEvent = new CustomEvent(SETTINGS_EVENT.CHANGED, {\n      bubbles: true,\n      detail: { change },\n    });\n    document.dispatchEvent(customEvent);\n  }\n\n  #initializeGuideLinesSelect() {\n    const savedValue = this.settings.showShapeGuideLines;\n    if (this.hasShowShapeGuideLinesSelectTarget) {\n      this.showShapeGuideLinesSelectTarget.value = savedValue;\n    }\n  }\n\n  #initializeCheckboxes() {\n    if (this.hasShowShapeGuideLinesForRoofPlanesCheckboxTarget) {\n      this.showShapeGuideLinesForRoofPlanesCheckboxTarget.checked = this.settings.showShapeGuideLinesForRoofPlanes;\n    }\n\n    if (this.hasShowShapeGuideLinesForRoofSectionsCheckboxTarget) {\n      this.showShapeGuideLinesForRoofSectionsCheckboxTarget.checked = this.settings.showShapeGuideLinesForRoofSections;\n    }\n\n    if (this.hasShowShapeGuideLinesForObstructionsCheckboxTarget) {\n      this.showShapeGuideLinesForObstructionsCheckboxTarget.checked = this.settings.showShapeGuideLinesForObstructions;\n    }\n\n    if (this.hasShowShapeGuideLinesForMeasuresCheckboxTarget) {\n      this.showShapeGuideLinesForMeasuresCheckboxTarget.checked = this.settings.showShapeGuideLinesForMeasures;\n    }\n  }\n\n  #initializeSnapDistanceSelect() {\n    if (!this.hasSnapDistanceSelectTarget) return;\n\n    const select = this.snapDistanceSelectTarget;\n    const currentValue = this.settings.snapDistance;\n\n    Object.entries(SNAP_DISTANCE_OPTIONS).forEach(([name, value]) => {\n      const option = document.createElement(\"option\");\n      option.value = value;\n      const label = name.toLowerCase();\n      option.textContent = `${value} pixels (${label})`;\n      if (value === currentValue) option.selected = true;\n      select.appendChild(option);\n    });\n  }\n\n  #handleResize = () => {\n    if (isVisible(this.menuTarget)) {\n      this.#hideMenu();\n    }\n  };\n\n  // The width of the menu is not fixed, so we need to measure it. However, we need\n  // to make the menu visible to do this, and we don't want to show the menu yet, so\n  // we position it off screen, show it, measure it, and then hide it again.\n  #getMenuWidthOffScreen() {\n    this.menuTarget.style.left = \"-9999px\";\n    this.menuTarget.style.right = \"auto\";\n    this.menuTarget.style.display = \"block\";\n\n    const menuWidth = this.menuTarget.offsetWidth;\n\n    this.menuTarget.style.display = \"none\";\n\n    return menuWidth;\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport { destroy } from \"@rails/request.js\";\n\nimport { hideDialog } from \"../../../controllers/components/ir_dialog/helper\";\n\nexport default class extends Controller {\n  static values = {\n    deletePath: String,\n    imagePath: String,\n    id: Number,\n    width: Number,\n    height: Number,\n    dpi: Number,\n    dialogIdentifier: String,\n  };\n\n  static outlets = [\"da--layout-editor--scale-building-image\"];\n\n  place(event) {\n    event.preventDefault();\n\n    const imageData = {\n      imagePath: this.imagePathValue,\n      uploadedBuildingImageId: this.idValue,\n      width: this.widthValue,\n      height: this.heightValue,\n      dpi: this.dpiValue,\n    };\n\n    this.daLayoutEditorScaleBuildingImageOutlet.openWithImageData(imageData, this.mapController);\n\n    hideDialog(this.dialog);\n  }\n\n  // This is better than using an outlet because outlets require a definition tied\n  // to the controller name. We want to use this with both the PR and BX trace roof\n  // planes map controllers. This approach allows us to be more generic and use\n  // this controller in both contexts.\n  get mapController() {\n    return document.querySelector(\"[data-identifier='mapContainer']\").mapController;\n  }\n\n  get dialog() {\n    return document.querySelector(`[data-dialog-identifier=\"${this.dialogIdentifierValue}\"]`);\n  }\n\n  delete(event) {\n    event.preventDefault();\n    event.stopPropagation();\n\n    const deleteLink = event.currentTarget;\n    deleteLink.disabled = true;\n    this.element.classList.add(\"ol-map__building-images__item--deleting\");\n\n    destroy(this.deletePathValue, {\n      responseKind: \"turbo-stream\",\n      headers: { \"X-Tab-Id\": window.sessionStorage.getItem(\"tabId\") },\n    }).then(() => {\n      this.mapController.removeUploadedBuildingImage(this.idValue);\n    });\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport * as animate from \"../../helpers/animate\";\nimport { addOptionsToSelect } from \"../../helpers/form\";\n\nexport default class extends Controller {\n  static values = {\n    ssProfilesToGaugeThickness: Object,\n  };\n\n  static targets = [\n    \"roofInfoContainer\",\n    \"roofAttachmentSelect\",\n    \"roofMaterialSelect\",\n    \"standingSeamDetailContainer\",\n    \"standingSeamGaugeThicknessSelect\",\n    \"standingSeamHeight\",\n    \"standingSeamProfileSelect\",\n    \"standingSeamWidth\",\n    \"defaultRafterSpacingLabel\",\n  ];\n\n  get roofMaterial() {\n    return this.roofMaterialSelectTarget.value;\n  }\n\n  get roofAttachment() {\n    return this.roofAttachmentSelectTarget.value;\n  }\n\n  get standingSeamProfile() {\n    return this.standingSeamProfileSelectTarget.value;\n  }\n\n  get isStandingSeamProfileEmpty() {\n    return this.standingSeamProfile === \"\";\n  }\n\n  changeRoofMaterialFamily() {\n    this.changeRoofMaterial();\n  }\n\n  changeRoofMaterial() {\n    this.changeRoofAttachment();\n  }\n\n  changeRoofAttachment() {\n    this.#toggleLynxFields();\n    this.#changeSpacingLabel();\n  }\n\n  changeStandingSeamProfile() {\n    const gaugeThicknesses = this.isStandingSeamProfileEmpty\n      ? []\n      : this.ssProfilesToGaugeThicknessValue[this.standingSeamProfile];\n    addOptionsToSelect(gaugeThicknesses, this.standingSeamGaugeThicknessSelectTarget, true);\n    this.standingSeamGaugeThicknessSelectTarget.disabled = this.isStandingSeamProfileEmpty;\n  }\n\n  #toggleLynxFields() {\n    const show = this.roofAttachment === \"lynx_ssrc\";\n    if (this.hasStandingSeamDetailContainerTarget) {\n      this.standingSeamDetailContainerTargets.forEach((target) => animate.toggle(target, show));\n\n      this.standingSeamGaugeThicknessSelectTarget.disabled = this.isStandingSeamProfileEmpty;\n\n      if (!show) {\n        this.standingSeamProfileSelectTarget.value = \"\";\n        this.standingSeamGaugeThicknessSelectTarget.value = \"\";\n        this.standingSeamHeightTarget.value = \"\";\n        this.standingSeamWidthTarget.value = \"\";\n      }\n    }\n  }\n\n  #changeSpacingLabel() {\n    const label = this.defaultRafterSpacingLabelTarget.innerHTML.toLowerCase();\n    if (this.roofMaterial === \"metal_standing_seam\") {\n      const newLabel = label.replace(\"rafter\", \"standing seam\");\n      this.defaultRafterSpacingLabelTarget.innerHTML = newLabel[0].toUpperCase() + newLabel.slice(1);\n    } else {\n      const newLabel = label.replace(\"standing seam\", \"rafter\");\n      this.defaultRafterSpacingLabelTarget.innerHTML = newLabel[0].toUpperCase() + newLabel.slice(1);\n    }\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport * as animate from \"../../helpers/animate\";\nimport { addOptionsToSelect } from \"../../helpers/form\";\n\nexport default class extends Controller {\n  static values = {\n    membranesAvailableFor: Object,\n    materialToManufacturers: Object,\n  };\n\n  static targets = [\n    \"roofInfoContainer\",\n    \"roofManufacturerSelect\",\n    \"roofManufacturerContainer\",\n    \"thicknessSelect\",\n    \"thicknessContainer\",\n    \"colorSelect\",\n    \"colorContainer\",\n    \"roofAttachmentSelect\",\n    \"roofMaterialSelect\",\n  ];\n\n  get roofMaterial() {\n    return this.roofMaterialSelectTarget.value;\n  }\n\n  get isMembraneAvailable() {\n    return this.membranesAvailableForValue[this.roofMaterial];\n  }\n\n  get roofAttachment() {\n    return this.roofAttachmentSelectTarget.value;\n  }\n\n  toggleRoofingInformation(event) {\n    const val = event.currentTarget.value;\n    const meth = val === \"true\" ? \"show\" : \"hide\";\n    animate[meth](this.roofInfoContainerTarget);\n    if (val !== \"true\") {\n      this.roofMaterialSelectTarget.value = \"\";\n    }\n  }\n\n  changeRoofMaterialFamily() {\n    this.#toggleMembraneFields(false);\n  }\n\n  changeRoofMaterial(event) {\n    const select = event.currentTarget;\n    const manufacturerMaterials = this.roofMaterial === \"\" ? [] : this.materialToManufacturersValue[this.roofMaterial];\n\n    // addOptionsToSelect wants triples where the third argument is disabled\n    if (manufacturerMaterials) {\n      const manufacturerMaterialsOptions = manufacturerMaterials.map((mm) => [mm[0], mm[1], false, false]);\n\n      addOptionsToSelect(manufacturerMaterialsOptions, this.roofManufacturerSelectTarget, true);\n    }\n\n    if (this.hasRoofAttachmentSelectTarget) {\n      this.changeRoofAttachment();\n    } else {\n      this.#toggleMembraneFields(this.isMembraneAvailable);\n    }\n  }\n\n  changeRoofAttachment() {\n    const isFra = this.roofAttachment === \"fra\";\n\n    this.#toggleMembraneFields(isFra && this.isMembraneAvailable);\n  }\n\n  #toggleMembraneFields(toggle) {\n    animate.toggle(this.colorContainerTarget, toggle);\n    animate.toggle(this.thicknessContainerTarget, toggle);\n    animate.toggle(this.roofManufacturerContainerTarget, toggle);\n\n    if (!toggle) {\n      this.colorSelectTarget.value = \"\";\n      this.thicknessSelectTarget.value = \"\";\n      this.roofManufacturerSelectTarget.value = \"\";\n    }\n  }\n}\n", "import React from \"react\";\nimport { createRoot } from \"react-dom/client\";\nimport axios from \"axios\";\n\nimport InDialogController from \"../controller_in_dialog\";\nimport ChosenPanelDisplay from \"../../components/PanelPicker/ChosenPanelDisplay\";\nimport PanelPicker from \"../../components/PanelPicker\";\nimport SentryErrorHandler from \"../../components/SentryErrorHandler\";\n\nimport { showDialog, hideDialog } from \"../components/ir_dialog/helper\";\nimport * as api from \"../../helpers/api\";\nimport { TAB_IR, TAB_CP } from \"../../components/PanelPicker/TabNav\";\n\nexport default class extends InDialogController {\n  static targets = [\"manufacturerIdField\", \"panelIdField\", \"selectedPanelContainer\"];\n\n  connect() {\n    if (!this.isOkayToConnect) return;\n\n    this.projectId = this.data.get(\"projectId\");\n    this.projectType = this.data.get(\"projectType\");\n    this.manufacturers = JSON.parse(this.data.get(\"manufacturers\"));\n    this.customPanelsManufacturerId = Number.parseInt(this.data.get(\"customPanelsManufacturerId\"));\n    this.panels = JSON.parse(this.data.get(\"panels\"));\n    this.customPanels = JSON.parse(this.data.get(\"customPanels\"));\n    this.selectedManufacturerId = this.manufacturerIdFromField;\n    this.selectedPanelId = this.panelIdFromField;\n    this.persistedSelectedPanelId = this.panelIdFromField;\n    this.persistedSelectedPanel = this.panels.concat(this.customPanels).find((p) => p.id === this.panelIdFromField);\n    this.manufacturerPanelsCache = {};\n    this.currentUser = JSON.parse(this.data.get(\"currentUser\"));\n    this.projectPanelUser = JSON.parse(this.data.get(\"projectPanelUser\"));\n    this.disabled = this.data.get(\"disabled\") === \"true\";\n    this.enableAllPanels = this.data.get(\"enable-all-panels\") === \"true\";\n    this.idSuffix = this.data.get(\"id-suffix\");\n    this.railPlatform = this.data.get(\"railPlatform\");\n    this.endClamp = this.data.get(\"endClamp\");\n    this.efoAvailable = this.data.get(\"efoAvailable\") === \"true\";\n    this.stopperAvailable = this.data.get(\"stopperAvailable\") === \"true\";\n    this.createdBefore42mmStopperSleeveUfoCutoffDate =\n      this.data.get(\"createdBefore-42mmStopperSleeveUfoCutoffDate\") === \"true\";\n    this.fireRatingCertUrl = this.data.get(\"fireRatingCertUrl\");\n\n    this.panelPickerRoot = null;\n    this.displayRoot = null;\n\n    this.addPanelsToManufacturerPanelsCache(this.selectedManufacturerId, this.panels);\n    this.instantiateChosenPanelDisplay();\n    this.instantiatePanelPicker();\n\n    this.element.controller = this;\n  }\n\n  disconnect() {\n    this.panelPickerComponent = undefined;\n    this.displayComponent = undefined;\n  }\n\n  updateRailPlatform = (railPlatform) => {\n    this.railPlatform = railPlatform;\n    this.data.set(\"railPlatform\", railPlatform);\n    this.panelPickerComponent.setState({ railPlatform });\n    this.displayComponent.setState({ railPlatform });\n\n    if (Number.isNaN(this.selectedPanelId)) return;\n\n    const detailsTabs = document.querySelector(`[data-identifier='panel${this.selectedPanelId}DetailsTabs']`);\n    if (detailsTabs) detailsTabs.tabsController.setTabWithValueToActive(railPlatform);\n  };\n\n  updateEndClamp = (endClamp) => {\n    this.endClamp = endClamp;\n    this.data.set(\"endClamp\", endClamp);\n    this.panelPickerComponent.setState({ endClamp });\n  };\n\n  addPanelsToManufacturerPanelsCache(manufacturerId, panels) {\n    if (!manufacturerId || !panels) return;\n\n    this.manufacturerPanelsCache[manufacturerId] = panels;\n  }\n\n  get manufacturerIdFromField() {\n    return Number.parseInt(this.manufacturerIdFieldTarget.value);\n  }\n\n  get panelIdFromField() {\n    return Number.parseInt(this.panelIdFieldTarget.value);\n  }\n\n  instantiateChosenPanelDisplay() {\n    if (!this.displayRoot) {\n      this.displayRoot = createRoot(this.selectedPanelContainerTarget);\n    }\n\n    this.displayRoot.render(\n      <SentryErrorHandler>\n        <ChosenPanelDisplay\n          ref={(component) => {\n            this.displayComponent = component;\n          }}\n          openPicker={this.openPicker}\n          projectType={this.projectType}\n          manufacturers={this.manufacturers}\n          selectedManufacturerId={this.selectedManufacturerId}\n          panels={this.panels}\n          customPanels={this.customPanels}\n          selectedPanelId={this.selectedPanelId}\n          currentUser={this.currentUser}\n          projectPanelUser={this.projectPanelUser}\n          disabled={this.disabled}\n          projectId={this.projectId}\n          railPlatform={this.railPlatform}\n          efoAvailable={this.efoAvailable}\n          stopperAvailable={this.stopperAvailable}\n          fireRatingCertUrl={this.fireRatingCertUrl}\n        />\n      </SentryErrorHandler>,\n    );\n  }\n\n  openPicker = (event) => {\n    event.preventDefault();\n    if (this.disabled) return;\n\n    this.ensurePanelPickerComponent(() => {\n      this.refreshPanelPickerData();\n      const clickPosition = { x: event.pageX, y: event.pageY };\n      showDialog(\n        this.dialog,\n        () => {\n          this.focusFirstFormElement(this.dialog);\n        },\n        { showNearClickPosition: true, clickPosition },\n      );\n    });\n  };\n\n  focusFirstFormElement(dialog) {\n    const input = dialog.querySelector(\"input[type='text']\");\n    if (!input) return;\n\n    input.focus();\n  }\n\n  updatePanelAndManufacturerSelection = (manufacturerId, panel) => {\n    const panelId = panel.id;\n    const changeEvent = new CustomEvent(\"change\", { bubbles: true });\n\n    const isCustomPanel = !manufacturerId && panel.user_id !== null;\n    this.selectedManufacturerId = isCustomPanel ? this.customPanelsManufacturerId : manufacturerId;\n\n    this.manufacturerIdFieldTarget.value = this.selectedManufacturerId;\n    this.manufacturerIdFieldTarget.dispatchEvent(changeEvent);\n\n    this.selectedPanelId = panelId;\n    this.panelIdFieldTarget.value = panelId;\n    this.panelIdFieldTarget.dispatchEvent(changeEvent);\n\n    this.panels = this.manufacturerPanelsCache[this.selectedManufacturerId];\n\n    hideDialog(this.dialog);\n\n    this.displayComponent.setState({\n      panels: this.panels,\n      selectedPanelId: panelId,\n      manufacturers: this.manufacturers,\n      selectedManufacturerId: manufacturerId,\n    });\n\n    document.querySelector(\".pp__chosen-panel\").focus();\n  };\n\n  retrievePanelsForManufacturer = (selectedManufacturerId) => {\n    this.selectedManufacturerId = selectedManufacturerId;\n\n    const changeEvent = new CustomEvent(\"change\", { bubbles: true });\n    this.manufacturerIdFieldTarget.value = selectedManufacturerId;\n    this.manufacturerIdFieldTarget.dispatchEvent(changeEvent);\n\n    const panelsFromCache = this.manufacturerPanelsCache[selectedManufacturerId];\n    if (panelsFromCache !== undefined) {\n      this.usePanels(panelsFromCache);\n      return;\n    }\n\n    this.panelPickerComponent.setState({ loadingPanels: true });\n\n    axios({\n      method: \"GET\",\n      url: `/manufacturers/${selectedManufacturerId}/panels`,\n      headers: api.defaultHeaders(),\n      params: { product_type: this.projectType },\n    }).then((response) => {\n      this.panelPickerComponent.setState({ loadingPanels: false });\n      const { panels } = response.data;\n      this.usePanels(panels);\n      this.addPanelsToManufacturerPanelsCache(selectedManufacturerId, panels);\n    });\n  };\n\n  usePanels = (panels) => {\n    this.panels = panels;\n\n    this.panelPickerComponent.setState({ panels });\n  };\n\n  ensurePanelPickerComponent(callback) {\n    if (this.panelPickerComponent) {\n      callback();\n      return;\n    }\n\n    this.instantiatePanelPicker();\n\n    setTimeout(() => {\n      callback();\n    }, 100);\n  }\n\n  refreshPanelPickerData() {\n    if (!this.panelPickerComponent) {\n      return this.ensurePanelPickerComponent(() => this.refreshPanelPickerData());\n    }\n\n    let selectedManufacturerId = this.manufacturerIdFromField;\n    let activeTab = TAB_IR;\n    if (selectedManufacturerId === this.customPanelsManufacturerId) {\n      selectedManufacturerId = null;\n      activeTab = TAB_CP;\n    }\n\n    this.panelPickerComponent.setState({\n      panels: this.manufacturerPanelsCache[this.selectedManufacturerId],\n      selectedPanelId: this.panelIdFromField,\n      manufacturers: this.manufacturers,\n      selectedManufacturerId,\n      activeTab,\n      endClamp: this.endClamp,\n    });\n  }\n\n  get dialog() {\n    let dialogId = \"panel-picker-dialog\";\n    if (this.idSuffix) {\n      dialogId += `-${this.idSuffix}`;\n    }\n    return document.querySelector(`[data-dialog-identifier=\"${dialogId}\"]`);\n  }\n\n  instantiatePanelPicker() {\n    const container = document.querySelector(\"[data-identifier='panelPickerContainer']\");\n\n    if (!container) {\n      console.warn(\"Panel picker container not found\");\n      return;\n    }\n\n    if (!this.panelPickerRoot) {\n      this.panelPickerRoot = createRoot(container);\n    }\n\n    this.panelPickerRoot.render(\n      <SentryErrorHandler>\n        <PanelPicker\n          ref={(component) => {\n            this.panelPickerComponent = component;\n          }}\n          projectId={this.projectId}\n          projectType={this.projectType}\n          manufacturers={this.manufacturers}\n          selectedManufacturerId={this.selectedManufacturerId}\n          customPanelsManufacturerId={this.customPanelsManufacturerId}\n          panels={this.panels}\n          selectedPanelId={this.selectedPanelId}\n          persistedSelectedPanel={this.persistedSelectedPanel}\n          endClamp={this.endClamp}\n          panelSelected={this.updatePanelAndManufacturerSelection.bind(this)}\n          hidePanelPickerDialog={() => hideDialog(this.dialog)}\n          retrievePanelsForManufacturer={this.retrievePanelsForManufacturer}\n          customPanels={this.customPanels}\n          currentUser={this.currentUser}\n          projectPanelUser={this.projectPanelUser}\n          enableAllPanels={this.enableAllPanels}\n          railPlatform={this.railPlatform}\n          efoAvailable={this.efoAvailable}\n          stopperAvailable={this.stopperAvailable}\n          createdBefore42mmStopperSleeveUfoCutoffDate={this.createdBefore42mmStopperSleeveUfoCutoffDate}\n        />\n      </SentryErrorHandler>,\n    );\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\n\n// Our dialogs are are written to the page and then moved with JavaScript so they\n// are direct children of the body tag.  This is useful for consistent CSS positioning.\n// However, it results in Stimulus connecting twice, which we don't want.\n//\n// Usage:\n// Instead of extending the Controller from Stimulus, Import and extend from this. Then\n// in your connect method, add the following guard clause before your connection logic:\n// if (!this.isOkayToConnect) return;\nexport default class extends Controller {\n  get isOkayToConnect() {\n    // If this is not in a dialog then connection the first time is okay\n    // (it's only going to happen once)\n    if (this.isInDialog) this.element.dataset.allowConnect = true;\n\n    // We're in a dialog and don't want to connect the first time\n    if (this.element.dataset.allowConnect === undefined) {\n      this.element.dataset.allowConnect = true;\n      return false;\n    }\n\n    return true;\n  }\n\n  get isInDialog() {\n    return this.element.closest(\".ir-dialog__container\") === null;\n  }\n}\n", "import React, { Component } from \"react\";\nimport PropTypes from \"prop-types\";\nimport InfoPopupLink from \"../../InfoPopupLink\";\n\nimport { panelPropTypeShape, customPanelPropTypeShape, manufacturerPropTypeShape, detailsLinkParams } from \"../helper\";\n\nclass ChosenPanelDisplay extends Component {\n  static propTypes = {\n    openPicker: PropTypes.func.isRequired,\n    projectType: PropTypes.string.isRequired,\n    panels: PropTypes.arrayOf(panelPropTypeShape),\n    customPanels: PropTypes.arrayOf(customPanelPropTypeShape),\n    manufacturers: PropTypes.arrayOf(manufacturerPropTypeShape),\n    selectedManufacturerId: PropTypes.number,\n    selectedPanelId: PropTypes.number,\n    disabled: PropTypes.bool,\n    efoAvailable: PropTypes.bool.isRequired,\n    stopperAvailable: PropTypes.bool.isRequired,\n    fireRatingCertUrl: PropTypes.string,\n  };\n\n  constructor(props) {\n    super(props);\n\n    this.state = {\n      manufacturers: props.manufacturers,\n      selectedManufacturerId: props.selectedManufacturerId,\n      panels: props.panels,\n      customPanels: props.customPanels,\n      selectedPanelId: props.selectedPanelId,\n      disabled: props.disabled,\n      railPlatform: props.railPlatform,\n    };\n  }\n\n  get selectedManufacturer() {\n    const { selectedManufacturerId: id, manufacturers } = this.state;\n    if (!id) return undefined;\n\n    return manufacturers.find((m) => m.id === id);\n  }\n\n  get selectedPanel() {\n    const { selectedPanelId: id } = this.state;\n    if (!id) return undefined;\n\n    return this.allPanels.find((p) => p.id === id);\n  }\n\n  get allPanels() {\n    const { panels, customPanels } = this.state;\n    if (!panels) {\n      return customPanels;\n    } else if (!customPanels) {\n      return panels;\n    } else {\n      return panels.concat(customPanels);\n    }\n  }\n\n  componentDidMount() {\n    this.syncFireRatingCertLink();\n  }\n\n  componentDidUpdate() {\n    this.syncFireRatingCertLink();\n  }\n\n  syncFireRatingCertLink() {\n    const { fireRatingCertUrl } = this.props;\n    const certLink = document.getElementById(\"fire-rating-cert-link\");\n    if (certLink && fireRatingCertUrl) certLink.href = fireRatingCertUrl;\n  }\n\n  renderChooseOne() {\n    if (this.selectedPanel) return \"\";\n\n    return <div className=\"pp__chosen-panel__choose-panel\">- choose one -</div>;\n  }\n\n  renderChosenPanel() {\n    if (!this.selectedPanel) return \"\";\n\n    const { currentUser, projectPanelUser } = this.props;\n    const { name: panelName, user_id: panelUserId, retired } = this.selectedPanel;\n\n    const isPartnerPanel = !!this.selectedPanel.partner;\n    const isPanelCustomAndDoesNotBelongToCurrentUser =\n      isPartnerPanel ||\n      (this.selectedPanel.user_id && currentUser && projectPanelUser && panelUserId !== currentUser.id);\n\n    let manName;\n    if (panelUserId) {\n      manName = \"Custom Panels\";\n    } else if (isPartnerPanel) {\n      manName = this.selectedPanel.partner_manufacturer_name;\n    } else {\n      manName = this.selectedManufacturer.name;\n    }\n\n    let ownedBy = \"\";\n    if (isPartnerPanel) {\n      ownedBy = this.selectedPanel.partner_name;\n    } else if (isPanelCustomAndDoesNotBelongToCurrentUser) {\n      ownedBy = `${projectPanelUser.first_name[0]}. ${projectPanelUser.last_name}`;\n    }\n\n    return (\n      <>\n        <div className=\"pp__chosen-panel__manufacturer\">{manName}</div>\n        <div className=\"pp__chosen-panel__panel\">\n          {panelName}\n          {retired && <span className=\"pp__chosen-panel__panel__warning\">(Retired)</span>}\n          {ownedBy !== \"\" && <span className=\"pp__chosen-panel__panel__warning\">(owned by {ownedBy})</span>}\n        </div>\n      </>\n    );\n  }\n\n  renderChosenPanelDimensions() {\n    if (!this.selectedPanel) return \"\";\n\n    const hasFlangeInfo =\n      this.selectedPanel.flange_dimensions !== \"\" && this.selectedPanel.flange_dimensions !== undefined;\n\n    return (\n      <>\n        <div className=\"pp__chosen-panel__dimensions\" data-identifier=\"dimensions\">\n          {this.selectedPanel.dimensions}\n        </div>\n        {hasFlangeInfo && (\n          <div className=\"pp__chosen-panel__dimensions pp__chosen-panel__flange-dimensions\">\n            <span className=\"d-inline-block pe-2\">{this.selectedPanel.flange_dimensions}</span>\n            <InfoPopupLink dialogIdentifier=\"info-popup-panel-picker-flange-dimensions\" />\n          </div>\n        )}\n      </>\n    );\n  }\n\n  renderChosenPanelNotUlListedStatus() {\n    const panel = this.selectedPanel;\n    if (!panel || panel.user_id) return \"\";\n\n    const ulStatus = panel.ul_listed_status;\n    if (ulStatus === \"approved\" || ulStatus === \"in process\") return \"\";\n\n    let message;\n    if (ulStatus === \"pending\") {\n      message = \"IronRidge UL Compatibility Pending\";\n    } else {\n      message = \"Not IronRidge UL Compatible\";\n    }\n\n    return (\n      <div className=\"pp__chosen-panel__ul-pending\">\n        <i className=\"fas fa-exclamation-triangle\" />\n        {message} <InfoPopupLink dialogIdentifier=\"info-popup-panel-not-ul-listed\" />\n      </div>\n    );\n  }\n\n  renderChosenPanelFireRatingStatus() {\n    const panel = this.selectedPanel;\n    if (!panel || panel.user_id) return \"\";\n    if (panel.fire_rating_compatible !== false) return \"\";\n\n    return (\n      <div className=\"pp__chosen-panel__ul-pending\">\n        <i className=\"fas fa-exclamation-triangle\" />\n        Not IronRidge Fire Class Rated <InfoPopupLink dialogIdentifier=\"info-popup-panel-not-fire-rated\" />\n      </div>\n    );\n  }\n\n  renderChosenPanelWeight() {\n    const panel = this.selectedPanel;\n    if (!panel) return \"\";\n\n    return <div className=\"pp__chosen-panel__weights\">{panel.weights}</div>;\n  }\n\n  renderDetailsLink() {\n    if (!this.selectedPanel) return \"\";\n\n    const panel = this.selectedPanel;\n    const { projectType, projectId, efoAvailable, stopperAvailable } = this.props;\n    const { railPlatform } = this.state;\n\n    return (\n      <a\n        href=\"#\"\n        data-controller=\"components--ir-dialog--turbo-frame-details\"\n        {...detailsLinkParams(panel, projectType, projectId, railPlatform, efoAvailable, stopperAvailable)}\n      >\n        <small className=\"text-nowrap\">\n          <i className=\"fas fa-magnifying-glass me-2\" />\n          Details\n        </small>\n      </a>\n    );\n  }\n\n  render() {\n    const { openPicker, projectType } = this.props;\n    const { disabled } = this.state;\n    const classes = [\"pp__chosen-panel\"];\n    if (disabled) {\n      classes.push(\"pp__chosen-panel--disabled\");\n    }\n\n    return (\n      <>\n        <div className=\"d-flex\">\n          <label className=\"d-block\">Panel</label>\n          <div className=\"ms-auto\">{this.renderDetailsLink()}</div>\n        </div>\n        <div>\n          <button type=\"button\" onClick={openPicker} className={classes.join(\" \")}>\n            <div className=\"pp__chosen-panel__edit-icon\">\n              <i className=\"fas fa-pen-square\" />\n            </div>\n            {this.renderChosenPanel()}\n            {this.renderChooseOne()}\n          </button>\n          {this.renderChosenPanelDimensions()}\n          <div className=\"d-flex flex-column\">\n            {projectType === \"BX\" && this.renderChosenPanelWeight()}\n            {this.renderChosenPanelNotUlListedStatus()}\n            {this.renderChosenPanelFireRatingStatus()}\n          </div>\n        </div>\n      </>\n    );\n  }\n}\n\nexport default ChosenPanelDisplay;\n", "import PropTypes from \"prop-types\";\n\nexport const panelPropTypeShape = PropTypes.shape({\n  id: PropTypes.number.isRequired,\n  name: PropTypes.string.isRequired,\n  dimensions: PropTypes.string.isRequired,\n  ul_listed_status: PropTypes.string.isRequired,\n  ufo_compatible: PropTypes.bool.isRequired,\n  ufo_stopper_compatible: PropTypes.bool.isRequired,\n  efo_thickness_compatibility: PropTypes.string.isRequired,\n  camo_flange_compatibility_long_side: PropTypes.string.isRequired,\n  camo_flange_compatibility_short_side: PropTypes.string.isRequired,\n  aire_lock_mid_compatible: PropTypes.bool.isRequired,\n  aire_lock_end_compatible: PropTypes.bool.isRequired,\n  aire_lock_stealth_flange_compatibility_long_side: PropTypes.string.isRequired,\n  aire_lock_stealth_flange_compatibility_short_side: PropTypes.string.isRequired,\n  clickfit_mid_compatible: PropTypes.bool.isRequired,\n  clickfit_mid_thickness_compatibility: PropTypes.string.isRequired,\n  clickfit_end_compatible: PropTypes.bool.isRequired,\n  clickfit_end_thickness_compatibility: PropTypes.string.isRequired,\n  clickfit_compatible: PropTypes.bool.isRequired,\n  contour_flange_compatibility_long_side: PropTypes.string.isRequired,\n  contour_flange_compatibility_short_side: PropTypes.string.isRequired,\n  bx_thickness_compatible: PropTypes.bool.isRequired,\n  bx_width_compatible: PropTypes.bool.isRequired,\n  pr_length_compatible: PropTypes.bool.isRequired,\n  fr_length_compatible: PropTypes.bool.isRequired,\n  gb_length_compatible: PropTypes.bool.isRequired,\n});\n\nexport const endClampPropTypeShape = PropTypes.oneOf([\"stopper\", \"efo\", \"camo\", \"lock_end\", \"lock_stealth\", \"eclipse\"]);\n\nexport const customPanelPropTypeShape = PropTypes.shape({\n  id: PropTypes.number.isRequired,\n  name: PropTypes.string.isRequired,\n});\n\nexport const manufacturerPropTypeShape = PropTypes.shape({\n  id: PropTypes.number.isRequired,\n  name: PropTypes.string.isRequired,\n});\n\nexport function detailsLinkParams(panel, projectType, projectId, railPlatform, efoAvailable, stopperAvailable) {\n  return {\n    \"data-action\": \"click->components--ir-dialog--turbo-frame-details#clickToOpen\",\n    \"data-components--ir-dialog--turbo-frame-details-dialog-identifier-param\": `panel-detail-${panel.id}-dialog`,\n    \"data-components--ir-dialog--turbo-frame-details-dialog-header-param\": `${panel.manufacturer_name}: ${panel.name}`,\n    \"data-components--ir-dialog--turbo-frame-details-dialog-width-param\": detailsDialogWidth(\n      projectType,\n      efoAvailable,\n      stopperAvailable,\n    ),\n    \"data-components--ir-dialog--turbo-frame-details-dialog-body-min-height-param\": 450,\n    \"data-components--ir-dialog--turbo-frame-details-turbo-frame-id-param\": `panel_details_${panel.id}`,\n    \"data-components--ir-dialog--turbo-frame-details-turbo-frame-src-param\": `/panel_picker_panels/${panel.id}?rail_platform=${railPlatform}&project_id=${projectId}&project_type=${projectType}`,\n  };\n}\n\nfunction detailsDialogWidth(projectType, efoAvailable, stopperAvailable) {\n  const efoSpace = efoAvailable ? 140 : 0;\n  const stopperSpace = stopperAvailable ? 120 : 0;\n  const eclipseSpace = 220;\n\n  switch (projectType) {\n    case \"BX\":\n      return 900;\n    case \"FR4\":\n      return 830 + efoSpace + stopperSpace + eclipseSpace;\n    case \"FR\":\n      return 830 + efoSpace + stopperSpace;\n    case \"GB4\":\n      return 830 + efoSpace + stopperSpace + eclipseSpace;\n    case \"GB\":\n      return 830 + efoSpace + stopperSpace;\n    default:\n      return 980 + efoSpace + stopperSpace + eclipseSpace;\n  }\n}\n", "import React, { Component } from \"react\";\nimport PropTypes from \"prop-types\";\n\nimport ManufacturerSelect from \"./ManufacturerSelect\";\nimport IronRidgePanelSelect from \"./PanelSelect/IronRidgePanelSelect\";\nimport Filter from \"./Filter\";\n\nimport { panelPropTypeShape, manufacturerPropTypeShape, endClampPropTypeShape } from \"./helper\";\nimport * as store from \"../../helpers/local-store\";\n\nimport TabNav, { TAB_IR, TAB_CP } from \"./TabNav\";\nimport CustomPanelsSelect from \"./PanelSelect/CustomPanelsSelect\";\n\nclass PanelPicker extends Component {\n  static propTypes = {\n    panels: PropTypes.arrayOf(panelPropTypeShape),\n    selectedPanelId: PropTypes.number,\n    projectType: PropTypes.string.isRequired,\n    manufacturers: PropTypes.arrayOf(manufacturerPropTypeShape),\n    selectedManufacturerId: PropTypes.number,\n    customPanelsManufacturerId: PropTypes.number,\n    retrievePanelsForManufacturer: PropTypes.func.isRequired,\n    panelSelected: PropTypes.func.isRequired,\n    endClamp: endClampPropTypeShape,\n    hidePanelPickerDialog: PropTypes.func.isRequired,\n    railPlatform: PropTypes.string.isRequired,\n    efoAvailable: PropTypes.bool.isRequired,\n    stopperAvailable: PropTypes.bool.isRequired,\n    createdBefore42mmStopperSleeveUfoCutoffDate: PropTypes.bool.isRequired,\n  };\n\n  constructor(props) {\n    super(props);\n\n    this.state = {\n      panels: props.panels,\n      customPanels: props.customPanels,\n      selectedPanelId: props.selectedPanelId,\n      manufacturers: props.manufacturers,\n      selectedManufacturerId: props.selectedManufacturerId,\n      endClamp: props.endClamp,\n      loadingPanels: false,\n      onlyShowUlListedAndCompatible: store.get(\"panel-picker-only-show-ul-listed\", true),\n      onlyShowBxCompatible: store.get(\"panel-picker-only-show-bx-compatible\", true),\n      activeTab: props.selectedManufacturerId === props.customPanelsManufacturerId ? TAB_CP : TAB_IR,\n      railPlatform: props.railPlatform,\n    };\n  }\n\n  updateOnlyShowUlListedPanels = (event) => {\n    const onlyShowUlListedAndCompatible = event.target.checked;\n    store.set(\"panel-picker-only-show-ul-listed\", onlyShowUlListedAndCompatible);\n    store.set(\"panel-picker-only-show-bx-compatible\", onlyShowUlListedAndCompatible);\n    this.setState({ onlyShowBxCompatible: onlyShowUlListedAndCompatible, onlyShowUlListedAndCompatible });\n  };\n\n  updateOnlyShowBxCompatiblePanels = (event) => {\n    const onlyShowBxCompatible = event.target.checked;\n    store.set(\"panel-picker-only-show-bx-compatible\", onlyShowBxCompatible);\n    store.set(\"panel-picker-only-show-ul-listed\", onlyShowBxCompatible);\n    this.setState({ onlyShowBxCompatible, onlyShowUlListedAndCompatible: onlyShowBxCompatible });\n  };\n\n  selectManufacturer = (selectedManufacturerId) => {\n    const { retrievePanelsForManufacturer } = this.props;\n\n    this.setState({\n      selectedManufacturerId,\n      panels: [],\n      selectedPanelId: undefined,\n    });\n\n    if (!selectedManufacturerId) return;\n    retrievePanelsForManufacturer(selectedManufacturerId);\n  };\n\n  selectPanel = (panel) => {\n    let { selectedManufacturerId } = this.state;\n    const { panelSelected } = this.props;\n\n    this.setState({ selectedPanelId: panel.id });\n\n    if (panel.user_id) {\n      selectedManufacturerId = null;\n      this.setState({ selectedManufacturerId });\n    }\n\n    panelSelected(selectedManufacturerId, panel);\n  };\n\n  renderManufacturerUi() {\n    const { selectedManufacturerId, manufacturers, onlyShowUlListedAndCompatible, onlyShowBxCompatible } = this.state;\n    const { projectType } = this.props;\n\n    return (\n      <ManufacturerSelect\n        projectType={projectType}\n        manufacturers={manufacturers}\n        selectManufacturer={this.selectManufacturer}\n        selectedManufacturerId={selectedManufacturerId}\n        onlyShowUlListedAndCompatible={onlyShowUlListedAndCompatible}\n        onlyShowBxCompatible={onlyShowBxCompatible}\n      />\n    );\n  }\n\n  renderPanelUi() {\n    const {\n      panels,\n      selectedPanelId,\n      selectedManufacturerId,\n      endClamp,\n      loadingPanels,\n      onlyShowUlListedAndCompatible,\n      onlyShowBxCompatible,\n      railPlatform,\n    } = this.state;\n    const {\n      projectType,\n      persistedSelectedPanel,\n      hidePanelPickerDialog,\n      currentUser,\n      projectPanelUser,\n      enableAllPanels,\n      createdBefore42mmStopperSleeveUfoCutoffDate,\n      efoAvailable,\n      stopperAvailable,\n    } = this.props;\n\n    if (!selectedManufacturerId) return \"\";\n\n    return (\n      <IronRidgePanelSelect\n        projectId={this.props.projectId}\n        projectType={projectType}\n        panels={panels}\n        endClamp={endClamp}\n        selectPanel={this.selectPanel}\n        selectedPanelId={selectedPanelId}\n        persistedSelectedPanel={persistedSelectedPanel}\n        loadingPanels={loadingPanels}\n        onlyShowUlListedAndCompatible={onlyShowUlListedAndCompatible}\n        onlyShowBxCompatible={onlyShowBxCompatible}\n        hidePanelPickerDialog={hidePanelPickerDialog}\n        currentUser={currentUser}\n        projectPanelUser={projectPanelUser}\n        enableAllPanels={enableAllPanels}\n        railPlatform={railPlatform}\n        efoAvailable={efoAvailable}\n        stopperAvailable={stopperAvailable}\n        createdBefore42mmStopperSleeveUfoCutoffDate={createdBefore42mmStopperSleeveUfoCutoffDate}\n      />\n    );\n  }\n\n  renderCustomPanelsUi() {\n    const { customPanels, selectedPanelId, endClamp, loadingPanels, railPlatform, onlyShowUlListedAndCompatible } =\n      this.state;\n    const {\n      persistedSelectedPanel,\n      hidePanelPickerDialog,\n      currentUser,\n      projectPanelUser,\n      projectType,\n      createdBefore42mmStopperSleeveUfoCutoffDate,\n      efoAvailable,\n      stopperAvailable,\n    } = this.props;\n\n    return (\n      <CustomPanelsSelect\n        projectId={this.props.projectId}\n        projectType={projectType}\n        panels={customPanels}\n        endClamp={endClamp}\n        selectPanel={this.selectPanel}\n        selectedPanelId={selectedPanelId}\n        persistedSelectedPanel={persistedSelectedPanel}\n        loadingPanels={loadingPanels}\n        hidePanelPickerDialog={hidePanelPickerDialog}\n        currentUser={currentUser}\n        projectPanelUser={projectPanelUser}\n        railPlatform={railPlatform}\n        efoAvailable={efoAvailable}\n        stopperAvailable={stopperAvailable}\n        onlyShowUlListedAndCompatible={onlyShowUlListedAndCompatible}\n        createdBefore42mmStopperSleeveUfoCutoffDate={createdBefore42mmStopperSleeveUfoCutoffDate}\n      />\n    );\n  }\n\n  renderFilter() {\n    const { projectType } = this.props;\n    const { onlyShowBxCompatible, onlyShowUlListedAndCompatible } = this.state;\n\n    if (projectType === \"BX\") {\n      return (\n        <Filter\n          checked={onlyShowBxCompatible}\n          onChange={this.updateOnlyShowBxCompatiblePanels}\n          message=\"Only show BX compatible and IronRidge UL listed\"\n        />\n      );\n    }\n\n    return (\n      <Filter\n        checked={onlyShowUlListedAndCompatible}\n        onChange={this.updateOnlyShowUlListedPanels}\n        message=\"Only show usable and IronRidge UL listed\"\n      />\n    );\n  }\n\n  onTabClick = (activeTab) => {\n    const { selectedManufacturerId } = this.state;\n    const { customPanelsManufacturerId } = this.props;\n    if (selectedManufacturerId === customPanelsManufacturerId) {\n      this.setState({ selectedManufacturerId: null });\n    }\n    this.setState({ activeTab });\n  };\n\n  get hasCustomPanels() {\n    const { customPanels } = this.state;\n    return customPanels.length > 0;\n  }\n\n  renderCreateCustomPanelNoticeLink() {\n    return (\n      <div className=\"pt-4\">\n        Don't see your panel?{\" \"}\n        <a href=\"/my_custom_panels/new\">\n          Add a custom panel here <i className=\"fas fa-arrow-right\" />\n        </a>\n      </div>\n    );\n  }\n\n  renderManufacturerRequirementsResponsibility() {\n    return (\n      <div className=\"pt-2 px-1\">\n        <i>User to verify module manufacturer's clamping location and pressure limits.</i>\n      </div>\n    );\n  }\n\n  render() {\n    const { activeTab } = this.state;\n\n    return (\n      <>\n        {this.hasCustomPanels && <TabNav activeTab={activeTab} onTabClick={this.onTabClick} />}\n        <div className=\"ir-content-box\">\n          {activeTab === TAB_IR && this.renderFilter()}\n          {activeTab === TAB_IR && this.renderManufacturerUi()}\n          {activeTab === TAB_IR && this.renderPanelUi()}\n          {activeTab === TAB_CP && this.renderCustomPanelsUi()}\n          {this.renderManufacturerRequirementsResponsibility()}\n          {this.renderCreateCustomPanelNoticeLink()}\n        </div>\n      </>\n    );\n  }\n}\n\nexport default PanelPicker;\n", "import React, { Component } from \"react\";\nimport PropTypes from \"prop-types\";\nimport SearchField from \"../SearchField\";\nimport { manufacturerPropTypeShape } from \"../helper\";\nimport NoMatchingRecords from \"../NoMatchingRecords\";\n\nclass ManufacturerSelect extends Component {\n  static propTypes = {\n    projectType: PropTypes.string.isRequired,\n    selectManufacturer: PropTypes.func.isRequired,\n    manufacturers: PropTypes.arrayOf(manufacturerPropTypeShape),\n    selectedManufacturerId: PropTypes.number,\n    onlyShowUlListedAndCompatible: PropTypes.bool.isRequired,\n    onlyShowBxCompatible: PropTypes.bool.isRequired,\n  };\n\n  constructor(props) {\n    super(props);\n\n    this.state = {\n      searchTerm: \"\",\n      currentSelectionIndex: undefined,\n      filteredManufacturers: [],\n    };\n  }\n\n  componentDidMount() {\n    this.setFilteredManufacturers();\n  }\n\n  componentDidUpdate(prevProps, _prevState, _snapshot) {\n    const { onlyShowUlListedAndCompatible, onlyShowBxCompatible } = this.props;\n\n    if (\n      prevProps.onlyShowUlListedAndCompatible !== onlyShowUlListedAndCompatible ||\n      prevProps.onlyShowBxCompatible !== onlyShowBxCompatible\n    ) {\n      this.setFilteredManufacturers();\n    }\n  }\n\n  get selectedManufacturer() {\n    const { manufacturers, selectedManufacturerId } = this.props;\n    return manufacturers.find((m) => m.id === selectedManufacturerId);\n  }\n\n  setFilteredManufacturers() {\n    const { projectType, manufacturers, onlyShowUlListedAndCompatible, onlyShowBxCompatible } = this.props;\n    const { searchTerm } = this.state;\n\n    const onlyShowCheckbox = projectType === \"BX\" ? onlyShowBxCompatible : onlyShowUlListedAndCompatible;\n\n    let filteredManufacturers;\n    if (searchTerm.length === 0 && !onlyShowCheckbox) {\n      filteredManufacturers = manufacturers;\n    } else {\n      filteredManufacturers = manufacturers.filter(this.shouldIncludeManufacturerInFilteredList);\n    }\n\n    this.setState({ filteredManufacturers });\n  }\n\n  searchTermChange = (searchTerm) => {\n    this.setState({ searchTerm }, () => this.setFilteredManufacturers());\n  };\n\n  selectCollectionItemFromCurrentSelectionIndex = () => {\n    const { currentSelectionIndex, filteredManufacturers } = this.state;\n    const index = currentSelectionIndex || 0;\n\n    const manufacturer = filteredManufacturers[index];\n    if (manufacturer === undefined) return;\n\n    this.selectManufacturer(manufacturer.id);\n  };\n\n  shouldIncludeManufacturerInFilteredList = (manufacturer) => {\n    const { projectType, onlyShowUlListedAndCompatible, onlyShowBxCompatible } = this.props;\n    const { searchTerm } = this.state;\n\n    if (searchTerm.length > 0) {\n      const includesSearchTerm = manufacturer.name.toLowerCase().includes(searchTerm.toLowerCase());\n      if (!includesSearchTerm) return false;\n    }\n\n    if (projectType === \"BX\" && onlyShowBxCompatible) {\n      return manufacturer.active_bx_compatible_and_ul_listed_panels_count > 0;\n    }\n    if (projectType !== \"BX\" && onlyShowUlListedAndCompatible) {\n      return manufacturer.active_ul_approved_panels_count > 0;\n    }\n\n    return true;\n  };\n\n  editManufacturer = (event) => {\n    event.preventDefault();\n    this.selectManufacturer(undefined);\n  };\n\n  setCurrentSelectionIndex = (currentSelectionIndex) => {\n    this.setState({ currentSelectionIndex });\n  };\n\n  selectManufacturer(id) {\n    const { selectManufacturer } = this.props;\n    selectManufacturer(id);\n    this.setState(\n      {\n        searchTerm: \"\",\n        currentSelectionIndex: undefined,\n      },\n      () => this.setFilteredManufacturers(),\n    );\n  }\n\n  renderManufacturer(manufacturer, index) {\n    const { currentSelectionIndex } = this.state;\n    const { projectType } = this.props;\n    const classNames = [\"pp__manufacturers__manufacturer\"];\n    if (currentSelectionIndex === index) {\n      classNames.push(\"pp__manufacturers__manufacturer--selected\");\n    }\n\n    let markerCount;\n    let markerMessage;\n    if (projectType === \"BX\") {\n      markerCount = manufacturer.active_bx_compatible_and_ul_listed_panels_count;\n      markerMessage = \"BX comp & UL listed\";\n    } else {\n      markerCount = manufacturer.active_ul_approved_panels_count;\n      markerMessage = \"UL listed\";\n    }\n\n    return (\n      <div\n        className={classNames.join(\" \")}\n        key={manufacturer.id}\n        onClick={() => this.selectManufacturer(manufacturer.id)}\n      >\n        <div className=\"pp__manufacturer__name\">{manufacturer.name}</div>\n        <div className=\"pp__manufacturer__marker\">\n          <div className=\"pp__manufacturer__marker__count\">\n            {markerCount}/{manufacturer.active_panels_count}\n          </div>\n          {markerMessage}\n        </div>\n      </div>\n    );\n  }\n\n  renderManufacturers() {\n    const { filteredManufacturers } = this.state;\n\n    if (filteredManufacturers.length === 0) {\n      return <NoMatchingRecords />;\n    }\n\n    return (\n      <div className=\"pp__manufacturers__container\">\n        {filteredManufacturers.map((m, i) => this.renderManufacturer(m, i))}\n      </div>\n    );\n  }\n\n  renderEditManufacturer() {\n    const { selectedManufacturer } = this;\n\n    if (!selectedManufacturer) return \"\";\n\n    return (\n      <div style={{ paddingBottom: \"1rem\" }}>\n        <span>Manufacturer:</span>{\" \"}\n        <a href=\"#\" onClick={this.editManufacturer} className=\"pp__manufacturer-edit-link\">\n          <b>{selectedManufacturer.name}</b> <i className=\"fas fa-pencil-alt\" />\n        </a>\n      </div>\n    );\n  }\n\n  render() {\n    const { selectedManufacturerId } = this.props;\n    const { searchTerm, currentSelectionIndex, filteredManufacturers } = this.state;\n\n    if (selectedManufacturerId) return this.renderEditManufacturer();\n\n    return (\n      <div className=\"ir-form\">\n        <h4 className=\"pp__select-title\">Select a manufacturer</h4>\n        <SearchField\n          id=\"manufacturer-search\"\n          searchTerm={searchTerm}\n          searchTermChange={this.searchTermChange}\n          currentSelectionIndex={currentSelectionIndex}\n          setCurrentSelectionIndex={this.setCurrentSelectionIndex}\n          collection={filteredManufacturers}\n          selectCollectionItemFromCurrentSelectionIndex={this.selectCollectionItemFromCurrentSelectionIndex}\n          collectionCount={filteredManufacturers.length}\n        />\n        {this.renderManufacturers()}\n      </div>\n    );\n  }\n}\n\nexport default ManufacturerSelect;\n", "import React, { Component } from \"react\";\nimport PropTypes from \"prop-types\";\nimport TextField from \"../../TextField\";\n\nclass SearchField extends Component {\n  static propTypes = {\n    id: PropTypes.string.isRequired,\n    searchTerm: PropTypes.string,\n    searchTermChange: PropTypes.func.isRequired,\n    currentSelectionIndex: PropTypes.number,\n    setCurrentSelectionIndex: PropTypes.func.isRequired,\n    selectCollectionItemFromCurrentSelectionIndex: PropTypes.func.isRequired,\n    isValidSelectionIndex: PropTypes.func,\n    allSelectionsInvalid: PropTypes.bool,\n    collectionCount: PropTypes.number,\n  };\n\n  static defaultProps = {\n    isValidSelectionIndex: () => true,\n    allSelectionsInvalid: false,\n    searchTerm: \"\",\n  };\n\n  textFieldKeyDown = (event) => {\n    const { selectCollectionItemFromCurrentSelectionIndex, setCurrentSelectionIndex } = this.props;\n\n    if (event.key === \"Enter\") {\n      event.preventDefault();\n      selectCollectionItemFromCurrentSelectionIndex();\n    } else if (event.ctrlKey) {\n      if (event.key === \"k\") {\n        event.preventDefault();\n        this.selectMenuItem(-1);\n      } else if (event.key === \"j\") {\n        event.preventDefault();\n        this.selectMenuItem(1);\n      }\n    } else if (event.key === \"ArrowDown\") {\n      event.preventDefault();\n      this.selectMenuItem(1);\n    } else if (event.key === \"ArrowUp\") {\n      event.preventDefault();\n      this.selectMenuItem(-1);\n    } else {\n      // we are not trying to navigate the menu\n      setCurrentSelectionIndex(undefined);\n    }\n  };\n\n  selectMenuItem(increment) {\n    const { collectionCount, allSelectionsInvalid } = this.props;\n    const { currentSelectionIndex, isValidSelectionIndex, setCurrentSelectionIndex } = this.props;\n    if (allSelectionsInvalid || collectionCount === 0) return;\n\n    let startingIndexPosition = currentSelectionIndex;\n    if (startingIndexPosition === undefined) {\n      startingIndexPosition = increment > 0 ? -1 : collectionCount;\n    }\n\n    let newSelectionIndex;\n    if (increment < 0) {\n      newSelectionIndex = (startingIndexPosition + increment - collectionCount * increment) % collectionCount;\n    } else {\n      newSelectionIndex = (startingIndexPosition + increment) % collectionCount;\n    }\n\n    if (!isValidSelectionIndex(newSelectionIndex)) {\n      const newIncrement = increment < 0 ? increment - 1 : increment + 1;\n      this.selectMenuItem(newIncrement);\n    } else {\n      setCurrentSelectionIndex(newSelectionIndex);\n    }\n  }\n\n  render() {\n    const { id, searchTerm, searchTermChange } = this.props;\n\n    return (\n      <TextField\n        id={id}\n        label=\"Search\"\n        value={searchTerm}\n        onFieldChange={searchTermChange}\n        onKeyDown={this.textFieldKeyDown}\n        autoFocus\n      />\n    );\n  }\n}\n\nexport default SearchField;\n", "import React from \"react\";\n\nconst NoMatchingRecords = (_) => (\n  <div className=\"pp__no-matching-records\">\n    <i className=\"fas fa-exclamation-triangle\" />\n    No matching records were found\n  </div>\n);\n\nexport default NoMatchingRecords;\n", "import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { panelPropTypeShape, endClampPropTypeShape } from \"../helper\";\n\nimport PanelSelectBase from \"./PanelSelectBase\";\n\nclass IronRidgePanelSelect extends PanelSelectBase {\n  static propTypes = {\n    projectType: PropTypes.string.isRequired,\n    loadingPanels: PropTypes.bool.isRequired,\n    panels: PropTypes.arrayOf(panelPropTypeShape),\n    selectPanel: PropTypes.func.isRequired,\n    selectedPanelId: PropTypes.number,\n    endClamp: endClampPropTypeShape,\n    onlyShowUlListedAndCompatible: PropTypes.bool.isRequired,\n    onlyShowBxCompatible: PropTypes.bool.isRequired,\n    hidePanelPickerDialog: PropTypes.func.isRequired,\n    railPlatform: PropTypes.string.isRequired,\n    efoAvailable: PropTypes.bool.isRequired,\n    stopperAvailable: PropTypes.bool.isRequired,\n    createdBefore42mmStopperSleeveUfoCutoffDate: PropTypes.bool.isRequired,\n  };\n\n  componentDidUpdate(prevProps, _prevState, _snapshot) {\n    const { panels, onlyShowUlListedAndCompatible, onlyShowBxCompatible } = this.props;\n\n    if (JSON.stringify(prevProps.panels) !== JSON.stringify(panels)) {\n      this.searchTermChange(\"\");\n    }\n\n    if (\n      prevProps.onlyShowUlListedAndCompatible !== onlyShowUlListedAndCompatible ||\n      prevProps.onlyShowBxCompatible !== onlyShowBxCompatible\n    ) {\n      this.setFilteredPanels();\n    }\n  }\n\n  setFilteredPanels() {\n    const { panels, onlyShowUlListedAndCompatible, onlyShowBxCompatible } = this.props;\n    if (!panels) return;\n    const { searchTerm } = this.state;\n\n    const onlyShowCheckbox = this.isBxProject ? onlyShowBxCompatible : onlyShowUlListedAndCompatible;\n\n    let filteredPanels;\n    if (searchTerm.length === 0 && !onlyShowCheckbox) {\n      filteredPanels = this.selectedPanelAndNonRetiredPanels;\n    } else {\n      filteredPanels = panels.filter(this.shouldIncludePanelInFilteredList);\n    }\n\n    this.setState({ filteredPanels });\n  }\n\n  shouldIncludePanelInFilteredList = (panel) => {\n    const { onlyShowUlListedAndCompatible, onlyShowBxCompatible, persistedSelectedPanel } = this.props;\n    const { searchTerm } = this.state;\n\n    if (searchTerm.length > 0) {\n      const includesSearchTerm = panel.name.toLowerCase().includes(searchTerm.toLowerCase());\n      if (!includesSearchTerm) return false;\n    }\n\n    if (panel.retired && (!persistedSelectedPanel || panel.id !== persistedSelectedPanel.id)) return false;\n\n    if (this.isBxProject && onlyShowBxCompatible) {\n      if (panel.fire_rating_compatible === false) return false;\n      return !this.bxDisabled(panel) && this.isUlApproved(panel);\n    } else if (onlyShowUlListedAndCompatible) {\n      if (!this.isUlApproved(panel)) return false;\n      if (this.isPrFrGbProjectAndNotLengthCompatible(panel)) return false;\n      if (panel.fire_rating_compatible === false) return false;\n\n      if (this.panelIsDisabled(panel)) return false;\n    }\n\n    return true;\n  };\n\n  isValidSelectionIndex = (selectionIndex) => {\n    const { filteredPanels } = this.state;\n    const panel = filteredPanels[selectionIndex];\n    return !this.panelIsDisabled(panel);\n  };\n\n  isUlApproved(panel) {\n    return panel.ul_listed_status === \"approved\";\n  }\n\n  panelIsDisabled(panel) {\n    const { enableAllPanels, railPlatform } = this.props;\n\n    if (enableAllPanels) return false;\n\n    if (this.isBxProject) {\n      return this.bxDisabled(panel);\n    } else if (this.isPrFrGbProjectAndNotLengthCompatible(panel)) {\n      return true;\n    }\n\n    if (railPlatform === \"aire\") {\n      return this.aireDisabled(panel);\n    } else if (railPlatform === \"clickfit\") {\n      return this.clickfitDisabled(panel);\n    } else {\n      return this.xrDisabled(panel);\n    }\n  }\n\n  bxDisabled(panel) {\n    return !panel.bx_thickness_compatible || !panel.bx_width_compatible;\n  }\n\n  aireDisabled(panel) {\n    if (!panel.aire_lock_mid_compatible) return true;\n\n    if (this.props.endClamp === \"lock_stealth\") {\n      return !panel.aire_lock_stealth_usable;\n    } else {\n      return !panel.aire_lock_end_compatible;\n    }\n  }\n\n  clickfitDisabled(panel) {\n    return !panel.clickfit_compatible;\n  }\n\n  xrDisabled(panel) {\n    if (!panel.ufo_compatible) return true;\n\n    if (this.props.endClamp === \"stopper\") {\n      if (panel.thickness_mm === 42) {\n        return !this.props.createdBefore42mmStopperSleeveUfoCutoffDate;\n      } else {\n        return !panel.ufo_stopper_compatible;\n      }\n    } else if (this.props.endClamp === \"efo\") {\n      return panel.efo_thickness_compatibility !== \"compatible\";\n    } else {\n      return !panel.camo_usable;\n    }\n  }\n\n  panelClassNames(panel, index) {\n    const { currentSelectionIndex } = this.state;\n\n    const classNames = [\"pp__panels__panel\"];\n    if (currentSelectionIndex === index) {\n      classNames.push(\"pp__panels__panel--selected\");\n    }\n    if (this.panelIsDisabled(panel)) {\n      classNames.push(\"pp__panels__panel--disabled\");\n    }\n    return classNames;\n  }\n\n  get allFilteredPanelsDisabled() {\n    const { filteredPanels } = this.state;\n    return filteredPanels.every((p) => this.panelIsDisabled(p));\n  }\n\n  renderPanelSelectHeadingMarker() {\n    return \"\";\n  }\n}\n\nexport default IronRidgePanelSelect;\n", "import React, { Component } from \"react\";\nimport SearchField from \"../SearchField\";\nimport NoMatchingRecords from \"../NoMatchingRecords\";\nimport { confirmDialog } from \"../../../controllers/components/ir_dialog/helper\";\nimport { detailsLinkParams } from \"../helper\";\n\nclass PanelSelectBase extends Component {\n  constructor(props) {\n    super(props);\n\n    this.state = {\n      searchTerm: \"\",\n      currentSelectionIndex: undefined,\n      filteredPanels: [],\n    };\n  }\n\n  componentDidMount() {\n    this.setFilteredPanels();\n  }\n\n  get isPrProject() {\n    return this.props.projectType === \"PR4\";\n  }\n\n  get isFrProject() {\n    return this.props.projectType === \"FR4\";\n  }\n  get isGbProject() {\n    return this.props.projectType === \"GB4\";\n  }\n\n  get isBxProject() {\n    return this.props.projectType === \"BX\";\n  }\n\n  isPrProjectAndNotLengthCompatible(panel) {\n    return this.isPrProject && !panel.pr_length_compatible;\n  }\n\n  isFrProjectAndNotLengthCompatible(panel) {\n    return this.isFrProject && !panel.fr_length_compatible;\n  }\n\n  isGbProjectAndNotLengthCompatible(panel) {\n    return this.isGbProject && !panel.gb_length_compatible;\n  }\n\n  isBxProjectAndNotLengthCompatible(panel) {\n    return this.isBxProject && !panel.bx_length_compatible;\n  }\n\n  isPrFrGbProjectAndNotLengthCompatible(panel) {\n    return (\n      this.isPrProjectAndNotLengthCompatible(panel) ||\n      this.isFrProjectAndNotLengthCompatible(panel) ||\n      this.isGbProjectAndNotLengthCompatible(panel)\n    );\n  }\n\n  get selectedPanelAndNonRetiredPanels() {\n    const { panels, persistedSelectedPanel } = this.props;\n    if (!panels) return [];\n    return panels.filter((p) => (persistedSelectedPanel && p.id === persistedSelectedPanel.id) || !p.retired);\n  }\n\n  selectCollectionItemFromCurrentSelectionIndex = () => {\n    const { currentSelectionIndex, filteredPanels } = this.state;\n    const index = currentSelectionIndex || 0;\n\n    const panel = filteredPanels[index];\n    if (panel === undefined) return;\n\n    this.selectPanel(panel.id);\n  };\n\n  searchTermChange = (searchTerm) => {\n    this.setState({ searchTerm }, () => this.setFilteredPanels());\n  };\n\n  shouldIncludePanelInFilteredList = (panel) => {\n    const { searchTerm } = this.state;\n\n    if (searchTerm.length > 0) {\n      const includesSearchTerm = panel.name.toLowerCase().includes(searchTerm.toLowerCase());\n      if (!includesSearchTerm) return false;\n    }\n\n    return true;\n  };\n\n  setCurrentSelectionIndex = (currentSelectionIndex) => {\n    this.setState({ currentSelectionIndex });\n  };\n\n  get selectedPanel() {\n    const { selectedPanelId } = this.props;\n    return this.findPanel(selectedPanelId);\n  }\n\n  findPanel(id) {\n    const { panels } = this.props;\n    if (!panels) return undefined;\n    return panels.find((p) => p.id === id);\n  }\n\n  selectPanelComplete(panel) {\n    const { panels, selectPanel: propsSelectPanel } = this.props;\n    propsSelectPanel(panel);\n\n    this.setState({\n      searchTerm: \"\",\n      currentSelectionIndex: undefined,\n    });\n  }\n\n  selectPanel(id) {\n    const { hidePanelPickerDialog } = this.props;\n\n    const panel = this.findPanel(id);\n    if (this.panelIsDisabled(panel)) {\n      alert(`The panel ${panel.name} can not be selected.  It is incompatible.`);\n      return;\n    }\n\n    if (!panel.retired && this.isPersistedSelectedPanelRetired) {\n      hidePanelPickerDialog();\n\n      confirmDialog(this.confirmMovingAwayFromRetiredPanelMessage, (confirmed) => {\n        if (confirmed) this.selectPanelComplete(panel);\n      });\n    } else if (this.isPersistedSelectedPanelCustomAndOwnedByAnotherUser(panel)) {\n      hidePanelPickerDialog();\n\n      confirmDialog(this.confirmMovingAwayFromCustomPanelThatUserDoesNotOwn, (confirmed) => {\n        if (confirmed) this.selectPanelComplete(panel);\n      });\n    } else {\n      this.selectPanelComplete(panel);\n    }\n  }\n\n  get confirmMovingAwayFromRetiredPanelMessage() {\n    const { persistedSelectedPanel } = this.props;\n    const message = `\n        The panel you currently have assigned to this project (${persistedSelectedPanel.name}) is retired.\n        If you change to another panel and save, you will no longer be able to assign this panel to this project.\n      `;\n    return message;\n  }\n\n  get confirmMovingAwayFromCustomPanelThatUserDoesNotOwn() {\n    const { projectPanelUser, persistedSelectedPanel } = this.props;\n    const message = `\n        The panel you currently have assigned to this project (${persistedSelectedPanel.name}) is owned by another user,\n        ${projectPanelUser.first_name} ${projectPanelUser.last_name}. If you change to another panel and save, you will\n        no longer be able to assign this panel to this project.\n      `;\n    return message;\n  }\n\n  get isPersistedSelectedPanelRetired() {\n    const { persistedSelectedPanel } = this.props;\n    if (persistedSelectedPanel === undefined) return false;\n    return persistedSelectedPanel.retired;\n  }\n\n  isPersistedSelectedPanelCustomAndOwnedByAnotherUser(panel) {\n    const { currentUser, persistedSelectedPanel } = this.props;\n    return (\n      persistedSelectedPanel && // there is a persisted selected panel\n      persistedSelectedPanel.user_id && // the persisted selected panel is a custom panel\n      panel.user_id !== persistedSelectedPanel.user_id && // the persisted selected panel does not belong to the same user\n      persistedSelectedPanel.user_id !== currentUser.id // the persisted selected panel does not belong the current user\n    );\n  }\n\n  renderPanel(panel, index) {\n    return (\n      <div\n        className={this.panelClassNames(panel, index).join(\" \")}\n        key={panel.id}\n        onClick={() => this.selectPanel(panel.id)}\n      >\n        <div className=\"pp__panel__name\" data-testid=\"panel-name\">\n          {panel.name}\n        </div>\n        <div className=\"pp__panel__ul_listed\">{panel.user_id === null ? panel.ul_listed_status : \"NA\"}</div>\n        {this.renderRailPlatformSpecificCompatibilityCells(panel)}\n        {this.renderBxCompatibilityCells(panel)}\n        {this.renderContourCompatibilityCell(panel)}\n        <div className=\"pp__panel__details\">{this.renderPanelDetailsButton(panel)}</div>\n      </div>\n    );\n  }\n\n  renderPanelDetailsButton(panel) {\n    const { projectType, projectId, railPlatform, efoAvailable, stopperAvailable } = this.props;\n\n    return (\n      <button\n        data-action=\"click->components--ir-dialog--turbo-frame-details#clickToOpen\"\n        className=\"ir-btn ir-btn--gray ir-btn--icon-prepend ir-btn--small\"\n        {...detailsLinkParams(panel, projectType, projectId, railPlatform, efoAvailable, stopperAvailable)}\n      >\n        <span className=\"ir-btn__icon\">\n          <i className=\"fas fa-magnifying-glass\" />\n        </span>\n        <span className=\"ir-btn__text\">Details</span>\n      </button>\n    );\n  }\n\n  renderRailPlatformSpecificCompatibilityCells(panel) {\n    if (this.props.projectType === \"BX\") return;\n\n    if (this.props.railPlatform === \"xr\") {\n      return this.renderXrPanelCompatibilityCells(panel);\n    } else if (this.props.railPlatform === \"aire\") {\n      return this.renderAirePanelCompatibilityCells(panel);\n    } else if (this.props.railPlatform === \"clickfit\") {\n      return this.renderClickfitPanelCompatibilityCells(panel);\n    }\n  }\n\n  renderXrPanelCompatibilityCells(panel) {\n    return (\n      <>\n        <div className=\"pp__panel__ufo\">{this.compatibilityIcon(panel, \"ufo_thickness_compatibility\")}</div>\n        {this.props.stopperAvailable && (\n          <div className=\"pp__panel__ufo_stopper\">\n            {this.compatibilityIcon(panel, \"ufo_stopper_thickness_compatibility\")}\n          </div>\n        )}\n        {this.props.efoAvailable && (\n          <div className=\"pp__panel__efo\">{this.compatibilityIcon(panel, \"efo_thickness_compatibility\")}</div>\n        )}\n        <div className=\"pp__panel__camo\">{this.renderSidesCompatibilityIcons(panel, \"camo\")}</div>\n        <div className=\"pp__panel__eclipse\">{this.renderSidesCompatibilityIcons(panel, \"eclipse\")}</div>\n      </>\n    );\n  }\n\n  renderAirePanelCompatibilityCells(panel) {\n    return (\n      <>\n        <div className=\"pp__panel__aire_mid\">\n          {this.compatibilityIcon(panel, \"aire_lock_mid_thickness_compatibility\")}\n        </div>\n        <div className=\"pp__panel__aire_end\">\n          {this.compatibilityIcon(panel, \"aire_lock_end_thickness_compatibility\")}\n        </div>\n        <div className=\"pp__panel__aire_stealth\">{this.renderSidesCompatibilityIcons(panel, \"aire_lock_stealth\")}</div>\n      </>\n    );\n  }\n\n  renderClickfitPanelCompatibilityCells(panel) {\n    return (\n      <>\n        <div className=\"pp__panel__clickfit_mid\">\n          {this.compatibilityIcon(panel, \"clickfit_mid_thickness_compatibility\")}\n        </div>\n        <div className=\"pp__panel__clickfit_end\">\n          {this.compatibilityIcon(panel, \"clickfit_end_thickness_compatibility\")}\n        </div>\n      </>\n    );\n  }\n\n  renderSidesCompatibilityIcons(panel, part) {\n    const longIcon = this.compatibilityIcon(panel, `${part}_flange_compatibility_long_side`, \"L\");\n    const shortIcon = this.compatibilityIcon(panel, `${part}_flange_compatibility_short_side`, \"S\");\n\n    const longCompatibility = panel[`${part}_flange_compatibility_long_side`];\n    const shortCompatibility = panel[`${part}_flange_compatibility_short_side`];\n\n    const longUsability = this.usableText(longCompatibility);\n    const shortUsability = this.usableText(shortCompatibility);\n\n    const toolTipContent = `Long side: ${longCompatibility.replace(\n      \"_\",\n      \" \",\n    )} (${longUsability})<br /> Short side: ${shortCompatibility.replace(\"_\", \" \")} (${shortUsability})`;\n\n    return (\n      <span\n        className=\"compat_container text-nowrap bg-gray-100 p-2 rounded\"\n        data-controller=\"components--ir-tooltip\"\n        data-components--ir-tooltip-content-value={toolTipContent}\n      >\n        <span className=\"me-3\">{longIcon}</span>\n        {shortIcon}\n      </span>\n    );\n  }\n\n  usableText(compatibility) {\n    if (compatibility === \"compatible\" || compatibility === \"soft_compatible\") {\n      return \"usable\";\n    } else if (compatibility === \"incompatible\" || compatibility === \"unknown\") {\n      return \"not usable\";\n    }\n  }\n\n  renderBxCompatibilityCells(panel) {\n    if (this.props.projectType !== \"BX\") return;\n\n    return (\n      <>\n        <div className=\"pp__panel__bx_width\">{this.compatibilityIcon(panel, \"bx_width_compatibility\")}</div>\n        <div className=\"pp__panel__bx_thickness\">{this.compatibilityIcon(panel, \"bx_thickness_compatibility\")}</div>\n      </>\n    );\n  }\n\n  renderContourCompatibilityCell(panel) {\n    if (!this.showContour) return;\n\n    return <div className=\"pp__panel__contour\">{this.renderSidesCompatibilityIcons(panel, \"contour\")}</div>;\n  }\n\n  get showContour() {\n    return ![\"BX\", \"FR4\", \"GB4\", \"FR\", \"GB\"].includes(this.props.projectType);\n  }\n\n  compatibilityIcon(panel, compatibility_property, prefix = \"\") {\n    const compat = panel[compatibility_property];\n    let prefixSpan = \"\";\n    if (prefix) {\n      prefixSpan = <span className=\"pe-1 icon_prefix\">{prefix}:</span>;\n    }\n\n    if (compat === \"compatible\") {\n      return (\n        <span className=\"text-green-500\">\n          {prefixSpan}\n          <i className=\"fas fa-check\" />\n        </span>\n      );\n    } else if (compat === \"incompatible\") {\n      return (\n        <span className=\"text-red-600\">\n          {prefixSpan}\n          <i className=\"fas fa-times\" />\n        </span>\n      );\n    } else if (compat === \"soft_compatible\") {\n      return (\n        <span className=\"text-yellow-600\">\n          {prefixSpan}\n          <i className=\"fas fa-question\" />\n        </span>\n      );\n    } else if (compat === \"unknown\") {\n      return (\n        <span className=\"text-red-600\">\n          {prefixSpan}\n          <i className=\"fas fa-question\" />\n        </span>\n      );\n    }\n  }\n\n  renderPanels() {\n    const { filteredPanels } = this.state;\n    const { loadingPanels } = this.props;\n\n    if (loadingPanels) {\n      return (\n        <div className=\"pp__panels__loading\">\n          <div className=\"pp__panels__loading__spinner-icon\" />\n          <div className=\"pp__panels__loading__text\" data-testid=\"loading-panels\">\n            Loading\n          </div>\n        </div>\n      );\n    }\n\n    if (filteredPanels.length === 0) {\n      return <NoMatchingRecords />;\n    }\n\n    return (\n      <>\n        <div className=\"pp__panels__header\">\n          <div className=\"pp__panel__name\">Name</div>\n          <div className=\"pp__panel__ul_listed\">UL Listed</div>\n          {this.renderRailsPlatformSpecificHeaders()}\n          {this.renderBxHeaders()}\n          {this.renderContourHeader()}\n        </div>\n        <div className=\"pp__panels__container\">{filteredPanels.map((p, i) => this.renderPanel(p, i))}</div>\n      </>\n    );\n  }\n\n  renderRailsPlatformSpecificHeaders() {\n    if (this.props.projectType === \"BX\") return;\n\n    if (this.props.railPlatform === \"xr\") {\n      return (\n        <>\n          <div className=\"pp__panel__ufo\">UFO</div>\n          {this.props.stopperAvailable && <div className=\"pp__panel__ufo_stopper\">Stopper</div>}\n          {this.props.efoAvailable && <div className=\"pp__panel__efo\">EFO</div>}\n          <div className=\"pp__panel__camo\">CAMO</div>\n          <div className=\"pp__panel__eclipse\">Eclipse</div>\n        </>\n      );\n    } else if (this.props.railPlatform === \"aire\") {\n      return (\n        <>\n          <div className=\"pp__panel__aire_mid\">Aire Mid</div>\n          <div className=\"pp__panel__aire_end\">Aire End</div>\n          <div className=\"pp__panel__aire_stealth\">Aire Stealth</div>\n        </>\n      );\n    } else if (this.props.railPlatform === \"clickfit\") {\n      return (\n        <>\n          <div className=\"pp__panel__clickfit_mid\">ClickFit Mid</div>\n          <div className=\"pp__panel__clickfit_end\">ClickFit End</div>\n        </>\n      );\n    }\n  }\n\n  renderBxHeaders() {\n    if (this.props.projectType !== \"BX\") return;\n\n    return (\n      <>\n        <div className=\"pp__panel__bx_width\">Width</div>\n        <div className=\"pp__panel__bx_thickness\">Thickness</div>\n      </>\n    );\n  }\n\n  renderContourHeader() {\n    if (!this.showContour) return;\n\n    return <div className=\"pp__panel__contour\">Contour</div>;\n  }\n\n  renderPanelSelectHeading() {\n    const { selectedPanel } = this;\n\n    return (\n      <>\n        {selectedPanel && (\n          <div style={{ paddingBottom: \"1.5rem\" }}>\n            <span>Panel:</span> <b className=\"pp__panel__selected-panel-name\">{selectedPanel.name}</b>\n          </div>\n        )}\n        <div>\n          <h4 className=\"pp__select-title\" data-testid=\"select-panel-title\">\n            Select a {selectedPanel && <span>different</span>} panel\n            {this.renderPanelSelectHeadingMarker()}\n          </h4>\n        </div>\n      </>\n    );\n  }\n\n  render() {\n    const { searchTerm, currentSelectionIndex, filteredPanels } = this.state;\n\n    return (\n      <div className=\"ir-form\">\n        {this.renderPanelSelectHeading()}\n        <SearchField\n          id=\"panel-search\"\n          searchTerm={searchTerm}\n          searchTermChange={this.searchTermChange}\n          currentSelectionIndex={currentSelectionIndex}\n          setCurrentSelectionIndex={this.setCurrentSelectionIndex}\n          collectionCount={filteredPanels.length}\n          selectCollectionItemFromCurrentSelectionIndex={this.selectCollectionItemFromCurrentSelectionIndex}\n          isValidSelectionIndex={this.isValidSelectionIndex}\n          allSelectionsInvalid={this.allFilteredPanelsDisabled}\n        />\n        {this.renderPanels()}\n      </div>\n    );\n  }\n}\n\nexport default PanelSelectBase;\n", "import React from \"react\";\nimport PropTypes from \"prop-types\";\n\nfunction Filter({ checked, onChange, message }) {\n  return (\n    <div className=\"pp__filter\">\n      <label>\n        <input type=\"checkbox\" checked={checked} onChange={onChange} /> {message}\n      </label>\n    </div>\n  );\n}\n\nFilter.propTypes = {\n  checked: PropTypes.bool.isRequired,\n  onChange: PropTypes.func.isRequired,\n  message: PropTypes.string.isRequired,\n};\n\nexport default React.memo(Filter);\n", "import React from \"react\";\nimport PropTypes from \"prop-types\";\n\nexport const TAB_IR = \"ironridge-supported\";\nexport const TAB_CP = \"custom-panels\";\n\nfunction TabNav({ activeTab, onTabClick }) {\n  return (\n    <div className=\"ir-content-box__tab-nav__bar\">\n      <ul className=\"ir-content-box__tab-nav\">\n        <Tab name=\"IronRidge Supported\" value={TAB_IR} activeTab={activeTab} onTabClick={onTabClick} />\n        <Tab name=\"Custom Panels\" value={TAB_CP} activeTab={activeTab} onTabClick={onTabClick} />\n      </ul>\n    </div>\n  );\n}\n\nfunction Tab({ name, value, activeTab, onTabClick }) {\n  const classes = [\"ir-content-box__tab-nav__item\"];\n  if (activeTab === value) classes.push(\"ir-content-box__tab-nav__item--active\");\n\n  return (\n    <li>\n      <button type=\"button\" className={classes.join(\" \")} onClick={() => onTabClick(value)}>\n        {name}\n      </button>\n    </li>\n  );\n}\n\nTabNav.propTypes = {\n  activeTab: PropTypes.string.isRequired,\n  onTabClick: PropTypes.func.isRequired,\n};\n\nexport default React.memo(TabNav);\n", "import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { customPanelPropTypeShape, endClampPropTypeShape } from \"../helper\";\nimport PanelSelectBase from \"./PanelSelectBase\";\n\nclass CustomPanelsSelect extends PanelSelectBase {\n  static propTypes = {\n    projectType: PropTypes.string.isRequired,\n    loadingPanels: PropTypes.bool.isRequired,\n    panels: PropTypes.arrayOf(customPanelPropTypeShape),\n    selectPanel: PropTypes.func.isRequired,\n    selectedPanelId: PropTypes.number,\n    endClamp: endClampPropTypeShape,\n    onlyShowUlListedAndCompatible: PropTypes.bool.isRequired,\n    hidePanelPickerDialog: PropTypes.func.isRequired,\n    railPlatform: PropTypes.string.isRequired,\n    efoAvailable: PropTypes.bool.isRequired,\n    stopperAvailable: PropTypes.bool.isRequired,\n    createdBefore42mmStopperSleeveUfoCutoffDate: PropTypes.bool.isRequired,\n  };\n\n  componentDidUpdate(prevProps, _prevState, _snapshot) {\n    const { panels } = this.props;\n\n    if (JSON.stringify(prevProps.panels) !== JSON.stringify(panels)) {\n      this.searchTermChange(\"\");\n    }\n  }\n\n  setFilteredPanels() {\n    const { panels } = this.props;\n    if (!panels) return;\n    const { searchTerm } = this.state;\n\n    let filteredPanels;\n    if (searchTerm.length === 0 && !this.props.onlyShowUlListedAndCompatible) {\n      filteredPanels = panels;\n    } else {\n      filteredPanels = panels.filter(this.shouldIncludePanelInFilteredList);\n    }\n\n    this.setState({ filteredPanels });\n  }\n\n  shouldIncludePanelInFilteredList = (panel) => {\n    const { searchTerm } = this.state;\n    const { onlyShowUlListedAndCompatible, projectType } = this.props;\n\n    if (searchTerm.length > 0) {\n      const includesSearchTerm = panel.name.toLowerCase().includes(searchTerm.toLowerCase());\n      if (!includesSearchTerm) return false;\n    }\n\n    if (onlyShowUlListedAndCompatible && projectType != \"BX\" && this.isPrFrGbProjectAndNotLengthCompatible(panel)) {\n      return false;\n    }\n\n    if (onlyShowUlListedAndCompatible && panel.fire_rating_compatible === false) {\n      return false;\n    }\n\n    return true;\n  };\n\n  isUlApproved(panel) {\n    return panel.ul_listed_status === \"approved\";\n  }\n\n  panelIsDisabled(panel) {\n    const { projectType } = this.props;\n\n    if (projectType === \"BX\") return false;\n\n    if (this.isPrFrGbProjectAndNotLengthCompatible(panel)) {\n      return true;\n    } else {\n      if (this.props.endClamp === \"stopper\" && panel.thickness_mm === 42) {\n        return !this.props.createdBefore42mmStopperSleeveUfoCutoffDate;\n      } else {\n        return false;\n      }\n    }\n  }\n\n  panelClassNames(panel, index) {\n    const { currentSelectionIndex } = this.state;\n    const { projectType } = this.props;\n\n    const classNames = [\"pp__panels__panel\"];\n    if (currentSelectionIndex === index) {\n      classNames.push(\"pp__panels__panel--selected\");\n    }\n\n    if ((projectType != \"BX\" && this.isPrFrGbProjectAndNotLengthCompatible(panel)) || this.panelIsDisabled(panel)) {\n      classNames.push(\"pp__panels__panel--disabled\");\n    }\n\n    return classNames;\n  }\n\n  isValidSelectionIndex = (_selectionIndex) => {\n    return true;\n  };\n\n  get allFilteredPanelsDisabled() {\n    return false;\n  }\n\n  renderPanelSelectHeadingMarker() {\n    return (\n      <div className=\"pp__select-title__marker-right\">\n        <a href=\"/my_custom_panels\">\n          manage list <i className=\"fas fa-arrow-right\"></i>\n        </a>\n      </div>\n    );\n  }\n}\n\nexport default CustomPanelsSelect;\n", "import { Controller } from \"@hotwired/stimulus\";\nimport { confirmDialog } from \"../components/ir_dialog/helper\";\nimport { submitWithTabId } from \"../../helpers/form\";\nexport default class PaymentRequestConfirmation extends Controller {\n  static targets = [\"form\", \"customerEmail\", \"partnerSelect\", \"productSelect\", \"projectId\"];\n\n  open(event) {\n    event.preventDefault();\n\n    const callback = (confirmed) => {\n      if (!confirmed) return;\n\n      submitWithTabId(this.formTarget);\n    };\n\n    const clickPosition = { x: event.pageX, y: event.pageY };\n    const message = `\n      Please confirm the following payment request details.\n      <br />\n      <br />\n      <strong>Project id:</strong> ${this.projectIdTarget.value}\n      <br />\n      <strong>Partner:</strong> ${this.partnerSelectTarget.options[this.partnerSelectTarget.selectedIndex].text}\n      <br />\n      <strong>Product:</strong> ${this.productSelectTarget.options[this.productSelectTarget.selectedIndex].text}\n      <br />\n      <strong>Customer email:</strong> ${this.customerEmailTarget.value} (customer will be emailed on confirmation)\n    `;\n    confirmDialog(message, callback, {\n      title: \"Confirm payment request\",\n      confirmBtnColor: \"green\",\n      headerColor: \"orange\",\n      showNearClickPosition: true,\n      clickPosition,\n    });\n  }\n}\n", "export default class {\n  get displayString() {\n    const { street, city, state, zip } = this;\n    const hasStreet = street && street !== \"\";\n    const hasCity = city && city !== \"\";\n    const hasState = state && state !== \"\";\n    const hasZip = zip && zip !== \"\";\n\n    let result = \"\";\n    if (hasStreet) {\n      result += street;\n      if (hasCity || hasState || hasZip) result += \"\\n<br />\\n\";\n    }\n\n    if (hasCity) {\n      result += city;\n      if (hasState || hasZip) result += \", \";\n    }\n    if (hasState) {\n      result += state;\n      if (hasZip) result += \" \";\n    }\n    if (hasZip) result += zip;\n\n    return result;\n  }\n\n  equals(location) {\n    return this.compareString === location.compareString;\n  }\n\n  get compareString() {\n    return `${this.street} ${this.city} ${this.state} ${this.zip}`;\n  }\n}\n", "import Location from \"./location\";\n\nexport default class extends Location {\n  constructor({ street, city, state, zip, lat, lng }) {\n    super();\n    this.street = street;\n    this.city = city;\n    this.state = state;\n    this.zip = zip;\n    this.lat = lat;\n    this.lng = lng;\n  }\n}\n", "// Country-specific mappings for administrative divisions\n// This handles how different countries structure their administrative hierarchies\n\n// Common mapping patterns to reduce redundancy\nconst PATTERNS = {\n  // Standard pattern: uses admin_level_1 with short codes\n  STANDARD_SHORT: {\n    stateLevel: \"administrative_area_level_1\",\n    stateFormat: \"short\",\n    requiresState: true,\n  },\n\n  // Standard pattern: uses admin_level_1 with long names\n  STANDARD_LONG: {\n    stateLevel: \"administrative_area_level_1\",\n    stateFormat: \"long\",\n    requiresState: true,\n  },\n\n  // Uses admin_level_2 (for countries where level 2 is more relevant)\n  LEVEL2_LONG: {\n    stateLevel: \"administrative_area_level_2\",\n    stateFormat: \"long\",\n    requiresState: false,\n  },\n\n  // US territories that use country code as state\n  US_TERRITORY: {\n    stateLevel: \"country\",\n    stateFormat: \"short\",\n    mapCountryTo: \"US\",\n    requiresState: true,\n  },\n\n  // Optional states/provinces\n  OPTIONAL_LONG: {\n    stateLevel: \"administrative_area_level_1\",\n    stateFormat: \"long\",\n    requiresState: false,\n  },\n};\n\nexport const COUNTRY_ADMINISTRATIVE_MAPPINGS = {\n  // United States and territories\n  US: PATTERNS.STANDARD_SHORT,\n  PR: PATTERNS.US_TERRITORY, // Puerto Rico\n  GU: PATTERNS.US_TERRITORY, // Guam\n  VI: PATTERNS.US_TERRITORY, // US Virgin Islands\n  AS: PATTERNS.US_TERRITORY, // American Samoa\n  MP: PATTERNS.US_TERRITORY, // Northern Mariana Islands\n\n  // North America\n  CA: { ...PATTERNS.STANDARD_SHORT, stateName: \"province\" }, // Canada\n  MX: PATTERNS.STANDARD_LONG, // Mexico\n\n  // South America\n  AR: { ...PATTERNS.STANDARD_LONG, stateName: \"province\" }, // Argentina\n  BR: PATTERNS.STANDARD_SHORT, // Brazil\n  CL: PATTERNS.STANDARD_LONG, // Chile\n  CO: PATTERNS.STANDARD_LONG, // Colombia\n  EC: { ...PATTERNS.STANDARD_LONG, stateName: \"province\" }, // Ecuador\n  PE: PATTERNS.STANDARD_LONG, // Peru\n  UY: PATTERNS.STANDARD_LONG, // Uruguay\n  VE: PATTERNS.STANDARD_LONG, // Venezuela\n  BO: PATTERNS.STANDARD_LONG, // Bolivia\n  PY: PATTERNS.STANDARD_LONG, // Paraguay\n  SR: PATTERNS.STANDARD_LONG, // Suriname\n  GY: PATTERNS.STANDARD_LONG, // Guyana\n\n  // Europe\n  GB: { ...PATTERNS.LEVEL2_LONG, stateName: \"county\" }, // United Kingdom\n  DE: { ...PATTERNS.OPTIONAL_LONG, stateName: \"state\" }, // Germany\n  FR: { ...PATTERNS.LEVEL2_LONG, stateName: \"department\" }, // France\n  ES: { ...PATTERNS.OPTIONAL_LONG, stateName: \"autonomous_community\" }, // Spain\n  IT: { ...PATTERNS.LEVEL2_LONG, stateFormat: \"short\", stateName: \"province\" }, // Italy\n  NL: { ...PATTERNS.OPTIONAL_LONG, stateName: \"province\" }, // Netherlands\n  BE: { ...PATTERNS.OPTIONAL_LONG, stateName: \"province\" }, // Belgium\n  CH: { ...PATTERNS.STANDARD_SHORT, stateName: \"canton\" }, // Switzerland\n  AT: PATTERNS.OPTIONAL_LONG, // Austria\n  PT: PATTERNS.OPTIONAL_LONG, // Portugal\n  SE: PATTERNS.OPTIONAL_LONG, // Sweden\n  NO: PATTERNS.OPTIONAL_LONG, // Norway\n  DK: PATTERNS.OPTIONAL_LONG, // Denmark\n  FI: PATTERNS.OPTIONAL_LONG, // Finland\n  PL: { ...PATTERNS.OPTIONAL_LONG, stateName: \"voivodeship\" }, // Poland\n  CZ: PATTERNS.OPTIONAL_LONG, // Czech Republic\n  HU: PATTERNS.OPTIONAL_LONG, // Hungary\n  RO: PATTERNS.OPTIONAL_LONG, // Romania\n  BG: PATTERNS.OPTIONAL_LONG, // Bulgaria\n  GR: PATTERNS.OPTIONAL_LONG, // Greece\n  HR: PATTERNS.OPTIONAL_LONG, // Croatia\n  SI: PATTERNS.OPTIONAL_LONG, // Slovenia\n  SK: PATTERNS.OPTIONAL_LONG, // Slovakia\n  EE: PATTERNS.OPTIONAL_LONG, // Estonia\n  LV: PATTERNS.OPTIONAL_LONG, // Latvia\n  LT: PATTERNS.OPTIONAL_LONG, // Lithuania\n  IE: { ...PATTERNS.OPTIONAL_LONG, stateName: \"county\" }, // Ireland\n  IS: PATTERNS.OPTIONAL_LONG, // Iceland\n  LU: PATTERNS.OPTIONAL_LONG, // Luxembourg\n  AL: PATTERNS.OPTIONAL_LONG, // Albania\n  BA: PATTERNS.OPTIONAL_LONG, // Bosnia and Herzegovina\n  RS: PATTERNS.OPTIONAL_LONG, // Serbia\n  ME: PATTERNS.OPTIONAL_LONG, // Montenegro\n  MK: PATTERNS.OPTIONAL_LONG, // North Macedonia\n  CY: PATTERNS.OPTIONAL_LONG, // Cyprus\n\n  // Asia\n  JP: { ...PATTERNS.STANDARD_LONG, stateName: \"prefecture\" }, // Japan\n  CN: { ...PATTERNS.STANDARD_LONG, stateName: \"province\" }, // China\n  IN: PATTERNS.STANDARD_LONG, // India\n  ID: { ...PATTERNS.STANDARD_LONG, stateName: \"province\" }, // Indonesia\n  TH: { ...PATTERNS.STANDARD_LONG, stateName: \"province\" }, // Thailand\n  MY: PATTERNS.STANDARD_LONG, // Malaysia\n  SG: PATTERNS.OPTIONAL_LONG, // Singapore (city-state)\n  PH: { ...PATTERNS.STANDARD_LONG, stateName: \"province\" }, // Philippines\n  VN: { ...PATTERNS.STANDARD_LONG, stateName: \"province\" }, // Vietnam\n  KR: { ...PATTERNS.STANDARD_LONG, stateName: \"province\" }, // South Korea\n  TW: PATTERNS.STANDARD_LONG, // Taiwan\n  HK: PATTERNS.OPTIONAL_LONG, // Hong Kong\n  BD: PATTERNS.STANDARD_LONG, // Bangladesh\n  PK: { ...PATTERNS.STANDARD_LONG, stateName: \"province\" }, // Pakistan\n  LK: { ...PATTERNS.STANDARD_LONG, stateName: \"province\" }, // Sri Lanka\n  NP: { ...PATTERNS.STANDARD_LONG, stateName: \"province\" }, // Nepal\n  MM: PATTERNS.STANDARD_LONG, // Myanmar\n  KH: { ...PATTERNS.STANDARD_LONG, stateName: \"province\" }, // Cambodia\n  AF: { ...PATTERNS.STANDARD_LONG, stateName: \"province\" }, // Afghanistan\n  IR: { ...PATTERNS.STANDARD_LONG, stateName: \"province\" }, // Iran\n  IQ: { ...PATTERNS.STANDARD_LONG, stateName: \"governorate\" }, // Iraq\n  SA: { ...PATTERNS.STANDARD_LONG, stateName: \"province\" }, // Saudi Arabia\n  AE: { ...PATTERNS.STANDARD_LONG, stateName: \"emirate\" }, // UAE\n  IL: PATTERNS.OPTIONAL_LONG, // Israel\n  JO: { ...PATTERNS.STANDARD_LONG, stateName: \"governorate\" }, // Jordan\n  LB: { ...PATTERNS.STANDARD_LONG, stateName: \"governorate\" }, // Lebanon\n  SY: { ...PATTERNS.STANDARD_LONG, stateName: \"governorate\" }, // Syria\n  TR: { ...PATTERNS.STANDARD_LONG, stateName: \"province\" }, // Turkey\n  AM: PATTERNS.STANDARD_LONG, // Armenia\n  GE: PATTERNS.STANDARD_LONG, // Georgia\n  AZ: PATTERNS.STANDARD_LONG, // Azerbaijan\n  KZ: PATTERNS.STANDARD_LONG, // Kazakhstan\n  UZ: PATTERNS.STANDARD_LONG, // Uzbekistan\n  KG: PATTERNS.STANDARD_LONG, // Kyrgyzstan\n  MN: { ...PATTERNS.STANDARD_LONG, stateName: \"province\" }, // Mongolia\n  BT: PATTERNS.STANDARD_LONG, // Bhutan\n  OM: { ...PATTERNS.STANDARD_LONG, stateName: \"governorate\" }, // Oman\n  QA: PATTERNS.OPTIONAL_LONG, // Qatar\n  KW: { ...PATTERNS.STANDARD_LONG, stateName: \"governorate\" }, // Kuwait\n  BH: { ...PATTERNS.STANDARD_LONG, stateName: \"governorate\" }, // Bahrain\n  YE: { ...PATTERNS.STANDARD_LONG, stateName: \"governorate\" }, // Yemen\n\n  // Africa\n  ZA: { ...PATTERNS.STANDARD_LONG, stateName: \"province\" }, // South Africa\n  EG: { ...PATTERNS.STANDARD_LONG, stateName: \"governorate\" }, // Egypt\n  MA: PATTERNS.STANDARD_LONG, // Morocco\n  TN: { ...PATTERNS.STANDARD_LONG, stateName: \"governorate\" }, // Tunisia\n  DZ: { ...PATTERNS.STANDARD_LONG, stateName: \"province\" }, // Algeria\n  LY: PATTERNS.STANDARD_LONG, // Libya\n  KE: { ...PATTERNS.STANDARD_LONG, stateName: \"county\" }, // Kenya\n  NG: PATTERNS.STANDARD_LONG, // Nigeria\n  GH: PATTERNS.STANDARD_LONG, // Ghana\n  ET: PATTERNS.STANDARD_LONG, // Ethiopia\n  TZ: PATTERNS.STANDARD_LONG, // Tanzania\n  UG: PATTERNS.STANDARD_LONG, // Uganda\n  ZW: { ...PATTERNS.STANDARD_LONG, stateName: \"province\" }, // Zimbabwe\n  ZM: { ...PATTERNS.STANDARD_LONG, stateName: \"province\" }, // Zambia\n  MW: PATTERNS.STANDARD_LONG, // Malawi\n  MZ: { ...PATTERNS.STANDARD_LONG, stateName: \"province\" }, // Mozambique\n  BW: PATTERNS.STANDARD_LONG, // Botswana\n  NA: PATTERNS.STANDARD_LONG, // Namibia\n  SN: PATTERNS.STANDARD_LONG, // Senegal\n  CM: PATTERNS.STANDARD_LONG, // Cameroon\n  CI: PATTERNS.STANDARD_LONG, // C\u00F4te d'Ivoire\n  BF: PATTERNS.STANDARD_LONG, // Burkina Faso\n  NE: PATTERNS.STANDARD_LONG, // Niger\n  ML: PATTERNS.STANDARD_LONG, // Mali\n  MR: PATTERNS.STANDARD_LONG, // Mauritania\n  TG: PATTERNS.STANDARD_LONG, // Togo\n  BJ: PATTERNS.STANDARD_LONG, // Benin\n  GN: PATTERNS.STANDARD_LONG, // Guinea\n  SL: PATTERNS.STANDARD_LONG, // Sierra Leone\n  LR: PATTERNS.STANDARD_LONG, // Liberia\n  GA: { ...PATTERNS.STANDARD_LONG, stateName: \"province\" }, // Gabon\n  CD: { ...PATTERNS.STANDARD_LONG, stateName: \"province\" }, // Democratic Republic of Congo\n  CF: PATTERNS.STANDARD_LONG, // Central African Republic\n  SS: PATTERNS.STANDARD_LONG, // South Sudan\n  SD: PATTERNS.STANDARD_LONG, // Sudan\n  DJ: PATTERNS.STANDARD_LONG, // Djibouti\n  BI: { ...PATTERNS.STANDARD_LONG, stateName: \"province\" }, // Burundi\n  SO: PATTERNS.STANDARD_LONG, // Somalia\n  MG: { ...PATTERNS.STANDARD_LONG, stateName: \"province\" }, // Madagascar\n\n  // Oceania\n  AU: PATTERNS.STANDARD_SHORT, // Australia\n  NZ: PATTERNS.STANDARD_LONG, // New Zealand\n  PG: { ...PATTERNS.STANDARD_LONG, stateName: \"province\" }, // Papua New Guinea\n  FJ: PATTERNS.OPTIONAL_LONG, // Fiji\n  NC: PATTERNS.OPTIONAL_LONG, // New Caledonia\n  PF: PATTERNS.OPTIONAL_LONG, // French Polynesia\n  WS: PATTERNS.OPTIONAL_LONG, // Samoa\n  VU: { ...PATTERNS.OPTIONAL_LONG, stateName: \"province\" }, // Vanuatu\n  SB: { ...PATTERNS.OPTIONAL_LONG, stateName: \"province\" }, // Solomon Islands\n  FM: PATTERNS.OPTIONAL_LONG, // Micronesia\n  PW: PATTERNS.OPTIONAL_LONG, // Palau\n  MH: PATTERNS.OPTIONAL_LONG, // Marshall Islands\n\n  // Caribbean\n  DO: { ...PATTERNS.STANDARD_LONG, stateName: \"province\" }, // Dominican Republic\n  HT: { ...PATTERNS.STANDARD_LONG, stateName: \"department\" }, // Haiti\n  JM: { ...PATTERNS.STANDARD_LONG, stateName: \"parish\" }, // Jamaica\n  BS: PATTERNS.OPTIONAL_LONG, // Bahamas\n  BB: { ...PATTERNS.OPTIONAL_LONG, stateName: \"parish\" }, // Barbados\n  TT: PATTERNS.OPTIONAL_LONG, // Trinidad and Tobago\n  CU: { ...PATTERNS.STANDARD_LONG, stateName: \"province\" }, // Cuba\n\n  // Other Caribbean territories\n  BM: PATTERNS.OPTIONAL_LONG, // Bermuda\n  KY: PATTERNS.OPTIONAL_LONG, // Cayman Islands\n  TC: PATTERNS.OPTIONAL_LONG, // Turks and Caicos\n  VG: PATTERNS.OPTIONAL_LONG, // British Virgin Islands\n  AI: PATTERNS.OPTIONAL_LONG, // Anguilla\n  MS: PATTERNS.OPTIONAL_LONG, // Montserrat\n  AG: PATTERNS.OPTIONAL_LONG, // Antigua and Barbuda\n  DM: PATTERNS.OPTIONAL_LONG, // Dominica\n  GD: PATTERNS.OPTIONAL_LONG, // Grenada\n  KN: PATTERNS.OPTIONAL_LONG, // Saint Kitts and Nevis\n  LC: PATTERNS.OPTIONAL_LONG, // Saint Lucia\n  VC: PATTERNS.OPTIONAL_LONG, // Saint Vincent and the Grenadines\n  GP: PATTERNS.OPTIONAL_LONG, // Guadeloupe\n  MF: PATTERNS.OPTIONAL_LONG, // Saint Martin\n  BL: PATTERNS.OPTIONAL_LONG, // Saint Barth\u00E9lemy\n  SX: PATTERNS.OPTIONAL_LONG, // Sint Maarten\n  AW: PATTERNS.OPTIONAL_LONG, // Aruba\n  CW: PATTERNS.OPTIONAL_LONG, // Cura\u00E7ao\n  BQ: PATTERNS.OPTIONAL_LONG, // Bonaire\n\n  // Central America\n  GT: { ...PATTERNS.STANDARD_LONG, stateName: \"department\" }, // Guatemala\n  HN: { ...PATTERNS.STANDARD_LONG, stateName: \"department\" }, // Honduras\n  SV: { ...PATTERNS.STANDARD_LONG, stateName: \"department\" }, // El Salvador\n  NI: { ...PATTERNS.STANDARD_LONG, stateName: \"department\" }, // Nicaragua\n  CR: { ...PATTERNS.STANDARD_LONG, stateName: \"province\" }, // Costa Rica\n  PA: { ...PATTERNS.STANDARD_LONG, stateName: \"province\" }, // Panama\n  BZ: PATTERNS.OPTIONAL_LONG, // Belize\n\n  // Other territories and special cases\n  AD: PATTERNS.OPTIONAL_LONG, // Andorra\n  GG: PATTERNS.OPTIONAL_LONG, // Guernsey\n  FO: PATTERNS.OPTIONAL_LONG, // Faroe Islands\n  AQ: PATTERNS.OPTIONAL_LONG, // Antarctica\n\n  // Default for countries not explicitly mapped\n  DEFAULT: PATTERNS.OPTIONAL_LONG,\n};\n\n// Helper function to get mapping for a country\nexport function getCountryMapping(countryCode) {\n  return COUNTRY_ADMINISTRATIVE_MAPPINGS[countryCode] || COUNTRY_ADMINISTRATIVE_MAPPINGS.DEFAULT;\n}\n\n// List of US territories that should be treated as US states\nexport const US_TERRITORIES = [\"PR\", \"GU\", \"VI\", \"AS\", \"MP\"];\n\n// Helper to check if a country code is a US territory\nexport function isUSTerritoryCode(countryCode) {\n  return US_TERRITORIES.includes(countryCode);\n}\n", "// Lookup helpers over the supported US state/territory data the server injects as a Stimulus value.\n// Deliberately holds no table: State::SUPPORTED_US_STATES_AND_TERRITORIES is the single source of\n// truth, delivered from da/project_location/_search_form.html.haml.\n\nexport function createUsStateNormalizer(data = {}) {\n  const states = data.states || {};\n  const aliases = data.aliases || {};\n\n  const codes = new Set(Object.keys(states));\n  const codesByName = new Map([\n    ...Object.entries(states).map(([code, name]) => [name.toUpperCase(), code]),\n    ...Object.entries(aliases).map(([name, code]) => [name.toUpperCase(), code]),\n  ]);\n\n  return {\n    // False when the server payload never arrived. Callers pass the value through untouched rather\n    // than reporting every US address as an anomaly.\n    hasData: codes.size > 0,\n\n    isSupportedCode(value) {\n      return codes.has(value);\n    },\n\n    // Returns the canonical two-letter code, or null when the value is not exactly recognized.\n    normalize(value) {\n      if (typeof value !== \"string\") return null;\n\n      const trimmed = value.trim();\n      if (trimmed === \"\") return null;\n\n      const code = trimmed.toUpperCase();\n      if (codes.has(code)) return code;\n\n      return codesByName.get(code) || null;\n    },\n  };\n}\n\nexport const EMPTY_US_STATE_NORMALIZER = createUsStateNormalizer();\n", "import Location from \"./location\";\nimport { getCountryMapping } from \"./country_administrative_mapping\";\nimport { EMPTY_US_STATE_NORMALIZER } from \"./us_states\";\nimport { sentryException } from \"../../../config/sentry\";\n\nexport const LOOKUP_TYPE_SELECTED = \"selected\";\nexport const LOOKUP_TYPE_REVERSE_GEOCODE = \"reverse_geocode\";\n\nconst US_COUNTRY_CODE = \"US\";\nconst STATE_FALLBACK_MESSAGE = \"[Handled] Google US state required a name-to-code fallback\";\nconst STATE_UNRECOGNIZED_MESSAGE = \"[Handled] Google US state was not recognizable\";\n\n// Creates a location object from a Google Place object with robust error handling\nexport default class extends Location {\n  constructor(place, { lookupType = LOOKUP_TYPE_SELECTED, usStates = EMPTY_US_STATE_NORMALIZER } = {}) {\n    super();\n    this.place = place;\n    this.lookupType = lookupType;\n    this.usStates = usStates;\n    this.placeData = this.placeDataFromPlace();\n    this._cache = {}; // Cache for computed properties\n  }\n\n  get street() {\n    if (this._cache.street !== undefined) return this._cache.street;\n\n    const streetNumber = this.placeData.street_number?.long || \"\";\n    const route = this.placeData.route?.long || \"\";\n\n    // Build street address with proper spacing\n    let result = [streetNumber, route]\n      .filter((part) => part && part.trim() !== \"\")\n      .join(\" \")\n      .trim();\n\n    // Don't default to city - prevents confusion\n    this._cache.street = result;\n    return result;\n  }\n\n  get city() {\n    if (this._cache.city !== undefined) return this._cache.city;\n\n    // Priority order for city detection\n    const cityValue =\n      this.placeData.locality?.long ||\n      this.placeData.sublocality_level_1?.long ||\n      this.placeData.sublocality?.long ||\n      this.placeData.neighborhood?.long ||\n      \"\";\n\n    this._cache.city = cityValue;\n    return cityValue;\n  }\n\n  get state() {\n    if (this._cache.state !== undefined) return this._cache.state;\n\n    const countryCode = this.placeData.country?.short || \"\";\n    const mapping = getCountryMapping(countryCode);\n\n    // Handle special case where state comes from country code\n    if (mapping.stateLevel === \"country\") {\n      this._cache.state = countryCode;\n      return countryCode;\n    }\n\n    // Get the appropriate administrative level based on country\n    const stateData = this.placeData[mapping.stateLevel] || {};\n    const format = mapping.stateFormat || \"short\";\n\n    const rawValue = stateData[format] || \"\";\n    const stateValue = countryCode === US_COUNTRY_CODE ? this.#canonicalUsState(stateData, rawValue) : rawValue;\n\n    this._cache.state = stateValue;\n    return stateValue;\n  }\n\n  get postalCode() {\n    if (this._cache.postalCode !== undefined) return this._cache.postalCode;\n\n    // Handle both regular postal codes and extended codes\n    const postalValue = this.placeData.postal_code?.long || this.placeData.postal_code_suffix?.long || \"\";\n\n    this._cache.postalCode = postalValue;\n    return postalValue;\n  }\n\n  // Alias for backward compatibility\n  get zip() {\n    return this.postalCode;\n  }\n\n  get country() {\n    if (this._cache.country !== undefined) return this._cache.country;\n\n    const countryCode = this.placeData.country?.short || \"\";\n    const mapping = getCountryMapping(countryCode);\n\n    // Some territories/protectorates map to their parent country\n    if (mapping.mapCountryTo) {\n      this._cache.country = mapping.mapCountryTo;\n      return mapping.mapCountryTo;\n    }\n\n    this._cache.country = countryCode;\n    return countryCode;\n  }\n\n  get lat() {\n    if (this._cache.lat !== undefined) return this._cache.lat;\n\n    try {\n      const location = this.place?.geometry?.location;\n      if (!location) return null;\n\n      // Handle both function and direct value\n      const latitude = typeof location.lat === \"function\" ? location.lat() : location.lat;\n      this._cache.lat = latitude;\n      return latitude;\n    } catch (error) {\n      console.error(\"Error getting latitude:\", error);\n      return null;\n    }\n  }\n\n  get lng() {\n    if (this._cache.lng !== undefined) return this._cache.lng;\n\n    try {\n      const location = this.place?.geometry?.location;\n      if (!location) return null;\n\n      // Handle both function and direct value\n      const longitude = typeof location.lng === \"function\" ? location.lng() : location.lng;\n      this._cache.lng = longitude;\n      return longitude;\n    } catch (error) {\n      console.error(\"Error getting longitude:\", error);\n      return null;\n    }\n  }\n\n  // Get formatted address as provided by Google\n  get formattedAddress() {\n    return this.place?.formatted_address || \"\";\n  }\n\n  // Get the name of the place from Google\n  get name() {\n    return this.place?.name || \"\";\n  }\n\n  // Get place ID for future reference\n  get placeId() {\n    return this.place?.place_id || \"\";\n  }\n\n  // Get all available address components for debugging\n  get rawAddressComponents() {\n    return this.place?.address_components || [];\n  }\n\n  placeDataFromPlace() {\n    // Extended list of component types we're interested in\n    const componentTypes = {\n      street_number: {},\n      route: {}, // street name\n      premise: {}, // building name\n      subpremise: {}, // apartment/unit\n      neighborhood: {},\n      sublocality: {}, // district\n      sublocality_level_1: {},\n      sublocality_level_2: {},\n      sublocality_level_3: {},\n      locality: {}, // city\n      administrative_area_level_1: {}, // state/province\n      administrative_area_level_2: {}, // county/department\n      administrative_area_level_3: {}, // minor civil division\n      postal_code: {},\n      postal_code_suffix: {}, // +4 ZIP code\n      country: {},\n    };\n\n    // Clone the structure to avoid reference issues\n    const data = JSON.parse(JSON.stringify(componentTypes));\n\n    // Safely process address components\n    if (Array.isArray(this.place?.address_components)) {\n      this.place.address_components.forEach((component) => {\n        if (component && Array.isArray(component.types)) {\n          component.types.forEach((type) => {\n            if (data.hasOwnProperty(type)) {\n              data[type] = {\n                long: component.long_name || \"\",\n                short: component.short_name || \"\",\n              };\n            }\n          });\n        }\n      });\n    }\n\n    return data;\n  }\n\n  // Utility method to check if all required fields are present\n  isComplete() {\n    return !!(this.street && this.city && this.state && this.postalCode && this.country);\n  }\n\n  // Get a structured address object\n  toAddressObject() {\n    return {\n      street: this.street,\n      city: this.city,\n      state: this.state,\n      postalCode: this.postalCode,\n      country: this.country,\n      lat: this.lat,\n      lng: this.lng,\n      formattedAddress: this.formattedAddress,\n      placeId: this.placeId,\n    };\n  }\n\n  // Format address for display\n  toFormattedString(options = {}) {\n    const { includeCountry = true, singleLine = false } = options;\n\n    const parts = [\n      this.street,\n      this.city,\n      this.state && this.postalCode ? `${this.state} ${this.postalCode}` : this.state || this.postalCode,\n    ].filter((part) => part);\n\n    if (includeCountry && this.country && this.country !== \"US\") {\n      parts.push(this.country);\n    }\n\n    return singleLine ? parts.join(\", \") : parts.join(\"\\n\");\n  }\n\n  // Debug method to see all parsed data\n  debug() {\n    console.log(\"Google Place Data Debug:\");\n    console.log(\"Raw place object:\", this.place);\n    console.log(\"Parsed components:\", this.placeData);\n    console.log(\"Final values:\", this.toAddressObject());\n  }\n\n  // Google's short administrative-area value is optional and can carry a full state name, so it is\n  // not a guarantee of a valid two-letter code. Anything unrecognized is passed through unchanged\n  // for server validation rather than guessed at.\n  #canonicalUsState(stateData, rawValue) {\n    if (!this.usStates.hasData) return rawValue;\n\n    const shortValue = stateData.short || \"\";\n    if (this.usStates.isSupportedCode(shortValue)) return shortValue;\n\n    const mappedCode = this.usStates.normalize(stateData.long || \"\") || this.usStates.normalize(shortValue);\n\n    if (mappedCode) {\n      this.#reportStateAnomaly(STATE_FALLBACK_MESSAGE, stateData);\n      return mappedCode;\n    }\n\n    this.#reportStateAnomaly(STATE_UNRECOGNIZED_MESSAGE, stateData);\n    return rawValue;\n  }\n\n  // Deliberately excludes the formatted address and raw components: this is a data-quality signal,\n  // not a place to log a complete customer address.\n  #reportStateAnomaly(message, stateData) {\n    sentryException(message, {\n      country: this.placeData.country?.short || \"\",\n      longState: stateData.long || \"\",\n      shortState: stateData.short || \"\",\n      lookupType: this.lookupType,\n      placeId: this.placeId,\n    });\n  }\n}\n", "import * as api from \"../../../helpers/api\";\nimport { sentryException } from \"../../../config/sentry\";\n\n// Guards the one-time native attachShadow patch (see forceAutocompleteShadowOpen) so it is\n// installed once across all property-search instances.\nlet autocompleteShadowPatched = false;\n\n// A wrapper for Google Maps related API interactions:\n// * Typing in location search field calls Google Places auto-complete suggestions\n// * Hitting return in location search field or clicking the search button hits Google Places API and returns a result\n//   * Result is shown on Google Map\n// * The map can be panned or zoomed\n//   * Dragging the map keeps the pin in the middle and updates the lat/lng\nexport default class {\n  defaultMapSettings = {\n    mapId: \"property-search-map\",\n    mapTypeId: \"satellite\",\n    disableDefaultUI: true,\n    zoomControl: true,\n    mapTypeControl: false,\n    scaleControl: true,\n    streetViewControl: false,\n    rotateControl: false,\n    fullscreenControl: false,\n  };\n\n  // Fields requested from a selected place via Place.fetchFields().\n  // `id` is always populated on a Place, so it is not (and cannot be) requested here.\n  placeFields = [\"displayName\", \"formattedAddress\", \"location\", \"viewport\", \"addressComponents\"];\n\n  constructor({\n    connectingLat,\n    connectingLng,\n    connectingZoom,\n    mapContainerElement,\n    locationSearchField,\n    mapLocationSearchResultCallback,\n    mapReverseGeolocationResultCallback,\n    mapCenterChangedCallback,\n    mapShowErrorCallback,\n  }) {\n    this.connectingLat = connectingLat;\n    this.connectingLng = connectingLng;\n    this.connectingZoom = connectingZoom;\n\n    this.mapContainerElement = mapContainerElement;\n    this.locationSearchField = locationSearchField;\n\n    this.mapLocationSearchResultCallback = mapLocationSearchResultCallback;\n    this.mapReverseGeolocationResultCallback = mapReverseGeolocationResultCallback;\n    this.mapCenterChangedCallback = mapCenterChangedCallback;\n    this.mapShowErrorCallback = mapShowErrorCallback;\n\n    this.initMap();\n    this.initMapMarker();\n    this.initMapServices();\n    this.initAutoComplete();\n  }\n\n  initMap() {\n    this.currentPlace = null;\n    this.hasBeenDragged = false;\n\n    this.map = new google.maps.Map(this.mapContainerElement, {\n      ...this.defaultMapSettings,\n      center: { lat: this.connectingLat, lng: this.connectingLng },\n      zoom: this.connectingZoom,\n    });\n    // Without this the map may show at 45 degree angle when zooming in\n    this.map.setTilt(0);\n\n    this.map.addListener(\"center_changed\", () => {\n      this.marker.position = this.map.center;\n      this.mapCenterChangedCallback(this.lat, this.lng);\n    });\n\n    this.map.addListener(\"drag\", () => {\n      this.hasBeenDragged = true;\n    });\n  }\n\n  initMapMarker() {\n    this.marker = new google.maps.marker.AdvancedMarkerElement({\n      map: this.map,\n      position: this.map.center,\n    });\n  }\n\n  initMapServices() {\n    this.maxZoomService = new google.maps.MaxZoomService();\n    this.geocoder = new google.maps.Geocoder();\n  }\n\n  initAutoComplete() {\n    // PlaceAutocompleteElement is a web component that renders its own input + suggestion\n    // list, replacing the deprecated google.maps.places.Autocomplete widget.\n    this.forceAutocompleteShadowOpen();\n    this.autocompleteElement = new google.maps.places.PlaceAutocompleteElement();\n    if (this.locationSearchField.dataset.placeholder) {\n      this.autocompleteElement.placeholder = this.locationSearchField.dataset.placeholder;\n    }\n    this.replaceWidgetIcons();\n    this.locationSearchField.appendChild(this.autocompleteElement);\n    this.hideClearButtonHoverBackground();\n\n    // Bias suggestions toward the current map viewport (replaces the old bindTo(\"bounds\")).\n    this.biasAutocompleteToMapBounds();\n    this.map.addListener(\"bounds_changed\", () => this.biasAutocompleteToMapBounds());\n\n    this.autocompleteElement.addEventListener(\"gmp-select\", (event) => this.handlePlaceSelect(event));\n  }\n\n  // Replace the widget's built-in search and clear icons (projected into its `input-icon`\n  // and `clear-icon` slots) with our own SVGs, so their color, opacity, and hover can be\n  // styled \u2014 the shadow-internal icons expose no CSS hook. Visual styling lives in\n  // _property-search.scss; if Google renames these slots the widget falls back to its icons.\n  replaceWidgetIcons() {\n    this.autocompleteElement.innerHTML = `\n      <svg slot=\"input-icon\" class=\"da-property-search__search-icon\" width=\"22\" height=\"22\" viewBox=\"0 0 25 24\" aria-hidden=\"true\">\n        <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M15.56 13.27 21.29 19l-1.49 1.49-5.73-5.73A6.4 6.4 0 0110.3 16a6.5 6.5 0 116.5-6.5c0 1.41-.47 2.7-1.24 3.77M10.3 5a4.5 4.5 0 10-.01 8.99A4.5 4.5 0 0010.3 5\" />\n      </svg>\n      <svg slot=\"clear-icon\" class=\"da-property-search__clear-icon\" width=\"20\" height=\"20\" viewBox=\"0 0 21 20\" aria-hidden=\"true\">\n        <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M10.8 0a10 10 0 100 20 10 10 0 100-20m2.59 6L10.8 8.59 8.21 6 6.8 7.41 9.39 10 6.8 12.59 8.21 14l2.59-2.59L13.39 14l1.41-1.41L12.21 10l2.59-2.59z\" />\n      </svg>\n    `;\n  }\n\n  // PlaceAutocompleteElement mounts a `mode: \"closed\"` shadow root, so its internal clear\n  // button \u2014 whose 48px hover background bleeds past our shorter field \u2014 cannot be reached by\n  // CSS (no part, no custom property) or by JS. We patch attachShadow once, scoped to this\n  // element, to force its shadow open so hideClearButtonHoverBackground can style into it.\n  // Fragile by design: if Google renames the element the patch simply no-ops and the widget's\n  // default chrome returns \u2014 nothing breaks.\n  forceAutocompleteShadowOpen() {\n    if (autocompleteShadowPatched) return;\n    autocompleteShadowPatched = true;\n\n    const original = Element.prototype.attachShadow;\n    Element.prototype.attachShadow = function (init) {\n      const options = this.localName === \"gmp-place-autocomplete\" ? { ...init, mode: \"open\" } : init;\n      return original.call(this, options);\n    };\n  }\n\n  // Inject a stylesheet into the now-open shadow root to drop the clear button's hover\n  // background circle. Retries briefly in case the shadow mounts a frame late; if the internal\n  // class name ever changes the rule just stops matching (the circle returns, no error).\n  hideClearButtonHoverBackground(attempt = 0) {\n    const shadow = this.autocompleteElement.shadowRoot;\n    if (!shadow) {\n      if (attempt < 10) requestAnimationFrame(() => this.hideClearButtonHoverBackground(attempt + 1));\n      return;\n    }\n    const style = document.createElement(\"style\");\n    style.textContent = \".clear-button, .clear-button:hover { background: transparent !important; }\";\n    shadow.appendChild(style);\n  }\n\n  biasAutocompleteToMapBounds() {\n    const bounds = this.map.getBounds();\n    if (bounds) this.autocompleteElement.locationBias = bounds;\n  }\n\n  async handlePlaceSelect({ placePrediction }) {\n    this.hasBeenDragged = false;\n    this.currentPlace = null;\n    if (this.marker) this.marker.map = null;\n\n    try {\n      const place = placePrediction.toPlace();\n      await place.fetchFields({ fields: this.placeFields });\n      this.showPlaceOnMap(this.legacyShapeFromPlace(place));\n    } catch (error) {\n      this.mapShowErrorCallback(\"Sorry, we couldn't load that location. Please try again.\");\n      api.errorHandler(\n        `[Handled Error] Property Search: Google Maps Places fetchFields failed: ${error?.message ?? error}`,\n      );\n    }\n  }\n\n  get lat() {\n    return this.map.center.lat();\n  }\n\n  get lng() {\n    return this.map.center.lng();\n  }\n\n  get zoom() {\n    return this.map.getZoom();\n  }\n\n  currentPositionDistanceFromLatLngInFeet(lat, lng) {\n    const parsedLat = parseFloat(lat);\n    const parsedLng = parseFloat(lng);\n\n    if (\n      Number.isNaN(parsedLat) ||\n      Number.isNaN(parsedLng) ||\n      parsedLat < -90.0 ||\n      parsedLat > 90.0 ||\n      parsedLng < -180.0 ||\n      parsedLng > 180.0\n    ) {\n      const message = `[Handled Error] trying to check distance for invalid lat/lng: ${lat}, ${lng}`;\n      console.log(message);\n      sentryException(message);\n      return 0;\n    }\n    if (!this.map.center) {\n      // Including the map in the message just gives you an [Object object]. Stringifying it doesn't\n      // work because it is cyclic. Including a custom replacer didn't seem worth it.\n      const message = \"[Handled Error] trying to check distance with no map center.\";\n      console.log(message);\n      sentryException(message);\n      return 0;\n    }\n\n    const myLatLng = new google.maps.LatLng(parsedLat, parsedLng);\n    return this.distanceInFeetBetweenLatLng(this.map.center, myLatLng);\n  }\n\n  distanceInFeetBetweenLatLng(latLng1, latLng2) {\n    let meters = 0;\n\n    try {\n      meters = google.maps.geometry.spherical.computeDistanceBetween(latLng1, latLng2);\n      // TODO: remove this once we ensure that errors are gone\n      console.log(`Successfully calculated distance between locations: \"${latLng1}\" to \"${latLng2}\" = ${meters}m`);\n    } catch (error) {\n      const message = `Google maps error: ${error}`;\n      const extras = {\n        latLng1: JSON.stringify(latLng1),\n        latLng2: JSON.stringify(latLng2),\n      };\n      console.log(message);\n      sentryException(message, extras);\n    }\n\n    return meters / 0.3048;\n  }\n\n  setCenter(latLng) {\n    this.map.setCenter(latLng);\n  }\n\n  zoomInMaximumAmount() {\n    // Sometimes the max zoom doesn't appear to fully zoom in.  Adding a bit of a delay to see if it\n    // improves things.\n    setTimeout(() => {\n      this.maxZoomService.getMaxZoomAtLatLng(this.map.center, (response) => {\n        if (response.status !== \"OK\") {\n          console.error(\"Error in MaxZoomService\");\n          return;\n        }\n        this.map.setZoom(response.zoom);\n      });\n    }, 500);\n  }\n\n  disableInteraction() {\n    this.enableInteraction(false);\n  }\n\n  enableInteraction(enabled = true) {\n    this.map.setOptions({\n      draggable: enabled,\n      zoomControl: enabled,\n      scrollwheel: enabled,\n      disableDoubleClickZoom: !enabled,\n    });\n    if (enabled) {\n      google.maps.event.clearListeners(this.map, \"click\");\n    } else {\n      this.map.addListener(\"click\", () => {\n        alert(\"The map is disabled while choosing an address.\");\n      });\n    }\n  }\n\n  // Adapts a new google.maps.places.Place (camelCase) into the legacy shape that\n  // showPlaceOnMap and LocationFromGooglePlace already consume (snake_case), so the\n  // downstream address parsing and the untouched Geocoder path share one contract.\n  legacyShapeFromPlace(place) {\n    return {\n      formatted_address: place.formattedAddress,\n      name: place.displayName,\n      place_id: place.id,\n      geometry: {\n        location: place.location,\n        viewport: place.viewport,\n      },\n      address_components: (place.addressComponents ?? []).map((component) => ({\n        long_name: component.longText,\n        short_name: component.shortText,\n        types: component.types,\n      })),\n    };\n  }\n\n  showPlaceOnMap(place) {\n    if (!place.geometry) return;\n\n    const { location, viewport } = place.geometry;\n    // If the place has a geometry, then present it on a map.\n    if (viewport) {\n      this.map.fitBounds(viewport);\n    } else {\n      this.map.setCenter(location);\n      this.map.setZoom(10);\n    }\n    this.marker.position = this.map.center;\n    this.marker.map = this.map;\n    this.currentPlace = place;\n    this.zoomInMaximumAmount();\n    this.mapLocationSearchResultCallback(place);\n  }\n\n  geocodeCurrentPosition() {\n    const latLng = this.map.center;\n    this.geocoder.geocode({ location: latLng }, (results, status) => {\n      let errorMsg = \"\";\n      if (status === \"OK\") {\n        if (results[0]) {\n          this.mapReverseGeolocationResultCallback({ googlePlace: results[0] });\n          return;\n        }\n        errorMsg = \"Geocode yielded no results.\";\n      } else {\n        errorMsg = `Geocoder failed due to: ${status}.`;\n      }\n      api.errorHandler(`[Handled Error] Reverse geocode for ${latLng.lat()}, ${latLng.lng()}. ${errorMsg}`);\n      this.mapReverseGeolocationResultCallback({ googlePlace: false });\n    });\n  }\n\n  resetToConnectingValues() {\n    this.map.setCenter({ lat: this.connectingLat, lng: this.connectingLng });\n    this.zoomInMaximumAmount();\n  }\n}\n", "import InDialogController from \"../../controller_in_dialog\";\n\nimport LocationFromValues from \"./location_from_values\";\nimport LocationFromGooglePlace, {\n  LOOKUP_TYPE_REVERSE_GEOCODE,\n  LOOKUP_TYPE_SELECTED,\n} from \"./location_from_google_place\";\nimport GoogleMapsFacade from \"./google_maps_facade\";\nimport * as animate from \"../../../helpers/animate\";\nimport { logger, showFlashMessage } from \"../../../helpers/app\";\nimport { submitWithTabId } from \"../../../helpers/form\";\nimport { createUsStateNormalizer } from \"./us_states\";\n\nconst REVERSE_GEOCODE_DRAG_DISTANCE_THRESHOLD_IN_FT = 20;\n\n// Handles behavior around property search.  Uses a combination of Google\n// location services and maps APIs to accept and auto-complete addresses\n// and then display a related map of the location.\nexport default class extends InDialogController {\n  static values = {\n    usStates: Object,\n  };\n\n  static targets = [\n    \"addressDraggedToDisplay\",\n    \"addressSearchedForDisplay\",\n    \"changeProjectNameToAddressDraggedToCheckbox\",\n    \"changeProjectNameToAddressDraggedToCheckboxContainer\",\n    \"changeProjectNameToAddressDraggedToName\",\n    \"changeProjectNameToAddressSearchedForCheckbox\",\n    \"changeProjectNameToAddressSearchedForCheckboxContainer\",\n    \"changeProjectNameToAddressSearchedForName\",\n    \"chooseAddressContainer\",\n    \"chooseAddressDraggedToBtn\",\n    \"chooseAddressSearchAgainBtn\",\n    \"chooseAddressSearchedForBtn\",\n    \"cityField\",\n    \"countryField\",\n    \"displayLat\",\n    \"displayLatLngContainer\",\n    \"displayLng\",\n    \"latField\",\n    \"lngField\",\n    \"locationSearchField\",\n    \"locationSearchFieldContainer\",\n    \"map\",\n    \"nameField\",\n    \"nonUsaPostalCodeField\",\n    \"showMapLink\",\n    \"stateField\",\n    \"streetField\",\n    \"useThisLocationForm\",\n    \"useThisLocationFormContainer\",\n    \"useThisLocationFormSubmitBtn\",\n    \"useThisLocationFormSubmitBtnContainer\",\n    \"zipField\",\n    \"zoomField\",\n  ];\n\n  connect() {\n    if (!this.isOkayToConnect) return;\n\n    this.element.propertySearchController = this;\n\n    this.initGoogleMap();\n\n    window.propertySearchController = this;\n  }\n\n  get isInDialog() {\n    return this.element.closest(\".ir-dialog__container\") === null;\n  }\n\n  initGoogleMap = () => {\n    if (!this.isGoogleMapsLoaded) {\n      setTimeout(this.initGoogleMap, 50);\n      return;\n    }\n\n    this.map = new GoogleMapsFacade({\n      connectingLat: Number.parseFloat(this.latFieldTarget.value),\n      connectingLng: Number.parseFloat(this.lngFieldTarget.value),\n      connectingZoom: Number.parseInt(this.zoomFieldTarget.value),\n      mapContainerElement: this.mapTarget,\n      locationSearchField: this.locationSearchFieldTarget,\n      mapLocationSearchResultCallback: this.mapLocationSearchResultCallback,\n      mapReverseGeolocationResultCallback: this.mapReverseGeolocationResultCallback,\n      mapCenterChangedCallback: this.mapCenterChangedCallback,\n      mapShowErrorCallback: this.mapShowErrorCallback,\n    });\n    this.initializeLocations();\n    this.setupExternalLatLngUpdateMethod();\n  };\n\n  get isGoogleMapsLoaded() {\n    return window.google !== undefined && window.google.maps !== undefined && window.google.maps.places !== undefined;\n  }\n\n  mapLocationSearchResultCallback = (googlePlace) => {\n    this.locationSearchedFor = new LocationFromGooglePlace(googlePlace, {\n      lookupType: LOOKUP_TYPE_SELECTED,\n      usStates: this.usStateNormalizer,\n    });\n    this.useThisLocationFormContainerTarget.classList.remove(\"da-property-search__form--hidden\");\n  };\n\n  mapCenterChangedCallback = (mapLat, mapLng) => {\n    if (this.isMapVisible) this.displayLatLngContainerTarget.classList.remove(\"d-none\");\n    this.useThisLocationFormContainerTarget.classList.remove(\"da-property-search__form--hidden\");\n    this.displayLatTarget.innerHTML = mapLat;\n    this.displayLngTarget.innerHTML = mapLng;\n  };\n\n  mapReverseGeolocationResultCallback = ({ googlePlace }) => {\n    if (!googlePlace) this.submitLocationForm();\n\n    this.locationDraggedTo = new LocationFromGooglePlace(googlePlace, {\n      lookupType: LOOKUP_TYPE_REVERSE_GEOCODE,\n      usStates: this.usStateNormalizer,\n    });\n\n    if (this.locationDraggedTo.equals(this.locationSearchedFor)) {\n      this.submitLocationForm();\n      return;\n    }\n\n    this.showAddressChoiceSelectionUI();\n  };\n\n  submitLocationForm() {\n    submitWithTabId(this.useThisLocationFormTarget);\n  }\n\n  showAddressChoiceSelectionUI() {\n    this.showProjectNameOverrideSelection();\n\n    this.addressSearchedForDisplayTarget.innerHTML = this.locationSearchedFor.displayString;\n    this.addressDraggedToDisplayTarget.innerHTML = this.locationDraggedTo.displayString;\n\n    animate.show(this.chooseAddressContainerTarget);\n    animate.hide(this.locationSearchFieldContainerTarget, { fadeOut: false });\n    animate.hide(this.useThisLocationFormSubmitBtnContainerTarget, { fadeOut: false });\n  }\n\n  showProjectNameOverrideSelection() {\n    this.resetProjectNameOverrides();\n\n    if (this.projectNameField === null) return; // we're in the create form and this doesn't apply\n\n    if (this.projectNameField.value !== this.locationSearchedFor.street) {\n      this.changeProjectNameToAddressSearchedForCheckboxTarget.checked = !this.hasProjectNameBeenEdited;\n      this.changeProjectNameToAddressSearchedForNameTarget.innerHTML = this.locationSearchedFor.street;\n      this.changeProjectNameToAddressSearchedForCheckboxContainerTarget.classList.remove(\"d-none\");\n    }\n\n    if (this.projectNameField.value !== this.locationDraggedTo.street) {\n      this.changeProjectNameToAddressDraggedToCheckboxTarget.checked = !this.hasProjectNameBeenEdited;\n      this.changeProjectNameToAddressDraggedToNameTarget.innerHTML = this.locationDraggedTo.street;\n      this.changeProjectNameToAddressDraggedToCheckboxContainerTarget.classList.remove(\"d-none\");\n    }\n  }\n\n  resetProjectNameOverrides() {\n    this.changeProjectNameToAddressSearchedForCheckboxContainerTarget.classList.add(\"d-none\");\n    this.changeProjectNameToAddressDraggedToCheckboxContainerTarget.classList.add(\"d-none\");\n    this.changeProjectNameToAddressSearchedForCheckboxTarget.checked = false;\n    this.changeProjectNameToAddressDraggedToCheckboxTarget.checked = false;\n  }\n\n  get projectNameField() {\n    return document.querySelector('[data-identifier=\"projectNameField\"]');\n  }\n\n  get hasProjectNameBeenEdited() {\n    return this.projectNameField.value !== this.connectedProjectLocationStreet;\n  }\n\n  mapShowErrorCallback = (msg) => {\n    showFlashMessage({ message: msg, flashType: \"error\" });\n  };\n\n  initializeLocations() {\n    if (this.isProjectPersisted) {\n      this.locationSearchedFor = new LocationFromValues({\n        street: this.streetFieldTarget.value,\n        city: this.cityFieldTarget.value,\n        state: this.stateFieldTarget.value,\n        zip: this.zipFieldTarget.value,\n        lat: this.map.lat,\n        lng: this.map.lng,\n      });\n      this.connectedProjectLocationStreet = this.streetFieldTarget.value;\n    } else {\n      this.locationSearchedFor = null;\n    }\n    this.locationDraggedTo = null;\n  }\n\n  // Used by FX after updating the project location in the roof sections editor\n  setupExternalLatLngUpdateMethod() {\n    if (window.IR_PROPERTY_SEARCH === undefined) window.IR_PROPERTY_SEARCH = {};\n    window.IR_PROPERTY_SEARCH.updateLatLng = ({ lat, lng }) => {\n      this.lngFieldTarget.value = lng;\n      this.latFieldTarget.value = lat;\n      this.map.setCenter({ lat, lng });\n    };\n  }\n\n  get isMapVisible() {\n    return window.getComputedStyle(this.mapTarget).display !== \"none\";\n  }\n\n  useLocationFormSubmitHandler = (event) => {\n    event.preventDefault();\n\n    if (!this.map.currentPlace && !this.isProjectPersisted) return;\n\n    logger(\"Google place:\", this.map.currentPlace);\n    if (this.map.currentPlace) {\n      const location = new LocationFromGooglePlace(this.map.currentPlace, {\n        lookupType: LOOKUP_TYPE_SELECTED,\n        usStates: this.usStateNormalizer,\n      });\n      this.locationSearchedFor = location;\n      this.setLocationFieldValuesFromLocation(location);\n    }\n    this.setLatLngZoomFieldsFromMap();\n\n    this.map.disableInteraction();\n\n    if (this.hasDraggedMapExceededReverseGeocodeThreshold) {\n      this.map.geocodeCurrentPosition();\n    } else {\n      this.submitLocationForm();\n    }\n  };\n\n  get isProjectPersisted() {\n    return this.element.dataset.isProjectPersisted !== undefined;\n  }\n\n  // Stimulus defaults an absent Object value to {}, which yields a normalizer that recognizes\n  // nothing and reports hasData false.\n  get usStateNormalizer() {\n    if (this._usStateNormalizer === undefined) {\n      this._usStateNormalizer = createUsStateNormalizer(this.usStatesValue);\n    }\n\n    return this._usStateNormalizer;\n  }\n\n  getProjectNameFromLocation(location) {\n    const fallbacks = [location.street, location.name, location.city, location.formattedAddress];\n\n    const projectName = fallbacks.find((value) => value && value.trim());\n\n    if (!projectName) {\n      if (location.lat && location.lng) {\n        return `${location.lat}, ${location.lng}`;\n      }\n      return \"New Project\";\n    }\n\n    return projectName;\n  }\n\n  setLocationFieldValuesFromLocation(location) {\n    if (!this.isProjectPersisted) {\n      this.nameFieldTarget.value = this.getProjectNameFromLocation(location);\n    }\n    this.streetFieldTarget.value = location.street;\n    this.cityFieldTarget.value = location.city;\n    this.stateFieldTarget.value = location.state;\n    this.countryFieldTarget.value = location.country;\n    if (location.country === \"US\") {\n      this.zipFieldTarget.value = location.zip;\n      this.nonUsaPostalCodeFieldTarget.value = \"\";\n    } else {\n      this.nonUsaPostalCodeFieldTarget.value = location.zip;\n      this.zipFieldTarget.value = \"\";\n    }\n  }\n\n  setLatLngZoomFieldsFromMap() {\n    this.latFieldTarget.value = this.map.lat;\n    this.lngFieldTarget.value = this.map.lng;\n    this.zoomFieldTarget.value = this.map.zoom;\n  }\n\n  get hasDraggedMapExceededReverseGeocodeThreshold() {\n    if (!this.map.hasBeenDragged) return false;\n\n    const distanceInFeet = this.map.currentPositionDistanceFromLatLngInFeet(\n      this.locationSearchedFor.lat,\n      this.locationSearchedFor.lng,\n    );\n\n    return distanceInFeet >= REVERSE_GEOCODE_DRAG_DISTANCE_THRESHOLD_IN_FT;\n  }\n\n  chooseAddressHandler = (event) => {\n    event.preventDefault();\n    const { addressType } = event.currentTarget.dataset;\n\n    if (addressType === \"searchedFor\") {\n      this.chooseAddressSearchedFor();\n    } else if (addressType === \"draggedTo\") {\n      this.chooseAddressDraggedTo();\n    } else if (addressType === \"searchAgain\") {\n      this.searchAgainInsteadOfChooseAddress();\n    }\n  };\n\n  chooseAddressSearchedFor() {\n    this.chooseAddressDraggedToBtnTarget.disabled = true;\n    this.chooseAddressSearchedForBtnTarget.classList.add(\"ir-btn--spinner-shown\");\n    this.chooseAddressSearchAgainBtnTarget.disabled = true;\n    if (this.changeProjectNameToAddressSearchedForCheckboxTarget.checked) {\n      this.nameFieldTarget.value = this.getProjectNameFromLocation(this.locationSearchedFor);\n    }\n    this.submitWithChosenAddress(this.locationSearchedFor);\n  }\n\n  chooseAddressDraggedTo() {\n    this.chooseAddressDraggedToBtnTarget.classList.add(\"ir-btn--spinner-shown\");\n    this.chooseAddressSearchedForBtnTarget.disabled = true;\n    this.chooseAddressSearchAgainBtnTarget.disabled = true;\n    if (this.changeProjectNameToAddressDraggedToCheckboxTarget.checked) {\n      this.nameFieldTarget.value = this.getProjectNameFromLocation(this.locationDraggedTo);\n    }\n    this.submitWithChosenAddress(this.locationDraggedTo);\n  }\n\n  submitWithChosenAddress(location) {\n    this.setLocationFieldValuesFromLocation(location);\n    this.submitLocationForm();\n  }\n\n  searchAgainInsteadOfChooseAddress() {\n    animate.hide(this.chooseAddressContainerTarget, { fadeOut: false });\n    animate.show(this.locationSearchFieldContainerTarget);\n    this.useThisLocationFormSubmitBtnTarget.classList.remove(\"ir-btn--spinner-shown\");\n    animate.show(this.useThisLocationFormSubmitBtnContainerTarget);\n    this.locationSearchFieldTarget.focus();\n    this.map.enableInteraction();\n  }\n\n  toggleMapHandler = (event) => {\n    event.preventDefault();\n\n    const showMapIcon = this.showMapLinkTarget.querySelector(\"i\");\n    if (this.isMapVisible) {\n      animate.hide(this.mapTarget);\n      showMapIcon.classList.add(\"fa-angle-down\");\n      showMapIcon.classList.remove(\"fa-angle-up\");\n    } else {\n      animate.show(this.mapTarget);\n      showMapIcon.classList.add(\"fa-angle-up\");\n      showMapIcon.classList.remove(\"fa-angle-down\");\n    }\n  };\n\n  resetLocationSearchToPersistedValues() {\n    this.map.resetToConnectingValues();\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport { showDialog } from \"../../components/ir_dialog/helper\";\n\nexport default class extends Controller {\n  dialogIdentifier = \"edit-project-location-dialog\";\n\n  open(event) {\n    event.preventDefault();\n    this.propertySearchController.resetLocationSearchToPersistedValues();\n    const clickPosition = { x: event.pageX, y: event.pageY };\n    showDialog(this.dialogIdentifier, () => {}, { showNearClickPosition: true, clickPosition });\n  }\n\n  get propertySearchController() {\n    return document.querySelector(\"[data-controller='da--property-search--base']\").propertySearchController;\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport * as animate from \"../../helpers/animate\";\n\nexport default class extends Controller {\n  static targets = [\"railCuttingContainer\", \"railCuttingCheckbox\"];\n\n  availabilityUpdated(e) {\n    const lengthCheckbox = e.target;\n    const length = lengthCheckbox.dataset.length;\n\n    if (length === \"168\" || length === \"170\" || length === \"165.4\" || length === \"171.5\") {\n      // we have 2 sets of these on the PR preset form, so we have to forEach\n      if (lengthCheckbox.checked) {\n        this.railCuttingCheckboxTargets.forEach((target) => (target.checked = true));\n        this.railCuttingContainerTargets.forEach((target) => animate.show(target));\n      } else {\n        this.railCuttingCheckboxTargets.forEach((target) => (target.checked = false));\n        this.railCuttingContainerTargets.forEach((target) => animate.hide(target));\n      }\n    }\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport { patch } from \"@rails/request.js\";\n\nimport { isVisible } from \"../../helpers/app\";\n\n// This class create a turbo stream request to repopulate the rail lengths section on the\n// project edit and preset pages when the user changes the rail type or rail platform (preset only).\n\nexport default class RailLengthsController extends Controller {\n  static targets = [\"railTypeSelect\"];\n  static values = {\n    modelName: String,\n    modelCreatedAt: String,\n    railTypeToStockLength: Object,\n    convertibleStockLengths: Object,\n  };\n  static outlets = [\"user-presets--da\"];\n\n  connect() {\n    // Projects created in OpenSolar will have a read only field for RailType unless they are unlocked\n    if (this.hasRailTypeSelectTarget) {\n      this.previousRailType = this.railTypeSelectTarget.value;\n    }\n  }\n\n  changeRailType(_event) {\n    this.newRailType = this.railTypeSelectTarget.value;\n    this.container = document.querySelector(`#rail_lengths_${this.#railPlatform}`);\n\n    if (this.#shouldRepopulate) {\n      const url = \"/da/rail_lengths\";\n\n      const convertedLengths = this.#convertLengths(this.#availableLengths);\n\n      const formData = new FormData();\n      formData.append(\"rail_platform\", this.#railPlatform);\n      formData.append(\"rail_type\", this.newRailType);\n      formData.append(\"available_lengths\", JSON.stringify(convertedLengths));\n      formData.append(\"rail_cutting\", this.#railCutting);\n      formData.append(\"model_name\", this.modelNameValue);\n      formData.append(\"model_date\", this.modelCreatedAtValue);\n\n      patch(url, {\n        body: formData,\n        responseKind: \"turbo-stream\",\n        headers: {\n          \"X-Tab-Id\": window.sessionStorage.getItem(\"tabId\"),\n        },\n      });\n    }\n\n    this.previousRailType = this.railTypeSelectTarget.value;\n    if (this.hasUserPresetsDaOutlet) {\n      this.userPresetsDaOutlet.updateRailFinishes(this.newRailType);\n    }\n  }\n\n  get #shouldRepopulate() {\n    let previousRailPlatform;\n    if (this.previousRailType === \"A1\" || this.previousRailType === \"A2\") {\n      previousRailPlatform = \"aire\";\n    } else if (this.previousRailType === \"CFLTE\" || this.previousRailType === \"CFSTD\") {\n      previousRailPlatform = \"clickfit\";\n    } else {\n      previousRailPlatform = \"xr\";\n    }\n    const newRailPlatform = this.#railPlatform;\n    const railTypeAffectsLengths =\n      (this.#railPlatform === \"xr\" || this.#railPlatform === \"clickfit\") && this.previousRailType !== this.newRailType;\n\n    return previousRailPlatform !== newRailPlatform || railTypeAffectsLengths;\n  }\n\n  get #railPlatform() {\n    if (this.newRailType === \"A1\" || this.newRailType === \"A2\") {\n      return \"aire\";\n    } else if (this.newRailType === \"CFLTE\" || this.newRailType === \"CFSTD\") {\n      return \"clickfit\";\n    } else {\n      return \"xr\";\n    }\n  }\n\n  #convertLengths(lengths) {\n    const oldStock = this.railTypeToStockLengthValue[this.previousRailType];\n    const newStock = this.railTypeToStockLengthValue[this.newRailType];\n\n    const converted = [];\n\n    lengths.forEach((length) => {\n      const lengthInt = Number(length) % 1 === 0 ? parseInt(length) : parseFloat(length);\n\n      const conversion = this.convertibleStockLengthsValue[lengthInt];\n      if (newStock.includes(lengthInt)) {\n        // if the old length (stock or custom) is stock on the new, then preserve it\n        this.#addWithoutDuplicates(converted, lengthInt);\n      } else if (newStock.includes(conversion)) {\n        // if the old length (stock or custom) converts to stock on the new, add conversion\n        this.#addWithoutDuplicates(converted, conversion);\n      } else if (!oldStock.includes(lengthInt)) {\n        // if the old length was custom (and we know its not stock on the new), then\n        // preserve it (as a custom length)\n        this.#addWithoutDuplicates(converted, lengthInt);\n      }\n    });\n\n    return converted;\n  }\n\n  #addWithoutDuplicates(list, item) {\n    if (list.includes(item)) return;\n    list.push(item);\n  }\n\n  get #availableLengths() {\n    const inputs = this.container.querySelectorAll(`input[name='${this.modelNameValue}[available_lengths][]']:checked`);\n\n    return [...inputs].filter(isVisible).map((element) => element.value);\n  }\n\n  get #railCutting() {\n    const railCuttingCheckbox = this.container.querySelector(`#rail_cutting_${this.#railPlatform}`);\n    return railCuttingCheckbox.checked;\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport { addOptionsToSelect } from \"../../helpers/form\";\nimport * as animate from \"../../helpers/animate\";\nimport { showDialog } from \"../components/ir_dialog/helper\";\n\n// This is used on PR projects and PR preset.\nexport default class RailPlatformController extends Controller {\n  static targets = [\n    \"endClampSelect\",\n    // these targets are only on the preset page\n    \"railLengthsXr\",\n    \"railLengthsAire\",\n    \"railLengthsClickfit\",\n    \"attachmentHardwareSelect\",\n    \"attachmentHardwareXrInfoPopup\",\n    \"attachmentHardwareAireInfoPopup\",\n    \"endClampInfoPopupSpanXr\",\n    \"endClampInfoPopupSpanAire\",\n    \"endClampInfoPopupSpanClickfit\",\n  ];\n  static values = {\n    clampNames: Object,\n    clampConversions: Object,\n    // only on preset page\n    millOnXr: Boolean,\n    attachmentHardwares: Object,\n  };\n\n  changeRailPlatform(event) {\n    const railPlatform = event.target.value;\n    this.#updateEndClamp(railPlatform);\n    this.#updatePanelPicker(railPlatform);\n    this.#updateRailLengths(railPlatform);\n    // this.#updateRailFinishes(railPlatform);\n    this.#updateAttachmentHardware(railPlatform);\n  }\n\n  #updateEndClamp(railPlatform) {\n    const clampNames = this.clampNamesValue[railPlatform];\n\n    const currentValue = this.endClampSelectTarget.value;\n    const convertTo = this.clampConversionsValue[currentValue];\n    const selectOptions = clampNames.map((clamp) => {\n      return [clamp[0], clamp[1], false, clamp[1] === convertTo];\n    });\n\n    addOptionsToSelect(selectOptions, this.endClampSelectTarget, false);\n\n    // Show FEOC warning dialog if converting to lock_stealth\n    if (convertTo === \"lock_stealth\") {\n      this.#showFeocWarningDialog();\n    }\n\n    if (railPlatform === \"aire\") {\n      animate.hide(this.endClampInfoPopupSpanXrTarget, { fadeOut: false });\n      if (this.hasEndClampInfoPopupSpanClickfitTarget) {\n        animate.hide(this.endClampInfoPopupSpanClickfitTarget, { fadeOut: false });\n      }\n      animate.show(this.endClampInfoPopupSpanAireTarget, { fadeIn: false });\n    } else if (railPlatform === \"clickfit\") {\n      animate.hide(this.endClampInfoPopupSpanXrTarget, { fadeOut: false });\n      animate.hide(this.endClampInfoPopupSpanAireTarget, { fadeOut: false });\n      animate.show(this.endClampInfoPopupSpanClickfitTarget, { fadeIn: false });\n    } else {\n      animate.hide(this.endClampInfoPopupSpanAireTarget, { fadeOut: false });\n      if (this.hasEndClampInfoPopupSpanClickfitTarget) {\n        animate.hide(this.endClampInfoPopupSpanClickfitTarget, { fadeOut: false });\n      }\n      animate.show(this.endClampInfoPopupSpanXrTarget, { fadeIn: false });\n    }\n  }\n\n  #updatePanelPicker(railPlatform) {\n    const panelPickerElement = document.querySelector(\"[data-controller='da--panel-picker']\");\n    if (!panelPickerElement) return;\n\n    const panelPickerController = panelPickerElement.controller;\n    panelPickerController.updateRailPlatform(railPlatform);\n  }\n\n  #updateRailLengths(railPlatform) {\n    if (!this.#onPresetPage()) return;\n\n    if (railPlatform === \"aire\") {\n      this.railLengthsXrTarget.classList.add(\"d-none\");\n      this.railLengthsXrTarget.setAttribute(\"disabled\", \"\");\n      if (this.hasRailLengthsClickfitTarget) {\n        this.railLengthsClickfitTarget.classList.add(\"d-none\");\n        this.railLengthsClickfitTarget.setAttribute(\"disabled\", \"\");\n      }\n      this.railLengthsAireTarget.removeAttribute(\"disabled\");\n      animate.show(this.railLengthsAireTarget);\n    } else if (railPlatform === \"clickfit\") {\n      this.railLengthsXrTarget.classList.add(\"d-none\");\n      this.railLengthsXrTarget.setAttribute(\"disabled\", \"\");\n      this.railLengthsAireTarget.classList.add(\"d-none\");\n      this.railLengthsAireTarget.setAttribute(\"disabled\", \"\");\n      this.railLengthsClickfitTarget.removeAttribute(\"disabled\");\n      animate.show(this.railLengthsClickfitTarget);\n    } else {\n      this.railLengthsAireTarget.classList.add(\"d-none\");\n      this.railLengthsAireTarget.setAttribute(\"disabled\", \"\");\n      if (this.hasRailLengthsClickfitTarget) {\n        this.railLengthsClickfitTarget.classList.add(\"d-none\");\n        this.railLengthsClickfitTarget.setAttribute(\"disabled\", \"\");\n      }\n      this.railLengthsXrTarget.removeAttribute(\"disabled\");\n      animate.show(this.railLengthsXrTarget);\n    }\n  }\n\n  #updateAttachmentHardware(railPlatform) {\n    if (!this.#onPresetPage()) return;\n    if (!this.hasAttachmentHardwareSelectTarget) return;\n\n    const attachmentHardwares = this.attachmentHardwaresValue[railPlatform];\n\n    const selectOptions = attachmentHardwares.map((hardware) => {\n      return [hardware[0], hardware[1], false, false];\n    });\n\n    addOptionsToSelect(selectOptions, this.attachmentHardwareSelectTarget, false);\n\n    if (railPlatform === \"aire\") {\n      this.attachmentHardwareXrInfoPopupTarget.classList.add(\"d-none\");\n      animate.show(this.attachmentHardwareAireInfoPopupTarget, { display: \"inline\" });\n    } else {\n      animate.show(this.attachmentHardwareXrInfoPopupTarget, { display: \"inline\" });\n      this.attachmentHardwareAireInfoPopupTarget.classList.add(\"d-none\");\n    }\n  }\n\n  #onPresetPage() {\n    // Arbitrarily chose this target, could have been any of them that only appear on that page\n    return this.hasRailLengthsXrTarget;\n  }\n\n  #showFeocWarningDialog() {\n    const dialog = document.querySelector('[data-dialog-identifier=\"feoc-non-compliant-part-warning\"]');\n    if (!dialog) {\n      console.warn(\"FEOC warning dialog not found\");\n      return;\n    }\n\n    showDialog(dialog);\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\n\nexport default class extends Controller {\n  selectFullReport() {\n    this.toggleCheckbox(\"input[name='report_email[full_report]'\", true);\n    this.toggleCheckbox(\"input[name='report_email[bom]'\", false);\n  }\n\n  selectBOM() {\n    this.toggleCheckbox(\"input[name='report_email[bom]'\", true);\n    this.toggleCheckbox(\"input[name='report_email[full_report]'\", false);\n  }\n\n  toggleCheckbox(inputSelector, check) {\n    const inputs = document.querySelectorAll(inputSelector);\n    Array.from(inputs).forEach((input) => {\n      if (input.checked === check) {\n        return;\n      }\n      input.click();\n    });\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport React from \"react\";\nimport ReactDOMServer from \"react-dom/server\";\n\nimport * as animate from \"../../helpers/animate\";\n\nexport default class extends Controller {\n  static targets = [\n    \"allDistributorLocations\",\n    \"nearestDistributorLocations\",\n    \"successMessage\",\n    \"failureMessage\",\n    \"selectedDistributorName\",\n    \"selectedDistributorCityState\",\n    \"selectedDistributorId\",\n    \"selectedDistributorContainer\",\n    \"selectADistributorContainer\",\n    \"changeButton\",\n    \"chooserContainer\",\n    \"setByNameButton\",\n    \"setNearProjectButton\",\n    \"byNameViewContainer\",\n    \"nameSearch\",\n    \"nameMatches\",\n    \"nearestChoices\",\n    \"nearProjectViewContainer\",\n    \"submitQuoteRequestContainer\",\n    \"currentUserForm\",\n    \"submitButton\",\n  ];\n\n  connect() {\n    this.allLocations = JSON.parse(this.allDistributorLocationsTarget.dataset.locations);\n    this.nearestDistributorLocations = JSON.parse(this.nearestDistributorLocationsTarget.dataset.locations);\n\n    this.populateNearest();\n  }\n\n  populateNearest() {\n    const choices = this.nearestDistributorLocations.map((location) => this.selectableLocation(location));\n    this.nearestChoicesTarget.innerHTML = choices.join(\"\\n\");\n  }\n\n  showChoosers() {\n    animate.show(this.chooserContainerTarget);\n  }\n\n  setCurrentView(event) {\n    event.preventDefault();\n\n    const button = event.currentTarget;\n    const currentView = button.dataset.viewName;\n\n    this.toggleButtonActive(button, true);\n\n    if (currentView === \"nearProject\") {\n      this.byNameViewContainerTarget.style.display = \"none\";\n      animate.show(this.nearProjectViewContainerTarget);\n      this.toggleButtonActive(this.setByNameButtonTarget, false);\n    } else {\n      this.nearProjectViewContainerTarget.style.display = \"none\";\n      animate.show(this.byNameViewContainerTarget);\n      this.toggleButtonActive(this.setNearProjectButtonTarget, false);\n    }\n  }\n\n  toggleButtonActive(button, bool) {\n    button.closest(\"li\").classList[bool ? \"add\" : \"remove\"](\"active\");\n  }\n\n  search() {\n    const pattern = this.nameSearchTarget.value.toLowerCase();\n\n    const matches = this.allLocations\n      .filter((location) => {\n        const { name } = location;\n        return name.toLowerCase().includes(pattern);\n      })\n      .map((location) => this.selectableLocation(location));\n    if (matches.length > 0) {\n      animate.show(this.nameMatchesTarget);\n    } else {\n      animate.hide(this.nameMatchesTarget);\n    }\n    this.nameMatchesTarget.innerHTML = matches.join(\"\\n\");\n  }\n\n  selectableLocation(location) {\n    const { name, cityState, locationId, distance } = location;\n\n    return ReactDOMServer.renderToString(\n      <div className=\"row da-quote-request__location-select__row\">\n        <div className=\"col-5\">\n          <div className=\"da-quote-request__location-select__location-name\">{name}</div>\n          <div className=\"da-quote-request__location-select__location-city-state\">{cityState}</div>\n        </div>\n        <div className=\"col-3\">{distance !== \"?\" && `${distance.toLocaleString()} mls`}</div>\n        <div className=\"col-4 d-flex align-items-center justify-content-end\">\n          <button\n            className=\"ir-btn ir-btn--small ir-btn--blue ir-btn--icon-prepend float-right\"\n            data-action=\"click->da--request-quote#selectLocation\"\n            data-location-id={locationId}\n            type=\"button\"\n          >\n            <span className=\"ir-btn__icon\">\n              <i className=\"fas fa-check\" />\n            </span>\n            <span className=\"ir-btn__text\">Select</span>\n          </button>\n        </div>\n      </div>,\n    );\n  }\n\n  selectLocation(event) {\n    event.preventDefault();\n\n    const button = event.currentTarget;\n    const locationId = parseInt(button.dataset.locationId);\n\n    const location = this.allLocations.find((location) => location.locationId === locationId);\n\n    if (location) {\n      const { name, cityState } = location;\n\n      this.selectedDistributorNameTarget.innerHTML = name;\n      this.selectedDistributorCityStateTarget.innerHTML = cityState;\n      this.selectedDistributorIdTarget.value = locationId;\n\n      animate.show(this.changeButtonTarget, { display: \"flex\" });\n      animate.hide(this.chooserContainerTarget);\n      animate.show(this.submitQuoteRequestContainerTarget);\n      animate.show(this.selectedDistributorContainerTarget);\n      this.selectADistributorContainerTarget.style.display = \"none\";\n    }\n  }\n\n  close(_event) {\n    this.changeButtonTarget.style.display = \"flex\";\n    this.successMessageTarget.style.display = \"none\";\n    this.failureMessageTarget.style.display = \"none\";\n    this.currentUserFormTarget.style.display = \"block\";\n    this.submitButtonTarget.classList.remove(\"ir-btn--spinner-shown\");\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\n\nexport default class extends Controller {\n  static targets = [\"asce\", \"category\"];\n  static values = {\n    asceToRiskCategories: Object,\n  };\n\n  changeAsce() {\n    const asce = this.asceTarget.value;\n    const allowedRiskCategories = this.asceToRiskCategoriesValue[asce];\n\n    let firstGroupShown = null;\n    let lastGroupShown = null;\n\n    this.categoryTargets.forEach((group) => {\n      const radioButton = group.querySelector('input[type=\"radio\"]');\n      const value = radioButton.value;\n\n      // explicitly remove any forced rounding of buttons\n      group.classList.remove(\"ir-form__radio-group-btns__btn--rounded-right\");\n      group.classList.remove(\"ir-form__radio-group-btns__btn--rounded-left\");\n\n      if (allowedRiskCategories.includes(value)) {\n        group.classList.remove(\"d-none\");\n        if (firstGroupShown === null) {\n          firstGroupShown = group;\n          group.classList.add(\"ir-form__radio-group-btns__btn--rounded-left\");\n        }\n        lastGroupShown = group;\n      } else {\n        radioButton.checked = false;\n        group.classList.add(\"d-none\");\n      }\n    });\n\n    if (lastGroupShown !== null) {\n      lastGroupShown.classList.add(\"ir-form__radio-group-btns__btn--rounded-right\");\n    }\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport * as animate from \"../../helpers/animate\";\nimport { addOptionsToSelect } from \"../../helpers/form\";\nimport { showDialog } from \"../components/ir_dialog/helper\";\nimport { elementInfo } from \"../../helpers/app\";\n\nexport default class extends Controller {\n  static targets = [\n    \"roofMaterialFamilySelect\",\n    \"roofMaterialFamilyInfoPopup\",\n    \"roofMaterialContainer\",\n    \"roofMaterialSelect\",\n    \"roofAttachmentSelect\",\n    \"roofAttachmentInfoPopup\",\n    \"hugBadgeContainer\",\n    \"deckThicknessContainer\",\n    \"deckScrewLengthContainer\",\n    \"roofAttachmentHint\",\n    \"specificGravitySelect\",\n  ];\n\n  static values = {\n    roofAttachmentToRoofMaterials: Object,\n    roofAttachmentToRoofMaterialFamilies: Object,\n    roofMaterialFamilyToRoofMaterials: Object,\n    materialToAttachmentXr: Object,\n    roofAttachmentToSpecificGravities: Object,\n    roofAttachmentToDeckThickness: Object,\n    roofAttachmentToHint: Object,\n  };\n\n  get roofMaterialFamily() {\n    return this.roofMaterialFamilySelectTarget.value;\n  }\n\n  get roofMaterial() {\n    return this.roofMaterialSelectTarget.value;\n  }\n\n  get roofAttachment() {\n    return this.roofAttachmentSelectTarget.value;\n  }\n\n  get isRoofAttachmentEmpty() {\n    return this.roofAttachment === \"\";\n  }\n\n  changeRoofMaterialFamily() {\n    this.#updateRoofMaterialList();\n    this.changeRoofMaterial();\n    this.toggleRoofMaterialFamilyInfoPopup();\n    this.toggleRoofMaterialInfoPopup();\n    this.toggleHugBadge();\n  }\n\n  changeRoofMaterial() {\n    this.updateAttachmentList();\n    this.updateDependenciesOnAttachmentList();\n  }\n\n  updateDependenciesOnAttachmentList() {}\n\n  toggleRoofMaterialFamilyInfoPopup() {\n    if (this.roofMaterialFamily === \"other\") {\n      this.roofMaterialFamilyInfoPopupTarget.classList.add(\"d-none\");\n    } else {\n      this.roofMaterialFamilyInfoPopupTarget.classList.remove(\"d-none\");\n\n      const dialog = document.querySelector(\n        `[data-dialog-identifier=info-popup-${this.constructor.projectType}-roof-material-family]`,\n      );\n      const sections = dialog.querySelectorAll(\"[data-roof-material-family]\");\n\n      let showSelector = `[data-roof-material-family=${this.roofMaterialFamily}]`;\n\n      for (let section of sections) {\n        section.style.display = section.matches(showSelector) ? \"block\" : \"none\";\n      }\n    }\n  }\n\n  toggleRoofMaterialInfoPopup() {}\n\n  toggleRoofAttachmentInfoPopup() {\n    if (this.isRoofAttachmentEmpty) {\n      this.roofAttachmentInfoPopupTarget.classList.add(\"d-none\");\n    } else {\n      this.roofAttachmentInfoPopupTarget.classList.remove(\"d-none\");\n    }\n  }\n\n  toggleHugBadge() {\n    if (!this.hasHugBadgeContainerTarget) return;\n\n    if (this.roofMaterialFamily === \"cs\") {\n      this.hugBadgeContainerTarget.classList.remove(\"d-none\");\n    } else {\n      this.hugBadgeContainerTarget.classList.add(\"d-none\");\n    }\n  }\n\n  toggleDeckThickness() {\n    if (this.hasDeckThicknessContainerTarget) {\n      animate.toggle(\n        this.deckThicknessContainerTarget,\n        this.roofAttachmentToDeckThicknessValue[this.roofAttachment] === true,\n      );\n    }\n  }\n\n  toggleRoofAttachmentHint() {\n    if (!this.hasRoofAttachmentHintTarget) return;\n\n    const hint = this.roofAttachmentToHintValue[this.roofAttachment] || \"\";\n    this.roofAttachmentHintTarget.textContent = hint;\n    animate.toggle(this.roofAttachmentHintTarget, hint !== \"\");\n  }\n\n  toggleDeckScrewLength() {\n    if (this.hasDeckScrewLengthContainerTarget) {\n      animate.toggle(\n        this.deckScrewLengthContainerTarget,\n        this.roofAttachment === \"simple_grip_r\" || this.roofAttachment === \"simple_grip_d\",\n      );\n    }\n  }\n\n  updateSpecificGravity() {\n    if (!this.hasSpecificGravitySelectTarget) return;\n    if (!this.roofAttachmentToSpecificGravitiesValue) return;\n\n    const specificGravities = this.roofAttachmentToSpecificGravities()[this.roofAttachment];\n    const currentSG = Number.parseFloat(this.specificGravitySelectTarget.value);\n    if (!specificGravities) {\n      animate.hide(this.specificGravitySelectTarget.parentElement);\n    } else {\n      animate.show(this.specificGravitySelectTarget.parentElement);\n      const minSpecificGravity = Math.min(...specificGravities);\n      const sgOptions = specificGravities.map((sg) => [sg, sg, false, sg === currentSG]);\n      addOptionsToSelect(sgOptions, this.specificGravitySelectTarget, false);\n\n      if (!currentSG || !specificGravities.includes(currentSG)) {\n        this.specificGravitySelectTarget.value = minSpecificGravity;\n      }\n    }\n  }\n\n  openQmHugScrewsIntro(event) {\n    const isQmHug = this.roofAttachment === \"qm_hug_r\" || this.roofAttachment === \"qm_hug_d\";\n    if (!isQmHug) return;\n\n    // If the introduction is not active the dialog will not be present on the page\n    const dialog = document.querySelector(\"[data-dialog-identifier='info-popup-qmhug-screws']\");\n    if (!dialog || !dialog.querySelector(\"[data-identifier='content']\")) return;\n\n    const elemInfo = elementInfo(event.currentTarget);\n    showDialog(\"info-popup-qmhug-screws\", () => {}, {\n      showNearClickPosition: true,\n      clickPosition: elemInfo.center,\n    });\n  }\n\n  openSimpleGripScrewsIntro(event) {\n    const isSimpleGrip = this.roofAttachment === \"simple_grip_r\" || this.roofAttachment === \"simple_grip_d\";\n    if (!isSimpleGrip) return;\n\n    // If the introduction is not active the dialog will not be present on the page\n    const dialog = document.querySelector(\"[data-dialog-identifier='info-popup-simplegrip-screws']\");\n    if (!dialog || !dialog.querySelector(\"[data-identifier='content']\")) return;\n\n    const elemInfo = elementInfo(event.currentTarget);\n    showDialog(\"info-popup-simplegrip-screws\", () => {}, {\n      showNearClickPosition: true,\n      clickPosition: elemInfo.center,\n    });\n  }\n\n  #updateRoofMaterialList() {\n    const roofMaterials = this.roofMaterialFamilyToRoofMaterialsValue[this.roofMaterialFamily];\n\n    const roofMaterialValues = roofMaterials.map((rm) => rm[1]);\n    const shouldHideRoofMaterial = roofMaterialValues.length === 1 && roofMaterialValues[0] === this.roofMaterialFamily;\n    animate.toggle(this.roofMaterialContainerTarget, !shouldHideRoofMaterial);\n\n    const prompt = roofMaterials.length > 1 ? [[\"- choose one -\", \"\"]] : [];\n    const roofMaterialOptions = prompt.concat(roofMaterials.map((a) => [a[0], a[1], false, false]));\n    addOptionsToSelect(roofMaterialOptions, this.roofMaterialSelectTarget, false);\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport { animate as anime } from \"animejs\";\nimport { elementInfo } from \"../../helpers/app\";\nimport { scrollToRoofSection } from \"../../helpers/da-globals\";\nimport * as store from \"../../helpers/local-store\";\n\nexport default class extends Controller {\n  static targets = [\"menu\"];\n\n  static values = { projectType: String };\n\n  hidingMenu = false;\n\n  connect() {\n    // Give the fixed header a chance to animate in before kicking things off\n    this.connectTimeoutId = window.setTimeout(() => {\n      this.initializeScrollEventHandler();\n    }, 500);\n\n    this.element.controller = this;\n  }\n\n  disconnect() {\n    clearTimeout(this.connectTimeoutId);\n    window.removeEventListener(\"scroll\", this.toggleFixedRoofSectionMenu);\n  }\n\n  initializeScrollEventHandler() {\n    window.addEventListener(\"scroll\", this.toggleFixedRoofSectionMenu);\n    this.toggleFixedRoofSectionMenu();\n\n    if (!this.isFirstStrip && this.floatingMenuDismissed && this.atLeastOneRoofSectionExists) {\n      this.element.style.display = \"block\";\n    }\n  }\n\n  get atLeastOneRoofSectionExists() {\n    const list = document.querySelector(\"[data-identifier='da-roof-sections-list']\");\n    return list !== null && list.innerHTML.trim() !== \"\";\n  }\n\n  get isFirstStrip() {\n    return this.element.dataset.hasOwnProperty(\"firstStrip\");\n  }\n\n  get floatingMenuDismissed() {\n    return store.get(\"da-hide-floating-roof-section-menu\");\n  }\n\n  get headerHeight() {\n    let height = elementInfo(this.headerElem).height;\n    return height;\n  }\n\n  get headerElem() {\n    return document.querySelector(\"[data-identifier='project-header-wrapper']\");\n  }\n\n  toggleFixedRoofSectionMenu = (_) => {\n    const roofSectionsContainer = document.querySelector(\"[data-identifier='da-roof-sections']\");\n    if (!roofSectionsContainer) return;\n    if (!this.headerElem) {\n      setTimeout(() => {\n        this.toggleFixedRoofSectionMenu();\n      }, 500);\n      return;\n    }\n\n    const roofSectionContainerTop = roofSectionsContainer.getBoundingClientRect().top;\n    const offsetHeight = roofSectionContainerTop + window.scrollY - this.headerHeight - 20;\n    if (window.scrollY > offsetHeight) {\n      this.showMenu();\n    } else {\n      this.hideMenu();\n    }\n  };\n\n  showMenu() {\n    if (this.floatingMenuDismissed) return;\n    if (!this.isFirstStrip) return;\n    if (this.menuHasFixedClass) return;\n\n    this.menuTarget.classList.add(\"da-roof-sections-menu--fixed\");\n    this.menuTarget.style.opacity = 0;\n\n    const paddingBelowHeader = 15;\n    const stop = this.headerHeight + paddingBelowHeader;\n    const animationDistance = 40;\n    const start = stop - animationDistance;\n\n    anime(this.menuTarget, {\n      opacity: 1,\n      top: [`${start}px`, `${stop}px`],\n      ease: \"outQuad\",\n      duration: 300,\n    });\n  }\n\n  get menuHasFixedClass() {\n    return this.menuTarget.classList.contains(\"da-roof-sections-menu--fixed\");\n  }\n\n  hideMenu() {\n    if (!this.menuHasFixedClass && !this.hidingMenu) return;\n    this.hidingMenu = true;\n\n    anime(this.menuTarget, {\n      opacity: 0,\n      ease: \"outQuad\",\n      duration: 200,\n      onComplete: this.afterHideMenu,\n    });\n  }\n\n  afterHideMenu = () => {\n    this.menuTarget.style.opacity = 1;\n    this.hidingMenu = false;\n    this.menuTarget.classList.remove(\"da-roof-sections-menu--fixed\");\n  };\n\n  linkJumpToRoofSection = (event) => {\n    event.preventDefault();\n    scrollToRoofSection(event.currentTarget.dataset.roofSectionId, this.projectTypeValue);\n  };\n\n  selectMenuJumpToRoofSection = (event) => {\n    scrollToRoofSection(event.currentTarget.value, this.projectTypeValue);\n  };\n\n  close = (event) => {\n    if (event) event.preventDefault();\n\n    this.hideMenu();\n    this.hideFloatingMenu(true);\n\n    const roofSectionMenus = document.querySelectorAll(\"[data-controller='da--roof-section-menu']\");\n\n    Array.from(roofSectionMenus).forEach((menu) => {\n      if (!menu.dataset.hasOwnProperty(\"firstStrip\")) {\n        menu.style.display = \"block\";\n      }\n    });\n  };\n\n  hideFloatingMenu(bool) {\n    store.set(\"da-hide-floating-roof-section-menu\", bool);\n  }\n\n  reOpenFloatingMenu = (event) => {\n    event.preventDefault();\n    this.hideFloatingMenu(false);\n    this.element.style.display = \"none\";\n    // scroll by a pixel to trigger the floating menu to come up for the\n    // other roof section menu\n    window.scrollTo({ top: window.pageYOffset - 1, behavior: \"smooth\" });\n  };\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport { elementInfo } from \"../../../helpers/app\";\n\nexport default class extends Controller {\n  connect() {\n    const headerInfo = elementInfo(document.querySelector(\".project-header\"));\n\n    // Having this static value for the header height isn't ideal, but for some reason when doing an\n    // AJAX request to the backend and using a .js.erb to populate parts of the page, a Stimulus\n    // controller in the the loaded content that tries to dynamically figure out the height of the\n    // header seems to return 0 even though the height is around 115px.  I've tried using timeouts\n    // and running until a height is greater than 0, but this doesn't seem to help.  The header\n    // height is generally 115px or close to it, so using a fallback if the height is calculated to\n    // be 0 seems reasonable.\n    const projectHeaderHeightDefault = 115;\n\n    const heightOffset = headerInfo.height > 0 ? headerInfo.height : projectHeaderHeightDefault;\n    this.element.style.top = `-${heightOffset}px`;\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport throttle from \"lodash/throttle\";\n\nimport { elementInfo, pointOverlapsElement } from \"../../../helpers/app\";\nimport * as animate from \"../../../helpers/animate\";\n\nexport default class extends Controller {\n  static targets = [\"itemsContainer\"];\n\n  connect() {\n    document.body.addEventListener(\"click\", this.bodyClickHideMenu.bind(this));\n\n    this.sideMenuHorizontalAlignmentContainer = document.querySelector(\n      '[data-identifier=\"side-menu-horizontal-alignment-container\"]',\n    );\n\n    this.alignHorizontally = throttle(this.alignHorizontally, 300);\n\n    window.addEventListener(\"resize\", this.alignHorizontally);\n\n    this.alignHorizontally();\n    animate.show(this.element);\n  }\n\n  disconnect() {\n    document.body.removeEventListener(\"click\", this.bodyClickHideMenu.bind(this));\n\n    window.removeEventListener(\"resize\", this.alignHorizontally);\n  }\n\n  alignHorizontally = (_event) => {\n    const containerInfo = elementInfo(this.sideMenuHorizontalAlignmentContainer);\n    const containerLeft = containerInfo.left;\n    let elementLeft = containerLeft - 60;\n    if (elementLeft < 0) {\n      elementLeft = 0;\n      this.element.classList.add(\"side-menu--anchored\");\n      this.itemsContainerTarget.classList.add(\"side-menu__items-container--anchored\");\n    } else {\n      this.element.classList.remove(\"side-menu--anchored\");\n      this.itemsContainerTarget.classList.remove(\"side-menu__items-container--anchored\");\n    }\n\n    this.element.style.left = `${elementLeft}px`;\n  };\n\n  show = (_event) => {\n    animate.show(this.itemsContainerTarget, { duration: 250 });\n  };\n\n  bodyClickHideMenu(event) {\n    const overlapping = pointOverlapsElement({\n      x: event.clientX,\n      y: event.clientY,\n      element: this.itemsContainerTarget,\n    });\n    if (overlapping) return;\n\n    this.hide(event);\n  }\n\n  hide(_event) {\n    animate.hide(this.itemsContainerTarget, { duration: 150 });\n  }\n\n  roofSectionItemClicked(_event) {\n    const roofSectionMenuContainer = document.querySelector(\"[data-identifier='roof-section-menu-container']\");\n    if (!roofSectionMenuContainer) return;\n\n    roofSectionMenuContainer.controller.close();\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport * as animate from \"../../helpers/animate\";\nimport axios from \"axios\";\nimport * as api from \"../../helpers/api\";\n\nexport default class extends Controller {\n  static values = {\n    projectPrefix: String,\n  };\n\n  static targets = [\n    \"orientationRailsSpansAndForcesField\",\n    \"landscapeViewContainer\",\n    \"setPortraitButton\",\n    \"portraitViewContainer\",\n    \"setLandscapeButton\",\n    \"setOrientationUrl\",\n    \"railTypeSelect\",\n  ];\n\n  setCurrentView(event) {\n    event.preventDefault();\n\n    const button = event.currentTarget;\n    const currentView = button.dataset.viewName;\n\n    this.orientationRailsSpansAndForcesFieldTarget.value = currentView;\n\n    this.updateOrientation(currentView);\n\n    this.toggleButtonActive(button, true);\n\n    if (currentView === \"landscape\") {\n      if (this.hasPortraitViewContainerTarget) {\n        this.portraitViewContainerTarget.style.display = \"none\";\n      }\n\n      animate.show(this.landscapeViewContainerTarget);\n\n      if (this.hasSetPortraitButtonTarget) {\n        this.toggleButtonActive(this.setPortraitButtonTarget, false);\n      }\n    } else {\n      if (this.hasLandscapeViewContainerTarget) {\n        this.landscapeViewContainerTarget.style.display = \"none\";\n      }\n\n      animate.show(this.portraitViewContainerTarget);\n\n      if (this.hasSetLandscapeButtonTarget) {\n        this.toggleButtonActive(this.setLandscapeButtonTarget, false);\n      }\n    }\n  }\n\n  updateOrientation(orientation) {\n    axios({\n      method: \"PATCH\",\n      url: this.setOrientationUrlTarget.dataset.value,\n      data: { orientation },\n      headers: api.defaultHeaders(),\n    });\n  }\n\n  toggleButtonActive(button, bool) {\n    button.closest(\"li\").classList[bool ? \"add\" : \"remove\"](\"active\");\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport * as animate from \"../../../helpers/animate\";\n\nexport default class DaSpansEditorSpanLimitsController extends Controller {\n  static targets = [\n    \"useMaxAllowedSpanChoiceYes\",\n    \"useMaxAllowedSpanChoiceNo\",\n    \"maxAllowedSpanFieldContainer\",\n    \"spanLimitsField\",\n    \"smallerThanRafterSpacingMessage\",\n    \"smallestRafterSpacingMessage\",\n  ];\n\n  static values = {\n    isDeckAttached: Boolean,\n    smallestRafterSpacingFt: Number,\n  };\n\n  useMaxAllowedSpanChoiceChange(_event) {\n    const choiceIsYes = this.useMaxAllowedSpanChoiceYesTarget.checked;\n    const showHide = choiceIsYes ? \"show\" : \"hide\";\n    animate[showHide](this.maxAllowedSpanFieldContainerTarget);\n\n    if (choiceIsYes) this.maxAllowedSpanFieldContainerTarget.querySelector(\"input[type='text']\").focus();\n  }\n\n  checkIfValueIsLessThanRafterSpacing(event) {\n    if (this.isDeckAttachedValue) return;\n\n    const maxSpanLimitValue = event.currentTarget.value;\n    if (maxSpanLimitValue < this.smallestRafterSpacingFtValue) {\n      animate.show(this.smallerThanRafterSpacingMessageTarget);\n      animate.hide(this.smallestRafterSpacingMessageTarget, { fadeOut: false });\n    } else {\n      animate.show(this.smallestRafterSpacingMessageTarget);\n      animate.hide(this.smallerThanRafterSpacingMessageTarget, { fadeOut: false });\n    }\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport Rails from \"@rails/ujs\";\nimport * as animate from \"../../../helpers/animate\";\nimport { Form } from \"../../../helpers/form\";\n\nexport default class DaSpansEditorSpanOverridesController extends Controller {\n  static targets = [\n    \"form\",\n    \"submitBtn\",\n    \"submitBtnCheckIcon\",\n    \"submitBtnSpinner\",\n    \"addBtnContainer\",\n    \"fieldContainer\",\n    \"overrideDisplayContainer\",\n    \"resetForm\",\n  ];\n\n  static values = {\n    isOverridePersisted: Boolean,\n    hasValidationError: Boolean,\n    overrideSpan: Number,\n    resetUrl: String,\n  };\n\n  submit(event) {\n    event.preventDefault();\n\n    this.submitBtnTarget.disabled = true;\n    this.submitBtnCheckIconTarget.classList.add(\"d-none\");\n    this.submitBtnSpinnerTarget.classList.remove(\"d-none\");\n\n    setTimeout(() => {\n      Rails.fire(this.formTarget, \"submit\");\n    }, 200);\n  }\n\n  addOverrideClick(_event) {\n    this.addBtnContainerTarget.classList.remove(\"d-flex\");\n    animate.hide(this.addBtnContainerTarget, { fadeOut: false });\n    animate.show(this.fieldContainerTarget, { display: \"flex\" });\n    this.firstField.focus();\n  }\n\n  editOverrideClick(_event) {\n    this.overrideDisplayContainerTarget.classList.remove(\"d-flex\");\n    animate.hide(this.overrideDisplayContainerTarget, { fadeOut: false });\n    animate.show(this.fieldContainerTarget, { display: \"flex\" });\n    this.firstField.focus();\n  }\n\n  get firstField() {\n    const selectField = this.formTarget.querySelector(\"select\");\n    const textField = this.formTarget.querySelector(\"input[type='text']\");\n    return selectField || textField;\n  }\n\n  cancel(_event) {\n    if (this.hasValidationErrorValue) {\n      if (this.isOverridePersistedValue) {\n        Form.get(this.resetUrlValue, {}, { remote: true });\n        return;\n      } else {\n        this.#clearValidationErrorsAndResetForm();\n      }\n    }\n\n    if (this.isOverridePersistedValue) {\n      animate.show(this.overrideDisplayContainerTarget, { display: \"flex\" });\n    } else {\n      animate.show(this.addBtnContainerTarget, { display: \"flex\" });\n    }\n    this.fieldContainerTarget.classList.remove(\"d-flex\");\n    animate.hide(this.fieldContainerTarget, { fadeOut: false });\n  }\n\n  #clearValidationErrorsAndResetForm() {\n    if (!this.hasValidationErrorValue) return;\n\n    const fieldContainer = this.fieldContainerTarget;\n\n    const fieldWithErrorsWrapper = fieldContainer.querySelector(\".field_with_errors\");\n    if (fieldWithErrorsWrapper) fieldWithErrorsWrapper.classList.remove(\"field_with_errors\");\n\n    const validationError = fieldContainer.querySelector(\".ir-text-message--error\");\n    if (validationError) validationError.remove();\n\n    const selectField = this.formTarget.querySelector(\"select\");\n    if (selectField) {\n      selectField.value = \"\";\n    } else {\n      const target = \"data-components--ir-feet-and-inches-field-target\";\n      fieldContainer\n        .querySelectorAll(`[${target}='hiddenField'], [${target}='feetField'], [${target}='inchesField']`)\n        .forEach((field) => {\n          field.value = \"\";\n        });\n    }\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\n\nexport default class extends Controller {\n  static targets = [\"spares\", \"edit\", \"count\"];\n\n  edit(event) {\n    event.preventDefault();\n    this.editTarget.classList.remove(\"d-none\");\n    this.sparesTarget.classList.add(\"d-none\");\n  }\n\n  save(_event) {\n    this.sparesTarget.classList.remove(\"d-none\");\n    this.editTarget.classList.add(\"d-none\");\n  }\n\n  cancel(event) {\n    event.preventDefault();\n\n    const countElement = this.countTarget;\n    const initialSpares = countElement.dataset.initialSpares;\n    countElement.value = initialSpares;\n\n    this.sparesTarget.classList.remove(\"d-none\");\n    this.editTarget.classList.add(\"d-none\");\n  }\n\n  increment(event) {\n    event.preventDefault();\n\n    const countElement = this.countTarget;\n    let currentValue = parseInt(countElement.value);\n    if (isNaN(currentValue)) {\n      currentValue = 0;\n    }\n\n    countElement.value = currentValue + 1;\n  }\n\n  decrement(event) {\n    event.preventDefault();\n\n    const countElement = this.countTarget;\n    const configuredCount = countElement.dataset.configuredCount;\n\n    let currentValue = parseInt(countElement.value);\n    if (isNaN(currentValue)) {\n      currentValue = 0;\n    }\n    const newValue = -currentValue >= configuredCount ? currentValue : currentValue - 1;\n\n    countElement.value = newValue;\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\n\nconst NEGATIVE_ERROR = \"Enter a percentage of 0 or more.\";\nconst INVALID_CLASS = \"is-invalid\";\nconst HIDDEN_CLASS = \"d-none\";\n\nexport default class extends Controller {\n  static targets = [\"input\", \"error\"];\n\n  validate(event) {\n    const raw = this.inputTarget.value.trim();\n    const value = raw === \"\" ? 0 : Number(raw);\n\n    if (Number.isNaN(value) || value < 0) {\n      this.#cancelSubmit(event);\n      this.#showError(NEGATIVE_ERROR);\n      return;\n    }\n\n    if (value === 0) {\n      this.#cancelSubmit(event);\n      this.#close();\n    }\n  }\n\n  filterInput() {\n    const el = this.inputTarget;\n    const cleaned = el.value.replace(/[^0-9-]/g, \"\").replace(/(?!^)-/g, \"\");\n    if (cleaned !== el.value) el.value = cleaned;\n    this.clearError();\n  }\n\n  clearError() {\n    this.inputTarget.classList.remove(INVALID_CLASS);\n    this.errorTarget.classList.add(HIDDEN_CLASS);\n    this.errorTarget.textContent = \"\";\n  }\n\n  #cancelSubmit(event) {\n    event.preventDefault();\n    event.stopImmediatePropagation();\n    this.#resetSubmit();\n  }\n\n  #resetSubmit() {\n    const button = this.element.querySelector(\".ir-btn--spinner-shown\");\n    if (button) button.classList.remove(\"ir-btn--spinner-shown\");\n  }\n\n  #showError(message) {\n    this.inputTarget.classList.add(INVALID_CLASS);\n    this.errorTarget.textContent = message;\n    this.errorTarget.classList.remove(HIDDEN_CLASS);\n  }\n\n  #close() {\n    const closeLink = this.element.closest(\".ir-dialog__container\")?.querySelector(\".ir-dialog__close\");\n    if (closeLink) closeLink.click();\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport React from \"react\";\nimport ReactDOMServer from \"react-dom/server\";\n\nexport default class extends Controller {\n  static targets = [\"mapContainer\"];\n\n  mapId = \"distributors-map\";\n\n  connect() {\n    this.getLocations();\n\n    this.initGoogleMap();\n  }\n\n  getLocations() {\n    this.locations = JSON.parse(this.element.dataset.locations);\n  }\n\n  initGoogleMap = () => {\n    if (window.google === undefined) {\n      setTimeout(this.initGoogleMap, 50);\n      return;\n    }\n\n    this.map = new google.maps.Map(this.mapContainerTarget, {\n      center: new google.maps.LatLng(9.973271851273907, 48.593512174935576),\n      zoom: 20,\n      mapId: this.mapId,\n    });\n    this.addMarkersToMap();\n  };\n\n  addMarkersToMap() {\n    this.bounds = new google.maps.LatLngBounds();\n    this.locations.forEach((location) => {\n      this.addLocationMarkerToMap(location);\n    });\n    this.map.fitBounds(this.bounds);\n  }\n\n  addLocationMarkerToMap(location) {\n    if (location.lat === null || location.lng === null) return;\n\n    const latLng = new google.maps.LatLng(location.lat, location.lng);\n    this.bounds.extend(latLng);\n\n    const advancedMarker = new google.maps.marker.AdvancedMarkerElement({\n      position: latLng,\n      map: this.map,\n    });\n\n    const locationInfoPopup = new google.maps.InfoWindow({\n      content: this.locationInfoPopupContent(location),\n    });\n\n    google.maps.event.addListener(advancedMarker, \"click\", () => {\n      locationInfoPopup.open({\n        anchor: advancedMarker,\n        map: this.map,\n      });\n    });\n  }\n\n  quoteLink = (distributor_name, email, city, state) => (\n    <a\n      href=\"#\"\n      className=\"ir-link--orange\"\n      data-action=\"distributors--quote-links#request\"\n      data-distributor-name={distributor_name}\n      data-distributor-email={email}\n      data-distributor-city={city}\n      data-distributor-state={state}\n    >\n      <i className=\"fas fa-file-invoice-dollar\" />\n      &nbsp;Request quote\n    </a>\n  );\n\n  header = (url, name) => (\n    <h5>\n      {url !== \"\" && (\n        <a href={url} target=\"_blank\">\n          {name}\n        </a>\n      )}\n      {url === \"\" && name}\n    </h5>\n  );\n\n  locationInfoPopupContent(location) {\n    const { distributor_name, distributor_url, address, city, state, zipcode, phone, email } = location;\n\n    const content = (\n      <div>\n        {this.header(distributor_url, distributor_name)}\n        {email !== \"\" && <a href={`mailto:${email}`}>{email}</a>}\n        {email !== \"\" && <br />}\n        {address !== \"\" && <span>{address}</span>}\n        {address !== \"\" && <br />}\n        {city !== \"\" && <span>{city}</span>}\n        &nbsp;\n        {state !== \"\" && <span>{state}</span>}\n        &nbsp;\n        {zipcode !== \"\" && <span>{zipcode}</span>}\n        &nbsp;\n        <br />\n        {phone !== \"\" && <span>{phone}</span>}\n        {phone !== \"\" && <br />}\n        <br />\n        {this.quoteLink(distributor_name, email, city, state)}\n      </div>\n    );\n    return ReactDOMServer.renderToString(content);\n  }\n}\n", "import { getter, forEach, split, normalizePath, join } from 'property-expr';\nimport { camelCase, snakeCase } from 'tiny-case';\nimport toposort from 'toposort';\n\nconst toString = Object.prototype.toString;\nconst errorToString = Error.prototype.toString;\nconst regExpToString = RegExp.prototype.toString;\nconst symbolToString = typeof Symbol !== 'undefined' ? Symbol.prototype.toString : () => '';\nconst SYMBOL_REGEXP = /^Symbol\\((.*)\\)(.*)$/;\nfunction printNumber(val) {\n  if (val != +val) return 'NaN';\n  const isNegativeZero = val === 0 && 1 / val < 0;\n  return isNegativeZero ? '-0' : '' + val;\n}\nfunction printSimpleValue(val, quoteStrings = false) {\n  if (val == null || val === true || val === false) return '' + val;\n  const typeOf = typeof val;\n  if (typeOf === 'number') return printNumber(val);\n  if (typeOf === 'string') return quoteStrings ? `\"${val}\"` : val;\n  if (typeOf === 'function') return '[Function ' + (val.name || 'anonymous') + ']';\n  if (typeOf === 'symbol') return symbolToString.call(val).replace(SYMBOL_REGEXP, 'Symbol($1)');\n  const tag = toString.call(val).slice(8, -1);\n  if (tag === 'Date') return isNaN(val.getTime()) ? '' + val : val.toISOString(val);\n  if (tag === 'Error' || val instanceof Error) return '[' + errorToString.call(val) + ']';\n  if (tag === 'RegExp') return regExpToString.call(val);\n  return null;\n}\nfunction printValue(value, quoteStrings) {\n  let result = printSimpleValue(value, quoteStrings);\n  if (result !== null) return result;\n  return JSON.stringify(value, function (key, value) {\n    let result = printSimpleValue(this[key], quoteStrings);\n    if (result !== null) return result;\n    return value;\n  }, 2);\n}\n\nfunction toArray(value) {\n  return value == null ? [] : [].concat(value);\n}\n\nlet _Symbol$toStringTag, _Symbol$hasInstance, _Symbol$toStringTag2;\nlet strReg = /\\$\\{\\s*(\\w+)\\s*\\}/g;\n_Symbol$toStringTag = Symbol.toStringTag;\nclass ValidationErrorNoStack {\n  constructor(errorOrErrors, value, field, type) {\n    this.name = void 0;\n    this.message = void 0;\n    this.value = void 0;\n    this.path = void 0;\n    this.type = void 0;\n    this.params = void 0;\n    this.errors = void 0;\n    this.inner = void 0;\n    this[_Symbol$toStringTag] = 'Error';\n    this.name = 'ValidationError';\n    this.value = value;\n    this.path = field;\n    this.type = type;\n    this.errors = [];\n    this.inner = [];\n    toArray(errorOrErrors).forEach(err => {\n      if (ValidationError.isError(err)) {\n        this.errors.push(...err.errors);\n        const innerErrors = err.inner.length ? err.inner : [err];\n        this.inner.push(...innerErrors);\n      } else {\n        this.errors.push(err);\n      }\n    });\n    this.message = this.errors.length > 1 ? `${this.errors.length} errors occurred` : this.errors[0];\n  }\n}\n_Symbol$hasInstance = Symbol.hasInstance;\n_Symbol$toStringTag2 = Symbol.toStringTag;\nclass ValidationError extends Error {\n  static formatError(message, params) {\n    // Attempt to make the path more friendly for error message interpolation.\n    const path = params.label || params.path || 'this';\n    // Store the original path under `originalPath` so it isn't lost to custom\n    // message functions; e.g., ones provided in `setLocale()` calls.\n    params = Object.assign({}, params, {\n      path,\n      originalPath: params.path\n    });\n    if (typeof message === 'string') return message.replace(strReg, (_, key) => printValue(params[key]));\n    if (typeof message === 'function') return message(params);\n    return message;\n  }\n  static isError(err) {\n    return err && err.name === 'ValidationError';\n  }\n  constructor(errorOrErrors, value, field, type, disableStack) {\n    const errorNoStack = new ValidationErrorNoStack(errorOrErrors, value, field, type);\n    if (disableStack) {\n      return errorNoStack;\n    }\n    super();\n    this.value = void 0;\n    this.path = void 0;\n    this.type = void 0;\n    this.params = void 0;\n    this.errors = [];\n    this.inner = [];\n    this[_Symbol$toStringTag2] = 'Error';\n    this.name = errorNoStack.name;\n    this.message = errorNoStack.message;\n    this.type = errorNoStack.type;\n    this.value = errorNoStack.value;\n    this.path = errorNoStack.path;\n    this.errors = errorNoStack.errors;\n    this.inner = errorNoStack.inner;\n    if (Error.captureStackTrace) {\n      Error.captureStackTrace(this, ValidationError);\n    }\n  }\n  static [_Symbol$hasInstance](inst) {\n    return ValidationErrorNoStack[Symbol.hasInstance](inst) || super[Symbol.hasInstance](inst);\n  }\n}\n\nlet mixed = {\n  default: '${path} is invalid',\n  required: '${path} is a required field',\n  defined: '${path} must be defined',\n  notNull: '${path} cannot be null',\n  oneOf: '${path} must be one of the following values: ${values}',\n  notOneOf: '${path} must not be one of the following values: ${values}',\n  notType: ({\n    path,\n    type,\n    value,\n    originalValue\n  }) => {\n    const castMsg = originalValue != null && originalValue !== value ? ` (cast from the value \\`${printValue(originalValue, true)}\\`).` : '.';\n    return type !== 'mixed' ? `${path} must be a \\`${type}\\` type, ` + `but the final value was: \\`${printValue(value, true)}\\`` + castMsg : `${path} must match the configured type. ` + `The validated value was: \\`${printValue(value, true)}\\`` + castMsg;\n  }\n};\nlet string = {\n  length: '${path} must be exactly ${length} characters',\n  min: '${path} must be at least ${min} characters',\n  max: '${path} must be at most ${max} characters',\n  matches: '${path} must match the following: \"${regex}\"',\n  email: '${path} must be a valid email',\n  url: '${path} must be a valid URL',\n  uuid: '${path} must be a valid UUID',\n  datetime: '${path} must be a valid ISO date-time',\n  datetime_precision: '${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits',\n  datetime_offset: '${path} must be a valid ISO date-time with UTC \"Z\" timezone',\n  trim: '${path} must be a trimmed string',\n  lowercase: '${path} must be a lowercase string',\n  uppercase: '${path} must be a upper case string'\n};\nlet number = {\n  min: '${path} must be greater than or equal to ${min}',\n  max: '${path} must be less than or equal to ${max}',\n  lessThan: '${path} must be less than ${less}',\n  moreThan: '${path} must be greater than ${more}',\n  positive: '${path} must be a positive number',\n  negative: '${path} must be a negative number',\n  integer: '${path} must be an integer'\n};\nlet date = {\n  min: '${path} field must be later than ${min}',\n  max: '${path} field must be at earlier than ${max}'\n};\nlet boolean = {\n  isValue: '${path} field must be ${value}'\n};\nlet object = {\n  noUnknown: '${path} field has unspecified keys: ${unknown}',\n  exact: '${path} object contains unknown properties: ${properties}'\n};\nlet array = {\n  min: '${path} field must have at least ${min} items',\n  max: '${path} field must have less than or equal to ${max} items',\n  length: '${path} must have ${length} items'\n};\nlet tuple = {\n  notType: params => {\n    const {\n      path,\n      value,\n      spec\n    } = params;\n    const typeLen = spec.types.length;\n    if (Array.isArray(value)) {\n      if (value.length < typeLen) return `${path} tuple value has too few items, expected a length of ${typeLen} but got ${value.length} for value: \\`${printValue(value, true)}\\``;\n      if (value.length > typeLen) return `${path} tuple value has too many items, expected a length of ${typeLen} but got ${value.length} for value: \\`${printValue(value, true)}\\``;\n    }\n    return ValidationError.formatError(mixed.notType, params);\n  }\n};\nvar locale = Object.assign(Object.create(null), {\n  mixed,\n  string,\n  number,\n  date,\n  object,\n  array,\n  boolean,\n  tuple\n});\n\nconst isSchema = obj => obj && obj.__isYupSchema__;\n\nclass Condition {\n  static fromOptions(refs, config) {\n    if (!config.then && !config.otherwise) throw new TypeError('either `then:` or `otherwise:` is required for `when()` conditions');\n    let {\n      is,\n      then,\n      otherwise\n    } = config;\n    let check = typeof is === 'function' ? is : (...values) => values.every(value => value === is);\n    return new Condition(refs, (values, schema) => {\n      var _branch;\n      let branch = check(...values) ? then : otherwise;\n      return (_branch = branch == null ? void 0 : branch(schema)) != null ? _branch : schema;\n    });\n  }\n  constructor(refs, builder) {\n    this.fn = void 0;\n    this.refs = refs;\n    this.refs = refs;\n    this.fn = builder;\n  }\n  resolve(base, options) {\n    let values = this.refs.map(ref =>\n    // TODO: ? operator here?\n    ref.getValue(options == null ? void 0 : options.value, options == null ? void 0 : options.parent, options == null ? void 0 : options.context));\n    let schema = this.fn(values, base, options);\n    if (schema === undefined ||\n    // @ts-ignore this can be base\n    schema === base) {\n      return base;\n    }\n    if (!isSchema(schema)) throw new TypeError('conditions must return a schema object');\n    return schema.resolve(options);\n  }\n}\n\nconst prefixes = {\n  context: '$',\n  value: '.'\n};\nfunction create$9(key, options) {\n  return new Reference(key, options);\n}\nclass Reference {\n  constructor(key, options = {}) {\n    this.key = void 0;\n    this.isContext = void 0;\n    this.isValue = void 0;\n    this.isSibling = void 0;\n    this.path = void 0;\n    this.getter = void 0;\n    this.map = void 0;\n    if (typeof key !== 'string') throw new TypeError('ref must be a string, got: ' + key);\n    this.key = key.trim();\n    if (key === '') throw new TypeError('ref must be a non-empty string');\n    this.isContext = this.key[0] === prefixes.context;\n    this.isValue = this.key[0] === prefixes.value;\n    this.isSibling = !this.isContext && !this.isValue;\n    let prefix = this.isContext ? prefixes.context : this.isValue ? prefixes.value : '';\n    this.path = this.key.slice(prefix.length);\n    this.getter = this.path && getter(this.path, true);\n    this.map = options.map;\n  }\n  getValue(value, parent, context) {\n    let result = this.isContext ? context : this.isValue ? value : parent;\n    if (this.getter) result = this.getter(result || {});\n    if (this.map) result = this.map(result);\n    return result;\n  }\n\n  /**\n   *\n   * @param {*} value\n   * @param {Object} options\n   * @param {Object=} options.context\n   * @param {Object=} options.parent\n   */\n  cast(value, options) {\n    return this.getValue(value, options == null ? void 0 : options.parent, options == null ? void 0 : options.context);\n  }\n  resolve() {\n    return this;\n  }\n  describe() {\n    return {\n      type: 'ref',\n      key: this.key\n    };\n  }\n  toString() {\n    return `Ref(${this.key})`;\n  }\n  static isRef(value) {\n    return value && value.__isYupRef;\n  }\n}\n\n// @ts-ignore\nReference.prototype.__isYupRef = true;\n\nconst isAbsent = value => value == null;\n\nfunction createValidation(config) {\n  function validate({\n    value,\n    path = '',\n    options,\n    originalValue,\n    schema\n  }, panic, next) {\n    const {\n      name,\n      test,\n      params,\n      message,\n      skipAbsent\n    } = config;\n    let {\n      parent,\n      context,\n      abortEarly = schema.spec.abortEarly,\n      disableStackTrace = schema.spec.disableStackTrace\n    } = options;\n    const resolveOptions = {\n      value,\n      parent,\n      context\n    };\n    function createError(overrides = {}) {\n      const nextParams = resolveParams(Object.assign({\n        value,\n        originalValue,\n        label: schema.spec.label,\n        path: overrides.path || path,\n        spec: schema.spec,\n        disableStackTrace: overrides.disableStackTrace || disableStackTrace\n      }, params, overrides.params), resolveOptions);\n      const error = new ValidationError(ValidationError.formatError(overrides.message || message, nextParams), value, nextParams.path, overrides.type || name, nextParams.disableStackTrace);\n      error.params = nextParams;\n      return error;\n    }\n    const invalid = abortEarly ? panic : next;\n    let ctx = {\n      path,\n      parent,\n      type: name,\n      from: options.from,\n      createError,\n      resolve(item) {\n        return resolveMaybeRef(item, resolveOptions);\n      },\n      options,\n      originalValue,\n      schema\n    };\n    const handleResult = validOrError => {\n      if (ValidationError.isError(validOrError)) invalid(validOrError);else if (!validOrError) invalid(createError());else next(null);\n    };\n    const handleError = err => {\n      if (ValidationError.isError(err)) invalid(err);else panic(err);\n    };\n    const shouldSkip = skipAbsent && isAbsent(value);\n    if (shouldSkip) {\n      return handleResult(true);\n    }\n    let result;\n    try {\n      var _result;\n      result = test.call(ctx, value, ctx);\n      if (typeof ((_result = result) == null ? void 0 : _result.then) === 'function') {\n        if (options.sync) {\n          throw new Error(`Validation test of type: \"${ctx.type}\" returned a Promise during a synchronous validate. ` + `This test will finish after the validate call has returned`);\n        }\n        return Promise.resolve(result).then(handleResult, handleError);\n      }\n    } catch (err) {\n      handleError(err);\n      return;\n    }\n    handleResult(result);\n  }\n  validate.OPTIONS = config;\n  return validate;\n}\n\n// Warning: mutates the input\nfunction resolveParams(params, options) {\n  if (!params) return params;\n  for (const key of Object.keys(params)) {\n    params[key] = resolveMaybeRef(params[key], options);\n  }\n  return params;\n}\nfunction resolveMaybeRef(item, options) {\n  return Reference.isRef(item) ? item.getValue(options.value, options.parent, options.context) : item;\n}\n\nfunction getIn(schema, path, value, context = value) {\n  let parent, lastPart, lastPartDebug;\n\n  // root path: ''\n  if (!path) return {\n    parent,\n    parentPath: path,\n    schema\n  };\n  forEach(path, (_part, isBracket, isArray) => {\n    let part = isBracket ? _part.slice(1, _part.length - 1) : _part;\n    schema = schema.resolve({\n      context,\n      parent,\n      value\n    });\n    let isTuple = schema.type === 'tuple';\n    let idx = isArray ? parseInt(part, 10) : 0;\n    if (schema.innerType || isTuple) {\n      if (isTuple && !isArray) throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part \"${lastPartDebug}\" must contain an index to the tuple element, e.g. \"${lastPartDebug}[0]\"`);\n      if (value && idx >= value.length) {\n        throw new Error(`Yup.reach cannot resolve an array item at index: ${_part}, in the path: ${path}. ` + `because there is no value at that index. `);\n      }\n      parent = value;\n      value = value && value[idx];\n      schema = isTuple ? schema.spec.types[idx] : schema.innerType;\n    }\n\n    // sometimes the array index part of a path doesn't exist: \"nested.arr.child\"\n    // in these cases the current part is the next schema and should be processed\n    // in this iteration. For cases where the index signature is included this\n    // check will fail and we'll handle the `child` part on the next iteration like normal\n    if (!isArray) {\n      if (!schema.fields || !schema.fields[part]) throw new Error(`The schema does not contain the path: ${path}. ` + `(failed at: ${lastPartDebug} which is a type: \"${schema.type}\")`);\n      parent = value;\n      value = value && value[part];\n      schema = schema.fields[part];\n    }\n    lastPart = part;\n    lastPartDebug = isBracket ? '[' + _part + ']' : '.' + _part;\n  });\n  return {\n    schema,\n    parent,\n    parentPath: lastPart\n  };\n}\nfunction reach(obj, path, value, context) {\n  return getIn(obj, path, value, context).schema;\n}\n\nclass ReferenceSet extends Set {\n  describe() {\n    const description = [];\n    for (const item of this.values()) {\n      description.push(Reference.isRef(item) ? item.describe() : item);\n    }\n    return description;\n  }\n  resolveAll(resolve) {\n    let result = [];\n    for (const item of this.values()) {\n      result.push(resolve(item));\n    }\n    return result;\n  }\n  clone() {\n    return new ReferenceSet(this.values());\n  }\n  merge(newItems, removeItems) {\n    const next = this.clone();\n    newItems.forEach(value => next.add(value));\n    removeItems.forEach(value => next.delete(value));\n    return next;\n  }\n}\n\n// tweaked from https://github.com/Kelin2025/nanoclone/blob/0abeb7635bda9b68ef2277093f76dbe3bf3948e1/src/index.js\nfunction clone(src, seen = new Map()) {\n  if (isSchema(src) || !src || typeof src !== 'object') return src;\n  if (seen.has(src)) return seen.get(src);\n  let copy;\n  if (src instanceof Date) {\n    // Date\n    copy = new Date(src.getTime());\n    seen.set(src, copy);\n  } else if (src instanceof RegExp) {\n    // RegExp\n    copy = new RegExp(src);\n    seen.set(src, copy);\n  } else if (Array.isArray(src)) {\n    // Array\n    copy = new Array(src.length);\n    seen.set(src, copy);\n    for (let i = 0; i < src.length; i++) copy[i] = clone(src[i], seen);\n  } else if (src instanceof Map) {\n    // Map\n    copy = new Map();\n    seen.set(src, copy);\n    for (const [k, v] of src.entries()) copy.set(k, clone(v, seen));\n  } else if (src instanceof Set) {\n    // Set\n    copy = new Set();\n    seen.set(src, copy);\n    for (const v of src) copy.add(clone(v, seen));\n  } else if (src instanceof Object) {\n    // Object\n    copy = {};\n    seen.set(src, copy);\n    for (const [k, v] of Object.entries(src)) copy[k] = clone(v, seen);\n  } else {\n    throw Error(`Unable to clone ${src}`);\n  }\n  return copy;\n}\n\n/**\n * Copied from @standard-schema/spec to avoid having a dependency on it.\n * https://github.com/standard-schema/standard-schema/blob/main/packages/spec/src/index.ts\n */\n\nfunction createStandardPath(path) {\n  if (!(path != null && path.length)) {\n    return undefined;\n  }\n\n  // Array to store the final path segments\n  const segments = [];\n  // Buffer for building the current segment\n  let currentSegment = '';\n  // Track if we're inside square brackets (array/property access)\n  let inBrackets = false;\n  // Track if we're inside quotes (for property names with special chars)\n  let inQuotes = false;\n  for (let i = 0; i < path.length; i++) {\n    const char = path[i];\n    if (char === '[' && !inQuotes) {\n      // When entering brackets, push any accumulated segment after splitting on dots\n      if (currentSegment) {\n        segments.push(...currentSegment.split('.').filter(Boolean));\n        currentSegment = '';\n      }\n      inBrackets = true;\n      continue;\n    }\n    if (char === ']' && !inQuotes) {\n      if (currentSegment) {\n        // Handle numeric indices (e.g. arr[0])\n        if (/^\\d+$/.test(currentSegment)) {\n          segments.push(currentSegment);\n        } else {\n          // Handle quoted property names (e.g. obj[\"foo.bar\"])\n          segments.push(currentSegment.replace(/^\"|\"$/g, ''));\n        }\n        currentSegment = '';\n      }\n      inBrackets = false;\n      continue;\n    }\n    if (char === '\"') {\n      // Toggle quote state for handling quoted property names\n      inQuotes = !inQuotes;\n      continue;\n    }\n    if (char === '.' && !inBrackets && !inQuotes) {\n      // On dots outside brackets/quotes, push current segment\n      if (currentSegment) {\n        segments.push(currentSegment);\n        currentSegment = '';\n      }\n      continue;\n    }\n    currentSegment += char;\n  }\n\n  // Push any remaining segment after splitting on dots\n  if (currentSegment) {\n    segments.push(...currentSegment.split('.').filter(Boolean));\n  }\n  return segments;\n}\nfunction createStandardIssues(error, parentPath) {\n  const path = parentPath ? `${parentPath}.${error.path}` : error.path;\n  return error.errors.map(err => ({\n    message: err,\n    path: createStandardPath(path)\n  }));\n}\nfunction issuesFromValidationError(error, parentPath) {\n  var _error$inner;\n  if (!((_error$inner = error.inner) != null && _error$inner.length) && error.errors.length) {\n    return createStandardIssues(error, parentPath);\n  }\n  const path = parentPath ? `${parentPath}.${error.path}` : error.path;\n  return error.inner.flatMap(err => issuesFromValidationError(err, path));\n}\n\n// If `CustomSchemaMeta` isn't extended with any keys, we'll fall back to a\n// loose Record definition allowing free form usage.\nclass Schema {\n  constructor(options) {\n    this.type = void 0;\n    this.deps = [];\n    this.tests = void 0;\n    this.transforms = void 0;\n    this.conditions = [];\n    this._mutate = void 0;\n    this.internalTests = {};\n    this._whitelist = new ReferenceSet();\n    this._blacklist = new ReferenceSet();\n    this.exclusiveTests = Object.create(null);\n    this._typeCheck = void 0;\n    this.spec = void 0;\n    this.tests = [];\n    this.transforms = [];\n    this.withMutation(() => {\n      this.typeError(mixed.notType);\n    });\n    this.type = options.type;\n    this._typeCheck = options.check;\n    this.spec = Object.assign({\n      strip: false,\n      strict: false,\n      abortEarly: true,\n      recursive: true,\n      disableStackTrace: false,\n      nullable: false,\n      optional: true,\n      coerce: true\n    }, options == null ? void 0 : options.spec);\n    this.withMutation(s => {\n      s.nonNullable();\n    });\n  }\n\n  // TODO: remove\n  get _type() {\n    return this.type;\n  }\n  clone(spec) {\n    if (this._mutate) {\n      if (spec) Object.assign(this.spec, spec);\n      return this;\n    }\n\n    // if the nested value is a schema we can skip cloning, since\n    // they are already immutable\n    const next = Object.create(Object.getPrototypeOf(this));\n\n    // @ts-expect-error this is readonly\n    next.type = this.type;\n    next._typeCheck = this._typeCheck;\n    next._whitelist = this._whitelist.clone();\n    next._blacklist = this._blacklist.clone();\n    next.internalTests = Object.assign({}, this.internalTests);\n    next.exclusiveTests = Object.assign({}, this.exclusiveTests);\n\n    // @ts-expect-error this is readonly\n    next.deps = [...this.deps];\n    next.conditions = [...this.conditions];\n    next.tests = [...this.tests];\n    next.transforms = [...this.transforms];\n    next.spec = clone(Object.assign({}, this.spec, spec));\n    return next;\n  }\n  label(label) {\n    let next = this.clone();\n    next.spec.label = label;\n    return next;\n  }\n  meta(...args) {\n    if (args.length === 0) return this.spec.meta;\n    let next = this.clone();\n    next.spec.meta = Object.assign(next.spec.meta || {}, args[0]);\n    return next;\n  }\n  withMutation(fn) {\n    let before = this._mutate;\n    this._mutate = true;\n    let result = fn(this);\n    this._mutate = before;\n    return result;\n  }\n  concat(schema) {\n    if (!schema || schema === this) return this;\n    if (schema.type !== this.type && this.type !== 'mixed') throw new TypeError(`You cannot \\`concat()\\` schema's of different types: ${this.type} and ${schema.type}`);\n    let base = this;\n    let combined = schema.clone();\n    const mergedSpec = Object.assign({}, base.spec, combined.spec);\n    combined.spec = mergedSpec;\n    combined.internalTests = Object.assign({}, base.internalTests, combined.internalTests);\n\n    // manually merge the blacklist/whitelist (the other `schema` takes\n    // precedence in case of conflicts)\n    combined._whitelist = base._whitelist.merge(schema._whitelist, schema._blacklist);\n    combined._blacklist = base._blacklist.merge(schema._blacklist, schema._whitelist);\n\n    // start with the current tests\n    combined.tests = base.tests;\n    combined.exclusiveTests = base.exclusiveTests;\n\n    // manually add the new tests to ensure\n    // the deduping logic is consistent\n    combined.withMutation(next => {\n      schema.tests.forEach(fn => {\n        next.test(fn.OPTIONS);\n      });\n    });\n    combined.transforms = [...base.transforms, ...combined.transforms];\n    return combined;\n  }\n  isType(v) {\n    if (v == null) {\n      if (this.spec.nullable && v === null) return true;\n      if (this.spec.optional && v === undefined) return true;\n      return false;\n    }\n    return this._typeCheck(v);\n  }\n  resolve(options) {\n    let schema = this;\n    if (schema.conditions.length) {\n      let conditions = schema.conditions;\n      schema = schema.clone();\n      schema.conditions = [];\n      schema = conditions.reduce((prevSchema, condition) => condition.resolve(prevSchema, options), schema);\n      schema = schema.resolve(options);\n    }\n    return schema;\n  }\n  resolveOptions(options) {\n    var _options$strict, _options$abortEarly, _options$recursive, _options$disableStack;\n    return Object.assign({}, options, {\n      from: options.from || [],\n      strict: (_options$strict = options.strict) != null ? _options$strict : this.spec.strict,\n      abortEarly: (_options$abortEarly = options.abortEarly) != null ? _options$abortEarly : this.spec.abortEarly,\n      recursive: (_options$recursive = options.recursive) != null ? _options$recursive : this.spec.recursive,\n      disableStackTrace: (_options$disableStack = options.disableStackTrace) != null ? _options$disableStack : this.spec.disableStackTrace\n    });\n  }\n\n  /**\n   * Run the configured transform pipeline over an input value.\n   */\n\n  cast(value, options = {}) {\n    let resolvedSchema = this.resolve(Object.assign({}, options, {\n      value\n      // parent: options.parent,\n      // context: options.context,\n    }));\n\n    let allowOptionality = options.assert === 'ignore-optionality';\n    let result = resolvedSchema._cast(value, options);\n    if (options.assert !== false && !resolvedSchema.isType(result)) {\n      if (allowOptionality && isAbsent(result)) {\n        return result;\n      }\n      let formattedValue = printValue(value);\n      let formattedResult = printValue(result);\n      throw new TypeError(`The value of ${options.path || 'field'} could not be cast to a value ` + `that satisfies the schema type: \"${resolvedSchema.type}\". \\n\\n` + `attempted value: ${formattedValue} \\n` + (formattedResult !== formattedValue ? `result of cast: ${formattedResult}` : ''));\n    }\n    return result;\n  }\n  _cast(rawValue, options) {\n    let value = rawValue === undefined ? rawValue : this.transforms.reduce((prevValue, fn) => fn.call(this, prevValue, rawValue, this, options), rawValue);\n    if (value === undefined) {\n      value = this.getDefault(options);\n    }\n    return value;\n  }\n  _validate(_value, options = {}, panic, next) {\n    let {\n      path,\n      originalValue = _value,\n      strict = this.spec.strict\n    } = options;\n    let value = _value;\n    if (!strict) {\n      value = this._cast(value, Object.assign({\n        assert: false\n      }, options));\n    }\n    let initialTests = [];\n    for (let test of Object.values(this.internalTests)) {\n      if (test) initialTests.push(test);\n    }\n    this.runTests({\n      path,\n      value,\n      originalValue,\n      options,\n      tests: initialTests\n    }, panic, initialErrors => {\n      // even if we aren't ending early we can't proceed further if the types aren't correct\n      if (initialErrors.length) {\n        return next(initialErrors, value);\n      }\n      this.runTests({\n        path,\n        value,\n        originalValue,\n        options,\n        tests: this.tests\n      }, panic, next);\n    });\n  }\n\n  /**\n   * Executes a set of validations, either schema, produced Tests or a nested\n   * schema validate result.\n   */\n  runTests(runOptions, panic, next) {\n    let fired = false;\n    let {\n      tests,\n      value,\n      originalValue,\n      path,\n      options\n    } = runOptions;\n    let panicOnce = arg => {\n      if (fired) return;\n      fired = true;\n      panic(arg, value);\n    };\n    let nextOnce = arg => {\n      if (fired) return;\n      fired = true;\n      next(arg, value);\n    };\n    let count = tests.length;\n    let nestedErrors = [];\n    if (!count) return nextOnce([]);\n    let args = {\n      value,\n      originalValue,\n      path,\n      options,\n      schema: this\n    };\n    for (let i = 0; i < tests.length; i++) {\n      const test = tests[i];\n      test(args, panicOnce, function finishTestRun(err) {\n        if (err) {\n          Array.isArray(err) ? nestedErrors.push(...err) : nestedErrors.push(err);\n        }\n        if (--count <= 0) {\n          nextOnce(nestedErrors);\n        }\n      });\n    }\n  }\n  asNestedTest({\n    key,\n    index,\n    parent,\n    parentPath,\n    originalParent,\n    options\n  }) {\n    const k = key != null ? key : index;\n    if (k == null) {\n      throw TypeError('Must include `key` or `index` for nested validations');\n    }\n    const isIndex = typeof k === 'number';\n    let value = parent[k];\n    const testOptions = Object.assign({}, options, {\n      // Nested validations fields are always strict:\n      //    1. parent isn't strict so the casting will also have cast inner values\n      //    2. parent is strict in which case the nested values weren't cast either\n      strict: true,\n      parent,\n      value,\n      originalValue: originalParent[k],\n      // FIXME: tests depend on `index` being passed around deeply,\n      //   we should not let the options.key/index bleed through\n      key: undefined,\n      // index: undefined,\n      [isIndex ? 'index' : 'key']: k,\n      path: isIndex || k.includes('.') ? `${parentPath || ''}[${isIndex ? k : `\"${k}\"`}]` : (parentPath ? `${parentPath}.` : '') + key\n    });\n    return (_, panic, next) => this.resolve(testOptions)._validate(value, testOptions, panic, next);\n  }\n  validate(value, options) {\n    var _options$disableStack2;\n    let schema = this.resolve(Object.assign({}, options, {\n      value\n    }));\n    let disableStackTrace = (_options$disableStack2 = options == null ? void 0 : options.disableStackTrace) != null ? _options$disableStack2 : schema.spec.disableStackTrace;\n    return new Promise((resolve, reject) => schema._validate(value, options, (error, parsed) => {\n      if (ValidationError.isError(error)) error.value = parsed;\n      reject(error);\n    }, (errors, validated) => {\n      if (errors.length) reject(new ValidationError(errors, validated, undefined, undefined, disableStackTrace));else resolve(validated);\n    }));\n  }\n  validateSync(value, options) {\n    var _options$disableStack3;\n    let schema = this.resolve(Object.assign({}, options, {\n      value\n    }));\n    let result;\n    let disableStackTrace = (_options$disableStack3 = options == null ? void 0 : options.disableStackTrace) != null ? _options$disableStack3 : schema.spec.disableStackTrace;\n    schema._validate(value, Object.assign({}, options, {\n      sync: true\n    }), (error, parsed) => {\n      if (ValidationError.isError(error)) error.value = parsed;\n      throw error;\n    }, (errors, validated) => {\n      if (errors.length) throw new ValidationError(errors, value, undefined, undefined, disableStackTrace);\n      result = validated;\n    });\n    return result;\n  }\n  isValid(value, options) {\n    return this.validate(value, options).then(() => true, err => {\n      if (ValidationError.isError(err)) return false;\n      throw err;\n    });\n  }\n  isValidSync(value, options) {\n    try {\n      this.validateSync(value, options);\n      return true;\n    } catch (err) {\n      if (ValidationError.isError(err)) return false;\n      throw err;\n    }\n  }\n  _getDefault(options) {\n    let defaultValue = this.spec.default;\n    if (defaultValue == null) {\n      return defaultValue;\n    }\n    return typeof defaultValue === 'function' ? defaultValue.call(this, options) : clone(defaultValue);\n  }\n  getDefault(options\n  // If schema is defaulted we know it's at least not undefined\n  ) {\n    let schema = this.resolve(options || {});\n    return schema._getDefault(options);\n  }\n  default(def) {\n    if (arguments.length === 0) {\n      return this._getDefault();\n    }\n    let next = this.clone({\n      default: def\n    });\n    return next;\n  }\n  strict(isStrict = true) {\n    return this.clone({\n      strict: isStrict\n    });\n  }\n  nullability(nullable, message) {\n    const next = this.clone({\n      nullable\n    });\n    next.internalTests.nullable = createValidation({\n      message,\n      name: 'nullable',\n      test(value) {\n        return value === null ? this.schema.spec.nullable : true;\n      }\n    });\n    return next;\n  }\n  optionality(optional, message) {\n    const next = this.clone({\n      optional\n    });\n    next.internalTests.optionality = createValidation({\n      message,\n      name: 'optionality',\n      test(value) {\n        return value === undefined ? this.schema.spec.optional : true;\n      }\n    });\n    return next;\n  }\n  optional() {\n    return this.optionality(true);\n  }\n  defined(message = mixed.defined) {\n    return this.optionality(false, message);\n  }\n  nullable() {\n    return this.nullability(true);\n  }\n  nonNullable(message = mixed.notNull) {\n    return this.nullability(false, message);\n  }\n  required(message = mixed.required) {\n    return this.clone().withMutation(next => next.nonNullable(message).defined(message));\n  }\n  notRequired() {\n    return this.clone().withMutation(next => next.nullable().optional());\n  }\n  transform(fn) {\n    let next = this.clone();\n    next.transforms.push(fn);\n    return next;\n  }\n\n  /**\n   * Adds a test function to the schema's queue of tests.\n   * tests can be exclusive or non-exclusive.\n   *\n   * - exclusive tests, will replace any existing tests of the same name.\n   * - non-exclusive: can be stacked\n   *\n   * If a non-exclusive test is added to a schema with an exclusive test of the same name\n   * the exclusive test is removed and further tests of the same name will be stacked.\n   *\n   * If an exclusive test is added to a schema with non-exclusive tests of the same name\n   * the previous tests are removed and further tests of the same name will replace each other.\n   */\n\n  test(...args) {\n    let opts;\n    if (args.length === 1) {\n      if (typeof args[0] === 'function') {\n        opts = {\n          test: args[0]\n        };\n      } else {\n        opts = args[0];\n      }\n    } else if (args.length === 2) {\n      opts = {\n        name: args[0],\n        test: args[1]\n      };\n    } else {\n      opts = {\n        name: args[0],\n        message: args[1],\n        test: args[2]\n      };\n    }\n    if (opts.message === undefined) opts.message = mixed.default;\n    if (typeof opts.test !== 'function') throw new TypeError('`test` is a required parameters');\n    let next = this.clone();\n    let validate = createValidation(opts);\n    let isExclusive = opts.exclusive || opts.name && next.exclusiveTests[opts.name] === true;\n    if (opts.exclusive) {\n      if (!opts.name) throw new TypeError('Exclusive tests must provide a unique `name` identifying the test');\n    }\n    if (opts.name) next.exclusiveTests[opts.name] = !!opts.exclusive;\n    next.tests = next.tests.filter(fn => {\n      if (fn.OPTIONS.name === opts.name) {\n        if (isExclusive) return false;\n        if (fn.OPTIONS.test === validate.OPTIONS.test) return false;\n      }\n      return true;\n    });\n    next.tests.push(validate);\n    return next;\n  }\n  when(keys, options) {\n    if (!Array.isArray(keys) && typeof keys !== 'string') {\n      options = keys;\n      keys = '.';\n    }\n    let next = this.clone();\n    let deps = toArray(keys).map(key => new Reference(key));\n    deps.forEach(dep => {\n      // @ts-ignore readonly array\n      if (dep.isSibling) next.deps.push(dep.key);\n    });\n    next.conditions.push(typeof options === 'function' ? new Condition(deps, options) : Condition.fromOptions(deps, options));\n    return next;\n  }\n  typeError(message) {\n    let next = this.clone();\n    next.internalTests.typeError = createValidation({\n      message,\n      name: 'typeError',\n      skipAbsent: true,\n      test(value) {\n        if (!this.schema._typeCheck(value)) return this.createError({\n          params: {\n            type: this.schema.type\n          }\n        });\n        return true;\n      }\n    });\n    return next;\n  }\n  oneOf(enums, message = mixed.oneOf) {\n    let next = this.clone();\n    enums.forEach(val => {\n      next._whitelist.add(val);\n      next._blacklist.delete(val);\n    });\n    next.internalTests.whiteList = createValidation({\n      message,\n      name: 'oneOf',\n      skipAbsent: true,\n      test(value) {\n        let valids = this.schema._whitelist;\n        let resolved = valids.resolveAll(this.resolve);\n        return resolved.includes(value) ? true : this.createError({\n          params: {\n            values: Array.from(valids).join(', '),\n            resolved\n          }\n        });\n      }\n    });\n    return next;\n  }\n  notOneOf(enums, message = mixed.notOneOf) {\n    let next = this.clone();\n    enums.forEach(val => {\n      next._blacklist.add(val);\n      next._whitelist.delete(val);\n    });\n    next.internalTests.blacklist = createValidation({\n      message,\n      name: 'notOneOf',\n      test(value) {\n        let invalids = this.schema._blacklist;\n        let resolved = invalids.resolveAll(this.resolve);\n        if (resolved.includes(value)) return this.createError({\n          params: {\n            values: Array.from(invalids).join(', '),\n            resolved\n          }\n        });\n        return true;\n      }\n    });\n    return next;\n  }\n  strip(strip = true) {\n    let next = this.clone();\n    next.spec.strip = strip;\n    return next;\n  }\n\n  /**\n   * Return a serialized description of the schema including validations, flags, types etc.\n   *\n   * @param options Provide any needed context for resolving runtime schema alterations (lazy, when conditions, etc).\n   */\n  describe(options) {\n    const next = (options ? this.resolve(options) : this).clone();\n    const {\n      label,\n      meta,\n      optional,\n      nullable\n    } = next.spec;\n    const description = {\n      meta,\n      label,\n      optional,\n      nullable,\n      default: next.getDefault(options),\n      type: next.type,\n      oneOf: next._whitelist.describe(),\n      notOneOf: next._blacklist.describe(),\n      tests: next.tests.filter((n, idx, list) => list.findIndex(c => c.OPTIONS.name === n.OPTIONS.name) === idx).map(fn => {\n        const params = fn.OPTIONS.params && options ? resolveParams(Object.assign({}, fn.OPTIONS.params), options) : fn.OPTIONS.params;\n        return {\n          name: fn.OPTIONS.name,\n          params\n        };\n      })\n    };\n    return description;\n  }\n  get ['~standard']() {\n    const schema = this;\n    const standard = {\n      version: 1,\n      vendor: 'yup',\n      async validate(value) {\n        try {\n          const result = await schema.validate(value, {\n            abortEarly: false\n          });\n          return {\n            value: result\n          };\n        } catch (err) {\n          if (err instanceof ValidationError) {\n            return {\n              issues: issuesFromValidationError(err)\n            };\n          }\n          throw err;\n        }\n      }\n    };\n    return standard;\n  }\n}\n// @ts-expect-error\nSchema.prototype.__isYupSchema__ = true;\nfor (const method of ['validate', 'validateSync']) Schema.prototype[`${method}At`] = function (path, value, options = {}) {\n  const {\n    parent,\n    parentPath,\n    schema\n  } = getIn(this, path, value, options.context);\n  return schema[method](parent && parent[parentPath], Object.assign({}, options, {\n    parent,\n    path\n  }));\n};\nfor (const alias of ['equals', 'is']) Schema.prototype[alias] = Schema.prototype.oneOf;\nfor (const alias of ['not', 'nope']) Schema.prototype[alias] = Schema.prototype.notOneOf;\n\nconst returnsTrue = () => true;\nfunction create$8(spec) {\n  return new MixedSchema(spec);\n}\nclass MixedSchema extends Schema {\n  constructor(spec) {\n    super(typeof spec === 'function' ? {\n      type: 'mixed',\n      check: spec\n    } : Object.assign({\n      type: 'mixed',\n      check: returnsTrue\n    }, spec));\n  }\n}\ncreate$8.prototype = MixedSchema.prototype;\n\nfunction create$7() {\n  return new BooleanSchema();\n}\nclass BooleanSchema extends Schema {\n  constructor() {\n    super({\n      type: 'boolean',\n      check(v) {\n        if (v instanceof Boolean) v = v.valueOf();\n        return typeof v === 'boolean';\n      }\n    });\n    this.withMutation(() => {\n      this.transform((value, _raw) => {\n        if (this.spec.coerce && !this.isType(value)) {\n          if (/^(true|1)$/i.test(String(value))) return true;\n          if (/^(false|0)$/i.test(String(value))) return false;\n        }\n        return value;\n      });\n    });\n  }\n  isTrue(message = boolean.isValue) {\n    return this.test({\n      message,\n      name: 'is-value',\n      exclusive: true,\n      params: {\n        value: 'true'\n      },\n      test(value) {\n        return isAbsent(value) || value === true;\n      }\n    });\n  }\n  isFalse(message = boolean.isValue) {\n    return this.test({\n      message,\n      name: 'is-value',\n      exclusive: true,\n      params: {\n        value: 'false'\n      },\n      test(value) {\n        return isAbsent(value) || value === false;\n      }\n    });\n  }\n  default(def) {\n    return super.default(def);\n  }\n  defined(msg) {\n    return super.defined(msg);\n  }\n  optional() {\n    return super.optional();\n  }\n  required(msg) {\n    return super.required(msg);\n  }\n  notRequired() {\n    return super.notRequired();\n  }\n  nullable() {\n    return super.nullable();\n  }\n  nonNullable(msg) {\n    return super.nonNullable(msg);\n  }\n  strip(v) {\n    return super.strip(v);\n  }\n}\ncreate$7.prototype = BooleanSchema.prototype;\n\n/**\n * This file is a modified version of the file from the following repository:\n * Date.parse with progressive enhancement for ISO 8601 <https://github.com/csnover/js-iso8601>\n * NON-CONFORMANT EDITION.\n * \u00A9 2011 Colin Snover <http://zetafleet.com>\n * Released under MIT license.\n */\n\n// prettier-ignore\n//                1 YYYY                2 MM        3 DD              4 HH     5 mm        6 ss           7 msec         8 Z 9 \u00B1   10 tzHH    11 tzmm\nconst isoReg = /^(\\d{4}|[+-]\\d{6})(?:-?(\\d{2})(?:-?(\\d{2}))?)?(?:[ T]?(\\d{2}):?(\\d{2})(?::?(\\d{2})(?:[,.](\\d{1,}))?)?(?:(Z)|([+-])(\\d{2})(?::?(\\d{2}))?)?)?$/;\nfunction parseIsoDate(date) {\n  const struct = parseDateStruct(date);\n  if (!struct) return Date.parse ? Date.parse(date) : Number.NaN;\n\n  // timestamps without timezone identifiers should be considered local time\n  if (struct.z === undefined && struct.plusMinus === undefined) {\n    return new Date(struct.year, struct.month, struct.day, struct.hour, struct.minute, struct.second, struct.millisecond).valueOf();\n  }\n  let totalMinutesOffset = 0;\n  if (struct.z !== 'Z' && struct.plusMinus !== undefined) {\n    totalMinutesOffset = struct.hourOffset * 60 + struct.minuteOffset;\n    if (struct.plusMinus === '+') totalMinutesOffset = 0 - totalMinutesOffset;\n  }\n  return Date.UTC(struct.year, struct.month, struct.day, struct.hour, struct.minute + totalMinutesOffset, struct.second, struct.millisecond);\n}\nfunction parseDateStruct(date) {\n  var _regexResult$7$length, _regexResult$;\n  const regexResult = isoReg.exec(date);\n  if (!regexResult) return null;\n\n  // use of toNumber() avoids NaN timestamps caused by \u201Cundefined\u201D\n  // values being passed to Date constructor\n  return {\n    year: toNumber(regexResult[1]),\n    month: toNumber(regexResult[2], 1) - 1,\n    day: toNumber(regexResult[3], 1),\n    hour: toNumber(regexResult[4]),\n    minute: toNumber(regexResult[5]),\n    second: toNumber(regexResult[6]),\n    millisecond: regexResult[7] ?\n    // allow arbitrary sub-second precision beyond milliseconds\n    toNumber(regexResult[7].substring(0, 3)) : 0,\n    precision: (_regexResult$7$length = (_regexResult$ = regexResult[7]) == null ? void 0 : _regexResult$.length) != null ? _regexResult$7$length : undefined,\n    z: regexResult[8] || undefined,\n    plusMinus: regexResult[9] || undefined,\n    hourOffset: toNumber(regexResult[10]),\n    minuteOffset: toNumber(regexResult[11])\n  };\n}\nfunction toNumber(str, defaultValue = 0) {\n  return Number(str) || defaultValue;\n}\n\n// Taken from HTML spec: https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address\nlet rEmail =\n// eslint-disable-next-line\n/^[a-zA-Z0-9.!#$%&'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;\nlet rUrl =\n// eslint-disable-next-line\n/^((https?|ftp):)?\\/\\/(((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:)*@)?(((\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|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]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)|\\/|\\?)*)?$/i;\n\n// eslint-disable-next-line\nlet rUUID = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;\nlet yearMonthDay = '^\\\\d{4}-\\\\d{2}-\\\\d{2}';\nlet hourMinuteSecond = '\\\\d{2}:\\\\d{2}:\\\\d{2}';\nlet zOrOffset = '(([+-]\\\\d{2}(:?\\\\d{2})?)|Z)';\nlet rIsoDateTime = new RegExp(`${yearMonthDay}T${hourMinuteSecond}(\\\\.\\\\d+)?${zOrOffset}$`);\nlet isTrimmed = value => isAbsent(value) || value === value.trim();\nlet objStringTag = {}.toString();\nfunction create$6() {\n  return new StringSchema();\n}\nclass StringSchema extends Schema {\n  constructor() {\n    super({\n      type: 'string',\n      check(value) {\n        if (value instanceof String) value = value.valueOf();\n        return typeof value === 'string';\n      }\n    });\n    this.withMutation(() => {\n      this.transform((value, _raw) => {\n        if (!this.spec.coerce || this.isType(value)) return value;\n\n        // don't ever convert arrays\n        if (Array.isArray(value)) return value;\n        const strValue = value != null && value.toString ? value.toString() : value;\n\n        // no one wants plain objects converted to [Object object]\n        if (strValue === objStringTag) return value;\n        return strValue;\n      });\n    });\n  }\n  required(message) {\n    return super.required(message).withMutation(schema => schema.test({\n      message: message || mixed.required,\n      name: 'required',\n      skipAbsent: true,\n      test: value => !!value.length\n    }));\n  }\n  notRequired() {\n    return super.notRequired().withMutation(schema => {\n      schema.tests = schema.tests.filter(t => t.OPTIONS.name !== 'required');\n      return schema;\n    });\n  }\n  length(length, message = string.length) {\n    return this.test({\n      message,\n      name: 'length',\n      exclusive: true,\n      params: {\n        length\n      },\n      skipAbsent: true,\n      test(value) {\n        return value.length === this.resolve(length);\n      }\n    });\n  }\n  min(min, message = string.min) {\n    return this.test({\n      message,\n      name: 'min',\n      exclusive: true,\n      params: {\n        min\n      },\n      skipAbsent: true,\n      test(value) {\n        return value.length >= this.resolve(min);\n      }\n    });\n  }\n  max(max, message = string.max) {\n    return this.test({\n      name: 'max',\n      exclusive: true,\n      message,\n      params: {\n        max\n      },\n      skipAbsent: true,\n      test(value) {\n        return value.length <= this.resolve(max);\n      }\n    });\n  }\n  matches(regex, options) {\n    let excludeEmptyString = false;\n    let message;\n    let name;\n    if (options) {\n      if (typeof options === 'object') {\n        ({\n          excludeEmptyString = false,\n          message,\n          name\n        } = options);\n      } else {\n        message = options;\n      }\n    }\n    return this.test({\n      name: name || 'matches',\n      message: message || string.matches,\n      params: {\n        regex\n      },\n      skipAbsent: true,\n      test: value => value === '' && excludeEmptyString || value.search(regex) !== -1\n    });\n  }\n  email(message = string.email) {\n    return this.matches(rEmail, {\n      name: 'email',\n      message,\n      excludeEmptyString: true\n    });\n  }\n  url(message = string.url) {\n    return this.matches(rUrl, {\n      name: 'url',\n      message,\n      excludeEmptyString: true\n    });\n  }\n  uuid(message = string.uuid) {\n    return this.matches(rUUID, {\n      name: 'uuid',\n      message,\n      excludeEmptyString: false\n    });\n  }\n  datetime(options) {\n    let message = '';\n    let allowOffset;\n    let precision;\n    if (options) {\n      if (typeof options === 'object') {\n        ({\n          message = '',\n          allowOffset = false,\n          precision = undefined\n        } = options);\n      } else {\n        message = options;\n      }\n    }\n    return this.matches(rIsoDateTime, {\n      name: 'datetime',\n      message: message || string.datetime,\n      excludeEmptyString: true\n    }).test({\n      name: 'datetime_offset',\n      message: message || string.datetime_offset,\n      params: {\n        allowOffset\n      },\n      skipAbsent: true,\n      test: value => {\n        if (!value || allowOffset) return true;\n        const struct = parseDateStruct(value);\n        if (!struct) return false;\n        return !!struct.z;\n      }\n    }).test({\n      name: 'datetime_precision',\n      message: message || string.datetime_precision,\n      params: {\n        precision\n      },\n      skipAbsent: true,\n      test: value => {\n        if (!value || precision == undefined) return true;\n        const struct = parseDateStruct(value);\n        if (!struct) return false;\n        return struct.precision === precision;\n      }\n    });\n  }\n\n  //-- transforms --\n  ensure() {\n    return this.default('').transform(val => val === null ? '' : val);\n  }\n  trim(message = string.trim) {\n    return this.transform(val => val != null ? val.trim() : val).test({\n      message,\n      name: 'trim',\n      test: isTrimmed\n    });\n  }\n  lowercase(message = string.lowercase) {\n    return this.transform(value => !isAbsent(value) ? value.toLowerCase() : value).test({\n      message,\n      name: 'string_case',\n      exclusive: true,\n      skipAbsent: true,\n      test: value => isAbsent(value) || value === value.toLowerCase()\n    });\n  }\n  uppercase(message = string.uppercase) {\n    return this.transform(value => !isAbsent(value) ? value.toUpperCase() : value).test({\n      message,\n      name: 'string_case',\n      exclusive: true,\n      skipAbsent: true,\n      test: value => isAbsent(value) || value === value.toUpperCase()\n    });\n  }\n}\ncreate$6.prototype = StringSchema.prototype;\n\n//\n// String Interfaces\n//\n\nlet isNaN$1 = value => value != +value;\nfunction create$5() {\n  return new NumberSchema();\n}\nclass NumberSchema extends Schema {\n  constructor() {\n    super({\n      type: 'number',\n      check(value) {\n        if (value instanceof Number) value = value.valueOf();\n        return typeof value === 'number' && !isNaN$1(value);\n      }\n    });\n    this.withMutation(() => {\n      this.transform((value, _raw) => {\n        if (!this.spec.coerce) return value;\n        let parsed = value;\n        if (typeof parsed === 'string') {\n          parsed = parsed.replace(/\\s/g, '');\n          if (parsed === '') return NaN;\n          // don't use parseFloat to avoid positives on alpha-numeric strings\n          parsed = +parsed;\n        }\n\n        // null -> NaN isn't useful; treat all nulls as null and let it fail on\n        // nullability check vs TypeErrors\n        if (this.isType(parsed) || parsed === null) return parsed;\n        return parseFloat(parsed);\n      });\n    });\n  }\n  min(min, message = number.min) {\n    return this.test({\n      message,\n      name: 'min',\n      exclusive: true,\n      params: {\n        min\n      },\n      skipAbsent: true,\n      test(value) {\n        return value >= this.resolve(min);\n      }\n    });\n  }\n  max(max, message = number.max) {\n    return this.test({\n      message,\n      name: 'max',\n      exclusive: true,\n      params: {\n        max\n      },\n      skipAbsent: true,\n      test(value) {\n        return value <= this.resolve(max);\n      }\n    });\n  }\n  lessThan(less, message = number.lessThan) {\n    return this.test({\n      message,\n      name: 'max',\n      exclusive: true,\n      params: {\n        less\n      },\n      skipAbsent: true,\n      test(value) {\n        return value < this.resolve(less);\n      }\n    });\n  }\n  moreThan(more, message = number.moreThan) {\n    return this.test({\n      message,\n      name: 'min',\n      exclusive: true,\n      params: {\n        more\n      },\n      skipAbsent: true,\n      test(value) {\n        return value > this.resolve(more);\n      }\n    });\n  }\n  positive(msg = number.positive) {\n    return this.moreThan(0, msg);\n  }\n  negative(msg = number.negative) {\n    return this.lessThan(0, msg);\n  }\n  integer(message = number.integer) {\n    return this.test({\n      name: 'integer',\n      message,\n      skipAbsent: true,\n      test: val => Number.isInteger(val)\n    });\n  }\n  truncate() {\n    return this.transform(value => !isAbsent(value) ? value | 0 : value);\n  }\n  round(method) {\n    var _method;\n    let avail = ['ceil', 'floor', 'round', 'trunc'];\n    method = ((_method = method) == null ? void 0 : _method.toLowerCase()) || 'round';\n\n    // this exists for symemtry with the new Math.trunc\n    if (method === 'trunc') return this.truncate();\n    if (avail.indexOf(method.toLowerCase()) === -1) throw new TypeError('Only valid options for round() are: ' + avail.join(', '));\n    return this.transform(value => !isAbsent(value) ? Math[method](value) : value);\n  }\n}\ncreate$5.prototype = NumberSchema.prototype;\n\n//\n// Number Interfaces\n//\n\nlet invalidDate = new Date('');\nlet isDate = obj => Object.prototype.toString.call(obj) === '[object Date]';\nfunction create$4() {\n  return new DateSchema();\n}\nclass DateSchema extends Schema {\n  constructor() {\n    super({\n      type: 'date',\n      check(v) {\n        return isDate(v) && !isNaN(v.getTime());\n      }\n    });\n    this.withMutation(() => {\n      this.transform((value, _raw) => {\n        // null -> InvalidDate isn't useful; treat all nulls as null and let it fail on\n        // nullability check vs TypeErrors\n        if (!this.spec.coerce || this.isType(value) || value === null) return value;\n        value = parseIsoDate(value);\n\n        // 0 is a valid timestamp equivalent to 1970-01-01T00:00:00Z(unix epoch) or before.\n        return !isNaN(value) ? new Date(value) : DateSchema.INVALID_DATE;\n      });\n    });\n  }\n  prepareParam(ref, name) {\n    let param;\n    if (!Reference.isRef(ref)) {\n      let cast = this.cast(ref);\n      if (!this._typeCheck(cast)) throw new TypeError(`\\`${name}\\` must be a Date or a value that can be \\`cast()\\` to a Date`);\n      param = cast;\n    } else {\n      param = ref;\n    }\n    return param;\n  }\n  min(min, message = date.min) {\n    let limit = this.prepareParam(min, 'min');\n    return this.test({\n      message,\n      name: 'min',\n      exclusive: true,\n      params: {\n        min\n      },\n      skipAbsent: true,\n      test(value) {\n        return value >= this.resolve(limit);\n      }\n    });\n  }\n  max(max, message = date.max) {\n    let limit = this.prepareParam(max, 'max');\n    return this.test({\n      message,\n      name: 'max',\n      exclusive: true,\n      params: {\n        max\n      },\n      skipAbsent: true,\n      test(value) {\n        return value <= this.resolve(limit);\n      }\n    });\n  }\n}\nDateSchema.INVALID_DATE = invalidDate;\ncreate$4.prototype = DateSchema.prototype;\ncreate$4.INVALID_DATE = invalidDate;\n\n// @ts-expect-error\nfunction sortFields(fields, excludedEdges = []) {\n  let edges = [];\n  let nodes = new Set();\n  let excludes = new Set(excludedEdges.map(([a, b]) => `${a}-${b}`));\n  function addNode(depPath, key) {\n    let node = split(depPath)[0];\n    nodes.add(node);\n    if (!excludes.has(`${key}-${node}`)) edges.push([key, node]);\n  }\n  for (const key of Object.keys(fields)) {\n    let value = fields[key];\n    nodes.add(key);\n    if (Reference.isRef(value) && value.isSibling) addNode(value.path, key);else if (isSchema(value) && 'deps' in value) value.deps.forEach(path => addNode(path, key));\n  }\n  return toposort.array(Array.from(nodes), edges).reverse();\n}\n\nfunction findIndex(arr, err) {\n  let idx = Infinity;\n  arr.some((key, ii) => {\n    var _err$path;\n    if ((_err$path = err.path) != null && _err$path.includes(key)) {\n      idx = ii;\n      return true;\n    }\n  });\n  return idx;\n}\nfunction sortByKeyOrder(keys) {\n  return (a, b) => {\n    return findIndex(keys, a) - findIndex(keys, b);\n  };\n}\n\nconst parseJson = (value, _, schema) => {\n  if (typeof value !== 'string') {\n    return value;\n  }\n  let parsed = value;\n  try {\n    parsed = JSON.parse(value);\n  } catch (err) {\n    /* */\n  }\n  return schema.isType(parsed) ? parsed : value;\n};\n\n// @ts-ignore\nfunction deepPartial(schema) {\n  if ('fields' in schema) {\n    const partial = {};\n    for (const [key, fieldSchema] of Object.entries(schema.fields)) {\n      partial[key] = deepPartial(fieldSchema);\n    }\n    return schema.setFields(partial);\n  }\n  if (schema.type === 'array') {\n    const nextArray = schema.optional();\n    if (nextArray.innerType) nextArray.innerType = deepPartial(nextArray.innerType);\n    return nextArray;\n  }\n  if (schema.type === 'tuple') {\n    return schema.optional().clone({\n      types: schema.spec.types.map(deepPartial)\n    });\n  }\n  if ('optional' in schema) {\n    return schema.optional();\n  }\n  return schema;\n}\nconst deepHas = (obj, p) => {\n  const path = [...normalizePath(p)];\n  if (path.length === 1) return path[0] in obj;\n  let last = path.pop();\n  let parent = getter(join(path), true)(obj);\n  return !!(parent && last in parent);\n};\nlet isObject = obj => Object.prototype.toString.call(obj) === '[object Object]';\nfunction unknown(ctx, value) {\n  let known = Object.keys(ctx.fields);\n  return Object.keys(value).filter(key => known.indexOf(key) === -1);\n}\nconst defaultSort = sortByKeyOrder([]);\nfunction create$3(spec) {\n  return new ObjectSchema(spec);\n}\nclass ObjectSchema extends Schema {\n  constructor(spec) {\n    super({\n      type: 'object',\n      check(value) {\n        return isObject(value) || typeof value === 'function';\n      }\n    });\n    this.fields = Object.create(null);\n    this._sortErrors = defaultSort;\n    this._nodes = [];\n    this._excludedEdges = [];\n    this.withMutation(() => {\n      if (spec) {\n        this.shape(spec);\n      }\n    });\n  }\n  _cast(_value, options = {}) {\n    var _options$stripUnknown;\n    let value = super._cast(_value, options);\n\n    //should ignore nulls here\n    if (value === undefined) return this.getDefault(options);\n    if (!this._typeCheck(value)) return value;\n    let fields = this.fields;\n    let strip = (_options$stripUnknown = options.stripUnknown) != null ? _options$stripUnknown : this.spec.noUnknown;\n    let props = [].concat(this._nodes, Object.keys(value).filter(v => !this._nodes.includes(v)));\n    let intermediateValue = {}; // is filled during the transform below\n    let innerOptions = Object.assign({}, options, {\n      parent: intermediateValue,\n      __validating: options.__validating || false\n    });\n    let isChanged = false;\n    for (const prop of props) {\n      let field = fields[prop];\n      let exists = (prop in value);\n      let inputValue = value[prop];\n      if (field) {\n        let fieldValue;\n\n        // safe to mutate since this is fired in sequence\n        innerOptions.path = (options.path ? `${options.path}.` : '') + prop;\n        field = field.resolve({\n          value: inputValue,\n          context: options.context,\n          parent: intermediateValue\n        });\n        let fieldSpec = field instanceof Schema ? field.spec : undefined;\n        let strict = fieldSpec == null ? void 0 : fieldSpec.strict;\n        if (fieldSpec != null && fieldSpec.strip) {\n          isChanged = isChanged || prop in value;\n          continue;\n        }\n        fieldValue = !options.__validating || !strict ? field.cast(inputValue, innerOptions) : inputValue;\n        if (fieldValue !== undefined) {\n          intermediateValue[prop] = fieldValue;\n        }\n      } else if (exists && !strip) {\n        intermediateValue[prop] = inputValue;\n      }\n      if (exists !== prop in intermediateValue || intermediateValue[prop] !== inputValue) {\n        isChanged = true;\n      }\n    }\n    return isChanged ? intermediateValue : value;\n  }\n  _validate(_value, options = {}, panic, next) {\n    let {\n      from = [],\n      originalValue = _value,\n      recursive = this.spec.recursive\n    } = options;\n    options.from = [{\n      schema: this,\n      value: originalValue\n    }, ...from];\n    // this flag is needed for handling `strict` correctly in the context of\n    // validation vs just casting. e.g strict() on a field is only used when validating\n    options.__validating = true;\n    options.originalValue = originalValue;\n    super._validate(_value, options, panic, (objectErrors, value) => {\n      if (!recursive || !isObject(value)) {\n        next(objectErrors, value);\n        return;\n      }\n      originalValue = originalValue || value;\n      let tests = [];\n      for (let key of this._nodes) {\n        let field = this.fields[key];\n        if (!field || Reference.isRef(field)) {\n          continue;\n        }\n        tests.push(field.asNestedTest({\n          options,\n          key,\n          parent: value,\n          parentPath: options.path,\n          originalParent: originalValue\n        }));\n      }\n      this.runTests({\n        tests,\n        value,\n        originalValue,\n        options\n      }, panic, fieldErrors => {\n        next(fieldErrors.sort(this._sortErrors).concat(objectErrors), value);\n      });\n    });\n  }\n  clone(spec) {\n    const next = super.clone(spec);\n    next.fields = Object.assign({}, this.fields);\n    next._nodes = this._nodes;\n    next._excludedEdges = this._excludedEdges;\n    next._sortErrors = this._sortErrors;\n    return next;\n  }\n  concat(schema) {\n    let next = super.concat(schema);\n    let nextFields = next.fields;\n    for (let [field, schemaOrRef] of Object.entries(this.fields)) {\n      const target = nextFields[field];\n      nextFields[field] = target === undefined ? schemaOrRef : target;\n    }\n    return next.withMutation(s =>\n    // XXX: excludes here is wrong\n    s.setFields(nextFields, [...this._excludedEdges, ...schema._excludedEdges]));\n  }\n  _getDefault(options) {\n    if ('default' in this.spec) {\n      return super._getDefault(options);\n    }\n\n    // if there is no default set invent one\n    if (!this._nodes.length) {\n      return undefined;\n    }\n    let dft = {};\n    this._nodes.forEach(key => {\n      var _innerOptions;\n      const field = this.fields[key];\n      let innerOptions = options;\n      if ((_innerOptions = innerOptions) != null && _innerOptions.value) {\n        innerOptions = Object.assign({}, innerOptions, {\n          parent: innerOptions.value,\n          value: innerOptions.value[key]\n        });\n      }\n      dft[key] = field && 'getDefault' in field ? field.getDefault(innerOptions) : undefined;\n    });\n    return dft;\n  }\n  setFields(shape, excludedEdges) {\n    let next = this.clone();\n    next.fields = shape;\n    next._nodes = sortFields(shape, excludedEdges);\n    next._sortErrors = sortByKeyOrder(Object.keys(shape));\n    // XXX: this carries over edges which may not be what you want\n    if (excludedEdges) next._excludedEdges = excludedEdges;\n    return next;\n  }\n  shape(additions, excludes = []) {\n    return this.clone().withMutation(next => {\n      let edges = next._excludedEdges;\n      if (excludes.length) {\n        if (!Array.isArray(excludes[0])) excludes = [excludes];\n        edges = [...next._excludedEdges, ...excludes];\n      }\n\n      // XXX: excludes here is wrong\n      return next.setFields(Object.assign(next.fields, additions), edges);\n    });\n  }\n  partial() {\n    const partial = {};\n    for (const [key, schema] of Object.entries(this.fields)) {\n      partial[key] = 'optional' in schema && schema.optional instanceof Function ? schema.optional() : schema;\n    }\n    return this.setFields(partial);\n  }\n  deepPartial() {\n    const next = deepPartial(this);\n    return next;\n  }\n  pick(keys) {\n    const picked = {};\n    for (const key of keys) {\n      if (this.fields[key]) picked[key] = this.fields[key];\n    }\n    return this.setFields(picked, this._excludedEdges.filter(([a, b]) => keys.includes(a) && keys.includes(b)));\n  }\n  omit(keys) {\n    const remaining = [];\n    for (const key of Object.keys(this.fields)) {\n      if (keys.includes(key)) continue;\n      remaining.push(key);\n    }\n    return this.pick(remaining);\n  }\n  from(from, to, alias) {\n    let fromGetter = getter(from, true);\n    return this.transform(obj => {\n      if (!obj) return obj;\n      let newObj = obj;\n      if (deepHas(obj, from)) {\n        newObj = Object.assign({}, obj);\n        if (!alias) delete newObj[from];\n        newObj[to] = fromGetter(obj);\n      }\n      return newObj;\n    });\n  }\n\n  /** Parse an input JSON string to an object */\n  json() {\n    return this.transform(parseJson);\n  }\n\n  /**\n   * Similar to `noUnknown` but only validates that an object is the right shape without stripping the unknown keys\n   */\n  exact(message) {\n    return this.test({\n      name: 'exact',\n      exclusive: true,\n      message: message || object.exact,\n      test(value) {\n        if (value == null) return true;\n        const unknownKeys = unknown(this.schema, value);\n        return unknownKeys.length === 0 || this.createError({\n          params: {\n            properties: unknownKeys.join(', ')\n          }\n        });\n      }\n    });\n  }\n  stripUnknown() {\n    return this.clone({\n      noUnknown: true\n    });\n  }\n  noUnknown(noAllow = true, message = object.noUnknown) {\n    if (typeof noAllow !== 'boolean') {\n      message = noAllow;\n      noAllow = true;\n    }\n    let next = this.test({\n      name: 'noUnknown',\n      exclusive: true,\n      message: message,\n      test(value) {\n        if (value == null) return true;\n        const unknownKeys = unknown(this.schema, value);\n        return !noAllow || unknownKeys.length === 0 || this.createError({\n          params: {\n            unknown: unknownKeys.join(', ')\n          }\n        });\n      }\n    });\n    next.spec.noUnknown = noAllow;\n    return next;\n  }\n  unknown(allow = true, message = object.noUnknown) {\n    return this.noUnknown(!allow, message);\n  }\n  transformKeys(fn) {\n    return this.transform(obj => {\n      if (!obj) return obj;\n      const result = {};\n      for (const key of Object.keys(obj)) result[fn(key)] = obj[key];\n      return result;\n    });\n  }\n  camelCase() {\n    return this.transformKeys(camelCase);\n  }\n  snakeCase() {\n    return this.transformKeys(snakeCase);\n  }\n  constantCase() {\n    return this.transformKeys(key => snakeCase(key).toUpperCase());\n  }\n  describe(options) {\n    const next = (options ? this.resolve(options) : this).clone();\n    const base = super.describe(options);\n    base.fields = {};\n    for (const [key, value] of Object.entries(next.fields)) {\n      var _innerOptions2;\n      let innerOptions = options;\n      if ((_innerOptions2 = innerOptions) != null && _innerOptions2.value) {\n        innerOptions = Object.assign({}, innerOptions, {\n          parent: innerOptions.value,\n          value: innerOptions.value[key]\n        });\n      }\n      base.fields[key] = value.describe(innerOptions);\n    }\n    return base;\n  }\n}\ncreate$3.prototype = ObjectSchema.prototype;\n\nfunction create$2(type) {\n  return new ArraySchema(type);\n}\nclass ArraySchema extends Schema {\n  constructor(type) {\n    super({\n      type: 'array',\n      spec: {\n        types: type\n      },\n      check(v) {\n        return Array.isArray(v);\n      }\n    });\n\n    // `undefined` specifically means uninitialized, as opposed to \"no subtype\"\n    this.innerType = void 0;\n    this.innerType = type;\n  }\n  _cast(_value, _opts) {\n    const value = super._cast(_value, _opts);\n\n    // should ignore nulls here\n    if (!this._typeCheck(value) || !this.innerType) {\n      return value;\n    }\n    let isChanged = false;\n    const castArray = value.map((v, idx) => {\n      const castElement = this.innerType.cast(v, Object.assign({}, _opts, {\n        path: `${_opts.path || ''}[${idx}]`,\n        parent: value,\n        originalValue: v,\n        value: v,\n        index: idx\n      }));\n      if (castElement !== v) {\n        isChanged = true;\n      }\n      return castElement;\n    });\n    return isChanged ? castArray : value;\n  }\n  _validate(_value, options = {}, panic, next) {\n    var _options$recursive;\n    // let sync = options.sync;\n    // let path = options.path;\n    let innerType = this.innerType;\n    // let endEarly = options.abortEarly ?? this.spec.abortEarly;\n    let recursive = (_options$recursive = options.recursive) != null ? _options$recursive : this.spec.recursive;\n    options.originalValue != null ? options.originalValue : _value;\n    super._validate(_value, options, panic, (arrayErrors, value) => {\n      var _options$originalValu2;\n      if (!recursive || !innerType || !this._typeCheck(value)) {\n        next(arrayErrors, value);\n        return;\n      }\n\n      // #950 Ensure that sparse array empty slots are validated\n      let tests = new Array(value.length);\n      for (let index = 0; index < value.length; index++) {\n        var _options$originalValu;\n        tests[index] = innerType.asNestedTest({\n          options,\n          index,\n          parent: value,\n          parentPath: options.path,\n          originalParent: (_options$originalValu = options.originalValue) != null ? _options$originalValu : _value\n        });\n      }\n      this.runTests({\n        value,\n        tests,\n        originalValue: (_options$originalValu2 = options.originalValue) != null ? _options$originalValu2 : _value,\n        options\n      }, panic, innerTypeErrors => next(innerTypeErrors.concat(arrayErrors), value));\n    });\n  }\n  clone(spec) {\n    const next = super.clone(spec);\n    // @ts-expect-error readonly\n    next.innerType = this.innerType;\n    return next;\n  }\n\n  /** Parse an input JSON string to an object */\n  json() {\n    return this.transform(parseJson);\n  }\n  concat(schema) {\n    let next = super.concat(schema);\n\n    // @ts-expect-error readonly\n    next.innerType = this.innerType;\n    if (schema.innerType)\n      // @ts-expect-error readonly\n      next.innerType = next.innerType ?\n      // @ts-expect-error Lazy doesn't have concat and will break\n      next.innerType.concat(schema.innerType) : schema.innerType;\n    return next;\n  }\n  of(schema) {\n    // FIXME: this should return a new instance of array without the default to be\n    let next = this.clone();\n    if (!isSchema(schema)) throw new TypeError('`array.of()` sub-schema must be a valid yup schema not: ' + printValue(schema));\n\n    // @ts-expect-error readonly\n    next.innerType = schema;\n    next.spec = Object.assign({}, next.spec, {\n      types: schema\n    });\n    return next;\n  }\n  length(length, message = array.length) {\n    return this.test({\n      message,\n      name: 'length',\n      exclusive: true,\n      params: {\n        length\n      },\n      skipAbsent: true,\n      test(value) {\n        return value.length === this.resolve(length);\n      }\n    });\n  }\n  min(min, message) {\n    message = message || array.min;\n    return this.test({\n      message,\n      name: 'min',\n      exclusive: true,\n      params: {\n        min\n      },\n      skipAbsent: true,\n      // FIXME(ts): Array<typeof T>\n      test(value) {\n        return value.length >= this.resolve(min);\n      }\n    });\n  }\n  max(max, message) {\n    message = message || array.max;\n    return this.test({\n      message,\n      name: 'max',\n      exclusive: true,\n      params: {\n        max\n      },\n      skipAbsent: true,\n      test(value) {\n        return value.length <= this.resolve(max);\n      }\n    });\n  }\n  ensure() {\n    return this.default(() => []).transform((val, original) => {\n      // We don't want to return `null` for nullable schema\n      if (this._typeCheck(val)) return val;\n      return original == null ? [] : [].concat(original);\n    });\n  }\n  compact(rejector) {\n    let reject = !rejector ? v => !!v : (v, i, a) => !rejector(v, i, a);\n    return this.transform(values => values != null ? values.filter(reject) : values);\n  }\n  describe(options) {\n    const next = (options ? this.resolve(options) : this).clone();\n    const base = super.describe(options);\n    if (next.innerType) {\n      var _innerOptions;\n      let innerOptions = options;\n      if ((_innerOptions = innerOptions) != null && _innerOptions.value) {\n        innerOptions = Object.assign({}, innerOptions, {\n          parent: innerOptions.value,\n          value: innerOptions.value[0]\n        });\n      }\n      base.innerType = next.innerType.describe(innerOptions);\n    }\n    return base;\n  }\n}\ncreate$2.prototype = ArraySchema.prototype;\n\n// @ts-ignore\nfunction create$1(schemas) {\n  return new TupleSchema(schemas);\n}\nclass TupleSchema extends Schema {\n  constructor(schemas) {\n    super({\n      type: 'tuple',\n      spec: {\n        types: schemas\n      },\n      check(v) {\n        const types = this.spec.types;\n        return Array.isArray(v) && v.length === types.length;\n      }\n    });\n    this.withMutation(() => {\n      this.typeError(tuple.notType);\n    });\n  }\n  _cast(inputValue, options) {\n    const {\n      types\n    } = this.spec;\n    const value = super._cast(inputValue, options);\n    if (!this._typeCheck(value)) {\n      return value;\n    }\n    let isChanged = false;\n    const castArray = types.map((type, idx) => {\n      const castElement = type.cast(value[idx], Object.assign({}, options, {\n        path: `${options.path || ''}[${idx}]`,\n        parent: value,\n        originalValue: value[idx],\n        value: value[idx],\n        index: idx\n      }));\n      if (castElement !== value[idx]) isChanged = true;\n      return castElement;\n    });\n    return isChanged ? castArray : value;\n  }\n  _validate(_value, options = {}, panic, next) {\n    let itemTypes = this.spec.types;\n    super._validate(_value, options, panic, (tupleErrors, value) => {\n      var _options$originalValu2;\n      // intentionally not respecting recursive\n      if (!this._typeCheck(value)) {\n        next(tupleErrors, value);\n        return;\n      }\n      let tests = [];\n      for (let [index, itemSchema] of itemTypes.entries()) {\n        var _options$originalValu;\n        tests[index] = itemSchema.asNestedTest({\n          options,\n          index,\n          parent: value,\n          parentPath: options.path,\n          originalParent: (_options$originalValu = options.originalValue) != null ? _options$originalValu : _value\n        });\n      }\n      this.runTests({\n        value,\n        tests,\n        originalValue: (_options$originalValu2 = options.originalValue) != null ? _options$originalValu2 : _value,\n        options\n      }, panic, innerTypeErrors => next(innerTypeErrors.concat(tupleErrors), value));\n    });\n  }\n  describe(options) {\n    const next = (options ? this.resolve(options) : this).clone();\n    const base = super.describe(options);\n    base.innerType = next.spec.types.map((schema, index) => {\n      var _innerOptions;\n      let innerOptions = options;\n      if ((_innerOptions = innerOptions) != null && _innerOptions.value) {\n        innerOptions = Object.assign({}, innerOptions, {\n          parent: innerOptions.value,\n          value: innerOptions.value[index]\n        });\n      }\n      return schema.describe(innerOptions);\n    });\n    return base;\n  }\n}\ncreate$1.prototype = TupleSchema.prototype;\n\nfunction create(builder) {\n  return new Lazy(builder);\n}\nfunction catchValidationError(fn) {\n  try {\n    return fn();\n  } catch (err) {\n    if (ValidationError.isError(err)) return Promise.reject(err);\n    throw err;\n  }\n}\nclass Lazy {\n  constructor(builder) {\n    this.type = 'lazy';\n    this.__isYupSchema__ = true;\n    this.spec = void 0;\n    this._resolve = (value, options = {}) => {\n      let schema = this.builder(value, options);\n      if (!isSchema(schema)) throw new TypeError('lazy() functions must return a valid schema');\n      if (this.spec.optional) schema = schema.optional();\n      return schema.resolve(options);\n    };\n    this.builder = builder;\n    this.spec = {\n      meta: undefined,\n      optional: false\n    };\n  }\n  clone(spec) {\n    const next = new Lazy(this.builder);\n    next.spec = Object.assign({}, this.spec, spec);\n    return next;\n  }\n  optionality(optional) {\n    const next = this.clone({\n      optional\n    });\n    return next;\n  }\n  optional() {\n    return this.optionality(true);\n  }\n  resolve(options) {\n    return this._resolve(options.value, options);\n  }\n  cast(value, options) {\n    return this._resolve(value, options).cast(value, options);\n  }\n  asNestedTest(config) {\n    let {\n      key,\n      index,\n      parent,\n      options\n    } = config;\n    let value = parent[index != null ? index : key];\n    return this._resolve(value, Object.assign({}, options, {\n      value,\n      parent\n    })).asNestedTest(config);\n  }\n  validate(value, options) {\n    return catchValidationError(() => this._resolve(value, options).validate(value, options));\n  }\n  validateSync(value, options) {\n    return this._resolve(value, options).validateSync(value, options);\n  }\n  validateAt(path, value, options) {\n    return catchValidationError(() => this._resolve(value, options).validateAt(path, value, options));\n  }\n  validateSyncAt(path, value, options) {\n    return this._resolve(value, options).validateSyncAt(path, value, options);\n  }\n  isValid(value, options) {\n    try {\n      return this._resolve(value, options).isValid(value, options);\n    } catch (err) {\n      if (ValidationError.isError(err)) {\n        return Promise.resolve(false);\n      }\n      throw err;\n    }\n  }\n  isValidSync(value, options) {\n    return this._resolve(value, options).isValidSync(value, options);\n  }\n  describe(options) {\n    return options ? this.resolve(options).describe(options) : {\n      type: 'lazy',\n      meta: this.spec.meta,\n      label: undefined\n    };\n  }\n  meta(...args) {\n    if (args.length === 0) return this.spec.meta;\n    let next = this.clone();\n    next.spec.meta = Object.assign(next.spec.meta || {}, args[0]);\n    return next;\n  }\n  get ['~standard']() {\n    const schema = this;\n    const standard = {\n      version: 1,\n      vendor: 'yup',\n      async validate(value) {\n        try {\n          const result = await schema.validate(value, {\n            abortEarly: false\n          });\n          return {\n            value: result\n          };\n        } catch (err) {\n          if (ValidationError.isError(err)) {\n            return {\n              issues: issuesFromValidationError(err)\n            };\n          }\n          throw err;\n        }\n      }\n    };\n    return standard;\n  }\n}\n\nfunction setLocale(custom) {\n  Object.keys(custom).forEach(type => {\n    // @ts-ignore\n    Object.keys(custom[type]).forEach(method => {\n      // @ts-ignore\n      locale[type][method] = custom[type][method];\n    });\n  });\n}\n\nfunction addMethod(schemaType, name, fn) {\n  if (!schemaType || !isSchema(schemaType.prototype)) throw new TypeError('You must provide a yup schema constructor function');\n  if (typeof name !== 'string') throw new TypeError('A Method name must be provided');\n  if (typeof fn !== 'function') throw new TypeError('Method function must be provided');\n  schemaType.prototype[name] = fn;\n}\n\nexport { ArraySchema, BooleanSchema, DateSchema, Lazy as LazySchema, MixedSchema, NumberSchema, ObjectSchema, Schema, StringSchema, TupleSchema, ValidationError, addMethod, create$2 as array, create$7 as bool, create$7 as boolean, create$4 as date, locale as defaultLocale, getIn, isSchema, create as lazy, create$8 as mixed, create$5 as number, create$3 as object, printValue, reach, create$9 as ref, setLocale, create$6 as string, create$1 as tuple };\n", "import * as yup from \"yup\";\nimport InDialogController from \"../controller_in_dialog\";\nimport { submitWithTabId } from \"../../helpers/form\";\n\nconst schema = yup.object().shape({\n  firstName: yup.string().required(),\n  lastName: yup.string().required(),\n  email: yup.string().email().required(),\n  phone: yup.string().required(),\n  company: yup.string().required(),\n  city: yup.string().required(),\n  state: yup.string().required(),\n  zip: yup.string().required(),\n  companyType: yup.string().required(),\n  companySize: yup.string().required(),\n});\n\nconst validationFields = Object.keys(schema.fields);\n\nexport default class extends InDialogController {\n  submitting = false;\n\n  static targets = [\n    \"firstNameField\",\n    \"firstNameFieldContainer\",\n    \"lastNameField\",\n    \"lastNameFieldContainer\",\n    \"emailField\",\n    \"emailFieldContainer\",\n    \"phoneField\",\n    \"phoneFieldContainer\",\n    \"cityField\",\n    \"cityFieldContainer\",\n    \"stateField\",\n    \"stateFieldContainer\",\n    \"zipField\",\n    \"zipFieldContainer\",\n    \"companyField\",\n    \"companyFieldContainer\",\n    \"companyTypeField\",\n    \"companyTypeFieldContainer\",\n    \"companySizeField\",\n    \"companySizeFieldContainer\",\n    \"installationsPerMonthContainer\",\n    \"installationsPerMonthField\",\n    \"recaptchaContainer\",\n    \"submitBtn\",\n  ];\n\n  connect() {\n    if (!this.isOkayToConnect) return;\n\n    this.initRecaptcha();\n  }\n\n  disconnect() {\n    clearInterval(this.recaptchaInterval);\n  }\n\n  get formValues() {\n    return {\n      firstName: this.firstNameFieldTarget.value,\n      lastName: this.lastNameFieldTarget.value,\n      email: this.emailFieldTarget.value,\n      phone: this.phoneFieldTarget.value,\n      company: this.companyFieldTarget.value,\n      city: this.cityFieldTarget.value,\n      state: this.stateFieldTarget.value,\n      zip: this.zipFieldTarget.value,\n      companyType: this.companyTypeFieldTarget.value,\n      companySize: this.companySizeFieldTarget.value,\n      installationsPerMonth: this.installationsPerMonthFieldTarget.value,\n    };\n  }\n\n  submit(event) {\n    if (this.submitting) return;\n\n    event.preventDefault();\n    this.removePreviousValidationErrors();\n    schema\n      .validate(this.formValues, { abortEarly: false })\n      .then((_valid) => {\n        this.submitting = true;\n        this.submitBtnTarget.classList.add(\"ir-btn--spinner-shown\");\n        submitWithTabId(this.element);\n      })\n      .catch((err) => this.handleValidationErrors(err));\n  }\n\n  removePreviousValidationErrors() {\n    validationFields.forEach((validationField) => {\n      const container = this[`${validationField}FieldContainerTarget`];\n      container.classList.remove(\"field_with_errors\");\n    });\n  }\n\n  handleValidationErrors(err) {\n    err.inner.forEach((validationError) => {\n      this.handleFieldError(validationError.path, validationError.errors);\n    });\n    window.scrollTo({ top: \"0\", behavior: \"smooth\" });\n  }\n\n  handleFieldError(validationField, errors) {\n    const container = this[`${validationField}FieldContainerTarget`];\n    container.classList.add(\"field_with_errors\");\n  }\n\n  initRecaptcha() {\n    const timestamp = () => {\n      const response = document.getElementById(\"g-recaptcha-response\");\n      if (response == null || response.value.trim() == \"\") {\n        const elems = JSON.parse(document.getElementsByName(\"captcha_settings\")[0].value);\n        elems[\"ts\"] = JSON.stringify(new Date().getTime());\n        document.getElementsByName(\"captcha_settings\")[0].value = JSON.stringify(elems);\n      }\n    };\n    this.recaptchaInterval = setInterval(timestamp, 500);\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport { showDialogWithIdentifier } from \"../components/ir_dialog/helper\";\n\nexport default class extends Controller {\n  request(event) {\n    event.preventDefault();\n    const link = event.currentTarget;\n    const { distributorName, distributorEmail, additionalDistributorEmails, distributorCity, distributorState } =\n      link.dataset;\n\n    this.populateHiddenFieldWithValue(\"distributorName\", distributorName);\n    this.populateHiddenFieldWithValue(\"distributorEmail\", distributorEmail);\n    this.populateHiddenFieldWithValue(\"additionalDistributorEmails\", additionalDistributorEmails);\n    this.populateHiddenFieldWithValue(\"distributorCity\", distributorCity);\n    this.populateHiddenFieldWithValue(\"distributorState\", distributorState);\n\n    this.setDisplay(distributorName, distributorCity, distributorState);\n\n    const clickPosition = { x: event.pageX, y: event.pageY };\n\n    showDialogWithIdentifier(\"distributors-request-quote-dialog\", () => {}, {\n      showNearClickPosition: true,\n      clickPosition,\n    });\n  }\n\n  populateHiddenFieldWithValue(keyName, value) {\n    document.querySelector(`[data-distributors--quote-form-target=\"${keyName}HiddenField\"]`).value = value;\n  }\n\n  setDisplay(distributorName, distributorCity, distributorState) {\n    document.querySelector(`[data-distributors--quote-form-target=\"distributorDisplay\"]`).innerText =\n      `${distributorName}, ${distributorCity}, ${distributorState}`;\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport * as animate from \"../../helpers/animate\";\n\nexport default class extends Controller {\n  static targets = [\"usContainer\", \"internationalContainer\", \"usSearchContainer\", \"linkContainer\"];\n\n  showUsSearch(event) {\n    this.handleTabClick(event);\n    this.internationalContainerTarget.style.display = \"none\";\n    this.usContainerTarget.style.display = \"none\";\n    animate.show(this.usSearchContainerTarget);\n  }\n\n  showInternational(event) {\n    this.handleTabClick(event);\n    this.usSearchContainerTarget.style.display = \"none\";\n    this.usContainerTarget.style.display = \"none\";\n    animate.show(this.internationalContainerTarget);\n  }\n\n  showAll(event) {\n    this.handleTabClick(event);\n    this.usSearchContainerTarget.style.display = \"none\";\n    animate.show(this.internationalContainerTarget);\n    animate.show(this.usContainerTarget);\n  }\n\n  handleTabClick(event) {\n    event.preventDefault();\n    const link = event.currentTarget;\n    this.linkContainerTargets.forEach((l) => l.classList.remove(\"active\"));\n    link.closest(\"li\").classList.add(\"active\");\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport { track } from \"../../helpers/app\";\nimport { addOptionsToSelect } from \"../../helpers/form\";\n\nexport default class CadDlController extends Controller {\n  static targets = [\"railPlatformSelect\", \"attachmentSelect\"];\n  static values = { files: Array, trackingCategory: String };\n  /*\n  The array of files are generated with: app/views/s3_files/_s3_file.json.jbuilder\n  Each file is a hash of S3 data from the backend.  The keys used here are:\n  [\"url\", \"name\", \"isPdf\", \"isVisible\", \"tags\"]\n  */\n\n  connect() {\n    this.#buildFileDataStructures();\n    this.#manageAttachmentSelect();\n  }\n\n  railPlatformChange() {\n    this.#manageAttachmentSelect();\n  }\n\n  download(event) {\n    const railPlatform = this.railPlatformSelectTarget.value;\n    const attachment = this.attachmentSelectTarget.value;\n\n    if (railPlatform === \"\") {\n      alert(\"Please select a rail platform\");\n      return;\n    }\n\n    if (attachment === \"\") {\n      alert(\"Please select an attachment\");\n      return;\n    }\n\n    const { fileType } = event.params;\n    const file = this.#findFile(railPlatform, attachment, fileType);\n\n    if (file) {\n      this.#downloadFile(file.url);\n    } else {\n      alert(`File not found for ${attachment} (${fileType})`);\n    }\n  }\n\n  #buildFileDataStructures() {\n    this.files = this.filesValue.filter((f) => f.isVisible);\n\n    this.xrFiles = this.files.filter(\n      (f) => !f.tags || f.tags.includes(\"xr\") || !f.tags.some((tag) => [\"clickfit\", \"aire\"].includes(tag)),\n    );\n\n    this.clickfitFiles = this.files.filter((f) => f.tags && f.tags.includes(\"clickfit\"));\n\n    this.xrAttachments = this.#extractUniqueAttachments(this.xrFiles);\n    this.clickfitAttachments = this.#extractUniqueAttachments(this.clickfitFiles);\n  }\n\n  #extractUniqueAttachments(files) {\n    const attachments = new Set();\n    files.forEach((file) => {\n      const attachmentName = file.name.replace(/ CAD blocks (PDF|DWG)/, \"\");\n      attachments.add(attachmentName);\n    });\n    return Array.from(attachments).sort();\n  }\n\n  #manageAttachmentSelect() {\n    const railPlatform = this.railPlatformSelectTarget.value;\n\n    this.#disableAttachmentSelect(railPlatform === \"\");\n    this.#populateAttachmentSelect(railPlatform);\n  }\n\n  #populateAttachmentSelect(railPlatform) {\n    if (railPlatform === \"\") return;\n\n    const attachmentValue = this.attachmentSelectTarget.value;\n    const attachments = railPlatform === \"clickfit\" ? this.clickfitAttachments : this.xrAttachments;\n\n    const attachmentOptions = attachments.map((attachment) => {\n      // [text, value, disabled, selected]\n      return [attachment, attachment, false, attachment === attachmentValue];\n    });\n\n    addOptionsToSelect(attachmentOptions, this.attachmentSelectTarget, true, \"Attachment\");\n  }\n\n  #disableAttachmentSelect(bool) {\n    this.attachmentSelectTarget.disabled = bool;\n  }\n\n  #findFile(railPlatform, attachmentName, fileType) {\n    const platformFiles = railPlatform === \"clickfit\" ? this.clickfitFiles : this.xrFiles;\n\n    return platformFiles.find((file) => {\n      const baseFilename = file.name.replace(/ CAD blocks (PDF|DWG)/, \"\");\n      const isCorrectAttachment = baseFilename === attachmentName;\n      const isCorrectType = fileType === \"pdf\" ? file.isPdf : !file.isPdf;\n\n      return isCorrectAttachment && isCorrectType;\n    });\n  }\n\n  #downloadFile(fileUrl) {\n    track({ action: \"Document Download\", category: this.trackingCategoryValue, label: fileUrl });\n\n    // give tracking code time to execute\n    setTimeout(() => {\n      window.open(fileUrl, \"_blank\");\n    }, 250);\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\n\nimport { track } from \"../../helpers/app\";\n\nexport default class CadDlController extends Controller {\n  static targets = [\"attachmentSelect\"];\n  static values = { baseUrl: String, projectType: String, trackingCategory: String };\n\n  download(event) {\n    if (!this.#isValid) {\n      alert(\"Please select a roof attachment\");\n      return;\n    }\n\n    const { fileType } = event.params;\n    const fileName = `${this.attachmentSelectTarget.value}-${\n      this.projectTypeValue\n    }-AutoCAD-${fileType.toUpperCase()}.${fileType}`;\n\n    this.#downloadFile(fileName);\n  }\n\n  get #isValid() {\n    return this.attachmentSelectTarget.value !== \"\";\n  }\n\n  #downloadFile(fileName) {\n    const fileUrl = this.baseUrlValue + fileName;\n    track({ action: \"Document Download\", category: this.trackingCategoryValue, label: fileUrl });\n\n    // give tracking code time to execute\n    setTimeout(() => {\n      window.open(fileUrl, \"_blank\");\n    }, 250);\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport { track } from \"../../helpers/app\";\nimport { addOptionsToSelect } from \"../../helpers/form\";\nimport * as animate from \"../../helpers/animate\";\n\n// Used on the documents and resources pages to download\n// certification letters given a selected state and module type\nexport default class extends Controller {\n  static targets = [\n    \"asceSelect\",\n    \"railPlatformSelect\",\n    \"stateSelect\",\n    \"railTypeSelect\",\n    \"product\",\n    \"foundationTypeSelect\",\n    \"spanTableDisplay\",\n    \"spanTableLink\",\n  ];\n  static values = { baseUrl: String };\n\n  productTrackingCategories = {\n    \"pitched-roof\": \"Pitched Roof Mount\",\n    \"flat-roof\": \"Flat Roof Mount\",\n    \"ground-mount\": \"Ground Mount\",\n    bx: \"BX\",\n    rockit: \"Pitched Roof Rail-less\",\n    rokr: \"Pitched Roof Rail-less\",\n    \"pitched-roof-railless\": \"Pitched Roof Rail-less\",\n  };\n\n  connect() {\n    this.product = this.productTarget.value;\n\n    if (this.hasRailPlatformSelectTarget) {\n      this.#manageRailPlatformSelect();\n    }\n    this.#manageStateSelect();\n    if (this.hasRailTypeSelectTarget) {\n      this.#disableRailTypeSelect(true);\n    }\n    this.#disableFoundationTypeSelect(true);\n    this.#manageSpanTableDisplay();\n  }\n\n  asceChange() {\n    if (this.hasRailPlatformSelectTarget) {\n      this.#manageRailPlatformSelect();\n    }\n    this.#manageStateSelect();\n    if (this.hasRailTypeSelectTarget) {\n      this.#manageRailTypeSelect();\n    }\n    this.#manageFoundationTypeSelect();\n    this.#manageSpanTableDisplay();\n  }\n\n  railPlatformChange() {\n    this.#manageStateSelect();\n    this.#manageRailTypeSelect();\n    this.#manageFoundationTypeSelect();\n    this.#manageSpanTableDisplay();\n  }\n\n  stateChange() {\n    this.#manageRailTypeSelect();\n    this.#manageFoundationTypeSelect();\n    this.#manageSpanTableDisplay();\n  }\n\n  railTypeChange() {\n    this.#manageFoundationTypeSelect();\n    this.#manageSpanTableDisplay();\n  }\n\n  foundationTypeChange() {\n    this.#manageSpanTableDisplay();\n  }\n\n  download(_) {\n    const state = this.stateSelectTarget.value;\n    const railType = this.hasRailTypeSelectTarget ? this.railTypeSelectTarget.value : \"\";\n    const foundationType = this.hasFoundationTypeSelectTarget && this.foundationTypeSelectTarget.value;\n\n    if (this.hasAsceSelectTarget && this.asceSelectTarget.value === \"\") {\n      alert(\"Please select an ASCE\");\n      return;\n    }\n\n    if (this.hasRailPlatformSelectTarget && this.railPlatformSelectTarget.value === \"\") {\n      alert(\"Please select a rail platform\");\n      return;\n    }\n\n    if (state === \"\") {\n      alert(\"Please select a state.\");\n      return;\n    }\n\n    if (this.hasRailTypeSelectTarget && railType === \"\") {\n      alert(\"Please select a rail type.\");\n      return;\n    }\n\n    if (this.hasFoundationTypeSelectTarget && this.foundationTypeSelectTarget.value === \"\") {\n      alert(\"Please select a foundation type\");\n      return;\n    }\n\n    const fileUrl = this.#fileUrl(state, railType, foundationType);\n    track({ action: \"Document Download\", category: this.productTrackingCategories[this.product], label: fileUrl });\n    setTimeout(() => {\n      window.open(fileUrl, \"_blank\");\n    }, 250);\n  }\n\n  // Private methods for managing cascading selects\n\n  get #asce() {\n    if (this.hasAsceSelectTarget) {\n      return this.asceSelectTarget.value;\n    } else {\n      // Use this as a default value for D&R pages that don't have an ASCE selector (GB)\n      return \"7.10\";\n    }\n  }\n\n  get #railPlatform() {\n    if (this.hasRailPlatformSelectTarget) {\n      return this.railPlatformSelectTarget.value;\n    } else if (this.product === \"bx\") {\n      return \"bx\";\n    } else if (this.product === \"rockit\") {\n      return \"rockit\";\n    } else if (this.product === \"rokr\") {\n      return \"rokr\";\n    } else {\n      // Use this as a default value for D&R pages that don't have a rail platform value\n      return \"xr\";\n    }\n  }\n\n  #manageRailPlatformSelect() {\n    const asce = this.#asce;\n\n    this.#disableRailPlatformSelect(asce === \"\");\n    this.#populateRailPlatformSelect(asce);\n  }\n\n  #manageStateSelect() {\n    const asce = this.#asce;\n    const railPlatform = this.#railPlatform;\n\n    if (this.hasRailPlatformSelectTarget) {\n      this.#disableStateSelect(asce === \"\" || railPlatform === \"\");\n    } else {\n      this.#disableStateSelect(asce === \"\");\n    }\n    this.#populateStateSelect(asce, railPlatform);\n  }\n\n  #manageRailTypeSelect() {\n    const railPlatform = this.#railPlatform;\n    const state = this.stateSelectTarget.value;\n\n    this.#disableRailTypeSelect(railPlatform === \"\" || state === \"\");\n    this.#populateRailTypeSelect(railPlatform, state);\n  }\n\n  #manageFoundationTypeSelect() {\n    if (!this.hasFoundationTypeSelectTarget) return;\n\n    const railType = this.railTypeSelectTarget.value;\n    const noRailTypeIsSelected = this.railTypeSelectTarget.value == \"\";\n\n    this.#disableFoundationTypeSelect(noRailTypeIsSelected);\n    if (noRailTypeIsSelected) this.foundationTypeSelectTarget.value = \"\";\n  }\n\n  #manageSpanTableDisplay() {\n    if (!this.hasSpanTableDisplayTarget) return;\n    if (this.product !== \"ground-mount\") return;\n\n    const asce = this.#asce;\n    const railType = this.hasRailTypeSelectTarget ? this.railTypeSelectTarget.value : \"\";\n    const foundationType = this.hasFoundationTypeSelectTarget ? this.foundationTypeSelectTarget.value : \"\";\n\n    if (asce && railType && foundationType) {\n      const spanTableUrl = this.#groundMountSpanTableUrl(railType, foundationType);\n      const spanTableName = this.#buildSpanTableName(railType, foundationType);\n      this.spanTableLinkTarget.href = spanTableUrl;\n      this.spanTableLinkTarget.querySelector(\"span\").textContent = spanTableName;\n      animate.show(this.spanTableDisplayTarget);\n    } else {\n      animate.hide(this.spanTableDisplayTarget);\n    }\n  }\n\n  #populateRailPlatformSelect(asce) {\n    if (!this.hasRailPlatformSelectTarget) return;\n    if (asce === \"\") return;\n    if (this.product === \"pitched-roof-railless\") return;\n\n    const railPlatformValue = this.railPlatformSelectTarget.value;\n    const railPlatformsForAsce = JSON.parse(this.stateSelectTarget.dataset.asceStates)[asce];\n    const statesForAire = railPlatformsForAsce[\"aire\"];\n    const disableAire = statesForAire.length === 0;\n    const statesForXr = railPlatformsForAsce[\"xr\"];\n    const disableXR = statesForXr.length === 0;\n    const statesForClickfit = railPlatformsForAsce[\"clickfit\"];\n    const disableClickfit = !statesForClickfit || statesForClickfit.length === 0;\n\n    const railPlatformOptions = [\n      [\"Aire\", \"aire\", disableAire, !disableAire && railPlatformValue === \"aire\"],\n      [\"XR\", \"xr\", disableXR, !disableXR && railPlatformValue === \"xr\"],\n      [\"ClickFit\", \"clickfit\", disableClickfit, !disableClickfit && railPlatformValue === \"clickfit\"],\n    ];\n    addOptionsToSelect(railPlatformOptions, this.railPlatformSelectTarget, true, \"Rail platform\");\n  }\n\n  #populateStateSelect(asce, railPlatform) {\n    if (!this.hasStateSelectTarget) return;\n\n    if (this.hasRailPlatformSelectTarget) {\n      if (asce === \"\" || railPlatform === \"\") return;\n    } else {\n      if (asce === \"\") return;\n    }\n\n    const stateValue = this.stateSelectTarget.value;\n    const statesForAsce = JSON.parse(this.stateSelectTarget.dataset.asceStates)[asce][railPlatform];\n    const statesOptions = statesForAsce.map((state) => {\n      // value, text, disabled, selected\n      return [state[1], state[0], false, state[0] === stateValue];\n    });\n    addOptionsToSelect(statesOptions, this.stateSelectTarget, true, \"State\");\n  }\n\n  #populateRailTypeSelect(railPlatform, state) {\n    if (!this.hasRailTypeSelectTarget) return;\n\n    let railTypesOptions = [];\n    if (railPlatform !== \"\" && state !== \"\") {\n      const railTypeValue = this.railTypeSelectTarget.value;\n      railTypesOptions = this.#railTypesForProduct(railPlatform).map((railType) => {\n        // value, text, disabled, selected\n        return [railType[1], railType[0], false, railType[0] === railTypeValue];\n      });\n    }\n\n    addOptionsToSelect(railTypesOptions, this.railTypeSelectTarget, true, \"Rail type\");\n  }\n\n  #railTypesForProduct(railPlatform) {\n    if (this.product === \"bx\") return [];\n    if (this.product === \"ground-mount\")\n      return [\n        [\"XR100SGA4\", \"4-up XR100\"],\n        [\"XR1000SGA4\", \"4-up XR1000\"],\n        [\"XR1000SGA5\", \"5-up XR1000\"],\n      ];\n    if (railPlatform === \"aire\") {\n      return [\n        [\"A1\", \"A1\"],\n        [\"A2\", \"A2\"],\n      ];\n    } else if (railPlatform === \"clickfit\") {\n      return [\n        [\"CF-LTE\", \"CFLTE\"],\n        [\"CF-STD\", \"CFSTD\"],\n      ];\n    } else {\n      return [\n        [\"XR10\", \"XR10\"],\n        [\"XR100\", \"XR100\"],\n        [\"XR1000\", \"XR1000\"],\n      ];\n    }\n  }\n\n  #disableRailPlatformSelect(bool) {\n    if (!this.hasRailPlatformSelectTarget) return;\n\n    this.railPlatformSelectTarget.disabled = bool;\n  }\n\n  #disableStateSelect(bool) {\n    if (!this.hasStateSelectTarget) return;\n\n    this.stateSelectTarget.disabled = bool;\n  }\n\n  #disableRailTypeSelect(bool) {\n    if (!this.hasRailTypeSelectTarget) return;\n\n    this.railTypeSelectTarget.disabled = bool;\n  }\n\n  #disableFoundationTypeSelect(bool) {\n    if (!this.hasFoundationTypeSelectTarget) return;\n\n    this.foundationTypeSelectTarget.disabled = bool;\n  }\n\n  // Private methods for building download URLs\n\n  #fileUrl(state, railType, foundationType) {\n    switch (this.product) {\n      case \"pitched-roof\":\n        return this.#pitchedRoofFileUrl(state, railType);\n      case \"flat-roof\":\n        return this.#flatRoofFileUrl(state, railType);\n      case \"ground-mount\":\n        return this.#groundMountFileUrl(state, railType, foundationType);\n      case \"bx\":\n        return this.#bxFileUrl(state, railType);\n      case \"rockit\":\n        return this.#rockitFileUrl(state);\n      case \"rokr\":\n        return this.#rokrFileUrl(state);\n      case \"pitched-roof-railless\":\n        return this.#raillessFileUrl(state);\n      default:\n        throw `unrecognized product: ${product}`;\n    }\n  }\n\n  #pitchedRoofFileUrl(state, railType) {\n    const basePath = [this.baseUrlValue, \"pitched-roof-mounting\", \"resources\", \"certification\"].join(\"/\");\n\n    if (railType.startsWith(\"CF-\")) {\n      return `${basePath}/${this.#clickfitPitchedRoofPath(state, railType)}`;\n    } else {\n      return `${basePath}/${this.#xrAirePitchedRoofPath(state, railType)}`;\n    }\n  }\n\n  #clickfitPitchedRoofPath(state, railType) {\n    // CF/IronRidge_CF-LTE_Flush_Certification_CA-716.pdf\n    return `CF/IronRidge_${railType}_Flush_Certification_${state}${this.#asceFilenamePiece}.pdf`;\n  }\n\n  #xrAirePitchedRoofPath(state, railType) {\n    // XR1000/IronRidge_XR1000Flush_Certification_UFO_CO.pdf\n    const xrPlusSuffix = this.#xrPlusSuffix(state, railType);\n    return `${railType}/IronRidge_${railType}Flush_Certification_UFO_${state}${this.#asceFilenamePiece}${xrPlusSuffix}.pdf`;\n  }\n\n  #xrPlusSuffix(state, railType) {\n    // only applies to PR which always has an ASCE selector\n    const asceValue = this.asceSelectTarget.value;\n\n    if (asceValue !== \"7.10\") return \"\";\n    if (railType === \"A1\" || railType === \"A2\") return \"\";\n    return \"-Plus\";\n  }\n\n  #flatRoofFileUrl(state, railType) {\n    // <S3_BUCKET_URL>/flat-roof-mounting/resources/certification/XR1000/IronRidge_XR1000Tilt_FL_UFO.pdf\n    return [\n      this.baseUrlValue,\n      \"flat-roof-mounting\",\n      \"resources\",\n      \"certification\",\n      railType,\n      `IronRidge_${railType}Tilt_Certification_${state}_UFO${this.#asceFilenamePiece}.pdf`,\n    ].join(\"/\");\n  }\n\n  #groundMountFileUrl(state, railType, foundationType) {\n    // <S3_BUCKET_URL>/groundmounting/certification/XR1000SGA5/IronRidge_XR1000SGA5_Certification_UFO_CA.pdf\n    // <S3_BUCKET_URL>/groundmounting/certification/XR100SGA4/IronRidge_XR100SGA4_Certification_UFO_GS_VA-722.pdf\n    const foundationCode = foundationType == \"ground_screws\" ? \"_GS\" : \"\";\n    const ascePiece = this.#asce === \"7.22\" ? \"-722\" : \"\";\n    const fileName = `IronRidge_${railType}_Certification_UFO${foundationCode}_${state}${ascePiece}.pdf`;\n\n    return [this.baseUrlValue, \"groundmounting\", \"certification\", railType, fileName].join(\"/\");\n  }\n\n  #groundMountSpanTableUrl(railType, foundationType) {\n    // <S3_BUCKET_URL>/groundmounting/certification/XR1000SGA5/IronRidge_XR1000SGA5_7-16_Tables.pdf\n    // <S3_BUCKET_URL>/groundmounting/certification/XR100SGA4/IronRidge_XR100SGA4_GS_7-22_Tables.pdf\n    const foundationCode = foundationType === \"ground_screws\" ? \"_GS\" : \"\";\n    const asceVersion = this.#asce === \"7.22\" ? \"7-22\" : \"7-16\";\n    const fileName = `IronRidge_${railType}${foundationCode}_${asceVersion}_Tables.pdf`;\n\n    return [this.baseUrlValue, \"groundmounting\", \"certification\", railType, fileName].join(\"/\");\n  }\n\n  #buildSpanTableName(railType, foundationType) {\n    // Get display text from selected options\n    const asceDisplay = this.hasAsceSelectTarget\n      ? this.asceSelectTarget.options[this.asceSelectTarget.selectedIndex].text\n      : \"7-10/7-16\";\n\n    const railTypeDisplay = this.railTypeSelectTarget.options[this.railTypeSelectTarget.selectedIndex].text;\n\n    const foundationDisplay =\n      this.foundationTypeSelectTarget.options[this.foundationTypeSelectTarget.selectedIndex].text;\n\n    return `Span Tables (${asceDisplay}, ${railTypeDisplay}, ${foundationDisplay})`;\n  }\n\n  #bxFileUrl(state, _railType) {\n    // <S3_BUCKET_URL>/flat-roof-mounting/resources/certification/BX/IronRidge_BX_Certification_DE.pdf\n    return [\n      this.baseUrlValue,\n      \"flat-roof-mounting\",\n      \"resources\",\n      \"certification\",\n      \"BX\",\n      `IronRidge_BX_Certification_${state}${this.#asceFilenamePiece}.pdf`,\n    ].join(\"/\");\n  }\n\n  #rockitFileUrl(state) {\n    // <S3_BUCKET_URL>/pitched-roof-mounting/resources/certification/RockIt/IronRidge_RockIt-V3_Flush_Certification_FL-722.pdf\n    const asceVersion = this.asceSelectTarget.value === \"7.16\" ? \"716\" : \"722\";\n    return [\n      this.baseUrlValue,\n      \"pitched-roof-mounting\",\n      \"resources\",\n      \"certification\",\n      \"RockIt\",\n      `IronRidge_RockIt-V3_Flush_Certification_${state}-${asceVersion}.pdf`,\n    ].join(\"/\");\n  }\n\n  #raillessFileUrl(state) {\n    if (this.#railPlatform === \"rokr\") {\n      return this.#rokrFileUrl(state);\n    }\n    return this.#rockitFileUrl(state);\n  }\n\n  #rokrFileUrl(state) {\n    const asceVersion = this.asceSelectTarget.value === \"7.16\" ? \"716\" : \"722\";\n    return [\n      this.baseUrlValue,\n      \"pitched-roof-mounting\",\n      \"resources\",\n      \"certification\",\n      \"ROKR\",\n      `IronRidge_ROKR_Smart_Slide_Flush_Certification_${state}-${asceVersion}.pdf`,\n    ].join(\"/\");\n  }\n\n  get #asceFilenamePiece() {\n    if (!this.hasAsceSelectTarget) return \"\";\n\n    const asceValue = this.asceSelectTarget.value;\n    return asceValue === \"7.10\" ? \"\" : `-${asceValue.replace(\".\", \"\")}`;\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport { track } from \"../../helpers/app\";\n\n// Used on the documents and resources pages to download cut sheets\nexport default class extends Controller {\n  static targets = [\"selectList\"];\n\n  static values = {\n    trackingCategory: String,\n    files: Array,\n  };\n  /*\n  The array of files are generated with: app/views/s3_files/_s3_file.json.jbuilder\n  Each file is a hash of S3 data from the backend.  The keys used here are:\n  [\"url\", \"name\", \"isVisible\"]\n  */\n\n  connect() {\n    this.files = this.filesValue.filter((f) => f.isVisible);\n    this.#addFileOptionsToSelect();\n  }\n\n  download(event) {\n    event.preventDefault();\n\n    const fileUrl = this.selectListTarget.value;\n\n    if (fileUrl === \"\") {\n      alert(\"Please select a cut sheet to download.\");\n      return;\n    }\n\n    track({ action: \"Document Download\", category: this.trackingCategoryValue, label: fileUrl });\n\n    setTimeout(() => {\n      window.open(fileUrl, \"_blank\");\n    }, 250);\n  }\n\n  #addFileOptionsToSelect() {\n    this.files.forEach((file) => {\n      const option = `<option value=\"${file.url}\">${file.name}</option>`;\n      this.selectListTarget.innerHTML += option;\n    });\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport { track } from \"../../helpers/app\";\n\n// Used on the documents and resources pages to download cut sheets\nexport default class extends Controller {\n  static targets = [\"selectList\"];\n\n  download(event) {\n    event.preventDefault();\n\n    const fileUrl = this.selectListTarget.value;\n\n    if (fileUrl === \"select\") {\n      alert(\"Please select a cut sheet to download.\");\n      return;\n    }\n\n    track({ action: \"Document Download\", category: this.category, label: fileUrl });\n    setTimeout(() => {\n      window.open(fileUrl, \"_blank\");\n    }, 250);\n  }\n\n  get category() {\n    return this.element.dataset.category;\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport debounce from \"lodash/debounce\";\nimport * as animate from \"../../helpers/animate\";\n\nexport default class extends Controller {\n  static values = {\n    files: Array,\n  };\n\n  static targets = [\"fileLinkContainer\", \"searchTextField\", \"productFamilyCard\", \"noResultsFoundMsg\"];\n\n  initialize() {\n    this.search = debounce(this.search, 300);\n  }\n\n  search(_event) {\n    this.#processSearch();\n  }\n\n  clearSearch(event) {\n    event.preventDefault();\n    this.searchTextFieldTarget.value = \"\";\n    this.#processSearch();\n  }\n\n  #processSearch() {\n    this.#showSearchResults();\n    this.#hideEmptyCards();\n    this.#showHideNoResultsFoundMsg();\n  }\n\n  #showSearchResults() {\n    const searchResultFileIds = this.#searchResults.map((file) => `${file.id}`);\n    this.fileLinkContainerTargets.forEach((fileLinkContainer) => {\n      const id = fileLinkContainer.dataset.fileId;\n      const isPartOfResult = searchResultFileIds.includes(id);\n      fileLinkContainer.dataset.visible = isPartOfResult;\n\n      if (isPartOfResult) {\n        animate.show(fileLinkContainer, { duration: 250 });\n      } else {\n        animate.hide(fileLinkContainer, { duration: 250 });\n      }\n    });\n  }\n\n  get #searchResults() {\n    const searchTerm = this.searchTextFieldTarget.value.toLowerCase();\n    if (searchTerm === \"\") return this.filesValue;\n\n    return this.filesValue.filter((file) => {\n      return (\n        file.nameWithType.toLowerCase().includes(searchTerm) ||\n        file.productFamilyName.toLowerCase().includes(searchTerm)\n      );\n    });\n  }\n\n  #hideEmptyCards() {\n    this.hasVisibleCards = false;\n    this.productFamilyCardTargets.forEach((card) => {\n      const visibleResults = Array.from(card.querySelectorAll(\"li\")).filter((li) => li.dataset.visible === \"true\");\n      const hasVisibleResults = visibleResults.length > 0;\n      card.dataset.visible = !hasVisibleResults;\n\n      if (hasVisibleResults) {\n        animate.show(card, { duration: 250 });\n        this.hasVisibleCards = true;\n      } else {\n        animate.hide(card, { duration: 250 });\n      }\n    });\n  }\n\n  #showHideNoResultsFoundMsg() {\n    if (this.hasVisibleCards) {\n      animate.hide(this.noResultsFoundMsgTarget, { duration: 250, fadeOut: false });\n    } else {\n      animate.show(this.noResultsFoundMsgTarget, { duration: 250 });\n    }\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport * as animate from \"../../helpers/animate\";\n\nexport default class extends Controller {\n  static targets = [\"setAttachedButton\", \"setBallastedButton\", \"attachedViewContainer\", \"ballastedViewContainer\"];\n\n  setCurrentView(event) {\n    event.preventDefault();\n\n    const button = event.currentTarget;\n    const currentView = button.dataset.viewName;\n\n    this.toggleButtonActive(button, true);\n\n    if (currentView === \"attached\") {\n      this.ballastedViewContainerTarget.style.display = \"none\";\n      animate.show(this.attachedViewContainerTarget);\n      this.toggleButtonActive(this.setBallastedButtonTarget, false);\n    } else {\n      this.attachedViewContainerTarget.style.display = \"none\";\n      animate.show(this.ballastedViewContainerTarget);\n      this.toggleButtonActive(this.setAttachedButtonTarget, false);\n    }\n  }\n\n  toggleButtonActive(button, bool) {\n    button.closest(\"li\").classList[bool ? \"add\" : \"remove\"](\"active\");\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\n\nexport default class extends Controller {\n  static targets = [\"actionBtn\"];\n\n  actionBtnClick(event) {\n    this.actionBtnTargets.forEach((btn) => {\n      if (btn === event.target) return;\n\n      btn.classList.add(\"ir-btn--disabled\");\n      btn.disabled = true;\n    });\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport * as animate from \"../../helpers/animate\";\nimport axios from \"axios\";\nimport * as api from \"../../helpers/api\";\n\nexport default class extends Controller {\n  static targets = [\n    \"orientationAngleAndSpacingField\",\n    \"setOrientationUrl\",\n    \"setPortraitButton\",\n    \"setLandscapeButton\",\n    \"landscapeViewContainer\",\n    \"portraitViewContainer\",\n    \"bondingBoltContainer\",\n  ];\n\n  setCurrentView(event) {\n    event.preventDefault();\n\n    const button = event.currentTarget;\n    const currentView = button.dataset.viewName;\n    this.orientationAngleAndSpacingFieldTarget.value = currentView;\n\n    this.toggleButtonActive(button, true);\n\n    this.updateOrientation(currentView);\n\n    if (currentView === \"landscape\") {\n      if (this.hasPortraitViewContainerTarget) {\n        this.portraitViewContainerTarget.style.display = \"none\";\n      }\n\n      animate.show(this.landscapeViewContainerTarget);\n\n      if (this.hasSetPortraitButtonTarget) {\n        this.toggleButtonActive(this.setPortraitButtonTarget, false);\n      }\n    } else {\n      if (this.hasLandscapeViewContainerTarget) {\n        this.landscapeViewContainerTarget.style.display = \"none\";\n      }\n\n      animate.show(this.portraitViewContainerTarget);\n\n      if (this.hasSetLandscapeButtonTarget) {\n        this.toggleButtonActive(this.setLandscapeButtonTarget, false);\n      }\n    }\n  }\n\n  updateOrientation(orientation) {\n    axios({\n      method: \"PATCH\",\n      url: this.setOrientationUrlTarget.dataset.value,\n      data: { orientation },\n      headers: api.defaultHeaders(),\n    });\n  }\n\n  toggleButtonActive(button, bool) {\n    button.closest(\"li\").classList[bool ? \"add\" : \"remove\"](\"active\");\n  }\n\n  setTiltAngle(event) {\n    const angle = event.currentTarget.value;\n\n    if (angle === \"0\") {\n      animate.show(this.bondingBoltContainerTarget);\n    } else {\n      this.bondingBoltContainerTarget.style.display = \"none\";\n    }\n  }\n}\n", "import RoofInformationController from \"../da/roof_information_controller\";\nimport { addOptionsToSelect } from \"../../helpers/form\";\nimport * as animate from \"../../helpers/animate\";\n\nexport default class extends RoofInformationController {\n  static projectType = \"fr\";\n\n  static targets = [\n    ...RoofInformationController.targets,\n    \"roofMaterialDisplayText\",\n    \"roofAttachmentDisplayText\",\n    \"roofDeckPulloutStrengthContainer\",\n    \"roofDeckPulloutStrengthTextField\",\n  ];\n\n  static values = {\n    ...RoofInformationController.values,\n    northSouthRoofSectionsPresent: Boolean,\n  };\n\n  connect() {\n    this.toggleRoofMaterialFamilyInfoPopup();\n    this.changeRoofAttachment();\n  }\n\n  changeRoofAttachment(event) {\n    this.toggleRoofAttachmentInfoPopup();\n    this.#toggleRoofAttachmentsInInfoPopup();\n    this.roofAttachmentSelectTarget.disabled = this.roofMaterial === \"\";\n    this.#toggleRoofMaterialAndAttachmentDisplayText();\n    this.#toggleRoofDeckPulloutStrengthField();\n    this.#toggleSubText();\n    this.toggleDeckThickness();\n    this.toggleDeckScrewLength();\n    this.updateSpecificGravity();\n    if (event) {\n      this.openQmHugScrewsIntro(event);\n      this.openSimpleGripScrewsIntro(event);\n    }\n  }\n\n  // Used by parent method RoofInformationController#changeRoofMaterial\n  updateAttachmentList() {\n    const possibleAttachments = this.roofMaterial === \"\" ? [] : this.#materialToAttachment(this.roofMaterial);\n\n    const prompt = possibleAttachments.length > 1 ? [[\"- choose one -\", \"\"]] : [];\n    const attachmentOptions = prompt.concat(\n      possibleAttachments.map((a) => {\n        let text = a[0];\n        let disabled = false;\n\n        if (this.northSouthRoofSectionsPresentValue && a[1] === \"none\") {\n          text += \" [E-W Only]\";\n          disabled = true;\n        }\n\n        return [text, a[1], disabled, false];\n      }),\n    );\n    addOptionsToSelect(attachmentOptions, this.roofAttachmentSelectTarget, false);\n  }\n\n  updateDependenciesOnAttachmentList() {\n    this.changeRoofAttachment();\n  }\n\n  roofAttachmentToSpecificGravities() {\n    return this.roofAttachmentToSpecificGravitiesValue;\n  }\n\n  #materialToAttachment(roofMaterial) {\n    return this.materialToAttachmentXrValue[roofMaterial];\n  }\n\n  #toggleRoofAttachmentsInInfoPopup(_event) {\n    const dialog = document.querySelector(\"[data-dialog-identifier=info-popup-fr-roof-attachment]\");\n    const sections = dialog.querySelectorAll(\"[data-roof-attachment]\");\n    if (this.isRoofAttachmentEmpty) return;\n\n    let showSelector = `[data-roof-attachment=${this.roofAttachment}]`;\n\n    for (let section of sections) {\n      section.style.display = section.matches(showSelector) ? \"block\" : \"none\";\n    }\n  }\n\n  #toggleRoofMaterialAndAttachmentDisplayText() {\n    const hideAttachmentSelect = this.roofMaterial === \"metal_standing_seam\";\n    animate.toggle(this.roofAttachmentSelectTarget, !hideAttachmentSelect, { fadeOut: false });\n    animate.toggle(this.roofAttachmentDisplayTextTarget, hideAttachmentSelect, { fadeOut: false });\n  }\n\n  #toggleRoofDeckPulloutStrengthField() {\n    const metalRoof = this.roofMaterialFamily === \"metal\";\n    animate.toggle(this.roofDeckPulloutStrengthContainerTarget, !metalRoof);\n    if (metalRoof) {\n      this.roofDeckPulloutStrengthTextFieldTarget.value = \"\";\n    }\n  }\n\n  #toggleSubText() {\n    this.toggleRoofAttachmentHint();\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport * as animate from \"../../helpers/animate\";\n\nexport default class extends Controller {\n  static targets = [\"segmentForm\", \"submitBtn\", \"submitBtnContainer\", \"segmentsPayload\"];\n\n  connect() {\n    this.element.controller = this;\n  }\n\n  saveAll() {\n    this.collectSavableForms();\n    this.buildPayload();\n    this.savePayloadIntoForm();\n  }\n\n  collectSavableForms() {\n    this.savableForms = this.segmentFormTargets.filter((form) => {\n      const submitBtnContainer = form.querySelector(\".submit-btn-container\");\n      return submitBtnContainer.style.display === \"block\";\n    });\n  }\n\n  buildPayload() {\n    this.payload = this.savableForms.map((form) => {\n      const id = form.querySelector(\"[data-identifier='fr-segment-id']\").dataset.value;\n      const rows = form.querySelector(`[data-identifier='fr-segment-rows']`).value;\n      const columns = form.querySelector(`[data-identifier='fr-segment-columns']`).value;\n      const number_of_arrays = form.querySelector(`[data-identifier='fr-segment-number-of-arrays']`).value;\n      const portraitRadioButton = form.querySelector(`#_${id}_fr_segment_portrait_true`);\n\n      let portrait;\n      if (portraitRadioButton) {\n        portrait = portraitRadioButton.checked;\n      } else {\n        // we're looking at a portrait only situation where there are no radio buttons\n        portrait = true;\n      }\n\n      return { id, rows, columns, number_of_arrays, portrait };\n    });\n  }\n\n  savePayloadIntoForm() {\n    this.segmentsPayloadTarget.value = JSON.stringify(this.payload);\n  }\n\n  dirtied() {\n    const btnContainer = this.submitBtnContainerTarget;\n    if (btnContainer.style.display === \"none\") {\n      animate.show(btnContainer);\n    }\n  }\n\n  resetSaveAllBtn() {\n    this.collectSavableForms();\n    if (!this.savableForms.length) {\n      animate.hide(this.submitBtnContainerTarget);\n    }\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport * as animate from \"../../helpers/animate\";\n\nimport { addOptionsToSelect } from \"../../helpers/form\";\n\nexport default class extends Controller {\n  static targets = [\n    \"conditionalContainer\",\n    \"foundationTypeSelect\",\n    \"pipeDiameterField\",\n    \"screwLengthSelect\",\n    \"groundScrewManufacturerSelect\",\n    \"hexHeadSetScrewsHiddenField\",\n    \"hexHeadSetScrewsValueDisplay\",\n  ];\n\n  static values = {\n    screwLengthOptions: Object,\n    requiresGroundScrewManufacturers: Boolean,\n  };\n\n  foundationChanged(_event) {\n    const foundation = this.foundationTypeSelectTarget.value;\n    this.conditionalContainerTargets.forEach((t) => {\n      const foundationTypes = t.dataset.foundationTypes;\n      if (foundationTypes.includes(foundation)) {\n        animate.show(t);\n      } else {\n        animate.hide(t, { fadeOut: false });\n      }\n    });\n  }\n\n  updateScrewLengthOptions(_event) {\n    const pipeDiameter = this.pipeDiameterFieldTarget.value;\n    const currentScrewLengthValue = Number.parseInt(this.screwLengthSelectTarget.value);\n\n    let options = [];\n    if (this.requiresGroundScrewManufacturersValue) {\n      const manufacturer = this.groundScrewManufacturerSelectTarget.value;\n      if (manufacturer !== \"\") {\n        options = this.screwLengthOptionsValue[manufacturer][Number.parseInt(pipeDiameter)];\n      } else {\n        options = [[\"* requires a manufacturer\", \"\"]];\n      }\n    } else {\n      options = this.screwLengthOptionsValue[pipeDiameter];\n    }\n\n    const fullySpecifiedOptions = options.map((option) => {\n      const selected = option[1] === currentScrewLengthValue;\n      return [option[0], option[1], false, selected];\n    });\n\n    addOptionsToSelect(fullySpecifiedOptions, this.screwLengthSelectTarget);\n  }\n\n  groundScrewManufacturerChanged(event) {\n    const manufacturer = event.target.value;\n    if (manufacturer === \"\") {\n      this.hexHeadSetScrewsHiddenFieldTarget.value = \"\";\n      this.hexHeadSetScrewsValueDisplayTarget.innerHTML = \"\";\n    } else {\n      const hexHeadCount = manufacturer === \"american\" ? 3 : 4;\n      this.hexHeadSetScrewsHiddenFieldTarget.value = hexHeadCount;\n      this.hexHeadSetScrewsValueDisplayTarget.innerHTML = hexHeadCount;\n    }\n    this.updateScrewLengthOptions(event);\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport * as animate from \"../../helpers/animate\";\nimport * as store from \"../../helpers/local-store\";\n\nexport default class extends Controller {\n  static targets = [\"tabLink\", \"tabContentContainer\", \"collapsableTabContent\"];\n\n  connect() {\n    this.projectId = this.element.dataset.projectId;\n    this.localStoreSelectedKey = `gb-sub-array-tab-selected-${this.projectId}`;\n    this.localStoreExpandedKey = `gb-sub-array-tabs-expanded-${this.projectId}`;\n    this.localStoreCollapsedIdsKey = `gb-sub-array-collapsed-ids-${this.projectId}`;\n\n    if (this.hasMoreThanOneTab) this.showSelectedTab(this.selectedSubArrayId);\n\n    const tabsAreExpanded = this.storedTabsExpanded;\n    this.setTabsExpanded(tabsAreExpanded);\n\n    if (tabsAreExpanded) this.hideCollapsedDetailsSections();\n  }\n\n  get hasMoreThanOneTab() {\n    return this.tabContentContainerTargets.length > 0;\n  }\n\n  showSelectedTab(showSubArrayId) {\n    this.toggleTabLinks(showSubArrayId);\n    this.toggleTabContentAreas(showSubArrayId);\n  }\n\n  toggleTabLinks(showSubArrayId) {\n    this.tabLinkTargets.forEach((tl) => {\n      if (tl.dataset.subArrayId === showSubArrayId) {\n        tl.closest(\"li\").classList.add(\"active\");\n      } else {\n        tl.closest(\"li\").classList.remove(\"active\");\n      }\n    });\n  }\n\n  toggleTabContentAreas(showSubArrayId) {\n    this.tabContentContainerTargets.forEach((sdc) => {\n      if (sdc.dataset.subArrayId === showSubArrayId) {\n        animate.show(sdc);\n      } else {\n        sdc.style.display = \"none\";\n      }\n    });\n  }\n\n  setTabsExpanded(expanded) {\n    this.element.classList[expanded ? \"add\" : \"remove\"](\"gb-sub-array-details--tabs-expanded\");\n    store.set(this.localStoreExpandedKey, expanded);\n\n    if (!expanded) this.collapsableTabContentTargets.forEach(animate.show);\n  }\n\n  get storedTabsExpanded() {\n    return store.get(this.localStoreExpandedKey, false);\n  }\n\n  get selectedSubArrayId() {\n    const selectedId = store.get(this.localStoreSelectedKey);\n    if (selectedId !== null && this.subArrayIdPresent(selectedId)) {\n      return selectedId;\n    } else {\n      return this.firstSubArrayId;\n    }\n  }\n\n  subArrayIdPresent(subArrayId) {\n    const subArrayIds = this.tabContentContainerTargets.map((t) => t.dataset.subArrayId);\n    return subArrayIds.includes(subArrayId);\n  }\n\n  get firstSubArrayId() {\n    return this.tabContentContainerTargets[0].dataset.subArrayId;\n  }\n\n  showTab(event) {\n    event.preventDefault();\n    const tabLink = event.currentTarget;\n    const showSubArrayId = tabLink.dataset.subArrayId;\n    this.saveSelectedSubArrayId(showSubArrayId);\n    this.showSelectedTab(showSubArrayId);\n  }\n\n  saveSelectedSubArrayId(newId) {\n    store.set(this.localStoreSelectedKey, newId);\n  }\n\n  toggleTabsExpandedDisplay(event) {\n    event.preventDefault();\n    const tabsAreExpanded = !this.tabsExpandedClassExists;\n    this.setTabsExpanded(tabsAreExpanded);\n    if (tabsAreExpanded) this.hideCollapsedDetailsSections();\n  }\n\n  get tabsExpandedClassExists() {\n    return this.element.classList.contains(\"gb-sub-array-details--tabs-expanded\");\n  }\n\n  hideCollapsedDetailsSections() {\n    const storedSubArrayIds = this.storedCollapsedSubArrays;\n    this.collapsableTabContentTargets.forEach((ctc) => {\n      const subArrayId = ctc.dataset.subArrayId;\n      if (storedSubArrayIds.includes(subArrayId)) ctc.style.display = \"none\";\n    });\n  }\n\n  storeCollapsed(event) {\n    const { subArrayId } = event.currentTarget.dataset;\n    this.toggleAndStoreCollapsedSubArray(subArrayId);\n  }\n\n  toggleAndStoreCollapsedSubArray(subArrayId) {\n    const subArrayIds = this.storedCollapsedSubArrays;\n\n    let index = subArrayIds.indexOf(subArrayId);\n    if (index < 0) {\n      subArrayIds.push(subArrayId);\n    } else {\n      subArrayIds.splice(index, 1);\n    }\n\n    store.set(this.localStoreCollapsedIdsKey, subArrayIds);\n  }\n\n  get storedCollapsedSubArrays() {\n    return store.get(this.localStoreCollapsedIdsKey, []);\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport * as animate from \"../../helpers/animate\";\nimport { addOptionsToSelect } from \"../../helpers/form\";\n\nexport default class extends Controller {\n  static targets = [\n    \"customEwPierSpanFieldContainer\",\n    \"rowsField\",\n    \"diagonalBracingCheckbox\",\n    \"maxSpanDisplay\",\n    \"railOptionsField\",\n    \"railOptionsWarning\",\n    \"railCustomWarning\",\n    \"tiltAngleField\",\n    \"tiltAngleWarning\",\n  ];\n\n  static values = {\n    rowOptionsToLookupRows: Object,\n    rowOptionsToRailOptions: Object,\n    customOptions: Array,\n  };\n\n  ewPierSpanTypeChange(event) {\n    const checkbox = event.currentTarget;\n    const { value } = checkbox;\n    const { checked } = checkbox;\n    const customChecked = (value === \"custom\" && checked) || (value === \"max\" && !checked);\n    animate.toggle(this.customEwPierSpanFieldContainerTarget, customChecked);\n  }\n\n  updateMaxSpan = (_event) => {\n    if (this.hasDiagonalBracingCheckboxTarget) {\n      const rows = this.rowsForMaxSpanLookup;\n\n      const diagonalBracing = this.diagonalBracingCheckboxTarget.checked;\n      const maxSpanLookup = this.projectMaxSpans.find(\n        (pms) => pms.rows === rows && pms.diagonal_bracing === diagonalBracing,\n      );\n      const maxSpan = maxSpanLookup !== undefined ? maxSpanLookup.max_span : \"?\";\n      this.maxSpanDisplayTarget.innerHTML = maxSpan;\n    }\n  };\n\n  updateRowOptions = (_event) => {\n    const rows = Number.parseInt(this.rowsFieldTarget.value);\n    const railOptionsSelect = this.railOptionsFieldTarget;\n    const currentRailOption = railOptionsSelect.value;\n\n    const railOptions = this.rowOptionsToRailOptionsValue[rows];\n    const selectOptions = railOptions[\"select_options\"];\n    const disabledOption = railOptions[\"disabled\"][0];\n\n    const optsList = selectOptions.map((item) => {\n      const [label, value] = item;\n      const disabled = value === disabledOption;\n      const selected = value === currentRailOption;\n      return [label, value, disabled, selected];\n    });\n    addOptionsToSelect(optsList, railOptionsSelect);\n\n    this.showHideRailOptionWarning(disabledOption);\n  };\n\n  updateRailWarnings = (_event) => {\n    const rows = Number.parseInt(this.rowsFieldTarget.value);\n    const railOptionsSelect = this.railOptionsFieldTarget;\n    const currentRailOption = railOptionsSelect.value;\n\n    const railOptions = this.rowOptionsToRailOptionsValue[rows];\n    const disabledOption = railOptions[\"disabled\"][0];\n\n    this.showHideRailOptionWarning(currentRailOption === disabledOption);\n\n    const isCustom = this.customOptionsValue.find((option) => option === currentRailOption);\n    this.showHideRailCustomWarning(isCustom !== undefined);\n  };\n\n  updateTiltAngleWarning() {\n    if (!this.hasTiltAngleWarningTarget) {\n      return;\n    }\n\n    const tiltAngle = Number.parseInt(this.tiltAngleFieldTarget.value);\n    if (tiltAngle === 45) {\n      animate.show(this.tiltAngleWarningTarget);\n    } else {\n      animate.hide(this.tiltAngleWarningTarget, { fadeOut: false });\n    }\n  }\n\n  showHideRailOptionWarning(showWarning) {\n    if (showWarning) {\n      animate.show(this.railOptionsWarningTarget);\n    } else {\n      animate.hide(this.railOptionsWarningTarget, { fadeOut: false });\n    }\n  }\n\n  showHideRailCustomWarning(showWarning) {\n    if (showWarning) {\n      animate.show(this.railCustomWarningTarget);\n    } else {\n      animate.hide(this.railCustomWarningTarget, { fadeOut: false });\n    }\n  }\n\n  get rowsForMaxSpanLookup() {\n    const rows = Number.parseInt(this.rowsFieldTarget.value);\n    return this.rowOptionsToLookupRowsValue[rows];\n  }\n\n  get projectMaxSpans() {\n    return this.subArraysController.projectMaxSpans;\n  }\n\n  get subArraysController() {\n    const identifier = \"gb--sub-arrays\";\n    const controllerElement = document.querySelector(`[data-controller='${identifier}']`);\n    return this.application.getControllerForElementAndIdentifier(controllerElement, identifier);\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport Rails from \"@rails/ujs\";\nimport * as animate from \"../../helpers/animate\";\n\nexport default class extends Controller {\n  static targets = [\n    \"saveAllSubmitBtnContainer\",\n    \"subArraysPayloadField\",\n    \"saveAllSubmitBtn\",\n    \"subArrayForm\",\n    \"saveAllForm\",\n  ];\n\n  connect() {\n    this.projectMaxSpans = JSON.parse(this.element.dataset.projectMaxSpans);\n  }\n\n  saveAll(event) {\n    this.subArraysPayloadFieldTarget.value = JSON.stringify(this.saveAllPayload);\n  }\n\n  get saveAllPayload() {\n    const payload = {};\n    this.subArrayFormTargets.forEach((form) => {\n      const id = form.dataset.subArrayId;\n      payload[id] = this.subArrayParamsFromForm(form);\n    });\n    return payload;\n  }\n\n  subArrayParamsFromForm(form) {\n    const formData = new FormData(form);\n    const subArrayParams = {};\n    for (const [name, value] of formData.entries()) {\n      const attribute = this.attributeFromSubArrayFormName(name);\n      if (attribute !== null) subArrayParams[attribute] = value;\n    }\n    return subArrayParams;\n  }\n\n  attributeFromSubArrayFormName(name) {\n    const match = name.match(/^gb_sub_array\\[(.*)\\]$/);\n    return match === null ? null : match[1];\n  }\n\n  dirtied() {\n    const el = this.saveAllSubmitBtnContainerTarget;\n    if (el.style.display === \"none\") animate.show(el);\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport { track, createLinkAndClick } from \"../helpers/app\";\nimport { submitWithTabId } from \"../helpers/form\";\n\nexport default class extends Controller {\n  trackLink = (event) => {\n    event.preventDefault();\n\n    const link = event.currentTarget;\n    const url = link.href;\n    const { category, action, label } = this.trackingInfoFromElement(link);\n\n    // give tracking code time to execute\n    setTimeout(() => {\n      createLinkAndClick(url, \"_blank\");\n    }, 100);\n\n    track({ action, category, label });\n  };\n\n  trackFormSubmit = (event) => {\n    event.preventDefault();\n\n    const form = event.currentTarget;\n    const { category, action, label } = this.trackingInfoFromElement(form);\n\n    // give tracking code time to execute\n    setTimeout(() => {\n      submitWithTabId(form);\n    }, 100);\n\n    track({ action, category, label });\n  };\n\n  trackingInfoFromElement(el) {\n    const category = el.dataset.trackingCategory;\n    const action = el.dataset.trackingAction;\n    const label = el.dataset.trackingLabel;\n    return { category, action, label };\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\n\nexport default class GoogleMapFullPage extends Controller {\n  static values = { lat: Number, lng: Number, zoom: Number };\n\n  connect() {\n    const latLng = { lat: this.latValue, lng: this.lngValue };\n\n    this.map = new google.maps.Map(this.element, {\n      mapId: \"google-map-full-page\",\n      center: latLng,\n      zoom: this.zoomValue,\n      mapTypeId: google.maps.MapTypeId.SATELLITE,\n      disableDefaultUI: true,\n      zoomControl: false,\n      mapTypeControl: false,\n      scaleControl: false,\n      streetViewControl: false,\n      rotateControl: false,\n      fullscreenControl: false,\n    });\n\n    this.map.setTilt(0);\n\n    this.map.addListener(\"tilesloaded\", () => {\n      document.body.dataset.screenshotReady = \"true\";\n    });\n\n    // Hiding this for now.  I don't think we need a marker on the full page map.\n    // This is mainly used for the areal image view in the project report for\n    // non-image based maps.  I don't think the marker is helpful, but in case\n    // there's a desire to bring it back, I'll leave this commented out.\n    // new google.maps.marker.AdvancedMarkerElement({\n    //   position: latLng,\n    //   map: this.map,\n    // });\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport { elementInfo, pointOverlapsElement } from \"../helpers/app\";\nimport * as animate from \"../helpers/animate\";\n\nexport default class extends Controller {\n  static targets = [\n    \"navLink\",\n    \"homeMenu\",\n    \"adminMenu\",\n    \"projectsMenu\",\n    \"ordersMenu\",\n    \"resourcesMenu\",\n    \"accountMenu\",\n    \"menu\",\n  ];\n\n  connect() {\n    document.body.addEventListener(\"click\", this.bodyClickHideMenus.bind(this));\n    window.addEventListener(\"resize\", this.bodyClickHideMenus.bind(this));\n  }\n\n  disconnect() {\n    document.body.removeEventListener(\"click\", this.bodyClickHideMenus.bind(this));\n    window.removeEventListener(\"resize\", this.bodyClickHideMenus.bind(this));\n  }\n\n  bodyClickHideMenus(event) {\n    if (!this.currentMenu) return;\n\n    for (let i = 0; i < this.menuTargets.length; i++) {\n      const overlapping = pointOverlapsElement({ x: event.clientX, y: event.clientY, element: this.menuTargets[i] });\n      if (overlapping) return;\n    }\n\n    for (let i = 0; i < this.navLinkTargets.length; i++) {\n      const overlapping = pointOverlapsElement({ x: event.clientX, y: event.clientY, element: this.navLinkTargets[i] });\n      if (overlapping) return;\n    }\n\n    this.hideMenus();\n\n    this.currentMenu = undefined;\n  }\n\n  showMenu(event) {\n    event.preventDefault();\n\n    const menu = this[`${event.params.menu}Target`];\n    const link = event.currentTarget;\n    const linkInfo = elementInfo(link);\n\n    if (this.currentMenu === event.params.menu) {\n      link.classList.remove(\"header__mainnav__link--active\");\n      this.currentMenu = undefined;\n      animate.hide(menu, { fadeOut: false });\n      return;\n    } else {\n      this.currentMenu = event.params.menu;\n    }\n\n    this.hideMenus(link, menu);\n\n    link.classList.add(\"header__mainnav__link--active\");\n\n    animate.show(menu, { duration: 150 });\n\n    setTimeout(() => {\n      const menuInfo = elementInfo(menu);\n      menu.style.top = `${linkInfo.bottom + 2}px`;\n\n      const isLeftAligned = menu.classList.contains(\"header__menu--left-aligned\");\n      const xPos = isLeftAligned ? linkInfo.left : linkInfo.right - menuInfo.width;\n      menu.style.left = `${xPos}px`;\n\n      menu.style.zIndex = 1000;\n    }, 10);\n  }\n\n  hideMenus(openingLink, openingMenu) {\n    this.navLinkTargets.forEach((link) => {\n      if (openingLink && link === openingLink) return;\n\n      link.classList.remove(\"header__mainnav__link--active\");\n    });\n\n    this.menuTargets.forEach((menu) => {\n      if (openingMenu && menu === openingMenu) return;\n      if (menu.offsetParent === null) return;\n\n      menu.style.zIndex = 999;\n      animate.hide(menu, { fadeOut: false });\n    });\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\n\nexport default class extends Controller {\n  submit(_event) {\n    this.element.requestSubmit();\n  }\n}\n", "import * as store from \"../../helpers/local-store\";\n\nexport function isInStore(name) {\n  // After this was rolled out it occurred to me that it would be a good idea\n  // to prefix the local storage key with \"intro\" so it would be clearer where\n  // these values were coming from.  So, I'm checking for the old no-prefix\n  // value and the new prefixed value here.\n  const oldValueInStore = store.get(name);\n  if (store.get(name)) {\n    store.set(`intro-${name}`, oldValueInStore);\n    store.del(name);\n    return true;\n  } else if (store.get(`intro-${name}`)) {\n    return true;\n  } else {\n    return false;\n  }\n}\n\nexport function setInStore(name) {\n  store.set(`intro-${name}`, true);\n}\n", "import { Controller } from \"@hotwired/stimulus\";\n\nimport { showDialog } from \"../components/ir_dialog/helper\";\nimport { isInStore, setInStore } from \"./helpers\";\n\nexport default class extends Controller {\n  connect() {\n    const { introductionName, introductionShow } = this.element.dataset;\n\n    if (introductionShow === undefined) return;\n    if (isInStore(introductionName)) return;\n\n    showDialog(`${introductionName}-dialog`);\n    setInStore(introductionName);\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport { animate as anime } from \"animejs\";\nimport axios from \"axios\";\n\nimport * as api from \"../../helpers/api\";\nimport * as store from \"../../helpers/local-store\";\n\nexport default class IntroductionDismissalController extends Controller {\n  static values = {\n    introductionName: String,\n    hasCurrentUser: Boolean,\n  };\n\n  static targets = [\"introBox\", \"dismissalCheckbox\"];\n\n  connect() {\n    if (this.hasIntroBoxTarget && !this.isIntroductionDismissed()) {\n      this.showIntroductionBox();\n    }\n  }\n\n  isIntroductionDismissed() {\n    return store.get(this.localStorageDismissalKey);\n  }\n\n  get localStorageDismissalKey() {\n    return `introduction-dismissed-${this.introBoxTarget.dataset.introductionId}`;\n  }\n\n  dismiss(event) {\n    event.preventDefault();\n\n    const rememberDismissal = this.hasDismissalCheckboxTarget && this.dismissalCheckboxTarget.checked;\n    if (rememberDismissal) {\n      store.set(this.localStorageDismissalKey, true);\n    }\n\n    this.hideIntroductionBox();\n\n    if (this.hasCurrentUserValue) {\n      axios({\n        method: \"POST\",\n        headers: api.defaultHeaders(),\n        url: \"/introduction_dismissals\",\n        data: { introduction_name: this.introductionNameValue },\n      }).catch(api.errorHandler);\n    }\n\n    if (event.params && event.params.url) {\n      location.href = event.params.url;\n    }\n  }\n\n  hideIntroductionBox() {\n    this.introBoxTarget.style.height = `${this.introBoxTarget.offsetHeight}px`;\n    anime(this.introBoxTarget, {\n      height: 0,\n      opacity: 0,\n      ease: \"inOutQuad\",\n      duration: 400,\n      onComplete: () => {\n        this.introBoxTarget.classList.add(\"d-none\");\n      },\n    });\n  }\n\n  showIntroductionBox() {\n    this.introBoxTarget.classList.remove(\"d-none\");\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport * as animate from \"../helpers/animate\";\n\nexport default class extends Controller {\n  static targets = [\n    \"countrySelect\",\n    \"stateSelect\",\n    \"stateTextField\",\n    \"zipTextField\",\n    \"zipLabel\",\n    \"stateSelectContainer\",\n    \"stateTextFieldContainer\",\n  ];\n\n  connect() {\n    this.toggleStateAndZip();\n  }\n\n  changedCountry(_event) {\n    this.toggleStateAndZip();\n  }\n\n  toggleStateAndZip() {\n    if (!this.hasStateSelectTarget) {\n      return;\n    }\n\n    if (this.isCountryUsa) {\n      this.stateSelectTarget.disabled = false;\n      animate.toggle(this.stateSelectContainerTarget, true, { duration: 0 });\n\n      this.stateTextFieldTarget.disabled = true;\n      animate.toggle(this.stateTextFieldContainerTarget, false, { duration: 0 });\n\n      this.zipLabelTarget.classList.add(\"required\");\n    } else {\n      this.stateSelectTarget.disabled = true;\n      animate.toggle(this.stateSelectContainerTarget, false, { duration: 0 });\n\n      this.stateTextFieldTarget.disabled = false;\n      animate.toggle(this.stateTextFieldContainerTarget, true, { duration: 0 });\n\n      this.zipLabelTarget.classList.remove(\"required\");\n    }\n  }\n\n  get isCountryUsa() {\n    const country =\n      this.countrySelectTarget.tagName === \"SELECT\"\n        ? this.countrySelectTarget.value\n        : this.countrySelectTarget.textContent;\n    return country === \"US\";\n  }\n}\n", "import { animate as anime } from \"animejs\";\nimport { Controller } from \"@hotwired/stimulus\";\nimport axios from \"axios\";\nimport Rails from \"@rails/ujs\";\n\nimport { Form } from \"../../helpers/form\";\nimport * as api from \"../../helpers/api\";\nimport { track } from \"../../helpers/app\";\nimport { lookupDialog, showDialog } from \"../components/ir_dialog/helper\";\n\nexport default class extends Controller {\n  static targets = [\n    \"selectAllCheckbox\",\n    \"projectFolderCheckboxes\",\n    \"selectedProjectsActionLinks\",\n    \"discountedPriceTds\",\n    \"detailsFrame\",\n  ];\n\n  submitting = false;\n\n  connect() {\n    if (lookupDialog(\"my-projects-login-dialog\")) {\n      showDialog(\"my-projects-login-dialog\", () => {}, {\n        showNearClickPosition: true,\n        clickPosition: this.getLoginDialogPosition(),\n      });\n    }\n  }\n\n  deleteSelectedLinkClicked(event) {\n    this.selectedLinkHandler(event, \"delete\");\n    track({ category: \"Bulk Action\", action: \"delete\", label: \"Projects\" });\n  }\n\n  emailSelectedLinkClicked(e) {\n    const link = e.currentTarget;\n    if (link.classList.contains(\"disabled\")) return;\n    const hiddenFieldIdentifier = \"bulk-send-project-folder-ids-hidden-field\";\n    [...document.querySelectorAll(`[data-identifier=\"${hiddenFieldIdentifier}\"]`)].forEach((field) => {\n      field.remove();\n    });\n    const form = document.querySelector(`[data-identifier=\"project-report-bulk-shares-form\"]`);\n    this.selectedProjectIds.forEach((projectFolderId) => {\n      const field = this.projectFolderIdHiddenField(projectFolderId, hiddenFieldIdentifier, \"bulk_report_share\");\n      form.insertAdjacentHTML(\"afterbegin\", field);\n    });\n  }\n\n  projectIdHiddenField(projectId, hiddenFieldIdentifier, formObjectName) {\n    return `<input data-identifier=\"${hiddenFieldIdentifier}\" type=\"hidden\" name=\"${formObjectName}[project_ids][]\" value=\"${projectId}\" />`;\n  }\n\n  projectFolderIdHiddenField(projectFolderId, hiddenFieldIdentifier, formObjectName) {\n    return `<input data-identifier=\"${hiddenFieldIdentifier}\" type=\"hidden\" name=\"${formObjectName}[project_folder_ids][]\" value=\"${projectFolderId}\" />`;\n  }\n\n  consolidateBOMLinkClicked(e) {\n    const link = e.currentTarget;\n    if (link.classList.contains(\"disabled\")) return;\n\n    const singleFolderId = link.dataset.projectFolderId;\n    const projectFolderIds = singleFolderId ? [singleFolderId] : this.selectedProjectIds;\n\n    const hiddenFieldIdentifier = \"consolidated-bom-project-folder-ids-hidden-field\";\n    [...document.querySelectorAll(`[data-identifier=\"${hiddenFieldIdentifier}\"]`)].forEach((field) => {\n      field.remove();\n    });\n    const form = document.querySelector('[data-identifier=\"download-consolidated-bom-form\"]');\n    projectFolderIds.forEach((projectFolderId) => {\n      const field = this.projectFolderIdHiddenField(projectFolderId, hiddenFieldIdentifier, \"consolidated_bom\");\n      form.insertAdjacentHTML(\"afterbegin\", field);\n    });\n    this.validateBomConsolidation(projectFolderIds);\n  }\n\n  validateBomConsolidation(projectFolderIds = null) {\n    const ids = projectFolderIds || this.selectedProjectIds;\n    const projectIdParams = ids.map((id) => `consolidated_bom[project_folder_ids][]=${id}`).join(\"&\");\n    Rails.ajax({ type: \"GET\", url: `/consolidated_boms/new?${projectIdParams}` });\n  }\n\n  addPersonLinkClicked(e) {\n    const link = e.currentTarget;\n    if (link.classList.contains(\"disabled\")) return;\n    const hiddenFieldIdentifier = \"project-folders-ownership-project-folder-ids-hidden-field\";\n    [...document.querySelectorAll(`[data-identifier=\"${hiddenFieldIdentifier}\"]`)].forEach((field) => {\n      field.remove();\n    });\n    const form = document.querySelector('[data-identifier=\"share-project-folders-form\"]');\n    this.selectedProjectIds.forEach((projectFolderId) => {\n      const field = this.projectFolderIdHiddenField(\n        projectFolderId,\n        hiddenFieldIdentifier,\n        \"project_folders_ownership\",\n      );\n      form.insertAdjacentHTML(\"afterbegin\", field);\n    });\n  }\n\n  assignToCompanyLinkClicked(e) {\n    const link = e.currentTarget;\n    if (link.classList.contains(\"disabled\")) return;\n    const hiddenFieldIdentifier = \"assign-to-company-project-folder-ids-hidden-field\";\n    [...document.querySelectorAll(`[data-identifier=\"${hiddenFieldIdentifier}\"]`)].forEach((field) => {\n      field.remove();\n    });\n    const form = document.querySelector('[data-identifier=\"assign-to-company-form\"]');\n    this.selectedProjectIds.forEach((projectFolderId) => {\n      const field = this.projectFolderIdHiddenField(\n        projectFolderId,\n        hiddenFieldIdentifier,\n        \"bulk_project_folder_assignment\",\n      );\n      form.insertAdjacentHTML(\"afterbegin\", field);\n    });\n  }\n\n  assignToCoworkerLinkClicked(e) {\n    const link = e.currentTarget;\n    if (link.classList.contains(\"disabled\")) return;\n    const hiddenFieldIdentifier = \"assign-to-coworker-project-folder-ids-hidden-field\";\n    [...document.querySelectorAll(`[data-identifier=\"${hiddenFieldIdentifier}\"]`)].forEach((field) => {\n      field.remove();\n    });\n    const form = document.querySelector('[data-identifier=\"assign-to-coworker-form\"]');\n    this.selectedProjectIds.forEach((projectFolderId) => {\n      const field = this.projectFolderIdHiddenField(\n        projectFolderId,\n        hiddenFieldIdentifier,\n        \"bulk_project_folder_owner_assignment\",\n      );\n      form.insertAdjacentHTML(\"afterbegin\", field);\n    });\n  }\n\n  selectedLinkHandler(event, type) {\n    event.preventDefault();\n    const link = event.currentTarget;\n    if (link.classList.contains(\"disabled\")) return;\n    const projectIds = this.selectedProjectIds;\n    if (projectIds.length === 0) return;\n\n    const msg = link.dataset.msg || `Are you sure you want to ${type} the selected projects?`;\n    if (window.confirm(msg)) {\n      this.disableSelectedProjectsLinks();\n      this.postSelectedOperation(projectIds, type);\n    }\n  }\n\n  deleteProjectFolderLinkClicked(event) {\n    event.preventDefault();\n    const link = event.currentTarget;\n    const msg = link.dataset.msg || \"Are you sure you want to delete this project?\";\n    if (window.confirm(msg)) {\n      const projectFolderId = link.dataset.id;\n      this.postSelectedOperation([projectFolderId], \"delete\");\n    }\n  }\n\n  individualProjectLinkHandler(event, type, msgOverride = \"\") {\n    event.preventDefault();\n    const link = event.currentTarget;\n    const defaultMsg = `Are you sure you want to ${type} this project?`;\n    const msg = msgOverride === \"\" ? defaultMsg : msgOverride;\n    if (window.confirm(msg)) {\n      const projectId = link.dataset.id;\n      this.postSelectedOperation([projectId], type);\n    }\n  }\n\n  postSelectedOperation(projectFolderIds, type) {\n    Form.post(`/project_set/${type}`, {\n      project_set: {\n        selected: projectFolderIds.join(\",\"),\n        project_criteria: window.location.search,\n      },\n    });\n  }\n\n  disableSelectedProjectsLinks() {\n    this.selectedProjectsActionLinksTargets.forEach((link) => {\n      link.classList.add(\"disabled\");\n    });\n  }\n\n  get anyCheckboxesSelected() {\n    return this.projectFolderCheckboxesTargets.some((pc) => pc.checked);\n  }\n\n  get allCheckboxesSelected() {\n    return this.projectFolderCheckboxesTargets.every((pc) => pc.checked);\n  }\n\n  get selectedProjectIds() {\n    const projectIds = [];\n    this.projectFolderCheckboxesTargets.forEach((checkbox) => {\n      if (checkbox.checked) {\n        projectIds.push(checkbox.value);\n      }\n    });\n    return projectIds;\n  }\n\n  get anyProposalsSelected() {\n    return this.anyCheckboxHasTrueValue(this.projectFolderCheckboxesTargets, \"proposal\");\n  }\n\n  get anyNonBulkShareEligibleFoldersSelected() {\n    return this.projectFolderCheckboxesTargets.some((checkbox) => {\n      if (checkbox.checked) {\n        return checkbox.dataset.bulkShareEligible !== \"true\";\n      }\n      return false;\n    });\n  }\n\n  get anyNonGen4FoldersSelected() {\n    return this.projectFolderCheckboxesTargets.some((checkbox) => {\n      if (checkbox.checked) {\n        return checkbox.dataset.allGen4 !== \"true\";\n      }\n      return false;\n    });\n  }\n\n  get anyNonCompanyAssignableFoldersSelected() {\n    return this.projectFolderCheckboxesTargets.some((checkbox) => {\n      if (checkbox.checked) {\n        return checkbox.dataset.assignableToCompany !== \"true\";\n      }\n      return false;\n    });\n  }\n\n  get anyNonCoworkerAssignableFoldersSelected() {\n    return this.projectFolderCheckboxesTargets.some((checkbox) => {\n      if (checkbox.checked) {\n        return checkbox.dataset.assignableToCoworker !== \"true\";\n      }\n      return false;\n    });\n  }\n\n  anyCheckboxHasTrueValue(checkboxes, dataAttribute) {\n    return checkboxes.some((checkbox) => {\n      if (checkbox.checked) {\n        return checkbox.dataset[dataAttribute] === \"true\";\n      } else {\n        return false;\n      }\n    });\n  }\n\n  toggleSelectAll(event) {\n    const checkbox = event.currentTarget;\n    if (checkbox.checked) {\n      track({ category: \"Bulk Action\", action: \"select all\", label: \"Projects\" });\n    }\n    const projectFolderCheckboxes = this.projectFolderCheckboxesTargets;\n    projectFolderCheckboxes.forEach((projectFolderCheckbox) => {\n      projectFolderCheckbox.checked = checkbox.checked;\n      const projectTr = projectFolderCheckbox.closest(\"tr\");\n      this.toggleProjectTrStyle(checkbox, projectTr);\n    });\n    this.updateSelectedActionLinkStatuses();\n  }\n\n  toggleProjectTrStyle(checkbox, tr) {\n    const meth = checkbox.checked ? \"add\" : \"remove\";\n    tr.classList[meth](\"selected\");\n  }\n\n  updateSelectedActionLinkStatuses() {\n    const meth = this.anyCheckboxesSelected ? \"remove\" : \"add\";\n    this.selectedProjectsActionLinksTargets.forEach((link) => {\n      const disableForNonBulkShare =\n        link.dataset.bulkShareOnly === \"true\" && this.anyNonBulkShareEligibleFoldersSelected;\n      const disableForNonGen4 = link.dataset.gen4Only === \"true\" && this.anyNonGen4FoldersSelected;\n      const disableForProposals = link.dataset.disableForProposals === \"true\" && this.anyProposalsSelected;\n      const disableForNonCompanyAssignable =\n        link.dataset.assignableToCompanyOnly === \"true\" && this.anyNonCompanyAssignableFoldersSelected;\n      const disableForNonCoworkerAssignable =\n        link.dataset.assignableToCoworkerOnly === \"true\" && this.anyNonCoworkerAssignableFoldersSelected;\n\n      if (\n        disableForNonBulkShare ||\n        disableForNonGen4 ||\n        disableForProposals ||\n        disableForNonCompanyAssignable ||\n        disableForNonCoworkerAssignable\n      ) {\n        link.classList.add(\"disabled\");\n        let tooltip;\n        if (disableForNonBulkShare || disableForNonGen4) {\n          tooltip = \"Only BX, FR, GB, and PR projects are eligible for this action\";\n        } else if (disableForNonCompanyAssignable) {\n          tooltip = \"Only projects you own that aren't already assigned to a company are eligible for this action\";\n        } else if (disableForNonCoworkerAssignable) {\n          tooltip =\n            \"Only projects already assigned to your company (excluding permit-pack and OpenSolar projects) are eligible for this action\";\n        } else {\n          tooltip = \"Proposal projects are not eligible for this action\";\n        }\n        link.setAttribute(\"data-controller\", \"components--ir-tooltip\");\n        link.setAttribute(\"data-components--ir-tooltip-show-message-if-disabled-value\", true);\n        link.setAttribute(\"data-components--ir-tooltip-content-value\", tooltip);\n      } else {\n        link.classList[meth](\"disabled\");\n        link.removeAttribute(\"data-controller\");\n        link.removeAttribute(\"data-components--ir-tooltip-show-message-if-disabled-value\");\n        link.removeAttribute(\"data-components--ir-tooltip-content-value\");\n      }\n    });\n  }\n\n  toggleSelect(event) {\n    const checkbox = event.currentTarget;\n    const projectTr = checkbox.closest(\"tr\");\n    this.toggleProjectTrStyle(checkbox, projectTr);\n    this.updateSelectedActionLinkStatuses();\n    this.selectAllCheckboxTarget.checked = this.allCheckboxesSelected;\n  }\n\n  toggleDetails(event) {\n    event.preventDefault();\n    const link = event.currentTarget;\n    const detailsTr = link.closest(\"tr\").nextElementSibling;\n    const hidden = detailsTr.style.display === \"none\";\n\n    if (hidden) {\n      this.showDetails(detailsTr);\n      this.toggleDetailsIcon(link, \"up\");\n    } else {\n      this.hideDetails(detailsTr);\n      this.toggleDetailsIcon(link, \"down\");\n    }\n\n    track({ category: \"Project\", action: hidden ? \"expand\" : \"collapse\", label: link.dataset.type });\n  }\n\n  toggleDetailsIcon(link, direction) {\n    const i = link.querySelector(\"i\");\n    let meth = direction === \"up\" ? \"add\" : \"remove\";\n    i.classList[meth](\"rotated-up\");\n  }\n\n  showDetails(detailsTr) {\n    detailsTr.style.display = \"table-row\";\n    detailsTr.style.opacity = 0;\n    anime(detailsTr, {\n      opacity: 1,\n      ease: \"outQuad\",\n      duration: 500,\n    });\n  }\n\n  hideDetails(detailsTr) {\n    anime(detailsTr, {\n      opacity: 0,\n      ease: \"inQuad\",\n      duration: 250,\n      onComplete: () => {\n        detailsTr.style.display = \"none\";\n      },\n    });\n  }\n\n  trackClearSearch() {\n    track({ category: \"Bulk Action\", action: \"clear search\", label: \"Projects\" });\n  }\n\n  trackSearch() {\n    track({ category: \"Bulk Action\", action: \"search\", label: \"Projects\" });\n  }\n\n  trackTypeFilterChange() {\n    track({ category: \"Bulk Action\", action: \"filter type\", label: \"Projects\" });\n  }\n\n  trackScopeFilterChange() {\n    track({ category: \"Bulk Action\", action: \"filter scope\", label: \"Projects\" });\n  }\n\n  trackNewProjectLinkClick(event) {\n    const link = event.currentTarget;\n    const projectType = link.dataset.type;\n    track({ category: \"Project\", action: \"create\", label: projectType });\n  }\n\n  trackProjectActionClick(event) {\n    const link = event.currentTarget;\n    const projectType = link.dataset.type;\n    const category = link.dataset.trackCategory;\n    const action = link.dataset.trackAction;\n    track({ category, action, label: projectType });\n  }\n\n  getLoginDialogPosition() {\n    // Get the viewport dimensions\n    const width = window.innerWidth;\n    const height = window.innerHeight;\n\n    const y = Math.max(0.35 * height, 200);\n\n    return { x: width / 2, y };\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport Rails from \"@rails/ujs\";\nimport { defaultHeaders } from \"../../helpers/api\";\nimport { alertDialog } from \"../components/ir_dialog/helper\";\nimport { runScriptResponse } from \"../../helpers/run-script\";\n\nexport default class extends Controller {\n  static targets = [\"projectFolderIds\", \"discount\"];\n\n  get projectFolderIds() {\n    return this.projectFolderIdsTargets.map((t) => t.value);\n  }\n\n  download(e) {\n    const actionKey = e.currentTarget.dataset.actionKey;\n    e.currentTarget.classList.add(\"ir-btn--spinner-shown\");\n    setTimeout(() => {\n      fetch(this.#consolidatedBomUrl(actionKey), {\n        // This endpoint answers with either the file (send_data) or new.js.erb\n        // for a validation error, so prefer js but accept anything: it makes\n        // the error branch negotiate explicitly instead of relying on Rails\n        // finding the only template that exists.\n        headers: { ...defaultHeaders(), Accept: \"text/javascript, */*\" },\n      }).then((response) => this.#downloadFileOrRenderValidationError(response));\n    }, 200);\n  }\n\n  #consolidatedBomUrl(action) {\n    const discountParam = `consolidated_bom[discount]=${this.discountTarget.value}`;\n    const projectFolderIdParams = this.projectFolderIds\n      .map((id) => `consolidated_bom[project_folder_ids][]=${id}`)\n      .join(\"&\");\n    return `/consolidated_boms/${action}?${projectFolderIdParams}&${discountParam}`;\n  }\n\n  #downloadFileOrRenderValidationError(response) {\n    if (!response.ok) {\n      const title = `Server Error (${response.status})`;\n      const message =\n        \"<p>We encountered a server error while trying to process your request. An admin has been notified of the problem.  We apologize for the inconvenience.</p>\";\n\n      alertDialog(message, () => {}, {\n        title,\n        headerColor: \"red\",\n        confirmBtnColor: \"red\",\n      });\n      return;\n    }\n\n    /*\n     * When successful, the response, which the Rails controller generates with `send_data` can\n     * be converted to a blob in JS, which is a file-like object.  Check out https://developer.mozilla.org/en-US/docs/Web/API/Blob for more info.\n     * Blobs can be sent in to window.URL.createObjectURL() to create a URL to download the file (for example, blob://abcd-randomly-generated-uuid-1234).\n     * Once we have this URL, we can then add an invisible anchor tag to the DOM, set it's `href` attribute to the URL,\n     * and then simulate a click on the anchor tag to initiate the file download.\n     *\n     * If there's a validation error, then the controllers render javascript (from new.js.erb), which we run by `eval`ing the response.\n     */\n    const contentDisposition = response.headers.get(\"Content-Disposition\");\n    if (contentDisposition && contentDisposition.includes(\"attachment\")) {\n      const filename = contentDisposition.match(/filename=\"(.*)\";/)[1];\n      response.blob().then((blob) => {\n        const url = window.URL.createObjectURL(blob);\n        const a = document.createElement(\"a\");\n        a.style.display = \"none\";\n        a.href = url;\n        a.download = filename;\n        document.body.appendChild(a);\n        a.click();\n        window.URL.revokeObjectURL(url);\n        document.body.removeChild(a);\n\n        /* A call to /consolidated_boms/new does two things:\n         * 1. It resets the spinner on the download button\n         * 2. If a validation error exists from a previous submit and the user performs a valid download, it removes the error messages.\n         */\n        Rails.ajax({ type: \"GET\", url: this.#consolidatedBomUrl(\"new\") });\n      });\n    } else {\n      runScriptResponse(response);\n    }\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport * as animate from \"../helpers/animate\";\n\nexport default class extends Controller {\n  static targets = [\"showOnSubmit\"];\n\n  submit(_event) {\n    this.showOnSubmitTargets.forEach((element) => {\n      animate.show(element);\n    });\n\n    this.element.requestSubmit();\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\n\nexport default class extends Controller {\n  static targets = [\"ulStatus\"];\n  static values = {\n    originalUlStatus: String,\n  };\n\n  connect() {\n    this.ulStatusTarget.textContent = this.originalUlStatusValue;\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport { showDialogWithIdentifier, hideDialog, lookupDialog, confirmDialog } from \"./components/ir_dialog/helper\";\n\nconst PANEL_IDS_INPUT_NAME = \"panel_ids[]\";\nconst SHARE_DIALOG_ID = \"share_panels_dialog\";\nconst DIALOG_BODY_ID = \"share_panels_dialog_body\";\nconst ERRORS_REGION_ID = \"share_panels_dialog_errors\";\nconst EMAIL_REGEX = /^[\\w+\\-.]+@[a-z\\d-]+(\\.[a-z\\d-]+)*\\.[a-z]+$/i;\n\nexport default class extends Controller {\n  static targets = [\"shareSelectedButton\", \"deleteSelectedButton\", \"selectAll\", \"rowCheckbox\"];\n\n  #originalDialogBodyHtml = null;\n\n  connect() {\n    const body = document.getElementById(DIALOG_BODY_ID);\n    if (body) this.#originalDialogBodyHtml = body.innerHTML;\n  }\n\n  shareSingle(event) {\n    const id = event.params.panelId;\n    const name = event.params.panelName;\n    this.#prepareAndOpenDialog([{ id, name }]);\n  }\n\n  shareSelected(event) {\n    event?.preventDefault();\n    const link = event?.currentTarget;\n    if (link?.classList?.contains(\"disabled\")) return;\n    const selections = this.#checkedPanelSelections();\n    if (selections.length === 0) return;\n    this.#prepareAndOpenDialog(selections);\n  }\n\n  deleteSelected(event) {\n    event?.preventDefault();\n    const link = event?.currentTarget;\n    if (link?.classList?.contains(\"disabled\")) return;\n    const selections = this.#checkedPanelSelections();\n    if (selections.length === 0) return;\n    const word = selections.length === 1 ? \"panel\" : \"panels\";\n    confirmDialog(`Delete ${selections.length} custom ${word}? This cannot be undone.`, (confirmed) => {\n      if (confirmed) this.#submitBulkDelete(selections.map((s) => s.id));\n    });\n  }\n\n  updateBulkButton() {\n    const checked = this.#checkedPanelSelections().length;\n    const total = this.rowCheckboxTargets.length;\n    this.shareSelectedButtonTarget.classList.toggle(\"disabled\", checked === 0);\n    if (this.hasDeleteSelectedButtonTarget) {\n      this.deleteSelectedButtonTarget.classList.toggle(\"disabled\", checked === 0);\n    }\n    if (this.hasSelectAllTarget) {\n      this.selectAllTarget.checked = checked > 0 && checked === total;\n      this.selectAllTarget.indeterminate = checked > 0 && checked < total;\n    }\n  }\n\n  validateBeforeSubmit(event) {\n    const form = event.currentTarget;\n    const value = form.querySelector('input[name=\"email\"]')?.value?.trim() ?? \"\";\n    this.#clearError();\n    const error = this.#validateEmail(value);\n    if (!error) return;\n    event.preventDefault();\n    this.#showError(error);\n    this.#resetSubmitSpinner(form);\n  }\n\n  onSubmitEnd(event) {\n    if (!event.detail?.success) return;\n    const dialog = lookupDialog(SHARE_DIALOG_ID);\n    if (dialog) hideDialog(dialog);\n  }\n\n  #prepareAndOpenDialog(selections) {\n    const body = document.getElementById(DIALOG_BODY_ID);\n    if (body && this.#originalDialogBodyHtml !== null) {\n      body.innerHTML = this.#originalDialogBodyHtml;\n    }\n    this.#setPanelIds(selections.map((s) => s.id));\n    this.#setHeadingAndSummary(selections);\n    showDialogWithIdentifier(SHARE_DIALOG_ID);\n  }\n\n  #checkedPanelSelections() {\n    return this.rowCheckboxTargets\n      .filter((cb) => cb.checked)\n      .map((cb) => ({\n        id: cb.value,\n        name: cb.dataset.panelShareNameParam || \"\",\n      }));\n  }\n\n  #setPanelIds(ids) {\n    const container = document.querySelector(`#${DIALOG_BODY_ID} [data-panel-share-target=\"panelIdsContainer\"]`);\n    if (!container) return;\n    container.innerHTML = \"\";\n    for (const id of ids) {\n      const input = document.createElement(\"input\");\n      input.type = \"hidden\";\n      input.name = PANEL_IDS_INPUT_NAME;\n      input.value = id;\n      container.appendChild(input);\n    }\n  }\n\n  #setHeadingAndSummary(selections) {\n    const heading = document.querySelector(`#${DIALOG_BODY_ID} [data-panel-share-target=\"heading\"]`);\n    const summaryList = document.querySelector(`#${DIALOG_BODY_ID} [data-panel-share-target=\"summaryList\"]`);\n    if (!heading || !summaryList) return;\n    if (selections.length === 1) {\n      heading.textContent = `Share: ${selections[0].name}`;\n      summaryList.hidden = true;\n      summaryList.innerHTML = \"\";\n    } else {\n      heading.textContent = `Sharing ${selections.length} custom panels:`;\n      summaryList.hidden = false;\n      summaryList.innerHTML = selections.map((s) => `<li>${this.#escape(s.name)}</li>`).join(\"\");\n    }\n  }\n\n  #escape(text) {\n    const div = document.createElement(\"div\");\n    div.textContent = text;\n    return div.innerHTML;\n  }\n\n  #validateEmail(value) {\n    if (value === \"\") return \"Recipient email can't be blank.\";\n    if (!EMAIL_REGEX.test(value)) return \"Recipient email is not a valid email address.\";\n    return null;\n  }\n\n  #showError(message) {\n    const region = document.getElementById(ERRORS_REGION_ID);\n    if (!region) return;\n    const safe = this.#escape(message);\n    region.innerHTML = `\n      <div class=\"ir-alert__container\" data-controller=\"components--ir-alert\" data-components--ir-alert-target=\"container\">\n        <div class=\"ir-alert ir-alert--error\">\n          <button class=\"ir-alert__close-btn\" data-action=\"components--ir-alert#close\" type=\"button\">&times;</button>\n          <h3>Could not share</h3>\n          <ul><li>${safe}</li></ul>\n        </div>\n      </div>\n    `;\n  }\n\n  #clearError() {\n    const region = document.getElementById(ERRORS_REGION_ID);\n    if (region) region.innerHTML = \"\";\n  }\n\n  #resetSubmitSpinner(form) {\n    const btn = form.querySelector('button[type=\"submit\"], input[type=\"submit\"]');\n    if (btn) btn.classList.remove(\"ir-btn--spinner-shown\");\n  }\n\n  #submitBulkDelete(ids) {\n    const form = document.createElement(\"form\");\n    form.method = \"POST\";\n    form.action = \"/my_custom_panels/bulk\";\n    form.style.display = \"none\";\n    const csrf = document.querySelector('meta[name=\"csrf-token\"]')?.content;\n    if (csrf) {\n      form.insertAdjacentHTML(\"beforeend\", `<input type=\"hidden\" name=\"authenticity_token\" value=\"${csrf}\">`);\n    }\n    form.insertAdjacentHTML(\"beforeend\", '<input type=\"hidden\" name=\"_method\" value=\"delete\">');\n    for (const id of ids) {\n      form.insertAdjacentHTML(\"beforeend\", `<input type=\"hidden\" name=\"panel_ids[]\" value=\"${id}\">`);\n    }\n    document.body.appendChild(form);\n    form.requestSubmit();\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport { hideDialog } from \"../components/ir_dialog/helper\";\n\nexport default class extends Controller {\n  static outlets = [\"pr--roof-information\"];\n\n  accept() {\n    this.prRoofInformationOutlet.acceptCorruslideRequirements();\n    this.closeDialog();\n  }\n\n  chooseDifferentAttachment() {\n    this.prRoofInformationOutlet.resetAttachmentSelection();\n    this.closeDialog();\n  }\n\n  closeDialog() {\n    // Find the actual dialog element (parent with data-dialog-identifier)\n    const dialogElement = this.element.closest(\"[data-dialog-identifier]\");\n    hideDialog(dialogElement);\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport { hideDialog } from \"../components/ir_dialog/helper\";\n\nexport default class extends Controller {\n  static outlets = [\"pr--roof-information\"];\n\n  accept() {\n    this.prRoofInformationOutlet.acceptQuickGrip();\n    this.closeDialog();\n  }\n\n  decline() {\n    this.prRoofInformationOutlet.declineQuickGrip();\n    this.closeDialog();\n  }\n\n  closeDialog() {\n    const dialogElement = this.element.closest(\"[data-dialog-identifier]\");\n    hideDialog(dialogElement);\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport * as animate from \"../../helpers/animate\";\n\nconst FLORIDA_716_APPROVAL_SMALL_PANEL_THRESHOLD = 67.5;\n\nexport default class extends Controller {\n  static targets = [\"floridaDeclineTrue\", \"railsPerRowContainer\"];\n  static values = {\n    allowed: Boolean,\n    asce: String,\n    panelLength: Number,\n    railType: String,\n  };\n\n  engineeringChanged(_event) {\n    if (!this.allowedValue) return;\n\n    this.#showHideRailsPerRow();\n  }\n\n  #showHideRailsPerRow() {\n    const panelLength = this.panelLengthValue;\n    const floridaDeclined = this.floridaDeclineTrueTarget.checked;\n    const showRailsPerRow =\n      floridaDeclined || this.railTypeValue === \"XR10\" || panelLength > FLORIDA_716_APPROVAL_SMALL_PANEL_THRESHOLD;\n\n    if (showRailsPerRow) {\n      animate.show(this.railsPerRowContainerTarget);\n    } else {\n      animate.hide(this.railsPerRowContainerTarget);\n    }\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport {\n  defaultEditorMode,\n  GRAPHICAL_TOOL_EDITOR_MODE_CONTOUR,\n  GRAPHICAL_TOOL_EDITOR_MODE_LAYOUT,\n  storeEditorMode,\n} from \"../../helpers/graphical-tool-helpers\";\n\nexport default class extends Controller {\n  static values = {\n    roofSectionId: Number,\n    arrayEditingAllowed: Boolean,\n    contourEditingAllowed: Boolean,\n  };\n\n  static targets = [\"layoutOptionBtn\", \"contourOptionBtn\"];\n\n  activeClass = \"graphical-tool__toolbar__button--active\";\n\n  connect() {\n    const editorMode = defaultEditorMode({\n      roofSectionId: this.roofSectionIdValue,\n      contourEditingAllowed: this.contourEditingAllowedValue,\n      arrayEditingAllowed: this.arrayEditingAllowedValue,\n    });\n\n    if (editorMode === GRAPHICAL_TOOL_EDITOR_MODE_CONTOUR) {\n      this.layoutOptionBtnTarget.classList.remove(this.activeClass);\n      this.contourOptionBtnTarget.classList.add(this.activeClass);\n      storeEditorMode({ roofSectionId: this.roofSectionIdValue, editorMode });\n    }\n  }\n\n  changeModeToLayout(event) {\n    event.preventDefault();\n    this.#setActivityOfOptionBtns(event);\n    this.#graphicalToolController.changeModeToLayout();\n    storeEditorMode({ roofSectionId: this.roofSectionIdValue, editorMode: GRAPHICAL_TOOL_EDITOR_MODE_LAYOUT });\n  }\n\n  changeModeToContour(event) {\n    event.preventDefault();\n\n    const element = event.currentTarget;\n    const elementIsDisabled = element.disabled || element.className.match(/--disabled/);\n    if (elementIsDisabled) return;\n\n    this.#setActivityOfOptionBtns(event);\n    this.#graphicalToolController.changeModeToContour();\n    storeEditorMode({ roofSectionId: this.roofSectionIdValue, editorMode: GRAPHICAL_TOOL_EDITOR_MODE_CONTOUR });\n  }\n\n  #setActivityOfOptionBtns(event) {\n    [this.layoutOptionBtnTarget, this.contourOptionBtnTarget].forEach((target) => {\n      if (target.classList.contains(this.activeClass)) target.classList.remove(this.activeClass);\n    });\n    event.currentTarget.classList.add(this.activeClass);\n  }\n\n  get #graphicalToolController() {\n    const controllerElement = document.querySelector(\n      `[data-identifier='graphicalLayoutTool-${this.roofSectionIdValue}']`,\n    );\n\n    return controllerElement.controller;\n  }\n}\n", "export function linkFeatureToModel(feature, model) {\n  feature.set(\"uuid\", model.uuid);\n  feature.set(\"dataType\", model.dataType);\n  feature.set(\"illegalShape\", model.illegalShape);\n  feature.set(\"identifier\", model.identifier);\n}\n", "import { removeFeaturesMatchingUuid } from \"../../da/map/ol-helpers\";\n\nexport function removeFeaturesForRoofPlane(roofPlane, mapManager) {\n  removeFeaturesMatchingUuid(mapManager.roofPlanesVectorSource, roofPlane.uuid);\n}\n", "import { fromLonLat } from \"ol/proj\";\n\nimport { linkFeatureToModel } from \"./base\";\nimport RoofPlaneLegalityChecker from \"../../../da/map/legality-checkers/roof-plane\";\nimport { removeFeaturesForRoofPlane } from \"../ol-helpers\";\nimport {\n  calculateUnitPerpendicularEdgeVectorLatLng,\n  cartesianPointRelativeTo,\n  setCartesianPointsForModelRelativeToOrigin,\n  cartesianPointsRelativeToOrigin,\n} from \"../../../da/map/ol-geometry\";\nimport CartesianModel from \"../../../da/models/cartesian-model\";\n\nconst EAVE_ENDPOINT_MATCH_TOLERANCE_DEGREES = 1e-9;\n\nexport function createRoofPlane(rpFeature, project, mapModelSynchronizer, mapManager) {\n  const roofPlane = project.addRoofPlane({});\n  linkFeatureToModel(rpFeature, roofPlane);\n\n  mapModelSynchronizer.updateRoofPlaneLatLngFromFeature(rpFeature);\n  new RoofPlaneLegalityChecker(mapManager.roofPlanesFeatures, mapModelSynchronizer).markIllegalPolygons(rpFeature);\n}\n\nexport function modifyRoofPlane(rpFeature, mapModelSynchronizer, mapManager) {\n  repositionRoofPlane(rpFeature, mapModelSynchronizer, mapManager);\n  mapManager.forceRedrawRoofPlanes();\n}\n\nexport function repositionRoofPlane(rpFeature, mapModelSynchronizer, mapManager) {\n  const roofPlane = mapModelSynchronizer.getRoofPlaneForFeature(\n    rpFeature,\n    \"PrRoofPlaneModificationHelper.repositionRoofPlane\",\n  );\n  const previousEaveEdge = roofPlane ? previousEaveEdgeIdentity(roofPlane) : null;\n\n  mapModelSynchronizer.updateRoofPlaneLatLngFromFeature(rpFeature);\n\n  if (previousEaveEdge) reconcileEaveEdgeIndex(roofPlane, previousEaveEdge);\n\n  new RoofPlaneLegalityChecker(mapManager.roofPlanesFeatures, mapModelSynchronizer).markIllegalPolygons();\n}\n\nexport function deleteRoofPlane(rpFeature, project, mapModelSynchronizer, mapManager) {\n  const roofPlane = mapModelSynchronizer.getRoofPlaneForFeature(\n    rpFeature,\n    \"PrRoofPlaneModificationHelper.deleteRoofPlane\",\n  );\n\n  if (!roofPlane) {\n    console.log(\"Deleted feature not a polygon. Skipping.\");\n    return;\n  }\n\n  removeFeaturesForRoofPlane(roofPlane, mapManager);\n\n  if (roofPlane.id) {\n    // this also flags its roof sections for deletion\n    roofPlane.flagDeleted();\n  } else {\n    // currently an unsaved roof plane can't have any roof sections\n    // but this method will remove them automatically if future code\n    // allows them to be created (e.g. with a default setback)\n    project.destroyRoofPlane(roofPlane);\n  }\n\n  // This is less efficient if multiple roof planes are being deleted, but it's cleaner\n  // because we can be confident that each call to deleteRoofPlane will leave things in\n  // a valid final state.\n  new RoofPlaneLegalityChecker(mapManager.roofPlanesFeatures, mapModelSynchronizer).markIllegalPolygons();\n  project.resequenceRoofPlanesIdentifiers();\n  mapModelSynchronizer.syncIdentifiersOnFeatures();\n}\n\nexport function setRoofPlaneEaveValues(roofPlane, eaveEdgeIndex) {\n  roofPlane.setEaveEdgeIndex(eaveEdgeIndex);\n  const originLonLat = roofPlane.project.detail.originLatLng.toLonLat;\n  setCartesianCoordinatesForRoofPlaneAndChildren(roofPlane, originLonLat);\n}\n\nexport function setRoofPlaneEaveLatLngValues(roofPlane) {\n  const eaveCoordinates = roofPlane.eaveLatLngPoints.map((p) => fromLonLat(p.toLonLat));\n  const [midpointLatLng, unitPerpendicularEdgeVectorLatLng, unitEdgeVectorLatLng] =\n    calculateUnitPerpendicularEdgeVectorLatLng(eaveCoordinates[0], eaveCoordinates[1]);\n\n  roofPlane.setEaveMidpointLatLng({ lat: midpointLatLng.lat, lng: midpointLatLng.lng });\n  roofPlane.setEaveEdgeVectorLatLng({ lat: unitEdgeVectorLatLng.lat, lng: unitEdgeVectorLatLng.lng });\n  roofPlane.setEavePerpendicularEdgeVectorLatLng({\n    lat: unitPerpendicularEdgeVectorLatLng.lat,\n    lng: unitPerpendicularEdgeVectorLatLng.lng,\n  });\n}\n\nexport function setCartesianCoordinatesForRoofPlaneAndChildren(roofPlane, originLonLat) {\n  setCartesianPointsForModelRelativeToOrigin(originLonLat, roofPlane);\n  if (roofPlane.hasEaveEdge) {\n    setRoofPlaneEaveLatLngValues(roofPlane);\n    setRoofPlaneEaveCartesianPoints(roofPlane, originLonLat);\n  }\n\n  const repositionedBoundingBoxCartesianPoints = cartesianPointsRelativeToOrigin(originLonLat, roofPlane.boundingBox);\n  roofPlane.setBoundingBoxCartesianPoints(repositionedBoundingBoxCartesianPoints);\n\n  roofPlane.roofSections.forEach((roofSection) => {\n    setCartesianPointsForModelRelativeToOrigin(originLonLat, roofSection);\n\n    roofSection.segments.forEach((segment) => {\n      const startCartesianPoint = cartesianPointRelativeTo(segment.startLatLng.toLonLat, originLonLat);\n      segment.setStartCartesianPoint(startCartesianPoint);\n      segment.thermalExpansions.forEach((te) => {\n        const teStartCartesianPoint = cartesianPointRelativeTo(te.startLatLng.toLonLat, originLonLat);\n        te.setStartCartesianPoint(teStartCartesianPoint);\n      });\n      segment.adjoinments.forEach((adjoinment) => {\n        adjoinment.clearCartesianPoints();\n        const cartesianPoints = adjoinment.latLngPoints.map((ll) => {\n          return cartesianPointRelativeTo(ll.toLonLat, originLonLat);\n        });\n        adjoinment.setCartesianPoints(cartesianPoints);\n      });\n      segment.contourLegalityAdjoinments.forEach((adjoinment) => {\n        adjoinment.clearCartesianPoints();\n        const cartesianPoints = adjoinment.latLngPoints.map((ll) => {\n          return cartesianPointRelativeTo(ll.toLonLat, originLonLat);\n        });\n        adjoinment.setCartesianPoints(cartesianPoints);\n      });\n      segment.contours.forEach((contour) => {\n        contour.clearCartesianPoints();\n        const cartesianPoints = contour.latLngPoints.map((ll) => {\n          return cartesianPointRelativeTo(ll.toLonLat, originLonLat);\n        });\n        contour.setCartesianPoints(cartesianPoints);\n      });\n    });\n  });\n}\n\nexport function setRoofPlaneEaveCartesianPoints(roofPlane, originLonLat) {\n  const eaveMidpointCartesianPoint = cartesianPointRelativeTo(roofPlane.eaveMidpointLatLng.toLonLat, originLonLat);\n  roofPlane.setEaveMidpointCartesianPoint(eaveMidpointCartesianPoint);\n  const eaveCartesianPoints = roofPlane.eaveCartesianPoints;\n  const eaveEdgeVectorMagnitude = eaveCartesianPoints[1].distanceTo(eaveCartesianPoints[0]);\n  const eaveEdgeVectorCartesianPoint = eaveCartesianPoints[1]\n    .minus(eaveCartesianPoints[0])\n    .dividedBy(eaveEdgeVectorMagnitude);\n  roofPlane.setEaveEdgeVectorCartesianPoint(eaveEdgeVectorCartesianPoint);\n  const eavePerpendicularEdgeVectorCartesianPoint = CartesianModel.create({\n    x: eaveEdgeVectorCartesianPoint.y * -1,\n    y: eaveEdgeVectorCartesianPoint.x,\n  });\n  roofPlane.setEavePerpendicularEdgeVectorCartesianPoint(eavePerpendicularEdgeVectorCartesianPoint);\n}\n\nfunction previousEaveEdgeIdentity(roofPlane) {\n  if (!roofPlane.hasEaveEdge) return null;\n\n  const [start, end] = roofPlane.eaveLatLngPoints;\n\n  return {\n    start: start.toObjectLiteral,\n    end: end.toObjectLiteral,\n    pointCount: roofPlane.latLngPoints.length,\n  };\n}\n\nfunction reconcileEaveEdgeIndex(roofPlane, previousEaveEdge) {\n  if (edgeAtIndexMatches(roofPlane, roofPlane.eaveEdgeIndex, previousEaveEdge)) return;\n\n  const matchedIndex = indexOfMatchingEdge(roofPlane, previousEaveEdge);\n  if (matchedIndex !== null) {\n    roofPlane.setEaveEdgeIndex(matchedIndex);\n    return;\n  }\n\n  // Same vertex count means the vertices moved and the eave edge was reshaped, not removed.\n  if (roofPlane.latLngPoints.length === previousEaveEdge.pointCount) return;\n\n  roofPlane.clearEaveValues();\n}\n\nfunction indexOfMatchingEdge(roofPlane, previousEaveEdge) {\n  for (let index = 0; index < roofPlane.latLngPoints.length - 1; index += 1) {\n    if (edgeAtIndexMatches(roofPlane, index, previousEaveEdge)) return index;\n  }\n\n  return null;\n}\n\nfunction edgeAtIndexMatches(roofPlane, index, { start, end }) {\n  const edgeStart = roofPlane.latLngPoints[index];\n  const edgeEnd = roofPlane.latLngPoints[index + 1];\n  if (!edgeStart || !edgeEnd) return false;\n\n  return (\n    (latLngsMatch(edgeStart, start) && latLngsMatch(edgeEnd, end)) ||\n    (latLngsMatch(edgeStart, end) && latLngsMatch(edgeEnd, start))\n  );\n}\n\nfunction latLngsMatch(first, second) {\n  return (\n    Math.abs(first.lat - second.lat) < EAVE_ENDPOINT_MATCH_TOLERANCE_DEGREES &&\n    Math.abs(first.lng - second.lng) < EAVE_ENDPOINT_MATCH_TOLERANCE_DEGREES\n  );\n}\n", "import {\n  cartesianPointRelativeTo,\n  findTopLeftLonLat,\n  setCartesianPointsForModelRelativeToOrigin,\n} from \"../../../da/map/ol-geometry\";\nimport { setCartesianCoordinatesForRoofPlaneAndChildren, setRoofPlaneEaveCartesianPoints } from \"./roof-plane\";\n\nconst ORIGIN_MATCH_TOLERANCE_DEGREES = 1e-9;\n\nexport function updateProjectOriginAndCartesianCoordinatesForChildren(project) {\n  setProjectOrigin(project);\n  setCartesianCoordinatesForProjectChildren(project);\n}\n\nfunction derivedOriginLatLng(project) {\n  if (project.notDeletedRoofPlanes.length === 0) return null;\n\n  const roofPlaneLatLngs = project.notDeletedRoofPlanes.flatMap((roofPlane) => {\n    return roofPlane.latLngPoints;\n  });\n\n  const [lng, lat] = findTopLeftLonLat(roofPlaneLatLngs);\n\n  return { lat, lng };\n}\n\nfunction setProjectOrigin(project) {\n  project.detail.setOriginLatLng(derivedOriginLatLng(project));\n\n  return project.detail.originLatLng;\n}\n\nfunction projectOriginMatchesRoofPlanes(project) {\n  const storedOriginLatLng = project.detail.originLatLng;\n  const expectedOriginLatLng = derivedOriginLatLng(project);\n  if (storedOriginLatLng === null || expectedOriginLatLng === null) {\n    return storedOriginLatLng === null && expectedOriginLatLng === null;\n  }\n\n  return (\n    Math.abs(storedOriginLatLng.lat - expectedOriginLatLng.lat) < ORIGIN_MATCH_TOLERANCE_DEGREES &&\n    Math.abs(storedOriginLatLng.lng - expectedOriginLatLng.lng) < ORIGIN_MATCH_TOLERANCE_DEGREES\n  );\n}\n\nfunction setCartesianCoordinatesForProjectChildren(project) {\n  if (project.detail.originLatLng === null) return;\n\n  const originLonLat = project.detail.originLatLng.toLonLat;\n  project.notDeletedRoofPlanes.forEach((roofPlane) => {\n    setCartesianCoordinatesForRoofPlaneAndChildren(roofPlane, originLonLat);\n  });\n}\n\nexport function recoverProjectCartesianCoordinates(project) {\n  if (!projectOriginMatchesRoofPlanes(project)) {\n    updateProjectOriginAndCartesianCoordinatesForChildren(project);\n    return;\n  }\n\n  setCartesianPointsForProjectIfMissing(project);\n}\n\nfunction setCartesianPointsForProjectIfMissing(project) {\n  if (project.detail.originLatLng === null) return;\n\n  const originLonLat = project.detail.originLatLng.toLonLat;\n  project.notDeletedRoofPlanes.forEach((roofPlane) => {\n    if (roofPlane.cartesianPoints.length === 0) {\n      setCartesianPointsForModelRelativeToOrigin(originLonLat, roofPlane);\n    }\n    if (roofPlane.eaveMidpointCartesianPoint === null && roofPlane.hasEaveEdge) {\n      setRoofPlaneEaveCartesianPoints(roofPlane, originLonLat);\n    }\n\n    roofPlane.roofSections.forEach((roofSection) => {\n      if (roofSection.cartesianPoints.length === 0) {\n        setCartesianPointsForModelRelativeToOrigin(originLonLat, roofSection);\n      }\n\n      roofSection.segments.forEach((segment) => {\n        if (segment.startCartesianPoint === null) {\n          const startCartesianPoint = cartesianPointRelativeTo(segment.startLatLng.toLonLat, originLonLat);\n          segment.setStartCartesianPoint(startCartesianPoint);\n          segment.thermalExpansions.forEach((te) => {\n            if (te.startCartesianPoint === null) {\n              const teStartCartesianPoint = cartesianPointRelativeTo(te.startLatLng.toLonLat, originLonLat);\n              te.setStartCartesianPoint(teStartCartesianPoint);\n            }\n          });\n          if (segment.adjoinments.length > 0) {\n            segment.adjoinments.forEach((adjoinment) => {\n              if (adjoinment.cartesianPoints.length === 0) {\n                const cartesianPoints = adjoinment.latLngPoints.map((ll) => {\n                  return cartesianPointRelativeTo(ll.toLonLat, originLonLat);\n                });\n                adjoinment.setCartesianPoints(cartesianPoints);\n              }\n            });\n          }\n          if (segment.contourLegalityAdjoinments.length > 0) {\n            segment.contourLegalityAdjoinments.forEach((adjoinment) => {\n              if (adjoinment.cartesianPoints.length === 0) {\n                const cartesianPoints = adjoinment.latLngPoints.map((ll) => {\n                  return cartesianPointRelativeTo(ll.toLonLat, originLonLat);\n                });\n                adjoinment.setCartesianPoints(cartesianPoints);\n              }\n            });\n          }\n          if (segment.contours.length > 0) {\n            segment.contours.forEach((contour) => {\n              if (contour.cartesianPoints.length === 0) {\n                const cartesianPoints = contour.latLngPoints.map((ll) => {\n                  return cartesianPointRelativeTo(ll.toLonLat, originLonLat);\n                });\n                contour.setCartesianPoints(cartesianPoints);\n              }\n            });\n          }\n        }\n      });\n    });\n  });\n}\n", "import ProjectModel from \"./project-model\";\nimport { recoverProjectCartesianCoordinates } from \"../map/modification-helpers/project\";\n\nexport function createProjectWithRecoveredCoordinates(projectData) {\n  const project = ProjectModel.create(projectData);\n  recoverProjectCartesianCoordinates(project);\n\n  return project;\n}\n", "/*\tCopyright (c) 2016 Jean-Marc VIGLINO, \n  released under the CeCILL-B license (French BSD license)\n  (http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt).\n*/\n\nimport {unByKey as ol_Observable_unByKey} from 'ol/Observable.js'\nimport ol_layer_Base from 'ol/layer/Base.js'\nimport ol_Object from 'ol/Object.js'\nimport ol_Map from 'ol/Map.js'\n\n/* Namespace */\nvar ol_filter = {};\nexport {ol_filter};\n\n/**\n * @classdesc \n * Abstract base class; normally only used for creating subclasses and not instantiated in apps.    \n * Used to create filters    \n * Use {@link ol_layer_Base#addFilter}, {@link ol_layer_Base#removeFilter} or {@link ol_layer_Base#getFilters}\n * to handle filters on layers.\n *\n * @constructor\n * @extends {ol.Object}\n * @param {Object} options \n *  @param {boolean} [options.active]\n */\nvar ol_filter_Base = class olfilterBase extends ol_Object {\n  constructor(options) {\n    super(options)\n    // Array of postcompose listener\n    this._listener = []\n    if (options && options.active === false) {\n      this.set('active', false)\n    } else {\n      this.set('active', true)\n    }\n  }\n  /** Activate / deactivate filter\n  *\t@param {boolean} b\n  */\n  setActive(b) {\n    this.set('active', b === true)\n  }\n  /** Get filter active\n  *\t@return {boolean}\n  */\n  getActive() {\n    return this.get('active')\n  }\n}\n\n;(function(){\n\n/** Internal function\n * @this {ol.filter} this the filter\n * @private\n */\nfunction precompose_(e) {\n  if (this.get('active') && e.context) this.precompose(e);\n}\n\n/** Internal function\n * @this {ol.filter} this the filter\n * @private\n */\nfunction postcompose_(e) {\n  if (this.get('active') && e.context) this.postcompose(e);\n}\n\n/** Force filter redraw / Internal function\n * @this {ol.Map|ol.layer.Layer} this: the map or layer the filter is added to\n * @private\n */\nfunction filterRedraw_(/* e */) {\n  if (this.renderSync) {\n    try { this.renderSync(); } catch(e) { /* ok */ }\n  } else {\n    this.changed(); \n  }\n}\n\n/** Add a filter to an ol object\n * @this {ol.Map|ol.layer.Layer} this: the map or layer the filter is added to\n * @private\n */\nfunction addFilter_(filter) {\n  if (!this.filters_) this.filters_ = [];\n  this.filters_.push(filter);\n  if (filter.addToLayer) filter.addToLayer(this);\n  if (filter.precompose) filter._listener.push ( { listener: this.on(['precompose','prerender'], precompose_.bind(filter)), target: this });\n  if (filter.postcompose) filter._listener.push ( { listener: this.on(['postcompose','postrender'], postcompose_.bind(filter)), target: this });\n  filter._listener.push ( { listener: filter.on('propertychange', filterRedraw_.bind(this)), target: this });\n  filterRedraw_.call (this);\n}\n\n/** Remove a filter to an ol object\n * @this {ol.Map|ol.layer.Layer} this: the map or layer the filter is added to\n * @private\n */\nfunction removeFilter_(filter) {\n  var i\n  if (!this.filters_) this.filters_ = [];\n  if (!filter) {\n    this.filters_.forEach(function(f) {\n      this.removeFilter(f)\n    }.bind(this))\n    return;\n  }\n  for (i=this.filters_.length-1; i>=0; i--) {\n    if (this.filters_[i]===filter) this.filters_.splice(i,1);\n  }\n  for (i=filter._listener.length-1; i>=0; i--) {\n    // Remove listener on this object\n    if (filter._listener[i].target === this) {\n      if (filter.removeFromLayer) filter.removeFromLayer(this);\n      ol_Observable_unByKey(filter._listener[i].listener);\n      filter._listener.splice(i,1);\n    }\n  }\n  filterRedraw_.call (this);\n}\n\n/** Add a filter to an ol.Map\n*\t@param {ol.filter}\n*/\nol_Map.prototype.addFilter = function (filter) {\n  console.warn('[OL-EXT] addFilter deprecated on map.')\n  addFilter_.call (this, filter);\n};\n/** Remove a filter to an ol.Map\n*\t@param {ol.filter}\n*/\nol_Map.prototype.removeFilter = function (filter) {\n  removeFilter_.call (this, filter);\n};\n/** Get filters associated with an ol.Map\n*\t@return {Array<ol.filter>}\n*/\nol_Map.prototype.getFilters = function () {\n  return this.filters_ || [];\n};\n\n/** Add a filter to an ol.Layer\n*\t@param {ol.filter}\n*/\nol_layer_Base.prototype.addFilter = function (filter) {\n  addFilter_.call (this, filter);\n};\n/** Remove a filter to an ol.Layer\n*\t@param {ol.filter}\n*/\nol_layer_Base.prototype.removeFilter = function (filter) {\n  removeFilter_.call (this, filter);\n};\n\n/** Get filters associated with an ol.Map\n*\t@return {Array<ol.filter>}\n*/\nol_layer_Base.prototype.getFilters = function () {\n  return this.filters_ || [];\n};\n\n})();\n\nexport default ol_filter_Base\n", "/*\tCopyright (c) 2016 Jean-Marc VIGLINO, \n  released under the CeCILL-B license (French BSD license)\n  (http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt).\n*/\n\nimport ol_filter_Base from './Base.js'\nimport {asString as ol_color_asString} from 'ol/color.js'\n\n/** Mask drawing using an ol.Feature\n * @constructor\n * @requires ol_filter\n * @extends {ol_filter_Base}\n * @param {Object} [options]\n *  @param {ol.Feature} [options.feature] feature to mask with\n *  @param {ol.style.Fill} [options.fill] style to fill with\n *  @param {number} [options.shadowWidth=0] shadow width, default no shadow\n *  @param {boolean} [options.shadowMapUnits=false] true if the shadow width is in mapUnits\n *  @param {ol.colorLike} [options.shadowColor='rgba(0,0,0,.5)'] shadow color, default \n *  @param {boolean} [options.inner=false] mask inner, default false\n *  @param {boolean} [options.wrapX=false] wrap around the world, default false\n */\nvar ol_filter_Mask = class olfilterMask extends ol_filter_Base {\n  constructor(options) {\n    options = options || {};\n    super(options);\n    if (options.feature) {\n      switch (options.feature.getGeometry().getType()) {\n        case 'Polygon':\n        case 'MultiPolygon':\n          this.feature_ = options.feature;\n          break;\n        default: break;\n      }\n    }\n    this.set('inner', options.inner);\n    this._fillColor = options.fill ? ol_color_asString(options.fill.getColor()) || 'rgba(0,0,0,0.2)' : 'rgba(0,0,0,0.2)';\n    this._shadowColor = options.shadowColor ? ol_color_asString(options.shadowColor) || 'rgba(0,0,0,0.5)' : 'rgba(0,0,0,0.5)';\n    this.set('shadowWidth', options.shadowWidth || 0);\n    this.set('shadowMapUnits', options.shadowMapUnits === true);\n  }\n  /** Set filter fill color\n   * @param {ol/colorLike} color\n   */\n  setFillColor(color) {\n    this._fillColor = color ? ol_color_asString(color) || 'rgba(0,0,0,0.2)' : 'rgba(0,0,0,0.2)';\n  }\n  /** Set filter shadow color\n   * @param {ol/colorLike} color\n   */\n  setShadowColor(color) {\n    this._shadowColor = color ? ol_color_asString(color) || 'rgba(0,0,0,0.5)' : 'rgba(0,0,0,0.5)';\n  }\n  /** Draw the feature into canvas\n   * @private\n   */\n  drawFeaturePath_(e, out) {\n    var ctx = e.context;\n    var canvas = ctx.canvas;\n    var ratio = e.frameState.pixelRatio;\n    // Transform\n    var tr;\n    if (e.frameState.coordinateToPixelTransform) {\n      var m = e.frameState.coordinateToPixelTransform;\n      // ol > 6\n      if (e.inversePixelTransform) {\n        var ipt = e.inversePixelTransform;\n        tr = function (pt) {\n          pt = [\n            (pt[0] * m[0] + pt[1] * m[1] + m[4]),\n            (pt[0] * m[2] + pt[1] * m[3] + m[5])\n          ];\n          return [\n            (pt[0] * ipt[0] - pt[1] * ipt[1] + ipt[4]),\n            (-pt[0] * ipt[2] + pt[1] * ipt[3] + ipt[5])\n          ];\n        };\n      } else {\n        // ol 5\n        tr = function (pt) {\n          return [\n            (pt[0] * m[0] + pt[1] * m[1] + m[4]) * ratio,\n            (pt[0] * m[2] + pt[1] * m[3] + m[5]) * ratio\n          ];\n        };\n      }\n    } else {\n      // Older version\n      m = e.frameState.coordinateToPixelMatrix;\n      tr = function (pt) {\n        return [\n          (pt[0] * m[0] + pt[1] * m[1] + m[12]) * ratio,\n          (pt[0] * m[4] + pt[1] * m[5] + m[13]) * ratio\n        ];\n      };\n    }\n    // Geometry\n    var ll = this.feature_.getGeometry().getCoordinates();\n    if (this.feature_.getGeometry().getType() === 'Polygon')\n      ll = [ll];\n\n    // Draw feature at dx world\n    function drawll(dx) {\n      for (var l = 0; l < ll.length; l++) {\n        var c = ll[l];\n        for (var i = 0; i < c.length; i++) {\n          var pt = tr([c[i][0][0] + dx, c[i][0][1]]);\n          ctx.moveTo(pt[0], pt[1]);\n          for (var j = 1; j < c[i].length; j++) {\n            pt = tr([c[i][j][0] + dx, c[i][j][1]]);\n            ctx.lineTo(pt[0], pt[1]);\n          }\n        }\n      }\n    }\n\n    ctx.beginPath();\n\n    if (out) {\n      ctx.moveTo(-100, -100);\n      ctx.lineTo(canvas.width + 100, -100);\n      ctx.lineTo(canvas.width + 100, canvas.height + 100);\n      ctx.lineTo(-100, canvas.height + 100);\n      ctx.lineTo(-100, -100);\n    }\n\n    // Draw current world\n    if (this.get('wrapX')) {\n      var worldExtent = e.frameState.viewState.projection.getExtent();\n      var worldWidth = worldExtent[2] - worldExtent[0];\n      var extent = e.frameState.extent;\n      var fExtent = this.feature_.getGeometry().getExtent();\n      var fWidth = fExtent[2] - fExtent[1];\n      var start = Math.floor((extent[0] - fWidth - worldExtent[0]) / worldWidth);\n      var end = Math.floor((extent[2] + fWidth - worldExtent[2]) / worldWidth) + 1;\n      if (start > end) {\n        [start, end] = [end, start];\n      }\n      for (var i = start; i <= end; i++) {\n        drawll(i * worldWidth);\n      }\n    } else {\n      drawll(0);\n    }\n  }\n  /**\n   * @param {ol/Event} e \n   * @private\n   */\n  postcompose(e) {\n    if (!this.feature_) return;\n    var ctx = e.context;\n    ctx.save();\n    this.drawFeaturePath_(e, !this.get('inner'));\n    ctx.fillStyle = this._fillColor;\n    ctx.fill('evenodd');\n    // Draw shadow\n    if (this.get('shadowWidth')) {\n      var width = this.get('shadowWidth') * e.frameState.pixelRatio\n      if (this.get('shadowMapUnits')) width /= e.frameState.viewState.resolution;\n      ctx.clip('evenodd');\n      ctx.filter = 'blur(' + width + 'px)';\n      ctx.strokeStyle = this._shadowColor;\n      ctx.lineCap = 'round';\n      ctx.lineJoin = 'round';\n      ctx.lineWidth = width;\n      ctx.stroke();\n    }\n    ctx.restore();\n  }\n}\n\nexport default ol_filter_Mask\n", "/*\tCopyright (c) 2016 Jean-Marc VIGLINO, \n  released under the CeCILL-B license (French BSD license)\n  (http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt).\n*/\n\nimport ol_filter_Mask from './Mask.js'\n\n/** Crop drawing using an ol.Feature\n * @constructor\n * @requires ol.filter\n * @requires ol_filter_Mask\n * @extends {ol_filter_Mask}\n * @param {Object} [options]\n *  @param {ol.Feature} [options.feature] feature to crop with\n *  @param {number} [options.shadowWidth=0] shadow width, default no shadow\n *  @param {boolean} [options.shadowMapUnits=false] true if the shadow width is in mapUnits\n *  @param {ol.colorLike} [options.shadowColor='rgba(0,0,0,.5)'] shadow color, default \n *  @param {boolean} [options.inner=false] mask inner, default false\n *  @param {boolean} [options.wrapX=false] wrap around the world, default false\n */\nvar ol_filter_Crop = class olfilterCrop extends ol_filter_Mask {\n  constructor(options) {\n    options = options || {};\n    super(options);\n  }\n  /**\n   * @param {ol/Event} e \n   * @private\n   */\n  precompose(e) {\n    if (this.feature_) {\n      var ctx = e.context;\n      ctx.save();\n      this.drawFeaturePath_(e, this.get('inner'));\n      ctx.clip('evenodd');\n    }\n  }\n  /**\n   * @param {ol/Event} e \n   * @private\n   */\n  postcompose(e) {\n    if (this.feature_) {\n      var ctx = e.context;\n      ctx.restore();\n      // Draw shadow\n      if (this.get('shadowWidth')) {\n        ctx.save()\n        var width = this.get('shadowWidth') * e.frameState.pixelRatio\n        if (this.get('shadowMapUnits')) width /= e.frameState.viewState.resolution;\n        this.drawFeaturePath_(e, !this.get('inner'));\n        ctx.clip('evenodd');\n        ctx.filter = 'blur(' + width + 'px)';\n        ctx.strokeStyle = this._shadowColor;\n        ctx.lineCap = 'round';\n        ctx.lineJoin = 'round';\n        ctx.lineWidth = width;\n        ctx.stroke();\n        ctx.restore()\n      }\n    }\n  }\n}\n\nexport default ol_filter_Crop\n", "import { PANEL_DATA_TYPE } from \"../../../da/map/data-types\";\n\n/*\nTakes in segments and panels with selections like this:\n\n    1        1   2        1   2\n  +---+    +---+---+    +---+---+\n1 |   |====|   | \u25A0 |====|   |   |\n  +---+    +---+---+    +---+---+\n2 |   |====|   |   |====|   |   |\n  +---+    +---+---+    +---+---+\n\nand produces a simplified data structure representation that's easier to work with:\n\nsimplifiedRailGroups = [\n  [\n    [[\"O\"], [\"O\", \"X\"], [\"O\", \"O\"]],\n    [[\"O\"], [\"O\", \"O\"], [\"O\", \"O\"]],\n  ]\n]\n*/\nexport function simplifiedRailGroup({ segmentFeatures, allPanelsBySegmentUuid, selectedPanelsBySegmentUuid }) {\n  const segmentsRows = segmentFeatures[0].get(\"model\").rows;\n\n  const segmentRows = Array.from({ length: segmentsRows }).map((_, i) => {\n    const segmentRow = i + 1;\n    return segmentFeatures.map((sf) => {\n      const segmentUuid = sf.get(\"uuid\");\n      const panelFeatures = allPanelsBySegmentUuid[segmentUuid];\n      const selectedPanelFeatures = selectedPanelsBySegmentUuid[segmentUuid] || [];\n      const selectedPanelColumnsInRow = selectedPanelFeatures\n        .filter((pf) => pf.get(\"model\").row === segmentRow)\n        .map((pf) => pf.get(\"model\").column);\n\n      const sortedRowPanels = panelFeatures\n        .filter((pf) => pf.get(\"model\").row === segmentRow)\n        .sort((pfa, pfb) => pfa.get(\"model\").column - pfb.get(\"model\").column);\n      const panelSelectionStatuses = sortedRowPanels.map((pf) => {\n        return selectedPanelColumnsInRow.includes(pf.get(\"model\").column) ? \"X\" : \"O\";\n      });\n      return panelSelectionStatuses;\n    });\n  });\n\n  return segmentRows;\n}\n\n/*\nWhen we go to create new segments after splitting because of a nudge, we need to get the\nsegments' first panel's start lat,lng for rendering.  We use a simplified data structure\nto do the segment splitting, but because the number of panels and relative panel positions\ndon't change we can figure out the consolidated position of the simplified data structure's\nfirst panel for each segment.  We can use these indexes to do a lookup.\n\nThis function creates a similar consolidated grid for actual panel features that are a part\nof the source/before-nudge segments, allowing us to do the look up and get the appropriate\npanel and its start lat,lng.\n\nVisually, from the source segment features like this:\n    1   2        1   2        1   2\n  +---+---+    +---+---+    +---+---+\n1 |   |   |====|   |   |====|   |   |\n  +---+---+    +---+---+    +---+---+\n2 |   |   |====|   |   |====|   |   |\n  +---+---+    +---+---+    +---+---+\n\nWe're creating a consolidated grid of panels like this:\n    1   2   3   4   5   6\n  +---+---+---+---+---+---+\n1 |   |   |   |   |   |   |\n  +---+---+---+---+---+---+\n2 |   |   |   |   |   |   |\n  +---+---+---+---+---+---+\n*/\nexport function railGroupConsolidatedGrid(segmentFeatures, panelsBySegmentUuid) {\n  const gridRows = segmentFeatures[0].get(\"model\").rows;\n  const gridColumns = segmentFeatures.reduce((sum, sf) => sum + sf.get(\"model\").columns, 0);\n  const grid = Array.from({ length: gridRows }).map((_) => Array.from({ length: gridColumns }));\n\n  let columnOffset = 0;\n  segmentFeatures.forEach((segmentFeature, i) => {\n    const panelFeatures = panelsBySegmentUuid[segmentFeature.get(\"uuid\")];\n\n    panelFeatures.forEach((panelFeature) => {\n      const gridRowIndex = panelFeature.get(\"model\").row - 1;\n      const gridColumnIndex = panelFeature.get(\"model\").column + columnOffset - 1;\n      grid[gridRowIndex][gridColumnIndex] = panelFeature;\n    });\n\n    columnOffset += segmentFeature.get(\"model\").columns;\n  });\n  return grid;\n}\n\nexport function allPanelsBySegmentUuid(mapManager) {\n  const { segmentsVectorSource, panelsVectorSource } = mapManager;\n  const allSegmentFeatures = segmentsVectorSource.getFeatures();\n  const allPanelFeatures = panelsVectorSource.getFeatures();\n  const segmentUuids = allSegmentFeatures.map((sf) => sf.get(\"uuid\"));\n  return segmentUuids.reduce((obj, segmentUuid) => {\n    obj[segmentUuid] = allPanelFeatures.filter((pf) => pf.get(\"segmentUuid\") === segmentUuid);\n    return obj;\n  }, {});\n}\n\nexport function selectedPanelsBySegmentUuid(selectInteractionManager) {\n  const selectedPanelFeatures = selectInteractionManager.selectedFeatures;\n  const result = {};\n  if (selectedPanelFeatures.length === 0) return result;\n\n  if (selectedPanelFeatures[0].get(\"dataType\") !== PANEL_DATA_TYPE) {\n    throw \"The select interaction does not contain panels.\";\n  }\n\n  selectedPanelFeatures.forEach((pf) => {\n    const segmentUuid = pf.get(\"segmentUuid\");\n    if (!result[segmentUuid]) result[segmentUuid] = [];\n\n    result[segmentUuid].push(pf);\n  });\n\n  return result;\n}\n\nexport function removeSegmentPanelsFromSelectInteraction(controller, segmentUuid) {\n  const selectInteractionManager = controller.selectInteractionManager;\n  const { selectionCollection } = selectInteractionManager;\n\n  const selectRemovals = [];\n  selectionCollection.forEach((pf) => {\n    if (pf.get(\"segmentUuid\") === segmentUuid) selectRemovals.push(pf);\n  });\n  selectRemovals.forEach((pf) => selectionCollection.remove(pf));\n}\n", "import { Feature } from \"ol\";\nimport Polygon from \"ol/geom/Polygon\";\nimport { fromLonLat } from \"ol/proj\";\nimport { getDistance } from \"ol/sphere\";\n\nimport { THERMAL_EXPANSION_DATA_TYPE } from \"../../../../da/map/data-types\";\nimport { METERS_TO_INCHES } from \"../../../../da/map/ol-geometry\";\n\nexport const DISTANCE_THRESHOLD = 0.01; // inches\n\nexport function createThermalExpansionFeature(thermalExpansion) {\n  const coordinatesLatLng = thermalExpansion.latLngPoints;\n  const coordinates = coordinatesLatLng.map((latLng) => fromLonLat(latLng.toLonLat));\n\n  const geometry = new Polygon([coordinates]);\n  const feature = new Feature({ geometry });\n\n  feature.set(\"model\", thermalExpansion);\n  feature.set(\"uuid\", thermalExpansion.uuid);\n  feature.set(\"segmentUuid\", thermalExpansion.segment.uuid);\n  feature.set(\"dataType\", THERMAL_EXPANSION_DATA_TYPE);\n\n  return feature;\n}\n\nexport function thermalExpansionFeaturesSortedByDistanceToRailedParentStart(\n  thermalExpansionFeatures,\n  ascDesc = \"desc\",\n) {\n  return thermalExpansionFeatures.sort((feature1, feature2) => {\n    const distance1 = thermalExpansionDistanceToRailedParentStart(feature1.get(\"model\"));\n    const distance2 = thermalExpansionDistanceToRailedParentStart(feature2.get(\"model\"));\n    if (ascDesc === \"desc\") {\n      return distance2 - distance1;\n    } else {\n      return distance1 - distance2;\n    }\n  });\n}\n\nexport function segmentsFlushAroundThermalExpansion(controller, thermalExpansion) {\n  const segment = thermalExpansion.segment;\n  const railGroup = segment.railedGroup;\n\n  const thermalExpansionDistance = controller.mapModelSynchronizer.getDistanceInInches(\n    segment.startLatLng,\n    thermalExpansion.startLatLng,\n  );\n\n  let segmentBeforeIndex;\n  const segmentBefore = railGroup.find((seg, i) => {\n    const distance = Math.abs(seg.endDistanceFromRailedParentStart - thermalExpansionDistance);\n    const isSegment = distance <= DISTANCE_THRESHOLD;\n    if (isSegment) segmentBeforeIndex = i;\n    return isSegment;\n  });\n\n  const segmentAfter = railGroup[segmentBeforeIndex + 1];\n\n  return [segmentBefore, segmentAfter];\n}\n\nexport function thermalExpansionsSortedByDistanceToRailedParentStart(thermalExpansions, ascDesc = \"desc\") {\n  return thermalExpansions.sort((thermalExpansion1, thermalExpansion2) => {\n    const distance1 = thermalExpansionDistanceToRailedParentStart(thermalExpansion1);\n    const distance2 = thermalExpansionDistanceToRailedParentStart(thermalExpansion2);\n    if (ascDesc === \"desc\") {\n      return distance2 - distance1;\n    } else {\n      return distance1 - distance2;\n    }\n  });\n}\n\nexport function thermalExpansionDistanceToRailedParentStart(thermalExpansion) {\n  const segmentStartLonLat = thermalExpansion.segment.startLatLng.toLonLat;\n  const thermalExpansionStartLonLat = thermalExpansion.startLatLng.toLonLat;\n  return getDistance(segmentStartLonLat, thermalExpansionStartLonLat) * METERS_TO_INCHES;\n}\n", "import Polygon from \"ol/geom/Polygon\";\nimport { Feature } from \"ol\";\nimport { fromLonLat } from \"ol/proj\";\n\nimport { degreesToRadians } from \"../../../../helpers/geometry\";\nimport { PANEL_DATA_TYPE, SEGMENT_DATA_TYPE } from \"../../../../da/map/data-types\";\nimport { DEFAULT_ZONE_MODULE_POSITION } from \"../../../models/panel-model\";\nimport { createThermalExpansionFeature } from \"../thermal-expansions/helpers\";\nimport { RAIL_OVERHANG_LENGTH } from \"../../map-model-synchronizers/segments-rail-group\";\nimport { CONTOUR_CODE_NONE } from \"../../../../helpers/contour\";\n\nexport default class SegmentRenderer {\n  constructor({\n    roofPlane,\n    segment,\n    controller,\n    panelsVectorSource,\n    segmentsVectorSource,\n    railsVectorSource,\n    thermalExpansionsVectorSource,\n  }) {\n    this.roofPlane = roofPlane;\n    this.project = roofPlane.project;\n    this.segment = segment;\n\n    this.controller = controller;\n    this.mapManager = controller.mapManager;\n\n    this.panelsVectorSource = panelsVectorSource;\n    this.segmentsVectorSource = segmentsVectorSource;\n    this.railsVectorSource = railsVectorSource;\n    this.thermalExpansionsVectorSource = thermalExpansionsVectorSource;\n\n    this.panelFeatures = [];\n    this.segmentFeature = undefined;\n    this.railFeatures = [];\n    this.thermalExpansionFeatures = [];\n  }\n\n  reRender() {\n    this.clearSegmentFeatures();\n    this.render();\n  }\n\n  clearSegmentFeatures() {\n    this.railsVectorSource.getFeatures().forEach((railFeature) => {\n      if (railFeature.get(\"segmentUuid\") !== this.segment.uuid) return;\n      this.railsVectorSource.removeFeature(railFeature);\n    });\n    this.panelsVectorSource.getFeatures().forEach((panelFeature) => {\n      if (panelFeature.get(\"segmentUuid\") !== this.segment.uuid) return;\n      this.panelsVectorSource.removeFeature(panelFeature);\n    });\n    this.segmentsVectorSource.getFeatures().forEach((segmentFeature) => {\n      if (segmentFeature.get(\"uuid\") !== this.segment.uuid) return;\n      this.segmentsVectorSource.removeFeature(segmentFeature);\n    });\n    this.thermalExpansionsVectorSource.getFeatures().forEach((thermalExpansionFeature) => {\n      if (thermalExpansionFeature.get(\"segmentUuid\") !== this.segment.uuid) return;\n      this.thermalExpansionsVectorSource.removeFeature(thermalExpansionFeature);\n    });\n  }\n\n  render() {\n    if (!this.segment.displayable) return;\n\n    this.buildPanels();\n    this.segment.setDefaultZonesAndModulePositionsIfNoneExist();\n    this.addPanelsToVectorSource();\n\n    this.buildSegment();\n    this.addSegmentToVectorSource();\n\n    this.buildRails();\n    this.addRailsToVectorSource();\n\n    this.buildThermalExpansions();\n    this.addThermalExpansionsToVectorSource();\n  }\n\n  get segmentCoordinates() {\n    return this.segment.latLngPoints.map((latLng) => fromLonLat(latLng.toLonLat));\n  }\n\n  buildPanels() {\n    const zonesAndModulePositionsGrid = this.segment.zonesAndModulePositionsGrid;\n    const contourCodesGrid = this.segment.contourCodesGrid;\n    if (this.segment.panels.length > 0) this.segment.clearPanels();\n\n    const { rows, columns } = this.segment;\n\n    for (let row = 1; row <= rows; row++) {\n      for (let column = 1; column <= columns; column++) {\n        let zonesModulePosition = DEFAULT_ZONE_MODULE_POSITION;\n        if (zonesAndModulePositionsGrid[row - 1] && zonesAndModulePositionsGrid[row - 1][column - 1]) {\n          zonesModulePosition = zonesAndModulePositionsGrid[row - 1][column - 1];\n        }\n        const [zone, modulePosition] = zonesModulePosition.split(\":\");\n\n        let contourCode = CONTOUR_CODE_NONE;\n        if (contourCodesGrid[row - 1] && contourCodesGrid[row - 1][column - 1]) {\n          contourCode = contourCodesGrid[row - 1][column - 1];\n        }\n\n        const panelFeature = this.buildPanel(row, column, zone, modulePosition, contourCode);\n        this.panelFeatures.push(panelFeature);\n      }\n    }\n  }\n\n  addPanelsToVectorSource() {\n    if (!this.panelsVectorSource) return;\n\n    this.panelFeatures.forEach((panelFeature) => this.panelsVectorSource.addFeature(panelFeature));\n  }\n\n  buildPanel(row, column, zone, modulePosition, contourCode) {\n    const panel = this.segment.addPanel({ row, column, zone, modulePosition, contourCode });\n\n    const coordinates = panel.latLngPoints.map((latLng) => fromLonLat(latLng.toLonLat));\n    const panelFeature = this.rectangleFeature(coordinates);\n\n    panelFeature.set(\"illegalShape\", this.segment.illegalShape);\n    panelFeature.set(\"model\", panel);\n    panelFeature.set(\"dataType\", PANEL_DATA_TYPE);\n    panelFeature.set(\"uuid\", panel.uuid);\n    panelFeature.set(\"segmentUuid\", this.segment.uuid);\n\n    return panelFeature;\n  }\n\n  rectangleFeature(coordinates) {\n    const geometry = new Polygon([coordinates]);\n    const feature = new Feature({ geometry });\n    return feature;\n  }\n\n  buildSegment() {\n    const coordinates = this.segment.latLngPoints.map((latLng) => fromLonLat(latLng.toLonLat));\n    const feature = this.rectangleFeature(coordinates);\n    feature.set(\"model\", this.segment);\n    feature.set(\"dataType\", SEGMENT_DATA_TYPE);\n    feature.set(\"uuid\", this.segment.uuid);\n    this.segmentFeature = feature;\n  }\n\n  addSegmentToVectorSource() {\n    if (this.segmentsVectorSource === undefined) return;\n\n    this.segmentsVectorSource.addFeature(this.segmentFeature);\n  }\n\n  buildRails() {\n    if (!this.segment.railed) return;\n\n    const useThirdRail = this.controller.project.detail.thirdRail;\n\n    const roofSlopeRadians = degreesToRadians(this.roofPlane.roofSlope);\n    const railWidth = 5.0;\n    const railInsetPercentage = 0.2;\n    const adjustedRailWidth = railWidth * Math.cos(roofSlopeRadians);\n\n    const railOffsets = (row, percentageOfPanelInset) => {\n      const top = this.segment.unitRowVectorLatLng.times(\n        row * this.segment.slopeAdjustedSpacedPanelSizeInRowDirection +\n          this.segment.slopeAdjustedSpacedPanelSizeInRowDirection * -1 * percentageOfPanelInset +\n          0.5 * adjustedRailWidth,\n      );\n      const bottom = this.segment.unitRowVectorLatLng.times(adjustedRailWidth);\n      const middle = this.segment.unitRowVectorLatLng.times(adjustedRailWidth / 2);\n      return { top, bottom, middle };\n    };\n\n    for (let row = 1; row < this.segment.rows + 1; row++) {\n      // Top rail\n      let rail = 1;\n      const railTwoOffsetPanelWidthPercent = 1.0 - railInsetPercentage;\n      const railTwoOffsets = railOffsets(row, railTwoOffsetPanelWidthPercent);\n      const railTwoFeature = this.buildRail(\n        row,\n        rail,\n        railTwoOffsets.top,\n        railTwoOffsets.bottom,\n        railTwoOffsets.middle,\n      );\n      this.railFeatures.push(railTwoFeature);\n\n      // Bottom rail\n      rail = 2;\n      const railOneOffsets = railOffsets(row, railInsetPercentage);\n      const railOneFeature = this.buildRail(\n        row,\n        rail,\n        railOneOffsets.top,\n        railOneOffsets.bottom,\n        railOneOffsets.middle,\n      );\n      this.railFeatures.push(railOneFeature);\n\n      // Middle rail\n      if (useThirdRail) {\n        rail = 3;\n        const offsetPanelWidthPercent = 0.5;\n        const offsets = railOffsets(row, offsetPanelWidthPercent);\n        const feature = this.buildRail(row, rail, offsets.top, offsets.bottom, offsets.middle);\n        this.railFeatures.push(feature);\n      }\n    }\n  }\n\n  buildRail(row, rail, railOffsetTop, railOffsetBottom, railOffsetMiddle) {\n    const { startLatLng, hasUnrailedChildren, unrailedChildren } = this.segment;\n\n    let columnOffset;\n    if (hasUnrailedChildren) {\n      const farthestAwayChild = unrailedChildren[unrailedChildren.length - 1];\n      const { distanceFromRailedParentStart } = farthestAwayChild;\n      columnOffset = this.segment.unitColumnVectorLatLng.times(farthestAwayChild.width + distanceFromRailedParentStart);\n    } else {\n      columnOffset = this.segment.unitColumnVectorLatLng.times(this.segment.width);\n    }\n\n    const railOverhangLength = this.project.hiddenEndClamp ? 0 : RAIL_OVERHANG_LENGTH;\n    const railOverhangOffset = this.segment.unitColumnVectorLatLng.times(railOverhangLength);\n\n    const railStart = startLatLng.plus(railOffsetTop).minus(railOverhangOffset);\n    const p2 = railStart.plus(columnOffset).plus(railOverhangOffset.times(2));\n    const p3 = p2.minus(railOffsetBottom);\n    const p4 = railStart.minus(railOffsetBottom);\n\n    const coordinatesLatLng = [railStart, p2, p3, p4, railStart];\n    const coordinates = coordinatesLatLng.map((latLng) => fromLonLat(latLng.toLonLat));\n\n    const midLinePointOne = railStart.minus(railOffsetMiddle);\n    const midLinePointTwo = p2.minus(railOffsetMiddle);\n    const midLineCoordinates = [midLinePointOne, midLinePointTwo].map((latLng) => fromLonLat(latLng.toLonLat));\n\n    const feature = this.rectangleFeature(coordinates);\n    feature.set(\"segmentUuid\", this.segment.uuid);\n    feature.set(\"row\", row);\n    feature.set(\"rail\", rail);\n    feature.set(\"midLineCoordinates\", midLineCoordinates);\n\n    return feature;\n  }\n\n  addRailsToVectorSource() {\n    if (this.railsVectorSource === undefined) return;\n\n    this.railFeatures.forEach((feature) => this.railsVectorSource.addFeature(feature));\n  }\n\n  buildThermalExpansions() {\n    this.segment.thermalExpansions.forEach((thermalExpansion) => {\n      if (thermalExpansion.latLngPoints.length === 0) {\n        thermalExpansion.generateAndSetLatLngPoints(thermalExpansion.startLatLng);\n      }\n      const feature = createThermalExpansionFeature(thermalExpansion);\n      this.thermalExpansionFeatures.push(feature);\n    });\n  }\n\n  addThermalExpansionsToVectorSource() {\n    if (this.thermalExpansionsVectorSource === undefined) return;\n\n    this.thermalExpansionFeatures.forEach((feature) => {\n      this.thermalExpansionsVectorSource.addFeature(feature);\n    });\n  }\n}\n", "import { v4 as uuid } from \"uuid\";\n\nimport { cartesianPointRelativeTo } from \"../../../../da/map/ol-geometry\";\nimport SegmentModel from \"../../../models/segment-model\";\nimport SegmentsRailGroup from \"../../map-model-synchronizers/segments-rail-group\";\nimport SegmentRenderer from \"../../modification-helpers/segments/renderer\";\n\nexport function reRenderSegment(controller, segment) {\n  const roofPlane = controller.focusedRoofPlane;\n  const { panelsVectorSource, segmentsVectorSource, railsVectorSource, thermalExpansionsVectorSource } =\n    controller.mapManager;\n\n  const sr = new SegmentRenderer({\n    roofPlane,\n    segment,\n    controller,\n    panelsVectorSource,\n    segmentsVectorSource,\n    railsVectorSource,\n    thermalExpansionsVectorSource,\n  });\n\n  sr.reRender();\n\n  return sr.segmentFeature;\n}\n\nexport function createNewSegment(controller, roofSection, attributes = {}) {\n  const defaultAttributes = {\n    uuid: uuid(),\n    rows: 1,\n    columns: 1,\n    rowDirection: 1,\n    columnDirection: -1,\n    illegalShape: false,\n  };\n\n  if (attributes.zonesAndModulePositionsGrid) {\n    attributes.zonesAndModulePositions = SegmentsRailGroup.stringifyZonesAndModulePositionsFromGrid(\n      attributes.zonesAndModulePositionsGrid,\n    );\n    delete attributes.zonesAndModulePositionsGrid;\n  }\n\n  if (attributes.contourCodesGrid) {\n    attributes.contourCodes = SegmentsRailGroup.stringifyContourCodesFromGrid(attributes.contourCodesGrid);\n    delete attributes.contourCodesGrid;\n  }\n\n  const attrs = { ...defaultAttributes, ...attributes };\n\n  const originLonLat = controller.project.detail.originLatLng.toLonLat;\n  const startLonLat = [attrs.startLatLng.lng, attrs.startLatLng.lat];\n  attrs.startCartesianPoint = cartesianPointRelativeTo(startLonLat, originLonLat);\n\n  const newSegment = SegmentModel.create(attrs);\n  roofSection.addSegment(newSegment);\n  return newSegment;\n}\n\nexport function renderNewSegment(controller, newSegment) {\n  const sr = createSegmentRenderer(controller, newSegment);\n  sr.render();\n  return sr.segmentFeature;\n}\n\nfunction createSegmentRenderer(controller, segment) {\n  const { focusedRoofPlane: roofPlane, mapManager } = controller;\n  const { panelsVectorSource, segmentsVectorSource, railsVectorSource, thermalExpansionsVectorSource } = mapManager;\n\n  const sr = new SegmentRenderer({\n    roofPlane,\n    segment,\n    controller,\n    panelsVectorSource,\n    segmentsVectorSource,\n    railsVectorSource,\n    thermalExpansionsVectorSource,\n  });\n\n  return sr;\n}\n\nexport function clearSegmentFeatures(controller, segment) {\n  const sr = createSegmentRenderer(controller, segment);\n  sr.clearSegmentFeatures();\n}\n\nexport function getRailedGroupIncludingSegmentWithUuid({ controller, uuid }) {\n  let segmentForUuid;\n  controller.pageRoofPlanes.forEach((roofPlane) => {\n    roofPlane.roofSections.forEach((roofSection) => {\n      if (segmentForUuid !== undefined) return;\n\n      segmentForUuid = roofSection.segments.find((s) => s.uuid === uuid);\n    });\n  });\n  if (segmentForUuid === undefined) throw `[Rail Group Error] Couldn't find segment with UUID: ${uuid}`;\n  const segments = segmentForUuid.railedGroup;\n  return segments;\n}\n\nexport function getSegmentFeaturesForSegments({ controller, segments }) {\n  const allSegmentFeatures = controller.mapManager.segmentsVectorSource.getFeatures();\n  const segmentFeatures = segments.map((s) => {\n    const segmentFeature = allSegmentFeatures.find((sf) => s.uuid === sf.get(\"uuid\"));\n    if (segmentFeature === undefined)\n      throw `[Rail Group Error] Couldn't find segment feature for segment UUID: ${s.uuid}`;\n    return segmentFeature;\n  });\n  return segmentFeatures;\n}\n\nexport function removeSegmentFromSelectInteraction(controller, segmentUuid) {\n  const selectInteractionManager = controller.selectInteractionManager;\n  const { selectionCollection } = selectInteractionManager;\n\n  const selectRemovals = [];\n  selectionCollection.forEach((sf) => {\n    if (sf.get(\"uuid\") === segmentUuid) selectRemovals.push(sf);\n  });\n  selectRemovals.forEach((sf) => selectionCollection.remove(sf));\n}\n", "import {\n  simplifiedRailGroup,\n  allPanelsBySegmentUuid,\n  removeSegmentPanelsFromSelectInteraction,\n  selectedPanelsBySegmentUuid,\n  railGroupConsolidatedGrid,\n} from \"./helpers\";\n\nimport {\n  clearSegmentFeatures,\n  getSegmentFeaturesForSegments,\n  getRailedGroupIncludingSegmentWithUuid,\n  removeSegmentFromSelectInteraction,\n  reRenderSegment,\n} from \"../modification-helpers/segments/helpers\";\nimport { ZONES_MODULE_POSITIONS } from \"../../../helpers/zones-and-module-positions\";\nimport { clearOutAnyIllegalThermalExpansions } from \"../modification-helpers/panels/helpers\";\nimport {\n  thermalExpansionDistanceToRailedParentStart,\n  thermalExpansionsSortedByDistanceToRailedParentStart,\n} from \"../modification-helpers/thermal-expansions/helpers\";\n\nimport { sentryException } from \"../../../config/sentry\";\n\nexport const RAIL_OVERHANG_LENGTH = 1;\n\nexport default class SegmentsRailGroup {\n  static uniqueGroupsFromSegmentFeatures({ controller, features }) {\n    const uniqueParentUuids = [\n      ...new Set(\n        features.map((segmentFeature) => {\n          const segment = segmentFeature.get(\"model\");\n          return segment.railed ? segment.uuid : segment.railedParentUuid;\n        }),\n      ),\n    ];\n\n    const railGroups = uniqueParentUuids.map((uuid) => {\n      return SegmentsRailGroup.fromSegmentUuid({ controller: controller, uuid });\n    });\n\n    return railGroups;\n  }\n\n  static uniqueGroupsFromPanelFeatures({ controller, features }) {\n    const uniqueSegmentUuids = [...new Set(features.map((pf) => pf.get(\"segmentUuid\")))];\n    const segmentFeatures = controller.mapManager.segmentsVectorSource\n      .getFeatures()\n      .filter((sf) => uniqueSegmentUuids.includes(sf.get(\"uuid\")));\n    return SegmentsRailGroup.uniqueGroupsFromSegmentFeatures({ controller, features: segmentFeatures });\n  }\n\n  static fromSegmentUuid({ controller, uuid }) {\n    const segments = getRailedGroupIncludingSegmentWithUuid({ controller, uuid });\n    const segmentFeatures = getSegmentFeaturesForSegments({ controller, segments });\n\n    return new SegmentsRailGroup({ controller, segments, segmentFeatures });\n  }\n\n  static stringifiedZonesAndModulePositionsFromConsolidatedGrid(consolidatedGrid, columns, columnOffset) {\n    const results = [];\n    consolidatedGrid.forEach((row) => {\n      results.push(row.slice(columnOffset, columnOffset + columns));\n    });\n\n    return SegmentsRailGroup.stringifyZonesAndModulePositionsFromGrid(results);\n  }\n\n  static stringifyZonesAndModulePositionsFromGrid(grid) {\n    const stringResults = grid\n      .map((row) =>\n        row\n          .map((zp) => {\n            return ZONES_MODULE_POSITIONS.findIndex((n) => n === zp);\n          })\n          .join(\",\"),\n      )\n      .join(\",\");\n\n    return stringResults;\n  }\n\n  static stringifiedContourCodesFromConsolidatedGrid(consolidatedGrid, columns, columnOffset) {\n    const results = [];\n    consolidatedGrid.forEach((row) => {\n      results.push(row.slice(columnOffset, columnOffset + columns));\n    });\n\n    return SegmentsRailGroup.stringifyContourCodesFromGrid(results);\n  }\n\n  static stringifyContourCodesFromGrid(grid) {\n    return grid.flatMap((row) => row).join(\"\");\n  }\n\n  constructor({ controller, segments, segmentFeatures }) {\n    this.controller = controller;\n    this.project = controller.project;\n    this.segments = segments;\n    this.segmentFeatures = segmentFeatures;\n\n    this.selectInteractionManager = controller.selectInteractionManager;\n    this.mapModelSynchronizer = controller.mapModelSynchronizer;\n    this.roofSection = segments[0].roofSection;\n    this.panelOrientation = segments[0].orientation;\n\n    this.consolidatedSegmentZonesAndModulePositionsGrid = this.createConsolidatedZonesAndModulePositionsGrid();\n    this.consolidatedContourCodesGrid = this.createConsolidatedContourCodesGrid();\n  }\n\n  createConsolidatedZonesAndModulePositionsGrid() {\n    const grid = Array.from({ length: this.segments[0].rows }, () => []);\n    this.segments.forEach((segment) => {\n      segment.zonesAndModulePositionsGrid.forEach((row, i) => {\n        grid[i] = [...grid[i], ...row];\n      });\n    });\n    return grid;\n  }\n\n  createConsolidatedContourCodesGrid() {\n    const grid = Array.from({ length: this.segments[0].rows }, () => []);\n    this.segments.forEach((segment) => {\n      segment.contourCodesGrid.forEach((row, i) => {\n        try {\n          grid[i] = [...grid[i], ...row];\n        } catch (e) {\n          const message = \"Issue creating consolidated Contour codes grid\";\n          const extras = {\n            error: e,\n            gridRow: `grid[${i}]: ${JSON.stringify(grid[i])}`,\n            row: JSON.stringify(row),\n            contourCodes: segment.contourCodes,\n          };\n          sentryException(message, extras);\n          throw e;\n        }\n      });\n    });\n    return grid;\n  }\n\n  removeIllegalPanelContour() {\n    this.segments.forEach((segment) => {\n      segment.removeIllegalPanelContour();\n    });\n  }\n\n  reRenderSegments() {\n    this.segments.forEach((segment, i) => {\n      const newSegmentFeature = reRenderSegment(this.controller, segment);\n      this.segmentFeatures[i] = newSegmentFeature;\n    });\n  }\n\n  reRenderSegmentsWithSegmentSelections(selectedSegmentsCollection) {\n    this.segments.forEach((segment, i) => {\n      const currentSegmentFeature = this.segmentFeatures[i];\n      const newSegmentFeature = reRenderSegment(this.controller, segment);\n      this.segmentFeatures[i] = newSegmentFeature;\n\n      const isSelected = selectedSegmentsCollection\n        .getArray()\n        .find((sf) => sf.get(\"uuid\") === currentSegmentFeature.get(\"uuid\"));\n      if (!isSelected) return;\n\n      selectedSegmentsCollection.push(newSegmentFeature);\n      selectedSegmentsCollection.remove(currentSegmentFeature);\n    });\n  }\n\n  reRenderSegmentsWithPanelSelections(selectedPanelsCollection) {\n    const simplifiedConsolidatedGrid = this.consolidatedSimplifiedGrid;\n\n    const segmentUuids = this.segmentUuids;\n    const removals = [];\n    selectedPanelsCollection.getArray().forEach((pf) => {\n      if (segmentUuids.includes(pf.get(\"segmentUuid\"))) {\n        removals.push(pf);\n      }\n    });\n    removals.forEach((pf) => selectedPanelsCollection.remove(pf));\n\n    this.segments.forEach((segment) => {\n      reRenderSegment(this.controller, segment);\n    });\n\n    const consolidatedGrid = this.consolidatedPanelsGrid;\n\n    simplifiedConsolidatedGrid.forEach((row, i) => {\n      row.forEach((panelSelectionStatus, j) => {\n        if (panelSelectionStatus !== \"X\") return;\n\n        const panelFeature = consolidatedGrid[i][j];\n        selectedPanelsCollection.push(panelFeature);\n      });\n    });\n  }\n\n  deleteSegments() {\n    this.segments.forEach((segment) => this.deleteSegment(segment));\n  }\n\n  deleteSegment(segment, { clearIllegalThermalExpansions } = { clearIllegalThermalExpansions: true }) {\n    clearSegmentFeatures(this.controller, segment);\n    removeSegmentPanelsFromSelectInteraction(this.controller, segment.uuid);\n    removeSegmentFromSelectInteraction(this.controller, segment.uuid);\n    const notDeletedSegment = this.segments.find((s) => s.uuid !== segment.uuid);\n\n    this.roofSection.deleteSegment(segment);\n\n    if (notDeletedSegment) {\n      this.refreshFromSegmentUuid(notDeletedSegment.uuid);\n      this.updateDistancesFromRailedParentStart();\n      if (clearIllegalThermalExpansions) {\n        clearOutAnyIllegalThermalExpansions(this.railedParentSegment, this.mapModelSynchronizer);\n      }\n    } else {\n      this.clearSegments();\n    }\n  }\n\n  clearSegments() {\n    this.segments = [];\n  }\n\n  addSegment(segment) {\n    this.segments.push(segment);\n  }\n\n  refreshFromSegmentUuid(uuid) {\n    const { controller } = this;\n\n    this.segments = getRailedGroupIncludingSegmentWithUuid({ controller, uuid });\n    this.segmentFeatures = getSegmentFeaturesForSegments({ controller, segments: this.segments });\n  }\n\n  // This produces a simplified multidimensional array or grid of the rail group segments and panels where\n  // the panels are represented by \"X\" for selected, or \"0\" for not selected.  So if you had a rail group\n  // that looked like this (2 railed segments with 2 rows and the first column of the first segment selected):\n  //\n  // \"X\" = Selected\n  // \"0\" = Not selected\n  // \"| 0 |\"\" = Panel\n  // \"=\" = Rail\n  //\n  // | X | 0 | = | 0 | 0 |\n  // | X | 0 | = | 0 | 0 |\n  //\n  // Then this would output:\n  // [\n  //   [\n  //     [\"X\", \"0\"],\n  //     [\"0\", \"0\"],\n  //   ],\n  //   [\n  //     [\"X\", \"0\"],\n  //     [\"0\", \"0\"],\n  //   ],\n  // ]\n  get simplifiedGrid() {\n    const rows = this.segments[0].rows;\n    const selectedPanelUuids = this.selectedPanelUuids;\n\n    return Array.from({ length: rows }).map((_, i) => {\n      return this.segmentFeatures.map((segmentFeature) => {\n        const segment = segmentFeature.get(\"model\");\n        return Array.from({ length: segment.columns }).map((_, j) => {\n          const panelFeature = this.getPanelFeatureForSegment({ segmentFeature, row: i + 1, column: j + 1 });\n          return selectedPanelUuids.includes(panelFeature.get(\"uuid\")) ? \"X\" : \"O\";\n        });\n      });\n    });\n  }\n\n  getPanelFeatureForSegment({ segmentFeature, row, column }) {\n    return this.segmentPanelFeatures(segmentFeature).find((pf) => {\n      const panel = pf.get(\"model\");\n      return panel.row === row && panel.column === column;\n    });\n  }\n\n  updateDistancesFromRailedParentStart() {\n    this.segments.forEach((segment) => {\n      if (segment.railed || segment.deleted) return;\n\n      const distanceFromRailedParentStart = this.mapModelSynchronizer.getDistanceInInches(\n        segment.railedParent.startLatLng,\n        segment.startLatLng,\n      );\n      segment.setDistanceFromRailedParentStart(distanceFromRailedParentStart);\n    });\n  }\n\n  get consolidatedSimplifiedGrid() {\n    const railGroup = simplifiedRailGroup({\n      segmentFeatures: this.segmentFeatures,\n      allPanelsBySegmentUuid: allPanelsBySegmentUuid(this.controller.mapManager),\n      selectedPanelsBySegmentUuid: selectedPanelsBySegmentUuid(this.selectInteractionManager),\n    });\n    return railGroup.map((railGroupRow) => railGroupRow.flatMap((segment) => segment));\n  }\n\n  clearPanelSelections() {\n    const selectInteractionManager = this.selectInteractionManager;\n    const selectedPanels = selectInteractionManager.selectedFeatures;\n    const removals = [];\n    const segmentUuids = this.segments.map((s) => s.uuid);\n    selectedPanels.forEach((panelFeature) => {\n      if (segmentUuids.includes(panelFeature.get(\"segmentUuid\"))) removals.push(panelFeature);\n    });\n    removals.forEach((pf) => {\n      selectInteractionManager.selectionCollection.remove(pf);\n    });\n  }\n\n  get consolidatedPanelsGrid() {\n    const panelsGrid = railGroupConsolidatedGrid(\n      this.segmentFeatures,\n      allPanelsBySegmentUuid(this.controller.mapManager),\n    );\n    return panelsGrid;\n  }\n\n  get consolidatedPanelsGridStartLatLngs() {\n    return this.consolidatedPanelsGrid.map((consolidatedPanelsGridRow) => {\n      return consolidatedPanelsGridRow.map((pf) => {\n        const panel = pf.get(\"model\");\n        const { lat, lng } = panel.startLatLng;\n        return { lat, lng };\n      });\n    });\n  }\n\n  hasFeature(segmentFeature) {\n    return this.segmentFeatures.find((sf) => sf.get(\"uuid\") === segmentFeature.get(\"uuid\"));\n  }\n\n  get selectedSegmentFeatures() {\n    return this.segmentFeatures.filter((sf) => this.selectedSegmentUuidsForAllRailGroups.includes(sf.get(\"uuid\")));\n  }\n\n  get selectedSegments() {\n    return this.selectedSegmentFeatures.map((sf) => sf.get(\"model\"));\n  }\n\n  get selectedSegmentUuidsForAllRailGroups() {\n    return this.selectInteractionManager.selectedFeatures.map((f) => f.get(\"uuid\"));\n  }\n\n  get minSelectedSegmentFeatureIndex() {\n    return this.#maxMinSelectedSegmentFeatureIndex(\"min\");\n  }\n\n  get minSelectedSegmentFeature() {\n    return this.segmentFeatures[this.minSelectedSegmentFeatureIndex];\n  }\n\n  get maxSelectedSegmentFeature() {\n    return this.segmentFeatures[this.maxSelectedSegmentFeatureIndex];\n  }\n\n  get maxSelectedSegmentFeatureIndex() {\n    return this.#maxMinSelectedSegmentFeatureIndex(\"max\");\n  }\n\n  segmentFeaturesUpToAndIncluding(index) {\n    return this.segmentFeatures.slice(0, index + 1);\n  }\n\n  segmentFeaturesAfterAndIncluding(index) {\n    return this.segmentFeatures.slice(index, this.segmentFeatures.length);\n  }\n\n  thermalExpansionsWithDistanceToRailedParent(comparisonSegment, { distanceType }) {\n    const { thermalExpansions, startLatLng } = this.railedParentSegment;\n\n    if (thermalExpansions.length === 0) return [];\n\n    const comparisonDistance = comparisonSegment.distanceFromRailedParentStart;\n\n    return thermalExpansions.filter((thermalExpansion) => {\n      const distance = this.mapModelSynchronizer.getDistanceInInches(startLatLng, thermalExpansion.startLatLng);\n      if (distanceType === \"closer\") {\n        return distance < comparisonDistance;\n      } else {\n        return distance > comparisonDistance;\n      }\n    });\n  }\n\n  get segmentUuids() {\n    return this.segments.map((s) => s.uuid);\n  }\n\n  get selectedPanelFeatures() {\n    return this.selectInteractionManager.selectedFeatures.filter((pf) =>\n      this.segmentUuids.includes(pf.get(\"segmentUuid\")),\n    );\n  }\n\n  get selectedPanelUuids() {\n    return this.selectedPanelFeatures.map((pf) => pf.get(\"uuid\"));\n  }\n\n  get hasPanelsSelectedInMultipleSegments() {\n    return [...new Set(this.selectedPanelFeatures.map((pf) => pf.get(\"segmentUuid\")))].length > 1;\n  }\n\n  get panelFeatures() {\n    const segmentUuids = this.segmentUuids;\n    return this.allPanelFeaturesOnMap.filter((pf) => segmentUuids.includes(pf.get(\"segmentUuid\")));\n  }\n\n  get allPanelFeaturesOnMap() {\n    return this.controller.mapManager.panelsVectorSource.getFeatures();\n  }\n\n  get railFeatures() {\n    const segmentUuid = this.railedParentSegment.uuid;\n    return this.controller.mapManager.railsVectorSource\n      .getFeatures()\n      .filter((f) => f.get(\"segmentUuid\") === segmentUuid);\n  }\n\n  selectRailFeatures() {\n    this.railFeatures.forEach((f) => {\n      f.set(\"selected\", true);\n    });\n  }\n\n  get railedParentSegment() {\n    return this.segments.find((s) => s.railed);\n  }\n\n  get lastSegment() {\n    return this.segments[this.segments.length - 1];\n  }\n\n  get thermalExpansions() {\n    return this.railedParentSegment.thermalExpansions;\n  }\n\n  segmentFeatureForPanel(panelFeature) {\n    const segmentUuid = panelFeature.get(\"segmentUuid\");\n    return this.segmentFeatures.find((sf) => sf.get(\"uuid\") === segmentUuid);\n  }\n\n  segmentPanelFeatures(segmentFeature) {\n    return this.allPanelFeaturesOnMap.filter((pf) => pf.get(\"segmentUuid\") === segmentFeature.get(\"uuid\"));\n  }\n\n  segmentPanelFeaturesForUuid(uuid) {\n    return this.allPanelFeaturesOnMap.filter((pf) => pf.get(\"segmentUuid\") === uuid);\n  }\n\n  selectedSegmentPanelFeatures(segmentFeature) {\n    const segmentPanelFeatures = this.segmentPanelFeatures(segmentFeature);\n    const selectedPanelUuids = this.selectedPanelFeatures.map((pf) => pf.get(\"uuid\"));\n    const features = segmentPanelFeatures.filter((pf) => selectedPanelUuids.includes(pf.get(\"uuid\")));\n    return features;\n  }\n\n  selectPanelsFromSimplifiedGrid(simplifiedGrid, selectedPanelsCollection) {\n    simplifiedGrid.forEach((simplifiedGridRow, i) => {\n      simplifiedGridRow.forEach((segmentRow, j) => {\n        const segmentUuid = this.segments[j].uuid;\n        // TODO: Revisit and see if this is a performance problem\n        const segmentPanelFeatures = this.segmentPanelFeaturesForUuid(segmentUuid);\n\n        segmentRow.forEach((panelSelectionStatus, k) => {\n          if (panelSelectionStatus === \"O\") return;\n\n          const row = i + 1;\n          const column = k + 1;\n          const panelFeature = segmentPanelFeatures.find((pf) => {\n            const panel = pf.get(\"model\");\n            return panel.row === row && panel.column === column;\n          });\n\n          selectedPanelsCollection.push(panelFeature);\n        });\n      });\n    });\n  }\n\n  get hasAnyPanelSelections() {\n    return this.consolidatedSimplifiedGrid.some((row) => row.includes(\"X\"));\n  }\n\n  segmentHasPanelSelections(segment) {\n    return this.selectInteractionManager.selectedFeatures.some((pf) => segment.uuid === pf.get(\"segmentUuid\"));\n  }\n\n  get contiguousRailLengths() {\n    const { railedParentSegment, lastSegment } = this;\n\n    if (!railedParentSegment.hasThermalExpansions) {\n      return [lastSegment.endDistanceFromRailedParentStart + 2 * RAIL_OVERHANG_LENGTH];\n    }\n\n    const thermalExpansions = thermalExpansionsSortedByDistanceToRailedParentStart(\n      railedParentSegment.thermalExpansions.slice(),\n      \"asc\",\n    );\n\n    const numberOfRailSpans = thermalExpansions.length + 1;\n\n    const railSpans = [];\n    const endClampLength = 1;\n    const thermalExpansionGap = 1;\n    for (let i = 0; i < numberOfRailSpans; i++) {\n      let railSpan;\n      // First rail span\n      if (i === 0) {\n        railSpan =\n          RAIL_OVERHANG_LENGTH + thermalExpansionDistanceToRailedParentStart(thermalExpansions[i]) + endClampLength;\n        railSpans.push(railSpan);\n        continue;\n      }\n\n      // Last rail span\n      if (i === numberOfRailSpans - 1) {\n        railSpan =\n          lastSegment.endDistanceFromRailedParentStart -\n          (thermalExpansionDistanceToRailedParentStart(thermalExpansions[i - 1]) +\n            endClampLength +\n            thermalExpansionGap) +\n          RAIL_OVERHANG_LENGTH;\n        railSpans.push(railSpan);\n        continue;\n      }\n\n      // Rail spans in between two thermal expansions\n      railSpan =\n        RAIL_OVERHANG_LENGTH +\n        thermalExpansionDistanceToRailedParentStart(thermalExpansions[i]) +\n        endClampLength -\n        (thermalExpansionDistanceToRailedParentStart(thermalExpansions[i - 1]) + endClampLength + thermalExpansionGap);\n      railSpans.push(railSpan);\n    }\n\n    return railSpans;\n  }\n\n  get needsThermalExpansions() {\n    return this.contiguousRailLengths.some((railLength) => railLength >= this.project.maxLengthBeforeThermalExpansion);\n  }\n\n  #maxMinSelectedSegmentFeatureIndex(maxMin) {\n    if (![\"max\", \"min\"].includes(maxMin)) throw \"Must call with `max` or `min`\";\n\n    const selectedIndexes = [];\n    this.segmentFeatures.forEach((sf, i) => {\n      if (this.selectInteractionManager.isSegmentSelected(sf)) selectedIndexes.push(i);\n    });\n\n    return Math[maxMin](...selectedIndexes);\n  }\n}\n", "// This takes in a simplified rail group grid and shifts the selections by the shift amount.\n// (For an explanation of the simplified grid see: app/javascript/pr/map/map-model-synchronizers/segments-rail-group.js#simplifiedGrid)\n// For example if you have a grid like:\n//\n// \"X\" = Selected\n// \"0\" = Not selected\n// \"| 0 |\" = Panel\n// \"=\" = Rail\n//\n// | X | 0 | = | 0 | 0 |\n// | X | 0 | = | 0 | 0 |\n//\n// ... and you shift it by 2, you end up with:\n//\n// | 0 | 0 | = | X | 0 |\n// | 0 | 0 | = | X | 0 |\nexport function shiftSimplifiedRailGroupSelection(simplifiedRailGroupGrid, shiftAmount) {\n  if (shiftAmount === 0) return simplifiedRailGroupGrid;\n\n  const consolidatedGroupRowLength = simplifiedRailGroupGrid[0].flatMap((a) => a).length;\n  if (shiftAmount > consolidatedGroupRowLength) {\n    shiftAmount = shiftAmount % consolidatedGroupRowLength;\n  }\n\n  if (shiftAmount < 0) {\n    shiftAmount = consolidatedGroupRowLength + shiftAmount;\n  }\n\n  return simplifiedRailGroupGrid.map((railGroupRow) => {\n    const consolidatedGroupRowArray = railGroupRow.flatMap((a) => a);\n\n    const head = consolidatedGroupRowArray.slice(\n      consolidatedGroupRowArray.length - shiftAmount,\n      consolidatedGroupRowArray.length,\n    );\n    const tail = consolidatedGroupRowArray.slice(0, consolidatedGroupRowArray.length - shiftAmount);\n    const shiftedUnifiedGroupArray = [...head, ...tail];\n\n    const newRailGroupRow = [];\n    let offsetIndex = 0;\n    railGroupRow.forEach((segmentRow) => {\n      const newShiftedSegmentRow = shiftedUnifiedGroupArray.slice(offsetIndex, offsetIndex + segmentRow.length);\n      newRailGroupRow.push(newShiftedSegmentRow);\n      offsetIndex += segmentRow.length;\n    });\n\n    return newRailGroupRow;\n  });\n}\n\n// Thermal expansions can not exist outside of a rail group and there can not be more than one thermal expansion per railed gap.\nexport function clearOutAnyIllegalThermalExpansions(railedParentSegment, mapModelSynchronizer) {\n  const railGroupSegments = railedParentSegment.railedGroup;\n  const thermalExpansions = railedParentSegment.thermalExpansions;\n  if (thermalExpansions.length === 0) return;\n\n  const keepers = [];\n\n  for (let i = 0; i < railGroupSegments.length - 1; i++) {\n    const s1 = railGroupSegments[i];\n    const s2 = railGroupSegments[i + 1];\n\n    thermalExpansions\n      .filter((te) => mapModelSynchronizer.isThermalExpansionBetweenSegments(te, s1, s2))\n      .forEach((te, i) => {\n        if (i === 0) keepers.push(te);\n      });\n  }\n\n  thermalExpansions.forEach((te) => {\n    if (keepers.includes(te)) return;\n\n    railedParentSegment.deleteThermalExpansion(te);\n  });\n}\n", "import {\n  checkIfFeatureHasPointsInsideFeature,\n  featureEdgesIntersect,\n  verticesFromFeatureToPoints,\n  checkPointSetAgainstPolygonVertices,\n  verticesPlusNearbyPointsFromFeature,\n  checkIfFeatureHasPointsInsideFeatureIncludingInteriorPoint,\n  markIllegalIfFeatureHasPointsInsideFeatureIncludingInteriorPoint,\n} from \"../../../da/map/legality-checkers/polygon-helpers\";\nimport SegmentsRailGroup from \"../map-model-synchronizers/segments-rail-group\";\n\nexport default class SegmentsLegalityChecker {\n  constructor(controller) {\n    this.controller = controller;\n\n    this.mapManager = controller.mapManager;\n    this.mapModelSynchronizer = controller.mapModelSynchronizer;\n\n    this.panelFeatures = controller.mapManager.panelsVectorSource.getFeatures();\n    this.segmentFeatures = controller.mapManager.segmentsVectorSource.getFeatures();\n    this.railFeatures = controller.mapManager.railsVectorSource.getFeatures();\n    this.segmentFeaturesMap = {};\n    this.segmentPanelFeaturesMap = {};\n    this.segmentRailFeaturesMap = {};\n\n    this.segmentFeatures.forEach((segmentFeature) => {\n      const segmentUuid = segmentFeature.get(\"uuid\");\n      this.segmentFeaturesMap[segmentUuid] = segmentFeature;\n      this.segmentPanelFeaturesMap[segmentUuid] = this.panelFeatures.filter(\n        (pf) => pf.get(\"segmentUuid\") === segmentUuid,\n      );\n      this.segmentRailFeaturesMap[segmentUuid] = this.railFeatures.filter(\n        (rf) => rf.get(\"segmentUuid\") === segmentUuid,\n      );\n    });\n    this.roofSectionFeatures = controller.mapManager.roofSectionsVectorSource.getFeatures();\n  }\n\n  check() {\n    this.encroaching = false;\n    this.needsThermalExpansion = false;\n\n    this.#clearIllegal();\n    this.#checkSegmentPanelFeatures();\n    this.#checkPanelsInsideAndNotOverlappingARoofSection();\n    this.#checkRailFeatures();\n    this.#checkThermalExpansions();\n  }\n\n  #clearIllegal() {\n    this.panelFeatures.forEach((panelFeature) => panelFeature.set(\"illegalShape\", false));\n    this.segmentFeatures.forEach((segmentFeature) => this.#setSegmentIllegalShapeFlag(segmentFeature, false));\n  }\n\n  #setSegmentIllegalShapeFlag(segmentFeature, isIllegal) {\n    if (segmentFeature.get(\"illegalShape\") === isIllegal) return;\n\n    segmentFeature.set(\"illegalShape\", isIllegal);\n    const segment = segmentFeature.get(\"model\");\n    segment.setIllegalShape(isIllegal);\n  }\n\n  #checkSegmentPanelFeatures() {\n    this.segmentFeatures.forEach((segmentFeature) => {\n      this.segmentFeatures.forEach((otherSegmentFeature) => {\n        if (segmentFeature.get(\"uuid\") === otherSegmentFeature.get(\"uuid\")) return;\n\n        const segmentHasPointInsideOtherSegment = checkIfFeatureHasPointsInsideFeatureIncludingInteriorPoint(\n          segmentFeature,\n          otherSegmentFeature,\n        );\n        if (!segmentHasPointInsideOtherSegment) return;\n\n        this.#checkPanelsDoNotOverlap(\n          this.segmentPanelFeaturesMap[segmentFeature.get(\"uuid\")],\n          otherSegmentFeature,\n          this.segmentPanelFeaturesMap[otherSegmentFeature.get(\"uuid\")],\n        );\n      });\n    });\n  }\n\n  #checkPanelsDoNotOverlap(segmentOnePanelFeatures, segmentTwoFeature, segmentTwoPanelFeatures) {\n    segmentOnePanelFeatures.forEach((panelFeature) => {\n      if (panelFeature.get(\"illegalShape\")) {\n        this.#markSegmentFeatureForPanelIllegal(panelFeature);\n        return;\n      }\n\n      if (\n        !checkIfFeatureHasPointsInsideFeature(panelFeature, segmentTwoFeature) &&\n        !featureEdgesIntersect(panelFeature, segmentTwoFeature)\n      ) {\n        return;\n      }\n\n      segmentTwoPanelFeatures.forEach((otherPanelFeature) => {\n        const isIllegal = markIllegalIfFeatureHasPointsInsideFeatureIncludingInteriorPoint(\n          panelFeature,\n          otherPanelFeature,\n        );\n\n        if (isIllegal) this.#markSegmentFeatureForPanelIllegal(panelFeature);\n      });\n    });\n  }\n\n  #markSegmentFeatureForPanelIllegal(panelFeature) {\n    const segmentFeature = this.segmentFeaturesMap[panelFeature.get(\"segmentUuid\")];\n    this.#setSegmentIllegalShapeFlag(segmentFeature, true);\n  }\n\n  #checkPanelsInsideAndNotOverlappingARoofSection() {\n    this.panelFeatures.forEach((panelFeature) => {\n      let isLegal = this.roofSectionFeatures.some((roofSectionFeature) => {\n        const encroaching =\n          featureEdgesIntersect(panelFeature, roofSectionFeature) ||\n          this.#roofSectionHasPointInsidePanel(panelFeature, roofSectionFeature);\n        if (encroaching) this.encroaching = true;\n\n        return checkIfFeatureHasPointsInsideFeature(panelFeature, roofSectionFeature) && !encroaching;\n      });\n\n      if (!isLegal) {\n        panelFeature.set(\"illegalShape\", true);\n\n        const segmentFeature = this.segmentFeaturesMap[panelFeature.get(\"segmentUuid\")];\n        this.#setSegmentIllegalShapeFlag(segmentFeature, true);\n      }\n    });\n  }\n\n  #roofSectionHasPointInsidePanel(panelFeature, roofSectionFeature) {\n    const roofSectionFeatureVertices = verticesPlusNearbyPointsFromFeature(roofSectionFeature);\n    const panelFeatureVertices = verticesFromFeatureToPoints(panelFeature);\n    const roofSectionHasPointInsidePanel = checkPointSetAgainstPolygonVertices(\n      roofSectionFeature,\n      roofSectionFeatureVertices,\n      panelFeatureVertices,\n      false,\n    );\n    return roofSectionHasPointInsidePanel;\n  }\n\n  #checkRailFeatures() {\n    this.segmentFeatures.forEach((segmentFeature) => {\n      const segment = segmentFeature.get(\"model\");\n      if (!segment.railed) return;\n\n      const segmentRailFeatures = this.segmentRailFeaturesMap[segmentFeature.get(\"uuid\")];\n\n      segmentRailFeatures.forEach((segmentRailFeature) => {\n        this.railFeatures.forEach((otherRailFeature) => {\n          if (segmentRailFeature.get(\"segmentUuid\") === otherRailFeature.get(\"segmentUuid\")) return;\n\n          const isIllegal =\n            checkIfFeatureHasPointsInsideFeature(segmentRailFeature, otherRailFeature) ||\n            featureEdgesIntersect(segmentRailFeature, otherRailFeature);\n\n          if (isIllegal) this.#setRailGroupFeaturesIllegal(segmentRailFeature.get(\"segmentUuid\"));\n        });\n\n        const isLegal = this.roofSectionFeatures.some((roofSectionFeature) => {\n          return (\n            checkIfFeatureHasPointsInsideFeature(segmentRailFeature, roofSectionFeature) &&\n            !featureEdgesIntersect(segmentRailFeature, roofSectionFeature)\n          );\n        });\n        if (!isLegal) {\n          this.encroaching = true;\n          this.#setRailGroupFeaturesIllegal(segmentRailFeature.get(\"segmentUuid\"));\n        }\n      });\n    });\n  }\n\n  #setRailGroupFeaturesIllegal(parentSegmentUuid) {\n    this.#setSegmentAndPanelFeaturesIllegal(parentSegmentUuid);\n    const segmentFeature = this.segmentFeaturesMap[parentSegmentUuid];\n\n    const segment = segmentFeature.get(\"model\");\n    segment.unrailedChildren.forEach((childSegment) => {\n      this.#setSegmentAndPanelFeaturesIllegal(childSegment.uuid);\n    });\n  }\n\n  #setSegmentAndPanelFeaturesIllegal(segmentUuid) {\n    const segmentFeature = this.segmentFeaturesMap[segmentUuid];\n    this.#setSegmentIllegalShapeFlag(segmentFeature, true);\n    this.segmentPanelFeaturesMap[segmentUuid].forEach((panelFeature) => {\n      panelFeature.set(\"illegalShape\", true);\n    });\n  }\n\n  #checkThermalExpansions() {\n    this.segmentFeatures.forEach((segmentFeature) => {\n      const segment = segmentFeature.get(\"model\");\n      if (!segment.railed) return;\n\n      const railGroup = SegmentsRailGroup.fromSegmentUuid({ controller: this.controller, uuid: segment.uuid });\n      if (!railGroup.needsThermalExpansions) return;\n\n      this.#setRailGroupFeaturesIllegal(segment.uuid);\n      this.needsThermalExpansion = true;\n    });\n  }\n}\n", "import { toLonLat } from \"ol/proj\";\nimport { getDistance } from \"ol/sphere\";\n\nimport { degreesToRadians } from \"../../../../../helpers/geometry\";\nimport { rectangleFeatureSideCoordinates } from \"../../../../../da/map/ol-helpers\";\n\nimport { METERS_TO_INCHES } from \"../../../../../da/map/ol-geometry\";\nconst RANGE_DISTANCE_THRESHOLD = 0.01; // inches\n\nexport default class SegmentsProximityAlignmentsIdentifier {\n  constructor({ controller, horizontalRange, verticalRange }) {\n    this.controller = controller;\n\n    this.mapManager = controller.mapManager;\n    this.project = controller.project;\n    this.map = this.mapManager.map;\n\n    this.horizontalRange = this.#setHorizontalRange(horizontalRange);\n    this.verticalRange = this.#setVerticalRange(verticalRange);\n    this.pixelsProximityRange = this.#getPixelProximityRange();\n\n    this.segmentFeatures = this.mapManager.segmentsVectorSource.getFeatures();\n    this.segmentFeaturesByUuid = {};\n\n    this.#setSegmentFeaturesSideCoordinates();\n    this.#setDefaultSegmentProximities();\n  }\n\n  identify() {\n    this.segmentFeatures.forEach((segmentFeature) => {\n      const segmentUuid = segmentFeature.get(\"uuid\");\n      this.segmentFeaturesByUuid[segmentUuid] = segmentFeature;\n      const segment = segmentFeature.get(\"model\");\n      const railGroupSegmentUuids = segment.railGroupSegmentUuids;\n\n      this.segmentFeatures.forEach((otherSegmentFeature) => {\n        if (segmentFeature === otherSegmentFeature) return;\n        const otherSegmentUuid = otherSegmentFeature.get(\"uuid\");\n\n        if (railGroupSegmentUuids.includes(otherSegmentUuid)) return;\n\n        this.#identifySegmentProximities(segmentUuid, otherSegmentUuid);\n      });\n    });\n  }\n\n  #setHorizontalRange(horizontalRange) {\n    return horizontalRange || this.project.interColumnSpacing;\n  }\n\n  #setVerticalRange(verticalRange) {\n    const roofSlopeRadians = degreesToRadians(this.controller.focusedRoofPlane.roofSlope);\n    const slopeAdjustmentMultiplier = Math.cos(roofSlopeRadians);\n\n    if (verticalRange) return verticalRange * slopeAdjustmentMultiplier;\n\n    return this.project.interRowSpacing * slopeAdjustmentMultiplier;\n  }\n\n  #getPixelProximityRange() {\n    const maxRangeDistance = Math.max(this.horizontalRange, this.verticalRange); // inches\n    const proximityDistance = maxRangeDistance + 10; // Adding inches to widen the ballpark\n    const inchesPerPixel = this.map.getView().getResolution() * METERS_TO_INCHES;\n    return proximityDistance / inchesPerPixel;\n  }\n\n  // Since proximities come in pairs [right, left] and [bottom, top], we only need to check right and bottom\n  #identifySegmentProximities(segmentUuid, otherSegmentUuid) {\n    if (this.#segmentFeatureIsInProximityOnRightByOtherSegmentFeature(segmentUuid, otherSegmentUuid)) {\n      this.segmentProximities[segmentUuid].right.push(otherSegmentUuid);\n      this.segmentProximities[otherSegmentUuid].left.push(segmentUuid);\n    }\n\n    if (this.#segmentFeatureIsInProximityOnBottomByOtherSegmentFeature(segmentUuid, otherSegmentUuid)) {\n      this.segmentProximities[segmentUuid].bottom.push(otherSegmentUuid);\n      this.segmentProximities[otherSegmentUuid].top.push(segmentUuid);\n    }\n  }\n\n  #segmentFeatureIsInProximityOnRightByOtherSegmentFeature(segmentUuid, otherSegmentUuid) {\n    const segmentFeatureSides = this.segmentFeatureSides[segmentUuid];\n    const otherSegmentFeatureSides = this.segmentFeatureSides[otherSegmentUuid];\n\n    const segmentTopRightPixel = segmentFeatureSides.right.pixels[0];\n    const segmentBottomRightPixel = segmentFeatureSides.right.pixels[1];\n    const otherSegmentTopLeftPixel = otherSegmentFeatureSides.left.pixels[1];\n    const otherSegmentBottomLeftPixel = otherSegmentFeatureSides.left.pixels[0];\n    if (segmentTopRightPixel[0] >= otherSegmentTopLeftPixel[0]) return false;\n    if (otherSegmentTopLeftPixel[0] - segmentTopRightPixel[0] > this.pixelsProximityRange) return false;\n\n    const segmentsHaveSomeVerticalOverlap =\n      (segmentTopRightPixel[1] >= otherSegmentTopLeftPixel[1] &&\n        segmentTopRightPixel[1] < otherSegmentBottomLeftPixel[1]) ||\n      (otherSegmentTopLeftPixel[1] >= segmentTopRightPixel[1] &&\n        otherSegmentTopLeftPixel[1] < segmentBottomRightPixel[1]);\n    if (!segmentsHaveSomeVerticalOverlap) return false;\n\n    const distanceLonLat1 = toLonLat(this.map.getCoordinateFromPixel(segmentTopRightPixel));\n    const distanceLonLat2 = toLonLat(\n      this.map.getCoordinateFromPixel([otherSegmentTopLeftPixel[0], segmentTopRightPixel[1]]),\n    );\n    const distance = getDistance(distanceLonLat1, distanceLonLat2) * METERS_TO_INCHES;\n    return distance <= RANGE_DISTANCE_THRESHOLD + this.horizontalRange;\n  }\n\n  #segmentFeatureIsInProximityOnBottomByOtherSegmentFeature(segmentUuid, otherSegmentUuid) {\n    const segmentFeatureSides = this.segmentFeatureSides[segmentUuid];\n    const otherSegmentFeatureSides = this.segmentFeatureSides[otherSegmentUuid];\n\n    const segmentBottomLeftPixel = segmentFeatureSides.bottom.pixels[1];\n    const segmentBottomRightPixel = segmentFeatureSides.bottom.pixels[0];\n    const otherSegmentTopLeftPixel = otherSegmentFeatureSides.top.pixels[0];\n    const otherSegmentTopRightPixel = otherSegmentFeatureSides.top.pixels[1];\n\n    if (otherSegmentTopLeftPixel[1] <= segmentBottomLeftPixel[1]) return false;\n    if (otherSegmentTopLeftPixel[1] - segmentBottomLeftPixel[1] > this.pixelsProximityRange) return false;\n\n    const segmentsHaveSomeHorizontalOverlap =\n      (segmentBottomLeftPixel[0] >= otherSegmentTopLeftPixel[0] &&\n        segmentBottomLeftPixel[0] < otherSegmentTopRightPixel[0]) ||\n      (otherSegmentTopLeftPixel[0] >= segmentBottomLeftPixel[0] &&\n        otherSegmentTopLeftPixel[0] < segmentBottomRightPixel[0]);\n    if (!segmentsHaveSomeHorizontalOverlap) return false;\n\n    const distanceLonLat1 = toLonLat(this.map.getCoordinateFromPixel(segmentBottomLeftPixel));\n    const distanceLonLat2 = toLonLat(\n      this.map.getCoordinateFromPixel([segmentBottomLeftPixel[0], otherSegmentTopLeftPixel[1]]),\n    );\n    const distance = getDistance(distanceLonLat1, distanceLonLat2) * METERS_TO_INCHES;\n\n    return distance <= RANGE_DISTANCE_THRESHOLD + this.verticalRange;\n  }\n\n  #setSegmentFeaturesSideCoordinates() {\n    this.segmentFeatureSides = {};\n    this.segmentFeatures.map((segmentFeature) => {\n      const uuid = segmentFeature.get(\"uuid\");\n      this.segmentFeatureSides[uuid] = rectangleFeatureSideCoordinates(segmentFeature, this.mapManager.map);\n    });\n  }\n\n  #setDefaultSegmentProximities() {\n    this.segmentProximities = {};\n    this.segmentFeatures.forEach((segmentFeature) => {\n      const segmentUuid = segmentFeature.get(\"uuid\");\n      this.segmentProximities[segmentUuid] = { top: [], right: [], bottom: [], left: [] };\n    });\n  }\n}\n", "import { Feature } from \"ol\";\nimport LineString from \"ol/geom/LineString\";\nimport { toLonLat } from \"ol/proj\";\n\nimport SimpleLatLng from \"../../../../../da/map/models/simple-lat-lng\";\nimport { cartesianPointRelativeTo } from \"../../../../../da/map/ol-geometry\";\n\nexport default class BaseRenderer {\n  constructor(controller, identifier) {\n    this.controller = controller;\n    this.mapManager = controller.mapManager;\n    this.project = controller.project;\n    this.map = this.mapManager.map;\n\n    this.adjoinments = identifier.segmentProximities;\n    this.segmentFeatureSides = identifier.segmentFeatureSides;\n    this.segmentFeaturesByUuid = identifier.segmentFeaturesByUuid;\n\n    this.segmentsByUuid = {};\n    Object.keys(this.segmentFeaturesByUuid).forEach((segmentUuid) => {\n      this.segmentsByUuid[segmentUuid] = this.segmentFeaturesByUuid[segmentUuid].get(\"model\");\n    });\n  }\n\n  render() {\n    this.clearAdjoinmentsOnSegments();\n\n    Object.keys(this.adjoinments).forEach((segmentUuid) => {\n      const adjoinments = this.adjoinments[segmentUuid];\n\n      Object.keys(adjoinments).forEach((adjoinmentSide) => {\n        if (adjoinments[adjoinmentSide].length === 0) return;\n\n        this.#renderAdjoinmentForSegmentSide(segmentUuid, adjoinmentSide, adjoinments[adjoinmentSide]);\n      });\n    });\n  }\n\n  #renderAdjoinmentForSegmentSide(segmentUuid, adjoinmentSide, adjoinmentsOnSide) {\n    const segmentFeatureSide = this.segmentFeatureSides[segmentUuid][adjoinmentSide];\n\n    const sidePixels = segmentFeatureSide.pixels;\n    adjoinmentsOnSide.forEach((adjoiningSegmentUuid) => {\n      if (adjoinmentSide === \"right\") {\n        const adjoiningPixels = this.segmentFeatureSides[adjoiningSegmentUuid].left.pixels;\n        const topPixelY = sidePixels[0][1] < adjoiningPixels[1][1] ? adjoiningPixels[1][1] : sidePixels[0][1];\n        const bottomPixelY = sidePixels[1][1] > adjoiningPixels[0][1] ? adjoiningPixels[0][1] : sidePixels[1][1];\n        this.#renderFeatureFromPixelCoordinates(\n          segmentUuid,\n          adjoiningSegmentUuid,\n          [sidePixels[0][0], topPixelY],\n          [sidePixels[1][0], bottomPixelY],\n          adjoinmentSide,\n        );\n      } else if (adjoinmentSide === \"left\") {\n        const adjoiningPixels = this.segmentFeatureSides[adjoiningSegmentUuid].right.pixels;\n        const topPixelY = sidePixels[1][1] < adjoiningPixels[0][1] ? adjoiningPixels[0][1] : sidePixels[1][1];\n        const bottomPixelY = sidePixels[0][1] > adjoiningPixels[1][1] ? adjoiningPixels[1][1] : sidePixels[0][1];\n        this.#renderFeatureFromPixelCoordinates(\n          segmentUuid,\n          adjoiningSegmentUuid,\n          [sidePixels[1][0], topPixelY],\n          [sidePixels[0][0], bottomPixelY],\n          adjoinmentSide,\n        );\n      } else if (adjoinmentSide === \"top\") {\n        const adjoiningPixels = this.segmentFeatureSides[adjoiningSegmentUuid].bottom.pixels;\n        const leftPixelX = sidePixels[0][0] < adjoiningPixels[1][0] ? adjoiningPixels[1][0] : sidePixels[0][0];\n        const rightPixelX = sidePixels[1][0] > adjoiningPixels[0][0] ? adjoiningPixels[0][0] : sidePixels[1][0];\n        this.#renderFeatureFromPixelCoordinates(\n          segmentUuid,\n          adjoiningSegmentUuid,\n          [leftPixelX, sidePixels[0][1]],\n          [rightPixelX, sidePixels[1][1]],\n          adjoinmentSide,\n        );\n      } else if (adjoinmentSide === \"bottom\") {\n        const adjoiningPixels = this.segmentFeatureSides[adjoiningSegmentUuid].top.pixels;\n        const leftPixelX = sidePixels[1][0] < adjoiningPixels[0][0] ? adjoiningPixels[0][0] : sidePixels[1][0];\n        const rightPixelX = sidePixels[0][0] > adjoiningPixels[1][0] ? adjoiningPixels[1][0] : sidePixels[0][0];\n        this.#renderFeatureFromPixelCoordinates(\n          segmentUuid,\n          adjoiningSegmentUuid,\n          [leftPixelX, sidePixels[1][1]],\n          [rightPixelX, sidePixels[0][1]],\n          adjoinmentSide,\n        );\n      }\n    });\n  }\n\n  #renderFeatureFromPixelCoordinates(segmentUuid, adjoiningSegmentUuid, pixelOne, pixelTwo, adjoinmentSide) {\n    const coordinateOne = this.map.getCoordinateFromPixel(pixelOne);\n    const coordinateTwo = this.map.getCoordinateFromPixel(pixelTwo);\n    const geometry = new LineString([coordinateOne, coordinateTwo]);\n    const feature = new Feature({ geometry });\n    feature.set(\"segmentUuid\", segmentUuid);\n\n    this.addAdjoinmentFeature(feature);\n\n    this.#storeAdjoinmentOnSegmentModel(\n      segmentUuid,\n      adjoiningSegmentUuid,\n      coordinateOne,\n      coordinateTwo,\n      adjoinmentSide,\n    );\n  }\n\n  #storeAdjoinmentOnSegmentModel(segmentUuid, adjoiningSegmentUuid, coordinateOne, coordinateTwo, adjoinmentSide) {\n    const latLngOne = SimpleLatLng.fromLonLat(toLonLat(coordinateOne));\n    const latLngTwo = SimpleLatLng.fromLonLat(toLonLat(coordinateTwo));\n\n    const segment = this.segmentsByUuid[segmentUuid];\n\n    const origin = this.project.detail.originLatLng.toLonLat;\n    const cartesianPointOne = cartesianPointRelativeTo(latLngOne.toLonLat, origin);\n    const cartesianPointTwo = cartesianPointRelativeTo(latLngTwo.toLonLat, origin);\n\n    const adjoinmentData = {\n      segmentUuid,\n      adjoiningSegmentUuid,\n      adjoinmentSide,\n      latLngPoints: [latLngOne.toSimpleObject, latLngTwo.toSimpleObject],\n      cartesianPoints: [cartesianPointOne, cartesianPointTwo],\n    };\n\n    this.addAdjoinment(segment, adjoinmentData);\n  }\n}\n", "import SegmentsProximityAlignmentsIdentifier from \"./identifier\";\nimport BaseRenderer from \"./base-renderer\";\n\nimport { ADJOINMENT_DATA_TYPE } from \"../../../../../da/map/data-types\";\nimport { ADJOINMENT_HORIZONTAL_THRESHOLD, ADJOINMENT_VERTICAL_THRESHOLD } from \"../../../../models/adjoinment-model\";\n\nexport default class SegmentsAdjoinmentsRenderer extends BaseRenderer {\n  static render(controller) {\n    const identifier = new SegmentsProximityAlignmentsIdentifier({\n      controller,\n      horizontalRange: ADJOINMENT_HORIZONTAL_THRESHOLD,\n      verticalRange: ADJOINMENT_VERTICAL_THRESHOLD,\n    });\n    identifier.identify();\n    new SegmentsAdjoinmentsRenderer(controller, identifier).render();\n  }\n\n  clearAdjoinmentsOnSegments() {\n    Object.values(this.segmentsByUuid).forEach((segment) => {\n      segment.clearAdjoinments();\n    });\n  }\n\n  addAdjoinmentFeature(feature) {\n    feature.set(\"dataType\", ADJOINMENT_DATA_TYPE);\n    this.mapManager.adjoinmentsVectorSource.addFeature(feature);\n  }\n\n  addAdjoinment(segment, adjoinmentData) {\n    segment.addAdjoinment(adjoinmentData);\n  }\n}\n", "import BaseRenderer from \"./base-renderer\";\nimport SegmentsProximityAlignmentsIdentifier from \"./identifier\";\n\nimport { CONTOUR_LEGALITY_ADJOINMENT_DATA_TYPE } from \"../../../../../da/map/data-types\";\nimport {\n  CONTOUR_LEGALITY_ADJOINMENT_HORIZONTAL_THRESHOLD,\n  CONTOUR_LEGALITY_ADJOINMENT_VERTICAL_THRESHOLD,\n} from \"../../../../models/adjoinment-model\";\n\nexport default class SegmentsContourLegalityAdjoinmentsRenderer extends BaseRenderer {\n  static render(controller) {\n    const identifier = new SegmentsProximityAlignmentsIdentifier({\n      controller,\n      horizontalRange: CONTOUR_LEGALITY_ADJOINMENT_HORIZONTAL_THRESHOLD,\n      verticalRange: CONTOUR_LEGALITY_ADJOINMENT_VERTICAL_THRESHOLD,\n    });\n    identifier.identify();\n    new SegmentsContourLegalityAdjoinmentsRenderer(controller, identifier).render();\n  }\n\n  clearAdjoinmentsOnSegments() {\n    Object.values(this.segmentsByUuid).forEach((segment) => {\n      segment.clearContourLegalityAdjoinments();\n    });\n  }\n\n  addAdjoinmentFeature(feature) {\n    feature.set(\"dataType\", CONTOUR_LEGALITY_ADJOINMENT_DATA_TYPE);\n    this.mapManager.contourLegalityAdjoinmentsVectorSource.addFeature(feature);\n  }\n\n  addAdjoinment(segment, adjoinmentData) {\n    segment.addContourLegalityAdjoinment(adjoinmentData);\n  }\n}\n", "import LineString from \"ol/geom/LineString\";\nimport { fromLonLat } from \"ol/proj\";\nimport { Fill, Stroke, Style } from \"ol/style\";\nimport { isAlive } from \"mobx-state-tree\";\n\nconst REGULAR_THERMAL_EXPANSION_BORDER_COLOR = \"rgba(155, 18, 112, 1)\";\nconst REGULAR_THERMAL_EXPANSION_FILL_COLOR = \"rgba(217, 22, 156, 0.6)\";\n\nconst SELECTED_THERMAL_EXPANSION_BORDER_COLOR = \"rgba(255, 255, 255, 1)\";\nconst SELECTED_THERMAL_EXPANSION_FILL_COLOR = \"rgba(217, 130, 190, 0.8)\";\n\nconst THERMAL_EXPANSION_BORDER_WEIGHT = 2;\n\nconst REGULAR_THERMAL_EXPANSION_MIDLINE_COLOR = \"rgba(255, 255, 255, 0.8)\";\nconst SELECTED_THERMAL_EXPANSION_MIDLINE_COLOR = \"rgba(255, 255, 255, 1)\";\n\nconst REGULAR_THERMAL_EXPANSION_STYLE = new Style({\n  stroke: new Stroke({ color: REGULAR_THERMAL_EXPANSION_BORDER_COLOR, width: THERMAL_EXPANSION_BORDER_WEIGHT }),\n  fill: new Fill({ color: REGULAR_THERMAL_EXPANSION_FILL_COLOR }),\n});\n\nconst SELECTED_THERMAL_EXPANSION_STYLE = new Style({\n  stroke: new Stroke({ color: SELECTED_THERMAL_EXPANSION_BORDER_COLOR, width: THERMAL_EXPANSION_BORDER_WEIGHT }),\n  fill: new Fill({ color: SELECTED_THERMAL_EXPANSION_FILL_COLOR }),\n});\n\nexport const thermalExpansionsStyle = (thermalExpansionFeature) => {\n  const model = thermalExpansionFeature.get(\"model\");\n  if (!isAlive(model)) return [];\n\n  const styles = [REGULAR_THERMAL_EXPANSION_STYLE];\n  const lineStyle = thermalExpansionLineGraphicStyle(thermalExpansionFeature, REGULAR_THERMAL_EXPANSION_MIDLINE_COLOR);\n  styles.push(lineStyle);\n  return styles;\n};\n\nfunction thermalExpansionLineGraphicStyle(thermalExpansionFeature, midLineColor) {\n  const thermalExpansion = thermalExpansionFeature.get(\"model\");\n  const { unitColumnVectorLatLng, unitRowVectorLatLng } = thermalExpansion.segment;\n  const segmentHeight = thermalExpansion.segment.height;\n  const startLatLng = thermalExpansion.startLatLng;\n  const lineStringInset = 0;\n  const lineStringHeight = segmentHeight - lineStringInset * 2;\n  const p1 = startLatLng\n    .plus(unitColumnVectorLatLng.times(thermalExpansion.thermalExpansionLength / 2))\n    .plus(unitRowVectorLatLng.times(lineStringInset));\n\n  const halfHeightOfExpansionSymbol = 3;\n  const p2 = p1.plus(unitRowVectorLatLng.times(lineStringHeight / 2 - halfHeightOfExpansionSymbol));\n\n  const p3 = p2.minus(unitColumnVectorLatLng.times(3)).plus(unitRowVectorLatLng.times(1.5));\n  const p4 = p3.plus(unitColumnVectorLatLng.times(6)).plus(unitRowVectorLatLng.times(3));\n  const p5 = p4.minus(unitColumnVectorLatLng.times(3)).plus(unitRowVectorLatLng.times(1.5));\n\n  const p6 = p1.plus(unitRowVectorLatLng.times(lineStringHeight));\n  const coordinates = [p1, p2, p3, p4, p5, p6].map((latLng) => fromLonLat(latLng.toLonLat));\n\n  const style = new Style({\n    geometry: new LineString(coordinates),\n    stroke: new Stroke({ color: midLineColor, width: 1 }),\n    zIndex: 80,\n  });\n  return style;\n}\n\nexport const selectThermalExpansionStyle = (thermalExpansionFeature) => {\n  const model = thermalExpansionFeature.get(\"model\");\n  if (!isAlive(model)) return [];\n\n  const styles = [SELECTED_THERMAL_EXPANSION_STYLE];\n  const lineStyle = thermalExpansionLineGraphicStyle(thermalExpansionFeature, SELECTED_THERMAL_EXPANSION_MIDLINE_COLOR);\n  styles.push(lineStyle);\n  return styles;\n};\n", "import { Stroke, Style } from \"ol/style\";\n\nconst RAFTER_BORDER_COLOR = \"rgba(255, 255, 255, 0.5)\";\nconst RAFTER_BORDER_WEIGHT = 1;\n\nconst RAFTER_STYLE = new Style({\n  stroke: new Stroke({ color: RAFTER_BORDER_COLOR, width: RAFTER_BORDER_WEIGHT, lineDash: [4, 4] }),\n});\n\nexport const raftersStyle = () => RAFTER_STYLE;\n", "import { Text, Icon, Fill, Stroke, Style } from \"ol/style\";\nimport { GeoJSON } from \"ol/format\";\nimport { featureCollection } from \"@turf/helpers\";\nimport buffer from \"@turf/buffer\";\n\nimport { pill } from \"../../../da/map/styles/helpers\";\nimport Polygon from \"ol/geom/Polygon\";\n\nconst WEIGHT_BORDER = 4;\n\nconst ANCHOR_BORDER_COLOR = \"rgba(255, 230, 0, 1.0)\";\n\nconst COLOR_SEGMENT_BORDER = \"rgba(255, 255, 255, 0.1)\";\nconst COLOR_SEGMENT_FILL = \"rgba(255, 255, 255, 0.0)\";\n\nconst SELECTED_REGULAR_SEGMENT_STROKE_COLOR = \"rgba(255, 255, 255, 1.0)\";\nconst SELECTED_REGULAR_SEGMENT_STROKE_WIDTH = 4;\nconst SELECTED_REGULAR_SEGMENT_FILL_COLOR = \"rgba(255, 255, 255, 0.4)\";\n\nconst REGULAR_SEGMENT_INNER_BORDER_COLOR = \"rgba(0, 0, 0, 0.4)\";\nconst ILLEGAL_SEGMENT_INNER_BORDER_COLOR = \"rgba(0, 0, 0, 1.0)\";\nconst SEGMENT_INNER_BORDER_WIDTH = 8;\n\nconst SELECTED_ILLEGAL_SEGMENT_STROKE_COLOR = \"rgba(255, 255, 255, 1.0)\";\nconst SELECTED_ILLEGAL_SEGMENT_STROKE_WIDTH = 4;\nconst SELECTED_ILLEGAL_SEGMENT_FILL_COLOR = \"rgba(255, 153, 153, 0.5)\";\n\nconst HIGHLIGHTED_SEGMENT_STROKE_COLOR = \"rgba(225, 0, 165, 1.0)\";\nconst HIGHLIGHTED_SEGMENT_STROKE_WIDTH = 4;\nconst HIGHLIGHTED_SEGMENT_FILL_COLOR = \"rgba(225, 0, 165, 0.7)\";\n\nconst ROWS_COLUMNS_MARKER_TEXT_COLOR = \"#fff\";\n\nconst RAIL_FILL_COLOR = \"rgba(255, 255, 255, 0.6)\";\nconst SELECTED_RAIL_FILL_COLOR = \"rgba(255, 255, 255, 1)\";\n\nconst STYLE_SEGMENT = new Style({\n  stroke: new Stroke({ color: COLOR_SEGMENT_BORDER, width: WEIGHT_BORDER }),\n  fill: new Fill({ color: COLOR_SEGMENT_FILL }),\n});\n\nexport function rowsColumnsMarkerStyle(feature) {\n  const width = 60;\n  const height = 20;\n  const style = new Style({\n    image: new Icon({\n      img: pill({ width, height, strokeWidth: 1 }),\n      imgSize: [width, height],\n    }),\n    text: new Text({\n      text: feature.get(\"text\"),\n      font: \"bold 12px sans-serif\",\n      fill: new Fill({ color: ROWS_COLUMNS_MARKER_TEXT_COLOR }),\n    }),\n  });\n  return style;\n}\n\nexport const transparentOrRegularSegmentStyle = (feature) => {\n  const segment = feature.get(\"model\");\n  if (segment.zonesAndModulePositionsPersisted) {\n    return transparentSegmentsStyle(feature);\n  } else {\n    return segmentsStyle(feature);\n  }\n};\n\nexport const transparentSegmentsStyle = (feature) => {\n  return segmentsStyle(feature);\n};\n\nexport const segmentsStyle = (feature) => {\n  const styles = [];\n  if (feature.get(\"highlighted\")) {\n    styles.push(HIGHLIGHTED_SEGMENT_STYLE);\n  } else {\n    styles.push(STYLE_SEGMENT);\n  }\n\n  return styles;\n};\n\nfunction segmentInnerBorderStyle(feature, type) {\n  let strokeColor;\n  if (type === \"regular\") {\n    strokeColor = REGULAR_SEGMENT_INNER_BORDER_COLOR;\n  } else if (type === \"illegal\") {\n    strokeColor = ILLEGAL_SEGMENT_INNER_BORDER_COLOR;\n  }\n\n  const bufferedFeature = bufferFeature(feature, 0.1);\n  const coordinates = bufferedFeature.getGeometry().getCoordinates();\n  return new Style({\n    geometry: new Polygon(coordinates),\n    stroke: new Stroke({\n      color: strokeColor,\n      width: SEGMENT_INNER_BORDER_WIDTH,\n      lineJoin: \"miter\",\n    }),\n  });\n}\n\nfunction bufferFeature(feature, insetDistance) {\n  const format = new GeoJSON();\n  const projections = { dataProjection: \"EPSG:4326\", featureProjection: \"EPSG:3857\" };\n  const turfFeature = format.writeFeatureObject(feature, projections);\n  const turfFeatureAsCollection = featureCollection([turfFeature]);\n  const inset = -1 * insetDistance;\n  const bufferedTurfFeatures = buffer(turfFeatureAsCollection, inset, { units: \"feet\", steps: 2 });\n  const bufferedOlFeatures = format.readFeatures(bufferedTurfFeatures, projections);\n  return bufferedOlFeatures[0];\n}\n\nconst SELECTED_REGULAR_SEGMENT_STYLE = new Style({\n  stroke: new Stroke({ color: SELECTED_REGULAR_SEGMENT_STROKE_COLOR, width: SELECTED_REGULAR_SEGMENT_STROKE_WIDTH }),\n  fill: new Fill({ color: SELECTED_REGULAR_SEGMENT_FILL_COLOR }),\n  zIndex: 10,\n});\n\nconst SELECTED_REGULAR_SEGMENT_ANCHOR_STYLE = new Style({\n  stroke: new Stroke({ color: ANCHOR_BORDER_COLOR, width: SELECTED_REGULAR_SEGMENT_STROKE_WIDTH }),\n  fill: new Fill({ color: SELECTED_REGULAR_SEGMENT_FILL_COLOR }),\n  zIndex: 10,\n});\n\nconst SELECTED_ILLEGAL_SEGMENT_STYLE = new Style({\n  stroke: new Stroke({ color: SELECTED_ILLEGAL_SEGMENT_STROKE_COLOR, width: SELECTED_ILLEGAL_SEGMENT_STROKE_WIDTH }),\n  fill: new Fill({ color: SELECTED_ILLEGAL_SEGMENT_FILL_COLOR }),\n  zIndex: 10,\n});\n\nconst SELECTED_ILLEGAL_SEGMENT_ANCHOR_STYLE = new Style({\n  stroke: new Stroke({ color: ANCHOR_BORDER_COLOR, width: SELECTED_ILLEGAL_SEGMENT_STROKE_WIDTH }),\n  fill: new Fill({ color: SELECTED_ILLEGAL_SEGMENT_FILL_COLOR }),\n  zIndex: 10,\n});\n\nconst HIGHLIGHTED_SEGMENT_STYLE = new Style({\n  stroke: new Stroke({\n    color: HIGHLIGHTED_SEGMENT_STROKE_COLOR,\n    width: HIGHLIGHTED_SEGMENT_STROKE_WIDTH,\n  }),\n  fill: new Fill({ color: HIGHLIGHTED_SEGMENT_FILL_COLOR }),\n  zIndex: 10,\n});\n\nexport const selectedSegmentsStyle = (feature) => {\n  const styles = [];\n  if (feature.get(\"highlighted\")) {\n    styles.push(HIGHLIGHTED_SEGMENT_STYLE);\n  } else if (feature.get(\"illegalShape\")) {\n    if (feature.get(\"anchorSelection\")) {\n      styles.push(SELECTED_ILLEGAL_SEGMENT_ANCHOR_STYLE);\n    } else {\n      styles.push(SELECTED_ILLEGAL_SEGMENT_STYLE);\n    }\n    styles.push(segmentInnerBorderStyle(feature, \"illegal\"));\n  } else {\n    if (feature.get(\"anchorSelection\")) {\n      styles.push(SELECTED_REGULAR_SEGMENT_ANCHOR_STYLE);\n    } else {\n      styles.push(SELECTED_REGULAR_SEGMENT_STYLE);\n    }\n    styles.push(segmentInnerBorderStyle(feature, \"regular\"));\n  }\n\n  return styles;\n};\n\nconst RAIL_STYLE = new Style({\n  fill: new Fill({ color: RAIL_FILL_COLOR }),\n});\n\nconst SELECTED_RAIL_STYLE = new Style({\n  fill: new Fill({ color: SELECTED_RAIL_FILL_COLOR }),\n});\n\nexport function railsStyle(feature) {\n  if (feature.get(\"selected\")) {\n    return SELECTED_RAIL_STYLE;\n  } else {\n    return RAIL_STYLE;\n  }\n}\n", "import { Fill, Stroke, Style, Text } from \"ol/style\";\n\nimport { ZONE_1, ZONE_2, ZONE_2E, ZONE_2N, ZONE_2R, ZONE_3, ZONE_3E, ZONE_3R } from \"../../models/panel-model\";\n\nconst SELECT_TYPE_REGULAR = \"regular\";\nconst SELECT_TYPE_SELECTED = \"selected\";\n\nconst WEIGHT_BORDER = 4;\n\nconst COLOR_ZONE_1_NORMAL_BORDER = \"rgba(0, 96, 217, 1.0)\";\nconst COLOR_ZONE_1_NORMAL_FILL = \"rgba(0, 96, 217, 0.6)\";\n\nconst COLOR_ZONE_1_SELECTED_BORDER = \"rgba(255, 255, 255, 1.0)\";\nconst COLOR_ZONE_1_SELECTED_FILL = \"rgba(102, 170, 255, 0.6)\";\n\nconst COLOR_ZONE_2_NORMAL_BORDER = \"rgba(201, 148, 7, 1.0)\";\nconst COLOR_ZONE_2_NORMAL_FILL = \"rgba(231, 172, 44, 0.6)\";\n\nconst COLOR_ZONE_2_SELECTED_BORDER = \"rgba(255, 255, 255, 1.0)\";\nconst COLOR_ZONE_2_SELECTED_FILL = \"rgba(255, 207, 102, 0.6)\";\n\nconst COLOR_ZONE_3_NORMAL_BORDER = \"rgba(216, 95, 19, 1.0)\";\nconst COLOR_ZONE_3_NORMAL_FILL = \"rgba(216, 95, 19, 0.6)\";\n\nconst COLOR_ZONE_3_SELECTED_BORDER = \"rgba(255, 255, 255, 1.0)\";\nconst COLOR_ZONE_3_SELECTED_FILL = \"rgba(255, 135, 102, 0.6)\";\n\nconst SELECTED_ILLEGAL_PANEL_BORDER_COLOR = \"rgba(255, 255, 255, 1.0)\";\nconst SELECTED_ILLEGAL_PANEL_FILL_COLOR = \"rgba(255, 107, 107, 0.7)\";\n\nconst REGULAR_ILLEGAL_PANEL_BORDER_COLOR = \"rgba(193, 39, 1, 1.0)\";\nconst REGULAR_ILLEGAL_PANEL_FILL_COLOR = \"rgba(255, 0, 0, 0.6)\";\n\nconst SILHOUETTE_STROKE_COLOR = \"rgba(255, 255, 255, 0.8)\";\nconst SILHOUETTE_STROKE_WIDTH = 1;\nconst SILHOUETTE_FILL_COLOR = \"rgba(255, 255, 255, 0.4)\";\n\nconst HIGHLIGHTED_STROKE_COLOR = \"rgba(225, 0, 165, 1.0)\";\nconst HIGHLIGHTED_FILL_COLOR = \"rgba(225, 0, 165, 0.7)\";\n\nconst STYLE_ZONE_1_NORMAL = new Style({\n  stroke: new Stroke({ color: COLOR_ZONE_1_NORMAL_BORDER, width: WEIGHT_BORDER }),\n  fill: new Fill({ color: COLOR_ZONE_1_NORMAL_FILL }),\n  zIndex: 1,\n});\n\nconst STYLE_ZONE_1_SELECTED = new Style({\n  stroke: new Stroke({ color: COLOR_ZONE_1_SELECTED_BORDER, width: WEIGHT_BORDER }),\n  fill: new Fill({ color: COLOR_ZONE_1_SELECTED_FILL }),\n  zIndex: 2,\n});\n\nconst STYLE_ZONE_2_NORMAL = new Style({\n  stroke: new Stroke({ color: COLOR_ZONE_2_NORMAL_BORDER, width: WEIGHT_BORDER }),\n  fill: new Fill({ color: COLOR_ZONE_2_NORMAL_FILL }),\n  zIndex: 1,\n});\n\nconst STYLE_ZONE_2_SELECTED = new Style({\n  stroke: new Stroke({ color: COLOR_ZONE_2_SELECTED_BORDER, width: WEIGHT_BORDER }),\n  fill: new Fill({ color: COLOR_ZONE_2_SELECTED_FILL }),\n  zIndex: 2,\n});\n\nconst STYLE_ZONE_3_NORMAL = new Style({\n  stroke: new Stroke({ color: COLOR_ZONE_3_NORMAL_BORDER, width: WEIGHT_BORDER }),\n  fill: new Fill({ color: COLOR_ZONE_3_NORMAL_FILL }),\n  zIndex: 1,\n});\n\nconst STYLE_ZONE_3_SELECTED = new Style({\n  stroke: new Stroke({ color: COLOR_ZONE_3_SELECTED_BORDER, width: WEIGHT_BORDER }),\n  fill: new Fill({ color: COLOR_ZONE_3_SELECTED_FILL }),\n  zIndex: 2,\n});\n\nconst ZONE_STYLES_NORMAL = {\n  [ZONE_1]: STYLE_ZONE_1_NORMAL,\n  [ZONE_2]: STYLE_ZONE_2_NORMAL,\n  [ZONE_3]: STYLE_ZONE_3_NORMAL,\n};\n\nconst ZONE_STYLES_SELECTED = {\n  [ZONE_1]: STYLE_ZONE_1_SELECTED,\n  [ZONE_2]: STYLE_ZONE_2_SELECTED,\n  [ZONE_3]: STYLE_ZONE_3_SELECTED,\n};\n\nconst REGULAR_ILLEGAL_PANEL_STYLE = new Style({\n  stroke: new Stroke({ color: REGULAR_ILLEGAL_PANEL_BORDER_COLOR, width: WEIGHT_BORDER }),\n  fill: new Fill({ color: REGULAR_ILLEGAL_PANEL_FILL_COLOR }),\n});\n\nconst SELECTED_ILLEGAL_PANEL_STYLE = new Style({\n  stroke: new Stroke({ color: SELECTED_ILLEGAL_PANEL_BORDER_COLOR, width: WEIGHT_BORDER }),\n  fill: new Fill({ color: SELECTED_ILLEGAL_PANEL_FILL_COLOR }),\n  zIndex: 10,\n});\n\nconst SILHOUETTE_PANEL_STYLE = new Style({\n  stroke: new Stroke({ color: SILHOUETTE_STROKE_COLOR, width: SILHOUETTE_STROKE_WIDTH }),\n  fill: new Fill({ color: SILHOUETTE_FILL_COLOR }),\n});\n\nconst HIGHLIGHTED_PANEL_STYLE = new Style({\n  stroke: new Stroke({ color: HIGHLIGHTED_STROKE_COLOR, width: WEIGHT_BORDER }),\n  fill: new Fill({ color: HIGHLIGHTED_FILL_COLOR }),\n});\n\nexport const silhouettePanelsStyle = () => SILHOUETTE_PANEL_STYLE;\n\nfunction panelLabelStyle(panel, map, is716) {\n  const zoom = map.getView().getZoom();\n\n  if (zoom < 21.5) return;\n\n  const minZoomSize = 21;\n  const maxZoomSize = 24;\n  const minScale = 0;\n  const maxScale = 2.3;\n\n  function zoomScale(number, inMin, inMax, outMin, outMax) {\n    return ((number - inMin) * (outMax - outMin)) / (inMax - inMin) + outMin;\n  }\n\n  const scale = zoomScale(zoom, minZoomSize, maxZoomSize, minScale, maxScale);\n  let labelText = panel.zoneLabel;\n  if (is716) labelText += `\\n${panel.modulePositionLabel}`;\n\n  return new Style({\n    text: new Text({\n      text: labelText,\n      font: \"bold 12px Arial\",\n      fill: new Fill({ color: \"rgba(255, 255, 255, 1.0)\" }),\n      overflow: true,\n      scale,\n    }),\n    zIndex: 15,\n  });\n}\n\nexport function panelsStyle(feature, map, is716) {\n  if (feature.get(\"highlighted\")) {\n    return HIGHLIGHTED_PANEL_STYLE;\n  } else if (feature.get(\"illegalShape\")) {\n    return normalOrSelectedErrorPanelStyle({ feature, map, is716, selectType: SELECT_TYPE_REGULAR });\n  } else {\n    return normalOrSelectedPanelStyle({ feature, map, is716, selectType: SELECT_TYPE_REGULAR });\n  }\n}\n\nfunction normalOrSelectedErrorPanelStyle({ feature, map, is716, selectType }) {\n  const styles = [];\n\n  if (selectType === SELECT_TYPE_REGULAR) {\n    styles.push(REGULAR_ILLEGAL_PANEL_STYLE);\n  } else {\n    styles.push(SELECTED_ILLEGAL_PANEL_STYLE);\n  }\n\n  const panel = feature.get(\"model\");\n  const panelLabel = panelLabelStyle(panel, map, is716);\n  if (panelLabel) styles.push(panelLabel);\n\n  return styles;\n}\n\nexport function selectedPanelsStyle(feature, map, is716) {\n  if (feature.get(\"highlighted\")) {\n    return HIGHLIGHTED_PANEL_STYLE;\n  } else if (feature.get(\"illegalShape\")) {\n    return normalOrSelectedErrorPanelStyle({ feature, map, is716, selectType: SELECT_TYPE_SELECTED });\n  } else {\n    return normalOrSelectedPanelStyle({ feature, map, is716, selectType: SELECT_TYPE_SELECTED });\n  }\n}\n\nfunction normalOrSelectedPanelStyle({ feature, map, is716, selectType }) {\n  const panel = feature.get(\"model\");\n\n  const styles = [];\n\n  const zoneStyles = selectType === SELECT_TYPE_REGULAR ? ZONE_STYLES_NORMAL : ZONE_STYLES_SELECTED;\n\n  switch (panel.zone) {\n    case ZONE_1:\n      styles.push(zoneStyles[ZONE_1]);\n      break;\n    case ZONE_2:\n      styles.push(zoneStyles[ZONE_2]);\n      break;\n    case ZONE_2E:\n      styles.push(zoneStyles[ZONE_2]);\n      break;\n    case ZONE_2N:\n      styles.push(zoneStyles[ZONE_2]);\n      break;\n    case ZONE_2R:\n      styles.push(zoneStyles[ZONE_2]);\n      break;\n    case ZONE_3:\n      styles.push(zoneStyles[ZONE_3]);\n      break;\n    case ZONE_3E:\n      styles.push(zoneStyles[ZONE_3]);\n      break;\n    case ZONE_3R:\n      styles.push(zoneStyles[ZONE_3]);\n      break;\n  }\n\n  if (feature.get(\"displayingInProjectReport\")) return styles;\n\n  const panelLabel = panelLabelStyle(panel, map, is716);\n  if (panelLabel) styles.push(panelLabel);\n\n  return styles;\n}\n", "import { Stroke, Style } from \"ol/style\";\n\nconst ADJOINMENT_STROKE_COLOR = \"rgba(0, 199, 225, 1.0)\";\nconst ADJOINMENT_STROKE_WIDTH = 5;\n\nconst CONTOUR_LEGALITY_ADJOINMENT_STROKE_COLOR = \"rgba(227, 205, 0, 1.0)\";\nconst CONTOUR_LEGALITY_ADJOINMENT_STROKE_WIDTH = 5;\n\nconst ADJOINMENT_STYLE = new Style({\n  stroke: new Stroke({ color: ADJOINMENT_STROKE_COLOR, width: ADJOINMENT_STROKE_WIDTH }),\n  zIndex: 10,\n});\n\nconst CONTOUR_LEGALITY_ADJOINMENT_STYLE = new Style({\n  stroke: new Stroke({\n    color: CONTOUR_LEGALITY_ADJOINMENT_STROKE_COLOR,\n    width: CONTOUR_LEGALITY_ADJOINMENT_STROKE_WIDTH,\n  }),\n  zIndex: 11,\n});\n\nexport const adjoinmentsStyle = (_feature) => {\n  const styles = [];\n  styles.push(ADJOINMENT_STYLE);\n  return styles;\n};\n\nexport const contourLegalityAdjoinmentsStyle = (_feature) => {\n  const styles = [];\n  styles.push(CONTOUR_LEGALITY_ADJOINMENT_STYLE);\n  return styles;\n};\n", "import { Fill, Stroke, Style } from \"ol/style\";\n\nconst CONTOUR_STROKE_COLOR = \"rgba(176, 42, 209, 1.0)\";\nconst CONTOUR_STROKE_WEIGHT = 5;\n\nconst CONTOUR_STYLE = new Style({\n  stroke: new Stroke({ color: CONTOUR_STROKE_COLOR, width: CONTOUR_STROKE_WEIGHT }),\n  zIndex: 1,\n});\n\nexport function contoursStyle(_feature, _map, _controller) {\n  return CONTOUR_STYLE;\n}\n", "import VectorLayer from \"ol/layer/Vector\";\nimport VectorSource from \"ol/source/Vector\";\nimport Crop from \"ol-ext/filter/Crop\";\n\nimport DaMapManager from \"../../../da/map/map-manager\";\nimport SegmentsLegalityChecker from \"../legality-checkers/segments\";\nimport SegmentsAdjoinmentsRenderer from \"../modification-helpers/segments/proximity-alignments/adjoinments-renderer\";\nimport SegmentsContourLegalityAdjoinmentsRenderer from \"../modification-helpers/segments/proximity-alignments/contour-legality-adjoinments-renderer\";\n\nimport { thermalExpansionsStyle } from \"../styles/thermal-expansions\";\nimport { raftersStyle } from \"../styles/rafters\";\nimport { railsStyle } from \"../styles/segments\";\nimport { panelsStyle } from \"../styles/zone-panels\";\nimport { segmentsStyle } from \"../styles/segments\";\nimport { adjoinmentsStyle, contourLegalityAdjoinmentsStyle } from \"../styles/adjoinments\";\nimport { contoursStyle } from \"../styles/contour\";\n\nimport {\n  ADJOINMENT_DATA_TYPE,\n  CONTOUR_DATA_TYPE,\n  CONTOUR_LEGALITY_ADJOINMENT_DATA_TYPE,\n  PANEL_DATA_TYPE,\n  RAIL_DATA_TYPE,\n  THERMAL_EXPANSION_DATA_TYPE,\n} from \"../../../da/map/data-types\";\n\nexport default class BaseMapManager extends DaMapManager {\n  get panelsVectorLayer() {\n    if (!this.memoPanelsVectorLayer) {\n      this.memoPanelsVectorLayer = new VectorLayer({\n        source: this.panelsVectorSource,\n        style: this.panelsStyle,\n        zIndex: 40,\n      });\n      this.memoPanelsVectorLayer.set(\"dataType\", PANEL_DATA_TYPE);\n    }\n    return this.memoPanelsVectorLayer;\n  }\n\n  buildSegmentsVectorSource() {\n    this.segmentsVectorSource = new VectorSource({\n      features: this.mapModelSynchronizer.segmentFeatures,\n    });\n  }\n\n  clearSegmentFeatures() {\n    this.clearFeaturesFromVectorSource(this.segmentsVectorSource);\n  }\n\n  get segmentsVectorLayer() {\n    if (!this.memoSegmentsVectorLayer) {\n      this.memoSegmentsVectorLayer = new VectorLayer({\n        source: this.segmentsVectorSource,\n        style: this.segmentsStyle,\n        zIndex: 60,\n      });\n    }\n    return this.memoSegmentsVectorLayer;\n  }\n\n  panelsStyle = (feature) => {\n    return panelsStyle(feature, this.map, this.controller.project.is716Or722);\n  };\n\n  segmentsStyle = (feature) => {\n    return segmentsStyle(feature);\n  };\n\n  buildRailsVectorSource() {\n    this.railsVectorSource = new VectorSource({\n      features: this.mapModelSynchronizer.railFeatures,\n    });\n  }\n\n  clearRailFeatures() {\n    this.clearFeaturesFromVectorSource(this.railsVectorSource);\n  }\n\n  get railsVectorLayer() {\n    if (!this.memoRailsVectorLayer) {\n      this.memoRailsVectorLayer = new VectorLayer({\n        source: this.railsVectorSource,\n        style: (feature) => railsStyle(feature),\n        zIndex: 30,\n      });\n      this.memoRailsVectorLayer.set(\"dataType\", RAIL_DATA_TYPE);\n    }\n    return this.memoRailsVectorLayer;\n  }\n\n  buildRafterVectorSourcesLayersAndFeatures() {\n    const roofPlanes = this.controller.pageRoofPlanes;\n\n    this.rafterVectorSources = {};\n\n    roofPlanes.forEach((roofPlane) => {\n      if (roofPlane.roofSections.length === 0) return;\n\n      const vectorSource = new VectorSource();\n      this.rafterVectorSources[roofPlane.identifier] = vectorSource;\n\n      vectorSource.addFeatures(this.mapModelSynchronizer.rafterFeatures(roofPlane));\n\n      const vectorLayer = new VectorLayer({\n        source: vectorSource,\n        style: (feature) => raftersStyle(feature),\n      });\n      this.map.addLayer(vectorLayer);\n\n      const roofPlaneFeature = this.mapModelSynchronizer.getFeatureForRoofPlane(roofPlane);\n      const cropFilter = new Crop({ feature: roofPlaneFeature, inner: false });\n      vectorLayer.addFilter(cropFilter);\n    });\n  }\n\n  clearRafterFeatures() {\n    Object.values(this.rafterVectorSources).forEach((rafterVectorSource) => {\n      this.clearFeaturesFromVectorSource(rafterVectorSource);\n    });\n  }\n\n  renderRafterFeatures() {\n    this.controller.pageRoofPlanes.forEach((roofPlane) => {\n      if (roofPlane.roofSections.length === 0) return;\n\n      this.rafterVectorSources[roofPlane.identifier].addFeatures(this.mapModelSynchronizer.rafterFeatures(roofPlane));\n    });\n  }\n\n  clearFeaturesFromVectorSource(vectorSource) {\n    const features = vectorSource.getFeatures();\n    features.forEach((feature) => vectorSource.removeFeature(feature));\n  }\n\n  buildPanelsVectorSource() {\n    this.panelsVectorSource = new VectorSource({\n      features: this.mapModelSynchronizer.featuresForRoofPlanePanels(this.controller.focusedRoofPlane),\n    });\n  }\n\n  clearPanelFeatures() {\n    this.clearFeaturesFromVectorSource(this.panelsVectorSource);\n  }\n\n  checkLegality() {\n    const legalityChecker = new SegmentsLegalityChecker(this.controller);\n    legalityChecker.check();\n    return legalityChecker;\n  }\n\n  buildThermalExpansionsVectorSource() {\n    this.thermalExpansionsVectorSource = new VectorSource({\n      features: this.mapModelSynchronizer.thermalExpansionFeatures,\n    });\n  }\n\n  get thermalExpansionsVectorLayer() {\n    if (!this.memoThermalExpansionsVectorLayer) {\n      this.memoThermalExpansionsVectorLayer = new VectorLayer({\n        source: this.thermalExpansionsVectorSource,\n        style: (feature) => thermalExpansionsStyle(feature),\n        zIndex: 70,\n      });\n      this.memoThermalExpansionsVectorLayer.set(\"dataType\", THERMAL_EXPANSION_DATA_TYPE);\n    }\n    return this.memoThermalExpansionsVectorLayer;\n  }\n\n  clearThermalExpansionFeatures() {\n    this.clearFeaturesFromVectorSource(this.thermalExpansionsVectorSource);\n  }\n\n  buildAdjoinmentsVectorSource() {\n    this.adjoinmentsVectorSource = new VectorSource({ features: this.mapModelSynchronizer.adjoinmentsFeatures });\n  }\n\n  get adjoinmentsVectorLayer() {\n    if (!this.memoAdjoinmentsVectorLayer) {\n      this.memoAdjoinmentsVectorLayer = new VectorLayer({\n        source: this.adjoinmentsVectorSource,\n        style: (feature) => adjoinmentsStyle(feature),\n        zIndex: 80,\n      });\n      this.memoAdjoinmentsVectorLayer.set(\"dataType\", ADJOINMENT_DATA_TYPE);\n    }\n    return this.memoAdjoinmentsVectorLayer;\n  }\n\n  renderAdjoinAlignments() {\n    SegmentsAdjoinmentsRenderer.render(this.controller);\n  }\n\n  clearAdjoinmentFeatures() {\n    this.clearFeaturesFromVectorSource(this.adjoinmentsVectorSource);\n  }\n\n  buildContourLegalityAdjoinmentsVectorSource() {\n    this.contourLegalityAdjoinmentsVectorSource = new VectorSource({\n      features: this.mapModelSynchronizer.contourLegalityAdjoinmentsFeatures,\n    });\n  }\n\n  get contourLegalityAdjoinmentsVectorLayer() {\n    if (!this.memoContourLegalityAdjoinmentsVectorLayer) {\n      this.memoContourLegalityAdjoinmentsVectorLayer = new VectorLayer({\n        source: this.contourLegalityAdjoinmentsVectorSource,\n        style: (feature) => contourLegalityAdjoinmentsStyle(feature),\n        zIndex: 80,\n      });\n      this.memoContourLegalityAdjoinmentsVectorLayer.set(\"dataType\", CONTOUR_LEGALITY_ADJOINMENT_DATA_TYPE);\n    }\n    return this.memoContourLegalityAdjoinmentsVectorLayer;\n  }\n\n  renderContourLegalityAdjoinAlignments() {\n    SegmentsContourLegalityAdjoinmentsRenderer.render(this.controller);\n  }\n\n  clearContourLegalityAdjoinmentFeatures() {\n    this.clearFeaturesFromVectorSource(this.contourLegalityAdjoinmentsVectorSource);\n  }\n\n  buildContoursVectorSource() {\n    this.contoursVectorSource = new VectorSource();\n  }\n\n  get contoursVectorLayer() {\n    if (!this.memoContoursVectorLayer) {\n      this.memoContoursVectorLayer = new VectorLayer({\n        source: this.contoursVectorSource,\n        style: (feature) => contoursStyle(feature, this.map, this.controller),\n        zIndex: 80,\n      });\n      this.memoContoursVectorLayer.set(\"dataType\", CONTOUR_DATA_TYPE);\n    }\n    return this.memoContoursVectorLayer;\n  }\n\n  renderContourFeatures() {\n    const features = this.mapModelSynchronizer.contourFeatures;\n    this.contoursVectorSource.addFeatures(features);\n  }\n\n  clearContourFeatures() {\n    this.clearFeaturesFromVectorSource(this.contoursVectorSource);\n  }\n\n  showVectorLayer(dataTypes, show = true) {\n    let dataTypesArr = Array.isArray(dataTypes) ? dataTypes : [dataTypes];\n    this.map\n      .getLayers()\n      .getArray()\n      .filter((l) => dataTypesArr.includes(l.get(\"dataType\")))\n      .forEach((l) => l.setVisible(show));\n  }\n}\n", "import { Circle, Fill, Stroke, Style } from \"ol/style\";\nimport { scaleMap } from \"../../../helpers/app\";\n\nconst REGULAR_FILL = new Fill({ color: \"#54C107\" });\nconst ILLEGAL_FILL = new Fill({ color: \"#ED0A0A\" });\n\nexport function attachmentsStyle(feature, map) {\n  const zoom = map.getView().getZoom();\n\n  let radius;\n  if (zoom < 20) {\n    radius = 1;\n  } else if (zoom > 25) {\n    radius = 10;\n  } else {\n    radius = scaleMap(zoom, 20, 25, 1, 10);\n  }\n\n  const fill = feature.get(\"illegalShape\") ? ILLEGAL_FILL : REGULAR_FILL;\n\n  const image = new Circle({\n    stroke: new Stroke({ color: \"#fff\", width: 2 }),\n    fill,\n    radius,\n  });\n\n  return new Style({ image });\n}\n", "import VectorSource from \"ol/source/Vector\";\nimport { defaults as interactionDefaults } from \"ol/interaction\";\nimport VectorLayer from \"ol/layer/Vector\";\n\nimport BaseMapManager from \"./base\";\nimport { attachmentsStyle } from \"../styles/attachments\";\nimport { panelsStyle } from \"../styles/zone-panels\";\nimport { segmentsStyle } from \"../styles/segments\";\nimport * as events from \"../../../da/map/events\";\nimport { logger } from \"../../../helpers/app\";\n\nexport default class AttachmentsMapManager extends BaseMapManager {\n  add() {\n    this.buildMeasuresVectorSource();\n    this.buildShapeGuideLinesVectorSource();\n    this.buildRoofPlanesVectorSource();\n    this.buildRoofSectionsVectorSource();\n    this.buildSetbacksVectorSource();\n    this.buildPanelsVectorSource();\n    this.buildSegmentsVectorSource();\n    this.buildRailsVectorSource();\n    this.buildThermalExpansionsVectorSource();\n    this.buildAdjoinmentsVectorSource();\n    this.buildContourLegalityAdjoinmentsVectorSource();\n    this.buildContoursVectorSource();\n\n    this.map = this.buildMap({\n      layers: [\n        this.measuresVectorLayer,\n        this.shapeGuideLinesVectorLayer,\n        this.visualMarkersVectorLayer,\n        this.tileLayer,\n        this.roofPlanesVectorLayer,\n        this.segmentsVectorLayer,\n        this.panelsVectorLayer,\n        this.railsVectorLayer,\n        this.roofSectionsVectorLayer,\n        this.setbacksVectorLayer,\n        this.thermalExpansionsVectorLayer,\n        this.contoursVectorLayer,\n        this.contourLegalityAdjoinmentsVectorLayer,\n        this.adjoinmentsVectorLayer,\n      ],\n      interactions: interactionDefaults({ doubleClickZoom: false, mouseWheelZoom: false }),\n    });\n\n    // We need to have the map in place first\n    this.buildRafterVectorSourcesLayersAndFeatures();\n    this.renderContourFeatures();\n    this.addBuildingImagePlacementLayers();\n\n    // The rafters need to be in place first before we can place attachments\n    this.buildAttachmentsVectorSource();\n    this.map.addLayer(this.attachmentsVectorLayer);\n\n    this.addMouseWheelZoomWhenCtrlKeyPressedInteraction();\n\n    this.panelsVectorLayer.setZIndex(60);\n\n    this.map.on(\"moveend\", this.onMoveEnd);\n    this.map.on(events.AFTER_MAP_FEATURES_RENDERING_EVENT, (event) => {\n      logger(`Dispatch ${events.AFTER_MAP_FEATURES_RENDERING_EVENT} called from ${event.calledFrom}`);\n\n      this.checkSegmentsAttachmentStatusLegality();\n    });\n\n    this.dispatchAfterMapFeaturesRendering({ calledFrom: \"AttachmentsMapManager#add\" });\n  }\n\n  onMoveEndHandler(event) {\n    const continueProcessing = super.onMoveEndHandler(event);\n    if (!continueProcessing) return;\n\n    this.controller.mapMoveUpdateOtherMaps();\n  }\n\n  buildPanelsVectorSource() {\n    const features = this.controller.pageRoofPlanes.flatMap((rp) => {\n      return this.mapModelSynchronizer.featuresForRoofPlanePanels(rp);\n    });\n    this.panelsVectorSource = new VectorSource({ features });\n  }\n\n  panelsStyle = (feature) => {\n    return panelsStyle(feature, this.map, this.controller.project.is716Or722);\n  };\n\n  segmentsStyle = (feature) => {\n    return segmentsStyle(feature);\n  };\n\n  buildAttachmentsVectorSource() {\n    this.attachmentsVectorSource = new VectorSource({\n      features: this.mapModelSynchronizer.attachmentFeatures,\n    });\n  }\n\n  get attachmentsVectorLayer() {\n    if (!this.memoAttachmentsVectorLayer) {\n      this.memoAttachmentsVectorLayer = new VectorLayer({\n        source: this.attachmentsVectorSource,\n        style: (feature) => attachmentsStyle(feature, this.map),\n        zIndex: 70,\n      });\n    }\n    return this.memoAttachmentsVectorLayer;\n  }\n\n  checkSegmentsAttachmentStatusLegality() {\n    const panelFeatures = this.panelsVectorSource.getFeatures();\n    this.segmentsVectorSource.getFeatures().forEach((segmentFeature) => {\n      const segment = segmentFeature.get(\"model\");\n      if (segment.isAttachmentPlanStatusLegal) return;\n\n      segmentFeature.set(\"illegalShape\", true);\n      const segmentPanelFeatures = panelFeatures.filter((pf) => pf.get(\"segmentUuid\") === segment.uuid);\n      segmentPanelFeatures.forEach((panelFeature) => {\n        panelFeature.set(\"illegalShape\", true);\n      });\n    });\n  }\n\n  reRenderMap() {\n    this.dispatchBeforeMapFeaturesRendering({ calledFrom: \"AttachmentsMapManager#reRenderMap\" });\n\n    this.mapModelSynchronizer.clearSegmentAndRailFeatures();\n    this.#clearMap();\n    this.mapModelSynchronizer.reRenderRoofPlanes();\n    this.mapModelSynchronizer.reRenderRoofSections();\n    this.mapModelSynchronizer.reRenderSetbacks();\n    this.buildRafterVectorSourcesLayersAndFeatures();\n    this.mapModelSynchronizer.reRenderPanels();\n    this.mapModelSynchronizer.reRenderThermalExpansions();\n    if (this.controller.renderAttachments) {\n      this.mapModelSynchronizer.reRenderAttachments();\n    }\n\n    this.mapModelSynchronizer.reRenderAdjoinmentsAndContourForPageRoofPlanes();\n\n    this.dispatchAfterMapFeaturesRendering({ calledFrom: \"AttachmentsMapManager#reRenderMap\" });\n  }\n\n  #clearMap() {\n    this.roofPlanesVectorSource.clear();\n    this.roofSectionsVectorSource.clear();\n    this.setbacksVectorSource.clear();\n    this.segmentsVectorSource.clear();\n    this.panelsVectorSource.clear();\n    this.railsVectorSource.clear();\n    this.thermalExpansionsVectorSource.clear();\n    Object.values(this.rafterVectorSources).forEach((rafterVectorSource) => {\n      rafterVectorSource.clear();\n    });\n    this.attachmentsVectorSource.clear();\n  }\n}\n", "import Feature from \"ol/Feature\";\nimport { fromLonLat } from \"ol/proj\";\nimport Polygon from \"ol/geom/Polygon\";\nimport LineString from \"ol/geom/LineString\";\n\nimport throttle from \"lodash/throttle\";\n\nimport DaMapModelSynchronizer from \"../../../da/map/map-model-synchronizer\";\nimport { linkFeatureToModel } from \"../modification-helpers/base\";\nimport SegmentRenderer from \"../modification-helpers/segments/renderer\";\nimport { cartesianPointRelativeTo } from \"../../../da/map/ol-geometry\";\nimport RaftersBuilder from \"../modification-helpers/rafters-builder\";\nimport SegmentContourBuilder from \"../modification-helpers/segments/contour/builder\";\n\nimport { ADJOINMENT_DATA_TYPE, CONTOUR_DATA_TYPE } from \"../../../da/map/data-types\";\nimport SegmentsContourShortRunsRemover from \"../modification-helpers/segments/contour/short-runs-remover\";\n\nexport default class BaseMapModelSynchronizer extends DaMapModelSynchronizer {\n  constructor(controller) {\n    super(controller);\n\n    this.mapManager = controller.mapManager;\n\n    this.segmentFeatures = [];\n    this.railFeatures = [];\n    this.thermalExpansionFeatures = [];\n\n    this.throttledReRenderContourFeatures = throttle(this.reRenderContourFeatures, 100, { leading: true });\n  }\n\n  createFeatureForModel(model) {\n    const coordinates = model.latLngPoints.map((p) => fromLonLat(p.toLonLat));\n    const geometry = new Polygon([coordinates]);\n    const feature = new Feature({ geometry });\n    linkFeatureToModel(feature, model);\n\n    return feature;\n  }\n\n  featuresForAllPanels() {\n    return this.controller.project.roofPlanes.flatMap((roofPlane) => {\n      return this.featuresForRoofPlanePanels(roofPlane);\n    });\n  }\n\n  clearSegmentAndRailFeatures() {\n    this.segmentFeatures = [];\n    this.railFeatures = [];\n    this.thermalExpansionFeatures = [];\n  }\n\n  featuresForRoofPlanePanels(roofPlane) {\n    const roofSections = roofPlane.roofSections;\n\n    return roofSections.flatMap((roofSection) => {\n      return roofSection.segments.flatMap((segment) => {\n        const sr = new SegmentRenderer({ roofPlane, segment, controller: this.controller });\n        sr.render();\n\n        this.segmentFeatures.push(sr.segmentFeature);\n        this.railFeatures = [...this.railFeatures, ...sr.railFeatures];\n        this.thermalExpansionFeatures = [...this.thermalExpansionFeatures, ...sr.thermalExpansionFeatures];\n\n        return sr.panelFeatures;\n      });\n    });\n  }\n\n  setSegmentStartLatLngAndCartesianPoint(segment, newStartLatLng) {\n    this.#setStartLatLngAndCartesianPoint(segment, newStartLatLng);\n  }\n\n  setThermalExpansionStartLatLngAndCartesianPoint(thermalExpansion, newStartLatLng) {\n    this.#setStartLatLngAndCartesianPoint(thermalExpansion, newStartLatLng);\n  }\n\n  rafterFeatures(roofPlane) {\n    return new RaftersBuilder({ controller: this.controller, roofPlane }).build();\n  }\n\n  reRenderRafters() {\n    const vectorSources = this.controller.mapManager.rafterVectorSources;\n    Object.keys(vectorSources).forEach((roofPlaneIdentifier) => {\n      const rafterVectorSource = vectorSources[roofPlaneIdentifier];\n      const roofPlane = this.project.roofPlanes.find((rp) => rp.identifier === roofPlaneIdentifier);\n      rafterVectorSource.clear();\n      rafterVectorSource.addFeatures(this.rafterFeatures(roofPlane));\n    });\n  }\n\n  reRenderThermalExpansions() {\n    const vectorSource = this.controller.mapManager.thermalExpansionsVectorSource;\n    vectorSource.clear();\n    this.controller.pageRoofPlanes.forEach((roofPlane) => {\n      roofPlane.roofSections.forEach((roofSection) => {\n        roofSection.activeRailedParentSegments.forEach((railedParentSegment) => {\n          railedParentSegment.thermalExpansions.forEach((thermalExpansion) => {\n            const coordinatesLatLng = thermalExpansion.latLngPoints;\n            const coordinates = coordinatesLatLng.map((latLng) => fromLonLat(latLng.toLonLat));\n            const geometry = new Polygon([coordinates]);\n            const feature = new Feature({ geometry });\n            feature.set(\"model\", thermalExpansion);\n            feature.set(\"segmentUuid\", railedParentSegment.uuid);\n            vectorSource.addFeature(feature);\n          });\n        });\n      });\n    });\n  }\n\n  isThermalExpansionBetweenSegments(thermalExpansion, segment1, segment2) {\n    const railedParent = segment1.railed ? segment1 : segment1.railedParent;\n\n    const gapStart = segment1.distanceFromRailedParentStart + segment1.width - this.project.interColumnSpacing;\n    const gapEnd = segment2.distanceFromRailedParentStart;\n\n    const teStartDistance = this.getDistanceInInches(railedParent.startLatLng, thermalExpansion.startLatLng);\n    return teStartDistance >= gapStart && teStartDistance <= gapEnd;\n  }\n\n  #setStartLatLngAndCartesianPoint(model, newStartLatLng) {\n    model.setStartLatLng(newStartLatLng);\n    const newStartCartesianPoint = cartesianPointRelativeTo(\n      newStartLatLng.toLonLat || [newStartLatLng.lng, newStartLatLng.lat],\n      this.project.detail.originLatLng.toLonLat,\n    );\n    model.setStartCartesianPoint(newStartCartesianPoint);\n  }\n\n  get adjoinmentsFeatures() {\n    const features = [];\n    this.controller.pageRoofPlanes.forEach((roofPlane) => {\n      roofPlane.roofSections.forEach((roofSection) => {\n        roofSection.segments.forEach((segment) => {\n          segment.adjoinments.forEach((adjoinment) => {\n            features.push(this.adjoinmentFeatureFromModel(segment, adjoinment));\n          });\n        });\n      });\n    });\n    return features;\n  }\n\n  adjoinmentFeatureFromModel(segment, adjoinment) {\n    const coordinates = adjoinment.latLngPoints.map((latLng) => fromLonLat(latLng.toLonLat));\n    const geometry = new LineString(coordinates);\n    const feature = new Feature({ geometry });\n    feature.set(\"segmentUuid\", segment.uuid);\n    feature.set(\"dataType\", ADJOINMENT_DATA_TYPE);\n    return feature;\n  }\n\n  get contourLegalityAdjoinmentsFeatures() {\n    const features = [];\n    this.controller.pageRoofPlanes.forEach((roofPlane) => {\n      roofPlane.roofSections.forEach((roofSection) => {\n        roofSection.segments.forEach((segment) => {\n          segment.contourLegalityAdjoinments.forEach((adjoinment) => {\n            features.push(this.adjoinmentFeatureFromModel(segment, adjoinment));\n          });\n        });\n      });\n    });\n    return features;\n  }\n\n  getPanelFeatureFromPanel(panel) {\n    return this.controller.mapManager.panelsVectorSource.getFeatures().find((pf) => pf.get(\"uuid\") === panel.uuid);\n  }\n\n  get contourFeatures() {\n    const results = [];\n\n    this.controller.pageRoofPlanes.forEach((roofPlane) => {\n      roofPlane.roofSections.forEach((roofSection) => {\n        roofSection.segments.forEach((segment) => {\n          if (segment.deleted) return;\n\n          segment.contours.forEach((contour) => {\n            const coordinates = contour.latLngPoints.map((ll) => fromLonLat(ll.toLonLat));\n            const geometry = new LineString(coordinates);\n            const feature = new Feature({ geometry });\n            feature.set(\"segmentUuid\", contour.segmentUuid);\n            feature.set(\"model\", contour);\n            feature.set(\"dataType\", CONTOUR_DATA_TYPE);\n            results.push(feature);\n          });\n        });\n      });\n    });\n\n    return results;\n  }\n\n  reRenderContourFeatures() {\n    const vectorSource = this.controller.mapManager.contoursVectorSource;\n\n    vectorSource.clear();\n\n    const allRunFeatures = this.#buildSegmentsContourRunFeatures();\n\n    const shortRunsRemover = new SegmentsContourShortRunsRemover({ controller: this.controller, allRunFeatures });\n    shortRunsRemover.remove();\n    const legalRunFeatures = shortRunsRemover.legalFeatures;\n\n    legalRunFeatures.forEach((feature) => {\n      vectorSource.addFeature(feature);\n    });\n  }\n\n  reRenderAdjoinmentsAndContourForPageRoofPlanes() {\n    const contoursVectorSource = this.controller.mapManager.contoursVectorSource;\n    contoursVectorSource.clear();\n    this.contourFeatures.forEach((f) => contoursVectorSource.addFeature(f));\n\n    const adjoinmentsVectorSource = this.controller.mapManager.adjoinmentsVectorSource;\n    adjoinmentsVectorSource.clear();\n    this.adjoinmentsFeatures.forEach((f) => adjoinmentsVectorSource.addFeature(f));\n\n    const contourLegalityAdjoinmentsVectorSource = this.controller.mapManager.contourLegalityAdjoinmentsVectorSource;\n    contourLegalityAdjoinmentsVectorSource.clear();\n    this.contourLegalityAdjoinmentsFeatures.forEach((f) => contourLegalityAdjoinmentsVectorSource.addFeature(f));\n  }\n\n  #buildSegmentsContourRunFeatures() {\n    const result = [];\n\n    this.controller.pageRoofPlanes.forEach((roofPlane) => {\n      roofPlane.roofSections.forEach((roofSection) => {\n        roofSection.segments.forEach((segment) => {\n          if (segment.deleted) return;\n\n          const segmentContourBuilder = new SegmentContourBuilder({ controller: this.controller, segment });\n          segmentContourBuilder.build();\n\n          segmentContourBuilder.features.forEach((feature) => {\n            result.push(feature);\n          });\n        });\n      });\n    });\n\n    return result;\n  }\n}\n", "import LineString from \"ol/geom/LineString\";\nimport { Feature } from \"ol\";\nimport { fromLonLat, toLonLat } from \"ol/proj\";\nimport * as olPolygon from \"ol/geom/Polygon\";\nimport { getDistance } from \"ol/sphere\";\nimport { radiansToDegrees } from \"@turf/helpers\";\nimport { cartesianPointsRelativeToOrigin, METERS_TO_INCHES } from \"../../../da/map/ol-geometry\";\n\nimport SimpleLatLng from \"../../../da/map/models/simple-lat-lng\";\n\nexport default class RaftersBuilder {\n  constructor({ controller, roofPlane }) {\n    this.controller = controller;\n    this.roofPlane = roofPlane;\n\n    this.mapManager = controller.mapManager;\n    this.mapModelSynchronizer = controller.mapModelSynchronizer;\n  }\n\n  build() {\n    if (this.roofPlane.roofSections.length === 0) return;\n\n    this.rafterSpacing = this.roofPlane.rafterSpacing;\n    this.rafterOffset = this.roofPlane.rafterOffset;\n    this.calculateRafterVectorsAndStartCoordinates();\n    this.buildFeatures();\n    return this.features;\n  }\n\n  buildFraRafters() {\n    if (this.roofPlane.roofSections.length === 0) return;\n\n    this.rafterSpacing = 1;\n    this.rafterOffset = 0;\n    this.calculateRafterVectorsAndStartCoordinates();\n    this.buildFeatures();\n    return this.features;\n  }\n\n  calculateRafterVectorsAndStartCoordinates() {\n    const roofPlaneFeature = this.mapModelSynchronizer.getFeatureForRoofPlane(this.roofPlane);\n    const boundingBoxFeature = this.rotatedPolygonFeatureBoundingBox(roofPlaneFeature);\n\n    const boundingBoxPolygon = boundingBoxFeature.getGeometry();\n    const boundingBoxCoordinates = boundingBoxPolygon.getLinearRing(0).getCoordinates();\n    const boundingBoxLatLngs = boundingBoxCoordinates.map((c) => SimpleLatLng.fromLonLat(toLonLat(c)));\n    const boundingBoxLatLngsObjects = boundingBoxLatLngs.map((ll) => ll.toSimpleObject);\n    this.roofPlane.setBoundingBox(boundingBoxLatLngsObjects);\n\n    const originLonLat = this.roofPlane.project.detail.originLatLng.toLonLat;\n    const boundingBoxCartesianPoints = cartesianPointsRelativeToOrigin(originLonLat, boundingBoxLatLngs);\n    this.roofPlane.setBoundingBoxCartesianPoints(boundingBoxCartesianPoints);\n\n    const [bottomLeftIndex, topLeftIndex, bottomRightIndex] = this.getBoundingBoxIndexes();\n    const boundingBoxBottomLeftLatLng = boundingBoxLatLngs[bottomLeftIndex];\n    const boundingBoxTopLeftLatLng = boundingBoxLatLngs[topLeftIndex];\n\n    this.raftersBottomEndLatLng = boundingBoxLatLngs[bottomRightIndex];\n\n    const boundingBoxBottomDistance =\n      getDistance(boundingBoxBottomLeftLatLng.toLonLat, this.raftersBottomEndLatLng.toLonLat) * METERS_TO_INCHES;\n    const boundingBoxBottomEdgeVector = this.raftersBottomEndLatLng.minus(boundingBoxBottomLeftLatLng);\n    this.boundingBoxEdgeUnitVector = boundingBoxBottomEdgeVector.dividedBy(boundingBoxBottomDistance);\n\n    this.raftersBottomStartLatLng =\n      this.rafterOffset > 0\n        ? boundingBoxBottomLeftLatLng.plus(this.boundingBoxEdgeUnitVector.times(this.rafterOffset))\n        : boundingBoxBottomLeftLatLng;\n\n    this.raftersTopStartLatLng =\n      this.rafterOffset > 0\n        ? boundingBoxTopLeftLatLng.plus(this.boundingBoxEdgeUnitVector.times(this.rafterOffset))\n        : boundingBoxTopLeftLatLng;\n\n    const raftersDistanceInches =\n      getDistance(this.raftersBottomStartLatLng.toLonLat, this.raftersBottomEndLatLng.toLonLat) * METERS_TO_INCHES;\n\n    this.rafterNum = Math.floor(raftersDistanceInches / this.rafterSpacing) + 1;\n    this.boundingBoxLeftEdgeVector = this.raftersTopStartLatLng.minus(this.raftersBottomStartLatLng);\n  }\n\n  getBoundingBoxIndexes() {\n    const rotationDegrees = radiansToDegrees(this.roofPlane.eaveRotationAngleRadians);\n\n    let bottomLeftIndex = 0;\n    let topLeftIndex = 1;\n    let bottomRightIndex = 3;\n\n    if (rotationDegrees === 90) {\n      bottomLeftIndex = 3;\n      topLeftIndex = 0;\n      bottomRightIndex = 2;\n    } else if (rotationDegrees === 180) {\n      bottomLeftIndex = 2;\n      topLeftIndex = 3;\n      bottomRightIndex = 1;\n    } else if (rotationDegrees === 270) {\n      bottomLeftIndex = 1;\n      topLeftIndex = 2;\n      bottomRightIndex = 0;\n    }\n\n    return [bottomLeftIndex, topLeftIndex, bottomRightIndex];\n  }\n\n  buildFeatures() {\n    const features = [];\n\n    Array.from({ length: this.rafterNum }).forEach((_, i) => {\n      const distance = this.rafterSpacing * i;\n\n      const rafterOffset = this.boundingBoxEdgeUnitVector.times(distance);\n\n      const rafterBottomLatLng = this.raftersBottomStartLatLng.plus(rafterOffset);\n      const rafterBottomCoordinate = fromLonLat(rafterBottomLatLng.toLonLat);\n\n      const rafterTopLatLng = rafterBottomLatLng.plus(this.boundingBoxLeftEdgeVector);\n      const rafterTopCoordinate = fromLonLat(rafterTopLatLng.toLonLat);\n\n      const geometry = new LineString([rafterBottomCoordinate, rafterTopCoordinate]);\n      const feature = new Feature({ geometry });\n      feature.set(\"rafterNumber\", i);\n\n      features.push(feature);\n    });\n\n    this.features = features;\n  }\n\n  rotatedPolygonFeatureBoundingBox(feature) {\n    // To get the extent (bounding box) of the rotated feature, we need to un-rotate a copy of the\n    // feature around the map center, get the extent in that position, and then rotate that extent\n    // geometry back around the center to display it.\n    let extentGeometry = feature.getGeometry();\n    const rotation = this.roofPlane.eaveRotationAngleRadians;\n    const oblique = rotation % (Math.PI / 2) !== 0;\n    const mapCenter = this.mapManager.mapCenter;\n    if (oblique) {\n      const geometry = extentGeometry.clone();\n      geometry.rotate(-rotation, mapCenter);\n      extentGeometry = geometry;\n    }\n\n    let rotatedFeatureExtent = extentGeometry.getExtent();\n    let boundingBoxPolygon = olPolygon.fromExtent(rotatedFeatureExtent);\n    if (oblique) {\n      const geometry = boundingBoxPolygon.clone();\n      geometry.rotate(rotation, mapCenter);\n      boundingBoxPolygon = geometry;\n    }\n\n    const boundingBoxFeature = new Feature({ geometry: boundingBoxPolygon });\n    return boundingBoxFeature;\n  }\n}\n", "import { Feature } from \"ol\";\nimport { LineString } from \"ol/geom\";\n\nimport { CONTOUR_DATA_TYPE } from \"../../../../../da/map/data-types\";\nimport { isContourEast, isContourSouth, isContourWest } from \"../../../../../helpers/contour\";\nimport { cartesianPointsRelativeToOrigin } from \"../../../../../da/map/ol-geometry\";\nimport SimpleLatLng from \"../../../../../da/map/models/simple-lat-lng\";\nimport {\n  latLngFromPixelCoordinate,\n  latLngToCoordinate,\n  pixelsFromLatLng,\n  truncatePixelCoordinateDecimal,\n} from \"../../../../../da/map/ol-helpers\";\n\nexport default class SegmentContourBuilder {\n  constructor({ controller, segment }) {\n    this.controller = controller;\n    this.mapManager = controller.mapManager;\n    this.map = this.mapManager.map;\n    this.segment = segment;\n    this.features = [];\n\n    this.panelsOnSide = {\n      left: this.segment.panelsOnSideLeft,\n      right: this.segment.panelsOnSideRight,\n      bottom: this.segment.panelsOnSideBottom,\n    };\n  }\n\n  build() {\n    this.segment.clearContours();\n\n    const contourRuns = this.#contourRunsToRender;\n\n    const features = contourRuns.map((contourRun) => {\n      const origin = this.controller.project.detail.originLatLng.toLonLat;\n      const latLngPoints = contourRun.latLngs.map((ll) => new SimpleLatLng(ll[0], ll[1]));\n      const cartesianPoints = cartesianPointsRelativeToOrigin(origin, latLngPoints);\n      const contourData = {\n        segmentUuid: this.segment.uuid,\n        side: contourRun.side,\n        latLngPoints: latLngPoints.map((ll) => ll.toSimpleObject),\n        cartesianPoints: cartesianPoints.map((cp) => cp.toSimpleObject),\n      };\n      const contour = this.segment.addContour(contourData);\n\n      const coordinates = contourRun.latLngs.map((ll) => latLngToCoordinate(ll));\n      const geometry = new LineString(coordinates);\n      const feature = new Feature({ geometry });\n      feature.set(\"segmentUuid\", this.segment.uui);\n      feature.set(\"dataType\", CONTOUR_DATA_TYPE);\n      feature.set(\"model\", contour);\n      return feature;\n    });\n\n    this.features = features;\n  }\n\n  get #contourRunsToRender() {\n    let results = [];\n\n    [\"left\", \"right\", \"bottom\"].forEach((side) => {\n      let contourRuns = this.#getContiguousFeatureLatLngsOnSide(side);\n      if (contourRuns.length === 0) return;\n\n      const contourRunsChoppedResults = this.#removeAdjoinmentOverlapsOnSide(contourRuns, side);\n\n      contourRunsChoppedResults.contourRunsLatLng.forEach((ll, i) => {\n        results.push({ latLngs: ll, px: contourRunsChoppedResults.contourRunsPx[i], side });\n      });\n    });\n\n    return results;\n  }\n\n  #removeAdjoinmentOverlapsOnSide(contourRuns, side) {\n    const contourRunsLatLngs = contourRuns.map((cs) => cs.map((ll) => ll.toLatLng));\n    const contourRunsPx = contourRunsLatLngs.map((cs) => cs.map((ll) => pixelsFromLatLng(this.map, ll)));\n    const adjoinments = this.segment.contourLegalityAdjoinmentsOn(side);\n    const adjoinmentsLatLng = adjoinments.map((a) => a.latLngPoints);\n    if (adjoinments.length === 0) {\n      return { contourRunsLatLng: contourRunsLatLngs, contourRunsPx: contourRunsPx };\n    }\n\n    const adjoinmentsPx = adjoinmentsLatLng.map((all) => all.map((ll) => pixelsFromLatLng(this.map, ll.toLatLng)));\n    const results = this.#recursiveChops(contourRunsLatLngs, contourRunsPx, adjoinmentsLatLng, adjoinmentsPx, side);\n    return results;\n  }\n\n  #recursiveChops(contourRunsLatLngs, contourRunsPx, adjoinmentsLatLng, adjoinmentsPx, side, recursionCount = 0) {\n    const resultsLatLng = [];\n    const resultsPx = [];\n    let chopsOccurred = false;\n\n    contourRunsLatLngs.forEach((contourRunLatLng, contoursIndex) => {\n      if (chopsOccurred) {\n        resultsLatLng.push(contourRunLatLng);\n        resultsPx.push(contourRunsPx[contoursIndex]);\n        return;\n      }\n\n      adjoinmentsPx.forEach((adjoinmentPx, adjoinmentsIndex) => {\n        if (chopsOccurred) return;\n\n        let choppingResult;\n        if ([\"left\", \"right\"].includes(side)) {\n          choppingResult = this.#leftRightContourRunsCutFromAdjoinment(\n            contourRunLatLng,\n            contourRunsPx[contoursIndex],\n            adjoinmentPx,\n          );\n        } else {\n          choppingResult = this.#bottomContourRunsCutFromAdjoinment(\n            contourRunLatLng,\n            contourRunsPx[contoursIndex],\n            adjoinmentPx,\n          );\n        }\n\n        if (choppingResult.chopsOccurred) {\n          chopsOccurred = true;\n          choppingResult.segmentsLatLng.forEach((s) => resultsLatLng.push(s));\n          choppingResult.segmentsPx.forEach((s) => resultsPx.push(s));\n        } else if (adjoinmentsIndex === adjoinmentsPx.length - 1) {\n          choppingResult.segmentsLatLng.forEach((s) => resultsLatLng.push(s));\n          choppingResult.segmentsPx.forEach((s) => resultsPx.push(s));\n        }\n      });\n    });\n\n    if (recursionCount > 49) {\n      console.log(\"runaway recursion\");\n      return result;\n    }\n\n    if (chopsOccurred) {\n      return this.#recursiveChops(resultsLatLng, resultsPx, adjoinmentsLatLng, adjoinmentsPx, side, recursionCount + 1);\n    } else {\n      return { contourRunsLatLng: resultsLatLng, contourRunsPx: resultsPx };\n    }\n  }\n\n  #leftRightContourRunsCutFromAdjoinment(contourRunLatLng, contourRunPx, adjoinmentPx) {\n    const contourX = contourRunPx[0][0];\n\n    const adjoinmentYs = adjoinmentPx.map((a) => a[1]).sort((a, b) => a - b);\n    const [aY1, aY2] = adjoinmentYs;\n\n    const aY1Compare = truncatePixelCoordinateDecimal(aY1);\n    const aY2Compare = truncatePixelCoordinateDecimal(aY2);\n\n    const contourYs = contourRunPx.map((c) => c[1]).sort((a, b) => a - b);\n    const [cY1, cY2] = contourYs;\n\n    const cY1Compare = truncatePixelCoordinateDecimal(cY1);\n    const cY2Compare = truncatePixelCoordinateDecimal(cY2);\n\n    const notOverlapping = cY2Compare <= aY1Compare || cY1Compare >= aY2Compare;\n    if (notOverlapping) {\n      return { segmentsLatLng: [contourRunLatLng], segmentsPx: [contourRunPx], chopsOccurred: false };\n    }\n\n    const contourCompletelyCoveredByAdjoinment = cY1Compare >= aY1Compare && cY2Compare <= aY2Compare;\n    if (contourCompletelyCoveredByAdjoinment) return { segmentsLatLng: [], segmentsPx: [], chopsOccurred: true };\n\n    const adjoinmentInMiddleOfContour = cY1Compare < aY1Compare && cY2Compare > aY2Compare;\n    if (adjoinmentInMiddleOfContour) {\n      // The original piece of Contour needs to be cut into two pieces\n      const contour1Px = [\n        [contourX, cY1],\n        [contourX, aY1],\n      ];\n      const contour1LatLng = contour1Px.map((px) => latLngFromPixelCoordinate(this.map, px));\n      const contour2Px = [\n        [contourX, aY2],\n        [contourX, cY2],\n      ];\n      const contour2LatLng = contour2Px.map((px) => latLngFromPixelCoordinate(this.map, px));\n      return {\n        segmentsLatLng: [contour1LatLng, contour2LatLng],\n        segmentsPx: [contour1Px, contour2Px],\n        chopsOccurred: true,\n      };\n    } else {\n      // The original piece of Contour needs to be cut, removing the section overlapping with adjoinment\n      let contourPx;\n      let contourLatLng;\n      if (cY1Compare === aY1Compare) {\n        contourPx = [\n          [contourX, aY2],\n          [contourX, cY2],\n        ];\n        contourLatLng = contourPx.map((px) => latLngFromPixelCoordinate(this.map, px));\n      } else if (cY1Compare < aY1Compare) {\n        contourPx = [\n          [contourX, cY1],\n          [contourX, aY1],\n        ];\n        contourLatLng = contourPx.map((px) => latLngFromPixelCoordinate(this.map, px));\n      } else {\n        contourPx = [\n          [contourX, aY2],\n          [contourX, cY2],\n        ];\n        contourLatLng = contourPx.map((px) => latLngFromPixelCoordinate(this.map, px));\n      }\n      return { segmentsLatLng: [contourLatLng], segmentsPx: [contourPx], chopsOccurred: true };\n    }\n  }\n\n  #bottomContourRunsCutFromAdjoinment(contourRunLatLng, contourRunPx, adjoinmentPx) {\n    const contourY = contourRunPx[0][1];\n\n    const adjoinmentXs = adjoinmentPx.map((a) => a[0]).sort((a, b) => a - b);\n    const [aX1, aX2] = adjoinmentXs;\n\n    const aX1Compare = truncatePixelCoordinateDecimal(aX1);\n    const aX2Compare = truncatePixelCoordinateDecimal(aX2);\n\n    const contourXs = contourRunPx.map((c) => c[0]).sort((a, b) => a - b);\n    const [cX1, cX2] = contourXs;\n\n    const cX1Compare = truncatePixelCoordinateDecimal(cX1);\n    const cX2Compare = truncatePixelCoordinateDecimal(cX2);\n\n    const notOverlapping = cX2Compare <= aX1Compare || cX1Compare >= aX2Compare;\n    if (notOverlapping) return { segmentsLatLng: [contourRunLatLng], segmentsPx: [contourRunPx], chopsOccurred: false };\n\n    const contourCompletelyCoveredByAdjoinment = cX1Compare >= aX1Compare && cX2Compare <= aX2Compare;\n    if (contourCompletelyCoveredByAdjoinment) return { segmentsLatLng: [], segmentsPx: [], chopsOccurred: true };\n\n    const adjoinmentInMiddleOfContour = cX1Compare < aX1Compare && cX2Compare > aX2Compare;\n    if (adjoinmentInMiddleOfContour) {\n      // The original piece of Contour needs to be cut into two pieces\n      const contour1Px = [\n        [cX1, contourY],\n        [aX1, contourY],\n      ];\n      const contour1LatLng = contour1Px.map((px) => latLngFromPixelCoordinate(this.map, px));\n      const contour2Px = [\n        [cX2, contourY],\n        [aX2, contourY],\n      ];\n      const contour2LatLng = contour2Px.map((px) => latLngFromPixelCoordinate(this.map, px));\n      return {\n        segmentsLatLng: [contour1LatLng, contour2LatLng],\n        segmentsPx: [contour1Px, contour2Px],\n        chopsOccurred: true,\n      };\n    } else {\n      // The original piece of Contour needs to be cut, removing the section overlapping with adjoinment\n      let contourPx;\n      let contourLatLng;\n      if (cX1Compare === aX1Compare) {\n        contourPx = [\n          [aX2, contourY],\n          [cX2, contourY],\n        ];\n        contourLatLng = contourPx.map((px) => latLngFromPixelCoordinate(this.map, px));\n      } else if (cX1Compare < aX1Compare) {\n        contourPx = [\n          [cX1, contourY],\n          [aX1, contourY],\n        ];\n        contourLatLng = contourPx.map((px) => latLngFromPixelCoordinate(this.map, px));\n      } else {\n        contourPx = [\n          [aX2, contourY],\n          [cX2, contourY],\n        ];\n        contourLatLng = contourPx.map((px) => latLngFromPixelCoordinate(this.map, px));\n      }\n      return { segmentsLatLng: [contourLatLng], segmentsPx: [contourPx], chopsOccurred: true };\n    }\n  }\n\n  #getContiguousFeatureLatLngsOnSide(side) {\n    const contiguousSegments = [];\n\n    let currentSegment = undefined;\n    const panels = this.panelsOnSide[side];\n    panels.forEach((panel) => {\n      const hasContourOnSide = this.#panelHasContourOnSide(panel, side);\n\n      if (hasContourOnSide) {\n        const panelSideLatLngs = this.#panelLatLngsForSide(panel, side);\n        if (currentSegment) {\n          currentSegment[1] = panelSideLatLngs[1];\n        } else {\n          currentSegment = panelSideLatLngs;\n        }\n      } else {\n        if (currentSegment) {\n          contiguousSegments.push(currentSegment);\n          currentSegment = undefined;\n        }\n      }\n    });\n\n    if (currentSegment) {\n      contiguousSegments.push(currentSegment);\n    }\n\n    return contiguousSegments;\n  }\n\n  #panelHasContourOnSide(panel, side) {\n    if (side === \"left\") return isContourWest(panel.contourCode);\n    if (side === \"right\") return isContourEast(panel.contourCode);\n    if (side === \"bottom\") return isContourSouth(panel.contourCode);\n  }\n\n  #panelLatLngsForSide(panel, side) {\n    if (side === \"left\") return panel.sideLatLngsLeft;\n    if (side === \"right\") return panel.sideLatLngsRight;\n    if (side === \"bottom\") return panel.sideLatLngsBottom;\n  }\n}\n", "import { getDistance } from \"ol/sphere\";\nimport { METERS_TO_INCHES } from \"../../../../../da/map/ol-geometry\";\nimport {\n  distanceBetweenPixelCoordinatesInInches,\n  pixelsFromLatLng,\n  truncatePixelCoordinateDecimal,\n} from \"../../../../../da/map/ol-helpers\";\nimport { degreesToRadians } from \"../../../../../helpers/geometry\";\n\nconst SEGMENT_LENGTH_CUTOFF = 12; // inches\nconst CONNECTED_LENGTH_CUTOFF = 2; // inches\n\n// Figures out if sections of Contour that are less than the cutoff amount should be removed or if\n// they are connected to other adjoining Contour segments, making them longer than the cutoff.\nexport default class SegmentsContourShortRunsRemover {\n  constructor({ controller, allRunFeatures }) {\n    this.controller = controller;\n    this.map = controller.mapManager.map;\n    this.allRunFeatures = allRunFeatures;\n\n    this.legalFeatures = [];\n    this.contoursToRemove = [];\n    this.contoursWithDistances = this.#getContoursWithDistances;\n  }\n\n  remove() {\n    this.contoursWithDistances.forEach((contourWithDistance) => {\n      const { contour, feature, distance } = contourWithDistance;\n      const roundedDistance = Number.parseFloat(distance).toFixed(2);\n      const tooShortOnOwn = roundedDistance < SEGMENT_LENGTH_CUTOFF;\n      if (tooShortOnOwn) {\n        if (this.#isPartOfConnectedRunLongerThanCutoff(contourWithDistance)) {\n          this.legalFeatures.push(feature);\n        } else {\n          this.contoursToRemove.push(contour);\n        }\n      } else {\n        this.legalFeatures.push(feature);\n      }\n    });\n\n    this.contoursToRemove.forEach((contour) => {\n      contour.segment.removeContour(contour);\n    });\n  }\n\n  get #getContoursWithDistances() {\n    return this.allRunFeatures.map((feature) => {\n      const contour = feature.get(\"model\");\n      const point1 = contour.latLngPoints[0].toLonLat;\n      const point2 = contour.latLngPoints[1].toLonLat;\n      let distance = getDistance(point1, point2) * METERS_TO_INCHES;\n      if (contour.side !== \"bottom\") {\n        distance = this.#slopeAdjustDistance(distance);\n      }\n      return { contour, feature, distance };\n    });\n  }\n\n  #isPartOfConnectedRunLongerThanCutoff(contourWithDistance) {\n    for (let i = 0; i < this.contoursWithDistances.length; i++) {\n      const otherContourWithDistance = this.contoursWithDistances[i];\n      const { isConnected, connectionDistance } = this.#contourAreConnected(\n        contourWithDistance,\n        otherContourWithDistance,\n      );\n      if (isConnected) {\n        const combinedDistance = contourWithDistance.distance + connectionDistance + otherContourWithDistance.distance;\n        if (combinedDistance >= SEGMENT_LENGTH_CUTOFF) return true;\n      }\n    }\n\n    return false;\n  }\n\n  #contourAreConnected(contourWithDistance, otherContourWithDistance) {\n    const noConnection = { isConnected: false, connectionDistance: 0 };\n\n    const { contour } = contourWithDistance;\n    const { contour: otherContour } = otherContourWithDistance;\n    if (contour === otherContour || contour.side !== otherContour.side) return noConnection;\n\n    const contourPx = contour.latLngPoints.map((ll) => pixelsFromLatLng(this.map, ll.toLatLng));\n    const otherContourPx = otherContour.latLngPoints.map((ll) => pixelsFromLatLng(this.map, ll.toLatLng));\n\n    const contourYs = contourPx.map((c) => c[1]).sort((a, b) => a - b);\n    const contourXs = contourPx.map((c) => c[0]).sort((a, b) => a - b);\n    const [cY1, cY2] = contourYs;\n    const [cX1, cX2] = contourXs;\n\n    const cY1Compare = truncatePixelCoordinateDecimal(cY1);\n    const cX1Compare = truncatePixelCoordinateDecimal(cX1);\n\n    const otherContourYs = otherContourPx.map((c) => c[1]).sort((a, b) => a - b);\n    const otherContourXs = otherContourPx.map((c) => c[0]).sort((a, b) => a - b);\n    const [oCY1, oCY2] = otherContourYs;\n    const [oCX1, oCX2] = otherContourXs;\n\n    const oCY1Compare = truncatePixelCoordinateDecimal(oCY1);\n    const oCX1Compare = truncatePixelCoordinateDecimal(oCX1);\n\n    let point1;\n    let point2;\n    if (contour.side === \"bottom\") {\n      if (cY1Compare !== oCY1Compare) return noConnection;\n\n      const contourIsLeftOfOtherContour = cX1 < oCX1;\n      let pointX1 = contourIsLeftOfOtherContour ? cX2 : oCX2;\n      let pointX2 = contourIsLeftOfOtherContour ? oCX1 : cX1;\n      point1 = [pointX1, cY1];\n      point2 = [pointX2, cY1];\n    } else {\n      if (cX1Compare !== oCX1Compare) return noConnection;\n\n      const contourIsOnTopOfOtherContour = cY1 < oCY1;\n      let pointY1 = contourIsOnTopOfOtherContour ? cY2 : oCY2;\n      let pointY2 = contourIsOnTopOfOtherContour ? oCY1 : cY1;\n      point1 = [cX1, pointY1];\n      point2 = [cX1, pointY2];\n    }\n\n    let distanceBetween = distanceBetweenPixelCoordinatesInInches(this.map, point1, point2);\n    if (contour.side !== \"bottom\") {\n      distanceBetween = this.#slopeAdjustDistance(distanceBetween);\n    }\n    const isConnected = truncatePixelCoordinateDecimal(distanceBetween) <= CONNECTED_LENGTH_CUTOFF;\n\n    if (isConnected) {\n      return { isConnected: true, connectionDistance: distanceBetween };\n    } else {\n      return noConnection;\n    }\n  }\n\n  #slopeAdjustDistance(distance) {\n    const roofSlopeRadians = degreesToRadians(this.controller.focusedRoofPlane.roofSlope);\n    return distance / Math.cos(roofSlopeRadians);\n  }\n}\n", "import Point from \"ol/geom/Point\";\nimport Feature from \"ol/Feature\";\n\nimport BaseMapModelSynchronizer from \"./base\";\nimport { lineIntersectionInCoordinates } from \"../../../da/map/ol-geometry\";\nimport RaftersBuilder from \"../modification-helpers/rafters-builder\";\n\nexport default class AttachmentsRoofPlaneMapModelSynchronizer extends BaseMapModelSynchronizer {\n  get attachmentFeatures() {\n    const results = [];\n\n    this.controller.pageRoofPlanes.forEach((roofPlane) => {\n      const allRailFeatures = this.controller.mapManager.railsVectorSource.getFeatures();\n\n      const roofPlaneSegments = roofPlane.roofSections.flatMap((rs) => rs.segments);\n      roofPlaneSegments.forEach((segment) => {\n        const segmentRailFeatures = allRailFeatures.filter((rf) => rf.get(\"segmentUuid\") === segment.uuid);\n        const allRafterFeatures = this.getAllRafterFeatures(roofPlane);\n\n        segment.attachmentPositions.forEach((row, rowNum) => {\n          row.forEach((rail, railNum) => {\n            // Rafter numbers start at 1\n            const railFeature = segmentRailFeatures.find(\n              (rf) => rf.get(\"row\") === rowNum + 1 && rf.get(\"rail\") === railNum + 1,\n            );\n\n            if (railFeature) {\n              const railFeatureCoordinates = railFeature.get(\"midLineCoordinates\");\n\n              rail.forEach((rafterNum) => {\n                const rafterFeature = allRafterFeatures[rafterNum - 1];\n                const rafterFeatureCoordinates = rafterFeature.getGeometry().getCoordinates();\n                const intersection = lineIntersectionInCoordinates(railFeatureCoordinates, rafterFeatureCoordinates);\n                const point = new Point(intersection);\n                const attachmentFeature = new Feature({ geometry: point });\n                if (!segment.isAttachmentPlanStatusLegal) {\n                  attachmentFeature.set(\"illegalShape\", true);\n                }\n\n                results.push(attachmentFeature);\n              });\n            }\n          });\n        });\n      });\n    });\n\n    return results;\n  }\n\n  getAllRafterFeatures(roofPlane) {\n    if (this.project.detail.isDeckAttached) {\n      const raftersBuilder = new RaftersBuilder({ controller: this.controller, roofPlane });\n      raftersBuilder.buildFraRafters();\n      return raftersBuilder.features;\n    } else {\n      const roofPlaneRafterFeatures =\n        this.controller.mapManager.rafterVectorSources[roofPlane.identifier].getFeatures();\n      return roofPlaneRafterFeatures.sort((f1, f2) => f1.get(\"rafterNumber\") - f2.get(\"rafterNumber\"));\n    }\n  }\n\n  loadSetbacks() {\n    return this.controller.pageRoofPlanes.map((rp) => this.buildSetbackForRoofPlane(rp));\n  }\n\n  reRenderRoofPlanes() {\n    const pageRoofPlaneUuids = this.controller.pageRoofPlanes.map((rp) => rp.uuid);\n    const features = this.featuresForDisplayableRoofPlanes().filter((rpf) => {\n      return pageRoofPlaneUuids.includes(rpf.get(\"uuid\"));\n    });\n    features.forEach((feature) => this.controller.mapManager.roofPlanesVectorSource.addFeature(feature));\n  }\n\n  reRenderRoofSections() {\n    const pageRoofSectionUuids = this.controller.pageRoofPlanes.flatMap((rp) => rp.roofSections.map((rs) => rs.uuid));\n    const features = this.featuresForDisplayableRoofSections().filter((rpf) => {\n      return pageRoofSectionUuids.includes(rpf.get(\"uuid\"));\n    });\n    features.forEach((feature) => this.controller.mapManager.roofSectionsVectorSource.addFeature(feature));\n  }\n\n  reRenderSetbacks() {\n    const features = this.loadSetbacks();\n    features.forEach((feature) => this.controller.mapManager.setbacksVectorSource.addFeature(feature));\n  }\n\n  reRenderPanels() {\n    const pageRoofPlanes = this.controller.pageRoofPlanes;\n    const panelFeatures = pageRoofPlanes.flatMap((roofPlane) => {\n      return this.featuresForRoofPlanePanels(roofPlane);\n    });\n    panelFeatures.forEach((pf) => this.controller.mapManager.panelsVectorSource.addFeature(pf));\n    const segmentUuids = pageRoofPlanes.flatMap((rp) =>\n      rp.roofSections.flatMap((rs) => rs.segments.map((s) => s.uuid)),\n    );\n    this.segmentFeatures.forEach((sf) => {\n      if (segmentUuids.includes(sf.get(\"uuid\"))) {\n        this.controller.mapManager.segmentsVectorSource.addFeature(sf);\n      }\n    });\n    this.railFeatures.forEach((rf) => {\n      if (segmentUuids.includes(rf.get(\"segmentUuid\"))) {\n        this.controller.mapManager.railsVectorSource.addFeature(rf);\n      }\n    });\n  }\n\n  reRenderAttachments() {\n    const features = this.attachmentFeatures;\n    features.forEach((feature) => {\n      this.controller.mapManager.attachmentsVectorSource.addFeature(feature);\n    });\n  }\n\n  clearAttachmentFeatures() {\n    this.controller.mapManager.attachmentsVectorSource.clear();\n  }\n}\n", "import throttle from \"lodash/throttle\";\n\nimport DaBase from \"../../../../da/map/interaction-managers/select/base\";\nimport IrDragBox, { DRAG_BOX_CLASSNAME } from \"../../../../da/map/ol-extensions/interaction/DragBox\";\n\nexport default class Base extends DaBase {\n  addDragBoxInteraction() {\n    this.#clearCurrentDragBoxInteraction();\n    this.currentDragBoxInteraction = new IrDragBox({ className: DRAG_BOX_CLASSNAME });\n    this.map.addInteraction(this.currentDragBoxInteraction);\n    this.#toggleBoxEvents(true);\n  }\n\n  clearDragBoxInteraction() {\n    this.#clearCurrentDragBoxInteraction();\n  }\n\n  clearCurrentInteraction() {\n    super.clearCurrentInteraction();\n    this.#clearCurrentDragBoxInteraction();\n  }\n\n  #toggleBoxEvents(set) {\n    const setState = set ? \"on\" : \"un\";\n    this.currentDragBoxInteraction[setState](\"boxstart\", this.#boxStart);\n    this.currentDragBoxInteraction[setState](\"boxdrag\", this.#throttledBoxDrag);\n    this.currentDragBoxInteraction[setState](\"boxend\", this.#boxEnd);\n  }\n\n  #boxStart = (event) => {\n    const originalEvent = event.mapBrowserEvent.originalEvent;\n    this.draggingWithAltKey = originalEvent.altKey;\n    this.draggingWithShiftKey = originalEvent.shiftKey;\n\n    if (!this.draggingWithAltKey && this.draggingWithShiftKey) {\n      this.selectionCollection.forEach((feature) => feature.set(\"previouslySelected\", true));\n    }\n    if (this.onDraggingSelectionStart) this.onDraggingSelectionStart(event);\n  };\n\n  #boxDrag = (_event) => {\n    this.draggingSelectionMarquee = true;\n    if (!this.draggingWithAltKey) {\n      if (this.draggingWithShiftKey) {\n        // While dragging with shift key we want to refresh the dragged selection\n        // but only for selections added during this drag interaction.  We want to\n        // keep the old selections around so we can add to them.\n        const removals = [];\n        this.selectionCollection.forEach((feature) => {\n          if (!feature.get(\"previouslySelected\")) removals.push(feature);\n        });\n        removals.forEach((feature) => this.selectionCollection.remove(feature));\n      } else {\n        this.deselectSelected();\n      }\n    }\n\n    const selectAction = (feature) => {\n      if (this.draggingWithAltKey) {\n        this.selectionCollection.remove(feature);\n      } else {\n        this.selectionCollection.push(feature);\n      }\n    };\n\n    // https://openlayers.org/en/latest/examples/box-selection.html\n    // Features that intersect the box geometry are added to the collection of selected features\n    const rotation = this.map.getView().getRotation();\n    const dragBox = this.currentDragBoxInteraction;\n    const extent = dragBox.getGeometry().getExtent();\n\n    const vectorSource = this.selectionVectorSource;\n\n    const oblique = rotation % (Math.PI / 2) !== 0;\n    if (oblique) {\n      // When the view is obliquely rotated the box extent will exceed its geometry so both the\n      // box and the candidate feature geometries are rotated around a common anchor to confirm\n      // that, with the box geometry aligned with its extent, the geometries intersect\n      const anchor = [0, 0];\n      const geometry = dragBox.getGeometry().clone();\n      geometry.rotate(-rotation, anchor);\n      const extent$1 = geometry.getExtent();\n      vectorSource.getFeatures().forEach((feature) => {\n        const geometry = feature.getGeometry().clone();\n        geometry.rotate(-rotation, anchor);\n        if (geometry.intersectsExtent(extent$1)) selectAction(feature);\n      });\n    } else {\n      // If the view is not obliquely rotated the box geometry and its extent are equivalent so\n      // intersecting features can be added directly to the collection\n      vectorSource.forEachFeatureIntersectingExtent(extent, (feature) => selectAction(feature));\n    }\n\n    if (this.onDraggingSelection) this.onDraggingSelection();\n  };\n\n  get selectionVectorSource() {\n    return this.mapManager.panelsVectorSource;\n  }\n\n  #throttledBoxDrag = throttle((e) => this.#boxDrag(e), 50, { trailing: false });\n\n  #boxEnd = (event) => {\n    this.draggingWithShiftKey = undefined;\n    this.draggingWithAltKey = undefined;\n    this.draggingSelectionMarquee = false;\n    this.selectionCollection.forEach((feature) => feature.set(\"previouslySelected\", undefined));\n\n    if (this.onDraggingSelectionEnd) this.onDraggingSelectionEnd(event);\n  };\n\n  #clearCurrentDragBoxInteraction() {\n    if (!this.currentDragBoxInteraction) return;\n\n    this.map.removeInteraction(this.currentDragBoxInteraction);\n    this.#toggleBoxEvents(false);\n    this.currentDragBoxInteraction = undefined;\n  }\n}\n", "import DragBox, { DragBoxEvent } from \"ol/interaction/DragBox\";\n\nexport const DRAG_BOX_CLASSNAME = \"ol-map__drag-box\";\n\n// This adds behavior that makes it possible to press the spacebar key and drag the\n// selection marquee around the map to get it positioned more precisely.\nexport default class extends DragBox {\n  constructor(opt_options) {\n    super(opt_options);\n\n    this.movingBox = false;\n    this.startMovingPixel = undefined;\n    this.currentMovingPixel = undefined;\n  }\n\n  handleDownEvent(mapBrowserEvent) {\n    document.addEventListener(\"keydown\", this.handleKeydown);\n    document.addEventListener(\"keyup\", this.handleKeyup);\n\n    return super.handleDownEvent(mapBrowserEvent);\n  }\n\n  handleKeydown = (mapBrowserEvent) => {\n    if (mapBrowserEvent.key === \" \") {\n      this.startMovingBox(mapBrowserEvent);\n    }\n  };\n\n  startMovingBox(_mapBrowserEvent) {\n    this.movingBox = true;\n  }\n\n  handleKeyup = (mapBrowserEvent) => {\n    if (mapBrowserEvent.key === \" \") {\n      this.stopMovingBox(mapBrowserEvent);\n    }\n  };\n\n  stopMovingBox(mapBrowserEvent) {\n    setTimeout(() => {\n      this.movingBox = false;\n      this.startMovingPixel = undefined;\n    }, 50);\n  }\n\n  handleDragEvent(mapBrowserEvent) {\n    if (this.movingBox) {\n      // Space bar is down, so we want to reposition the box rather than change its size\n      if (!this.currentMovingPixel) this.currentMovingPixel = mapBrowserEvent.pixel;\n\n      const deltaX = this.currentMovingPixel[0] - mapBrowserEvent.pixel[0];\n      const deltaY = this.currentMovingPixel[1] - mapBrowserEvent.pixel[1];\n\n      // In order to reposition the drag box, we need to update internal state in multiple\n      // places. One is this.startPixel_ of the DragBox and the other is the box_.\n      // (this.box_.startPixel_ and this.box_.endPixel_). OL doesn't expose any methods\n      // to do this, so we are just jumping in and modifying the private state.\n      const startPixel = [this.box_.startPixel_[0] - deltaX, this.box_.startPixel_[1] - deltaY];\n      this.startPixel_ = startPixel;\n      const endPixel = [this.box_.endPixel_[0] - deltaX, this.box_.endPixel_[1] - deltaY];\n      this.box_.setPixels(startPixel, endPixel);\n\n      this.currentMovingPixel = mapBrowserEvent.pixel;\n\n      mapBrowserEvent.startPixel = startPixel;\n      mapBrowserEvent.endPixel = endPixel;\n\n      // This is a custom event we've created to so we can have an event handler that\n      // repositions the array\n      this.dispatchEvent(new DragBoxEvent(\"boxmove\", mapBrowserEvent.coordinate, mapBrowserEvent));\n    } else {\n      // Use the normal behavior and have dragging change the box size\n      super.handleDragEvent(mapBrowserEvent);\n    }\n  }\n\n  handleUpEvent(mapBrowserEvent) {\n    document.removeEventListener(\"keydown\", this.handleKeydown);\n    document.removeEventListener(\"keyup\", this.handleKeyup);\n\n    return super.handleUpEvent(mapBrowserEvent);\n  }\n}\n", "import { MEASURE_DATA_TYPE } from \"../../../../da/map/data-types\";\nimport Base from \"./base\";\n\nexport default class Attachments extends Base {\n  filterSelects = (feature, _layer) => {\n    return feature.get(\"dataType\") === MEASURE_DATA_TYPE;\n  };\n\n  selectClickResetInteractionManagers() {\n    // The translate interaction has to be before the modify, or modify doesn't work\n    this.controller.translateInteractionManager.add();\n    this.controller.modifyInteractionManager.add();\n  }\n\n  removeSelectedShapes = () => {\n    this.baseRemoveSelectedShapes();\n  };\n}\n", "import Base from \"../../../../da/map/interaction-managers/snap/base\";\n\nexport default class Arrays extends Base {\n  get snapSources() {\n    return [\n      this.mapManager.roofPlanesVectorSource,\n      this.mapManager.setbacksVectorSource,\n      this.mapManager.panelsVectorSource,\n      this.mapManager.attachmentsVectorSource,\n    ];\n  }\n}\n", "import tippy from \"tippy.js\";\n\nimport DaMapBaseController from \"../../da/layout_editor/map_base_controller\";\n\nimport { createProjectWithRecoveredCoordinates } from \"../../../pr/models/project-loader\";\n\nimport AttachmentsMapManager from \"../../../pr/map/map-managers/attachments\";\nimport AttachmentsMapModelSynchronizer from \"../../../pr/map/map-model-synchronizers/attachments\";\n\nimport MeasureInteractionManager from \"../../../da/map/interaction-managers/measure/base\";\nimport SelectInteractionManager from \"../../../pr/map/interaction-managers/select/attachments\";\nimport SnapInteractionManager from \"../../../pr/map/interaction-managers/snap/attachments\";\nimport TranslateInteractionManager from \"../../../da/map/interaction-managers/translate/base\";\nimport ModifyInteractionManager from \"../../../da/map/interaction-managers/modify/base\";\nimport ShapeGuideLinesInteractionManager from \"../../../da/map/interaction-managers/shape-guide-lines/base\";\n\nimport * as toolbarBtn from \"../../../da/layout-editor/helpers/toolbar-btns\";\nimport * as toolbarSelectGroup from \"../../../da/layout-editor/helpers/toolbar-select-group\";\nimport { EDITOR_MODE_MEASURE, EDITOR_MODE_SELECT } from \"../../../da/layout-editor/helpers/toolbar-constants\";\nimport * as animate from \"../../../helpers/animate\";\n\nimport { applyDomUpdatesFromResponse } from \"../../../helpers/api-dom-helpers\";\nimport { radiansToDegrees } from \"../../../helpers/geometry\";\nimport { fromLonLat } from \"ol/proj\";\n\nexport default class AttachmentsEditorController extends DaMapBaseController {\n  static values = {\n    activeTab: String,\n  };\n\n  static targets = [\n    \"tabLink\",\n    \"map\",\n    \"compass\",\n    \"saveBtn\",\n    \"statusItemZoom\",\n    \"statusItemRotation\",\n    \"statusItemPanelsCount\",\n    \"yesStaggeredBtn\",\n    \"noStaggeredBtn\",\n    \"rafterOffsetContainer\",\n    \"rafterOffsetTextField\",\n    \"rafterOffsetNumberScrollContainer\",\n    \"maxRafterOffsetContainer\",\n    \"lineLengthMenu\",\n    \"lineLengthFeet\",\n    \"lineLengthInches\",\n    \"guideVertexFeet\",\n    \"guideVertexInches\",\n  ];\n\n  connect() {\n    this.activeTab = this.activeTabValue;\n\n    super.connect();\n\n    this.project = createProjectWithRecoveredCoordinates(this.projectData);\n    this.pageRoofPlanes = this.project.roofPlanes;\n    this.focusedRoofPlane = undefined;\n    this.slopeAdjustedMeasures = true;\n    this.renderAttachments = true;\n\n    // This is okay when on a roof plane tab because rotation, panning, and zooming is only\n    // saved when on the overview tab, so we can always refer to this page as \"viewer\".\n    this.page = \"viewer\";\n\n    window.attachmentsMapController = this;\n\n    this.#setActiveTabStyles();\n\n    this.mapModelSynchronizer = new AttachmentsMapModelSynchronizer(this);\n\n    this.mapManager = new AttachmentsMapManager(this);\n    this.mapManager.add();\n    this.mapManager.setProjectSiteValuesOnMoveEnd = this.#onOverviewTab;\n    this.mapManager.checkSegmentsAttachmentStatusLegality();\n\n    this.#setupInteractionManagers();\n\n    this.editorMode = toolbarSelectGroup.getState(\"prAttachmentsEditorMode\", EDITOR_MODE_MEASURE);\n    this.#initializeEditorMode();\n\n    this.#populateStatusbar({ timeout: 500 });\n\n    this.element.controller = this;\n\n    document.addEventListener(\"keydown\", this.handleKeydown);\n  }\n\n  disconnect() {\n    document.removeEventListener(\"keydown\", this.handleKeydown);\n  }\n\n  handleKeydown = (event) => {\n    if (event.key === \"Escape\") {\n      this.measureInteractionManager.finish();\n    }\n  };\n\n  staggeringOptionClick(event) {\n    this.renderAttachments = false;\n    this.#showSaveToViewUpdatedAttachmentPlanTooltip();\n    const staggered = event.params.value === \"yes\";\n    this.project.detail.setStaggeredAttachments(staggered);\n    this.markDirty();\n    this.mapModelSynchronizer.clearAttachmentFeatures();\n\n    const activeClass = \"ol-map__sidebar-forms__yes-no-btns__btn--active\";\n    if (staggered) {\n      this.yesStaggeredBtnTarget.classList.add(activeClass);\n      this.noStaggeredBtnTarget.classList.remove(activeClass);\n    } else {\n      this.yesStaggeredBtnTarget.classList.remove(activeClass);\n      this.noStaggeredBtnTarget.classList.add(activeClass);\n    }\n  }\n\n  tabClick(event) {\n    event.preventDefault();\n\n    this.activeTab = event.params.value;\n\n    this.#setRoofPlanesForActiveTab();\n    this.#populateStatusbar({ timeout: 0 });\n    this.mapManager.reRenderMap();\n    this.#rotateZoomMap();\n    this.#setActiveTabStyles();\n    this.#showHideRafterOffsetContainer();\n  }\n\n  rafterOffsetValueChange(event) {\n    this.renderAttachments = false;\n    this.#showSaveToViewUpdatedAttachmentPlanTooltip();\n\n    let value = this.rafterOffsetTextFieldTarget.value;\n    value = value === \"\" ? 0 : Number.parseInt(value);\n\n    this.focusedRoofPlane.setRafterOffset(value);\n    this.markDirty();\n    this.mapModelSynchronizer.reRenderRafters();\n    this.mapModelSynchronizer.clearAttachmentFeatures();\n  }\n\n  save(_event, onSuccess = () => {}) {\n    this.renderAttachments = true;\n    this.#hideSaveToViewUpdatedAttachmentPlanTooltip();\n\n    toolbarBtn.showSpinner(this.saveBtnTarget);\n    this.project.save({\n      path: this.savePath,\n      onSuccess: (json) => {\n        if (json) applyDomUpdatesFromResponse(json);\n        this.markClean();\n        onSuccess();\n        setTimeout(() => {\n          toolbarBtn.hideSpinner(this.saveBtnTarget);\n        }, 500);\n        this.mapManager.reRenderMap();\n        this.#resetTabLegalityStyles();\n      },\n      onValidationError: this.onValidationError,\n      onServerError: this.onServerError,\n      includeProjectSite: true,\n      includeUploadedBuildingImages: false,\n    });\n  }\n\n  startSelectMode(_event) {\n    this.measureInteractionManager.remove();\n    this.selectInteractionManager.add();\n    this.translateInteractionManager.remove();\n    this.modifyInteractionManager.remove();\n  }\n\n  startMeasureMode(_event) {\n    this.modifyInteractionManager.remove();\n    this.selectInteractionManager.remove();\n    this.translateInteractionManager.remove();\n    this.measureInteractionManager.add();\n  }\n\n  #setupInteractionManagers() {\n    this.selectInteractionManager = new SelectInteractionManager(this);\n\n    this.snapInteractionManager = new SnapInteractionManager(this);\n    this.snapInteractionManager.add();\n\n    this.shapeGuideLinesInteractionManager = new ShapeGuideLinesInteractionManager(this);\n\n    this.modifyInteractionManager = new ModifyInteractionManager(this);\n    this.translateInteractionManager = new TranslateInteractionManager(this);\n\n    this.measureInteractionManager = new MeasureInteractionManager(this);\n  }\n\n  #initializeEditorMode() {\n    switch (this.editorMode) {\n      case EDITOR_MODE_MEASURE:\n        this.startMeasureMode();\n        break;\n      case EDITOR_MODE_SELECT:\n        this.startSelectMode();\n        break;\n      default:\n        this.startMeasureMode();\n    }\n  }\n\n  #showHideRafterOffsetContainer() {\n    const showHide = this.#onOverviewTab ? \"hide\" : \"show\";\n    animate[showHide](this.rafterOffsetContainerTarget);\n\n    if (!this.#onOverviewTab) {\n      this.maxRafterOffsetContainerTarget.innerText = this.focusedRoofPlane.rafterSpacing;\n      this.rafterOffsetTextFieldTarget.value = this.focusedRoofPlane.rafterOffset;\n      this.rafterOffsetNumberScrollContainerTarget.dataset[\"components-IrNumberScrollMaxValue\"] =\n        this.focusedRoofPlane.rafterSpacing;\n    }\n  }\n\n  #setRoofPlanesForActiveTab() {\n    if (this.#onOverviewTab) {\n      this.pageRoofPlanes = this.project.roofPlanes;\n      this.focusedRoofPlane = undefined;\n    } else {\n      const roofPlane = this.#roofPlaneForIdentifier(this.activeTab);\n      this.focusedRoofPlane = roofPlane;\n      this.pageRoofPlanes = [roofPlane];\n    }\n  }\n\n  #rotateZoomMap() {\n    setTimeout(() => {\n      if (this.#onOverviewTab) {\n        this.mapManager.setProjectSiteValuesOnMoveEnd = true;\n        const projectSite = this.project.projectSite;\n        this.mapManager.setCenter(fromLonLat([projectSite.effectiveViewerLng, projectSite.effectiveViewerLat]));\n        this.mapManager.zoomTo(projectSite.effectiveViewerZoom);\n        this.mapManager.rotateTo(projectSite.effectiveViewerRotation);\n      } else {\n        this.mapManager.setProjectSiteValuesOnMoveEnd = false;\n        this.alignViewToFeature(this.mapModelSynchronizer.getFeatureForRoofPlane(this.focusedRoofPlane));\n        this.mapManager.rotateTo(this.focusedRoofPlane.eaveRotationAngleRadians);\n      }\n    }, 200);\n  }\n\n  get #onOverviewTab() {\n    return this.activeTab === \"overview\";\n  }\n\n  #roofPlaneForIdentifier(identifier) {\n    return this.project.roofPlanes.find((rp) => rp.identifier === identifier);\n  }\n\n  #populateStatusbar({ timeout }) {\n    // When a value like rotation updates, we need to wait for OL to finish doing its thing\n    setTimeout(() => {\n      this.statusItemZoomTarget.innerText = this.mapManager.zoom.toFixed(3);\n      this.statusItemRotationTarget.innerText = `${radiansToDegrees(this.mapManager.rotation).toFixed(1)}\u00B0`;\n      if (this.#onOverviewTab) {\n        this.statusItemPanelsCountTarget.innerText = this.project.panelsCount;\n      } else {\n        this.statusItemPanelsCountTarget.innerText = `${this.focusedRoofPlane.panelsCount}/${this.project.panelsCount}`;\n      }\n    }, timeout);\n  }\n\n  #setActiveTabStyles() {\n    this.tabLinkTargets.forEach((tabLink) => {\n      const tabValue = tabLink.dataset[\"pr-ImageBased-AttachmentsEditorValueParam\"];\n      const addRemove = tabValue === this.activeTab ? \"add\" : \"remove\";\n      tabLink.classList[addRemove](\"ir-content-tabs__link--active\");\n    });\n  }\n\n  #resetTabLegalityStyles() {\n    this.tabLinkTargets.forEach((tabLink) => {\n      const roofPlaneIdentifier = tabLink.dataset[\"pr-ImageBased-AttachmentsEditorValueParam\"];\n      if (roofPlaneIdentifier === \"overview\") return;\n\n      const roofPlane = this.project.roofPlaneForIdentifier(roofPlaneIdentifier);\n      const addRemove = roofPlane.isAttachmentPlanStatusLegal ? \"remove\" : \"add\";\n      const errorClass = \"ir-content-tabs__link--error\";\n      tabLink.classList[addRemove](errorClass);\n    });\n  }\n\n  #showSaveToViewUpdatedAttachmentPlanTooltip() {\n    if (this.saveTippy) return;\n\n    this.saveTippy = tippy(this.saveBtnTarget, {\n      content: \"Save to view updated attachment plan\",\n      theme: \"info\",\n      animation: \"fade\",\n      placement: \"right\",\n      allowHTML: true,\n      showOnCreate: true,\n      trigger: \"manual\",\n      hideOnClick: false,\n    });\n  }\n\n  #hideSaveToViewUpdatedAttachmentPlanTooltip() {\n    if (!this.saveTippy) return;\n\n    this.saveTippy.destroy();\n    this.saveTippy = undefined;\n  }\n\n  zoomOut(event) {\n    super.zoomOut(event);\n    this.updateProjectSiteValuesForOtherMaps(this.viewOnlyMapController);\n  }\n\n  zoomIn(event) {\n    super.zoomIn(event);\n    this.updateProjectSiteValuesForOtherMaps(this.viewOnlyMapController);\n  }\n\n  rotateCounterClockwise(event) {\n    super.rotateCounterClockwise(event);\n    this.updateProjectSiteValuesForOtherMaps(this.viewOnlyMapController);\n  }\n\n  mapMoveUpdateOtherMaps() {\n    this.updateProjectSiteValuesForOtherMaps(this.viewOnlyMapController);\n  }\n\n  get viewOnlyMapController() {\n    const el = document.querySelector(\"[data-controller='pr--image-based--layout-editor--map-view-only']\");\n    if (!el) return;\n    return el.controller;\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport tippy, { followCursor } from \"tippy.js\";\n\nexport default class LockedTooltipController extends Controller {\n  static values = {\n    disable: { type: Boolean, default: false },\n    content: { type: String, default: \"This area is locked from<br />modification\" },\n  };\n\n  connect() {\n    this.element.lockedTooltipController = this;\n\n    const tooltip = `\n      <div class=\"d-flex\">\n        <div class=\"pe-3\">\n          <i class=\"fas fa-lock\"></i>\n        </div>\n        <div>\n          ${this.contentValue}\n          <div class=\"small pt-3\">&larr; Unlock in the sidebar</div>\n        </div>\n      </div>`;\n\n    this.tippy = tippy(this.element, {\n      content: tooltip,\n      theme: \"locked\",\n      animation: \"fade\",\n      followCursor: true,\n      placement: \"bottom\",\n      allowHTML: true,\n      plugins: [followCursor],\n    });\n\n    if (this.disableValue) this.disable();\n  }\n\n  disable() {\n    this.tippy.disable();\n  }\n\n  enable() {\n    this.tippy.enable();\n  }\n}\n", "import { createProjectWithRecoveredCoordinates } from \"../../../../pr/models/project-loader\";\nimport DaMapBaseController from \"../../../da/layout_editor/map_base_controller\";\nimport { applyDomUpdatesFromResponse } from \"../../../../helpers/api-dom-helpers\";\nimport * as toolbarBtn from \"../../../../da/layout-editor/helpers/toolbar-btns\";\nimport * as animate from \"../../../../helpers/animate\";\n\nexport default class MapBaseController extends DaMapBaseController {\n  static targets = [\n    \"map\",\n    \"compass\",\n    \"drawBtn\",\n    \"shapesBtn\",\n    \"selectBtn\",\n    \"deleteBtn\",\n    \"measureBtn\",\n    \"saveBtn\",\n    \"statusItemZoom\",\n    \"statusItemRotation\",\n    \"lineLengthMenu\",\n    \"lineLengthFeet\",\n    \"lineLengthInches\",\n    \"guideVertexFeet\",\n    \"guideVertexInches\",\n  ];\n\n  connect() {\n    super.connect();\n\n    this.project = createProjectWithRecoveredCoordinates(this.projectData);\n\n    window.IR_GLOBALS.projectModel = this.project;\n  }\n\n  get isDirty() {\n    return this.dirty;\n  }\n\n  modelSave({ model, onSuccess = () => {}, includeProjectSite }) {\n    toolbarBtn.showSpinner(this.saveBtnTarget);\n    model.save({\n      path: this.savePath,\n      onSuccess: (json) => {\n        if (json) applyDomUpdatesFromResponse(json);\n        this.markClean();\n        onSuccess();\n        setTimeout(() => {\n          toolbarBtn.hideSpinner(this.saveBtnTarget);\n        }, 500);\n      },\n      onValidationError: this.onValidationError,\n      onServerError: this.onServerError,\n      includeProjectSite,\n    });\n  }\n\n  // Called by both Stimulus event handler and saveAndThenRedirect triggered by auto save controller\n  save(_event, onSuccess = () => {}) {\n    this.modelSave({ model: this.project, onSuccess, includeProjectSite: true });\n  }\n\n  showEncroachingWarningMessage(shouldShow) {\n    const messageContainer = document.querySelector(\"[data-identifier='arraysEncroachingMessageContainer']\");\n    if (!messageContainer) return;\n\n    if (shouldShow) {\n      animate.show(messageContainer);\n    } else {\n      animate.hide(messageContainer, { fadeOut: false });\n    }\n  }\n\n  showNeedsThermalExpansionWarningMessage(shouldShow) {\n    const messageContainer = document.querySelector(\"[data-identifier='arraysNeedThermalExpansionMessageContainer']\");\n    if (!messageContainer) return;\n\n    if (shouldShow) {\n      animate.show(messageContainer);\n    } else {\n      animate.hide(messageContainer, { fadeOut: false });\n    }\n  }\n}\n", "import BaseMapModelSynchronizer from \"./base\";\n\nexport default class ArraysMapModelSynchronizer extends BaseMapModelSynchronizer {\n  loadSetbacks() {\n    return [this.buildSetbackForRoofPlane(this.controller.focusedRoofPlane)];\n  }\n}\n", "import { segmentsFlushAroundThermalExpansion } from \"../modification-helpers/thermal-expansions/helpers\";\n\nexport const MAX_THERMAL_EXPANSION_GAP_FOR_BONDING_JUMPERS = 7; // inches\n\nexport default class ThermalExpansionGaps {\n  constructor({ controller, segment }) {\n    this.controller = controller;\n    this.mapManager = controller.mapManager;\n    this.mapModelSynchronizer = controller.mapModelSynchronizer;\n\n    this.segment = segment;\n    this.thermalExpansionGaps = this.#getThermalExpansionGaps();\n  }\n\n  get hasGapThatExceedsBondingJumperCompatibility() {\n    return this.thermalExpansionGaps.some((g) => g > MAX_THERMAL_EXPANSION_GAP_FOR_BONDING_JUMPERS);\n  }\n\n  #getThermalExpansionGaps() {\n    if (this.segment.thermalExpansions.length === 0 || this.segment.deleted) return [];\n\n    const result = [];\n    this.segment.thermalExpansions.forEach((thermalExpansion) => {\n      const [segmentBefore, segmentAfter] = segmentsFlushAroundThermalExpansion(this.controller, thermalExpansion);\n      if (!segmentBefore || !segmentAfter) return;\n\n      const distance = this.mapModelSynchronizer.getDistanceInInches(\n        segmentBefore.latLngPoints[1],\n        segmentAfter.startLatLng,\n      );\n      result.push(distance);\n    });\n\n    return result;\n  }\n}\n", "import VectorLayer from \"ol/layer/Vector\";\nimport VectorSource from \"ol/source/Vector\";\n\nimport BaseMapManager from \"./base\";\nimport { silhouettePanelsStyle } from \"../styles/zone-panels\";\nimport { rowsColumnsMarkerStyle } from \"../styles/segments\";\nimport * as events from \"../../../da/map/events\";\nimport { logger } from \"../../../helpers/app\";\n\nimport {\n  EDITOR_MODE_DRAW,\n  EDITOR_MODE_SELECT,\n  SELECT_TYPE_MEASURES,\n  SELECT_TYPE_PANELS,\n  SELECT_TYPE_SEGMENTS,\n  SELECT_TYPE_THERMAL_EXPANSIONS,\n} from \"../../../da/layout-editor/helpers/toolbar-constants\";\nimport {\n  MEASURE_DATA_TYPE,\n  PANEL_DATA_TYPE,\n  SEGMENT_DATA_TYPE,\n  THERMAL_EXPANSION_DATA_TYPE,\n} from \"../../../da/map/data-types\";\nimport ThermalExpansionGaps from \"../legality-checkers/thermal-expansion-gaps\";\nimport { reRenderSegment } from \"../modification-helpers/segments/helpers\";\n\nexport default class ArraysMapManager extends BaseMapManager {\n  add() {\n    this.buildRoofPlanesVectorSource();\n    this.buildRoofSectionsVectorSource();\n    this.buildSetbacksVectorSource();\n    this.buildMeasuresVectorSource();\n    this.buildShapeGuideLinesVectorSource();\n    this.buildPanelsVectorSource();\n    this.buildSilhouettePanelsVectorSource();\n    this.buildRowsColumnsMarkerVectorSource();\n    this.buildSegmentsVectorSource();\n    this.buildRailsVectorSource();\n    this.buildThermalExpansionsVectorSource();\n    this.buildAdjoinmentsVectorSource();\n    this.buildContourLegalityAdjoinmentsVectorSource();\n    this.buildContoursVectorSource();\n\n    this.map = this.buildMap({\n      layers: [\n        this.tileLayer,\n        this.visualMarkersVectorLayer,\n        this.roofPlanesVectorLayer,\n        this.measuresVectorLayer,\n        this.shapeGuideLinesVectorLayer,\n        this.panelsVectorLayer,\n        this.roofSectionsVectorLayer,\n        this.setbacksVectorLayer,\n        this.silhouettePanelsVectorLayer,\n        this.rowsColumnsMarkerVectorLayer,\n        this.segmentsVectorLayer,\n        this.railsVectorLayer,\n        this.thermalExpansionsVectorLayer,\n        this.contourLegalityAdjoinmentsVectorLayer,\n        this.adjoinmentsVectorLayer,\n        this.contoursVectorLayer,\n      ],\n    });\n\n    // We need to have the map in place first\n    this.buildRafterVectorSourcesLayersAndFeatures();\n    this.renderContourFeatures();\n    this.addBuildingImagePlacementLayers();\n\n    this.setProjectSiteValuesOnMoveEnd = false;\n\n    this.map.on(\"moveend\", this.onMoveEnd);\n    this.map.on(\"click\", this.onMapClick);\n    this.map.on(\"dblclick\", this.onMapDblClick);\n\n    this.map.on(events.BEFORE_MAP_FEATURES_RENDERING_EVENT, (event) => {\n      logger(`Dispatch ${events.BEFORE_MAP_FEATURES_RENDERING_EVENT} called from ${event.calledFrom}`);\n\n      this.clearAdjoinmentFeatures();\n      this.clearContourLegalityAdjoinmentFeatures();\n      this.clearContourFeatures();\n    });\n\n    this.map.on(events.AFTER_MAP_FEATURES_RENDERING_EVENT, (event) => {\n      logger(`Dispatch ${events.AFTER_MAP_FEATURES_RENDERING_EVENT} called from ${event.calledFrom}`);\n\n      this.checkLegality();\n      this.controller.enableDisableThermalExpansionButton();\n\n      this.clearAdjoinmentFeatures();\n      this.clearContourLegalityAdjoinmentFeatures();\n\n      this.renderAdjoinAlignments();\n      this.renderContourLegalityAdjoinAlignments();\n      this.mapModelSynchronizer.reRenderContourFeatures();\n\n      this.#checkThermalExpansionGaps();\n\n      this.controller.focusedRoofPlane.roofSections.forEach((rs) => {\n        rs.segments.forEach((s) => {\n          if (s.hasContourCodesAndDetailsMismatch) {\n            console.log(\"Warning: Contour Codes Mismatch\");\n            debugger;\n          }\n        });\n      });\n\n      this.controller.addSnapshotToUndoQueue();\n    });\n  }\n\n  clearFeaturesBeforeSnapshotUpdate() {\n    this.clearAdjoinmentFeatures();\n    this.clearContourLegalityAdjoinmentFeatures();\n    this.clearContourFeatures();\n    this.clearRafterFeatures();\n    this.clearPanelFeatures();\n    this.clearSegmentFeatures();\n    this.clearRailFeatures();\n    this.clearThermalExpansionFeatures();\n  }\n\n  renderFeaturesAfterSnapshotUpdate() {\n    this.controller.focusedRoofPlane.roofSections.forEach((roofSection) => {\n      roofSection.segments.forEach((segment) => {\n        reRenderSegment(this.controller, segment);\n      });\n    });\n\n    this.renderAdjoinAlignments();\n    this.renderContourLegalityAdjoinAlignments();\n    this.renderContourFeatures();\n    this.renderRafterFeatures();\n  }\n\n  checkLegality() {\n    const legalityChecker = super.checkLegality();\n    this.controller.encroaching = legalityChecker.encroaching;\n    this.controller.needsThermalExpansion = legalityChecker.needsThermalExpansion;\n    this.controller.showEncroachingWarningMessage(legalityChecker.encroaching);\n    this.controller.showNeedsThermalExpansionWarningMessage(legalityChecker.needsThermalExpansion);\n  }\n\n  onMapClick = (event) => {\n    const { coordinate } = event;\n    const pixelCoordinate = this.map.getPixelFromCoordinate(coordinate);\n    const featuresAtPixel = this.map.getFeaturesAtPixel(pixelCoordinate);\n\n    if (this.controller.editorMode === EDITOR_MODE_DRAW) {\n      this.onMapClickInDrawMode(event, featuresAtPixel);\n    } else if (this.controller.editorMode === EDITOR_MODE_SELECT) {\n      this.onMapClickInSelectMode(event, featuresAtPixel);\n    }\n  };\n\n  onMapClickInDrawMode(event, featuresAtPixel) {\n    const shiftKey = event.originalEvent.shiftKey;\n\n    let featuresToSelect = [];\n\n    if (shiftKey) {\n      const segmentFeatures = featuresAtPixel.filter((feature) => feature.get(\"dataType\") === SEGMENT_DATA_TYPE);\n\n      if (segmentFeatures.length === 0) return;\n\n      this.controller.setSelectToSegment();\n      featuresToSelect = segmentFeatures;\n    } else {\n      const panelFeatures = featuresAtPixel.filter((feature) => feature.get(\"dataType\") === PANEL_DATA_TYPE);\n\n      if (panelFeatures.length === 0) return;\n\n      this.controller.setSelectToPanel();\n      featuresToSelect = panelFeatures;\n    }\n\n    setTimeout(() => {\n      this.controller.selectInteractionManager.addToSelection(featuresToSelect);\n    }, 500);\n  }\n\n  onMapClickInSelectMode(_event, featuresAtPixel) {\n    const measureFeaturesAtPixel = featuresAtPixel.filter((feature) => feature.get(\"dataType\") === MEASURE_DATA_TYPE);\n    const segmentFeaturesAtPixel = featuresAtPixel.filter((feature) => feature.get(\"dataType\") === SEGMENT_DATA_TYPE);\n    const thermalExpansionFeatureAtPixel = featuresAtPixel.filter(\n      (feature) => feature.get(\"dataType\") === THERMAL_EXPANSION_DATA_TYPE,\n    );\n\n    const featuresToCheckFor = [measureFeaturesAtPixel, segmentFeaturesAtPixel, thermalExpansionFeatureAtPixel];\n    if (featuresToCheckFor.every((arr) => arr.length === 0)) return;\n\n    const hasPreexistingSelection = (dataTypes) => {\n      const preexistingSelectionsOfType = this.controller.selectInteractionManager.selectedFeatures.filter(\n        (feature) => {\n          return dataTypes.includes(feature.get(\"dataType\"));\n        },\n      );\n      return preexistingSelectionsOfType.length > 0;\n    };\n\n    const selectType = this.controller.selectType;\n\n    if (thermalExpansionFeatureAtPixel.length > 0) {\n      if (!hasPreexistingSelection([SEGMENT_DATA_TYPE, PANEL_DATA_TYPE, MEASURE_DATA_TYPE])) {\n        if (selectType !== SELECT_TYPE_THERMAL_EXPANSIONS) {\n          this.controller.setSelectToThermalExpansion();\n        }\n      }\n    } else if (measureFeaturesAtPixel.length > 0) {\n      if (!hasPreexistingSelection([SEGMENT_DATA_TYPE, PANEL_DATA_TYPE, THERMAL_EXPANSION_DATA_TYPE])) {\n        if (selectType !== SELECT_TYPE_MEASURES) {\n          this.controller.setSelectToMeasure();\n        }\n      }\n    } else if (segmentFeaturesAtPixel.length > 0) {\n      if (!hasPreexistingSelection([SEGMENT_DATA_TYPE, THERMAL_EXPANSION_DATA_TYPE, MEASURE_DATA_TYPE])) {\n        if (selectType === SELECT_TYPE_SEGMENTS) {\n          return;\n        } else if (selectType !== SELECT_TYPE_PANELS) {\n          this.controller.setSelectToPanel();\n        }\n      }\n    }\n  }\n\n  onMapDblClick = (event) => {\n    if (this.controller.editorMode !== EDITOR_MODE_SELECT) return;\n\n    const { coordinate, originalEvent } = event;\n\n    const pixelCoordinate = this.map.getPixelFromCoordinate(coordinate);\n    const featuresAtPixel = this.map.getFeaturesAtPixel(pixelCoordinate);\n\n    if (originalEvent.shiftKey) return;\n\n    const segmentFeatures = featuresAtPixel.filter((feature) => feature.get(\"dataType\") === SEGMENT_DATA_TYPE);\n    const panelFeatures = featuresAtPixel.filter((feature) => feature.get(\"dataType\") === PANEL_DATA_TYPE);\n\n    if (segmentFeatures.length === 0 || panelFeatures.length === 0) return;\n\n    if (this.controller.selectType === SELECT_TYPE_SEGMENTS) {\n      this.controller.setSelectToPanel();\n      this.controller.selectInteractionManager.addToSelection(panelFeatures);\n    } else if (this.controller.selectType === SELECT_TYPE_PANELS) {\n      this.controller.setSelectToSegment();\n      this.controller.selectInteractionManager.addToSelection(segmentFeatures);\n    }\n  };\n\n  get silhouettePanelsVectorLayer() {\n    if (!this.memoSilhouettePanelsVectorLayer) {\n      this.memoSilhouettePanelsVectorLayer = new VectorLayer({\n        source: this.silhouettePanelsVectorSource,\n        style: (feature) => silhouettePanelsStyle(feature),\n        zIndex: 70,\n      });\n    }\n    return this.memoSilhouettePanelsVectorLayer;\n  }\n\n  buildSilhouettePanelsVectorSource() {\n    this.silhouettePanelsVectorSource = new VectorSource();\n  }\n\n  buildRowsColumnsMarkerVectorSource() {\n    this.rowsColumnsMarkerVectorSource = new VectorSource();\n  }\n\n  get rowsColumnsMarkerVectorLayer() {\n    if (!this.memoRowsColumnsMarkerVectorLayer) {\n      this.memoRowsColumnsMarkerVectorLayer = new VectorLayer({\n        source: this.rowsColumnsMarkerVectorSource,\n        style: (feature) => rowsColumnsMarkerStyle(feature),\n        zIndex: 70,\n      });\n    }\n    return this.memoRowsColumnsMarkerVectorLayer;\n  }\n\n  adjustPanelSegmentZIndexesForSelectType(selectType) {\n    if (selectType === SELECT_TYPE_SEGMENTS) {\n      this.segmentsVectorLayer.setZIndex(60);\n      this.panelsVectorLayer.setZIndex(40);\n    } else {\n      this.panelsVectorLayer.setZIndex(60);\n      this.segmentsVectorLayer.setZIndex(40);\n    }\n  }\n\n  #checkThermalExpansionGaps() {\n    this.controller.focusedRoofPlane.roofSections.forEach((roofSection) => {\n      roofSection.railedParentSegments.forEach((segment) => {\n        const thermalExpansionGaps = new ThermalExpansionGaps({ controller: this.controller, segment });\n        const hasIllegalGaps = thermalExpansionGaps.hasGapThatExceedsBondingJumperCompatibility;\n        segment.setThermalExpansionGapExceedingBondingJumperLimit(hasIllegalGaps);\n      });\n    });\n  }\n}\n", "import { createNewSegment, renderNewSegment } from \"../segments/helpers\";\nimport SegmentsRailGroup from \"../../map-model-synchronizers/segments-rail-group\";\nimport { getSnapshot } from \"mobx-state-tree\";\nimport SimpleLatLng from \"../../../../da/map/models/simple-lat-lng\";\nimport { clearOutAnyIllegalThermalExpansions } from \"./helpers\";\nimport { cartesianPointRelativeTo } from \"../../../../da/map/ol-geometry\";\n\nexport default class PanelsDeleter {\n  constructor({ controller, selectionCollection }) {\n    this.controller = controller;\n    this.selectionCollection = selectionCollection;\n\n    this.mapModelSynchronizer = controller.mapModelSynchronizer;\n    this.mapManager = controller.mapManager;\n\n    this.railGroups = SegmentsRailGroup.uniqueGroupsFromPanelFeatures({\n      controller,\n      features: selectionCollection.getArray(),\n    });\n  }\n\n  delete(deleteType = \"unrailed\") {\n    this.deleteType = deleteType;\n    this.railGroups.forEach((railGroup) => {\n      this.#deletePanelsAndGenerateNewRailGroups(railGroup);\n    });\n  }\n\n  #deletePanelsAndGenerateNewRailGroups(railGroup) {\n    const railGroupsSets = this.#railGroupDeletionProcessingSets(railGroup);\n    const creationData = this.#generateRailGroupsCreationData(railGroupsSets);\n\n    const roofSection = railGroup.roofSection;\n    const orientation = railGroup.segments[0].orientation;\n\n    railGroup.deleteSegments();\n\n    this.#createAndRenderNewRailGroups(creationData, roofSection, orientation);\n  }\n\n  #createAndRenderNewRailGroups(railGroupsCreationData, roofSection, orientation) {\n    railGroupsCreationData.forEach((newRailGroupCreationData) => {\n      let parent;\n      const segments = newRailGroupCreationData.map((segmentCreationData, i) => {\n        segmentCreationData.orientation = orientation;\n\n        if (i === 0) {\n          segmentCreationData.railed = true;\n        } else {\n          segmentCreationData.railedParentUuid = parent.uuid;\n          segmentCreationData.railed = false;\n          segmentCreationData.distanceFromRailedParentStart = this.mapModelSynchronizer.getDistanceInInches(\n            parent.startLatLng,\n            new SimpleLatLng(segmentCreationData.startLatLng.lat, segmentCreationData.startLatLng.lng),\n          );\n        }\n\n        const newSegment = createNewSegment(this.controller, roofSection, segmentCreationData);\n        if (i === 0 && segmentCreationData.thermalExpansionStartLatLngs.length > 0) {\n          const originLonLat = this.controller.project.detail.originLatLng.toLonLat;\n          segmentCreationData.thermalExpansionStartLatLngs.forEach((startLatLng) => {\n            const startCartesianPoint = cartesianPointRelativeTo(startLatLng.toLonLat, originLonLat);\n            newSegment.addThermalExpansion({ startLatLng, startCartesianPoint });\n          });\n        }\n\n        if (i === 0) parent = newSegment;\n\n        return newSegment;\n      });\n\n      if (segments[0]) {\n        clearOutAnyIllegalThermalExpansions(segments[0], this.mapModelSynchronizer);\n      }\n\n      segments.forEach((segment) => renderNewSegment(this.controller, segment));\n    });\n  }\n\n  // Takes rail groups deletion processing sets and returns new rail groups creation data\n  #generateRailGroupsCreationData(railGroupsDeletionProcessingSets) {\n    const railGroupsCreationData = [];\n    railGroupsDeletionProcessingSets.forEach((railGroupSet) => {\n      const segmentsCreationData = [];\n      const splitSegmentIndexes = [];\n\n      let consolidatedColumnIndexOffset = 0;\n      railGroupSet.simplifiedGridPattern.forEach((segmentPattern, rowIndex) => {\n        // Break the segment pattern up on deletions\n        const setNewSegmentFromPattern = (segmentColumnIndex) => {\n          const startLatLng =\n            railGroupSet.panelStartLatLngsForConsolidatedFirstRow[consolidatedColumnIndexOffset + segmentColumnIndex];\n\n          const firstColumnOfZoneAndModulePositions = railGroupSet.zonesAndModulePositionsGrid.map((gridRow) => {\n            return [gridRow[consolidatedColumnIndexOffset + segmentColumnIndex]];\n          });\n\n          const firstColumnOfContourCodes = railGroupSet.contourCodesGrid.map((gridRow) => {\n            return [gridRow[consolidatedColumnIndexOffset + segmentColumnIndex]];\n          });\n\n          return {\n            rows: railGroupSet.rows,\n            columns: 1,\n            startLatLng,\n            zonesAndModulePositionsGrid: firstColumnOfZoneAndModulePositions,\n            contourCodesGrid: firstColumnOfContourCodes,\n          };\n        };\n\n        let currentSegmentFromPattern = undefined;\n        segmentPattern.forEach((panelStatus, segmentColumnIndex) => {\n          if (panelStatus === \"O\") {\n            if (currentSegmentFromPattern) {\n              currentSegmentFromPattern.columns++;\n              // Add next column of zones and module positions grid data\n              currentSegmentFromPattern.zonesAndModulePositionsGrid.forEach((gridRow, gridRowIndex) => {\n                gridRow.push(\n                  railGroupSet.zonesAndModulePositionsGrid[gridRowIndex][\n                    consolidatedColumnIndexOffset + segmentColumnIndex\n                  ],\n                );\n              });\n\n              currentSegmentFromPattern.contourCodesGrid.forEach((gridRow, gridRowIndex) => {\n                gridRow.push(\n                  railGroupSet.contourCodesGrid[gridRowIndex][consolidatedColumnIndexOffset + segmentColumnIndex],\n                );\n              });\n            } else {\n              currentSegmentFromPattern = setNewSegmentFromPattern(segmentColumnIndex);\n            }\n          } else if (panelStatus === \"X\") {\n            if (currentSegmentFromPattern) {\n              segmentsCreationData.push(currentSegmentFromPattern);\n              currentSegmentFromPattern = undefined;\n            }\n            if (!(segmentColumnIndex === 0 && rowIndex === 0)) {\n              const index = segmentsCreationData.length === 0 ? 0 : segmentsCreationData.length - 1;\n              splitSegmentIndexes.push(index);\n            }\n          }\n        });\n\n        if (currentSegmentFromPattern) {\n          segmentsCreationData.push(currentSegmentFromPattern);\n        }\n\n        consolidatedColumnIndexOffset += segmentPattern.length;\n      });\n\n      if (segmentsCreationData[0]) {\n        segmentsCreationData[0].thermalExpansionStartLatLngs = railGroupSet.thermalExpansionStartLatLngs;\n      }\n\n      // If we're doing unrailed deletions, we need to create new rail groups for each segment split.\n      // This takes the segmentsCreationData and splits it into separate rail groups.\n      if (\n        this.deleteType === \"unrailed\" &&\n        splitSegmentIndexes.length > 0 &&\n        !(splitSegmentIndexes.length === 1 && splitSegmentIndexes[0] === segmentsCreationData.length - 1)\n      ) {\n        splitSegmentIndexes.push(segmentsCreationData.length - 1);\n\n        for (let i = 0; i < splitSegmentIndexes.length; i++) {\n          const previousSegmentIndexSplit = i === 0 ? 0 : splitSegmentIndexes[i - 1] + 1;\n          const splitSegmentIndex = splitSegmentIndexes[i] + 1;\n          if (previousSegmentIndexSplit <= splitSegmentIndex) {\n            const newRailGroupFromSplit = segmentsCreationData.slice(previousSegmentIndexSplit, splitSegmentIndex);\n            if (newRailGroupFromSplit.length > 0) {\n              if (!newRailGroupFromSplit[0].thermalExpansionStartLatLngs) {\n                newRailGroupFromSplit[0].thermalExpansionStartLatLngs = railGroupSet.thermalExpansionStartLatLngs.map(\n                  (ll) => ll.clone,\n                );\n              }\n              railGroupsCreationData.push(newRailGroupFromSplit);\n            }\n          }\n        }\n      } else {\n        railGroupsCreationData.push(segmentsCreationData);\n      }\n    });\n\n    return railGroupsCreationData;\n  }\n\n  // Data structures for creating new rail groups and segments with selected panels removed\n  #railGroupDeletionProcessingSets(railGroup) {\n    const selectionsGrid = railGroup.simplifiedGrid;\n    const consolidatedPanelsGrid = railGroup.consolidatedPanelsGrid;\n    const consolidatedSegmentZonesAndModulePositionsGrid = railGroup.consolidatedSegmentZonesAndModulePositionsGrid;\n    const consolidatedContourCodesGrid = railGroup.consolidatedContourCodesGrid;\n\n    const newRailGroupSets = [];\n    let currentRailGroupSet;\n\n    selectionsGrid.forEach((railRow, i) => {\n      const comparisonString = railRow.map((segmentRow) => segmentRow.join(\"\")).join(\"\");\n      const zonesAndModulePositionsGrid = consolidatedSegmentZonesAndModulePositionsGrid[i];\n      const contourCodesGrid = consolidatedContourCodesGrid[i];\n\n      let firstRowLatLng;\n      const panelStartLatLngsForConsolidatedFirstRow = consolidatedPanelsGrid[i].map((pf, i) => {\n        const ll = pf.get(\"model\").startLatLng;\n        if (i === 0) firstRowLatLng = ll;\n        return getSnapshot(ll);\n      });\n\n      const oldStartToNewStartLatLngVect = railGroup.railedParentSegment.startLatLng.minus(firstRowLatLng);\n\n      const thermalExpansionStartLatLngs = railGroup.railedParentSegment.thermalExpansions.map((thermalExpansion) => {\n        return thermalExpansion.startLatLng.minus(oldStartToNewStartLatLngVect);\n      });\n\n      const setNewRailGroupSet = () => {\n        currentRailGroupSet = {\n          comparisonString,\n          rows: 1,\n          simplifiedGridPattern: railRow,\n          panelStartLatLngsForConsolidatedFirstRow,\n          zonesAndModulePositionsGrid: [zonesAndModulePositionsGrid],\n          contourCodesGrid: [contourCodesGrid],\n          thermalExpansionStartLatLngs,\n        };\n      };\n\n      if (i === 0) {\n        setNewRailGroupSet();\n        return;\n      }\n\n      if (comparisonString === currentRailGroupSet.comparisonString) {\n        currentRailGroupSet.rows++;\n        currentRailGroupSet.zonesAndModulePositionsGrid.push(consolidatedSegmentZonesAndModulePositionsGrid[i]);\n        currentRailGroupSet.contourCodesGrid.push(consolidatedContourCodesGrid[i]);\n      } else {\n        newRailGroupSets.push(currentRailGroupSet);\n        setNewRailGroupSet();\n      }\n    });\n    newRailGroupSets.push(currentRailGroupSet);\n\n    return newRailGroupSets;\n  }\n}\n", "import SegmentsRailGroup from \"../../map-model-synchronizers/segments-rail-group\";\n\nexport default class SegmentsDeleter {\n  constructor({ controller, selectionCollection }) {\n    this.controller = controller;\n    this.selectionCollection = selectionCollection;\n\n    this.railGroups = SegmentsRailGroup.uniqueGroupsFromSegmentFeatures({\n      controller,\n      features: selectionCollection.getArray(),\n    });\n  }\n\n  delete() {\n    this.railGroups.forEach((railGroup) => {\n      railGroup.selectedSegments.forEach((segment) => {\n        railGroup.deleteSegment(segment);\n      });\n      railGroup.reRenderSegments();\n    });\n  }\n}\n", "import SegmentsRailGroup from \"../../map-model-synchronizers/segments-rail-group\";\nimport {\n  DISTANCE_THRESHOLD,\n  segmentsFlushAroundThermalExpansion,\n  thermalExpansionFeaturesSortedByDistanceToRailedParentStart,\n} from \"./helpers\";\n\nexport default class ThermalExpansionsDeleter {\n  constructor({ controller }) {\n    this.controller = controller;\n    this.project = controller.project;\n    this.mapModelSynchronizer = controller.mapModelSynchronizer;\n    this.mapManager = controller.mapManager;\n    this.selectInteractionManager = controller.selectInteractionManager;\n    this.selectedFeatures = this.selectInteractionManager.selectedFeatures;\n    this.selectionCollection = this.selectInteractionManager.selectionCollection;\n  }\n\n  delete() {\n    const removalsBySegmentUuid = this.#selectedFeaturesGroupedByRailedParentUuid;\n    Object.keys(removalsBySegmentUuid).forEach((segmentUuid) => {\n      const removals = thermalExpansionFeaturesSortedByDistanceToRailedParentStart(removalsBySegmentUuid[segmentUuid]);\n\n      removals.forEach((thermalExpansionFeature) => {\n        const thermalExpansion = thermalExpansionFeature.get(\"model\");\n        const segment = thermalExpansion.segment;\n        const railGroup = SegmentsRailGroup.fromSegmentUuid({ controller: this.controller, uuid: segment.uuid });\n\n        this.#removeThermalExpansion(thermalExpansion, thermalExpansionFeature, railGroup);\n\n        railGroup.reRenderSegments();\n      });\n    });\n  }\n\n  get #selectedFeaturesGroupedByRailedParentUuid() {\n    const result = {};\n    this.selectedFeatures.forEach((feature) => {\n      const segmentUuid = feature.get(\"segmentUuid\");\n      if (!result[segmentUuid]) result[segmentUuid] = [];\n\n      result[segmentUuid].push(feature);\n    });\n    return result;\n  }\n\n  #removeThermalExpansion(thermalExpansion, thermalExpansionFeature, railGroup) {\n    this.#mergeSegmentsIfThermalExpansionIsFlush(thermalExpansion, railGroup);\n    this.selectionCollection.remove(thermalExpansionFeature);\n    railGroup.railedParentSegment.deleteThermalExpansion(thermalExpansion);\n  }\n\n  #mergeSegmentsIfThermalExpansionIsFlush(thermalExpansion, railGroup) {\n    const [segmentBeforeThermalExpansion, segmentAfterThermalExpansion] = segmentsFlushAroundThermalExpansion(\n      this.controller,\n      thermalExpansion,\n    );\n\n    if (!segmentBeforeThermalExpansion || !segmentAfterThermalExpansion) return;\n\n    const distanceBetweenSegments =\n      segmentAfterThermalExpansion.distanceFromRailedParentStart -\n      segmentBeforeThermalExpansion.endDistanceFromRailedParentStart;\n    if (Math.abs(distanceBetweenSegments - this.project.thermalExpansionLength) <= DISTANCE_THRESHOLD) {\n      this.#nudgeSegmentsAndThermalExpansionFartherAwayFromRailParentStart(\n        railGroup,\n        segmentAfterThermalExpansion.distanceFromRailedParentStart,\n      );\n      this.#mergeSegments(railGroup, segmentBeforeThermalExpansion, segmentAfterThermalExpansion);\n    }\n  }\n\n  #mergeSegments(railGroup, segment1, segment2) {\n    const segment1ZonesAndModulesPositions = segment1.zonesAndModulePositionsGrid;\n    const segment2ZonesAndModulesPositions = segment2.zonesAndModulePositionsGrid;\n\n    const mergedSegmentZonesAndModulesPositions = segment1ZonesAndModulesPositions.map((row, i) => {\n      return [...row, ...segment2ZonesAndModulesPositions[i]];\n    });\n    const newZonesAndModulesPositionsString = SegmentsRailGroup.stringifyZonesAndModulePositionsFromGrid(\n      mergedSegmentZonesAndModulesPositions,\n    );\n\n    segment1.setColumns(segment1.columns + segment2.columns);\n    segment1.setZonesAndModulePositionsString(newZonesAndModulesPositionsString);\n\n    railGroup.deleteSegment(segment2, { clearIllegalThermalExpansions: false });\n  }\n\n  #nudgeSegmentsAndThermalExpansionFartherAwayFromRailParentStart(railGroup, distanceCutoff) {\n    const { railedParentSegment } = railGroup;\n    const { eaveEdgeVectorLatLng } = railedParentSegment.roofPlane;\n    const nudgeVector = eaveEdgeVectorLatLng.times(\n      this.project.thermalExpansionLength - this.project.interColumnSpacing,\n    );\n\n    railGroup.segments.forEach((segment) => {\n      if (segment.distanceFromRailedParentStart < distanceCutoff) return;\n\n      const nudgeStartLatLng = segment.startLatLng.plus(nudgeVector);\n      this.mapModelSynchronizer.setSegmentStartLatLngAndCartesianPoint(segment, nudgeStartLatLng);\n    });\n\n    railedParentSegment.thermalExpansions.forEach((thermalExpansion) => {\n      const thermalExpansionDistance = this.mapModelSynchronizer.getDistanceInInches(\n        railedParentSegment.startLatLng,\n        thermalExpansion.startLatLng,\n      );\n      if (thermalExpansionDistance < distanceCutoff) return;\n\n      const nudgeStartLatLng = thermalExpansion.startLatLng.plus(nudgeVector);\n      this.mapModelSynchronizer.setThermalExpansionStartLatLngAndCartesianPoint(thermalExpansion, nudgeStartLatLng);\n    });\n  }\n}\n", "import { removeSegmentFromSelectInteraction } from \"./segments/helpers\";\nimport { removeSegmentPanelsFromSelectInteraction } from \"../map-model-synchronizers/helpers\";\nimport SegmentsRailGroup from \"../map-model-synchronizers/segments-rail-group\";\n\n/*\nWhen you are nudging horizontally, you can nudge one segment in a rail group into another.\nThis class looks for overlaps between rail group segments and when it finds them it consolidates\nthe segments into a single segment.  This does a single pass through looking for possible\nconsolidations, however it's possible to have a chain reaction of consolidation so this class\nneeds to be called recursively until it identifies that no consolidations have occurred.\n*/\nexport default class RailGroupConsolidator {\n  constructor({ controller, railGroup, nudgeDirection }) {\n    this.controller = controller;\n    this.railGroup = railGroup;\n    this.nudgeDirection = nudgeDirection;\n    this.mapModelSynchronizer = this.controller.mapModelSynchronizer;\n\n    this.selectInteractionManager = controller.selectInteractionManager;\n    this.roofPlane = controller.focusedRoofPlane;\n    this.project = controller.project;\n    this.consolidationsOccurred = false;\n  }\n\n  consolidate() {\n    if (this.railGroup.segments.length < 2) return;\n\n    if (this.selectInteractionManager.isPanelSelectType) {\n      this.consolidatedSimplifiedGridBeforeSegmentConsolidation = this.railGroup.consolidatedSimplifiedGrid;\n    } else {\n      this.segmentUuidsToSelectAfterConsolidation = this.selectInteractionManager.selectedFeatures.map((sf) =>\n        sf.get(\"uuid\"),\n      );\n    }\n\n    this.#consolidateSegmentsInRailGroup();\n\n    if (this.consolidationsOccurred) {\n      this.railGroup.updateDistancesFromRailedParentStart();\n      this.railGroup.reRenderSegments();\n\n      if (this.selectInteractionManager.isPanelSelectType) {\n        this.#reSelectPanels();\n      } else {\n        this.#reSelectSegments();\n      }\n    }\n\n    return this.consolidationsOccurred;\n  }\n\n  #consolidateSegmentsInRailGroup() {\n    this.railGroup.segments.forEach((segment2, i) => {\n      if (i === 0 || this.consolidationsOccurred) return;\n\n      const segment1 = this.railGroup.segments[i - 1];\n\n      const overlapAmount = this.#segmentsOverlap(segment1, segment2);\n      if (overlapAmount === 0) return;\n\n      this.#consolidateSegments(segment1, segment2, overlapAmount);\n    });\n  }\n\n  /*\n  Since we're horizontally nudging with segments that are a part of a rail group and thus\n  already perfectly aligned vertically with each other, and since our nudge is along the\n  roof plane's eave edge vector, we can use the segment models to figure out if there's an\n  overlap and by how much.\n  */\n  #segmentsOverlap(segment1, segment2) {\n    const s1Distance = segment1.distanceFromRailedParentStart || 0;\n    const s1Width = segment1.width;\n    const s1End = s1Distance + s1Width;\n    const s2Distance = segment2.distanceFromRailedParentStart || 0;\n    const s2Start = s2Distance;\n    const overlapAmount = Math.abs(s2Start - s1End);\n\n    return s1End > s2Start ? overlapAmount + this.project.interColumnSpacing : 0;\n  }\n\n  #consolidateSegments(segment1, segment2, overlapAmount) {\n    const segment1ZonesAndModulesPositions = segment1.zonesAndModulePositionsGrid;\n    const segment2ZonesAndModulesPositions = segment2.zonesAndModulePositionsGrid;\n\n    const consolidatedSegmentZonesAndModulesPositions = segment1ZonesAndModulesPositions.map((row, i) => {\n      return [...row, ...segment2ZonesAndModulesPositions[i]];\n    });\n    const newZonesAndModulesPositionsString = SegmentsRailGroup.stringifyZonesAndModulePositionsFromGrid(\n      consolidatedSegmentZonesAndModulesPositions,\n    );\n\n    const segment1ContourCodes = segment1.contourCodesGrid;\n    const segment2ContourCodes = segment2.contourCodesGrid;\n\n    const consolidatedSegmentContourCodes = segment1ContourCodes.map((row, i) => {\n      return [...row, ...segment2ContourCodes[i]];\n    });\n    const newContourCodesString = SegmentsRailGroup.stringifyContourCodesFromGrid(consolidatedSegmentContourCodes);\n\n    /*\n    The segments will be in order of railed parent followed by unrailed children sorted by\n    distance from the parent.  Since we are iterating through pairs from start to finish\n    this means we will always keep the current parent segment when doing a consolidation.\n    */\n    const consolidatedSegment = segment1;\n    const deletedSegment = segment2;\n    consolidatedSegment.setColumns(consolidatedSegment.columns + deletedSegment.columns);\n    consolidatedSegment.setZonesAndModulePositionsString(newZonesAndModulesPositionsString);\n    consolidatedSegment.setContourCodes(newContourCodesString);\n\n    /*\n    Figure out if we need to move the startLatLng of the new segment right or left\n    if nudge direction is left need to update start lat lng.  If we're nudging right,\n    the segment is already positioned correctly.\n    */\n    if (this.nudgeDirection === \"left\") {\n      const nudgeVector = this.roofPlane.eaveEdgeVectorLatLng.times(1 * overlapAmount);\n      const nudgedStartLatLng = consolidatedSegment.startLatLng.plus(nudgeVector);\n      this.mapModelSynchronizer.setSegmentStartLatLngAndCartesianPoint(consolidatedSegment, nudgedStartLatLng);\n    }\n\n    const deletedSegmentUuid = deletedSegment.uuid;\n    this.railGroup.deleteSegment(deletedSegment);\n\n    removeSegmentPanelsFromSelectInteraction(this.controller, consolidatedSegment.uuid);\n    removeSegmentFromSelectInteraction(this.controller, consolidatedSegment.uuid);\n\n    if (!this.selectInteractionManager.isPanelSelectType) {\n      this.segmentUuidsToSelectAfterConsolidation = this.segmentUuidsToSelectAfterConsolidation.filter(\n        (uuid) => uuid !== deletedSegmentUuid,\n      );\n      this.segmentUuidsToSelectAfterConsolidation.push(consolidatedSegment.uuid);\n    }\n\n    this.consolidationsOccurred = true;\n  }\n\n  /*\n  While the organization/number of segments may change when nudging, the relative\n  placement and number of panels will not.  So, to select previously selected panels\n  we compare a snapshot of a simplified consolidated grid of panels for the rail\n  group before a segment consolidation has been carried out to a consolidated grid of\n  rail group panels after the segment consolidation, using the first as a lookup for\n  panel features in the second to add to the select interaction's collection.\n  */\n  #reSelectPanels() {\n    const panelsConsolidatedGrid = this.railGroup.consolidatedPanelsGrid;\n    const selectionCollection = this.selectInteractionManager.selectionCollection;\n\n    selectionCollection.clear();\n    this.consolidatedSimplifiedGridBeforeSegmentConsolidation.forEach((row, i) => {\n      row.forEach((panelSelectionStatus, j) => {\n        if (panelSelectionStatus !== \"X\") return;\n\n        const panelFeature = panelsConsolidatedGrid[i][j];\n        selectionCollection.push(panelFeature);\n      });\n    });\n  }\n\n  #reSelectSegments() {\n    const { selectionCollection } = this.selectInteractionManager;\n\n    selectionCollection.clear();\n    this.segmentUuidsToSelectAfterConsolidation.forEach((uuid) => {\n      const segmentFeature = this.railGroup.segmentFeatures.find((sf) => sf.get(\"uuid\") === uuid);\n      if (!segmentFeature) return;\n\n      selectionCollection.push(segmentFeature);\n    });\n  }\n}\n", "import { fromLonLat } from \"ol/proj\";\n\nimport { pointInPolygon } from \"../../../../helpers/point-in-polygon\";\nimport { reRenderSegment } from \"../segments/helpers\";\n\n/*\nAfter initial segment or panel nudging, this can be called to move any thermal expansions\nthat are overlapping segments.  This will need to be called recursively until the class\nreports no nudges occurred because the process of nudging can result in a chain reaction\nof thermal expansion and segment movements.\n*/\nexport default class ThermalExpansionsHorizontalNudger {\n  constructor({ controller, railGroup, nudgeDirection }) {\n    this.controller = controller;\n    this.project = controller.project;\n    this.railGroup = railGroup;\n    this.nudgeDirection = nudgeDirection;\n\n    this.mapModelSynchronizer = this.controller.mapModelSynchronizer;\n    this.nudgesOccurred = false;\n  }\n\n  nudge() {\n    const railedSegment = this.railGroup.railedParentSegment;\n    if (!railedSegment.hasThermalExpansions) return;\n\n    this.#checkOverlapAndNudgeThermalExpansions();\n\n    // After having moved thermal expansions, if they have been moved into a position\n    // where they overlap a segment we want to move the segment by that overlap amount\n    // in the nudge direction.\n    this.#checkOverlapAndNudgeSegments();\n\n    this.railGroup.updateDistancesFromRailedParentStart();\n    this.mapModelSynchronizer.reRenderThermalExpansions();\n\n    return this.nudgesOccurred;\n  }\n\n  #checkOverlapAndNudgeThermalExpansions() {\n    const { segments, railedParentSegment } = this.railGroup;\n    const thermalExpansions = railedParentSegment.thermalExpansions;\n\n    for (let j = 0; j < thermalExpansions.length; j++) {\n      const thermalExpansion = thermalExpansions[j];\n      for (let i = 0; i < segments.length; i++) {\n        const segment = segments[i];\n        if (this.#isOverlapping(segment, thermalExpansion, i, false)) {\n          this.#nudgeThermalExpansionToSegmentEdge(segment, thermalExpansion);\n          this.nudgesOccurred = true;\n          // You can only really overlap one segment at a time so we can break out here\n          break;\n        }\n      }\n    }\n  }\n\n  #checkOverlapAndNudgeSegments() {\n    const { segments, railedParentSegment } = this.railGroup;\n    const thermalExpansions = railedParentSegment.thermalExpansions;\n\n    for (let i = 0; i < segments.length; i++) {\n      const segment = segments[i];\n\n      for (let j = 0; j < thermalExpansions.length; j++) {\n        const thermalExpansion = thermalExpansions[j];\n        const addVisualMarkers = j === 0 && i === 2;\n        if (this.#isOverlapping(segment, thermalExpansion, i, addVisualMarkers)) {\n          this.#nudgeSegmentToThermalExpansionEdge(segment, thermalExpansion);\n          this.nudgesOccurred = true;\n          // You can only really overlap one thermal expansion at a time so we can break out here\n          break;\n        }\n      }\n    }\n  }\n\n  #isOverlapping(segment, thermalExpansion, index, addVisualMarkers) {\n    // Top left and 10\" down (moving the point down by 10 inches to make sure it is inside the segment)\n    const thermalExpansionCheckLatLng1 = thermalExpansion.startLatLng.plus(segment.unitRowVectorLatLng.times(10));\n    const thermalExpansionCheckCoordinate1 = fromLonLat(thermalExpansionCheckLatLng1.toLonLat);\n    const segmentCoordinates = [segment.latLngPoints.map((llp) => fromLonLat(llp.toLonLat))];\n    if (pointInPolygon(thermalExpansionCheckCoordinate1, segmentCoordinates)) return true;\n\n    // Top right and 10\" down\n    const thermalExpansionCheckLatLng2 = thermalExpansionCheckLatLng1.plus(\n      segment.unitColumnVectorLatLng.times(this.project.thermalExpansionLength),\n    );\n    const thermalExpansionCheckCoordinate2 = fromLonLat(thermalExpansionCheckLatLng2.toLonLat);\n    return pointInPolygon(thermalExpansionCheckCoordinate2, segmentCoordinates);\n  }\n\n  #nudgeThermalExpansionToSegmentEdge(segment, thermalExpansion) {\n    let newStartLatLng;\n    if (this.#isNudgingLeft) {\n      const nudgeVector = segment.unitColumnVectorLatLng.times(this.project.thermalExpansionLength);\n      newStartLatLng = segment.startLatLng.minus(nudgeVector);\n    } else {\n      const nudgeVector = segment.unitColumnVectorLatLng.times(segment.width);\n      newStartLatLng = segment.startLatLng.plus(nudgeVector);\n    }\n    this.mapModelSynchronizer.setThermalExpansionStartLatLngAndCartesianPoint(thermalExpansion, newStartLatLng);\n  }\n\n  #nudgeSegmentToThermalExpansionEdge(segment, thermalExpansion) {\n    let newStartLatLng;\n    if (this.#isNudgingLeft) {\n      const nudgeVector = segment.unitColumnVectorLatLng.times(segment.width);\n      newStartLatLng = thermalExpansion.startLatLng.minus(nudgeVector);\n    } else {\n      const nudgeVector = segment.unitColumnVectorLatLng.times(this.project.thermalExpansionLength);\n      newStartLatLng = thermalExpansion.startLatLng.plus(nudgeVector);\n    }\n    this.mapModelSynchronizer.setSegmentStartLatLngAndCartesianPoint(segment, newStartLatLng);\n\n    if (!segment.railed) {\n      const distanceFromRailedParentStart = this.mapModelSynchronizer.getDistanceInInches(\n        segment.railedParent.startLatLng,\n        newStartLatLng,\n      );\n      segment.setDistanceFromRailedParentStart(distanceFromRailedParentStart);\n    }\n\n    reRenderSegment(this.controller, segment);\n  }\n\n  get #isNudgingLeft() {\n    return this.nudgeDirection === \"left\";\n  }\n}\n", "import { degreesToRadians } from \"../../../../helpers/geometry\";\nimport SegmentsRailGroup from \"../../map-model-synchronizers/segments-rail-group\";\nimport RailGroupConsolidator from \"../rail-group-consolidator\";\nimport ThermalExpansionsHorizontalNudger from \"../thermal-expansions/horizontal-nudger\";\nimport { reRenderSegment } from \"./helpers\";\n\nexport default class SegmentsNudger {\n  constructor({ controller, selectionCollection, nudgeDirection, nudgeDistance, slopeAdjusted = true }) {\n    this.controller = controller;\n    this.selectionCollection = selectionCollection;\n    this.nudgeDirection = nudgeDirection;\n    this.nudgeDistance = nudgeDistance;\n\n    this.mapModelSynchronizer = controller.mapModelSynchronizer;\n    this.roofPlane = controller.focusedRoofPlane;\n    this.mapManager = controller.mapManager;\n    this.project = controller.project;\n    this.slopeAdjusted = slopeAdjusted;\n\n    this.railGroups = SegmentsRailGroup.uniqueGroupsFromSegmentFeatures({\n      controller: this.controller,\n      features: this.selectionCollection.getArray(),\n    });\n\n    this.nudgeVector = this.#getNudgeVector();\n  }\n\n  nudge() {\n    if (this.nudgeDirection === \"up\" || this.nudgeDirection === \"down\") this.#verticalNudge();\n    if (this.nudgeDirection === \"right\" || this.nudgeDirection === \"left\") this.#horizontalNudge();\n\n    this.railGroups.forEach((railGroup) => {\n      railGroup.selectRailFeatures();\n    });\n  }\n\n  #verticalNudge() {\n    this.railGroups.forEach((railGroup) => this.#verticalNudgeForRailGroup(railGroup));\n  }\n\n  #verticalNudgeForRailGroup(railGroup) {\n    railGroup.segments.forEach((segment, i) => {\n      const nudgedStartLatLng = segment.startLatLng.plus(this.nudgeVector);\n      this.mapModelSynchronizer.setSegmentStartLatLngAndCartesianPoint(segment, nudgedStartLatLng);\n\n      const segmentFeature = railGroup.segmentFeatures[i];\n\n      if (segment.railed && segment.hasThermalExpansions) {\n        segment.thermalExpansions.forEach((thermalExpansion) => {\n          const nudgedStartLatLng = thermalExpansion.startLatLng.plus(this.nudgeVector);\n          this.mapModelSynchronizer.setThermalExpansionStartLatLngAndCartesianPoint(\n            thermalExpansion,\n            nudgedStartLatLng,\n          );\n        });\n      }\n\n      const newSegmentFeature = reRenderSegment(this.controller, segment);\n      if (this.#isSelected(segmentFeature)) {\n        this.selectionCollection.push(newSegmentFeature);\n        this.selectionCollection.remove(segmentFeature);\n      }\n\n      railGroup.segmentFeatures[i] = newSegmentFeature;\n    });\n  }\n\n  #horizontalNudge() {\n    this.railGroups.forEach((railGroup) => this.#horizontalNudgeForRailGroup(railGroup));\n  }\n\n  #isSelected(segmentFeature) {\n    return this.controller.selectInteractionManager.isSegmentSelected(segmentFeature);\n  }\n\n  #horizontalNudgeForRailGroup(railGroup) {\n    railGroup.segments.forEach((segment, i) => {\n      const segmentFeature = railGroup.segmentFeatures[i];\n      if (!this.#isSelected(segmentFeature)) return;\n\n      const nudgedStartLatLng = segment.startLatLng.plus(this.nudgeVector);\n      this.mapModelSynchronizer.setSegmentStartLatLngAndCartesianPoint(segment, nudgedStartLatLng);\n    });\n\n    railGroup.updateDistancesFromRailedParentStart();\n    this.#thermalExpansionNudging(railGroup);\n    this.#consolidateOverlappingRailGroupSegments(railGroup);\n    railGroup.reRenderSegmentsWithSegmentSelections(this.selectionCollection);\n  }\n\n  #thermalExpansionNudging(railGroup) {\n    this.thermalExpansionNudgeCalls++;\n    if (this.thermalExpansionNudgeCalls > 25) {\n      console.error(\"Called the thermal expansion nudger more than 25 times\");\n      return;\n    }\n\n    const { controller, nudgeDirection } = this;\n\n    const nudgesOccurred = new ThermalExpansionsHorizontalNudger({\n      controller,\n      railGroup,\n      nudgeDirection,\n    }).nudge();\n\n    if (nudgesOccurred) this.#thermalExpansionNudging(railGroup);\n  }\n\n  #consolidateOverlappingRailGroupSegments(railGroup) {\n    const { controller, nudgeDirection } = this;\n\n    const consolidationsOccurred = new RailGroupConsolidator({\n      controller,\n      railGroup,\n      nudgeDirection,\n    }).consolidate();\n\n    if (consolidationsOccurred) this.#consolidateOverlappingRailGroupSegments(railGroup);\n  }\n\n  #getNudgeVector() {\n    const { eavePerpendicularEdgeVectorLatLng, eaveEdgeVectorLatLng } = this.roofPlane;\n    const distance = this.nudgeDistance;\n    const roofSlopeRadians = degreesToRadians(this.roofPlane.roofSlope);\n    const slopeAdjustedDistance = distance * Math.cos(roofSlopeRadians);\n\n    if (this.nudgeDirection === \"up\") {\n      return eavePerpendicularEdgeVectorLatLng.times(-1 * (this.slopeAdjusted ? slopeAdjustedDistance : distance));\n    } else if (this.nudgeDirection === \"down\") {\n      return eavePerpendicularEdgeVectorLatLng.times(1 * (this.slopeAdjusted ? slopeAdjustedDistance : distance));\n    } else if (this.nudgeDirection === \"right\") {\n      return eaveEdgeVectorLatLng.times(-1 * distance);\n    } else if (this.nudgeDirection === \"left\") {\n      return eaveEdgeVectorLatLng.times(1 * distance);\n    }\n  }\n}\n", "import LatLngModel from \"../../../../da/models/lat-lng-model\";\nimport SegmentsRailGroup from \"../../map-model-synchronizers/segments-rail-group\";\n\n// The anchor segment can either be the farthest segment out in the direction of the\n// alignment, or it can be the first selected segment.  We're moving towards making the\n// anchor being the first selected in order to be consistent with the adjoining aligner\n// feature, however, this is contrary to how most design apps handle this kind of\n// alignment, so I'm keeping this code in place for now in case we want to revisit\n// making this behavior toggleable in some way.\nconst ANCHOR_IS_FARTHEST_OUT = false;\n\nexport default class SegmentsAligner {\n  #segmentPositions = {};\n  #anchorSegmentFeature;\n\n  constructor({ controller, selectionCollection, alignTo }) {\n    this.controller = controller;\n    this.selectionCollection = selectionCollection;\n    this.alignTo = alignTo;\n\n    this.mapManager = controller.mapManager;\n    this.map = this.mapManager.map;\n    this.mapModelSynchronizer = controller.mapModelSynchronizer;\n    this.roofPlane = controller.focusedRoofPlane;\n\n    this.railGroups = SegmentsRailGroup.uniqueGroupsFromSegmentFeatures({\n      controller,\n      features: selectionCollection.getArray(),\n    });\n\n    this.#setSegmentPositions();\n    if (ANCHOR_IS_FARTHEST_OUT) {\n      this.#findAnchorFeature();\n    } else {\n      this.#anchorSegmentFeature = selectionCollection.getArray()[0];\n    }\n  }\n\n  align() {\n    this.railGroups.forEach((railGroup) => {\n      if ([\"top\", \"bottom\"].includes(this.alignTo)) this.#verticalAlign(railGroup);\n      if ([\"left\", \"right\"].includes(this.alignTo)) this.#horizontalAlign(railGroup);\n    });\n  }\n\n  #verticalAlign(railGroup) {\n    if (railGroup.hasFeature(this.#anchorSegmentFeature)) return;\n\n    const railedParentStartLatLngBefore = railGroup.railedParentSegment.startLatLng.clone;\n\n    railGroup.segments.forEach((segment, i) => {\n      const { lat, lng } = this.#newStartLatLngForSegmentFeature(railGroup.segmentFeatures[i]);\n      this.mapModelSynchronizer.setSegmentStartLatLngAndCartesianPoint(segment, { lat, lng });\n\n      if (segment.railed && segment.hasThermalExpansions) {\n        const newStartLatLng = LatLngModel.create({ lat, lng });\n        const moveVector = newStartLatLng.minus(railedParentStartLatLngBefore);\n\n        segment.thermalExpansions.forEach((thermalExpansion) => {\n          const newStartLatLng = thermalExpansion.startLatLng.plus(moveVector);\n          this.mapModelSynchronizer.setThermalExpansionStartLatLngAndCartesianPoint(thermalExpansion, newStartLatLng);\n          thermalExpansion.generateAndSetLatLngPoints(newStartLatLng);\n        });\n      }\n    });\n\n    railGroup.reRenderSegmentsWithSegmentSelections(this.selectionCollection);\n  }\n\n  #horizontalAlign(railGroup) {\n    if (railGroup.hasFeature(this.#anchorSegmentFeature)) return;\n\n    let aligningSegmentFeature;\n    let nudgeSegmentFeatures;\n    let nudgeThermalExpansions;\n    if (this.alignTo === \"left\") {\n      aligningSegmentFeature = railGroup.minSelectedSegmentFeature;\n      nudgeSegmentFeatures = railGroup.segmentFeaturesUpToAndIncluding(railGroup.maxSelectedSegmentFeatureIndex);\n      nudgeThermalExpansions = railGroup.thermalExpansionsWithDistanceToRailedParent(\n        railGroup.segments[railGroup.maxSelectedSegmentFeatureIndex],\n        { distanceType: \"closer\" },\n      );\n    } else {\n      aligningSegmentFeature = railGroup.maxSelectedSegmentFeature;\n      nudgeSegmentFeatures = railGroup.segmentFeaturesAfterAndIncluding(railGroup.minSelectedSegmentFeatureIndex);\n      nudgeThermalExpansions = railGroup.thermalExpansionsWithDistanceToRailedParent(\n        railGroup.segments[railGroup.minSelectedSegmentFeatureIndex],\n        { distanceType: \"fartherAway\" },\n      );\n    }\n\n    const newStartLatLng = this.#newStartLatLngForSegmentFeature(aligningSegmentFeature);\n    const aligningSegment = aligningSegmentFeature.get(\"model\");\n    const distance = this.mapModelSynchronizer.getDistanceInInches(aligningSegment.startLatLng, newStartLatLng);\n\n    nudgeSegmentFeatures.forEach((sf) => {\n      const nudgeVectorDirection = this.#horizontalNudgeDirectionForSegmentFeature(sf);\n      const nudgeVector = this.roofPlane.eaveEdgeVectorLatLng.times(nudgeVectorDirection * distance);\n\n      const segment = sf.get(\"model\");\n      const nudgedStartLatLng = segment.startLatLng.plus(nudgeVector);\n      this.mapModelSynchronizer.setSegmentStartLatLngAndCartesianPoint(segment, nudgedStartLatLng);\n    });\n\n    nudgeThermalExpansions.forEach((te) => {\n      const newStartLatLng = te.startLatLng.plus(nudgeVector);\n      this.mapModelSynchronizer.setThermalExpansionStartLatLngAndCartesianPoint(te, newStartLatLng);\n      te.generateAndSetLatLngPoints(newStartLatLng);\n    });\n\n    railGroup.updateDistancesFromRailedParentStart();\n    railGroup.reRenderSegmentsWithSegmentSelections(this.selectionCollection);\n  }\n\n  #horizontalNudgeDirectionForSegmentFeature(segmentFeature) {\n    const anchorPositions = this.#segmentPositions[this.#anchorSegmentFeature.get(\"uuid\")];\n    const anchorTopLeftX = anchorPositions.topLeft[0];\n    const anchorBottomRightX = anchorPositions.bottomRight[0];\n\n    const segmentPositions = this.#segmentPositions[segmentFeature.get(\"uuid\")];\n    const segmentTopLeftX = segmentPositions.topLeft[0];\n    const segmentBottomRightX = segmentPositions.bottomRight[0];\n\n    if (this.alignTo === \"left\" && segmentTopLeftX < anchorTopLeftX) return -1;\n    if (this.alignTo === \"right\" && segmentBottomRightX < anchorBottomRightX) return -1;\n    return 1;\n  }\n\n  #findAnchorFeature() {\n    this.selectionCollection.forEach((segmentFeature) => {\n      this.#replaceAnchorSegmentFeatureIfSegmentFeatureIsFartherOut(segmentFeature);\n    });\n  }\n\n  #setSegmentPositions() {\n    this.railGroups.forEach((railGroup) => {\n      railGroup.segmentFeatures.forEach((segmentFeature) => {\n        const coordinates = segmentFeature.getGeometry().getLinearRing(0).getCoordinates();\n\n        this.#segmentPositions[segmentFeature.get(\"uuid\")] = {\n          topLeft: this.map.getPixelFromCoordinate(coordinates[0]),\n          bottomRight: this.map.getPixelFromCoordinate(coordinates[2]),\n        };\n      });\n    });\n  }\n\n  #replaceAnchorSegmentFeatureIfSegmentFeatureIsFartherOut(segmentFeature) {\n    let setAnchorToSegment = false;\n\n    if (!this.#anchorSegmentFeature) {\n      setAnchorToSegment = true;\n    } else {\n      const segmentPositions = this.#segmentPositions[segmentFeature.get(\"uuid\")];\n      const anchorSegmentPositions = this.#segmentPositions[this.#anchorSegmentFeature.get(\"uuid\")];\n\n      if (this.alignTo === \"top\") {\n        if (segmentPositions.topLeft[1] < anchorSegmentPositions.topLeft[1]) setAnchorToSegment = true;\n      } else if (this.alignTo === \"bottom\") {\n        if (segmentPositions.bottomRight[1] > anchorSegmentPositions.bottomRight[1]) setAnchorToSegment = true;\n      } else if (this.alignTo === \"left\") {\n        if (segmentPositions.topLeft[0] < anchorSegmentPositions.topLeft[0]) setAnchorToSegment = true;\n      } else if (this.alignTo === \"right\") {\n        if (segmentPositions.bottomRight[0] > anchorSegmentPositions.bottomRight[0]) setAnchorToSegment = true;\n      }\n    }\n\n    if (setAnchorToSegment) this.#anchorSegmentFeature = segmentFeature;\n  }\n\n  #newStartLatLngForSegmentFeature(segmentFeature) {\n    const segmentPositions = this.#segmentPositions[segmentFeature.get(\"uuid\")];\n    const anchorSegmentPositions = this.#segmentPositions[this.#anchorSegmentFeature.get(\"uuid\")];\n\n    let newSegmentTopLeftPixel;\n    if (this.alignTo === \"top\") {\n      newSegmentTopLeftPixel = [segmentPositions.topLeft[0], anchorSegmentPositions.topLeft[1]];\n    } else if (this.alignTo === \"bottom\") {\n      newSegmentTopLeftPixel = [\n        segmentPositions.topLeft[0],\n        segmentPositions.topLeft[1] + (anchorSegmentPositions.bottomRight[1] - segmentPositions.bottomRight[1]),\n      ];\n    } else if (this.alignTo === \"left\") {\n      newSegmentTopLeftPixel = [anchorSegmentPositions.topLeft[0], segmentPositions.topLeft[1]];\n    } else if (this.alignTo === \"right\") {\n      newSegmentTopLeftPixel = [\n        segmentPositions.topLeft[0] + (anchorSegmentPositions.bottomRight[0] - segmentPositions.bottomRight[0]),\n        segmentPositions.topLeft[1],\n      ];\n    }\n\n    const coordinate = this.map.getCoordinateFromPixel(newSegmentTopLeftPixel);\n    const latLng = this.mapModelSynchronizer.simpleLatLngFromCoordinate(coordinate);\n    return latLng;\n  }\n}\n", "import { CONTOUR_CODE_NONE } from \"../../../../helpers/contour\";\nimport { ZONES_MODULE_POSITIONS } from \"../../../../helpers/zones-and-module-positions\";\nimport SegmentsRailGroup from \"../../map-model-synchronizers/segments-rail-group\";\nimport RailGroupConsolidator from \"../rail-group-consolidator\";\nimport ThermalExpansionsHorizontalNudger from \"../thermal-expansions/horizontal-nudger\";\n\nexport default class SegmentsRowsAndColumnsAdder {\n  constructor({ controller, selectionCollection, side }) {\n    this.controller = controller;\n    this.selectionCollection = selectionCollection;\n    this.side = side;\n\n    this.mapModelSynchronizer = controller.mapModelSynchronizer;\n    this.mapManager = controller.mapManager;\n    this.roofPlane = controller.focusedRoofPlane;\n\n    this.railGroups = SegmentsRailGroup.uniqueGroupsFromSegmentFeatures({\n      controller,\n      features: selectionCollection.getArray(),\n    });\n  }\n\n  add() {\n    this.railGroups.forEach((railGroup) => {\n      if ([\"left\", \"right\"].includes(this.side)) this.#horizontalAdd(railGroup);\n      if ([\"top\", \"bottom\"].includes(this.side)) this.#verticalAdd(railGroup);\n      railGroup.removeIllegalPanelContour();\n    });\n  }\n\n  #horizontalAdd(railGroup) {\n    const { eaveEdgeVectorLatLng } = this.roofPlane;\n\n    railGroup.selectedSegments.forEach((segment) => {\n      const zonesAndModulePositionsGrid = segment.zonesAndModulePositionsGrid;\n      const contourCodesGrid = segment.contourCodesGrid;\n\n      if (this.side === \"left\") {\n        const moveVector = eaveEdgeVectorLatLng.times(segment.spacedPanelSizeInColumnDirection);\n        const newStartLatLng = segment.startLatLng.plus(moveVector);\n        this.mapModelSynchronizer.setSegmentStartLatLngAndCartesianPoint(segment, newStartLatLng);\n        zonesAndModulePositionsGrid.forEach((gridRow) => gridRow.unshift(ZONES_MODULE_POSITIONS[0]));\n        contourCodesGrid.forEach((gridRow) => gridRow.unshift(CONTOUR_CODE_NONE));\n      } else {\n        zonesAndModulePositionsGrid.forEach((gridRow) => gridRow.push(ZONES_MODULE_POSITIONS[0]));\n        contourCodesGrid.forEach((gridRow) => gridRow.push(CONTOUR_CODE_NONE));\n      }\n\n      const zonesAndModulePositionsString =\n        SegmentsRailGroup.stringifyZonesAndModulePositionsFromGrid(zonesAndModulePositionsGrid);\n      segment.setZonesAndModulePositionsString(zonesAndModulePositionsString);\n\n      const contourCodesString = SegmentsRailGroup.stringifyContourCodesFromGrid(contourCodesGrid);\n      segment.setContourCodes(contourCodesString);\n\n      segment.addColumn();\n    });\n\n    railGroup.updateDistancesFromRailedParentStart();\n    this.#thermalExpansionNudging(railGroup);\n    this.#consolidateOverlappingRailGroupSegments(railGroup);\n\n    railGroup.reRenderSegmentsWithSegmentSelections(this.selectionCollection);\n  }\n\n  #thermalExpansionNudging(railGroup) {\n    this.thermalExpansionNudgeCalls++;\n    if (this.thermalExpansionNudgeCalls > 25) {\n      console.error(\"Called the thermal expansion nudger more than 25 times\");\n      return;\n    }\n\n    const { controller, side: nudgeDirection } = this;\n\n    const nudgesOccurred = new ThermalExpansionsHorizontalNudger({\n      controller,\n      railGroup,\n      nudgeDirection,\n    }).nudge();\n\n    if (nudgesOccurred) this.#thermalExpansionNudging(railGroup);\n  }\n\n  #consolidateOverlappingRailGroupSegments(railGroup) {\n    const consolidationsOccurred = new RailGroupConsolidator({\n      controller: this.controller,\n      railGroup,\n      nudgeDirection: this.side,\n    }).consolidate();\n\n    if (consolidationsOccurred) this.#consolidateOverlappingRailGroupSegments(railGroup);\n  }\n\n  #verticalAdd(railGroup) {\n    railGroup.segments.forEach((segment) => {\n      const zonesAndModulePositionsGrid = segment.zonesAndModulePositionsGrid;\n      const contourCodesGrid = segment.contourCodesGrid;\n      const newZonesAndModulePositionsRow = Array(segment.columns).fill(ZONES_MODULE_POSITIONS[0]);\n      const newContourCodesRow = Array(segment.columns).fill(CONTOUR_CODE_NONE);\n\n      let moveVector;\n      if (this.side === \"top\") {\n        const { slopeAdjustedSpacedPanelSizeInRowDirection, startLatLng } = segment;\n        moveVector = this.roofPlane.eavePerpendicularEdgeVectorLatLng.times(\n          -1 * slopeAdjustedSpacedPanelSizeInRowDirection,\n        );\n        const newStartLatLng = startLatLng.plus(moveVector);\n        this.mapModelSynchronizer.setSegmentStartLatLngAndCartesianPoint(segment, newStartLatLng);\n\n        zonesAndModulePositionsGrid.unshift(newZonesAndModulePositionsRow);\n        contourCodesGrid.unshift(newContourCodesRow);\n      } else {\n        zonesAndModulePositionsGrid.push(newZonesAndModulePositionsRow);\n        contourCodesGrid.push(newContourCodesRow);\n      }\n\n      const zonesAndModulePositionsString =\n        SegmentsRailGroup.stringifyZonesAndModulePositionsFromGrid(zonesAndModulePositionsGrid);\n      segment.setZonesAndModulePositionsString(zonesAndModulePositionsString);\n\n      const contourCodesString = SegmentsRailGroup.stringifyContourCodesFromGrid(contourCodesGrid);\n      segment.setContourCodes(contourCodesString);\n\n      segment.addRow();\n\n      if (segment.railed && segment.hasThermalExpansions) {\n        segment.thermalExpansions.forEach((thermalExpansion) => {\n          if (this.side === \"top\") {\n            const newStartLatLng = thermalExpansion.startLatLng.plus(moveVector);\n            this.mapModelSynchronizer.setThermalExpansionStartLatLngAndCartesianPoint(thermalExpansion, newStartLatLng);\n          } else {\n            thermalExpansion.generateAndSetLatLngPoints(thermalExpansion.startLatLng.clone);\n          }\n        });\n      }\n    });\n\n    railGroup.reRenderSegmentsWithSegmentSelections(this.selectionCollection);\n    this.mapModelSynchronizer.reRenderThermalExpansions();\n  }\n}\n", "import SimpleLatLng from \"../../../../../da/map/models/simple-lat-lng\";\nimport { cartesianPointRelativeTo } from \"../../../../../da/map/ol-geometry\";\nimport SegmentsRailGroup from \"../../../map-model-synchronizers/segments-rail-group\";\nimport { createNewSegment, renderNewSegment } from \"../../segments/helpers\";\n\nexport default class PanelsNudgerBase {\n  constructor({ controller, selectionCollection, nudgeDirection, nudgeDistance }) {\n    this.controller = controller;\n    this.selectionCollection = selectionCollection;\n    this.nudgeDirection = nudgeDirection;\n    this.nudgeDistance = nudgeDistance;\n\n    this.mapModelSynchronizer = controller.mapModelSynchronizer;\n    this.mapManager = controller.mapManager;\n    this.roofPlane = controller.focusedRoofPlane;\n\n    this.railGroups = SegmentsRailGroup.uniqueGroupsFromPanelFeatures({\n      controller,\n      features: selectionCollection.getArray(),\n    });\n\n    this.nudgeVector = this.getNudgeVector();\n  }\n\n  generateNewRailGroupsFromNudgeSplits() {\n    const newRailGroups = this.railGroups.flatMap((railGroup) => {\n      const simplifiedRailGroupGrids = this.simplifiedRailGroupGridsAfterNudgeSplit(railGroup);\n      const newRailGroups = this.buildAndRenderNewRailGroupsFromSimplifiedRailGroups(\n        railGroup,\n        simplifiedRailGroupGrids,\n      );\n      railGroup.deleteSegments();\n      return newRailGroups;\n    });\n    return newRailGroups;\n  }\n\n  buildAndRenderNewRailGroupsFromSimplifiedRailGroups(railGroup, simplifiedRailGroupGrids) {\n    const newRailGroups = simplifiedRailGroupGrids.map((simplifiedRailGroupGrid) => {\n      const {\n        gridRows,\n        consolidatedPanelStartLatLngRows,\n        consolidatedZonesAndModulePositionsGrid,\n        consolidatedContourCodesGrid,\n      } = simplifiedRailGroupGrid;\n\n      let consolidatedColumnIndexOffset = 0;\n      const firstGridRow = gridRows[0];\n      const firstConsolidatedLatLngsRow = consolidatedPanelStartLatLngRows[0];\n      const rows = gridRows.length;\n\n      let parent;\n      const segments = firstGridRow.map((segmentRow, i) => {\n        const columns = segmentRow.length;\n        const startLatLng = firstConsolidatedLatLngsRow[i + consolidatedColumnIndexOffset];\n        const zonesAndModulePositions = SegmentsRailGroup.stringifiedZonesAndModulePositionsFromConsolidatedGrid(\n          consolidatedZonesAndModulePositionsGrid,\n          columns,\n          i + consolidatedColumnIndexOffset,\n        );\n        const contourCodes = SegmentsRailGroup.stringifiedContourCodesFromConsolidatedGrid(\n          consolidatedContourCodesGrid,\n          columns,\n          i + consolidatedColumnIndexOffset,\n        );\n        const attrs = {\n          startLatLng,\n          rows,\n          columns,\n          zonesAndModulePositions,\n          contourCodes,\n          orientation: railGroup.panelOrientation,\n        };\n        if (i === 0) {\n          attrs.railed = true;\n        } else {\n          attrs.railedParentUuid = parent.uuid;\n          attrs.railed = false;\n          attrs.distanceFromRailedParentStart = this.mapModelSynchronizer.getDistanceInInches(\n            parent.startLatLng,\n            new SimpleLatLng(attrs.startLatLng.lat, attrs.startLatLng.lng),\n          );\n        }\n        const newSegment = createNewSegment(this.controller, railGroup.roofSection, attrs);\n\n        if (newSegment.railed) {\n          this.#createNewThermalExpansionsFromOldRailedParent(newSegment, railGroup.railedParentSegment);\n        }\n\n        if (i === 0) parent = newSegment;\n        consolidatedColumnIndexOffset += segmentRow.length - 1;\n\n        return newSegment;\n      });\n      segments.forEach((segment) => renderNewSegment(this.controller, segment));\n      const newRailGroup = SegmentsRailGroup.fromSegmentUuid({ controller: this.controller, uuid: segments[0].uuid });\n      newRailGroup.selectPanelsFromSimplifiedGrid(gridRows, this.selectionCollection);\n      return newRailGroup;\n    });\n\n    return newRailGroups;\n  }\n\n  #createNewThermalExpansionsFromOldRailedParent(newRailedParentSegment, oldRailedParentSegment) {\n    if (!oldRailedParentSegment.hasThermalExpansions) return;\n\n    const originLonLat = oldRailedParentSegment.roofPlane.project.detail.originLatLng.toLonLat;\n\n    const oldStartToNewStartLatLngVect = newRailedParentSegment.startLatLng.minus(oldRailedParentSegment.startLatLng);\n\n    oldRailedParentSegment.thermalExpansions.forEach((oldThermalExpansion) => {\n      const startLatLng = oldThermalExpansion.startLatLng.plus(oldStartToNewStartLatLngVect);\n      const startCartesianPoint = cartesianPointRelativeTo(startLatLng.toLonLat, originLonLat);\n\n      newRailedParentSegment.addThermalExpansion({ startLatLng, startCartesianPoint });\n    });\n  }\n}\n", "import { degreesToRadians } from \"../../../../../helpers/geometry\";\nimport PanelsNudgerBase from \"./base\";\n\nexport default class PanelsNudgerVertical extends PanelsNudgerBase {\n  getNudgeVector() {\n    const { eavePerpendicularEdgeVectorLatLng } = this.roofPlane;\n    const distance = this.nudgeDistance;\n    const roofSlopeRadians = degreesToRadians(this.roofPlane.roofSlope);\n    const slopeAdjustedDistance = distance * Math.cos(roofSlopeRadians);\n    const directionMultiplier = this.nudgeDirection === \"up\" ? -1 : 1;\n    return eavePerpendicularEdgeVectorLatLng.times(directionMultiplier * slopeAdjustedDistance);\n  }\n\n  nudge() {\n    this.railGroups = this.generateNewRailGroupsFromNudgeSplits();\n    this.#nudgeRailGroupsWithSelections();\n  }\n\n  simplifiedRailGroupGridsAfterNudgeSplit(railGroup) {\n    const simplifiedGrid = railGroup.simplifiedGrid;\n    const consolidatedPanelsGridStartLatLngs = railGroup.consolidatedPanelsGridStartLatLngs;\n    const consolidatedZonesAndModulePositionsGrid = railGroup.consolidatedSegmentZonesAndModulePositionsGrid;\n    const consolidatedContourCodesGrid = railGroup.consolidatedContourCodesGrid;\n\n    const controlRowIndex = this.#controlRowIndex(railGroup);\n    const newRailGroupSimplifiedGrids = [];\n    let currentRailGroupGrid;\n\n    simplifiedGrid.forEach((simplifiedGridRow, i) => {\n      if (\n        i === 0 ||\n        (this.nudgeDirection === \"up\" && i === controlRowIndex + 1) ||\n        (this.nudgeDirection === \"down\" && i === controlRowIndex)\n      ) {\n        if (currentRailGroupGrid) newRailGroupSimplifiedGrids.push(currentRailGroupGrid);\n        currentRailGroupGrid = {\n          gridRows: [simplifiedGridRow],\n          consolidatedPanelStartLatLngRows: [consolidatedPanelsGridStartLatLngs[i]],\n          consolidatedZonesAndModulePositionsGrid: [consolidatedZonesAndModulePositionsGrid[i]],\n          consolidatedContourCodesGrid: [consolidatedContourCodesGrid[i]],\n        };\n      } else {\n        currentRailGroupGrid.gridRows.push(simplifiedGridRow);\n        currentRailGroupGrid.consolidatedPanelStartLatLngRows.push(consolidatedPanelsGridStartLatLngs[i]);\n        currentRailGroupGrid.consolidatedZonesAndModulePositionsGrid.push(consolidatedZonesAndModulePositionsGrid[i]);\n        currentRailGroupGrid.consolidatedContourCodesGrid.push(consolidatedContourCodesGrid[i]);\n      }\n    });\n    newRailGroupSimplifiedGrids.push(currentRailGroupGrid);\n\n    return newRailGroupSimplifiedGrids;\n  }\n\n  // Find the greatest or least row index with a selection which defines the row that\n  // we will split the rail group on.\n  #controlRowIndex(railGroup) {\n    const consolidatedSimplifiedGrid = railGroup.consolidatedSimplifiedGrid;\n    const rowIndexesWithSelections = [];\n    consolidatedSimplifiedGrid.map((gridRow, i) => {\n      if (gridRow.includes(\"X\")) rowIndexesWithSelections.push(i);\n    });\n    const minMax = this.nudgeDirection === \"up\" ? \"max\" : \"min\";\n    const result = Math[minMax](...rowIndexesWithSelections);\n    return result;\n  }\n\n  #nudgeRailGroupsWithSelections() {\n    this.railGroups.forEach((railGroup) => {\n      if (!railGroup.hasAnyPanelSelections) return;\n\n      const simplifiedGrid = railGroup.simplifiedGrid;\n\n      railGroup.segments.forEach((segment) => {\n        const nudgedStartLatLng = segment.startLatLng.plus(this.nudgeVector);\n        this.mapModelSynchronizer.setSegmentStartLatLngAndCartesianPoint(segment, nudgedStartLatLng);\n\n        if (segment.railed && segment.hasThermalExpansions) {\n          segment.thermalExpansions.forEach((thermalExpansion) => {\n            const nudgedStartLatLng = thermalExpansion.startLatLng.plus(this.nudgeVector);\n            this.mapModelSynchronizer.setThermalExpansionStartLatLngAndCartesianPoint(\n              thermalExpansion,\n              nudgedStartLatLng,\n            );\n          });\n        }\n      });\n\n      railGroup.clearPanelSelections();\n      railGroup.reRenderSegments();\n      railGroup.selectPanelsFromSimplifiedGrid(simplifiedGrid, this.selectionCollection);\n    });\n  }\n}\n", "import RailGroupConsolidator from \"../../rail-group-consolidator\";\nimport ThermalExpansionsHorizontalNudger from \"../../thermal-expansions/horizontal-nudger\";\nimport { shiftSimplifiedRailGroupSelection } from \"../helpers\";\nimport PanelsNudgerBase from \"./base\";\n\nexport default class PanelsNudgerHorizontal extends PanelsNudgerBase {\n  getNudgeVector() {\n    const directionMultiplier = this.nudgeDirection === \"right\" ? -1 : 1;\n    return this.roofPlane.eaveEdgeVectorLatLng.times(directionMultiplier * this.nudgeDistance);\n  }\n\n  nudge(options = {}) {\n    this.shiftSplits = options.shiftSplits;\n    this.railGroups = this.generateNewRailGroupsFromNudgeSplits();\n    this.#nudgeRailGroupSegmentsWithSelections();\n    this.thermalExpansionNudgeCalls = 0;\n\n    this.nudgeThermalExpansionAndHandleConsolidations();\n  }\n\n  nudgeThermalExpansionAndHandleConsolidations() {\n    this.railGroups.forEach((railGroup) => {\n      this.#thermalExpansionNudging(railGroup);\n\n      this.#consolidateOverlappingRailGroupSegments(railGroup);\n\n      railGroup.reRenderSegmentsWithPanelSelections(this.selectionCollection);\n    });\n  }\n\n  simplifiedRailGroupGridsAfterNudgeSplit(railGroup) {\n    let simplifiedGrid = railGroup.simplifiedGrid;\n    if (this.shiftSplits) {\n      simplifiedGrid = shiftSimplifiedRailGroupSelection(simplifiedGrid, this.shiftSplits);\n    }\n    const consolidatedPanelsGridStartLatLngs = railGroup.consolidatedPanelsGridStartLatLngs;\n    const consolidatedZonesAndModulePositionsGrid = railGroup.consolidatedSegmentZonesAndModulePositionsGrid;\n    const consolidatedContourCodesGrid = railGroup.consolidatedContourCodesGrid;\n\n    const controlColumnIndex = (segmentRow) => {\n      if (!segmentRow.some((panelStatus) => panelStatus === \"X\")) return undefined;\n\n      const selectionIndexes = [];\n      segmentRow.forEach((panelStatus, i) => {\n        if (panelStatus === \"O\") return;\n\n        selectionIndexes.push(i);\n      });\n\n      const minMax = this.nudgeDirection === \"left\" ? \"max\" : \"min\";\n      const result = Math[minMax](...selectionIndexes);\n      return result;\n    };\n\n    const segmentComparisonString = (segmentRow, controlColumnIndex) => {\n      return segmentRow.map((_panelStatus, i) => (i === controlColumnIndex ? \"X\" : \"O\")).join(\"\");\n    };\n\n    const segmentRowNudgeSplits = (segmentRow, controlColumnIndex) => {\n      if (controlColumnIndex === undefined) return [segmentRow];\n\n      const sliceIndex = this.nudgeDirection === \"left\" ? controlColumnIndex + 1 : controlColumnIndex;\n      const result = [segmentRow.slice(0, sliceIndex), segmentRow.slice(sliceIndex, segmentRow.length)];\n      return result.filter((result) => result.length > 0);\n    };\n\n    let newRailGroupSimplifiedGrids = [];\n    let currentRailGroupGrid;\n\n    simplifiedGrid.forEach((simplifiedGridRow, i) => {\n      const controlColumnIndexes = simplifiedGridRow.map((segmentRow) => controlColumnIndex(segmentRow));\n      const comparisonString = simplifiedGridRow\n        .map((segmentRow, i) => segmentComparisonString(segmentRow, controlColumnIndexes[i]))\n        .join(\"\");\n      const simplifiedGridRowWithNudgeSplits = simplifiedGridRow.flatMap((segmentRow, i) =>\n        segmentRowNudgeSplits(segmentRow, controlColumnIndexes[i]),\n      );\n\n      const setCurrentRailGroupGrid = () => {\n        currentRailGroupGrid = {\n          comparisonString,\n          gridRows: [simplifiedGridRowWithNudgeSplits],\n          consolidatedPanelStartLatLngRows: [consolidatedPanelsGridStartLatLngs[i]],\n          consolidatedZonesAndModulePositionsGrid: [consolidatedZonesAndModulePositionsGrid[i]],\n          consolidatedContourCodesGrid: [consolidatedContourCodesGrid[i]],\n        };\n      };\n\n      if (i === 0) {\n        setCurrentRailGroupGrid();\n      } else {\n        if (comparisonString === currentRailGroupGrid.comparisonString) {\n          currentRailGroupGrid.gridRows.push(simplifiedGridRowWithNudgeSplits);\n          currentRailGroupGrid.consolidatedPanelStartLatLngRows.push(consolidatedPanelsGridStartLatLngs[i]);\n          currentRailGroupGrid.consolidatedZonesAndModulePositionsGrid.push(consolidatedZonesAndModulePositionsGrid[i]);\n          currentRailGroupGrid.consolidatedContourCodesGrid.push(consolidatedContourCodesGrid[i]);\n        } else {\n          newRailGroupSimplifiedGrids.push(currentRailGroupGrid);\n          setCurrentRailGroupGrid();\n        }\n      }\n    });\n    newRailGroupSimplifiedGrids.push(currentRailGroupGrid);\n\n    return newRailGroupSimplifiedGrids;\n  }\n\n  #nudgeRailGroupSegmentsWithSelections() {\n    this.railGroups.forEach((railGroup) => {\n      if (!railGroup.hasAnyPanelSelections) return;\n      let simplifiedGrid = railGroup.simplifiedGrid;\n      railGroup.segments.forEach((segment) => {\n        if (!railGroup.segmentHasPanelSelections(segment)) return;\n\n        const nudgedStartLatLng = segment.startLatLng.plus(this.nudgeVector);\n        this.mapModelSynchronizer.setSegmentStartLatLngAndCartesianPoint(segment, nudgedStartLatLng);\n      });\n      railGroup.updateDistancesFromRailedParentStart();\n      railGroup.clearPanelSelections();\n      railGroup.reRenderSegments();\n\n      if (this.shiftSplits) {\n        simplifiedGrid = shiftSimplifiedRailGroupSelection(simplifiedGrid, this.shiftSplits * -1);\n      }\n      railGroup.selectPanelsFromSimplifiedGrid(simplifiedGrid, this.selectionCollection);\n    });\n  }\n\n  #thermalExpansionNudging(railGroup) {\n    this.thermalExpansionNudgeCalls++;\n    if (this.thermalExpansionNudgeCalls > 25) {\n      console.error(\"Called the thermal expansion nudger more than 25 times\");\n      return;\n    }\n\n    const { controller, nudgeDirection } = this;\n\n    const nudgesOccurred = new ThermalExpansionsHorizontalNudger({\n      controller,\n      railGroup,\n      nudgeDirection,\n    }).nudge();\n\n    if (nudgesOccurred) this.#thermalExpansionNudging(railGroup);\n  }\n\n  #consolidateOverlappingRailGroupSegments(railGroup) {\n    const { controller, nudgeDirection } = this;\n\n    const consolidationsOccurred = new RailGroupConsolidator({\n      controller,\n      railGroup,\n      nudgeDirection,\n    }).consolidate();\n\n    this.#thermalExpansionNudging(railGroup, 1);\n\n    if (consolidationsOccurred) this.#consolidateOverlappingRailGroupSegments(railGroup);\n  }\n}\n", "import { cartesianPointRelativeTo } from \"../../../../da/map/ol-geometry\";\nimport PanelsNudgerHorizontal from \"../panels/nudger/horizontal\";\nimport { createThermalExpansionFeature } from \"./helpers\";\n\nexport const THERMAL_EXPANSION_DIRECTION_LEFT = \"left\";\nexport const THERMAL_EXPANSION_DIRECTION_RIGHT = \"right\";\n\nexport default class ThermalExpansionAdder {\n  constructor({ controller, selectionCollection, direction, sourcePanelFeature }) {\n    this.controller = controller;\n    this.mapManager = controller.mapManager;\n    this.project = controller.project;\n    this.selectionCollection = selectionCollection;\n    this.direction = direction;\n    this.panel = this.#panelFromSourcePanelFeature(sourcePanelFeature);\n    this.segment = this.panel.segment.railed ? this.panel.segment : this.panel.segment.railedParent;\n    this.unitColumnVectorLatLng = this.segment.unitColumnVectorLatLng;\n    this.panelLengthAlongEave = this.segment.panelLengthAlongEave;\n    this.originLonLat = this.segment.roofPlane.project.detail.originLatLng.toLonLat;\n    this.nudgeDistance = this.project.thermalExpansionLength - this.project.interColumnSpacing;\n  }\n\n  add() {\n    this.#autoSelectColumn();\n\n    // Nudge panels first, BEFORE adding the thermal expansion.\n    // If we add the TE first, the ThermalExpansionsHorizontalNudger will detect\n    // it as overlapping the segment and incorrectly move it to the segment edge.\n    if (this.#requiresNudge) {\n      this.#nudgePanels();\n      // After nudging, the old segment is deleted and a new one is created.\n      // We need to refresh the segment reference from the current selection.\n      this.#refreshSegmentFromSelection();\n    }\n\n    this.#addThermalExpansion(this.segment);\n  }\n\n  #panelFromSourcePanelFeature(sourcePanelFeature) {\n    const selectedPanel = sourcePanelFeature.get(\"model\");\n    const segment = selectedPanel.segment;\n    return segment.panels.find((p) => p.column === selectedPanel.column && p.row === 1);\n  }\n\n  // After nudging, the old segment is deleted and a new one is created with a new UUID.\n  // This method updates all segment-related properties from the current selection.\n  #refreshSegmentFromSelection() {\n    const selectedPanelFeatures = this.selectionCollection.getArray();\n    if (selectedPanelFeatures.length === 0) return;\n\n    // Get the panel from the first selected feature - it now references the new segment\n    const panelFeature = selectedPanelFeatures[0];\n    const panel = panelFeature.get(\"model\");\n\n    // Find the row 1 panel for the same column\n    this.panel = panel.segment.panels.find((p) => p.column === panel.column && p.row === 1);\n    this.segment = this.panel.segment.railed ? this.panel.segment : this.panel.segment.railedParent;\n\n    // Update segment-derived properties\n    this.unitColumnVectorLatLng = this.segment.unitColumnVectorLatLng;\n    this.panelLengthAlongEave = this.segment.panelLengthAlongEave;\n  }\n\n  // Ensure that all of the panels in the segment column are selected.  This allows the user to\n  // only have to select a single panel in the column to add a thermal expansion.\n  #autoSelectColumn() {\n    const segmentUuid = this.panel.segment.uuid;\n    const column = this.panel.column;\n    const selectedFeatures = this.selectionCollection.getArray();\n    this.mapManager.panelsVectorSource.getFeatures().forEach((feature) => {\n      const panel = feature.get(\"model\");\n      if (panel.segment.uuid === segmentUuid && panel.column === column) {\n        if (selectedFeatures.find((sf) => sf === feature)) return;\n        this.selectionCollection.push(feature);\n      }\n    });\n  }\n\n  #addThermalExpansion(segment) {\n    const thermalExpansion = this.#createThermalExpansionModel(segment);\n    const feature = createThermalExpansionFeature(thermalExpansion);\n    this.mapManager.thermalExpansionsVectorSource.addFeature(feature);\n  }\n\n  #createThermalExpansionModel(segment) {\n    const startLatLng = this.#startLatLng;\n    const startCartesianPoint = cartesianPointRelativeTo(startLatLng.toLonLat, this.originLonLat);\n    const thermalExpansion = segment.addThermalExpansion({ startLatLng, startCartesianPoint });\n\n    return thermalExpansion;\n  }\n\n  get #startLatLng() {\n    // Use the panel's own segment for position calculation, not the railed parent.\n    // After a left nudge split, the panel may be in a non-railed segment where\n    // column 1 maps to a different position than column 1 of the railed parent.\n    const panelPosition = this.panel.segment.panelModulePosition(1, this.panel.column);\n    let latLng = panelPosition;\n\n    if (this.#isLeft) {\n      latLng = latLng.minus(this.unitColumnVectorLatLng.times(this.project.thermalExpansionLength));\n    } else {\n      latLng = latLng.plus(this.unitColumnVectorLatLng.times(this.panelLengthAlongEave));\n    }\n\n    return latLng;\n  }\n\n  get #isLeft() {\n    return this.direction === THERMAL_EXPANSION_DIRECTION_LEFT;\n  }\n\n  get #isRight() {\n    return this.direction === THERMAL_EXPANSION_DIRECTION_RIGHT;\n  }\n\n  get #requiresNudge() {\n    if (this.#isLeft) {\n      if (this.panel.column !== 1) return true;\n\n      const s1 = this.panel.segment.previousRailGroupSegment;\n      const s2 = this.panel.segment;\n      return this.#segmentsAreCloserThanNudgeDistance(s1, s2);\n    }\n    if (this.#isRight) {\n      if (this.panel.column !== this.panel.segment.columns) return true;\n\n      const s1 = this.panel.segment;\n      const s2 = this.panel.segment.nextRailGroupSegment;\n      return this.#segmentsAreCloserThanNudgeDistance(s1, s2);\n    }\n    return;\n  }\n\n  #segmentsAreCloserThanNudgeDistance(segment1, segment2) {\n    const distanceBetween =\n      segment2.distanceFromRailedParentStart - (segment1.distanceFromRailedParentStart + segment1.width);\n    return distanceBetween < this.nudgeDistance;\n  }\n\n  #nudgePanels() {\n    const nudger = new PanelsNudgerHorizontal({\n      controller: this.controller,\n      selectionCollection: this.selectionCollection,\n      nudgeDirection: this.direction,\n      nudgeDistance: this.nudgeDistance,\n    });\n    const options = {\n      shiftSplits: this.#isLeft ? -1 : 1,\n    };\n    nudger.nudge(options);\n  }\n}\n", "import { Collection } from \"ol\";\nimport { toLonLat } from \"ol/proj\";\nimport { getDistance } from \"ol/sphere\";\n\nimport { degreesToRadians } from \"../../../../helpers/geometry\";\nimport SegmentsRailGroup from \"../../map-model-synchronizers/segments-rail-group\";\nimport SegmentsNudger from \"./nudger\";\n\nimport { METERS_TO_INCHES } from \"../../../../da/map/ol-geometry\";\nimport {\n  ADJOINMENT_HORIZONTAL_THRESHOLD,\n  CONTOUR_LEGALITY_ADJOINMENT_HORIZONTAL_THRESHOLD,\n  CONTOUR_LEGALITY_ADJOINMENT_VERTICAL_THRESHOLD,\n} from \"../../../models/adjoinment-model\";\n\nexport const ADJOINMENT_TYPE_REGULAR = \"regular\";\nexport const ADJOINMENT_TYPE_CONTOUR_LEGALITY = \"contour legality\";\n\nexport default class SegmentsAdjoiningAligner {\n  constructor({ controller, selectionCollection, direction, adjoinmentType = ADJOINMENT_TYPE_REGULAR }) {\n    this.controller = controller;\n    this.project = controller.project;\n    this.selectionCollection = selectionCollection;\n\n    this.mapManager = controller.mapManager;\n    this.map = this.mapManager.map;\n\n    if (adjoinmentType === ADJOINMENT_TYPE_REGULAR) {\n      this.horizontalDistance = ADJOINMENT_HORIZONTAL_THRESHOLD;\n      this.verticalDistance = this.project.interRowSpacing;\n    } else {\n      this.horizontalDistance = CONTOUR_LEGALITY_ADJOINMENT_HORIZONTAL_THRESHOLD;\n      this.verticalDistance = CONTOUR_LEGALITY_ADJOINMENT_VERTICAL_THRESHOLD;\n    }\n\n    const [anchorSegmentFeature, moverSegmentFeature] = selectionCollection.getArray();\n\n    this.anchorSegmentFeature = anchorSegmentFeature;\n    this.moverSegmentFeature = moverSegmentFeature;\n\n    this.segmentPixels = {\n      [anchorSegmentFeature.get(\"uuid\")]: this.#segmentFeatureCoordinates(anchorSegmentFeature).map((coordinate) =>\n        this.map.getPixelFromCoordinate(coordinate),\n      ),\n      [moverSegmentFeature.get(\"uuid\")]: this.#segmentFeatureCoordinates(moverSegmentFeature).map((coordinate) =>\n        this.map.getPixelFromCoordinate(coordinate),\n      ),\n    };\n\n    this.direction = direction;\n    this.isHorizontal = direction === \"horizontal\";\n\n    this.#setNudgeDirectionAndPositionSegments();\n    this.#setNudgeDistance();\n\n    this.moverRailGroup = SegmentsRailGroup.fromSegmentUuid({ controller, uuid: moverSegmentFeature.get(\"uuid\") });\n    this.moverAndAnchorInSameRailGroup = this.moverRailGroup.segmentUuids.includes(anchorSegmentFeature.get(\"uuid\"));\n  }\n\n  areSegmentsAlignable() {\n    if (this.moverAndAnchorInSameRailGroup) {\n      this.notAlignableMessage = \"You can not adjoin align segments in the same rail group.\";\n      return false;\n    }\n\n    if (this.segmentsAreOverlapping) {\n      this.notAlignableMessage =\n        \"The segments must have some space between them in the alignment direction in order be able to carry out an adjoining alignment\";\n      return false;\n    }\n\n    return true;\n  }\n\n  align() {\n    const nudgeSegmentsCollection = this.#moverSegmentsCollection;\n    const nudgeSegmentsArray = nudgeSegmentsCollection.getArray();\n    const nudger = new SegmentsNudger({\n      controller: this.controller,\n      selectionCollection: nudgeSegmentsCollection,\n      nudgeDirection: this.nudgeDirection,\n      nudgeDistance: this.nudgeDistance,\n      slopeAdjusted: false,\n    });\n    nudger.nudge();\n\n    this.controller.selectInteractionManager.removeFromSelection(this.moverSegmentFeature);\n\n    this.#reselectMoverNewMoverSegmentAfterNudge(nudgeSegmentsArray);\n  }\n\n  get #moverSegmentsCollection() {\n    const railGroup = this.moverRailGroup;\n\n    let nudgeSegments;\n    if (this.isHorizontal) {\n      if (this.nudgeDirection === \"left\") {\n        nudgeSegments = railGroup.segmentFeaturesUpToAndIncluding(railGroup.maxSelectedSegmentFeatureIndex);\n      } else {\n        nudgeSegments = railGroup.segmentFeaturesAfterAndIncluding(railGroup.minSelectedSegmentFeatureIndex);\n      }\n    } else {\n      nudgeSegments = [this.moverSegmentFeature];\n    }\n    nudgeSegments.forEach((sf) => this.controller.selectInteractionManager.addToSelection(sf));\n\n    const collection = new Collection(nudgeSegments);\n    return collection;\n  }\n\n  #reselectMoverNewMoverSegmentAfterNudge(nudgeSegments) {\n    const findByUuid = (uuid) => {\n      return this.mapManager.segmentsVectorSource.getFeatures().find((sf) => sf.get(\"uuid\") === uuid);\n    };\n\n    nudgeSegments.forEach((sf) => {\n      const newSegmentFeatureAfterNudge = findByUuid(sf.get(\"uuid\"));\n      this.controller.selectInteractionManager.addToSelection(newSegmentFeatureAfterNudge);\n    });\n  }\n\n  #setNudgeDirectionAndPositionSegments() {\n    const anchorSegmentPixels = this.segmentPixels[this.anchorSegmentFeature.get(\"uuid\")];\n    const moverSegmentPixels = this.segmentPixels[this.moverSegmentFeature.get(\"uuid\")];\n\n    const anchorTopLeftPixel = anchorSegmentPixels[0];\n    const moverTopLeftPixel = moverSegmentPixels[0];\n\n    if (this.isHorizontal) {\n      if (anchorTopLeftPixel[0] < moverTopLeftPixel[0]) {\n        this.nudgeDirection = \"left\";\n        this.leftSegmentFeature = this.anchorSegmentFeature;\n        this.rightSegmentFeature = this.moverSegmentFeature;\n        this.segmentsAreOverlapping = anchorSegmentPixels[1][0] >= moverSegmentPixels[0][0];\n      } else {\n        this.nudgeDirection = \"right\";\n        this.leftSegmentFeature = this.moverSegmentFeature;\n        this.rightSegmentFeature = this.anchorSegmentFeature;\n        this.segmentsAreOverlapping = moverSegmentPixels[1][0] >= anchorSegmentPixels[0][0];\n      }\n    } else {\n      if (anchorTopLeftPixel[1] < moverTopLeftPixel[1]) {\n        this.nudgeDirection = \"up\";\n        this.topSegmentFeature = this.anchorSegmentFeature;\n        this.bottomSegmentFeature = this.moverSegmentFeature;\n        this.segmentsAreOverlapping = anchorSegmentPixels[3][1] >= moverSegmentPixels[0][1];\n      } else {\n        this.nudgeDirection = \"down\";\n        this.topSegmentFeature = this.moverSegmentFeature;\n        this.bottomSegmentFeature = this.anchorSegmentFeature;\n        this.segmentsAreOverlapping = moverSegmentPixels[3][1] >= anchorSegmentPixels[0][1];\n      }\n    }\n  }\n\n  #setNudgeDistance() {\n    if (this.isHorizontal) {\n      const leftSegmentLonLats = this.#segmentFeatureCoordinates(this.leftSegmentFeature).map((coordinate) =>\n        toLonLat(coordinate),\n      );\n      const leftSegmentPixels = this.segmentPixels[this.leftSegmentFeature.get(\"uuid\")];\n      const rightSegmentPixels = this.segmentPixels[this.rightSegmentFeature.get(\"uuid\")];\n\n      const lonLatOne = leftSegmentLonLats[1]; // top right\n      const pixelTwo = [rightSegmentPixels[0][0], leftSegmentPixels[1][1]];\n      const lonLatTwo = toLonLat(this.map.getCoordinateFromPixel(pixelTwo));\n      this.nudgeDistance = this.#distanceBetween(lonLatOne, lonLatTwo) - this.horizontalDistance;\n    } else {\n      const topSegmentLonLats = this.#segmentFeatureCoordinates(this.topSegmentFeature).map((coordinate) =>\n        toLonLat(coordinate),\n      );\n      const topSegmentPixels = this.segmentPixels[this.topSegmentFeature.get(\"uuid\")];\n      const bottomSegmentPixels = this.segmentPixels[this.bottomSegmentFeature.get(\"uuid\")];\n      const lonLatOne = topSegmentLonLats[3]; // bottom left\n      const pixelTwo = [topSegmentPixels[3][0], bottomSegmentPixels[0][1]];\n      const lonLatTwo = toLonLat(this.map.getCoordinateFromPixel(pixelTwo));\n\n      const roofSlopeRadians = degreesToRadians(this.controller.focusedRoofPlane.roofSlope);\n      const slopeAdjustedInterRowSpacing = this.verticalDistance * Math.cos(roofSlopeRadians);\n      this.nudgeDistance = this.#distanceBetween(lonLatOne, lonLatTwo) - slopeAdjustedInterRowSpacing;\n    }\n  }\n\n  #segmentFeatureCoordinates(segmentFeature) {\n    return segmentFeature.getGeometry().getLinearRing(0).getCoordinates();\n  }\n\n  #distanceBetween(lonLatOne, lonLatTwo) {\n    return getDistance(lonLatOne, lonLatTwo) * METERS_TO_INCHES;\n  }\n}\n", "import { Collection } from \"ol\";\nimport { fromLonLat } from \"ol/proj\";\nimport { getSnapshot } from \"mobx-state-tree\";\n\nimport SegmentsRowsAndColumnsAdder from \"./rows-and-columns-adder\";\nimport SegmentsRailGroup from \"../../map-model-synchronizers/segments-rail-group\";\nimport SegmentsAligner from \"./aligner\";\nimport { sortBy } from \"lodash\";\n\nexport default class SegmentsMerger {\n  constructor({ controller, selectionCollection, direction }) {\n    this.controller = controller;\n    this.project = controller.project;\n    this.selectionCollection = selectionCollection;\n\n    this.mapManager = controller.mapManager;\n    this.map = this.mapManager.map;\n\n    const [anchorSegmentFeature, moverSegmentFeature] = selectionCollection.getArray();\n\n    this.anchorSegmentFeature = anchorSegmentFeature;\n    this.anchorSegment = anchorSegmentFeature.get(\"model\");\n    this.anchorRailedParent = this.anchorSegment.railedParent || this.anchorSegment;\n    this.anchorRailGroup = this.anchorSegment.railedGroup;\n    this.anchorThermalExpansions = this.anchorRailedParent.thermalExpansions;\n\n    this.moverSegmentFeature = moverSegmentFeature;\n    this.moverSegment = moverSegmentFeature.get(\"model\");\n    this.moverRailedParent = this.moverSegment.railedParent || this.moverSegment;\n    this.moverRailGroup = this.moverSegment.railedGroup;\n    this.moverThermalExpansions = this.moverRailedParent.thermalExpansions;\n\n    this.direction = direction;\n    this.isHorizontal = direction === \"horizontal\";\n  }\n\n  merge() {\n    if (this.isHorizontal) {\n      return this.#mergeHorizontal();\n    } else {\n      return this.#mergeVertical();\n    }\n  }\n\n  get areSegmentsMergeable() {\n    if (this.anchorSegment.orientation !== this.moverSegment.orientation) {\n      this.notMergeableMessage = \"You can not merge segments that have different orientations.\";\n      return false;\n    }\n\n    if (this.isHorizontal) {\n      return this.#areSegmentsHorizontalMergeable();\n    } else {\n      return this.#areSegmentsVerticalMergeable();\n    }\n  }\n\n  #areSegmentsHorizontalMergeable() {\n    if (this.anchorSegment.rows !== this.moverSegment.rows) {\n      this.notMergeableMessage = \"You can only horizontally merge segments that have the same number of rows.\";\n      return false;\n    }\n\n    if (this.#segmentsAreInSameRailGroup) {\n      if (!this.#segmentsAreNextToEachOther) {\n        this.notMergeableMessage =\n          \"If you are merging segments in the same rail group, they need to be next to each other.\";\n        return false;\n      }\n\n      if (this.#segmentsHaveAThermalExpansionBetweenThem) {\n        this.notMergeableMessage = \"You can't horizontally merge segments that have a thermal expansion between them.\";\n        return false;\n      }\n    } else {\n      if (!this.anchorSegment.isOnTheOutsideOfRailGroup || !this.moverSegment.isOnTheOutsideOfRailGroup) {\n        this.notMergeableMessage = \"You can only horizontally merge segments that are on the outside of railed groups.\";\n        return false;\n      }\n\n      if (this.#mergeSegmentsBelongToMultiSegmentRailGroups) {\n        if (this.#mergeSegmentsAreOnOpposingSidesOfRailGroups) {\n          this.notMergeableMessage = \"You can only horizontally merge segments on opposite ends of their rail groups.\";\n          return false;\n        }\n\n        if (this.#mergeSegmentsHaveSegmentsInBetween) {\n          this.notMergeableMessage = \"You can not merge segments with segments in between.\";\n          return false;\n        }\n      }\n    }\n\n    return true;\n  }\n\n  get #mergeSegmentsAreOnOpposingSidesOfRailGroups() {\n    const bothAtStartOfRailedGroup = this.anchorSegment.isAtStartOfRailGroup && this.moverSegment.isAtStartOfRailGroup;\n    const bothAtEndOfRailedGroup = this.anchorSegment.isAtEndOfRailGroup && this.moverSegment.isAtEndOfRailGroup;\n    return bothAtStartOfRailedGroup || bothAtEndOfRailedGroup;\n  }\n\n  get #mergeSegmentsBelongToMultiSegmentRailGroups() {\n    return this.anchorRailGroup.length > 1 && this.moverRailGroup.length > 1;\n  }\n\n  get #segmentsHaveAThermalExpansionBetweenThem() {\n    if (this.moverThermalExpansions.length === 0) return false;\n\n    const moverSegmentPixels = this.#pixelCoordinates(this.moverSegmentFeature);\n    const anchorSegmentPixels = this.#pixelCoordinates(this.anchorSegmentFeature);\n\n    const isMoverOnLeft = moverSegmentPixels[0][0] < anchorSegmentPixels[0][0];\n    const leftSegmentPixels = isMoverOnLeft ? moverSegmentPixels : anchorSegmentPixels;\n    const rightSegmentPixels = isMoverOnLeft ? anchorSegmentPixels : moverSegmentPixels;\n\n    const leftSegmentRightSideX = leftSegmentPixels[1][0];\n    const rightSegmentLeftSideX = rightSegmentPixels[0][0];\n\n    for (let i = 0; i < this.moverThermalExpansions.length; i++) {\n      const teStartX = this.#pixelFromLatLng(this.moverThermalExpansions[i].startLatLng.toLatLng)[0];\n      if (teStartX >= leftSegmentRightSideX && teStartX <= rightSegmentLeftSideX) {\n        return true;\n      }\n    }\n    return false;\n  }\n\n  get #mergeSegmentsHaveSegmentsInBetween() {\n    const moverSegmentPixels = this.#pixelCoordinates(this.moverSegmentFeature);\n    const anchorSegmentPixels = this.#pixelCoordinates(this.anchorSegmentFeature);\n    const isMoverOnLeft = moverSegmentPixels[0][0] < anchorSegmentPixels[0][0];\n    const leftSegment = isMoverOnLeft ? this.moverSegment : this.anchorSegment;\n    return leftSegment.railGroupIndex === 0;\n  }\n\n  get #segmentsAreInSameRailGroup() {\n    return this.anchorRailGroup[0] === this.moverRailGroup[0];\n  }\n\n  get #segmentsAreNextToEachOther() {\n    return Math.abs(this.anchorSegment.railGroupIndex - this.moverSegment.railGroupIndex) === 1;\n  }\n\n  #areSegmentsVerticalMergeable() {\n    if (this.#segmentsAreInSameRailGroup) {\n      this.notMergeableMessage = \"You can not vertically merge segments in the same rail group.\";\n      return false;\n    }\n\n    if (this.anchorSegment.columns !== this.moverSegment.columns) {\n      this.notMergeableMessage = \"You can only vertically merge segments that have the same number of columns.\";\n      return false;\n    }\n\n    if (this.anchorRailGroup.length !== this.moverRailGroup.length) {\n      this.notMergeableMessage =\n        \"You can only vertically merge segments the are a part of a rail group with the same number of segments.\";\n      return false;\n    } else {\n      for (let i = 0; i < this.anchorRailGroup.length; i++) {\n        if (this.anchorRailGroup[i].columns !== this.moverRailGroup[i].columns) {\n          this.notMergeableMessage =\n            \"You can only vertically merge segments that are a part of rail groups that have segments with the same number of columns.\";\n          return false;\n        }\n      }\n    }\n\n    if (this.anchorThermalExpansions.length !== this.moverThermalExpansions.length) {\n      this.notMergeableMessage = \"You can not vertically merge segments with different numbers of thermal expansions.\";\n      return false;\n    } else if (this.#mergeSegmentsHaveDifferentThermalExpansionSegmentPatterns) {\n      this.notMergeableMessage =\n        \"You can not vertically merge segments with thermal expansions in different positions.\";\n      return false;\n    }\n\n    return true;\n  }\n\n  get #mergeSegmentsHaveDifferentThermalExpansionSegmentPatterns() {\n    return (\n      this.#segmentsAndThermalExpansionsOrderedPattern(this.anchorRailedParent) !==\n      this.#segmentsAndThermalExpansionsOrderedPattern(this.moverRailedParent)\n    );\n  }\n\n  #segmentsAndThermalExpansionsOrderedPattern(railedParent) {\n    const result = railedParent.railedGroup.map((s) => ({\n      distance: s.endDistanceFromRailedParentStart,\n      type: \"s\",\n    }));\n\n    railedParent.thermalExpansions.forEach((te) => {\n      const thermalExpansionDistance = this.controller.mapModelSynchronizer.getDistanceInInches(\n        railedParent.startLatLng,\n        te.startLatLng,\n      );\n      result.push({\n        distance: thermalExpansionDistance,\n        type: \"t\",\n      });\n    });\n\n    return sortBy(result, \"distance\")\n      .map((r) => r.type)\n      .join(\"\");\n  }\n\n  #mergeHorizontal() {\n    const moverColumns = this.moverSegment.columns;\n    const anchorColumns = this.anchorSegment.columns;\n\n    const side = this.#isAnchorOnLeft ? \"right\" : \"left\";\n\n    const moverRailGroup = SegmentsRailGroup.fromSegmentUuid({\n      controller: this.controller,\n      uuid: this.moverSegment.uuid,\n    });\n\n    const anchorRailGroup = SegmentsRailGroup.fromSegmentUuid({\n      controller: this.controller,\n      uuid: this.anchorSegment.uuid,\n    });\n\n    if (!this.#segmentsAreInSameRailGroup && moverRailGroup.segments.length > 1) {\n      this.#alignMoverSegmentsToAnchorTop(moverRailGroup);\n\n      if (this.moverSegment.railed) {\n        this.#addMoverSegmentsAndThermalExpansionsToAnchor(moverRailGroup);\n      }\n\n      if (this.anchorSegment.railed) {\n        this.#addAnchorSegmentsAndThermalExpansionsToMover(anchorRailGroup);\n      }\n    }\n\n    const moverZonesAndPositions = this.moverSegment.zonesAndModulePositionsGrid;\n    const moverContour = this.moverSegment.contourCodesGrid;\n\n    moverRailGroup.deleteSegment(this.moverSegment);\n\n    this.#addColumnsFromMoverToAnchor(side, moverColumns);\n\n    this.#horizontalMergeAddPanelPropertiesToNewPanels(\n      side,\n      anchorColumns,\n      moverColumns,\n      moverZonesAndPositions,\n      moverContour,\n    );\n  }\n\n  #alignMoverSegmentsToAnchorTop(moverRailGroup) {\n    const alignCollection = new Collection([this.anchorSegmentFeature, ...moverRailGroup.segmentFeatures]);\n    const aligner = new SegmentsAligner({\n      controller: this.controller,\n      selectionCollection: alignCollection,\n      alignTo: \"top\",\n    });\n    aligner.align();\n  }\n\n  #addMoverSegmentsAndThermalExpansionsToAnchor(moverRailGroup) {\n    this.moverRailedParent.thermalExpansions.forEach((te) => {\n      const teSnapshot = getSnapshot(te);\n      this.moverRailedParent.deleteThermalExpansion(te);\n      this.anchorRailedParent.addThermalExpansion(teSnapshot);\n    });\n\n    moverRailGroup.segments.forEach((segment) => {\n      if (segment === this.moverSegment) return;\n\n      segment.setRailedParentUuid(this.anchorRailedParent.uuid);\n    });\n  }\n\n  #addAnchorSegmentsAndThermalExpansionsToMover(anchorRailGroup) {\n    this.anchorRailedParent.thermalExpansions.forEach((te) => {\n      const teSnapshot = getSnapshot(te);\n      this.anchorRailedParent.deleteThermalExpansion(te);\n      this.moverRailedParent.addThermalExpansion(teSnapshot);\n    });\n\n    anchorRailGroup.segments.forEach((segment) => {\n      if (segment === this.anchorSegment) {\n        segment.setRailed(false);\n      }\n      segment.setRailedParentUuid(this.moverRailedParent.uuid);\n    });\n  }\n\n  #addColumnsFromMoverToAnchor(side, moverColumns) {\n    const selectionCollection = new Collection([this.anchorSegmentFeature]);\n    const adder = new SegmentsRowsAndColumnsAdder({\n      controller: this.controller,\n      selectionCollection,\n      side,\n    });\n    for (let i = 0; i < moverColumns; i++) {\n      adder.add();\n    }\n  }\n\n  #horizontalMergeAddPanelPropertiesToNewPanels(\n    side,\n    anchorColumns,\n    moverColumns,\n    moverZonesAndPositions,\n    moverContour,\n  ) {\n    const anchorPanelsGrid = this.anchorSegment.panelsGrid;\n    anchorPanelsGrid.forEach((panelsRow, rowIndex) => {\n      const newColumnsStartIndex = side === \"left\" ? 0 : anchorColumns;\n      const newPanels = panelsRow.slice(newColumnsStartIndex, newColumnsStartIndex + moverColumns);\n      newPanels.forEach((panel, columnIndex) => {\n        const [zone, position] = moverZonesAndPositions[rowIndex][columnIndex].split(\":\");\n        const contour = moverContour[rowIndex][columnIndex];\n\n        panel.setZone(zone);\n        panel.setModulePosition(position);\n        panel.setContourCode(contour);\n      });\n    });\n  }\n\n  get #isAnchorOnLeft() {\n    const anchorPixels = this.#pixelCoordinates(this.anchorSegmentFeature);\n    const anchorMidPoint = (anchorPixels[1][0] - anchorPixels[0][0]) / 2 + anchorPixels[0][0];\n    const moverPixels = this.#pixelCoordinates(this.moverSegmentFeature);\n    const moverMidPoint = (moverPixels[1][0] - moverPixels[0][0]) / 2 + moverPixels[0][0];\n    return anchorMidPoint < moverMidPoint;\n  }\n\n  #pixelFromLatLng(latLng) {\n    const lngLat = [latLng[1], latLng[0]];\n    const coordinate = fromLonLat(lngLat);\n    return this.map.getPixelFromCoordinate(coordinate);\n  }\n\n  #pixelCoordinates(feature) {\n    return feature\n      .getGeometry()\n      .getLinearRing(0)\n      .getCoordinates()\n      .map((coordinate) => this.map.getPixelFromCoordinate(coordinate));\n  }\n\n  #mergeVertical() {\n    const moverRows = this.moverSegment.rows;\n    const anchorRows = this.anchorSegment.rows;\n\n    const side = this.#isMoverOnTop ? \"top\" : \"bottom\";\n\n    this.#addMoverRowsToAnchor(side, moverRows);\n\n    this.#verticalMergeAddMoverPanelPropertiesToNewPanels(side, anchorRows, moverRows);\n  }\n\n  get #isMoverOnTop() {\n    const moverSegmentPixels = this.#pixelCoordinates(this.moverSegmentFeature);\n    const anchorSegmentPixels = this.#pixelCoordinates(this.anchorSegmentFeature);\n\n    return moverSegmentPixels[0][1] < anchorSegmentPixels[0][1];\n  }\n\n  #addMoverRowsToAnchor(side, moverRows) {\n    const selectionCollection = new Collection([this.anchorSegmentFeature]);\n    const adder = new SegmentsRowsAndColumnsAdder({\n      controller: this.controller,\n      selectionCollection,\n      side,\n    });\n    for (let i = 0; i < moverRows; i++) {\n      adder.add();\n    }\n  }\n\n  #verticalMergeAddMoverPanelPropertiesToNewPanels(side, anchorRows, moverRows) {\n    const moverRailGroup = SegmentsRailGroup.fromSegmentUuid({\n      controller: this.controller,\n      uuid: this.moverSegment.uuid,\n    });\n\n    const anchorRailGroup = SegmentsRailGroup.fromSegmentUuid({\n      controller: this.controller,\n      uuid: this.anchorSegment.uuid,\n    });\n\n    const moverZonesAndPositions = moverRailGroup.consolidatedSegmentZonesAndModulePositionsGrid;\n    const moverContour = moverRailGroup.consolidatedContourCodesGrid;\n\n    const anchorConsolidatedGrid = anchorRailGroup.consolidatedPanelsGrid.map((row) =>\n      row.map((feature) => feature.get(\"model\")),\n    );\n\n    const newRowsStartRowIndex = side === \"top\" ? 0 : anchorRows;\n    const newPanelsGrid = anchorConsolidatedGrid.slice(newRowsStartRowIndex, newRowsStartRowIndex + moverRows);\n\n    newPanelsGrid.forEach((panelsRow, rowIndex) => {\n      panelsRow.forEach((panel, columnIndex) => {\n        const [zone, position] = moverZonesAndPositions[rowIndex][columnIndex].split(\":\");\n        const contour = moverContour[rowIndex][columnIndex];\n\n        panel.setZone(zone);\n        panel.setModulePosition(position);\n        panel.setContourCode(contour);\n      });\n    });\n\n    moverRailGroup.deleteSegments();\n  }\n}\n", "import { click } from \"ol/events/condition\";\n\nimport {\n  MEASURE_DATA_TYPE,\n  PANEL_DATA_TYPE,\n  SEGMENT_DATA_TYPE,\n  THERMAL_EXPANSION_DATA_TYPE,\n} from \"../../../../da/map/data-types\";\nimport {\n  SELECT_TYPE_PANELS,\n  SELECT_TYPE_SEGMENTS,\n  SELECT_TYPE_MEASURES,\n  SELECT_TYPE_THERMAL_EXPANSIONS,\n} from \"../../../../da/layout-editor/helpers/toolbar-constants\";\nimport PanelsDeleter from \"../../modification-helpers/panels/deleter\";\nimport SegmentsDeleter from \"../../modification-helpers/segments/deleter\";\nimport ThermalExpansionsDeleter from \"../../modification-helpers/thermal-expansions/deleter\";\nimport SegmentsNudger from \"../../modification-helpers/segments/nudger\";\nimport SegmentsAligner from \"../../modification-helpers/segments/aligner\";\nimport SegmentsRowsAndColumnsAdder from \"../../modification-helpers/segments/rows-and-columns-adder\";\nimport PanelsNudgerVertical from \"../../modification-helpers/panels/nudger/vertical\";\nimport PanelsNudgerHorizontal from \"../../modification-helpers/panels/nudger/horizontal\";\nimport Base from \"./base\";\nimport { selectedPanelsStyle } from \"../../styles/zone-panels\";\nimport { selectedSegmentsStyle } from \"../../styles/segments\";\nimport { selectMeasureStyle } from \"../../../../da/map/styles/measures\";\nimport { errorAlertDialog } from \"../../../../controllers/components/ir_dialog/helper\";\nimport ThermalExpansionAdder from \"../../modification-helpers/thermal-expansions/adder\";\nimport { selectThermalExpansionStyle } from \"../../styles/thermal-expansions\";\nimport SegmentsAdjoiningAligner from \"../../modification-helpers/segments/adjoining-aligner\";\nimport SegmentsMerger from \"../../modification-helpers/segments/merger\";\n\nexport default class Arrays extends Base {\n  constructor(controller, selectType) {\n    super(controller);\n    this.setSelectType(selectType);\n  }\n\n  add() {\n    if (this.currentSelectInteraction) {\n      if (!this.currentDragBoxInteraction && !this.isMeasureSelectType) this.addDragBoxInteraction();\n\n      return;\n    }\n\n    super.add();\n    if (!this.isMeasureSelectType) this.addDragBoxInteraction();\n\n    this.selectionCollection.on([\"add\", \"remove\"], (collectionEvent) => {\n      const { element: feature, type: addRemove } = collectionEvent;\n\n      if (feature.get(\"dataType\") === SEGMENT_DATA_TYPE) {\n        const selectionArray = this.selectionCollection.getArray();\n        selectionArray.forEach((feature, i) => {\n          if (i === 0 && selectionArray.length > 1) {\n            feature.set(\"anchorSelection\", true);\n          } else {\n            feature.unset(\"anchorSelection\");\n          }\n        });\n      }\n\n      const dataType = feature.get(\"dataType\");\n      const select = addRemove === \"add\";\n      if (dataType === PANEL_DATA_TYPE) {\n        this.#selectDeselectRails(select, feature.get(\"segmentUuid\"));\n      } else if (dataType === SEGMENT_DATA_TYPE) {\n        this.#selectDeselectRails(select, feature.get(\"uuid\"));\n      }\n\n      this.controller.statusItemSelectionsTarget.innerText = this.selectionCollection.getLength();\n    });\n  }\n\n  #selectDeselectRails(select, segmentUuid) {\n    let segment = this.project.segments.find((s) => s.uuid === segmentUuid);\n\n    if (!segment) return;\n    if (!segment.railed) segment = segment.railedParent;\n\n    const railFeatures = this.mapManager.railsVectorSource\n      .getFeatures()\n      .filter((rf) => rf.get(\"segmentUuid\") === segment.uuid);\n\n    railFeatures.forEach((rf) => {\n      if (select) {\n        rf.set(\"selected\", true);\n      } else {\n        rf.set(\"selected\", false);\n      }\n    });\n  }\n\n  selectClickResetInteractionManagers() {\n    if (this.isMeasureSelectType) {\n      // The translate interaction has to be before the modify, or modify doesn't work\n      this.controller.translateInteractionManager.add();\n      this.controller.modifyInteractionManager.add();\n    }\n  }\n\n  selectStyle = (feature) => {\n    if (feature.get(\"dataType\") === PANEL_DATA_TYPE) {\n      return selectedPanelsStyle(feature, this.map, this.controller.project.is716Or722);\n    } else if (feature.get(\"dataType\") === SEGMENT_DATA_TYPE) {\n      return selectedSegmentsStyle(feature, this.controller, this.map);\n    } else if (feature.get(\"dataType\") === MEASURE_DATA_TYPE) {\n      return selectMeasureStyle(feature, this.controller, this.map);\n    } else if (feature.get(\"dataType\") === THERMAL_EXPANSION_DATA_TYPE) {\n      return selectThermalExpansionStyle(feature);\n    }\n  };\n\n  setSelectType(selectType) {\n    const previousSelectType = this.selectType;\n    this.selectType = selectType;\n    let autoSelectSegmentUuids = [];\n\n    if (this.isMeasureSelectType || this.isThermalExpansionSelectType) {\n      this.clearDragBoxInteraction();\n    } else {\n      if (\n        this.isSegmentSelectType &&\n        previousSelectType === SELECT_TYPE_PANELS &&\n        this.currentSelectInteraction &&\n        this.selectionCollection.getLength() > 0\n      ) {\n        autoSelectSegmentUuids = [\n          ...new Set(\n            this.selectedFeatures.map((panelFeature) => {\n              return panelFeature.get(\"segmentUuid\");\n            }),\n          ),\n        ];\n      }\n      this.mapManager.adjustPanelSegmentZIndexesForSelectType(selectType);\n      if (!this.currentDragBoxInteraction) this.addDragBoxInteraction();\n    }\n\n    if (this.currentSelectInteraction) {\n      this.selectionCollection.clear();\n\n      autoSelectSegmentUuids.forEach((segmentUuid) => {\n        const segmentFeature = this.mapManager.segmentsVectorSource\n          .getFeatures()\n          .find((sf) => sf.get(\"uuid\") === segmentUuid);\n        if (!segmentFeature) return;\n\n        this.selectionCollection.push(segmentFeature);\n      });\n    }\n  }\n\n  get isPanelSelectType() {\n    return this.selectType === SELECT_TYPE_PANELS;\n  }\n\n  get isSegmentSelectType() {\n    return this.selectType === SELECT_TYPE_SEGMENTS;\n  }\n\n  get isMeasureSelectType() {\n    return this.selectType === SELECT_TYPE_MEASURES;\n  }\n\n  get isThermalExpansionSelectType() {\n    return this.selectType === SELECT_TYPE_THERMAL_EXPANSIONS;\n  }\n\n  isSegmentSelected(segmentFeature) {\n    return this.selectedFeatures.find((sf) => sf.get(\"uuid\") === segmentFeature.get(\"uuid\"));\n  }\n\n  nudge(direction, inches) {\n    if (!this.currentSelectInteraction || this.selectionCollection.getLength() === 0) return;\n\n    this.mapManager.dispatchBeforeMapFeaturesRendering({\n      calledFrom: `ArraysSelectInteractionManager#nudge[${direction}]`,\n    });\n\n    const nudgerClass = this.nudgerClass(direction);\n    new nudgerClass({\n      controller: this.controller,\n      selectionCollection: this.selectionCollection,\n      nudgeDirection: direction,\n      nudgeDistance: inches,\n    }).nudge();\n\n    this.controller.markDirty();\n    this.mapManager.dispatchAfterMapFeaturesRendering({\n      calledFrom: `ArraysSelectInteractionManager#nudge[${direction}]`,\n    });\n  }\n\n  nudgerClass(direction) {\n    if (this.isSegmentSelectType) return SegmentsNudger;\n    if ([\"up\", \"down\"].includes(direction)) return PanelsNudgerVertical;\n    return PanelsNudgerHorizontal;\n  }\n\n  align(alignTo) {\n    if (!this.isSegmentSelectType) return;\n\n    if (this.selectionCollection.getLength() < 2) {\n      errorAlertDialog(\"You need to select at least two segments to align\");\n      return;\n    }\n\n    this.mapManager.dispatchBeforeMapFeaturesRendering({\n      calledFrom: `ArraysSelectInteractionManager#align[${alignTo}]`,\n    });\n\n    new SegmentsAligner({\n      controller: this.controller,\n      selectionCollection: this.selectionCollection,\n      alignTo,\n    }).align();\n\n    this.controller.markDirty();\n    this.mapManager.dispatchAfterMapFeaturesRendering({\n      calledFrom: `ArraysSelectInteractionManager#align[${alignTo}]`,\n    });\n  }\n\n  adjoiningAlign(direction, adjoinmentType) {\n    if (this.selectionCollection.getLength() !== 2) {\n      errorAlertDialog(\"You need to select exactly two segments to carry out an adjoining alignment\");\n      return;\n    }\n\n    const aligner = new SegmentsAdjoiningAligner({\n      controller: this.controller,\n      selectionCollection: this.selectionCollection,\n      direction,\n      adjoinmentType,\n    });\n\n    if (!aligner.areSegmentsAlignable()) {\n      errorAlertDialog(aligner.notAlignableMessage);\n      return;\n    }\n\n    aligner.align();\n\n    this.controller.markDirty();\n    this.mapManager.dispatchAfterMapFeaturesRendering({\n      calledFrom: `ArraysSelectInteractionManager#adjoiningAlign[${direction}]`,\n    });\n  }\n\n  merge(direction) {\n    if (this.selectionCollection.getLength() !== 2) {\n      errorAlertDialog(\"You need to select exactly two segments to carry out a merge\");\n      return;\n    }\n\n    const merger = new SegmentsMerger({\n      controller: this.controller,\n      selectionCollection: this.selectionCollection,\n      direction,\n    });\n\n    if (!merger.areSegmentsMergeable) {\n      errorAlertDialog(merger.notMergeableMessage);\n      return;\n    }\n\n    merger.merge();\n\n    this.controller.markDirty();\n    this.mapManager.dispatchAfterMapFeaturesRendering({\n      calledFrom: `ArraysSelectInteractionManager#merge[${direction}]`,\n    });\n  }\n\n  removeSelectedFeatures(event) {\n    if (!this.currentSelectInteraction) return;\n\n    const { controller, selectionCollection } = this;\n\n    if (selectionCollection.getLength() === 0) return;\n\n    this.mapManager.dispatchBeforeMapFeaturesRendering({\n      calledFrom: \"ArraysSelectInteractionManager#removeSelectedFeatures\",\n    });\n\n    if (this.isSegmentSelectType) {\n      new SegmentsDeleter({ controller, selectionCollection }).delete();\n    }\n\n    if (this.isPanelSelectType) {\n      const panelsDeleter = new PanelsDeleter({ controller, selectionCollection });\n      const deleteType = event.shiftKey ? \"railed\" : \"unrailed\";\n      panelsDeleter.delete(deleteType);\n    }\n\n    if (this.isMeasureSelectType) {\n      this.measureSelectManager.removeSelectedMeasures();\n    }\n\n    if (this.isThermalExpansionSelectType) {\n      new ThermalExpansionsDeleter({ controller }).delete();\n    }\n\n    const modifiesSaveableState = !this.isMeasureSelectType;\n    if (modifiesSaveableState) this.controller.markDirty();\n\n    this.mapManager.dispatchAfterMapFeaturesRendering({\n      calledFrom: \"ArraysSelectInteractionManager#removeSelectedFeatures\",\n    });\n  }\n\n  addToSegment(side) {\n    if (!this.isSegmentSelectType) return;\n\n    if (this.selectionCollection.getLength() === 0) {\n      errorAlertDialog(\"You need to select at least one segment to add to\");\n      return;\n    }\n\n    this.mapManager.dispatchBeforeMapFeaturesRendering({\n      calledFrom: `ArraysSelectInteractionManager#addToSegment[${side}]`,\n    });\n\n    new SegmentsRowsAndColumnsAdder({\n      controller: this.controller,\n      selectionCollection: this.selectionCollection,\n      side,\n    }).add();\n\n    this.controller.markDirty();\n    this.mapManager.dispatchAfterMapFeaturesRendering({\n      calledFrom: `ArraysSelectInteractionManager#addToSegment[${side}]`,\n    });\n  }\n\n  filterSelects = (feature, _layer) => {\n    if (this.isMeasureSelectType && feature.get(\"dataType\") === MEASURE_DATA_TYPE) return true;\n    if (this.isPanelSelectType && feature.get(\"dataType\") === PANEL_DATA_TYPE) return true;\n    if (this.isSegmentSelectType && feature.get(\"dataType\") === SEGMENT_DATA_TYPE) return true;\n    if (this.isThermalExpansionSelectType && feature.get(\"dataType\") === THERMAL_EXPANSION_DATA_TYPE) return true;\n    return false;\n  };\n\n  selectCondition = (event) => {\n    if (event.type !== \"pointermove\") {\n      if (event.originalEvent.altKey) {\n        // This allows you to click with the alt key pressed to remove single items from the selection.\n        // This is consistent with the UX we have allowing you to hold alt and drag a marquee to remove\n        // items under it from a selection\n        this.map.forEachFeatureAtPixel(event.pixel, (feature) => {\n          this.selectionCollection.remove(feature);\n        });\n        return false;\n      }\n    }\n    return click(event);\n  };\n\n  get selectionVectorSource() {\n    let vectorSource;\n    if (this.isPanelSelectType) {\n      vectorSource = this.mapManager.panelsVectorSource;\n    } else if (this.isSegmentSelectType) {\n      vectorSource = this.mapManager.segmentsVectorSource;\n    } else {\n      vectorSource = this.mapManager.measuresVectorSource;\n    }\n    return vectorSource;\n  }\n\n  addThermalExpansion(direction) {\n    if (!this.#hasSelectedPanels) {\n      errorAlertDialog(\"Please select at least one panel to insert a thermal expansion next to.\");\n    } else if (this.#hasSelectedPanelsInMoreThanOneSegment) {\n      errorAlertDialog(\"You can only add thermal expansions to one segment at a time.\");\n    } else if (this.#hasSelectedPanelsInMoreThanOneColumn) {\n      errorAlertDialog(\"Please select only panels in the same segment column to insert a thermal expansion next to.\");\n    } else if (this.#addingToEndOfRailGroup(direction)) {\n      errorAlertDialog(\"You can not add a thermal expansion to the end of a segment rail group.\");\n    } else if (this.#addingThermalExpansionWhereOneAlreadyExists(direction)) {\n      errorAlertDialog(\"You can only have one thermal expansion between two segments\");\n    } else {\n      this.mapManager.dispatchBeforeMapFeaturesRendering({\n        calledFrom: `ArraysSelectInteractionManager#addThermalExpansion[${direction}]`,\n      });\n\n      new ThermalExpansionAdder({\n        controller: this.controller,\n        selectionCollection: this.selectionCollection,\n        direction,\n        sourcePanelFeature: this.#selectedPanels[0],\n      }).add();\n\n      this.controller.markDirty();\n      this.mapManager.dispatchAfterMapFeaturesRendering({\n        calledFrom: `ArraysSelectInteractionManager#addThermalExpansion[${direction}]`,\n      });\n    }\n  }\n\n  get #hasSelectedPanels() {\n    return this.#selectedPanels.length > 0;\n  }\n\n  get #hasSelectedPanelsInMoreThanOneSegment() {\n    return [...new Set(this.#selectedPanels.map((pf) => pf.get(\"segmentUuid\")))].length > 1;\n  }\n\n  get #hasSelectedPanelsInMoreThanOneColumn() {\n    return [...new Set(this.#selectedPanels.map((pf) => pf.get(\"model\").column))].length > 1;\n  }\n\n  #addingToEndOfRailGroup(direction) {\n    const panelFeature = this.#selectedPanels[0];\n    const panel = panelFeature.get(\"model\");\n    const segment = panel.segment;\n    if (direction === \"left\" && segment.railed && panel.column === 1) return true;\n\n    const railedGroup = segment.railedGroup;\n    const isLastSegmentInRailGroup = railedGroup[railedGroup.length - 1] === segment;\n    return direction === \"right\" && isLastSegmentInRailGroup && panel.column === segment.columns;\n  }\n\n  get #selectedPanels() {\n    return this.selectedFeatures.filter((sf) => sf.get(\"dataType\") === PANEL_DATA_TYPE);\n  }\n\n  #addingThermalExpansionWhereOneAlreadyExists(direction) {\n    const panelFeature = this.#selectedPanels[0];\n    const panel = panelFeature.get(\"model\");\n    const segment = panel.segment;\n    const railedGroup = segment.railedGroup;\n    const railedParent = railedGroup[0];\n    const thermalExpansions = railedParent.thermalExpansions;\n\n    if (thermalExpansions.length === 0) return false;\n\n    if (segment.columns > 1) {\n      if (direction === \"right\" && panel.column !== segment.columns) return false;\n      if (direction === \"left\" && panel.column !== 1) return false;\n    }\n\n    let segment1;\n    let segment2;\n    if (direction === \"left\") {\n      segment1 = segment.previousRailGroupSegment;\n      segment2 = segment;\n    } else {\n      segment1 = segment;\n      segment2 = segment.nextRailGroupSegment;\n    }\n\n    const existingThermalExpansionFoundInGap = thermalExpansions.find((te) => {\n      return this.mapModelSynchronizer.isThermalExpansionBetweenSegments(te, segment1, segment2);\n    });\n\n    return existingThermalExpansionFoundInGap;\n  }\n}\n", "import Base from \"../../../../da/map/interaction-managers/snap/base\";\n\nexport default class Arrays extends Base {\n  get snapSources() {\n    return [\n      this.mapManager.roofPlanesVectorSource,\n      this.mapManager.setbacksVectorSource,\n      this.mapManager.panelsVectorSource,\n      this.mapManager.railsVectorSource,\n    ];\n  }\n}\n", "import DaBase from \"../../../../da/map/interaction-managers/modify/base\";\n\nexport default class Arrays extends DaBase {}\n", "import DaBase from \"../../../../da/map/interaction-managers/translate/base\";\n\nexport default class Arrays extends DaBase {}\n", "import { DragBoxEvent } from \"ol/interaction/DragBox\";\nimport Point from \"ol/geom/Point\";\nimport { Feature } from \"ol\";\nimport throttle from \"lodash/throttle\";\n\nimport { distanceForPixels } from \"../../../../da/map/ol-helpers\";\nimport IrDragBox, { DRAG_BOX_CLASSNAME } from \"../../../../da/map/ol-extensions/interaction/DragBox\";\nimport { ROOF_SECTION_DATA_TYPE } from \"../../../../da/map/data-types\";\nimport { logger } from \"../../../../helpers/app\";\nimport SegmentBuilder from \"../../modification-helpers/segments/builder\";\nimport SegmentRenderer from \"../../modification-helpers/segments/renderer\";\nimport { clone } from \"mobx-state-tree\";\n\nexport default class DrawInteractionManager {\n  constructor(controller) {\n    this.controller = controller;\n\n    this.mapManager = controller.mapManager;\n    this.mapModelSynchronizer = controller.mapModelSynchronizer;\n    this.map = this.mapManager.map;\n\n    this.roofPlane = this.controller.focusedRoofPlane;\n\n    this.drawBtnTarget = controller.drawBtnTarget;\n    this.throttledBoxDrag = throttle((e) => this.boxDrag(e), 50, { trailing: false });\n    this.throttledBoxMove = throttle((e) => this.boxMove(e), 50, { trailing: false });\n    this.selectionStartCoordinate = undefined;\n  }\n\n  add() {\n    this.clearCurrentInteraction();\n\n    this.currentDragBoxInteraction = new IrDragBox({ className: DRAG_BOX_CLASSNAME });\n    this.map.addInteraction(this.currentDragBoxInteraction);\n    this.toggleBoxEvents(true);\n  }\n\n  get isActive() {\n    return this.currentDragBoxInteraction !== undefined;\n  }\n\n  toggleBoxEvents(set) {\n    const setState = set ? \"on\" : \"un\";\n    this.currentDragBoxInteraction[setState](\"boxstart\", this.boxStart);\n    this.currentDragBoxInteraction[setState](\"boxdrag\", this.throttledBoxDrag);\n    this.currentDragBoxInteraction[setState](\"boxend\", this.boxEnd);\n    this.currentDragBoxInteraction[setState](\"boxcancel\", this.boxCancel);\n    this.currentDragBoxInteraction[setState](\"boxmove\", this.throttledBoxMove);\n  }\n\n  remove() {\n    this.clearCurrentInteraction();\n  }\n\n  clearCurrentInteraction() {\n    if (!this.currentDragBoxInteraction) return;\n\n    this.map.removeInteraction(this.currentDragBoxInteraction);\n    this.toggleBoxEvents(false);\n    this.currentDragBoxInteraction = undefined;\n  }\n\n  boxStart = (event) => {\n    this.showDragBox(true);\n\n    this.cancelledInteraction = false;\n\n    this.selectionStartCoordinate = event.coordinate;\n    this.selectionStartPixel = event.mapBrowserEvent.pixel;\n    this.selectionEndPixel = undefined;\n    this.selectionDirection = undefined;\n  };\n\n  boxCancel = (_event) => {\n    this.clearRowsAndColumnsMarker();\n    this.showDragBox(false);\n    this.mapManager.silhouettePanelsVectorSource.clear();\n    this.cancelledInteraction = true;\n  };\n\n  cancelDragInteraction() {\n    this.currentDragBoxInteraction.dispatchEvent(new DragBoxEvent(\"boxcancel\"));\n  }\n\n  boxMove = (event) => {\n    // We're throttling the drag handler, and we want to make sure we wait until\n    // the last drag event completes before we fire this off.  I found that 100\n    // seemed to work better than 50 for this even though we're throttling at 50.\n    setTimeout(() => {\n      this.selectionStartPixel = event.mapBrowserEvent.startPixel;\n      this.selectionEndPixel = event.mapBrowserEvent.endPixel;\n\n      this.selectionStartCoordinate = this.map.getCoordinateFromPixel(this.selectionStartPixel);\n      this.selectionEndCoordinate = this.map.getCoordinateFromPixel(this.selectionEndPixel);\n\n      this.displaySilhouettePanelsAndRowColumnsMarker();\n    }, 100);\n  };\n\n  boxDrag = (event) => {\n    if (this.cancelledInteraction) return;\n\n    this.selectionEndCoordinate = event.coordinate;\n    this.selectionEndPixel = event.mapBrowserEvent.pixel;\n\n    this.displaySilhouettePanelsAndRowColumnsMarker();\n  };\n\n  boxEnd = (_event) => {\n    // Make sure the final box drag event has finished firing\n    setTimeout(() => {\n      if (this.cancelledInteraction) return;\n\n      if (this.temporarySegment.isEmpty) {\n        this.temporarySegment.roofSection.deleteSegment(this.temporarySegment);\n        return;\n      }\n\n      this.mapManager.dispatchBeforeMapFeaturesRendering({ calledFrom: \"DrawInteractionManager#boxEnd\" });\n      this.mapManager.silhouettePanelsVectorSource.clear();\n\n      const roofSection = this.roofSectionForNewArray;\n\n      // We arbitrarily assigned the segment to the roof plane's first roof section.  Now that\n      // the drag is complete we have a better idea of what roof section this belongs to.\n      if (roofSection !== this.temporarySegment.roofSection) {\n        const segment = clone(this.temporarySegment);\n        this.temporarySegment.roofSection.deleteSegment(this.temporarySegment);\n        this.temporarySegment = segment;\n        roofSection.addSegment(segment);\n      }\n\n      this.temporarySegment.setTemporary(false);\n\n      const sr = new SegmentRenderer({\n        roofPlane: this.roofPlane,\n        segment: this.temporarySegment,\n        controller: this.controller,\n        panelsVectorSource: this.mapManager.panelsVectorSource,\n        segmentsVectorSource: this.mapManager.segmentsVectorSource,\n        railsVectorSource: this.mapManager.railsVectorSource,\n      });\n      sr.render();\n\n      this.clearRowsAndColumnsMarker();\n\n      this.mapManager.dispatchAfterMapFeaturesRendering({ calledFrom: \"DrawInteractionManager#boxEnd\" });\n\n      this.controller.markDirty();\n    }, 50);\n  };\n\n  showDragBox(shouldShow) {\n    const dragBox = document.querySelector(`.${DRAG_BOX_CLASSNAME}`);\n    if (!dragBox) return;\n\n    dragBox.style.display = shouldShow ? \"block\" : \"none\";\n  }\n\n  displaySilhouettePanelsAndRowColumnsMarker() {\n    this.clearRowsAndColumnsMarker();\n\n    const { selectionStartCoordinate, selectionEndCoordinate, selectionStartPixel, selectionEndPixel } = this;\n    const roofPlane = this.roofPlane;\n    const boxCoordinates = this.currentDragBoxInteraction.getGeometry().getLinearRing(0).getCoordinates();\n    const orientation = this.controller.panelOrientation;\n\n    this.segmentBuilder = new SegmentBuilder({\n      roofPlane,\n      orientation,\n      boxCoordinates,\n      selectionStartCoordinate,\n      selectionEndCoordinate,\n      selectionStartPixel,\n      selectionEndPixel,\n    });\n    this.temporarySegment = this.segmentBuilder.segment;\n\n    this.mapManager.silhouettePanelsVectorSource.clear();\n    const sr = new SegmentRenderer({\n      roofPlane,\n      segment: this.temporarySegment,\n      controller: this.controller,\n      panelsVectorSource: this.mapManager.silhouettePanelsVectorSource,\n    });\n    sr.render();\n\n    this.addRowsColumnsMarker();\n  }\n\n  clearRowsAndColumnsMarker() {\n    // As we drag out a grid of panels, we're creating a slew of temporary segments for each\n    // render.  We only want to keep the final one we generate when the drag ends, so we flag\n    // all built segments as temporary and flip the flag on the last one to false.  Then on\n    // each render, we remove the existing temporary segments (and panels).\n    this.roofPlane.deleteTemporarySegments();\n\n    this.mapManager.rowsColumnsMarkerVectorSource.clear();\n  }\n\n  addRowsColumnsMarker() {\n    const { selectionDirection, marqueeStart, rows, columns } = this.segmentBuilder;\n    if (rows === 0 || columns === 0 || selectionDirection === undefined) return;\n\n    const map = this.mapManager.map;\n    const widthOffset = distanceForPixels(map, 30);\n    const heightOffset = distanceForPixels(map, 18);\n\n    const marqueeStartLon = marqueeStart[0];\n    const marqueeStartLat = marqueeStart[1];\n\n    let adjustedLon;\n    let adjustedLat;\n    if (selectionDirection === \"NW\") {\n      adjustedLon = marqueeStartLon + widthOffset;\n      adjustedLat = marqueeStartLat + heightOffset;\n    } else if (selectionDirection === \"NE\") {\n      adjustedLon = marqueeStartLon - widthOffset;\n      adjustedLat = marqueeStartLat + heightOffset;\n    } else if (selectionDirection === \"SW\") {\n      adjustedLon = marqueeStartLon + widthOffset;\n      adjustedLat = marqueeStartLat - heightOffset;\n    } else if (selectionDirection === \"SE\") {\n      adjustedLon = marqueeStartLon - widthOffset;\n      adjustedLat = marqueeStartLat - heightOffset;\n    }\n\n    const rotationRads = this.roofPlane.eaveRotationAngleRadians;\n    const posLon =\n      Math.cos(rotationRads) * (adjustedLon - marqueeStartLon) -\n      Math.sin(rotationRads) * (adjustedLat - marqueeStartLat) +\n      marqueeStartLon;\n    const posLat =\n      Math.sin(rotationRads) * (adjustedLon - marqueeStartLon) +\n      Math.cos(rotationRads) * (adjustedLat - marqueeStartLat) +\n      marqueeStartLat;\n\n    const geometry = new Point([posLon, posLat]);\n    const feature = new Feature({ geometry });\n\n    feature.set(\"text\", `${rows} x ${columns}`);\n    this.mapManager.rowsColumnsMarkerVectorSource.addFeature(feature);\n  }\n\n  get silhouetteFeatures() {\n    return this.mapManager.silhouettePanelsVectorSource.getFeatures();\n  }\n\n  get roofSectionForNewArray() {\n    // Get the roof section at the marquee start\n    const boxCoordinates = this.currentDragBoxInteraction.getGeometry().getLinearRing(0).getCoordinates();\n    const roofSectionAtMarqueeStart = this.roofSectionAtCoordinate(boxCoordinates[0]);\n    if (roofSectionAtMarqueeStart) {\n      logger(\"Found roof section at marquee start\", roofSectionAtMarqueeStart.toJSON());\n      return roofSectionAtMarqueeStart;\n    }\n\n    // Get the first roof section that's under a silhouette panel\n    const silhouettePanelFeatures = this.mapManager.silhouettePanelsVectorSource.getFeatures();\n    let roofSectionForPanels = undefined;\n    for (let i = 0; i < silhouettePanelFeatures.length; i++) {\n      const feature = silhouettePanelFeatures[i];\n      const coordinate = feature.getGeometry().getLinearRing(0).getCoordinates()[0];\n      roofSectionForPanels = this.roofSectionAtCoordinate(coordinate);\n    }\n    if (roofSectionForPanels) {\n      logger(\"Found roof section at panel top left coordinate\", roofSectionForPanels.toJSON());\n      return roofSectionForPanels;\n    }\n\n    // If we didn't find a roof section at this point, just return the first one for the roof plane\n    const roofSection = this.controller.focusedRoofPlane.roofSections[0];\n    logger(\"Didn't find a roof section from marquee or panels, using first one\", roofSection.toJSON());\n    return roofSection;\n  }\n\n  roofSectionAtCoordinate(coordinate) {\n    const pixelCoordinate = this.map.getPixelFromCoordinate(coordinate);\n    const featuresAtPixel = this.map.getFeaturesAtPixel(pixelCoordinate);\n    if (!featuresAtPixel) return undefined;\n\n    const roofSectionFeature = featuresAtPixel.find((feature) => feature.get(\"dataType\") === ROOF_SECTION_DATA_TYPE);\n    if (!roofSectionFeature) return undefined;\n\n    return this.mapModelSynchronizer.getRoofSectionForFeature(roofSectionFeature);\n  }\n}\n", "import { v4 as uuid } from \"uuid\";\n\nimport { toLonLat } from \"ol/proj\";\nimport { getDistance } from \"ol/sphere\";\n\nimport { METERS_TO_INCHES, cartesianPointRelativeTo } from \"../../../../da/map/ol-geometry\";\nimport SimpleLatLng from \"../../../../da/map/models/simple-lat-lng\";\nimport SegmentModel from \"../../../models/segment-model\";\n\nexport default class SegmentBuilder {\n  constructor({\n    roofPlane,\n    orientation,\n    boxCoordinates,\n    selectionStartCoordinate,\n    selectionEndCoordinate,\n    selectionStartPixel,\n    selectionEndPixel,\n  }) {\n    this.roofPlane = roofPlane;\n    this.orientation = orientation;\n    this.boxCoordinates = boxCoordinates;\n    this.selectionStartCoordinate = selectionStartCoordinate;\n    this.selectionEndCoordinate = selectionEndCoordinate;\n    this.selectionStartPixel = selectionStartPixel;\n    this.selectionEndPixel = selectionEndPixel;\n\n    this.project = roofPlane.project;\n\n    this.run();\n  }\n\n  run() {\n    this.determinePanelRelatedSizes();\n    this.determineMarqueeDirection();\n    this.determinePanelPositionVectors();\n    this.determineRowsAndColumns();\n    this.createSegment();\n  }\n\n  determinePanelRelatedSizes() {\n    this.slopeAdjustedSpacedPanelSizeInRowDirection =\n      this.roofPlane.slopeAdjustedInterRowSpacing + this.roofPlane.panelLengthPerpendicularToEave(this.orientation);\n    this.spacedPanelSizeInColumnDirection =\n      this.project.interColumnSpacing + this.roofPlane.panelLengthAlongEave(this.orientation);\n  }\n\n  // For a NW marquee, the segment starts at Row 1, Column 1 (if you think about the start point as upper left)\n  // for a NE marquee, the segment starts are Row 1, Column M\n  // for a SE marquee, the segment starts are Row N, Column M\n  // for a SW marquee, the segment starts are Row N, Column 1\n  determineMarqueeDirection() {\n    if (!this.selectionStartPixel && !this.selectionEndPixel) return;\n    const xdelta = this.selectionEndPixel[0] - this.selectionStartPixel[0];\n    const ydelta = this.selectionEndPixel[1] - this.selectionStartPixel[1];\n    if (xdelta === 0 || ydelta === 0) {\n      console.log(\"No area. Ambiguous\");\n      this.selectionDirection = undefined;\n    } else if (xdelta > 0 && ydelta > 0) {\n      this.selectionDirection = \"NW\";\n    } else if (xdelta > 0 && ydelta < 0) {\n      this.selectionDirection = \"SW\";\n    } else if (xdelta < 0 && ydelta > 0) {\n      this.selectionDirection = \"NE\";\n    } else if (xdelta < 0 && ydelta < 0) {\n      this.selectionDirection = \"SE\";\n    }\n  }\n\n  determinePanelPositionVectors() {\n    if (!this.selectionStartCoordinate && !this.selectionEndCoordinate) return;\n\n    const { eaveEdgeVectorLatLng, eavePerpendicularEdgeVectorLatLng } = this.roofPlane;\n\n    // converting these from OL coordinates to our SimpleLatLng to make vector math easier\n    this.startLatLon = SimpleLatLng.fromLonLat(toLonLat(this.selectionStartCoordinate));\n    this.endLatLon = SimpleLatLng.fromLonLat(toLonLat(this.selectionEndCoordinate));\n\n    const startToEndDistance = getDistance(this.startLatLon.toLonLat, this.endLatLon.toLonLat);\n\n    const startPlusEavePerpendicularLatLon = this.startLatLon.plus(eavePerpendicularEdgeVectorLatLng);\n    if (getDistance(startPlusEavePerpendicularLatLon.toLonLat, this.endLatLon.toLonLat) < startToEndDistance) {\n      // adding the eave perpendicular vector moved us from start towards end so\n      this.rowDirection = 1;\n    } else {\n      this.rowDirection = -1;\n    }\n    this.unitRowVectorLatLng = eavePerpendicularEdgeVectorLatLng.times(this.rowDirection);\n\n    const startPlusEaveParallelLatLon = this.startLatLon.plus(eaveEdgeVectorLatLng);\n    if (getDistance(startPlusEaveParallelLatLon.toLonLat, this.endLatLon.toLonLat) < startToEndDistance) {\n      // adding the eave parallel vector moved us from start towards end so\n      this.columnDirection = 1;\n    } else {\n      this.columnDirection = -1;\n    }\n    this.unitColumnVectorLatLng = eaveEdgeVectorLatLng.times(this.columnDirection);\n  }\n\n  determineRowsAndColumns() {\n    const { slopeAdjustedInterRowSpacing } = this.roofPlane;\n\n    // OpenLayers constructs the marquee so that [0] is the start where you clicked\n    // [0] - [1] is perpendicular to the eave, and [0]-[3] is parallel to the eave\n    const marqueeStart = this.boxCoordinates[0];\n    this.marqueeStart = marqueeStart;\n    const marqueeEndPerpendicularToEave = this.boxCoordinates[1];\n    const marqueeEndParallelToEave = this.boxCoordinates[3];\n\n    const rowDistance = getDistance(toLonLat(marqueeStart), toLonLat(marqueeEndPerpendicularToEave)) * METERS_TO_INCHES;\n    this.rows = Math.floor(\n      (rowDistance + slopeAdjustedInterRowSpacing) /\n        this.roofPlane.slopeAdjustedSpacedPanelSizeInRowDirection(this.orientation),\n    );\n\n    const columnDistance = getDistance(toLonLat(marqueeStart), toLonLat(marqueeEndParallelToEave)) * METERS_TO_INCHES;\n    this.columns = Math.floor(\n      (columnDistance + this.project.interColumnSpacing) /\n        this.roofPlane.spacedPanelSizeInColumnDirection(this.orientation),\n    );\n  }\n\n  createSegment() {\n    const { rows, columns, orientation } = this;\n\n    const topLeftLatLng = this.topLeftLatLng;\n    const originLonLat = this.project.detail.originLatLng.toLonLat;\n    const startCartesianPoint = cartesianPointRelativeTo(topLeftLatLng.toLonLat, originLonLat);\n\n    this.segment = SegmentModel.create({\n      uuid: uuid(),\n      rows,\n      columns,\n      orientation,\n      railed: true,\n      startLatLng: { lat: topLeftLatLng.lat, lng: topLeftLatLng.lng },\n      startCartesianPoint,\n      rowDirection: 1,\n      columnDirection: -1,\n      illegalShape: false,\n      temporary: true,\n    });\n\n    // Just picking the first roof section for now.  When we finish dragging, we can\n    // figure out which roof section this segment belongs to.\n    this.roofPlane.roofSections[0].addSegment(this.segment);\n  }\n\n  get topLeftLatLng() {\n    const { rows, columns } = this;\n\n    const allTheRows = this.unitRowVectorLatLng.times(\n      rows * this.roofPlane.slopeAdjustedSpacedPanelSizeInRowDirection(this.orientation),\n    );\n    const allTheColumns = this.unitColumnVectorLatLng.times(\n      columns * this.roofPlane.spacedPanelSizeInColumnDirection(this.orientation),\n    );\n\n    let startLatLng;\n\n    if (this.selectionDirection === \"NW\") {\n      startLatLng = this.startLatLon;\n    } else if (this.selectionDirection === \"NE\") {\n      startLatLng = this.startLatLon.plus(allTheColumns);\n    } else if (this.selectionDirection === \"SE\") {\n      startLatLng = this.startLatLon.plus(allTheColumns).plus(allTheRows);\n    } else {\n      startLatLng = this.startLatLon.plus(allTheRows);\n    }\n\n    return startLatLng;\n  }\n}\n", "import { pixelsFromLatLng, truncatePixelCoordinateDecimal } from \"../../../../../da/map/ol-helpers\";\nimport { contourCodeGenerator, isContourEast, isContourSouth, isContourWest } from \"../../../../../helpers/contour\";\n\n// If panels are no longer covered by Contour on a side, remove the Contour code\nexport default class SegmentsContourCodesClearer {\n  constructor({ controller }) {\n    this.controller = controller;\n    this.map = controller.mapManager.map;\n\n    this.segments = controller.focusedRoofPlane.roofSections.flatMap((rs) => rs.notDeletedSegments);\n    this.contours = this.segments.flatMap((s) => s.contours);\n  }\n\n  clear() {\n    this.segments.forEach((segment) => {\n      const verticalPanels = [...segment.panelsOnSideLeft, ...segment.panelsOnSideRight];\n      this.#unsetVerticalPanelContourIfNoLongerCoveredByContourRun(verticalPanels, \"left\");\n      this.#unsetVerticalPanelContourIfNoLongerCoveredByContourRun(verticalPanels, \"right\");\n      this.#unsetHorizontalPanelContourIfNoLongerCoveredByContourRun(segment.panelsOnSideBottom);\n    });\n  }\n\n  #unsetVerticalPanelContourIfNoLongerCoveredByContourRun(panels, side) {\n    panels.forEach((panel) => {\n      if (panel.contourCode === \"0\") return;\n\n      const hasContourOnSide = side === \"left\" ? panel.isContourWest : panel.isContourEast;\n      if (!hasContourOnSide) return;\n\n      let panelContourPx;\n      if (side === \"left\") {\n        panelContourPx = panel.sideLatLngsLeft.map((ll) => pixelsFromLatLng(this.map, ll.toLatLng));\n      } else {\n        panelContourPx = panel.sideLatLngsRight.map((ll) => pixelsFromLatLng(this.map, ll.toLatLng));\n      }\n\n      let hasOverlappingContourRun = false;\n      this.contours.forEach((contour) => {\n        if (contour.side === \"bottom\") return;\n\n        const contourPx = contour.latLngPoints.map((ll) => pixelsFromLatLng(this.map, ll.toLatLng));\n        if (this.#hasVerticalOverlap(contourPx, panelContourPx)) {\n          hasOverlappingContourRun = true;\n        }\n      });\n\n      if (!hasOverlappingContourRun) {\n        let isWest = side === \"left\" ? false : isContourWest(panel.contourCode);\n        let isEast = side === \"left\" ? isContourEast(panel.contourCode) : false;\n        let isSouth = isContourSouth(panel.contourCode);\n        const newCode = contourCodeGenerator(isWest, isEast, isSouth);\n        panel.setContourCode(newCode);\n      }\n    });\n  }\n\n  #unsetHorizontalPanelContourIfNoLongerCoveredByContourRun(panels) {\n    panels.forEach((panel) => {\n      if (panel.contourCode === \"0\") return;\n\n      if (!panel.isContourSouth) return;\n\n      const panelContourPx = panel.sideLatLngsBottom.map((ll) => pixelsFromLatLng(this.map, ll.toLatLng));\n\n      let hasOverlappingContourRun = false;\n      this.contours.forEach((contour) => {\n        if (contour.side !== \"bottom\") return;\n\n        const contourPx = contour.latLngPoints.map((ll) => pixelsFromLatLng(this.map, ll.toLatLng));\n        if (this.#hasHorizontalOverlap(contourPx, panelContourPx)) {\n          hasOverlappingContourRun = true;\n        }\n      });\n\n      if (!hasOverlappingContourRun) {\n        let isWest = isContourWest(panel.contourCode);\n        let isEast = isContourEast(panel.contourCode);\n        let isSouth = false;\n        const newCode = contourCodeGenerator(isWest, isEast, isSouth);\n        panel.setContourCode(newCode);\n      }\n    });\n  }\n\n  #hasVerticalOverlap(contourPx, panelContourPx) {\n    const sXCompare = truncatePixelCoordinateDecimal(contourPx[0][0]);\n    const pXCompare = truncatePixelCoordinateDecimal(panelContourPx[0][0]);\n\n    if (sXCompare !== pXCompare) return false;\n\n    const panelYs = panelContourPx.map((a) => a[1]).sort((a, b) => a - b);\n    const [pY1, pY2] = panelYs;\n\n    const pY1Compare = truncatePixelCoordinateDecimal(pY1);\n    const pY2Compare = truncatePixelCoordinateDecimal(pY2);\n\n    const contourYs = contourPx.map((c) => c[1]).sort((a, b) => a - b);\n    const [cY1, cY2] = contourYs;\n\n    const cY1Compare = truncatePixelCoordinateDecimal(cY1);\n    const cY2Compare = truncatePixelCoordinateDecimal(cY2);\n\n    if (pY1Compare === cY1Compare && pY2Compare === cY2Compare) return true;\n\n    const notOverlapping = pY2Compare < cY1Compare || pY1Compare > cY2Compare;\n    return !notOverlapping;\n  }\n\n  #hasHorizontalOverlap(contourPx, panelContourPx) {\n    const sYCompare = truncatePixelCoordinateDecimal(contourPx[0][1]);\n    const pYCompare = truncatePixelCoordinateDecimal(panelContourPx[0][1]);\n\n    if (sYCompare !== pYCompare) return false;\n\n    const panelXs = panelContourPx.map((a) => a[0]).sort((a, b) => a - b);\n    const [pX1, pX2] = panelXs;\n\n    const pX1Compare = truncatePixelCoordinateDecimal(pX1);\n    const pX2Compare = truncatePixelCoordinateDecimal(pX2);\n\n    const contourXs = contourPx.map((c) => c[0]).sort((a, b) => a - b);\n    const [cX1, cX2] = contourXs;\n\n    const cX1Compare = truncatePixelCoordinateDecimal(cX1);\n    const cX2Compare = truncatePixelCoordinateDecimal(cX2);\n\n    if (pX1Compare === cX1Compare && pX2Compare === cX2Compare) return true;\n\n    const notOverlapping = pX2Compare < cX1Compare || pX1Compare > cX2Compare;\n    return !notOverlapping;\n  }\n}\n", "import MapBaseController from \"./map_base_controller\";\n\nimport MapModelSynchronizer from \"../../../../pr/map/map-model-synchronizers/arrays\";\nimport MapManager from \"../../../../pr/map/map-managers/arrays\";\nimport MeasureInteractionManager from \"../../../../da/map/interaction-managers/measure/base\";\nimport SelectInteractionManager from \"../../../../pr/map/interaction-managers/select/arrays\";\nimport SnapInteractionManager from \"../../../../pr/map/interaction-managers/snap/arrays\";\nimport ModifyInteractionManager from \"../../../../pr/map/interaction-managers/modify/arrays\";\nimport TranslateInteractionManager from \"../../../../pr/map/interaction-managers/translate/arrays\";\nimport DrawInteractionManager from \"../../../../pr/map/interaction-managers/draw/arrays\";\nimport ShapeGuideLinesInteractionManager from \"../../../../da/map/interaction-managers/shape-guide-lines/base\";\nimport { radiansToDegrees } from \"../../../../helpers/geometry\";\n\nimport {\n  EDITOR_MODE_DRAW,\n  EDITOR_MODE_SELECT,\n  EDITOR_MODE_MEASURE,\n  PANEL_ORIENTATION_PORTRAIT,\n  PANEL_ORIENTATION_LANDSCAPE,\n  SELECT_TYPE_PANELS,\n  SELECT_TYPE_SEGMENTS,\n  SELECT_TYPE_MEASURES,\n  EDITOR_MODE_PAN_MAP,\n  SELECT_TYPE_THERMAL_EXPANSIONS,\n} from \"../../../../da/layout-editor/helpers/toolbar-constants\";\nimport * as toolbarSelectGroup from \"../../../../da/layout-editor/helpers/toolbar-select-group\";\nimport * as toolbarBtn from \"../../../../da/layout-editor/helpers/toolbar-btns\";\nimport { reRenderSegment } from \"../../../../pr/map/modification-helpers/segments/helpers\";\nimport { applyDomUpdatesFromResponse } from \"../../../../helpers/api-dom-helpers\";\nimport SegmentsContourLegalityAdjoinmentsRenderer from \"../../../../pr/map/modification-helpers/segments/proximity-alignments/contour-legality-adjoinments-renderer\";\nimport SegmentsAdjoinmentsRenderer from \"../../../../pr/map/modification-helpers/segments/proximity-alignments/adjoinments-renderer\";\nimport {\n  ADJOINMENT_TYPE_CONTOUR_LEGALITY,\n  ADJOINMENT_TYPE_REGULAR,\n} from \"../../../../pr/map/modification-helpers/segments/adjoining-aligner\";\nimport SegmentsContourCodesClearer from \"../../../../pr/map/modification-helpers/segments/contour/codes-clearer\";\n\nexport default class MapArraysController extends MapBaseController {\n  static targets = [\n    \"map\",\n    \"compass\",\n    \"statusItemZoom\",\n    \"statusItemRotation\",\n    \"statusItemSelections\",\n    \"statusItemPanelsCount\",\n    \"orientationMenuBtn\",\n    \"portraitBtn\",\n    \"landscapeBtn\",\n    \"editorModeMenu\",\n    \"selectTypeMenuBtn\",\n    \"selectPanelBtn\",\n    \"selectSegmentBtn\",\n    \"selectMeasureBtn\",\n    \"selectThermalExpansionBtn\",\n    \"selectTypeMenu\",\n    \"nudgeArrowsMenuBtn\",\n    \"nudgeUpBtn\",\n    \"nudgeRightBtn\",\n    \"nudgeDownBtn\",\n    \"nudgeLeftBtn\",\n    \"arrayNudgingMenuBackground\",\n    \"alignMenuBtn\",\n    \"alignTopBtn\",\n    \"alignBottomBtn\",\n    \"alignLeftBtn\",\n    \"alignRightBtn\",\n    \"addRowsAndColumnsMenuBtn\",\n    \"addRowOnTopBtn\",\n    \"addRowOnBottomBtn\",\n    \"addColumnOnLeftBtn\",\n    \"addColumnOnRightBtn\",\n    \"addThermalExpansionGapMenuBtn\",\n    \"addThermalExpansionGapOnLeftBtn\",\n    \"addThermalExpansionGapOnRightBtn\",\n    \"adjoiningAlignMenuBtn\",\n    \"adjoiningAlignVerticalBtn\",\n    \"adjoiningAlignHorizontalBtn\",\n    \"mergeMenuBtn\",\n    \"mergeVerticalBtn\",\n    \"mergeHorizontalBtn\",\n    \"undoBtn\",\n    \"redoBtn\",\n  ];\n\n  connect() {\n    super.connect();\n\n    this.btnGroups = {\n      select: [\n        this.selectTypeMenuBtnTarget,\n        this.selectPanelBtnTarget,\n        this.selectSegmentBtnTarget,\n        this.selectMeasureBtnTarget,\n        this.nudgeArrowsMenuBtnTarget,\n        this.nudgeUpBtnTarget,\n        this.nudgeRightBtnTarget,\n        this.nudgeDownBtnTarget,\n        this.nudgeLeftBtnTarget,\n        this.arrayNudgingMenuBackgroundTarget,\n      ],\n      selectSegments: [\n        this.alignMenuBtnTarget,\n        this.alignTopBtnTarget,\n        this.alignBottomBtnTarget,\n        this.alignLeftBtnTarget,\n        this.alignRightBtnTarget,\n        this.addRowsAndColumnsMenuBtnTarget,\n        this.addRowOnTopBtnTarget,\n        this.addRowOnBottomBtnTarget,\n        this.addColumnOnLeftBtnTarget,\n        this.addColumnOnRightBtnTarget,\n        this.adjoiningAlignMenuBtnTarget,\n        this.adjoiningAlignHorizontalBtnTarget,\n        this.adjoiningAlignVerticalBtnTarget,\n        this.mergeMenuBtnTarget,\n        this.mergeHorizontalBtnTarget,\n        this.mergeVerticalBtnTarget,\n      ],\n      draw: [this.orientationMenuBtnTarget, this.portraitBtnTarget, this.landscapeBtnTarget],\n    };\n\n    this.focusedRoofPlaneUuid = this.element.dataset.focusedRoofPlaneUuid;\n    this.focusedRoofPlane = this.project.getRoofPlane(this.focusedRoofPlaneUuid);\n    this.pageRoofPlanes = [this.focusedRoofPlane];\n\n    this.slopeAdjustedMeasures = true;\n    this.renderSegmentsWithZones = false;\n    this.allowDisablingThermalExpansionBtns = true;\n\n    this.editorMode = toolbarSelectGroup.getState(\"prArraysEditorMode\", EDITOR_MODE_DRAW);\n    this.selectType = toolbarSelectGroup.getState(\"prSelectType\", SELECT_TYPE_SEGMENTS);\n    this.panelOrientation = toolbarSelectGroup.getState(\"prPanelOrientation\", PANEL_ORIENTATION_PORTRAIT);\n\n    this.mapSpecificConnect();\n    this.setupMapInteractionManagers();\n    this.initializeEditorMode();\n\n    this.populateStatusbar();\n\n    setTimeout(() => {\n      this.alignViewToFeature(this.mapModelSynchronizer.getFeatureForRoofPlane(this.focusedRoofPlane));\n      this.mapManager.rotateTo(this.focusedRoofPlane.eaveRotationAngleRadians);\n    }, 200);\n\n    this.mapManager.checkLegality();\n\n    setTimeout(() => {\n      this.enableDisableThermalExpansionButton();\n    }, 500); // Give the legality checker a chance to run\n\n    setTimeout(() => {\n      if (this.focusedRoofPlane.stale) {\n        SegmentsContourLegalityAdjoinmentsRenderer.render(this);\n        SegmentsAdjoinmentsRenderer.render(this);\n        this.markDirty({ force: true });\n      }\n\n      this.addSnapshotToUndoQueue(false);\n    }, 1000);\n\n    document.addEventListener(\"keydown\", this.handleKeydown);\n  }\n\n  undoRedoApplySnapshot(snapshot) {\n    if (!snapshot) return;\n\n    super.undoRedoApplySnapshot(snapshot);\n\n    this.setRafterOffsetAfterUndoRedo();\n  }\n\n  initializeEditorMode() {\n    switch (this.editorMode) {\n      case EDITOR_MODE_DRAW:\n        this.startDrawMode();\n        break;\n      case EDITOR_MODE_MEASURE:\n        this.startMeasureMode();\n        break;\n      case EDITOR_MODE_SELECT:\n        this.startSelectMode();\n        break;\n      case EDITOR_MODE_PAN_MAP:\n        this.startPanMapMode();\n        break;\n      default:\n        this.startDrawMode();\n    }\n  }\n\n  disconnect() {\n    super.disconnect();\n\n    document.removeEventListener(\"keydown\", this.handleKeydown);\n    this.drawInteractionManager.remove();\n  }\n\n  handleKeydown = (event) => {\n    if (event.key === \"Backspace\") {\n      if (event.target.tagName !== \"INPUT\") {\n        event.preventDefault();\n        this.selectInteractionManager.removeSelectedFeatures(event);\n      }\n    }\n\n    if (event.key === \"Escape\") {\n      if (this.drawInteractionManager.isActive) {\n        this.drawInteractionManager.cancelDragInteraction();\n      }\n\n      this.measureInteractionManager.finish();\n    }\n\n    if (event.key === \"ArrowUp\") this.nudge(event, \"up\");\n    if (event.key === \"ArrowRight\") this.nudge(event, \"right\");\n    if (event.key === \"ArrowDown\") this.nudge(event, \"down\");\n    if (event.key === \"ArrowLeft\") this.nudge(event, \"left\");\n  };\n\n  setRafterOffsetAfterUndoRedo() {\n    const rafterOffsetFormController = document.querySelector(\n      `[data-controller=\"pr--image-based--shared--rafter-offset-form\"]`,\n    ).controller;\n    rafterOffsetFormController.setInputField(this.focusedRoofPlane.rafterOffset);\n  }\n\n  mapSpecificConnect() {\n    this.mapModelSynchronizer = new MapModelSynchronizer(this);\n    this.mapManager = new MapManager(this);\n    this.mapManager.add();\n  }\n\n  setupMapInteractionManagers() {\n    this.selectInteractionManager = new SelectInteractionManager(this, this.selectType);\n\n    this.snapInteractionManager = new SnapInteractionManager(this);\n    this.snapInteractionManager.add();\n\n    this.shapeGuideLinesInteractionManager = new ShapeGuideLinesInteractionManager(this);\n\n    this.modifyInteractionManager = new ModifyInteractionManager(this);\n    this.translateInteractionManager = new TranslateInteractionManager(this);\n\n    this.measureInteractionManager = new MeasureInteractionManager(this);\n\n    this.drawInteractionManager = new DrawInteractionManager(this);\n  }\n\n  populateStatusbar() {\n    // When a value like rotation updates, we need to wait for OL to finish doing its thing\n    setTimeout(() => {\n      this.statusItemZoomTarget.innerText = this.mapManager.zoom.toFixed(3);\n      this.statusItemRotationTarget.innerText = `${radiansToDegrees(this.mapManager.rotation).toFixed(1)}\u00B0`;\n      this.statusItemPanelsCountTarget.innerText = `${this.focusedRoofPlane.panelsCount}/${this.project.panelsCount}`;\n    }, 500);\n  }\n\n  startDrawMode(event) {\n    if (event && event.currentTarget && toolbarBtn.isDisabled(event.currentTarget)) return;\n    this.editorMode = EDITOR_MODE_DRAW;\n\n    this.measureInteractionManager.remove();\n    this.modifyInteractionManager.remove();\n    this.translateInteractionManager.remove();\n    this.selectInteractionManager.remove();\n    this.drawInteractionManager.add();\n\n    this.setEnabledForBtnGroup(\"select\", false);\n    this.setEnabledForBtnGroup(\"selectSegments\", false);\n    toolbarBtn.disable(this.addThermalExpansionGapMenuBtnTarget);\n    this.setEnabledForBtnGroup(\"draw\", true);\n\n    toolbarBtn.showEnabledAndHideDisabledPinnedFlyoutMenus();\n  }\n\n  startSelectMode(event) {\n    if (event && event.currentTarget && toolbarBtn.isDisabled(event.currentTarget)) return;\n    this.editorMode = EDITOR_MODE_SELECT;\n\n    this.measureInteractionManager.remove();\n    this.selectInteractionManager.add();\n    this.translateInteractionManager.remove();\n    this.modifyInteractionManager.remove();\n    this.drawInteractionManager.remove();\n\n    this.setEnabledForBtnGroup(\"select\", true);\n    this.setEnabledForBtnGroup(\"selectSegments\", this.selectType === SELECT_TYPE_SEGMENTS);\n    this.setEnabledForBtnGroup(\"draw\", false);\n\n    toolbarBtn.showEnabledAndHideDisabledPinnedFlyoutMenus();\n  }\n\n  startPanMapMode(_event) {\n    this.editorMode = EDITOR_MODE_PAN_MAP;\n\n    this.measureInteractionManager.remove();\n    this.modifyInteractionManager.remove();\n    this.translateInteractionManager.remove();\n    this.selectInteractionManager.clearDragBoxInteraction();\n    this.drawInteractionManager.remove();\n\n    this.setEnabledForBtnGroup(\"select\", false);\n    this.setEnabledForBtnGroup(\"selectSegments\", false);\n    toolbarBtn.disable(this.addThermalExpansionGapMenuBtnTarget);\n    this.setEnabledForBtnGroup(\"draw\", false);\n\n    toolbarBtn.showEnabledAndHideDisabledPinnedFlyoutMenus();\n  }\n\n  startMeasureMode(_event) {\n    this.editorMode = EDITOR_MODE_MEASURE;\n\n    this.modifyInteractionManager.remove();\n    this.selectInteractionManager.remove();\n    this.translateInteractionManager.remove();\n    this.measureInteractionManager.add();\n    this.drawInteractionManager.remove();\n\n    this.setEnabledForBtnGroup(\"select\", false);\n    this.setEnabledForBtnGroup(\"selectSegments\", false);\n    toolbarBtn.disable(this.addThermalExpansionGapMenuBtnTarget);\n    this.setEnabledForBtnGroup(\"draw\", false);\n\n    toolbarBtn.showEnabledAndHideDisabledPinnedFlyoutMenus();\n  }\n\n  setLandscapePanelOrientation(_event) {\n    this.panelOrientation = PANEL_ORIENTATION_LANDSCAPE;\n  }\n\n  setPortraitPanelOrientation(_event) {\n    this.panelOrientation = PANEL_ORIENTATION_PORTRAIT;\n  }\n\n  setSelectToSegment(event) {\n    if (event && toolbarBtn.isDisabled(event.currentTarget)) return;\n    if (!event) {\n      this.startSelectMode();\n      this.editorModeMenuTarget.selectGroupController.selectOption(EDITOR_MODE_SELECT);\n      this.selectTypeMenuTarget.selectGroupController.selectOption(SELECT_TYPE_SEGMENTS);\n    }\n\n    this.modifyInteractionManager.remove();\n    this.translateInteractionManager.remove();\n\n    this.selectType = SELECT_TYPE_SEGMENTS;\n    this.selectInteractionManager.setSelectType(this.selectType);\n    this.setEnabledForBtnGroup(\"selectSegments\", true);\n    toolbarBtn.disable(this.addThermalExpansionGapMenuBtnTarget);\n  }\n\n  setSelectToPanel(event) {\n    if (event && toolbarBtn.isDisabled(event.currentTarget)) return;\n    if (!event) {\n      this.startSelectMode();\n      this.editorModeMenuTarget.selectGroupController.selectOption(EDITOR_MODE_SELECT);\n      this.selectTypeMenuTarget.selectGroupController.selectOption(SELECT_TYPE_PANELS);\n    }\n\n    this.modifyInteractionManager.remove();\n    this.translateInteractionManager.remove();\n\n    this.selectType = SELECT_TYPE_PANELS;\n    this.selectInteractionManager.setSelectType(this.selectType);\n    this.setEnabledForBtnGroup(\"selectSegments\", false);\n    this.enableDisableThermalExpansionButton();\n  }\n\n  setSelectToMeasure(event) {\n    if (event && toolbarBtn.isDisabled(event.currentTarget)) return;\n    if (!event) {\n      this.startSelectMode();\n      this.editorModeMenuTarget.selectGroupController.selectOption(EDITOR_MODE_SELECT);\n      this.selectTypeMenuTarget.selectGroupController.selectOption(SELECT_TYPE_MEASURES);\n    }\n\n    this.modifyInteractionManager.add();\n    this.translateInteractionManager.add();\n\n    this.selectType = SELECT_TYPE_MEASURES;\n    this.selectInteractionManager.setSelectType(this.selectType);\n    this.setEnabledForBtnGroup(\"selectSegments\", false);\n    toolbarBtn.disable(this.addThermalExpansionGapMenuBtnTarget);\n  }\n\n  setSelectToThermalExpansion(event) {\n    if (event && toolbarBtn.isDisabled(event.currentTarget)) return;\n    if (!event) {\n      this.startSelectMode();\n      this.editorModeMenuTarget.selectGroupController.selectOption(EDITOR_MODE_SELECT);\n      this.selectTypeMenuTarget.selectGroupController.selectOption(SELECT_TYPE_THERMAL_EXPANSIONS);\n    }\n\n    this.modifyInteractionManager.add();\n    this.translateInteractionManager.add();\n\n    this.selectType = SELECT_TYPE_THERMAL_EXPANSIONS;\n    this.selectInteractionManager.setSelectType(this.selectType);\n    this.setEnabledForBtnGroup(\"selectSegments\", false);\n    this.enableDisableThermalExpansionButton();\n  }\n\n  nudgeUp(event) {\n    this.nudge(event, \"up\");\n  }\n\n  nudgeRight(event) {\n    this.nudge(event, \"right\");\n  }\n\n  nudgeDown(event) {\n    this.nudge(event, \"down\");\n  }\n\n  nudgeLeft(event) {\n    this.nudge(event, \"left\");\n  }\n\n  nudge(event, direction) {\n    if (event.currentTarget !== document && toolbarBtn.isDisabled(event.currentTarget)) return;\n\n    event.preventDefault();\n    const inches = this.nudgeInches(event);\n    this.selectInteractionManager.nudge(direction, inches);\n  }\n\n  nudgeInches(event) {\n    let inches = 6;\n    if (event.shiftKey) inches = 24;\n    if (event.altKey) inches = 1;\n\n    return inches;\n  }\n\n  alignTop(event) {\n    this.align(event, \"top\");\n  }\n\n  alignBottom(event) {\n    this.align(event, \"bottom\");\n  }\n\n  alignLeft(event) {\n    this.align(event, \"left\");\n  }\n\n  alignRight(event) {\n    this.align(event, \"right\");\n  }\n\n  align(event, alignTo) {\n    if (toolbarBtn.isDisabled(event.currentTarget)) return;\n\n    this.selectInteractionManager.align(alignTo);\n  }\n\n  adjoiningAlignHorizontal(event) {\n    if (toolbarBtn.isDisabled(event.currentTarget)) return;\n\n    const type = event.altKey ? ADJOINMENT_TYPE_CONTOUR_LEGALITY : ADJOINMENT_TYPE_REGULAR;\n    this.selectInteractionManager.adjoiningAlign(\"horizontal\", type);\n  }\n\n  adjoiningAlignVertical(event) {\n    if (toolbarBtn.isDisabled(event.currentTarget)) return;\n\n    const type = event.altKey ? ADJOINMENT_TYPE_CONTOUR_LEGALITY : ADJOINMENT_TYPE_REGULAR;\n    this.selectInteractionManager.adjoiningAlign(\"vertical\", type);\n  }\n\n  mergeHorizontal(event) {\n    if (toolbarBtn.isDisabled(event.currentTarget)) return;\n\n    this.selectInteractionManager.merge(\"horizontal\");\n  }\n\n  mergeVertical(event) {\n    if (toolbarBtn.isDisabled(event.currentTarget)) return;\n\n    this.selectInteractionManager.merge(\"vertical\");\n  }\n\n  addRowOnTop(event) {\n    this.addToSegment(event, \"top\");\n  }\n\n  addRowOnBottom(event) {\n    this.addToSegment(event, \"bottom\");\n  }\n\n  addColumnOnLeft(event) {\n    this.addToSegment(event, \"left\");\n  }\n\n  addColumnOnRight(event) {\n    this.addToSegment(event, \"right\");\n  }\n\n  addToSegment(event, side) {\n    if (toolbarBtn.isDisabled(event.currentTarget)) return;\n\n    this.selectInteractionManager.addToSegment(side);\n  }\n\n  addThermalExpansionGapOnLeft(event) {\n    if (toolbarBtn.isDisabled(event.currentTarget)) return;\n\n    this.selectInteractionManager.addThermalExpansion(\"left\");\n  }\n\n  addThermalExpansionGapOnRight(event) {\n    if (toolbarBtn.isDisabled(event.currentTarget)) return;\n\n    this.selectInteractionManager.addThermalExpansion(\"right\");\n  }\n\n  enableDisableThermalExpansionButton() {\n    if (this.needsThermalExpansion || !this.allowDisablingThermalExpansionBtns) {\n      toolbarBtn.enable(this.addThermalExpansionGapMenuBtnTarget);\n    } else {\n      toolbarBtn.disable(this.addThermalExpansionGapMenuBtnTarget);\n    }\n  }\n\n  setRafterOffset(newRafterOffset) {\n    this.focusedRoofPlane.setRafterOffset(newRafterOffset);\n    this.markDirty();\n    this.mapModelSynchronizer.reRenderRafters();\n    this.addSnapshotToUndoQueue();\n  }\n\n  // Called by both Stimulus event handler and saveAndThenRedirect triggered by auto save controller\n  save(event, onSuccess) {\n    if (toolbarBtn.isDisabled(event.currentTarget)) return;\n\n    this.selectInteractionManager.deselectSelected();\n    toolbarBtn.showSpinner(this.saveBtnTarget);\n\n    const contourCodesClearer = new SegmentsContourCodesClearer({ controller: this });\n    contourCodesClearer.clear();\n\n    const currentPageCallback = (json) => {\n      if (onSuccess) onSuccess();\n\n      if (this.undoQueue) {\n        this.clearUndoQueue();\n        this.addSnapshotToUndoQueue(false);\n      }\n\n      applyDomUpdatesFromResponse(json);\n\n      this.mapManager.checkLegality();\n\n      this.markClean();\n\n      this.focusedRoofPlane.roofSections.forEach((roofSection) => {\n        roofSection.segments.forEach((segment) => {\n          reRenderSegment(this, segment);\n        });\n      });\n\n      setTimeout(() => {\n        toolbarBtn.hideSpinner(this.saveBtnTarget);\n      }, 500);\n    };\n\n    if (this.focusedRoofPlane.stale) {\n      this.focusedRoofPlane.setStale(false);\n\n      // Manually trigger roof section feature styles to reload\n      this.mapManager.roofSectionsVectorSource.getFeatures().forEach((f) => f.changed());\n    }\n\n    this.project.save({\n      path: this.savePath,\n      onSuccess: currentPageCallback,\n      onValidationError: this.onValidationError,\n      onServerError: this.onServerError,\n      includeProjectSite: false,\n      includeZonesAndModulePositions: true,\n      includeUploadedBuildingImages: false,\n    });\n  }\n}\n", "import { Style, Icon, Stroke } from \"ol/style\";\nimport Point from \"ol/geom/Point\";\nimport { fromLonLat } from \"ol/proj\";\n\nimport { lineTooShortToShowOrnamentation } from \"../../../da/map/ol-helpers\";\nimport { calculateUnitPerpendicularEdgeVectorLatLng, METERS_TO_INCHES } from \"../../../da/map/ol-geometry\";\nimport { lineNumberMarkerStyle } from \"./helpers\";\n\nconst BLUE_LINE = \"rgba(77, 151, 246, 1.0)\";\nconst YELLOW_LINE = \"rgba(216, 209, 10, 1.0)\";\nconst ORANGE_FILL = \"#D16000\";\n\nexport function defaultEaveSelectionLineStringStyle(feature, map) {\n  if (feature.get(\"lockedSelected\")) {\n    return selectedEaveSelectionLineStringStyle(feature, map);\n  }\n\n  let lineColor;\n  let circleColor;\n  if (feature.get(\"mouseover\")) {\n    lineColor = YELLOW_LINE;\n    circleColor = ORANGE_FILL;\n  } else {\n    lineColor = BLUE_LINE;\n    circleColor = \"#000\";\n  }\n  const lineWidth = 3;\n  const zIndex = 1;\n  return eaveSelectionLineStringStyles(feature, map, lineColor, lineWidth, circleColor, zIndex);\n}\n\nexport function selectedEaveSelectionLineStringStyle(feature, map) {\n  const lineColor = YELLOW_LINE;\n  const circleColor = ORANGE_FILL;\n  const lineWidth = 5;\n  const zIndex = 2;\n  const styles = eaveSelectionLineStringStyles(feature, map, lineColor, lineWidth, circleColor, zIndex);\n\n  const arrow = arrowStyle(feature, map);\n  styles.push(arrow);\n  return styles;\n}\n\nfunction arrowStyle(feature, map) {\n  const [startPoint, endPoint] = feature.getGeometry().getCoordinates();\n\n  const [midPointLatLng, unitPerpendicularEdgeVectorLatLng, _unitEdgeVectorLatLng] =\n    calculateUnitPerpendicularEdgeVectorLatLng(startPoint, endPoint); // [coordinate, inches]\n\n  const resolution = map.getView().getResolution(); // meters per pixel\n  const arrowDistancePixels = 50;\n  const arrowDistanceInches = arrowDistancePixels * resolution * METERS_TO_INCHES;\n\n  const arrowHeadLatLon = midPointLatLng.plus(unitPerpendicularEdgeVectorLatLng.times(arrowDistanceInches));\n  const arrowHeadCoordinates = fromLonLat(arrowHeadLatLon.toLonLat);\n  const heightPixels = 50;\n  const widthPixels = 50;\n\n  const dx = endPoint[0] - startPoint[0];\n  const dy = endPoint[1] - startPoint[1];\n  const rotation = -1 * (Math.atan2(dy, dx) + Math.PI);\n\n  return new Style({\n    geometry: new Point(arrowHeadCoordinates),\n    image: new Icon({\n      img: arrow(heightPixels, widthPixels),\n      imgSize: [heightPixels, widthPixels],\n      rotateWithView: true,\n      rotation,\n    }),\n    zIndex: 10,\n  });\n}\n\nfunction arrow(width, height) {\n  const canvas = document.createElement(\"canvas\");\n  canvas.height = height;\n  canvas.width = width;\n\n  const context = canvas.getContext(\"2d\");\n\n  context.beginPath();\n  const arrowPoints = [\n    [25, 5],\n    [42, 23],\n    [38, 27],\n    [28, 16],\n    [28, 44],\n    [22, 44],\n    [22, 16],\n    [12, 27],\n    [8, 23],\n  ];\n  arrowPoints.forEach((ap, i) => {\n    const m = i === 0 ? \"moveTo\" : \"lineTo\";\n    context[m](...ap);\n  });\n  context.closePath();\n\n  context.strokeStyle = \"#fff\";\n  context.fillStyle = YELLOW_LINE;\n  context.lineCap = \"round\";\n\n  context.fill();\n\n  return canvas;\n}\n\nfunction eaveSelectionLineStringStyles(feature, map, lineColor, lineWidth, circleColor, zIndex) {\n  const styles = [];\n  styles.push(\n    new Style({\n      stroke: new Stroke({ color: lineColor, width: lineWidth }),\n      zIndex,\n    }),\n  );\n  const [startPoint, endPoint] = feature.getGeometry().getCoordinates();\n  if (!lineTooShortToShowOrnamentation(map, startPoint, endPoint, 40)) {\n    const lineNumber = feature.get(\"lineNumber\");\n    styles.push(\n      lineNumberMarkerStyle({\n        startPoint,\n        endPoint,\n        lineNumber,\n        lineColor,\n        lineWidth,\n        circleColor,\n        zIndex: zIndex + 1,\n      }),\n    );\n  }\n  return styles;\n}\n", "import Select from \"ol/interaction/Select\";\nimport { click } from \"ol/events/condition\";\n\nimport { selectedEaveSelectionLineStringStyle } from \"../../styles/eave-selection\";\nimport DaBaseSelectInteractionManager from \"../../../../da/map/interaction-managers/select/base\";\nimport { setRoofPlaneEaveValues } from \"../../modification-helpers/roof-plane\";\nimport { buildLengthCorrectedEdgeList } from \"../../../../da/map/edge-list\";\n\nexport default class SelectInteractionManager extends DaBaseSelectInteractionManager {\n  get buildSelectInteraction() {\n    return new Select({\n      style: (feature) => selectedEaveSelectionLineStringStyle(feature, this.map),\n      hitTolerance: 3,\n      layers: [this.mapManager.roofPlaneLineStringsVectorLayer],\n      // this improves responsiveness because select doesn't need to wait to\n      // determine if the user single vs double clicked\n      condition: click,\n    });\n  }\n\n  selectClick = (event) => {\n    if (event.selected.length === 0) return;\n\n    const lineStringFeature = event.selected[0];\n    const roofPlane = this.project.getRoofPlane(lineStringFeature.get(\"roofPlaneUuid\"));\n    const eaveEdgeIndex = lineStringFeature.get(\"lineNumber\") - 1;\n    setRoofPlaneEaveValues(roofPlane, eaveEdgeIndex);\n\n    const roofPlaneFeature = this.mapModelSynchronizer.getFeatureForRoofPlane(roofPlane);\n    const edgeList = buildLengthCorrectedEdgeList(roofPlaneFeature, this.controller);\n    const eaveRotationAngleRadians = Math.PI - edgeList[0].rotationAngle;\n    roofPlane.setEaveRotationAngleRadians(eaveRotationAngleRadians);\n\n    this.controller.markDirty();\n  };\n}\n", "import { EAVE_SELECTION_LINE_STRING_DATA_TYPE } from \"../../../da/map/data-types\";\nimport BaseMapModelSynchronizer from \"./base\";\nimport { buildLineStringSegmentFeaturesFromPolygonCoordinates } from \"../../../da/map/ol-helpers\";\n\nexport default class EaveSelectionMapModelSynchronizer extends BaseMapModelSynchronizer {\n  featuresForRoofPlaneLineStrings(roofPlaneModel) {\n    const roofPlaneFeature = this.getFeatureForRoofPlane(roofPlaneModel);\n    const polygon = roofPlaneFeature.getGeometry();\n    const polygonCoordinates = polygon.getLinearRing(0).getCoordinates();\n\n    const features = buildLineStringSegmentFeaturesFromPolygonCoordinates(polygonCoordinates);\n    features.forEach((feature) => {\n      feature.set(\"dataType\", EAVE_SELECTION_LINE_STRING_DATA_TYPE);\n      feature.set(\"roofPlaneUuid\", roofPlaneModel.uuid);\n    });\n    return features;\n  }\n}\n", "import VectorLayer from \"ol/layer/Vector\";\nimport VectorSource from \"ol/source/Vector\";\nimport throttle from \"lodash/throttle\";\n\nimport { defaultEaveSelectionLineStringStyle } from \"../styles/eave-selection\";\nimport BaseMapManager from \"./base\";\nimport { EAVE_SELECTION_LINE_STRING_DATA_TYPE } from \"../../../da/map/data-types\";\n\nexport default class EaveSelectionMapManager extends BaseMapManager {\n  add() {\n    this.buildRoofPlanesVectorSource();\n    this.buildRoofPlaneLineStringsVectorSource();\n\n    this.map = this.buildMap({\n      layers: [this.tileLayer, this.roofPlanesVectorLayer, this.roofPlaneLineStringsVectorLayer],\n    });\n\n    this.addBuildingImagePlacementLayers();\n\n    this.setProjectSiteValuesOnMoveEnd = false;\n\n    this.map.on(\"moveend\", this.onMoveEnd);\n\n    if (!this.controller.isLocked) {\n      this.throttledOnPointerMove = throttle(this.onPointerMove, 50, { leading: true });\n      this.map.on(\"pointermove\", this.throttledOnPointerMove);\n    }\n  }\n\n  onPointerMove = (event) => {\n    this.roofPlaneLineStringsVectorSource.forEachFeature((feature) => {\n      feature.set(\"mouseover\", false);\n    });\n\n    this.map.forEachFeatureAtPixel(event.pixel, (feature) => {\n      if (feature.get(\"dataType\") === EAVE_SELECTION_LINE_STRING_DATA_TYPE) {\n        feature.set(\"mouseover\", true);\n      }\n      return true;\n    });\n  };\n\n  buildRoofPlaneLineStringsVectorSource() {\n    this.roofPlaneLineStringsVectorSource = new VectorSource({\n      features: this.mapModelSynchronizer.featuresForRoofPlaneLineStrings(this.controller.focusedRoofPlane),\n    });\n  }\n\n  get roofPlaneLineStringsVectorLayer() {\n    if (!this.memoRoofPlaneLineStringVectorLayer) {\n      this.memoRoofPlaneLineStringVectorLayer = new VectorLayer({\n        source: this.roofPlaneLineStringsVectorSource,\n        style: (feature) => defaultEaveSelectionLineStringStyle(feature, this.map),\n        zIndex: 10,\n      });\n      this.memoRoofPlaneLineStringVectorLayer.set(\"dataType\", EAVE_SELECTION_LINE_STRING_DATA_TYPE);\n    }\n    return this.memoRoofPlaneLineStringVectorLayer;\n  }\n}\n", "import { fromLonLat } from \"ol/proj\";\n\nimport EaveSelectionSelectInteractionManager from \"../../../../pr/map/interaction-managers/select/eave-selection\";\n\nimport EaveSelectionMapModelSynchronizer from \"../../../../pr/map/map-model-synchronizers/eave-selection\";\nimport EaveSelectionMapManager from \"../../../../pr/map/map-managers/eave-selection\";\n\nimport MapBaseController from \"./map_base_controller\";\n\nimport { findLineStringFeatureWithMatchingCoordinates } from \"../../../../da/map/ol-helpers\";\n\nexport default class MapRoofPlanesController extends MapBaseController {\n  static targets = [\"map\", \"compass\", \"saveBtn\", \"statusItemZoom\", \"statusItemRotation\"];\n\n  connect() {\n    super.connect();\n\n    this.focusedRoofPlaneUuid = this.element.dataset.focusedRoofPlaneUuid;\n    this.focusedRoofPlane = this.project.getRoofPlane(this.focusedRoofPlaneUuid);\n    this.isLocked = this.focusedRoofPlane.modifyingEaveOrPropertiesLocked;\n\n    this.mapModelSynchronizer = new EaveSelectionMapModelSynchronizer(this);\n\n    this.mapManager = new EaveSelectionMapManager(this);\n    this.mapManager.add();\n\n    // Add interactions\n    this.selectInteractionManager = new EaveSelectionSelectInteractionManager(this);\n    if (!this.isLocked) {\n      this.selectInteractionManager.add();\n      this.selectPersistedEaveEdge();\n    } else {\n      this.highlightSelectedEaveEdge();\n    }\n    this.populateStatusbar();\n\n    setTimeout(() => {\n      this.alignViewToFeature(this.mapModelSynchronizer.getFeatureForRoofPlane(this.focusedRoofPlane));\n    }, 200);\n  }\n\n  selectPersistedEaveEdge() {\n    if (this.focusedRoofPlane.eaveEdgeIndex === null) return;\n\n    this.selectInteractionManager.currentSelectInteraction.getFeatures().push(this.selectedEaveEdgeFeature);\n  }\n\n  highlightSelectedEaveEdge() {\n    this.selectedEaveEdgeFeature.set(\"lockedSelected\", true);\n  }\n\n  get selectedEaveEdgeFeature() {\n    const roofPlaneCoordinates = this.focusedRoofPlane.latLngPoints.map((p) => fromLonLat(p.toLonLat));\n    const segments = [];\n    for (let i = 0; i < roofPlaneCoordinates.length - 1; i++) {\n      segments.push([roofPlaneCoordinates[i], roofPlaneCoordinates[i + 1]]);\n    }\n    const eaveEdgeCoordinates = segments[this.focusedRoofPlane.eaveEdgeIndex];\n\n    const features = this.mapManager.roofPlaneLineStringsVectorSource.getFeatures();\n    return findLineStringFeatureWithMatchingCoordinates(features, eaveEdgeCoordinates);\n  }\n\n  // Needed to override parent class method\n  startSelectMode() {}\n\n  // Called by both Stimulus event handler and saveAndThenRedirect triggered by auto save controller\n  save(_event, onSuccess = () => {}) {\n    this.modelSave({ model: this.project, onSuccess, includeProjectSite: false, includeUploadedBuildingImages: false });\n  }\n}\n", "import BaseMapModelSynchronizer from \"./base\";\nimport RaftersBuilder from \"../modification-helpers/rafters-builder\";\n\nexport default class PanelPropertiesMapModelSynchronizer extends BaseMapModelSynchronizer {\n  loadSetbacks() {\n    return [this.buildSetbackForRoofPlane(this.controller.focusedRoofPlane)];\n  }\n\n  rafterFeatures() {\n    return new RaftersBuilder({ controller: this.controller, roofPlane: this.controller.focusedRoofPlane }).build();\n  }\n\n  reRenderRafters() {\n    const raftersVectorSource = this.controller.mapManager.raftersVectorSource;\n    raftersVectorSource.clear();\n    raftersVectorSource.addFeatures(this.rafterFeatures());\n  }\n}\n", "import VectorLayer from \"ol/layer/Vector\";\nimport VectorSource from \"ol/source/Vector\";\nimport Crop from \"ol-ext/filter/Crop\";\n\nimport BaseMapManager from \"./base\";\n\nimport { railsStyle, segmentsStyle } from \"../styles/segments\";\nimport { panelsStyle } from \"../styles/zone-panels\";\nimport { raftersStyle } from \"../styles/rafters\";\n\nimport { PANEL_DATA_TYPE, RAIL_DATA_TYPE } from \"../../../da/map/data-types\";\nimport { SELECT_TYPE_SEGMENTS } from \"../../../da/layout-editor/helpers/toolbar-constants\";\nimport { logger } from \"../../../helpers/app\";\nimport { reRenderSegment } from \"../modification-helpers/segments/helpers\";\n\nimport * as events from \"../../../da/map/events\";\nexport default class PanelProperties extends BaseMapManager {\n  add() {\n    this.buildRoofPlanesVectorSource();\n    this.buildRaftersVectorSource();\n    this.buildRoofSectionsVectorSource();\n    this.buildSetbacksVectorSource();\n    this.buildMeasuresVectorSource();\n    this.buildShapeGuideLinesVectorSource();\n    this.buildPanelsVectorSource();\n    this.buildSegmentsVectorSource();\n    this.buildRailsVectorSource();\n    this.buildThermalExpansionsVectorSource();\n    this.buildAdjoinmentsVectorSource();\n    this.buildContoursVectorSource();\n    this.buildContourLegalityAdjoinmentsVectorSource();\n\n    this.map = this.buildMap({\n      layers: [\n        this.tileLayer,\n        this.raftersVectorLayer,\n        this.visualMarkersVectorLayer,\n        this.roofPlanesVectorLayer,\n        this.measuresVectorLayer,\n        this.shapeGuideLinesVectorLayer,\n        this.panelsVectorLayer,\n        this.roofSectionsVectorLayer,\n        this.setbacksVectorLayer,\n        this.segmentsVectorLayer,\n        this.railsVectorLayer,\n        this.thermalExpansionsVectorLayer,\n        this.contourLegalityAdjoinmentsVectorLayer,\n        this.adjoinmentsVectorLayer,\n        this.contoursVectorLayer,\n      ],\n    });\n\n    // We need to have the map in place first\n    this.addRafterFeatures();\n    this.renderContourFeatures();\n    this.addBuildingImagePlacementLayers();\n\n    this.setProjectSiteValuesOnMoveEnd = false;\n\n    this.map.on(\"moveend\", this.onMoveEnd);\n\n    this.map.on(events.AFTER_MAP_FEATURES_RENDERING_EVENT, (event) => {\n      logger(`Dispatch ${events.AFTER_MAP_FEATURES_RENDERING_EVENT} called from ${event.calledFrom}`);\n\n      this.controller.focusedRoofPlane.roofSections.forEach((rs) => {\n        rs.segments.forEach((s) => {\n          if (s.hasContourCodesAndDetailsMismatch) {\n            console.log(\"Warning: Contour Codes Mismatch\");\n            debugger;\n          }\n        });\n      });\n\n      this.refreshSegmentZonesPositionsAndContourCodes();\n\n      this.controller.addSnapshotToUndoQueue();\n    });\n  }\n\n  refreshSegmentZonesPositionsAndContourCodes() {\n    this.controller.focusedRoofPlane.roofSections.forEach((roofSection) => {\n      roofSection.segments.forEach((segment) => {\n        segment.refreshZonesAndModulePositions();\n        segment.refreshContourCodes();\n      });\n    });\n  }\n\n  clearFeaturesBeforeSnapshotUpdate() {\n    this.clearPanelFeatures();\n    this.clearSegmentFeatures();\n    this.clearRailFeatures();\n    this.clearAdjoinmentFeatures();\n    this.clearContourLegalityAdjoinmentFeatures();\n    this.clearContourFeatures();\n    this.clearThermalExpansionFeatures();\n  }\n\n  renderFeaturesAfterSnapshotUpdate() {\n    this.controller.focusedRoofPlane.roofSections.forEach((roofSection) => {\n      roofSection.segments.forEach((segment) => {\n        reRenderSegment(this.controller, segment);\n      });\n    });\n    this.renderAdjoinAlignments();\n    this.renderContourLegalityAdjoinAlignments();\n    this.renderContourFeatures();\n  }\n\n  buildPanelsVectorSource() {\n    this.panelsVectorSource = new VectorSource({\n      features: this.mapModelSynchronizer.featuresForRoofPlanePanels(this.controller.focusedRoofPlane),\n    });\n  }\n\n  get panelsVectorLayer() {\n    if (!this.memoPanelsVectorLayer) {\n      this.memoPanelsVectorLayer = new VectorLayer({\n        source: this.panelsVectorSource,\n        style: (feature) => panelsStyle(feature, this.map, this.controller.project.is716Or722),\n        zIndex: 60,\n      });\n      this.memoPanelsVectorLayer.set(\"dataType\", PANEL_DATA_TYPE);\n    }\n    return this.memoPanelsVectorLayer;\n  }\n\n  buildSegmentsVectorSource() {\n    this.segmentsVectorSource = new VectorSource({\n      features: this.mapModelSynchronizer.segmentFeatures,\n    });\n  }\n\n  get segmentsVectorLayer() {\n    if (!this.memoSegmentsVectorLayer) {\n      this.memoSegmentsVectorLayer = new VectorLayer({\n        source: this.segmentsVectorSource,\n        style: (feature) => segmentsStyle(feature),\n        zIndex: 40,\n      });\n    }\n    return this.memoSegmentsVectorLayer;\n  }\n\n  buildRailsVectorSource() {\n    this.railsVectorSource = new VectorSource({\n      features: this.mapModelSynchronizer.railFeatures,\n    });\n  }\n\n  get railsVectorLayer() {\n    if (!this.memoRailsVectorLayer) {\n      this.memoRailsVectorLayer = new VectorLayer({\n        source: this.railsVectorSource,\n        style: (feature) => railsStyle(feature),\n        zIndex: 30,\n      });\n      this.memoRailsVectorLayer.set(\"dataType\", RAIL_DATA_TYPE);\n    }\n    return this.memoRailsVectorLayer;\n  }\n\n  adjustPanelSegmentZIndexesForSelectType(selectType) {\n    if (selectType === SELECT_TYPE_SEGMENTS) {\n      this.segmentsVectorLayer.setZIndex(60);\n      this.panelsVectorLayer.setZIndex(40);\n    } else {\n      this.panelsVectorLayer.setZIndex(60);\n      this.segmentsVectorLayer.setZIndex(40);\n    }\n  }\n\n  buildRaftersVectorSource() {\n    this.raftersVectorSource = new VectorSource();\n  }\n\n  addRafterFeatures() {\n    this.raftersVectorSource.addFeatures(this.mapModelSynchronizer.rafterFeatures());\n    const roofPlaneFeature = this.roofPlanesVectorSource.getFeatures()[0];\n    const cropFilter = new Crop({ feature: roofPlaneFeature, inner: false });\n    this.raftersVectorLayer.addFilter(cropFilter);\n  }\n\n  get raftersVectorLayer() {\n    if (!this.memoRaftersVectorLayer) {\n      this.memoRaftersVectorLayer = new VectorLayer({\n        source: this.raftersVectorSource,\n        style: (feature) => raftersStyle(feature),\n      });\n    }\n    return this.memoRaftersVectorLayer;\n  }\n}\n", "import Base from \"./base\";\nimport { selectedPanelsStyle } from \"../../styles/zone-panels\";\nimport { selectMeasureStyle } from \"../../../../da/map/styles/measures\";\nimport { alertDialog } from \"../../../../controllers/components/ir_dialog/helper\";\n\nimport { MEASURE_DATA_TYPE, PANEL_DATA_TYPE } from \"../../../../da/map/data-types\";\n\nexport default class PanelProperties extends Base {\n  selectStyle = (feature) => {\n    const isPanel = feature.get(\"dataType\") === PANEL_DATA_TYPE;\n    if (isPanel) {\n      return selectedPanelsStyle(feature, this.map, this.controller.project.is716Or722);\n    } else {\n      return selectMeasureStyle(feature, this.controller, this.map);\n    }\n  };\n\n  filterSelects = (feature, _layer) => {\n    if (this.isMeasureSelectionType) {\n      return feature.get(\"dataType\") === MEASURE_DATA_TYPE;\n    } else {\n      return feature.get(\"dataType\") === PANEL_DATA_TYPE;\n    }\n  };\n\n  add(selectionType) {\n    this.selectionType = selectionType;\n\n    if (this.currentSelectInteraction) {\n      if (!this.currentDragBoxInteraction) this.addDragBoxInteraction();\n    }\n\n    super.add();\n\n    if (this.isMeasureSelectionType) return;\n\n    this.addDragBoxInteraction();\n\n    this.selectionCollection.on([\"add\"], (collectionEvent) => {\n      const { element: panelFeature } = collectionEvent;\n      const panel = panelFeature.get(\"model\");\n\n      this.#setPanelProperties(panel);\n\n      this.mapModelSynchronizer.throttledReRenderContourFeatures();\n\n      if (!this.dragBoxMarqueePresent) {\n        this.mapManager.dispatchAfterMapFeaturesRendering({\n          calledFrom: `PanelPropertiesSelectInteractionManager[selectionCollection add event]`,\n        });\n      }\n    });\n\n    this.selectionCollection.on([\"add\", \"remove\"], (_collectionEvent) => {\n      this.controller.statusItemSelectionsTarget.innerText = this.selectionCollection.getLength();\n      if (this.controller.focusedRoofPlane.needsSave) this.controller.markDirty();\n    });\n\n    this.selectionCollection.on([\"remove\"], (collectionEvent) => {\n      if (!this.draggingSelectionMarquee) return;\n\n      const { element: panelFeature } = collectionEvent;\n      const panel = panelFeature.get(\"model\");\n      panel.setZone(panelFeature.get(\"zoneBeforeSelection\"));\n      panel.setModulePosition(panelFeature.get(\"modulePositionBeforeSelection\"));\n      panel.setContourCode(panelFeature.get(\"contourCodeBeforeSelection\"));\n    });\n  }\n\n  setZone(zone) {\n    this.selectionCollection.forEach((panelFeature) => {\n      const panel = panelFeature.get(\"model\");\n      panel.setZone(zone);\n      panelFeature.dispatchEvent(\"change\"); // Cause a re-render to pick up the new zone style\n    });\n  }\n\n  get isPanelSelectionType() {\n    return this.selectionType === PANEL_DATA_TYPE;\n  }\n\n  get isMeasureSelectionType() {\n    return this.selectionType === MEASURE_DATA_TYPE;\n  }\n\n  selectClickResetInteractionManagers() {\n    if (this.isMeasureSelectionType) {\n      // The translate interaction has to be before the modify, or modify doesn't work\n      this.controller.translateInteractionManager.add();\n      this.controller.modifyInteractionManager.add();\n    }\n  }\n\n  onDraggingSelectionStart(event) {\n    // Go ahead and apply the selected zone or module position to the panel being clicked. This\n    // allows the user to click an already selected panel and change its zone or module position.\n    const pixel = this.map.getPixelFromCoordinate(event.coordinate);\n    this.map.getFeaturesAtPixel(pixel).forEach((feature) => {\n      if (feature.get(\"dataType\") !== PANEL_DATA_TYPE) return;\n\n      const panel = feature.get(\"model\");\n      this.#setPanelProperties(panel);\n    });\n\n    this.mapModelSynchronizer.reRenderContourFeatures();\n\n    this.mapManager.panelsVectorSource.getFeatures().forEach((panelFeature) => {\n      const panel = panelFeature.get(\"model\");\n      panelFeature.set(\"zoneBeforeSelection\", panel.zone);\n      panelFeature.set(\"modulePositionBeforeSelection\", panel.modulePosition);\n      panelFeature.set(\"contourCodeBeforeSelection\", panel.contourCode);\n    });\n  }\n\n  onDraggingSelection() {\n    this.dragBoxMarqueePresent = true;\n  }\n\n  onDraggingSelectionEnd() {\n    this.dragBoxMarqueePresent = false;\n\n    this.mapManager.dispatchAfterMapFeaturesRendering({\n      calledFrom: `PanelPropertiesSelectInteractionManager#onDraggingSelectionEnd`,\n    });\n  }\n\n  get selectionVectorSource() {\n    return this.mapManager.panelsVectorSource;\n  }\n\n  setModulePosition(position) {\n    this.selectionCollection.forEach((panelFeature) => {\n      const panel = panelFeature.get(\"model\");\n      panel.setModulePosition(position);\n      panelFeature.dispatchEvent(\"change\"); // Cause a re-render to pick up the new zone style\n    });\n  }\n\n  removeSelectedShapes = () => {\n    if (!this.isMeasureSelectionType) {\n      const msg = \"Sorry you can't delete panels on this screen.  To remove panels use the arrays page.\";\n      alertDialog(msg, () => {}, {\n        title: \"Can not delete\",\n        headerColor: \"red\",\n        confirmBtnColor: \"red\",\n      });\n      return;\n    }\n\n    this.baseRemoveSelectedShapes();\n  };\n\n  #setPanelProperties(panel) {\n    if (this.controller.isEditorModePaintZones) {\n      const selectedZone = this.controller.paintZonesSelection;\n      panel.setZone(selectedZone);\n    } else if (this.controller.isEditorModePaintContour) {\n      panel.setContourCodeFromDirections(this.controller.contourPaintDirections);\n    } else {\n      const selectedPosition = this.controller.paintModulePositionsSelection;\n      panel.setModulePosition(selectedPosition);\n    }\n  }\n}\n", "import Base from \"../../../../da/map/interaction-managers/snap/base\";\n\nexport default class PanelProperties extends Base {\n  get snapSources() {\n    return [\n      this.mapManager.roofPlanesVectorSource,\n      this.mapManager.roofSectionsVectorSource,\n      this.mapManager.panelsVectorSource,\n    ];\n  }\n}\n", "import MapBaseController from \"./map_base_controller\";\n\nimport MapModelSynchronizer from \"../../../../pr/map/map-model-synchronizers/panel-properties\";\nimport MapManager from \"../../../../pr/map/map-managers/panel-properties\";\nimport MeasureInteractionManager from \"../../../../da/map/interaction-managers/measure/base\";\nimport SelectInteractionManager from \"../../../../pr/map/interaction-managers/select/panel-properties\";\nimport SnapInteractionManager from \"../../../../pr/map/interaction-managers/snap/panel-properties\";\nimport TranslateInteractionManager from \"../../../../da/map/interaction-managers/translate/base\";\nimport ModifyInteractionManager from \"../../../../da/map/interaction-managers/modify/base\";\nimport ShapeGuideLinesInteractionManager from \"../../../../da/map/interaction-managers/shape-guide-lines/base\";\nimport { radiansToDegrees } from \"../../../../helpers/geometry\";\n\nimport * as toolbarSelectGroup from \"../../../../da/layout-editor/helpers/toolbar-select-group\";\nimport * as toolbarBtn from \"../../../../da/layout-editor/helpers/toolbar-btns\";\n\nimport {\n  EDITOR_MODE_PAINT_ZONES,\n  EDITOR_MODE_PAINT_MODULE_POSITIONS,\n  EDITOR_MODE_MEASURE,\n  EDITOR_MODE_PAN_MAP,\n  EDITOR_MODE_SELECT,\n  EDITOR_MODE_PAINT_CONTOUR,\n} from \"../../../../da/layout-editor/helpers/toolbar-constants\";\nimport { reRenderSegment } from \"../../../../pr/map/modification-helpers/segments/helpers\";\nimport { applyDomUpdatesFromResponse } from \"../../../../helpers/api-dom-helpers\";\nimport { ROOF_SHAPE_GABLE } from \"../../../../pr/models/project-model\";\nimport {\n  ZONES_710,\n  ZONES_716_GABLE,\n  ZONES_716_HIP,\n  ZONE_1,\n  ZONE_2,\n  ZONE_2E,\n  ZONE_2N,\n  ZONE_2R,\n  ZONE_3,\n  ZONE_3E,\n  ZONE_3R,\n  MODULE_POSITION_N,\n  MODULE_POSITION_EXP,\n  MODULE_POSITION_EDG,\n  MODULE_POSITION_EDGN,\n  MODULE_POSITION_EDGS,\n} from \"../../../../helpers/zones-and-module-positions\";\nimport { MEASURE_DATA_TYPE, PANEL_DATA_TYPE } from \"../../../../da/map/data-types\";\nimport SegmentsContourCodesClearer from \"../../../../pr/map/modification-helpers/segments/contour/codes-clearer\";\n\nexport default class MapPanelPropertiesController extends MapBaseController {\n  static targets = [\n    \"map\",\n    \"compass\",\n    \"statusItemZoom\",\n    \"statusItemRotation\",\n    \"statusItemSelections\",\n    \"statusItemPanelsCount\",\n    \"paintZonesBtn\",\n    \"paintModulePositionsBtn\",\n    \"measureBtn\",\n    \"zonesMenuBtn\",\n    \"zone1Btn\",\n    \"zone2Btn\",\n    \"zone2eBtn\",\n    \"zone2nBtn\",\n    \"zone2rBtn\",\n    \"zone3Btn\",\n    \"zone3eBtn\",\n    \"zone3rBtn\",\n    \"modulePositionsMenuBtn\",\n    \"modulePositionNBtn\",\n    \"modulePositionEXPBtn\",\n    \"modulePositionEDGBtn\",\n    \"modulePositionEDGNBtn\",\n    \"modulePositionEDGSBtn\",\n    \"paintContourMenuContainer\",\n    \"paintContourBtn\",\n    \"paintContourMenuBtn\",\n    \"paintContourWestBtn\",\n    \"paintContourEastBtn\",\n    \"paintContourSouthBtn\",\n    \"panMapBtn\",\n    \"editorModeSelectGroupContainer\",\n    \"undoBtn\",\n    \"redoBtn\",\n  ];\n\n  static values = {\n    usingHiddenEndClamp: Boolean,\n    contourEastWestAvailable: Boolean,\n  };\n\n  connect() {\n    super.connect();\n\n    this.focusedRoofPlaneUuid = this.element.dataset.focusedRoofPlaneUuid;\n    this.focusedRoofPlane = this.project.getRoofPlane(this.focusedRoofPlaneUuid);\n    this.pageRoofPlanes = [this.focusedRoofPlane];\n\n    this.renderSegmentsWithZones = true;\n\n    this.setupToolbars();\n    this.mapSpecificConnect();\n    this.setupMapInteractionManagers();\n    this.initializeEditorMode();\n    this.populateStatusbar();\n\n    setTimeout(() => {\n      this.alignViewToFeature(this.mapModelSynchronizer.getFeatureForRoofPlane(this.focusedRoofPlane));\n      this.mapManager.rotateTo(this.focusedRoofPlane.eaveRotationAngleRadians);\n    }, 200);\n\n    setTimeout(() => {\n      this.addSnapshotToUndoQueue(false);\n    }, 1000);\n\n    document.addEventListener(\"keydown\", this.handleKeydown);\n  }\n\n  disconnect() {\n    super.disconnect();\n\n    document.removeEventListener(\"keydown\", this.handleKeydown);\n  }\n\n  handleKeydown = (event) => {\n    if (event.key === \"Escape\") {\n      this.measureInteractionManager.finish();\n    }\n  };\n\n  get contourIsAvailable() {\n    return this.hasPaintContourMenuBtnTarget;\n  }\n\n  setupToolbars() {\n    this.btnGroups = {\n      paintZones: [this.zonesMenuBtnTarget],\n      paintModulePositions: [],\n    };\n\n    if (this.contourIsAvailable) {\n      this.btnGroups.paintContour = [this.paintContourMenuBtnTarget, this.paintContourSouthBtnTarget];\n\n      if (this.contourEastWestAvailableValue) {\n        if (this.usingHiddenEndClampValue) {\n          this.btnGroups.paintContour.push(this.paintContourWestBtnTarget);\n          this.btnGroups.paintContour.push(this.paintContourEastBtnTarget);\n        } else {\n          toolbarBtn.disable(this.paintContourWestBtnTarget);\n          toolbarBtn.disable(this.paintContourEastBtnTarget);\n        }\n      }\n      // Give the enable/disable process some time to finish\n      setTimeout(() => {\n        const contourBtns = [this.paintContourSouthBtnTarget];\n        if (this.contourEastWestAvailableValue) {\n          contourBtns.push(this.paintContourWestBtnTarget, this.paintContourEastBtnTarget);\n        }\n        contourBtns.forEach((btn) => this.#changeTooltipOfContourOptionBtn(btn));\n      }, 200);\n    }\n\n    let zones;\n\n    if (this.project.is722) {\n      zones = ZONES_710;\n      this.paintModulePositions();\n    } else if (this.project.is716) {\n      zones = this.project.detail.roofShape === ROOF_SHAPE_GABLE ? ZONES_716_GABLE : ZONES_716_HIP;\n      this.paintModulePositions();\n    } else {\n      zones = ZONES_710;\n    }\n\n    zones.forEach((zone) => {\n      this.btnGroups.paintZones.push(this[`zone${zone}BtnTarget`]);\n    });\n\n    this.focusedRoofPlaneUuid = this.element.dataset.focusedRoofPlaneUuid;\n    this.focusedRoofPlane = this.project.getRoofPlane(this.focusedRoofPlaneUuid);\n    this.slopeAdjustedMeasures = true;\n\n    this.editorMode = toolbarSelectGroup.getState(\"prPanelPropertiesEditorMode\", EDITOR_MODE_PAINT_ZONES);\n\n    if (this.focusedRoofPlane.useCritterGuard && this.editorMode === EDITOR_MODE_PAINT_CONTOUR) {\n      this.editorMode = EDITOR_MODE_PAINT_ZONES;\n      setTimeout(() => {\n        this.editorModeSelectGroupContainerTarget.selectGroupController.selectOption(\"paintZones\");\n      }, 200);\n    }\n\n    if (!this.project.is716Or722 && this.paintModulePositionsSelection === EDITOR_MODE_PAINT_MODULE_POSITIONS) {\n      this.editorMode = EDITOR_MODE_PAINT_ZONES;\n    }\n\n    const zonesSelectionKey = this.project.is716 ? \"prPaintZones716Selection\" : \"prPaintZones710Selection\";\n    this.paintZonesSelection = toolbarSelectGroup.getState(zonesSelectionKey, ZONE_1);\n    if (this.project.is716Or722) {\n      this.paintModulePositionsSelection = toolbarSelectGroup.getState(\n        \"prPaintModulePositionsSelection\",\n        MODULE_POSITION_N,\n      );\n    }\n  }\n\n  paintModulePositions() {\n    this.btnGroups.paintModulePositions.push(this.modulePositionsMenuBtnTarget);\n    this.btnGroups.paintModulePositions.push(this.modulePositionNBtnTarget);\n    this.btnGroups.paintModulePositions.push(this.modulePositionEXPBtnTarget);\n    this.btnGroups.paintModulePositions.push(this.modulePositionEDGBtnTarget);\n    this.btnGroups.paintModulePositions.push(this.modulePositionEDGNBtnTarget);\n    this.btnGroups.paintModulePositions.push(this.modulePositionEDGSBtnTarget);\n  }\n\n  setupMapInteractionManagers() {\n    this.selectInteractionManager = new SelectInteractionManager(this);\n    this.snapInteractionManager = new SnapInteractionManager(this);\n    this.snapInteractionManager.add();\n    this.shapeGuideLinesInteractionManager = new ShapeGuideLinesInteractionManager(this);\n    this.measureInteractionManager = new MeasureInteractionManager(this);\n    this.translateInteractionManager = new TranslateInteractionManager(this);\n    this.modifyInteractionManager = new ModifyInteractionManager(this);\n  }\n\n  initializeEditorMode() {\n    switch (this.editorMode) {\n      case EDITOR_MODE_PAINT_ZONES:\n        this.startPaintZonesMode();\n        break;\n      case EDITOR_MODE_PAINT_MODULE_POSITIONS:\n        if (this.project.is716Or722) {\n          this.startPaintModulePositionsMode();\n        } else {\n          this.startPaintZonesMode();\n        }\n        break;\n      case EDITOR_MODE_PAINT_CONTOUR:\n        if (this.contourIsAvailable) {\n          this.startPaintContourMode();\n        } else {\n          this.startPaintZonesMode();\n        }\n        break;\n      case EDITOR_MODE_MEASURE:\n        this.startMeasureMode();\n        break;\n      case EDITOR_MODE_PAN_MAP:\n        this.startPanMapMode();\n        break;\n      case EDITOR_MODE_SELECT:\n        this.startSelectMode();\n        break;\n      default:\n        this.startPaintZonesMode();\n    }\n  }\n\n  startPaintZonesMode(event) {\n    if (event && event.currentTarget && toolbarBtn.isDisabled(event.currentTarget)) return;\n\n    this.measureInteractionManager.remove();\n    this.selectInteractionManager.remove(); // First remove it to clear out\n    this.selectInteractionManager.add(PANEL_DATA_TYPE);\n    this.modifyInteractionManager.remove();\n    this.translateInteractionManager.remove();\n    this.editorMode = EDITOR_MODE_PAINT_ZONES;\n    this.setEnabledForBtnGroup(\"paintZones\", true);\n    if (this.contourIsAvailable) this.setEnabledForBtnGroup(\"paintContour\", false);\n    if (this.project.is716Or722) {\n      this.setEnabledForBtnGroup(\"paintModulePositions\", false);\n    }\n\n    toolbarBtn.showEnabledAndHideDisabledPinnedFlyoutMenus();\n  }\n\n  startPaintModulePositionsMode(event) {\n    if (event && event.currentTarget && toolbarBtn.isDisabled(event.currentTarget)) return;\n\n    this.measureInteractionManager.remove();\n    this.selectInteractionManager.remove(); // First remove it to clear out\n    this.selectInteractionManager.add(PANEL_DATA_TYPE);\n    this.modifyInteractionManager.remove();\n    this.translateInteractionManager.remove();\n    this.editorMode = EDITOR_MODE_PAINT_MODULE_POSITIONS;\n    if (this.project.is716Or722) {\n      this.setEnabledForBtnGroup(\"paintModulePositions\", true);\n    }\n    this.setEnabledForBtnGroup(\"paintZones\", false);\n    if (this.contourIsAvailable) this.setEnabledForBtnGroup(\"paintContour\", false);\n\n    toolbarBtn.showEnabledAndHideDisabledPinnedFlyoutMenus();\n  }\n\n  get isEditorModePaintZones() {\n    return this.editorMode === EDITOR_MODE_PAINT_ZONES;\n  }\n\n  get isEditorModePaintContour() {\n    return this.editorMode === EDITOR_MODE_PAINT_CONTOUR;\n  }\n\n  startPaintContourMode(event) {\n    if (event && event.currentTarget && toolbarBtn.isDisabled(event.currentTarget)) return;\n\n    this.measureInteractionManager.remove();\n    this.selectInteractionManager.remove(); // First remove it to clear out\n    this.selectInteractionManager.add(PANEL_DATA_TYPE);\n    this.modifyInteractionManager.remove();\n    this.translateInteractionManager.remove();\n    this.editorMode = EDITOR_MODE_PAINT_CONTOUR;\n    this.setEnabledForBtnGroup(\"paintZones\", false);\n    if (this.project.is716Or722) {\n      this.setEnabledForBtnGroup(\"paintModulePositions\", false);\n    }\n    this.setEnabledForBtnGroup(\"paintContour\", true);\n\n    toolbarBtn.showEnabledAndHideDisabledPinnedFlyoutMenus();\n  }\n\n  startPanMapMode(_event) {\n    this.measureInteractionManager.remove();\n    this.selectInteractionManager.clearDragBoxInteraction();\n    this.modifyInteractionManager.remove();\n    this.translateInteractionManager.remove();\n    this.editorMode = EDITOR_MODE_PAN_MAP;\n    this.setEnabledForBtnGroup(\"paintZones\", false);\n    if (this.project.is716Or722) {\n      this.setEnabledForBtnGroup(\"paintModulePositions\", false);\n    }\n\n    toolbarBtn.showEnabledAndHideDisabledPinnedFlyoutMenus();\n  }\n\n  startMeasureMode(_event) {\n    this.selectInteractionManager.remove();\n    this.measureInteractionManager.add();\n    this.modifyInteractionManager.remove();\n    this.translateInteractionManager.remove();\n    if (this.project.is716Or722) {\n      this.setEnabledForBtnGroup(\"paintModulePositions\", false);\n    }\n    this.setEnabledForBtnGroup(\"paintZones\", false);\n\n    toolbarBtn.showEnabledAndHideDisabledPinnedFlyoutMenus();\n  }\n\n  startSelectMode(_event) {\n    this.selectInteractionManager.remove(); // First remove it to clear out\n    this.selectInteractionManager.add(MEASURE_DATA_TYPE);\n    this.measureInteractionManager.remove();\n    this.modifyInteractionManager.remove();\n    this.translateInteractionManager.remove();\n    this.editorMode = EDITOR_MODE_SELECT;\n    if (this.project.is716Or722) {\n      this.setEnabledForBtnGroup(\"paintModulePositions\", false);\n    }\n    this.setEnabledForBtnGroup(\"paintZones\", false);\n\n    toolbarBtn.showEnabledAndHideDisabledPinnedFlyoutMenus();\n  }\n\n  mapSpecificConnect() {\n    this.mapModelSynchronizer = new MapModelSynchronizer(this);\n    this.mapManager = new MapManager(this);\n    this.mapManager.add();\n  }\n\n  populateStatusbar() {\n    // When a value like rotation updates, we need to wait for OL to finish doing its thing\n    setTimeout(() => {\n      this.statusItemZoomTarget.innerText = this.mapManager.zoom.toFixed(3);\n      this.statusItemRotationTarget.innerText = `${radiansToDegrees(this.mapManager.rotation).toFixed(1)}\u00B0`;\n      this.statusItemPanelsCountTarget.innerText = `${this.focusedRoofPlane.panelsCount}/${this.project.panelsCount}`;\n    }, 500);\n  }\n\n  // Called by both Stimulus event handler and saveAndThenRedirect triggered by auto save controller\n  save(event, onSuccess) {\n    if (toolbarBtn.isDisabled(event.currentTarget)) return;\n\n    this.selectInteractionManager.deselectSelected();\n    toolbarBtn.showSpinner(this.saveBtnTarget);\n\n    const contourCodesClearer = new SegmentsContourCodesClearer({ controller: this });\n    contourCodesClearer.clear();\n\n    const currentPageCallback = (json) => {\n      if (onSuccess) onSuccess();\n      if (this.undoQueue) {\n        this.clearUndoQueue();\n        this.addSnapshotToUndoQueue(false);\n      }\n\n      applyDomUpdatesFromResponse(json);\n      this.markClean();\n\n      this.focusedRoofPlane.roofSections.forEach((roofSection) => {\n        roofSection.segments.forEach((segment) => {\n          reRenderSegment(this, segment);\n        });\n      });\n\n      setTimeout(() => {\n        toolbarBtn.hideSpinner(this.saveBtnTarget);\n      }, 500);\n    };\n\n    this.project.save({\n      path: this.savePath,\n      onSuccess: currentPageCallback,\n      onValidationError: this.onValidationError,\n      onServerError: this.onServerError,\n      includeProjectSite: false,\n      includeZonesAndModulePositions: true,\n      includeUploadedBuildingImages: false,\n    });\n  }\n\n  setZone1(event) {\n    this.setZone(event, ZONE_1);\n  }\n\n  setZone2(event) {\n    this.setZone(event, ZONE_2);\n  }\n\n  setZone2e(event) {\n    this.setZone(event, ZONE_2E);\n  }\n\n  setZone2n(event) {\n    this.setZone(event, ZONE_2N);\n  }\n\n  setZone2r(event) {\n    this.setZone(event, ZONE_2R);\n  }\n\n  setZone3(event) {\n    this.setZone(event, ZONE_3);\n  }\n\n  setZone3e(event) {\n    this.setZone(event, ZONE_3E);\n  }\n\n  setZone3r(event) {\n    this.setZone(event, ZONE_3R);\n  }\n\n  setZone(event, value) {\n    if (toolbarBtn.isDisabled(event.currentTarget)) return;\n\n    this.paintZonesSelection = value;\n    if (event.shiftKey) this.selectInteractionManager.setZone(value);\n    if (this.focusedRoofPlane.needsSave) this.markDirty();\n  }\n\n  setModulePositionN(event) {\n    this.setModulePosition(event, MODULE_POSITION_N);\n  }\n\n  setModulePositionEXP(event) {\n    this.setModulePosition(event, MODULE_POSITION_EXP);\n  }\n\n  setModulePositionEDG(event) {\n    this.setModulePosition(event, MODULE_POSITION_EDG);\n  }\n\n  setModulePositionEDGN(event) {\n    this.setModulePosition(event, MODULE_POSITION_EDGN);\n  }\n\n  setModulePositionEDGS(event) {\n    this.setModulePosition(event, MODULE_POSITION_EDGS);\n  }\n\n  get contourPaintDirections() {\n    return this.paintContourMenuContainerTarget.multiSelectGroupController.selectedOptions;\n  }\n\n  setModulePosition(event, value) {\n    if (toolbarBtn.isDisabled(event.currentTarget)) return;\n\n    this.paintModulePositionsSelection = value;\n    if (event.shiftKey) this.selectInteractionManager.setModulePosition(value);\n    if (this.focusedRoofPlane.needsSave) this.markDirty();\n  }\n\n  paintContourSouthClicked(_event) {\n    this.#changeTooltipOfContourOptionBtn(this.paintContourSouthBtnTarget);\n  }\n\n  paintContourEastClicked(_event) {\n    this.#changeTooltipOfContourOptionBtn(this.paintContourEastBtnTarget);\n  }\n\n  paintContourWestClicked(_event) {\n    this.#changeTooltipOfContourOptionBtn(this.paintContourWestBtnTarget);\n  }\n\n  #changeTooltipOfContourOptionBtn(btn) {\n    const currentValue = btn.dataset[\"components-IrTooltipContentValue\"];\n\n    let newTooltip;\n    if (toolbarBtn.isActive(btn)) {\n      newTooltip = currentValue.replace(\"Remove\", \"Add\");\n    } else {\n      newTooltip = currentValue.replace(\"Add\", \"Remove\");\n    }\n\n    // The setContent method updates the display content in real time, but\n    // we still need to set the data attribute for the value to persist after\n    // the tooltip hides.\n    btn._tippy.setContent(newTooltip);\n    btn.dataset[\"components-IrTooltipContentValue\"] = newTooltip;\n  }\n}\n", "import Base from \"../../../../da/map/interaction-managers/draw/base\";\nimport { ROOF_PLANE_DATA_TYPE } from \"../../../../da/map/data-types\";\nimport { createRoofPlane } from \"../../modification-helpers/roof-plane\";\nimport { updateProjectOriginAndCartesianCoordinatesForChildren } from \"../../modification-helpers/project\";\n\nexport default class RoofPlanes extends Base {\n  get targetDrawingSource() {\n    return this.mapManager.roofPlanesVectorSource;\n  }\n\n  get featureDataType() {\n    return ROOF_PLANE_DATA_TYPE;\n  }\n\n  createModelFromFeature(feature) {\n    createRoofPlane(feature, this.controller.project, this.mapModelSynchronizer, this.mapManager);\n  }\n\n  add() {\n    super.add();\n    this.currentDrawInteraction.on(\"drawend\", this.updateProjectOriginAndCartesianCoordinates);\n  }\n\n  updateProjectOriginAndCartesianCoordinates = (_event) => {\n    updateProjectOriginAndCartesianCoordinatesForChildren(this.controller.project);\n  };\n\n  clearCurrentInteraction() {\n    super.clearCurrentInteraction();\n    if (this.currentDrawInteraction) {\n      this.currentDrawInteraction.un(\"drawend\", this.updateProjectOriginAndCartesianCoordinates);\n    }\n  }\n\n  featureSpecificDrawEndProcessing(_event) {\n    this.controller.shapeGuideLinesInteractionManager.remove();\n  }\n}\n", "import ShapeBase from \"../../../../da/map/interaction-managers/draw/shape-base\";\nimport { ROOF_PLANE_DATA_TYPE } from \"../../../../da/map/data-types\";\nimport { createRoofPlane } from \"../../modification-helpers/roof-plane\";\nimport { updateProjectOriginAndCartesianCoordinatesForChildren } from \"../../modification-helpers/project\";\n\nexport default class RoofPlaneShapes extends ShapeBase {\n  get targetDrawingSource() {\n    return this.mapManager.roofPlanesVectorSource;\n  }\n\n  get featureDataType() {\n    return ROOF_PLANE_DATA_TYPE;\n  }\n\n  get dialogHeader() {\n    return \"Shape Roof Planes\";\n  }\n\n  createModelFromFeature(feature) {\n    createRoofPlane(feature, this.controller.project, this.mapModelSynchronizer, this.mapManager);\n  }\n\n  add() {\n    super.add();\n    this.currentDrawInteraction.on(\"drawend\", this.#updateProjectOrigin);\n  }\n\n  clearCurrentInteraction() {\n    if (this.currentDrawInteraction) {\n      this.currentDrawInteraction.un(\"drawend\", this.#updateProjectOrigin);\n    }\n    super.clearCurrentInteraction();\n  }\n\n  postBatchCreate(_features) {\n    updateProjectOriginAndCartesianCoordinatesForChildren(this.controller.project);\n  }\n\n  featureSpecificDrawEndProcessing(_event) {\n    this.controller.shapeGuideLinesInteractionManager.remove();\n  }\n\n  #updateProjectOrigin = (_event) => {\n    updateProjectOriginAndCartesianCoordinatesForChildren(this.controller.project);\n  };\n}\n", "import { BUILDING_IMAGE_PLACEMENT_DATA_TYPE, ROOF_PLANE_DATA_TYPE } from \"../../../../da/map/data-types\";\nimport DaRoofPlanes from \"../../../../da/map/interaction-managers/select/roof-planes\";\nimport { modifyRoofPlane, deleteRoofPlane } from \"../../modification-helpers/roof-plane\";\nimport { updateProjectOriginAndCartesianCoordinatesForChildren } from \"../../modification-helpers/project\";\nimport { isPoint, isPolygon } from \"../../../../da/map/ol-helpers\";\nimport { OBSTRUCTION_EDIT_MODE_TRANSFORM } from \"../../../../da/layout-editor/helpers/toolbar-constants\";\n\nexport default class RoofPlanes extends DaRoofPlanes {\n  constructor(controller) {\n    super(controller);\n\n    this.modifyRoofPlane = modifyRoofPlane;\n    this.deleteRoofPlane = deleteRoofPlane;\n  }\n\n  selectClickResetInteractionManagers() {\n    if (this.controller.roofPlaneEditMode === OBSTRUCTION_EDIT_MODE_TRANSFORM) return;\n    super.selectClickResetInteractionManagers();\n  }\n\n  filterSelects = (feature, _layer) => {\n    const dataType = feature.get(\"dataType\");\n\n    // If it's a point, this is a vertex selection and we're good\n    if (isPoint(feature)) return true;\n\n    // If it's a polygon without a data type, this is probably a building image\n    // transform selection polygon and we don't want to select it.  The transform\n    // interaction manager will handle that.\n    if (!dataType && isPolygon(feature)) return false;\n\n    // Building image selection is handled by the building image interaction manager\n    if (dataType === BUILDING_IMAGE_PLACEMENT_DATA_TYPE) return false;\n\n    if (dataType !== ROOF_PLANE_DATA_TYPE) return true;\n\n    const roofPlane = this.controller.mapModelSynchronizer.getRoofPlaneForFeature(\n      feature,\n      \"PrRoofPlanesSelectInteractionManager#filterSelects\",\n    );\n    return !roofPlane.modifyingTraceLocked;\n  };\n\n  removeSelectedFeatures(event) {\n    const selectedFeaturesExist = this.currentSelectInteraction && this.selectedFeatures.length !== 0;\n\n    super.removeSelectedFeatures(event);\n\n    if (selectedFeaturesExist) {\n      updateProjectOriginAndCartesianCoordinatesForChildren(this.controller.project);\n    }\n  }\n}\n", "import Base from \"../../../../da/map/interaction-managers/snap/base\";\n\nexport default class RoofPlanes extends Base {\n  get snapSources() {\n    return [this.mapManager.roofPlanesVectorSource];\n  }\n}\n", "import DaBase from \"../../../../da/map/interaction-managers/translate/base\";\nimport { repositionRoofPlane } from \"../../modification-helpers/roof-plane\";\nimport { updateProjectOriginAndCartesianCoordinatesForChildren } from \"../../modification-helpers/project\";\n\nexport default class RoofPlanes extends DaBase {\n  translateEndForFeature(rpFeature) {\n    repositionRoofPlane(rpFeature, this.mapModelSynchronizer, this.mapManager);\n    updateProjectOriginAndCartesianCoordinatesForChildren(this.controller.project);\n  }\n}\n", "import DaBase from \"../../../../da/map/interaction-managers/modify/base\";\nimport { modifyRoofPlane } from \"../../modification-helpers/roof-plane\";\nimport { updateProjectOriginAndCartesianCoordinatesForChildren } from \"../../modification-helpers/project\";\n\nexport default class RoofPlanes extends DaBase {\n  modifyEndForFeature(rpFeature) {\n    modifyRoofPlane(rpFeature, this.mapModelSynchronizer, this.mapManager);\n    const roofPlane = this.mapModelSynchronizer.getRoofPlaneForFeature(\n      rpFeature,\n      \"PrRoofPlaneModifyInteractionManager#modifyEndForFeature\",\n    );\n    roofPlane.clearSetbackGuides();\n    updateProjectOriginAndCartesianCoordinatesForChildren(this.controller.project);\n  }\n}\n", "import Transform from \"ol-ext/interaction/Transform\";\nimport { Collection } from \"ol\";\nimport { ensureFeatureIsClockwise } from \"../../../../da/map/ol-helpers\";\nimport { modifyRoofPlane } from \"../../modification-helpers/roof-plane\";\nimport { updateProjectOriginAndCartesianCoordinatesForChildren } from \"../../modification-helpers/project\";\n\nexport default class RoofPlanesTransformInteractionManager {\n  constructor(controller) {\n    this.controller = controller;\n    this.mapModelSynchronizer = controller.mapModelSynchronizer;\n    this.mapManager = controller.mapManager;\n    this.map = this.mapManager.map;\n\n    this.transform = null;\n    this.added = false;\n    this.startGeometry = null;\n  }\n\n  add() {\n    this.clearCurrentInteraction();\n\n    const features = this.#roofPlaneFeatures;\n    if (features.getLength() === 0) return;\n\n    this.transform = new Transform({\n      features,\n      keepAspectRatio: (e) => e.originalEvent?.shiftKey ?? false,\n      stretch: true,\n      rotate: true,\n      scale: true,\n      translate: true,\n      noFlip: true,\n      enableRotatedTransform: true,\n      keepRectangle: true,\n    });\n\n    this.transform.on([\"rotatestart\", \"scalestart\", \"translatestart\"], this.transformStartHandler);\n    this.transform.on([\"rotateend\", \"scaleend\", \"translateend\"], this.transformEndHandler);\n\n    this.map.addInteraction(this.transform);\n    this.added = true;\n  }\n\n  remove() {\n    this.clearCurrentInteraction();\n  }\n\n  refresh() {\n    this.add();\n  }\n\n  selectFeature(feature) {\n    if (!this.transform || !feature) return;\n    this.transform.select(feature, true);\n  }\n\n  get selectedFeature() {\n    if (!this.transform) return null;\n    const selected = this.transform.selection_?.getArray();\n    return selected?.length > 0 ? selected[0] : null;\n  }\n\n  transformStartHandler = (e) => {\n    this.startGeometry = e.feature.getGeometry().clone();\n\n    this.#fixKeepRectangleCornerScaling(e);\n  };\n\n  transformEndHandler = (e) => {\n    if (this.#geometryHasNaNCoordinates(e.feature)) {\n      e.feature.setGeometry(this.startGeometry);\n      return;\n    }\n\n    ensureFeatureIsClockwise(e.feature);\n    modifyRoofPlane(e.feature, this.mapModelSynchronizer, this.mapManager);\n    updateProjectOriginAndCartesianCoordinatesForChildren(this.controller.project);\n    this.controller.markDirty();\n  };\n\n  clearCurrentInteraction() {\n    if (!this.added || !this.transform) return;\n\n    this.transform.un([\"rotatestart\", \"scalestart\", \"translatestart\"], this.transformStartHandler);\n    this.transform.un([\"rotateend\", \"scaleend\", \"translateend\"], this.transformEndHandler);\n\n    this.map.removeInteraction(this.transform);\n    this.transform = null;\n    this.added = false;\n  }\n\n  get #roofPlaneFeatures() {\n    const features = this.mapManager.roofPlanesVectorSource.getFeatures().filter((feature) => {\n      const roofPlane = this.mapModelSynchronizer.getRoofPlaneForFeature(\n        feature,\n        \"PrRoofPlanesTransformInteractionManager\",\n      );\n      return roofPlane && !roofPlane.modifyingTraceLocked;\n    });\n    return new Collection(features);\n  }\n\n  // ol-ext keepRectangle corner scaling bug workaround \u2014 see\n  // bx/map/interaction-managers/transform/obstructions.js\n  #fixKeepRectangleCornerScaling(e) {\n    if (e.type !== \"scalestart\" || !this.transform) return;\n\n    const viewRotation = this.map.getView().getRotation();\n    if (viewRotation === 0) return;\n\n    const coords = e.feature.getGeometry().getCoordinates()[0];\n    const isRectangle = coords.length === 5;\n    const isCornerHandle = !this.transform.constraint_;\n    if (isRectangle && isCornerHandle) {\n      this.transform.center_ = this.map.getView().getCenter();\n    }\n  }\n\n  #geometryHasNaNCoordinates(feature) {\n    const coords = feature.getGeometry().getCoordinates()[0];\n    return coords.some((c) => !Number.isFinite(c[0]) || !Number.isFinite(c[1]));\n  }\n}\n", "import BaseMapManager from \"./base\";\n\nexport default class RoofPlanesMapManager extends BaseMapManager {\n  add() {\n    this.buildRoofPlanesVectorSource();\n    this.buildMeasuresVectorSource();\n    this.buildShapeGuideLinesVectorSource();\n\n    this.map = this.buildMap({\n      layers: [\n        this.tileLayer,\n        this.visualMarkersVectorLayer,\n        this.roofPlanesVectorLayer,\n        this.measuresVectorLayer,\n        this.shapeGuideLinesVectorLayer,\n      ],\n    });\n\n    this.addBuildingImagePlacementLayers();\n\n    this.map.on(\"moveend\", this.onMoveEnd);\n  }\n}\n", "import { Feature } from \"ol\";\nimport { fromLonLat } from \"ol/proj\";\n\nimport DrawInteractionManager from \"../../../../pr/map/interaction-managers/draw/roof-planes\";\nimport ShapeDrawInteractionManager from \"../../../../pr/map/interaction-managers/draw/roof-plane-shapes\";\nimport { SHAPE_TYPE_RECTANGLE } from \"../../../../da/map/interaction-managers/draw/shape-base\";\nimport SelectInteractionManager from \"../../../../pr/map/interaction-managers/select/roof-planes\";\nimport SnapInteractionManager from \"../../../../pr/map/interaction-managers/snap/roof-planes\";\nimport TranslateInteractionManager from \"../../../../pr/map/interaction-managers/translate/roof-planes\";\nimport ModifyInteractionManager from \"../../../../pr/map/interaction-managers/modify/roof-planes\";\nimport TransformInteractionManager from \"../../../../pr/map/interaction-managers/transform/roof-planes\";\nimport MeasureInteractionManager from \"../../../../da/map/interaction-managers/measure/base\";\nimport ShapeGuideLinesInteractionManager from \"../../../../da/map/interaction-managers/shape-guide-lines/base\";\n\nimport MapBaseController from \"./map_base_controller\";\n\nimport BaseMapModelSynchronizer from \"../../../../pr/map/map-model-synchronizers/base\";\nimport RoofPlanesMapManager from \"../../../../pr/map/map-managers/roof-planes\";\n\nimport {\n  EDITOR_MODE_DRAW,\n  EDITOR_MODE_SELECT,\n  EDITOR_MODE_MEASURE,\n  EDITOR_MODE_SHAPES,\n  OBSTRUCTION_EDIT_MODE_VERTICES,\n  OBSTRUCTION_EDIT_MODE_TRANSFORM,\n} from \"../../../../da/layout-editor/helpers/toolbar-constants\";\nimport * as toolbarSelectGroup from \"../../../../da/layout-editor/helpers/toolbar-select-group\";\nimport * as toolbarBtn from \"../../../../da/layout-editor/helpers/toolbar-btns\";\nimport { distanceForPixels } from \"../../../../da/map/ol-helpers\";\nimport { ROOF_PLANE_DATA_TYPE } from \"../../../../da/map/data-types\";\nimport { createRoofPlane, deleteRoofPlane } from \"../../../../pr/map/modification-helpers/roof-plane\";\nimport { updateProjectOriginAndCartesianCoordinatesForChildren } from \"../../../../pr/map/modification-helpers/project\";\nimport { removeMatchingKeys } from \"../../../../helpers/local-store\";\n\nexport default class MapRoofPlanesController extends MapBaseController {\n  static targets = [\n    \"map\",\n    \"compass\",\n    \"saveBtn\",\n    \"statusItemZoom\",\n    \"statusItemRotation\",\n    \"editorModeMenu\",\n    \"selectSubMenuBtn\",\n    \"editVerticesBtn\",\n    \"transformShapeBtn\",\n  ];\n\n  connect() {\n    super.connect();\n    this.roofPlaneClipboard = [];\n\n    if (this.project.roofPlanes.length === 0) {\n      removeMatchingKeys((k) => k.match(/^le--selectGroup--pr.*/));\n    }\n\n    this.mapModelSynchronizer = new BaseMapModelSynchronizer(this);\n\n    this.mapManager = new RoofPlanesMapManager(this);\n    this.mapManager.add();\n\n    if (this.project.detail.originLatLng === null) {\n      const { editorLat: lat, editorLng: lng } = this.project.projectSite;\n      this.project.detail.setOriginLatLng({ lat, lng });\n    }\n\n    this.setupMapInteractionManagers();\n\n    this.editorMode = toolbarSelectGroup.getState(\"prRoofPlanesEditorMode\", EDITOR_MODE_DRAW);\n    this.initializeEditorMode();\n\n    this.populateStatusbar();\n\n    this.showProjectSiteLocation();\n\n    document.addEventListener(\"keydown\", this.handleKeydown);\n  }\n\n  disconnect() {\n    super.disconnect();\n\n    document.removeEventListener(\"keydown\", this.handleKeydown);\n\n    this.drawInteractionManager.remove();\n    this.shapeDrawInteractionManager.hideDimensionMenu();\n    this.shapeDrawInteractionManager.remove();\n    this.transformInteractionManager.remove();\n  }\n\n  setupMapInteractionManagers() {\n    this.drawInteractionManager = new DrawInteractionManager(this);\n    this.shapeDrawInteractionManager = new ShapeDrawInteractionManager(this);\n    this.selectInteractionManager = new SelectInteractionManager(this);\n    this.snapInteractionManager = new SnapInteractionManager(this);\n    this.snapInteractionManager.add();\n    this.translateInteractionManager = new TranslateInteractionManager(this);\n    this.modifyInteractionManager = new ModifyInteractionManager(this);\n    this.measureInteractionManager = new MeasureInteractionManager(this);\n    this.shapeGuideLinesInteractionManager = new ShapeGuideLinesInteractionManager(this);\n\n    this.transformInteractionManager = new TransformInteractionManager(this);\n    this.roofPlaneEditMode = this.#savedRoofPlaneEditMode;\n\n    this.setupBuildingImagePlacementInteractionManagers();\n  }\n\n  initializeEditorMode() {\n    switch (this.editorMode) {\n      case EDITOR_MODE_DRAW:\n        this.startDrawMode();\n        break;\n      case EDITOR_MODE_SHAPES:\n        this.startShapeDrawMode();\n        break;\n      case EDITOR_MODE_MEASURE:\n        this.startMeasureMode();\n        break;\n      case EDITOR_MODE_SELECT:\n        this.startSelectMode();\n        break;\n      default:\n        this.startDrawMode();\n    }\n  }\n\n  handleKeydown = (event) => {\n    if (event.key === \"Backspace\") {\n      if (event.target.tagName !== \"INPUT\") {\n        event.preventDefault();\n        this.removeSelectedFeatures(event);\n      }\n    } else if (event.key === \"Escape\") {\n      this.drawInteractionManager.finish();\n      this.shapeDrawInteractionManager.finish();\n      this.measureInteractionManager.finish();\n    } else if (event.key === \"c\" && (event.ctrlKey || event.metaKey)) {\n      if (this.#shouldInterceptCopy()) {\n        event.preventDefault();\n        this.#copySelectedRoofPlanes();\n      }\n    } else if (event.key === \"v\" && (event.ctrlKey || event.metaKey)) {\n      if (this.#shouldInterceptPaste()) {\n        event.preventDefault();\n        this.#pasteRoofPlanes();\n      }\n    }\n  };\n\n  setRoofPlaneEditMode(event) {\n    const mode = event?.currentTarget?.dataset?.option;\n    if (!mode || mode === this.roofPlaneEditMode) return;\n\n    this.roofPlaneEditMode = mode;\n    this.#applyRoofPlaneEditMode();\n  }\n\n  removeSelectedFeatures(event) {\n    if (this.roofPlaneEditMode === OBSTRUCTION_EDIT_MODE_TRANSFORM) {\n      const feature = this.transformInteractionManager.selectedFeature;\n      if (feature) {\n        deleteRoofPlane(feature, this.project, this.mapModelSynchronizer, this.mapManager);\n        updateProjectOriginAndCartesianCoordinatesForChildren(this.project);\n        this.transformInteractionManager.refresh();\n      }\n      this.removeSelectedBuildingImagePlacements();\n      this.markDirty();\n      return;\n    }\n    super.removeSelectedFeatures(event);\n  }\n\n  startShapeDrawMode(_event) {\n    this.editorMode = EDITOR_MODE_SHAPES;\n\n    this.drawInteractionManager.remove();\n    this.selectInteractionManager.remove();\n    this.modifyInteractionManager.remove();\n    this.translateInteractionManager.remove();\n    this.measureInteractionManager.remove();\n    this.transformInteractionManager.remove();\n    this.removeBuildingImagePlacementTransformInteractions();\n\n    this.shapeDrawInteractionManager.remove();\n    this.shapeDrawInteractionManager.shapeType = SHAPE_TYPE_RECTANGLE;\n    this.shapeDrawInteractionManager.add();\n    this.shapeDrawInteractionManager.showDimensionMenu();\n    this.#disableSelectSubMenu();\n    toolbarBtn.showEnabledAndHideDisabledPinnedFlyoutMenus();\n  }\n\n  startDrawMode(_event) {\n    this.shapeDrawInteractionManager.hideDimensionMenu();\n    this.shapeDrawInteractionManager.remove();\n    this.transformInteractionManager.remove();\n    this.#disableSelectSubMenu();\n    this.drawInteractionManager.add();\n    this.selectInteractionManager.remove();\n    this.modifyInteractionManager.remove();\n    this.translateInteractionManager.remove();\n    this.measureInteractionManager.remove();\n    this.removeBuildingImagePlacementTransformInteractions();\n    toolbarBtn.showEnabledAndHideDisabledPinnedFlyoutMenus();\n  }\n\n  startSelectMode(_event) {\n    this.shapeDrawInteractionManager.hideDimensionMenu();\n    this.shapeDrawInteractionManager.remove();\n    this.drawInteractionManager.remove();\n    this.selectInteractionManager.add();\n    this.modifyInteractionManager.remove();\n    this.translateInteractionManager.remove();\n    this.measureInteractionManager.remove();\n    this.addBuildingImagePlacementTransformInteractions();\n    this.#enableSelectSubMenu();\n    this.roofPlaneEditMode = this.#savedRoofPlaneEditMode;\n    this.#applyRoofPlaneEditMode();\n    toolbarBtn.showEnabledAndHideDisabledPinnedFlyoutMenus();\n  }\n\n  startMeasureMode(_event) {\n    this.shapeDrawInteractionManager.hideDimensionMenu();\n    this.shapeDrawInteractionManager.remove();\n    this.transformInteractionManager.remove();\n    this.#disableSelectSubMenu();\n    this.drawInteractionManager.remove();\n    this.selectInteractionManager.remove();\n    this.modifyInteractionManager.remove();\n    this.translateInteractionManager.remove();\n    this.measureInteractionManager.add();\n    this.removeBuildingImagePlacementTransformInteractions();\n    toolbarBtn.showEnabledAndHideDisabledPinnedFlyoutMenus();\n  }\n\n  showProjectSiteLocation() {\n    if (this.project.powerUser) {\n      const projectLocationAtLonLat = [this.project.projectSite.lng, this.project.projectSite.lat];\n      this.mapManager.addVisualMarker(fromLonLat(projectLocationAtLonLat));\n    }\n  }\n\n  #shouldInterceptCopy() {\n    if (this.#isEditingText) return false;\n    if (window.getSelection().toString().length > 0) return false;\n    return this.#selectedRoofPlaneFeatures.length > 0;\n  }\n\n  #shouldInterceptPaste() {\n    if (this.#isEditingText) return false;\n    if (this.roofPlaneClipboard.length === 0) return false;\n    return window.getSelection().toString().length === 0;\n  }\n\n  get #isEditingText() {\n    const activeElement = document.activeElement;\n    return activeElement && (activeElement.tagName === \"INPUT\" || activeElement.tagName === \"TEXTAREA\");\n  }\n\n  get #selectedRoofPlaneFeatures() {\n    if (this.roofPlaneEditMode === OBSTRUCTION_EDIT_MODE_TRANSFORM) {\n      const feature = this.transformInteractionManager.selectedFeature;\n      return feature && feature.get(\"dataType\") === ROOF_PLANE_DATA_TYPE ? [feature] : [];\n    }\n    return this.selectInteractionManager.selectedFeatures.filter(\n      (feature) => feature.get(\"dataType\") === ROOF_PLANE_DATA_TYPE,\n    );\n  }\n\n  #copySelectedRoofPlanes() {\n    if (this.#selectedRoofPlaneFeatures.length === 0) return;\n\n    this.roofPlaneClipboard = this.#selectedRoofPlaneFeatures.map((feature) => ({\n      geometry: feature.getGeometry().clone(),\n    }));\n  }\n\n  #pasteRoofPlanes() {\n    if (this.roofPlaneClipboard.length === 0) return;\n\n    const map = this.mapManager.map;\n    const offsetX = distanceForPixels(map, 30);\n    const offsetY = distanceForPixels(map, 18);\n\n    const newFeatures = [];\n\n    this.roofPlaneClipboard.forEach((clipboardData) => {\n      const geometry = clipboardData.geometry.clone();\n      const coordinates = geometry.getCoordinates()[0];\n      const offsetCoordinates = coordinates.map(([lon, lat]) => [lon + offsetX, lat - offsetY]);\n      geometry.setCoordinates([offsetCoordinates]);\n\n      const newFeature = new Feature({ geometry, dataType: ROOF_PLANE_DATA_TYPE });\n      this.mapManager.roofPlanesVectorSource.addFeature(newFeature);\n      createRoofPlane(newFeature, this.project, this.mapModelSynchronizer, this.mapManager);\n      newFeatures.push(newFeature);\n    });\n\n    updateProjectOriginAndCartesianCoordinatesForChildren(this.project);\n\n    if (this.roofPlaneEditMode === OBSTRUCTION_EDIT_MODE_TRANSFORM) {\n      this.transformInteractionManager.refresh();\n    } else {\n      this.selectInteractionManager.selectionCollection.clear();\n      newFeatures.forEach((feature) => {\n        this.selectInteractionManager.selectionCollection.push(feature);\n      });\n      this.translateInteractionManager.remove();\n      this.translateInteractionManager.add();\n    }\n\n    this.markDirty();\n  }\n\n  #applyRoofPlaneEditMode() {\n    if (this.roofPlaneEditMode === OBSTRUCTION_EDIT_MODE_TRANSFORM) {\n      const selectedFeatures = this.selectInteractionManager.selectedFeatures;\n      const firstFeature = selectedFeatures.length > 0 ? selectedFeatures[0] : null;\n\n      this.selectInteractionManager.remove();\n      this.modifyInteractionManager.remove();\n      this.translateInteractionManager.remove();\n      this.transformInteractionManager.refresh();\n      this.transformInteractionManager.selectFeature(firstFeature);\n    } else {\n      const selectedFeature = this.transformInteractionManager.selectedFeature;\n\n      this.transformInteractionManager.remove();\n      this.selectInteractionManager.add();\n      this.translateInteractionManager.add();\n      this.modifyInteractionManager.add();\n\n      if (selectedFeature) {\n        this.selectInteractionManager.addToSelection(selectedFeature);\n        this.selectInteractionManager.shapeGuideLinesCall(\"add\", [selectedFeature], \"applyRoofPlaneEditMode\");\n        this.selectInteractionManager.selectClickResetInteractionManagers();\n      }\n    }\n    this.snapInteractionManager.refresh();\n  }\n\n  #enableSelectSubMenu() {\n    if (!this.hasSelectSubMenuBtnTarget) return;\n    toolbarBtn.enable(this.selectSubMenuBtnTarget);\n    toolbarBtn.enable(this.editVerticesBtnTarget);\n    toolbarBtn.enable(this.transformShapeBtnTarget);\n  }\n\n  #disableSelectSubMenu() {\n    if (!this.hasSelectSubMenuBtnTarget) return;\n    toolbarBtn.disable(this.selectSubMenuBtnTarget);\n    toolbarBtn.disable(this.editVerticesBtnTarget);\n    toolbarBtn.disable(this.transformShapeBtnTarget);\n  }\n\n  get #savedRoofPlaneEditMode() {\n    return toolbarSelectGroup.getState(\"prRoofPlaneEditMode\", OBSTRUCTION_EDIT_MODE_VERTICES);\n  }\n}\n", "import BaseMapModelSynchronizer from \"./base\";\n\nexport default class SetbacksMapModelSynchronizer extends BaseMapModelSynchronizer {\n  loadSetbacks() {\n    return [this.buildSetbackForRoofPlane(this.controller.focusedRoofPlane)];\n  }\n\n  setRoofPlaneRoofSectionsLegality(roofPlaneUuid, illegalShape) {\n    const roofPlane = this.project.getRoofPlane(roofPlaneUuid);\n    roofPlane.roofSections.forEach((rs) => rs.setIllegalShape(illegalShape));\n  }\n\n  buildSetbackForRoofPlane(roofPlane) {\n    const setbackFeature = super.buildSetbackForRoofPlane(roofPlane);\n    if (roofPlane.hasIllegalRoofSections) setbackFeature.set(\"illegalShape\", true);\n\n    return setbackFeature;\n  }\n\n  get setbackFeature() {\n    const roofPlaneUuid = this.controller.focusedRoofPlaneUuid;\n    return this.controller.mapManager.setbacksVectorSource\n      .getFeatures()\n      .find((f) => f.get(\"roofPlaneUuid\") === roofPlaneUuid);\n  }\n\n  loadGuideLines() {\n    const guideLines = this.project.displayableRoofPlanes.flatMap((roofPlane) => {\n      return this.buildRoofPlaneGuideLineStringFeatures(roofPlane, { guideLinesKey: \"setbackGuides\" });\n    });\n    return guideLines;\n  }\n\n  toggleGuideLineVisibility(segmentIndex) {\n    this.guideLineForSegmentIndex(segmentIndex).toggleVisibility();\n    this.controller.mapManager.reloadGuideLineFeatures();\n  }\n\n  setGuideLineDistance(segmentIndex, distance) {\n    this.guideLineForSegmentIndex(segmentIndex).setDistance(distance);\n    this.controller.mapManager.reloadGuideLineFeatures();\n  }\n\n  guideLineForSegmentIndex(segmentIndex) {\n    return this.controller.focusedRoofPlane.guideLineForSegmentIndex(segmentIndex);\n  }\n\n  showAllGuideLines() {\n    this.setAllGuideLinesVisibility(true);\n  }\n\n  hideAllGuideLines() {\n    this.setAllGuideLinesVisibility(false);\n  }\n\n  setAllGuideLinesVisibility(visible) {\n    this.controller.focusedRoofPlane.setbackGuides.forEach((sg) => sg.setVisibility(visible));\n    this.controller.mapManager.reloadGuideLineFeatures();\n  }\n}\n", "import BaseMapManager from \"./base\";\nimport SetbackLegalityChecker from \"../legality-checkers/setback\";\nimport * as events from \"../../../da/map/events\";\nimport { logger } from \"../../../helpers/app\";\n\nimport { SELECT_TYPE_SETBACK } from \"../../../da/layout-editor/helpers/toolbar-constants\";\nimport { SETBACK_DATA_TYPE, MEASURE_DATA_TYPE } from \"../../../da/map/data-types\";\n\nexport default class SetbacksMapManager extends BaseMapManager {\n  add() {\n    this.buildRoofPlanesVectorSource();\n    this.buildRoofSectionsVectorSource();\n    this.buildSetbacksVectorSource();\n    this.buildMeasuresVectorSource();\n    this.buildGuideLinesVectorSource();\n    this.buildGuideLinesIntersectionCirclesVectorSource();\n    this.buildShapeGuideLinesVectorSource();\n    this.buildPanelsVectorSource();\n    this.buildSegmentsVectorSource();\n    this.buildRailsVectorSource();\n    this.buildThermalExpansionsVectorSource();\n    this.buildAdjoinmentsVectorSource();\n    this.buildContourLegalityAdjoinmentsVectorSource();\n    this.buildContoursVectorSource();\n\n    this.map = this.buildMap({\n      layers: [\n        this.tileLayer,\n        this.roofPlanesVectorLayer,\n        this.measuresVectorLayer,\n        this.setbacksVectorLayer,\n        this.guideLinesIntersectionCirclesVectorLayer,\n        this.guideLinesVectorLayer,\n        this.shapeGuideLinesVectorLayer,\n        this.panelsVectorLayer,\n        this.segmentsVectorLayer,\n        this.railsVectorLayer,\n        this.thermalExpansionsVectorLayer,\n        this.contoursVectorLayer,\n        this.contourLegalityAdjoinmentsVectorLayer,\n        this.adjoinmentsVectorLayer,\n      ],\n    });\n\n    this.renderContourFeatures();\n    this.addBuildingImagePlacementLayers();\n\n    this.setProjectSiteValuesOnMoveEnd = false;\n\n    this.map.on(\"moveend\", this.onMoveEnd);\n    this.map.on(\"click\", this.onMapClick);\n    this.map.on(events.AFTER_MAP_FEATURES_RENDERING_EVENT, (event) => {\n      logger(`Dispatch ${events.AFTER_MAP_FEATURES_RENDERING_EVENT} called from ${event.calledFrom}`);\n\n      this.checkLegality();\n    });\n\n    this.dispatchAfterMapFeaturesRendering({ calledFrom: \"SetbacksMapManager#add\" });\n  }\n\n  checkLegality() {\n    const segmentsLegalityChecker = super.checkLegality();\n\n    this.controller.showEncroachingWarningMessage(segmentsLegalityChecker.encroaching);\n\n    const setbackFeature = this.setbacksVectorSource.getFeatures()[0];\n    new SetbackLegalityChecker(setbackFeature, this.mapModelSynchronizer).check();\n  }\n\n  onMapClick = (event) => {\n    const { coordinate } = event;\n    const pixelCoordinate = this.map.getPixelFromCoordinate(coordinate);\n    const featuresAtPixel = this.map.getFeaturesAtPixel(pixelCoordinate);\n\n    const setbackFeatures = featuresAtPixel.filter((feature) => feature.get(\"dataType\") === SETBACK_DATA_TYPE);\n    const measureFeatures = featuresAtPixel.filter((feature) => feature.get(\"dataType\") === MEASURE_DATA_TYPE);\n\n    if (setbackFeatures.length === 0 && measureFeatures.length === 0) return;\n\n    if (this.controller.selectType === SELECT_TYPE_SETBACK) {\n      if (measureFeatures.length === 0) return;\n\n      this.controller.setSelectToMeasure();\n    } else {\n      if (setbackFeatures.length === 0) return;\n\n      this.controller.setSelectToSetback();\n    }\n  };\n}\n", "import { click } from \"ol/events/condition\";\nimport { SELECT_TYPE_MEASURES, SELECT_TYPE_SETBACK } from \"../../../../da/layout-editor/helpers/toolbar-constants\";\nimport { MEASURE_DATA_TYPE, SETBACK_DATA_TYPE } from \"../../../../da/map/data-types\";\nimport DaBase from \"../../../../da/map/interaction-managers/select/base\";\n\nexport default class Setbacks extends DaBase {\n  constructor(controller, selectType) {\n    super(controller);\n    this.setSelectType(selectType);\n  }\n\n  add() {\n    super.add();\n\n    this.selectionCollection.on(\"add\", this.deselectFeaturesOfOtherTypes);\n  }\n\n  filterSelects = (feature, _layer) => {\n    if (this.isSetbackSelectType) {\n      return feature.get(\"dataType\") === SETBACK_DATA_TYPE;\n    } else if (this.isMeasureSelectType) {\n      return feature.get(\"dataType\") === MEASURE_DATA_TYPE;\n    }\n  };\n\n  get isSetbackSelectType() {\n    return this.selectType === SELECT_TYPE_SETBACK;\n  }\n\n  get isMeasureSelectType() {\n    return this.selectType === SELECT_TYPE_MEASURES;\n  }\n\n  setSelectType(selectType) {\n    this.selectType = selectType;\n\n    if (this.currentSelectInteraction) this.selectionCollection.clear();\n  }\n\n  selectCondition = (event) => {\n    if (this.isSetbackSelectType) {\n      return false;\n    } else {\n      return click(event);\n    }\n  };\n\n  // This helps to prevent translation of the setback.  Setbacks aren't\n  // directly translatable, but there's an edge case where a user can\n  // multi select the setback and a measure and then translate the measure,\n  // which brings the setback along with it.  This prevents that by not\n  // allowing both types to be selected at the same time.\n  deselectFeaturesOfOtherTypes = (event) => {\n    if (!event.element) return;\n\n    let featuresToRemove;\n    const selectedDataType = event.element.get(\"dataType\");\n    if (selectedDataType === MEASURE_DATA_TYPE) {\n      featuresToRemove = this.mapManager.setbacksVectorSource.getFeatures();\n    } else if (selectedDataType == SETBACK_DATA_TYPE) {\n      featuresToRemove = this.mapManager.measuresVectorSource.getFeatures();\n    }\n\n    if (featuresToRemove) featuresToRemove.forEach((feature) => this.selectionCollection.remove(feature));\n  };\n\n  selectClickResetInteractionManagers() {\n    this.controller.translateInteractionManager.add();\n    this.controller.modifyInteractionManager.add();\n  }\n\n  removeSelectedShapes = () => {\n    this.baseRemoveSelectedShapes();\n  };\n}\n", "import DaBase from \"../../../../da/map/interaction-managers/modify/base\";\nimport {\n  updateRoofSectionsFromModifiedSetbackCoordinates,\n  ensureSetbackOuterRingRemainsUnmodified,\n} from \"../../modification-helpers/roof-section\";\n\nexport default class Setbacks extends DaBase {\n  modifyEndForFeature(setbackFeature) {\n    this.mapManager.dispatchBeforeMapFeaturesRendering({\n      calledFrom: \"SetbacksModifyInteractionManager#modifyEndForFeature\",\n    });\n\n    ensureSetbackOuterRingRemainsUnmodified(this.mapManager, setbackFeature);\n    updateRoofSectionsFromModifiedSetbackCoordinates(this.controller.project, setbackFeature);\n\n    this.mapManager.buildRoofSectionsVectorSource();\n    this.mapManager.forceRedrawRoofPlanes();\n\n    this.mapManager.dispatchAfterMapFeaturesRendering({\n      calledFrom: \"SetbacksModifyInteractionManager#modifyEndForFeature\",\n    });\n\n    this.controller.markDirty();\n  }\n\n  get polygonModifyInteractionParams() {\n    return {\n      features: this.selectedPolygonFeatures,\n      insertVertexCondition: () => false, // disallow adding vertexes\n    };\n  }\n}\n", "import Base from \"../../../../da/map/interaction-managers/snap/base\";\n\nexport default class Setbacks extends Base {\n  get snapSources() {\n    return [\n      this.mapManager.roofPlanesVectorSource,\n      this.mapManager.guideLinesVectorSource,\n      this.mapManager.guideLinesIntersectionCirclesVectorSource,\n    ];\n  }\n}\n", "import { SETBACK_DATA_TYPE } from \"../../../../da/map/data-types\";\nimport DaBase from \"../../../../da/map/interaction-managers/translate/base\";\n\nexport default class SetbacksTranslationManager extends DaBase {\n  isFeatureTranslatable(feature) {\n    return feature.get(\"dataType\") !== SETBACK_DATA_TYPE;\n  }\n}\n", "import { getSnapshot } from \"mobx-state-tree\";\n\nimport { syncRoofSectionCartesianPoints } from \"../../../bx/map/modification-helpers/roof-section\";\n\nexport function zeroOutSetbackRoofSections(roofPlane, originLonLat) {\n  const existingRoofSections = roofPlane.roofSections.filter(\n    (roofSection) => !roofSection.deleted && !roofSection.custom,\n  );\n  const latLngPoints = getSnapshot(roofPlane.latLngPoints);\n  let firstRoofSection = existingRoofSections[0];\n\n  if (!firstRoofSection) {\n    firstRoofSection = roofPlane.addRoofSection({\n      custom: false,\n      active: true,\n      segments: [],\n      latLngPoints,\n      defaultLatLngPoints: latLngPoints,\n      cartesianPoints: [],\n    });\n  }\n\n  firstRoofSection.setLatLngPoints(latLngPoints);\n  syncRoofSectionCartesianPoints(originLonLat, firstRoofSection);\n  firstRoofSection.markDirty();\n\n  existingRoofSections.forEach((roofSection, index) => {\n    if (index === 0) return;\n\n    roofSection.reassignSegments(firstRoofSection);\n\n    if (roofSection.id === undefined) {\n      roofPlane.destroyRoofSection(roofSection);\n    } else {\n      roofSection.flagDeleted();\n    }\n  });\n}\n", "import MapBaseController from \"./map_base_controller\";\n\nimport SetbacksMapModelSynchronizer from \"../../../../pr/map/map-model-synchronizers/setbacks\";\nimport SetbacksMapManager from \"../../../../pr/map/map-managers/setbacks\";\n\nimport SelectInteractionManager from \"../../../../pr/map/interaction-managers/select/setbacks\";\nimport ModifyInteractionManager from \"../../../../pr/map/interaction-managers/modify/setbacks\";\nimport SnapInteractionManager from \"../../../../pr/map/interaction-managers/snap/setbacks\";\nimport MeasureInteractionManager from \"../../../../da/map/interaction-managers/measure/base\";\nimport TranslateInteractionManager from \"../../../../pr/map/interaction-managers/translate/setbacks\";\nimport ShapeGuideLinesInteractionManager from \"../../../../da/map/interaction-managers/shape-guide-lines/base\";\n\nimport {\n  EDITOR_MODE_SELECT,\n  EDITOR_MODE_MEASURE,\n  SELECT_TYPE_MEASURES,\n  SELECT_TYPE_SETBACK,\n} from \"../../../../da/layout-editor/helpers/toolbar-constants\";\nimport * as toolbarSelectGroup from \"../../../../da/layout-editor/helpers/toolbar-select-group\";\nimport * as toolbarBtn from \"../../../../da/layout-editor/helpers/toolbar-btns\";\nimport { syncRoofSectionCartesianPoints } from \"../../../../bx/map/modification-helpers/roof-section\";\nimport { zeroOutSetbackRoofSections } from \"../../../../pr/map/modification-helpers/setbacks\";\nimport SegmentsLegalityChecker from \"../../../../pr/map/legality-checkers/segments\";\nimport { checkIfFeatureHasPointsInsideFeatureIncludingInteriorPoint } from \"../../../../da/map/legality-checkers/polygon-helpers\";\nimport { applyDomUpdatesFromResponse } from \"../../../../helpers/api-dom-helpers\";\nimport { reRenderSegment } from \"../../../../pr/map/modification-helpers/segments/helpers\";\n\nexport default class MapSetbacksController extends MapBaseController {\n  static targets = [\n    \"map\",\n    \"compass\",\n    \"selectSetbackBtn\",\n    \"selectMeasureBtn\",\n    \"selectTypeMenuBtn\",\n    \"selectTypeMenu\",\n    \"resetDefaultSetbackBtn\",\n    \"zeroSetbackBtn\",\n    \"statusItemZoom\",\n    \"statusItemRotation\",\n  ];\n\n  connect() {\n    super.connect();\n\n    this.btnGroups = {\n      select: [this.selectTypeMenuBtnTarget, this.selectSetbackBtnTarget, this.selectMeasureBtnTarget],\n    };\n\n    this.focusedRoofPlaneUuid = this.element.dataset.focusedRoofPlaneUuid;\n    this.focusedRoofPlane = this.project.getRoofPlane(this.focusedRoofPlaneUuid);\n    this.pageRoofPlanes = [this.focusedRoofPlane];\n    this.slopeAdjustedMeasures = true;\n\n    this.editorMode = toolbarSelectGroup.getState(\"prSetbackEditorMode\", EDITOR_MODE_SELECT);\n    this.selectType = toolbarSelectGroup.getState(\"prSetbackSelectType\", SELECT_TYPE_SETBACK);\n\n    this.mapSpecificConnect();\n    this.setupMapInteractionManagers();\n    this.initializeEditorMode();\n\n    this.populateStatusbar();\n\n    document.addEventListener(\"keydown\", this.handleKeydown);\n\n    const hasNewlyGeneratedRoofSections = this.focusedRoofPlane.roofSections.some((rs) => !rs.id);\n    setTimeout(() => {\n      this.alignViewToFeature(this.mapModelSynchronizer.setbackFeature, { markClean: !hasNewlyGeneratedRoofSections });\n      this.mapManager.rotateTo(this.focusedRoofPlane.eaveRotationAngleRadians);\n    }, 200);\n  }\n\n  disconnect() {\n    super.disconnect();\n\n    document.removeEventListener(\"keydown\", this.handleKeydown);\n  }\n\n  handleKeydown = (event) => {\n    if (event.key === \"Backspace\") {\n      if (event.target.tagName !== \"INPUT\") {\n        event.preventDefault();\n        this.removeSelectedFeatures(event);\n      }\n    } else if (event.key === \"Escape\") {\n      this.measureInteractionManager.finish();\n    }\n  };\n\n  get setbackIsSelected() {\n    return this.selectInteractionManager.selectedFeatures.some((f) => f.get(\"dataType\") === \"Setback\");\n  }\n\n  removeSelectedFeatures(event) {\n    if (this.setbackIsSelected) return;\n\n    this.selectInteractionManager.removeSelectedFeatures(event);\n  }\n\n  mapSpecificConnect() {\n    this.mapModelSynchronizer = new SetbacksMapModelSynchronizer(this);\n\n    this.mapManager = new SetbacksMapManager(this);\n    this.mapManager.add();\n    this.mapManager.buildNewDefaultRoofSectionsAndSetbacks();\n\n    this.#hideResetDefaultSetbackBtnIfLegacyRoofSections();\n  }\n\n  setupMapInteractionManagers() {\n    this.selectInteractionManager = new SelectInteractionManager(this, this.selectType);\n\n    this.measureInteractionManager = new MeasureInteractionManager(this);\n\n    this.snapInteractionManager = new SnapInteractionManager(this);\n    this.snapInteractionManager.add();\n\n    this.shapeGuideLinesInteractionManager = new ShapeGuideLinesInteractionManager(this);\n\n    this.modifyInteractionManager = new ModifyInteractionManager(this);\n    this.translateInteractionManager = new TranslateInteractionManager(this);\n  }\n\n  selectSetbackFeature() {\n    const selectInteraction = this.selectInteractionManager.currentSelectInteraction;\n    if (!selectInteraction || this.selectType !== SELECT_TYPE_SETBACK) return;\n\n    const selectCollection = selectInteraction.getFeatures();\n\n    const setbackFeatures = this.mapManager.setbacksVectorSource.getFeatures();\n    setbackFeatures.forEach((sf) => selectCollection.push(sf));\n\n    this.modifyInteractionManager.add();\n  }\n\n  initializeEditorMode() {\n    switch (this.editorMode) {\n      case EDITOR_MODE_MEASURE:\n        this.startMeasureMode();\n        break;\n      case EDITOR_MODE_SELECT:\n        this.startSelectMode();\n        break;\n      default:\n        this.startSelectMode();\n    }\n  }\n\n  startSelectMode(_event) {\n    this.setEnabledForBtnGroup(\"select\", true);\n    this.selectInteractionManager.add();\n    this.measureInteractionManager.remove();\n    if (this.selectType === SELECT_TYPE_SETBACK) {\n      this.selectSetbackFeature();\n    }\n    toolbarBtn.showEnabledAndHideDisabledPinnedFlyoutMenus();\n  }\n\n  startMeasureMode(_event) {\n    this.setEnabledForBtnGroup(\"select\", false);\n    this.modifyInteractionManager.remove();\n    this.translateInteractionManager.remove();\n\n    this.selectInteractionManager.remove();\n    this.measureInteractionManager.add();\n\n    toolbarBtn.showEnabledAndHideDisabledPinnedFlyoutMenus();\n  }\n\n  setSelectToSetback(event) {\n    if (event && toolbarBtn.isDisabled(event.currentTarget)) return;\n    if (!event) this.selectTypeMenuTarget.selectGroupController.selectOption(\"setback\");\n\n    this.modifyInteractionManager.remove();\n    this.translateInteractionManager.remove();\n\n    this.selectType = SELECT_TYPE_SETBACK;\n    this.selectInteractionManager.setSelectType(this.selectType);\n    this.selectSetbackFeature();\n  }\n\n  setSelectToMeasure(event) {\n    if (event && toolbarBtn.isDisabled(event.currentTarget)) return;\n    if (!event) this.selectTypeMenuTarget.selectGroupController.selectOption(\"measures\");\n\n    this.modifyInteractionManager.remove();\n    this.translateInteractionManager.remove();\n\n    this.selectType = SELECT_TYPE_MEASURES;\n    this.selectInteractionManager.setSelectType(this.selectType);\n  }\n\n  // Called by both Stimulus event handler and saveAndThenRedirect triggered by auto save controller\n  save(event, onSuccess = () => {}) {\n    if (toolbarBtn.isDisabled(event.currentTarget)) return;\n\n    this.selectInteractionManager.deselectSelected();\n    toolbarBtn.showSpinner(this.saveBtnTarget);\n\n    const currentPageCallback = (json) => {\n      applyDomUpdatesFromResponse(json);\n      this.markClean();\n\n      if (onSuccess) onSuccess();\n\n      this.focusedRoofPlane.roofSections.forEach((roofSection) => {\n        roofSection.segments.forEach((segment) => {\n          reRenderSegment(this, segment);\n        });\n      });\n\n      setTimeout(() => {\n        toolbarBtn.hideSpinner(this.saveBtnTarget);\n      }, 500);\n    };\n\n    this.project.save({\n      path: this.savePath,\n      onSuccess: currentPageCallback,\n      onValidationError: this.onValidationError,\n      onServerError: this.onServerError,\n      includeProjectSite: false,\n      includeZonesAndModulePositions: true,\n      includeUploadedBuildingImages: false,\n    });\n\n    if (this.selectType === SELECT_TYPE_SETBACK) {\n      this.selectSetbackFeature();\n    }\n  }\n\n  resetDefaultSetback(event) {\n    this.selectInteractionManager.removeSelectedFeatures(event);\n    this.mapManager.setbacksVectorSource.clear();\n\n    const originLonLat = this.focusedRoofPlane.project.detail.originLatLng.toLonLat;\n\n    const existingRoofSections = this.focusedRoofPlane.roofSections.filter((rs) => !rs.deleted);\n    const segments = existingRoofSections.flatMap((rs) => rs.segments);\n    existingRoofSections.forEach((rs) => {\n      rs.detachSegments();\n    });\n\n    this.mapManager.roofSectionsBuilder.rebuildRoofSectionsForRoofPlane(this.focusedRoofPlane);\n\n    const activeRoofSections = this.focusedRoofPlane.roofSections.filter((rs) => !rs.deleted);\n\n    if (activeRoofSections.length === 1) {\n      segments.forEach((segment) => {\n        activeRoofSections[0].addSegment(segment);\n      });\n      syncRoofSectionCartesianPoints(originLonLat, activeRoofSections[0]);\n    } else {\n      const segmentFeatures = this.mapManager.segmentsVectorSource.getFeatures();\n      activeRoofSections.forEach((rs) => {\n        const rsFeature = this.mapModelSynchronizer.getFeatureForRoofSection(rs);\n        segmentFeatures.forEach((sf) => {\n          const segmentHasPointInsideRoofSection = checkIfFeatureHasPointsInsideFeatureIncludingInteriorPoint(\n            sf,\n            rsFeature,\n          );\n          if (segmentHasPointInsideRoofSection) {\n            const segment = sf.get(\"model\");\n            rs.addExistingSegment(segment);\n          }\n        });\n        syncRoofSectionCartesianPoints(originLonLat, rs);\n      });\n    }\n\n    const setbackFeatures = this.mapModelSynchronizer.loadSetbacks();\n    setbackFeatures.forEach((setbackFeature) => {\n      this.mapManager.setbacksVectorSource.addFeature(setbackFeature);\n    });\n\n    this.mapManager.buildRoofSectionsVectorSource();\n\n    const segmentsLegalityChecker = new SegmentsLegalityChecker(this);\n    segmentsLegalityChecker.check();\n    this.showEncroachingWarningMessage(segmentsLegalityChecker.encroaching);\n\n    if (this.selectType === SELECT_TYPE_SETBACK) {\n      this.selectSetbackFeature();\n    }\n\n    this.focusedRoofPlane.resequenceRoofSectionsIdentifiers();\n    this.#showSetbackGuides();\n    this.markDirty();\n  }\n\n  #hideResetDefaultSetbackBtnIfLegacyRoofSections() {\n    // The reset default setback feature relies on the stored default lat lng points for roof sections.\n    // If we have roof sections created before we rolled out this feature, hide this button.\n    const hasLegacyRoofSections = this.focusedRoofPlane.roofSections.some((rs) => {\n      return rs.id && rs.defaultLatLngPoints.length === 0;\n    });\n    if (!hasLegacyRoofSections) return;\n\n    const btnContainer = this.resetDefaultSetbackBtnTarget.closest(\".ol-map__btn__group\");\n    btnContainer.style.display = \"none\";\n  }\n\n  zeroSetback(event) {\n    this.selectInteractionManager.removeSelectedFeatures(event);\n    this.mapManager.setbacksVectorSource.clear();\n\n    const originLonLat = this.focusedRoofPlane.project.detail.originLatLng.toLonLat;\n\n    zeroOutSetbackRoofSections(this.focusedRoofPlane, originLonLat);\n\n    this.mapManager.roofSectionsFeatures.forEach((rsf) => {\n      this.mapManager.roofSectionsVectorSource.removeFeature(rsf);\n    });\n\n    const setbackFeatures = this.mapModelSynchronizer.loadSetbacks();\n    setbackFeatures.forEach((setbackFeature) => {\n      this.mapManager.setbacksVectorSource.addFeature(setbackFeature);\n    });\n\n    this.mapManager.buildRoofSectionsVectorSource();\n\n    const segmentsLegalityChecker = new SegmentsLegalityChecker(this);\n    segmentsLegalityChecker.check();\n    this.showEncroachingWarningMessage(segmentsLegalityChecker.encroaching);\n\n    if (this.selectType === SELECT_TYPE_SETBACK) {\n      this.selectSetbackFeature();\n    }\n\n    this.focusedRoofPlane.resequenceRoofSectionsIdentifiers();\n    this.markDirty();\n    this.#hideSetbackGuides();\n  }\n\n  #hideSetbackGuides() {\n    this.#setbackGuidesFormController.hideAll();\n  }\n\n  #showSetbackGuides() {\n    this.#setbackGuidesFormController.showAll();\n  }\n\n  get #setbackGuidesFormController() {\n    return document.querySelector(\"[data-controller='pr--image-based--layout-editor--setback-guides-form\").controller;\n  }\n}\n", "import VectorSource from \"ol/source/Vector\";\nimport { defaults as interactionDefaults } from \"ol/interaction\";\n\nimport BaseMapManager from \"./base\";\nimport { transparentOrRegularSegmentStyle } from \"../styles/segments\";\nimport { panelsStyle } from \"../styles/zone-panels\";\n\nexport default class ViewOnlyMapManager extends BaseMapManager {\n  add() {\n    this.buildRoofPlanesVectorSource();\n    this.buildRoofSectionsVectorSource();\n    this.buildSetbacksVectorSource();\n    this.buildPanelsVectorSource();\n    this.buildSegmentsVectorSource();\n    this.buildRailsVectorSource();\n    this.buildThermalExpansionsVectorSource();\n    this.buildAdjoinmentsVectorSource();\n    this.buildContourLegalityAdjoinmentsVectorSource();\n    this.buildContoursVectorSource();\n\n    this.map = this.buildMap({\n      layers: [\n        this.tileLayer,\n        this.roofPlanesVectorLayer,\n        this.roofSectionsVectorLayer,\n        this.setbacksVectorLayer,\n        this.panelsVectorLayer,\n        this.segmentsVectorLayer,\n        this.railsVectorLayer,\n        this.thermalExpansionsVectorLayer,\n        this.contoursVectorLayer,\n        this.contourLegalityAdjoinmentsVectorLayer,\n        this.adjoinmentsVectorLayer,\n      ],\n      interactions: interactionDefaults({ doubleClickZoom: false, mouseWheelZoom: false }),\n    });\n\n    if (this.project.segments.length > 0) {\n      // We need to have the map in place first\n      this.buildRafterVectorSourcesLayersAndFeatures();\n    }\n\n    this.renderContourFeatures();\n    this.addBuildingImagePlacementLayers();\n\n    this.addMouseWheelZoomWhenCtrlKeyPressedInteraction();\n\n    this.segmentsVectorLayer.setZIndex(60);\n    this.panelsVectorLayer.setZIndex(40);\n\n    this.map.on(\"moveend\", this.onMoveEnd);\n  }\n\n  onMoveEndHandler(event) {\n    const continueProcessing = super.onMoveEndHandler(event);\n    if (!continueProcessing) return;\n\n    this.controller.mapMoveUpdateOtherMaps();\n  }\n\n  buildPanelsVectorSource() {\n    this.panelsVectorSource = new VectorSource({\n      features: this.mapModelSynchronizer.featuresForAllPanels(),\n    });\n  }\n\n  panelsStyle = (feature) => {\n    return panelsStyle(feature, this.map, this.controller.project.is716Or722);\n  };\n\n  segmentsStyle = (feature) => {\n    return transparentOrRegularSegmentStyle(feature);\n  };\n}\n", "import MapBaseController from \"./map_base_controller\";\nimport ViewOnlyMapManager from \"../../../../pr/map/map-managers/view-only\";\nimport BaseMapModelSynchronizer from \"../../../../pr/map/map-model-synchronizers/base\";\n\nexport default class MapViewOnlyController extends MapBaseController {\n  static targets = [\"map\", \"compass\", \"saveBtn\"];\n\n  connect() {\n    this.viewOnlyMap = true;\n    this.renderSegmentsWithZones = true;\n\n    super.connect();\n\n    this.pageRoofPlanes = this.project.roofPlanes;\n\n    this.mapModelSynchronizer = new BaseMapModelSynchronizer(this);\n\n    this.mapManager = new ViewOnlyMapManager(this);\n    this.mapManager.add();\n\n    this.mapManager.checkLegality();\n\n    this.element.controller = this;\n  }\n\n  // Called by both Stimulus event handler and saveAndThenRedirect triggered by auto save controller\n  save(_event, onSuccess = () => {}) {\n    this.modelSave({\n      model: this.project.projectSite,\n      onSuccess,\n      includeProjectSite: true,\n      includeUploadedBuildingImages: false,\n    });\n  }\n\n  zoomOut(event) {\n    super.zoomOut(event);\n    this.updateProjectSiteValuesForOtherMaps(this.attachmentsMapController);\n  }\n\n  zoomIn(event) {\n    super.zoomIn(event);\n    this.updateProjectSiteValuesForOtherMaps(this.attachmentsMapController);\n  }\n\n  rotateCounterClockwise(event) {\n    super.rotateCounterClockwise(event);\n    this.updateProjectSiteValuesForOtherMaps(this.attachmentsMapController);\n  }\n\n  mapMoveUpdateOtherMaps() {\n    this.updateProjectSiteValuesForOtherMaps(this.attachmentsMapController);\n  }\n\n  get attachmentsMapController() {\n    const otherMapElem = document.querySelector(\"[data-controller='pr--image-based--attachments-editor']\");\n    if (!otherMapElem) return;\n\n    return otherMapElem.controller;\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\n\nexport default class SetbackGuidesForm extends Controller {\n  static targets = [\"toggleVisibilityIcon\"];\n\n  connect() {\n    this.element.controller = this;\n  }\n\n  changeDistance(event) {\n    const field = event.currentTarget;\n    const segmentIndex = Number.parseInt(field.dataset.segmentIndex);\n    if (field.value === \"\") return;\n\n    const distance = Number.parseFloat(field.value);\n    this.mapController.mapModelSynchronizer.setGuideLineDistance(segmentIndex, distance);\n    this.mapController.markDirty();\n  }\n\n  toggleVisibility(event) {\n    const button = event.currentTarget;\n    const segmentIndex = Number.parseInt(button.dataset.segmentIndex);\n    const icon = button.querySelector(\"i\");\n\n    // There is only 1 displayable roof plane\n    const setbackGuide = this.mapController.project.displayableRoofPlanes[0].guideLineForSegmentIndex(segmentIndex);\n    this.toggleVisibilityIcon(icon, !setbackGuide.visible);\n\n    this.mapController.mapModelSynchronizer.toggleGuideLineVisibility(segmentIndex);\n    this.mapController.markDirty();\n  }\n\n  toggleVisibilityIcon(icon, visible) {\n    if (visible) {\n      icon.classList.remove(\"fa-eye-slash\");\n      icon.classList.add(\"fa-eye\");\n    } else {\n      icon.classList.remove(\"fa-eye\");\n      icon.classList.add(\"fa-eye-slash\");\n    }\n  }\n\n  get mapController() {\n    return document.querySelector(\"[data-controller='pr--image-based--layout-editor--map-setbacks']\")[\n      \"pr--image-based--layout-editor--map-setbacks\"\n    ];\n  }\n\n  hideAll(_event) {\n    this.mapController.mapModelSynchronizer.hideAllGuideLines();\n    this.toggleVisibilityIconTargets.forEach((icon) => this.toggleVisibilityIcon(icon, false));\n    this.mapController.markDirty();\n  }\n\n  showAll(_event) {\n    this.mapController.mapModelSynchronizer.showAllGuideLines();\n    this.toggleVisibilityIconTargets.forEach((icon) => this.toggleVisibilityIcon(icon, true));\n    this.mapController.markDirty();\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport { showBtnSpinner } from \"../../../../helpers/app\";\nimport { confirmDialog } from \"../../../components/ir_dialog/helper\";\nimport { submitWithTabId } from \"../../../../helpers/form\";\n\nexport default class extends Controller {\n  static targets = [\"submitBtn\", \"roofPlaneCheckbox\"];\n\n  confirm(event) {\n    if (this.noRoofPlanesSelected) {\n      alert(\"You need to select at least one roof plane to unlock\");\n      return;\n    }\n    event.preventDefault();\n    const clickPosition = { x: event.pageX, y: event.pageY };\n    confirmDialog(this.confirmMessage, this.confirmationResponse, {\n      confirmBtnColor: \"red\",\n      headerColor: \"red\",\n      showNearClickPosition: true,\n      clickPosition,\n    });\n  }\n\n  get noRoofPlanesSelected() {\n    if (this.roofPlaneCheckboxTargets.length === 0) return false;\n\n    return this.roofPlaneCheckboxTargets.every((checkbox) => !checkbox.checked);\n  }\n\n  get confirmMessage() {\n    return this.element.dataset.confirmMessage;\n  }\n\n  confirmationResponse = (confirmed) => {\n    if (!confirmed) return;\n\n    showBtnSpinner(this.submitBtnTarget);\n    // Giving the button spinner a chance to show before the form is submitted.\n    // Without this pause the submit happens before the spinner shows.\n    setTimeout(() => {\n      submitWithTabId(this.element);\n    }, 200);\n  };\n}\n", "import VectorSource from \"ol/source/Vector\";\nimport { defaults as interactionDefaults } from \"ol/interaction\";\n\nimport BaseMapManager from \"./base\";\nimport { panelsStyle } from \"../styles/zone-panels\";\n\nexport default class ProjectReportMapManager extends BaseMapManager {\n  add() {\n    this.buildPanelsVectorSource();\n    this.buildSegmentsVectorSource();\n    this.buildRailsVectorSource();\n    this.buildContoursVectorSource();\n\n    this.map = this.buildMap({\n      layers: [this.tileLayer, this.panelsVectorLayer, this.railsVectorLayer, this.contoursVectorLayer],\n      interactions: interactionDefaults({ doubleClickZoom: false, mouseWheelZoom: false }),\n    });\n\n    this.addBuildingImagePlacementLayers();\n    this.renderContourFeatures();\n  }\n\n  buildPanelsVectorSource() {\n    this.panelsVectorSource = new VectorSource({\n      features: this.mapModelSynchronizer.featuresForAllPanels(),\n    });\n  }\n\n  panelsStyle = (feature) => {\n    feature.set(\"displayingInProjectReport\", true);\n    return panelsStyle(feature, this.map, this.controller.project.is716);\n  };\n}\n", "import MapBaseController from \"./layout_editor/map_base_controller\";\nimport BaseMapModelSynchronizer from \"../../../pr/map/map-model-synchronizers/base\";\nimport ProjectReportMapManager from \"../../../pr/map/map-managers/project-report\";\n\nexport default class MapProjectReportController extends MapBaseController {\n  static targets = [\"map\", \"compass\"];\n\n  connect() {\n    this.viewOnlyMap = true;\n    this.renderSegmentsWithZones = true;\n\n    super.connect();\n\n    this.pageRoofPlanes = this.project.roofPlanes;\n\n    this.mapModelSynchronizer = new BaseMapModelSynchronizer(this);\n\n    this.mapManager = new ProjectReportMapManager(this);\n    this.mapManager.add();\n\n    this.element.controller = this;\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\n\nimport * as animate from \"../../../../helpers/animate\";\n\nexport default class RafterOffsetFormController extends Controller {\n  static values = {\n    rafterSpacing: Number,\n    mapIdentifier: String,\n    label: String,\n  };\n\n  static targets = [\"saveForUpdatedAttachmentPlanMessageContainer\", \"inputField\"];\n\n  connect() {\n    this.element.controller = this;\n  }\n\n  setInputField(value) {\n    this.inputFieldTarget.value = value;\n  }\n\n  updateOffsetValue(event) {\n    const field = event.currentTarget;\n    let value = Number.parseInt(field.value);\n    if (isNaN(value)) value = 0;\n    if (value > this.rafterSpacingValue) {\n      value = this.rafterSpacingValue;\n      alert(\n        `The ${this.labelValue} offset can not be greater than ${this.rafterSpacingValue} inches (the roof plane's ${this.labelValue} spacing)`,\n      );\n    }\n    field.value = value;\n\n    const mapElement = document.querySelector(`[data-controller=\"${this.mapIdentifierValue}\"]`);\n    const mapController = mapElement[this.mapIdentifierValue];\n    mapController.setRafterOffset(value);\n\n    animate.show(this.saveForUpdatedAttachmentPlanMessageContainerTarget);\n  }\n\n  hideSaveForUpdatedAttachmentPlanMessage() {\n    animate.hide(this.saveForUpdatedAttachmentPlanMessageContainerTarget);\n  }\n\n  preventSubmit(event) {\n    event.preventDefault();\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport { alertDialog } from \"../components/ir_dialog/helper\";\n\nexport default class extends Controller {\n  static values = {\n    usingQBox: false,\n    isQBoxAvailable: false,\n  };\n\n  static targets = [\"qBoxCheckbox\", \"jayBoxRoofMountCheckbox\", \"jayBoxRailMountCheckbox\"];\n\n  jayBoxClick(event) {\n    const checked = event.target.checked;\n\n    if (checked && this.hasQBoxCheckboxTarget) {\n      if (this.qBoxCheckboxTarget.checked && !this.isQBoxAvailableValue) {\n        alertDialog(\n          `Selecting JayBox will remove QBox from your project.  After you save, QBox\n           will no longer be available as an option for this project.`,\n        );\n      }\n\n      this.qBoxCheckboxTarget.checked = false;\n    }\n  }\n\n  qBoxClick(event) {\n    const checked = event.target.checked;\n    if (checked && this.hasJayBoxRoofMountCheckboxTarget) {\n      this.jayBoxRoofMountCheckboxTarget.checked = false;\n      this.jayBoxRailMountCheckboxTarget.checked = false;\n    }\n  }\n}\n", "import RoofInformationController from \"../da/roof_information_controller\";\nimport { addOptionsToSelect } from \"../../helpers/form\";\nimport * as animate from \"../../helpers/animate\";\nimport { hideDialog, showDialogWithIdentifier } from \"../components/ir_dialog/helper\";\n\nexport default class extends RoofInformationController {\n  static projectType = \"pr\";\n\n  static targets = [\n    ...RoofInformationController.targets,\n    \"railPlatformSelect\",\n    \"conduitMountsContainer\",\n    \"corrugatedRoofGaugeContainer\",\n    \"corruslideRequirementsAcceptedAtField\",\n    \"corruslideSubText\",\n    \"defaultRafterSpacingLabel\",\n    \"fvGripCapPlusContainer\",\n    \"fvGripCapPlusCount\",\n    \"metalShingleInfoContainer\",\n    \"qmConduitMountPenetrationFlashingsForCompShingleContainer\",\n    \"qmConduitMountPenetrationFlashingsForTileContainer\",\n    \"qmConduitMountsForTileContainer\",\n    \"qmTileReplacementFlashingForTileHooksContainer\",\n    \"qmTileReplacementFlashingForTileHooksRadioNo\",\n    \"qmTileDeckFlashingContainer\",\n    \"qmTileDeckFlashingRadioNo\",\n    \"roofManufacturerContainer\",\n    \"roofManufacturerSelect\",\n    \"roofMaterialFamilyInfoPopup\",\n    \"roofMaterialInfoPopup\",\n    \"roofSlopes\",\n    \"shingleAndFlashingContainer\",\n    \"shingleAndFlashingTypeSelect\",\n    \"quickGripContainer\",\n    \"quickGripRadioYes\",\n    \"quickGripRadioNo\",\n  ];\n\n  static values = {\n    ...RoofInformationController.values,\n    flpa3RoofAttachmentToSpecificGravities: Object,\n    flpa3Project: Boolean,\n    koTileDeckFlashingAvailable: Boolean,\n    quickGripCompatibleAttachments: Array,\n    quickGripStorageKey: String,\n    quickGripClearAckOnConnect: Boolean,\n  };\n\n  connect() {\n    this.railPlatform = this.data.get(\"rail-platform\");\n    this.materialToAttachmentXr = JSON.parse(this.data.get(\"material-to-attachment-xr\"));\n    this.materialToAttachmentAire = JSON.parse(this.data.get(\"material-to-attachment-aire\"));\n    this.materialToAttachmentClickfit = JSON.parse(this.data.get(\"material-to-attachment-clickfit\"));\n    this.materialFamilyToRoofMaterials = JSON.parse(this.data.get(\"material-family-to-roof-materials\"));\n    this.roofSlopes = JSON.parse(this.data.get(\"roof-slopes\"));\n    this.minimumRoofSlopes = JSON.parse(this.data.get(\"minimum-roof-slopes\"));\n    this.shingleAndFlashingTypesToAttachments = JSON.parse(this.data.get(\"shingleAndFlashingTypesToAttachments\"));\n    this.fallbackMinimumRoofSlope = JSON.parse(this.data.get(\"fallback-minimum-roof-slope\"));\n\n    this.previousRoofMaterial = this.roofMaterial;\n\n    if (this.quickGripClearAckOnConnectValue && this.quickGripStorageKeyValue !== \"\") {\n      window.localStorage.removeItem(this.quickGripStorageKeyValue);\n    }\n\n    // If the form loaded with QuickGrip already opted in, the user acknowledged\n    // the capacity dialog at some prior point \u2014 seed localStorage so toggling\n    // Yes off and on again doesn't re-prompt them.\n    if (\n      this.quickGripStorageKeyValue !== \"\" &&\n      this.hasQuickGripRadioYesTarget &&\n      this.quickGripRadioYesTarget.checked\n    ) {\n      window.localStorage.setItem(this.quickGripStorageKeyValue, \"acknowledged\");\n    }\n\n    this.toggleRoofMaterialFamilyInfoPopup();\n    this.toggleRoofMaterialInfoPopup();\n\n    this.changeRoofAttachment();\n  }\n\n  // NOTE: This action will only fire on the preset page\n  changeRailPlatform() {\n    this.railPlatform = this.railPlatformSelectTarget.value;\n\n    this.#syncAttachmentListWithRailPlatform();\n    this.updateDependenciesOnAttachmentList();\n  }\n\n  changeRoofAttachment(event) {\n    this.toggleRoofAttachmentInfoPopup();\n    this.#toggleRoofAttachmentsInInfoPopup();\n    this.#updateRoofSlopes();\n    this.changeShingleAndFlashingType();\n    this.toggleMetalShingleInfoBox();\n    this.toggleTileReplacementFlashingForTileHooks();\n    this.toggleTileDeckFlashing();\n    this.toggleFvGripCapPlus();\n    this.toggleDeckThickness();\n    this.toggleDeckScrewLength();\n    this.toggleCorrugatedRoofGauge();\n    this.toggleQuickGrip();\n    this.updateSpecificGravity();\n    this.#toggleSubText();\n    this.#disableRoofAttachmentsIfNeeded();\n    this.showCorruslideRequirementsDialogIfNeeded();\n    if (event) {\n      this.openQmHugScrewsIntro(event);\n      this.openSimpleGripScrewsIntro(event);\n    }\n  }\n\n  changeShingleAndFlashingType(event) {\n    animate.toggle(this.shingleAndFlashingContainerTarget, this.isMetalShingle);\n\n    this.#disableRoofAttachmentsIfNeeded();\n\n    if (!this.isMetalShingle) {\n      this.shingleAndFlashingTypeSelectTarget.value = \"\";\n      return;\n    }\n\n    const attachments = this.isShingleAndFlashingTypeEmpty\n      ? []\n      : this.shingleAndFlashingTypesToAttachments[this.shingleAndFlashingType];\n    addOptionsToSelect(attachments, this.roofAttachmentSelectTarget);\n\n    // this is being called from the shingle and flashing type select list change handler\n    // so we need to toggle the attachment info popup\n    if (event) {\n      this.toggleRoofAttachmentInfoPopup();\n      this.#toggleRoofAttachmentsInInfoPopup();\n      if (this.roofAttachment) this.#updateRoofSlopes();\n    }\n  }\n\n  showHideRoofMaterialSpecificFormElements() {\n    const isCompShingle = this.roofMaterial === \"cs\";\n    const isTile = this.roofMaterial.startsWith(\"tile_\");\n    this.selectPenetrationFlashing(isTile, isCompShingle);\n    const showHide = (elementTarget, show) => {\n      animate.toggle(this[elementTarget], show, { fadeOut: false });\n    };\n    showHide(\"conduitMountsContainerTarget\", isCompShingle);\n    showHide(\"qmConduitMountsForTileContainerTarget\", isTile);\n    showHide(\"qmConduitMountPenetrationFlashingsForCompShingleContainerTarget\", isCompShingle);\n    showHide(\"qmConduitMountPenetrationFlashingsForTileContainerTarget\", isTile);\n  }\n\n  toggleMetalShingleInfoBox() {\n    animate.toggle(this.metalShingleInfoContainerTarget, this.isMetalShingle);\n  }\n\n  toggleTileReplacementFlashingForTileHooks() {\n    // Show if All tile hook or QuickHook\n    const show = [\"ath\", \"ath_f\", \"flat_tile_fly\", \"qm_qh_lh\", \"qm_qh_lh_f\", \"qm_qh_sh\", \"qm_qh_sh_f\"].includes(\n      this.roofAttachment,\n    );\n    if (this.hasQmTileReplacementFlashingForTileHooksRadioNoTarget && !show) {\n      this.qmTileReplacementFlashingForTileHooksRadioNoTarget.checked = true;\n    }\n    if (this.hasQmTileReplacementFlashingForTileHooksContainerTarget) {\n      animate.toggle(this.qmTileReplacementFlashingForTileHooksContainerTarget, show);\n    }\n  }\n\n  toggleTileDeckFlashing() {\n    const isTile = this.roofMaterial.startsWith(\"tile_\");\n    const show = isTile && this.#isTileDeckFlashingCompatible();\n    if (this.hasQmTileDeckFlashingRadioNoTarget && !show) {\n      this.qmTileDeckFlashingRadioNoTarget.checked = true;\n    }\n    if (this.hasQmTileDeckFlashingContainerTarget) {\n      animate.toggle(this.qmTileDeckFlashingContainerTarget, show);\n    }\n    if (isTile) {\n      this.#toggleTileDeckFlashingInfoPopup();\n    }\n  }\n\n  // Keep in sync with tile_deck_flashing_compatible? in pr/roof_validations_and_helpers.rb\n  #isTileDeckFlashingCompatible() {\n    if ([\"qm_tr\", \"qm_qb_utm\"].includes(this.roofAttachment)) return false;\n    if (this.roofAttachment === \"ko_f\" && !this.koTileDeckFlashingAvailableValue) return false;\n    return true;\n  }\n\n  toggleFvGripCapPlus() {\n    const show = this.roofAttachment === \"fv\";\n    if (this.hasFvGripCapPlusCountTarget && !show) {\n      this.fvGripCapPlusCountTarget.value = 0;\n    }\n    if (this.hasFvGripCapPlusContainerTarget) {\n      animate.toggle(this.fvGripCapPlusContainerTarget, show);\n    }\n  }\n\n  toggleCorrugatedRoofGauge() {\n    if (this.hasCorrugatedRoofGaugeContainerTarget) {\n      animate.toggle(this.corrugatedRoofGaugeContainerTarget, this.roofAttachment === \"corruslide\");\n    }\n  }\n\n  selectPenetrationFlashing(isTile, isCompShingle) {\n    if (!isTile && !isCompShingle) return;\n\n    const penFlashRadio = (material, trueFalse) => {\n      return this[`qmConduitMountPenetrationFlashingsFor${material}ContainerTarget`].querySelector(\n        `input[value='${trueFalse}']`,\n      );\n    };\n\n    const penFlashForCompShingleRadioTrue = penFlashRadio(\"CompShingle\", \"true\");\n    const penFlashForCompShingleRadioFalse = penFlashRadio(\"CompShingle\", \"false\");\n    const penFlashForTileRadioTrue = penFlashRadio(\"Tile\", \"true\");\n    const penFlashForTileRadioFalse = penFlashRadio(\"Tile\", \"false\");\n\n    if (isTile) {\n      if (penFlashForCompShingleRadioTrue.checked) {\n        penFlashForTileRadioTrue.checked = true;\n      } else {\n        penFlashForTileRadioFalse.checked = true;\n      }\n    }\n\n    if (isCompShingle) {\n      if (penFlashForTileRadioTrue.checked) {\n        penFlashForCompShingleRadioTrue.checked = true;\n      } else {\n        penFlashForCompShingleRadioFalse.checked = true;\n      }\n    }\n  }\n\n  get isMetalShingle() {\n    return this.roofMaterial === \"metal_shingle\";\n  }\n\n  get shingleAndFlashingType() {\n    return this.shingleAndFlashingTypeSelectTarget.value;\n  }\n\n  get isShingleAndFlashingTypeEmpty() {\n    return this.shingleAndFlashingType === \"\";\n  }\n\n  updateAttachmentList() {\n    const possibleAttachments = this.roofMaterial === \"\" ? [] : this.#materialToAttachment(this.roofMaterial);\n\n    const prompt = possibleAttachments.length > 1 ? [[\"- choose one -\", \"\"]] : [];\n    const attachmentOptions = prompt.concat(possibleAttachments.map((a) => [a[0], a[1], false, false]));\n    addOptionsToSelect(attachmentOptions, this.roofAttachmentSelectTarget, false);\n    this.previousRoofMaterial = this.roofMaterial;\n  }\n\n  #syncAttachmentListWithRailPlatform() {\n    const currentAttachment = this.roofAttachmentSelectTarget.value;\n    const possibleAttachments = this.roofMaterial === \"\" ? [] : this.#materialToAttachment(this.roofMaterial);\n\n    const prompt = possibleAttachments.length > 1 ? [[\"- choose one -\", \"\"]] : [];\n    // keep the current attachment selected if it is present in the list of possibilities\n    const attachmentOptions = prompt.concat(\n      possibleAttachments.map((a) => [a[0], a[1], false, a[1] === currentAttachment]),\n    );\n    addOptionsToSelect(attachmentOptions, this.roofAttachmentSelectTarget, false);\n  }\n\n  #materialToAttachment(roofMaterial) {\n    let attachments;\n    if (this.railPlatform === \"aire\") {\n      attachments = this.materialToAttachmentAire;\n    } else if (this.railPlatform === \"clickfit\") {\n      attachments = this.materialToAttachmentClickfit;\n    } else {\n      attachments = this.materialToAttachmentXr;\n    }\n\n    return attachments[roofMaterial];\n  }\n\n  updateDependenciesOnAttachmentList() {\n    this.changeRoofAttachment();\n    this.showHideRoofMaterialSpecificFormElements();\n    this.toggleRoofMaterialInfoPopup();\n  }\n\n  #updateRoofSlopes() {\n    if (!this.hasRoofSlopesTarget) return;\n    // This will leave a potentially too low slope in place when there isn't a roof attachment.\n    // However, that generates an error and you'll have to select a new roof attachment. Once you've\n    // done that, then the minimum slope stuff will run.\n    if (!this.roofAttachment) return;\n\n    const currentRoofSlope = Number.parseInt(this.roofSlopesTarget.value);\n    const minimumSlopeForSelectedAttachment = this.minimumRoofSlopes[this.roofAttachment];\n    const minimumRoofSlope = minimumSlopeForSelectedAttachment === undefined ? 0 : minimumSlopeForSelectedAttachment;\n\n    let selectedSlope = \"\";\n    if (\n      this.roofSlopesTarget.value !== \"\" &&\n      this.roofAttachment !== \"\" &&\n      currentRoofSlope >= minimumSlopeForSelectedAttachment\n    ) {\n      selectedSlope = currentRoofSlope;\n    }\n\n    const opts = this.roofSlopes\n      .filter((opt) => opt[1] >= minimumRoofSlope)\n      .map((opt) => [opt[0], opt[1], false, opt[1] === selectedSlope]);\n\n    addOptionsToSelect(opts, this.roofSlopesTarget, true, \"- set slope -\");\n  }\n\n  #toggleRoofAttachmentsInInfoPopup(_event) {\n    const dialog = document.querySelector(\"[data-dialog-identifier=info-popup-pr-roof-attachment]\");\n    const sections = dialog.querySelectorAll(\"[data-roof-attachment]\");\n    if (this.isRoofAttachmentEmpty) return;\n\n    const showSelector = `[data-roof-attachment=${this.roofAttachment}]`;\n\n    for (let section of sections) {\n      const sectionRailPlatforms = section.dataset.railPlatforms;\n      let showSection;\n      if (!sectionRailPlatforms) {\n        showSection = section.matches(showSelector);\n      } else {\n        showSection = section.matches(showSelector) && JSON.parse(sectionRailPlatforms).includes(this.railPlatform);\n      }\n      section.style.display = showSection ? \"block\" : \"none\";\n    }\n  }\n\n  #toggleTileDeckFlashingInfoPopup(_event) {\n    const dialog = document.querySelector(\"[data-dialog-identifier=info-popup-pr-tile-deck-flashing]\");\n\n    if (this.roofAttachment === \"ko_f\") {\n      dialog.querySelector(\"[data-tile-hook-deck-flashing=false]\").style.display = \"block\";\n      dialog.querySelector(\"[data-tile-hook-deck-flashing=true]\").style.display = \"none\";\n    } else {\n      dialog.querySelector(\"[data-tile-hook-deck-flashing=false]\").style.display = \"none\";\n      dialog.querySelector(\"[data-tile-hook-deck-flashing=true]\").style.display = \"block\";\n    }\n  }\n\n  #disableRoofAttachmentsIfNeeded() {\n    this.roofAttachmentSelectTarget.disabled =\n      (this.isMetalShingle && this.isShingleAndFlashingTypeEmpty) || this.roofMaterial === \"\";\n  }\n\n  #toggleSubText() {\n    this.toggleRoofAttachmentHint();\n\n    if (this.hasCorruslideSubTextTarget) {\n      animate.toggle(\n        this.corruslideSubTextTarget,\n        this.roofAttachment === \"corruslide\" && this.corruslideRequirementsAccepted,\n      );\n    }\n  }\n\n  toggleRoofMaterialInfoPopup() {\n    if (this.roofMaterial === \"\") {\n      this.roofMaterialInfoPopupTarget.classList.add(\"d-none\");\n      return;\n    }\n\n    const dialog = document.querySelector(\"[data-dialog-identifier=info-popup-pr-roof-material]\");\n    const sections = dialog.querySelectorAll(\"[data-roof-material]\");\n\n    let showSelector = `[data-roof-material=${this.roofMaterial}]`;\n    let sectionMatchExists = false;\n\n    for (let section of sections) {\n      if (section.matches(showSelector)) {\n        section.style.display = \"block\";\n        sectionMatchExists = true;\n      } else {\n        section.style.display = \"none\";\n      }\n    }\n\n    if (sectionMatchExists) {\n      this.roofMaterialInfoPopupTarget.classList.remove(\"d-none\");\n    } else {\n      hideDialog(dialog);\n      this.roofMaterialInfoPopupTarget.classList.add(\"d-none\");\n    }\n  }\n\n  roofAttachmentToSpecificGravities() {\n    return this.flpa3ProjectValue\n      ? this.flpa3RoofAttachmentToSpecificGravitiesValue\n      : this.roofAttachmentToSpecificGravitiesValue;\n  }\n\n  get corruslideRequirementsAccepted() {\n    if (!this.hasCorruslideRequirementsAcceptedAtFieldTarget) {\n      return false; // The PR Preset form does not show the acceptance dialog\n    }\n    return !!this.corruslideRequirementsAcceptedAtFieldTarget.value;\n  }\n\n  showCorruslideRequirementsDialogIfNeeded() {\n    const dialogExists = document.querySelector(\"[data-dialog-identifier='pr-corruslide-requirements-dialog']\"); // Not shown on the PR presets page\n    if (dialogExists && this.roofAttachment === \"corruslide\" && !this.corruslideRequirementsAccepted) {\n      showDialogWithIdentifier(\"pr-corruslide-requirements-dialog\");\n    }\n  }\n\n  acceptCorruslideRequirements() {\n    const now = new Date().toISOString();\n    this.corruslideRequirementsAcceptedAtFieldTarget.value = now;\n\n    this.#toggleSubText();\n  }\n\n  resetAttachmentSelection() {\n    this.roofAttachmentSelectTarget.value = \"\";\n\n    // Trigger the change event to update dependent UI elements\n    this.changeRoofAttachment();\n  }\n\n  toggleQuickGrip() {\n    if (!this.hasQuickGripContainerTarget) return;\n\n    // Show/hide only \u2014 don't mutate the radio state. Leaving the user's\n    // last quick_grip choice in the submitted form lets Pr::Details::FieldDependencyManager\n    // clear it server-side and emit the \"QuickGrip cleared\" warning message.\n    const show = this.quickGripCompatibleAttachmentsValue.includes(this.roofAttachment);\n    animate.toggle(this.quickGripContainerTarget, show);\n  }\n\n  changeQuickGrip() {\n    if (!this.hasQuickGripRadioYesTarget || !this.quickGripRadioYesTarget.checked) return;\n    if (this.#quickGripAcknowledged) return;\n\n    showDialogWithIdentifier(\"pr-quick-grip-dialog\");\n  }\n\n  acceptQuickGrip() {\n    if (this.quickGripStorageKeyValue === \"\") return;\n    window.localStorage.setItem(this.quickGripStorageKeyValue, \"acknowledged\");\n  }\n\n  declineQuickGrip() {\n    if (this.hasQuickGripRadioNoTarget) {\n      this.quickGripRadioNoTarget.checked = true;\n    }\n  }\n\n  get #quickGripAcknowledged() {\n    if (this.quickGripStorageKeyValue === \"\") return false;\n    return window.localStorage.getItem(this.quickGripStorageKeyValue) === \"acknowledged\";\n  }\n}\n", "import { alertDialog } from \"../components/ir_dialog/helper\";\n\nexport function critterGuardRemovesContourAlert() {\n  alertDialog(\n    \"You can not use Critter Guard and Contour at the same time.  If you have added Contour, it will be removed when you save.\",\n    () => {},\n    { title: \"Warning\", headerColor: \"orange\" },\n  );\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport { critterGuardRemovesContourAlert } from \"./helper\";\n\nexport default class extends Controller {\n  static targets = [\"useCritterGuardYes\", \"useCritterGuardNo\"];\n\n  changeUseCritterGuard(_event) {\n    const yesRadio = this.useCritterGuardYesTarget;\n\n    if (!yesRadio.checked) return;\n\n    critterGuardRemovesContourAlert();\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport { Form } from \"../../helpers/form\";\n\nexport default class extends Controller {\n  change(event) {\n    const select = event.currentTarget;\n    const url = select.value;\n    Form.patch(url, {}, { remote: true });\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\n\nexport default class extends Controller {\n  static targets = [\n    \"roofSlopeSelect\",\n    \"rafterSpacingField\",\n    \"conduitMountsSelect\",\n    \"qmTileReplacementFlashingForTileHooksYes\",\n    \"qmTileReplacementFlashingForTileHooksNo\",\n    \"qmTileDeckFlashingYes\",\n    \"qmTileDeckFlashingNo\",\n    \"qmConduitMountsForTileSelect\",\n    \"qmConduitMountPenetrationFlashingForTileYes\",\n    \"qmConduitMountPenetrationFlashingForTileNo\",\n    \"heightField\",\n  ];\n\n  connect() {\n    this.defaultData = JSON.parse(this.element.dataset.projectDetail);\n    this.#toggleTileDeckFlashingInfoPopup();\n  }\n\n  applyDefaults(event) {\n    event.preventDefault();\n\n    if (this.hasHeightFieldTarget) {\n      this.heightFieldTarget.value = this.defaultData.buildingHeight;\n    }\n\n    if (this.hasRoofSlopeSelectTarget) {\n      this.roofSlopeSelectTarget.value = this.defaultData.roofSlope;\n    }\n\n    if (this.hasRafterSpacingFieldTarget) {\n      this.rafterSpacingFieldTarget.value = this.defaultData.defaultRafterSpacing;\n    }\n\n    if (this.hasConduitMountsSelectTarget) {\n      this.conduitMountsSelectTarget.value = this.defaultData.conduitMounts;\n    }\n\n    this.yesNoRadioDefaultCheck(\"qmTileReplacementFlashingForTileHooks\");\n    this.yesNoRadioDefaultCheck(\"qmTileDeckFlashing\");\n    if (this.defaultData.qmConduitMountsForTile !== \"\") {\n      this.qmConduitMountsForTileSelectTarget.value = this.defaultData.qmConduitMountsForTile;\n    }\n\n    if (this.hasRoofSlopeSelectTarget) {\n      // Trigger dirty tracking to show the save button\n      const changeEvent = new CustomEvent(\"change\", { bubbles: true });\n      this.roofSlopeSelectTarget.dispatchEvent(changeEvent);\n    }\n  }\n\n  yesNoRadioDefaultCheck(baseName) {\n    if (!this.hasTarget(`${baseName}YesTarget`)) return;\n\n    const defaultValue = this.defaultData[baseName];\n    const yesRadio = this[`${baseName}YesTarget`];\n    const noRadio = this[`${baseName}NoTarget`];\n\n    if (defaultValue) {\n      yesRadio.checked = true;\n    } else {\n      noRadio.checked = true;\n    }\n  }\n\n  hasTarget(name) {\n    return this[`has${name.charAt(0).toUpperCase() + name.slice(1)}`];\n  }\n\n  #toggleTileDeckFlashingInfoPopup() {\n    const roofAttachment = this.defaultData.roofAttachment;\n\n    if (this.hasQmTileDeckFlashingYesTarget) {\n      const dialog = document.querySelector(\"[data-dialog-identifier=info-popup-pr-tile-deck-flashing]\");\n      if (roofAttachment === \"ko_f\") {\n        dialog.querySelector(\"[data-tile-hook-deck-flashing=false]\").style.display = \"block\";\n        dialog.querySelector(\"[data-tile-hook-deck-flashing=true]\").style.display = \"none\";\n      } else {\n        dialog.querySelector(\"[data-tile-hook-deck-flashing=true]\").style.display = \"block\";\n        dialog.querySelector(\"[data-tile-hook-deck-flashing=false]\").style.display = \"none\";\n      }\n    }\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\n\nimport { GRAPHICAL_TOOL_EDITOR_MODE_LAYOUT, storeEditorMode } from \"../../helpers/graphical-tool-helpers\";\nimport { critterGuardRemovesContourAlert } from \"./helper\";\n\nexport default class extends Controller {\n  static values = {\n    roofSectionId: Number,\n  };\n\n  static targets = [\"useCritterGuardYes\", \"useCritterGuardNo\"];\n\n  changeUseCritterGuard(_event) {\n    const yesRadio = this.useCritterGuardYesTarget;\n\n    if (!yesRadio.checked) return;\n\n    critterGuardRemovesContourAlert();\n\n    storeEditorMode({\n      roofSectionId: this.roofSectionIdValue,\n      editorMode: GRAPHICAL_TOOL_EDITOR_MODE_LAYOUT,\n    });\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport * as animate from \"../../helpers/animate\";\n\nexport default class extends Controller {\n  static targets = [\"segmentForm\", \"submitBtn\", \"submitBtnContainer\", \"segmentsPayload\"];\n\n  connect() {\n    this.element.controller = this;\n  }\n\n  saveAll() {\n    this.collectSavableForms();\n    this.buildPayload();\n    this.savePayloadIntoForm();\n  }\n\n  collectSavableForms() {\n    this.savableForms = this.segmentFormTargets.filter((form) => {\n      const submitBtnContainer = form.querySelector(\".submit-btn-container\");\n      return submitBtnContainer.style.display === \"block\";\n    });\n  }\n\n  buildPayload() {\n    this.payload = this.savableForms.map((form) => {\n      const id = form.querySelector(\"[data-identifier='pr-segment-id']\").dataset.value;\n      const rows = form.querySelector(\"[data-identifier='pr-segment-rows']\").value;\n      const columns = form.querySelector(\"[data-identifier='pr-segment-columns']\").value;\n      const number_of_arrays = form.querySelector(\"[data-identifier='pr-segment-number-of-arrays']\").value;\n\n      return { id, rows, columns, number_of_arrays };\n    });\n  }\n\n  savePayloadIntoForm() {\n    this.segmentsPayloadTarget.value = JSON.stringify(this.payload);\n  }\n\n  dirtied() {\n    const btnContainer = this.submitBtnContainerTarget;\n    if (btnContainer.style.display === \"none\") {\n      animate.show(btnContainer);\n    }\n  }\n\n  resetSaveAllBtn() {\n    this.collectSavableForms();\n    if (!this.savableForms.length) {\n      animate.hide(this.submitBtnContainerTarget);\n    }\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport debounce from \"lodash/debounce\";\n\nimport { showDialog } from \"./components/ir_dialog/helper\";\nimport { logger } from \"../helpers/app\";\n\nexport default class ProjectUpdatedNoticeController extends Controller {\n  static values = {\n    projectId: Number,\n    updatingTabId: String,\n  };\n\n  static show(_projectId, updatingTabId, currentTabId) {\n    logger(`[tabId] from sessionStorage: ${currentTabId}`);\n    logger(`[tabId] from project updated broadcast: ${updatingTabId}`);\n\n    if (updatingTabId === currentTabId) return;\n\n    showDialog(\"project-updated-notice-dialog\");\n  }\n\n  static debouncedShow = debounce(ProjectUpdatedNoticeController.show, 1000);\n\n  connect() {\n    ProjectUpdatedNoticeController.debouncedShow(this.projectIdValue, this.updatingTabIdValue, this.currentTabId);\n  }\n\n  get updatingTabId() {\n    return this.updatingTabIdValue;\n  }\n\n  get currentTabId() {\n    return window.sessionStorage.getItem(\"tabId\");\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\n\nexport default class extends Controller {\n  click(_event) {\n    window.scrollTo({ top: \"0\", behavior: \"smooth\" });\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\n\nexport default class extends Controller {\n  static targets = [\"warning\", \"moduleSizeConfirmationRadioYes\", \"moduleSizeConfirmationRadioNo\"];\n\n  toggleWarning() {\n    this.warningTarget.classList.toggle(\"d-none\", !this.moduleSizeConfirmationRadioNoTarget.checked);\n  }\n\n  selectYes() {\n    this.moduleSizeConfirmationRadioYesTarget.checked = true;\n    this.moduleSizeConfirmationRadioYesTarget.dispatchEvent(new Event(\"change\", { bubbles: true }));\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport { hideDialog } from \"../components/ir_dialog/helper\";\n\nexport default class extends Controller {\n  static outlets = [\"sk--module-size-confirmation\"];\n\n  confirmCompatible() {\n    this.skModuleSizeConfirmationOutlet.selectYes();\n    this.closeDialog();\n  }\n\n  closeDialog() {\n    const dialogElement = this.element.closest(\"[data-dialog-identifier]\");\n    hideDialog(dialogElement);\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport * as animate from \"../../helpers/animate\";\n\nexport default class extends Controller {\n  static targets = [\"segmentForm\", \"submitBtnContainer\", \"segmentsPayload\"];\n\n  saveAll() {\n    this.collectSavableForms();\n    this.buildPayload();\n    this.segmentsPayloadTarget.value = JSON.stringify(this.payload);\n  }\n\n  segmentFormTargetConnected() {\n    if (!this.hasSubmitBtnContainerTarget) return;\n\n    this.collectSavableForms();\n    if (this.savableForms.length === 0) {\n      animate.hide(this.submitBtnContainerTarget);\n    }\n  }\n\n  dirtied() {\n    const btnContainer = this.submitBtnContainerTarget;\n    if (btnContainer.style.display === \"none\") {\n      animate.show(btnContainer);\n    }\n  }\n\n  collectSavableForms() {\n    this.savableForms = this.segmentFormTargets.filter((form) => {\n      const submitBtnContainer = form.querySelector(\".submit-btn-container\");\n      return submitBtnContainer && submitBtnContainer.style.display === \"block\";\n    });\n  }\n\n  buildPayload() {\n    this.payload = this.savableForms.map((form) => {\n      const id = form.querySelector(\"[data-identifier='sk-segment-id']\").dataset.value;\n      const rows = form.querySelector(\"[data-identifier='sk-segment-rows']\").value;\n      const columns = form.querySelector(\"[data-identifier='sk-segment-columns']\").value;\n      const orientation = form.querySelector(\"input[name='sk_segment[orientation]']:checked\").value;\n\n      return { id, rows, columns, orientation };\n    });\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\n\nexport default class extends Controller {\n  static targets = [\"row\", \"deleteButton\"];\n\n  connect() {\n    this.updateDeleteButtons();\n  }\n\n  rowTargetConnected() {\n    this.updateDeleteButtons();\n  }\n\n  rowTargetDisconnected() {\n    this.updateDeleteButtons();\n  }\n\n  updateDeleteButtons() {\n    const showDeleteButtons = this.rowTargets.length > 1;\n\n    this.deleteButtonTargets.forEach((button) => {\n      button.classList.toggle(\"d-none\", !showDeleteButtons);\n    });\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport { v4 as uuid } from \"uuid\";\n\nimport { logger } from \"../helpers/app\";\nimport { addTabIdToForm } from \"../helpers/form\";\n\nconst WINDOW_NAME_PREFIX = \"ir-tab:\";\n\nexport default class extends Controller {\n  headerName = \"X-Tab-Id\";\n\n  connect() {\n    this.ensureTabId();\n\n    document.addEventListener(\"turbo:before-fetch-request\", this.#onTurboBeforeFetch);\n    document.addEventListener(\"ajax:beforeSend\", this.#onAjaxBeforeSend);\n    document.addEventListener(\"submit\", this.#onFormSubmit);\n  }\n\n  disconnect() {\n    document.removeEventListener(\"turbo:before-fetch-request\", this.#onTurboBeforeFetch);\n    document.removeEventListener(\"ajax:beforeSend\", this.#onAjaxBeforeSend);\n    document.removeEventListener(\"submit\", this.#onFormSubmit);\n  }\n\n  ensureTabId() {\n    const storedTabId = window.sessionStorage.getItem(\"tabId\");\n    const expectedWindowName = storedTabId ? `${WINDOW_NAME_PREFIX}${storedTabId}` : null;\n\n    // Chrome's Duplicate Tab copies sessionStorage but does NOT copy\n    // window.name. A storedTabId without a matching window.name means this\n    // window inherited a stale id from the source tab; regenerate so the\n    // two tabs don't share an id and suppress each other's broadcasts.\n    if (storedTabId && window.name === expectedWindowName) {\n      this.tabId = storedTabId;\n      return;\n    }\n\n    const tabId = uuid();\n    logger(`[tabId] setting in sessionStorage: ${tabId}`);\n    window.sessionStorage.setItem(\"tabId\", tabId);\n    window.name = `${WINDOW_NAME_PREFIX}${tabId}`;\n    this.tabId = tabId;\n  }\n\n  // Using class fields with the # syntax for private methods\n  // so they're automatically bound to 'this' (arrow functions),\n  // which makes event removal simpler.\n  #onTurboBeforeFetch = (event) => {\n    logger(\"[tabId] in turbo:before-fetch-request handler\");\n    const { fetchOptions } = event.detail;\n    fetchOptions.headers[this.headerName] = this.tabId;\n  };\n\n  #onAjaxBeforeSend = (event) => {\n    const [xhr, options] = event.detail;\n    logger(\"[tabId] in ajax:beforeSend handler\", xhr, options);\n    // setRequestHeader concatenates if called multiple times\n    if (!xhr.tabIdSet) {\n      xhr.setRequestHeader(this.headerName, this.tabId);\n      xhr.tabIdSet = true;\n    }\n  };\n\n  #onFormSubmit = (event) => {\n    const form = event.target;\n    logger(\"[tabId] in onFormSubmit\");\n\n    const turboDisabledForForm =\n      form.getAttribute(\"data-turbo\") === \"false\" || form.querySelector('button[data-turbo=\"false\"]') !== null;\n\n    const isRemoteForm = form.dataset.remote === \"true\";\n\n    if (!turboDisabledForForm || isRemoteForm) return;\n\n    logger(\"[tabId] adding tabId to form\");\n    addTabIdToForm(form);\n  };\n}\n", "import { Controller } from \"@hotwired/stimulus\";\n\nexport default class extends Controller {\n  toggleSelect(event) {\n    const checkbox = event.currentTarget;\n    const tr = checkbox.closest(\"tr\");\n    this.toggleTrStyle(checkbox, tr);\n  }\n\n  toggleTrStyle(checkbox, tr) {\n    const meth = checkbox.checked ? \"add\" : \"remove\";\n    tr.classList[meth](\"selected\");\n  }\n\n  toggleSelectAll(event) {\n    const checkbox = event.currentTarget;\n    const table = checkbox.closest(\"table\");\n    const trs = table.querySelectorAll(\"tbody tr\");\n    trs.forEach((tr) => {\n      const trCheckbox = tr.querySelector(\"input[type=checkbox]\");\n      trCheckbox.checked = checkbox.checked;\n      this.toggleTrStyle(trCheckbox, tr);\n    });\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport * as store from \"../helpers/local-store\";\n\nexport default class extends Controller {\n  static values = {\n    userUuid: String,\n    isAuroraProject: Boolean,\n  };\n\n  submit(event) {\n    event.preventDefault();\n\n    if (this.isAuroraProjectValue) {\n      const timestampInSeconds = Math.floor(new Date().getTime() / 1000);\n      store.set(`${this.userUuidValue}-termsOfServiceAcceptedAt`, timestampInSeconds);\n    }\n\n    this.element.requestSubmit();\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\n\nexport default class extends Controller {\n  static targets = [\"uploadButton\", \"fileInput\"];\n\n  click(event) {\n    event.preventDefault();\n    this.fileInputTarget.click();\n  }\n\n  submit(event) {\n    event.preventDefault();\n    this.uploadButtonTarget.classList.add(\"ir-btn--spinner-shown\");\n    this.uploadButtonTarget.disabled = true;\n\n    setTimeout(() => {\n      this.element.requestSubmit();\n    }, 500);\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\n\nexport default class extends Controller {\n  static values = { url: String };\n\n  connect() {\n    location.href = this.urlValue;\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\n\nconst SEARCH_DEBOUNCE_MS = 200;\nconst HTTP_OK = 200;\n\nexport default class extends Controller {\n  static targets = [\n    \"searchField\",\n    \"searchResults\",\n    \"recipientInput\",\n    \"selectedDisplay\",\n    \"selectedContainer\",\n    \"submitButton\",\n  ];\n  static values = { basePath: String };\n\n  #timer = null;\n\n  connect() {\n    if (this.hasSubmitButtonTarget) this.submitButtonTarget.disabled = true;\n  }\n\n  disconnect() {\n    if (this.#timer) clearTimeout(this.#timer);\n  }\n\n  search() {\n    if (this.#timer) clearTimeout(this.#timer);\n    this.#timer = setTimeout(() => this.#fetchResults(), SEARCH_DEBOUNCE_MS);\n  }\n\n  select(event) {\n    event.preventDefault();\n    const { email, name } = event.params;\n    this.recipientInputTarget.value = email;\n    this.selectedDisplayTarget.textContent = `${name} (${email})`;\n    if (this.hasSelectedContainerTarget) this.selectedContainerTarget.hidden = false;\n    this.searchResultsTarget.innerHTML = \"\";\n    this.searchFieldTarget.value = \"\";\n    if (this.hasSubmitButtonTarget) this.submitButtonTarget.disabled = false;\n  }\n\n  async #fetchResults() {\n    const query = this.searchFieldTarget.value;\n    if (!query) {\n      this.searchResultsTarget.innerHTML = \"\";\n      return;\n    }\n    const url = `${this.basePathValue}?query=${encodeURIComponent(query)}`;\n    const response = await fetch(url, {\n      headers: { Accept: \"text/vnd.turbo-stream.html\" },\n    });\n    if (response.status !== HTTP_OK) return;\n    const html = await response.text();\n    window.Turbo.renderStreamMessage(html);\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport { addOptionsToSelect } from \"../../helpers/form\";\nimport * as animate from \"../../helpers/animate\";\n\nexport default class DaController extends Controller {\n  static values = {\n    railPlatformRailTypeValues: Object,\n    railPlatformChangeRailTypeMapping: Object,\n    railTypesFinishes: Object,\n    railTypesDefaultFinish: Object,\n  };\n  static outlets = [\"da--rail-lengths\"];\n\n  static targets = [\"railTypeSelect\", \"railFinishClear\", \"railFinishMill\", \"railFinishBlack\"];\n\n  changeRailPlatform(event) {\n    const railPlatform = event.currentTarget.value;\n    const railTypeValues = this.railPlatformRailTypeValuesValue[railPlatform];\n    const currentRailType = this.railTypeSelectTarget.value;\n    const newRailType = this.railPlatformChangeRailTypeMappingValue[railPlatform][currentRailType];\n    const opts = railTypeValues.map((rt) => [rt, rt, false, newRailType === rt]);\n    addOptionsToSelect(opts, this.railTypeSelectTarget);\n    this.daRailLengthsOutlet.changeRailType();\n    this.updateRailFinishes(newRailType);\n  }\n\n  updateRailFinishes(railType) {\n    const clearTarget = this.railFinishClearTarget;\n    const millTarget = this.railFinishMillTarget;\n    const blackTarget = this.railFinishBlackTarget;\n\n    const clearInput = clearTarget.querySelector(\"input\");\n    const millInput = millTarget.querySelector(\"input\");\n    const blackInput = blackTarget.querySelector(\"input\");\n\n    const availableFinishes = this.railTypesFinishesValue[railType];\n    const defaultFinish = this.railTypesDefaultFinishValue[railType];\n\n    const allowsClearFinish = availableFinishes.includes(\"clear\");\n    const allowsMillFinish = availableFinishes.includes(\"mill\");\n    const allowsBlackFinish = availableFinishes.includes(\"black\");\n\n    const currentFinish = this.#currentFinish(clearInput, millInput, blackInput);\n    if (currentFinish === \"black\") {\n      if (!allowsBlackFinish) {\n        // If you were using black & you're not allowed to use black with the new rail\n        // then switch to the rail's default finish\n        this.#setToDefaultFinish(defaultFinish, clearInput, millInput, blackInput);\n      }\n    } else {\n      // If you switch from XR1000 (which is mill only) and we left you in mill, then\n      // you'd be getting a custom finish / custom rail which is probably not what you\n      // want.\n      if (currentFinish !== defaultFinish) {\n        this.#setToDefaultFinish(defaultFinish, clearInput, millInput, blackInput);\n      }\n    }\n\n    this.#showHideFinishOption(allowsClearFinish, clearTarget, clearInput);\n    this.#showHideFinishOption(allowsMillFinish, millTarget, millInput);\n    this.#showHideFinishOption(allowsBlackFinish, blackTarget, blackInput);\n  }\n\n  #currentFinish(clearInput, millInput, blackInput) {\n    if (clearInput.checked) return \"clear\";\n    if (millInput.checked) return \"mill\";\n    if (blackInput.checked) return \"black\";\n  }\n\n  #setToDefaultFinish(defaultFinish, clearInput, millInput, blackInput) {\n    clearInput.checked = defaultFinish === \"clear\";\n    millInput.checked = defaultFinish === \"mill\";\n    blackInput.checked = defaultFinish === \"black\";\n  }\n\n  #showHideFinishOption(allowed, target, input) {\n    if (allowed) {\n      animate.show(target);\n    } else {\n      input.checked = false;\n      target.classList.add(\"d-none\");\n    }\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport * as animate from \"../../helpers/animate\";\n\nexport default class extends Controller {\n  static targets = [\n    \"ewPierSpanContainer\",\n    \"foundationTypeSelect\",\n    \"ewPierSpanTypeCustomCheckbox\",\n    \"customEwPierSpanFieldContainer\",\n    \"customEwPierSpanLabel\",\n  ];\n\n  foundationChanged(_event) {\n    if (this.foundationTypeSelectTarget.value === \"other\") {\n      animate.hide(this.ewPierSpanContainerTarget, { fadeOut: false });\n      animate.show(this.customEwPierSpanFieldContainerTarget);\n      this.ewPierSpanTypeCustomCheckboxTarget.checked = true;\n      this.customEwPierSpanLabelTarget.innerHTML = \"E/W pier span\";\n    } else {\n      animate.show(this.ewPierSpanContainerTarget);\n      this.customEwPierSpanLabelTarget.innerHTML = \"Custom\";\n    }\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport { showDialog } from \"../components/ir_dialog/helper\";\n\nexport default class extends Controller {\n  openDialog(event) {\n    event.preventDefault();\n\n    // Get the path from the clicked link\n    const path = event.currentTarget.dataset.warrantyPath;\n\n    // Update the proceed button URL\n    // Note: Using getElementById here because the proceed button is in a dialog component\n    // that's rendered outside of this controller's scope. The dialog is a reusable\n    // component rendered at the page level, not within this controller's element.\n    const proceedButton = document.getElementById(\"warranty-proceed-button\");\n    proceedButton.href = path;\n\n    // Show the dialog\n    showDialog(\"warranty-installation-warning-dialog\");\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\n\nexport default class extends Controller {\n  static targets = [\n    \"placeOfPurchaseField\",\n    \"placeOfPurchaseSelect\",\n    \"placeOfPurchaseOtherField\",\n    \"placeOfPurchaseOtherInput\",\n  ];\n\n  changePlaceOfPurchase(event) {\n    const selectedValue = event.target.value;\n\n    if (selectedValue === \"Other\") {\n      this.placeOfPurchaseOtherFieldTarget.style.display = \"\";\n      this.placeOfPurchaseOtherInputTarget.value = \"\";\n      this.placeOfPurchaseFieldTarget.value = \"\";\n      this.placeOfPurchaseOtherInputTarget.focus();\n    } else {\n      this.placeOfPurchaseOtherFieldTarget.style.display = \"none\";\n      this.placeOfPurchaseFieldTarget.value = selectedValue;\n    }\n  }\n\n  updatePlaceOfPurchase(event) {\n    this.placeOfPurchaseFieldTarget.value = event.target.value;\n  }\n}\n", "// This file is auto-generated by ./bin/rails stimulus:manifest:update\n// Run that command whenever you add a new controller or create them with\n// ./bin/rails generate stimulus controllerName\n\nimport { application } from \"./application\";\n\nimport Admin__IntroductionsFormController from \"./admin/introductions_form_controller\";\napplication.register(\"admin--introductions-form\", Admin__IntroductionsFormController);\n\nimport Admin__PaymentRequestFormController from \"./admin/payment_request_form_controller\";\napplication.register(\"admin--payment-request-form\", Admin__PaymentRequestFormController);\n\nimport Aurora__AutoSubmitInitiationFormController from \"./aurora/auto_submit_initiation_form_controller\";\napplication.register(\"aurora--auto-submit-initiation-form\", Aurora__AutoSubmitInitiationFormController);\n\nimport AutoCompleteCheckboxController from \"./auto_complete_checkbox_controller\";\napplication.register(\"auto-complete-checkbox\", AutoCompleteCheckboxController);\n\nimport AutoFormSubmitController from \"./auto_form_submit_controller\";\napplication.register(\"auto-form-submit\", AutoFormSubmitController);\n\nimport AutoSearchController from \"./auto_search_controller\";\napplication.register(\"auto-search\", AutoSearchController);\n\nimport Bx__BlockSizeController from \"./bx/block_size_controller\";\napplication.register(\"bx--block-size\", Bx__BlockSizeController);\n\nimport Bx__BuildingClassController from \"./bx/building_class_controller\";\napplication.register(\"bx--building-class\", Bx__BuildingClassController);\n\nimport Bx__BuildingHeightController from \"./bx/building_height_controller\";\napplication.register(\"bx--building-height\", Bx__BuildingHeightController);\n\nimport Bx__ExcessLoadsController from \"./bx/excess_loads_controller\";\napplication.register(\"bx--excess-loads\", Bx__ExcessLoadsController);\n\nimport Bx__LayoutEditor__AzimuthManagementController from \"./bx/layout_editor/azimuth_management_controller\";\napplication.register(\"bx--layout-editor--azimuth-management\", Bx__LayoutEditor__AzimuthManagementController);\n\nimport Bx__LayoutEditor__GuideLinesFormController from \"./bx/layout_editor/guide_lines_form_controller\";\napplication.register(\"bx--layout-editor--guide-lines-form\", Bx__LayoutEditor__GuideLinesFormController);\n\nimport Bx__LayoutEditor__MapBaseController from \"./bx/layout_editor/map_base_controller\";\napplication.register(\"bx--layout-editor--map-base\", Bx__LayoutEditor__MapBaseController);\n\nimport Bx__LayoutEditor__MapEditArrayController from \"./bx/layout_editor/map_edit_array_controller\";\napplication.register(\"bx--layout-editor--map-edit-array\", Bx__LayoutEditor__MapEditArrayController);\n\nimport Bx__LayoutEditor__MapObstructionsController from \"./bx/layout_editor/map_obstructions_controller\";\napplication.register(\"bx--layout-editor--map-obstructions\", Bx__LayoutEditor__MapObstructionsController);\n\nimport Bx__LayoutEditor__MapRoofPlanesAndSectionsController from \"./bx/layout_editor/map_roof_planes_and_sections_controller\";\napplication.register(\n  \"bx--layout-editor--map-roof-planes-and-sections\",\n  Bx__LayoutEditor__MapRoofPlanesAndSectionsController,\n);\n\nimport Bx__LayoutEditor__MapRoofPlanesController from \"./bx/layout_editor/map_roof_planes_controller\";\napplication.register(\"bx--layout-editor--map-roof-planes\", Bx__LayoutEditor__MapRoofPlanesController);\n\nimport Bx__LayoutEditor__MapRoofSectionsController from \"./bx/layout_editor/map_roof_sections_controller\";\napplication.register(\"bx--layout-editor--map-roof-sections\", Bx__LayoutEditor__MapRoofSectionsController);\n\nimport Bx__LayoutEditor__MapViewOnlyController from \"./bx/layout_editor/map_view_only_controller\";\napplication.register(\"bx--layout-editor--map-view-only\", Bx__LayoutEditor__MapViewOnlyController);\n\nimport Bx__LayoutEditor__ObstructionHeightsFormController from \"./bx/layout_editor/obstruction_heights_form_controller\";\napplication.register(\"bx--layout-editor--obstruction-heights-form\", Bx__LayoutEditor__ObstructionHeightsFormController);\n\nimport Bx__LayoutEditor__RestoreRoofSectionDefaultsController from \"./bx/layout_editor/restore_roof_section_defaults_controller\";\napplication.register(\n  \"bx--layout-editor--restore-roof-section-defaults\",\n  Bx__LayoutEditor__RestoreRoofSectionDefaultsController,\n);\n\nimport Bx__LayoutEditor__RoofPlanesPropertiesController from \"./bx/layout_editor/roof_planes_properties_controller\";\napplication.register(\"bx--layout-editor--roof-planes-properties\", Bx__LayoutEditor__RoofPlanesPropertiesController);\n\nimport Bx__MapProjectReportController from \"./bx/map_project_report_controller\";\napplication.register(\"bx--map-project-report\", Bx__MapProjectReportController);\n\nimport Bx__PowerElectronicsController from \"./bx/power_electronics_controller\";\napplication.register(\"bx--power-electronics\", Bx__PowerElectronicsController);\n\nimport Bx__ResultsController from \"./bx/results_controller\";\napplication.register(\"bx--results\", Bx__ResultsController);\n\nimport ClickSubmitController from \"./click_submit_controller\";\napplication.register(\"click-submit\", ClickSubmitController);\n\nimport CompanyJoinRequestsController from \"./company_join_requests_controller\";\napplication.register(\"company-join-requests\", CompanyJoinRequestsController);\n\nimport CompanySwitchedNoticeController from \"./company_switched_notice_controller\";\napplication.register(\"company-switched-notice\", CompanySwitchedNoticeController);\n\nimport Components__FireTypeRatingWarningController from \"./components/fire_type_rating_warning_controller\";\napplication.register(\"components--fire-type-rating-warning\", Components__FireTypeRatingWarningController);\n\nimport Components__IrAlertController from \"./components/ir_alert_controller\";\napplication.register(\"components--ir-alert\", Components__IrAlertController);\n\nimport Components__IrAutoGrowTextareaController from \"./components/ir_auto_grow_textarea_controller\";\napplication.register(\"components--ir-auto-grow-textarea\", Components__IrAutoGrowTextareaController);\n\nimport Components__IrBtnSpinnerController from \"./components/ir_btn_spinner_controller\";\napplication.register(\"components--ir-btn-spinner\", Components__IrBtnSpinnerController);\n\nimport Components__IrCarouselController from \"./components/ir_carousel_controller\";\napplication.register(\"components--ir-carousel\", Components__IrCarouselController);\n\nimport Components__IrClipboardController from \"./components/ir_clipboard_controller\";\napplication.register(\"components--ir-clipboard\", Components__IrClipboardController);\n\nimport Components__IrConvertAndDisplayController from \"./components/ir_convert_and_display_controller\";\napplication.register(\"components--ir-convert-and-display\", Components__IrConvertAndDisplayController);\n\nimport Components__IrCountdownTimerController from \"./components/ir_countdown_timer_controller\";\napplication.register(\"components--ir-countdown-timer\", Components__IrCountdownTimerController);\n\nimport Components__IrDialog__BaseController from \"./components/ir_dialog/base_controller\";\napplication.register(\"components--ir-dialog--base\", Components__IrDialog__BaseController);\n\nimport Components__IrDialog__ConfirmationController from \"./components/ir_dialog/confirmation_controller\";\napplication.register(\"components--ir-dialog--confirmation\", Components__IrDialog__ConfirmationController);\n\nimport Components__IrDialog__ModalOverlayController from \"./components/ir_dialog/modal_overlay_controller\";\napplication.register(\"components--ir-dialog--modal-overlay\", Components__IrDialog__ModalOverlayController);\n\nimport Components__IrDialog__OpenerController from \"./components/ir_dialog/opener_controller\";\napplication.register(\"components--ir-dialog--opener\", Components__IrDialog__OpenerController);\n\nimport Components__IrDialog__TurboFrameDetailsController from \"./components/ir_dialog/turbo_frame_details_controller\";\napplication.register(\"components--ir-dialog--turbo-frame-details\", Components__IrDialog__TurboFrameDetailsController);\n\nimport Components__IrDirtyTrackerController from \"./components/ir_dirty_tracker_controller\";\napplication.register(\"components--ir-dirty-tracker\", Components__IrDirtyTrackerController);\n\nimport Components__IrFeetAndInchesFieldController from \"./components/ir_feet_and_inches_field_controller\";\napplication.register(\"components--ir-feet-and-inches-field\", Components__IrFeetAndInchesFieldController);\n\nimport Components__IrFileFieldController from \"./components/ir_file_field_controller\";\napplication.register(\"components--ir-file-field\", Components__IrFileFieldController);\n\nimport Components__IrFlashController from \"./components/ir_flash_controller\";\napplication.register(\"components--ir-flash\", Components__IrFlashController);\n\nimport Components__IrJsonDownloadController from \"./components/ir_json_download_controller\";\napplication.register(\"components--ir-json-download\", Components__IrJsonDownloadController);\n\nimport Components__IrMagnifierController from \"./components/ir_magnifier_controller\";\napplication.register(\"components--ir-magnifier\", Components__IrMagnifierController);\n\nimport Components__IrMultiSelectController from \"./components/ir_multi_select_controller\";\napplication.register(\"components--ir-multi-select\", Components__IrMultiSelectController);\n\nimport Components__IrNumberScrollController from \"./components/ir_number_scroll_controller\";\napplication.register(\"components--ir-number-scroll\", Components__IrNumberScrollController);\n\nimport Components__IrPerPageSwitcherController from \"./components/ir_per_page_switcher_controller\";\napplication.register(\"components--ir-per-page-switcher\", Components__IrPerPageSwitcherController);\n\nimport Components__IrSelectAllController from \"./components/ir_select_all_controller\";\napplication.register(\"components--ir-select-all\", Components__IrSelectAllController);\n\nimport Components__IrShowHideController from \"./components/ir_show_hide_controller\";\napplication.register(\"components--ir-show-hide\", Components__IrShowHideController);\n\nimport Components__IrSubmitBtnController from \"./components/ir_submit_btn_controller\";\napplication.register(\"components--ir-submit-btn\", Components__IrSubmitBtnController);\n\nimport Components__IrTabsController from \"./components/ir_tabs_controller\";\napplication.register(\"components--ir-tabs\", Components__IrTabsController);\n\nimport Components__IrTagsManagerController from \"./components/ir_tags_manager_controller\";\napplication.register(\"components--ir-tags-manager\", Components__IrTagsManagerController);\n\nimport Components__IrToggleController from \"./components/ir_toggle_controller\";\napplication.register(\"components--ir-toggle\", Components__IrToggleController);\n\nimport Components__IrTooltipController from \"./components/ir_tooltip_controller\";\napplication.register(\"components--ir-tooltip\", Components__IrTooltipController);\n\nimport Components__IrTrixEditorController from \"./components/ir_trix_editor_controller\";\napplication.register(\"components--ir-trix-editor\", Components__IrTrixEditorController);\n\nimport ComponentsIrBtnMenuController from \"./components__ir_btn_menu_controller\";\napplication.register(\"components--ir-btn-menu\", ComponentsIrBtnMenuController);\n\nimport Da__AddBtnController from \"./da/add_btn_controller\";\napplication.register(\"da--add-btn\", Da__AddBtnController);\n\nimport Da__AnchorScrollAdjustController from \"./da/anchor_scroll_adjust_controller\";\napplication.register(\"da--anchor-scroll-adjust\", Da__AnchorScrollAdjustController);\n\nimport Da__CantileverFixController from \"./da/cantilever_fix_controller\";\napplication.register(\"da--cantilever-fix\", Da__CantileverFixController);\n\nimport Da__CheckoutController from \"./da/checkout_controller\";\napplication.register(\"da--checkout\", Da__CheckoutController);\n\nimport Da__ContractorFieldsController from \"./da/contractor_fields_controller\";\napplication.register(\"da--contractor-fields\", Da__ContractorFieldsController);\n\nimport Da__CustomRailLengths__DialogController from \"./da/custom_rail_lengths/dialog_controller\";\napplication.register(\"da--custom-rail-lengths--dialog\", Da__CustomRailLengths__DialogController);\n\nimport Da__CustomRailLengths__DisplayController from \"./da/custom_rail_lengths/display_controller\";\napplication.register(\"da--custom-rail-lengths--display\", Da__CustomRailLengths__DisplayController);\n\nimport Da__DownloadProgressController from \"./da/download_progress_controller\";\napplication.register(\"da--download-progress\", Da__DownloadProgressController);\n\nimport Da__EndClampController from \"./da/end_clamp_controller\";\napplication.register(\"da--end-clamp\", Da__EndClampController);\n\nimport Da__FixedNavbarController from \"./da/fixed_navbar_controller\";\napplication.register(\"da--fixed-navbar\", Da__FixedNavbarController);\n\nimport Da__GraphicalLayoutToolController from \"./da/graphical_layout_tool_controller\";\napplication.register(\"da--graphical-layout-tool\", Da__GraphicalLayoutToolController);\n\nimport Da__GreenLancerController from \"./da/green_lancer_controller\";\napplication.register(\"da--green-lancer\", Da__GreenLancerController);\n\nimport Da__LargeProjectDialogController from \"./da/large_project_dialog_controller\";\napplication.register(\"da--large-project-dialog\", Da__LargeProjectDialogController);\n\nimport Da__LayoutEditor__AutoSaveController from \"./da/layout_editor/auto_save_controller\";\napplication.register(\"da--layout-editor--auto-save\", Da__LayoutEditor__AutoSaveController);\n\nimport Da__LayoutEditor__BtnFlyoutMenuController from \"./da/layout_editor/btn_flyout_menu_controller\";\napplication.register(\"da--layout-editor--btn-flyout-menu\", Da__LayoutEditor__BtnFlyoutMenuController);\n\nimport Da__LayoutEditor__BtnMultiselectGroupController from \"./da/layout_editor/btn_multiselect_group_controller\";\napplication.register(\"da--layout-editor--btn-multiselect-group\", Da__LayoutEditor__BtnMultiselectGroupController);\n\nimport Da__LayoutEditor__BtnSelectGroupController from \"./da/layout_editor/btn_select_group_controller\";\napplication.register(\"da--layout-editor--btn-select-group\", Da__LayoutEditor__BtnSelectGroupController);\n\nimport Da__LayoutEditor__BuildingImagesLockController from \"./da/layout_editor/building_images_lock_controller\";\napplication.register(\"da--layout-editor--building-images-lock\", Da__LayoutEditor__BuildingImagesLockController);\n\nimport Da__LayoutEditor__ManualScaleBuildingImageController from \"./da/layout_editor/manual_scale_building_image_controller\";\napplication.register(\n  \"da--layout-editor--manual-scale-building-image\",\n  Da__LayoutEditor__ManualScaleBuildingImageController,\n);\n\nimport Da__LayoutEditor__MapBaseController from \"./da/layout_editor/map_base_controller\";\napplication.register(\"da--layout-editor--map-base\", Da__LayoutEditor__MapBaseController);\n\nimport Da__LayoutEditor__MapLegendController from \"./da/layout_editor/map_legend_controller\";\napplication.register(\"da--layout-editor--map-legend\", Da__LayoutEditor__MapLegendController);\n\nimport Da__LayoutEditor__MiniMapController from \"./da/layout_editor/mini_map_controller\";\napplication.register(\"da--layout-editor--mini-map\", Da__LayoutEditor__MiniMapController);\n\nimport Da__LayoutEditor__NavFlyoutController from \"./da/layout_editor/nav_flyout_controller\";\napplication.register(\"da--layout-editor--nav-flyout\", Da__LayoutEditor__NavFlyoutController);\n\nimport Da__LayoutEditor__ScaleBuildingImageController from \"./da/layout_editor/scale_building_image_controller\";\napplication.register(\"da--layout-editor--scale-building-image\", Da__LayoutEditor__ScaleBuildingImageController);\n\nimport Da__LayoutEditor__SettingsController from \"./da/layout_editor/settings_controller\";\napplication.register(\"da--layout-editor--settings\", Da__LayoutEditor__SettingsController);\n\nimport Da__LayoutEditor__UploadedBuildingImageController from \"./da/layout_editor/uploaded_building_image_controller\";\napplication.register(\"da--layout-editor--uploaded-building-image\", Da__LayoutEditor__UploadedBuildingImageController);\n\nimport Da__LynxController from \"./da/lynx_controller\";\napplication.register(\"da--lynx\", Da__LynxController);\n\nimport Da__MembraneMaterialsController from \"./da/membrane_materials_controller\";\napplication.register(\"da--membrane-materials\", Da__MembraneMaterialsController);\n\nimport Da__PanelPickerController from \"./da/panel_picker_controller\";\napplication.register(\"da--panel-picker\", Da__PanelPickerController);\n\nimport Da__PaymentRequestConfirmationController from \"./da/payment_request_confirmation_controller\";\napplication.register(\"da--payment-request-confirmation\", Da__PaymentRequestConfirmationController);\n\nimport Da__PropertySearch__BaseController from \"./da/property_search/base_controller\";\napplication.register(\"da--property-search--base\", Da__PropertySearch__BaseController);\n\nimport Da__PropertySearch__DialogOpenController from \"./da/property_search/dialog_open_controller\";\napplication.register(\"da--property-search--dialog-open\", Da__PropertySearch__DialogOpenController);\n\nimport Da__RailCuttingController from \"./da/rail_cutting_controller\";\napplication.register(\"da--rail-cutting\", Da__RailCuttingController);\n\nimport Da__RailLengthsController from \"./da/rail_lengths_controller\";\napplication.register(\"da--rail-lengths\", Da__RailLengthsController);\n\nimport Da__RailPlatformController from \"./da/rail_platform_controller\";\napplication.register(\"da--rail-platform\", Da__RailPlatformController);\n\nimport Da__ReportEmailController from \"./da/report_email_controller\";\napplication.register(\"da--report-email\", Da__ReportEmailController);\n\nimport Da__RequestQuoteController from \"./da/request_quote_controller\";\napplication.register(\"da--request-quote\", Da__RequestQuoteController);\n\nimport Da__RiskCategoriesController from \"./da/risk_categories_controller\";\napplication.register(\"da--risk-categories\", Da__RiskCategoriesController);\n\nimport Da__RoofInformationController from \"./da/roof_information_controller\";\napplication.register(\"da--roof-information\", Da__RoofInformationController);\n\nimport Da__RoofSectionMenuController from \"./da/roof_section_menu_controller\";\napplication.register(\"da--roof-section-menu\", Da__RoofSectionMenuController);\n\nimport Da__SideMenu__AnchorLinkController from \"./da/side_menu/anchor_link_controller\";\napplication.register(\"da--side-menu--anchor-link\", Da__SideMenu__AnchorLinkController);\n\nimport Da__SideMenu__MenuController from \"./da/side_menu/menu_controller\";\napplication.register(\"da--side-menu--menu\", Da__SideMenu__MenuController);\n\nimport Da__SpanAndForcesController from \"./da/span_and_forces_controller\";\napplication.register(\"da--span-and-forces\", Da__SpanAndForcesController);\n\nimport Da__SpansEditor__SpanLimitsController from \"./da/spans_editor/span_limits_controller\";\napplication.register(\"da--spans-editor--span-limits\", Da__SpansEditor__SpanLimitsController);\n\nimport Da__SpansEditor__SpanOverridesController from \"./da/spans_editor/span_overrides_controller\";\napplication.register(\"da--spans-editor--span-overrides\", Da__SpansEditor__SpanOverridesController);\n\nimport Da__SparesController from \"./da/spares_controller\";\napplication.register(\"da--spares\", Da__SparesController);\n\nimport Da__SparesPercentageController from \"./da/spares_percentage_controller\";\napplication.register(\"da--spares-percentage\", Da__SparesPercentageController);\n\nimport Distributors__MapController from \"./distributors/map_controller\";\napplication.register(\"distributors--map\", Distributors__MapController);\n\nimport Distributors__QuoteFormController from \"./distributors/quote_form_controller\";\napplication.register(\"distributors--quote-form\", Distributors__QuoteFormController);\n\nimport Distributors__QuoteLinksController from \"./distributors/quote_links_controller\";\napplication.register(\"distributors--quote-links\", Distributors__QuoteLinksController);\n\nimport Distributors__TabsController from \"./distributors/tabs_controller\";\napplication.register(\"distributors--tabs\", Distributors__TabsController);\n\nimport DocumentsAndResources__CadDlController from \"./documents_and_resources/cad_dl_controller\";\napplication.register(\"documents-and-resources--cad-dl\", DocumentsAndResources__CadDlController);\n\nimport DocumentsAndResources__CadDlOldController from \"./documents_and_resources/cad_dl_old_controller\";\napplication.register(\"documents-and-resources--cad-dl-old\", DocumentsAndResources__CadDlOldController);\n\nimport DocumentsAndResources__CertLetterDlController from \"./documents_and_resources/cert_letter_dl_controller\";\napplication.register(\"documents-and-resources--cert-letter-dl\", DocumentsAndResources__CertLetterDlController);\n\nimport DocumentsAndResources__CutSheetDlController from \"./documents_and_resources/cut_sheet_dl_controller\";\napplication.register(\"documents-and-resources--cut-sheet-dl\", DocumentsAndResources__CutSheetDlController);\n\nimport DocumentsAndResources__CutSheetDlOldController from \"./documents_and_resources/cut_sheet_dl_old_controller\";\napplication.register(\"documents-and-resources--cut-sheet-dl-old\", DocumentsAndResources__CutSheetDlOldController);\n\nimport DocumentsAndResources__FileSearchController from \"./documents_and_resources/file_search_controller\";\napplication.register(\"documents-and-resources--file-search\", DocumentsAndResources__FileSearchController);\n\nimport DocumentsAndResources__TabsController from \"./documents_and_resources/tabs_controller\";\napplication.register(\"documents-and-resources--tabs\", DocumentsAndResources__TabsController);\n\nimport DomesticContent__BomController from \"./domestic_content/bom_controller\";\napplication.register(\"domestic-content--bom\", DomesticContent__BomController);\n\nimport Fr__AngleAndSpacingController from \"./fr/angle_and_spacing_controller\";\napplication.register(\"fr--angle-and-spacing\", Fr__AngleAndSpacingController);\n\nimport Fr__RoofInformationController from \"./fr/roof_information_controller\";\napplication.register(\"fr--roof-information\", Fr__RoofInformationController);\n\nimport Fr__SaveAllSegmentsController from \"./fr/save_all_segments_controller\";\napplication.register(\"fr--save-all-segments\", Fr__SaveAllSegmentsController);\n\nimport Gb__FoundationController from \"./gb/foundation_controller\";\napplication.register(\"gb--foundation\", Gb__FoundationController);\n\nimport Gb__SubArrayDetailsController from \"./gb/sub_array_details_controller\";\napplication.register(\"gb--sub-array-details\", Gb__SubArrayDetailsController);\n\nimport Gb__SubArrayFormController from \"./gb/sub_array_form_controller\";\napplication.register(\"gb--sub-array-form\", Gb__SubArrayFormController);\n\nimport Gb__SubArraysController from \"./gb/sub_arrays_controller\";\napplication.register(\"gb--sub-arrays\", Gb__SubArraysController);\n\nimport GoogleEventsController from \"./google_events_controller\";\napplication.register(\"google-events\", GoogleEventsController);\n\nimport GoogleMapFullPageController from \"./google_map_full_page_controller\";\napplication.register(\"google-map-full-page\", GoogleMapFullPageController);\n\nimport HeaderNavMenusController from \"./header_nav_menus_controller\";\napplication.register(\"header-nav-menus\", HeaderNavMenusController);\n\nimport InputAutoSubmitController from \"./input_auto_submit_controller\";\napplication.register(\"input-auto-submit\", InputAutoSubmitController);\n\nimport Introductions__AutoShowPopupController from \"./introductions/auto_show_popup_controller\";\napplication.register(\"introductions--auto-show-popup\", Introductions__AutoShowPopupController);\n\nimport Introductions__DismissalController from \"./introductions/dismissal_controller\";\napplication.register(\"introductions--dismissal\", Introductions__DismissalController);\n\nimport LocationFormController from \"./location_form_controller\";\napplication.register(\"location-form\", LocationFormController);\n\nimport MyProjects__BaseController from \"./my_projects/base_controller\";\napplication.register(\"my-projects--base\", MyProjects__BaseController);\n\nimport MyProjects__ConsolidatedBomController from \"./my_projects/consolidated_bom_controller\";\napplication.register(\"my-projects--consolidated-bom\", MyProjects__ConsolidatedBomController);\n\nimport OnchangeSubmitController from \"./onchange_submit_controller\";\napplication.register(\"onchange-submit\", OnchangeSubmitController);\n\nimport PanelDetailsController from \"./panel_details_controller\";\napplication.register(\"panel-details\", PanelDetailsController);\n\nimport PanelShareController from \"./panel_share_controller\";\napplication.register(\"panel-share\", PanelShareController);\n\nimport Pr__CorruslideRequirementsDialogController from \"./pr/corruslide_requirements_dialog_controller\";\napplication.register(\"pr--corruslide-requirements-dialog\", Pr__CorruslideRequirementsDialogController);\n\nimport Pr__QuickGripDialogController from \"./pr/quick_grip_dialog_controller\";\napplication.register(\"pr--quick-grip-dialog\", Pr__QuickGripDialogController);\n\nimport Pr__FlProductApprovalController from \"./pr/fl_product_approval_controller\";\napplication.register(\"pr--fl-product-approval\", Pr__FlProductApprovalController);\n\nimport Pr__GraphicalToolModeController from \"./pr/graphical_tool_mode_controller\";\napplication.register(\"pr--graphical-tool-mode\", Pr__GraphicalToolModeController);\n\nimport Pr__ImageBased__AttachmentsEditorController from \"./pr/image_based/attachments_editor_controller\";\napplication.register(\"pr--image-based--attachments-editor\", Pr__ImageBased__AttachmentsEditorController);\n\nimport Pr__ImageBased__LayoutEditor__LockedTooltipController from \"./pr/image_based/layout_editor/locked_tooltip_controller\";\napplication.register(\n  \"pr--image-based--layout-editor--locked-tooltip\",\n  Pr__ImageBased__LayoutEditor__LockedTooltipController,\n);\n\nimport Pr__ImageBased__LayoutEditor__MapArraysController from \"./pr/image_based/layout_editor/map_arrays_controller\";\napplication.register(\"pr--image-based--layout-editor--map-arrays\", Pr__ImageBased__LayoutEditor__MapArraysController);\n\nimport Pr__ImageBased__LayoutEditor__MapBaseController from \"./pr/image_based/layout_editor/map_base_controller\";\napplication.register(\"pr--image-based--layout-editor--map-base\", Pr__ImageBased__LayoutEditor__MapBaseController);\n\nimport Pr__ImageBased__LayoutEditor__MapEaveSelectionController from \"./pr/image_based/layout_editor/map_eave_selection_controller\";\napplication.register(\n  \"pr--image-based--layout-editor--map-eave-selection\",\n  Pr__ImageBased__LayoutEditor__MapEaveSelectionController,\n);\n\nimport Pr__ImageBased__LayoutEditor__MapPanelPropertiesController from \"./pr/image_based/layout_editor/map_panel_properties_controller\";\napplication.register(\n  \"pr--image-based--layout-editor--map-panel-properties\",\n  Pr__ImageBased__LayoutEditor__MapPanelPropertiesController,\n);\n\nimport Pr__ImageBased__LayoutEditor__MapRoofPlanesController from \"./pr/image_based/layout_editor/map_roof_planes_controller\";\napplication.register(\n  \"pr--image-based--layout-editor--map-roof-planes\",\n  Pr__ImageBased__LayoutEditor__MapRoofPlanesController,\n);\n\nimport Pr__ImageBased__LayoutEditor__MapSetbacksController from \"./pr/image_based/layout_editor/map_setbacks_controller\";\napplication.register(\n  \"pr--image-based--layout-editor--map-setbacks\",\n  Pr__ImageBased__LayoutEditor__MapSetbacksController,\n);\n\nimport Pr__ImageBased__LayoutEditor__MapViewOnlyController from \"./pr/image_based/layout_editor/map_view_only_controller\";\napplication.register(\n  \"pr--image-based--layout-editor--map-view-only\",\n  Pr__ImageBased__LayoutEditor__MapViewOnlyController,\n);\n\nimport Pr__ImageBased__LayoutEditor__SetbackGuidesFormController from \"./pr/image_based/layout_editor/setback_guides_form_controller\";\napplication.register(\n  \"pr--image-based--layout-editor--setback-guides-form\",\n  Pr__ImageBased__LayoutEditor__SetbackGuidesFormController,\n);\n\nimport Pr__ImageBased__LayoutEditor__UnlockConfirmationController from \"./pr/image_based/layout_editor/unlock_confirmation_controller\";\napplication.register(\n  \"pr--image-based--layout-editor--unlock-confirmation\",\n  Pr__ImageBased__LayoutEditor__UnlockConfirmationController,\n);\n\nimport Pr__ImageBased__MapProjectReportController from \"./pr/image_based/map_project_report_controller\";\napplication.register(\"pr--image-based--map-project-report\", Pr__ImageBased__MapProjectReportController);\n\nimport Pr__ImageBased__Shared__RafterOffsetFormController from \"./pr/image_based/shared/rafter_offset_form_controller\";\napplication.register(\"pr--image-based--shared--rafter-offset-form\", Pr__ImageBased__Shared__RafterOffsetFormController);\n\nimport Pr__JayBoxConfirmationController from \"./pr/jay_box_confirmation_controller\";\napplication.register(\"pr--jay-box-confirmation\", Pr__JayBoxConfirmationController);\n\nimport Pr__RoofInformationController from \"./pr/roof_information_controller\";\napplication.register(\"pr--roof-information\", Pr__RoofInformationController);\n\nimport Pr__RoofPlaneFormController from \"./pr/roof_plane_form_controller\";\napplication.register(\"pr--roof-plane-form\", Pr__RoofPlaneFormController);\n\nimport Pr__RoofPlaneSelectController from \"./pr/roof_plane_select_controller\";\napplication.register(\"pr--roof-plane-select\", Pr__RoofPlaneSelectController);\n\nimport Pr__RoofPlanesController from \"./pr/roof_planes_controller\";\napplication.register(\"pr--roof-planes\", Pr__RoofPlanesController);\n\nimport Pr__RoofSectionFormController from \"./pr/roof_section_form_controller\";\napplication.register(\"pr--roof-section-form\", Pr__RoofSectionFormController);\n\nimport Pr__SaveAllSegmentsController from \"./pr/save_all_segments_controller\";\napplication.register(\"pr--save-all-segments\", Pr__SaveAllSegmentsController);\n\nimport ProjectUpdatedNoticeController from \"./project_updated_notice_controller\";\napplication.register(\"project-updated-notice\", ProjectUpdatedNoticeController);\n\nimport ScrollToTopController from \"./scroll_to_top_controller\";\napplication.register(\"scroll-to-top\", ScrollToTopController);\n\nimport Sk__ModuleSizeConfirmationController from \"./sk/module_size_confirmation_controller\";\napplication.register(\"sk--module-size-confirmation\", Sk__ModuleSizeConfirmationController);\n\nimport Sk__ModuleSizeConfirmationDialogController from \"./sk/module_size_confirmation_dialog_controller\";\napplication.register(\"sk--module-size-confirmation-dialog\", Sk__ModuleSizeConfirmationDialogController);\n\nimport Sk__SaveAllSegmentsController from \"./sk/save_all_segments_controller\";\napplication.register(\"sk--save-all-segments\", Sk__SaveAllSegmentsController);\n\nimport Sk__SegmentsListController from \"./sk/segments_list_controller\";\napplication.register(\"sk--segments-list\", Sk__SegmentsListController);\n\nimport TabIdController from \"./tab_id_controller\";\napplication.register(\"tab-id\", TabIdController);\n\nimport TableRowSelectionController from \"./table_row_selection_controller\";\napplication.register(\"table-row-selection\", TableRowSelectionController);\n\nimport TermsOfServiceFormController from \"./terms_of_service_form_controller\";\napplication.register(\"terms-of-service-form\", TermsOfServiceFormController);\n\nimport UploadFileFormController from \"./upload_file_form_controller\";\napplication.register(\"upload-file-form\", UploadFileFormController);\n\nimport UrlRedirectController from \"./url_redirect_controller\";\napplication.register(\"url-redirect\", UrlRedirectController);\n\nimport UserSinglePickerController from \"./user_single_picker_controller\";\napplication.register(\"user-single-picker\", UserSinglePickerController);\n\nimport UserPresets__DaController from \"./user_presets/da_controller\";\napplication.register(\"user-presets--da\", UserPresets__DaController);\n\nimport UserPresets__GbController from \"./user_presets/gb_controller\";\napplication.register(\"user-presets--gb\", UserPresets__GbController);\n\nimport Warranties__ActivationLinkController from \"./warranties/activation_link_controller\";\napplication.register(\"warranties--activation-link\", Warranties__ActivationLinkController);\n\nimport WarrantiesController from \"./warranties_controller\";\napplication.register(\"warranties\", WarrantiesController);\n"],
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA,+FAAAA,SAAA;AAAA;AACA,UAAI,QAAQ,SAAU,IAAI;AACxB,eAAO,MAAM,GAAG,SAAS,QAAQ;AAAA,MACnC;AAGA,MAAAA,QAAO;AAAA,MAEL,MAAM,OAAO,cAAc,YAAY,UAAU,KACjD,MAAM,OAAO,UAAU,YAAY,MAAM;AAAA,MAEzC,MAAM,OAAO,QAAQ,YAAY,IAAI,KACrC,MAAM,OAAO,UAAU,YAAY,MAAM,KACzC,MAAM,OAAO,WAAQ,YAAY,OAAI;AAAA,MAEpC,4BAAY;AAAE,eAAO;AAAA,MAAM,GAAG,KAAK,SAAS,aAAa,EAAE;AAAA;AAAA;;;ACf9D;AAAA,yFAAAC,SAAA;AAAA;AACA,MAAAA,QAAO,UAAU,SAAU,MAAM;AAC/B,YAAI;AACF,iBAAO,CAAC,CAAC,KAAK;AAAA,QAChB,SAASC,QAAO;AACd,iBAAO;AAAA,QACT;AAAA,MACF;AAAA;AAAA;;;ACPA;AAAA,+FAAAC,SAAA;AAAA;AACA,UAAI,QAAQ;AAGZ,MAAAA,QAAO,UAAU,CAAC,MAAM,WAAY;AAElC,eAAO,OAAO,eAAe,CAAC,GAAG,GAAG,EAAE,KAAK,WAAY;AAAE,iBAAO;AAAA,QAAG,EAAE,CAAC,EAAE,CAAC,MAAM;AAAA,MACjF,CAAC;AAAA;AAAA;;;ACPD;AAAA,wGAAAC,SAAA;AAAA;AACA,UAAI,QAAQ;AAE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tD,KAAK,SAASC,QAAO;AACnB,gBAAIC,SAAQ;AACZ,YAAAF,SAAQ,MAAM,WAAY;AAAE,cAAAE;AAAA,YAAS,CAAC;AACtC,mBAAOA;AAAA,UACT;AAAA,UACA,cAAc;AAAA,UACd,YAAY;AAAA,QACd,CAAC;AAAA,MACH;AAAA;AAAA;;;ACpBA;AAAA,sFAAAC,SAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,MAAAA,QAAO,UAAU;AAAA;AAAA;;;ACjUjB;AAAA,yGAAAC,SAAA;AAOA,UAAI,WAAW,SAAUC,UAAS;AAChC;AAEA,YAAI,KAAK,OAAO;AAChB,YAAI,SAAS,GAAG;AAChB,YAAIC,kBAAiB,OAAO,kBAAkB,SAAU,KAAKC,MAAK,MAAM;AAAE,cAAIA,IAAG,IAAI,KAAK;AAAA,QAAO;AACjG,YAAIC;AACJ,YAAI,UAAU,OAAO,WAAW,aAAa,SAAS,CAAC;AACvD,YAAI,iBAAiB,QAAQ,YAAY;AACzC,YAAI,sBAAsB,QAAQ,iBAAiB;AACnD,YAAI,oBAAoB,QAAQ,eAAe;AAE/C,iBAASC,QAAO,KAAKF,MAAK,OAAO;AAC/B,iBAAO,eAAe,KAAKA,MAAK;AAAA,YAC9B;AAAA,YACA,YAAY;AAAA,YACZ,cAAc;AAAA,YACd,UAAU;AAAA,UACZ,CAAC;AACD,iBAAO,IAAIA,IAAG;AAAA,QAChB;AACA,YAAI;AAEF,UAAAE,QAAO,CAAC,GAAG,EAAE;AAAA,QACf,SAAS,KAAK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AAA,0BACAA;AAAA,0BACA;AAAA,0BACA;AAAA,wBACF;AAAA,sBACF;AACA;AAAA,oBACF,KAAK;AACH;AAAA,wBACE;AAAA,wBACA;AAAA,wBACA;AAAA,wBACA;AAAA,wBACA;AAAA,wBACA;AAAA,sBACF;AACA;AAAA,oBACF,KAAK;AACH;AAAA,wBACE;AAAA,wBACA;AAAA,wBACA;AAAA,wBACA;AAAA,wBACA;AAAA,wBACA;AAAA,sBACF;AACA;AAAA,oBACF,KAAK;AACH;AAAA,wBACE;AAAA,wBACA;AAAA,wBACA;AAAA,wBACA;AAAA,wBACA;AAAA,wBACA;AAAA,sBACF;AACA;AAAA,oBACF,KAAK;AACH;AAAA,wBACE;AAAA,wBACA;AAAA,wBACA;AAAA,wBACA;AAAA,wBACA;AAAA,wBACA;AAAA,sBACF;AACA;AAAA,oBACF,KAAK;AACH;AAAA,wBACE;AAAA,wBACA;AAAA,wBACA;AAAA,wBACA;AAAA,wBACA;AAAA,wBACA;AAAA,sBACF;AACA;AAAA,oBACF,KAAK;AACH;AAAA,wBACE;AAAA,wBACA;AAAA,wBACA;AAAA,wBACA;AAAA,wBACA;AAAA,wBACA;AAAA,sBACF;AACA;AAAA,oBACF,KAAK;AACH;AAAA,wBACE;AAAA,wBACA;AAAA,wBACA;AAAA,wBACA;AAAA,wBACA;AAAA,wBACA;AAAA,sBACF;AACA;AAAA,oBACF,KAAK;AACH;AAAA,wBACE;AAAA,wBACA;AAAA,wBACA;AAAA,wBACA;AAAA,wBACA;AAAA,wBACA;AAAA,sBACF;AACA;AAAA,oBACF,KAAK;AACH;AAAA,wBACE;AAAA,wBACA;AAAA,wBACA;AAAA,wBACA;AAAA,wBACA;AAAA,wBACA;AAAA,sBACF;AACA;AAAA,oBACF,KAAK;AACH;AAAA,wBACE;AAAA,wBACA;AAAA,wBACA;AAAA,wBACA;AAAA,wBACA;AAAA,wBACA;AAAA,sBACF;AACA;AAAA,oBACF,KAAK;AACH;AAAA,wBACE;AAAA,wBACA;A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EF;AAAA,EACF,SAASC,IAAG;AAAA,EAAC;AAMb,MAAI,CAAC,OAAO,cAAe,OAAS,MAAM;AAI1C,2BAAM,MAAM;AACZ,SAAO,QAAQ;AAQf,WAAS,iBAAiB,cAAc,MAAM;AAC5C,QAAI,CAAC,OAAO,SAAS,KAAK,WAAW,OAAO,EAAG;AAE/C,UAAM,aAAa,OAAO,SAAS,KAAK,QAAQ,SAAS,EAAE;AAC3D,UAAM,SAAS,SAAS,cAAc,KAAK,UAAU,EAAE;AACvD,eAAW,MAAM,OAAO,eAAe,EAAE,OAAO,SAAS,CAAC,GAAG,GAAG;AAAA,EAClE,CAAC;AAGD,WAAS,iBAAiB,cAAc,MAAM;AAC5C,UAAM,SAAS,IAAI,IAAI,OAAO,QAAQ,EAAE;AAExC,UAAM,mBAAmB,OAAO,IAAI,YAAY;AAChD,QAAI,iBAAkB,oBAAmB,kBAAkB,YAAY;AAEvE,UAAM,6BAA6B,OAAO,IAAI,2BAA2B;AACzE,QAAI,2BAA4B,YAAW,IAAI,0BAA0B,IAAI,2BAA2B;AAAA,EAC1G,CAAC;AAED,WAAS,mBAAmB,kBAAkB,iBAAiB;AAC7D,UAAM,iBAAiB,SAAS,cAAc,IAAI,gBAAgB,EAAE;AAEpE,QAAI,CAAC,kBAAkB,cAAc,EAAG,OAAM,iCAAiC,UAAU;AACzF,QAAI,CAAC,eAAgB;AAErB,mBAAe,UAAU,IAAI,eAAe;AAAA,EAC9C;",
  "names": ["module", "module", "error", "module", "module", "test", "module", "propertyIsEnumerable", "V", "module", "module", "fn", "module", "toString", "module", "split", "module", "module", "module", "module", "module", "module", "globalThis", "module", "module", "globalThis", "navigator", "module", "globalThis", "process", "Deno", "module", "globalThis", "module", "module", "module", "error", "module", "module", "V", "P", "module", "isObject", "fn", "module", "module", "globalThis", "defineProperty", "key", "error", "module", "globalThis", "module", "create", "key", "module", "module", "hasOwnProperty", "key", "module", "id", "toString", "key", "module", "globalThis", "shared", "Symbol", "module", "isObject", "getMethod", "result", "module", "toPrimitive", "key", "module", "globalThis", "isObject", "document", "module", "O", "P", "error", "module", "module", "isObject", "defineProperty", "O", "P", "error", "module", "object", "key", "module", "getDescriptor", "module", "module", "globalThis", "WeakMap", "module", "shared", "keys", "key", "module", "module", "globalThis", "isObject", "shared", "TypeError", "WeakMap", "set", "get", "has", "module", "defineProperty", "join", "error", "toString", "module", "O", "key", "error", "module", "ceil", "floor", "x", "n", "module", "number", "module", "max", "min", "length", "integer", "module", "min", "module", "module", "O", "length", "module", "indexOf", "push", "object", "names", "O", "i", "result", "key", "module", "O", "module", "ownKeys", "keys", "module", "ownKeys", "keys", "defineProperty", "i", "key", "module", "feature", "data", "normalize", "string", "module", "globalThis", "key", "module", "test", "module", "key", "error", "O", "result", "module", "module", "keys", "O", "O", "keys", "length", "key", "module", "module", "html", "activeXDocument", "error", "length", "create", "O", "result", "module", "module", "error", "module", "defineProperty", "module", "globalThis", "module", "defineProperty", "Symbol", "module", "Symbol", "module", "defineProperty", "module", "fn", "module", "bind", "fn", "module", "isArray", "module", "noop", "error", "module", "isArray", "isObject", "C", "module", "length", "module", "object", "key", "module", "bind", "O", "self", "length", "result", "$", "globalThis", "shared", "RangeError", "TypeError", "push", "O", "P", "wrap", "defineProperty", "key", "keys", "create", "propertyIsEnumerable", "V", "names", "result", "Symbol", "error", "toString", "module", "$", "toString", "shared", "key", "string", "$", "shared", "module", "isObject", "O", "module", "module", "i", "module", "$", "isArray", "isObject", "create", "toString", "push", "key", "offset", "string", "prev", "next", "i", "error", "length", "stringify", "root", "result", "end", "$", "$", "globalThis", "toString", "Symbol", "result", "key", "string", "globalThis", "defineProperty", "Symbol", "globalThis", "defineProperty", "Symbol", "module", "apply", "module", "object", "key", "error", "module", "isObject", "module", "module", "isObject", "test", "error", "O", "module", "defineProperty", "Target", "Source", "key", "module", "isObject", "module", "toString", "module", "isObject", "O", "module", "module", "error", "module", "error", "C", "module", "a", "b", "result", "error", "$", "globalThis", "apply", "WebAssembly", "O", "init", "Error", "RangeError", "ReferenceError", "SyntaxError", "TypeError", "$", "isObject", "DOMException", "isError", "module", "object", "toString", "O", "errorToString", "module", "F", "module", "O", "object", "module", "module", "module", "getMethod", "module", "module", "getMethod", "iterator", "error", "module", "bind", "result", "fn", "iterator", "length", "next", "value", "error", "$", "getPrototypeOf", "create", "push", "AggregateError", "errors", "$", "apply", "init", "AggregateError", "errors", "$", "globalThis", "getPrototypeOf", "create", "SuppressedError", "error", "module", "create", "defineProperty", "key", "$", "O", "k", "module", "module", "isArray", "error", "O", "length", "module", "array", "$", "isArray", "isObject", "array", "O", "A", "n", "i", "k", "length", "E", "module", "O", "P", "module", "min", "start", "O", "to", "from", "end", "count", "$", "module", "$", "module", "fill", "O", "length", "end", "$", "fill", "$", "filter", "$", "find", "$", "findIndex", "module", "bind", "O", "self", "result", "$", "$", "module", "isArray", "bind", "start", "$", "O", "A", "$", "O", "A", "module", "forEach", "$", "forEach", "module", "iterator", "fn", "error", "module", "bind", "from", "O", "length", "result", "iterator", "next", "error", "module", "error", "object", "$", "from", "$", "$", "indexOf", "$", "isArray", "module", "isObject", "create", "getPrototypeOf", "test", "module", "create", "next", "module", "$", "getPrototypeOf", "next", "keys", "values", "entries", "methods", "module", "module", "defineProperty", "values", "error", "$", "join", "module", "apply", "min", "O", "length", "$", "$", "map", "$", "F", "result", "$", "error", "push", "O", "i", "module", "O", "self", "length", "i", "module", "globalThis", "string", "module", "$", "length", "$", "$", "isArray", "test", "$", "isArray", "isObject", "max", "start", "end", "O", "length", "k", "result", "n", "$", "module", "floor", "array", "length", "i", "j", "left", "right", "module", "module", "module", "$", "toString", "WEBKIT", "test", "push", "result", "a", "b", "x", "y", "array", "module", "$", "max", "min", "start", "O", "A", "k", "from", "to", "$", "O", "A", "k", "module", "length", "result", "module", "globalThis", "$", "O", "A", "$", "max", "min", "start", "O", "k", "A", "$", "error", "unshift", "O", "k", "to", "j", "$", "error", "O", "A", "k", "module", "module", "key", "module", "module", "number", "length", "module", "sign", "x", "n", "module", "n", "module", "sign", "abs", "x", "n", "s", "a", "result", "module", "x", "module", "abs", "pow", "floor", "log", "number", "buffer", "sign", "c", "module", "globalThis", "getPrototypeOf", "Array", "RangeError", "fill", "number", "buffer", "key", "get", "count", "start", "set", "i", "ArrayBuffer", "length", "DataView", "offset", "$", "globalThis", "ArrayBuffer", "module", "globalThis", "isObject", "getPrototypeOf", "Int8Array", "Uint8ClampedArray", "TypeError", "isView", "isTypedArray", "C", "error", "error2", "TypedArray", "$", "$", "ArrayBuffer", "DataView", "start", "end", "length", "result", "$", "$", "pow", "sign", "module", "module", "log", "log2", "x", "$", "floor", "pow", "module", "globalThis", "ArrayBuffer", "TypeError", "O", "module", "globalThis", "DataView", "O", "error", "module", "module", "globalThis", "error", "module", "globalThis", "buffer", "clone", "module", "globalThis", "detach", "buffer", "error", "module", "globalThis", "ArrayBuffer", "DataView", "max", "min", "a", "b", "i", "$", "$", "$", "$", "now", "$", "y", "$", "module", "toString", "floor", "count", "result", "n", "module", "toString", "ceil", "S", "module", "abs", "date", "sign", "$", "$", "toPrimitive", "toJSON", "key", "O", "module", "toString", "module", "bind", "getMethod", "push", "V", "O", "Promise", "resolve", "$", "SuppressedError", "i", "adopt", "move", "$", "toString", "toUpperCase", "join", "hex", "length", "result", "string", "module", "isObject", "join", "C", "i", "bind", "F", "$", "bind", "isObject", "O", "P", "error", "$", "globalThis", "$", "globalThis", "getPrototypeOf", "Iterator", "key", "module", "i", "error", "module", "module", "create", "getMethod", "next", "result", "error", "iterator", "Iterator", "record", "$", "iterator", "result", "length", "getMethod", "module", "module", "module", "result", "module", "error", "module", "globalThis", "Iterator", "error", "$", "error", "iterator", "next", "result", "$", "error", "record", "$", "iterator", "next", "result", "filter", "error", "$", "find", "error", "record", "module", "$", "iterator", "result", "error", "$", "forEach", "fn", "error", "record", "$", "error", "from", "O", "$", "iterator", "result", "map", "error", "$", "apply", "error", "record", "$", "error", "record", "$", "error", "iterator", "result", "$", "toArray", "result", "module", "isObject", "module", "module", "module", "push", "result", "i", "error", "k", "$", "push", "zip", "next", "error", "i", "$", "push", "keys", "propertyIsEnumerable", "i", "key", "error", "j", "$", "$", "globalThis", "isObject", "isArray", "toString", "JSON", "Number", "SyntaxError", "push", "Context", "root", "keys", "i", "P", "object", "key", "Node", "end", "start", "result", "array", "j", "parse", "module", "$", "toString", "parse", "create", "freeze", "globalThis", "module", "buffer", "module", "isObject", "module", "$", "isObject", "defineProperty", "id", "create", "enable", "test", "result", "i", "length", "module", "$", "globalThis", "isObject", "add", "key", "get", "has", "set", "module", "create", "bind", "define", "key", "clear", "next", "prev", "forEach", "has", "get", "set", "add", "init", "Map", "module", "$", "Map", "has", "get", "set", "push", "map", "k", "key", "$", "get", "has", "set", "key", "$", "get", "has", "set", "key", "module", "log", "x", "n", "u", "$", "log", "sqrt", "x", "n", "$", "log", "sqrt", "x", "n", "$", "x", "n", "$", "sign", "abs", "pow", "x", "n", "y", "$", "floor", "log", "x", "n", "module", "x", "n", "$", "abs", "E", "x", "t", "$", "$", "$", "x", "$", "abs", "sqrt", "i", "div", "$", "x", "y", "module", "log", "x", "$", "$", "$", "$", "sign", "$", "abs", "E", "x", "n", "$", "abs", "pow", "push", "x", "y", "count", "n", "i", "j", "sign", "next", "$", "x", "n", "a", "b", "$", "module", "module", "toString", "string", "$", "globalThis", "toPrimitive", "defineProperty", "trim", "TypeError", "toNumber", "length", "Number", "n", "keys", "j", "key", "$", "module", "globalThis", "isFinite", "$", "module", "isObject", "floor", "isInteger", "$", "$", "isNaN", "number", "$", "abs", "number", "$", "$", "module", "globalThis", "toString", "trim", "Symbol", "parseFloat", "string", "result", "$", "parseFloat", "module", "globalThis", "toString", "trim", "Symbol", "hex", "parseInt", "string", "S", "$", "parseInt", "$", "abs", "floor", "pow", "round", "x", "f", "s", "m", "e", "c", "d", "l", "n", "$", "floor", "pow", "x", "n", "log", "x2", "data", "c", "c2", "s", "t", "toFixed", "number", "sign", "result", "e", "z", "j", "k", "$", "module", "defineProperty", "A", "B", "assign", "T", "propertyIsEnumerable", "S", "keys", "length", "j", "key", "$", "assign", "$", "create", "module", "globalThis", "WEBKIT", "key", "$", "P", "getter", "$", "$", "defineProperty", "$", "__defineSetter__", "P", "module", "propertyIsEnumerable", "push", "O", "keys", "length", "i", "result", "key", "$", "entries", "O", "$", "isObject", "freeze", "$", "k", "v", "$", "key", "$", "ownKeys", "getOwnPropertyDescriptors", "object", "O", "keys", "result", "key", "$", "$", "getPrototypeOf", "$", "create", "push", "k", "key", "$", "module", "is", "x", "y", "$", "is", "$", "$", "isObject", "$", "isObject", "$", "keys", "$", "getPrototypeOf", "P", "O", "key", "$", "getPrototypeOf", "P", "O", "key", "$", "isObject", "isObject", "getPrototypeOf", "O", "error", "$", "isObject", "$", "module", "toString", "toString", "$", "values", "O", "$", "$", "module", "module", "O", "C", "S", "module", "module", "module", "globalThis", "apply", "bind", "html", "set", "clear", "process", "Function", "MessageChannel", "String", "run", "id", "fn", "setImmediate", "clearImmediate", "module", "globalThis", "module", "Queue", "next", "module", "module", "module", "globalThis", "bind", "Queue", "MutationObserver", "document", "process", "Promise", "notify", "toggle", "flush", "fn", "error", "module", "a", "b", "error", "module", "error", "module", "globalThis", "module", "globalThis", "resolve", "module", "C", "resolve", "$", "globalThis", "isObject", "Queue", "TypeError", "document", "process", "isThenable", "reaction", "resolve", "result", "error", "notify", "dispatchEvent", "bind", "fn", "Promise", "C", "module", "$", "all", "C", "resolve", "result", "values", "$", "$", "C", "result", "$", "r", "module", "isObject", "C", "x", "resolve", "$", "resolve", "x", "$", "C", "resolve", "result", "values", "error", "$", "C", "AggregateError", "resolve", "result", "errors", "error", "$", "C", "isFunction", "x", "e", "$", "globalThis", "apply", "Promise", "p", "result", "$", "module", "globalThis", "shared", "create", "getPrototypeOf", "prototype", "error", "module", "create", "getMethod", "Promise", "result", "resolve", "error", "error2", "next", "iterator", "module", "getMethod", "module", "getMethod", "iterator", "result", "error3", "error", "error2", "module", "isObject", "object", "fn", "record", "Promise", "iterator", "next", "resolve", "error", "result", "error3", "error2", "module", "bind", "getMethod", "toArray", "O", "C", "resolve", "A", "iterator", "$", "$", "Promise", "SuppressedError", "resolve", "i", "result", "error", "adopt", "move", "getMethod", "Promise", "O", "resolve", "$", "apply", "$", "apply", "bind", "isObject", "create", "push", "F", "Target", "result", "$", "defineProperty", "key", "get", "set", "error", "$", "key", "module", "$", "isObject", "getPrototypeOf", "prototype", "get", "$", "$", "getPrototypeOf", "$", "has", "$", "$", "ownKeys", "$", "error", "$", "isObject", "getPrototypeOf", "V", "prototype", "error", "object", "set", "$", "error", "$", "globalThis", "module", "isObject", "isRegExp", "module", "globalThis", "RegExp", "error", "O", "key", "result", "module", "result", "module", "module", "globalThis", "module", "globalThis", "module", "globalThis", "globalThis", "create", "isRegExp", "toString", "SyntaxError", "string", "length", "index", "result", "names", "RegExp", "error", "keys", "module", "$", "join", "hex", "S", "length", "result", "i", "module", "toString", "shared", "create", "indexOf", "object", "i", "string", "result", "$", "$", "toString", "S", "R", "string", "result", "toString", "R", "init", "Set", "module", "module", "has", "module", "record", "fn", "iterator", "next", "result", "module", "Set", "forEach", "keys", "next", "set", "fn", "module", "Set", "add", "set", "result", "module", "set", "module", "max", "set", "module", "clone", "size", "has", "difference", "O", "result", "e", "module", "size", "Set", "error2", "error", "set", "$", "difference", "result", "module", "size", "Set", "add", "has", "O", "result", "e", "$", "result", "module", "has", "size", "O", "e", "iterator", "$", "result", "module", "size", "O", "e", "$", "result", "module", "has", "size", "O", "iterator", "e", "$", "result", "module", "clone", "add", "has", "O", "result", "e", "module", "result", "error", "$", "module", "add", "clone", "union", "O", "result", "$", "union", "$", "toString", "S", "k", "module", "toString", "S", "position", "size", "$", "module", "isRegExp", "module", "error2", "$", "toString", "min", "endsWith", "end", "$", "join", "x", "elements", "length", "i", "$", "toString", "$", "toString", "S", "length", "i", "toString", "next", "string", "point", "module", "O", "methods", "module", "S", "module", "R", "S", "result", "isObject", "toString", "getMethod", "O", "S", "string", "rx", "A", "n", "result", "$", "toString", "isObject", "isRegExp", "getMethod", "string", "next", "R", "S", "C", "matchAll", "O", "rx", "module", "$", "$", "$", "toString", "push", "join", "elements", "i", "$", "module", "floor", "position", "m", "n", "f", "apply", "isObject", "toString", "getMethod", "max", "min", "push", "result", "_", "O", "string", "rx", "S", "global", "i", "position", "j", "$", "isObject", "isRegExp", "toString", "getMethod", "indexOf", "max", "O", "string", "position", "result", "isObject", "toString", "getMethod", "O", "S", "string", "rx", "result", "isObject", "toString", "getMethod", "min", "push", "result", "split", "O", "string", "rx", "S", "C", "p", "q", "A", "z", "e", "i", "$", "toString", "min", "$", "toString", "max", "min", "start", "length", "size", "$", "toString", "join", "S", "length", "result", "i", "module", "$", "trim", "module", "$", "$", "module", "$", "$", "module", "toString", "string", "S", "p1", "module", "test", "$", "$", "$", "$", "$", "$", "$", "size", "$", "$", "link", "$", "$", "$", "$", "module", "globalThis", "ArrayBuffer", "Int8Array", "module", "offset", "module", "floor", "number", "f", "module", "module", "toPrimitive", "module", "bind", "from", "C", "O", "i", "length", "result", "iterator", "next", "module", "$", "globalThis", "isObject", "create", "forEach", "RangeError", "ArrayBuffer", "DataView", "isTypedArray", "key", "isArrayBuffer", "defineProperty", "getter", "data", "offset", "buffer", "length", "init", "Float32Array", "data", "length", "init", "Float64Array", "data", "length", "init", "Int8Array", "data", "length", "init", "Int16Array", "data", "length", "init", "Int32Array", "data", "length", "init", "Uint8Array", "data", "length", "init", "Uint8ClampedArray", "data", "length", "init", "Uint16Array", "data", "length", "init", "Uint32Array", "data", "length", "O", "k", "start", "count", "fill", "length", "module", "filter", "find", "findIndex", "forEach", "indexOf", "globalThis", "Uint8Array", "values", "entries", "keys", "join", "apply", "length", "map", "length", "result", "length", "length", "floor", "length", "globalThis", "RangeError", "Int8Array", "array", "set", "offset", "length", "start", "end", "C", "length", "result", "globalThis", "WEBKIT", "Uint16Array", "array", "a", "b", "x", "y", "end", "O", "length", "C", "globalThis", "apply", "Int8Array", "O", "A", "k", "O", "A", "globalThis", "Uint8Array", "arrayToString", "join", "toString", "error", "O", "A", "k", "module", "result", "module", "module", "globalThis", "SyntaxError", "TypeError", "floor", "string", "length", "chunk", "elements", "read", "$", "globalThis", "Uint8Array", "error", "string", "result", "module", "globalThis", "Uint8Array", "SyntaxError", "min", "string", "result", "$", "globalThis", "string", "module", "$", "globalThis", "Uint8Array", "error", "string", "result", "$", "globalThis", "error", "string", "read", "$", "globalThis", "Uint8Array", "join", "error", "array", "i", "length", "result", "shift", "$", "globalThis", "join", "Uint8Array", "error", "result", "i", "length", "hex", "$", "toString", "unescape", "string", "result", "length", "module", "isObject", "find", "findIndex", "id", "key", "define", "data", "has", "get", "set", "add", "globalThis", "isObject", "isArray", "freeze", "init", "WeakMap", "key", "has", "get", "set", "module", "$", "get", "has", "set", "key", "module", "has", "module", "set", "key", "$", "get", "has", "set", "error", "key", "init", "WeakSet", "$", "globalThis", "toString", "join", "data", "string", "position", "length", "$", "globalThis", "toString", "join", "btoa", "data", "string", "position", "map", "module", "module", "globalThis", "forEach", "error", "globalThis", "COLLECTION_NAME", "error", "module", "$", "create", "defineProperty", "errorToString", "Error", "MessageChannel", "error", "DOMException", "get", "key", "$", "globalThis", "defineProperty", "Error", "DOMException", "error", "key", "$", "globalThis", "clearImmediate", "module", "globalThis", "apply", "Function", "fn", "$", "globalThis", "setImmediate", "$", "globalThis", "queueMicrotask", "fn", "$", "globalThis", "defineProperty", "self", "error", "$", "globalThis", "isObject", "Object", "Array", "Date", "Error", "TypeError", "DOMException", "Map", "Set", "push", "set2", "number", "error", "test", "action", "error2", "map", "$type", "clone", "length", "i", "DataView", "offset", "C", "keys", "key", "v", "k", "value", "buffer", "$", "globalThis", "setInterval", "$", "globalThis", "setTimeout", "module", "result", "key", "module", "delimiter", "floor", "join", "push", "split", "toLowerCase", "string", "length", "k", "encode", "n", "i", "m", "q", "t", "module", "push", "string", "start", "count", "length", "chunk", "result", "i", "encode", "error", "module", "$", "globalThis", "bind", "isObject", "create", "Headers", "TypeError", "join", "push", "shift", "split", "find", "Iterator", "next", "init", "object", "entries", "iterator", "key", "result", "URLSearchParams", "append", "length", "get", "has", "set", "a", "b", "forEach", "keys", "values", "toString", "size", "fetch", "Request", "$", "globalThis", "bind", "assign", "arrayFrom", "URLSearchParams", "TypeError", "parseInt", "floor", "pow", "join", "push", "shift", "split", "toLowerCase", "unshift", "result", "number", "length", "swap", "set", "string", "buffer", "i", "href", "error", "hash", "URL", "getter", "toJSON", "toString", "$", "toString", "URL", "length", "error", "$", "toString", "URL", "parse", "length", "error", "$", "toString", "toJSON", "toString", "append", "forEach", "push", "length", "entries", "v", "k", "key", "toString", "has", "length", "values", "forEach", "size", "count", "module", "module", "exports", "defineProperty", "key", "undefined", "define", "wrap", "self", "Context", "fn", "values", "prototype", "resolve", "record", "result", "value", "error", "delegate", "info", "object", "keys", "next", "i", "module", "polyfill", "w", "d", "Element", "now", "x", "y", "k", "left", "top", "module", "info", "Component", "noop", "e", "x", "config", "hasOwnProperty", "getter", "key", "object", "error", "array", "c", "i", "result", "count", "requireString", "errors", "resolve", "assign", "size", "n", "fn", "render", "elementType", "scope", "action", "Context", "create", "init", "getSnapshot", "module", "noop", "key", "e", "React", "fn", "href", "a", "action", "module", "prefix", "s", "suffix", "object", "key", "x", "start", "length", "i", "typeName", "e", "hasOwnProperty", "camelize", "string", "_", "html", "id", "innerHTML", "React", "href", "assign", "nonce", "chunk", "prev", "next", "log", "noop", "thenableState", "error", "is", "y", "action", "init", "useMemo", "fn", "previousDispatcher", "x$1", "bind", "onError", "now", "info", "n", "Component", "actionStateMatchingIndex", "defaultProps", "iterator", "render", "j", "r", "fatalError", "result", "ReactDOM", "getSnapshot", "size", "data", "lazy", "prefix", "s", "suffix", "object", "key", "x", "start", "length", "i", "error", "chunk", "typeName", "e", "hasOwnProperty", "camelize", "string", "_", "html", "nonce", "id", "innerHTML", "React", "href", "assign", "prev", "next", "log", "noop", "thenableState", "is", "y", "action", "init", "useMemo", "fn", "previousDispatcher", "x$1", "now", "bind", "info", "n", "Component", "actionStateMatchingIndex", "defaultProps", "iterator", "render", "j", "r", "ReactDOM", "getSnapshot", "size", "data", "lazy", "resolve", "controller", "l", "s", "now", "consumer", "data", "error", "identifier", "object", "key", "consumer", "action", "data", "s", "consumer", "identifier", "s", "subscription", "a", "data", "module", "isObject", "module", "module", "root", "module", "root", "now", "module", "string", "module", "string", "module", "root", "Symbol", "module", "Symbol", "hasOwnProperty", "e", "result", "module", "objectToString", "module", "Symbol", "objectToString", "module", "isObjectLike", "module", "isObjectLike", "module", "isObject", "toNumber", "module", "isObject", "now", "toNumber", "debounce", "result", "timerId", "flush", "module", "debounce", "isObject", "throttle", "module", "array", "length", "computed", "result", "module", "module", "module", "module", "array", "key", "length", "module", "key", "data", "module", "key", "data", "module", "key", "module", "key", "data", "module", "entries", "length", "module", "module", "key", "data", "result", "module", "key", "module", "key", "module", "isObject", "isFunction", "module", "root", "module", "module", "e", "module", "isFunction", "isObject", "hasOwnProperty", "module", "object", "key", "module", "object", "key", "module", "root", "Map", "module", "module", "module", "key", "result", "module", "hasOwnProperty", "key", "data", "result", "module", "hasOwnProperty", "key", "data", "module", "key", "data", "module", "entries", "length", "module", "Map", "module", "module", "map", "key", "data", "module", "key", "result", "module", "key", "module", "key", "module", "key", "data", "size", "module", "entries", "length", "module", "Map", "key", "data", "module", "entries", "data", "module", "module", "module", "values", "length", "module", "array", "length", "module", "cache", "key", "module", "array", "result", "othValue", "module", "root", "Uint8Array", "module", "map", "result", "key", "module", "set", "result", "module", "Symbol", "Uint8Array", "setTag", "object", "result", "module", "array", "values", "length", "offset", "module", "isArray", "module", "isArray", "object", "result", "module", "array", "length", "result", "module", "module", "propertyIsEnumerable", "object", "module", "n", "result", "module", "isObjectLike", "module", "isObjectLike", "hasOwnProperty", "propertyIsEnumerable", "module", "module", "root", "Buffer", "isBuffer", "module", "length", "module", "module", "isObjectLike", "setTag", "module", "module", "types", "e", "module", "isTypedArray", "module", "isArray", "isBuffer", "isTypedArray", "hasOwnProperty", "isArr", "isType", "result", "length", "key", "module", "module", "transform", "module", "module", "hasOwnProperty", "object", "result", "key", "module", "isFunction", "module", "keys", "object", "module", "keys", "object", "module", "hasOwnProperty", "object", "key", "result", "module", "root", "DataView", "module", "root", "Promise", "module", "root", "Set", "module", "root", "WeakMap", "module", "DataView", "Map", "Promise", "Set", "WeakMap", "setTag", "result", "module", "isArray", "isBuffer", "isTypedArray", "hasOwnProperty", "object", "module", "isObjectLike", "module", "object", "length", "data", "key", "result", "module", "isObject", "module", "keys", "object", "result", "length", "key", "module", "key", "object", "module", "object", "module", "isArray", "isKey", "object", "module", "key", "cache", "result", "module", "result", "key", "cache", "module", "string", "result", "number", "module", "array", "length", "result", "module", "Symbol", "isArray", "symbolToString", "result", "module", "toString", "module", "isArray", "isKey", "toString", "object", "module", "result", "module", "object", "length", "module", "get", "object", "result", "module", "object", "key", "module", "isArray", "object", "length", "result", "key", "module", "object", "module", "get", "isKey", "object", "module", "identity", "module", "key", "object", "module", "object", "module", "isKey", "module", "identity", "isArray", "module", "maxBy", "array", "module", "undefined", "VERSION", "setTag", "root", "types", "e", "apply", "array", "length", "result", "values", "offset", "string", "key", "collection", "object", "n", "cache", "iterator", "data", "map", "transform", "set", "runInContext", "_", "Array", "Date", "Error", "Function", "Math", "Object", "RegExp", "String", "TypeError", "hasOwnProperty", "idCounter", "Buffer", "Symbol", "Uint8Array", "propertyIsEnumerable", "defineProperty", "DataView", "Map", "Promise", "Set", "WeakMap", "symbolToString", "isObjectLike", "isArray", "isObject", "isArr", "start", "end", "iteratee", "computed", "entries", "size", "isBuffer", "isType", "isTypedArray", "keys", "get", "number", "isSet", "setTimeout", "includes", "isFunction", "objectToString", "identity", "isKey", "isPlainObject", "indexOf", "action", "toString", "clearTimeout", "id", "buffer", "order", "fn", "getData", "index", "ary", "chars", "toNumber", "setData", "noop", "othValue", "flatten", "transforms", "reference", "count", "chunk", "compact", "difference", "fill", "findIndex", "join", "union", "zip", "toArray", "parent", "clone", "filter", "find", "forEach", "isString", "sortBy", "now", "after", "before", "bind", "debounce", "timerId", "flush", "flip", "once", "spread", "throttle", "wrap", "isArrayBuffer", "isBoolean", "isDate", "isElement", "isEmpty", "isError", "isFinite", "isInteger", "isNaN", "isNumber", "isNil", "isRegExp", "isUndefined", "sign", "assign", "create", "prototype", "defaults", "findKey", "has", "merge", "clamp", "camelCase", "capitalize", "endsWith", "position", "parseInt", "snakeCase", "split", "interpolate", "trim", "truncate", "unescape", "flow", "matches", "chain", "add", "ceil", "floor", "max", "maxBy", "min", "round", "sumBy", "value", "BufferParameters", "_classCallCheck", "constructor_", "apply", "this", "arguments", "_createClass", "key", "value", "_endCapStyle", "_isSingleSided", "quadSegs", "_quadrantSegments", "_joinStyle", "JOIN_BEVEL", "JOIN_MITRE", "_mitreLimit", "Math", "abs", "JOIN_ROUND", "DEFAULT_QUADRANT_SEGMENTS", "joinStyle", "simplifyFactor", "_simplifyFactor", "endCapStyle", "mitreLimit", "isSingleSided", "CAP_ROUND", "DEFAULT_MITRE_LIMIT", "DEFAULT_SIMPLIFY_FACTOR", "length", "quadrantSegments", "setQuadrantSegments", "setEndCapStyle", "setJoinStyle", "setMitreLimit", "alpha", "PI", "cos", "CAP_FLAT", "CAP_SQUARE", "Exception", "_Error", "message", "_this", "_callSuper", "name", "Object", "keys", "_inherits", "_wrapNativeSuper", "Error", "IllegalArgumentException", "_Exception", "GeometryComponentFilter", "geom", "Comparable", "Clonable", "Serializable", "BIAS", "log2", "floor", "pow", "MAX_REL_BITS_INTEGER", "EXP_BIT_MASK", "f64buf", "i32buf", "NumberUtil", "x1", "x2", "tolerance", "Long", "high", "low", "i", "mask", "result", "Double", "Comparator", "NaN", "isNaN", "n", "Number", "isInfinite", "isFinite", "MAX_VALUE", "POSITIVE_INFINITY", "NEGATIVE_INFINITY", "Float64Array", "Int32Array", "buffer", "doubleToLongBits", "longBitsToDouble", "bits", "x", "y", "f", "skip", "sign", "exp", "Infinity", "fract", "RuntimeException", "AssertionFailedException", "_RuntimeException", "call", "Assert", "shouldNeverReachHere", "assertion", "isTrue", "expectedValue", "actualValue", "equals", "kBuf", "ArrayBuffer", "kBufAsF64", "kBufAsI32", "Coordinate", "ordinateIndex", "X", "Y", "Z", "setZ", "other", "c", "equalsWithTolerance", "m", "M", "z", "getZ", "equals2D", "o", "e", "CloneNotSupportedException", "dx", "dy", "dz", "sqrt", "hashCode", "get", "Cloneable", "NULL_ORDINATE", "DimensionalComparator", "c1", "c2", "compX", "compare", "compY", "_dimensionsToTest", "dimensionsToTest", "a", "b", "Envelope", "getWidth", "getHeight", "otherEnvelope", "isNull", "_maxx", "getMaxX", "_maxy", "getMaxY", "_minx", "getMinX", "_miny", "getMinY", "env", "intersects", "intMinX", "intMinY", "p", "covers", "w", "h", "expandToInclude", "transX", "transY", "init", "distance", "expandBy", "deltaX", "deltaY", "setToNull", "p1", "p2", "y1", "y2", "q", "q1", "q2", "minq", "min", "maxq", "max", "minp", "maxp", "Geometry", "getTypeCode", "TYPECODE_GEOMETRYCOLLECTION", "_factory", "equalsExact", "geometryChangedFilter", "_envelope", "g", "norm", "isEmpty", "compareToSameClass", "comp", "_userData", "_SRID", "getFactory", "toGeometry", "getEnvelopeInternal", "copy", "normalize", "res", "reverseInternal", "envelope", "setSRID", "getSRID", "copyInternal", "getPrecisionModel", "computeEnvelopeInternal", "SRID", "userData", "iterator", "j", "hasNext", "aElement", "next", "bElement", "comparison", "compareTo", "getClass", "TYPECODE_MULTIPOINT", "TYPECODE_MULTILINESTRING", "TYPECODE_MULTIPOLYGON", "geometries", "array", "factory", "TYPECODE_POINT", "TYPECODE_LINESTRING", "TYPECODE_LINEARRING", "TYPECODE_POLYGON", "TYPENAME_POINT", "TYPENAME_MULTIPOINT", "TYPENAME_LINESTRING", "TYPENAME_LINEARRING", "TYPENAME_MULTILINESTRING", "TYPENAME_POLYGON", "TYPENAME_MULTIPOLYGON", "TYPENAME_GEOMETRYCOLLECTION", "interfaces_", "filter", "geometryChangedAction", "Location", "locationValue", "EXTERIOR", "BOUNDARY", "INTERIOR", "NONE", "Collection", "NoSuchElementException", "UnsupportedOperationException", "Set", "_Collection", "HashSet", "_Set", "map", "Map", "addAll", "has", "set", "_step", "_iterator", "_createForOfIteratorHelper", "s", "done", "add", "err", "size", "Array", "from", "values", "Iterator", "Symbol", "_this$iterator$next", "current", "_this$iterator$next2", "Position", "position", "LEFT", "RIGHT", "ON", "EmptyStackException", "IndexOutOfBoundsException", "List", "Stack", "_List", "push", "index", "pop", "empty", "indexOf", "slice", "hasInterface", "StringBuffer", "str", "substr", "Integer", "Character", "toUpperCase", "DD", "_hi", "_lo", "insertDecimalPoint", "magnitude", "mag", "scale", "TEN", "divide", "gt", "lt", "ONE", "multiply", "decimalPointPos", "buf", "numDigits", "MAX_PRINT_DIGITS", "append", "digit", "trunc", "rebiasBy10", "digitChar", "subtract", "valueOf", "selfAdd", "continueExtractingDigits", "remMag", "toString", "negate", "isZero", "le", "selfDivide", "tc", "ty", "C", "U", "yhi", "ylo", "hc", "hy", "u", "SPLIT", "createNaN", "r", "selfMultiply", "sqr", "reciprocal", "fhi", "ceil", "flo", "ge", "isNegative", "ax", "axdd", "d2", "H", "S", "T", "t", "zhi", "zlo", "tx", "hx", "ex", "toStandardNotation", "toSciNotation", "specialStr", "getSpecialNumberString", "fill", "sigDigits", "extractSignificantDigits", "num", "charAt", "stringOfChar", "numZeroes", "SCI_NOT_ZERO", "digits", "expStr", "SCI_NOT_EXPONENT_CHAR", "IllegalStateException", "trailingDigits", "substring", "digitsWithDecimal", "dd", "hi", "lo", "isPositive", "parse", "determinant", "selfSubtract", "strlen", "isWhitespace", "signCh", "val", "numBeforeDec", "hasDecimalChar", "ch", "isDigit", "d", "parseInt", "NumberFormatException", "val2", "numDecPlaces", "xAbs", "xLog10", "log", "xMag", "len", "TWO_PI", "PI_2", "E", "EPS", "CGAlgorithmsDD", "orientationIndexFilter", "dx1", "dy1", "dx2", "dy2", "signum", "px", "py", "pw", "qx", "qy", "qw", "xInt", "doubleValue", "yInt", "pa", "pb", "pc", "detsum", "detleft", "detright", "det", "errbound", "DP_SAFE_EPSILON", "CoordinateSequence", "hasM", "mIndex", "getDimension", "getMeasures", "getOrdinate", "hasZ", "Orientation", "orientationIndex", "ring", "nPts", "hiPt", "hiIndex", "iPrev", "iNext", "prev", "disc", "getCoordinate", "CLOCKWISE", "COUNTERCLOCKWISE", "COLLINEAR", "STRAIGHT", "RightmostEdgeFinder", "_minCoord", "de", "side", "getRightmostSideOfSegment", "checkForRightmostCoordinate", "pts", "_minDe", "getEdge", "getCoordinates", "_minIndex", "pPrev", "pNext", "orientation", "usePrev", "coord", "pos", "_orientedDe", "star", "getNode", "getEdges", "getRightmostEdge", "isForward", "getSym", "dirEdgeList", "findRightmostEdgeAtNode", "findRightmostEdgeAtVertex", "getRightmostSide", "TopologyException", "msg", "pt", "LinkedList", "shift", "ArrayList", "splice", "element", "oldElement", "comparator", "sort", "arrayList", "remove", "BufferSubgraph", "it", "_dirEdgeList", "setVisited", "_rightMostCoord", "startEdge", "isVisited", "computeDepths", "copySymDepths", "outsideDepth", "clearVisitedEdges", "_finder", "getLabel", "setEdgeDepths", "node", "addReachable", "findEdge", "getDepth", "isInteriorAreaEdge", "setInResult", "nodesVisited", "nodeQueue", "startNode", "addLast", "removeFirst", "computeNodeDepth", "sym", "adjNode", "contains", "graph", "_env", "edgeEnv", "nodeStack", "setDepth", "_nodes", "symNode", "Intersection", "minX0", "minY0", "maxX0", "maxY0", "minX1", "minY1", "maxX1", "maxY1", "midx", "midy", "p1x", "p1y", "p2x", "p2y", "q1x", "q1y", "q2x", "q2y", "System", "src", "srcPos", "dest", "destPos", "MathUtil", "ln", "LOG_10", "v1", "v2", "v3", "v4", "isInteger", "Distance", "A", "B", "D", "pointToSegment", "noIntersection", "denom", "r_num", "len2", "line", "minDistance", "dist", "CoordinateSequenceFactory", "dimension", "create", "CoordinateFilter", "Length", "x0", "y0", "Lineal", "CoordinateSequences", "minDim", "dim", "setOrdinate", "seq", "indexOfFirstCoordinate", "scroll", "isRing", "firstCoordinate", "ensureRing", "last", "k", "cs1", "cs2", "cs1Size", "minCoordinateIndex", "to", "minCoordIndex", "minCoord", "testCoord", "fact", "newseq", "mid", "swap", "tmp", "copyCoord", "createClosedRing", "coordinate", "Dimension", "dimensionValue", "FALSE", "SYM_FALSE", "TRUE", "SYM_TRUE", "DONTCARE", "SYM_DONTCARE", "P", "SYM_P", "L", "SYM_L", "SYM_A", "dimensionSymbol", "GeometryFilter", "CoordinateSequenceFilter", "LineString", "_Geometry", "_points", "expandEnvelope", "isClosed", "isSimple", "toCoordinateArray", "isEquivalentClass", "otherLineString", "equal", "_superPropGet", "reverse", "getCoordinateN", "getNumPoints", "createLineString", "getPointN", "ofLine", "isDone", "isGeometryChanged", "geometryChanged", "points", "getCoordinateSequenceFactory", "createPoint", "Puntal", "Point", "_coordinates", "getX", "getY", "point", "createGeometryCollection", "coordinates", "Area", "ofRingSigned", "sum", "p0", "Arrays", "_arguments", "concat", "_step2", "_iterator2", "_step3", "_iterator3", "original", "newLength", "Polygonal", "Polygon", "_shell", "shellCoordinates", "_holes", "childCoordinates", "area", "ofRing", "getCoordinateSequence", "shellCopy", "holeCopies", "getNumInteriorRing", "prevX", "prevY", "otherPolygon", "thisShell", "otherPolygonShell", "normalized", "clockwise", "isCCW", "shell", "getExteriorRing", "holes", "getInteriorRingN", "createPolygon", "getLength", "numPoints", "convexHull", "otherShell", "poly", "shellComp", "nHole1", "nHole2", "thisHole", "otherHole", "holeComp", "createMultiLineString", "rings", "createLinearRing", "hasNullElements", "hasNonEmptyElements", "SortedSet", "TreeSet", "_SortedSet", "GeometryCollection", "_geometries", "getArea", "otherCollection", "getBoundaryDimension", "numGeometries", "reversed", "buildGeometry", "theseElements", "asList", "otherElements", "gc", "n1", "getNumGeometries", "n2", "thisGeom", "getGeometryN", "otherGeom", "checkNotGeometryCollection", "MultiPoint", "_GeometryCollection", "LinearRing", "_LineString", "MINIMUM_VALID_SIZE", "validateConstruction", "CoordinateXY", "_Coordinate", "CoordinateXYM", "_m", "getM", "CoordinateXYZM", "Coordinates", "measures", "CoordinateList", "_ArrayList", "allowRepeated", "isChanged", "clone", "toArray", "coordArrayType", "obj", "start", "end", "inc", "duplicate", "ensureCapacity", "CoordinateArrays", "testPts", "testPt", "newCoordinates", "arraycopy", "coord1", "coord2", "coordinateComparator", "coordList", "hasRepeatedPoints", "nonNull", "newCoord", "srcStart", "destStart", "pts1", "pts2", "clamp", "npts", "extractPts", "iPts", "ForwardComparator", "o1", "o2", "BidirectionalComparator", "forwardComp", "isEqualReversed", "dir1", "increasingDirection", "dir2", "i1", "i2", "comparePt", "StringBuilder", "CoordinateArraySequence", "setCoordinate", "createCoordinate", "_dimension", "_measures", "cloneCoordinates", "strBuilder", "coordSeq", "getCoordinateCopy", "CoordinateArraySequenceFactory", "instance", "spatial", "instanceObject", "MultiPolygon", "polygons", "allRings", "getBoundary", "allRingsArray", "HashMap", "_MapInterface", "hashSet", "entries", "forEach", "entry", "MapInterface", "PrecisionModel", "otherPrecisionModel", "_modelType", "_scale", "getMaximumSignificantDigits", "otherSigDigits", "FLOATING", "FLOATING_SINGLE", "description", "FIXED", "getScale", "round", "makePrecise", "maxSigDigits", "Type", "modelType", "setScale", "pm", "pm1", "pm2", "nameToTypeMap", "_name", "put", "maximumPreciseValue", "MultiLineString", "lineStrings", "GeometryFactory", "geomList", "geomType", "isHeterogeneous", "hasGeometryCollection", "partType", "toGeometryArray", "geom0", "createMultiPolygon", "toPolygonArray", "toLineStringArray", "createMultiPoint", "toPointArray", "getGeometryType", "_coordinateSequenceFactory", "_precisionModel", "ptSeq", "coordinateSequenceFactory", "precisionModel", "getDefaultCoordinateSequenceFactory", "multiPolygons", "multiPolygonArray", "geometryArray", "multiLineStrings", "multiLineStringArray", "lineStringArray", "multiPoints", "multiPointArray", "linearRings", "linearRingArray", "pointArray", "polygonArray", "exemplar", "GeometryLayout", "GeometryType", "POINT", "LINE_STRING", "LINEAR_RING", "POLYGON", "MULTI_POINT", "MULTI_LINE_STRING", "MULTI_POLYGON", "GEOMETRY_COLLECTION", "CIRCLE", "EMPTY", "TokenType", "type", "Lexer", "wkt", "index_", "opt_decimal", "nextChar_", "isNumeric_", "readNumber_", "isAlpha_", "readText_", "isWhiteSpace_", "nextToken", "decimal", "scientificNotation", "parseFloat", "Parser", "lexer", "lexer_", "token_", "layout_", "isMatch", "isTokenType", "consume_", "parseGeometry_", "layout", "dimToken", "dimInfo", "match", "isEmptyGeometry_", "formatErrorMessage_", "parsePoint_", "parsePointList_", "parseLineStringTextList_", "parsePointTextList_", "parsePolygonTextList_", "dimensions", "token", "parsePointText_", "parseLineStringText_", "parsePolygonText_", "o2c", "ordinates", "_construct", "_toConsumableArray", "ca2p", "parseGeometryLayout_", "parseGeometryCollectionText_", "components", "parseMultiPointText_", "parseMultiLineStringText_", "parseMultiPolygonText_", "encodePointGeometry", "cs", "join", "encodeLineStringGeometry", "ii", "encodePolygonGeometry", "GeometryEncoder", "encode", "geometryEncoder", "WKTParser", "geometryFactory", "geometry", "WKTWriter", "parser", "write", "LineIntersector", "segmentIndex", "intIndex", "computeIntLineIndex", "_intLineIndex", "catBuilder", "isEndPoint", "_isProper", "isCollinear", "p3", "p4", "_inputLines", "_result", "computeIntersect", "getEdgeDistance", "hasIntersection", "isInteriorIntersection", "inputLineIndex", "_intPt", "NO_INTERSECTION", "computeEdgeDistance", "COLLINEAR_INTERSECTION", "toLineString", "getTopologySummary", "ptIndex", "_pa", "_pb", "pdx", "pdy", "DONT_INTERSECT", "DO_INTERSECT", "POINT_INTERSECTION", "RobustLineIntersector", "_LineIntersector", "intPt", "env0", "env1", "intersectionSafe", "isInSegmentEnvelopes", "nearestEndpoint", "intPtDD", "intersection", "isIn", "out", "println", "p1q1p2", "p1q2p2", "q1p1q2", "q1p2q2", "Pq1", "Pq2", "Qp1", "Qp2", "computeCollinearIntersection", "nearestPt", "minDist", "RayCrossingCounter", "_p", "_isPointOnSegment", "minx", "maxx", "orient", "_crossingCount", "getLocation", "counter", "countSegment", "isOnSegment", "PointLocation", "lineIntersector", "computeIntersection", "locatePointInRing", "locateInRing", "TopologyLocation", "locValue", "location", "gl", "newLoc", "temp", "toLocationSymbol", "on", "left", "right", "posIndex", "setLocation", "locIndex", "setAllLocations", "loc", "Label", "count", "elt", "geomIndex", "setAllLocationsIfNull", "isLine", "lbl", "merge", "flip", "isArea", "isAnyNull", "isEqualOnSide", "allPositionsEqual", "onLoc", "leftLoc", "rightLoc", "setLocations", "label", "lineLabel", "EdgeRing", "_ring", "_pts", "_geometryFactory", "_isHole", "_label", "getGeometryCount", "_startDe", "isFirstEdge", "getEdgeRing", "_edges", "mergeLabel", "addPoints", "setEdgeRing", "getNext", "_maxNodeDegree", "degree", "getOutgoingDegree", "edge", "edgePts", "startIndex", "getLinearRing", "isInRing", "containsPoint", "computeMaxNodeDegree", "deLabel", "addHole", "holeLR", "computePoints", "computeRing", "MinimalEdgeRing", "_EdgeRing", "er", "setMinEdgeRing", "getNextMin", "MaximalEdgeRing", "minEdgeRings", "getMinEdgeRing", "minEr", "linkMinimalDirectedEdges", "GraphComponent", "_isVisited", "isInResult", "_isInResult", "_isCovered", "_isCoveredSet", "isCovered", "im", "computeIM", "Node", "_GraphComponent", "_coord", "label2", "eltIndex", "nLoc", "argIndex", "onLocation", "computeMergedLocation", "insert", "setNode", "edges", "SortedMap", "_Map", "colorOf", "color", "parentOf", "parent", "setColor", "leftOf", "rightOf", "TreeMap", "_SortedMap", "root_", "size_", "cmp", "getValue", "getKey", "oldValue", "fixAfterInsertion", "rotateLeft", "rotateRight", "getFirstEntry", "successor", "l", "NodeMap", "nodeMap", "nodeFact", "createNode", "print", "bdyNodes", "addNode", "Quadrant", "quad", "NE", "NW", "quad1", "quad2", "halfPlane", "SE", "SW", "EdgeEnd", "_dx", "_dy", "_quadrant", "_p0", "_p1", "_node", "angle", "atan2", "className", "getName", "lastDotPos", "lastIndexOf", "compareDirection", "_edge", "boundaryNodeRule", "quadrant", "DirectedEdge", "_EdgeEnd", "_nextMin", "_depth", "_isForward", "_next", "depthVal", "nextMin", "getDepthDelta", "minEdgeRing", "_minEdgeRing", "isExteriorIfArea0", "isExteriorIfArea1", "edgeRing", "_edgeRing", "depthDelta", "_sym", "printReverse", "depth", "directionFactor", "oppositePos", "opposite", "oppositeDepth", "computeDirectedLabel", "currLocation", "nextLocation", "NodeFactory", "PlanarGraph", "eiList", "find", "nodeit", "linkResultDirectedEdges", "linkAllDirectedEdges", "ep0", "ep1", "_edgeEndList", "eCoord", "matchInSameDirection", "getEdgeEnds", "ee", "edgesToAdd", "de1", "de2", "setSym", "nodes", "PolygonBuilder", "edgeRings", "shellList", "freeHoleList", "isHole", "resultPolyList", "toPolygon", "hole", "getShell", "findEdgeRingContaining", "setShell", "maxEdgeRings", "getMaxNodeDegree", "linkDirectedEdgesForMinimalEdgeRings", "buildMinimalRings", "findShell", "placePolygonHoles", "dirEdges", "computePolygons", "_shellList", "shellCount", "getNodes", "buildMaximalEdgeRings", "buildMinimalEdgeRings", "sortShellsAndHoles", "placeFreeHoles", "testEr", "testRing", "testEnv", "minShell", "minShellEnv", "tryShell", "tryShellRing", "tryShellEnv", "ptNotInList", "isContained", "Boundable", "ItemBoundable", "_item", "_bounds", "bounds", "item", "PriorityQueue", "minItem", "_items", "_size", "reorder", "child", "clear", "SpatialIndex", "itemEnv", "AbstractNode", "_level", "_childBoundables", "childBoundable", "computeBounds", "level", "Collections", "reverseOrder", "alen", "singletonList", "EnvelopeDistance", "ax1", "ay1", "ax2", "ay2", "bx1", "by1", "bx2", "by2", "env2", "miny", "maxy", "aminx", "aminy", "amaxx", "amaxy", "bminx", "bminy", "bmaxx", "bmaxy", "maxDistance", "BoundablePair", "maximumDistance", "_boundable1", "getBounds", "_boundable2", "priQ", "isComp1", "isComposite", "isComp2", "expand", "nd", "_distance", "bndComposite", "bndOther", "isFlipped", "getChildBoundables", "bp", "_itemDistance", "getDistance", "isLeaves", "boundable1", "boundable2", "itemDistance", "ItemVisitor", "AbstractSTRtree", "searchBounds", "visitor", "childBoundables", "getIntersectsOp", "queryInternal", "visitItem", "getItem", "matches", "_nodeCapacity", "build", "_root", "childToRemove", "valuesTree", "itemsTree", "valuesTreeForNode", "valuesTreeForChild", "_built", "_itemBoundables", "boundables", "boundablesAtLevel", "top", "getLevel", "boundable", "createHigherLevels", "found", "removeItem", "childToPrune", "boundablesOfALevel", "parentBoundables", "createParentBoundables", "maxChildDepth", "childDepth", "newLevel", "sortedChildBoundables", "getComparator", "lastNode", "getNodeCapacity", "addChildBoundable", "DEFAULT_NODE_CAPACITY", "nodeCapacity", "IntersectsOp", "ItemDistance", "item1", "item2", "STRtree", "_AbstractSTRtree", "verticalSlices", "createParentBoundablesFromVerticalSlice", "initBndPair", "nearestNeighbourK", "distanceLowerBound", "kNearestNeighbors", "bndPair", "poll", "pairDistance", "peek", "expandToQueue", "getItems", "STRtreeNode", "intersectsOp", "sliceCount", "sliceCapacity", "slices", "boundablesAddedToSlice", "searchEnv", "yComparator", "minLeafCount", "xComparator", "createParentBoundablesFromVerticalSlices", "itemDist", "getRoot", "nearestNeighbour", "minPair", "getBoundable", "tree", "bnd", "distanceUpperBound", "isWithinDistance", "avg", "items", "_AbstractNode", "_this2", "_class", "compareDoubles", "centreX", "_class2", "centreY", "_class3", "aBounds", "bBounds", "SegmentPointComparator", "octant", "xSign", "relativeSign", "ySign", "compareValue", "compareSign0", "compareSign1", "SegmentNode", "_isInterior", "_segmentOctant", "maxSegmentIndex", "_segString", "segString", "segmentOctant", "SegmentNodeList", "addEndpoints", "eiPrev", "ei", "addEdgeCoordinates", "collapsedVertexIndexes", "findCollapsesFromInsertedNodes", "findCollapsesFromExistingVertices", "vertexIndex", "intValue", "ei0", "ei1", "lastSegStartPt", "useIntPt1", "isInterior", "ipt", "createSplitEdgePts", "_nodeMap", "edgeList", "addCollapsedNodes", "newEdge", "createSplitEdge", "collapsedVertexIndex", "numVerticesBetween", "findCollapseIndex", "maxSegIndex", "NodedSegmentString", "getData", "eiNew", "getSegmentOctant", "splitEdges", "pt0", "splitnPts", "ptn", "Octant", "adx", "ady", "SegmentString", "data", "NodableSegmentString", "safeOctant", "_data", "addIntersectionNode", "getIntersection", "addIntersection", "_nodeList", "normalizedSegmentIndex", "nextSegIndex", "nextPt", "li", "getIntersectionNum", "segStrings", "resultEdgelist", "getNodedSubstrings", "getNodeList", "addSplitEdges", "LineSegment", "seg", "orient0", "orient1", "geomFactory", "projectionFactor", "pf0", "pf1", "newp0", "project", "newp1", "pointToLinePerpendicular", "midPoint", "closestPt", "close00", "closestPoint", "close01", "close10", "close11", "factor", "comp0", "segmentLengthFraction", "offsetDistance", "segx", "segy", "ux", "uy", "ls", "setCoordinates", "inputPt", "segFrac", "A2plusB2", "A2subB2", "segmentToSegment", "bits0", "hash0", "bits1", "MonotoneChainOverlapAction", "start1", "mc2", "start2", "getLineSegment", "_overlapSeg1", "_overlapSeg2", "overlap", "MonotoneChain", "start0", "end0", "mcs", "select", "computeSelect", "_end", "_start", "mc", "mco", "computeOverlaps", "end1", "overlaps", "mid0", "mid1", "id", "_id", "_context", "context", "MonotoneChainBuilder", "safeStart", "chainQuad", "getChains", "mcList", "chainStart", "chainEnd", "findChainEnd", "Noder", "SinglePassNoder", "segInt", "_segInt", "setSegmentIntersector", "MCIndexNoder", "_SinglePassNoder", "_monoChains", "_nodedSegStrings", "_index", "segStr", "setId", "_idCounter", "getEnvelope", "inputSegStrings", "intersectChains", "overlapAction", "SegmentOverlapAction", "queryChain", "query", "testChain", "getId", "_nOverlaps", "si", "_MonotoneChainOverlap", "ss1", "getContext", "ss2", "_si", "processIntersections", "BufferInputLineSimplifier", "i0", "distanceTol", "_inputLine", "isConcave", "isShallow", "isShallowSampled", "midIndex", "findNextNonDeletedIndex", "lastIndex", "isMiddleVertexDeleted", "isDeletable", "_distanceTol", "_isDeleted", "DELETE", "_angleOrientation", "NUM_PTS_TO_CHECK", "deleteShallowConcavities", "collapseLine", "inputLine", "simplify", "INIT", "KEEP", "OffsetSegmentString", "_ptList", "COORDINATE_ARRAY_TYPE", "bufPt", "isRedundant", "addPt", "lastPt", "_minimimVertexDistance", "startPt", "minimimVertexDistance", "Angle", "radians", "PI_TIMES_2", "dx0", "dy0", "anglePrev", "angleNext", "tip1", "tail", "tip2", "a1", "a2", "diff", "ang1", "ang2", "delAngle", "angleDegrees", "crossproduct", "sin", "angDel", "PI_OVER_2", "PI_OVER_4", "OffsetSegmentGenerator", "addStartPoint", "_s0", "_s1", "_s2", "_seg0", "computeOffsetSegment", "_side", "_offset0", "_seg1", "_offset1", "outsideTurn", "addCollinear", "addOutsideTurn", "addInsideTurn", "offsetL", "offsetR", "_bufParams", "getEndCapStyle", "_segList", "addDirectedFillet", "squareCapSideOffset", "squareCapLOffset", "squareCapROffset", "offset0", "offset1", "getMitreLimit", "addLimitedMitreJoin", "OFFSET_SEGMENT_SEPARATION_FACTOR", "getJoinStyle", "addMitreJoin", "addBevelJoin", "addCornerFillet", "closeRing", "addPts", "direction", "radius", "startAngle", "endAngle", "s1", "s2", "basePt", "ang0", "angDiffHalf", "angleBetweenOriented", "midAng", "mitreMidAng", "mitreDist", "bevelHalfLen", "bevelMidX", "bevelMidY", "bevelMidPt", "mitreMidLine", "bevelEndLeft", "pointAlongOffset", "bevelEndRight", "totalAngle", "nSegs", "_filletAngleQuantum", "angleInc", "offset", "sideSign", "_li", "_hasNarrowConcaveAngle", "INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR", "_closingSegLengthFactor", "_maxCurveSegmentError", "setPrecisionModel", "setMinimumVertexDistance", "CURVE_VERTEX_SNAP_DISTANCE_FACTOR", "bufParams", "getQuadrantSegments", "MAX_CLOSING_SEG_LEN_FACTOR", "OffsetCurveBuilder", "inputPts", "isRightSide", "posDistance", "segGen", "getSegGen", "computePointCurve", "computeOffsetCurve", "curvePts", "distTol", "simplifyTolerance", "addSegments", "simp2", "initSideSegments", "addFirstSegment", "addNextSegment", "simp1", "addLastSegment", "simp", "addLineEndCap", "createCircle", "createSquare", "isLineOffsetEmpty", "computeSingleSidedBufferCurve", "computeLineBufferCurve", "bufDistance", "getSimplifyFactor", "getLineCurve", "copyCoordinates", "computeRingBufferCurve", "SubgraphDepthLocater", "stabbingRayLeftPt", "stabbedSegments", "_subgraphs", "bsg", "findStabbedSegments", "getDirectedEdges", "dirEdge", "_seg", "isHorizontal", "ds", "DepthSegment", "_leftDepth", "subgraphs", "_upwardSeg", "minX", "maxX", "orientIndex", "seg0", "seg1", "compare0", "NotRepresentableException", "HCoordinate", "_x", "_y", "_w", "Triangle", "signedArea", "interpolateZ", "longestSideLength", "isAcute", "circumcentre", "area3D", "centroid", "inCentre", "m00", "m01", "m10", "m11", "v0", "lenAB", "lenBC", "lenCA", "maxLen", "ay", "bx", "by", "asqr", "bsqr", "numx", "numy", "ccx", "ccy", "cx", "cy", "l1", "l2", "len0", "frac", "uz", "vx", "vy", "vz", "crossx", "crossy", "crossz", "absSq", "len1", "circum", "inCentreX", "inCentreY", "OffsetCurveSetBuilder", "cwLeftLoc", "cwRightLoc", "curve", "_curveBuilder", "getRingCurve", "addCurve", "addRingSide", "offsetSide", "shellCoord", "removeRepeatedPoints", "isErodedCompletely", "holeCoord", "triangleCoord", "bufferDistance", "tri", "getBufferParameters", "addRingBothSides", "_curveList", "_inputGeom", "addPolygon", "addLineString", "addPoint", "addCollection", "ringCoord", "isTriangleErodedCompletely", "envMinDimension", "inputGeom", "curveBuilder", "PointOnGeometryLocator", "GeometryCollectionIterator", "_atStart", "isAtomic", "_parent", "_subcollectionIterator", "_max", "SimplePointInAreaLocator", "locate", "_geom", "shellLoc", "holeLoc", "locatePointInPolygon", "geomi", "g2", "locateInGeometry", "EdgeEndStar", "_edgeList", "iNextCW", "startLoc", "currLoc", "geomGraph", "computeEdgeEndLabels", "getBoundaryNodeRule", "checkAreaLabelsConsistent", "lastEdgeIndex", "eSearch", "_edgeMap", "_ptInAreaLocation", "getGeometry", "computeLabel", "propagateSideLabels", "hasDimensionalCollapseEdge", "DirectedEdgeStar", "_EdgeEndStar", "getResultAreaEdges", "firstOut", "incoming", "state", "_SCANNING_FOR_INCOMING", "_resultAreaEdgeList", "nextOut", "nextIn", "_LINKING_TO_OUTGOING", "setNext", "insertEdgeEnd", "de0", "deLast", "quad0", "getQuadrant", "isNorthern", "getDy", "nodeLabel", "prevOut", "firstIn", "edgeIndex", "findIndex", "startDepth", "targetLastDepth", "nextDepth", "endIndex", "currDepth", "nextDe", "setNextMin", "isLineEdge", "setCovered", "eLabel", "eLoc", "OverlayNodeFactory", "_NodeFactory", "OrientedCoordinateArray", "oca", "compareOriented", "_orientation", "orientation1", "orientation2", "limit1", "limit2", "compPt", "done1", "done2", "EdgeList", "edgeColl", "_ocaMap", "SegmentIntersector", "e0", "segIndex0", "e1", "segIndex1", "IntersectionAdder", "isAdjacentSegments", "_properIntersectionPoint", "_hasProperInterior", "_hasProper", "numTests", "p00", "p01", "p10", "p11", "numIntersections", "numInteriorIntersections", "_hasInterior", "isTrivialIntersection", "_hasIntersection", "addIntersections", "isProper", "numProperIntersections", "_isSelfIntersection", "EdgeIntersection", "EdgeIntersectionList", "Edge", "IntersectionMatrix", "isDisjoint", "_matrix", "dimensionSymbols", "row", "col", "toDimensionValue", "column", "minimumDimensionSymbols", "setAtLeast", "minimumDimensionValue", "dimensionOfGeometryA", "dimensionOfGeometryB", "isTouches", "builder", "ai", "bi", "setCharAt", "toDimensionSymbol", "requiredDimensionSymbols", "setAll", "elements", "actualDimensionValue", "requiredDimensionSymbol", "IntArrayList", "capacity", "copyOf", "initialCapacity", "MonotoneChainIndexer", "startIndexList", "toIntArray", "list", "MonotoneChainEdge", "chainIndex", "chainIndex0", "mce", "chainIndex1", "computeIntersectsForChain", "mcb", "getChainStartIndices", "Depth", "depthValue", "NULL_VALUE", "minDepth", "newValue", "depthAtLocation", "newPts", "toLineLabel", "_isIsolated", "isIsolated", "isEqualForward", "isEqualReverse", "iRev", "_depthDelta", "updateIM", "_mce", "setAtLeastIfValid", "BufferBuilder", "_workingPrecisionModel", "existingEdge", "findEqualEdge", "existingLabel", "labelToMerge", "isPointwiseEqual", "mergeDelta", "newDelta", "setDepthDelta", "subgraphList", "polyBuilder", "processedGraphs", "subgraph", "getRightmostCoordinate", "computeDepth", "findResultEdges", "_geomFact", "_workingNoder", "noder", "bufferSegStrList", "getCurves", "createEmptyResultGeometry", "computeNodedEdges", "_graph", "addEdges", "createSubgraphs", "buildSubgraphs", "getPolygons", "getNoder", "computeNodes", "oldLabel", "insertUniqueEdge", "lLoc", "rLoc", "lines", "ss", "ScaledNoder", "rescale", "_scaleFactor", "_offsetX", "_offsetY", "nodedSegmentStrings", "roundPts", "splitSS", "_noder", "_isScaled", "intSegStrings", "scaleFactor", "isIntegerPrecision", "NodingValidator", "_segStrings", "checkEndPtVertexIntersections", "ss0", "checkInteriorIntersections", "pts0", "hasInteriorIntersection", "checkCollapses", "checkCollapse", "HotPixel", "segMinx", "segMaxx", "segMiny", "segMaxy", "isOutsidePixelEnv", "intersectsToleranceSquare", "_corner", "intersectsScaled", "copyScaled", "_p0Scaled", "_p1Scaled", "_originalPt", "pScaled", "_safeEnv", "safeTolerance", "SAFE_ENV_EXPANSION_FACTOR", "intersectsLeft", "intersectsBottom", "_pt", "segIndex", "_ptScaled", "initCorners", "MonotoneChainSelectAction", "selectedSegment", "MCIndexPointSnapper", "hotPixel", "snap", "parentEdge", "hotPixelVertexIndex", "pixelEnv", "getSafeEnvelope", "hotPixelSnapAction", "HotPixelSnapAction", "isNodeAdded", "_MonotoneChainSelectA", "_isNodeAdded", "_parentEdge", "_hotPixelVertexIndex", "_hotPixel", "addSnappedNode", "InteriorIntersectionFinderAdder", "_interiorIntersections", "MCIndexSnapRounder", "inputSegmentStrings", "resultSegStrings", "nv", "checkValid", "printStackTrace", "intersections", "findInteriorIntersections", "computeIntersectionSnaps", "computeVertexSnaps", "intFinderAdder", "getInteriorIntersections", "edge0", "_pointSnapper", "getIndex", "snapRound", "snapPts", "snapPt", "_pm", "BufferOp", "fixedPM", "bufBuilder", "setWorkingPrecisionModel", "setNoder", "_resultGeometry", "_argGeom", "precDigits", "MAX_PRECISION_DIGITS", "bufferReducedPrecision", "_saveException", "precisionDigits", "sizeBasedScaleFactor", "precisionScaleFactor", "bufferFixedPrecision", "bufferOriginalPrecision", "argPM", "getType", "computeGeometry", "getResultGeometry", "bufOp", "maxPrecisionDigits", "bufEnvMax", "minUnitLog10", "CAP_BUTT", "geometryTypes", "GeoJSONParser", "json", "JSON", "extract", "Feature", "feature", "read", "bbox", "FeatureCollection", "featureCollection", "features", "sub", "linearRing", "polygon", "multipoint", "geoJson", "linestring", "multilinestring", "shellGeoJson", "holeGeoJson", "multipolygon", "collection", "GeoJSONReader", "GeoJSONWriter", "module", "ClipperLib", "isNode", "a", "b", "c", "i", "x", "w", "j", "n", "v", "l", "h", "m", "s", "r", "k", "d", "p", "t", "y", "q", "y0", "e", "z", "r2", "g", "f", "g2", "u", "result", "e2", "E", "E2", "next", "prev", "next2", "prev2", "Direction", "b1", "b2", "a1", "a2", "join", "dx", "dy", "A", "B", "C", "distance", "scale", "polygon", "P", "ax", "ay", "sqrt", "p1", "p2", "round", "module", "array", "result", "length", "module", "sumBy", "array", "module", "e", "t", "r", "i", "n", "s", "l", "o", "a", "push", "length", "left", "right", "a", "b", "diff", "module", "id", "key", "assign", "i", "noop", "set", "array", "root", "a", "b", "x", "push", "c", "error", "fn", "previousDispatcher", "x$1", "workInProgress", "info", "location", "typeName", "e", "log", "renderLanes", "hasOwnProperty", "prefix", "get", "track", "doc", "isHydrating", "React", "object", "m", "camelize", "string", "_", "style", "getEventTarget", "getData", "start", "end", "is", "y", "offset", "prefixes", "EMPTY_ARRAY", "prev", "next", "errors", "passive", "Component", "current", "elements", "length", "siblings", "diff", "consumer", "cache", "now", "resolve", "result", "thenableState", "keys", "elementType", "componentName", "clone", "size", "action", "init", "didReadFromEntangledAsyncAction", "dispatch", "getSnapshot", "create", "bind", "treeForkCount", "n", "destroy", "snapshot", "commitStartTime", "before", "removeChild", "win", "submitter", "dispatchEvent", "getParent", "html", "delimiter", "count", "attr", "data", "href", "map", "ReactDOM", "effect", "lazy", "link", "module", "object", "Element", "Fragment", "Lazy", "isElement", "module", "require_object_assign", "module", "hasOwnProperty", "i", "n", "from", "to", "s", "key", "module", "module", "module", "has", "x", "values", "location", "error", "module", "assign", "has", "x", "is", "y", "data", "location", "i", "error", "key", "checker", "isNode", "iterator", "module", "module", "global", "factory", "hooks", "isArray", "isObject", "a", "b", "k", "isUndefined", "isNumber", "isDate", "map", "fn", "i", "extend", "format", "locale", "m", "t", "to", "from", "config", "warn", "key", "isFunction", "set", "keys", "now", "number", "sign", "token", "ordinal", "array", "length", "invalidDate", "string", "diff", "u", "localeData", "s", "p1", "p2", "p3", "p4", "y", "get", "d", "date", "n", "x", "indexOf", "o", "h", "M", "ws", "hours", "minutes", "names", "j", "next", "split", "e", "values", "data", "l", "result", "defaults", "c", "w", "tokens", "meridiem", "min", "max", "years", "months", "weeks", "days", "seconds", "milliseconds", "array2", "offset", "matches", "chunk", "model", "add", "isString", "clone", "isBetween", "toString", "toArray", "toJSON", "getter", "shift", "abs", "round", "thresholds", "module", "apply", "module", "apply", "start", "transform", "length", "array", "module", "module", "defineProperty", "e", "module", "defineProperty", "identity", "string", "module", "count", "module", "module", "identity", "start", "module", "isObjectLike", "module", "array", "length", "module", "zip", "module", "array", "start", "end", "length", "result", "module", "isObject", "object", "module", "toNumber", "sign", "module", "result", "module", "chunk", "array", "size", "length", "result", "module", "ZONE_1", "ZONE_2", "ZONE_2E", "ZONE_2N", "ZONE_2R", "ZONE_3", "ZONE_3E", "ZONE_3R", "ZONES", "ZONES_710", "ZONES_716_GABLE", "ZONES_716_HIP", "MODULE_POSITION_N", "MODULE_POSITION_EXP", "MODULE_POSITION_EDG", "MODULE_POSITION_EDGN", "MODULE_POSITION_EDGS", "MODULE_POSITIONS", "DEFAULT_ZONE_MODULE_POSITION", "ZONES_MODULE_POSITIONS", "module", "Symbol", "isArray", "module", "array", "result", "length", "module", "object", "length", "key", "module", "module", "keys", "object", "module", "length", "module", "module", "result", "key", "collection", "module", "array", "length", "module", "module", "object", "length", "result", "order", "module", "identity", "isArray", "result", "key", "collection", "object", "module", "sortBy", "length", "module", "t", "i", "r", "e", "a", "h", "n", "o", "s", "l", "f", "u", "m", "c", "p", "d", "x", "v", "M", "module", "global", "factory", "TinyQueue", "data", "defaultCompare", "i", "push", "top", "bottom", "left", "right", "a", "b", "module", "point", "start", "end", "x", "y", "inside", "i", "j", "module", "point", "start", "end", "x", "y", "inside", "i", "j", "module", "pointInPolygon", "point", "start", "end", "module", "t", "e", "n", "r", "o", "f", "i", "u", "c", "s", "a", "d", "l", "p", "b", "y", "h", "M", "x", "j", "m", "_", "v", "w", "A", "F", "O", "P", "g", "k", "q", "z", "B", "C", "D", "E", "G", "I", "K", "L", "N", "module", "RBush", "Queue", "pointInPolygon", "concaveman", "a", "b", "i", "p", "c", "d", "bbox", "inside", "intersects", "p1", "p2", "p3", "left", "top", "right", "bottom", "prev", "dx", "dy", "x", "y", "t", "x0", "y0", "x1", "y1", "x2", "y2", "e", "D", "cx", "cy", "cx2", "cy2", "module", "Cache", "key", "MAX_CACHE_SIZE", "split", "normalizePath", "data", "getter", "forEach", "isArray", "module", "join", "d", "camelCase", "next", "snakeCase", "module", "toposort", "i", "visit", "e", "attachmentSelector", "attachments", "preview", "presentation", "caption", "name", "size", "file", "attributes", "default", "tagName", "parse", "quote", "nestable", "heading1", "terminal", "breakOnReturn", "group", "code", "htmlAttributes", "text", "plaintext", "bulletList", "bullet", "listAttribute", "test", "element", "parentNode", "this", "numberList", "number", "attachmentGallery", "exclusive", "_element$tagName", "toLowerCase", "androidVersionMatch", "navigator", "userAgent", "match", "androidVersion", "parseInt", "browser$1", "composesExistingText", "recentAndroid", "samsungAndroid", "forcesObjectResizing", "supportsInputEvents", "InputEvent", "every", "prop", "prototype", "dompurify", "ADD_ATTR", "SAFE_FOR_XML", "RETURN_DOM", "lang$1", "attachFiles", "bold", "bullets", "byte", "bytes", "captionPlaceholder", "indent", "italic", "link", "numbers", "outdent", "redo", "remove", "strike", "undo", "unlink", "url", "urlPlaceholder", "GB", "KB", "MB", "PB", "TB", "sizes", "lang", "file_size_formatting", "prefix", "precision", "formatter", "concat", "base", "exp", "Math", "floor", "log", "withoutInsignificantZeros", "pow", "toFixed", "replace", "ZERO_WIDTH_SPACE", "NON_BREAKING_SPACE", "extend", "properties", "key", "value", "html", "document", "documentElement", "matches", "handleEvent", "eventName", "onElement", "matchingSelector", "withCallback", "inPhase", "preventDefault", "times", "arguments", "length", "undefined", "selector", "useCapture", "handler", "event", "destroy", "target", "findClosestElementFromNode", "call", "removeEventListener", "addEventListener", "createEvent", "bubbles", "cancelable", "initEvent", "triggerEvent", "dispatchEvent", "elementMatchesSelector", "nodeType", "node", "untilNode", "Node", "ELEMENT_NODE", "closest", "innerElementIsActive", "activeElement", "elementContainsNode", "findChildIndexOfNode", "_node", "childIndex", "previousSibling", "removeNode", "_node$parentNode", "removeChild", "walkTree", "tree", "onlyNodesOfType", "usingFilter", "expandEntityReferences", "whatToShow", "NodeFilter", "SHOW_ELEMENT", "SHOW_TEXT", "SHOW_COMMENT", "SHOW_ALL", "createTreeWalker", "makeElement", "tag", "options", "createElement", "editable", "contenteditable", "setAttribute", "style", "data", "dataset", "className", "split", "forEach", "classList", "add", "textContent", "childNodes", "childNode", "appendChild", "blockTagNames", "getBlockTagNames", "blockAttributes", "push", "nodeIsBlockContainer", "nodeIsBlockStartComment", "firstChild", "nodeIsBlockStart", "strict", "includes", "nodeIsCommentNode", "COMMENT_NODE", "nodeIsCursorTarget", "nodeIsTextNode", "trixCursorTarget", "nodeIsAttachmentElement", "nodeIsEmptyTextNode", "TEXT_NODE", "input", "level2Enabled", "getLevel", "browser", "pickFiles", "callback", "type", "multiple", "hidden", "id", "fileInputId", "files", "getElementById", "body", "click", "parser", "removeBlankTableCells", "tableCellSeparator", "tableRowSeparator", "text_attributes", "inheritable", "window", "getComputedStyle", "fontWeight", "fontStyle", "href", "groupTagName", "getAttribute", "frozen", "backgroundColor", "toolbar", "getDefaultHTML", "interval", "i", "n", "a", "attachment", "attachmentCaption", "attachmentCaptionEditor", "attachmentMetadata", "attachmentMetadataContainer", "attachmentName", "attachmentProgress", "attachmentSize", "attachmentToolbar", "l", "h", "j", "c", "V", "z", "BasicObject", "expression", "toMethod", "toProperty", "optional", "parseProxyMethodExpression", "subject", "object", "_this$toMethod", "_object", "apply", "proxyMethodExpressionPattern", "Error", "args", "Function", "RegExp", "$", "UTF16String", "box", "fromUCS2String", "toString", "ucs2String", "ucs2decode", "codepoints", "ucs2encode", "constructor", "super", "ucs2Length", "offsetToUCS2Offset", "offset", "slice", "max", "offsetFromUCS2Offset", "ucs2Offset", "fromCodepoints", "charAt", "isEqualTo", "toJSON", "getCacheKey", "hasArrayFrom", "_Array$from", "Array", "from", "hasStringCodePointAt", "_$codePointAt", "codePointAt", "hasStringFromCodePoint", "_String$fromCodePoint", "String", "fromCodePoint", "string", "map", "char", "output", "counter", "charCodeAt", "extra", "array", "result", "fromCharCode", "join", "TrixObject", "jsonString", "fromJSON", "JSON", "hasSameConstructorAs", "inspect", "parts", "contents", "contentsForInspection", "toJSONString", "stringify", "toUTF16String", "arraysAreEqual", "b", "index", "spliceArray", "_len", "_key", "splice", "RTL_PATTERN", "getDirection", "dir", "dirName", "textArea", "form", "supportsDirName", "FormData", "has", "error", "supportsDirSelector", "get", "trim", "allAttributeNames", "blockAttributeNames", "textAttributeNames", "listAttributeNames", "getAllAttributeNames", "getTextAttributeNames", "getBlockAttributeNames", "getBlockConfig", "attributeName", "config", "Object", "keys", "getTextConfig", "installDefaultCSSForTagName", "defaultCSS", "insertStyleElementForTagName", "nonce", "getCSPNonce", "head", "insertBefore", "getMetaElement", "content", "querySelector", "testTransferData", "dataTransferIsPlainText", "dataTransfer", "getData", "DOMParser", "parseFromString", "keyEventIsKeyboardCommand", "platform", "metaKey", "ctrlKey", "defer", "fn", "setTimeout", "copyObject", "objectsAreEqual", "normalizeRange", "range", "isArray", "copyValue", "rangeIsCollapsed", "start", "end", "rangeValuesAreEqual", "rangesAreEqual", "leftRange", "rightRange", "leftStart", "leftEnd", "rightStart", "rightEnd", "left", "right", "SelectionChangeObserver", "update", "bind", "selectionManagers", "started", "stop", "registerSelectionManager", "selectionManager", "unregisterSelectionManager", "filter", "sm", "notifySelectionManagersOfSelectionChange", "selectionDidChange", "reset", "selectionChangeObserver", "getDOMSelection", "selection", "getSelection", "rangeCount", "getDOMRange", "_getDOMSelection", "domRange", "getRangeAt", "domRangeIsPrivate", "setDOMRange", "removeAllRanges", "addRange", "nodeIsPrivate", "startContainer", "endContainer", "getPrototypeOf", "normalizeSpaces", "breakableWhitespacePattern", "squishBreakableWhitespace", "source", "utf16StringDifferences", "diffA", "utf16StringDifference", "utf16String", "diffB", "leftIndex", "rightIndexA", "rightIndexB", "Hash", "fromCommonAttributesOfObjects", "objects", "hash", "getKeys", "getKeysCommonToHash", "values", "copy", "merge", "unbox", "toArray", "isEmpty", "toObject", "keyToRemove", "sort", "ObjectGroup", "groupObjects", "ungroupedObjects", "depth", "asTree", "_object$canBeGrouped2", "_object$canBeGrouped", "_group$canBeGroupedWi", "_group", "canBeGrouped", "canBeGroupedWith", "getObjects", "getDepth", "ObjectMap", "find", "ElementStore", "elements", "getKey", "trixStoreKey", "Operation", "isPerforming", "performing", "hasPerformed", "performed", "hasSucceeded", "succeeded", "hasFailed", "getPromise", "promise", "Promise", "resolve", "reject", "perform", "release", "_this$promise", "_this$promise$cancel", "cancel", "proxyMethod", "ObjectView", "childViews", "rootView", "getNodes", "nodes", "createNodes", "cloneNode", "invalidate", "_this$parentView", "parentView", "invalidateViewForObject", "_this$findViewForObje", "findViewForObject", "findOrCreateCachedChildView", "viewClass", "view", "getCachedViewForObject", "recordChildView", "createChildView", "cacheViewForObject", "ObjectGroupView", "getAllChildViews", "views", "childView", "findElement", "findElementForObject", "getViewCache", "isViewCachingEnabled", "viewCache", "shouldCacheViews", "enableViewCaching", "disableViewCaching", "_this$getViewCache", "cache", "garbageCollectCachedViews", "objectKeys", "objectGroup", "getChildViews", "createContainerElement", "entries", "setPrototypeOf", "isFrozen", "getOwnPropertyDescriptor", "freeze", "seal", "create", "construct", "Reflect", "x", "func", "thisArg", "Func", "_len2", "_key2", "arrayForEach", "unapply", "arrayLastIndexOf", "lastIndexOf", "arrayPop", "pop", "arrayPush", "arraySplice", "arrayIsArray", "stringToLowerCase", "stringToString", "stringMatch", "stringReplace", "stringIndexOf", "indexOf", "stringTrim", "numberToString", "Number", "booleanToString", "Boolean", "bigintToString", "BigInt", "symbolToString", "Symbol", "objectHasOwnProperty", "hasOwnProperty", "objectToString", "regExpTest", "typeErrorCreate", "TypeError", "_len4", "_key4", "lastIndex", "_len3", "_key3", "addToSet", "set", "transformCaseFunc", "lcElement", "cleanArray", "clone", "newObject", "property", "lookupGetter", "desc", "pi", "t", "e", "r", "o", "s", "u", "d", "g", "m", "p", "f", "v", "A", "y", "C", "E", "S", "R", "T", "k", "w", "D", "L", "N", "I", "O", "F", "P", "M", "B", "_", "W", "U", "H", "q", "J", "K", "G", "X", "Y", "Z", "Q", "tt", "et", "it", "nt", "rt", "ot", "st", "at", "lt", "ct", "ut", "ht", "dt", "gt", "mt", "pt", "ft", "bt", "vt", "At", "yt", "xt", "Ct", "Et", "St", "Rt", "Tt", "kt", "wt", "Dt", "Lt", "Nt", "It", "_unused", "Ot", "Ft", "Pt", "Mt", "Bt", "_t", "jt", "Wt", "Ut", "Vt", "qt", "zt", "Ht", "Jt", "Kt", "valueAsRecord", "valueToString", "stringified", "purify", "addHook", "attrName", "keepAttr", "forceKeepAttr", "DEFAULT_ALLOWED_ATTRIBUTES", "DEFAULT_FORBIDDEN_PROTOCOLS", "DEFAULT_FORBIDDEN_ELEMENTS", "HTMLSanitizer", "sanitizedElement", "sanitize", "sanitizedHtml", "getHTML", "outerHTML", "innerHTML", "sanitizer", "allowedAttributes", "forbiddenProtocols", "forbiddenElements", "purifyOptions", "createBodyElementForHTML", "sanitizeElements", "normalizeListElementNesting", "purifyConfig", "assign", "DOMPurify", "setConfig", "getBody", "walker", "nodesToRemove", "nextNode", "currentNode", "elementIsRemovable", "sanitizeElement", "hasAttribute", "protocol", "removeAttribute", "_ref", "querySelectorAll", "listElement", "previousElement", "previousElementSibling", "elementIsForbidden", "elementIsntSerializable", "doc", "implementation", "createHTMLDocument", "css", "AttachmentView", "uploadProgressDelegate", "attachmentPiece", "piece", "createContentNodes", "innerElement", "figure", "getClassName", "getHref", "tabindex", "hasContent", "setHTML", "getContent", "createCaptionElement", "isPending", "progressElement", "class", "getUploadProgress", "trixMutable", "createCursorTarget", "figcaption", "getCaption", "captionConfig", "getCaptionConfig", "getFilename", "getFormattedFilesize", "nameElement", "createTextNode", "sizeElement", "names", "getType", "extension", "getExtension", "trixAttachment", "trixContentType", "getContentType", "trixId", "trixAttributes", "trixSerialize", "htmlContainsTagName", "isValidAttribute", "_config$attachments$t", "findProgressElement", "_this$findElement", "attachmentDidChangeUploadProgress", "div", "PreviewableAttachmentView", "previewDelegate", "image", "src", "refresh", "updateAttributesForImage", "getURL", "previewURL", "getPreviewURL", "serializedAttributes", "width", "getWidth", "height", "getHeight", "alt", "storeKey", "attachmentDidChangeAttributes", "PieceView", "getAttributes", "textConfig", "context", "createAttachmentNodes", "createStringNodes", "_element", "firstElementChild", "isPreviewable", "_this$textConfig", "iterable", "substring", "preserveSpaces", "styles", "pendingElement", "styleProperty", "isLast", "isFirst", "followsWhitespace", "TextView", "pieces", "getPieces", "endsWithWhitespace", "previousPiece", "BlockView", "block", "createComment", "_getBlockConfig", "getLastAttribute", "textView", "shouldAddExtraNewlineElement", "isRTL", "getBlockBreakPosition", "DocumentView", "render", "sync", "elementStore", "setDocument", "shadowElement", "getBlocks", "isSynced", "elementsHaveEqualHTML", "documentFragment", "lastChild", "fragment", "createDocumentFragmentForSync", "didSync", "findStoredElements", "createDocumentFragment", "storedElement", "replaceChild", "otherElement", "ignoreSpaces", "Piece", "types", "pieceJSON", "copyWithAttributes", "getValue", "copyWithAdditionalAttributes", "copyWithoutAttribute", "attribute", "getAttributesHash", "hasSameStringValueAsPiece", "hasSameAttributesAsPiece", "isBlockBreak", "isSerializable", "getLength", "canBeConsolidatedWith", "_defineProperty", "ImagePreloadOperation", "Image", "onload", "naturalWidth", "naturalHeight", "onerror", "Attachment", "attributesForFile", "setFile", "filename", "filesize", "contentType", "attachmentJSON", "releaseFile", "didChangeAttributes", "setAttributes", "newAttributes", "_this$previewDelegate", "_this$previewDelegate2", "_this$delegate", "_this$delegate$attach", "delegate", "preloadURL", "previewablePattern", "getFilesize", "_this$getFilename$mat", "getFile", "preloadFile", "releasePreloadedFile", "uploadProgress", "setUploadProgress", "_this$uploadProgressD", "_this$uploadProgressD2", "preloadingURL", "setPreviewURL", "_this$previewDelegate3", "_this$previewDelegate4", "_this$delegate2", "_this$delegate2$attac", "attachmentDidChangePreviewURL", "preload", "fileObjectURL", "URL", "createObjectURL", "revokeObjectURL", "then", "catch", "AttachmentPiece", "ensureAttachmentExclusivelyHasAttribute", "removeProhibitedAttributes", "permittedAttributes", "_piece$attachment", "json", "toConsole", "registerType", "StringPiece", "consolidateWith", "splitAtOffset", "SplittableList", "eachObject", "insertObjectAtIndex", "insertSplittableListAtIndex", "splittableList", "insertSplittableListAtPosition", "position", "splitObjectAtPosition", "editObjectAtIndex", "replaceObjectAtIndex", "removeObjectAtIndex", "getObjectAtIndex", "getSplittableListInRange", "rightIndex", "splitObjectsAtRange", "selectSplittableList", "removeObjectsInRange", "transformObjectsInRange", "transform", "transformedObjects", "rightOuterIndex", "leftInnerIndex", "startOfRange", "endOfRange", "getObjectAtPosition", "findIndexAndOffsetAtPosition", "splitIndex", "splitOffset", "leftObject", "rightObject", "consolidate", "pendingObject", "_pendingObject$canBeC", "_pendingObject", "consolidateFromIndexToIndex", "startIndex", "endIndex", "objectsInRange", "consolidatedInRange", "currentPosition", "nextPosition", "findPositionAtIndexAndOffset", "currentIndex", "getEndPosition", "endPosition", "objectArraysAreEqual", "Text", "textJSON", "notEmpty", "pieceList", "copyWithPieceList", "copyUsingObjectMap", "objectMap", "appendText", "insertTextAtPosition", "removeTextAtRange", "replaceTextAtRange", "moveTextFromRangeToPosition", "getTextAtRange", "addAttributeAtRange", "addAttributesAtRange", "removeAttributeAtRange", "setAttributesAtRange", "getAttributesAtPosition", "_this$pieceList$getOb", "getCommonAttributes", "getCommonAttributesAtRange", "getExpandedRangeForAttributeAtOffset", "getStringAtRange", "getStringAtPosition", "startsWithString", "endsWithString", "getAttachmentPieces", "getAttachments", "getAttachmentAndPositionById", "attachmentId", "getAttachmentById", "getRangeOfAttachment", "attachmentAndPosition", "updateAttributesForAttachment", "_text$pieceList", "eachPiece", "getPieceAtPosition", "toSerializableText", "Block", "blockJSON", "applyBlockBreakToText", "copyWithText", "copyWithoutText", "copyWithoutAttributes", "mappedText", "addAttribute", "expandAttribute", "addHTMLAttribute", "removeLastValue", "removeLastAttribute", "getLastElement", "getAttributeLevel", "getAttributeAtLevel", "level", "hasAttributes", "getLastNestableAttribute", "getNestableAttributes", "getNestingLevel", "decreaseNestingLevel", "increaseNestingLevel", "getListItemAttributes", "isListItem", "isTerminalBlock", "_getBlockConfig2", "breaksOnReturn", "_getBlockConfig3", "findLineBreakInDirectionFromPosition", "direction", "newlineText", "textForStringWithAttributes", "getTextWithoutBlockBreak", "textEndsInBlockBreak", "otherBlock", "otherAttributes", "otherAttribute", "getListAttributeNames", "unmarkExistingInnerBlockBreaksInText", "addBlockBreakToText", "modified", "innerPieces", "lastPiece", "unmarkBlockBreakPiece", "blockBreakText", "blockBreak", "Document", "documentJSON", "textAttributes", "blocks", "blockList", "getBlockAtIndex", "consolidateBlocks", "copyUsingObjectsFromDocument", "sourceDocument", "copyWithBaseBlockAttributes", "replaceBlock", "oldBlock", "newBlock", "insertDocumentAtRange", "locationFromPosition", "getBlockAtPosition", "mergeDocumentAtRange", "formattedDocument", "startPosition", "startLocation", "baseBlockAttributes", "getBaseBlockAttributes", "trailingBlockAttributes", "leadingBlockAttributes", "blockCount", "getBlockCount", "firstBlock", "firstText", "insertTextAtRange", "leftPosition", "rightPosition", "leftLocation", "rightLocation", "locationRangeFromRange", "leftOffset", "leftBlock", "rightOffset", "rightBlock", "leftText", "rightText", "affectedBlockCount", "getDocumentAtRange", "movingRightward", "eachBlockAtRange", "textRange", "eachBlock", "getTextAtIndex", "removeAttributeForAttachment", "setHTMLAttributeAtPosition", "updatedBlock", "insertBlockBreakAtRange", "applyBlockAttributeAtRange", "expanded", "expandRangeToLineBreaksAndSplitBlocks", "blockConfig", "removeLastListAttributeAtRange", "exceptAttributeName", "converted", "convertLineBreaksToBlockBreaksInRange", "removeBlockAttributesAtRange", "removeLastTerminalAttributeAtRange", "consolidateBlocksAtRange", "lastAttributeName", "endLocation", "startBlock", "positionFromLocation", "endBlock", "_this$getBlockAtIndex", "getTextAtPosition", "getCharacterAtPosition", "getEditCount", "editCount", "getCommonAttributesAtPosition", "attributesForBlock", "commonAttributes", "attributesLeft", "inheritableAttributes", "getRangeOfCommonAttributeAtPosition", "startOffset", "endOffset", "blockIndex", "lastAttributeIndex", "min", "attachmentPieces", "getLocationRangeOfAttachment", "getAttachmentPieceForAttachment", "findRangesForBlockAttribute", "ranges", "findRangesForTextAttribute", "withValue", "location", "locationRangeFromPosition", "rangeFromLocationRange", "locationRange", "getTexts", "toSerializableDocument", "pieceForString", "parseTrixDataAttribute", "HTMLParser", "referenceElement", "blockElements", "processedElements", "getDocument", "createHiddenContainer", "containerElement", "nodeFilter", "processNode", "translateBlockElementMarginsToNewlines", "removeHiddenContainer", "display", "nextSibling", "isInsignificantTextNode", "appendBlockForTextNode", "processTextNode", "appendBlockForElement", "processElement", "currentBlockElement", "isBlockElement", "appendStringWithAttributes", "_this$currentBlock", "getBlockAttributes", "getBlockHTMLAttributes", "currentBlock", "appendBlockForAttributesWithElement", "elementIsBlockElement", "currentBlockContainsElement", "parentBlockElement", "findParentBlockElement", "appendEmptyBlock", "parentElement", "_node$previousSibling", "elementCanDisplayPreformattedText", "stringEndsWithWhitespace", "leftTrimBreakableWhitespace", "getTextAttributes", "appendAttachmentWithAttributes", "isExtraBR", "dimensions", "needsTableSeparator", "appendPiece", "appendStringToTextAtIndex", "prependStringToTextAtIndex", "unshift", "configAttr", "attributeInheritedFromBlock", "blockElement", "findBlockElementAncestors", "attrConfig", "_attrConfig$test", "reverse", "settings", "ancestors", "stringIsAllBreakableWhitespace", "nodeEndsWithNonWhitespace", "_element$previousSibl", "defaultMargin", "getMarginOfDefaultBlockElement", "margin", "getMarginOfBlockElementAtIndex", "top", "bottom", "getBlockElementMargin", "whiteSpace", "marginTop", "marginBottom", "FILTER_REJECT", "FILTER_ACCEPT", "unserializableAttributeNames", "serializedAttributesAttribute", "serializedAttributesSelector", "blockCommentPattern", "serializers", "serializable", "HTMLElement", "el", "ManagedAttachment", "attachmentManager", "requestRemovalOfAttachment", "AttachmentManager", "managedAttachments", "manageAttachment", "attachmentIsManaged", "attachmentManagerDidRequestRemovalOfAttachment", "unmanageAttachment", "managedAttachment", "LineBreakInsertion", "composition", "selectedRange", "getSelectedRange", "previousCharacter", "nextCharacter", "shouldInsertBlockBreak", "shouldBreakFormattedBlock", "shouldDecreaseListLevel", "shouldPrependListItem", "shouldRemoveLastBlockAttribute", "Composition", "currentAttributes", "revision", "_this$delegate$compos", "refreshAttachments", "compositionDidChangeDocument", "getSnapshot", "loadSnapshot", "_this$delegate2$compo", "_this$delegate3", "_this$delegate3$compo", "compositionWillLoadSnapshot", "setSelection", "compositionDidLoadSnapshot", "insertText", "updatePosition", "notifyDelegateOfInsertionAtRange", "insertBlock", "insertDocument", "insertString", "getCurrentTextAttributes", "insertBlockBreak", "insertLineBreak", "insertion", "decreaseListLevel", "removeLastBlockAttribute", "breakFormattedBlock", "insertHTML", "replaceHTML", "getLocationRange", "insertFile", "insertFiles", "_this$delegate4", "compositionShouldAcceptFile", "attachmentForFile", "insertAttachments", "insertAttachment", "attachmentText", "textForAttachmentWithAttributes", "shouldManageDeletingInDirection", "shouldManageMovingCursorInDirection", "deleteInDirection", "deletingIntoPreviousBlock", "selectionSpansBlocks", "selectionIsCollapsed", "canDecreaseBlockAttributeLevel", "getBlock", "decreaseBlockAttributeLevel", "getExpandedRangeInDirection", "getAttachmentAtRange", "editAttachment", "moveTextFromRange", "removeAttachment", "stopEditingAttachment", "removeCurrentAttribute", "insertPlaceholder", "placeholderPosition", "getPosition", "selectPlaceholder", "setSelectedRange", "PLACEHOLDER", "forgetPlaceholder", "hasCurrentAttribute", "toggleCurrentAttribute", "setCurrentAttribute", "canSetCurrentAttribute", "canSetCurrentBlockAttribute", "canSetCurrentTextAttribute", "getSelectedDocument", "setBlockAttribute", "setTextAttribute", "notifyDelegateOfCurrentAttributesChange", "setHTMLAtributeAtPosition", "allowedHTMLAttributes", "newDocument", "removeBlockAttribute", "updateCurrentAttributes", "removeTextAttribute", "canDecreaseNestingLevel", "_this$getBlock", "canIncreaseNestingLevel", "previousBlock", "getPreviousBlock", "_this$getBlock2", "_this$getBlock3", "attributeLevel", "ignoreLock", "getCurrentAttributes", "freezeSelection", "thawSelection", "hasFrozenSelection", "_this$delegate5", "compositionDidRequestChangingSelectionToLocationRange", "getSelectionManager", "setLocationRange", "targetLocationRange", "withTargetLocationRange", "withTargetRange", "withTargetDOMRange", "createLocationRangeFromDOMRange", "translateUTF16PositionFromOffset", "editingAttachment", "moveCursorInDirection", "canEditAttachment", "expandSelectionInDirection", "expandSelectionForEditing", "expandSelectionAroundCommonAttribute", "selectionContainsAttachments", "_this$getSelectedAtta", "getSelectedAttachments", "selectionIsInCursorTarget", "positionIsCursorTarget", "locationIsCursorTarget", "positionIsBlockBreak", "_this$document$getPie", "_this$getSelectedDocu", "added", "removed", "oldArray", "newArray", "existingValues", "Set", "currentValues", "_this$delegate6", "_this$delegate6$compo", "compositionDidRemoveAttachment", "_this$delegate7", "_this$delegate7$compo", "compositionDidAddAttachment", "_this$delegate8", "_this$delegate8$compo", "compositionDidEditAttachment", "_this$delegate9", "_this$delegate9$compo", "compositionDidChangeAttachmentPreviewURL", "_this$delegate10", "_this$delegate10$comp", "compositionDidStartEditingAttachment", "_this$delegate11", "_this$delegate11$comp", "compositionDidStopEditingAttachment", "_this$delegate12", "_this$delegate12$comp", "compositionDidChangeCurrentAttributes", "_this$delegate13", "_this$delegate13$comp", "compositionDidPerformInsertionAtRange", "utf16string", "utf16position", "UndoManager", "undoEntries", "redoEntries", "recordUndoEntry", "description", "consolidatable", "previousEntry", "entryHasDescriptionAndContext", "undoEntry", "createEntry", "redoEntry", "snapshot", "canUndo", "canRedo", "entry", "BLOCK_ATTRIBUTE_NAME", "Filter", "applyBlockAttribute", "findRangesOfBlocks", "findRangesOfPieces", "moveSelectedRangeForward", "attachmentGalleryFilter", "DEFAULT_FILTERS", "Editor", "undoManager", "filters", "loadDocument", "loadHTML", "loadJSON", "getClientRectAtPosition", "getClientRectAtLocationRange", "activateAttribute", "attributeIsActive", "canActivateAttribute", "deactivateAttribute", "LocationMapper", "findLocationFromContainerAndOffset", "container", "foundBlock", "attachmentElement", "findAttachmentElementParentForNode", "rejectAttachmentContents", "nodeLength", "findContainerAndOffsetFromLocation", "nodeOffset", "findNodeAndOffsetFromLocation", "getSignificantNodesForIndex", "acceptSignificantNodes", "recordingNodes", "rejectEmptyTextNodes", "PointMapper", "createDOMRangeFromPoint", "caretPositionFromPoint", "offsetNode", "createRange", "setStart", "caretRangeFromPoint", "createTextRange", "originalDOMRange", "moveToPoint", "select", "getClientRectsForDOMRange", "getClientRects", "SelectionManager", "didMouseDown", "locationMapper", "pointMapper", "lockCount", "currentLocationRange", "lockedLocationRange", "createDOMRangeFromLocationRange", "updateCurrentLocationRange", "setLocationRangeFromPointRange", "pointRange", "getLocationAtPoint", "lock", "unlock", "clearSelection", "_getDOMRange", "collapsed", "selectionIsExpanded", "domRangeWithinElement", "pauseTemporarily", "resumeHandlers", "paused", "resume", "clearTimeout", "resumeTimeout", "_this$delegate$locati", "locationRangeDidChange", "rangeStart", "rangeEnd", "setEnd", "point", "_this$createLocationR", "keyNames", "undoable", "commands", "do", "undos", "AttachmentEditorController", "title", "trixAction", "didClickToolbar", "didClickActionButton", "textarea", "placeholder", "textareaClone", "tabIndex", "autoresize", "scrollHeight", "didInputCaption", "didKeyDownCaption", "didChangeCaption", "didBlurCaption", "editingFigcaption", "editCaption", "focus", "install", "makeElementMutable", "addToolbar", "installCaptionEditor", "uninstall", "savePendingCaption", "didUninstallAttachmentEditor", "pendingCaption", "_this$delegate3$attac", "attachmentEditorDidRequestUpdatingAttributesForAttachment", "attachmentEditorDidRequestRemovingAttributeForAttachment", "stopPropagation", "attachmentEditorDidRequestRemovalOfAttachment", "_this$delegate5$attac", "keyCode", "attachmentEditorDidRequestDeselectingAttachment", "CompositionController", "didFocus", "didBlur", "didClickAttachment", "documentView", "_this$blurPromise", "focused", "compositionControllerDidFocus", "blurPromise", "compositionControllerDidBlur", "findAttachmentForElement", "compositionControllerDidSelectAttachment", "getSerializableElement", "isEditingAttachment", "_this$delegate4$compo", "_this$delegate5$compo", "canSyncDocumentView", "compositionControllerWillSyncDocumentView", "compositionControllerDidSyncDocumentView", "compositionControllerDidRender", "rerenderViewForObject", "refreshViewCache", "attachmentEditor", "installAttachmentEditorForAttachment", "_this$attachmentEdito", "uninstallAttachmentEditor", "_this$attachmentEdito2", "compositionControllerWillUpdateAttachment", "compositionControllerDidRequestRemovalOfAttachment", "compositionControllerDidRequestDeselectingAttachment", "Controller", "mutableAttributeName", "mutableSelector", "childList", "characterData", "characterDataOldValue", "subtree", "MutationObserver", "didMutate", "observer", "observe", "disconnect", "mutations", "_this$delegate$elemen", "findSignificantMutations", "elementDidMutate", "getMutationSummary", "mutation", "mutationIsSignificant", "nodeIsMutable", "nodesModifiedByMutation", "nodeIsSignificant", "addedNodes", "removedNodes", "getTextMutationSummary", "additions", "deletions", "getTextChangesFromCharacterData", "textChanges", "getTextChangesFromChildList", "addition", "summary", "textAdded", "deleted", "textDeleted", "getMutationsByType", "textRemoved", "getTextForNodes", "characterMutations", "startMutation", "endMutation", "summarized", "oldString", "newString", "oldValue", "FileVerificationOperation", "reader", "FileReader", "abort", "readAsArrayBuffer", "FlakyAndroidKeyboardDetector", "shouldIgnore", "previousEvent", "checkSamsungKeyboardBuggyModeStart", "checkSamsungKeyboardBuggyModeEnd", "buggyMode", "insertingLongTextAfterUnidentifiedChar", "differsInWhitespace", "innerText", "inputType", "_this$event$data", "isBeforeInputInsertText", "previousEventWasUnidentifiedKeydown", "_this$previousEvent", "_this$previousEvent2", "text1", "text2", "normalize", "whiteSpaceNormalizerRegexp", "InputController", "mutationObserver", "flakyKeyboardDetector", "events", "handlerFor", "mutationSummary", "editorWillSyncDocumentView", "editorDidSyncDocumentView", "requestRender", "_this$delegate$inputC", "inputControllerDidRequestRender", "requestReparse", "_this$delegate2$input", "inputControllerDidRequestReparse", "operations", "all", "handleInput", "_this$responder", "inputControllerWillAttachFiles", "responder", "defaultPrevented", "inputControllerWillHandleInput", "inputControllerDidHandleInput", "createLinkHTML", "pastedFileCount", "Level0InputController", "resetInputSummary", "setInputSummary", "inputSummary", "isComposing", "inputControllerDidAllowUnhandledInput", "mutationIsExpected", "preferDocument", "mutationAdditionMatchesSummary", "mutationDeletionMatchesSummary", "didDelete", "unexpectedNewlineAddition", "unexpectedNewlineDeletion", "_this$compositionInpu", "textChanged", "composedEmptyString", "compositionInput", "getEndData", "getCompositionInput", "CompositionInput", "isEnded", "_this$responder2", "serializeSelectionToDataTransfer", "_this$responder3", "setData", "canAcceptDataTransfer", "Files", "getPastedHTMLUsingHiddenElement", "pageXOffset", "pageYOffset", "opacity", "requestAnimationFrame", "keydown", "didInput", "keyName", "_context2", "modifier", "_context", "character", "inputControllerDidReceiveKeyboardCommand", "keypress", "altKey", "stringFromKeyEvent", "_this$responder9", "inputControllerWillPerformTyping", "textInput", "toUpperCase", "_this$responder10", "dragenter", "dragstart", "_this$delegate5$input", "draggedRange", "inputControllerDidStartDrag", "dragover", "draggingPoint", "clientX", "clientY", "_this$delegate6$input", "inputControllerDidReceiveDragOverPoint", "dragend", "_this$delegate7$input", "inputControllerDidCancelDrag", "drop", "_event$dataTransfer", "_this$responder11", "_this$responder12", "inputControllerWillMoveText", "_this$responder13", "fromJSONString", "cut", "_this$responder14", "clipboardData", "inputControllerWillCutText", "_this$responder15", "paste", "clipboard", "testClipboardData", "pasteEventIsCrippledSafariHTMLPaste", "_this$responder16", "inputControllerWillPaste", "inputControllerDidPaste", "_this$responder17", "_this$delegate14", "_this$responder18", "_this$delegate15", "_this$delegate16", "_this$responder19", "_this$delegate17", "_clipboard$items", "_clipboard$items$getA", "items", "getAsFile", "_this$delegate18", "_this$responder20", "_this$delegate19", "extensionForFile", "compositionstart", "compositionupdate", "compositionend", "beforeinput", "backspace", "_this$delegate20", "delete", "_this$delegate21", "return", "_this$delegate22", "_this$responder21", "tab", "_this$responder22", "_this$responder23", "_this$responder24", "_this$responder25", "control", "_this$delegate23", "_this$delegate24", "_this$delegate25", "_this$responder26", "shift", "_this$delegate26", "_this$responder27", "_this$responder28", "_this$responder29", "_this$delegate27", "meta", "_this$delegate28", "_file$type", "which", "charCode", "hasPasteboardFlavor", "hasReadableDynamicData", "isExternalHTMLPaste", "isExternalRichTextPaste", "inputController", "isSignificant", "_this$responder5", "_this$responder4", "canApplyToDocument", "_this$responder6", "_this$responder7", "_this$responder8", "_this$data$start", "_this$data$end", "Level2InputController", "scheduledRender", "composing", "reparse", "scheduleRender", "_this$afterRender", "cancelAnimationFrame", "afterRender", "toggleAttributeIfSupported", "inputControllerWillPerformFormatting", "activateAttributeIfSupported", "getTargetDOMRange", "minLength", "_this$event$getTarget", "_this$event", "targetRanges", "getTargetRanges", "staticRangeToRange", "withEvent", "command", "keyboardCommandFromKeyEvent", "shiftKey", "_event$clipboardData", "pasteEventHasFilesOnly", "pasteEventHasPlainTextOnly", "inputTypes", "immmediateRender", "inputEvent", "dragging", "pointFromEvent", "dragEventHasFiles", "ArrowLeft", "ArrowRight", "Backspace", "Tab", "deleteByComposition", "deleteByCut", "deleteByDrag", "deleteByDragRange", "deleteCompositionText", "deleteContent", "deleteContentBackward", "deleteContentForward", "deleteEntireSoftLine", "deleteHardLineBackward", "deleteHardLineForward", "deleteSoftLineBackward", "deleteSoftLineForward", "deleteWordBackward", "deleteWordForward", "formatBackColor", "formatBold", "formatFontColor", "formatFontName", "formatIndent", "formatItalic", "formatJustifyCenter", "formatJustifyFull", "formatJustifyLeft", "formatJustifyRight", "formatOutdent", "formatRemove", "_this$responder30", "formatSetBlockTextDirection", "formatSetInlineTextDirection", "formatStrikeThrough", "formatSubscript", "formatSuperscript", "formatUnderline", "historyRedo", "inputControllerWillPerformRedo", "historyUndo", "inputControllerWillPerformUndo", "insertCompositionText", "insertFromComposition", "insertFromDrop", "_this$responder31", "insertFromPaste", "_this$responder32", "_this$responder33", "processableFilePaste", "_this$responder34", "_this$responder35", "insertFromYank", "insertLink", "insertOrderedList", "insertParagraph", "_this$responder36", "insertReplacementText", "replacement", "_this$event$dataTrans", "insertTranspose", "insertUnorderedList", "staticRange", "_event$dataTransfer$f", "attributeButtonSelector", "actionButtonSelector", "toolbarButtonSelector", "dialogSelector", "activeDialogSelector", "dialogButtonSelector", "dialogInputSelector", "getInputForDialog", "getAttributeName", "getActionName", "ToolbarController", "didClickAttributeButton", "didClickDialogButton", "didKeyDownDialogInput", "actions", "resetDialogInputs", "toolbarDidClickButton", "actionName", "getDialog", "toggleDialog", "toolbarDidInvokeAction", "toolbarDidToggleAttribute", "refreshAttributeButtons", "dialogElement", "dialog", "hideDialog", "updateActions", "refreshActionButtons", "eachActionButton", "disabled", "updateAttributes", "eachAttributeButton", "dialogIsVisible", "applyKeyboardCommand", "keyString", "button", "buttonKeys", "dialogName", "showDialog", "toolbarWillShowDialog", "disabledInput", "toolbarDidShowDialog", "willValidate", "setCustomValidity", "checkValidity", "isSafeAttribute", "toolbarDidUpdateAttribute", "toolbarDidRemoveAttribute", "toolbarDidHideDialog", "EditorController", "editorElement", "compositionController", "toolbarController", "toolbarElement", "editor", "notifyEditorElement", "handlingInput", "updateCurrentActions", "pasting", "pastedRange", "attachmentLocationRange", "loadingSnapshot", "isFocused", "requestedLocationRange", "compositionRevisionWhenLocationRangeRequested", "renderedCompositionRevision", "runEditorFilters", "isFocusedInvisibly", "requestedRender", "recordTypingUndoEntry", "recordFormattingUndoEntry", "locationRangeBeforeDrag", "invokingElement", "invokeAction", "selectionFrozen", "canInvokeAction", "actionIsExternal", "_this$actions$actionN", "_this$actions$actionN2", "getCurrentActions", "currentActions", "snapshotsAreEqual", "updateInputElement", "serializer", "setFormValue", "message", "documentChangedSinceLastRender", "notify", "getUndoContext", "getLocationContext", "getTimeContext", "Date", "getTime", "_this$editorElement$o", "ownerDocument", "TrixToolbarElement", "connectedCallback", "editorElements", "_this$ownerDocument", "nodeList", "makeEditable", "toggleAttribute", "configureContentEditable", "disableObjectResizing", "setDefaultParagraphSeparator", "_document$queryComman", "_document", "queryCommandSupported", "execCommand", "_document$queryComman2", "_document2", "cursorTargetStyles", "_internals", "WeakMap", "_formDisabled", "_validate", "WeakSet", "ElementInternalsDelegate", "_classPrivateFieldInitSpec", "writable", "_classPrivateFieldSet", "attachInternals", "_classPrivateMethodGet", "_validate2", "disconnectedCallback", "_classPrivateFieldGet", "labels", "required", "validity", "validationMessage", "formDisabledCallback", "reportValidity", "customValidationMessage", "valueMissing", "customError", "setValidity", "_focusHandler", "_resetBubbled", "_clickBubbled", "LegacyDelegate", "contains", "label", "texts", "_classPrivateFieldGet2", "console", "warn", "_delegate", "TrixEditorElement", "willCreateInput", "formAssociated", "inputElement", "localName", "toolbarId", "internalToolbar", "_this$ownerDocument2", "_this$editorControlle", "editorController", "defaultValue", "_this$editor", "attributeChangedCallback", "newValue", "isConnected", "reconnect", "inputId", "nextElementSibling", "_this$editorControlle2", "removeInternalToolbar", "_this$internalToolbar", "formResetCallback", "Trix", "VERSION", "version", "core", "models", "controllers", "observers", "customElements", "define", "import_stable", "import_runtime", "after", "isNode", "append", "isNode", "before", "isNode", "i", "CustomEvent", "window", "O", "V", "document", "Object", "defineProperty", "DOMTokenList", "v", "i", "is", "protoObj", "toks", "cI", "cLen", "sub", "innerI", "e", "n", "f", "s", "i", "isNode", "smoothscroll", "WINDOW", "eventFromMessage", "exceptionFromError", "getAbsoluteUrl", "growthbookIntegration", "isEnabled", "public_api_exports", "withIsolationScope", "withScope", "console", "level", "parsers", "a", "b", "p", "i", "parser", "fn", "e", "data", "error", "e", "keys", "v", "object", "key", "prototype", "max", "start", "end", "delimiter", "i", "crypto", "c", "values", "performance", "session", "levels", "key", "scope", "lastEventId", "key", "level", "session", "p", "key", "scope", "e", "key", "attr", "withScope", "scope", "withIsolationScope", "scope", "key", "object", "split", "from", "matches", "data", "origin", "isRemote", "scope", "link", "span", "key", "v", "i", "scope", "dsc", "result", "types", "_", "append", "next", "offset", "buffer", "length", "i", "session", "dscHasRequiredProps", "dsc", "op", "description", "link", "key", "strategy", "scope", "transaction", "a", "b", "fn", "e", "result", "withScope", "scope", "withScope", "scope", "span", "scope", "span", "timerId", "flush", "scope", "withScope", "map", "data", "level", "attrs", "key", "GRAPHQL_DOCUMENT", "HTTP_URL", "SENTRY_SDK_NAME", "SENTRY_SDK_VERSION", "SENTRY_SEGMENT_ID", "SENTRY_SEGMENT_NAME", "SENTRY_TRACE_LIFECYCLE", "SENTRY_TRANSACTION", "URL_FULL", "URL_PATH", "key", "resolve", "_", "result", "e", "result", "error", "key", "result", "i", "scope", "i", "data", "result", "b", "key", "level", "key", "isEnabled", "session", "end", "key", "fn", "timestampInSeconds", "scope", "withScope", "process", "key", "id", "log", "level", "attr", "key", "_getBufferMap", "buffer", "add", "resolve", "now", "buffer", "flush", "error", "result", "origin", "data", "error", "scope", "level", "session", "result", "count", "key", "resolve", "isErrorEvent", "isError", "e", "log", "estimatePrimitiveSizeInBytes", "scope", "createTransport", "log", "error", "retryDelay", "e", "result", "types", "createTransport", "key", "result", "t", "flush", "r", "data", "result", "key", "FILTERED", "lowerTerms", "t", "key", "FILTERED", "data", "values", "session", "names", "name", "isEnabled", "scope", "INTEGRATION_NAME", "i", "parser", "key", "error", "i", "error", "parser", "level", "log", "level", "INTEGRATION_NAME", "levels", "level", "withScope", "scope", "message", "error", "INTEGRATION_NAME", "_shouldDropEvent", "i", "INTEGRATION_NAME", "error", "key", "i", "p", "start", "end", "from", "to", "length", "f", "INTEGRATION_NAME", "root", "isBrowser", "f", "fn", "key", "filter", "scope", "e", "data", "INTEGRATION_NAME", "INTEGRATION_NAME", "p", "e", "keys", "key", "i", "scope", "f", "key", "result", "INTEGRATION_NAME", "shouldAttachHeaders", "span", "sanitizedUrl", "scope", "level", "scope", "debug", "warn", "error", "values", "INTEGRATION_NAME", "levels", "level", "key", "levels", "level", "key", "GEN_AI_CONVERSATION_ID_ATTRIBUTE", "key", "attrs", "result", "attrs", "GEN_AI_CONVERSATION_ID_ATTRIBUTE", "chunk", "error", "model", "originalResult", "instrumentedPromise", "result", "isErrorEvent", "isError", "error", "extractRequestAttributes", "addResponseAttributes", "error", "model", "result", "instrumentMethod", "instrumented", "chunk", "instrumentStream", "content", "config", "extractRequestAttributes", "addPrivateRequestAttributes", "addResponseAttributes", "instrumentMethod", "_", "model", "instrumentStream", "error", "result", "createDeepProxy", "t", "key", "n", "v", "id", "attrs", "p", "t", "g", "r", "fn", "handlers", "t", "result", "error", "error", "config", "GEN_AI_CONVERSATION_ID_ATTRIBUTE", "result", "_", "result", "doc", "error", "url", "WINDOW", "WINDOW", "i", "WINDOW", "resolve", "DEBUG_BUILD", "defaultOptions", "data", "error", "key", "XMLNS", "svg", "g", "shadow", "lazyLoadIntegration", "id", "handleClick", "colorScheme", "l", "u", "i", "o", "r", "f", "c", "s", "a", "h", "v", "n", "p", "y", "t", "d", "b", "m", "w", "k", "x", "C", "j", "P", "e", "_", "T", "A", "D", "S", "$", "I", "q", "z", "B", "useMemo", "useState", "useCallback", "prev", "Fragment", "sendFeedback", "render", "Toolbar", "action", "hooks", "track", "scale", "startingPoint", "WINDOW", "fn", "isFunction", "withScope", "scope", "WINDOW", "waitForLoad", "resolve", "exceptionFromError", "parseStackFrames", "eventFromUnknownInput", "eventFromMessage", "level", "keys", "prototype", "WINDOW", "level", "eventFromMessage", "DEBUG_BUILD", "WINDOW", "WINDOW", "WINDOW", "WINDOW", "e", "WINDOW", "entries", "po", "WINDOW", "entries", "po", "entries", "po", "WINDOW", "entries", "e", "a", "b", "interaction", "WINDOW", "entries", "po", "entries", "po", "WINDOW", "handlers", "instrumented", "addHandler", "triggerHandlers", "data", "e", "DEBUG_BUILD", "entries", "fn", "htmlTreeAsString", "height", "id", "classes", "c", "k", "attr", "WINDOW", "transaction", "scope", "WINDOW", "_", "DEBUG_BUILD", "htmlTreeAsString", "DEBUG_BUILD", "htmlTreeAsString", "attrs", "performance", "WINDOW", "entries", "htmlTreeAsString", "origin", "DEBUG_BUILD", "key", "end", "start", "navigator", "_measurements", "INTEGRATION_NAME", "performance", "entries", "identifier", "public_api_exports", "performance", "entry", "htmlTreeAsString", "WINDOW", "offset", "entries", "origin", "WINDOW", "_", "DEBUG_BUILD", "htmlTreeAsString", "performance", "e", "WINDOW", "handlers", "WINDOW", "to", "from", "WINDOW", "document", "e", "DEBUG_BUILD", "setTimeout", "WINDOW", "error", "DEBUG_BUILD", "xhr", "key", "isElement", "getAbsoluteUrl", "WINDOW", "e", "DEBUG_BUILD", "DEBUG_BUILD", "line", "INTEGRATION_NAME", "DEBUG_BUILD", "htmlTreeAsString", "data", "from", "to", "WINDOW", "INTEGRATION_NAME", "WINDOW", "xhr", "fn", "WINDOW", "DEBUG_BUILD", "scope", "from", "to", "INTEGRATION_NAME", "WINDOW", "INTEGRATION_NAME", "data", "error", "eventFromUnknownInput", "e", "DEBUG_BUILD", "WINDOW", "DEFAULT_LIMIT", "INTEGRATION_NAME", "key", "options", "exceptionFromError", "isElement", "getConstructorName", "htmlTreeAsString", "prototype", "DEBUG_BUILD", "WINDOW", "href", "WINDOW", "DEBUG_BUILD", "scope", "onLoad", "WINDOW", "INTEGRATION_NAME", "SETUP_CLIENTS", "types", "withScope", "scope", "INTEGRATION_NAME", "_wrapXHR", "error", "requestHeaders", "xhr", "result", "key", "e", "DEBUG_BUILD", "data", "WINDOW", "INTEGRATION_NAME", "doc", "html", "INTEGRATION_NAME", "data", "walk", "result", "x", "y", "width", "height", "window", "children", "root", "WINDOW", "WINDOW", "__defProp", "key", "NodeType", "isElement", "n", "s", "error", "i", "id", "x", "y", "e", "getIFrameContentDocument", "getIFrameContentWindow", "origin", "href", "doc", "chars2", "c", "a", "distance", "win", "link", "mirror", "attr", "width", "height", "fn", "throttle", "now", "clearTimeout", "setTimeout", "d", "closestElementOfNode", "cachedImplementations", "e2", "n2", "position", "getNextId", "m", "r2", "set", "getEventTarget", "p", "handlers", "h", "result", "setTimeout$1", "count", "i2", "b", "map", "keys", "NodeType$2", "buffer", "createMirror$2", "errorHandler", "polyfill$1", "a2", "observe", "init", "t2", "click", "node", "htmlTreeAsString", "getter", "entries", "getAbsoluteTime", "start", "end", "DEBUG_BUILD", "t", "CONSOLE_LEVELS", "PREFIX", "level", "coreDebug", "debug", "resolve", "data", "getWorkerURL", "session", "makeSession", "started", "isErrorEvent", "isTransactionEvent", "dsc", "from", "to", "size", "info", "xhr", "request", "response", "errors", "debounce", "debounceCore", "NAVIGATOR", "scope", "err", "__defProp", "__defNormalProp", "key", "__publicField", "Mirror", "n", "id", "createMirror", "elementClassMatchesRegex", "distanceToMatch", "distance", "createMatchPredicate", "DEPARTED_MIRROR_ACCESS_WARNING", "_mirror", "hookSetter", "d", "win", "setTimeout", "patch", "closestElementOfNode", "error", "isBlocked", "cachedImplementations", "getImplementation", "e", "onRequestAnimationFrame", "errorHandler", "registerErrorHandler", "callbackWrapper", "chars", "lookup", "i", "handlers", "v", "h", "prototype", "_mirror2", "result", "mirror", "r", "t", "t2", "errorHandler2", "data", "width", "height", "root", "values", "x", "createMirror$2", "INTEGRATION_NAME", "resolve", "options", "WINDOW", "_", "entries", "href", "shouldAttachHeaders", "xhr", "span", "t", "WINDOW", "DEBUG_BUILD", "scope", "DEBUG_BUILD", "WINDOW", "e", "WINDOW", "now", "scope", "DEBUG_BUILD", "origin", "to", "from", "isRedirect", "navigation", "entry", "scope", "DEBUG_BUILD", "buffer", "resolve", "store", "keys", "createTransport", "WINDOW", "_", "navigator", "WINDOW", "data", "ua", "e", "DEBUG_BUILD", "chunk", "i", "origin", "start", "j", "DEBUG_BUILD", "WINDOW", "error", "DEBUG_BUILD", "e", "chunk", "INTEGRATION_NAME", "DEBUG_BUILD", "WINDOW", "rootSpan", "INTEGRATION_NAME", "DEBUG_BUILD", "result", "DEBUG_BUILD", "growthbookIntegration", "coreGrowthbookIntegration", "INTEGRATION_NAME", "w", "worker", "DEBUG_BUILD", "WINDOW", "error", "eventFromUnknownInput", "self", "error", "scope", "id", "withScope", "warn", "result", "position", "identifier", "identifier", "href", "link", "top", "left", "height", "width", "bottom", "right", "center", "x", "y", "action", "ReactDOMServer", "React", "e", "z", "error", "key", "isBrowser", "map", "a", "v", "isBrowser", "toLowerCase", "a", "isBrowser", "v", "min", "max", "p", "start", "end", "v", "a", "p", "next", "prev", "c", "i", "l", "key", "next", "next2", "i", "a", "j", "m", "a", "hexValue", "p", "q", "t", "h", "s", "l", "r", "g", "b", "computed", "x", "y", "fn", "v", "j", "l", "n", "s", "number", "fn", "t", "toLowerCase", "i", "l", "lookups", "i", "l", "isBrowser", "engine", "lookup", "p", "c", "siblings", "t", "a", "toNumber", "i", "prev", "id", "onBeforeUpdate", "count", "r", "v", "n", "isBrowser", "i", "l", "nodeList", "j", "k", "t", "p", "t", "easeIn", "b", "a", "s", "e", "string", "split", "i", "l", "keyframes", "key", "i", "l", "p", "keys", "a", "b", "offset", "length", "id", "v", "siblings", "hasSpring", "_", "d", "i", "offset", "offset", "i", "elements", "identifier", "defaultOptions", "width", "forms", "div", "e", "id", "identifier", "m", "module", "factory", "x", "k", "a", "b", "c", "d", "s", "i", "n", "length", "j", "hex", "clamp", "from", "to", "end", "result", "SparkMD5", "hash", "start", "root", "elements", "csrfToken", "key", "delegate", "error", "object", "xhr", "controller", "disable", "enable", "resolve", "event", "m", "key", "$", "xhr", "error", "parser", "e", "CustomEvent", "result", "data", "toArray", "confirm", "link", "href", "withCredentials", "start", "start", "visit", "cspNonce", "html", "resolve", "values", "result", "string", "i", "_", "elements", "action", "getMetaContent", "nonce", "before", "after", "link", "debounce", "fn", "submitter", "config", "location", "left", "right", "iterator", "delegate", "error", "entries", "key", "size", "toCacheKey", "cookie", "id", "snapshot", "x", "y", "clone", "defaults", "ctx", "morphChildren", "createNode", "findBestMatch", "e", "morphNode", "ignoreAttribute", "attr", "createMorphContext", "root", "normalizeElement", "normalizeParent", "parser", "render", "session", "href", "position", "recentRequests", "adapter", "isStream", "document", "c", "createConsumer", "key", "m", "x", "data", "submitter", "left", "right", "application", "map", "error", "key", "matches", "_", "object", "schema", "shift", "e", "action", "controller", "filter", "identifier", "delegate", "fetch", "del", "values", "set", "size", "delegate", "matches", "match", "key", "oldValue", "left", "right", "length", "_", "error", "action", "_a", "values", "constructor", "module", "scope", "identifier", "controller", "extend", "prototype", "object", "a", "b", "application", "logger", "elements", "Scope", "schema", "element", "c", "n", "array", "k", "v", "filter", "resolve", "classes", "result", "read", "write", "Form", "data", "product", "src_exports", "FetchRequest", "FetchResponse", "get", "patch", "FetchResponse", "nonce", "cookie", "object", "result", "key", "entries", "FetchRequest", "error", "fetch", "FetchResponse", "key", "_", "get", "FetchRequest", "patch", "import_debounce", "debounce", "get", "id", "import_debounce", "debounce", "import_debounce", "p1", "p2", "p3", "p4", "start", "end", "p1", "p2", "p3", "p4", "m2", "determinant", "cx", "cy", "x", "y", "cos", "sin", "throttle", "debounce", "degrees", "cx", "cy", "dy", "dx", "import_debounce", "debounce", "identifier", "distance", "visible", "warn", "coordinates", "i", "x", "y", "dx", "dy", "offset", "end", "extend", "offset", "end", "x", "y", "center", "size", "x0", "y0", "x1", "y1", "x2", "y2", "dx", "dy", "x", "y", "x1", "y1", "x2", "y2", "result", "start", "end", "intersects", "slope", "x", "y", "coordinates", "width", "height", "i", "l", "projection", "center", "offset", "next", "j", "clamp", "min", "max", "x", "y", "x1", "y1", "x2", "y2", "dx", "dy", "t", "n", "i", "r", "j", "k", "l", "m", "a", "b", "lerp", "floor", "n", "wrap", "min", "max", "add", "r", "center", "x0", "y0", "x1", "y1", "dx", "dy", "d", "x", "y", "start", "end", "x2", "y2", "equals", "i", "x", "y", "scale", "squaredDistance", "dx", "dy", "wrapX", "projection", "clamp", "global", "point", "length", "i", "y", "RADIUS", "EXTENT", "METERS_PER_UNIT", "PROJECTIONS", "cache", "get", "cache", "add", "projection", "object", "isEmpty", "add", "get", "x", "y", "m", "n", "r", "c", "c2", "d", "d2", "longitude", "wrap", "a", "a2", "a3", "number", "transformer", "length", "i", "projection", "a", "distance", "disable", "hide", "i", "projection", "add", "get", "makeProjection", "point", "getter", "toEPSG4326", "width", "height", "projection", "get", "length", "i", "point", "j", "fromLonLat", "projection", "toLonLat", "get", "makeTransforms", "add", "t2", "equals", "warn", "get", "PROJECTIONS", "niceErrors", "annotationType", "key", "toString", "other", "constructor", "name", "dataStructure", "thing", "property", "derivation", "method", "length", "kind", "errors", "__DEV__", "die", "error", "args", "e", "apply", "Error", "map", "String", "join", "assign", "Object", "getDescriptor", "getOwnPropertyDescriptor", "defineProperty", "objectPrototype", "prototype", "EMPTY_ARRAY", "freeze", "EMPTY_OBJECT", "plainObjectString", "getNextId", "globalState", "mobxGuid", "once", "func", "invoked", "arguments", "noop", "isFunction", "fn", "isStringish", "value", "t", "isObject", "isPlainObject", "proto", "getPrototypeOf", "protoConstructor", "hasProp", "isGenerator", "obj", "displayName", "addHiddenProp", "object", "propName", "enumerable", "writable", "configurable", "addHiddenFinalProp", "createInstanceofPredicate", "theClass", "x", "isES6Map", "call", "isPlainES6Map", "mapProto", "objectProto", "nullProto", "isES6Set", "getPlainObjectKeys", "keys", "symbols", "getOwnPropertySymbols", "filter", "s", "propertyIsEnumerable", "ownKeys", "Reflect", "stringifyKey", "toPrimitive", "target", "prop", "hasOwnProperty", "getOwnPropertyDescriptors", "getFlag", "flags", "mask", "setFlag", "newValue", "assert20223DecoratorType", "context", "types", "includes", "$mobx", "Symbol", "Atom", "name_", "flags_", "observers_", "lastAccessedBy_", "lowestObserverState_", "onBOL", "onBUOL", "isBeingObserved", "isPendingUnobservation", "diffValue", "onBO", "forEach", "listener", "onBUO", "reportObserved", "reportChanged", "startBatch", "propagateChanged", "endBatch", "isAtom", "createAtom", "onBecomeObservedHandler", "onBecomeUnobservedHandler", "atom", "Set", "compareDefault", "Object", "is", "deepEnhancer", "v", "_", "name", "isObservable", "Array", "isArray", "observable", "array", "isPlainObject", "object", "undefined", "isES6Map", "map", "isES6Set", "set", "isAction", "isFlow", "isGenerator", "flow", "autoAction", "referenceEnhancer", "newValue", "OVERRIDE", "isOverride", "annotation", "annotationType_", "OVERRIDE", "createActionAnnotation", "name", "options", "annotationType_", "options_", "make_", "extend_", "adm", "key", "descriptor", "source", "_this$options_", "bound", "target_", "isAction", "value", "actionDescriptor", "createActionDescriptor", "defineProperty", "proxyTrap", "defineProperty_", "decorateAction20223_", "annotation", "mthd", "context", "__DEV__", "assert20223DecoratorType", "kind", "addInitializer", "ann", "_createAction", "m", "_ann$options_$name", "_ann$options_", "_ann$options_$autoAct", "_ann$options_2", "createAction", "toString", "autoAction", "initMthd", "_ann$options_3", "bind", "isMobxAction", "_ann$options_4", "self", "die", "String", "assertActionDescriptor", "isFunction", "name_", "safeDescriptors", "globalState", "_annotation$options_", "_annotation$options_$", "_annotation$options_2", "_annotation$options_$2", "_annotation$options_3", "_annotation$options_4", "_adm$proxy_2", "_adm$proxy_", "proxy_", "undefined", "configurable", "isPlainObject_", "enumerable", "writable", "createFlowAnnotation", "hasProp", "isFlow", "flowDescriptor", "createFlowDescriptor", "_this$options_2", "decorateFlow20223_", "flow", "isMobXFlow", "assertFlowDescriptor", "createComputedAnnotation", "assertComputedDescriptor", "defineComputedProperty_", "assign", "get", "set", "decorateComputed20223_", "computedValues", "createComputedValue", "target", "ComputedValue", "_adm$lazyComputedKeys", "asObservableObject", "$mobx", "observable", "values_", "derivation", "delete", "lazyComputedKeys_", "Map", "_computedValues", "computed", "_computedValues2", "WeakMap", "getObservablePropValue_", "createObservableAnnotation", "_this$options_$enhanc", "assertObservableDescriptor", "defineObservableProperty_", "enhancer_", "deepEnhancer", "decorateObservable20223_", "desc", "registerLazy", "_adm$lazyObservableKe", "lazyObservableKeys_", "_ann$options_$enhance", "ObservableValue", "_this$$mobx", "call", "_this$$mobx2", "setObservablePropValue_", "init", "AUTO", "autoAnnotation", "createAutoAnnotation", "_this$options_3", "_this$options_4", "isGenerator", "flowAnnotation", "autoBind", "flowBound", "actionAnnotation", "autoActionBound", "observableAnnotation", "deep", "observableRef", "_this$options_5", "_this$options_6", "createDecoratorAnnotation", "decorate", "decoratorAnnotation", "OBSERVABLE", "OBSERVABLE_REF", "defaultCreateObservableOptions", "deep", "name", "undefined", "defaultDecorator", "Object", "freeze", "asCreateObservableOptions", "thing", "observableAnnotation", "createObservableAnnotation", "OBSERVABLE", "observableRefAnnotation", "OBSERVABLE_REF", "enhancer_", "referenceEnhancer", "createObservableDecoratorAnnotation", "annotation", "createDecoratorAnnotation", "decorateObservable20223_", "getEnhancerFromOptions", "options", "deep", "deepEnhancer", "referenceEnhancer", "getEnhancerFromAnnotation", "defaultDecorator", "getAnnotationFromOptions", "_options$defaultDecor", "createAutoAnnotation", "undefined", "_annotation$options_$", "_annotation$options_", "options_", "enhancer_", "createObservable", "v", "arg2", "arg3", "kind", "observableAnnotation", "isObservable", "isPlainObject", "observable", "object", "Array", "isArray", "array", "isES6Map", "map", "isES6Set", "set", "box", "observableFactories", "value", "o", "asCreateObservableOptions", "ObservableValue", "name", "equals", "initialValues", "createObservableArray", "ObservableMap", "ObservableSet", "props", "annotations", "initObservable", "extendObservable", "asDynamicObservableObject", "observableRef", "observableRefAnnotation", "observable", "assign", "createObservable", "observableAnnotation", "observableFactories", "COMPUTED", "createComputedDecoratorAnnotation", "annotation", "createDecoratorAnnotation", "decorateComputed20223_", "computedAnnotation", "createComputedAnnotation", "COMPUTED", "computed", "arg1", "arg2", "kind", "decorateComputed20223_", "computedAnnotation", "isPlainObject", "createComputedDecoratorAnnotation", "createComputedAnnotation", "COMPUTED", "__DEV__", "isFunction", "die", "opts", "get", "name", "ComputedValue", "assign", "currentActionId", "nextActionId", "isFunctionNameConfigurable", "_getDescriptor$config", "_getDescriptor", "getDescriptor", "configurable", "tmpNameDescriptor", "value", "writable", "enumerable", "createAction", "actionName", "fn", "autoAction", "ref", "res", "executeAction", "arguments", "isMobxAction", "toString", "defineProperty", "canRunAsDerivation", "scope", "args", "runInfo", "_startAction", "apply", "err", "error_", "_endAction", "notifySpy_", "isSpyEnabled", "startTime_", "Date", "now", "flattenedArgs", "Array", "from", "EMPTY_ARRAY", "spyReportStart", "type", "ACTION", "object", "prevDerivation_", "globalState", "trackingDerivation", "runAsAction", "startBatch", "prevAllowStateChanges_", "allowStateChanges", "untrackedStart", "allowStateChangesStart", "prevAllowStateReads_", "allowStateReads", "allowStateReadsStart", "runAsAction_", "actionId_", "parentActionId_", "undefined", "suppressReactionErrors", "allowStateChangesEnd", "allowStateReadsEnd", "endBatch", "untrackedEnd", "spyReportEnd", "time", "func", "prev", "CREATE", "ObservableValue", "Atom", "constructor", "enhancer_", "name_", "getNextId", "notifySpy", "equals_", "compareDefault", "hasUnreportedChange_", "interceptors_", "changeListeners_", "value_", "dehancer", "_this$value_", "spyReport", "observableKind", "debugObjectName", "newValue", "dehanceValue", "set", "oldValue", "prepareNewValue_", "UNCHANGED", "UPDATE", "setNewValue_", "checkIfStateModificationsAreAllowed", "hasInterceptors", "change", "interceptChange", "reportChanged", "hasListeners", "notifyListeners", "reportObserved", "raw", "toJSON", "valueOf", "toPrimitive", "Symbol", "isObservableValue", "createInstanceofPredicate", "options", "dependenciesState_", "observing_", "newObserving_", "observers_", "runId_", "lastAccessedBy_", "lowestObserverState_", "unboundDepsCount_", "CaughtException", "triggeredBy_", "flags_", "derivation", "setter_", "scope_", "requiresReaction_", "keepAlive_", "onBOL", "onBUOL", "equals", "context", "requiresReaction", "keepAlive", "onBecomeStale_", "propagateMaybeChanged", "onBO", "forEach", "listener", "onBUO", "isComputing", "getFlag", "setFlag", "isRunningSetter", "isBeingObserved", "isPendingUnobservation", "diffValue", "inBatch", "size", "shouldCompute", "warnAboutUntrackedRead_", "computeValue_", "wasBeingObserved", "prevTrackingContext", "trackingContext", "trackAndCompute", "propagateChangeConfirmed", "markObserved", "result", "isCaughtException", "cause", "call", "wasSuspended", "changed", "track", "trackDerivedFunction", "disableErrorBoundaries", "e", "suspend_", "clearObserving", "computedRequiresReaction", "console", "warn", "isComputedValue", "prevAllowStateReads", "prevUntracked", "obs", "l", "length", "i", "obj", "changeDependenciesStateTo0", "checkIfStateModificationsAreAllowed", "atom", "__DEV__", "hasObservers", "observers_", "size", "globalState", "allowStateChanges", "enforceActions", "console", "warn", "name_", "checkIfStateReadsAreAllowed", "observable", "allowStateReads", "observableRequiresReaction", "trackDerivedFunction", "derivation", "f", "context", "prevAllowStateReads", "allowStateReadsStart", "changeDependenciesStateTo0", "newObserving_", "Array", "runId_", "observing_", "length", "unboundDepsCount_", "runId", "prevTracking", "trackingDerivation", "inBatch", "result", "disableErrorBoundaries", "call", "e", "CaughtException", "bindDependencies", "warnAboutDerivationWithoutDependencies", "allowStateReadsEnd", "requiresObservable_", "reactionRequiresObservable", "prevObserving", "observing", "lowestNewObservingDerivationState", "i0", "l", "i", "dep", "diffValue", "dependenciesState_", "removeObserver", "addObserver", "onBecomeStale_", "clearObserving", "obs", "untracked", "action", "prev", "untrackedStart", "untrackedEnd", "lowestObserverState_", "MOBX_GLOBALS_VERSION", "MobXGlobals", "constructor", "version", "MOBX_GLOBALS_VERSION", "UNCHANGED", "trackingDerivation", "trackingContext", "runId", "mobxGuid", "inBatch", "pendingUnobservations", "pendingReactions", "isRunningReactions", "isRunningUnobservations", "allowStateChanges", "allowStateReads", "enforceActions", "spyListeners", "globalReactionErrorHandlers", "computedRequiresReaction", "reactionRequiresObservable", "observableRequiresReaction", "disableErrorBoundaries", "suppressReactionErrors", "safeDescriptors", "canMergeGlobalState", "isolateCalled", "globalState", "global", "globalThis", "__mobxInstanceCount", "__mobxGlobals", "setTimeout", "die", "addObserver", "observable", "node", "_observable$observers2", "observers_", "Set", "add", "lowestObserverState_", "dependenciesState_", "removeObserver", "observers", "delete", "size", "queueForUnobservation", "isPendingUnobservation", "globalState", "pendingUnobservations", "push", "startBatch", "inBatch", "endBatch", "runReactions", "isRunningUnobservations", "list", "i", "length", "isBeingObserved", "onBUO", "ComputedValue", "suspend_", "markObserved", "_observable$observing", "onBO", "observing_", "forEach", "reportObserved", "checkIfStateReadsAreAllowed", "derivation", "trackingDerivation", "runId_", "lastAccessedBy_", "newObserving_", "unboundDepsCount_", "trackingContext", "propagateChanged", "_observable$observers3", "d", "onBecomeStale_", "propagateChangeConfirmed", "_observable$observers4", "propagateMaybeChanged", "_observable$observers5", "Reaction", "constructor", "name_", "__DEV__", "getNextId", "onInvalidate_", "errorHandler_", "requiresObservable_", "flags_", "isDisposed", "getFlag", "newValue", "setFlag", "isScheduled", "isTrackPending", "isRunning", "diffValue", "schedule_", "pendingReactions", "runReaction_", "prev", "shouldCompute", "isSpyEnabled", "spyReport", "name", "type", "e", "reportExceptionInDerivation_", "track", "fn", "notify", "startTime", "Date", "now", "spyReportStart", "prevReaction", "result", "trackDerivedFunction", "undefined", "clearObserving", "isCaughtException", "cause", "spyReportEnd", "time", "error", "disableErrorBoundaries", "message", "suppressReactionErrors", "console", "warn", "globalReactionErrorHandlers", "f", "dispose", "getDisposer_", "abortSignal", "removeEventListener", "addEventListener", "$mobx", "Symbol", "toString", "MAX_REACTION_ITERATIONS", "reactionScheduler", "f", "runReactions", "globalState", "inBatch", "isRunningReactions", "runReactionsHelper", "allReactions", "pendingReactions", "iterations", "length", "console", "error", "__DEV__", "splice", "remainingReactions", "i", "l", "runReaction_", "isReaction", "createInstanceofPredicate", "Reaction", "isSpyEnabled", "__DEV__", "globalState", "spyListeners", "length", "spyReport", "event", "listeners", "i", "l", "spyReportStart", "change", "assign", "END_EVENT", "type", "spyReportEnd", "spy", "listener", "console", "warn", "push", "once", "filter", "ACTION", "AUTOACTION", "AUTOACTION_BOUND", "DEFAULT_ACTION_NAME", "actionAnnotation", "createActionAnnotation", "ACTION", "autoActionAnnotation", "createActionAnnotation", "AUTOACTION", "autoAction", "autoActionBoundAnnotation", "AUTOACTION_BOUND", "bound", "createActionDecoratorAnnotation", "annotation", "createDecoratorAnnotation", "decorateAction20223_", "createActionFactory", "res", "action", "arg1", "arg2", "kind", "actionAnnotation", "isFunction", "createAction", "name", "DEFAULT_ACTION_NAME", "isStringish", "ACTION", "__DEV__", "die", "assign", "autoActionBound", "createActionDecoratorAnnotation", "autoActionBoundAnnotation", "runInAction", "fn", "executeAction", "name", "DEFAULT_ACTION_NAME", "undefined", "isAction", "thing", "isFunction", "isMobxAction", "autorun", "view", "opts", "EMPTY_OBJECT", "_opts$name", "_opts$signal", "__DEV__", "die", "getNextId", "runSync", "scheduler", "delay", "reaction", "Reaction", "track", "reactionRunner", "onError", "requiresObservable", "createSchedulerFromOptions", "isScheduled", "isDisposed", "signal", "aborted", "schedule_", "getDisposer_", "run", "f", "setTimeout", "expression", "effect", "_opts$name2", "_opts$signal2", "isPlainObject", "effectAction", "action", "wrapErrorHandler", "firstTime", "value", "equals", "compareDefault", "r", "changed", "oldValue", "nextValue", "allowStateChanges", "fireImmediately", "errorHandler", "baseFn", "apply", "arguments", "e", "call", "extendObservable", "target", "properties", "annotations", "options", "__DEV__", "arguments", "length", "die", "isObservableMap", "isPlainObject", "isObservable", "descriptors", "getOwnPropertyDescriptors", "initObservable", "adm", "asObservableObject", "$mobx", "ownKeys", "forEach", "key", "extend_", "generatorId", "FlowCancellationError", "Error", "constructor", "Object", "setPrototypeOf", "new", "prototype", "name", "toString", "message", "createFlowDecoratorAnnotation", "annotation", "createDecoratorAnnotation", "decorateFlow20223_", "flowAnnotation", "createFlowAnnotation", "flowBoundAnnotation", "bound", "flow", "assign", "arg1", "arg2", "kind", "__DEV__", "arguments", "length", "die", "generator", "name", "res", "ctx", "args", "runId", "generatorId", "gen", "action", "apply", "rejector", "pendingPromise", "undefined", "promise", "Promise", "resolve", "reject", "stepId", "onFulfilled", "ret", "next", "call", "e", "onRejected", "err", "throw", "isFunction", "then", "done", "value", "cancelActionName", "cancel", "cancelPromise", "return", "yieldedPromise", "noop", "FlowCancellationError", "isMobXFlow", "flowBound", "isFlow", "fn", "isMobXFlow", "interceptReads", "thing", "propOrHandler", "handler", "target", "isObservableMap", "isObservableArray", "isObservableValue", "getAdministration", "isObservableObject", "__DEV__", "isStringish", "die", "dehancer", "undefined", "intercept", "isFunction", "interceptProperty", "interceptInterceptable", "registerInterceptor", "property", "_isObservable", "value", "property", "undefined", "__DEV__", "isObservableMap", "isObservableArray", "die", "isObservableObject", "_adm$lazyComputedKeys", "_adm$lazyObservableKe", "adm", "$mobx", "values_", "has", "lazyComputedKeys_", "lazyObservableKeys_", "isAtom", "isReaction", "isComputedValue", "isObservable", "arguments", "length", "keys", "obj", "isObservableObject", "$mobx", "keys_", "isObservableMap", "isObservableSet", "Array", "from", "isObservableArray", "map", "_", "index", "die", "values", "key", "get", "slice", "entries", "set", "value", "arguments", "length", "startBatch", "endBatch", "set_", "add", "parseInt", "apiDefineProperty", "obj", "key", "descriptor", "isObservableObject", "$mobx", "defineProperty_", "die", "apiOwnKeys", "ownKeys_", "observe", "thing", "propOrCb", "cbOrFire", "fireImmediately", "isFunction", "observeObservableProperty", "observeObservable", "listener", "adm", "getAdministration", "isObservableArray", "observableKind", "object", "proxy_", "debugObjectName", "atom_", "name_", "type", "index", "added", "values_", "slice", "addedCount", "length", "removed", "removedCount", "isObservableMap", "__DEV__", "isObservableSet", "observeValue", "registerListener", "property", "isComputedValue", "firstTime", "prevValue", "undefined", "autorun", "newValue", "get", "prevU", "untrackedStart", "UPDATE", "oldValue", "untrackedEnd", "value_", "cache", "map", "value", "set", "toJSHelper", "source", "__alreadySeen", "Date", "isObservable", "isObservableValue", "has", "res", "Array", "forEach", "idx", "Set", "add", "Map", "objectPrototype", "propertyIsEnumerable", "call", "toJS", "options", "transaction", "action", "thisArg", "startBatch", "apply", "endBatch", "when", "predicate", "arg1", "arg2", "arguments", "whenPromise", "_when", "effect", "opts", "timeoutHandle", "timeout", "error", "Error", "setTimeout", "disposer", "isDisposed", "onError", "name", "getNextId", "effectAction", "createAction", "r", "cond", "allowStateChanges", "dispose", "clearTimeout", "_opts$signal", "signal", "aborted", "assign", "Promise", "reject", "cancel", "abort", "resolve", "_opts$signal2", "addEventListener", "finally", "_opts$signal3", "removeEventListener", "getAdm", "target", "objectProxyTraps", "has_", "get_", "_getAdm$set_", "isStringish", "set_", "deleteProperty", "_getAdm$delete_", "delete_", "defineProperty", "_getAdm$definePropert", "ownKeys", "preventExtensions", "asDynamicObservableObject", "_target$$mobx", "_target$$mobx$proxy_", "asObservableObject", "Proxy", "hasInterceptors", "interceptable", "interceptors_", "registerInterceptor", "handler", "interceptors", "push", "once", "indexOf", "splice", "interceptChange", "change", "i", "l", "hasListeners", "listenable", "changeListeners_", "listeners", "notifyListeners", "makeObservable", "annotations", "initObservable", "make_", "make_", "adm", "key", "annotation", "defaultAnnotation_", "assertAnnotable", "target_", "die", "annotationType_", "name_", "toString", "source", "objectPrototype", "descriptor", "getDescriptor", "outcome", "Object", "getPrototypeOf", "recordAnnotationApplied", "SPLICE", "UPDATE", "MAX_SPLICE_SIZE", "arrayTraps", "get", "target", "name", "$mobx", "getArrayLength_", "isNaN", "get_", "parseInt", "hasProp", "arrayExtensions", "set", "value", "setArrayLength_", "set_", "preventExtensions", "ObservableArrayAdministration", "constructor", "__DEV__", "getNextId", "enhancer", "owned_", "atom_", "values_", "interceptors_", "changeListeners_", "enhancer_", "dehancer", "proxy_", "lastKnownLength_", "Atom", "newV", "oldV", "dehanceValue_", "undefined", "dehanceValues_", "values", "length", "map", "reportObserved", "newLength", "currentLength", "newItems", "Array", "from", "spliceWithArray_", "updateArrayLength_", "oldLength", "delta", "index", "deleteCount", "checkIfStateModificationsAreAllowed", "Math", "max", "arguments", "min", "EMPTY_ARRAY", "hasInterceptors", "change", "interceptChange", "object", "type", "removedCount", "added", "v", "lengthDelta", "res", "spliceItemsIntoValues_", "notifyArraySplice_", "splice", "slice", "oldItems", "i", "notifyArrayChildUpdate_", "newValue", "oldValue", "notifySpy", "isSpyEnabled", "notify", "hasListeners", "observableKind", "debugObjectName", "spyReportStart", "reportChanged", "notifyListeners", "spyReportEnd", "removed", "addedCount", "changed", "createObservableArray", "initialValues", "owned", "initObservable", "addHiddenFinalProp", "proxy", "Proxy", "clear", "replace", "toJSON", "spliceWithArray", "push", "items", "pop", "shift", "unshift", "reverse", "globalState", "trackingDerivation", "sort", "copy", "apply", "remove", "idx", "indexOf", "addArrayExtension", "simpleFunc", "mapLikeFunc", "reduceLikeFunc", "funcName", "funcFactory", "prototype", "dehancedValues", "callback", "thisArg", "element", "call", "accumulator", "currentValue", "isObservableArrayAdministration", "createInstanceofPredicate", "isObservableArray", "thing", "isObject", "ObservableMapMarker", "ADD", "DELETE", "ObservableMap", "initialData", "deepEnhancer", "data_", "hasMap_", "keysAtom_", "createAtom", "Map", "merge", "has_", "has", "entry", "newEntry", "ObservableValue", "referenceEnhancer", "stringifyKey", "onBUOL", "Set", "delete", "hasKey", "updateValue_", "addValue_", "value_", "transaction", "_this$hasMap_$get", "setNewValue_", "observable", "prepareNewValue_", "UNCHANGED", "_this$hasMap_$get2", "getOrInsert", "getOrInsertComputed", "keys", "self", "makeIterableForMap", "next", "done", "entries", "Symbol", "iterator", "forEach", "other", "isObservableMap", "isPlainObject", "getPlainObjectKeys", "isArray", "isES6Map", "isPlainES6Map", "untracked", "replacementMap", "convertToMap", "orderedData", "keysReportChangedCalled", "deleted", "keyExisted", "size", "iter1", "iter2", "next1", "next2", "toStringTag", "makeIterable", "dataStructure", "ObservableSetMarker", "ObservableSet", "callbackFn", "add", "makeIterableForSet", "intersection", "otherSet", "union", "difference", "symmetricDifference", "isSubsetOf", "isSupersetOf", "isDisjointFrom", "isObservableSet", "isES6Set", "replacementValues", "descriptorCache", "create", "REMOVE", "ObservableObjectAdministration", "autoAnnotation", "isPlainObject_", "appliedAnnotations_", "pendingKeys_", "lazyComputedKeys_", "lazyObservableKeys_", "isAnnotation", "getObservablePropValue_", "_ref", "_this$values_$get", "materializeLazyComputed_", "materializeLazyObservable_", "_this$lazyComputedKey", "factory", "computed", "_this$lazyObservableK", "setObservablePropValue_", "_ref2", "_this$values_$get2", "ComputedValue", "proxyTrap", "Reflect", "extend_", "enumerable", "writable", "configurable", "defineProperty_", "startBatch", "deleteOutcome", "delete_", "assign", "defineProperty", "notifyPropertyAddition_", "endBatch", "defineObservableProperty_", "cachedDescriptor", "getCachedObservablePropDescriptor", "safeDescriptors", "defineComputedProperty_", "options", "context", "_this$pendingKeys_", "_getDescriptor", "deleteProperty", "propagateChanged", "_this$pendingKeys_2", "ownKeys_", "ownKeys", "keys_", "asObservableObject", "_options$name", "isObservableObject", "getAdministration", "getDebugName", "isExtensible", "String", "getAnnotationFromOptions", "addHiddenProp", "isObservableObjectAdministration", "isOverride", "fieldName", "currentAnnotationType", "requestedAnnotationType", "getAtom", "property", "_adm$values_$get", "isAtom", "isComputedValue", "isReaction", "isFunction", "named", "isAction", "cb", "derivation", "untrackedStart", "allowStateChanges", "allowStateChangesStart", "allowStateChangesEnd", "untrackedEnd", "maybeIteratorPrototype", "_globalThis$Iterator", "globalThis", "Iterator", "prototype", "makeIterable", "iterator", "Symbol", "getSelf", "assign", "Object", "create", "isAnnotation", "thing", "annotationType_", "isFunction", "make_", "extend_", "__DEV__", "g", "forEach", "m", "die", "__MOBX_DEVTOOLS_GLOBAL_HOOK__", "injectMobx", "spy", "extras", "getDebugName", "$mobx", "Hook", "object", "patch", "p", "snapshot", "getParent", "d", "clone", "destroy", "isAlive", "reportObserved", "e", "ObservableInstanceLifecycle", "InternalEvents", "snapshot", "id", "p", "EMPTY_OBJECT", "root", "fn", "livelinessChecking", "error", "identifier", "self", "patch", "addHiddenFinalProp", "extend", "TypeFlags", "nextActionId", "fn", "id", "fn", "n", "array", "result", "error", "e", "next", "defaultOptions", "e", "isPlainObject", "result", "keys", "key", "i", "error", "isPrimitive", "t", "EMPTY_ARRAY", "errors", "a", "identifier", "set", "id", "matches", "n", "NodeLifeCycle", "i", "e", "EMPTY_ARRAY", "keys", "result", "key", "plainObjectString", "EMPTY_ARRAY", "EMPTY_OBJECT", "identity", "_", "isFinite", "extend", "a", "b", "i", "key", "isPlainObject", "_a", "isPrimitive", "defineProperty", "object", "addHiddenFinalProp", "fn", "handlers", "f", "stringStartsWith", "deprecated", "id", "typeName", "min", "max", "n", "s", "patch", "x", "p", "stringStartsWith", "e", "snapshot", "methods", "MapIdentifierMode", "v", "key", "id", "hooks", "result", "addHiddenFinalProp", "observe", "identifier", "isPlainObject", "EMPTY_OBJECT", "hooks", "snapshot", "result", "addHiddenFinalProp", "observe", "key", "_", "i", "node", "patch", "EMPTY_ARRAY", "length", "j", "EMPTY_OBJECT", "isPlainObject", "s", "e", "t", "p", "i", "EMPTY_ARRAY", "key", "isPrimitive", "snapshot", "fn", "self", "isPlainObject", "addHiddenFinalProp", "set", "_a", "result", "EMPTY_OBJECT", "observe", "patch", "typeName", "i", "prev", "identity", "v", "isFinite", "snapshot", "v", "i", "o", "result", "factory", "t", "errors", "types", "isPlainObject", "t", "e", "id", "root", "m", "_", "identifier", "snapshot", "e", "id", "disable", "enable", "i", "debug", "key", "v", "a", "b", "n", "i", "end", "extend", "data", "length", "equals", "i", "once", "key", "fn", "equals", "getter", "isString", "i", "keys", "i", "key", "key", "values", "isEmpty", "transform2", "transform", "x", "y", "compose", "transform", "sin", "cos", "a", "b", "c", "d", "e", "f", "toString", "values", "equivalent", "i", "offset", "end", "transform", "i", "j", "x", "y", "k", "rotate", "cos", "sin", "scale", "transform", "clone", "x", "y", "point", "extent", "get", "scale", "compose", "coordinates", "i", "rotate", "scale", "transform", "offset2", "x", "y", "x1", "y1", "dx", "dy", "offset", "t", "i", "lerp", "end", "max", "x2", "y2", "tmpPoint", "squaredDistance", "offset", "i", "coordinates", "j", "end", "offset", "end", "coordinates", "i", "j", "offset", "end", "o", "t", "n", "x1", "y1", "length", "i", "x2", "y2", "lerp", "m", "interpolate", "offset", "end", "x", "y", "x1", "y1", "x2", "y2", "i", "offset", "end", "a", "b", "c", "d", "t", "u", "offset", "end", "point2", "i", "offset", "end", "x1", "y1", "length", "i", "x2", "y2", "offset", "end", "n", "x1", "y1", "x2", "y2", "i", "x", "y", "squaredDistance", "offset", "end", "x1", "y1", "x2", "y2", "i", "coordinates", "extend", "x", "y", "m", "clone", "key", "id", "METERS_TO_FEET", "feature", "point", "uuid", "key", "map", "dx", "dy", "length", "i", "polygon", "f", "feature", "map", "coordinates", "toLonLat", "fromLonLat", "toLonLat", "fromLonLat", "map", "projection", "center", "width", "height", "center", "toLonLat", "x", "y", "dx", "dy", "passive", "width", "height", "canvasPool", "i", "s", "rgb", "clamp", "hex", "i", "toString", "cache", "v", "r", "g", "b", "y", "l", "q", "h", "c", "x", "z", "fromString", "key", "asArray", "a", "errorHandler", "error", "resolve", "e", "i", "key", "asArray", "width", "height", "resolve", "get", "toString", "get", "i", "f", "f", "key", "i", "height", "cache", "width", "prev", "transform", "w", "h", "x", "y", "scale", "context", "i", "size", "scale", "scale", "scale", "size", "fill", "r2", "a", "b", "d", "e", "k", "l", "add", "asArray", "i", "scale", "get", "fill", "asArray", "offset", "width", "fill", "feature", "width", "array", "i", "f", "n", "prev", "projection", "xhr", "coordinates", "ends", "i", "extend", "layout", "x", "y", "m", "interpolate", "offset", "end", "start", "length", "coordinates", "point", "x", "y", "squaredDistance", "i", "coordinates", "point", "extend", "x", "y", "i", "squaredDistance", "j", "n", "offset", "end", "x0", "y0", "i", "coordinates", "x", "y", "offset", "i", "x", "x1", "x2", "y1", "y2", "y", "r", "end", "offset", "end", "i", "offset", "end", "x1", "y1", "x2", "y2", "right", "i", "coordinates", "linearRing", "extend", "polygon", "x", "y", "right", "linearRings", "offset", "i", "end", "center", "i", "j", "polygon", "offset", "angle", "linearRingss", "offset", "i", "coordinates", "i", "polygon", "offset", "j", "extend", "x", "y", "right", "linearRingss", "end", "tmpTransform", "id", "key", "linearRingss", "offset", "i", "end", "extend", "transform", "projection", "get", "scale", "compose", "Feature_default", "k", "left", "right", "n", "m", "z", "s", "t", "i", "j", "a", "b", "bbox", "result", "intersects", "i", "data", "a", "b", "left", "right", "height", "N", "M", "N2", "right2", "j", "level", "isNode", "extend", "m", "bbox2", "siblings", "k", "p", "n", "RBush", "values", "i", "l", "bbox", "result", "isEmpty", "data", "get", "self", "resolve", "projection", "feature", "Feature_default", "id", "i", "length", "keys", "result", "isEmpty", "extend", "projection", "filter", "x", "y", "object", "EventType_default", "feature", "coordinates", "i", "offset", "end", "feature", "n", "fillInstruction", "equals", "width", "feature", "i", "size", "origin", "offset", "end", "feature", "i", "offset", "fill", "i", "end", "feature", "coordinates", "x0", "y0", "x1", "y1", "dx", "dy", "offset", "e", "end", "i", "ax", "ay", "offset", "end", "x1", "y1", "x2", "y2", "m", "x", "lerp", "y", "offset", "end", "m", "start", "acos", "i", "x1", "y1", "x12", "y12", "x2", "y2", "feature", "coordinates", "i", "o", "c", "chunk", "end", "w", "p1", "p2", "p3", "p", "scale", "start", "end", "offset", "x", "y", "i", "j", "k", "cos", "sin", "dx", "dy", "d", "t", "u", "offset", "end", "scale", "measureAndCacheTextWidth", "cache", "x2", "y2", "x1", "y1", "interpolate", "lerp", "rotate", "PI", "result", "x", "y", "s", "i", "chars", "render", "i", "i", "result", "key", "scale", "width", "height", "w", "h", "x", "text", "p1", "p2", "p3", "p4", "fillInstruction", "strokeInstruction", "feature", "y", "transform", "compose", "intersects", "origin", "equals", "d", "x1", "y1", "x2", "y2", "dx", "dy", "r", "fn", "render", "end", "c", "chars", "ii", "k", "willReadFrequently", "count", "start", "transform", "i", "compose", "feature", "x", "y", "result", "j", "isEmpty", "context", "size", "distance", "width", "height", "scale", "asArray", "get", "image", "size", "offset", "transform", "offset", "end", "i", "x", "y", "compose", "close", "n", "length", "dx", "dy", "feature", "equals", "t", "size", "transforms", "projection", "width", "height", "i", "feature", "j", "fill", "geometry", "k", "x", "y", "clamp", "r", "g", "b", "feature", "transform", "loading", "i", "Event_default", "key", "matches", "data", "transform", "width", "height", "context", "equals", "asArray", "equivalent", "compose", "toString", "Event_default", "EventType_default", "center", "Layer_default", "Layer_default", "center", "projection", "width", "height", "transform", "render", "EventType_default", "resolve", "size", "transforms", "userProjection", "matches", "feature", "key", "wrapX", "equals", "i", "extent", "userExtent", "names", "isType", "fromString", "i", "key", "b", "validators", "parser", "fromString", "context", "e", "length", "i", "key", "left", "right", "min", "max", "toString", "scale", "fill", "feature", "id", "length", "i", "filter", "j", "context", "isEmpty", "fill", "offset", "width", "height", "size", "evaluator", "array", "center", "size", "x", "clamp", "y", "none", "t", "result", "clamp", "size", "z", "offset", "disable", "none", "n", "t", "View", "key", "center", "i", "start", "j", "now", "x0", "y0", "x1", "y1", "x", "y", "size", "add", "w", "h", "max", "projection", "offset", "clamp", "userProjection", "position", "equals", "none", "disable", "clamp", "array", "visible", "array", "map", "layerState", "EventType_default", "Layer_default", "Property", "Layer_default", "length", "i", "Vector_default", "Property_default", "Property_default", "map", "center", "length", "i", "map", "map", "EventType_default", "map", "EventType_default", "newEvent", "id", "doc", "elements", "i", "key", "count", "n", "center", "map", "i", "visible", "equals", "i", "map", "transform", "contains", "map", "defaults", "x", "y", "dx", "dy", "map", "all", "i", "always", "all", "map", "centroid", "distance", "center", "map", "disable", "size", "offset", "map", "coordinates", "width", "height", "map", "map", "key", "map", "key", "map", "always", "all", "map", "doc", "e", "now", "clamp", "map", "disable", "dx", "dy", "distance", "map", "defaults", "Property", "id", "i", "key", "array", "map", "compose", "result", "feature", "projection", "wrapX", "matches", "i", "j", "coordinates", "callback", "order", "m", "a", "b", "map", "Event_default", "EventType_default", "a", "b", "i", "transform", "w", "h", "Layer_default", "map", "i", "Map", "defaults", "id", "feature", "viewport", "EventType_default", "doc", "key", "size", "width", "height", "transform", "warn", "equals", "values", "Map_default", "e", "listen", "v", "Base_default", "Base_default", "attr", "i", "e", "html", "fn", "s", "value", "offset", "r", "d", "scale", "height", "animate", "to", "init", "b", "Map_default", "e", "self", "Vector_default", "feature", "f", "map", "b", "fill", "stroke", "i", "clone", "center", "extend", "p", "dx", "dy", "g", "add", "l", "c", "j", "a", "k", "start", "end", "point", "s", "controller", "feature", "e", "c", "key", "controller", "degrees", "visit", "feature", "model", "enable", "disable", "snapshot", "e", "fromLonLat", "width", "height", "uuid", "id", "center", "x", "y", "dx", "dy", "squaredDistance", "i", "offset", "coordinates", "rotate", "Circle_default", "i", "x", "y", "extend", "coordinates", "count", "start", "x0", "y0", "end", "dx", "dy", "map", "x", "y", "i", "feature", "j", "a", "b", "x1", "y1", "x2", "y2", "clamp", "feature", "coordinates", "projection", "Circle_default", "center", "squaredDistance", "userProjection", "Vector_default", "always", "Property_default", "trace", "map", "move", "now", "start", "end", "i", "target", "dx", "dy", "n", "coordinates", "always", "Vector_default", "getDefaultStyleFunction", "equals", "feature", "trace", "map", "i", "j", "k", "userProjection", "projection", "geometry", "start", "end", "a", "b", "buffer", "squaredDistance", "left", "right", "prev", "getDefaultStyleFunction", "feature", "map", "layer", "Vector_default", "key", "i", "add", "toggle", "set", "j", "extend", "projection", "userProjection", "polygon", "i", "segmenter", "coordinates", "offset", "end", "j", "k", "tempSegment", "feature", "register", "result", "map", "keys", "squaredDistance", "always", "Property_default", "projection", "userProjection", "feature", "map", "csrfToken", "action", "reportError", "model", "model", "reportError", "model", "action", "put", "model", "self", "self", "getParent", "reportError", "i", "position", "result", "clone", "feature", "feature", "uuid", "id", "start", "x", "y", "createOrUpdate", "feature", "coordinates", "width", "height", "top", "left", "bottom", "right", "feature", "controller", "feature", "controller", "uuid", "coordinates", "feature", "controller", "c", "i", "dx", "dy", "uuid", "toLonLat", "x", "y", "feature", "map", "distance", "start", "end", "dx", "dy", "midPoint", "width", "controller", "coordinates", "feature", "map", "controller", "coordinates", "feature", "feature", "feature", "get", "feature", "Feature_default", "write", "transform", "coordinates", "i", "object", "geometry", "Feature_default", "Geometry", "Feature_default", "object", "feature", "get", "object", "Feature_default", "feature", "i", "projection", "id", "isEmpty", "coordinates", "geometry", "right", "coordinates", "isNumber", "coordinates", "j", "radians", "distance", "radiansToDegrees", "radians", "isNumber", "j", "k", "l", "i", "i", "j", "g", "result", "x", "y", "x", "p", "i", "j", "y", "n", "array", "merge", "cos", "sin", "x", "sqrt", "x", "asin", "noop", "object", "i", "n", "coordinates", "cartesian", "asin", "spherical", "cos", "sin", "a", "b", "k", "d", "l", "sqrt", "a", "b", "compose", "x", "y", "cos", "sin", "x", "y", "z", "k", "asin", "cos", "sin", "point", "t", "x", "y", "m", "noop", "result", "a", "b", "point", "compareIntersection", "interpolate", "i", "n", "p1", "x", "start", "array", "a", "b", "point", "polygon", "sin", "cos", "i", "n", "m", "j", "sign", "k", "asin", "interpolate", "start", "polygon", "point", "merge", "clean", "i", "n", "m", "a", "b", "clean", "sin", "cos", "from", "to", "cos", "interpolate", "from", "to", "visible", "clean", "point2", "v", "c", "t", "a", "b", "n2", "determinant", "A", "B", "u", "w", "t2", "sqrt", "q", "z", "delta", "r", "code", "a", "b", "x0", "y0", "x1", "y1", "ax", "ay", "dx", "dy", "r", "x0", "y0", "x1", "y1", "visible", "x", "y", "interpolate", "from", "to", "a", "a1", "p", "compareIntersection", "b", "polygon", "clean", "point", "i", "n", "ring", "j", "m", "b1", "merge", "v", "x", "noop", "x", "y", "methods", "s", "key", "x", "y", "projection", "object", "b", "w", "h", "k", "x", "y", "size", "width", "height", "cos", "x", "y", "x0", "y0", "x1", "y1", "a1", "b1", "dx", "dy", "a", "b", "c", "m", "sqrt", "asin", "p", "x2", "y2", "dx2", "dy2", "point", "x", "y", "rotate", "r", "k", "dx", "dy", "transform", "cos", "sin", "a", "b", "x0", "y0", "x1", "y1", "cache", "projection", "point", "_", "sqrt", "object", "size", "width", "height", "center", "scale", "x", "y", "cx", "cos", "cy", "k", "sin", "z", "sqrt", "c", "asin", "c", "sin", "z", "jsts", "buffer", "feature", "geometry", "buffered", "projection", "distance", "result", "self", "METERS_TO_INCHES", "toLonLat", "METERS_TO_INCHES", "x1", "y1", "x2", "y2", "p", "origin", "model", "FEET_TO_METERS", "a", "distance", "y", "x", "i", "point", "result", "feature", "origin", "ClipperLib", "feature", "size", "result", "polygon", "projection", "feature", "model", "p", "polygon", "i", "k", "determinant", "x1", "y1", "x2", "y2", "x", "y", "feature", "i", "p1", "p2", "j", "p3", "p4", "coordinates", "c", "result", "map", "feature", "i", "feature", "j", "coordinates", "c", "epsilon", "feature", "coordinates", "c", "result", "i", "x1", "y1", "x2", "y2", "x", "y", "controller", "map", "feature", "i", "map", "key", "import_lodash", "lineNumberMarkerStyle", "feature", "map", "distance", "position", "data", "self", "data", "error", "canvasPool", "data", "offset", "render", "width", "height", "interpolate", "i", "extend", "xPos", "yPos", "x0", "y0", "x1", "y1", "x2", "y2", "source", "c", "key", "i", "a", "b", "d", "center", "dx", "dy", "clamp", "offset", "z", "size", "width", "height", "render", "e", "state", "i", "canvasPool", "Tile_default", "LRUCache", "key", "f", "keys", "i", "values", "size", "createOrUpdate", "z", "x", "y", "getCacheKey", "z", "x", "y", "z", "x", "y", "z", "set", "Layer_default", "createOrUpdate", "cacheSize", "x", "y", "getCacheKey", "projection", "Tile_default", "map", "viewport", "i", "width", "height", "dx", "dy", "compose", "origin", "w", "h", "j", "frameState", "rx", "ry", "Layer_default", "cacheSize", "Tile_default", "a", "b", "i", "size", "z", "j", "tempExtent", "x", "y", "createOrUpdate", "origin", "scale", "floor", "clamp", "viewport", "length", "projection", "wrapX", "z", "center", "get", "height", "width", "length", "z", "x", "y", "i", "projection", "z", "i", "h", "projection", "key", "z", "x", "y", "scale", "wrapX", "Tile_default", "Tile_default", "key", "projection", "projection", "key", "z", "x", "y", "Tile_default", "pixelRatio", "getCacheKey", "tile", "render", "get", "z", "i", "get", "scale", "projection", "createOrUpdate", "transform", "tileGrid", "bbox", "extent", "projection", "defaultOptions", "z", "x", "y", "Tile_default", "controller", "defaults", "map", "Map_default", "fromLonLat", "factory", "from", "Vector_default", "feature", "degrees", "radians", "point", "uuid", "f", "toLonLat", "layer", "l", "self", "center", "fromLonLat", "c", "toLonLat", "feature", "METERS_TO_INCHES", "p", "fromLonLat", "c", "object", "fromLonLat", "a", "b", "fromLonLat", "object", "buffer", "feature", "controller", "f", "model", "attr", "uuid", "controller", "clone", "destroy", "uuid", "feature", "coordinates", "i", "j", "DefaultRoofSectionsBuilder", "i", "MapManager", "Vector_default", "feature", "defaults", "DefaultRoofSectionsBuilder", "key", "result", "feature", "distance", "p1", "p2", "dx", "dy", "width", "height", "controller", "feature", "model", "uuid", "c", "toLonLat", "o", "map", "center", "p", "fromLonLat", "METERS_TO_INCHES", "point", "i", "distance", "coordinates", "l", "f", "model", "MapModelSynchronizer", "feature", "coordinates", "p", "fromLonLat", "distance", "g", "visible", "self", "getParent", "put", "self", "self", "point", "model", "point", "v", "self", "getParent", "result", "self", "model", "result", "self", "uuid", "identifier", "id", "sumBy", "a", "b", "i", "model", "self", "getParent", "self", "point", "RoofSectionBase", "self", "point", "pointsForSave", "roof_section_model_default", "self", "getParent", "uuid", "i", "self", "visible", "distance", "roof_section_model_default", "self", "count", "data", "roof_plane_model_default", "self", "getParent", "self", "getParent", "uuid", "height", "data", "roof_plane_model_default", "self", "count", "o", "uuid", "a", "b", "i", "persistenceData", "put", "data", "project_model_default", "MapBaseController", "project_model_default", "MapModelSynchronizer", "MapManager", "fromLonLat", "feature", "controller", "map", "defaultOptions", "coordinates", "map", "feature", "controller", "feature", "from", "f", "coordinates", "add", "Base", "controller", "snap", "EditArrays", "Base", "controller", "feature", "controller", "always", "feature", "controller", "feature", "controller", "Base", "controller", "from", "map", "feature", "dx", "dy", "coordinates", "distance", "EditArrays", "Base", "Base", "controller", "f", "from", "feature", "coordinates", "map", "dx", "dy", "distance", "feature", "coordinates", "dx", "dy", "feature", "coordinates", "Base", "controller", "feature", "coordinates", "e", "from", "DEBUG_LOGGING", "Base", "controller", "from", "feature", "f", "key", "dx", "dy", "map", "point", "e", "warn", "coordinates", "c", "i", "j", "x1", "y1", "x2", "y2", "t", "u", "controller", "self", "p", "compact", "c", "width", "height", "x", "y", "drawRect", "clamp", "point", "toLonLat", "fromLonLat", "map", "feature", "key", "coordinates", "_", "i", "html", "elements", "feature", "top", "left", "MapBaseController", "fromLonLat", "from", "EditArrays", "Base", "enable", "disable", "clone", "destroy", "MapBaseController", "k", "feature", "map", "Base", "controller", "feature", "coordinates", "e", "from", "c", "i", "feature", "j", "controller", "map", "feature", "controller", "map", "feature", "Base", "feature", "Base", "controller", "feature", "e", "center", "cos", "sin", "i", "projection", "cx", "cy", "coordinates", "start", "end", "dx", "dy", "MAX_SHAPE_QUANTITY", "controller", "feature", "b", "center", "cos", "sin", "i", "coordinates", "end", "size", "cx", "cy", "points", "r", "controller", "coordinates", "feature", "Obstructions", "Base", "Obstructions", "Base", "Obstructions", "Base", "controller", "e", "feature", "c", "Obstructions", "Base", "feature", "map", "coordinates", "enable", "disable", "uuid", "height", "i", "c", "toLonLat", "clone", "destroy", "RoofPlanes", "Base", "feature", "feature", "coordinates", "feature", "RoofPlanes", "controller", "feature", "RoofPlanes", "Base", "RoofPlanes", "Base", "toLonLat", "RoofPlanes", "Base", "controller", "e", "feature", "c", "RoofPlanes", "Base", "feature", "map", "coordinates", "enable", "disable", "Base", "feature", "RoofSections", "coordinates", "feature", "RoofSections", "Base", "RoofSections", "Base", "uuid", "f", "i", "c", "toLonLat", "RoofSections", "Base", "feature", "f", "linearRing", "i", "c", "toLonLat", "RoofSections", "Base", "fromLonLat", "u", "clone", "destroy", "MapBaseController", "uuid", "container", "height", "result", "identifier", "MapBaseController", "elementType", "width", "identifier", "key", "div", "link", "data", "Form", "import_debounce", "debounce", "isVisible", "Siema", "link", "v", "import_react", "import_client", "import_react", "start", "end", "moment", "import_moment", "React", "PropTypes", "moment", "React", "width", "_", "left", "top", "nonce", "html", "Form", "src_exports", "d", "fn", "wrap", "toString", "hasOwnProperty", "prototype", "result", "cache", "isArray", "isFunction", "isString", "isNumber", "isObject", "isPlainObject", "e", "isRequest", "isHeaders", "trim", "forEach", "fn", "i", "l", "keys", "key", "merge", "j", "extend", "a", "b", "filter", "position", "toArray", "matches", "m", "p1", "p2", "isRegExp", "delimiter", "define", "noop", "visit", "isThenable", "data", "key", "i", "parser", "start", "end", "start", "end", "i", "equals", "filter", "w", "self", "key", "parser", "keys", "computed", "accessors", "prototype", "prototype", "config", "k", "visit", "result", "v", "i", "key", "error", "key", "i", "maxDepth", "build", "result", "encode", "toString", "encode", "$internals", "handlers", "length", "id", "fn", "h", "data", "key", "keys", "i", "key", "result", "key", "stringifySafely", "parser", "e", "defaults", "data", "isFormData", "isFileList", "transitional", "config", "data", "transform", "fn", "config", "resolve", "validateStatus", "start", "min", "push", "now", "i", "throttle", "fn", "now", "flush", "e", "data", "fn", "origin", "i", "e", "end", "config", "config", "a", "b", "merge", "key", "encodeUTF8", "_", "hex", "config", "own", "key", "data", "e", "config", "resolve", "requestHeaders", "transitional", "key", "controller", "signal", "chunk", "end", "iterator", "e", "controller", "done", "i", "c", "next", "isFunction", "encodeUTF8", "_", "hex", "error", "fn", "e", "ReadableStream", "TextEncoder", "Request", "Response", "config", "length", "data", "withCredentials", "own", "key", "flush", "resolve", "fetch", "i", "map", "fn", "e", "adapter", "adapters", "config", "length", "i", "id", "s", "adapters_default", "config", "adapter", "adapters_default", "i", "schema", "keys", "result", "validators", "config", "e", "transitional", "i", "error", "data", "resolve", "i", "config", "controller", "c", "wrap", "key", "create", "all", "adapters_default", "Axios", "AxiosError", "CanceledError", "isCancel", "CancelToken", "VERSION", "all", "isAxiosError", "spread", "toFormData", "AxiosHeaders", "HttpStatusCode", "getAdapter", "mergeConfig", "create", "csrfToken", "errorHandler", "error", "errorHandler", "h", "f", "data", "link", "e", "left", "top", "width", "height", "x", "y", "import_react", "import_client", "e", "link", "React", "o", "number", "link", "i", "i", "isActive", "result", "t", "html", "show", "hide", "start", "reference", "isElement", "isShadowRoot", "name", "style", "round", "round", "isElement", "x", "y", "width", "height", "width", "height", "contains", "isShadowRoot", "next", "getComputedStyle", "isElement", "isShadowRoot", "getComputedStyle", "isShadowRoot", "css", "window", "min", "max", "v", "keys", "key", "toPaddingObject", "popperOffsets", "min", "max", "center", "offset", "effect", "contains", "win", "x", "y", "round", "popper", "position", "getComputedStyle", "effect", "window", "hash", "hash", "getWindowScroll", "win", "getWindowScroll", "win", "html", "width", "height", "x", "y", "html", "getWindowScroll", "width", "height", "x", "y", "getComputedStyle", "getComputedStyle", "win", "isElement", "clippingParents", "getComputedStyle", "contains", "reference", "start", "reference", "isElement", "popperOffsets", "offset", "key", "placements", "placement", "a", "b", "placements", "placement", "i", "start", "_loop", "_i", "checks", "hide", "offset", "distance", "data", "x", "y", "popperOffsets", "data", "offset", "min", "max", "additive", "start", "getWindowScroll", "round", "map", "result", "debounce", "fn", "resolve", "merged", "key", "defaultModifiers", "defaultOptions", "createPopper", "reference", "popper", "options", "isElement", "m", "fn", "debounce", "resolve", "destroy", "state", "effect", "noopFn", "BOX_CLASS", "CONTENT_CLASS", "BACKDROP_CLASS", "ARROW_CLASS", "SVG_ARROW_CLASS", "TOUCH_OPTIONS", "passive", "capture", "TIPPY_DEFAULT_APPEND_TO", "document", "body", "hasOwnProperty", "obj", "key", "call", "getValueAtIndexOrReturn", "value", "index", "defaultValue", "Array", "isArray", "v", "isType", "type", "str", "toString", "indexOf", "invokeWithArgsOrReturn", "args", "debounce", "fn", "ms", "timeout", "arg", "clearTimeout", "setTimeout", "removeProperties", "keys", "clone", "forEach", "splitBySpaces", "split", "filter", "Boolean", "normalizeToArray", "concat", "pushIfUnique", "arr", "push", "unique", "item", "getBasePlacement", "placement", "arrayFrom", "slice", "removeUndefinedProps", "Object", "reduce", "acc", "undefined", "div", "createElement", "isElement", "some", "isNodeList", "isMouseEvent", "isReferenceElement", "_tippy", "reference", "getArrayOfElements", "querySelectorAll", "setTransitionDuration", "els", "el", "style", "transitionDuration", "setVisibilityState", "state", "setAttribute", "getOwnerDocument", "elementOrElements", "element", "ownerDocument", "isCursorOutsideInteractiveBorder", "popperTreeData", "event", "clientX", "clientY", "every", "popperRect", "popperState", "props", "interactiveBorder", "basePlacement", "offsetData", "modifiersData", "offset", "topDistance", "top", "y", "bottomDistance", "bottom", "leftDistance", "left", "x", "rightDistance", "right", "exceedsTop", "exceedsBottom", "exceedsLeft", "exceedsRight", "updateTransitionEndListener", "box", "action", "listener", "method", "actualContains", "parent", "child", "target", "contains", "getRootNode", "host", "currentInput", "isTouch", "lastMouseMoveTime", "onDocumentTouchStart", "window", "performance", "addEventListener", "onDocumentMouseMove", "now", "removeEventListener", "onWindowBlur", "activeElement", "instance", "blur", "isVisible", "bindGlobalEventListeners", "isBrowser", "isIE11", "msCrypto", "createMemoryLeakWarning", "txt", "join", "clean", "spacesAndTabs", "lineStartWithSpaces", "replace", "trim", "getDevMessage", "message", "getFormattedMessage", "visitedMessages", "resetVisitedMessages", "Set", "warnWhen", "condition", "has", "add", "console", "warn", "errorWhen", "error", "validateTargets", "targets", "didPassFalsyValue", "didPassPlainObject", "prototype", "String", "pluginProps", "animateFill", "followCursor", "inlinePositioning", "sticky", "renderProps", "allowHTML", "animation", "arrow", "content", "inertia", "maxWidth", "role", "theme", "zIndex", "defaultProps", "appendTo", "aria", "expanded", "delay", "duration", "getReferenceClientRect", "hideOnClick", "ignoreAttributes", "interactive", "interactiveDebounce", "moveTransition", "onAfterUpdate", "onBeforeUpdate", "onCreate", "onDestroy", "onHidden", "onHide", "onMount", "onShow", "onShown", "onTrigger", "onUntrigger", "onClickOutside", "plugins", "popperOptions", "render", "showOnCreate", "touch", "trigger", "triggerTarget", "defaultKeys", "setDefaultProps", "partialProps", "validateProps", "getExtendedPassedProps", "passedProps", "plugin", "name", "getDataAttributeProps", "propKeys", "valueAsString", "getAttribute", "JSON", "parse", "e", "evaluateProps", "out", "prop", "nonPluginProps", "didPassUnknownProp", "length", "innerHTML", "dangerouslySetInnerHTML", "html", "createArrowElement", "className", "appendChild", "setContent", "textContent", "getChildren", "popper", "firstElementChild", "boxChildren", "children", "find", "node", "classList", "backdrop", "onUpdate", "prevProps", "nextProps", "removeAttribute", "removeChild", "$$tippy", "idCounter", "mouseMoveListeners", "mountedInstances", "createTippy", "showTimeout", "hideTimeout", "scheduleHideAnimationFrame", "isVisibleFromClick", "didHideDueToDocumentMouseDown", "didTouchMove", "ignoreOnFirstUpdate", "lastTriggerEvent", "currentTransitionEndListener", "onFirstUpdate", "listeners", "debouncedOnMouseMove", "onMouseMove", "currentTarget", "id", "popperInstance", "isEnabled", "isDestroyed", "isMounted", "isShown", "clearDelayTimeouts", "setProps", "show", "hide", "hideWithInteractivity", "enable", "disable", "unmount", "destroy", "pluginsHooks", "map", "hasAriaExpanded", "hasAttribute", "addListeners", "handleAriaExpandedAttribute", "handleStyles", "invokeHook", "scheduleShow", "getDocument", "getNormalizedTouchSettings", "getIsCustomTouchBehavior", "getIsDefaultRenderFn", "getCurrentTarget", "parentNode", "getDefaultTemplateChildren", "getDelay", "isShow", "fromHide", "pointerEvents", "hook", "shouldInvokePropsHook", "pluginHooks", "handleAriaContentAttribute", "attr", "nodes", "currentValue", "nextValue", "cleanupInteractiveMouseListeners", "onDocumentPress", "actualTarget", "composedPath", "removeDocumentPress", "onTouchMove", "onTouchStart", "addDocumentPress", "doc", "onTransitionedOut", "callback", "onTransitionEnd", "onTransitionedIn", "on", "eventType", "handler", "options", "onMouseLeave", "onBlurOrFocusOut", "removeListeners", "shouldScheduleClickHide", "isEventListenerStopped", "wasFocused", "scheduleHide", "isCursorOverReferenceOrPopper", "getNestedPopperTree", "getBoundingClientRect", "shouldBail", "relatedTarget", "createPopperInstance", "destroyPopperInstance", "computedReference", "contextElement", "tippyModifier", "enabled", "phase", "requires", "attributes", "modifiers", "padding", "adaptive", "createPopper", "mount", "nextElementSibling", "touchValue", "touchDelay", "requestAnimationFrame", "cancelAnimationFrame", "nestedPopper", "forceUpdate", "isAlreadyVisible", "isDisabled", "isTouchAndTouchDisabled", "visibility", "transition", "offsetHeight", "isAlreadyHidden", "i", "tippy", "optionalProps", "elements", "isSingleContentElement", "isMoreThanOneReferenceElement", "instances", "applyStylesModifier", "applyStyles", "effect", "state", "initialStyles", "popper", "position", "options", "strategy", "left", "top", "margin", "arrow", "reference", "Object", "assign", "elements", "style", "styles", "mouseCoords", "clientX", "clientY", "activeInstances", "storeMouseCoords", "addMouseCoordsListener", "doc", "addEventListener", "removeMouseCoordsListener", "removeEventListener", "followCursor", "name", "defaultValue", "fn", "instance", "reference", "getOwnerDocument", "props", "triggerTarget", "isInternalUpdate", "wasFocusEvent", "isUnmounted", "prevProps", "getIsInitialBehavior", "state", "isVisible", "addListener", "onMouseMove", "removeListener", "unsetGetReferenceClientRect", "setProps", "getReferenceClientRect", "event", "isCursorOverReference", "target", "contains", "rect", "getBoundingClientRect", "relativeX", "left", "relativeY", "top", "interactive", "x", "y", "right", "bottom", "width", "height", "create", "push", "destroy", "filter", "data", "length", "onCreate", "onDestroy", "onBeforeUpdate", "onAfterUpdate", "_", "undefined", "isMounted", "onMount", "onTrigger", "isMouseEvent", "type", "onHidden", "tippy", "setDefaultProps", "render", "result", "tippy", "e", "_", "e", "result", "error", "e", "length", "length", "a", "import_react", "import_client", "import_react", "import_prop_types", "import_react", "import_prop_types", "import_react", "import_prop_types", "e", "React", "PropTypes", "React", "PropTypes", "import_react", "import_prop_types", "import_react", "import_prop_types", "import_react", "React", "x", "y", "React", "PropTypes", "x", "y", "React", "PropTypes", "import_react", "import_prop_types", "import_throttle", "offset", "x", "y", "throttle", "React", "PropTypes", "import_react", "import_prop_types", "import_react", "import_prop_types", "import_react", "import_prop_types", "height", "width", "React", "PropTypes", "import_zones_and_module_positions", "position", "width", "height", "width", "x", "y", "handleClick", "React", "PropTypes", "load", "i", "result", "_", "window", "width", "height", "x", "y", "i", "j", "r", "c", "_", "handleClick", "i", "React", "j", "x", "y", "PropTypes", "import_react", "import_prop_types", "import_react", "import_prop_types", "height", "width", "x", "y", "number", "React", "PropTypes", "n", "React", "PropTypes", "import_react", "import_prop_types", "import_react", "import_prop_types", "import_react", "import_prop_types", "import_debounce", "showSpinner", "cssName", "debounce", "React", "PropTypes", "import_react", "import_prop_types", "import_react", "import_prop_types", "PropTypes", "React", "showSpinner", "React", "PropTypes", "React", "PropTypes", "import_react", "import_prop_types", "React", "position", "PropTypes", "import_react", "import_prop_types", "BASE_CLASS", "React", "PropTypes", "import_react", "import_prop_types", "import_react", "import_prop_types", "import_react", "import_prop_types", "PropTypes", "React", "id", "import_react", "import_prop_types", "React", "PropTypes", "React", "PropTypes", "import_react", "import_prop_types", "import_react", "import_prop_types", "React", "PropTypes", "React", "PropTypes", "React", "PropTypes", "import_react", "import_prop_types", "import_react", "import_prop_types", "on", "React", "PropTypes", "on", "React", "PropTypes", "_", "i", "React", "PropTypes", "import_react", "import_prop_types", "import_react", "import_prop_types", "import_react", "React", "import_react", "React", "x", "y", "width", "height", "React", "PropTypes", "x", "y", "width", "height", "i", "React", "PropTypes", "import_react", "import_prop_types", "import_react", "import_prop_types", "x", "y", "height", "width", "React", "PropTypes", "React", "PropTypes", "import_react", "import_prop_types", "x", "y", "height", "width", "React", "PropTypes", "import_react", "import_prop_types", "import_react", "import_prop_types", "x", "y", "React", "PropTypes", "import_react", "import_prop_types", "x", "y", "width", "height", "React", "PropTypes", "SelectionMarquee", "x", "y", "width", "height", "React", "PropTypes", "SelectionMarquee_default", "import_react", "import_prop_types", "import_throttle", "import_react", "import_prop_types", "import_react", "import_prop_types", "import_react", "import_prop_types", "import_react", "CompressedIcon", "React", "CompressedIcon_default", "Marker", "x", "y", "React", "CompressedIcon_default", "PropTypes", "Marker_default", "import_react", "import_prop_types", "x", "y", "length", "React", "PropTypes", "x", "y", "height", "offset", "React", "Marker_default", "PropTypes", "import_react", "import_prop_types", "x", "y", "width", "offset", "React", "Marker_default", "PropTypes", "height", "width", "offset", "React", "PropTypes", "x", "y", "position", "m", "height", "width", "snap", "React", "id", "x", "y", "outlinePos", "i", "sortBy", "throttle", "e", "ReactDOM", "PropTypes", "import_react", "import_prop_types", "x", "y", "height", "width", "React", "PropTypes", "key", "top", "right", "bottom", "left", "i", "j", "GridNumbers", "i", "n", "x", "y", "width", "height", "width", "height", "s", "defaultPadding", "top", "right", "bottom", "left", "GridNumbers", "i", "min", "max", "number", "i", "j", "identifier", "rows", "columns", "gridArray", "contourGridArray", "zoneGridArray", "modulePositionGridArray", "containerWidth", "selectionMarquee", "cellHovers", "position", "React", "SelectionMarquee_default", "PropTypes", "import_react", "error", "React", "data", "zip", "chunk", "errorHandler", "React", "root", "href", "visit", "defaultOptions", "btn", "controller", "error", "errors", "m", "module", "error", "require_fails", "test", "require_function_bind_native", "fn", "require_function_uncurry_this", "apply", "toString", "require_classof_raw", "propertyIsEnumerable", "V", "split", "require_is_null_or_undefined", "require_indexed_object", "require_require_object_coercible", "require_is_callable", "require_path", "globalThis", "require_global_this", "navigator", "require_environment_user_agent", "process", "Deno", "require_environment_v8_version", "require_symbol_constructor_detection", "require_get_built_in", "require_object_is_prototype_of", "require_use_symbol_as_uid", "require_try_to_string", "require_a_callable", "P", "require_function_call", "isObject", "require_is_object", "defineProperty", "key", "require_is_pure", "require_define_global_property", "require_shared_store", "require_to_object", "hasOwnProperty", "id", "shared", "require_shared", "require_has_own_property", "require_uid", "Symbol", "require_is_symbol", "getMethod", "require_get_method", "require_ordinary_to_primitive", "require_well_known_symbol", "result", "toPrimitive", "require_to_primitive", "document", "require_descriptors", "require_document_create_element", "require_object_property_is_enumerable", "require_create_property_descriptor", "require_to_indexed_object", "require_to_property_key", "require_ie8_dom_define", "O", "feature", "data", "normalize", "string", "require_function_uncurry_this_clause", "bind", "require_v8_prototype_define_bug", "require_an_object", "require_object_define_property", "object", "require_function_apply", "require_object_get_own_property_descriptor", "require_is_forced", "require_function_bind_context", "require_create_non_enumerable_property", "a", "b", "c", "ceil", "floor", "x", "n", "require_math_trunc", "number", "require_to_integer_or_infinity", "max", "min", "length", "integer", "require_to_length", "require_to_absolute_index", "require_length_of_array_like", "$", "require_export", "require_array_includes", "require_add_to_unscopables", "require_es_array_includes", "require_get_built_in_prototype_method", "isRegExp", "require_is_regexp", "require_to_string_tag_support", "require_classof", "error2", "require_not_a_regexp", "require_to_string", "require_correct_is_regexp_logic", "require_es_string_includes", "own", "map", "array", "i", "result", "filter", "radians", "d", "s", "m", "g", "capitalize", "width", "height", "o", "origin", "x", "y", "data", "defaults", "key", "globals", "getWindow", "globals", "Base", "create", "capitalize", "capitalize", "i", "extend", "methods", "key", "fn", "o", "reference", "transforms", "isHex", "isRgb", "isNumber", "attr", "array", "c", "i", "show", "hide", "a", "v", "r", "map", "filter", "data", "key", "e", "k", "hex", "object", "b", "p", "q", "t", "Color", "round", "sin", "pi", "l", "h", "g", "_a", "m", "y", "max", "min", "s", "d", "values", "_b", "_c", "x", "z", "pow", "Point", "point", "Matrix", "o", "origin", "position", "translate", "relative", "f", "cx", "cy", "dx", "dy", "determinant", "around", "Element", "radians", "cos", "transformer", "globals", "svg", "node", "Box", "width", "height", "bbox", "clone", "box", "el", "rbox", "level", "extend", "methods", "attrs", "id", "getEventTarget", "on", "n", "dispatch", "Base", "j", "noop", "array", "SVGNumber", "number", "hooks", "fn", "attr", "isNumber", "Dom", "attrs", "i", "globals", "map", "create", "id", "position", "result", "extend", "Element", "x", "y", "root", "height", "until", "p", "o", "width", "defaults", "bbox", "point", "t", "a", "m", "b", "c", "d", "e", "f", "cx", "cy", "origin", "length", "Point", "v", "transforms", "str", "transform", "ctm", "relative", "Container", "rx", "ry", "Image", "on", "Line", "x1", "y1", "x2", "y2", "Marker", "k", "from", "to", "Controller", "pi", "j", "parser", "s", "l", "TransformBag", "values", "entries", "key", "clear", "Polygon", "now", "start", "w", "when", "runnerInfo", "info", "timeline", "Runner", "r", "history", "keys", "level", "run", "size", "x$1", "y$1", "center", "build", "Text", "self", "dy", "dx", "Circle", "getWindow", "G", "A", "link", "offset", "Style", "track", "concaveman", "centroid", "getType", "getType", "centroid", "i", "pi", "a", "point", "index_default", "top", "left", "p", "x", "y", "width", "height", "polygon", "index_default", "visit", "import_sumBy", "import_sumBy", "import_zones_and_module_positions", "self", "getParent", "self", "getParent", "p2", "p3", "p4", "self", "getParent", "self", "getParent", "self", "getParent", "e", "result", "i", "j", "p", "a", "s", "b", "position", "p2", "p3", "p4", "c", "data", "import_sumBy", "RoofSectionBase", "self", "s", "sumBy", "point", "i", "roofSectionPersistenceData", "data", "RoofSectionModel", "roof_section_model_default", "RoofPlaneBase", "roof_section_model_default", "self", "point", "sumBy", "roofPlanePersistenceData", "result", "roofSectionPersistenceData", "RoofPlaneModel", "roof_plane_model_default", "self", "ProjectModelBase", "roof_plane_model_default", "self", "sumBy", "identifier", "persistenceData", "put", "data", "roofPlanePersistenceData", "ProjectModel", "project_model_default", "i2", "x1", "y1", "x2", "y2", "dx", "dy", "length", "p1", "p2", "feature", "f", "controller", "Vector_default", "Base", "controller", "coordinates", "controller", "uuid", "x0", "y0", "x1", "y1", "dx", "dy", "project_model_default", "Base", "feature", "size", "data", "errors", "x", "y", "show", "toggle", "import_react", "import_client", "import_react", "import_prop_types", "import_prop_types", "PropTypes", "PropTypes", "id", "m", "p", "React", "classes", "import_react", "import_prop_types", "import_react", "import_prop_types", "import_react", "import_prop_types", "PropTypes", "id", "React", "import_react", "_", "React", "PropTypes", "m", "id", "React", "i", "import_react", "import_prop_types", "import_react", "p", "id", "React", "i", "PropTypes", "p", "import_react", "import_prop_types", "React", "PropTypes", "import_react", "import_prop_types", "React", "classes", "PropTypes", "import_react", "import_prop_types", "PropTypes", "React", "PropTypes", "React", "p", "React", "zip", "result", "location", "zip", "data", "result", "location", "error", "longitude", "data", "init", "shadow", "error", "errorHandler", "location", "viewport", "base_controller_default", "location", "e", "length", "patch", "length", "clamp", "inputSelector", "import_react", "import_server", "location", "matches", "distance", "ReactDOMServer", "React", "a", "height", "_", "start", "import_throttle", "throttle", "Form", "import_react", "import_server", "location", "React", "ReactDOMServer", "toString", "result", "key", "value", "toArray", "_", "string", "number", "boolean", "array", "config", "is", "values", "schema", "key", "result", "config", "schema", "next", "test", "error", "isArray", "resolve", "result", "next", "clone", "i", "k", "v", "error", "s", "fn", "before", "schema", "test", "count", "key", "_", "errors", "optional", "keys", "toArray", "n", "c", "boolean", "date", "t", "length", "string", "min", "max", "number", "isDate", "a", "b", "toposort", "p", "isObject", "from", "to", "array", "values", "types", "errors", "link", "link", "l", "f", "CadDlController", "_", "f", "import_debounce", "debounce", "id", "tabs_controller_default", "roof_information_controller_default", "a", "id", "t", "t", "identifier", "id", "link", "action", "i", "link", "errorHandler", "base_controller_default", "e", "link", "id", "Form", "i", "action", "width", "height", "y", "t", "e", "action", "id", "a", "id", "link", "s", "error", "div", "linkFeatureToModel", "feature", "model", "removeFeaturesForRoofPlane", "createRoofPlane", "linkFeatureToModel", "modifyRoofPlane", "repositionRoofPlane", "deleteRoofPlane", "removeFeaturesForRoofPlane", "p", "fromLonLat", "start", "end", "project_model_default", "b", "e", "filter", "i", "f", "Map_default", "Base_default", "Base_default", "e", "m", "dx", "l", "c", "i", "j", "start", "end", "width", "e", "width", "allPanelsBySegmentUuid", "selectedPanelsBySegmentUuid", "_", "i", "result", "controller", "coordinates", "fromLonLat", "feature", "controller", "i", "distance", "METERS_TO_INCHES", "controller", "fromLonLat", "coordinates", "feature", "top", "bottom", "p2", "p3", "p4", "controller", "attrs", "uuid", "s", "import_zones_and_module_positions", "a", "i", "controller", "uuid", "n", "i", "e", "j", "s", "_", "f", "distance", "k", "lastSegment", "controller", "controller", "METERS_TO_INCHES", "toLonLat", "distance", "uuid", "controller", "identifier", "feature", "toLonLat", "origin", "controller", "identifier", "feature", "controller", "identifier", "feature", "model", "p1", "p2", "p3", "p4", "coordinates", "fromLonLat", "feature", "width", "height", "bufferFeature", "coordinates", "WEIGHT_BORDER", "map", "number", "scale", "feature", "Vector_default", "feature", "show", "l", "feature", "map", "fill", "defaults", "feature", "Vector_default", "import_throttle", "controller", "c", "toLonLat", "METERS_TO_INCHES", "radiansToDegrees", "_", "i", "distance", "fromLonLat", "feature", "controller", "origin", "coordinates", "feature", "i", "a", "all", "s", "b", "c", "controller", "feature", "distance", "point2", "METERS_TO_INCHES", "i", "c", "a", "b", "controller", "throttle", "model", "coordinates", "p", "fromLonLat", "feature", "linkFeatureToModel", "f", "result", "point", "feature", "s", "import_throttle", "DragBox_default", "Base", "DragBox_default", "set", "feature", "geometry", "throttle", "e", "Base", "feature", "Base", "Base", "fromLonLat", "identifier", "MapBaseController", "model", "controller", "g", "result", "distance", "s", "feature", "Vector_default", "controller", "i", "controller", "controller", "result", "feature", "i", "nudgeVector", "controller", "i", "nudgeVector", "uuid", "j", "controller", "j", "i", "fromLonLat", "nudgeVector", "controller", "i", "nudgedStartLatLng", "distance", "controller", "i", "newStartLatLng", "distance", "nudgeVector", "coordinates", "import_zones_and_module_positions", "controller", "controller", "newRailGroups", "i", "attrs", "distance", "i", "result", "nudgedStartLatLng", "i", "result", "controlColumnIndex", "controller", "controller", "p", "feature", "controller", "uuid", "toLonLat", "METERS_TO_INCHES", "import_lodash", "controller", "i", "result", "s", "r", "position", "fromLonLat", "feature", "Arrays", "Base", "controller", "feature", "i", "s", "Arrays", "Base", "Arrays", "Base", "Arrays", "Base", "import_throttle", "toLonLat", "METERS_TO_INCHES", "controller", "throttle", "e", "DragBox_default", "set", "clone", "map", "feature", "i", "controller", "s", "a", "b", "c", "MapBaseController", "snapshot", "Arrays", "Base", "disable", "enable", "f", "feature", "map", "arrow", "METERS_TO_INCHES", "fromLonLat", "dx", "dy", "width", "height", "i", "m", "feature", "polygon", "feature", "import_throttle", "throttle", "feature", "Vector_default", "MapRoofPlanesController", "MapBaseController", "p", "fromLonLat", "i", "s", "Vector_default", "feature", "PanelProperties", "Base", "feature", "position", "PanelProperties", "Base", "import_zones_and_module_positions", "MapBaseController", "disable", "PanelProperties", "Base", "RoofPlanes", "Base", "feature", "createRoofPlane", "RoofPlaneShapes", "feature", "createRoofPlane", "RoofPlanes", "controller", "modifyRoofPlane", "deleteRoofPlane", "feature", "RoofPlanes", "Base", "RoofPlanes", "Base", "repositionRoofPlane", "RoofPlanes", "Base", "modifyRoofPlane", "RoofPlanesTransformInteractionManager", "controller", "e", "feature", "modifyRoofPlane", "c", "MapRoofPlanesController", "MapBaseController", "k", "RoofPlanes", "RoofPlaneShapes", "Base", "RoofPlanesTransformInteractionManager", "feature", "deleteRoofPlane", "fromLonLat", "map", "coordinates", "createRoofPlane", "enable", "disable", "f", "distance", "visible", "feature", "controller", "feature", "Setbacks", "Base", "Setbacks", "Base", "Base", "feature", "MapBaseController", "f", "Base", "Setbacks", "defaults", "feature", "MapBaseController", "distance", "visible", "defaults", "feature", "MapBaseController", "roof_information_controller_default", "show", "a", "now", "Form", "save_all_segments_controller_default", "id", "import_debounce", "debounce", "save_all_segments_controller_default", "id", "xhr", "timestampInSeconds", "html", "MapBaseController", "base_controller_default", "CadDlController", "tabs_controller_default", "roof_information_controller_default", "MapRoofPlanesController", "save_all_segments_controller_default", "e"]
}
